From 1656c5b1e698058892901b48a1ce3cd81afe5026 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Wed, 22 Feb 2017 16:42:52 +0100 Subject: [PATCH 01/26] squashed Sankey feature branch for 1st look --- dist/README.md | 138 +- dist/npm-ls.json | 479 +- dist/plotly-sankey.min.js | 28 + dist/plotly-with-meta.js | 11279 +++++++++++++++----- dist/plotly.js | 11130 +++++++++++++++----- dist/plotly.min.js | 134 +- lib/index-sankey.js | 17 + lib/index.js | 1 + lib/sankey.js | 11 + package.json | 5 + src/plots/cartesian/graph_interact.js | 2 +- src/traces/sankey/attributes.js | 149 + src/traces/sankey/base_plot.js | 33 + src/traces/sankey/calc.js | 14 + src/traces/sankey/colorbar.js | 52 + src/traces/sankey/constants.js | 24 + src/traces/sankey/defaults.js | 136 + src/traces/sankey/index.js | 31 + src/traces/sankey/plot.js | 258 + src/traces/sankey/render.js | 538 + tasks/util/constants.js | 2 +- test/image/baselines/sankey.png | Bin 0 -> 53847 bytes test/image/baselines/sankey_1.png | Bin 0 -> 12949 bytes test/image/baselines/sankey_2.png | Bin 0 -> 22568 bytes test/image/baselines/sankey_large.png | Bin 0 -> 55933 bytes test/image/mocks/energy.json | 214 + test/image/mocks/sankey.json | 13334 ++++++++++++++++++++++++ test/image/mocks/sankey_1.json | 28 + test/image/mocks/sankey_2.json | 38 + test/image/mocks/sankey_large.json | 77 + test/image/mocks/sankey_new.json | 2320 +++++ test/jasmine/tests/sankey_test.js | 942 ++ 32 files changed, 35391 insertions(+), 6023 deletions(-) create mode 100644 dist/plotly-sankey.min.js create mode 100644 lib/index-sankey.js create mode 100644 lib/sankey.js create mode 100644 src/traces/sankey/attributes.js create mode 100644 src/traces/sankey/base_plot.js create mode 100644 src/traces/sankey/calc.js create mode 100644 src/traces/sankey/colorbar.js create mode 100644 src/traces/sankey/constants.js create mode 100644 src/traces/sankey/defaults.js create mode 100644 src/traces/sankey/index.js create mode 100644 src/traces/sankey/plot.js create mode 100644 src/traces/sankey/render.js create mode 100644 test/image/baselines/sankey.png create mode 100644 test/image/baselines/sankey_1.png create mode 100644 test/image/baselines/sankey_2.png create mode 100644 test/image/baselines/sankey_large.png create mode 100644 test/image/mocks/energy.json create mode 100644 test/image/mocks/sankey.json create mode 100644 test/image/mocks/sankey_1.json create mode 100644 test/image/mocks/sankey_2.json create mode 100644 test/image/mocks/sankey_large.json create mode 100644 test/image/mocks/sankey_new.json create mode 100644 test/jasmine/tests/sankey_test.js diff --git a/dist/README.md b/dist/README.md index c1751be6925..2dd00bc2c6d 100644 --- a/dist/README.md +++ b/dist/README.md @@ -50,145 +50,31 @@ The main plotly.js bundle weights in at: | plotly.js | plotly.min.js | plotly.min.js + gzip | plotly-with-meta.js | |-----------|---------------|----------------------|---------------------| -| 4.9 MB | 2 MB | 612.5 kB | 5.1 MB | +| 5.1 MB | 2.1 MB | 634.4 kB | 5.2 MB | ## Partial bundles Starting in `v1.15.0`, plotly.js also ships with several _partial_ bundles: -- [basic](#plotlyjs-basic) -- [cartesian](#plotlyjs-cartesian) -- [geo](#plotlyjs-geo) -- [gl3d](#plotlyjs-gl3d) -- [gl2d](#plotlyjs-gl2d) -- [mapbox](#plotlyjs-mapbox) -- [finance](#plotlyjs-finance) +- [sankey](#plotlyjs-sankey) -### plotly.js basic +### plotly.js sankey -The `basic` partial bundle contains the `scatter`, `bar` and `pie` trace modules. +The `sankey` partial bundle contains the `scatter` and `sankey` trace modules. | Way to import | Location | |---------------|----------| -| dist bundle | `dist/plotly-basic.js` | -| dist bundle (minified) | `dist/plotly-basic.min.js` | -| CDN URL (latest) | https://cdn.plot.ly/plotly-basic-latest.js | -| CDN URL (latest minified) | https://cdn.plot.ly/plotly-basic-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-basic-1.25.2.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-basic-1.25.2.min.js | -| CommonJS | `require('plotly.js/lib/index-basic')` | +| dist bundle | `dist/plotly-sankey.js` | +| dist bundle (minified) | `dist/plotly-sankey.min.js` | +| CDN URL (latest) | https://cdn.plot.ly/plotly-sankey-latest.js | +| CDN URL (latest minified) | https://cdn.plot.ly/plotly-sankey-latest.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-sankey-1.25.2.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-sankey-1.25.2.min.js | +| CommonJS | `require('plotly.js/lib/index-sankey')` | | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 1.7 MB | 631.6 kB | 205.2 kB | - -### plotly.js cartesian - -The `cartesian` partial bundle contains the `scatter`, `bar`, `box`, `heatmap`, `histogram`, `histogram2d`, `histogram2dcontour`, `pie`, `contour` and `scatterternary` trace modules. - -| Way to import | Location | -|---------------|----------| -| dist bundle | `dist/plotly-cartesian.js` | -| dist bundle (minified) | `dist/plotly-cartesian.min.js` | -| CDN URL (latest) | https://cdn.plot.ly/plotly-cartesian-latest.js | -| CDN URL (latest minified) | https://cdn.plot.ly/plotly-cartesian-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-cartesian-1.25.2.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-cartesian-1.25.2.min.js | -| CommonJS | `require('plotly.js/lib/index-cartesian')` | - -| Raw size | Minified size | Minified + gzip size | -|------|-----------------|------------------------| -| 1.9 MB | 706 kB | 227.5 kB | - -### plotly.js geo - -The `geo` partial bundle contains the `scatter`, `scattergeo` and `choropleth` trace modules. - -| Way to import | Location | -|---------------|----------| -| dist bundle | `dist/plotly-geo.js` | -| dist bundle (minified) | `dist/plotly-geo.min.js` | -| CDN URL (latest) | https://cdn.plot.ly/plotly-geo-latest.js | -| CDN URL (latest minified) | https://cdn.plot.ly/plotly-geo-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-geo-1.25.2.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-geo-1.25.2.min.js | -| CommonJS | `require('plotly.js/lib/index-geo')` | - -| Raw size | Minified size | Minified + gzip size | -|------|-----------------|------------------------| -| 1.7 MB | 654.9 kB | 213.8 kB | - -### plotly.js gl3d - -The `gl3d` partial bundle contains the `scatter`, `scatter3d`, `surface` and `mesh3d` trace modules. - -| Way to import | Location | -|---------------|----------| -| dist bundle | `dist/plotly-gl3d.js` | -| dist bundle (minified) | `dist/plotly-gl3d.min.js` | -| CDN URL (latest) | https://cdn.plot.ly/plotly-gl3d-latest.js | -| CDN URL (latest minified) | https://cdn.plot.ly/plotly-gl3d-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl3d-1.25.2.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl3d-1.25.2.min.js | -| CommonJS | `require('plotly.js/lib/index-gl3d')` | - -| Raw size | Minified size | Minified + gzip size | -|------|-----------------|------------------------| -| 2.6 MB | 1.1 MB | 342.8 kB | - -### plotly.js gl2d - -The `gl2d` partial bundle contains the `scatter`, `scattergl`, `pointcloud`, `heatmapgl`, `contourgl` and `parcoords` trace modules. - -| Way to import | Location | -|---------------|----------| -| dist bundle | `dist/plotly-gl2d.js` | -| dist bundle (minified) | `dist/plotly-gl2d.min.js` | -| CDN URL (latest) | https://cdn.plot.ly/plotly-gl2d-latest.js | -| CDN URL (latest minified) | https://cdn.plot.ly/plotly-gl2d-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl2d-1.25.2.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl2d-1.25.2.min.js | -| CommonJS | `require('plotly.js/lib/index-gl2d')` | - -| Raw size | Minified size | Minified + gzip size | -|------|-----------------|------------------------| -| 2.7 MB | 1.1 MB | 349 kB | - -### plotly.js mapbox - -The `mapbox` partial bundle contains the `scatter` and `scattermapbox` trace modules. - -| Way to import | Location | -|---------------|----------| -| dist bundle | `dist/plotly-mapbox.js` | -| dist bundle (minified) | `dist/plotly-mapbox.min.js` | -| CDN URL (latest) | https://cdn.plot.ly/plotly-mapbox-latest.js | -| CDN URL (latest minified) | https://cdn.plot.ly/plotly-mapbox-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-mapbox-1.25.2.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-mapbox-1.25.2.min.js | -| CommonJS | `require('plotly.js/lib/index-mapbox')` | - -| Raw size | Minified size | Minified + gzip size | -|------|-----------------|------------------------| -| 2.7 MB | 1 MB | 318.1 kB | - -### plotly.js finance - -The `finance` partial bundle contains the `scatter`, `bar`, `histogram`, `pie`, `ohlc` and `candlestick` trace modules. - -| Way to import | Location | -|---------------|----------| -| dist bundle | `dist/plotly-finance.js` | -| dist bundle (minified) | `dist/plotly-finance.min.js` | -| CDN URL (latest) | https://cdn.plot.ly/plotly-finance-latest.js | -| CDN URL (latest minified) | https://cdn.plot.ly/plotly-finance-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-finance-1.25.2.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-finance-1.25.2.min.js | -| CommonJS | `require('plotly.js/lib/index-finance')` | - -| Raw size | Minified size | Minified + gzip size | -|------|-----------------|------------------------| -| 1.7 MB | 658.4 kB | 212.7 kB | +| 1.7 MB | 665.9 kB | 216.4 kB | ---------------- diff --git a/dist/npm-ls.json b/dist/npm-ls.json index 02b52a037db..8b94ae1a084 100644 --- a/dist/npm-ls.json +++ b/dist/npm-ls.json @@ -1,53 +1,32 @@ { "name": "plotly.js", "version": "1.25.2", + "problems": [ + "missing: through2@^0.6.3, required by glslify@4.0.0", + "missing: through2@^0.6.3, required by glsl-tokenizer@2.1.2", + "missing: falafel@^1.0.0, required by static-module@1.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "3d-view": { "version": "2.0.0", "from": "3d-view@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/3d-view/-/3d-view-2.0.0.tgz", "dependencies": { - "matrix-camera-controller": { - "version": "2.1.1", - "from": "matrix-camera-controller@>=2.1.1 <3.0.0", - "resolved": "https://registry.npmjs.org/matrix-camera-controller/-/matrix-camera-controller-2.1.1.tgz", - "dependencies": { - "gl-vec3": { - "version": "1.0.3", - "from": "gl-vec3@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/gl-vec3/-/gl-vec3-1.0.3.tgz" - }, - "mat4-interpolate": { - "version": "1.0.4", - "from": "mat4-interpolate@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/mat4-interpolate/-/mat4-interpolate-1.0.4.tgz", - "dependencies": { - "mat4-decompose": { - "version": "1.0.4", - "from": "mat4-decompose@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/mat4-decompose/-/mat4-decompose-1.0.4.tgz" - }, - "mat4-recompose": { - "version": "1.0.4", - "from": "mat4-recompose@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/mat4-recompose/-/mat4-recompose-1.0.4.tgz" - }, - "quat-slerp": { - "version": "1.0.1", - "from": "quat-slerp@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/quat-slerp/-/quat-slerp-1.0.1.tgz", - "dependencies": { - "gl-quat": { - "version": "1.0.0", - "from": "gl-quat@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/gl-quat/-/gl-quat-1.0.0.tgz" - } - } - } - } - } - } - }, "orbit-camera-controller": { "version": "4.0.0", "from": "orbit-camera-controller@>=4.0.0 <5.0.0", @@ -74,6 +53,11 @@ } } }, + "@monfera/d3-sankey": { + "version": "0.4.2", + "from": "@monfera/d3-sankey@>=0.4.2 <0.5.0", + "resolved": "https://registry.npmjs.org/@monfera/d3-sankey/-/d3-sankey-0.4.2.tgz" + }, "alpha-shape": { "version": "1.0.0", "from": "alpha-shape@>=1.0.0 <2.0.0", @@ -156,9 +140,9 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", "dependencies": { "brace-expansion": { - "version": "1.1.6", + "version": "1.1.7", "from": "brace-expansion@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", "dependencies": { "balanced-match": { "version": "0.4.2", @@ -206,6 +190,11 @@ "from": "define-properties@>=1.1.2 <2.0.0", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "dependencies": { + "foreach": { + "version": "2.0.5", + "from": "foreach@>=2.0.5 <3.0.0", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz" + }, "object-keys": { "version": "1.0.11", "from": "object-keys@>=1.0.8 <2.0.0", @@ -376,6 +365,50 @@ "from": "d3@>=3.5.12 <4.0.0", "resolved": "https://registry.npmjs.org/d3/-/d3-3.5.17.tgz" }, + "d3-array": { + "version": "1.1.1", + "from": "d3-array@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.1.1.tgz" + }, + "d3-collection": { + "version": "1.0.3", + "from": "d3-collection@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/d3-collection/-/d3-collection-1.0.3.tgz" + }, + "d3-force": { + "version": "1.0.6", + "from": "d3-force@>=1.0.6 <2.0.0", + "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-1.0.6.tgz", + "dependencies": { + "d3-dispatch": { + "version": "1.0.3", + "from": "d3-dispatch@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.3.tgz" + }, + "d3-quadtree": { + "version": "1.0.3", + "from": "d3-quadtree@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-1.0.3.tgz" + }, + "d3-timer": { + "version": "1.0.5", + "from": "d3-timer@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.5.tgz" + } + } + }, + "d3-interpolate": { + "version": "1.1.4", + "from": "d3-interpolate@>=1.1.3 <2.0.0", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.1.4.tgz", + "dependencies": { + "d3-color": { + "version": "1.0.3", + "from": "d3-color@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.0.3.tgz" + } + } + }, "delaunay-triangulate": { "version": "1.1.6", "from": "delaunay-triangulate@>=1.1.6 <2.0.0", @@ -402,6 +435,11 @@ "version": "1.1.3", "from": "gl-contour2d@>=1.1.2 <2.0.0", "resolved": "https://registry.npmjs.org/gl-contour2d/-/gl-contour2d-1.1.3.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@4.0.0", + "missing: through2@^0.6.3, required by glsl-tokenizer@2.1.2", + "missing: falafel@^1.0.0, required by static-module@1.3.1" + ], "dependencies": { "cdt2d": { "version": "1.0.0", @@ -483,6 +521,11 @@ "version": "4.0.0", "from": "glslify@>=4.0.0 <5.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-4.0.0.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@4.0.0", + "missing: through2@^0.6.3, required by glsl-tokenizer@2.1.2", + "missing: falafel@^1.0.0, required by static-module@1.3.1" + ], "dependencies": { "bl": { "version": "1.2.0", @@ -490,35 +533,35 @@ "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.0.tgz", "dependencies": { "readable-stream": { - "version": "2.2.6", + "version": "2.2.9", "from": "readable-stream@>=2.0.5 <3.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", "dependencies": { "isarray": { "version": "1.0.0", "from": "isarray@>=1.0.0 <1.1.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" }, + "string_decoder": { + "version": "1.0.0", + "from": "string_decoder@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.0.tgz" + }, "buffer-shims": { "version": "1.0.0", - "from": "buffer-shims@>=1.0.0 <2.0.0", + "from": "buffer-shims@>=1.0.0 <1.1.0", "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" }, "core-util-is": { "version": "1.0.2", "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" }, "process-nextick-args": { "version": "1.0.7", "from": "process-nextick-args@>=1.0.6 <1.1.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, - "string_decoder": { - "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, "util-deprecate": { "version": "1.0.2", "from": "util-deprecate@>=1.0.1 <1.1.0", @@ -549,6 +592,9 @@ "version": "4.0.1", "from": "glslify-bundle@>=4.0.0 <5.0.0", "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-4.0.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glsl-tokenizer@2.1.2" + ], "dependencies": { "glsl-inject-defines": { "version": "1.0.3", @@ -608,11 +654,13 @@ "version": "2.1.2", "from": "glsl-tokenizer@>=2.0.2 <3.0.0", "resolved": "https://registry.npmjs.org/glsl-tokenizer/-/glsl-tokenizer-2.1.2.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glsl-tokenizer@2.1.2" + ], "dependencies": { "through2": { - "version": "0.6.5", - "from": "through2@>=0.6.3 <0.7.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -681,25 +729,6 @@ } } }, - "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - } - } - } - } - }, "minimist": { "version": "1.2.0", "from": "minimist@>=1.2.0 <1.3.0", @@ -714,6 +743,9 @@ "version": "1.3.1", "from": "static-module@>=1.1.2 <2.0.0", "resolved": "https://registry.npmjs.org/static-module/-/static-module-1.3.1.tgz", + "problems": [ + "missing: falafel@^1.0.0, required by static-module@1.3.1" + ], "dependencies": { "concat-stream": { "version": "1.4.10", @@ -797,6 +829,23 @@ } } }, + "readable-stream": { + "version": "1.0.34", + "from": "readable-stream@>=1.0.33-1 <1.1.0-0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "dependencies": { + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + } + } + }, "static-eval": { "version": "0.2.4", "from": "static-eval@>=0.2.0 <0.3.0", @@ -821,28 +870,6 @@ } } }, - "falafel": { - "version": "1.2.0", - "from": "falafel@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", - "dependencies": { - "foreach": { - "version": "2.0.5", - "from": "foreach@>=2.0.5 <3.0.0", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz" - }, - "acorn": { - "version": "1.2.2", - "from": "acorn@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz" - }, - "object-keys": { - "version": "1.0.11", - "from": "object-keys@>=1.0.6 <2.0.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz" - } - } - }, "object-inspect": { "version": "0.4.0", "from": "object-inspect@>=0.4.0 <0.5.0", @@ -866,6 +893,10 @@ } } } + }, + "falafel": { + "required": "^1.0.0", + "missing": true } } }, @@ -873,6 +904,10 @@ "version": "4.0.1", "from": "xtend@>=4.0.0 <4.1.0-0", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + }, + "through2": { + "required": "^0.6.3", + "missing": true } } }, @@ -933,11 +968,17 @@ "version": "1.2.1", "from": "gl-error2d@>=1.2.1 <2.0.0", "resolved": "https://registry.npmjs.org/gl-error2d/-/gl-error2d-1.2.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "glslify": { "version": "2.3.1", "from": "glslify@>=2.3.1 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -950,9 +991,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -967,11 +1007,17 @@ "version": "1.0.4", "from": "gl-error3d@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/gl-error3d/-/gl-error3d-1.0.4.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "glslify": { "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -984,9 +1030,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -1013,11 +1058,17 @@ "version": "1.4.1", "from": "gl-line2d@>=1.4.1 <2.0.0", "resolved": "https://registry.npmjs.org/gl-line2d/-/gl-line2d-1.4.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "glslify": { "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1030,9 +1081,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -1052,6 +1102,9 @@ "version": "1.1.0", "from": "gl-line3d@>=1.1.0 <2.0.0", "resolved": "https://registry.npmjs.org/gl-line3d/-/gl-line3d-1.1.0.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "binary-search-bounds": { "version": "1.0.0", @@ -1062,6 +1115,9 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1074,9 +1130,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -1096,6 +1151,9 @@ "version": "1.2.0", "from": "gl-mesh3d@>=1.2.0 <2.0.0", "resolved": "https://registry.npmjs.org/gl-mesh3d/-/gl-mesh3d-1.2.0.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "barycentric": { "version": "1.0.1", @@ -1139,6 +1197,9 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1151,9 +1212,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -1202,6 +1262,9 @@ "version": "1.2.0", "from": "gl-plot2d@>=1.2.0 <2.0.0", "resolved": "https://registry.npmjs.org/gl-plot2d/-/gl-plot2d-1.2.0.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "binary-search-bounds": { "version": "2.0.3", @@ -1217,6 +1280,9 @@ "version": "2.3.1", "from": "glslify@>=2.2.1 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1229,9 +1295,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -1253,9 +1318,14 @@ } }, "gl-plot3d": { - "version": "1.5.3", - "from": "gl-plot3d@>=1.5.2 <2.0.0", - "resolved": "https://registry.npmjs.org/gl-plot3d/-/gl-plot3d-1.5.3.tgz", + "version": "1.5.4", + "from": "gl-plot3d@>=1.5.4 <2.0.0", + "resolved": "https://registry.npmjs.org/gl-plot3d/-/gl-plot3d-1.5.4.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1", + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "3d-view-controls": { "version": "2.2.0", @@ -1285,6 +1355,9 @@ "version": "1.2.5", "from": "gl-axes3d@>=1.2.5 <2.0.0", "resolved": "https://registry.npmjs.org/gl-axes3d/-/gl-axes3d-1.2.5.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "extract-frustum-planes": { "version": "1.0.0", @@ -1295,6 +1368,9 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1307,9 +1383,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -1346,6 +1421,9 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1358,9 +1436,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -1368,11 +1445,17 @@ "version": "1.0.5", "from": "gl-spikes3d@>=1.0.3 <2.0.0", "resolved": "https://registry.npmjs.org/gl-spikes3d/-/gl-spikes3d-1.0.5.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "glslify": { "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1385,9 +1468,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } } @@ -1404,6 +1486,9 @@ "version": "1.0.0", "from": "gl-pointcloud2d@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/gl-pointcloud2d/-/gl-pointcloud2d-1.0.0.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "gl-shader": { "version": "4.2.1", @@ -1414,6 +1499,9 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1426,9 +1514,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } } @@ -1438,6 +1525,9 @@ "version": "1.2.2", "from": "gl-scatter2d@>=1.2.2 <2.0.0", "resolved": "https://registry.npmjs.org/gl-scatter2d/-/gl-scatter2d-1.2.2.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "binary-search-bounds": { "version": "2.0.3", @@ -1448,6 +1538,9 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1460,9 +1553,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -1477,6 +1569,9 @@ "version": "1.3.4", "from": "gl-scatter2d-sdf@1.3.4", "resolved": "https://registry.npmjs.org/gl-scatter2d-sdf/-/gl-scatter2d-sdf-1.3.4.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "color-id": { "version": "1.0.3", @@ -1509,6 +1604,9 @@ "version": "2.3.1", "from": "glslify@>=2.3.1 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1521,9 +1619,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@>=0.6.3 <0.7.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -1538,11 +1635,17 @@ "version": "1.0.10", "from": "gl-scatter3d@>=1.0.4 <2.0.0", "resolved": "https://registry.npmjs.org/gl-scatter3d/-/gl-scatter3d-1.0.10.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "glslify": { "version": "2.3.1", "from": "glslify@>=2.2.1 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1555,9 +1658,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -1663,11 +1765,17 @@ "version": "1.0.1", "from": "gl-select-box@>=1.0.1 <2.0.0", "resolved": "https://registry.npmjs.org/gl-select-box/-/gl-select-box-1.0.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "glslify": { "version": "2.3.1", "from": "glslify@>=2.2.1 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1680,9 +1788,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } } @@ -1757,6 +1864,9 @@ "version": "1.3.0", "from": "gl-surface3d@>=1.3.0 <2.0.0", "resolved": "https://registry.npmjs.org/gl-surface3d/-/gl-surface3d-1.3.0.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bit-twiddle": { "version": "1.0.2", @@ -1772,6 +1882,9 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", + "problems": [ + "missing: through2@^0.6.3, required by glslify@2.3.1" + ], "dependencies": { "bl": { "version": "0.9.5", @@ -1784,9 +1897,8 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "version": "0.6.5", - "from": "through2@^0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + "required": "^0.6.3", + "missing": true } } }, @@ -1924,18 +2036,23 @@ }, "through2": { "version": "2.0.3", - "from": "through2@>=2.0.3 <3.0.0", + "from": "through2@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "dependencies": { "readable-stream": { - "version": "2.2.6", + "version": "2.2.9", "from": "readable-stream@>=2.1.5 <3.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", "dependencies": { "isarray": { "version": "1.0.0", "from": "isarray@>=1.0.0 <1.1.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "string_decoder": { + "version": "1.0.0", + "from": "string_decoder@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.0.tgz" } } } @@ -2158,9 +2275,9 @@ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" }, "form-data": { - "version": "2.1.2", + "version": "2.1.4", "from": "form-data@>=2.1.1 <2.2.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", "dependencies": { "asynckit": { "version": "0.4.0", @@ -2175,9 +2292,9 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", "dependencies": { "ajv": { - "version": "4.11.5", + "version": "4.11.6", "from": "ajv@>=4.9.1 <5.0.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.5.tgz", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.6.tgz", "dependencies": { "co": { "version": "4.6.0", @@ -2440,11 +2557,6 @@ "from": "unassertify@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/unassertify/-/unassertify-2.0.4.tgz", "dependencies": { - "acorn": { - "version": "4.0.11", - "from": "acorn@>=4.0.3 <5.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz" - }, "convert-source-map": { "version": "1.5.0", "from": "convert-source-map@>=1.1.1 <2.0.0", @@ -2506,6 +2618,11 @@ "from": "espurify@>=1.3.0 <2.0.0", "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz" }, + "acorn": { + "version": "4.0.11", + "from": "acorn@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz" + }, "estraverse": { "version": "4.2.0", "from": "estraverse@>=4.1.0 <5.0.0", @@ -2518,6 +2635,11 @@ } } }, + "acorn": { + "version": "4.0.11", + "from": "acorn@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz" + }, "escodegen": { "version": "1.8.1", "from": "escodegen@>=1.6.1 <2.0.0", @@ -2611,6 +2733,47 @@ } } }, + "matrix-camera-controller": { + "version": "2.1.3", + "from": "matrix-camera-controller@>=2.1.3 <3.0.0", + "resolved": "https://registry.npmjs.org/matrix-camera-controller/-/matrix-camera-controller-2.1.3.tgz", + "dependencies": { + "gl-vec3": { + "version": "1.0.3", + "from": "gl-vec3@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/gl-vec3/-/gl-vec3-1.0.3.tgz" + }, + "mat4-interpolate": { + "version": "1.0.4", + "from": "mat4-interpolate@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/mat4-interpolate/-/mat4-interpolate-1.0.4.tgz", + "dependencies": { + "mat4-decompose": { + "version": "1.0.4", + "from": "mat4-decompose@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/mat4-decompose/-/mat4-decompose-1.0.4.tgz" + }, + "mat4-recompose": { + "version": "1.0.4", + "from": "mat4-recompose@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/mat4-recompose/-/mat4-recompose-1.0.4.tgz" + }, + "quat-slerp": { + "version": "1.0.1", + "from": "quat-slerp@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/quat-slerp/-/quat-slerp-1.0.1.tgz", + "dependencies": { + "gl-quat": { + "version": "1.0.0", + "from": "gl-quat@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/gl-quat/-/gl-quat-1.0.0.tgz" + } + } + } + } + } + } + }, "mouse-change": { "version": "1.4.0", "from": "mouse-change@>=1.4.0 <2.0.0", @@ -2682,9 +2845,9 @@ } }, "uglify-js": { - "version": "2.8.20", + "version": "2.8.22", "from": "uglify-js@>=2.6.0 <3.0.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.20.tgz", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.22.tgz", "dependencies": { "source-map": { "version": "0.5.6", diff --git a/dist/plotly-sankey.min.js b/dist/plotly-sankey.min.js new file mode 100644 index 00000000000..1f4016a4c30 --- /dev/null +++ b/dist/plotly-sankey.min.js @@ -0,0 +1,28 @@ +/** +* plotly.js (sankey - minified) v1.25.2 +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* Licensed under the MIT license +*/ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Plotly=t()}}(function(){var t;return function t(e,n,r){function a(i,l){if(!n[i]){if(!e[i]){var s="function"==typeof require&&require;if(!l&&s)return s(i,!0);if(o)return o(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[i]={exports:{}};e[i][0].call(c.exports,function(t){var n=e[i][1][t];return a(n||t)},c,c.exports,t,e,n,r)}return n[i].exports}for(var o="function"==typeof require&&require,i=0;i0&&(e.y+=n),o=e.y+e.dy+p;if((n=o-p-g[1])>0)for(o=e.y-=n,r=i-2;r>=0;--r)e=t[r],n=e.y+e.dy+p-o,n>0&&(e.y-=n),o=e.y})}function a(t,e){return t.y-e.y}var o=n.nest().key(function(t){return t.x}).sortKeys(e.ascending).entries(v).map(function(t){return t.values});!function(){var t=e.min(o,function(t){return(g[1]-(t.length-1)*p)/e.sum(t,f)});o.forEach(function(e){e.forEach(function(e,n){e.y=n,e.dy=e.value*t})}),m.forEach(function(e){e.dy=e.value*t})}(),r();for(var i=1;t>0;--t)!function(t){function n(t){return c(t.target)*t.value}o.slice().reverse().forEach(function(r){r.forEach(function(r){if(r.sourceLinks.length){var a=e.sum(r.sourceLinks,n)/e.sum(r.sourceLinks,f);r.y+=(a-c(r))*t}})})}(i*=.99),r(),function(t){function n(t){return c(t.source)*t.value}o.forEach(function(r){r.forEach(function(r){if(r.targetLinks.length){var a=e.sum(r.targetLinks,n)/e.sum(r.targetLinks,f);r.y+=(a-c(r))*t}})})}(i),r()}function u(){function t(t,e){return t.source.y-e.source.y||t.originalIndex-e.originalIndex}function e(t,e){return t.target.y-e.target.y||t.originalIndex-e.originalIndex}v.forEach(function(n){n.sourceLinks.sort(e),n.targetLinks.sort(t)}),v.forEach(function(t){var e=0,n=0;t.sourceLinks.forEach(function(t){t.sy=e,e+=t.dy}),t.targetLinks.forEach(function(t){t.ty=n,n+=t.dy})})}function c(t){return t.y+t.dy/2}function f(t){return t.value}var d={},h=24,p=8,g=[1,1],v=[],m=[];return d.nodeWidth=function(t){return arguments.length?(h=+t,d):h},d.nodePadding=function(t){return arguments.length?(p=+t,d):p},d.nodes=function(t){return arguments.length?(v=t,d):v},d.links=function(t){return arguments.length?(m=t,d):m},d.size=function(t){return arguments.length?(g=t,d):g},d.layout=function(e){return t(),a(),o(),s(e),u(),d},d.relayout=function(){return u(),d},d.link=function(){function t(t){var n=t.source.x+t.source.dx,a=t.target.x,o=r.interpolateNumber(n,a),i=o(e),l=o(1-e),s=t.source.y+t.sy+t.dy/2,u=t.target.y+t.ty+t.dy/2;return"M"+n+","+s+"C"+i+","+s+" "+l+","+u+" "+a+","+u}var e=.5;return t.curvature=function(n){return arguments.length?(e=+n,t):e},t},d};t.sankey=a,Object.defineProperty(t,"__esModule",{value:!0})})},{"d3-array":7,"d3-collection":8,"d3-interpolate":12}],7:[function(e,n,r){!function(e,a){"object"==typeof r&&void 0!==n?a(r):"function"==typeof t&&t.amd?t(["exports"],a):a(e.d3=e.d3||{})}(this,function(t){"use strict";function e(t){return function(e,n){return o(t(e),n)}}function n(t,e){return[t,e]}function r(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/a;return o>=k?a*=10:o>=M?a*=5:o>=A&&(a*=2),ee?1:t>=e?0:NaN},i=function(t){return 1===t.length&&(t=e(t)),{left:function(e,n,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;t(e[o],n)<0?r=o+1:a=o}return r},right:function(e,n,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;t(e[o],n)>0?a=o:r=o+1}return r}}},l=i(o),s=l.right,u=l.left,c=function(t,e){null==e&&(e=n);for(var r=0,a=t.length-1,o=t[0],i=new Array(a<0?0:a);rt?1:e>=t?0:NaN},h=function(t){return null===t?NaN:+t},p=function(t,e){var n,r,a=t.length,o=0,i=0,l=-1,s=0;if(null==e)for(;++l1)return i/(s-1)},g=function(t,e){var n=p(t,e);return n?Math.sqrt(n):n},v=function(t,e){var n,r,a,o=-1,i=t.length;if(null==e){for(;++o=r){n=a=r;break}for(;++or&&(n=r),a=r){n=a=r;break}for(;++or&&(n=r),a=f;)d.pop(),--h;var p,g=new Array(h+1);for(a=0;a<=h;++a)p=g[a]=[],p.x0=a>0?d[a-1]:c,p.x1=a=1)return+n(t[r-1],r-1,t);var r,a=(r-1)*e,o=Math.floor(a),i=+n(t[o],o,t);return i+(+n(t[o+1],o+1,t)-i)*(a-o)}},S=function(t,e,n){return t=x.call(t,h).sort(o),Math.ceil((n-e)/(2*(z(t,.75)-z(t,.25))*Math.pow(t.length,-1/3)))},O=function(t,e,n){return Math.ceil((n-e)/(3.5*g(t)*Math.pow(t.length,-1/3)))},N=function(t,e){var n,r,a=-1,o=t.length;if(null==e){for(;++a=r){n=r;break}for(;++an&&(n=r)}else{for(;++a=r){n=r;break}for(;++an&&(n=r)}return n},D=function(t,e){var n,r=0,a=t.length,o=-1,i=a;if(null==e)for(;++o=0;)for(r=t[a],e=r.length;--e>=0;)n[--i]=r[e];return n},R=function(t,e){var n,r,a=-1,o=t.length;if(null==e){for(;++a=r){n=r;break}for(;++ar&&(n=r)}else{for(;++a=r){n=r;break}for(;++ar&&(n=r)}return n},I=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},j=function(t,e){if(n=t.length){var n,r,a=0,i=0,l=t[i];for(e||(e=o);++a=c.length)return null!=s?s(e):null!=l?e.sort(l):e;for(var i,u,f,d=-1,h=e.length,p=c[r++],g=n(),v=a();++dc.length)return t;var r,a=f[n-1];return null!=s&&n>=c.length?r=t.entries():(r=[],t.each(function(t,a){r.push({key:a,values:e(t,n)})})),null!=a?r.sort(function(t,e){return a(t.key,e.key)}):r}var l,s,u,c=[],f=[];return u={object:function(e){return t(e,0,r,a)},map:function(e){return t(e,0,o,i)},entries:function(n){return e(t(n,0,o,i),0)},key:function(t){return c.push(t),u},sortKeys:function(t){return f[c.length-1]=t,u},sortValues:function(t){return l=t,u},rollup:function(t){return s=t,u}}},c=n.prototype;l.prototype=s.prototype={constructor:l,has:c.has,add:function(t){return t+="",this["$"+t]=t,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};var f=function(t){var e=[];for(var n in t)e.push(n);return e},d=function(t){var e=[];for(var n in t)e.push(t[n]);return e},h=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e};t.nest=u,t.set=s,t.map=n,t.keys=f,t.values=d,t.entries=h,Object.defineProperty(t,"__esModule",{value:!0})})},{}],9:[function(e,n,r){!function(e,a){"object"==typeof r&&void 0!==n?a(r):"function"==typeof t&&t.amd?t(["exports"],a):a(e.d3=e.d3||{})}(this,function(t){"use strict";function e(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function n(){}function r(t){var e;return t=(t+"").trim().toLowerCase(),(e=O.exec(t))?(e=parseInt(e[1],16),new s(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=N.exec(t))?a(parseInt(e[1],16)):(e=D.exec(t))?new s(e[1],e[2],e[3],1):(e=P.exec(t))?new s(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=E.exec(t))?o(e[1],e[2],e[3],e[4]):(e=R.exec(t))?o(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=I.exec(t))?u(e[1],e[2]/100,e[3]/100,1):(e=j.exec(t))?u(e[1],e[2]/100,e[3]/100,e[4]):F.hasOwnProperty(t)?a(F[t]):"transparent"===t?new s(NaN,NaN,NaN,0):null}function a(t){return new s(t>>16&255,t>>8&255,255&t,1)}function o(t,e,n,r){return r<=0&&(t=e=n=NaN),new s(t,e,n,r)}function i(t){return t instanceof n||(t=r(t)),t?(t=t.rgb(),new s(t.r,t.g,t.b,t.opacity)):new s}function l(t,e,n,r){return 1===arguments.length?i(t):new s(t,e,n,null==r?1:r)}function s(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function u(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new d(t,e,n,r)}function c(t){if(t instanceof d)return new d(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=r(t)),!t)return new d;if(t instanceof d)return t;t=t.rgb();var e=t.r/255,a=t.g/255,o=t.b/255,i=Math.min(e,a,o),l=Math.max(e,a,o),s=NaN,u=l-i,c=(l+i)/2;return u?(s=e===l?(a-o)/u+6*(a0&&c<1?0:s,new d(s,u,c,t.opacity)}function f(t,e,n,r){return 1===arguments.length?c(t):new d(t,e,n,null==r?1:r)}function d(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function h(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function p(t){if(t instanceof v)return new v(t.l,t.a,t.b,t.opacity);if(t instanceof k){var e=t.h*q;return new v(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof s||(t=i(t));var n=b(t.r),r=b(t.g),a=b(t.b),o=m((.4124564*n+.3575761*r+.1804375*a)/H),l=m((.2126729*n+.7151522*r+.072175*a)/V);return new v(116*l-16,500*(o-l),200*(l-m((.0193339*n+.119192*r+.9503041*a)/X)),t.opacity)}function g(t,e,n,r){return 1===arguments.length?p(t):new v(t,e,n,null==r?1:r)}function v(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function m(t){return t>Z?Math.pow(t,1/3):t/G+U}function y(t){return t>Y?t*t*t:G*(t-U)}function x(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function b(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function _(t){if(t instanceof k)return new k(t.h,t.c,t.l,t.opacity);t instanceof v||(t=p(t));var e=Math.atan2(t.b,t.a)*B;return new k(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function w(t,e,n,r){return 1===arguments.length?_(t):new k(t,e,n,null==r?1:r)}function k(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function M(t){if(t instanceof T)return new T(t.h,t.s,t.l,t.opacity);t instanceof s||(t=i(t));var e=t.r/255,n=t.g/255,r=t.b/255,a=(nt*r+tt*e-et*n)/(nt+tt-et),o=r-a,l=(K*(n-a)-Q*o)/J,u=Math.sqrt(l*l+o*o)/(K*a*(1-a)),c=u?Math.atan2(l,o)*B-120:NaN;return new T(c<0?c+360:c,u,a,t.opacity)}function A(t,e,n,r){return 1===arguments.length?M(t):new T(t,e,n,null==r?1:r)}function T(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}var L=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t},C="\\s*([+-]?\\d+)\\s*",z="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",S="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",O=/^#([0-9a-f]{3})$/,N=/^#([0-9a-f]{6})$/,D=new RegExp("^rgb\\("+[C,C,C]+"\\)$"),P=new RegExp("^rgb\\("+[S,S,S]+"\\)$"),E=new RegExp("^rgba\\("+[C,C,C,z]+"\\)$"),R=new RegExp("^rgba\\("+[S,S,S,z]+"\\)$"),I=new RegExp("^hsl\\("+[z,S,S]+"\\)$"),j=new RegExp("^hsla\\("+[z,S,S,z]+"\\)$"),F={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};L(n,r,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),L(s,l,e(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new s(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new s(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),L(d,f,e(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new d(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new d(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,a=2*n-r;return new s(h(t>=240?t-240:t+120,a,r),h(t,a,r),h(t<120?t+240:t-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var q=Math.PI/180,B=180/Math.PI,H=.95047,V=1,X=1.08883,U=4/29,Y=6/29,G=3*Y*Y,Z=Y*Y*Y;L(v,g,e(n,{brighter:function(t){return new v(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new v(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=V*y(t),e=H*y(e),n=X*y(n),new s(x(3.2404542*e-1.5371385*t-.4985314*n),x(-.969266*e+1.8760108*t+.041556*n),x(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),L(k,w,e(n,{brighter:function(t){ +return new k(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new k(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return p(this).rgb()}}));var W=-.14861,$=1.78277,Q=-.29227,J=-.90649,K=1.97294,tt=K*J,et=K*$,nt=$*Q-J*W;L(T,A,e(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new T(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new T(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*q,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),a=Math.sin(t);return new s(255*(e+n*(W*r+$*a)),255*(e+n*(Q*r+J*a)),255*(e+n*(K*r)),this.opacity)}})),t.color=r,t.rgb=l,t.hsl=f,t.lab=g,t.hcl=w,t.cubehelix=A,Object.defineProperty(t,"__esModule",{value:!0})})},{}],10:[function(e,n,r){!function(e,a){"object"==typeof r&&void 0!==n?a(r):"function"==typeof t&&t.amd?t(["exports"],a):a(e.d3=e.d3||{})}(this,function(t){"use strict";function e(){for(var t,e=0,r=arguments.length,a={};e=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function a(t,e){for(var n,r=0,a=t.length;r0)for(var n,r,a=new Array(n),o=0;od+l||rp+l||af.index){var s=d-o.x-o.vx,c=p-o.y-o.vy,m=s*s+c*c;mt.r&&(t.r=t[e].r)}function a(){if(l){var e,n,r=l.length;for(s=new Array(r),e=0;e1?(null==e?p.remove(t):p.set(t,l(e)),s):p.get(t)},find:function(e,n,r){var a,o,i,l,s,u=0,c=t.length;for(null==r?r=1/0:r*=r,u=0;u1?(y.on(t,e),s):y.on(t)}}},x=function(){function t(t){var n,s=o.length,f=e.quadtree(o,u,c).visitAfter(r);for(l=t,n=0;n=g)){(t.data!==i||t.next)&&(0===a&&(a=h(),c+=a*a),0===o&&(o=h(),c+=o*o),c180||n<-180?n-360*Math.round(n/360):n):L(isNaN(t)?e:t)}function i(t){return 1==(t=+t)?l:function(e,n){return n-e?a(e,n,t):L(isNaN(e)?n:e)}}function l(t,e){var n=e-t;return n?r(t,n):L(isNaN(t)?e:t)}function s(t){return function(n){var r,a,o=n.length,i=new Array(o),l=new Array(o),s=new Array(o);for(r=0;r180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(a(n)+"rotate(",null,r)-2,x:D(t,e)})):e&&n.push(a(n)+"rotate("+e+r)}function l(t,e,n,o){t!==e?o.push({i:n.push(a(n)+"skewX(",null,r)-2,x:D(t,e)}):e&&n.push(a(n)+"skewX("+e+r)}function s(t,e,n,r,o,i){if(t!==n||e!==r){var l=o.push(a(o)+"scale(",null,",",null,")");i.push({i:l-4,x:D(t,n)},{i:l-2,x:D(e,r)})}else 1===n&&1===r||o.push(a(o)+"scale("+n+","+r+")")}return function(e,n){var r=[],a=[];return e=t(e),n=t(n),o(e.translateX,e.translateY,n.translateX,n.translateY,r,a),i(e.rotate,n.rotate,r,a),l(e.skewX,n.skewX,r,a),s(e.scaleX,e.scaleY,n.scaleX,n.scaleY,r,a),e=n=null,function(t){for(var e,n=-1,o=a.length;++n=1?(r=1,e-1):Math.floor(r*e),o=t[a],i=t[a+1],l=a>0?t[a-1]:2*o-i,s=ao&&(a=e.slice(o,a),l[i]?l[i]+=a:l[++i]=a),(n=n[0])===(r=r[0])?l[i]?l[i]+=r:l[++i]=r:(l[++i]=null,s.push({i:i,x:D(n,r)})),o=R.lastIndex;return o=(o=(g+m)/2))?g=o:m=o,(c=n>=(i=(v+y)/2))?v=i:y=i,a=h,!(h=h[f=c<<1|u]))return a[f]=p,t;if(l=+t._x.call(null,h.data),s=+t._y.call(null,h.data),e===l&&n===s)return p.next=h,a?a[f]=p:t._root=p,t;do{a=a?a[f]=new Array(4):t._root=new Array(4),(u=e>=(o=(g+m)/2))?g=o:m=o,(c=n>=(i=(v+y)/2))?v=i:y=i}while((f=c<<1|u)==(d=(s>=i)<<1|l>=o));return a[d]=h,a[f]=p,t}function n(t){var n,r,a,o,i=t.length,l=new Array(i),s=new Array(i),u=1/0,c=1/0,f=-1/0,d=-1/0;for(r=0;rf&&(f=a),od&&(d=o));for(ft||t>a||r>e||e>o))return this;var i,l,s=a-n,u=this._root;switch(l=(e<(r+o)/2)<<1|t<(n+a)/2){case 0:do{i=new Array(4),i[l]=u,u=i}while(s*=2,a=n+s,o=r+s,t>a||e>o);break;case 1:do{i=new Array(4),i[l]=u,u=i}while(s*=2,n=a-s,o=r+s,n>t||e>o);break;case 2:do{i=new Array(4),i[l]=u,u=i}while(s*=2,a=n+s,r=o-s,t>a||r>e);break;case 3:do{i=new Array(4),i[l]=u,u=i}while(s*=2,n=a-s,r=o-s,n>t||r>e)}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=a,this._y1=o,this},f=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},d=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},h=function(t,e,n,r,a){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=a},p=function(t,e,n){var r,a,o,i,l,s,u,c=this._x0,f=this._y0,d=this._x1,p=this._y1,g=[],v=this._root;for(v&&g.push(new h(v,c,f,d,p)),null==n?n=1/0:(c=t-n,f=e-n,d=t+n,p=e+n,n*=n);s=g.pop();)if(!(!(v=s.node)||(a=s.x0)>d||(o=s.y0)>p||(i=s.x1)=y)<<1|t>=m)&&(s=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=s)}else{var x=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=x*x+b*b;if(_=(l=(p+v)/2))?p=l:v=l,(c=i>=(s=(g+m)/2))?g=s:m=s,e=h,!(h=h[f=c<<1|u]))return this;if(!h.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,d=f)}for(;h.data!==t;)if(r=h,!(h=h.next))return this;return(a=h.next)&&delete h.next,r?(a?r.next=a:delete r.next,this):e?(a?e[f]=a:delete e[f],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[d]=h:this._root=h),this):(this._root=a,this)},v=function(){return this._root},m=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},y=function(t){var e,n,r,a,o,i,l=[],s=this._root;for(s&&l.push(new h(s,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(s=e.node,r=e.x0,a=e.y0,o=e.x1,i=e.y1)&&s.length){var u=(r+o)/2,c=(a+i)/2;(n=s[3])&&l.push(new h(n,u,c,o,i)),(n=s[2])&&l.push(new h(n,r,c,u,i)),(n=s[1])&&l.push(new h(n,u,a,o,c)),(n=s[0])&&l.push(new h(n,r,a,u,c))}return this},x=function(t){var e,n=[],r=[];for(this._root&&n.push(new h(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var a=e.node;if(a.length){var o,i=e.x0,l=e.y0,s=e.x1,u=e.y1,c=(i+s)/2,f=(l+u)/2;(o=a[0])&&n.push(new h(o,i,l,c,f)),(o=a[1])&&n.push(new h(o,c,l,s,f)),(o=a[2])&&n.push(new h(o,i,f,c,u)),(o=a[3])&&n.push(new h(o,c,f,s,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},b=function(t){return arguments.length?(this._x=t,this):this._x},_=function(t){return arguments.length?(this._y=t,this):this._y},w=i.prototype=l.prototype;w.copy=function(){var t,e,n=new l(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=s(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var a=0;a<4;++a)(e=r.source[a])&&(e.length?t.push({source:e,target:r.target[a]=new Array(4)}):r.target[a]=s(e));return n},w.add=u,w.addAll=n,w.cover=c,w.data=f,w.extent=d,w.find=p,w.remove=g,w.removeAll=r,w.root=v,w.size=m,w.visit=y,w.visitAfter=x,w.x=b,w.y=_,t.quadtree=i,Object.defineProperty(t,"__esModule",{value:!0})})},{}],14:[function(e,n,r){!function(e,a){"object"==typeof r&&void 0!==n?a(r):"function"==typeof t&&t.amd?t(["exports"],a):a(e.d3=e.d3||{})}(this,function(t){"use strict";function e(){return m||(b(n),m=x.now()+y)}function n(){m=0}function r(){this._call=this._time=this._next=null}function a(t,e,n){var a=new r;return a.restart(t,e,n),a}function o(){e(),++d;for(var t,n=c;n;)(t=m-n._time)>=0&&n._call.call(null,t),n=n._next;--d}function i(){m=(v=x.now())+y,d=h=0;try{o()}finally{d=0,s(),m=0}}function l(){var t=x.now(),e=t-v;e>g&&(y-=e,v=t)}function s(){for(var t,e,n=c,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:c=e);f=t,u(r)}function u(t){if(!d){h&&(h=clearTimeout(h));var e=t-m;e>24?(t<1/0&&(h=setTimeout(i,e)),p&&(p=clearInterval(p))):(p||(v=m,p=setInterval(l,g)),d=1,b(i))}}var c,f,d=0,h=0,p=0,g=1e3,v=0,m=0,y=0,x="object"==typeof performance&&performance.now?performance:Date,b="function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){setTimeout(t,17)};r.prototype=a.prototype={constructor:r,restart:function(t,n,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?e():+r)+(null==n?0:+n),this._next||f===this||(f?f._next=this:c=this,f=this),this._call=t,this._time=r,u()},stop:function(){this._call&&(this._call=null,this._time=1/0,u())}};var _=function(t,e,n){var a=new r;return e=null==e?0:+e,a.restart(function(n){a.stop(),t(n+e)},e,n),a},w=function(t,n,a){var o=new r,i=n;return null==n?(o.restart(t,n,a),o):(n=+n,a=null==a?e():+a,o.restart(function e(r){r+=i,o.restart(e,i+=n,a),t(r)},n,a),o)};t.now=e,t.timer=a,t.timerFlush=o,t.timeout=_,t.interval=w,Object.defineProperty(t,"__esModule",{value:!0})})},{}],15:[function(e,n,r){!function(){function e(t){return t&&(t.ownerDocument||t.document||t).documentElement}function r(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function a(t,e){return te?1:t>=e?0:NaN}function o(t){return null===t?NaN:+t}function i(t){return!isNaN(t)}function l(t){return{left:function(e,n,r,a){for(arguments.length<3&&(r=0),arguments.length<4&&(a=e.length);r>>1;t(e[o],n)<0?r=o+1:a=o}return r},right:function(e,n,r,a){for(arguments.length<3&&(r=0),arguments.length<4&&(a=e.length);r>>1;t(e[o],n)>0?a=o:r=o+1}return r}}}function s(t){return t.length}function u(t){for(var e=1;t*e%1;)e*=10;return e}function c(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function f(){this._=Object.create(null)}function d(t){return(t+="")===_i||t[0]===wi?wi+t:t}function h(t){return(t+="")[0]===wi?t.slice(1):t}function p(t){return d(t)in this._}function g(t){return(t=d(t))in this._&&delete this._[t]}function v(){var t=[];for(var e in this._)t.push(h(e));return t}function m(){var t=0;for(var e in this._)++t;return t}function y(){for(var t in this._)return!1;return!0}function x(){this._=Object.create(null)}function b(t){return t}function _(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function w(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=ki.length;n=e&&(e=a+1);!(i=l[e])&&++e0&&(t=t.slice(0,l));var u=Di.get(t);return u&&(t=u,s=$),l?e?a:r:e?k:o}function W(t,e){return function(n){var r=ci.event;ci.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{ci.event=r}}}function $(t,e){var n=W(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}function Q(t){var n=".dragsuppress-"+ ++Ei,a="click"+n,o=ci.select(r(t)).on("touchmove"+n,T).on("dragstart"+n,T).on("selectstart"+n,T);if(null==Pi&&(Pi=!("onselectstart"in t)&&w(t.style,"userSelect")),Pi){var i=e(t).style,l=i[Pi];i[Pi]="none"}return function(t){if(o.on(n,null),Pi&&(i[Pi]=l),t){var e=function(){o.on(a,null)};o.on(a,function(){T(),e()},!0),setTimeout(e,0)}}}function J(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var a=n.createSVGPoint();if(Ri<0){var o=r(t);if(o.scrollX||o.scrollY){n=ci.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=n[0][0].getScreenCTM();Ri=!(i.f||i.e),n.remove()}}return Ri?(a.x=e.pageX,a.y=e.pageY):(a.x=e.clientX,a.y=e.clientY),a=a.matrixTransform(t.getScreenCTM().inverse()),[a.x,a.y]}var l=t.getBoundingClientRect();return[e.clientX-l.left-t.clientLeft,e.clientY-l.top-t.clientTop]}function K(){return ci.event.changedTouches[0].identifier}function tt(t){return t>0?1:t<0?-1:0}function et(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function nt(t){return t>1?0:t<-1?Fi:Math.acos(t)}function rt(t){return t>1?Hi:t<-1?-Hi:Math.asin(t)}function at(t){return((t=Math.exp(t))-1/t)/2}function ot(t){return((t=Math.exp(t))+1/t)/2}function it(t){return((t=Math.exp(2*t))-1)/(t+1)}function lt(t){return(t=Math.sin(t/2))*t}function st(){}function ut(t,e,n){return this instanceof ut?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof ut?new ut(t.h,t.s,t.l):kt(""+t,Mt,ut):new ut(t,e,n)}function ct(t,e,n){function r(t){return t>360?t-=360:t<0&&(t+=360),t<60?o+(i-o)*t/60:t<180?i:t<240?o+(i-o)*(240-t)/60:o}function a(t){return Math.round(255*r(t))}var o,i;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,n=n<0?0:n>1?1:n,i=n<=.5?n*(1+e):n+e-n*e,o=2*n-i,new xt(a(t+120),a(t),a(t-120))}function ft(t,e,n){return this instanceof ft?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof ft?new ft(t.h,t.c,t.l):t instanceof ht?gt(t.l,t.a,t.b):gt((t=At((t=ci.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ft(t,e,n)}function dt(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new ht(n,Math.cos(t*=Vi)*e,Math.sin(t)*e)}function ht(t,e,n){return this instanceof ht?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof ht?new ht(t.l,t.a,t.b):t instanceof ft?dt(t.h,t.c,t.l):At((t=xt(t)).r,t.g,t.b):new ht(t,e,n)}function pt(t,e,n){var r=(t+16)/116,a=r+e/500,o=r-n/200;return a=vt(a)*Ji,r=vt(r)*Ki,o=vt(o)*tl,new xt(yt(3.2404542*a-1.5371385*r-.4985314*o),yt(-.969266*a+1.8760108*r+.041556*o),yt(.0556434*a-.2040259*r+1.0572252*o))}function gt(t,e,n){ +return t>0?new ft(Math.atan2(n,e)*Xi,Math.sqrt(e*e+n*n),t):new ft(NaN,NaN,t)}function vt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function mt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function yt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function xt(t,e,n){return this instanceof xt?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof xt?new xt(t.r,t.g,t.b):kt(""+t,xt,ct):new xt(t,e,n)}function bt(t){return new xt(t>>16,t>>8&255,255&t)}function _t(t){return bt(t)+""}function wt(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function kt(t,e,n){var r,a,o,i=0,l=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(a=r[2].split(","),r[1]){case"hsl":return n(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return e(Lt(a[0]),Lt(a[1]),Lt(a[2]))}return(o=rl.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(i=(3840&o)>>4,i|=i>>4,l=240&o,l|=l>>4,s=15&o,s|=s<<4):7===t.length&&(i=(16711680&o)>>16,l=(65280&o)>>8,s=255&o)),e(i,l,s))}function Mt(t,e,n){var r,a,o=Math.min(t/=255,e/=255,n/=255),i=Math.max(t,e,n),l=i-o,s=(i+o)/2;return l?(a=s<.5?l/(i+o):l/(2-i-o),r=t==i?(e-n)/l+(e0&&s<1?0:r),new ut(r,a,s)}function At(t,e,n){t=Tt(t),e=Tt(e),n=Tt(n);var r=mt((.4124564*t+.3575761*e+.1804375*n)/Ji),a=mt((.2126729*t+.7151522*e+.072175*n)/Ki);return ht(116*a-16,500*(r-a),200*(a-mt((.0193339*t+.119192*e+.9503041*n)/tl)))}function Tt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Lt(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Ct(t){return"function"==typeof t?t:function(){return t}}function zt(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),St(e,n,t,r)}}function St(t,e,n,r){function a(){var t,e=s.status;if(!e&&Nt(s)||e>=200&&e<300||304===e){try{t=n.call(o,s)}catch(t){return void i.error.call(o,t)}i.load.call(o,t)}else i.error.call(o,s)}var o={},i=ci.dispatch("beforesend","progress","load","error"),l={},s=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=a:s.onreadystatechange=function(){s.readyState>3&&a()},s.onprogress=function(t){var e=ci.event;ci.event=t;try{i.progress.call(o,s)}finally{ci.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return n=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(di(arguments)))}}),o.send=function(n,r,a){if(2===arguments.length&&"function"==typeof r&&(a=r,r=null),s.open(n,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),s.setRequestHeader)for(var c in l)s.setRequestHeader(c,l[c]);return null!=e&&s.overrideMimeType&&s.overrideMimeType(e),null!=u&&(s.responseType=u),null!=a&&o.on("error",a).on("load",function(t){a(null,t)}),i.beforesend.call(o,s),s.send(null==r?null:r),o},o.abort=function(){return s.abort(),o},ci.rebind(o,i,"on"),null==r?o:o.get(Ot(r))}function Ot(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function Nt(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Dt(t,e,n){var r=arguments.length;r<2&&(e=0),r<3&&(n=Date.now());var a=n+e,o={c:t,t:a,n:null};return ol?ol.n=o:al=o,ol=o,il||(ll=clearTimeout(ll),il=1,sl(Pt)),o}function Pt(){var t=Et(),e=Rt()-t;e>24?(isFinite(e)&&(clearTimeout(ll),ll=setTimeout(Pt,e)),il=0):(il=1,sl(Pt))}function Et(){for(var t=Date.now(),e=al;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Rt(){for(var t,e=al,n=1/0;e;)e.c?(e.t8?function(t){return t/n}:function(t){return t*n},symbol:t}}function Ft(t){var e=t.decimal,n=t.thousands,r=t.grouping,a=t.currency,o=r&&n?function(t,e){for(var a=t.length,o=[],i=0,l=r[0],s=0;a>0&&l>0&&(s+l+1>e&&(l=Math.max(1,e-s)),o.push(t.substring(a-=l,a+l)),!((s+=l+1)>e));)l=r[i=(i+1)%r.length];return o.reverse().join(n)}:b;return function(t){var n=cl.exec(t),r=n[1]||" ",i=n[2]||">",l=n[3]||"-",s=n[4]||"",u=n[5],c=+n[6],f=n[7],d=n[8],h=n[9],p=1,g="",v="",m=!1,y=!0;switch(d&&(d=+d.substring(1)),(u||"0"===r&&"="===i)&&(u=r="0",i="="),h){case"n":f=!0,h="g";break;case"%":p=100,v="%",h="f";break;case"p":p=100,v="%",h="r";break;case"b":case"o":case"x":case"X":"#"===s&&(g="0"+h.toLowerCase());case"c":y=!1;case"d":m=!0,d=0;break;case"s":p=-1,h="r"}"$"===s&&(g=a[0],v=a[1]),"r"!=h||d||(h="g"),null!=d&&("g"==h?d=Math.max(1,Math.min(21,d)):"e"!=h&&"f"!=h||(d=Math.max(0,Math.min(20,d)))),h=fl.get(h)||qt;var x=u&&f;return function(t){var n=v;if(m&&t%1)return"";var a=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===l?"":l;if(p<0){var s=ci.formatPrefix(t,d);t=s.scale(t),n=s.symbol+v}else t*=p;t=h(t,d);var b,_,w=t.lastIndexOf(".");if(w<0){var k=y?t.lastIndexOf("e"):-1;k<0?(b=t,_=""):(b=t.substring(0,k),_=t.substring(k))}else b=t.substring(0,w),_=e+t.substring(w+1);!u&&f&&(b=o(b,1/0));var M=g.length+b.length+_.length+(x?0:a.length),A=M"===i?A+a+t:"^"===i?A.substring(0,M>>=1)+a+t+A.substring(M):a+(x?t:A+t))+n}}}function qt(t){return t+""}function Bt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(t,e,n){function r(e){var n=t(e),r=o(n,1);return e-n1)for(;i=u)return-1;if(37===(a=e.charCodeAt(l++))){if(i=e.charAt(l++),!(o=z[i in gl?e.charAt(l++):i])||(r=o(t,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}function r(t,e,n){w.lastIndex=0;var r=w.exec(e.slice(n));return r?(t.w=k.get(r[0].toLowerCase()),n+r[0].length):-1}function a(t,e,n){b.lastIndex=0;var r=b.exec(e.slice(n));return r?(t.w=_.get(r[0].toLowerCase()),n+r[0].length):-1}function o(t,e,n){T.lastIndex=0;var r=T.exec(e.slice(n));return r?(t.m=L.get(r[0].toLowerCase()),n+r[0].length):-1}function i(t,e,n){M.lastIndex=0;var r=M.exec(e.slice(n));return r?(t.m=A.get(r[0].toLowerCase()),n+r[0].length):-1}function l(t,e,r){return n(t,C.c.toString(),e,r)}function s(t,e,r){return n(t,C.x.toString(),e,r)}function u(t,e,r){return n(t,C.X.toString(),e,r)}function c(t,e,n){var r=x.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)}var f=t.dateTime,d=t.date,h=t.time,p=t.periods,g=t.days,v=t.shortDays,m=t.months,y=t.shortMonths;e.utc=function(t){function n(t){try{hl=Bt;var e=new hl;return e._=t,r(e)}finally{hl=Date}}var r=e(t);return n.parse=function(t){try{hl=Bt;var e=r.parse(t);return e&&e._}finally{hl=Date}},n.toString=r.toString,n},e.multi=e.utc.multi=ce;var x=ci.map(),b=Yt(g),_=Gt(g),w=Yt(v),k=Gt(v),M=Yt(m),A=Gt(m),T=Yt(y),L=Gt(y);p.forEach(function(t,e){x.set(t.toLowerCase(),e)});var C={a:function(t){return v[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return m[t.getMonth()]},c:e(f),d:function(t,e){return Ut(t.getDate(),e,2)},e:function(t,e){return Ut(t.getDate(),e,2)},H:function(t,e){return Ut(t.getHours(),e,2)},I:function(t,e){return Ut(t.getHours()%12||12,e,2)},j:function(t,e){return Ut(1+dl.dayOfYear(t),e,3)},L:function(t,e){return Ut(t.getMilliseconds(),e,3)},m:function(t,e){return Ut(t.getMonth()+1,e,2)},M:function(t,e){return Ut(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Ut(t.getSeconds(),e,2)},U:function(t,e){return Ut(dl.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ut(dl.mondayOfYear(t),e,2)},x:e(d),X:e(h),y:function(t,e){return Ut(t.getFullYear()%100,e,2)},Y:function(t,e){return Ut(t.getFullYear()%1e4,e,4)},Z:se,"%":function(){return"%"}},z={a:r,A:a,b:o,B:i,c:l,d:ne,e:ne,H:ae,I:ae,j:re,L:le,m:ee,M:oe,p:c,S:ie,U:Wt,w:Zt,W:$t,x:s,X:u,y:Jt,Y:Qt,Z:Kt,"%":ue};return e}function Ut(t,e,n){var r=t<0?"-":"",a=(r?-t:t)+"",o=a.length;return r+(o68?1900:2e3)}function ee(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ne(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function re(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function ae(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function oe(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function ie(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function le(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function se(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=bi(e)/60|0,a=bi(e)%60;return n+Ut(r,"0",2)+Ut(a,"0",2)}function ue(t,e,n){ml.lastIndex=0;var r=ml.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ce(t){for(var e=t.length,n=-1;++n=0?1:-1,l=i*n,s=Math.cos(e),u=Math.sin(e),c=o*u,f=a*s+c*Math.cos(l),d=c*i*Math.sin(l);kl.add(Math.atan2(d,f)),r=t,a=s,o=u}var e,n,r,a,o;Ml.point=function(i,l){Ml.point=t,r=(e=i)*Vi,a=Math.cos(l=(n=l)*Vi/2+Fi/4),o=Math.sin(l)},Ml.lineEnd=function(){t(e,n)}}function me(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function ye(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function xe(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function be(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _e(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function we(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function ke(t){return[Math.atan2(t[1],t[0]),rt(t[2])]}function Me(t,e){return bi(t[0]-e[0])=0;--l)a.point((f=c[l])[0],f[1])}else r(h.x,h.p.x,-1,a);h=h.p}h=h.o,c=h.z,p=!p}while(!h.v);a.lineEnd()}}}function De(t){if(e=t.length){for(var e,n,r=0,a=t[0];++r0){for(_||(o.polygonStart(),_=!0),o.lineStart();++i1&&2&e&&n.push(n.pop().concat(n.shift())),h.push(n.filter(Re))}var h,p,g,v=e(o),m=a.invert(r[0],r[1]),y={point:i,lineStart:s,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=f,y.lineEnd=d,h=[],p=[]},polygonEnd:function(){y.point=i,y.lineStart=s,y.lineEnd=u,h=ci.merge(h);var t=He(m,p);h.length?(_||(o.polygonStart(),_=!0),Ne(h,je,t,n,o)):t&&(_||(o.polygonStart(),_=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),_&&(o.polygonEnd(),_=!1),h=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},x=Ie(),b=e(x),_=!1;return y}}function Re(t){return t.length>1}function Ie(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:k,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function je(t,e){return((t=t.x)[0]<0?t[1]-Hi-Ii:Hi-t[1])-((e=e.x)[0]<0?e[1]-Hi-Ii:Hi-e[1])}function Fe(t){var e,n=NaN,r=NaN,a=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,i){var l=o>0?Fi:-Fi,s=bi(o-n);bi(s-Fi)0?Hi:-Hi),t.point(a,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(o,r),e=0):a!==l&&s>=Fi&&(bi(n-a)Ii?Math.atan((Math.sin(e)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(a=Math.cos(e))*Math.sin(t))/(a*o*i)):(e+r)/2}function Be(t,e,n,r){var a;if(null==t)a=n*Hi,r.point(-Fi,a),r.point(0,a),r.point(Fi,a),r.point(Fi,0),r.point(Fi,-a),r.point(0,-a),r.point(-Fi,-a),r.point(-Fi,0),r.point(-Fi,a);else if(bi(t[0]-e[0])>Ii){var o=t[0]=0?1:-1,k=w*_,M=k>Fi,A=p*x;if(kl.add(Math.atan2(A*w*Math.sin(k),g*b+A*Math.cos(k))),o+=M?_+w*qi:_,M^d>=n^m>=n){var T=xe(me(f),me(t));we(T);var L=xe(a,T);we(L);var C=(M^_>=0?-1:1)*rt(L[2]);(r>C||r===C&&(T[0]||T[1]))&&(i+=M^_>=0?1:-1)}if(!v++)break;d=m,p=x,g=b,f=t}}return(o<-Ii||oo}function n(t){var n,o,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,d){var h,p=[f,d],g=e(f,d),v=i?g?0:a(f,d):g?a(f+(f<0?Fi:-Fi),d):0;if(!n&&(u=s=g)&&t.lineStart(),g!==s&&(h=r(n,p),(Me(n,h)||Me(p,h))&&(p[0]+=Ii,p[1]+=Ii,g=e(p[0],p[1]))),g!==s)c=0,g?(t.lineStart(),h=r(p,n),t.point(h[0],h[1])):(h=r(n,p),t.point(h[0],h[1]),t.lineEnd()),n=h;else if(l&&n&&i^g){var m;v&o||!(m=r(p,n,!0))||(c=0,i?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||n&&Me(n,p)||t.point(p[0],p[1]),n=p,s=g,o=v},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return c|(u&&s)<<1}}}function r(t,e,n){var r=me(t),a=me(e),i=[1,0,0],l=xe(r,a),s=ye(l,l),u=l[0],c=s-u*u;if(!c)return!n&&t;var f=o*s/c,d=-o*u/c,h=xe(i,l),p=_e(i,f);be(p,_e(l,d));var g=h,v=ye(p,g),m=ye(g,g),y=v*v-m*(ye(p,p)-1);if(!(y<0)){var x=Math.sqrt(y),b=_e(g,(-v-x)/m);if(be(b,p),b=ke(b),!n)return b;var _,w=t[0],k=e[0],M=t[1],A=e[1];k0^b[1]<(bi(b[0]-w)Fi^(w<=b[0]&&b[0]<=k)){var z=_e(g,(-v+x)/m);return be(z,p),[b,ke(z)]}}}function a(e,n){var r=i?t:Fi-t,a=0;return e<-r?a|=1:e>r&&(a|=2),n<-r?a|=4:n>r&&(a|=8),a}var o=Math.cos(t),i=o>0,l=bi(o)>Ii;return Ee(e,n,mn(t,6*Vi),i?[0,-t]:[-Fi,t-Fi])}function Xe(t,e,n,r){return function(a){var o,i=a.a,l=a.b,s=i.x,u=i.y,c=l.x,f=l.y,d=0,h=1,p=c-s,g=f-u;if(o=t-s,p||!(o>0)){if(o/=p,p<0){if(o0){if(o>h)return;o>d&&(d=o)}if(o=n-s,p||!(o<0)){if(o/=p,p<0){if(o>h)return;o>d&&(d=o)}else if(p>0){if(o0)){if(o/=g,g<0){if(o0){if(o>h)return;o>d&&(d=o)}if(o=r-u,g||!(o<0)){if(o/=g,g<0){if(o>h)return;o>d&&(d=o)}else if(g>0){if(o0&&(a.a={x:s+d*p,y:u+d*g}),h<1&&(a.b={x:s+h*p,y:u+h*g}),a}}}}}}function Ue(t,e,n,r){function a(r,a){return bi(r[0]-t)0?0:3:bi(r[0]-n)0?2:1:bi(r[1]-e)0?1:0:a>0?3:2}function o(t,e){return i(t.x,e.x)}function i(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(l){function s(t){for(var e=0,n=v.length,r=t[1],a=0;ar&&et(u,o,t)>0&&++e:o[1]<=r&&et(u,o,t)<0&&--e,u=o;return 0!==e}function u(o,l,s,u){var c=0,f=0;if(null==o||(c=a(o,s))!==(f=a(l,s))||i(o,l)<0^s>0)do{u.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+s+4)%4)!==f);else u.point(l[0],l[1])}function c(a,o){return t<=a&&a<=n&&e<=o&&o<=r}function f(t,e){c(t,e)&&l.point(t,e)}function d(){z.point=p,v&&v.push(m=[]),M=!0,k=!1,_=w=NaN}function h(){g&&(p(y,x),b&&k&&L.rejoin(),g.push(L.buffer())),z.point=f,k&&l.lineEnd()}function p(t,e){t=Math.max(-jl,Math.min(jl,t)),e=Math.max(-jl,Math.min(jl,e));var n=c(t,e);if(v&&m.push([t,e]),M)y=t,x=e,b=n,M=!1,n&&(l.lineStart(),l.point(t,e));else if(n&&k)l.point(t,e);else{var r={a:{x:_,y:w},b:{x:t,y:e}};C(r)?(k||(l.lineStart(),l.point(r.a.x,r.a.y)),l.point(r.b.x,r.b.y),n||l.lineEnd(),A=!1):n&&(l.lineStart(),l.point(t,e),A=!1)}_=t,w=e,k=n}var g,v,m,y,x,b,_,w,k,M,A,T=l,L=Ie(),C=Xe(t,e,n,r),z={point:f,lineStart:d,lineEnd:h,polygonStart:function(){l=L,g=[],v=[],A=!0},polygonEnd:function(){l=T,g=ci.merge(g);var e=s([t,r]),n=A&&e,a=g.length;(n||a)&&(l.polygonStart(),n&&(l.lineStart(),u(null,null,1,l),l.lineEnd()),a&&Ne(g,o,e,u,l),l.polygonEnd()),g=v=m=null}};return z}}function Ye(t){var e=0,n=Fi/3,r=un(t),a=r(e,n);return a.parallels=function(t){return arguments.length?r(e=t[0]*Fi/180,n=t[1]*Fi/180):[e/Fi*180,n/Fi*180]},a}function Ge(t,e){function n(t,e){var n=Math.sqrt(o-2*a*Math.sin(e))/a;return[n*Math.sin(t*=a),i-n*Math.cos(t)]}var r=Math.sin(t),a=(r+Math.sin(e))/2,o=1+r*(2*a-r),i=Math.sqrt(o)/a;return n.invert=function(t,e){var n=i-e;return[Math.atan2(t,n)/a,rt((o-(t*t+n*n)*a*a)/(2*a))]},n}function Ze(){function t(t,e){ql+=a*t-r*e,r=t,a=e}var e,n,r,a;Ul.point=function(o,i){Ul.point=t,e=r=o,n=a=i},Ul.lineEnd=function(){t(e,n)}}function We(t,e){tVl&&(Vl=t),eXl&&(Xl=e)}function $e(){function t(t,e){i.push("M",t,",",e,o)}function e(t,e){i.push("M",t,",",e),l.point=n}function n(t,e){i.push("L",t,",",e)}function r(){l.point=t}function a(){i.push("Z")}var o=Qe(4.5),i=[],l={point:t,lineStart:function(){l.point=e},lineEnd:r,polygonStart:function(){l.lineEnd=a},polygonEnd:function(){l.lineEnd=r,l.point=t},pointRadius:function(t){return o=Qe(t),l},result:function(){if(i.length){var t=i.join("");return i=[],t}}};return l}function Qe(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Je(t,e){Ll+=t,Cl+=e,++zl}function Ke(){function t(t,r){var a=t-e,o=r-n,i=Math.sqrt(a*a+o*o);Sl+=i*(e+t)/2,Ol+=i*(n+r)/2,Nl+=i,Je(e=t,n=r)}var e,n;Gl.point=function(r,a){Gl.point=t,Je(e=r,n=a)}}function tn(){Gl.point=Je}function en(){function t(t,e){var n=t-r,o=e-a,i=Math.sqrt(n*n+o*o);Sl+=i*(r+t)/2,Ol+=i*(a+e)/2,Nl+=i,i=a*t-r*e,Dl+=i*(r+t),Pl+=i*(a+e),El+=3*i,Je(r=t,a=e)}var e,n,r,a;Gl.point=function(o,i){Gl.point=t,Je(e=r=o,n=a=i)},Gl.lineEnd=function(){t(e,n)}}function nn(t){function e(e,n){t.moveTo(e+i,n),t.arc(e,n,i,0,qi)}function n(e,n){t.moveTo(e,n),l.point=r}function r(e,n){t.lineTo(e,n)}function a(){l.point=e}function o(){t.closePath()}var i=4.5,l={point:e,lineStart:function(){l.point=n},lineEnd:a,polygonStart:function(){l.lineEnd=o},polygonEnd:function(){l.lineEnd=a,l.point=e},pointRadius:function(t){return i=t,l},result:k};return l}function rn(t){function e(t){return(l?r:n)(t)}function n(e){return ln(e,function(n,r){n=t(n,r),e.point(n[0],n[1])})}function r(e){function n(n,r){n=t(n,r),e.point(n[0],n[1])}function r(){x=NaN,M.point=o,e.lineStart()}function o(n,r){var o=me([n,r]),i=t(n,r);a(x,b,y,_,w,k,x=i[0],b=i[1],y=n,_=o[0],w=o[1],k=o[2],l,e),e.point(x,b)}function i(){M.point=n,e.lineEnd()}function s(){r(),M.point=u,M.lineEnd=c}function u(t,e){o(f=t,d=e),h=x,p=b,g=_,v=w,m=k,M.point=o}function c(){a(x,b,y,_,w,k,h,p,f,g,v,m,l,e),M.lineEnd=i,i()}var f,d,h,p,g,v,m,y,x,b,_,w,k,M={point:n,lineStart:r,lineEnd:i,polygonStart:function(){e.polygonStart(),M.lineStart=s},polygonEnd:function(){e.polygonEnd(),M.lineStart=r}};return M}function a(e,n,r,l,s,u,c,f,d,h,p,g,v,m){var y=c-e,x=f-n,b=y*y+x*x;if(b>4*o&&v--){var _=l+h,w=s+p,k=u+g,M=Math.sqrt(_*_+w*w+k*k),A=Math.asin(k/=M),T=bi(bi(k)-1)o||bi((y*S+x*O)/b-.5)>.3||l*h+s*p+u*g0&&16,e):Math.sqrt(o)},e}function an(t){var e=rn(function(e,n){return t([e*Xi,n*Xi])});return function(t){return cn(e(t))}}function on(t){this.stream=t}function ln(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function sn(t){return un(function(){return t})()}function un(t){function e(t){return t=l(t[0]*Vi,t[1]*Vi),[t[0]*d+s,u-t[1]*d]}function n(t){return(t=l.invert((t[0]-s)/d,(u-t[1])/d))&&[t[0]*Xi,t[1]*Xi]}function r(){l=Se(i=hn(m,y,x),o);var t=o(g,v);return s=h-t[0]*d,u=p+t[1]*d,a()}function a(){return c&&(c.valid=!1,c=null),e}var o,i,l,s,u,c,f=rn(function(t,e){return t=o(t,e),[t[0]*d+s,u-t[1]*d]}),d=150,h=480,p=250,g=0,v=0,m=0,y=0,x=0,_=Il,w=b,k=null,M=null;return e.stream=function(t){return c&&(c.valid=!1),c=cn(_(i,f(w(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(_=null==t?(k=t,Il):Ve((k=+t)*Vi),a()):k},e.clipExtent=function(t){return arguments.length?(M=t,w=t?Ue(t[0][0],t[0][1],t[1][0],t[1][1]):b,a()):M},e.scale=function(t){return arguments.length?(d=+t,r()):d},e.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],r()):[h,p]},e.center=function(t){return arguments.length?(g=t[0]%360*Vi,v=t[1]%360*Vi,r()):[g*Xi,v*Xi]},e.rotate=function(t){return arguments.length?(m=t[0]%360*Vi,y=t[1]%360*Vi,x=t.length>2?t[2]%360*Vi:0,r()):[m*Xi,y*Xi,x*Xi]},ci.rebind(e,f,"precision"),function(){return o=t.apply(this,arguments),e.invert=o.invert&&n,r()}}function cn(t){return ln(t,function(e,n){t.point(e*Vi,n*Vi)})}function fn(t,e){return[t,e]}function dn(t,e){return[t>Fi?t-qi:t<-Fi?t+qi:t,e]}function hn(t,e,n){return t?e||n?Se(gn(t),vn(e,n)):gn(t):e||n?vn(e,n):dn}function pn(t){return function(e,n){return e+=t,[e>Fi?e-qi:e<-Fi?e+qi:e,n]}}function gn(t){var e=pn(t);return e.invert=pn(-t),e}function vn(t,e){function n(t,e){var n=Math.cos(e),l=Math.cos(t)*n,s=Math.sin(t)*n,u=Math.sin(e),c=u*r+l*a;return[Math.atan2(s*o-c*i,l*r-u*a),rt(c*o+s*i)]}var r=Math.cos(t),a=Math.sin(t),o=Math.cos(e),i=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),l=Math.cos(t)*n,s=Math.sin(t)*n,u=Math.sin(e),c=u*o-s*i;return[Math.atan2(s*o+u*i,l*r+c*a),rt(c*r-l*a)]},n}function mn(t,e){var n=Math.cos(t),r=Math.sin(t);return function(a,o,i,l){var s=i*e;null!=a?(a=yn(n,a),o=yn(n,o),(i>0?ao)&&(a+=i*qi)):(a=t+i*qi,o=t-.5*s);for(var u,c=a;i>0?c>o:c0?e<-Hi+Ii&&(e=-Hi+Ii):e>Hi-Ii&&(e=Hi-Ii);var n=i/Math.pow(a(e),o);return[n*Math.sin(o*t),i-n*Math.cos(o*t)]}var r=Math.cos(t),a=function(t){return Math.tan(Fi/4+t/2)},o=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(a(e)/a(t)),i=r*Math.pow(a(t),o)/o;return o?(n.invert=function(t,e){var n=i-e,r=tt(o)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/o,2*Math.atan(Math.pow(i/r,1/o))-Hi]},n):Cn}function Ln(t,e){function n(t,e){var n=o-e;return[n*Math.sin(a*t),o-n*Math.cos(a*t)]}var r=Math.cos(t),a=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),o=r/a+t;return bi(a)1&&et(t[n[r-2]],t[n[r-1]],t[a])<=0;)--r;n[r++]=a}return n.slice(0,r)}function Pn(t,e){return t[0]-e[0]||t[1]-e[1]}function En(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Rn(t,e,n,r){var a=t[0],o=n[0],i=e[0]-a,l=r[0]-o,s=t[1],u=n[1],c=e[1]-s,f=r[1]-u,d=(l*(s-u)-f*(a-o))/(f*i-l*c);return[a+d*i,s+d*c]}function In(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function jn(){or(this),this.edge=this.site=this.circle=null}function Fn(t){var e=ls.pop()||new jn;return e.site=t,e}function qn(t){$n(t),as.remove(t),ls.push(t),or(t)}function Bn(t){var e=t.circle,n=e.x,r=e.cy,a={x:n,y:r},o=t.P,i=t.N,l=[t];qn(t);for(var s=o;s.circle&&bi(n-s.circle.x)Ii)l=l.L;else{if(!((a=o-Xn(l,i))>Ii)){r>-Ii?(e=l.P,n=l):a>-Ii?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}var s=Fn(t);if(as.insert(e,s),e||n){if(e===n)return $n(e),n=Fn(e.site),as.insert(s,n),s.edge=n.edge=tr(e.site,s.site),Wn(e),void Wn(n);if(!n)return void(s.edge=tr(e.site,s.site));$n(e),$n(n);var u=e.site,c=u.x,f=u.y,d=t.x-c,h=t.y-f,p=n.site,g=p.x-c,v=p.y-f,m=2*(d*v-h*g),y=d*d+h*h,x=g*g+v*v,b={x:(v*y-h*x)/m+c,y:(d*x-g*y)/m+f};nr(n.edge,u,p,b),s.edge=tr(u,t,null,b),n.edge=tr(t,p,null,b),Wn(e),Wn(n)}}function Vn(t,e){var n=t.site,r=n.x,a=n.y,o=a-e;if(!o)return r;var i=t.P;if(!i)return-1/0;n=i.site;var l=n.x,s=n.y,u=s-e;if(!u)return l;var c=l-r,f=1/o-1/u,d=c/u;return f?(-d+Math.sqrt(d*d-2*f*(c*c/(-2*u)-s+u/2+a-o/2)))/f+r:(r+l)/2}function Xn(t,e){var n=t.N;if(n)return Vn(n,e);var r=t.site;return r.y===e?r.x:1/0}function Un(t){this.site=t,this.edges=[]}function Yn(t){ +for(var e,n,r,a,o,i,l,s,u,c,f=t[0][0],d=t[1][0],h=t[0][1],p=t[1][1],g=rs,v=g.length;v--;)if((o=g[v])&&o.prepare())for(l=o.edges,s=l.length,i=0;iIi||bi(a-n)>Ii)&&(l.splice(i,0,new rr(er(o.site,c,bi(r-f)Ii?{x:f,y:bi(e-f)Ii?{x:bi(n-p)Ii?{x:d,y:bi(e-d)Ii?{x:bi(n-h)=-ji)){var h=s*s+u*u,p=c*c+f*f,g=(f*h-u*p)/d,v=(s*p-c*h)/d,f=v+l,m=ss.pop()||new Zn;m.arc=t,m.site=a,m.x=g+i,m.y=f+Math.sqrt(g*g+v*v),m.cy=f,t.circle=m;for(var y=null,x=is._;x;)if(m.y=l)return;if(d>p){if(o){if(o.y>=u)return}else o={x:v,y:s};n={x:v,y:u}}else{if(o){if(o.y1)if(d>p){if(o){if(o.y>=u)return}else o={x:(s-a)/r,y:s};n={x:(u-a)/r,y:u}}else{if(o){if(o.y=l)return}else o={x:i,y:r*i+a};n={x:l,y:r*l+a}}else{if(o){if(o.xo||f>i||d=b,k=n>=_,M=k<<1|w,A=M+4;Mo&&(a=e.slice(o,a),l[i]?l[i]+=a:l[++i]=a),(n=n[0])===(r=r[0])?l[i]?l[i]+=r:l[++i]=r:(l[++i]=null,s.push({i:i,x:xr(n,r)})),o=fs.lastIndex;return o=0&&!(n=ci.interpolators[r](t,e)););return n}function wr(t,e){var n,r=[],a=[],o=t.length,i=e.length,l=Math.min(t.length,e.length);for(n=0;n=1?1:t(e)}}function Mr(t){return function(e){return 1-t(1-e)}}function Ar(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Tr(t){return t*t}function Lr(t){return t*t*t}function Cr(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}function zr(t){return function(e){return Math.pow(e,t)}}function Sr(t){return 1-Math.cos(t*Hi)}function Or(t){return Math.pow(2,10*(t-1))}function Nr(t){return 1-Math.sqrt(1-t*t)}function Dr(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/qi*Math.asin(1/t):(t=1,n=e/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*qi/e)}}function Pr(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Er(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Rr(t,e){t=ci.hcl(t),e=ci.hcl(e);var n=t.h,r=t.c,a=t.l,o=e.h-n,i=e.c-r,l=e.l-a;return isNaN(i)&&(i=0,r=isNaN(r)?e.c:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:o<-180&&(o+=360),function(t){return dt(n+o*t,r+i*t,a+l*t)+""}}function Ir(t,e){t=ci.hsl(t),e=ci.hsl(e);var n=t.h,r=t.s,a=t.l,o=e.h-n,i=e.s-r,l=e.l-a;return isNaN(i)&&(i=0,r=isNaN(r)?e.s:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:o<-180&&(o+=360),function(t){return ct(n+o*t,r+i*t,a+l*t)+""}}function jr(t,e){t=ci.lab(t),e=ci.lab(e);var n=t.l,r=t.a,a=t.b,o=e.l-n,i=e.a-r,l=e.b-a;return function(t){return pt(n+o*t,r+i*t,a+l*t)+""}}function Fr(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function qr(t){var e=[t.a,t.b],n=[t.c,t.d],r=Hr(e),a=Br(e,n),o=Hr(Vr(n,e,-a))||0;e[0]*n[1]180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(Xr(n)+"rotate(",null,")")-2,x:xr(t,e)})):e&&n.push(Xr(n)+"rotate("+e+")")}function Gr(t,e,n,r){t!==e?r.push({i:n.push(Xr(n)+"skewX(",null,")")-2,x:xr(t,e)}):e&&n.push(Xr(n)+"skewX("+e+")")}function Zr(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var a=n.push(Xr(n)+"scale(",null,",",null,")");r.push({i:a-4,x:xr(t[0],e[0])},{i:a-2,x:xr(t[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(Xr(n)+"scale("+e+")")}function Wr(t,e){var n=[],r=[];return t=ci.transform(t),e=ci.transform(e),Ur(t.translate,e.translate,n,r),Yr(t.rotate,e.rotate,n,r),Gr(t.skew,e.skew,n,r),Zr(t.scale,e.scale,n,r),t=e=null,function(t){for(var e,a=-1,o=r.length;++a=0;)n.push(a[r])}function sa(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(o=t.children)&&(a=o.length))for(var a,o,i=-1;++ia&&(r=n,a=e);return r}function xa(t){return t.reduce(ba,0)}function ba(t,e){return t+e[1]}function _a(t,e){return wa(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wa(t,e){for(var n=-1,r=+t[0],a=(t[1]-r)/e,o=[];++n<=e;)o[n]=a*n+r;return o}function ka(t){return[ci.min(t),ci.max(t)]}function Ma(t,e){return t.value-e.value}function Aa(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Ta(t,e){t._pack_next=e,e._pack_prev=t}function La(t,e){var n=e.x-t.x,r=e.y-t.y,a=t.r+e.r;return.999*a*a>n*n+r*r}function Ca(t){function e(t){c=Math.min(t.x-t.r,c),f=Math.max(t.x+t.r,f),d=Math.min(t.y-t.r,d),h=Math.max(t.y+t.r,h)}if((n=t.children)&&(u=n.length)){var n,r,a,o,i,l,s,u,c=1/0,f=-1/0,d=1/0,h=-1/0;if(n.forEach(za),r=n[0],r.x=-r.r,r.y=0,e(r),u>1&&(a=n[1],a.x=a.r,a.y=0,e(a),u>2))for(o=n[2],Na(r,a,o),e(o),Aa(r,o),r._pack_prev=o,Aa(o,a),a=r._pack_next,i=3;i=0;)e=a[o],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}function ja(t,e,n){return t.a.parent===e.parent?t.a:n}function Fa(t){return 1+ci.max(t,function(t){return t.y})}function qa(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Ba(t){var e=t.children;return e&&e.length?Ba(e[0]):t}function Ha(t){var e,n=t.children;return n&&(e=n.length)?Ha(n[e-1]):t}function Va(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Xa(t,e){var n=t.x+e[3],r=t.y+e[0],a=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return a<0&&(n+=a/2,a=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:a,dy:o}}function Ua(t){var e=t[0],n=t[t.length-1];return e2?$a:Ga,s=r?Qr:$r;return i=a(t,e,s,n),l=a(e,t,s,_r),o}function o(t){return i(t)}var i,l;return o.invert=function(t){return l(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),a()):t},o.range=function(t){return arguments.length?(e=t,a()):e},o.rangeRound=function(t){return o.range(t).interpolate(Fr)},o.clamp=function(t){return arguments.length?(r=t,a()):r},o.interpolate=function(t){return arguments.length?(n=t,a()):n},o.ticks=function(e){return eo(t,e)},o.tickFormat=function(e,n){return no(t,e,n)},o.nice=function(e){return Ka(t,e),a()},o.copy=function(){return Qa(t,e,n,r)},a()}function Ja(t,e){return ci.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Ka(t,e){return Za(t,Wa(to(t,e)[2])),Za(t,Wa(to(t,e)[2])),t}function to(t,e){null==e&&(e=10);var n=Ua(t),r=n[1]-n[0],a=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),o=e/r*a;return o<=.15?a*=10:o<=.35?a*=5:o<=.75&&(a*=2),n[0]=Math.ceil(n[0]/a)*a,n[1]=Math.floor(n[1]/a)*a+.5*a,n[2]=a,n}function eo(t,e){return ci.range.apply(ci,to(t,e))}function no(t,e,n){var r=to(t,e);if(n){var a=cl.exec(n);if(a.shift(),"s"===a[8]){var o=ci.formatPrefix(Math.max(bi(r[0]),bi(r[1])));return a[7]||(a[7]="."+ro(o.scale(r[2]))),a[8]="f",n=ci.format(a.join("")),function(t){return n(o.scale(t))+o.symbol}}a[7]||(a[7]="."+ao(a[8],r)),n=a.join("")}else n=",."+ro(r[2])+"f";return ci.format(n)}function ro(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ao(t,e){var n=ro(e[2]);return t in ks?Math.abs(n-ro(Math.max(bi(e[0]),bi(e[1]))))+ +("e"!==t):n-2*("%"===t)}function oo(t,e,n,r){function a(t){return(n?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function i(e){return t(a(e))}return i.invert=function(e){return o(t.invert(e))},i.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(a)),i):r},i.base=function(n){return arguments.length?(e=+n,t.domain(r.map(a)),i):e},i.nice=function(){var e=Za(r.map(a),n?Math:As);return t.domain(e),r=e.map(o),i},i.ticks=function(){var t=Ua(r),i=[],l=t[0],s=t[1],u=Math.floor(a(l)),c=Math.ceil(a(s)),f=e%1?2:e;if(isFinite(c-u)){if(n){for(;u0;d--)i.push(o(u)*d);for(u=0;i[u]s;c--);i=i.slice(u,c)}return i},i.tickFormat=function(t,n){if(!arguments.length)return Ms;arguments.length<2?n=Ms:"function"!=typeof n&&(n=ci.format(n));var r=Math.max(1,e*t/i.ticks().length);return function(t){var i=t/o(Math.round(a(t)));return i*e0?l[n-1]:t[0],n0?0:1}function _o(t,e,n,r,a){var o=t[0]-e[0],i=t[1]-e[1],l=(a?r:-r)/Math.sqrt(o*o+i*i),s=l*i,u=-l*o,c=t[0]+s,f=t[1]+u,d=e[0]+s,h=e[1]+u,p=(c+d)/2,g=(f+h)/2,v=d-c,m=h-f,y=v*v+m*m,x=n-r,b=c*h-d*f,_=(m<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*m-v*_)/y,k=(-b*v-m*_)/y,M=(b*m+v*_)/y,A=(-b*v+m*_)/y,T=w-p,L=k-g,C=M-p,z=A-g;return T*T+L*L>C*C+z*z&&(w=M,k=A),[[w-s,k-u],[w*n/x,k*n/x]]}function wo(t){function e(e){function i(){u.push("M",o(t(c),l))}for(var s,u=[],c=[],f=-1,d=e.length,h=Ct(n),p=Ct(r);++f1?t.join("L"):t+"Z"}function Mo(t){return t.join("L")+"Z"}function Ao(t){for(var e=0,n=t.length,r=t[0],a=[r[0],",",r[1]];++e1&&a.push("H",r[0]),a.join("")}function To(t){for(var e=0,n=t.length,r=t[0],a=[r[0],",",r[1]];++e1){l=e[1],o=t[s],s++,r+="C"+(a[0]+i[0])+","+(a[1]+i[1])+","+(o[0]-l[0])+","+(o[1]-l[1])+","+o[0]+","+o[1];for(var u=2;u9&&(a=3*e/Math.sqrt(a),i[l]=a*n,i[l+1]=a*r));for(l=-1;++l<=s;)a=(t[Math.min(s,l+1)][0]-t[Math.max(0,l-1)][0])/(6*(1+i[l]*i[l])),o.push([a||0,i[l]*a||0]);return o}function Ho(t){return t.length<3?ko(t):t[0]+Oo(t,Bo(t))}function Vo(t){for(var e,n,r,a=-1,o=t.length;++a0;)h[--l].call(t,i);if(o>=1)return g.event&&g.event.end.call(t,t.__data__,e),--p.count?delete p[r]:delete t[n],1}var s,u,c,d,h,p=t[n]||(t[n]={active:0,count:0}),g=p[r];g||(s=a.time,u=Dt(o,0,s),g=p[r]={tween:new f,time:s,timer:u,delay:a.delay,duration:a.duration,ease:a.ease,index:e},a=null,++p.count)}function ri(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"})}function ai(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"})}function oi(t){return t.toISOString()}function ii(t,e,n){function r(e){return t(e)}function a(t,n){var r=t[1]-t[0],a=r/n,o=ci.bisect($s,a);return o==$s.length?[e.year,to(t.map(function(t){return t/31536e6}),n)[2]]:o?e[a/$s[o-1]<$s[o]/a?o-1:o]:[Ks,to(t,n)[2]]}return r.invert=function(e){return li(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain(e),r):t.domain().map(li)},r.nice=function(t,e){function n(n){return!isNaN(n)&&!t.range(n,li(+n+1),e).length}var o=r.domain(),i=Ua(o),l=null==t?a(i,10):"number"==typeof t&&a(i,t);return l&&(t=l[0],e=l[1]),r.domain(Za(o,e>1?{floor:function(e){for(;n(e=t.floor(e));)e=li(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=li(+e+1);return e}}:t))},r.ticks=function(t,e){var n=Ua(r.domain()),o=null==t?a(n,10):"number"==typeof t?a(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],li(+n[1]+1),e<1?1:e)},r.tickFormat=function(){return n},r.copy=function(){return ii(t.copy(),e,n)},Ja(r,t)}function li(t){return new Date(t)}function si(t){return JSON.parse(t.responseText)}function ui(t){var e=hi.createRange();return e.selectNode(hi.body),e.createContextualFragment(t.responseText)}var ci={version:"3.5.17"},fi=[].slice,di=function(t){return fi.call(t)},hi=this.document;if(hi)try{di(hi.documentElement.childNodes)[0].nodeType}catch(t){di=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),hi)try{hi.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var pi=this.Element.prototype,gi=pi.setAttribute,vi=pi.setAttributeNS,mi=this.CSSStyleDeclaration.prototype,yi=mi.setProperty;pi.setAttribute=function(t,e){gi.call(this,t,e+"")},pi.setAttributeNS=function(t,e,n){vi.call(this,t,e,n+"")},mi.setProperty=function(t,e,n){yi.call(this,t,e+"",n)}}ci.ascending=a,ci.descending=function(t,e){return et?1:e>=t?0:NaN},ci.min=function(t,e){var n,r,a=-1,o=t.length;if(1===arguments.length){for(;++a=r){n=r;break}for(;++ar&&(n=r)}else{for(;++a=r){n=r;break}for(;++ar&&(n=r)}return n},ci.max=function(t,e){var n,r,a=-1,o=t.length;if(1===arguments.length){for(;++a=r){n=r;break}for(;++an&&(n=r)}else{for(;++a=r){n=r;break}for(;++an&&(n=r)}return n},ci.extent=function(t,e){var n,r,a,o=-1,i=t.length;if(1===arguments.length){for(;++o=r){n=a=r;break}for(;++or&&(n=r),a=r){n=a=r;break}for(;++or&&(n=r),a1)return s/(c-1)},ci.deviation=function(){var t=ci.variance.apply(this,arguments);return t?Math.sqrt(t):t};var xi=l(a);ci.bisectLeft=xi.left,ci.bisect=ci.bisectRight=xi.right,ci.bisector=function(t){return l(1===t.length?function(e,n){return a(t(e),n)}:t)},ci.shuffle=function(t,e,n){(o=arguments.length)<3&&(n=t.length,o<2&&(e=0));for(var r,a,o=n-e;o;)a=Math.random()*o--|0,r=t[o+e],t[o+e]=t[a+e],t[a+e]=r;return t},ci.permute=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},ci.pairs=function(t){for(var e=0,n=t.length-1,r=t[0],a=new Array(n<0?0:n);e=0;)for(r=t[a],e=r.length;--e>=0;)n[--i]=r[e];return n};var bi=Math.abs;ci.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n==1/0)throw new Error("infinite range");var r,a=[],o=u(bi(n)),i=-1 +;if(t*=o,e*=o,n*=o,n<0)for(;(r=t+n*++i)>e;)a.push(r/o);else for(;(r=t+n*++i)=o.length)return r?r.call(a,i):n?i.sort(n):i;for(var s,u,c,d,h=-1,p=i.length,g=o[l++],v=new f;++h=o.length)return t;var r=[],a=i[n++];return t.forEach(function(t,a){r.push({key:t,values:e(a,n)})}),a?r.sort(function(t,e){return a(t.key,e.key)}):r}var n,r,a={},o=[],i=[];return a.map=function(e,n){return t(n,e,0)},a.entries=function(n){return e(t(ci.map,n,0),0)},a.key=function(t){return o.push(t),a},a.sortKeys=function(t){return i[o.length-1]=t,a},a.sortValues=function(t){return n=t,a},a.rollup=function(t){return r=t,a},a},ci.set=function(t){var e=new x;if(t)for(var n=0,r=t.length;n=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},ci.event=null,ci.requote=function(t){return t.replace(Mi,"\\$&")};var Mi=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ai={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},Ti=function(t,e){return e.querySelector(t)},Li=function(t,e){return e.querySelectorAll(t)},Ci=function(t,e){var n=t.matches||t[w(t,"matchesSelector")];return(Ci=function(t,e){return n.call(t,e)})(t,e)};"function"==typeof Sizzle&&(Ti=function(t,e){return Sizzle(t,e)[0]||null},Li=Sizzle,Ci=Sizzle.matchesSelector),ci.selection=function(){return ci.select(hi.documentElement)};var zi=ci.selection.prototype=[];zi.select=function(t){var e,n,r,a,o=[];t=S(t);for(var i=-1,l=this.length;++i=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Oi.hasOwnProperty(n)?{space:Oi[n],local:t}:t}},zi.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=ci.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(N(e,t[e]));return this}return this.each(N(t,e))},zi.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=E(t)).length,a=-1;if(e=n.classList){for(;++a=0;)(n=r[a])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},zi.sort=function(t){t=X.apply(this,arguments);for(var e=-1,n=this.length;++e0&&(e=e.transition().duration(z)),e.call(t.event)}function l(){_&&_.domain(b.range().map(function(t){return(t-M.x)/M.k}).map(b.invert)),k&&k.domain(w.range().map(function(t){return(t-M.y)/M.k}).map(w.invert))}function s(t){S++||t({type:"zoomstart"})}function u(t){l(),t({type:"zoom",scale:M.k,translate:[M.x,M.y]})}function c(t){--S||(t({type:"zoomend"}),v=null)}function f(){function t(){l=1,o(ci.mouse(a),d),u(i)}function n(){f.on(N,null).on(D,null),h(l),c(i)}var a=this,i=E.of(a,arguments),l=0,f=ci.select(r(a)).on(N,t).on(D,n),d=e(ci.mouse(a)),h=Q(a);qs.call(a),s(i)}function d(){function t(){var t=ci.touches(p);return h=M.k,t.forEach(function(t){t.identifier in v&&(v[t.identifier]=e(t))}),t}function n(){var e=ci.event.target;ci.select(e).on(b,r).on(_,l),w.push(e);for(var n=ci.event.changedTouches,a=0,o=n.length;a1){var c=s[0],f=s[1],d=c[0]-f[0],h=c[1]-f[1];m=d*d+h*h}}function r(){var t,e,n,r,i=ci.touches(p);qs.call(p);for(var l=0,s=i.length;l=u)return i;if(a)return a=!1,o;var e=c;if(34===t.charCodeAt(e)){for(var n=e;n++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,fl=ci.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=ci.round(t,It(t,e))).toFixed(Math.max(0,Math.min(20,It(t*(1+1e-15),e))))}}),dl=ci.time={},hl=Date;Bt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){pl.setUTCDate.apply(this._,arguments)},setDay:function(){pl.setUTCDay.apply(this._,arguments)},setFullYear:function(){pl.setUTCFullYear.apply(this._,arguments)},setHours:function(){pl.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){pl.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){pl.setUTCMinutes.apply(this._,arguments)},setMonth:function(){pl.setUTCMonth.apply(this._,arguments)},setSeconds:function(){pl.setUTCSeconds.apply(this._,arguments)},setTime:function(){pl.setTime.apply(this._,arguments)}};var pl=Date.prototype;dl.year=Ht(function(t){return t=dl.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),dl.years=dl.year.range,dl.years.utc=dl.year.utc.range,dl.day=Ht(function(t){var e=new hl(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),dl.days=dl.day.range,dl.days.utc=dl.day.utc.range,dl.dayOfYear=function(t){var e=dl.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=dl[t]=Ht(function(t){return(t=dl.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=dl.year(t).getDay();return Math.floor((dl.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});dl[t+"s"]=n.range,dl[t+"s"].utc=n.utc.range,dl[t+"OfYear"]=function(t){var n=dl.year(t).getDay();return Math.floor((dl.dayOfYear(t)+(n+e)%7)/7)}}),dl.week=dl.sunday,dl.weeks=dl.sunday.range,dl.weeks.utc=dl.sunday.utc.range,dl.weekOfYear=dl.sundayOfYear;var gl={"-":"",_:" ",0:"0"},vl=/^\s*\d+/,ml=/^%/;ci.locale=function(t){return{numberFormat:Ft(t),timeFormat:Xt(t)}};var yl=ci.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ci.format=yl.numberFormat,ci.geo={},fe.prototype={s:0,t:0,add:function(t){de(t,this.t,xl),de(xl.s,this.s,this),this.s?this.t+=xl.t:this.s=xl.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var xl=new fe;ci.geo.stream=function(t,e){t&&bl.hasOwnProperty(t.type)?bl[t.type](t,e):he(t,e)};var bl={Feature:function(t,e){he(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,a=n.length;++rh&&(h=e)}function e(e,n){var r=me([e*Vi,n*Vi]);if(m){var a=xe(m,r),o=[a[1],-a[0],0],i=xe(o,a);we(i),i=ke(i);var s=e-p,u=s>0?1:-1,g=i[0]*Xi*u,v=bi(s)>180;if(v^(u*ph&&(h=y)}else if(g=(g+360)%360-180,v^(u*ph&&(h=n);v?el(c,d)&&(d=e):l(e,d)>l(c,d)&&(c=e):d>=c?(ed&&(d=e)):e>p?l(c,e)>l(c,d)&&(d=e):l(e,d)>l(c,d)&&(c=e)}else t(e,n);m=r,p=e}function n(){_.point=e}function r(){b[0]=c,b[1]=d,_.point=t,m=null}function a(t,n){if(m){var r=t-p;y+=bi(r)>180?r+(r>0?360:-360):r}else g=t,v=n;Ml.point(t,n),e(t,n)}function o(){Ml.lineStart()}function i(){a(g,v),Ml.lineEnd(),bi(y)>Ii&&(c=-(d=180)),b[0]=c,b[1]=d,m=null}function l(t,e){return(e-=t)<0?e+360:e}function s(t,e){return t[0]-e[0]}function u(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tIi?h=90:y<-Ii&&(f=-90),b[0]=c,b[1]=d}};return function(t){h=d=-(c=f=1/0),x=[],ci.geo.stream(t,_);var e=x.length;if(e){x.sort(s);for(var n,r=1,a=x[0],o=[a];rl(a[0],a[1])&&(a[1]=n[1]),l(n[0],a[1])>l(a[0],a[1])&&(a[0]=n[0])):o.push(a=n);for(var i,n,p=-1/0,e=o.length-1,r=0,a=o[e];r<=e;a=n,++r)n=o[r],(i=l(a[1],n[0]))>p&&(p=i,c=n[0],d=a[1])}return x=b=null,c===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,f],[d,h]]}}(),ci.geo.centroid=function(t){Al=Tl=Ll=Cl=zl=Sl=Ol=Nl=Dl=Pl=El=0,ci.geo.stream(t,Rl);var e=Dl,n=Pl,r=El,a=e*e+n*n+r*r;return a=.12&&a<.234&&r>=-.425&&r<-.214?i:a>=.166&&a<.234&&r>=-.214&&r<-.115?l:o).invert(t)},t.stream=function(t){var e=o.stream(t),n=i.stream(t),r=l.stream(t);return{point:function(t,a){e.point(t,a),n.point(t,a),r.point(t,a)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),i.precision(e),l.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),i.scale(.35*e),l.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var u=o.scale(),c=+e[0],f=+e[1];return n=o.translate(e).clipExtent([[c-.455*u,f-.238*u],[c+.455*u,f+.238*u]]).stream(s).point,r=i.translate([c-.307*u,f+.201*u]).clipExtent([[c-.425*u+Ii,f+.12*u+Ii],[c-.214*u-Ii,f+.234*u-Ii]]).stream(s).point,a=l.translate([c-.205*u,f+.212*u]).clipExtent([[c-.214*u+Ii,f+.166*u+Ii],[c-.115*u-Ii,f+.234*u-Ii]]).stream(s).point,t},t.scale(1070)};var Fl,ql,Bl,Hl,Vl,Xl,Ul={point:k,lineStart:k,lineEnd:k,polygonStart:function(){ql=0,Ul.lineStart=Ze},polygonEnd:function(){Ul.lineStart=Ul.lineEnd=Ul.point=k,Fl+=bi(ql/2)}},Yl={point:We,lineStart:k,lineEnd:k,polygonStart:k,polygonEnd:k},Gl={point:Je,lineStart:Ke,lineEnd:tn,polygonStart:function(){Gl.lineStart=en},polygonEnd:function(){Gl.point=Je,Gl.lineStart=Ke,Gl.lineEnd=tn}};ci.geo.path=function(){function t(t){return t&&("function"==typeof l&&o.pointRadius(+l.apply(this,arguments)),i&&i.valid||(i=a(o)),ci.geo.stream(t,i)),o.result()}function e(){return i=null,t}var n,r,a,o,i,l=4.5;return t.area=function(t){return Fl=0,ci.geo.stream(t,a(Ul)),Fl},t.centroid=function(t){return Ll=Cl=zl=Sl=Ol=Nl=Dl=Pl=El=0,ci.geo.stream(t,a(Gl)),El?[Dl/El,Pl/El]:Nl?[Sl/Nl,Ol/Nl]:zl?[Ll/zl,Cl/zl]:[NaN,NaN]},t.bounds=function(t){return Vl=Xl=-(Bl=Hl=1/0),ci.geo.stream(t,a(Yl)),[[Bl,Hl],[Vl,Xl]]},t.projection=function(t){return arguments.length?(a=(n=t)?t.stream||an(t):b,e()):n},t.context=function(t){return arguments.length?(o=null==(r=t)?new $e:new nn(t),"function"!=typeof l&&o.pointRadius(l),e()):r},t.pointRadius=function(e){return arguments.length?(l="function"==typeof e?e:(o.pointRadius(+e),+e),t):l},t.projection(ci.geo.albersUsa()).context(null)},ci.geo.transform=function(t){return{stream:function(e){var n=new on(e);for(var r in t)n[r]=t[r];return n}}},on.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ci.geo.projection=sn,ci.geo.projectionMutator=un,(ci.geo.equirectangular=function(){return sn(fn)}).raw=fn.invert=fn,ci.geo.rotation=function(t){function e(e){return e=t(e[0]*Vi,e[1]*Vi),e[0]*=Xi,e[1]*=Xi,e}return t=hn(t[0]%360*Vi,t[1]*Vi,t.length>2?t[2]*Vi:0),e.invert=function(e){return e=t.invert(e[0]*Vi,e[1]*Vi),e[0]*=Xi,e[1]*=Xi,e},e},dn.invert=fn,ci.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,e=hn(-t[0]*Vi,-t[1]*Vi,0).invert,a=[];return n(null,null,1,{point:function(t,n){ +a.push(t=e(t,n)),t[0]*=Xi,t[1]*=Xi}}),{type:"Polygon",coordinates:[a]}}var e,n,r=[0,0],a=6;return t.origin=function(e){return arguments.length?(r=e,t):r},t.angle=function(r){return arguments.length?(n=mn((e=+r)*Vi,a*Vi),t):e},t.precision=function(r){return arguments.length?(n=mn(e*Vi,(a=+r)*Vi),t):a},t.angle(90)},ci.geo.distance=function(t,e){var n,r=(e[0]-t[0])*Vi,a=t[1]*Vi,o=e[1]*Vi,i=Math.sin(r),l=Math.cos(r),s=Math.sin(a),u=Math.cos(a),c=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((n=f*i)*n+(n=u*c-s*f*l)*n),s*c+u*f*l)},ci.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return ci.range(Math.ceil(o/v)*v,a,v).map(d).concat(ci.range(Math.ceil(u/m)*m,s,m).map(h)).concat(ci.range(Math.ceil(r/p)*p,n,p).filter(function(t){return bi(t%v)>Ii}).map(c)).concat(ci.range(Math.ceil(l/g)*g,i,g).filter(function(t){return bi(t%m)>Ii}).map(f))}var n,r,a,o,i,l,s,u,c,f,d,h,p=10,g=p,v=90,m=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[d(o).concat(h(s).slice(1),d(a).reverse().slice(1),h(u).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],a=+e[1][0],u=+e[0][1],s=+e[1][1],o>a&&(e=o,o=a,a=e),u>s&&(e=u,u=s,s=e),t.precision(y)):[[o,u],[a,s]]},t.minorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],l=+e[0][1],i=+e[1][1],r>n&&(e=r,r=n,n=e),l>i&&(e=l,l=i,i=e),t.precision(y)):[[r,l],[n,i]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(v=+e[0],m=+e[1],t):[v,m]},t.minorStep=function(e){return arguments.length?(p=+e[0],g=+e[1],t):[p,g]},t.precision=function(e){return arguments.length?(y=+e,c=xn(l,i,90),f=bn(r,n,y),d=xn(u,s,90),h=bn(o,a,y),t):y},t.majorExtent([[-180,-90+Ii],[180,90-Ii]]).minorExtent([[-180,-80-Ii],[180,80+Ii]])},ci.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||r.apply(this,arguments),n||a.apply(this,arguments)]}}var e,n,r=_n,a=wn;return t.distance=function(){return ci.geo.distance(e||r.apply(this,arguments),n||a.apply(this,arguments))},t.source=function(n){return arguments.length?(r=n,e="function"==typeof n?null:n,t):r},t.target=function(e){return arguments.length?(a=e,n="function"==typeof e?null:e,t):a},t.precision=function(){return arguments.length?t:0},t},ci.geo.interpolate=function(t,e){return kn(t[0]*Vi,t[1]*Vi,e[0]*Vi,e[1]*Vi)},ci.geo.length=function(t){return Zl=0,ci.geo.stream(t,Wl),Zl};var Zl,Wl={sphere:k,point:k,lineStart:Mn,lineEnd:k,polygonStart:k,polygonEnd:k},$l=An(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(ci.geo.azimuthalEqualArea=function(){return sn($l)}).raw=$l;var Ql=An(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},b);(ci.geo.azimuthalEquidistant=function(){return sn(Ql)}).raw=Ql,(ci.geo.conicConformal=function(){return Ye(Tn)}).raw=Tn,(ci.geo.conicEquidistant=function(){return Ye(Ln)}).raw=Ln;var Jl=An(function(t){return 1/t},Math.atan);(ci.geo.gnomonic=function(){return sn(Jl)}).raw=Jl,Cn.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Hi]},(ci.geo.mercator=function(){return zn(Cn)}).raw=Cn;var Kl=An(function(){return 1},Math.asin);(ci.geo.orthographic=function(){return sn(Kl)}).raw=Kl;var ts=An(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(ci.geo.stereographic=function(){return sn(ts)}).raw=ts,Sn.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Hi]},(ci.geo.transverseMercator=function(){var t=zn(Sn),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},n([0,0,90])}).raw=Sn,ci.geom={},ci.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,a=Ct(n),o=Ct(r),i=t.length,l=[],s=[];for(e=0;e=0;--e)h.push(t[l[u[e]][2]]);for(e=+f;e=r&&u.x<=o&&u.y>=a&&u.y<=i?[[r,i],[o,i],[o,a],[r,a]]:[]).point=t[l]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(o(t,e)/Ii)*Ii,y:Math.round(i(t,e)/Ii)*Ii,i:e}})}var r=On,a=Nn,o=r,i=a,l=us;return t?e(t):(e.links=function(t){return ur(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return ur(n(t)).cells.forEach(function(n,r){for(var a,o=n.site,i=n.edges.sort(Gn),l=-1,s=i.length,u=i[s-1].edge,c=u.l===o?u.r:u.l;++l=u,d=r>=c,h=d<<1|f;t.leaf=!1,t=t.nodes[h]||(t.nodes[h]=pr()),f?a=u:l=u,d?i=c:s=c,o(t,e,n,r,a,i,l,s)}var c,f,d,h,p,g,v,m,y,x=Ct(l),b=Ct(s);if(null!=e)g=e,v=n,m=r,y=a;else if(m=y=-(g=v=1/0),f=[],d=[],p=t.length,i)for(h=0;hm&&(m=c.x),c.y>y&&(y=c.y),f.push(c.x),d.push(c.y);else for(h=0;hm&&(m=_),w>y&&(y=w),f.push(_),d.push(w)}var k=m-g,M=y-v;k>M?y=v+k:m=g+M;var A=pr();if(A.add=function(t){o(A,t,+x(t,++h),+b(t,h),g,v,m,y)},A.visit=function(t){gr(t,A,g,v,m,y)},A.find=function(t){return vr(A,t[0],t[1],g,v,m,y)},h=-1,null==e){for(;++h=0?t.slice(0,e):t,r=e>=0?t.slice(e+1):"in";return n=hs.get(n)||ds,r=ps.get(r)||b,kr(r(n.apply(null,fi.call(arguments,1))))},ci.interpolateHcl=Rr,ci.interpolateHsl=Ir,ci.interpolateLab=jr,ci.interpolateRound=Fr,ci.transform=function(t){var e=hi.createElementNS(ci.ns.prefix.svg,"g");return(ci.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new qr(n?n.matrix:gs)})(t)},qr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var gs={a:1,b:0,c:0,d:1,e:0,f:0};ci.interpolateTransform=Wr,ci.layout={},ci.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++n0?a=t:(n.c=null,n.t=NaN,n=null,u.end({type:"end",alpha:a=0})):t>0&&(u.start({type:"start",alpha:a=t}),n=Dt(s.tick)),s):a},s.start=function(){function t(t,r){if(!n){for(n=new Array(a),s=0;s=0;)i.push(c=u[s]),c.parent=o,c.depth=o.depth+1;r&&(o.value=0),o.children=u}else r&&(o.value=+r.call(t,o,o.depth)||0),delete o.children;return sa(a,function(t){var n,a;e&&(n=t.children)&&n.sort(e),r&&(a=t.parent)&&(a.value+=t.value)}),l}var e=fa,n=ua,r=ca;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(r=e,t):r},t.revalue=function(e){return r&&(la(e,function(t){t.children&&(t.value=0)}),sa(e,function(e){var n;e.children||(e.value=+r.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)})),e},t},ci.layout.partition=function(){function t(e,n,r,a){var o=e.children;if(e.x=n,e.y=e.depth*a,e.dx=r,e.dy=a,o&&(i=o.length)){var i,l,s,u=-1;for(r=e.value?r/e.value:0;++ul&&(l=r),i.push(r)}for(n=0;n0)for(o=-1;++o=c[0]&&l<=c[1]&&(i=s[ci.bisect(f,l,1,h)-1],i.y+=p,i.push(t[o]));return s}var e=!0,n=Number,r=ka,a=_a;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(r=Ct(e),t):r},t.bins=function(e){return arguments.length?(a="number"==typeof e?function(t){return wa(t,e)}:Ct(e),t):a},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},ci.layout.pack=function(){function t(t,o){var i=n.call(this,t,o),l=i[0],s=a[0],u=a[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(l.x=l.y=0,sa(l,function(t){t.r=+c(t.value)}),sa(l,Ca),r){var f=r*(e?1:Math.max(2*l.r/s,2*l.r/u))/2;sa(l,function(t){t.r+=f}),sa(l,Ca),sa(l,function(t){t.r-=f})}return Oa(l,s/2,u/2,e?1:1/Math.max(2*l.r/s,2*l.r/u)),i}var e,n=ci.layout.hierarchy().sort(Ma),r=0,a=[1,1];return t.size=function(e){return arguments.length?(a=e,t):a},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(r=+e,t):r},ia(t,n)},ci.layout.tree=function(){function t(t,a){var c=i.call(this,t,a),f=c[0],d=e(f);if(sa(d,n),d.parent.m=-d.z,la(d,r),u)la(f,o);else{var h=f,p=f,g=f;la(f,function(t){t.xp.x&&(p=t),t.depth>g.depth&&(g=t)});var v=l(h,p)/2-h.x,m=s[0]/(p.x+l(p,h)/2+v),y=s[1]/(g.depth||1);la(f,function(t){t.x=(t.x+v)*m,t.y=t.depth*y})}return c}function e(t){for(var e,n={A:null,children:[t]},r=[n];null!=(e=r.pop());)for(var a,o=e.children,i=0,l=o.length;i0&&(Ra(ja(i,t,n),t,r),u+=r,c+=r),f+=i.m,u+=a.m,d+=s.m,c+=o.m;i&&!Ea(o)&&(o.t=i,o.m+=f-c),a&&!Pa(s)&&(s.t=a,s.m+=u-d,n=t)}return n}function o(t){t.x*=s[0],t.y=t.depth*s[1]}var i=ci.layout.hierarchy().sort(null).value(null),l=Da,s=[1,1],u=null;return t.separation=function(e){return arguments.length?(l=e,t):l},t.size=function(e){return arguments.length?(u=null==(s=e)?o:null,t):u?null:s},t.nodeSize=function(e){return arguments.length?(u=null==(s=e)?null:o,t):u?s:null},ia(t,i)},ci.layout.cluster=function(){function t(t,o){var i,l=e.call(this,t,o),s=l[0],u=0;sa(s,function(t){var e=t.children;e&&e.length?(t.x=qa(e),t.y=Fa(e)):(t.x=i?u+=n(t,i):0,t.y=0,i=t)});var c=Ba(s),f=Ha(s),d=c.x-n(c,f)/2,h=f.x+n(f,c)/2;return sa(s,a?function(t){t.x=(t.x-s.x)*r[0],t.y=(s.y-t.y)*r[1]}:function(t){t.x=(t.x-d)/(h-d)*r[0],t.y=(1-(s.y?t.y/s.y:1))*r[1]}),l}var e=ci.layout.hierarchy().sort(null).value(null),n=Da,r=[1,1],a=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(a=null==(r=e),t):a?null:r},t.nodeSize=function(e){return arguments.length?(a=null!=(r=e),t):a?r:null},ia(t,e)},ci.layout.treemap=function(){function t(t,e){for(var n,r,a=-1,o=t.length;++a0;)c.push(i=d[s-1]),c.area+=i.area,"squarify"!==h||(l=r(c,g))<=p?(d.pop(),p=l):(c.area-=c.pop().area,a(c,g,u,!1),g=Math.min(u.dx,u.dy),c.length=c.area=0,p=1/0);c.length&&(a(c,g,u,!0),c.length=c.area=0),o.forEach(e)}}function n(e){var r=e.children;if(r&&r.length){var o,i=f(e),l=r.slice(),s=[];for(t(l,i.dx*i.dy/e.value),s.area=0;o=l.pop();)s.push(o),s.area+=o.area,null!=o.z&&(a(s,o.z?i.dx:i.dy,i,!l.length),s.length=s.area=0);r.forEach(n)}}function r(t,e){for(var n,r=t.area,a=0,o=1/0,i=-1,l=t.length;++ia&&(a=n));return r*=r,e*=e,r?Math.max(e*a*p/r,r/(e*o*p)):1/0}function a(t,e,n,r){var a,o=-1,i=t.length,l=n.x,u=n.y,c=e?s(t.area/e):0;if(e==n.dx){for((r||c>n.dy)&&(c=n.dy);++on.dx)&&(c=n.dx);++o1);return t+e*n*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var t=ci.random.normal.apply(ci,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=ci.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;nf?0:1;if(u=Bi)return e(u,h)+(t?e(t,1-h):"")+"Z";var p,g,v,m,y,x,b,_,w,k,M,A,T=0,L=0,C=[];if((m=(+s.apply(this,arguments)||0)/2)&&(v=o===Ss?Math.sqrt(t*t+u*u):+o.apply(this,arguments),h||(L*=-1),u&&(L=rt(v/u*Math.sin(m))),t&&(T=rt(v/t*Math.sin(m)))),u){y=u*Math.cos(c+L),x=u*Math.sin(c+L),b=u*Math.cos(f-L),_=u*Math.sin(f-L);var z=Math.abs(f-c-2*L)<=Fi?0:1;if(L&&bo(y,x,b,_)===h^z){var S=(c+f)/2;y=u*Math.cos(S),x=u*Math.sin(S),b=_=null}}else y=x=0;if(t){w=t*Math.cos(f-T),k=t*Math.sin(f-T),M=t*Math.cos(c+T),A=t*Math.sin(c+T);var O=Math.abs(c-f+2*T)<=Fi?0:1;if(T&&bo(w,k,M,A)===1-h^O){var N=(c+f)/2;w=t*Math.cos(N),k=t*Math.sin(N),M=A=null}}else w=k=0;if(d>Ii&&(p=Math.min(Math.abs(u-t)/2,+a.apply(this,arguments)))>.001){g=tFi)+",1 "+e}function a(t,e,n,r){return"Q 0,0 "+r}var o=_n,i=wn,l=Uo,s=mo,u=yo;return t.radius=function(e){return arguments.length?(l=Ct(e),t):l},t.source=function(e){return arguments.length?(o=Ct(e),t):o},t.target=function(e){return arguments.length?(i=Ct(e),t):i},t.startAngle=function(e){return arguments.length?(s=Ct(e),t):s},t.endAngle=function(e){return arguments.length?(u=Ct(e),t):u},t},ci.svg.diagonal=function(){function t(t,a){var o=e.call(this,t,a),i=n.call(this,t,a),l=(o.y+i.y)/2,s=[o,{x:o.x,y:l},{x:i.x,y:l},i] +;return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var e=_n,n=wn,r=Yo;return t.source=function(n){return arguments.length?(e=Ct(n),t):e},t.target=function(e){return arguments.length?(n=Ct(e),t):n},t.projection=function(e){return arguments.length?(r=e,t):r},t},ci.svg.diagonal.radial=function(){var t=ci.svg.diagonal(),e=Yo,n=t.projection;return t.projection=function(t){return arguments.length?n(Go(e=t)):e},t},ci.svg.symbol=function(){function t(t,r){return(Es.get(e.call(this,t,r))||$o)(n.call(this,t,r))}var e=Wo,n=Zo;return t.type=function(n){return arguments.length?(e=Ct(n),t):e},t.size=function(e){return arguments.length?(n=Ct(e),t):n},t};var Es=ci.map({circle:$o,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Is)),n=e*Is;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Rs),n=e*Rs/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Rs),n=e*Rs/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});ci.svg.symbolTypes=Es.keys();var Rs=Math.sqrt(3),Is=Math.tan(30*Vi);zi.transition=function(t){for(var e,n,r=js||++Hs,a=ei(t),o=[],i=Fs||{time:Date.now(),ease:Cr,delay:0,duration:250},l=-1,s=this.length;++lrect,.s>rect").attr("width",f[1]-f[0])}function a(t){t.select(".extent").attr("y",d[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",d[1]-d[0])}function o(){function o(){32==ci.event.keyCode&&(z||(x=null,O[0]-=f[1],O[1]-=d[1],z=2),T())}function g(){32==ci.event.keyCode&&2==z&&(O[0]+=f[1],O[1]+=d[1],z=0,T())}function v(){var t=ci.mouse(_),r=!1;b&&(t[0]+=b[0],t[1]+=b[1]),z||(ci.event.altKey?(x||(x=[(f[0]+f[1])/2,(d[0]+d[1])/2]),O[0]=f[+(t[0]0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!a(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},r.prototype.removeListener=function(t,e){var n,r,o,l;if(!a(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,r=-1,n===e||a(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(n)){for(l=o;l-- >0;)if(n[l]===e||n[l].listener&&n[l].listener===e){r=l;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],a(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?a(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(a(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},{}],18:[function(t,e,n){"use strict";function r(t){for(var e,n=t.length,r=0;r13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}e.exports=function(t){var e=typeof t;if("string"===e){var n=t;if(0===(t=+t)&&r(n))return!1}else if("number"!==e)return!1;return t-t<1}},{}],19:[function(t,e,n){function r(t,e){var n=e[0],r=e[1],a=e[2],o=e[3],i=n+n,l=r+r,s=a+a,u=n*i,c=r*i,f=r*l,d=a*i,h=a*l,p=a*s,g=o*i,v=o*l,m=o*s;return t[0]=1-f-p,t[1]=c+m,t[2]=d-v,t[3]=0,t[4]=c-m,t[5]=1-u-p,t[6]=h+g,t[7]=0,t[8]=d+v,t[9]=h-g,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}e.exports=r},{}],20:[function(t,e,n){function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(t){if(f===setTimeout)return setTimeout(t,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0)}}}function i(t){if(d===clearTimeout)return clearTimeout(t);if((d===a||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function l(){v&&p&&(v=!1,p.length?g=p.concat(g):m=-1,g.length&&s())}function s(){if(!v){var t=o(l);v=!0;for(var e=g.length;e;){for(p=g,g=[];++m1)for(var n=1;n.5?s/(2-o-i):s/(o+i),o){case t:r=(e-n)/s+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var a,o,i;if(t=L(t,360),e=L(e,100),n=L(n,100),0===e)a=o=i=n;else{var l=n<.5?n*(1+e):n+e-n*e,s=2*n-l;a=r(s,l,t+1/3),o=r(s,l,t),i=r(s,l,t-1/3)}return{r:255*a,g:255*o,b:255*i}}function s(t,e,n){t=L(t,255),e=L(e,255),n=L(n,255);var r,a,o=X(t,e,n),i=V(t,e,n),l=o,s=o-i;if(a=0===o?0:s/o,o==i)r=0;else{switch(o){case t:r=(e-n)/s+(e>1)+720)%360;--e;)a.h=(a.h+o)%360,i.push(r(a));return i}function A(t,e){e=e||6;for(var n=r(t).toHsv(),a=n.h,o=n.s,i=n.v,l=[],s=1/e;e--;)l.push(r({h:a,s:o,v:i})),i=(i+s)%1;return l}function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(t,n){S(t)&&(t="100%");var r=O(t) +;return t=V(n,X(0,parseFloat(t))),r&&(t=parseInt(t*n,10)/100),e.abs(t-n)<1e-6?1:t%n/parseFloat(n)}function C(t){return V(1,X(0,t))}function z(t){return parseInt(t,16)}function S(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function O(t){return"string"==typeof t&&-1!=t.indexOf("%")}function N(t){return 1==t.length?"0"+t:""+t}function D(t){return t<=1&&(t=100*t+"%"),t}function P(t){return e.round(255*parseFloat(t)).toString(16)}function E(t){return z(t)/255}function R(t){return!!Z.CSS_UNIT.exec(t)}function I(t){t=t.replace(F,"").replace(q,"").toLowerCase();var e=!1;if(Y[t])t=Y[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Z.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Z.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Z.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Z.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Z.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Z.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Z.hex8.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),a:E(n[4]),format:e?"name":"hex8"}:(n=Z.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:(n=Z.hex4.exec(t))?{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),a:E(n[4]+""+n[4]),format:e?"name":"hex8"}:!!(n=Z.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}function j(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==n&&"large"!==n&&(n="small"),{level:e,size:n}}var F=/^\s+/,q=/\s+$/,B=0,H=e.round,V=e.min,X=e.max,U=e.random;r.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,n,r,a,o,i,l=this.toRgb();return t=l.r/255,n=l.g/255,r=l.b/255,a=t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4),o=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),i=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),.2126*a+.7152*o+.0722*i},setAlpha:function(t){return this._a=T(t),this._roundA=H(100*this._a)/100,this},toHsv:function(){var t=s(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=s(this._r,this._g,this._b),e=H(360*t.h),n=H(100*t.s),r=H(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+r+"%)":"hsva("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=i(this._r,this._g,this._b),e=H(360*t.h),n=H(100*t.s),r=H(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return c(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return f(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:H(this._r),g:H(this._g),b:H(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+H(this._r)+", "+H(this._g)+", "+H(this._b)+")":"rgba("+H(this._r)+", "+H(this._g)+", "+H(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:H(100*L(this._r,255))+"%",g:H(100*L(this._g,255))+"%",b:H(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+H(100*L(this._r,255))+"%, "+H(100*L(this._g,255))+"%, "+H(100*L(this._b,255))+"%)":"rgba("+H(100*L(this._r,255))+"%, "+H(100*L(this._g,255))+"%, "+H(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(G[c(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+d(this._r,this._g,this._b,this._a),n=e,a=this._gradientType?"GradientType = 1, ":"";if(t){var o=r(t);n="#"+d(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return r(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},r.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var a in t)t.hasOwnProperty(a)&&(n[a]="a"===a?t[a]:D(t[a]));t=n}return r(t,e)},r.equals=function(t,e){return!(!t||!e)&&r(t).toRgbString()==r(e).toRgbString()},r.random=function(){return r.fromRatio({r:U(),g:U(),b:U()})},r.mix=function(t,e,n){n=0===n?0:n||50;var a=r(t).toRgb(),o=r(e).toRgb(),i=n/100;return r({r:(o.r-a.r)*i+a.r,g:(o.g-a.g)*i+a.g,b:(o.b-a.b)*i+a.b,a:(o.a-a.a)*i+a.a})},r.readability=function(t,n){var a=r(t),o=r(n);return(e.max(a.getLuminance(),o.getLuminance())+.05)/(e.min(a.getLuminance(),o.getLuminance())+.05)},r.isReadable=function(t,e,n){var a,o,i=r.readability(t,e);switch(o=!1,a=j(n),a.level+a.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},r.mostReadable=function(t,e,n){var a,o,i,l,s=null,u=0;n=n||{},o=n.includeFallbackColors,i=n.level,l=n.size;for(var c=0;cu&&(u=a,s=r(e[c]));return r.isReadable(t,s,{level:i,size:l})||!o?s:(n.includeFallbackColors=!1,r.mostReadable(t,["#fff","#000"],n))};var Y=r.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},G=r.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(Y),Z=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();void 0!==n&&n.exports?n.exports=r:"function"==typeof t&&t.amd?t(function(){return r}):window.tinycolor=r}(Math)},{}],22:[function(t,e,n){"use strict";var r=t("../../lib"),a=t("../color"),o=t("../../plots/cartesian/axes"),i=t("../../plots/cartesian/constants"),l=t("./attributes");e.exports=function(t,e,n,s,u){function c(n,a){return r.coerce(t,e,l,n,a)}s=s||{},u=u||{};var f=c("visible",!u.itemIsNotPlainObject),d=c("clicktoshow");if(!f&&!d)return e;c("opacity");var h=c("bgcolor"),p=c("bordercolor"),g=a.opacity(p);c("borderpad");var v=c("borderwidth"),m=c("showarrow");c("text",m?" ":"new text"),c("textangle"),r.coerceFont(c,"font",n.font),c("width"),c("align"),c("height")&&c("valign");for(var y=["x","y"],x=[-10,-30],b={_fullLayout:n},_=0;_<2;_++){var w=y[_],k=o.coerceRef(t,e,b,w,"","paper");if(o.coercePosition(e,b,c,k,w,.5),m){var M="a"+w,A=o.coerceRef(t,e,b,M,"pixel");"pixel"!==A&&A!==k&&(A=e[M]="pixel");var T="pixel"===A?x[_]:.4;o.coercePosition(e,b,c,A,M,T)}c(w+"anchor")}if(r.noneOrAll(t,e,["x","y"]),m&&(c("arrowcolor",g?e.bordercolor:a.defaultLine),c("arrowhead"),c("arrowsize"),c("arrowwidth",2*(g&&v||1)),c("standoff"),r.noneOrAll(t,e,["ax","ay"])),d){var L=c("xclick"),C=c("yclick");e._xclick=void 0===L?e.x:L,e._yclick=void 0===C?e.y:C}var z=c("hovertext");if(z){var S=c("hoverlabel.bgcolor",a.opacity(h)?a.rgb(h):a.defaultLine),O=c("hoverlabel.bordercolor",a.contrast(S));r.coerceFont(c,"hoverlabel.font",{family:i.HOVERFONT,size:i.HOVERFONTSIZE,color:O})}return c("captureevents",!!z),e}},{"../../lib":130,"../../plots/cartesian/axes":165,"../../plots/cartesian/constants":170,"../color":33,"./attributes":24}],23:[function(t,e,n){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0},{path:"M2,2V-2H-2V2Z",backoff:0}]},{}],24:[function(t,e,n){"use strict";var r=t("./arrow_paths"),a=t("../../plots/font_attributes"),o=t("../../plots/cartesian/constants"),i=t("../../lib/extend").extendFlat;e.exports={_isLinkedToArray:"annotation",visible:{valType:"boolean",dflt:!0},text:{valType:"string"},textangle:{valType:"angle",dflt:0},font:i({},a,{}),width:{valType:"number",min:1,dflt:null},height:{valType:"number",min:1,dflt:null},opacity:{valType:"number",min:0,max:1,dflt:1},align:{valType:"enumerated",values:["left","center","right"],dflt:"center"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)"},borderpad:{valType:"number",min:0,dflt:1},borderwidth:{valType:"number",min:0,dflt:1},showarrow:{valType:"boolean",dflt:!0},arrowcolor:{valType:"color"},arrowhead:{valType:"integer",min:0,max:r.length,dflt:1},arrowsize:{valType:"number",min:.3,dflt:1},arrowwidth:{valType:"number",min:.1},standoff:{valType:"number",min:0,dflt:0},ax:{valType:"any"},ay:{valType:"any"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.x.toString()]},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()]},xref:{valType:"enumerated",values:["paper",o.idRegex.x.toString()]},x:{valType:"any"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yref:{valType:"enumerated",values:["paper",o.idRegex.y.toString()]},y:{valType:"any"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1},xclick:{valType:"any"},yclick:{valType:"any"},hovertext:{valType:"string"},hoverlabel:{bgcolor:{valType:"color"},bordercolor:{valType:"color"},font:i({},a,{})},captureevents:{valType:"boolean"},_deprecated:{ref:{valType:"string"}}}},{"../../lib/extend":126,"../../plots/cartesian/constants":170,"../../plots/font_attributes":189,"./arrow_paths":23}],25:[function(t,e,n){"use strict";function r(t){var e=t._fullLayout;a.filterVisible(e.annotations).forEach(function(e){var n=o.getFromId(t,e.xref),r=o.getFromId(t,e.yref),a=3*e.arrowsize*e.arrowwidth||0;n&&n.autorange&&(e.axref===e.xref?(o.expand(n,[n.r2c(e.x)],{ppadplus:a,ppadminus:a}),o.expand(n,[n.r2c(e.ax)],{ppadplus:e._xpadplus,ppadminus:e._xpadminus})):o.expand(n,[n.r2c(e.x)],{ppadplus:Math.max(e._xpadplus,a),ppadminus:Math.max(e._xpadminus,a)})),r&&r.autorange&&(e.ayref===e.yref?(o.expand(r,[r.r2c(e.y)],{ppadplus:a,ppadminus:a}),o.expand(r,[r.r2c(e.ay)],{ppadplus:e._ypadplus,ppadminus:e._ypadminus})):o.expand(r,[r.r2c(e.y)],{ppadplus:Math.max(e._ypadplus,a),ppadminus:Math.max(e._ypadminus,a)}))})}var a=t("../../lib"),o=t("../../plots/cartesian/axes"),i=t("./draw").draw;e.exports=function(t){var e=t._fullLayout,n=a.filterVisible(e.annotations);if(n.length&&t._fullData.length){var l={};n.forEach(function(t){l[t.xref]=!0,l[t.yref]=!0});if(o.list(t).filter(function(t){return t.autorange&&l[t._id]}).length)return a.syncOrAsync([i,r],t)}}},{"../../lib":130,"../../plots/cartesian/axes":165,"./draw":29}],26:[function(t,e,n){"use strict";function r(t,e){var n=o(t,e);return n.on.length>0||n.explicitOff.length>0}function a(t,e){var n,r=o(t,e),a=r.on,l=r.off.concat(r.explicitOff),s={};if(a.length||l.length){for(n=0;n2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}R.selectAll("tspan.line").attr({y:0,x:0});var r=C.select(".annotation-math-group"),a=!r.empty(),f=h.bBox((a?r:R).node()),p=f.width,x=f.height,S=b.width||p,E=b.height||x,I=Math.round(S+2*O),j=Math.round(E+2*O);b._w=S,b._h=E;var F=!1;if(["x","y"].forEach(function(e){var r,a,o,i,l,f=b[e+"ref"]||e,d=b["a"+e+"ref"],h=c.getFromId(t,f),p=(A+("x"===e?0:-90))*Math.PI/180,g=I*Math.cos(p),v=j*Math.sin(p),m=Math.abs(g)+Math.abs(v),x=b[e+"anchor"],_=M[e];if(h){var w=h.r2fraction(b[e]);if((t._dragging||!h.autorange)&&(w<0||w>1)&&(d===f?((w=h.r2fraction(b["a"+e]))<0||w>1)&&(F=!0):F=!0,F))return;r=h._offset+h.r2p(b[e]),i=.5}else"x"===e?(o=b[e],r=y.l+y.w*o):(o=1-b[e],r=y.t+y.h*o),i=b.showarrow?.5:o;if(b.showarrow){_.head=r;var k=b["a"+e];l=g*n(.5,b.xanchor)-v*n(.5,b.yanchor),d===f?(_.tail=h._offset+h.r2p(k),a=l):(_.tail=r+k,a=l+k),_.text=_.tail+l;var T=s["x"===e?"width":"height"];if("paper"===f&&(_.head=u.constrain(_.head,1,T-1)),"pixel"===d){var L=-Math.max(_.tail-3,_.text),C=Math.min(_.tail+3,_.text)-T;L>0?(_.tail+=L,_.text+=L):C>0&&(_.tail-=C,_.text-=C)}}else l=m*n(i,x),a=l,_.text=r+l;b["_"+e+"padplus"]=m/2+a,b["_"+e+"padminus"]=m/2-a,b["_"+e+"size"]=m,b["_"+e+"shift"]=l}),F)return void C.remove();var q=0,B=0;if("left"!==b.align&&(q=(S-p)*("center"===b.align?.5:1)),"top"!==b.valign&&(B=(E-x)*("middle"===b.valign?.5:1)),a)r.select("svg").attr({x:O+q-1,y:O+B}).call(h.setClipUrl,D?_:null);else{var H=O+B-f.top,V=O+q-f.left;R.attr({x:V,y:H}).call(h.setClipUrl,D?_:null),R.selectAll("tspan.line").attr({y:H,x:V})}P.select("rect").call(h.setRect,O,O,S,E),N.call(h.setRect,z/2,z/2,I-z,j-z),C.call(h.setTranslate,Math.round(M.x.text-I/2),Math.round(M.y.text-j/2)),L.attr({transform:"rotate("+A+","+M.x.text+","+M.y.text+")"});var X="annotations["+e+"]",U=function(n,r){i.select(t).selectAll('.annotation-arrow-g[data-index="'+e+'"]').remove();var a=M.x.head,s=M.y.head,c=M.x.tail+n,f=M.y.tail+r,p=M.x.text+n,g=M.y.text+r,x=u.rotationXYMatrix(A,p,g),_=u.apply2DTransform(x),z=u.apply2DTransform2(x),S=+N.attr("width"),O=+N.attr("height"),D=p-.5*S,P=D+S,E=g-.5*O,R=E+O,I=[[D,E,D,R],[D,R,P,R],[P,R,P,E],[P,E,D,E]].map(z);if(!I.reduce(function(t,e){return t^!!o(a,s,a+1e6,s+1e6,e[0],e[1],e[2],e[3])},!1)){I.forEach(function(t){var e=o(c,f,a,s,t[0],t[1],t[2],t[3]);e&&(c=e.x,f=e.y)});var j=b.arrowwidth,F=b.arrowcolor,q=T.append("g").style({opacity:d.opacity(F)}).classed("annotation-arrow-g",!0).attr("data-index",String(e)),B=q.append("path").attr("d","M"+c+","+f+"L"+a+","+s).style("stroke-width",j+"px").call(d.stroke,d.rgb(F));if(m(B,b.arrowhead,"end",b.arrowsize,b.standoff),t._context.editable&&B.node().parentNode){var H=a,V=s;if(b.standoff){var U=Math.sqrt(Math.pow(a-c,2)+Math.pow(s-f,2));H+=b.standoff*(c-a)/U,V+=b.standoff*(f-s)/U}var Y,G,Z,W=q.append("path").classed("annotation",!0).classed("anndrag",!0).attr({"data-index":String(e),d:"M3,3H-3V-3H3ZM0,0L"+(c-H)+","+(f-V),transform:"translate("+H+","+V+")"}).style("stroke-width",j+6+"px").call(d.stroke,"rgba(0,0,0,0)").call(d.fill,"rgba(0,0,0,0)");v.init({element:W.node(),prepFn:function(){var t=h.getTranslate(C);G=t.x,Z=t.y,Y={},w&&w.autorange&&(Y[w._name+".autorange"]=!0),k&&k.autorange&&(Y[k._name+".autorange"]=!0)},moveFn:function(t,e){var n=_(G,Z),r=n[0]+t,o=n[1]+e;C.call(h.setTranslate,r,o),Y[X+".x"]=w?w.p2r(w.r2p(b.x)+t):(a+t-y.l)/y.w,Y[X+".y"]=k?k.p2r(k.r2p(b.y)+e):1-(s+e-y.t)/y.h,b.axref===b.xref&&(Y[X+".ax"]=w?w.p2r(w.r2p(b.ax)+t):(a+t-y.l)/y.w),b.ayref===b.yref&&(Y[X+".ay"]=k?k.p2r(k.r2p(b.ay)+e):1-(s+e-y.t)/y.h),q.attr("transform","translate("+t+","+e+")"),L.attr({transform:"rotate("+A+","+r+","+o+")"})},doneFn:function(e){if(e){l.relayout(t,Y);var n=document.querySelector(".js-notes-box-panel");n&&n.redraw(n.selectedObj)}}})}}};if(b.showarrow&&U(0,0),t._context.editable){var Y,G;v.init({element:C.node(),prepFn:function(){G=L.attr("transform"),Y={}},moveFn:function(t,e){var n="pointer";if(b.showarrow)b.axref===b.xref?Y[X+".ax"]=w.p2r(w.r2p(b.ax)+t):Y[X+".ax"]=b.ax+t,b.ayref===b.yref?Y[X+".ay"]=k.p2r(k.r2p(b.ay)+e):Y[X+".ay"]=b.ay+e,U(t,e);else{if(w)Y[X+".x"]=b.x+t/w._m;else{var r=b._xsize/y.w,a=b.x+b._xshift/y.w-r/2;Y[X+".x"]=v.align(a+t/y.w,r,0,1,b.xanchor)}if(k)Y[X+".y"]=b.y+e/k._m;else{var o=b._ysize/y.h,i=b.y-b._yshift/y.h-o/2;Y[X+".y"]=v.align(i-e/y.h,o,0,1,b.yanchor)}w&&k||(n=v.getCursor(w?.5:Y[X+".x"],k?.5:Y[X+".y"],b.xanchor,b.yanchor))}L.attr({transform:"translate("+t+","+e+")"+G}),g(C,n)},doneFn:function(e){if(g(C),e){l.relayout(t,Y);var n=document.querySelector(".js-notes-box-panel");n&&n.redraw(n.selectedObj)}}})}}var a=t.layout,s=t._fullLayout,y=t._fullLayout._size;s._infolayer.selectAll('.annotation[data-index="'+e+'"]').remove();var x=(a.annotations||[])[e],b=s.annotations[e],_="clip"+s._uid+"_ann"+e;if(!x||!1===b.visible)return void i.selectAll("#"+_).remove();var w=c.getFromId(t,b.xref),k=c.getFromId(t,b.yref),M={x:{},y:{}},A=+b.textangle||0,T=s._infolayer.append("g").classed("annotation",!0).attr("data-index",String(e)).style("opacity",b.opacity),L=T.append("g").classed("annotation-text-g",!0).attr("data-index",String(e)),C=L.append("g").style("pointer-events",b.captureevents?"all":null).call(g,"default").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",{index:e,annotation:x,fullAnnotation:b})});b.hovertext&&C.on("mouseover",function(){var e=b.hoverlabel,n=e.font,r=this.getBoundingClientRect(),a=t.getBoundingClientRect();f.loneHover({x0:r.left-a.left,x1:r.right-a.left,y:(r.top+r.bottom)/2-a.top,text:b.hovertext,color:e.bgcolor,borderColor:e.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:s._hoverlayer.node(),outerContainer:s._paper.node()})}).on("mouseout",function(){f.loneUnhover(s._hoverlayer.node())});var z=b.borderwidth,S=b.borderpad,O=z+S,N=C.append("rect").attr("class","bg").style("stroke-width",z+"px").call(d.stroke,b.bordercolor).call(d.fill,b.bgcolor),D=b.width||b.height,P=s._defs.select(".clips").selectAll("#"+_).data(D?[0]:[]);P.enter().append("clipPath").classed("annclip",!0).attr("id",_).append("rect"),P.exit().remove();var E=b.font,R=C.append("text").classed("annotation",!0).attr("data-unformatted",b.text).text(b.text);t._context.editable?R.call(p.makeEditable,C).call(n).on("edit",function(r){b.text=r,this.attr({"data-unformatted":b.text}),this.call(n);var a={};a["annotations["+e+"].text"]=b.text,w&&w.autorange&&(a[w._name+".autorange"]=!0),k&&k.autorange&&(a[k._name+".autorange"]=!0),l.relayout(t,a)}):R.call(n)}function o(t,e,n,r,a,o,i,l){var s=n-t,u=a-t,c=i-a,f=r-e,d=o-e,h=l-o,p=s*h-c*f;if(0===p)return null;var g=(u*h-c*d)/p,v=(u*f-s*d)/p;return v<0||v>1||g<0||g>1?null:{x:t+s*g,y:e+f*g}}var i=t("d3"),l=t("../../plotly"),s=t("../../plots/plots"),u=t("../../lib"),c=t("../../plots/cartesian/axes"),f=t("../../plots/cartesian/graph_interact"),d=t("../color"),h=t("../drawing"),p=t("../../lib/svg_text_utils"),g=t("../../lib/setcursor"),v=t("../dragelement"),m=t("./draw_arrow_head");e.exports={draw:r,drawOne:a}},{"../../lib":130,"../../lib/setcursor":145,"../../lib/svg_text_utils":147,"../../plotly":160,"../../plots/cartesian/axes":165,"../../plots/cartesian/graph_interact":174,"../../plots/plots":193,"../color":33,"../dragelement":54,"../drawing":56,"./draw_arrow_head":30,d3:15}],30:[function(t,e,n){"use strict";var r=t("d3"),a=t("fast-isnumeric"),o=t("../color"),i=t("../drawing"),l=t("./arrow_paths");e.exports=function(t,e,n,s,u){function c(){t.style("stroke-dasharray","0px,100px")}function f(n,a){h.path&&(e>5&&(a=0),r.select(d.parentElement).append("path").attr({class:t.attr("class"),d:h.path,transform:"translate("+n.x+","+n.y+")rotate("+180*a/Math.PI+")scale("+y+")"}).style({fill:x,opacity:b,"stroke-width":0}))}a(s)||(s=1);var d=t.node(),h=l[e||0];"string"==typeof n&&n||(n="end");var p,g,v,m,y=(i.getPx(t,"stroke-width")||1)*s,x=t.style("stroke")||o.defaultLine,b=t.style("stroke-opacity")||1,_=n.indexOf("start")>=0,w=n.indexOf("end")>=0,k=h.backoff*y+u;if("line"===d.nodeName){p={x:+t.attr("x1"),y:+t.attr("y1")},g={x:+t.attr("x2"),y:+t.attr("y2")};var M=p.x-g.x,A=p.y-g.y;if(v=Math.atan2(A,M),m=v+Math.PI,k){if(k*k>M*M+A*A)return void c();var T=k*Math.cos(v),L=k*Math.sin(v);_&&(p.x-=T,p.y-=L,t.attr({x1:p.x,y1:p.y})),w&&(g.x+=T,g.y+=L,t.attr({x2:g.x,y2:g.y}))}}else if("path"===d.nodeName){var C=d.getTotalLength(),z="";if(C=0))return t;if(3===i)r[i]>1&&(r[i]=1);else if(r[i]>=1)return t}var l=Math.round(255*r[0])+", "+Math.round(255*r[1])+", "+Math.round(255*r[2]);return a?"rgba("+l+", "+r[3]+")":"rgb("+l+")"}var a=t("tinycolor2"),o=t("fast-isnumeric"),i=e.exports={},l=t("./attributes");i.defaults=l.defaults;var s=i.defaultLine=l.defaultLine;i.lightLine=l.lightLine;var u=i.background=l.background;i.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},i.rgb=function(t){return i.tinyRGB(a(t))},i.opacity=function(t){return t?a(t).getAlpha():0},i.addOpacity=function(t,e){var n=a(t).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+e+")"},i.combine=function(t,e){var n=a(t).toRgb();if(1===n.a)return a(t).toRgbString();var r=a(e||u).toRgb(),o=1===r.a?r:{r:255*(1-r.a)+r.r*r.a,g:255*(1-r.a)+r.g*r.a,b:255*(1-r.a)+r.b*r.a},i={r:o.r*(1-n.a)+n.r*n.a,g:o.g*(1-n.a)+n.g*n.a,b:o.b*(1-n.a)+n.b*n.a};return a(i).toRgbString()},i.contrast=function(t,e,n){var r=a(t);return 1!==r.getAlpha()&&(r=a(i.combine(t,u))),(r.isDark()?e?r.lighten(e):u:n?r.darken(n):s).toString()},i.stroke=function(t,e){var n=a(e);t.style({stroke:i.tinyRGB(n),"stroke-opacity":n.getAlpha()})},i.fill=function(t,e){var n=a(e);t.style({fill:i.tinyRGB(n),"fill-opacity":n.getAlpha()})},i.clean=function(t){if(t&&"object"==typeof t){var e,n,a,o,l=Object.keys(t);for(e=0;el&&(o[1]-=(lt-l)/2):n.node()&&!n.classed("js-placeholder")&&(lt=h.bBox(e.node()).height),lt){if(lt+=5,"top"===_.titleside)K.domain[1]-=lt/T.h,o[1]*=-1;else{K.domain[0]+=lt/T.h;var u=Math.max(1,n.selectAll("tspan.line").size());o[1]+=(1-u)*l}e.attr("transform","translate("+o+")"),K.setScale()}}ot.selectAll(".cbfills,.cblines,.cbaxis").attr("transform","translate(0,"+Math.round(T.h*(1-K.domain[1]))+")");var f=ot.select(".cbfills").selectAll("rect.cbfill").data(S);f.enter().append("rect").classed("cbfill",!0).style("stroke","none"),f.exit().remove(),f.each(function(t,e){var n=[0===e?C[0]:(S[e]+S[e-1])/2,e===S.length-1?C[1]:(S[e]+S[e+1])/2].map(K.c2p).map(Math.round);e!==S.length-1&&(n[1]+=n[1]>n[0]?1:-1);var o=N(t).replace("e-",""),i=a(o).toHexString();r.select(this).attr({x:G,width:Math.max(q,2),y:r.min(n),height:Math.max(r.max(n)-r.min(n),2),fill:i})});var d=ot.select(".cblines").selectAll("path.cbline").data(_.line.color&&_.line.width?z:[]);return d.enter().append("path").classed("cbline",!0),d.exit().remove(),d.each(function(t){r.select(this).attr("d","M"+G+","+(Math.round(K.c2p(t))+_.line.width/2%1)+"h"+q).call(h.lineGroupStyle,_.line.width,O(t),_.line.dash)}),K._axislayer.selectAll("g."+K._id+"tick,path").remove(),K._pos=G+q+(_.outlinewidth||0)/2-("outside"===_.ticks?1:0),K.side="right",c.syncOrAsync([function(){return s.doTicks(t,K,!0)},function(){if(-1===["top","bottom"].indexOf(_.titleside)){var e=K.titlefont.size,n=K._offset+K._length/2,a=T.l+(K.position||0)*T.w+("right"===K.side?10+e*(K.showticklabels?1:.5):-10-e*(K.showticklabels?.5:0));k("h"+K._id+"title",{avoid:{selection:r.select(t).selectAll("g."+K._id+"tick"),side:_.titleside,offsetLeft:T.l,offsetTop:T.t,maxShift:A.width},attributes:{x:a,y:n,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}}])}function k(e,n){var r,a=b();r=l.traceIs(a,"markerColorscale")?"marker.colorbar.title":"colorbar.title";var o={propContainer:K,propName:r,traceIndex:a.index,dfltName:"colorscale",containerGroup:ot.select(".cbtitle")},i="h"===e.charAt(0)?e.substr(1):"h"+e;ot.selectAll("."+i+",."+i+"-math-group").remove(),g.draw(t,e,f(o,n||{}))}function M(){var n=q+_.outlinewidth/2+h.bBox(K._axislayer.node()).width;if(I=it.select("text"),I.node()&&!I.classed("js-placeholder")){var r,a=it.select(".h"+K._id+"title-math-group").node();r=a&&-1!==["top","bottom"].indexOf(_.titleside)?h.bBox(a).width:h.bBox(it.node()).right-G-T.l,n=Math.max(n,r)}var o=2*_.xpad+n+_.borderwidth+_.outlinewidth/2,l=$-Q;ot.select(".cbbg").attr({x:G-_.xpad-(_.borderwidth+_.outlinewidth)/2,y:Q-U,width:Math.max(o,2),height:Math.max(l+2*U,2)}).call(p.fill,_.bgcolor).call(p.stroke,_.bordercolor).style({"stroke-width":_.borderwidth}),ot.selectAll(".cboutline").attr({x:G,y:Q+_.ypad+("top"===_.titleside?lt:0),width:Math.max(q,2),height:Math.max(l-2*_.ypad-lt,2)}).call(p.stroke,_.outlinecolor).style({fill:"None","stroke-width":_.outlinewidth});var s=({center:.5,right:1}[_.xanchor]||0)*o;ot.attr("transform","translate("+(T.l-s)+","+T.t+")"),i.autoMargin(t,e,{x:_.x,y:_.y,l:o*({right:1,center:.5}[_.xanchor]||0),r:o*({left:1,center:.5}[_.xanchor]||0),t:l*({bottom:1,middle:.5}[_.yanchor]||0),b:l*({top:1,middle:.5}[_.yanchor]||0)})}var A=t._fullLayout,T=A._size;if("function"!=typeof _.fillcolor&&"function"!=typeof _.line.color)return void A._infolayer.selectAll("g."+e).remove();var L,C=r.extent(("function"==typeof _.fillcolor?_.fillcolor:_.line.color).domain()),z=[],S=[],O="function"==typeof _.line.color?_.line.color:function(){return _.line.color},N="function"==typeof _.fillcolor?_.fillcolor:function(){return _.fillcolor},D=_.levels.end+_.levels.size/100,P=_.levels.size,E=1.001*C[0]-.001*C[1],R=1.001*C[1]-.001*C[0];for(L=_.levels.start;(L-D)*P<0;L+=P)L>E&&LC[0]&&L1){var at=Math.pow(10,Math.floor(Math.log(rt)/Math.LN10));et*=at*c.roundUp(rt/at,[2,5,10]),(Math.abs(_.levels.start)/_.levels.size+1e-6)%1<2e-6&&(K.tick0=0)}K.dtick=et}K.domain=[W+Y,W+V-Y],K.setScale();var ot=A._infolayer.selectAll("g."+e).data([0]);ot.enter().append("g").classed(e,!0).each(function(){var t=r.select(this);t.append("rect").classed("cbbg",!0),t.append("g").classed("cbfills",!0),t.append("g").classed("cblines",!0),t.append("g").classed("cbaxis",!0).classed("crisp",!0),t.append("g").classed("cbtitleunshift",!0).append("g").classed("cbtitle",!0),t.append("rect").classed("cboutline",!0),t.select(".cbtitle").datum(0)}),ot.attr("transform","translate("+Math.round(T.l)+","+Math.round(T.t)+")");var it=ot.select(".cbtitleunshift").attr("transform","translate(-"+Math.round(T.l)+",-"+Math.round(T.t)+")");K._axislayer=ot.select(".cbaxis");var lt=0;if(-1!==["top","bottom"].indexOf(_.titleside)){var st,ut=T.l+(_.x+X)*T.w,ct=K.titlefont.size;st="top"===_.titleside?(1-(W+V-Y))*T.h+T.t+3+.75*ct:(1-(W+Y))*T.h+T.t-3-.25*ct,k(K._id+"title",{attributes:{x:ut,y:st,"text-anchor":"start"}})}var ft=c.syncOrAsync([i.previousPromises,w,i.previousPromises,M],t);if(ft&&ft.then&&(t._promises||[]).push(ft),t._context.editable){var dt,ht,pt;u.init({element:ot.node(),prepFn:function(){dt=ot.attr("transform"),d(ot)},moveFn:function(t,e){ot.attr("transform",dt+" translate("+t+","+e+")"),ht=u.align(Z+t/T.w,B,0,1,_.xanchor),pt=u.align(W-e/T.h,V,0,1,_.yanchor);var n=u.getCursor(ht,pt,_.xanchor,_.yanchor);d(ot,n)},doneFn:function(e){d(ot),e&&void 0!==ht&&void 0!==pt&&o.restyle(t,{"colorbar.x":ht,"colorbar.y":pt},b().index)}})}return ft}function b(){var n,r,a=e.substr(2);for(n=0;n=0?a.Reds:a.Blues,s.colorscale=g,l.reversescale&&(g=o(g)),l.colorscale=g)}},{"../../lib":130,"./flip_scale":44,"./scales":51}],40:[function(t,e,n){"use strict";var r=t("./attributes"),a=t("../../lib/extend").extendDeep;t("./scales.js");e.exports=function(t){return{color:{valType:"color",arrayOk:!0},colorscale:a({},r.colorscale,{}),cauto:a({},r.zauto,{}),cmax:a({},r.zmax,{}),cmin:a({},r.zmin,{}),autocolorscale:a({},r.autocolorscale,{}),reversescale:a({},r.reversescale,{})}}},{"../../lib/extend":126,"./attributes":38,"./scales.js":51}],41:[function(t,e,n){"use strict";var r=t("./scales");e.exports=r.RdBu},{"./scales":51}],42:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../../lib"),o=t("../colorbar/has_colorbar"),i=t("../colorbar/defaults"),l=t("./is_valid_scale"),s=t("./flip_scale");e.exports=function(t,e,n,u,c){var f=c.prefix,d=c.cLetter,h=f.slice(0,f.length-1),p=f?a.nestedProperty(t,h).get()||{}:t,g=f?a.nestedProperty(e,h).get()||{}:e,v=p[d+"min"],m=p[d+"max"],y=p.colorscale;u(f+d+"auto",!(r(v)&&r(m)&&v=0;a--,o++)e=t[a],r[o]=[1-e[0],e[1]];return r}},{}],45:[function(t,e,n){"use strict";var r=t("./scales"),a=t("./default_scale"),o=t("./is_valid_scale_array");e.exports=function(t,e){function n(){try{t=r[t]||JSON.parse(t)}catch(n){t=e}}return e||(e=a),t?("string"==typeof t&&(n(),"string"==typeof t&&n()),o(t)?t:e):e}},{"./default_scale":41,"./is_valid_scale_array":49,"./scales":51}],46:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../../lib"),o=t("./is_valid_scale");e.exports=function(t,e){var n=e?a.nestedProperty(t,e).get()||{}:t,i=n.color,l=!1;if(Array.isArray(i))for(var s=0;s4/3-l?i:l}},{}],53:[function(t,e,n){"use strict";var r=t("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,n,o){return t="left"===n?0:"center"===n?1:"right"===n?2:r.constrain(Math.floor(3*t),0,2),e="bottom"===o?0:"middle"===o?1:"top"===o?2:r.constrain(Math.floor(3*e),0,2),a[e][t]}},{"../../lib":130}],54:[function(t,e,n){"use strict";function r(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function a(t){t._dragging=!1,t._replotPending&&o.plot(t)}var o=t("../../plotly"),i=t("../../lib"),l=t("../../plots/cartesian/constants"),s=t("../../constants/interactions"),u=e.exports={};u.align=t("./align"),u.getCursor=t("./cursor");var c=t("./unhover");u.unhover=c.wrapped,u.unhoverRaw=c.raw,u.init=function(t){function e(e){return t.element.onmousemove=g,v._dragged=!1,v._dragging=!0,c=e.clientX,f=e.clientY,p=e.target,d=(new Date).getTime(),d-v._mouseDownTimey&&(m=Math.max(m-1,1)),t.doneFn&&t.doneFn(v._dragged,m,e),!v._dragged){var n;try{n=new MouseEvent("click",e)}catch(t){n=document.createEvent("MouseEvents"),n.initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}p.dispatchEvent(n)}return a(v),v._dragged=!1,i.pauseEvent(e)}var c,f,d,h,p,g,v=i.getPlotDiv(t.element)||{},m=1,y=s.DBLCLICKDELAY;v._mouseDownTime||(v._mouseDownTime=0),g=t.element.onmousemove,t.setCursor&&(t.element.onmousemove=t.setCursor),t.element.onmousedown=e,t.element.style.pointerEvents="all"},u.coverSlip=r},{"../../constants/interactions":116,"../../lib":130,"../../plotly":160,"../../plots/cartesian/constants":170,"./align":52,"./cursor":53,"./unhover":55}],55:[function(t,e,n){"use strict";var r=t("../../lib/events"),a=e.exports={};a.wrapped=function(t,e,n){"string"==typeof t&&(t=document.getElementById(t)),t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),a.raw(t,e,n)},a.raw=function(t,e){var n=t._fullLayout,a=t._hoverdata;e||(e={}),e.target&&!1===r.triggerHandler(t,"plotly_beforehover",e)||(n._hoverlayer.selectAll("g").remove(),t._hoverdata=void 0,e.target&&a&&t.emit("plotly_unhover",{event:e,points:a}))}},{"../../lib/events":125}],56:[function(t,e,n){"use strict";function r(t,e,n,r,a,o,i){if(l.traceIs(n,"symbols")){var u=p(n);e.attr("d",function(t){var e;e="various"===t.ms||"various"===o.size?3:h.isBubble(n)?u(t.ms):(o.size||6)/2,t.mrc=e;var r=g.symbolNumber(t.mx||o.symbol)||0,a=r%100;return t.om=r%200>=100,g.symbolFuncs[a](e)+(r>=200?y:"")}).style("opacity",function(t){return(t.mo+1||o.opacity+1)-1})}var c,f,d;t.so?(d=i.outlierwidth,f=i.outliercolor,c=o.outliercolor):(d=(t.mlw+1||i.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,f="mlc"in t?t.mlcc=a(t.mlc):Array.isArray(i.color)?s.defaultLine:i.color,c="mc"in t?t.mcc=r(t.mc):Array.isArray(o.color)?s.defaultLine:o.color||"rgba(0,0,0,0)"),t.om?e.call(s.stroke,c).style({"stroke-width":(d||1)+"px",fill:"none"}):(e.style("stroke-width",d+"px").call(s.fill,c),d&&e.call(s.stroke,f))}function a(t,e,n,r){var a=t[0]-e[0],i=t[1]-e[1],l=n[0]-e[0],s=n[1]-e[1],u=Math.pow(a*a+i*i,b/2),c=Math.pow(l*l+s*s,b/2),f=(c*c*a-u*u*l)*r,d=(c*c*i-u*u*s)*r,h=3*c*(u+c),p=3*u*(u+c);return[[o.round(e[0]+(h&&f/h),2),o.round(e[1]+(h&&d/h),2)],[o.round(e[0]-(p&&f/p),2),o.round(e[1]-(p&&d/p),2)]]}var o=t("d3"),i=t("fast-isnumeric"),l=t("../../registry"),s=t("../color"),u=t("../colorscale"),c=t("../../lib"),f=t("../../lib/svg_text_utils"),d=t("../../constants/xmlns_namespaces"),h=t("../../traces/scatter/subtypes"),p=t("../../traces/scatter/make_bubble_size_func"),g=e.exports={};g.font=function(t,e,n,r){e&&e.family&&(r=e.color,n=e.size,e=e.family),e&&t.style("font-family",e),n+1&&t.style("font-size",n+"px"),r&&t.call(s.fill,r)},g.setPosition=function(t,e,n){t.attr("x",e).attr("y",n)},g.setSize=function(t,e,n){t.attr("width",e).attr("height",n)},g.setRect=function(t,e,n,r,a){t.call(g.setPosition,e,n).call(g.setSize,r,a)},g.translatePoint=function(t,e,n,r){var a=t.xp||n.c2p(t.x),o=t.yp||r.c2p(t.y);i(a)&&i(o)&&e.node()?"text"===e.node().nodeName?e.attr("x",a).attr("y",o):e.attr("transform","translate("+a+","+o+")"):e.remove()},g.translatePoints=function(t,e,n,r){t.each(function(t){var a=o.select(this);g.translatePoint(t,a,e,n,r)})},g.getPx=function(t,e){return Number(t.style(e).replace(/px$/,""))},g.crispRound=function(t,e,n){return e&&i(e)?t._context.staticPlot?e:e<1?1:Math.round(e):n||0},g.singleLineStyle=function(t,e,n,r,a){e.style("fill","none");var o=(((t||[])[0]||{}).trace||{}).line||{},i=n||o.width||0,l=a||o.dash||"";s.stroke(e,r||o.color),g.dashLine(e,l,i)},g.lineGroupStyle=function(t,e,n,r){t.style("fill","none").each(function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},i=e||a.width||0,l=r||a.dash||"";o.select(this).call(s.stroke,n||a.color).call(g.dashLine,l,i)})},g.dashLine=function(t,e,n){n=+n||0;var r=Math.max(n,3);"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t.style({"stroke-dasharray":e,"stroke-width":n+"px"})},g.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(e){var n=o.select(this);try{n.call(s.fill,e[0].trace.fillcolor)}catch(e){c.error(e,t),n.remove()}})};var v=t("./symbol_defs");g.symbolNames=[],g.symbolFuncs=[],g.symbolNeedLines={},g.symbolNoDot={},g.symbolList=[],Object.keys(v).forEach(function(t){var e=v[t];g.symbolList=g.symbolList.concat([e.n,t,e.n+100,t+"-open"]),g.symbolNames[e.n]=t,g.symbolFuncs[e.n]=e.f,e.needLine&&(g.symbolNeedLines[e.n]=!0),e.noDot?g.symbolNoDot[e.n]=!0:g.symbolList=g.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"])});var m=g.symbolNames.length,y="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";g.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=g.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=m||t>=400?0:Math.floor(Math.max(t,0))},g.singlePointStyle=function(t,e,n){var a=n.marker,o=a.line;r(t,e,n,g.tryColorscale(a,""),g.tryColorscale(a,"line"),a,o)},g.pointStyle=function(t,e){if(t.size()){var n=e.marker,r=g.tryColorscale(n,""),a=g.tryColorscale(n,"line");t.each(function(t){g.singlePointStyle(t,o.select(this),e,r,a)})}},g.tryColorscale=function(t,e){var n=e?c.nestedProperty(t,e).get():t,r=n.colorscale,a=n.color;return r&&Array.isArray(a)?u.makeColorScaleFunc(u.extractScale(r,n.cmin,n.cmax)):c.identity};var x={start:1,end:-1,middle:0,bottom:1,top:-1};g.textPointStyle=function(t,e){t.each(function(t){var n=o.select(this),r=t.tx||e.text;if(!r||Array.isArray(r))return void n.remove();var a=t.tp||e.textposition,l=-1!==a.indexOf("top")?"top":-1!==a.indexOf("bottom")?"bottom":"middle",s=-1!==a.indexOf("left")?"end":-1!==a.indexOf("right")?"start":"middle",u=t.ts||e.textfont.size,c=t.mrc?t.mrc/.8+1:0;u=i(u)&&u>0?u:0,n.call(g.font,t.tf||e.textfont.family,u,t.tc||e.textfont.color).attr("text-anchor",s).text(r).call(f.convertToTspans);var d=o.select(this.parentNode),h=n.selectAll("tspan.line"),p=1.3*((h[0].length||1)-1)+1,v=x[s]*c,m=.75*u+x[l]*c+(x[l]-1)*p*u/2;d.attr("transform","translate("+v+","+m+")"),p>1&&h.attr({x:n.attr("x"),y:n.attr("y")})})};var b=.5;g.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var n,r="M"+t[0],o=[];for(n=1;n=1e4&&(o.selectAll("[data-bb]").attr("data-bb",null),k=[]),t.setAttribute("data-bb",k.length),k.push(s),c.extendFlat({},s)},g.setClipUrl=function(t,e){if(!e)return void t.attr("clip-path",null);var n="#"+e,r=o.select("base");r.size()&&r.attr("href")&&(n=window.location.href.split("#")[0]+n),t.attr("clip-path","url("+n+")")},g.getTranslate=function(t){var e=t.attr?"attr":"getAttribute",n=t[e]("transform")||"",r=n.replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,n){return[e,n].join(" ")}).split(" ");return{x:+r[0]||0,y:+r[1]||0}},g.setTranslate=function(t,e,n){var r=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",o=t[r]("transform")||"";return e=e||0,n=n||0,o=o.replace(/(\btranslate\(.*?\);?)/,"").trim(),o+=" translate("+e+", "+n+")",o=o.trim(),t[a]("transform",o),o},g.getScale=function(t){var e=t.attr?"attr":"getAttribute",n=t[e]("transform")||"",r=n.replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,n){return[e,n].join(" ")}).split(" ");return{x:+r[0]||1,y:+r[1]||1}},g.setScale=function(t,e,n){var r=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",o=t[r]("transform")||"";return e=e||1,n=n||1,o=o.replace(/(\bscale\(.*?\);?)/,"").trim(),o+=" scale("+e+", "+n+")",o=o.trim(),t[a]("transform",o),o},g.setPointGroupScale=function(t,e,n){var r,a,o;return e=e||1,n=n||1,a=1===e&&1===n?"":" scale("+e+","+n+")",o=/\s*sc.*/,t.each(function(){r=(this.getAttribute("transform")||"").replace(o,""),r+=a,r=r.trim(),this.setAttribute("transform",r)}),a}},{"../../constants/xmlns_namespaces":119,"../../lib":130,"../../lib/svg_text_utils":147,"../../registry":200,"../../traces/scatter/make_bubble_size_func":235,"../../traces/scatter/subtypes":240,"../color":33,"../colorscale":47,"./symbol_defs":57,d3:15,"fast-isnumeric":18}],57:[function(t,e,n){"use strict";var r=t("d3");e.exports={circle:{n:0,f:function(t){var e=r.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=r.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=r.round(.4*t,2),n=r.round(1.2*t,2);return"M"+n+","+e+"H"+e+"V"+n+"H-"+e+"V"+e+"H-"+n+"V-"+e+"H-"+e+"V-"+n+"H"+e+"V-"+e+"H"+n+"Z"}},x:{n:4,f:function(t){var e=r.round(.8*t/Math.sqrt(2),2),n="l"+e+","+e,a="l"+e+",-"+e,o="l-"+e+",-"+e,i="l-"+e+","+e;return"M0,"+e+n+a+o+a+o+i+o+i+n+i+n+"Z"}},"triangle-up":{n:5,f:function(t){var e=r.round(2*t/Math.sqrt(3),2);return"M-"+e+","+r.round(t/2,2)+"H"+e+"L0,-"+r.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=r.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+r.round(t/2,2)+"H"+e+"L0,"+r.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=r.round(2*t/Math.sqrt(3),2);return"M"+r.round(t/2,2)+",-"+e+"V"+e+"L-"+r.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=r.round(2*t/Math.sqrt(3),2);return"M-"+r.round(t/2,2)+",-"+e+"V"+e+"L"+r.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=r.round(.6*t,2),n=r.round(1.2*t,2);return"M-"+n+",-"+e+"H"+e+"V"+n+"Z"}},"triangle-se":{n:10,f:function(t){var e=r.round(.6*t,2),n=r.round(1.2*t,2);return"M"+e+",-"+n+"V"+e+"H-"+n+"Z"}},"triangle-sw":{n:11,f:function(t){var e=r.round(.6*t,2),n=r.round(1.2*t,2);return"M"+n+","+e+"H-"+e+"V-"+n+"Z"}},"triangle-nw":{n:12,f:function(t){var e=r.round(.6*t,2),n=r.round(1.2*t,2);return"M-"+e+","+n+"V-"+e+"H"+n+"Z"}},pentagon:{n:13,f:function(t){var e=r.round(.951*t,2),n=r.round(.588*t,2),a=r.round(-t,2),o=r.round(-.309*t,2);return"M"+e+","+o+"L"+n+","+r.round(.809*t,2)+"H-"+n+"L-"+e+","+o+"L0,"+a+"Z"}},hexagon:{n:14,f:function(t){var e=r.round(t,2),n=r.round(t/2,2),a=r.round(t*Math.sqrt(3)/2,2);return"M"+a+",-"+n+"V"+n+"L0,"+e+"L-"+a+","+n+"V-"+n+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=r.round(t,2),n=r.round(t/2,2),a=r.round(t*Math.sqrt(3)/2,2);return"M-"+n+","+a+"H"+n+"L"+e+",0L"+n+",-"+a+"H-"+n+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=r.round(.924*t,2),n=r.round(.383*t,2);return"M-"+n+",-"+e+"H"+n+"L"+e+",-"+n+"V"+n+"L"+n+","+e+"H-"+n+"L-"+e+","+n+"V-"+n+"Z"}},star:{n:17,f:function(t){ +var e=1.4*t,n=r.round(.225*e,2),a=r.round(.951*e,2),o=r.round(.363*e,2),i=r.round(.588*e,2),l=r.round(-e,2),s=r.round(-.309*e,2),u=r.round(.118*e,2),c=r.round(.809*e,2);return"M"+n+","+s+"H"+a+"L"+o+","+u+"L"+i+","+c+"L0,"+r.round(.382*e,2)+"L-"+i+","+c+"L-"+o+","+u+"L-"+a+","+s+"H-"+n+"L0,"+l+"Z"}},hexagram:{n:18,f:function(t){var e=r.round(.66*t,2),n=r.round(.38*t,2),a=r.round(.76*t,2);return"M-"+a+",0l-"+n+",-"+e+"h"+a+"l"+n+",-"+e+"l"+n+","+e+"h"+a+"l-"+n+","+e+"l"+n+","+e+"h-"+a+"l-"+n+","+e+"l-"+n+",-"+e+"h-"+a+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=r.round(t*Math.sqrt(3)*.8,2),n=r.round(.8*t,2),a=r.round(1.6*t,2),o=r.round(4*t,2),i="A "+o+","+o+" 0 0 1 ";return"M-"+e+","+n+i+e+","+n+i+"0,-"+a+i+"-"+e+","+n+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=r.round(t*Math.sqrt(3)*.8,2),n=r.round(.8*t,2),a=r.round(1.6*t,2),o=r.round(4*t,2),i="A "+o+","+o+" 0 0 1 ";return"M"+e+",-"+n+i+"-"+e+",-"+n+i+"0,"+a+i+e+",-"+n+"Z"}},"star-square":{n:21,f:function(t){var e=r.round(1.1*t,2),n=r.round(2*t,2),a="A "+n+","+n+" 0 0 1 ";return"M-"+e+",-"+e+a+"-"+e+","+e+a+e+","+e+a+e+",-"+e+a+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=r.round(1.4*t,2),n=r.round(1.9*t,2),a="A "+n+","+n+" 0 0 1 ";return"M-"+e+",0"+a+"0,"+e+a+e+",0"+a+"0,-"+e+a+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=r.round(.7*t,2),n=r.round(1.4*t,2);return"M0,"+n+"L"+e+",0L0,-"+n+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=r.round(1.4*t,2),n=r.round(.7*t,2);return"M0,"+n+"L"+e+",0L0,-"+n+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=r.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=r.round(t,2),n=r.round(t/Math.sqrt(2),2);return"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=r.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=r.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=r.round(1.3*t,2),n=r.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=r.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0},"x-thin":{n:34,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},asterisk:{n:35,f:function(t){var e=r.round(1.2*t,2),n=r.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n},needLine:!0,noDot:!0},hash:{n:36,f:function(t){var e=r.round(t/2,2),n=r.round(t,2);return"M"+e+","+n+"V-"+n+"m-"+n+",0V"+n+"M"+n+","+e+"H-"+n+"m0,-"+n+"H"+n},needLine:!0},"y-up":{n:37,f:function(t){var e=r.round(1.2*t,2),n=r.round(1.6*t,2),a=r.round(.8*t,2);return"M-"+e+","+a+"L0,0M"+e+","+a+"L0,0M0,-"+n+"L0,0"},needLine:!0,noDot:!0},"y-down":{n:38,f:function(t){var e=r.round(1.2*t,2),n=r.round(1.6*t,2),a=r.round(.8*t,2);return"M-"+e+",-"+a+"L0,0M"+e+",-"+a+"L0,0M0,"+n+"L0,0"},needLine:!0,noDot:!0},"y-left":{n:39,f:function(t){var e=r.round(1.2*t,2),n=r.round(1.6*t,2),a=r.round(.8*t,2);return"M"+a+","+e+"L0,0M"+a+",-"+e+"L0,0M-"+n+",0L0,0"},needLine:!0,noDot:!0},"y-right":{n:40,f:function(t){var e=r.round(1.2*t,2),n=r.round(1.6*t,2),a=r.round(.8*t,2);return"M-"+a+","+e+"L0,0M-"+a+",-"+e+"L0,0M"+n+",0L0,0"},needLine:!0,noDot:!0},"line-ew":{n:41,f:function(t){var e=r.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0},"line-ns":{n:42,f:function(t){var e=r.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0},"line-ne":{n:43,f:function(t){var e=r.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},"line-nw":{n:44,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0}}},{d3:15}],58:[function(t,e,n){"use strict";e.exports={visible:{valType:"boolean"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"]},symmetric:{valType:"boolean"},array:{valType:"data_array"},arrayminus:{valType:"data_array"},value:{valType:"number",min:0,dflt:10},valueminus:{valType:"number",min:0,dflt:10},traceref:{valType:"integer",min:0,dflt:0},tracerefminus:{valType:"integer",min:0,dflt:0},copy_ystyle:{valType:"boolean"},copy_zstyle:{valType:"boolean"},color:{valType:"color"},thickness:{valType:"number",min:0,dflt:2},width:{valType:"number",min:0},_deprecated:{opacity:{valType:"number"}}}},{}],59:[function(t,e,n){"use strict";function r(t,e,n,r){var o=e["error_"+r]||{},s=o.visible&&-1!==["linear","log"].indexOf(n.type),u=[];if(s){for(var c=l(o),f=0;f0;t.each(function(t){var e,f=t[0].trace,d=f.error_x||{},h=f.error_y||{};f.ids&&(e=function(t){return t.id});var p=i.hasMarkers(f)&&f.marker.maxdisplayed>0;if(h.visible||d.visible){var g=a.select(this).selectAll("g.errorbar").data(t,e);g.exit().remove(),g.style("opacity",1);var v=g.enter().append("g").classed("errorbar",!0);c&&v.style("opacity",0).transition().duration(n.duration).style("opacity",1),g.each(function(t){var e=a.select(this),i=r(t,s,u);if(!p||t.vis){var f;if(h.visible&&o(i.x)&&o(i.yh)&&o(i.ys)){var g=h.width;f="M"+(i.x-g)+","+i.yh+"h"+2*g+"m-"+g+",0V"+i.ys,i.noYS||(f+="m-"+g+",0h"+2*g);var v=e.select("path.yerror");l=!v.size(),l?v=e.append("path").classed("yerror",!0):c&&(v=v.transition().duration(n.duration).ease(n.easing)),v.attr("d",f)}if(d.visible&&o(i.y)&&o(i.xh)&&o(i.xs)){var m=(d.copy_ystyle?h:d).width;f="M"+i.xh+","+(i.y-m)+"v"+2*m+"m0,-"+m+"H"+i.xs,i.noXS||(f+="m0,-"+m+"v"+2*m);var y=e.select("path.xerror");l=!y.size(),l?y=e.append("path").classed("xerror",!0):c&&(y=y.transition().duration(n.duration).ease(n.easing)),y.attr("d",f)}}})}})}},{"../../traces/scatter/subtypes":240,d3:15,"fast-isnumeric":18}],64:[function(t,e,n){"use strict";var r=t("d3"),a=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,n=e.error_y||{},o=e.error_x||{},i=r.select(this);i.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(a.stroke,n.color),o.copy_ystyle&&(o=n),i.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(a.stroke,o.color)})}},{"../color":33,d3:15}],65:[function(t,e,n){"use strict";var r=t("../../plots/cartesian/constants");e.exports={_isLinkedToArray:"image",visible:{valType:"boolean",dflt:!0},source:{valType:"string"},layer:{valType:"enumerated",values:["below","above"],dflt:"above"},sizex:{valType:"number",dflt:0},sizey:{valType:"number",dflt:0},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain"},opacity:{valType:"number",min:0,max:1,dflt:1},x:{valType:"any",dflt:0},y:{valType:"any",dflt:0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top"},xref:{valType:"enumerated",values:["paper",r.idRegex.x.toString()],dflt:"paper"},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],dflt:"paper"}}},{"../../plots/cartesian/constants":170}],66:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../../lib/to_log_range");e.exports=function(t,e,n,o){e=e||{};var i="log"===n&&"linear"===e.type,l="linear"===n&&"log"===e.type;if(i||l)for(var s,u,c=t._fullLayout.images,f=e._id.charAt(0),d=0;d=2/3},n.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},n.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3},n.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],71:[function(t,e,n){"use strict";var r=t("../../plots/font_attributes"),a=t("../color/attributes"),o=t("../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.defaultLine},borderwidth:{valType:"number",min:0,dflt:0},font:o({},r,{}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"]},tracegroupgap:{valType:"number",min:0,dflt:10},x:{valType:"number",min:-2,max:3,dflt:1.02},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"}}},{"../../lib/extend":126,"../../plots/font_attributes":189,"../color/attributes":32}],72:[function(t,e,n){"use strict";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4}},{}],73:[function(t,e,n){"use strict";var r=t("../../registry"),a=t("../../lib"),o=t("./attributes"),i=t("../../plots/layout_attributes"),l=t("./helpers");e.exports=function(t,e,n){function s(t,e){return a.coerce(h,p,o,t,e)}for(var u,c,f,d,h=t.legend||{},p=e.legend={},g=0,v="normal",m=0;m1)){if(s("bgcolor",e.paper_bgcolor),s("bordercolor"),s("borderwidth"),a.coerceFont(s,"font",e.font),s("orientation"),"h"===p.orientation){var x=t.xaxis;x&&x.rangeslider&&x.rangeslider.visible?(u=0,f="left",c=1.1,d="bottom"):(u=0,f="left",c=-.1,d="top")}s("traceorder",v),l.isGrouped(e.legend)&&s("tracegroupgap"),s("x",u),s("xanchor",f),s("y",c),s("yanchor",d),a.noneOrAll(h,p,["x","y"])}}},{"../../lib":130,"../../plots/layout_attributes":191,"../../registry":200,"./attributes":71,"./helpers":76}],74:[function(t,e,n){"use strict";function r(t,e){function n(n){y.convertToTspans(n,function(){n.selectAll("tspan.line").attr({x:n.attr("x")}),t.call(i,e)})}var r=t.data()[0][0],a=e._fullLayout,o=r.trace,l=p.traceIs(o,"pie"),s=o.index,u=l?r.label:o.name,c=t.selectAll("text.legendtext").data([0]);c.enter().append("text").classed("legendtext",!0),c.attr({x:40,y:0,"data-unformatted":u}).style("text-anchor","start").classed("user-select-none",!0).call(v.font,a.legend.font).text(u),e._context.editable&&!l?c.call(y.makeEditable).call(n).on("edit",function(t){this.attr({"data-unformatted":t}),this.text(t).call(n),this.text()||(t=" ");var a,o=r.trace._fullInput||{};if(-1!==["ohlc","candlestick"].indexOf(o.type)){var i=r.trace.transforms;a=i[i.length-1].direction+".name"}else a="name";f.restyle(e,a,t,s)}):c.call(n)}function a(t,e){var n,r=1,a=t.selectAll("rect").data([0]);a.enter().append("rect").classed("legendtoggle",!0).style("cursor","pointer").attr("pointer-events","all").call(m.fill,"rgba(0,0,0,0)"),a.on("mousedown",function(){n=(new Date).getTime(),n-e._legendMouseDownTimeT&&(r=Math.max(r-1,1)),1===r?n._clickTimeout=setTimeout(function(){o(t,e,r)},T):2===r&&(n._clickTimeout&&clearTimeout(n._clickTimeout),e._legendMouseDownTime=0,o(t,e,r))}})}function o(t,e,n){if(!e._dragged&&!e._editing){var r,a,o=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],i=t.data()[0][0],l=e._fullData,s=i.trace,u=s.legendgroup,c=[];if(1===n&&A&&e.data&&e._context.showTips?(d.notifier("Double click on legend to isolate individual trace","long"),A=!1):A=!1,p.traceIs(s,"pie")){var h=i.label,g=o.indexOf(h);1===n?-1===g?o.push(h):o.splice(g,1):2===n&&(o=[],e.calcdata[0].forEach(function(t){h!==t.label&&o.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===o.length&&-1===g&&(o=[])),f.relayout(e,"hiddenlabels",o)}else{var v,m=[],y=[];for(v=0;vtspan"),f=c[0].length||1;n=l*f,r=u.node()&&v.bBox(u.node()).width;var d=l*(.3+(1-f)/2);u.attr("y",d),c.attr("y",d)}n=Math.max(n,16)+3,a.height=n,a.width=r}function l(t,e,n){var r=t._fullLayout,a=r.legend,o=a.borderwidth,i=k.isGrouped(a);if(k.isVertical(a))i&&e.each(function(t,e){v.setTranslate(this,0,e*a.tracegroupgap)}),a.width=0,a.height=0,n.each(function(t){var e=t[0],n=e.height,r=e.width;v.setTranslate(this,o,5+o+a.height+n/2),a.height+=n,a.width=Math.max(a.width,r)}),a.width+=45+2*o,a.height+=10+2*o,i&&(a.height+=(a._lgroupsLength-1)*a.tracegroupgap),a.width=Math.ceil(a.width),a.height=Math.ceil(a.height),n.each(function(e){var n=e[0];c.select(this).select(".legendtoggle").call(v.setRect,0,-n.height/2,(t._context.editable?0:a.width)+40,n.height)});else if(i){a.width=0,a.height=0;for(var l=[a.width],s=e.data(),u=0,f=s.length;ur.width-(r.margin.r+r.margin.l)&&(y=0,p+=g,a.height=a.height+g,g=0),v.setTranslate(this,o+y,5+o+e.height/2+p),a.width+=i+n,a.height=Math.max(a.height,e.height),y+=i+n,g=Math.max(e.height,g)}),a.width+=2*o,a.height+=10+2*o,a.width=Math.ceil(a.width),a.height=Math.ceil(a.height),n.each(function(e){var n=e[0];c.select(this).select(".legendtoggle").call(v.setRect,0,-n.height/2,t._context.editable?0:a.width,n.height)})}}function s(t){var e=t._fullLayout,n=e.legend,r="left";M.isRightAnchor(n)?r="right":M.isCenterAnchor(n)&&(r="center");var a="top";M.isBottomAnchor(n)?a="bottom":M.isMiddleAnchor(n)&&(a="middle"),h.autoMargin(t,"legend",{x:n.x,y:n.y,l:n.width*({right:1,center:.5}[r]||0),r:n.width*({left:1,center:.5}[r]||0),b:n.height*({top:1,middle:.5}[a]||0),t:n.height*({bottom:1,middle:.5}[a]||0)})}function u(t){var e=t._fullLayout,n=e.legend,r="left";M.isRightAnchor(n)?r="right":M.isCenterAnchor(n)&&(r="center"),h.autoMargin(t,"legend",{x:n.x,y:.5,l:n.width*({right:1,center:.5}[r]||0),r:n.width*({left:1,center:.5}[r]||0),b:0,t:0})}var c=t("d3"),f=t("../../plotly"),d=t("../../lib"),h=t("../../plots/plots"),p=t("../../registry"),g=t("../dragelement"),v=t("../drawing"),m=t("../color"),y=t("../../lib/svg_text_utils"),x=t("./constants"),b=t("../../constants/interactions"),_=t("./get_legend_data"),w=t("./style"),k=t("./helpers"),M=t("./anchor_utils"),A=!0,T=b.DBLCLICKDELAY;e.exports=function(t){function e(t,e){z.attr("data-scroll",e).call(v.setTranslate,0,e),S.call(v.setRect,F,t,x.scrollBarWidth,x.scrollBarHeight),L.select("rect").attr({y:y.borderwidth-e})}var n=t._fullLayout,i="legend"+n._uid;if(n._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var y=n.legend,b=n.showlegend&&_(t.calcdata,y),k=n.hiddenlabels||[];if(!n.showlegend||!b.length)return n._infolayer.selectAll(".legend").remove(),n._topdefs.select("#"+i).remove(),void h.autoMargin(t,"legend");var A=n._infolayer.selectAll("g.legend").data([0]);A.enter().append("g").attr({class:"legend","pointer-events":"all"});var L=n._topdefs.selectAll("#"+i).data([0]);L.enter().append("clipPath").attr("id",i).append("rect");var C=A.selectAll("rect.bg").data([0]);C.enter().append("rect").attr({class:"bg","shape-rendering":"crispEdges"}),C.call(m.stroke,y.bordercolor),C.call(m.fill,y.bgcolor),C.style("stroke-width",y.borderwidth+"px");var z=A.selectAll("g.scrollbox").data([0]);z.enter().append("g").attr("class","scrollbox");var S=A.selectAll("rect.scrollbar").data([0]);S.enter().append("rect").attr({class:"scrollbar",rx:20,ry:2,width:0,height:0}).call(m.fill,"#808BA4");var O=z.selectAll("g.groups").data(b);O.enter().append("g").attr("class","groups"),O.exit().remove();var N=O.selectAll("g.traces").data(d.identity);N.enter().append("g").attr("class","traces"),N.exit().remove(),N.call(w).style("opacity",function(t){var e=t[0].trace;return p.traceIs(e,"pie")?-1!==k.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1}).each(function(){c.select(this).call(r,t).call(a,t)});var D=0!==A.enter().size();D&&(l(t,O,N),s(t));var P=n.width,E=n.height;l(t,O,N),y.height>E?u(t):s(t);var R=n._size,I=R.l+R.w*y.x,j=R.t+R.h*(1-y.y);M.isRightAnchor(y)?I-=y.width:M.isCenterAnchor(y)&&(I-=y.width/2),M.isBottomAnchor(y)?j-=y.height:M.isMiddleAnchor(y)&&(j-=y.height/2);var F=y.width,q=R.w;F>q?(I=R.l,F=q):(I+F>P&&(I=P-F),I<0&&(I=0),F=Math.min(P-I,y.width));var B=y.height,H=R.h;B>H?(j=R.t,B=H):(j+B>E&&(j=E-B),j<0&&(j=0),B=Math.min(E-j,y.height)),v.setTranslate(A,I,j);var V,X,U=B-x.scrollBarHeight-2*x.scrollBarMargin,Y=y.height-B;if(y.height<=B||t._context.staticPlot)C.attr({width:F-y.borderwidth,height:B-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),v.setTranslate(z,0,0),L.select("rect").attr({width:F-2*y.borderwidth,height:B-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth}),z.call(v.setClipUrl,i);else{V=x.scrollBarMargin,X=z.attr("data-scroll")||0,C.attr({width:F-2*y.borderwidth+x.scrollBarWidth+x.scrollBarMargin,height:B-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),L.select("rect").attr({width:F-2*y.borderwidth+x.scrollBarWidth+x.scrollBarMargin,height:B-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth-X}),z.call(v.setClipUrl,i),D&&e(V,X),A.on("wheel",null),A.on("wheel",function(){X=d.constrain(z.attr("data-scroll")-c.event.deltaY/U*Y,-Y,0),V=x.scrollBarMargin-X/Y*U,e(V,X),c.event.preventDefault()}),S.on(".drag",null),z.on(".drag",null);var G=c.behavior.drag().on("drag",function(){V=d.constrain(c.event.y-x.scrollBarHeight/2,x.scrollBarMargin,x.scrollBarMargin+U),X=-(V-x.scrollBarMargin)/U*Y,e(V,X)});S.call(G),z.call(G)}if(t._context.editable){var Z,W,$,Q;A.classed("cursor-move",!0),g.init({element:A.node(),prepFn:function(){var t=v.getTranslate(A);$=t.x,Q=t.y},moveFn:function(t,e){var n=$+t,r=Q+e;v.setTranslate(A,n,r),Z=g.align(n,0,R.l,R.l+R.w,y.xanchor),W=g.align(r,0,R.t+R.h,R.t,y.yanchor)},doneFn:function(e,r,a){if(e&&void 0!==Z&&void 0!==W)f.relayout(t,{"legend.x":Z,"legend.y":W});else{var i=n._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return a.clientX>=t.left&&a.clientX<=t.right&&a.clientY>=t.top&&a.clientY<=t.bottom});i.size()>0&&(1===r?A._clickTimeout=setTimeout(function(){o(i,t,r)},T):2===r&&(A._clickTimeout&&clearTimeout(A._clickTimeout),o(i,t,r)))}}})}}}},{"../../constants/interactions":116,"../../lib":130,"../../lib/svg_text_utils":147,"../../plotly":160,"../../plots/plots":193,"../../registry":200,"../color":33,"../dragelement":54,"../drawing":56,"./anchor_utils":70,"./constants":72,"./get_legend_data":75,"./helpers":76,"./style":78,d3:15}],75:[function(t,e,n){"use strict";var r=t("../../registry"),a=t("./helpers");e.exports=function(t,e){function n(t,n){if(""!==t&&a.isGrouped(e))-1===s.indexOf(t)?(s.push(t),u=!0,l[t]=[[n]]):l[t].push([n]);else{var r="~~i"+f;s.push(r),l[r]=[[n]],f++}}var o,i,l={},s=[],u=!1,c={},f=0;for(o=0;on[1])return n[1]}return a}function n(t){return t[0]}var r,a,o=t[0],i=o.trace,l=h.hasMarkers(i),u=h.hasText(i),d=h.hasLines(i);if(l||u||d){var p={},g={};l&&(p.mc=e("marker.color",n),p.mo=e("marker.opacity",c.mean,[.2,1]),p.ms=e("marker.size",c.mean,[2,16]),p.mlc=e("marker.line.color",n),p.mlw=e("marker.line.width",c.mean,[0,5]),g.marker={sizeref:1,sizemin:1,sizemode:"diameter"}),d&&(g.line={width:e("line.width",n,[0,10])}),u&&(p.tx="Aa",p.tp=e("textposition",n),p.ts=10,p.tc=e("textfont.color",n),p.tf=e("textfont.family",n)),r=[c.minExtend(o,p)],a=c.minExtend(i,g)}var v=s.select(this).select("g.legendpoints"),m=v.selectAll("path.scatterpts").data(l?r:[]);m.enter().append("path").classed("scatterpts",!0).attr("transform","translate(20,0)"),m.exit().remove(),m.call(f.pointStyle,a),l&&(r[0].mrc=3);var y=v.selectAll("g.pointtext").data(u?r:[]);y.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),y.exit().remove(),y.selectAll("text").call(f.textPointStyle,a)}function o(t){var e=t[0].trace,n=e.marker||{},r=n.line||{},a=s.select(this).select("g.legendpoints").selectAll("path.legendbar").data(u.traceIs(e,"bar")?[t]:[]);a.enter().append("path").classed("legendbar",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),a.exit().remove(),a.each(function(t){var e=s.select(this),a=t[0],o=(a.mlw+1||r.width+1)-1;e.style("stroke-width",o+"px").call(d.fill,a.mc||n.color),o&&e.call(d.stroke,a.mlc||r.color)})}function i(t){var e=t[0].trace,n=s.select(this).select("g.legendpoints").selectAll("path.legendbox").data(u.traceIs(e,"box")&&e.visible?[t]:[]);n.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),n.exit().remove(),n.each(function(){var t=e.line.width,n=s.select(this);n.style("stroke-width",t+"px").call(d.fill,e.fillcolor),t&&n.call(d.stroke,e.line.color)})}function l(t){var e=t[0].trace,n=s.select(this).select("g.legendpoints").selectAll("path.legendpie").data(u.traceIs(e,"pie")&&e.visible?[t]:[]);n.enter().append("path").classed("legendpie",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),n.exit().remove(),n.size()&&n.call(p,t[0],e)}var s=t("d3"),u=t("../../registry"),c=t("../../lib"),f=t("../drawing"),d=t("../color"),h=t("../../traces/scatter/subtypes"),p=t("../../traces/pie/style_one");e.exports=function(t){t.each(function(t){var e=s.select(this),n=e.selectAll("g.layers").data([0]);n.enter().append("g").classed("layers",!0),n.style("opacity",t[0].trace.opacity),n.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),n.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var r=n.selectAll("g.legendsymbols").data([t]);r.enter().append("g").classed("legendsymbols",!0),r.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0) +}).each(o).each(i).each(l).each(r).each(a)}},{"../../lib":130,"../../registry":200,"../../traces/pie/style_one":209,"../../traces/scatter/subtypes":240,"../color":33,"../drawing":56,d3:15}],79:[function(t,e,n){"use strict";function r(t,e){var n=e.currentTarget,r=n.getAttribute("data-attr"),a=n.getAttribute("data-val")||!0,o=t._fullLayout,i={};if("zoom"===r){for(var l,s,c="in"===a?.5:2,d=(1+c)/2,h=(1-c)/2,p=f.list(t,null,!0),g=0;g1)return r(["resetViews","toggleHover"]),i(v,n);c&&(r(["zoom3d","pan3d","orbitRotation","tableRotation"]),r(["resetCameraDefault3d","resetCameraLastSave3d"]),r(["hoverClosest3d"])),d&&(r(["zoomInGeo","zoomOutGeo","resetGeo"]),r(["hoverClosestGeo"]));var m=a(l),y=[];return((u||p)&&!m||g)&&(y=["zoom2d","pan2d"]),(u||g)&&o(s)&&(y.push("select2d"),y.push("lasso2d")),y.length&&r(y),!u&&!p||m||g||r(["zoomIn2d","zoomOut2d","autoScale2d","resetScale2d"]),u&&h?r(["toggleHover"]):p?r(["hoverClosestGl2d"]):u?r(["hoverClosestCartesian","hoverCompareCartesian"]):h&&r(["hoverClosestPie"]),i(v,n)}function a(t){for(var e=s.list({_fullLayout:t},null,!0),n=!0,r=0;r0)){var p=a(e,n,s);f("x",p[0]),f("y",p[1]),o.noneOrAll(t,e,["x","y"]),f("xanchor"),f("yanchor"),o.coerceFont(f,"font",n.font);var g=f("bgcolor");f("activecolor",i.contrast(g,u.lightAmount,u.darkAmount)),f("bordercolor"),f("borderwidth")}}},{"../../lib":130,"../color":33,"./attributes":83,"./button_attributes":84,"./constants":85}],87:[function(t,e,n){"use strict";function r(t){for(var e=m.list(t,"x",!0),n=[],r=0;rp&&(p=d)));return p>=h?[h,p]:void 0}}var a=t("../../lib"),o=t("../../plots/cartesian/axes"),i=t("./constants"),l=t("./helpers");e.exports=function(t){var e=t._fullLayout,n=a.filterVisible(e.shapes);if(n.length&&t._fullData.length)for(var l=0;lY&&r>G&&!t.shiftKey?p.getCursor(a/n,1-o/r):"move";g(e,i),U=i.split("-")[0]}function o(e){F=f.getFromId(t,n.xref),q=f.getFromId(t,n.yref),B=m.getDataToPixel(t,F),H=m.getDataToPixel(t,q,!0),V=m.getPixelToData(t,F),X=m.getPixelToData(t,q,!0);var o="shapes["+r+"]";"path"===n.type?(I=n.path,j=o+".path"):(v=B(n.x0),y=H(n.y0),x=B(n.x1),b=H(n.y1),_=o+".x0",w=o+".y0",k=o+".x1",M=o+".y1"),vG&&(h[z]=n[D]=X(u),h[S]=n[P]=X(c)),d-f>Y&&(h[O]=n[E]=V(f),h[N]=n[R]=V(d))}e.attr("d",i(t,n))}var h,v,y,x,b,_,w,k,M,A,T,L,C,z,S,O,N,D,P,E,R,I,j,F,q,B,H,V,X,U,Y=10,G=10,Z={setCursor:a,element:e.node(),prepFn:o,doneFn:l},W=Z.element.getBoundingClientRect();p.init(Z)}function i(t,e){var n,r,a,o,i=e.type,s=f.getFromId(t,e.xref),u=f.getFromId(t,e.yref),c=t._fullLayout._size;if(s?(n=m.shapePositionToRange(s),r=function(t){return s._offset+s.r2p(n(t,!0))}):r=function(t){return c.l+c.w*t},u?(a=m.shapePositionToRange(u),o=function(t){return u._offset+u.r2p(a(t,!0))}):o=function(t){return c.t+c.h*(1-t)},"path"===i)return s&&"date"===s.type&&(r=m.decodeDate(r)),u&&"date"===u.type&&(o=m.decodeDate(o)),l(e.path,r,o);var d=r(e.x0),h=r(e.x1),p=o(e.y0),g=o(e.y1);if("line"===i)return"M"+d+","+p+"L"+h+","+g;if("rect"===i)return"M"+d+","+p+"H"+h+"V"+g+"H"+d+"Z";var v=(d+h)/2,y=(p+g)/2,x=Math.abs(v-d),b=Math.abs(y-p),_="A"+x+","+b,w=v+x+","+y;return"M"+w+_+" 0 1,1 "+v+","+(y-b)+_+" 0 0,1 "+w+"Z"}function l(t,e,n){return t.replace(v.segmentRE,function(t){var r=0,a=t.charAt(0),o=v.paramIsX[a],i=v.paramIsY[a],l=v.numParams[a],s=t.substr(1).replace(v.paramRE,function(t){return o[r]?t=e(t):i[r]&&(t=n(t)),r++,r>l&&(t="X"),t});return r>l&&(s=s.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+t)),a+s})}function s(t,e,n){return t.replace(v.segmentRE,function(t){var r=0,a=t.charAt(0),o=v.paramIsX[a],i=v.paramIsY[a],l=v.numParams[a];return a+t.substr(1).replace(v.paramRE,function(t){return r>=l?t:(o[r]?t=e(t):i[r]&&(t=n(t)),r++,t)})})}var u=t("../../plotly"),c=t("../../lib"),f=t("../../plots/cartesian/axes"),d=t("../color"),h=t("../drawing"),p=t("../dragelement"),g=t("../../lib/setcursor"),v=t("./constants"),m=t("./helpers");e.exports={draw:r,drawOne:a}},{"../../lib":130,"../../lib/setcursor":145,"../../plotly":160,"../../plots/cartesian/axes":165,"../color":33,"../dragelement":54,"../drawing":56,"./constants":98,"./helpers":101}],101:[function(t,e,n){"use strict";n.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},n.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},n.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},n.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},n.getDataToPixel=function(t,e,r){var a,o=t._fullLayout._size;if(e){var i=n.shapePositionToRange(e);a=function(t){return e._offset+e.r2p(i(t,!0))},"date"===e.type&&(a=n.decodeDate(a))}else a=r?function(t){return o.t+o.h*(1-t)}:function(t){return o.l+o.w*t};return a},n.getPixelToData=function(t,e,r){var a,o=t._fullLayout._size;if(e){var i=n.rangeToShapePosition(e);a=function(t){return i(e.p2r(t-e._offset))}}else a=r?function(t){return 1-(t-o.t)/o.h}:function(t){return(t-o.l)/o.w};return a}},{}],102:[function(t,e,n){"use strict";var r=t("./draw");e.exports={moduleType:"component",name:"shapes",layoutAttributes:t("./attributes"),supplyLayoutDefaults:t("./defaults"),calcAutorange:t("./calc_autorange"),draw:r.draw,drawOne:r.drawOne}},{"./attributes":96,"./calc_autorange":97,"./defaults":99,"./draw":100}],103:[function(t,e,n){"use strict";var r=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./attributes"),i=t("./helpers");e.exports=function(t,e,n,l,s){function u(n,a){return r.coerce(t,e,o,n,a)}if(l=l||{},s=s||{},!u("visible",!s.itemIsNotPlainObject))return e;u("layer"),u("opacity"),u("fillcolor"),u("line.color"),u("line.width"),u("line.dash");for(var c=t.path?"path":"rect",f=u("type",c),d=["x","y"],h=0;h<2;h++){var p=d[h],g={_fullLayout:n},v=a.coerceRef(t,e,g,p,"","paper");if("path"!==f){var m,y,x;"paper"!==v?(m=a.getFromId(g,v),x=i.rangeToShapePosition(m),y=i.shapePositionToRange(m)):y=x=r.identity;var b=p+"0",_=p+"1",w=t[b],k=t[_];t[b]=y(t[b],!0),t[_]=y(t[_],!0),a.coercePosition(e,g,u,v,b,.25),a.coercePosition(e,g,u,v,_,.75),e[b]=x(e[b]),e[_]=x(e[_]),t[b]=w,t[_]=k}}return"path"===f?u("path"):r.noneOrAll(t,e,["x0","x1","y0","y1"]),e}},{"../../lib":130,"../../plots/cartesian/axes":165,"./attributes":96,"./helpers":101}],104:[function(t,e,n){"use strict";var r=t("../../plots/font_attributes"),a=t("../../plots/pad_attributes"),o=t("../../lib/extend").extendFlat,i=t("../../lib/extend").extendDeep,l=t("../../plots/animation_attributes"),s=t("./constants"),u={_isLinkedToArray:"step",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"}};e.exports={_isLinkedToArray:"slider",visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i({},a,{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:l.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:o({},r,{})},font:o({},r,{}),activebgcolor:{valType:"color",dflt:s.gripBgActiveColor},bgcolor:{valType:"color",dflt:s.railBgColor},bordercolor:{valType:"color",dflt:s.railBorderColor},borderwidth:{valType:"number",min:0,dflt:s.railBorderWidth},ticklen:{valType:"number",min:0,dflt:s.tickLength},tickcolor:{valType:"color",dflt:s.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:s.minorTickLength}}},{"../../lib/extend":126,"../../plots/animation_attributes":161,"../../plots/font_attributes":189,"../../plots/pad_attributes":192,"./constants":105}],105:[function(t,e,n){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,fontSizeToHeight:1.3,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],106:[function(t,e,n){"use strict";function r(t,e,n){function r(n,r){return o.coerce(t,e,l,n,r)}r("visible",a(t,e).length>0)&&(r("active"),r("x"),r("y"),o.noneOrAll(t,e,["x","y"]),r("xanchor"),r("yanchor"),r("len"),r("lenmode"),r("pad.t"),r("pad.r"),r("pad.b"),r("pad.l"),o.coerceFont(r,"font",n.font),r("currentvalue.visible")&&(r("currentvalue.xanchor"),r("currentvalue.prefix"),r("currentvalue.suffix"),r("currentvalue.offset"),o.coerceFont(r,"currentvalue.font",e.font)),r("transition.duration"),r("transition.easing"),r("bgcolor"),r("activebgcolor"),r("bordercolor"),r("borderwidth"),r("ticklen"),r("tickwidth"),r("tickcolor"),r("minorticklen"))}function a(t,e){function n(t,e){return o.coerce(r,a,c,t,e)}for(var r,a,i=t.steps||[],l=e.steps=[],s=0;s=n.steps.length&&(n.active=0),e.call(l,n).call(b,n).call(c,n).call(p,n).call(x,t,n).call(s,t,n),A.setTranslate(e,n.lx+n.pad.l,n.ly+n.pad.t),e.call(v,n,n.active/(n.steps.length-1),!1),e.call(l,n)}function l(t,e,n){if(e.currentvalue.visible){var r,a,o=t.selectAll("text").data([0]);switch(e.currentvalue.xanchor){case"right":r=e.inputAreaLength-C.currentValueInset-e.currentValueMaxWidth,a="left";break;case"center":r=.5*e.inputAreaLength,a="middle";break;default:r=C.currentValueInset,a="left"}o.enter().append("text").classed(C.labelClass,!0).classed("user-select-none",!0).attr("text-anchor",a);var i=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof n)i+=n;else{i+=e.steps[e.active].label}return e.currentvalue.suffix&&(i+=e.currentvalue.suffix),o.call(A.font,e.currentvalue.font).text(i).call(T.convertToTspans),A.setTranslate(o,r,e.currentValueHeight),o}}function s(t,e,n){var r=t.selectAll("rect."+C.gripRectClass).data([0]);r.enter().append("rect").classed(C.gripRectClass,!0).call(h,e,t,n).style("pointer-events","all"),r.attr({width:C.gripWidth,height:C.gripHeight,rx:C.gripRadius,ry:C.gripRadius}).call(M.stroke,n.bordercolor).call(M.fill,n.bgcolor).style("stroke-width",n.borderwidth+"px")}function u(t,e,n){var r=t.selectAll("text").data([0]);return r.enter().append("text").classed(C.labelClass,!0).classed("user-select-none",!0).attr("text-anchor","middle"),r.call(A.font,n.font).text(e.step.label).call(T.convertToTspans),r}function c(t,e){var n=t.selectAll("g."+C.labelsClass).data([0]);n.enter().append("g").classed(C.labelsClass,!0);var r=n.selectAll("g."+C.labelGroupClass).data(e.labelSteps);r.enter().append("g").classed(C.labelGroupClass,!0),r.exit().remove(),r.each(function(t){var n=w.select(this);n.call(u,t,e),A.setTranslate(n,m(e,t.fraction),C.tickOffset+e.ticklen+e.labelHeight+C.labelOffset+e.currentValueTotalHeight)})}function f(t,e,n,r,a){var o=Math.round(r*(n.steps.length-1));o!==n.active&&d(t,e,n,o,!0,a)}function d(t,e,n,r,a,o){var i=n.active;n._input.active=n.active=r;var s=n.steps[n.active];e.call(v,n,n.active/(n.steps.length-1),o),e.call(l,n),t.emit("plotly_sliderchange",{slider:n,step:n.steps[n.active],interaction:a,previousActive:i}),s&&s.method&&a&&(e._nextMethod?(e._nextMethod.step=s,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:s,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame(function(){var n=e._nextMethod.step;n.method&&(k.executeAPICommand(t,n.method,n.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function h(t,e,n){function r(){return n.data()[0]}var a=n.node(),o=w.select(e);t.on("mousedown",function(){var t=r();e.emit("plotly_sliderstart",{slider:t});var i=n.select("."+C.gripRectClass);w.event.stopPropagation(),w.event.preventDefault(),i.call(M.fill,t.activebgcolor);var l=y(t,w.mouse(a)[0]);f(e,n,t,l,!0),t._dragging=!0,o.on("mousemove",function(){var t=r(),o=y(t,w.mouse(a)[0]);f(e,n,t,o,!1)}),o.on("mouseup",function(){var t=r();t._dragging=!1,i.call(M.fill,t.bgcolor),o.on("mouseup",null),o.on("mousemove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})})})}function p(t,e){var n=t.selectAll("rect."+C.tickRectClass).data(e.steps);n.enter().append("rect").classed(C.tickRectClass,!0),n.exit().remove(),n.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),n.each(function(t,n){var r=n%e.labelStride==0,a=w.select(this);a.attr({height:r?e.ticklen:e.minorticklen}).call(M.fill,e.tickcolor),A.setTranslate(a,m(e,n/(e.steps.length-1))-.5*e.tickwidth,(r?C.tickOffset:C.minorTickOffset)+e.currentValueTotalHeight)})}function g(t){t.labelSteps=[];for(var e=t.steps.length,n=0;n0&&(i=i.transition().duration(e.transition.duration).ease(e.transition.easing)),i.attr("transform","translate("+(o-.5*C.gripWidth)+","+e.currentValueTotalHeight+")")}}function m(t,e){return t.inputAreaStart+C.stepInset+(t.inputAreaLength-2*C.stepInset)*Math.min(1,Math.max(0,e))}function y(t,e){return Math.min(1,Math.max(0,(e-C.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*C.stepInset-2*t.inputAreaStart)))}function x(t,e,n){var r=t.selectAll("rect."+C.railTouchRectClass).data([0]);r.enter().append("rect").classed(C.railTouchRectClass,!0).call(h,e,t,n).style("pointer-events","all"),r.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,C.tickOffset+n.ticklen+n.labelHeight)}).call(M.fill,n.bgcolor).attr("opacity",0),A.setTranslate(r,0,n.currentValueTotalHeight)}function b(t,e){var n=t.selectAll("rect."+C.railRectClass).data([0]);n.enter().append("rect").classed(C.railRectClass,!0);var r=e.inputAreaLength-2*C.railInset;n.attr({width:r,height:C.railWidth,rx:C.railRadius,ry:C.railRadius,"shape-rendering":"crispEdges"}).call(M.stroke,e.bordercolor).call(M.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),A.setTranslate(n,C.railInset,.5*(e.inputAreaWidth-C.railWidth)+e.currentValueTotalHeight)}function _(t){for(var e=t._fullLayout._pushmargin||{},n=Object.keys(e),r=0;r0?[0]:[]);if(l.enter().append("g").classed(C.containerClassName,!0).style("cursor","ew-resize"),l.exit().remove(),l.exit().size()&&_(t),0!==n.length){var s=l.selectAll("g."+C.groupClassName).data(n,a);s.enter().append("g").classed(C.groupClassName,!0),s.exit().each(function(e){w.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,k.autoMargin(t,C.autoMarginIdRoot+e._index)});for(var u=0;u0||d<0){var g={left:[-n,0],right:[n,0],top:[0,-n],bottom:[0,n]}[x.side];e.attr("transform","translate("+g+")")}}}var g=n.propContainer,v=n.propName,m=n.traceIndex,y=n.dfltName,x=n.avoid||{},b=n.attributes,_=n.transform,w=n.containerGroup,k=t._fullLayout,M=g.titlefont.family,A=g.titlefont.size,T=g.titlefont.color,L=1,C=!1,z=g.title.trim();""===z&&(L=0),z.match(/Click to enter .+ title/)&&(L=.2,C=!0),w||(w=k._infolayer.selectAll(".g-"+e).data([0]),w.enter().append("g").classed("g-"+e,!0));var S=w.selectAll("text").data([0]);S.enter().append("text"),S.text(z).attr("class",e),S.attr({"data-unformatted":z}).call(d);var O="Click to enter "+y+" title";t._context.editable?(z?S.on(".opacity",null):function(){L=0,C=!0,z=O,S.attr({"data-unformatted":z}).text(z).on("mouseover.opacity",function(){r.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)})}(),S.call(c.makeEditable).on("edit",function(e){void 0!==m?o.restyle(t,v,e,m):o.relayout(t,v,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(d)}).on("input",function(t){this.text(t||" ").attr(b).selectAll("tspan.line").attr(b)})):z&&!z.match(/Click to enter .+ title/)||S.remove(),S.classed("js-placeholder",C)}},{"../../constants/interactions":116,"../../lib":130,"../../lib/svg_text_utils":147,"../../plotly":160,"../../plots/plots":193,"../color":33,"../drawing":56,d3:15,"fast-isnumeric":18}],110:[function(t,e,n){"use strict";var r=t("../../plots/font_attributes"),a=t("../color/attributes"),o=t("../../lib/extend").extendFlat,i=t("../../plots/pad_attributes"),l={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""}};e.exports={_isLinkedToArray:"updatemenu",_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:l,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:o({},i,{}),font:o({},r,{}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1}}},{"../../lib/extend":126,"../../plots/font_attributes":189,"../../plots/pad_attributes":192,"../color/attributes":32}],111:[function(t,e,n){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,fontSizeToHeight:1.3,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF"}},{}],112:[function(t,e,n){"use strict";function r(t,e,n){function r(n,r){return o.coerce(t,e,l,n,r)}r("visible",a(t,e).length>0)&&(r("active"),r("direction"),r("type"),r("showactive"),r("x"),r("y"),o.noneOrAll(t,e,["x","y"]),r("xanchor"),r("yanchor"),r("pad.t"),r("pad.r"),r("pad.b"),r("pad.l"),o.coerceFont(r,"font",n.font),r("bgcolor",n.paper_bgcolor),r("bordercolor"),r("borderwidth"))}function a(t,e){function n(t,e){return o.coerce(r,a,c,t,e)}for(var r,a,i=t.buttons||[],l=e.buttons=[],s=0;s0?[0]:[]);if(o.enter().append("g").classed(C.containerClassName,!0).style("cursor","pointer"),o.exit().remove(),o.exit().size()&&_(t),0!==n.length){var c=o.selectAll("g."+C.headerGroupClassName).data(n,a);c.enter().append("g").classed(C.headerGroupClassName,!0);var f=o.selectAll("g."+C.dropdownButtonGroupClassName).data([0]);f.enter().append("g").classed(C.dropdownButtonGroupClassName,!0).style("pointer-events","all");for(var d=0;dk,T=r.barLength+2*r.barPad,L=r.barWidth+2*r.barPad,C=p,z=v+m;z+L>u&&(z=u-L);var S=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);S.exit().on(".drag",null).remove(),S.enter().append("rect").classed("scrollbar-horizontal",!0).call(o.fill,r.barColor),A?(this.hbar=S.attr({rx:r.barRadius,ry:r.barRadius,x:C,y:z,width:T,height:L}),this._hbarXMin=C+T/2,this._hbarTranslateMax=k-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=m>M,N=r.barWidth+2*r.barPad,D=r.barLength+2*r.barPad,P=p+g,E=v;P+N>s&&(P=s-N);var R=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(o.fill,r.barColor),O?(this.vbar=R.attr({rx:r.barRadius,ry:r.barRadius,x:P,y:E,width:N,height:D}),this._vbarYMin=E+D/2,this._vbarTranslateMax=M-D):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var I=this.id,j=c-.5,F=O?f+N+.5:f+.5,q=d-.5,B=A?h+L+.5:h+.5,H=l._topdefs.selectAll("#"+I).data(A||O?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",I).append("rect"),A||O?(this._clipRect=H.select("rect").attr({x:Math.floor(j),y:Math.floor(q),width:Math.ceil(F)-Math.floor(j),height:Math.ceil(B)-Math.floor(q)}),this.container.call(i.setClipUrl,I),this.bg.attr({x:p,y:v,width:g,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),A||O){var V=a.behavior.drag().on("dragstart",function(){a.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var X=a.behavior.drag().on("dragstart",function(){a.event.sourceEvent.preventDefault(),a.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(X),O&&this.vbar.on(".drag",null).call(X)}this.setTranslate(e,n)},r.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},r.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=a.event.dx),this.vbar&&(e-=a.event.dy),this.setTranslate(t,e)},r.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=a.event.deltaY),this.vbar&&(e+=a.event.deltaY),this.setTranslate(t,e)},r.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var n=t+this._hbarXMin,r=n+this._hbarTranslateMax;t=(l.constrain(a.event.x,n,r)-n)/(r-n)*(this.position.w-this._box.w)}if(this.vbar){var o=e+this._vbarYMin,i=o+this._vbarTranslateMax;e=(l.constrain(a.event.y,o,i)-o)/(i-o)*(this.position.h-this._box.h)}this.setTranslate(t,e)},r.prototype.setTranslate=function(t,e){var n=this.position.w-this._box.w,r=this.position.h-this._box.h;if(t=l.constrain(t||0,0,n),e=l.constrain(e||0,0,r),this.translateX=t,this.translateY=e,this.container.call(i.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var a=t/n;this.hbar.call(i.setTranslate,t+a*this._hbarTranslateMax,e)}if(this.vbar){var o=e/r;this.vbar.call(i.setTranslate,t,e+o*this._vbarTranslateMax)}}},{"../../lib":130,"../color":33,"../drawing":56,d3:15}],116:[function(t,e,n){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300}},{}],117:[function(t,e,n){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6}},{}],118:[function(t,e,n){"use strict";e.exports={entityToUnicode:{mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},unicodeToEntity:{"&":"amp","<":"lt",">":"gt",'"':"quot","'":"#x27","/":"#x2F"}}},{}],119:[function(t,e,n){"use strict";n.xmlns="http://www.w3.org/2000/xmlns/",n.svg="http://www.w3.org/2000/svg",n.xlink="http://www.w3.org/1999/xlink",n.svgAttrs={xmlns:n.svg,"xmlns:xlink":n.xlink}},{}],120:[function(t,e,n){"use strict";var r=t("./plotly");n.version="1.25.2",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config"),n.plot=r.plot,n.newPlot=r.newPlot,n.restyle=r.restyle,n.relayout=r.relayout,n.redraw=r.redraw,n.update=r.update,n.extendTraces=r.extendTraces,n.prependTraces=r.prependTraces,n.addTraces=r.addTraces,n.deleteTraces=r.deleteTraces,n.moveTraces=r.moveTraces,n.purge=r.purge,n.setPlotConfig=t("./plot_api/set_plot_config"),n.register=t("./plot_api/register"),n.toImage=t("./plot_api/to_image"),n.downloadImage=t("./snapshot/download"),n.validate=t("./plot_api/validate"),n.addFrames=r.addFrames,n.deleteFrames=r.deleteFrames,n.animate=r.animate,n.register(t("./traces/scatter")),n.register([t("./components/legend"),t("./components/annotations"),t("./components/shapes"),t("./components/images"),t("./components/updatemenus"),t("./components/sliders"),t("./components/rangeslider"),t("./components/rangeselector")]),n.Icons=t("../build/ploticon"),n.Plots=r.Plots,n.Fx=r.Fx,n.Snapshot=t("./snapshot"),n.PlotSchema=t("./plot_api/plot_schema"),n.Queue=t("./lib/queue"),n.d3=t("d3")},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":31,"./components/images":69,"./components/legend":77,"./components/rangeselector":89,"./components/rangeslider":95,"./components/shapes":102,"./components/sliders":108,"./components/updatemenus":114,"./fonts/mathjax_config":121,"./lib/queue":142,"./plot_api/plot_schema":154,"./plot_api/register":155,"./plot_api/set_plot_config":156,"./plot_api/to_image":158,"./plot_api/validate":159,"./plotly":160,"./snapshot":205,"./snapshot/download":202,"./traces/scatter":230,d3:15,"es6-promise":16}],121:[function(t,e,n){"use strict";"undefined"!=typeof MathJax?(n.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):n.MathJax=!1},{}],122:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../constants/numerical").BADNUM;e.exports=function(t){return"string"==typeof t&&(t=t.replace(/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,"")),r(t)?Number(t):a}},{"../constants/numerical":117,"fast-isnumeric":18}],123:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("tinycolor2"),o=t("../components/colorscale/get_scale"),i=(Object.keys(t("../components/colorscale/scales")),t("./nested_property")),l=/^([2-9]|[1-9][0-9]+)$/;n.valObjects={data_array:{coerceFunction:function(t,e,n){Array.isArray(t)?e.set(t):void 0!==n&&e.set(n)}},enumerated:{coerceFunction:function(t,e,n,r){r.coerceNumber&&(t=+t),-1===r.values.indexOf(t)?e.set(n):e.set(t)}},boolean:{coerceFunction:function(t,e,n){!0===t||!1===t?e.set(t):e.set(n)}},number:{coerceFunction:function(t,e,n,a){!r(t)||void 0!==a.min&&ta.max?e.set(n):e.set(+t)}},integer:{coerceFunction:function(t,e,n,a){t%1||!r(t)||void 0!==a.min&&ta.max?e.set(n):e.set(+t)}},string:{coerceFunction:function(t,e,n,r){if("string"!=typeof t){var a="number"==typeof t;!0!==r.strict&&a?e.set(String(t)):e.set(n)}else r.noBlank&&!t?e.set(n):e.set(t)}},color:{coerceFunction:function(t,e,n){a(t).isValid()?e.set(t):e.set(n)}},colorscale:{coerceFunction:function(t,e,n){e.set(o(t,n))}},angle:{coerceFunction:function(t,e,n){"auto"===t?e.set("auto"):r(t)?(Math.abs(t)>180&&(t-=360*Math.round(t/360)),e.set(+t)):e.set(n)}},subplotid:{coerceFunction:function(t,e,n){var r=n.length;if("string"==typeof t&&t.substr(0,r)===n&&l.test(t.substr(r)))return void e.set(t);e.set(n)},validateFunction:function(t,e){var n=e.dflt,r=n.length;return t===n||"string"==typeof t&&!(t.substr(0,r)!==n||!l.test(t.substr(r)))}},flaglist:{coerceFunction:function(t,e,n,r){if("string"!=typeof t)return void e.set(n);if(-1!==(r.extras||[]).indexOf(t))return void e.set(t);for(var a=t.split("+"),o=0;o0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),r+=":"+i}return r}function s(t){return t.formatDate("yyyy")}function u(t){return t.formatDate("M yyyy")}function c(t){return t.formatDate("M d")}function f(t){return t.formatDate("M d, yyyy")}var d=t("d3"),h=t("fast-isnumeric"),p=t("./loggers").error,g=t("./mod"),v=t("../constants/numerical"),m=v.BADNUM,y=v.ONEDAY,x=v.ONEHOUR,b=v.ONEMIN,_=v.ONESEC,w=v.EPOCHJD,k=t("../registry"),M=d.time.format.utc,A=(new Date).getFullYear()-70;n.dateTick0=function(t,e){return r(t)?e?k.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:k.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"},n.dfltRange=function(t){return r(t)?k.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},n.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime};var T,L;n.dateTime2ms=function(t,e){if(n.isJSDate(t))return t=Number(t)-t.getTimezoneOffset()*b,t>=T&&t<=L?t:m;if("string"!=typeof t&&"number"!=typeof t)return m;t=String(t);var a=r(e),o=t.charAt(0);!a||"G"!==o&&"g"!==o||(t=t.substr(1),e="");var i=a&&"chinese"===e.substr(0,7),l=t.match(i?/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m:/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m);if(!l)return m;var s=l[1],u=l[3]||"1",c=Number(l[5]||1),f=Number(l[7]||0),d=Number(l[9]||0),h=Number(l[11]||0);if(a){if(2===s.length)return m;s=Number(s);var p;try{var g=k.getComponentMethod("calendars","getCal")(e);if(i){var v="i"===u.charAt(u.length-1);u=parseInt(u,10),p=g.newDate(s,g.toMonthIndex(s,u,v),c)}else p=g.newDate(s,Number(u),c)}catch(t){return m}return p?(p.toJD()-w)*y+f*x+d*b+h*_:m}s=2===s.length?(Number(s)+2e3-A)%100+A:Number(s),u-=1;var M=new Date(Date.UTC(2e3,u,c,f,d));return M.setUTCFullYear(s),M.getUTCMonth()!==u?m:M.getUTCDate()!==c?m:M.getTime()+h*_},T=n.MIN_MS=n.dateTime2ms("-9999"),L=n.MAX_MS=n.dateTime2ms("9999-12-31 23:59:59.9999"),n.isDateTime=function(t,e){return n.dateTime2ms(t,e)!==m};var C=90*y,z=3*x,S=5*b;n.ms2DateTime=function(t,e,n){if("number"!=typeof t||!(t>=T&&t<=L))return m;e||(e=0);var a,i,l,s,u,c,f=Math.floor(10*g(t+.05,1)),d=Math.round(t-f/10);if(r(n)){var h=Math.floor(d/y)+w,p=Math.floor(g(t,y));try{a=k.getComponentMethod("calendars","getCal")(n).fromJD(h).formatDate("yyyy-mm-dd")}catch(t){a=M("G%Y-%m-%d")(new Date(d))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;i=e=T+y&&t<=L-y))return m;var e=Math.floor(10*g(t+.05,1)),n=new Date(Math.round(t-e/10));return o(d.time.format("%Y-%m-%d")(n),n.getHours(),n.getMinutes(),n.getSeconds(),10*n.getUTCMilliseconds()+e)},n.cleanDate=function(t,e,a){if(n.isJSDate(t)||"number"==typeof t){if(r(a))return p("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=n.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!n.isDateTime(t,a))return p("unrecognized date",t),e;return t};var O=/%\d?f/g,N=[59,59.9,59.99,59.999,59.9999],D=M("%Y"),P=M("%b %Y"),E=M("%b %-d"),R=M("%b %-d, %Y");n.formatDate=function(t,e,n,a){var o,d;if(a=r(a)&&a,e)return i(e,t,a);if(a)try{var h=Math.floor((t+.05)/y)+w,p=k.getComponentMethod("calendars","getCal")(a).fromJD(h);"y"===n?d=s(p):"m"===n?d=u(p):"d"===n?(o=s(p),d=c(p)):(o=f(p),d=l(t,n))}catch(t){return"Invalid"}else{var g=new Date(Math.floor(t+.05));"y"===n?d=D(g):"m"===n?d=P(g):"d"===n?(o=D(g),d=E(g)):(o=R(g),d=l(t,n))}return d+(o?"\n"+o:"")};var I=3*y;n.incrementMonth=function(t,e,n){n=r(n)&&n;var a=g(t,y);if(t=Math.round(t-a),n)try{var o=Math.round(t/y)+w,i=k.getComponentMethod("calendars","getCal")(n),l=i.fromJD(o);return e%12?i.add(l,e,"m"):i.add(l,e/12,"y"),(l.toJD()-w)*y+a}catch(e){p("invalid ms "+t+" in calendar "+n)}var s=new Date(t+I);return s.setUTCMonth(s.getUTCMonth()+e)+a-I},n.findExactDates=function(t,e){for(var n,a,o=0,i=0,l=0,s=0,u=r(e)&&k.getComponentMethod("calendars","getCal")(e),c=0;cn?Math.max(n,Math.min(e,t)):Math.max(e,Math.min(n,t))},a.bBoxIntersect=function(t,e,n){return n=n||0,t.left<=e.right+n&&e.left<=t.right+n&&t.top<=e.bottom+n&&e.top<=t.bottom+n},a.simpleMap=function(t,e,n,r){for(var a=t.length,o=new Array(a),i=0;i-1||c!==1/0&&c>=Math.pow(2,n)?t(e,n,r):s},a.OptionControl=function(t,e){t||(t={}),e||(e="opt");var n={};return n.optionList=[],n._newoption=function(r){r[e]=t,n[r.name]=r,n.optionList.push(r)},n["_"+e]=t,n},a.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var n,r,a,o,i=t.length,l=2*i,s=2*e-1,u=new Array(s),c=new Array(i);for(n=0;n=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=i&&(a=l-1-a),o+=t[a]*u[r];c[n]=o}return c},a.syncOrAsync=function(t,e,n){function r(){return a.syncOrAsync(t,e,n)}for(var o,i;t.length;)if(i=t.splice(0,1)[0],(o=i(e))&&o.then)return o.then(r).then(void 0,a.promiseError);return n&&n(e)},a.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},a.noneOrAll=function(t,e,n){if(t){var r,a,o=!1,i=!0;for(r=0;r1?a+i[1]:"";if(o&&(i.length>1||l.length>4||n))for(;r.test(l);)l=l.replace(r,"$1"+o+"$2");return l+s}},{"./clean_number":122,"./coerce":123,"./dates":124,"./extend":126,"./filter_unique":127,"./filter_visible":128,"./identity":129,"./is_array":131,"./is_plain_object":132,"./loggers":133,"./matrix":134,"./mod":135,"./nested_property":136,"./noop":137,"./notifier":138,"./push_unique":141,"./relink_private":143,"./search":144,"./stats":146,"./to_log_range":148,d3:15}],131:[function(t,e,n){"use strict";var r="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}};e.exports=function(t){return Array.isArray(t)||r.isView(t)}},{}],132:[function(t,e,n){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],133:[function(t,e,n){"use strict";function r(t,e){if(t.apply)t.apply(t,e);else for(var n=0;n1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;e=0;e--){if(r=t[e][0],o=t[e][1],s=!1,h(r))for(n=r.length-1;n>=0;n--)a(r[n],i(o,n))?s?r[n]=void 0:r.pop():s=!0;else if("object"==typeof r&&null!==r)for(l=Object.keys(r),s=!1,n=l.length-1;n>=0;n--)a(r[l[n]],i(o,l[n]))?delete r[l[n]]:s=!0;if(s)return}}function c(t){return void 0===t||null===t||"object"==typeof t&&(h(t)?!t.length:!Object.keys(t).length)}function f(t,e,n){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:n,obj:t}}var d=t("fast-isnumeric"),h=t("./is_array"),p=t("./is_plain_object"),g=t("../plot_api/container_array_match");e.exports=function(t,e){if(d(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var n,a,i,l=0,s=e.split(".");l/g),l=0;lo||rl)&&(!e||!u(t))}function n(t,e){var n=t[0],s=t[1];if(no||sl)return!1;var u,c,f,d,h,p=r.length,g=r[0][0],v=r[0][1],m=0;for(u=1;uMath.max(c,g)||s>Math.max(f,v)))if(sc||Math.abs(r(i,d))>a)return!0;return!1};a.filter=function(t,e){function n(n){t.push(n);var l=r.length,s=a;r.splice(i+1);for(var u=s+1;u1){n(t.pop())}return{addPt:n,raw:t,filtered:r}}},{"./matrix":134}],141:[function(t,e,n){"use strict";e.exports=function(t,e){if(e instanceof RegExp){var n,r=e.toString();for(n=0;no.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},i.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},i.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},i.undo=function(t){var e,n;if(t.framework&&t.framework.isPolar)return void t.framework.undo();if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;ne}function i(t,e){return t>=e}var l=t("fast-isnumeric"),s=t("./loggers");n.findBin=function(t,e,n){if(l(e.start))return n?Math.ceil((t-e.start)/e.size)-1:Math.floor((t-e.start)/e.size);var u,c,f=0,d=e.length,h=0;for(c=e[e.length-1]>=e[0]?n?r:a:n?i:o;f90&&s.log("Long binary search..."),f-1},n.sorterAsc=function(t,e){return t-e},n.sorterDes=function(t,e){return e-t},n.distinctVals=function(t){var e=t.slice();e.sort(n.sorterAsc);for(var r=e.length-1,a=e[r]-e[0]||1,o=a/(r||1)/1e4,i=[e[0]],l=0;le[l]+o&&(a=Math.min(a,e[l+1]-e[l]),i.push(e[l+1]));return{vals:i,minDiff:a}},n.roundUp=function(t,e,n){for(var r,a=0,o=e.length-1,i=0,l=n?0:1,s=n?1:0,u=n?Math.ceil:Math.floor;at.length-1)return t[t.length-1];var n=e%1;return n*t[Math.ceil(e)]+(1-n)*t[Math.floor(e)]}},{"fast-isnumeric":18}],147:[function(t,e,n){"use strict";function r(t,e){return t.node().getBoundingClientRect()[e]}function a(t){return t.replace(/(<|<|<)/g,"\\lt ").replace(/(>|>|>)/g,"\\gt ")}function o(t,e,n){var r="math-output-"+d.randstr([],64),o=f.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(a(t));MathJax.Hub.Queue(["Typeset",MathJax.Hub,o.node()],function(){var e=f.select("body").select("#MathJax_SVG_glyphs");if(o.select(".MathJax_SVG").empty()||!o.select("svg").node())d.log("There was an error in the tex syntax.",t),n();else{var r=o.select("svg").node().getBoundingClientRect();n(o.select(".MathJax_SVG"),e,r)}o.remove()})}function i(t,e){for(var n=t||"",r=0;r]*>)/).map(function(t){var e=t.match(/<(\/?)([^ >]*)\s*(.*)>/i),r=e&&e[2].toLowerCase(),a=g[r];if(void 0!==a){var o=e[1],i=e[3],l=i.match(/^style\s*=\s*"([^"]+)"\s*/i);if("a"===r){if(o)return"";if("href"!==i.substr(0,4).toLowerCase())return"";var u=i.substr(4).replace(/["']/g,"").replace(/=/,""),c=document.createElement("a");return c.href=u,-1===v.indexOf(c.protocol)?"":''}if("br"===r)return"
";if(o)return"sup"===r?'':"sub"===r?'':"";var f=""}return n.xml_entity_encode(t).replace(/");a>0;a=e.indexOf("
",a+1))r.push(a);var o=0;r.forEach(function(t){for(var n=t+o,r=e.slice(0,n),a="",i=r.length-1;i>=0;i--){var l=r[i].match(/<(\/?).*>/i);if(l&&"
"!==r[i]){l[1]||(a=r[i]);break}}a&&(e.splice(n+1,0,a),e.splice(n,0,""),o+=2)});var i=e.join(""),u=i.split(/
/gi);return u.length>1&&(e=u.map(function(t,e){return''+t+""})),e.join("")}function c(t,e,n){var r,a,o,i=n.horizontalAlign,l=n.verticalAlign||"top",s=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a="bottom"===l?function(){return s.bottom-r.height}:"middle"===l?function(){return s.top+(s.height-r.height)/2}:function(){return s.top},o="right"===i?function(){return s.right-r.width}:"center"===i?function(){return s.left+(s.width-r.width)/2}:function(){return s.left},function(){return r=this.node().getBoundingClientRect(),this.style({top:a()-u.top+"px",left:o()-u.left+"px","z-index":1e3}),this}}var f=t("d3"),d=t("../lib"),h=t("../constants/xmlns_namespaces"),p=t("../constants/string_mappings");f.selection.prototype.appendSVG=function(t){for(var e=['',t,""].join(""),n=(new DOMParser).parseFromString(e,"application/xml"),r=n.documentElement.firstChild;r;)this.node().appendChild(this.node().ownerDocument.importNode(r,!0)),r=r.nextSibling;return n.querySelector("parsererror")?(d.log(n.querySelector("parsererror div").textContent),null):f.select(this.node().lastChild)},n.html_entity_decode=function(t){var e=f.select("body").append("div").style({display:"none"}).html(""),n=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":-1!==t.indexOf("<")||-1!==t.indexOf(">")?"":e.html(t).text()});return e.remove(),n},n.xml_entity_encode=function(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")},n.convertToTspans=function(t,e){function n(){h.empty()||(p=l.attr("class")+"-math",h.select("svg."+p).remove()),t.text("").style({visibility:"inherit","white-space":"pre"}),c=t.appendSVG(i),c||t.text(a),t.select("a").size()&&t.style("pointer-events","all"),e&&e.call(l)}var a=t.text(),i=u(a),l=t,s=!l.attr("data-notex")&&i.match(/([^$]*)([$]+[^$]*[$]+)([^$]*)/),c=a,h=f.select(l.node().parentNode);if(!h.empty()){var p=l.attr("class")?l.attr("class").split(" ")[0]:"text";p+="-math",h.selectAll("svg."+p).remove(),h.selectAll("g."+p+"-group").remove(),t.style({visibility:null});for(var g=t.node();g&&g.removeAttribute;g=g.parentNode)g.removeAttribute("data-bb");if(s){var v=d.getPlotDiv(l.node());(v&&v._promises||[]).push(new Promise(function(t){l.style({visibility:"hidden"});var a={fontSize:parseInt(l.style("font-size"),10)};o(s[2],a,function(a,o,i){h.selectAll("svg."+p).remove(),h.selectAll("g."+p+"-group").remove();var s=a&&a.select("svg");if(!s||!s.node())return n(),void t();var u=h.append("g").classed(p+"-group",!0).attr({"pointer-events":"none"});u.node().appendChild(s.node()),o&&o.node()&&s.node().insertBefore(o.node().cloneNode(!0),s.node().firstChild),s.attr({class:p,height:i.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=l.style("fill")||"black";s.select("g").attr({fill:c,stroke:c});var f=r(s,"width"),d=r(s,"height"),g=+l.attr("x")-f*{start:0,middle:.5,end:1}[l.attr("text-anchor")||"start"],v=parseInt(l.style("font-size"),10)||r(l,"height"),m=-v/4;"y"===p[0]?(u.attr({transform:"rotate("+[-90,+l.attr("x"),+l.attr("y")]+") translate("+[-f/2,m-d/2]+")"}),s.attr({x:+l.attr("x"),y:+l.attr("y")})):"l"===p[0]?s.attr({x:l.attr("x"),y:m-d/2}):"a"===p[0]?s.attr({x:0,y:m}):s.attr({x:g,y:+l.attr("y")+m-d/2}),e&&e.call(l,u),t(u)})}))}else n();return t}};var g={sup:'font-size:70%" dy="-0.6em',sub:'font-size:70%" dy="0.3em',b:"font-weight:bold",i:"font-style:italic",a:"",span:"",br:"",em:"font-style:italic;font-weight:bold"},v=["http:","https:","mailto:"],m=new RegExp("]*)?/?>","g"),y=Object.keys(p.entityToUnicode).map(function(t){return{regExp:new RegExp("&"+t+";","g"),sub:p.entityToUnicode[t]}}),x=Object.keys(p.unicodeToEntity).map(function(t){return{regExp:new RegExp(t,"g"),sub:"&"+p.unicodeToEntity[t]+";"}}),b=/(\r\n?|\n)/g;n.plainText=function(t){return(t||"").replace(m," ")},n.makeEditable=function(t,e,n){function r(){o(),i.style({opacity:0});var t,e=u.attr("class");(t=e?"."+e.split(" ")[0]+"-math-group":"[class*=-math-group]")&&f.select(i.node().parentNode).select(t).style({opacity:0})}function a(t){var e=t.node(),n=document.createRange();n.selectNodeContents(e);var r=window.getSelection();r.removeAllRanges(),r.addRange(n),e.focus()}function o(){var t=d.getPlotDiv(i.node()),e=f.select(t),r=e.select(".svg-container"),o=r.append("div");o.classed("plugin-editable editable",!0).style({position:"absolute","font-family":i.style("font-family")||"Arial","font-size":i.style("font-size")||12,color:n.fill||i.style("fill")||"black",opacity:1,"background-color":n.background||"transparent",outline:"#ffffff33 1px solid",margin:[-parseFloat(i.style("font-size"))/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(n.text||i.attr("data-unformatted")).call(c(i,r,n)).on("blur",function(){t._editing=!1,i.text(this.textContent).style({opacity:1});var e,n=f.select(this).attr("class");(e=n?"."+n.split(" ")[0]+"-math-group":"[class*=-math-group]")&&f.select(i.node().parentNode).select(e).style({opacity:0});var r=this.textContent;f.select(this).transition().duration(0).remove(),f.select(document).on("mouseup",null),l.edit.call(i,r)}).on("focus",function(){var e=this;t._editing=!0,f.select(document).on("mouseup",function(){if(f.event.target===e)return!1;document.activeElement===o.node()&&o.node().blur()})}).on("keyup",function(){27===f.event.which?(t._editing=!1,i.style({opacity:1}),f.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),l.cancel.call(i,this.textContent)):(l.input.call(i,this.textContent),f.select(this).call(c(i,r,n)))}).on("keydown",function(){13===f.event.which&&this.blur()}).call(a)}n||(n={});var i=this,l=f.dispatch("edit","input","cancel"),s=f.select(this.node()).style({"pointer-events":"all"}),u=e||s;return e&&s.style({"pointer-events":"none"}),n.immediate?r():u.on("click",r),f.rebind(this,l,"on")}},{"../constants/string_mappings":118,"../constants/xmlns_namespaces":119,"../lib":130,d3:15}],148:[function(t,e,n){"use strict";var r=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(e[0],e[1]))/Math.LN10;return r(n)||(n=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),n}},{"fast-isnumeric":18}],149:[function(t,e,n){"use strict";var r=t("../registry");e.exports=function(t){for(var e,n,a=r.layoutArrayContainers,o=r.layoutArrayRegexes,i=t.split("[")[0],l=0;l0)return t.substr(0,e)}var l=t("fast-isnumeric"),s=t("gl-mat4/fromQuat"),u=t("../registry"),c=t("../lib"),f=t("../plots/plots"),d=t("../plots/cartesian/axes"),h=t("../components/color");n.getGraphDiv=function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null===t||void 0===t)throw new Error("DOM element provided is null or undefined");return t},n.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&c.log("Clearing previous rejected promises from queue."),t._promises=[]},n.cleanLayout=function(t){var e,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1);var a=d.list({_fullLayout:t});for(e=0;e3?(v.x=1.02,v.xanchor="left"):v.x<-2&&(v.x=-.02,v.xanchor="right"),v.y>3?(v.y=1.02,v.yanchor="bottom"):v.y<-2&&(v.y=-.02,v.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var m=f.getSubplotIds(t,"gl3d");for(e=0;e1&&i.warn("Full array edits are incompatible with other edits",c);var m=n[""][""];if(u(m))e.set(null);else{if(!Array.isArray(m))return i.warn("Unrecognized full array edit value",c,m),!0;e.set(m)}return!p&&(f(g,v),d(t),!0)}var y,x,b,_,w,k,M,A=Object.keys(n).map(Number).sort(),T=e.get(),L=T||[],C=r(v,c).get(),z=[],S=-1,O=L.length;for(y=0;yL.length-(M?0:1))i.warn("index out of range",c,b);else if(void 0!==k)w.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",c,b),u(k)?z.push(b):M?("add"===k&&(k={}),L.splice(b,0,k),C&&C.splice(b,0,{})):i.warn("Unrecognized full object edit value",c,b,k),-1===S&&(S=b);else for(x=0;x=0;y--)L.splice(z[y],1),C&&C.splice(z[y],1);if(L.length?T||e.set(L):e.set(null),p)return!1;if(f(g,v),h!==o){var N;if(-1===S)N=A;else{for(O=Math.max(L.length,O),N=[],y=0;y=S);y++)N.push(b);for(y=S;y=t.data.length||a<-t.data.length)throw new Error(n+" must be valid indices for gd.data.");if(e.indexOf(a,r+1)>-1||a>=0&&e.indexOf(-t.data.length+a)>-1||a<0&&e.indexOf(t.data.length+a)>-1)throw new Error("each index in "+n+" must be unique.")}}function s(t,e,n){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),l(t,e,"currentIndices"),void 0===n||Array.isArray(n)||(n=[n]),void 0!==n&&l(t,n,"newIndices"),void 0!==n&&e.length!==n.length)throw new Error("current and new indices must be of equal length.")}function u(t,e,n){var r,a;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),r=0;r=0&&sF.range[0]?[1,2]:[2,1]);else{var H=F.range[0],V=F.range[1];q?(H<=0&&V<=0&&n(R+".autorange",!0),H<=0?H=V/1e6:V<=0&&(V=H/1e6),n(R+".range[0]",Math.log(H)/Math.LN10),n(R+".range[1]",Math.log(V)/Math.LN10)):(n(R+".range[0]",Math.pow(10,H)),n(R+".range[1]",Math.pow(10,V)))}else n(R+".autorange",!0);w.getComponentMethod("annotations","convertCoords")(t,j,T,n),w.getComponentMethod("images","convertCoords")(t,j,T,n)}else n(R+".autorange",!0)}else if(N.match(D.AX_NAME_PATTERN)){var X=x.nestedProperty(u,M).get(),U=(T||{}).type;U&&"-"!==U||(U="linear"),w.getComponentMethod("annotations","convertCoords")(t,X,U,n),w.getComponentMethod("images","convertCoords")(t,X,U,n)}var Y=S.containerArrayMatch(M);if(Y){o=Y.array,i=Y.index;var G=Y.property,Z=x.nestedProperty(s,o),W=(Z||[])[i]||{};if(""===i)-1===M.indexOf("updatemenus")&&(v.docalc=!0);else if(""===G){var $=T;S.isAddVal(T)?b[M]=null:S.isRemoveVal(T)?(b[M]=W,$=W):x.warn("unrecognized full object value",e),(r($,"x")||r($,"y")&&-1===M.indexOf("updatemenus"))&&(v.docalc=!0)}else!r(W,"x")&&!r(W,"y")||x.containsAny(M,["color","opacity","align","dash","updatemenus"])||(v.docalc=!0);d[o]||(d[o]={});var Q=d[o][i];Q||(Q=d[o][i]={}),Q[G]=T,delete e[M]}else if("reverse"===N)I.range?I.range.reverse():(n(R+".autorange",!0),I.range=[1,0]),j.autorange?v.docalc=!0:v.doplot=!0;else{var J=String(A.parts[1]||"");0===z.indexOf("scene")?"camera"===A.parts[1]?v.docamera=!0:v.doplot=!0:0===z.indexOf("geo")?v.doplot=!0:0===z.indexOf("ternary")?v.doplot=!0:"paper_bgcolor"===M?v.doplot=!0:"margin"===z||"autorange"===J||"rangemode"===J||"type"===J||"domain"===J||"fixedrange"===J||"scaleanchor"===J||"scaleratio"===J||-1!==M.indexOf("calendar")||M.match(/^(bar|box|font)/)?v.docalc=!0:!u._has("gl2d")||-1===M.indexOf("axis")&&"plot_bgcolor"!==M?"hiddenlabels"===M?v.docalc=!0:-1!==z.indexOf("legend")?v.dolegend=!0:-1!==M.indexOf("title")?v.doticks=!0:-1!==z.indexOf("bgcolor")?v.dolayoutstyle=!0:L>1&&x.containsAny(J,["tick","exponent","grid","zeroline"])?v.doticks=!0:-1!==M.indexOf(".linewidth")&&-1!==M.indexOf("axis")?v.doticks=v.dolayoutstyle=!0:L>1&&-1!==J.indexOf("line")?v.dolayoutstyle=!0:L>1&&"mirror"===J?v.doticks=v.dolayoutstyle=!0:"margin.pad"===M?v.doticks=v.dolayoutstyle=!0:-1!==["hovermode","dragmode"].indexOf(M)?v.domodebar=!0:-1===["hovermode","dragmode","height","width","autosize"].indexOf(M)&&(v.doplot=!0):v.doplot=!0,A.set(T)}}}for(o in d){S.applyContainerArrayChanges(t,x.nestedProperty(s,o),d[o],v)||(v.doplot=!0)}var K=u._axisConstraintGroups;for(var tt in _)for(i=0;i=l.length?l[0]:l[t]:l}function a(t){return Array.isArray(s)?t>=s.length?s[0]:s[t]:s}function o(t,e){var n=0;return function(){if(t&&++n===e)return t()}}if(t=O.getGraphDiv(t),!x.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var i=t._transitionData;i._frameQueue||(i._frameQueue=[]),n=k.supplyAnimationDefaults(n);var l=n.transition,s=n.frame;return void 0===i._frameWaitingCnt&&(i._frameWaitingCnt=0),new Promise(function(s,u){function c(){t.emit("plotly_animated"),window.cancelAnimationFrame(i._animationRaf),i._animationRaf=null}function f(){i._currentFrame&&i._currentFrame.onComplete&&i._currentFrame.onComplete();var e=i._currentFrame=i._frameQueue.shift();if(e){var n=e.name?e.name.toString():null;t._fullLayout._currentFrame=n,i._lastFrameAt=Date.now(),i._timeToNext=e.frameOpts.duration,k.transition(t,e.frame.data,e.frame.layout,O.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:n,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else c()}function d(){t.emit("plotly_animating"),i._lastFrameAt=-1/0,i._timeToNext=0,i._runningTransitions=0,i._currentFrame=null;var e=function(){i._animationRaf=window.requestAnimationFrame(e),Date.now()-i._lastFrameAt>i._timeToNext&&f()};e()}function h(t){return Array.isArray(l)?v>=l.length?t.transitionOpts=l[v]:t.transitionOpts=l[0]:t.transitionOpts=l,v++,t}var p,g,v=0,m=[],y=void 0===e||null===e,b=Array.isArray(e);if(y||b||!x.isPlainObject(e)){if(y||-1!==["string","number"].indexOf(typeof e))for(p=0;p0&&MM)&&A.push(g);m=A}}m.length>0?function(e){if(0!==e.length){for(var l=0;l=0;a--)if(x.isPlainObject(e[a])){var d=(u[e[a].name]||{}).name,h=e[a].name;d&&h&&"number"==typeof h&&u[d]&&(r++,x.warn('addFrames: overwriting frame "'+u[d].name+'" with a frame whose name of type "number" also equates to "'+d+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),r>5&&x.warn("addFrames: This API call has yielded too many warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),f.push({frame:k.supplyFrameDefaults(e[a]),index:n&&void 0!==n[a]&&null!==n[a]?n[a]:c+a})}f.sort(function(t,e){return t.index>e.index?-1:t.index=0;a--){if(o=f[a].frame,"number"==typeof o.name&&x.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!o.name)for(;u[o.name="frame "+t._transitionData._counter++];);if(u[o.name]){for(i=0;i=0;n--)r=e[n],o.push({type:"delete",index:r}),i.unshift({type:"insert",index:r,value:a[r]});var l=k.modifyFrames,s=k.modifyFrames,u=[t,i],c=[t,o];return _&&_.add(t,l,u,s,c),k.modifyFrames(t,o)},y.purge=function(t){t=O.getGraphDiv(t);var e=t._fullLayout||{},n=t._fullData||[];return k.cleanPlot([],{},n,e),k.purge(t),b.purge(t),e._container&&e._container.remove(),delete t._context,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,delete t._hmpixcount,delete t._hmlumcount,t}},{"../components/drawing":56,"../components/errorbars":62,"../constants/xmlns_namespaces":119,"../lib":130,"../lib/events":125,"../lib/queue":142,"../lib/svg_text_utils":147,"../plotly":160,"../plots/cartesian/axis_ids":168,"../plots/cartesian/constants":170,"../plots/cartesian/constraints":172,"../plots/cartesian/graph_interact":174,"../plots/plots":193,"../plots/polar":196,"../registry":200,"./helpers":150,"./manage_arrays":151,"./subroutines":157,d3:15,"fast-isnumeric":18}],153:[function(t,e,n){"use strict";function r(t,n){try{t._fullLayout._paper.style("background",n)}catch(t){e.exports.logging>0&&console.error(t)}}e.exports={staticPlot:!1,editable:!1,autosizable:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:"reset+autosize",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:"Edit chart",showSources:!1,displayModeBar:"hover",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,displaylogo:!0,plotGlPixelRatio:2,setBackground:r,topojsonURL:"https://cdn.plot.ly/",mapboxAccessToken:null,logging:!1,globalTransforms:[]}},{}],154:[function(t,e,n){"use strict";function r(t){var e,n;"area"===t?(e={attributes:x},n={}):(e=h.modules[t]._module,n=e.basePlotModule);var r={};r.type=null,w(r,g),w(r,e.attributes),n.attributes&&w(r,n.attributes),Object.keys(h.componentsRegistry).forEach(function(e){var n=h.componentsRegistry[e];n.schema&&n.schema.traces&&n.schema.traces[t]&&Object.keys(n.schema.traces[t]).forEach(function(e){d(r,n.schema.traces[t][e],e)})}),r.type=t;var a={meta:e.meta||{},attributes:l(r)};if(e.layoutAttributes){var o={};w(o,e.layoutAttributes),a.layoutAttributes=l(o)}return a}function a(){var t={};return w(t,v),Object.keys(h.subplotsRegistry).forEach(function(e){var n=h.subplotsRegistry[e];if(n.layoutAttributes)if("cartesian"===n.name)f(t,n,"xaxis"),f(t,n,"yaxis");else{var r="subplot"===n.attr?n.name:n.attr;f(t,n,r)}}),t=c(t),Object.keys(h.componentsRegistry).forEach(function(e){var n=h.componentsRegistry[e];n.layoutAttributes&&(n.schema&&n.schema.layout?Object.keys(n.schema.layout).forEach(function(e){d(t,n.schema.layout[e],e)}):d(t,n.layoutAttributes,n.name))}),{layoutAttributes:l(t)}}function o(t){var e=h.transformsRegistry[t],n=w({},e.attributes);return Object.keys(h.componentsRegistry).forEach(function(e){var r=h.componentsRegistry[e];r.schema&&r.schema.transforms&&r.schema.transforms[t]&&Object.keys(r.schema.transforms[t]).forEach(function(e){d(n,r.schema.transforms[t][e],e)})}),{attributes:l(n)}}function i(){var t={frames:p.extendDeep({},m)};return l(t),t.frames}function l(t){return s(t),u(t),t}function s(t){function e(t){return{valType:"string"}}function r(t,r,a){n.isValObject(t)?"data_array"===t.valType?(t.role="data",a[r+"src"]=e(r)):!0===t.arrayOk&&(a[r+"src"]=e(r)):p.isPlainObject(t)&&(t.role="object")}n.crawl(t,r)}function u(t){function e(t,e,n){if(t){var r=t[M];r&&(delete t[M],n[e]={items:{}},n[e].items[r]=t,n[e].role="object")}}n.crawl(t,e)}function c(t){return _(t,{radialaxis:b.radialaxis,angularaxis:b.angularaxis}),_(t,b.layout),t}function f(t,e,n){var r=p.nestedProperty(t,n),a=w({},e.layoutAttributes);a[k]=!0,r.set(a)}function d(t,e,n){var r=p.nestedProperty(t,n);r.set(w(r.get()||{},e))}var h=t("../registry"),p=t("../lib"),g=t("../plots/attributes"),v=t("../plots/layout_attributes"),m=t("../plots/frame_attributes"),y=t("../plots/animation_attributes"),x=t("../plots/polar/area_attributes"),b=t("../plots/polar/axis_attributes"),_=p.extendFlat,w=p.extendDeep,k="_isSubplotObj",M="_isLinkedToArray",A=[k,M,"_arrayAttrRegexps","_deprecated"];n.IS_SUBPLOT_OBJ=k,n.IS_LINKED_TO_ARRAY=M,n.DEPRECATED="_deprecated",n.UNDERSCORE_ATTRS=A,n.get=function(){var t={};h.allTypes.concat("area").forEach(function(e){t[e]=r(e)});var e={};return Object.keys(h.transformsRegistry).forEach(function(t){e[t]=o(t)}),{defs:{valObjects:p.valObjects,metaKeys:A.concat(["description","role"])},traces:t,layout:a(),transforms:e,frames:i(),animation:l(y)}},n.crawl=function(t,e,r){var a=r||0;Object.keys(t).forEach(function(r){var o=t[r];-1===A.indexOf(r)&&(e(o,r,t,a),n.isValObject(o)||p.isPlainObject(o)&&n.crawl(o,e,a+1))})},n.isValObject=function(t){return t&&void 0!==t.valType},n.findArrayAttributes=function(t){function e(e,n,i,l){if(o=o.slice(0,l).concat([n]),e&&("data_array"===e.valType||!0===e.arrayOk)){var s=r(o),u=p.nestedProperty(t,s).get();Array.isArray(u)&&a.push(s)}}function r(t){return t.join(".")}var a=[],o=[];if(n.crawl(t._module.attributes,e),t.transforms)for(var i=t.transforms,l=0;l=t[1]||a[1]<=t[0])&&(o[0]e[0]))return!0}return!1}var a=t("d3"),o=t("../plotly"),i=t("../registry"),l=t("../plots/plots"),s=t("../lib"),u=t("../components/color"),c=t("../components/drawing"),f=t("../components/titles"),d=t("../components/modebar");n.layoutStyles=function(t){return s.syncOrAsync([l.doAutoMargin,n.lsInner],t)},n.lsInner=function(t){var e,i=t._fullLayout,l=i._size,s=o.Axes.list(t);for(e=0;e1)};d(e.width)&&d(e.height)||r(new Error("Height and width should be pixel values."));var h=s(t,{format:"png",height:e.height,width:e.width}),p=h.gd;p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var g=l.getRedrawFunc(p);o.plot(p,h.data,h.layout,h.config).then(g).then(f).then(function(t){n(t)}).catch(function(t){r(t)})})}var a=t("fast-isnumeric"),o=t("../plotly"),i=t("../lib"),l=t("../snapshot/helpers"),s=t("../snapshot/cloneplot"),u=t("../snapshot/tosvg"),c=t("../snapshot/svgtoimg");e.exports=r},{"../lib":130,"../plotly":160,"../snapshot/cloneplot":201,"../snapshot/helpers":204,"../snapshot/svgtoimg":206,"../snapshot/tosvg":208,"fast-isnumeric":18}],159:[function(t,e,n){"use strict";function r(t,e,n,a,o,u){u=u||[];for(var c=Object.keys(t),d=0;d1&&s.push(i("object","layout"))),d.supplyDefaults(u);for(var c=u._fullData,v=n.length,m=0;m.3*f||o(r)||o(a))){var d=n.dtick/2;t+=t+d.8){var i=Number(n.substr(1));o.exactYears>.8&&i%12==0?t=E.tickIncrement(t,"M6","reverse")+1.5*S:o.exactMonths>.8?t=E.tickIncrement(t,"M1","reverse")+15.5*S:t-=S/2;var l=E.tickIncrement(t,n);if(l<=r)return l}return t}function o(t){var e,n,r=t.tickvals,a=t.ticktext,o=new Array(r.length),i=_.simpleMap(t.range,t.r2l),l=1.0001*i[0]-1e-4*i[1],u=1.0001*i[1]-1e-4*i[0],c=Math.min(l,u),f=Math.max(l,u),d=0;Array.isArray(a)||(a=[]);var h="category"===t.type?t.d2l_noadd:t.d2l;for("log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1)),n=0;nc&&e10||"01-01"!==r.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=S&&a<=10||e>=15*S)t._tickround="d";else if(e>=N&&a<=16||e>=O)t._tickround="M";else if(e>=D&&a<=19||e>=N)t._tickround="S";else{var o=t.l2r(n+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20}}else if(x(e)||"L"===e.charAt(0)){var i=t.range.map(t.r2d||Number);x(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(i[0]),Math.abs(i[1])),s=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(s)>3&&("SI"===t.exponentformat||"B"===t.exponentformat?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}function s(t,e,n){var r=t.tickfont||{};return{x:e,dx:0,dy:0,text:n||"",fontSize:r.size,font:r.family,fontColor:r.color}}function u(t,e,n,r){var a=t._tickround,o=n&&t.hoverformat||t.tickformat;r&&(a=x(a)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[a]);var i,l=_.formatDate(e.x,o,a,t.calendar),s=l.indexOf("\n");-1!==s&&(i=l.substr(s+1),l=l.substr(0,s)),r&&("00:00:00"===l||"00:00"===l?(l=i,i=""):8===l.length&&(l=l.replace(/:00$/,""))),i&&(n?"d"===a?l+=", "+i:l=i+(l?", "+l:""):t._inCalcTicks&&i===t._prevDateHead||(l+="
"+i,t._prevDateHead=i)),e.text=l}function c(t,e,n,r,a){var o=t.dtick,i=e.x;if(!r||"string"==typeof o&&"L"===o.charAt(0)||(o="L3"),t.tickformat||"string"==typeof o&&"L"===o.charAt(0))e.text=h(Math.pow(10,i),t,a,r);else if(x(o)||"D"===o.charAt(0)&&_.mod(i+.01,1)<.1)if(-1!==["e","E","power"].indexOf(t.exponentformat)){var l=Math.round(i);e.text=0===l?1:1===l?"10":l>1?"10"+l+"":"10\u2212"+-l+"",e.fontSize*=1.25}else e.text=h(Math.pow(10,i),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6);else{if("D"!==o.charAt(0))throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,_.mod(i,1)))),e.fontSize*=.75}if("D1"===t.dtick){var s=String(e.text).charAt(0);"0"!==s&&"1"!==s||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(i<0?.5:.25)))}}function f(t,e){var n=t._categories[Math.round(e.x)];void 0===n&&(n=""),e.text=String(n)}function d(t,e,n,r,a){"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(a="hide"),e.text=h(e.x,t,a,r)}function h(t,e,n,r){var a=t<0,o=e._tickround,i=n||e.exponentformat||"B",s=e._tickexponent,u=e.tickformat,c=e.separatethousands;if(r){var f={exponentformat:e.exponentformat,dtick:"none"===e.showexponent?e.dtick:x(t)?Math.abs(t)||1:1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};l(f),o=(Number(f._tickround)||0)+4,s=f._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return y.format(u)(t).replace(/-/g,"\u2212");var d=Math.pow(10,-o)/2;if("none"===i&&(s=0),(t=Math.abs(t))12||s<-15)?t+="e"+g:"E"===i?t+="E"+g:"power"===i?t+="\xd710"+g+"":"B"===i&&9===s?t+="B":"SI"!==i&&"B"!==i||(t+=V[s/3+5])}return a?"\u2212"+t:t}function p(t,e){var n,r,a=[];for(n=0;n1)for(r=1;r2e-6||((n-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},E.getAutoRange=function(t){var e,n=[],r=t._min[0].val,a=t._max[0].val;for(e=1;e0&&c>0&&f/c>d&&(s=i,u=l,d=f/c);if(r===a){var g=r-1,v=r+1;n="tozero"===t.rangemode?r<0?[g,0]:[0,v]:"nonnegative"===t.rangemode?[Math.max(0,g),Math.max(0,v)]:[g,v]}else d&&("linear"!==t.type&&"-"!==t.type||("tozero"===t.rangemode?(s.val>=0&&(s={val:0,pad:0}),u.val<=0&&(u={val:0,pad:0})):"nonnegative"===t.rangemode&&(s.val-d*s.pad<0&&(s={val:0,pad:0}),u.val<0&&(u={val:1,pad:0})),d=(u.val-s.val)/(t._length-s.pad-u.pad)),n=[s.val-d*s.pad,u.val+d*u.pad]);return n[0]===n[1]&&("tozero"===t.rangemode?n=n[0]<0?[n[0],0]:n[0]>0?[0,n[0]]:[0,1]:(n=[n[0]-1,n[0]+1],"nonnegative"===t.rangemode&&(n[0]=Math.max(0,n[0])))),h&&n.reverse(),_.simpleMap(n,t.l2r||Number)},E.doAutoRange=function(t){t._length||t.setScale();var e=t._min&&t._max&&t._min.length&&t._max.length;if(t.autorange&&e){t.range=E.getAutoRange(t);var n=t._input;n.range=t.range.slice(),n.autorange=t.autorange}},E.saveRangeInitial=function(t,e){for(var n=E.list(t,"",!0),r=!1,a=0;a=d?h=!1:l.val>=u&&l.pad<=d&&(t._min.splice(i,1),i--);h&&t._min.push({val:u,pad:y&&0===u?0:d})}if(r(c)){for(h=!0,i=0;i=c&&l.pad>=f?h=!1:l.val<=c&&l.pad<=f&&(t._max.splice(i,1),i--);h&&t._max.push({val:c,pad:y&&0===c?0:f})}}}if((t.autorange||!!_.nestedProperty(t,"rangeslider.autorange").get())&&e){t._min||(t._min=[]),t._max||(t._max=[]),n||(n={}),t._m||t.setScale();var o,i,l,s,u,c,f,d,h,p,g,v=e.length,m=n.padded?.05*t._length:0,y=n.tozero&&("linear"===t.type||"-"===t.type),b=r((t._m>0?n.ppadplus:n.ppadminus)||n.ppad||0),w=r((t._m>0?n.ppadminus:n.ppadplus)||n.ppad||0),k=r(n.vpadplus||n.vpad),M=r(n.vpadminus||n.vpad);for(o=0;o<6;o++)a(o);for(o=v-1;o>5;o--)a(o)}},E.autoBin=function(t,e,n,o,i){var l=_.aggNums(Math.min,null,t),s=_.aggNums(Math.max,null,t);if(i||(i=e.calendar),"category"===e.type)return{start:l-.5,end:s+.5,size:1};var u;if(n)u=(s-l)/n;else{var c=_.distinctVals(t),f=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),d=f*_.roundUp(c.minDiff/f,[.9,1.9,4.9,9.9],!0);u=Math.max(d,2*_.stdev(t)/Math.pow(t.length,o?.25:.4)),x(u)||(u=1)}var h;h="log"===e.type?{type:"linear",range:[l,s]}:{type:e.type,range:_.simpleMap([l,s],e.c2r,0,i),calendar:i},E.setConvert(h),E.autoTicks(h,u);var p,g=E.tickIncrement(E.tickFirst(h),h.dtick,"reverse",i);if("number"==typeof h.dtick){g=r(g,t,h,l,s);p=g+(1+Math.floor((s-g)/h.dtick))*h.dtick}else for("M"===h.dtick.charAt(0)&&(g=a(g,t,h.dtick,l,i)),p=g;p<=s;)p=E.tickIncrement(p,h.dtick,!1,i);return{start:e.c2r(g,0,i),end:e.c2r(p,0,i),size:h.dtick}},E.calcTicks=function(t){var e=_.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var n,r=t.nticks;r||("category"===t.type?(n=t.tickfont?1.2*(t.tickfont.size||12):15,r=t._length/n):(n="y"===t._id.charAt(0)?40:80,r=_.constrain(t._length/n,4,9)+1)),"array"===t.tickmode&&(r*=100),E.autoTicks(t,Math.abs(e[1]-e[0])/r),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}if(t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),l(t),"array"===t.tickmode)return o(t);t._tmin=E.tickFirst(t);var a=e[1]=s:u<=s)&&(i.push(u),!(i.length>1e3));u=E.tickIncrement(u,t.dtick,a,t.calendar));t._tmax=i[i.length-1],t._prevDateHead="",t._inCalcTicks=!0;for(var c=new Array(i.length),f=0;fC?(e/=C,n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="M"+12*i(e,n,I)):r>z?(e/=z,t.dtick="M"+i(e,1,j)):r>S?(t.dtick=i(e,S,q),t.tick0=_.dateTick0(t.calendar,!0)):r>O?t.dtick=i(e,O,j):r>N?t.dtick=i(e,N,F):r>D?t.dtick=i(e,D,F):(n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=i(e,n,I))}else if("log"===t.type){t.tick0=0;var a=_.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(a[1]-a[0])<1){var o=1.5*Math.abs((a[1]-a[0])/e);e=Math.abs(Math.pow(10,a[1])-Math.pow(10,a[0]))/o,n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="L"+i(e,n,I)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):(t.tick0=0,n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=i(e,n,I));if(0===t.dtick&&(t.dtick=1),!x(t.dtick)&&"string"!=typeof t.dtick){var l=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(l)}},E.tickIncrement=function(t,e,n,r){var a=n?-1:1;if(x(e))return t+a*e;var o=e.charAt(0),i=a*Number(e.substr(1));if("M"===o)return _.incrementMonth(t,i,r);if("L"===o)return Math.log(Math.pow(10,t)+i)/Math.LN10;if("D"===o){var l="D2"===e?H:B,s=t+.01*a,u=_.roundUp(_.mod(s,1),l,n);return Math.floor(s)+Math.log(y.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(e)},E.tickFirst=function(t){var e=t.r2l||Number,n=_.simpleMap(t.range,e),r=n[1]1&&e2*a}function o(t){for(var e,n=Math.max(1,(t.length-1)/1e3),r=0,a=0,o=0;o2*r}var i=t("fast-isnumeric"),l=t("../../lib"),s=t("../../constants/numerical").BADNUM;e.exports=function(t,e){return a(t,e)?"date":o(t)?"category":r(t)?"linear":"-"}},{"../../constants/numerical":117,"../../lib":130,"fast-isnumeric":18}],167:[function(t,e,n){"use strict";var r=t("tinycolor2").mix,a=t("../../registry"),o=t("../../lib"),i=t("../../components/color/attributes").lightFraction,l=t("./layout_attributes"),s=t("./tick_value_defaults"),u=t("./tick_mark_defaults"),c=t("./tick_label_defaults"),f=t("./category_order_defaults"),d=t("./set_convert"),h=t("./ordered_categories");e.exports=function(t,e,n,p,g){function v(n,r){return o.coerce2(t,e,l,n,r)}var m=p.letter,y=p.font||{},x="Click to enter "+(p.title||m.toUpperCase()+" axis")+" title",b=e.type;if("date"===b){a.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",p.calendar)}d(e,g);var _=n("color"),w=_===t.color?_:y.color;n("title",x),o.coerceFont(n,"titlefont",{family:y.family,size:Math.round(1.2*y.size),color:w}),n("autorange",!e.isValidRange(t.range))&&n("rangemode"),n("range"),e.cleanRange(),s(t,e,n,b),c(t,e,n,b,p),u(t,e,n,p),f(t,e,n);var k=v("linecolor",_),M=v("linewidth"),A=n("showline",!!k||!!M);A||(delete e.linecolor,delete e.linewidth),(A||e.ticks)&&n("mirror");var T=v("gridcolor",r(_,p.bgColor,i).toRgbString()),L=v("gridwidth");n("showgrid",p.showGrid||!!T||!!L)||(delete e.gridcolor,delete e.gridwidth);var C=v("zerolinecolor",_),z=v("zerolinewidth");return n("zeroline",p.showGrid||!!C||!!z)||(delete e.zerolinecolor,delete e.zerolinewidth),e._initialCategories="category"===b?h(m,e.categoryorder,e.categoryarray,p.data):[],e}},{"../../components/color/attributes":32,"../../lib":130,"../../registry":200,"./category_order_defaults":169,"./layout_attributes":176,"./ordered_categories":178,"./set_convert":182,"./tick_label_defaults":183,"./tick_mark_defaults":184,"./tick_value_defaults":185,tinycolor2:21}],168:[function(t,e,n){"use strict";function r(t,e,n){function r(t,n){for(var r=Object.keys(t),a=/^[xyz]axis[0-9]*/,o=[],i=0;i0;o&&(r="array");var i=n("categoryorder",r);"array"===i&&n("categoryarray"),o||"array"!==i||(e.categoryorder="trace")}}},{}],170:[function(t,e,n){"use strict";e.exports={idRegex:{x:/^x([2-9]|[1-9][0-9]+)?$/,y:/^y([2-9]|[1-9][0-9]+)?$/},attrRegex:{x:/^xaxis([2-9]|[1-9][0-9]+)?$/,y:/^yaxis([2-9]|[1-9][0-9]+)?$/},xAxisMatch:/^xaxis[0-9]*$/,yAxisMatch:/^yaxis[0-9]*$/,AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,MAXDIST:20,YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,BENDPX:1.5,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4]}},{}],171:[function(t,e,n){"use strict";function r(t,e,n,r){var a,o,l,s,u=r[i(e)].type,c=[];for(o=0;oo*p))for(n=0;n=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function u(t,e){return t?"nsew"===t?"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function c(t,e,n,r,a){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+n+", "+r+")").attr("d",a+"Z")}function f(t,e,n){return t.append("path").attr("class","zoombox-corners").style({fill:T.background,stroke:T.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+n+")").attr("d","M0,0Z")}function d(t){t.selectAll(".select-outline").remove()}function h(t,e,n,r,a,o){t.attr("d",r+"M"+n.l+","+n.t+"v"+n.h+"h"+n.w+"v-"+n.h+"h-"+n.w+"Z"),a||(t.transition().style("fill",o>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function p(t){b.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function g(t){return-1!==["lasso","select"].indexOf(t)}function v(t,e){return"M"+(t.l-.5)+","+(e-R-.5)+"h-3v"+(2*R+1)+"h3ZM"+(t.r+.5)+","+(e-R-.5)+"h3v"+(2*R+1)+"h-3Z"}function m(t,e){return"M"+(e-R-.5)+","+(t.t-.5)+"v-3h"+(2*R+1)+"v3ZM"+(e-R-.5)+","+(t.b+.5)+"v3h"+(2*R+1)+"v-3Z"}function y(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,R)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function x(t,e,n){var r,a,o,i,l,s,u=!1,c={},f={};for(r=0;rR||l>R?(wt="xy",i/rt>l/at?(l=i*at/rt,mt>o?yt.t=mt-l:yt.b=mt+l):(i=l*rt/at,vt>a?yt.l=vt-i:yt.r=vt+i),Mt.attr("d",y(yt))):r():!it||lzoom back out","long"),I=!1)}function U(e,n){var r=1===(F+q).length;if(e)$();else if(2!==n||r){if(1===n&&r){var a=F?tt[0]:K[0],i="s"===F||"w"===q?0:1,l=a._name+".range["+i+"]",s=o(a,i),u="left",c="middle";if(a.fixedrange)return;F?(c="n"===F?"top":"bottom","right"===a.side&&(u="right")):"e"===q&&(u="right"),t._context.showAxisRangeEntryBoxes&&b.select(pt).call(A.makeEditable,null,{immediate:!0,background:ft.paper_bgcolor,text:String(s),fill:a.tickfont?a.tickfont.color:"#444",horizontalAlign:u,verticalAlign:c}).on("edit",function(e){var n=a.d2r(e);void 0!==n&&w.relayout(t,l,n)})}}else W()}function Y(e){function n(t,e,n){function r(e){return t.l2r(o+(e-o)*n)}if(!t.fixedrange){var a=M.simpleMap(t.range,t.r2l),o=a[0]+(a[1]-a[0])*e;t.range=a.map(r)}}if(t._context.scrollZoom||ft._enablescrollzoom){if(t._transitioningWithDuration)return M.pauseEvent(e);var r=t.querySelector(".plotly");if(B(),!(r.scrollHeight-r.clientHeight>10||r.scrollWidth-r.clientWidth>10)){clearTimeout(Tt);var a=-e.deltaY;if(isFinite(a)||(a=e.wheelDelta/10),!isFinite(a))return void M.log("Did not find wheel motion attributes: ",e);var o,i=Math.exp(-Math.min(Math.max(a,-20),20)/100),l=Ct.draglayer.select(".nsewdrag").node().getBoundingClientRect(),s=(e.clientX-l.left)/l.width,u=(l.bottom-e.clientY)/l.height;if(q||st){for(q||(s=.5),o=0;o0;r--)n.push(e);return n}function a(t,e){for(var n=[],r=0;rJ.width||$<0||$>J.height)return b.unhoverRaw(t,e)}if(P="xval"in e?r(o,e.xval):a(L,W),E="yval"in e?r(o,e.yval):a(C,$),!p(P[0])||!p(E[0]))return g.warn("Fx.hover failed",e,t),b.unhoverRaw(t,e)}var K=1/0;for(I=0;I1||-1!==F.hoverinfo.indexOf("name")?F.name:void 0,index:!1,distance:Math.min(K,M.MAXDIST),color:y.defaultLine,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},i[q]&&(U.subplot=i[q]._subplot),Y=G.length,"array"===H){var tt=e[I];"pointNumber"in tt?(U.index=tt.pointNumber,H="closest"):(H="","xval"in tt&&(V=tt.xval,H="x"),"yval"in tt&&(X=tt.yval,H=H?"closest":"y"))}else V=P[B],X=E[B];if(F._module&&F._module.hoverPoints){var et=F._module.hoverPoints(U,V,X,H);if(et)for(var nt,rt=0;rtY&&(G.splice(0,Y),K=G[0].distance)}if(0===G.length)return b.unhoverRaw(t,e);var at="y"===D&&Z.length>1;G.sort(function(t,e){return t.distance-e.distance});var ot=y.combine(i.plot_bgcolor||y.background,i.paper_bgcolor),it={hovermode:D,rotateLabels:at,bgColor:ot,container:i._hoverlayer,outerContainer:i._paperdiv},lt=u(G,it);c(G,at?"xa":"ya"),f(lt,at);var st=t._hoverdata,ut=[];for(R=0;R15&&(n=n.substr(0,12)+"...")),void 0!==t.extraText&&(r+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(r+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(r+="y: "+t.yLabel+"
"),r+=(r?"z: ":"")+t.zLabel):T&&t[a+"Label"]===v?r=t[("x"===a?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&(r=t.yLabel):r=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",t.text&&!Array.isArray(t.text)&&(r+=(r?"
":"")+t.text),""===r&&(""===n&&e.remove(),r=n);var d=e.select("text.nums").call(x.font,t.fontFamily||u,t.fontSize||c,t.fontColor||f).call(x.setPosition,0,0).text(r).attr("data-notex",1).call(m.convertToTspans);d.selectAll("tspan.line").call(x.setPosition,0,0);var p=e.select("text.name"),g=0;n&&n!==r?(p.call(x.font,t.fontFamily||u,t.fontSize||c,s).text(n).call(x.setPosition,0,0).attr("data-notex",1).call(m.convertToTspans), +p.selectAll("tspan.line").call(x.setPosition,0,0),g=p.node().getBoundingClientRect().width+2*P):(p.remove(),e.select("rect").remove()),e.select("path").style({fill:s,stroke:f});var b,_,M=d.node().getBoundingClientRect(),L=t.xa._offset+(t.x0+t.x1)/2,z=t.ya._offset+(t.y0+t.y1)/2,S=Math.abs(t.x1-t.x0),O=Math.abs(t.y1-t.y0),N=M.width+D+P+g;t.ty0=w-M.top,t.bx=M.width+2*P,t.by=M.height+2*P,t.anchor="start",t.txwidth=M.width,t.tx2width=g,t.offset=0,o?(t.pos=L,b=z+O/2+N<=A,_=z-O/2-N>=0,"top"!==t.idealAlign&&b||!_?b?(z+=O/2,t.anchor="start"):t.anchor="middle":(z-=O/2,t.anchor="end")):(t.pos=z,b=L+S/2+N<=k,_=L-S/2-N>=0,"left"!==t.idealAlign&&b||!_?b?(L+=S/2,t.anchor="start"):t.anchor="middle":(L-=S/2,t.anchor="end")),d.attr("text-anchor",t.anchor),g&&p.attr("text-anchor",t.anchor),e.attr("transform","translate("+L+","+z+")"+(o?"rotate("+C+")":""))}),S}function c(t,e){function n(t){var e=t[0],n=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=n.pos+n.dp+n.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;r=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;r=!1}if(r){var u=0;for(i=0;ie.pmax&&u++;for(i=t.length-1;i>=0&&!(u<=0);i--)s=t[i],s.pos>e.pmax-1&&(s.del=!0,u--);for(i=0;i=0;l--)t[l].dp-=o;for(i=t.length-1;i>=0&&!(u<=0);i--)s=t[i],s.pos+s.dp+s.size>e.pmax&&(s.del=!0,u--)}}}for(var r,a,o,i,l,s,u,c=0,f=t.map(function(t,n){var r=t[e];return[{i:n,dp:0,pos:t.pos,posref:t.posref,size:t.by*("x"===r._id.charAt(0)?S:1)/2,pmin:r._offset,pmax:r._offset+r._length}]}).sort(function(t,e){return t[0].posref-e[0].posref});!r&&c<=t.length;){for(c++,r=!0,i=0;i.01&&p.pmin===g.pmin&&p.pmax===g.pmax){for(l=h.length-1;l>=0;l--)h[l].dp+=a;for(d.push.apply(d,h),f.splice(i+1,1),u=0,l=d.length-1;l>=0;l--)u+=d[l].dp;for(o=u/d.length,l=d.length-1;l>=0;l--)d[l].dp-=o;r=!1}else i++}f.forEach(n)}for(i=f.length-1;i>=0;i--){var v=f[i];for(l=v.length-1;l>=0;l--){var m=v[l],y=t[m.i];y.offset=m.dp,y.del=m.del}}}function f(t,e){t.each(function(t){var n=h.select(this);if(t.del)return void n.remove();var r="end"===t.anchor?-1:1,a=n.select("text.nums"),o={start:1,end:-1,middle:0}[t.anchor],i=o*(D+P),l=i+o*(t.txwidth+P),s=0,u=t.offset;"middle"===t.anchor&&(i-=t.tx2width/2,l-=t.tx2width/2),e&&(u*=-N,s=t.offset*O),n.select("path").attr("d","middle"===t.anchor?"M-"+t.bx/2+",-"+t.by/2+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(r*D+s)+","+(D+u)+"v"+(t.by/2-D)+"h"+r*t.bx+"v-"+t.by+"H"+(r*D+s)+"V"+(u-D)+"Z"),a.call(x.setPosition,i+s,u+t.ty0-t.by/2+P).selectAll("tspan.line").attr({x:a.attr("x"),y:a.attr("y")}),t.tx2width&&(n.select("text.name, text.name tspan.line").call(x.setPosition,l+o*P+s,u+t.ty0-t.by/2+P),n.select("rect").call(x.setRect,l+(o-1)*t.tx2width/2+s,u-t.by/2-1,t.tx2width,t.by+2))})}function d(t,e,n){if(!e.target)return!1;if(!n||n.length!==t._hoverdata.length)return!0;for(var r=n.length-1;r>=0;r--){var a=n[r],o=t._hoverdata[r];if(a.curveNumber!==o.curveNumber||String(a.pointNumber)!==String(o.pointNumber))return!0}return!1}var h=t("d3"),p=t("fast-isnumeric"),g=t("../../lib"),v=t("../../lib/events"),m=t("../../lib/svg_text_utils"),y=t("../../components/color"),x=t("../../components/drawing"),b=t("../../components/dragelement"),_=t("../../lib/override_cursor"),w=t("../../registry"),k=t("./axes"),M=t("./constants"),A=t("./dragbox"),T=t("../layout_attributes"),L=e.exports={};L.unhover=b.unhover,L.supplyLayoutDefaults=function(t,e,n){function r(n,r){return g.coerce(t,e,T,n,r)}r("dragmode");var a;if(e._has("cartesian")){a=(e._isHoriz=L.isHoriz(n))?"y":"x"}else a="closest";r("hovermode",a)},L.isHoriz=function(t){for(var e=!0,n=0;nt._lastHoverTime+M.HOVERMINTIME)return i(t,e,n),void(t._lastHoverTime=Date.now());t._hoverTimer=setTimeout(function(){i(t,e,n),t._lastHoverTime=Date.now(),t._hoverTimer=void 0},M.HOVERMINTIME)},L.getDistanceFunction=function(t,e,n,r){return"closest"===t?r||o(e,n):"x"===t?e:n},L.getClosest=function(t,e,n){if(!1!==n.index)n.index>=0&&n.indexc[1]-.01&&(e.domain=[0,1]),a.noneOrAll(t.domain,e.domain,[0,1])}return e}},{"../../lib":130,"fast-isnumeric":18}],180:[function(t,e,n){"use strict";e.exports=function(t,e,n){void 0===n&&(n=.5);var r=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=r[0]+(r[1]-r[0])*n,o=(a-r[0])*e;t.range=t._input.range=[t.l2r(a-o),t.l2r(a+o)]}},{}],181:[function(t,e,n){"use strict";function r(t){return t._id}var a=t("../../lib/polygon"),o=t("../../components/color"),i=t("./axes"),l=t("./constants"),s=a.filter,u=a.tester,c=l.MINSELECT;e.exports=function(t,e,n,a,f){function d(t){var e="y"===t._id.charAt(0)?1:0;return function(n){return t.p2d(n[e])}}function h(t,e){return t-e}var p,g=a.gd._fullLayout._zoomlayer,v=a.element.getBoundingClientRect(),m=a.plotinfo.xaxis._offset,y=a.plotinfo.yaxis._offset,x=e-v.left,b=n-v.top,_=x,w=b,k="M"+x+","+b,M=a.xaxes[0]._length,A=a.yaxes[0]._length,T=a.xaxes.map(r),L=a.yaxes.map(r),C=a.xaxes.concat(a.yaxes);"lasso"===f&&(p=s([[x,b]],l.BENDPX));var z=g.selectAll("path.select-outline").data([1,2]);z.enter().append("path").attr("class",function(t){return"select-outline select-outline-"+t}).attr("transform","translate("+m+", "+y+")").attr("d",k+"Z");var S,O,N,D,P,E=g.append("path").attr("class","zoombox-corners").style({fill:o.background,stroke:o.defaultLine,"stroke-width":1}).attr("transform","translate("+m+", "+y+")").attr("d","M0,0Z"),R=[],I=a.gd,j=[];for(S=0;Sd?h:i(t)?Number(t):h):h}var o=t("d3"),i=t("fast-isnumeric"),l=t("../../lib"),s=l.cleanNumber,u=l.ms2DateTime,c=l.dateTime2ms,f=t("../../constants/numerical"),d=f.FP_SAFE,h=f.BADNUM,p=t("./constants"),g=t("./axis_ids");e.exports=function(t,e){function n(e,n){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&n&&t.range&&2===t.range.length){var r=t.range[0],a=t.range[1];return.5*(r+a-3*w*Math.abs(r-a))}return h}function f(e,n,r){var a=c(e,r||t.calendar);if(a===h){if(!i(e))return h;a=c(new Date(+e))}return a}function v(e,n,r){return u(e,n,r||t.calendar)}function m(e){return t._categories[Math.round(e)]}function y(e){if(null!==e&&void 0!==e){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(e);var n=t._categories.length-1;return t._categoriesMap[e]=n,n}return h}function x(e){if(t._categoriesMap){var n=t._categoriesMap[e];if(void 0!==n)return n}if("number"==typeof e)return e}function b(e){return i(e)?o.round(t._b+t._m*e,2):h}function _(e){return(e-t._b)/t._m}e=e||{};var w=10;t.c2l="log"===t.type?n:a,t.l2c="log"===t.type?r:a,t.l2p=b,t.p2l=_,t.c2p="log"===t.type?function(t,e){return b(n(t,e))}:b,t.p2c="log"===t.type?function(t){return r(_(t))}:_,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=s,t.c2d=t.c2r=t.l2d=t.l2r=a,t.d2p=t.r2p=function(t){return b(s(t))},t.p2d=t.p2r=_):"log"===t.type?(t.d2r=t.d2l=function(t,e){return n(s(t),e)},t.r2d=t.r2c=function(t){return r(s(t))},t.d2c=t.r2l=s,t.c2d=t.l2r=a,t.c2r=n,t.l2d=r,t.d2p=function(e,n){return b(t.d2r(e,n))},t.p2d=function(t){return r(_(t))},t.r2p=function(t){return b(s(t))},t.p2r=_):"date"===t.type?(t.d2r=t.r2d=l.identity,t.d2c=t.r2c=t.d2l=t.r2l=f,t.c2d=t.c2r=t.l2d=t.l2r=v,t.d2p=t.r2p=function(t,e,n){return b(f(t,0,n))},t.p2d=t.p2r=function(t,e,n){return v(_(t),e,n)}):"category"===t.type&&(t.d2r=t.d2c=t.d2l=y,t.r2d=t.c2d=t.l2d=m,t.d2l_noadd=x,t.r2l=t.l2r=t.r2c=t.c2r=a,t.d2p=function(t){return b(x(t))},t.p2d=function(t){return m(_(t))},t.r2p=b,t.p2r=_),t.fraction2r=function(e){var n=t.r2l(t.range[0]),r=t.r2l(t.range[1]);return t.l2r(n+e*(r-n))},t.r2fraction=function(e){var n=t.r2l(t.range[0]),r=t.r2l(t.range[1]);return(t.r2l(e)-n)/(r-n)},t.cleanRange=function(e){e||(e="range");var n,r,a=l.nestedProperty(t,e).get(),o=(t._id||"x").charAt(0);if(r="date"===t.type?l.dfltRange(t.calendar):"y"===o?p.DFLTRANGEY:p.DFLTRANGEX,r=r.slice(),!a||2!==a.length)return void l.nestedProperty(t,e).set(r);for("date"===t.type&&(a[0]=l.cleanDate(a[0],h,t.calendar),a[1]=l.cleanDate(a[1],h,t.calendar)),n=0;n<2;n++)if("date"===t.type){if(!l.isDateTime(a[n],t.calendar)){t[e]=r;break}if(t.r2l(a[0])===t.r2l(a[1])){var s=l.constrain(t.r2l(a[0]),l.MIN_MS+1e3,l.MAX_MS-1e3);a[0]=t.l2r(s-1e3),a[1]=t.l2r(s+1e3);break}}else{if(!i(a[n])){if(!i(a[1-n])){t[e]=r;break}a[n]=a[1-n]*(n?10:.1)}if(a[n]<-d?a[n]=-d:a[n]>d&&(a[n]=d),a[0]===a[1]){var u=Math.max(1,Math.abs(1e-6*a[0]));a[0]-=u,a[1]+=u}}},t.setScale=function(n){var r=e._size,a=t._id.charAt(0);if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var o=g.getFromId({_fullLayout:e},t.overlaying);t.domain=o.domain}var i=n&&t._r?"_r":"range",s=t.calendar;t.cleanRange(i);var u=t.r2l(t[i][0],s),c=t.r2l(t[i][1],s);if("y"===a?(t._offset=r.t+(1-t.domain[1])*r.h,t._length=r.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=r.l+t.domain[0]*r.w,t._length=r.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),!isFinite(t._m)||!isFinite(t._b))throw l.notifier("Something went wrong with axis scaling","long"),e._replotting=!1,new Error("axis scaling")},t.makeCalcdata=function(e,n){var r,a,o,i="date"===t.type&&e[n+"calendar"];if(n in e)for(r=e[n],a=new Array(r.length),o=0;o0?Number(c):u;else if("string"!=typeof c)e.dtick=u;else{var f=c.charAt(0),d=c.substr(1);d=r(d)?Number(d):0,(d<=0||!("date"===i&&"M"===f&&d===Math.round(d)||"log"===i&&"L"===f||"log"===i&&"D"===f&&(1===d||2===d)))&&(e.dtick=u)}var h="date"===i?a.dateTick0(e.calendar):0,p=n("tick0",h);"date"===i?e.tick0=a.cleanDate(p,h):r(p)&&"D1"!==c&&"D2"!==c?e.tick0=Number(p):e.tick0=h}else{var g=n("tickvals");void 0===g?e.tickmode="auto":n("ticktext")}}},{"../../constants/numerical":117,"../../lib":130,"fast-isnumeric":18}],186:[function(t,e,n){"use strict";var r=t("d3"),a=t("../../plotly"),o=t("../../registry"),i=t("../../components/drawing"),l=t("./axes"),s=/((x|y)([2-9]|[1-9][0-9]+)?)axis$/;e.exports=function(t,e,n,u){function c(e,n){function r(e,n){for(a=0;an.duration?(h(),M=window.cancelAnimationFrame(g)):M=window.requestAnimationFrame(g)}var v=t._fullLayout,m=[],y=function(t){var e,n,r,a,o,i={};for(e in t)if(n=e.split("."),r=n[0].match(s)){var l=r[1],u=l+"axis";if(a=v[u],o={},Array.isArray(t[e])?o.to=t[e].slice(0):Array.isArray(t[e].range)&&(o.to=t[e].range.slice(0)),!o.to)continue;o.axisName=u,o.length=a._length,m.push(l),i[l]=o}return i}(e),x=Object.keys(y),b=function(t,e,n){var r,a,o,i=t._plots,l=[];for(r in i){var s=i[r];if(-1===l.indexOf(s)){var u=s.xaxis._id,c=s.yaxis._id,f=s.xaxis.range,d=s.yaxis.range;s.xaxis._r=s.xaxis.range.slice(),s.yaxis._r=s.yaxis.range.slice(),a=n[u]?n[u].to:f,o=n[c]?n[c].to:d,f[0]===a[0]&&f[1]===a[1]&&d[0]===o[0]&&d[1]===o[1]||-1===e.indexOf(u)&&-1===e.indexOf(c)||l.push(s)}}return l}(v,x,y);if(!b.length)return!1;var _;u&&(_=u());var w,k,M,A=r.ease(n.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(M),M=null,p()}),w=Date.now(),M=window.requestAnimationFrame(g),Promise.resolve()}},{"../../components/drawing":56,"../../plotly":160,"../../registry":200,"./axes":165,d3:15}],187:[function(t,e,n){"use strict";function r(t,e){if("-"===t.type){var n=t._id,r=n.charAt(0);-1!==n.indexOf("scene")&&(n=r);var u=a(e,n,r);if(u){if("histogram"===u.type&&r==={v:"y",h:"x"}[u.orientation||"v"])return void(t.type="linear");var c=r+"calendar",f=u[c];if(i(u,r)){for(var d,h=o(u),p=[],g=0;g0?".":"")+a;u.isPlainObject(o)?l(o,e,i,r+1):e(i,a,o)}})}var s=t("../plotly"),u=t("../lib");n.manageCommandObserver=function(t,e,a,o){var i={},l=!0;e&&e._commandObserver&&(i=e._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var s=n.hasSimpleAPICommandBindings(t,a,i.lookupTable);if(e&&e._commandObserver){if(s)return i;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,i}if(s){r(t,s,i.cache),i.check=function(){if(l){var e=r(t,s,i.cache);return e.changed&&o&&void 0!==i.lookupTable[e.value]&&(i.disable(),Promise.resolve(o({value:e.value,type:s.type,prop:s.prop,traces:s.traces,index:i.lookupTable[e.value]})).then(i.enable,i.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f=e.width-20?(o["text-anchor"]="start",o.x=5):(o["text-anchor"]="end",o.x=e._paper.attr("width")-7),n.attr(o);var l=n.select(".js-link-to-tool"),s=n.select(".js-link-spacer"),u=n.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&r(t,l),s.text(l.text()&&u.text()?" - ":"")}},h.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||"https://plot.ly",n=i.select(t).append("div").attr("id","hiddenform").style("display","none"),r=n.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return r.append("input").attr({type:"text",name:"data"}).node().value=h.graphJson(t,!1,"keepdata"),r.node().submit(),n.remove(),t.emit("plotly_afterexport"),!1},h.supplyDefaults=function(t){var e,n=t._fullLayout||{},r=t._fullLayout={},a=t.layout||{},o=t._fullData||[],i=t._fullData=[],l=t.data||[];if(t._transitionData||h.createTransitionData(t),n._initialAutoSizeIsDone){var u=n.width,c=n.height;h.supplyLayoutGlobalDefaults(a,r),a.width||(r.width=u),a.height||(r.height=c)}else{h.supplyLayoutGlobalDefaults(a,r);var f=!a.width||!a.height,d=r.autosize,p=t._context&&t._context.autosizable;f&&(d||p)?h.plotAutoSize(t,a,r):f&&h.sanitizeMargins(t),!d&&f&&(a.width=r.width,a.height=r.height)}r._initialAutoSizeIsDone=!0,r._dataLength=l.length,r._globalTransforms=(t._context||{}).globalTransforms,h.supplyDataDefaults(l,i,a,r),r._has=h._hasPlotType.bind(r);var g=r._modules;for(e=0;e0){var f=o(t._boundingBoxMargins),d=f.left+f.right,p=f.bottom+f.top,g=1-2*s,v=n._container&&n._container.node?n._container.node().getBoundingClientRect():{width:n.width,height:n.height};r=Math.round(g*(v.width-d)),a=Math.round(g*(v.height-p))}else{var m=u?window.getComputedStyle(t):{};r=parseFloat(m.width)||n.width,a=parseFloat(m.height)||n.height}var y=h.layoutAttributes.width.min,x=h.layoutAttributes.height.min;r1,_=!e.height&&Math.abs(n.height-a)>1;(_||b)&&(b&&(n.width=r),_&&(n.height=a)),t._initialAutoSize||(t._initialAutoSize={width:r,height:a}),h.sanitizeMargins(n)},h.supplyLayoutModuleDefaults=function(t,e,n,r){var a,o;s.Axes.supplyLayoutDefaults(t,e,n);var i=e._basePlotModules;for(a=0;a.5*r.width&&(n.l=n.r=0),n.b+n.t>.5*r.height&&(n.b=n.t=0),r._pushmargin[e]={l:{val:n.x,size:n.l+a},r:{val:n.x,size:n.r+a},b:{val:n.y,size:n.b+a},t:{val:n.y,size:n.t+a}}}else delete r._pushmargin[e];r._replotting||h.doAutoMargin(t)}},h.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),e._pushmargin||(e._pushmargin={});var n=e._size,r=JSON.stringify(n),a=Math.max(e.margin.l||0,0),o=Math.max(e.margin.r||0,0),i=Math.max(e.margin.t||0,0),u=Math.max(e.margin.b||0,0),c=e._pushmargin;if(!1!==e.margin.autoexpand){c.base={l:{val:0,size:a},r:{val:1,size:o},t:{val:1,size:i},b:{val:0,size:u}};for(var f=Object.keys(c),d=0;dv){var M=(m*w+(k-e.width)*v)/(w-v),A=(k*(1-v)+(m-e.width)*(1-w))/(w-v);M>=0&&A>=0&&M+A>a+o&&(a=M,o=A)}}if(l(x)&&c[_].t){var T=c[_].t.val,L=c[_].t.size;if(T>y){var C=(x*T+(L-e.height)*y)/(T-y),z=(L*(1-y)+(x-e.height)*(1-T))/(T-y);C>=0&&z>=0&&C+z>u+i&&(u=C,i=z)}}}}if(n.l=Math.round(a),n.r=Math.round(o),n.t=Math.round(i),n.b=Math.round(u),n.p=Math.round(e.margin.pad),n.w=Math.round(e.width)-n.l-n.r,n.h=Math.round(e.height)-n.t-n.b,!e._replotting&&"{}"!==r&&r!==JSON.stringify(e._size))return s.plot(t)},h.graphJson=function(t,e,n,r,a){function o(t){if("function"==typeof t)return null;if(c.isPlainObject(t)){var e,r,a={};for(e in t)if("function"!=typeof t[e]&&-1===["_","["].indexOf(e.charAt(0))){if("keepdata"===n){if("src"===e.substr(e.length-3))continue}else if("keepstream"===n){if("string"==typeof(r=t[e+"src"])&&r.indexOf(":")>0&&!c.isPlainObject(t.stream))continue}else if("keepall"!==n&&"string"==typeof(r=t[e+"src"])&&r.indexOf(":")>0)continue;a[e]=o(t[e])}return a}return Array.isArray(t)?t.map(o):c.isJSDate(t)?c.ms2DateTimeLocal(+t):t}(a&&e&&!t._fullData||a&&!e&&!t._fullLayout)&&h.supplyDefaults(t);var i=a?t._fullData:t.data,l=a?t._fullLayout:t.layout,s=(t._transitionData||{})._frames,u={data:(i||[]).map(function(t){var n=o(t);return e&&delete n.fit,n})};return e||(u.layout=o(l)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),s&&(u.frames=o(s)),"object"===r?u:JSON.stringify(u)},h.modifyFrames=function(t,e){var n,r,a,o=t._transitionData._frames,i=t._transitionData._frameHash;for(n=0;n0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){_=!0}),a.redraw&&t._transitionData._interruptCallbacks.push(function(){return s.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var i,l,u=0,f=0,h=t._fullLayout._basePlotModules,p=!1;if(n)for(l=0;l=0,C=L?f.angularAxis.domain:r.extent(k),z=Math.abs(k[1]-k[0]);A&&!M&&(z=0);var S=C.slice();T&&M&&(S[1]+=z);var O=f.angularAxis.ticksCount||4;O>8&&(O=O/(O/8)+O%8),f.angularAxis.ticksStep&&(O=(S[1]-S[0])/O);var N=f.angularAxis.ticksStep||(S[1]-S[0])/(O*(f.minorTicks+1));w&&(N=Math.max(Math.round(N),1)),S[2]||(S[2]=N);var D=r.range.apply(this,S);if(D=D.map(function(t,e){return parseFloat(t.toPrecision(12))}), +l=r.scale.linear().domain(S.slice(0,2)).range("clockwise"===f.direction?[0,360]:[360,0]),c.layout.angularAxis.domain=l.domain(),c.layout.angularAxis.endPadding=T?z:0,void 0===(e=r.select(this).select("svg.chart-root"))||e.empty()){var P=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),E=this.appendChild(this.ownerDocument.importNode(P.documentElement,!0));e=r.select(E)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var R,I=e.select(".chart-group"),j={fill:"none",stroke:f.tickColor},F={"font-size":f.font.size,"font-family":f.font.family,fill:f.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+f.font.outlineColor}).join(",")};if(f.showLegend){R=e.select(".legend-group").attr({transform:"translate("+[x,f.margin.top]+")"}).style({display:"block"});var q=h.map(function(t,e){var n=i.util.cloneJson(t);return n.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",n.visibleInLegend=void 0===t.visibleInLegend||t.visibleInLegend,n.color="LinePlot"===t.geometry?t.strokeColor:t.color,n});i.Legend().config({data:h.map(function(t,e){return t.name||"Element"+e}),legendConfig:o({},i.Legend.defaultConfig().legendConfig,{container:R,elements:q,reverseOrder:f.legend.reverseOrder})})();var B=R.node().getBBox();x=Math.min(f.width-B.width-f.margin.left-f.margin.right,f.height-f.margin.top-f.margin.bottom)/2,x=Math.max(10,x),_=[f.margin.left+x,f.margin.top+x],a.range([0,x]),c.layout.radialAxis.domain=a.domain(),R.attr("transform","translate("+[_[0]+x,_[1]-x]+")")}else R=e.select(".legend-group").style({display:"none"});e.attr({width:f.width,height:f.height}).style({opacity:f.opacity}),I.attr("transform","translate("+_+")").style({cursor:"crosshair"});var H=[(f.width-(f.margin.left+f.margin.right+2*x+(B?B.width:0)))/2,(f.height-(f.margin.top+f.margin.bottom+2*x))/2];if(H[0]=Math.max(0,H[0]),H[1]=Math.max(0,H[1]),e.select(".outer-group").attr("transform","translate("+H+")"),f.title){var V=e.select("g.title-group text").style(F).text(f.title),X=V.node().getBBox();V.attr({x:_[0]-X.width/2,y:_[1]-x-20})}var U=e.select(".radial.axis-group");if(f.radialAxis.gridLinesVisible){var Y=U.selectAll("circle.grid-circle").data(a.ticks(5));Y.enter().append("circle").attr({class:"grid-circle"}).style(j),Y.attr("r",a),Y.exit().remove()}U.select("circle.outside-circle").attr({r:x}).style(j);var G=e.select("circle.background-circle").attr({r:x}).style({fill:f.backgroundColor,stroke:f.stroke});if(f.radialAxis.visible){var Z=r.svg.axis().scale(a).ticks(5).tickSize(5);U.call(Z).attr({transform:"rotate("+f.radialAxis.orientation+")"}),U.selectAll(".domain").style(j),U.selectAll("g>text").text(function(t,e){return this.textContent+f.radialAxis.ticksSuffix}).style(F).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===f.radialAxis.tickOrientation?"rotate("+-f.radialAxis.orientation+") translate("+[0,F["font-size"]]+")":"translate("+[0,F["font-size"]]+")"}}),U.selectAll("g>line").style({stroke:"black"})}var W=e.select(".angular.axis-group").selectAll("g.angular-tick").data(D),$=W.enter().append("g").classed("angular-tick",!0);W.attr({transform:function(t,e){return"rotate("+s(t,e)+")"}}).style({display:f.angularAxis.visible?"block":"none"}),W.exit().remove(),$.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(f.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(f.minorTicks+1)==0)}).style(j),$.selectAll(".minor").style({stroke:f.minorTickColor}),W.select("line.grid-line").attr({x1:f.tickLength?x-f.tickLength:0,x2:x}).style({display:f.angularAxis.gridLinesVisible?"block":"none"}),$.append("text").classed("axis-text",!0).style(F);var Q=W.select("text.axis-text").attr({x:x+f.labelOffset,dy:".35em",transform:function(t,e){var n=s(t,e),r=x+f.labelOffset,a=f.angularAxis.tickOrientation;return"horizontal"==a?"rotate("+-n+" "+r+" 0)":"radial"==a?n<270&&n>90?"rotate(180 "+r+" 0)":null:"rotate("+(n<=180&&n>0?-90:90)+" "+r+" 0)"}}).style({"text-anchor":"middle",display:f.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(f.minorTicks+1)!=0?"":w?w[t]+f.angularAxis.ticksSuffix:t+f.angularAxis.ticksSuffix}).style(F);f.angularAxis.rewriteTicks&&Q.text(function(t,e){return e%(f.minorTicks+1)!=0?"":f.angularAxis.rewriteTicks(this.textContent,e)});var J=r.max(I.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));R.attr({transform:"translate("+[x+J,f.margin.top]+")"});var K=e.select("g.geometry-group").selectAll("g").size()>0,tt=e.select("g.geometry-group").selectAll("g.geometry").data(h);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),h[0]||K){var et=[];h.forEach(function(t,e){var n={};n.radialScale=a,n.angularScale=l,n.container=tt.filter(function(t,n){return n==e}),n.geometry=t.geometry,n.orientation=f.orientation,n.direction=f.direction,n.index=e,et.push({data:t,geometryConfig:n})});var nt=r.nest().key(function(t,e){return void 0!==t.data.groupId||"unstacked"}).entries(et),rt=[];nt.forEach(function(t,e){"unstacked"===t.key?rt=rt.concat(t.values.map(function(t,e){return[t]})):rt.push(t.values)}),rt.forEach(function(t,e){var n;n=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var r=t.map(function(t,e){return o(i[n].defaultConfig(),t)});i[n]().config(r)()})}var at,ot,it=e.select(".guides-group"),lt=e.select(".tooltips-group"),st=i.tooltipPanel().config({container:lt,fontSize:8})(),ut=i.tooltipPanel().config({container:lt,fontSize:8})(),ct=i.tooltipPanel().config({container:lt,hasTick:!0})();if(!M){var ft=it.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});I.on("mousemove.angular-guide",function(t,e){var n=i.util.getMousePos(G).angle;ft.attr({x2:-x,transform:"rotate("+n+")"}).style({opacity:.5});var r=(n+180+360-f.orientation)%360;at=l.invert(r);var a=i.util.convertToCartesian(x+12,n+180);st.text(i.util.round(at)).move([a[0]+_[0],a[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){it.select("line").style({opacity:0})})}var dt=it.select("circle").style({stroke:"grey",fill:"none"});I.on("mousemove.radial-guide",function(t,e){var n=i.util.getMousePos(G).radius;dt.attr({r:n}).style({opacity:.5}),ot=a.invert(i.util.getMousePos(G).radius);var r=i.util.convertToCartesian(n,f.radialAxis.orientation);ut.text(i.util.round(ot)).move([r[0]+_[0],r[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){dt.style({opacity:0}),ct.hide(),st.hide(),ut.hide()}),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(t,n){var a=r.select(this),o=a.style("fill"),l="black",s=a.style("opacity")||1;if(a.attr({"data-opacity":s}),"none"!=o){a.attr({"data-fill":o}),l=r.hsl(o).darker().toString(),a.style({fill:l,opacity:1});var u={t:i.util.round(t[0]),r:i.util.round(t[1])};M&&(u.t=w[t[0]]);var c="t: "+u.t+", r: "+u.r,f=this.getBoundingClientRect(),d=e.node().getBoundingClientRect(),h=[f.left+f.width/2-H[0]-d.left,f.top+f.height/2-H[1]-d.top];ct.config({color:l}).text(c),ct.move(h)}else o=a.style("stroke"),a.attr({"data-stroke":o}),l=r.hsl(o).darker().toString(),a.style({stroke:l,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=r.event.which)return!1;r.select(this).attr("data-fill")&&ct.show()}).on("mouseout.tooltip",function(t,e){ct.hide();var n=r.select(this),a=n.attr("data-fill");a?n.style({fill:a,opacity:n.attr("data-opacity")}):n.style({stroke:n.attr("data-stroke"),opacity:n.attr("data-opacity")})})}),d}var e,n,a,l,s={data:[],layout:{}},u={},c={},f=r.dispatch("hover"),d={};return d.render=function(e){return t(e),this},d.config=function(t){if(!arguments.length)return s;var e=i.util.cloneJson(t);return e.data.forEach(function(t,e){s.data[e]||(s.data[e]={}),o(s.data[e],i.Axis.defaultConfig().data[0]),o(s.data[e],t)}),o(s.layout,i.Axis.defaultConfig().layout),o(s.layout,e.layout),this},d.getLiveConfig=function(){return c},d.getinputConfig=function(){return u},d.radialScale=function(t){return a},d.angularScale=function(t){return l},d.svg=function(){return e},r.rebind(d,f,"on"),d},i.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:r.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},i.util={},i.DATAEXTENT="dataExtent",i.AREA="AreaChart",i.LINE="LinePlot",i.DOT="DotPlot",i.BAR="BarChart",i.util._override=function(t,e){for(var n in t)n in e&&(e[n]=t[n])},i.util._extend=function(t,e){for(var n in t)e[n]=t[n]},i.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},i.util.dataFromEquation2=function(t,e){var n=e||6;return r.range(0,360+n,n).map(function(e,n){var r=e*Math.PI/180;return[e,t(r)]})},i.util.dataFromEquation=function(t,e,n){var a=e||6,o=[],i=[];r.range(0,360+a,a).forEach(function(e,n){var r=e*Math.PI/180,a=t(r);o.push(e),i.push(a)});var l={t:o,r:i};return n&&(l.name=n),l},i.util.ensureArray=function(t,e){if(void 0===t)return null;var n=[].concat(t);return r.range(e).map(function(t,e){return n[e]||n[0]})},i.util.fillArrays=function(t,e,n){return e.forEach(function(e,r){t[e]=i.util.ensureArray(t[e],n)}),t},i.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},i.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var n=e.shift();return t[n]&&(!e.length||objHasKeys(t[n],e))},i.util.sumArrays=function(t,e){return r.zip(t,e).map(function(t,e){return r.sum(t)})},i.util.arrayLast=function(t){return t[t.length-1]},i.util.arrayEqual=function(t,e){for(var n=Math.max(t.length,e.length,1);n-- >=0&&t[n]===e[n];);return-2===n},i.util.flattenArray=function(t){for(var e=[];!i.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},i.util.deduplicate=function(t){return t.filter(function(t,e,n){return n.indexOf(t)==e})},i.util.convertToCartesian=function(t,e){var n=e*Math.PI/180;return[t*Math.cos(n),t*Math.sin(n)]},i.util.round=function(t,e){var n=e||2,r=Math.pow(10,n);return Math.round(t*r)/r},i.util.getMousePos=function(t){var e=r.mouse(t.node()),n=e[0],a=e[1],o={};return o.x=n,o.y=a,o.pos=e,o.angle=180*(Math.atan2(a,n)+Math.PI)/Math.PI,o.radius=Math.sqrt(n*n+a*a),o},i.util.duplicatesCount=function(t){for(var e,n={},r={},a=0,o=t.length;a0)){var l=r.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:d(i),transform:function(e,n){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return v.fill(n,a,o)},"fill-opacity":0,stroke:function(t,e){return v.stroke(n,a,o)},"stroke-width":function(t,e){return v["stroke-width"](n,a,o)},"stroke-dasharray":function(t,e){return v["stroke-dasharray"](n,a,o)},opacity:function(t,e){return v.opacity(n,a,o)},display:function(t,e){return v.display(n,a,o)}})}};var h=t.angularScale.range(),p=Math.abs(h[1]-h[0])/s[0].length*Math.PI/180,g=r.svg.arc().startAngle(function(t){return-p/2}).endAngle(function(t){return p/2}).innerRadius(function(e){return t.radialScale(c+(e[2]||0))}).outerRadius(function(e){return t.radialScale(c+(e[2]||0))+t.radialScale(e[1])});f.arc=function(e,n,a){r.select(this).attr({class:"mark arc",d:g,transform:function(e,n){return"rotate("+(t.orientation+u(e[0])+90)+")"}})};var v={fill:function(t,n,r){return e[r].data.color},stroke:function(t,n,r){return e[r].data.strokeColor},"stroke-width":function(t,n,r){return e[r].data.strokeSize+"px"},"stroke-dasharray":function(t,n,r){return a[e[r].data.strokeDash]},opacity:function(t,n,r){return e[r].data.opacity},display:function(t,n,r){return void 0===e[r].data.visible||e[r].data.visible?"block":"none"}},m=r.select(this).selectAll("g.layer").data(s);m.enter().append("g").attr({class:"layer"});var y=m.selectAll("path.mark").data(function(t,e){return t});y.enter().append("path").attr({class:"mark"}),y.style(v).each(f[t.geometryType]),y.exit().remove(),m.exit().remove()})}var e=[i.PolyChart.defaultConfig()],n=r.dispatch("hover"),a={solid:"none",dash:[5,2],dot:[2,5]};return t.config=function(t){return arguments.length?(t.forEach(function(t,n){e[n]||(e[n]={}),o(e[n],i.PolyChart.defaultConfig()),o(e[n],t)}),this):e},t.getColorScale=function(){},r.rebind(t,n,"on"),t},i.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:r.scale.category20()}}},i.BarChart=function(){return i.PolyChart()},i.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},i.AreaChart=function(){return i.PolyChart()},i.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},i.DotPlot=function(){return i.PolyChart()},i.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},i.LinePlot=function(){return i.PolyChart()},i.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},i.Legend=function(){function t(){var n=e.legendConfig,a=e.data.map(function(t,e){return[].concat(t).map(function(t,r){var a=o({},n.elements[e]);return a.name=t,a.color=[].concat(n.elements[e].color)[r],a})}),i=r.merge(a);i=i.filter(function(t,e){return n.elements[e]&&(n.elements[e].visibleInLegend||void 0===n.elements[e].visibleInLegend)}),n.reverseOrder&&(i=i.reverse());var l=n.container;("string"==typeof l||l.nodeName)&&(l=r.select(l));var s=i.map(function(t,e){return t.color}),u=n.fontSize,c=null==n.isContinuous?"number"==typeof i[0]:n.isContinuous,f=c?n.height:u*i.length,d=l.classed("legend-group",!0),h=d.selectAll("svg").data([0]),p=h.enter().append("svg").attr({width:300,height:f+u,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var g=r.range(i.length),v=r.scale[c?"linear":"ordinal"]().domain(g).range(s),m=r.scale[c?"linear":"ordinal"]().domain(g)[c?"range":"rangePoints"]([0,f]),y=function(t,e){var n=3*e;return"line"===t?"M"+[[-e/2,-e/12],[e/2,-e/12],[e/2,e/12],[-e/2,e/12]]+"Z":-1!=r.svg.symbolTypes.indexOf(t)?r.svg.symbol().type(t).size(n)():r.svg.symbol().type("square").size(n)()};if(c){var x=h.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(s);x.enter().append("stop"),x.attr({offset:function(t,e){return e/(s.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),h.append("rect").classed("legend-mark",!0).attr({height:n.height,width:n.colorBandWidth,fill:"url(#grad1)"})}else{var b=h.select(".legend-marks").selectAll("path.legend-mark").data(i);b.enter().append("path").classed("legend-mark",!0),b.attr({transform:function(t,e){return"translate("+[u/2,m(e)+u/2]+")"},d:function(t,e){var n=t.symbol;return y(n,u)},fill:function(t,e){return v(e)}}),b.exit().remove()}var _=r.svg.axis().scale(m).orient("right"),w=h.select("g.legend-axis").attr({transform:"translate("+[c?n.colorBandWidth:u,u/2]+")"}).call(_);return w.selectAll(".domain").style({fill:"none",stroke:"none"}),w.selectAll("line").style({fill:"none",stroke:c?n.textColor:"none"}),w.selectAll("text").style({fill:n.textColor,"font-size":n.fontSize}).text(function(t,e){return i[e].name}),t}var e=i.Legend.defaultConfig(),n=r.dispatch("hover");return t.config=function(t){return arguments.length?(o(e,t),this):e},r.rebind(t,n,"on"),t},i.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},i.tooltipPanel=function(){var t,e,n,a={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},l="tooltip-"+i.tooltipPanel.uid++,s=function(){t=a.container.selectAll("g."+l).data([0]);var r=t.enter().append("g").classed(l,!0).style({"pointer-events":"none",display:"none"});return n=r.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=r.append("text").attr({dx:a.padding+10,dy:.3*+a.fontSize}),s};return s.text=function(o){var i=r.hsl(a.color).l,l=i>=.5?"#aaa":"white",u=i>=.5?"black":"white",c=o||"";e.style({fill:u,"font-size":a.fontSize+"px"}).text(c);var f=a.padding,d=e.node().getBBox(),h={fill:a.color,stroke:l,"stroke-width":"2px"},p=d.width+2*f+10,g=d.height+2*f;return n.attr({d:"M"+[[10,-g/2],[10,-g/4],[a.hasTick?0:10,0],[10,g/4],[10,g/2],[p,g/2],[p,-g/2]].join("L")+"Z"}).style(h),t.attr({transform:"translate("+[10,-g/2+2*f]+")"}),t.style({display:"block"}),s},s.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),s},s.hide=function(){if(t)return t.style({display:"none"}),s},s.show=function(){if(t)return t.style({display:"block"}),s},s.config=function(t){return o(a,t),s},s},i.tooltipPanel.uid=1,i.adapter={},i.adapter.plotly=function(){var t={};return t.convert=function(t,e){var n={};if(t.data&&(n.data=t.data.map(function(t,n){var r=o({},t);return[[r,["marker","color"],["color"]],[r,["marker","opacity"],["opacity"]],[r,["marker","line","color"],["strokeColor"]],[r,["marker","line","dash"],["strokeDash"]],[r,["marker","line","width"],["strokeSize"]],[r,["marker","symbol"],["dotType"]],[r,["marker","size"],["dotSize"]],[r,["marker","barWidth"],["barWidth"]],[r,["line","interpolation"],["lineInterpolation"]],[r,["showlegend"],["visibleInLegend"]]].forEach(function(t,n){i.util.translator.apply(null,t.concat(e))}),e||delete r.marker,e&&delete r.groupId,e?("LinePlot"===r.geometry?(r.type="scatter",!0===r.dotVisible?(delete r.dotVisible,r.mode="lines+markers"):r.mode="lines"):"DotPlot"===r.geometry?(r.type="scatter",r.mode="markers"):"AreaChart"===r.geometry?r.type="area":"BarChart"===r.geometry&&(r.type="bar"),delete r.geometry):("scatter"===r.type?"lines"===r.mode?r.geometry="LinePlot":"markers"===r.mode?r.geometry="DotPlot":"lines+markers"===r.mode&&(r.geometry="LinePlot",r.dotVisible=!0):"area"===r.type?r.geometry="AreaChart":"bar"===r.type&&(r.geometry="BarChart"),delete r.mode,delete r.type),r}),!e&&t.layout&&"stack"===t.layout.barmode)){var a=i.util.duplicates(n.data.map(function(t,e){return t.geometry}));n.data.forEach(function(t,e){var r=a.indexOf(t.geometry);-1!=r&&(n.data[e].groupId=r)})}if(t.layout){var l=o({},t.layout);if([[l,["plot_bgcolor"],["backgroundColor"]],[l,["showlegend"],["showLegend"]],[l,["radialaxis"],["radialAxis"]],[l,["angularaxis"],["angularAxis"]],[l.angularaxis,["showline"],["gridLinesVisible"]],[l.angularaxis,["showticklabels"],["labelsVisible"]],[l.angularaxis,["nticks"],["ticksCount"]],[l.angularaxis,["tickorientation"],["tickOrientation"]],[l.angularaxis,["ticksuffix"],["ticksSuffix"]],[l.angularaxis,["range"],["domain"]],[l.angularaxis,["endpadding"],["endPadding"]],[l.radialaxis,["showline"],["gridLinesVisible"]],[l.radialaxis,["tickorientation"],["tickOrientation"]],[l.radialaxis,["ticksuffix"],["ticksSuffix"]],[l.radialaxis,["range"],["domain"]],[l.angularAxis,["showline"],["gridLinesVisible"]],[l.angularAxis,["showticklabels"],["labelsVisible"]],[l.angularAxis,["nticks"],["ticksCount"]],[l.angularAxis,["tickorientation"],["tickOrientation"]],[l.angularAxis,["ticksuffix"],["ticksSuffix"]],[l.angularAxis,["range"],["domain"]],[l.angularAxis,["endpadding"],["endPadding"]],[l.radialAxis,["showline"],["gridLinesVisible"]],[l.radialAxis,["tickorientation"],["tickOrientation"]],[l.radialAxis,["ticksuffix"],["ticksSuffix"]],[l.radialAxis,["range"],["domain"]],[l.font,["outlinecolor"],["outlineColor"]],[l.legend,["traceorder"],["reverseOrder"]],[l,["labeloffset"],["labelOffset"]],[l,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,n){i.util.translator.apply(null,t.concat(e))}),e?(void 0!==l.tickLength&&(l.angularaxis.ticklen=l.tickLength,delete l.tickLength),l.tickColor&&(l.angularaxis.tickcolor=l.tickColor,delete l.tickColor)):(l.angularAxis&&void 0!==l.angularAxis.ticklen&&(l.tickLength=l.angularAxis.ticklen),l.angularAxis&&void 0!==l.angularAxis.tickcolor&&(l.tickColor=l.angularAxis.tickcolor)),l.legend&&"boolean"!=typeof l.legend.reverseOrder&&(l.legend.reverseOrder="normal"!=l.legend.reverseOrder),l.legend&&"boolean"==typeof l.legend.traceorder&&(l.legend.traceorder=l.legend.traceorder?"reversed":"normal",delete l.legend.reverseOrder),l.margin&&void 0!==l.margin.t){var s=["t","r","b","l","pad"],u=["top","right","bottom","left","pad"],c={};r.entries(l.margin).forEach(function(t,e){c[u[s.indexOf(t.key)]]=t.value}),l.margin=c}e&&(delete l.needsEndSpacing,delete l.minorTickColor,delete l.minorTicks,delete l.angularaxis.ticksCount,delete l.angularaxis.ticksCount,delete l.angularaxis.ticksStep,delete l.angularaxis.rewriteTicks,delete l.angularaxis.nticks,delete l.radialaxis.ticksCount,delete l.radialaxis.ticksCount,delete l.radialaxis.ticksStep,delete l.radialaxis.rewriteTicks,delete l.radialaxis.nticks),n.layout=l}return n},t}},{"../../lib":130,d3:15}],198:[function(t,e,n){"use strict";var r=t("d3"),a=t("../../lib"),o=t("../../components/color"),i=t("./micropolar"),l=t("./undo_manager"),s=a.extendDeepAll,u=e.exports={};u.framework=function(t){function e(e,a){return a&&(f=a),r.select(r.select(f).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),n=n?s(n,e):e,o||(o=i.Axis()),c=i.adapter.plotly().convert(n),o.config(c).render(f),t.data=n.data,t.layout=n.layout,u.fillLayout(t),n}var n,a,o,c,f,d=new l;return e.isPolar=!0,e.svg=function(){return o.svg()},e.getConfig=function(){return n},e.getLiveConfig=function(){return i.adapter.plotly().convert(o.getLiveConfig(),!0)},e.getLiveScales=function(){return{t:o.angularScale(),r:o.radialScale()}},e.setUndoPoint=function(){var t=this,e=i.util.cloneJson(n);!function(e,n){d.add({undo:function(){n&&t(n)},redo:function(){t(e)}})}(e,a),a=i.util.cloneJson(e)},e.undo=function(){d.undo()},e.redo=function(){d.redo()},e},u.fillLayout=function(t){var e=r.select(t).selectAll(".plot-container"),n=e.selectAll(".svg-container"),a=t.framework&&t.framework.svg&&t.framework.svg(),i={width:800,height:600,paper_bgcolor:o.background,_container:e,_paperdiv:n,_paper:a};t._fullLayout=s(i,t.layout)}},{"../../components/color":33,"../../lib":130,"./micropolar":197,"./undo_manager":199,d3:15}],199:[function(t,e,n){"use strict";e.exports=function(){function t(t,e){return t?(a=!0,t[e](),a=!1,this):this}var e,n=[],r=-1,a=!1;return{add:function(t){return a?this:(n.splice(r+1,n.length-r),n.push(t),r=n.length-1,this)},setCallback:function(t){e=t},undo:function(){var a=n[r];return a?(t(a,"undo"),r-=1,e&&e(a.undo),this):this},redo:function(){var a=n[r+1];return a?(t(a,"redo"),r+=1,e&&e(a.redo),this):this},clear:function(){n=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r-1}var o=t("../lib"),i=t("../plots/plots"),l=o.extendFlat,s=o.extendDeep;e.exports=function(t,e){t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var n,o=t.data,u=t.layout,c=s([],o),f=s({},u,r(e.tileClass));if(e.width&&(f.width=e.width),e.height&&(f.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){f.annotations=[];var d=Object.keys(f);for(n=0;n"),color:v.addOpacity(a.tinyColorHue,1),idealAlign:g.event.x"),color:a.tinyColorHue,idealAlign:"left"},{container:n._hoverlayer.node(),outerContainer:n._paper.node()});o(h,.85),i(h,a.tinyColorHue)},M=function(e,r,a){g.select(e).call(c,r,a),t.emit("plotly_unhover",{points:[r.node]}),l&&(p.loneUnhover(n._hoverlayer.node()),l=!1)};h(a,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},{linkEvents:{hover:y,follow:x,unhover:b,select:m},nodeEvents:{hover:w,follow:k,unhover:M,select:_}})}},{"../../components/color":33,"../../plots/cartesian/graph_interact":174,"./render":218,d3:15}],218:[function(t,e,n){"use strict";function r(t){return t.key}function a(t){return[t]}function o(t){return t[0]}function i(t){for(var e=0;e0&&window.requestAnimationFrame(n)})}}).on("drag",function(n){if(M.movable){var r=n.horizontal?A.event.x:A.event.y,a=n.horizontal?A.event.y:A.event.x;M.useForceSnap?(n.node.x=r,n.node.y=a):(M.sideways&&(n.node.x=r),n.node.y=Math.max(n.node.dy/2,Math.min(n.size-n.node.dy/2,a))),l(n.node),n.sankey.relayout(),M.useForceSnap||(y(t.filter(s(n)),e),t.call(p))}}).on("dragend",function(t){t.interactionState.dragInProgress=!1});t.on(".drag",null).call(r)}function w(t,e,n){var r=n.sankey.nodes().filter(function(t){return t.originalX===n.node.originalX});n.forceLayouts[e]=S.forceSimulation(r).alphaDecay(0).force("collide",S.forceCollide().radius(function(t){return t.dy/2+n.nodePad/2}).strength(1).iterations(M.forceIterations)).force("constrain",k(t,e,r,n)).stop()}function k(t,e,n,r){return function(){for(var a=0,o=0;o5?t.node.label:""}).style("fill",function(t){return t.darkBackground&&!t.horizontal?"white":"black"})}},{"../../components/color":33,"../../components/drawing":56,"./constants":214,"@monfera/d3-sankey":6,d3:15,"d3-force":11,tinycolor2:21}],219:[function(t,e,n){"use strict";var r=t("../../lib");e.exports=function(t,e){r.mergeArray(e.text,t,"tx"),r.mergeArray(e.hovertext,t,"htx"),r.mergeArray(e.customdata,t,"data"),r.mergeArray(e.textposition,t,"tp"),e.textfont&&(r.mergeArray(e.textfont.size,t,"ts"),r.mergeArray(e.textfont.color,t,"tc"),r.mergeArray(e.textfont.family,t,"tf"));var n=e.marker;if(n){r.mergeArray(n.size,t,"ms"),r.mergeArray(n.opacity,t,"mo"),r.mergeArray(n.symbol,t,"mx"),r.mergeArray(n.color,t,"mc");var a=n.line;n.line&&(r.mergeArray(a.color,t,"mlc"),r.mergeArray(a.width,t,"mlw"))}}},{"../../lib":130}],220:[function(t,e,n){"use strict";var r=t("../../components/colorscale/color_attributes"),a=t("../../components/errorbars/attributes"),o=t("../../components/colorbar/attributes"),i=t("../../components/drawing"),l=(t("./constants"),t("../../lib/extend").extendFlat);e.exports={x:{valType:"data_array"},x0:{valType:"any",dflt:0},dx:{valType:"number",dflt:1},y:{valType:"data_array"},y0:{valType:"any",dflt:0},customdata:{valType:"data_array"},dy:{valType:"number",dflt:1},ids:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},hoveron:{valType:"flaglist",flags:["points","fills"]},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear"},smoothing:{valType:"number",min:0,max:1.3,dflt:1},dash:{valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid"},simplify:{valType:"boolean",dflt:!0}},connectgaps:{valType:"boolean",dflt:!1},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],dflt:"none"},fillcolor:{valType:"color"},marker:l({},{symbol:{valType:"enumerated",values:i.symbolList,dflt:"circle",arrayOk:!0},opacity:{valType:"number",min:0,max:1,arrayOk:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0},maxdisplayed:{valType:"number",min:0,dflt:0},sizeref:{valType:"number",dflt:1},sizemin:{valType:"number",min:0,dflt:0},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter"},showscale:{valType:"boolean",dflt:!1},colorbar:o,line:l({},{width:{valType:"number",min:0,arrayOk:!0}},r("marker.line"))},r("marker")),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0},textfont:{family:{valType:"string",noBlank:!0,strict:!0,arrayOk:!0},size:{valType:"number",min:1,arrayOk:!0},color:{valType:"color",arrayOk:!0}},r:{valType:"data_array"},t:{valType:"data_array"},error_y:a,error_x:a}},{"../../components/colorbar/attributes":34,"../../components/colorscale/color_attributes":40,"../../components/drawing":56,"../../components/errorbars/attributes":58,"../../lib/extend":126,"./constants":225}],221:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../../plots/cartesian/axes"),o=t("./subtypes"),i=t("./colorscale_calc"),l=t("./arrays_to_calcdata");e.exports=function(t,e){var n,s,u,c=a.getFromId(t,e.xaxis||"x"),f=a.getFromId(t,e.yaxis||"y"),d=c.makeCalcdata(e,"x"),h=f.makeCalcdata(e,"y"),p=Math.min(d.length,h.length);c._minDtick=0,f._minDtick=0,d.length>p&&d.splice(p,d.length-p),h.length>p&&h.splice(p,h.length-p);var g={padded:!0},v={padded:!0};if(o.hasMarkers(e)){if(n=e.marker,s=n.size,Array.isArray(s)){var m={type:"linear"};a.setConvert(m),s=m.makeCalcdata(e.marker,"size"),s.length>p&&s.splice(p,s.length-p)}var y,x=1.6*(e.marker.sizeref||1);y="area"===e.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/x),3)}:function(t){return Math.max((t||0)/x,3)},g.ppad=v.ppad=Array.isArray(s)?s.map(y):y(s)}i(e),!("tozerox"===e.fill||"tonextx"===e.fill&&t.firstscatter)||d[0]===d[p-1]&&h[0]===h[p-1]?e.error_y.visible||-1===["tonexty","tozeroy"].indexOf(e.fill)&&(o.hasMarkers(e)||o.hasText(e))||(g.padded=!1,g.ppad=0):g.tozero=!0,!("tozeroy"===e.fill||"tonexty"===e.fill&&t.firstscatter)||d[0]===d[p-1]&&h[0]===h[p-1]?-1!==["tonextx","tozerox"].indexOf(e.fill)&&(v.padded=!1):v.tozero=!0,a.expand(c,d,g),a.expand(f,h,v);var b=new Array(p);for(u=0;u=0;a--){var o=t[a];if("scatter"===o.type&&o.xaxis===n.xaxis&&o.yaxis===n.yaxis){o.opacity=void 0;break}}}}}},{}],223:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../../lib"),o=t("../../plots/plots"),i=t("../../components/colorscale"),l=t("../../components/colorbar/draw");e.exports=function(t,e){var n=e[0].trace,s=n.marker,u="cb"+n.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===s||!s.showscale)return void o.autoMargin(t,u);var c=s.color,f=s.cmin,d=s.cmax;r(f)||(f=a.aggNums(Math.min,null,c)),r(d)||(d=a.aggNums(Math.max,null,c));var h=e[0].t.cb=l(t,u),p=i.makeColorScaleFunc(i.extractScale(s.colorscale,f,d),{noNumericCheck:!0});h.fillcolor(p).filllevels({start:f,end:d,size:(d-f)/254}).options(s.colorbar)()}},{"../../components/colorbar/draw":36,"../../components/colorscale":47,"../../lib":130,"../../plots/plots":193,"fast-isnumeric":18}],224:[function(t,e,n){"use strict";var r=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/calc"),o=t("./subtypes");e.exports=function(t){o.hasLines(t)&&r(t,"line")&&a(t,t.line.color,"line","c"),o.hasMarkers(t)&&(r(t,"marker")&&a(t,t.marker.color,"marker","c"),r(t,"marker.line")&&a(t,t.marker.line.color,"marker.line","c"))}},{"../../components/colorscale/calc":39,"../../components/colorscale/has_colorscale":46,"./subtypes":240}],225:[function(t,e,n){"use strict";e.exports={PTS_LINESONLY:20}},{}],226:[function(t,e,n){"use strict";var r=t("../../lib"),a=t("./attributes"),o=t("./constants"),i=t("./subtypes"),l=t("./xy_defaults"),s=t("./marker_defaults"),u=t("./line_defaults"),c=t("./line_shape_defaults"),f=t("./text_defaults"),d=t("./fillcolor_defaults"),h=t("../../components/errorbars/defaults");e.exports=function(t,e,n,p){function g(n,o){return r.coerce(t,e,a,n,o)}var v=l(t,e,p,g),m=vB!=D>=B&&(S=C[T-1][0],O=C[T][0],z=S+(O-S)*(B-N)/(D-N),I=Math.min(I,z),j=Math.max(j,z));I=Math.max(I,0),j=Math.min(j,d._length);var H=s.defaultLine;return s.opacity(f.fillcolor)?H=f.fillcolor:s.opacity((f.line||{}).color)&&(H=f.line.color),r.extendFlat(t,{distance:o.MAXDIST+10,x0:I,x1:j,y0:B,y1:B,color:H}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{"../../components/color":33,"../../components/errorbars":62,"../../lib":130,"../../plots/cartesian/constants":170,"../../plots/cartesian/graph_interact":174,"./get_trace_color":228}],230:[function(t,e,n){"use strict";var r={},a=t("./subtypes");r.hasLines=a.hasLines,r.hasMarkers=a.hasMarkers,r.hasText=a.hasText,r.isBubble=a.isBubble,r.attributes=t("./attributes"),r.supplyDefaults=t("./defaults"),r.cleanData=t("./clean_data"),r.calc=t("./calc"),r.arraysToCalcdata=t("./arrays_to_calcdata"),r.plot=t("./plot"),r.colorbar=t("./colorbar"),r.style=t("./style"),r.hoverPoints=t("./hover"),r.selectPoints=t("./select"),r.animatable=!0,r.moduleType="trace",r.name="scatter",r.basePlotModule=t("../../plots/cartesian"),r.categories=["cartesian","symbols","markerColorscale","errorBarsOK","showLegend"],r.meta={},e.exports=r},{"../../plots/cartesian":175,"./arrays_to_calcdata":219,"./attributes":220,"./calc":221,"./clean_data":222,"./colorbar":223,"./defaults":226,"./hover":229,"./plot":237,"./select":238,"./style":239,"./subtypes":240}],231:[function(t,e,n){"use strict";var r=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults");e.exports=function(t,e,n,o,i){var l=(t.marker||{}).color;if(i("line.color",n),r(t,"line"))a(t,e,o,i,{prefix:"line.",cLetter:"c"});else{i("line.color",!Array.isArray(l)&&l||n)}i("line.width"),i("line.dash")}},{"../../components/colorscale/defaults":42,"../../components/colorscale/has_colorscale":46}],232:[function(t,e,n){"use strict";var r=t("../../constants/numerical").BADNUM;e.exports=function(t,e){function n(e){var n=_.c2p(t[e].x),a=w.c2p(t[e].y);return n!==r&&a!==r&&[n,a]} +function a(t){var e=t[0]/_._length,n=t[1]/w._length;return(1+10*Math.max(0,-e,e-1,-n,n-1))*A}var o,i,l,s,u,c,f,d,h,p,g,v,m,y,x,b,_=e.xaxis,w=e.yaxis,k=e.simplify,M=e.connectGaps,A=e.baseTolerance,T=e.linear,L=[],C=.2,z=new Array(t.length),S=0;for(k||(A=C=-1),o=0;oa(c))break;l=c,m=p[0]*h[0]+p[1]*h[1],m>g?(g=m,s=c,d=!1):m=t.length||!c)break;z[S++]=c,i=c}}else z[S++]=s}L.push(z.slice(0,S))}return L}},{"../../constants/numerical":117}],233:[function(t,e,n){"use strict";e.exports=function(t,e,n){"spline"===n("line.shape")&&n("line.smoothing")}},{}],234:[function(t,e,n){"use strict";e.exports=function(t,e,n){for(var r,a,o=null,i=0;i0?Math.max(e,a):0}}},{"fast-isnumeric":18}],236:[function(t,e,n){"use strict";var r=t("../../components/color"),a=t("../../components/colorscale/has_colorscale"),o=t("../../components/colorscale/defaults"),i=t("./subtypes");e.exports=function(t,e,n,l,s){var u,c=i.isBubble(t),f=(t.line||{}).color;f&&(n=f),s("marker.symbol"),s("marker.opacity",c?.7:1),s("marker.size"),s("marker.color",n),a(t,"marker")&&o(t,e,l,s,{prefix:"marker.",cLetter:"c"}),u=f&&!Array.isArray(f)&&e.marker.color!==f?f:c?r.background:r.defaultLine,s("marker.line.color",u),a(t,"marker.line")&&o(t,e,l,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",c?1:0),c&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode"))}},{"../../components/color":33,"../../components/colorscale/defaults":42,"../../components/colorscale/has_colorscale":46,"./subtypes":240}],237:[function(t,e,n){"use strict";function r(t,e){var n;e.selectAll("g.trace").each(function(t){var e=i.select(this);if(n=t[0].trace,n._nexttrace){if(n._nextFill=e.select(".js-fill.js-tonext"),!n._nextFill.size()){var r=":first-child";e.select(".js-fill.js-tozero").size()&&(r+=" + *"),n._nextFill=e.insert("path",r).attr("class","js-fill js-tonext")}}else e.selectAll(".js-fill.js-tonext").remove(),n._nextFill=null;n.fill&&("tozero"===n.fill.substr(0,6)||"toself"===n.fill||"to"===n.fill.substr(0,2)&&!n._prevtrace)?(n._ownFill=e.select(".js-fill.js-tozero"),n._ownFill.size()||(n._ownFill=e.insert("path",":first-child").attr("class","js-fill js-tozero"))):(e.selectAll(".js-fill.js-tozero").remove(),n._ownFill=null)})}function a(t,e,n,r,a,d,p){function g(t){return k?t.transition():t}function v(t){return t.filter(function(t){return t.vis})}function m(t){return t.id}function y(t){if(t.ids)return m}function x(){return!1}function b(t){var e,n,r=t[0].trace,a=i.select(this),o=c.hasMarkers(r),u=c.hasText(r),f=y(r),d=x,h=x;o&&(d=r.marker.maxdisplayed?v:l.identity),u&&(h=r.marker.maxdisplayed?v:l.identity),n=a.selectAll("path.point"),e=n.data(d,f);var p=e.enter().append("path").classed("point",!0);p.call(s.pointStyle,r).call(s.translatePoints,M,A,r),k&&p.style("opacity",0).transition().style("opacity",1),e.each(function(t){var e=i.select(this),n=g(e);s.translatePoint(t,n,M,A),s.singlePointStyle(t,n,r),r.customdata&&e.classed("plotly-customdata",null!==t.data&&void 0!==t.data)}),k?e.exit().transition().style("opacity",0).remove():e.exit().remove(),n=a.selectAll("g"),e=n.data(h,f),e.enter().append("g").append("text"),e.each(function(t){var e=g(i.select(this).select("text"));s.translatePoint(t,e,M,A)}),e.selectAll("text").call(s.textPointStyle,r).each(function(t){var e=t.xp||M.c2p(t.x),n=t.yp||A.c2p(t.y);i.select(this).selectAll("tspan").each(function(){g(i.select(this)).attr({x:e,y:n})})}),e.exit().remove()}var _,w;o(t,e,n,r,a);var k=!!p&&p.duration>0,M=n.xaxis,A=n.yaxis,T=r[0].trace,L=T.line,C=i.select(d);if(C.call(u.plot,n,p),!0===T.visible){g(C).style("opacity",T.opacity);var z,S,O=T.fill.charAt(T.fill.length-1);"x"!==O&&"y"!==O&&(O=""),r[0].node3=C;var N="",D=[],P=T._prevtrace;P&&(N=P._prevRevpath||"",S=P._nextFill,D=P._polygons);var E,R,I,j,F,q,B,H,V,X="",U="",Y=[],G=[],Z=l.noop;if(z=T._ownFill,c.hasLines(T)||"none"!==T.fill){for(S&&S.datum(r),-1!==["hv","vh","hvh","vhv"].indexOf(L.shape)?(I=s.steps(L.shape),j=s.steps(L.shape.split("").reverse().join(""))):I=j="spline"===L.shape?function(t){var e=t[t.length-1];return t[0][0]===e[0]&&t[0][1]===e[1]?s.smoothclosed(t.slice(1),L.smoothing):s.smoothopen(t,L.smoothing)}:function(t){return"M"+t.join("L")},F=function(t){return j(t.reverse())},Y=f(r,{xaxis:M,yaxis:A,connectGaps:T.connectgaps,baseTolerance:Math.max(L.width||1,3)/4,linear:"linear"===L.shape,simplify:L.simplify}),V=T._polygons=new Array(Y.length),w=0;w1}),Z=function(t){return function(e){if(E=I(e),R=F(e),X?O?(X+="L"+E.substr(1),U=R+"L"+U.substr(1)):(X+="Z"+E,U=R+"Z"+U):(X=E,U=R),c.hasLines(T)&&e.length>1){var n=i.select(this);if(n.datum(r),t)g(n.style("opacity",0).attr("d",E).call(s.lineGroupStyle)).style("opacity",1);else{var a=g(n);a.attr("d",E),s.singleLineStyle(r,a)}}}}}var W=C.selectAll(".js-line").data(G);g(W.exit()).style("opacity",0).remove(),W.each(Z(!1)),W.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(s.lineGroupStyle).each(Z(!0)),Y.length&&(z?q&&H&&(O?("y"===O?q[1]=H[1]=A.c2p(0,!0):"x"===O&&(q[0]=H[0]=M.c2p(0,!0)),g(z).attr("d","M"+H+"L"+q+"L"+X.substr(1))):g(z).attr("d",X+"Z")):"tonext"===T.fill.substr(0,6)&&X&&N&&("tonext"===T.fill?g(S).attr("d",X+"Z"+N+"Z"):g(S).attr("d",X+"L"+N.substr(1)+"Z"),T._polygons=T._polygons.concat(D)),T._prevRevpath=U,T._prevPolygons=V);var $=C.selectAll(".points");_=$.data([r]),$.each(b),_.enter().append("g").classed("points",!0).each(b),_.exit().remove()}}function o(t,e,n,r,a){var o=n.xaxis,s=n.yaxis,u=i.extent(l.simpleMap(o.range,o.r2c)),f=i.extent(l.simpleMap(s.range,s.r2c)),d=r[0].trace;if(c.hasMarkers(d)){var h=d.marker.maxdisplayed;if(0!==h){var p=r.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=f[0]&&t.y<=f[1]}),g=Math.ceil(p.length/h),v=0;a.forEach(function(t,n){var r=t[0].trace;c.hasMarkers(r)&&r.marker.maxdisplayed>0&&n0;for(c=p.selectAll("g.trace"),f=c.data(n,function(t){return t[0].trace.uid}),f.enter().append("g").attr("class",function(t){return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),d(t,e,n),r(t,p),s=0,u={};su[e[0].trace.uid]?1:-1}),v){l&&(h=l());i.transition().duration(o.duration).ease(o.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).each(function(){p.selectAll("g.trace").each(function(r,i){a(t,i,e,r,n,this,o)})})}else p.selectAll("g.trace").each(function(r,i){a(t,i,e,r,n,this,o)});g&&f.exit().remove(),p.selectAll("path:not([d])").remove()}},{"../../components/drawing":56,"../../components/errorbars":62,"../../lib":130,"../../lib/polygon":140,"./line_points":232,"./link_traces":234,"./subtypes":240,d3:15}],238:[function(t,e,n){"use strict";var r=t("./subtypes");e.exports=function(t,e){var n,a,o,i,l=t.cd,s=t.xaxis,u=t.yaxis,c=[],f=l[0].trace,d=f.index,h=f.marker,p=!r.hasMarkers(f)&&!r.hasText(f);if(!0===f.visible&&!p){var g=Array.isArray(h.opacity)?1:h.opacity;if(!1===e)for(n=0;n 0; --iterations) { + relaxRightToLeft(alpha *= .99); + resolveCollisions(); + relaxLeftToRight(alpha); + resolveCollisions(); + } + + function initializeNodeDepth() { + var ky = d3Array.min(nodesByBreadth, function(nodes) { + return (size[1] - (nodes.length - 1) * nodePadding) / d3Array.sum(nodes, value); + }); + + nodesByBreadth.forEach(function(nodes) { + nodes.forEach(function(node, i) { + node.y = i; + node.dy = node.value * ky; + }); + }); + + links.forEach(function(link) { + link.dy = link.value * ky; + }); + } + + function relaxLeftToRight(alpha) { + nodesByBreadth.forEach(function(nodes) { + nodes.forEach(function(node) { + if (node.targetLinks.length) { + var y = d3Array.sum(node.targetLinks, weightedSource) / d3Array.sum(node.targetLinks, value); + node.y += (y - center(node)) * alpha; + } + }); + }); + + function weightedSource(link) { + return center(link.source) * link.value; + } + } + + function relaxRightToLeft(alpha) { + nodesByBreadth.slice().reverse().forEach(function(nodes) { + nodes.forEach(function(node) { + if (node.sourceLinks.length) { + var y = d3Array.sum(node.sourceLinks, weightedTarget) / d3Array.sum(node.sourceLinks, value); + node.y += (y - center(node)) * alpha; + } + }); + }); + + function weightedTarget(link) { + return center(link.target) * link.value; + } + } + + function resolveCollisions() { + nodesByBreadth.forEach(function(nodes) { + var node, + dy, + y0 = 0, + n = nodes.length, + i; + + // Push any overlapping nodes down. + nodes.sort(ascendingDepth); + for (i = 0; i < n; ++i) { + node = nodes[i]; + dy = y0 - node.y; + if (dy > 0) node.y += dy; + y0 = node.y + node.dy + nodePadding; + } + + // If the bottommost node goes outside the bounds, push it back up. + dy = y0 - nodePadding - size[1]; + if (dy > 0) { + y0 = node.y -= dy; + + // Push any overlapping nodes back up. + for (i = n - 2; i >= 0; --i) { + node = nodes[i]; + dy = node.y + node.dy + nodePadding - y0; + if (dy > 0) node.y -= dy; + y0 = node.y; + } + } + }); + } + + function ascendingDepth(a, b) { + return a.y - b.y; + } + } + + function computeLinkDepths() { + nodes.forEach(function(node) { + node.sourceLinks.sort(ascendingTargetDepth); + node.targetLinks.sort(ascendingSourceDepth); + }); + nodes.forEach(function(node) { + var sy = 0, ty = 0; + node.sourceLinks.forEach(function(link) { + link.sy = sy; + sy += link.dy; + }); + node.targetLinks.forEach(function(link) { + link.ty = ty; + ty += link.dy; + }); + }); + + function ascendingSourceDepth(a, b) { + return (a.source.y - b.source.y) || (a.originalIndex - b.originalIndex); + } + + function ascendingTargetDepth(a, b) { + return (a.target.y - b.target.y) || (a.originalIndex - b.originalIndex); + } + } + + function center(node) { + return node.y + node.dy / 2; + } + + function value(link) { + return link.value; + } + + return sankey; +}; + +exports.sankey = sankey; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{"d3-array":106,"d3-collection":107,"d3-interpolate":111}],33:[function(require,module,exports){ 'use strict' var weakMap = typeof WeakMap === 'undefined' ? require('weak-map') : WeakMap @@ -961,7 +1286,7 @@ function createABigTriangle(gl) { module.exports = createABigTriangle -},{"gl-buffer":138,"gl-vao":252,"weak-map":536}],32:[function(require,module,exports){ +},{"gl-buffer":148,"gl-vao":262,"weak-map":546}],34:[function(require,module,exports){ var padLeft = require('pad-left') module.exports = addLineNumbers @@ -979,7 +1304,7 @@ function addLineNumbers (string, start, delim) { }).join('\n') } -},{"pad-left":452}],33:[function(require,module,exports){ +},{"pad-left":462}],35:[function(require,module,exports){ 'use strict' module.exports = affineHull @@ -1031,7 +1356,7 @@ function affineHull(points) { } return index } -},{"robust-orientation":486}],34:[function(require,module,exports){ +},{"robust-orientation":496}],36:[function(require,module,exports){ 'use strict' module.exports = alphaComplex @@ -1048,7 +1373,7 @@ function alphaComplex(alpha, points) { return circumradius(simplex) * alpha < 1 }) } -},{"circumradius":77,"delaunay-triangulate":105}],35:[function(require,module,exports){ +},{"circumradius":79,"delaunay-triangulate":115}],37:[function(require,module,exports){ module.exports = alphaShape var ac = require('alpha-complex') @@ -1057,7 +1382,7 @@ var bnd = require('simplicial-complex-boundary') function alphaShape(alpha, points) { return bnd(ac(alpha, points)) } -},{"alpha-complex":34,"simplicial-complex-boundary":494}],36:[function(require,module,exports){ +},{"alpha-complex":36,"simplicial-complex-boundary":504}],38:[function(require,module,exports){ 'use strict'; var arraytools = function () { @@ -1246,7 +1571,7 @@ var arraytools = function () { module.exports = arraytools(); -},{}],37:[function(require,module,exports){ +},{}],39:[function(require,module,exports){ (function (global){ 'use strict'; @@ -1740,12 +2065,12 @@ var objectKeys = Object.keys || function (obj) { }; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"util/":526}],38:[function(require,module,exports){ +},{"util/":536}],40:[function(require,module,exports){ module.exports = function _atob(str) { return atob(str) } -},{}],39:[function(require,module,exports){ +},{}],41:[function(require,module,exports){ 'use strict' module.exports = barycentric @@ -1793,7 +2118,7 @@ function barycentric(simplex, point) { } return y } -},{"robust-linear-solve":485}],40:[function(require,module,exports){ +},{"robust-linear-solve":495}],42:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -1806,7 +2131,7 @@ function add(a, b) { a[1].mul(b[1])) } -},{"./lib/rationalize":50}],41:[function(require,module,exports){ +},{"./lib/rationalize":52}],43:[function(require,module,exports){ 'use strict' module.exports = cmp @@ -1815,7 +2140,7 @@ function cmp(a, b) { return a[0].mul(b[1]).cmp(b[0].mul(a[1])) } -},{}],42:[function(require,module,exports){ +},{}],44:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -1826,7 +2151,7 @@ function div(a, b) { return rationalize(a[0].mul(b[1]), a[1].mul(b[0])) } -},{"./lib/rationalize":50}],43:[function(require,module,exports){ +},{"./lib/rationalize":52}],45:[function(require,module,exports){ 'use strict' var isRat = require('./is-rat') @@ -1888,7 +2213,7 @@ function makeRational(numer, denom) { return rationalize(a, b) } -},{"./div":42,"./is-rat":44,"./lib/is-bn":48,"./lib/num-to-bn":49,"./lib/rationalize":50,"./lib/str-to-bn":51}],44:[function(require,module,exports){ +},{"./div":44,"./is-rat":46,"./lib/is-bn":50,"./lib/num-to-bn":51,"./lib/rationalize":52,"./lib/str-to-bn":53}],46:[function(require,module,exports){ 'use strict' var isBN = require('./lib/is-bn') @@ -1899,7 +2224,7 @@ function isRat(x) { return Array.isArray(x) && x.length === 2 && isBN(x[0]) && isBN(x[1]) } -},{"./lib/is-bn":48}],45:[function(require,module,exports){ +},{"./lib/is-bn":50}],47:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -1910,7 +2235,7 @@ function sign (x) { return x.cmp(new BN(0)) } -},{"bn.js":58}],46:[function(require,module,exports){ +},{"bn.js":60}],48:[function(require,module,exports){ 'use strict' var sign = require('./bn-sign') @@ -1935,7 +2260,7 @@ function bn2num(b) { return sign(b) * out } -},{"./bn-sign":45}],47:[function(require,module,exports){ +},{"./bn-sign":47}],49:[function(require,module,exports){ 'use strict' var db = require('double-bits') @@ -1956,7 +2281,7 @@ function ctzNumber(x) { return h + 32 } -},{"bit-twiddle":57,"double-bits":106}],48:[function(require,module,exports){ +},{"bit-twiddle":59,"double-bits":116}],50:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -1969,7 +2294,7 @@ function isBN(x) { return x && typeof x === 'object' && Boolean(x.words) } -},{"bn.js":58}],49:[function(require,module,exports){ +},{"bn.js":60}],51:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -1986,7 +2311,7 @@ function num2bn(x) { } } -},{"bn.js":58,"double-bits":106}],50:[function(require,module,exports){ +},{"bn.js":60,"double-bits":116}],52:[function(require,module,exports){ 'use strict' var num2bn = require('./num-to-bn') @@ -2014,7 +2339,7 @@ function rationalize(numer, denom) { return [ numer, denom ] } -},{"./bn-sign":45,"./num-to-bn":49}],51:[function(require,module,exports){ +},{"./bn-sign":47,"./num-to-bn":51}],53:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2025,7 +2350,7 @@ function str2BN(x) { return new BN(x) } -},{"bn.js":58}],52:[function(require,module,exports){ +},{"bn.js":60}],54:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2036,7 +2361,7 @@ function mul(a, b) { return rationalize(a[0].mul(b[0]), a[1].mul(b[1])) } -},{"./lib/rationalize":50}],53:[function(require,module,exports){ +},{"./lib/rationalize":52}],55:[function(require,module,exports){ 'use strict' var bnsign = require('./lib/bn-sign') @@ -2047,7 +2372,7 @@ function sign(x) { return bnsign(x[0]) * bnsign(x[1]) } -},{"./lib/bn-sign":45}],54:[function(require,module,exports){ +},{"./lib/bn-sign":47}],56:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2058,7 +2383,7 @@ function sub(a, b) { return rationalize(a[0].mul(b[1]).sub(a[1].mul(b[0])), a[1].mul(b[1])) } -},{"./lib/rationalize":50}],55:[function(require,module,exports){ +},{"./lib/rationalize":52}],57:[function(require,module,exports){ 'use strict' var bn2num = require('./lib/bn-to-num') @@ -2096,7 +2421,7 @@ function roundRat (f) { } } -},{"./lib/bn-to-num":46,"./lib/ctz":47}],56:[function(require,module,exports){ +},{"./lib/bn-to-num":48,"./lib/ctz":49}],58:[function(require,module,exports){ "use strict" function compileSearch(funcName, predicate, reversed, extraArgs, useNdarray, earlyOut) { @@ -2158,7 +2483,7 @@ module.exports = { eq: compileBoundsSearch("-", true, "EQ", true) } -},{}],57:[function(require,module,exports){ +},{}],59:[function(require,module,exports){ /** * Bit twiddling hacks for JavaScript. * @@ -2364,7 +2689,7 @@ exports.nextCombination = function(v) { } -},{}],58:[function(require,module,exports){ +},{}],60:[function(require,module,exports){ (function (module, exports) { 'use strict'; @@ -5793,7 +6118,7 @@ exports.nextCombination = function(v) { }; })(typeof module === 'undefined' || module, this); -},{}],59:[function(require,module,exports){ +},{}],61:[function(require,module,exports){ 'use strict' module.exports = boundary @@ -5829,7 +6154,7 @@ function boundary (cells) { return result } -},{}],60:[function(require,module,exports){ +},{}],62:[function(require,module,exports){ 'use strict' module.exports = boxIntersectWrapper @@ -5968,7 +6293,7 @@ function boxIntersectWrapper(arg0, arg1, arg2) { throw new Error('box-intersect: Invalid arguments') } } -},{"./lib/intersect":62,"./lib/sweep":66,"typedarray-pool":518}],61:[function(require,module,exports){ +},{"./lib/intersect":64,"./lib/sweep":68,"typedarray-pool":528}],63:[function(require,module,exports){ 'use strict' var DIMENSION = 'd' @@ -6113,7 +6438,7 @@ function bruteForcePlanner(full) { exports.partial = bruteForcePlanner(false) exports.full = bruteForcePlanner(true) -},{}],62:[function(require,module,exports){ +},{}],64:[function(require,module,exports){ 'use strict' module.exports = boxIntersectIter @@ -6608,7 +6933,7 @@ function boxIntersectIter( } } } -},{"./brute":61,"./median":63,"./partition":64,"./sweep":66,"bit-twiddle":57,"typedarray-pool":518}],63:[function(require,module,exports){ +},{"./brute":63,"./median":65,"./partition":66,"./sweep":68,"bit-twiddle":59,"typedarray-pool":528}],65:[function(require,module,exports){ 'use strict' module.exports = findMedian @@ -6751,7 +7076,7 @@ function findMedian(d, axis, start, end, boxes, ids) { start, mid, boxes, ids, boxes[elemSize*mid+axis]) } -},{"./partition":64}],64:[function(require,module,exports){ +},{"./partition":66}],66:[function(require,module,exports){ 'use strict' module.exports = genPartition @@ -6772,7 +7097,7 @@ function genPartition(predicate, args) { .replace('$', predicate)) return Function.apply(void 0, fargs) } -},{}],65:[function(require,module,exports){ +},{}],67:[function(require,module,exports){ 'use strict'; //This code is extracted from ndarray-sort @@ -7009,7 +7334,7 @@ function quickSort(left, right, data) { quickSort(less, great, data); } } -},{}],66:[function(require,module,exports){ +},{}],68:[function(require,module,exports){ 'use strict' module.exports = { @@ -7444,7 +7769,7 @@ red_loop: } } } -},{"./sort":65,"bit-twiddle":57,"typedarray-pool":518}],67:[function(require,module,exports){ +},{"./sort":67,"bit-twiddle":59,"typedarray-pool":528}],69:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -7699,8 +8024,8 @@ function fromObject (obj) { } if (obj) { - if (ArrayBuffer.isView(obj) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { + if (isArrayBufferView(obj) || 'length' in obj) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { return createBuffer(0) } return fromArrayLike(obj) @@ -7811,7 +8136,7 @@ function byteLength (string, encoding) { if (Buffer.isBuffer(string)) { return string.length } - if (ArrayBuffer.isView(string) || string instanceof ArrayBuffer) { + if (isArrayBufferView(string) || string instanceof ArrayBuffer) { return string.byteLength } if (typeof string !== 'string') { @@ -8077,7 +8402,7 @@ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { byteOffset = -0x80000000 } byteOffset = +byteOffset // Coerce to Number. - if (isNaN(byteOffset)) { + if (numberIsNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : (buffer.length - 1) } @@ -8208,7 +8533,7 @@ function hexWrite (buf, string, offset, length) { } for (var i = 0; i < length; ++i) { var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) return i + if (numberIsNaN(parsed)) return i buf[offset + i] = parsed } return i @@ -9011,7 +9336,7 @@ var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g function base64clean (str) { // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') + str = str.trim().replace(INVALID_BASE64_RE, '') // Node converts strings with length < 2 to '' if (str.length < 2) return '' // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not @@ -9021,11 +9346,6 @@ function base64clean (str) { return str } -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - function toHex (n) { if (n < 16) return '0' + n.toString(16) return n.toString(16) @@ -9148,11 +9468,16 @@ function blitBuffer (src, dst, offset, length) { return i } -function isnan (val) { - return val !== val // eslint-disable-line no-self-compare +// Node 0.10 supports `ArrayBuffer` but lacks `ArrayBuffer.isView` +function isArrayBufferView (obj) { + return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj) } -},{"base64-js":68,"ieee754":269}],68:[function(require,module,exports){ +function numberIsNaN (obj) { + return obj !== obj // eslint-disable-line no-self-compare +} + +},{"base64-js":70,"ieee754":279}],70:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -9268,7 +9593,7 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],69:[function(require,module,exports){ +},{}],71:[function(require,module,exports){ 'use strict' var monotoneTriangulate = require('./lib/monotone') @@ -9352,7 +9677,7 @@ function cdt2d(points, edges, options) { } } -},{"./lib/delaunay":70,"./lib/filter":71,"./lib/monotone":72,"./lib/triangulation":73}],70:[function(require,module,exports){ +},{"./lib/delaunay":72,"./lib/filter":73,"./lib/monotone":74,"./lib/triangulation":75}],72:[function(require,module,exports){ 'use strict' var inCircle = require('robust-in-sphere')[4] @@ -9469,7 +9794,7 @@ function delaunayRefine(points, triangulation) { } } -},{"binary-search-bounds":74,"robust-in-sphere":484}],71:[function(require,module,exports){ +},{"binary-search-bounds":76,"robust-in-sphere":494}],73:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9651,7 +9976,7 @@ function classifyFaces(triangulation, target, infinity) { return result } -},{"binary-search-bounds":74}],72:[function(require,module,exports){ +},{"binary-search-bounds":76}],74:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9840,7 +10165,7 @@ function monotoneTriangulate(points, edges) { return cells } -},{"binary-search-bounds":74,"robust-orientation":486}],73:[function(require,module,exports){ +},{"binary-search-bounds":76,"robust-orientation":496}],75:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9946,7 +10271,7 @@ function createTriangulation(numVerts, edges) { return new Triangulation(stars, edges) } -},{"binary-search-bounds":74}],74:[function(require,module,exports){ +},{"binary-search-bounds":76}],76:[function(require,module,exports){ "use strict" function compileSearch(funcName, predicate, reversed, extraArgs, earlyOut) { @@ -10000,7 +10325,7 @@ module.exports = { eq: compileBoundsSearch("-", true, "EQ", true) } -},{}],75:[function(require,module,exports){ +},{}],77:[function(require,module,exports){ 'use strict' module.exports = orientation @@ -10019,7 +10344,7 @@ function orientation(s) { return p } -},{}],76:[function(require,module,exports){ +},{}],78:[function(require,module,exports){ "use strict" var dup = require("dup") @@ -10088,7 +10413,7 @@ function circumcenter(points) { circumcenter.barycenetric = barycentricCircumcenter module.exports = circumcenter -},{"dup":107,"robust-linear-solve":485}],77:[function(require,module,exports){ +},{"dup":117,"robust-linear-solve":495}],79:[function(require,module,exports){ module.exports = circumradius var circumcenter = require('circumcenter') @@ -10104,7 +10429,7 @@ function circumradius(points) { } return Math.sqrt(avgDist / points.length) } -},{"circumcenter":76}],78:[function(require,module,exports){ +},{"circumcenter":78}],80:[function(require,module,exports){ module.exports = clamp function clamp(value, min, max) { @@ -10113,7 +10438,7 @@ function clamp(value, min, max) { : (value < max ? max : value > min ? min : value) } -},{}],79:[function(require,module,exports){ +},{}],81:[function(require,module,exports){ 'use strict' module.exports = cleanPSLG @@ -10496,7 +10821,7 @@ function cleanPSLG (points, edges, colors) { return modified } -},{"./lib/rat-seg-intersect":80,"big-rat":43,"big-rat/cmp":41,"big-rat/to-float":55,"box-intersect":60,"nextafter":447,"rat-vec":473,"robust-segment-intersect":489,"union-find":519}],80:[function(require,module,exports){ +},{"./lib/rat-seg-intersect":82,"big-rat":45,"big-rat/cmp":43,"big-rat/to-float":57,"box-intersect":62,"nextafter":457,"rat-vec":483,"robust-segment-intersect":499,"union-find":529}],82:[function(require,module,exports){ 'use strict' module.exports = solveIntersection @@ -10540,7 +10865,7 @@ function solveIntersection (a, b, c, d) { return r } -},{"big-rat/div":42,"big-rat/mul":52,"big-rat/sign":53,"big-rat/sub":54,"rat-vec/add":472,"rat-vec/muls":474,"rat-vec/sub":475}],81:[function(require,module,exports){ +},{"big-rat/div":44,"big-rat/mul":54,"big-rat/sign":55,"big-rat/sub":56,"rat-vec/add":482,"rat-vec/muls":484,"rat-vec/sub":485}],83:[function(require,module,exports){ (function (Buffer){ var clone = (function() { 'use strict'; @@ -10704,7 +11029,7 @@ if (typeof module === 'object' && module.exports) { } }).call(this,require("buffer").Buffer) -},{"buffer":67}],82:[function(require,module,exports){ +},{"buffer":69}],84:[function(require,module,exports){ /** @module color-number */ 'use strict' @@ -10738,7 +11063,7 @@ function toNumber (rgba, normalized) { return n } -},{"clamp":78}],83:[function(require,module,exports){ +},{"clamp":80}],85:[function(require,module,exports){ module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], @@ -10889,7 +11214,7 @@ module.exports = { "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; -},{}],84:[function(require,module,exports){ +},{}],86:[function(require,module,exports){ /** * @module color-parse */ @@ -11066,7 +11391,7 @@ function parse (cstr) { }; } -},{"color-name":83,"is-plain-obj":276}],85:[function(require,module,exports){ +},{"color-name":85,"is-plain-obj":286}],87:[function(require,module,exports){ /** @module color-rgba */ 'use strict' @@ -11105,7 +11430,7 @@ module.exports = function rgba (color, normalize) { } -},{"clamp":78,"color-parse":84,"color-space/hsl":86}],86:[function(require,module,exports){ +},{"clamp":80,"color-parse":86,"color-space/hsl":88}],88:[function(require,module,exports){ /** * @module color-space/hsl */ @@ -11214,7 +11539,7 @@ rgb.hsl = function(rgb) { return [h, s * 100, l * 100]; }; -},{"./rgb":87}],87:[function(require,module,exports){ +},{"./rgb":89}],89:[function(require,module,exports){ /** * RGB space. * @@ -11230,7 +11555,7 @@ module.exports = { alias: ['RGB'] }; -},{}],88:[function(require,module,exports){ +},{}],90:[function(require,module,exports){ module.exports={ "jet":[{"index":0,"rgb":[0,0,131]},{"index":0.125,"rgb":[0,60,170]},{"index":0.375,"rgb":[5,255,255]},{"index":0.625,"rgb":[255,255,0]},{"index":0.875,"rgb":[250,0,0]},{"index":1,"rgb":[128,0,0]}], @@ -11323,7 +11648,7 @@ module.exports={ "cubehelix": [{"index":0,"rgb":[0,0,0]},{"index":0.07,"rgb":[22,5,59]},{"index":0.13,"rgb":[60,4,105]},{"index":0.2,"rgb":[109,1,135]},{"index":0.27,"rgb":[161,0,147]},{"index":0.33,"rgb":[210,2,142]},{"index":0.4,"rgb":[251,11,123]},{"index":0.47,"rgb":[255,29,97]},{"index":0.53,"rgb":[255,54,69]},{"index":0.6,"rgb":[255,85,46]},{"index":0.67,"rgb":[255,120,34]},{"index":0.73,"rgb":[255,157,37]},{"index":0.8,"rgb":[241,191,57]},{"index":0.87,"rgb":[224,220,93]},{"index":0.93,"rgb":[218,241,142]},{"index":1,"rgb":[227,253,198]}] }; -},{}],89:[function(require,module,exports){ +},{}],91:[function(require,module,exports){ /* * Ben Postlethwaite * January 2013 @@ -11460,7 +11785,7 @@ function rgbaStr (rgba) { return 'rgba(' + rgba.join(',') + ')'; } -},{"./colorScales":88,"arraytools":36,"clone":81}],90:[function(require,module,exports){ +},{"./colorScales":90,"arraytools":38,"clone":83}],92:[function(require,module,exports){ "use strict" module.exports = compareAngle @@ -11546,7 +11871,7 @@ function compareAngle(a, b, c, d) { } } } -},{"robust-orientation":486,"robust-product":487,"robust-sum":491,"signum":493,"two-sum":517}],91:[function(require,module,exports){ +},{"robust-orientation":496,"robust-product":497,"robust-sum":501,"signum":503,"two-sum":527}],93:[function(require,module,exports){ module.exports = compareCells var min = Math.min @@ -11602,7 +11927,7 @@ function compareCells(a, b) { } } -},{}],92:[function(require,module,exports){ +},{}],94:[function(require,module,exports){ 'use strict' var compareCells = require('compare-cell') @@ -11614,7 +11939,7 @@ function compareOrientedCells(a, b) { return compareCells(a, b) || parity(a) - parity(b) } -},{"cell-orientation":75,"compare-cell":91}],93:[function(require,module,exports){ +},{"cell-orientation":77,"compare-cell":93}],95:[function(require,module,exports){ "use strict" var convexHull1d = require('./lib/ch1d') @@ -11640,7 +11965,7 @@ function convexHull(points) { } return convexHullnd(points, d) } -},{"./lib/ch1d":94,"./lib/ch2d":95,"./lib/chnd":96}],94:[function(require,module,exports){ +},{"./lib/ch1d":96,"./lib/ch2d":97,"./lib/chnd":98}],96:[function(require,module,exports){ "use strict" module.exports = convexHull1d @@ -11664,7 +11989,7 @@ function convexHull1d(points) { return [[lo]] } } -},{}],95:[function(require,module,exports){ +},{}],97:[function(require,module,exports){ 'use strict' module.exports = convexHull2D @@ -11687,7 +12012,7 @@ function convexHull2D(points) { return edges } -},{"monotone-convex-hull-2d":430}],96:[function(require,module,exports){ +},{"monotone-convex-hull-2d":440}],98:[function(require,module,exports){ 'use strict' module.exports = convexHullnD @@ -11748,7 +12073,7 @@ function convexHullnD(points, d) { return invPermute(nhull, ah) } } -},{"affine-hull":33,"incremental-convex-hull":270}],97:[function(require,module,exports){ +},{"affine-hull":35,"incremental-convex-hull":280}],99:[function(require,module,exports){ module.exports = { AFG: 'afghan', ALA: '\\b\\wland', @@ -12007,7 +12332,7 @@ module.exports = { ZWE: 'zimbabwe|^(?!.*northern).*rhodesia' } -},{}],98:[function(require,module,exports){ +},{}],100:[function(require,module,exports){ // (c) Dean McNamee , 2012. // // https://github.com/deanm/css-color-parser-js @@ -12210,7 +12535,7 @@ function parseCSSColor(css_str) { try { exports.parseCSSColor = parseCSSColor } catch(e) { } -},{}],99:[function(require,module,exports){ +},{}],101:[function(require,module,exports){ "use strict" function dcubicHermite(p0, v0, p1, v1, t, f) { @@ -12250,7 +12575,7 @@ function cubicHermite(p0, v0, p1, v1, t, f) { module.exports = cubicHermite module.exports.derivative = dcubicHermite -},{}],100:[function(require,module,exports){ +},{}],102:[function(require,module,exports){ "use strict" var createThunk = require("./lib/thunk.js") @@ -12361,7 +12686,7 @@ function compileCwise(user_args) { module.exports = compileCwise -},{"./lib/thunk.js":102}],101:[function(require,module,exports){ +},{"./lib/thunk.js":104}],103:[function(require,module,exports){ "use strict" var uniq = require("uniq") @@ -12717,7 +13042,7 @@ function generateCWiseOp(proc, typesig) { } module.exports = generateCWiseOp -},{"uniq":520}],102:[function(require,module,exports){ +},{"uniq":530}],104:[function(require,module,exports){ "use strict" // The function below is called when constructing a cwise function object, and does the following: @@ -12805,9 +13130,3070 @@ function createThunk(proc) { module.exports = createThunk -},{"./compile.js":101}],103:[function(require,module,exports){ +},{"./compile.js":103}],105:[function(require,module,exports){ module.exports = require("cwise-compiler") -},{"cwise-compiler":100}],104:[function(require,module,exports){ +},{"cwise-compiler":102}],106:[function(require,module,exports){ +// https://d3js.org/d3-array/ Version 1.1.1. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); +}(this, (function (exports) { 'use strict'; + +var ascending = function(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; +}; + +var bisector = function(compare) { + if (compare.length === 1) compare = ascendingComparator(compare); + return { + left: function(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) < 0) lo = mid + 1; + else hi = mid; + } + return lo; + }, + right: function(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) > 0) hi = mid; + else lo = mid + 1; + } + return lo; + } + }; +}; + +function ascendingComparator(f) { + return function(d, x) { + return ascending(f(d), x); + }; +} + +var ascendingBisect = bisector(ascending); +var bisectRight = ascendingBisect.right; +var bisectLeft = ascendingBisect.left; + +var pairs = function(array, f) { + if (f == null) f = pair; + var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n); + while (i < n) pairs[i] = f(p, p = array[++i]); + return pairs; +}; + +function pair(a, b) { + return [a, b]; +} + +var cross = function(a, b, f) { + var na = a.length, nb = b.length, c = new Array(na * nb), ia, ib, ic, va; + if (f == null) f = pair; + for (ia = ic = 0; ia < na; ++ia) for (va = a[ia], ib = 0; ib < nb; ++ib, ++ic) c[ic] = f(va, b[ib]); + return c; +}; + +var descending = function(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; +}; + +var number = function(x) { + return x === null ? NaN : +x; +}; + +var variance = function(array, f) { + var n = array.length, + m = 0, + a, + d, + s = 0, + i = -1, + j = 0; + + if (f == null) { + while (++i < n) { + if (!isNaN(a = number(array[i]))) { + d = a - m; + m += d / ++j; + s += d * (a - m); + } + } + } + + else { + while (++i < n) { + if (!isNaN(a = number(f(array[i], i, array)))) { + d = a - m; + m += d / ++j; + s += d * (a - m); + } + } + } + + if (j > 1) return s / (j - 1); +}; + +var deviation = function(array, f) { + var v = variance(array, f); + return v ? Math.sqrt(v) : v; +}; + +var extent = function(array, f) { + var i = -1, + n = array.length, + a, + b, + c; + + if (f == null) { + while (++i < n) if ((b = array[i]) != null && b >= b) { a = c = b; break; } + while (++i < n) if ((b = array[i]) != null) { + if (a > b) a = b; + if (c < b) c = b; + } + } + + else { + while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = c = b; break; } + while (++i < n) if ((b = f(array[i], i, array)) != null) { + if (a > b) a = b; + if (c < b) c = b; + } + } + + return [a, c]; +}; + +var array = Array.prototype; + +var slice = array.slice; +var map = array.map; + +var constant = function(x) { + return function() { + return x; + }; +}; + +var identity = function(x) { + return x; +}; + +var range = function(start, stop, step) { + start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; + + var i = -1, + n = Math.max(0, Math.ceil((stop - start) / step)) | 0, + range = new Array(n); + + while (++i < n) { + range[i] = start + i * step; + } + + return range; +}; + +var e10 = Math.sqrt(50); +var e5 = Math.sqrt(10); +var e2 = Math.sqrt(2); + +var ticks = function(start, stop, count) { + var step = tickStep(start, stop, count); + return range( + Math.ceil(start / step) * step, + Math.floor(stop / step) * step + step / 2, // inclusive + step + ); +}; + +function tickStep(start, stop, count) { + var step0 = Math.abs(stop - start) / Math.max(0, count), + step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), + error = step0 / step1; + if (error >= e10) step1 *= 10; + else if (error >= e5) step1 *= 5; + else if (error >= e2) step1 *= 2; + return stop < start ? -step1 : step1; +} + +var sturges = function(values) { + return Math.ceil(Math.log(values.length) / Math.LN2) + 1; +}; + +var histogram = function() { + var value = identity, + domain = extent, + threshold = sturges; + + function histogram(data) { + var i, + n = data.length, + x, + values = new Array(n); + + for (i = 0; i < n; ++i) { + values[i] = value(data[i], i, data); + } + + var xz = domain(values), + x0 = xz[0], + x1 = xz[1], + tz = threshold(values, x0, x1); + + // Convert number of thresholds into uniform thresholds. + if (!Array.isArray(tz)) tz = ticks(x0, x1, tz); + + // Remove any thresholds outside the domain. + var m = tz.length; + while (tz[0] <= x0) tz.shift(), --m; + while (tz[m - 1] >= x1) tz.pop(), --m; + + var bins = new Array(m + 1), + bin; + + // Initialize bins. + for (i = 0; i <= m; ++i) { + bin = bins[i] = []; + bin.x0 = i > 0 ? tz[i - 1] : x0; + bin.x1 = i < m ? tz[i] : x1; + } + + // Assign data to bins by value, ignoring any outside the domain. + for (i = 0; i < n; ++i) { + x = values[i]; + if (x0 <= x && x <= x1) { + bins[bisectRight(tz, x, 0, m)].push(data[i]); + } + } + + return bins; + } + + histogram.value = function(_) { + return arguments.length ? (value = typeof _ === "function" ? _ : constant(_), histogram) : value; + }; + + histogram.domain = function(_) { + return arguments.length ? (domain = typeof _ === "function" ? _ : constant([_[0], _[1]]), histogram) : domain; + }; + + histogram.thresholds = function(_) { + return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold; + }; + + return histogram; +}; + +var quantile = function(array, p, f) { + if (f == null) f = number; + if (!(n = array.length)) return; + if ((p = +p) <= 0 || n < 2) return +f(array[0], 0, array); + if (p >= 1) return +f(array[n - 1], n - 1, array); + var n, + h = (n - 1) * p, + i = Math.floor(h), + a = +f(array[i], i, array), + b = +f(array[i + 1], i + 1, array); + return a + (b - a) * (h - i); +}; + +var freedmanDiaconis = function(values, min, max) { + values = map.call(values, number).sort(ascending); + return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(values.length, -1 / 3))); +}; + +var scott = function(values, min, max) { + return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(values.length, -1 / 3))); +}; + +var max = function(array, f) { + var i = -1, + n = array.length, + a, + b; + + if (f == null) { + while (++i < n) if ((b = array[i]) != null && b >= b) { a = b; break; } + while (++i < n) if ((b = array[i]) != null && b > a) a = b; + } + + else { + while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = b; break; } + while (++i < n) if ((b = f(array[i], i, array)) != null && b > a) a = b; + } + + return a; +}; + +var mean = function(array, f) { + var s = 0, + n = array.length, + a, + i = -1, + j = n; + + if (f == null) { + while (++i < n) if (!isNaN(a = number(array[i]))) s += a; else --j; + } + + else { + while (++i < n) if (!isNaN(a = number(f(array[i], i, array)))) s += a; else --j; + } + + if (j) return s / j; +}; + +var median = function(array, f) { + var numbers = [], + n = array.length, + a, + i = -1; + + if (f == null) { + while (++i < n) if (!isNaN(a = number(array[i]))) numbers.push(a); + } + + else { + while (++i < n) if (!isNaN(a = number(f(array[i], i, array)))) numbers.push(a); + } + + return quantile(numbers.sort(ascending), 0.5); +}; + +var merge = function(arrays) { + var n = arrays.length, + m, + i = -1, + j = 0, + merged, + array; + + while (++i < n) j += arrays[i].length; + merged = new Array(j); + + while (--n >= 0) { + array = arrays[n]; + m = array.length; + while (--m >= 0) { + merged[--j] = array[m]; + } + } + + return merged; +}; + +var min = function(array, f) { + var i = -1, + n = array.length, + a, + b; + + if (f == null) { + while (++i < n) if ((b = array[i]) != null && b >= b) { a = b; break; } + while (++i < n) if ((b = array[i]) != null && a > b) a = b; + } + + else { + while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = b; break; } + while (++i < n) if ((b = f(array[i], i, array)) != null && a > b) a = b; + } + + return a; +}; + +var permute = function(array, indexes) { + var i = indexes.length, permutes = new Array(i); + while (i--) permutes[i] = array[indexes[i]]; + return permutes; +}; + +var scan = function(array, compare) { + if (!(n = array.length)) return; + var i = 0, + n, + j = 0, + xi, + xj = array[j]; + + if (!compare) compare = ascending; + + while (++i < n) if (compare(xi = array[i], xj) < 0 || compare(xj, xj) !== 0) xj = xi, j = i; + + if (compare(xj, xj) === 0) return j; +}; + +var shuffle = function(array, i0, i1) { + var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0), + t, + i; + + while (m) { + i = Math.random() * m-- | 0; + t = array[m + i0]; + array[m + i0] = array[i + i0]; + array[i + i0] = t; + } + + return array; +}; + +var sum = function(array, f) { + var s = 0, + n = array.length, + a, + i = -1; + + if (f == null) { + while (++i < n) if (a = +array[i]) s += a; // Note: zero and null are equivalent. + } + + else { + while (++i < n) if (a = +f(array[i], i, array)) s += a; + } + + return s; +}; + +var transpose = function(matrix) { + if (!(n = matrix.length)) return []; + for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) { + for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { + row[j] = matrix[j][i]; + } + } + return transpose; +}; + +function length(d) { + return d.length; +} + +var zip = function() { + return transpose(arguments); +}; + +exports.bisect = bisectRight; +exports.bisectRight = bisectRight; +exports.bisectLeft = bisectLeft; +exports.ascending = ascending; +exports.bisector = bisector; +exports.cross = cross; +exports.descending = descending; +exports.deviation = deviation; +exports.extent = extent; +exports.histogram = histogram; +exports.thresholdFreedmanDiaconis = freedmanDiaconis; +exports.thresholdScott = scott; +exports.thresholdSturges = sturges; +exports.max = max; +exports.mean = mean; +exports.median = median; +exports.merge = merge; +exports.min = min; +exports.pairs = pairs; +exports.permute = permute; +exports.quantile = quantile; +exports.range = range; +exports.scan = scan; +exports.shuffle = shuffle; +exports.sum = sum; +exports.ticks = ticks; +exports.tickStep = tickStep; +exports.transpose = transpose; +exports.variance = variance; +exports.zip = zip; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],107:[function(require,module,exports){ +// https://d3js.org/d3-collection/ Version 1.0.3. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); +}(this, (function (exports) { 'use strict'; + +var prefix = "$"; + +function Map() {} + +Map.prototype = map.prototype = { + constructor: Map, + has: function(key) { + return (prefix + key) in this; + }, + get: function(key) { + return this[prefix + key]; + }, + set: function(key, value) { + this[prefix + key] = value; + return this; + }, + remove: function(key) { + var property = prefix + key; + return property in this && delete this[property]; + }, + clear: function() { + for (var property in this) if (property[0] === prefix) delete this[property]; + }, + keys: function() { + var keys = []; + for (var property in this) if (property[0] === prefix) keys.push(property.slice(1)); + return keys; + }, + values: function() { + var values = []; + for (var property in this) if (property[0] === prefix) values.push(this[property]); + return values; + }, + entries: function() { + var entries = []; + for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]}); + return entries; + }, + size: function() { + var size = 0; + for (var property in this) if (property[0] === prefix) ++size; + return size; + }, + empty: function() { + for (var property in this) if (property[0] === prefix) return false; + return true; + }, + each: function(f) { + for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this); + } +}; + +function map(object, f) { + var map = new Map; + + // Copy constructor. + if (object instanceof Map) object.each(function(value, key) { map.set(key, value); }); + + // Index array by numeric index or specified key function. + else if (Array.isArray(object)) { + var i = -1, + n = object.length, + o; + + if (f == null) while (++i < n) map.set(i, object[i]); + else while (++i < n) map.set(f(o = object[i], i, object), o); + } + + // Convert object to map. + else if (object) for (var key in object) map.set(key, object[key]); + + return map; +} + +var nest = function() { + var keys = [], + sortKeys = [], + sortValues, + rollup, + nest; + + function apply(array, depth, createResult, setResult) { + if (depth >= keys.length) return rollup != null + ? rollup(array) : (sortValues != null + ? array.sort(sortValues) + : array); + + var i = -1, + n = array.length, + key = keys[depth++], + keyValue, + value, + valuesByKey = map(), + values, + result = createResult(); + + while (++i < n) { + if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) { + values.push(value); + } else { + valuesByKey.set(keyValue, [value]); + } + } + + valuesByKey.each(function(values, key) { + setResult(result, key, apply(values, depth, createResult, setResult)); + }); + + return result; + } + + function entries(map$$1, depth) { + if (++depth > keys.length) return map$$1; + var array, sortKey = sortKeys[depth - 1]; + if (rollup != null && depth >= keys.length) array = map$$1.entries(); + else array = [], map$$1.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); }); + return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array; + } + + return nest = { + object: function(array) { return apply(array, 0, createObject, setObject); }, + map: function(array) { return apply(array, 0, createMap, setMap); }, + entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); }, + key: function(d) { keys.push(d); return nest; }, + sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; }, + sortValues: function(order) { sortValues = order; return nest; }, + rollup: function(f) { rollup = f; return nest; } + }; +}; + +function createObject() { + return {}; +} + +function setObject(object, key, value) { + object[key] = value; +} + +function createMap() { + return map(); +} + +function setMap(map$$1, key, value) { + map$$1.set(key, value); +} + +function Set() {} + +var proto = map.prototype; + +Set.prototype = set.prototype = { + constructor: Set, + has: proto.has, + add: function(value) { + value += ""; + this[prefix + value] = value; + return this; + }, + remove: proto.remove, + clear: proto.clear, + values: proto.keys, + size: proto.size, + empty: proto.empty, + each: proto.each +}; + +function set(object, f) { + var set = new Set; + + // Copy constructor. + if (object instanceof Set) object.each(function(value) { set.add(value); }); + + // Otherwise, assume it’s an array. + else if (object) { + var i = -1, n = object.length; + if (f == null) while (++i < n) set.add(object[i]); + else while (++i < n) set.add(f(object[i], i, object)); + } + + return set; +} + +var keys = function(map) { + var keys = []; + for (var key in map) keys.push(key); + return keys; +}; + +var values = function(map) { + var values = []; + for (var key in map) values.push(map[key]); + return values; +}; + +var entries = function(map) { + var entries = []; + for (var key in map) entries.push({key: key, value: map[key]}); + return entries; +}; + +exports.nest = nest; +exports.set = set; +exports.map = map; +exports.keys = keys; +exports.values = values; +exports.entries = entries; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],108:[function(require,module,exports){ +// https://d3js.org/d3-color/ Version 1.0.3. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); +}(this, (function (exports) { 'use strict'; + +var define = function(constructor, factory, prototype) { + constructor.prototype = factory.prototype = prototype; + prototype.constructor = constructor; +}; + +function extend(parent, definition) { + var prototype = Object.create(parent.prototype); + for (var key in definition) prototype[key] = definition[key]; + return prototype; +} + +function Color() {} + +var darker = 0.7; +var brighter = 1 / darker; + +var reI = "\\s*([+-]?\\d+)\\s*"; +var reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*"; +var reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*"; +var reHex3 = /^#([0-9a-f]{3})$/; +var reHex6 = /^#([0-9a-f]{6})$/; +var reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"); +var reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"); +var reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"); +var reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"); +var reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"); +var reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); + +var named = { + aliceblue: 0xf0f8ff, + antiquewhite: 0xfaebd7, + aqua: 0x00ffff, + aquamarine: 0x7fffd4, + azure: 0xf0ffff, + beige: 0xf5f5dc, + bisque: 0xffe4c4, + black: 0x000000, + blanchedalmond: 0xffebcd, + blue: 0x0000ff, + blueviolet: 0x8a2be2, + brown: 0xa52a2a, + burlywood: 0xdeb887, + cadetblue: 0x5f9ea0, + chartreuse: 0x7fff00, + chocolate: 0xd2691e, + coral: 0xff7f50, + cornflowerblue: 0x6495ed, + cornsilk: 0xfff8dc, + crimson: 0xdc143c, + cyan: 0x00ffff, + darkblue: 0x00008b, + darkcyan: 0x008b8b, + darkgoldenrod: 0xb8860b, + darkgray: 0xa9a9a9, + darkgreen: 0x006400, + darkgrey: 0xa9a9a9, + darkkhaki: 0xbdb76b, + darkmagenta: 0x8b008b, + darkolivegreen: 0x556b2f, + darkorange: 0xff8c00, + darkorchid: 0x9932cc, + darkred: 0x8b0000, + darksalmon: 0xe9967a, + darkseagreen: 0x8fbc8f, + darkslateblue: 0x483d8b, + darkslategray: 0x2f4f4f, + darkslategrey: 0x2f4f4f, + darkturquoise: 0x00ced1, + darkviolet: 0x9400d3, + deeppink: 0xff1493, + deepskyblue: 0x00bfff, + dimgray: 0x696969, + dimgrey: 0x696969, + dodgerblue: 0x1e90ff, + firebrick: 0xb22222, + floralwhite: 0xfffaf0, + forestgreen: 0x228b22, + fuchsia: 0xff00ff, + gainsboro: 0xdcdcdc, + ghostwhite: 0xf8f8ff, + gold: 0xffd700, + goldenrod: 0xdaa520, + gray: 0x808080, + green: 0x008000, + greenyellow: 0xadff2f, + grey: 0x808080, + honeydew: 0xf0fff0, + hotpink: 0xff69b4, + indianred: 0xcd5c5c, + indigo: 0x4b0082, + ivory: 0xfffff0, + khaki: 0xf0e68c, + lavender: 0xe6e6fa, + lavenderblush: 0xfff0f5, + lawngreen: 0x7cfc00, + lemonchiffon: 0xfffacd, + lightblue: 0xadd8e6, + lightcoral: 0xf08080, + lightcyan: 0xe0ffff, + lightgoldenrodyellow: 0xfafad2, + lightgray: 0xd3d3d3, + lightgreen: 0x90ee90, + lightgrey: 0xd3d3d3, + lightpink: 0xffb6c1, + lightsalmon: 0xffa07a, + lightseagreen: 0x20b2aa, + lightskyblue: 0x87cefa, + lightslategray: 0x778899, + lightslategrey: 0x778899, + lightsteelblue: 0xb0c4de, + lightyellow: 0xffffe0, + lime: 0x00ff00, + limegreen: 0x32cd32, + linen: 0xfaf0e6, + magenta: 0xff00ff, + maroon: 0x800000, + mediumaquamarine: 0x66cdaa, + mediumblue: 0x0000cd, + mediumorchid: 0xba55d3, + mediumpurple: 0x9370db, + mediumseagreen: 0x3cb371, + mediumslateblue: 0x7b68ee, + mediumspringgreen: 0x00fa9a, + mediumturquoise: 0x48d1cc, + mediumvioletred: 0xc71585, + midnightblue: 0x191970, + mintcream: 0xf5fffa, + mistyrose: 0xffe4e1, + moccasin: 0xffe4b5, + navajowhite: 0xffdead, + navy: 0x000080, + oldlace: 0xfdf5e6, + olive: 0x808000, + olivedrab: 0x6b8e23, + orange: 0xffa500, + orangered: 0xff4500, + orchid: 0xda70d6, + palegoldenrod: 0xeee8aa, + palegreen: 0x98fb98, + paleturquoise: 0xafeeee, + palevioletred: 0xdb7093, + papayawhip: 0xffefd5, + peachpuff: 0xffdab9, + peru: 0xcd853f, + pink: 0xffc0cb, + plum: 0xdda0dd, + powderblue: 0xb0e0e6, + purple: 0x800080, + rebeccapurple: 0x663399, + red: 0xff0000, + rosybrown: 0xbc8f8f, + royalblue: 0x4169e1, + saddlebrown: 0x8b4513, + salmon: 0xfa8072, + sandybrown: 0xf4a460, + seagreen: 0x2e8b57, + seashell: 0xfff5ee, + sienna: 0xa0522d, + silver: 0xc0c0c0, + skyblue: 0x87ceeb, + slateblue: 0x6a5acd, + slategray: 0x708090, + slategrey: 0x708090, + snow: 0xfffafa, + springgreen: 0x00ff7f, + steelblue: 0x4682b4, + tan: 0xd2b48c, + teal: 0x008080, + thistle: 0xd8bfd8, + tomato: 0xff6347, + turquoise: 0x40e0d0, + violet: 0xee82ee, + wheat: 0xf5deb3, + white: 0xffffff, + whitesmoke: 0xf5f5f5, + yellow: 0xffff00, + yellowgreen: 0x9acd32 +}; + +define(Color, color, { + displayable: function() { + return this.rgb().displayable(); + }, + toString: function() { + return this.rgb() + ""; + } +}); + +function color(format) { + var m; + format = (format + "").trim().toLowerCase(); + return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00 + : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000 + : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) + : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) + : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) + : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) + : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) + : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) + : named.hasOwnProperty(format) ? rgbn(named[format]) + : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) + : null; +} + +function rgbn(n) { + return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); +} + +function rgba(r, g, b, a) { + if (a <= 0) r = g = b = NaN; + return new Rgb(r, g, b, a); +} + +function rgbConvert(o) { + if (!(o instanceof Color)) o = color(o); + if (!o) return new Rgb; + o = o.rgb(); + return new Rgb(o.r, o.g, o.b, o.opacity); +} + +function rgb(r, g, b, opacity) { + return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); +} + +function Rgb(r, g, b, opacity) { + this.r = +r; + this.g = +g; + this.b = +b; + this.opacity = +opacity; +} + +define(Rgb, rgb, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + rgb: function() { + return this; + }, + displayable: function() { + return (0 <= this.r && this.r <= 255) + && (0 <= this.g && this.g <= 255) + && (0 <= this.b && this.b <= 255) + && (0 <= this.opacity && this.opacity <= 1); + }, + toString: function() { + var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); + return (a === 1 ? "rgb(" : "rgba(") + + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + + (a === 1 ? ")" : ", " + a + ")"); + } +})); + +function hsla(h, s, l, a) { + if (a <= 0) h = s = l = NaN; + else if (l <= 0 || l >= 1) h = s = NaN; + else if (s <= 0) h = NaN; + return new Hsl(h, s, l, a); +} + +function hslConvert(o) { + if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Color)) o = color(o); + if (!o) return new Hsl; + if (o instanceof Hsl) return o; + o = o.rgb(); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + min = Math.min(r, g, b), + max = Math.max(r, g, b), + h = NaN, + s = max - min, + l = (max + min) / 2; + if (s) { + if (r === max) h = (g - b) / s + (g < b) * 6; + else if (g === max) h = (b - r) / s + 2; + else h = (r - g) / s + 4; + s /= l < 0.5 ? max + min : 2 - max - min; + h *= 60; + } else { + s = l > 0 && l < 1 ? 0 : h; + } + return new Hsl(h, s, l, o.opacity); +} + +function hsl(h, s, l, opacity) { + return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); +} + +function Hsl(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} + +define(Hsl, hsl, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = this.h % 360 + (this.h < 0) * 360, + s = isNaN(h) || isNaN(this.s) ? 0 : this.s, + l = this.l, + m2 = l + (l < 0.5 ? l : 1 - l) * s, + m1 = 2 * l - m2; + return new Rgb( + hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), + hsl2rgb(h, m1, m2), + hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), + this.opacity + ); + }, + displayable: function() { + return (0 <= this.s && this.s <= 1 || isNaN(this.s)) + && (0 <= this.l && this.l <= 1) + && (0 <= this.opacity && this.opacity <= 1); + } +})); + +/* From FvD 13.37, CSS Color Module Level 3 */ +function hsl2rgb(h, m1, m2) { + return (h < 60 ? m1 + (m2 - m1) * h / 60 + : h < 180 ? m2 + : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 + : m1) * 255; +} + +var deg2rad = Math.PI / 180; +var rad2deg = 180 / Math.PI; + +var Kn = 18; +var Xn = 0.950470; +var Yn = 1; +var Zn = 1.088830; +var t0 = 4 / 29; +var t1 = 6 / 29; +var t2 = 3 * t1 * t1; +var t3 = t1 * t1 * t1; + +function labConvert(o) { + if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); + if (o instanceof Hcl) { + var h = o.h * deg2rad; + return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); + } + if (!(o instanceof Rgb)) o = rgbConvert(o); + var b = rgb2xyz(o.r), + a = rgb2xyz(o.g), + l = rgb2xyz(o.b), + x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn), + y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn), + z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn); + return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); +} + +function lab(l, a, b, opacity) { + return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); +} + +function Lab(l, a, b, opacity) { + this.l = +l; + this.a = +a; + this.b = +b; + this.opacity = +opacity; +} + +define(Lab, lab, extend(Color, { + brighter: function(k) { + return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + darker: function(k) { + return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + rgb: function() { + var y = (this.l + 16) / 116, + x = isNaN(this.a) ? y : y + this.a / 500, + z = isNaN(this.b) ? y : y - this.b / 200; + y = Yn * lab2xyz(y); + x = Xn * lab2xyz(x); + z = Zn * lab2xyz(z); + return new Rgb( + xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB + xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z), + xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z), + this.opacity + ); + } +})); + +function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; +} + +function lab2xyz(t) { + return t > t1 ? t * t * t : t2 * (t - t0); +} + +function xyz2rgb(x) { + return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); +} + +function rgb2xyz(x) { + return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); +} + +function hclConvert(o) { + if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); + if (!(o instanceof Lab)) o = labConvert(o); + var h = Math.atan2(o.b, o.a) * rad2deg; + return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); +} + +function hcl(h, c, l, opacity) { + return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); +} + +function Hcl(h, c, l, opacity) { + this.h = +h; + this.c = +c; + this.l = +l; + this.opacity = +opacity; +} + +define(Hcl, hcl, extend(Color, { + brighter: function(k) { + return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k), this.opacity); + }, + darker: function(k) { + return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k), this.opacity); + }, + rgb: function() { + return labConvert(this).rgb(); + } +})); + +var A = -0.14861; +var B = +1.78277; +var C = -0.29227; +var D = -0.90649; +var E = +1.97294; +var ED = E * D; +var EB = E * B; +var BC_DA = B * C - D * A; + +function cubehelixConvert(o) { + if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Rgb)) o = rgbConvert(o); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), + bl = b - l, + k = (E * (g - l) - C * bl) / D, + s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 + h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN; + return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); +} + +function cubehelix(h, s, l, opacity) { + return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); +} + +function Cubehelix(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} + +define(Cubehelix, cubehelix, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad, + l = +this.l, + a = isNaN(this.s) ? 0 : this.s * l * (1 - l), + cosh = Math.cos(h), + sinh = Math.sin(h); + return new Rgb( + 255 * (l + a * (A * cosh + B * sinh)), + 255 * (l + a * (C * cosh + D * sinh)), + 255 * (l + a * (E * cosh)), + this.opacity + ); + } +})); + +exports.color = color; +exports.rgb = rgb; +exports.hsl = hsl; +exports.lab = lab; +exports.hcl = hcl; +exports.cubehelix = cubehelix; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],109:[function(require,module,exports){ +// https://d3js.org/d3-dispatch/ Version 1.0.3. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); +}(this, (function (exports) { 'use strict'; + +var noop = {value: function() {}}; + +function dispatch() { + for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { + if (!(t = arguments[i] + "") || (t in _)) throw new Error("illegal type: " + t); + _[t] = []; + } + return new Dispatch(_); +} + +function Dispatch(_) { + this._ = _; +} + +function parseTypenames(typenames, types) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); + if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); + return {type: t, name: name}; + }); +} + +Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _ = this._, + T = parseTypenames(typename + "", _), + t, + i = -1, + n = T.length; + + // If no callback was specified, return the callback of the given type and name. + if (arguments.length < 2) { + while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; + return; + } + + // If a type was specified, set the callback for the given type and name. + // Otherwise, if a null callback was specified, remove callbacks of the given name. + if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); + while (++i < n) { + if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); + else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); + } + + return this; + }, + copy: function() { + var copy = {}, _ = this._; + for (var t in _) copy[t] = _[t].slice(); + return new Dispatch(copy); + }, + call: function(type, that) { + if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + }, + apply: function(type, that, args) { + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + } +}; + +function get(type, name) { + for (var i = 0, n = type.length, c; i < n; ++i) { + if ((c = type[i]).name === name) { + return c.value; + } + } +} + +function set(type, name, callback) { + for (var i = 0, n = type.length; i < n; ++i) { + if (type[i].name === name) { + type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); + break; + } + } + if (callback != null) type.push({name: name, value: callback}); + return type; +} + +exports.dispatch = dispatch; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],110:[function(require,module,exports){ +// https://d3js.org/d3-force/ Version 1.0.6. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-quadtree'), require('d3-collection'), require('d3-dispatch'), require('d3-timer')) : + typeof define === 'function' && define.amd ? define(['exports', 'd3-quadtree', 'd3-collection', 'd3-dispatch', 'd3-timer'], factory) : + (factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3,global.d3)); +}(this, (function (exports,d3Quadtree,d3Collection,d3Dispatch,d3Timer) { 'use strict'; + +var center = function(x, y) { + var nodes; + + if (x == null) x = 0; + if (y == null) y = 0; + + function force() { + var i, + n = nodes.length, + node, + sx = 0, + sy = 0; + + for (i = 0; i < n; ++i) { + node = nodes[i], sx += node.x, sy += node.y; + } + + for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) { + node = nodes[i], node.x -= sx, node.y -= sy; + } + } + + force.initialize = function(_) { + nodes = _; + }; + + force.x = function(_) { + return arguments.length ? (x = +_, force) : x; + }; + + force.y = function(_) { + return arguments.length ? (y = +_, force) : y; + }; + + return force; +}; + +var constant = function(x) { + return function() { + return x; + }; +}; + +var jiggle = function() { + return (Math.random() - 0.5) * 1e-6; +}; + +function x(d) { + return d.x + d.vx; +} + +function y(d) { + return d.y + d.vy; +} + +var collide = function(radius) { + var nodes, + radii, + strength = 1, + iterations = 1; + + if (typeof radius !== "function") radius = constant(radius == null ? 1 : +radius); + + function force() { + var i, n = nodes.length, + tree, + node, + xi, + yi, + ri, + ri2; + + for (var k = 0; k < iterations; ++k) { + tree = d3Quadtree.quadtree(nodes, x, y).visitAfter(prepare); + for (i = 0; i < n; ++i) { + node = nodes[i]; + ri = radii[node.index], ri2 = ri * ri; + xi = node.x + node.vx; + yi = node.y + node.vy; + tree.visit(apply); + } + } + + function apply(quad, x0, y0, x1, y1) { + var data = quad.data, rj = quad.r, r = ri + rj; + if (data) { + if (data.index > node.index) { + var x = xi - data.x - data.vx, + y = yi - data.y - data.vy, + l = x * x + y * y; + if (l < r * r) { + if (x === 0) x = jiggle(), l += x * x; + if (y === 0) y = jiggle(), l += y * y; + l = (r - (l = Math.sqrt(l))) / l * strength; + node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj)); + node.vy += (y *= l) * r; + data.vx -= x * (r = 1 - r); + data.vy -= y * r; + } + } + return; + } + return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r; + } + } + + function prepare(quad) { + if (quad.data) return quad.r = radii[quad.data.index]; + for (var i = quad.r = 0; i < 4; ++i) { + if (quad[i] && quad[i].r > quad.r) { + quad.r = quad[i].r; + } + } + } + + function initialize() { + if (!nodes) return; + var i, n = nodes.length, node; + radii = new Array(n); + for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes); + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.iterations = function(_) { + return arguments.length ? (iterations = +_, force) : iterations; + }; + + force.strength = function(_) { + return arguments.length ? (strength = +_, force) : strength; + }; + + force.radius = function(_) { + return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), initialize(), force) : radius; + }; + + return force; +}; + +function index(d) { + return d.index; +} + +function find(nodeById, nodeId) { + var node = nodeById.get(nodeId); + if (!node) throw new Error("missing: " + nodeId); + return node; +} + +var link = function(links) { + var id = index, + strength = defaultStrength, + strengths, + distance = constant(30), + distances, + nodes, + count, + bias, + iterations = 1; + + if (links == null) links = []; + + function defaultStrength(link) { + return 1 / Math.min(count[link.source.index], count[link.target.index]); + } + + function force(alpha) { + for (var k = 0, n = links.length; k < iterations; ++k) { + for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) { + link = links[i], source = link.source, target = link.target; + x = target.x + target.vx - source.x - source.vx || jiggle(); + y = target.y + target.vy - source.y - source.vy || jiggle(); + l = Math.sqrt(x * x + y * y); + l = (l - distances[i]) / l * alpha * strengths[i]; + x *= l, y *= l; + target.vx -= x * (b = bias[i]); + target.vy -= y * b; + source.vx += x * (b = 1 - b); + source.vy += y * b; + } + } + } + + function initialize() { + if (!nodes) return; + + var i, + n = nodes.length, + m = links.length, + nodeById = d3Collection.map(nodes, id), + link; + + for (i = 0, count = new Array(n); i < m; ++i) { + link = links[i], link.index = i; + if (typeof link.source !== "object") link.source = find(nodeById, link.source); + if (typeof link.target !== "object") link.target = find(nodeById, link.target); + count[link.source.index] = (count[link.source.index] || 0) + 1; + count[link.target.index] = (count[link.target.index] || 0) + 1; + } + + for (i = 0, bias = new Array(m); i < m; ++i) { + link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); + } + + strengths = new Array(m), initializeStrength(); + distances = new Array(m), initializeDistance(); + } + + function initializeStrength() { + if (!nodes) return; + + for (var i = 0, n = links.length; i < n; ++i) { + strengths[i] = +strength(links[i], i, links); + } + } + + function initializeDistance() { + if (!nodes) return; + + for (var i = 0, n = links.length; i < n; ++i) { + distances[i] = +distance(links[i], i, links); + } + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.links = function(_) { + return arguments.length ? (links = _, initialize(), force) : links; + }; + + force.id = function(_) { + return arguments.length ? (id = _, force) : id; + }; + + force.iterations = function(_) { + return arguments.length ? (iterations = +_, force) : iterations; + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initializeStrength(), force) : strength; + }; + + force.distance = function(_) { + return arguments.length ? (distance = typeof _ === "function" ? _ : constant(+_), initializeDistance(), force) : distance; + }; + + return force; +}; + +function x$1(d) { + return d.x; +} + +function y$1(d) { + return d.y; +} + +var initialRadius = 10; +var initialAngle = Math.PI * (3 - Math.sqrt(5)); + +var simulation = function(nodes) { + var simulation, + alpha = 1, + alphaMin = 0.001, + alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), + alphaTarget = 0, + velocityDecay = 0.6, + forces = d3Collection.map(), + stepper = d3Timer.timer(step), + event = d3Dispatch.dispatch("tick", "end"); + + if (nodes == null) nodes = []; + + function step() { + tick(); + event.call("tick", simulation); + if (alpha < alphaMin) { + stepper.stop(); + event.call("end", simulation); + } + } + + function tick() { + var i, n = nodes.length, node; + + alpha += (alphaTarget - alpha) * alphaDecay; + + forces.each(function(force) { + force(alpha); + }); + + for (i = 0; i < n; ++i) { + node = nodes[i]; + if (node.fx == null) node.x += node.vx *= velocityDecay; + else node.x = node.fx, node.vx = 0; + if (node.fy == null) node.y += node.vy *= velocityDecay; + else node.y = node.fy, node.vy = 0; + } + } + + function initializeNodes() { + for (var i = 0, n = nodes.length, node; i < n; ++i) { + node = nodes[i], node.index = i; + if (isNaN(node.x) || isNaN(node.y)) { + var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle; + node.x = radius * Math.cos(angle); + node.y = radius * Math.sin(angle); + } + if (isNaN(node.vx) || isNaN(node.vy)) { + node.vx = node.vy = 0; + } + } + } + + function initializeForce(force) { + if (force.initialize) force.initialize(nodes); + return force; + } + + initializeNodes(); + + return simulation = { + tick: tick, + + restart: function() { + return stepper.restart(step), simulation; + }, + + stop: function() { + return stepper.stop(), simulation; + }, + + nodes: function(_) { + return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes; + }, + + alpha: function(_) { + return arguments.length ? (alpha = +_, simulation) : alpha; + }, + + alphaMin: function(_) { + return arguments.length ? (alphaMin = +_, simulation) : alphaMin; + }, + + alphaDecay: function(_) { + return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay; + }, + + alphaTarget: function(_) { + return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget; + }, + + velocityDecay: function(_) { + return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay; + }, + + force: function(name, _) { + return arguments.length > 1 ? ((_ == null ? forces.remove(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); + }, + + find: function(x, y, radius) { + var i = 0, + n = nodes.length, + dx, + dy, + d2, + node, + closest; + + if (radius == null) radius = Infinity; + else radius *= radius; + + for (i = 0; i < n; ++i) { + node = nodes[i]; + dx = x - node.x; + dy = y - node.y; + d2 = dx * dx + dy * dy; + if (d2 < radius) closest = node, radius = d2; + } + + return closest; + }, + + on: function(name, _) { + return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name); + } + }; +}; + +var manyBody = function() { + var nodes, + node, + alpha, + strength = constant(-30), + strengths, + distanceMin2 = 1, + distanceMax2 = Infinity, + theta2 = 0.81; + + function force(_) { + var i, n = nodes.length, tree = d3Quadtree.quadtree(nodes, x$1, y$1).visitAfter(accumulate); + for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply); + } + + function initialize() { + if (!nodes) return; + var i, n = nodes.length, node; + strengths = new Array(n); + for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); + } + + function accumulate(quad) { + var strength = 0, q, c, x$$1, y$$1, i; + + // For internal nodes, accumulate forces from child quadrants. + if (quad.length) { + for (x$$1 = y$$1 = i = 0; i < 4; ++i) { + if ((q = quad[i]) && (c = q.value)) { + strength += c, x$$1 += c * q.x, y$$1 += c * q.y; + } + } + quad.x = x$$1 / strength; + quad.y = y$$1 / strength; + } + + // For leaf nodes, accumulate forces from coincident quadrants. + else { + q = quad; + q.x = q.data.x; + q.y = q.data.y; + do strength += strengths[q.data.index]; + while (q = q.next); + } + + quad.value = strength; + } + + function apply(quad, x1, _, x2) { + if (!quad.value) return true; + + var x$$1 = quad.x - node.x, + y$$1 = quad.y - node.y, + w = x2 - x1, + l = x$$1 * x$$1 + y$$1 * y$$1; + + // Apply the Barnes-Hut approximation if possible. + // Limit forces for very close nodes; randomize direction if coincident. + if (w * w / theta2 < l) { + if (l < distanceMax2) { + if (x$$1 === 0) x$$1 = jiggle(), l += x$$1 * x$$1; + if (y$$1 === 0) y$$1 = jiggle(), l += y$$1 * y$$1; + if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); + node.vx += x$$1 * quad.value * alpha / l; + node.vy += y$$1 * quad.value * alpha / l; + } + return true; + } + + // Otherwise, process points directly. + else if (quad.length || l >= distanceMax2) return; + + // Limit forces for very close nodes; randomize direction if coincident. + if (quad.data !== node || quad.next) { + if (x$$1 === 0) x$$1 = jiggle(), l += x$$1 * x$$1; + if (y$$1 === 0) y$$1 = jiggle(), l += y$$1 * y$$1; + if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); + } + + do if (quad.data !== node) { + w = strengths[quad.data.index] * alpha / l; + node.vx += x$$1 * w; + node.vy += y$$1 * w; + } while (quad = quad.next); + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; + }; + + force.distanceMin = function(_) { + return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2); + }; + + force.distanceMax = function(_) { + return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2); + }; + + force.theta = function(_) { + return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2); + }; + + return force; +}; + +var x$2 = function(x) { + var strength = constant(0.1), + nodes, + strengths, + xz; + + if (typeof x !== "function") x = constant(x == null ? 0 : +x); + + function force(alpha) { + for (var i = 0, n = nodes.length, node; i < n; ++i) { + node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha; + } + } + + function initialize() { + if (!nodes) return; + var i, n = nodes.length; + strengths = new Array(n); + xz = new Array(n); + for (i = 0; i < n; ++i) { + strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); + } + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; + }; + + force.x = function(_) { + return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), initialize(), force) : x; + }; + + return force; +}; + +var y$2 = function(y) { + var strength = constant(0.1), + nodes, + strengths, + yz; + + if (typeof y !== "function") y = constant(y == null ? 0 : +y); + + function force(alpha) { + for (var i = 0, n = nodes.length, node; i < n; ++i) { + node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha; + } + } + + function initialize() { + if (!nodes) return; + var i, n = nodes.length; + strengths = new Array(n); + yz = new Array(n); + for (i = 0; i < n; ++i) { + strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); + } + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; + }; + + force.y = function(_) { + return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), initialize(), force) : y; + }; + + return force; +}; + +exports.forceCenter = center; +exports.forceCollide = collide; +exports.forceLink = link; +exports.forceManyBody = manyBody; +exports.forceSimulation = simulation; +exports.forceX = x$2; +exports.forceY = y$2; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{"d3-collection":107,"d3-dispatch":109,"d3-quadtree":112,"d3-timer":113}],111:[function(require,module,exports){ +// https://d3js.org/d3-interpolate/ Version 1.1.4. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-color')) : + typeof define === 'function' && define.amd ? define(['exports', 'd3-color'], factory) : + (factory((global.d3 = global.d3 || {}),global.d3)); +}(this, (function (exports,d3Color) { 'use strict'; + +function basis(t1, v0, v1, v2, v3) { + var t2 = t1 * t1, t3 = t2 * t1; + return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + + (4 - 6 * t2 + 3 * t3) * v1 + + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + + t3 * v3) / 6; +} + +var basis$1 = function(values) { + var n = values.length - 1; + return function(t) { + var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), + v1 = values[i], + v2 = values[i + 1], + v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, + v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; + return basis((t - i / n) * n, v0, v1, v2, v3); + }; +}; + +var basisClosed = function(values) { + var n = values.length; + return function(t) { + var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), + v0 = values[(i + n - 1) % n], + v1 = values[i % n], + v2 = values[(i + 1) % n], + v3 = values[(i + 2) % n]; + return basis((t - i / n) * n, v0, v1, v2, v3); + }; +}; + +var constant = function(x) { + return function() { + return x; + }; +}; + +function linear(a, d) { + return function(t) { + return a + t * d; + }; +} + +function exponential(a, b, y) { + return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { + return Math.pow(a + t * b, y); + }; +} + +function hue(a, b) { + var d = b - a; + return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a); +} + +function gamma(y) { + return (y = +y) === 1 ? nogamma : function(a, b) { + return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); + }; +} + +function nogamma(a, b) { + var d = b - a; + return d ? linear(a, d) : constant(isNaN(a) ? b : a); +} + +var rgb$1 = ((function rgbGamma(y) { + var color$$1 = gamma(y); + + function rgb$$1(start, end) { + var r = color$$1((start = d3Color.rgb(start)).r, (end = d3Color.rgb(end)).r), + g = color$$1(start.g, end.g), + b = color$$1(start.b, end.b), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.r = r(t); + start.g = g(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; + } + + rgb$$1.gamma = rgbGamma; + + return rgb$$1; +}))(1); + +function rgbSpline(spline) { + return function(colors) { + var n = colors.length, + r = new Array(n), + g = new Array(n), + b = new Array(n), + i, color$$1; + for (i = 0; i < n; ++i) { + color$$1 = d3Color.rgb(colors[i]); + r[i] = color$$1.r || 0; + g[i] = color$$1.g || 0; + b[i] = color$$1.b || 0; + } + r = spline(r); + g = spline(g); + b = spline(b); + color$$1.opacity = 1; + return function(t) { + color$$1.r = r(t); + color$$1.g = g(t); + color$$1.b = b(t); + return color$$1 + ""; + }; + }; +} + +var rgbBasis = rgbSpline(basis$1); +var rgbBasisClosed = rgbSpline(basisClosed); + +var array = function(a, b) { + var nb = b ? b.length : 0, + na = a ? Math.min(nb, a.length) : 0, + x = new Array(nb), + c = new Array(nb), + i; + + for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]); + for (; i < nb; ++i) c[i] = b[i]; + + return function(t) { + for (i = 0; i < na; ++i) c[i] = x[i](t); + return c; + }; +}; + +var date = function(a, b) { + var d = new Date; + return a = +a, b -= a, function(t) { + return d.setTime(a + b * t), d; + }; +}; + +var number = function(a, b) { + return a = +a, b -= a, function(t) { + return a + b * t; + }; +}; + +var object = function(a, b) { + var i = {}, + c = {}, + k; + + if (a === null || typeof a !== "object") a = {}; + if (b === null || typeof b !== "object") b = {}; + + for (k in b) { + if (k in a) { + i[k] = value(a[k], b[k]); + } else { + c[k] = b[k]; + } + } + + return function(t) { + for (k in i) c[k] = i[k](t); + return c; + }; +}; + +var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g; +var reB = new RegExp(reA.source, "g"); + +function zero(b) { + return function() { + return b; + }; +} + +function one(b) { + return function(t) { + return b(t) + ""; + }; +} + +var string = function(a, b) { + var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b + am, // current match in a + bm, // current match in b + bs, // string preceding current number in b, if any + i = -1, // index in s + s = [], // string constants and placeholders + q = []; // number interpolators + + // Coerce inputs to strings. + a = a + "", b = b + ""; + + // Interpolate pairs of numbers in a & b. + while ((am = reA.exec(a)) + && (bm = reB.exec(b))) { + if ((bs = bm.index) > bi) { // a string precedes the next number in b + bs = b.slice(bi, bs); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match + if (s[i]) s[i] += bm; // coalesce with previous string + else s[++i] = bm; + } else { // interpolate non-matching numbers + s[++i] = null; + q.push({i: i, x: number(am, bm)}); + } + bi = reB.lastIndex; + } + + // Add remains of b. + if (bi < b.length) { + bs = b.slice(bi); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + + // Special optimization for only a single match. + // Otherwise, interpolate each of the numbers and rejoin the string. + return s.length < 2 ? (q[0] + ? one(q[0].x) + : zero(b)) + : (b = q.length, function(t) { + for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }); +}; + +var value = function(a, b) { + var t = typeof b, c; + return b == null || t === "boolean" ? constant(b) + : (t === "number" ? number + : t === "string" ? ((c = d3Color.color(b)) ? (b = c, rgb$1) : string) + : b instanceof d3Color.color ? rgb$1 + : b instanceof Date ? date + : Array.isArray(b) ? array + : isNaN(b) ? object + : number)(a, b); +}; + +var round = function(a, b) { + return a = +a, b -= a, function(t) { + return Math.round(a + b * t); + }; +}; + +var degrees = 180 / Math.PI; + +var identity = { + translateX: 0, + translateY: 0, + rotate: 0, + skewX: 0, + scaleX: 1, + scaleY: 1 +}; + +var decompose = function(a, b, c, d, e, f) { + var scaleX, scaleY, skewX; + if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; + if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; + if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; + if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; + return { + translateX: e, + translateY: f, + rotate: Math.atan2(b, a) * degrees, + skewX: Math.atan(skewX) * degrees, + scaleX: scaleX, + scaleY: scaleY + }; +}; + +var cssNode; +var cssRoot; +var cssView; +var svgNode; + +function parseCss(value) { + if (value === "none") return identity; + if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView; + cssNode.style.transform = value; + value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform"); + cssRoot.removeChild(cssNode); + value = value.slice(7, -1).split(","); + return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]); +} + +function parseSvg(value) { + if (value == null) return identity; + if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); + svgNode.setAttribute("transform", value); + if (!(value = svgNode.transform.baseVal.consolidate())) return identity; + value = value.matrix; + return decompose(value.a, value.b, value.c, value.d, value.e, value.f); +} + +function interpolateTransform(parse, pxComma, pxParen, degParen) { + + function pop(s) { + return s.length ? s.pop() + " " : ""; + } + + function translate(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push("translate(", null, pxComma, null, pxParen); + q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); + } else if (xb || yb) { + s.push("translate(" + xb + pxComma + yb + pxParen); + } + } + + function rotate(a, b, s, q) { + if (a !== b) { + if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path + q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b)}); + } else if (b) { + s.push(pop(s) + "rotate(" + b + degParen); + } + } + + function skewX(a, b, s, q) { + if (a !== b) { + q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number(a, b)}); + } else if (b) { + s.push(pop(s) + "skewX(" + b + degParen); + } + } + + function scale(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push(pop(s) + "scale(", null, ",", null, ")"); + q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); + } else if (xb !== 1 || yb !== 1) { + s.push(pop(s) + "scale(" + xb + "," + yb + ")"); + } + } + + return function(a, b) { + var s = [], // string constants and placeholders + q = []; // number interpolators + a = parse(a), b = parse(b); + translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); + rotate(a.rotate, b.rotate, s, q); + skewX(a.skewX, b.skewX, s, q); + scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); + a = b = null; // gc + return function(t) { + var i = -1, n = q.length, o; + while (++i < n) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }; + }; +} + +var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"); +var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"); + +var rho = Math.SQRT2; +var rho2 = 2; +var rho4 = 4; +var epsilon2 = 1e-12; + +function cosh(x) { + return ((x = Math.exp(x)) + 1 / x) / 2; +} + +function sinh(x) { + return ((x = Math.exp(x)) - 1 / x) / 2; +} + +function tanh(x) { + return ((x = Math.exp(2 * x)) - 1) / (x + 1); +} + +// p0 = [ux0, uy0, w0] +// p1 = [ux1, uy1, w1] +var zoom = function(p0, p1) { + var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], + ux1 = p1[0], uy1 = p1[1], w1 = p1[2], + dx = ux1 - ux0, + dy = uy1 - uy0, + d2 = dx * dx + dy * dy, + i, + S; + + // Special case for u0 ≅ u1. + if (d2 < epsilon2) { + S = Math.log(w1 / w0) / rho; + i = function(t) { + return [ + ux0 + t * dx, + uy0 + t * dy, + w0 * Math.exp(rho * t * S) + ]; + }; + } + + // General case. + else { + var d1 = Math.sqrt(d2), + b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), + b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), + r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), + r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); + S = (r1 - r0) / rho; + i = function(t) { + var s = t * S, + coshr0 = cosh(r0), + u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); + return [ + ux0 + u * dx, + uy0 + u * dy, + w0 * coshr0 / cosh(rho * s + r0) + ]; + }; + } + + i.duration = S * 1000; + + return i; +}; + +function hsl$1(hue$$1) { + return function(start, end) { + var h = hue$$1((start = d3Color.hsl(start)).h, (end = d3Color.hsl(end)).h), + s = nogamma(start.s, end.s), + l = nogamma(start.l, end.l), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.s = s(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; + } +} + +var hsl$2 = hsl$1(hue); +var hslLong = hsl$1(nogamma); + +function lab$1(start, end) { + var l = nogamma((start = d3Color.lab(start)).l, (end = d3Color.lab(end)).l), + a = nogamma(start.a, end.a), + b = nogamma(start.b, end.b), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.l = l(t); + start.a = a(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; +} + +function hcl$1(hue$$1) { + return function(start, end) { + var h = hue$$1((start = d3Color.hcl(start)).h, (end = d3Color.hcl(end)).h), + c = nogamma(start.c, end.c), + l = nogamma(start.l, end.l), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.c = c(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; + } +} + +var hcl$2 = hcl$1(hue); +var hclLong = hcl$1(nogamma); + +function cubehelix$1(hue$$1) { + return (function cubehelixGamma(y) { + y = +y; + + function cubehelix$$1(start, end) { + var h = hue$$1((start = d3Color.cubehelix(start)).h, (end = d3Color.cubehelix(end)).h), + s = nogamma(start.s, end.s), + l = nogamma(start.l, end.l), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.s = s(t); + start.l = l(Math.pow(t, y)); + start.opacity = opacity(t); + return start + ""; + }; + } + + cubehelix$$1.gamma = cubehelixGamma; + + return cubehelix$$1; + })(1); +} + +var cubehelix$2 = cubehelix$1(hue); +var cubehelixLong = cubehelix$1(nogamma); + +var quantize = function(interpolator, n) { + var samples = new Array(n); + for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); + return samples; +}; + +exports.interpolate = value; +exports.interpolateArray = array; +exports.interpolateBasis = basis$1; +exports.interpolateBasisClosed = basisClosed; +exports.interpolateDate = date; +exports.interpolateNumber = number; +exports.interpolateObject = object; +exports.interpolateRound = round; +exports.interpolateString = string; +exports.interpolateTransformCss = interpolateTransformCss; +exports.interpolateTransformSvg = interpolateTransformSvg; +exports.interpolateZoom = zoom; +exports.interpolateRgb = rgb$1; +exports.interpolateRgbBasis = rgbBasis; +exports.interpolateRgbBasisClosed = rgbBasisClosed; +exports.interpolateHsl = hsl$2; +exports.interpolateHslLong = hslLong; +exports.interpolateLab = lab$1; +exports.interpolateHcl = hcl$2; +exports.interpolateHclLong = hclLong; +exports.interpolateCubehelix = cubehelix$2; +exports.interpolateCubehelixLong = cubehelixLong; +exports.quantize = quantize; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{"d3-color":108}],112:[function(require,module,exports){ +// https://d3js.org/d3-quadtree/ Version 1.0.3. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); +}(this, (function (exports) { 'use strict'; + +var tree_add = function(d) { + var x = +this._x.call(null, d), + y = +this._y.call(null, d); + return add(this.cover(x, y), x, y, d); +}; + +function add(tree, x, y, d) { + if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points + + var parent, + node = tree._root, + leaf = {data: d}, + x0 = tree._x0, + y0 = tree._y0, + x1 = tree._x1, + y1 = tree._y1, + xm, + ym, + xp, + yp, + right, + bottom, + i, + j; + + // If the tree is empty, initialize the root as a leaf. + if (!node) return tree._root = leaf, tree; + + // Find the existing leaf for the new point, or add it. + while (node.length) { + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; + if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; + } + + // Is the new point is exactly coincident with the existing point? + xp = +tree._x.call(null, node.data); + yp = +tree._y.call(null, node.data); + if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; + + // Otherwise, split the leaf node until the old and new point are separated. + do { + parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; + } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm))); + return parent[j] = node, parent[i] = leaf, tree; +} + +function addAll(data) { + var d, i, n = data.length, + x, + y, + xz = new Array(n), + yz = new Array(n), + x0 = Infinity, + y0 = Infinity, + x1 = -Infinity, + y1 = -Infinity; + + // Compute the points and their extent. + for (i = 0; i < n; ++i) { + if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; + xz[i] = x; + yz[i] = y; + if (x < x0) x0 = x; + if (x > x1) x1 = x; + if (y < y0) y0 = y; + if (y > y1) y1 = y; + } + + // If there were no (valid) points, inherit the existing extent. + if (x1 < x0) x0 = this._x0, x1 = this._x1; + if (y1 < y0) y0 = this._y0, y1 = this._y1; + + // Expand the tree to cover the new points. + this.cover(x0, y0).cover(x1, y1); + + // Add the new points. + for (i = 0; i < n; ++i) { + add(this, xz[i], yz[i], data[i]); + } + + return this; +} + +var tree_cover = function(x, y) { + if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points + + var x0 = this._x0, + y0 = this._y0, + x1 = this._x1, + y1 = this._y1; + + // If the quadtree has no extent, initialize them. + // Integer extent are necessary so that if we later double the extent, + // the existing quadrant boundaries don’t change due to floating point error! + if (isNaN(x0)) { + x1 = (x0 = Math.floor(x)) + 1; + y1 = (y0 = Math.floor(y)) + 1; + } + + // Otherwise, double repeatedly to cover. + else if (x0 > x || x > x1 || y0 > y || y > y1) { + var z = x1 - x0, + node = this._root, + parent, + i; + + switch (i = (y < (y0 + y1) / 2) << 1 | (x < (x0 + x1) / 2)) { + case 0: { + do parent = new Array(4), parent[i] = node, node = parent; + while (z *= 2, x1 = x0 + z, y1 = y0 + z, x > x1 || y > y1); + break; + } + case 1: { + do parent = new Array(4), parent[i] = node, node = parent; + while (z *= 2, x0 = x1 - z, y1 = y0 + z, x0 > x || y > y1); + break; + } + case 2: { + do parent = new Array(4), parent[i] = node, node = parent; + while (z *= 2, x1 = x0 + z, y0 = y1 - z, x > x1 || y0 > y); + break; + } + case 3: { + do parent = new Array(4), parent[i] = node, node = parent; + while (z *= 2, x0 = x1 - z, y0 = y1 - z, x0 > x || y0 > y); + break; + } + } + + if (this._root && this._root.length) this._root = node; + } + + // If the quadtree covers the point already, just return. + else return this; + + this._x0 = x0; + this._y0 = y0; + this._x1 = x1; + this._y1 = y1; + return this; +}; + +var tree_data = function() { + var data = []; + this.visit(function(node) { + if (!node.length) do data.push(node.data); while (node = node.next) + }); + return data; +}; + +var tree_extent = function(_) { + return arguments.length + ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) + : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; +}; + +var Quad = function(node, x0, y0, x1, y1) { + this.node = node; + this.x0 = x0; + this.y0 = y0; + this.x1 = x1; + this.y1 = y1; +}; + +var tree_find = function(x, y, radius) { + var data, + x0 = this._x0, + y0 = this._y0, + x1, + y1, + x2, + y2, + x3 = this._x1, + y3 = this._y1, + quads = [], + node = this._root, + q, + i; + + if (node) quads.push(new Quad(node, x0, y0, x3, y3)); + if (radius == null) radius = Infinity; + else { + x0 = x - radius, y0 = y - radius; + x3 = x + radius, y3 = y + radius; + radius *= radius; + } + + while (q = quads.pop()) { + + // Stop searching if this quadrant can’t contain a closer node. + if (!(node = q.node) + || (x1 = q.x0) > x3 + || (y1 = q.y0) > y3 + || (x2 = q.x1) < x0 + || (y2 = q.y1) < y0) continue; + + // Bisect the current quadrant. + if (node.length) { + var xm = (x1 + x2) / 2, + ym = (y1 + y2) / 2; + + quads.push( + new Quad(node[3], xm, ym, x2, y2), + new Quad(node[2], x1, ym, xm, y2), + new Quad(node[1], xm, y1, x2, ym), + new Quad(node[0], x1, y1, xm, ym) + ); + + // Visit the closest quadrant first. + if (i = (y >= ym) << 1 | (x >= xm)) { + q = quads[quads.length - 1]; + quads[quads.length - 1] = quads[quads.length - 1 - i]; + quads[quads.length - 1 - i] = q; + } + } + + // Visit this point. (Visiting coincident points isn’t necessary!) + else { + var dx = x - +this._x.call(null, node.data), + dy = y - +this._y.call(null, node.data), + d2 = dx * dx + dy * dy; + if (d2 < radius) { + var d = Math.sqrt(radius = d2); + x0 = x - d, y0 = y - d; + x3 = x + d, y3 = y + d; + data = node.data; + } + } + } + + return data; +}; + +var tree_remove = function(d) { + if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points + + var parent, + node = this._root, + retainer, + previous, + next, + x0 = this._x0, + y0 = this._y0, + x1 = this._x1, + y1 = this._y1, + x, + y, + xm, + ym, + right, + bottom, + i, + j; + + // If the tree is empty, initialize the root as a leaf. + if (!node) return this; + + // Find the leaf node for the point. + // While descending, also retain the deepest parent with a non-removed sibling. + if (node.length) while (true) { + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; + if (!(parent = node, node = node[i = bottom << 1 | right])) return this; + if (!node.length) break; + if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i; + } + + // Find the point to remove. + while (node.data !== d) if (!(previous = node, node = node.next)) return this; + if (next = node.next) delete node.next; + + // If there are multiple coincident points, remove just the point. + if (previous) return (next ? previous.next = next : delete previous.next), this; + + // If this is the root point, remove it. + if (!parent) return this._root = next, this; + + // Remove this leaf. + next ? parent[i] = next : delete parent[i]; + + // If the parent now contains exactly one leaf, collapse superfluous parents. + if ((node = parent[0] || parent[1] || parent[2] || parent[3]) + && node === (parent[3] || parent[2] || parent[1] || parent[0]) + && !node.length) { + if (retainer) retainer[j] = node; + else this._root = node; + } + + return this; +}; + +function removeAll(data) { + for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]); + return this; +} + +var tree_root = function() { + return this._root; +}; + +var tree_size = function() { + var size = 0; + this.visit(function(node) { + if (!node.length) do ++size; while (node = node.next) + }); + return size; +}; + +var tree_visit = function(callback) { + var quads = [], q, node = this._root, child, x0, y0, x1, y1; + if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1)); + while (q = quads.pop()) { + if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) { + var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; + if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); + if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); + if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); + if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); + } + } + return this; +}; + +var tree_visitAfter = function(callback) { + var quads = [], next = [], q; + if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1)); + while (q = quads.pop()) { + var node = q.node; + if (node.length) { + var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; + if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); + if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); + if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); + if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); + } + next.push(q); + } + while (q = next.pop()) { + callback(q.node, q.x0, q.y0, q.x1, q.y1); + } + return this; +}; + +function defaultX(d) { + return d[0]; +} + +var tree_x = function(_) { + return arguments.length ? (this._x = _, this) : this._x; +}; + +function defaultY(d) { + return d[1]; +} + +var tree_y = function(_) { + return arguments.length ? (this._y = _, this) : this._y; +}; + +function quadtree(nodes, x, y) { + var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN); + return nodes == null ? tree : tree.addAll(nodes); +} + +function Quadtree(x, y, x0, y0, x1, y1) { + this._x = x; + this._y = y; + this._x0 = x0; + this._y0 = y0; + this._x1 = x1; + this._y1 = y1; + this._root = undefined; +} + +function leaf_copy(leaf) { + var copy = {data: leaf.data}, next = copy; + while (leaf = leaf.next) next = next.next = {data: leaf.data}; + return copy; +} + +var treeProto = quadtree.prototype = Quadtree.prototype; + +treeProto.copy = function() { + var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), + node = this._root, + nodes, + child; + + if (!node) return copy; + + if (!node.length) return copy._root = leaf_copy(node), copy; + + nodes = [{source: node, target: copy._root = new Array(4)}]; + while (node = nodes.pop()) { + for (var i = 0; i < 4; ++i) { + if (child = node.source[i]) { + if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)}); + else node.target[i] = leaf_copy(child); + } + } + } + + return copy; +}; + +treeProto.add = tree_add; +treeProto.addAll = addAll; +treeProto.cover = tree_cover; +treeProto.data = tree_data; +treeProto.extent = tree_extent; +treeProto.find = tree_find; +treeProto.remove = tree_remove; +treeProto.removeAll = removeAll; +treeProto.root = tree_root; +treeProto.size = tree_size; +treeProto.visit = tree_visit; +treeProto.visitAfter = tree_visitAfter; +treeProto.x = tree_x; +treeProto.y = tree_y; + +exports.quadtree = quadtree; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],113:[function(require,module,exports){ +// https://d3js.org/d3-timer/ Version 1.0.5. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); +}(this, (function (exports) { 'use strict'; + +var frame = 0; +var timeout = 0; +var interval = 0; +var pokeDelay = 1000; +var taskHead; +var taskTail; +var clockLast = 0; +var clockNow = 0; +var clockSkew = 0; +var clock = typeof performance === "object" && performance.now ? performance : Date; +var setFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : function(f) { setTimeout(f, 17); }; + +function now() { + return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); +} + +function clearNow() { + clockNow = 0; +} + +function Timer() { + this._call = + this._time = + this._next = null; +} + +Timer.prototype = timer.prototype = { + constructor: Timer, + restart: function(callback, delay, time) { + if (typeof callback !== "function") throw new TypeError("callback is not a function"); + time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); + if (!this._next && taskTail !== this) { + if (taskTail) taskTail._next = this; + else taskHead = this; + taskTail = this; + } + this._call = callback; + this._time = time; + sleep(); + }, + stop: function() { + if (this._call) { + this._call = null; + this._time = Infinity; + sleep(); + } + } +}; + +function timer(callback, delay, time) { + var t = new Timer; + t.restart(callback, delay, time); + return t; +} + +function timerFlush() { + now(); // Get the current time, if not already set. + ++frame; // Pretend we’ve set an alarm, if we haven’t already. + var t = taskHead, e; + while (t) { + if ((e = clockNow - t._time) >= 0) t._call.call(null, e); + t = t._next; + } + --frame; +} + +function wake() { + clockNow = (clockLast = clock.now()) + clockSkew; + frame = timeout = 0; + try { + timerFlush(); + } finally { + frame = 0; + nap(); + clockNow = 0; + } +} + +function poke() { + var now = clock.now(), delay = now - clockLast; + if (delay > pokeDelay) clockSkew -= delay, clockLast = now; +} + +function nap() { + var t0, t1 = taskHead, t2, time = Infinity; + while (t1) { + if (t1._call) { + if (time > t1._time) time = t1._time; + t0 = t1, t1 = t1._next; + } else { + t2 = t1._next, t1._next = null; + t1 = t0 ? t0._next = t2 : taskHead = t2; + } + } + taskTail = t0; + sleep(time); +} + +function sleep(time) { + if (frame) return; // Soonest alarm already set, or will be. + if (timeout) timeout = clearTimeout(timeout); + var delay = time - clockNow; + if (delay > 24) { + if (time < Infinity) timeout = setTimeout(wake, delay); + if (interval) interval = clearInterval(interval); + } else { + if (!interval) clockLast = clockNow, interval = setInterval(poke, pokeDelay); + frame = 1, setFrame(wake); + } +} + +var timeout$1 = function(callback, delay, time) { + var t = new Timer; + delay = delay == null ? 0 : +delay; + t.restart(function(elapsed) { + t.stop(); + callback(elapsed + delay); + }, delay, time); + return t; +}; + +var interval$1 = function(callback, delay, time) { + var t = new Timer, total = delay; + if (delay == null) return t.restart(callback, delay, time), t; + delay = +delay, time = time == null ? now() : +time; + t.restart(function tick(elapsed) { + elapsed += total; + t.restart(tick, total += delay, time); + callback(elapsed); + }, delay, time); + return t; +}; + +exports.now = now; +exports.timer = timer; +exports.timerFlush = timerFlush; +exports.timeout = timeout$1; +exports.interval = interval$1; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],114:[function(require,module,exports){ !function() { var d3 = { version: "3.5.17" @@ -22362,7 +25748,7 @@ module.exports = require("cwise-compiler") }); if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3; }(); -},{}],105:[function(require,module,exports){ +},{}],115:[function(require,module,exports){ "use strict" var ch = require("incremental-convex-hull") @@ -22522,7 +25908,7 @@ function triangulate(points, includePointAtInfinity) { return hull } -},{"incremental-convex-hull":270,"uniq":520}],106:[function(require,module,exports){ +},{"incremental-convex-hull":280,"uniq":530}],116:[function(require,module,exports){ (function (Buffer){ var hasTypedArrays = false if(typeof Float64Array !== "undefined") { @@ -22626,7 +26012,7 @@ module.exports.denormalized = function(n) { return !(hi & 0x7ff00000) } }).call(this,require("buffer").Buffer) -},{"buffer":67}],107:[function(require,module,exports){ +},{"buffer":69}],117:[function(require,module,exports){ "use strict" function dupe_array(count, value, i) { @@ -22676,7 +26062,7 @@ function dupe(count, value) { } module.exports = dupe -},{}],108:[function(require,module,exports){ +},{}],118:[function(require,module,exports){ 'use strict'; module.exports = earcut; @@ -23322,7 +26708,7 @@ earcut.flatten = function (data) { return result; }; -},{}],109:[function(require,module,exports){ +},{}],119:[function(require,module,exports){ "use strict" module.exports = edgeToAdjacency @@ -23356,7 +26742,7 @@ function edgeToAdjacency(edges, numVertices) { } return adj } -},{"uniq":520}],110:[function(require,module,exports){ +},{"uniq":530}],120:[function(require,module,exports){ (function (process,global){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. @@ -24513,7 +27899,7 @@ return Promise; }))); }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":465}],111:[function(require,module,exports){ +},{"_process":475}],121:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -24817,7 +28203,7 @@ function isUndefined(arg) { return arg === void 0; } -},{}],112:[function(require,module,exports){ +},{}],122:[function(require,module,exports){ "use strict" module.exports = extractPlanes @@ -24834,7 +28220,7 @@ function extractPlanes(M, zNear, zFar) { [ zf*M[12] - M[8], zf*M[13] - M[9], zf*M[14] - M[10], zf*M[15] - M[11] ] ] } -},{}],113:[function(require,module,exports){ +},{}],123:[function(require,module,exports){ /** * inspired by is-number * but significantly simplified and sped up by ignoring number and string constructors @@ -24891,7 +28277,7 @@ module.exports = function(n) { return n - n < 1; }; -},{}],114:[function(require,module,exports){ +},{}],124:[function(require,module,exports){ 'use strict'; module.exports = createFilter; @@ -24975,7 +28361,7 @@ function compare(a, b) { return a < b ? -1 : a > b ? 1 : 0; } -},{}],115:[function(require,module,exports){ +},{}],125:[function(require,module,exports){ 'use strict' module.exports = createFilteredVector @@ -25268,7 +28654,7 @@ function createFilteredVector(initState, initVelocity, initTime) { } } -},{"binary-search-bounds":56,"cubic-hermite":99}],116:[function(require,module,exports){ +},{"binary-search-bounds":58,"cubic-hermite":101}],126:[function(require,module,exports){ 'use strict' var SDF = require('tiny-sdf') @@ -25352,7 +28738,7 @@ function atlas(options) { return canvas } -},{"tiny-sdf":510}],117:[function(require,module,exports){ +},{"tiny-sdf":520}],127:[function(require,module,exports){ "use strict" module.exports = createRBTree @@ -26349,7 +29735,7 @@ function defaultCompare(a, b) { function createRBTree(compare) { return new RedBlackTree(compare || defaultCompare, null) } -},{}],118:[function(require,module,exports){ +},{}],128:[function(require,module,exports){ // transliterated from the python snippet here: // http://en.wikipedia.org/wiki/Lanczos_approximation @@ -26418,7 +29804,7 @@ module.exports = function gamma (z) { module.exports.log = lngamma; -},{}],119:[function(require,module,exports){ +},{}],129:[function(require,module,exports){ var wgs84 = require('wgs84'); module.exports.geometry = geometry; @@ -26484,7 +29870,7 @@ function rad(_) { return _ * Math.PI / 180; } -},{"wgs84":542}],120:[function(require,module,exports){ +},{"wgs84":552}],130:[function(require,module,exports){ var geojsonArea = require('geojson-area'); module.exports = rewind; @@ -26535,7 +29921,7 @@ function cw(_) { return geojsonArea.ring(_) >= 0; } -},{"geojson-area":119}],121:[function(require,module,exports){ +},{"geojson-area":129}],131:[function(require,module,exports){ 'use strict'; module.exports = clip; @@ -26686,7 +30072,7 @@ function newSlice(slices, slice, area, dist, outer) { return []; } -},{"./feature":123}],122:[function(require,module,exports){ +},{"./feature":133}],132:[function(require,module,exports){ 'use strict'; module.exports = convert; @@ -26809,7 +30195,7 @@ function calcSize(points) { points.dist = dist; } -},{"./feature":123,"./simplify":125}],123:[function(require,module,exports){ +},{"./feature":133,"./simplify":135}],133:[function(require,module,exports){ 'use strict'; module.exports = createFeature; @@ -26854,7 +30240,7 @@ function calcRingBBox(min, max, points) { } } -},{}],124:[function(require,module,exports){ +},{}],134:[function(require,module,exports){ 'use strict'; module.exports = geojsonvt; @@ -27098,7 +30484,7 @@ function isClippedSquare(tile, extent, buffer) { return true; } -},{"./clip":121,"./convert":122,"./tile":126,"./transform":127,"./wrap":128}],125:[function(require,module,exports){ +},{"./clip":131,"./convert":132,"./tile":136,"./transform":137,"./wrap":138}],135:[function(require,module,exports){ 'use strict'; module.exports = simplify; @@ -27174,7 +30560,7 @@ function getSqSegDist(p, a, b) { return dx * dx + dy * dy; } -},{}],126:[function(require,module,exports){ +},{}],136:[function(require,module,exports){ 'use strict'; module.exports = createTile; @@ -27282,7 +30668,7 @@ function signedArea(ring) { return sum; } -},{}],127:[function(require,module,exports){ +},{}],137:[function(require,module,exports){ 'use strict'; exports.tile = transformTile; @@ -27325,7 +30711,7 @@ function transformPoint(p, extent, z2, tx, ty) { return [x, y]; } -},{}],128:[function(require,module,exports){ +},{}],138:[function(require,module,exports){ 'use strict'; var clip = require('./clip'); @@ -27383,7 +30769,7 @@ function shiftCoords(points, offset) { return newPoints; } -},{"./clip":121,"./feature":123}],129:[function(require,module,exports){ +},{"./clip":131,"./feature":133}],139:[function(require,module,exports){ module.exports = getCanvasContext function getCanvasContext (type, opts) { if (typeof type !== 'string') { @@ -27423,7 +30809,7 @@ function getCanvasContext (type, opts) { return (gl || null) // ensure null on fail } -},{}],130:[function(require,module,exports){ +},{}],140:[function(require,module,exports){ 'use strict' module.exports = createAxes @@ -27946,7 +31332,7 @@ function createAxes(gl, options) { return axes } -},{"./lib/background.js":131,"./lib/cube.js":132,"./lib/lines.js":133,"./lib/text.js":135,"./lib/ticks.js":136}],131:[function(require,module,exports){ +},{"./lib/background.js":141,"./lib/cube.js":142,"./lib/lines.js":143,"./lib/text.js":145,"./lib/ticks.js":146}],141:[function(require,module,exports){ 'use strict' module.exports = createBackgroundCube @@ -28058,7 +31444,7 @@ function createBackgroundCube(gl) { return new BackgroundCube(gl, buffer, vao, shader) } -},{"./shaders":134,"gl-buffer":138,"gl-vao":252}],132:[function(require,module,exports){ +},{"./shaders":144,"gl-buffer":148,"gl-vao":262}],142:[function(require,module,exports){ "use strict" module.exports = getCubeEdges @@ -28299,7 +31685,7 @@ function getCubeEdges(model, view, projection, bounds) { //Return result return CUBE_RESULT } -},{"bit-twiddle":57,"gl-mat4/invert":162,"gl-mat4/multiply":164,"robust-orientation":486,"split-polygon":504}],133:[function(require,module,exports){ +},{"bit-twiddle":59,"gl-mat4/invert":172,"gl-mat4/multiply":174,"robust-orientation":496,"split-polygon":514}],143:[function(require,module,exports){ 'use strict' module.exports = createLines @@ -28505,7 +31891,7 @@ function createLines(gl, bounds, ticks) { return new Lines(gl, vertBuf, vao, shader, tickCount, tickOffset, gridCount, gridOffset) } -},{"./shaders":134,"gl-buffer":138,"gl-vao":252}],134:[function(require,module,exports){ +},{"./shaders":144,"gl-buffer":148,"gl-vao":262}],144:[function(require,module,exports){ 'use strict' @@ -28536,7 +31922,7 @@ exports.bg = function(gl) { ]) } -},{"gl-shader":236}],135:[function(require,module,exports){ +},{"gl-shader":246}],145:[function(require,module,exports){ (function (process){ "use strict" @@ -28738,7 +32124,7 @@ function createTextSprites( } }).call(this,require('_process')) -},{"./shaders":134,"_process":465,"gl-buffer":138,"gl-vao":252,"vectorize-text":531}],136:[function(require,module,exports){ +},{"./shaders":144,"_process":475,"gl-buffer":148,"gl-vao":262,"vectorize-text":541}],146:[function(require,module,exports){ 'use strict' exports.create = defaultTicks @@ -28819,7 +32205,7 @@ function ticksEqual(ticksA, ticksB) { } return true } -},{}],137:[function(require,module,exports){ +},{}],147:[function(require,module,exports){ "use strict" module.exports = axesProperties @@ -28961,7 +32347,7 @@ i_loop: return ranges } -},{"./lib/cube.js":132,"extract-frustum-planes":112,"gl-mat4/multiply":164,"gl-mat4/transpose":172,"gl-vec4/transformMat4":258,"split-polygon":504}],138:[function(require,module,exports){ +},{"./lib/cube.js":142,"extract-frustum-planes":122,"gl-mat4/multiply":174,"gl-mat4/transpose":182,"gl-vec4/transformMat4":268,"split-polygon":514}],148:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -29115,7 +32501,7 @@ function createBuffer(gl, data, type, usage) { module.exports = createBuffer -},{"ndarray":446,"ndarray-ops":440,"typedarray-pool":518}],139:[function(require,module,exports){ +},{"ndarray":456,"ndarray-ops":450,"typedarray-pool":528}],149:[function(require,module,exports){ module.exports = { 0: 'NONE', 1: 'ONE', @@ -29415,14 +32801,14 @@ module.exports = { 37444: 'BROWSER_DEFAULT_WEBGL' } -},{}],140:[function(require,module,exports){ +},{}],150:[function(require,module,exports){ var gl10 = require('./1.0/numbers') module.exports = function lookupConstant (number) { return gl10[number] } -},{"./1.0/numbers":139}],141:[function(require,module,exports){ +},{"./1.0/numbers":149}],151:[function(require,module,exports){ 'use strict' var createShader = require('gl-shader') @@ -29687,7 +33073,7 @@ function createError2D (plot, options) { return errorBars } -},{"./lib/shaders":142,"gl-buffer":138,"gl-shader":236,"typedarray-pool":518}],142:[function(require,module,exports){ +},{"./lib/shaders":152,"gl-buffer":148,"gl-shader":246,"typedarray-pool":528}],152:[function(require,module,exports){ module.exports = { @@ -29695,7 +33081,7 @@ module.exports = { fragment: "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n" } -},{}],143:[function(require,module,exports){ +},{}],153:[function(require,module,exports){ 'use strict' module.exports = createErrorBars @@ -29932,7 +33318,7 @@ function createErrorBars(options) { return result } -},{"./shaders/index":144,"gl-buffer":138,"gl-vao":252}],144:[function(require,module,exports){ +},{"./shaders/index":154,"gl-buffer":148,"gl-vao":262}],154:[function(require,module,exports){ 'use strict' @@ -29949,7 +33335,7 @@ module.exports = function(gl) { ]) } -},{"gl-shader":236}],145:[function(require,module,exports){ +},{"gl-shader":246}],155:[function(require,module,exports){ 'use strict' var createTexture = require('gl-texture2d') @@ -30416,7 +33802,7 @@ function createFBO(gl, width, height, options) { WEBGL_draw_buffers) } -},{"gl-texture2d":248}],146:[function(require,module,exports){ +},{"gl-texture2d":258}],156:[function(require,module,exports){ var sprintf = require('sprintf-js').sprintf; var glConstants = require('gl-constants/lookup'); @@ -30471,7 +33857,7 @@ function formatCompilerError(errLog, src, type) { } -},{"add-line-numbers":32,"gl-constants/lookup":140,"glsl-shader-name":260,"sprintf-js":505}],147:[function(require,module,exports){ +},{"add-line-numbers":34,"gl-constants/lookup":150,"glsl-shader-name":270,"sprintf-js":515}],157:[function(require,module,exports){ 'use strict' module.exports = createHeatmap2D @@ -30789,7 +34175,7 @@ function createHeatmap2D (plot, options) { return heatmap } -},{"./lib/shaders":148,"binary-search-bounds":149,"gl-buffer":138,"gl-shader":236,"iota-array":273,"typedarray-pool":518}],148:[function(require,module,exports){ +},{"./lib/shaders":158,"binary-search-bounds":159,"gl-buffer":148,"gl-shader":246,"iota-array":283,"typedarray-pool":528}],158:[function(require,module,exports){ 'use strict' @@ -30801,9 +34187,9 @@ module.exports = { pickVertex: "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nvoid main() {\n vWeight = weight;\n\n fragId = pickId;\n\n vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n" } -},{}],149:[function(require,module,exports){ -arguments[4][74][0].apply(exports,arguments) -},{"dup":74}],150:[function(require,module,exports){ +},{}],159:[function(require,module,exports){ +arguments[4][76][0].apply(exports,arguments) +},{"dup":76}],160:[function(require,module,exports){ exports.lineVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aHi, aLo, dHi, dLo;\n\nuniform vec2 scaleHi, translateHi, scaleLo, translateLo, screenShape;\nuniform float width;\n\nvarying vec2 direction;\n\n\nvec2 project_1_0(vec2 scHi, vec2 trHi, vec2 scLo, vec2 trLo, vec2 posHi, vec2 posLo) {\n return (posHi + trHi) * scHi\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo;\n}\n\n\nvec2 project_2_1(vec2 scHi, vec2 scLo, vec2 posHi, vec2 posLo) {\n return scHi * posHi\n + scLo * posHi\n + scHi * posLo\n + scLo * posLo;\n}\n\nvoid main() {\n vec2 p = project_1_0(scaleHi, translateHi, scaleLo, translateLo, aHi, aLo);\n vec2 dir = project_2_1(scaleHi, scaleLo, dHi, dLo);\n vec2 n = 0.5 * width * normalize(screenShape.yx * vec2(dir.y, -dir.x)) / screenShape.xy;\n vec2 tangent = normalize(screenShape.xy * dir);\n if(dir.x < 0.0 || (dir.x == 0.0 && dir.y < 0.0)) {\n direction = -tangent;\n } else {\n direction = tangent;\n }\n gl_Position = vec4(p + n, 0.0, 1.0);\n}" @@ -30814,7 +34200,7 @@ exports.pickVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute exports.pickFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 pickOffset;\n\nvarying vec4 pickA, pickB;\n\nvoid main() {\n vec4 fragId = vec4(pickA.xyz, 0.0);\n if(pickB.w > pickA.w) {\n fragId.xyz = pickB.xyz;\n }\n\n fragId += pickOffset;\n\n fragId.y += floor(fragId.x / 256.0);\n fragId.x -= floor(fragId.x / 256.0) * 256.0;\n\n fragId.z += floor(fragId.y / 256.0);\n fragId.y -= floor(fragId.y / 256.0) * 256.0;\n\n fragId.w += floor(fragId.z / 256.0);\n fragId.z -= floor(fragId.z / 256.0) * 256.0;\n\n gl_FragColor = fragId / 255.0;\n}" exports.fillVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aHi, aLo, dHi;\n\nuniform vec2 scaleHi, translateHi, scaleLo, translateLo, projectAxis;\nuniform float projectValue, depth;\n\n\nvec2 project_1_0(vec2 scHi, vec2 trHi, vec2 scLo, vec2 trLo, vec2 posHi, vec2 posLo) {\n return (posHi + trHi) * scHi\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo;\n}\n\n\nvoid main() {\n vec2 p = project_1_0(scaleHi, translateHi, scaleLo, translateLo, aHi, aLo);\n if(dHi.y < 0.0 || (dHi.y == 0.0 && dHi.x < 0.0)) {\n if(dot(p, projectAxis) < projectValue) {\n p = p * (1.0 - abs(projectAxis)) + projectAxis * projectValue;\n }\n }\n gl_Position = vec4(p, depth, 1);\n}" exports.fillFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}" -},{}],151:[function(require,module,exports){ +},{}],161:[function(require,module,exports){ 'use strict' module.exports = createLinePlot @@ -31327,7 +34713,7 @@ function createLinePlot(plot, options) { linePlot.update(options) return linePlot } -},{"./lib/shaders":150,"gl-buffer":138,"gl-shader":236,"gl-texture2d":248,"ndarray":446,"typedarray-pool":518}],152:[function(require,module,exports){ +},{"./lib/shaders":160,"gl-buffer":148,"gl-shader":246,"gl-texture2d":258,"ndarray":456,"typedarray-pool":528}],162:[function(require,module,exports){ var createShader = require('gl-shader') @@ -31351,7 +34737,7 @@ exports.createPickShader = function(gl) { return createShader(gl, vertSrc, pickFrag, null, ATTRIBUTES) } -},{"gl-shader":236}],153:[function(require,module,exports){ +},{"gl-shader":246}],163:[function(require,module,exports){ 'use strict' module.exports = createLinePlot @@ -31721,7 +35107,7 @@ function createLinePlot (options) { return linePlot } -},{"./lib/shaders":152,"binary-search-bounds":56,"gl-buffer":138,"gl-texture2d":248,"gl-vao":252,"glsl-read-float":259,"ndarray":446}],154:[function(require,module,exports){ +},{"./lib/shaders":162,"binary-search-bounds":58,"gl-buffer":148,"gl-texture2d":258,"gl-vao":262,"glsl-read-float":269,"ndarray":456}],164:[function(require,module,exports){ module.exports = invert /** @@ -31750,7 +35136,7 @@ function invert(out, a) { return out } -},{}],155:[function(require,module,exports){ +},{}],165:[function(require,module,exports){ module.exports = invert /** @@ -31789,7 +35175,7 @@ function invert(out, a) { return out } -},{}],156:[function(require,module,exports){ +},{}],166:[function(require,module,exports){ module.exports = clone; /** @@ -31818,7 +35204,7 @@ function clone(a) { out[15] = a[15]; return out; }; -},{}],157:[function(require,module,exports){ +},{}],167:[function(require,module,exports){ module.exports = create; /** @@ -31846,7 +35232,7 @@ function create() { out[15] = 1; return out; }; -},{}],158:[function(require,module,exports){ +},{}],168:[function(require,module,exports){ module.exports = determinant; /** @@ -31877,7 +35263,7 @@ function determinant(a) { // Calculate the determinant return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; }; -},{}],159:[function(require,module,exports){ +},{}],169:[function(require,module,exports){ module.exports = fromQuat; /** @@ -31925,7 +35311,7 @@ function fromQuat(out, q) { return out; }; -},{}],160:[function(require,module,exports){ +},{}],170:[function(require,module,exports){ module.exports = fromRotationTranslation; /** @@ -31979,7 +35365,7 @@ function fromRotationTranslation(out, q, v) { return out; }; -},{}],161:[function(require,module,exports){ +},{}],171:[function(require,module,exports){ module.exports = identity; /** @@ -32007,7 +35393,7 @@ function identity(out) { out[15] = 1; return out; }; -},{}],162:[function(require,module,exports){ +},{}],172:[function(require,module,exports){ module.exports = invert; /** @@ -32063,7 +35449,7 @@ function invert(out, a) { return out; }; -},{}],163:[function(require,module,exports){ +},{}],173:[function(require,module,exports){ var identity = require('./identity'); module.exports = lookAt; @@ -32154,7 +35540,7 @@ function lookAt(out, eye, center, up) { return out; }; -},{"./identity":161}],164:[function(require,module,exports){ +},{"./identity":171}],174:[function(require,module,exports){ module.exports = multiply; /** @@ -32197,7 +35583,7 @@ function multiply(out, a, b) { out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33; return out; }; -},{}],165:[function(require,module,exports){ +},{}],175:[function(require,module,exports){ module.exports = perspective; /** @@ -32231,7 +35617,7 @@ function perspective(out, fovy, aspect, near, far) { out[15] = 0; return out; }; -},{}],166:[function(require,module,exports){ +},{}],176:[function(require,module,exports){ module.exports = rotate; /** @@ -32296,7 +35682,7 @@ function rotate(out, a, rad, axis) { } return out; }; -},{}],167:[function(require,module,exports){ +},{}],177:[function(require,module,exports){ module.exports = rotateX; /** @@ -32341,7 +35727,7 @@ function rotateX(out, a, rad) { out[11] = a23 * c - a13 * s; return out; }; -},{}],168:[function(require,module,exports){ +},{}],178:[function(require,module,exports){ module.exports = rotateY; /** @@ -32386,7 +35772,7 @@ function rotateY(out, a, rad) { out[11] = a03 * s + a23 * c; return out; }; -},{}],169:[function(require,module,exports){ +},{}],179:[function(require,module,exports){ module.exports = rotateZ; /** @@ -32431,7 +35817,7 @@ function rotateZ(out, a, rad) { out[7] = a13 * c - a03 * s; return out; }; -},{}],170:[function(require,module,exports){ +},{}],180:[function(require,module,exports){ module.exports = scale; /** @@ -32463,7 +35849,7 @@ function scale(out, a, v) { out[15] = a[15]; return out; }; -},{}],171:[function(require,module,exports){ +},{}],181:[function(require,module,exports){ module.exports = translate; /** @@ -32502,7 +35888,7 @@ function translate(out, a, v) { return out; }; -},{}],172:[function(require,module,exports){ +},{}],182:[function(require,module,exports){ module.exports = transpose; /** @@ -32552,7 +35938,7 @@ function transpose(out, a) { return out; }; -},{}],173:[function(require,module,exports){ +},{}],183:[function(require,module,exports){ 'use strict' module.exports = invert @@ -32583,7 +35969,7 @@ function invert(out, M) { } return out } -},{"gl-mat2/invert":154,"gl-mat3/invert":155,"gl-mat4/invert":162}],174:[function(require,module,exports){ +},{"gl-mat2/invert":164,"gl-mat3/invert":165,"gl-mat4/invert":172}],184:[function(require,module,exports){ /** * @fileoverview gl-matrix - High performance matrix and vector operations * @author Brandon Jones @@ -32621,7 +36007,7 @@ exports.quat = require("./gl-matrix/quat.js"); exports.vec2 = require("./gl-matrix/vec2.js"); exports.vec3 = require("./gl-matrix/vec3.js"); exports.vec4 = require("./gl-matrix/vec4.js"); -},{"./gl-matrix/common.js":175,"./gl-matrix/mat2.js":176,"./gl-matrix/mat2d.js":177,"./gl-matrix/mat3.js":178,"./gl-matrix/mat4.js":179,"./gl-matrix/quat.js":180,"./gl-matrix/vec2.js":181,"./gl-matrix/vec3.js":182,"./gl-matrix/vec4.js":183}],175:[function(require,module,exports){ +},{"./gl-matrix/common.js":185,"./gl-matrix/mat2.js":186,"./gl-matrix/mat2d.js":187,"./gl-matrix/mat3.js":188,"./gl-matrix/mat4.js":189,"./gl-matrix/quat.js":190,"./gl-matrix/vec2.js":191,"./gl-matrix/vec3.js":192,"./gl-matrix/vec4.js":193}],185:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -32693,7 +36079,7 @@ glMatrix.equals = function(a, b) { module.exports = glMatrix; -},{}],176:[function(require,module,exports){ +},{}],186:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -33131,7 +36517,7 @@ mat2.multiplyScalarAndAdd = function(out, a, b, scale) { module.exports = mat2; -},{"./common.js":175}],177:[function(require,module,exports){ +},{"./common.js":185}],187:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -33602,7 +36988,7 @@ mat2d.equals = function (a, b) { module.exports = mat2d; -},{"./common.js":175}],178:[function(require,module,exports){ +},{"./common.js":185}],188:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34350,7 +37736,7 @@ mat3.equals = function (a, b) { module.exports = mat3; -},{"./common.js":175}],179:[function(require,module,exports){ +},{"./common.js":185}],189:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36488,7 +39874,7 @@ mat4.equals = function (a, b) { module.exports = mat4; -},{"./common.js":175}],180:[function(require,module,exports){ +},{"./common.js":185}],190:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -37090,7 +40476,7 @@ quat.equals = vec4.equals; module.exports = quat; -},{"./common.js":175,"./mat3.js":178,"./vec3.js":182,"./vec4.js":183}],181:[function(require,module,exports){ +},{"./common.js":185,"./mat3.js":188,"./vec3.js":192,"./vec4.js":193}],191:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -37679,7 +41065,7 @@ vec2.equals = function (a, b) { module.exports = vec2; -},{"./common.js":175}],182:[function(require,module,exports){ +},{"./common.js":185}],192:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -38458,7 +41844,7 @@ vec3.equals = function (a, b) { module.exports = vec3; -},{"./common.js":175}],183:[function(require,module,exports){ +},{"./common.js":185}],193:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -39069,7 +42455,7 @@ vec4.equals = function (a, b) { module.exports = vec4; -},{"./common.js":175}],184:[function(require,module,exports){ +},{"./common.js":185}],194:[function(require,module,exports){ 'use strict' var barycentric = require('barycentric') @@ -39167,7 +42553,7 @@ function closestPointToPickLocation(simplex, pixelCoord, model, view, projection } return [closestIndex, interpolate(simplex, weights), weights] } -},{"barycentric":39,"polytope-closest-point/lib/closest_point_2d.js":464}],185:[function(require,module,exports){ +},{"barycentric":41,"polytope-closest-point/lib/closest_point_2d.js":474}],195:[function(require,module,exports){ var triVertSrc = "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec4 m_position = model * vec4(position, 1.0);\n vec4 t_position = view * m_position;\n gl_Position = projection * t_position;\n f_color = color;\n f_normal = normal;\n f_data = position;\n f_eyeDirection = eyePosition - position;\n f_lightDirection = lightPosition - position;\n f_uv = uv;\n}" @@ -39236,7 +42622,7 @@ exports.contourShader = { ] } -},{}],186:[function(require,module,exports){ +},{}],196:[function(require,module,exports){ 'use strict' var DEFAULT_VERTEX_NORMALS_EPSILON = 1e-6; // may be too large if triangles are very small @@ -40251,7 +43637,7 @@ function createSimplicialMesh(params) { module.exports = createSimplicialMesh -},{"./lib/closest-point":184,"./lib/shaders":185,"colormap":89,"gl-buffer":138,"gl-mat4/invert":162,"gl-mat4/multiply":164,"gl-shader":236,"gl-texture2d":248,"gl-vao":252,"ndarray":446,"normals":448,"simplicial-complex-contour":495,"typedarray-pool":518}],187:[function(require,module,exports){ +},{"./lib/closest-point":194,"./lib/shaders":195,"colormap":91,"gl-buffer":148,"gl-mat4/invert":172,"gl-mat4/multiply":174,"gl-shader":246,"gl-texture2d":258,"gl-vao":262,"ndarray":456,"normals":458,"simplicial-complex-contour":505,"typedarray-pool":528}],197:[function(require,module,exports){ 'use strict' module.exports = createBoxes @@ -40314,7 +43700,7 @@ function createBoxes(plot) { return new Boxes(plot, vbo, shader) } -},{"./shaders":190,"gl-buffer":138,"gl-shader":193}],188:[function(require,module,exports){ +},{"./shaders":200,"gl-buffer":148,"gl-shader":203}],198:[function(require,module,exports){ 'use strict' module.exports = createGrid @@ -40561,7 +43947,7 @@ function createGrid(plot) { return grid } -},{"./shaders":190,"binary-search-bounds":192,"gl-buffer":138,"gl-shader":193}],189:[function(require,module,exports){ +},{"./shaders":200,"binary-search-bounds":202,"gl-buffer":148,"gl-shader":203}],199:[function(require,module,exports){ 'use strict' module.exports = createLines @@ -40626,7 +44012,7 @@ function createLines(plot) { return lines } -},{"./shaders":190,"gl-buffer":138,"gl-shader":193}],190:[function(require,module,exports){ +},{"./shaders":200,"gl-buffer":148,"gl-shader":203}],200:[function(require,module,exports){ 'use strict' @@ -40644,7 +44030,7 @@ module.exports = { tickVert: "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\n\nvoid main() {\n vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\n}\n" } -},{}],191:[function(require,module,exports){ +},{}],201:[function(require,module,exports){ 'use strict' module.exports = createTextElements @@ -40922,9 +44308,9 @@ function createTextElements(plot) { return text } -},{"./shaders":190,"binary-search-bounds":192,"gl-buffer":138,"gl-shader":193,"text-cache":509}],192:[function(require,module,exports){ -arguments[4][74][0].apply(exports,arguments) -},{"dup":74}],193:[function(require,module,exports){ +},{"./shaders":200,"binary-search-bounds":202,"gl-buffer":148,"gl-shader":203,"text-cache":519}],202:[function(require,module,exports){ +arguments[4][76][0].apply(exports,arguments) +},{"dup":76}],203:[function(require,module,exports){ 'use strict' var createUniformWrapper = require('./lib/create-uniforms') @@ -41190,7 +44576,7 @@ function createShader( module.exports = createShader -},{"./lib/GLError":194,"./lib/create-attributes":195,"./lib/create-uniforms":196,"./lib/reflect":197,"./lib/runtime-reflect":198,"./lib/shader-cache":199}],194:[function(require,module,exports){ +},{"./lib/GLError":204,"./lib/create-attributes":205,"./lib/create-uniforms":206,"./lib/reflect":207,"./lib/runtime-reflect":208,"./lib/shader-cache":209}],204:[function(require,module,exports){ function GLError (rawError, shortMessage, longMessage) { this.shortMessage = shortMessage || '' this.longMessage = longMessage || '' @@ -41205,7 +44591,7 @@ GLError.prototype.name = 'GLError' GLError.prototype.constructor = GLError module.exports = GLError -},{}],195:[function(require,module,exports){ +},{}],205:[function(require,module,exports){ 'use strict' module.exports = createAttributeWrapper @@ -41470,7 +44856,7 @@ function createAttributeWrapper( return obj } -},{"./GLError":194}],196:[function(require,module,exports){ +},{"./GLError":204}],206:[function(require,module,exports){ 'use strict' var coallesceUniforms = require('./reflect') @@ -41663,7 +45049,7 @@ function createUniformWrapper(gl, wrapper, uniforms, locations) { } } -},{"./GLError":194,"./reflect":197}],197:[function(require,module,exports){ +},{"./GLError":204,"./reflect":207}],207:[function(require,module,exports){ 'use strict' module.exports = makeReflectTypes @@ -41721,7 +45107,7 @@ function makeReflectTypes(uniforms, useIndex) { } return obj } -},{}],198:[function(require,module,exports){ +},{}],208:[function(require,module,exports){ 'use strict' exports.uniforms = runtimeUniforms @@ -41801,7 +45187,7 @@ function runtimeAttributes(gl, program) { return result } -},{}],199:[function(require,module,exports){ +},{}],209:[function(require,module,exports){ 'use strict' exports.shader = getShaderReference @@ -41939,7 +45325,7 @@ function createProgram(gl, vref, fref, attribs, locations) { return getCache(gl).getProgram(vref, fref, attribs, locations) } -},{"./GLError":194,"gl-format-compiler-error":146,"weakmap-shim":539}],200:[function(require,module,exports){ +},{"./GLError":204,"gl-format-compiler-error":156,"weakmap-shim":549}],210:[function(require,module,exports){ 'use strict' module.exports = createGLPlot2D @@ -42520,784 +45906,783 @@ function createGLPlot2D(options) { return plot } -},{"./lib/box":187,"./lib/grid":188,"./lib/line":189,"./lib/text":191,"gl-select-static":235}],201:[function(require,module,exports){ - -var createShader = require('gl-shader') - -var vertSrc = "precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}" -var fragSrc = "precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}" - -module.exports = function(gl) { - return createShader(gl, vertSrc, fragSrc, null, [ { name: 'position', type: 'vec2'}]) -} - -},{"gl-shader":236}],202:[function(require,module,exports){ -'use strict' - -module.exports = createScene - -var createCamera = require('3d-view-controls') -var createAxes = require('gl-axes3d') -var axesRanges = require('gl-axes3d/properties') -var createSpikes = require('gl-spikes3d') -var createSelect = require('gl-select-static') -var createFBO = require('gl-fbo') -var drawTriangle = require('a-big-triangle') -var mouseChange = require('mouse-change') -var perspective = require('gl-mat4/perspective') -var createShader = require('./lib/shader') -var isMobile = require('is-mobile')() - -function MouseSelect() { - this.mouse = [-1,-1] - this.screen = null - this.distance = Infinity - this.index = null - this.dataCoordinate = null - this.dataPosition = null - this.object = null - this.data = null -} - -function getContext(canvas, options) { - var gl = null - try { - gl = canvas.getContext('webgl', options) - if(!gl) { - gl = canvas.getContext('experimental-webgl', options) - } - } catch(e) { - return null - } - return gl -} - -function roundUpPow10(x) { - var y = Math.round(Math.log(Math.abs(x)) / Math.log(10)) - if(y < 0) { - var base = Math.round(Math.pow(10, -y)) - return Math.ceil(x*base) / base - } else if(y > 0) { - var base = Math.round(Math.pow(10, y)) - return Math.ceil(x/base) * base - } - return Math.ceil(x) -} - -function defaultBool(x) { - if(typeof x === 'boolean') { - return x - } - return true -} - -function createScene(options) { - options = options || {} - - var stopped = false - - var pixelRatio = options.pixelRatio || parseFloat(window.devicePixelRatio) - - var canvas = options.canvas - if(!canvas) { - canvas = document.createElement('canvas') - if(options.container) { - var container = options.container - container.appendChild(canvas) - } else { - document.body.appendChild(canvas) - } - } - - var gl = options.gl - if(!gl) { - gl = getContext(canvas, - options.glOptions || { - premultipliedAlpha: true, - antialias: true - }) - } - if(!gl) { - throw new Error('webgl not supported') - } - - //Initial bounds - var bounds = options.bounds || [[-10,-10,-10], [10,10,10]] - - //Create selection - var selection = new MouseSelect() - - //Accumulation buffer - var accumBuffer = createFBO(gl, - [gl.drawingBufferWidth, gl.drawingBufferHeight], { - preferFloat: !isMobile - }) - - var accumShader = createShader(gl) - - //Create a camera - var cameraOptions = options.camera || { - eye: [2,0,0], - center: [0,0,0], - up: [0,1,0], - zoomMin: 0.1, - zoomMax: 100, - mode: 'turntable' - } - - //Create axes - var axesOptions = options.axes || {} - var axes = createAxes(gl, axesOptions) - axes.enable = !axesOptions.disable - - //Create spikes - var spikeOptions = options.spikes || {} - var spikes = createSpikes(gl, spikeOptions) - - //Object list is empty initially - var objects = [] - var pickBufferIds = [] - var pickBufferCount = [] - var pickBuffers = [] - - //Dirty flag, skip redraw if scene static - var dirty = true - var pickDirty = true - - var projection = new Array(16) - var model = new Array(16) - - var cameraParams = { - view: null, - projection: projection, - model: model - } - - var pickDirty = true - - var viewShape = [ gl.drawingBufferWidth, gl.drawingBufferHeight ] - - //Create scene object - var scene = { - gl: gl, - contextLost: false, - pixelRatio: options.pixelRatio || parseFloat(window.devicePixelRatio), - canvas: canvas, - selection: selection, - camera: createCamera(canvas, cameraOptions), - axes: axes, - axesPixels: null, - spikes: spikes, - bounds: bounds, - objects: objects, - shape: viewShape, - aspect: options.aspectRatio || [1,1,1], - pickRadius: options.pickRadius || 10, - zNear: options.zNear || 0.01, - zFar: options.zFar || 1000, - fovy: options.fovy || Math.PI/4, - clearColor: options.clearColor || [0,0,0,0], - autoResize: defaultBool(options.autoResize), - autoBounds: defaultBool(options.autoBounds), - autoScale: !!options.autoScale, - autoCenter: defaultBool(options.autoCenter), - clipToBounds: defaultBool(options.clipToBounds), - snapToData: !!options.snapToData, - onselect: options.onselect || null, - onrender: options.onrender || null, - onclick: options.onclick || null, - cameraParams: cameraParams, - oncontextloss: null, - mouseListener: null - } - - var pickShape = [ (gl.drawingBufferWidth/scene.pixelRatio)|0, (gl.drawingBufferHeight/scene.pixelRatio)|0 ] - - function resizeListener() { - if(stopped) { - return - } - if(!scene.autoResize) { - return - } - var parent = canvas.parentNode - var width = 1 - var height = 1 - if(parent && parent !== document.body) { - width = parent.clientWidth - height = parent.clientHeight - } else { - width = window.innerWidth - height = window.innerHeight - } - var nextWidth = Math.ceil(width * scene.pixelRatio)|0 - var nextHeight = Math.ceil(height * scene.pixelRatio)|0 - if(nextWidth !== canvas.width || nextHeight !== canvas.height) { - canvas.width = nextWidth - canvas.height = nextHeight - var style = canvas.style - style.position = style.position || 'absolute' - style.left = '0px' - style.top = '0px' - style.width = width + 'px' - style.height = height + 'px' - dirty = true - } - } - if(scene.autoResize) { - resizeListener() - } - window.addEventListener('resize', resizeListener) - - function reallocPickIds() { - var numObjs = objects.length - var numPick = pickBuffers.length - for(var i=0; i 0 && pickBufferCount[numPick-1] === 0) { - pickBufferCount.pop() - pickBuffers.pop().dispose() - } - } - - scene.update = function(options) { - if(stopped) { - return - } - options = options || {} - dirty = true - pickDirty = true - } - - scene.add = function(obj) { - if(stopped) { - return - } - obj.axes = axes - objects.push(obj) - pickBufferIds.push(-1) - dirty = true - pickDirty = true - reallocPickIds() - } - - scene.remove = function(obj) { - if(stopped) { - return - } - var idx = objects.indexOf(obj) - if(idx < 0) { - return - } - objects.splice(idx, 1) - pickBufferIds.pop() - dirty = true - pickDirty = true - reallocPickIds() - } - - scene.dispose = function() { - if(stopped) { - return - } - - stopped = true - - window.removeEventListener('resize', resizeListener) - canvas.removeEventListener('webglcontextlost', checkContextLoss) - scene.mouseListener.enabled = false - - if(scene.contextLost) { - return - } - - //Destroy objects - axes.dispose() - spikes.dispose() - for(var i=0; i selection.distance) { - continue - } - for(var j=0; j 0) { + var base = Math.round(Math.pow(10, y)) + return Math.ceil(x/base) * base + } + return Math.ceil(x) +} + +function defaultBool(x) { + if(typeof x === 'boolean') { + return x + } + return true +} + +function createScene(options) { + options = options || {} + + var stopped = false + + var pixelRatio = options.pixelRatio || parseFloat(window.devicePixelRatio) + + var canvas = options.canvas + if(!canvas) { + canvas = document.createElement('canvas') + if(options.container) { + var container = options.container + container.appendChild(canvas) + } else { + document.body.appendChild(canvas) + } + } + + var gl = options.gl + if(!gl) { + gl = getContext(canvas, + options.glOptions || { + premultipliedAlpha: true, + antialias: true + }) + } + if(!gl) { + throw new Error('webgl not supported') + } + + //Initial bounds + var bounds = options.bounds || [[-10,-10,-10], [10,10,10]] + + //Create selection + var selection = new MouseSelect() + + //Accumulation buffer + var accumBuffer = createFBO(gl, + [gl.drawingBufferWidth, gl.drawingBufferHeight], { + preferFloat: !isMobile + }) + + var accumShader = createShader(gl) + + //Create a camera + var cameraOptions = options.camera || { + eye: [2,0,0], + center: [0,0,0], + up: [0,1,0], + zoomMin: 0.1, + zoomMax: 100, + mode: 'turntable' + } + + //Create axes + var axesOptions = options.axes || {} + var axes = createAxes(gl, axesOptions) + axes.enable = !axesOptions.disable + + //Create spikes + var spikeOptions = options.spikes || {} + var spikes = createSpikes(gl, spikeOptions) + + //Object list is empty initially + var objects = [] + var pickBufferIds = [] + var pickBufferCount = [] + var pickBuffers = [] + + //Dirty flag, skip redraw if scene static + var dirty = true + var pickDirty = true + + var projection = new Array(16) + var model = new Array(16) + + var cameraParams = { + view: null, + projection: projection, + model: model + } + + var pickDirty = true + + var viewShape = [ gl.drawingBufferWidth, gl.drawingBufferHeight ] + + //Create scene object + var scene = { + gl: gl, + contextLost: false, + pixelRatio: options.pixelRatio || parseFloat(window.devicePixelRatio), + canvas: canvas, + selection: selection, + camera: createCamera(canvas, cameraOptions), + axes: axes, + axesPixels: null, + spikes: spikes, + bounds: bounds, + objects: objects, + shape: viewShape, + aspect: options.aspectRatio || [1,1,1], + pickRadius: options.pickRadius || 10, + zNear: options.zNear || 0.01, + zFar: options.zFar || 1000, + fovy: options.fovy || Math.PI/4, + clearColor: options.clearColor || [0,0,0,0], + autoResize: defaultBool(options.autoResize), + autoBounds: defaultBool(options.autoBounds), + autoScale: !!options.autoScale, + autoCenter: defaultBool(options.autoCenter), + clipToBounds: defaultBool(options.clipToBounds), + snapToData: !!options.snapToData, + onselect: options.onselect || null, + onrender: options.onrender || null, + onclick: options.onclick || null, + cameraParams: cameraParams, + oncontextloss: null, + mouseListener: null + } + + var pickShape = [ (gl.drawingBufferWidth/scene.pixelRatio)|0, (gl.drawingBufferHeight/scene.pixelRatio)|0 ] + + function resizeListener() { + if(stopped) { + return + } + if(!scene.autoResize) { + return + } + var parent = canvas.parentNode + var width = 1 + var height = 1 + if(parent && parent !== document.body) { + width = parent.clientWidth + height = parent.clientHeight + } else { + width = window.innerWidth + height = window.innerHeight + } + var nextWidth = Math.ceil(width * scene.pixelRatio)|0 + var nextHeight = Math.ceil(height * scene.pixelRatio)|0 + if(nextWidth !== canvas.width || nextHeight !== canvas.height) { + canvas.width = nextWidth + canvas.height = nextHeight + var style = canvas.style + style.position = style.position || 'absolute' + style.left = '0px' + style.top = '0px' + style.width = width + 'px' + style.height = height + 'px' + dirty = true + } + } + if(scene.autoResize) { + resizeListener() + } + window.addEventListener('resize', resizeListener) + + function reallocPickIds() { + var numObjs = objects.length + var numPick = pickBuffers.length + for(var i=0; i 0 && pickBufferCount[numPick-1] === 0) { + pickBufferCount.pop() + pickBuffers.pop().dispose() + } + } + + scene.update = function(options) { + if(stopped) { + return + } + options = options || {} + dirty = true + pickDirty = true + } + + scene.add = function(obj) { + if(stopped) { + return + } + obj.axes = axes + objects.push(obj) + pickBufferIds.push(-1) + dirty = true + pickDirty = true + reallocPickIds() + } + + scene.remove = function(obj) { + if(stopped) { + return + } + var idx = objects.indexOf(obj) + if(idx < 0) { + return + } + objects.splice(idx, 1) + pickBufferIds.pop() + dirty = true + pickDirty = true + reallocPickIds() + } + + scene.dispose = function() { + if(stopped) { + return + } + + stopped = true + + window.removeEventListener('resize', resizeListener) + canvas.removeEventListener('webglcontextlost', checkContextLoss) + scene.mouseListener.enabled = false + + if(scene.contextLost) { + return + } + + //Destroy objects + axes.dispose() + spikes.dispose() + for(var i=0; i selection.distance) { + continue + } + for(var j=0; j>=' @@ -49590,7 +52975,7 @@ module.exports = [ , '}' ] -},{}],267:[function(require,module,exports){ +},{}],277:[function(require,module,exports){ var tokenize = require('./index') module.exports = tokenizeString @@ -49605,7 +52990,7 @@ function tokenizeString(str, opt) { return tokens } -},{"./index":261}],268:[function(require,module,exports){ +},{"./index":271}],278:[function(require,module,exports){ 'use strict'; module.exports = GridIndex; @@ -49767,7 +53152,7 @@ GridIndex.prototype.toArrayBuffer = function() { return array.buffer; }; -},{}],269:[function(require,module,exports){ +},{}],279:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -49853,7 +53238,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],270:[function(require,module,exports){ +},{}],280:[function(require,module,exports){ "use strict" //High level idea: @@ -50300,7 +53685,7 @@ function incrementalConvexHull(points, randomSearch) { //Extract boundary cells return triangles.boundary() } -},{"robust-orientation":486,"simplicial-complex":497}],271:[function(require,module,exports){ +},{"robust-orientation":496,"simplicial-complex":507}],281:[function(require,module,exports){ "use strict" var bounds = require("binary-search-bounds") @@ -50667,7 +54052,7 @@ function createWrapper(intervals) { return new IntervalTree(createIntervalTree(intervals)) } -},{"binary-search-bounds":56}],272:[function(require,module,exports){ +},{"binary-search-bounds":58}],282:[function(require,module,exports){ "use strict" function invertPermutation(pi, result) { @@ -50679,7 +54064,7 @@ function invertPermutation(pi, result) { } module.exports = invertPermutation -},{}],273:[function(require,module,exports){ +},{}],283:[function(require,module,exports){ "use strict" function iota(n) { @@ -50691,7 +54076,7 @@ function iota(n) { } module.exports = iota -},{}],274:[function(require,module,exports){ +},{}],284:[function(require,module,exports){ /*! * Determine if an object is a Buffer * @@ -50714,7 +54099,7 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],275:[function(require,module,exports){ +},{}],285:[function(require,module,exports){ module.exports = isMobile; function isMobile (ua) { @@ -50728,7 +54113,7 @@ function isMobile (ua) { } -},{}],276:[function(require,module,exports){ +},{}],286:[function(require,module,exports){ 'use strict'; var toString = Object.prototype.toString; @@ -50737,7 +54122,7 @@ module.exports = function (x) { return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({})); }; -},{}],277:[function(require,module,exports){ +},{}],287:[function(require,module,exports){ 'use strict'; var sort = require('./sort'); @@ -50783,7 +54168,7 @@ KDBush.prototype = { function defaultGetX(p) { return p[0]; } function defaultGetY(p) { return p[1]; } -},{"./range":278,"./sort":279,"./within":280}],278:[function(require,module,exports){ +},{"./range":288,"./sort":289,"./within":290}],288:[function(require,module,exports){ 'use strict'; module.exports = range; @@ -50831,7 +54216,7 @@ function range(ids, coords, minX, minY, maxX, maxY, nodeSize) { return result; } -},{}],279:[function(require,module,exports){ +},{}],289:[function(require,module,exports){ 'use strict'; module.exports = sortKD; @@ -50899,7 +54284,7 @@ function swap(arr, i, j) { arr[j] = tmp; } -},{}],280:[function(require,module,exports){ +},{}],290:[function(require,module,exports){ 'use strict'; module.exports = within; @@ -50951,7 +54336,7 @@ function sqDist(ax, ay, bx, by) { return dx * dx + dy * dy; } -},{}],281:[function(require,module,exports){ +},{}],291:[function(require,module,exports){ 'use strict'; function createFunction(parameters, defaultType) { @@ -51124,7 +54509,7 @@ module.exports['piecewise-constant'] = function(parameters) { return createFunction(parameters, 'interval'); }; -},{}],282:[function(require,module,exports){ +},{}],292:[function(require,module,exports){ var path = require('path'); @@ -51186,7 +54571,7 @@ module.exports = { module.exports.util = "float evaluate_zoom_function_1(const vec4 values, const float t) {\n if (t < 1.0) {\n return mix(values[0], values[1], t);\n } else if (t < 2.0) {\n return mix(values[1], values[2], t - 1.0);\n } else {\n return mix(values[2], values[3], t - 2.0);\n }\n}\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\n if (t < 1.0) {\n return mix(value0, value1, t);\n } else if (t < 2.0) {\n return mix(value1, value2, t - 1.0);\n } else {\n return mix(value2, value3, t - 2.0);\n }\n}\n"; -},{"path":454}],283:[function(require,module,exports){ +},{"path":464}],293:[function(require,module,exports){ 'use strict'; var format = require('util').format; @@ -51204,7 +54589,7 @@ function ValidationError(key, value /*, message, ...*/) { module.exports = ValidationError; -},{"util":526}],284:[function(require,module,exports){ +},{"util":536}],294:[function(require,module,exports){ 'use strict'; module.exports = function (output) { @@ -51217,7 +54602,7 @@ module.exports = function (output) { return output; }; -},{}],285:[function(require,module,exports){ +},{}],295:[function(require,module,exports){ 'use strict'; module.exports = function getType(val) { @@ -51236,7 +54621,7 @@ module.exports = function getType(val) { } }; -},{}],286:[function(require,module,exports){ +},{}],296:[function(require,module,exports){ 'use strict'; // Turn jsonlint-lines-primitives objects into primitive objects @@ -51248,7 +54633,7 @@ module.exports = function unbundle(value) { } }; -},{}],287:[function(require,module,exports){ +},{}],297:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51315,7 +54700,7 @@ module.exports = function validate(options) { } }; -},{"../error/validation_error":283,"../util/extend":284,"../util/get_type":285,"./validate_array":288,"./validate_boolean":289,"./validate_color":290,"./validate_constants":291,"./validate_enum":292,"./validate_filter":293,"./validate_function":294,"./validate_layer":296,"./validate_number":298,"./validate_object":299,"./validate_source":301,"./validate_string":302}],288:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/extend":294,"../util/get_type":295,"./validate_array":298,"./validate_boolean":299,"./validate_color":300,"./validate_constants":301,"./validate_enum":302,"./validate_filter":303,"./validate_function":304,"./validate_layer":306,"./validate_number":308,"./validate_object":309,"./validate_source":311,"./validate_string":312}],298:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -51369,7 +54754,7 @@ module.exports = function validateArray(options) { return errors; }; -},{"../error/validation_error":283,"../util/get_type":285,"./validate":287}],289:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295,"./validate":297}],299:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -51387,7 +54772,7 @@ module.exports = function validateBoolean(options) { return []; }; -},{"../error/validation_error":283,"../util/get_type":285}],290:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295}],300:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51410,7 +54795,7 @@ module.exports = function validateColor(options) { return []; }; -},{"../error/validation_error":283,"../util/get_type":285,"csscolorparser":98}],291:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295,"csscolorparser":100}],301:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51444,7 +54829,7 @@ module.exports = function validateConstants(options) { }; -},{"../error/validation_error":283,"../util/get_type":285}],292:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295}],302:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51462,7 +54847,7 @@ module.exports = function validateEnum(options) { return errors; }; -},{"../error/validation_error":283,"../util/unbundle_jsonlint":286}],293:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/unbundle_jsonlint":296}],303:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51567,7 +54952,7 @@ module.exports = function validateFilter(options) { return errors; }; -},{"../error/validation_error":283,"../util/get_type":285,"../util/unbundle_jsonlint":286,"./validate_enum":292}],294:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295,"../util/unbundle_jsonlint":296,"./validate_enum":302}],304:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51701,7 +55086,7 @@ module.exports = function validateFunction(options) { }; -},{"../error/validation_error":283,"../util/get_type":285,"./validate":287,"./validate_array":288,"./validate_number":298,"./validate_object":299}],295:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295,"./validate":297,"./validate_array":298,"./validate_number":308,"./validate_object":309}],305:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51725,7 +55110,7 @@ module.exports = function(options) { return errors; }; -},{"../error/validation_error":283,"./validate_string":302}],296:[function(require,module,exports){ +},{"../error/validation_error":293,"./validate_string":312}],306:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51838,7 +55223,7 @@ module.exports = function validateLayer(options) { return errors; }; -},{"../error/validation_error":283,"../util/extend":284,"../util/unbundle_jsonlint":286,"./validate_filter":293,"./validate_layout_property":297,"./validate_object":299,"./validate_paint_property":300}],297:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/extend":294,"../util/unbundle_jsonlint":296,"./validate_filter":303,"./validate_layout_property":307,"./validate_object":309,"./validate_paint_property":310}],307:[function(require,module,exports){ 'use strict'; var validate = require('./validate'); @@ -51877,7 +55262,7 @@ module.exports = function validateLayoutProperty(options) { }; -},{"../error/validation_error":283,"./validate":287}],298:[function(require,module,exports){ +},{"../error/validation_error":293,"./validate":297}],308:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -51904,7 +55289,7 @@ module.exports = function validateNumber(options) { return []; }; -},{"../error/validation_error":283,"../util/get_type":285}],299:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295}],309:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51957,7 +55342,7 @@ module.exports = function validateObject(options) { return errors; }; -},{"../error/validation_error":283,"../util/get_type":285,"./validate":287}],300:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295,"./validate":297}],310:[function(require,module,exports){ 'use strict'; var validate = require('./validate'); @@ -51997,7 +55382,7 @@ module.exports = function validatePaintProperty(options) { }; -},{"../error/validation_error":283,"./validate":287}],301:[function(require,module,exports){ +},{"../error/validation_error":293,"./validate":297}],311:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -52074,7 +55459,7 @@ module.exports = function validateSource(options) { } }; -},{"../error/validation_error":283,"../util/unbundle_jsonlint":286,"./validate_enum":292,"./validate_object":299}],302:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/unbundle_jsonlint":296,"./validate_enum":302,"./validate_object":309}],312:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -52092,7 +55477,7 @@ module.exports = function validateString(options) { return []; }; -},{"../error/validation_error":283,"../util/get_type":285}],303:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295}],313:[function(require,module,exports){ 'use strict'; var validateConstants = require('./validate/validate_constants'); @@ -52162,12 +55547,12 @@ function wrapCleanErrors(inner) { module.exports = validateStyleMin; -},{"../reference/latest.min":304,"./validate/validate":287,"./validate/validate_constants":291,"./validate/validate_filter":293,"./validate/validate_glyphs_url":295,"./validate/validate_layer":296,"./validate/validate_layout_property":297,"./validate/validate_paint_property":300,"./validate/validate_source":301}],304:[function(require,module,exports){ +},{"../reference/latest.min":314,"./validate/validate":297,"./validate/validate_constants":301,"./validate/validate_filter":303,"./validate/validate_glyphs_url":305,"./validate/validate_layer":306,"./validate/validate_layout_property":307,"./validate/validate_paint_property":310,"./validate/validate_source":311}],314:[function(require,module,exports){ module.exports = require('./v8.min.json'); -},{"./v8.min.json":305}],305:[function(require,module,exports){ +},{"./v8.min.json":315}],315:[function(require,module,exports){ module.exports={"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_tile","source_geojson","source_video","source_image"],"source_tile":{"type":{"required":true,"type":"enum","values":["vector","raster"]},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":["geojson"]},"data":{"type":"*"},"maxzoom":{"type":"number","default":14},"buffer":{"type":"number","default":64},"tolerance":{"type":"number","default":3},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":400},"clusterMaxZoom":{"type":"number"}},"source_video":{"type":{"required":true,"type":"enum","values":["video"]},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":["image"]},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":["fill","line","symbol","circle","raster","background"]},"metadata":{"type":"*"},"ref":{"type":"string"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":22},"maxzoom":{"type":"number","minimum":0,"maximum":22},"interactive":{"type":"boolean","default":false},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"},"paint.*":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],"layout_background":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_fill":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_circle":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_line":{"line-cap":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["butt","round","square"],"default":"butt"},"line-join":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["bevel","round","miter"],"default":"miter"},"line-miter-limit":{"type":"number","default":2,"function":"interpolated","zoom-function":true,"property-function":true,"requires":[{"line-join":"miter"}]},"line-round-limit":{"type":"number","default":1.05,"function":"interpolated","zoom-function":true,"property-function":true,"requires":[{"line-join":"round"}]},"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_symbol":{"symbol-placement":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["point","line"],"default":"point"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"function":"interpolated","zoom-function":true,"property-function":true,"units":"pixels","requires":[{"symbol-placement":"line"}]},"symbol-avoid-edges":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false},"icon-allow-overlap":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image"]},"icon-ignore-placement":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image"]},"icon-optional":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image","text-field"]},"icon-rotation-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"viewport","requires":["icon-image"]},"icon-size":{"type":"number","default":1,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image"]},"icon-text-fit":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":false,"values":["none","both","width","height"],"default":"none","requires":["icon-image","text-field"]},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image","icon-text-fit","text-field"]},"icon-image":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"tokens":true},"icon-rotate":{"type":"number","default":0,"period":360,"function":"interpolated","zoom-function":true,"property-function":true,"units":"degrees","requires":["icon-image"]},"icon-padding":{"type":"number","default":2,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"units":"pixels","requires":["icon-image"]},"icon-keep-upright":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image"]},"text-pitch-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"requires":["text-field"]},"text-rotation-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"viewport","requires":["text-field"]},"text-field":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":"","tokens":true},"text-font":{"type":"array","value":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"]},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-line-height":{"type":"number","default":1.2,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-letter-spacing":{"type":"number","default":0,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-justify":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["left","center","right"],"default":"center","requires":["text-field"]},"text-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],"default":"center","requires":["text-field"]},"text-max-angle":{"type":"number","default":45,"units":"degrees","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field",{"symbol-placement":"line"}]},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-keep-upright":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["none","uppercase","lowercase"],"default":"none","requires":["text-field"]},"text-offset":{"type":"array","value":"number","units":"ems","function":"interpolated","zoom-function":true,"property-function":true,"length":2,"default":[0,0],"requires":["text-field"]},"text-allow-overlap":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field"]},"text-ignore-placement":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field"]},"text-optional":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field","icon-image"]},"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_raster":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"filter":{"type":"array","value":"*"},"filter_operator":{"type":"enum","values":["==","!=",">",">=","<","<=","in","!in","all","any","none","has","!has"]},"geometry_type":{"type":"enum","values":["Point","LineString","Polygon"]},"color_operation":{"type":"enum","values":["lighten","saturate","spin","fade","mix"]},"function":{"stops":{"type":"array","required":true,"value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":["exponential","interval","categorical"],"default":"exponential"}},"function_stop":{"type":"array","minimum":0,"maximum":22,"value":["number","color"],"length":2},"paint":["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],"paint_fill":{"fill-antialias":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":true},"fill-opacity":{"type":"number","function":"interpolated","zoom-function":true,"property-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"fill-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"fill-pattern"}]},"fill-outline-color":{"type":"color","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}]},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"fill-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["fill-translate"]},"fill-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"transition":true}},"paint_line":{"line-opacity":{"type":"number","function":"interpolated","zoom-function":true,"property-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"line-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"line-pattern"}]},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["line-translate"]},"line-width":{"type":"number","default":1,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-gap-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-offset":{"type":"number","default":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-dasharray":{"type":"array","value":"number","function":"piecewise-constant","zoom-function":true,"property-function":true,"minimum":0,"transition":true,"units":"line widths","requires":[{"!":"line-pattern"}]},"line-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"transition":true}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"circle-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-blur":{"type":"number","default":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"circle-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["circle-translate"]},"circle-pitch-scale":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-halo-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["icon-image","icon-translate"]},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-halo-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-halo-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["text-field","text-translate"]}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-hue-rotate":{"type":"number","default":0,"period":360,"function":"interpolated","zoom-function":true,"transition":true,"units":"degrees"},"raster-brightness-min":{"type":"number","function":"interpolated","zoom-function":true,"default":0,"minimum":0,"maximum":1,"transition":true},"raster-brightness-max":{"type":"number","function":"interpolated","zoom-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"function":"interpolated","zoom-function":true,"transition":true,"units":"milliseconds"}},"paint_background":{"background-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"transition":true,"requires":[{"!":"background-pattern"}]},"background-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"transition":true},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}}} -},{}],306:[function(require,module,exports){ +},{}],316:[function(require,module,exports){ 'use strict'; if (typeof module !== 'undefined' && module.exports) { @@ -52298,7 +55683,7 @@ function isWebGLSupported(failIfMajorPerformanceCaveat) { } } -},{}],307:[function(require,module,exports){ +},{}],317:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -52394,7 +55779,7 @@ ArrayGroup.prototype.getTransferables = function(transferables) { } }; -},{"../util/util":421}],308:[function(require,module,exports){ +},{"../util/util":431}],318:[function(require,module,exports){ 'use strict'; var featureFilter = require('feature-filter'); @@ -52912,7 +56297,7 @@ function createGetUniform(attribute, stopOffset) { }; } -},{"../util/struct_array":419,"../util/util":421,"./array_group":307,"./bucket/circle_bucket":309,"./bucket/fill_bucket":310,"./bucket/line_bucket":311,"./bucket/symbol_bucket":312,"./buffer_group":314,"assert":37,"feature-filter":114}],309:[function(require,module,exports){ +},{"../util/struct_array":429,"../util/util":431,"./array_group":317,"./bucket/circle_bucket":319,"./bucket/fill_bucket":320,"./bucket/line_bucket":321,"./bucket/symbol_bucket":322,"./buffer_group":324,"assert":39,"feature-filter":124}],319:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -53034,7 +56419,7 @@ CircleBucket.prototype.addFeature = function(feature) { this.populatePaintArrays('circle', globalProperties, feature.properties, startGroup, startIndex); }; -},{"../../util/util":421,"../bucket":308,"../load_geometry":316}],310:[function(require,module,exports){ +},{"../../util/util":431,"../bucket":318,"../load_geometry":326}],320:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -53145,7 +56530,7 @@ FillBucket.prototype.addPolygon = function(polygon) { } }; -},{"../../util/classify_rings":409,"../../util/util":421,"../bucket":308,"../load_geometry":316,"earcut":108}],311:[function(require,module,exports){ +},{"../../util/classify_rings":419,"../../util/util":431,"../bucket":318,"../load_geometry":326,"earcut":118}],321:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -53572,7 +56957,7 @@ LineBucket.prototype.addPieSliceVertex = function(currentVertex, distance, extru } }; -},{"../../util/util":421,"../bucket":308,"../load_geometry":316}],312:[function(require,module,exports){ +},{"../../util/util":431,"../bucket":318,"../load_geometry":326}],322:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -54218,7 +57603,7 @@ SymbolBucket.prototype.addSymbolQuad = function(symbolQuad) { symbolQuad.minScale); }; -},{"../../symbol/anchor":370,"../../symbol/clip_line":372,"../../symbol/collision_feature":374,"../../symbol/get_anchors":376,"../../symbol/mergelines":379,"../../symbol/quads":380,"../../symbol/resolve_text":381,"../../symbol/shaping":382,"../../util/token":420,"../../util/util":421,"../bucket":308,"../load_geometry":316,"point-geometry":462}],313:[function(require,module,exports){ +},{"../../symbol/anchor":380,"../../symbol/clip_line":382,"../../symbol/collision_feature":384,"../../symbol/get_anchors":386,"../../symbol/mergelines":389,"../../symbol/quads":390,"../../symbol/resolve_text":391,"../../symbol/shaping":392,"../../util/token":430,"../../util/util":431,"../bucket":318,"../load_geometry":326,"point-geometry":472}],323:[function(require,module,exports){ 'use strict'; module.exports = Buffer; @@ -54319,7 +57704,7 @@ Buffer.BufferType = { ELEMENT: 'ELEMENT_ARRAY_BUFFER' }; -},{}],314:[function(require,module,exports){ +},{}],324:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -54374,7 +57759,7 @@ BufferGroup.prototype.destroy = function(gl) { } }; -},{"../render/vertex_array_object":336,"../util/util":421,"./buffer":313}],315:[function(require,module,exports){ +},{"../render/vertex_array_object":346,"../util/util":431,"./buffer":323}],325:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -54673,7 +58058,7 @@ function offsetLine(rings, offset) { return newRings; } -},{"../util/dictionary_coder":411,"../util/intersection_tests":416,"../util/struct_array":419,"../util/util":421,"../util/vectortile_to_geojson":422,"./bucket":308,"./load_geometry":316,"feature-filter":114,"grid-index":268,"pbf":456,"point-geometry":462,"vector-tile":527}],316:[function(require,module,exports){ +},{"../util/dictionary_coder":421,"../util/intersection_tests":426,"../util/struct_array":429,"../util/util":431,"../util/vectortile_to_geojson":432,"./bucket":318,"./load_geometry":326,"feature-filter":124,"grid-index":278,"pbf":466,"point-geometry":472,"vector-tile":537}],326:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -54729,7 +58114,7 @@ module.exports = function loadGeometry(feature, bits) { return geometry; }; -},{"../util/util":421,"./bucket":308,"assert":37}],317:[function(require,module,exports){ +},{"../util/util":431,"./bucket":318,"assert":39}],327:[function(require,module,exports){ 'use strict'; module.exports = Coordinate; @@ -54808,7 +58193,7 @@ Coordinate.prototype = { } }; -},{}],318:[function(require,module,exports){ +},{}],328:[function(require,module,exports){ 'use strict'; module.exports = LngLat; @@ -54900,7 +58285,7 @@ LngLat.convert = function (input) { return input; }; -},{"../util/util":421}],319:[function(require,module,exports){ +},{"../util/util":431}],329:[function(require,module,exports){ 'use strict'; module.exports = LngLatBounds; @@ -55092,7 +58477,7 @@ LngLatBounds.convert = function (input) { return new LngLatBounds(input); }; -},{"./lng_lat":318}],320:[function(require,module,exports){ +},{"./lng_lat":328}],330:[function(require,module,exports){ 'use strict'; var LngLat = require('./lng_lat'), @@ -55566,7 +58951,7 @@ Transform.prototype = { } }; -},{"../data/bucket":308,"../source/tile_coord":348,"../util/interpolate":415,"../util/util":421,"./coordinate":317,"./lng_lat":318,"gl-matrix":174,"point-geometry":462}],321:[function(require,module,exports){ +},{"../data/bucket":318,"../source/tile_coord":358,"../util/interpolate":425,"../util/util":431,"./coordinate":327,"./lng_lat":328,"gl-matrix":184,"point-geometry":472}],331:[function(require,module,exports){ 'use strict'; // Font data From Hershey Simplex Font @@ -55699,7 +59084,7 @@ module.exports = function textVertices(text, left, baseline, scale) { return strokes; }; -},{}],322:[function(require,module,exports){ +},{}],332:[function(require,module,exports){ 'use strict'; // jshint -W079 @@ -55766,7 +59151,7 @@ Object.defineProperty(mapboxgl, 'accessToken', { * mapboxgl.supported() // = true */ -},{"../package.json":423,"./geo/lng_lat":318,"./geo/lng_lat_bounds":319,"./style/style":357,"./ui/control/attribution":388,"./ui/control/control":389,"./ui/control/geolocate":390,"./ui/control/navigation":391,"./ui/map":400,"./ui/marker":401,"./ui/popup":402,"./util/ajax":404,"./util/browser":405,"./util/config":410,"./util/evented":413,"./util/util":421,"point-geometry":462}],323:[function(require,module,exports){ +},{"../package.json":433,"./geo/lng_lat":328,"./geo/lng_lat_bounds":329,"./style/style":367,"./ui/control/attribution":398,"./ui/control/control":399,"./ui/control/geolocate":400,"./ui/control/navigation":401,"./ui/map":410,"./ui/marker":411,"./ui/popup":412,"./util/ajax":414,"./util/browser":415,"./util/config":420,"./util/evented":423,"./util/util":431,"point-geometry":472}],333:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -55786,7 +59171,7 @@ module.exports = function(uniforms) { return pragmas; }; -},{"assert":37}],324:[function(require,module,exports){ +},{"assert":39}],334:[function(require,module,exports){ 'use strict'; var pixelsToTileUnits = require('../source/pixels_to_tile_units'); @@ -55879,7 +59264,7 @@ function drawBackground(painter, source, layer) { gl.stencilFunc(gl.EQUAL, 0x80, 0x80); } -},{"../source/pixels_to_tile_units":342,"./create_uniform_pragmas":323}],325:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":352,"./create_uniform_pragmas":333}],335:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -55944,7 +59329,7 @@ function drawCircles(painter, source, layer, coords) { } } -},{"../util/browser":405}],326:[function(require,module,exports){ +},{"../util/browser":415}],336:[function(require,module,exports){ 'use strict'; module.exports = drawCollisionDebug; @@ -55979,7 +59364,7 @@ function drawCollisionDebug(painter, source, layer, coords) { } } -},{}],327:[function(require,module,exports){ +},{}],337:[function(require,module,exports){ 'use strict'; var textVertices = require('../lib/debugtext'); @@ -56040,7 +59425,7 @@ function drawDebugTile(painter, source, coord) { gl.drawArrays(gl.LINES, 0, debugTextBuffer.length); } -},{"../data/bucket":308,"../data/buffer":313,"../lib/debugtext":321,"../util/browser":405,"./vertex_array_object":336,"gl-matrix":174}],328:[function(require,module,exports){ +},{"../data/bucket":318,"../data/buffer":323,"../lib/debugtext":331,"../util/browser":415,"./vertex_array_object":346,"gl-matrix":184}],338:[function(require,module,exports){ 'use strict'; var pixelsToTileUnits = require('../source/pixels_to_tile_units'); @@ -56237,7 +59622,7 @@ function setPattern(image, opacity, tile, coord, painter, program) { painter.spriteAtlas.bind(gl, true); } -},{"../source/pixels_to_tile_units":342}],329:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":352}],339:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -56402,7 +59787,7 @@ module.exports = function drawLine(painter, source, layer, coords) { }; -},{"../source/pixels_to_tile_units":342,"../util/browser":405,"gl-matrix":174}],330:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":352,"../util/browser":415,"gl-matrix":184}],340:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -56548,7 +59933,7 @@ function getOpacities(tile, parentTile, layer, transform) { return opacity; } -},{"../util/struct_array":419,"../util/util":421}],331:[function(require,module,exports){ +},{"../util/struct_array":429,"../util/util":431}],341:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -56764,7 +60149,7 @@ function drawSymbol(painter, layer, posMatrix, tile, bucket, bufferGroups, isTex } } -},{"../source/pixels_to_tile_units":342,"../util/browser":405,"./draw_collision_debug":326}],332:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":352,"../util/browser":415,"./draw_collision_debug":336}],342:[function(require,module,exports){ 'use strict'; module.exports = FrameHistory; @@ -56836,7 +60221,7 @@ FrameHistory.prototype.bind = function(gl) { } }; -},{}],333:[function(require,module,exports){ +},{}],343:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -56983,7 +60368,7 @@ LineAtlas.prototype.bind = function(gl) { } }; -},{"../util/util":421}],334:[function(require,module,exports){ +},{"../util/util":431}],344:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -57327,7 +60712,7 @@ Painter.prototype.showOverdrawInspector = function(enabled) { } }; -},{"../data/bucket":308,"../data/buffer":313,"../source/pixels_to_tile_units":342,"../source/source_cache":346,"../util/browser":405,"../util/struct_array":419,"../util/util":421,"./create_uniform_pragmas":323,"./draw_background":324,"./draw_circle":325,"./draw_debug":327,"./draw_fill":328,"./draw_line":329,"./draw_raster":330,"./draw_symbol":331,"./frame_history":332,"./painter/use_program":335,"./vertex_array_object":336,"gl-matrix":174}],335:[function(require,module,exports){ +},{"../data/bucket":318,"../data/buffer":323,"../source/pixels_to_tile_units":352,"../source/source_cache":356,"../util/browser":415,"../util/struct_array":429,"../util/util":431,"./create_uniform_pragmas":333,"./draw_background":334,"./draw_circle":335,"./draw_debug":337,"./draw_fill":338,"./draw_line":339,"./draw_raster":340,"./draw_symbol":341,"./frame_history":342,"./painter/use_program":345,"./vertex_array_object":346,"gl-matrix":184}],345:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -57424,7 +60809,7 @@ function applyPragmas(source, pragmas) { }); } -},{"../../util/util":421,"assert":37,"mapbox-gl-shaders":282}],336:[function(require,module,exports){ +},{"../../util/util":431,"assert":39,"mapbox-gl-shaders":292}],346:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -57522,7 +60907,7 @@ VertexArrayObject.prototype.destroy = function(gl) { } }; -},{"assert":37}],337:[function(require,module,exports){ +},{"assert":39}],347:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -57746,7 +61131,7 @@ GeoJSONSource.prototype = util.inherit(Evented, /** @lends GeoJSONSource.prototy } }); -},{"../data/bucket":308,"../util/evented":413,"../util/util":421,"resolve-url":479}],338:[function(require,module,exports){ +},{"../data/bucket":318,"../util/evented":423,"../util/util":431,"resolve-url":489}],348:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -57884,7 +61269,7 @@ GeoJSONWorkerSource.prototype = util.inherit(VectorTileWorkerSource, /** @lends } }); -},{"../util/ajax":404,"../util/util":421,"./geojson_wrapper":339,"./vector_tile_worker_source":350,"geojson-rewind":120,"geojson-vt":124,"supercluster":506,"vt-pbf":533}],339:[function(require,module,exports){ +},{"../util/ajax":414,"../util/util":431,"./geojson_wrapper":349,"./vector_tile_worker_source":360,"geojson-rewind":130,"geojson-vt":134,"supercluster":516,"vt-pbf":543}],349:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -57960,7 +61345,7 @@ FeatureWrapper.prototype.bbox = function() { FeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON; -},{"../data/bucket":308,"point-geometry":462,"vector-tile":527}],340:[function(require,module,exports){ +},{"../data/bucket":318,"point-geometry":472,"vector-tile":537}],350:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58139,7 +61524,7 @@ ImageSource.prototype = util.inherit(Evented, /** @lends ImageSource.prototype * } }); -},{"../data/bucket":308,"../data/buffer":313,"../geo/lng_lat":318,"../render/draw_raster":330,"../render/vertex_array_object":336,"../util/ajax":404,"../util/evented":413,"../util/util":421,"./tile_coord":348,"point-geometry":462}],341:[function(require,module,exports){ +},{"../data/bucket":318,"../data/buffer":323,"../geo/lng_lat":328,"../render/draw_raster":340,"../render/vertex_array_object":346,"../util/ajax":414,"../util/evented":423,"../util/util":431,"./tile_coord":358,"point-geometry":472}],351:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); var ajax = require('../util/ajax'); @@ -58170,7 +61555,7 @@ module.exports = function(options, callback) { }; -},{"../util/ajax":404,"../util/browser":405,"../util/mapbox":418,"../util/util":421}],342:[function(require,module,exports){ +},{"../util/ajax":414,"../util/browser":415,"../util/mapbox":428,"../util/util":431}],352:[function(require,module,exports){ 'use strict'; var Bucket = require('../data/bucket'); @@ -58195,7 +61580,7 @@ module.exports = function(tile, pixelValue, z) { }; -},{"../data/bucket":308}],343:[function(require,module,exports){ +},{"../data/bucket":318}],353:[function(require,module,exports){ 'use strict'; var TileCoord = require('./tile_coord'); @@ -58266,7 +61651,7 @@ function mergeRenderedFeatureLayers(tiles) { } -},{"./tile_coord":348}],344:[function(require,module,exports){ +},{"./tile_coord":358}],354:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58363,7 +61748,7 @@ RasterTileSource.prototype = util.inherit(Evented, { } }); -},{"../util/ajax":404,"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./load_tilejson":341}],345:[function(require,module,exports){ +},{"../util/ajax":414,"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./load_tilejson":351}],355:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58534,7 +61919,7 @@ exports.setType = function (name, type) { * @instance */ -},{"../source/geojson_source":337,"../source/image_source":340,"../source/raster_tile_source":344,"../source/vector_tile_source":349,"../source/video_source":351,"../util/util":421}],346:[function(require,module,exports){ +},{"../source/geojson_source":347,"../source/image_source":350,"../source/raster_tile_source":354,"../source/vector_tile_source":359,"../source/video_source":361,"../util/util":431}],356:[function(require,module,exports){ 'use strict'; var Source = require('./source'); @@ -59072,7 +62457,7 @@ function compareKeyZoom(a, b) { return (a % 32) - (b % 32); } -},{"../data/bucket":308,"../geo/coordinate":317,"../util/evented":413,"../util/lru_cache":417,"../util/util":421,"./source":345,"./tile":347,"./tile_coord":348}],347:[function(require,module,exports){ +},{"../data/bucket":318,"../geo/coordinate":327,"../util/evented":423,"../util/lru_cache":427,"../util/util":431,"./source":355,"./tile":357,"./tile_coord":358}],357:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -59274,7 +62659,7 @@ function unserializeBuckets(input, style) { return output; } -},{"../data/bucket":308,"../data/feature_index":315,"../symbol/collision_box":373,"../symbol/collision_tile":375,"../symbol/symbol_instances":384,"../symbol/symbol_quads":385,"../util/util":421,"../util/vectortile_to_geojson":422,"feature-filter":114,"pbf":456,"vector-tile":527}],348:[function(require,module,exports){ +},{"../data/bucket":318,"../data/feature_index":325,"../symbol/collision_box":383,"../symbol/collision_tile":385,"../symbol/symbol_instances":394,"../symbol/symbol_quads":395,"../util/util":431,"../util/vectortile_to_geojson":432,"feature-filter":124,"pbf":466,"vector-tile":537}],358:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -59468,7 +62853,7 @@ TileCoord.cover = function(z, bounds, actualZ) { }); }; -},{"../geo/coordinate":317,"assert":37,"whoots-js":543}],349:[function(require,module,exports){ +},{"../geo/coordinate":327,"assert":39,"whoots-js":553}],359:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -59575,7 +62960,7 @@ VectorTileSource.prototype = util.inherit(Evented, { } }); -},{"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./load_tilejson":341}],350:[function(require,module,exports){ +},{"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./load_tilejson":351}],360:[function(require,module,exports){ 'use strict'; var ajax = require('../util/ajax'); var vt = require('vector-tile'); @@ -59723,7 +63108,7 @@ VectorTileWorkerSource.prototype = { } }; -},{"../util/ajax":404,"./worker_tile":353,"pbf":456,"vector-tile":527}],351:[function(require,module,exports){ +},{"../util/ajax":414,"./worker_tile":363,"pbf":466,"vector-tile":537}],361:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -59927,7 +63312,7 @@ VideoSource.prototype = util.inherit(Evented, /** @lends VideoSource.prototype * } }); -},{"../data/bucket":308,"../data/buffer":313,"../geo/lng_lat":318,"../render/draw_raster":330,"../render/vertex_array_object":336,"../util/ajax":404,"../util/evented":413,"../util/util":421,"./tile_coord":348,"point-geometry":462}],352:[function(require,module,exports){ +},{"../data/bucket":318,"../data/buffer":323,"../geo/lng_lat":328,"../render/draw_raster":340,"../render/vertex_array_object":346,"../util/ajax":414,"../util/evented":423,"../util/util":431,"./tile_coord":358,"point-geometry":472}],362:[function(require,module,exports){ 'use strict'; var Actor = require('../util/actor'); @@ -60091,7 +63476,7 @@ function createLayerFamilies(layers) { return families; } -},{"../style/style_layer":360,"../util/actor":403,"../util/util":421,"./geojson_worker_source":338,"./vector_tile_worker_source":350}],353:[function(require,module,exports){ +},{"../style/style_layer":370,"../util/actor":413,"../util/util":431,"./geojson_worker_source":348,"./vector_tile_worker_source":360}],363:[function(require,module,exports){ 'use strict'; var FeatureIndex = require('../data/feature_index'); @@ -60364,7 +63749,7 @@ function getLayerId(layer) { return layer.id; } -},{"../data/bucket":308,"../data/feature_index":315,"../symbol/collision_box":373,"../symbol/collision_tile":375,"../symbol/symbol_instances":384,"../symbol/symbol_quads":385,"../util/dictionary_coder":411,"../util/util":421}],354:[function(require,module,exports){ +},{"../data/bucket":318,"../data/feature_index":325,"../symbol/collision_box":383,"../symbol/collision_tile":385,"../symbol/symbol_instances":394,"../symbol/symbol_quads":395,"../util/dictionary_coder":421,"../util/util":431}],364:[function(require,module,exports){ 'use strict'; module.exports = AnimationLoop; @@ -60396,7 +63781,7 @@ AnimationLoop.prototype.cancel = function(n) { }); }; -},{}],355:[function(require,module,exports){ +},{}],365:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -60477,7 +63862,7 @@ ImageSprite.prototype.getSpritePosition = function(name) { return new SpritePosition(); }; -},{"../util/ajax":404,"../util/browser":405,"../util/evented":413,"../util/mapbox":418}],356:[function(require,module,exports){ +},{"../util/ajax":414,"../util/browser":415,"../util/evented":423,"../util/mapbox":428}],366:[function(require,module,exports){ 'use strict'; var parseColorString = require('csscolorparser').parseCSSColor; @@ -60519,7 +63904,7 @@ module.exports = function parseColor(input) { } }; -},{"../util/util":421,"./style_function":359,"csscolorparser":98}],357:[function(require,module,exports){ +},{"../util/util":431,"./style_function":369,"csscolorparser":100}],367:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -61300,7 +64685,7 @@ Style.prototype = util.inherit(Evented, { }); -},{"../render/line_atlas":333,"../source/query_features":343,"../source/source":345,"../source/source_cache":346,"../symbol/glyph_source":378,"../symbol/sprite_atlas":383,"../util/ajax":404,"../util/browser":405,"../util/dispatcher":412,"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./animation_loop":354,"./image_sprite":355,"./style_function":359,"./style_layer":360,"./style_spec":367,"./validate_style":369}],358:[function(require,module,exports){ +},{"../render/line_atlas":343,"../source/query_features":353,"../source/source":355,"../source/source_cache":356,"../symbol/glyph_source":388,"../symbol/sprite_atlas":393,"../util/ajax":414,"../util/browser":415,"../util/dispatcher":422,"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./animation_loop":364,"./image_sprite":365,"./style_function":369,"./style_layer":370,"./style_spec":377,"./validate_style":379}],368:[function(require,module,exports){ 'use strict'; var MapboxGLFunction = require('./style_function'); @@ -61384,7 +64769,7 @@ function transitioned(calculate) { }; } -},{"../util/util":421,"./parse_color":356,"./style_function":359}],359:[function(require,module,exports){ +},{"../util/util":431,"./parse_color":366,"./style_function":369}],369:[function(require,module,exports){ 'use strict'; var MapboxGLFunction = require('mapbox-gl-function'); @@ -61411,7 +64796,7 @@ exports['piecewise-constant'] = function(parameters) { exports.isFunctionDefinition = MapboxGLFunction.isFunctionDefinition; -},{"mapbox-gl-function":281}],360:[function(require,module,exports){ +},{"mapbox-gl-function":291}],370:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -61758,7 +65143,7 @@ function getDeclarationValue(declaration) { return declaration.value; } -},{"../util/evented":413,"../util/util":421,"./parse_color":356,"./style_declaration":358,"./style_layer/background_style_layer":361,"./style_layer/circle_style_layer":362,"./style_layer/fill_style_layer":363,"./style_layer/line_style_layer":364,"./style_layer/raster_style_layer":365,"./style_layer/symbol_style_layer":366,"./style_spec":367,"./style_transition":368,"./validate_style":369}],361:[function(require,module,exports){ +},{"../util/evented":423,"../util/util":431,"./parse_color":366,"./style_declaration":368,"./style_layer/background_style_layer":371,"./style_layer/circle_style_layer":372,"./style_layer/fill_style_layer":373,"./style_layer/line_style_layer":374,"./style_layer/raster_style_layer":375,"./style_layer/symbol_style_layer":376,"./style_spec":377,"./style_transition":378,"./validate_style":379}],371:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61772,7 +65157,7 @@ module.exports = BackgroundStyleLayer; BackgroundStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":421,"../style_layer":360}],362:[function(require,module,exports){ +},{"../../util/util":431,"../style_layer":370}],372:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61786,7 +65171,7 @@ module.exports = CircleStyleLayer; CircleStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":421,"../style_layer":360}],363:[function(require,module,exports){ +},{"../../util/util":431,"../style_layer":370}],373:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61842,7 +65227,7 @@ FillStyleLayer.prototype = util.inherit(StyleLayer, { module.exports = FillStyleLayer; -},{"../../util/util":421,"../style_layer":360}],364:[function(require,module,exports){ +},{"../../util/util":431,"../style_layer":370}],374:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61876,7 +65261,7 @@ LineStyleLayer.prototype = util.inherit(StyleLayer, { } }); -},{"../../util/util":421,"../style_layer":360}],365:[function(require,module,exports){ +},{"../../util/util":431,"../style_layer":370}],375:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61890,7 +65275,7 @@ module.exports = RasterStyleLayer; RasterStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":421,"../style_layer":360}],366:[function(require,module,exports){ +},{"../../util/util":431,"../style_layer":370}],376:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61933,12 +65318,12 @@ SymbolStyleLayer.prototype = util.inherit(StyleLayer, { }); -},{"../../util/util":421,"../style_layer":360}],367:[function(require,module,exports){ +},{"../../util/util":431,"../style_layer":370}],377:[function(require,module,exports){ 'use strict'; module.exports = require('mapbox-gl-style-spec/reference/latest.min'); -},{"mapbox-gl-style-spec/reference/latest.min":304}],368:[function(require,module,exports){ +},{"mapbox-gl-style-spec/reference/latest.min":314}],378:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -62023,7 +65408,7 @@ function interpZoomTransitioned(from, to, t) { } } -},{"../util/interpolate":415,"../util/util":421}],369:[function(require,module,exports){ +},{"../util/interpolate":425,"../util/util":431}],379:[function(require,module,exports){ 'use strict'; module.exports = require('mapbox-gl-style-spec/lib/validate_style.min'); @@ -62047,7 +65432,7 @@ module.exports.throwErrors = function throwErrors(emitter, errors) { } }; -},{"mapbox-gl-style-spec/lib/validate_style.min":303}],370:[function(require,module,exports){ +},{"mapbox-gl-style-spec/lib/validate_style.min":313}],380:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -62070,7 +65455,7 @@ Anchor.prototype.clone = function() { return new Anchor(this.x, this.y, this.angle, this.segment); }; -},{"point-geometry":462}],371:[function(require,module,exports){ +},{"point-geometry":472}],381:[function(require,module,exports){ 'use strict'; module.exports = checkMaxAngle; @@ -62150,7 +65535,7 @@ function checkMaxAngle(line, anchor, labelLength, windowSize, maxAngle) { return true; } -},{}],372:[function(require,module,exports){ +},{}],382:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -62224,7 +65609,7 @@ function clipLine(lines, x1, y1, x2, y2) { return clippedLines; } -},{"point-geometry":462}],373:[function(require,module,exports){ +},{"point-geometry":472}],383:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -62305,7 +65690,7 @@ util.extendAll(CollisionBoxArray.prototype.StructType.prototype, { } }); -},{"../util/struct_array":419,"../util/util":421,"point-geometry":462}],374:[function(require,module,exports){ +},{"../util/struct_array":429,"../util/util":431,"point-geometry":472}],384:[function(require,module,exports){ 'use strict'; module.exports = CollisionFeature; @@ -62439,7 +65824,7 @@ CollisionFeature.prototype._addLineCollisionBoxes = function(collisionBoxArray, return bboxes; }; -},{}],375:[function(require,module,exports){ +},{}],385:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -62740,7 +66125,7 @@ CollisionTile.prototype.insertCollisionFeature = function(collisionFeature, minP } }; -},{"../data/bucket":308,"grid-index":268,"point-geometry":462}],376:[function(require,module,exports){ +},{"../data/bucket":318,"grid-index":278,"point-geometry":472}],386:[function(require,module,exports){ 'use strict'; var interpolate = require('../util/interpolate'); @@ -62844,7 +66229,7 @@ function resample(line, offset, spacing, angleWindowSize, maxAngle, labelLength, return anchors; } -},{"../symbol/anchor":370,"../util/interpolate":415,"./check_max_angle":371}],377:[function(require,module,exports){ +},{"../symbol/anchor":380,"../util/interpolate":425,"./check_max_angle":381}],387:[function(require,module,exports){ 'use strict'; var ShelfPack = require('shelf-pack'); @@ -63013,7 +66398,7 @@ GlyphAtlas.prototype.updateTexture = function(gl) { } }; -},{"../util/util":421,"shelf-pack":492}],378:[function(require,module,exports){ +},{"../util/util":431,"shelf-pack":502}],388:[function(require,module,exports){ 'use strict'; var normalizeURL = require('../util/mapbox').normalizeGlyphsURL; @@ -63154,7 +66539,7 @@ function glyphUrl(fontstack, range, url, subdomains) { .replace('{range}', range); } -},{"../symbol/glyph_atlas":377,"../util/ajax":404,"../util/glyphs":414,"../util/mapbox":418,"pbf":456}],379:[function(require,module,exports){ +},{"../symbol/glyph_atlas":387,"../util/ajax":414,"../util/glyphs":424,"../util/mapbox":428,"pbf":466}],389:[function(require,module,exports){ 'use strict'; module.exports = function (features, textFeatures, geometries) { @@ -63245,7 +66630,7 @@ module.exports = function (features, textFeatures, geometries) { }; }; -},{}],380:[function(require,module,exports){ +},{}],390:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -63528,7 +66913,7 @@ function getSegmentGlyphs(glyphs, anchor, offset, line, segment, forward) { return placementScale; } -},{"point-geometry":462}],381:[function(require,module,exports){ +},{"point-geometry":472}],391:[function(require,module,exports){ 'use strict'; var resolveTokens = require('../util/token'); @@ -63571,7 +66956,7 @@ function resolveText(features, layoutProperties, codepoints) { return textFeatures; } -},{"../util/token":420}],382:[function(require,module,exports){ +},{"../util/token":430}],392:[function(require,module,exports){ 'use strict'; module.exports = { @@ -63752,7 +67137,7 @@ function PositionedIcon(image, top, bottom, left, right) { this.right = right; } -},{}],383:[function(require,module,exports){ +},{}],393:[function(require,module,exports){ 'use strict'; var ShelfPack = require('shelf-pack'); @@ -63985,7 +67370,7 @@ function AtlasImage(rect, width, height, sdf, pixelRatio) { this.pixelRatio = pixelRatio; } -},{"../util/browser":405,"../util/util":421,"shelf-pack":492}],384:[function(require,module,exports){ +},{"../util/browser":415,"../util/util":431,"shelf-pack":502}],394:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -64030,7 +67415,7 @@ util.extendAll(SymbolInstancesArray.prototype.StructType.prototype, { -},{"../util/struct_array":419,"../util/util":421,"point-geometry":462}],385:[function(require,module,exports){ +},{"../util/struct_array":429,"../util/util":431,"point-geometry":472}],395:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -64104,7 +67489,7 @@ util.extendAll(SymbolQuadsArray.prototype.StructType.prototype, { }); -},{"../util/struct_array":419,"../util/util":421,"./quads":380,"point-geometry":462}],386:[function(require,module,exports){ +},{"../util/struct_array":429,"../util/util":431,"./quads":390,"point-geometry":472}],396:[function(require,module,exports){ 'use strict'; var DOM = require('../util/dom'); @@ -64279,7 +67664,7 @@ module.exports = function bindHandlers(map, options) { * property. */ -},{"../util/dom":407,"./handler/box_zoom":392,"./handler/dblclick_zoom":393,"./handler/drag_pan":394,"./handler/drag_rotate":395,"./handler/keyboard":396,"./handler/scroll_zoom":397,"./handler/touch_zoom_rotate":398,"point-geometry":462}],387:[function(require,module,exports){ +},{"../util/dom":417,"./handler/box_zoom":402,"./handler/dblclick_zoom":403,"./handler/drag_pan":404,"./handler/drag_rotate":405,"./handler/keyboard":406,"./handler/scroll_zoom":407,"./handler/touch_zoom_rotate":408,"point-geometry":472}],397:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -65066,7 +68451,7 @@ util.extend(Camera.prototype, /** @lends Map.prototype */{ * @property {MapEventData} data */ -},{"../geo/lng_lat":318,"../geo/lng_lat_bounds":319,"../util/browser":405,"../util/interpolate":415,"../util/util":421,"point-geometry":462}],388:[function(require,module,exports){ +},{"../geo/lng_lat":328,"../geo/lng_lat_bounds":329,"../util/browser":415,"../util/interpolate":425,"../util/util":431,"point-geometry":472}],398:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -65149,7 +68534,7 @@ Attribution.prototype = util.inherit(Control, { } }); -},{"../../util/dom":407,"../../util/util":421,"./control":389}],389:[function(require,module,exports){ +},{"../../util/dom":417,"../../util/util":431,"./control":399}],399:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65204,7 +68589,7 @@ Control.prototype = { util.extend(Control.prototype, Evented); -},{"../../util/evented":413,"../../util/util":421}],390:[function(require,module,exports){ +},{"../../util/evented":423,"../../util/util":431}],400:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -65306,7 +68691,7 @@ Geolocate.prototype = util.inherit(Control, { * */ -},{"../../util/browser":405,"../../util/dom":407,"../../util/util":421,"./control":389}],391:[function(require,module,exports){ +},{"../../util/browser":415,"../../util/dom":417,"../../util/util":431,"./control":399}],401:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -65427,7 +68812,7 @@ function copyMouseEvent(e) { }); } -},{"../../util/dom":407,"../../util/util":421,"./control":389}],392:[function(require,module,exports){ +},{"../../util/dom":417,"../../util/util":431,"./control":399}],402:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -65614,7 +68999,7 @@ BoxZoomHandler.prototype = { * @property {MapBoxZoomEvent} data */ -},{"../../geo/lng_lat_bounds":319,"../../util/dom":407,"../../util/util":421}],393:[function(require,module,exports){ +},{"../../geo/lng_lat_bounds":329,"../../util/dom":417,"../../util/util":431}],403:[function(require,module,exports){ 'use strict'; module.exports = DoubleClickZoomHandler; @@ -65677,7 +69062,7 @@ DoubleClickZoomHandler.prototype = { } }; -},{}],394:[function(require,module,exports){ +},{}],404:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -65913,7 +69298,7 @@ DragPanHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/dom":407,"../../util/util":421}],395:[function(require,module,exports){ +},{"../../util/dom":417,"../../util/util":431}],405:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -66167,7 +69552,7 @@ DragRotateHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/dom":407,"../../util/util":421,"point-geometry":462}],396:[function(require,module,exports){ +},{"../../util/dom":417,"../../util/util":431,"point-geometry":472}],406:[function(require,module,exports){ 'use strict'; module.exports = KeyboardHandler; @@ -66299,7 +69684,7 @@ KeyboardHandler.prototype = { } }; -},{}],397:[function(require,module,exports){ +},{}],407:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -66482,7 +69867,7 @@ ScrollZoomHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/browser":405,"../../util/dom":407,"../../util/util":421}],398:[function(require,module,exports){ +},{"../../util/browser":415,"../../util/dom":417,"../../util/util":431}],408:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -66697,7 +70082,7 @@ TouchZoomRotateHandler.prototype = { } }; -},{"../../util/dom":407,"../../util/util":421}],399:[function(require,module,exports){ +},{"../../util/dom":417,"../../util/util":431}],409:[function(require,module,exports){ 'use strict'; /* @@ -66772,7 +70157,7 @@ Hash.prototype = { } }; -},{"../util/util":421}],400:[function(require,module,exports){ +},{"../util/util":431}],410:[function(require,module,exports){ 'use strict'; var Canvas = require('../util/canvas'); @@ -68212,7 +71597,7 @@ function removeNode(node) { * @property {{error: {message: string}}} data */ -},{"../geo/lng_lat":318,"../geo/lng_lat_bounds":319,"../geo/transform":320,"../render/painter":334,"../style/animation_loop":354,"../style/style":357,"../util/browser":405,"../util/canvas":406,"../util/dom":407,"../util/evented":413,"../util/util":421,"./bind_handlers":386,"./camera":387,"./control/attribution":388,"./hash":399,"point-geometry":462}],401:[function(require,module,exports){ +},{"../geo/lng_lat":328,"../geo/lng_lat_bounds":329,"../geo/transform":330,"../render/painter":344,"../style/animation_loop":364,"../style/style":367,"../util/browser":415,"../util/canvas":416,"../util/dom":417,"../util/evented":423,"../util/util":431,"./bind_handlers":396,"./camera":397,"./control/attribution":398,"./hash":409,"point-geometry":472}],411:[function(require,module,exports){ /* eslint-disable */ 'use strict'; @@ -68307,7 +71692,7 @@ Marker.prototype = { } }; -},{"../geo/lng_lat":318,"../util/dom":407,"point-geometry":462}],402:[function(require,module,exports){ +},{"../geo/lng_lat":328,"../util/dom":417,"point-geometry":472}],412:[function(require,module,exports){ 'use strict'; module.exports = Popup; @@ -68561,7 +71946,7 @@ Popup.prototype = util.inherit(Evented, /** @lends Popup.prototype */{ } }); -},{"../geo/lng_lat":318,"../util/dom":407,"../util/evented":413,"../util/util":421}],403:[function(require,module,exports){ +},{"../geo/lng_lat":328,"../util/dom":417,"../util/evented":423,"../util/util":431}],413:[function(require,module,exports){ 'use strict'; module.exports = Actor; @@ -68633,7 +72018,7 @@ Actor.prototype.postMessage = function(message, transferList) { this.target.postMessage(message, transferList); }; -},{}],404:[function(require,module,exports){ +},{}],414:[function(require,module,exports){ 'use strict'; exports.getJSON = function(url, callback) { @@ -68723,7 +72108,7 @@ exports.getVideo = function(urls, callback) { return video; }; -},{}],405:[function(require,module,exports){ +},{}],415:[function(require,module,exports){ 'use strict'; /** @@ -68818,7 +72203,7 @@ webpImgTest.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ// exports.supportsGeolocation = !!navigator.geolocation; -},{"mapbox-gl-supported":306}],406:[function(require,module,exports){ +},{"mapbox-gl-supported":316}],416:[function(require,module,exports){ 'use strict'; var util = require('../util'); @@ -68862,7 +72247,7 @@ Canvas.prototype.getElement = function() { return this.canvas; }; -},{"../util":421,"mapbox-gl-supported":306}],407:[function(require,module,exports){ +},{"../util":431,"mapbox-gl-supported":316}],417:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -68937,7 +72322,7 @@ exports.touchPos = function (el, e) { return points; }; -},{"point-geometry":462}],408:[function(require,module,exports){ +},{"point-geometry":472}],418:[function(require,module,exports){ 'use strict'; var WebWorkify = require('webworkify'); @@ -68945,7 +72330,7 @@ module.exports = function () { return new WebWorkify(require('../../source/worker')); }; -},{"../../source/worker":352,"webworkify":541}],409:[function(require,module,exports){ +},{"../../source/worker":362,"webworkify":551}],419:[function(require,module,exports){ 'use strict'; var quickselect = require('quickselect'); @@ -69005,7 +72390,7 @@ function calculateSignedArea(ring) { return sum; } -},{"quickselect":471}],410:[function(require,module,exports){ +},{"quickselect":481}],420:[function(require,module,exports){ 'use strict'; module.exports = { @@ -69013,7 +72398,7 @@ module.exports = { REQUIRE_ACCESS_TOKEN: true }; -},{}],411:[function(require,module,exports){ +},{}],421:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -69040,7 +72425,7 @@ DictionaryCoder.prototype.decode = function(n) { return this._numberToString[n]; }; -},{"assert":37}],412:[function(require,module,exports){ +},{"assert":39}],422:[function(require,module,exports){ 'use strict'; var util = require('./util'); @@ -69115,7 +72500,7 @@ Dispatcher.prototype = { } }; -},{"./actor":403,"./util":421,"./web_worker":408}],413:[function(require,module,exports){ +},{"./actor":413,"./util":431,"./web_worker":418}],423:[function(require,module,exports){ 'use strict'; var util = require('./util'); @@ -69238,7 +72623,7 @@ var Evented = { module.exports = Evented; -},{"./util":421}],414:[function(require,module,exports){ +},{"./util":431}],424:[function(require,module,exports){ 'use strict'; module.exports = Glyphs; @@ -69273,7 +72658,7 @@ function readGlyph(tag, glyph, pbf) { else if (tag === 7) glyph.advance = pbf.readVarint(); } -},{}],415:[function(require,module,exports){ +},{}],425:[function(require,module,exports){ 'use strict'; module.exports = interpolate; @@ -69314,7 +72699,7 @@ interpolate.array = function(from, to, t) { }); }; -},{}],416:[function(require,module,exports){ +},{}],426:[function(require,module,exports){ 'use strict'; module.exports = { @@ -69480,7 +72865,7 @@ function polygonContainsPoint(ring, p) { return c; } -},{}],417:[function(require,module,exports){ +},{}],427:[function(require,module,exports){ 'use strict'; module.exports = LRUCache; @@ -69605,7 +72990,7 @@ LRUCache.prototype.setMaxSize = function(max) { return this; }; -},{}],418:[function(require,module,exports){ +},{}],428:[function(require,module,exports){ 'use strict'; var config = require('./config'); @@ -69733,7 +73118,7 @@ function replaceTempAccessToken(query) { } } -},{"./browser":405,"./config":410,"./util":421,"url":522}],419:[function(require,module,exports){ +},{"./browser":415,"./config":420,"./util":431,"url":532}],429:[function(require,module,exports){ 'use strict'; // Note: all "sizes" are measured in bytes @@ -70081,7 +73466,7 @@ StructArray.prototype.toArray = function(startIndex, endIndex) { return array; }; -},{"assert":37}],420:[function(require,module,exports){ +},{"assert":39}],430:[function(require,module,exports){ 'use strict'; module.exports = resolveTokens; @@ -70100,7 +73485,7 @@ function resolveTokens(properties, text) { }); } -},{}],421:[function(require,module,exports){ +},{}],431:[function(require,module,exports){ 'use strict'; var UnitBezier = require('unitbezier'); @@ -70559,7 +73944,7 @@ exports.warnOnce = function(message) { } }; -},{"../geo/coordinate":317,"unitbezier":521}],422:[function(require,module,exports){ +},{"../geo/coordinate":327,"unitbezier":531}],432:[function(require,module,exports){ 'use strict'; module.exports = Feature; @@ -70604,7 +73989,7 @@ Feature.prototype = { } }; -},{}],423:[function(require,module,exports){ +},{}],433:[function(require,module,exports){ module.exports={ "_args": [ [ @@ -70617,7 +74002,7 @@ module.exports={ "spec": ">=0.22.0 <0.23.0", "type": "range" }, - "/home/etienne/Documents/plotly/plotly.js" + "/Users/robert/repos/plotly/plotly.js" ] ], "_from": "mapbox-gl@>=0.22.0 <0.23.0", @@ -70651,7 +74036,7 @@ module.exports={ "_shasum": "92a965547d4c2f24c22cbc487eeda48694cb627a", "_shrinkwrap": null, "_spec": "mapbox-gl@^0.22.0", - "_where": "/home/etienne/Documents/plotly/plotly.js", + "_where": "/Users/robert/repos/plotly/plotly.js", "browser": { "./js/util/ajax.js": "./js/util/browser/ajax.js", "./js/util/browser.js": "./js/util/browser/browser.js", @@ -70944,7 +74329,7 @@ module.exports={ "version": "0.22.1" } -},{}],424:[function(require,module,exports){ +},{}],434:[function(require,module,exports){ 'use strict' module.exports = createTable @@ -71010,7 +74395,7 @@ function createTable(dimension) { } return result } -},{"convex-hull":93}],425:[function(require,module,exports){ +},{"convex-hull":95}],435:[function(require,module,exports){ /*jshint unused:true*/ /* Input: matrix ; a 4x4 matrix @@ -71190,7 +74575,7 @@ function combine(out, a, b, scale1, scale2) { out[1] = a[1] * scale1 + b[1] * scale2 out[2] = a[2] * scale1 + b[2] * scale2 } -},{"./normalize":426,"gl-mat4/clone":156,"gl-mat4/create":157,"gl-mat4/determinant":158,"gl-mat4/invert":162,"gl-mat4/transpose":172,"gl-vec3/cross":253,"gl-vec3/dot":254,"gl-vec3/length":255,"gl-vec3/normalize":257}],426:[function(require,module,exports){ +},{"./normalize":436,"gl-mat4/clone":166,"gl-mat4/create":167,"gl-mat4/determinant":168,"gl-mat4/invert":172,"gl-mat4/transpose":182,"gl-vec3/cross":263,"gl-vec3/dot":264,"gl-vec3/length":265,"gl-vec3/normalize":267}],436:[function(require,module,exports){ module.exports = function normalize(out, mat) { var m44 = mat[15] // Cannot normalize. @@ -71201,7 +74586,7 @@ module.exports = function normalize(out, mat) { out[i] = mat[i] * scale return true } -},{}],427:[function(require,module,exports){ +},{}],437:[function(require,module,exports){ var lerp = require('gl-vec3/lerp') var recompose = require('mat4-recompose') @@ -71254,7 +74639,7 @@ function vec3(n) { function vec4() { return [0,0,0,1] } -},{"gl-mat4/determinant":158,"gl-vec3/lerp":256,"mat4-decompose":425,"mat4-recompose":428,"quat-slerp":467}],428:[function(require,module,exports){ +},{"gl-mat4/determinant":168,"gl-vec3/lerp":266,"mat4-decompose":435,"mat4-recompose":438,"quat-slerp":477}],438:[function(require,module,exports){ /* Input: translation ; a 3 component vector scale ; a 3 component vector @@ -71315,206 +74700,207 @@ module.exports = function recomposeMat4(matrix, translation, scale, skew, perspe mat4.scale(matrix, matrix, scale) return matrix } -},{"gl-mat4/create":157,"gl-mat4/fromRotationTranslation":160,"gl-mat4/identity":161,"gl-mat4/multiply":164,"gl-mat4/scale":170,"gl-mat4/translate":171}],429:[function(require,module,exports){ -'use strict' - -var bsearch = require('binary-search-bounds') -var m4interp = require('mat4-interpolate') -var invert44 = require('gl-mat4/invert') -var rotateX = require('gl-mat4/rotateX') -var rotateY = require('gl-mat4/rotateY') -var rotateZ = require('gl-mat4/rotateZ') -var lookAt = require('gl-mat4/lookAt') -var translate = require('gl-mat4/translate') -var scale = require('gl-mat4/scale') -var normalize = require('gl-vec3/normalize') - -var DEFAULT_CENTER = [0,0,0] - -module.exports = createMatrixCameraController - -function MatrixCameraController(initialMatrix) { - this._components = initialMatrix.slice() - this._time = [0] - this.prevMatrix = initialMatrix.slice() - this.nextMatrix = initialMatrix.slice() - this.computedMatrix = initialMatrix.slice() - this.computedInverse = initialMatrix.slice() - this.computedEye = [0,0,0] - this.computedUp = [0,0,0] - this.computedCenter = [0,0,0] - this.computedRadius = [0] - this._limits = [-Infinity, Infinity] -} - -var proto = MatrixCameraController.prototype - -proto.recalcMatrix = function(t) { - var time = this._time - var tidx = bsearch.le(time, t) - var mat = this.computedMatrix - if(tidx < 0) { - return - } - var comps = this._components - if(tidx === time.length-1) { - var ptr = 16*tidx - for(var i=0; i<16; ++i) { - mat[i] = comps[ptr++] - } - } else { - var dt = (time[tidx+1] - time[tidx]) - var ptr = 16*tidx - var prev = this.prevMatrix - var allEqual = true - for(var i=0; i<16; ++i) { - prev[i] = comps[ptr++] - } - var next = this.nextMatrix - for(var i=0; i<16; ++i) { - next[i] = comps[ptr++] - allEqual = allEqual && (prev[i] === next[i]) - } - if(dt < 1e-6 || allEqual) { - for(var i=0; i<16; ++i) { - mat[i] = prev[i] - } - } else { - m4interp(mat, prev, next, (t - time[tidx])/dt) - } - } - - var up = this.computedUp - up[0] = mat[1] - up[1] = mat[5] - up[2] = mat[6] - normalize(up, up) - - var imat = this.computedInverse - invert44(imat, mat) - var eye = this.computedEye - var w = imat[15] - eye[0] = imat[12]/w - eye[1] = imat[13]/w - eye[2] = imat[14]/w - - var center = this.computedCenter - var radius = Math.exp(this.computedRadius[0]) - for(var i=0; i<3; ++i) { - center[i] = eye[i] - mat[2+4*i] * radius - } -} - -proto.idle = function(t) { - if(t < this.lastT()) { - return - } - var mc = this._components - var ptr = mc.length-16 - for(var i=0; i<16; ++i) { - mc.push(mc[ptr++]) - } - this._time.push(t) -} - -proto.flush = function(t) { - var idx = bsearch.gt(this._time, t) - 2 - if(idx < 0) { - return - } - this._time.slice(0, idx) - this._components.slice(0, 16*idx) -} - -proto.lastT = function() { - return this._time[this._time.length-1] -} - -proto.lookAt = function(t, eye, center, up) { - this.recalcMatrix(t) - eye = eye || this.computedEye - center = center || DEFAULT_CENTER - up = up || this.computedUp - this.setMatrix(t, lookAt(this.computedMatrix, eye, center, up)) - var d2 = 0.0 - for(var i=0; i<3; ++i) { - d2 += Math.pow(center[i] - eye[i], 2) - } - d2 = Math.log(Math.sqrt(d2)) - this.computedRadius[0] = d2 -} - -proto.rotate = function(t, yaw, pitch, roll) { - this.recalcMatrix(t) - var mat = this.computedInverse - if(yaw) rotateY(mat, mat, yaw) - if(pitch) rotateX(mat, mat, pitch) - if(roll) rotateZ(mat, mat, roll) - this.setMatrix(t, invert44(this.computedMatrix, mat)) -} - -var tvec = [0,0,0] - -proto.pan = function(t, dx, dy, dz) { - tvec[0] = -(dx || 0.0) - tvec[1] = -(dy || 0.0) - tvec[2] = -(dz || 0.0) - this.recalcMatrix(t) - var mat = this.computedInverse - translate(mat, mat, tvec) - this.setMatrix(t, invert44(mat, mat)) -} - -proto.translate = function(t, dx, dy, dz) { - tvec[0] = dx || 0.0 - tvec[1] = dy || 0.0 - tvec[2] = dz || 0.0 - this.recalcMatrix(t) - var mat = this.computedMatrix - translate(mat, mat, tvec) - this.setMatrix(t, mat) -} - -proto.setMatrix = function(t, mat) { - if(t < this.lastT()) { - return - } - this._time.push(t) - for(var i=0; i<16; ++i) { - this._components.push(mat[i]) - } -} - -proto.setDistance = function(t, d) { - this.computedRadius[0] = d -} - -proto.setDistanceLimits = function(a,b) { - var lim = this._limits - lim[0] = a - lim[1] = b -} - -proto.getDistanceLimits = function(out) { - var lim = this._limits - if(out) { - out[0] = lim[0] - out[1] = lim[1] - return out - } - return lim -} +},{"gl-mat4/create":167,"gl-mat4/fromRotationTranslation":170,"gl-mat4/identity":171,"gl-mat4/multiply":174,"gl-mat4/scale":180,"gl-mat4/translate":181}],439:[function(require,module,exports){ +'use strict' + +var bsearch = require('binary-search-bounds') +var m4interp = require('mat4-interpolate') +var invert44 = require('gl-mat4/invert') +var rotateX = require('gl-mat4/rotateX') +var rotateY = require('gl-mat4/rotateY') +var rotateZ = require('gl-mat4/rotateZ') +var lookAt = require('gl-mat4/lookAt') +var translate = require('gl-mat4/translate') +var scale = require('gl-mat4/scale') +var normalize = require('gl-vec3/normalize') + +var DEFAULT_CENTER = [0,0,0] + +module.exports = createMatrixCameraController + +function MatrixCameraController(initialMatrix) { + this._components = initialMatrix.slice() + this._time = [0] + this.prevMatrix = initialMatrix.slice() + this.nextMatrix = initialMatrix.slice() + this.computedMatrix = initialMatrix.slice() + this.computedInverse = initialMatrix.slice() + this.computedEye = [0,0,0] + this.computedUp = [0,0,0] + this.computedCenter = [0,0,0] + this.computedRadius = [0] + this._limits = [-Infinity, Infinity] +} + +var proto = MatrixCameraController.prototype + +proto.recalcMatrix = function(t) { + var time = this._time + var tidx = bsearch.le(time, t) + var mat = this.computedMatrix + if(tidx < 0) { + return + } + var comps = this._components + if(tidx === time.length-1) { + var ptr = 16*tidx + for(var i=0; i<16; ++i) { + mat[i] = comps[ptr++] + } + } else { + var dt = (time[tidx+1] - time[tidx]) + var ptr = 16*tidx + var prev = this.prevMatrix + var allEqual = true + for(var i=0; i<16; ++i) { + prev[i] = comps[ptr++] + } + var next = this.nextMatrix + for(var i=0; i<16; ++i) { + next[i] = comps[ptr++] + allEqual = allEqual && (prev[i] === next[i]) + } + if(dt < 1e-6 || allEqual) { + for(var i=0; i<16; ++i) { + mat[i] = prev[i] + } + } else { + m4interp(mat, prev, next, (t - time[tidx])/dt) + } + } + + var up = this.computedUp + up[0] = mat[1] + up[1] = mat[5] + up[2] = mat[9] + normalize(up, up) + + var imat = this.computedInverse + invert44(imat, mat) + var eye = this.computedEye + var w = imat[15] + eye[0] = imat[12]/w + eye[1] = imat[13]/w + eye[2] = imat[14]/w + + var center = this.computedCenter + var radius = Math.exp(this.computedRadius[0]) + for(var i=0; i<3; ++i) { + center[i] = eye[i] - mat[2+4*i] * radius + } +} + +proto.idle = function(t) { + if(t < this.lastT()) { + return + } + var mc = this._components + var ptr = mc.length-16 + for(var i=0; i<16; ++i) { + mc.push(mc[ptr++]) + } + this._time.push(t) +} + +proto.flush = function(t) { + var idx = bsearch.gt(this._time, t) - 2 + if(idx < 0) { + return + } + this._time.splice(0, idx) + this._components.splice(0, 16*idx) +} + +proto.lastT = function() { + return this._time[this._time.length-1] +} + +proto.lookAt = function(t, eye, center, up) { + this.recalcMatrix(t) + eye = eye || this.computedEye + center = center || DEFAULT_CENTER + up = up || this.computedUp + this.setMatrix(t, lookAt(this.computedMatrix, eye, center, up)) + var d2 = 0.0 + for(var i=0; i<3; ++i) { + d2 += Math.pow(center[i] - eye[i], 2) + } + d2 = Math.log(Math.sqrt(d2)) + this.computedRadius[0] = d2 +} + +proto.rotate = function(t, yaw, pitch, roll) { + this.recalcMatrix(t) + var mat = this.computedInverse + if(yaw) rotateY(mat, mat, yaw) + if(pitch) rotateX(mat, mat, pitch) + if(roll) rotateZ(mat, mat, roll) + this.setMatrix(t, invert44(this.computedMatrix, mat)) +} + +var tvec = [0,0,0] + +proto.pan = function(t, dx, dy, dz) { + tvec[0] = -(dx || 0.0) + tvec[1] = -(dy || 0.0) + tvec[2] = -(dz || 0.0) + this.recalcMatrix(t) + var mat = this.computedInverse + translate(mat, mat, tvec) + this.setMatrix(t, invert44(mat, mat)) +} + +proto.translate = function(t, dx, dy, dz) { + tvec[0] = dx || 0.0 + tvec[1] = dy || 0.0 + tvec[2] = dz || 0.0 + this.recalcMatrix(t) + var mat = this.computedMatrix + translate(mat, mat, tvec) + this.setMatrix(t, mat) +} + +proto.setMatrix = function(t, mat) { + if(t < this.lastT()) { + return + } + this._time.push(t) + for(var i=0; i<16; ++i) { + this._components.push(mat[i]) + } +} + +proto.setDistance = function(t, d) { + this.computedRadius[0] = d +} + +proto.setDistanceLimits = function(a,b) { + var lim = this._limits + lim[0] = a + lim[1] = b +} + +proto.getDistanceLimits = function(out) { + var lim = this._limits + if(out) { + out[0] = lim[0] + out[1] = lim[1] + return out + } + return lim +} + +function createMatrixCameraController(options) { + options = options || {} + var matrix = options.matrix || + [1,0,0,0, + 0,1,0,0, + 0,0,1,0, + 0,0,0,1] + return new MatrixCameraController(matrix) +} -function createMatrixCameraController(options) { - options = options || {} - var matrix = options.matrix || - [1,0,0,0, - 0,1,0,0, - 0,0,1,0, - 0,0,0,1] - return new MatrixCameraController(matrix) -} -},{"binary-search-bounds":56,"gl-mat4/invert":162,"gl-mat4/lookAt":163,"gl-mat4/rotateX":167,"gl-mat4/rotateY":168,"gl-mat4/rotateZ":169,"gl-mat4/scale":170,"gl-mat4/translate":171,"gl-vec3/normalize":257,"mat4-interpolate":427}],430:[function(require,module,exports){ +},{"binary-search-bounds":58,"gl-mat4/invert":172,"gl-mat4/lookAt":173,"gl-mat4/rotateX":177,"gl-mat4/rotateY":178,"gl-mat4/rotateZ":179,"gl-mat4/scale":180,"gl-mat4/translate":181,"gl-vec3/normalize":267,"mat4-interpolate":437}],440:[function(require,module,exports){ 'use strict' module.exports = monotoneConvexHull2D @@ -71596,7 +74982,7 @@ function monotoneConvexHull2D(points) { //Return result return result } -},{"robust-orientation":486}],431:[function(require,module,exports){ +},{"robust-orientation":496}],441:[function(require,module,exports){ 'use strict' module.exports = mouseListen @@ -71803,7 +75189,7 @@ function mouseListen (element, callback) { return result } -},{"mouse-event":433}],432:[function(require,module,exports){ +},{"mouse-event":443}],442:[function(require,module,exports){ var rootPosition = { left: 0, top: 0 } module.exports = mouseEventOffset @@ -71830,7 +75216,7 @@ function getBoundingClientOffset (element) { } } -},{}],433:[function(require,module,exports){ +},{}],443:[function(require,module,exports){ 'use strict' function mouseButtons(ev) { @@ -71892,7 +75278,7 @@ function mouseRelativeY(ev) { } exports.y = mouseRelativeY -},{}],434:[function(require,module,exports){ +},{}],444:[function(require,module,exports){ 'use strict' var toPX = require('to-px') @@ -71934,7 +75320,7 @@ function mouseWheelListen(element, callback, noScroll) { return listener } -},{"to-px":512}],435:[function(require,module,exports){ +},{"to-px":522}],445:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -72350,7 +75736,7 @@ function createSurfaceExtractor(args) { order, typesig) } -},{"typedarray-pool":518}],436:[function(require,module,exports){ +},{"typedarray-pool":528}],446:[function(require,module,exports){ "use strict" @@ -72362,7 +75748,7 @@ module.exports = function(array, f) { return array } -},{"cwise/lib/wrapper":103}],437:[function(require,module,exports){ +},{"cwise/lib/wrapper":105}],447:[function(require,module,exports){ 'use strict' module.exports = gradient @@ -72660,7 +76046,7 @@ function gradient(out, inp, bc) { var cached = generateGradient(bc) return cached(out, inp) } -},{"cwise-compiler":100,"dup":107}],438:[function(require,module,exports){ +},{"cwise-compiler":102,"dup":117}],448:[function(require,module,exports){ 'use strict' var warp = require('ndarray-warp') @@ -72690,7 +76076,7 @@ function applyHomography(dest, src, Xi) { }) return dest } -},{"gl-matrix-invert":173,"ndarray-warp":445}],439:[function(require,module,exports){ +},{"gl-matrix-invert":183,"ndarray-warp":455}],449:[function(require,module,exports){ "use strict" function interp1d(arr, x) { @@ -72801,7 +76187,7 @@ module.exports.d1 = interp1d module.exports.d2 = interp2d module.exports.d3 = interp3d -},{}],440:[function(require,module,exports){ +},{}],450:[function(require,module,exports){ "use strict" var compile = require("cwise-compiler") @@ -73264,7 +76650,7 @@ exports.equals = compile({ -},{"cwise-compiler":100}],441:[function(require,module,exports){ +},{"cwise-compiler":102}],451:[function(require,module,exports){ "use strict" var ndarray = require("ndarray") @@ -73287,10 +76673,10 @@ module.exports = function convert(arr, result) { return result } -},{"./doConvert.js":442,"ndarray":446}],442:[function(require,module,exports){ +},{"./doConvert.js":452,"ndarray":456}],452:[function(require,module,exports){ module.exports=require('cwise-compiler')({"args":["array","scalar","index"],"pre":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"body":{"body":"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}","args":[{"name":"_inline_1_arg0_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_1_arg1_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_1_arg2_","lvalue":false,"rvalue":true,"count":4}],"thisVars":[],"localVars":["_inline_1_i","_inline_1_v"]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"funcName":"convert","blockSize":64}) -},{"cwise-compiler":100}],443:[function(require,module,exports){ +},{"cwise-compiler":102}],453:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -74019,7 +77405,7 @@ function compileSort(order, dtype) { } module.exports = compileSort -},{"typedarray-pool":518}],444:[function(require,module,exports){ +},{"typedarray-pool":528}],454:[function(require,module,exports){ "use strict" var compile = require("./lib/compile_sort.js") @@ -74039,19 +77425,19 @@ function sort(array) { } module.exports = sort -},{"./lib/compile_sort.js":443}],445:[function(require,module,exports){ +},{"./lib/compile_sort.js":453}],455:[function(require,module,exports){ 'use strict' var interp = require('ndarray-linear-interpolate') -var do_warp = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=new Array(_inline_21_arg4_)}","args":[{"name":"_inline_21_arg0_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_21_arg1_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_21_arg2_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_21_arg3_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_21_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_22_arg2_(this_warped,_inline_22_arg0_),_inline_22_arg1_=_inline_22_arg3_.apply(void 0,this_warped)}","args":[{"name":"_inline_22_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_22_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_22_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_22_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_22_arg4_","lvalue":false,"rvalue":false,"count":0}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warpND","blockSize":64}) +var do_warp = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=new Array(_inline_18_arg4_)}","args":[{"name":"_inline_18_arg0_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_18_arg1_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_18_arg2_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_18_arg3_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_18_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_19_arg2_(this_warped,_inline_19_arg0_),_inline_19_arg1_=_inline_19_arg3_.apply(void 0,this_warped)}","args":[{"name":"_inline_19_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_19_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_19_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_19_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_19_arg4_","lvalue":false,"rvalue":false,"count":0}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warpND","blockSize":64}) -var do_warp_1 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_25_arg2_(this_warped,_inline_25_arg0_),_inline_25_arg1_=_inline_25_arg3_(_inline_25_arg4_,this_warped[0])}","args":[{"name":"_inline_25_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_25_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_25_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_25_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_25_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp1D","blockSize":64}) +var do_warp_1 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_22_arg2_(this_warped,_inline_22_arg0_),_inline_22_arg1_=_inline_22_arg3_(_inline_22_arg4_,this_warped[0])}","args":[{"name":"_inline_22_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_22_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_22_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_22_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_22_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp1D","blockSize":64}) -var do_warp_2 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_28_arg2_(this_warped,_inline_28_arg0_),_inline_28_arg1_=_inline_28_arg3_(_inline_28_arg4_,this_warped[0],this_warped[1])}","args":[{"name":"_inline_28_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_28_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_28_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_28_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_28_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp2D","blockSize":64}) +var do_warp_2 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_25_arg2_(this_warped,_inline_25_arg0_),_inline_25_arg1_=_inline_25_arg3_(_inline_25_arg4_,this_warped[0],this_warped[1])}","args":[{"name":"_inline_25_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_25_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_25_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_25_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_25_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp2D","blockSize":64}) -var do_warp_3 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_31_arg2_(this_warped,_inline_31_arg0_),_inline_31_arg1_=_inline_31_arg3_(_inline_31_arg4_,this_warped[0],this_warped[1],this_warped[2])}","args":[{"name":"_inline_31_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_31_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_31_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_31_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_31_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp3D","blockSize":64}) +var do_warp_3 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_28_arg2_(this_warped,_inline_28_arg0_),_inline_28_arg1_=_inline_28_arg3_(_inline_28_arg4_,this_warped[0],this_warped[1],this_warped[2])}","args":[{"name":"_inline_28_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_28_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_28_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_28_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_28_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp3D","blockSize":64}) module.exports = function warp(dest, src, func) { switch(src.shape.length) { @@ -74071,7 +77457,7 @@ module.exports = function warp(dest, src, func) { return dest } -},{"cwise/lib/wrapper":103,"ndarray-linear-interpolate":439}],446:[function(require,module,exports){ +},{"cwise/lib/wrapper":105,"ndarray-linear-interpolate":449}],456:[function(require,module,exports){ var iota = require("iota-array") var isBuffer = require("is-buffer") @@ -74416,7 +77802,7 @@ function wrappedNDArrayCtor(data, shape, stride, offset) { module.exports = wrappedNDArrayCtor -},{"iota-array":273,"is-buffer":274}],447:[function(require,module,exports){ +},{"iota-array":283,"is-buffer":284}],457:[function(require,module,exports){ "use strict" var doubleBits = require("double-bits") @@ -74459,7 +77845,7 @@ function nextafter(x, y) { } return doubleBits.pack(lo, hi) } -},{"double-bits":106}],448:[function(require,module,exports){ +},{"double-bits":116}],458:[function(require,module,exports){ var DEFAULT_NORMALS_EPSILON = 1e-6; var DEFAULT_FACE_EPSILON = 1e-6; @@ -74584,7 +77970,7 @@ exports.faceNormals = function(faces, positions, specifiedEpsilon) { -},{}],449:[function(require,module,exports){ +},{}],459:[function(require,module,exports){ /* object-assign (c) Sindre Sorhus @@ -74676,7 +78062,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { return to; }; -},{}],450:[function(require,module,exports){ +},{}],460:[function(require,module,exports){ 'use strict' module.exports = quatFromFrame @@ -74718,7 +78104,7 @@ function quatFromFrame( } return out } -},{}],451:[function(require,module,exports){ +},{}],461:[function(require,module,exports){ 'use strict' module.exports = createOrbitController @@ -75112,7 +78498,7 @@ function createOrbitController(options) { return result } -},{"./lib/quatFromFrame":450,"filtered-vector":115,"gl-mat4/fromQuat":159,"gl-mat4/invert":162,"gl-mat4/lookAt":163}],452:[function(require,module,exports){ +},{"./lib/quatFromFrame":460,"filtered-vector":125,"gl-mat4/fromQuat":169,"gl-mat4/invert":172,"gl-mat4/lookAt":173}],462:[function(require,module,exports){ /*! * pad-left * @@ -75128,7 +78514,7 @@ module.exports = function padLeft(str, num, ch) { ch = typeof ch !== 'undefined' ? (ch + '') : ' '; return repeat(ch, num) + str; }; -},{"repeat-string":478}],453:[function(require,module,exports){ +},{"repeat-string":488}],463:[function(require,module,exports){ module.exports = function parseUnit(str, out) { if (!out) out = [ 0, '' ] @@ -75139,7 +78525,7 @@ module.exports = function parseUnit(str, out) { out[1] = str.match(/[\d.\-\+]*\s*(.*)/)[1] || '' return out } -},{}],454:[function(require,module,exports){ +},{}],464:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -75367,7 +78753,7 @@ var substr = 'ab'.substr(-1) === 'b' ; }).call(this,require('_process')) -},{"_process":465}],455:[function(require,module,exports){ +},{"_process":475}],465:[function(require,module,exports){ 'use strict'; // lightweight Buffer shim for pbf browser build @@ -75528,7 +78914,7 @@ function encodeString(str) { return bytes; } -},{"ieee754":269}],456:[function(require,module,exports){ +},{"ieee754":279}],466:[function(require,module,exports){ (function (global){ 'use strict'; @@ -75954,7 +79340,7 @@ function writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pb function writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./buffer":455}],457:[function(require,module,exports){ +},{"./buffer":465}],467:[function(require,module,exports){ "use strict" module.exports = permutationSign @@ -76006,7 +79392,7 @@ function permutationSign(p) { return sgn } } -},{"typedarray-pool":518}],458:[function(require,module,exports){ +},{"typedarray-pool":528}],468:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -76093,7 +79479,7 @@ function unrank(n, r, p) { exports.rank = rank exports.unrank = unrank -},{"invert-permutation":272,"typedarray-pool":518}],459:[function(require,module,exports){ +},{"invert-permutation":282,"typedarray-pool":528}],469:[function(require,module,exports){ "use strict" module.exports = planarDual @@ -76224,7 +79610,7 @@ function planarDual(cells, positions) { //Combine paths and loops together return cycles } -},{"compare-angle":90}],460:[function(require,module,exports){ +},{"compare-angle":92}],470:[function(require,module,exports){ 'use strict' module.exports = trimLeaves @@ -76280,7 +79666,7 @@ function trimLeaves(edges, positions) { return [ nedges, npositions ] } -},{"edges-to-adjacency-list":109}],461:[function(require,module,exports){ +},{"edges-to-adjacency-list":119}],471:[function(require,module,exports){ 'use strict' module.exports = planarGraphToPolyline @@ -76485,7 +79871,7 @@ function planarGraphToPolyline(edges, positions) { return result } -},{"./lib/trim-leaves":460,"edges-to-adjacency-list":109,"planar-dual":459,"point-in-big-polygon":463,"robust-sum":491,"two-product":516,"uniq":520}],462:[function(require,module,exports){ +},{"./lib/trim-leaves":470,"edges-to-adjacency-list":119,"planar-dual":469,"point-in-big-polygon":473,"robust-sum":501,"two-product":526,"uniq":530}],472:[function(require,module,exports){ 'use strict'; module.exports = Point; @@ -76618,7 +80004,7 @@ Point.convert = function (a) { return a; }; -},{}],463:[function(require,module,exports){ +},{}],473:[function(require,module,exports){ module.exports = preprocessPolygon var orient = require('robust-orientation')[3] @@ -76770,7 +80156,7 @@ function preprocessPolygon(loops) { testSlab) } } -},{"binary-search-bounds":56,"interval-tree-1d":271,"robust-orientation":486,"slab-decomposition":503}],464:[function(require,module,exports){ +},{"binary-search-bounds":58,"interval-tree-1d":281,"robust-orientation":496,"slab-decomposition":513}],474:[function(require,module,exports){ //Optimized version for triangle closest point // Based on Eberly's WildMagick codes // http://www.geometrictools.com/LibMathematics/Distance/Distance.html @@ -76968,7 +80354,7 @@ function closestPoint2d(V0, V1, V2, point, result) { module.exports = closestPoint2d; -},{}],465:[function(require,module,exports){ +},{}],475:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -77150,7 +80536,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],466:[function(require,module,exports){ +},{}],476:[function(require,module,exports){ (function (global){ /*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { @@ -77687,9 +81073,9 @@ process.umask = function() { return 0; }; }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],467:[function(require,module,exports){ +},{}],477:[function(require,module,exports){ module.exports = require('gl-quat/slerp') -},{"gl-quat/slerp":212}],468:[function(require,module,exports){ +},{"gl-quat/slerp":222}],478:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -77775,7 +81161,7 @@ var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; -},{}],469:[function(require,module,exports){ +},{}],479:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -77862,13 +81248,13 @@ var objectKeys = Object.keys || function (obj) { return res; }; -},{}],470:[function(require,module,exports){ +},{}],480:[function(require,module,exports){ 'use strict'; exports.decode = exports.parse = require('./decode'); exports.encode = exports.stringify = require('./encode'); -},{"./decode":468,"./encode":469}],471:[function(require,module,exports){ +},{"./decode":478,"./encode":479}],481:[function(require,module,exports){ 'use strict'; module.exports = partialSort; @@ -77930,7 +81316,7 @@ function defaultCompare(a, b) { return a < b ? -1 : a > b ? 1 : 0; } -},{}],472:[function(require,module,exports){ +},{}],482:[function(require,module,exports){ 'use strict' var bnadd = require('big-rat/add') @@ -77946,7 +81332,7 @@ function add (a, b) { return r } -},{"big-rat/add":40}],473:[function(require,module,exports){ +},{"big-rat/add":42}],483:[function(require,module,exports){ 'use strict' module.exports = float2rat @@ -77961,7 +81347,7 @@ function float2rat(v) { return result } -},{"big-rat":43}],474:[function(require,module,exports){ +},{"big-rat":45}],484:[function(require,module,exports){ 'use strict' var rat = require('big-rat') @@ -77979,7 +81365,7 @@ function muls(a, x) { return r } -},{"big-rat":43,"big-rat/mul":52}],475:[function(require,module,exports){ +},{"big-rat":45,"big-rat/mul":54}],485:[function(require,module,exports){ 'use strict' var bnsub = require('big-rat/sub') @@ -77995,7 +81381,7 @@ function sub(a, b) { return r } -},{"big-rat/sub":54}],476:[function(require,module,exports){ +},{"big-rat/sub":56}],486:[function(require,module,exports){ 'use strict' var compareCell = require('compare-cell') @@ -78028,7 +81414,7 @@ function reduceCellComplex(cells) { return cells } -},{"cell-orientation":75,"compare-cell":91,"compare-oriented-cell":92}],477:[function(require,module,exports){ +},{"cell-orientation":77,"compare-cell":93,"compare-oriented-cell":94}],487:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -87533,7 +90919,7 @@ return wrapREGL; }))); -},{}],478:[function(require,module,exports){ +},{}],488:[function(require,module,exports){ /*! * repeat-string * @@ -87605,7 +90991,7 @@ function repeat(str, num) { return res; } -},{}],479:[function(require,module,exports){ +},{}],489:[function(require,module,exports){ // Copyright 2014 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) @@ -87654,7 +91040,7 @@ void (function(root, factory) { })); -},{}],480:[function(require,module,exports){ +},{}],490:[function(require,module,exports){ (function (global){ module.exports = global.performance && @@ -87665,7 +91051,7 @@ module.exports = } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],481:[function(require,module,exports){ +},{}],491:[function(require,module,exports){ "use strict" module.exports = compressExpansion @@ -87700,7 +91086,7 @@ function compressExpansion(e) { e.length = top return e } -},{}],482:[function(require,module,exports){ +},{}],492:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -87804,7 +91190,7 @@ return robustDeterminant") } generateDispatch() -},{"robust-compress":481,"robust-scale":488,"robust-sum":491,"two-product":516}],483:[function(require,module,exports){ +},{"robust-compress":491,"robust-scale":498,"robust-sum":501,"two-product":526}],493:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -87819,7 +91205,7 @@ function robustDotProduct(a, b) { } return r } -},{"robust-sum":491,"two-product":516}],484:[function(require,module,exports){ +},{"robust-sum":501,"two-product":526}],494:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -87987,7 +91373,7 @@ function generateInSphereTest() { } generateInSphereTest() -},{"robust-scale":488,"robust-subtract":490,"robust-sum":491,"two-product":516}],485:[function(require,module,exports){ +},{"robust-scale":498,"robust-subtract":500,"robust-sum":501,"two-product":526}],495:[function(require,module,exports){ "use strict" var determinant = require("robust-determinant") @@ -88059,7 +91445,7 @@ function generateDispatch() { } generateDispatch() -},{"robust-determinant":482}],486:[function(require,module,exports){ +},{"robust-determinant":492}],496:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -88250,7 +91636,7 @@ function generateOrientationProc() { } generateOrientationProc() -},{"robust-scale":488,"robust-subtract":490,"robust-sum":491,"two-product":516}],487:[function(require,module,exports){ +},{"robust-scale":498,"robust-subtract":500,"robust-sum":501,"two-product":526}],497:[function(require,module,exports){ "use strict" var robustSum = require("robust-sum") @@ -88280,7 +91666,7 @@ function robustProduct(a, b) { } return r } -},{"robust-scale":488,"robust-sum":491}],488:[function(require,module,exports){ +},{"robust-scale":498,"robust-sum":501}],498:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -88331,7 +91717,7 @@ function scaleLinearExpansion(e, scale) { g.length = count return g } -},{"two-product":516,"two-sum":517}],489:[function(require,module,exports){ +},{"two-product":526,"two-sum":527}],499:[function(require,module,exports){ "use strict" module.exports = segmentsIntersect @@ -88379,7 +91765,7 @@ function segmentsIntersect(a0, a1, b0, b1) { return true } -},{"robust-orientation":486}],490:[function(require,module,exports){ +},{"robust-orientation":496}],500:[function(require,module,exports){ "use strict" module.exports = robustSubtract @@ -88536,7 +91922,7 @@ function robustSubtract(e, f) { g.length = count return g } -},{}],491:[function(require,module,exports){ +},{}],501:[function(require,module,exports){ "use strict" module.exports = linearExpansionSum @@ -88693,7 +92079,7 @@ function linearExpansionSum(e, f) { g.length = count return g } -},{}],492:[function(require,module,exports){ +},{}],502:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -88948,7 +92334,7 @@ Shelf.prototype.resize = function(w) { return ShelfPack; })); -},{}],493:[function(require,module,exports){ +},{}],503:[function(require,module,exports){ "use strict" module.exports = function signum(x) { @@ -88956,7 +92342,7 @@ module.exports = function signum(x) { if(x > 0) { return 1 } return 0.0 } -},{}],494:[function(require,module,exports){ +},{}],504:[function(require,module,exports){ 'use strict' module.exports = boundary @@ -88968,7 +92354,7 @@ function boundary(cells) { return reduce(bnd(cells)) } -},{"boundary-cells":59,"reduce-simplicial-complex":476}],495:[function(require,module,exports){ +},{"boundary-cells":61,"reduce-simplicial-complex":486}],505:[function(require,module,exports){ 'use strict' module.exports = extractContour @@ -89131,7 +92517,7 @@ function extractContour(cells, values, level, d) { vertexWeights: uweights } } -},{"./lib/codegen":496,"ndarray":446,"ndarray-sort":444,"typedarray-pool":518}],496:[function(require,module,exports){ +},{"./lib/codegen":506,"ndarray":456,"ndarray-sort":454,"typedarray-pool":528}],506:[function(require,module,exports){ 'use strict' module.exports = getPolygonizer @@ -89228,7 +92614,7 @@ function getPolygonizer(d) { } return alg } -},{"marching-simplex-table":424,"typedarray-pool":518}],497:[function(require,module,exports){ +},{"marching-simplex-table":434,"typedarray-pool":528}],507:[function(require,module,exports){ "use strict"; "use restrict"; var bits = require("bit-twiddle") @@ -89572,11 +92958,11 @@ function connectedComponents(cells, vertex_count) { } exports.connectedComponents = connectedComponents -},{"bit-twiddle":57,"union-find":519}],498:[function(require,module,exports){ -arguments[4][57][0].apply(exports,arguments) -},{"dup":57}],499:[function(require,module,exports){ -arguments[4][497][0].apply(exports,arguments) -},{"bit-twiddle":498,"dup":497,"union-find":500}],500:[function(require,module,exports){ +},{"bit-twiddle":59,"union-find":529}],508:[function(require,module,exports){ +arguments[4][59][0].apply(exports,arguments) +},{"dup":59}],509:[function(require,module,exports){ +arguments[4][507][0].apply(exports,arguments) +},{"bit-twiddle":508,"dup":507,"union-find":510}],510:[function(require,module,exports){ "use strict"; "use restrict"; module.exports = UnionFind; @@ -89633,7 +93019,7 @@ UnionFind.prototype.link = function(x, y) { } -},{}],501:[function(require,module,exports){ +},{}],511:[function(require,module,exports){ "use strict" module.exports = simplifyPolygon @@ -89905,7 +93291,7 @@ function simplifyPolygon(cells, positions, minArea) { edges: ncells } } -},{"robust-orientation":486,"simplicial-complex":499}],502:[function(require,module,exports){ +},{"robust-orientation":496,"simplicial-complex":509}],512:[function(require,module,exports){ "use strict" module.exports = orderSegments @@ -90001,7 +93387,7 @@ function orderSegments(b, a) { } return ar[0] - br[0] } -},{"robust-orientation":486}],503:[function(require,module,exports){ +},{"robust-orientation":496}],513:[function(require,module,exports){ "use strict" module.exports = createSlabDecomposition @@ -90232,7 +93618,7 @@ function createSlabDecomposition(segments) { } return new SlabDecomposition(slabs, lines, horizontal) } -},{"./lib/order-segments":502,"binary-search-bounds":56,"functional-red-black-tree":117,"robust-orientation":486}],504:[function(require,module,exports){ +},{"./lib/order-segments":512,"binary-search-bounds":58,"functional-red-black-tree":127,"robust-orientation":496}],514:[function(require,module,exports){ "use strict" var robustDot = require("robust-dot-product") @@ -90324,7 +93710,7 @@ function negative(points, plane) { } return neg } -},{"robust-dot-product":483,"robust-sum":491}],505:[function(require,module,exports){ +},{"robust-dot-product":493,"robust-sum":501}],515:[function(require,module,exports){ (function(window) { var re = { not_string: /[^s]/, @@ -90534,7 +93920,7 @@ function negative(points, plane) { } })(typeof window === "undefined" ? this : window); -},{}],506:[function(require,module,exports){ +},{}],516:[function(require,module,exports){ 'use strict'; var kdbush = require('kdbush'); @@ -90868,7 +94254,7 @@ function getY(p) { return p.y; } -},{"kdbush":277}],507:[function(require,module,exports){ +},{"kdbush":287}],517:[function(require,module,exports){ 'use strict' module.exports = toSuperScript @@ -90923,7 +94309,7 @@ function toSuperScript(x) { }).join('') } -},{}],508:[function(require,module,exports){ +},{}],518:[function(require,module,exports){ "use strict" module.exports = surfaceNets @@ -91131,7 +94517,7 @@ function surfaceNets(array,level) { } return proc(array,level) } -},{"ndarray-extract-contour":435,"triangulate-hypercube":514,"zero-crossings":561}],509:[function(require,module,exports){ +},{"ndarray-extract-contour":445,"triangulate-hypercube":524,"zero-crossings":571}],519:[function(require,module,exports){ (function (process){ 'use strict' @@ -91221,7 +94607,7 @@ function textGet(font, text, opts) { } }).call(this,require('_process')) -},{"_process":465,"vectorize-text":531}],510:[function(require,module,exports){ +},{"_process":475,"vectorize-text":541}],520:[function(require,module,exports){ 'use strict'; module.exports = TinySDF; @@ -91330,7 +94716,7 @@ function edt1d(f, d, v, z, n) { } } -},{}],511:[function(require,module,exports){ +},{}],521:[function(require,module,exports){ // TinyColor v1.4.1 // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License @@ -92527,7 +95913,7 @@ else { })(Math); -},{}],512:[function(require,module,exports){ +},{}],522:[function(require,module,exports){ 'use strict' var parseUnit = require('parse-unit') @@ -92588,7 +95974,7 @@ function toPX(str, element) { } return 1 } -},{"parse-unit":453}],513:[function(require,module,exports){ +},{"parse-unit":463}],523:[function(require,module,exports){ // https://github.com/topojson/topojson-client Version 2.1.0. Copyright 2016 Mike Bostock. (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : @@ -93108,7 +96494,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); }))); -},{}],514:[function(require,module,exports){ +},{}],524:[function(require,module,exports){ "use strict" module.exports = triangulateCube @@ -93142,7 +96528,7 @@ function triangulateCube(dimension) { } return result } -},{"gamma":118,"permutation-parity":457,"permutation-rank":458}],515:[function(require,module,exports){ +},{"gamma":128,"permutation-parity":467,"permutation-rank":468}],525:[function(require,module,exports){ 'use strict' module.exports = createTurntableController @@ -93715,7 +97101,7 @@ function createTurntableController(options) { theta, phi) } -},{"filtered-vector":115,"gl-mat4/invert":162,"gl-mat4/rotate":166,"gl-vec3/cross":253,"gl-vec3/dot":254,"gl-vec3/normalize":257}],516:[function(require,module,exports){ +},{"filtered-vector":125,"gl-mat4/invert":172,"gl-mat4/rotate":176,"gl-vec3/cross":263,"gl-vec3/dot":264,"gl-vec3/normalize":267}],526:[function(require,module,exports){ "use strict" module.exports = twoProduct @@ -93749,7 +97135,7 @@ function twoProduct(a, b, result) { return [ y, x ] } -},{}],517:[function(require,module,exports){ +},{}],527:[function(require,module,exports){ "use strict" module.exports = fastTwoSum @@ -93767,7 +97153,7 @@ function fastTwoSum(a, b, result) { } return [ar+br, x] } -},{}],518:[function(require,module,exports){ +},{}],528:[function(require,module,exports){ (function (global,Buffer){ 'use strict' @@ -93984,7 +97370,7 @@ exports.clearCache = function clearCache() { } } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"bit-twiddle":57,"buffer":67,"dup":107}],519:[function(require,module,exports){ +},{"bit-twiddle":59,"buffer":69,"dup":117}],529:[function(require,module,exports){ "use strict"; "use restrict"; module.exports = UnionFind; @@ -94047,7 +97433,7 @@ proto.link = function(x, y) { ++ranks[xr]; } } -},{}],520:[function(require,module,exports){ +},{}],530:[function(require,module,exports){ "use strict" function unique_pred(list, compare) { @@ -94106,7 +97492,7 @@ function unique(list, compare, sorted) { module.exports = unique -},{}],521:[function(require,module,exports){ +},{}],531:[function(require,module,exports){ /* * Copyright (C) 2008 Apple Inc. All Rights Reserved. * @@ -94213,7 +97599,7 @@ UnitBezier.prototype.solve = function(x, epsilon) { return this.sampleCurveY(this.solveCurveX(x, epsilon)); }; -},{}],522:[function(require,module,exports){ +},{}],532:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -94947,7 +98333,7 @@ Url.prototype.parseHost = function() { if (host) this.hostname = host; }; -},{"./util":523,"punycode":466,"querystring":470}],523:[function(require,module,exports){ +},{"./util":533,"punycode":476,"querystring":480}],533:[function(require,module,exports){ 'use strict'; module.exports = { @@ -94965,7 +98351,7 @@ module.exports = { } }; -},{}],524:[function(require,module,exports){ +},{}],534:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -94990,14 +98376,14 @@ if (typeof Object.create === 'function') { } } -},{}],525:[function(require,module,exports){ +},{}],535:[function(require,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } -},{}],526:[function(require,module,exports){ +},{}],536:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -95587,12 +98973,12 @@ function hasOwnProperty(obj, prop) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":525,"_process":465,"inherits":524}],527:[function(require,module,exports){ +},{"./support/isBuffer":535,"_process":475,"inherits":534}],537:[function(require,module,exports){ module.exports.VectorTile = require('./lib/vectortile.js'); module.exports.VectorTileFeature = require('./lib/vectortilefeature.js'); module.exports.VectorTileLayer = require('./lib/vectortilelayer.js'); -},{"./lib/vectortile.js":528,"./lib/vectortilefeature.js":529,"./lib/vectortilelayer.js":530}],528:[function(require,module,exports){ +},{"./lib/vectortile.js":538,"./lib/vectortilefeature.js":539,"./lib/vectortilelayer.js":540}],538:[function(require,module,exports){ 'use strict'; var VectorTileLayer = require('./vectortilelayer'); @@ -95611,7 +98997,7 @@ function readTile(tag, layers, pbf) { } -},{"./vectortilelayer":530}],529:[function(require,module,exports){ +},{"./vectortilelayer":540}],539:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -95846,7 +99232,7 @@ function signedArea(ring) { return sum; } -},{"point-geometry":462}],530:[function(require,module,exports){ +},{"point-geometry":472}],540:[function(require,module,exports){ 'use strict'; var VectorTileFeature = require('./vectortilefeature.js'); @@ -95909,7 +99295,7 @@ VectorTileLayer.prototype.feature = function(i) { return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values); }; -},{"./vectortilefeature.js":529}],531:[function(require,module,exports){ +},{"./vectortilefeature.js":539}],541:[function(require,module,exports){ "use strict" module.exports = createText @@ -95936,7 +99322,7 @@ function createText(str, options) { options) } -},{"./lib/vtext":532}],532:[function(require,module,exports){ +},{"./lib/vtext":542}],542:[function(require,module,exports){ "use strict" module.exports = vectorizeText @@ -96142,7 +99528,7 @@ function vectorizeText(str, canvas, context, options) { return processPixels(pixels, options, size) } -},{"cdt2d":69,"clean-pslg":79,"ndarray":446,"planar-graph-to-polyline":461,"simplify-planar-graph":501,"surface-nets":508}],533:[function(require,module,exports){ +},{"cdt2d":71,"clean-pslg":81,"ndarray":456,"planar-graph-to-polyline":471,"simplify-planar-graph":511,"surface-nets":518}],543:[function(require,module,exports){ var Pbf = require('pbf') var vtpb = require('./vector-tile-pb') var GeoJSONWrapper = require('./lib/geojson_wrapper') @@ -96298,7 +99684,7 @@ function wrapValue (value) { return result } -},{"./lib/geojson_wrapper":534,"./vector-tile-pb":535,"pbf":456}],534:[function(require,module,exports){ +},{"./lib/geojson_wrapper":544,"./vector-tile-pb":545,"pbf":466}],544:[function(require,module,exports){ 'use strict' var Point = require('point-geometry') @@ -96366,7 +99752,7 @@ FeatureWrapper.prototype.bbox = function () { FeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON -},{"point-geometry":462,"vector-tile":527}],535:[function(require,module,exports){ +},{"point-geometry":472,"vector-tile":537}],545:[function(require,module,exports){ 'use strict'; // tile ======================================== @@ -96472,7 +99858,7 @@ function writeLayer(layer, pbf) { if (layer.extent !== undefined) pbf.writeVarintField(5, layer.extent); } -},{}],536:[function(require,module,exports){ +},{}],546:[function(require,module,exports){ // Copyright (C) 2011 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -97159,7 +100545,7 @@ function writeLayer(layer, pbf) { } })(); -},{}],537:[function(require,module,exports){ +},{}],547:[function(require,module,exports){ var hiddenStore = require('./hidden-store.js'); module.exports = createStore; @@ -97180,7 +100566,7 @@ function createStore() { }; } -},{"./hidden-store.js":538}],538:[function(require,module,exports){ +},{"./hidden-store.js":548}],548:[function(require,module,exports){ module.exports = hiddenStore; function hiddenStore(obj, key) { @@ -97198,7 +100584,7 @@ function hiddenStore(obj, key) { return store; } -},{}],539:[function(require,module,exports){ +},{}],549:[function(require,module,exports){ // Original - @Gozola. // https://gist.github.com/Gozala/1269991 // This is a reimplemented version (with a few bug fixes). @@ -97229,14 +100615,14 @@ function weakMap() { } } -},{"./create-store.js":537}],540:[function(require,module,exports){ +},{"./create-store.js":547}],550:[function(require,module,exports){ var getContext = require('get-canvas-context') module.exports = function getWebGLContext (opt) { return getContext('webgl', opt) } -},{"get-canvas-context":129}],541:[function(require,module,exports){ +},{"get-canvas-context":139}],551:[function(require,module,exports){ var bundleFn = arguments[3]; var sources = arguments[4]; var cache = arguments[5]; @@ -97319,12 +100705,12 @@ module.exports = function (fn, options) { return worker; }; -},{}],542:[function(require,module,exports){ +},{}],552:[function(require,module,exports){ module.exports.RADIUS = 6378137; module.exports.FLATTENING = 1/298.257223563; module.exports.POLAR_RADIUS = 6356752.3142; -},{}],543:[function(require,module,exports){ +},{}],553:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : @@ -97414,7 +100800,7 @@ exports.getMercCoords = getMercCoords; Object.defineProperty(exports, '__esModule', { value: true }); })); -},{}],544:[function(require,module,exports){ +},{}],554:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98147,7 +101533,7 @@ function toSolar(yearOrDate, monthOrResult, day, isIntercalaryOrResult, result) } -},{"../main":558,"object-assign":449}],545:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],555:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98331,7 +101717,7 @@ assign(CopticCalendar.prototype, { main.calendars.coptic = CopticCalendar; -},{"../main":558,"object-assign":449}],546:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],556:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98559,7 +101945,7 @@ var centuries = { main.calendars.discworld = DiscworldCalendar; -},{"../main":558,"object-assign":449}],547:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],557:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98743,7 +102129,7 @@ assign(EthiopianCalendar.prototype, { main.calendars.ethiopian = EthiopianCalendar; -},{"../main":558,"object-assign":449}],548:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],558:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99017,7 +102403,7 @@ function mod(a, b) { main.calendars.hebrew = HebrewCalendar; -},{"../main":558,"object-assign":449}],549:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],559:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99198,7 +102584,7 @@ assign(IslamicCalendar.prototype, { main.calendars.islamic = IslamicCalendar; -},{"../main":558,"object-assign":449}],550:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],560:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99381,7 +102767,7 @@ assign(JulianCalendar.prototype, { main.calendars.julian = JulianCalendar; -},{"../main":558,"object-assign":449}],551:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],561:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99676,7 +103062,7 @@ function amod(a, b) { main.calendars.mayan = MayanCalendar; -},{"../main":558,"object-assign":449}],552:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],562:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99856,7 +103242,7 @@ assign(NanakshahiCalendar.prototype, { main.calendars.nanakshahi = NanakshahiCalendar; -},{"../main":558,"object-assign":449}],553:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],563:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100279,7 +103665,7 @@ assign(NepaliCalendar.prototype, { main.calendars.nepali = NepaliCalendar; -},{"../main":558,"object-assign":449}],554:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],564:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100469,7 +103855,7 @@ main.calendars.persian = PersianCalendar; main.calendars.jalali = PersianCalendar; -},{"../main":558,"object-assign":449}],555:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],565:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100655,7 +104041,7 @@ assign(TaiwanCalendar.prototype, { main.calendars.taiwan = TaiwanCalendar; -},{"../main":558,"object-assign":449}],556:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],566:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100841,7 +104227,7 @@ assign(ThaiCalendar.prototype, { main.calendars.thai = ThaiCalendar; -},{"../main":558,"object-assign":449}],557:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],567:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -101206,7 +104592,7 @@ var ummalqura_dat = [ 79990]; -},{"../main":558,"object-assign":449}],558:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],568:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102111,7 +105497,7 @@ _exports.baseCalendar = BaseCalendar; _exports.calendars.gregorian = GregorianCalendar; -},{"object-assign":449}],559:[function(require,module,exports){ +},{"object-assign":459}],569:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102613,7 +105999,7 @@ assign(main.baseCalendar.prototype, { }); -},{"./main":558,"object-assign":449}],560:[function(require,module,exports){ +},{"./main":568,"object-assign":459}],570:[function(require,module,exports){ module.exports = require('cwise-compiler')({ args: ['array', { offset: [1], @@ -102665,7 +106051,7 @@ module.exports = require('cwise-compiler')({ funcName: 'zeroCrossings' }) -},{"cwise-compiler":100}],561:[function(require,module,exports){ +},{"cwise-compiler":102}],571:[function(require,module,exports){ "use strict" module.exports = findZeroCrossings @@ -102678,7 +106064,7 @@ function findZeroCrossings(array, level) { core(array.hi(array.shape[0]-1), cross, level) return cross } -},{"./lib/zc-core":560}],562:[function(require,module,exports){ +},{"./lib/zc-core":570}],572:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -102693,6 +106079,7 @@ function findZeroCrossings(array, level) { var Lib = require('../../lib'); var Color = require('../color'); var Axes = require('../../plots/cartesian/axes'); +var constants = require('../../plots/cartesian/constants'); var attributes = require('./attributes'); @@ -102711,8 +106098,7 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op if(!(visible || clickToShow)) return annOut; coerce('opacity'); - coerce('align'); - coerce('bgcolor'); + var bgColor = coerce('bgcolor'); var borderColor = coerce('bordercolor'), borderOpacity = Color.opacity(borderColor); @@ -102726,6 +106112,12 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op coerce('textangle'); Lib.coerceFont(coerce, 'font', fullLayout.font); + coerce('width'); + coerce('align'); + + var h = coerce('height'); + if(h) coerce('valign'); + // positioning var axLetters = ['x', 'y'], arrowPosDflt = [-10, -30], @@ -102784,10 +106176,23 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op annOut._yclick = (yClick === undefined) ? annOut.y : yClick; } + var hoverText = coerce('hovertext'); + if(hoverText) { + var hoverBG = coerce('hoverlabel.bgcolor', + Color.opacity(bgColor) ? Color.rgb(bgColor) : Color.defaultLine); + var hoverBorder = coerce('hoverlabel.bordercolor', Color.contrast(hoverBG)); + Lib.coerceFont(coerce, 'hoverlabel.font', { + family: constants.HOVERFONT, + size: constants.HOVERFONTSIZE, + color: hoverBorder + }); + } + coerce('captureevents', !!hoverText); + return annOut; }; -},{"../../lib":680,"../../plots/cartesian/axes":719,"../color":575,"./attributes":564}],563:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/constants":734,"../color":585,"./attributes":574}],573:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -102852,7 +106257,7 @@ module.exports = [ } ]; -},{}],564:[function(require,module,exports){ +},{}],574:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -102904,6 +106309,27 @@ module.exports = { font: extendFlat({}, fontAttrs, { description: 'Sets the annotation text font.' }), + width: { + valType: 'number', + min: 1, + dflt: null, + role: 'style', + description: [ + 'Sets an explicit width for the text box. null (default) lets the', + 'text set the box width. Wider text will be clipped.', + 'There is no automatic wrapping; use
to start a new line.' + ].join(' ') + }, + height: { + valType: 'number', + min: 1, + dflt: null, + role: 'style', + description: [ + 'Sets an explicit height for the text box. null (default) lets the', + 'text set the box height. Taller text will be clipped.' + ].join(' ') + }, opacity: { valType: 'number', min: 0, @@ -102918,10 +106344,21 @@ module.exports = { dflt: 'center', role: 'style', description: [ - 'Sets the vertical alignment of the `text` with', - 'respect to the set `x` and `y` position.', - 'Has only an effect if `text` spans more two or more lines', - '(i.e. `text` contains one or more
HTML tags).' + 'Sets the horizontal alignment of the `text` within the box.', + 'Has an effect only if `text` spans more two or more lines', + '(i.e. `text` contains one or more
HTML tags) or if an', + 'explicit width is set to override the text width.' + ].join(' ') + }, + valign: { + valType: 'enumerated', + values: ['top', 'middle', 'bottom'], + dflt: 'middle', + role: 'style', + description: [ + 'Sets the vertical alignment of the `text` within the box.', + 'Has an effect only if an explicit height is set to override', + 'the text height.' ].join(' ') }, bgcolor: { @@ -103201,6 +106638,53 @@ module.exports = { 'is `yclick` rather than the annotation\'s `y` value.' ].join(' ') }, + hovertext: { + valType: 'string', + role: 'info', + description: [ + 'Sets text to appear when hovering over this annotation.', + 'If omitted or blank, no hover label will appear.' + ].join(' ') + }, + hoverlabel: { + bgcolor: { + valType: 'color', + role: 'style', + description: [ + 'Sets the background color of the hover label.', + 'By default uses the annotation\'s `bgcolor` made opaque,', + 'or white if it was transparent.' + ].join(' ') + }, + bordercolor: { + valType: 'color', + role: 'style', + description: [ + 'Sets the border color of the hover label.', + 'By default uses either dark grey or white, for maximum', + 'contrast with `hoverlabel.bgcolor`.' + ].join(' ') + }, + font: extendFlat({}, fontAttrs, { + description: [ + 'Sets the hover label text font.', + 'By default uses the global hover font and size,', + 'with color from `hoverlabel.bordercolor`.' + ].join(' ') + }) + }, + captureevents: { + valType: 'boolean', + role: 'info', + description: [ + 'Determines whether the annotation text box captures mouse move', + 'and click events, or allows those events to pass through to data', + 'points in the plot that may be behind the annotation. By default', + '`captureevents` is *false* unless `hovertext` is provided.', + 'If you use the event `plotly_clickannotation` without `hovertext`', + 'you must explicitly enable `captureevents`.' + ].join(' ') + }, _deprecated: { ref: { @@ -103213,7 +106697,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../../plots/cartesian/constants":724,"../../plots/font_attributes":739,"./arrow_paths":563}],565:[function(require,module,exports){ +},{"../../lib/extend":682,"../../plots/cartesian/constants":734,"../../plots/font_attributes":753,"./arrow_paths":573}],575:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103308,7 +106792,7 @@ function annAutorange(gd) { }); } -},{"../../lib":680,"../../plots/cartesian/axes":719,"./draw":569}],566:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"./draw":579}],576:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103433,7 +106917,7 @@ function getToggleSets(gd, hoverData) { return {on: onSet, off: offSet, explicitOff: explicitOffSet}; } -},{"../../plotly":714}],567:[function(require,module,exports){ +},{"../../plotly":724}],577:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103496,7 +106980,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":700,"fast-isnumeric":113}],568:[function(require,module,exports){ +},{"../../lib/to_log_range":710,"fast-isnumeric":123}],578:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103521,7 +107005,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { handleArrayContainerDefaults(layoutIn, layoutOut, opts); }; -},{"../../plots/array_container_defaults":716,"./annotation_defaults":562}],569:[function(require,module,exports){ +},{"../../plots/array_container_defaults":726,"./annotation_defaults":572}],579:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103539,6 +107023,7 @@ var Plotly = require('../../plotly'); var Plots = require('../../plots/plots'); var Lib = require('../../lib'); var Axes = require('../../plots/cartesian/axes'); +var Fx = require('../../plots/cartesian/graph_interact'); var Color = require('../color'); var Drawing = require('../drawing'); var svgTextUtils = require('../../lib/svg_text_utils'); @@ -103596,9 +107081,14 @@ function drawOne(gd, index) { var optionsIn = (layout.annotations || [])[index], options = fullLayout.annotations[index]; + var annClipID = 'clip' + fullLayout._uid + '_ann' + index; + // this annotation is gone - quit now after deleting it // TODO: use d3 idioms instead of deleting and redrawing every time - if(!optionsIn || options.visible === false) return; + if(!optionsIn || options.visible === false) { + d3.selectAll('#' + annClipID).remove(); + return; + } var xa = Axes.getFromId(gd, options.xref), ya = Axes.getFromId(gd, options.yref), @@ -103615,7 +107105,16 @@ function drawOne(gd, index) { var annGroup = fullLayout._infolayer.append('g') .classed('annotation', true) .attr('data-index', String(index)) - .style('opacity', options.opacity) + .style('opacity', options.opacity); + + // another group for text+background so that they can rotate together + var annTextGroup = annGroup.append('g') + .classed('annotation-text-g', true) + .attr('data-index', String(index)); + + var annTextGroupInner = annTextGroup.append('g') + .style('pointer-events', options.captureevents ? 'all' : null) + .call(setCursor, 'default') .on('click', function() { gd._dragging = false; gd.emit('plotly_clickannotation', { @@ -103625,12 +107124,33 @@ function drawOne(gd, index) { }); }); - // another group for text+background so that they can rotate together - var annTextGroup = annGroup.append('g') - .classed('annotation-text-g', true) - .attr('data-index', String(index)); + if(options.hovertext) { + annTextGroupInner + .on('mouseover', function() { + var hoverOptions = options.hoverlabel; + var hoverFont = hoverOptions.font; + var bBox = this.getBoundingClientRect(); + var bBoxRef = gd.getBoundingClientRect(); - var annTextGroupInner = annTextGroup.append('g'); + Fx.loneHover({ + x0: bBox.left - bBoxRef.left, + x1: bBox.right - bBoxRef.left, + y: (bBox.top + bBox.bottom) / 2 - bBoxRef.top, + text: options.hovertext, + color: hoverOptions.bgcolor, + borderColor: hoverOptions.bordercolor, + fontFamily: hoverFont.family, + fontSize: hoverFont.size, + fontColor: hoverFont.color + }, { + container: fullLayout._hoverlayer.node(), + outerContainer: fullLayout._paper.node() + }); + }) + .on('mouseout', function() { + Fx.loneUnhover(fullLayout._hoverlayer.node()); + }); + } var borderwidth = options.borderwidth, borderpad = options.borderpad, @@ -103642,6 +107162,18 @@ function drawOne(gd, index) { .call(Color.stroke, options.bordercolor) .call(Color.fill, options.bgcolor); + var isSizeConstrained = options.width || options.height; + + var annTextClip = fullLayout._defs.select('.clips') + .selectAll('#' + annClipID) + .data(isSizeConstrained ? [0] : []); + + annTextClip.enter().append('clipPath') + .classed('annclip', true) + .attr('id', annClipID) + .append('rect'); + annTextClip.exit().remove(); + var font = options.font; var annText = annTextGroupInner.append('text') @@ -103668,19 +107200,21 @@ function drawOne(gd, index) { // at the end, even if their position changes annText.selectAll('tspan.line').attr({y: 0, x: 0}); - var mathjaxGroup = annTextGroupInner.select('.annotation-math-group'), - hasMathjax = !mathjaxGroup.empty(), - anntextBB = Drawing.bBox( - (hasMathjax ? mathjaxGroup : annText).node()), - annwidth = anntextBB.width, - annheight = anntextBB.height, - outerwidth = Math.round(annwidth + 2 * borderfull), - outerheight = Math.round(annheight + 2 * borderfull); + var mathjaxGroup = annTextGroupInner.select('.annotation-math-group'); + var hasMathjax = !mathjaxGroup.empty(); + var anntextBB = Drawing.bBox( + (hasMathjax ? mathjaxGroup : annText).node()); + var textWidth = anntextBB.width; + var textHeight = anntextBB.height; + var annWidth = options.width || textWidth; + var annHeight = options.height || textHeight; + var outerWidth = Math.round(annWidth + 2 * borderfull); + var outerHeight = Math.round(annHeight + 2 * borderfull); // save size in the annotation object for use by autoscale - options._w = annwidth; - options._h = annheight; + options._w = annWidth; + options._h = annHeight; function shiftFraction(v, anchor) { if(anchor === 'auto') { @@ -103705,8 +107239,8 @@ function drawOne(gd, index) { ax = Axes.getFromId(gd, axRef), dimAngle = (textangle + (axLetter === 'x' ? 0 : -90)) * Math.PI / 180, // note that these two can be either positive or negative - annSizeFromWidth = outerwidth * Math.cos(dimAngle), - annSizeFromHeight = outerheight * Math.sin(dimAngle), + annSizeFromWidth = outerWidth * Math.cos(dimAngle), + annSizeFromHeight = outerHeight * Math.sin(dimAngle), // but this one is the positive total size annSize = Math.abs(annSizeFromWidth) + Math.abs(annSizeFromHeight), anchor = options[axLetter + 'anchor'], @@ -103823,22 +107357,43 @@ function drawOne(gd, index) { return; } + var xShift = 0; + var yShift = 0; + + if(options.align !== 'left') { + xShift = (annWidth - textWidth) * (options.align === 'center' ? 0.5 : 1); + } + if(options.valign !== 'top') { + yShift = (annHeight - textHeight) * (options.valign === 'middle' ? 0.5 : 1); + } + if(hasMathjax) { - mathjaxGroup.select('svg').attr({x: borderfull - 1, y: borderfull}); + mathjaxGroup.select('svg').attr({ + x: borderfull + xShift - 1, + y: borderfull + yShift + }) + .call(Drawing.setClipUrl, isSizeConstrained ? annClipID : null); } else { - var texty = borderfull - anntextBB.top, - textx = borderfull - anntextBB.left; - annText.attr({x: textx, y: texty}); + var texty = borderfull + yShift - anntextBB.top, + textx = borderfull + xShift - anntextBB.left; + annText.attr({ + x: textx, + y: texty + }) + .call(Drawing.setClipUrl, isSizeConstrained ? annClipID : null); annText.selectAll('tspan.line').attr({y: texty, x: textx}); } + annTextClip.select('rect').call(Drawing.setRect, borderfull, borderfull, + annWidth, annHeight); + annTextBG.call(Drawing.setRect, borderwidth / 2, borderwidth / 2, - outerwidth - borderwidth, outerheight - borderwidth); + outerWidth - borderwidth, outerHeight - borderwidth); annTextGroupInner.call(Drawing.setTranslate, - Math.round(annPosPx.x.text - outerwidth / 2), - Math.round(annPosPx.y.text - outerheight / 2)); + Math.round(annPosPx.x.text - outerWidth / 2), + Math.round(annPosPx.y.text - outerHeight / 2)); /* * rotate text and background @@ -104130,7 +107685,7 @@ function lineIntersect(x1, y1, x2, y2, x3, y3, x4, y4) { return {x: x1 + a * t, y: y1 + d * t}; } -},{"../../lib":680,"../../lib/setcursor":695,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../color":575,"../dragelement":596,"../drawing":598,"./draw_arrow_head":570,"d3":104}],570:[function(require,module,exports){ +},{"../../lib":690,"../../lib/setcursor":705,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"../../plots/plots":792,"../color":585,"../dragelement":606,"../drawing":608,"./draw_arrow_head":580,"d3":114}],580:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104264,7 +107819,7 @@ module.exports = function drawArrowHead(el3, style, ends, mag, standoff) { if(doEnd) drawhead(end, endRot); }; -},{"../color":575,"../drawing":598,"./arrow_paths":563,"d3":104,"fast-isnumeric":113}],571:[function(require,module,exports){ +},{"../color":585,"../drawing":608,"./arrow_paths":573,"d3":114,"fast-isnumeric":123}],581:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104296,7 +107851,7 @@ module.exports = { convertCoords: require('./convert_coords') }; -},{"./attributes":564,"./calc_autorange":565,"./click":566,"./convert_coords":567,"./defaults":568,"./draw":569}],572:[function(require,module,exports){ +},{"./attributes":574,"./calc_autorange":575,"./click":576,"./convert_coords":577,"./defaults":578,"./draw":579}],582:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104329,7 +107884,7 @@ require('world-calendars/dist/calendars/taiwan'); require('world-calendars/dist/calendars/thai'); require('world-calendars/dist/calendars/ummalqura'); -},{"world-calendars/dist/calendars/chinese":544,"world-calendars/dist/calendars/coptic":545,"world-calendars/dist/calendars/discworld":546,"world-calendars/dist/calendars/ethiopian":547,"world-calendars/dist/calendars/hebrew":548,"world-calendars/dist/calendars/islamic":549,"world-calendars/dist/calendars/julian":550,"world-calendars/dist/calendars/mayan":551,"world-calendars/dist/calendars/nanakshahi":552,"world-calendars/dist/calendars/nepali":553,"world-calendars/dist/calendars/persian":554,"world-calendars/dist/calendars/taiwan":555,"world-calendars/dist/calendars/thai":556,"world-calendars/dist/calendars/ummalqura":557,"world-calendars/dist/main":558,"world-calendars/dist/plus":559}],573:[function(require,module,exports){ +},{"world-calendars/dist/calendars/chinese":554,"world-calendars/dist/calendars/coptic":555,"world-calendars/dist/calendars/discworld":556,"world-calendars/dist/calendars/ethiopian":557,"world-calendars/dist/calendars/hebrew":558,"world-calendars/dist/calendars/islamic":559,"world-calendars/dist/calendars/julian":560,"world-calendars/dist/calendars/mayan":561,"world-calendars/dist/calendars/nanakshahi":562,"world-calendars/dist/calendars/nepali":563,"world-calendars/dist/calendars/persian":564,"world-calendars/dist/calendars/taiwan":565,"world-calendars/dist/calendars/thai":566,"world-calendars/dist/calendars/ummalqura":567,"world-calendars/dist/main":568,"world-calendars/dist/plus":569}],583:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104588,7 +108143,7 @@ module.exports = { worldCalFmt: worldCalFmt }; -},{"../../constants/numerical":662,"../../lib":680,"./calendars":572}],574:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690,"./calendars":582}],584:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104628,7 +108183,7 @@ exports.borderLine = '#BEC8D9'; // gives back exactly lightLine if the other colors are defaults. exports.lightFraction = 100 * (0xe - 0x4) / (0xf - 0x4); -},{}],575:[function(require,module,exports){ +},{}],585:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104647,10 +108202,14 @@ var color = module.exports = {}; var colorAttrs = require('./attributes'); color.defaults = colorAttrs.defaults; -color.defaultLine = colorAttrs.defaultLine; +var defaultLine = color.defaultLine = colorAttrs.defaultLine; color.lightLine = colorAttrs.lightLine; -color.background = colorAttrs.background; +var background = color.background = colorAttrs.background; +/* + * tinyRGB: turn a tinycolor into an rgb string, but + * unlike the built-in tinycolor.toRgbString this never includes alpha + */ color.tinyRGB = function(tc) { var c = tc.toRgb(); return 'rgb(' + Math.round(c.r) + ', ' + @@ -104674,7 +108233,7 @@ color.combine = function(front, back) { var fc = tinycolor(front).toRgb(); if(fc.a === 1) return tinycolor(front).toRgbString(); - var bc = tinycolor(back || color.background).toRgb(), + var bc = tinycolor(back || background).toRgb(), bcflat = bc.a === 1 ? bc : { r: 255 * (1 - bc.a) + bc.r * bc.a, g: 255 * (1 - bc.a) + bc.g * bc.a, @@ -104688,12 +108247,22 @@ color.combine = function(front, back) { return tinycolor(fcflat).toRgbString(); }; +/* + * Create a color that contrasts with cstr. + * + * If cstr is a dark color, we lighten it; if it's light, we darken. + * + * If lightAmount / darkAmount are used, we adjust by these percentages, + * otherwise we go all the way to white or black. + */ color.contrast = function(cstr, lightAmount, darkAmount) { var tc = tinycolor(cstr); - var newColor = tc.isLight() ? - tc.darken(darkAmount) : - tc.lighten(lightAmount); + if(tc.getAlpha() !== 1) tc = tinycolor(color.combine(cstr, background)); + + var newColor = tc.isDark() ? + (lightAmount ? tc.lighten(lightAmount) : background) : + (darkAmount ? tc.darken(darkAmount) : defaultLine); return newColor.toString(); }; @@ -104785,7 +108354,7 @@ function cleanOne(val) { return 'rgb(' + rgbStr + ')'; } -},{"./attributes":574,"fast-isnumeric":113,"tinycolor2":511}],576:[function(require,module,exports){ +},{"./attributes":584,"fast-isnumeric":123,"tinycolor2":521}],586:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104981,7 +108550,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../../plots/cartesian/layout_attributes":728,"../../plots/font_attributes":739}],577:[function(require,module,exports){ +},{"../../lib/extend":682,"../../plots/cartesian/layout_attributes":740,"../../plots/font_attributes":753}],587:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105048,7 +108617,7 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) { coerce('titleside'); }; -},{"../../lib":680,"../../plots/cartesian/tick_label_defaults":734,"../../plots/cartesian/tick_mark_defaults":735,"../../plots/cartesian/tick_value_defaults":736,"./attributes":576}],578:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/tick_label_defaults":747,"../../plots/cartesian/tick_mark_defaults":748,"../../plots/cartesian/tick_value_defaults":749,"./attributes":586}],588:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105221,7 +108790,10 @@ module.exports = function draw(gd, id) { anchor: 'free', position: 1 }, - cbAxisOut = {}, + cbAxisOut = { + type: 'linear', + _id: 'y' + id + }, axisOptions = { letter: 'y', font: fullLayout.font, @@ -105239,8 +108811,6 @@ module.exports = function draw(gd, id) { handleAxisDefaults(cbAxisIn, cbAxisOut, coerce, axisOptions, fullLayout); handleAxisPositionDefaults(cbAxisIn, cbAxisOut, coerce, axisOptions); - cbAxisOut._id = 'y' + id; - // position can't go in through supplyDefaults // because that restricts it to [0,1] cbAxisOut.position = opts.x + xpadFrac + thickFrac; @@ -105680,7 +109250,7 @@ module.exports = function draw(gd, id) { return component; }; -},{"../../lib":680,"../../lib/extend":672,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_defaults":721,"../../plots/cartesian/layout_attributes":728,"../../plots/cartesian/position_defaults":731,"../../plots/plots":778,"../../registry":793,"../color":575,"../dragelement":596,"../drawing":598,"../titles":651,"./attributes":576,"d3":104,"tinycolor2":511}],579:[function(require,module,exports){ +},{"../../lib":690,"../../lib/extend":682,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_defaults":731,"../../plots/cartesian/layout_attributes":740,"../../plots/cartesian/position_defaults":743,"../../plots/plots":792,"../../registry":807,"../color":585,"../dragelement":606,"../drawing":608,"../titles":661,"./attributes":586,"d3":114,"tinycolor2":521}],589:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105699,7 +109269,7 @@ module.exports = function hasColorbar(container) { return Lib.isPlainObject(container.colorbar); }; -},{"../../lib":680}],580:[function(require,module,exports){ +},{"../../lib":690}],590:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105772,7 +109342,7 @@ module.exports = { } }; -},{}],581:[function(require,module,exports){ +},{}],591:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105851,7 +109421,7 @@ module.exports = function calc(trace, vals, containerStr, cLetter) { } }; -},{"../../lib":680,"./flip_scale":586,"./scales":593}],582:[function(require,module,exports){ +},{"../../lib":690,"./flip_scale":596,"./scales":603}],592:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105941,7 +109511,7 @@ module.exports = function makeColorScaleAttributes(context) { }; }; -},{"../../lib/extend":672,"./attributes":580,"./scales.js":593}],583:[function(require,module,exports){ +},{"../../lib/extend":682,"./attributes":590,"./scales.js":603}],593:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105957,7 +109527,7 @@ var scales = require('./scales'); module.exports = scales.RdBu; -},{"./scales":593}],584:[function(require,module,exports){ +},{"./scales":603}],594:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106021,7 +109591,7 @@ module.exports = function colorScaleDefaults(traceIn, traceOut, layout, coerce, if(showScale) colorbarDefaults(containerIn, containerOut, layout); }; -},{"../../lib":680,"../colorbar/defaults":577,"../colorbar/has_colorbar":579,"./flip_scale":586,"./is_valid_scale":590,"fast-isnumeric":113}],585:[function(require,module,exports){ +},{"../../lib":690,"../colorbar/defaults":587,"../colorbar/has_colorbar":589,"./flip_scale":596,"./is_valid_scale":600,"fast-isnumeric":123}],595:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106058,7 +109628,7 @@ module.exports = function extractScale(scl, cmin, cmax) { }; }; -},{}],586:[function(require,module,exports){ +},{}],596:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106083,7 +109653,7 @@ module.exports = function flipScale(scl) { return sclNew; }; -},{}],587:[function(require,module,exports){ +},{}],597:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106123,7 +109693,7 @@ module.exports = function getScale(scl, dflt) { return scl; }; -},{"./default_scale":583,"./is_valid_scale_array":591,"./scales":593}],588:[function(require,module,exports){ +},{"./default_scale":593,"./is_valid_scale_array":601,"./scales":603}],598:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106169,7 +109739,7 @@ module.exports = function hasColorscale(trace, containerStr) { ); }; -},{"../../lib":680,"./is_valid_scale":590,"fast-isnumeric":113}],589:[function(require,module,exports){ +},{"../../lib":690,"./is_valid_scale":600,"fast-isnumeric":123}],599:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106203,7 +109773,7 @@ exports.extractScale = require('./extract_scale'); exports.makeColorScaleFunc = require('./make_color_scale_func'); -},{"./attributes":580,"./calc":581,"./default_scale":583,"./defaults":584,"./extract_scale":585,"./flip_scale":586,"./get_scale":587,"./has_colorscale":588,"./is_valid_scale":590,"./make_color_scale_func":592,"./scales":593}],590:[function(require,module,exports){ +},{"./attributes":590,"./calc":591,"./default_scale":593,"./defaults":594,"./extract_scale":595,"./flip_scale":596,"./get_scale":597,"./has_colorscale":598,"./is_valid_scale":600,"./make_color_scale_func":602,"./scales":603}],600:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106224,7 +109794,7 @@ module.exports = function isValidScale(scl) { else return isValidScaleArray(scl); }; -},{"./is_valid_scale_array":591,"./scales":593}],591:[function(require,module,exports){ +},{"./is_valid_scale_array":601,"./scales":603}],601:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106261,7 +109831,7 @@ module.exports = function isValidScaleArray(scl) { return true; }; -},{"tinycolor2":511}],592:[function(require,module,exports){ +},{"tinycolor2":521}],602:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106357,7 +109927,7 @@ function colorArray2rbga(colorArray) { return tinycolor(colorObj).toRgbString(); } -},{"../color":575,"d3":104,"fast-isnumeric":113,"tinycolor2":511}],593:[function(require,module,exports){ +},{"../color":585,"d3":114,"fast-isnumeric":123,"tinycolor2":521}],603:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106488,7 +110058,7 @@ module.exports = { ] }; -},{}],594:[function(require,module,exports){ +},{}],604:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106521,7 +110091,7 @@ module.exports = function align(v, dv, v0, v1, anchor) { return vc; }; -},{}],595:[function(require,module,exports){ +},{}],605:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106559,7 +110129,7 @@ module.exports = function getCursor(x, y, xanchor, yanchor) { return cursorset[y][x]; }; -},{"../../lib":680}],596:[function(require,module,exports){ +},{"../../lib":690}],606:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106702,8 +110272,22 @@ dragElement.init = function init(options) { if(options.doneFn) options.doneFn(gd._dragged, numClicks, e); if(!gd._dragged) { - var e2 = document.createEvent('MouseEvents'); - e2.initEvent('click', true, true); + var e2; + + try { + e2 = new MouseEvent('click', e); + } + catch(err) { + e2 = document.createEvent('MouseEvents'); + e2.initMouseEvent('click', + e.bubbles, e.cancelable, + e.view, e.detail, + e.screenX, e.screenY, + e.clientX, e.clientY, + e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, + e.button, e.relatedTarget); + } + initialTarget.dispatchEvent(e2); } @@ -106747,7 +110331,7 @@ function finishDrag(gd) { if(gd._replotPending) Plotly.plot(gd); } -},{"../../constants/interactions":661,"../../lib":680,"../../plotly":714,"../../plots/cartesian/constants":724,"./align":594,"./cursor":595,"./unhover":597}],597:[function(require,module,exports){ +},{"../../constants/interactions":671,"../../lib":690,"../../plotly":724,"../../plots/cartesian/constants":734,"./align":604,"./cursor":605,"./unhover":607}],607:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106794,11 +110378,14 @@ unhover.raw = function unhoverRaw(gd, evt) { gd._hoverdata = undefined; if(evt.target && oldhoverdata) { - gd.emit('plotly_unhover', {points: oldhoverdata}); + gd.emit('plotly_unhover', { + event: evt, + points: oldhoverdata + }); } }; -},{"../../lib/events":671}],598:[function(require,module,exports){ +},{"../../lib/events":681}],608:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107480,7 +111067,7 @@ drawing.setPointGroupScale = function(selection, x, y) { return scale; }; -},{"../../constants/xmlns_namespaces":664,"../../lib":680,"../../lib/svg_text_utils":699,"../../registry":793,"../../traces/scatter/make_bubble_size_func":939,"../../traces/scatter/subtypes":944,"../color":575,"../colorscale":589,"./symbol_defs":599,"d3":104,"fast-isnumeric":113}],599:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":674,"../../lib":690,"../../lib/svg_text_utils":709,"../../registry":807,"../../traces/scatter/make_bubble_size_func":962,"../../traces/scatter/subtypes":967,"../color":585,"../colorscale":599,"./symbol_defs":609,"d3":114,"fast-isnumeric":123}],609:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107956,7 +111543,7 @@ module.exports = { } }; -},{"d3":104}],600:[function(require,module,exports){ +},{"d3":114}],610:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108098,7 +111685,7 @@ module.exports = { } }; -},{}],601:[function(require,module,exports){ +},{}],611:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108161,7 +111748,7 @@ function calcOneAxis(calcTrace, trace, axis, coord) { Axes.expand(axis, vals, {padded: true}); } -},{"../../plots/cartesian/axes":719,"../../registry":793,"./compute_error":602,"fast-isnumeric":113}],602:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"../../registry":807,"./compute_error":612,"fast-isnumeric":123}],612:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108257,7 +111844,7 @@ function makeComputeErrorValue(type, value) { } } -},{}],603:[function(require,module,exports){ +},{}],613:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108334,7 +111921,7 @@ module.exports = function(traceIn, traceOut, defaultColor, opts) { } }; -},{"../../lib":680,"../../registry":793,"./attributes":600,"fast-isnumeric":113}],604:[function(require,module,exports){ +},{"../../lib":690,"../../registry":807,"./attributes":610,"fast-isnumeric":123}],614:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108356,7 +111943,7 @@ errorBars.calc = require('./calc'); errorBars.calcFromTrace = function(trace, layout) { var x = trace.x || [], - y = trace.y, + y = trace.y || [], len = x.length || y.length; var calcdataMock = new Array(len); @@ -108393,7 +111980,7 @@ errorBars.hoverInfo = function(calcPoint, trace, hoverPoint) { } }; -},{"./attributes":600,"./calc":601,"./defaults":603,"./plot":605,"./style":606}],605:[function(require,module,exports){ +},{"./attributes":610,"./calc":611,"./defaults":613,"./plot":615,"./style":616}],615:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108557,7 +112144,7 @@ function errorCoords(d, xa, ya) { return out; } -},{"../../traces/scatter/subtypes":944,"d3":104,"fast-isnumeric":113}],606:[function(require,module,exports){ +},{"../../traces/scatter/subtypes":967,"d3":114,"fast-isnumeric":123}],616:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108594,7 +112181,7 @@ module.exports = function style(traces) { }); }; -},{"../color":575,"d3":104}],607:[function(require,module,exports){ +},{"../color":585,"d3":114}],617:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108763,7 +112350,7 @@ module.exports = { } }; -},{"../../plots/cartesian/constants":724}],608:[function(require,module,exports){ +},{"../../plots/cartesian/constants":734}],618:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108846,7 +112433,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":700,"fast-isnumeric":113}],609:[function(require,module,exports){ +},{"../../lib/to_log_range":710,"fast-isnumeric":123}],619:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108907,7 +112494,7 @@ function imageDefaults(imageIn, imageOut, fullLayout) { return imageOut; } -},{"../../lib":680,"../../plots/array_container_defaults":716,"../../plots/cartesian/axes":719,"./attributes":607}],610:[function(require,module,exports){ +},{"../../lib":690,"../../plots/array_container_defaults":726,"../../plots/cartesian/axes":729,"./attributes":617}],620:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109124,7 +112711,7 @@ module.exports = function draw(gd) { } }; -},{"../../constants/xmlns_namespaces":664,"../../plots/cartesian/axes":719,"../drawing":598,"d3":104}],611:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":674,"../../plots/cartesian/axes":729,"../drawing":608,"d3":114}],621:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109147,7 +112734,7 @@ module.exports = { convertCoords: require('./convert_coords') }; -},{"./attributes":607,"./convert_coords":608,"./defaults":609,"./draw":610}],612:[function(require,module,exports){ +},{"./attributes":617,"./convert_coords":618,"./defaults":619,"./draw":620}],622:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109196,7 +112783,7 @@ exports.isMiddleAnchor = function isMiddleAnchor(opts) { ); }; -},{}],613:[function(require,module,exports){ +},{}],623:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109311,7 +112898,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../../plots/font_attributes":739,"../color/attributes":574}],614:[function(require,module,exports){ +},{"../../lib/extend":682,"../../plots/font_attributes":753,"../color/attributes":584}],624:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109329,7 +112916,7 @@ module.exports = { scrollBarMargin: 4 }; -},{}],615:[function(require,module,exports){ +},{}],625:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109422,7 +113009,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) { Lib.noneOrAll(containerIn, containerOut, ['x', 'y']); }; -},{"../../lib":680,"../../plots/layout_attributes":769,"../../registry":793,"./attributes":613,"./helpers":618}],616:[function(require,module,exports){ +},{"../../lib":690,"../../plots/layout_attributes":783,"../../registry":807,"./attributes":623,"./helpers":628}],626:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110238,7 +113825,7 @@ function expandHorizontalMargin(gd) { }); } -},{"../../constants/interactions":661,"../../lib":680,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/plots":778,"../../registry":793,"../color":575,"../dragelement":596,"../drawing":598,"./anchor_utils":612,"./constants":614,"./get_legend_data":617,"./helpers":618,"./style":620,"d3":104}],617:[function(require,module,exports){ +},{"../../constants/interactions":671,"../../lib":690,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/plots":792,"../../registry":807,"../color":585,"../dragelement":606,"../drawing":608,"./anchor_utils":622,"./constants":624,"./get_legend_data":627,"./helpers":628,"./style":630,"d3":114}],627:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110343,7 +113930,7 @@ module.exports = function getLegendData(calcdata, opts) { return legendData; }; -},{"../../registry":793,"./helpers":618}],618:[function(require,module,exports){ +},{"../../registry":807,"./helpers":628}],628:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110374,7 +113961,7 @@ exports.isReversed = function isReversed(legendLayout) { return (legendLayout.traceorder || '').indexOf('reversed') !== -1; }; -},{"../../registry":793}],619:[function(require,module,exports){ +},{"../../registry":807}],629:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110398,7 +113985,7 @@ module.exports = { style: require('./style') }; -},{"./attributes":613,"./defaults":615,"./draw":616,"./style":620}],620:[function(require,module,exports){ +},{"./attributes":623,"./defaults":625,"./draw":626,"./style":630}],630:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110626,7 +114213,7 @@ function stylePies(d) { if(pts.size()) pts.call(stylePie, d[0], trace); } -},{"../../lib":680,"../../registry":793,"../../traces/pie/style_one":918,"../../traces/scatter/subtypes":944,"../color":575,"../drawing":598,"d3":104}],621:[function(require,module,exports){ +},{"../../lib":690,"../../registry":807,"../../traces/pie/style_one":932,"../../traces/scatter/subtypes":967,"../color":585,"../drawing":608,"d3":114}],631:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111148,7 +114735,7 @@ modeBarButtons.resetViews = { } }; -},{"../../../build/ploticon":2,"../../lib":680,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../../snapshot/download":795}],622:[function(require,module,exports){ +},{"../../../build/ploticon":2,"../../lib":690,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/plots":792,"../../snapshot/download":809}],632:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111162,7 +114749,7 @@ modeBarButtons.resetViews = { exports.manage = require('./manage'); -},{"./manage":623}],623:[function(require,module,exports){ +},{"./manage":633}],633:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111390,7 +114977,7 @@ function fillCustomButton(customButtons) { return customButtons; } -},{"../../plots/cartesian/axes":719,"../../traces/scatter/subtypes":944,"./buttons":621,"./modebar":624}],624:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"../../traces/scatter/subtypes":967,"./buttons":631,"./modebar":634}],634:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111680,7 +115267,7 @@ function createModeBar(gd, buttons) { module.exports = createModeBar; -},{"../../../build/ploticon":2,"../../lib":680,"d3":104}],625:[function(require,module,exports){ +},{"../../../build/ploticon":2,"../../lib":690,"d3":114}],635:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111785,7 +115372,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../../plots/font_attributes":739,"../color/attributes":574,"./button_attributes":626}],626:[function(require,module,exports){ +},{"../../lib/extend":682,"../../plots/font_attributes":753,"../color/attributes":584,"./button_attributes":636}],636:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111843,7 +115430,7 @@ module.exports = { } }; -},{}],627:[function(require,module,exports){ +},{}],637:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111872,7 +115459,7 @@ module.exports = { darkAmount: 10 }; -},{}],628:[function(require,module,exports){ +},{}],638:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111971,7 +115558,7 @@ function getPosDflt(containerOut, layout, counterAxes) { return [containerOut.domain[0], posY + constants.yPad]; } -},{"../../lib":680,"../color":575,"./attributes":625,"./button_attributes":626,"./constants":627}],629:[function(require,module,exports){ +},{"../../lib":690,"../color":585,"./attributes":635,"./button_attributes":636,"./constants":637}],639:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112246,7 +115833,7 @@ function reposition(gd, buttons, opts, axName) { }); } -},{"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/cartesian/axis_ids":722,"../../plots/plots":778,"../color":575,"../drawing":598,"../legend/anchor_utils":612,"./constants":627,"./get_update_object":630,"d3":104}],630:[function(require,module,exports){ +},{"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/cartesian/axis_ids":732,"../../plots/plots":792,"../color":585,"../drawing":608,"../legend/anchor_utils":622,"./constants":637,"./get_update_object":640,"d3":114}],640:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112303,7 +115890,7 @@ function getXRange(axisLayout, buttonLayout) { return [range0, range1]; } -},{"d3":104}],631:[function(require,module,exports){ +},{"d3":114}],641:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112330,7 +115917,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":625,"./defaults":628,"./draw":629}],632:[function(require,module,exports){ +},{"./attributes":635,"./defaults":638,"./draw":639}],642:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112415,7 +116002,7 @@ module.exports = { } }; -},{"../color/attributes":574}],633:[function(require,module,exports){ +},{"../color/attributes":584}],643:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112451,7 +116038,7 @@ module.exports = function calcAutorange(gd) { } }; -},{"../../plots/cartesian/axes":719,"./constants":634}],634:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"./constants":644}],644:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112503,7 +116090,7 @@ module.exports = { extraPad: 15 }; -},{}],635:[function(require,module,exports){ +},{}],645:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112560,7 +116147,7 @@ module.exports = function handleDefaults(layoutIn, layoutOut, axName) { containerOut._input = containerIn; }; -},{"../../lib":680,"./attributes":632}],636:[function(require,module,exports){ +},{"../../lib":690,"./attributes":642}],646:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113111,7 +116698,7 @@ function clearPushMargins(gd) { } } -},{"../../lib":680,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian":727,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../color":575,"../dragelement":596,"../drawing":598,"./constants":634,"d3":104}],637:[function(require,module,exports){ +},{"../../lib":690,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian":739,"../../plots/cartesian/axes":729,"../../plots/plots":792,"../color":585,"../dragelement":606,"../drawing":608,"./constants":644,"d3":114}],647:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113138,7 +116725,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":632,"./calc_autorange":633,"./defaults":635,"./draw":636}],638:[function(require,module,exports){ +},{"./attributes":642,"./calc_autorange":643,"./defaults":645,"./draw":646}],648:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113305,7 +116892,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../../traces/scatter/attributes":924,"../annotations/attributes":564}],639:[function(require,module,exports){ +},{"../../lib/extend":682,"../../traces/scatter/attributes":947,"../annotations/attributes":574}],649:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113382,7 +116969,7 @@ function shapeBounds(ax, v0, v1, path, paramsToUse) { if(max >= min) return [min, max]; } -},{"../../lib":680,"../../plots/cartesian/axes":719,"./constants":640,"./helpers":643}],640:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"./constants":650,"./helpers":653}],650:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113446,7 +117033,7 @@ module.exports = { } }; -},{}],641:[function(require,module,exports){ +},{}],651:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113471,7 +117058,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { handleArrayContainerDefaults(layoutIn, layoutOut, opts); }; -},{"../../plots/array_container_defaults":716,"./shape_defaults":645}],642:[function(require,module,exports){ +},{"../../plots/array_container_defaults":726,"./shape_defaults":655}],652:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113846,7 +117433,7 @@ function movePath(pathIn, moveX, moveY) { }); } -},{"../../lib":680,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian/axes":719,"../color":575,"../dragelement":596,"../drawing":598,"./constants":640,"./helpers":643}],643:[function(require,module,exports){ +},{"../../lib":690,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian/axes":729,"../color":585,"../dragelement":606,"../drawing":608,"./constants":650,"./helpers":653}],653:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113927,7 +117514,7 @@ exports.getPixelToData = function(gd, axis, isVertical) { return pixelToData; }; -},{}],644:[function(require,module,exports){ +},{}],654:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113953,7 +117540,7 @@ module.exports = { drawOne: drawModule.drawOne }; -},{"./attributes":638,"./calc_autorange":639,"./defaults":641,"./draw":642}],645:[function(require,module,exports){ +},{"./attributes":648,"./calc_autorange":649,"./defaults":651,"./draw":652}],655:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114052,7 +117639,7 @@ module.exports = function handleShapeDefaults(shapeIn, shapeOut, fullLayout, opt return shapeOut; }; -},{"../../lib":680,"../../plots/cartesian/axes":719,"./attributes":638,"./helpers":643}],646:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"./attributes":648,"./helpers":653}],656:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114326,7 +117913,7 @@ module.exports = { }, }; -},{"../../lib/extend":672,"../../plots/animation_attributes":715,"../../plots/font_attributes":739,"../../plots/pad_attributes":777,"./constants":647}],647:[function(require,module,exports){ +},{"../../lib/extend":682,"../../plots/animation_attributes":725,"../../plots/font_attributes":753,"../../plots/pad_attributes":791,"./constants":657}],657:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114423,7 +118010,7 @@ module.exports = { currentValueInset: 0, }; -},{}],648:[function(require,module,exports){ +},{}],658:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114536,7 +118123,7 @@ function stepsDefaults(sliderIn, sliderOut) { return valuesOut; } -},{"../../lib":680,"../../plots/array_container_defaults":716,"./attributes":646,"./constants":647}],649:[function(require,module,exports){ +},{"../../lib":690,"../../plots/array_container_defaults":726,"./attributes":656,"./constants":657}],659:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115138,7 +118725,7 @@ function clearPushMargins(gd) { } } -},{"../../lib/svg_text_utils":699,"../../plots/plots":778,"../color":575,"../drawing":598,"../legend/anchor_utils":612,"./constants":647,"d3":104}],650:[function(require,module,exports){ +},{"../../lib/svg_text_utils":709,"../../plots/plots":792,"../color":585,"../drawing":608,"../legend/anchor_utils":622,"./constants":657,"d3":114}],660:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115161,7 +118748,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":646,"./constants":647,"./defaults":648,"./draw":649}],651:[function(require,module,exports){ +},{"./attributes":656,"./constants":657,"./defaults":658,"./draw":659}],661:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115394,7 +118981,7 @@ Titles.draw = function(gd, titleClass, options) { el.classed('js-placeholder', isplaceholder); }; -},{"../../constants/interactions":661,"../../lib":680,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/plots":778,"../color":575,"../drawing":598,"d3":104,"fast-isnumeric":113}],652:[function(require,module,exports){ +},{"../../constants/interactions":671,"../../lib":690,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/plots":792,"../color":585,"../drawing":608,"d3":114,"fast-isnumeric":123}],662:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115567,7 +119154,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../../plots/font_attributes":739,"../../plots/pad_attributes":777,"../color/attributes":574}],653:[function(require,module,exports){ +},{"../../lib/extend":682,"../../plots/font_attributes":753,"../../plots/pad_attributes":791,"../color/attributes":584}],663:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115643,7 +119230,7 @@ module.exports = { hoverColor: '#F4FAFF' }; -},{}],654:[function(require,module,exports){ +},{}],664:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115737,7 +119324,7 @@ function buttonsDefaults(menuIn, menuOut) { return buttonsOut; } -},{"../../lib":680,"../../plots/array_container_defaults":716,"./attributes":652,"./constants":653}],655:[function(require,module,exports){ +},{"../../lib":690,"../../plots/array_container_defaults":726,"./attributes":662,"./constants":663}],665:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116417,9 +120004,9 @@ function clearPushMargins(gd) { } } -},{"../../lib/svg_text_utils":699,"../../plots/plots":778,"../color":575,"../drawing":598,"../legend/anchor_utils":612,"./constants":653,"./scrollbox":657,"d3":104}],656:[function(require,module,exports){ -arguments[4][650][0].apply(exports,arguments) -},{"./attributes":652,"./constants":653,"./defaults":654,"./draw":655,"dup":650}],657:[function(require,module,exports){ +},{"../../lib/svg_text_utils":709,"../../plots/plots":792,"../color":585,"../drawing":608,"../legend/anchor_utils":622,"./constants":663,"./scrollbox":667,"d3":114}],666:[function(require,module,exports){ +arguments[4][660][0].apply(exports,arguments) +},{"./attributes":662,"./constants":663,"./defaults":664,"./draw":665,"dup":660}],667:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116890,7 +120477,7 @@ ScrollBox.prototype.setTranslate = function setTranslate(translateX, translateY) } }; -},{"../../lib":680,"../color":575,"../drawing":598,"d3":104}],658:[function(require,module,exports){ +},{"../../lib":690,"../color":585,"../drawing":608,"d3":114}],668:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116911,7 +120498,7 @@ module.exports = { longdashdot: [8, 1, 1, 1] }; -},{}],659:[function(require,module,exports){ +},{}],669:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116932,7 +120519,7 @@ module.exports = { longdashdot: [[0.5, 0.7, 0.8, 1], 10] }; -},{}],660:[function(require,module,exports){ +},{}],670:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116955,7 +120542,7 @@ module.exports = { x: '❌' }; -},{}],661:[function(require,module,exports){ +},{}],671:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116979,7 +120566,7 @@ module.exports = { DBLCLICKDELAY: 300 }; -},{}],662:[function(require,module,exports){ +},{}],672:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117024,10 +120611,15 @@ module.exports = { * For fast conversion btwn world calendars and epoch ms, the Julian Day Number * of the unix epoch. From calendars.instance().newDate(1970, 1, 1).toJD() */ - EPOCHJD: 2440587.5 + EPOCHJD: 2440587.5, + + /* + * Are two values nearly equal? Compare to 1PPM + */ + ALMOST_EQUAL: 1 - 1e-6 }; -},{}],663:[function(require,module,exports){ +},{}],673:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117065,7 +120657,7 @@ module.exports = { }; -},{}],664:[function(require,module,exports){ +},{}],674:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117089,7 +120681,7 @@ exports.svgAttrs = { 'xmlns:xlink': exports.xlink }; -},{}],665:[function(require,module,exports){ +},{}],675:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117168,7 +120760,7 @@ exports.Queue = require('./lib/queue'); // export d3 used in the bundle exports.d3 = require('d3'); -},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":571,"./components/images":611,"./components/legend":619,"./components/rangeselector":631,"./components/rangeslider":637,"./components/shapes":644,"./components/sliders":650,"./components/updatemenus":656,"./fonts/mathjax_config":666,"./lib/queue":692,"./plot_api/plot_schema":708,"./plot_api/register":709,"./plot_api/set_plot_config":710,"./plot_api/to_image":712,"./plot_api/validate":713,"./plotly":714,"./snapshot":798,"./snapshot/download":795,"./traces/scatter":934,"d3":104,"es6-promise":110}],666:[function(require,module,exports){ +},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":581,"./components/images":621,"./components/legend":629,"./components/rangeselector":641,"./components/rangeslider":647,"./components/shapes":654,"./components/sliders":660,"./components/updatemenus":666,"./fonts/mathjax_config":676,"./lib/queue":702,"./plot_api/plot_schema":718,"./plot_api/register":719,"./plot_api/set_plot_config":720,"./plot_api/to_image":722,"./plot_api/validate":723,"./plotly":724,"./snapshot":812,"./snapshot/download":809,"./traces/scatter":957,"d3":114,"es6-promise":120}],676:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117201,7 +120793,7 @@ if(typeof MathJax !== 'undefined') { exports.MathJax = false; } -},{}],667:[function(require,module,exports){ +},{}],677:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117218,7 +120810,7 @@ module.exports = function arrayToCalcItem(traceAttr, calcItem, calcAttr, i) { if(Array.isArray(traceAttr)) calcItem[calcAttr] = traceAttr[i]; }; -},{}],668:[function(require,module,exports){ +},{}],678:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117251,7 +120843,7 @@ module.exports = function cleanNumber(v) { return BADNUM; }; -},{"../constants/numerical":662,"fast-isnumeric":113}],669:[function(require,module,exports){ +},{"../constants/numerical":672,"fast-isnumeric":123}],679:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117611,7 +121203,7 @@ exports.validate = function(value, opts) { return out !== failed; }; -},{"../components/colorscale/get_scale":587,"../components/colorscale/scales":593,"./nested_property":686,"fast-isnumeric":113,"tinycolor2":511}],670:[function(require,module,exports){ +},{"../components/colorscale/get_scale":597,"../components/colorscale/scales":603,"./nested_property":696,"fast-isnumeric":123,"tinycolor2":521}],680:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118239,7 +121831,7 @@ exports.findExactDates = function(data, calendar) { }; }; -},{"../constants/numerical":662,"../registry":793,"./loggers":683,"./mod":685,"d3":104,"fast-isnumeric":113}],671:[function(require,module,exports){ +},{"../constants/numerical":672,"../registry":807,"./loggers":693,"./mod":695,"d3":114,"fast-isnumeric":123}],681:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118405,7 +121997,7 @@ var Events = { module.exports = Events; -},{"events":111}],672:[function(require,module,exports){ +},{"events":121}],682:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118519,7 +122111,7 @@ function _extend(inputs, isDeep, keepAllKeys, noArrayCopies) { return target; } -},{"./is_plain_object.js":682}],673:[function(require,module,exports){ +},{"./is_plain_object.js":692}],683:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118570,7 +122162,7 @@ module.exports = function filterUnique(array) { return out; }; -},{}],674:[function(require,module,exports){ +},{}],684:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118601,7 +122193,7 @@ module.exports = function filterVisible(container) { return out; }; -},{}],675:[function(require,module,exports){ +},{}],685:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118663,7 +122255,7 @@ function countryNameToISO3(countryName) { return false; } -},{"../lib":680,"country-regex":97}],676:[function(require,module,exports){ +},{"../lib":690,"country-regex":99}],686:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118675,6 +122267,8 @@ function countryNameToISO3(countryName) { 'use strict'; +var BADNUM = require('../constants/numerical').BADNUM; + /** * Convert calcTrace to GeoJSON 'MultiLineString' coordinate arrays * @@ -118687,18 +122281,19 @@ function countryNameToISO3(countryName) { * */ exports.calcTraceToLineCoords = function(calcTrace) { - var trace = calcTrace[0].trace, - connectgaps = trace.connectgaps; + var trace = calcTrace[0].trace; + var connectgaps = trace.connectgaps; - var coords = [], - lineString = []; + var coords = []; + var lineString = []; for(var i = 0; i < calcTrace.length; i++) { var calcPt = calcTrace[i]; + var lonlat = calcPt.lonlat; - lineString.push(calcPt.lonlat); - - if(!connectgaps && calcPt.gapAfter && lineString.length > 0) { + if(lonlat[0] !== BADNUM) { + lineString.push(lonlat); + } else if(!connectgaps && lineString.length > 0) { coords.push(lineString); lineString = []; } @@ -118797,7 +122392,7 @@ exports.makeBlank = function() { }; }; -},{}],677:[function(require,module,exports){ +},{"../constants/numerical":672}],687:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118885,7 +122480,7 @@ function formatColor(containerIn, opacityIn, len) { module.exports = formatColor; -},{"../components/color/attributes":574,"../components/colorscale":589,"color-rgba":85,"fast-isnumeric":113}],678:[function(require,module,exports){ +},{"../components/color/attributes":584,"../components/colorscale":599,"color-rgba":87,"fast-isnumeric":123}],688:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118954,7 +122549,7 @@ function convertHTMLToUnicode(html) { module.exports = convertHTMLToUnicode; -},{"../constants/string_mappings":663,"superscript-text":507}],679:[function(require,module,exports){ +},{"../constants/string_mappings":673,"superscript-text":517}],689:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118970,7 +122565,7 @@ module.exports = convertHTMLToUnicode; module.exports = function identity(d) { return d; }; -},{}],680:[function(require,module,exports){ +},{}],690:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119610,7 +123205,7 @@ lib.numSeparate = function(value, separators, separatethousands) { return x1 + x2; }; -},{"./clean_number":668,"./coerce":669,"./dates":670,"./extend":672,"./filter_unique":673,"./filter_visible":674,"./identity":679,"./is_array":681,"./is_plain_object":682,"./loggers":683,"./matrix":684,"./mod":685,"./nested_property":686,"./noop":687,"./notifier":688,"./push_unique":691,"./relink_private":693,"./search":694,"./stats":697,"./to_log_range":700,"d3":104}],681:[function(require,module,exports){ +},{"./clean_number":678,"./coerce":679,"./dates":680,"./extend":682,"./filter_unique":683,"./filter_visible":684,"./identity":689,"./is_array":691,"./is_plain_object":692,"./loggers":693,"./matrix":694,"./mod":695,"./nested_property":696,"./noop":697,"./notifier":698,"./push_unique":701,"./relink_private":703,"./search":704,"./stats":707,"./to_log_range":710,"d3":114}],691:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119634,7 +123229,7 @@ module.exports = function isArray(a) { return Array.isArray(a) || ab.isView(a); }; -},{}],682:[function(require,module,exports){ +},{}],692:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119663,7 +123258,7 @@ module.exports = function isPlainObject(obj) { ); }; -},{}],683:[function(require,module,exports){ +},{}],693:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119737,7 +123332,7 @@ function apply(f, args) { } } -},{"../plot_api/plot_config":707}],684:[function(require,module,exports){ +},{"../plot_api/plot_config":717}],694:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119847,7 +123442,7 @@ exports.apply2DTransform2 = function(transform) { }; }; -},{}],685:[function(require,module,exports){ +},{}],695:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119867,7 +123462,7 @@ module.exports = function mod(v, d) { return out < 0 ? out + d : out; }; -},{}],686:[function(require,module,exports){ +},{}],696:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120171,7 +123766,7 @@ function badContainer(container, propStr, propParts) { }; } -},{"../plot_api/container_array_match":703,"./is_array":681,"./is_plain_object":682,"fast-isnumeric":113}],687:[function(require,module,exports){ +},{"../plot_api/container_array_match":713,"./is_array":691,"./is_plain_object":692,"fast-isnumeric":123}],697:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120187,7 +123782,7 @@ function badContainer(container, propStr, propParts) { module.exports = function noop() {}; -},{}],688:[function(require,module,exports){ +},{}],698:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120269,7 +123864,7 @@ module.exports = function(text, displayLength) { }); }; -},{"d3":104,"fast-isnumeric":113}],689:[function(require,module,exports){ +},{"d3":114,"fast-isnumeric":123}],699:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120318,7 +123913,7 @@ module.exports = function overrideCursor(el3, csr) { } }; -},{"./setcursor":695}],690:[function(require,module,exports){ +},{"./setcursor":705}],700:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120558,7 +124153,7 @@ polygon.filter = function filter(pts, tolerance) { }; }; -},{"./matrix":684}],691:[function(require,module,exports){ +},{"./matrix":694}],701:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120596,7 +124191,7 @@ module.exports = function pushUnique(array, item) { return array; }; -},{}],692:[function(require,module,exports){ +},{}],702:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120807,7 +124402,7 @@ queue.plotDo = function(gd, func, args) { module.exports = queue; -},{"../lib":680,"../plot_api/plot_config":707}],693:[function(require,module,exports){ +},{"../lib":690,"../plot_api/plot_config":717}],703:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120864,7 +124459,7 @@ module.exports = function relinkPrivateKeys(toContainer, fromContainer) { } }; -},{"./is_array":681,"./is_plain_object":682}],694:[function(require,module,exports){ +},{"./is_array":691,"./is_plain_object":692}],704:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120975,7 +124570,7 @@ exports.roundUp = function(val, arrayIn, reverse) { return arrayIn[low]; }; -},{"./loggers":683,"fast-isnumeric":113}],695:[function(require,module,exports){ +},{"./loggers":693,"fast-isnumeric":123}],705:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120998,7 +124593,7 @@ module.exports = function setCursor(el3, csr) { if(csr) el3.classed('cursor-' + csr, true); }; -},{}],696:[function(require,module,exports){ +},{}],706:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121047,7 +124642,7 @@ module.exports = function showWebGlMsg(scene) { return false; }; -},{"../components/color":575}],697:[function(require,module,exports){ +},{"../components/color":585}],707:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121143,7 +124738,7 @@ exports.interp = function(arr, n) { return frac * arr[Math.ceil(n)] + (1 - frac) * arr[Math.floor(n)]; }; -},{"fast-isnumeric":113}],698:[function(require,module,exports){ +},{"fast-isnumeric":123}],708:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121164,7 +124759,7 @@ function str2RgbaArray(color) { module.exports = str2RgbaArray; -},{"color-rgba":85}],699:[function(require,module,exports){ +},{"color-rgba":87}],709:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121705,7 +125300,7 @@ exports.makeEditable = function(context, _delegate, options) { return d3.rebind(this, dispatch, 'on'); }; -},{"../constants/string_mappings":663,"../constants/xmlns_namespaces":664,"../lib":680,"d3":104}],700:[function(require,module,exports){ +},{"../constants/string_mappings":673,"../constants/xmlns_namespaces":674,"../lib":690,"d3":114}],710:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121733,7 +125328,7 @@ module.exports = function toLogRange(val, range) { return newVal; }; -},{"fast-isnumeric":113}],701:[function(require,module,exports){ +},{"fast-isnumeric":123}],711:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121769,7 +125364,7 @@ topojsonUtils.getTopojsonFeatures = function(trace, topojson) { return topojsonFeature(topojson, obj).features; }; -},{"../plots/geo/constants":741,"topojson-client":513}],702:[function(require,module,exports){ +},{"../plots/geo/constants":755,"topojson-client":523}],712:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121803,7 +125398,7 @@ module.exports = function truncate(arrayIn, len) { throw new Error('This array type is not yet supported by `truncate`.'); }; -},{}],703:[function(require,module,exports){ +},{}],713:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121861,7 +125456,7 @@ module.exports = function containerArrayMatch(astr) { return {array: arrayStr, index: Number(match[1]), property: match[3] || ''}; }; -},{"../registry":793}],704:[function(require,module,exports){ +},{"../registry":807}],714:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122382,7 +125977,7 @@ exports.hasParent = function(aobj, attr) { return false; }; -},{"../components/color":575,"../lib":680,"../plots/cartesian/axes":719,"../plots/plots":778,"../registry":793,"fast-isnumeric":113,"gl-mat4/fromQuat":159}],705:[function(require,module,exports){ +},{"../components/color":585,"../lib":690,"../plots/cartesian/axes":729,"../plots/plots":792,"../registry":807,"fast-isnumeric":123,"gl-mat4/fromQuat":169}],715:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122595,7 +126190,7 @@ exports.applyContainerArrayChanges = function applyContainerArrayChanges(gd, np, return true; }; -},{"../lib/is_plain_object":682,"../lib/loggers":683,"../lib/nested_property":686,"../lib/noop":687,"../registry":793,"./container_array_match":703}],706:[function(require,module,exports){ +},{"../lib/is_plain_object":692,"../lib/loggers":693,"../lib/nested_property":696,"../lib/noop":697,"../registry":807,"./container_array_match":713}],716:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122630,6 +126225,8 @@ var manageArrays = require('./manage_arrays'); var helpers = require('./helpers'); var subroutines = require('./subroutines'); var cartesianConstants = require('../plots/cartesian/constants'); +var enforceAxisConstraints = require('../plots/cartesian/constraints'); +var axisIds = require('../plots/cartesian/axis_ids'); /** @@ -122749,10 +126346,6 @@ Plotly.plot = function(gd, data, layout, config) { makePlotFramework(gd); } - // save initial axis range once per graph - if(graphWasEmpty) Plotly.Axes.saveRangeInitial(gd); - - // prepare the data and find the autorange // generate calcdata, if we need to @@ -122854,18 +126447,24 @@ Plotly.plot = function(gd, data, layout, config) { return Lib.syncOrAsync([ Registry.getComponentMethod('shapes', 'calcAutorange'), Registry.getComponentMethod('annotations', 'calcAutorange'), - doAutoRange, + doAutoRangeAndConstraints, Registry.getComponentMethod('rangeslider', 'calcAutorange') ], gd); } - function doAutoRange() { + function doAutoRangeAndConstraints() { if(gd._transitioning) return; var axList = Plotly.Axes.list(gd, '', true); for(var i = 0; i < axList.length; i++) { Plotly.Axes.doAutoRange(axList[i]); } + + enforceAxisConstraints(gd); + + // store initial ranges *after* enforcing constraints, otherwise + // we will never look like we're at the initial ranges + if(graphWasEmpty) Plotly.Axes.saveRangeInitial(gd); } // draw ticks, titles, and calculate axis scaling (._b, ._m) @@ -124178,6 +127777,12 @@ function _restyle(gd, aobj, _traces) { var moduleAttrs = (contFull._module || {}).attributes || {}; var valObject = Lib.nestedProperty(moduleAttrs, ai).get() || {}; + // if restyling entire attribute container, assume worse case + if(!valObject.valType) { + flags.docalc = true; + } + + // must redo calcdata when restyling array values of arrayOk attributes if(valObject.arrayOk && (Array.isArray(newVal) || Array.isArray(oldVal))) { flags.docalc = true; } @@ -124455,6 +128060,16 @@ function _relayout(gd, aobj) { return (ax || {}).autorange; } + // for constraint enforcement: keep track of all axes (as {id: name}) + // we're editing the (auto)range of, so we can tell the others constrained + // to scale with them that it's OK for them to shrink + var rangesAltered = {}; + + function recordAlteredAxis(pleafPlus) { + var axId = axisIds.name2id(pleafPlus.split('.')[0]); + rangesAltered[axId] = 1; + } + // alter gd.layout for(var ai in aobj) { if(helpers.hasParent(aobj, ai)) { @@ -124489,15 +128104,17 @@ function _relayout(gd, aobj) { // // To do so, we must manually set them back here using the _initialAutoSize cache. if(['width', 'height'].indexOf(ai) !== -1 && vi === null) { - gd._fullLayout[ai] = gd._initialAutoSize[ai]; + fullLayout[ai] = gd._initialAutoSize[ai]; } // check autorange vs range else if(pleafPlus.match(/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/)) { doextra(ptrunk + '.autorange', false); + recordAlteredAxis(pleafPlus); } else if(pleafPlus.match(/^[xyz]axis[0-9]*\.autorange$/)) { doextra([ptrunk + '.range[0]', ptrunk + '.range[1]'], undefined); + recordAlteredAxis(pleafPlus); } else if(pleafPlus.match(/^aspectratio\.[xyz]$/)) { doextra(proot + '.aspectmode', 'manual'); @@ -124661,6 +128278,18 @@ function _relayout(gd, aobj) { else if(proot.indexOf('geo') === 0) flags.doplot = true; else if(proot.indexOf('ternary') === 0) flags.doplot = true; else if(ai === 'paper_bgcolor') flags.doplot = true; + else if(proot === 'margin' || + pp1 === 'autorange' || + pp1 === 'rangemode' || + pp1 === 'type' || + pp1 === 'domain' || + pp1 === 'fixedrange' || + pp1 === 'scaleanchor' || + pp1 === 'scaleratio' || + ai.indexOf('calendar') !== -1 || + ai.match(/^(bar|box|font)/)) { + flags.docalc = true; + } else if(fullLayout._has('gl2d') && (ai.indexOf('axis') !== -1 || ai === 'plot_bgcolor') ) flags.doplot = true; @@ -124684,15 +128313,6 @@ function _relayout(gd, aobj) { else if(ai === 'margin.pad') { flags.doticks = flags.dolayoutstyle = true; } - else if(proot === 'margin' || - pp1 === 'autorange' || - pp1 === 'rangemode' || - pp1 === 'type' || - pp1 === 'domain' || - ai.indexOf('calendar') !== -1 || - ai.match(/^(bar|box|font)/)) { - flags.docalc = true; - } /* * hovermode and dragmode don't need any redrawing, since they just * affect reaction to user input, everything else, assume full replot. @@ -124716,16 +128336,37 @@ function _relayout(gd, aobj) { if(!finished) flags.doplot = true; } - var oldWidth = gd._fullLayout.width, - oldHeight = gd._fullLayout.height; + // figure out if we need to recalculate axis constraints + var constraints = fullLayout._axisConstraintGroups; + for(var axId in rangesAltered) { + for(i = 0; i < constraints.length; i++) { + var group = constraints[i]; + if(group[axId]) { + // Always recalc if we're changing constrained ranges. + // Otherwise it's possible to violate the constraints by + // specifying arbitrary ranges for all axes in the group. + // this way some ranges may expand beyond what's specified, + // as they do at first draw, to satisfy the constraints. + flags.docalc = true; + for(var groupAxId in group) { + if(!rangesAltered[groupAxId]) { + axisIds.getFromId(gd, groupAxId)._constraintShrinkable = true; + } + } + } + } + } + + var oldWidth = fullLayout.width, + oldHeight = fullLayout.height; // calculate autosizing - if(gd.layout.autosize) Plots.plotAutoSize(gd, gd.layout, gd._fullLayout); + if(gd.layout.autosize) Plots.plotAutoSize(gd, gd.layout, fullLayout); // avoid unnecessary redraws var hasSizechanged = aobj.height || aobj.width || - (gd._fullLayout.width !== oldWidth) || - (gd._fullLayout.height !== oldHeight); + (fullLayout.width !== oldWidth) || + (fullLayout.height !== oldHeight); if(hasSizechanged) flags.docalc = true; @@ -125362,6 +129003,13 @@ Plotly.deleteFrames = function(gd, frameList) { var ops = []; var revops = []; + if(!frameList) { + frameList = []; + for(i = 0; i < _frames.length; i++) { + frameList.push(i); + } + } + frameList = frameList.slice(0); frameList.sort(); @@ -125524,7 +129172,7 @@ function makePlotFramework(gd) { gd.emit('plotly_framework'); } -},{"../components/drawing":598,"../components/errorbars":604,"../constants/xmlns_namespaces":664,"../lib":680,"../lib/events":671,"../lib/queue":692,"../lib/svg_text_utils":699,"../plotly":714,"../plots/cartesian/constants":724,"../plots/cartesian/graph_interact":726,"../plots/plots":778,"../plots/polar":781,"../registry":793,"./helpers":704,"./manage_arrays":705,"./subroutines":711,"d3":104,"fast-isnumeric":113}],707:[function(require,module,exports){ +},{"../components/drawing":608,"../components/errorbars":614,"../constants/xmlns_namespaces":674,"../lib":690,"../lib/events":681,"../lib/queue":702,"../lib/svg_text_utils":709,"../plotly":724,"../plots/cartesian/axis_ids":732,"../plots/cartesian/constants":734,"../plots/cartesian/constraints":736,"../plots/cartesian/graph_interact":738,"../plots/plots":792,"../plots/polar":795,"../registry":807,"./helpers":714,"./manage_arrays":715,"./subroutines":721,"d3":114,"fast-isnumeric":123}],717:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125650,7 +129298,7 @@ function defaultSetBackground(gd, bgColor) { } } -},{}],708:[function(require,module,exports){ +},{}],718:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126059,7 +129707,7 @@ function insertAttrs(baseAttrs, newAttrs, astr) { np.set(extendDeep(np.get() || {}, newAttrs)); } -},{"../lib":680,"../plots/animation_attributes":715,"../plots/attributes":717,"../plots/frame_attributes":740,"../plots/layout_attributes":769,"../plots/polar/area_attributes":779,"../plots/polar/axis_attributes":780,"../registry":793}],709:[function(require,module,exports){ +},{"../lib":690,"../plots/animation_attributes":725,"../plots/attributes":727,"../plots/frame_attributes":754,"../plots/layout_attributes":783,"../plots/polar/area_attributes":793,"../plots/polar/axis_attributes":794,"../registry":807}],719:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126158,7 +129806,7 @@ function registerComponentModule(newModule) { Registry.registerComponent(newModule); } -},{"../lib":680,"../registry":793}],710:[function(require,module,exports){ +},{"../lib":690,"../registry":807}],720:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126184,7 +129832,7 @@ module.exports = function setPlotConfig(configObj) { return Lib.extendFlat(Plotly.defaultConfig, configObj); }; -},{"../lib":680,"../plotly":714}],711:[function(require,module,exports){ +},{"../lib":690,"../plotly":724}],721:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126591,7 +130239,7 @@ exports.doCamera = function(gd) { } }; -},{"../components/color":575,"../components/drawing":598,"../components/modebar":622,"../components/titles":651,"../lib":680,"../plotly":714,"../plots/plots":778,"../registry":793,"d3":104}],712:[function(require,module,exports){ +},{"../components/color":585,"../components/drawing":608,"../components/modebar":632,"../components/titles":661,"../lib":690,"../plotly":724,"../plots/plots":792,"../registry":807,"d3":114}],722:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126701,7 +130349,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":680,"../plotly":714,"../snapshot/cloneplot":794,"../snapshot/helpers":797,"../snapshot/svgtoimg":799,"../snapshot/tosvg":801,"fast-isnumeric":113}],713:[function(require,module,exports){ +},{"../lib":690,"../plotly":724,"../snapshot/cloneplot":808,"../snapshot/helpers":811,"../snapshot/svgtoimg":813,"../snapshot/tosvg":815,"fast-isnumeric":123}],723:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127072,7 +130720,7 @@ function convertPathToAttributeString(path) { return astr; } -},{"../lib":680,"../plots/plots":778,"./plot_schema":708}],714:[function(require,module,exports){ +},{"../lib":690,"../plots/plots":792,"./plot_schema":718}],724:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127105,7 +130753,7 @@ exports.ModeBar = require('./components/modebar'); // plot api require('./plot_api/plot_api'); -},{"./components/modebar":622,"./plot_api/plot_api":706,"./plot_api/plot_config":707,"./plots/cartesian/axes":719,"./plots/cartesian/graph_interact":726,"./plots/plots":778}],715:[function(require,module,exports){ +},{"./components/modebar":632,"./plot_api/plot_api":716,"./plot_api/plot_config":717,"./plots/cartesian/axes":729,"./plots/cartesian/graph_interact":738,"./plots/plots":792}],725:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127229,7 +130877,7 @@ module.exports = { } }; -},{}],716:[function(require,module,exports){ +},{}],726:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127310,7 +130958,7 @@ module.exports = function handleArrayContainerDefaults(parentObjIn, parentObjOut } }; -},{"../lib":680}],717:[function(require,module,exports){ +},{"../lib":690}],727:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127420,7 +131068,7 @@ module.exports = { } }; -},{}],718:[function(require,module,exports){ +},{}],728:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127459,7 +131107,7 @@ module.exports = { } }; -},{}],719:[function(require,module,exports){ +},{}],729:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129667,7 +133315,7 @@ function swapAxisAttrs(layout, key, xFullAxes, yFullAxes) { } } -},{"../../components/color":575,"../../components/drawing":598,"../../components/titles":651,"../../constants/numerical":662,"../../lib":680,"../../lib/svg_text_utils":699,"../../registry":793,"./axis_ids":722,"./layout_attributes":728,"./layout_defaults":729,"./set_convert":733,"d3":104,"fast-isnumeric":113}],720:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"../../components/titles":661,"../../constants/numerical":672,"../../lib":690,"../../lib/svg_text_utils":709,"../../registry":807,"./axis_ids":732,"./layout_attributes":740,"./layout_defaults":741,"./set_convert":746,"d3":114,"fast-isnumeric":123}],730:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129742,7 +133390,7 @@ function category(a) { return curvecats > curvenums * 2; } -},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],721:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],731:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129767,8 +133415,6 @@ var handleTickLabelDefaults = require('./tick_label_defaults'); var handleCategoryOrderDefaults = require('./category_order_defaults'); var setConvert = require('./set_convert'); var orderedCategories = require('./ordered_categories'); -var axisIds = require('./axis_ids'); -var autoType = require('./axis_autotype'); /** @@ -129776,12 +133422,11 @@ var autoType = require('./axis_autotype'); * * letter: 'x' or 'y' * title: name of the axis (ie 'Colorbar') to go in default title - * name: axis object name (ie 'xaxis') if one should be stored * font: the default font to inherit * outerTicks: boolean, should ticks default to outside? * showGrid: boolean, should gridlines be shown by default? * noHover: boolean, this axis doesn't support hover effects? - * data: the plot data to use in choosing auto type + * data: the plot data, used to manage categories * bgColor: the plot background color, to calculate default gridline colors */ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, options, layoutOut) { @@ -129795,28 +133440,7 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, return Lib.coerce2(containerIn, containerOut, layoutAttributes, attr, dflt); } - // set up some private properties - if(options.name) { - containerOut._name = options.name; - containerOut._id = axisIds.name2id(options.name); - } - - // now figure out type and do some more initialization - var axType = coerce('type'); - if(axType === '-') { - setAutoType(containerOut, options.data); - - if(containerOut.type === '-') { - containerOut.type = 'linear'; - } - else { - // copy autoType back to input axis - // note that if this object didn't exist - // in the input layout, we have to put it in - // this happens in the main supplyDefaults function - axType = containerIn.type = containerOut.type; - } - } + var axType = containerOut.type; if(axType === 'date') { var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleDefaults'); @@ -129886,91 +133510,7 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, return containerOut; }; -function setAutoType(ax, data) { - // new logic: let people specify any type they want, - // only autotype if type is '-' - if(ax.type !== '-') return; - - var id = ax._id, - axLetter = id.charAt(0); - - // support 3d - if(id.indexOf('scene') !== -1) id = axLetter; - - var d0 = getFirstNonEmptyTrace(data, id, axLetter); - if(!d0) return; - - // first check for histograms, as the count direction - // should always default to a linear axis - if(d0.type === 'histogram' && - axLetter === {v: 'y', h: 'x'}[d0.orientation || 'v']) { - ax.type = 'linear'; - return; - } - - var calAttr = axLetter + 'calendar', - calendar = d0[calAttr]; - - // check all boxes on this x axis to see - // if they're dates, numbers, or categories - if(isBoxWithoutPositionCoords(d0, axLetter)) { - var posLetter = getBoxPosLetter(d0), - boxPositions = [], - trace; - - for(var i = 0; i < data.length; i++) { - trace = data[i]; - if(!Registry.traceIs(trace, 'box') || - (trace[axLetter + 'axis'] || axLetter) !== id) continue; - - if(trace[posLetter] !== undefined) boxPositions.push(trace[posLetter][0]); - else if(trace.name !== undefined) boxPositions.push(trace.name); - else boxPositions.push('text'); - - if(trace[calAttr] !== calendar) calendar = undefined; - } - - ax.type = autoType(boxPositions, calendar); - } - else { - ax.type = autoType(d0[axLetter] || [d0[axLetter + '0']], calendar); - } -} - -function getBoxPosLetter(trace) { - return {v: 'x', h: 'y'}[trace.orientation || 'v']; -} - -function isBoxWithoutPositionCoords(trace, axLetter) { - var posLetter = getBoxPosLetter(trace), - isBox = Registry.traceIs(trace, 'box'), - isCandlestick = Registry.traceIs(trace._fullInput || {}, 'candlestick'); - - return ( - isBox && - !isCandlestick && - axLetter === posLetter && - trace[posLetter] === undefined && - trace[posLetter + '0'] === undefined - ); -} - -function getFirstNonEmptyTrace(data, id, axLetter) { - for(var i = 0; i < data.length; i++) { - var trace = data[i]; - - if((trace[axLetter + 'axis'] || axLetter) === id) { - if(isBoxWithoutPositionCoords(trace, axLetter)) { - return trace; - } - else if((trace[axLetter] || []).length || trace[axLetter + '0']) { - return trace; - } - } - } -} - -},{"../../components/color/attributes":574,"../../lib":680,"../../registry":793,"./axis_autotype":720,"./axis_ids":722,"./category_order_defaults":723,"./layout_attributes":728,"./ordered_categories":730,"./set_convert":733,"./tick_label_defaults":734,"./tick_mark_defaults":735,"./tick_value_defaults":736,"tinycolor2":511}],722:[function(require,module,exports){ +},{"../../components/color/attributes":584,"../../lib":690,"../../registry":807,"./category_order_defaults":733,"./layout_attributes":740,"./ordered_categories":742,"./set_convert":746,"./tick_label_defaults":747,"./tick_mark_defaults":748,"./tick_value_defaults":749,"tinycolor2":521}],732:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130092,7 +133632,7 @@ exports.getFromTrace = function(gd, fullTrace, type) { return ax; }; -},{"../../lib":680,"../../registry":793,"../plots":778,"./constants":724}],723:[function(require,module,exports){ +},{"../../lib":690,"../../registry":807,"../plots":792,"./constants":734}],733:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130126,7 +133666,7 @@ module.exports = function handleCategoryOrderDefaults(containerIn, containerOut, } }; -},{}],724:[function(require,module,exports){ +},{}],734:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130196,7 +133736,222 @@ module.exports = { DFLTRANGEY: [-1, 4] }; -},{}],725:[function(require,module,exports){ +},{}],735:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Lib = require('../../lib'); +var id2name = require('./axis_ids').id2name; + + +module.exports = function handleConstraintDefaults(containerIn, containerOut, coerce, allAxisIds, layoutOut) { + var constraintGroups = layoutOut._axisConstraintGroups; + + if(containerOut.fixedrange || !containerIn.scaleanchor) return; + + var constraintOpts = getConstraintOpts(constraintGroups, containerOut._id, allAxisIds, layoutOut); + + var scaleanchor = Lib.coerce(containerIn, containerOut, { + scaleanchor: { + valType: 'enumerated', + values: constraintOpts.linkableAxes + } + }, 'scaleanchor'); + + if(scaleanchor) { + var scaleratio = coerce('scaleratio'); + // TODO: I suppose I could do attribute.min: Number.MIN_VALUE to avoid zero, + // but that seems hacky. Better way to say "must be a positive number"? + // Of course if you use several super-tiny values you could eventually + // force a product of these to zero and all hell would break loose... + // Likewise with super-huge values. + if(!scaleratio) scaleratio = containerOut.scaleratio = 1; + + updateConstraintGroups(constraintGroups, constraintOpts.thisGroup, + containerOut._id, scaleanchor, scaleratio); + } + else if(allAxisIds.indexOf(containerIn.scaleanchor) !== -1) { + Lib.warn('ignored ' + containerOut._name + '.scaleanchor: "' + + containerIn.scaleanchor + '" to avoid either an infinite loop ' + + 'and possibly inconsistent scaleratios, or because the target' + + 'axis has fixed range.'); + } +}; + +function getConstraintOpts(constraintGroups, thisID, allAxisIds, layoutOut) { + // If this axis is already part of a constraint group, we can't + // scaleanchor any other axis in that group, or we'd make a loop. + // Filter allAxisIds to enforce this, also matching axis types. + + var thisType = layoutOut[id2name(thisID)].type; + + var i, j, idj, axj; + + var linkableAxes = []; + for(j = 0; j < allAxisIds.length; j++) { + idj = allAxisIds[j]; + if(idj === thisID) continue; + + axj = layoutOut[id2name(idj)]; + if(axj.type === thisType && !axj.fixedrange) linkableAxes.push(idj); + } + + for(i = 0; i < constraintGroups.length; i++) { + if(constraintGroups[i][thisID]) { + var thisGroup = constraintGroups[i]; + + var linkableAxesNoLoops = []; + for(j = 0; j < linkableAxes.length; j++) { + idj = linkableAxes[j]; + if(!thisGroup[idj]) linkableAxesNoLoops.push(idj); + } + return {linkableAxes: linkableAxesNoLoops, thisGroup: thisGroup}; + } + } + + return {linkableAxes: linkableAxes, thisGroup: null}; +} + + +/* + * Add this axis to the axis constraint groups, which is the collection + * of axes that are all constrained together on scale. + * + * constraintGroups: a list of objects. each object is + * {axis_id: scale_within_group}, where scale_within_group is + * only important relative to the rest of the group, and defines + * the relative scales between all axes in the group + * + * thisGroup: the group the current axis is already in + * thisID: the id if the current axis + * scaleanchor: the id of the axis to scale it with + * scaleratio: the ratio of this axis to the scaleanchor axis + */ +function updateConstraintGroups(constraintGroups, thisGroup, thisID, scaleanchor, scaleratio) { + var i, j, groupi, keyj, thisGroupIndex; + + if(thisGroup === null) { + thisGroup = {}; + thisGroup[thisID] = 1; + thisGroupIndex = constraintGroups.length; + constraintGroups.push(thisGroup); + } + else { + thisGroupIndex = constraintGroups.indexOf(thisGroup); + } + + var thisGroupKeys = Object.keys(thisGroup); + + // we know that this axis isn't in any other groups, but we don't know + // about the scaleanchor axis. If it is, we need to merge the groups. + for(i = 0; i < constraintGroups.length; i++) { + groupi = constraintGroups[i]; + if(i !== thisGroupIndex && groupi[scaleanchor]) { + var baseScale = groupi[scaleanchor]; + for(j = 0; j < thisGroupKeys.length; j++) { + keyj = thisGroupKeys[j]; + groupi[keyj] = baseScale * scaleratio * thisGroup[keyj]; + } + constraintGroups.splice(thisGroupIndex, 1); + return; + } + } + + // otherwise, we insert the new scaleanchor axis as the base scale (1) + // in its group, and scale the rest of the group to it + if(scaleratio !== 1) { + for(j = 0; j < thisGroupKeys.length; j++) { + thisGroup[thisGroupKeys[j]] *= scaleratio; + } + } + thisGroup[scaleanchor] = 1; +} + +},{"../../lib":690,"./axis_ids":732}],736:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var id2name = require('./axis_ids').id2name; +var scaleZoom = require('./scale_zoom'); + +var ALMOST_EQUAL = require('../../constants/numerical').ALMOST_EQUAL; + + +module.exports = function enforceAxisConstraints(gd) { + var fullLayout = gd._fullLayout; + var constraintGroups = fullLayout._axisConstraintGroups; + + var i, j, axisID, ax, normScale; + + for(i = 0; i < constraintGroups.length; i++) { + var group = constraintGroups[i]; + var axisIDs = Object.keys(group); + + var minScale = Infinity; + var maxScale = 0; + // mostly matchScale will be the same as minScale + // ie we expand axis ranges to encompass *everything* + // that's currently in any of their ranges, but during + // autorange of a subset of axes we will ignore other + // axes for this purpose. + var matchScale = Infinity; + var normScales = {}; + var axes = {}; + + // find the (normalized) scale of each axis in the group + for(j = 0; j < axisIDs.length; j++) { + axisID = axisIDs[j]; + axes[axisID] = ax = fullLayout[id2name(axisID)]; + + // set axis scale here so we can use _m rather than + // having to calculate it from length and range + ax.setScale(); + + // abs: inverted scales still satisfy the constraint + normScales[axisID] = normScale = Math.abs(ax._m) / group[axisID]; + minScale = Math.min(minScale, normScale); + if(ax._constraintShrinkable) { + // this has served its purpose, so remove it + delete ax._constraintShrinkable; + } + else { + matchScale = Math.min(matchScale, normScale); + } + maxScale = Math.max(maxScale, normScale); + } + + // Do we have a constraint mismatch? Give a small buffer for rounding errors + if(minScale > ALMOST_EQUAL * maxScale) continue; + + // now increase any ranges we need to until all normalized scales are equal + for(j = 0; j < axisIDs.length; j++) { + axisID = axisIDs[j]; + normScale = normScales[axisID]; + + if(normScale !== matchScale) { + scaleZoom(axes[axisID], normScale / matchScale); + } + } + } +}; + +},{"../../constants/numerical":672,"./axis_ids":732,"./scale_zoom":744}],737:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130220,9 +133975,14 @@ var Drawing = require('../../components/drawing'); var setCursor = require('../../lib/setcursor'); var dragElement = require('../../components/dragelement'); -var Axes = require('./axes'); +var doTicks = require('./axes').doTicks; +var getFromId = require('./axis_ids').getFromId; var prepSelect = require('./select'); +var scaleZoom = require('./scale_zoom'); + var constants = require('./constants'); +var MINDRAG = constants.MINDRAG; +var MINZOOM = constants.MINZOOM; // flag for showing "doubleclick to zoom out" only at the beginning @@ -130245,48 +134005,71 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // dragged stores whether a drag has occurred, so we don't have to // redraw unnecessarily, ie if no move bigger than MINDRAG or MINZOOM px var fullLayout = gd._fullLayout, + zoomlayer = gd._fullLayout._zoomlayer, + isMainDrag = (ns + ew === 'nsew'), + subplots, + xa, + ya, + xs, + ys, + pw, + ph, + xActive, + yActive, + cursor, + isSubplotConstrained, + xaLinked, + yaLinked; + + function recomputeAxisLists() { + xa = [plotinfo.xaxis]; + ya = [plotinfo.yaxis]; + var xa0 = xa[0]; + var ya0 = ya[0]; + pw = xa0._length; + ph = ya0._length; + + var constraintGroups = fullLayout._axisConstraintGroups; + var xIDs = [xa0._id]; + var yIDs = [ya0._id]; + // if we're dragging two axes at once, also drag overlays - subplots = [plotinfo].concat((ns && ew) ? plotinfo.overlays : []), - xa = [plotinfo.xaxis], - ya = [plotinfo.yaxis], - pw = xa[0]._length, - ph = ya[0]._length, - MINDRAG = constants.MINDRAG, - MINZOOM = constants.MINZOOM, - isMainDrag = (ns + ew === 'nsew'); - - for(var i = 1; i < subplots.length; i++) { - var subplotXa = subplots[i].xaxis, - subplotYa = subplots[i].yaxis; - if(xa.indexOf(subplotXa) === -1) xa.push(subplotXa); - if(ya.indexOf(subplotYa) === -1) ya.push(subplotYa); - } - - function isDirectionActive(axList, activeVal) { - for(var i = 0; i < axList.length; i++) { - if(!axList[i].fixedrange) return activeVal; + subplots = [plotinfo].concat((ns && ew) ? plotinfo.overlays : []); + + for(var i = 1; i < subplots.length; i++) { + var subplotXa = subplots[i].xaxis, + subplotYa = subplots[i].yaxis; + + if(xa.indexOf(subplotXa) === -1) { + xa.push(subplotXa); + xIDs.push(subplotXa._id); + } + + if(ya.indexOf(subplotYa) === -1) { + ya.push(subplotYa); + yIDs.push(subplotYa._id); + } } - return ''; - } - var allaxes = xa.concat(ya), - xActive = isDirectionActive(xa, ew), - yActive = isDirectionActive(ya, ns), - cursor = getDragCursor(yActive + xActive, fullLayout.dragmode), - dragClass = ns + ew + 'drag'; + xActive = isDirectionActive(xa, ew); + yActive = isDirectionActive(ya, ns); + cursor = getDragCursor(yActive + xActive, fullLayout.dragmode); + xs = xa0._offset; + ys = ya0._offset; - var dragger3 = plotinfo.draglayer.selectAll('.' + dragClass).data([0]); + var links = calcLinks(constraintGroups, xIDs, yIDs); + isSubplotConstrained = links.xy; - dragger3.enter().append('rect') - .classed('drag', true) - .classed(dragClass, true) - .style({fill: 'transparent', 'stroke-width': 0}) - .attr('data-subplot', plotinfo.id); + // finally make the list of axis objects to link + xaLinked = []; + for(var xLinkID in links.x) { xaLinked.push(getFromId(gd, xLinkID)); } + yaLinked = []; + for(var yLinkID in links.y) { yaLinked.push(getFromId(gd, yLinkID)); } + } - dragger3.call(Drawing.setRect, x, y, w, h) - .call(setCursor, cursor); + recomputeAxisLists(); - var dragger = dragger3.node(); + var dragger = makeDragger(plotinfo, ns + ew + 'drag', cursor, x, y, w, h); // still need to make the element if the axes are disabled // but nuke its events (except for maindrag which needs them for hover) @@ -130301,8 +134084,6 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { element: dragger, gd: gd, plotinfo: plotinfo, - xaxes: xa, - yaxes: ya, doubleclick: doubleClick, prepFn: function(e, startX, startY) { var dragModeNow = gd._fullLayout.dragmode; @@ -130324,14 +134105,22 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { if(dragModeNow === 'zoom') { dragOptions.moveFn = zoomMove; dragOptions.doneFn = zoomDone; + + // zoomMove takes care of the threshold, but we need to + // minimize this so that constrained zoom boxes will flip + // orientation at the right place + dragOptions.minDrag = 1; + zoomPrep(e, startX, startY); } else if(dragModeNow === 'pan') { dragOptions.moveFn = plotDrag; dragOptions.doneFn = dragDone; - clearSelect(); + clearSelect(zoomlayer); } else if(isSelectOrLasso(dragModeNow)) { + dragOptions.xaxes = xa; + dragOptions.yaxes = ya; prepSelect(e, startX, startY, dragOptions, dragModeNow); } } @@ -130339,10 +134128,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { dragElement.init(dragOptions); - var zoomlayer = gd._fullLayout._zoomlayer, - xs = plotinfo.xaxis._offset, - ys = plotinfo.yaxis._offset, - x0, + var x0, y0, box, lum, @@ -130352,28 +134138,6 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { zb, corners; - function recomputeAxisLists() { - xa = [plotinfo.xaxis]; - ya = [plotinfo.yaxis]; - pw = xa[0]._length; - ph = ya[0]._length; - - for(var i = 1; i < subplots.length; i++) { - var subplotXa = subplots[i].xaxis, - subplotYa = subplots[i].yaxis; - if(xa.indexOf(subplotXa) === -1) xa.push(subplotXa); - if(ya.indexOf(subplotYa) === -1) ya.push(subplotYa); - } - allaxes = xa.concat(ya); - xActive = isDirectionActive(xa, ew); - yActive = isDirectionActive(ya, ns); - cursor = getDragCursor(yActive + xActive, fullLayout.dragmode); - xs = plotinfo.xaxis._offset; - ys = plotinfo.yaxis._offset; - dragOptions.xa = xa; - dragOptions.ya = ya; - } - function zoomPrep(e, startX, startY) { var dragBBox = dragger.getBoundingClientRect(); x0 = startX - dragBBox.left; @@ -130386,34 +134150,11 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { dimmed = false; zoomMode = 'xy'; - zb = zoomlayer.append('path') - .attr('class', 'zoombox') - .style({ - 'fill': lum > 0.2 ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0)', - 'stroke-width': 0 - }) - .attr('transform', 'translate(' + xs + ', ' + ys + ')') - .attr('d', path0 + 'Z'); + zb = makeZoombox(zoomlayer, lum, xs, ys, path0); - corners = zoomlayer.append('path') - .attr('class', 'zoombox-corners') - .style({ - fill: Color.background, - stroke: Color.defaultLine, - 'stroke-width': 1, - opacity: 0 - }) - .attr('transform', 'translate(' + xs + ', ' + ys + ')') - .attr('d', 'M0,0Z'); + corners = makeCorners(zoomlayer, xs, ys); - clearSelect(); - } - - function clearSelect() { - // until we get around to persistent selections, remove the outline - // here. The selection itself will be removed when the plot redraws - // at the end. - zoomlayer.selectAll('.select-outline').remove(); + clearSelect(zoomlayer); } function zoomMove(dx0, dy0) { @@ -130424,93 +134165,67 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { var x1 = Math.max(0, Math.min(pw, dx0 + x0)), y1 = Math.max(0, Math.min(ph, dy0 + y0)), dx = Math.abs(x1 - x0), - dy = Math.abs(y1 - y0), - clen = Math.floor(Math.min(dy, dx, MINZOOM) / 2); + dy = Math.abs(y1 - y0); box.l = Math.min(x0, x1); box.r = Math.max(x0, x1); box.t = Math.min(y0, y1); box.b = Math.max(y0, y1); + function noZoom() { + zoomMode = ''; + box.r = box.l; + box.t = box.b; + corners.attr('d', 'M0,0Z'); + } + + if(isSubplotConstrained) { + if(dx > MINZOOM || dy > MINZOOM) { + zoomMode = 'xy'; + if(dx / pw > dy / ph) { + dy = dx * ph / pw; + if(y0 > y1) box.t = y0 - dy; + else box.b = y0 + dy; + } + else { + dx = dy * pw / ph; + if(x0 > x1) box.l = x0 - dx; + else box.r = x0 + dx; + } + corners.attr('d', xyCorners(box)); + } + else { + noZoom(); + } + } // look for small drags in one direction or the other, // and only drag the other axis - if(!yActive || dy < Math.min(Math.max(dx * 0.6, MINDRAG), MINZOOM)) { + else if(!yActive || dy < Math.min(Math.max(dx * 0.6, MINDRAG), MINZOOM)) { if(dx < MINDRAG) { - zoomMode = ''; - box.r = box.l; - box.t = box.b; - corners.attr('d', 'M0,0Z'); + noZoom(); } else { box.t = 0; box.b = ph; zoomMode = 'x'; - corners.attr('d', - 'M' + (box.l - 0.5) + ',' + (y0 - MINZOOM - 0.5) + - 'h-3v' + (2 * MINZOOM + 1) + 'h3ZM' + - (box.r + 0.5) + ',' + (y0 - MINZOOM - 0.5) + - 'h3v' + (2 * MINZOOM + 1) + 'h-3Z'); + corners.attr('d', xCorners(box, y0)); } } else if(!xActive || dx < Math.min(dy * 0.6, MINZOOM)) { box.l = 0; box.r = pw; zoomMode = 'y'; - corners.attr('d', - 'M' + (x0 - MINZOOM - 0.5) + ',' + (box.t - 0.5) + - 'v-3h' + (2 * MINZOOM + 1) + 'v3ZM' + - (x0 - MINZOOM - 0.5) + ',' + (box.b + 0.5) + - 'v3h' + (2 * MINZOOM + 1) + 'v-3Z'); + corners.attr('d', yCorners(box, x0)); } else { zoomMode = 'xy'; - corners.attr('d', - 'M' + (box.l - 3.5) + ',' + (box.t - 0.5 + clen) + 'h3v' + (-clen) + - 'h' + clen + 'v-3h-' + (clen + 3) + 'ZM' + - (box.r + 3.5) + ',' + (box.t - 0.5 + clen) + 'h-3v' + (-clen) + - 'h' + (-clen) + 'v-3h' + (clen + 3) + 'ZM' + - (box.r + 3.5) + ',' + (box.b + 0.5 - clen) + 'h-3v' + clen + - 'h' + (-clen) + 'v3h' + (clen + 3) + 'ZM' + - (box.l - 3.5) + ',' + (box.b + 0.5 - clen) + 'h3v' + clen + - 'h' + clen + 'v3h-' + (clen + 3) + 'Z'); + corners.attr('d', xyCorners(box)); } box.w = box.r - box.l; box.h = box.b - box.t; - // Not sure about the addition of window.scrollX/Y... - // seems to work but doesn't seem robust. - zb.attr('d', - path0 + 'M' + (box.l) + ',' + (box.t) + 'v' + (box.h) + - 'h' + (box.w) + 'v-' + (box.h) + 'h-' + (box.w) + 'Z'); - if(!dimmed) { - zb.transition() - .style('fill', lum > 0.2 ? 'rgba(0,0,0,0.4)' : - 'rgba(255,255,255,0.3)') - .duration(200); - corners.transition() - .style('opacity', 1) - .duration(200); - dimmed = true; - } - } - - function zoomAxRanges(axList, r0Fraction, r1Fraction) { - var i, - axi, - axRangeLinear0, - axRangeLinearSpan; - - for(i = 0; i < axList.length; i++) { - axi = axList[i]; - if(axi.fixedrange) continue; - - axRangeLinear0 = axi._rl[0]; - axRangeLinearSpan = axi._rl[1] - axRangeLinear0; - axi.range = [ - axi.l2r(axRangeLinear0 + axRangeLinearSpan * r0Fraction), - axi.l2r(axRangeLinear0 + axRangeLinearSpan * r1Fraction) - ]; - } + updateZoombox(zb, corners, box, path0, dimmed, lum); + dimmed = true; } function zoomDone(dragged, numClicks) { @@ -130520,8 +134235,9 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { return removeZoombox(gd); } - if(zoomMode === 'xy' || zoomMode === 'x') zoomAxRanges(xa, box.l / pw, box.r / pw); - if(zoomMode === 'xy' || zoomMode === 'y') zoomAxRanges(ya, (ph - box.b) / ph, (ph - box.t) / ph); + // TODO: edit linked axes in zoomAxRanges and in dragTail + if(zoomMode === 'xy' || zoomMode === 'x') zoomAxRanges(xa, box.l / pw, box.r / pw, xaLinked); + if(zoomMode === 'xy' || zoomMode === 'y') zoomAxRanges(ya, (ph - box.b) / ph, (ph - box.t) / ph, yaLinked); removeZoombox(gd); dragTail(zoomMode); @@ -130553,7 +134269,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { else if(ew === 'e') hAlign = 'right'; if(gd._context.showAxisRangeEntryBoxes) { - dragger3 + d3.select(dragger) .call(svgTextUtils.makeEditable, null, { immediate: true, background: fullLayout.paper_bgcolor, @@ -130617,9 +134333,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { gbb = mainplot.draglayer.select('.nsewdrag') .node().getBoundingClientRect(), xfrac = (e.clientX - gbb.left) / gbb.width, - vbx0 = scrollViewBox[0] + scrollViewBox[2] * xfrac, yfrac = (gbb.bottom - e.clientY) / gbb.height, - vby0 = scrollViewBox[1] + scrollViewBox[3] * (1 - yfrac), i; function zoomWheelOneAxis(ax, centerFraction, zoom) { @@ -130631,15 +134345,23 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { ax.range = axRange.map(doZoom); } - if(ew) { + if(ew || isSubplotConstrained) { + // if we're only zooming this axis because of constraints, + // zoom it about the center + if(!ew) xfrac = 0.5; + for(i = 0; i < xa.length; i++) zoomWheelOneAxis(xa[i], xfrac, zoom); + scrollViewBox[2] *= zoom; - scrollViewBox[0] = vbx0 - scrollViewBox[2] * xfrac; + scrollViewBox[0] += scrollViewBox[2] * xfrac * (1 / zoom - 1); } - if(ns) { + if(ns || isSubplotConstrained) { + if(!ns) yfrac = 0.5; + for(i = 0; i < ya.length; i++) zoomWheelOneAxis(ya[i], yfrac, zoom); + scrollViewBox[3] *= zoom; - scrollViewBox[1] = vby0 - scrollViewBox[3] * (1 - yfrac); + scrollViewBox[1] += scrollViewBox[3] * (1 - yfrac) * (1 / zoom - 1); } // viewbox redraw at first @@ -130650,7 +134372,12 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // no more scrolling is coming redrawTimer = setTimeout(function() { scrollViewBox = [0, 0, pw, ph]; - dragTail(); + + var zoomMode; + if(isSubplotConstrained) zoomMode = 'xy'; + else zoomMode = (ew ? 'x' : '') + (ns ? 'y' : ''); + + dragTail(zoomMode); }, REDRAWDELAY); return Lib.pauseEvent(e); @@ -130672,18 +134399,6 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { recomputeAxisLists(); - function dragAxList(axList, pix) { - for(var i = 0; i < axList.length; i++) { - var axi = axList[i]; - if(!axi.fixedrange) { - axi.range = [ - axi.l2r(axi._rl[0] - pix / axi._m), - axi.l2r(axi._rl[1] - pix / axi._m) - ]; - } - } - } - if(xActive === 'ew' || yActive === 'ns') { if(xActive) dragAxList(xa, dx); if(yActive) dragAxList(ya, dy); @@ -130692,16 +134407,6 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { return; } - // common transform for dragging one end of an axis - // d>0 is compressing scale (cursor is over the plot, - // the axis end should move with the cursor) - // d<0 is expanding (cursor is off the plot, axis end moves - // nonlinearly so you can expand far) - function dZoom(d) { - return 1 - ((d >= 0) ? Math.min(d, 0.9) : - 1 / (1 / Math.max(d, -0.3) + 3.222)); - } - // dz: set a new value for one end (0 or 1) of an axis array axArray, // and return a pixel shift for that end for the viewbox // based on pixel drag distance d @@ -130727,6 +134432,15 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { (movedAx._rl[end] - movedAx._rl[otherEnd]); } + if(isSubplotConstrained && xActive && yActive) { + // dragging a corner of a constrained subplot: + // respect the fixed corner, but harmonize dx and dy + var dxySign = ((xActive === 'w') === (yActive === 'n')) ? 1 : -1; + var dxyFraction = (dx / pw + dxySign * dy / ph) / 2; + dx = dxyFraction * pw; + dy = dxySign * dxyFraction * ph; + } + if(xActive === 'w') dx = dz(xa, 0, dx); else if(xActive === 'e') dx = dz(xa, 1, -dx); else if(!xActive) dx = 0; @@ -130735,12 +134449,32 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { else if(yActive === 's') dy = dz(ya, 0, -dy); else if(!yActive) dy = 0; - updateSubplots([ - (xActive === 'w') ? dx : 0, - (yActive === 'n') ? dy : 0, - pw - dx, - ph - dy - ]); + var x0 = (xActive === 'w') ? dx : 0; + var y0 = (yActive === 'n') ? dy : 0; + + if(isSubplotConstrained) { + var i; + if(!xActive && yActive.length === 1) { + // dragging one end of the y axis of a constrained subplot + // scale the other axis the same about its middle + for(i = 0; i < xa.length; i++) { + xa[i].range = xa[i]._r.slice(); + scaleZoom(xa[i], 1 - dy / ph); + } + dx = dy * pw / ph; + x0 = dx / 2; + } + if(!yActive && xActive.length === 1) { + for(i = 0; i < ya.length; i++) { + ya[i].range = ya[i]._r.slice(); + scaleZoom(ya[i], 1 - dx / pw); + } + dy = dx * ph / pw; + y0 = dy / 2; + } + } + + updateSubplots([x0, y0, pw - dx, ph - dy]); ticksAndAnnotations(yActive, xActive); } @@ -130754,20 +134488,28 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { } } - if(ew) pushActiveAxIds(xa); - if(ns) pushActiveAxIds(ya); + if(ew || isSubplotConstrained) { + pushActiveAxIds(xa); + pushActiveAxIds(xaLinked); + } + if(ns || isSubplotConstrained) { + pushActiveAxIds(ya); + pushActiveAxIds(yaLinked); + } for(i = 0; i < activeAxIds.length; i++) { - Axes.doTicks(gd, activeAxIds[i], true); + doTicks(gd, activeAxIds[i], true); } - function redrawObjs(objArray, method) { + function redrawObjs(objArray, method, shortCircuit) { for(i = 0; i < objArray.length; i++) { var obji = objArray[i]; if((ew && activeAxIds.indexOf(obji.xref) !== -1) || (ns && activeAxIds.indexOf(obji.yref) !== -1)) { method(gd, i); + // once is enough for images (which doesn't use the `i` arg anyway) + if(shortCircuit) return; } } } @@ -130777,7 +134519,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { redrawObjs(fullLayout.annotations || [], Registry.getComponentMethod('annotations', 'drawOne')); redrawObjs(fullLayout.shapes || [], Registry.getComponentMethod('shapes', 'drawOne')); - redrawObjs(fullLayout.images || [], Registry.getComponentMethod('images', 'draw')); + redrawObjs(fullLayout.images || [], Registry.getComponentMethod('images', 'draw'), true); } function doubleClick() { @@ -130789,39 +134531,56 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { var ax, i, rangeInitial; + // For reset+autosize mode: + // If *any* of the main axes is not at its initial range + // (or autoranged, if we have no initial range, to match the logic in + // doubleClickConfig === 'reset' below), we reset. + // If they are *all* at their initial ranges, then we autosize. + if(doubleClickConfig === 'reset+autosize') { + + doubleClickConfig = 'autosize'; + + for(i = 0; i < axList.length; i++) { + ax = axList[i]; + if((ax._rangeInitial && ( + ax.range[0] !== ax._rangeInitial[0] || + ax.range[1] !== ax._rangeInitial[1] + )) || + (!ax._rangeInitial && !ax.autorange) + ) { + doubleClickConfig = 'reset'; + break; + } + } + } + if(doubleClickConfig === 'autosize') { + // don't set the linked axes here, so relayout marks them as shrinkable + // and we autosize just to the requested axis/axes for(i = 0; i < axList.length; i++) { ax = axList[i]; if(!ax.fixedrange) attrs[ax._name + '.autorange'] = true; } } else if(doubleClickConfig === 'reset') { - for(i = 0; i < axList.length; i++) { - ax = axList[i]; + // when we're resetting, reset all linked axes too, so we get back + // to the fully-auto-with-constraints situation + if(xActive || isSubplotConstrained) axList = axList.concat(xaLinked); + if(yActive && !isSubplotConstrained) axList = axList.concat(yaLinked); - if(!ax._rangeInitial) { - attrs[ax._name + '.autorange'] = true; - } - else { - rangeInitial = ax._rangeInitial.slice(); - attrs[ax._name + '.range[0]'] = rangeInitial[0]; - attrs[ax._name + '.range[1]'] = rangeInitial[1]; - } + if(isSubplotConstrained) { + if(!xActive) axList = axList.concat(xa); + else if(!yActive) axList = axList.concat(ya); } - } - else if(doubleClickConfig === 'reset+autosize') { + for(i = 0; i < axList.length; i++) { ax = axList[i]; - if(ax.fixedrange) continue; - if(ax._rangeInitial === undefined || - ax.range[0] === ax._rangeInitial[0] && - ax.range[1] === ax._rangeInitial[1] - ) { + if(!ax._rangeInitial) { attrs[ax._name + '.autorange'] = true; } else { - rangeInitial = ax._rangeInitial.slice(); + rangeInitial = ax._rangeInitial; attrs[ax._name + '.range[0]'] = rangeInitial[0]; attrs[ax._name + '.range[1]'] = rangeInitial[1]; } @@ -130834,18 +134593,22 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // dragTail - finish a drag event with a redraw function dragTail(zoommode) { + if(zoommode === undefined) zoommode = (ew ? 'x' : '') + (ns ? 'y' : ''); + var attrs = {}; // revert to the previous axis settings, then apply the new ones // through relayout - this lets relayout manage undo/redo - for(var i = 0; i < allaxes.length; i++) { - var axi = allaxes[i]; - if(zoommode && zoommode.indexOf(axi._id.charAt(0)) === -1) { - continue; - } + var axesToModify; + if(zoommode === 'xy') axesToModify = xa.concat(ya); + else if(zoommode === 'x') axesToModify = xa; + else if(zoommode === 'y') axesToModify = ya; + + for(var i = 0; i < axesToModify.length; i++) { + var axi = axesToModify[i]; if(axi._r[0] !== axi.range[0]) attrs[axi._name + '.range[0]'] = axi.range[0]; if(axi._r[1] !== axi.range[1]) attrs[axi._name + '.range[1]'] = axi.range[1]; - axi.range = axi._r.slice(); + axi.range = axi._input.range = axi._r.slice(); } updateSubplots([0, 0, pw, ph]); @@ -130856,71 +134619,116 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // affected by this drag, and update them. look for all plots // sharing an affected axis (including the one being dragged) function updateSubplots(viewBox) { - var j; - var plotinfos = fullLayout._plots, - subplots = Object.keys(plotinfos); + var plotinfos = fullLayout._plots; + var subplots = Object.keys(plotinfos); + var xScaleFactor = viewBox[2] / xa[0]._length; + var yScaleFactor = viewBox[3] / ya[0]._length; + var editX = ew || isSubplotConstrained; + var editY = ns || isSubplotConstrained; - for(var i = 0; i < subplots.length; i++) { + var i, xScaleFactor2, yScaleFactor2, clipDx, clipDy; + + // Find the appropriate scaling for this axis, if it's linked to the + // dragged axes by constraints. 0 is special, it means this axis shouldn't + // ever be scaled (will be converted to 1 if the other axis is scaled) + function getLinkedScaleFactor(ax) { + if(ax.fixedrange) return 0; + + if(editX && xaLinked.indexOf(ax) !== -1) { + return xScaleFactor; + } + if(editY && (isSubplotConstrained ? xaLinked : yaLinked).indexOf(ax) !== -1) { + return yScaleFactor; + } + return 0; + } + + function scaleAndGetShift(ax, scaleFactor) { + if(scaleFactor) { + ax.range = ax._r.slice(); + scaleZoom(ax, scaleFactor); + return ax._length * (1 - scaleFactor) / 2; + } + return 0; + } + + for(i = 0; i < subplots.length; i++) { var subplot = plotinfos[subplots[i]], xa2 = subplot.xaxis, ya2 = subplot.yaxis, - editX = ew && !xa2.fixedrange, - editY = ns && !ya2.fixedrange; - - if(editX) { - var isInX = false; - for(j = 0; j < xa.length; j++) { - if(xa[j]._id === xa2._id) { - isInX = true; - break; - } - } - editX = editX && isInX; - } + editX2 = editX && !xa2.fixedrange && (xa.indexOf(xa2) !== -1), + editY2 = editY && !ya2.fixedrange && (ya.indexOf(ya2) !== -1); - if(editY) { - var isInY = false; - for(j = 0; j < ya.length; j++) { - if(ya[j]._id === ya2._id) { - isInY = true; - break; - } - } - editY = editY && isInY; + if(editX2) { + xScaleFactor2 = xScaleFactor; + clipDx = viewBox[0]; + } + else { + xScaleFactor2 = getLinkedScaleFactor(xa2); + clipDx = scaleAndGetShift(xa2, xScaleFactor2); } - var xScaleFactor = editX ? xa2._length / viewBox[2] : 1, - yScaleFactor = editY ? ya2._length / viewBox[3] : 1; + if(editY2) { + yScaleFactor2 = yScaleFactor; + clipDy = viewBox[1]; + } + else { + yScaleFactor2 = getLinkedScaleFactor(ya2); + clipDy = scaleAndGetShift(ya2, yScaleFactor2); + } - var clipDx = editX ? viewBox[0] : 0, - clipDy = editY ? viewBox[1] : 0; + // don't scale at all if neither axis is scalable here + if(!xScaleFactor2 && !yScaleFactor2) continue; - var fracDx = editX ? (viewBox[0] / viewBox[2] * xa2._length) : 0, - fracDy = editY ? (viewBox[1] / viewBox[3] * ya2._length) : 0; + // but if only one is, reset the other axis scaling + if(!xScaleFactor2) xScaleFactor2 = 1; + if(!yScaleFactor2) yScaleFactor2 = 1; - var plotDx = xa2._offset - fracDx, - plotDy = ya2._offset - fracDy; + var plotDx = xa2._offset - clipDx / xScaleFactor2, + plotDy = ya2._offset - clipDy / yScaleFactor2; fullLayout._defs.selectAll('#' + subplot.clipId) .call(Drawing.setTranslate, clipDx, clipDy) - .call(Drawing.setScale, 1 / xScaleFactor, 1 / yScaleFactor); + .call(Drawing.setScale, xScaleFactor2, yScaleFactor2); subplot.plot .call(Drawing.setTranslate, plotDx, plotDy) - .call(Drawing.setScale, xScaleFactor, yScaleFactor) + .call(Drawing.setScale, 1 / xScaleFactor2, 1 / yScaleFactor2) // This is specifically directed at scatter traces, applying an inverse // scale to individual points to counteract the scale of the trace // as a whole: .select('.scatterlayer').selectAll('.points').selectAll('.point') - .call(Drawing.setPointGroupScale, 1 / xScaleFactor, 1 / yScaleFactor); + .call(Drawing.setPointGroupScale, xScaleFactor2, yScaleFactor2); } } return dragger; }; +function makeDragger(plotinfo, dragClass, cursor, x, y, w, h) { + var dragger3 = plotinfo.draglayer.selectAll('.' + dragClass).data([0]); + + dragger3.enter().append('rect') + .classed('drag', true) + .classed(dragClass, true) + .style({fill: 'transparent', 'stroke-width': 0}) + .attr('data-subplot', plotinfo.id); + + dragger3.call(Drawing.setRect, x, y, w, h) + .call(setCursor, cursor); + + return dragger3.node(); +} + +function isDirectionActive(axList, activeVal) { + for(var i = 0; i < axList.length; i++) { + if(!axList[i].fixedrange) return activeVal; + } + return ''; +} + function getEndText(ax, end) { var initialVal = ax.range[end], diff = Math.abs(initialVal - ax.range[1 - end]), @@ -130942,6 +134750,54 @@ function getEndText(ax, end) { } } +function zoomAxRanges(axList, r0Fraction, r1Fraction, linkedAxes) { + var i, + axi, + axRangeLinear0, + axRangeLinearSpan; + + for(i = 0; i < axList.length; i++) { + axi = axList[i]; + if(axi.fixedrange) continue; + + axRangeLinear0 = axi._rl[0]; + axRangeLinearSpan = axi._rl[1] - axRangeLinear0; + axi.range = [ + axi.l2r(axRangeLinear0 + axRangeLinearSpan * r0Fraction), + axi.l2r(axRangeLinear0 + axRangeLinearSpan * r1Fraction) + ]; + } + + // zoom linked axes about their centers + if(linkedAxes && linkedAxes.length) { + var linkedR0Fraction = (r0Fraction + (1 - r1Fraction)) / 2; + + zoomAxRanges(linkedAxes, linkedR0Fraction, 1 - linkedR0Fraction); + } +} + +function dragAxList(axList, pix) { + for(var i = 0; i < axList.length; i++) { + var axi = axList[i]; + if(!axi.fixedrange) { + axi.range = [ + axi.l2r(axi._rl[0] - pix / axi._m), + axi.l2r(axi._rl[1] - pix / axi._m) + ]; + } + } +} + +// common transform for dragging one end of an axis +// d>0 is compressing scale (cursor is over the plot, +// the axis end should move with the cursor) +// d<0 is expanding (cursor is off the plot, axis end moves +// nonlinearly so you can expand far) +function dZoom(d) { + return 1 - ((d >= 0) ? Math.min(d, 0.9) : + 1 / (1 / Math.max(d, -0.3) + 3.222)); +} + function getDragCursor(nsew, dragmode) { if(!nsew) return 'pointer'; if(nsew === 'nsew') { @@ -130951,6 +134807,52 @@ function getDragCursor(nsew, dragmode) { return nsew.toLowerCase() + '-resize'; } +function makeZoombox(zoomlayer, lum, xs, ys, path0) { + return zoomlayer.append('path') + .attr('class', 'zoombox') + .style({ + 'fill': lum > 0.2 ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0)', + 'stroke-width': 0 + }) + .attr('transform', 'translate(' + xs + ', ' + ys + ')') + .attr('d', path0 + 'Z'); +} + +function makeCorners(zoomlayer, xs, ys) { + return zoomlayer.append('path') + .attr('class', 'zoombox-corners') + .style({ + fill: Color.background, + stroke: Color.defaultLine, + 'stroke-width': 1, + opacity: 0 + }) + .attr('transform', 'translate(' + xs + ', ' + ys + ')') + .attr('d', 'M0,0Z'); +} + +function clearSelect(zoomlayer) { + // until we get around to persistent selections, remove the outline + // here. The selection itself will be removed when the plot redraws + // at the end. + zoomlayer.selectAll('.select-outline').remove(); +} + +function updateZoombox(zb, corners, box, path0, dimmed, lum) { + zb.attr('d', + path0 + 'M' + (box.l) + ',' + (box.t) + 'v' + (box.h) + + 'h' + (box.w) + 'v-' + (box.h) + 'h-' + (box.w) + 'Z'); + if(!dimmed) { + zb.transition() + .style('fill', lum > 0.2 ? 'rgba(0,0,0,0.4)' : + 'rgba(255,255,255,0.3)') + .duration(200); + corners.transition() + .style('opacity', 1) + .duration(200); + } +} + function removeZoombox(gd) { d3.select(gd) .selectAll('.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners') @@ -130963,7 +134865,91 @@ function isSelectOrLasso(dragmode) { return modes.indexOf(dragmode) !== -1; } -},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../lib":680,"../../lib/setcursor":695,"../../lib/svg_text_utils":699,"../../plotly":714,"../../registry":793,"./axes":719,"./constants":724,"./select":732,"d3":104,"tinycolor2":511}],726:[function(require,module,exports){ +function xCorners(box, y0) { + return 'M' + + (box.l - 0.5) + ',' + (y0 - MINZOOM - 0.5) + + 'h-3v' + (2 * MINZOOM + 1) + 'h3ZM' + + (box.r + 0.5) + ',' + (y0 - MINZOOM - 0.5) + + 'h3v' + (2 * MINZOOM + 1) + 'h-3Z'; +} + +function yCorners(box, x0) { + return 'M' + + (x0 - MINZOOM - 0.5) + ',' + (box.t - 0.5) + + 'v-3h' + (2 * MINZOOM + 1) + 'v3ZM' + + (x0 - MINZOOM - 0.5) + ',' + (box.b + 0.5) + + 'v3h' + (2 * MINZOOM + 1) + 'v-3Z'; +} + +function xyCorners(box) { + var clen = Math.floor(Math.min(box.b - box.t, box.r - box.l, MINZOOM) / 2); + return 'M' + + (box.l - 3.5) + ',' + (box.t - 0.5 + clen) + 'h3v' + (-clen) + + 'h' + clen + 'v-3h-' + (clen + 3) + 'ZM' + + (box.r + 3.5) + ',' + (box.t - 0.5 + clen) + 'h-3v' + (-clen) + + 'h' + (-clen) + 'v-3h' + (clen + 3) + 'ZM' + + (box.r + 3.5) + ',' + (box.b + 0.5 - clen) + 'h-3v' + clen + + 'h' + (-clen) + 'v3h' + (clen + 3) + 'ZM' + + (box.l - 3.5) + ',' + (box.b + 0.5 - clen) + 'h3v' + clen + + 'h' + clen + 'v3h-' + (clen + 3) + 'Z'; +} + +function calcLinks(constraintGroups, xIDs, yIDs) { + var isSubplotConstrained = false; + var xLinks = {}; + var yLinks = {}; + var i, j, k; + + var group, xLinkID, yLinkID; + for(i = 0; i < constraintGroups.length; i++) { + group = constraintGroups[i]; + // check if any of the x axes we're dragging is in this constraint group + for(j = 0; j < xIDs.length; j++) { + if(group[xIDs[j]]) { + // put the rest of these axes into xLinks, if we're not already + // dragging them, so we know to scale these axes automatically too + // to match the changes in the dragged x axes + for(xLinkID in group) { + if((xLinkID.charAt(0) === 'x' ? xIDs : yIDs).indexOf(xLinkID) === -1) { + xLinks[xLinkID] = 1; + } + } + + // check if the x and y axes of THIS drag are linked + for(k = 0; k < yIDs.length; k++) { + if(group[yIDs[k]]) isSubplotConstrained = true; + } + } + } + + // now check if any of the y axes we're dragging is in this constraint group + // only look for outside links, as we've already checked for links within the dragger + for(j = 0; j < yIDs.length; j++) { + if(group[yIDs[j]]) { + for(yLinkID in group) { + if((yLinkID.charAt(0) === 'x' ? xIDs : yIDs).indexOf(yLinkID) === -1) { + yLinks[yLinkID] = 1; + } + } + } + } + } + + if(isSubplotConstrained) { + // merge xLinks and yLinks if the subplot is constrained, + // since we'll always apply both anyway and the two will contain + // duplicates + Lib.extendFlat(xLinks, yLinks); + yLinks = {}; + } + return { + x: xLinks, + y: yLinks, + xy: isSubplotConstrained + }; +} + +},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../lib":690,"../../lib/setcursor":705,"../../lib/svg_text_utils":709,"../../plotly":724,"../../registry":807,"./axes":729,"./axis_ids":732,"./constants":734,"./scale_zoom":744,"./select":745,"d3":114,"tinycolor2":521}],738:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130976,7 +134962,6 @@ function isSelectOrLasso(dragmode) { 'use strict'; var d3 = require('d3'); -var tinycolor = require('tinycolor2'); var isNumeric = require('fast-isnumeric'); var Lib = require('../../lib'); @@ -131212,9 +135197,7 @@ function quadrature(dx, dy) { // size and display constants for hover text var HOVERARROWSIZE = constants.HOVERARROWSIZE, - HOVERTEXTPAD = constants.HOVERTEXTPAD, - HOVERFONTSIZE = constants.HOVERFONTSIZE, - HOVERFONT = constants.HOVERFONT; + HOVERTEXTPAD = constants.HOVERTEXTPAD; // fx.hover: highlight data on hover // evt can be a mousemove event, or an object with data about what points @@ -131269,8 +135252,9 @@ fx.hover = function(gd, evt, subplot) { // The actual implementation is here: function hover(gd, evt, subplot) { - if(subplot === 'pie') { + if(['pie', 'sankey'].indexOf(subplot) !== -1) { gd.emit('plotly_hover', { + event: evt.originalEvent, points: [evt] }); return; @@ -131379,12 +135363,17 @@ function hover(gd, evt, subplot) { // [x|y]px: the pixels (from top left) of the mouse location // on the currently selected plot area - var xpx, ypx; + var hasUserCalledHover = !evt.target, + xpx, ypx; - // mouse event? ie is there a target element with - // clientX and clientY values? - if(evt.target && ('clientX' in evt) && ('clientY' in evt)) { + if(hasUserCalledHover) { + if('xpx' in evt) xpx = evt.xpx; + else xpx = xaArray[0]._length / 2; + if('ypx' in evt) ypx = evt.ypx; + else ypx = yaArray[0]._length / 2; + } + else { // fire the beforehover event and quit if it returns false // note that we're only calling this on real mouse events, so // manual calls to fx.hover will always run. @@ -131403,13 +135392,6 @@ function hover(gd, evt, subplot) { return dragElement.unhoverRaw(gd, evt); } } - else { - if('xpx' in evt) xpx = evt.xpx; - else xpx = xaArray[0]._length / 2; - - if('ypx' in evt) ypx = evt.ypx; - else ypx = yaArray[0]._length / 2; - } if('xval' in evt) xvalArray = flat(subplots, evt.xval); else xvalArray = p2c(xaArray, xpx); @@ -131590,10 +135572,14 @@ function hover(gd, evt, subplot) { if(!hoverChanged(gd, evt, oldhoverdata)) return; if(oldhoverdata) { - gd.emit('plotly_unhover', { points: oldhoverdata }); + gd.emit('plotly_unhover', { + event: evt, + points: oldhoverdata + }); } gd.emit('plotly_hover', { + event: evt, points: gd._hoverdata, xaxes: xaArray, yaxes: yaArray, @@ -131718,23 +135704,36 @@ function cleanPoint(d, hovermode) { return d; } +/* + * Draw a single hover item in a pre-existing svg container somewhere + * hoverItem should have keys: + * - x and y (or x0, x1, y0, and y1): + * the pixel position to mark, relative to opts.container + * - xLabel, yLabel, zLabel, text, and name: + * info to go in the label + * - color: + * the background color for the label. + * - idealAlign (optional): + * 'left' or 'right' for which side of the x/y box to try to put this on first + * - borderColor (optional): + * color for the border, defaults to strongest contrast with color + * - fontFamily (optional): + * string, the font for this label, defaults to constants.HOVERFONT + * - fontSize (optional): + * the label font size, defaults to constants.HOVERFONTSIZE + * - fontColor (optional): + * defaults to borderColor + * opts should have keys: + * - bgColor: + * the background color this is against, used if the trace is + * non-opaque, and for the name, which goes outside the box + * - container: + * a or element to add the hover label to + * - outerContainer: + * normally a parent of `container`, sets the bounding box to use to + * constrain the hover label and determine whether to show it on the left or right + */ fx.loneHover = function(hoverItem, opts) { - // draw a single hover item in a pre-existing svg container somewhere - // hoverItem should have keys: - // - x and y (or x0, x1, y0, and y1): - // the pixel position to mark, relative to opts.container - // - xLabel, yLabel, zLabel, text, and name: - // info to go in the label - // - color: - // the background color for the label. text & outline color will - // be chosen black or white to contrast with this - // opts should have keys: - // - bgColor: - // the background color this is against, used if the trace is - // non-opaque, and for the name, which goes outside the box - // - container: - // a dom element - must be big enough to contain the whole - // hover label var pointData = { color: hoverItem.color || Color.defaultLine, x0: hoverItem.x0 || hoverItem.x || 0, @@ -131748,6 +135747,12 @@ fx.loneHover = function(hoverItem, opts) { name: hoverItem.name, idealAlign: hoverItem.idealAlign, + // optional extra bits of styling + borderColor: hoverItem.borderColor, + fontFamily: hoverItem.fontFamily, + fontSize: hoverItem.fontSize, + fontColor: hoverItem.fontColor, + // filler to make createHoverText happy trace: { index: 0, @@ -131793,6 +135798,12 @@ function createHoverText(hoverData, opts) { container = opts.container, outerContainer = opts.outerContainer, + // opts.fontFamily/Size are used for the common label + // and as defaults for each hover label, though the individual labels + // can override this. + fontFamily = opts.fontFamily || constants.HOVERFONT, + fontSize = opts.fontSize || constants.HOVERFONTSIZE, + c0 = hoverData[0], xa = c0.xa, ya = c0.ya, @@ -131837,7 +135848,7 @@ function createHoverText(hoverData, opts) { lpath.enter().append('path') .style({fill: Color.defaultLine, 'stroke-width': '1px', stroke: Color.background}); ltext.enter().append('text') - .call(Drawing.font, HOVERFONT, HOVERFONTSIZE, Color.background) + .call(Drawing.font, fontFamily, fontSize, Color.background) // prohibit tex interpretation until we can handle // tex and regular text together .attr('data-notex', 1); @@ -131918,13 +135929,12 @@ function createHoverText(hoverData, opts) { // trace name label (rect and text.name) g.append('rect') .call(Color.fill, Color.addOpacity(bgColor, 0.8)); - g.append('text').classed('name', true) - .call(Drawing.font, HOVERFONT, HOVERFONTSIZE); + g.append('text').classed('name', true); // trace data label (path and text.nums) g.append('path') .style('stroke-width', '1px'); g.append('text').classed('nums', true) - .call(Drawing.font, HOVERFONT, HOVERFONTSIZE); + .call(Drawing.font, fontFamily, fontSize); }); hoverLabels.exit().remove(); @@ -131940,8 +135950,7 @@ function createHoverText(hoverData, opts) { traceColor = Color.combine(baseColor, bgColor), // find a contrasting color for border and text - contrastColor = tinycolor(traceColor).getBrightness() > 128 ? - '#000' : Color.background; + contrastColor = d.borderColor || Color.contrast(traceColor); // to get custom 'name' labels pass cleanPoint if(d.nameOverride !== undefined) d.name = d.nameOverride; @@ -131986,7 +135995,10 @@ function createHoverText(hoverData, opts) { // main label var tx = g.select('text.nums') - .style('fill', contrastColor) + .call(Drawing.font, + d.fontFamily || fontFamily, + d.fontSize || fontSize, + d.fontColor || contrastColor) .call(Drawing.setPosition, 0, 0) .text(text) .attr('data-notex', 1) @@ -131999,7 +136011,10 @@ function createHoverText(hoverData, opts) { // secondary label for non-empty 'name' if(name && name !== text) { - tx2.style('fill', traceColor) + tx2.call(Drawing.font, + d.fontFamily || fontFamily, + d.fontSize || fontSize, + traceColor) .text(name) .call(Drawing.setPosition, 0, 0) .attr('data-notex', 1) @@ -132316,7 +136331,7 @@ function hoverChanged(gd, evt, oldhoverdata) { fx.click = function(gd, evt) { var annotationsDone = Registry.getComponentMethod('annotations', 'onClick')(gd, gd._hoverdata); - function emitClick() { gd.emit('plotly_click', {points: gd._hoverdata}); } + function emitClick() { gd.emit('plotly_click', {points: gd._hoverdata, event: evt}); } if(gd._hoverdata && evt && evt.target) { if(annotationsDone && annotationsDone.then) { @@ -132345,7 +136360,7 @@ fx.inbox = function(v0, v1) { return Infinity; }; -},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../lib":680,"../../lib/events":671,"../../lib/override_cursor":689,"../../lib/svg_text_utils":699,"../../registry":793,"../layout_attributes":769,"./axes":719,"./constants":724,"./dragbox":725,"d3":104,"fast-isnumeric":113,"tinycolor2":511}],727:[function(require,module,exports){ +},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../lib":690,"../../lib/events":681,"../../lib/override_cursor":699,"../../lib/svg_text_utils":709,"../../registry":807,"../layout_attributes":783,"./axes":729,"./constants":734,"./dragbox":737,"d3":114,"fast-isnumeric":123}],739:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132730,7 +136745,7 @@ function joinLayer(parent, nodeType, className) { return layer; } -},{"../../lib":680,"../plots":778,"./attributes":718,"./axis_ids":722,"./constants":724,"./layout_attributes":728,"./transition_axes":737,"d3":104}],728:[function(require,module,exports){ +},{"../../lib":690,"../plots":792,"./attributes":728,"./axis_ids":732,"./constants":734,"./layout_attributes":740,"./transition_axes":750,"d3":114}],740:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132831,7 +136846,6 @@ module.exports = { 'number from zero in the order it appears.' ].join(' ') }, - fixedrange: { valType: 'boolean', dflt: false, @@ -132841,6 +136855,42 @@ module.exports = { 'If true, then zoom is disabled.' ].join(' ') }, + // scaleanchor: not used directly, just put here for reference + // values are any opposite-letter axis id + scaleanchor: { + valType: 'enumerated', + values: [ + constants.idRegex.x.toString(), + constants.idRegex.y.toString() + ], + role: 'info', + description: [ + 'If set to an opposite-letter axis id (e.g. `x2`, `y`), the range of this axis', + 'changes together with the range of the corresponding opposite-letter axis.', + 'such that the scale of pixels per unit is in a constant ratio.', + 'Both axes are still zoomable, but when you zoom one, the other will', + 'zoom the same amount, keeping a fixed midpoint.', + 'Autorange will also expand about the midpoints to satisfy the constraint.', + 'You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`', + 'but you can only link axes of the same `type`.', + 'Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant', + 'and the last constraint encountered will be ignored to avoid possible', + 'inconsistent constraints via `scaleratio`.' + ].join(' ') + }, + scaleratio: { + valType: 'number', + min: 0, + dflt: 1, + role: 'info', + description: [ + 'If this axis is linked to another by `scaleanchor`, this determines the pixel', + 'to unit scale ratio. For example, if this value is 10, then every unit on', + 'this axis spans 10 times the number of pixels as a unit on the linked axis.', + 'Use this for example to create an elevation profile where the vertical scale', + 'is exaggerated a fixed amount with respect to the horizontal.' + ].join(' ') + }, // ticks tickmode: { valType: 'enumerated', @@ -133163,7 +137213,7 @@ module.exports = { ], role: 'info', description: [ - 'If set to an opposite-letter axis id (e.g. `xaxis2`, `yaxis`), this axis is bound to', + 'If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to', 'the corresponding opposite-letter axis.', 'If set to *free*, this axis\' position is determined by `position`.' ].join(' ') @@ -133264,7 +137314,7 @@ module.exports = { } }; -},{"../../components/color/attributes":574,"../../lib/extend":672,"../font_attributes":739,"./constants":724}],729:[function(require,module,exports){ +},{"../../components/color/attributes":584,"../../lib/extend":682,"../font_attributes":753,"./constants":734}],741:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133283,7 +137333,9 @@ var basePlotLayoutAttributes = require('../layout_attributes'); var constants = require('./constants'); var layoutAttributes = require('./layout_attributes'); +var handleTypeDefaults = require('./type_defaults'); var handleAxisDefaults = require('./axis_defaults'); +var handleConstraintDefaults = require('./constraint_defaults'); var handlePositionDefaults = require('./position_defaults'); var axisIds = require('./axis_ids'); @@ -133382,7 +137434,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { var bgColor = Color.combine(plot_bgcolor, layoutOut.paper_bgcolor); - var axName, axLayoutIn, axLayoutOut; + var axName, axLetter, axLayoutIn, axLayoutOut; function coerce(attr, dflt) { return Lib.coerce(axLayoutIn, axLayoutOut, layoutAttributes, attr, dflt); @@ -133393,6 +137445,8 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { return Lib.simpleMap(list, axisIds.name2id); } + var counterAxes = {x: getCounterAxes('x'), y: getCounterAxes('y')}; + function getOverlayableAxes(axLetter, axName) { var list = {x: xaList, y: yaList}[axLetter]; var out = []; @@ -133408,6 +137462,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { return out; } + // first pass creates the containers, determines types, and handles most of the settings for(i = 0; i < axesList.length; i++) { axName = axesList[i]; @@ -133418,14 +137473,16 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { axLayoutIn = layoutIn[axName]; axLayoutOut = layoutOut[axName] = {}; - var axLetter = axName.charAt(0); + handleTypeDefaults(axLayoutIn, axLayoutOut, coerce, fullData, axName); + + axLetter = axName.charAt(0); + var overlayableAxes = getOverlayableAxes(axLetter, axName); var defaultOptions = { letter: axLetter, font: layoutOut.font, outerTicks: outerTicks[axName], showGrid: !noGrids[axName], - name: axName, data: fullData, bgColor: bgColor, calendar: layoutOut.calendar @@ -133435,8 +137492,8 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { var positioningOptions = { letter: axLetter, - counterAxes: getCounterAxes(axLetter), - overlayableAxes: getOverlayableAxes(axLetter, axName) + counterAxes: counterAxes[axLetter], + overlayableAxes: overlayableAxes }; handlePositionDefaults(axLayoutIn, axLayoutOut, coerce, positioningOptions); @@ -133483,9 +137540,28 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { coerce('fixedrange', fixedRangeDflt); } + + // Finally, handle scale constraints. We need to do this after all axes have + // coerced both `type` (so we link only axes of the same type) and + // `fixedrange` (so we can avoid linking from OR TO a fixed axis). + + // sets of axes linked by `scaleanchor` along with the scaleratios compounded + // together, populated in handleConstraintDefaults + layoutOut._axisConstraintGroups = []; + var allAxisIds = counterAxes.x.concat(counterAxes.y); + + for(i = 0; i < axesList.length; i++) { + axName = axesList[i]; + axLetter = axName.charAt(0); + + axLayoutIn = layoutIn[axName]; + axLayoutOut = layoutOut[axName]; + + handleConstraintDefaults(axLayoutIn, axLayoutOut, coerce, allAxisIds, layoutOut); + } }; -},{"../../components/color":575,"../../lib":680,"../../registry":793,"../layout_attributes":769,"./axis_defaults":721,"./axis_ids":722,"./constants":724,"./layout_attributes":728,"./position_defaults":731}],730:[function(require,module,exports){ +},{"../../components/color":585,"../../lib":690,"../../registry":807,"../layout_attributes":783,"./axis_defaults":731,"./axis_ids":732,"./constants":734,"./constraint_defaults":735,"./layout_attributes":740,"./position_defaults":743,"./type_defaults":751}],742:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133564,7 +137640,7 @@ module.exports = function orderedCategories(axisLetter, categoryorder, categorya } }; -},{"d3":104}],731:[function(require,module,exports){ +},{"d3":114}],743:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133629,7 +137705,32 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer return containerOut; }; -},{"../../lib":680,"fast-isnumeric":113}],732:[function(require,module,exports){ +},{"../../lib":690,"fast-isnumeric":123}],744:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +module.exports = function scaleZoom(ax, factor, centerFraction) { + if(centerFraction === undefined) centerFraction = 0.5; + + var rangeLinear = [ax.r2l(ax.range[0]), ax.r2l(ax.range[1])]; + var center = rangeLinear[0] + (rangeLinear[1] - rangeLinear[0]) * centerFraction; + var newHalfSpan = (center - rangeLinear[0]) * factor; + + ax.range = ax._input.range = [ + ax.l2r(center - newHalfSpan), + ax.l2r(center + newHalfSpan) + ]; +}; + +},{}],745:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133829,7 +137930,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) { }; }; -},{"../../components/color":575,"../../lib/polygon":690,"./axes":719,"./constants":724}],733:[function(require,module,exports){ +},{"../../components/color":585,"../../lib/polygon":700,"./axes":729,"./constants":734}],746:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133958,12 +138059,20 @@ module.exports = function setConvert(ax, fullLayout) { */ function setCategoryIndex(v) { if(v !== null && v !== undefined) { - var c = ax._categories.indexOf(v); - if(c === -1) { + if(ax._categoriesMap === undefined) { + ax._categoriesMap = {}; + } + + if(ax._categoriesMap[v] !== undefined) { + return ax._categoriesMap[v]; + } else { ax._categories.push(v); - return ax._categories.length - 1; + + var curLength = ax._categories.length - 1; + ax._categoriesMap[v] = curLength; + + return curLength; } - return c; } return BADNUM; } @@ -133971,9 +138080,12 @@ module.exports = function setConvert(ax, fullLayout) { function getCategoryIndex(v) { // d2l/d2c variant that that won't add categories but will also // allow numbers to be mapped to the linearized axis positions - var index = ax._categories.indexOf(v); - if(index !== -1) return index; - if(typeof v === 'number') return v; + if(ax._categoriesMap) { + var index = ax._categoriesMap[v]; + if(index !== undefined) return index; + } + + if(typeof v === 'number') { return v; } } function l2p(v) { @@ -134157,6 +138269,8 @@ module.exports = function setConvert(ax, fullLayout) { // TODO cleaner way to handle this case if(!ax._categories) ax._categories = []; + // Add a map to optimize the performance of category collection + if(!ax._categoriesMap) ax._categoriesMap = {}; // make sure we have a domain (pull it in from the axis // this one is overlaying if necessary) @@ -134259,7 +138373,7 @@ module.exports = function setConvert(ax, fullLayout) { delete ax._forceTick0; }; -},{"../../constants/numerical":662,"../../lib":680,"./axis_ids":722,"./constants":724,"d3":104,"fast-isnumeric":113}],734:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690,"./axis_ids":732,"./constants":734,"d3":114,"fast-isnumeric":123}],747:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134343,7 +138457,7 @@ function getShowAttrDflt(containerIn) { } } -},{"../../lib":680}],735:[function(require,module,exports){ +},{"../../lib":690}],748:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134376,7 +138490,7 @@ module.exports = function handleTickDefaults(containerIn, containerOut, coerce, } }; -},{"../../lib":680,"./layout_attributes":728}],736:[function(require,module,exports){ +},{"../../lib":690,"./layout_attributes":740}],749:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134460,7 +138574,7 @@ module.exports = function handleTickValueDefaults(containerIn, containerOut, coe } }; -},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],737:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],750:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134772,7 +138886,135 @@ module.exports = function transitionAxes(gd, newLayout, transitionOpts, makeOnCo return Promise.resolve(); }; -},{"../../components/drawing":598,"../../plotly":714,"../../registry":793,"./axes":719,"d3":104}],738:[function(require,module,exports){ +},{"../../components/drawing":608,"../../plotly":724,"../../registry":807,"./axes":729,"d3":114}],751:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Registry = require('../../registry'); +var autoType = require('./axis_autotype'); +var name2id = require('./axis_ids').name2id; + +/* + * data: the plot data to use in choosing auto type + * name: axis object name (ie 'xaxis') if one should be stored + */ +module.exports = function handleTypeDefaults(containerIn, containerOut, coerce, data, name) { + // set up some private properties + if(name) { + containerOut._name = name; + containerOut._id = name2id(name); + } + + var axType = coerce('type'); + if(axType === '-') { + setAutoType(containerOut, data); + + if(containerOut.type === '-') { + containerOut.type = 'linear'; + } + else { + // copy autoType back to input axis + // note that if this object didn't exist + // in the input layout, we have to put it in + // this happens in the main supplyDefaults function + containerIn.type = containerOut.type; + } + } +}; + +function setAutoType(ax, data) { + // new logic: let people specify any type they want, + // only autotype if type is '-' + if(ax.type !== '-') return; + + var id = ax._id, + axLetter = id.charAt(0); + + // support 3d + if(id.indexOf('scene') !== -1) id = axLetter; + + var d0 = getFirstNonEmptyTrace(data, id, axLetter); + if(!d0) return; + + // first check for histograms, as the count direction + // should always default to a linear axis + if(d0.type === 'histogram' && + axLetter === {v: 'y', h: 'x'}[d0.orientation || 'v']) { + ax.type = 'linear'; + return; + } + + var calAttr = axLetter + 'calendar', + calendar = d0[calAttr]; + + // check all boxes on this x axis to see + // if they're dates, numbers, or categories + if(isBoxWithoutPositionCoords(d0, axLetter)) { + var posLetter = getBoxPosLetter(d0), + boxPositions = [], + trace; + + for(var i = 0; i < data.length; i++) { + trace = data[i]; + if(!Registry.traceIs(trace, 'box') || + (trace[axLetter + 'axis'] || axLetter) !== id) continue; + + if(trace[posLetter] !== undefined) boxPositions.push(trace[posLetter][0]); + else if(trace.name !== undefined) boxPositions.push(trace.name); + else boxPositions.push('text'); + + if(trace[calAttr] !== calendar) calendar = undefined; + } + + ax.type = autoType(boxPositions, calendar); + } + else { + ax.type = autoType(d0[axLetter] || [d0[axLetter + '0']], calendar); + } +} + +function getFirstNonEmptyTrace(data, id, axLetter) { + for(var i = 0; i < data.length; i++) { + var trace = data[i]; + + if((trace[axLetter + 'axis'] || axLetter) === id) { + if(isBoxWithoutPositionCoords(trace, axLetter)) { + return trace; + } + else if((trace[axLetter] || []).length || trace[axLetter + '0']) { + return trace; + } + } + } +} + +function getBoxPosLetter(trace) { + return {v: 'x', h: 'y'}[trace.orientation || 'v']; +} + +function isBoxWithoutPositionCoords(trace, axLetter) { + var posLetter = getBoxPosLetter(trace), + isBox = Registry.traceIs(trace, 'box'), + isCandlestick = Registry.traceIs(trace._fullInput || {}, 'candlestick'); + + return ( + isBox && + !isCandlestick && + axLetter === posLetter && + trace[posLetter] === undefined && + trace[posLetter + '0'] === undefined + ); +} + +},{"../../registry":807,"./axis_autotype":730,"./axis_ids":732}],752:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135197,7 +139439,7 @@ function crawl(attrs, callback, path, depth) { }); } -},{"../lib":680,"../plotly":714}],739:[function(require,module,exports){ +},{"../lib":690,"../plotly":724}],753:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135239,7 +139481,7 @@ module.exports = { } }; -},{}],740:[function(require,module,exports){ +},{}],754:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135301,7 +139543,7 @@ module.exports = { } }; -},{}],741:[function(require,module,exports){ +},{}],755:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135461,7 +139703,7 @@ params.layerNameToAdjective = { // base layers drawn over choropleth params.baseLayersOverChoropleth = ['rivers', 'lakes']; -},{}],742:[function(require,module,exports){ +},{}],756:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135555,11 +139797,9 @@ proto.plot = function(geoCalcData, fullLayout, promises) { if(!lonlat || isNaN(lonlat[0]) || isNaN(lonlat[1])) return; - var evt = { - target: true, - xpx: mouse[0], - ypx: mouse[1] - }; + var evt = d3.event; + evt.xpx = mouse[0]; + evt.ypx = mouse[1]; _this.xaxis.c2p = function() { return mouse[0]; }; _this.xaxis.p2c = function() { return lonlat[0]; }; @@ -135574,7 +139814,7 @@ proto.plot = function(geoCalcData, fullLayout, promises) { }); _this.framework.on('click', function() { - Fx.click(_this.graphDiv, { target: true }); + Fx.click(_this.graphDiv, d3.event); }); topojsonNameNew = topojsonUtils.getTopojsonName(geoLayout); @@ -135936,7 +140176,7 @@ function createMockAxis(fullLayout) { return mockAxis; } -},{"../../components/color":575,"../../components/drawing":598,"../../lib/topojson_utils":701,"../cartesian/axes":719,"../cartesian/graph_interact":726,"../plots":778,"./constants":741,"./projections":749,"./set_scale":750,"./zoom":751,"./zoom_reset":752,"d3":104,"topojson-client":513}],743:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"../../lib/topojson_utils":711,"../cartesian/axes":729,"../cartesian/graph_interact":738,"../plots":792,"./constants":755,"./projections":763,"./set_scale":764,"./zoom":765,"./zoom_reset":766,"d3":114,"topojson-client":523}],757:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136016,7 +140256,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) } }; -},{"../../plots/plots":778,"./geo":742,"./layout/attributes":744,"./layout/defaults":747,"./layout/layout_attributes":748}],744:[function(require,module,exports){ +},{"../../plots/plots":792,"./geo":756,"./layout/attributes":758,"./layout/defaults":761,"./layout/layout_attributes":762}],758:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136044,7 +140284,7 @@ module.exports = { } }; -},{}],745:[function(require,module,exports){ +},{}],759:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136107,7 +140347,7 @@ module.exports = { } }; -},{"../../../components/color/attributes":574}],746:[function(require,module,exports){ +},{"../../../components/color/attributes":584}],760:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136181,7 +140421,7 @@ module.exports = function supplyGeoAxisLayoutDefaults(geoLayoutIn, geoLayoutOut) } }; -},{"../../../lib":680,"../constants":741,"./axis_attributes":745}],747:[function(require,module,exports){ +},{"../../../lib":690,"../constants":755,"./axis_attributes":759}],761:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136300,7 +140540,7 @@ function handleGeoDefaults(geoLayoutIn, geoLayoutOut, coerce) { ]; } -},{"../../subplot_defaults":785,"../constants":741,"./axis_defaults":746,"./layout_attributes":748}],748:[function(require,module,exports){ +},{"../../subplot_defaults":799,"../constants":755,"./axis_defaults":760,"./layout_attributes":762}],762:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136559,7 +140799,7 @@ module.exports = { lataxis: geoAxesAttrs }; -},{"../../../components/color/attributes":574,"../constants":741,"./axis_attributes":745}],749:[function(require,module,exports){ +},{"../../../components/color/attributes":584,"../constants":755,"./axis_attributes":759}],763:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137005,7 +141245,7 @@ function addProjectionsToD3(d3) { module.exports = addProjectionsToD3; -},{}],750:[function(require,module,exports){ +},{}],764:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137156,7 +141396,7 @@ function getBounds(projection, rangeBox) { return d3.geo.path().projection(projection).bounds(rangeBox); } -},{"./constants":741,"d3":104}],751:[function(require,module,exports){ +},{"./constants":755,"d3":114}],765:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137583,7 +141823,7 @@ function d3_eventDispatch(target) { return dispatch; } -},{"d3":104}],752:[function(require,module,exports){ +},{"d3":114}],766:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137612,7 +141852,7 @@ module.exports = function createGeoZoomReset(geo, geoLayout) { return zoomReset; }; -},{}],753:[function(require,module,exports){ +},{}],767:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137626,6 +141866,7 @@ module.exports = function createGeoZoomReset(geo, geoLayout) { var mouseChange = require('mouse-change'); var mouseWheel = require('mouse-wheel'); +var cartesianConstants = require('../cartesian/constants'); module.exports = createCamera; @@ -137637,8 +141878,10 @@ function Camera2D(element, plot) { this.lastInputTime = Date.now(); this.lastPos = [0, 0]; this.boxEnabled = false; + this.boxInited = false; this.boxStart = [0, 0]; this.boxEnd = [0, 0]; + this.dragStart = [0, 0]; } @@ -137652,6 +141895,21 @@ function createCamera(scene) { scene.yaxis.autorange = false; } + function getSubplotConstraint() { + // note: this assumes we only have one x and one y axis on this subplot + // when this constraint is lifted this block won't make sense + var constraints = scene.graphDiv._fullLayout._axisConstraintGroups; + var xaId = scene.xaxis._id; + var yaId = scene.yaxis._id; + for(var i = 0; i < constraints.length; i++) { + if(constraints[i][xaId] !== -1) { + if(constraints[i][yaId] !== -1) return true; + break; + } + } + return false; + } + result.mouseListener = mouseChange(element, function(buttons, x, y) { var dataBox = scene.calcDataBox(), viewBox = plot.viewBox; @@ -137659,6 +141917,11 @@ function createCamera(scene) { var lastX = result.lastPos[0], lastY = result.lastPos[1]; + var MINDRAG = cartesianConstants.MINDRAG * plot.pixelRatio; + var MINZOOM = cartesianConstants.MINZOOM * plot.pixelRatio; + + var dx, dy; + x *= plot.pixelRatio; y *= plot.pixelRatio; @@ -137691,32 +141954,114 @@ function createCamera(scene) { (viewBox[3] - viewBox[1]) * (dataBox[3] - dataBox[1]) + dataBox[1]; - if(!result.boxEnabled) { + if(!result.boxInited) { result.boxStart[0] = dataX; result.boxStart[1] = dataY; + result.dragStart[0] = x; + result.dragStart[1] = y; } result.boxEnd[0] = dataX; result.boxEnd[1] = dataY; - result.boxEnabled = true; + // we need to mark the box as initialized right away + // so that we can tell the start and end pionts apart + result.boxInited = true; + + // but don't actually enable the box until the cursor moves + if(!result.boxEnabled && ( + result.boxStart[0] !== result.boxEnd[0] || + result.boxStart[1] !== result.boxEnd[1]) + ) { + result.boxEnabled = true; + } + + // constrain aspect ratio if the axes require it + var smallDx = Math.abs(result.dragStart[0] - x) < MINZOOM; + var smallDy = Math.abs(result.dragStart[1] - y) < MINZOOM; + if(getSubplotConstraint() && !(smallDx && smallDy)) { + dx = result.boxEnd[0] - result.boxStart[0]; + dy = result.boxEnd[1] - result.boxStart[1]; + var dydx = (dataBox[3] - dataBox[1]) / (dataBox[2] - dataBox[0]); + + if(Math.abs(dx * dydx) > Math.abs(dy)) { + result.boxEnd[1] = result.boxStart[1] + + Math.abs(dx) * dydx * (Math.sign(dy) || 1); + + // gl-select-box clips to the plot area bounds, + // which breaks the axis constraint, so don't allow + // this box to go out of bounds + if(result.boxEnd[1] < dataBox[1]) { + result.boxEnd[1] = dataBox[1]; + result.boxEnd[0] = result.boxStart[0] + + (dataBox[1] - result.boxStart[1]) / Math.abs(dydx); + } + else if(result.boxEnd[1] > dataBox[3]) { + result.boxEnd[1] = dataBox[3]; + result.boxEnd[0] = result.boxStart[0] + + (dataBox[3] - result.boxStart[1]) / Math.abs(dydx); + } + } + else { + result.boxEnd[0] = result.boxStart[0] + + Math.abs(dy) / dydx * (Math.sign(dx) || 1); + + if(result.boxEnd[0] < dataBox[0]) { + result.boxEnd[0] = dataBox[0]; + result.boxEnd[1] = result.boxStart[1] + + (dataBox[0] - result.boxStart[0]) * Math.abs(dydx); + } + else if(result.boxEnd[0] > dataBox[2]) { + result.boxEnd[0] = dataBox[2]; + result.boxEnd[1] = result.boxStart[1] + + (dataBox[2] - result.boxStart[0]) * Math.abs(dydx); + } + } + } + // otherwise clamp small changes to the origin so we get 1D zoom + else { + if(smallDx) result.boxEnd[0] = result.boxStart[0]; + if(smallDy) result.boxEnd[1] = result.boxStart[1]; + } } else if(result.boxEnabled) { - updateRange(0, result.boxStart[0], result.boxEnd[0]); - updateRange(1, result.boxStart[1], result.boxEnd[1]); - unSetAutoRange(); + dx = result.boxStart[0] !== result.boxEnd[0]; + dy = result.boxStart[1] !== result.boxEnd[1]; + if(dx || dy) { + if(dx) { + updateRange(0, result.boxStart[0], result.boxEnd[0]); + scene.xaxis.autorange = false; + } + if(dy) { + updateRange(1, result.boxStart[1], result.boxEnd[1]); + scene.yaxis.autorange = false; + } + scene.relayoutCallback(); + } + else { + scene.glplot.setDirty(); + } result.boxEnabled = false; - scene.relayoutCallback(); + result.boxInited = false; } break; case 'pan': result.boxEnabled = false; + result.boxInited = false; if(buttons) { - var dx = (lastX - x) * (dataBox[2] - dataBox[0]) / + if(!result.panning) { + result.dragStart[0] = x; + result.dragStart[1] = y; + } + + if(Math.abs(result.dragStart[0] - x) < MINDRAG) x = result.dragStart[0]; + if(Math.abs(result.dragStart[1] - y) < MINDRAG) y = result.dragStart[1]; + + dx = (lastX - x) * (dataBox[2] - dataBox[0]) / (plot.viewBox[2] - plot.viewBox[0]); - var dy = (lastY - y) * (dataBox[3] - dataBox[1]) / + dy = (lastY - y) * (dataBox[3] - dataBox[1]) / (plot.viewBox[3] - plot.viewBox[1]); dataBox[0] += dx; @@ -137785,7 +142130,7 @@ function createCamera(scene) { return result; } -},{"mouse-change":431,"mouse-wheel":434}],754:[function(require,module,exports){ +},{"../cartesian/constants":734,"mouse-change":441,"mouse-wheel":444}],768:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138031,7 +142376,7 @@ function createAxes2D(scene) { module.exports = createAxes2D; -},{"../../lib/html2unicode":678,"../../lib/str2rgbarray":698,"../cartesian/axes":719,"../plots":778}],755:[function(require,module,exports){ +},{"../../lib/html2unicode":688,"../../lib/str2rgbarray":708,"../cartesian/axes":729,"../plots":792}],769:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138143,7 +142488,7 @@ exports.toSVG = function(gd) { } }; -},{"../../constants/xmlns_namespaces":664,"../cartesian/attributes":718,"../plots":778,"./scene2d":756}],756:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":674,"../cartesian/attributes":728,"../plots":792,"./scene2d":770}],770:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138168,6 +142513,7 @@ var createOptions = require('./convert'); var createCamera = require('./camera'); var convertHTMLToUnicode = require('../../lib/html2unicode'); var showNoWebGlMsg = require('../../lib/show_no_webgl_msg'); +var enforceAxisConstraints = require('../../plots/cartesian/constraints'); var AXES = ['xaxis', 'yaxis']; var STATIC_CANVAS, STATIC_CONTEXT; @@ -138572,6 +142918,13 @@ proto.plot = function(fullData, calcData, fullLayout) { ax.setScale(); } + var mockLayout = { + _axisConstraintGroups: this.graphDiv._fullLayout._axisConstraintGroups, + xaxis: this.xaxis, + yaxis: this.yaxis + }; + enforceAxisConstraints({_fullLayout: mockLayout}); + options.ticks = this.computeTickMarks(); options.dataBox = this.calcDataBox(); @@ -138690,26 +143043,36 @@ proto.draw = function() { var x = mouseListener.x * glplot.pixelRatio; var y = this.canvas.height - glplot.pixelRatio * mouseListener.y; + var result; + if(camera.boxEnabled && fullLayout.dragmode === 'zoom') { this.selectBox.enabled = true; - this.selectBox.selectBox = [ + var selectBox = this.selectBox.selectBox = [ Math.min(camera.boxStart[0], camera.boxEnd[0]), Math.min(camera.boxStart[1], camera.boxEnd[1]), Math.max(camera.boxStart[0], camera.boxEnd[0]), Math.max(camera.boxStart[1], camera.boxEnd[1]) ]; + // 1D zoom + for(var i = 0; i < 2; i++) { + if(camera.boxStart[i] === camera.boxEnd[i]) { + selectBox[i] = glplot.dataBox[i]; + selectBox[i + 2] = glplot.dataBox[i + 2]; + } + } + glplot.setDirty(); } - else { + else if(!camera.panning) { this.selectBox.enabled = false; var size = fullLayout._size, domainX = this.xaxis.domain, domainY = this.yaxis.domain; - var result = glplot.pick( + result = glplot.pick( (x / glplot.pixelRatio) + size.l + domainX[0] * size.w, (y / glplot.pixelRatio) - (size.t + (1 - domainY[1]) * size.h) ); @@ -138775,12 +143138,15 @@ proto.draw = function() { }); } } - else if(!result && this.lastPickResult) { - this.spikes.update({}); - this.lastPickResult = null; - this.graphDiv.emit('plotly_unhover'); - Fx.loneUnhover(this.svgContainer); - } + } + + // Remove hover effects if we're not over a point OR + // if we're zooming or panning (in which case result is not set) + if(!result && this.lastPickResult) { + this.spikes.update({}); + this.lastPickResult = null; + this.graphDiv.emit('plotly_unhover'); + Fx.loneUnhover(this.svgContainer); } glplot.draw(); @@ -138793,7 +143159,7 @@ proto.hoverFormatter = function(axisName, val) { return Axes.tickText(axis, axis.c2l(val), 'hover').text; }; -},{"../../lib/html2unicode":678,"../../lib/show_no_webgl_msg":696,"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"../../registry":793,"./camera":753,"./convert":754,"gl-plot2d":200,"gl-select-box":234,"gl-spikes2d":243,"webgl-context":540}],757:[function(require,module,exports){ +},{"../../lib/html2unicode":688,"../../lib/show_no_webgl_msg":706,"../../plots/cartesian/axes":729,"../../plots/cartesian/constraints":736,"../../plots/cartesian/graph_interact":738,"../../registry":807,"./camera":767,"./convert":768,"gl-plot2d":210,"gl-select-box":244,"gl-spikes2d":253,"webgl-context":550}],771:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139042,7 +143408,7 @@ function createCamera(element, options) { return camera; } -},{"3d-view":30,"mouse-change":431,"mouse-wheel":434,"right-now":480}],758:[function(require,module,exports){ +},{"3d-view":31,"mouse-change":441,"mouse-wheel":444,"right-now":490}],772:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139159,7 +143525,7 @@ exports.cleanId = function cleanId(id) { return 'scene' + sceneNum; }; -},{"../../constants/xmlns_namespaces":664,"../../lib":680,"../plots":778,"./layout/attributes":759,"./layout/defaults":763,"./layout/layout_attributes":764,"./scene":768}],759:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":674,"../../lib":690,"../plots":792,"./layout/attributes":773,"./layout/defaults":777,"./layout/layout_attributes":778,"./scene":782}],773:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139187,7 +143553,7 @@ module.exports = { } }; -},{}],760:[function(require,module,exports){ +},{}],774:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139303,7 +143669,7 @@ module.exports = { zerolinewidth: axesAttrs.zerolinewidth }; -},{"../../../components/color":575,"../../../lib/extend":672,"../../cartesian/layout_attributes":728}],761:[function(require,module,exports){ +},{"../../../components/color":585,"../../../lib/extend":682,"../../cartesian/layout_attributes":740}],775:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139320,6 +143686,7 @@ var colorMix = require('tinycolor2').mix; var Lib = require('../../../lib'); var layoutAttributes = require('./axis_attributes'); +var handleTypeDefaults = require('../../cartesian/type_defaults'); var handleAxisDefaults = require('../../cartesian/axis_defaults'); var axesNames = ['xaxis', 'yaxis', 'zaxis']; @@ -139339,12 +143706,14 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { var axName = axesNames[j]; containerIn = layoutIn[axName] || {}; - containerOut = { + containerOut = layoutOut[axName] = { _id: axName[0] + options.scene, _name: axName }; - layoutOut[axName] = containerOut = handleAxisDefaults( + handleTypeDefaults(containerIn, containerOut, coerce, options.data); + + handleAxisDefaults( containerIn, containerOut, coerce, { @@ -139372,7 +143741,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { } }; -},{"../../../lib":680,"../../cartesian/axis_defaults":721,"./axis_attributes":760,"tinycolor2":511}],762:[function(require,module,exports){ +},{"../../../lib":690,"../../cartesian/axis_defaults":731,"../../cartesian/type_defaults":751,"./axis_attributes":774,"tinycolor2":521}],776:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139527,7 +143896,7 @@ function createAxesOptions(plotlyOptions) { module.exports = createAxesOptions; -},{"../../../lib/html2unicode":678,"../../../lib/str2rgbarray":698,"arraytools":36}],763:[function(require,module,exports){ +},{"../../../lib/html2unicode":688,"../../../lib/str2rgbarray":708,"arraytools":38}],777:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139631,7 +144000,7 @@ function handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) { coerce('hovermode', opts.getDfltFromLayout('hovermode')); } -},{"../../../components/color":575,"../../../lib":680,"../../subplot_defaults":785,"./axis_defaults":761,"./layout_attributes":764}],764:[function(require,module,exports){ +},{"../../../components/color":585,"../../../lib":690,"../../subplot_defaults":799,"./axis_defaults":775,"./layout_attributes":778}],778:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139801,7 +144170,7 @@ module.exports = { } }; -},{"../../../lib/extend":672,"./axis_attributes":760}],765:[function(require,module,exports){ +},{"../../../lib/extend":682,"./axis_attributes":774}],779:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139847,7 +144216,7 @@ function createSpikeOptions(layout) { module.exports = createSpikeOptions; -},{"../../../lib/str2rgbarray":698}],766:[function(require,module,exports){ +},{"../../../lib/str2rgbarray":708}],780:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139943,7 +144312,7 @@ function computeTickMarks(scene) { scene.contourLevels = contourLevelsFromTicks(ticks); } -},{"../../../lib":680,"../../../lib/html2unicode":678,"../../cartesian/axes":719}],767:[function(require,module,exports){ +},{"../../../lib":690,"../../../lib/html2unicode":688,"../../cartesian/axes":729}],781:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139977,7 +144346,7 @@ function project(camera, v) { module.exports = project; -},{}],768:[function(require,module,exports){ +},{}],782:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140700,7 +145069,7 @@ proto.setConvert = function() { module.exports = Scene; -},{"../../lib":680,"../../lib/show_no_webgl_msg":696,"../../lib/str2rgbarray":698,"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"./camera":757,"./layout/convert":762,"./layout/spikes":765,"./layout/tick_marks":766,"./project":767,"gl-plot3d":202,"webgl-context":540}],769:[function(require,module,exports){ +},{"../../lib":690,"../../lib/show_no_webgl_msg":706,"../../lib/str2rgbarray":708,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"./camera":771,"./layout/convert":776,"./layout/spikes":779,"./layout/tick_marks":780,"./project":781,"gl-plot3d":212,"webgl-context":550}],783:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140893,7 +145262,7 @@ module.exports = { } }; -},{"../components/color/attributes":574,"../lib":680,"./font_attributes":739}],770:[function(require,module,exports){ +},{"../components/color/attributes":584,"../lib":690,"./font_attributes":753}],784:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140923,7 +145292,7 @@ module.exports = { mapOnErrorMsg: 'Mapbox error.' }; -},{}],771:[function(require,module,exports){ +},{}],785:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140997,7 +145366,7 @@ module.exports = function convertTextOpts(textposition, iconSize) { return { anchor: anchor, offset: offset }; }; -},{"../../lib":680}],772:[function(require,module,exports){ +},{"../../lib":690}],786:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141145,7 +145514,7 @@ function findAccessToken(gd, mapboxIds) { return accessToken; } -},{"../../constants/xmlns_namespaces":664,"../plots":778,"./constants":770,"./layout_attributes":774,"./layout_defaults":775,"./mapbox":776,"mapbox-gl":322}],773:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":674,"../plots":792,"./constants":784,"./layout_attributes":788,"./layout_defaults":789,"./mapbox":790,"mapbox-gl":332}],787:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141370,7 +145739,7 @@ module.exports = function createMapboxLayer(mapbox, index, opts) { return mapboxLayer; }; -},{"../../lib":680,"./convert_text_opts":771}],774:[function(require,module,exports){ +},{"../../lib":690,"./convert_text_opts":785}],788:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141638,7 +146007,7 @@ module.exports = { }; -},{"../../components/color":575,"../../lib":680,"../../traces/scatter/attributes":924,"../font_attributes":739}],775:[function(require,module,exports){ +},{"../../components/color":585,"../../lib":690,"../../traces/scatter/attributes":947,"../font_attributes":753}],789:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141734,7 +146103,7 @@ function handleLayerDefaults(containerIn, containerOut) { } } -},{"../../lib":680,"../subplot_defaults":785,"./layout_attributes":774}],776:[function(require,module,exports){ +},{"../../lib":690,"../subplot_defaults":799,"./layout_attributes":788}],790:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141848,10 +146217,14 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { }); // clear navigation container - var className = constants.controlContainerClassName, - controlContainer = self.div.getElementsByClassName(className)[0]; + var className = constants.controlContainerClassName; + var controlContainer = self.div.getElementsByClassName(className)[0]; self.div.removeChild(controlContainer); + // make sure canvas does not inherit left and top css + map._canvas.canvas.style.left = '0px'; + map._canvas.canvas.style.top = '0px'; + self.rejectOnError(reject); map.once('load', function() { @@ -141903,8 +146276,8 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { Fx.hover(gd, evt, self.id); }); - map.on('click', function() { - Fx.click(gd, { target: true }); + map.on('click', function(evt) { + Fx.click(gd, evt.originalEvent); }); function unhover() { @@ -141913,7 +146286,6 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { map.on('dragstart', unhover); map.on('zoomstart', unhover); - }; proto.updateMap = function(calcData, fullLayout, resolve, reject) { @@ -142195,7 +146567,7 @@ function convertCenter(center) { return [center.lon, center.lat]; } -},{"../../lib":680,"../cartesian/graph_interact":726,"./constants":770,"./layers":773,"./layout_attributes":774,"mapbox-gl":322}],777:[function(require,module,exports){ +},{"../../lib":690,"../cartesian/graph_interact":738,"./constants":784,"./layers":787,"./layout_attributes":788,"mapbox-gl":332}],791:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142233,7 +146605,7 @@ module.exports = { } }; -},{}],778:[function(require,module,exports){ +},{}],792:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142252,6 +146624,7 @@ var Plotly = require('../plotly'); var Registry = require('../registry'); var Lib = require('../lib'); var Color = require('../components/color'); +var BADNUM = require('../constants/numerical').BADNUM; var plots = module.exports = {}; @@ -142493,6 +146866,9 @@ plots.previousPromises = function(gd) { * Add source links to your graph inside the 'showSources' config argument. */ plots.addLinks = function(gd) { + // Do not do anything if showLink and showSources are not set to true in config + if(!gd._context.showLink && !gd._context.showSources) return; + var fullLayout = gd._fullLayout; var linkContainer = fullLayout._paper @@ -143060,14 +147436,15 @@ plots.supplyTraceDefaults = function(traceIn, traceOutIndex, layout, traceInInde coerce('legendgroup'); } - supplyTransformDefaults(traceIn, traceOut, layout); + plots.supplyTransformDefaults(traceIn, traceOut, layout); } return traceOut; }; -function supplyTransformDefaults(traceIn, traceOut, layout) { +plots.supplyTransformDefaults = function(traceIn, traceOut, layout) { var globalTransforms = layout._globalTransforms || []; + var transformModules = layout._transformModules || []; if(!Array.isArray(traceIn.transforms) && globalTransforms.length === 0) return; @@ -143088,7 +147465,7 @@ function supplyTransformDefaults(traceIn, traceOut, layout) { transformOut.type = type; transformOut._module = _module; - Lib.pushUnique(layout._transformModules, _module); + Lib.pushUnique(transformModules, _module); } else { transformOut = Lib.extendFlat({}, transformIn); @@ -143096,7 +147473,7 @@ function supplyTransformDefaults(traceIn, traceOut, layout) { containerOut.push(transformOut); } -} +}; function applyTransforms(fullTrace, fullData, layout, fullLayout) { var container = fullTrace.transforms, @@ -144186,6 +148563,13 @@ plots.doCalcdata = function(gd, traces) { // to be filled in later by ax.d2c for(i = 0; i < axList.length; i++) { axList[i]._categories = axList[i]._initialCategories.slice(); + + // Build the lookup map for initialized categories + axList[i]._categoriesMap = {}; + for(j = 0; j < axList[i]._categories.length; j++) { + axList[i]._categoriesMap[axList[i]._categories[j]] = j; + } + if(axList[i].type === 'category') hasCategoryAxis = true; } @@ -144230,6 +148614,8 @@ plots.doCalcdata = function(gd, traces) { axList[i]._min = []; axList[i]._max = []; axList[i]._categories = []; + // Reset the look up map + axList[i]._categoriesMap = {}; } } @@ -144248,11 +148634,8 @@ plots.doCalcdata = function(gd, traces) { // // This ensures there is a calcdata item for every trace, // even if cartesian logic doesn't handle it (for things like legends). - // - // Tag this artificial calc point with 'placeholder: true', - // to make it easier to skip over them in during the plot and hover step. if(!Array.isArray(cd) || !cd[0]) { - cd = [{x: false, y: false, placeholder: true}]; + cd = [{x: BADNUM, y: BADNUM}]; } // add the trace-wide properties to the first point, @@ -144347,7 +148730,7 @@ plots.generalUpdatePerTraceModule = function(subplot, subplotCalcData, subplotLa subplot.traceHash = traceHash; }; -},{"../components/color":575,"../components/errorbars":604,"../lib":680,"../plotly":714,"../registry":793,"./animation_attributes":715,"./attributes":717,"./command":738,"./font_attributes":739,"./frame_attributes":740,"./layout_attributes":769,"d3":104,"fast-isnumeric":113}],779:[function(require,module,exports){ +},{"../components/color":585,"../components/errorbars":614,"../constants/numerical":672,"../lib":690,"../plotly":724,"../registry":807,"./animation_attributes":725,"./attributes":727,"./command":752,"./font_attributes":753,"./frame_attributes":754,"./layout_attributes":783,"d3":114,"fast-isnumeric":123}],793:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144372,7 +148755,7 @@ module.exports = { } }; -},{"../../traces/scatter/attributes":924}],780:[function(require,module,exports){ +},{"../../traces/scatter/attributes":947}],794:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144522,7 +148905,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../cartesian/layout_attributes":728}],781:[function(require,module,exports){ +},{"../../lib/extend":682,"../cartesian/layout_attributes":740}],795:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144537,7 +148920,7 @@ var Polar = module.exports = require('./micropolar'); Polar.manager = require('./micropolar_manager'); -},{"./micropolar":782,"./micropolar_manager":783}],782:[function(require,module,exports){ +},{"./micropolar":796,"./micropolar_manager":797}],796:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145956,7 +150339,7 @@ var µ = module.exports = { version: '0.2.2' }; return exports; }; -},{"../../lib":680,"d3":104}],783:[function(require,module,exports){ +},{"../../lib":690,"d3":114}],797:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146042,7 +150425,7 @@ manager.fillLayout = function(_gd) { _gd._fullLayout = extendDeepAll(dflts, _gd.layout); }; -},{"../../components/color":575,"../../lib":680,"./micropolar":782,"./undo_manager":784,"d3":104}],784:[function(require,module,exports){ +},{"../../components/color":585,"../../lib":690,"./micropolar":796,"./undo_manager":798,"d3":114}],798:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146108,7 +150491,7 @@ module.exports = function UndoManager() { }; }; -},{}],785:[function(require,module,exports){ +},{}],799:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146183,7 +150566,7 @@ module.exports = function handleSubplotDefaults(layoutIn, layoutOut, fullData, o } }; -},{"../lib":680,"./plots":778}],786:[function(require,module,exports){ +},{"../lib":690,"./plots":792}],800:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146257,7 +150640,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) } }; -},{"../../plots/plots":778,"./layout/attributes":787,"./layout/defaults":790,"./layout/layout_attributes":791,"./ternary":792}],787:[function(require,module,exports){ +},{"../../plots/plots":792,"./layout/attributes":801,"./layout/defaults":804,"./layout/layout_attributes":805,"./ternary":806}],801:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146283,7 +150666,7 @@ module.exports = { } }; -},{}],788:[function(require,module,exports){ +},{}],802:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146348,7 +150731,7 @@ module.exports = { } }; -},{"../../../lib/extend":672,"../../cartesian/layout_attributes":728}],789:[function(require,module,exports){ +},{"../../../lib/extend":682,"../../cartesian/layout_attributes":740}],803:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146432,7 +150815,7 @@ module.exports = function supplyLayoutDefaults(containerIn, containerOut, option } }; -},{"../../../lib":680,"../../cartesian/tick_label_defaults":734,"../../cartesian/tick_mark_defaults":735,"../../cartesian/tick_value_defaults":736,"./axis_attributes":788,"tinycolor2":511}],790:[function(require,module,exports){ +},{"../../../lib":690,"../../cartesian/tick_label_defaults":747,"../../cartesian/tick_mark_defaults":748,"../../cartesian/tick_value_defaults":749,"./axis_attributes":802,"tinycolor2":521}],804:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146474,7 +150857,7 @@ function handleTernaryDefaults(ternaryLayoutIn, ternaryLayoutOut, coerce, option for(var j = 0; j < axesNames.length; j++) { axName = axesNames[j]; containerIn = ternaryLayoutIn[axName] || {}; - containerOut = ternaryLayoutOut[axName] = {_name: axName}; + containerOut = ternaryLayoutOut[axName] = {_name: axName, type: 'linear'}; handleAxisDefaults(containerIn, containerOut, options); } @@ -146495,7 +150878,7 @@ function handleTernaryDefaults(ternaryLayoutIn, ternaryLayoutOut, coerce, option } } -},{"../../../components/color":575,"../../subplot_defaults":785,"./axis_defaults":789,"./layout_attributes":791}],791:[function(require,module,exports){ +},{"../../../components/color":585,"../../subplot_defaults":799,"./axis_defaults":803,"./layout_attributes":805}],805:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146560,7 +150943,7 @@ module.exports = { caxis: ternaryAxesAttrs }; -},{"../../../components/color/attributes":574,"./axis_attributes":788}],792:[function(require,module,exports){ +},{"../../../components/color/attributes":584,"./axis_attributes":802}],806:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147203,7 +151586,7 @@ function removeZoombox(gd) { .remove(); } -},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../components/titles":651,"../../lib":680,"../../lib/extend":672,"../../plotly":714,"../cartesian/axes":719,"../cartesian/constants":724,"../cartesian/graph_interact":726,"../cartesian/select":732,"../cartesian/set_convert":733,"../plots":778,"d3":104,"tinycolor2":511}],793:[function(require,module,exports){ +},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../components/titles":661,"../../lib":690,"../../lib/extend":682,"../../plotly":724,"../cartesian/axes":729,"../cartesian/constants":734,"../cartesian/graph_interact":738,"../cartesian/select":745,"../cartesian/set_convert":746,"../plots":792,"d3":114,"tinycolor2":521}],807:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147394,7 +151777,7 @@ function getTraceType(traceType) { return traceType; } -},{"./lib/loggers":683,"./lib/noop":687,"./lib/push_unique":691,"./plots/attributes":717}],794:[function(require,module,exports){ +},{"./lib/loggers":693,"./lib/noop":697,"./lib/push_unique":701,"./plots/attributes":727}],808:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147564,7 +151947,7 @@ module.exports = function clonePlot(graphObj, options) { return plotTile; }; -},{"../lib":680,"../plots/plots":778}],795:[function(require,module,exports){ +},{"../lib":690,"../plots/plots":792}],809:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147630,7 +152013,7 @@ function downloadImage(gd, opts) { module.exports = downloadImage; -},{"../lib":680,"../plot_api/to_image":712,"./filesaver":796}],796:[function(require,module,exports){ +},{"../lib":690,"../plot_api/to_image":722,"./filesaver":810}],810:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147698,7 +152081,7 @@ var fileSaver = function(url, name) { module.exports = fileSaver; -},{}],797:[function(require,module,exports){ +},{}],811:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147731,7 +152114,7 @@ exports.getRedrawFunc = function(gd) { }; }; -},{}],798:[function(require,module,exports){ +},{}],812:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147757,7 +152140,7 @@ var Snapshot = { module.exports = Snapshot; -},{"./cloneplot":794,"./download":795,"./helpers":797,"./svgtoimg":799,"./toimage":800,"./tosvg":801}],799:[function(require,module,exports){ +},{"./cloneplot":808,"./download":809,"./helpers":811,"./svgtoimg":813,"./toimage":814,"./tosvg":815}],813:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147888,7 +152271,7 @@ function svgToImg(opts) { module.exports = svgToImg; -},{"../lib":680,"events":111}],800:[function(require,module,exports){ +},{"../lib":690,"events":121}],814:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147968,7 +152351,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":680,"../plotly":714,"./cloneplot":794,"./helpers":797,"./svgtoimg":799,"./tosvg":801,"events":111}],801:[function(require,module,exports){ +},{"../lib":690,"../plotly":724,"./cloneplot":808,"./helpers":811,"./svgtoimg":813,"./tosvg":815,"events":121}],815:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148087,7 +152470,7 @@ module.exports = function toSVG(gd, format) { return s; }; -},{"../components/color":575,"../components/drawing":598,"../constants/xmlns_namespaces":664,"../lib/svg_text_utils":699,"d3":104}],802:[function(require,module,exports){ +},{"../components/color":585,"../components/drawing":608,"../constants/xmlns_namespaces":674,"../lib/svg_text_utils":709,"d3":114}],816:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148105,6 +152488,7 @@ var mergeArray = require('../../lib').mergeArray; // arrayOk attributes, merge them into calcdata array module.exports = function arraysToCalcdata(cd, trace) { mergeArray(trace.text, cd, 'tx'); + mergeArray(trace.hovertext, cd, 'htx'); var marker = trace.marker; if(marker) { @@ -148119,7 +152503,7 @@ module.exports = function arraysToCalcdata(cd, trace) { } }; -},{"../../lib":680}],803:[function(require,module,exports){ +},{"../../lib":690}],817:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148171,6 +152555,7 @@ module.exports = { dy: scatterAttrs.dy, text: scatterAttrs.text, + hovertext: scatterAttrs.hovertext, textposition: { valType: 'enumerated', @@ -148268,7 +152653,7 @@ module.exports = { } }; -},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/errorbars/attributes":600,"../../lib/extend":672,"../../plots/font_attributes":739,"../scatter/attributes":924}],804:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/errorbars/attributes":610,"../../lib/extend":682,"../../plots/font_attributes":753,"../scatter/attributes":947}],818:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148320,18 +152705,11 @@ module.exports = function calc(gd, trace) { // create the "calculated data" to plot var serieslen = Math.min(pos.length, size.length), - cd = []; + cd = new Array(serieslen); - // set position + // set position and size for(i = 0; i < serieslen; i++) { - - // add bars with non-numeric sizes to calcdata - // so that ensure that traces with gaps are - // plotted in the correct order - - if(isNumeric(pos[i])) { - cd.push({p: pos[i]}); - } + cd[i] = { p: pos[i], s: size[i] }; } // set base @@ -148355,13 +152733,6 @@ module.exports = function calc(gd, trace) { } } - // set size - for(i = 0; i < cd.length; i++) { - if(isNumeric(size[i])) { - cd[i].s = size[i]; - } - } - // auto-z and autocolorscale if applicable if(hasColorscale(trace, 'marker')) { colorscaleCalc(trace, trace.marker.color, 'marker', 'c'); @@ -148375,7 +152746,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"../../plots/cartesian/axes":719,"./arrays_to_calcdata":802,"fast-isnumeric":113}],805:[function(require,module,exports){ +},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"../../plots/cartesian/axes":729,"./arrays_to_calcdata":816,"fast-isnumeric":123}],819:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148415,6 +152786,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('width'); coerce('text'); + coerce('hovertext'); var textPosition = coerce('textposition'); @@ -148434,7 +152806,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, Color.defaultLine, {axis: 'x', inherit: 'y'}); }; -},{"../../components/color":575,"../../components/errorbars/defaults":603,"../../lib":680,"../bar/style_defaults":814,"../scatter/xy_defaults":946,"./attributes":803}],806:[function(require,module,exports){ +},{"../../components/color":585,"../../components/errorbars/defaults":613,"../../lib":690,"../bar/style_defaults":828,"../scatter/xy_defaults":969,"./attributes":817}],820:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148452,42 +152824,57 @@ var Color = require('../../components/color'); module.exports = function hoverPoints(pointData, xval, yval, hovermode) { - var cd = pointData.cd, - trace = cd[0].trace, - t = cd[0].t, - xa = pointData.xa, - ya = pointData.ya, - barDelta = (hovermode === 'closest') ? - t.barwidth / 2 : - t.bargroupwidth / 2, - barPos; + var cd = pointData.cd; + var trace = cd[0].trace; + var t = cd[0].t; + var xa = pointData.xa; + var ya = pointData.ya; + + var posVal, thisBarMinPos, thisBarMaxPos, minPos, maxPos, dx, dy; - if(hovermode !== 'closest') barPos = function(di) { return di.p; }; - else if(trace.orientation === 'h') barPos = function(di) { return di.y; }; - else barPos = function(di) { return di.x; }; + var positionFn = function(di) { + return Fx.inbox(minPos(di) - posVal, maxPos(di) - posVal); + }; - var dx, dy; if(trace.orientation === 'h') { + posVal = yval; + thisBarMinPos = function(di) { return di.y - di.w / 2; }; + thisBarMaxPos = function(di) { return di.y + di.w / 2; }; dx = function(di) { // add a gradient so hovering near the end of a // bar makes it a little closer match return Fx.inbox(di.b - xval, di.x - xval) + (di.x - xval) / (di.x - di.b); }; - dy = function(di) { - var centerPos = barPos(di) - yval; - return Fx.inbox(centerPos - barDelta, centerPos + barDelta); - }; + dy = positionFn; } else { + posVal = xval; + thisBarMinPos = function(di) { return di.x - di.w / 2; }; + thisBarMaxPos = function(di) { return di.x + di.w / 2; }; dy = function(di) { return Fx.inbox(di.b - yval, di.y - yval) + (di.y - yval) / (di.y - di.b); }; - dx = function(di) { - var centerPos = barPos(di) - xval; - return Fx.inbox(centerPos - barDelta, centerPos + barDelta); - }; + dx = positionFn; } + minPos = (hovermode === 'closest') ? + thisBarMinPos : + function(di) { + /* + * In compare mode, accept a bar if you're on it *or* its group. + * Nearly always it's the group that matters, but in case the bar + * was explicitly set wider than its group we'd better accept the + * whole bar. + */ + return Math.min(thisBarMinPos(di), di.p - t.bargroupwidth / 2); + }; + + maxPos = (hovermode === 'closest') ? + thisBarMaxPos : + function(di) { + return Math.max(thisBarMaxPos(di), di.p + t.bargroupwidth / 2); + }; + var distfn = Fx.getDistanceFunction(hovermode, dx, dy); Fx.getClosest(cd, distfn, pointData); @@ -148495,7 +152882,8 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { if(pointData.index === false) return; // the closest data point - var di = cd[pointData.index], + var index = pointData.index, + di = cd[index], mc = di.mcc || trace.marker.color, mlc = di.mlcc || trace.marker.line.color, mlw = di.mlw || trace.marker.line.width; @@ -148507,27 +152895,30 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { pointData.x0 = pointData.x1 = xa.c2p(di.x, true); pointData.xLabelVal = size; - pointData.y0 = ya.c2p(barPos(di) - barDelta, true); - pointData.y1 = ya.c2p(barPos(di) + barDelta, true); + pointData.y0 = ya.c2p(minPos(di), true); + pointData.y1 = ya.c2p(maxPos(di), true); pointData.yLabelVal = di.p; } else { pointData.y0 = pointData.y1 = ya.c2p(di.y, true); pointData.yLabelVal = size; - pointData.x0 = xa.c2p(barPos(di) - barDelta, true); - pointData.x1 = xa.c2p(barPos(di) + barDelta, true); + pointData.x0 = xa.c2p(minPos(di), true); + pointData.x1 = xa.c2p(maxPos(di), true); pointData.xLabelVal = di.p; } - if(di.tx) pointData.text = di.tx; + if(di.htx) pointData.text = di.htx; + else if(trace.hovertext) pointData.text = trace.hovertext; + else if(di.tx) pointData.text = di.tx; + else if(trace.text) pointData.text = trace.text; ErrorBars.hoverInfo(di, trace, pointData); return [pointData]; }; -},{"../../components/color":575,"../../components/errorbars":604,"../../plots/cartesian/graph_interact":726}],807:[function(require,module,exports){ +},{"../../components/color":585,"../../components/errorbars":614,"../../plots/cartesian/graph_interact":738}],821:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148568,7 +152959,7 @@ Bar.meta = { module.exports = Bar; -},{"../../plots/cartesian":727,"../scatter/colorbar":927,"./arrays_to_calcdata":802,"./attributes":803,"./calc":804,"./defaults":805,"./hover":806,"./layout_attributes":808,"./layout_defaults":809,"./plot":810,"./set_positions":811,"./style":813}],808:[function(require,module,exports){ +},{"../../plots/cartesian":739,"../scatter/colorbar":950,"./arrays_to_calcdata":816,"./attributes":817,"./calc":818,"./defaults":819,"./hover":820,"./layout_attributes":822,"./layout_defaults":823,"./plot":824,"./set_positions":825,"./style":827}],822:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148633,7 +153024,7 @@ module.exports = { } }; -},{}],809:[function(require,module,exports){ +},{}],823:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148691,7 +153082,7 @@ module.exports = function(layoutIn, layoutOut, fullData) { coerce('bargroupgap'); }; -},{"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793,"./layout_attributes":808}],810:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807,"./layout_attributes":822}],824:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148742,9 +153133,7 @@ module.exports = function plot(gd, plotinfo, cdbar) { var t = d[0].t, trace = d[0].trace, poffset = t.poffset, - poffsetIsArray = Array.isArray(poffset), - barwidth = t.barwidth, - barwidthIsArray = Array.isArray(barwidth); + poffsetIsArray = Array.isArray(poffset); d3.select(this).selectAll('g.point') .data(Lib.identity) @@ -148755,7 +153144,7 @@ module.exports = function plot(gd, plotinfo, cdbar) { // log values go off-screen by plotwidth // so you see them continue if you drag the plot var p0 = di.p + ((poffsetIsArray) ? poffset[i] : poffset), - p1 = p0 + ((barwidthIsArray) ? barwidth[i] : barwidth), + p1 = p0 + di.w, s0 = di.b, s1 = s0 + di.s; @@ -149213,7 +153602,7 @@ function coerceColor(attributeDefinition, value, defaultValue) { attributeDefinition.dflt; } -},{"../../components/color":575,"../../components/drawing":598,"../../components/errorbars":604,"../../lib":680,"../../lib/svg_text_utils":699,"./attributes":803,"d3":104,"fast-isnumeric":113,"tinycolor2":511}],811:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"../../components/errorbars":614,"../../lib":690,"../../lib/svg_text_utils":709,"./attributes":817,"d3":114,"fast-isnumeric":123,"tinycolor2":521}],825:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149226,6 +153615,7 @@ function coerceColor(attributeDefinition, value, defaultValue) { 'use strict'; var isNumeric = require('fast-isnumeric'); +var BADNUM = require('../../constants/numerical').BADNUM; var Registry = require('../../registry'); var Axes = require('../../plots/cartesian/axes'); @@ -149253,8 +153643,7 @@ module.exports = function setPositions(gd, plotinfo) { fullTrace.visible === true && Registry.traceIs(fullTrace, 'bar') && fullTrace.xaxis === xa._id && - fullTrace.yaxis === ya._id && - !calcTraces[i][0].placeholder + fullTrace.yaxis === ya._id ) { if(fullTrace.orientation === 'h') { calcTracesHorizontal.push(calcTraces[i]); @@ -149404,7 +153793,7 @@ function setGroupPositionsInStackOrRelativeMode(gd, pa, sa, calcTraces) { for(var j = 0; j < calcTrace.length; j++) { var bar = calcTrace[j]; - if(!isNumeric(bar.s)) continue; + if(bar.s === BADNUM) continue; var isOutmostBar = ((bar.b + bar.s) === sieve.get(bar.p, bar.s)); if(isOutmostBar) bar._outmost = true; @@ -149452,7 +153841,7 @@ function setOffsetAndWidth(gd, pa, sieve) { applyAttributes(sieve); // store the bar center in each calcdata item - setBarCenter(gd, pa, sieve); + setBarCenterAndWidth(gd, pa, sieve); // update position axes updatePositionAxis(gd, pa, sieve); @@ -149502,7 +153891,7 @@ function setOffsetAndWidthInGroupMode(gd, pa, sieve) { applyAttributes(sieve); // store the bar center in each calcdata item - setBarCenter(gd, pa, sieve); + setBarCenterAndWidth(gd, pa, sieve); // update position axes updatePositionAxis(gd, pa, sieve, overlap); @@ -149593,7 +153982,7 @@ function applyAttributes(sieve) { } -function setBarCenter(gd, pa, sieve) { +function setBarCenterAndWidth(gd, pa, sieve) { var calcTraces = sieve.traces, pLetter = getAxisLetter(pa); @@ -149608,9 +153997,13 @@ function setBarCenter(gd, pa, sieve) { for(var j = 0; j < calcTrace.length; j++) { var calcBar = calcTrace[j]; + // store the actual bar width and position, for use by hover + var width = calcBar.w = (barwidthIsArray) ? barwidth[j] : barwidth; calcBar[pLetter] = calcBar.p + ((poffsetIsArray) ? poffset[j] : poffset) + - ((barwidthIsArray) ? barwidth[j] : barwidth) / 2; + width / 2; + + } } } @@ -149718,7 +154111,7 @@ function stackBars(gd, sa, sieve) { for(j = 0; j < trace.length; j++) { bar = trace[j]; - if(!isNumeric(bar.s)) continue; + if(bar.s === BADNUM) continue; // stack current bar and get previous sum var barBase = sieve.put(bar.p, bar.b + bar.s), @@ -149749,7 +154142,7 @@ function sieveBars(gd, sa, sieve) { for(var j = 0; j < trace.length; j++) { var bar = trace[j]; - if(isNumeric(bar.s)) sieve.put(bar.p, bar.b + bar.s); + if(bar.s !== BADNUM) sieve.put(bar.p, bar.b + bar.s); } } } @@ -149785,7 +154178,7 @@ function normalizeBars(gd, sa, sieve) { for(var j = 0; j < trace.length; j++) { var bar = trace[j]; - if(!isNumeric(bar.s)) continue; + if(bar.s === BADNUM) continue; var scale = Math.abs(sTop / sieve.get(bar.p, bar.s)); bar.b *= scale; @@ -149809,7 +154202,7 @@ function getAxisLetter(ax) { return ax._id.charAt(0); } -},{"../../plots/cartesian/axes":719,"../../registry":793,"./sieve.js":812,"fast-isnumeric":113}],812:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../plots/cartesian/axes":729,"../../registry":807,"./sieve.js":826,"fast-isnumeric":123}],826:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149823,6 +154216,7 @@ function getAxisLetter(ax) { module.exports = Sieve; var Lib = require('../../lib'); +var BADNUM = require('../../constants/numerical').BADNUM; /** * Helper class to sieve data from traces into bins @@ -149846,7 +154240,7 @@ function Sieve(traces, separateNegativeValues, dontMergeOverlappingData) { var trace = traces[i]; for(var j = 0; j < trace.length; j++) { var bar = trace[j]; - positions.push(bar.p); + if(bar.p !== BADNUM) positions.push(bar.p); } } this.positions = positions; @@ -149910,7 +154304,7 @@ Sieve.prototype.getLabel = function getLabel(position, value) { return prefix + label; }; -},{"../../lib":680}],813:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690}],827:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149988,7 +154382,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/color":575,"../../components/drawing":598,"../../components/errorbars":604,"d3":104}],814:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"../../components/errorbars":614,"d3":114}],828:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150025,7 +154419,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, default coerce('marker.line.width'); }; -},{"../../components/color":575,"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588}],815:[function(require,module,exports){ +},{"../../components/color":585,"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598}],829:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150205,7 +154599,7 @@ module.exports = { fillcolor: scatterAttrs.fillcolor }; -},{"../../components/color/attributes":574,"../../lib/extend":672,"../scatter/attributes":924}],816:[function(require,module,exports){ +},{"../../components/color/attributes":584,"../../lib/extend":682,"../scatter/attributes":947}],830:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150354,7 +154748,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../lib":680,"../../plots/cartesian/axes":719,"fast-isnumeric":113}],817:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"fast-isnumeric":123}],831:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150427,7 +154821,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/color":575,"../../lib":680,"../../registry":793,"./attributes":815}],818:[function(require,module,exports){ +},{"../../components/color":585,"../../lib":690,"../../registry":807,"./attributes":829}],832:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150536,7 +154930,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return closeData; }; -},{"../../components/color":575,"../../lib":680,"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726}],819:[function(require,module,exports){ +},{"../../components/color":585,"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738}],833:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150582,7 +154976,7 @@ Box.meta = { module.exports = Box; -},{"../../plots/cartesian":727,"./attributes":815,"./calc":816,"./defaults":817,"./hover":818,"./layout_attributes":820,"./layout_defaults":821,"./plot":822,"./set_positions":823,"./style":824}],820:[function(require,module,exports){ +},{"../../plots/cartesian":739,"./attributes":829,"./calc":830,"./defaults":831,"./hover":832,"./layout_attributes":834,"./layout_defaults":835,"./plot":836,"./set_positions":837,"./style":838}],834:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150633,7 +155027,7 @@ module.exports = { } }; -},{}],821:[function(require,module,exports){ +},{}],835:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150667,7 +155061,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { coerce('boxgroupgap'); }; -},{"../../lib":680,"../../registry":793,"./layout_attributes":820}],822:[function(require,module,exports){ +},{"../../lib":690,"../../registry":807,"./layout_attributes":834}],836:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150907,7 +155301,7 @@ module.exports = function plot(gd, plotinfo, cdbox) { }); }; -},{"../../components/drawing":598,"../../lib":680,"d3":104}],823:[function(require,module,exports){ +},{"../../components/drawing":608,"../../lib":690,"d3":114}],837:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151001,7 +155395,7 @@ module.exports = function setPositions(gd, plotinfo) { } }; -},{"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793}],824:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807}],838:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151040,7 +155434,7 @@ module.exports = function style(gd) { }); }; -},{"../../components/color":575,"../../components/drawing":598,"d3":104}],825:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"d3":114}],839:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151098,7 +155492,7 @@ module.exports = { whiskerwidth: Lib.extendFlat({}, boxAttrs.whiskerwidth, { dflt: 0 }) }; -},{"../../lib":680,"../box/attributes":815,"../ohlc/attributes":891}],826:[function(require,module,exports){ +},{"../../lib":690,"../box/attributes":829,"../ohlc/attributes":905}],840:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151146,7 +155540,7 @@ function handleDirection(traceIn, traceOut, coerce, direction) { coerce(direction + '.fillcolor'); } -},{"../../lib":680,"../ohlc/direction_defaults":893,"../ohlc/helpers":894,"../ohlc/ohlc_defaults":896,"./attributes":825}],827:[function(require,module,exports){ +},{"../../lib":690,"../ohlc/direction_defaults":907,"../ohlc/helpers":908,"../ohlc/ohlc_defaults":910,"./attributes":839}],841:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151188,7 +155582,7 @@ module.exports = { register(require('../box')); register(require('./transform')); -},{"../../plot_api/register":709,"../../plots/cartesian":727,"../box":819,"./attributes":825,"./defaults":826,"./transform":828}],828:[function(require,module,exports){ +},{"../../plot_api/register":719,"../../plots/cartesian":739,"../box":833,"./attributes":839,"./defaults":840,"./transform":842}],842:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151316,7 +155710,7 @@ exports.calcTransform = function calcTransform(gd, trace, opts) { trace.y = y; }; -},{"../../lib":680,"../ohlc/helpers":894}],829:[function(require,module,exports){ +},{"../../lib":690,"../ohlc/helpers":908}],843:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151367,7 +155761,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../../plots/attributes":717,"../scattergeo/attributes":953}],830:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../../plots/attributes":727,"../scattergeo/attributes":976}],844:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151386,7 +155780,7 @@ module.exports = function calc(gd, trace) { colorscaleCalc(trace, trace.z, '', 'z'); }; -},{"../../components/colorscale/calc":581}],831:[function(require,module,exports){ +},{"../../components/colorscale/calc":591}],845:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151441,7 +155835,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('hoverinfo', (layout._dataLength === 1) ? 'location+z+text' : undefined); }; -},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":829}],832:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":843}],846:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151460,7 +155854,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],833:[function(require,module,exports){ +},{}],847:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151530,7 +155924,7 @@ function makeHoverInfo(pointData, trace, pt, axis) { pointData.extraText = text.join('
'); } -},{"../../plots/cartesian/axes":719,"./attributes":829}],834:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"./attributes":843}],848:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151567,7 +155961,7 @@ Choropleth.meta = { module.exports = Choropleth; -},{"../../plots/geo":743,"../heatmap/colorbar":854,"./attributes":829,"./calc":830,"./defaults":831,"./event_data":832,"./hover":833,"./plot":835}],835:[function(require,module,exports){ +},{"../../plots/geo":757,"../heatmap/colorbar":868,"./attributes":843,"./calc":844,"./defaults":845,"./event_data":846,"./hover":847,"./plot":849}],849:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151701,7 +156095,7 @@ function style(geo) { }); } -},{"../../components/color":575,"../../components/colorscale":589,"../../components/drawing":598,"../../lib/array_to_calc_item":667,"../../lib/geo_location_utils":675,"../../lib/topojson_utils":701,"../../plots/geo/constants":741,"d3":104}],836:[function(require,module,exports){ +},{"../../components/color":585,"../../components/colorscale":599,"../../components/drawing":608,"../../lib/array_to_calc_item":677,"../../lib/geo_location_utils":685,"../../lib/topojson_utils":711,"../../plots/geo/constants":755,"d3":114}],850:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151836,7 +156230,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../heatmap/attributes":851,"../scatter/attributes":924}],837:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../heatmap/attributes":865,"../scatter/attributes":947}],851:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151940,7 +156334,7 @@ function autoContours(start, end, ncontours) { return dummyAx; } -},{"../../lib":680,"../../plots/cartesian/axes":719,"../heatmap/calc":852}],838:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../heatmap/calc":866}],852:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152002,7 +156396,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":578,"../../plots/plots":778,"./end_plus":842,"./make_color_map":846}],839:[function(require,module,exports){ +},{"../../components/colorbar/draw":588,"../../plots/plots":792,"./end_plus":856,"./make_color_map":860}],853:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152042,7 +156436,7 @@ module.exports.CHOOSESADDLE = { // substitute to be used up later? module.exports.SADDLEREMAINDER = {1: 4, 2: 8, 4: 1, 7: 13, 8: 2, 11: 14, 13: 7, 14: 11}; -},{}],840:[function(require,module,exports){ +},{}],854:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152074,7 +156468,7 @@ module.exports = function handleContourDefaults(traceIn, traceOut, coerce) { if(autoContour || !contourSize) coerce('ncontours'); }; -},{"../../lib":680,"./attributes":836}],841:[function(require,module,exports){ +},{"../../lib":690,"./attributes":850}],855:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152113,7 +156507,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout handleStyleDefaults(traceIn, traceOut, coerce, layout); }; -},{"../../lib":680,"../heatmap/has_columns":858,"../heatmap/xyz_defaults":866,"./attributes":836,"./contours_defaults":840,"./style_defaults":850}],842:[function(require,module,exports){ +},{"../../lib":690,"../heatmap/has_columns":872,"../heatmap/xyz_defaults":880,"./attributes":850,"./contours_defaults":854,"./style_defaults":864}],856:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152133,7 +156527,7 @@ module.exports = function endPlus(contours) { return contours.end + contours.size / 1e6; }; -},{}],843:[function(require,module,exports){ +},{}],857:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152403,7 +156797,7 @@ function getInterpPx(pi, loc, step) { } } -},{"../../lib":680,"./constants":839}],844:[function(require,module,exports){ +},{"../../lib":690,"./constants":853}],858:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152422,7 +156816,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return heatmapHoverPoints(pointData, xval, yval, hovermode, true); }; -},{"../heatmap/hover":859}],845:[function(require,module,exports){ +},{"../heatmap/hover":873}],859:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152463,7 +156857,7 @@ Contour.meta = { module.exports = Contour; -},{"../../plots/cartesian":727,"./attributes":836,"./calc":837,"./colorbar":838,"./defaults":841,"./hover":844,"./plot":848,"./style":849}],846:[function(require,module,exports){ +},{"../../plots/cartesian":739,"./attributes":850,"./calc":851,"./colorbar":852,"./defaults":855,"./hover":858,"./plot":862,"./style":863}],860:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152542,7 +156936,7 @@ module.exports = function makeColorMap(trace) { }); }; -},{"../../components/colorscale":589,"./end_plus":842,"d3":104}],847:[function(require,module,exports){ +},{"../../components/colorscale":599,"./end_plus":856,"d3":114}],861:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152634,7 +157028,7 @@ function getMarchingIndex(val, corners) { return (mi === 15) ? 0 : mi; } -},{"./constants":839}],848:[function(require,module,exports){ +},{"./constants":853}],862:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152996,7 +157390,7 @@ function makeClipMask(cd0) { return z; } -},{"../../components/drawing":598,"../../lib":680,"../heatmap/plot":864,"./end_plus":842,"./find_all_paths":843,"./make_crossings":847,"d3":104}],849:[function(require,module,exports){ +},{"../../components/drawing":608,"../../lib":690,"../heatmap/plot":878,"./end_plus":856,"./find_all_paths":857,"./make_crossings":861,"d3":114}],863:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153058,7 +157452,7 @@ module.exports = function style(gd) { heatmapStyle(gd); }; -},{"../../components/drawing":598,"../heatmap/style":865,"./make_color_map":846,"d3":104}],850:[function(require,module,exports){ +},{"../../components/drawing":608,"../heatmap/style":879,"./make_color_map":860,"d3":114}],864:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153094,7 +157488,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout) } }; -},{"../../components/colorscale/defaults":584}],851:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594}],865:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153194,7 +157588,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../scatter/attributes":924}],852:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../scatter/attributes":947}],866:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153336,7 +157730,7 @@ module.exports = function calc(gd, trace) { return [cd0]; }; -},{"../../components/colorscale/calc":581,"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793,"../histogram2d/calc":880,"./clean_2d_array":853,"./convert_column_xyz":855,"./find_empties":857,"./has_columns":858,"./interp2d":861,"./make_bound_array":862,"./max_row_length":863}],853:[function(require,module,exports){ +},{"../../components/colorscale/calc":591,"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807,"../histogram2d/calc":894,"./clean_2d_array":867,"./convert_column_xyz":869,"./find_empties":871,"./has_columns":872,"./interp2d":875,"./make_bound_array":876,"./max_row_length":877}],867:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153381,7 +157775,7 @@ module.exports = function clean2dArray(zOld, transpose) { return zNew; }; -},{"fast-isnumeric":113}],854:[function(require,module,exports){ +},{"fast-isnumeric":123}],868:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153432,7 +157826,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],855:[function(require,module,exports){ +},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],869:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153494,7 +157888,7 @@ module.exports = function convertColumnXYZ(trace, xa, ya) { if(hasColumnText) trace.text = text; }; -},{"../../constants/numerical":662,"../../lib":680}],856:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690}],870:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153539,7 +157933,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'}); }; -},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":851,"./has_columns":858,"./xyz_defaults":866}],857:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":865,"./has_columns":872,"./xyz_defaults":880}],871:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153645,7 +158039,7 @@ module.exports = function findEmpties(z) { return empties.sort(function(a, b) { return b[2] - a[2]; }); }; -},{"./max_row_length":863}],858:[function(require,module,exports){ +},{"./max_row_length":877}],872:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153661,7 +158055,7 @@ module.exports = function(trace) { return !Array.isArray(trace.z[0]); }; -},{}],859:[function(require,module,exports){ +},{}],873:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153779,7 +158173,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, contour) })]; }; -},{"../../lib":680,"../../plots/cartesian/constants":724,"../../plots/cartesian/graph_interact":726}],860:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/constants":734,"../../plots/cartesian/graph_interact":738}],874:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153834,7 +158228,7 @@ Heatmap.meta = { module.exports = Heatmap; -},{"../../plots/cartesian":727,"./attributes":851,"./calc":852,"./colorbar":854,"./defaults":856,"./hover":859,"./plot":864,"./style":865}],861:[function(require,module,exports){ +},{"../../plots/cartesian":739,"./attributes":865,"./calc":866,"./colorbar":868,"./defaults":870,"./hover":873,"./plot":878,"./style":879}],875:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153966,7 +158360,7 @@ function iterateInterp2d(z, emptyPoints, overshoot) { return maxFractionalChange; } -},{"../../lib":680}],862:[function(require,module,exports){ +},{"../../lib":690}],876:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154048,7 +158442,7 @@ module.exports = function makeBoundArray(trace, arrayIn, v0In, dvIn, numbricks, return arrayOut; }; -},{"../../registry":793}],863:[function(require,module,exports){ +},{"../../registry":807}],877:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154070,7 +158464,7 @@ module.exports = function maxRowLength(z) { return len; }; -},{}],864:[function(require,module,exports){ +},{}],878:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154539,7 +158933,7 @@ function plotOne(gd, plotinfo, cd) { image3.exit().remove(); } -},{"../../components/colorscale":589,"../../constants/xmlns_namespaces":664,"../../lib":680,"../../registry":793,"./max_row_length":863,"tinycolor2":511}],865:[function(require,module,exports){ +},{"../../components/colorscale":599,"../../constants/xmlns_namespaces":674,"../../lib":690,"../../registry":807,"./max_row_length":877,"tinycolor2":521}],879:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154560,7 +158954,7 @@ module.exports = function style(gd) { }); }; -},{"d3":104}],866:[function(require,module,exports){ +},{"d3":114}],880:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154653,7 +159047,7 @@ function isValidZ(z) { return (allRowsAreArrays && oneRowIsFilled && hasOneNumber); } -},{"../../registry":793,"./has_columns":858,"fast-isnumeric":113}],867:[function(require,module,exports){ +},{"../../registry":807,"./has_columns":872,"fast-isnumeric":123}],881:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154695,7 +159089,7 @@ extendFlat( module.exports = attrs; -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../heatmap/attributes":851}],868:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../heatmap/attributes":865}],882:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154834,7 +159228,7 @@ function createHeatmap(scene, fullTrace, calcTrace) { module.exports = createHeatmap; -},{"../../lib/str2rgbarray":698,"../../plots/cartesian/axes":719,"gl-heatmap2d":147}],869:[function(require,module,exports){ +},{"../../lib/str2rgbarray":708,"../../plots/cartesian/axes":729,"gl-heatmap2d":157}],883:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154867,7 +159261,7 @@ HeatmapGl.meta = { module.exports = HeatmapGl; -},{"../../plots/gl2d":755,"../heatmap/calc":852,"../heatmap/colorbar":854,"../heatmap/defaults":856,"./attributes":867,"./convert":868}],870:[function(require,module,exports){ +},{"../../plots/gl2d":769,"../heatmap/calc":866,"../heatmap/colorbar":868,"../heatmap/defaults":870,"./attributes":881,"./convert":882}],884:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155079,7 +159473,7 @@ function makeBinsAttr(axLetter) { }; } -},{"../bar/attributes":803}],871:[function(require,module,exports){ +},{"../bar/attributes":817}],885:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155105,7 +159499,7 @@ module.exports = function doAvg(size, counts) { return total; }; -},{}],872:[function(require,module,exports){ +},{}],886:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155138,7 +159532,7 @@ module.exports = function handleBinDefaults(traceIn, traceOut, coerce, binDirect return traceOut; }; -},{}],873:[function(require,module,exports){ +},{}],887:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155214,7 +159608,7 @@ module.exports = { } }; -},{"fast-isnumeric":113}],874:[function(require,module,exports){ +},{"fast-isnumeric":123}],888:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155445,7 +159839,7 @@ function cdf(size, direction, currentbin) { } } -},{"../../lib":680,"../../plots/cartesian/axes":719,"../bar/arrays_to_calcdata":802,"./average":871,"./bin_functions":873,"./clean_bins":875,"./norm_functions":878,"fast-isnumeric":113}],875:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../bar/arrays_to_calcdata":816,"./average":885,"./bin_functions":887,"./clean_bins":889,"./norm_functions":892,"fast-isnumeric":123}],889:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155522,7 +159916,7 @@ module.exports = function cleanBins(trace, ax, binDirection) { if(!trace[autoBinAttr]) delete trace['nbins' + binDirection]; }; -},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],876:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],890:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155584,7 +159978,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, Color.defaultLine, {axis: 'x', inherit: 'y'}); }; -},{"../../components/color":575,"../../components/errorbars/defaults":603,"../../lib":680,"../../registry":793,"../bar/style_defaults":814,"./attributes":870,"./bin_defaults":872}],877:[function(require,module,exports){ +},{"../../components/color":585,"../../components/errorbars/defaults":613,"../../lib":690,"../../registry":807,"../bar/style_defaults":828,"./attributes":884,"./bin_defaults":886}],891:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155639,7 +160033,7 @@ Histogram.meta = { module.exports = Histogram; -},{"../../plots/cartesian":727,"../bar/hover":806,"../bar/layout_attributes":808,"../bar/layout_defaults":809,"../bar/plot":810,"../bar/set_positions":811,"../bar/style":813,"../scatter/colorbar":927,"./attributes":870,"./calc":874,"./defaults":876}],878:[function(require,module,exports){ +},{"../../plots/cartesian":739,"../bar/hover":820,"../bar/layout_attributes":822,"../bar/layout_defaults":823,"../bar/plot":824,"../bar/set_positions":825,"../bar/style":827,"../scatter/colorbar":950,"./attributes":884,"./calc":888,"./defaults":890}],892:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155674,7 +160068,7 @@ module.exports = { } }; -},{}],879:[function(require,module,exports){ +},{}],893:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155726,7 +160120,7 @@ module.exports = extendFlat({}, { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../heatmap/attributes":851,"../histogram/attributes":870}],880:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../heatmap/attributes":865,"../histogram/attributes":884}],894:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155929,7 +160323,7 @@ module.exports = function calc(gd, trace) { }; }; -},{"../../lib":680,"../../plots/cartesian/axes":719,"../histogram/average":871,"../histogram/bin_functions":873,"../histogram/clean_bins":875,"../histogram/norm_functions":878}],881:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../histogram/average":885,"../histogram/bin_functions":887,"../histogram/clean_bins":889,"../histogram/norm_functions":892}],895:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155967,7 +160361,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout ); }; -},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":879,"./sample_defaults":883}],882:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":893,"./sample_defaults":897}],896:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156007,7 +160401,7 @@ Histogram2D.meta = { module.exports = Histogram2D; -},{"../../plots/cartesian":727,"../heatmap/calc":852,"../heatmap/colorbar":854,"../heatmap/hover":859,"../heatmap/plot":864,"../heatmap/style":865,"./attributes":879,"./defaults":881}],883:[function(require,module,exports){ +},{"../../plots/cartesian":739,"../heatmap/calc":866,"../heatmap/colorbar":868,"../heatmap/hover":873,"../heatmap/plot":878,"../heatmap/style":879,"./attributes":893,"./defaults":895}],897:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156047,7 +160441,7 @@ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout handleBinDefaults(traceIn, traceOut, coerce, binDirections); }; -},{"../../registry":793,"../histogram/bin_defaults":872}],884:[function(require,module,exports){ +},{"../../registry":807,"../histogram/bin_defaults":886}],898:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156089,7 +160483,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../contour/attributes":836,"../histogram2d/attributes":879}],885:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../contour/attributes":850,"../histogram2d/attributes":893}],899:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156119,7 +160513,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout handleStyleDefaults(traceIn, traceOut, coerce, layout); }; -},{"../../lib":680,"../contour/contours_defaults":840,"../contour/style_defaults":850,"../histogram2d/sample_defaults":883,"./attributes":884}],886:[function(require,module,exports){ +},{"../../lib":690,"../contour/contours_defaults":854,"../contour/style_defaults":864,"../histogram2d/sample_defaults":897,"./attributes":898}],900:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156159,7 +160553,7 @@ Histogram2dContour.meta = { module.exports = Histogram2dContour; -},{"../../plots/cartesian":727,"../contour/calc":837,"../contour/colorbar":838,"../contour/hover":844,"../contour/plot":848,"../contour/style":849,"./attributes":884,"./defaults":885}],887:[function(require,module,exports){ +},{"../../plots/cartesian":739,"../contour/calc":851,"../contour/colorbar":852,"../contour/hover":858,"../contour/plot":862,"../contour/style":863,"./attributes":898,"./defaults":899}],901:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156357,7 +160751,7 @@ module.exports = { }, surfaceAtts.lighting) }; -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../surface/attributes":980}],888:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../surface/attributes":1002}],902:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156520,7 +160914,7 @@ function createMesh3DTrace(scene, data) { module.exports = createMesh3DTrace; -},{"../../lib/str2rgbarray":698,"alpha-shape":35,"convex-hull":93,"delaunay-triangulate":105,"gl-mesh3d":186,"tinycolor2":511}],889:[function(require,module,exports){ +},{"../../lib/str2rgbarray":708,"alpha-shape":37,"convex-hull":95,"delaunay-triangulate":115,"gl-mesh3d":196,"tinycolor2":521}],903:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156621,7 +161015,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/colorbar/defaults":577,"../../lib":680,"../../registry":793,"./attributes":887}],890:[function(require,module,exports){ +},{"../../components/colorbar/defaults":587,"../../lib":690,"../../registry":807,"./attributes":901}],904:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156657,7 +161051,7 @@ Mesh3D.meta = { module.exports = Mesh3D; -},{"../../plots/gl3d":758,"../heatmap/colorbar":854,"./attributes":887,"./convert":888,"./defaults":889}],891:[function(require,module,exports){ +},{"../../plots/gl3d":772,"../heatmap/colorbar":868,"./attributes":901,"./convert":902,"./defaults":903}],905:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156792,7 +161186,7 @@ module.exports = { } }; -},{"../../lib":680,"../scatter/attributes":924}],892:[function(require,module,exports){ +},{"../../lib":690,"../scatter/attributes":947}],906:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156841,7 +161235,7 @@ function handleDirection(traceIn, traceOut, coerce, direction) { coerce(direction + '.line.dash', traceOut.line.dash); } -},{"../../lib":680,"./attributes":891,"./direction_defaults":893,"./helpers":894,"./ohlc_defaults":896}],893:[function(require,module,exports){ +},{"../../lib":690,"./attributes":905,"./direction_defaults":907,"./helpers":908,"./ohlc_defaults":910}],907:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156867,7 +161261,7 @@ module.exports = function handleDirectionDefaults(traceIn, traceOut, coerce, dir coerce(direction + '.name', nameDflt); }; -},{}],894:[function(require,module,exports){ +},{}],908:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156990,7 +161384,7 @@ exports.addRangeSlider = function(data, layout) { } }; -},{"../../lib":680}],895:[function(require,module,exports){ +},{"../../lib":690}],909:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157032,7 +161426,7 @@ module.exports = { register(require('../scatter')); register(require('./transform')); -},{"../../plot_api/register":709,"../../plots/cartesian":727,"../scatter":934,"./attributes":891,"./defaults":892,"./transform":897}],896:[function(require,module,exports){ +},{"../../plot_api/register":719,"../../plots/cartesian":739,"../scatter":957,"./attributes":905,"./defaults":906,"./transform":911}],910:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157074,7 +161468,7 @@ module.exports = function handleOHLC(traceIn, traceOut, coerce, layout) { return len; }; -},{"../../registry":793}],897:[function(require,module,exports){ +},{"../../registry":807}],911:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157333,7 +161727,7 @@ function convertTickWidth(gd, xa, trace) { return minDiff * tickWidth; } -},{"../../lib":680,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_ids":722,"./helpers":894}],898:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_ids":732,"./helpers":908}],912:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157493,7 +161887,7 @@ module.exports = { ) }; -},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/colorscale/scales":593,"../../lib/extend":672,"../../plots/cartesian/layout_attributes":728}],899:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/colorscale/scales":603,"../../lib/extend":682,"../../plots/cartesian/layout_attributes":740}],913:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157569,7 +161963,7 @@ exports.toSVG = function(gd) { }, 60); }; -},{"../../constants/xmlns_namespaces":664,"../../plots/plots":778,"./constants":902,"./plot":907,"d3":104}],900:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":674,"../../plots/plots":792,"./constants":916,"./plot":921,"d3":114}],914:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157600,7 +161994,7 @@ module.exports = function calc(gd, trace) { }]; }; -},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"../../lib":680}],901:[function(require,module,exports){ +},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"../../lib":690}],915:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157654,7 +162048,7 @@ module.exports = function colorbar(gd, cd) { .options(line.colorbar)(); }; -},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],902:[function(require,module,exports){ +},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],916:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157691,7 +162085,7 @@ module.exports = { } }; -},{}],903:[function(require,module,exports){ +},{}],917:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157793,7 +162187,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588,"../../lib":680,"./attributes":898,"./constants":902}],904:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598,"../../lib":690,"./attributes":912,"./constants":916}],918:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157826,7 +162220,7 @@ Parcoords.meta = { module.exports = Parcoords; -},{"./attributes":898,"./base_plot":899,"./calc":900,"./colorbar":901,"./defaults":903,"./plot":907}],905:[function(require,module,exports){ +},{"./attributes":912,"./base_plot":913,"./calc":914,"./colorbar":915,"./defaults":917,"./plot":921}],919:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158251,7 +162645,7 @@ module.exports = function(canvasGL, lines, canvasWidth, canvasHeight, initialDim }; }; -},{"./constants":902,"regl":477}],906:[function(require,module,exports){ +},{"./constants":916,"regl":487}],920:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159025,7 +163419,7 @@ module.exports = function(root, svg, styledData, layout, callbacks) { return tweakables; }; -},{"../../lib":680,"./constants":902,"./lines":905,"d3":104}],907:[function(require,module,exports){ +},{"../../lib":690,"./constants":916,"./lines":919,"d3":114}],921:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159145,7 +163539,7 @@ module.exports = function plot(gd, cdparcoords) { }); }; -},{"./parcoords":906}],908:[function(require,module,exports){ +},{"./parcoords":920}],922:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159227,7 +163621,27 @@ module.exports = { text: { valType: 'data_array', - description: 'Sets text elements associated with each sector.' + description: [ + 'Sets text elements associated with each sector.', + 'If trace `textinfo` contains a *text* flag, these elements will seen', + 'on the chart.', + 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,', + 'these elements will be seen in the hover labels.' + ].join(' ') + }, + hovertext: { + valType: 'string', + role: 'info', + dflt: '', + arrayOk: true, + description: [ + 'Sets hover text elements associated with each sector.', + 'If a single string, the same string appears for', + 'all data points.', + 'If an array of string, the items are mapped in order of', + 'this trace\'s sectors.', + 'To be seen, trace `hoverinfo` must contain a *text* flag.' + ].join(' ') }, // 'see eg:' @@ -159375,7 +163789,7 @@ module.exports = { } }; -},{"../../components/color/attributes":574,"../../lib/extend":672,"../../plots/attributes":717,"../../plots/font_attributes":739}],909:[function(require,module,exports){ +},{"../../components/color/attributes":584,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/font_attributes":753}],923:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159422,7 +163836,7 @@ function getCdModule(calcdata, _module) { return cdModule; } -},{"../../registry":793}],910:[function(require,module,exports){ +},{"../../registry":807}],924:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159574,7 +163988,7 @@ function nextDefaultColor(index) { return pieDefaultColors[index % pieDefaultColors.length]; } -},{"../../components/color":575,"./helpers":912,"fast-isnumeric":113,"tinycolor2":511}],911:[function(require,module,exports){ +},{"../../components/color":585,"./helpers":926,"fast-isnumeric":123,"tinycolor2":521}],925:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159622,6 +164036,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout var textData = coerce('text'); var textInfo = coerce('textinfo', Array.isArray(textData) ? 'text+percent' : 'percent'); + coerce('hovertext'); coerce('hoverinfo', (layout._dataLength === 1) ? 'label+text+value+percent' : undefined); @@ -159658,7 +164073,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('pull'); }; -},{"../../lib":680,"./attributes":908}],912:[function(require,module,exports){ +},{"../../lib":690,"./attributes":922}],926:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159687,7 +164102,7 @@ exports.formatPieValue = function formatPieValue(v, separators) { return Lib.numSeparate(vRounded, separators); }; -},{"../../lib":680}],913:[function(require,module,exports){ +},{"../../lib":690}],927:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159723,7 +164138,7 @@ Pie.meta = { module.exports = Pie; -},{"./attributes":908,"./base_plot":909,"./calc":910,"./defaults":911,"./layout_attributes":914,"./layout_defaults":915,"./plot":916,"./style":917,"./style_one":918}],914:[function(require,module,exports){ +},{"./attributes":922,"./base_plot":923,"./calc":924,"./defaults":925,"./layout_attributes":928,"./layout_defaults":929,"./plot":930,"./style":931,"./style_one":932}],928:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159743,7 +164158,7 @@ module.exports = { hiddenlabels: {valType: 'data_array'} }; -},{}],915:[function(require,module,exports){ +},{}],929:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159765,7 +164180,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { coerce('hiddenlabels'); }; -},{"../../lib":680,"./layout_attributes":914}],916:[function(require,module,exports){ +},{"../../lib":690,"./layout_attributes":928}],930:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159854,6 +164269,8 @@ module.exports = function plot(gd, cdpie) { hasHoverData = false; function handleMouseOver(evt) { + evt.originalEvent = d3.event; + // in case fullLayout or fullData has changed without a replot var fullLayout2 = gd._fullLayout, trace2 = gd._fullData[trace.index], @@ -159865,6 +164282,7 @@ module.exports = function plot(gd, cdpie) { // or if hover is turned off if(gd._dragging || fullLayout2.hovermode === false || hoverinfo === 'none' || hoverinfo === 'skip' || !hoverinfo) { + Fx.hover(gd, evt, 'pie'); return; } @@ -159875,8 +164293,16 @@ module.exports = function plot(gd, cdpie) { thisText = []; if(hoverinfo.indexOf('label') !== -1) thisText.push(pt.label); - if(trace2.text && trace2.text[pt.i] && hoverinfo.indexOf('text') !== -1) { - thisText.push(trace2.text[pt.i]); + if(hoverinfo.indexOf('text') !== -1) { + if(trace2.hovertext) { + thisText.push( + Array.isArray(trace2.hovertext) ? + trace2.hovertext[pt.i] : + trace2.hovertext + ); + } else if(trace2.text && trace2.text[pt.i]) { + thisText.push(trace2.text[pt.i]); + } } if(hoverinfo.indexOf('value') !== -1) thisText.push(helpers.formatPieValue(pt.v, separators)); if(hoverinfo.indexOf('percent') !== -1) thisText.push(helpers.formatPiePercent(pt.v / cd0.vTotal, separators)); @@ -159900,7 +164326,9 @@ module.exports = function plot(gd, cdpie) { } function handleMouseOut(evt) { + evt.originalEvent = d3.event; gd.emit('plotly_unhover', { + event: d3.event, points: [evt] }); @@ -159912,8 +164340,8 @@ module.exports = function plot(gd, cdpie) { function handleClick() { gd._hoverdata = [pt]; - gd._hoverdata.trace = cd.trace; - Fx.click(gd, { target: true }); + gd._hoverdata.trace = cd0.trace; + Fx.click(gd, d3.event); } slicePath.enter().append('path') @@ -160460,7 +164888,7 @@ function maxExtent(tilt, tiltAxisFraction, depth) { 2 * Math.sqrt(1 - sinTilt * sinTilt * tiltAxisFraction * tiltAxisFraction)); } -},{"../../components/color":575,"../../components/drawing":598,"../../lib/svg_text_utils":699,"../../plots/cartesian/graph_interact":726,"./helpers":912,"d3":104}],917:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"../../lib/svg_text_utils":709,"../../plots/cartesian/graph_interact":738,"./helpers":926,"d3":114}],931:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160489,7 +164917,7 @@ module.exports = function style(gd) { }); }; -},{"./style_one":918,"d3":104}],918:[function(require,module,exports){ +},{"./style_one":932,"d3":114}],932:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160516,7 +164944,7 @@ module.exports = function styleOne(s, pt, trace) { .call(Color.stroke, lineColor); }; -},{"../../components/color":575}],919:[function(require,module,exports){ +},{"../../components/color":585}],933:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160650,7 +165078,7 @@ module.exports = { } }; -},{"../scattergl/attributes":960}],920:[function(require,module,exports){ +},{"../scattergl/attributes":983}],934:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160882,7 +165310,7 @@ function createPointcloud(scene, data) { module.exports = createPointcloud; -},{"../../lib/str2rgbarray":698,"../scatter/get_trace_color":932,"gl-pointcloud2d":211}],921:[function(require,module,exports){ +},{"../../lib/str2rgbarray":708,"../scatter/get_trace_color":955,"gl-pointcloud2d":221}],935:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160927,7 +165355,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor) { coerce('marker.border.arearatio'); }; -},{"../../lib":680,"./attributes":919}],922:[function(require,module,exports){ +},{"../../lib":690,"./attributes":933}],936:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160960,7 +165388,1208 @@ pointcloud.meta = { module.exports = pointcloud; -},{"../../plots/gl2d":755,"../scatter3d/calc":948,"./attributes":919,"./convert":920,"./defaults":921}],923:[function(require,module,exports){ +},{"../../plots/gl2d":769,"../scatter3d/calc":971,"./attributes":933,"./convert":934,"./defaults":935}],937:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var shapeAttrs = require('../../components/shapes/attributes'); +var fontAttrs = require('../../plots/font_attributes'); +var plotAttrs = require('../../plots/attributes'); + +var extendFlat = require('../../lib/extend').extendFlat; + + +module.exports = { + hoverinfo: extendFlat({}, plotAttrs.hoverinfo, { + flags: ['label', 'text', 'value', 'percent', 'name'] + }), + domain: { + x: { + valType: 'info_array', + role: 'info', + items: [ + {valType: 'number', min: 0, max: 1}, + {valType: 'number', min: 0, max: 1} + ], + dflt: [0, 1], + description: [ + 'Sets the horizontal domain of this `sankey` trace', + '(in plot fraction).' + ].join(' ') + }, + y: { + valType: 'info_array', + role: 'info', + items: [ + {valType: 'number', min: 0, max: 1}, + {valType: 'number', min: 0, max: 1} + ], + dflt: [0, 1], + description: [ + 'Sets the vertical domain of this `sankey` trace', + '(in plot fraction).' + ].join(' ') + } + }, + + orientation: { + valType: 'enumerated', + values: ['v', 'h'], + dflt: 'h', + role: 'style', + description: 'Sets the orientation of the Sankey diagram.' + }, + + nodepad: { + valType: 'number', + min: 0, + dflt: 20, + role: 'style', + description: 'Sets the padding (in px) between the `nodes`.' + }, + + nodethickness: { + valType: 'number', + min: 1, + dflt: 20, + role: 'style', + description: 'Sets the thickness of the `nodes`.' + }, + + valueformat: { + valType: 'string', + dflt: '.3s', + role: 'style', + description: [ + 'Sets the value formatting rule using d3 formatting mini-language', + 'which is similar to those of Python. See', + 'https://github.com/d3/d3-format/blob/master/README.md#locale_format' + ].join(' ') + }, + + valueunit: { + valType: 'string', + dflt: '', + role: 'style', + description: [ + 'Adds a unit to follow the value in the hover tooltip. Add a space if a separation', + 'is necessary from the value.' + ].join(' ') + }, + + // followmouse for UX testing + followmouse: { + valType: 'boolean', + dflt: true, + role: 'style', + description: 'Sets whether the hover tooltip follows the mouse.' + }, + + textfont: fontAttrs, + + nodes: { + _isLinkedToArray: 'node', + label: { + valType: 'string', + dflt: '', + role: 'info', + description: 'The shown name of the node.' + }, + visible: shapeAttrs.visible, + color: extendFlat({}, shapeAttrs.fillcolor, { + dflt: 'rgb(0,255,0,0.5)' + }), + description: 'The nodes of the Sankey plot.' + }, + + links: { + _isLinkedToArray: 'link', + label: { + valType: 'string', + dflt: '', + role: 'info', + description: 'The shown name of the link.' + }, + visible: shapeAttrs.visible, + color: extendFlat({}, shapeAttrs.fillcolor, {dflt: 'rgba(0,0,0,0.2)'}), + source: { + valType: 'number', + role: 'info', + description: 'An integer number `[0..nodes.length - 1]` that represents the source node.' + }, + target: { + valType: 'number', + role: 'info', + description: 'An integer number `[0..nodes.length - 1]` that represents the target node.' + }, + value: { + valType: 'number', + dflt: 1, + role: 'info', + description: 'A numeric value representing the flow volume value.' + }, + description: 'The links of the Sankey plot.' + } +}; + +},{"../../components/shapes/attributes":648,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/font_attributes":753}],938:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Plots = require('../../plots/plots'); +var plot = require('./plot'); + +exports.name = 'sankey'; + +exports.attr = 'type'; + +exports.plot = function(gd) { + var calcData = Plots.getSubplotCalcData(gd.calcdata, 'sankey', 'sankey'); + if(calcData.length) plot(gd, calcData); +}; + +exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) { + var hadPlot = (oldFullLayout._has && oldFullLayout._has('sankey')); + var hasPlot = (newFullLayout._has && newFullLayout._has('sankey')); + + if(hadPlot && !hasPlot) { + oldFullLayout._paperdiv.selectAll('.sankey').remove(); + oldFullLayout._paperdiv.selectAll('.sankey').remove(); + } +}; + +exports.toSVG = function() {}; + +},{"../../plots/plots":792,"./plot":944}],939:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + + +module.exports = function calc() { + return [{}]; +}; + +},{}],940:[function(require,module,exports){ +arguments[4][915][0].apply(exports,arguments) +},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"dup":915,"fast-isnumeric":123}],941:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + + +module.exports = { + nodeTextOffsetHorizontal: 4, + nodeTextOffsetVertical: 3, + nodePadAcross: 10, + sankeyIterations: 50, + movable: true, + sideways: true, + useForceSnap: true, + forceIterations: 5, + forceTicksPerFrame: 10, + duration: 500, + ease: 'linear' +}; + +},{}],942:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Lib = require('../../lib'); +var attributes = require('./attributes'); +var d3 = require('d3'); + + +function linksDefaults(traceIn, traceOut) { + var linksIn = traceIn.links || [], + linksOut = traceOut.links = []; + + var linkIn, linkOut, i; + + function coerce(attr, dflt) { + return Lib.coerce(linkIn, linkOut, attributes.links, attr, dflt); + } + + for(i = 0; i < linksIn.length; i++) { + linkIn = linksIn[i]; + linkOut = {}; + + if(!Lib.isPlainObject(linkIn)) { + continue; + } + + var visible = coerce('visible'); + + if(visible) { + coerce('label'); + coerce('value'); + coerce('source'); + coerce('target'); + coerce('color'); + } + + linkOut._index = i; + linksOut.push(linkOut); + } +} + +function nodesDefaults(traceIn, traceOut) { + var nodesIn = traceIn.nodes || [], + nodesOut = traceOut.nodes = []; + + var nodeIn, nodeOut, i, j, link, foundUse, visible, + usedNodeCount = 0, + indexMap = []; + + var defaultPalette = d3.scale.category20(); + + function coerce(attr, dflt) { + return Lib.coerce(nodeIn, nodeOut, attributes.nodes, attr, dflt); + } + + for(i = 0; i < nodesIn.length; i++) { + nodeIn = nodesIn[i]; + + + + foundUse = false; + for(j = 0; j < traceOut.links.length && !foundUse; j++) { + link = traceOut.links[j]; + foundUse = link.source === i || link.target === i; + } + + indexMap.push(foundUse ? usedNodeCount : null); + + if(!foundUse) + continue; + + if(!Lib.isPlainObject(nodeIn)) { + continue; + } + + nodeOut = {}; + + visible = coerce('visible'); + + if(visible) { + coerce('label'); + if(nodeIn.color) { + coerce('color'); + } else { + coerce('color', defaultPalette(i)); + } + } + + nodeOut._index = usedNodeCount; + nodesOut.push(nodeOut); + usedNodeCount++; + } + + // since nodes were removed, update indices to nodes in links to reflect new reality + for(j = 0; j < traceOut.links.length; j++) { + link = traceOut.links[j]; + link.source = indexMap[link.source]; + link.target = indexMap[link.target]; + } + + return nodesOut; +} + + + + +module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { + function coerce(attr, dflt) { + return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); + } + + linksDefaults(traceIn, traceOut); + nodesDefaults(traceIn, traceOut); + + coerce('hoverinfo', layout._dataLength === 1 ? 'label+text+value+percent' : undefined); + + coerce('domain.x'); + coerce('domain.y'); + coerce('orientation'); + coerce('nodepad'); + coerce('nodethickness'); + coerce('valueformat'); + coerce('valueunit'); + coerce('followmouse'); + + // Prefer Sankey-specific font spec e.g. with smaller default size + var sankeyFontSpec = Lib.coerceFont(coerce, 'textfont'); + Lib.coerceFont(coerce, 'textfont', Lib.extendFlat({}, layout.font, sankeyFontSpec)); +}; + +},{"../../lib":690,"./attributes":937,"d3":114}],943:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Plot = {}; + +Plot.attributes = require('./attributes'); +Plot.supplyDefaults = require('./defaults'); +Plot.calc = require('./calc'); +Plot.plot = require('./plot'); +Plot.colorbar = require('./colorbar'); + +Plot.moduleType = 'trace'; +Plot.name = 'sankey'; +Plot.basePlotModule = require('./base_plot'); +Plot.categories = ['gl']; +Plot.meta = { + description: [ + 'Sankey plots for network flow data analysis.', + 'The nodes are specified in `nodes` and the links between sources and targets in `links`.', + 'The colors are set in `line.color`.' + ].join(' ') +}; + +module.exports = Plot; + +},{"./attributes":937,"./base_plot":938,"./calc":939,"./colorbar":940,"./defaults":942,"./plot":944}],944:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var render = require('./render'); +var Fx = require('../../plots/cartesian/graph_interact'); +var d3 = require('d3'); +var Color = require('../../components/color'); + +function renderableValuePresent(d) {return d !== '';} + +function ownTrace(selection, d) { + return selection.filter(function(s) {return s.key === d.traceId;}); +} + +function makeTranslucent(element, alpha) { + d3.select(element) + .select('path') + .style('fill-opacity', alpha); +} + +function makeTextContrasty(element, hue) { + d3.select(element) + .select('text.name') + .style('fill', Color.contrast(hue, 0, 40)); +} + +function relatedLinks(d) { + return function(l) { + return d.node.sourceLinks.indexOf(l.link) !== -1 || d.node.targetLinks.indexOf(l.link) !== -1; + }; +} + +function relatedNodes(l) { + return function(d) { + return d.node.sourceLinks.indexOf(l.link) !== -1 || d.node.targetLinks.indexOf(l.link) !== -1; + }; +} + +function nodeHoveredStyle(sankeyNode, d, sankey) { + + sankeyNode.select('.nodeRect').style('stroke-width', 1); + + if(d && sankey) { + ownTrace(sankey, d) + .selectAll('.sankeyLink') + .filter(relatedLinks(d)) + .call(linkHoveredStyle); + } +} + +function nodeNonHoveredStyle(sankeyNode, d, sankey) { + + sankeyNode.select('.nodeRect').style('stroke-width', 0.5); + + if(d && sankey) { + ownTrace(sankey, d) + .selectAll('.sankeyLink') + .filter(relatedLinks(d)) + .call(linkNonHoveredStyle); + } +} + +function linkHoveredStyle(sankeyLink, d, sankey) { + + sankeyLink.style('stroke-opacity', 0.4); + + if(d && sankey) { + ownTrace(sankey, d) + .selectAll('.sankeyNode') + .filter(relatedNodes(d)) + .call(nodeHoveredStyle); + } +} + +function linkNonHoveredStyle(sankeyLink, d, sankey) { + + sankeyLink.style('stroke-opacity', function(d) {return d.tinyColorAlpha;}); + + if(d && sankey) { + ownTrace(sankey, d) + .selectAll('.sankeyNode') + .filter(relatedNodes(d)) + .call(nodeNonHoveredStyle); + } +} + +var log = false + +module.exports = function plot(gd, calcData) { + + var fullLayout = gd._fullLayout; + var svg = fullLayout._paper; + var hasHoverData = false; + + var size = fullLayout._size; + + var linkSelect = function(element, d) { + if(log) console.log('select link', d.link); + gd._hoverdata = [d.link]; + gd._hoverdata.trace = calcData.trace; + Fx.click(gd, { target: true }); + }; + + var linkHover = function(element, d, sankey) { + + d3.select(element).call(linkHoveredStyle, d, sankey); + if(log) console.log('hover link', d.link); + + Fx.hover(gd, d.link, 'sankey'); + + hasHoverData = true; + }; + + var linkHoverFollow = function(element, d) { + + + var followMouse = gd.data[0].followmouse; + + var boundingBox = !followMouse && element.getBoundingClientRect(); + var hoverCenterX = followMouse ? d3.event.x : boundingBox.left + boundingBox.width / 2; + var hoverCenterY = followMouse ? d3.event.y : boundingBox.top + boundingBox.height / 2; + + var tooltip = Fx.loneHover({ + x: hoverCenterX, + y: hoverCenterY, + name: d3.format(d.valueFormat)(d.link.value) + d.valueUnit, + text: [ + d.link.label, + ['Source:', d.link.source.label].join(' '), + ['Target:', d.link.target.label].join(' ') + ].filter(renderableValuePresent).join('
'), + color: Color.addOpacity(d.tinyColorHue, 1), + idealAlign: d3.event.x < hoverCenterX ? 'right' : 'left' + }, { + container: fullLayout._hoverlayer.node(), + outerContainer: fullLayout._paper.node() + }); + + makeTranslucent(tooltip, 0.67); + }; + + var linkUnhover = function(element, d, sankey) { + d3.select(element).call(linkNonHoveredStyle, d, sankey); + if(log) console.log('unhover link', d.link); + gd.emit('plotly_unhover', { + points: [d.link] + }); + + if(hasHoverData) { + Fx.loneUnhover(fullLayout._hoverlayer.node()); + hasHoverData = false; + } + }; + + var nodeSelect = function(element, d, sankey) { + if(log) console.log('select node', d.node); + gd._hoverdata = [d.node]; + gd._hoverdata.trace = calcData.trace; + d3.select(element).call(linkNonHoveredStyle, d, sankey); + d3.select(element).call(nodeNonHoveredStyle, d, sankey); + Fx.click(gd, { target: true }); + }; + + var nodeHover = function(element, d, sankey) { + + if(log) console.log('hover node', d.node); + + d3.select(element).call(nodeHoveredStyle, d, sankey); + + Fx.hover(gd, d.node, 'sankey'); + + hasHoverData = true; + + }; + + + var nodeHoverFollow = function(element, d) { + + var nodeRect = d3.select(element).select('.nodeRect'); + + var followMouse = gd.data[0].followmouse; + + var boundingBox = nodeRect.node().getBoundingClientRect(); + var hoverCenterX0 = boundingBox.left - 2; + var hoverCenterX1 = boundingBox.right + 2; + var hoverCenterY = followMouse ? d3.event.y : boundingBox.top + boundingBox.height / 4; + + var tooltip = Fx.loneHover({ + x0: hoverCenterX0, + x1: hoverCenterX1, + y: hoverCenterY, + name: d3.format(d.valueFormat)(d.node.value) + d.valueUnit, + text: [ + d.node.label, + ['Incoming flow count:', d.node.targetLinks.length].join(' '), + ['Outgoing flow count:', d.node.sourceLinks.length].join(' ') + ].filter(renderableValuePresent).join('
'), + color: d.tinyColorHue, + idealAlign: 'left' + }, { + container: fullLayout._hoverlayer.node(), + outerContainer: fullLayout._paper.node() + }); + + makeTranslucent(tooltip, 0.85); + makeTextContrasty(tooltip, d.tinyColorHue); + }; + + var nodeUnhover = function(element, d, sankey) { + + d3.select(element).call(nodeNonHoveredStyle, d, sankey); + if(log) console.log('unhover node', d.node); + gd.emit('plotly_unhover', { + points: [d.node] + }); + + if(hasHoverData) { + Fx.loneUnhover(fullLayout._hoverlayer.node()); + hasHoverData = false; + } + }; + + render( + svg, + calcData, + { + width: size.w, + height: size.h, + margin: { + t: size.t, + r: size.r, + b: size.b, + l: size.l + } + }, + { + linkEvents: { + hover: linkHover, + follow: linkHoverFollow, + unhover: linkUnhover, + select: linkSelect + }, + nodeEvents: { + hover: nodeHover, + follow: nodeHoverFollow, + unhover: nodeUnhover, + select: nodeSelect + } + } + ); +}; + +},{"../../components/color":585,"../../plots/cartesian/graph_interact":738,"./render":945,"d3":114}],945:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var c = require('./constants'); +var d3 = require('d3'); +var tinycolor = require('tinycolor2'); +var Color = require('../../components/color'); +var Drawing = require('../../components/drawing'); +var d3sankey = require('@monfera/d3-sankey').sankey; +var d3Force = require('d3-force'); + + +// basic data utilities + +function keyFun(d) {return d.key;} +function repeat(d) {return [d];} // d3 data binding convention +function unwrap(d) {return d[0];} // plotly data structure convention +function visible(nodeOrLink) {return !('visible' in nodeOrLink) || nodeOrLink.visible;} + +function persistOriginalPlace(nodes) { + for (var i = 0; i < nodes.length; i++) { + nodes[i].originalX = nodes[i].x; + nodes[i].originalY = nodes[i].y; + } +} + +function saveCurrentDragPosition(d) { + d.lastDraggedX = d.x + d.lastDraggedY = d.y +} + +function sameLayer(d) { + return function(n) {return n.node.originalX === d.node.originalX;}; +} + +function switchToForceFormat(nodes) { + // force uses x, y as centers + for (var i = 0; i < nodes.length; i++) { + nodes[i].y = nodes[i].y + nodes[i].dy / 2; + } +} + +function switchToSankeyFormat(nodes) { + // sankey uses x, y as top left + for (var i = 0; i < nodes.length; i++) { + nodes[i].y = nodes[i].y - nodes[i].dy / 2; + } +} + + +// view models + +function sankeyModel(layout, d, i) { + + var trace = unwrap(d).trace, + domain = trace.domain, + nodes = trace.nodes, + links = trace.links, + horizontal = trace.orientation === 'h', + nodePad = trace.nodepad, + nodeThickness = trace.nodethickness, + valueFormat = trace.valueformat, + valueUnit = trace.valueunit, + textFont = trace.textfont; + + var width = layout.width * (domain.x[1] - domain.x[0]), + height = layout.height * (domain.y[1] - domain.y[0]); + + var sankey = d3sankey() + .size(horizontal ? [width, height] : [height, width]) + .nodeWidth(nodeThickness) + .nodePadding(nodePad) + .nodes(nodes) + .links(links) + .layout(c.sankeyIterations); + + switchToForceFormat(nodes); + + return { + key: i, + guid: Math.floor(1e12 * (1 + Math.random())), + horizontal: horizontal, + width: width, + height: height, + nodePad: nodePad, + valueFormat: valueFormat, + valueUnit: valueUnit, + textFont: textFont, + translateX: domain.x[0] * width + layout.margin.l, + translateY: layout.height - domain.y[1] * layout.height + layout.margin.t, + dragParallel: horizontal ? height : width, + dragPerpendicular: horizontal ? width : height, + nodes: nodes, + links: links, + sankey: sankey, + forceLayouts: {}, + interactionState: { + dragInProgress: false, + hovered: false + } + }; +} + +function linkModel(d, l) { + + var tc = tinycolor(l.color); + + return { + key: l.source.label + '|' + l.target.label, + traceId: d.key, + link: l, + tinyColorHue: Color.tinyRGB(tc), + tinyColorAlpha: tc.getAlpha(), + valueFormat: d.valueFormat, + valueUnit: d.valueUnit, + sankey: d.sankey, + interactionState: d.interactionState + }; +} + +function nodeModel(uniqueKeys, d, n) { + + var tc = tinycolor(n.color), + zoneThicknessPad = c.nodePadAcross, + zoneLengthPad = d.nodePad / 2, + visibleThickness = n.dx + 0.5, + visibleLength = n.dy - 0.5, + zoneThickness = visibleThickness + 2 * zoneThicknessPad, + zoneLength = visibleLength + 2 * zoneLengthPad; + + var foundKey = uniqueKeys[n.label]; + uniqueKeys[n.label] = (foundKey === void(0) ? foundKey : 0) + 1; + var key = n.label + (foundKey === void(0) ? '' : '__' + foundKey); + + return { + key: key, + traceId: d.key, + node: n, + nodePad: d.nodePad, + textFont: d.textFont, + size: d.horizontal ? d.height : d.width, + visibleWidth: Math.ceil(d.horizontal ? visibleThickness : visibleLength), + visibleHeight: Math.ceil(d.horizontal ? visibleLength : visibleThickness), + zoneX: d.horizontal ? -zoneThicknessPad : -zoneLengthPad, + zoneY: d.horizontal ? -zoneLengthPad : -zoneThicknessPad, + zoneWidth: d.horizontal ? zoneThickness : zoneLength, + zoneHeight: d.horizontal ? zoneLength : zoneThickness, + labelY: d.horizontal ? n.dy / 2 + 1 : n.dx / 2 + 1, + sizeAcross: d.horizontal ? d.width : d.height, + forceLayouts: d.forceLayouts, + horizontal: d.horizontal, + darkBackground: tc.getBrightness() <= 128, + tinyColorHue: Color.tinyRGB(tc), + tinyColorAlpha: tc.getAlpha(), + valueFormat: d.valueFormat, + valueUnit: d.valueUnit, + sankey: d.sankey, + uniqueNodeLabelPathId: JSON.stringify({sankeyGuid: d.guid, traceId: d.key, nodeKey: n.label}), + interactionState: d.interactionState + }; +} + + +// rendering snippets + +function crispLinesOnEnd(sankeyNode) { + d3.select(sankeyNode.node().parentElement).style('shape-rendering', 'crispEdges'); +} + +function updateNodePositions(sankeyNode) { + sankeyNode + .attr('transform', function(d) { + return d.horizontal + ? 'translate(' + (d.node.x - 0.5) + ', ' + (d.node.y - d.node.dy / 2 + 0.5) + ')' + : 'translate(' + (d.node.y - d.node.dy / 2 - 0.5) + ', ' + (d.node.x + 0.5) + ')' + }) +} + +function linkPath(d) { + var nodes = d.sankey.nodes(); + switchToSankeyFormat(nodes); + var result = d.sankey.link()(d.link); + switchToForceFormat(nodes); + return result; +} + +function updateNodeShapes(sankeyNode) { + d3.select(sankeyNode.node().parentElement).style('shape-rendering', 'optimizeSpeed'); + sankeyNode.call(updateNodePositions); +} + +function updateShapes(sankeyNode, sankeyLink) { + sankeyNode.call(updateNodeShapes); + sankeyLink.attr('d', linkPath); +} + +function sizeNode(rect) { + rect.attr('width', function(d) {return d.visibleWidth;}) + .attr('height', function(d) {return d.visibleHeight;}); +} + + +// event handling + +function attachPointerEvents(selection, sankey, eventSet) { + selection + .on('.basic', null) // remove any preexisting handlers + .on('mouseover.basic', function (d) { + if (!d.interactionState.dragInProgress) { + eventSet.hover(this, d, sankey); + d.interactionState.hovered = [this, d]; + } + }) + .on('mousemove.basic', function (d) { + if (!d.interactionState.dragInProgress) { + eventSet.follow(this, d); + d.interactionState.hovered = [this, d]; + } + }) + .on('mouseout.basic', function (d) { + if (!d.interactionState.dragInProgress) { + eventSet.unhover(this, d, sankey); + d.interactionState.hovered = false; + } + }) + .on('click.basic', function (d) { + if (d.interactionState.hovered) { + eventSet.unhover(this, d, sankey); + d.interactionState.hovered = false; + } + if (!d.interactionState.dragInProgress) { + eventSet.select(this, d, sankey); + } + }); +} + +function attachDragHandler(sankeyNode, sankeyLink, callbacks) { + + var dragBehavior = d3.behavior.drag() + + .origin(function(d) {return d.horizontal ? d.node : {x: d.node['y'], y: d.node['x']};}) + + .on('dragstart', function(d) { + if(!c.movable) return; + this.parentNode.appendChild(this); // bring element to top (painter's algo) + d.interactionState.dragInProgress = d.node; + saveCurrentDragPosition(d.node); + if(d.interactionState.hovered) { + callbacks.nodeEvents.unhover.apply(0, d.interactionState.hovered); + d.interactionState.hovered = false; + } + if(c.useForceSnap) { + var forceKey = d.traceId + '|' + Math.floor(d.node.originalX); + if (d.forceLayouts[forceKey]) { + d.forceLayouts[forceKey].alpha(1); + } else { // make a forceLayout iff needed + attachForce(sankeyNode, forceKey, d); + } + window.requestAnimationFrame(function faster() { + for(var i = 0; i < c.forceTicksPerFrame; i++) d.forceLayouts[forceKey].tick(); + updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink); + if(d.forceLayouts[forceKey].alpha() > 0) { + window.requestAnimationFrame(faster); + } + }) + } + }) + + .on('drag', function(d) { + if(!c.movable) return; + var x = d.horizontal ? d3.event.x : d3.event.y; + var y = d.horizontal ? d3.event.y : d3.event.x; + if(c.useForceSnap) { + d.node.x = x; + d.node.y = y; + } else { + if(c.sideways) { + d.node.x = x; + } + d.node.y = Math.max(d.node.dy / 2, Math.min(d.size - d.node.dy / 2, y)); + } + saveCurrentDragPosition(d.node); + d.sankey.relayout(); + if(!c.useForceSnap) { + updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink); + sankeyNode.call(crispLinesOnEnd); + } + }) + + .on('dragend', function(d) {d.interactionState.dragInProgress = false;}); + + + sankeyNode + .on('.drag', null) // remove possible previous handlers + .call(dragBehavior); +} + +function attachForce(sankeyNode, forceKey, d) { + var nodes = d.sankey.nodes().filter(function(n) {return n.originalX === d.node.originalX;}); + d.forceLayouts[forceKey] = d3Force.forceSimulation(nodes) + .alphaDecay(0) + .force('collide', d3Force.forceCollide() + .radius(function (n) {return n.dy / 2 + d.nodePad / 2;}) + .strength(1) + .iterations(c.forceIterations)) + .force('constrain', snappingForce(sankeyNode, forceKey, nodes, d)) + .stop(); +} + +function snappingForce(sankeyNode, forceKey, nodes, d) { + return function _snappingForce() { + var maxVelocity = 0; + for (var i = 0; i < nodes.length; i++) { + var n = nodes[i]; + if (n === d.interactionState.dragInProgress) { // constrain node position to the dragging pointer + n.x = n.lastDraggedX; + n.y = n.lastDraggedY; + } else { + n.vx = (n.originalX - n.x) / c.forceTicksPerFrame; // snap to layer + n.y = Math.min(d.size - n.dy / 2, Math.max(n.dy / 2, n.y)); // constrain to extent + } + maxVelocity = Math.max(maxVelocity, Math.abs(n.vx), Math.abs(n.vy)); + } + if (!d.interactionState.dragInProgress && maxVelocity < 0.1) { + d.forceLayouts[forceKey].alpha(0); + window.setTimeout(function () { + sankeyNode.call(crispLinesOnEnd); + }, 30); // geome on move, crisp when static + } + } +} + + +// scene graph + +module.exports = function(svg, styledData, layout, callbacks) { + + svg.style('overflow', 'visible'); + + var sankey = svg.selectAll('.sankey') + .data(styledData + .filter(function(d) {return unwrap(d).trace.visible;}) + .map(sankeyModel.bind(null, layout)), + keyFun); + + sankey.exit() + .remove(); + + sankey.enter() + .append('g') + .classed('sankey', true) + .attr('overflow', 'visible') + .style('box-sizing', 'content-box') + .style('position', 'absolute') + .style('left', 0) + .style('overflow', 'visible') + .style('shape-rendering', 'geometricPrecision') + .style('pointer-events', 'auto') + .style('box-sizing', 'content-box'); + + sankey + .attr('transform', function(d) {return 'translate(' + d.translateX + ',' + d.translateY + ')';}); + + + var sankeyLinks = sankey.selectAll('.sankeyLinks') + .data(repeat, keyFun); + + sankeyLinks.enter() + .append('g') + .classed('sankeyLinks', true) + .style('fill', 'none'); + + sankeyLinks.transition() + .ease(c.ease).duration(c.duration) + .style('transform', function(d) {return d.horizontal ? 'matrix(1,0,0,1,0,0)' : 'matrix(0,1,1,0,0,0)'}); + + + var sankeyLink = sankeyLinks.selectAll('.sankeyLink') + .data(function(d) { + return d.sankey.links() + .filter(function(l) {return l.visible && l.value;}) + .map(linkModel.bind(null, d)); + }, keyFun); + + sankeyLink.enter() + .append('path') + .classed('sankeyLink', true) + .style('stroke-width', function(d) {return Math.max(1, d.link.dy);}) + .style('opacity', 0) + .call(attachPointerEvents, sankey, callbacks.linkEvents); + + sankeyLink + .style('stroke', function(d) {return d.tinyColorHue;}) + .style('stroke-opacity', function(d) {return d.tinyColorAlpha;}); + + sankeyLink.transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 1) + .attr('d', linkPath) + .style('stroke-width', function(d) {return Math.max(1, d.link.dy);}); + + sankeyLink.exit().transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 0) + .remove(); + + + var sankeyNodeSet = sankey.selectAll('.sankeyNodeSet') + .data(repeat, keyFun); + + sankeyNodeSet.enter() + .append('g') + .style('shape-rendering', 'geometricPrecision') + .classed('sankeyNodeSet', true); + + sankeyNodeSet + .each(function(d) {Drawing.font(sankeyNodeSet, d.textFont);}); // fixme causes scerenshot trouble + + + var sankeyNode = sankeyNodeSet.selectAll('.sankeyNode') + .data(function(d) { + var nodes = d.sankey.nodes(); + var uniqueKeys = {}; + persistOriginalPlace(nodes); + return nodes + .filter(function(n) {return n.visible && n.value;}) + .map(nodeModel.bind(null, uniqueKeys, d)); + }, keyFun); + + sankeyNode.enter() + .append('g') + .classed('sankeyNode', true) + .style('opacity', 0) + .style('cursor', 'move') + .call(updateNodePositions) + .call(attachPointerEvents, sankey, callbacks.nodeEvents); + + sankeyNode + .call(attachDragHandler, sankeyLink, callbacks); // has to be here as it binds sankeyLink + + sankeyNode.transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 1) + .call(updateNodePositions); + + sankeyNode.exit().transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 0) + .remove(); + + + var nodeRect = sankeyNode.selectAll('.nodeRect') + .data(repeat); + + nodeRect.enter() + .append('rect') + .classed('nodeRect', true) + .style('stroke-width', 0.5) + .call(Color.stroke, 'rgba(0, 0, 0, 1)') + .call(sizeNode); + + nodeRect + .style('fill', function(d) {return d.tinyColorHue;}) + .style('fill-opacity', function(d) {return d.tinyColorAlpha;}); + + nodeRect.transition() + .ease(c.ease).duration(c.duration) + .call(sizeNode); + + + var nodeCapture = sankeyNode.selectAll('.nodeCapture') + .data(repeat); + + nodeCapture.enter() + .append('rect') + .classed('nodeCapture', true) + .style('fill-opacity', 0); + + nodeCapture + .attr('x', function(d) {return d.zoneX;}) + .attr('y', function(d) {return d.zoneY;}) + .attr('width', function(d) {return d.zoneWidth;}) + .attr('height', function(d) {return d.zoneHeight;}); + + + var nodeLabelGuide = sankeyNode.selectAll('.nodeLabelGuide') + .data(repeat); + + nodeLabelGuide.enter() + .append('path') + .classed('nodeLabelGuide', true) + .attr('id', function(d) {return d.uniqueNodeLabelPathId;}); // fixme causes scerenshot trouble + + nodeLabelGuide + .transition() + .ease(c.ease).duration(c.duration) + .attr('d', function(d) { + return d3.svg.line()([ + [d.horizontal ? d.visibleWidth + c.nodeTextOffsetHorizontal : c.nodeTextOffsetHorizontal, d.labelY], + [d.horizontal ? d.sizeAcross : d.visibleWidth - c.nodeTextOffsetHorizontal, d.labelY] + ]);}); + + + var nodeLabel = sankeyNode.selectAll('.nodeLabel') + .data(repeat); + + nodeLabel.enter() + .append('text') + .classed('nodeLabel', true) + .style('user-select', 'none') + .style('cursor', 'default') + .style('fill', 'black'); + + nodeLabel + .style('text-shadow', function(d) { + return d.horizontal ? '0 1px 1px #fff' : 'none'; + }); + + var nodeLabelTextPath = nodeLabel.selectAll('.nodeLabelTextPath') + .data(repeat); + + nodeLabelTextPath.enter() + .append('textPath') + .classed('nodeLabelTextPath', true) + .attr('alignment-baseline', 'middle') + .attr('xlink:href', function(d) {return '#' + d.uniqueNodeLabelPathId;}); + + nodeLabelTextPath + .text(function(d) {return d.horizontal || d.node.dy > 5 ? d.node.label : '';}) + .style('fill', function(d) {return d.darkBackground && !d.horizontal ? 'white' : 'black';}); +}; + +},{"../../components/color":585,"../../components/drawing":608,"./constants":941,"@monfera/d3-sankey":32,"d3":114,"d3-force":110,"tinycolor2":521}],946:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160979,6 +166608,7 @@ var Lib = require('../../lib'); module.exports = function arraysToCalcdata(cd, trace) { Lib.mergeArray(trace.text, cd, 'tx'); + Lib.mergeArray(trace.hovertext, cd, 'htx'); Lib.mergeArray(trace.customdata, cd, 'data'); Lib.mergeArray(trace.textposition, cd, 'tp'); if(trace.textfont) { @@ -161002,7 +166632,7 @@ module.exports = function arraysToCalcdata(cd, trace) { } }; -},{"../../lib":680}],924:[function(require,module,exports){ +},{"../../lib":690}],947:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161088,7 +166718,23 @@ module.exports = { 'If a single string, the same string appears over', 'all the data points.', 'If an array of string, the items are mapped in order to the', - 'this trace\'s (x,y) coordinates.' + 'this trace\'s (x,y) coordinates.', + 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,', + 'these elements will be seen in the hover labels.' + ].join(' ') + }, + hovertext: { + valType: 'string', + role: 'info', + dflt: '', + arrayOk: true, + description: [ + 'Sets hover text elements associated with each (x,y) pair.', + 'If a single string, the same string appears over', + 'all the data points.', + 'If an array of string, the items are mapped in order to the', + 'this trace\'s (x,y) coordinates.', + 'To be seen, trace `hoverinfo` must contain a *text* flag.' ].join(' ') }, mode: { @@ -161372,7 +167018,7 @@ module.exports = { error_x: errorBarAttrs }; -},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/drawing":598,"../../components/errorbars/attributes":600,"../../lib/extend":672,"./constants":929}],925:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/drawing":608,"../../components/errorbars/attributes":610,"../../lib/extend":682,"./constants":952}],948:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161502,7 +167148,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../plots/cartesian/axes":719,"./arrays_to_calcdata":923,"./colorscale_calc":928,"./subtypes":944,"fast-isnumeric":113}],926:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"./arrays_to_calcdata":946,"./colorscale_calc":951,"./subtypes":967,"fast-isnumeric":123}],949:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161541,7 +167187,7 @@ module.exports = function cleanData(fullData) { } }; -},{}],927:[function(require,module,exports){ +},{}],950:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161597,7 +167243,7 @@ module.exports = function colorbar(gd, cd) { .options(marker.colorbar)(); }; -},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],928:[function(require,module,exports){ +},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],951:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161630,7 +167276,7 @@ module.exports = function calcMarkerColorscale(trace) { } }; -},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"./subtypes":944}],929:[function(require,module,exports){ +},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"./subtypes":967}],952:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161646,7 +167292,7 @@ module.exports = { PTS_LINESONLY: 20 }; -},{}],930:[function(require,module,exports){ +},{}],953:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161687,6 +167333,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('customdata'); coerce('text'); + coerce('hovertext'); coerce('mode', defaultMode); coerce('ids'); @@ -161727,7 +167374,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, defaultColor, {axis: 'x', inherit: 'y'}); }; -},{"../../components/errorbars/defaults":603,"../../lib":680,"./attributes":924,"./constants":929,"./fillcolor_defaults":931,"./line_defaults":935,"./line_shape_defaults":937,"./marker_defaults":940,"./subtypes":944,"./text_defaults":945,"./xy_defaults":946}],931:[function(require,module,exports){ +},{"../../components/errorbars/defaults":613,"../../lib":690,"./attributes":947,"./constants":952,"./fillcolor_defaults":954,"./line_defaults":958,"./line_shape_defaults":960,"./marker_defaults":963,"./subtypes":967,"./text_defaults":968,"./xy_defaults":969}],954:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161765,7 +167412,7 @@ module.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coe )); }; -},{"../../components/color":575}],932:[function(require,module,exports){ +},{"../../components/color":585}],955:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161818,7 +167465,7 @@ module.exports = function getTraceColor(trace, di) { } }; -},{"../../components/color":575,"./subtypes":944}],933:[function(require,module,exports){ +},{"../../components/color":585,"./subtypes":967}],956:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161893,7 +167540,9 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { yLabelVal: di.y }); - if(di.tx) pointData.text = di.tx; + if(di.htx) pointData.text = di.htx; + else if(trace.hovertext) pointData.text = trace.hovertext; + else if(di.tx) pointData.text = di.tx; else if(trace.text) pointData.text = trace.text; ErrorBars.hoverInfo(di, trace, pointData); @@ -161987,7 +167636,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { } }; -},{"../../components/color":575,"../../components/errorbars":604,"../../lib":680,"../../plots/cartesian/constants":724,"../../plots/cartesian/graph_interact":726,"./get_trace_color":932}],934:[function(require,module,exports){ +},{"../../components/color":585,"../../components/errorbars":614,"../../lib":690,"../../plots/cartesian/constants":734,"../../plots/cartesian/graph_interact":738,"./get_trace_color":955}],957:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162037,7 +167686,7 @@ Scatter.meta = { module.exports = Scatter; -},{"../../plots/cartesian":727,"./arrays_to_calcdata":923,"./attributes":924,"./calc":925,"./clean_data":926,"./colorbar":927,"./defaults":930,"./hover":933,"./plot":941,"./select":942,"./style":943,"./subtypes":944}],935:[function(require,module,exports){ +},{"../../plots/cartesian":739,"./arrays_to_calcdata":946,"./attributes":947,"./calc":948,"./clean_data":949,"./colorbar":950,"./defaults":953,"./hover":956,"./plot":964,"./select":965,"./style":966,"./subtypes":967}],958:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162070,7 +167719,7 @@ module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, coerce('line.dash'); }; -},{"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588}],936:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598}],959:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162243,7 +167892,7 @@ module.exports = function linePoints(d, opts) { return segments; }; -},{"../../constants/numerical":662}],937:[function(require,module,exports){ +},{"../../constants/numerical":672}],960:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162262,7 +167911,7 @@ module.exports = function handleLineShapeDefaults(traceIn, traceOut, coerce) { if(shape === 'spline') coerce('line.smoothing'); }; -},{}],938:[function(require,module,exports){ +},{}],961:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162303,7 +167952,7 @@ module.exports = function linkTraces(gd, plotinfo, cdscatter) { } }; -},{}],939:[function(require,module,exports){ +},{}],962:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162345,7 +167994,7 @@ module.exports = function makeBubbleSizeFn(trace) { }; }; -},{"fast-isnumeric":113}],940:[function(require,module,exports){ +},{"fast-isnumeric":123}],963:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162405,7 +168054,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/color":575,"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588,"./subtypes":944}],941:[function(require,module,exports){ +},{"../../components/color":585,"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598,"./subtypes":967}],964:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162459,13 +168108,13 @@ module.exports = function plot(gd, plotinfo, cdscatter, transitionOpts, makeOnCo // Sort the traces, once created, so that the ordering is preserved even when traces // are shown and hidden. This is needed since we're not just wiping everything out // and recreating on every update. - for(i = 0, uids = []; i < cdscatter.length; i++) { - uids[i] = cdscatter[i][0].trace.uid; + for(i = 0, uids = {}; i < cdscatter.length; i++) { + uids[cdscatter[i][0].trace.uid] = i; } scatterlayer.selectAll('g.trace').sort(function(a, b) { - var idx1 = uids.indexOf(a[0].trace.uid); - var idx2 = uids.indexOf(b[0].trace.uid); + var idx1 = uids[a[0].trace.uid]; + var idx2 = uids[b[0].trace.uid]; return idx1 > idx2 ? 1 : -1; }); @@ -162945,7 +168594,7 @@ function selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll) { }); } -},{"../../components/drawing":598,"../../components/errorbars":604,"../../lib":680,"../../lib/polygon":690,"./line_points":936,"./link_traces":938,"./subtypes":944,"d3":104}],942:[function(require,module,exports){ +},{"../../components/drawing":608,"../../components/errorbars":614,"../../lib":690,"../../lib/polygon":700,"./line_points":959,"./link_traces":961,"./subtypes":967,"d3":114}],965:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163017,7 +168666,7 @@ module.exports = function selectPoints(searchInfo, polygon) { return selection; }; -},{"./subtypes":944}],943:[function(require,module,exports){ +},{"./subtypes":967}],966:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163063,7 +168712,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/drawing":598,"../../components/errorbars":604,"d3":104}],944:[function(require,module,exports){ +},{"../../components/drawing":608,"../../components/errorbars":614,"d3":114}],967:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163099,7 +168748,7 @@ module.exports = { } }; -},{"../../lib":680}],945:[function(require,module,exports){ +},{"../../lib":690}],968:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163120,7 +168769,7 @@ module.exports = function(traceIn, traceOut, layout, coerce) { Lib.coerceFont(coerce, 'textfont', layout.font); }; -},{"../../lib":680}],946:[function(require,module,exports){ +},{"../../lib":690}],969:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163170,7 +168819,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) { return len; }; -},{"../../registry":793}],947:[function(require,module,exports){ +},{"../../registry":807}],970:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163245,9 +168894,22 @@ module.exports = { 'If a single string, the same string appears over', 'all the data points.', 'If an array of string, the items are mapped in order to the', - 'this trace\'s (x,y,z) coordinates.' + 'this trace\'s (x,y,z) coordinates.', + 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,', + 'these elements will be seen in the hover labels.' ].join(' ') }), + hovertext: extendFlat({}, scatterAttrs.hovertext, { + description: [ + 'Sets text elements associated with each (x,y,z) triplet.', + 'If a single string, the same string appears over', + 'all the data points.', + 'If an array of string, the items are mapped in order to the', + 'this trace\'s (x,y,z) coordinates.', + 'To be seen, trace `hoverinfo` must contain a *text* flag.' + ].join(' ') + }), + mode: extendFlat({}, scatterAttrs.mode, // shouldn't this be on-par with 2D? {dflt: 'lines+markers'}), surfaceaxis: { @@ -163330,7 +168992,7 @@ module.exports = { error_z: errorBarAttrs, }; -},{"../../components/colorscale/color_attributes":582,"../../components/errorbars/attributes":600,"../../constants/gl_markers":660,"../../lib/extend":672,"../scatter/attributes":924}],948:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":592,"../../components/errorbars/attributes":610,"../../constants/gl_markers":670,"../../lib/extend":682,"../scatter/attributes":947}],971:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163359,7 +169021,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../scatter/arrays_to_calcdata":923,"../scatter/colorscale_calc":928}],949:[function(require,module,exports){ +},{"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951}],972:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163430,7 +169092,7 @@ function calculateErrors(data, scaleFactor) { module.exports = calculateErrors; -},{"../../components/errorbars/compute_error":602}],950:[function(require,module,exports){ +},{"../../components/errorbars/compute_error":612}],973:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163491,8 +169153,12 @@ proto.handlePick = function(selection) { selection.object = this.scatterPlot; this.scatterPlot.highlight(selection.data); } - if(this.textLabels && this.textLabels[selection.data.index] !== undefined) { - selection.textLabel = this.textLabels[selection.data.index]; + if(this.textLabels) { + if(this.textLabels[selection.data.index] !== undefined) { + selection.textLabel = this.textLabels[selection.data.index]; + } else { + selection.textLabel = this.textLabels; + } } else selection.textLabel = ''; @@ -163804,7 +169470,7 @@ proto.update = function(data) { opacity: data.opacity }; - this.textLabels = options.text; + this.textLabels = data.hovertext || data.text; if(this.mode.indexOf('text') !== -1) { if(this.textMarkers) this.textMarkers.update(textOptions); @@ -163897,7 +169563,7 @@ function createLineWithMarkers(scene, data) { module.exports = createLineWithMarkers; -},{"../../constants/gl3d_dashes":659,"../../constants/gl_markers":660,"../../lib":680,"../../lib/gl_format_color":677,"../../lib/str2rgbarray":698,"../scatter/make_bubble_size_func":939,"./calc_errors":949,"delaunay-triangulate":105,"gl-error3d":143,"gl-line3d":153,"gl-mesh3d":186,"gl-scatter3d":232}],951:[function(require,module,exports){ +},{"../../constants/gl3d_dashes":669,"../../constants/gl_markers":670,"../../lib":690,"../../lib/gl_format_color":687,"../../lib/str2rgbarray":708,"../scatter/make_bubble_size_func":962,"./calc_errors":972,"delaunay-triangulate":115,"gl-error3d":153,"gl-line3d":163,"gl-mesh3d":196,"gl-scatter3d":242}],974:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163934,6 +169600,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('text'); + coerce('hovertext'); coerce('mode'); if(subTypes.hasLines(traceOut)) { @@ -163986,7 +169653,7 @@ function handleXYZDefaults(traceIn, traceOut, coerce, layout) { return len; } -},{"../../components/errorbars/defaults":603,"../../lib":680,"../../registry":793,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":947}],952:[function(require,module,exports){ +},{"../../components/errorbars/defaults":613,"../../lib":690,"../../registry":807,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":970}],975:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164024,7 +169691,7 @@ Scatter3D.meta = { module.exports = Scatter3D; -},{"../../constants/gl_markers":660,"../../plots/gl3d":758,"../scatter/colorbar":927,"./attributes":947,"./calc":948,"./convert":950,"./defaults":951}],953:[function(require,module,exports){ +},{"../../constants/gl_markers":670,"../../plots/gl3d":772,"../scatter/colorbar":950,"./attributes":970,"./calc":971,"./convert":973,"./defaults":974}],976:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164083,9 +169750,23 @@ module.exports = { 'If a single string, the same string appears over', 'all the data points.', 'If an array of string, the items are mapped in order to the', - 'this trace\'s (lon,lat) or `locations` coordinates.' + 'this trace\'s (lon,lat) or `locations` coordinates.', + 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,', + 'these elements will be seen in the hover labels.' + ].join(' ') + }), + hovertext: extendFlat({}, scatterAttrs.hovertext, { + description: [ + 'Sets hover text elements associated with each (lon,lat) pair', + 'or item in `locations`.', + 'If a single string, the same string appears over', + 'all the data points.', + 'If an array of string, the items are mapped in order to the', + 'this trace\'s (lon,lat) or `locations` coordinates.', + 'To be seen, trace `hoverinfo` must contain a *text* flag.' ].join(' ') }), + textfont: scatterAttrs.textfont, textposition: scatterAttrs.textposition, @@ -164132,7 +169813,7 @@ module.exports = { }) }; -},{"../../components/colorscale/color_attributes":582,"../../lib/extend":672,"../../plots/attributes":717,"../scatter/attributes":924}],954:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":592,"../../lib/extend":682,"../../plots/attributes":727,"../scatter/attributes":947}],977:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164145,51 +169826,38 @@ module.exports = { 'use strict'; var isNumeric = require('fast-isnumeric'); +var BADNUM = require('../../constants/numerical').BADNUM; var calcMarkerColorscale = require('../scatter/colorscale_calc'); - +var arraysToCalcdata = require('../scatter/arrays_to_calcdata'); module.exports = function calc(gd, trace) { - var hasLocationData = Array.isArray(trace.locations), - len = hasLocationData ? trace.locations.length : trace.lon.length; - - var calcTrace = [], - cnt = 0; + var hasLocationData = Array.isArray(trace.locations); + var len = hasLocationData ? trace.locations.length : trace.lon.length; + var calcTrace = new Array(len); for(var i = 0; i < len; i++) { - var calcPt = {}, - skip; + var calcPt = calcTrace[i] = {}; if(hasLocationData) { var loc = trace.locations[i]; + calcPt.loc = typeof loc === 'string' ? loc : null; + } else { + var lon = trace.lon[i]; + var lat = trace.lat[i]; - calcPt.loc = loc; - skip = (typeof loc !== 'string'); - } - else { - var lon = trace.lon[i], - lat = trace.lat[i]; - - calcPt.lonlat = [+lon, +lat]; - skip = (!isNumeric(lon) || !isNumeric(lat)); - } - - if(skip) { - if(cnt > 0) calcTrace[cnt - 1].gapAfter = true; - continue; + if(isNumeric(lon) && isNumeric(lat)) calcPt.lonlat = [+lon, +lat]; + else calcPt.lonlat = [BADNUM, BADNUM]; } - - cnt++; - - calcTrace.push(calcPt); } + arraysToCalcdata(calcTrace, trace); calcMarkerColorscale(trace); return calcTrace; }; -},{"../scatter/colorscale_calc":928,"fast-isnumeric":113}],955:[function(require,module,exports){ +},{"../../constants/numerical":672,"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951,"fast-isnumeric":123}],978:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164224,6 +169892,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('text'); + coerce('hovertext'); coerce('mode'); if(subTypes.hasLines(traceOut)) { @@ -164269,7 +169938,7 @@ function handleLonLatLocDefaults(traceIn, traceOut, coerce) { return len; } -},{"../../lib":680,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":953}],956:[function(require,module,exports){ +},{"../../lib":690,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":976}],979:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164290,7 +169959,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],957:[function(require,module,exports){ +},{}],980:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164304,6 +169973,7 @@ module.exports = function eventData(out, pt) { var Fx = require('../../plots/cartesian/graph_interact'); var Axes = require('../../plots/cartesian/axes'); +var BADNUM = require('../../constants/numerical').BADNUM; var getTraceColor = require('../scatter/get_trace_color'); var attributes = require('./attributes'); @@ -164316,8 +169986,6 @@ module.exports = function hoverPoints(pointData) { ya = pointData.ya, geo = pointData.subplot; - if(cd[0].placeholder) return; - function c2p(lonlat) { return geo.projection(lonlat); } @@ -164325,8 +169993,7 @@ module.exports = function hoverPoints(pointData) { function distFn(d) { var lonlat = d.lonlat; - // this handles the not-found location feature case - if(lonlat[0] === null || lonlat[1] === null) return Infinity; + if(lonlat[0] === BADNUM) return Infinity; if(geo.isLonLatOverEdges(lonlat)) return Infinity; @@ -164396,14 +170063,20 @@ function getExtraText(trace, pt, axis) { else if(hasLat) text.push('lat: ' + format(pt.lonlat[1])); if(hasText) { - var tx = pt.tx || trace.text; + var tx; + + if(pt.htx) tx = pt.htx; + else if(trace.hovertext) tx = trace.hovertext; + else if(pt.tx) tx = pt.tx; + else if(trace.text) tx = trace.text; + if(!Array.isArray(tx)) text.push(tx); } return text.join('
'); } -},{"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"../scatter/get_trace_color":932,"./attributes":953}],958:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"../scatter/get_trace_color":955,"./attributes":976}],981:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164440,7 +170113,7 @@ ScatterGeo.meta = { module.exports = ScatterGeo; -},{"../../plots/geo":743,"../scatter/colorbar":927,"./attributes":953,"./calc":954,"./defaults":955,"./event_data":956,"./hover":957,"./plot":959}],959:[function(require,module,exports){ +},{"../../plots/geo":757,"../scatter/colorbar":950,"./attributes":976,"./calc":977,"./defaults":978,"./event_data":979,"./hover":980,"./plot":982}],982:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164458,10 +170131,10 @@ var Drawing = require('../../components/drawing'); var Color = require('../../components/color'); var Lib = require('../../lib'); +var BADNUM = require('../../constants/numerical').BADNUM; var getTopojsonFeatures = require('../../lib/topojson_utils').getTopojsonFeatures; var locationToFeature = require('../../lib/geo_location_utils').locationToFeature; var geoJsonUtils = require('../../lib/geojson_utils'); -var arrayToCalcItem = require('../../lib/array_to_calc_item'); var subTypes = require('../scatter/subtypes'); @@ -164469,6 +170142,16 @@ module.exports = function plot(geo, calcData) { function keyFunc(d) { return d[0].trace.uid; } + function removeBADNUM(d, node) { + if(d.lonlat[0] === BADNUM) { + d3.select(node).remove(); + } + } + + for(var i = 0; i < calcData.length; i++) { + fillLocationLonLat(calcData[i], geo.topojson); + } + var gScatterGeoTraces = geo.framework.select('.scattergeolayer') .selectAll('g.trace.scattergeo') .data(calcData, keyFunc); @@ -164482,27 +170165,11 @@ module.exports = function plot(geo, calcData) { gScatterGeoTraces.selectAll('*').remove(); gScatterGeoTraces.each(function(calcTrace) { - var s = d3.select(this), - trace = calcTrace[0].trace, - convertToLonLatFn = makeConvertToLonLatFn(trace, geo.topojson); - - // skip over placeholder traces - if(calcTrace[0].placeholder) s.remove(); - - // just like calcTrace but w/o not-found location datum - var _calcTrace = []; - - for(var i = 0; i < calcTrace.length; i++) { - var _calcPt = convertToLonLatFn(calcTrace[i]); - - if(_calcPt) { - arrayItemToCalcdata(trace, calcTrace[i], i); - _calcTrace.push(_calcPt); - } - } + var s = d3.select(this); + var trace = calcTrace[0].trace; if(subTypes.hasLines(trace) || trace.fill !== 'none') { - var lineCoords = geoJsonUtils.calcTraceToLineCoords(_calcTrace); + var lineCoords = geoJsonUtils.calcTraceToLineCoords(calcTrace); var lineData = (trace.fill !== 'none') ? geoJsonUtils.makePolygon(lineCoords, trace) : @@ -164515,15 +170182,19 @@ module.exports = function plot(geo, calcData) { } if(subTypes.hasMarkers(trace)) { - s.selectAll('path.point').data(_calcTrace) - .enter().append('path') - .classed('point', true); + s.selectAll('path.point') + .data(Lib.identity) + .enter().append('path') + .classed('point', true) + .each(function(calcPt) { removeBADNUM(calcPt, this); }); } if(subTypes.hasText(trace)) { - s.selectAll('g').data(_calcTrace) + s.selectAll('g') + .data(Lib.identity) .enter().append('g') - .append('text'); + .append('text') + .each(function(calcPt) { removeBADNUM(calcPt, this); }); } }); @@ -164531,50 +170202,19 @@ module.exports = function plot(geo, calcData) { style(geo); }; -function makeConvertToLonLatFn(trace, topojson) { - if(!Array.isArray(trace.locations)) return Lib.identity; - - var features = getTopojsonFeatures(trace, topojson), - locationmode = trace.locationmode; - - return function(calcPt) { - var feature = locationToFeature(locationmode, calcPt.loc, features); - - if(feature) { - calcPt.lonlat = feature.properties.ct; - return calcPt; - } - else { - // mutate gd.calcdata so that hoverPoints knows to skip this datum - calcPt.lonlat = [null, null]; - return false; - } - }; -} +function fillLocationLonLat(calcTrace, topojson) { + var trace = calcTrace[0].trace; -function arrayItemToCalcdata(trace, calcItem, i) { - var marker = trace.marker; + if(!Array.isArray(trace.locations)) return; - function merge(traceAttr, calcAttr) { - arrayToCalcItem(traceAttr, calcItem, calcAttr, i); - } + var features = getTopojsonFeatures(trace, topojson); + var locationmode = trace.locationmode; - merge(trace.text, 'tx'); - merge(trace.textposition, 'tp'); - if(trace.textfont) { - merge(trace.textfont.size, 'ts'); - merge(trace.textfont.color, 'tc'); - merge(trace.textfont.family, 'tf'); - } + for(var i = 0; i < calcTrace.length; i++) { + var calcPt = calcTrace[i]; + var feature = locationToFeature(locationmode, calcPt.loc, features); - if(marker && marker.line) { - var markerLine = marker.line; - merge(marker.opacity, 'mo'); - merge(marker.symbol, 'mx'); - merge(marker.color, 'mc'); - merge(marker.size, 'ms'); - merge(markerLine.color, 'mlc'); - merge(markerLine.width, 'mlw'); + calcPt.lonlat = feature ? feature.properties.ct : [BADNUM, BADNUM]; } } @@ -164612,7 +170252,7 @@ function style(geo) { }); } -},{"../../components/color":575,"../../components/drawing":598,"../../lib":680,"../../lib/array_to_calc_item":667,"../../lib/geo_location_utils":675,"../../lib/geojson_utils":676,"../../lib/topojson_utils":701,"../scatter/subtypes":944,"d3":104}],960:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"../../constants/numerical":672,"../../lib":690,"../../lib/geo_location_utils":685,"../../lib/geojson_utils":686,"../../lib/topojson_utils":711,"../scatter/subtypes":967,"d3":114}],983:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164702,7 +170342,7 @@ module.exports = { error_x: scatterAttrs.error_x }; -},{"../../components/colorscale/color_attributes":582,"../../constants/gl2d_dashes":658,"../../constants/gl_markers":660,"../../lib/extend":672,"../scatter/attributes":924}],961:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":592,"../../constants/gl2d_dashes":668,"../../constants/gl_markers":670,"../../lib/extend":682,"../scatter/attributes":947}],984:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165015,7 +170655,7 @@ proto.update = function(options) { // representing the epoch milliseconds in a typed array; // also, perhaps the Python / R interfaces take care of String->Date conversions // such that there's no need to check for string dates in plotly.js) -// Patterned from axis_defaults.js:moreDates +// Patterned from axis_autotype.js:moreDates // Code DRYing is not done to preserve the most direct compilation possible for speed; // also, there are quite a few differences function allFastTypesLikely(a) { @@ -165351,7 +170991,7 @@ function createLineWithMarkers(scene, data) { module.exports = createLineWithMarkers; -},{"../../components/errorbars":604,"../../constants/gl2d_dashes":658,"../../constants/gl_markers":660,"../../lib":680,"../../lib/gl_format_color":677,"../../lib/str2rgbarray":698,"../../lib/typed_array_truncate":702,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_autotype":720,"../scatter/get_trace_color":932,"../scatter/make_bubble_size_func":939,"../scatter/subtypes":944,"fast-isnumeric":113,"gl-error2d":141,"gl-line2d":151,"gl-scatter2d":229,"gl-scatter2d-sdf":224}],962:[function(require,module,exports){ +},{"../../components/errorbars":614,"../../constants/gl2d_dashes":668,"../../constants/gl_markers":670,"../../lib":690,"../../lib/gl_format_color":687,"../../lib/str2rgbarray":708,"../../lib/typed_array_truncate":712,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_autotype":730,"../scatter/get_trace_color":955,"../scatter/make_bubble_size_func":962,"../scatter/subtypes":967,"fast-isnumeric":123,"gl-error2d":151,"gl-line2d":161,"gl-scatter2d":239,"gl-scatter2d-sdf":234}],985:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165408,7 +171048,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, defaultColor, {axis: 'x', inherit: 'y'}); }; -},{"../../components/errorbars/defaults":603,"../../lib":680,"../scatter/constants":929,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/xy_defaults":946,"./attributes":960}],963:[function(require,module,exports){ +},{"../../components/errorbars/defaults":613,"../../lib":690,"../scatter/constants":952,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/xy_defaults":969,"./attributes":983}],986:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165444,7 +171084,7 @@ ScatterGl.meta = { module.exports = ScatterGl; -},{"../../plots/gl2d":755,"../scatter/colorbar":927,"../scatter3d/calc":948,"./attributes":960,"./convert":961,"./defaults":962}],964:[function(require,module,exports){ +},{"../../plots/gl2d":769,"../scatter/colorbar":950,"../scatter3d/calc":971,"./attributes":983,"./convert":984,"./defaults":985}],987:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165474,19 +171114,15 @@ module.exports = { // locations // locationmode - mode: { - valType: 'flaglist', - flags: ['lines', 'markers', 'text'], + mode: extendFlat({}, scatterAttrs.mode, { dflt: 'markers', - extras: ['none'], - role: 'info', description: [ 'Determines the drawing mode for this scatter trace.', 'If the provided `mode` includes *text* then the `text` elements', 'appear at the coordinates. Otherwise, the `text` elements', 'appear on hover.' ].join(' ') - }, + }), text: extendFlat({}, scatterAttrs.text, { description: [ @@ -165494,7 +171130,19 @@ module.exports = { 'If a single string, the same string appears over', 'all the data points.', 'If an array of string, the items are mapped in order to the', - 'this trace\'s (lon,lat) coordinates.' + 'this trace\'s (lon,lat) coordinates.', + 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,', + 'these elements will be seen in the hover labels.' + ].join(' ') + }), + hovertext: extendFlat({}, scatterAttrs.hovertext, { + description: [ + 'Sets hover text elements associated with each (lon,lat) pair', + 'If a single string, the same string appears over', + 'all the data points.', + 'If an array of string, the items are mapped in order to the', + 'this trace\'s (lon,lat) coordinates.', + 'To be seen, trace `hoverinfo` must contain a *text* flag.' ].join(' ') }), @@ -165552,110 +171200,7 @@ module.exports = { }), }; -},{"../../components/colorbar/attributes":576,"../../lib/extend":672,"../../plots/attributes":717,"../../plots/mapbox/layout_attributes":774,"../scatter/attributes":924,"../scattergeo/attributes":953}],965:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var isNumeric = require('fast-isnumeric'); - -var Lib = require('../../lib'); -var Colorscale = require('../../components/colorscale'); - -var subtypes = require('../scatter/subtypes'); -var calcMarkerColorscale = require('../scatter/colorscale_calc'); -var makeBubbleSizeFn = require('../scatter/make_bubble_size_func'); - - -module.exports = function calc(gd, trace) { - var len = trace.lon.length, - marker = trace.marker; - - var hasMarkers = subtypes.hasMarkers(trace), - hasColorArray = (hasMarkers && Array.isArray(marker.color)), - hasSizeArray = (hasMarkers && Array.isArray(marker.size)), - hasSymbolArray = (hasMarkers && Array.isArray(marker.symbol)), - hasTextArray = Array.isArray(trace.text); - - calcMarkerColorscale(trace); - - var colorFn = Colorscale.hasColorscale(trace, 'marker') ? - Colorscale.makeColorScaleFunc( - Colorscale.extractScale( - marker.colorscale, - marker.cmin, - marker.cmax - ) - ) : - Lib.identity; - - var sizeFn = subtypes.isBubble(trace) ? - makeBubbleSizeFn(trace) : - Lib.identity; - - var calcTrace = [], - cnt = 0; - - // Different than cartesian calc step - // as skip over non-numeric lon, lat pairs. - // This makes the hover and convert calculations simpler. - - for(var i = 0; i < len; i++) { - var lon = trace.lon[i], - lat = trace.lat[i]; - - if(!isNumeric(lon) || !isNumeric(lat)) { - if(cnt > 0) calcTrace[cnt - 1].gapAfter = true; - continue; - } - - var calcPt = {}; - cnt++; - - // coerce numeric strings into numbers - calcPt.lonlat = [+lon, +lat]; - - if(hasMarkers) { - - if(hasColorArray) { - var mc = marker.color[i]; - - calcPt.mc = mc; - calcPt.mcc = colorFn(mc); - } - - if(hasSizeArray) { - var ms = marker.size[i]; - - calcPt.ms = ms; - calcPt.mrc = sizeFn(ms); - } - - if(hasSymbolArray) { - var mx = marker.symbol[i]; - calcPt.mx = (typeof mx === 'string') ? mx : 'circle'; - } - } - - if(hasTextArray) { - var tx = trace.text[i]; - calcPt.tx = (typeof tx === 'string') ? tx : ''; - } - - calcTrace.push(calcPt); - } - - return calcTrace; -}; - -},{"../../components/colorscale":589,"../../lib":680,"../scatter/colorscale_calc":928,"../scatter/make_bubble_size_func":939,"../scatter/subtypes":944,"fast-isnumeric":113}],966:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/mapbox/layout_attributes":788,"../scatter/attributes":947,"../scattergeo/attributes":976}],988:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165668,8 +171213,11 @@ module.exports = function calc(gd, trace) { 'use strict'; var Lib = require('../../lib'); +var BADNUM = require('../../constants/numerical').BADNUM; var geoJsonUtils = require('../../lib/geojson_utils'); +var Colorscale = require('../../components/colorscale'); +var makeBubbleSizeFn = require('../scatter/make_bubble_size_func'); var subTypes = require('../scatter/subtypes'); var convertTextOpts = require('../../plots/mapbox/convert_text_opts'); @@ -165701,16 +171249,16 @@ module.exports = function convert(calcTrace) { }; // early return if not visible or placeholder - if(!isVisible || calcTrace[0].placeholder) return opts; + if(!isVisible) return opts; // fill layer and line layer use the same coords - var coords; + var lineCoords; if(hasFill || hasLines) { - coords = geoJsonUtils.calcTraceToLineCoords(calcTrace); + lineCoords = geoJsonUtils.calcTraceToLineCoords(calcTrace); } if(hasFill) { - fill.geojson = geoJsonUtils.makePolygon(coords); + fill.geojson = geoJsonUtils.makePolygon(lineCoords); fill.layout.visibility = 'visible'; Lib.extendFlat(fill.paint, { @@ -165719,7 +171267,7 @@ module.exports = function convert(calcTrace) { } if(hasLines) { - line.geojson = geoJsonUtils.makeLine(coords); + line.geojson = geoJsonUtils.makeLine(lineCoords); line.layout.visibility = 'visible'; Lib.extendFlat(line.paint, { @@ -165813,12 +171361,30 @@ function initContainer() { // // The solution prove to be more robust than trying to generate // `stops` arrays from scale functions. +// +// TODO axe this when we bump mapbox-gl and rewrite this using +// "identity" property functions. +// See https://github.com/plotly/plotly.js/pull/1543 +// function makeCircleGeoJSON(calcTrace, hash) { var trace = calcTrace[0].trace; + var marker = trace.marker; - var marker = trace.marker, - hasColorArray = Array.isArray(marker.color), - hasSizeArray = Array.isArray(marker.size); + var colorFn; + if(Colorscale.hasColorscale(trace, 'marker')) { + colorFn = Colorscale.makeColorScaleFunc( + Colorscale.extractScale(marker.colorscale, marker.cmin, marker.cmax) + ); + } else if(Array.isArray(marker.color)) { + colorFn = Lib.identity; + } + + var sizeFn; + if(subTypes.isBubble(trace)) { + sizeFn = makeBubbleSizeFn(trace); + } else if(Array.isArray(marker.size)) { + sizeFn = Lib.identity; + } // Translate vals in trace arrayOk containers // into a val-to-index hash object @@ -165832,16 +171398,19 @@ function makeCircleGeoJSON(calcTrace, hash) { for(var i = 0; i < calcTrace.length; i++) { var calcPt = calcTrace[i]; + var lonlat = calcPt.lonlat; + + if(isBADNUM(lonlat)) continue; var props = {}; - if(hasColorArray) translate(props, COLOR_PROP, calcPt.mcc, i); - if(hasSizeArray) translate(props, SIZE_PROP, calcPt.mrc, i); + if(colorFn) translate(props, COLOR_PROP, colorFn(calcPt.mc), i); + if(sizeFn) translate(props, SIZE_PROP, sizeFn(calcPt.ms), i); features.push({ type: 'Feature', geometry: { type: 'Point', - coordinates: calcPt.lonlat + coordinates: lonlat }, properties: props }); @@ -165873,6 +171442,8 @@ function makeSymbolGeoJSON(calcTrace) { for(var i = 0; i < calcTrace.length; i++) { var calcPt = calcTrace[i]; + if(isBADNUM(calcPt.lonlat)) continue; + features.push({ type: 'Feature', geometry: { @@ -165964,7 +171535,12 @@ function getFillFunc(attr) { function blankFillFunc() { return ''; } -},{"../../lib":680,"../../lib/geojson_utils":676,"../../plots/mapbox/convert_text_opts":771,"../scatter/subtypes":944}],967:[function(require,module,exports){ +// only need to check lon (OR lat) +function isBADNUM(lonlat) { + return lonlat[0] === BADNUM; +} + +},{"../../components/colorscale":599,"../../constants/numerical":672,"../../lib":690,"../../lib/geojson_utils":686,"../../plots/mapbox/convert_text_opts":785,"../scatter/make_bubble_size_func":962,"../scatter/subtypes":967}],989:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166009,6 +171585,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('text'); + coerce('hovertext'); coerce('mode'); if(subTypes.hasLines(traceOut)) { @@ -166052,7 +171629,7 @@ function handleLonLatDefaults(traceIn, traceOut, coerce) { return len; } -},{"../../lib":680,"../scatter/attributes":924,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":964}],968:[function(require,module,exports){ +},{"../../lib":690,"../scatter/attributes":947,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":987}],990:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166072,7 +171649,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],969:[function(require,module,exports){ +},{}],991:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166086,7 +171663,7 @@ module.exports = function eventData(out, pt) { var Fx = require('../../plots/cartesian/graph_interact'); var getTraceColor = require('../scatter/get_trace_color'); - +var BADNUM = require('../../constants/numerical').BADNUM; module.exports = function hoverPoints(pointData, xval, yval) { var cd = pointData.cd, @@ -166094,8 +171671,6 @@ module.exports = function hoverPoints(pointData, xval, yval) { xa = pointData.xa, ya = pointData.ya; - if(cd[0].placeholder) return; - // compute winding number about [-180, 180] globe var winding = (xval >= 0) ? Math.floor((xval + 180) / 360) : @@ -166106,10 +171681,13 @@ module.exports = function hoverPoints(pointData, xval, yval) { var xval2 = xval - lonShift; function distFn(d) { - var lonlat = d.lonlat, - dx = Math.abs(xa.c2p(lonlat) - xa.c2p([xval2, lonlat[1]])), - dy = Math.abs(ya.c2p(lonlat) - ya.c2p([lonlat[0], yval])), - rad = Math.max(3, d.mrc || 0); + var lonlat = d.lonlat; + + if(lonlat[0] === BADNUM) return Infinity; + + var dx = Math.abs(xa.c2p(lonlat) - xa.c2p([xval2, lonlat[1]])); + var dy = Math.abs(ya.c2p(lonlat) - ya.c2p([lonlat[0], yval])); + var rad = Math.max(3, d.mrc || 0); return Math.max(Math.sqrt(dx * dx + dy * dy) - rad, 1 - 3 / rad); } @@ -166161,14 +171739,20 @@ function getExtraText(trace, di) { else if(hasLat) text.push('lat: ' + format(lonlat[1])); if(isAll || hoverinfo.indexOf('text') !== -1) { - var tx = di.tx || trace.text; + var tx; + + if(di.htx) tx = di.htx; + else if(trace.hovertext) tx = trace.hovertext; + else if(di.tx) tx = di.tx; + else if(trace.text) tx = trace.text; + if(!Array.isArray(tx)) text.push(tx); } return text.join('
'); } -},{"../../plots/cartesian/graph_interact":726,"../scatter/get_trace_color":932}],970:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../plots/cartesian/graph_interact":738,"../scatter/get_trace_color":955}],992:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166185,7 +171769,7 @@ var ScatterMapbox = {}; ScatterMapbox.attributes = require('./attributes'); ScatterMapbox.supplyDefaults = require('./defaults'); ScatterMapbox.colorbar = require('../scatter/colorbar'); -ScatterMapbox.calc = require('./calc'); +ScatterMapbox.calc = require('../scattergeo/calc'); ScatterMapbox.hoverPoints = require('./hover'); ScatterMapbox.eventData = require('./event_data'); ScatterMapbox.plot = require('./plot'); @@ -166205,7 +171789,7 @@ ScatterMapbox.meta = { module.exports = ScatterMapbox; -},{"../../plots/mapbox":772,"../scatter/colorbar":927,"./attributes":964,"./calc":965,"./defaults":967,"./event_data":968,"./hover":969,"./plot":971}],971:[function(require,module,exports){ +},{"../../plots/mapbox":786,"../scatter/colorbar":950,"../scattergeo/calc":977,"./attributes":987,"./defaults":989,"./event_data":990,"./hover":991,"./plot":993}],993:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166329,7 +171913,7 @@ module.exports = function createScatterMapbox(mapbox, calcTrace) { return scatterMapbox; }; -},{"./convert":966}],972:[function(require,module,exports){ +},{"./convert":988}],994:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166402,7 +171986,19 @@ module.exports = { 'If a single string, the same string appears over', 'all the data points.', 'If an array of strings, the items are mapped in order to the', - 'the data points in (a,b,c).' + 'the data points in (a,b,c).', + 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,', + 'these elements will be seen in the hover labels.' + ].join(' ') + }), + hovertext: extendFlat({}, scatterAttrs.hovertext, { + description: [ + 'Sets hover text elements associated with each (a,b,c) point.', + 'If a single string, the same string appears over', + 'all the data points.', + 'If an array of strings, the items are mapped in order to the', + 'the data points in (a,b,c).', + 'To be seen, trace `hoverinfo` must contain a *text* flag.' ].join(' ') }), line: { @@ -166454,7 +172050,7 @@ module.exports = { hoveron: scatterAttrs.hoveron, }; -},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../lib/extend":672,"../../plots/attributes":717,"../scatter/attributes":924}],973:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../lib/extend":682,"../../plots/attributes":727,"../scatter/attributes":947}],995:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166551,7 +172147,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../plots/cartesian/axes":719,"../scatter/arrays_to_calcdata":923,"../scatter/colorscale_calc":928,"../scatter/subtypes":944,"fast-isnumeric":113}],974:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951,"../scatter/subtypes":967,"fast-isnumeric":123}],996:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166617,6 +172213,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('sum'); coerce('text'); + coerce('hovertext'); var defaultMode = len < constants.PTS_LINESONLY ? 'lines+markers' : 'lines'; coerce('mode', defaultMode); @@ -166656,7 +172253,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('hoveron', dfltHoverOn.join('+') || 'points'); }; -},{"../../lib":680,"../scatter/constants":929,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/line_shape_defaults":937,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":972}],975:[function(require,module,exports){ +},{"../../lib":690,"../scatter/constants":952,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/line_shape_defaults":960,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":994}],997:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166727,7 +172324,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return scatterPointData; }; -},{"../../plots/cartesian/axes":719,"../scatter/hover":933}],976:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"../scatter/hover":956}],998:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166763,7 +172360,7 @@ ScatterTernary.meta = { module.exports = ScatterTernary; -},{"../../plots/ternary":786,"../scatter/colorbar":927,"./attributes":972,"./calc":973,"./defaults":974,"./hover":975,"./plot":977,"./select":978,"./style":979}],977:[function(require,module,exports){ +},{"../../plots/ternary":800,"../scatter/colorbar":950,"./attributes":994,"./calc":995,"./defaults":996,"./hover":997,"./plot":999,"./select":1000,"./style":1001}],999:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166799,7 +172396,7 @@ module.exports = function plot(ternary, moduleCalcData) { scatterPlot(ternary.graphDiv, plotinfo, moduleCalcData); }; -},{"../scatter/plot":941}],978:[function(require,module,exports){ +},{"../scatter/plot":964}],1000:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166834,7 +172431,7 @@ module.exports = function selectPoints(searchInfo, polygon) { return selection; }; -},{"../scatter/select":942}],979:[function(require,module,exports){ +},{"../scatter/select":965}],1001:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166863,7 +172460,7 @@ module.exports = function style(gd) { scatterStyle(gd); }; -},{"../scatter/style":943}],980:[function(require,module,exports){ +},{"../scatter/style":966}],1002:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167111,7 +172708,7 @@ module.exports = { } }; -},{"../../components/color":575,"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672}],981:[function(require,module,exports){ +},{"../../components/color":585,"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682}],1003:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167135,7 +172732,7 @@ module.exports = function calc(gd, trace) { } }; -},{"../../components/colorscale/calc":581}],982:[function(require,module,exports){ +},{"../../components/colorscale/calc":591}],1004:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167187,7 +172784,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],983:[function(require,module,exports){ +},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],1005:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167566,7 +173163,7 @@ function createSurfaceTrace(scene, data) { module.exports = createSurfaceTrace; -},{"../../lib/str2rgbarray":698,"gl-surface3d":247,"ndarray":446,"ndarray-fill":436,"ndarray-homography":438,"ndarray-ops":440,"tinycolor2":511}],984:[function(require,module,exports){ +},{"../../lib/str2rgbarray":708,"gl-surface3d":257,"ndarray":456,"ndarray-fill":446,"ndarray-homography":448,"ndarray-ops":450,"tinycolor2":521}],1006:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167687,7 +173284,7 @@ function mapLegacy(traceIn, oldAttr, newAttr) { } } -},{"../../components/colorscale/defaults":584,"../../lib":680,"../../registry":793,"./attributes":980}],985:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594,"../../lib":690,"../../registry":807,"./attributes":1002}],1007:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167730,7 +173327,7 @@ Surface.meta = { module.exports = Surface; -},{"../../plots/gl3d":758,"./attributes":980,"./calc":981,"./colorbar":982,"./convert":983,"./defaults":984}],986:[function(require,module,exports){ +},{"../../plots/gl3d":772,"./attributes":1002,"./calc":1003,"./colorbar":1004,"./convert":1005,"./defaults":1006}],1008:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168067,7 +173664,7 @@ function getFilterFunc(opts, d2c, targetCalendar) { } } -},{"../lib":680,"../plot_api/plot_schema":708,"../plots/cartesian/axis_autotype":720,"../plots/cartesian/axis_ids":722,"../plots/cartesian/set_convert":733,"../registry":793}],987:[function(require,module,exports){ +},{"../lib":690,"../plot_api/plot_schema":718,"../plots/cartesian/axis_autotype":730,"../plots/cartesian/axis_ids":732,"../plots/cartesian/set_convert":746,"../registry":807}],1009:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168223,5 +173820,5 @@ function transformOne(trace, state) { return newData; } -},{"../lib":680,"../plot_api/plot_schema":708}]},{},[17])(17) +},{"../lib":690,"../plot_api/plot_schema":718}]},{},[17])(17) }); \ No newline at end of file diff --git a/dist/plotly.js b/dist/plotly.js index 8ad5dc03548..50a975dd4e4 100644 --- a/dist/plotly.js +++ b/dist/plotly.js @@ -21,6 +21,7 @@ var rules = { "X svg a:hover": "fill:#3c6dc5;", "X .main-svg": "position:absolute;top:0;left:0;pointer-events:none;", "X .main-svg .draglayer": "pointer-events:all;", + "X .cursor-default": "cursor:default;", "X .cursor-pointer": "cursor:pointer;", "X .cursor-crosshair": "cursor:crosshair;", "X .cursor-move": "cursor:move;", @@ -68,7 +69,7 @@ for(var selector in rules) { Lib.addStyleRule(fullSelector, rules[selector]); } -},{"../src/lib":680}],2:[function(require,module,exports){ +},{"../src/lib":690}],2:[function(require,module,exports){ 'use strict'; module.exports = { @@ -201,7 +202,7 @@ module.exports = { module.exports = require('../src/traces/bar'); -},{"../src/traces/bar":807}],4:[function(require,module,exports){ +},{"../src/traces/bar":821}],4:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -214,7 +215,7 @@ module.exports = require('../src/traces/bar'); module.exports = require('../src/traces/box'); -},{"../src/traces/box":819}],5:[function(require,module,exports){ +},{"../src/traces/box":833}],5:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -227,7 +228,7 @@ module.exports = require('../src/traces/box'); module.exports = require('../src/components/calendars'); -},{"../src/components/calendars":573}],6:[function(require,module,exports){ +},{"../src/components/calendars":583}],6:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -240,7 +241,7 @@ module.exports = require('../src/components/calendars'); module.exports = require('../src/traces/candlestick'); -},{"../src/traces/candlestick":827}],7:[function(require,module,exports){ +},{"../src/traces/candlestick":841}],7:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -253,7 +254,7 @@ module.exports = require('../src/traces/candlestick'); module.exports = require('../src/traces/choropleth'); -},{"../src/traces/choropleth":834}],8:[function(require,module,exports){ +},{"../src/traces/choropleth":848}],8:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -266,7 +267,7 @@ module.exports = require('../src/traces/choropleth'); module.exports = require('../src/traces/contour'); -},{"../src/traces/contour":845}],9:[function(require,module,exports){ +},{"../src/traces/contour":859}],9:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -279,7 +280,7 @@ module.exports = require('../src/traces/contour'); module.exports = require('../src/core'); -},{"../src/core":665}],10:[function(require,module,exports){ +},{"../src/core":675}],10:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -292,7 +293,7 @@ module.exports = require('../src/core'); module.exports = require('../src/transforms/filter'); -},{"../src/transforms/filter":986}],11:[function(require,module,exports){ +},{"../src/transforms/filter":1008}],11:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -305,7 +306,7 @@ module.exports = require('../src/transforms/filter'); module.exports = require('../src/transforms/groupby'); -},{"../src/transforms/groupby":987}],12:[function(require,module,exports){ +},{"../src/transforms/groupby":1009}],12:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -318,7 +319,7 @@ module.exports = require('../src/transforms/groupby'); module.exports = require('../src/traces/heatmap'); -},{"../src/traces/heatmap":860}],13:[function(require,module,exports){ +},{"../src/traces/heatmap":874}],13:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -331,7 +332,7 @@ module.exports = require('../src/traces/heatmap'); module.exports = require('../src/traces/heatmapgl'); -},{"../src/traces/heatmapgl":869}],14:[function(require,module,exports){ +},{"../src/traces/heatmapgl":883}],14:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -344,7 +345,7 @@ module.exports = require('../src/traces/heatmapgl'); module.exports = require('../src/traces/histogram'); -},{"../src/traces/histogram":877}],15:[function(require,module,exports){ +},{"../src/traces/histogram":891}],15:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -357,7 +358,7 @@ module.exports = require('../src/traces/histogram'); module.exports = require('../src/traces/histogram2d'); -},{"../src/traces/histogram2d":882}],16:[function(require,module,exports){ +},{"../src/traces/histogram2d":896}],16:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -370,7 +371,7 @@ module.exports = require('../src/traces/histogram2d'); module.exports = require('../src/traces/histogram2dcontour'); -},{"../src/traces/histogram2dcontour":886}],17:[function(require,module,exports){ +},{"../src/traces/histogram2dcontour":900}],17:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -394,6 +395,7 @@ Plotly.register([ require('./pie'), require('./contour'), require('./scatterternary'), + require('./sankey'), require('./scatter3d'), require('./surface'), @@ -435,7 +437,7 @@ Plotly.register([ module.exports = Plotly; -},{"./bar":3,"./box":4,"./calendars":5,"./candlestick":6,"./choropleth":7,"./contour":8,"./core":9,"./filter":10,"./groupby":11,"./heatmap":12,"./heatmapgl":13,"./histogram":14,"./histogram2d":15,"./histogram2dcontour":16,"./mesh3d":18,"./ohlc":19,"./parcoords":20,"./pie":21,"./pointcloud":22,"./scatter3d":23,"./scattergeo":24,"./scattergl":25,"./scattermapbox":26,"./scatterternary":27,"./surface":28}],18:[function(require,module,exports){ +},{"./bar":3,"./box":4,"./calendars":5,"./candlestick":6,"./choropleth":7,"./contour":8,"./core":9,"./filter":10,"./groupby":11,"./heatmap":12,"./heatmapgl":13,"./histogram":14,"./histogram2d":15,"./histogram2dcontour":16,"./mesh3d":18,"./ohlc":19,"./parcoords":20,"./pie":21,"./pointcloud":22,"./sankey":23,"./scatter3d":24,"./scattergeo":25,"./scattergl":26,"./scattermapbox":27,"./scatterternary":28,"./surface":29}],18:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -448,7 +450,7 @@ module.exports = Plotly; module.exports = require('../src/traces/mesh3d'); -},{"../src/traces/mesh3d":890}],19:[function(require,module,exports){ +},{"../src/traces/mesh3d":904}],19:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -461,7 +463,7 @@ module.exports = require('../src/traces/mesh3d'); module.exports = require('../src/traces/ohlc'); -},{"../src/traces/ohlc":895}],20:[function(require,module,exports){ +},{"../src/traces/ohlc":909}],20:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -474,7 +476,7 @@ module.exports = require('../src/traces/ohlc'); module.exports = require('../src/traces/parcoords'); -},{"../src/traces/parcoords":904}],21:[function(require,module,exports){ +},{"../src/traces/parcoords":918}],21:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -487,7 +489,7 @@ module.exports = require('../src/traces/parcoords'); module.exports = require('../src/traces/pie'); -},{"../src/traces/pie":913}],22:[function(require,module,exports){ +},{"../src/traces/pie":927}],22:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -500,7 +502,20 @@ module.exports = require('../src/traces/pie'); module.exports = require('../src/traces/pointcloud'); -},{"../src/traces/pointcloud":922}],23:[function(require,module,exports){ +},{"../src/traces/pointcloud":936}],23:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = require('../src/traces/sankey'); + +},{"../src/traces/sankey":943}],24:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -513,7 +528,7 @@ module.exports = require('../src/traces/pointcloud'); module.exports = require('../src/traces/scatter3d'); -},{"../src/traces/scatter3d":952}],24:[function(require,module,exports){ +},{"../src/traces/scatter3d":975}],25:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -526,7 +541,7 @@ module.exports = require('../src/traces/scatter3d'); module.exports = require('../src/traces/scattergeo'); -},{"../src/traces/scattergeo":958}],25:[function(require,module,exports){ +},{"../src/traces/scattergeo":981}],26:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -539,7 +554,7 @@ module.exports = require('../src/traces/scattergeo'); module.exports = require('../src/traces/scattergl'); -},{"../src/traces/scattergl":963}],26:[function(require,module,exports){ +},{"../src/traces/scattergl":986}],27:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -552,7 +567,7 @@ module.exports = require('../src/traces/scattergl'); module.exports = require('../src/traces/scattermapbox'); -},{"../src/traces/scattermapbox":970}],27:[function(require,module,exports){ +},{"../src/traces/scattermapbox":992}],28:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -565,7 +580,7 @@ module.exports = require('../src/traces/scattermapbox'); module.exports = require('../src/traces/scatterternary'); -},{"../src/traces/scatterternary":976}],28:[function(require,module,exports){ +},{"../src/traces/scatterternary":998}],29:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -578,7 +593,7 @@ module.exports = require('../src/traces/scatterternary'); module.exports = require('../src/traces/surface'); -},{"../src/traces/surface":985}],29:[function(require,module,exports){ +},{"../src/traces/surface":1007}],30:[function(require,module,exports){ 'use strict' module.exports = createCamera @@ -807,7 +822,7 @@ function createCamera(element, options) { return camera } -},{"3d-view":30,"mouse-change":431,"mouse-event-offset":432,"mouse-wheel":434,"right-now":480}],30:[function(require,module,exports){ +},{"3d-view":31,"mouse-change":441,"mouse-event-offset":442,"mouse-wheel":444,"right-now":490}],31:[function(require,module,exports){ 'use strict' module.exports = createViewController @@ -930,7 +945,317 @@ function createViewController(options) { matrix: matrix }, mode) } -},{"matrix-camera-controller":429,"orbit-camera-controller":451,"turntable-camera-controller":515}],31:[function(require,module,exports){ +},{"matrix-camera-controller":439,"orbit-camera-controller":461,"turntable-camera-controller":525}],32:[function(require,module,exports){ +// https://github.com/d3/d3-sankey Version 0.4.2. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-array'), require('d3-collection'), require('d3-interpolate')) : + typeof define === 'function' && define.amd ? define(['exports', 'd3-array', 'd3-collection', 'd3-interpolate'], factory) : + (factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3)); +}(this, (function (exports,d3Array,d3Collection,d3Interpolate) { 'use strict'; + +var sankey = function() { + var sankey = {}, + nodeWidth = 24, + nodePadding = 8, + size = [1, 1], + nodes = [], + links = []; + + sankey.nodeWidth = function(_) { + if (!arguments.length) return nodeWidth; + nodeWidth = +_; + return sankey; + }; + + sankey.nodePadding = function(_) { + if (!arguments.length) return nodePadding; + nodePadding = +_; + return sankey; + }; + + sankey.nodes = function(_) { + if (!arguments.length) return nodes; + nodes = _; + return sankey; + }; + + sankey.links = function(_) { + if (!arguments.length) return links; + links = _; + return sankey; + }; + + sankey.size = function(_) { + if (!arguments.length) return size; + size = _; + return sankey; + }; + + sankey.layout = function(iterations) { + computeNodeLinks(); + computeNodeValues(); + computeNodeBreadths(); + computeNodeDepths(iterations); + computeLinkDepths(); + return sankey; + }; + + sankey.relayout = function() { + computeLinkDepths(); + return sankey; + }; + + sankey.link = function() { + var curvature = .5; + + function link(d) { + var x0 = d.source.x + d.source.dx, + x1 = d.target.x, + xi = d3Interpolate.interpolateNumber(x0, x1), + x2 = xi(curvature), + x3 = xi(1 - curvature), + y0 = d.source.y + d.sy + d.dy / 2, + y1 = d.target.y + d.ty + d.dy / 2; + return "M" + x0 + "," + y0 + + "C" + x2 + "," + y0 + + " " + x3 + "," + y1 + + " " + x1 + "," + y1; + } + + link.curvature = function(_) { + if (!arguments.length) return curvature; + curvature = +_; + return link; + }; + + return link; + }; + + // Populate the sourceLinks and targetLinks for each node. + // Also, if the source and target are not objects, assume they are indices. + function computeNodeLinks() { + nodes.forEach(function(node) { + node.sourceLinks = []; + node.targetLinks = []; + }); + links.forEach(function(link, i) { + var source = link.source, + target = link.target; + if (typeof source === "number") source = link.source = nodes[link.source]; + if (typeof target === "number") target = link.target = nodes[link.target]; + link.originalIndex = i; + source.sourceLinks.push(link); + target.targetLinks.push(link); + }); + } + + // Compute the value (size) of each node by summing the associated links. + function computeNodeValues() { + nodes.forEach(function(node) { + node.value = Math.max( + d3Array.sum(node.sourceLinks, value), + d3Array.sum(node.targetLinks, value) + ); + }); + } + + // Iteratively assign the breadth (x-position) for each node. + // Nodes are assigned the maximum breadth of incoming neighbors plus one; + // nodes with no incoming links are assigned breadth zero, while + // nodes with no outgoing links are assigned the maximum breadth. + function computeNodeBreadths() { + var remainingNodes = nodes, + nextNodes, + x = 0; + + while (remainingNodes.length) { + nextNodes = []; + remainingNodes.forEach(function(node) { + node.x = x; + node.dx = nodeWidth; + node.sourceLinks.forEach(function(link) { + if (nextNodes.indexOf(link.target) < 0) { + nextNodes.push(link.target); + } + }); + }); + remainingNodes = nextNodes; + ++x; + } + + // + moveSinksRight(x); + scaleNodeBreadths((size[0] - nodeWidth) / (x - 1)); + } + + // function moveSourcesRight() { + // nodes.forEach(function(node) { + // if (!node.targetLinks.length) { + // node.x = min(node.sourceLinks, function(d) { return d.target.x; }) - 1; + // } + // }); + // } + + function moveSinksRight(x) { + nodes.forEach(function(node) { + if (!node.sourceLinks.length) { + node.x = x - 1; + } + }); + } + + function scaleNodeBreadths(kx) { + nodes.forEach(function(node) { + node.x *= kx; + }); + } + + function computeNodeDepths(iterations) { + var nodesByBreadth = d3Collection.nest() + .key(function(d) { return d.x; }) + .sortKeys(d3Array.ascending) + .entries(nodes) + .map(function(d) { return d.values; }); + + // + initializeNodeDepth(); + resolveCollisions(); + for (var alpha = 1; iterations > 0; --iterations) { + relaxRightToLeft(alpha *= .99); + resolveCollisions(); + relaxLeftToRight(alpha); + resolveCollisions(); + } + + function initializeNodeDepth() { + var ky = d3Array.min(nodesByBreadth, function(nodes) { + return (size[1] - (nodes.length - 1) * nodePadding) / d3Array.sum(nodes, value); + }); + + nodesByBreadth.forEach(function(nodes) { + nodes.forEach(function(node, i) { + node.y = i; + node.dy = node.value * ky; + }); + }); + + links.forEach(function(link) { + link.dy = link.value * ky; + }); + } + + function relaxLeftToRight(alpha) { + nodesByBreadth.forEach(function(nodes) { + nodes.forEach(function(node) { + if (node.targetLinks.length) { + var y = d3Array.sum(node.targetLinks, weightedSource) / d3Array.sum(node.targetLinks, value); + node.y += (y - center(node)) * alpha; + } + }); + }); + + function weightedSource(link) { + return center(link.source) * link.value; + } + } + + function relaxRightToLeft(alpha) { + nodesByBreadth.slice().reverse().forEach(function(nodes) { + nodes.forEach(function(node) { + if (node.sourceLinks.length) { + var y = d3Array.sum(node.sourceLinks, weightedTarget) / d3Array.sum(node.sourceLinks, value); + node.y += (y - center(node)) * alpha; + } + }); + }); + + function weightedTarget(link) { + return center(link.target) * link.value; + } + } + + function resolveCollisions() { + nodesByBreadth.forEach(function(nodes) { + var node, + dy, + y0 = 0, + n = nodes.length, + i; + + // Push any overlapping nodes down. + nodes.sort(ascendingDepth); + for (i = 0; i < n; ++i) { + node = nodes[i]; + dy = y0 - node.y; + if (dy > 0) node.y += dy; + y0 = node.y + node.dy + nodePadding; + } + + // If the bottommost node goes outside the bounds, push it back up. + dy = y0 - nodePadding - size[1]; + if (dy > 0) { + y0 = node.y -= dy; + + // Push any overlapping nodes back up. + for (i = n - 2; i >= 0; --i) { + node = nodes[i]; + dy = node.y + node.dy + nodePadding - y0; + if (dy > 0) node.y -= dy; + y0 = node.y; + } + } + }); + } + + function ascendingDepth(a, b) { + return a.y - b.y; + } + } + + function computeLinkDepths() { + nodes.forEach(function(node) { + node.sourceLinks.sort(ascendingTargetDepth); + node.targetLinks.sort(ascendingSourceDepth); + }); + nodes.forEach(function(node) { + var sy = 0, ty = 0; + node.sourceLinks.forEach(function(link) { + link.sy = sy; + sy += link.dy; + }); + node.targetLinks.forEach(function(link) { + link.ty = ty; + ty += link.dy; + }); + }); + + function ascendingSourceDepth(a, b) { + return (a.source.y - b.source.y) || (a.originalIndex - b.originalIndex); + } + + function ascendingTargetDepth(a, b) { + return (a.target.y - b.target.y) || (a.originalIndex - b.originalIndex); + } + } + + function center(node) { + return node.y + node.dy / 2; + } + + function value(link) { + return link.value; + } + + return sankey; +}; + +exports.sankey = sankey; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{"d3-array":106,"d3-collection":107,"d3-interpolate":111}],33:[function(require,module,exports){ 'use strict' var weakMap = typeof WeakMap === 'undefined' ? require('weak-map') : WeakMap @@ -961,7 +1286,7 @@ function createABigTriangle(gl) { module.exports = createABigTriangle -},{"gl-buffer":138,"gl-vao":252,"weak-map":536}],32:[function(require,module,exports){ +},{"gl-buffer":148,"gl-vao":262,"weak-map":546}],34:[function(require,module,exports){ var padLeft = require('pad-left') module.exports = addLineNumbers @@ -979,7 +1304,7 @@ function addLineNumbers (string, start, delim) { }).join('\n') } -},{"pad-left":452}],33:[function(require,module,exports){ +},{"pad-left":462}],35:[function(require,module,exports){ 'use strict' module.exports = affineHull @@ -1031,7 +1356,7 @@ function affineHull(points) { } return index } -},{"robust-orientation":486}],34:[function(require,module,exports){ +},{"robust-orientation":496}],36:[function(require,module,exports){ 'use strict' module.exports = alphaComplex @@ -1048,7 +1373,7 @@ function alphaComplex(alpha, points) { return circumradius(simplex) * alpha < 1 }) } -},{"circumradius":77,"delaunay-triangulate":105}],35:[function(require,module,exports){ +},{"circumradius":79,"delaunay-triangulate":115}],37:[function(require,module,exports){ module.exports = alphaShape var ac = require('alpha-complex') @@ -1057,7 +1382,7 @@ var bnd = require('simplicial-complex-boundary') function alphaShape(alpha, points) { return bnd(ac(alpha, points)) } -},{"alpha-complex":34,"simplicial-complex-boundary":494}],36:[function(require,module,exports){ +},{"alpha-complex":36,"simplicial-complex-boundary":504}],38:[function(require,module,exports){ 'use strict'; var arraytools = function () { @@ -1246,7 +1571,7 @@ var arraytools = function () { module.exports = arraytools(); -},{}],37:[function(require,module,exports){ +},{}],39:[function(require,module,exports){ (function (global){ 'use strict'; @@ -1740,12 +2065,12 @@ var objectKeys = Object.keys || function (obj) { }; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"util/":526}],38:[function(require,module,exports){ +},{"util/":536}],40:[function(require,module,exports){ module.exports = function _atob(str) { return atob(str) } -},{}],39:[function(require,module,exports){ +},{}],41:[function(require,module,exports){ 'use strict' module.exports = barycentric @@ -1793,7 +2118,7 @@ function barycentric(simplex, point) { } return y } -},{"robust-linear-solve":485}],40:[function(require,module,exports){ +},{"robust-linear-solve":495}],42:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -1806,7 +2131,7 @@ function add(a, b) { a[1].mul(b[1])) } -},{"./lib/rationalize":50}],41:[function(require,module,exports){ +},{"./lib/rationalize":52}],43:[function(require,module,exports){ 'use strict' module.exports = cmp @@ -1815,7 +2140,7 @@ function cmp(a, b) { return a[0].mul(b[1]).cmp(b[0].mul(a[1])) } -},{}],42:[function(require,module,exports){ +},{}],44:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -1826,7 +2151,7 @@ function div(a, b) { return rationalize(a[0].mul(b[1]), a[1].mul(b[0])) } -},{"./lib/rationalize":50}],43:[function(require,module,exports){ +},{"./lib/rationalize":52}],45:[function(require,module,exports){ 'use strict' var isRat = require('./is-rat') @@ -1888,7 +2213,7 @@ function makeRational(numer, denom) { return rationalize(a, b) } -},{"./div":42,"./is-rat":44,"./lib/is-bn":48,"./lib/num-to-bn":49,"./lib/rationalize":50,"./lib/str-to-bn":51}],44:[function(require,module,exports){ +},{"./div":44,"./is-rat":46,"./lib/is-bn":50,"./lib/num-to-bn":51,"./lib/rationalize":52,"./lib/str-to-bn":53}],46:[function(require,module,exports){ 'use strict' var isBN = require('./lib/is-bn') @@ -1899,7 +2224,7 @@ function isRat(x) { return Array.isArray(x) && x.length === 2 && isBN(x[0]) && isBN(x[1]) } -},{"./lib/is-bn":48}],45:[function(require,module,exports){ +},{"./lib/is-bn":50}],47:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -1910,7 +2235,7 @@ function sign (x) { return x.cmp(new BN(0)) } -},{"bn.js":58}],46:[function(require,module,exports){ +},{"bn.js":60}],48:[function(require,module,exports){ 'use strict' var sign = require('./bn-sign') @@ -1935,7 +2260,7 @@ function bn2num(b) { return sign(b) * out } -},{"./bn-sign":45}],47:[function(require,module,exports){ +},{"./bn-sign":47}],49:[function(require,module,exports){ 'use strict' var db = require('double-bits') @@ -1956,7 +2281,7 @@ function ctzNumber(x) { return h + 32 } -},{"bit-twiddle":57,"double-bits":106}],48:[function(require,module,exports){ +},{"bit-twiddle":59,"double-bits":116}],50:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -1969,7 +2294,7 @@ function isBN(x) { return x && typeof x === 'object' && Boolean(x.words) } -},{"bn.js":58}],49:[function(require,module,exports){ +},{"bn.js":60}],51:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -1986,7 +2311,7 @@ function num2bn(x) { } } -},{"bn.js":58,"double-bits":106}],50:[function(require,module,exports){ +},{"bn.js":60,"double-bits":116}],52:[function(require,module,exports){ 'use strict' var num2bn = require('./num-to-bn') @@ -2014,7 +2339,7 @@ function rationalize(numer, denom) { return [ numer, denom ] } -},{"./bn-sign":45,"./num-to-bn":49}],51:[function(require,module,exports){ +},{"./bn-sign":47,"./num-to-bn":51}],53:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2025,7 +2350,7 @@ function str2BN(x) { return new BN(x) } -},{"bn.js":58}],52:[function(require,module,exports){ +},{"bn.js":60}],54:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2036,7 +2361,7 @@ function mul(a, b) { return rationalize(a[0].mul(b[0]), a[1].mul(b[1])) } -},{"./lib/rationalize":50}],53:[function(require,module,exports){ +},{"./lib/rationalize":52}],55:[function(require,module,exports){ 'use strict' var bnsign = require('./lib/bn-sign') @@ -2047,7 +2372,7 @@ function sign(x) { return bnsign(x[0]) * bnsign(x[1]) } -},{"./lib/bn-sign":45}],54:[function(require,module,exports){ +},{"./lib/bn-sign":47}],56:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2058,7 +2383,7 @@ function sub(a, b) { return rationalize(a[0].mul(b[1]).sub(a[1].mul(b[0])), a[1].mul(b[1])) } -},{"./lib/rationalize":50}],55:[function(require,module,exports){ +},{"./lib/rationalize":52}],57:[function(require,module,exports){ 'use strict' var bn2num = require('./lib/bn-to-num') @@ -2096,7 +2421,7 @@ function roundRat (f) { } } -},{"./lib/bn-to-num":46,"./lib/ctz":47}],56:[function(require,module,exports){ +},{"./lib/bn-to-num":48,"./lib/ctz":49}],58:[function(require,module,exports){ "use strict" function compileSearch(funcName, predicate, reversed, extraArgs, useNdarray, earlyOut) { @@ -2158,7 +2483,7 @@ module.exports = { eq: compileBoundsSearch("-", true, "EQ", true) } -},{}],57:[function(require,module,exports){ +},{}],59:[function(require,module,exports){ /** * Bit twiddling hacks for JavaScript. * @@ -2364,7 +2689,7 @@ exports.nextCombination = function(v) { } -},{}],58:[function(require,module,exports){ +},{}],60:[function(require,module,exports){ (function (module, exports) { 'use strict'; @@ -5793,7 +6118,7 @@ exports.nextCombination = function(v) { }; })(typeof module === 'undefined' || module, this); -},{}],59:[function(require,module,exports){ +},{}],61:[function(require,module,exports){ 'use strict' module.exports = boundary @@ -5829,7 +6154,7 @@ function boundary (cells) { return result } -},{}],60:[function(require,module,exports){ +},{}],62:[function(require,module,exports){ 'use strict' module.exports = boxIntersectWrapper @@ -5968,7 +6293,7 @@ function boxIntersectWrapper(arg0, arg1, arg2) { throw new Error('box-intersect: Invalid arguments') } } -},{"./lib/intersect":62,"./lib/sweep":66,"typedarray-pool":518}],61:[function(require,module,exports){ +},{"./lib/intersect":64,"./lib/sweep":68,"typedarray-pool":528}],63:[function(require,module,exports){ 'use strict' var DIMENSION = 'd' @@ -6113,7 +6438,7 @@ function bruteForcePlanner(full) { exports.partial = bruteForcePlanner(false) exports.full = bruteForcePlanner(true) -},{}],62:[function(require,module,exports){ +},{}],64:[function(require,module,exports){ 'use strict' module.exports = boxIntersectIter @@ -6608,7 +6933,7 @@ function boxIntersectIter( } } } -},{"./brute":61,"./median":63,"./partition":64,"./sweep":66,"bit-twiddle":57,"typedarray-pool":518}],63:[function(require,module,exports){ +},{"./brute":63,"./median":65,"./partition":66,"./sweep":68,"bit-twiddle":59,"typedarray-pool":528}],65:[function(require,module,exports){ 'use strict' module.exports = findMedian @@ -6751,7 +7076,7 @@ function findMedian(d, axis, start, end, boxes, ids) { start, mid, boxes, ids, boxes[elemSize*mid+axis]) } -},{"./partition":64}],64:[function(require,module,exports){ +},{"./partition":66}],66:[function(require,module,exports){ 'use strict' module.exports = genPartition @@ -6772,7 +7097,7 @@ function genPartition(predicate, args) { .replace('$', predicate)) return Function.apply(void 0, fargs) } -},{}],65:[function(require,module,exports){ +},{}],67:[function(require,module,exports){ 'use strict'; //This code is extracted from ndarray-sort @@ -7009,7 +7334,7 @@ function quickSort(left, right, data) { quickSort(less, great, data); } } -},{}],66:[function(require,module,exports){ +},{}],68:[function(require,module,exports){ 'use strict' module.exports = { @@ -7444,7 +7769,7 @@ red_loop: } } } -},{"./sort":65,"bit-twiddle":57,"typedarray-pool":518}],67:[function(require,module,exports){ +},{"./sort":67,"bit-twiddle":59,"typedarray-pool":528}],69:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -7699,8 +8024,8 @@ function fromObject (obj) { } if (obj) { - if (ArrayBuffer.isView(obj) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { + if (isArrayBufferView(obj) || 'length' in obj) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { return createBuffer(0) } return fromArrayLike(obj) @@ -7811,7 +8136,7 @@ function byteLength (string, encoding) { if (Buffer.isBuffer(string)) { return string.length } - if (ArrayBuffer.isView(string) || string instanceof ArrayBuffer) { + if (isArrayBufferView(string) || string instanceof ArrayBuffer) { return string.byteLength } if (typeof string !== 'string') { @@ -8077,7 +8402,7 @@ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { byteOffset = -0x80000000 } byteOffset = +byteOffset // Coerce to Number. - if (isNaN(byteOffset)) { + if (numberIsNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : (buffer.length - 1) } @@ -8208,7 +8533,7 @@ function hexWrite (buf, string, offset, length) { } for (var i = 0; i < length; ++i) { var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) return i + if (numberIsNaN(parsed)) return i buf[offset + i] = parsed } return i @@ -9011,7 +9336,7 @@ var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g function base64clean (str) { // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') + str = str.trim().replace(INVALID_BASE64_RE, '') // Node converts strings with length < 2 to '' if (str.length < 2) return '' // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not @@ -9021,11 +9346,6 @@ function base64clean (str) { return str } -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - function toHex (n) { if (n < 16) return '0' + n.toString(16) return n.toString(16) @@ -9148,11 +9468,16 @@ function blitBuffer (src, dst, offset, length) { return i } -function isnan (val) { - return val !== val // eslint-disable-line no-self-compare +// Node 0.10 supports `ArrayBuffer` but lacks `ArrayBuffer.isView` +function isArrayBufferView (obj) { + return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj) } -},{"base64-js":68,"ieee754":269}],68:[function(require,module,exports){ +function numberIsNaN (obj) { + return obj !== obj // eslint-disable-line no-self-compare +} + +},{"base64-js":70,"ieee754":279}],70:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -9268,7 +9593,7 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],69:[function(require,module,exports){ +},{}],71:[function(require,module,exports){ 'use strict' var monotoneTriangulate = require('./lib/monotone') @@ -9352,7 +9677,7 @@ function cdt2d(points, edges, options) { } } -},{"./lib/delaunay":70,"./lib/filter":71,"./lib/monotone":72,"./lib/triangulation":73}],70:[function(require,module,exports){ +},{"./lib/delaunay":72,"./lib/filter":73,"./lib/monotone":74,"./lib/triangulation":75}],72:[function(require,module,exports){ 'use strict' var inCircle = require('robust-in-sphere')[4] @@ -9469,7 +9794,7 @@ function delaunayRefine(points, triangulation) { } } -},{"binary-search-bounds":74,"robust-in-sphere":484}],71:[function(require,module,exports){ +},{"binary-search-bounds":76,"robust-in-sphere":494}],73:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9651,7 +9976,7 @@ function classifyFaces(triangulation, target, infinity) { return result } -},{"binary-search-bounds":74}],72:[function(require,module,exports){ +},{"binary-search-bounds":76}],74:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9840,7 +10165,7 @@ function monotoneTriangulate(points, edges) { return cells } -},{"binary-search-bounds":74,"robust-orientation":486}],73:[function(require,module,exports){ +},{"binary-search-bounds":76,"robust-orientation":496}],75:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9946,7 +10271,7 @@ function createTriangulation(numVerts, edges) { return new Triangulation(stars, edges) } -},{"binary-search-bounds":74}],74:[function(require,module,exports){ +},{"binary-search-bounds":76}],76:[function(require,module,exports){ "use strict" function compileSearch(funcName, predicate, reversed, extraArgs, earlyOut) { @@ -10000,7 +10325,7 @@ module.exports = { eq: compileBoundsSearch("-", true, "EQ", true) } -},{}],75:[function(require,module,exports){ +},{}],77:[function(require,module,exports){ 'use strict' module.exports = orientation @@ -10019,7 +10344,7 @@ function orientation(s) { return p } -},{}],76:[function(require,module,exports){ +},{}],78:[function(require,module,exports){ "use strict" var dup = require("dup") @@ -10088,7 +10413,7 @@ function circumcenter(points) { circumcenter.barycenetric = barycentricCircumcenter module.exports = circumcenter -},{"dup":107,"robust-linear-solve":485}],77:[function(require,module,exports){ +},{"dup":117,"robust-linear-solve":495}],79:[function(require,module,exports){ module.exports = circumradius var circumcenter = require('circumcenter') @@ -10104,7 +10429,7 @@ function circumradius(points) { } return Math.sqrt(avgDist / points.length) } -},{"circumcenter":76}],78:[function(require,module,exports){ +},{"circumcenter":78}],80:[function(require,module,exports){ module.exports = clamp function clamp(value, min, max) { @@ -10113,7 +10438,7 @@ function clamp(value, min, max) { : (value < max ? max : value > min ? min : value) } -},{}],79:[function(require,module,exports){ +},{}],81:[function(require,module,exports){ 'use strict' module.exports = cleanPSLG @@ -10496,7 +10821,7 @@ function cleanPSLG (points, edges, colors) { return modified } -},{"./lib/rat-seg-intersect":80,"big-rat":43,"big-rat/cmp":41,"big-rat/to-float":55,"box-intersect":60,"nextafter":447,"rat-vec":473,"robust-segment-intersect":489,"union-find":519}],80:[function(require,module,exports){ +},{"./lib/rat-seg-intersect":82,"big-rat":45,"big-rat/cmp":43,"big-rat/to-float":57,"box-intersect":62,"nextafter":457,"rat-vec":483,"robust-segment-intersect":499,"union-find":529}],82:[function(require,module,exports){ 'use strict' module.exports = solveIntersection @@ -10540,7 +10865,7 @@ function solveIntersection (a, b, c, d) { return r } -},{"big-rat/div":42,"big-rat/mul":52,"big-rat/sign":53,"big-rat/sub":54,"rat-vec/add":472,"rat-vec/muls":474,"rat-vec/sub":475}],81:[function(require,module,exports){ +},{"big-rat/div":44,"big-rat/mul":54,"big-rat/sign":55,"big-rat/sub":56,"rat-vec/add":482,"rat-vec/muls":484,"rat-vec/sub":485}],83:[function(require,module,exports){ (function (Buffer){ var clone = (function() { 'use strict'; @@ -10704,7 +11029,7 @@ if (typeof module === 'object' && module.exports) { } }).call(this,require("buffer").Buffer) -},{"buffer":67}],82:[function(require,module,exports){ +},{"buffer":69}],84:[function(require,module,exports){ /** @module color-number */ 'use strict' @@ -10738,7 +11063,7 @@ function toNumber (rgba, normalized) { return n } -},{"clamp":78}],83:[function(require,module,exports){ +},{"clamp":80}],85:[function(require,module,exports){ module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], @@ -10889,7 +11214,7 @@ module.exports = { "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; -},{}],84:[function(require,module,exports){ +},{}],86:[function(require,module,exports){ /** * @module color-parse */ @@ -11066,7 +11391,7 @@ function parse (cstr) { }; } -},{"color-name":83,"is-plain-obj":276}],85:[function(require,module,exports){ +},{"color-name":85,"is-plain-obj":286}],87:[function(require,module,exports){ /** @module color-rgba */ 'use strict' @@ -11105,7 +11430,7 @@ module.exports = function rgba (color, normalize) { } -},{"clamp":78,"color-parse":84,"color-space/hsl":86}],86:[function(require,module,exports){ +},{"clamp":80,"color-parse":86,"color-space/hsl":88}],88:[function(require,module,exports){ /** * @module color-space/hsl */ @@ -11214,7 +11539,7 @@ rgb.hsl = function(rgb) { return [h, s * 100, l * 100]; }; -},{"./rgb":87}],87:[function(require,module,exports){ +},{"./rgb":89}],89:[function(require,module,exports){ /** * RGB space. * @@ -11230,7 +11555,7 @@ module.exports = { alias: ['RGB'] }; -},{}],88:[function(require,module,exports){ +},{}],90:[function(require,module,exports){ module.exports={ "jet":[{"index":0,"rgb":[0,0,131]},{"index":0.125,"rgb":[0,60,170]},{"index":0.375,"rgb":[5,255,255]},{"index":0.625,"rgb":[255,255,0]},{"index":0.875,"rgb":[250,0,0]},{"index":1,"rgb":[128,0,0]}], @@ -11323,7 +11648,7 @@ module.exports={ "cubehelix": [{"index":0,"rgb":[0,0,0]},{"index":0.07,"rgb":[22,5,59]},{"index":0.13,"rgb":[60,4,105]},{"index":0.2,"rgb":[109,1,135]},{"index":0.27,"rgb":[161,0,147]},{"index":0.33,"rgb":[210,2,142]},{"index":0.4,"rgb":[251,11,123]},{"index":0.47,"rgb":[255,29,97]},{"index":0.53,"rgb":[255,54,69]},{"index":0.6,"rgb":[255,85,46]},{"index":0.67,"rgb":[255,120,34]},{"index":0.73,"rgb":[255,157,37]},{"index":0.8,"rgb":[241,191,57]},{"index":0.87,"rgb":[224,220,93]},{"index":0.93,"rgb":[218,241,142]},{"index":1,"rgb":[227,253,198]}] }; -},{}],89:[function(require,module,exports){ +},{}],91:[function(require,module,exports){ /* * Ben Postlethwaite * January 2013 @@ -11460,7 +11785,7 @@ function rgbaStr (rgba) { return 'rgba(' + rgba.join(',') + ')'; } -},{"./colorScales":88,"arraytools":36,"clone":81}],90:[function(require,module,exports){ +},{"./colorScales":90,"arraytools":38,"clone":83}],92:[function(require,module,exports){ "use strict" module.exports = compareAngle @@ -11546,7 +11871,7 @@ function compareAngle(a, b, c, d) { } } } -},{"robust-orientation":486,"robust-product":487,"robust-sum":491,"signum":493,"two-sum":517}],91:[function(require,module,exports){ +},{"robust-orientation":496,"robust-product":497,"robust-sum":501,"signum":503,"two-sum":527}],93:[function(require,module,exports){ module.exports = compareCells var min = Math.min @@ -11602,7 +11927,7 @@ function compareCells(a, b) { } } -},{}],92:[function(require,module,exports){ +},{}],94:[function(require,module,exports){ 'use strict' var compareCells = require('compare-cell') @@ -11614,7 +11939,7 @@ function compareOrientedCells(a, b) { return compareCells(a, b) || parity(a) - parity(b) } -},{"cell-orientation":75,"compare-cell":91}],93:[function(require,module,exports){ +},{"cell-orientation":77,"compare-cell":93}],95:[function(require,module,exports){ "use strict" var convexHull1d = require('./lib/ch1d') @@ -11640,7 +11965,7 @@ function convexHull(points) { } return convexHullnd(points, d) } -},{"./lib/ch1d":94,"./lib/ch2d":95,"./lib/chnd":96}],94:[function(require,module,exports){ +},{"./lib/ch1d":96,"./lib/ch2d":97,"./lib/chnd":98}],96:[function(require,module,exports){ "use strict" module.exports = convexHull1d @@ -11664,7 +11989,7 @@ function convexHull1d(points) { return [[lo]] } } -},{}],95:[function(require,module,exports){ +},{}],97:[function(require,module,exports){ 'use strict' module.exports = convexHull2D @@ -11687,7 +12012,7 @@ function convexHull2D(points) { return edges } -},{"monotone-convex-hull-2d":430}],96:[function(require,module,exports){ +},{"monotone-convex-hull-2d":440}],98:[function(require,module,exports){ 'use strict' module.exports = convexHullnD @@ -11748,7 +12073,7 @@ function convexHullnD(points, d) { return invPermute(nhull, ah) } } -},{"affine-hull":33,"incremental-convex-hull":270}],97:[function(require,module,exports){ +},{"affine-hull":35,"incremental-convex-hull":280}],99:[function(require,module,exports){ module.exports = { AFG: 'afghan', ALA: '\\b\\wland', @@ -12007,7 +12332,7 @@ module.exports = { ZWE: 'zimbabwe|^(?!.*northern).*rhodesia' } -},{}],98:[function(require,module,exports){ +},{}],100:[function(require,module,exports){ // (c) Dean McNamee , 2012. // // https://github.com/deanm/css-color-parser-js @@ -12210,7 +12535,7 @@ function parseCSSColor(css_str) { try { exports.parseCSSColor = parseCSSColor } catch(e) { } -},{}],99:[function(require,module,exports){ +},{}],101:[function(require,module,exports){ "use strict" function dcubicHermite(p0, v0, p1, v1, t, f) { @@ -12250,7 +12575,7 @@ function cubicHermite(p0, v0, p1, v1, t, f) { module.exports = cubicHermite module.exports.derivative = dcubicHermite -},{}],100:[function(require,module,exports){ +},{}],102:[function(require,module,exports){ "use strict" var createThunk = require("./lib/thunk.js") @@ -12361,7 +12686,7 @@ function compileCwise(user_args) { module.exports = compileCwise -},{"./lib/thunk.js":102}],101:[function(require,module,exports){ +},{"./lib/thunk.js":104}],103:[function(require,module,exports){ "use strict" var uniq = require("uniq") @@ -12717,7 +13042,7 @@ function generateCWiseOp(proc, typesig) { } module.exports = generateCWiseOp -},{"uniq":520}],102:[function(require,module,exports){ +},{"uniq":530}],104:[function(require,module,exports){ "use strict" // The function below is called when constructing a cwise function object, and does the following: @@ -12805,9 +13130,3070 @@ function createThunk(proc) { module.exports = createThunk -},{"./compile.js":101}],103:[function(require,module,exports){ +},{"./compile.js":103}],105:[function(require,module,exports){ module.exports = require("cwise-compiler") -},{"cwise-compiler":100}],104:[function(require,module,exports){ +},{"cwise-compiler":102}],106:[function(require,module,exports){ +// https://d3js.org/d3-array/ Version 1.1.1. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); +}(this, (function (exports) { 'use strict'; + +var ascending = function(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; +}; + +var bisector = function(compare) { + if (compare.length === 1) compare = ascendingComparator(compare); + return { + left: function(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) < 0) lo = mid + 1; + else hi = mid; + } + return lo; + }, + right: function(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) > 0) hi = mid; + else lo = mid + 1; + } + return lo; + } + }; +}; + +function ascendingComparator(f) { + return function(d, x) { + return ascending(f(d), x); + }; +} + +var ascendingBisect = bisector(ascending); +var bisectRight = ascendingBisect.right; +var bisectLeft = ascendingBisect.left; + +var pairs = function(array, f) { + if (f == null) f = pair; + var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n); + while (i < n) pairs[i] = f(p, p = array[++i]); + return pairs; +}; + +function pair(a, b) { + return [a, b]; +} + +var cross = function(a, b, f) { + var na = a.length, nb = b.length, c = new Array(na * nb), ia, ib, ic, va; + if (f == null) f = pair; + for (ia = ic = 0; ia < na; ++ia) for (va = a[ia], ib = 0; ib < nb; ++ib, ++ic) c[ic] = f(va, b[ib]); + return c; +}; + +var descending = function(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; +}; + +var number = function(x) { + return x === null ? NaN : +x; +}; + +var variance = function(array, f) { + var n = array.length, + m = 0, + a, + d, + s = 0, + i = -1, + j = 0; + + if (f == null) { + while (++i < n) { + if (!isNaN(a = number(array[i]))) { + d = a - m; + m += d / ++j; + s += d * (a - m); + } + } + } + + else { + while (++i < n) { + if (!isNaN(a = number(f(array[i], i, array)))) { + d = a - m; + m += d / ++j; + s += d * (a - m); + } + } + } + + if (j > 1) return s / (j - 1); +}; + +var deviation = function(array, f) { + var v = variance(array, f); + return v ? Math.sqrt(v) : v; +}; + +var extent = function(array, f) { + var i = -1, + n = array.length, + a, + b, + c; + + if (f == null) { + while (++i < n) if ((b = array[i]) != null && b >= b) { a = c = b; break; } + while (++i < n) if ((b = array[i]) != null) { + if (a > b) a = b; + if (c < b) c = b; + } + } + + else { + while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = c = b; break; } + while (++i < n) if ((b = f(array[i], i, array)) != null) { + if (a > b) a = b; + if (c < b) c = b; + } + } + + return [a, c]; +}; + +var array = Array.prototype; + +var slice = array.slice; +var map = array.map; + +var constant = function(x) { + return function() { + return x; + }; +}; + +var identity = function(x) { + return x; +}; + +var range = function(start, stop, step) { + start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; + + var i = -1, + n = Math.max(0, Math.ceil((stop - start) / step)) | 0, + range = new Array(n); + + while (++i < n) { + range[i] = start + i * step; + } + + return range; +}; + +var e10 = Math.sqrt(50); +var e5 = Math.sqrt(10); +var e2 = Math.sqrt(2); + +var ticks = function(start, stop, count) { + var step = tickStep(start, stop, count); + return range( + Math.ceil(start / step) * step, + Math.floor(stop / step) * step + step / 2, // inclusive + step + ); +}; + +function tickStep(start, stop, count) { + var step0 = Math.abs(stop - start) / Math.max(0, count), + step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), + error = step0 / step1; + if (error >= e10) step1 *= 10; + else if (error >= e5) step1 *= 5; + else if (error >= e2) step1 *= 2; + return stop < start ? -step1 : step1; +} + +var sturges = function(values) { + return Math.ceil(Math.log(values.length) / Math.LN2) + 1; +}; + +var histogram = function() { + var value = identity, + domain = extent, + threshold = sturges; + + function histogram(data) { + var i, + n = data.length, + x, + values = new Array(n); + + for (i = 0; i < n; ++i) { + values[i] = value(data[i], i, data); + } + + var xz = domain(values), + x0 = xz[0], + x1 = xz[1], + tz = threshold(values, x0, x1); + + // Convert number of thresholds into uniform thresholds. + if (!Array.isArray(tz)) tz = ticks(x0, x1, tz); + + // Remove any thresholds outside the domain. + var m = tz.length; + while (tz[0] <= x0) tz.shift(), --m; + while (tz[m - 1] >= x1) tz.pop(), --m; + + var bins = new Array(m + 1), + bin; + + // Initialize bins. + for (i = 0; i <= m; ++i) { + bin = bins[i] = []; + bin.x0 = i > 0 ? tz[i - 1] : x0; + bin.x1 = i < m ? tz[i] : x1; + } + + // Assign data to bins by value, ignoring any outside the domain. + for (i = 0; i < n; ++i) { + x = values[i]; + if (x0 <= x && x <= x1) { + bins[bisectRight(tz, x, 0, m)].push(data[i]); + } + } + + return bins; + } + + histogram.value = function(_) { + return arguments.length ? (value = typeof _ === "function" ? _ : constant(_), histogram) : value; + }; + + histogram.domain = function(_) { + return arguments.length ? (domain = typeof _ === "function" ? _ : constant([_[0], _[1]]), histogram) : domain; + }; + + histogram.thresholds = function(_) { + return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold; + }; + + return histogram; +}; + +var quantile = function(array, p, f) { + if (f == null) f = number; + if (!(n = array.length)) return; + if ((p = +p) <= 0 || n < 2) return +f(array[0], 0, array); + if (p >= 1) return +f(array[n - 1], n - 1, array); + var n, + h = (n - 1) * p, + i = Math.floor(h), + a = +f(array[i], i, array), + b = +f(array[i + 1], i + 1, array); + return a + (b - a) * (h - i); +}; + +var freedmanDiaconis = function(values, min, max) { + values = map.call(values, number).sort(ascending); + return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(values.length, -1 / 3))); +}; + +var scott = function(values, min, max) { + return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(values.length, -1 / 3))); +}; + +var max = function(array, f) { + var i = -1, + n = array.length, + a, + b; + + if (f == null) { + while (++i < n) if ((b = array[i]) != null && b >= b) { a = b; break; } + while (++i < n) if ((b = array[i]) != null && b > a) a = b; + } + + else { + while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = b; break; } + while (++i < n) if ((b = f(array[i], i, array)) != null && b > a) a = b; + } + + return a; +}; + +var mean = function(array, f) { + var s = 0, + n = array.length, + a, + i = -1, + j = n; + + if (f == null) { + while (++i < n) if (!isNaN(a = number(array[i]))) s += a; else --j; + } + + else { + while (++i < n) if (!isNaN(a = number(f(array[i], i, array)))) s += a; else --j; + } + + if (j) return s / j; +}; + +var median = function(array, f) { + var numbers = [], + n = array.length, + a, + i = -1; + + if (f == null) { + while (++i < n) if (!isNaN(a = number(array[i]))) numbers.push(a); + } + + else { + while (++i < n) if (!isNaN(a = number(f(array[i], i, array)))) numbers.push(a); + } + + return quantile(numbers.sort(ascending), 0.5); +}; + +var merge = function(arrays) { + var n = arrays.length, + m, + i = -1, + j = 0, + merged, + array; + + while (++i < n) j += arrays[i].length; + merged = new Array(j); + + while (--n >= 0) { + array = arrays[n]; + m = array.length; + while (--m >= 0) { + merged[--j] = array[m]; + } + } + + return merged; +}; + +var min = function(array, f) { + var i = -1, + n = array.length, + a, + b; + + if (f == null) { + while (++i < n) if ((b = array[i]) != null && b >= b) { a = b; break; } + while (++i < n) if ((b = array[i]) != null && a > b) a = b; + } + + else { + while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = b; break; } + while (++i < n) if ((b = f(array[i], i, array)) != null && a > b) a = b; + } + + return a; +}; + +var permute = function(array, indexes) { + var i = indexes.length, permutes = new Array(i); + while (i--) permutes[i] = array[indexes[i]]; + return permutes; +}; + +var scan = function(array, compare) { + if (!(n = array.length)) return; + var i = 0, + n, + j = 0, + xi, + xj = array[j]; + + if (!compare) compare = ascending; + + while (++i < n) if (compare(xi = array[i], xj) < 0 || compare(xj, xj) !== 0) xj = xi, j = i; + + if (compare(xj, xj) === 0) return j; +}; + +var shuffle = function(array, i0, i1) { + var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0), + t, + i; + + while (m) { + i = Math.random() * m-- | 0; + t = array[m + i0]; + array[m + i0] = array[i + i0]; + array[i + i0] = t; + } + + return array; +}; + +var sum = function(array, f) { + var s = 0, + n = array.length, + a, + i = -1; + + if (f == null) { + while (++i < n) if (a = +array[i]) s += a; // Note: zero and null are equivalent. + } + + else { + while (++i < n) if (a = +f(array[i], i, array)) s += a; + } + + return s; +}; + +var transpose = function(matrix) { + if (!(n = matrix.length)) return []; + for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) { + for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { + row[j] = matrix[j][i]; + } + } + return transpose; +}; + +function length(d) { + return d.length; +} + +var zip = function() { + return transpose(arguments); +}; + +exports.bisect = bisectRight; +exports.bisectRight = bisectRight; +exports.bisectLeft = bisectLeft; +exports.ascending = ascending; +exports.bisector = bisector; +exports.cross = cross; +exports.descending = descending; +exports.deviation = deviation; +exports.extent = extent; +exports.histogram = histogram; +exports.thresholdFreedmanDiaconis = freedmanDiaconis; +exports.thresholdScott = scott; +exports.thresholdSturges = sturges; +exports.max = max; +exports.mean = mean; +exports.median = median; +exports.merge = merge; +exports.min = min; +exports.pairs = pairs; +exports.permute = permute; +exports.quantile = quantile; +exports.range = range; +exports.scan = scan; +exports.shuffle = shuffle; +exports.sum = sum; +exports.ticks = ticks; +exports.tickStep = tickStep; +exports.transpose = transpose; +exports.variance = variance; +exports.zip = zip; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],107:[function(require,module,exports){ +// https://d3js.org/d3-collection/ Version 1.0.3. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); +}(this, (function (exports) { 'use strict'; + +var prefix = "$"; + +function Map() {} + +Map.prototype = map.prototype = { + constructor: Map, + has: function(key) { + return (prefix + key) in this; + }, + get: function(key) { + return this[prefix + key]; + }, + set: function(key, value) { + this[prefix + key] = value; + return this; + }, + remove: function(key) { + var property = prefix + key; + return property in this && delete this[property]; + }, + clear: function() { + for (var property in this) if (property[0] === prefix) delete this[property]; + }, + keys: function() { + var keys = []; + for (var property in this) if (property[0] === prefix) keys.push(property.slice(1)); + return keys; + }, + values: function() { + var values = []; + for (var property in this) if (property[0] === prefix) values.push(this[property]); + return values; + }, + entries: function() { + var entries = []; + for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]}); + return entries; + }, + size: function() { + var size = 0; + for (var property in this) if (property[0] === prefix) ++size; + return size; + }, + empty: function() { + for (var property in this) if (property[0] === prefix) return false; + return true; + }, + each: function(f) { + for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this); + } +}; + +function map(object, f) { + var map = new Map; + + // Copy constructor. + if (object instanceof Map) object.each(function(value, key) { map.set(key, value); }); + + // Index array by numeric index or specified key function. + else if (Array.isArray(object)) { + var i = -1, + n = object.length, + o; + + if (f == null) while (++i < n) map.set(i, object[i]); + else while (++i < n) map.set(f(o = object[i], i, object), o); + } + + // Convert object to map. + else if (object) for (var key in object) map.set(key, object[key]); + + return map; +} + +var nest = function() { + var keys = [], + sortKeys = [], + sortValues, + rollup, + nest; + + function apply(array, depth, createResult, setResult) { + if (depth >= keys.length) return rollup != null + ? rollup(array) : (sortValues != null + ? array.sort(sortValues) + : array); + + var i = -1, + n = array.length, + key = keys[depth++], + keyValue, + value, + valuesByKey = map(), + values, + result = createResult(); + + while (++i < n) { + if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) { + values.push(value); + } else { + valuesByKey.set(keyValue, [value]); + } + } + + valuesByKey.each(function(values, key) { + setResult(result, key, apply(values, depth, createResult, setResult)); + }); + + return result; + } + + function entries(map$$1, depth) { + if (++depth > keys.length) return map$$1; + var array, sortKey = sortKeys[depth - 1]; + if (rollup != null && depth >= keys.length) array = map$$1.entries(); + else array = [], map$$1.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); }); + return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array; + } + + return nest = { + object: function(array) { return apply(array, 0, createObject, setObject); }, + map: function(array) { return apply(array, 0, createMap, setMap); }, + entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); }, + key: function(d) { keys.push(d); return nest; }, + sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; }, + sortValues: function(order) { sortValues = order; return nest; }, + rollup: function(f) { rollup = f; return nest; } + }; +}; + +function createObject() { + return {}; +} + +function setObject(object, key, value) { + object[key] = value; +} + +function createMap() { + return map(); +} + +function setMap(map$$1, key, value) { + map$$1.set(key, value); +} + +function Set() {} + +var proto = map.prototype; + +Set.prototype = set.prototype = { + constructor: Set, + has: proto.has, + add: function(value) { + value += ""; + this[prefix + value] = value; + return this; + }, + remove: proto.remove, + clear: proto.clear, + values: proto.keys, + size: proto.size, + empty: proto.empty, + each: proto.each +}; + +function set(object, f) { + var set = new Set; + + // Copy constructor. + if (object instanceof Set) object.each(function(value) { set.add(value); }); + + // Otherwise, assume it’s an array. + else if (object) { + var i = -1, n = object.length; + if (f == null) while (++i < n) set.add(object[i]); + else while (++i < n) set.add(f(object[i], i, object)); + } + + return set; +} + +var keys = function(map) { + var keys = []; + for (var key in map) keys.push(key); + return keys; +}; + +var values = function(map) { + var values = []; + for (var key in map) values.push(map[key]); + return values; +}; + +var entries = function(map) { + var entries = []; + for (var key in map) entries.push({key: key, value: map[key]}); + return entries; +}; + +exports.nest = nest; +exports.set = set; +exports.map = map; +exports.keys = keys; +exports.values = values; +exports.entries = entries; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],108:[function(require,module,exports){ +// https://d3js.org/d3-color/ Version 1.0.3. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); +}(this, (function (exports) { 'use strict'; + +var define = function(constructor, factory, prototype) { + constructor.prototype = factory.prototype = prototype; + prototype.constructor = constructor; +}; + +function extend(parent, definition) { + var prototype = Object.create(parent.prototype); + for (var key in definition) prototype[key] = definition[key]; + return prototype; +} + +function Color() {} + +var darker = 0.7; +var brighter = 1 / darker; + +var reI = "\\s*([+-]?\\d+)\\s*"; +var reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*"; +var reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*"; +var reHex3 = /^#([0-9a-f]{3})$/; +var reHex6 = /^#([0-9a-f]{6})$/; +var reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"); +var reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"); +var reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"); +var reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"); +var reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"); +var reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); + +var named = { + aliceblue: 0xf0f8ff, + antiquewhite: 0xfaebd7, + aqua: 0x00ffff, + aquamarine: 0x7fffd4, + azure: 0xf0ffff, + beige: 0xf5f5dc, + bisque: 0xffe4c4, + black: 0x000000, + blanchedalmond: 0xffebcd, + blue: 0x0000ff, + blueviolet: 0x8a2be2, + brown: 0xa52a2a, + burlywood: 0xdeb887, + cadetblue: 0x5f9ea0, + chartreuse: 0x7fff00, + chocolate: 0xd2691e, + coral: 0xff7f50, + cornflowerblue: 0x6495ed, + cornsilk: 0xfff8dc, + crimson: 0xdc143c, + cyan: 0x00ffff, + darkblue: 0x00008b, + darkcyan: 0x008b8b, + darkgoldenrod: 0xb8860b, + darkgray: 0xa9a9a9, + darkgreen: 0x006400, + darkgrey: 0xa9a9a9, + darkkhaki: 0xbdb76b, + darkmagenta: 0x8b008b, + darkolivegreen: 0x556b2f, + darkorange: 0xff8c00, + darkorchid: 0x9932cc, + darkred: 0x8b0000, + darksalmon: 0xe9967a, + darkseagreen: 0x8fbc8f, + darkslateblue: 0x483d8b, + darkslategray: 0x2f4f4f, + darkslategrey: 0x2f4f4f, + darkturquoise: 0x00ced1, + darkviolet: 0x9400d3, + deeppink: 0xff1493, + deepskyblue: 0x00bfff, + dimgray: 0x696969, + dimgrey: 0x696969, + dodgerblue: 0x1e90ff, + firebrick: 0xb22222, + floralwhite: 0xfffaf0, + forestgreen: 0x228b22, + fuchsia: 0xff00ff, + gainsboro: 0xdcdcdc, + ghostwhite: 0xf8f8ff, + gold: 0xffd700, + goldenrod: 0xdaa520, + gray: 0x808080, + green: 0x008000, + greenyellow: 0xadff2f, + grey: 0x808080, + honeydew: 0xf0fff0, + hotpink: 0xff69b4, + indianred: 0xcd5c5c, + indigo: 0x4b0082, + ivory: 0xfffff0, + khaki: 0xf0e68c, + lavender: 0xe6e6fa, + lavenderblush: 0xfff0f5, + lawngreen: 0x7cfc00, + lemonchiffon: 0xfffacd, + lightblue: 0xadd8e6, + lightcoral: 0xf08080, + lightcyan: 0xe0ffff, + lightgoldenrodyellow: 0xfafad2, + lightgray: 0xd3d3d3, + lightgreen: 0x90ee90, + lightgrey: 0xd3d3d3, + lightpink: 0xffb6c1, + lightsalmon: 0xffa07a, + lightseagreen: 0x20b2aa, + lightskyblue: 0x87cefa, + lightslategray: 0x778899, + lightslategrey: 0x778899, + lightsteelblue: 0xb0c4de, + lightyellow: 0xffffe0, + lime: 0x00ff00, + limegreen: 0x32cd32, + linen: 0xfaf0e6, + magenta: 0xff00ff, + maroon: 0x800000, + mediumaquamarine: 0x66cdaa, + mediumblue: 0x0000cd, + mediumorchid: 0xba55d3, + mediumpurple: 0x9370db, + mediumseagreen: 0x3cb371, + mediumslateblue: 0x7b68ee, + mediumspringgreen: 0x00fa9a, + mediumturquoise: 0x48d1cc, + mediumvioletred: 0xc71585, + midnightblue: 0x191970, + mintcream: 0xf5fffa, + mistyrose: 0xffe4e1, + moccasin: 0xffe4b5, + navajowhite: 0xffdead, + navy: 0x000080, + oldlace: 0xfdf5e6, + olive: 0x808000, + olivedrab: 0x6b8e23, + orange: 0xffa500, + orangered: 0xff4500, + orchid: 0xda70d6, + palegoldenrod: 0xeee8aa, + palegreen: 0x98fb98, + paleturquoise: 0xafeeee, + palevioletred: 0xdb7093, + papayawhip: 0xffefd5, + peachpuff: 0xffdab9, + peru: 0xcd853f, + pink: 0xffc0cb, + plum: 0xdda0dd, + powderblue: 0xb0e0e6, + purple: 0x800080, + rebeccapurple: 0x663399, + red: 0xff0000, + rosybrown: 0xbc8f8f, + royalblue: 0x4169e1, + saddlebrown: 0x8b4513, + salmon: 0xfa8072, + sandybrown: 0xf4a460, + seagreen: 0x2e8b57, + seashell: 0xfff5ee, + sienna: 0xa0522d, + silver: 0xc0c0c0, + skyblue: 0x87ceeb, + slateblue: 0x6a5acd, + slategray: 0x708090, + slategrey: 0x708090, + snow: 0xfffafa, + springgreen: 0x00ff7f, + steelblue: 0x4682b4, + tan: 0xd2b48c, + teal: 0x008080, + thistle: 0xd8bfd8, + tomato: 0xff6347, + turquoise: 0x40e0d0, + violet: 0xee82ee, + wheat: 0xf5deb3, + white: 0xffffff, + whitesmoke: 0xf5f5f5, + yellow: 0xffff00, + yellowgreen: 0x9acd32 +}; + +define(Color, color, { + displayable: function() { + return this.rgb().displayable(); + }, + toString: function() { + return this.rgb() + ""; + } +}); + +function color(format) { + var m; + format = (format + "").trim().toLowerCase(); + return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00 + : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000 + : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) + : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) + : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) + : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) + : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) + : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) + : named.hasOwnProperty(format) ? rgbn(named[format]) + : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) + : null; +} + +function rgbn(n) { + return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); +} + +function rgba(r, g, b, a) { + if (a <= 0) r = g = b = NaN; + return new Rgb(r, g, b, a); +} + +function rgbConvert(o) { + if (!(o instanceof Color)) o = color(o); + if (!o) return new Rgb; + o = o.rgb(); + return new Rgb(o.r, o.g, o.b, o.opacity); +} + +function rgb(r, g, b, opacity) { + return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); +} + +function Rgb(r, g, b, opacity) { + this.r = +r; + this.g = +g; + this.b = +b; + this.opacity = +opacity; +} + +define(Rgb, rgb, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + rgb: function() { + return this; + }, + displayable: function() { + return (0 <= this.r && this.r <= 255) + && (0 <= this.g && this.g <= 255) + && (0 <= this.b && this.b <= 255) + && (0 <= this.opacity && this.opacity <= 1); + }, + toString: function() { + var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); + return (a === 1 ? "rgb(" : "rgba(") + + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + + (a === 1 ? ")" : ", " + a + ")"); + } +})); + +function hsla(h, s, l, a) { + if (a <= 0) h = s = l = NaN; + else if (l <= 0 || l >= 1) h = s = NaN; + else if (s <= 0) h = NaN; + return new Hsl(h, s, l, a); +} + +function hslConvert(o) { + if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Color)) o = color(o); + if (!o) return new Hsl; + if (o instanceof Hsl) return o; + o = o.rgb(); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + min = Math.min(r, g, b), + max = Math.max(r, g, b), + h = NaN, + s = max - min, + l = (max + min) / 2; + if (s) { + if (r === max) h = (g - b) / s + (g < b) * 6; + else if (g === max) h = (b - r) / s + 2; + else h = (r - g) / s + 4; + s /= l < 0.5 ? max + min : 2 - max - min; + h *= 60; + } else { + s = l > 0 && l < 1 ? 0 : h; + } + return new Hsl(h, s, l, o.opacity); +} + +function hsl(h, s, l, opacity) { + return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); +} + +function Hsl(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} + +define(Hsl, hsl, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = this.h % 360 + (this.h < 0) * 360, + s = isNaN(h) || isNaN(this.s) ? 0 : this.s, + l = this.l, + m2 = l + (l < 0.5 ? l : 1 - l) * s, + m1 = 2 * l - m2; + return new Rgb( + hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), + hsl2rgb(h, m1, m2), + hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), + this.opacity + ); + }, + displayable: function() { + return (0 <= this.s && this.s <= 1 || isNaN(this.s)) + && (0 <= this.l && this.l <= 1) + && (0 <= this.opacity && this.opacity <= 1); + } +})); + +/* From FvD 13.37, CSS Color Module Level 3 */ +function hsl2rgb(h, m1, m2) { + return (h < 60 ? m1 + (m2 - m1) * h / 60 + : h < 180 ? m2 + : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 + : m1) * 255; +} + +var deg2rad = Math.PI / 180; +var rad2deg = 180 / Math.PI; + +var Kn = 18; +var Xn = 0.950470; +var Yn = 1; +var Zn = 1.088830; +var t0 = 4 / 29; +var t1 = 6 / 29; +var t2 = 3 * t1 * t1; +var t3 = t1 * t1 * t1; + +function labConvert(o) { + if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); + if (o instanceof Hcl) { + var h = o.h * deg2rad; + return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); + } + if (!(o instanceof Rgb)) o = rgbConvert(o); + var b = rgb2xyz(o.r), + a = rgb2xyz(o.g), + l = rgb2xyz(o.b), + x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn), + y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn), + z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn); + return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); +} + +function lab(l, a, b, opacity) { + return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); +} + +function Lab(l, a, b, opacity) { + this.l = +l; + this.a = +a; + this.b = +b; + this.opacity = +opacity; +} + +define(Lab, lab, extend(Color, { + brighter: function(k) { + return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + darker: function(k) { + return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + rgb: function() { + var y = (this.l + 16) / 116, + x = isNaN(this.a) ? y : y + this.a / 500, + z = isNaN(this.b) ? y : y - this.b / 200; + y = Yn * lab2xyz(y); + x = Xn * lab2xyz(x); + z = Zn * lab2xyz(z); + return new Rgb( + xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB + xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z), + xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z), + this.opacity + ); + } +})); + +function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; +} + +function lab2xyz(t) { + return t > t1 ? t * t * t : t2 * (t - t0); +} + +function xyz2rgb(x) { + return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); +} + +function rgb2xyz(x) { + return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); +} + +function hclConvert(o) { + if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); + if (!(o instanceof Lab)) o = labConvert(o); + var h = Math.atan2(o.b, o.a) * rad2deg; + return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); +} + +function hcl(h, c, l, opacity) { + return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); +} + +function Hcl(h, c, l, opacity) { + this.h = +h; + this.c = +c; + this.l = +l; + this.opacity = +opacity; +} + +define(Hcl, hcl, extend(Color, { + brighter: function(k) { + return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k), this.opacity); + }, + darker: function(k) { + return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k), this.opacity); + }, + rgb: function() { + return labConvert(this).rgb(); + } +})); + +var A = -0.14861; +var B = +1.78277; +var C = -0.29227; +var D = -0.90649; +var E = +1.97294; +var ED = E * D; +var EB = E * B; +var BC_DA = B * C - D * A; + +function cubehelixConvert(o) { + if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Rgb)) o = rgbConvert(o); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), + bl = b - l, + k = (E * (g - l) - C * bl) / D, + s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 + h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN; + return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); +} + +function cubehelix(h, s, l, opacity) { + return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); +} + +function Cubehelix(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} + +define(Cubehelix, cubehelix, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad, + l = +this.l, + a = isNaN(this.s) ? 0 : this.s * l * (1 - l), + cosh = Math.cos(h), + sinh = Math.sin(h); + return new Rgb( + 255 * (l + a * (A * cosh + B * sinh)), + 255 * (l + a * (C * cosh + D * sinh)), + 255 * (l + a * (E * cosh)), + this.opacity + ); + } +})); + +exports.color = color; +exports.rgb = rgb; +exports.hsl = hsl; +exports.lab = lab; +exports.hcl = hcl; +exports.cubehelix = cubehelix; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],109:[function(require,module,exports){ +// https://d3js.org/d3-dispatch/ Version 1.0.3. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); +}(this, (function (exports) { 'use strict'; + +var noop = {value: function() {}}; + +function dispatch() { + for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { + if (!(t = arguments[i] + "") || (t in _)) throw new Error("illegal type: " + t); + _[t] = []; + } + return new Dispatch(_); +} + +function Dispatch(_) { + this._ = _; +} + +function parseTypenames(typenames, types) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); + if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); + return {type: t, name: name}; + }); +} + +Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _ = this._, + T = parseTypenames(typename + "", _), + t, + i = -1, + n = T.length; + + // If no callback was specified, return the callback of the given type and name. + if (arguments.length < 2) { + while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; + return; + } + + // If a type was specified, set the callback for the given type and name. + // Otherwise, if a null callback was specified, remove callbacks of the given name. + if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); + while (++i < n) { + if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); + else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); + } + + return this; + }, + copy: function() { + var copy = {}, _ = this._; + for (var t in _) copy[t] = _[t].slice(); + return new Dispatch(copy); + }, + call: function(type, that) { + if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + }, + apply: function(type, that, args) { + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + } +}; + +function get(type, name) { + for (var i = 0, n = type.length, c; i < n; ++i) { + if ((c = type[i]).name === name) { + return c.value; + } + } +} + +function set(type, name, callback) { + for (var i = 0, n = type.length; i < n; ++i) { + if (type[i].name === name) { + type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); + break; + } + } + if (callback != null) type.push({name: name, value: callback}); + return type; +} + +exports.dispatch = dispatch; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],110:[function(require,module,exports){ +// https://d3js.org/d3-force/ Version 1.0.6. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-quadtree'), require('d3-collection'), require('d3-dispatch'), require('d3-timer')) : + typeof define === 'function' && define.amd ? define(['exports', 'd3-quadtree', 'd3-collection', 'd3-dispatch', 'd3-timer'], factory) : + (factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3,global.d3)); +}(this, (function (exports,d3Quadtree,d3Collection,d3Dispatch,d3Timer) { 'use strict'; + +var center = function(x, y) { + var nodes; + + if (x == null) x = 0; + if (y == null) y = 0; + + function force() { + var i, + n = nodes.length, + node, + sx = 0, + sy = 0; + + for (i = 0; i < n; ++i) { + node = nodes[i], sx += node.x, sy += node.y; + } + + for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) { + node = nodes[i], node.x -= sx, node.y -= sy; + } + } + + force.initialize = function(_) { + nodes = _; + }; + + force.x = function(_) { + return arguments.length ? (x = +_, force) : x; + }; + + force.y = function(_) { + return arguments.length ? (y = +_, force) : y; + }; + + return force; +}; + +var constant = function(x) { + return function() { + return x; + }; +}; + +var jiggle = function() { + return (Math.random() - 0.5) * 1e-6; +}; + +function x(d) { + return d.x + d.vx; +} + +function y(d) { + return d.y + d.vy; +} + +var collide = function(radius) { + var nodes, + radii, + strength = 1, + iterations = 1; + + if (typeof radius !== "function") radius = constant(radius == null ? 1 : +radius); + + function force() { + var i, n = nodes.length, + tree, + node, + xi, + yi, + ri, + ri2; + + for (var k = 0; k < iterations; ++k) { + tree = d3Quadtree.quadtree(nodes, x, y).visitAfter(prepare); + for (i = 0; i < n; ++i) { + node = nodes[i]; + ri = radii[node.index], ri2 = ri * ri; + xi = node.x + node.vx; + yi = node.y + node.vy; + tree.visit(apply); + } + } + + function apply(quad, x0, y0, x1, y1) { + var data = quad.data, rj = quad.r, r = ri + rj; + if (data) { + if (data.index > node.index) { + var x = xi - data.x - data.vx, + y = yi - data.y - data.vy, + l = x * x + y * y; + if (l < r * r) { + if (x === 0) x = jiggle(), l += x * x; + if (y === 0) y = jiggle(), l += y * y; + l = (r - (l = Math.sqrt(l))) / l * strength; + node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj)); + node.vy += (y *= l) * r; + data.vx -= x * (r = 1 - r); + data.vy -= y * r; + } + } + return; + } + return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r; + } + } + + function prepare(quad) { + if (quad.data) return quad.r = radii[quad.data.index]; + for (var i = quad.r = 0; i < 4; ++i) { + if (quad[i] && quad[i].r > quad.r) { + quad.r = quad[i].r; + } + } + } + + function initialize() { + if (!nodes) return; + var i, n = nodes.length, node; + radii = new Array(n); + for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes); + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.iterations = function(_) { + return arguments.length ? (iterations = +_, force) : iterations; + }; + + force.strength = function(_) { + return arguments.length ? (strength = +_, force) : strength; + }; + + force.radius = function(_) { + return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), initialize(), force) : radius; + }; + + return force; +}; + +function index(d) { + return d.index; +} + +function find(nodeById, nodeId) { + var node = nodeById.get(nodeId); + if (!node) throw new Error("missing: " + nodeId); + return node; +} + +var link = function(links) { + var id = index, + strength = defaultStrength, + strengths, + distance = constant(30), + distances, + nodes, + count, + bias, + iterations = 1; + + if (links == null) links = []; + + function defaultStrength(link) { + return 1 / Math.min(count[link.source.index], count[link.target.index]); + } + + function force(alpha) { + for (var k = 0, n = links.length; k < iterations; ++k) { + for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) { + link = links[i], source = link.source, target = link.target; + x = target.x + target.vx - source.x - source.vx || jiggle(); + y = target.y + target.vy - source.y - source.vy || jiggle(); + l = Math.sqrt(x * x + y * y); + l = (l - distances[i]) / l * alpha * strengths[i]; + x *= l, y *= l; + target.vx -= x * (b = bias[i]); + target.vy -= y * b; + source.vx += x * (b = 1 - b); + source.vy += y * b; + } + } + } + + function initialize() { + if (!nodes) return; + + var i, + n = nodes.length, + m = links.length, + nodeById = d3Collection.map(nodes, id), + link; + + for (i = 0, count = new Array(n); i < m; ++i) { + link = links[i], link.index = i; + if (typeof link.source !== "object") link.source = find(nodeById, link.source); + if (typeof link.target !== "object") link.target = find(nodeById, link.target); + count[link.source.index] = (count[link.source.index] || 0) + 1; + count[link.target.index] = (count[link.target.index] || 0) + 1; + } + + for (i = 0, bias = new Array(m); i < m; ++i) { + link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); + } + + strengths = new Array(m), initializeStrength(); + distances = new Array(m), initializeDistance(); + } + + function initializeStrength() { + if (!nodes) return; + + for (var i = 0, n = links.length; i < n; ++i) { + strengths[i] = +strength(links[i], i, links); + } + } + + function initializeDistance() { + if (!nodes) return; + + for (var i = 0, n = links.length; i < n; ++i) { + distances[i] = +distance(links[i], i, links); + } + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.links = function(_) { + return arguments.length ? (links = _, initialize(), force) : links; + }; + + force.id = function(_) { + return arguments.length ? (id = _, force) : id; + }; + + force.iterations = function(_) { + return arguments.length ? (iterations = +_, force) : iterations; + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initializeStrength(), force) : strength; + }; + + force.distance = function(_) { + return arguments.length ? (distance = typeof _ === "function" ? _ : constant(+_), initializeDistance(), force) : distance; + }; + + return force; +}; + +function x$1(d) { + return d.x; +} + +function y$1(d) { + return d.y; +} + +var initialRadius = 10; +var initialAngle = Math.PI * (3 - Math.sqrt(5)); + +var simulation = function(nodes) { + var simulation, + alpha = 1, + alphaMin = 0.001, + alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), + alphaTarget = 0, + velocityDecay = 0.6, + forces = d3Collection.map(), + stepper = d3Timer.timer(step), + event = d3Dispatch.dispatch("tick", "end"); + + if (nodes == null) nodes = []; + + function step() { + tick(); + event.call("tick", simulation); + if (alpha < alphaMin) { + stepper.stop(); + event.call("end", simulation); + } + } + + function tick() { + var i, n = nodes.length, node; + + alpha += (alphaTarget - alpha) * alphaDecay; + + forces.each(function(force) { + force(alpha); + }); + + for (i = 0; i < n; ++i) { + node = nodes[i]; + if (node.fx == null) node.x += node.vx *= velocityDecay; + else node.x = node.fx, node.vx = 0; + if (node.fy == null) node.y += node.vy *= velocityDecay; + else node.y = node.fy, node.vy = 0; + } + } + + function initializeNodes() { + for (var i = 0, n = nodes.length, node; i < n; ++i) { + node = nodes[i], node.index = i; + if (isNaN(node.x) || isNaN(node.y)) { + var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle; + node.x = radius * Math.cos(angle); + node.y = radius * Math.sin(angle); + } + if (isNaN(node.vx) || isNaN(node.vy)) { + node.vx = node.vy = 0; + } + } + } + + function initializeForce(force) { + if (force.initialize) force.initialize(nodes); + return force; + } + + initializeNodes(); + + return simulation = { + tick: tick, + + restart: function() { + return stepper.restart(step), simulation; + }, + + stop: function() { + return stepper.stop(), simulation; + }, + + nodes: function(_) { + return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes; + }, + + alpha: function(_) { + return arguments.length ? (alpha = +_, simulation) : alpha; + }, + + alphaMin: function(_) { + return arguments.length ? (alphaMin = +_, simulation) : alphaMin; + }, + + alphaDecay: function(_) { + return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay; + }, + + alphaTarget: function(_) { + return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget; + }, + + velocityDecay: function(_) { + return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay; + }, + + force: function(name, _) { + return arguments.length > 1 ? ((_ == null ? forces.remove(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); + }, + + find: function(x, y, radius) { + var i = 0, + n = nodes.length, + dx, + dy, + d2, + node, + closest; + + if (radius == null) radius = Infinity; + else radius *= radius; + + for (i = 0; i < n; ++i) { + node = nodes[i]; + dx = x - node.x; + dy = y - node.y; + d2 = dx * dx + dy * dy; + if (d2 < radius) closest = node, radius = d2; + } + + return closest; + }, + + on: function(name, _) { + return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name); + } + }; +}; + +var manyBody = function() { + var nodes, + node, + alpha, + strength = constant(-30), + strengths, + distanceMin2 = 1, + distanceMax2 = Infinity, + theta2 = 0.81; + + function force(_) { + var i, n = nodes.length, tree = d3Quadtree.quadtree(nodes, x$1, y$1).visitAfter(accumulate); + for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply); + } + + function initialize() { + if (!nodes) return; + var i, n = nodes.length, node; + strengths = new Array(n); + for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); + } + + function accumulate(quad) { + var strength = 0, q, c, x$$1, y$$1, i; + + // For internal nodes, accumulate forces from child quadrants. + if (quad.length) { + for (x$$1 = y$$1 = i = 0; i < 4; ++i) { + if ((q = quad[i]) && (c = q.value)) { + strength += c, x$$1 += c * q.x, y$$1 += c * q.y; + } + } + quad.x = x$$1 / strength; + quad.y = y$$1 / strength; + } + + // For leaf nodes, accumulate forces from coincident quadrants. + else { + q = quad; + q.x = q.data.x; + q.y = q.data.y; + do strength += strengths[q.data.index]; + while (q = q.next); + } + + quad.value = strength; + } + + function apply(quad, x1, _, x2) { + if (!quad.value) return true; + + var x$$1 = quad.x - node.x, + y$$1 = quad.y - node.y, + w = x2 - x1, + l = x$$1 * x$$1 + y$$1 * y$$1; + + // Apply the Barnes-Hut approximation if possible. + // Limit forces for very close nodes; randomize direction if coincident. + if (w * w / theta2 < l) { + if (l < distanceMax2) { + if (x$$1 === 0) x$$1 = jiggle(), l += x$$1 * x$$1; + if (y$$1 === 0) y$$1 = jiggle(), l += y$$1 * y$$1; + if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); + node.vx += x$$1 * quad.value * alpha / l; + node.vy += y$$1 * quad.value * alpha / l; + } + return true; + } + + // Otherwise, process points directly. + else if (quad.length || l >= distanceMax2) return; + + // Limit forces for very close nodes; randomize direction if coincident. + if (quad.data !== node || quad.next) { + if (x$$1 === 0) x$$1 = jiggle(), l += x$$1 * x$$1; + if (y$$1 === 0) y$$1 = jiggle(), l += y$$1 * y$$1; + if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); + } + + do if (quad.data !== node) { + w = strengths[quad.data.index] * alpha / l; + node.vx += x$$1 * w; + node.vy += y$$1 * w; + } while (quad = quad.next); + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; + }; + + force.distanceMin = function(_) { + return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2); + }; + + force.distanceMax = function(_) { + return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2); + }; + + force.theta = function(_) { + return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2); + }; + + return force; +}; + +var x$2 = function(x) { + var strength = constant(0.1), + nodes, + strengths, + xz; + + if (typeof x !== "function") x = constant(x == null ? 0 : +x); + + function force(alpha) { + for (var i = 0, n = nodes.length, node; i < n; ++i) { + node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha; + } + } + + function initialize() { + if (!nodes) return; + var i, n = nodes.length; + strengths = new Array(n); + xz = new Array(n); + for (i = 0; i < n; ++i) { + strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); + } + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; + }; + + force.x = function(_) { + return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), initialize(), force) : x; + }; + + return force; +}; + +var y$2 = function(y) { + var strength = constant(0.1), + nodes, + strengths, + yz; + + if (typeof y !== "function") y = constant(y == null ? 0 : +y); + + function force(alpha) { + for (var i = 0, n = nodes.length, node; i < n; ++i) { + node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha; + } + } + + function initialize() { + if (!nodes) return; + var i, n = nodes.length; + strengths = new Array(n); + yz = new Array(n); + for (i = 0; i < n; ++i) { + strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); + } + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; + }; + + force.y = function(_) { + return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), initialize(), force) : y; + }; + + return force; +}; + +exports.forceCenter = center; +exports.forceCollide = collide; +exports.forceLink = link; +exports.forceManyBody = manyBody; +exports.forceSimulation = simulation; +exports.forceX = x$2; +exports.forceY = y$2; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{"d3-collection":107,"d3-dispatch":109,"d3-quadtree":112,"d3-timer":113}],111:[function(require,module,exports){ +// https://d3js.org/d3-interpolate/ Version 1.1.4. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-color')) : + typeof define === 'function' && define.amd ? define(['exports', 'd3-color'], factory) : + (factory((global.d3 = global.d3 || {}),global.d3)); +}(this, (function (exports,d3Color) { 'use strict'; + +function basis(t1, v0, v1, v2, v3) { + var t2 = t1 * t1, t3 = t2 * t1; + return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + + (4 - 6 * t2 + 3 * t3) * v1 + + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + + t3 * v3) / 6; +} + +var basis$1 = function(values) { + var n = values.length - 1; + return function(t) { + var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), + v1 = values[i], + v2 = values[i + 1], + v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, + v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; + return basis((t - i / n) * n, v0, v1, v2, v3); + }; +}; + +var basisClosed = function(values) { + var n = values.length; + return function(t) { + var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), + v0 = values[(i + n - 1) % n], + v1 = values[i % n], + v2 = values[(i + 1) % n], + v3 = values[(i + 2) % n]; + return basis((t - i / n) * n, v0, v1, v2, v3); + }; +}; + +var constant = function(x) { + return function() { + return x; + }; +}; + +function linear(a, d) { + return function(t) { + return a + t * d; + }; +} + +function exponential(a, b, y) { + return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { + return Math.pow(a + t * b, y); + }; +} + +function hue(a, b) { + var d = b - a; + return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a); +} + +function gamma(y) { + return (y = +y) === 1 ? nogamma : function(a, b) { + return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); + }; +} + +function nogamma(a, b) { + var d = b - a; + return d ? linear(a, d) : constant(isNaN(a) ? b : a); +} + +var rgb$1 = ((function rgbGamma(y) { + var color$$1 = gamma(y); + + function rgb$$1(start, end) { + var r = color$$1((start = d3Color.rgb(start)).r, (end = d3Color.rgb(end)).r), + g = color$$1(start.g, end.g), + b = color$$1(start.b, end.b), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.r = r(t); + start.g = g(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; + } + + rgb$$1.gamma = rgbGamma; + + return rgb$$1; +}))(1); + +function rgbSpline(spline) { + return function(colors) { + var n = colors.length, + r = new Array(n), + g = new Array(n), + b = new Array(n), + i, color$$1; + for (i = 0; i < n; ++i) { + color$$1 = d3Color.rgb(colors[i]); + r[i] = color$$1.r || 0; + g[i] = color$$1.g || 0; + b[i] = color$$1.b || 0; + } + r = spline(r); + g = spline(g); + b = spline(b); + color$$1.opacity = 1; + return function(t) { + color$$1.r = r(t); + color$$1.g = g(t); + color$$1.b = b(t); + return color$$1 + ""; + }; + }; +} + +var rgbBasis = rgbSpline(basis$1); +var rgbBasisClosed = rgbSpline(basisClosed); + +var array = function(a, b) { + var nb = b ? b.length : 0, + na = a ? Math.min(nb, a.length) : 0, + x = new Array(nb), + c = new Array(nb), + i; + + for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]); + for (; i < nb; ++i) c[i] = b[i]; + + return function(t) { + for (i = 0; i < na; ++i) c[i] = x[i](t); + return c; + }; +}; + +var date = function(a, b) { + var d = new Date; + return a = +a, b -= a, function(t) { + return d.setTime(a + b * t), d; + }; +}; + +var number = function(a, b) { + return a = +a, b -= a, function(t) { + return a + b * t; + }; +}; + +var object = function(a, b) { + var i = {}, + c = {}, + k; + + if (a === null || typeof a !== "object") a = {}; + if (b === null || typeof b !== "object") b = {}; + + for (k in b) { + if (k in a) { + i[k] = value(a[k], b[k]); + } else { + c[k] = b[k]; + } + } + + return function(t) { + for (k in i) c[k] = i[k](t); + return c; + }; +}; + +var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g; +var reB = new RegExp(reA.source, "g"); + +function zero(b) { + return function() { + return b; + }; +} + +function one(b) { + return function(t) { + return b(t) + ""; + }; +} + +var string = function(a, b) { + var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b + am, // current match in a + bm, // current match in b + bs, // string preceding current number in b, if any + i = -1, // index in s + s = [], // string constants and placeholders + q = []; // number interpolators + + // Coerce inputs to strings. + a = a + "", b = b + ""; + + // Interpolate pairs of numbers in a & b. + while ((am = reA.exec(a)) + && (bm = reB.exec(b))) { + if ((bs = bm.index) > bi) { // a string precedes the next number in b + bs = b.slice(bi, bs); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match + if (s[i]) s[i] += bm; // coalesce with previous string + else s[++i] = bm; + } else { // interpolate non-matching numbers + s[++i] = null; + q.push({i: i, x: number(am, bm)}); + } + bi = reB.lastIndex; + } + + // Add remains of b. + if (bi < b.length) { + bs = b.slice(bi); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + + // Special optimization for only a single match. + // Otherwise, interpolate each of the numbers and rejoin the string. + return s.length < 2 ? (q[0] + ? one(q[0].x) + : zero(b)) + : (b = q.length, function(t) { + for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }); +}; + +var value = function(a, b) { + var t = typeof b, c; + return b == null || t === "boolean" ? constant(b) + : (t === "number" ? number + : t === "string" ? ((c = d3Color.color(b)) ? (b = c, rgb$1) : string) + : b instanceof d3Color.color ? rgb$1 + : b instanceof Date ? date + : Array.isArray(b) ? array + : isNaN(b) ? object + : number)(a, b); +}; + +var round = function(a, b) { + return a = +a, b -= a, function(t) { + return Math.round(a + b * t); + }; +}; + +var degrees = 180 / Math.PI; + +var identity = { + translateX: 0, + translateY: 0, + rotate: 0, + skewX: 0, + scaleX: 1, + scaleY: 1 +}; + +var decompose = function(a, b, c, d, e, f) { + var scaleX, scaleY, skewX; + if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; + if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; + if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; + if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; + return { + translateX: e, + translateY: f, + rotate: Math.atan2(b, a) * degrees, + skewX: Math.atan(skewX) * degrees, + scaleX: scaleX, + scaleY: scaleY + }; +}; + +var cssNode; +var cssRoot; +var cssView; +var svgNode; + +function parseCss(value) { + if (value === "none") return identity; + if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView; + cssNode.style.transform = value; + value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform"); + cssRoot.removeChild(cssNode); + value = value.slice(7, -1).split(","); + return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]); +} + +function parseSvg(value) { + if (value == null) return identity; + if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); + svgNode.setAttribute("transform", value); + if (!(value = svgNode.transform.baseVal.consolidate())) return identity; + value = value.matrix; + return decompose(value.a, value.b, value.c, value.d, value.e, value.f); +} + +function interpolateTransform(parse, pxComma, pxParen, degParen) { + + function pop(s) { + return s.length ? s.pop() + " " : ""; + } + + function translate(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push("translate(", null, pxComma, null, pxParen); + q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); + } else if (xb || yb) { + s.push("translate(" + xb + pxComma + yb + pxParen); + } + } + + function rotate(a, b, s, q) { + if (a !== b) { + if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path + q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b)}); + } else if (b) { + s.push(pop(s) + "rotate(" + b + degParen); + } + } + + function skewX(a, b, s, q) { + if (a !== b) { + q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number(a, b)}); + } else if (b) { + s.push(pop(s) + "skewX(" + b + degParen); + } + } + + function scale(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push(pop(s) + "scale(", null, ",", null, ")"); + q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); + } else if (xb !== 1 || yb !== 1) { + s.push(pop(s) + "scale(" + xb + "," + yb + ")"); + } + } + + return function(a, b) { + var s = [], // string constants and placeholders + q = []; // number interpolators + a = parse(a), b = parse(b); + translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); + rotate(a.rotate, b.rotate, s, q); + skewX(a.skewX, b.skewX, s, q); + scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); + a = b = null; // gc + return function(t) { + var i = -1, n = q.length, o; + while (++i < n) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }; + }; +} + +var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"); +var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"); + +var rho = Math.SQRT2; +var rho2 = 2; +var rho4 = 4; +var epsilon2 = 1e-12; + +function cosh(x) { + return ((x = Math.exp(x)) + 1 / x) / 2; +} + +function sinh(x) { + return ((x = Math.exp(x)) - 1 / x) / 2; +} + +function tanh(x) { + return ((x = Math.exp(2 * x)) - 1) / (x + 1); +} + +// p0 = [ux0, uy0, w0] +// p1 = [ux1, uy1, w1] +var zoom = function(p0, p1) { + var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], + ux1 = p1[0], uy1 = p1[1], w1 = p1[2], + dx = ux1 - ux0, + dy = uy1 - uy0, + d2 = dx * dx + dy * dy, + i, + S; + + // Special case for u0 ≅ u1. + if (d2 < epsilon2) { + S = Math.log(w1 / w0) / rho; + i = function(t) { + return [ + ux0 + t * dx, + uy0 + t * dy, + w0 * Math.exp(rho * t * S) + ]; + }; + } + + // General case. + else { + var d1 = Math.sqrt(d2), + b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), + b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), + r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), + r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); + S = (r1 - r0) / rho; + i = function(t) { + var s = t * S, + coshr0 = cosh(r0), + u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); + return [ + ux0 + u * dx, + uy0 + u * dy, + w0 * coshr0 / cosh(rho * s + r0) + ]; + }; + } + + i.duration = S * 1000; + + return i; +}; + +function hsl$1(hue$$1) { + return function(start, end) { + var h = hue$$1((start = d3Color.hsl(start)).h, (end = d3Color.hsl(end)).h), + s = nogamma(start.s, end.s), + l = nogamma(start.l, end.l), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.s = s(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; + } +} + +var hsl$2 = hsl$1(hue); +var hslLong = hsl$1(nogamma); + +function lab$1(start, end) { + var l = nogamma((start = d3Color.lab(start)).l, (end = d3Color.lab(end)).l), + a = nogamma(start.a, end.a), + b = nogamma(start.b, end.b), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.l = l(t); + start.a = a(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; +} + +function hcl$1(hue$$1) { + return function(start, end) { + var h = hue$$1((start = d3Color.hcl(start)).h, (end = d3Color.hcl(end)).h), + c = nogamma(start.c, end.c), + l = nogamma(start.l, end.l), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.c = c(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; + } +} + +var hcl$2 = hcl$1(hue); +var hclLong = hcl$1(nogamma); + +function cubehelix$1(hue$$1) { + return (function cubehelixGamma(y) { + y = +y; + + function cubehelix$$1(start, end) { + var h = hue$$1((start = d3Color.cubehelix(start)).h, (end = d3Color.cubehelix(end)).h), + s = nogamma(start.s, end.s), + l = nogamma(start.l, end.l), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.s = s(t); + start.l = l(Math.pow(t, y)); + start.opacity = opacity(t); + return start + ""; + }; + } + + cubehelix$$1.gamma = cubehelixGamma; + + return cubehelix$$1; + })(1); +} + +var cubehelix$2 = cubehelix$1(hue); +var cubehelixLong = cubehelix$1(nogamma); + +var quantize = function(interpolator, n) { + var samples = new Array(n); + for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); + return samples; +}; + +exports.interpolate = value; +exports.interpolateArray = array; +exports.interpolateBasis = basis$1; +exports.interpolateBasisClosed = basisClosed; +exports.interpolateDate = date; +exports.interpolateNumber = number; +exports.interpolateObject = object; +exports.interpolateRound = round; +exports.interpolateString = string; +exports.interpolateTransformCss = interpolateTransformCss; +exports.interpolateTransformSvg = interpolateTransformSvg; +exports.interpolateZoom = zoom; +exports.interpolateRgb = rgb$1; +exports.interpolateRgbBasis = rgbBasis; +exports.interpolateRgbBasisClosed = rgbBasisClosed; +exports.interpolateHsl = hsl$2; +exports.interpolateHslLong = hslLong; +exports.interpolateLab = lab$1; +exports.interpolateHcl = hcl$2; +exports.interpolateHclLong = hclLong; +exports.interpolateCubehelix = cubehelix$2; +exports.interpolateCubehelixLong = cubehelixLong; +exports.quantize = quantize; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{"d3-color":108}],112:[function(require,module,exports){ +// https://d3js.org/d3-quadtree/ Version 1.0.3. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); +}(this, (function (exports) { 'use strict'; + +var tree_add = function(d) { + var x = +this._x.call(null, d), + y = +this._y.call(null, d); + return add(this.cover(x, y), x, y, d); +}; + +function add(tree, x, y, d) { + if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points + + var parent, + node = tree._root, + leaf = {data: d}, + x0 = tree._x0, + y0 = tree._y0, + x1 = tree._x1, + y1 = tree._y1, + xm, + ym, + xp, + yp, + right, + bottom, + i, + j; + + // If the tree is empty, initialize the root as a leaf. + if (!node) return tree._root = leaf, tree; + + // Find the existing leaf for the new point, or add it. + while (node.length) { + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; + if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; + } + + // Is the new point is exactly coincident with the existing point? + xp = +tree._x.call(null, node.data); + yp = +tree._y.call(null, node.data); + if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; + + // Otherwise, split the leaf node until the old and new point are separated. + do { + parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; + } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm))); + return parent[j] = node, parent[i] = leaf, tree; +} + +function addAll(data) { + var d, i, n = data.length, + x, + y, + xz = new Array(n), + yz = new Array(n), + x0 = Infinity, + y0 = Infinity, + x1 = -Infinity, + y1 = -Infinity; + + // Compute the points and their extent. + for (i = 0; i < n; ++i) { + if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; + xz[i] = x; + yz[i] = y; + if (x < x0) x0 = x; + if (x > x1) x1 = x; + if (y < y0) y0 = y; + if (y > y1) y1 = y; + } + + // If there were no (valid) points, inherit the existing extent. + if (x1 < x0) x0 = this._x0, x1 = this._x1; + if (y1 < y0) y0 = this._y0, y1 = this._y1; + + // Expand the tree to cover the new points. + this.cover(x0, y0).cover(x1, y1); + + // Add the new points. + for (i = 0; i < n; ++i) { + add(this, xz[i], yz[i], data[i]); + } + + return this; +} + +var tree_cover = function(x, y) { + if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points + + var x0 = this._x0, + y0 = this._y0, + x1 = this._x1, + y1 = this._y1; + + // If the quadtree has no extent, initialize them. + // Integer extent are necessary so that if we later double the extent, + // the existing quadrant boundaries don’t change due to floating point error! + if (isNaN(x0)) { + x1 = (x0 = Math.floor(x)) + 1; + y1 = (y0 = Math.floor(y)) + 1; + } + + // Otherwise, double repeatedly to cover. + else if (x0 > x || x > x1 || y0 > y || y > y1) { + var z = x1 - x0, + node = this._root, + parent, + i; + + switch (i = (y < (y0 + y1) / 2) << 1 | (x < (x0 + x1) / 2)) { + case 0: { + do parent = new Array(4), parent[i] = node, node = parent; + while (z *= 2, x1 = x0 + z, y1 = y0 + z, x > x1 || y > y1); + break; + } + case 1: { + do parent = new Array(4), parent[i] = node, node = parent; + while (z *= 2, x0 = x1 - z, y1 = y0 + z, x0 > x || y > y1); + break; + } + case 2: { + do parent = new Array(4), parent[i] = node, node = parent; + while (z *= 2, x1 = x0 + z, y0 = y1 - z, x > x1 || y0 > y); + break; + } + case 3: { + do parent = new Array(4), parent[i] = node, node = parent; + while (z *= 2, x0 = x1 - z, y0 = y1 - z, x0 > x || y0 > y); + break; + } + } + + if (this._root && this._root.length) this._root = node; + } + + // If the quadtree covers the point already, just return. + else return this; + + this._x0 = x0; + this._y0 = y0; + this._x1 = x1; + this._y1 = y1; + return this; +}; + +var tree_data = function() { + var data = []; + this.visit(function(node) { + if (!node.length) do data.push(node.data); while (node = node.next) + }); + return data; +}; + +var tree_extent = function(_) { + return arguments.length + ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) + : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; +}; + +var Quad = function(node, x0, y0, x1, y1) { + this.node = node; + this.x0 = x0; + this.y0 = y0; + this.x1 = x1; + this.y1 = y1; +}; + +var tree_find = function(x, y, radius) { + var data, + x0 = this._x0, + y0 = this._y0, + x1, + y1, + x2, + y2, + x3 = this._x1, + y3 = this._y1, + quads = [], + node = this._root, + q, + i; + + if (node) quads.push(new Quad(node, x0, y0, x3, y3)); + if (radius == null) radius = Infinity; + else { + x0 = x - radius, y0 = y - radius; + x3 = x + radius, y3 = y + radius; + radius *= radius; + } + + while (q = quads.pop()) { + + // Stop searching if this quadrant can’t contain a closer node. + if (!(node = q.node) + || (x1 = q.x0) > x3 + || (y1 = q.y0) > y3 + || (x2 = q.x1) < x0 + || (y2 = q.y1) < y0) continue; + + // Bisect the current quadrant. + if (node.length) { + var xm = (x1 + x2) / 2, + ym = (y1 + y2) / 2; + + quads.push( + new Quad(node[3], xm, ym, x2, y2), + new Quad(node[2], x1, ym, xm, y2), + new Quad(node[1], xm, y1, x2, ym), + new Quad(node[0], x1, y1, xm, ym) + ); + + // Visit the closest quadrant first. + if (i = (y >= ym) << 1 | (x >= xm)) { + q = quads[quads.length - 1]; + quads[quads.length - 1] = quads[quads.length - 1 - i]; + quads[quads.length - 1 - i] = q; + } + } + + // Visit this point. (Visiting coincident points isn’t necessary!) + else { + var dx = x - +this._x.call(null, node.data), + dy = y - +this._y.call(null, node.data), + d2 = dx * dx + dy * dy; + if (d2 < radius) { + var d = Math.sqrt(radius = d2); + x0 = x - d, y0 = y - d; + x3 = x + d, y3 = y + d; + data = node.data; + } + } + } + + return data; +}; + +var tree_remove = function(d) { + if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points + + var parent, + node = this._root, + retainer, + previous, + next, + x0 = this._x0, + y0 = this._y0, + x1 = this._x1, + y1 = this._y1, + x, + y, + xm, + ym, + right, + bottom, + i, + j; + + // If the tree is empty, initialize the root as a leaf. + if (!node) return this; + + // Find the leaf node for the point. + // While descending, also retain the deepest parent with a non-removed sibling. + if (node.length) while (true) { + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; + if (!(parent = node, node = node[i = bottom << 1 | right])) return this; + if (!node.length) break; + if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i; + } + + // Find the point to remove. + while (node.data !== d) if (!(previous = node, node = node.next)) return this; + if (next = node.next) delete node.next; + + // If there are multiple coincident points, remove just the point. + if (previous) return (next ? previous.next = next : delete previous.next), this; + + // If this is the root point, remove it. + if (!parent) return this._root = next, this; + + // Remove this leaf. + next ? parent[i] = next : delete parent[i]; + + // If the parent now contains exactly one leaf, collapse superfluous parents. + if ((node = parent[0] || parent[1] || parent[2] || parent[3]) + && node === (parent[3] || parent[2] || parent[1] || parent[0]) + && !node.length) { + if (retainer) retainer[j] = node; + else this._root = node; + } + + return this; +}; + +function removeAll(data) { + for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]); + return this; +} + +var tree_root = function() { + return this._root; +}; + +var tree_size = function() { + var size = 0; + this.visit(function(node) { + if (!node.length) do ++size; while (node = node.next) + }); + return size; +}; + +var tree_visit = function(callback) { + var quads = [], q, node = this._root, child, x0, y0, x1, y1; + if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1)); + while (q = quads.pop()) { + if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) { + var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; + if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); + if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); + if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); + if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); + } + } + return this; +}; + +var tree_visitAfter = function(callback) { + var quads = [], next = [], q; + if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1)); + while (q = quads.pop()) { + var node = q.node; + if (node.length) { + var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; + if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); + if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); + if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); + if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); + } + next.push(q); + } + while (q = next.pop()) { + callback(q.node, q.x0, q.y0, q.x1, q.y1); + } + return this; +}; + +function defaultX(d) { + return d[0]; +} + +var tree_x = function(_) { + return arguments.length ? (this._x = _, this) : this._x; +}; + +function defaultY(d) { + return d[1]; +} + +var tree_y = function(_) { + return arguments.length ? (this._y = _, this) : this._y; +}; + +function quadtree(nodes, x, y) { + var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN); + return nodes == null ? tree : tree.addAll(nodes); +} + +function Quadtree(x, y, x0, y0, x1, y1) { + this._x = x; + this._y = y; + this._x0 = x0; + this._y0 = y0; + this._x1 = x1; + this._y1 = y1; + this._root = undefined; +} + +function leaf_copy(leaf) { + var copy = {data: leaf.data}, next = copy; + while (leaf = leaf.next) next = next.next = {data: leaf.data}; + return copy; +} + +var treeProto = quadtree.prototype = Quadtree.prototype; + +treeProto.copy = function() { + var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), + node = this._root, + nodes, + child; + + if (!node) return copy; + + if (!node.length) return copy._root = leaf_copy(node), copy; + + nodes = [{source: node, target: copy._root = new Array(4)}]; + while (node = nodes.pop()) { + for (var i = 0; i < 4; ++i) { + if (child = node.source[i]) { + if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)}); + else node.target[i] = leaf_copy(child); + } + } + } + + return copy; +}; + +treeProto.add = tree_add; +treeProto.addAll = addAll; +treeProto.cover = tree_cover; +treeProto.data = tree_data; +treeProto.extent = tree_extent; +treeProto.find = tree_find; +treeProto.remove = tree_remove; +treeProto.removeAll = removeAll; +treeProto.root = tree_root; +treeProto.size = tree_size; +treeProto.visit = tree_visit; +treeProto.visitAfter = tree_visitAfter; +treeProto.x = tree_x; +treeProto.y = tree_y; + +exports.quadtree = quadtree; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],113:[function(require,module,exports){ +// https://d3js.org/d3-timer/ Version 1.0.5. Copyright 2017 Mike Bostock. +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); +}(this, (function (exports) { 'use strict'; + +var frame = 0; +var timeout = 0; +var interval = 0; +var pokeDelay = 1000; +var taskHead; +var taskTail; +var clockLast = 0; +var clockNow = 0; +var clockSkew = 0; +var clock = typeof performance === "object" && performance.now ? performance : Date; +var setFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : function(f) { setTimeout(f, 17); }; + +function now() { + return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); +} + +function clearNow() { + clockNow = 0; +} + +function Timer() { + this._call = + this._time = + this._next = null; +} + +Timer.prototype = timer.prototype = { + constructor: Timer, + restart: function(callback, delay, time) { + if (typeof callback !== "function") throw new TypeError("callback is not a function"); + time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); + if (!this._next && taskTail !== this) { + if (taskTail) taskTail._next = this; + else taskHead = this; + taskTail = this; + } + this._call = callback; + this._time = time; + sleep(); + }, + stop: function() { + if (this._call) { + this._call = null; + this._time = Infinity; + sleep(); + } + } +}; + +function timer(callback, delay, time) { + var t = new Timer; + t.restart(callback, delay, time); + return t; +} + +function timerFlush() { + now(); // Get the current time, if not already set. + ++frame; // Pretend we’ve set an alarm, if we haven’t already. + var t = taskHead, e; + while (t) { + if ((e = clockNow - t._time) >= 0) t._call.call(null, e); + t = t._next; + } + --frame; +} + +function wake() { + clockNow = (clockLast = clock.now()) + clockSkew; + frame = timeout = 0; + try { + timerFlush(); + } finally { + frame = 0; + nap(); + clockNow = 0; + } +} + +function poke() { + var now = clock.now(), delay = now - clockLast; + if (delay > pokeDelay) clockSkew -= delay, clockLast = now; +} + +function nap() { + var t0, t1 = taskHead, t2, time = Infinity; + while (t1) { + if (t1._call) { + if (time > t1._time) time = t1._time; + t0 = t1, t1 = t1._next; + } else { + t2 = t1._next, t1._next = null; + t1 = t0 ? t0._next = t2 : taskHead = t2; + } + } + taskTail = t0; + sleep(time); +} + +function sleep(time) { + if (frame) return; // Soonest alarm already set, or will be. + if (timeout) timeout = clearTimeout(timeout); + var delay = time - clockNow; + if (delay > 24) { + if (time < Infinity) timeout = setTimeout(wake, delay); + if (interval) interval = clearInterval(interval); + } else { + if (!interval) clockLast = clockNow, interval = setInterval(poke, pokeDelay); + frame = 1, setFrame(wake); + } +} + +var timeout$1 = function(callback, delay, time) { + var t = new Timer; + delay = delay == null ? 0 : +delay; + t.restart(function(elapsed) { + t.stop(); + callback(elapsed + delay); + }, delay, time); + return t; +}; + +var interval$1 = function(callback, delay, time) { + var t = new Timer, total = delay; + if (delay == null) return t.restart(callback, delay, time), t; + delay = +delay, time = time == null ? now() : +time; + t.restart(function tick(elapsed) { + elapsed += total; + t.restart(tick, total += delay, time); + callback(elapsed); + }, delay, time); + return t; +}; + +exports.now = now; +exports.timer = timer; +exports.timerFlush = timerFlush; +exports.timeout = timeout$1; +exports.interval = interval$1; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],114:[function(require,module,exports){ !function() { var d3 = { version: "3.5.17" @@ -22362,7 +25748,7 @@ module.exports = require("cwise-compiler") }); if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3; }(); -},{}],105:[function(require,module,exports){ +},{}],115:[function(require,module,exports){ "use strict" var ch = require("incremental-convex-hull") @@ -22522,7 +25908,7 @@ function triangulate(points, includePointAtInfinity) { return hull } -},{"incremental-convex-hull":270,"uniq":520}],106:[function(require,module,exports){ +},{"incremental-convex-hull":280,"uniq":530}],116:[function(require,module,exports){ (function (Buffer){ var hasTypedArrays = false if(typeof Float64Array !== "undefined") { @@ -22626,7 +26012,7 @@ module.exports.denormalized = function(n) { return !(hi & 0x7ff00000) } }).call(this,require("buffer").Buffer) -},{"buffer":67}],107:[function(require,module,exports){ +},{"buffer":69}],117:[function(require,module,exports){ "use strict" function dupe_array(count, value, i) { @@ -22676,7 +26062,7 @@ function dupe(count, value) { } module.exports = dupe -},{}],108:[function(require,module,exports){ +},{}],118:[function(require,module,exports){ 'use strict'; module.exports = earcut; @@ -23322,7 +26708,7 @@ earcut.flatten = function (data) { return result; }; -},{}],109:[function(require,module,exports){ +},{}],119:[function(require,module,exports){ "use strict" module.exports = edgeToAdjacency @@ -23356,7 +26742,7 @@ function edgeToAdjacency(edges, numVertices) { } return adj } -},{"uniq":520}],110:[function(require,module,exports){ +},{"uniq":530}],120:[function(require,module,exports){ (function (process,global){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. @@ -24513,7 +27899,7 @@ return Promise; }))); }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":465}],111:[function(require,module,exports){ +},{"_process":475}],121:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -24817,7 +28203,7 @@ function isUndefined(arg) { return arg === void 0; } -},{}],112:[function(require,module,exports){ +},{}],122:[function(require,module,exports){ "use strict" module.exports = extractPlanes @@ -24834,7 +28220,7 @@ function extractPlanes(M, zNear, zFar) { [ zf*M[12] - M[8], zf*M[13] - M[9], zf*M[14] - M[10], zf*M[15] - M[11] ] ] } -},{}],113:[function(require,module,exports){ +},{}],123:[function(require,module,exports){ /** * inspired by is-number * but significantly simplified and sped up by ignoring number and string constructors @@ -24891,7 +28277,7 @@ module.exports = function(n) { return n - n < 1; }; -},{}],114:[function(require,module,exports){ +},{}],124:[function(require,module,exports){ 'use strict'; module.exports = createFilter; @@ -24975,7 +28361,7 @@ function compare(a, b) { return a < b ? -1 : a > b ? 1 : 0; } -},{}],115:[function(require,module,exports){ +},{}],125:[function(require,module,exports){ 'use strict' module.exports = createFilteredVector @@ -25268,7 +28654,7 @@ function createFilteredVector(initState, initVelocity, initTime) { } } -},{"binary-search-bounds":56,"cubic-hermite":99}],116:[function(require,module,exports){ +},{"binary-search-bounds":58,"cubic-hermite":101}],126:[function(require,module,exports){ 'use strict' var SDF = require('tiny-sdf') @@ -25352,7 +28738,7 @@ function atlas(options) { return canvas } -},{"tiny-sdf":510}],117:[function(require,module,exports){ +},{"tiny-sdf":520}],127:[function(require,module,exports){ "use strict" module.exports = createRBTree @@ -26349,7 +29735,7 @@ function defaultCompare(a, b) { function createRBTree(compare) { return new RedBlackTree(compare || defaultCompare, null) } -},{}],118:[function(require,module,exports){ +},{}],128:[function(require,module,exports){ // transliterated from the python snippet here: // http://en.wikipedia.org/wiki/Lanczos_approximation @@ -26418,7 +29804,7 @@ module.exports = function gamma (z) { module.exports.log = lngamma; -},{}],119:[function(require,module,exports){ +},{}],129:[function(require,module,exports){ var wgs84 = require('wgs84'); module.exports.geometry = geometry; @@ -26484,7 +29870,7 @@ function rad(_) { return _ * Math.PI / 180; } -},{"wgs84":542}],120:[function(require,module,exports){ +},{"wgs84":552}],130:[function(require,module,exports){ var geojsonArea = require('geojson-area'); module.exports = rewind; @@ -26535,7 +29921,7 @@ function cw(_) { return geojsonArea.ring(_) >= 0; } -},{"geojson-area":119}],121:[function(require,module,exports){ +},{"geojson-area":129}],131:[function(require,module,exports){ 'use strict'; module.exports = clip; @@ -26686,7 +30072,7 @@ function newSlice(slices, slice, area, dist, outer) { return []; } -},{"./feature":123}],122:[function(require,module,exports){ +},{"./feature":133}],132:[function(require,module,exports){ 'use strict'; module.exports = convert; @@ -26809,7 +30195,7 @@ function calcSize(points) { points.dist = dist; } -},{"./feature":123,"./simplify":125}],123:[function(require,module,exports){ +},{"./feature":133,"./simplify":135}],133:[function(require,module,exports){ 'use strict'; module.exports = createFeature; @@ -26854,7 +30240,7 @@ function calcRingBBox(min, max, points) { } } -},{}],124:[function(require,module,exports){ +},{}],134:[function(require,module,exports){ 'use strict'; module.exports = geojsonvt; @@ -27098,7 +30484,7 @@ function isClippedSquare(tile, extent, buffer) { return true; } -},{"./clip":121,"./convert":122,"./tile":126,"./transform":127,"./wrap":128}],125:[function(require,module,exports){ +},{"./clip":131,"./convert":132,"./tile":136,"./transform":137,"./wrap":138}],135:[function(require,module,exports){ 'use strict'; module.exports = simplify; @@ -27174,7 +30560,7 @@ function getSqSegDist(p, a, b) { return dx * dx + dy * dy; } -},{}],126:[function(require,module,exports){ +},{}],136:[function(require,module,exports){ 'use strict'; module.exports = createTile; @@ -27282,7 +30668,7 @@ function signedArea(ring) { return sum; } -},{}],127:[function(require,module,exports){ +},{}],137:[function(require,module,exports){ 'use strict'; exports.tile = transformTile; @@ -27325,7 +30711,7 @@ function transformPoint(p, extent, z2, tx, ty) { return [x, y]; } -},{}],128:[function(require,module,exports){ +},{}],138:[function(require,module,exports){ 'use strict'; var clip = require('./clip'); @@ -27383,7 +30769,7 @@ function shiftCoords(points, offset) { return newPoints; } -},{"./clip":121,"./feature":123}],129:[function(require,module,exports){ +},{"./clip":131,"./feature":133}],139:[function(require,module,exports){ module.exports = getCanvasContext function getCanvasContext (type, opts) { if (typeof type !== 'string') { @@ -27423,7 +30809,7 @@ function getCanvasContext (type, opts) { return (gl || null) // ensure null on fail } -},{}],130:[function(require,module,exports){ +},{}],140:[function(require,module,exports){ 'use strict' module.exports = createAxes @@ -27946,7 +31332,7 @@ function createAxes(gl, options) { return axes } -},{"./lib/background.js":131,"./lib/cube.js":132,"./lib/lines.js":133,"./lib/text.js":135,"./lib/ticks.js":136}],131:[function(require,module,exports){ +},{"./lib/background.js":141,"./lib/cube.js":142,"./lib/lines.js":143,"./lib/text.js":145,"./lib/ticks.js":146}],141:[function(require,module,exports){ 'use strict' module.exports = createBackgroundCube @@ -28058,7 +31444,7 @@ function createBackgroundCube(gl) { return new BackgroundCube(gl, buffer, vao, shader) } -},{"./shaders":134,"gl-buffer":138,"gl-vao":252}],132:[function(require,module,exports){ +},{"./shaders":144,"gl-buffer":148,"gl-vao":262}],142:[function(require,module,exports){ "use strict" module.exports = getCubeEdges @@ -28299,7 +31685,7 @@ function getCubeEdges(model, view, projection, bounds) { //Return result return CUBE_RESULT } -},{"bit-twiddle":57,"gl-mat4/invert":162,"gl-mat4/multiply":164,"robust-orientation":486,"split-polygon":504}],133:[function(require,module,exports){ +},{"bit-twiddle":59,"gl-mat4/invert":172,"gl-mat4/multiply":174,"robust-orientation":496,"split-polygon":514}],143:[function(require,module,exports){ 'use strict' module.exports = createLines @@ -28505,7 +31891,7 @@ function createLines(gl, bounds, ticks) { return new Lines(gl, vertBuf, vao, shader, tickCount, tickOffset, gridCount, gridOffset) } -},{"./shaders":134,"gl-buffer":138,"gl-vao":252}],134:[function(require,module,exports){ +},{"./shaders":144,"gl-buffer":148,"gl-vao":262}],144:[function(require,module,exports){ 'use strict' @@ -28536,7 +31922,7 @@ exports.bg = function(gl) { ]) } -},{"gl-shader":236}],135:[function(require,module,exports){ +},{"gl-shader":246}],145:[function(require,module,exports){ (function (process){ "use strict" @@ -28738,7 +32124,7 @@ function createTextSprites( } }).call(this,require('_process')) -},{"./shaders":134,"_process":465,"gl-buffer":138,"gl-vao":252,"vectorize-text":531}],136:[function(require,module,exports){ +},{"./shaders":144,"_process":475,"gl-buffer":148,"gl-vao":262,"vectorize-text":541}],146:[function(require,module,exports){ 'use strict' exports.create = defaultTicks @@ -28819,7 +32205,7 @@ function ticksEqual(ticksA, ticksB) { } return true } -},{}],137:[function(require,module,exports){ +},{}],147:[function(require,module,exports){ "use strict" module.exports = axesProperties @@ -28961,7 +32347,7 @@ i_loop: return ranges } -},{"./lib/cube.js":132,"extract-frustum-planes":112,"gl-mat4/multiply":164,"gl-mat4/transpose":172,"gl-vec4/transformMat4":258,"split-polygon":504}],138:[function(require,module,exports){ +},{"./lib/cube.js":142,"extract-frustum-planes":122,"gl-mat4/multiply":174,"gl-mat4/transpose":182,"gl-vec4/transformMat4":268,"split-polygon":514}],148:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -29115,7 +32501,7 @@ function createBuffer(gl, data, type, usage) { module.exports = createBuffer -},{"ndarray":446,"ndarray-ops":440,"typedarray-pool":518}],139:[function(require,module,exports){ +},{"ndarray":456,"ndarray-ops":450,"typedarray-pool":528}],149:[function(require,module,exports){ module.exports = { 0: 'NONE', 1: 'ONE', @@ -29415,14 +32801,14 @@ module.exports = { 37444: 'BROWSER_DEFAULT_WEBGL' } -},{}],140:[function(require,module,exports){ +},{}],150:[function(require,module,exports){ var gl10 = require('./1.0/numbers') module.exports = function lookupConstant (number) { return gl10[number] } -},{"./1.0/numbers":139}],141:[function(require,module,exports){ +},{"./1.0/numbers":149}],151:[function(require,module,exports){ 'use strict' var createShader = require('gl-shader') @@ -29687,7 +33073,7 @@ function createError2D (plot, options) { return errorBars } -},{"./lib/shaders":142,"gl-buffer":138,"gl-shader":236,"typedarray-pool":518}],142:[function(require,module,exports){ +},{"./lib/shaders":152,"gl-buffer":148,"gl-shader":246,"typedarray-pool":528}],152:[function(require,module,exports){ module.exports = { @@ -29695,7 +33081,7 @@ module.exports = { fragment: "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n" } -},{}],143:[function(require,module,exports){ +},{}],153:[function(require,module,exports){ 'use strict' module.exports = createErrorBars @@ -29932,7 +33318,7 @@ function createErrorBars(options) { return result } -},{"./shaders/index":144,"gl-buffer":138,"gl-vao":252}],144:[function(require,module,exports){ +},{"./shaders/index":154,"gl-buffer":148,"gl-vao":262}],154:[function(require,module,exports){ 'use strict' @@ -29949,7 +33335,7 @@ module.exports = function(gl) { ]) } -},{"gl-shader":236}],145:[function(require,module,exports){ +},{"gl-shader":246}],155:[function(require,module,exports){ 'use strict' var createTexture = require('gl-texture2d') @@ -30416,7 +33802,7 @@ function createFBO(gl, width, height, options) { WEBGL_draw_buffers) } -},{"gl-texture2d":248}],146:[function(require,module,exports){ +},{"gl-texture2d":258}],156:[function(require,module,exports){ var sprintf = require('sprintf-js').sprintf; var glConstants = require('gl-constants/lookup'); @@ -30471,7 +33857,7 @@ function formatCompilerError(errLog, src, type) { } -},{"add-line-numbers":32,"gl-constants/lookup":140,"glsl-shader-name":260,"sprintf-js":505}],147:[function(require,module,exports){ +},{"add-line-numbers":34,"gl-constants/lookup":150,"glsl-shader-name":270,"sprintf-js":515}],157:[function(require,module,exports){ 'use strict' module.exports = createHeatmap2D @@ -30789,7 +34175,7 @@ function createHeatmap2D (plot, options) { return heatmap } -},{"./lib/shaders":148,"binary-search-bounds":149,"gl-buffer":138,"gl-shader":236,"iota-array":273,"typedarray-pool":518}],148:[function(require,module,exports){ +},{"./lib/shaders":158,"binary-search-bounds":159,"gl-buffer":148,"gl-shader":246,"iota-array":283,"typedarray-pool":528}],158:[function(require,module,exports){ 'use strict' @@ -30801,9 +34187,9 @@ module.exports = { pickVertex: "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nvoid main() {\n vWeight = weight;\n\n fragId = pickId;\n\n vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n" } -},{}],149:[function(require,module,exports){ -arguments[4][74][0].apply(exports,arguments) -},{"dup":74}],150:[function(require,module,exports){ +},{}],159:[function(require,module,exports){ +arguments[4][76][0].apply(exports,arguments) +},{"dup":76}],160:[function(require,module,exports){ exports.lineVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aHi, aLo, dHi, dLo;\n\nuniform vec2 scaleHi, translateHi, scaleLo, translateLo, screenShape;\nuniform float width;\n\nvarying vec2 direction;\n\n\nvec2 project_1_0(vec2 scHi, vec2 trHi, vec2 scLo, vec2 trLo, vec2 posHi, vec2 posLo) {\n return (posHi + trHi) * scHi\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo;\n}\n\n\nvec2 project_2_1(vec2 scHi, vec2 scLo, vec2 posHi, vec2 posLo) {\n return scHi * posHi\n + scLo * posHi\n + scHi * posLo\n + scLo * posLo;\n}\n\nvoid main() {\n vec2 p = project_1_0(scaleHi, translateHi, scaleLo, translateLo, aHi, aLo);\n vec2 dir = project_2_1(scaleHi, scaleLo, dHi, dLo);\n vec2 n = 0.5 * width * normalize(screenShape.yx * vec2(dir.y, -dir.x)) / screenShape.xy;\n vec2 tangent = normalize(screenShape.xy * dir);\n if(dir.x < 0.0 || (dir.x == 0.0 && dir.y < 0.0)) {\n direction = -tangent;\n } else {\n direction = tangent;\n }\n gl_Position = vec4(p + n, 0.0, 1.0);\n}" @@ -30814,7 +34200,7 @@ exports.pickVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute exports.pickFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 pickOffset;\n\nvarying vec4 pickA, pickB;\n\nvoid main() {\n vec4 fragId = vec4(pickA.xyz, 0.0);\n if(pickB.w > pickA.w) {\n fragId.xyz = pickB.xyz;\n }\n\n fragId += pickOffset;\n\n fragId.y += floor(fragId.x / 256.0);\n fragId.x -= floor(fragId.x / 256.0) * 256.0;\n\n fragId.z += floor(fragId.y / 256.0);\n fragId.y -= floor(fragId.y / 256.0) * 256.0;\n\n fragId.w += floor(fragId.z / 256.0);\n fragId.z -= floor(fragId.z / 256.0) * 256.0;\n\n gl_FragColor = fragId / 255.0;\n}" exports.fillVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aHi, aLo, dHi;\n\nuniform vec2 scaleHi, translateHi, scaleLo, translateLo, projectAxis;\nuniform float projectValue, depth;\n\n\nvec2 project_1_0(vec2 scHi, vec2 trHi, vec2 scLo, vec2 trLo, vec2 posHi, vec2 posLo) {\n return (posHi + trHi) * scHi\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo;\n}\n\n\nvoid main() {\n vec2 p = project_1_0(scaleHi, translateHi, scaleLo, translateLo, aHi, aLo);\n if(dHi.y < 0.0 || (dHi.y == 0.0 && dHi.x < 0.0)) {\n if(dot(p, projectAxis) < projectValue) {\n p = p * (1.0 - abs(projectAxis)) + projectAxis * projectValue;\n }\n }\n gl_Position = vec4(p, depth, 1);\n}" exports.fillFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}" -},{}],151:[function(require,module,exports){ +},{}],161:[function(require,module,exports){ 'use strict' module.exports = createLinePlot @@ -31327,7 +34713,7 @@ function createLinePlot(plot, options) { linePlot.update(options) return linePlot } -},{"./lib/shaders":150,"gl-buffer":138,"gl-shader":236,"gl-texture2d":248,"ndarray":446,"typedarray-pool":518}],152:[function(require,module,exports){ +},{"./lib/shaders":160,"gl-buffer":148,"gl-shader":246,"gl-texture2d":258,"ndarray":456,"typedarray-pool":528}],162:[function(require,module,exports){ var createShader = require('gl-shader') @@ -31351,7 +34737,7 @@ exports.createPickShader = function(gl) { return createShader(gl, vertSrc, pickFrag, null, ATTRIBUTES) } -},{"gl-shader":236}],153:[function(require,module,exports){ +},{"gl-shader":246}],163:[function(require,module,exports){ 'use strict' module.exports = createLinePlot @@ -31721,7 +35107,7 @@ function createLinePlot (options) { return linePlot } -},{"./lib/shaders":152,"binary-search-bounds":56,"gl-buffer":138,"gl-texture2d":248,"gl-vao":252,"glsl-read-float":259,"ndarray":446}],154:[function(require,module,exports){ +},{"./lib/shaders":162,"binary-search-bounds":58,"gl-buffer":148,"gl-texture2d":258,"gl-vao":262,"glsl-read-float":269,"ndarray":456}],164:[function(require,module,exports){ module.exports = invert /** @@ -31750,7 +35136,7 @@ function invert(out, a) { return out } -},{}],155:[function(require,module,exports){ +},{}],165:[function(require,module,exports){ module.exports = invert /** @@ -31789,7 +35175,7 @@ function invert(out, a) { return out } -},{}],156:[function(require,module,exports){ +},{}],166:[function(require,module,exports){ module.exports = clone; /** @@ -31818,7 +35204,7 @@ function clone(a) { out[15] = a[15]; return out; }; -},{}],157:[function(require,module,exports){ +},{}],167:[function(require,module,exports){ module.exports = create; /** @@ -31846,7 +35232,7 @@ function create() { out[15] = 1; return out; }; -},{}],158:[function(require,module,exports){ +},{}],168:[function(require,module,exports){ module.exports = determinant; /** @@ -31877,7 +35263,7 @@ function determinant(a) { // Calculate the determinant return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; }; -},{}],159:[function(require,module,exports){ +},{}],169:[function(require,module,exports){ module.exports = fromQuat; /** @@ -31925,7 +35311,7 @@ function fromQuat(out, q) { return out; }; -},{}],160:[function(require,module,exports){ +},{}],170:[function(require,module,exports){ module.exports = fromRotationTranslation; /** @@ -31979,7 +35365,7 @@ function fromRotationTranslation(out, q, v) { return out; }; -},{}],161:[function(require,module,exports){ +},{}],171:[function(require,module,exports){ module.exports = identity; /** @@ -32007,7 +35393,7 @@ function identity(out) { out[15] = 1; return out; }; -},{}],162:[function(require,module,exports){ +},{}],172:[function(require,module,exports){ module.exports = invert; /** @@ -32063,7 +35449,7 @@ function invert(out, a) { return out; }; -},{}],163:[function(require,module,exports){ +},{}],173:[function(require,module,exports){ var identity = require('./identity'); module.exports = lookAt; @@ -32154,7 +35540,7 @@ function lookAt(out, eye, center, up) { return out; }; -},{"./identity":161}],164:[function(require,module,exports){ +},{"./identity":171}],174:[function(require,module,exports){ module.exports = multiply; /** @@ -32197,7 +35583,7 @@ function multiply(out, a, b) { out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33; return out; }; -},{}],165:[function(require,module,exports){ +},{}],175:[function(require,module,exports){ module.exports = perspective; /** @@ -32231,7 +35617,7 @@ function perspective(out, fovy, aspect, near, far) { out[15] = 0; return out; }; -},{}],166:[function(require,module,exports){ +},{}],176:[function(require,module,exports){ module.exports = rotate; /** @@ -32296,7 +35682,7 @@ function rotate(out, a, rad, axis) { } return out; }; -},{}],167:[function(require,module,exports){ +},{}],177:[function(require,module,exports){ module.exports = rotateX; /** @@ -32341,7 +35727,7 @@ function rotateX(out, a, rad) { out[11] = a23 * c - a13 * s; return out; }; -},{}],168:[function(require,module,exports){ +},{}],178:[function(require,module,exports){ module.exports = rotateY; /** @@ -32386,7 +35772,7 @@ function rotateY(out, a, rad) { out[11] = a03 * s + a23 * c; return out; }; -},{}],169:[function(require,module,exports){ +},{}],179:[function(require,module,exports){ module.exports = rotateZ; /** @@ -32431,7 +35817,7 @@ function rotateZ(out, a, rad) { out[7] = a13 * c - a03 * s; return out; }; -},{}],170:[function(require,module,exports){ +},{}],180:[function(require,module,exports){ module.exports = scale; /** @@ -32463,7 +35849,7 @@ function scale(out, a, v) { out[15] = a[15]; return out; }; -},{}],171:[function(require,module,exports){ +},{}],181:[function(require,module,exports){ module.exports = translate; /** @@ -32502,7 +35888,7 @@ function translate(out, a, v) { return out; }; -},{}],172:[function(require,module,exports){ +},{}],182:[function(require,module,exports){ module.exports = transpose; /** @@ -32552,7 +35938,7 @@ function transpose(out, a) { return out; }; -},{}],173:[function(require,module,exports){ +},{}],183:[function(require,module,exports){ 'use strict' module.exports = invert @@ -32583,7 +35969,7 @@ function invert(out, M) { } return out } -},{"gl-mat2/invert":154,"gl-mat3/invert":155,"gl-mat4/invert":162}],174:[function(require,module,exports){ +},{"gl-mat2/invert":164,"gl-mat3/invert":165,"gl-mat4/invert":172}],184:[function(require,module,exports){ /** * @fileoverview gl-matrix - High performance matrix and vector operations * @author Brandon Jones @@ -32621,7 +36007,7 @@ exports.quat = require("./gl-matrix/quat.js"); exports.vec2 = require("./gl-matrix/vec2.js"); exports.vec3 = require("./gl-matrix/vec3.js"); exports.vec4 = require("./gl-matrix/vec4.js"); -},{"./gl-matrix/common.js":175,"./gl-matrix/mat2.js":176,"./gl-matrix/mat2d.js":177,"./gl-matrix/mat3.js":178,"./gl-matrix/mat4.js":179,"./gl-matrix/quat.js":180,"./gl-matrix/vec2.js":181,"./gl-matrix/vec3.js":182,"./gl-matrix/vec4.js":183}],175:[function(require,module,exports){ +},{"./gl-matrix/common.js":185,"./gl-matrix/mat2.js":186,"./gl-matrix/mat2d.js":187,"./gl-matrix/mat3.js":188,"./gl-matrix/mat4.js":189,"./gl-matrix/quat.js":190,"./gl-matrix/vec2.js":191,"./gl-matrix/vec3.js":192,"./gl-matrix/vec4.js":193}],185:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -32693,7 +36079,7 @@ glMatrix.equals = function(a, b) { module.exports = glMatrix; -},{}],176:[function(require,module,exports){ +},{}],186:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -33131,7 +36517,7 @@ mat2.multiplyScalarAndAdd = function(out, a, b, scale) { module.exports = mat2; -},{"./common.js":175}],177:[function(require,module,exports){ +},{"./common.js":185}],187:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -33602,7 +36988,7 @@ mat2d.equals = function (a, b) { module.exports = mat2d; -},{"./common.js":175}],178:[function(require,module,exports){ +},{"./common.js":185}],188:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34350,7 +37736,7 @@ mat3.equals = function (a, b) { module.exports = mat3; -},{"./common.js":175}],179:[function(require,module,exports){ +},{"./common.js":185}],189:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36488,7 +39874,7 @@ mat4.equals = function (a, b) { module.exports = mat4; -},{"./common.js":175}],180:[function(require,module,exports){ +},{"./common.js":185}],190:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -37090,7 +40476,7 @@ quat.equals = vec4.equals; module.exports = quat; -},{"./common.js":175,"./mat3.js":178,"./vec3.js":182,"./vec4.js":183}],181:[function(require,module,exports){ +},{"./common.js":185,"./mat3.js":188,"./vec3.js":192,"./vec4.js":193}],191:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -37679,7 +41065,7 @@ vec2.equals = function (a, b) { module.exports = vec2; -},{"./common.js":175}],182:[function(require,module,exports){ +},{"./common.js":185}],192:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -38458,7 +41844,7 @@ vec3.equals = function (a, b) { module.exports = vec3; -},{"./common.js":175}],183:[function(require,module,exports){ +},{"./common.js":185}],193:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -39069,7 +42455,7 @@ vec4.equals = function (a, b) { module.exports = vec4; -},{"./common.js":175}],184:[function(require,module,exports){ +},{"./common.js":185}],194:[function(require,module,exports){ 'use strict' var barycentric = require('barycentric') @@ -39167,7 +42553,7 @@ function closestPointToPickLocation(simplex, pixelCoord, model, view, projection } return [closestIndex, interpolate(simplex, weights), weights] } -},{"barycentric":39,"polytope-closest-point/lib/closest_point_2d.js":464}],185:[function(require,module,exports){ +},{"barycentric":41,"polytope-closest-point/lib/closest_point_2d.js":474}],195:[function(require,module,exports){ var triVertSrc = "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec4 m_position = model * vec4(position, 1.0);\n vec4 t_position = view * m_position;\n gl_Position = projection * t_position;\n f_color = color;\n f_normal = normal;\n f_data = position;\n f_eyeDirection = eyePosition - position;\n f_lightDirection = lightPosition - position;\n f_uv = uv;\n}" @@ -39236,7 +42622,7 @@ exports.contourShader = { ] } -},{}],186:[function(require,module,exports){ +},{}],196:[function(require,module,exports){ 'use strict' var DEFAULT_VERTEX_NORMALS_EPSILON = 1e-6; // may be too large if triangles are very small @@ -40251,7 +43637,7 @@ function createSimplicialMesh(params) { module.exports = createSimplicialMesh -},{"./lib/closest-point":184,"./lib/shaders":185,"colormap":89,"gl-buffer":138,"gl-mat4/invert":162,"gl-mat4/multiply":164,"gl-shader":236,"gl-texture2d":248,"gl-vao":252,"ndarray":446,"normals":448,"simplicial-complex-contour":495,"typedarray-pool":518}],187:[function(require,module,exports){ +},{"./lib/closest-point":194,"./lib/shaders":195,"colormap":91,"gl-buffer":148,"gl-mat4/invert":172,"gl-mat4/multiply":174,"gl-shader":246,"gl-texture2d":258,"gl-vao":262,"ndarray":456,"normals":458,"simplicial-complex-contour":505,"typedarray-pool":528}],197:[function(require,module,exports){ 'use strict' module.exports = createBoxes @@ -40314,7 +43700,7 @@ function createBoxes(plot) { return new Boxes(plot, vbo, shader) } -},{"./shaders":190,"gl-buffer":138,"gl-shader":193}],188:[function(require,module,exports){ +},{"./shaders":200,"gl-buffer":148,"gl-shader":203}],198:[function(require,module,exports){ 'use strict' module.exports = createGrid @@ -40561,7 +43947,7 @@ function createGrid(plot) { return grid } -},{"./shaders":190,"binary-search-bounds":192,"gl-buffer":138,"gl-shader":193}],189:[function(require,module,exports){ +},{"./shaders":200,"binary-search-bounds":202,"gl-buffer":148,"gl-shader":203}],199:[function(require,module,exports){ 'use strict' module.exports = createLines @@ -40626,7 +44012,7 @@ function createLines(plot) { return lines } -},{"./shaders":190,"gl-buffer":138,"gl-shader":193}],190:[function(require,module,exports){ +},{"./shaders":200,"gl-buffer":148,"gl-shader":203}],200:[function(require,module,exports){ 'use strict' @@ -40644,7 +44030,7 @@ module.exports = { tickVert: "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\n\nvoid main() {\n vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\n}\n" } -},{}],191:[function(require,module,exports){ +},{}],201:[function(require,module,exports){ 'use strict' module.exports = createTextElements @@ -40922,9 +44308,9 @@ function createTextElements(plot) { return text } -},{"./shaders":190,"binary-search-bounds":192,"gl-buffer":138,"gl-shader":193,"text-cache":509}],192:[function(require,module,exports){ -arguments[4][74][0].apply(exports,arguments) -},{"dup":74}],193:[function(require,module,exports){ +},{"./shaders":200,"binary-search-bounds":202,"gl-buffer":148,"gl-shader":203,"text-cache":519}],202:[function(require,module,exports){ +arguments[4][76][0].apply(exports,arguments) +},{"dup":76}],203:[function(require,module,exports){ 'use strict' var createUniformWrapper = require('./lib/create-uniforms') @@ -41190,7 +44576,7 @@ function createShader( module.exports = createShader -},{"./lib/GLError":194,"./lib/create-attributes":195,"./lib/create-uniforms":196,"./lib/reflect":197,"./lib/runtime-reflect":198,"./lib/shader-cache":199}],194:[function(require,module,exports){ +},{"./lib/GLError":204,"./lib/create-attributes":205,"./lib/create-uniforms":206,"./lib/reflect":207,"./lib/runtime-reflect":208,"./lib/shader-cache":209}],204:[function(require,module,exports){ function GLError (rawError, shortMessage, longMessage) { this.shortMessage = shortMessage || '' this.longMessage = longMessage || '' @@ -41205,7 +44591,7 @@ GLError.prototype.name = 'GLError' GLError.prototype.constructor = GLError module.exports = GLError -},{}],195:[function(require,module,exports){ +},{}],205:[function(require,module,exports){ 'use strict' module.exports = createAttributeWrapper @@ -41470,7 +44856,7 @@ function createAttributeWrapper( return obj } -},{"./GLError":194}],196:[function(require,module,exports){ +},{"./GLError":204}],206:[function(require,module,exports){ 'use strict' var coallesceUniforms = require('./reflect') @@ -41663,7 +45049,7 @@ function createUniformWrapper(gl, wrapper, uniforms, locations) { } } -},{"./GLError":194,"./reflect":197}],197:[function(require,module,exports){ +},{"./GLError":204,"./reflect":207}],207:[function(require,module,exports){ 'use strict' module.exports = makeReflectTypes @@ -41721,7 +45107,7 @@ function makeReflectTypes(uniforms, useIndex) { } return obj } -},{}],198:[function(require,module,exports){ +},{}],208:[function(require,module,exports){ 'use strict' exports.uniforms = runtimeUniforms @@ -41801,7 +45187,7 @@ function runtimeAttributes(gl, program) { return result } -},{}],199:[function(require,module,exports){ +},{}],209:[function(require,module,exports){ 'use strict' exports.shader = getShaderReference @@ -41939,7 +45325,7 @@ function createProgram(gl, vref, fref, attribs, locations) { return getCache(gl).getProgram(vref, fref, attribs, locations) } -},{"./GLError":194,"gl-format-compiler-error":146,"weakmap-shim":539}],200:[function(require,module,exports){ +},{"./GLError":204,"gl-format-compiler-error":156,"weakmap-shim":549}],210:[function(require,module,exports){ 'use strict' module.exports = createGLPlot2D @@ -42520,784 +45906,783 @@ function createGLPlot2D(options) { return plot } -},{"./lib/box":187,"./lib/grid":188,"./lib/line":189,"./lib/text":191,"gl-select-static":235}],201:[function(require,module,exports){ - -var createShader = require('gl-shader') - -var vertSrc = "precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}" -var fragSrc = "precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}" - -module.exports = function(gl) { - return createShader(gl, vertSrc, fragSrc, null, [ { name: 'position', type: 'vec2'}]) -} - -},{"gl-shader":236}],202:[function(require,module,exports){ -'use strict' - -module.exports = createScene - -var createCamera = require('3d-view-controls') -var createAxes = require('gl-axes3d') -var axesRanges = require('gl-axes3d/properties') -var createSpikes = require('gl-spikes3d') -var createSelect = require('gl-select-static') -var createFBO = require('gl-fbo') -var drawTriangle = require('a-big-triangle') -var mouseChange = require('mouse-change') -var perspective = require('gl-mat4/perspective') -var createShader = require('./lib/shader') -var isMobile = require('is-mobile')() - -function MouseSelect() { - this.mouse = [-1,-1] - this.screen = null - this.distance = Infinity - this.index = null - this.dataCoordinate = null - this.dataPosition = null - this.object = null - this.data = null -} - -function getContext(canvas, options) { - var gl = null - try { - gl = canvas.getContext('webgl', options) - if(!gl) { - gl = canvas.getContext('experimental-webgl', options) - } - } catch(e) { - return null - } - return gl -} - -function roundUpPow10(x) { - var y = Math.round(Math.log(Math.abs(x)) / Math.log(10)) - if(y < 0) { - var base = Math.round(Math.pow(10, -y)) - return Math.ceil(x*base) / base - } else if(y > 0) { - var base = Math.round(Math.pow(10, y)) - return Math.ceil(x/base) * base - } - return Math.ceil(x) -} - -function defaultBool(x) { - if(typeof x === 'boolean') { - return x - } - return true -} - -function createScene(options) { - options = options || {} - - var stopped = false - - var pixelRatio = options.pixelRatio || parseFloat(window.devicePixelRatio) - - var canvas = options.canvas - if(!canvas) { - canvas = document.createElement('canvas') - if(options.container) { - var container = options.container - container.appendChild(canvas) - } else { - document.body.appendChild(canvas) - } - } - - var gl = options.gl - if(!gl) { - gl = getContext(canvas, - options.glOptions || { - premultipliedAlpha: true, - antialias: true - }) - } - if(!gl) { - throw new Error('webgl not supported') - } - - //Initial bounds - var bounds = options.bounds || [[-10,-10,-10], [10,10,10]] - - //Create selection - var selection = new MouseSelect() - - //Accumulation buffer - var accumBuffer = createFBO(gl, - [gl.drawingBufferWidth, gl.drawingBufferHeight], { - preferFloat: !isMobile - }) - - var accumShader = createShader(gl) - - //Create a camera - var cameraOptions = options.camera || { - eye: [2,0,0], - center: [0,0,0], - up: [0,1,0], - zoomMin: 0.1, - zoomMax: 100, - mode: 'turntable' - } - - //Create axes - var axesOptions = options.axes || {} - var axes = createAxes(gl, axesOptions) - axes.enable = !axesOptions.disable - - //Create spikes - var spikeOptions = options.spikes || {} - var spikes = createSpikes(gl, spikeOptions) - - //Object list is empty initially - var objects = [] - var pickBufferIds = [] - var pickBufferCount = [] - var pickBuffers = [] - - //Dirty flag, skip redraw if scene static - var dirty = true - var pickDirty = true - - var projection = new Array(16) - var model = new Array(16) - - var cameraParams = { - view: null, - projection: projection, - model: model - } - - var pickDirty = true - - var viewShape = [ gl.drawingBufferWidth, gl.drawingBufferHeight ] - - //Create scene object - var scene = { - gl: gl, - contextLost: false, - pixelRatio: options.pixelRatio || parseFloat(window.devicePixelRatio), - canvas: canvas, - selection: selection, - camera: createCamera(canvas, cameraOptions), - axes: axes, - axesPixels: null, - spikes: spikes, - bounds: bounds, - objects: objects, - shape: viewShape, - aspect: options.aspectRatio || [1,1,1], - pickRadius: options.pickRadius || 10, - zNear: options.zNear || 0.01, - zFar: options.zFar || 1000, - fovy: options.fovy || Math.PI/4, - clearColor: options.clearColor || [0,0,0,0], - autoResize: defaultBool(options.autoResize), - autoBounds: defaultBool(options.autoBounds), - autoScale: !!options.autoScale, - autoCenter: defaultBool(options.autoCenter), - clipToBounds: defaultBool(options.clipToBounds), - snapToData: !!options.snapToData, - onselect: options.onselect || null, - onrender: options.onrender || null, - onclick: options.onclick || null, - cameraParams: cameraParams, - oncontextloss: null, - mouseListener: null - } - - var pickShape = [ (gl.drawingBufferWidth/scene.pixelRatio)|0, (gl.drawingBufferHeight/scene.pixelRatio)|0 ] - - function resizeListener() { - if(stopped) { - return - } - if(!scene.autoResize) { - return - } - var parent = canvas.parentNode - var width = 1 - var height = 1 - if(parent && parent !== document.body) { - width = parent.clientWidth - height = parent.clientHeight - } else { - width = window.innerWidth - height = window.innerHeight - } - var nextWidth = Math.ceil(width * scene.pixelRatio)|0 - var nextHeight = Math.ceil(height * scene.pixelRatio)|0 - if(nextWidth !== canvas.width || nextHeight !== canvas.height) { - canvas.width = nextWidth - canvas.height = nextHeight - var style = canvas.style - style.position = style.position || 'absolute' - style.left = '0px' - style.top = '0px' - style.width = width + 'px' - style.height = height + 'px' - dirty = true - } - } - if(scene.autoResize) { - resizeListener() - } - window.addEventListener('resize', resizeListener) - - function reallocPickIds() { - var numObjs = objects.length - var numPick = pickBuffers.length - for(var i=0; i 0 && pickBufferCount[numPick-1] === 0) { - pickBufferCount.pop() - pickBuffers.pop().dispose() - } - } - - scene.update = function(options) { - if(stopped) { - return - } - options = options || {} - dirty = true - pickDirty = true - } - - scene.add = function(obj) { - if(stopped) { - return - } - obj.axes = axes - objects.push(obj) - pickBufferIds.push(-1) - dirty = true - pickDirty = true - reallocPickIds() - } - - scene.remove = function(obj) { - if(stopped) { - return - } - var idx = objects.indexOf(obj) - if(idx < 0) { - return - } - objects.splice(idx, 1) - pickBufferIds.pop() - dirty = true - pickDirty = true - reallocPickIds() - } - - scene.dispose = function() { - if(stopped) { - return - } - - stopped = true - - window.removeEventListener('resize', resizeListener) - canvas.removeEventListener('webglcontextlost', checkContextLoss) - scene.mouseListener.enabled = false - - if(scene.contextLost) { - return - } - - //Destroy objects - axes.dispose() - spikes.dispose() - for(var i=0; i selection.distance) { - continue - } - for(var j=0; j 0) { + var base = Math.round(Math.pow(10, y)) + return Math.ceil(x/base) * base + } + return Math.ceil(x) +} + +function defaultBool(x) { + if(typeof x === 'boolean') { + return x + } + return true +} + +function createScene(options) { + options = options || {} + + var stopped = false + + var pixelRatio = options.pixelRatio || parseFloat(window.devicePixelRatio) + + var canvas = options.canvas + if(!canvas) { + canvas = document.createElement('canvas') + if(options.container) { + var container = options.container + container.appendChild(canvas) + } else { + document.body.appendChild(canvas) + } + } + + var gl = options.gl + if(!gl) { + gl = getContext(canvas, + options.glOptions || { + premultipliedAlpha: true, + antialias: true + }) + } + if(!gl) { + throw new Error('webgl not supported') + } + + //Initial bounds + var bounds = options.bounds || [[-10,-10,-10], [10,10,10]] + + //Create selection + var selection = new MouseSelect() + + //Accumulation buffer + var accumBuffer = createFBO(gl, + [gl.drawingBufferWidth, gl.drawingBufferHeight], { + preferFloat: !isMobile + }) + + var accumShader = createShader(gl) + + //Create a camera + var cameraOptions = options.camera || { + eye: [2,0,0], + center: [0,0,0], + up: [0,1,0], + zoomMin: 0.1, + zoomMax: 100, + mode: 'turntable' + } + + //Create axes + var axesOptions = options.axes || {} + var axes = createAxes(gl, axesOptions) + axes.enable = !axesOptions.disable + + //Create spikes + var spikeOptions = options.spikes || {} + var spikes = createSpikes(gl, spikeOptions) + + //Object list is empty initially + var objects = [] + var pickBufferIds = [] + var pickBufferCount = [] + var pickBuffers = [] + + //Dirty flag, skip redraw if scene static + var dirty = true + var pickDirty = true + + var projection = new Array(16) + var model = new Array(16) + + var cameraParams = { + view: null, + projection: projection, + model: model + } + + var pickDirty = true + + var viewShape = [ gl.drawingBufferWidth, gl.drawingBufferHeight ] + + //Create scene object + var scene = { + gl: gl, + contextLost: false, + pixelRatio: options.pixelRatio || parseFloat(window.devicePixelRatio), + canvas: canvas, + selection: selection, + camera: createCamera(canvas, cameraOptions), + axes: axes, + axesPixels: null, + spikes: spikes, + bounds: bounds, + objects: objects, + shape: viewShape, + aspect: options.aspectRatio || [1,1,1], + pickRadius: options.pickRadius || 10, + zNear: options.zNear || 0.01, + zFar: options.zFar || 1000, + fovy: options.fovy || Math.PI/4, + clearColor: options.clearColor || [0,0,0,0], + autoResize: defaultBool(options.autoResize), + autoBounds: defaultBool(options.autoBounds), + autoScale: !!options.autoScale, + autoCenter: defaultBool(options.autoCenter), + clipToBounds: defaultBool(options.clipToBounds), + snapToData: !!options.snapToData, + onselect: options.onselect || null, + onrender: options.onrender || null, + onclick: options.onclick || null, + cameraParams: cameraParams, + oncontextloss: null, + mouseListener: null + } + + var pickShape = [ (gl.drawingBufferWidth/scene.pixelRatio)|0, (gl.drawingBufferHeight/scene.pixelRatio)|0 ] + + function resizeListener() { + if(stopped) { + return + } + if(!scene.autoResize) { + return + } + var parent = canvas.parentNode + var width = 1 + var height = 1 + if(parent && parent !== document.body) { + width = parent.clientWidth + height = parent.clientHeight + } else { + width = window.innerWidth + height = window.innerHeight + } + var nextWidth = Math.ceil(width * scene.pixelRatio)|0 + var nextHeight = Math.ceil(height * scene.pixelRatio)|0 + if(nextWidth !== canvas.width || nextHeight !== canvas.height) { + canvas.width = nextWidth + canvas.height = nextHeight + var style = canvas.style + style.position = style.position || 'absolute' + style.left = '0px' + style.top = '0px' + style.width = width + 'px' + style.height = height + 'px' + dirty = true + } + } + if(scene.autoResize) { + resizeListener() + } + window.addEventListener('resize', resizeListener) + + function reallocPickIds() { + var numObjs = objects.length + var numPick = pickBuffers.length + for(var i=0; i 0 && pickBufferCount[numPick-1] === 0) { + pickBufferCount.pop() + pickBuffers.pop().dispose() + } + } + + scene.update = function(options) { + if(stopped) { + return + } + options = options || {} + dirty = true + pickDirty = true + } + + scene.add = function(obj) { + if(stopped) { + return + } + obj.axes = axes + objects.push(obj) + pickBufferIds.push(-1) + dirty = true + pickDirty = true + reallocPickIds() + } + + scene.remove = function(obj) { + if(stopped) { + return + } + var idx = objects.indexOf(obj) + if(idx < 0) { + return + } + objects.splice(idx, 1) + pickBufferIds.pop() + dirty = true + pickDirty = true + reallocPickIds() + } + + scene.dispose = function() { + if(stopped) { + return + } + + stopped = true + + window.removeEventListener('resize', resizeListener) + canvas.removeEventListener('webglcontextlost', checkContextLoss) + scene.mouseListener.enabled = false + + if(scene.contextLost) { + return + } + + //Destroy objects + axes.dispose() + spikes.dispose() + for(var i=0; i selection.distance) { + continue + } + for(var j=0; j>=' @@ -49590,7 +52975,7 @@ module.exports = [ , '}' ] -},{}],267:[function(require,module,exports){ +},{}],277:[function(require,module,exports){ var tokenize = require('./index') module.exports = tokenizeString @@ -49605,7 +52990,7 @@ function tokenizeString(str, opt) { return tokens } -},{"./index":261}],268:[function(require,module,exports){ +},{"./index":271}],278:[function(require,module,exports){ 'use strict'; module.exports = GridIndex; @@ -49767,7 +53152,7 @@ GridIndex.prototype.toArrayBuffer = function() { return array.buffer; }; -},{}],269:[function(require,module,exports){ +},{}],279:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -49853,7 +53238,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],270:[function(require,module,exports){ +},{}],280:[function(require,module,exports){ "use strict" //High level idea: @@ -50300,7 +53685,7 @@ function incrementalConvexHull(points, randomSearch) { //Extract boundary cells return triangles.boundary() } -},{"robust-orientation":486,"simplicial-complex":497}],271:[function(require,module,exports){ +},{"robust-orientation":496,"simplicial-complex":507}],281:[function(require,module,exports){ "use strict" var bounds = require("binary-search-bounds") @@ -50667,7 +54052,7 @@ function createWrapper(intervals) { return new IntervalTree(createIntervalTree(intervals)) } -},{"binary-search-bounds":56}],272:[function(require,module,exports){ +},{"binary-search-bounds":58}],282:[function(require,module,exports){ "use strict" function invertPermutation(pi, result) { @@ -50679,7 +54064,7 @@ function invertPermutation(pi, result) { } module.exports = invertPermutation -},{}],273:[function(require,module,exports){ +},{}],283:[function(require,module,exports){ "use strict" function iota(n) { @@ -50691,7 +54076,7 @@ function iota(n) { } module.exports = iota -},{}],274:[function(require,module,exports){ +},{}],284:[function(require,module,exports){ /*! * Determine if an object is a Buffer * @@ -50714,7 +54099,7 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],275:[function(require,module,exports){ +},{}],285:[function(require,module,exports){ module.exports = isMobile; function isMobile (ua) { @@ -50728,7 +54113,7 @@ function isMobile (ua) { } -},{}],276:[function(require,module,exports){ +},{}],286:[function(require,module,exports){ 'use strict'; var toString = Object.prototype.toString; @@ -50737,7 +54122,7 @@ module.exports = function (x) { return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({})); }; -},{}],277:[function(require,module,exports){ +},{}],287:[function(require,module,exports){ 'use strict'; var sort = require('./sort'); @@ -50783,7 +54168,7 @@ KDBush.prototype = { function defaultGetX(p) { return p[0]; } function defaultGetY(p) { return p[1]; } -},{"./range":278,"./sort":279,"./within":280}],278:[function(require,module,exports){ +},{"./range":288,"./sort":289,"./within":290}],288:[function(require,module,exports){ 'use strict'; module.exports = range; @@ -50831,7 +54216,7 @@ function range(ids, coords, minX, minY, maxX, maxY, nodeSize) { return result; } -},{}],279:[function(require,module,exports){ +},{}],289:[function(require,module,exports){ 'use strict'; module.exports = sortKD; @@ -50899,7 +54284,7 @@ function swap(arr, i, j) { arr[j] = tmp; } -},{}],280:[function(require,module,exports){ +},{}],290:[function(require,module,exports){ 'use strict'; module.exports = within; @@ -50951,7 +54336,7 @@ function sqDist(ax, ay, bx, by) { return dx * dx + dy * dy; } -},{}],281:[function(require,module,exports){ +},{}],291:[function(require,module,exports){ 'use strict'; function createFunction(parameters, defaultType) { @@ -51124,7 +54509,7 @@ module.exports['piecewise-constant'] = function(parameters) { return createFunction(parameters, 'interval'); }; -},{}],282:[function(require,module,exports){ +},{}],292:[function(require,module,exports){ var path = require('path'); @@ -51186,7 +54571,7 @@ module.exports = { module.exports.util = "float evaluate_zoom_function_1(const vec4 values, const float t) {\n if (t < 1.0) {\n return mix(values[0], values[1], t);\n } else if (t < 2.0) {\n return mix(values[1], values[2], t - 1.0);\n } else {\n return mix(values[2], values[3], t - 2.0);\n }\n}\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\n if (t < 1.0) {\n return mix(value0, value1, t);\n } else if (t < 2.0) {\n return mix(value1, value2, t - 1.0);\n } else {\n return mix(value2, value3, t - 2.0);\n }\n}\n"; -},{"path":454}],283:[function(require,module,exports){ +},{"path":464}],293:[function(require,module,exports){ 'use strict'; var format = require('util').format; @@ -51204,7 +54589,7 @@ function ValidationError(key, value /*, message, ...*/) { module.exports = ValidationError; -},{"util":526}],284:[function(require,module,exports){ +},{"util":536}],294:[function(require,module,exports){ 'use strict'; module.exports = function (output) { @@ -51217,7 +54602,7 @@ module.exports = function (output) { return output; }; -},{}],285:[function(require,module,exports){ +},{}],295:[function(require,module,exports){ 'use strict'; module.exports = function getType(val) { @@ -51236,7 +54621,7 @@ module.exports = function getType(val) { } }; -},{}],286:[function(require,module,exports){ +},{}],296:[function(require,module,exports){ 'use strict'; // Turn jsonlint-lines-primitives objects into primitive objects @@ -51248,7 +54633,7 @@ module.exports = function unbundle(value) { } }; -},{}],287:[function(require,module,exports){ +},{}],297:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51315,7 +54700,7 @@ module.exports = function validate(options) { } }; -},{"../error/validation_error":283,"../util/extend":284,"../util/get_type":285,"./validate_array":288,"./validate_boolean":289,"./validate_color":290,"./validate_constants":291,"./validate_enum":292,"./validate_filter":293,"./validate_function":294,"./validate_layer":296,"./validate_number":298,"./validate_object":299,"./validate_source":301,"./validate_string":302}],288:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/extend":294,"../util/get_type":295,"./validate_array":298,"./validate_boolean":299,"./validate_color":300,"./validate_constants":301,"./validate_enum":302,"./validate_filter":303,"./validate_function":304,"./validate_layer":306,"./validate_number":308,"./validate_object":309,"./validate_source":311,"./validate_string":312}],298:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -51369,7 +54754,7 @@ module.exports = function validateArray(options) { return errors; }; -},{"../error/validation_error":283,"../util/get_type":285,"./validate":287}],289:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295,"./validate":297}],299:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -51387,7 +54772,7 @@ module.exports = function validateBoolean(options) { return []; }; -},{"../error/validation_error":283,"../util/get_type":285}],290:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295}],300:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51410,7 +54795,7 @@ module.exports = function validateColor(options) { return []; }; -},{"../error/validation_error":283,"../util/get_type":285,"csscolorparser":98}],291:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295,"csscolorparser":100}],301:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51444,7 +54829,7 @@ module.exports = function validateConstants(options) { }; -},{"../error/validation_error":283,"../util/get_type":285}],292:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295}],302:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51462,7 +54847,7 @@ module.exports = function validateEnum(options) { return errors; }; -},{"../error/validation_error":283,"../util/unbundle_jsonlint":286}],293:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/unbundle_jsonlint":296}],303:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51567,7 +54952,7 @@ module.exports = function validateFilter(options) { return errors; }; -},{"../error/validation_error":283,"../util/get_type":285,"../util/unbundle_jsonlint":286,"./validate_enum":292}],294:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295,"../util/unbundle_jsonlint":296,"./validate_enum":302}],304:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51701,7 +55086,7 @@ module.exports = function validateFunction(options) { }; -},{"../error/validation_error":283,"../util/get_type":285,"./validate":287,"./validate_array":288,"./validate_number":298,"./validate_object":299}],295:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295,"./validate":297,"./validate_array":298,"./validate_number":308,"./validate_object":309}],305:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51725,7 +55110,7 @@ module.exports = function(options) { return errors; }; -},{"../error/validation_error":283,"./validate_string":302}],296:[function(require,module,exports){ +},{"../error/validation_error":293,"./validate_string":312}],306:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51838,7 +55223,7 @@ module.exports = function validateLayer(options) { return errors; }; -},{"../error/validation_error":283,"../util/extend":284,"../util/unbundle_jsonlint":286,"./validate_filter":293,"./validate_layout_property":297,"./validate_object":299,"./validate_paint_property":300}],297:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/extend":294,"../util/unbundle_jsonlint":296,"./validate_filter":303,"./validate_layout_property":307,"./validate_object":309,"./validate_paint_property":310}],307:[function(require,module,exports){ 'use strict'; var validate = require('./validate'); @@ -51877,7 +55262,7 @@ module.exports = function validateLayoutProperty(options) { }; -},{"../error/validation_error":283,"./validate":287}],298:[function(require,module,exports){ +},{"../error/validation_error":293,"./validate":297}],308:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -51904,7 +55289,7 @@ module.exports = function validateNumber(options) { return []; }; -},{"../error/validation_error":283,"../util/get_type":285}],299:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295}],309:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51957,7 +55342,7 @@ module.exports = function validateObject(options) { return errors; }; -},{"../error/validation_error":283,"../util/get_type":285,"./validate":287}],300:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295,"./validate":297}],310:[function(require,module,exports){ 'use strict'; var validate = require('./validate'); @@ -51997,7 +55382,7 @@ module.exports = function validatePaintProperty(options) { }; -},{"../error/validation_error":283,"./validate":287}],301:[function(require,module,exports){ +},{"../error/validation_error":293,"./validate":297}],311:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -52074,7 +55459,7 @@ module.exports = function validateSource(options) { } }; -},{"../error/validation_error":283,"../util/unbundle_jsonlint":286,"./validate_enum":292,"./validate_object":299}],302:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/unbundle_jsonlint":296,"./validate_enum":302,"./validate_object":309}],312:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -52092,7 +55477,7 @@ module.exports = function validateString(options) { return []; }; -},{"../error/validation_error":283,"../util/get_type":285}],303:[function(require,module,exports){ +},{"../error/validation_error":293,"../util/get_type":295}],313:[function(require,module,exports){ 'use strict'; var validateConstants = require('./validate/validate_constants'); @@ -52162,12 +55547,12 @@ function wrapCleanErrors(inner) { module.exports = validateStyleMin; -},{"../reference/latest.min":304,"./validate/validate":287,"./validate/validate_constants":291,"./validate/validate_filter":293,"./validate/validate_glyphs_url":295,"./validate/validate_layer":296,"./validate/validate_layout_property":297,"./validate/validate_paint_property":300,"./validate/validate_source":301}],304:[function(require,module,exports){ +},{"../reference/latest.min":314,"./validate/validate":297,"./validate/validate_constants":301,"./validate/validate_filter":303,"./validate/validate_glyphs_url":305,"./validate/validate_layer":306,"./validate/validate_layout_property":307,"./validate/validate_paint_property":310,"./validate/validate_source":311}],314:[function(require,module,exports){ module.exports = require('./v8.min.json'); -},{"./v8.min.json":305}],305:[function(require,module,exports){ +},{"./v8.min.json":315}],315:[function(require,module,exports){ module.exports={"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_tile","source_geojson","source_video","source_image"],"source_tile":{"type":{"required":true,"type":"enum","values":["vector","raster"]},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":["geojson"]},"data":{"type":"*"},"maxzoom":{"type":"number","default":14},"buffer":{"type":"number","default":64},"tolerance":{"type":"number","default":3},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":400},"clusterMaxZoom":{"type":"number"}},"source_video":{"type":{"required":true,"type":"enum","values":["video"]},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":["image"]},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":["fill","line","symbol","circle","raster","background"]},"metadata":{"type":"*"},"ref":{"type":"string"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":22},"maxzoom":{"type":"number","minimum":0,"maximum":22},"interactive":{"type":"boolean","default":false},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"},"paint.*":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],"layout_background":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_fill":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_circle":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_line":{"line-cap":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["butt","round","square"],"default":"butt"},"line-join":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["bevel","round","miter"],"default":"miter"},"line-miter-limit":{"type":"number","default":2,"function":"interpolated","zoom-function":true,"property-function":true,"requires":[{"line-join":"miter"}]},"line-round-limit":{"type":"number","default":1.05,"function":"interpolated","zoom-function":true,"property-function":true,"requires":[{"line-join":"round"}]},"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_symbol":{"symbol-placement":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["point","line"],"default":"point"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"function":"interpolated","zoom-function":true,"property-function":true,"units":"pixels","requires":[{"symbol-placement":"line"}]},"symbol-avoid-edges":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false},"icon-allow-overlap":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image"]},"icon-ignore-placement":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image"]},"icon-optional":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image","text-field"]},"icon-rotation-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"viewport","requires":["icon-image"]},"icon-size":{"type":"number","default":1,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image"]},"icon-text-fit":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":false,"values":["none","both","width","height"],"default":"none","requires":["icon-image","text-field"]},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image","icon-text-fit","text-field"]},"icon-image":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"tokens":true},"icon-rotate":{"type":"number","default":0,"period":360,"function":"interpolated","zoom-function":true,"property-function":true,"units":"degrees","requires":["icon-image"]},"icon-padding":{"type":"number","default":2,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"units":"pixels","requires":["icon-image"]},"icon-keep-upright":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image"]},"text-pitch-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"requires":["text-field"]},"text-rotation-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"viewport","requires":["text-field"]},"text-field":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":"","tokens":true},"text-font":{"type":"array","value":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"]},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-line-height":{"type":"number","default":1.2,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-letter-spacing":{"type":"number","default":0,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-justify":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["left","center","right"],"default":"center","requires":["text-field"]},"text-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],"default":"center","requires":["text-field"]},"text-max-angle":{"type":"number","default":45,"units":"degrees","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field",{"symbol-placement":"line"}]},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-keep-upright":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["none","uppercase","lowercase"],"default":"none","requires":["text-field"]},"text-offset":{"type":"array","value":"number","units":"ems","function":"interpolated","zoom-function":true,"property-function":true,"length":2,"default":[0,0],"requires":["text-field"]},"text-allow-overlap":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field"]},"text-ignore-placement":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field"]},"text-optional":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field","icon-image"]},"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_raster":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"filter":{"type":"array","value":"*"},"filter_operator":{"type":"enum","values":["==","!=",">",">=","<","<=","in","!in","all","any","none","has","!has"]},"geometry_type":{"type":"enum","values":["Point","LineString","Polygon"]},"color_operation":{"type":"enum","values":["lighten","saturate","spin","fade","mix"]},"function":{"stops":{"type":"array","required":true,"value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":["exponential","interval","categorical"],"default":"exponential"}},"function_stop":{"type":"array","minimum":0,"maximum":22,"value":["number","color"],"length":2},"paint":["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],"paint_fill":{"fill-antialias":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":true},"fill-opacity":{"type":"number","function":"interpolated","zoom-function":true,"property-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"fill-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"fill-pattern"}]},"fill-outline-color":{"type":"color","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}]},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"fill-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["fill-translate"]},"fill-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"transition":true}},"paint_line":{"line-opacity":{"type":"number","function":"interpolated","zoom-function":true,"property-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"line-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"line-pattern"}]},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["line-translate"]},"line-width":{"type":"number","default":1,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-gap-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-offset":{"type":"number","default":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-dasharray":{"type":"array","value":"number","function":"piecewise-constant","zoom-function":true,"property-function":true,"minimum":0,"transition":true,"units":"line widths","requires":[{"!":"line-pattern"}]},"line-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"transition":true}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"circle-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-blur":{"type":"number","default":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"circle-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["circle-translate"]},"circle-pitch-scale":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-halo-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["icon-image","icon-translate"]},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-halo-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-halo-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["text-field","text-translate"]}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-hue-rotate":{"type":"number","default":0,"period":360,"function":"interpolated","zoom-function":true,"transition":true,"units":"degrees"},"raster-brightness-min":{"type":"number","function":"interpolated","zoom-function":true,"default":0,"minimum":0,"maximum":1,"transition":true},"raster-brightness-max":{"type":"number","function":"interpolated","zoom-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"function":"interpolated","zoom-function":true,"transition":true,"units":"milliseconds"}},"paint_background":{"background-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"transition":true,"requires":[{"!":"background-pattern"}]},"background-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"transition":true},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}}} -},{}],306:[function(require,module,exports){ +},{}],316:[function(require,module,exports){ 'use strict'; if (typeof module !== 'undefined' && module.exports) { @@ -52298,7 +55683,7 @@ function isWebGLSupported(failIfMajorPerformanceCaveat) { } } -},{}],307:[function(require,module,exports){ +},{}],317:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -52394,7 +55779,7 @@ ArrayGroup.prototype.getTransferables = function(transferables) { } }; -},{"../util/util":421}],308:[function(require,module,exports){ +},{"../util/util":431}],318:[function(require,module,exports){ 'use strict'; var featureFilter = require('feature-filter'); @@ -52912,7 +56297,7 @@ function createGetUniform(attribute, stopOffset) { }; } -},{"../util/struct_array":419,"../util/util":421,"./array_group":307,"./bucket/circle_bucket":309,"./bucket/fill_bucket":310,"./bucket/line_bucket":311,"./bucket/symbol_bucket":312,"./buffer_group":314,"assert":37,"feature-filter":114}],309:[function(require,module,exports){ +},{"../util/struct_array":429,"../util/util":431,"./array_group":317,"./bucket/circle_bucket":319,"./bucket/fill_bucket":320,"./bucket/line_bucket":321,"./bucket/symbol_bucket":322,"./buffer_group":324,"assert":39,"feature-filter":124}],319:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -53034,7 +56419,7 @@ CircleBucket.prototype.addFeature = function(feature) { this.populatePaintArrays('circle', globalProperties, feature.properties, startGroup, startIndex); }; -},{"../../util/util":421,"../bucket":308,"../load_geometry":316}],310:[function(require,module,exports){ +},{"../../util/util":431,"../bucket":318,"../load_geometry":326}],320:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -53145,7 +56530,7 @@ FillBucket.prototype.addPolygon = function(polygon) { } }; -},{"../../util/classify_rings":409,"../../util/util":421,"../bucket":308,"../load_geometry":316,"earcut":108}],311:[function(require,module,exports){ +},{"../../util/classify_rings":419,"../../util/util":431,"../bucket":318,"../load_geometry":326,"earcut":118}],321:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -53572,7 +56957,7 @@ LineBucket.prototype.addPieSliceVertex = function(currentVertex, distance, extru } }; -},{"../../util/util":421,"../bucket":308,"../load_geometry":316}],312:[function(require,module,exports){ +},{"../../util/util":431,"../bucket":318,"../load_geometry":326}],322:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -54218,7 +57603,7 @@ SymbolBucket.prototype.addSymbolQuad = function(symbolQuad) { symbolQuad.minScale); }; -},{"../../symbol/anchor":370,"../../symbol/clip_line":372,"../../symbol/collision_feature":374,"../../symbol/get_anchors":376,"../../symbol/mergelines":379,"../../symbol/quads":380,"../../symbol/resolve_text":381,"../../symbol/shaping":382,"../../util/token":420,"../../util/util":421,"../bucket":308,"../load_geometry":316,"point-geometry":462}],313:[function(require,module,exports){ +},{"../../symbol/anchor":380,"../../symbol/clip_line":382,"../../symbol/collision_feature":384,"../../symbol/get_anchors":386,"../../symbol/mergelines":389,"../../symbol/quads":390,"../../symbol/resolve_text":391,"../../symbol/shaping":392,"../../util/token":430,"../../util/util":431,"../bucket":318,"../load_geometry":326,"point-geometry":472}],323:[function(require,module,exports){ 'use strict'; module.exports = Buffer; @@ -54319,7 +57704,7 @@ Buffer.BufferType = { ELEMENT: 'ELEMENT_ARRAY_BUFFER' }; -},{}],314:[function(require,module,exports){ +},{}],324:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -54374,7 +57759,7 @@ BufferGroup.prototype.destroy = function(gl) { } }; -},{"../render/vertex_array_object":336,"../util/util":421,"./buffer":313}],315:[function(require,module,exports){ +},{"../render/vertex_array_object":346,"../util/util":431,"./buffer":323}],325:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -54673,7 +58058,7 @@ function offsetLine(rings, offset) { return newRings; } -},{"../util/dictionary_coder":411,"../util/intersection_tests":416,"../util/struct_array":419,"../util/util":421,"../util/vectortile_to_geojson":422,"./bucket":308,"./load_geometry":316,"feature-filter":114,"grid-index":268,"pbf":456,"point-geometry":462,"vector-tile":527}],316:[function(require,module,exports){ +},{"../util/dictionary_coder":421,"../util/intersection_tests":426,"../util/struct_array":429,"../util/util":431,"../util/vectortile_to_geojson":432,"./bucket":318,"./load_geometry":326,"feature-filter":124,"grid-index":278,"pbf":466,"point-geometry":472,"vector-tile":537}],326:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -54729,7 +58114,7 @@ module.exports = function loadGeometry(feature, bits) { return geometry; }; -},{"../util/util":421,"./bucket":308,"assert":37}],317:[function(require,module,exports){ +},{"../util/util":431,"./bucket":318,"assert":39}],327:[function(require,module,exports){ 'use strict'; module.exports = Coordinate; @@ -54808,7 +58193,7 @@ Coordinate.prototype = { } }; -},{}],318:[function(require,module,exports){ +},{}],328:[function(require,module,exports){ 'use strict'; module.exports = LngLat; @@ -54900,7 +58285,7 @@ LngLat.convert = function (input) { return input; }; -},{"../util/util":421}],319:[function(require,module,exports){ +},{"../util/util":431}],329:[function(require,module,exports){ 'use strict'; module.exports = LngLatBounds; @@ -55092,7 +58477,7 @@ LngLatBounds.convert = function (input) { return new LngLatBounds(input); }; -},{"./lng_lat":318}],320:[function(require,module,exports){ +},{"./lng_lat":328}],330:[function(require,module,exports){ 'use strict'; var LngLat = require('./lng_lat'), @@ -55566,7 +58951,7 @@ Transform.prototype = { } }; -},{"../data/bucket":308,"../source/tile_coord":348,"../util/interpolate":415,"../util/util":421,"./coordinate":317,"./lng_lat":318,"gl-matrix":174,"point-geometry":462}],321:[function(require,module,exports){ +},{"../data/bucket":318,"../source/tile_coord":358,"../util/interpolate":425,"../util/util":431,"./coordinate":327,"./lng_lat":328,"gl-matrix":184,"point-geometry":472}],331:[function(require,module,exports){ 'use strict'; // Font data From Hershey Simplex Font @@ -55699,7 +59084,7 @@ module.exports = function textVertices(text, left, baseline, scale) { return strokes; }; -},{}],322:[function(require,module,exports){ +},{}],332:[function(require,module,exports){ 'use strict'; // jshint -W079 @@ -55766,7 +59151,7 @@ Object.defineProperty(mapboxgl, 'accessToken', { * mapboxgl.supported() // = true */ -},{"../package.json":423,"./geo/lng_lat":318,"./geo/lng_lat_bounds":319,"./style/style":357,"./ui/control/attribution":388,"./ui/control/control":389,"./ui/control/geolocate":390,"./ui/control/navigation":391,"./ui/map":400,"./ui/marker":401,"./ui/popup":402,"./util/ajax":404,"./util/browser":405,"./util/config":410,"./util/evented":413,"./util/util":421,"point-geometry":462}],323:[function(require,module,exports){ +},{"../package.json":433,"./geo/lng_lat":328,"./geo/lng_lat_bounds":329,"./style/style":367,"./ui/control/attribution":398,"./ui/control/control":399,"./ui/control/geolocate":400,"./ui/control/navigation":401,"./ui/map":410,"./ui/marker":411,"./ui/popup":412,"./util/ajax":414,"./util/browser":415,"./util/config":420,"./util/evented":423,"./util/util":431,"point-geometry":472}],333:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -55786,7 +59171,7 @@ module.exports = function(uniforms) { return pragmas; }; -},{"assert":37}],324:[function(require,module,exports){ +},{"assert":39}],334:[function(require,module,exports){ 'use strict'; var pixelsToTileUnits = require('../source/pixels_to_tile_units'); @@ -55879,7 +59264,7 @@ function drawBackground(painter, source, layer) { gl.stencilFunc(gl.EQUAL, 0x80, 0x80); } -},{"../source/pixels_to_tile_units":342,"./create_uniform_pragmas":323}],325:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":352,"./create_uniform_pragmas":333}],335:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -55944,7 +59329,7 @@ function drawCircles(painter, source, layer, coords) { } } -},{"../util/browser":405}],326:[function(require,module,exports){ +},{"../util/browser":415}],336:[function(require,module,exports){ 'use strict'; module.exports = drawCollisionDebug; @@ -55979,7 +59364,7 @@ function drawCollisionDebug(painter, source, layer, coords) { } } -},{}],327:[function(require,module,exports){ +},{}],337:[function(require,module,exports){ 'use strict'; var textVertices = require('../lib/debugtext'); @@ -56040,7 +59425,7 @@ function drawDebugTile(painter, source, coord) { gl.drawArrays(gl.LINES, 0, debugTextBuffer.length); } -},{"../data/bucket":308,"../data/buffer":313,"../lib/debugtext":321,"../util/browser":405,"./vertex_array_object":336,"gl-matrix":174}],328:[function(require,module,exports){ +},{"../data/bucket":318,"../data/buffer":323,"../lib/debugtext":331,"../util/browser":415,"./vertex_array_object":346,"gl-matrix":184}],338:[function(require,module,exports){ 'use strict'; var pixelsToTileUnits = require('../source/pixels_to_tile_units'); @@ -56237,7 +59622,7 @@ function setPattern(image, opacity, tile, coord, painter, program) { painter.spriteAtlas.bind(gl, true); } -},{"../source/pixels_to_tile_units":342}],329:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":352}],339:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -56402,7 +59787,7 @@ module.exports = function drawLine(painter, source, layer, coords) { }; -},{"../source/pixels_to_tile_units":342,"../util/browser":405,"gl-matrix":174}],330:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":352,"../util/browser":415,"gl-matrix":184}],340:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -56548,7 +59933,7 @@ function getOpacities(tile, parentTile, layer, transform) { return opacity; } -},{"../util/struct_array":419,"../util/util":421}],331:[function(require,module,exports){ +},{"../util/struct_array":429,"../util/util":431}],341:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -56764,7 +60149,7 @@ function drawSymbol(painter, layer, posMatrix, tile, bucket, bufferGroups, isTex } } -},{"../source/pixels_to_tile_units":342,"../util/browser":405,"./draw_collision_debug":326}],332:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":352,"../util/browser":415,"./draw_collision_debug":336}],342:[function(require,module,exports){ 'use strict'; module.exports = FrameHistory; @@ -56836,7 +60221,7 @@ FrameHistory.prototype.bind = function(gl) { } }; -},{}],333:[function(require,module,exports){ +},{}],343:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -56983,7 +60368,7 @@ LineAtlas.prototype.bind = function(gl) { } }; -},{"../util/util":421}],334:[function(require,module,exports){ +},{"../util/util":431}],344:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -57327,7 +60712,7 @@ Painter.prototype.showOverdrawInspector = function(enabled) { } }; -},{"../data/bucket":308,"../data/buffer":313,"../source/pixels_to_tile_units":342,"../source/source_cache":346,"../util/browser":405,"../util/struct_array":419,"../util/util":421,"./create_uniform_pragmas":323,"./draw_background":324,"./draw_circle":325,"./draw_debug":327,"./draw_fill":328,"./draw_line":329,"./draw_raster":330,"./draw_symbol":331,"./frame_history":332,"./painter/use_program":335,"./vertex_array_object":336,"gl-matrix":174}],335:[function(require,module,exports){ +},{"../data/bucket":318,"../data/buffer":323,"../source/pixels_to_tile_units":352,"../source/source_cache":356,"../util/browser":415,"../util/struct_array":429,"../util/util":431,"./create_uniform_pragmas":333,"./draw_background":334,"./draw_circle":335,"./draw_debug":337,"./draw_fill":338,"./draw_line":339,"./draw_raster":340,"./draw_symbol":341,"./frame_history":342,"./painter/use_program":345,"./vertex_array_object":346,"gl-matrix":184}],345:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -57424,7 +60809,7 @@ function applyPragmas(source, pragmas) { }); } -},{"../../util/util":421,"assert":37,"mapbox-gl-shaders":282}],336:[function(require,module,exports){ +},{"../../util/util":431,"assert":39,"mapbox-gl-shaders":292}],346:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -57522,7 +60907,7 @@ VertexArrayObject.prototype.destroy = function(gl) { } }; -},{"assert":37}],337:[function(require,module,exports){ +},{"assert":39}],347:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -57746,7 +61131,7 @@ GeoJSONSource.prototype = util.inherit(Evented, /** @lends GeoJSONSource.prototy } }); -},{"../data/bucket":308,"../util/evented":413,"../util/util":421,"resolve-url":479}],338:[function(require,module,exports){ +},{"../data/bucket":318,"../util/evented":423,"../util/util":431,"resolve-url":489}],348:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -57884,7 +61269,7 @@ GeoJSONWorkerSource.prototype = util.inherit(VectorTileWorkerSource, /** @lends } }); -},{"../util/ajax":404,"../util/util":421,"./geojson_wrapper":339,"./vector_tile_worker_source":350,"geojson-rewind":120,"geojson-vt":124,"supercluster":506,"vt-pbf":533}],339:[function(require,module,exports){ +},{"../util/ajax":414,"../util/util":431,"./geojson_wrapper":349,"./vector_tile_worker_source":360,"geojson-rewind":130,"geojson-vt":134,"supercluster":516,"vt-pbf":543}],349:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -57960,7 +61345,7 @@ FeatureWrapper.prototype.bbox = function() { FeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON; -},{"../data/bucket":308,"point-geometry":462,"vector-tile":527}],340:[function(require,module,exports){ +},{"../data/bucket":318,"point-geometry":472,"vector-tile":537}],350:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58139,7 +61524,7 @@ ImageSource.prototype = util.inherit(Evented, /** @lends ImageSource.prototype * } }); -},{"../data/bucket":308,"../data/buffer":313,"../geo/lng_lat":318,"../render/draw_raster":330,"../render/vertex_array_object":336,"../util/ajax":404,"../util/evented":413,"../util/util":421,"./tile_coord":348,"point-geometry":462}],341:[function(require,module,exports){ +},{"../data/bucket":318,"../data/buffer":323,"../geo/lng_lat":328,"../render/draw_raster":340,"../render/vertex_array_object":346,"../util/ajax":414,"../util/evented":423,"../util/util":431,"./tile_coord":358,"point-geometry":472}],351:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); var ajax = require('../util/ajax'); @@ -58170,7 +61555,7 @@ module.exports = function(options, callback) { }; -},{"../util/ajax":404,"../util/browser":405,"../util/mapbox":418,"../util/util":421}],342:[function(require,module,exports){ +},{"../util/ajax":414,"../util/browser":415,"../util/mapbox":428,"../util/util":431}],352:[function(require,module,exports){ 'use strict'; var Bucket = require('../data/bucket'); @@ -58195,7 +61580,7 @@ module.exports = function(tile, pixelValue, z) { }; -},{"../data/bucket":308}],343:[function(require,module,exports){ +},{"../data/bucket":318}],353:[function(require,module,exports){ 'use strict'; var TileCoord = require('./tile_coord'); @@ -58266,7 +61651,7 @@ function mergeRenderedFeatureLayers(tiles) { } -},{"./tile_coord":348}],344:[function(require,module,exports){ +},{"./tile_coord":358}],354:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58363,7 +61748,7 @@ RasterTileSource.prototype = util.inherit(Evented, { } }); -},{"../util/ajax":404,"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./load_tilejson":341}],345:[function(require,module,exports){ +},{"../util/ajax":414,"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./load_tilejson":351}],355:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58534,7 +61919,7 @@ exports.setType = function (name, type) { * @instance */ -},{"../source/geojson_source":337,"../source/image_source":340,"../source/raster_tile_source":344,"../source/vector_tile_source":349,"../source/video_source":351,"../util/util":421}],346:[function(require,module,exports){ +},{"../source/geojson_source":347,"../source/image_source":350,"../source/raster_tile_source":354,"../source/vector_tile_source":359,"../source/video_source":361,"../util/util":431}],356:[function(require,module,exports){ 'use strict'; var Source = require('./source'); @@ -59072,7 +62457,7 @@ function compareKeyZoom(a, b) { return (a % 32) - (b % 32); } -},{"../data/bucket":308,"../geo/coordinate":317,"../util/evented":413,"../util/lru_cache":417,"../util/util":421,"./source":345,"./tile":347,"./tile_coord":348}],347:[function(require,module,exports){ +},{"../data/bucket":318,"../geo/coordinate":327,"../util/evented":423,"../util/lru_cache":427,"../util/util":431,"./source":355,"./tile":357,"./tile_coord":358}],357:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -59274,7 +62659,7 @@ function unserializeBuckets(input, style) { return output; } -},{"../data/bucket":308,"../data/feature_index":315,"../symbol/collision_box":373,"../symbol/collision_tile":375,"../symbol/symbol_instances":384,"../symbol/symbol_quads":385,"../util/util":421,"../util/vectortile_to_geojson":422,"feature-filter":114,"pbf":456,"vector-tile":527}],348:[function(require,module,exports){ +},{"../data/bucket":318,"../data/feature_index":325,"../symbol/collision_box":383,"../symbol/collision_tile":385,"../symbol/symbol_instances":394,"../symbol/symbol_quads":395,"../util/util":431,"../util/vectortile_to_geojson":432,"feature-filter":124,"pbf":466,"vector-tile":537}],358:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -59468,7 +62853,7 @@ TileCoord.cover = function(z, bounds, actualZ) { }); }; -},{"../geo/coordinate":317,"assert":37,"whoots-js":543}],349:[function(require,module,exports){ +},{"../geo/coordinate":327,"assert":39,"whoots-js":553}],359:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -59575,7 +62960,7 @@ VectorTileSource.prototype = util.inherit(Evented, { } }); -},{"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./load_tilejson":341}],350:[function(require,module,exports){ +},{"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./load_tilejson":351}],360:[function(require,module,exports){ 'use strict'; var ajax = require('../util/ajax'); var vt = require('vector-tile'); @@ -59723,7 +63108,7 @@ VectorTileWorkerSource.prototype = { } }; -},{"../util/ajax":404,"./worker_tile":353,"pbf":456,"vector-tile":527}],351:[function(require,module,exports){ +},{"../util/ajax":414,"./worker_tile":363,"pbf":466,"vector-tile":537}],361:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -59927,7 +63312,7 @@ VideoSource.prototype = util.inherit(Evented, /** @lends VideoSource.prototype * } }); -},{"../data/bucket":308,"../data/buffer":313,"../geo/lng_lat":318,"../render/draw_raster":330,"../render/vertex_array_object":336,"../util/ajax":404,"../util/evented":413,"../util/util":421,"./tile_coord":348,"point-geometry":462}],352:[function(require,module,exports){ +},{"../data/bucket":318,"../data/buffer":323,"../geo/lng_lat":328,"../render/draw_raster":340,"../render/vertex_array_object":346,"../util/ajax":414,"../util/evented":423,"../util/util":431,"./tile_coord":358,"point-geometry":472}],362:[function(require,module,exports){ 'use strict'; var Actor = require('../util/actor'); @@ -60091,7 +63476,7 @@ function createLayerFamilies(layers) { return families; } -},{"../style/style_layer":360,"../util/actor":403,"../util/util":421,"./geojson_worker_source":338,"./vector_tile_worker_source":350}],353:[function(require,module,exports){ +},{"../style/style_layer":370,"../util/actor":413,"../util/util":431,"./geojson_worker_source":348,"./vector_tile_worker_source":360}],363:[function(require,module,exports){ 'use strict'; var FeatureIndex = require('../data/feature_index'); @@ -60364,7 +63749,7 @@ function getLayerId(layer) { return layer.id; } -},{"../data/bucket":308,"../data/feature_index":315,"../symbol/collision_box":373,"../symbol/collision_tile":375,"../symbol/symbol_instances":384,"../symbol/symbol_quads":385,"../util/dictionary_coder":411,"../util/util":421}],354:[function(require,module,exports){ +},{"../data/bucket":318,"../data/feature_index":325,"../symbol/collision_box":383,"../symbol/collision_tile":385,"../symbol/symbol_instances":394,"../symbol/symbol_quads":395,"../util/dictionary_coder":421,"../util/util":431}],364:[function(require,module,exports){ 'use strict'; module.exports = AnimationLoop; @@ -60396,7 +63781,7 @@ AnimationLoop.prototype.cancel = function(n) { }); }; -},{}],355:[function(require,module,exports){ +},{}],365:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -60477,7 +63862,7 @@ ImageSprite.prototype.getSpritePosition = function(name) { return new SpritePosition(); }; -},{"../util/ajax":404,"../util/browser":405,"../util/evented":413,"../util/mapbox":418}],356:[function(require,module,exports){ +},{"../util/ajax":414,"../util/browser":415,"../util/evented":423,"../util/mapbox":428}],366:[function(require,module,exports){ 'use strict'; var parseColorString = require('csscolorparser').parseCSSColor; @@ -60519,7 +63904,7 @@ module.exports = function parseColor(input) { } }; -},{"../util/util":421,"./style_function":359,"csscolorparser":98}],357:[function(require,module,exports){ +},{"../util/util":431,"./style_function":369,"csscolorparser":100}],367:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -61300,7 +64685,7 @@ Style.prototype = util.inherit(Evented, { }); -},{"../render/line_atlas":333,"../source/query_features":343,"../source/source":345,"../source/source_cache":346,"../symbol/glyph_source":378,"../symbol/sprite_atlas":383,"../util/ajax":404,"../util/browser":405,"../util/dispatcher":412,"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./animation_loop":354,"./image_sprite":355,"./style_function":359,"./style_layer":360,"./style_spec":367,"./validate_style":369}],358:[function(require,module,exports){ +},{"../render/line_atlas":343,"../source/query_features":353,"../source/source":355,"../source/source_cache":356,"../symbol/glyph_source":388,"../symbol/sprite_atlas":393,"../util/ajax":414,"../util/browser":415,"../util/dispatcher":422,"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./animation_loop":364,"./image_sprite":365,"./style_function":369,"./style_layer":370,"./style_spec":377,"./validate_style":379}],368:[function(require,module,exports){ 'use strict'; var MapboxGLFunction = require('./style_function'); @@ -61384,7 +64769,7 @@ function transitioned(calculate) { }; } -},{"../util/util":421,"./parse_color":356,"./style_function":359}],359:[function(require,module,exports){ +},{"../util/util":431,"./parse_color":366,"./style_function":369}],369:[function(require,module,exports){ 'use strict'; var MapboxGLFunction = require('mapbox-gl-function'); @@ -61411,7 +64796,7 @@ exports['piecewise-constant'] = function(parameters) { exports.isFunctionDefinition = MapboxGLFunction.isFunctionDefinition; -},{"mapbox-gl-function":281}],360:[function(require,module,exports){ +},{"mapbox-gl-function":291}],370:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -61758,7 +65143,7 @@ function getDeclarationValue(declaration) { return declaration.value; } -},{"../util/evented":413,"../util/util":421,"./parse_color":356,"./style_declaration":358,"./style_layer/background_style_layer":361,"./style_layer/circle_style_layer":362,"./style_layer/fill_style_layer":363,"./style_layer/line_style_layer":364,"./style_layer/raster_style_layer":365,"./style_layer/symbol_style_layer":366,"./style_spec":367,"./style_transition":368,"./validate_style":369}],361:[function(require,module,exports){ +},{"../util/evented":423,"../util/util":431,"./parse_color":366,"./style_declaration":368,"./style_layer/background_style_layer":371,"./style_layer/circle_style_layer":372,"./style_layer/fill_style_layer":373,"./style_layer/line_style_layer":374,"./style_layer/raster_style_layer":375,"./style_layer/symbol_style_layer":376,"./style_spec":377,"./style_transition":378,"./validate_style":379}],371:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61772,7 +65157,7 @@ module.exports = BackgroundStyleLayer; BackgroundStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":421,"../style_layer":360}],362:[function(require,module,exports){ +},{"../../util/util":431,"../style_layer":370}],372:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61786,7 +65171,7 @@ module.exports = CircleStyleLayer; CircleStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":421,"../style_layer":360}],363:[function(require,module,exports){ +},{"../../util/util":431,"../style_layer":370}],373:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61842,7 +65227,7 @@ FillStyleLayer.prototype = util.inherit(StyleLayer, { module.exports = FillStyleLayer; -},{"../../util/util":421,"../style_layer":360}],364:[function(require,module,exports){ +},{"../../util/util":431,"../style_layer":370}],374:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61876,7 +65261,7 @@ LineStyleLayer.prototype = util.inherit(StyleLayer, { } }); -},{"../../util/util":421,"../style_layer":360}],365:[function(require,module,exports){ +},{"../../util/util":431,"../style_layer":370}],375:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61890,7 +65275,7 @@ module.exports = RasterStyleLayer; RasterStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":421,"../style_layer":360}],366:[function(require,module,exports){ +},{"../../util/util":431,"../style_layer":370}],376:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61933,12 +65318,12 @@ SymbolStyleLayer.prototype = util.inherit(StyleLayer, { }); -},{"../../util/util":421,"../style_layer":360}],367:[function(require,module,exports){ +},{"../../util/util":431,"../style_layer":370}],377:[function(require,module,exports){ 'use strict'; module.exports = require('mapbox-gl-style-spec/reference/latest.min'); -},{"mapbox-gl-style-spec/reference/latest.min":304}],368:[function(require,module,exports){ +},{"mapbox-gl-style-spec/reference/latest.min":314}],378:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -62023,7 +65408,7 @@ function interpZoomTransitioned(from, to, t) { } } -},{"../util/interpolate":415,"../util/util":421}],369:[function(require,module,exports){ +},{"../util/interpolate":425,"../util/util":431}],379:[function(require,module,exports){ 'use strict'; module.exports = require('mapbox-gl-style-spec/lib/validate_style.min'); @@ -62047,7 +65432,7 @@ module.exports.throwErrors = function throwErrors(emitter, errors) { } }; -},{"mapbox-gl-style-spec/lib/validate_style.min":303}],370:[function(require,module,exports){ +},{"mapbox-gl-style-spec/lib/validate_style.min":313}],380:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -62070,7 +65455,7 @@ Anchor.prototype.clone = function() { return new Anchor(this.x, this.y, this.angle, this.segment); }; -},{"point-geometry":462}],371:[function(require,module,exports){ +},{"point-geometry":472}],381:[function(require,module,exports){ 'use strict'; module.exports = checkMaxAngle; @@ -62150,7 +65535,7 @@ function checkMaxAngle(line, anchor, labelLength, windowSize, maxAngle) { return true; } -},{}],372:[function(require,module,exports){ +},{}],382:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -62224,7 +65609,7 @@ function clipLine(lines, x1, y1, x2, y2) { return clippedLines; } -},{"point-geometry":462}],373:[function(require,module,exports){ +},{"point-geometry":472}],383:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -62305,7 +65690,7 @@ util.extendAll(CollisionBoxArray.prototype.StructType.prototype, { } }); -},{"../util/struct_array":419,"../util/util":421,"point-geometry":462}],374:[function(require,module,exports){ +},{"../util/struct_array":429,"../util/util":431,"point-geometry":472}],384:[function(require,module,exports){ 'use strict'; module.exports = CollisionFeature; @@ -62439,7 +65824,7 @@ CollisionFeature.prototype._addLineCollisionBoxes = function(collisionBoxArray, return bboxes; }; -},{}],375:[function(require,module,exports){ +},{}],385:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -62740,7 +66125,7 @@ CollisionTile.prototype.insertCollisionFeature = function(collisionFeature, minP } }; -},{"../data/bucket":308,"grid-index":268,"point-geometry":462}],376:[function(require,module,exports){ +},{"../data/bucket":318,"grid-index":278,"point-geometry":472}],386:[function(require,module,exports){ 'use strict'; var interpolate = require('../util/interpolate'); @@ -62844,7 +66229,7 @@ function resample(line, offset, spacing, angleWindowSize, maxAngle, labelLength, return anchors; } -},{"../symbol/anchor":370,"../util/interpolate":415,"./check_max_angle":371}],377:[function(require,module,exports){ +},{"../symbol/anchor":380,"../util/interpolate":425,"./check_max_angle":381}],387:[function(require,module,exports){ 'use strict'; var ShelfPack = require('shelf-pack'); @@ -63013,7 +66398,7 @@ GlyphAtlas.prototype.updateTexture = function(gl) { } }; -},{"../util/util":421,"shelf-pack":492}],378:[function(require,module,exports){ +},{"../util/util":431,"shelf-pack":502}],388:[function(require,module,exports){ 'use strict'; var normalizeURL = require('../util/mapbox').normalizeGlyphsURL; @@ -63154,7 +66539,7 @@ function glyphUrl(fontstack, range, url, subdomains) { .replace('{range}', range); } -},{"../symbol/glyph_atlas":377,"../util/ajax":404,"../util/glyphs":414,"../util/mapbox":418,"pbf":456}],379:[function(require,module,exports){ +},{"../symbol/glyph_atlas":387,"../util/ajax":414,"../util/glyphs":424,"../util/mapbox":428,"pbf":466}],389:[function(require,module,exports){ 'use strict'; module.exports = function (features, textFeatures, geometries) { @@ -63245,7 +66630,7 @@ module.exports = function (features, textFeatures, geometries) { }; }; -},{}],380:[function(require,module,exports){ +},{}],390:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -63528,7 +66913,7 @@ function getSegmentGlyphs(glyphs, anchor, offset, line, segment, forward) { return placementScale; } -},{"point-geometry":462}],381:[function(require,module,exports){ +},{"point-geometry":472}],391:[function(require,module,exports){ 'use strict'; var resolveTokens = require('../util/token'); @@ -63571,7 +66956,7 @@ function resolveText(features, layoutProperties, codepoints) { return textFeatures; } -},{"../util/token":420}],382:[function(require,module,exports){ +},{"../util/token":430}],392:[function(require,module,exports){ 'use strict'; module.exports = { @@ -63752,7 +67137,7 @@ function PositionedIcon(image, top, bottom, left, right) { this.right = right; } -},{}],383:[function(require,module,exports){ +},{}],393:[function(require,module,exports){ 'use strict'; var ShelfPack = require('shelf-pack'); @@ -63985,7 +67370,7 @@ function AtlasImage(rect, width, height, sdf, pixelRatio) { this.pixelRatio = pixelRatio; } -},{"../util/browser":405,"../util/util":421,"shelf-pack":492}],384:[function(require,module,exports){ +},{"../util/browser":415,"../util/util":431,"shelf-pack":502}],394:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -64030,7 +67415,7 @@ util.extendAll(SymbolInstancesArray.prototype.StructType.prototype, { -},{"../util/struct_array":419,"../util/util":421,"point-geometry":462}],385:[function(require,module,exports){ +},{"../util/struct_array":429,"../util/util":431,"point-geometry":472}],395:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -64104,7 +67489,7 @@ util.extendAll(SymbolQuadsArray.prototype.StructType.prototype, { }); -},{"../util/struct_array":419,"../util/util":421,"./quads":380,"point-geometry":462}],386:[function(require,module,exports){ +},{"../util/struct_array":429,"../util/util":431,"./quads":390,"point-geometry":472}],396:[function(require,module,exports){ 'use strict'; var DOM = require('../util/dom'); @@ -64279,7 +67664,7 @@ module.exports = function bindHandlers(map, options) { * property. */ -},{"../util/dom":407,"./handler/box_zoom":392,"./handler/dblclick_zoom":393,"./handler/drag_pan":394,"./handler/drag_rotate":395,"./handler/keyboard":396,"./handler/scroll_zoom":397,"./handler/touch_zoom_rotate":398,"point-geometry":462}],387:[function(require,module,exports){ +},{"../util/dom":417,"./handler/box_zoom":402,"./handler/dblclick_zoom":403,"./handler/drag_pan":404,"./handler/drag_rotate":405,"./handler/keyboard":406,"./handler/scroll_zoom":407,"./handler/touch_zoom_rotate":408,"point-geometry":472}],397:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -65066,7 +68451,7 @@ util.extend(Camera.prototype, /** @lends Map.prototype */{ * @property {MapEventData} data */ -},{"../geo/lng_lat":318,"../geo/lng_lat_bounds":319,"../util/browser":405,"../util/interpolate":415,"../util/util":421,"point-geometry":462}],388:[function(require,module,exports){ +},{"../geo/lng_lat":328,"../geo/lng_lat_bounds":329,"../util/browser":415,"../util/interpolate":425,"../util/util":431,"point-geometry":472}],398:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -65149,7 +68534,7 @@ Attribution.prototype = util.inherit(Control, { } }); -},{"../../util/dom":407,"../../util/util":421,"./control":389}],389:[function(require,module,exports){ +},{"../../util/dom":417,"../../util/util":431,"./control":399}],399:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65204,7 +68589,7 @@ Control.prototype = { util.extend(Control.prototype, Evented); -},{"../../util/evented":413,"../../util/util":421}],390:[function(require,module,exports){ +},{"../../util/evented":423,"../../util/util":431}],400:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -65306,7 +68691,7 @@ Geolocate.prototype = util.inherit(Control, { * */ -},{"../../util/browser":405,"../../util/dom":407,"../../util/util":421,"./control":389}],391:[function(require,module,exports){ +},{"../../util/browser":415,"../../util/dom":417,"../../util/util":431,"./control":399}],401:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -65427,7 +68812,7 @@ function copyMouseEvent(e) { }); } -},{"../../util/dom":407,"../../util/util":421,"./control":389}],392:[function(require,module,exports){ +},{"../../util/dom":417,"../../util/util":431,"./control":399}],402:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -65614,7 +68999,7 @@ BoxZoomHandler.prototype = { * @property {MapBoxZoomEvent} data */ -},{"../../geo/lng_lat_bounds":319,"../../util/dom":407,"../../util/util":421}],393:[function(require,module,exports){ +},{"../../geo/lng_lat_bounds":329,"../../util/dom":417,"../../util/util":431}],403:[function(require,module,exports){ 'use strict'; module.exports = DoubleClickZoomHandler; @@ -65677,7 +69062,7 @@ DoubleClickZoomHandler.prototype = { } }; -},{}],394:[function(require,module,exports){ +},{}],404:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -65913,7 +69298,7 @@ DragPanHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/dom":407,"../../util/util":421}],395:[function(require,module,exports){ +},{"../../util/dom":417,"../../util/util":431}],405:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -66167,7 +69552,7 @@ DragRotateHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/dom":407,"../../util/util":421,"point-geometry":462}],396:[function(require,module,exports){ +},{"../../util/dom":417,"../../util/util":431,"point-geometry":472}],406:[function(require,module,exports){ 'use strict'; module.exports = KeyboardHandler; @@ -66299,7 +69684,7 @@ KeyboardHandler.prototype = { } }; -},{}],397:[function(require,module,exports){ +},{}],407:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -66482,7 +69867,7 @@ ScrollZoomHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/browser":405,"../../util/dom":407,"../../util/util":421}],398:[function(require,module,exports){ +},{"../../util/browser":415,"../../util/dom":417,"../../util/util":431}],408:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -66697,7 +70082,7 @@ TouchZoomRotateHandler.prototype = { } }; -},{"../../util/dom":407,"../../util/util":421}],399:[function(require,module,exports){ +},{"../../util/dom":417,"../../util/util":431}],409:[function(require,module,exports){ 'use strict'; /* @@ -66772,7 +70157,7 @@ Hash.prototype = { } }; -},{"../util/util":421}],400:[function(require,module,exports){ +},{"../util/util":431}],410:[function(require,module,exports){ 'use strict'; var Canvas = require('../util/canvas'); @@ -68212,7 +71597,7 @@ function removeNode(node) { * @property {{error: {message: string}}} data */ -},{"../geo/lng_lat":318,"../geo/lng_lat_bounds":319,"../geo/transform":320,"../render/painter":334,"../style/animation_loop":354,"../style/style":357,"../util/browser":405,"../util/canvas":406,"../util/dom":407,"../util/evented":413,"../util/util":421,"./bind_handlers":386,"./camera":387,"./control/attribution":388,"./hash":399,"point-geometry":462}],401:[function(require,module,exports){ +},{"../geo/lng_lat":328,"../geo/lng_lat_bounds":329,"../geo/transform":330,"../render/painter":344,"../style/animation_loop":364,"../style/style":367,"../util/browser":415,"../util/canvas":416,"../util/dom":417,"../util/evented":423,"../util/util":431,"./bind_handlers":396,"./camera":397,"./control/attribution":398,"./hash":409,"point-geometry":472}],411:[function(require,module,exports){ /* eslint-disable */ 'use strict'; @@ -68307,7 +71692,7 @@ Marker.prototype = { } }; -},{"../geo/lng_lat":318,"../util/dom":407,"point-geometry":462}],402:[function(require,module,exports){ +},{"../geo/lng_lat":328,"../util/dom":417,"point-geometry":472}],412:[function(require,module,exports){ 'use strict'; module.exports = Popup; @@ -68561,7 +71946,7 @@ Popup.prototype = util.inherit(Evented, /** @lends Popup.prototype */{ } }); -},{"../geo/lng_lat":318,"../util/dom":407,"../util/evented":413,"../util/util":421}],403:[function(require,module,exports){ +},{"../geo/lng_lat":328,"../util/dom":417,"../util/evented":423,"../util/util":431}],413:[function(require,module,exports){ 'use strict'; module.exports = Actor; @@ -68633,7 +72018,7 @@ Actor.prototype.postMessage = function(message, transferList) { this.target.postMessage(message, transferList); }; -},{}],404:[function(require,module,exports){ +},{}],414:[function(require,module,exports){ 'use strict'; exports.getJSON = function(url, callback) { @@ -68723,7 +72108,7 @@ exports.getVideo = function(urls, callback) { return video; }; -},{}],405:[function(require,module,exports){ +},{}],415:[function(require,module,exports){ 'use strict'; /** @@ -68818,7 +72203,7 @@ webpImgTest.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ// exports.supportsGeolocation = !!navigator.geolocation; -},{"mapbox-gl-supported":306}],406:[function(require,module,exports){ +},{"mapbox-gl-supported":316}],416:[function(require,module,exports){ 'use strict'; var util = require('../util'); @@ -68862,7 +72247,7 @@ Canvas.prototype.getElement = function() { return this.canvas; }; -},{"../util":421,"mapbox-gl-supported":306}],407:[function(require,module,exports){ +},{"../util":431,"mapbox-gl-supported":316}],417:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -68937,7 +72322,7 @@ exports.touchPos = function (el, e) { return points; }; -},{"point-geometry":462}],408:[function(require,module,exports){ +},{"point-geometry":472}],418:[function(require,module,exports){ 'use strict'; var WebWorkify = require('webworkify'); @@ -68945,7 +72330,7 @@ module.exports = function () { return new WebWorkify(require('../../source/worker')); }; -},{"../../source/worker":352,"webworkify":541}],409:[function(require,module,exports){ +},{"../../source/worker":362,"webworkify":551}],419:[function(require,module,exports){ 'use strict'; var quickselect = require('quickselect'); @@ -69005,7 +72390,7 @@ function calculateSignedArea(ring) { return sum; } -},{"quickselect":471}],410:[function(require,module,exports){ +},{"quickselect":481}],420:[function(require,module,exports){ 'use strict'; module.exports = { @@ -69013,7 +72398,7 @@ module.exports = { REQUIRE_ACCESS_TOKEN: true }; -},{}],411:[function(require,module,exports){ +},{}],421:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -69040,7 +72425,7 @@ DictionaryCoder.prototype.decode = function(n) { return this._numberToString[n]; }; -},{"assert":37}],412:[function(require,module,exports){ +},{"assert":39}],422:[function(require,module,exports){ 'use strict'; var util = require('./util'); @@ -69115,7 +72500,7 @@ Dispatcher.prototype = { } }; -},{"./actor":403,"./util":421,"./web_worker":408}],413:[function(require,module,exports){ +},{"./actor":413,"./util":431,"./web_worker":418}],423:[function(require,module,exports){ 'use strict'; var util = require('./util'); @@ -69238,7 +72623,7 @@ var Evented = { module.exports = Evented; -},{"./util":421}],414:[function(require,module,exports){ +},{"./util":431}],424:[function(require,module,exports){ 'use strict'; module.exports = Glyphs; @@ -69273,7 +72658,7 @@ function readGlyph(tag, glyph, pbf) { else if (tag === 7) glyph.advance = pbf.readVarint(); } -},{}],415:[function(require,module,exports){ +},{}],425:[function(require,module,exports){ 'use strict'; module.exports = interpolate; @@ -69314,7 +72699,7 @@ interpolate.array = function(from, to, t) { }); }; -},{}],416:[function(require,module,exports){ +},{}],426:[function(require,module,exports){ 'use strict'; module.exports = { @@ -69480,7 +72865,7 @@ function polygonContainsPoint(ring, p) { return c; } -},{}],417:[function(require,module,exports){ +},{}],427:[function(require,module,exports){ 'use strict'; module.exports = LRUCache; @@ -69605,7 +72990,7 @@ LRUCache.prototype.setMaxSize = function(max) { return this; }; -},{}],418:[function(require,module,exports){ +},{}],428:[function(require,module,exports){ 'use strict'; var config = require('./config'); @@ -69733,7 +73118,7 @@ function replaceTempAccessToken(query) { } } -},{"./browser":405,"./config":410,"./util":421,"url":522}],419:[function(require,module,exports){ +},{"./browser":415,"./config":420,"./util":431,"url":532}],429:[function(require,module,exports){ 'use strict'; // Note: all "sizes" are measured in bytes @@ -70081,7 +73466,7 @@ StructArray.prototype.toArray = function(startIndex, endIndex) { return array; }; -},{"assert":37}],420:[function(require,module,exports){ +},{"assert":39}],430:[function(require,module,exports){ 'use strict'; module.exports = resolveTokens; @@ -70100,7 +73485,7 @@ function resolveTokens(properties, text) { }); } -},{}],421:[function(require,module,exports){ +},{}],431:[function(require,module,exports){ 'use strict'; var UnitBezier = require('unitbezier'); @@ -70559,7 +73944,7 @@ exports.warnOnce = function(message) { } }; -},{"../geo/coordinate":317,"unitbezier":521}],422:[function(require,module,exports){ +},{"../geo/coordinate":327,"unitbezier":531}],432:[function(require,module,exports){ 'use strict'; module.exports = Feature; @@ -70604,7 +73989,7 @@ Feature.prototype = { } }; -},{}],423:[function(require,module,exports){ +},{}],433:[function(require,module,exports){ module.exports={ "_args": [ [ @@ -70617,7 +74002,7 @@ module.exports={ "spec": ">=0.22.0 <0.23.0", "type": "range" }, - "/home/etienne/Documents/plotly/plotly.js" + "/Users/robert/repos/plotly/plotly.js" ] ], "_from": "mapbox-gl@>=0.22.0 <0.23.0", @@ -70651,7 +74036,7 @@ module.exports={ "_shasum": "92a965547d4c2f24c22cbc487eeda48694cb627a", "_shrinkwrap": null, "_spec": "mapbox-gl@^0.22.0", - "_where": "/home/etienne/Documents/plotly/plotly.js", + "_where": "/Users/robert/repos/plotly/plotly.js", "browser": { "./js/util/ajax.js": "./js/util/browser/ajax.js", "./js/util/browser.js": "./js/util/browser/browser.js", @@ -70944,7 +74329,7 @@ module.exports={ "version": "0.22.1" } -},{}],424:[function(require,module,exports){ +},{}],434:[function(require,module,exports){ 'use strict' module.exports = createTable @@ -71010,7 +74395,7 @@ function createTable(dimension) { } return result } -},{"convex-hull":93}],425:[function(require,module,exports){ +},{"convex-hull":95}],435:[function(require,module,exports){ /*jshint unused:true*/ /* Input: matrix ; a 4x4 matrix @@ -71190,7 +74575,7 @@ function combine(out, a, b, scale1, scale2) { out[1] = a[1] * scale1 + b[1] * scale2 out[2] = a[2] * scale1 + b[2] * scale2 } -},{"./normalize":426,"gl-mat4/clone":156,"gl-mat4/create":157,"gl-mat4/determinant":158,"gl-mat4/invert":162,"gl-mat4/transpose":172,"gl-vec3/cross":253,"gl-vec3/dot":254,"gl-vec3/length":255,"gl-vec3/normalize":257}],426:[function(require,module,exports){ +},{"./normalize":436,"gl-mat4/clone":166,"gl-mat4/create":167,"gl-mat4/determinant":168,"gl-mat4/invert":172,"gl-mat4/transpose":182,"gl-vec3/cross":263,"gl-vec3/dot":264,"gl-vec3/length":265,"gl-vec3/normalize":267}],436:[function(require,module,exports){ module.exports = function normalize(out, mat) { var m44 = mat[15] // Cannot normalize. @@ -71201,7 +74586,7 @@ module.exports = function normalize(out, mat) { out[i] = mat[i] * scale return true } -},{}],427:[function(require,module,exports){ +},{}],437:[function(require,module,exports){ var lerp = require('gl-vec3/lerp') var recompose = require('mat4-recompose') @@ -71254,7 +74639,7 @@ function vec3(n) { function vec4() { return [0,0,0,1] } -},{"gl-mat4/determinant":158,"gl-vec3/lerp":256,"mat4-decompose":425,"mat4-recompose":428,"quat-slerp":467}],428:[function(require,module,exports){ +},{"gl-mat4/determinant":168,"gl-vec3/lerp":266,"mat4-decompose":435,"mat4-recompose":438,"quat-slerp":477}],438:[function(require,module,exports){ /* Input: translation ; a 3 component vector scale ; a 3 component vector @@ -71315,206 +74700,207 @@ module.exports = function recomposeMat4(matrix, translation, scale, skew, perspe mat4.scale(matrix, matrix, scale) return matrix } -},{"gl-mat4/create":157,"gl-mat4/fromRotationTranslation":160,"gl-mat4/identity":161,"gl-mat4/multiply":164,"gl-mat4/scale":170,"gl-mat4/translate":171}],429:[function(require,module,exports){ -'use strict' - -var bsearch = require('binary-search-bounds') -var m4interp = require('mat4-interpolate') -var invert44 = require('gl-mat4/invert') -var rotateX = require('gl-mat4/rotateX') -var rotateY = require('gl-mat4/rotateY') -var rotateZ = require('gl-mat4/rotateZ') -var lookAt = require('gl-mat4/lookAt') -var translate = require('gl-mat4/translate') -var scale = require('gl-mat4/scale') -var normalize = require('gl-vec3/normalize') - -var DEFAULT_CENTER = [0,0,0] - -module.exports = createMatrixCameraController - -function MatrixCameraController(initialMatrix) { - this._components = initialMatrix.slice() - this._time = [0] - this.prevMatrix = initialMatrix.slice() - this.nextMatrix = initialMatrix.slice() - this.computedMatrix = initialMatrix.slice() - this.computedInverse = initialMatrix.slice() - this.computedEye = [0,0,0] - this.computedUp = [0,0,0] - this.computedCenter = [0,0,0] - this.computedRadius = [0] - this._limits = [-Infinity, Infinity] -} - -var proto = MatrixCameraController.prototype - -proto.recalcMatrix = function(t) { - var time = this._time - var tidx = bsearch.le(time, t) - var mat = this.computedMatrix - if(tidx < 0) { - return - } - var comps = this._components - if(tidx === time.length-1) { - var ptr = 16*tidx - for(var i=0; i<16; ++i) { - mat[i] = comps[ptr++] - } - } else { - var dt = (time[tidx+1] - time[tidx]) - var ptr = 16*tidx - var prev = this.prevMatrix - var allEqual = true - for(var i=0; i<16; ++i) { - prev[i] = comps[ptr++] - } - var next = this.nextMatrix - for(var i=0; i<16; ++i) { - next[i] = comps[ptr++] - allEqual = allEqual && (prev[i] === next[i]) - } - if(dt < 1e-6 || allEqual) { - for(var i=0; i<16; ++i) { - mat[i] = prev[i] - } - } else { - m4interp(mat, prev, next, (t - time[tidx])/dt) - } - } - - var up = this.computedUp - up[0] = mat[1] - up[1] = mat[5] - up[2] = mat[6] - normalize(up, up) - - var imat = this.computedInverse - invert44(imat, mat) - var eye = this.computedEye - var w = imat[15] - eye[0] = imat[12]/w - eye[1] = imat[13]/w - eye[2] = imat[14]/w - - var center = this.computedCenter - var radius = Math.exp(this.computedRadius[0]) - for(var i=0; i<3; ++i) { - center[i] = eye[i] - mat[2+4*i] * radius - } -} - -proto.idle = function(t) { - if(t < this.lastT()) { - return - } - var mc = this._components - var ptr = mc.length-16 - for(var i=0; i<16; ++i) { - mc.push(mc[ptr++]) - } - this._time.push(t) -} - -proto.flush = function(t) { - var idx = bsearch.gt(this._time, t) - 2 - if(idx < 0) { - return - } - this._time.slice(0, idx) - this._components.slice(0, 16*idx) -} - -proto.lastT = function() { - return this._time[this._time.length-1] -} - -proto.lookAt = function(t, eye, center, up) { - this.recalcMatrix(t) - eye = eye || this.computedEye - center = center || DEFAULT_CENTER - up = up || this.computedUp - this.setMatrix(t, lookAt(this.computedMatrix, eye, center, up)) - var d2 = 0.0 - for(var i=0; i<3; ++i) { - d2 += Math.pow(center[i] - eye[i], 2) - } - d2 = Math.log(Math.sqrt(d2)) - this.computedRadius[0] = d2 -} - -proto.rotate = function(t, yaw, pitch, roll) { - this.recalcMatrix(t) - var mat = this.computedInverse - if(yaw) rotateY(mat, mat, yaw) - if(pitch) rotateX(mat, mat, pitch) - if(roll) rotateZ(mat, mat, roll) - this.setMatrix(t, invert44(this.computedMatrix, mat)) -} - -var tvec = [0,0,0] - -proto.pan = function(t, dx, dy, dz) { - tvec[0] = -(dx || 0.0) - tvec[1] = -(dy || 0.0) - tvec[2] = -(dz || 0.0) - this.recalcMatrix(t) - var mat = this.computedInverse - translate(mat, mat, tvec) - this.setMatrix(t, invert44(mat, mat)) -} - -proto.translate = function(t, dx, dy, dz) { - tvec[0] = dx || 0.0 - tvec[1] = dy || 0.0 - tvec[2] = dz || 0.0 - this.recalcMatrix(t) - var mat = this.computedMatrix - translate(mat, mat, tvec) - this.setMatrix(t, mat) -} - -proto.setMatrix = function(t, mat) { - if(t < this.lastT()) { - return - } - this._time.push(t) - for(var i=0; i<16; ++i) { - this._components.push(mat[i]) - } -} - -proto.setDistance = function(t, d) { - this.computedRadius[0] = d -} - -proto.setDistanceLimits = function(a,b) { - var lim = this._limits - lim[0] = a - lim[1] = b -} - -proto.getDistanceLimits = function(out) { - var lim = this._limits - if(out) { - out[0] = lim[0] - out[1] = lim[1] - return out - } - return lim -} +},{"gl-mat4/create":167,"gl-mat4/fromRotationTranslation":170,"gl-mat4/identity":171,"gl-mat4/multiply":174,"gl-mat4/scale":180,"gl-mat4/translate":181}],439:[function(require,module,exports){ +'use strict' + +var bsearch = require('binary-search-bounds') +var m4interp = require('mat4-interpolate') +var invert44 = require('gl-mat4/invert') +var rotateX = require('gl-mat4/rotateX') +var rotateY = require('gl-mat4/rotateY') +var rotateZ = require('gl-mat4/rotateZ') +var lookAt = require('gl-mat4/lookAt') +var translate = require('gl-mat4/translate') +var scale = require('gl-mat4/scale') +var normalize = require('gl-vec3/normalize') + +var DEFAULT_CENTER = [0,0,0] + +module.exports = createMatrixCameraController + +function MatrixCameraController(initialMatrix) { + this._components = initialMatrix.slice() + this._time = [0] + this.prevMatrix = initialMatrix.slice() + this.nextMatrix = initialMatrix.slice() + this.computedMatrix = initialMatrix.slice() + this.computedInverse = initialMatrix.slice() + this.computedEye = [0,0,0] + this.computedUp = [0,0,0] + this.computedCenter = [0,0,0] + this.computedRadius = [0] + this._limits = [-Infinity, Infinity] +} + +var proto = MatrixCameraController.prototype + +proto.recalcMatrix = function(t) { + var time = this._time + var tidx = bsearch.le(time, t) + var mat = this.computedMatrix + if(tidx < 0) { + return + } + var comps = this._components + if(tidx === time.length-1) { + var ptr = 16*tidx + for(var i=0; i<16; ++i) { + mat[i] = comps[ptr++] + } + } else { + var dt = (time[tidx+1] - time[tidx]) + var ptr = 16*tidx + var prev = this.prevMatrix + var allEqual = true + for(var i=0; i<16; ++i) { + prev[i] = comps[ptr++] + } + var next = this.nextMatrix + for(var i=0; i<16; ++i) { + next[i] = comps[ptr++] + allEqual = allEqual && (prev[i] === next[i]) + } + if(dt < 1e-6 || allEqual) { + for(var i=0; i<16; ++i) { + mat[i] = prev[i] + } + } else { + m4interp(mat, prev, next, (t - time[tidx])/dt) + } + } + + var up = this.computedUp + up[0] = mat[1] + up[1] = mat[5] + up[2] = mat[9] + normalize(up, up) + + var imat = this.computedInverse + invert44(imat, mat) + var eye = this.computedEye + var w = imat[15] + eye[0] = imat[12]/w + eye[1] = imat[13]/w + eye[2] = imat[14]/w + + var center = this.computedCenter + var radius = Math.exp(this.computedRadius[0]) + for(var i=0; i<3; ++i) { + center[i] = eye[i] - mat[2+4*i] * radius + } +} + +proto.idle = function(t) { + if(t < this.lastT()) { + return + } + var mc = this._components + var ptr = mc.length-16 + for(var i=0; i<16; ++i) { + mc.push(mc[ptr++]) + } + this._time.push(t) +} + +proto.flush = function(t) { + var idx = bsearch.gt(this._time, t) - 2 + if(idx < 0) { + return + } + this._time.splice(0, idx) + this._components.splice(0, 16*idx) +} + +proto.lastT = function() { + return this._time[this._time.length-1] +} + +proto.lookAt = function(t, eye, center, up) { + this.recalcMatrix(t) + eye = eye || this.computedEye + center = center || DEFAULT_CENTER + up = up || this.computedUp + this.setMatrix(t, lookAt(this.computedMatrix, eye, center, up)) + var d2 = 0.0 + for(var i=0; i<3; ++i) { + d2 += Math.pow(center[i] - eye[i], 2) + } + d2 = Math.log(Math.sqrt(d2)) + this.computedRadius[0] = d2 +} + +proto.rotate = function(t, yaw, pitch, roll) { + this.recalcMatrix(t) + var mat = this.computedInverse + if(yaw) rotateY(mat, mat, yaw) + if(pitch) rotateX(mat, mat, pitch) + if(roll) rotateZ(mat, mat, roll) + this.setMatrix(t, invert44(this.computedMatrix, mat)) +} + +var tvec = [0,0,0] + +proto.pan = function(t, dx, dy, dz) { + tvec[0] = -(dx || 0.0) + tvec[1] = -(dy || 0.0) + tvec[2] = -(dz || 0.0) + this.recalcMatrix(t) + var mat = this.computedInverse + translate(mat, mat, tvec) + this.setMatrix(t, invert44(mat, mat)) +} + +proto.translate = function(t, dx, dy, dz) { + tvec[0] = dx || 0.0 + tvec[1] = dy || 0.0 + tvec[2] = dz || 0.0 + this.recalcMatrix(t) + var mat = this.computedMatrix + translate(mat, mat, tvec) + this.setMatrix(t, mat) +} + +proto.setMatrix = function(t, mat) { + if(t < this.lastT()) { + return + } + this._time.push(t) + for(var i=0; i<16; ++i) { + this._components.push(mat[i]) + } +} + +proto.setDistance = function(t, d) { + this.computedRadius[0] = d +} + +proto.setDistanceLimits = function(a,b) { + var lim = this._limits + lim[0] = a + lim[1] = b +} + +proto.getDistanceLimits = function(out) { + var lim = this._limits + if(out) { + out[0] = lim[0] + out[1] = lim[1] + return out + } + return lim +} + +function createMatrixCameraController(options) { + options = options || {} + var matrix = options.matrix || + [1,0,0,0, + 0,1,0,0, + 0,0,1,0, + 0,0,0,1] + return new MatrixCameraController(matrix) +} -function createMatrixCameraController(options) { - options = options || {} - var matrix = options.matrix || - [1,0,0,0, - 0,1,0,0, - 0,0,1,0, - 0,0,0,1] - return new MatrixCameraController(matrix) -} -},{"binary-search-bounds":56,"gl-mat4/invert":162,"gl-mat4/lookAt":163,"gl-mat4/rotateX":167,"gl-mat4/rotateY":168,"gl-mat4/rotateZ":169,"gl-mat4/scale":170,"gl-mat4/translate":171,"gl-vec3/normalize":257,"mat4-interpolate":427}],430:[function(require,module,exports){ +},{"binary-search-bounds":58,"gl-mat4/invert":172,"gl-mat4/lookAt":173,"gl-mat4/rotateX":177,"gl-mat4/rotateY":178,"gl-mat4/rotateZ":179,"gl-mat4/scale":180,"gl-mat4/translate":181,"gl-vec3/normalize":267,"mat4-interpolate":437}],440:[function(require,module,exports){ 'use strict' module.exports = monotoneConvexHull2D @@ -71596,7 +74982,7 @@ function monotoneConvexHull2D(points) { //Return result return result } -},{"robust-orientation":486}],431:[function(require,module,exports){ +},{"robust-orientation":496}],441:[function(require,module,exports){ 'use strict' module.exports = mouseListen @@ -71803,7 +75189,7 @@ function mouseListen (element, callback) { return result } -},{"mouse-event":433}],432:[function(require,module,exports){ +},{"mouse-event":443}],442:[function(require,module,exports){ var rootPosition = { left: 0, top: 0 } module.exports = mouseEventOffset @@ -71830,7 +75216,7 @@ function getBoundingClientOffset (element) { } } -},{}],433:[function(require,module,exports){ +},{}],443:[function(require,module,exports){ 'use strict' function mouseButtons(ev) { @@ -71892,7 +75278,7 @@ function mouseRelativeY(ev) { } exports.y = mouseRelativeY -},{}],434:[function(require,module,exports){ +},{}],444:[function(require,module,exports){ 'use strict' var toPX = require('to-px') @@ -71934,7 +75320,7 @@ function mouseWheelListen(element, callback, noScroll) { return listener } -},{"to-px":512}],435:[function(require,module,exports){ +},{"to-px":522}],445:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -72350,7 +75736,7 @@ function createSurfaceExtractor(args) { order, typesig) } -},{"typedarray-pool":518}],436:[function(require,module,exports){ +},{"typedarray-pool":528}],446:[function(require,module,exports){ "use strict" @@ -72362,7 +75748,7 @@ module.exports = function(array, f) { return array } -},{"cwise/lib/wrapper":103}],437:[function(require,module,exports){ +},{"cwise/lib/wrapper":105}],447:[function(require,module,exports){ 'use strict' module.exports = gradient @@ -72660,7 +76046,7 @@ function gradient(out, inp, bc) { var cached = generateGradient(bc) return cached(out, inp) } -},{"cwise-compiler":100,"dup":107}],438:[function(require,module,exports){ +},{"cwise-compiler":102,"dup":117}],448:[function(require,module,exports){ 'use strict' var warp = require('ndarray-warp') @@ -72690,7 +76076,7 @@ function applyHomography(dest, src, Xi) { }) return dest } -},{"gl-matrix-invert":173,"ndarray-warp":445}],439:[function(require,module,exports){ +},{"gl-matrix-invert":183,"ndarray-warp":455}],449:[function(require,module,exports){ "use strict" function interp1d(arr, x) { @@ -72801,7 +76187,7 @@ module.exports.d1 = interp1d module.exports.d2 = interp2d module.exports.d3 = interp3d -},{}],440:[function(require,module,exports){ +},{}],450:[function(require,module,exports){ "use strict" var compile = require("cwise-compiler") @@ -73264,7 +76650,7 @@ exports.equals = compile({ -},{"cwise-compiler":100}],441:[function(require,module,exports){ +},{"cwise-compiler":102}],451:[function(require,module,exports){ "use strict" var ndarray = require("ndarray") @@ -73287,10 +76673,10 @@ module.exports = function convert(arr, result) { return result } -},{"./doConvert.js":442,"ndarray":446}],442:[function(require,module,exports){ +},{"./doConvert.js":452,"ndarray":456}],452:[function(require,module,exports){ module.exports=require('cwise-compiler')({"args":["array","scalar","index"],"pre":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"body":{"body":"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}","args":[{"name":"_inline_1_arg0_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_1_arg1_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_1_arg2_","lvalue":false,"rvalue":true,"count":4}],"thisVars":[],"localVars":["_inline_1_i","_inline_1_v"]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"funcName":"convert","blockSize":64}) -},{"cwise-compiler":100}],443:[function(require,module,exports){ +},{"cwise-compiler":102}],453:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -74019,7 +77405,7 @@ function compileSort(order, dtype) { } module.exports = compileSort -},{"typedarray-pool":518}],444:[function(require,module,exports){ +},{"typedarray-pool":528}],454:[function(require,module,exports){ "use strict" var compile = require("./lib/compile_sort.js") @@ -74039,19 +77425,19 @@ function sort(array) { } module.exports = sort -},{"./lib/compile_sort.js":443}],445:[function(require,module,exports){ +},{"./lib/compile_sort.js":453}],455:[function(require,module,exports){ 'use strict' var interp = require('ndarray-linear-interpolate') -var do_warp = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=new Array(_inline_9_arg4_)}","args":[{"name":"_inline_9_arg0_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_9_arg1_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_9_arg2_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_9_arg3_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_9_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_.apply(void 0,this_warped)}","args":[{"name":"_inline_10_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_10_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_10_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_10_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_10_arg4_","lvalue":false,"rvalue":false,"count":0}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warpND","blockSize":64}) +var do_warp = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=new Array(_inline_6_arg4_)}","args":[{"name":"_inline_6_arg0_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_6_arg1_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_6_arg2_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_6_arg3_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_6_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_.apply(void 0,this_warped)}","args":[{"name":"_inline_7_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_7_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_7_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_7_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_7_arg4_","lvalue":false,"rvalue":false,"count":0}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warpND","blockSize":64}) -var do_warp_1 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0])}","args":[{"name":"_inline_13_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_13_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_13_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_13_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_13_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp1D","blockSize":64}) +var do_warp_1 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0])}","args":[{"name":"_inline_10_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_10_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_10_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_10_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_10_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp1D","blockSize":64}) -var do_warp_2 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_16_arg2_(this_warped,_inline_16_arg0_),_inline_16_arg1_=_inline_16_arg3_(_inline_16_arg4_,this_warped[0],this_warped[1])}","args":[{"name":"_inline_16_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_16_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_16_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_16_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_16_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp2D","blockSize":64}) +var do_warp_2 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1])}","args":[{"name":"_inline_13_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_13_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_13_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_13_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_13_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp2D","blockSize":64}) -var do_warp_3 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_19_arg2_(this_warped,_inline_19_arg0_),_inline_19_arg1_=_inline_19_arg3_(_inline_19_arg4_,this_warped[0],this_warped[1],this_warped[2])}","args":[{"name":"_inline_19_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_19_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_19_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_19_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_19_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp3D","blockSize":64}) +var do_warp_3 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_16_arg2_(this_warped,_inline_16_arg0_),_inline_16_arg1_=_inline_16_arg3_(_inline_16_arg4_,this_warped[0],this_warped[1],this_warped[2])}","args":[{"name":"_inline_16_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_16_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_16_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_16_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_16_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp3D","blockSize":64}) module.exports = function warp(dest, src, func) { switch(src.shape.length) { @@ -74071,7 +77457,7 @@ module.exports = function warp(dest, src, func) { return dest } -},{"cwise/lib/wrapper":103,"ndarray-linear-interpolate":439}],446:[function(require,module,exports){ +},{"cwise/lib/wrapper":105,"ndarray-linear-interpolate":449}],456:[function(require,module,exports){ var iota = require("iota-array") var isBuffer = require("is-buffer") @@ -74416,7 +77802,7 @@ function wrappedNDArrayCtor(data, shape, stride, offset) { module.exports = wrappedNDArrayCtor -},{"iota-array":273,"is-buffer":274}],447:[function(require,module,exports){ +},{"iota-array":283,"is-buffer":284}],457:[function(require,module,exports){ "use strict" var doubleBits = require("double-bits") @@ -74459,7 +77845,7 @@ function nextafter(x, y) { } return doubleBits.pack(lo, hi) } -},{"double-bits":106}],448:[function(require,module,exports){ +},{"double-bits":116}],458:[function(require,module,exports){ var DEFAULT_NORMALS_EPSILON = 1e-6; var DEFAULT_FACE_EPSILON = 1e-6; @@ -74584,7 +77970,7 @@ exports.faceNormals = function(faces, positions, specifiedEpsilon) { -},{}],449:[function(require,module,exports){ +},{}],459:[function(require,module,exports){ /* object-assign (c) Sindre Sorhus @@ -74676,7 +78062,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { return to; }; -},{}],450:[function(require,module,exports){ +},{}],460:[function(require,module,exports){ 'use strict' module.exports = quatFromFrame @@ -74718,7 +78104,7 @@ function quatFromFrame( } return out } -},{}],451:[function(require,module,exports){ +},{}],461:[function(require,module,exports){ 'use strict' module.exports = createOrbitController @@ -75112,7 +78498,7 @@ function createOrbitController(options) { return result } -},{"./lib/quatFromFrame":450,"filtered-vector":115,"gl-mat4/fromQuat":159,"gl-mat4/invert":162,"gl-mat4/lookAt":163}],452:[function(require,module,exports){ +},{"./lib/quatFromFrame":460,"filtered-vector":125,"gl-mat4/fromQuat":169,"gl-mat4/invert":172,"gl-mat4/lookAt":173}],462:[function(require,module,exports){ /*! * pad-left * @@ -75128,7 +78514,7 @@ module.exports = function padLeft(str, num, ch) { ch = typeof ch !== 'undefined' ? (ch + '') : ' '; return repeat(ch, num) + str; }; -},{"repeat-string":478}],453:[function(require,module,exports){ +},{"repeat-string":488}],463:[function(require,module,exports){ module.exports = function parseUnit(str, out) { if (!out) out = [ 0, '' ] @@ -75139,7 +78525,7 @@ module.exports = function parseUnit(str, out) { out[1] = str.match(/[\d.\-\+]*\s*(.*)/)[1] || '' return out } -},{}],454:[function(require,module,exports){ +},{}],464:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -75367,7 +78753,7 @@ var substr = 'ab'.substr(-1) === 'b' ; }).call(this,require('_process')) -},{"_process":465}],455:[function(require,module,exports){ +},{"_process":475}],465:[function(require,module,exports){ 'use strict'; // lightweight Buffer shim for pbf browser build @@ -75528,7 +78914,7 @@ function encodeString(str) { return bytes; } -},{"ieee754":269}],456:[function(require,module,exports){ +},{"ieee754":279}],466:[function(require,module,exports){ (function (global){ 'use strict'; @@ -75954,7 +79340,7 @@ function writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pb function writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./buffer":455}],457:[function(require,module,exports){ +},{"./buffer":465}],467:[function(require,module,exports){ "use strict" module.exports = permutationSign @@ -76006,7 +79392,7 @@ function permutationSign(p) { return sgn } } -},{"typedarray-pool":518}],458:[function(require,module,exports){ +},{"typedarray-pool":528}],468:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -76093,7 +79479,7 @@ function unrank(n, r, p) { exports.rank = rank exports.unrank = unrank -},{"invert-permutation":272,"typedarray-pool":518}],459:[function(require,module,exports){ +},{"invert-permutation":282,"typedarray-pool":528}],469:[function(require,module,exports){ "use strict" module.exports = planarDual @@ -76224,7 +79610,7 @@ function planarDual(cells, positions) { //Combine paths and loops together return cycles } -},{"compare-angle":90}],460:[function(require,module,exports){ +},{"compare-angle":92}],470:[function(require,module,exports){ 'use strict' module.exports = trimLeaves @@ -76280,7 +79666,7 @@ function trimLeaves(edges, positions) { return [ nedges, npositions ] } -},{"edges-to-adjacency-list":109}],461:[function(require,module,exports){ +},{"edges-to-adjacency-list":119}],471:[function(require,module,exports){ 'use strict' module.exports = planarGraphToPolyline @@ -76485,7 +79871,7 @@ function planarGraphToPolyline(edges, positions) { return result } -},{"./lib/trim-leaves":460,"edges-to-adjacency-list":109,"planar-dual":459,"point-in-big-polygon":463,"robust-sum":491,"two-product":516,"uniq":520}],462:[function(require,module,exports){ +},{"./lib/trim-leaves":470,"edges-to-adjacency-list":119,"planar-dual":469,"point-in-big-polygon":473,"robust-sum":501,"two-product":526,"uniq":530}],472:[function(require,module,exports){ 'use strict'; module.exports = Point; @@ -76618,7 +80004,7 @@ Point.convert = function (a) { return a; }; -},{}],463:[function(require,module,exports){ +},{}],473:[function(require,module,exports){ module.exports = preprocessPolygon var orient = require('robust-orientation')[3] @@ -76770,7 +80156,7 @@ function preprocessPolygon(loops) { testSlab) } } -},{"binary-search-bounds":56,"interval-tree-1d":271,"robust-orientation":486,"slab-decomposition":503}],464:[function(require,module,exports){ +},{"binary-search-bounds":58,"interval-tree-1d":281,"robust-orientation":496,"slab-decomposition":513}],474:[function(require,module,exports){ //Optimized version for triangle closest point // Based on Eberly's WildMagick codes // http://www.geometrictools.com/LibMathematics/Distance/Distance.html @@ -76968,7 +80354,7 @@ function closestPoint2d(V0, V1, V2, point, result) { module.exports = closestPoint2d; -},{}],465:[function(require,module,exports){ +},{}],475:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -77150,7 +80536,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],466:[function(require,module,exports){ +},{}],476:[function(require,module,exports){ (function (global){ /*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { @@ -77687,9 +81073,9 @@ process.umask = function() { return 0; }; }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],467:[function(require,module,exports){ +},{}],477:[function(require,module,exports){ module.exports = require('gl-quat/slerp') -},{"gl-quat/slerp":212}],468:[function(require,module,exports){ +},{"gl-quat/slerp":222}],478:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -77775,7 +81161,7 @@ var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; -},{}],469:[function(require,module,exports){ +},{}],479:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -77862,13 +81248,13 @@ var objectKeys = Object.keys || function (obj) { return res; }; -},{}],470:[function(require,module,exports){ +},{}],480:[function(require,module,exports){ 'use strict'; exports.decode = exports.parse = require('./decode'); exports.encode = exports.stringify = require('./encode'); -},{"./decode":468,"./encode":469}],471:[function(require,module,exports){ +},{"./decode":478,"./encode":479}],481:[function(require,module,exports){ 'use strict'; module.exports = partialSort; @@ -77930,7 +81316,7 @@ function defaultCompare(a, b) { return a < b ? -1 : a > b ? 1 : 0; } -},{}],472:[function(require,module,exports){ +},{}],482:[function(require,module,exports){ 'use strict' var bnadd = require('big-rat/add') @@ -77946,7 +81332,7 @@ function add (a, b) { return r } -},{"big-rat/add":40}],473:[function(require,module,exports){ +},{"big-rat/add":42}],483:[function(require,module,exports){ 'use strict' module.exports = float2rat @@ -77961,7 +81347,7 @@ function float2rat(v) { return result } -},{"big-rat":43}],474:[function(require,module,exports){ +},{"big-rat":45}],484:[function(require,module,exports){ 'use strict' var rat = require('big-rat') @@ -77979,7 +81365,7 @@ function muls(a, x) { return r } -},{"big-rat":43,"big-rat/mul":52}],475:[function(require,module,exports){ +},{"big-rat":45,"big-rat/mul":54}],485:[function(require,module,exports){ 'use strict' var bnsub = require('big-rat/sub') @@ -77995,7 +81381,7 @@ function sub(a, b) { return r } -},{"big-rat/sub":54}],476:[function(require,module,exports){ +},{"big-rat/sub":56}],486:[function(require,module,exports){ 'use strict' var compareCell = require('compare-cell') @@ -78028,7 +81414,7 @@ function reduceCellComplex(cells) { return cells } -},{"cell-orientation":75,"compare-cell":91,"compare-oriented-cell":92}],477:[function(require,module,exports){ +},{"cell-orientation":77,"compare-cell":93,"compare-oriented-cell":94}],487:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -87533,7 +90919,7 @@ return wrapREGL; }))); -},{}],478:[function(require,module,exports){ +},{}],488:[function(require,module,exports){ /*! * repeat-string * @@ -87605,7 +90991,7 @@ function repeat(str, num) { return res; } -},{}],479:[function(require,module,exports){ +},{}],489:[function(require,module,exports){ // Copyright 2014 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) @@ -87654,7 +91040,7 @@ void (function(root, factory) { })); -},{}],480:[function(require,module,exports){ +},{}],490:[function(require,module,exports){ (function (global){ module.exports = global.performance && @@ -87665,7 +91051,7 @@ module.exports = } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],481:[function(require,module,exports){ +},{}],491:[function(require,module,exports){ "use strict" module.exports = compressExpansion @@ -87700,7 +91086,7 @@ function compressExpansion(e) { e.length = top return e } -},{}],482:[function(require,module,exports){ +},{}],492:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -87804,7 +91190,7 @@ return robustDeterminant") } generateDispatch() -},{"robust-compress":481,"robust-scale":488,"robust-sum":491,"two-product":516}],483:[function(require,module,exports){ +},{"robust-compress":491,"robust-scale":498,"robust-sum":501,"two-product":526}],493:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -87819,7 +91205,7 @@ function robustDotProduct(a, b) { } return r } -},{"robust-sum":491,"two-product":516}],484:[function(require,module,exports){ +},{"robust-sum":501,"two-product":526}],494:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -87987,7 +91373,7 @@ function generateInSphereTest() { } generateInSphereTest() -},{"robust-scale":488,"robust-subtract":490,"robust-sum":491,"two-product":516}],485:[function(require,module,exports){ +},{"robust-scale":498,"robust-subtract":500,"robust-sum":501,"two-product":526}],495:[function(require,module,exports){ "use strict" var determinant = require("robust-determinant") @@ -88059,7 +91445,7 @@ function generateDispatch() { } generateDispatch() -},{"robust-determinant":482}],486:[function(require,module,exports){ +},{"robust-determinant":492}],496:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -88250,7 +91636,7 @@ function generateOrientationProc() { } generateOrientationProc() -},{"robust-scale":488,"robust-subtract":490,"robust-sum":491,"two-product":516}],487:[function(require,module,exports){ +},{"robust-scale":498,"robust-subtract":500,"robust-sum":501,"two-product":526}],497:[function(require,module,exports){ "use strict" var robustSum = require("robust-sum") @@ -88280,7 +91666,7 @@ function robustProduct(a, b) { } return r } -},{"robust-scale":488,"robust-sum":491}],488:[function(require,module,exports){ +},{"robust-scale":498,"robust-sum":501}],498:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -88331,7 +91717,7 @@ function scaleLinearExpansion(e, scale) { g.length = count return g } -},{"two-product":516,"two-sum":517}],489:[function(require,module,exports){ +},{"two-product":526,"two-sum":527}],499:[function(require,module,exports){ "use strict" module.exports = segmentsIntersect @@ -88379,7 +91765,7 @@ function segmentsIntersect(a0, a1, b0, b1) { return true } -},{"robust-orientation":486}],490:[function(require,module,exports){ +},{"robust-orientation":496}],500:[function(require,module,exports){ "use strict" module.exports = robustSubtract @@ -88536,7 +91922,7 @@ function robustSubtract(e, f) { g.length = count return g } -},{}],491:[function(require,module,exports){ +},{}],501:[function(require,module,exports){ "use strict" module.exports = linearExpansionSum @@ -88693,7 +92079,7 @@ function linearExpansionSum(e, f) { g.length = count return g } -},{}],492:[function(require,module,exports){ +},{}],502:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -88948,7 +92334,7 @@ Shelf.prototype.resize = function(w) { return ShelfPack; })); -},{}],493:[function(require,module,exports){ +},{}],503:[function(require,module,exports){ "use strict" module.exports = function signum(x) { @@ -88956,7 +92342,7 @@ module.exports = function signum(x) { if(x > 0) { return 1 } return 0.0 } -},{}],494:[function(require,module,exports){ +},{}],504:[function(require,module,exports){ 'use strict' module.exports = boundary @@ -88968,7 +92354,7 @@ function boundary(cells) { return reduce(bnd(cells)) } -},{"boundary-cells":59,"reduce-simplicial-complex":476}],495:[function(require,module,exports){ +},{"boundary-cells":61,"reduce-simplicial-complex":486}],505:[function(require,module,exports){ 'use strict' module.exports = extractContour @@ -89131,7 +92517,7 @@ function extractContour(cells, values, level, d) { vertexWeights: uweights } } -},{"./lib/codegen":496,"ndarray":446,"ndarray-sort":444,"typedarray-pool":518}],496:[function(require,module,exports){ +},{"./lib/codegen":506,"ndarray":456,"ndarray-sort":454,"typedarray-pool":528}],506:[function(require,module,exports){ 'use strict' module.exports = getPolygonizer @@ -89228,7 +92614,7 @@ function getPolygonizer(d) { } return alg } -},{"marching-simplex-table":424,"typedarray-pool":518}],497:[function(require,module,exports){ +},{"marching-simplex-table":434,"typedarray-pool":528}],507:[function(require,module,exports){ "use strict"; "use restrict"; var bits = require("bit-twiddle") @@ -89572,11 +92958,11 @@ function connectedComponents(cells, vertex_count) { } exports.connectedComponents = connectedComponents -},{"bit-twiddle":57,"union-find":519}],498:[function(require,module,exports){ -arguments[4][57][0].apply(exports,arguments) -},{"dup":57}],499:[function(require,module,exports){ -arguments[4][497][0].apply(exports,arguments) -},{"bit-twiddle":498,"dup":497,"union-find":500}],500:[function(require,module,exports){ +},{"bit-twiddle":59,"union-find":529}],508:[function(require,module,exports){ +arguments[4][59][0].apply(exports,arguments) +},{"dup":59}],509:[function(require,module,exports){ +arguments[4][507][0].apply(exports,arguments) +},{"bit-twiddle":508,"dup":507,"union-find":510}],510:[function(require,module,exports){ "use strict"; "use restrict"; module.exports = UnionFind; @@ -89633,7 +93019,7 @@ UnionFind.prototype.link = function(x, y) { } -},{}],501:[function(require,module,exports){ +},{}],511:[function(require,module,exports){ "use strict" module.exports = simplifyPolygon @@ -89905,7 +93291,7 @@ function simplifyPolygon(cells, positions, minArea) { edges: ncells } } -},{"robust-orientation":486,"simplicial-complex":499}],502:[function(require,module,exports){ +},{"robust-orientation":496,"simplicial-complex":509}],512:[function(require,module,exports){ "use strict" module.exports = orderSegments @@ -90001,7 +93387,7 @@ function orderSegments(b, a) { } return ar[0] - br[0] } -},{"robust-orientation":486}],503:[function(require,module,exports){ +},{"robust-orientation":496}],513:[function(require,module,exports){ "use strict" module.exports = createSlabDecomposition @@ -90232,7 +93618,7 @@ function createSlabDecomposition(segments) { } return new SlabDecomposition(slabs, lines, horizontal) } -},{"./lib/order-segments":502,"binary-search-bounds":56,"functional-red-black-tree":117,"robust-orientation":486}],504:[function(require,module,exports){ +},{"./lib/order-segments":512,"binary-search-bounds":58,"functional-red-black-tree":127,"robust-orientation":496}],514:[function(require,module,exports){ "use strict" var robustDot = require("robust-dot-product") @@ -90324,7 +93710,7 @@ function negative(points, plane) { } return neg } -},{"robust-dot-product":483,"robust-sum":491}],505:[function(require,module,exports){ +},{"robust-dot-product":493,"robust-sum":501}],515:[function(require,module,exports){ (function(window) { var re = { not_string: /[^s]/, @@ -90534,7 +93920,7 @@ function negative(points, plane) { } })(typeof window === "undefined" ? this : window); -},{}],506:[function(require,module,exports){ +},{}],516:[function(require,module,exports){ 'use strict'; var kdbush = require('kdbush'); @@ -90868,7 +94254,7 @@ function getY(p) { return p.y; } -},{"kdbush":277}],507:[function(require,module,exports){ +},{"kdbush":287}],517:[function(require,module,exports){ 'use strict' module.exports = toSuperScript @@ -90923,7 +94309,7 @@ function toSuperScript(x) { }).join('') } -},{}],508:[function(require,module,exports){ +},{}],518:[function(require,module,exports){ "use strict" module.exports = surfaceNets @@ -91131,7 +94517,7 @@ function surfaceNets(array,level) { } return proc(array,level) } -},{"ndarray-extract-contour":435,"triangulate-hypercube":514,"zero-crossings":561}],509:[function(require,module,exports){ +},{"ndarray-extract-contour":445,"triangulate-hypercube":524,"zero-crossings":571}],519:[function(require,module,exports){ (function (process){ 'use strict' @@ -91221,7 +94607,7 @@ function textGet(font, text, opts) { } }).call(this,require('_process')) -},{"_process":465,"vectorize-text":531}],510:[function(require,module,exports){ +},{"_process":475,"vectorize-text":541}],520:[function(require,module,exports){ 'use strict'; module.exports = TinySDF; @@ -91330,7 +94716,7 @@ function edt1d(f, d, v, z, n) { } } -},{}],511:[function(require,module,exports){ +},{}],521:[function(require,module,exports){ // TinyColor v1.4.1 // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License @@ -92527,7 +95913,7 @@ else { })(Math); -},{}],512:[function(require,module,exports){ +},{}],522:[function(require,module,exports){ 'use strict' var parseUnit = require('parse-unit') @@ -92588,7 +95974,7 @@ function toPX(str, element) { } return 1 } -},{"parse-unit":453}],513:[function(require,module,exports){ +},{"parse-unit":463}],523:[function(require,module,exports){ // https://github.com/topojson/topojson-client Version 2.1.0. Copyright 2016 Mike Bostock. (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : @@ -93108,7 +96494,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); }))); -},{}],514:[function(require,module,exports){ +},{}],524:[function(require,module,exports){ "use strict" module.exports = triangulateCube @@ -93142,7 +96528,7 @@ function triangulateCube(dimension) { } return result } -},{"gamma":118,"permutation-parity":457,"permutation-rank":458}],515:[function(require,module,exports){ +},{"gamma":128,"permutation-parity":467,"permutation-rank":468}],525:[function(require,module,exports){ 'use strict' module.exports = createTurntableController @@ -93715,7 +97101,7 @@ function createTurntableController(options) { theta, phi) } -},{"filtered-vector":115,"gl-mat4/invert":162,"gl-mat4/rotate":166,"gl-vec3/cross":253,"gl-vec3/dot":254,"gl-vec3/normalize":257}],516:[function(require,module,exports){ +},{"filtered-vector":125,"gl-mat4/invert":172,"gl-mat4/rotate":176,"gl-vec3/cross":263,"gl-vec3/dot":264,"gl-vec3/normalize":267}],526:[function(require,module,exports){ "use strict" module.exports = twoProduct @@ -93749,7 +97135,7 @@ function twoProduct(a, b, result) { return [ y, x ] } -},{}],517:[function(require,module,exports){ +},{}],527:[function(require,module,exports){ "use strict" module.exports = fastTwoSum @@ -93767,7 +97153,7 @@ function fastTwoSum(a, b, result) { } return [ar+br, x] } -},{}],518:[function(require,module,exports){ +},{}],528:[function(require,module,exports){ (function (global,Buffer){ 'use strict' @@ -93984,7 +97370,7 @@ exports.clearCache = function clearCache() { } } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"bit-twiddle":57,"buffer":67,"dup":107}],519:[function(require,module,exports){ +},{"bit-twiddle":59,"buffer":69,"dup":117}],529:[function(require,module,exports){ "use strict"; "use restrict"; module.exports = UnionFind; @@ -94047,7 +97433,7 @@ proto.link = function(x, y) { ++ranks[xr]; } } -},{}],520:[function(require,module,exports){ +},{}],530:[function(require,module,exports){ "use strict" function unique_pred(list, compare) { @@ -94106,7 +97492,7 @@ function unique(list, compare, sorted) { module.exports = unique -},{}],521:[function(require,module,exports){ +},{}],531:[function(require,module,exports){ /* * Copyright (C) 2008 Apple Inc. All Rights Reserved. * @@ -94213,7 +97599,7 @@ UnitBezier.prototype.solve = function(x, epsilon) { return this.sampleCurveY(this.solveCurveX(x, epsilon)); }; -},{}],522:[function(require,module,exports){ +},{}],532:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -94947,7 +98333,7 @@ Url.prototype.parseHost = function() { if (host) this.hostname = host; }; -},{"./util":523,"punycode":466,"querystring":470}],523:[function(require,module,exports){ +},{"./util":533,"punycode":476,"querystring":480}],533:[function(require,module,exports){ 'use strict'; module.exports = { @@ -94965,7 +98351,7 @@ module.exports = { } }; -},{}],524:[function(require,module,exports){ +},{}],534:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -94990,14 +98376,14 @@ if (typeof Object.create === 'function') { } } -},{}],525:[function(require,module,exports){ +},{}],535:[function(require,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } -},{}],526:[function(require,module,exports){ +},{}],536:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -95587,12 +98973,12 @@ function hasOwnProperty(obj, prop) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":525,"_process":465,"inherits":524}],527:[function(require,module,exports){ +},{"./support/isBuffer":535,"_process":475,"inherits":534}],537:[function(require,module,exports){ module.exports.VectorTile = require('./lib/vectortile.js'); module.exports.VectorTileFeature = require('./lib/vectortilefeature.js'); module.exports.VectorTileLayer = require('./lib/vectortilelayer.js'); -},{"./lib/vectortile.js":528,"./lib/vectortilefeature.js":529,"./lib/vectortilelayer.js":530}],528:[function(require,module,exports){ +},{"./lib/vectortile.js":538,"./lib/vectortilefeature.js":539,"./lib/vectortilelayer.js":540}],538:[function(require,module,exports){ 'use strict'; var VectorTileLayer = require('./vectortilelayer'); @@ -95611,7 +98997,7 @@ function readTile(tag, layers, pbf) { } -},{"./vectortilelayer":530}],529:[function(require,module,exports){ +},{"./vectortilelayer":540}],539:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -95846,7 +99232,7 @@ function signedArea(ring) { return sum; } -},{"point-geometry":462}],530:[function(require,module,exports){ +},{"point-geometry":472}],540:[function(require,module,exports){ 'use strict'; var VectorTileFeature = require('./vectortilefeature.js'); @@ -95909,7 +99295,7 @@ VectorTileLayer.prototype.feature = function(i) { return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values); }; -},{"./vectortilefeature.js":529}],531:[function(require,module,exports){ +},{"./vectortilefeature.js":539}],541:[function(require,module,exports){ "use strict" module.exports = createText @@ -95936,7 +99322,7 @@ function createText(str, options) { options) } -},{"./lib/vtext":532}],532:[function(require,module,exports){ +},{"./lib/vtext":542}],542:[function(require,module,exports){ "use strict" module.exports = vectorizeText @@ -96142,7 +99528,7 @@ function vectorizeText(str, canvas, context, options) { return processPixels(pixels, options, size) } -},{"cdt2d":69,"clean-pslg":79,"ndarray":446,"planar-graph-to-polyline":461,"simplify-planar-graph":501,"surface-nets":508}],533:[function(require,module,exports){ +},{"cdt2d":71,"clean-pslg":81,"ndarray":456,"planar-graph-to-polyline":471,"simplify-planar-graph":511,"surface-nets":518}],543:[function(require,module,exports){ var Pbf = require('pbf') var vtpb = require('./vector-tile-pb') var GeoJSONWrapper = require('./lib/geojson_wrapper') @@ -96298,7 +99684,7 @@ function wrapValue (value) { return result } -},{"./lib/geojson_wrapper":534,"./vector-tile-pb":535,"pbf":456}],534:[function(require,module,exports){ +},{"./lib/geojson_wrapper":544,"./vector-tile-pb":545,"pbf":466}],544:[function(require,module,exports){ 'use strict' var Point = require('point-geometry') @@ -96366,7 +99752,7 @@ FeatureWrapper.prototype.bbox = function () { FeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON -},{"point-geometry":462,"vector-tile":527}],535:[function(require,module,exports){ +},{"point-geometry":472,"vector-tile":537}],545:[function(require,module,exports){ 'use strict'; // tile ======================================== @@ -96472,7 +99858,7 @@ function writeLayer(layer, pbf) { if (layer.extent !== undefined) pbf.writeVarintField(5, layer.extent); } -},{}],536:[function(require,module,exports){ +},{}],546:[function(require,module,exports){ // Copyright (C) 2011 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -97159,7 +100545,7 @@ function writeLayer(layer, pbf) { } })(); -},{}],537:[function(require,module,exports){ +},{}],547:[function(require,module,exports){ var hiddenStore = require('./hidden-store.js'); module.exports = createStore; @@ -97180,7 +100566,7 @@ function createStore() { }; } -},{"./hidden-store.js":538}],538:[function(require,module,exports){ +},{"./hidden-store.js":548}],548:[function(require,module,exports){ module.exports = hiddenStore; function hiddenStore(obj, key) { @@ -97198,7 +100584,7 @@ function hiddenStore(obj, key) { return store; } -},{}],539:[function(require,module,exports){ +},{}],549:[function(require,module,exports){ // Original - @Gozola. // https://gist.github.com/Gozala/1269991 // This is a reimplemented version (with a few bug fixes). @@ -97229,14 +100615,14 @@ function weakMap() { } } -},{"./create-store.js":537}],540:[function(require,module,exports){ +},{"./create-store.js":547}],550:[function(require,module,exports){ var getContext = require('get-canvas-context') module.exports = function getWebGLContext (opt) { return getContext('webgl', opt) } -},{"get-canvas-context":129}],541:[function(require,module,exports){ +},{"get-canvas-context":139}],551:[function(require,module,exports){ var bundleFn = arguments[3]; var sources = arguments[4]; var cache = arguments[5]; @@ -97319,12 +100705,12 @@ module.exports = function (fn, options) { return worker; }; -},{}],542:[function(require,module,exports){ +},{}],552:[function(require,module,exports){ module.exports.RADIUS = 6378137; module.exports.FLATTENING = 1/298.257223563; module.exports.POLAR_RADIUS = 6356752.3142; -},{}],543:[function(require,module,exports){ +},{}],553:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : @@ -97414,7 +100800,7 @@ exports.getMercCoords = getMercCoords; Object.defineProperty(exports, '__esModule', { value: true }); })); -},{}],544:[function(require,module,exports){ +},{}],554:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98147,7 +101533,7 @@ function toSolar(yearOrDate, monthOrResult, day, isIntercalaryOrResult, result) } -},{"../main":558,"object-assign":449}],545:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],555:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98331,7 +101717,7 @@ assign(CopticCalendar.prototype, { main.calendars.coptic = CopticCalendar; -},{"../main":558,"object-assign":449}],546:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],556:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98559,7 +101945,7 @@ var centuries = { main.calendars.discworld = DiscworldCalendar; -},{"../main":558,"object-assign":449}],547:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],557:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98743,7 +102129,7 @@ assign(EthiopianCalendar.prototype, { main.calendars.ethiopian = EthiopianCalendar; -},{"../main":558,"object-assign":449}],548:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],558:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99017,7 +102403,7 @@ function mod(a, b) { main.calendars.hebrew = HebrewCalendar; -},{"../main":558,"object-assign":449}],549:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],559:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99198,7 +102584,7 @@ assign(IslamicCalendar.prototype, { main.calendars.islamic = IslamicCalendar; -},{"../main":558,"object-assign":449}],550:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],560:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99381,7 +102767,7 @@ assign(JulianCalendar.prototype, { main.calendars.julian = JulianCalendar; -},{"../main":558,"object-assign":449}],551:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],561:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99676,7 +103062,7 @@ function amod(a, b) { main.calendars.mayan = MayanCalendar; -},{"../main":558,"object-assign":449}],552:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],562:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99856,7 +103242,7 @@ assign(NanakshahiCalendar.prototype, { main.calendars.nanakshahi = NanakshahiCalendar; -},{"../main":558,"object-assign":449}],553:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],563:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100279,7 +103665,7 @@ assign(NepaliCalendar.prototype, { main.calendars.nepali = NepaliCalendar; -},{"../main":558,"object-assign":449}],554:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],564:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100469,7 +103855,7 @@ main.calendars.persian = PersianCalendar; main.calendars.jalali = PersianCalendar; -},{"../main":558,"object-assign":449}],555:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],565:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100655,7 +104041,7 @@ assign(TaiwanCalendar.prototype, { main.calendars.taiwan = TaiwanCalendar; -},{"../main":558,"object-assign":449}],556:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],566:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100841,7 +104227,7 @@ assign(ThaiCalendar.prototype, { main.calendars.thai = ThaiCalendar; -},{"../main":558,"object-assign":449}],557:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],567:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -101206,7 +104592,7 @@ var ummalqura_dat = [ 79990]; -},{"../main":558,"object-assign":449}],558:[function(require,module,exports){ +},{"../main":568,"object-assign":459}],568:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102111,7 +105497,7 @@ _exports.baseCalendar = BaseCalendar; _exports.calendars.gregorian = GregorianCalendar; -},{"object-assign":449}],559:[function(require,module,exports){ +},{"object-assign":459}],569:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102613,7 +105999,7 @@ assign(main.baseCalendar.prototype, { }); -},{"./main":558,"object-assign":449}],560:[function(require,module,exports){ +},{"./main":568,"object-assign":459}],570:[function(require,module,exports){ module.exports = require('cwise-compiler')({ args: ['array', { offset: [1], @@ -102665,7 +106051,7 @@ module.exports = require('cwise-compiler')({ funcName: 'zeroCrossings' }) -},{"cwise-compiler":100}],561:[function(require,module,exports){ +},{"cwise-compiler":102}],571:[function(require,module,exports){ "use strict" module.exports = findZeroCrossings @@ -102678,7 +106064,7 @@ function findZeroCrossings(array, level) { core(array.hi(array.shape[0]-1), cross, level) return cross } -},{"./lib/zc-core":560}],562:[function(require,module,exports){ +},{"./lib/zc-core":570}],572:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -102693,6 +106079,7 @@ function findZeroCrossings(array, level) { var Lib = require('../../lib'); var Color = require('../color'); var Axes = require('../../plots/cartesian/axes'); +var constants = require('../../plots/cartesian/constants'); var attributes = require('./attributes'); @@ -102711,8 +106098,7 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op if(!(visible || clickToShow)) return annOut; coerce('opacity'); - coerce('align'); - coerce('bgcolor'); + var bgColor = coerce('bgcolor'); var borderColor = coerce('bordercolor'), borderOpacity = Color.opacity(borderColor); @@ -102726,6 +106112,12 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op coerce('textangle'); Lib.coerceFont(coerce, 'font', fullLayout.font); + coerce('width'); + coerce('align'); + + var h = coerce('height'); + if(h) coerce('valign'); + // positioning var axLetters = ['x', 'y'], arrowPosDflt = [-10, -30], @@ -102784,10 +106176,23 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op annOut._yclick = (yClick === undefined) ? annOut.y : yClick; } + var hoverText = coerce('hovertext'); + if(hoverText) { + var hoverBG = coerce('hoverlabel.bgcolor', + Color.opacity(bgColor) ? Color.rgb(bgColor) : Color.defaultLine); + var hoverBorder = coerce('hoverlabel.bordercolor', Color.contrast(hoverBG)); + Lib.coerceFont(coerce, 'hoverlabel.font', { + family: constants.HOVERFONT, + size: constants.HOVERFONTSIZE, + color: hoverBorder + }); + } + coerce('captureevents', !!hoverText); + return annOut; }; -},{"../../lib":680,"../../plots/cartesian/axes":719,"../color":575,"./attributes":564}],563:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/constants":734,"../color":585,"./attributes":574}],573:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -102852,7 +106257,7 @@ module.exports = [ } ]; -},{}],564:[function(require,module,exports){ +},{}],574:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -102893,6 +106298,20 @@ module.exports = { font: extendFlat({}, fontAttrs, { }), + width: { + valType: 'number', + min: 1, + dflt: null, + + + }, + height: { + valType: 'number', + min: 1, + dflt: null, + + + }, opacity: { valType: 'number', min: 0, @@ -102907,6 +106326,13 @@ module.exports = { dflt: 'center', + }, + valign: { + valType: 'enumerated', + values: ['top', 'middle', 'bottom'], + dflt: 'middle', + + }, bgcolor: { valType: 'color', @@ -103063,6 +106489,31 @@ module.exports = { valType: 'any', + }, + hovertext: { + valType: 'string', + + + }, + hoverlabel: { + bgcolor: { + valType: 'color', + + + }, + bordercolor: { + valType: 'color', + + + }, + font: extendFlat({}, fontAttrs, { + + }) + }, + captureevents: { + valType: 'boolean', + + }, _deprecated: { @@ -103074,7 +106525,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../../plots/cartesian/constants":724,"../../plots/font_attributes":739,"./arrow_paths":563}],565:[function(require,module,exports){ +},{"../../lib/extend":682,"../../plots/cartesian/constants":734,"../../plots/font_attributes":753,"./arrow_paths":573}],575:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103169,7 +106620,7 @@ function annAutorange(gd) { }); } -},{"../../lib":680,"../../plots/cartesian/axes":719,"./draw":569}],566:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"./draw":579}],576:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103294,7 +106745,7 @@ function getToggleSets(gd, hoverData) { return {on: onSet, off: offSet, explicitOff: explicitOffSet}; } -},{"../../plotly":714}],567:[function(require,module,exports){ +},{"../../plotly":724}],577:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103357,7 +106808,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":700,"fast-isnumeric":113}],568:[function(require,module,exports){ +},{"../../lib/to_log_range":710,"fast-isnumeric":123}],578:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103382,7 +106833,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { handleArrayContainerDefaults(layoutIn, layoutOut, opts); }; -},{"../../plots/array_container_defaults":716,"./annotation_defaults":562}],569:[function(require,module,exports){ +},{"../../plots/array_container_defaults":726,"./annotation_defaults":572}],579:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103400,6 +106851,7 @@ var Plotly = require('../../plotly'); var Plots = require('../../plots/plots'); var Lib = require('../../lib'); var Axes = require('../../plots/cartesian/axes'); +var Fx = require('../../plots/cartesian/graph_interact'); var Color = require('../color'); var Drawing = require('../drawing'); var svgTextUtils = require('../../lib/svg_text_utils'); @@ -103457,9 +106909,14 @@ function drawOne(gd, index) { var optionsIn = (layout.annotations || [])[index], options = fullLayout.annotations[index]; + var annClipID = 'clip' + fullLayout._uid + '_ann' + index; + // this annotation is gone - quit now after deleting it // TODO: use d3 idioms instead of deleting and redrawing every time - if(!optionsIn || options.visible === false) return; + if(!optionsIn || options.visible === false) { + d3.selectAll('#' + annClipID).remove(); + return; + } var xa = Axes.getFromId(gd, options.xref), ya = Axes.getFromId(gd, options.yref), @@ -103476,7 +106933,16 @@ function drawOne(gd, index) { var annGroup = fullLayout._infolayer.append('g') .classed('annotation', true) .attr('data-index', String(index)) - .style('opacity', options.opacity) + .style('opacity', options.opacity); + + // another group for text+background so that they can rotate together + var annTextGroup = annGroup.append('g') + .classed('annotation-text-g', true) + .attr('data-index', String(index)); + + var annTextGroupInner = annTextGroup.append('g') + .style('pointer-events', options.captureevents ? 'all' : null) + .call(setCursor, 'default') .on('click', function() { gd._dragging = false; gd.emit('plotly_clickannotation', { @@ -103486,12 +106952,33 @@ function drawOne(gd, index) { }); }); - // another group for text+background so that they can rotate together - var annTextGroup = annGroup.append('g') - .classed('annotation-text-g', true) - .attr('data-index', String(index)); + if(options.hovertext) { + annTextGroupInner + .on('mouseover', function() { + var hoverOptions = options.hoverlabel; + var hoverFont = hoverOptions.font; + var bBox = this.getBoundingClientRect(); + var bBoxRef = gd.getBoundingClientRect(); - var annTextGroupInner = annTextGroup.append('g'); + Fx.loneHover({ + x0: bBox.left - bBoxRef.left, + x1: bBox.right - bBoxRef.left, + y: (bBox.top + bBox.bottom) / 2 - bBoxRef.top, + text: options.hovertext, + color: hoverOptions.bgcolor, + borderColor: hoverOptions.bordercolor, + fontFamily: hoverFont.family, + fontSize: hoverFont.size, + fontColor: hoverFont.color + }, { + container: fullLayout._hoverlayer.node(), + outerContainer: fullLayout._paper.node() + }); + }) + .on('mouseout', function() { + Fx.loneUnhover(fullLayout._hoverlayer.node()); + }); + } var borderwidth = options.borderwidth, borderpad = options.borderpad, @@ -103503,6 +106990,18 @@ function drawOne(gd, index) { .call(Color.stroke, options.bordercolor) .call(Color.fill, options.bgcolor); + var isSizeConstrained = options.width || options.height; + + var annTextClip = fullLayout._defs.select('.clips') + .selectAll('#' + annClipID) + .data(isSizeConstrained ? [0] : []); + + annTextClip.enter().append('clipPath') + .classed('annclip', true) + .attr('id', annClipID) + .append('rect'); + annTextClip.exit().remove(); + var font = options.font; var annText = annTextGroupInner.append('text') @@ -103529,19 +107028,21 @@ function drawOne(gd, index) { // at the end, even if their position changes annText.selectAll('tspan.line').attr({y: 0, x: 0}); - var mathjaxGroup = annTextGroupInner.select('.annotation-math-group'), - hasMathjax = !mathjaxGroup.empty(), - anntextBB = Drawing.bBox( - (hasMathjax ? mathjaxGroup : annText).node()), - annwidth = anntextBB.width, - annheight = anntextBB.height, - outerwidth = Math.round(annwidth + 2 * borderfull), - outerheight = Math.round(annheight + 2 * borderfull); + var mathjaxGroup = annTextGroupInner.select('.annotation-math-group'); + var hasMathjax = !mathjaxGroup.empty(); + var anntextBB = Drawing.bBox( + (hasMathjax ? mathjaxGroup : annText).node()); + var textWidth = anntextBB.width; + var textHeight = anntextBB.height; + var annWidth = options.width || textWidth; + var annHeight = options.height || textHeight; + var outerWidth = Math.round(annWidth + 2 * borderfull); + var outerHeight = Math.round(annHeight + 2 * borderfull); // save size in the annotation object for use by autoscale - options._w = annwidth; - options._h = annheight; + options._w = annWidth; + options._h = annHeight; function shiftFraction(v, anchor) { if(anchor === 'auto') { @@ -103566,8 +107067,8 @@ function drawOne(gd, index) { ax = Axes.getFromId(gd, axRef), dimAngle = (textangle + (axLetter === 'x' ? 0 : -90)) * Math.PI / 180, // note that these two can be either positive or negative - annSizeFromWidth = outerwidth * Math.cos(dimAngle), - annSizeFromHeight = outerheight * Math.sin(dimAngle), + annSizeFromWidth = outerWidth * Math.cos(dimAngle), + annSizeFromHeight = outerHeight * Math.sin(dimAngle), // but this one is the positive total size annSize = Math.abs(annSizeFromWidth) + Math.abs(annSizeFromHeight), anchor = options[axLetter + 'anchor'], @@ -103684,22 +107185,43 @@ function drawOne(gd, index) { return; } + var xShift = 0; + var yShift = 0; + + if(options.align !== 'left') { + xShift = (annWidth - textWidth) * (options.align === 'center' ? 0.5 : 1); + } + if(options.valign !== 'top') { + yShift = (annHeight - textHeight) * (options.valign === 'middle' ? 0.5 : 1); + } + if(hasMathjax) { - mathjaxGroup.select('svg').attr({x: borderfull - 1, y: borderfull}); + mathjaxGroup.select('svg').attr({ + x: borderfull + xShift - 1, + y: borderfull + yShift + }) + .call(Drawing.setClipUrl, isSizeConstrained ? annClipID : null); } else { - var texty = borderfull - anntextBB.top, - textx = borderfull - anntextBB.left; - annText.attr({x: textx, y: texty}); + var texty = borderfull + yShift - anntextBB.top, + textx = borderfull + xShift - anntextBB.left; + annText.attr({ + x: textx, + y: texty + }) + .call(Drawing.setClipUrl, isSizeConstrained ? annClipID : null); annText.selectAll('tspan.line').attr({y: texty, x: textx}); } + annTextClip.select('rect').call(Drawing.setRect, borderfull, borderfull, + annWidth, annHeight); + annTextBG.call(Drawing.setRect, borderwidth / 2, borderwidth / 2, - outerwidth - borderwidth, outerheight - borderwidth); + outerWidth - borderwidth, outerHeight - borderwidth); annTextGroupInner.call(Drawing.setTranslate, - Math.round(annPosPx.x.text - outerwidth / 2), - Math.round(annPosPx.y.text - outerheight / 2)); + Math.round(annPosPx.x.text - outerWidth / 2), + Math.round(annPosPx.y.text - outerHeight / 2)); /* * rotate text and background @@ -103991,7 +107513,7 @@ function lineIntersect(x1, y1, x2, y2, x3, y3, x4, y4) { return {x: x1 + a * t, y: y1 + d * t}; } -},{"../../lib":680,"../../lib/setcursor":695,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../color":575,"../dragelement":596,"../drawing":598,"./draw_arrow_head":570,"d3":104}],570:[function(require,module,exports){ +},{"../../lib":690,"../../lib/setcursor":705,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"../../plots/plots":792,"../color":585,"../dragelement":606,"../drawing":608,"./draw_arrow_head":580,"d3":114}],580:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104125,7 +107647,7 @@ module.exports = function drawArrowHead(el3, style, ends, mag, standoff) { if(doEnd) drawhead(end, endRot); }; -},{"../color":575,"../drawing":598,"./arrow_paths":563,"d3":104,"fast-isnumeric":113}],571:[function(require,module,exports){ +},{"../color":585,"../drawing":608,"./arrow_paths":573,"d3":114,"fast-isnumeric":123}],581:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104157,7 +107679,7 @@ module.exports = { convertCoords: require('./convert_coords') }; -},{"./attributes":564,"./calc_autorange":565,"./click":566,"./convert_coords":567,"./defaults":568,"./draw":569}],572:[function(require,module,exports){ +},{"./attributes":574,"./calc_autorange":575,"./click":576,"./convert_coords":577,"./defaults":578,"./draw":579}],582:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104190,7 +107712,7 @@ require('world-calendars/dist/calendars/taiwan'); require('world-calendars/dist/calendars/thai'); require('world-calendars/dist/calendars/ummalqura'); -},{"world-calendars/dist/calendars/chinese":544,"world-calendars/dist/calendars/coptic":545,"world-calendars/dist/calendars/discworld":546,"world-calendars/dist/calendars/ethiopian":547,"world-calendars/dist/calendars/hebrew":548,"world-calendars/dist/calendars/islamic":549,"world-calendars/dist/calendars/julian":550,"world-calendars/dist/calendars/mayan":551,"world-calendars/dist/calendars/nanakshahi":552,"world-calendars/dist/calendars/nepali":553,"world-calendars/dist/calendars/persian":554,"world-calendars/dist/calendars/taiwan":555,"world-calendars/dist/calendars/thai":556,"world-calendars/dist/calendars/ummalqura":557,"world-calendars/dist/main":558,"world-calendars/dist/plus":559}],573:[function(require,module,exports){ +},{"world-calendars/dist/calendars/chinese":554,"world-calendars/dist/calendars/coptic":555,"world-calendars/dist/calendars/discworld":556,"world-calendars/dist/calendars/ethiopian":557,"world-calendars/dist/calendars/hebrew":558,"world-calendars/dist/calendars/islamic":559,"world-calendars/dist/calendars/julian":560,"world-calendars/dist/calendars/mayan":561,"world-calendars/dist/calendars/nanakshahi":562,"world-calendars/dist/calendars/nepali":563,"world-calendars/dist/calendars/persian":564,"world-calendars/dist/calendars/taiwan":565,"world-calendars/dist/calendars/thai":566,"world-calendars/dist/calendars/ummalqura":567,"world-calendars/dist/main":568,"world-calendars/dist/plus":569}],583:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104449,7 +107971,7 @@ module.exports = { worldCalFmt: worldCalFmt }; -},{"../../constants/numerical":662,"../../lib":680,"./calendars":572}],574:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690,"./calendars":582}],584:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104489,7 +108011,7 @@ exports.borderLine = '#BEC8D9'; // gives back exactly lightLine if the other colors are defaults. exports.lightFraction = 100 * (0xe - 0x4) / (0xf - 0x4); -},{}],575:[function(require,module,exports){ +},{}],585:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104508,10 +108030,14 @@ var color = module.exports = {}; var colorAttrs = require('./attributes'); color.defaults = colorAttrs.defaults; -color.defaultLine = colorAttrs.defaultLine; +var defaultLine = color.defaultLine = colorAttrs.defaultLine; color.lightLine = colorAttrs.lightLine; -color.background = colorAttrs.background; +var background = color.background = colorAttrs.background; +/* + * tinyRGB: turn a tinycolor into an rgb string, but + * unlike the built-in tinycolor.toRgbString this never includes alpha + */ color.tinyRGB = function(tc) { var c = tc.toRgb(); return 'rgb(' + Math.round(c.r) + ', ' + @@ -104535,7 +108061,7 @@ color.combine = function(front, back) { var fc = tinycolor(front).toRgb(); if(fc.a === 1) return tinycolor(front).toRgbString(); - var bc = tinycolor(back || color.background).toRgb(), + var bc = tinycolor(back || background).toRgb(), bcflat = bc.a === 1 ? bc : { r: 255 * (1 - bc.a) + bc.r * bc.a, g: 255 * (1 - bc.a) + bc.g * bc.a, @@ -104549,12 +108075,22 @@ color.combine = function(front, back) { return tinycolor(fcflat).toRgbString(); }; +/* + * Create a color that contrasts with cstr. + * + * If cstr is a dark color, we lighten it; if it's light, we darken. + * + * If lightAmount / darkAmount are used, we adjust by these percentages, + * otherwise we go all the way to white or black. + */ color.contrast = function(cstr, lightAmount, darkAmount) { var tc = tinycolor(cstr); - var newColor = tc.isLight() ? - tc.darken(darkAmount) : - tc.lighten(lightAmount); + if(tc.getAlpha() !== 1) tc = tinycolor(color.combine(cstr, background)); + + var newColor = tc.isDark() ? + (lightAmount ? tc.lighten(lightAmount) : background) : + (darkAmount ? tc.darken(darkAmount) : defaultLine); return newColor.toString(); }; @@ -104646,7 +108182,7 @@ function cleanOne(val) { return 'rgb(' + rgbStr + ')'; } -},{"./attributes":574,"fast-isnumeric":113,"tinycolor2":511}],576:[function(require,module,exports){ +},{"./attributes":584,"fast-isnumeric":123,"tinycolor2":521}],586:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104802,7 +108338,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../../plots/cartesian/layout_attributes":728,"../../plots/font_attributes":739}],577:[function(require,module,exports){ +},{"../../lib/extend":682,"../../plots/cartesian/layout_attributes":740,"../../plots/font_attributes":753}],587:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104869,7 +108405,7 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) { coerce('titleside'); }; -},{"../../lib":680,"../../plots/cartesian/tick_label_defaults":734,"../../plots/cartesian/tick_mark_defaults":735,"../../plots/cartesian/tick_value_defaults":736,"./attributes":576}],578:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/tick_label_defaults":747,"../../plots/cartesian/tick_mark_defaults":748,"../../plots/cartesian/tick_value_defaults":749,"./attributes":586}],588:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105042,7 +108578,10 @@ module.exports = function draw(gd, id) { anchor: 'free', position: 1 }, - cbAxisOut = {}, + cbAxisOut = { + type: 'linear', + _id: 'y' + id + }, axisOptions = { letter: 'y', font: fullLayout.font, @@ -105060,8 +108599,6 @@ module.exports = function draw(gd, id) { handleAxisDefaults(cbAxisIn, cbAxisOut, coerce, axisOptions, fullLayout); handleAxisPositionDefaults(cbAxisIn, cbAxisOut, coerce, axisOptions); - cbAxisOut._id = 'y' + id; - // position can't go in through supplyDefaults // because that restricts it to [0,1] cbAxisOut.position = opts.x + xpadFrac + thickFrac; @@ -105501,7 +109038,7 @@ module.exports = function draw(gd, id) { return component; }; -},{"../../lib":680,"../../lib/extend":672,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_defaults":721,"../../plots/cartesian/layout_attributes":728,"../../plots/cartesian/position_defaults":731,"../../plots/plots":778,"../../registry":793,"../color":575,"../dragelement":596,"../drawing":598,"../titles":651,"./attributes":576,"d3":104,"tinycolor2":511}],579:[function(require,module,exports){ +},{"../../lib":690,"../../lib/extend":682,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_defaults":731,"../../plots/cartesian/layout_attributes":740,"../../plots/cartesian/position_defaults":743,"../../plots/plots":792,"../../registry":807,"../color":585,"../dragelement":606,"../drawing":608,"../titles":661,"./attributes":586,"d3":114,"tinycolor2":521}],589:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105520,7 +109057,7 @@ module.exports = function hasColorbar(container) { return Lib.isPlainObject(container.colorbar); }; -},{"../../lib":680}],580:[function(require,module,exports){ +},{"../../lib":690}],590:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105575,7 +109112,7 @@ module.exports = { } }; -},{}],581:[function(require,module,exports){ +},{}],591:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105654,7 +109191,7 @@ module.exports = function calc(trace, vals, containerStr, cLetter) { } }; -},{"../../lib":680,"./flip_scale":586,"./scales":593}],582:[function(require,module,exports){ +},{"../../lib":690,"./flip_scale":596,"./scales":603}],592:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105698,7 +109235,7 @@ module.exports = function makeColorScaleAttributes(context) { }; }; -},{"../../lib/extend":672,"./attributes":580,"./scales.js":593}],583:[function(require,module,exports){ +},{"../../lib/extend":682,"./attributes":590,"./scales.js":603}],593:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105714,7 +109251,7 @@ var scales = require('./scales'); module.exports = scales.RdBu; -},{"./scales":593}],584:[function(require,module,exports){ +},{"./scales":603}],594:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105778,7 +109315,7 @@ module.exports = function colorScaleDefaults(traceIn, traceOut, layout, coerce, if(showScale) colorbarDefaults(containerIn, containerOut, layout); }; -},{"../../lib":680,"../colorbar/defaults":577,"../colorbar/has_colorbar":579,"./flip_scale":586,"./is_valid_scale":590,"fast-isnumeric":113}],585:[function(require,module,exports){ +},{"../../lib":690,"../colorbar/defaults":587,"../colorbar/has_colorbar":589,"./flip_scale":596,"./is_valid_scale":600,"fast-isnumeric":123}],595:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105815,7 +109352,7 @@ module.exports = function extractScale(scl, cmin, cmax) { }; }; -},{}],586:[function(require,module,exports){ +},{}],596:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105840,7 +109377,7 @@ module.exports = function flipScale(scl) { return sclNew; }; -},{}],587:[function(require,module,exports){ +},{}],597:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105880,7 +109417,7 @@ module.exports = function getScale(scl, dflt) { return scl; }; -},{"./default_scale":583,"./is_valid_scale_array":591,"./scales":593}],588:[function(require,module,exports){ +},{"./default_scale":593,"./is_valid_scale_array":601,"./scales":603}],598:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105926,7 +109463,7 @@ module.exports = function hasColorscale(trace, containerStr) { ); }; -},{"../../lib":680,"./is_valid_scale":590,"fast-isnumeric":113}],589:[function(require,module,exports){ +},{"../../lib":690,"./is_valid_scale":600,"fast-isnumeric":123}],599:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105960,7 +109497,7 @@ exports.extractScale = require('./extract_scale'); exports.makeColorScaleFunc = require('./make_color_scale_func'); -},{"./attributes":580,"./calc":581,"./default_scale":583,"./defaults":584,"./extract_scale":585,"./flip_scale":586,"./get_scale":587,"./has_colorscale":588,"./is_valid_scale":590,"./make_color_scale_func":592,"./scales":593}],590:[function(require,module,exports){ +},{"./attributes":590,"./calc":591,"./default_scale":593,"./defaults":594,"./extract_scale":595,"./flip_scale":596,"./get_scale":597,"./has_colorscale":598,"./is_valid_scale":600,"./make_color_scale_func":602,"./scales":603}],600:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105981,7 +109518,7 @@ module.exports = function isValidScale(scl) { else return isValidScaleArray(scl); }; -},{"./is_valid_scale_array":591,"./scales":593}],591:[function(require,module,exports){ +},{"./is_valid_scale_array":601,"./scales":603}],601:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106018,7 +109555,7 @@ module.exports = function isValidScaleArray(scl) { return true; }; -},{"tinycolor2":511}],592:[function(require,module,exports){ +},{"tinycolor2":521}],602:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106114,7 +109651,7 @@ function colorArray2rbga(colorArray) { return tinycolor(colorObj).toRgbString(); } -},{"../color":575,"d3":104,"fast-isnumeric":113,"tinycolor2":511}],593:[function(require,module,exports){ +},{"../color":585,"d3":114,"fast-isnumeric":123,"tinycolor2":521}],603:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106245,7 +109782,7 @@ module.exports = { ] }; -},{}],594:[function(require,module,exports){ +},{}],604:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106278,7 +109815,7 @@ module.exports = function align(v, dv, v0, v1, anchor) { return vc; }; -},{}],595:[function(require,module,exports){ +},{}],605:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106316,7 +109853,7 @@ module.exports = function getCursor(x, y, xanchor, yanchor) { return cursorset[y][x]; }; -},{"../../lib":680}],596:[function(require,module,exports){ +},{"../../lib":690}],606:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106459,8 +109996,22 @@ dragElement.init = function init(options) { if(options.doneFn) options.doneFn(gd._dragged, numClicks, e); if(!gd._dragged) { - var e2 = document.createEvent('MouseEvents'); - e2.initEvent('click', true, true); + var e2; + + try { + e2 = new MouseEvent('click', e); + } + catch(err) { + e2 = document.createEvent('MouseEvents'); + e2.initMouseEvent('click', + e.bubbles, e.cancelable, + e.view, e.detail, + e.screenX, e.screenY, + e.clientX, e.clientY, + e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, + e.button, e.relatedTarget); + } + initialTarget.dispatchEvent(e2); } @@ -106504,7 +110055,7 @@ function finishDrag(gd) { if(gd._replotPending) Plotly.plot(gd); } -},{"../../constants/interactions":661,"../../lib":680,"../../plotly":714,"../../plots/cartesian/constants":724,"./align":594,"./cursor":595,"./unhover":597}],597:[function(require,module,exports){ +},{"../../constants/interactions":671,"../../lib":690,"../../plotly":724,"../../plots/cartesian/constants":734,"./align":604,"./cursor":605,"./unhover":607}],607:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106551,11 +110102,14 @@ unhover.raw = function unhoverRaw(gd, evt) { gd._hoverdata = undefined; if(evt.target && oldhoverdata) { - gd.emit('plotly_unhover', {points: oldhoverdata}); + gd.emit('plotly_unhover', { + event: evt, + points: oldhoverdata + }); } }; -},{"../../lib/events":671}],598:[function(require,module,exports){ +},{"../../lib/events":681}],608:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107237,7 +110791,7 @@ drawing.setPointGroupScale = function(selection, x, y) { return scale; }; -},{"../../constants/xmlns_namespaces":664,"../../lib":680,"../../lib/svg_text_utils":699,"../../registry":793,"../../traces/scatter/make_bubble_size_func":939,"../../traces/scatter/subtypes":944,"../color":575,"../colorscale":589,"./symbol_defs":599,"d3":104,"fast-isnumeric":113}],599:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":674,"../../lib":690,"../../lib/svg_text_utils":709,"../../registry":807,"../../traces/scatter/make_bubble_size_func":962,"../../traces/scatter/subtypes":967,"../color":585,"../colorscale":599,"./symbol_defs":609,"d3":114,"fast-isnumeric":123}],609:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107713,7 +111267,7 @@ module.exports = { } }; -},{"d3":104}],600:[function(require,module,exports){ +},{"d3":114}],610:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107812,7 +111366,7 @@ module.exports = { } }; -},{}],601:[function(require,module,exports){ +},{}],611:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107875,7 +111429,7 @@ function calcOneAxis(calcTrace, trace, axis, coord) { Axes.expand(axis, vals, {padded: true}); } -},{"../../plots/cartesian/axes":719,"../../registry":793,"./compute_error":602,"fast-isnumeric":113}],602:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"../../registry":807,"./compute_error":612,"fast-isnumeric":123}],612:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107971,7 +111525,7 @@ function makeComputeErrorValue(type, value) { } } -},{}],603:[function(require,module,exports){ +},{}],613:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108048,7 +111602,7 @@ module.exports = function(traceIn, traceOut, defaultColor, opts) { } }; -},{"../../lib":680,"../../registry":793,"./attributes":600,"fast-isnumeric":113}],604:[function(require,module,exports){ +},{"../../lib":690,"../../registry":807,"./attributes":610,"fast-isnumeric":123}],614:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108070,7 +111624,7 @@ errorBars.calc = require('./calc'); errorBars.calcFromTrace = function(trace, layout) { var x = trace.x || [], - y = trace.y, + y = trace.y || [], len = x.length || y.length; var calcdataMock = new Array(len); @@ -108107,7 +111661,7 @@ errorBars.hoverInfo = function(calcPoint, trace, hoverPoint) { } }; -},{"./attributes":600,"./calc":601,"./defaults":603,"./plot":605,"./style":606}],605:[function(require,module,exports){ +},{"./attributes":610,"./calc":611,"./defaults":613,"./plot":615,"./style":616}],615:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108271,7 +111825,7 @@ function errorCoords(d, xa, ya) { return out; } -},{"../../traces/scatter/subtypes":944,"d3":104,"fast-isnumeric":113}],606:[function(require,module,exports){ +},{"../../traces/scatter/subtypes":967,"d3":114,"fast-isnumeric":123}],616:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108308,7 +111862,7 @@ module.exports = function style(traces) { }); }; -},{"../color":575,"d3":104}],607:[function(require,module,exports){ +},{"../color":585,"d3":114}],617:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108430,7 +111984,7 @@ module.exports = { } }; -},{"../../plots/cartesian/constants":724}],608:[function(require,module,exports){ +},{"../../plots/cartesian/constants":734}],618:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108513,7 +112067,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":700,"fast-isnumeric":113}],609:[function(require,module,exports){ +},{"../../lib/to_log_range":710,"fast-isnumeric":123}],619:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108574,7 +112128,7 @@ function imageDefaults(imageIn, imageOut, fullLayout) { return imageOut; } -},{"../../lib":680,"../../plots/array_container_defaults":716,"../../plots/cartesian/axes":719,"./attributes":607}],610:[function(require,module,exports){ +},{"../../lib":690,"../../plots/array_container_defaults":726,"../../plots/cartesian/axes":729,"./attributes":617}],620:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108791,7 +112345,7 @@ module.exports = function draw(gd) { } }; -},{"../../constants/xmlns_namespaces":664,"../../plots/cartesian/axes":719,"../drawing":598,"d3":104}],611:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":674,"../../plots/cartesian/axes":729,"../drawing":608,"d3":114}],621:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108814,7 +112368,7 @@ module.exports = { convertCoords: require('./convert_coords') }; -},{"./attributes":607,"./convert_coords":608,"./defaults":609,"./draw":610}],612:[function(require,module,exports){ +},{"./attributes":617,"./convert_coords":618,"./defaults":619,"./draw":620}],622:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108863,7 +112417,7 @@ exports.isMiddleAnchor = function isMiddleAnchor(opts) { ); }; -},{}],613:[function(require,module,exports){ +},{}],623:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108954,7 +112508,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../../plots/font_attributes":739,"../color/attributes":574}],614:[function(require,module,exports){ +},{"../../lib/extend":682,"../../plots/font_attributes":753,"../color/attributes":584}],624:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108972,7 +112526,7 @@ module.exports = { scrollBarMargin: 4 }; -},{}],615:[function(require,module,exports){ +},{}],625:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109065,7 +112619,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) { Lib.noneOrAll(containerIn, containerOut, ['x', 'y']); }; -},{"../../lib":680,"../../plots/layout_attributes":769,"../../registry":793,"./attributes":613,"./helpers":618}],616:[function(require,module,exports){ +},{"../../lib":690,"../../plots/layout_attributes":783,"../../registry":807,"./attributes":623,"./helpers":628}],626:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109881,7 +113435,7 @@ function expandHorizontalMargin(gd) { }); } -},{"../../constants/interactions":661,"../../lib":680,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/plots":778,"../../registry":793,"../color":575,"../dragelement":596,"../drawing":598,"./anchor_utils":612,"./constants":614,"./get_legend_data":617,"./helpers":618,"./style":620,"d3":104}],617:[function(require,module,exports){ +},{"../../constants/interactions":671,"../../lib":690,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/plots":792,"../../registry":807,"../color":585,"../dragelement":606,"../drawing":608,"./anchor_utils":622,"./constants":624,"./get_legend_data":627,"./helpers":628,"./style":630,"d3":114}],627:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109986,7 +113540,7 @@ module.exports = function getLegendData(calcdata, opts) { return legendData; }; -},{"../../registry":793,"./helpers":618}],618:[function(require,module,exports){ +},{"../../registry":807,"./helpers":628}],628:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110017,7 +113571,7 @@ exports.isReversed = function isReversed(legendLayout) { return (legendLayout.traceorder || '').indexOf('reversed') !== -1; }; -},{"../../registry":793}],619:[function(require,module,exports){ +},{"../../registry":807}],629:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110041,7 +113595,7 @@ module.exports = { style: require('./style') }; -},{"./attributes":613,"./defaults":615,"./draw":616,"./style":620}],620:[function(require,module,exports){ +},{"./attributes":623,"./defaults":625,"./draw":626,"./style":630}],630:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110269,7 +113823,7 @@ function stylePies(d) { if(pts.size()) pts.call(stylePie, d[0], trace); } -},{"../../lib":680,"../../registry":793,"../../traces/pie/style_one":918,"../../traces/scatter/subtypes":944,"../color":575,"../drawing":598,"d3":104}],621:[function(require,module,exports){ +},{"../../lib":690,"../../registry":807,"../../traces/pie/style_one":932,"../../traces/scatter/subtypes":967,"../color":585,"../drawing":608,"d3":114}],631:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110791,7 +114345,7 @@ modeBarButtons.resetViews = { } }; -},{"../../../build/ploticon":2,"../../lib":680,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../../snapshot/download":795}],622:[function(require,module,exports){ +},{"../../../build/ploticon":2,"../../lib":690,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/plots":792,"../../snapshot/download":809}],632:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110805,7 +114359,7 @@ modeBarButtons.resetViews = { exports.manage = require('./manage'); -},{"./manage":623}],623:[function(require,module,exports){ +},{"./manage":633}],633:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111033,7 +114587,7 @@ function fillCustomButton(customButtons) { return customButtons; } -},{"../../plots/cartesian/axes":719,"../../traces/scatter/subtypes":944,"./buttons":621,"./modebar":624}],624:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"../../traces/scatter/subtypes":967,"./buttons":631,"./modebar":634}],634:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111323,7 +114877,7 @@ function createModeBar(gd, buttons) { module.exports = createModeBar; -},{"../../../build/ploticon":2,"../../lib":680,"d3":104}],625:[function(require,module,exports){ +},{"../../../build/ploticon":2,"../../lib":690,"d3":114}],635:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111413,7 +114967,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../../plots/font_attributes":739,"../color/attributes":574,"./button_attributes":626}],626:[function(require,module,exports){ +},{"../../lib/extend":682,"../../plots/font_attributes":753,"../color/attributes":584,"./button_attributes":636}],636:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111454,7 +115008,7 @@ module.exports = { } }; -},{}],627:[function(require,module,exports){ +},{}],637:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111483,7 +115037,7 @@ module.exports = { darkAmount: 10 }; -},{}],628:[function(require,module,exports){ +},{}],638:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111582,7 +115136,7 @@ function getPosDflt(containerOut, layout, counterAxes) { return [containerOut.domain[0], posY + constants.yPad]; } -},{"../../lib":680,"../color":575,"./attributes":625,"./button_attributes":626,"./constants":627}],629:[function(require,module,exports){ +},{"../../lib":690,"../color":585,"./attributes":635,"./button_attributes":636,"./constants":637}],639:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111857,7 +115411,7 @@ function reposition(gd, buttons, opts, axName) { }); } -},{"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/cartesian/axis_ids":722,"../../plots/plots":778,"../color":575,"../drawing":598,"../legend/anchor_utils":612,"./constants":627,"./get_update_object":630,"d3":104}],630:[function(require,module,exports){ +},{"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/cartesian/axis_ids":732,"../../plots/plots":792,"../color":585,"../drawing":608,"../legend/anchor_utils":622,"./constants":637,"./get_update_object":640,"d3":114}],640:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111914,7 +115468,7 @@ function getXRange(axisLayout, buttonLayout) { return [range0, range1]; } -},{"d3":104}],631:[function(require,module,exports){ +},{"d3":114}],641:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111941,7 +115495,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":625,"./defaults":628,"./draw":629}],632:[function(require,module,exports){ +},{"./attributes":635,"./defaults":638,"./draw":639}],642:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112005,7 +115559,7 @@ module.exports = { } }; -},{"../color/attributes":574}],633:[function(require,module,exports){ +},{"../color/attributes":584}],643:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112041,7 +115595,7 @@ module.exports = function calcAutorange(gd) { } }; -},{"../../plots/cartesian/axes":719,"./constants":634}],634:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"./constants":644}],644:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112093,7 +115647,7 @@ module.exports = { extraPad: 15 }; -},{}],635:[function(require,module,exports){ +},{}],645:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112150,7 +115704,7 @@ module.exports = function handleDefaults(layoutIn, layoutOut, axName) { containerOut._input = containerIn; }; -},{"../../lib":680,"./attributes":632}],636:[function(require,module,exports){ +},{"../../lib":690,"./attributes":642}],646:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112701,7 +116255,7 @@ function clearPushMargins(gd) { } } -},{"../../lib":680,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian":727,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../color":575,"../dragelement":596,"../drawing":598,"./constants":634,"d3":104}],637:[function(require,module,exports){ +},{"../../lib":690,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian":739,"../../plots/cartesian/axes":729,"../../plots/plots":792,"../color":585,"../dragelement":606,"../drawing":608,"./constants":644,"d3":114}],647:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112728,7 +116282,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":632,"./calc_autorange":633,"./defaults":635,"./draw":636}],638:[function(require,module,exports){ +},{"./attributes":642,"./calc_autorange":643,"./defaults":645,"./draw":646}],648:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112826,7 +116380,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../../traces/scatter/attributes":924,"../annotations/attributes":564}],639:[function(require,module,exports){ +},{"../../lib/extend":682,"../../traces/scatter/attributes":947,"../annotations/attributes":574}],649:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112903,7 +116457,7 @@ function shapeBounds(ax, v0, v1, path, paramsToUse) { if(max >= min) return [min, max]; } -},{"../../lib":680,"../../plots/cartesian/axes":719,"./constants":640,"./helpers":643}],640:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"./constants":650,"./helpers":653}],650:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112967,7 +116521,7 @@ module.exports = { } }; -},{}],641:[function(require,module,exports){ +},{}],651:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112992,7 +116546,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { handleArrayContainerDefaults(layoutIn, layoutOut, opts); }; -},{"../../plots/array_container_defaults":716,"./shape_defaults":645}],642:[function(require,module,exports){ +},{"../../plots/array_container_defaults":726,"./shape_defaults":655}],652:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113367,7 +116921,7 @@ function movePath(pathIn, moveX, moveY) { }); } -},{"../../lib":680,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian/axes":719,"../color":575,"../dragelement":596,"../drawing":598,"./constants":640,"./helpers":643}],643:[function(require,module,exports){ +},{"../../lib":690,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian/axes":729,"../color":585,"../dragelement":606,"../drawing":608,"./constants":650,"./helpers":653}],653:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113448,7 +117002,7 @@ exports.getPixelToData = function(gd, axis, isVertical) { return pixelToData; }; -},{}],644:[function(require,module,exports){ +},{}],654:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113474,7 +117028,7 @@ module.exports = { drawOne: drawModule.drawOne }; -},{"./attributes":638,"./calc_autorange":639,"./defaults":641,"./draw":642}],645:[function(require,module,exports){ +},{"./attributes":648,"./calc_autorange":649,"./defaults":651,"./draw":652}],655:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113573,7 +117127,7 @@ module.exports = function handleShapeDefaults(shapeIn, shapeOut, fullLayout, opt return shapeOut; }; -},{"../../lib":680,"../../plots/cartesian/axes":719,"./attributes":638,"./helpers":643}],646:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"./attributes":648,"./helpers":653}],656:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113807,7 +117361,7 @@ module.exports = { }, }; -},{"../../lib/extend":672,"../../plots/animation_attributes":715,"../../plots/font_attributes":739,"../../plots/pad_attributes":777,"./constants":647}],647:[function(require,module,exports){ +},{"../../lib/extend":682,"../../plots/animation_attributes":725,"../../plots/font_attributes":753,"../../plots/pad_attributes":791,"./constants":657}],657:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113904,7 +117458,7 @@ module.exports = { currentValueInset: 0, }; -},{}],648:[function(require,module,exports){ +},{}],658:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114017,7 +117571,7 @@ function stepsDefaults(sliderIn, sliderOut) { return valuesOut; } -},{"../../lib":680,"../../plots/array_container_defaults":716,"./attributes":646,"./constants":647}],649:[function(require,module,exports){ +},{"../../lib":690,"../../plots/array_container_defaults":726,"./attributes":656,"./constants":657}],659:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114619,7 +118173,7 @@ function clearPushMargins(gd) { } } -},{"../../lib/svg_text_utils":699,"../../plots/plots":778,"../color":575,"../drawing":598,"../legend/anchor_utils":612,"./constants":647,"d3":104}],650:[function(require,module,exports){ +},{"../../lib/svg_text_utils":709,"../../plots/plots":792,"../color":585,"../drawing":608,"../legend/anchor_utils":622,"./constants":657,"d3":114}],660:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114642,7 +118196,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":646,"./constants":647,"./defaults":648,"./draw":649}],651:[function(require,module,exports){ +},{"./attributes":656,"./constants":657,"./defaults":658,"./draw":659}],661:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114875,7 +118429,7 @@ Titles.draw = function(gd, titleClass, options) { el.classed('js-placeholder', isplaceholder); }; -},{"../../constants/interactions":661,"../../lib":680,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/plots":778,"../color":575,"../drawing":598,"d3":104,"fast-isnumeric":113}],652:[function(require,module,exports){ +},{"../../constants/interactions":671,"../../lib":690,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/plots":792,"../color":585,"../drawing":608,"d3":114,"fast-isnumeric":123}],662:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115022,7 +118576,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../../plots/font_attributes":739,"../../plots/pad_attributes":777,"../color/attributes":574}],653:[function(require,module,exports){ +},{"../../lib/extend":682,"../../plots/font_attributes":753,"../../plots/pad_attributes":791,"../color/attributes":584}],663:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115098,7 +118652,7 @@ module.exports = { hoverColor: '#F4FAFF' }; -},{}],654:[function(require,module,exports){ +},{}],664:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115192,7 +118746,7 @@ function buttonsDefaults(menuIn, menuOut) { return buttonsOut; } -},{"../../lib":680,"../../plots/array_container_defaults":716,"./attributes":652,"./constants":653}],655:[function(require,module,exports){ +},{"../../lib":690,"../../plots/array_container_defaults":726,"./attributes":662,"./constants":663}],665:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115872,9 +119426,9 @@ function clearPushMargins(gd) { } } -},{"../../lib/svg_text_utils":699,"../../plots/plots":778,"../color":575,"../drawing":598,"../legend/anchor_utils":612,"./constants":653,"./scrollbox":657,"d3":104}],656:[function(require,module,exports){ -arguments[4][650][0].apply(exports,arguments) -},{"./attributes":652,"./constants":653,"./defaults":654,"./draw":655,"dup":650}],657:[function(require,module,exports){ +},{"../../lib/svg_text_utils":709,"../../plots/plots":792,"../color":585,"../drawing":608,"../legend/anchor_utils":622,"./constants":663,"./scrollbox":667,"d3":114}],666:[function(require,module,exports){ +arguments[4][660][0].apply(exports,arguments) +},{"./attributes":662,"./constants":663,"./defaults":664,"./draw":665,"dup":660}],667:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116345,7 +119899,7 @@ ScrollBox.prototype.setTranslate = function setTranslate(translateX, translateY) } }; -},{"../../lib":680,"../color":575,"../drawing":598,"d3":104}],658:[function(require,module,exports){ +},{"../../lib":690,"../color":585,"../drawing":608,"d3":114}],668:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116366,7 +119920,7 @@ module.exports = { longdashdot: [8, 1, 1, 1] }; -},{}],659:[function(require,module,exports){ +},{}],669:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116387,7 +119941,7 @@ module.exports = { longdashdot: [[0.5, 0.7, 0.8, 1], 10] }; -},{}],660:[function(require,module,exports){ +},{}],670:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116410,7 +119964,7 @@ module.exports = { x: '❌' }; -},{}],661:[function(require,module,exports){ +},{}],671:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116434,7 +119988,7 @@ module.exports = { DBLCLICKDELAY: 300 }; -},{}],662:[function(require,module,exports){ +},{}],672:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116479,10 +120033,15 @@ module.exports = { * For fast conversion btwn world calendars and epoch ms, the Julian Day Number * of the unix epoch. From calendars.instance().newDate(1970, 1, 1).toJD() */ - EPOCHJD: 2440587.5 + EPOCHJD: 2440587.5, + + /* + * Are two values nearly equal? Compare to 1PPM + */ + ALMOST_EQUAL: 1 - 1e-6 }; -},{}],663:[function(require,module,exports){ +},{}],673:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116520,7 +120079,7 @@ module.exports = { }; -},{}],664:[function(require,module,exports){ +},{}],674:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116544,7 +120103,7 @@ exports.svgAttrs = { 'xmlns:xlink': exports.xlink }; -},{}],665:[function(require,module,exports){ +},{}],675:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116623,7 +120182,7 @@ exports.Queue = require('./lib/queue'); // export d3 used in the bundle exports.d3 = require('d3'); -},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":571,"./components/images":611,"./components/legend":619,"./components/rangeselector":631,"./components/rangeslider":637,"./components/shapes":644,"./components/sliders":650,"./components/updatemenus":656,"./fonts/mathjax_config":666,"./lib/queue":692,"./plot_api/plot_schema":708,"./plot_api/register":709,"./plot_api/set_plot_config":710,"./plot_api/to_image":712,"./plot_api/validate":713,"./plotly":714,"./snapshot":798,"./snapshot/download":795,"./traces/scatter":934,"d3":104,"es6-promise":110}],666:[function(require,module,exports){ +},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":581,"./components/images":621,"./components/legend":629,"./components/rangeselector":641,"./components/rangeslider":647,"./components/shapes":654,"./components/sliders":660,"./components/updatemenus":666,"./fonts/mathjax_config":676,"./lib/queue":702,"./plot_api/plot_schema":718,"./plot_api/register":719,"./plot_api/set_plot_config":720,"./plot_api/to_image":722,"./plot_api/validate":723,"./plotly":724,"./snapshot":812,"./snapshot/download":809,"./traces/scatter":957,"d3":114,"es6-promise":120}],676:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116656,7 +120215,7 @@ if(typeof MathJax !== 'undefined') { exports.MathJax = false; } -},{}],667:[function(require,module,exports){ +},{}],677:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116673,7 +120232,7 @@ module.exports = function arrayToCalcItem(traceAttr, calcItem, calcAttr, i) { if(Array.isArray(traceAttr)) calcItem[calcAttr] = traceAttr[i]; }; -},{}],668:[function(require,module,exports){ +},{}],678:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116706,7 +120265,7 @@ module.exports = function cleanNumber(v) { return BADNUM; }; -},{"../constants/numerical":662,"fast-isnumeric":113}],669:[function(require,module,exports){ +},{"../constants/numerical":672,"fast-isnumeric":123}],679:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117017,7 +120576,7 @@ exports.validate = function(value, opts) { return out !== failed; }; -},{"../components/colorscale/get_scale":587,"../components/colorscale/scales":593,"./nested_property":686,"fast-isnumeric":113,"tinycolor2":511}],670:[function(require,module,exports){ +},{"../components/colorscale/get_scale":597,"../components/colorscale/scales":603,"./nested_property":696,"fast-isnumeric":123,"tinycolor2":521}],680:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117645,7 +121204,7 @@ exports.findExactDates = function(data, calendar) { }; }; -},{"../constants/numerical":662,"../registry":793,"./loggers":683,"./mod":685,"d3":104,"fast-isnumeric":113}],671:[function(require,module,exports){ +},{"../constants/numerical":672,"../registry":807,"./loggers":693,"./mod":695,"d3":114,"fast-isnumeric":123}],681:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117811,7 +121370,7 @@ var Events = { module.exports = Events; -},{"events":111}],672:[function(require,module,exports){ +},{"events":121}],682:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117925,7 +121484,7 @@ function _extend(inputs, isDeep, keepAllKeys, noArrayCopies) { return target; } -},{"./is_plain_object.js":682}],673:[function(require,module,exports){ +},{"./is_plain_object.js":692}],683:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117976,7 +121535,7 @@ module.exports = function filterUnique(array) { return out; }; -},{}],674:[function(require,module,exports){ +},{}],684:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118007,7 +121566,7 @@ module.exports = function filterVisible(container) { return out; }; -},{}],675:[function(require,module,exports){ +},{}],685:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118069,7 +121628,7 @@ function countryNameToISO3(countryName) { return false; } -},{"../lib":680,"country-regex":97}],676:[function(require,module,exports){ +},{"../lib":690,"country-regex":99}],686:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118081,6 +121640,8 @@ function countryNameToISO3(countryName) { 'use strict'; +var BADNUM = require('../constants/numerical').BADNUM; + /** * Convert calcTrace to GeoJSON 'MultiLineString' coordinate arrays * @@ -118093,18 +121654,19 @@ function countryNameToISO3(countryName) { * */ exports.calcTraceToLineCoords = function(calcTrace) { - var trace = calcTrace[0].trace, - connectgaps = trace.connectgaps; + var trace = calcTrace[0].trace; + var connectgaps = trace.connectgaps; - var coords = [], - lineString = []; + var coords = []; + var lineString = []; for(var i = 0; i < calcTrace.length; i++) { var calcPt = calcTrace[i]; + var lonlat = calcPt.lonlat; - lineString.push(calcPt.lonlat); - - if(!connectgaps && calcPt.gapAfter && lineString.length > 0) { + if(lonlat[0] !== BADNUM) { + lineString.push(lonlat); + } else if(!connectgaps && lineString.length > 0) { coords.push(lineString); lineString = []; } @@ -118203,7 +121765,7 @@ exports.makeBlank = function() { }; }; -},{}],677:[function(require,module,exports){ +},{"../constants/numerical":672}],687:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118291,7 +121853,7 @@ function formatColor(containerIn, opacityIn, len) { module.exports = formatColor; -},{"../components/color/attributes":574,"../components/colorscale":589,"color-rgba":85,"fast-isnumeric":113}],678:[function(require,module,exports){ +},{"../components/color/attributes":584,"../components/colorscale":599,"color-rgba":87,"fast-isnumeric":123}],688:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118360,7 +121922,7 @@ function convertHTMLToUnicode(html) { module.exports = convertHTMLToUnicode; -},{"../constants/string_mappings":663,"superscript-text":507}],679:[function(require,module,exports){ +},{"../constants/string_mappings":673,"superscript-text":517}],689:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118376,7 +121938,7 @@ module.exports = convertHTMLToUnicode; module.exports = function identity(d) { return d; }; -},{}],680:[function(require,module,exports){ +},{}],690:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119016,7 +122578,7 @@ lib.numSeparate = function(value, separators, separatethousands) { return x1 + x2; }; -},{"./clean_number":668,"./coerce":669,"./dates":670,"./extend":672,"./filter_unique":673,"./filter_visible":674,"./identity":679,"./is_array":681,"./is_plain_object":682,"./loggers":683,"./matrix":684,"./mod":685,"./nested_property":686,"./noop":687,"./notifier":688,"./push_unique":691,"./relink_private":693,"./search":694,"./stats":697,"./to_log_range":700,"d3":104}],681:[function(require,module,exports){ +},{"./clean_number":678,"./coerce":679,"./dates":680,"./extend":682,"./filter_unique":683,"./filter_visible":684,"./identity":689,"./is_array":691,"./is_plain_object":692,"./loggers":693,"./matrix":694,"./mod":695,"./nested_property":696,"./noop":697,"./notifier":698,"./push_unique":701,"./relink_private":703,"./search":704,"./stats":707,"./to_log_range":710,"d3":114}],691:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119040,7 +122602,7 @@ module.exports = function isArray(a) { return Array.isArray(a) || ab.isView(a); }; -},{}],682:[function(require,module,exports){ +},{}],692:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119069,7 +122631,7 @@ module.exports = function isPlainObject(obj) { ); }; -},{}],683:[function(require,module,exports){ +},{}],693:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119143,7 +122705,7 @@ function apply(f, args) { } } -},{"../plot_api/plot_config":707}],684:[function(require,module,exports){ +},{"../plot_api/plot_config":717}],694:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119253,7 +122815,7 @@ exports.apply2DTransform2 = function(transform) { }; }; -},{}],685:[function(require,module,exports){ +},{}],695:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119273,7 +122835,7 @@ module.exports = function mod(v, d) { return out < 0 ? out + d : out; }; -},{}],686:[function(require,module,exports){ +},{}],696:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119577,7 +123139,7 @@ function badContainer(container, propStr, propParts) { }; } -},{"../plot_api/container_array_match":703,"./is_array":681,"./is_plain_object":682,"fast-isnumeric":113}],687:[function(require,module,exports){ +},{"../plot_api/container_array_match":713,"./is_array":691,"./is_plain_object":692,"fast-isnumeric":123}],697:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119593,7 +123155,7 @@ function badContainer(container, propStr, propParts) { module.exports = function noop() {}; -},{}],688:[function(require,module,exports){ +},{}],698:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119675,7 +123237,7 @@ module.exports = function(text, displayLength) { }); }; -},{"d3":104,"fast-isnumeric":113}],689:[function(require,module,exports){ +},{"d3":114,"fast-isnumeric":123}],699:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119724,7 +123286,7 @@ module.exports = function overrideCursor(el3, csr) { } }; -},{"./setcursor":695}],690:[function(require,module,exports){ +},{"./setcursor":705}],700:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119964,7 +123526,7 @@ polygon.filter = function filter(pts, tolerance) { }; }; -},{"./matrix":684}],691:[function(require,module,exports){ +},{"./matrix":694}],701:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120002,7 +123564,7 @@ module.exports = function pushUnique(array, item) { return array; }; -},{}],692:[function(require,module,exports){ +},{}],702:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120213,7 +123775,7 @@ queue.plotDo = function(gd, func, args) { module.exports = queue; -},{"../lib":680,"../plot_api/plot_config":707}],693:[function(require,module,exports){ +},{"../lib":690,"../plot_api/plot_config":717}],703:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120270,7 +123832,7 @@ module.exports = function relinkPrivateKeys(toContainer, fromContainer) { } }; -},{"./is_array":681,"./is_plain_object":682}],694:[function(require,module,exports){ +},{"./is_array":691,"./is_plain_object":692}],704:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120381,7 +123943,7 @@ exports.roundUp = function(val, arrayIn, reverse) { return arrayIn[low]; }; -},{"./loggers":683,"fast-isnumeric":113}],695:[function(require,module,exports){ +},{"./loggers":693,"fast-isnumeric":123}],705:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120404,7 +123966,7 @@ module.exports = function setCursor(el3, csr) { if(csr) el3.classed('cursor-' + csr, true); }; -},{}],696:[function(require,module,exports){ +},{}],706:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120453,7 +124015,7 @@ module.exports = function showWebGlMsg(scene) { return false; }; -},{"../components/color":575}],697:[function(require,module,exports){ +},{"../components/color":585}],707:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120549,7 +124111,7 @@ exports.interp = function(arr, n) { return frac * arr[Math.ceil(n)] + (1 - frac) * arr[Math.floor(n)]; }; -},{"fast-isnumeric":113}],698:[function(require,module,exports){ +},{"fast-isnumeric":123}],708:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120570,7 +124132,7 @@ function str2RgbaArray(color) { module.exports = str2RgbaArray; -},{"color-rgba":85}],699:[function(require,module,exports){ +},{"color-rgba":87}],709:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121111,7 +124673,7 @@ exports.makeEditable = function(context, _delegate, options) { return d3.rebind(this, dispatch, 'on'); }; -},{"../constants/string_mappings":663,"../constants/xmlns_namespaces":664,"../lib":680,"d3":104}],700:[function(require,module,exports){ +},{"../constants/string_mappings":673,"../constants/xmlns_namespaces":674,"../lib":690,"d3":114}],710:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121139,7 +124701,7 @@ module.exports = function toLogRange(val, range) { return newVal; }; -},{"fast-isnumeric":113}],701:[function(require,module,exports){ +},{"fast-isnumeric":123}],711:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121175,7 +124737,7 @@ topojsonUtils.getTopojsonFeatures = function(trace, topojson) { return topojsonFeature(topojson, obj).features; }; -},{"../plots/geo/constants":741,"topojson-client":513}],702:[function(require,module,exports){ +},{"../plots/geo/constants":755,"topojson-client":523}],712:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121209,7 +124771,7 @@ module.exports = function truncate(arrayIn, len) { throw new Error('This array type is not yet supported by `truncate`.'); }; -},{}],703:[function(require,module,exports){ +},{}],713:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121267,7 +124829,7 @@ module.exports = function containerArrayMatch(astr) { return {array: arrayStr, index: Number(match[1]), property: match[3] || ''}; }; -},{"../registry":793}],704:[function(require,module,exports){ +},{"../registry":807}],714:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121788,7 +125350,7 @@ exports.hasParent = function(aobj, attr) { return false; }; -},{"../components/color":575,"../lib":680,"../plots/cartesian/axes":719,"../plots/plots":778,"../registry":793,"fast-isnumeric":113,"gl-mat4/fromQuat":159}],705:[function(require,module,exports){ +},{"../components/color":585,"../lib":690,"../plots/cartesian/axes":729,"../plots/plots":792,"../registry":807,"fast-isnumeric":123,"gl-mat4/fromQuat":169}],715:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122001,7 +125563,7 @@ exports.applyContainerArrayChanges = function applyContainerArrayChanges(gd, np, return true; }; -},{"../lib/is_plain_object":682,"../lib/loggers":683,"../lib/nested_property":686,"../lib/noop":687,"../registry":793,"./container_array_match":703}],706:[function(require,module,exports){ +},{"../lib/is_plain_object":692,"../lib/loggers":693,"../lib/nested_property":696,"../lib/noop":697,"../registry":807,"./container_array_match":713}],716:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122036,6 +125598,8 @@ var manageArrays = require('./manage_arrays'); var helpers = require('./helpers'); var subroutines = require('./subroutines'); var cartesianConstants = require('../plots/cartesian/constants'); +var enforceAxisConstraints = require('../plots/cartesian/constraints'); +var axisIds = require('../plots/cartesian/axis_ids'); /** @@ -122155,10 +125719,6 @@ Plotly.plot = function(gd, data, layout, config) { makePlotFramework(gd); } - // save initial axis range once per graph - if(graphWasEmpty) Plotly.Axes.saveRangeInitial(gd); - - // prepare the data and find the autorange // generate calcdata, if we need to @@ -122260,18 +125820,24 @@ Plotly.plot = function(gd, data, layout, config) { return Lib.syncOrAsync([ Registry.getComponentMethod('shapes', 'calcAutorange'), Registry.getComponentMethod('annotations', 'calcAutorange'), - doAutoRange, + doAutoRangeAndConstraints, Registry.getComponentMethod('rangeslider', 'calcAutorange') ], gd); } - function doAutoRange() { + function doAutoRangeAndConstraints() { if(gd._transitioning) return; var axList = Plotly.Axes.list(gd, '', true); for(var i = 0; i < axList.length; i++) { Plotly.Axes.doAutoRange(axList[i]); } + + enforceAxisConstraints(gd); + + // store initial ranges *after* enforcing constraints, otherwise + // we will never look like we're at the initial ranges + if(graphWasEmpty) Plotly.Axes.saveRangeInitial(gd); } // draw ticks, titles, and calculate axis scaling (._b, ._m) @@ -123584,6 +127150,12 @@ function _restyle(gd, aobj, _traces) { var moduleAttrs = (contFull._module || {}).attributes || {}; var valObject = Lib.nestedProperty(moduleAttrs, ai).get() || {}; + // if restyling entire attribute container, assume worse case + if(!valObject.valType) { + flags.docalc = true; + } + + // must redo calcdata when restyling array values of arrayOk attributes if(valObject.arrayOk && (Array.isArray(newVal) || Array.isArray(oldVal))) { flags.docalc = true; } @@ -123861,6 +127433,16 @@ function _relayout(gd, aobj) { return (ax || {}).autorange; } + // for constraint enforcement: keep track of all axes (as {id: name}) + // we're editing the (auto)range of, so we can tell the others constrained + // to scale with them that it's OK for them to shrink + var rangesAltered = {}; + + function recordAlteredAxis(pleafPlus) { + var axId = axisIds.name2id(pleafPlus.split('.')[0]); + rangesAltered[axId] = 1; + } + // alter gd.layout for(var ai in aobj) { if(helpers.hasParent(aobj, ai)) { @@ -123895,15 +127477,17 @@ function _relayout(gd, aobj) { // // To do so, we must manually set them back here using the _initialAutoSize cache. if(['width', 'height'].indexOf(ai) !== -1 && vi === null) { - gd._fullLayout[ai] = gd._initialAutoSize[ai]; + fullLayout[ai] = gd._initialAutoSize[ai]; } // check autorange vs range else if(pleafPlus.match(/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/)) { doextra(ptrunk + '.autorange', false); + recordAlteredAxis(pleafPlus); } else if(pleafPlus.match(/^[xyz]axis[0-9]*\.autorange$/)) { doextra([ptrunk + '.range[0]', ptrunk + '.range[1]'], undefined); + recordAlteredAxis(pleafPlus); } else if(pleafPlus.match(/^aspectratio\.[xyz]$/)) { doextra(proot + '.aspectmode', 'manual'); @@ -124067,6 +127651,18 @@ function _relayout(gd, aobj) { else if(proot.indexOf('geo') === 0) flags.doplot = true; else if(proot.indexOf('ternary') === 0) flags.doplot = true; else if(ai === 'paper_bgcolor') flags.doplot = true; + else if(proot === 'margin' || + pp1 === 'autorange' || + pp1 === 'rangemode' || + pp1 === 'type' || + pp1 === 'domain' || + pp1 === 'fixedrange' || + pp1 === 'scaleanchor' || + pp1 === 'scaleratio' || + ai.indexOf('calendar') !== -1 || + ai.match(/^(bar|box|font)/)) { + flags.docalc = true; + } else if(fullLayout._has('gl2d') && (ai.indexOf('axis') !== -1 || ai === 'plot_bgcolor') ) flags.doplot = true; @@ -124090,15 +127686,6 @@ function _relayout(gd, aobj) { else if(ai === 'margin.pad') { flags.doticks = flags.dolayoutstyle = true; } - else if(proot === 'margin' || - pp1 === 'autorange' || - pp1 === 'rangemode' || - pp1 === 'type' || - pp1 === 'domain' || - ai.indexOf('calendar') !== -1 || - ai.match(/^(bar|box|font)/)) { - flags.docalc = true; - } /* * hovermode and dragmode don't need any redrawing, since they just * affect reaction to user input, everything else, assume full replot. @@ -124122,16 +127709,37 @@ function _relayout(gd, aobj) { if(!finished) flags.doplot = true; } - var oldWidth = gd._fullLayout.width, - oldHeight = gd._fullLayout.height; + // figure out if we need to recalculate axis constraints + var constraints = fullLayout._axisConstraintGroups; + for(var axId in rangesAltered) { + for(i = 0; i < constraints.length; i++) { + var group = constraints[i]; + if(group[axId]) { + // Always recalc if we're changing constrained ranges. + // Otherwise it's possible to violate the constraints by + // specifying arbitrary ranges for all axes in the group. + // this way some ranges may expand beyond what's specified, + // as they do at first draw, to satisfy the constraints. + flags.docalc = true; + for(var groupAxId in group) { + if(!rangesAltered[groupAxId]) { + axisIds.getFromId(gd, groupAxId)._constraintShrinkable = true; + } + } + } + } + } + + var oldWidth = fullLayout.width, + oldHeight = fullLayout.height; // calculate autosizing - if(gd.layout.autosize) Plots.plotAutoSize(gd, gd.layout, gd._fullLayout); + if(gd.layout.autosize) Plots.plotAutoSize(gd, gd.layout, fullLayout); // avoid unnecessary redraws var hasSizechanged = aobj.height || aobj.width || - (gd._fullLayout.width !== oldWidth) || - (gd._fullLayout.height !== oldHeight); + (fullLayout.width !== oldWidth) || + (fullLayout.height !== oldHeight); if(hasSizechanged) flags.docalc = true; @@ -124768,6 +128376,13 @@ Plotly.deleteFrames = function(gd, frameList) { var ops = []; var revops = []; + if(!frameList) { + frameList = []; + for(i = 0; i < _frames.length; i++) { + frameList.push(i); + } + } + frameList = frameList.slice(0); frameList.sort(); @@ -124930,7 +128545,7 @@ function makePlotFramework(gd) { gd.emit('plotly_framework'); } -},{"../components/drawing":598,"../components/errorbars":604,"../constants/xmlns_namespaces":664,"../lib":680,"../lib/events":671,"../lib/queue":692,"../lib/svg_text_utils":699,"../plotly":714,"../plots/cartesian/constants":724,"../plots/cartesian/graph_interact":726,"../plots/plots":778,"../plots/polar":781,"../registry":793,"./helpers":704,"./manage_arrays":705,"./subroutines":711,"d3":104,"fast-isnumeric":113}],707:[function(require,module,exports){ +},{"../components/drawing":608,"../components/errorbars":614,"../constants/xmlns_namespaces":674,"../lib":690,"../lib/events":681,"../lib/queue":702,"../lib/svg_text_utils":709,"../plotly":724,"../plots/cartesian/axis_ids":732,"../plots/cartesian/constants":734,"../plots/cartesian/constraints":736,"../plots/cartesian/graph_interact":738,"../plots/plots":792,"../plots/polar":795,"../registry":807,"./helpers":714,"./manage_arrays":715,"./subroutines":721,"d3":114,"fast-isnumeric":123}],717:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125056,7 +128671,7 @@ function defaultSetBackground(gd, bgColor) { } } -},{}],708:[function(require,module,exports){ +},{}],718:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125462,7 +129077,7 @@ function insertAttrs(baseAttrs, newAttrs, astr) { np.set(extendDeep(np.get() || {}, newAttrs)); } -},{"../lib":680,"../plots/animation_attributes":715,"../plots/attributes":717,"../plots/frame_attributes":740,"../plots/layout_attributes":769,"../plots/polar/area_attributes":779,"../plots/polar/axis_attributes":780,"../registry":793}],709:[function(require,module,exports){ +},{"../lib":690,"../plots/animation_attributes":725,"../plots/attributes":727,"../plots/frame_attributes":754,"../plots/layout_attributes":783,"../plots/polar/area_attributes":793,"../plots/polar/axis_attributes":794,"../registry":807}],719:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125561,7 +129176,7 @@ function registerComponentModule(newModule) { Registry.registerComponent(newModule); } -},{"../lib":680,"../registry":793}],710:[function(require,module,exports){ +},{"../lib":690,"../registry":807}],720:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125587,7 +129202,7 @@ module.exports = function setPlotConfig(configObj) { return Lib.extendFlat(Plotly.defaultConfig, configObj); }; -},{"../lib":680,"../plotly":714}],711:[function(require,module,exports){ +},{"../lib":690,"../plotly":724}],721:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125994,7 +129609,7 @@ exports.doCamera = function(gd) { } }; -},{"../components/color":575,"../components/drawing":598,"../components/modebar":622,"../components/titles":651,"../lib":680,"../plotly":714,"../plots/plots":778,"../registry":793,"d3":104}],712:[function(require,module,exports){ +},{"../components/color":585,"../components/drawing":608,"../components/modebar":632,"../components/titles":661,"../lib":690,"../plotly":724,"../plots/plots":792,"../registry":807,"d3":114}],722:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126104,7 +129719,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":680,"../plotly":714,"../snapshot/cloneplot":794,"../snapshot/helpers":797,"../snapshot/svgtoimg":799,"../snapshot/tosvg":801,"fast-isnumeric":113}],713:[function(require,module,exports){ +},{"../lib":690,"../plotly":724,"../snapshot/cloneplot":808,"../snapshot/helpers":811,"../snapshot/svgtoimg":813,"../snapshot/tosvg":815,"fast-isnumeric":123}],723:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126475,7 +130090,7 @@ function convertPathToAttributeString(path) { return astr; } -},{"../lib":680,"../plots/plots":778,"./plot_schema":708}],714:[function(require,module,exports){ +},{"../lib":690,"../plots/plots":792,"./plot_schema":718}],724:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126508,7 +130123,7 @@ exports.ModeBar = require('./components/modebar'); // plot api require('./plot_api/plot_api'); -},{"./components/modebar":622,"./plot_api/plot_api":706,"./plot_api/plot_config":707,"./plots/cartesian/axes":719,"./plots/cartesian/graph_interact":726,"./plots/plots":778}],715:[function(require,module,exports){ +},{"./components/modebar":632,"./plot_api/plot_api":716,"./plot_api/plot_config":717,"./plots/cartesian/axes":729,"./plots/cartesian/graph_interact":738,"./plots/plots":792}],725:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126610,7 +130225,7 @@ module.exports = { } }; -},{}],716:[function(require,module,exports){ +},{}],726:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126691,7 +130306,7 @@ module.exports = function handleArrayContainerDefaults(parentObjIn, parentObjOut } }; -},{"../lib":680}],717:[function(require,module,exports){ +},{"../lib":690}],727:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126774,7 +130389,7 @@ module.exports = { } }; -},{}],718:[function(require,module,exports){ +},{}],728:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126801,7 +130416,7 @@ module.exports = { } }; -},{}],719:[function(require,module,exports){ +},{}],729:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129009,7 +132624,7 @@ function swapAxisAttrs(layout, key, xFullAxes, yFullAxes) { } } -},{"../../components/color":575,"../../components/drawing":598,"../../components/titles":651,"../../constants/numerical":662,"../../lib":680,"../../lib/svg_text_utils":699,"../../registry":793,"./axis_ids":722,"./layout_attributes":728,"./layout_defaults":729,"./set_convert":733,"d3":104,"fast-isnumeric":113}],720:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"../../components/titles":661,"../../constants/numerical":672,"../../lib":690,"../../lib/svg_text_utils":709,"../../registry":807,"./axis_ids":732,"./layout_attributes":740,"./layout_defaults":741,"./set_convert":746,"d3":114,"fast-isnumeric":123}],730:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129084,7 +132699,7 @@ function category(a) { return curvecats > curvenums * 2; } -},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],721:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],731:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129109,8 +132724,6 @@ var handleTickLabelDefaults = require('./tick_label_defaults'); var handleCategoryOrderDefaults = require('./category_order_defaults'); var setConvert = require('./set_convert'); var orderedCategories = require('./ordered_categories'); -var axisIds = require('./axis_ids'); -var autoType = require('./axis_autotype'); /** @@ -129118,12 +132731,11 @@ var autoType = require('./axis_autotype'); * * letter: 'x' or 'y' * title: name of the axis (ie 'Colorbar') to go in default title - * name: axis object name (ie 'xaxis') if one should be stored * font: the default font to inherit * outerTicks: boolean, should ticks default to outside? * showGrid: boolean, should gridlines be shown by default? * noHover: boolean, this axis doesn't support hover effects? - * data: the plot data to use in choosing auto type + * data: the plot data, used to manage categories * bgColor: the plot background color, to calculate default gridline colors */ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, options, layoutOut) { @@ -129137,28 +132749,7 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, return Lib.coerce2(containerIn, containerOut, layoutAttributes, attr, dflt); } - // set up some private properties - if(options.name) { - containerOut._name = options.name; - containerOut._id = axisIds.name2id(options.name); - } - - // now figure out type and do some more initialization - var axType = coerce('type'); - if(axType === '-') { - setAutoType(containerOut, options.data); - - if(containerOut.type === '-') { - containerOut.type = 'linear'; - } - else { - // copy autoType back to input axis - // note that if this object didn't exist - // in the input layout, we have to put it in - // this happens in the main supplyDefaults function - axType = containerIn.type = containerOut.type; - } - } + var axType = containerOut.type; if(axType === 'date') { var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleDefaults'); @@ -129228,91 +132819,7 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, return containerOut; }; -function setAutoType(ax, data) { - // new logic: let people specify any type they want, - // only autotype if type is '-' - if(ax.type !== '-') return; - - var id = ax._id, - axLetter = id.charAt(0); - - // support 3d - if(id.indexOf('scene') !== -1) id = axLetter; - - var d0 = getFirstNonEmptyTrace(data, id, axLetter); - if(!d0) return; - - // first check for histograms, as the count direction - // should always default to a linear axis - if(d0.type === 'histogram' && - axLetter === {v: 'y', h: 'x'}[d0.orientation || 'v']) { - ax.type = 'linear'; - return; - } - - var calAttr = axLetter + 'calendar', - calendar = d0[calAttr]; - - // check all boxes on this x axis to see - // if they're dates, numbers, or categories - if(isBoxWithoutPositionCoords(d0, axLetter)) { - var posLetter = getBoxPosLetter(d0), - boxPositions = [], - trace; - - for(var i = 0; i < data.length; i++) { - trace = data[i]; - if(!Registry.traceIs(trace, 'box') || - (trace[axLetter + 'axis'] || axLetter) !== id) continue; - - if(trace[posLetter] !== undefined) boxPositions.push(trace[posLetter][0]); - else if(trace.name !== undefined) boxPositions.push(trace.name); - else boxPositions.push('text'); - - if(trace[calAttr] !== calendar) calendar = undefined; - } - - ax.type = autoType(boxPositions, calendar); - } - else { - ax.type = autoType(d0[axLetter] || [d0[axLetter + '0']], calendar); - } -} - -function getBoxPosLetter(trace) { - return {v: 'x', h: 'y'}[trace.orientation || 'v']; -} - -function isBoxWithoutPositionCoords(trace, axLetter) { - var posLetter = getBoxPosLetter(trace), - isBox = Registry.traceIs(trace, 'box'), - isCandlestick = Registry.traceIs(trace._fullInput || {}, 'candlestick'); - - return ( - isBox && - !isCandlestick && - axLetter === posLetter && - trace[posLetter] === undefined && - trace[posLetter + '0'] === undefined - ); -} - -function getFirstNonEmptyTrace(data, id, axLetter) { - for(var i = 0; i < data.length; i++) { - var trace = data[i]; - - if((trace[axLetter + 'axis'] || axLetter) === id) { - if(isBoxWithoutPositionCoords(trace, axLetter)) { - return trace; - } - else if((trace[axLetter] || []).length || trace[axLetter + '0']) { - return trace; - } - } - } -} - -},{"../../components/color/attributes":574,"../../lib":680,"../../registry":793,"./axis_autotype":720,"./axis_ids":722,"./category_order_defaults":723,"./layout_attributes":728,"./ordered_categories":730,"./set_convert":733,"./tick_label_defaults":734,"./tick_mark_defaults":735,"./tick_value_defaults":736,"tinycolor2":511}],722:[function(require,module,exports){ +},{"../../components/color/attributes":584,"../../lib":690,"../../registry":807,"./category_order_defaults":733,"./layout_attributes":740,"./ordered_categories":742,"./set_convert":746,"./tick_label_defaults":747,"./tick_mark_defaults":748,"./tick_value_defaults":749,"tinycolor2":521}],732:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129434,7 +132941,7 @@ exports.getFromTrace = function(gd, fullTrace, type) { return ax; }; -},{"../../lib":680,"../../registry":793,"../plots":778,"./constants":724}],723:[function(require,module,exports){ +},{"../../lib":690,"../../registry":807,"../plots":792,"./constants":734}],733:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129468,7 +132975,7 @@ module.exports = function handleCategoryOrderDefaults(containerIn, containerOut, } }; -},{}],724:[function(require,module,exports){ +},{}],734:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129538,7 +133045,222 @@ module.exports = { DFLTRANGEY: [-1, 4] }; -},{}],725:[function(require,module,exports){ +},{}],735:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Lib = require('../../lib'); +var id2name = require('./axis_ids').id2name; + + +module.exports = function handleConstraintDefaults(containerIn, containerOut, coerce, allAxisIds, layoutOut) { + var constraintGroups = layoutOut._axisConstraintGroups; + + if(containerOut.fixedrange || !containerIn.scaleanchor) return; + + var constraintOpts = getConstraintOpts(constraintGroups, containerOut._id, allAxisIds, layoutOut); + + var scaleanchor = Lib.coerce(containerIn, containerOut, { + scaleanchor: { + valType: 'enumerated', + values: constraintOpts.linkableAxes + } + }, 'scaleanchor'); + + if(scaleanchor) { + var scaleratio = coerce('scaleratio'); + // TODO: I suppose I could do attribute.min: Number.MIN_VALUE to avoid zero, + // but that seems hacky. Better way to say "must be a positive number"? + // Of course if you use several super-tiny values you could eventually + // force a product of these to zero and all hell would break loose... + // Likewise with super-huge values. + if(!scaleratio) scaleratio = containerOut.scaleratio = 1; + + updateConstraintGroups(constraintGroups, constraintOpts.thisGroup, + containerOut._id, scaleanchor, scaleratio); + } + else if(allAxisIds.indexOf(containerIn.scaleanchor) !== -1) { + Lib.warn('ignored ' + containerOut._name + '.scaleanchor: "' + + containerIn.scaleanchor + '" to avoid either an infinite loop ' + + 'and possibly inconsistent scaleratios, or because the target' + + 'axis has fixed range.'); + } +}; + +function getConstraintOpts(constraintGroups, thisID, allAxisIds, layoutOut) { + // If this axis is already part of a constraint group, we can't + // scaleanchor any other axis in that group, or we'd make a loop. + // Filter allAxisIds to enforce this, also matching axis types. + + var thisType = layoutOut[id2name(thisID)].type; + + var i, j, idj, axj; + + var linkableAxes = []; + for(j = 0; j < allAxisIds.length; j++) { + idj = allAxisIds[j]; + if(idj === thisID) continue; + + axj = layoutOut[id2name(idj)]; + if(axj.type === thisType && !axj.fixedrange) linkableAxes.push(idj); + } + + for(i = 0; i < constraintGroups.length; i++) { + if(constraintGroups[i][thisID]) { + var thisGroup = constraintGroups[i]; + + var linkableAxesNoLoops = []; + for(j = 0; j < linkableAxes.length; j++) { + idj = linkableAxes[j]; + if(!thisGroup[idj]) linkableAxesNoLoops.push(idj); + } + return {linkableAxes: linkableAxesNoLoops, thisGroup: thisGroup}; + } + } + + return {linkableAxes: linkableAxes, thisGroup: null}; +} + + +/* + * Add this axis to the axis constraint groups, which is the collection + * of axes that are all constrained together on scale. + * + * constraintGroups: a list of objects. each object is + * {axis_id: scale_within_group}, where scale_within_group is + * only important relative to the rest of the group, and defines + * the relative scales between all axes in the group + * + * thisGroup: the group the current axis is already in + * thisID: the id if the current axis + * scaleanchor: the id of the axis to scale it with + * scaleratio: the ratio of this axis to the scaleanchor axis + */ +function updateConstraintGroups(constraintGroups, thisGroup, thisID, scaleanchor, scaleratio) { + var i, j, groupi, keyj, thisGroupIndex; + + if(thisGroup === null) { + thisGroup = {}; + thisGroup[thisID] = 1; + thisGroupIndex = constraintGroups.length; + constraintGroups.push(thisGroup); + } + else { + thisGroupIndex = constraintGroups.indexOf(thisGroup); + } + + var thisGroupKeys = Object.keys(thisGroup); + + // we know that this axis isn't in any other groups, but we don't know + // about the scaleanchor axis. If it is, we need to merge the groups. + for(i = 0; i < constraintGroups.length; i++) { + groupi = constraintGroups[i]; + if(i !== thisGroupIndex && groupi[scaleanchor]) { + var baseScale = groupi[scaleanchor]; + for(j = 0; j < thisGroupKeys.length; j++) { + keyj = thisGroupKeys[j]; + groupi[keyj] = baseScale * scaleratio * thisGroup[keyj]; + } + constraintGroups.splice(thisGroupIndex, 1); + return; + } + } + + // otherwise, we insert the new scaleanchor axis as the base scale (1) + // in its group, and scale the rest of the group to it + if(scaleratio !== 1) { + for(j = 0; j < thisGroupKeys.length; j++) { + thisGroup[thisGroupKeys[j]] *= scaleratio; + } + } + thisGroup[scaleanchor] = 1; +} + +},{"../../lib":690,"./axis_ids":732}],736:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var id2name = require('./axis_ids').id2name; +var scaleZoom = require('./scale_zoom'); + +var ALMOST_EQUAL = require('../../constants/numerical').ALMOST_EQUAL; + + +module.exports = function enforceAxisConstraints(gd) { + var fullLayout = gd._fullLayout; + var constraintGroups = fullLayout._axisConstraintGroups; + + var i, j, axisID, ax, normScale; + + for(i = 0; i < constraintGroups.length; i++) { + var group = constraintGroups[i]; + var axisIDs = Object.keys(group); + + var minScale = Infinity; + var maxScale = 0; + // mostly matchScale will be the same as minScale + // ie we expand axis ranges to encompass *everything* + // that's currently in any of their ranges, but during + // autorange of a subset of axes we will ignore other + // axes for this purpose. + var matchScale = Infinity; + var normScales = {}; + var axes = {}; + + // find the (normalized) scale of each axis in the group + for(j = 0; j < axisIDs.length; j++) { + axisID = axisIDs[j]; + axes[axisID] = ax = fullLayout[id2name(axisID)]; + + // set axis scale here so we can use _m rather than + // having to calculate it from length and range + ax.setScale(); + + // abs: inverted scales still satisfy the constraint + normScales[axisID] = normScale = Math.abs(ax._m) / group[axisID]; + minScale = Math.min(minScale, normScale); + if(ax._constraintShrinkable) { + // this has served its purpose, so remove it + delete ax._constraintShrinkable; + } + else { + matchScale = Math.min(matchScale, normScale); + } + maxScale = Math.max(maxScale, normScale); + } + + // Do we have a constraint mismatch? Give a small buffer for rounding errors + if(minScale > ALMOST_EQUAL * maxScale) continue; + + // now increase any ranges we need to until all normalized scales are equal + for(j = 0; j < axisIDs.length; j++) { + axisID = axisIDs[j]; + normScale = normScales[axisID]; + + if(normScale !== matchScale) { + scaleZoom(axes[axisID], normScale / matchScale); + } + } + } +}; + +},{"../../constants/numerical":672,"./axis_ids":732,"./scale_zoom":744}],737:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129562,9 +133284,14 @@ var Drawing = require('../../components/drawing'); var setCursor = require('../../lib/setcursor'); var dragElement = require('../../components/dragelement'); -var Axes = require('./axes'); +var doTicks = require('./axes').doTicks; +var getFromId = require('./axis_ids').getFromId; var prepSelect = require('./select'); +var scaleZoom = require('./scale_zoom'); + var constants = require('./constants'); +var MINDRAG = constants.MINDRAG; +var MINZOOM = constants.MINZOOM; // flag for showing "doubleclick to zoom out" only at the beginning @@ -129587,48 +133314,71 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // dragged stores whether a drag has occurred, so we don't have to // redraw unnecessarily, ie if no move bigger than MINDRAG or MINZOOM px var fullLayout = gd._fullLayout, + zoomlayer = gd._fullLayout._zoomlayer, + isMainDrag = (ns + ew === 'nsew'), + subplots, + xa, + ya, + xs, + ys, + pw, + ph, + xActive, + yActive, + cursor, + isSubplotConstrained, + xaLinked, + yaLinked; + + function recomputeAxisLists() { + xa = [plotinfo.xaxis]; + ya = [plotinfo.yaxis]; + var xa0 = xa[0]; + var ya0 = ya[0]; + pw = xa0._length; + ph = ya0._length; + + var constraintGroups = fullLayout._axisConstraintGroups; + var xIDs = [xa0._id]; + var yIDs = [ya0._id]; + // if we're dragging two axes at once, also drag overlays - subplots = [plotinfo].concat((ns && ew) ? plotinfo.overlays : []), - xa = [plotinfo.xaxis], - ya = [plotinfo.yaxis], - pw = xa[0]._length, - ph = ya[0]._length, - MINDRAG = constants.MINDRAG, - MINZOOM = constants.MINZOOM, - isMainDrag = (ns + ew === 'nsew'); - - for(var i = 1; i < subplots.length; i++) { - var subplotXa = subplots[i].xaxis, - subplotYa = subplots[i].yaxis; - if(xa.indexOf(subplotXa) === -1) xa.push(subplotXa); - if(ya.indexOf(subplotYa) === -1) ya.push(subplotYa); - } - - function isDirectionActive(axList, activeVal) { - for(var i = 0; i < axList.length; i++) { - if(!axList[i].fixedrange) return activeVal; + subplots = [plotinfo].concat((ns && ew) ? plotinfo.overlays : []); + + for(var i = 1; i < subplots.length; i++) { + var subplotXa = subplots[i].xaxis, + subplotYa = subplots[i].yaxis; + + if(xa.indexOf(subplotXa) === -1) { + xa.push(subplotXa); + xIDs.push(subplotXa._id); + } + + if(ya.indexOf(subplotYa) === -1) { + ya.push(subplotYa); + yIDs.push(subplotYa._id); + } } - return ''; - } - var allaxes = xa.concat(ya), - xActive = isDirectionActive(xa, ew), - yActive = isDirectionActive(ya, ns), - cursor = getDragCursor(yActive + xActive, fullLayout.dragmode), - dragClass = ns + ew + 'drag'; + xActive = isDirectionActive(xa, ew); + yActive = isDirectionActive(ya, ns); + cursor = getDragCursor(yActive + xActive, fullLayout.dragmode); + xs = xa0._offset; + ys = ya0._offset; - var dragger3 = plotinfo.draglayer.selectAll('.' + dragClass).data([0]); + var links = calcLinks(constraintGroups, xIDs, yIDs); + isSubplotConstrained = links.xy; - dragger3.enter().append('rect') - .classed('drag', true) - .classed(dragClass, true) - .style({fill: 'transparent', 'stroke-width': 0}) - .attr('data-subplot', plotinfo.id); + // finally make the list of axis objects to link + xaLinked = []; + for(var xLinkID in links.x) { xaLinked.push(getFromId(gd, xLinkID)); } + yaLinked = []; + for(var yLinkID in links.y) { yaLinked.push(getFromId(gd, yLinkID)); } + } - dragger3.call(Drawing.setRect, x, y, w, h) - .call(setCursor, cursor); + recomputeAxisLists(); - var dragger = dragger3.node(); + var dragger = makeDragger(plotinfo, ns + ew + 'drag', cursor, x, y, w, h); // still need to make the element if the axes are disabled // but nuke its events (except for maindrag which needs them for hover) @@ -129643,8 +133393,6 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { element: dragger, gd: gd, plotinfo: plotinfo, - xaxes: xa, - yaxes: ya, doubleclick: doubleClick, prepFn: function(e, startX, startY) { var dragModeNow = gd._fullLayout.dragmode; @@ -129666,14 +133414,22 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { if(dragModeNow === 'zoom') { dragOptions.moveFn = zoomMove; dragOptions.doneFn = zoomDone; + + // zoomMove takes care of the threshold, but we need to + // minimize this so that constrained zoom boxes will flip + // orientation at the right place + dragOptions.minDrag = 1; + zoomPrep(e, startX, startY); } else if(dragModeNow === 'pan') { dragOptions.moveFn = plotDrag; dragOptions.doneFn = dragDone; - clearSelect(); + clearSelect(zoomlayer); } else if(isSelectOrLasso(dragModeNow)) { + dragOptions.xaxes = xa; + dragOptions.yaxes = ya; prepSelect(e, startX, startY, dragOptions, dragModeNow); } } @@ -129681,10 +133437,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { dragElement.init(dragOptions); - var zoomlayer = gd._fullLayout._zoomlayer, - xs = plotinfo.xaxis._offset, - ys = plotinfo.yaxis._offset, - x0, + var x0, y0, box, lum, @@ -129694,28 +133447,6 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { zb, corners; - function recomputeAxisLists() { - xa = [plotinfo.xaxis]; - ya = [plotinfo.yaxis]; - pw = xa[0]._length; - ph = ya[0]._length; - - for(var i = 1; i < subplots.length; i++) { - var subplotXa = subplots[i].xaxis, - subplotYa = subplots[i].yaxis; - if(xa.indexOf(subplotXa) === -1) xa.push(subplotXa); - if(ya.indexOf(subplotYa) === -1) ya.push(subplotYa); - } - allaxes = xa.concat(ya); - xActive = isDirectionActive(xa, ew); - yActive = isDirectionActive(ya, ns); - cursor = getDragCursor(yActive + xActive, fullLayout.dragmode); - xs = plotinfo.xaxis._offset; - ys = plotinfo.yaxis._offset; - dragOptions.xa = xa; - dragOptions.ya = ya; - } - function zoomPrep(e, startX, startY) { var dragBBox = dragger.getBoundingClientRect(); x0 = startX - dragBBox.left; @@ -129728,34 +133459,11 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { dimmed = false; zoomMode = 'xy'; - zb = zoomlayer.append('path') - .attr('class', 'zoombox') - .style({ - 'fill': lum > 0.2 ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0)', - 'stroke-width': 0 - }) - .attr('transform', 'translate(' + xs + ', ' + ys + ')') - .attr('d', path0 + 'Z'); - - corners = zoomlayer.append('path') - .attr('class', 'zoombox-corners') - .style({ - fill: Color.background, - stroke: Color.defaultLine, - 'stroke-width': 1, - opacity: 0 - }) - .attr('transform', 'translate(' + xs + ', ' + ys + ')') - .attr('d', 'M0,0Z'); + zb = makeZoombox(zoomlayer, lum, xs, ys, path0); - clearSelect(); - } + corners = makeCorners(zoomlayer, xs, ys); - function clearSelect() { - // until we get around to persistent selections, remove the outline - // here. The selection itself will be removed when the plot redraws - // at the end. - zoomlayer.selectAll('.select-outline').remove(); + clearSelect(zoomlayer); } function zoomMove(dx0, dy0) { @@ -129766,93 +133474,67 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { var x1 = Math.max(0, Math.min(pw, dx0 + x0)), y1 = Math.max(0, Math.min(ph, dy0 + y0)), dx = Math.abs(x1 - x0), - dy = Math.abs(y1 - y0), - clen = Math.floor(Math.min(dy, dx, MINZOOM) / 2); + dy = Math.abs(y1 - y0); box.l = Math.min(x0, x1); box.r = Math.max(x0, x1); box.t = Math.min(y0, y1); box.b = Math.max(y0, y1); + function noZoom() { + zoomMode = ''; + box.r = box.l; + box.t = box.b; + corners.attr('d', 'M0,0Z'); + } + + if(isSubplotConstrained) { + if(dx > MINZOOM || dy > MINZOOM) { + zoomMode = 'xy'; + if(dx / pw > dy / ph) { + dy = dx * ph / pw; + if(y0 > y1) box.t = y0 - dy; + else box.b = y0 + dy; + } + else { + dx = dy * pw / ph; + if(x0 > x1) box.l = x0 - dx; + else box.r = x0 + dx; + } + corners.attr('d', xyCorners(box)); + } + else { + noZoom(); + } + } // look for small drags in one direction or the other, // and only drag the other axis - if(!yActive || dy < Math.min(Math.max(dx * 0.6, MINDRAG), MINZOOM)) { + else if(!yActive || dy < Math.min(Math.max(dx * 0.6, MINDRAG), MINZOOM)) { if(dx < MINDRAG) { - zoomMode = ''; - box.r = box.l; - box.t = box.b; - corners.attr('d', 'M0,0Z'); + noZoom(); } else { box.t = 0; box.b = ph; zoomMode = 'x'; - corners.attr('d', - 'M' + (box.l - 0.5) + ',' + (y0 - MINZOOM - 0.5) + - 'h-3v' + (2 * MINZOOM + 1) + 'h3ZM' + - (box.r + 0.5) + ',' + (y0 - MINZOOM - 0.5) + - 'h3v' + (2 * MINZOOM + 1) + 'h-3Z'); + corners.attr('d', xCorners(box, y0)); } } else if(!xActive || dx < Math.min(dy * 0.6, MINZOOM)) { box.l = 0; box.r = pw; zoomMode = 'y'; - corners.attr('d', - 'M' + (x0 - MINZOOM - 0.5) + ',' + (box.t - 0.5) + - 'v-3h' + (2 * MINZOOM + 1) + 'v3ZM' + - (x0 - MINZOOM - 0.5) + ',' + (box.b + 0.5) + - 'v3h' + (2 * MINZOOM + 1) + 'v-3Z'); + corners.attr('d', yCorners(box, x0)); } else { zoomMode = 'xy'; - corners.attr('d', - 'M' + (box.l - 3.5) + ',' + (box.t - 0.5 + clen) + 'h3v' + (-clen) + - 'h' + clen + 'v-3h-' + (clen + 3) + 'ZM' + - (box.r + 3.5) + ',' + (box.t - 0.5 + clen) + 'h-3v' + (-clen) + - 'h' + (-clen) + 'v-3h' + (clen + 3) + 'ZM' + - (box.r + 3.5) + ',' + (box.b + 0.5 - clen) + 'h-3v' + clen + - 'h' + (-clen) + 'v3h' + (clen + 3) + 'ZM' + - (box.l - 3.5) + ',' + (box.b + 0.5 - clen) + 'h3v' + clen + - 'h' + clen + 'v3h-' + (clen + 3) + 'Z'); + corners.attr('d', xyCorners(box)); } box.w = box.r - box.l; box.h = box.b - box.t; - // Not sure about the addition of window.scrollX/Y... - // seems to work but doesn't seem robust. - zb.attr('d', - path0 + 'M' + (box.l) + ',' + (box.t) + 'v' + (box.h) + - 'h' + (box.w) + 'v-' + (box.h) + 'h-' + (box.w) + 'Z'); - if(!dimmed) { - zb.transition() - .style('fill', lum > 0.2 ? 'rgba(0,0,0,0.4)' : - 'rgba(255,255,255,0.3)') - .duration(200); - corners.transition() - .style('opacity', 1) - .duration(200); - dimmed = true; - } - } - - function zoomAxRanges(axList, r0Fraction, r1Fraction) { - var i, - axi, - axRangeLinear0, - axRangeLinearSpan; - - for(i = 0; i < axList.length; i++) { - axi = axList[i]; - if(axi.fixedrange) continue; - - axRangeLinear0 = axi._rl[0]; - axRangeLinearSpan = axi._rl[1] - axRangeLinear0; - axi.range = [ - axi.l2r(axRangeLinear0 + axRangeLinearSpan * r0Fraction), - axi.l2r(axRangeLinear0 + axRangeLinearSpan * r1Fraction) - ]; - } + updateZoombox(zb, corners, box, path0, dimmed, lum); + dimmed = true; } function zoomDone(dragged, numClicks) { @@ -129862,8 +133544,9 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { return removeZoombox(gd); } - if(zoomMode === 'xy' || zoomMode === 'x') zoomAxRanges(xa, box.l / pw, box.r / pw); - if(zoomMode === 'xy' || zoomMode === 'y') zoomAxRanges(ya, (ph - box.b) / ph, (ph - box.t) / ph); + // TODO: edit linked axes in zoomAxRanges and in dragTail + if(zoomMode === 'xy' || zoomMode === 'x') zoomAxRanges(xa, box.l / pw, box.r / pw, xaLinked); + if(zoomMode === 'xy' || zoomMode === 'y') zoomAxRanges(ya, (ph - box.b) / ph, (ph - box.t) / ph, yaLinked); removeZoombox(gd); dragTail(zoomMode); @@ -129895,7 +133578,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { else if(ew === 'e') hAlign = 'right'; if(gd._context.showAxisRangeEntryBoxes) { - dragger3 + d3.select(dragger) .call(svgTextUtils.makeEditable, null, { immediate: true, background: fullLayout.paper_bgcolor, @@ -129959,9 +133642,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { gbb = mainplot.draglayer.select('.nsewdrag') .node().getBoundingClientRect(), xfrac = (e.clientX - gbb.left) / gbb.width, - vbx0 = scrollViewBox[0] + scrollViewBox[2] * xfrac, yfrac = (gbb.bottom - e.clientY) / gbb.height, - vby0 = scrollViewBox[1] + scrollViewBox[3] * (1 - yfrac), i; function zoomWheelOneAxis(ax, centerFraction, zoom) { @@ -129973,15 +133654,23 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { ax.range = axRange.map(doZoom); } - if(ew) { + if(ew || isSubplotConstrained) { + // if we're only zooming this axis because of constraints, + // zoom it about the center + if(!ew) xfrac = 0.5; + for(i = 0; i < xa.length; i++) zoomWheelOneAxis(xa[i], xfrac, zoom); + scrollViewBox[2] *= zoom; - scrollViewBox[0] = vbx0 - scrollViewBox[2] * xfrac; + scrollViewBox[0] += scrollViewBox[2] * xfrac * (1 / zoom - 1); } - if(ns) { + if(ns || isSubplotConstrained) { + if(!ns) yfrac = 0.5; + for(i = 0; i < ya.length; i++) zoomWheelOneAxis(ya[i], yfrac, zoom); + scrollViewBox[3] *= zoom; - scrollViewBox[1] = vby0 - scrollViewBox[3] * (1 - yfrac); + scrollViewBox[1] += scrollViewBox[3] * (1 - yfrac) * (1 / zoom - 1); } // viewbox redraw at first @@ -129992,7 +133681,12 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // no more scrolling is coming redrawTimer = setTimeout(function() { scrollViewBox = [0, 0, pw, ph]; - dragTail(); + + var zoomMode; + if(isSubplotConstrained) zoomMode = 'xy'; + else zoomMode = (ew ? 'x' : '') + (ns ? 'y' : ''); + + dragTail(zoomMode); }, REDRAWDELAY); return Lib.pauseEvent(e); @@ -130014,18 +133708,6 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { recomputeAxisLists(); - function dragAxList(axList, pix) { - for(var i = 0; i < axList.length; i++) { - var axi = axList[i]; - if(!axi.fixedrange) { - axi.range = [ - axi.l2r(axi._rl[0] - pix / axi._m), - axi.l2r(axi._rl[1] - pix / axi._m) - ]; - } - } - } - if(xActive === 'ew' || yActive === 'ns') { if(xActive) dragAxList(xa, dx); if(yActive) dragAxList(ya, dy); @@ -130034,16 +133716,6 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { return; } - // common transform for dragging one end of an axis - // d>0 is compressing scale (cursor is over the plot, - // the axis end should move with the cursor) - // d<0 is expanding (cursor is off the plot, axis end moves - // nonlinearly so you can expand far) - function dZoom(d) { - return 1 - ((d >= 0) ? Math.min(d, 0.9) : - 1 / (1 / Math.max(d, -0.3) + 3.222)); - } - // dz: set a new value for one end (0 or 1) of an axis array axArray, // and return a pixel shift for that end for the viewbox // based on pixel drag distance d @@ -130069,6 +133741,15 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { (movedAx._rl[end] - movedAx._rl[otherEnd]); } + if(isSubplotConstrained && xActive && yActive) { + // dragging a corner of a constrained subplot: + // respect the fixed corner, but harmonize dx and dy + var dxySign = ((xActive === 'w') === (yActive === 'n')) ? 1 : -1; + var dxyFraction = (dx / pw + dxySign * dy / ph) / 2; + dx = dxyFraction * pw; + dy = dxySign * dxyFraction * ph; + } + if(xActive === 'w') dx = dz(xa, 0, dx); else if(xActive === 'e') dx = dz(xa, 1, -dx); else if(!xActive) dx = 0; @@ -130077,12 +133758,32 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { else if(yActive === 's') dy = dz(ya, 0, -dy); else if(!yActive) dy = 0; - updateSubplots([ - (xActive === 'w') ? dx : 0, - (yActive === 'n') ? dy : 0, - pw - dx, - ph - dy - ]); + var x0 = (xActive === 'w') ? dx : 0; + var y0 = (yActive === 'n') ? dy : 0; + + if(isSubplotConstrained) { + var i; + if(!xActive && yActive.length === 1) { + // dragging one end of the y axis of a constrained subplot + // scale the other axis the same about its middle + for(i = 0; i < xa.length; i++) { + xa[i].range = xa[i]._r.slice(); + scaleZoom(xa[i], 1 - dy / ph); + } + dx = dy * pw / ph; + x0 = dx / 2; + } + if(!yActive && xActive.length === 1) { + for(i = 0; i < ya.length; i++) { + ya[i].range = ya[i]._r.slice(); + scaleZoom(ya[i], 1 - dx / pw); + } + dy = dx * ph / pw; + y0 = dy / 2; + } + } + + updateSubplots([x0, y0, pw - dx, ph - dy]); ticksAndAnnotations(yActive, xActive); } @@ -130096,20 +133797,28 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { } } - if(ew) pushActiveAxIds(xa); - if(ns) pushActiveAxIds(ya); + if(ew || isSubplotConstrained) { + pushActiveAxIds(xa); + pushActiveAxIds(xaLinked); + } + if(ns || isSubplotConstrained) { + pushActiveAxIds(ya); + pushActiveAxIds(yaLinked); + } for(i = 0; i < activeAxIds.length; i++) { - Axes.doTicks(gd, activeAxIds[i], true); + doTicks(gd, activeAxIds[i], true); } - function redrawObjs(objArray, method) { + function redrawObjs(objArray, method, shortCircuit) { for(i = 0; i < objArray.length; i++) { var obji = objArray[i]; if((ew && activeAxIds.indexOf(obji.xref) !== -1) || (ns && activeAxIds.indexOf(obji.yref) !== -1)) { method(gd, i); + // once is enough for images (which doesn't use the `i` arg anyway) + if(shortCircuit) return; } } } @@ -130119,7 +133828,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { redrawObjs(fullLayout.annotations || [], Registry.getComponentMethod('annotations', 'drawOne')); redrawObjs(fullLayout.shapes || [], Registry.getComponentMethod('shapes', 'drawOne')); - redrawObjs(fullLayout.images || [], Registry.getComponentMethod('images', 'draw')); + redrawObjs(fullLayout.images || [], Registry.getComponentMethod('images', 'draw'), true); } function doubleClick() { @@ -130131,39 +133840,56 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { var ax, i, rangeInitial; + // For reset+autosize mode: + // If *any* of the main axes is not at its initial range + // (or autoranged, if we have no initial range, to match the logic in + // doubleClickConfig === 'reset' below), we reset. + // If they are *all* at their initial ranges, then we autosize. + if(doubleClickConfig === 'reset+autosize') { + + doubleClickConfig = 'autosize'; + + for(i = 0; i < axList.length; i++) { + ax = axList[i]; + if((ax._rangeInitial && ( + ax.range[0] !== ax._rangeInitial[0] || + ax.range[1] !== ax._rangeInitial[1] + )) || + (!ax._rangeInitial && !ax.autorange) + ) { + doubleClickConfig = 'reset'; + break; + } + } + } + if(doubleClickConfig === 'autosize') { + // don't set the linked axes here, so relayout marks them as shrinkable + // and we autosize just to the requested axis/axes for(i = 0; i < axList.length; i++) { ax = axList[i]; if(!ax.fixedrange) attrs[ax._name + '.autorange'] = true; } } else if(doubleClickConfig === 'reset') { - for(i = 0; i < axList.length; i++) { - ax = axList[i]; + // when we're resetting, reset all linked axes too, so we get back + // to the fully-auto-with-constraints situation + if(xActive || isSubplotConstrained) axList = axList.concat(xaLinked); + if(yActive && !isSubplotConstrained) axList = axList.concat(yaLinked); - if(!ax._rangeInitial) { - attrs[ax._name + '.autorange'] = true; - } - else { - rangeInitial = ax._rangeInitial.slice(); - attrs[ax._name + '.range[0]'] = rangeInitial[0]; - attrs[ax._name + '.range[1]'] = rangeInitial[1]; - } + if(isSubplotConstrained) { + if(!xActive) axList = axList.concat(xa); + else if(!yActive) axList = axList.concat(ya); } - } - else if(doubleClickConfig === 'reset+autosize') { + for(i = 0; i < axList.length; i++) { ax = axList[i]; - if(ax.fixedrange) continue; - if(ax._rangeInitial === undefined || - ax.range[0] === ax._rangeInitial[0] && - ax.range[1] === ax._rangeInitial[1] - ) { + if(!ax._rangeInitial) { attrs[ax._name + '.autorange'] = true; } else { - rangeInitial = ax._rangeInitial.slice(); + rangeInitial = ax._rangeInitial; attrs[ax._name + '.range[0]'] = rangeInitial[0]; attrs[ax._name + '.range[1]'] = rangeInitial[1]; } @@ -130176,18 +133902,22 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // dragTail - finish a drag event with a redraw function dragTail(zoommode) { + if(zoommode === undefined) zoommode = (ew ? 'x' : '') + (ns ? 'y' : ''); + var attrs = {}; // revert to the previous axis settings, then apply the new ones // through relayout - this lets relayout manage undo/redo - for(var i = 0; i < allaxes.length; i++) { - var axi = allaxes[i]; - if(zoommode && zoommode.indexOf(axi._id.charAt(0)) === -1) { - continue; - } + var axesToModify; + if(zoommode === 'xy') axesToModify = xa.concat(ya); + else if(zoommode === 'x') axesToModify = xa; + else if(zoommode === 'y') axesToModify = ya; + + for(var i = 0; i < axesToModify.length; i++) { + var axi = axesToModify[i]; if(axi._r[0] !== axi.range[0]) attrs[axi._name + '.range[0]'] = axi.range[0]; if(axi._r[1] !== axi.range[1]) attrs[axi._name + '.range[1]'] = axi.range[1]; - axi.range = axi._r.slice(); + axi.range = axi._input.range = axi._r.slice(); } updateSubplots([0, 0, pw, ph]); @@ -130198,71 +133928,116 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // affected by this drag, and update them. look for all plots // sharing an affected axis (including the one being dragged) function updateSubplots(viewBox) { - var j; - var plotinfos = fullLayout._plots, - subplots = Object.keys(plotinfos); + var plotinfos = fullLayout._plots; + var subplots = Object.keys(plotinfos); + var xScaleFactor = viewBox[2] / xa[0]._length; + var yScaleFactor = viewBox[3] / ya[0]._length; + var editX = ew || isSubplotConstrained; + var editY = ns || isSubplotConstrained; - for(var i = 0; i < subplots.length; i++) { + var i, xScaleFactor2, yScaleFactor2, clipDx, clipDy; + + // Find the appropriate scaling for this axis, if it's linked to the + // dragged axes by constraints. 0 is special, it means this axis shouldn't + // ever be scaled (will be converted to 1 if the other axis is scaled) + function getLinkedScaleFactor(ax) { + if(ax.fixedrange) return 0; + + if(editX && xaLinked.indexOf(ax) !== -1) { + return xScaleFactor; + } + if(editY && (isSubplotConstrained ? xaLinked : yaLinked).indexOf(ax) !== -1) { + return yScaleFactor; + } + return 0; + } + + function scaleAndGetShift(ax, scaleFactor) { + if(scaleFactor) { + ax.range = ax._r.slice(); + scaleZoom(ax, scaleFactor); + return ax._length * (1 - scaleFactor) / 2; + } + return 0; + } + + for(i = 0; i < subplots.length; i++) { var subplot = plotinfos[subplots[i]], xa2 = subplot.xaxis, ya2 = subplot.yaxis, - editX = ew && !xa2.fixedrange, - editY = ns && !ya2.fixedrange; - - if(editX) { - var isInX = false; - for(j = 0; j < xa.length; j++) { - if(xa[j]._id === xa2._id) { - isInX = true; - break; - } - } - editX = editX && isInX; - } + editX2 = editX && !xa2.fixedrange && (xa.indexOf(xa2) !== -1), + editY2 = editY && !ya2.fixedrange && (ya.indexOf(ya2) !== -1); - if(editY) { - var isInY = false; - for(j = 0; j < ya.length; j++) { - if(ya[j]._id === ya2._id) { - isInY = true; - break; - } - } - editY = editY && isInY; + if(editX2) { + xScaleFactor2 = xScaleFactor; + clipDx = viewBox[0]; + } + else { + xScaleFactor2 = getLinkedScaleFactor(xa2); + clipDx = scaleAndGetShift(xa2, xScaleFactor2); } - var xScaleFactor = editX ? xa2._length / viewBox[2] : 1, - yScaleFactor = editY ? ya2._length / viewBox[3] : 1; + if(editY2) { + yScaleFactor2 = yScaleFactor; + clipDy = viewBox[1]; + } + else { + yScaleFactor2 = getLinkedScaleFactor(ya2); + clipDy = scaleAndGetShift(ya2, yScaleFactor2); + } - var clipDx = editX ? viewBox[0] : 0, - clipDy = editY ? viewBox[1] : 0; + // don't scale at all if neither axis is scalable here + if(!xScaleFactor2 && !yScaleFactor2) continue; - var fracDx = editX ? (viewBox[0] / viewBox[2] * xa2._length) : 0, - fracDy = editY ? (viewBox[1] / viewBox[3] * ya2._length) : 0; + // but if only one is, reset the other axis scaling + if(!xScaleFactor2) xScaleFactor2 = 1; + if(!yScaleFactor2) yScaleFactor2 = 1; - var plotDx = xa2._offset - fracDx, - plotDy = ya2._offset - fracDy; + var plotDx = xa2._offset - clipDx / xScaleFactor2, + plotDy = ya2._offset - clipDy / yScaleFactor2; fullLayout._defs.selectAll('#' + subplot.clipId) .call(Drawing.setTranslate, clipDx, clipDy) - .call(Drawing.setScale, 1 / xScaleFactor, 1 / yScaleFactor); + .call(Drawing.setScale, xScaleFactor2, yScaleFactor2); subplot.plot .call(Drawing.setTranslate, plotDx, plotDy) - .call(Drawing.setScale, xScaleFactor, yScaleFactor) + .call(Drawing.setScale, 1 / xScaleFactor2, 1 / yScaleFactor2) // This is specifically directed at scatter traces, applying an inverse // scale to individual points to counteract the scale of the trace // as a whole: .select('.scatterlayer').selectAll('.points').selectAll('.point') - .call(Drawing.setPointGroupScale, 1 / xScaleFactor, 1 / yScaleFactor); + .call(Drawing.setPointGroupScale, xScaleFactor2, yScaleFactor2); } } return dragger; }; +function makeDragger(plotinfo, dragClass, cursor, x, y, w, h) { + var dragger3 = plotinfo.draglayer.selectAll('.' + dragClass).data([0]); + + dragger3.enter().append('rect') + .classed('drag', true) + .classed(dragClass, true) + .style({fill: 'transparent', 'stroke-width': 0}) + .attr('data-subplot', plotinfo.id); + + dragger3.call(Drawing.setRect, x, y, w, h) + .call(setCursor, cursor); + + return dragger3.node(); +} + +function isDirectionActive(axList, activeVal) { + for(var i = 0; i < axList.length; i++) { + if(!axList[i].fixedrange) return activeVal; + } + return ''; +} + function getEndText(ax, end) { var initialVal = ax.range[end], diff = Math.abs(initialVal - ax.range[1 - end]), @@ -130284,6 +134059,54 @@ function getEndText(ax, end) { } } +function zoomAxRanges(axList, r0Fraction, r1Fraction, linkedAxes) { + var i, + axi, + axRangeLinear0, + axRangeLinearSpan; + + for(i = 0; i < axList.length; i++) { + axi = axList[i]; + if(axi.fixedrange) continue; + + axRangeLinear0 = axi._rl[0]; + axRangeLinearSpan = axi._rl[1] - axRangeLinear0; + axi.range = [ + axi.l2r(axRangeLinear0 + axRangeLinearSpan * r0Fraction), + axi.l2r(axRangeLinear0 + axRangeLinearSpan * r1Fraction) + ]; + } + + // zoom linked axes about their centers + if(linkedAxes && linkedAxes.length) { + var linkedR0Fraction = (r0Fraction + (1 - r1Fraction)) / 2; + + zoomAxRanges(linkedAxes, linkedR0Fraction, 1 - linkedR0Fraction); + } +} + +function dragAxList(axList, pix) { + for(var i = 0; i < axList.length; i++) { + var axi = axList[i]; + if(!axi.fixedrange) { + axi.range = [ + axi.l2r(axi._rl[0] - pix / axi._m), + axi.l2r(axi._rl[1] - pix / axi._m) + ]; + } + } +} + +// common transform for dragging one end of an axis +// d>0 is compressing scale (cursor is over the plot, +// the axis end should move with the cursor) +// d<0 is expanding (cursor is off the plot, axis end moves +// nonlinearly so you can expand far) +function dZoom(d) { + return 1 - ((d >= 0) ? Math.min(d, 0.9) : + 1 / (1 / Math.max(d, -0.3) + 3.222)); +} + function getDragCursor(nsew, dragmode) { if(!nsew) return 'pointer'; if(nsew === 'nsew') { @@ -130293,6 +134116,52 @@ function getDragCursor(nsew, dragmode) { return nsew.toLowerCase() + '-resize'; } +function makeZoombox(zoomlayer, lum, xs, ys, path0) { + return zoomlayer.append('path') + .attr('class', 'zoombox') + .style({ + 'fill': lum > 0.2 ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0)', + 'stroke-width': 0 + }) + .attr('transform', 'translate(' + xs + ', ' + ys + ')') + .attr('d', path0 + 'Z'); +} + +function makeCorners(zoomlayer, xs, ys) { + return zoomlayer.append('path') + .attr('class', 'zoombox-corners') + .style({ + fill: Color.background, + stroke: Color.defaultLine, + 'stroke-width': 1, + opacity: 0 + }) + .attr('transform', 'translate(' + xs + ', ' + ys + ')') + .attr('d', 'M0,0Z'); +} + +function clearSelect(zoomlayer) { + // until we get around to persistent selections, remove the outline + // here. The selection itself will be removed when the plot redraws + // at the end. + zoomlayer.selectAll('.select-outline').remove(); +} + +function updateZoombox(zb, corners, box, path0, dimmed, lum) { + zb.attr('d', + path0 + 'M' + (box.l) + ',' + (box.t) + 'v' + (box.h) + + 'h' + (box.w) + 'v-' + (box.h) + 'h-' + (box.w) + 'Z'); + if(!dimmed) { + zb.transition() + .style('fill', lum > 0.2 ? 'rgba(0,0,0,0.4)' : + 'rgba(255,255,255,0.3)') + .duration(200); + corners.transition() + .style('opacity', 1) + .duration(200); + } +} + function removeZoombox(gd) { d3.select(gd) .selectAll('.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners') @@ -130305,7 +134174,91 @@ function isSelectOrLasso(dragmode) { return modes.indexOf(dragmode) !== -1; } -},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../lib":680,"../../lib/setcursor":695,"../../lib/svg_text_utils":699,"../../plotly":714,"../../registry":793,"./axes":719,"./constants":724,"./select":732,"d3":104,"tinycolor2":511}],726:[function(require,module,exports){ +function xCorners(box, y0) { + return 'M' + + (box.l - 0.5) + ',' + (y0 - MINZOOM - 0.5) + + 'h-3v' + (2 * MINZOOM + 1) + 'h3ZM' + + (box.r + 0.5) + ',' + (y0 - MINZOOM - 0.5) + + 'h3v' + (2 * MINZOOM + 1) + 'h-3Z'; +} + +function yCorners(box, x0) { + return 'M' + + (x0 - MINZOOM - 0.5) + ',' + (box.t - 0.5) + + 'v-3h' + (2 * MINZOOM + 1) + 'v3ZM' + + (x0 - MINZOOM - 0.5) + ',' + (box.b + 0.5) + + 'v3h' + (2 * MINZOOM + 1) + 'v-3Z'; +} + +function xyCorners(box) { + var clen = Math.floor(Math.min(box.b - box.t, box.r - box.l, MINZOOM) / 2); + return 'M' + + (box.l - 3.5) + ',' + (box.t - 0.5 + clen) + 'h3v' + (-clen) + + 'h' + clen + 'v-3h-' + (clen + 3) + 'ZM' + + (box.r + 3.5) + ',' + (box.t - 0.5 + clen) + 'h-3v' + (-clen) + + 'h' + (-clen) + 'v-3h' + (clen + 3) + 'ZM' + + (box.r + 3.5) + ',' + (box.b + 0.5 - clen) + 'h-3v' + clen + + 'h' + (-clen) + 'v3h' + (clen + 3) + 'ZM' + + (box.l - 3.5) + ',' + (box.b + 0.5 - clen) + 'h3v' + clen + + 'h' + clen + 'v3h-' + (clen + 3) + 'Z'; +} + +function calcLinks(constraintGroups, xIDs, yIDs) { + var isSubplotConstrained = false; + var xLinks = {}; + var yLinks = {}; + var i, j, k; + + var group, xLinkID, yLinkID; + for(i = 0; i < constraintGroups.length; i++) { + group = constraintGroups[i]; + // check if any of the x axes we're dragging is in this constraint group + for(j = 0; j < xIDs.length; j++) { + if(group[xIDs[j]]) { + // put the rest of these axes into xLinks, if we're not already + // dragging them, so we know to scale these axes automatically too + // to match the changes in the dragged x axes + for(xLinkID in group) { + if((xLinkID.charAt(0) === 'x' ? xIDs : yIDs).indexOf(xLinkID) === -1) { + xLinks[xLinkID] = 1; + } + } + + // check if the x and y axes of THIS drag are linked + for(k = 0; k < yIDs.length; k++) { + if(group[yIDs[k]]) isSubplotConstrained = true; + } + } + } + + // now check if any of the y axes we're dragging is in this constraint group + // only look for outside links, as we've already checked for links within the dragger + for(j = 0; j < yIDs.length; j++) { + if(group[yIDs[j]]) { + for(yLinkID in group) { + if((yLinkID.charAt(0) === 'x' ? xIDs : yIDs).indexOf(yLinkID) === -1) { + yLinks[yLinkID] = 1; + } + } + } + } + } + + if(isSubplotConstrained) { + // merge xLinks and yLinks if the subplot is constrained, + // since we'll always apply both anyway and the two will contain + // duplicates + Lib.extendFlat(xLinks, yLinks); + yLinks = {}; + } + return { + x: xLinks, + y: yLinks, + xy: isSubplotConstrained + }; +} + +},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../lib":690,"../../lib/setcursor":705,"../../lib/svg_text_utils":709,"../../plotly":724,"../../registry":807,"./axes":729,"./axis_ids":732,"./constants":734,"./scale_zoom":744,"./select":745,"d3":114,"tinycolor2":521}],738:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130318,7 +134271,6 @@ function isSelectOrLasso(dragmode) { 'use strict'; var d3 = require('d3'); -var tinycolor = require('tinycolor2'); var isNumeric = require('fast-isnumeric'); var Lib = require('../../lib'); @@ -130554,9 +134506,7 @@ function quadrature(dx, dy) { // size and display constants for hover text var HOVERARROWSIZE = constants.HOVERARROWSIZE, - HOVERTEXTPAD = constants.HOVERTEXTPAD, - HOVERFONTSIZE = constants.HOVERFONTSIZE, - HOVERFONT = constants.HOVERFONT; + HOVERTEXTPAD = constants.HOVERTEXTPAD; // fx.hover: highlight data on hover // evt can be a mousemove event, or an object with data about what points @@ -130611,8 +134561,9 @@ fx.hover = function(gd, evt, subplot) { // The actual implementation is here: function hover(gd, evt, subplot) { - if(subplot === 'pie') { + if(['pie', 'sankey'].indexOf(subplot) !== -1) { gd.emit('plotly_hover', { + event: evt.originalEvent, points: [evt] }); return; @@ -130721,12 +134672,17 @@ function hover(gd, evt, subplot) { // [x|y]px: the pixels (from top left) of the mouse location // on the currently selected plot area - var xpx, ypx; + var hasUserCalledHover = !evt.target, + xpx, ypx; - // mouse event? ie is there a target element with - // clientX and clientY values? - if(evt.target && ('clientX' in evt) && ('clientY' in evt)) { + if(hasUserCalledHover) { + if('xpx' in evt) xpx = evt.xpx; + else xpx = xaArray[0]._length / 2; + if('ypx' in evt) ypx = evt.ypx; + else ypx = yaArray[0]._length / 2; + } + else { // fire the beforehover event and quit if it returns false // note that we're only calling this on real mouse events, so // manual calls to fx.hover will always run. @@ -130745,13 +134701,6 @@ function hover(gd, evt, subplot) { return dragElement.unhoverRaw(gd, evt); } } - else { - if('xpx' in evt) xpx = evt.xpx; - else xpx = xaArray[0]._length / 2; - - if('ypx' in evt) ypx = evt.ypx; - else ypx = yaArray[0]._length / 2; - } if('xval' in evt) xvalArray = flat(subplots, evt.xval); else xvalArray = p2c(xaArray, xpx); @@ -130932,10 +134881,14 @@ function hover(gd, evt, subplot) { if(!hoverChanged(gd, evt, oldhoverdata)) return; if(oldhoverdata) { - gd.emit('plotly_unhover', { points: oldhoverdata }); + gd.emit('plotly_unhover', { + event: evt, + points: oldhoverdata + }); } gd.emit('plotly_hover', { + event: evt, points: gd._hoverdata, xaxes: xaArray, yaxes: yaArray, @@ -131060,23 +135013,36 @@ function cleanPoint(d, hovermode) { return d; } +/* + * Draw a single hover item in a pre-existing svg container somewhere + * hoverItem should have keys: + * - x and y (or x0, x1, y0, and y1): + * the pixel position to mark, relative to opts.container + * - xLabel, yLabel, zLabel, text, and name: + * info to go in the label + * - color: + * the background color for the label. + * - idealAlign (optional): + * 'left' or 'right' for which side of the x/y box to try to put this on first + * - borderColor (optional): + * color for the border, defaults to strongest contrast with color + * - fontFamily (optional): + * string, the font for this label, defaults to constants.HOVERFONT + * - fontSize (optional): + * the label font size, defaults to constants.HOVERFONTSIZE + * - fontColor (optional): + * defaults to borderColor + * opts should have keys: + * - bgColor: + * the background color this is against, used if the trace is + * non-opaque, and for the name, which goes outside the box + * - container: + * a or element to add the hover label to + * - outerContainer: + * normally a parent of `container`, sets the bounding box to use to + * constrain the hover label and determine whether to show it on the left or right + */ fx.loneHover = function(hoverItem, opts) { - // draw a single hover item in a pre-existing svg container somewhere - // hoverItem should have keys: - // - x and y (or x0, x1, y0, and y1): - // the pixel position to mark, relative to opts.container - // - xLabel, yLabel, zLabel, text, and name: - // info to go in the label - // - color: - // the background color for the label. text & outline color will - // be chosen black or white to contrast with this - // opts should have keys: - // - bgColor: - // the background color this is against, used if the trace is - // non-opaque, and for the name, which goes outside the box - // - container: - // a dom element - must be big enough to contain the whole - // hover label var pointData = { color: hoverItem.color || Color.defaultLine, x0: hoverItem.x0 || hoverItem.x || 0, @@ -131090,6 +135056,12 @@ fx.loneHover = function(hoverItem, opts) { name: hoverItem.name, idealAlign: hoverItem.idealAlign, + // optional extra bits of styling + borderColor: hoverItem.borderColor, + fontFamily: hoverItem.fontFamily, + fontSize: hoverItem.fontSize, + fontColor: hoverItem.fontColor, + // filler to make createHoverText happy trace: { index: 0, @@ -131135,6 +135107,12 @@ function createHoverText(hoverData, opts) { container = opts.container, outerContainer = opts.outerContainer, + // opts.fontFamily/Size are used for the common label + // and as defaults for each hover label, though the individual labels + // can override this. + fontFamily = opts.fontFamily || constants.HOVERFONT, + fontSize = opts.fontSize || constants.HOVERFONTSIZE, + c0 = hoverData[0], xa = c0.xa, ya = c0.ya, @@ -131179,7 +135157,7 @@ function createHoverText(hoverData, opts) { lpath.enter().append('path') .style({fill: Color.defaultLine, 'stroke-width': '1px', stroke: Color.background}); ltext.enter().append('text') - .call(Drawing.font, HOVERFONT, HOVERFONTSIZE, Color.background) + .call(Drawing.font, fontFamily, fontSize, Color.background) // prohibit tex interpretation until we can handle // tex and regular text together .attr('data-notex', 1); @@ -131260,13 +135238,12 @@ function createHoverText(hoverData, opts) { // trace name label (rect and text.name) g.append('rect') .call(Color.fill, Color.addOpacity(bgColor, 0.8)); - g.append('text').classed('name', true) - .call(Drawing.font, HOVERFONT, HOVERFONTSIZE); + g.append('text').classed('name', true); // trace data label (path and text.nums) g.append('path') .style('stroke-width', '1px'); g.append('text').classed('nums', true) - .call(Drawing.font, HOVERFONT, HOVERFONTSIZE); + .call(Drawing.font, fontFamily, fontSize); }); hoverLabels.exit().remove(); @@ -131282,8 +135259,7 @@ function createHoverText(hoverData, opts) { traceColor = Color.combine(baseColor, bgColor), // find a contrasting color for border and text - contrastColor = tinycolor(traceColor).getBrightness() > 128 ? - '#000' : Color.background; + contrastColor = d.borderColor || Color.contrast(traceColor); // to get custom 'name' labels pass cleanPoint if(d.nameOverride !== undefined) d.name = d.nameOverride; @@ -131328,7 +135304,10 @@ function createHoverText(hoverData, opts) { // main label var tx = g.select('text.nums') - .style('fill', contrastColor) + .call(Drawing.font, + d.fontFamily || fontFamily, + d.fontSize || fontSize, + d.fontColor || contrastColor) .call(Drawing.setPosition, 0, 0) .text(text) .attr('data-notex', 1) @@ -131341,7 +135320,10 @@ function createHoverText(hoverData, opts) { // secondary label for non-empty 'name' if(name && name !== text) { - tx2.style('fill', traceColor) + tx2.call(Drawing.font, + d.fontFamily || fontFamily, + d.fontSize || fontSize, + traceColor) .text(name) .call(Drawing.setPosition, 0, 0) .attr('data-notex', 1) @@ -131658,7 +135640,7 @@ function hoverChanged(gd, evt, oldhoverdata) { fx.click = function(gd, evt) { var annotationsDone = Registry.getComponentMethod('annotations', 'onClick')(gd, gd._hoverdata); - function emitClick() { gd.emit('plotly_click', {points: gd._hoverdata}); } + function emitClick() { gd.emit('plotly_click', {points: gd._hoverdata, event: evt}); } if(gd._hoverdata && evt && evt.target) { if(annotationsDone && annotationsDone.then) { @@ -131687,7 +135669,7 @@ fx.inbox = function(v0, v1) { return Infinity; }; -},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../lib":680,"../../lib/events":671,"../../lib/override_cursor":689,"../../lib/svg_text_utils":699,"../../registry":793,"../layout_attributes":769,"./axes":719,"./constants":724,"./dragbox":725,"d3":104,"fast-isnumeric":113,"tinycolor2":511}],727:[function(require,module,exports){ +},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../lib":690,"../../lib/events":681,"../../lib/override_cursor":699,"../../lib/svg_text_utils":709,"../../registry":807,"../layout_attributes":783,"./axes":729,"./constants":734,"./dragbox":737,"d3":114,"fast-isnumeric":123}],739:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132072,7 +136054,7 @@ function joinLayer(parent, nodeType, className) { return layer; } -},{"../../lib":680,"../plots":778,"./attributes":718,"./axis_ids":722,"./constants":724,"./layout_attributes":728,"./transition_axes":737,"d3":104}],728:[function(require,module,exports){ +},{"../../lib":690,"../plots":792,"./attributes":728,"./axis_ids":732,"./constants":734,"./layout_attributes":740,"./transition_axes":750,"d3":114}],740:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132138,12 +136120,29 @@ module.exports = { ], }, - fixedrange: { valType: 'boolean', dflt: false, + }, + // scaleanchor: not used directly, just put here for reference + // values are any opposite-letter axis id + scaleanchor: { + valType: 'enumerated', + values: [ + constants.idRegex.x.toString(), + constants.idRegex.y.toString() + ], + + + }, + scaleratio: { + valType: 'number', + min: 0, + dflt: 1, + + }, // ticks tickmode: { @@ -132415,7 +136414,7 @@ module.exports = { } }; -},{"../../components/color/attributes":574,"../../lib/extend":672,"../font_attributes":739,"./constants":724}],729:[function(require,module,exports){ +},{"../../components/color/attributes":584,"../../lib/extend":682,"../font_attributes":753,"./constants":734}],741:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132434,7 +136433,9 @@ var basePlotLayoutAttributes = require('../layout_attributes'); var constants = require('./constants'); var layoutAttributes = require('./layout_attributes'); +var handleTypeDefaults = require('./type_defaults'); var handleAxisDefaults = require('./axis_defaults'); +var handleConstraintDefaults = require('./constraint_defaults'); var handlePositionDefaults = require('./position_defaults'); var axisIds = require('./axis_ids'); @@ -132533,7 +136534,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { var bgColor = Color.combine(plot_bgcolor, layoutOut.paper_bgcolor); - var axName, axLayoutIn, axLayoutOut; + var axName, axLetter, axLayoutIn, axLayoutOut; function coerce(attr, dflt) { return Lib.coerce(axLayoutIn, axLayoutOut, layoutAttributes, attr, dflt); @@ -132544,6 +136545,8 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { return Lib.simpleMap(list, axisIds.name2id); } + var counterAxes = {x: getCounterAxes('x'), y: getCounterAxes('y')}; + function getOverlayableAxes(axLetter, axName) { var list = {x: xaList, y: yaList}[axLetter]; var out = []; @@ -132559,6 +136562,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { return out; } + // first pass creates the containers, determines types, and handles most of the settings for(i = 0; i < axesList.length; i++) { axName = axesList[i]; @@ -132569,14 +136573,16 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { axLayoutIn = layoutIn[axName]; axLayoutOut = layoutOut[axName] = {}; - var axLetter = axName.charAt(0); + handleTypeDefaults(axLayoutIn, axLayoutOut, coerce, fullData, axName); + + axLetter = axName.charAt(0); + var overlayableAxes = getOverlayableAxes(axLetter, axName); var defaultOptions = { letter: axLetter, font: layoutOut.font, outerTicks: outerTicks[axName], showGrid: !noGrids[axName], - name: axName, data: fullData, bgColor: bgColor, calendar: layoutOut.calendar @@ -132586,8 +136592,8 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { var positioningOptions = { letter: axLetter, - counterAxes: getCounterAxes(axLetter), - overlayableAxes: getOverlayableAxes(axLetter, axName) + counterAxes: counterAxes[axLetter], + overlayableAxes: overlayableAxes }; handlePositionDefaults(axLayoutIn, axLayoutOut, coerce, positioningOptions); @@ -132634,9 +136640,28 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { coerce('fixedrange', fixedRangeDflt); } + + // Finally, handle scale constraints. We need to do this after all axes have + // coerced both `type` (so we link only axes of the same type) and + // `fixedrange` (so we can avoid linking from OR TO a fixed axis). + + // sets of axes linked by `scaleanchor` along with the scaleratios compounded + // together, populated in handleConstraintDefaults + layoutOut._axisConstraintGroups = []; + var allAxisIds = counterAxes.x.concat(counterAxes.y); + + for(i = 0; i < axesList.length; i++) { + axName = axesList[i]; + axLetter = axName.charAt(0); + + axLayoutIn = layoutIn[axName]; + axLayoutOut = layoutOut[axName]; + + handleConstraintDefaults(axLayoutIn, axLayoutOut, coerce, allAxisIds, layoutOut); + } }; -},{"../../components/color":575,"../../lib":680,"../../registry":793,"../layout_attributes":769,"./axis_defaults":721,"./axis_ids":722,"./constants":724,"./layout_attributes":728,"./position_defaults":731}],730:[function(require,module,exports){ +},{"../../components/color":585,"../../lib":690,"../../registry":807,"../layout_attributes":783,"./axis_defaults":731,"./axis_ids":732,"./constants":734,"./constraint_defaults":735,"./layout_attributes":740,"./position_defaults":743,"./type_defaults":751}],742:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132715,7 +136740,7 @@ module.exports = function orderedCategories(axisLetter, categoryorder, categorya } }; -},{"d3":104}],731:[function(require,module,exports){ +},{"d3":114}],743:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132780,7 +136805,32 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer return containerOut; }; -},{"../../lib":680,"fast-isnumeric":113}],732:[function(require,module,exports){ +},{"../../lib":690,"fast-isnumeric":123}],744:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +module.exports = function scaleZoom(ax, factor, centerFraction) { + if(centerFraction === undefined) centerFraction = 0.5; + + var rangeLinear = [ax.r2l(ax.range[0]), ax.r2l(ax.range[1])]; + var center = rangeLinear[0] + (rangeLinear[1] - rangeLinear[0]) * centerFraction; + var newHalfSpan = (center - rangeLinear[0]) * factor; + + ax.range = ax._input.range = [ + ax.l2r(center - newHalfSpan), + ax.l2r(center + newHalfSpan) + ]; +}; + +},{}],745:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132980,7 +137030,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) { }; }; -},{"../../components/color":575,"../../lib/polygon":690,"./axes":719,"./constants":724}],733:[function(require,module,exports){ +},{"../../components/color":585,"../../lib/polygon":700,"./axes":729,"./constants":734}],746:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133109,12 +137159,20 @@ module.exports = function setConvert(ax, fullLayout) { */ function setCategoryIndex(v) { if(v !== null && v !== undefined) { - var c = ax._categories.indexOf(v); - if(c === -1) { + if(ax._categoriesMap === undefined) { + ax._categoriesMap = {}; + } + + if(ax._categoriesMap[v] !== undefined) { + return ax._categoriesMap[v]; + } else { ax._categories.push(v); - return ax._categories.length - 1; + + var curLength = ax._categories.length - 1; + ax._categoriesMap[v] = curLength; + + return curLength; } - return c; } return BADNUM; } @@ -133122,9 +137180,12 @@ module.exports = function setConvert(ax, fullLayout) { function getCategoryIndex(v) { // d2l/d2c variant that that won't add categories but will also // allow numbers to be mapped to the linearized axis positions - var index = ax._categories.indexOf(v); - if(index !== -1) return index; - if(typeof v === 'number') return v; + if(ax._categoriesMap) { + var index = ax._categoriesMap[v]; + if(index !== undefined) return index; + } + + if(typeof v === 'number') { return v; } } function l2p(v) { @@ -133308,6 +137369,8 @@ module.exports = function setConvert(ax, fullLayout) { // TODO cleaner way to handle this case if(!ax._categories) ax._categories = []; + // Add a map to optimize the performance of category collection + if(!ax._categoriesMap) ax._categoriesMap = {}; // make sure we have a domain (pull it in from the axis // this one is overlaying if necessary) @@ -133410,7 +137473,7 @@ module.exports = function setConvert(ax, fullLayout) { delete ax._forceTick0; }; -},{"../../constants/numerical":662,"../../lib":680,"./axis_ids":722,"./constants":724,"d3":104,"fast-isnumeric":113}],734:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690,"./axis_ids":732,"./constants":734,"d3":114,"fast-isnumeric":123}],747:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133494,7 +137557,7 @@ function getShowAttrDflt(containerIn) { } } -},{"../../lib":680}],735:[function(require,module,exports){ +},{"../../lib":690}],748:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133527,7 +137590,7 @@ module.exports = function handleTickDefaults(containerIn, containerOut, coerce, } }; -},{"../../lib":680,"./layout_attributes":728}],736:[function(require,module,exports){ +},{"../../lib":690,"./layout_attributes":740}],749:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133611,7 +137674,7 @@ module.exports = function handleTickValueDefaults(containerIn, containerOut, coe } }; -},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],737:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],750:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133923,7 +137986,135 @@ module.exports = function transitionAxes(gd, newLayout, transitionOpts, makeOnCo return Promise.resolve(); }; -},{"../../components/drawing":598,"../../plotly":714,"../../registry":793,"./axes":719,"d3":104}],738:[function(require,module,exports){ +},{"../../components/drawing":608,"../../plotly":724,"../../registry":807,"./axes":729,"d3":114}],751:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Registry = require('../../registry'); +var autoType = require('./axis_autotype'); +var name2id = require('./axis_ids').name2id; + +/* + * data: the plot data to use in choosing auto type + * name: axis object name (ie 'xaxis') if one should be stored + */ +module.exports = function handleTypeDefaults(containerIn, containerOut, coerce, data, name) { + // set up some private properties + if(name) { + containerOut._name = name; + containerOut._id = name2id(name); + } + + var axType = coerce('type'); + if(axType === '-') { + setAutoType(containerOut, data); + + if(containerOut.type === '-') { + containerOut.type = 'linear'; + } + else { + // copy autoType back to input axis + // note that if this object didn't exist + // in the input layout, we have to put it in + // this happens in the main supplyDefaults function + containerIn.type = containerOut.type; + } + } +}; + +function setAutoType(ax, data) { + // new logic: let people specify any type they want, + // only autotype if type is '-' + if(ax.type !== '-') return; + + var id = ax._id, + axLetter = id.charAt(0); + + // support 3d + if(id.indexOf('scene') !== -1) id = axLetter; + + var d0 = getFirstNonEmptyTrace(data, id, axLetter); + if(!d0) return; + + // first check for histograms, as the count direction + // should always default to a linear axis + if(d0.type === 'histogram' && + axLetter === {v: 'y', h: 'x'}[d0.orientation || 'v']) { + ax.type = 'linear'; + return; + } + + var calAttr = axLetter + 'calendar', + calendar = d0[calAttr]; + + // check all boxes on this x axis to see + // if they're dates, numbers, or categories + if(isBoxWithoutPositionCoords(d0, axLetter)) { + var posLetter = getBoxPosLetter(d0), + boxPositions = [], + trace; + + for(var i = 0; i < data.length; i++) { + trace = data[i]; + if(!Registry.traceIs(trace, 'box') || + (trace[axLetter + 'axis'] || axLetter) !== id) continue; + + if(trace[posLetter] !== undefined) boxPositions.push(trace[posLetter][0]); + else if(trace.name !== undefined) boxPositions.push(trace.name); + else boxPositions.push('text'); + + if(trace[calAttr] !== calendar) calendar = undefined; + } + + ax.type = autoType(boxPositions, calendar); + } + else { + ax.type = autoType(d0[axLetter] || [d0[axLetter + '0']], calendar); + } +} + +function getFirstNonEmptyTrace(data, id, axLetter) { + for(var i = 0; i < data.length; i++) { + var trace = data[i]; + + if((trace[axLetter + 'axis'] || axLetter) === id) { + if(isBoxWithoutPositionCoords(trace, axLetter)) { + return trace; + } + else if((trace[axLetter] || []).length || trace[axLetter + '0']) { + return trace; + } + } + } +} + +function getBoxPosLetter(trace) { + return {v: 'x', h: 'y'}[trace.orientation || 'v']; +} + +function isBoxWithoutPositionCoords(trace, axLetter) { + var posLetter = getBoxPosLetter(trace), + isBox = Registry.traceIs(trace, 'box'), + isCandlestick = Registry.traceIs(trace._fullInput || {}, 'candlestick'); + + return ( + isBox && + !isCandlestick && + axLetter === posLetter && + trace[posLetter] === undefined && + trace[posLetter + '0'] === undefined + ); +} + +},{"../../registry":807,"./axis_autotype":730,"./axis_ids":732}],752:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134348,7 +138539,7 @@ function crawl(attrs, callback, path, depth) { }); } -},{"../lib":680,"../plotly":714}],739:[function(require,module,exports){ +},{"../lib":690,"../plotly":724}],753:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134379,7 +138570,7 @@ module.exports = { } }; -},{}],740:[function(require,module,exports){ +},{}],754:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134425,7 +138616,7 @@ module.exports = { } }; -},{}],741:[function(require,module,exports){ +},{}],755:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134585,7 +138776,7 @@ params.layerNameToAdjective = { // base layers drawn over choropleth params.baseLayersOverChoropleth = ['rivers', 'lakes']; -},{}],742:[function(require,module,exports){ +},{}],756:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134679,11 +138870,9 @@ proto.plot = function(geoCalcData, fullLayout, promises) { if(!lonlat || isNaN(lonlat[0]) || isNaN(lonlat[1])) return; - var evt = { - target: true, - xpx: mouse[0], - ypx: mouse[1] - }; + var evt = d3.event; + evt.xpx = mouse[0]; + evt.ypx = mouse[1]; _this.xaxis.c2p = function() { return mouse[0]; }; _this.xaxis.p2c = function() { return lonlat[0]; }; @@ -134698,7 +138887,7 @@ proto.plot = function(geoCalcData, fullLayout, promises) { }); _this.framework.on('click', function() { - Fx.click(_this.graphDiv, { target: true }); + Fx.click(_this.graphDiv, d3.event); }); topojsonNameNew = topojsonUtils.getTopojsonName(geoLayout); @@ -135060,7 +139249,7 @@ function createMockAxis(fullLayout) { return mockAxis; } -},{"../../components/color":575,"../../components/drawing":598,"../../lib/topojson_utils":701,"../cartesian/axes":719,"../cartesian/graph_interact":726,"../plots":778,"./constants":741,"./projections":749,"./set_scale":750,"./zoom":751,"./zoom_reset":752,"d3":104,"topojson-client":513}],743:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"../../lib/topojson_utils":711,"../cartesian/axes":729,"../cartesian/graph_interact":738,"../plots":792,"./constants":755,"./projections":763,"./set_scale":764,"./zoom":765,"./zoom_reset":766,"d3":114,"topojson-client":523}],757:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135140,7 +139329,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) } }; -},{"../../plots/plots":778,"./geo":742,"./layout/attributes":744,"./layout/defaults":747,"./layout/layout_attributes":748}],744:[function(require,module,exports){ +},{"../../plots/plots":792,"./geo":756,"./layout/attributes":758,"./layout/defaults":761,"./layout/layout_attributes":762}],758:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135161,7 +139350,7 @@ module.exports = { } }; -},{}],745:[function(require,module,exports){ +},{}],759:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135216,7 +139405,7 @@ module.exports = { } }; -},{"../../../components/color/attributes":574}],746:[function(require,module,exports){ +},{"../../../components/color/attributes":584}],760:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135290,7 +139479,7 @@ module.exports = function supplyGeoAxisLayoutDefaults(geoLayoutIn, geoLayoutOut) } }; -},{"../../../lib":680,"../constants":741,"./axis_attributes":745}],747:[function(require,module,exports){ +},{"../../../lib":690,"../constants":755,"./axis_attributes":759}],761:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135409,7 +139598,7 @@ function handleGeoDefaults(geoLayoutIn, geoLayoutOut, coerce) { ]; } -},{"../../subplot_defaults":785,"../constants":741,"./axis_defaults":746,"./layout_attributes":748}],748:[function(require,module,exports){ +},{"../../subplot_defaults":799,"../constants":755,"./axis_defaults":760,"./layout_attributes":762}],762:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135642,7 +139831,7 @@ module.exports = { lataxis: geoAxesAttrs }; -},{"../../../components/color/attributes":574,"../constants":741,"./axis_attributes":745}],749:[function(require,module,exports){ +},{"../../../components/color/attributes":584,"../constants":755,"./axis_attributes":759}],763:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136088,7 +140277,7 @@ function addProjectionsToD3(d3) { module.exports = addProjectionsToD3; -},{}],750:[function(require,module,exports){ +},{}],764:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136239,7 +140428,7 @@ function getBounds(projection, rangeBox) { return d3.geo.path().projection(projection).bounds(rangeBox); } -},{"./constants":741,"d3":104}],751:[function(require,module,exports){ +},{"./constants":755,"d3":114}],765:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136666,7 +140855,7 @@ function d3_eventDispatch(target) { return dispatch; } -},{"d3":104}],752:[function(require,module,exports){ +},{"d3":114}],766:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136695,7 +140884,7 @@ module.exports = function createGeoZoomReset(geo, geoLayout) { return zoomReset; }; -},{}],753:[function(require,module,exports){ +},{}],767:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136709,6 +140898,7 @@ module.exports = function createGeoZoomReset(geo, geoLayout) { var mouseChange = require('mouse-change'); var mouseWheel = require('mouse-wheel'); +var cartesianConstants = require('../cartesian/constants'); module.exports = createCamera; @@ -136720,8 +140910,10 @@ function Camera2D(element, plot) { this.lastInputTime = Date.now(); this.lastPos = [0, 0]; this.boxEnabled = false; + this.boxInited = false; this.boxStart = [0, 0]; this.boxEnd = [0, 0]; + this.dragStart = [0, 0]; } @@ -136735,6 +140927,21 @@ function createCamera(scene) { scene.yaxis.autorange = false; } + function getSubplotConstraint() { + // note: this assumes we only have one x and one y axis on this subplot + // when this constraint is lifted this block won't make sense + var constraints = scene.graphDiv._fullLayout._axisConstraintGroups; + var xaId = scene.xaxis._id; + var yaId = scene.yaxis._id; + for(var i = 0; i < constraints.length; i++) { + if(constraints[i][xaId] !== -1) { + if(constraints[i][yaId] !== -1) return true; + break; + } + } + return false; + } + result.mouseListener = mouseChange(element, function(buttons, x, y) { var dataBox = scene.calcDataBox(), viewBox = plot.viewBox; @@ -136742,6 +140949,11 @@ function createCamera(scene) { var lastX = result.lastPos[0], lastY = result.lastPos[1]; + var MINDRAG = cartesianConstants.MINDRAG * plot.pixelRatio; + var MINZOOM = cartesianConstants.MINZOOM * plot.pixelRatio; + + var dx, dy; + x *= plot.pixelRatio; y *= plot.pixelRatio; @@ -136774,32 +140986,114 @@ function createCamera(scene) { (viewBox[3] - viewBox[1]) * (dataBox[3] - dataBox[1]) + dataBox[1]; - if(!result.boxEnabled) { + if(!result.boxInited) { result.boxStart[0] = dataX; result.boxStart[1] = dataY; + result.dragStart[0] = x; + result.dragStart[1] = y; } result.boxEnd[0] = dataX; result.boxEnd[1] = dataY; - result.boxEnabled = true; + // we need to mark the box as initialized right away + // so that we can tell the start and end pionts apart + result.boxInited = true; + + // but don't actually enable the box until the cursor moves + if(!result.boxEnabled && ( + result.boxStart[0] !== result.boxEnd[0] || + result.boxStart[1] !== result.boxEnd[1]) + ) { + result.boxEnabled = true; + } + + // constrain aspect ratio if the axes require it + var smallDx = Math.abs(result.dragStart[0] - x) < MINZOOM; + var smallDy = Math.abs(result.dragStart[1] - y) < MINZOOM; + if(getSubplotConstraint() && !(smallDx && smallDy)) { + dx = result.boxEnd[0] - result.boxStart[0]; + dy = result.boxEnd[1] - result.boxStart[1]; + var dydx = (dataBox[3] - dataBox[1]) / (dataBox[2] - dataBox[0]); + + if(Math.abs(dx * dydx) > Math.abs(dy)) { + result.boxEnd[1] = result.boxStart[1] + + Math.abs(dx) * dydx * (Math.sign(dy) || 1); + + // gl-select-box clips to the plot area bounds, + // which breaks the axis constraint, so don't allow + // this box to go out of bounds + if(result.boxEnd[1] < dataBox[1]) { + result.boxEnd[1] = dataBox[1]; + result.boxEnd[0] = result.boxStart[0] + + (dataBox[1] - result.boxStart[1]) / Math.abs(dydx); + } + else if(result.boxEnd[1] > dataBox[3]) { + result.boxEnd[1] = dataBox[3]; + result.boxEnd[0] = result.boxStart[0] + + (dataBox[3] - result.boxStart[1]) / Math.abs(dydx); + } + } + else { + result.boxEnd[0] = result.boxStart[0] + + Math.abs(dy) / dydx * (Math.sign(dx) || 1); + + if(result.boxEnd[0] < dataBox[0]) { + result.boxEnd[0] = dataBox[0]; + result.boxEnd[1] = result.boxStart[1] + + (dataBox[0] - result.boxStart[0]) * Math.abs(dydx); + } + else if(result.boxEnd[0] > dataBox[2]) { + result.boxEnd[0] = dataBox[2]; + result.boxEnd[1] = result.boxStart[1] + + (dataBox[2] - result.boxStart[0]) * Math.abs(dydx); + } + } + } + // otherwise clamp small changes to the origin so we get 1D zoom + else { + if(smallDx) result.boxEnd[0] = result.boxStart[0]; + if(smallDy) result.boxEnd[1] = result.boxStart[1]; + } } else if(result.boxEnabled) { - updateRange(0, result.boxStart[0], result.boxEnd[0]); - updateRange(1, result.boxStart[1], result.boxEnd[1]); - unSetAutoRange(); + dx = result.boxStart[0] !== result.boxEnd[0]; + dy = result.boxStart[1] !== result.boxEnd[1]; + if(dx || dy) { + if(dx) { + updateRange(0, result.boxStart[0], result.boxEnd[0]); + scene.xaxis.autorange = false; + } + if(dy) { + updateRange(1, result.boxStart[1], result.boxEnd[1]); + scene.yaxis.autorange = false; + } + scene.relayoutCallback(); + } + else { + scene.glplot.setDirty(); + } result.boxEnabled = false; - scene.relayoutCallback(); + result.boxInited = false; } break; case 'pan': result.boxEnabled = false; + result.boxInited = false; if(buttons) { - var dx = (lastX - x) * (dataBox[2] - dataBox[0]) / + if(!result.panning) { + result.dragStart[0] = x; + result.dragStart[1] = y; + } + + if(Math.abs(result.dragStart[0] - x) < MINDRAG) x = result.dragStart[0]; + if(Math.abs(result.dragStart[1] - y) < MINDRAG) y = result.dragStart[1]; + + dx = (lastX - x) * (dataBox[2] - dataBox[0]) / (plot.viewBox[2] - plot.viewBox[0]); - var dy = (lastY - y) * (dataBox[3] - dataBox[1]) / + dy = (lastY - y) * (dataBox[3] - dataBox[1]) / (plot.viewBox[3] - plot.viewBox[1]); dataBox[0] += dx; @@ -136868,7 +141162,7 @@ function createCamera(scene) { return result; } -},{"mouse-change":431,"mouse-wheel":434}],754:[function(require,module,exports){ +},{"../cartesian/constants":734,"mouse-change":441,"mouse-wheel":444}],768:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137114,7 +141408,7 @@ function createAxes2D(scene) { module.exports = createAxes2D; -},{"../../lib/html2unicode":678,"../../lib/str2rgbarray":698,"../cartesian/axes":719,"../plots":778}],755:[function(require,module,exports){ +},{"../../lib/html2unicode":688,"../../lib/str2rgbarray":708,"../cartesian/axes":729,"../plots":792}],769:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137226,7 +141520,7 @@ exports.toSVG = function(gd) { } }; -},{"../../constants/xmlns_namespaces":664,"../cartesian/attributes":718,"../plots":778,"./scene2d":756}],756:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":674,"../cartesian/attributes":728,"../plots":792,"./scene2d":770}],770:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137251,6 +141545,7 @@ var createOptions = require('./convert'); var createCamera = require('./camera'); var convertHTMLToUnicode = require('../../lib/html2unicode'); var showNoWebGlMsg = require('../../lib/show_no_webgl_msg'); +var enforceAxisConstraints = require('../../plots/cartesian/constraints'); var AXES = ['xaxis', 'yaxis']; var STATIC_CANVAS, STATIC_CONTEXT; @@ -137655,6 +141950,13 @@ proto.plot = function(fullData, calcData, fullLayout) { ax.setScale(); } + var mockLayout = { + _axisConstraintGroups: this.graphDiv._fullLayout._axisConstraintGroups, + xaxis: this.xaxis, + yaxis: this.yaxis + }; + enforceAxisConstraints({_fullLayout: mockLayout}); + options.ticks = this.computeTickMarks(); options.dataBox = this.calcDataBox(); @@ -137773,26 +142075,36 @@ proto.draw = function() { var x = mouseListener.x * glplot.pixelRatio; var y = this.canvas.height - glplot.pixelRatio * mouseListener.y; + var result; + if(camera.boxEnabled && fullLayout.dragmode === 'zoom') { this.selectBox.enabled = true; - this.selectBox.selectBox = [ + var selectBox = this.selectBox.selectBox = [ Math.min(camera.boxStart[0], camera.boxEnd[0]), Math.min(camera.boxStart[1], camera.boxEnd[1]), Math.max(camera.boxStart[0], camera.boxEnd[0]), Math.max(camera.boxStart[1], camera.boxEnd[1]) ]; + // 1D zoom + for(var i = 0; i < 2; i++) { + if(camera.boxStart[i] === camera.boxEnd[i]) { + selectBox[i] = glplot.dataBox[i]; + selectBox[i + 2] = glplot.dataBox[i + 2]; + } + } + glplot.setDirty(); } - else { + else if(!camera.panning) { this.selectBox.enabled = false; var size = fullLayout._size, domainX = this.xaxis.domain, domainY = this.yaxis.domain; - var result = glplot.pick( + result = glplot.pick( (x / glplot.pixelRatio) + size.l + domainX[0] * size.w, (y / glplot.pixelRatio) - (size.t + (1 - domainY[1]) * size.h) ); @@ -137858,12 +142170,15 @@ proto.draw = function() { }); } } - else if(!result && this.lastPickResult) { - this.spikes.update({}); - this.lastPickResult = null; - this.graphDiv.emit('plotly_unhover'); - Fx.loneUnhover(this.svgContainer); - } + } + + // Remove hover effects if we're not over a point OR + // if we're zooming or panning (in which case result is not set) + if(!result && this.lastPickResult) { + this.spikes.update({}); + this.lastPickResult = null; + this.graphDiv.emit('plotly_unhover'); + Fx.loneUnhover(this.svgContainer); } glplot.draw(); @@ -137876,7 +142191,7 @@ proto.hoverFormatter = function(axisName, val) { return Axes.tickText(axis, axis.c2l(val), 'hover').text; }; -},{"../../lib/html2unicode":678,"../../lib/show_no_webgl_msg":696,"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"../../registry":793,"./camera":753,"./convert":754,"gl-plot2d":200,"gl-select-box":234,"gl-spikes2d":243,"webgl-context":540}],757:[function(require,module,exports){ +},{"../../lib/html2unicode":688,"../../lib/show_no_webgl_msg":706,"../../plots/cartesian/axes":729,"../../plots/cartesian/constraints":736,"../../plots/cartesian/graph_interact":738,"../../registry":807,"./camera":767,"./convert":768,"gl-plot2d":210,"gl-select-box":244,"gl-spikes2d":253,"webgl-context":550}],771:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138125,7 +142440,7 @@ function createCamera(element, options) { return camera; } -},{"3d-view":30,"mouse-change":431,"mouse-wheel":434,"right-now":480}],758:[function(require,module,exports){ +},{"3d-view":31,"mouse-change":441,"mouse-wheel":444,"right-now":490}],772:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138242,7 +142557,7 @@ exports.cleanId = function cleanId(id) { return 'scene' + sceneNum; }; -},{"../../constants/xmlns_namespaces":664,"../../lib":680,"../plots":778,"./layout/attributes":759,"./layout/defaults":763,"./layout/layout_attributes":764,"./scene":768}],759:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":674,"../../lib":690,"../plots":792,"./layout/attributes":773,"./layout/defaults":777,"./layout/layout_attributes":778,"./scene":782}],773:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138263,7 +142578,7 @@ module.exports = { } }; -},{}],760:[function(require,module,exports){ +},{}],774:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138369,7 +142684,7 @@ module.exports = { zerolinewidth: axesAttrs.zerolinewidth }; -},{"../../../components/color":575,"../../../lib/extend":672,"../../cartesian/layout_attributes":728}],761:[function(require,module,exports){ +},{"../../../components/color":585,"../../../lib/extend":682,"../../cartesian/layout_attributes":740}],775:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138386,6 +142701,7 @@ var colorMix = require('tinycolor2').mix; var Lib = require('../../../lib'); var layoutAttributes = require('./axis_attributes'); +var handleTypeDefaults = require('../../cartesian/type_defaults'); var handleAxisDefaults = require('../../cartesian/axis_defaults'); var axesNames = ['xaxis', 'yaxis', 'zaxis']; @@ -138405,12 +142721,14 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { var axName = axesNames[j]; containerIn = layoutIn[axName] || {}; - containerOut = { + containerOut = layoutOut[axName] = { _id: axName[0] + options.scene, _name: axName }; - layoutOut[axName] = containerOut = handleAxisDefaults( + handleTypeDefaults(containerIn, containerOut, coerce, options.data); + + handleAxisDefaults( containerIn, containerOut, coerce, { @@ -138438,7 +142756,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { } }; -},{"../../../lib":680,"../../cartesian/axis_defaults":721,"./axis_attributes":760,"tinycolor2":511}],762:[function(require,module,exports){ +},{"../../../lib":690,"../../cartesian/axis_defaults":731,"../../cartesian/type_defaults":751,"./axis_attributes":774,"tinycolor2":521}],776:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138593,7 +142911,7 @@ function createAxesOptions(plotlyOptions) { module.exports = createAxesOptions; -},{"../../../lib/html2unicode":678,"../../../lib/str2rgbarray":698,"arraytools":36}],763:[function(require,module,exports){ +},{"../../../lib/html2unicode":688,"../../../lib/str2rgbarray":708,"arraytools":38}],777:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138697,7 +143015,7 @@ function handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) { coerce('hovermode', opts.getDfltFromLayout('hovermode')); } -},{"../../../components/color":575,"../../../lib":680,"../../subplot_defaults":785,"./axis_defaults":761,"./layout_attributes":764}],764:[function(require,module,exports){ +},{"../../../components/color":585,"../../../lib":690,"../../subplot_defaults":799,"./axis_defaults":775,"./layout_attributes":778}],778:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138825,7 +143143,7 @@ module.exports = { } }; -},{"../../../lib/extend":672,"./axis_attributes":760}],765:[function(require,module,exports){ +},{"../../../lib/extend":682,"./axis_attributes":774}],779:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138871,7 +143189,7 @@ function createSpikeOptions(layout) { module.exports = createSpikeOptions; -},{"../../../lib/str2rgbarray":698}],766:[function(require,module,exports){ +},{"../../../lib/str2rgbarray":708}],780:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138967,7 +143285,7 @@ function computeTickMarks(scene) { scene.contourLevels = contourLevelsFromTicks(ticks); } -},{"../../../lib":680,"../../../lib/html2unicode":678,"../../cartesian/axes":719}],767:[function(require,module,exports){ +},{"../../../lib":690,"../../../lib/html2unicode":688,"../../cartesian/axes":729}],781:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139001,7 +143319,7 @@ function project(camera, v) { module.exports = project; -},{}],768:[function(require,module,exports){ +},{}],782:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139724,7 +144042,7 @@ proto.setConvert = function() { module.exports = Scene; -},{"../../lib":680,"../../lib/show_no_webgl_msg":696,"../../lib/str2rgbarray":698,"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"./camera":757,"./layout/convert":762,"./layout/spikes":765,"./layout/tick_marks":766,"./project":767,"gl-plot3d":202,"webgl-context":540}],769:[function(require,module,exports){ +},{"../../lib":690,"../../lib/show_no_webgl_msg":706,"../../lib/str2rgbarray":708,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"./camera":771,"./layout/convert":776,"./layout/spikes":779,"./layout/tick_marks":780,"./project":781,"gl-plot3d":212,"webgl-context":550}],783:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139880,7 +144198,7 @@ module.exports = { } }; -},{"../components/color/attributes":574,"../lib":680,"./font_attributes":739}],770:[function(require,module,exports){ +},{"../components/color/attributes":584,"../lib":690,"./font_attributes":753}],784:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139910,7 +144228,7 @@ module.exports = { mapOnErrorMsg: 'Mapbox error.' }; -},{}],771:[function(require,module,exports){ +},{}],785:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139984,7 +144302,7 @@ module.exports = function convertTextOpts(textposition, iconSize) { return { anchor: anchor, offset: offset }; }; -},{"../../lib":680}],772:[function(require,module,exports){ +},{"../../lib":690}],786:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140127,7 +144445,7 @@ function findAccessToken(gd, mapboxIds) { return accessToken; } -},{"../../constants/xmlns_namespaces":664,"../plots":778,"./constants":770,"./layout_attributes":774,"./layout_defaults":775,"./mapbox":776,"mapbox-gl":322}],773:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":674,"../plots":792,"./constants":784,"./layout_attributes":788,"./layout_defaults":789,"./mapbox":790,"mapbox-gl":332}],787:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140352,7 +144670,7 @@ module.exports = function createMapboxLayer(mapbox, index, opts) { return mapboxLayer; }; -},{"../../lib":680,"./convert_text_opts":771}],774:[function(require,module,exports){ +},{"../../lib":690,"./convert_text_opts":785}],788:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140556,7 +144874,7 @@ module.exports = { }; -},{"../../components/color":575,"../../lib":680,"../../traces/scatter/attributes":924,"../font_attributes":739}],775:[function(require,module,exports){ +},{"../../components/color":585,"../../lib":690,"../../traces/scatter/attributes":947,"../font_attributes":753}],789:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140652,7 +144970,7 @@ function handleLayerDefaults(containerIn, containerOut) { } } -},{"../../lib":680,"../subplot_defaults":785,"./layout_attributes":774}],776:[function(require,module,exports){ +},{"../../lib":690,"../subplot_defaults":799,"./layout_attributes":788}],790:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140766,10 +145084,14 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { }); // clear navigation container - var className = constants.controlContainerClassName, - controlContainer = self.div.getElementsByClassName(className)[0]; + var className = constants.controlContainerClassName; + var controlContainer = self.div.getElementsByClassName(className)[0]; self.div.removeChild(controlContainer); + // make sure canvas does not inherit left and top css + map._canvas.canvas.style.left = '0px'; + map._canvas.canvas.style.top = '0px'; + self.rejectOnError(reject); map.once('load', function() { @@ -140821,8 +145143,8 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { Fx.hover(gd, evt, self.id); }); - map.on('click', function() { - Fx.click(gd, { target: true }); + map.on('click', function(evt) { + Fx.click(gd, evt.originalEvent); }); function unhover() { @@ -140831,7 +145153,6 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { map.on('dragstart', unhover); map.on('zoomstart', unhover); - }; proto.updateMap = function(calcData, fullLayout, resolve, reject) { @@ -141113,7 +145434,7 @@ function convertCenter(center) { return [center.lon, center.lat]; } -},{"../../lib":680,"../cartesian/graph_interact":726,"./constants":770,"./layers":773,"./layout_attributes":774,"mapbox-gl":322}],777:[function(require,module,exports){ +},{"../../lib":690,"../cartesian/graph_interact":738,"./constants":784,"./layers":787,"./layout_attributes":788,"mapbox-gl":332}],791:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141151,7 +145472,7 @@ module.exports = { } }; -},{}],778:[function(require,module,exports){ +},{}],792:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141170,6 +145491,7 @@ var Plotly = require('../plotly'); var Registry = require('../registry'); var Lib = require('../lib'); var Color = require('../components/color'); +var BADNUM = require('../constants/numerical').BADNUM; var plots = module.exports = {}; @@ -141411,6 +145733,9 @@ plots.previousPromises = function(gd) { * Add source links to your graph inside the 'showSources' config argument. */ plots.addLinks = function(gd) { + // Do not do anything if showLink and showSources are not set to true in config + if(!gd._context.showLink && !gd._context.showSources) return; + var fullLayout = gd._fullLayout; var linkContainer = fullLayout._paper @@ -141978,14 +146303,15 @@ plots.supplyTraceDefaults = function(traceIn, traceOutIndex, layout, traceInInde coerce('legendgroup'); } - supplyTransformDefaults(traceIn, traceOut, layout); + plots.supplyTransformDefaults(traceIn, traceOut, layout); } return traceOut; }; -function supplyTransformDefaults(traceIn, traceOut, layout) { +plots.supplyTransformDefaults = function(traceIn, traceOut, layout) { var globalTransforms = layout._globalTransforms || []; + var transformModules = layout._transformModules || []; if(!Array.isArray(traceIn.transforms) && globalTransforms.length === 0) return; @@ -142006,7 +146332,7 @@ function supplyTransformDefaults(traceIn, traceOut, layout) { transformOut.type = type; transformOut._module = _module; - Lib.pushUnique(layout._transformModules, _module); + Lib.pushUnique(transformModules, _module); } else { transformOut = Lib.extendFlat({}, transformIn); @@ -142014,7 +146340,7 @@ function supplyTransformDefaults(traceIn, traceOut, layout) { containerOut.push(transformOut); } -} +}; function applyTransforms(fullTrace, fullData, layout, fullLayout) { var container = fullTrace.transforms, @@ -143104,6 +147430,13 @@ plots.doCalcdata = function(gd, traces) { // to be filled in later by ax.d2c for(i = 0; i < axList.length; i++) { axList[i]._categories = axList[i]._initialCategories.slice(); + + // Build the lookup map for initialized categories + axList[i]._categoriesMap = {}; + for(j = 0; j < axList[i]._categories.length; j++) { + axList[i]._categoriesMap[axList[i]._categories[j]] = j; + } + if(axList[i].type === 'category') hasCategoryAxis = true; } @@ -143148,6 +147481,8 @@ plots.doCalcdata = function(gd, traces) { axList[i]._min = []; axList[i]._max = []; axList[i]._categories = []; + // Reset the look up map + axList[i]._categoriesMap = {}; } } @@ -143166,11 +147501,8 @@ plots.doCalcdata = function(gd, traces) { // // This ensures there is a calcdata item for every trace, // even if cartesian logic doesn't handle it (for things like legends). - // - // Tag this artificial calc point with 'placeholder: true', - // to make it easier to skip over them in during the plot and hover step. if(!Array.isArray(cd) || !cd[0]) { - cd = [{x: false, y: false, placeholder: true}]; + cd = [{x: BADNUM, y: BADNUM}]; } // add the trace-wide properties to the first point, @@ -143265,7 +147597,7 @@ plots.generalUpdatePerTraceModule = function(subplot, subplotCalcData, subplotLa subplot.traceHash = traceHash; }; -},{"../components/color":575,"../components/errorbars":604,"../lib":680,"../plotly":714,"../registry":793,"./animation_attributes":715,"./attributes":717,"./command":738,"./font_attributes":739,"./frame_attributes":740,"./layout_attributes":769,"d3":104,"fast-isnumeric":113}],779:[function(require,module,exports){ +},{"../components/color":585,"../components/errorbars":614,"../constants/numerical":672,"../lib":690,"../plotly":724,"../registry":807,"./animation_attributes":725,"./attributes":727,"./command":752,"./font_attributes":753,"./frame_attributes":754,"./layout_attributes":783,"d3":114,"fast-isnumeric":123}],793:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143290,7 +147622,7 @@ module.exports = { } }; -},{"../../traces/scatter/attributes":924}],780:[function(require,module,exports){ +},{"../../traces/scatter/attributes":947}],794:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143405,7 +147737,7 @@ module.exports = { } }; -},{"../../lib/extend":672,"../cartesian/layout_attributes":728}],781:[function(require,module,exports){ +},{"../../lib/extend":682,"../cartesian/layout_attributes":740}],795:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143420,7 +147752,7 @@ var Polar = module.exports = require('./micropolar'); Polar.manager = require('./micropolar_manager'); -},{"./micropolar":782,"./micropolar_manager":783}],782:[function(require,module,exports){ +},{"./micropolar":796,"./micropolar_manager":797}],796:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144839,7 +149171,7 @@ var µ = module.exports = { version: '0.2.2' }; return exports; }; -},{"../../lib":680,"d3":104}],783:[function(require,module,exports){ +},{"../../lib":690,"d3":114}],797:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144925,7 +149257,7 @@ manager.fillLayout = function(_gd) { _gd._fullLayout = extendDeepAll(dflts, _gd.layout); }; -},{"../../components/color":575,"../../lib":680,"./micropolar":782,"./undo_manager":784,"d3":104}],784:[function(require,module,exports){ +},{"../../components/color":585,"../../lib":690,"./micropolar":796,"./undo_manager":798,"d3":114}],798:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144991,7 +149323,7 @@ module.exports = function UndoManager() { }; }; -},{}],785:[function(require,module,exports){ +},{}],799:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145066,7 +149398,7 @@ module.exports = function handleSubplotDefaults(layoutIn, layoutOut, fullData, o } }; -},{"../lib":680,"./plots":778}],786:[function(require,module,exports){ +},{"../lib":690,"./plots":792}],800:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145140,7 +149472,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) } }; -},{"../../plots/plots":778,"./layout/attributes":787,"./layout/defaults":790,"./layout/layout_attributes":791,"./ternary":792}],787:[function(require,module,exports){ +},{"../../plots/plots":792,"./layout/attributes":801,"./layout/defaults":804,"./layout/layout_attributes":805,"./ternary":806}],801:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145161,7 +149493,7 @@ module.exports = { } }; -},{}],788:[function(require,module,exports){ +},{}],802:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145221,7 +149553,7 @@ module.exports = { } }; -},{"../../../lib/extend":672,"../../cartesian/layout_attributes":728}],789:[function(require,module,exports){ +},{"../../../lib/extend":682,"../../cartesian/layout_attributes":740}],803:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145305,7 +149637,7 @@ module.exports = function supplyLayoutDefaults(containerIn, containerOut, option } }; -},{"../../../lib":680,"../../cartesian/tick_label_defaults":734,"../../cartesian/tick_mark_defaults":735,"../../cartesian/tick_value_defaults":736,"./axis_attributes":788,"tinycolor2":511}],790:[function(require,module,exports){ +},{"../../../lib":690,"../../cartesian/tick_label_defaults":747,"../../cartesian/tick_mark_defaults":748,"../../cartesian/tick_value_defaults":749,"./axis_attributes":802,"tinycolor2":521}],804:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145347,7 +149679,7 @@ function handleTernaryDefaults(ternaryLayoutIn, ternaryLayoutOut, coerce, option for(var j = 0; j < axesNames.length; j++) { axName = axesNames[j]; containerIn = ternaryLayoutIn[axName] || {}; - containerOut = ternaryLayoutOut[axName] = {_name: axName}; + containerOut = ternaryLayoutOut[axName] = {_name: axName, type: 'linear'}; handleAxisDefaults(containerIn, containerOut, options); } @@ -145368,7 +149700,7 @@ function handleTernaryDefaults(ternaryLayoutIn, ternaryLayoutOut, coerce, option } } -},{"../../../components/color":575,"../../subplot_defaults":785,"./axis_defaults":789,"./layout_attributes":791}],791:[function(require,module,exports){ +},{"../../../components/color":585,"../../subplot_defaults":799,"./axis_defaults":803,"./layout_attributes":805}],805:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145424,7 +149756,7 @@ module.exports = { caxis: ternaryAxesAttrs }; -},{"../../../components/color/attributes":574,"./axis_attributes":788}],792:[function(require,module,exports){ +},{"../../../components/color/attributes":584,"./axis_attributes":802}],806:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146067,7 +150399,7 @@ function removeZoombox(gd) { .remove(); } -},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../components/titles":651,"../../lib":680,"../../lib/extend":672,"../../plotly":714,"../cartesian/axes":719,"../cartesian/constants":724,"../cartesian/graph_interact":726,"../cartesian/select":732,"../cartesian/set_convert":733,"../plots":778,"d3":104,"tinycolor2":511}],793:[function(require,module,exports){ +},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../components/titles":661,"../../lib":690,"../../lib/extend":682,"../../plotly":724,"../cartesian/axes":729,"../cartesian/constants":734,"../cartesian/graph_interact":738,"../cartesian/select":745,"../cartesian/set_convert":746,"../plots":792,"d3":114,"tinycolor2":521}],807:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146258,7 +150590,7 @@ function getTraceType(traceType) { return traceType; } -},{"./lib/loggers":683,"./lib/noop":687,"./lib/push_unique":691,"./plots/attributes":717}],794:[function(require,module,exports){ +},{"./lib/loggers":693,"./lib/noop":697,"./lib/push_unique":701,"./plots/attributes":727}],808:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146428,7 +150760,7 @@ module.exports = function clonePlot(graphObj, options) { return plotTile; }; -},{"../lib":680,"../plots/plots":778}],795:[function(require,module,exports){ +},{"../lib":690,"../plots/plots":792}],809:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146494,7 +150826,7 @@ function downloadImage(gd, opts) { module.exports = downloadImage; -},{"../lib":680,"../plot_api/to_image":712,"./filesaver":796}],796:[function(require,module,exports){ +},{"../lib":690,"../plot_api/to_image":722,"./filesaver":810}],810:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146562,7 +150894,7 @@ var fileSaver = function(url, name) { module.exports = fileSaver; -},{}],797:[function(require,module,exports){ +},{}],811:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146595,7 +150927,7 @@ exports.getRedrawFunc = function(gd) { }; }; -},{}],798:[function(require,module,exports){ +},{}],812:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146621,7 +150953,7 @@ var Snapshot = { module.exports = Snapshot; -},{"./cloneplot":794,"./download":795,"./helpers":797,"./svgtoimg":799,"./toimage":800,"./tosvg":801}],799:[function(require,module,exports){ +},{"./cloneplot":808,"./download":809,"./helpers":811,"./svgtoimg":813,"./toimage":814,"./tosvg":815}],813:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146752,7 +151084,7 @@ function svgToImg(opts) { module.exports = svgToImg; -},{"../lib":680,"events":111}],800:[function(require,module,exports){ +},{"../lib":690,"events":121}],814:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146832,7 +151164,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":680,"../plotly":714,"./cloneplot":794,"./helpers":797,"./svgtoimg":799,"./tosvg":801,"events":111}],801:[function(require,module,exports){ +},{"../lib":690,"../plotly":724,"./cloneplot":808,"./helpers":811,"./svgtoimg":813,"./tosvg":815,"events":121}],815:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146951,7 +151283,7 @@ module.exports = function toSVG(gd, format) { return s; }; -},{"../components/color":575,"../components/drawing":598,"../constants/xmlns_namespaces":664,"../lib/svg_text_utils":699,"d3":104}],802:[function(require,module,exports){ +},{"../components/color":585,"../components/drawing":608,"../constants/xmlns_namespaces":674,"../lib/svg_text_utils":709,"d3":114}],816:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146969,6 +151301,7 @@ var mergeArray = require('../../lib').mergeArray; // arrayOk attributes, merge them into calcdata array module.exports = function arraysToCalcdata(cd, trace) { mergeArray(trace.text, cd, 'tx'); + mergeArray(trace.hovertext, cd, 'htx'); var marker = trace.marker; if(marker) { @@ -146983,7 +151316,7 @@ module.exports = function arraysToCalcdata(cd, trace) { } }; -},{"../../lib":680}],803:[function(require,module,exports){ +},{"../../lib":690}],817:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147035,6 +151368,7 @@ module.exports = { dy: scatterAttrs.dy, text: scatterAttrs.text, + hovertext: scatterAttrs.hovertext, textposition: { valType: 'enumerated', @@ -147107,7 +151441,7 @@ module.exports = { } }; -},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/errorbars/attributes":600,"../../lib/extend":672,"../../plots/font_attributes":739,"../scatter/attributes":924}],804:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/errorbars/attributes":610,"../../lib/extend":682,"../../plots/font_attributes":753,"../scatter/attributes":947}],818:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147159,18 +151493,11 @@ module.exports = function calc(gd, trace) { // create the "calculated data" to plot var serieslen = Math.min(pos.length, size.length), - cd = []; + cd = new Array(serieslen); - // set position + // set position and size for(i = 0; i < serieslen; i++) { - - // add bars with non-numeric sizes to calcdata - // so that ensure that traces with gaps are - // plotted in the correct order - - if(isNumeric(pos[i])) { - cd.push({p: pos[i]}); - } + cd[i] = { p: pos[i], s: size[i] }; } // set base @@ -147194,13 +151521,6 @@ module.exports = function calc(gd, trace) { } } - // set size - for(i = 0; i < cd.length; i++) { - if(isNumeric(size[i])) { - cd[i].s = size[i]; - } - } - // auto-z and autocolorscale if applicable if(hasColorscale(trace, 'marker')) { colorscaleCalc(trace, trace.marker.color, 'marker', 'c'); @@ -147214,7 +151534,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"../../plots/cartesian/axes":719,"./arrays_to_calcdata":802,"fast-isnumeric":113}],805:[function(require,module,exports){ +},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"../../plots/cartesian/axes":729,"./arrays_to_calcdata":816,"fast-isnumeric":123}],819:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147254,6 +151574,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('width'); coerce('text'); + coerce('hovertext'); var textPosition = coerce('textposition'); @@ -147273,7 +151594,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, Color.defaultLine, {axis: 'x', inherit: 'y'}); }; -},{"../../components/color":575,"../../components/errorbars/defaults":603,"../../lib":680,"../bar/style_defaults":814,"../scatter/xy_defaults":946,"./attributes":803}],806:[function(require,module,exports){ +},{"../../components/color":585,"../../components/errorbars/defaults":613,"../../lib":690,"../bar/style_defaults":828,"../scatter/xy_defaults":969,"./attributes":817}],820:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147291,42 +151612,57 @@ var Color = require('../../components/color'); module.exports = function hoverPoints(pointData, xval, yval, hovermode) { - var cd = pointData.cd, - trace = cd[0].trace, - t = cd[0].t, - xa = pointData.xa, - ya = pointData.ya, - barDelta = (hovermode === 'closest') ? - t.barwidth / 2 : - t.bargroupwidth / 2, - barPos; + var cd = pointData.cd; + var trace = cd[0].trace; + var t = cd[0].t; + var xa = pointData.xa; + var ya = pointData.ya; - if(hovermode !== 'closest') barPos = function(di) { return di.p; }; - else if(trace.orientation === 'h') barPos = function(di) { return di.y; }; - else barPos = function(di) { return di.x; }; + var posVal, thisBarMinPos, thisBarMaxPos, minPos, maxPos, dx, dy; + + var positionFn = function(di) { + return Fx.inbox(minPos(di) - posVal, maxPos(di) - posVal); + }; - var dx, dy; if(trace.orientation === 'h') { + posVal = yval; + thisBarMinPos = function(di) { return di.y - di.w / 2; }; + thisBarMaxPos = function(di) { return di.y + di.w / 2; }; dx = function(di) { // add a gradient so hovering near the end of a // bar makes it a little closer match return Fx.inbox(di.b - xval, di.x - xval) + (di.x - xval) / (di.x - di.b); }; - dy = function(di) { - var centerPos = barPos(di) - yval; - return Fx.inbox(centerPos - barDelta, centerPos + barDelta); - }; + dy = positionFn; } else { + posVal = xval; + thisBarMinPos = function(di) { return di.x - di.w / 2; }; + thisBarMaxPos = function(di) { return di.x + di.w / 2; }; dy = function(di) { return Fx.inbox(di.b - yval, di.y - yval) + (di.y - yval) / (di.y - di.b); }; - dx = function(di) { - var centerPos = barPos(di) - xval; - return Fx.inbox(centerPos - barDelta, centerPos + barDelta); - }; + dx = positionFn; } + minPos = (hovermode === 'closest') ? + thisBarMinPos : + function(di) { + /* + * In compare mode, accept a bar if you're on it *or* its group. + * Nearly always it's the group that matters, but in case the bar + * was explicitly set wider than its group we'd better accept the + * whole bar. + */ + return Math.min(thisBarMinPos(di), di.p - t.bargroupwidth / 2); + }; + + maxPos = (hovermode === 'closest') ? + thisBarMaxPos : + function(di) { + return Math.max(thisBarMaxPos(di), di.p + t.bargroupwidth / 2); + }; + var distfn = Fx.getDistanceFunction(hovermode, dx, dy); Fx.getClosest(cd, distfn, pointData); @@ -147334,7 +151670,8 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { if(pointData.index === false) return; // the closest data point - var di = cd[pointData.index], + var index = pointData.index, + di = cd[index], mc = di.mcc || trace.marker.color, mlc = di.mlcc || trace.marker.line.color, mlw = di.mlw || trace.marker.line.width; @@ -147346,27 +151683,30 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { pointData.x0 = pointData.x1 = xa.c2p(di.x, true); pointData.xLabelVal = size; - pointData.y0 = ya.c2p(barPos(di) - barDelta, true); - pointData.y1 = ya.c2p(barPos(di) + barDelta, true); + pointData.y0 = ya.c2p(minPos(di), true); + pointData.y1 = ya.c2p(maxPos(di), true); pointData.yLabelVal = di.p; } else { pointData.y0 = pointData.y1 = ya.c2p(di.y, true); pointData.yLabelVal = size; - pointData.x0 = xa.c2p(barPos(di) - barDelta, true); - pointData.x1 = xa.c2p(barPos(di) + barDelta, true); + pointData.x0 = xa.c2p(minPos(di), true); + pointData.x1 = xa.c2p(maxPos(di), true); pointData.xLabelVal = di.p; } - if(di.tx) pointData.text = di.tx; + if(di.htx) pointData.text = di.htx; + else if(trace.hovertext) pointData.text = trace.hovertext; + else if(di.tx) pointData.text = di.tx; + else if(trace.text) pointData.text = trace.text; ErrorBars.hoverInfo(di, trace, pointData); return [pointData]; }; -},{"../../components/color":575,"../../components/errorbars":604,"../../plots/cartesian/graph_interact":726}],807:[function(require,module,exports){ +},{"../../components/color":585,"../../components/errorbars":614,"../../plots/cartesian/graph_interact":738}],821:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147402,7 +151742,7 @@ Bar.meta = { module.exports = Bar; -},{"../../plots/cartesian":727,"../scatter/colorbar":927,"./arrays_to_calcdata":802,"./attributes":803,"./calc":804,"./defaults":805,"./hover":806,"./layout_attributes":808,"./layout_defaults":809,"./plot":810,"./set_positions":811,"./style":813}],808:[function(require,module,exports){ +},{"../../plots/cartesian":739,"../scatter/colorbar":950,"./arrays_to_calcdata":816,"./attributes":817,"./calc":818,"./defaults":819,"./hover":820,"./layout_attributes":822,"./layout_defaults":823,"./plot":824,"./set_positions":825,"./style":827}],822:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147446,7 +151786,7 @@ module.exports = { } }; -},{}],809:[function(require,module,exports){ +},{}],823:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147504,7 +151844,7 @@ module.exports = function(layoutIn, layoutOut, fullData) { coerce('bargroupgap'); }; -},{"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793,"./layout_attributes":808}],810:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807,"./layout_attributes":822}],824:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147555,9 +151895,7 @@ module.exports = function plot(gd, plotinfo, cdbar) { var t = d[0].t, trace = d[0].trace, poffset = t.poffset, - poffsetIsArray = Array.isArray(poffset), - barwidth = t.barwidth, - barwidthIsArray = Array.isArray(barwidth); + poffsetIsArray = Array.isArray(poffset); d3.select(this).selectAll('g.point') .data(Lib.identity) @@ -147568,7 +151906,7 @@ module.exports = function plot(gd, plotinfo, cdbar) { // log values go off-screen by plotwidth // so you see them continue if you drag the plot var p0 = di.p + ((poffsetIsArray) ? poffset[i] : poffset), - p1 = p0 + ((barwidthIsArray) ? barwidth[i] : barwidth), + p1 = p0 + di.w, s0 = di.b, s1 = s0 + di.s; @@ -148026,7 +152364,7 @@ function coerceColor(attributeDefinition, value, defaultValue) { attributeDefinition.dflt; } -},{"../../components/color":575,"../../components/drawing":598,"../../components/errorbars":604,"../../lib":680,"../../lib/svg_text_utils":699,"./attributes":803,"d3":104,"fast-isnumeric":113,"tinycolor2":511}],811:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"../../components/errorbars":614,"../../lib":690,"../../lib/svg_text_utils":709,"./attributes":817,"d3":114,"fast-isnumeric":123,"tinycolor2":521}],825:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148039,6 +152377,7 @@ function coerceColor(attributeDefinition, value, defaultValue) { 'use strict'; var isNumeric = require('fast-isnumeric'); +var BADNUM = require('../../constants/numerical').BADNUM; var Registry = require('../../registry'); var Axes = require('../../plots/cartesian/axes'); @@ -148066,8 +152405,7 @@ module.exports = function setPositions(gd, plotinfo) { fullTrace.visible === true && Registry.traceIs(fullTrace, 'bar') && fullTrace.xaxis === xa._id && - fullTrace.yaxis === ya._id && - !calcTraces[i][0].placeholder + fullTrace.yaxis === ya._id ) { if(fullTrace.orientation === 'h') { calcTracesHorizontal.push(calcTraces[i]); @@ -148217,7 +152555,7 @@ function setGroupPositionsInStackOrRelativeMode(gd, pa, sa, calcTraces) { for(var j = 0; j < calcTrace.length; j++) { var bar = calcTrace[j]; - if(!isNumeric(bar.s)) continue; + if(bar.s === BADNUM) continue; var isOutmostBar = ((bar.b + bar.s) === sieve.get(bar.p, bar.s)); if(isOutmostBar) bar._outmost = true; @@ -148265,7 +152603,7 @@ function setOffsetAndWidth(gd, pa, sieve) { applyAttributes(sieve); // store the bar center in each calcdata item - setBarCenter(gd, pa, sieve); + setBarCenterAndWidth(gd, pa, sieve); // update position axes updatePositionAxis(gd, pa, sieve); @@ -148315,7 +152653,7 @@ function setOffsetAndWidthInGroupMode(gd, pa, sieve) { applyAttributes(sieve); // store the bar center in each calcdata item - setBarCenter(gd, pa, sieve); + setBarCenterAndWidth(gd, pa, sieve); // update position axes updatePositionAxis(gd, pa, sieve, overlap); @@ -148406,7 +152744,7 @@ function applyAttributes(sieve) { } -function setBarCenter(gd, pa, sieve) { +function setBarCenterAndWidth(gd, pa, sieve) { var calcTraces = sieve.traces, pLetter = getAxisLetter(pa); @@ -148421,9 +152759,13 @@ function setBarCenter(gd, pa, sieve) { for(var j = 0; j < calcTrace.length; j++) { var calcBar = calcTrace[j]; + // store the actual bar width and position, for use by hover + var width = calcBar.w = (barwidthIsArray) ? barwidth[j] : barwidth; calcBar[pLetter] = calcBar.p + ((poffsetIsArray) ? poffset[j] : poffset) + - ((barwidthIsArray) ? barwidth[j] : barwidth) / 2; + width / 2; + + } } } @@ -148531,7 +152873,7 @@ function stackBars(gd, sa, sieve) { for(j = 0; j < trace.length; j++) { bar = trace[j]; - if(!isNumeric(bar.s)) continue; + if(bar.s === BADNUM) continue; // stack current bar and get previous sum var barBase = sieve.put(bar.p, bar.b + bar.s), @@ -148562,7 +152904,7 @@ function sieveBars(gd, sa, sieve) { for(var j = 0; j < trace.length; j++) { var bar = trace[j]; - if(isNumeric(bar.s)) sieve.put(bar.p, bar.b + bar.s); + if(bar.s !== BADNUM) sieve.put(bar.p, bar.b + bar.s); } } } @@ -148598,7 +152940,7 @@ function normalizeBars(gd, sa, sieve) { for(var j = 0; j < trace.length; j++) { var bar = trace[j]; - if(!isNumeric(bar.s)) continue; + if(bar.s === BADNUM) continue; var scale = Math.abs(sTop / sieve.get(bar.p, bar.s)); bar.b *= scale; @@ -148622,7 +152964,7 @@ function getAxisLetter(ax) { return ax._id.charAt(0); } -},{"../../plots/cartesian/axes":719,"../../registry":793,"./sieve.js":812,"fast-isnumeric":113}],812:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../plots/cartesian/axes":729,"../../registry":807,"./sieve.js":826,"fast-isnumeric":123}],826:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148636,6 +152978,7 @@ function getAxisLetter(ax) { module.exports = Sieve; var Lib = require('../../lib'); +var BADNUM = require('../../constants/numerical').BADNUM; /** * Helper class to sieve data from traces into bins @@ -148659,7 +153002,7 @@ function Sieve(traces, separateNegativeValues, dontMergeOverlappingData) { var trace = traces[i]; for(var j = 0; j < trace.length; j++) { var bar = trace[j]; - positions.push(bar.p); + if(bar.p !== BADNUM) positions.push(bar.p); } } this.positions = positions; @@ -148723,7 +153066,7 @@ Sieve.prototype.getLabel = function getLabel(position, value) { return prefix + label; }; -},{"../../lib":680}],813:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690}],827:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148801,7 +153144,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/color":575,"../../components/drawing":598,"../../components/errorbars":604,"d3":104}],814:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"../../components/errorbars":614,"d3":114}],828:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148838,7 +153181,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, default coerce('marker.line.width'); }; -},{"../../components/color":575,"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588}],815:[function(require,module,exports){ +},{"../../components/color":585,"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598}],829:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148971,7 +153314,7 @@ module.exports = { fillcolor: scatterAttrs.fillcolor }; -},{"../../components/color/attributes":574,"../../lib/extend":672,"../scatter/attributes":924}],816:[function(require,module,exports){ +},{"../../components/color/attributes":584,"../../lib/extend":682,"../scatter/attributes":947}],830:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149120,7 +153463,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../lib":680,"../../plots/cartesian/axes":719,"fast-isnumeric":113}],817:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"fast-isnumeric":123}],831:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149193,7 +153536,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/color":575,"../../lib":680,"../../registry":793,"./attributes":815}],818:[function(require,module,exports){ +},{"../../components/color":585,"../../lib":690,"../../registry":807,"./attributes":829}],832:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149302,7 +153645,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return closeData; }; -},{"../../components/color":575,"../../lib":680,"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726}],819:[function(require,module,exports){ +},{"../../components/color":585,"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738}],833:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149335,7 +153678,7 @@ Box.meta = { module.exports = Box; -},{"../../plots/cartesian":727,"./attributes":815,"./calc":816,"./defaults":817,"./hover":818,"./layout_attributes":820,"./layout_defaults":821,"./plot":822,"./set_positions":823,"./style":824}],820:[function(require,module,exports){ +},{"../../plots/cartesian":739,"./attributes":829,"./calc":830,"./defaults":831,"./hover":832,"./layout_attributes":834,"./layout_defaults":835,"./plot":836,"./set_positions":837,"./style":838}],834:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149373,7 +153716,7 @@ module.exports = { } }; -},{}],821:[function(require,module,exports){ +},{}],835:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149407,7 +153750,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { coerce('boxgroupgap'); }; -},{"../../lib":680,"../../registry":793,"./layout_attributes":820}],822:[function(require,module,exports){ +},{"../../lib":690,"../../registry":807,"./layout_attributes":834}],836:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149647,7 +153990,7 @@ module.exports = function plot(gd, plotinfo, cdbox) { }); }; -},{"../../components/drawing":598,"../../lib":680,"d3":104}],823:[function(require,module,exports){ +},{"../../components/drawing":608,"../../lib":690,"d3":114}],837:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149741,7 +154084,7 @@ module.exports = function setPositions(gd, plotinfo) { } }; -},{"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793}],824:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807}],838:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149780,7 +154123,7 @@ module.exports = function style(gd) { }); }; -},{"../../components/color":575,"../../components/drawing":598,"d3":104}],825:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"d3":114}],839:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149833,7 +154176,7 @@ module.exports = { whiskerwidth: Lib.extendFlat({}, boxAttrs.whiskerwidth, { dflt: 0 }) }; -},{"../../lib":680,"../box/attributes":815,"../ohlc/attributes":891}],826:[function(require,module,exports){ +},{"../../lib":690,"../box/attributes":829,"../ohlc/attributes":905}],840:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149881,7 +154224,7 @@ function handleDirection(traceIn, traceOut, coerce, direction) { coerce(direction + '.fillcolor'); } -},{"../../lib":680,"../ohlc/direction_defaults":893,"../ohlc/helpers":894,"../ohlc/ohlc_defaults":896,"./attributes":825}],827:[function(require,module,exports){ +},{"../../lib":690,"../ohlc/direction_defaults":907,"../ohlc/helpers":908,"../ohlc/ohlc_defaults":910,"./attributes":839}],841:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149911,7 +154254,7 @@ module.exports = { register(require('../box')); register(require('./transform')); -},{"../../plot_api/register":709,"../../plots/cartesian":727,"../box":819,"./attributes":825,"./defaults":826,"./transform":828}],828:[function(require,module,exports){ +},{"../../plot_api/register":719,"../../plots/cartesian":739,"../box":833,"./attributes":839,"./defaults":840,"./transform":842}],842:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150039,7 +154382,7 @@ exports.calcTransform = function calcTransform(gd, trace, opts) { trace.y = y; }; -},{"../../lib":680,"../ohlc/helpers":894}],829:[function(require,module,exports){ +},{"../../lib":690,"../ohlc/helpers":908}],843:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150087,7 +154430,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../../plots/attributes":717,"../scattergeo/attributes":953}],830:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../../plots/attributes":727,"../scattergeo/attributes":976}],844:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150106,7 +154449,7 @@ module.exports = function calc(gd, trace) { colorscaleCalc(trace, trace.z, '', 'z'); }; -},{"../../components/colorscale/calc":581}],831:[function(require,module,exports){ +},{"../../components/colorscale/calc":591}],845:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150161,7 +154504,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('hoverinfo', (layout._dataLength === 1) ? 'location+z+text' : undefined); }; -},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":829}],832:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":843}],846:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150180,7 +154523,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],833:[function(require,module,exports){ +},{}],847:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150250,7 +154593,7 @@ function makeHoverInfo(pointData, trace, pt, axis) { pointData.extraText = text.join('
'); } -},{"../../plots/cartesian/axes":719,"./attributes":829}],834:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"./attributes":843}],848:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150282,7 +154625,7 @@ Choropleth.meta = { module.exports = Choropleth; -},{"../../plots/geo":743,"../heatmap/colorbar":854,"./attributes":829,"./calc":830,"./defaults":831,"./event_data":832,"./hover":833,"./plot":835}],835:[function(require,module,exports){ +},{"../../plots/geo":757,"../heatmap/colorbar":868,"./attributes":843,"./calc":844,"./defaults":845,"./event_data":846,"./hover":847,"./plot":849}],849:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150416,7 +154759,7 @@ function style(geo) { }); } -},{"../../components/color":575,"../../components/colorscale":589,"../../components/drawing":598,"../../lib/array_to_calc_item":667,"../../lib/geo_location_utils":675,"../../lib/topojson_utils":701,"../../plots/geo/constants":741,"d3":104}],836:[function(require,module,exports){ +},{"../../components/color":585,"../../components/colorscale":599,"../../components/drawing":608,"../../lib/array_to_calc_item":677,"../../lib/geo_location_utils":685,"../../lib/topojson_utils":711,"../../plots/geo/constants":755,"d3":114}],850:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150515,7 +154858,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../heatmap/attributes":851,"../scatter/attributes":924}],837:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../heatmap/attributes":865,"../scatter/attributes":947}],851:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150619,7 +154962,7 @@ function autoContours(start, end, ncontours) { return dummyAx; } -},{"../../lib":680,"../../plots/cartesian/axes":719,"../heatmap/calc":852}],838:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../heatmap/calc":866}],852:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150681,7 +155024,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":578,"../../plots/plots":778,"./end_plus":842,"./make_color_map":846}],839:[function(require,module,exports){ +},{"../../components/colorbar/draw":588,"../../plots/plots":792,"./end_plus":856,"./make_color_map":860}],853:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150721,7 +155064,7 @@ module.exports.CHOOSESADDLE = { // substitute to be used up later? module.exports.SADDLEREMAINDER = {1: 4, 2: 8, 4: 1, 7: 13, 8: 2, 11: 14, 13: 7, 14: 11}; -},{}],840:[function(require,module,exports){ +},{}],854:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150753,7 +155096,7 @@ module.exports = function handleContourDefaults(traceIn, traceOut, coerce) { if(autoContour || !contourSize) coerce('ncontours'); }; -},{"../../lib":680,"./attributes":836}],841:[function(require,module,exports){ +},{"../../lib":690,"./attributes":850}],855:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150792,7 +155135,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout handleStyleDefaults(traceIn, traceOut, coerce, layout); }; -},{"../../lib":680,"../heatmap/has_columns":858,"../heatmap/xyz_defaults":866,"./attributes":836,"./contours_defaults":840,"./style_defaults":850}],842:[function(require,module,exports){ +},{"../../lib":690,"../heatmap/has_columns":872,"../heatmap/xyz_defaults":880,"./attributes":850,"./contours_defaults":854,"./style_defaults":864}],856:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150812,7 +155155,7 @@ module.exports = function endPlus(contours) { return contours.end + contours.size / 1e6; }; -},{}],843:[function(require,module,exports){ +},{}],857:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151082,7 +155425,7 @@ function getInterpPx(pi, loc, step) { } } -},{"../../lib":680,"./constants":839}],844:[function(require,module,exports){ +},{"../../lib":690,"./constants":853}],858:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151101,7 +155444,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return heatmapHoverPoints(pointData, xval, yval, hovermode, true); }; -},{"../heatmap/hover":859}],845:[function(require,module,exports){ +},{"../heatmap/hover":873}],859:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151133,7 +155476,7 @@ Contour.meta = { module.exports = Contour; -},{"../../plots/cartesian":727,"./attributes":836,"./calc":837,"./colorbar":838,"./defaults":841,"./hover":844,"./plot":848,"./style":849}],846:[function(require,module,exports){ +},{"../../plots/cartesian":739,"./attributes":850,"./calc":851,"./colorbar":852,"./defaults":855,"./hover":858,"./plot":862,"./style":863}],860:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151212,7 +155555,7 @@ module.exports = function makeColorMap(trace) { }); }; -},{"../../components/colorscale":589,"./end_plus":842,"d3":104}],847:[function(require,module,exports){ +},{"../../components/colorscale":599,"./end_plus":856,"d3":114}],861:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151304,7 +155647,7 @@ function getMarchingIndex(val, corners) { return (mi === 15) ? 0 : mi; } -},{"./constants":839}],848:[function(require,module,exports){ +},{"./constants":853}],862:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151666,7 +156009,7 @@ function makeClipMask(cd0) { return z; } -},{"../../components/drawing":598,"../../lib":680,"../heatmap/plot":864,"./end_plus":842,"./find_all_paths":843,"./make_crossings":847,"d3":104}],849:[function(require,module,exports){ +},{"../../components/drawing":608,"../../lib":690,"../heatmap/plot":878,"./end_plus":856,"./find_all_paths":857,"./make_crossings":861,"d3":114}],863:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151728,7 +156071,7 @@ module.exports = function style(gd) { heatmapStyle(gd); }; -},{"../../components/drawing":598,"../heatmap/style":865,"./make_color_map":846,"d3":104}],850:[function(require,module,exports){ +},{"../../components/drawing":608,"../heatmap/style":879,"./make_color_map":860,"d3":114}],864:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151764,7 +156107,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout) } }; -},{"../../components/colorscale/defaults":584}],851:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594}],865:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151848,7 +156191,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../scatter/attributes":924}],852:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../scatter/attributes":947}],866:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151990,7 +156333,7 @@ module.exports = function calc(gd, trace) { return [cd0]; }; -},{"../../components/colorscale/calc":581,"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793,"../histogram2d/calc":880,"./clean_2d_array":853,"./convert_column_xyz":855,"./find_empties":857,"./has_columns":858,"./interp2d":861,"./make_bound_array":862,"./max_row_length":863}],853:[function(require,module,exports){ +},{"../../components/colorscale/calc":591,"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807,"../histogram2d/calc":894,"./clean_2d_array":867,"./convert_column_xyz":869,"./find_empties":871,"./has_columns":872,"./interp2d":875,"./make_bound_array":876,"./max_row_length":877}],867:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152035,7 +156378,7 @@ module.exports = function clean2dArray(zOld, transpose) { return zNew; }; -},{"fast-isnumeric":113}],854:[function(require,module,exports){ +},{"fast-isnumeric":123}],868:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152086,7 +156429,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],855:[function(require,module,exports){ +},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],869:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152148,7 +156491,7 @@ module.exports = function convertColumnXYZ(trace, xa, ya) { if(hasColumnText) trace.text = text; }; -},{"../../constants/numerical":662,"../../lib":680}],856:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690}],870:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152193,7 +156536,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'}); }; -},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":851,"./has_columns":858,"./xyz_defaults":866}],857:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":865,"./has_columns":872,"./xyz_defaults":880}],871:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152299,7 +156642,7 @@ module.exports = function findEmpties(z) { return empties.sort(function(a, b) { return b[2] - a[2]; }); }; -},{"./max_row_length":863}],858:[function(require,module,exports){ +},{"./max_row_length":877}],872:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152315,7 +156658,7 @@ module.exports = function(trace) { return !Array.isArray(trace.z[0]); }; -},{}],859:[function(require,module,exports){ +},{}],873:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152433,7 +156776,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, contour) })]; }; -},{"../../lib":680,"../../plots/cartesian/constants":724,"../../plots/cartesian/graph_interact":726}],860:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/constants":734,"../../plots/cartesian/graph_interact":738}],874:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152465,7 +156808,7 @@ Heatmap.meta = { module.exports = Heatmap; -},{"../../plots/cartesian":727,"./attributes":851,"./calc":852,"./colorbar":854,"./defaults":856,"./hover":859,"./plot":864,"./style":865}],861:[function(require,module,exports){ +},{"../../plots/cartesian":739,"./attributes":865,"./calc":866,"./colorbar":868,"./defaults":870,"./hover":873,"./plot":878,"./style":879}],875:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152597,7 +156940,7 @@ function iterateInterp2d(z, emptyPoints, overshoot) { return maxFractionalChange; } -},{"../../lib":680}],862:[function(require,module,exports){ +},{"../../lib":690}],876:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152679,7 +157022,7 @@ module.exports = function makeBoundArray(trace, arrayIn, v0In, dvIn, numbricks, return arrayOut; }; -},{"../../registry":793}],863:[function(require,module,exports){ +},{"../../registry":807}],877:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152701,7 +157044,7 @@ module.exports = function maxRowLength(z) { return len; }; -},{}],864:[function(require,module,exports){ +},{}],878:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153170,7 +157513,7 @@ function plotOne(gd, plotinfo, cd) { image3.exit().remove(); } -},{"../../components/colorscale":589,"../../constants/xmlns_namespaces":664,"../../lib":680,"../../registry":793,"./max_row_length":863,"tinycolor2":511}],865:[function(require,module,exports){ +},{"../../components/colorscale":599,"../../constants/xmlns_namespaces":674,"../../lib":690,"../../registry":807,"./max_row_length":877,"tinycolor2":521}],879:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153191,7 +157534,7 @@ module.exports = function style(gd) { }); }; -},{"d3":104}],866:[function(require,module,exports){ +},{"d3":114}],880:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153284,7 +157627,7 @@ function isValidZ(z) { return (allRowsAreArrays && oneRowIsFilled && hasOneNumber); } -},{"../../registry":793,"./has_columns":858,"fast-isnumeric":113}],867:[function(require,module,exports){ +},{"../../registry":807,"./has_columns":872,"fast-isnumeric":123}],881:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153326,7 +157669,7 @@ extendFlat( module.exports = attrs; -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../heatmap/attributes":851}],868:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../heatmap/attributes":865}],882:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153465,7 +157808,7 @@ function createHeatmap(scene, fullTrace, calcTrace) { module.exports = createHeatmap; -},{"../../lib/str2rgbarray":698,"../../plots/cartesian/axes":719,"gl-heatmap2d":147}],869:[function(require,module,exports){ +},{"../../lib/str2rgbarray":708,"../../plots/cartesian/axes":729,"gl-heatmap2d":157}],883:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153496,7 +157839,7 @@ HeatmapGl.meta = { module.exports = HeatmapGl; -},{"../../plots/gl2d":755,"../heatmap/calc":852,"../heatmap/colorbar":854,"../heatmap/defaults":856,"./attributes":867,"./convert":868}],870:[function(require,module,exports){ +},{"../../plots/gl2d":769,"../heatmap/calc":866,"../heatmap/colorbar":868,"../heatmap/defaults":870,"./attributes":881,"./convert":882}],884:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153626,7 +157969,7 @@ function makeBinsAttr(axLetter) { }; } -},{"../bar/attributes":803}],871:[function(require,module,exports){ +},{"../bar/attributes":817}],885:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153652,7 +157995,7 @@ module.exports = function doAvg(size, counts) { return total; }; -},{}],872:[function(require,module,exports){ +},{}],886:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153685,7 +158028,7 @@ module.exports = function handleBinDefaults(traceIn, traceOut, coerce, binDirect return traceOut; }; -},{}],873:[function(require,module,exports){ +},{}],887:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153761,7 +158104,7 @@ module.exports = { } }; -},{"fast-isnumeric":113}],874:[function(require,module,exports){ +},{"fast-isnumeric":123}],888:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153992,7 +158335,7 @@ function cdf(size, direction, currentbin) { } } -},{"../../lib":680,"../../plots/cartesian/axes":719,"../bar/arrays_to_calcdata":802,"./average":871,"./bin_functions":873,"./clean_bins":875,"./norm_functions":878,"fast-isnumeric":113}],875:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../bar/arrays_to_calcdata":816,"./average":885,"./bin_functions":887,"./clean_bins":889,"./norm_functions":892,"fast-isnumeric":123}],889:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154069,7 +158412,7 @@ module.exports = function cleanBins(trace, ax, binDirection) { if(!trace[autoBinAttr]) delete trace['nbins' + binDirection]; }; -},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],876:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],890:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154131,7 +158474,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, Color.defaultLine, {axis: 'x', inherit: 'y'}); }; -},{"../../components/color":575,"../../components/errorbars/defaults":603,"../../lib":680,"../../registry":793,"../bar/style_defaults":814,"./attributes":870,"./bin_defaults":872}],877:[function(require,module,exports){ +},{"../../components/color":585,"../../components/errorbars/defaults":613,"../../lib":690,"../../registry":807,"../bar/style_defaults":828,"./attributes":884,"./bin_defaults":886}],891:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154180,7 +158523,7 @@ Histogram.meta = { module.exports = Histogram; -},{"../../plots/cartesian":727,"../bar/hover":806,"../bar/layout_attributes":808,"../bar/layout_defaults":809,"../bar/plot":810,"../bar/set_positions":811,"../bar/style":813,"../scatter/colorbar":927,"./attributes":870,"./calc":874,"./defaults":876}],878:[function(require,module,exports){ +},{"../../plots/cartesian":739,"../bar/hover":820,"../bar/layout_attributes":822,"../bar/layout_defaults":823,"../bar/plot":824,"../bar/set_positions":825,"../bar/style":827,"../scatter/colorbar":950,"./attributes":884,"./calc":888,"./defaults":890}],892:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154215,7 +158558,7 @@ module.exports = { } }; -},{}],879:[function(require,module,exports){ +},{}],893:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154267,7 +158610,7 @@ module.exports = extendFlat({}, { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../heatmap/attributes":851,"../histogram/attributes":870}],880:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../heatmap/attributes":865,"../histogram/attributes":884}],894:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154470,7 +158813,7 @@ module.exports = function calc(gd, trace) { }; }; -},{"../../lib":680,"../../plots/cartesian/axes":719,"../histogram/average":871,"../histogram/bin_functions":873,"../histogram/clean_bins":875,"../histogram/norm_functions":878}],881:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../histogram/average":885,"../histogram/bin_functions":887,"../histogram/clean_bins":889,"../histogram/norm_functions":892}],895:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154508,7 +158851,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout ); }; -},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":879,"./sample_defaults":883}],882:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":893,"./sample_defaults":897}],896:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154541,7 +158884,7 @@ Histogram2D.meta = { module.exports = Histogram2D; -},{"../../plots/cartesian":727,"../heatmap/calc":852,"../heatmap/colorbar":854,"../heatmap/hover":859,"../heatmap/plot":864,"../heatmap/style":865,"./attributes":879,"./defaults":881}],883:[function(require,module,exports){ +},{"../../plots/cartesian":739,"../heatmap/calc":866,"../heatmap/colorbar":868,"../heatmap/hover":873,"../heatmap/plot":878,"../heatmap/style":879,"./attributes":893,"./defaults":895}],897:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154581,7 +158924,7 @@ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout handleBinDefaults(traceIn, traceOut, coerce, binDirections); }; -},{"../../registry":793,"../histogram/bin_defaults":872}],884:[function(require,module,exports){ +},{"../../registry":807,"../histogram/bin_defaults":886}],898:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154623,7 +158966,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../contour/attributes":836,"../histogram2d/attributes":879}],885:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../contour/attributes":850,"../histogram2d/attributes":893}],899:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154653,7 +158996,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout handleStyleDefaults(traceIn, traceOut, coerce, layout); }; -},{"../../lib":680,"../contour/contours_defaults":840,"../contour/style_defaults":850,"../histogram2d/sample_defaults":883,"./attributes":884}],886:[function(require,module,exports){ +},{"../../lib":690,"../contour/contours_defaults":854,"../contour/style_defaults":864,"../histogram2d/sample_defaults":897,"./attributes":898}],900:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154686,7 +159029,7 @@ Histogram2dContour.meta = { module.exports = Histogram2dContour; -},{"../../plots/cartesian":727,"../contour/calc":837,"../contour/colorbar":838,"../contour/hover":844,"../contour/plot":848,"../contour/style":849,"./attributes":884,"./defaults":885}],887:[function(require,module,exports){ +},{"../../plots/cartesian":739,"../contour/calc":851,"../contour/colorbar":852,"../contour/hover":858,"../contour/plot":862,"../contour/style":863,"./attributes":898,"./defaults":899}],901:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154819,7 +159162,7 @@ module.exports = { }, surfaceAtts.lighting) }; -},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../surface/attributes":980}],888:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../surface/attributes":1002}],902:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154982,7 +159325,7 @@ function createMesh3DTrace(scene, data) { module.exports = createMesh3DTrace; -},{"../../lib/str2rgbarray":698,"alpha-shape":35,"convex-hull":93,"delaunay-triangulate":105,"gl-mesh3d":186,"tinycolor2":511}],889:[function(require,module,exports){ +},{"../../lib/str2rgbarray":708,"alpha-shape":37,"convex-hull":95,"delaunay-triangulate":115,"gl-mesh3d":196,"tinycolor2":521}],903:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155083,7 +159426,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/colorbar/defaults":577,"../../lib":680,"../../registry":793,"./attributes":887}],890:[function(require,module,exports){ +},{"../../components/colorbar/defaults":587,"../../lib":690,"../../registry":807,"./attributes":901}],904:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155112,7 +159455,7 @@ Mesh3D.meta = { module.exports = Mesh3D; -},{"../../plots/gl3d":758,"../heatmap/colorbar":854,"./attributes":887,"./convert":888,"./defaults":889}],891:[function(require,module,exports){ +},{"../../plots/gl3d":772,"../heatmap/colorbar":868,"./attributes":901,"./convert":902,"./defaults":903}],905:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155219,7 +159562,7 @@ module.exports = { } }; -},{"../../lib":680,"../scatter/attributes":924}],892:[function(require,module,exports){ +},{"../../lib":690,"../scatter/attributes":947}],906:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155268,7 +159611,7 @@ function handleDirection(traceIn, traceOut, coerce, direction) { coerce(direction + '.line.dash', traceOut.line.dash); } -},{"../../lib":680,"./attributes":891,"./direction_defaults":893,"./helpers":894,"./ohlc_defaults":896}],893:[function(require,module,exports){ +},{"../../lib":690,"./attributes":905,"./direction_defaults":907,"./helpers":908,"./ohlc_defaults":910}],907:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155294,7 +159637,7 @@ module.exports = function handleDirectionDefaults(traceIn, traceOut, coerce, dir coerce(direction + '.name', nameDflt); }; -},{}],894:[function(require,module,exports){ +},{}],908:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155417,7 +159760,7 @@ exports.addRangeSlider = function(data, layout) { } }; -},{"../../lib":680}],895:[function(require,module,exports){ +},{"../../lib":690}],909:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155447,7 +159790,7 @@ module.exports = { register(require('../scatter')); register(require('./transform')); -},{"../../plot_api/register":709,"../../plots/cartesian":727,"../scatter":934,"./attributes":891,"./defaults":892,"./transform":897}],896:[function(require,module,exports){ +},{"../../plot_api/register":719,"../../plots/cartesian":739,"../scatter":957,"./attributes":905,"./defaults":906,"./transform":911}],910:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155489,7 +159832,7 @@ module.exports = function handleOHLC(traceIn, traceOut, coerce, layout) { return len; }; -},{"../../registry":793}],897:[function(require,module,exports){ +},{"../../registry":807}],911:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155748,7 +160091,7 @@ function convertTickWidth(gd, xa, trace) { return minDiff * tickWidth; } -},{"../../lib":680,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_ids":722,"./helpers":894}],898:[function(require,module,exports){ +},{"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_ids":732,"./helpers":908}],912:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155877,7 +160220,7 @@ module.exports = { ) }; -},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/colorscale/scales":593,"../../lib/extend":672,"../../plots/cartesian/layout_attributes":728}],899:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/colorscale/scales":603,"../../lib/extend":682,"../../plots/cartesian/layout_attributes":740}],913:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155953,7 +160296,7 @@ exports.toSVG = function(gd) { }, 60); }; -},{"../../constants/xmlns_namespaces":664,"../../plots/plots":778,"./constants":902,"./plot":907,"d3":104}],900:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":674,"../../plots/plots":792,"./constants":916,"./plot":921,"d3":114}],914:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155984,7 +160327,7 @@ module.exports = function calc(gd, trace) { }]; }; -},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"../../lib":680}],901:[function(require,module,exports){ +},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"../../lib":690}],915:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156038,7 +160381,7 @@ module.exports = function colorbar(gd, cd) { .options(line.colorbar)(); }; -},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],902:[function(require,module,exports){ +},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],916:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156075,7 +160418,7 @@ module.exports = { } }; -},{}],903:[function(require,module,exports){ +},{}],917:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156177,7 +160520,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588,"../../lib":680,"./attributes":898,"./constants":902}],904:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598,"../../lib":690,"./attributes":912,"./constants":916}],918:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156206,7 +160549,7 @@ Parcoords.meta = { module.exports = Parcoords; -},{"./attributes":898,"./base_plot":899,"./calc":900,"./colorbar":901,"./defaults":903,"./plot":907}],905:[function(require,module,exports){ +},{"./attributes":912,"./base_plot":913,"./calc":914,"./colorbar":915,"./defaults":917,"./plot":921}],919:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156631,7 +160974,7 @@ module.exports = function(canvasGL, lines, canvasWidth, canvasHeight, initialDim }; }; -},{"./constants":902,"regl":477}],906:[function(require,module,exports){ +},{"./constants":916,"regl":487}],920:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157405,7 +161748,7 @@ module.exports = function(root, svg, styledData, layout, callbacks) { return tweakables; }; -},{"../../lib":680,"./constants":902,"./lines":905,"d3":104}],907:[function(require,module,exports){ +},{"../../lib":690,"./constants":916,"./lines":919,"d3":114}],921:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157525,7 +161868,7 @@ module.exports = function plot(gd, cdparcoords) { }); }; -},{"./parcoords":906}],908:[function(require,module,exports){ +},{"./parcoords":920}],922:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157596,6 +161939,13 @@ module.exports = { valType: 'data_array', }, + hovertext: { + valType: 'string', + + dflt: '', + arrayOk: true, + + }, // 'see eg:' // 'https://www.e-education.psu.edu/natureofgeoinfo/sites/www.e-education.psu.edu.natureofgeoinfo/files/image/hisp_pies.gif', @@ -157711,7 +162061,7 @@ module.exports = { } }; -},{"../../components/color/attributes":574,"../../lib/extend":672,"../../plots/attributes":717,"../../plots/font_attributes":739}],909:[function(require,module,exports){ +},{"../../components/color/attributes":584,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/font_attributes":753}],923:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157758,7 +162108,7 @@ function getCdModule(calcdata, _module) { return cdModule; } -},{"../../registry":793}],910:[function(require,module,exports){ +},{"../../registry":807}],924:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157910,7 +162260,7 @@ function nextDefaultColor(index) { return pieDefaultColors[index % pieDefaultColors.length]; } -},{"../../components/color":575,"./helpers":912,"fast-isnumeric":113,"tinycolor2":511}],911:[function(require,module,exports){ +},{"../../components/color":585,"./helpers":926,"fast-isnumeric":123,"tinycolor2":521}],925:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157958,6 +162308,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout var textData = coerce('text'); var textInfo = coerce('textinfo', Array.isArray(textData) ? 'text+percent' : 'percent'); + coerce('hovertext'); coerce('hoverinfo', (layout._dataLength === 1) ? 'label+text+value+percent' : undefined); @@ -157994,7 +162345,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('pull'); }; -},{"../../lib":680,"./attributes":908}],912:[function(require,module,exports){ +},{"../../lib":690,"./attributes":922}],926:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158023,7 +162374,7 @@ exports.formatPieValue = function formatPieValue(v, separators) { return Lib.numSeparate(vRounded, separators); }; -},{"../../lib":680}],913:[function(require,module,exports){ +},{"../../lib":690}],927:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158055,7 +162406,7 @@ Pie.meta = { module.exports = Pie; -},{"./attributes":908,"./base_plot":909,"./calc":910,"./defaults":911,"./layout_attributes":914,"./layout_defaults":915,"./plot":916,"./style":917,"./style_one":918}],914:[function(require,module,exports){ +},{"./attributes":922,"./base_plot":923,"./calc":924,"./defaults":925,"./layout_attributes":928,"./layout_defaults":929,"./plot":930,"./style":931,"./style_one":932}],928:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158075,7 +162426,7 @@ module.exports = { hiddenlabels: {valType: 'data_array'} }; -},{}],915:[function(require,module,exports){ +},{}],929:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158097,7 +162448,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { coerce('hiddenlabels'); }; -},{"../../lib":680,"./layout_attributes":914}],916:[function(require,module,exports){ +},{"../../lib":690,"./layout_attributes":928}],930:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158186,6 +162537,8 @@ module.exports = function plot(gd, cdpie) { hasHoverData = false; function handleMouseOver(evt) { + evt.originalEvent = d3.event; + // in case fullLayout or fullData has changed without a replot var fullLayout2 = gd._fullLayout, trace2 = gd._fullData[trace.index], @@ -158197,6 +162550,7 @@ module.exports = function plot(gd, cdpie) { // or if hover is turned off if(gd._dragging || fullLayout2.hovermode === false || hoverinfo === 'none' || hoverinfo === 'skip' || !hoverinfo) { + Fx.hover(gd, evt, 'pie'); return; } @@ -158207,8 +162561,16 @@ module.exports = function plot(gd, cdpie) { thisText = []; if(hoverinfo.indexOf('label') !== -1) thisText.push(pt.label); - if(trace2.text && trace2.text[pt.i] && hoverinfo.indexOf('text') !== -1) { - thisText.push(trace2.text[pt.i]); + if(hoverinfo.indexOf('text') !== -1) { + if(trace2.hovertext) { + thisText.push( + Array.isArray(trace2.hovertext) ? + trace2.hovertext[pt.i] : + trace2.hovertext + ); + } else if(trace2.text && trace2.text[pt.i]) { + thisText.push(trace2.text[pt.i]); + } } if(hoverinfo.indexOf('value') !== -1) thisText.push(helpers.formatPieValue(pt.v, separators)); if(hoverinfo.indexOf('percent') !== -1) thisText.push(helpers.formatPiePercent(pt.v / cd0.vTotal, separators)); @@ -158232,7 +162594,9 @@ module.exports = function plot(gd, cdpie) { } function handleMouseOut(evt) { + evt.originalEvent = d3.event; gd.emit('plotly_unhover', { + event: d3.event, points: [evt] }); @@ -158244,8 +162608,8 @@ module.exports = function plot(gd, cdpie) { function handleClick() { gd._hoverdata = [pt]; - gd._hoverdata.trace = cd.trace; - Fx.click(gd, { target: true }); + gd._hoverdata.trace = cd0.trace; + Fx.click(gd, d3.event); } slicePath.enter().append('path') @@ -158792,7 +163156,7 @@ function maxExtent(tilt, tiltAxisFraction, depth) { 2 * Math.sqrt(1 - sinTilt * sinTilt * tiltAxisFraction * tiltAxisFraction)); } -},{"../../components/color":575,"../../components/drawing":598,"../../lib/svg_text_utils":699,"../../plots/cartesian/graph_interact":726,"./helpers":912,"d3":104}],917:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"../../lib/svg_text_utils":709,"../../plots/cartesian/graph_interact":738,"./helpers":926,"d3":114}],931:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158821,7 +163185,7 @@ module.exports = function style(gd) { }); }; -},{"./style_one":918,"d3":104}],918:[function(require,module,exports){ +},{"./style_one":932,"d3":114}],932:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158848,7 +163212,7 @@ module.exports = function styleOne(s, pt, trace) { .call(Color.stroke, lineColor); }; -},{"../../components/color":575}],919:[function(require,module,exports){ +},{"../../components/color":585}],933:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158937,7 +163301,7 @@ module.exports = { } }; -},{"../scattergl/attributes":960}],920:[function(require,module,exports){ +},{"../scattergl/attributes":983}],934:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159169,7 +163533,7 @@ function createPointcloud(scene, data) { module.exports = createPointcloud; -},{"../../lib/str2rgbarray":698,"../scatter/get_trace_color":932,"gl-pointcloud2d":211}],921:[function(require,module,exports){ +},{"../../lib/str2rgbarray":708,"../scatter/get_trace_color":955,"gl-pointcloud2d":221}],935:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159214,7 +163578,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor) { coerce('marker.border.arearatio'); }; -},{"../../lib":680,"./attributes":919}],922:[function(require,module,exports){ +},{"../../lib":690,"./attributes":933}],936:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159244,7 +163608,1191 @@ pointcloud.meta = { module.exports = pointcloud; -},{"../../plots/gl2d":755,"../scatter3d/calc":948,"./attributes":919,"./convert":920,"./defaults":921}],923:[function(require,module,exports){ +},{"../../plots/gl2d":769,"../scatter3d/calc":971,"./attributes":933,"./convert":934,"./defaults":935}],937:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var shapeAttrs = require('../../components/shapes/attributes'); +var fontAttrs = require('../../plots/font_attributes'); +var plotAttrs = require('../../plots/attributes'); + +var extendFlat = require('../../lib/extend').extendFlat; + + +module.exports = { + hoverinfo: extendFlat({}, plotAttrs.hoverinfo, { + flags: ['label', 'text', 'value', 'percent', 'name'] + }), + domain: { + x: { + valType: 'info_array', + + items: [ + {valType: 'number', min: 0, max: 1}, + {valType: 'number', min: 0, max: 1} + ], + dflt: [0, 1], + + }, + y: { + valType: 'info_array', + + items: [ + {valType: 'number', min: 0, max: 1}, + {valType: 'number', min: 0, max: 1} + ], + dflt: [0, 1], + + } + }, + + orientation: { + valType: 'enumerated', + values: ['v', 'h'], + dflt: 'h', + + + }, + + nodepad: { + valType: 'number', + min: 0, + dflt: 20, + + + }, + + nodethickness: { + valType: 'number', + min: 1, + dflt: 20, + + + }, + + valueformat: { + valType: 'string', + dflt: '.3s', + + + }, + + valueunit: { + valType: 'string', + dflt: '', + + + }, + + // followmouse for UX testing + followmouse: { + valType: 'boolean', + dflt: true, + + + }, + + textfont: fontAttrs, + + nodes: { + _isLinkedToArray: 'node', + label: { + valType: 'string', + dflt: '', + + + }, + visible: shapeAttrs.visible, + color: extendFlat({}, shapeAttrs.fillcolor, { + dflt: 'rgb(0,255,0,0.5)' + }), + + }, + + links: { + _isLinkedToArray: 'link', + label: { + valType: 'string', + dflt: '', + + + }, + visible: shapeAttrs.visible, + color: extendFlat({}, shapeAttrs.fillcolor, {dflt: 'rgba(0,0,0,0.2)'}), + source: { + valType: 'number', + + + }, + target: { + valType: 'number', + + + }, + value: { + valType: 'number', + dflt: 1, + + + }, + + } +}; + +},{"../../components/shapes/attributes":648,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/font_attributes":753}],938:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Plots = require('../../plots/plots'); +var plot = require('./plot'); + +exports.name = 'sankey'; + +exports.attr = 'type'; + +exports.plot = function(gd) { + var calcData = Plots.getSubplotCalcData(gd.calcdata, 'sankey', 'sankey'); + if(calcData.length) plot(gd, calcData); +}; + +exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) { + var hadPlot = (oldFullLayout._has && oldFullLayout._has('sankey')); + var hasPlot = (newFullLayout._has && newFullLayout._has('sankey')); + + if(hadPlot && !hasPlot) { + oldFullLayout._paperdiv.selectAll('.sankey').remove(); + oldFullLayout._paperdiv.selectAll('.sankey').remove(); + } +}; + +exports.toSVG = function() {}; + +},{"../../plots/plots":792,"./plot":944}],939:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + + +module.exports = function calc() { + return [{}]; +}; + +},{}],940:[function(require,module,exports){ +arguments[4][915][0].apply(exports,arguments) +},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"dup":915,"fast-isnumeric":123}],941:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + + +module.exports = { + nodeTextOffsetHorizontal: 4, + nodeTextOffsetVertical: 3, + nodePadAcross: 10, + sankeyIterations: 50, + movable: true, + sideways: true, + useForceSnap: true, + forceIterations: 5, + forceTicksPerFrame: 10, + duration: 500, + ease: 'linear' +}; + +},{}],942:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Lib = require('../../lib'); +var attributes = require('./attributes'); +var d3 = require('d3'); + + +function linksDefaults(traceIn, traceOut) { + var linksIn = traceIn.links || [], + linksOut = traceOut.links = []; + + var linkIn, linkOut, i; + + function coerce(attr, dflt) { + return Lib.coerce(linkIn, linkOut, attributes.links, attr, dflt); + } + + for(i = 0; i < linksIn.length; i++) { + linkIn = linksIn[i]; + linkOut = {}; + + if(!Lib.isPlainObject(linkIn)) { + continue; + } + + var visible = coerce('visible'); + + if(visible) { + coerce('label'); + coerce('value'); + coerce('source'); + coerce('target'); + coerce('color'); + } + + linkOut._index = i; + linksOut.push(linkOut); + } +} + +function nodesDefaults(traceIn, traceOut) { + var nodesIn = traceIn.nodes || [], + nodesOut = traceOut.nodes = []; + + var nodeIn, nodeOut, i, j, link, foundUse, visible, + usedNodeCount = 0, + indexMap = []; + + var defaultPalette = d3.scale.category20(); + + function coerce(attr, dflt) { + return Lib.coerce(nodeIn, nodeOut, attributes.nodes, attr, dflt); + } + + for(i = 0; i < nodesIn.length; i++) { + nodeIn = nodesIn[i]; + + + + foundUse = false; + for(j = 0; j < traceOut.links.length && !foundUse; j++) { + link = traceOut.links[j]; + foundUse = link.source === i || link.target === i; + } + + indexMap.push(foundUse ? usedNodeCount : null); + + if(!foundUse) + continue; + + if(!Lib.isPlainObject(nodeIn)) { + continue; + } + + nodeOut = {}; + + visible = coerce('visible'); + + if(visible) { + coerce('label'); + if(nodeIn.color) { + coerce('color'); + } else { + coerce('color', defaultPalette(i)); + } + } + + nodeOut._index = usedNodeCount; + nodesOut.push(nodeOut); + usedNodeCount++; + } + + // since nodes were removed, update indices to nodes in links to reflect new reality + for(j = 0; j < traceOut.links.length; j++) { + link = traceOut.links[j]; + link.source = indexMap[link.source]; + link.target = indexMap[link.target]; + } + + return nodesOut; +} + + + + +module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { + function coerce(attr, dflt) { + return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); + } + + linksDefaults(traceIn, traceOut); + nodesDefaults(traceIn, traceOut); + + coerce('hoverinfo', layout._dataLength === 1 ? 'label+text+value+percent' : undefined); + + coerce('domain.x'); + coerce('domain.y'); + coerce('orientation'); + coerce('nodepad'); + coerce('nodethickness'); + coerce('valueformat'); + coerce('valueunit'); + coerce('followmouse'); + + // Prefer Sankey-specific font spec e.g. with smaller default size + var sankeyFontSpec = Lib.coerceFont(coerce, 'textfont'); + Lib.coerceFont(coerce, 'textfont', Lib.extendFlat({}, layout.font, sankeyFontSpec)); +}; + +},{"../../lib":690,"./attributes":937,"d3":114}],943:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Plot = {}; + +Plot.attributes = require('./attributes'); +Plot.supplyDefaults = require('./defaults'); +Plot.calc = require('./calc'); +Plot.plot = require('./plot'); +Plot.colorbar = require('./colorbar'); + +Plot.moduleType = 'trace'; +Plot.name = 'sankey'; +Plot.basePlotModule = require('./base_plot'); +Plot.categories = ['gl']; +Plot.meta = { + +}; + +module.exports = Plot; + +},{"./attributes":937,"./base_plot":938,"./calc":939,"./colorbar":940,"./defaults":942,"./plot":944}],944:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var render = require('./render'); +var Fx = require('../../plots/cartesian/graph_interact'); +var d3 = require('d3'); +var Color = require('../../components/color'); + +function renderableValuePresent(d) {return d !== '';} + +function ownTrace(selection, d) { + return selection.filter(function(s) {return s.key === d.traceId;}); +} + +function makeTranslucent(element, alpha) { + d3.select(element) + .select('path') + .style('fill-opacity', alpha); +} + +function makeTextContrasty(element, hue) { + d3.select(element) + .select('text.name') + .style('fill', Color.contrast(hue, 0, 40)); +} + +function relatedLinks(d) { + return function(l) { + return d.node.sourceLinks.indexOf(l.link) !== -1 || d.node.targetLinks.indexOf(l.link) !== -1; + }; +} + +function relatedNodes(l) { + return function(d) { + return d.node.sourceLinks.indexOf(l.link) !== -1 || d.node.targetLinks.indexOf(l.link) !== -1; + }; +} + +function nodeHoveredStyle(sankeyNode, d, sankey) { + + sankeyNode.select('.nodeRect').style('stroke-width', 1); + + if(d && sankey) { + ownTrace(sankey, d) + .selectAll('.sankeyLink') + .filter(relatedLinks(d)) + .call(linkHoveredStyle); + } +} + +function nodeNonHoveredStyle(sankeyNode, d, sankey) { + + sankeyNode.select('.nodeRect').style('stroke-width', 0.5); + + if(d && sankey) { + ownTrace(sankey, d) + .selectAll('.sankeyLink') + .filter(relatedLinks(d)) + .call(linkNonHoveredStyle); + } +} + +function linkHoveredStyle(sankeyLink, d, sankey) { + + sankeyLink.style('stroke-opacity', 0.4); + + if(d && sankey) { + ownTrace(sankey, d) + .selectAll('.sankeyNode') + .filter(relatedNodes(d)) + .call(nodeHoveredStyle); + } +} + +function linkNonHoveredStyle(sankeyLink, d, sankey) { + + sankeyLink.style('stroke-opacity', function(d) {return d.tinyColorAlpha;}); + + if(d && sankey) { + ownTrace(sankey, d) + .selectAll('.sankeyNode') + .filter(relatedNodes(d)) + .call(nodeNonHoveredStyle); + } +} + +var log = false + +module.exports = function plot(gd, calcData) { + + var fullLayout = gd._fullLayout; + var svg = fullLayout._paper; + var hasHoverData = false; + + var size = fullLayout._size; + + var linkSelect = function(element, d) { + if(log) console.log('select link', d.link); + gd._hoverdata = [d.link]; + gd._hoverdata.trace = calcData.trace; + Fx.click(gd, { target: true }); + }; + + var linkHover = function(element, d, sankey) { + + d3.select(element).call(linkHoveredStyle, d, sankey); + if(log) console.log('hover link', d.link); + + Fx.hover(gd, d.link, 'sankey'); + + hasHoverData = true; + }; + + var linkHoverFollow = function(element, d) { + + + var followMouse = gd.data[0].followmouse; + + var boundingBox = !followMouse && element.getBoundingClientRect(); + var hoverCenterX = followMouse ? d3.event.x : boundingBox.left + boundingBox.width / 2; + var hoverCenterY = followMouse ? d3.event.y : boundingBox.top + boundingBox.height / 2; + + var tooltip = Fx.loneHover({ + x: hoverCenterX, + y: hoverCenterY, + name: d3.format(d.valueFormat)(d.link.value) + d.valueUnit, + text: [ + d.link.label, + ['Source:', d.link.source.label].join(' '), + ['Target:', d.link.target.label].join(' ') + ].filter(renderableValuePresent).join('
'), + color: Color.addOpacity(d.tinyColorHue, 1), + idealAlign: d3.event.x < hoverCenterX ? 'right' : 'left' + }, { + container: fullLayout._hoverlayer.node(), + outerContainer: fullLayout._paper.node() + }); + + makeTranslucent(tooltip, 0.67); + }; + + var linkUnhover = function(element, d, sankey) { + d3.select(element).call(linkNonHoveredStyle, d, sankey); + if(log) console.log('unhover link', d.link); + gd.emit('plotly_unhover', { + points: [d.link] + }); + + if(hasHoverData) { + Fx.loneUnhover(fullLayout._hoverlayer.node()); + hasHoverData = false; + } + }; + + var nodeSelect = function(element, d, sankey) { + if(log) console.log('select node', d.node); + gd._hoverdata = [d.node]; + gd._hoverdata.trace = calcData.trace; + d3.select(element).call(linkNonHoveredStyle, d, sankey); + d3.select(element).call(nodeNonHoveredStyle, d, sankey); + Fx.click(gd, { target: true }); + }; + + var nodeHover = function(element, d, sankey) { + + if(log) console.log('hover node', d.node); + + d3.select(element).call(nodeHoveredStyle, d, sankey); + + Fx.hover(gd, d.node, 'sankey'); + + hasHoverData = true; + + }; + + + var nodeHoverFollow = function(element, d) { + + var nodeRect = d3.select(element).select('.nodeRect'); + + var followMouse = gd.data[0].followmouse; + + var boundingBox = nodeRect.node().getBoundingClientRect(); + var hoverCenterX0 = boundingBox.left - 2; + var hoverCenterX1 = boundingBox.right + 2; + var hoverCenterY = followMouse ? d3.event.y : boundingBox.top + boundingBox.height / 4; + + var tooltip = Fx.loneHover({ + x0: hoverCenterX0, + x1: hoverCenterX1, + y: hoverCenterY, + name: d3.format(d.valueFormat)(d.node.value) + d.valueUnit, + text: [ + d.node.label, + ['Incoming flow count:', d.node.targetLinks.length].join(' '), + ['Outgoing flow count:', d.node.sourceLinks.length].join(' ') + ].filter(renderableValuePresent).join('
'), + color: d.tinyColorHue, + idealAlign: 'left' + }, { + container: fullLayout._hoverlayer.node(), + outerContainer: fullLayout._paper.node() + }); + + makeTranslucent(tooltip, 0.85); + makeTextContrasty(tooltip, d.tinyColorHue); + }; + + var nodeUnhover = function(element, d, sankey) { + + d3.select(element).call(nodeNonHoveredStyle, d, sankey); + if(log) console.log('unhover node', d.node); + gd.emit('plotly_unhover', { + points: [d.node] + }); + + if(hasHoverData) { + Fx.loneUnhover(fullLayout._hoverlayer.node()); + hasHoverData = false; + } + }; + + render( + svg, + calcData, + { + width: size.w, + height: size.h, + margin: { + t: size.t, + r: size.r, + b: size.b, + l: size.l + } + }, + { + linkEvents: { + hover: linkHover, + follow: linkHoverFollow, + unhover: linkUnhover, + select: linkSelect + }, + nodeEvents: { + hover: nodeHover, + follow: nodeHoverFollow, + unhover: nodeUnhover, + select: nodeSelect + } + } + ); +}; + +},{"../../components/color":585,"../../plots/cartesian/graph_interact":738,"./render":945,"d3":114}],945:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var c = require('./constants'); +var d3 = require('d3'); +var tinycolor = require('tinycolor2'); +var Color = require('../../components/color'); +var Drawing = require('../../components/drawing'); +var d3sankey = require('@monfera/d3-sankey').sankey; +var d3Force = require('d3-force'); + + +// basic data utilities + +function keyFun(d) {return d.key;} +function repeat(d) {return [d];} // d3 data binding convention +function unwrap(d) {return d[0];} // plotly data structure convention +function visible(nodeOrLink) {return !('visible' in nodeOrLink) || nodeOrLink.visible;} + +function persistOriginalPlace(nodes) { + for (var i = 0; i < nodes.length; i++) { + nodes[i].originalX = nodes[i].x; + nodes[i].originalY = nodes[i].y; + } +} + +function saveCurrentDragPosition(d) { + d.lastDraggedX = d.x + d.lastDraggedY = d.y +} + +function sameLayer(d) { + return function(n) {return n.node.originalX === d.node.originalX;}; +} + +function switchToForceFormat(nodes) { + // force uses x, y as centers + for (var i = 0; i < nodes.length; i++) { + nodes[i].y = nodes[i].y + nodes[i].dy / 2; + } +} + +function switchToSankeyFormat(nodes) { + // sankey uses x, y as top left + for (var i = 0; i < nodes.length; i++) { + nodes[i].y = nodes[i].y - nodes[i].dy / 2; + } +} + + +// view models + +function sankeyModel(layout, d, i) { + + var trace = unwrap(d).trace, + domain = trace.domain, + nodes = trace.nodes, + links = trace.links, + horizontal = trace.orientation === 'h', + nodePad = trace.nodepad, + nodeThickness = trace.nodethickness, + valueFormat = trace.valueformat, + valueUnit = trace.valueunit, + textFont = trace.textfont; + + var width = layout.width * (domain.x[1] - domain.x[0]), + height = layout.height * (domain.y[1] - domain.y[0]); + + var sankey = d3sankey() + .size(horizontal ? [width, height] : [height, width]) + .nodeWidth(nodeThickness) + .nodePadding(nodePad) + .nodes(nodes) + .links(links) + .layout(c.sankeyIterations); + + switchToForceFormat(nodes); + + return { + key: i, + guid: Math.floor(1e12 * (1 + Math.random())), + horizontal: horizontal, + width: width, + height: height, + nodePad: nodePad, + valueFormat: valueFormat, + valueUnit: valueUnit, + textFont: textFont, + translateX: domain.x[0] * width + layout.margin.l, + translateY: layout.height - domain.y[1] * layout.height + layout.margin.t, + dragParallel: horizontal ? height : width, + dragPerpendicular: horizontal ? width : height, + nodes: nodes, + links: links, + sankey: sankey, + forceLayouts: {}, + interactionState: { + dragInProgress: false, + hovered: false + } + }; +} + +function linkModel(d, l) { + + var tc = tinycolor(l.color); + + return { + key: l.source.label + '|' + l.target.label, + traceId: d.key, + link: l, + tinyColorHue: Color.tinyRGB(tc), + tinyColorAlpha: tc.getAlpha(), + valueFormat: d.valueFormat, + valueUnit: d.valueUnit, + sankey: d.sankey, + interactionState: d.interactionState + }; +} + +function nodeModel(uniqueKeys, d, n) { + + var tc = tinycolor(n.color), + zoneThicknessPad = c.nodePadAcross, + zoneLengthPad = d.nodePad / 2, + visibleThickness = n.dx + 0.5, + visibleLength = n.dy - 0.5, + zoneThickness = visibleThickness + 2 * zoneThicknessPad, + zoneLength = visibleLength + 2 * zoneLengthPad; + + var foundKey = uniqueKeys[n.label]; + uniqueKeys[n.label] = (foundKey === void(0) ? foundKey : 0) + 1; + var key = n.label + (foundKey === void(0) ? '' : '__' + foundKey); + + return { + key: key, + traceId: d.key, + node: n, + nodePad: d.nodePad, + textFont: d.textFont, + size: d.horizontal ? d.height : d.width, + visibleWidth: Math.ceil(d.horizontal ? visibleThickness : visibleLength), + visibleHeight: Math.ceil(d.horizontal ? visibleLength : visibleThickness), + zoneX: d.horizontal ? -zoneThicknessPad : -zoneLengthPad, + zoneY: d.horizontal ? -zoneLengthPad : -zoneThicknessPad, + zoneWidth: d.horizontal ? zoneThickness : zoneLength, + zoneHeight: d.horizontal ? zoneLength : zoneThickness, + labelY: d.horizontal ? n.dy / 2 + 1 : n.dx / 2 + 1, + sizeAcross: d.horizontal ? d.width : d.height, + forceLayouts: d.forceLayouts, + horizontal: d.horizontal, + darkBackground: tc.getBrightness() <= 128, + tinyColorHue: Color.tinyRGB(tc), + tinyColorAlpha: tc.getAlpha(), + valueFormat: d.valueFormat, + valueUnit: d.valueUnit, + sankey: d.sankey, + uniqueNodeLabelPathId: JSON.stringify({sankeyGuid: d.guid, traceId: d.key, nodeKey: n.label}), + interactionState: d.interactionState + }; +} + + +// rendering snippets + +function crispLinesOnEnd(sankeyNode) { + d3.select(sankeyNode.node().parentElement).style('shape-rendering', 'crispEdges'); +} + +function updateNodePositions(sankeyNode) { + sankeyNode + .attr('transform', function(d) { + return d.horizontal + ? 'translate(' + (d.node.x - 0.5) + ', ' + (d.node.y - d.node.dy / 2 + 0.5) + ')' + : 'translate(' + (d.node.y - d.node.dy / 2 - 0.5) + ', ' + (d.node.x + 0.5) + ')' + }) +} + +function linkPath(d) { + var nodes = d.sankey.nodes(); + switchToSankeyFormat(nodes); + var result = d.sankey.link()(d.link); + switchToForceFormat(nodes); + return result; +} + +function updateNodeShapes(sankeyNode) { + d3.select(sankeyNode.node().parentElement).style('shape-rendering', 'optimizeSpeed'); + sankeyNode.call(updateNodePositions); +} + +function updateShapes(sankeyNode, sankeyLink) { + sankeyNode.call(updateNodeShapes); + sankeyLink.attr('d', linkPath); +} + +function sizeNode(rect) { + rect.attr('width', function(d) {return d.visibleWidth;}) + .attr('height', function(d) {return d.visibleHeight;}); +} + + +// event handling + +function attachPointerEvents(selection, sankey, eventSet) { + selection + .on('.basic', null) // remove any preexisting handlers + .on('mouseover.basic', function (d) { + if (!d.interactionState.dragInProgress) { + eventSet.hover(this, d, sankey); + d.interactionState.hovered = [this, d]; + } + }) + .on('mousemove.basic', function (d) { + if (!d.interactionState.dragInProgress) { + eventSet.follow(this, d); + d.interactionState.hovered = [this, d]; + } + }) + .on('mouseout.basic', function (d) { + if (!d.interactionState.dragInProgress) { + eventSet.unhover(this, d, sankey); + d.interactionState.hovered = false; + } + }) + .on('click.basic', function (d) { + if (d.interactionState.hovered) { + eventSet.unhover(this, d, sankey); + d.interactionState.hovered = false; + } + if (!d.interactionState.dragInProgress) { + eventSet.select(this, d, sankey); + } + }); +} + +function attachDragHandler(sankeyNode, sankeyLink, callbacks) { + + var dragBehavior = d3.behavior.drag() + + .origin(function(d) {return d.horizontal ? d.node : {x: d.node['y'], y: d.node['x']};}) + + .on('dragstart', function(d) { + if(!c.movable) return; + this.parentNode.appendChild(this); // bring element to top (painter's algo) + d.interactionState.dragInProgress = d.node; + saveCurrentDragPosition(d.node); + if(d.interactionState.hovered) { + callbacks.nodeEvents.unhover.apply(0, d.interactionState.hovered); + d.interactionState.hovered = false; + } + if(c.useForceSnap) { + var forceKey = d.traceId + '|' + Math.floor(d.node.originalX); + if (d.forceLayouts[forceKey]) { + d.forceLayouts[forceKey].alpha(1); + } else { // make a forceLayout iff needed + attachForce(sankeyNode, forceKey, d); + } + window.requestAnimationFrame(function faster() { + for(var i = 0; i < c.forceTicksPerFrame; i++) d.forceLayouts[forceKey].tick(); + updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink); + if(d.forceLayouts[forceKey].alpha() > 0) { + window.requestAnimationFrame(faster); + } + }) + } + }) + + .on('drag', function(d) { + if(!c.movable) return; + var x = d.horizontal ? d3.event.x : d3.event.y; + var y = d.horizontal ? d3.event.y : d3.event.x; + if(c.useForceSnap) { + d.node.x = x; + d.node.y = y; + } else { + if(c.sideways) { + d.node.x = x; + } + d.node.y = Math.max(d.node.dy / 2, Math.min(d.size - d.node.dy / 2, y)); + } + saveCurrentDragPosition(d.node); + d.sankey.relayout(); + if(!c.useForceSnap) { + updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink); + sankeyNode.call(crispLinesOnEnd); + } + }) + + .on('dragend', function(d) {d.interactionState.dragInProgress = false;}); + + + sankeyNode + .on('.drag', null) // remove possible previous handlers + .call(dragBehavior); +} + +function attachForce(sankeyNode, forceKey, d) { + var nodes = d.sankey.nodes().filter(function(n) {return n.originalX === d.node.originalX;}); + d.forceLayouts[forceKey] = d3Force.forceSimulation(nodes) + .alphaDecay(0) + .force('collide', d3Force.forceCollide() + .radius(function (n) {return n.dy / 2 + d.nodePad / 2;}) + .strength(1) + .iterations(c.forceIterations)) + .force('constrain', snappingForce(sankeyNode, forceKey, nodes, d)) + .stop(); +} + +function snappingForce(sankeyNode, forceKey, nodes, d) { + return function _snappingForce() { + var maxVelocity = 0; + for (var i = 0; i < nodes.length; i++) { + var n = nodes[i]; + if (n === d.interactionState.dragInProgress) { // constrain node position to the dragging pointer + n.x = n.lastDraggedX; + n.y = n.lastDraggedY; + } else { + n.vx = (n.originalX - n.x) / c.forceTicksPerFrame; // snap to layer + n.y = Math.min(d.size - n.dy / 2, Math.max(n.dy / 2, n.y)); // constrain to extent + } + maxVelocity = Math.max(maxVelocity, Math.abs(n.vx), Math.abs(n.vy)); + } + if (!d.interactionState.dragInProgress && maxVelocity < 0.1) { + d.forceLayouts[forceKey].alpha(0); + window.setTimeout(function () { + sankeyNode.call(crispLinesOnEnd); + }, 30); // geome on move, crisp when static + } + } +} + + +// scene graph + +module.exports = function(svg, styledData, layout, callbacks) { + + svg.style('overflow', 'visible'); + + var sankey = svg.selectAll('.sankey') + .data(styledData + .filter(function(d) {return unwrap(d).trace.visible;}) + .map(sankeyModel.bind(null, layout)), + keyFun); + + sankey.exit() + .remove(); + + sankey.enter() + .append('g') + .classed('sankey', true) + .attr('overflow', 'visible') + .style('box-sizing', 'content-box') + .style('position', 'absolute') + .style('left', 0) + .style('overflow', 'visible') + .style('shape-rendering', 'geometricPrecision') + .style('pointer-events', 'auto') + .style('box-sizing', 'content-box'); + + sankey + .attr('transform', function(d) {return 'translate(' + d.translateX + ',' + d.translateY + ')';}); + + + var sankeyLinks = sankey.selectAll('.sankeyLinks') + .data(repeat, keyFun); + + sankeyLinks.enter() + .append('g') + .classed('sankeyLinks', true) + .style('fill', 'none'); + + sankeyLinks.transition() + .ease(c.ease).duration(c.duration) + .style('transform', function(d) {return d.horizontal ? 'matrix(1,0,0,1,0,0)' : 'matrix(0,1,1,0,0,0)'}); + + + var sankeyLink = sankeyLinks.selectAll('.sankeyLink') + .data(function(d) { + return d.sankey.links() + .filter(function(l) {return l.visible && l.value;}) + .map(linkModel.bind(null, d)); + }, keyFun); + + sankeyLink.enter() + .append('path') + .classed('sankeyLink', true) + .style('stroke-width', function(d) {return Math.max(1, d.link.dy);}) + .style('opacity', 0) + .call(attachPointerEvents, sankey, callbacks.linkEvents); + + sankeyLink + .style('stroke', function(d) {return d.tinyColorHue;}) + .style('stroke-opacity', function(d) {return d.tinyColorAlpha;}); + + sankeyLink.transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 1) + .attr('d', linkPath) + .style('stroke-width', function(d) {return Math.max(1, d.link.dy);}); + + sankeyLink.exit().transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 0) + .remove(); + + + var sankeyNodeSet = sankey.selectAll('.sankeyNodeSet') + .data(repeat, keyFun); + + sankeyNodeSet.enter() + .append('g') + .style('shape-rendering', 'geometricPrecision') + .classed('sankeyNodeSet', true); + + sankeyNodeSet + .each(function(d) {Drawing.font(sankeyNodeSet, d.textFont);}); // fixme causes scerenshot trouble + + + var sankeyNode = sankeyNodeSet.selectAll('.sankeyNode') + .data(function(d) { + var nodes = d.sankey.nodes(); + var uniqueKeys = {}; + persistOriginalPlace(nodes); + return nodes + .filter(function(n) {return n.visible && n.value;}) + .map(nodeModel.bind(null, uniqueKeys, d)); + }, keyFun); + + sankeyNode.enter() + .append('g') + .classed('sankeyNode', true) + .style('opacity', 0) + .style('cursor', 'move') + .call(updateNodePositions) + .call(attachPointerEvents, sankey, callbacks.nodeEvents); + + sankeyNode + .call(attachDragHandler, sankeyLink, callbacks); // has to be here as it binds sankeyLink + + sankeyNode.transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 1) + .call(updateNodePositions); + + sankeyNode.exit().transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 0) + .remove(); + + + var nodeRect = sankeyNode.selectAll('.nodeRect') + .data(repeat); + + nodeRect.enter() + .append('rect') + .classed('nodeRect', true) + .style('stroke-width', 0.5) + .call(Color.stroke, 'rgba(0, 0, 0, 1)') + .call(sizeNode); + + nodeRect + .style('fill', function(d) {return d.tinyColorHue;}) + .style('fill-opacity', function(d) {return d.tinyColorAlpha;}); + + nodeRect.transition() + .ease(c.ease).duration(c.duration) + .call(sizeNode); + + + var nodeCapture = sankeyNode.selectAll('.nodeCapture') + .data(repeat); + + nodeCapture.enter() + .append('rect') + .classed('nodeCapture', true) + .style('fill-opacity', 0); + + nodeCapture + .attr('x', function(d) {return d.zoneX;}) + .attr('y', function(d) {return d.zoneY;}) + .attr('width', function(d) {return d.zoneWidth;}) + .attr('height', function(d) {return d.zoneHeight;}); + + + var nodeLabelGuide = sankeyNode.selectAll('.nodeLabelGuide') + .data(repeat); + + nodeLabelGuide.enter() + .append('path') + .classed('nodeLabelGuide', true) + .attr('id', function(d) {return d.uniqueNodeLabelPathId;}); // fixme causes scerenshot trouble + + nodeLabelGuide + .transition() + .ease(c.ease).duration(c.duration) + .attr('d', function(d) { + return d3.svg.line()([ + [d.horizontal ? d.visibleWidth + c.nodeTextOffsetHorizontal : c.nodeTextOffsetHorizontal, d.labelY], + [d.horizontal ? d.sizeAcross : d.visibleWidth - c.nodeTextOffsetHorizontal, d.labelY] + ]);}); + + + var nodeLabel = sankeyNode.selectAll('.nodeLabel') + .data(repeat); + + nodeLabel.enter() + .append('text') + .classed('nodeLabel', true) + .style('user-select', 'none') + .style('cursor', 'default') + .style('fill', 'black'); + + nodeLabel + .style('text-shadow', function(d) { + return d.horizontal ? '0 1px 1px #fff' : 'none'; + }); + + var nodeLabelTextPath = nodeLabel.selectAll('.nodeLabelTextPath') + .data(repeat); + + nodeLabelTextPath.enter() + .append('textPath') + .classed('nodeLabelTextPath', true) + .attr('alignment-baseline', 'middle') + .attr('xlink:href', function(d) {return '#' + d.uniqueNodeLabelPathId;}); + + nodeLabelTextPath + .text(function(d) {return d.horizontal || d.node.dy > 5 ? d.node.label : '';}) + .style('fill', function(d) {return d.darkBackground && !d.horizontal ? 'white' : 'black';}); +}; + +},{"../../components/color":585,"../../components/drawing":608,"./constants":941,"@monfera/d3-sankey":32,"d3":114,"d3-force":110,"tinycolor2":521}],946:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159263,6 +164811,7 @@ var Lib = require('../../lib'); module.exports = function arraysToCalcdata(cd, trace) { Lib.mergeArray(trace.text, cd, 'tx'); + Lib.mergeArray(trace.hovertext, cd, 'htx'); Lib.mergeArray(trace.customdata, cd, 'data'); Lib.mergeArray(trace.textposition, cd, 'tp'); if(trace.textfont) { @@ -159286,7 +164835,7 @@ module.exports = function arraysToCalcdata(cd, trace) { } }; -},{"../../lib":680}],924:[function(require,module,exports){ +},{"../../lib":690}],947:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159352,6 +164901,13 @@ module.exports = { dflt: '', arrayOk: true, + }, + hovertext: { + valType: 'string', + + dflt: '', + arrayOk: true, + }, mode: { valType: 'flaglist', @@ -159552,7 +165108,7 @@ module.exports = { error_x: errorBarAttrs }; -},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/drawing":598,"../../components/errorbars/attributes":600,"../../lib/extend":672,"./constants":929}],925:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/drawing":608,"../../components/errorbars/attributes":610,"../../lib/extend":682,"./constants":952}],948:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159682,7 +165238,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../plots/cartesian/axes":719,"./arrays_to_calcdata":923,"./colorscale_calc":928,"./subtypes":944,"fast-isnumeric":113}],926:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"./arrays_to_calcdata":946,"./colorscale_calc":951,"./subtypes":967,"fast-isnumeric":123}],949:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159721,7 +165277,7 @@ module.exports = function cleanData(fullData) { } }; -},{}],927:[function(require,module,exports){ +},{}],950:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159777,7 +165333,7 @@ module.exports = function colorbar(gd, cd) { .options(marker.colorbar)(); }; -},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],928:[function(require,module,exports){ +},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],951:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159810,7 +165366,7 @@ module.exports = function calcMarkerColorscale(trace) { } }; -},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"./subtypes":944}],929:[function(require,module,exports){ +},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"./subtypes":967}],952:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159826,7 +165382,7 @@ module.exports = { PTS_LINESONLY: 20 }; -},{}],930:[function(require,module,exports){ +},{}],953:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159867,6 +165423,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('customdata'); coerce('text'); + coerce('hovertext'); coerce('mode', defaultMode); coerce('ids'); @@ -159907,7 +165464,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, defaultColor, {axis: 'x', inherit: 'y'}); }; -},{"../../components/errorbars/defaults":603,"../../lib":680,"./attributes":924,"./constants":929,"./fillcolor_defaults":931,"./line_defaults":935,"./line_shape_defaults":937,"./marker_defaults":940,"./subtypes":944,"./text_defaults":945,"./xy_defaults":946}],931:[function(require,module,exports){ +},{"../../components/errorbars/defaults":613,"../../lib":690,"./attributes":947,"./constants":952,"./fillcolor_defaults":954,"./line_defaults":958,"./line_shape_defaults":960,"./marker_defaults":963,"./subtypes":967,"./text_defaults":968,"./xy_defaults":969}],954:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159945,7 +165502,7 @@ module.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coe )); }; -},{"../../components/color":575}],932:[function(require,module,exports){ +},{"../../components/color":585}],955:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159998,7 +165555,7 @@ module.exports = function getTraceColor(trace, di) { } }; -},{"../../components/color":575,"./subtypes":944}],933:[function(require,module,exports){ +},{"../../components/color":585,"./subtypes":967}],956:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160073,7 +165630,9 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { yLabelVal: di.y }); - if(di.tx) pointData.text = di.tx; + if(di.htx) pointData.text = di.htx; + else if(trace.hovertext) pointData.text = trace.hovertext; + else if(di.tx) pointData.text = di.tx; else if(trace.text) pointData.text = trace.text; ErrorBars.hoverInfo(di, trace, pointData); @@ -160167,7 +165726,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { } }; -},{"../../components/color":575,"../../components/errorbars":604,"../../lib":680,"../../plots/cartesian/constants":724,"../../plots/cartesian/graph_interact":726,"./get_trace_color":932}],934:[function(require,module,exports){ +},{"../../components/color":585,"../../components/errorbars":614,"../../lib":690,"../../plots/cartesian/constants":734,"../../plots/cartesian/graph_interact":738,"./get_trace_color":955}],957:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160211,7 +165770,7 @@ Scatter.meta = { module.exports = Scatter; -},{"../../plots/cartesian":727,"./arrays_to_calcdata":923,"./attributes":924,"./calc":925,"./clean_data":926,"./colorbar":927,"./defaults":930,"./hover":933,"./plot":941,"./select":942,"./style":943,"./subtypes":944}],935:[function(require,module,exports){ +},{"../../plots/cartesian":739,"./arrays_to_calcdata":946,"./attributes":947,"./calc":948,"./clean_data":949,"./colorbar":950,"./defaults":953,"./hover":956,"./plot":964,"./select":965,"./style":966,"./subtypes":967}],958:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160244,7 +165803,7 @@ module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, coerce('line.dash'); }; -},{"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588}],936:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598}],959:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160417,7 +165976,7 @@ module.exports = function linePoints(d, opts) { return segments; }; -},{"../../constants/numerical":662}],937:[function(require,module,exports){ +},{"../../constants/numerical":672}],960:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160436,7 +165995,7 @@ module.exports = function handleLineShapeDefaults(traceIn, traceOut, coerce) { if(shape === 'spline') coerce('line.smoothing'); }; -},{}],938:[function(require,module,exports){ +},{}],961:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160477,7 +166036,7 @@ module.exports = function linkTraces(gd, plotinfo, cdscatter) { } }; -},{}],939:[function(require,module,exports){ +},{}],962:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160519,7 +166078,7 @@ module.exports = function makeBubbleSizeFn(trace) { }; }; -},{"fast-isnumeric":113}],940:[function(require,module,exports){ +},{"fast-isnumeric":123}],963:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160579,7 +166138,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/color":575,"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588,"./subtypes":944}],941:[function(require,module,exports){ +},{"../../components/color":585,"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598,"./subtypes":967}],964:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160633,13 +166192,13 @@ module.exports = function plot(gd, plotinfo, cdscatter, transitionOpts, makeOnCo // Sort the traces, once created, so that the ordering is preserved even when traces // are shown and hidden. This is needed since we're not just wiping everything out // and recreating on every update. - for(i = 0, uids = []; i < cdscatter.length; i++) { - uids[i] = cdscatter[i][0].trace.uid; + for(i = 0, uids = {}; i < cdscatter.length; i++) { + uids[cdscatter[i][0].trace.uid] = i; } scatterlayer.selectAll('g.trace').sort(function(a, b) { - var idx1 = uids.indexOf(a[0].trace.uid); - var idx2 = uids.indexOf(b[0].trace.uid); + var idx1 = uids[a[0].trace.uid]; + var idx2 = uids[b[0].trace.uid]; return idx1 > idx2 ? 1 : -1; }); @@ -161119,7 +166678,7 @@ function selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll) { }); } -},{"../../components/drawing":598,"../../components/errorbars":604,"../../lib":680,"../../lib/polygon":690,"./line_points":936,"./link_traces":938,"./subtypes":944,"d3":104}],942:[function(require,module,exports){ +},{"../../components/drawing":608,"../../components/errorbars":614,"../../lib":690,"../../lib/polygon":700,"./line_points":959,"./link_traces":961,"./subtypes":967,"d3":114}],965:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161191,7 +166750,7 @@ module.exports = function selectPoints(searchInfo, polygon) { return selection; }; -},{"./subtypes":944}],943:[function(require,module,exports){ +},{"./subtypes":967}],966:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161237,7 +166796,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/drawing":598,"../../components/errorbars":604,"d3":104}],944:[function(require,module,exports){ +},{"../../components/drawing":608,"../../components/errorbars":614,"d3":114}],967:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161273,7 +166832,7 @@ module.exports = { } }; -},{"../../lib":680}],945:[function(require,module,exports){ +},{"../../lib":690}],968:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161294,7 +166853,7 @@ module.exports = function(traceIn, traceOut, layout, coerce) { Lib.coerceFont(coerce, 'textfont', layout.font); }; -},{"../../lib":680}],946:[function(require,module,exports){ +},{"../../lib":690}],969:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161344,7 +166903,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) { return len; }; -},{"../../registry":793}],947:[function(require,module,exports){ +},{"../../registry":807}],970:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161410,6 +166969,10 @@ module.exports = { text: extendFlat({}, scatterAttrs.text, { }), + hovertext: extendFlat({}, scatterAttrs.hovertext, { + + }), + mode: extendFlat({}, scatterAttrs.mode, // shouldn't this be on-par with 2D? {dflt: 'lines+markers'}), surfaceaxis: { @@ -161478,7 +167041,7 @@ module.exports = { error_z: errorBarAttrs, }; -},{"../../components/colorscale/color_attributes":582,"../../components/errorbars/attributes":600,"../../constants/gl_markers":660,"../../lib/extend":672,"../scatter/attributes":924}],948:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":592,"../../components/errorbars/attributes":610,"../../constants/gl_markers":670,"../../lib/extend":682,"../scatter/attributes":947}],971:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161507,7 +167070,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../scatter/arrays_to_calcdata":923,"../scatter/colorscale_calc":928}],949:[function(require,module,exports){ +},{"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951}],972:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161578,7 +167141,7 @@ function calculateErrors(data, scaleFactor) { module.exports = calculateErrors; -},{"../../components/errorbars/compute_error":602}],950:[function(require,module,exports){ +},{"../../components/errorbars/compute_error":612}],973:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161639,8 +167202,12 @@ proto.handlePick = function(selection) { selection.object = this.scatterPlot; this.scatterPlot.highlight(selection.data); } - if(this.textLabels && this.textLabels[selection.data.index] !== undefined) { - selection.textLabel = this.textLabels[selection.data.index]; + if(this.textLabels) { + if(this.textLabels[selection.data.index] !== undefined) { + selection.textLabel = this.textLabels[selection.data.index]; + } else { + selection.textLabel = this.textLabels; + } } else selection.textLabel = ''; @@ -161952,7 +167519,7 @@ proto.update = function(data) { opacity: data.opacity }; - this.textLabels = options.text; + this.textLabels = data.hovertext || data.text; if(this.mode.indexOf('text') !== -1) { if(this.textMarkers) this.textMarkers.update(textOptions); @@ -162045,7 +167612,7 @@ function createLineWithMarkers(scene, data) { module.exports = createLineWithMarkers; -},{"../../constants/gl3d_dashes":659,"../../constants/gl_markers":660,"../../lib":680,"../../lib/gl_format_color":677,"../../lib/str2rgbarray":698,"../scatter/make_bubble_size_func":939,"./calc_errors":949,"delaunay-triangulate":105,"gl-error3d":143,"gl-line3d":153,"gl-mesh3d":186,"gl-scatter3d":232}],951:[function(require,module,exports){ +},{"../../constants/gl3d_dashes":669,"../../constants/gl_markers":670,"../../lib":690,"../../lib/gl_format_color":687,"../../lib/str2rgbarray":708,"../scatter/make_bubble_size_func":962,"./calc_errors":972,"delaunay-triangulate":115,"gl-error3d":153,"gl-line3d":163,"gl-mesh3d":196,"gl-scatter3d":242}],974:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162082,6 +167649,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('text'); + coerce('hovertext'); coerce('mode'); if(subTypes.hasLines(traceOut)) { @@ -162134,7 +167702,7 @@ function handleXYZDefaults(traceIn, traceOut, coerce, layout) { return len; } -},{"../../components/errorbars/defaults":603,"../../lib":680,"../../registry":793,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":947}],952:[function(require,module,exports){ +},{"../../components/errorbars/defaults":613,"../../lib":690,"../../registry":807,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":970}],975:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162165,7 +167733,7 @@ Scatter3D.meta = { module.exports = Scatter3D; -},{"../../constants/gl_markers":660,"../../plots/gl3d":758,"../scatter/colorbar":927,"./attributes":947,"./calc":948,"./convert":950,"./defaults":951}],953:[function(require,module,exports){ +},{"../../constants/gl_markers":670,"../../plots/gl3d":772,"../scatter/colorbar":950,"./attributes":970,"./calc":971,"./convert":973,"./defaults":974}],976:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162213,6 +167781,10 @@ module.exports = { text: extendFlat({}, scatterAttrs.text, { }), + hovertext: extendFlat({}, scatterAttrs.hovertext, { + + }), + textfont: scatterAttrs.textfont, textposition: scatterAttrs.textposition, @@ -162254,7 +167826,7 @@ module.exports = { }) }; -},{"../../components/colorscale/color_attributes":582,"../../lib/extend":672,"../../plots/attributes":717,"../scatter/attributes":924}],954:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":592,"../../lib/extend":682,"../../plots/attributes":727,"../scatter/attributes":947}],977:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162267,51 +167839,38 @@ module.exports = { 'use strict'; var isNumeric = require('fast-isnumeric'); +var BADNUM = require('../../constants/numerical').BADNUM; var calcMarkerColorscale = require('../scatter/colorscale_calc'); - +var arraysToCalcdata = require('../scatter/arrays_to_calcdata'); module.exports = function calc(gd, trace) { - var hasLocationData = Array.isArray(trace.locations), - len = hasLocationData ? trace.locations.length : trace.lon.length; - - var calcTrace = [], - cnt = 0; + var hasLocationData = Array.isArray(trace.locations); + var len = hasLocationData ? trace.locations.length : trace.lon.length; + var calcTrace = new Array(len); for(var i = 0; i < len; i++) { - var calcPt = {}, - skip; + var calcPt = calcTrace[i] = {}; if(hasLocationData) { var loc = trace.locations[i]; + calcPt.loc = typeof loc === 'string' ? loc : null; + } else { + var lon = trace.lon[i]; + var lat = trace.lat[i]; - calcPt.loc = loc; - skip = (typeof loc !== 'string'); - } - else { - var lon = trace.lon[i], - lat = trace.lat[i]; - - calcPt.lonlat = [+lon, +lat]; - skip = (!isNumeric(lon) || !isNumeric(lat)); - } - - if(skip) { - if(cnt > 0) calcTrace[cnt - 1].gapAfter = true; - continue; + if(isNumeric(lon) && isNumeric(lat)) calcPt.lonlat = [+lon, +lat]; + else calcPt.lonlat = [BADNUM, BADNUM]; } - - cnt++; - - calcTrace.push(calcPt); } + arraysToCalcdata(calcTrace, trace); calcMarkerColorscale(trace); return calcTrace; }; -},{"../scatter/colorscale_calc":928,"fast-isnumeric":113}],955:[function(require,module,exports){ +},{"../../constants/numerical":672,"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951,"fast-isnumeric":123}],978:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162346,6 +167905,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('text'); + coerce('hovertext'); coerce('mode'); if(subTypes.hasLines(traceOut)) { @@ -162391,7 +167951,7 @@ function handleLonLatLocDefaults(traceIn, traceOut, coerce) { return len; } -},{"../../lib":680,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":953}],956:[function(require,module,exports){ +},{"../../lib":690,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":976}],979:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162412,7 +167972,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],957:[function(require,module,exports){ +},{}],980:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162426,6 +167986,7 @@ module.exports = function eventData(out, pt) { var Fx = require('../../plots/cartesian/graph_interact'); var Axes = require('../../plots/cartesian/axes'); +var BADNUM = require('../../constants/numerical').BADNUM; var getTraceColor = require('../scatter/get_trace_color'); var attributes = require('./attributes'); @@ -162438,8 +167999,6 @@ module.exports = function hoverPoints(pointData) { ya = pointData.ya, geo = pointData.subplot; - if(cd[0].placeholder) return; - function c2p(lonlat) { return geo.projection(lonlat); } @@ -162447,8 +168006,7 @@ module.exports = function hoverPoints(pointData) { function distFn(d) { var lonlat = d.lonlat; - // this handles the not-found location feature case - if(lonlat[0] === null || lonlat[1] === null) return Infinity; + if(lonlat[0] === BADNUM) return Infinity; if(geo.isLonLatOverEdges(lonlat)) return Infinity; @@ -162518,14 +168076,20 @@ function getExtraText(trace, pt, axis) { else if(hasLat) text.push('lat: ' + format(pt.lonlat[1])); if(hasText) { - var tx = pt.tx || trace.text; + var tx; + + if(pt.htx) tx = pt.htx; + else if(trace.hovertext) tx = trace.hovertext; + else if(pt.tx) tx = pt.tx; + else if(trace.text) tx = trace.text; + if(!Array.isArray(tx)) text.push(tx); } return text.join('
'); } -},{"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"../scatter/get_trace_color":932,"./attributes":953}],958:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"../scatter/get_trace_color":955,"./attributes":976}],981:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162558,7 +168122,7 @@ ScatterGeo.meta = { module.exports = ScatterGeo; -},{"../../plots/geo":743,"../scatter/colorbar":927,"./attributes":953,"./calc":954,"./defaults":955,"./event_data":956,"./hover":957,"./plot":959}],959:[function(require,module,exports){ +},{"../../plots/geo":757,"../scatter/colorbar":950,"./attributes":976,"./calc":977,"./defaults":978,"./event_data":979,"./hover":980,"./plot":982}],982:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162576,10 +168140,10 @@ var Drawing = require('../../components/drawing'); var Color = require('../../components/color'); var Lib = require('../../lib'); +var BADNUM = require('../../constants/numerical').BADNUM; var getTopojsonFeatures = require('../../lib/topojson_utils').getTopojsonFeatures; var locationToFeature = require('../../lib/geo_location_utils').locationToFeature; var geoJsonUtils = require('../../lib/geojson_utils'); -var arrayToCalcItem = require('../../lib/array_to_calc_item'); var subTypes = require('../scatter/subtypes'); @@ -162587,6 +168151,16 @@ module.exports = function plot(geo, calcData) { function keyFunc(d) { return d[0].trace.uid; } + function removeBADNUM(d, node) { + if(d.lonlat[0] === BADNUM) { + d3.select(node).remove(); + } + } + + for(var i = 0; i < calcData.length; i++) { + fillLocationLonLat(calcData[i], geo.topojson); + } + var gScatterGeoTraces = geo.framework.select('.scattergeolayer') .selectAll('g.trace.scattergeo') .data(calcData, keyFunc); @@ -162600,27 +168174,11 @@ module.exports = function plot(geo, calcData) { gScatterGeoTraces.selectAll('*').remove(); gScatterGeoTraces.each(function(calcTrace) { - var s = d3.select(this), - trace = calcTrace[0].trace, - convertToLonLatFn = makeConvertToLonLatFn(trace, geo.topojson); - - // skip over placeholder traces - if(calcTrace[0].placeholder) s.remove(); - - // just like calcTrace but w/o not-found location datum - var _calcTrace = []; - - for(var i = 0; i < calcTrace.length; i++) { - var _calcPt = convertToLonLatFn(calcTrace[i]); - - if(_calcPt) { - arrayItemToCalcdata(trace, calcTrace[i], i); - _calcTrace.push(_calcPt); - } - } + var s = d3.select(this); + var trace = calcTrace[0].trace; if(subTypes.hasLines(trace) || trace.fill !== 'none') { - var lineCoords = geoJsonUtils.calcTraceToLineCoords(_calcTrace); + var lineCoords = geoJsonUtils.calcTraceToLineCoords(calcTrace); var lineData = (trace.fill !== 'none') ? geoJsonUtils.makePolygon(lineCoords, trace) : @@ -162633,15 +168191,19 @@ module.exports = function plot(geo, calcData) { } if(subTypes.hasMarkers(trace)) { - s.selectAll('path.point').data(_calcTrace) - .enter().append('path') - .classed('point', true); + s.selectAll('path.point') + .data(Lib.identity) + .enter().append('path') + .classed('point', true) + .each(function(calcPt) { removeBADNUM(calcPt, this); }); } if(subTypes.hasText(trace)) { - s.selectAll('g').data(_calcTrace) + s.selectAll('g') + .data(Lib.identity) .enter().append('g') - .append('text'); + .append('text') + .each(function(calcPt) { removeBADNUM(calcPt, this); }); } }); @@ -162649,50 +168211,19 @@ module.exports = function plot(geo, calcData) { style(geo); }; -function makeConvertToLonLatFn(trace, topojson) { - if(!Array.isArray(trace.locations)) return Lib.identity; - - var features = getTopojsonFeatures(trace, topojson), - locationmode = trace.locationmode; - - return function(calcPt) { - var feature = locationToFeature(locationmode, calcPt.loc, features); - - if(feature) { - calcPt.lonlat = feature.properties.ct; - return calcPt; - } - else { - // mutate gd.calcdata so that hoverPoints knows to skip this datum - calcPt.lonlat = [null, null]; - return false; - } - }; -} +function fillLocationLonLat(calcTrace, topojson) { + var trace = calcTrace[0].trace; -function arrayItemToCalcdata(trace, calcItem, i) { - var marker = trace.marker; + if(!Array.isArray(trace.locations)) return; - function merge(traceAttr, calcAttr) { - arrayToCalcItem(traceAttr, calcItem, calcAttr, i); - } + var features = getTopojsonFeatures(trace, topojson); + var locationmode = trace.locationmode; - merge(trace.text, 'tx'); - merge(trace.textposition, 'tp'); - if(trace.textfont) { - merge(trace.textfont.size, 'ts'); - merge(trace.textfont.color, 'tc'); - merge(trace.textfont.family, 'tf'); - } + for(var i = 0; i < calcTrace.length; i++) { + var calcPt = calcTrace[i]; + var feature = locationToFeature(locationmode, calcPt.loc, features); - if(marker && marker.line) { - var markerLine = marker.line; - merge(marker.opacity, 'mo'); - merge(marker.symbol, 'mx'); - merge(marker.color, 'mc'); - merge(marker.size, 'ms'); - merge(markerLine.color, 'mlc'); - merge(markerLine.width, 'mlw'); + calcPt.lonlat = feature ? feature.properties.ct : [BADNUM, BADNUM]; } } @@ -162730,7 +168261,7 @@ function style(geo) { }); } -},{"../../components/color":575,"../../components/drawing":598,"../../lib":680,"../../lib/array_to_calc_item":667,"../../lib/geo_location_utils":675,"../../lib/geojson_utils":676,"../../lib/topojson_utils":701,"../scatter/subtypes":944,"d3":104}],960:[function(require,module,exports){ +},{"../../components/color":585,"../../components/drawing":608,"../../constants/numerical":672,"../../lib":690,"../../lib/geo_location_utils":685,"../../lib/geojson_utils":686,"../../lib/topojson_utils":711,"../scatter/subtypes":967,"d3":114}],983:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162812,7 +168343,7 @@ module.exports = { error_x: scatterAttrs.error_x }; -},{"../../components/colorscale/color_attributes":582,"../../constants/gl2d_dashes":658,"../../constants/gl_markers":660,"../../lib/extend":672,"../scatter/attributes":924}],961:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":592,"../../constants/gl2d_dashes":668,"../../constants/gl_markers":670,"../../lib/extend":682,"../scatter/attributes":947}],984:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163125,7 +168656,7 @@ proto.update = function(options) { // representing the epoch milliseconds in a typed array; // also, perhaps the Python / R interfaces take care of String->Date conversions // such that there's no need to check for string dates in plotly.js) -// Patterned from axis_defaults.js:moreDates +// Patterned from axis_autotype.js:moreDates // Code DRYing is not done to preserve the most direct compilation possible for speed; // also, there are quite a few differences function allFastTypesLikely(a) { @@ -163461,7 +168992,7 @@ function createLineWithMarkers(scene, data) { module.exports = createLineWithMarkers; -},{"../../components/errorbars":604,"../../constants/gl2d_dashes":658,"../../constants/gl_markers":660,"../../lib":680,"../../lib/gl_format_color":677,"../../lib/str2rgbarray":698,"../../lib/typed_array_truncate":702,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_autotype":720,"../scatter/get_trace_color":932,"../scatter/make_bubble_size_func":939,"../scatter/subtypes":944,"fast-isnumeric":113,"gl-error2d":141,"gl-line2d":151,"gl-scatter2d":229,"gl-scatter2d-sdf":224}],962:[function(require,module,exports){ +},{"../../components/errorbars":614,"../../constants/gl2d_dashes":668,"../../constants/gl_markers":670,"../../lib":690,"../../lib/gl_format_color":687,"../../lib/str2rgbarray":708,"../../lib/typed_array_truncate":712,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_autotype":730,"../scatter/get_trace_color":955,"../scatter/make_bubble_size_func":962,"../scatter/subtypes":967,"fast-isnumeric":123,"gl-error2d":151,"gl-line2d":161,"gl-scatter2d":239,"gl-scatter2d-sdf":234}],985:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163518,7 +169049,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, defaultColor, {axis: 'x', inherit: 'y'}); }; -},{"../../components/errorbars/defaults":603,"../../lib":680,"../scatter/constants":929,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/xy_defaults":946,"./attributes":960}],963:[function(require,module,exports){ +},{"../../components/errorbars/defaults":613,"../../lib":690,"../scatter/constants":952,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/xy_defaults":969,"./attributes":983}],986:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163549,7 +169080,7 @@ ScatterGl.meta = { module.exports = ScatterGl; -},{"../../plots/gl2d":755,"../scatter/colorbar":927,"../scatter3d/calc":948,"./attributes":960,"./convert":961,"./defaults":962}],964:[function(require,module,exports){ +},{"../../plots/gl2d":769,"../scatter/colorbar":950,"../scatter3d/calc":971,"./attributes":983,"./convert":984,"./defaults":985}],987:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163579,17 +169110,16 @@ module.exports = { // locations // locationmode - mode: { - valType: 'flaglist', - flags: ['lines', 'markers', 'text'], + mode: extendFlat({}, scatterAttrs.mode, { dflt: 'markers', - extras: ['none'], - - }, + }), text: extendFlat({}, scatterAttrs.text, { + }), + hovertext: extendFlat({}, scatterAttrs.hovertext, { + }), line: { @@ -163641,110 +169171,7 @@ module.exports = { }), }; -},{"../../components/colorbar/attributes":576,"../../lib/extend":672,"../../plots/attributes":717,"../../plots/mapbox/layout_attributes":774,"../scatter/attributes":924,"../scattergeo/attributes":953}],965:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var isNumeric = require('fast-isnumeric'); - -var Lib = require('../../lib'); -var Colorscale = require('../../components/colorscale'); - -var subtypes = require('../scatter/subtypes'); -var calcMarkerColorscale = require('../scatter/colorscale_calc'); -var makeBubbleSizeFn = require('../scatter/make_bubble_size_func'); - - -module.exports = function calc(gd, trace) { - var len = trace.lon.length, - marker = trace.marker; - - var hasMarkers = subtypes.hasMarkers(trace), - hasColorArray = (hasMarkers && Array.isArray(marker.color)), - hasSizeArray = (hasMarkers && Array.isArray(marker.size)), - hasSymbolArray = (hasMarkers && Array.isArray(marker.symbol)), - hasTextArray = Array.isArray(trace.text); - - calcMarkerColorscale(trace); - - var colorFn = Colorscale.hasColorscale(trace, 'marker') ? - Colorscale.makeColorScaleFunc( - Colorscale.extractScale( - marker.colorscale, - marker.cmin, - marker.cmax - ) - ) : - Lib.identity; - - var sizeFn = subtypes.isBubble(trace) ? - makeBubbleSizeFn(trace) : - Lib.identity; - - var calcTrace = [], - cnt = 0; - - // Different than cartesian calc step - // as skip over non-numeric lon, lat pairs. - // This makes the hover and convert calculations simpler. - - for(var i = 0; i < len; i++) { - var lon = trace.lon[i], - lat = trace.lat[i]; - - if(!isNumeric(lon) || !isNumeric(lat)) { - if(cnt > 0) calcTrace[cnt - 1].gapAfter = true; - continue; - } - - var calcPt = {}; - cnt++; - - // coerce numeric strings into numbers - calcPt.lonlat = [+lon, +lat]; - - if(hasMarkers) { - - if(hasColorArray) { - var mc = marker.color[i]; - - calcPt.mc = mc; - calcPt.mcc = colorFn(mc); - } - - if(hasSizeArray) { - var ms = marker.size[i]; - - calcPt.ms = ms; - calcPt.mrc = sizeFn(ms); - } - - if(hasSymbolArray) { - var mx = marker.symbol[i]; - calcPt.mx = (typeof mx === 'string') ? mx : 'circle'; - } - } - - if(hasTextArray) { - var tx = trace.text[i]; - calcPt.tx = (typeof tx === 'string') ? tx : ''; - } - - calcTrace.push(calcPt); - } - - return calcTrace; -}; - -},{"../../components/colorscale":589,"../../lib":680,"../scatter/colorscale_calc":928,"../scatter/make_bubble_size_func":939,"../scatter/subtypes":944,"fast-isnumeric":113}],966:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/mapbox/layout_attributes":788,"../scatter/attributes":947,"../scattergeo/attributes":976}],988:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163757,8 +169184,11 @@ module.exports = function calc(gd, trace) { 'use strict'; var Lib = require('../../lib'); +var BADNUM = require('../../constants/numerical').BADNUM; var geoJsonUtils = require('../../lib/geojson_utils'); +var Colorscale = require('../../components/colorscale'); +var makeBubbleSizeFn = require('../scatter/make_bubble_size_func'); var subTypes = require('../scatter/subtypes'); var convertTextOpts = require('../../plots/mapbox/convert_text_opts'); @@ -163790,16 +169220,16 @@ module.exports = function convert(calcTrace) { }; // early return if not visible or placeholder - if(!isVisible || calcTrace[0].placeholder) return opts; + if(!isVisible) return opts; // fill layer and line layer use the same coords - var coords; + var lineCoords; if(hasFill || hasLines) { - coords = geoJsonUtils.calcTraceToLineCoords(calcTrace); + lineCoords = geoJsonUtils.calcTraceToLineCoords(calcTrace); } if(hasFill) { - fill.geojson = geoJsonUtils.makePolygon(coords); + fill.geojson = geoJsonUtils.makePolygon(lineCoords); fill.layout.visibility = 'visible'; Lib.extendFlat(fill.paint, { @@ -163808,7 +169238,7 @@ module.exports = function convert(calcTrace) { } if(hasLines) { - line.geojson = geoJsonUtils.makeLine(coords); + line.geojson = geoJsonUtils.makeLine(lineCoords); line.layout.visibility = 'visible'; Lib.extendFlat(line.paint, { @@ -163902,12 +169332,30 @@ function initContainer() { // // The solution prove to be more robust than trying to generate // `stops` arrays from scale functions. +// +// TODO axe this when we bump mapbox-gl and rewrite this using +// "identity" property functions. +// See https://github.com/plotly/plotly.js/pull/1543 +// function makeCircleGeoJSON(calcTrace, hash) { var trace = calcTrace[0].trace; + var marker = trace.marker; - var marker = trace.marker, - hasColorArray = Array.isArray(marker.color), - hasSizeArray = Array.isArray(marker.size); + var colorFn; + if(Colorscale.hasColorscale(trace, 'marker')) { + colorFn = Colorscale.makeColorScaleFunc( + Colorscale.extractScale(marker.colorscale, marker.cmin, marker.cmax) + ); + } else if(Array.isArray(marker.color)) { + colorFn = Lib.identity; + } + + var sizeFn; + if(subTypes.isBubble(trace)) { + sizeFn = makeBubbleSizeFn(trace); + } else if(Array.isArray(marker.size)) { + sizeFn = Lib.identity; + } // Translate vals in trace arrayOk containers // into a val-to-index hash object @@ -163921,16 +169369,19 @@ function makeCircleGeoJSON(calcTrace, hash) { for(var i = 0; i < calcTrace.length; i++) { var calcPt = calcTrace[i]; + var lonlat = calcPt.lonlat; + + if(isBADNUM(lonlat)) continue; var props = {}; - if(hasColorArray) translate(props, COLOR_PROP, calcPt.mcc, i); - if(hasSizeArray) translate(props, SIZE_PROP, calcPt.mrc, i); + if(colorFn) translate(props, COLOR_PROP, colorFn(calcPt.mc), i); + if(sizeFn) translate(props, SIZE_PROP, sizeFn(calcPt.ms), i); features.push({ type: 'Feature', geometry: { type: 'Point', - coordinates: calcPt.lonlat + coordinates: lonlat }, properties: props }); @@ -163962,6 +169413,8 @@ function makeSymbolGeoJSON(calcTrace) { for(var i = 0; i < calcTrace.length; i++) { var calcPt = calcTrace[i]; + if(isBADNUM(calcPt.lonlat)) continue; + features.push({ type: 'Feature', geometry: { @@ -164053,7 +169506,12 @@ function getFillFunc(attr) { function blankFillFunc() { return ''; } -},{"../../lib":680,"../../lib/geojson_utils":676,"../../plots/mapbox/convert_text_opts":771,"../scatter/subtypes":944}],967:[function(require,module,exports){ +// only need to check lon (OR lat) +function isBADNUM(lonlat) { + return lonlat[0] === BADNUM; +} + +},{"../../components/colorscale":599,"../../constants/numerical":672,"../../lib":690,"../../lib/geojson_utils":686,"../../plots/mapbox/convert_text_opts":785,"../scatter/make_bubble_size_func":962,"../scatter/subtypes":967}],989:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164098,6 +169556,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('text'); + coerce('hovertext'); coerce('mode'); if(subTypes.hasLines(traceOut)) { @@ -164141,7 +169600,7 @@ function handleLonLatDefaults(traceIn, traceOut, coerce) { return len; } -},{"../../lib":680,"../scatter/attributes":924,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":964}],968:[function(require,module,exports){ +},{"../../lib":690,"../scatter/attributes":947,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":987}],990:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164161,7 +169620,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],969:[function(require,module,exports){ +},{}],991:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164175,7 +169634,7 @@ module.exports = function eventData(out, pt) { var Fx = require('../../plots/cartesian/graph_interact'); var getTraceColor = require('../scatter/get_trace_color'); - +var BADNUM = require('../../constants/numerical').BADNUM; module.exports = function hoverPoints(pointData, xval, yval) { var cd = pointData.cd, @@ -164183,8 +169642,6 @@ module.exports = function hoverPoints(pointData, xval, yval) { xa = pointData.xa, ya = pointData.ya; - if(cd[0].placeholder) return; - // compute winding number about [-180, 180] globe var winding = (xval >= 0) ? Math.floor((xval + 180) / 360) : @@ -164195,10 +169652,13 @@ module.exports = function hoverPoints(pointData, xval, yval) { var xval2 = xval - lonShift; function distFn(d) { - var lonlat = d.lonlat, - dx = Math.abs(xa.c2p(lonlat) - xa.c2p([xval2, lonlat[1]])), - dy = Math.abs(ya.c2p(lonlat) - ya.c2p([lonlat[0], yval])), - rad = Math.max(3, d.mrc || 0); + var lonlat = d.lonlat; + + if(lonlat[0] === BADNUM) return Infinity; + + var dx = Math.abs(xa.c2p(lonlat) - xa.c2p([xval2, lonlat[1]])); + var dy = Math.abs(ya.c2p(lonlat) - ya.c2p([lonlat[0], yval])); + var rad = Math.max(3, d.mrc || 0); return Math.max(Math.sqrt(dx * dx + dy * dy) - rad, 1 - 3 / rad); } @@ -164250,14 +169710,20 @@ function getExtraText(trace, di) { else if(hasLat) text.push('lat: ' + format(lonlat[1])); if(isAll || hoverinfo.indexOf('text') !== -1) { - var tx = di.tx || trace.text; + var tx; + + if(di.htx) tx = di.htx; + else if(trace.hovertext) tx = trace.hovertext; + else if(di.tx) tx = di.tx; + else if(trace.text) tx = trace.text; + if(!Array.isArray(tx)) text.push(tx); } return text.join('
'); } -},{"../../plots/cartesian/graph_interact":726,"../scatter/get_trace_color":932}],970:[function(require,module,exports){ +},{"../../constants/numerical":672,"../../plots/cartesian/graph_interact":738,"../scatter/get_trace_color":955}],992:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164274,7 +169740,7 @@ var ScatterMapbox = {}; ScatterMapbox.attributes = require('./attributes'); ScatterMapbox.supplyDefaults = require('./defaults'); ScatterMapbox.colorbar = require('../scatter/colorbar'); -ScatterMapbox.calc = require('./calc'); +ScatterMapbox.calc = require('../scattergeo/calc'); ScatterMapbox.hoverPoints = require('./hover'); ScatterMapbox.eventData = require('./event_data'); ScatterMapbox.plot = require('./plot'); @@ -164290,7 +169756,7 @@ ScatterMapbox.meta = { module.exports = ScatterMapbox; -},{"../../plots/mapbox":772,"../scatter/colorbar":927,"./attributes":964,"./calc":965,"./defaults":967,"./event_data":968,"./hover":969,"./plot":971}],971:[function(require,module,exports){ +},{"../../plots/mapbox":786,"../scatter/colorbar":950,"../scattergeo/calc":977,"./attributes":987,"./defaults":989,"./event_data":990,"./hover":991,"./plot":993}],993:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164414,7 +169880,7 @@ module.exports = function createScatterMapbox(mapbox, calcTrace) { return scatterMapbox; }; -},{"./convert":966}],972:[function(require,module,exports){ +},{"./convert":988}],994:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164459,6 +169925,9 @@ module.exports = { mode: extendFlat({}, scatterAttrs.mode, {dflt: 'markers'}), text: extendFlat({}, scatterAttrs.text, { + }), + hovertext: extendFlat({}, scatterAttrs.hovertext, { + }), line: { color: scatterLineAttrs.color, @@ -164499,7 +169968,7 @@ module.exports = { hoveron: scatterAttrs.hoveron, }; -},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../lib/extend":672,"../../plots/attributes":717,"../scatter/attributes":924}],973:[function(require,module,exports){ +},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../lib/extend":682,"../../plots/attributes":727,"../scatter/attributes":947}],995:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164596,7 +170065,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../plots/cartesian/axes":719,"../scatter/arrays_to_calcdata":923,"../scatter/colorscale_calc":928,"../scatter/subtypes":944,"fast-isnumeric":113}],974:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951,"../scatter/subtypes":967,"fast-isnumeric":123}],996:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164662,6 +170131,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('sum'); coerce('text'); + coerce('hovertext'); var defaultMode = len < constants.PTS_LINESONLY ? 'lines+markers' : 'lines'; coerce('mode', defaultMode); @@ -164701,7 +170171,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('hoveron', dfltHoverOn.join('+') || 'points'); }; -},{"../../lib":680,"../scatter/constants":929,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/line_shape_defaults":937,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":972}],975:[function(require,module,exports){ +},{"../../lib":690,"../scatter/constants":952,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/line_shape_defaults":960,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":994}],997:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164772,7 +170242,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return scatterPointData; }; -},{"../../plots/cartesian/axes":719,"../scatter/hover":933}],976:[function(require,module,exports){ +},{"../../plots/cartesian/axes":729,"../scatter/hover":956}],998:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164805,7 +170275,7 @@ ScatterTernary.meta = { module.exports = ScatterTernary; -},{"../../plots/ternary":786,"../scatter/colorbar":927,"./attributes":972,"./calc":973,"./defaults":974,"./hover":975,"./plot":977,"./select":978,"./style":979}],977:[function(require,module,exports){ +},{"../../plots/ternary":800,"../scatter/colorbar":950,"./attributes":994,"./calc":995,"./defaults":996,"./hover":997,"./plot":999,"./select":1000,"./style":1001}],999:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164841,7 +170311,7 @@ module.exports = function plot(ternary, moduleCalcData) { scatterPlot(ternary.graphDiv, plotinfo, moduleCalcData); }; -},{"../scatter/plot":941}],978:[function(require,module,exports){ +},{"../scatter/plot":964}],1000:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164876,7 +170346,7 @@ module.exports = function selectPoints(searchInfo, polygon) { return selection; }; -},{"../scatter/select":942}],979:[function(require,module,exports){ +},{"../scatter/select":965}],1001:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164905,7 +170375,7 @@ module.exports = function style(gd) { scatterStyle(gd); }; -},{"../scatter/style":943}],980:[function(require,module,exports){ +},{"../scatter/style":966}],1002:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165125,7 +170595,7 @@ module.exports = { } }; -},{"../../components/color":575,"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672}],981:[function(require,module,exports){ +},{"../../components/color":585,"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682}],1003:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165149,7 +170619,7 @@ module.exports = function calc(gd, trace) { } }; -},{"../../components/colorscale/calc":581}],982:[function(require,module,exports){ +},{"../../components/colorscale/calc":591}],1004:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165201,7 +170671,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],983:[function(require,module,exports){ +},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],1005:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165580,7 +171050,7 @@ function createSurfaceTrace(scene, data) { module.exports = createSurfaceTrace; -},{"../../lib/str2rgbarray":698,"gl-surface3d":247,"ndarray":446,"ndarray-fill":436,"ndarray-homography":438,"ndarray-ops":440,"tinycolor2":511}],984:[function(require,module,exports){ +},{"../../lib/str2rgbarray":708,"gl-surface3d":257,"ndarray":456,"ndarray-fill":446,"ndarray-homography":448,"ndarray-ops":450,"tinycolor2":521}],1006:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165701,7 +171171,7 @@ function mapLegacy(traceIn, oldAttr, newAttr) { } } -},{"../../components/colorscale/defaults":584,"../../lib":680,"../../registry":793,"./attributes":980}],985:[function(require,module,exports){ +},{"../../components/colorscale/defaults":594,"../../lib":690,"../../registry":807,"./attributes":1002}],1007:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165731,7 +171201,7 @@ Surface.meta = { module.exports = Surface; -},{"../../plots/gl3d":758,"./attributes":980,"./calc":981,"./colorbar":982,"./convert":983,"./defaults":984}],986:[function(require,module,exports){ +},{"../../plots/gl3d":772,"./attributes":1002,"./calc":1003,"./colorbar":1004,"./convert":1005,"./defaults":1006}],1008:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166014,7 +171484,7 @@ function getFilterFunc(opts, d2c, targetCalendar) { } } -},{"../lib":680,"../plot_api/plot_schema":708,"../plots/cartesian/axis_autotype":720,"../plots/cartesian/axis_ids":722,"../plots/cartesian/set_convert":733,"../registry":793}],987:[function(require,module,exports){ +},{"../lib":690,"../plot_api/plot_schema":718,"../plots/cartesian/axis_autotype":730,"../plots/cartesian/axis_ids":732,"../plots/cartesian/set_convert":746,"../registry":807}],1009:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166157,5 +171627,5 @@ function transformOne(trace, state) { return newData; } -},{"../lib":680,"../plot_api/plot_schema":708}]},{},[17])(17) +},{"../lib":690,"../plot_api/plot_schema":718}]},{},[17])(17) }); \ No newline at end of file diff --git a/dist/plotly.min.js b/dist/plotly.min.js index 91bc1a3c9ea..eb493a13e5b 100644 --- a/dist/plotly.min.js +++ b/dist/plotly.min.js @@ -4,69 +4,71 @@ * All rights reserved. * Licensed under the MIT license */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Plotly=t()}}(function(){var t;return function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[o]={exports:{}};e[o][0].call(c.exports,function(t){var r=e[o][1][t];return i(r||t)},c,c.exports,t,e,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;oMath.abs(e))u.rotate(o,0,0,-t*n*Math.PI*p.rotateSpeed/window.innerWidth);else{var s=p.zoomSpeed*a*e/window.innerHeight*(o-u.lastT())/100;u.pan(o,0,0,h*(Math.exp(s)-1))}},!0),p}e.exports=n;var i=t("right-now"),a=t("3d-view"),o=t("mouse-change"),s=t("mouse-wheel"),l=t("mouse-event-offset")},{"3d-view":30,"mouse-change":431,"mouse-event-offset":432,"mouse-wheel":434,"right-now":480}],30:[function(t,e,r){"use strict";function n(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}function i(t){t=t||{};var e=t.eye||[0,0,1],r=t.center||[0,0,0],i=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],u=t.mode||"turntable",c=a(),h=o(),f=s();return c.setDistanceLimits(l[0],l[1]),c.lookAt(0,e,r,i),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,i),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,i),new n({turntable:c,orbit:h,matrix:f},u)}e.exports=i;var a=t("turntable-camera-controller"),o=t("orbit-camera-controller"),s=t("matrix-camera-controller"),l=n.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n>16&255,r[1]=n>>8&255,r[2]=255&n):h.test(t)&&(n=t.match(f),r[0]=parseInt(n[1]),r[1]=parseInt(n[2]),r[2]=parseInt(n[3])),!e)for(var i=0;i<3;++i)r[i]=r[i]/255;return r}function u(t,e){var r,n;if("string"!=typeof t)return t;if(r=[],"#"===t[0]?(t=t.substr(1),3===t.length&&(t+=t),n=parseInt(t,16),r[0]=n>>16&255,r[1]=n>>8&255,r[2]=255&n):h.test(t)&&(n=t.match(f),r[0]=parseInt(n[1]),r[1]=parseInt(n[2]),r[2]=parseInt(n[3]),n[4]?r[3]=parseFloat(n[4]):r[3]=1),!e)for(var i=0;i<3;++i)r[i]=r[i]/255;return r}var c={},h=/^rgba?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*(,.*)?\)$/,f=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(.*)?\)$/;return c.isPlainObject=t,c.linspace=e,c.zip3=n,c.sum=i,c.zip=r,c.isEqual=s,c.copy2D=a,c.copy1D=o,c.str2RgbArray=l,c.str2RgbaArray=u,c}()},{}],37:[function(t,e,r){(function(r){"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i=0;s--)if(l[s]!==u[s])return!1;for(s=l.length-1;s>=0;s--)if(o=l[s],!d(t[o],e[o],r,n))return!1;return!0}function g(t,e,r){d(t,e,!0)&&h(t,e,r,"notDeepStrictEqual",g)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&e.call({},t)===!0}function y(t){var e;try{t()}catch(t){e=t}return e}function b(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=y(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&h(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!t&&x.isError(i),s=!t&&i&&!r;if((o&&a&&v(i,r)||s)&&h(i,r,"Got unwanted exception"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}var x=t("util/"),_=Object.prototype.hasOwnProperty,w=Array.prototype.slice,M=function(){return"foo"===function(){}.name}(),A=e.exports=f,k=/\s*function\s+([^\(\s]*)\s*/;A.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var e=t.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=s(e),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},x.inherits(A.AssertionError,Error),A.fail=h,A.ok=f,A.equal=function(t,e,r){t!=e&&h(t,e,r,"==",A.equal)},A.notEqual=function(t,e,r){t==e&&h(t,e,r,"!=",A.notEqual)},A.deepEqual=function(t,e,r){d(t,e,!1)||h(t,e,r,"deepEqual",A.deepEqual)},A.deepStrictEqual=function(t,e,r){d(t,e,!0)||h(t,e,r,"deepStrictEqual",A.deepStrictEqual)},A.notDeepEqual=function(t,e,r){d(t,e,!1)&&h(t,e,r,"notDeepEqual",A.notDeepEqual)},A.notDeepStrictEqual=g,A.strictEqual=function(t,e,r){t!==e&&h(t,e,r,"===",A.strictEqual)},A.notStrictEqual=function(t,e,r){t===e&&h(t,e,r,"!==",A.notStrictEqual)},A.throws=function(t,e,r){b(!0,t,e,r)},A.doesNotThrow=function(t,e,r){b(!1,t,e,r)},A.ifError=function(t){if(t)throw t};var T=Object.keys||function(t){var e=[];for(var r in t)_.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":526}],38:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],39:[function(t,e,r){"use strict";function n(t){for(var e=0,r=0;r0?r=r.ushln(h):h<0&&(c=c.ushln(-h)),l(r,c)}var i=t("./is-rat"),a=t("./lib/is-bn"),o=t("./lib/num-to-bn"),s=t("./lib/str-to-bn"),l=t("./lib/rationalize"),u=t("./div");e.exports=n},{"./div":42,"./is-rat":44,"./lib/is-bn":48,"./lib/num-to-bn":49,"./lib/rationalize":50,"./lib/str-to-bn":51}],44:[function(t,e,r){"use strict";function n(t){return Array.isArray(t)&&2===t.length&&i(t[0])&&i(t[1])}var i=t("./lib/is-bn");e.exports=n},{"./lib/is-bn":48}],45:[function(t,e,r){"use strict";function n(t){return t.cmp(new i(0))}var i=t("bn.js");e.exports=n},{"bn.js":58}],46:[function(t,e,r){"use strict";function n(t){var e=t.length,r=t.words,n=0;if(1===e)n=r[0];else if(2===e)n=r[0]+67108864*r[1];else for(var a=0;a20?52:r+32}var i=t("double-bits"),a=t("bit-twiddle").countTrailingZeros;e.exports=n},{"bit-twiddle":57,"double-bits":106}],48:[function(t,e,r){"use strict";function n(t){return t&&"object"==typeof t&&Boolean(t.words)}t("bn.js");e.exports=n},{"bn.js":58}],49:[function(t,e,r){"use strict";function n(t){var e=a.exponent(t);return e<52?new i(t):new i(t*Math.pow(2,52-e)).ushln(e-52)}var i=t("bn.js"),a=t("double-bits");e.exports=n},{"bn.js":58,"double-bits":106}],50:[function(t,e,r){"use strict";function n(t,e){var r=a(t),n=a(e);if(0===r)return[i(0),i(1)];if(0===n)return[i(0),i(0)];n<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]} -var i=t("./num-to-bn"),a=t("./bn-sign");e.exports=n},{"./bn-sign":45,"./num-to-bn":49}],51:[function(t,e,r){"use strict";function n(t){return new i(t)}var i=t("bn.js");e.exports=n},{"bn.js":58}],52:[function(t,e,r){"use strict";function n(t,e){return i(t[0].mul(e[0]),t[1].mul(e[1]))}var i=t("./lib/rationalize");e.exports=n},{"./lib/rationalize":50}],53:[function(t,e,r){"use strict";function n(t){return i(t[0])*i(t[1])}var i=t("./lib/bn-sign");e.exports=n},{"./lib/bn-sign":45}],54:[function(t,e,r){"use strict";function n(t,e){return i(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}var i=t("./lib/rationalize");e.exports=n},{"./lib/rationalize":50}],55:[function(t,e,r){"use strict";function n(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var n=e.abs().divmod(r.abs()),o=n.div,s=i(o),l=n.mod,u=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return u*s;if(s){var c=a(s)+4,h=i(l.ushln(c).divRound(r));return u*(s+h*Math.pow(2,-c))}var f=r.bitLength()-l.bitLength()+53,h=i(l.ushln(f).divRound(r));return f<1023?u*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),u*h*Math.pow(2,1023-f))}var i=t("./lib/bn-to-num"),a=t("./lib/ctz");e.exports=n},{"./lib/bn-to-num":46,"./lib/ctz":47}],56:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=["function ",t,"(a,l,h,",n.join(","),"){",a?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return a?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),a?o.push("return -1};"):o.push("return i};"),o.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],!1,i),n("B","x"+t+"y",e,["y"],!0,i),n("P","c(x,y)"+t+"0",e,["y","c"],!1,i),n("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],57:[function(t,e,r){"use strict";"use restrict";function n(t){var e=32;return t&=-t,t&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return t-=t>>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},r.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),(t=65535&(t|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),t|r<<2},r.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),(t=1023&(t|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],58:[function(t,e,r){!function(e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}function o(t,e,r){for(var n=0,i=Math.min(t.length,r),a=e;a=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function s(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}function l(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}function u(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,h=67108863&l,f=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=f;d++){var p=u-d|0;i=0|t.words[p],a=0|e.words[d],o=i*a+h,c+=o/67108864|0,h=67108863&o}r.words[u]=0|h,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}function c(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function h(t,e,r){return(new f).mulp(t,e,r)}function f(t,e){this.x=t,this.y=e}function d(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function b(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var x;try{x=t("buffer").Buffer}catch(t){}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=o(t,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=o(t,e,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,l=Math.min(a,a-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var i=0,a=0,o=0;o>>24-i&16777215,r=0!==a||o!==this.length-1?_[6-l.length]+l+r:l+r,i+=2,i>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=w[t],c=M[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var f=h.modn(c).toString(t);h=h.idivn(c),r=h.isZero()?f+r:_[u-f.length]+f+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==x),this.toArrayLike(x,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,u=new t(a),c=this.clone();if(l){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],x=8191&b,_=b>>>13,w=0|o[4],M=8191&w,A=w>>>13,k=0|o[5],T=8191&k,S=k>>>13,E=0|o[6],L=8191&E,C=E>>>13,D=0|o[7],z=8191&D,I=D>>>13,P=0|o[8],O=8191&P,R=P>>>13,j=0|o[9],F=8191&j,N=j>>>13,B=0|s[0],U=8191&B,V=B>>>13,H=0|s[1],q=8191&H,G=H>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,Z=0|s[3],J=8191&Z,K=Z>>>13,Q=0|s[4],$=8191&Q,tt=Q>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ut=st>>>13,ct=0|s[8],ht=8191&ct,ft=ct>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,V),i=i+Math.imul(f,U)|0,a=Math.imul(f,V);var gt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=Math.imul(p,V),i=i+Math.imul(m,U)|0,a=Math.imul(m,V),n=n+Math.imul(h,q)|0,i=i+Math.imul(h,G)|0,i=i+Math.imul(f,q)|0,a=a+Math.imul(f,G)|0;var vt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=Math.imul(v,V),i=i+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(p,q)|0,i=i+Math.imul(p,G)|0,i=i+Math.imul(m,q)|0,a=a+Math.imul(m,G)|0,n=n+Math.imul(h,W)|0,i=i+Math.imul(h,X)|0,i=i+Math.imul(f,W)|0,a=a+Math.imul(f,X)|0;var yt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(x,U),i=Math.imul(x,V),i=i+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(v,q)|0,i=i+Math.imul(v,G)|0,i=i+Math.imul(y,q)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=i+Math.imul(p,X)|0,i=i+Math.imul(m,W)|0,a=a+Math.imul(m,X)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,K)|0,i=i+Math.imul(f,J)|0,a=a+Math.imul(f,K)|0;var bt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,U),i=Math.imul(M,V),i=i+Math.imul(A,U)|0,a=Math.imul(A,V),n=n+Math.imul(x,q)|0,i=i+Math.imul(x,G)|0,i=i+Math.imul(_,q)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=i+Math.imul(v,X)|0,i=i+Math.imul(y,W)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,K)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,K)|0,n=n+Math.imul(h,$)|0,i=i+Math.imul(h,tt)|0,i=i+Math.imul(f,$)|0,a=a+Math.imul(f,tt)|0;var xt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(T,U),i=Math.imul(T,V),i=i+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(M,q)|0,i=i+Math.imul(M,G)|0,i=i+Math.imul(A,q)|0,a=a+Math.imul(A,G)|0,n=n+Math.imul(x,W)|0,i=i+Math.imul(x,X)|0,i=i+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,K)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,K)|0,n=n+Math.imul(p,$)|0,i=i+Math.imul(p,tt)|0,i=i+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0,n=n+Math.imul(h,rt)|0,i=i+Math.imul(h,nt)|0,i=i+Math.imul(f,rt)|0,a=a+Math.imul(f,nt)|0;var _t=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,U),i=Math.imul(L,V),i=i+Math.imul(C,U)|0,a=Math.imul(C,V),n=n+Math.imul(T,q)|0,i=i+Math.imul(T,G)|0,i=i+Math.imul(S,q)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(M,W)|0,i=i+Math.imul(M,X)|0,i=i+Math.imul(A,W)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(x,J)|0,i=i+Math.imul(x,K)|0,i=i+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(v,$)|0,i=i+Math.imul(v,tt)|0,i=i+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=i+Math.imul(p,nt)|0,i=i+Math.imul(m,rt)|0,a=a+Math.imul(m,nt)|0,n=n+Math.imul(h,at)|0,i=i+Math.imul(h,ot)|0,i=i+Math.imul(f,at)|0,a=a+Math.imul(f,ot)|0;var wt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(z,U),i=Math.imul(z,V),i=i+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(L,q)|0,i=i+Math.imul(L,G)|0,i=i+Math.imul(C,q)|0,a=a+Math.imul(C,G)|0,n=n+Math.imul(T,W)|0,i=i+Math.imul(T,X)|0,i=i+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(M,J)|0,i=i+Math.imul(M,K)|0,i=i+Math.imul(A,J)|0,a=a+Math.imul(A,K)|0,n=n+Math.imul(x,$)|0,i=i+Math.imul(x,tt)|0,i=i+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=i+Math.imul(v,nt)|0,i=i+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(p,at)|0,i=i+Math.imul(p,ot)|0,i=i+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0,n=n+Math.imul(h,lt)|0,i=i+Math.imul(h,ut)|0,i=i+Math.imul(f,lt)|0,a=a+Math.imul(f,ut)|0;var Mt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,U),i=Math.imul(O,V),i=i+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(z,q)|0,i=i+Math.imul(z,G)|0,i=i+Math.imul(I,q)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(L,W)|0,i=i+Math.imul(L,X)|0,i=i+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,K)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(M,$)|0,i=i+Math.imul(M,tt)|0,i=i+Math.imul(A,$)|0,a=a+Math.imul(A,tt)|0,n=n+Math.imul(x,rt)|0,i=i+Math.imul(x,nt)|0,i=i+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=i+Math.imul(v,ot)|0,i=i+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(p,lt)|0,i=i+Math.imul(p,ut)|0,i=i+Math.imul(m,lt)|0,a=a+Math.imul(m,ut)|0,n=n+Math.imul(h,ht)|0,i=i+Math.imul(h,ft)|0,i=i+Math.imul(f,ht)|0,a=a+Math.imul(f,ft)|0;var At=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,U),i=Math.imul(F,V),i=i+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(O,q)|0,i=i+Math.imul(O,G)|0,i=i+Math.imul(R,q)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(z,W)|0,i=i+Math.imul(z,X)|0,i=i+Math.imul(I,W)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(L,J)|0,i=i+Math.imul(L,K)|0,i=i+Math.imul(C,J)|0,a=a+Math.imul(C,K)|0,n=n+Math.imul(T,$)|0,i=i+Math.imul(T,tt)|0,i=i+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(M,rt)|0,i=i+Math.imul(M,nt)|0,i=i+Math.imul(A,rt)|0,a=a+Math.imul(A,nt)|0,n=n+Math.imul(x,at)|0,i=i+Math.imul(x,ot)|0,i=i+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=i+Math.imul(v,ut)|0,i=i+Math.imul(y,lt)|0,a=a+Math.imul(y,ut)|0,n=n+Math.imul(p,ht)|0,i=i+Math.imul(p,ft)|0,i=i+Math.imul(m,ht)|0,a=a+Math.imul(m,ft)|0,n=n+Math.imul(h,pt)|0,i=i+Math.imul(h,mt)|0,i=i+Math.imul(f,pt)|0,a=a+Math.imul(f,mt)|0;var kt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,q),i=Math.imul(F,G),i=i+Math.imul(N,q)|0,a=Math.imul(N,G),n=n+Math.imul(O,W)|0,i=i+Math.imul(O,X)|0,i=i+Math.imul(R,W)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(z,J)|0,i=i+Math.imul(z,K)|0,i=i+Math.imul(I,J)|0,a=a+Math.imul(I,K)|0,n=n+Math.imul(L,$)|0,i=i+Math.imul(L,tt)|0,i=i+Math.imul(C,$)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=i+Math.imul(T,nt)|0,i=i+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(M,at)|0,i=i+Math.imul(M,ot)|0,i=i+Math.imul(A,at)|0,a=a+Math.imul(A,ot)|0,n=n+Math.imul(x,lt)|0,i=i+Math.imul(x,ut)|0,i=i+Math.imul(_,lt)|0,a=a+Math.imul(_,ut)|0,n=n+Math.imul(v,ht)|0,i=i+Math.imul(v,ft)|0,i=i+Math.imul(y,ht)|0,a=a+Math.imul(y,ft)|0,n=n+Math.imul(p,pt)|0,i=i+Math.imul(p,mt)|0,i=i+Math.imul(m,pt)|0,a=a+Math.imul(m,mt)|0;var Tt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,W),i=Math.imul(F,X),i=i+Math.imul(N,W)|0,a=Math.imul(N,X),n=n+Math.imul(O,J)|0,i=i+Math.imul(O,K)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(z,$)|0,i=i+Math.imul(z,tt)|0,i=i+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(L,rt)|0,i=i+Math.imul(L,nt)|0,i=i+Math.imul(C,rt)|0,a=a+Math.imul(C,nt)|0,n=n+Math.imul(T,at)|0,i=i+Math.imul(T,ot)|0,i=i+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(M,lt)|0,i=i+Math.imul(M,ut)|0,i=i+Math.imul(A,lt)|0,a=a+Math.imul(A,ut)|0,n=n+Math.imul(x,ht)|0,i=i+Math.imul(x,ft)|0,i=i+Math.imul(_,ht)|0,a=a+Math.imul(_,ft)|0,n=n+Math.imul(v,pt)|0,i=i+Math.imul(v,mt)|0,i=i+Math.imul(y,pt)|0,a=a+Math.imul(y,mt)|0;var St=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,J),i=Math.imul(F,K),i=i+Math.imul(N,J)|0,a=Math.imul(N,K),n=n+Math.imul(O,$)|0,i=i+Math.imul(O,tt)|0,i=i+Math.imul(R,$)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(z,rt)|0,i=i+Math.imul(z,nt)|0,i=i+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(L,at)|0,i=i+Math.imul(L,ot)|0,i=i+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,n=n+Math.imul(T,lt)|0,i=i+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,a=a+Math.imul(S,ut)|0,n=n+Math.imul(M,ht)|0,i=i+Math.imul(M,ft)|0,i=i+Math.imul(A,ht)|0,a=a+Math.imul(A,ft)|0,n=n+Math.imul(x,pt)|0,i=i+Math.imul(x,mt)|0,i=i+Math.imul(_,pt)|0,a=a+Math.imul(_,mt)|0;var Et=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,$),i=Math.imul(F,tt),i=i+Math.imul(N,$)|0,a=Math.imul(N,tt),n=n+Math.imul(O,rt)|0,i=i+Math.imul(O,nt)|0,i=i+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(z,at)|0,i=i+Math.imul(z,ot)|0,i=i+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(L,lt)|0,i=i+Math.imul(L,ut)|0,i=i+Math.imul(C,lt)|0,a=a+Math.imul(C,ut)|0,n=n+Math.imul(T,ht)|0,i=i+Math.imul(T,ft)|0,i=i+Math.imul(S,ht)|0,a=a+Math.imul(S,ft)|0,n=n+Math.imul(M,pt)|0,i=i+Math.imul(M,mt)|0,i=i+Math.imul(A,pt)|0,a=a+Math.imul(A,mt)|0;var Lt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(F,rt),i=Math.imul(F,nt),i=i+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(O,at)|0,i=i+Math.imul(O,ot)|0,i=i+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(z,lt)|0,i=i+Math.imul(z,ut)|0,i=i+Math.imul(I,lt)|0,a=a+Math.imul(I,ut)|0,n=n+Math.imul(L,ht)|0,i=i+Math.imul(L,ft)|0,i=i+Math.imul(C,ht)|0,a=a+Math.imul(C,ft)|0,n=n+Math.imul(T,pt)|0,i=i+Math.imul(T,mt)|0,i=i+Math.imul(S,pt)|0,a=a+Math.imul(S,mt)|0;var Ct=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,at),i=Math.imul(F,ot),i=i+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(O,lt)|0,i=i+Math.imul(O,ut)|0,i=i+Math.imul(R,lt)|0,a=a+Math.imul(R,ut)|0,n=n+Math.imul(z,ht)|0,i=i+Math.imul(z,ft)|0,i=i+Math.imul(I,ht)|0,a=a+Math.imul(I,ft)|0,n=n+Math.imul(L,pt)|0,i=i+Math.imul(L,mt)|0,i=i+Math.imul(C,pt)|0,a=a+Math.imul(C,mt)|0;var Dt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(F,lt),i=Math.imul(F,ut),i=i+Math.imul(N,lt)|0,a=Math.imul(N,ut),n=n+Math.imul(O,ht)|0,i=i+Math.imul(O,ft)|0,i=i+Math.imul(R,ht)|0,a=a+Math.imul(R,ft)|0,n=n+Math.imul(z,pt)|0,i=i+Math.imul(z,mt)|0,i=i+Math.imul(I,pt)|0,a=a+Math.imul(I,mt)|0;var zt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(F,ht),i=Math.imul(F,ft),i=i+Math.imul(N,ht)|0,a=Math.imul(N,ft),n=n+Math.imul(O,pt)|0,i=i+Math.imul(O,mt)|0,i=i+Math.imul(R,pt)|0,a=a+Math.imul(R,mt)|0;var It=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,pt),i=Math.imul(F,mt),i=i+Math.imul(N,pt)|0,a=Math.imul(N,mt);var Pt=(u+n|0)+((8191&i)<<13)|0;return u=(a+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,l[0]=gt,l[1]=vt,l[2]=yt,l[3]=bt,l[4]=xt,l[5]=_t,l[6]=wt,l[7]=Mt,l[8]=At,l[9]=kt,l[10]=Tt,l[11]=St,l[12]=Et,l[13]=Lt,l[14]=Ct,l[15]=Dt,l[16]=zt,l[17]=It,l[18]=Pt,0!==u&&(l[19]=u,r.length++),r};Math.imul||(A=u),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?A(this,t,e):r<63?u(this,t,e):r<1024?c(this,t,e):h(this,t,e)},f.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},f.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=l(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0);var i;i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-a|h>>>a,c=h&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(s===-1),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){s=new a(null),s.length=l+1,s.words=new Array(s.length);for(var u=0;u=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=f)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){if(n(!t.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var i,o,s;return 0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0==(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(c),l.isub(h)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(u)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0==(e.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(e.iushrn(l);l-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var c=0,h=1;0==(r.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o)):(r.isub(e),o.isub(i))}var f;return f=0===e.cmpn(1)?i:o,f.cmpn(0)<0&&f.iadd(t),f},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];r=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return this.cmpn(t)===-1},a.prototype.lt=function(t){return this.cmp(t)===-1},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new y(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var k={k256:null,p224:null,p192:null,p25519:null};d.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},d.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},d.prototype.split=function(t,e){t.iushrn(this.n,0,e)},d.prototype.imulK=function(t){return t.imul(this.k)},i(p,d),p.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},p.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(k[t])return k[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new m;else if("p192"===t)e=new g;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new v}return k[t]=e,e},y.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},y.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},y.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},y.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},y.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},y.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},y.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=o;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var u=e.words[n],c=l-1;c>=0;c--){var h=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},y.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},y.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new b(t)},i(b,y),b.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},b.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},b.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},b.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},b.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{}],59:[function(t,e,r){"use strict";function n(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(s<=0)){var l,u=h.mallocDouble(2*s*a),c=h.mallocInt32(a);if((a=i(t,s,u,c))>0){if(1===s&&n)f.init(a),l=f.sweepComplete(s,r,0,a,u,c,0,a,u,c);else{var p=h.mallocDouble(2*s*o),m=h.mallocInt32(o);o=i(e,s,p,m),o>0&&(f.init(a+o),l=1===s?f.sweepBipartite(s,r,0,a,u,c,0,o,p,m):d(s,r,n,a,u,c,o,p,m),h.free(p),h.free(m))}h.free(u),h.free(c)}return l}}}function o(t,e){c.push([t,e])}function s(t){return c=[],a(t,t,o,!0),c}function l(t,e){return c=[],a(t,e,o,!1),c}function u(t,e,r){switch(arguments.length){case 1:return s(t);case 2:return"function"==typeof e?a(t,t,e,!0):l(t,e);case 3:return a(t,e,r,!1);default:throw new Error("box-intersect: Invalid arguments")}}e.exports=u;var c,h=t("typedarray-pool"),f=t("./lib/sweep"),d=t("./lib/intersect")},{"./lib/intersect":62,"./lib/sweep":66,"typedarray-pool":518}],61:[function(t,e,r){"use strict";function n(t,e,r){var n="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(r?"Full":""),i=["function ",n,"(",w.join(),"){","var ",u,"=2*",a,";"],l="for(var i="+c+","+p+"="+u+"*"+c+";i<"+h+";++i,"+p+"+="+u+"){var x0="+f+"["+o+"+"+p+"],x1="+f+"["+o+"+"+p+"+"+a+"],xi="+d+"[i];",M="for(var j="+m+","+b+"="+u+"*"+m+";j<"+g+";++j,"+b+"+="+u+"){var y0="+v+"["+o+"+"+b+"],"+(r?"y1="+v+"["+o+"+"+b+"+"+a+"],":"")+"yi="+y+"[j];";return t?i.push(l,_,":",M):i.push(M,_,":",l),r?i.push("if(y1"+g+"-"+m+"){"),t?(e(!0,!1),o.push("}else{"),e(!1,!1)):(o.push("if("+l+"){"),e(!0,!0),o.push("}else{"),e(!0,!1),o.push("}}else{if("+l+"){"),e(!1,!0),o.push("}else{"),e(!1,!1),o.push("}")),o.push("}}return "+r);var s=i.join("")+o.join("");return new Function(s)()}var a="d",o="ax",s="vv",l="fp",u="es",c="rs",h="re",f="rb",d="ri",p="rp",m="bs",g="be",v="bb",y="bi",b="bp",x="rv",_="Q",w=[a,o,s,c,h,f,d,m,g,v,y];r.partial=i(!1),r.full=i(!0)},{}],62:[function(t,e,r){"use strict";function n(t,e){var r=8*u.log2(e+1)*(t+1)|0,n=u.nextPow2(k*r);S.length0;){D-=1;var I=D*k,P=S[I],O=S[I+1],R=S[I+2],j=S[I+3],F=S[I+4],N=S[I+5],B=D*T,U=E[B],V=E[B+1],H=1&N,q=!!(16&N),G=l,Y=u,W=m,X=L;if(H&&(G=m,Y=L,W=l,X=u),!(2&N&&(R=_(t,P,O,R,G,Y,V),O>=R)||4&N&&(O=w(t,P,O,R,G,Y,U))>=R)){var Z=R-O,J=F-j;if(q){if(t*Z*(Z+J)=p0)&&!(p1>=hi)",["p0","p1"]),x=m("lo===p0",["p0"]),_=m("lor&&i[h+e]>u;--c,h-=o){for(var f=h,d=h+o,p=0;p>>1,f=2*t,d=h,p=a[f*h+e];u=b?(d=y,p=b):v>=_?(d=g,p=v):(d=x,p=_):b>=_?(d=y,p=b):_>=v?(d=g,p=v):(d=x,p=_);for(var w=f*(c-1),M=f*d,A=0;A=0&&n.push("lo=e[k+n]"),t.indexOf("hi")>=0&&n.push("hi=e[k+o]"),r.push(i.replace("_",n.join()).replace("$",t)),Function.apply(void 0,r)}e.exports=n;var i="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],65:[function(t,e,r){"use strict";function n(t,e){e<=4*f?i(0,e-1,t):h(0,e-1,t)}function i(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var u=r[l-2],c=r[l-1];if(ur[e+1])}function c(t,e,r,n){t*=2;var i=n[t];return i>1,g=m-n,v=m+n,y=d,b=g,x=m,_=v,w=p,M=t+1,A=e-1,k=0;u(y,b,r)&&(k=y,y=b,b=k),u(_,w,r)&&(k=_,_=w,w=k),u(y,x,r)&&(k=y,y=x,x=k),u(b,x,r)&&(k=b,b=x,x=k),u(y,_,r)&&(k=y,y=_,_=k),u(x,_,r)&&(k=x,x=_,_=k),u(b,w,r)&&(k=b,b=w,w=k),u(b,x,r)&&(k=b,b=x,x=k),u(_,w,r)&&(k=_,_=w,w=k);for(var T=r[2*b],S=r[2*b+1],E=r[2*_],L=r[2*_+1],C=2*y,D=2*x,z=2*w,I=2*d,P=2*m,O=2*p,R=0;R<2;++R){var j=r[C+R],F=r[D+R],N=r[z+R];r[I+R]=j,r[P+R]=F,r[O+R]=N}o(g,t,r),o(v,e,r);for(var B=M;B<=A;++B)if(c(B,T,S,r))B!==M&&a(B,M,r),++M;else if(!c(B,E,L,r))for(;;){if(c(A,E,L,r)){c(A,T,S,r)?(s(B,M,A,r),++M,--A):(a(B,A,r),--A);break}if(--A>>1;f(x,S);for(var E=0,L=0,M=0;M=d)C=C-d|0,i(g,v,L--,C);else if(C>=0)i(p,m,E--,C);else if(C<=-d){C=-C-d|0;for(var D=0;D>>1;f(x,E);for(var L=0,C=0,D=0,A=0;A>1==x[2*A+3]>>1&&(I=2,A+=1),z<0){for(var P=-(z>>1)-1,O=0;O>1)-1;0===I?i(p,m,L--,P):1===I?i(g,v,C--,P):2===I&&i(y,b,D--,P)}}}function l(t,e,r,n,o,s,l,u,c,h,g,v){var y=0,b=2*t,_=e,w=e+t,M=1,A=1;n?A=d:M=d;for(var k=o;k>>1;f(x,L);for(var C=0,k=0;k=d?(z=!n,T-=d):(z=!!n,T-=1),z)a(p,m,C++,T);else{var I=v[T],P=b*T,O=g[P+e+1],R=g[P+e+1+t];t:for(var j=0;j>>1;f(x,M);for(var A=0,y=0;y=d)p[A++]=b-d;else{b-=1;var T=c[b],S=m*b,E=u[S+e+1],L=u[S+e+1+t];t:for(var C=0;C=0;--C)if(p[C]===b){for(var P=C+1;PZ)throw new RangeError("Invalid typed array length");var e=new Uint8Array(t);return e.__proto__=i.prototype,e}function i(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(t)}return a(t,e,r)}function a(t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return t instanceof ArrayBuffer?h(t,e,r):"string"==typeof t?u(t,e):f(t)}function o(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function s(t,e,r){return o(t),t<=0?n(t):void 0!==e?"string"==typeof r?n(t).fill(e,r):n(t).fill(e):n(t)}function l(t){return o(t),n(t<0?0:0|d(t))}function u(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!i.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(t,e),a=n(r),o=a.write(t,e);return o!==r&&(a=a.slice(0,o)),a}function c(t){for(var e=t.length<0?0:0|d(t.length),r=n(e),i=0;i=Z)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z.toString(16)+" bytes");return 0|t}function p(t){return+t!=t&&(t=0),i.alloc(+t)}function m(t,e){if(i.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(t).length;default:if(n)return U(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,a){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(a)return-1;r=t.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof e&&(e=i.from(e,n)),i.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,a);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,a);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){function a(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,s=t.length,l=e.length -;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}var u;if(i){var c=-1;for(u=r;us&&(r=s-l),u=r;u>=0;u--){for(var h=!0,f=0;fi&&(n=i):n=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=r){var l,u,c,h;switch(s){case 1:a<128&&(o=a);break;case 2:l=t[i+1],128==(192&l)&&(h=(31&a)<<6|63&l)>127&&(o=h);break;case 3:l=t[i+1],u=t[i+2],128==(192&l)&&128==(192&u)&&(h=(15&a)<<12|(63&l)<<6|63&u)>2047&&(h<55296||h>57343)&&(o=h);break;case 4:l=t[i+1],u=t[i+2],c=t[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(h=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&h<1114112&&(o=h)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return E(n)}function E(t){var e=t.length;if(e<=J)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,r,n,a,o){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||et.length)throw new RangeError("Index out of range")}function O(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,r,n,52,8),r+8}function F(t){if(t=N(t).replace(K,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function N(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function B(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function V(t){for(var e=[],r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function q(t){return W.toByteArray(F(t))}function G(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Y(t){return t!==t}var W=t("base64-js"),X=t("ieee754");r.Buffer=i,r.SlowBuffer=p,r.INSPECT_MAX_BYTES=50;var Z=2147483647;r.kMaxLength=Z,i.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(t,e,r){return a(t,e,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(t,e,r){return s(t,e,r)},i.allocUnsafe=function(t){return l(t)},i.allocUnsafeSlow=function(t){return l(t)},i.isBuffer=function(t){return null!=t&&t._isBuffer===!0},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,a=0,o=Math.min(r,n);a0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},i.prototype.compare=function(t,e,r,n,a){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),e<0||r>t.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&e>=r)return 0;if(n>=a)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,a>>>=0,this===t)return 0;for(var o=a-n,s=r-e,l=Math.min(o,s),u=this.slice(n,a),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return M(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;i.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},i.prototype.readUInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a=i&&(n-=Math.pow(2,8*e)),n},i.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*e)),a},i.prototype.readInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},i.prototype.readInt16LE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return t>>>=0,e||I(t,4,this.length),X.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return t>>>=0,e||I(t,4,this.length),X.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return t>>>=0,e||I(t,8,this.length),X.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return t>>>=0,e||I(t,8,this.length),X.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},i.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},i.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},i.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},i.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},i.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeFloatLE=function(t,e,r){return R(this,t,e,!0,r)},i.prototype.writeFloatBE=function(t,e,r){return R(this,t,e,!1,r)},i.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},i.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},i.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return 3*t.length/4-n(t)}function a(t){var e,r,i,a,o,s,l=t.length;o=n(t),s=new h(3*l/4-o),i=o>0?l-4:l;var u=0;for(e=0,r=0;e>16&255,s[u++]=a>>8&255,s[u++]=255&a;return 2===o?(a=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,s[u++]=255&a):1===o&&(a=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,s[u++]=a>>8&255,s[u++]=255&a),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function s(t,e,r){for(var n,i=[],a=e;al?l:o+16383));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),a.push(i),a.join("")}r.byteLength=i,r.toByteArray=a,r.fromByteArray=l;for(var u=[],c=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=f.length;d0;){for(var c=r.pop(),s=r.pop(),h=-1,f=-1,l=o[s],p=1;p=0||(e.flip(s,c),n(t,e,r,h,s,f),n(t,e,r,s,f,h),n(t,e,r,f,c,h),n(t,e,r,c,h,f)))}}var a=t("robust-in-sphere")[4];t("binary-search-bounds");e.exports=i},{"binary-search-bounds":74,"robust-in-sphere":484}],71:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function i(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}function a(t,e){for(var r=t.cells(),a=r.length,o=0;o0||l.length>0;){for(;s.length>0;){var d=s.pop();if(u[d]!==-i){u[d]=i;for(var p=(c[d],0);p<3;++p){var m=f[3*d+p];m>=0&&0===u[m]&&(h[3*d+p]?l.push(m):(s.push(m),u[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var v=o(c,u,e);return r?v.concat(n.boundary):v}var l=t("binary-search-bounds");e.exports=s,n.prototype.locate=function(){var t=[0,0,0];return function(e,r,n){var a=e,o=r,s=n;return r1&&d(r[c[h-2]],r[c[h-1]],n)>0;)t.push([c[h-1],c[h-2],i]),h-=1;c.length=h,c.push(i);for(var p=u.upperIds,h=p.length;h>1&&d(r[p[h-2]],r[p[h-1]],n)<0;)t.push([p[h-2],p[h-1],i]),h-=1;p.length=h,p.push(i)}}function l(t,e){var r;return(r=t.a[0]v[0]&&l.push(new i(v,d,g,h),new i(d,v,m,h))}l.sort(a);for(var y=l[0].a[0]-(1+Math.abs(l[0].a[0]))*Math.pow(2,-52),b=[new n([y,1],[y,0],-1,[],[],[],[])],x=[],h=0,_=l.length;h<_;++h){var w=l[h],M=w.type;M===p?s(x,b,t,w.a,w.idx):M===g?u(b,t,w):c(b,t,w)}return x}var f=t("binary-search-bounds"),d=t("robust-orientation")[3],p=0,m=1,g=2;e.exports=h},{"binary-search-bounds":74,"robust-orientation":486}],73:[function(t,e,r){"use strict";function n(t,e){this.stars=t,this.edges=e}function i(t,e,r){for(var n=1,i=t.length;n=0}}(),s.removeTriangle=function(t,e,r){var n=this.stars;i(n[t],e,r),i(n[e],r,t),i(n[r],t,e)},s.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},s.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n>>1,x=a[m]"];return i?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),r?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),i?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],i),n("P","c(x,y)"+t+"0",e,["y","c"],i),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],75:[function(t,e,r){"use strict";function n(t){for(var e=1,r=1;rr?r:t:te?e:t}e.exports=n},{}],79:[function(t,e,r){"use strict";function n(t){var e=_(t);return[M(e,-1/0),M(e,1/0)]}function i(t,e){for(var r=new Array(e.length),n=0;n=0;--a){var p=n[a];o=p[0];var m=e[o],g=m[0],v=m[1],y=t[g],M=t[v];if((y[0]-M[0]||y[1]-M[1])<0){var k=g;g=v,v=k}m[0]=g;var T,S=m[1]=p[1];for(i&&(T=m[2]);a>0&&n[a-1][0]===o;){var p=n[--a],E=p[1];i?e.push([S,E,T]):e.push([S,E]),S=E}i?e.push([S,v,T]):e.push([S,v])}return s}function u(t,e,r){for(var i=e.length,a=new g(i),o=[],s=0;se[2]?1:0)}function f(t,e,r){if(0!==t.length){if(e)for(var n=0;n0||d.length>0)}function m(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a10&&/[0-9](?:\s|\/)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),r=t.match(/([a-z])/gi).join("").toLowerCase());else"number"==typeof t?(r="rgb",n=[t>>>16,(65280&t)>>>8,255&t]):a(t)?(null!=t.r?(n=[t.r,t.g,t.b],r="rgb"):null!=t.red?(n=[t.red,t.green,t.blue],r="rgb"):null!=t.h?(n=[t.h,t.s,t.l],r="hsl"):null!=t.hue&&(n=[t.hue,t.saturation,t.lightness],r="hsl"),null!=t.a?s=t.a:null!=t.alpha?s=t.alpha:null!=t.opacity&&(s=t.opacity/100)):(Array.isArray(t)||ArrayBuffer.isView(t))&&(n=[t[0],t[1],t[2]],r="rgb",s=4===t.length?t[3]:1);return{space:r,values:n,alpha:s}}e.exports=n;var i=t("color-name"),a=t("is-plain-obj"),o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},{"color-name":83,"is-plain-obj":276}],85:[function(t,e,r){"use strict";var n=t("color-parse"),i=t("color-space/hsl"),a=t("clamp");e.exports=function(t,e){null==e&&(e=!0);var r=n(t);if(!r.space)return[];if(Array.isArray(t))return t;var o,s=r.values,l=s.length;for(o=0;o1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[u]=255*a;return i}},n.hsl=function(t){var e,r,n,i=t[0]/255,a=t[1]/255,o=t[2]/255,s=Math.min(i,a,o),l=Math.max(i,a,o),u=l-s;return l===s?e=0:i===l?e=(a-o)/u:a===l?e=2+(o-i)/u:o===l&&(e=4+(i-a)/u),e=Math.min(60*e,360),e<0&&(e+=360),n=(s+l)/2,r=l===s?0:n<=.5?u/(l+s):u/(2-l-s),[e,100*r,100*n]}},{"./rgb":87}],87:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],88:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:0,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],89:[function(t,e,r){"use strict";function n(t){var e,r,n,u,c,h,f,d,p,m,g,v,y,b=[],x=[],_=[],w=[];if(o.isPlainObject(t)||(t={}),p=t.nshades||72,d=t.format||"hex",f=t.colormap,f||(f="jet"),"string"==typeof f){if(f=f.toLowerCase(),!l[f])throw Error(f+" not a supported colorscale");h=s(l[f])}else{if(!Array.isArray(f))throw Error("unsupported colormap option",f);h=s(f)}if(h.length>p)throw new Error(f+" map requires nshades to be at least size "+h.length);for(g=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:s(t.alpha):"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=h.map(function(t){return Math.round(t.index*p)}),g[0]<0&&(g[0]=0),g[1]<0&&(g[0]=0),g[0]>1&&(g[0]=1),g[1]>1&&(g[0]=1),y=0;y=0&&r[3]<=1||(r[3]=g[0]+(g[1]-g[0])*v);for(y=0;y=0}function i(t,e,r,i){var s=a(e,r,i);if(0===s){var l=o(a(t,e,r)),u=o(a(t,e,i));if(l===u){if(0===l){var c=n(t,e,r);return c===n(t,e,i)?0:c?1:-1}return 0}return 0===u?l>0?-1:n(t,e,i)?-1:1:0===l?u>0?1:n(t,e,r)?1:-1:o(u-l)}var h=a(t,e,r);return h>0?s>0&&a(t,e,i)>0?1:-1:h<0?s>0||a(t,e,i)>0?1:-1:a(t,e,i)>0?1:n(t,e,r)?1:-1}e.exports=i;var a=t("robust-orientation"),o=t("signum"),s=t("two-sum"),l=t("robust-product"),u=t("robust-sum")},{"robust-orientation":486,"robust-product":487,"robust-sum":491,signum:493,"two-sum":517}],91:[function(t,e,r){function n(t,e){return t-e}function i(t,e){var r=t.length,i=t.length-e.length;if(i)return i;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||a(t[0],t[1])-a(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(i=o+t[2]-(s+e[2]))return i;var l=a(t[0],t[1]),u=a(e[0],e[1]);return a(l,t[2])-a(u,e[2])||a(l+t[2],o)-a(u+e[2],s);case 4:var c=t[0],h=t[1],f=t[2],d=t[3],p=e[0],m=e[1],g=e[2],v=e[3];return c+h+f+d-(p+m+g+v)||a(c,h,f,d)-a(p,m,g,v,p)||a(c+h,c+f,c+d,h+f,h+d,f+d)-a(p+m,p+g,p+v,m+g,m+v,g+v)||a(c+h+f,c+h+d,c+f+d,h+f+d)-a(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var y=t.slice().sort(n),b=e.slice().sort(n),x=0;xt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}e.exports=n},{}],95:[function(t,e,r){"use strict";function n(t){var e=i(t),r=e.length;if(r<=2)return[];for(var n=new Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}function a(t,e){try{return o(t,!0)}catch(u){var r=s(t);if(r.length<=e)return[];var a=n(t,r),l=o(a,!0);return i(l,r)}}e.exports=a;var o=t("incremental-convex-hull"),s=t("affine-hull")},{"affine-hull":33,"incremental-convex-hull":270}],97:[function(t,e,r){e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],98:[function(t,e,r){function n(t){return t=Math.round(t),t<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return n("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return i("%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function l(t){var e=t.replace(/ /g,"").toLowerCase();if(e in u)return u[e].slice();if("#"===e[0]){if(4===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=4095?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null}if(7===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=16777215?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null}return null}var i=e.indexOf("("),l=e.indexOf(")");if(i!==-1&&l+1===e.length){var c=e.substr(0,i),h=e.substr(i+1,l-(i+1)).split(","),f=1;switch(c){case"rgba":if(4!==h.length)return null;f=o(h.pop());case"rgb":return 3!==h.length?null:[a(h[0]),a(h[1]),a(h[2]),f];case"hsla":if(4!==h.length)return null;f=o(h.pop());case"hsl":if(3!==h.length)return null;var d=(parseFloat(h[0])%360+360)%360/360,p=o(h[1]),m=o(h[2]),g=m<=.5?m*(p+1):m+p-m*p,v=2*m-g;return[n(255*s(v,g,d+1/3)),n(255*s(v,g,d)),n(255*s(v,g,d-1/3)),f];default:return null}}return null}var u={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{r.parseCSSColor=l}catch(t){}},{}],99:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,u=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var c=t.length-1;c>=0;--c)a[c]=o*t[c]+s*e[c]+l*r[c]+u*n[c];return a}return o*t+s*e+l*r[c]+u*n}function i(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,u=(1+2*i)*l,c=i*l,h=s*(3-2*i),f=s*o;if(t.length){a||(a=new Array(t.length));for(var d=t.length-1;d>=0;--d)a[d]=u*t[d]+c*e[d]+h*r[d]+f*n[d];return a}return u*t+c*e+h*r+f*n}e.exports=i,e.exports.derivative=n},{}],100:[function(t,e,r){"use strict";function n(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function i(t){var e=new n;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var i=0;i0)throw new Error("cwise: pre() block may not reference array args");if(i0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)e.scalarArgs.push(i),e.shimArgs.push("scalar"+i);else if("index"===o){if(e.indexArgs.push(i),i0)throw new Error("cwise: pre() block may not reference array index");if(i0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(e.shapeArgs.push(i),ir.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,a(e)}var a=t("./lib/thunk.js");e.exports=i},{"./lib/thunk.js":102}],101:[function(t,e,r){"use strict";function n(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],u=[],c=0,h=0;for(n=0;n=0;--n)c=t[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",h,"]-=s",h].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function i(t,e,r,i){for(var a=e.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,u=[],c=0;c0;){"].join("")),u.push(["if(j",c,"<",s,"){"].join("")),u.push(["s",e[c],"=j",c].join("")),u.push(["j",c,"=0"].join("")),u.push(["}else{s",e[c],"=",s].join("")),u.push(["j",c,"-=",s,"}"].join("")),l&&u.push(["index[",e[c],"]=j",c].join(""));for(var c=0;c0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}function l(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,l=new Array(t.arrayArgs.length),c=new Array(t.arrayArgs.length),h=0;h0&&_.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var w=new Array(r),h=0;h3&&x.push(o(t.pre,t,c));var T=o(t.body,t,c),S=a(g);S3&&x.push(o(t.post,t,c)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+x.join("\n")+"\n----------");var E=[t.funcName||"unnamed","_cwise_loop_",l[0].join("s"),"m",S,s(c)].join("");return new Function(["function ",E,"(",b.join(","),"){",x.join("\n"),"} return ",E].join(""))()}var u=t("uniq");e.exports=l},{uniq:520}],102:[function(t,e,r){"use strict";function n(t){var e=["'use strict'","var CACHED={}"],r=[],n=t.funcName+"_cwise_thunk";e.push(["return function ",n,"(",t.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],l=[],u=[],c=0;c0&&(l.push("array"+t.arrayArgs[0]+".shape.length===array"+h+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[c]))),u.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+h+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[c])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),e.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}"));for(var c=0;ce?1:t>=e?0:0/0}function a(t){return null===t?0/0:+t}function o(t){return!isNaN(t)}function s(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}function l(t){return t.length}function u(t){for(var e=1;t*e%1;)e*=10;return e}function c(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function h(){this._=Object.create(null)}function f(t){return(t+="")===_o||t[0]===wo?wo+t:t}function d(t){return(t+="")[0]===wo?t.slice(1):t}function p(t){return f(t)in this._}function m(t){return(t=f(t))in this._&&delete this._[t]}function g(){var t=[];for(var e in this._)t.push(d(e));return t}function v(){var t=0;for(var e in this._)++t;return t}function y(){for(var t in this._)return!1;return!0}function b(){this._=Object.create(null)}function x(t){return t}function _(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function w(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=Mo.length;r=e&&(e=i+1);!(o=s[e])&&++e0&&(t=t.slice(0,s));var u=Io.get(t);return u&&(t=u,l=J),s?e?i:n:e?M:a}function Z(t,e){return function(r){var n=uo.event;uo.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{uo.event=n}}}function J(t,e){var r=Z(t,e);return function(t){var e=this,n=t.relatedTarget;n&&(n===e||8&n.compareDocumentPosition(e))||r.call(e,t)}}function K(t){var r=".dragsuppress-"+ ++Oo,i="click"+r,a=uo.select(n(t)).on("touchmove"+r,T).on("dragstart"+r,T).on("selectstart"+r,T);if(null==Po&&(Po=!("onselectstart"in t)&&w(t.style,"userSelect")),Po){var o=e(t).style,s=o[Po];o[Po]="none"}return function(t){if(a.on(r,null),Po&&(o[Po]=s),t){var e=function(){a.on(i,null)};a.on(i,function(){T(),e()},!0),setTimeout(e,0)}}}function Q(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(Ro<0){var a=n(t);if(a.scrollX||a.scrollY){r=uo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Ro=!(o.f||o.e),r.remove()}}return Ro?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function $(){return uo.event.changedTouches[0].identifier}function tt(t){return t>0?1:t<0?-1:0}function et(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function rt(t){return t>1?0:t<-1?No:Math.acos(t)}function nt(t){return t>1?Vo:t<-1?-Vo:Math.asin(t)}function it(t){return((t=Math.exp(t))-1/t)/2}function at(t){return((t=Math.exp(t))+1/t)/2}function ot(t){return((t=Math.exp(2*t))-1)/(t+1)}function st(t){return(t=Math.sin(t/2))*t}function lt(){}function ut(t,e,r){return this instanceof ut?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof ut?new ut(t.h,t.s,t.l):Mt(""+t,At,ut):new ut(t,e,r)}function ct(t,e,r){function n(t){return t>360?t-=360:t<0&&(t+=360),t<60?a+(o-a)*t/60:t<180?o:t<240?a+(o-a)*(240-t)/60:a}function i(t){return Math.round(255*n(t))}var a,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,r=r<0?0:r>1?1:r,o=r<=.5?r*(1+e):r+e-r*e,a=2*r-o,new bt(i(t+120),i(t),i(t-120))}function ht(t,e,r){return this instanceof ht?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof ht?new ht(t.h,t.c,t.l):t instanceof dt?mt(t.l,t.a,t.b):mt((t=kt((t=uo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ht(t,e,r)}function ft(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new dt(r,Math.cos(t*=Ho)*e,Math.sin(t)*e)}function dt(t,e,r){return this instanceof dt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof dt?new dt(t.l,t.a,t.b):t instanceof ht?ft(t.h,t.c,t.l):kt((t=bt(t)).r,t.g,t.b):new dt(t,e,r)}function pt(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return i=gt(i)*Qo,n=gt(n)*$o,a=gt(a)*ts,new bt(yt(3.2404542*i-1.5371385*n-.4985314*a),yt(-.969266*i+1.8760108*n+.041556*a),yt(.0556434*i-.2040259*n+1.0572252*a))}function mt(t,e,r){return t>0?new ht(Math.atan2(r,e)*qo,Math.sqrt(e*e+r*r),t):new ht(0/0,0/0,t)}function gt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function vt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function yt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function bt(t,e,r){return this instanceof bt?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof bt?new bt(t.r,t.g,t.b):Mt(""+t,bt,ct):new bt(t,e,r)}function xt(t){return new bt(t>>16,t>>8&255,255&t)}function _t(t){return xt(t)+""}function wt(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function Mt(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(St(i[0]),St(i[1]),St(i[2]))}return(a=ns.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function At(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e0&&l<1?0:n),new ut(n,i,l)}function kt(t,e,r){t=Tt(t),e=Tt(e),r=Tt(r);var n=vt((.4124564*t+.3575761*e+.1804375*r)/Qo),i=vt((.2126729*t+.7151522*e+.072175*r)/$o);return dt(116*i-16,500*(n-i),200*(i-vt((.0193339*t+.119192*e+.9503041*r)/ts)))}function Tt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function St(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Et(t){return"function"==typeof t?t:function(){return t}}function Lt(t){return function(e,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),Ct(e,r,t,n)}}function Ct(t,e,r,n){function i(){var t,e=l.status;if(!e&&zt(l)||e>=200&&e<300||304===e){try{t=r.call(a,l)}catch(t){return void o.error.call(a,t)}o.load.call(a,t)}else o.error.call(a,l)}var a={},o=uo.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(t){var e=uo.event;uo.event=t;try{o.progress.call(a,l)}finally{uo.event=e}},a.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==e?delete s[t]:s[t]=e+"",a)},a.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",a):e},a.responseType=function(t){return arguments.length?(u=t,a):u},a.response=function(t){return r=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(ho(arguments)))}}),a.send=function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),l.open(r,t,!0),null==e||"accept"in s||(s.accept=e+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=u&&(l.responseType=u),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),o.beforesend.call(a,l),l.send(null==n?null:n),a},a.abort=function(){return l.abort(),a},uo.rebind(a,o,"on"),null==n?a:a.get(Dt(n))}function Dt(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}function zt(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function It(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i=r+e,a={c:t,t:i,n:null};return as?as.n=a:is=a,as=a,os||(ss=clearTimeout(ss),os=1,ls(Pt)),a}function Pt(){var t=Ot(),e=Rt()-t;e>24?(isFinite(e)&&(clearTimeout(ss),ss=setTimeout(Pt,e)),os=0):(os=1,ls(Pt))}function Ot(){for(var t=Date.now(),e=is;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Rt(){for(var t,e=is,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}}function Nt(t){var e=t.decimal,r=t.thousands,n=t.grouping,i=t.currency,a=n&&r?function(t,e){for(var i=t.length,a=[],o=0,s=n[0],l=0;i>0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>e));)s=n[o=(o+1)%n.length];return a.reverse().join(r)}:x;return function(t){var r=cs.exec(t),n=r[1]||" ",o=r[2]||">",s=r[3]||"-",l=r[4]||"",u=r[5],c=+r[6],h=r[7],f=r[8],d=r[9],p=1,m="",g="",v=!1,y=!0;switch(f&&(f=+f.substring(1)),(u||"0"===n&&"="===o)&&(u=n="0",o="="),d){case"n":h=!0,d="g";break;case"%":p=100,g="%",d="f";break;case"p":p=100,g="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(m="0"+d.toLowerCase());case"c":y=!1;case"d":v=!0,f=0;break;case"s":p=-1,d="r"}"$"===l&&(m=i[0],g=i[1]),"r"!=d||f||(d="g"),null!=f&&("g"==d?f=Math.max(1,Math.min(21,f)):"e"!=d&&"f"!=d||(f=Math.max(0,Math.min(20,f)))),d=hs.get(d)||Bt;var b=u&&h;return function(t){var r=g;if(v&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===s?"":s;if(p<0){var l=uo.formatPrefix(t,f);t=l.scale(t),r=l.symbol+g}else t*=p;t=d(t,f);var x,_,w=t.lastIndexOf(".");if(w<0){var M=y?t.lastIndexOf("e"):-1;M<0?(x=t,_=""):(x=t.substring(0,M),_=t.substring(M))}else x=t.substring(0,w),_=e+t.substring(w+1);!u&&h&&(x=a(x,1/0));var A=m.length+x.length+_.length+(b?0:i.length),k=A"===o?k+i+t:"^"===o?k.substring(0,A>>=1)+i+t+k.substring(A):i+(b?t:k+t))+r}}}function Bt(t){return t+""}function Ut(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Vt(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r1)for(;o=u)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=L[o in ms?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}function n(t,e,r){w.lastIndex=0;var n=w.exec(e.slice(r));return n?(t.w=M.get(n[0].toLowerCase()),r+n[0].length):-1}function i(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.w=_.get(n[0].toLowerCase()),r+n[0].length):-1}function a(t,e,r){T.lastIndex=0;var n=T.exec(e.slice(r));return n?(t.m=S.get(n[0].toLowerCase()),r+n[0].length):-1}function o(t,e,r){A.lastIndex=0;var n=A.exec(e.slice(r));return n?(t.m=k.get(n[0].toLowerCase()),r+n[0].length):-1}function s(t,e,n){return r(t,E.c.toString(),e,n)}function l(t,e,n){return r(t,E.x.toString(),e,n)}function u(t,e,n){return r(t,E.X.toString(),e,n)}function c(t,e,r){var n=b.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)}var h=t.dateTime,f=t.date,d=t.time,p=t.periods,m=t.days,g=t.shortDays,v=t.months,y=t.shortMonths;e.utc=function(t){function r(t){try{ds=Ut;var e=new ds;return e._=t,n(e)}finally{ds=Date}}var n=e(t);return r.parse=function(t){try{ds=Ut;var e=n.parse(t);return e&&e._}finally{ds=Date}},r.toString=n.toString,r},e.multi=e.utc.multi=ce;var b=uo.map(),x=Yt(m),_=Wt(m),w=Yt(g),M=Wt(g),A=Yt(v),k=Wt(v),T=Yt(y),S=Wt(y);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var E={a:function(t){return g[t.getDay()]},A:function(t){return m[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return v[t.getMonth()]},c:e(h),d:function(t,e){return Gt(t.getDate(),e,2)},e:function(t,e){return Gt(t.getDate(),e,2)},H:function(t,e){return Gt(t.getHours(),e,2)},I:function(t,e){return Gt(t.getHours()%12||12,e,2)},j:function(t,e){return Gt(1+fs.dayOfYear(t),e,3)},L:function(t,e){return Gt(t.getMilliseconds(),e,3)},m:function(t,e){return Gt(t.getMonth()+1,e,2)},M:function(t,e){return Gt(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Gt(t.getSeconds(),e,2)},U:function(t,e){return Gt(fs.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Gt(fs.mondayOfYear(t),e,2)},x:e(f),X:e(d),y:function(t,e){return Gt(t.getFullYear()%100,e,2)},Y:function(t,e){return Gt(t.getFullYear()%1e4,e,4)},Z:le,"%":function(){return"%"}},L={a:n,A:i,b:a,B:o,c:s,d:re,e:re,H:ie,I:ie,j:ne,L:se,m:ee,M:ae,p:c,S:oe,U:Zt,w:Xt,W:Jt,x:l,X:u,y:Qt,Y:Kt,Z:$t,"%":ue};return e}function Gt(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a68?1900:2e3)}function ee(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function re(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function ne(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function ie(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function ae(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function oe(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function se(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function le(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=xo(e)/60|0,i=xo(e)%60;return r+Gt(n,"0",2)+Gt(i,"0",2)}function ue(t,e,r){vs.lastIndex=0;var n=vs.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function ce(t){for(var e=t.length,r=-1;++r=0?1:-1,s=o*r,l=Math.cos(e),u=Math.sin(e),c=a*u,h=i*l+c*Math.cos(s),f=c*o*Math.sin(s);Ms.add(Math.atan2(f,h)),n=t,i=l,a=u}var e,r,n,i,a;As.point=function(o,s){As.point=t,n=(e=o)*Ho,i=Math.cos(s=(r=s)*Ho/2+No/4),a=Math.sin(s)},As.lineEnd=function(){t(e,r)}}function ve(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function ye(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function be(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function xe(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _e(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function we(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Me(t){return[Math.atan2(t[1],t[0]),nt(t[2])]}function Ae(t,e){return xo(t[0]-e[0])=0;--s)i.point((h=c[s])[0],h[1])}else n(d.x,d.p.x,-1,i);d=d.p}d=d.o,c=d.z,p=!p}while(!d.v);i.lineEnd()}}}function Ie(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n0){for(_||(a.polygonStart(),_=!0),a.lineStart();++o1&&2&e&&r.push(r.pop().concat(r.shift())),d.push(r.filter(Re))}var d,p,m,g=e(a),v=i.invert(n[0],n[1]),y={point:o,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=h,y.lineEnd=f,d=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=l,y.lineEnd=u,d=uo.merge(d);var t=Ve(v,p);d.length?(_||(a.polygonStart(),_=!0),ze(d,Fe,t,r,a)):t&&(_||(a.polygonStart(),_=!0),a.lineStart(),r(null,null,1,a),a.lineEnd()),_&&(a.polygonEnd(),_=!1),d=p=null},sphere:function(){a.polygonStart(),a.lineStart(),r(null,null,1,a),a.lineEnd(),a.polygonEnd()}},b=je(),x=e(b),_=!1;return y}}function Re(t){return t.length>1}function je(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:M,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Fe(t,e){ -return((t=t.x)[0]<0?t[1]-Vo-jo:Vo-t[1])-((e=e.x)[0]<0?e[1]-Vo-jo:Vo-e[1])}function Ne(t){var e,r=0/0,n=0/0,i=0/0;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?No:-No,l=xo(a-r);xo(l-No)0?Vo:-Vo),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=No&&(xo(r-i)jo?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}function Ue(t,e,r,n){var i;if(null==t)i=r*Vo,n.point(-No,i),n.point(0,i),n.point(No,i),n.point(No,0),n.point(No,-i),n.point(0,-i),n.point(-No,-i),n.point(-No,0),n.point(-No,i);else if(xo(t[0]-e[0])>jo){var a=t[0]=0?1:-1,M=w*_,A=M>No,k=p*b;if(Ms.add(Math.atan2(k*w*Math.sin(M),m*x+k*Math.cos(M))),a+=A?_+w*Bo:_,A^f>=r^v>=r){var T=be(ve(h),ve(t));we(T);var S=be(i,T);we(S);var E=(A^_>=0?-1:1)*nt(S[2]);(n>E||n===E&&(T[0]||T[1]))&&(o+=A^_>=0?1:-1)}if(!g++)break;f=v,p=b,m=x,h=t}}return(a<-jo||aa}function r(t){var r,a,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(h,f){var d,p=[h,f],m=e(h,f),g=o?m?0:i(h,f):m?i(h+(h<0?No:-No),f):0;if(!r&&(u=l=m)&&t.lineStart(),m!==l&&(d=n(r,p),(Ae(r,d)||Ae(p,d))&&(p[0]+=jo,p[1]+=jo,m=e(p[0],p[1]))),m!==l)c=0,m?(t.lineStart(),d=n(p,r),t.point(d[0],d[1])):(d=n(r,p),t.point(d[0],d[1]),t.lineEnd()),r=d;else if(s&&r&&o^m){var v;g&a||!(v=n(p,r,!0))||(c=0,o?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||r&&Ae(r,p)||t.point(p[0],p[1]),r=p,l=m,a=g},lineEnd:function(){l&&t.lineEnd(),r=null},clean:function(){return c|(u&&l)<<1}}}function n(t,e,r){var n=ve(t),i=ve(e),o=[1,0,0],s=be(n,i),l=ye(s,s),u=s[0],c=l-u*u;if(!c)return!r&&t;var h=a*l/c,f=-a*u/c,d=be(o,s),p=_e(o,h);xe(p,_e(s,f));var m=d,g=ye(p,m),v=ye(m,m),y=g*g-v*(ye(p,p)-1);if(!(y<0)){var b=Math.sqrt(y),x=_e(m,(-g-b)/v);if(xe(x,p),x=Me(x),!r)return x;var _,w=t[0],M=e[0],A=t[1],k=e[1];M0^x[1]<(xo(x[0]-w)No^(w<=x[0]&&x[0]<=M)){var L=_e(m,(-g+b)/v);return xe(L,p),[x,Me(L)]}}}function i(e,r){var n=o?t:No-t,i=0;return e<-n?i|=1:e>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}var a=Math.cos(t),o=a>0,s=xo(a)>jo;return Oe(e,r,gr(t,6*Ho),o?[0,-t]:[-No,t-No])}function qe(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,u=o.y,c=s.x,h=s.y,f=0,d=1,p=c-l,m=h-u;if(a=t-l,p||!(a>0)){if(a/=p,p<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>d)return;a>f&&(f=a)}else if(p>0){if(a0)){if(a/=m,m<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=n-u,m||!(a<0)){if(a/=m,m<0){if(a>d)return;a>f&&(f=a)}else if(m>0){if(a0&&(i.a={x:l+f*p,y:u+f*m}),d<1&&(i.b={x:l+d*p,y:u+d*m}),i}}}}}}function Ge(t,e,r,n){function i(n,i){return xo(n[0]-t)0?0:3:xo(n[0]-r)0?2:1:xo(n[1]-e)0?1:0:i>0?3:2}function a(t,e){return o(t.x,e.x)}function o(t,e){var r=i(t,1),n=i(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(s){function l(t){for(var e=0,r=g.length,n=t[1],i=0;in&&et(u,a,t)>0&&++e:a[1]<=n&&et(u,a,t)<0&&--e,u=a;return 0!==e}function u(a,s,l,u){var c=0,h=0;if(null==a||(c=i(a,l))!==(h=i(s,l))||o(a,s)<0^l>0)do{u.point(0===c||3===c?t:r,c>1?n:e)}while((c=(c+l+4)%4)!==h);else u.point(s[0],s[1])}function c(i,a){return t<=i&&i<=r&&e<=a&&a<=n}function h(t,e){c(t,e)&&s.point(t,e)}function f(){L.point=p,g&&g.push(v=[]),A=!0,M=!1,_=w=0/0}function d(){m&&(p(y,b),x&&M&&S.rejoin(),m.push(S.buffer())),L.point=h,M&&s.lineEnd()}function p(t,e){t=Math.max(-Fs,Math.min(Fs,t)),e=Math.max(-Fs,Math.min(Fs,e));var r=c(t,e);if(g&&v.push([t,e]),A)y=t,b=e,x=r,A=!1,r&&(s.lineStart(),s.point(t,e));else if(r&&M)s.point(t,e);else{var n={a:{x:_,y:w},b:{x:t,y:e}};E(n)?(M||(s.lineStart(),s.point(n.a.x,n.a.y)),s.point(n.b.x,n.b.y),r||s.lineEnd(),k=!1):r&&(s.lineStart(),s.point(t,e),k=!1)}_=t,w=e,M=r}var m,g,v,y,b,x,_,w,M,A,k,T=s,S=je(),E=qe(t,e,r,n),L={point:h,lineStart:f,lineEnd:d,polygonStart:function(){s=S,m=[],g=[],k=!0},polygonEnd:function(){s=T,m=uo.merge(m);var e=l([t,n]),r=k&&e,i=m.length;(r||i)&&(s.polygonStart(),r&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),i&&ze(m,a,e,u,s),s.polygonEnd()),m=g=v=null}};return L}}function Ye(t){var e=0,r=No/3,n=lr(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*No/180,r=t[1]*No/180):[e/No*180,r/No*180]},i}function We(t,e){function r(t,e){var r=Math.sqrt(a-2*i*Math.sin(e))/i;return[r*Math.sin(t*=i),o-r*Math.cos(t)]}var n=Math.sin(t),i=(n+Math.sin(e))/2,a=1+n*(2*i-n),o=Math.sqrt(a)/i;return r.invert=function(t,e){var r=o-e;return[Math.atan2(t,r)/i,nt((a-(t*t+r*r)*i*i)/(2*i))]},r}function Xe(){function t(t,e){Bs+=i*t-n*e,n=t,i=e}var e,r,n,i;Gs.point=function(a,o){Gs.point=t,e=n=a,r=i=o},Gs.lineEnd=function(){t(e,r)}}function Ze(t,e){tHs&&(Hs=t),eqs&&(qs=e)}function Je(){function t(t,e){o.push("M",t,",",e,a)}function e(t,e){o.push("M",t,",",e),s.point=r}function r(t,e){o.push("L",t,",",e)}function n(){s.point=t}function i(){o.push("Z")}var a=Ke(4.5),o=[],s={point:t,lineStart:function(){s.point=e},lineEnd:n,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=n,s.point=t},pointRadius:function(t){return a=Ke(t),s},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return s}function Ke(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Qe(t,e){Ss+=t,Es+=e,++Ls}function $e(){function t(t,n){var i=t-e,a=n-r,o=Math.sqrt(i*i+a*a);Cs+=o*(e+t)/2,Ds+=o*(r+n)/2,zs+=o,Qe(e=t,r=n)}var e,r;Ws.point=function(n,i){Ws.point=t,Qe(e=n,r=i)}}function tr(){Ws.point=Qe}function er(){function t(t,e){var r=t-n,a=e-i,o=Math.sqrt(r*r+a*a);Cs+=o*(n+t)/2,Ds+=o*(i+e)/2,zs+=o,o=i*t-n*e,Is+=o*(n+t),Ps+=o*(i+e),Os+=3*o,Qe(n=t,i=e)}var e,r,n,i;Ws.point=function(a,o){Ws.point=t,Qe(e=n=a,r=i=o)},Ws.lineEnd=function(){t(e,r)}}function rr(t){function e(e,r){t.moveTo(e+o,r),t.arc(e,r,o,0,Bo)}function r(e,r){t.moveTo(e,r),s.point=n}function n(e,r){t.lineTo(e,r)}function i(){s.point=e}function a(){t.closePath()}var o=4.5,s={point:e,lineStart:function(){s.point=r},lineEnd:i,polygonStart:function(){s.lineEnd=a},polygonEnd:function(){s.lineEnd=i,s.point=e},pointRadius:function(t){return o=t,s},result:M};return s}function nr(t){function e(t){return(s?n:r)(t)}function r(e){return or(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})}function n(e){function r(r,n){r=t(r,n),e.point(r[0],r[1])}function n(){b=0/0,A.point=a,e.lineStart()}function a(r,n){var a=ve([r,n]),o=t(r,n);i(b,x,y,_,w,M,b=o[0],x=o[1],y=r,_=a[0],w=a[1],M=a[2],s,e),e.point(b,x)}function o(){A.point=r,e.lineEnd()}function l(){n(),A.point=u,A.lineEnd=c}function u(t,e){a(h=t,f=e),d=b,p=x,m=_,g=w,v=M,A.point=a}function c(){i(b,x,y,_,w,M,d,p,h,m,g,v,s,e),A.lineEnd=o,o()}var h,f,d,p,m,g,v,y,b,x,_,w,M,A={point:r,lineStart:n,lineEnd:o,polygonStart:function(){e.polygonStart(),A.lineStart=l},polygonEnd:function(){e.polygonEnd(),A.lineStart=n}};return A}function i(e,r,n,s,l,u,c,h,f,d,p,m,g,v){var y=c-e,b=h-r,x=y*y+b*b;if(x>4*a&&g--){var _=s+d,w=l+p,M=u+m,A=Math.sqrt(_*_+w*w+M*M),k=Math.asin(M/=A),T=xo(xo(M)-1)a||xo((y*C+b*D)/x-.5)>.3||s*d+l*p+u*m0&&16,e):Math.sqrt(a)},e}function ir(t){var e=nr(function(e,r){return t([e*qo,r*qo])});return function(t){return ur(e(t))}}function ar(t){this.stream=t}function or(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function sr(t){return lr(function(){return t})()}function lr(t){function e(t){return t=s(t[0]*Ho,t[1]*Ho),[t[0]*f+l,u-t[1]*f]}function r(t){return(t=s.invert((t[0]-l)/f,(u-t[1])/f))&&[t[0]*qo,t[1]*qo]}function n(){s=Ce(o=fr(v,y,b),a);var t=a(m,g);return l=d-t[0]*f,u=p+t[1]*f,i()}function i(){return c&&(c.valid=!1,c=null),e}var a,o,s,l,u,c,h=nr(function(t,e){return t=a(t,e),[t[0]*f+l,u-t[1]*f]}),f=150,d=480,p=250,m=0,g=0,v=0,y=0,b=0,_=js,w=x,M=null,A=null;return e.stream=function(t){return c&&(c.valid=!1),c=ur(_(o,h(w(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(_=null==t?(M=t,js):He((M=+t)*Ho),i()):M},e.clipExtent=function(t){return arguments.length?(A=t,w=t?Ge(t[0][0],t[0][1],t[1][0],t[1][1]):x,i()):A},e.scale=function(t){return arguments.length?(f=+t,n()):f},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],n()):[d,p]},e.center=function(t){return arguments.length?(m=t[0]%360*Ho,g=t[1]%360*Ho,n()):[m*qo,g*qo]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Ho,y=t[1]%360*Ho,b=t.length>2?t[2]%360*Ho:0,n()):[v*qo,y*qo,b*qo]},uo.rebind(e,h,"precision"),function(){return a=t.apply(this,arguments),e.invert=a.invert&&r,n()}}function ur(t){return or(t,function(e,r){t.point(e*Ho,r*Ho)})}function cr(t,e){return[t,e]}function hr(t,e){return[t>No?t-Bo:t<-No?t+Bo:t,e]}function fr(t,e,r){return t?e||r?Ce(pr(t),mr(e,r)):pr(t):e||r?mr(e,r):hr}function dr(t){return function(e,r){return e+=t,[e>No?e-Bo:e<-No?e+Bo:e,r]}}function pr(t){var e=dr(t);return e.invert=dr(-t),e}function mr(t,e){function r(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,u=Math.sin(e),c=u*n+s*i;return[Math.atan2(l*a-c*o,s*n-u*i),nt(c*a+l*o)]}var n=Math.cos(t),i=Math.sin(t),a=Math.cos(e),o=Math.sin(e);return r.invert=function(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,u=Math.sin(e),c=u*a-l*o;return[Math.atan2(l*a+u*o,s*n+c*i),nt(c*n-s*i)]},r}function gr(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=vr(r,i),a=vr(r,a),(o>0?ia)&&(i+=o*Bo)):(i=t+o*Bo,a=t-.5*l);for(var u,c=i;o>0?c>a:c0?e<-Vo+jo&&(e=-Vo+jo):e>Vo-jo&&(e=Vo-jo);var r=o/Math.pow(i(e),a);return[r*Math.sin(a*t),o-r*Math.cos(a*t)]}var n=Math.cos(t),i=function(t){return Math.tan(No/4+t/2)},a=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(i(e)/i(t)),o=n*Math.pow(i(t),a)/a;return a?(r.invert=function(t,e){var r=o-e,n=tt(a)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/a,2*Math.atan(Math.pow(o/n,1/a))-Vo]},r):Sr}function Tr(t,e){function r(t,e){var r=a-e;return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}var n=Math.cos(t),i=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),a=n/i+t;return xo(i)1&&et(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function Ir(t,e){return t[0]-e[0]||t[1]-e[1]}function Pr(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function Or(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],u=r[1],c=e[1]-l,h=n[1]-u,f=(s*(l-u)-h*(i-a))/(h*o-s*c);return[i+f*o,l+f*c]}function Rr(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}function jr(){an(this),this.edge=this.site=this.circle=null}function Fr(t){var e=sl.pop()||new jr;return e.site=t,e}function Nr(t){Zr(t),il.remove(t),sl.push(t),an(t)}function Br(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];Nr(t);for(var l=a;l.circle&&xo(r-l.circle.x)jo)s=s.L;else{if(!((i=a-Hr(s,o))>jo)){n>-jo?(e=s.P,r=s):i>-jo?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=Fr(t);if(il.insert(e,l),e||r){if(e===r)return Zr(e),r=Fr(e.site),il.insert(l,r),l.edge=r.edge=$r(e.site,l.site),Xr(e),void Xr(r);if(!r)return void(l.edge=$r(e.site,l.site));Zr(e),Zr(r);var u=e.site,c=u.x,h=u.y,f=t.x-c,d=t.y-h,p=r.site,m=p.x-c,g=p.y-h,v=2*(f*g-d*m),y=f*f+d*d,b=m*m+g*g,x={x:(g*y-d*b)/v+c,y:(f*b-m*y)/v+h};en(r.edge,u,p,x),l.edge=$r(u,t,null,x),r.edge=$r(t,p,null,x),Xr(e),Xr(r)}}function Vr(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;r=o.site;var s=r.x,l=r.y,u=l-e;if(!u)return s;var c=s-n,h=1/a-1/u,f=c/u;return h?(-f+Math.sqrt(f*f-2*h*(c*c/(-2*u)-l+u/2+i-a/2)))/h+n:(n+s)/2}function Hr(t,e){var r=t.N;if(r)return Vr(r,e);var n=t.site;return n.y===e?n.x:1/0}function qr(t){this.site=t,this.edges=[]}function Gr(t){for(var e,r,n,i,a,o,s,l,u,c,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],m=nl,g=m.length;g--;)if((a=m[g])&&a.prepare())for(s=a.edges,l=s.length,o=0;ojo||xo(i-r)>jo)&&(s.splice(o,0,new rn(tn(a.site,c,xo(n-h)jo?{x:h,y:xo(e-h)jo?{x:xo(r-p)jo?{x:f,y:xo(e-f)jo?{x:xo(r-d)=-Fo)){var d=l*l+u*u,p=c*c+h*h,m=(h*d-u*p)/f,g=(l*p-c*d)/f,h=g+s,v=ll.pop()||new Wr;v.arc=t,v.site=i,v.x=m+o,v.y=h+Math.sqrt(m*m+g*g),v.cy=h,t.circle=v;for(var y=null,b=ol._;b;)if(v.y=s)return;if(f>p){if(a){if(a.y>=u)return}else a={x:g,y:l};r={x:g,y:u}}else{if(a){if(a.y1)if(f>p){if(a){if(a.y>=u)return}else a={x:(l-i)/n,y:l};r={x:(u-i)/n,y:u}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.xa||h>o||f=x,M=r>=_,A=M<<1|w,k=A+4;Aa&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:bn(r,n)})),a=hl.lastIndex;return a=0&&!(r=uo.interpolators[n](t,e)););return r}function wn(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1?1:t(e)}}function An(t){return function(e){return 1-t(1-e)}}function kn(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Tn(t){return t*t}function Sn(t){return t*t*t}function En(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Ln(t){return function(e){return Math.pow(e,t)}}function Cn(t){return 1-Math.cos(t*Vo)}function Dn(t){return Math.pow(2,10*(t-1))}function zn(t){return 1-Math.sqrt(1-t*t)}function In(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/Bo*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Bo/e)}}function Pn(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function On(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Rn(t,e){t=uo.hcl(t),e=uo.hcl(e);var r=t.h,n=t.c,i=t.l,a=e.h-r,o=e.c-n,s=e.l-i;return isNaN(o)&&(o=0,n=isNaN(n)?e.c:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return ft(r+a*t,n+o*t,i+s*t)+""}}function jn(t,e){t=uo.hsl(t),e=uo.hsl(e);var r=t.h,n=t.s,i=t.l,a=e.h-r,o=e.s-n,s=e.l-i;return isNaN(o)&&(o=0,n=isNaN(n)?e.s:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return ct(r+a*t,n+o*t,i+s*t)+""}}function Fn(t,e){t=uo.lab(t),e=uo.lab(e);var r=t.l,n=t.a,i=t.b,a=e.l-r,o=e.a-n,s=e.b-i;return function(t){return pt(r+a*t,n+o*t,i+s*t)+""}}function Nn(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Bn(t){var e=[t.a,t.b],r=[t.c,t.d],n=Vn(e),i=Un(e,r),a=Vn(Hn(r,e,-i))||0;e[0]*r[1]180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(qn(r)+"rotate(",null,")")-2,x:bn(t,e)})):e&&r.push(qn(r)+"rotate("+e+")")}function Wn(t,e,r,n){t!==e?n.push({i:r.push(qn(r)+"skewX(",null,")")-2,x:bn(t,e)}):e&&r.push(qn(r)+"skewX("+e+")")}function Xn(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(qn(r)+"scale(",null,",",null,")");n.push({i:i-4,x:bn(t[0],e[0])},{i:i-2,x:bn(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(qn(r)+"scale("+e+")")}function Zn(t,e){var r=[],n=[];return t=uo.transform(t),e=uo.transform(e),Gn(t.translate,e.translate,r,n),Yn(t.rotate,e.rotate,r,n),Wn(t.skew,e.skew,r,n),Xn(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,a=n.length;++i=0;)r.push(i[n])}function li(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++oi&&(n=r,i=e);return n}function bi(t){return t.reduce(xi,0)}function xi(t,e){return t+e[1]}function _i(t,e){return wi(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wi(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Mi(t){return[uo.min(t),uo.max(t)]}function Ai(t,e){return t.value-e.value}function ki(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Ti(t,e){t._pack_next=e,e._pack_prev=t}function Si(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Ei(t){function e(t){c=Math.min(t.x-t.r,c),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}if((r=t.children)&&(u=r.length)){var r,n,i,a,o,s,l,u,c=1/0,h=-1/0,f=1/0,d=-1/0;if(r.forEach(Li),n=r[0],n.x=-n.r,n.y=0,e(n),u>1&&(i=r[1],i.x=i.r,i.y=0,e(i),u>2))for(a=r[2],zi(n,i,a),e(a),ki(n,a),n._pack_prev=a,ki(a,i),i=n._pack_next,o=3;o=0;)e=i[a],e.z+=r,e.m+=r,r+=e.s+(n+=e.c)}function Fi(t,e,r){return t.a.parent===e.parent?t.a:r}function Ni(t){return 1+uo.max(t,function(t){return t.y})}function Bi(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Ui(t){var e=t.children;return e&&e.length?Ui(e[0]):t}function Vi(t){var e,r=t.children;return r&&(e=r.length)?Vi(r[e-1]):t}function Hi(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function qi(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i<0&&(r+=i/2,i=0),a<0&&(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function Gi(t){var e=t[0],r=t[t.length-1];return e2?Ji:Wi,l=n?Kn:Jn;return o=i(t,e,l,r),s=i(e,t,l,_n),a}function a(t){return o(t)}var o,s;return a.invert=function(t){return s(t)},a.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},a.range=function(t){return arguments.length?(e=t,i()):e},a.rangeRound=function(t){return a.range(t).interpolate(Nn)},a.clamp=function(t){return arguments.length?(n=t,i()):n},a.interpolate=function(t){return arguments.length?(r=t,i()):r},a.ticks=function(e){return ea(t,e)},a.tickFormat=function(e,r){return ra(t,e,r)},a.nice=function(e){return $i(t,e),i()},a.copy=function(){return Ki(t,e,r,n)},i()}function Qi(t,e){return uo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function $i(t,e){return Xi(t,Zi(ta(t,e)[2])),Xi(t,Zi(ta(t,e)[2])),t}function ta(t,e){null==e&&(e=10);var r=Gi(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function ea(t,e){return uo.range.apply(uo,ta(t,e))}function ra(t,e,r){var n=ta(t,e);if(r){var i=cs.exec(r);if(i.shift(),"s"===i[8]){var a=uo.formatPrefix(Math.max(xo(n[0]),xo(n[1])));return i[7]||(i[7]="."+na(a.scale(n[2]))),i[8]="f",r=uo.format(i.join("")),function(t){return r(a.scale(t))+a.symbol}}i[7]||(i[7]="."+ia(i[8],n)),r=i.join("")}else r=",."+na(n[2])+"f";return uo.format(r)}function na(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ia(t,e){var r=na(e[2]);return t in Ml?Math.abs(r-na(Math.max(xo(e[0]),xo(e[1]))))+ +("e"!==t):r-2*("%"===t)}function aa(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),o):e},o.nice=function(){var e=Xi(n.map(i),r?Math:kl);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Gi(n),o=[],s=t[0],l=t[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),h=e%1?2:e;if(isFinite(c-u)){if(r){for(;u0;f--)o.push(a(u)*f);for(u=0;o[u]l;c--);o=o.slice(u,c)}return o},o.tickFormat=function(t,r){if(!arguments.length)return Al;arguments.length<2?r=Al:"function"!=typeof r&&(r=uo.format(r));var n=Math.max(1,e*t/o.ticks().length);return function(t){var o=t/a(Math.round(i(t)));return o*e0?s[r-1]:t[0],r0?0:1}function xa(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,u=-s*a,c=t[0]+l,h=t[1]+u,f=e[0]+l,d=e[1]+u,p=(c+f)/2,m=(h+d)/2,g=f-c,v=d-h,y=g*g+v*v,b=r-n,x=c*d-f*h,_=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),w=(x*v-g*_)/y,M=(-x*g-v*_)/y,A=(x*v+g*_)/y,k=(-x*g+v*_)/y,T=w-p,S=M-m,E=A-p,L=k-m;return T*T+S*S>E*E+L*L&&(w=A,M=k),[[w-l,M-u],[w*r/b,M*r/b]]}function _a(t){function e(e){function o(){u.push("M",a(t(c),s))}for(var l,u=[],c=[],h=-1,f=e.length,d=Et(r),p=Et(n);++h1?t.join("L"):t+"Z"}function Ma(t){return t.join("L")+"Z"}function Aa(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1&&i.push("H",n[0]),i.join("")}function ka(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var u=2;u9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}function Ua(t){return t.length<3?wa(t):t[0]+Ca(t,Ba(t))}function Va(t){for(var e,r,n,i=-1,a=t.length;++i0;)d[--s].call(t,o);if(a>=1)return m.event&&m.event.end.call(t,t.__data__,e),--p.count?delete p[n]:delete t[r],1}var l,u,c,f,d,p=t[r]||(t[r]={active:0,count:0}),m=p[n];m||(l=i.time,u=It(a,0,l),m=p[n]={tween:new h,time:l,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++p.count)}function ro(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate("+(isFinite(n)?n:r(t))+",0)"})}function no(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate(0,"+(isFinite(n)?n:r(t))+")"})}function io(t){return t.toISOString()}function ao(t,e,r){function n(e){return t(e)}function i(t,r){var n=t[1]-t[0],i=n/r,a=uo.bisect(Jl,i);return a==Jl.length?[e.year,ta(t.map(function(t){return t/31536e6}),r)[2]]:a?e[i/Jl[a-1]1?{floor:function(e){for(;r(e=t.floor(e));)e=oo(e-1);return e},ceil:function(e){for(;r(e=t.ceil(e));)e=oo(+e+1);return e}}:t))},n.ticks=function(t,e){var r=Gi(n.domain()),a=null==t?i(r,10):"number"==typeof t?i(r,t):!t.range&&[{range:t},e];return a&&(t=a[0],e=a[1]),t.range(r[0],oo(+r[1]+1),e<1?1:e)},n.tickFormat=function(){return r},n.copy=function(){return ao(t.copy(),e,r)},Qi(n,t)}function oo(t){return new Date(t)}function so(t){return JSON.parse(t.responseText)}function lo(t){var e=fo.createRange();return e.selectNode(fo.body),e.createContextualFragment(t.responseText)}var uo={version:"3.5.17"},co=[].slice,ho=function(t){return co.call(t)},fo=this.document;if(fo)try{ho(fo.documentElement.childNodes)[0].nodeType}catch(t){ho=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),fo)try{fo.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var po=this.Element.prototype,mo=po.setAttribute,go=po.setAttributeNS,vo=this.CSSStyleDeclaration.prototype,yo=vo.setProperty;po.setAttribute=function(t,e){mo.call(this,t,e+"")},po.setAttributeNS=function(t,e,r){go.call(this,t,e,r+"")},vo.setProperty=function(t,e,r){yo.call(this,t,e+"",r)}}uo.ascending=i,uo.descending=function(t,e){return et?1:e>=t?0:0/0},uo.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},uo.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},uo.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return l/(c-1)},uo.deviation=function(){var t=uo.variance.apply(this,arguments);return t?Math.sqrt(t):t};var bo=s(i);uo.bisectLeft=bo.left,uo.bisect=uo.bisectRight=bo.right,uo.bisector=function(t){return s(1===t.length?function(e,r){return i(t(e),r)}:t)},uo.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},uo.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},uo.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(n=t[i],e=n.length;--e>=0;)r[--o]=n[e];return r};var xo=Math.abs;uo.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r===1/0)throw new Error("infinite range");var n,i=[],a=u(xo(r)),o=-1;if(t*=a,e*=a,r*=a,r<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)=a.length)return n?n.call(i,o):r?o.sort(r):o;for(var l,u,c,f,d=-1,p=o.length,m=a[s++],g=new h;++d=a.length)return t;var n=[],i=o[r++];return t.forEach(function(t,i){n.push({key:t,values:e(i,r)})}),i?n.sort(function(t,e){return i(t.key,e.key)}):n}var r,n,i={},a=[],o=[];return i.map=function(e,r){return t(r,e,0)},i.entries=function(r){return e(t(uo.map,r,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return r=t,i},i.rollup=function(t){return n=t,i},i},uo.set=function(t){var e=new b;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},uo.event=null,uo.requote=function(t){return t.replace(Ao,"\\$&")};var Ao=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ko={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]},To=function(t,e){return e.querySelector(t)},So=function(t,e){return e.querySelectorAll(t)},Eo=function(t,e){var r=t.matches||t[w(t,"matchesSelector")];return(Eo=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(To=function(t,e){return Sizzle(t,e)[0]||null},So=Sizzle,Eo=Sizzle.matchesSelector),uo.selection=function(){return uo.select(fo.documentElement)};var Lo=uo.selection.prototype=[];Lo.select=function(t){var e,r,n,i,a=[];t=C(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),Do.hasOwnProperty(r)?{space:Do[r],local:t}:t}},Lo.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return t=uo.ns.qualify(t),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(z(e,t[e]));return this}return this.each(z(t,e))},Lo.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=O(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},Lo.sort=function(t){t=q.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(e=e.transition().duration(L)),e.call(t.event)}function s(){_&&_.domain(x.range().map(function(t){return(t-A.x)/A.k}).map(x.invert)),M&&M.domain(w.range().map(function(t){return(t-A.y)/A.k}).map(w.invert))}function l(t){C++||t({type:"zoomstart"})}function u(t){s(),t({type:"zoom",scale:A.k,translate:[A.x,A.y]})}function c(t){--C||(t({type:"zoomend"}),g=null)}function h(){function t(){s=1,a(uo.mouse(i),f),u(o)}function r(){h.on(z,null).on(I,null),d(s),c(o)}var i=this,o=O.of(i,arguments),s=0,h=uo.select(n(i)).on(z,t).on(I,r),f=e(uo.mouse(i)),d=K(i);Bl.call(i),l(o)}function f(){function t(){var t=uo.touches(p);return d=A.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function r(){var e=uo.event.target;uo.select(e).on(x,n).on(_,s),w.push(e);for(var r=uo.event.changedTouches,i=0,a=r.length;i1){var c=l[0],h=l[1],f=c[0]-h[0],d=c[1]-h[1];v=f*f+d*d}}function n(){var t,e,r,n,o=uo.touches(p);Bl.call(p);for(var s=0,l=o.length;s=u)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,hs=uo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=uo.round(t,jt(t,e))).toFixed(Math.max(0,Math.min(20,jt(t*(1+1e-15),e))))}}),fs=uo.time={},ds=Date;Ut.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ps.setUTCDate.apply(this._,arguments)},setDay:function(){ps.setUTCDay.apply(this._,arguments)},setFullYear:function(){ps.setUTCFullYear.apply(this._,arguments)},setHours:function(){ps.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ps.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ps.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ps.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ps.setUTCSeconds.apply(this._,arguments)},setTime:function(){ps.setTime.apply(this._,arguments)}};var ps=Date.prototype;fs.year=Vt(function(t){return t=fs.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),fs.years=fs.year.range,fs.years.utc=fs.year.utc.range,fs.day=Vt(function(t){var e=new ds(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),fs.days=fs.day.range,fs.days.utc=fs.day.utc.range,fs.dayOfYear=function(t){var e=fs.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var r=fs[t]=Vt(function(t){return(t=fs.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=fs.year(t).getDay();return Math.floor((fs.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});fs[t+"s"]=r.range,fs[t+"s"].utc=r.utc.range,fs[t+"OfYear"]=function(t){var r=fs.year(t).getDay();return Math.floor((fs.dayOfYear(t)+(r+e)%7)/7)}}),fs.week=fs.sunday,fs.weeks=fs.sunday.range,fs.weeks.utc=fs.sunday.utc.range,fs.weekOfYear=fs.sundayOfYear;var ms={"-":"",_:" ",0:"0"},gs=/^\s*\d+/,vs=/^%/;uo.locale=function(t){return{numberFormat:Nt(t),timeFormat:qt(t)}};var ys=uo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});uo.format=ys.numberFormat,uo.geo={},he.prototype={s:0,t:0,add:function(t){fe(t,this.t,bs),fe(bs.s,this.s,this),this.s?this.t+=bs.t:this.s=bs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bs=new he;uo.geo.stream=function(t,e){t&&xs.hasOwnProperty(t.type)?xs[t.type](t,e):de(t,e)};var xs={Feature:function(t,e){de(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++nd&&(d=e)}function e(e,r){var n=ve([e*Ho,r*Ho]);if(v){var i=be(v,n),a=[i[1],-i[0],0],o=be(a,i);we(o),o=Me(o);var l=e-p,u=l>0?1:-1,m=o[0]*qo*u,g=xo(l)>180;if(g^(u*pd&&(d=y)}else if(m=(m+360)%360-180,g^(u*pd&&(d=r);g?es(c,f)&&(f=e):s(e,f)>s(c,f)&&(c=e):f>=c?(ef&&(f=e)):e>p?s(c,e)>s(c,f)&&(f=e):s(e,f)>s(c,f)&&(c=e)}else t(e,r);v=n,p=e}function r(){_.point=e}function n(){x[0]=c,x[1]=f,_.point=t,v=null}function i(t,r){if(v){var n=t-p;y+=xo(n)>180?n+(n>0?360:-360):n}else m=t,g=r;As.point(t,r),e(t,r)}function a(){As.lineStart()}function o(){i(m,g),As.lineEnd(),xo(y)>jo&&(c=-(f=180)),x[0]=c,x[1]=f,v=null}function s(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function u(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tjo?d=90:y<-jo&&(h=-90),x[0]=c,x[1]=f}};return function(t){d=f=-(c=h=1/0),b=[],uo.geo.stream(t,_);var e=b.length;if(e){b.sort(l);for(var r,n=1,i=b[0],a=[i];ns(i[0],i[1])&&(i[1]=r[1]),s(r[0],i[1])>s(i[0],i[1])&&(i[0]=r[0])):a.push(i=r);for(var o,r,p=-1/0,e=a.length-1,n=0,i=a[e];n<=e;i=r,++n)r=a[n],(o=s(i[1],r[0]))>p&&(p=o,c=r[0],f=i[1])}return b=x=null,1/0===c||1/0===h?[[0/0,0/0],[0/0,0/0]]:[[c,h],[f,d]]}}(),uo.geo.centroid=function(t){ks=Ts=Ss=Es=Ls=Cs=Ds=zs=Is=Ps=Os=0,uo.geo.stream(t,Rs);var e=Is,r=Ps,n=Os,i=e*e+r*r+n*n;return i=.12&&i<.234&&n>=-.425&&n<-.214?o:i>=.166&&i<.234&&n>=-.214&&n<-.115?s:a).invert(t)},t.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},t.precision=function(e){return arguments.length?(a.precision(e),o.precision(e),s.precision(e),t):a.precision()},t.scale=function(e){return arguments.length?(a.scale(e),o.scale(.35*e),s.scale(e),t.translate(a.translate())):a.scale()},t.translate=function(e){if(!arguments.length)return a.translate();var u=a.scale(),c=+e[0],h=+e[1];return r=a.translate(e).clipExtent([[c-.455*u,h-.238*u],[c+.455*u,h+.238*u]]).stream(l).point,n=o.translate([c-.307*u,h+.201*u]).clipExtent([[c-.425*u+jo,h+.12*u+jo],[c-.214*u-jo,h+.234*u-jo]]).stream(l).point,i=s.translate([c-.205*u,h+.212*u]).clipExtent([[c-.214*u+jo,h+.166*u+jo],[c-.115*u-jo,h+.234*u-jo]]).stream(l).point,t},t.scale(1070)};var Ns,Bs,Us,Vs,Hs,qs,Gs={point:M,lineStart:M,lineEnd:M,polygonStart:function(){Bs=0,Gs.lineStart=Xe},polygonEnd:function(){Gs.lineStart=Gs.lineEnd=Gs.point=M,Ns+=xo(Bs/2)}},Ys={point:Ze,lineStart:M,lineEnd:M,polygonStart:M,polygonEnd:M},Ws={point:Qe,lineStart:$e,lineEnd:tr,polygonStart:function(){Ws.lineStart=er},polygonEnd:function(){Ws.point=Qe,Ws.lineStart=$e,Ws.lineEnd=tr}};uo.geo.path=function(){function t(t){return t&&("function"==typeof s&&a.pointRadius(+s.apply(this,arguments)),o&&o.valid||(o=i(a)),uo.geo.stream(t,o)),a.result()}function e(){return o=null,t}var r,n,i,a,o,s=4.5;return t.area=function(t){return Ns=0,uo.geo.stream(t,i(Gs)),Ns},t.centroid=function(t){return Ss=Es=Ls=Cs=Ds=zs=Is=Ps=Os=0,uo.geo.stream(t,i(Ws)),Os?[Is/Os,Ps/Os]:zs?[Cs/zs,Ds/zs]:Ls?[Ss/Ls,Es/Ls]:[0/0,0/0]},t.bounds=function(t){return Hs=qs=-(Us=Vs=1/0),uo.geo.stream(t,i(Ys)),[[Us,Vs],[Hs,qs]]},t.projection=function(t){return arguments.length?(i=(r=t)?t.stream||ir(t):x,e()):r},t.context=function(t){return arguments.length?(a=null==(n=t)?new Je:new rr(t),"function"!=typeof s&&a.pointRadius(s),e()):n},t.pointRadius=function(e){return arguments.length?(s="function"==typeof e?e:(a.pointRadius(+e),+e),t):s},t.projection(uo.geo.albersUsa()).context(null)},uo.geo.transform=function(t){return{stream:function(e){var r=new ar(e);for(var n in t)r[n]=t[n];return r}}},ar.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},uo.geo.projection=sr,uo.geo.projectionMutator=lr,(uo.geo.equirectangular=function(){return sr(cr)}).raw=cr.invert=cr,uo.geo.rotation=function(t){function e(e){return e=t(e[0]*Ho,e[1]*Ho),e[0]*=qo,e[1]*=qo,e}return t=fr(t[0]%360*Ho,t[1]*Ho,t.length>2?t[2]*Ho:0),e.invert=function(e){return e=t.invert(e[0]*Ho,e[1]*Ho),e[0]*=qo,e[1]*=qo,e},e},hr.invert=cr,uo.geo.circle=function(){function t(){var t="function"==typeof n?n.apply(this,arguments):n,e=fr(-t[0]*Ho,-t[1]*Ho,0).invert,i=[];return r(null,null,1,{point:function(t,r){i.push(t=e(t,r)),t[0]*=qo,t[1]*=qo}}),{type:"Polygon",coordinates:[i]}}var e,r,n=[0,0],i=6;return t.origin=function(e){return arguments.length?(n=e,t):n},t.angle=function(n){return arguments.length?(r=gr((e=+n)*Ho,i*Ho),t):e},t.precision=function(n){return arguments.length?(r=gr(e*Ho,(i=+n)*Ho),t):i},t.angle(90)},uo.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Ho,i=t[1]*Ho,a=e[1]*Ho,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),u=Math.cos(i),c=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((r=h*o)*r+(r=u*c-l*h*s)*r),l*c+u*h*s)},uo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return uo.range(Math.ceil(a/g)*g,i,g).map(f).concat(uo.range(Math.ceil(u/v)*v,l,v).map(d)).concat(uo.range(Math.ceil(n/p)*p,r,p).filter(function(t){return xo(t%g)>jo}).map(c)).concat(uo.range(Math.ceil(s/m)*m,o,m).filter(function(t){return xo(t%v)>jo}).map(h))}var r,n,i,a,o,s,l,u,c,h,f,d,p=10,m=p,g=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(l).slice(1),f(i).reverse().slice(1),d(u).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(a=+e[0][0],i=+e[1][0],u=+e[0][1],l=+e[1][1],a>i&&(e=a,a=i,i=e),u>l&&(e=u,u=l,l=e),t.precision(y)):[[a,u],[i,l]]},t.minorExtent=function(e){return arguments.length?(n=+e[0][0],r=+e[1][0],s=+e[0][1],o=+e[1][1],n>r&&(e=n,n=r,r=e),s>o&&(e=s,s=o,o=e),t.precision(y)):[[n,s],[r,o]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(g=+e[0],v=+e[1],t):[g,v]},t.minorStep=function(e){return arguments.length?(p=+e[0],m=+e[1],t):[p,m]},t.precision=function(e){return arguments.length?(y=+e,c=yr(s,o,90),h=br(n,r,y),f=yr(u,l,90),d=br(a,i,y),t):y},t.majorExtent([[-180,-90+jo],[180,90-jo]]).minorExtent([[-180,-80-jo],[180,80+jo]])},uo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}var e,r,n=xr,i=_r;return t.distance=function(){return uo.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},t.source=function(r){return arguments.length?(n=r,e="function"==typeof r?null:r,t):n},t.target=function(e){return arguments.length?(i=e,r="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},uo.geo.interpolate=function(t,e){return wr(t[0]*Ho,t[1]*Ho,e[0]*Ho,e[1]*Ho)},uo.geo.length=function(t){return Xs=0,uo.geo.stream(t,Zs),Xs};var Xs,Zs={sphere:M,point:M,lineStart:Mr,lineEnd:M,polygonStart:M,polygonEnd:M},Js=Ar(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(uo.geo.azimuthalEqualArea=function(){return sr(Js)}).raw=Js;var Ks=Ar(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},x);(uo.geo.azimuthalEquidistant=function(){return sr(Ks)}).raw=Ks,(uo.geo.conicConformal=function(){return Ye(kr)}).raw=kr,(uo.geo.conicEquidistant=function(){return Ye(Tr)}).raw=Tr;var Qs=Ar(function(t){return 1/t},Math.atan);(uo.geo.gnomonic=function(){return sr(Qs)}).raw=Qs,Sr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Vo]},(uo.geo.mercator=function(){return Er(Sr)}).raw=Sr;var $s=Ar(function(){return 1},Math.asin);(uo.geo.orthographic=function(){return sr($s)}).raw=$s;var tl=Ar(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(uo.geo.stereographic=function(){return sr(tl)}).raw=tl,Lr.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Vo]},(uo.geo.transverseMercator=function(){var t=Er(Lr),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):(t=r(),[t[0],t[1],t[2]-90])},r([0,0,90])}).raw=Lr,uo.geom={},uo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=Et(r),a=Et(n),o=t.length,s=[],l=[];for(e=0;e=0;--e)d.push(t[s[u[e]][2]]);for(e=+h;e=n&&u.x<=a&&u.y>=i&&u.y<=o?[[n,o],[a,o],[a,i],[n,i]]:[]).point=t[s]}),e}function r(t){return t.map(function(t,e){return{x:Math.round(a(t,e)/jo)*jo,y:Math.round(o(t,e)/jo)*jo,i:e}})}var n=Cr,i=Dr,a=n,o=i,s=ul;return t?e(t):(e.links=function(t){return un(r(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return un(r(t)).cells.forEach(function(r,n){for(var i,a=r.site,o=r.edges.sort(Yr),s=-1,l=o.length,u=o[l-1].edge,c=u.l===a?u.r:u.l;++s=u,f=n>=c,d=f<<1|h;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=pn()),h?i=u:s=u,f?o=c:l=c,a(t,e,r,n,i,o,s,l)}var c,h,f,d,p,m,g,v,y,b=Et(s),x=Et(l);if(null!=e)m=e,g=r,v=n,y=i;else if(v=y=-(m=g=1/0),h=[],f=[],p=t.length,o)for(d=0;dv&&(v=c.x),c.y>y&&(y=c.y),h.push(c.x),f.push(c.y);else for(d=0;dv&&(v=_),w>y&&(y=w),h.push(_),f.push(w)}var M=v-m,A=y-g;M>A?y=g+M:v=m+A;var k=pn();if(k.add=function(t){a(k,t,+b(t,++d),+x(t,d),m,g,v,y)},k.visit=function(t){mn(t,k,m,g,v,y)},k.find=function(t){return gn(k,t[0],t[1],m,g,v,y)},d=-1,null==e){for(;++d=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return r=dl.get(r)||fl,n=pl.get(n)||x,Mn(n(r.apply(null,co.call(arguments,1))))},uo.interpolateHcl=Rn,uo.interpolateHsl=jn,uo.interpolateLab=Fn,uo.interpolateRound=Nn,uo.transform=function(t){var e=fo.createElementNS(uo.ns.prefix.svg,"g");return(uo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Bn(r?r.matrix:ml)})(t)},Bn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};uo.interpolateTransform=Zn,uo.layout={},uo.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r0?i=t:(r.c=null,r.t=0/0,r=null,u.end({type:"end",alpha:i=0})):t>0&&(u.start({type:"start",alpha:i=t}),r=It(l.tick)),l):i},l.start=function(){function t(t,n){if(!r){for(r=new Array(i),l=0;l=0;)o.push(c=u[l]),c.parent=a,c.depth=a.depth+1;n&&(a.value=0),a.children=u}else n&&(a.value=+n.call(t,a,a.depth)||0),delete a.children;return li(i,function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)}),s}var e=hi,r=ui,n=ci;return t.sort=function(r){return arguments.length?(e=r,t):e},t.children=function(e){return arguments.length?(r=e,t):r},t.value=function(e){return arguments.length?(n=e,t):n},t.revalue=function(e){return n&&(si(e,function(t){t.children&&(t.value=0)}),li(e,function(e){var r;e.children||(e.value=+n.call(t,e,e.depth)||0),(r=e.parent)&&(r.value+=e.value)})),e},t},uo.layout.partition=function(){function t(e,r,n,i){var a=e.children;if(e.x=r, -e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(n=e.value?n/e.value:0;++us&&(s=n),o.push(n)}for(r=0;r0)for(a=-1;++a=c[0]&&s<=c[1]&&(o=l[uo.bisect(h,s,1,d)-1],o.y+=p,o.push(t[a]));return l}var e=!0,r=Number,n=Mi,i=_i;return t.value=function(e){return arguments.length?(r=e,t):r},t.range=function(e){return arguments.length?(n=Et(e),t):n},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return wi(t,e)}:Et(e),t):i},t.frequency=function(r){return arguments.length?(e=!!r,t):e},t},uo.layout.pack=function(){function t(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],u=i[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,li(s,function(t){t.r=+c(t.value)}),li(s,Ei),n){var h=n*(e?1:Math.max(2*s.r/l,2*s.r/u))/2;li(s,function(t){t.r+=h}),li(s,Ei),li(s,function(t){t.r-=h})}return Di(s,l/2,u/2,e?1:1/Math.max(2*s.r/l,2*s.r/u)),o}var e,r=uo.layout.hierarchy().sort(Ai),n=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(r){return arguments.length?(e=null==r||"function"==typeof r?r:+r,t):e},t.padding=function(e){return arguments.length?(n=+e,t):n},oi(t,r)},uo.layout.tree=function(){function t(t,i){var c=o.call(this,t,i),h=c[0],f=e(h);if(li(f,r),f.parent.m=-f.z,si(f,n),u)si(h,a);else{var d=h,p=h,m=h;si(h,function(t){t.xp.x&&(p=t),t.depth>m.depth&&(m=t)});var g=s(d,p)/2-d.x,v=l[0]/(p.x+s(p,d)/2+g),y=l[1]/(m.depth||1);si(h,function(t){t.x=(t.x+g)*v,t.y=t.depth*y})}return c}function e(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o0&&(Ri(Fi(o,t,r),t,n),u+=n,c+=n),h+=o.m,u+=i.m,f+=l.m,c+=a.m;o&&!Oi(a)&&(a.t=o,a.m+=h-c),i&&!Pi(l)&&(l.t=i,l.m+=u-f,r=t)}return r}function a(t){t.x*=l[0],t.y=t.depth*l[1]}var o=uo.layout.hierarchy().sort(null).value(null),s=Ii,l=[1,1],u=null;return t.separation=function(e){return arguments.length?(s=e,t):s},t.size=function(e){return arguments.length?(u=null==(l=e)?a:null,t):u?null:l},t.nodeSize=function(e){return arguments.length?(u=null==(l=e)?null:a,t):u?l:null},oi(t,o)},uo.layout.cluster=function(){function t(t,a){var o,s=e.call(this,t,a),l=s[0],u=0;li(l,function(t){var e=t.children;e&&e.length?(t.x=Bi(e),t.y=Ni(e)):(t.x=o?u+=r(t,o):0,t.y=0,o=t)});var c=Ui(l),h=Vi(l),f=c.x-r(c,h)/2,d=h.x+r(h,c)/2;return li(l,i?function(t){t.x=(t.x-l.x)*n[0],t.y=(l.y-t.y)*n[1]}:function(t){t.x=(t.x-f)/(d-f)*n[0],t.y=(1-(l.y?t.y/l.y:1))*n[1]}),s}var e=uo.layout.hierarchy().sort(null).value(null),r=Ii,n=[1,1],i=!1;return t.separation=function(e){return arguments.length?(r=e,t):r},t.size=function(e){return arguments.length?(i=null==(n=e),t):i?null:n},t.nodeSize=function(e){return arguments.length?(i=null!=(n=e),t):i?n:null},oi(t,e)},uo.layout.treemap=function(){function t(t,e){for(var r,n,i=-1,a=t.length;++i0;)c.push(o=f[l-1]),c.area+=o.area,"squarify"!==d||(s=n(c,m))<=p?(f.pop(),p=s):(c.area-=c.pop().area,i(c,m,u,!1),m=Math.min(u.dx,u.dy),c.length=c.area=0,p=1/0);c.length&&(i(c,m,u,!0),c.length=c.area=0),a.forEach(e)}}function r(e){var n=e.children;if(n&&n.length){var a,o=h(e),s=n.slice(),l=[];for(t(s,o.dx*o.dy/e.value),l.area=0;a=s.pop();)l.push(a),l.area+=a.area,null!=a.z&&(i(l,a.z?o.dx:o.dy,o,!s.length),l.length=l.area=0);n.forEach(r)}}function n(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++oi&&(i=r));return n*=n,e*=e,n?Math.max(e*i*p/n,n/(e*a*p)):1/0}function i(t,e,r,n){var i,a=-1,o=t.length,s=r.x,u=r.y,c=e?l(t.area/e):0;if(e==r.dx){for((n||c>r.dy)&&(c=r.dy);++ar.dx)&&(c=r.dx);++a1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=uo.random.normal.apply(uo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=uo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;rh?0:1;if(u=Uo)return e(u,d)+(t?e(t,1-d):"")+"Z";var p,m,g,v,y,b,x,_,w,M,A,k,T=0,S=0,E=[];if((v=(+l.apply(this,arguments)||0)/2)&&(g=a===Cl?Math.sqrt(t*t+u*u):+a.apply(this,arguments),d||(S*=-1),u&&(S=nt(g/u*Math.sin(v))),t&&(T=nt(g/t*Math.sin(v)))),u){y=u*Math.cos(c+S),b=u*Math.sin(c+S),x=u*Math.cos(h-S),_=u*Math.sin(h-S);var L=Math.abs(h-c-2*S)<=No?0:1;if(S&&ba(y,b,x,_)===d^L){var C=(c+h)/2;y=u*Math.cos(C),b=u*Math.sin(C),x=_=null}}else y=b=0;if(t){w=t*Math.cos(h-T),M=t*Math.sin(h-T),A=t*Math.cos(c+T),k=t*Math.sin(c+T);var D=Math.abs(c-h+2*T)<=No?0:1;if(T&&ba(w,M,A,k)===1-d^D){var z=(c+h)/2;w=t*Math.cos(z),M=t*Math.sin(z),A=k=null}}else w=M=0;if(f>jo&&(p=Math.min(Math.abs(u-t)/2,+i.apply(this,arguments)))>.001){m=tNo)+",1 "+e}function i(t,e,r,n){return"Q 0,0 "+n}var a=xr,o=_r,s=qa,l=ga,u=va;return t.radius=function(e){return arguments.length?(s=Et(e),t):s},t.source=function(e){return arguments.length?(a=Et(e),t):a},t.target=function(e){return arguments.length?(o=Et(e),t):o},t.startAngle=function(e){return arguments.length?(l=Et(e),t):l},t.endAngle=function(e){return arguments.length?(u=Et(e),t):u},t},uo.svg.diagonal=function(){function t(t,i){var a=e.call(this,t,i),o=r.call(this,t,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return l=l.map(n),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=xr,r=_r,n=Ga;return t.source=function(r){return arguments.length?(e=Et(r),t):e},t.target=function(e){return arguments.length?(r=Et(e),t):r},t.projection=function(e){return arguments.length?(n=e,t):n},t},uo.svg.diagonal.radial=function(){var t=uo.svg.diagonal(),e=Ga,r=t.projection;return t.projection=function(t){return arguments.length?r(Ya(e=t)):e},t},uo.svg.symbol=function(){function t(t,n){return(Ol.get(e.call(this,t,n))||Za)(r.call(this,t,n))}var e=Xa,r=Wa;return t.type=function(r){return arguments.length?(e=Et(r),t):e},t.size=function(e){return arguments.length?(r=Et(e),t):r},t};var Ol=uo.map({circle:Za,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*jl)),r=e*jl;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Rl),r=e*Rl/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Rl),r=e*Rl/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});uo.svg.symbolTypes=Ol.keys();var Rl=Math.sqrt(3),jl=Math.tan(30*Ho);Lo.transition=function(t){for(var e,r,n=Fl||++Vl,i=to(t),a=[],o=Nl||{time:Date.now(),ease:En,delay:0,duration:250},s=-1,l=this.length;++srect,.s>rect").attr("width",h[1]-h[0])}function i(t){t.select(".extent").attr("y",f[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function a(){function a(){32==uo.event.keyCode&&(L||(b=null,D[0]-=h[1],D[1]-=f[1],L=2),T())}function m(){32==uo.event.keyCode&&2==L&&(D[0]+=h[1],D[1]+=f[1],L=0,T())}function g(){var t=uo.mouse(_),n=!1;x&&(t[0]+=x[0],t[1]+=x[1]),L||(uo.event.altKey?(b||(b=[(h[0]+h[1])/2,(f[0]+f[1])/2]),D[0]=h[+(t[0]=2)return!1;t[r]=n}return!0}):w.filter(function(t){for(var e=0;e<=o;++e){var r=y[t[e]];if(r<0)return!1;t[e]=r}return!0}),1&o)for(var h=0;h>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t("buffer").Buffer)},{buffer:67}],107:[function(t,e,r){"use strict";function n(t,e,r){var i=0|t[r];if(i<=0)return[];var a,o=new Array(i);if(r===t.length-1)for(a=0;a0)return i(0|t,e);break;case"object":if("number"==typeof t.length)return n(t,e,0)}return[]}e.exports=a},{}],108:[function(t,e,r){"use strict";function n(t,e,r){r=r||2;var n=e&&e.length,a=n?e[0]*r:t.length,s=i(t,0,a,r,!0),l=[];if(!s)return l;var u,c,f,d,p,m,g;if(n&&(s=h(t,e,s,r)),t.length>80*r){u=f=t[0],c=d=t[1];for(var v=r;vf&&(f=p),m>d&&(d=m);g=Math.max(f-u,d-c)}return o(s,l,r,u,c,g),l}function i(t,e,r,n,i){var a,o;if(i===D(t,e,r,n)>0)for(a=e;a=e;a-=n)o=E(a,t[a],t[a+1],o);return o&&w(o,o.next)&&(L(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!w(n,n.next)&&0!==_(n.prev,n,n.next))n=n.next;else{if(L(n),(n=e=n.prev)===n.next)return null;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,h,f){if(t){!f&&h&&m(t,n,i,h);for(var d,p,g=t;t.prev!==t.next;)if(d=t.prev,p=t.next,h?l(t,n,i,h):s(t))e.push(d.i/r),e.push(t.i/r),e.push(p.i/r),L(t),t=p.next,g=p.next;else if((t=p)===g){f?1===f?(t=u(t,e,r),o(t,e,r,n,i,h,2)):2===f&&c(t,e,r,n,i,h):o(a(t),e,r,n,i,h,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(_(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(b(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&_(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(_(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,h=v(s,l,e,r,n),f=v(u,c,e,r,n),d=t.nextZ;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&b(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&b(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function u(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!w(i,a)&&M(i,n,n.next,a)&&k(i,a)&&k(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),L(n),L(n.next),n=t=a),n=n.next}while(n!==t);return n}function c(t,e,r,n,i,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&x(l,u)){var c=S(l,u);return l=a(l,l.next),c=a(c,c.next),o(l,e,r,n,i,s),void o(c,e,r,n,i,s)}u=u.next}l=l.next}while(l!==t)}function h(t,e,r,n){var o,s,l,u,c,h=[];for(o=0,s=e.length;o=n.next.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&b(ar.x)&&k(n,t)&&(r=n,f=l),n=n.next;return r}function m(t,e,r,n){var i=t;do{null===i.z&&(i.z=v(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(t){var e,r,n,i,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0===s?(i=n,n=n.nextZ,l--):0!==l&&n?r.z<=n.z?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,s--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return t}function v(t,e,r,n,i){return t=32767*(t-r)/i,e=32767*(e-n)/i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function y(t){var e=t,r=t;do{e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function x(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!A(t,e)&&k(t,e)&&k(e,t)&&T(t,e)}function _(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function M(t,e,r,n){return!!(w(t,e)&&w(r,n)||w(t,n)&&w(r,e))||_(t,e,r)>0!=_(t,e,n)>0&&_(r,n,t)>0!=_(r,n,e)>0}function A(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&M(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function k(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function T(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}function S(t,e){var r=new C(t.i,t.x,t.y),n=new C(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function E(t,e,r,n){var i=new C(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function L(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function C(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function D(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],109:[function(t,e,r){"use strict";function n(t,e){var r=t.length;if("number"!=typeof e){e=0;for(var n=0;n0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,a,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],a=r.length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},{}],112:[function(t,e,r){"use strict";function n(t,e,r){var n=e||0,i=r||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[i*t[12]-t[8],i*t[13]-t[9],i*t[14]-t[10],i*t[15]-t[11]]]}e.exports=n},{}],113:[function(t,e,r){"use strict";function n(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}e.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0===(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},{}],114:[function(t,e,r){"use strict";function n(t){return new Function("f","var p = (f && f.properties || {}); return "+i(t))}function i(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?o(t[1],t[2],"===",!1):"!="===e?o(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?o(t[1],t[2],e,!0):"any"===e?s(t.slice(1),"||"):"all"===e?s(t.slice(1),"&&"):"none"===e?c(s(t.slice(1),"||")):"in"===e?l(t[1],t.slice(2)):"!in"===e?c(l(t[1],t.slice(2))):"has"===e?u(t[1]):"!has"===e?c(u([t[1]])):"true")+")"}function a(t){return"$type"===t?"f.type":"$id"===t?"f.id":"p["+JSON.stringify(t)+"]"}function o(t,e,r,n){var i=a(t),o="$type"===t?f.indexOf(e):JSON.stringify(e);return(n?"typeof "+i+"=== typeof "+o+"&&":"")+i+r+o}function s(t,e){return t.map(i).join(e)}function l(t,e){"$type"===t&&(e=e.map(function(t){return f.indexOf(t)}));var r=JSON.stringify(e.sort(h)),n=a(t);return e.length<=200?r+".indexOf("+n+") !== -1":"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }("+n+", "+r+",0,"+(e.length-1)+")"}function u(t){return JSON.stringify(t)+" in p"}function c(t){return"!("+t+")"}function h(t,e){return te?1:0}e.exports=n;var f=["Unknown","Point","LineString","Polygon"]},{}],115:[function(t,e,r){"use strict";function n(t,e,r){return Math.min(e,Math.max(t,r))}function i(t,e,r){this.dimension=t.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n=r-1)for(var f=o.length-1,p=t-e[r-1],d=0;d=r-1)for(var c=a.length-1,h=(e[r-1],0);h=0;--r)if(t[--e])return!1;return!0},u.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--h)i.push(n(l[h-1],u[h-1],arguments[h])),a.push(0)}},u.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var f=r;f>0;--f){var d=n(u[f-1],c[f-1],arguments[f]);i.push(d),a.push((d-i[o++])*h)}}},u.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(n(o[l-1],s[l-1],arguments[l])),i.push(0)}},u.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var i=this._state,a=this._velocity,o=i.length-this.dimension,s=this.bounds,l=s[0],u=s[1],c=t-e,h=c>1e-6?1/c:0;this._time.push(t);for(var f=r;f>0;--f){var d=arguments[f];i.push(n(l[f-1],u[f-1],i[o++]+d)),a.push(d*h)}}},u.idle=function(t){var e=this.lastT();if(!(t=0;--h)i.push(n(l[h],u[h],i[o]+c*a[o])),a.push(0),o+=1}}},{"binary-search-bounds":56,"cubic-hermite":99}],116:[function(t,e,r){"use strict";function n(t){t=t||{};var e,r,n=t.canvas||document.createElement("canvas"),a=t.family||"monospace",o=t.shape||[512,512],s=t.step||[32,32],l=t.size||16,u=t.chars||[32,126],c=Math.floor((s[0]-l)/2),h=t.radius||1.5*c,f=new i(l,c,h,0,a);if("number"==typeof l&&(l+="px"),Array.isArray(u)){if(2===u.length&&"number"==typeof u[0]&&"number"==typeof u[1]){var d=[];for(e=u[0],r=0;e<=u[1];e++)d[r++]=String.fromCharCode(e);u=d}}else u=String(u).split("");o=o.slice(),n.width=o[0],n.height=o[1];var p=n.getContext("2d");p.fillStyle="#000",p.fillRect(0,0,n.width,n.height),p.font=l+" "+a,p.textBaseline="middle";var m=0,g=0,v=Math.min(u.length,Math.floor(o[0]/s[0])*Math.ceil(o[1]/s[1])),y=f.ctx.textAlign,b=f.buffer;for(f.ctx.textAlign="center",f.buffer=f.size/2,e=0;eo[0]-s[0]&&(m=0,g+=s[1])}return f.ctx.textAlign=y,f.buffer=b,n}var i=t("tiny-sdf");e.exports=n},{"tiny-sdf":510}],117:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function i(t){return new n(t._color,t.key,t.value,t.left,t.right,t._count)}function a(t,e){return new n(t,e.key,e.value,e.left,e.right,e._count)}function o(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function s(t,e){this._compare=t,this.root=e}function l(t,e){if(e.left){var r=l(t,e.left);if(r)return r}var r=t(e.key,e.value);return r||(e.right?l(t,e.right):void 0)}function u(t,e,r,n){if(e(t,n.key)<=0){if(n.left){var i=u(t,e,r,n.left);if(i)return i}var i=r(n.key,n.value);if(i)return i}if(n.right)return u(t,e,r,n.right)}function c(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=c(t,e,r,n,i.left)))return a;if(s>0&&(a=n(i.key,i.value)))return a}if(s>0&&i.right)return c(t,e,r,n,i.right)}function h(t,e){this.tree=t,this._stack=e}function f(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t){for(var e,r,n,s,l=t.length-1;l>=0;--l){if(e=t[l],0===l)return void(e._color=v);if(r=t[l-1],r.left===e){if(n=r.right,n.right&&n.right._color===g){if(n=r.right=i(n),s=n.right=i(n.right),r.right=n.left,n.left=r,n.right=s,n._color=r._color,e._color=v,r._color=v,s._color=v,o(r),o(n),l>1){var u=t[l-2];u.left===r?u.left=n:u.right=n}return void(t[l-1]=n)}if(n.left&&n.left._color===g){if(n=r.right=i(n),s=n.left=i(n.left),r.right=s.left,n.left=s.right,s.left=r,s.right=n,s._color=r._color,r._color=v,n._color=v,e._color=v,o(r),o(n),o(s),l>1){var u=t[l-2];u.left===r?u.left=s:u.right=s}return void(t[l-1]=s)}if(n._color===v){if(r._color===g)return r._color=v,void(r.right=a(g,n));r.right=a(g,n);continue}if(n=i(n),r.right=n.left,n.left=r,n._color=r._color,r._color=g,o(r),o(n),l>1){var u=t[l-2];u.left===r?u.left=n:u.right=n}t[l-1]=n,t[l]=r,l+11){var u=t[l-2];u.right===r?u.right=n:u.left=n}return void(t[l-1]=n)}if(n.right&&n.right._color===g){if(n=r.left=i(n),s=n.right=i(n.right),r.left=s.right,n.right=s.left,s.right=r,s.left=n,s._color=r._color,r._color=v,n._color=v,e._color=v,o(r),o(n),o(s),l>1){var u=t[l-2];u.right===r?u.right=s:u.left=s}return void(t[l-1]=s)}if(n._color===v){if(r._color===g)return r._color=v,void(r.left=a(g,n));r.left=a(g,n);continue}if(n=i(n),r.left=n.right,n.right=r,n._color=r._color,r._color=g,o(r),o(n),l>1){var u=t[l-2];u.right===r?u.right=n:u.left=n}t[l-1]=n,t[l]=r,l+1e?1:0}function m(t){return new s(t||p,null)}e.exports=m;var g=0,v=1,y=s.prototype;Object.defineProperty(y,"keys",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(y,"values",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(y,"length",{get:function(){return this.root?this.root._count:0}}),y.insert=function(t,e){for(var r=this._compare,i=this.root,l=[],u=[];i;){var c=r(t,i.key);l.push(i),u.push(c),i=c<=0?i.left:i.right}l.push(new n(g,t,e,null,null,1));for(var h=l.length-2;h>=0;--h){var i=l[h];u[h]<=0?l[h]=new n(i._color,i.key,i.value,l[h+1],i.right,i._count+1):l[h]=new n(i._color,i.key,i.value,i.left,l[h+1],i._count+1)}for(var h=l.length-1;h>1;--h){var f=l[h-1],i=l[h];if(f._color===v||i._color===v)break;var d=l[h-2];if(d.left===f)if(f.left===i){var p=d.right;if(!p||p._color!==g){if(d._color=g,d.left=f.right,f._color=v,f.right=d,l[h-2]=f,l[h-1]=i,o(d),o(f),h>=3){var m=l[h-3];m.left===d?m.left=f:m.right=f}break}f._color=v,d.right=a(v,p),d._color=g,h-=1}else{var p=d.right;if(!p||p._color!==g){if(f.right=i.left,d._color=g,d.left=i.right,i._color=v,i.left=f,i.right=d,l[h-2]=i,l[h-1]=f,o(d),o(f),o(i),h>=3){var m=l[h-3];m.left===d?m.left=i:m.right=i}break}f._color=v,d.right=a(v,p),d._color=g,h-=1}else if(f.right===i){var p=d.left;if(!p||p._color!==g){if(d._color=g,d.right=f.left,f._color=v,f.left=d,l[h-2]=f,l[h-1]=i,o(d),o(f),h>=3){var m=l[h-3];m.right===d?m.right=f:m.left=f}break}f._color=v,d.left=a(v,p),d._color=g,h-=1}else{var p=d.left;if(!p||p._color!==g){if(f.left=i.right,d._color=g,d.right=i.left,i._color=v,i.right=f,i.left=d,l[h-2]=i,l[h-1]=f,o(d),o(f),o(i),h>=3){var m=l[h-3];m.right===d?m.right=i:m.left=i}break}f._color=v,d.left=a(v,p),d._color=g,h-=1}}return l[0]._color=v,new s(r,l[0])},y.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return l(t,this.root);case 2:return u(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return c(e,r,this._compare,t,this.root)}},Object.defineProperty(y,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(y,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),y.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new h(this,[])},y.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},y.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},y.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},y.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},y.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new h(this,n);r=i<=0?r.left:r.right}return new h(this,[])},y.remove=function(t){var e=this.find(t);return e?e.remove():this},y.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var b=h.prototype;Object.defineProperty(b,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(b,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null}, -enumerable:!0}),b.clone=function(){return new h(this.tree,this._stack.slice())},b.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new n(r._color,r.key,r.value,r.left,r.right,r._count);for(var i=t.length-2;i>=0;--i){var r=t[i];r.left===t[i+1]?e[i]=new n(r._color,r.key,r.value,e[i+1],r.right,r._count):e[i]=new n(r._color,r.key,r.value,r.left,e[i+1],r._count)}if(r=e[e.length-1],r.left&&r.right){var a=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var o=e[a-1];e.push(new n(r._color,o.key,o.value,r.left,r.right,r._count)),e[a-1].key=r.key,e[a-1].value=r.value;for(var i=e.length-2;i>=a;--i)r=e[i],e[i]=new n(r._color,r.key,r.value,r.left,e[i+1],r._count);e[a-1].left=e[a]}if(r=e[e.length-1],r._color===g){var l=e[e.length-2];l.left===r?l.left=null:l.right===r&&(l.right=null),e.pop();for(var i=0;i0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(b,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(b,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),b.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(b,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),b.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var r=new Array(e.length),i=e[e.length-1];r[r.length-1]=new n(i._color,i.key,t,i.left,i.right,i._count);for(var a=e.length-2;a>=0;--a)i=e[a],i.left===e[a+1]?r[a]=new n(i._color,i.key,i.value,r[a+1],i.right,i._count):r[a]=new n(i._color,i.key,i.value,i.left,r[a+1],i._count);return new s(this.tree._compare,r[0])},b.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(b,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],118:[function(t,e,r){function n(t){if(t<0)return Number("0/0");for(var e=o[0],r=o.length-1;r>0;--r)e+=o[r]/(t+r);var n=t+a+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}var i=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],a=607/128,o=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(n(e));e-=1;for(var r=i[0],a=1;a<9;a++)r+=i[a]/(e+a);var o=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(o,e+.5)*Math.exp(-o)*r},e.exports.log=n},{}],119:[function(t,e,r){function n(t){if("Polygon"===t.type)return i(t.coordinates);if("MultiPolygon"===t.type){for(var e=0,r=0;r0){e+=Math.abs(a(t[0]));for(var r=1;r2){for(var r,n,i=0;i=0}var u=t("geojson-area");e.exports=n},{"geojson-area":119}],121:[function(t,e,r){"use strict";function n(t,e,r,n,o,l,u,c){if(r/=e,n/=e,u>=r&&c<=n)return t;if(u>n||c=r&&p<=n)h.push(m);else if(!(d>n||p=e&&s<=r&&i.push(o)}return i}function a(t,e,r,n,i,a){for(var s=[],l=0;lr?(x.push(i(u,p,e),i(u,p,r)),a||(x=o(s,x,g,v,y))):d>=e&&x.push(i(u,p,e)):f>r?dr&&(x.push(i(u,p,r)),a||(x=o(s,x,g,v,y))));u=m[b-1],f=u[n],f>=e&&f<=r&&x.push(u),h=x[x.length-1],a&&h&&(x[0][0]!==h[0]||x[0][1]!==h[1])&&x.push(x[0]),o(s,x,g,v,y)}return s}function o(t,e,r,n,i){return e.length&&(e.area=r,e.dist=n,void 0!==i&&(e.outer=i),t.push(e)),[]}e.exports=n;var s=t("./feature")},{"./feature":123}],122:[function(t,e,r){"use strict";function n(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n1?1:n,[r,n,0]}function s(t){for(var e,r,n=0,i=0,a=0;a1)return!1;var a=i.geometry[0].length;if(5!==a)return!1;for(var o=0;o1&&console.time("creation"),b=this.tiles[y]=p(t,v,r,n,x,e===d.maxZoom),this.tileCoords.push({z:e,x:r,y:n}),m)){m>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,n,b.numFeatures,b.numPoints,b.numSimplified),console.timeEnd("creation"));var _="z"+e;this.stats[_]=(this.stats[_]||0)+1,this.total++}if(b.source=t,i){if(e===d.maxZoom||e===i)continue;var w=1<1&&console.time("clipping");var M,A,k,T,S,E,L=.5*d.buffer/d.extent,C=.5-L,D=.5+L,z=1+L;M=A=k=T=null,S=f(t,v,r-L,r+D,0,o,b.min[0],b.max[0]),E=f(t,v,r+C,r+z,0,o,b.min[0],b.max[0]),S&&(M=f(S,v,n-L,n+D,1,s,b.min[1],b.max[1]),A=f(S,v,n+C,n+z,1,s,b.min[1],b.max[1])),E&&(k=f(E,v,n-L,n+D,1,s,b.min[1],b.max[1]),T=f(E,v,n+C,n+z,1,s,b.min[1],b.max[1])),m>1&&console.timeEnd("clipping"),t.length&&(h.push(M||[],e+1,2*r,2*n),h.push(A||[],e+1,2*r,2*n+1),h.push(k||[],e+1,2*r+1,2*n),h.push(T||[],e+1,2*r+1,2*n+1))}else i&&(g=e)}return g},i.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,o=n.debug,s=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var c,f=t,d=e,p=r;!c&&f>0;)f--,d=Math.floor(d/2),p=Math.floor(p/2),c=this.tiles[a(f,d,p)];if(!c||!c.source)return null;if(o>1&&console.log("found parent tile z%d-%d-%d",f,d,p),u(c,i,n.buffer))return h.tile(c,i);o>1&&console.time("drilling down");var m=this.splitTile(c.source,f,d,p,t,e,r);if(o>1&&console.timeEnd("drilling down"),null!==m){var g=1<n&&(o=r,n=a);n>s?(t[o][2]=n,h.push(u),h.push(o),u=o):(c=h.pop(),u=h.pop())}}function i(t,e,r){var n=e[0],i=e[1],a=r[0],o=r[1],s=t[0],l=t[1],u=a-n,c=o-i;if(0!==u||0!==c){var h=((s-n)*u+(l-i)*c)/(u*u+c*c);h>1?(n=a,i=o):h>0&&(n+=u*h,i+=c*h)}return u=s-n,c=l-i,u*u+c*c}e.exports=n},{}],126:[function(t,e,r){"use strict";function n(t,e,r,n,a,o){for(var s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z2:e,transformed:!1,min:[2,1],max:[-1,0]},l=0;ls.max[0]&&(s.max[0]=c[0]),c[1]>s.max[1]&&(s.max[1]=c[1])}return s}function i(t,e,r,n){var i,o,s,l,u=e.geometry,c=e.type,h=[],f=r*r;if(1===c)for(i=0;if)&&(d.push(l),t.numSimplified++),t.numPoints++;3===c&&a(d,s.outer),h.push(d)}else t.numPoints+=s.length;if(h.length){var p={geometry:h,type:c,tags:e.tags||null};null!==e.id&&(p.id=e.id),t.features.push(p)}}function a(t,e){o(t)<0===e&&t.reverse()}function o(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i0?(d[c]=-1,p[c]=0):(d[c]=0,p[c]=1)}}function s(t,e){var r=new i(t);return r.update(e),r}e.exports=s;var l=t("./lib/text.js"),u=t("./lib/lines.js"),c=t("./lib/background.js"),h=t("./lib/cube.js"),f=t("./lib/ticks.js"),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=i.prototype;p.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,n=e.bind(this,!1,Number),i=e.bind(this,!1,Boolean),a=e.bind(this,!1,String),o=e.bind(this,!0,function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]}),s=!1,c=!1;if("bounds"in t)for(var h=t.bounds,d=0;d<2;++d)for(var p=0;p<3;++p)h[d][p]!==this.bounds[d][p]&&(c=!0),this.bounds[d][p]=h[d][p];if("ticks"in t){r=t.ticks,s=!0,this.autoTicks=!1;for(var d=0;d<3;++d)this.tickSpacing[d]=0}else n("tickSpacing")&&(this.autoTicks=!0,c=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),c=!0,s=!0,this._firstInit=!1),c&&this.autoTicks&&(r=f.create(this.bounds,this.tickSpacing),s=!0),s){for(var d=0;d<3;++d)r[d].sort(function(t,e){return t.x-e.x});f.equal(r,this.ticks)?s=!1:this.ticks=r}i("tickEnable"),a("tickFont")&&(s=!0),n("tickSize"),n("tickAngle"),n("tickPad"),o("tickColor");var m=a("labels");a("labelFont")&&(m=!0),i("labelEnable"),n("labelSize"),n("labelPad"),o("labelColor"),i("lineEnable"),i("lineMirror"),n("lineWidth"),o("lineColor"),i("lineTickEnable"),i("lineTickMirror"),n("lineTickLength"),n("lineTickWidth"),o("lineTickColor"),i("gridEnable"),n("gridWidth"),o("gridColor"),i("zeroEnable"),o("zeroLineColor"),n("zeroLineWidth"),i("backgroundEnable"),o("backgroundColor"),this._text?this._text&&(m||s)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=l(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&s&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};var m=[new a,new a,new a],g=[0,0,0],v={model:d,view:d,projection:d};p.isOpaque=function(){return!0},p.isTransparent=function(){return!1},p.drawTransparent=function(t){};var y=[0,0,0],b=[0,0,0],x=[0,0,0];p.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||d,i=t.view||d,a=t.projection||d,s=this.bounds,l=h(r,i,a,s),u=l.cubeEdges,c=l.axis,f=i[12],p=i[13],_=i[14],w=i[15],M=this.pixelRatio*(a[3]*f+a[7]*p+a[11]*_+a[15]*w)/e.drawingBufferHeight,A=0;A<3;++A)this.lastCubeProps.cubeEdges[A]=u[A],this.lastCubeProps.axis[A]=c[A];for(var k=m,A=0;A<3;++A)o(m[A],A,this.bounds,u,c);for(var e=this.gl,T=g,A=0;A<3;++A)this.backgroundEnable[A]?T[A]=c[A]:T[A]=0;this._background.draw(r,i,a,s,T,this.backgroundColor),this._lines.bind(r,i,a,this);for(var A=0;A<3;++A){var S=[0,0,0];c[A]>0?S[A]=s[1][A]:S[A]=s[0][A];for(var E=0;E<2;++E){var L=(A+1+E)%3,C=(A+1+(1^E))%3;this.gridEnable[L]&&this._lines.drawGrid(L,C,this.bounds,S,this.gridColor[L],this.gridWidth[L]*this.pixelRatio)}for(var E=0;E<2;++E){var L=(A+1+E)%3,C=(A+1+(1^E))%3;this.zeroEnable[C]&&s[0][C]<=0&&s[1][C]>=0&&this._lines.drawZero(L,C,this.bounds,S,this.zeroLineColor[C],this.zeroLineWidth[C]*this.pixelRatio)}}for(var A=0;A<3;++A){this.lineEnable[A]&&this._lines.drawAxisLine(A,this.bounds,k[A].primalOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio),this.lineMirror[A]&&this._lines.drawAxisLine(A,this.bounds,k[A].mirrorOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio);for(var D=n(y,k[A].primalMinor),z=n(b,k[A].mirrorMinor),I=this.lineTickLength,E=0;E<3;++E){var P=M/r[5*E];D[E]*=I[E]*P,z[E]*=I[E]*P}this.lineTickEnable[A]&&this._lines.drawAxisTicks(A,k[A].primalOffset,D,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio),this.lineTickMirror[A]&&this._lines.drawAxisTicks(A,k[A].mirrorOffset,z,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio)}this._text.bind(r,i,a,this.pixelRatio);for(var A=0;A<3;++A){for(var O=k[A].primalMinor,R=n(x,k[A].primalOffset),E=0;E<3;++E)this.lineTickEnable[A]&&(R[E]+=M*O[E]*Math.max(this.lineTickLength[E],0)/r[5*E]);if(this.tickEnable[A]){for(var E=0;E<3;++E)R[E]+=M*O[E]*this.tickPad[E]/r[5*E];this._text.drawTicks(A,this.tickSize[A],this.tickAngle[A],R,this.tickColor[A])}if(this.labelEnable[A]){for(var E=0;E<3;++E)R[E]+=M*O[E]*this.labelPad[E]/r[5*E];R[A]+=.5*(s[0][A]+s[1][A]),this._text.drawLabel(A,this.labelSize[A],this.labelAngle[A],R,this.labelColor[A])}}},p.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":131,"./lib/cube.js":132,"./lib/lines.js":133,"./lib/text.js":135,"./lib/ticks.js":136}],131:[function(t,e,r){"use strict";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}function i(t){for(var e=[],r=[],i=0,l=0;l<3;++l)for(var u=(l+1)%3,c=(l+2)%3,h=[0,0,0],f=[0,0,0],d=-1;d<=1;d+=2){r.push(i,i+2,i+1,i+1,i+2,i+3),h[l]=d,f[l]=d;for(var p=-1;p<=1;p+=2){h[u]=p;for(var m=-1;m<=1;m+=2)h[c]=m,e.push(h[0],h[1],h[2],f[0],f[1],f[2]),i+=1}var g=u;u=c,c=g}var v=a(t,new Float32Array(e)),y=a(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),b=o(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],y),x=s(t);return x.attributes.position.location=0,x.attributes.normal.location=1,new n(t,v,b,x)}e.exports=i;var a=t("gl-buffer"),o=t("gl-vao"),s=t("./shaders").bg,l=n.prototype;l.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),l.disable(l.POLYGON_OFFSET_FILL)}},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":134,"gl-buffer":138,"gl-vao":252}],132:[function(t,e,r){"use strict";function n(t,e,r){for(var n=0;n<4;++n){t[n]=r[12+n];for(var i=0;i<3;++i)t[n]+=e[i]*r[4*i+n]}}function i(t){for(var e=0;eS&&(_|=1<S&&(_|=1<f[m][1]&&(O=m));for(var R=-1,m=0;m<3;++m){var j=O^1<f[F][0]&&(F=j)}}var N=g;N[0]=N[1]=N[2]=0,N[o.log2(R^O)]=O&R,N[o.log2(O^F)]=O&F;var B=7^F;B===_||B===P?(B=7^R,N[o.log2(F^B)]=B&F):N[o.log2(R^B)]=B&R;for(var U=v,V=_,A=0;A<3;++A)U[A]=V&1< 0.0) {\n vec3 nPosition = mix(bounds[0], bounds[1], 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n colorChannel = abs(normal);\n}","precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] + \n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}",null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":236}],135:[function(t,e,r){(function(r){"use strict";function n(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}function i(t,e){try{return l(t,e)}catch(t){return console.warn("error vectorizing text:",t),{cells:[],positions:[]}}}function a(t,e,r,i,a,l){var c=o(t),h=s(t,[{buffer:c,size:3}]),f=u(t);f.attributes.position.location=0;var d=new n(t,f,c,h);return d.update(e,r,i,a,l),d}e.exports=a;var o=t("gl-buffer"),s=t("gl-vao"),l=t("vectorize-text"),u=t("./shaders").text,c=window||r.global||{},h=c.__TEXT_CACHE||{};c.__TEXT_CACHE={};var f=n.prototype,d=[0,0];f.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},f.update=function(t,e,r,n,a){function o(t,e,r,n){var a=h[r];a||(a=h[r]={});var o=a[e];o||(o=a[e]=i(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle"}));for(var l=(n||12)/12,u=o.positions,c=o.cells,f=0,d=c.length;f=0;--m){var g=u[p[m]];s.push(l*g[0],-l*g[1],t)}}for(var s=(this.gl,[]),l=[0,0,0],u=[0,0,0],c=[0,0,0],f=[0,0,0],d=0;d<3;++d){c[d]=s.length/3|0,o(.5*(t[0][d]+t[1][d]),e[d],r),f[d]=(s.length/3|0)-c[d],l[d]=s.length/3|0;for(var p=0;p=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,u=o%a;o<0?(l=0|-Math.ceil(l),u=0|-u):(l=0|Math.floor(l),u|=0);var c=""+l;if(o<0&&(c="-"+c),i){for(var h=""+u;h.length=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r}function a(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function a(t,e){for(var r=l.malloc(t.length,e),n=t.length,i=0;i=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}function s(t,e,r,i){if(r=r||t.ARRAY_BUFFER,i=i||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(i!==t.DYNAMIC_DRAW&&i!==t.STATIC_DRAW&&i!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var a=t.createBuffer(),o=new n(t,r,a,0,i);return o.update(e),o}var l=t("typedarray-pool"),u=t("ndarray-ops"),c=t("ndarray"),h=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"],f=n.prototype;f.bind=function(){this.gl.bindBuffer(this.type,this.handle)},f.unbind=function(){this.gl.bindBuffer(this.type,null)},f.dispose=function(){this.gl.deleteBuffer(this.handle)},f.update=function(t,e){if("number"!=typeof e&&(e=-1),this.bind(),"object"==typeof t&&void 0!==t.shape){var r=t.dtype;if(h.indexOf(r)<0&&(r="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){r=gl.getExtension("OES_element_index_uint")&&"uint16"!==r?"uint32":"uint16"}if(r===t.dtype&&o(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=i(this.gl,this.type,this.length,this.usage,t.data,e):this.length=i(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var n=l.malloc(t.size,r),s=c(n,t.shape);u.assign(s,t),this.length=e<0?i(this.gl,this.type,this.length,this.usage,n,e):i(this.gl,this.type,this.length,this.usage,n.subarray(0,t.size),e),l.free(n)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?a(t,"uint16"):a(t,"float32"),this.length=e<0?i(this.gl,this.type,this.length,this.usage,f,e):i(this.gl,this.type,this.length,this.usage,f.subarray(0,t.length),e),l.free(f)}else if("object"==typeof t&&"number"==typeof t.length)this.length=i(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");t|=0,t<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=s},{ndarray:446,"ndarray-ops":440,"typedarray-pool":518}],139:[function(t,e,r){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],140:[function(t,e,r){var n=t("./1.0/numbers");e.exports=function(t){return n[t]}},{"./1.0/numbers":139}],141:[function(t,e,r){"use strict";function n(t,e,r,n){this.plot=t,this.shader=e,this.bufferHi=r,this.bufferLo=n,this.bounds=[1/0,1/0,-1/0,-1/0],this.numPoints=0,this.color=[0,0,0,1]}function i(t,e){var r=a(t.gl,l.vertex,l.fragment),i=o(t.gl),s=o(t.gl),u=new n(t,r,i,s);return u.update(e),t.addObject(u),u}var a=t("gl-shader"),o=t("gl-buffer"),s=t("typedarray-pool"),l=t("./lib/shaders");e.exports=i;var u=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]],c=n.prototype;c.draw=function(){var t=new Float32Array([0,0]),e=new Float32Array([0,0]),r=new Float32Array([0,0]),n=new Float32Array([0,0]),i=[1,1];return function(){var a=this.plot,o=this.shader,s=this.bounds,l=this.numPoints;if(l){var c=a.gl,h=a.dataBox,f=a.viewBox,d=a.pixelRatio,p=s[2]-s[0],m=s[3]-s[1],g=h[2]-h[0],v=h[3]-h[1],y=2*p/g,b=2*m/v,x=(s[0]-h[0]-.5*g)/p,_=(s[1]-h[1]-.5*v)/m;t[0]=y,t[1]=b,e[0]=y-t[0],e[1]=b-t[1],r[0]=x,r[1]=_,n[0]=x-r[0],n[1]=_-r[1];var w=f[2]-f[0],M=f[3]-f[1];i[0]=2*d/w,i[1]=2*d/M,o.bind(),o.uniforms.scaleHi=t,o.uniforms.scaleLo=e,o.uniforms.translateHi=r,o.uniforms.translateLo=n,o.uniforms.pixelScale=i,o.uniforms.color=this.color,this.bufferLo.bind(),o.attributes.positionLo.pointer(c.FLOAT,!1,16,0),this.bufferHi.bind(),o.attributes.positionHi.pointer(c.FLOAT,!1,16,0),o.attributes.pixelOffset.pointer(c.FLOAT,!1,16,8),c.drawArrays(c.TRIANGLES,0,l*u.length)}}}(),c.drawPick=function(t){return t},c.pick=function(){return null},c.update=function(t){t=t||{};var e,r,n,i=t.positions||[],a=t.errors||[],o=1;"lineWidth"in t&&(o=+t.lineWidth);var l=5;"capSize"in t&&(l=+t.capSize),this.color=(t.color||[0,0,0,1]).slice();var c=this.bounds=[1/0,1/0,-1/0,-1/0],h=this.numPoints=i.length>>1;for(e=0;e0&&(T*=_),S<0?S*=w:S>0&&(S*=M),g[b++]=f*(r-p+T),g[b++]=d*(n-m+S),g[b++]=o*k[2]+(l+o)*k[4],g[b++]=o*k[3]+(l+o)*k[5]}}for(e=0;e=1},h.isTransparent=function(){return this.opacity<1},h.drawTransparent=h.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||c,i=r.projection=t.projection||c;r.model=t.model||c,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],o=n[13],s=n[14],l=n[15],u=this.pixelRatio*(i[3]*a+i[7]*o+i[11]*s+i[15]*l)/e.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)e.lineWidth(this.lineWidth[h]),r.capSize=this.capSize[h]*u,e.drawArrays(e.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var f=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=(n+e)%3,o=[0,0,0];o[a]=i,r.push(o)}t[e]=r}return t}();h.update=function(t){t=t||{},"lineWidth"in t&&(this.lineWidth=t.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in t&&(this.capSize=t.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),"opacity"in t&&(this.opacity=t.opacity);var e=t.color||[[0,0,0],[0,0,0],[0,0,0]],r=t.position,n=t.error;if(Array.isArray(e[0])||(e=[e,e,e]),r&&n){var o=[],s=r.length,l=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var u=0;u<3;++u){this.lineOffset[u]=l;t:for(var c=0;c0){var m=h.slice();m[u]+=d[1][u],o.push(h[0],h[1],h[2],p[0],p[1],p[2],p[3],0,0,0,m[0],m[1],m[2],p[0],p[1],p[2],p[3],0,0,0),i(this.bounds,m),l+=2+a(o,m,p,u)}}}this.lineCount[u]=l-this.lineOffset[u]}this.buffer.update(o)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":144,"gl-buffer":138,"gl-vao":252}],144:[function(t,e,r){"use strict";var n=t("gl-shader");e.exports=function(t){return n(t,"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}","precision mediump float;\n#define GLSLIFY 1\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if(any(lessThan(fragPosition, clipBounds[0])) || any(greaterThan(fragPosition, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = opacity * fragColor;\n}",null,[{name:"position",type:"vec3"},{name:"offset",type:"vec3"},{name:"color",type:"vec4"}])}},{"gl-shader":236}],145:[function(t,e,r){"use strict";function n(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function i(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function a(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);y=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;a1&&f.drawBuffersWEBGL(y[h]);var v=r.getExtension("WEBGL_depth_texture");v?d?t.depth=s(r,u,c,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p&&(t.depth=s(r,u,c,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):p&&d?t._depth_rb=l(r,u,c,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p?t._depth_rb=l(r,u,c,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=l(r,u,c,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var b=r.checkFramebufferStatus(r.FRAMEBUFFER);if(b!==r.FRAMEBUFFER_COMPLETE){t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null);for(var g=0;gs||r<0||r>s)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var l=n(a),u=0;uo||r<0||r>o)throw new Error("gl-fbo: Parameters are too large for FBO");n=n||{};var s=1;if("color"in n){if((s=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(s>1){if(!i)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(s>t.getParameter(i.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+s+" draw buffers")}}var l=t.UNSIGNED_BYTE,u=t.getExtension("OES_texture_float");if(n.float&&s>0){if(!u)throw new Error("gl-fbo: Context does not support floating point textures");l=t.FLOAT}else n.preferFloat&&s>0&&u&&(l=t.FLOAT);var h=!0;"depth"in n&&(h=!!n.depth);var f=!1;return"stencil"in n&&(f=!!n.stencil),new c(t,e,r,l,s,h,f,i)}var d=t("gl-texture2d");e.exports=f;var p,m,g,v,y=null,b=c.prototype;Object.defineProperties(b,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(t){if(Array.isArray(t)||(t=[0|t,0|t]),2!==t.length)throw new Error("gl-fbo: Shape vector must be length 2");var e=0|t[0],r=0|t[1];return h(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return t|=0,h(this,t,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t},enumerable:!1}}),b.bind=function(){if(!this._destroyed){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.handle),t.viewport(0,0,this._shape[0],this._shape[1])}},b.dispose=function(){if(!this._destroyed){this._destroyed=!0;var t=this.gl;t.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(t.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var e=0;e>8*d&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=t,p.pickOffset=e,p.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),h.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},h.update=function(t){t=t||{};var e=t.shape||[0,0],r=t.x||o(e[0]),n=t.y||o(e[1]),i=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=n;var l=t.colorLevels||[0],u=t.colorValues||[0,0,0,1],c=l.length,h=this.bounds,d=h[0]=r[0],p=h[1]=n[0],m=h[2]=r[r.length-1],g=h[3]=n[n.length-1],v=1/(m-d),y=1/(g-p),b=e[0],x=e[1];this.shape=[b,x];var _=(b-1)*(x-1)*(f.length>>>1);this.numVertices=_;for(var w=s.mallocUint8(4*_),M=s.mallocFloat32(2*_),A=s.mallocUint8(2*_),k=s.mallocUint32(_),T=0,S=0;S2&&!this.usingDashes){var b=this.mitreShader;this.lineBufferLo.bind(),b.attributes.aLo.pointer(l.FLOAT,!1,48,0),this.lineBufferHi.bind(),b.bind();var x=b.uniforms;this.setProjectionUniforms(x,a),x.color=c,x.radius=s*u,b.attributes.aHi.pointer(l.FLOAT,!1,48,0),l.drawArrays(l.POINTS,0,i/3|0)}}}}(),f.drawPick=function(){var t=[0,0,0,0];return function(e){var r=this.vertCount,n=this.numPoints;if(this.pickOffset=e,!r)return e+n;var i=this.setProjectionModel(),a=this.plot,o=this.width,s=a.gl,l=a.pickPixelRatio,u=this.pickShader,c=this.pickBuffer;t[0]=255&e,t[1]=e>>>8&255,t[2]=e>>>16&255,t[3]=e>>>24,u.bind();var h=u.uniforms;this.setProjectionUniforms(h,i),h.width=o*l,h.pickOffset=t;var f=u.attributes;return this.lineBufferHi.bind(),f.aHi.pointer(s.FLOAT,!1,16,0),f.dHi.pointer(s.FLOAT,!1,16,8),this.lineBufferLo.bind(),f.aLo.pointer(s.FLOAT,!1,16,0),c.bind(),f.pick0.pointer(s.UNSIGNED_BYTE,!1,8,0),f.pick1.pointer(s.UNSIGNED_BYTE,!1,8,4),s.drawArrays(s.TRIANGLES,0,r),e+n}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.numPoints;if(r=n+i)return null;var a=r-n,o=this.data;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}},f.update=function(t){t=t||{};var e,r,n,a,o,s=this.plot.gl;this.color=(t.color||[0,0,1,1]).slice(),this.width=+(t.width||1),this.fill=(t.fill||[!1,!1,!1,!1]).slice(),this.fillColor=i(t.fillColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var h=t.dashes||[1],f=0;for(e=0;e1,this.dashPattern=l(s,u(d,[f,1,4],[1,0,0])),this.dashPattern.minFilter=s.NEAREST,this.dashPattern.magFilter=s.NEAREST,this.dashLength=f,c.free(d);var m=t.positions;this.data=m;var g=this.bounds;g[0]=g[1]=1/0,g[2]=g[3]=-1/0;var v=this.numPoints=m.length>>>1;if(0!==v){for(e=0;e1;){var k=--n;a=m[2*n],o=m[2*n+1];var T=k-1,S=m[2*T],E=m[2*T+1];if(!(isNaN(a)||isNaN(o)||isNaN(S)||isNaN(E))){A+=1,a=(a-g[0])/(g[2]-g[0]),o=(o-g[1])/(g[3]-g[1]),S=(S-g[0])/(g[2]-g[0]),E=(E-g[1])/(g[3]-g[1]);var L=S-a,C=E-o,D=k|1<<24,z=k-1,I=k,P=k-1|1<<24;y[--w]=-C,y[--w]=-L,y[--w]=o,y[--w]=a,_[--M]=D,_[--M]=z,y[--w]=C,y[--w]=L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=-C,y[--w]=-L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=C,y[--w]=L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=-C,y[--w]=-L,y[--w]=o,y[--w]=a,_[--M]=D,_[--M]=z,y[--w]=C,y[--w]=L,y[--w]=o,y[--w]=a,_[--M]=D,_[--M]=z}}for(e=0;e FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n highp float e = floor(log2(av));\n highp float m = av * pow(2.0, -e) - 1.0;\n \n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n \n //Unpack exponent\n highp float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0; \n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\n\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if(any(lessThan(worldPosition, clipBounds[0])) || any(greaterThan(worldPosition, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = vec4(pickId/255.0, encode_float_1_0(pixelArcLength).xyz);\n}",null,a)}},{"gl-shader":236}],153:[function(t,e,r){"use strict";function n(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function i(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function a(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function o(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.dirty=!0,this.pixelRatio=1}function s(t){var e=t.gl||t.scene&&t.scene.gl,r=m(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var n=g(e);n.attributes.position.location=0,n.attributes.nextPosition.location=1,n.attributes.arcLength.location=2,n.attributes.lineWidth.location=3,n.attributes.color.location=4;for(var i=l(e),a=u(e,[{buffer:i,size:3,offset:0,stride:48},{buffer:i,size:3,offset:12,stride:48},{buffer:i,size:1,offset:24,stride:48},{buffer:i,size:1,offset:28,stride:48},{buffer:i,size:4,offset:32,stride:48}]),s=d(new Array(1024),[256,1,4]),h=0;h<1024;++h)s.data[h]=255;var f=c(e,s);f.wrap=e.REPEAT;var p=new o(e,r,n,i,a,f);return p.update(t),p}e.exports=s;var l=t("gl-buffer"),u=t("gl-vao"),c=t("gl-texture2d"),h=t("glsl-read-float"),f=t("binary-search-bounds"),d=t("ndarray"),p=t("./lib/shaders"),m=p.createShader,g=p.createPickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],y=o.prototype;y.isTransparent=function(){return this.opacity<1},y.isOpaque=function(){return this.opacity>=1},y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.drawTransparent=y.draw=function(t){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||v,view:t.view||v,projection:t.projection||v,clipBounds:i(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},y.drawPick=function(t){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||v,view:t.view||v,projection:t.projection||v,pickId:this.pickId,clipBounds:i(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},y.update=function(t){var e,r;this.dirty=!0;var i=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),"opacity"in t&&(this.opacity=+t.opacity);var a=t.position||t.positions;if(a){var o=t.color||t.colors||[0,0,0,1],s=t.lineWidth||1,l=[],u=[],c=[],h=0,p=0,m=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],g=!1;t:for(e=1;e0){for(var b=0;b<24;++b)l.push(l[l.length-12]);p+=2,g=!0}continue t}m[0][r]=Math.min(m[0][r],v[r],y[r]),m[1][r]=Math.max(m[1][r],v[r],y[r])}var x,_;Array.isArray(o[0])?(x=o[e-1],_=o[e]):x=_=o,3===x.length&&(x=[x[0],x[1],x[2],1]),3===_.length&&(_=[_[0],_[1],_[2],1]);var w;w=Array.isArray(s)?s[e-1]:s;var M=h;if(h+=n(v,y),g){for(r=0;r<2;++r)l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,x[0],x[1],x[2],x[3]);p+=2,g=!1}l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,x[0],x[1],x[2],x[3],v[0],v[1],v[2],y[0],y[1],y[2],M,-w,x[0],x[1],x[2],x[3],y[0],y[1],y[2],v[0],v[1],v[2],h,-w,_[0],_[1],_[2],_[3],y[0],y[1],y[2],v[0],v[1],v[2],h,w,_[0],_[1],_[2],_[3]),p+=4}if(this.buffer.update(l),u.push(h),c.push(a[a.length-1].slice()),this.bounds=m,this.vertexCount=p,this.points=c,this.arcLength=u,"dashes"in t){var A=t.dashes,k=A.slice();for(k.unshift(0),e=1;e0?(n=2*Math.sqrt(r+1),t[3]=.25*n,t[0]=(e[6]-e[9])/n,t[1]=(e[8]-e[2])/n,t[2]=(e[1]-e[4])/n):e[0]>e[5]&e[0]>e[10]?(n=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/n,t[0]=.25*n,t[1]=(e[1]+e[4])/n,t[2]=(e[8]+e[2])/n):e[5]>e[10]?(n=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/n,t[0]=(e[1]+e[4])/n,t[1]=.25*n,t[2]=(e[6]+e[9])/n):(n=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/n,t[0]=(e[8]+e[2])/n,t[1]=(e[6]+e[9])/n,t[2]=.25*n),t},i.fromRotationTranslationScale=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3],l=i+i,u=a+a,c=o+o,h=i*l,f=i*u,d=i*c,p=a*u,m=a*c,g=o*c,v=s*l,y=s*u,b=s*c,x=n[0],_=n[1],w=n[2];return t[0]=(1-(p+g))*x,t[1]=(f+b)*x,t[2]=(d-y)*x,t[3]=0,t[4]=(f-b)*_,t[5]=(1-(h+g))*_,t[6]=(m+v)*_,t[7]=0,t[8]=(d+y)*w,t[9]=(m-v)*w,t[10]=(1-(h+p))*w,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},i.fromRotationTranslationScaleOrigin=function(t,e,r,n,i){var a=e[0],o=e[1],s=e[2],l=e[3],u=a+a,c=o+o,h=s+s,f=a*u,d=a*c,p=a*h,m=o*c,g=o*h,v=s*h,y=l*u,b=l*c,x=l*h,_=n[0],w=n[1],M=n[2],A=i[0],k=i[1],T=i[2];return t[0]=(1-(m+v))*_,t[1]=(d+x)*_,t[2]=(p-b)*_,t[3]=0,t[4]=(d-x)*w,t[5]=(1-(f+v))*w,t[6]=(g+y)*w,t[7]=0,t[8]=(p+b)*M,t[9]=(g-y)*M,t[10]=(1-(f+m))*M,t[11]=0,t[12]=r[0]+A-(t[0]*A+t[4]*k+t[8]*T),t[13]=r[1]+k-(t[1]*A+t[5]*k+t[9]*T),t[14]=r[2]+T-(t[2]*A+t[6]*k+t[10]*T),t[15]=1,t},i.fromQuat=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,h=n*s,f=i*o,d=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return t[0]=1-h-p,t[1]=c+v,t[2]=f-g,t[3]=0,t[4]=c-v,t[5]=1-u-p,t[6]=d+m,t[7]=0,t[8]=f+g,t[9]=d-m,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.frustum=function(t,e,r,n,i,a,o){var s=1/(r-e),l=1/(i-n),u=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(o+a)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*u,t[15]=0,t},i.perspective=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t},i.perspectiveFromFieldOfView=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-((o-s)*l)*.5,t[9]=(i-a)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t},i.ortho=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t},i.lookAt=function(t,e,r,a){var o,s,l,u,c,h,f,d,p,m,g=e[0],v=e[1],y=e[2],b=a[0],x=a[1],_=a[2],w=r[0],M=r[1],A=r[2];return Math.abs(g-w).999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(a.cross(t,i,o),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=1+l,s.normalize(n,n))}}(),s.setAxes=function(){var t=i.create();return function(e,r,n,i){return t[0]=n[0],t[3]=n[1],t[6]=n[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],s.normalize(e,s.fromMat3(e,t))}}(),s.clone=o.clone,s.fromValues=o.fromValues,s.copy=o.copy,s.set=o.set,s.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},s.setAxisAngle=function(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t},s.getAxisAngle=function(t,e){var r=2*Math.acos(e[3]),n=Math.sin(r/2);return 0!=n?(t[0]=e[0]/n,t[1]=e[1]/n,t[2]=e[2]/n):(t[0]=1,t[1]=0,t[2]=0),r},s.add=o.add,s.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1],u=r[2],c=r[3];return t[0]=n*c+o*s+i*u-a*l,t[1]=i*c+o*l+a*s-n*u,t[2]=a*c+o*u+n*l-i*s,t[3]=o*c-n*s-i*l-a*u,t},s.mul=s.multiply,s.scale=o.scale,s.rotateX=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+o*s,t[1]=i*l+a*s,t[2]=a*l-i*s,t[3]=o*l-n*s,t},s.rotateY=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l-a*s,t[1]=i*l+o*s,t[2]=a*l+n*s,t[3]=o*l-i*s,t},s.rotateZ=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+i*s,t[1]=i*l-n*s,t[2]=a*l+o*s,t[3]=o*l-a*s,t},s.calculateW=function(t,e){var r=e[0],n=e[1],i=e[2];return t[0]=r,t[1]=n,t[2]=i,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),t},s.dot=o.dot,s.lerp=o.lerp,s.slerp=function(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=u*d+c*p+h*m+f*g,a<0&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*h+l*m,t[3]=s*f+l*g,t},s.sqlerp=function(){var t=s.create(),e=s.create();return function(r,n,i,a,o,l){return s.slerp(t,n,o,l),s.slerp(e,i,a,l),s.slerp(r,t,e,2*l*(1-l)),r}}(),s.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a,s=o?1/o:0;return t[0]=-r*s,t[1]=-n*s,t[2]=-i*s,t[3]=a*s,t},s.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},s.length=o.length,s.len=s.length,s.squaredLength=o.squaredLength,s.sqrLen=s.squaredLength,s.normalize=o.normalize,s.fromMat3=function(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(e[3*i+i]-e[3*a+a]-e[3*o+o]+1),t[i]=.5*r,r=.5/r,t[3]=(e[3*a+o]-e[3*o+a])*r,t[a]=(e[3*a+i]+e[3*i+a])*r,t[o]=(e[3*o+i]+e[3*i+o])*r}return t},s.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},s.exactEquals=o.exactEquals,s.equals=o.equals,e.exports=s},{"./common.js":175,"./mat3.js":178,"./vec3.js":182,"./vec4.js":183}],181:[function(t,e,r){var n=t("./common.js"),i={};i.create=function(){var t=new n.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},i.fromValues=function(t,e){var r=new n.ARRAY_TYPE(2);return r[0]=t,r[1]=e,r},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},i.set=function(t,e,r){return t[0]=e,t[1]=r,t},i.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t},i.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t},i.sub=i.subtract,i.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},i.mul=i.multiply,i.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},i.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},i.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t},i.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)},i.dist=i.distance,i.squaredDistance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1];return Math.sqrt(e*e+r*r)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1];return e*e+r*r},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},i.cross=function(t,e,r){var n=e[0]*r[1]-e[1]*r[0];return t[0]=t[1]=0,t[2]=n,t},i.lerp=function(t,e,r,n){var i=e[0],a=e[1];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t},i.random=function(t,e){e=e||1;var r=2*n.RANDOM()*Math.PI;return t[0]=Math.cos(r)*e,t[1]=Math.sin(r)*e,t},i.transformMat2=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t},i.transformMat2d=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t},i.transformMat3=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[3]*i+r[6],t[1]=r[1]*n+r[4]*i+r[7],t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=2),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},i.cross=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t},i.lerp=function(t,e,r,n){var i=e[0],a=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t},i.hermite=function(t,e,r,n,i,a){var o=a*a,s=o*(2*a-3)+1,l=o*(a-2)+a,u=o*(a-1),c=o*(3-2*a);return t[0]=e[0]*s+r[0]*l+n[0]*u+i[0]*c,t[1]=e[1]*s+r[1]*l+n[1]*u+i[1]*c,t[2]=e[2]*s+r[2]*l+n[2]*u+i[2]*c,t},i.bezier=function(t,e,r,n,i,a){var o=1-a,s=o*o,l=a*a,u=s*o,c=3*a*s,h=3*l*o,f=l*a;return t[0]=e[0]*u+r[0]*c+n[0]*h+i[0]*f,t[1]=e[1]*u+r[1]*c+n[1]*h+i[1]*f,t[2]=e[2]*u+r[2]*c+n[2]*h+i[2]*f,t},i.random=function(t,e){e=e||1;var r=2*n.RANDOM()*Math.PI,i=2*n.RANDOM()-1,a=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*e,t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t},i.transformMat3=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t},i.transformQuat=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,h=u*i+l*n-o*a,f=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+h*-l-f*-s,t[1]=h*u+d*-s+f*-o-c*-l,t[2]=f*u+d*-l+c*-s-h*-o,t},i.rotateX=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.rotateY=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.rotateZ=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=3),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s1?0:Math.acos(a)},i.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(l))},e.exports=i},{"./common.js":175}],183:[function(t,e,r){var n=t("./common.js"),i={};i.create=function(){var t=new n.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},i.fromValues=function(t,e,r,i){var a=new n.ARRAY_TYPE(4);return a[0]=t,a[1]=e,a[2]=r,a[3]=i,a},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},i.set=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t},i.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t},i.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t},i.sub=i.subtract,i.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t},i.mul=i.multiply,i.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},i.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t},i.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},i.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)},i.dist=i.distance,i.squaredDistance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},i.lerp=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t},i.random=function(t,e){return e=e||1,t[0]=n.RANDOM(),t[1]=n.RANDOM(),t[2]=n.RANDOM(),t[3]=n.RANDOM(),i.normalize(t,t),i.scale(t,t,e),t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t},i.transformQuat=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,h=u*i+l*n-o*a,f=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+h*-l-f*-s,t[1]=h*u+d*-s+f*-o-c*-l,t[2]=f*u+d*-l+c*-s-h*-o,t[3]=e[3],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=4),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s1.0001)return null;g+=m[c]}return Math.abs(g-1)>.001?null:[h,o(t,m),m]}var l=t("barycentric"),u=t("polytope-closest-point/lib/closest_point_2d.js");e.exports=s},{barycentric:39,"polytope-closest-point/lib/closest_point_2d.js":464}],185:[function(t,e,r){var n="precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if(any(lessThan(f_position, clipBounds[0])) || \n any(greaterThan(f_position, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = vec4(pickId, f_id.xyz);\n}";r.meshShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec4 m_position = model * vec4(position, 1.0);\n vec4 t_position = view * m_position;\n gl_Position = projection * t_position;\n f_color = color;\n f_normal = normal;\n f_data = position;\n f_eyeDirection = eyePosition - position;\n f_lightDirection = lightPosition - position;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution_2_0(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\n\n\nfloat cookTorranceSpecular_1_1(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution_2_0(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(f_data, clipBounds[0])) || \n any(greaterThan(f_data, clipBounds[1]))) {\n discard;\n }\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n \n if(!gl_FrontFacing) {\n N = -N;\n }\n\n float specular = cookTorranceSpecular_1_1(L, V, N, roughness, fresnel);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(f_data, clipBounds[0])) || \n any(greaterThan(f_data, clipBounds[1]))) {\n discard;\n }\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(position, clipBounds[0])) || \n any(greaterThan(position, clipBounds[1]))) {\n gl_Position = vec4(0,0,0,0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5,0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}",fragment:n,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if(any(lessThan(position, clipBounds[0])) || \n any(greaterThan(position, clipBounds[1]))) {\n gl_Position = vec4(0,0,0,0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}",fragment:n,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor,1);\n}\n",attributes:[{name:"position",type:"vec3"}]}},{}],186:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l,u,c,h,f,d,p,m,g,v,y,b,x,_,w,M,A,k,T){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=c,this.triangleNormals=f,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=b,this.pointColors=_,this.pointUVs=w,this.pointSizes=M,this.pointIds=x,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=k,this.contourVAO=T,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this._model=I,this._view=I,this._projection=I,this._resolution=[1,1]}function i(t){for(var e=w({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return _(r,[256,256,4],[4,0,1])}function a(t,e,r){for(var n=new Array(e),i=0;i=1},P.isTransparent=function(){return this.opacity<1},P.pickSlots=1,P.setPickBase=function(t){this.pickId=t},P.highlight=function(t){if(!t||!this.contourEnable)return void(this.contourCount=0);for(var e=M(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=A.mallocFloat32(6*a),s=0,l=0;l0){var f=this.triShader;f.bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var f=this.lineShader;f.bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){var f=this.pointShader;f.bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var f=this.contourShader;f.bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind()}},P.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||I,n=t.view||I,i=t.projection||I,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255},l=this.pickShader;if(l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0){var l=this.pointPickShader;l.bind(),l.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}},P.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;as[A]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n],a.uniforms.angle=v[n],u.drawArrays(u.TRIANGLES,s[A],s[k]-s[A]))),y[n]&&M&&(e[1^n]-=T*d*b[n],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=x[n],a.uniforms.angle=_[n],u.drawArrays(u.TRIANGLES,w,M)),e[1^n]=T*c[2+(1^n)]-1,p[n+2]&&(e[1^n]+=T*d*m[n+2],As[A]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n+2],a.uniforms.angle=v[n+2],u.drawArrays(u.TRIANGLES,s[A],s[k]-s[A]))),y[n+2]&&M&&(e[1^n]+=T*d*b[n+2],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=x[n+2],a.uniforms.angle=_[n+2],u.drawArrays(u.TRIANGLES,w,M))}}(),c.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,u=r.pixelRatio;if(this.titleCount){for(var c=0;c<2;++c)e[c]=2*(o[c]*u-a[c])/(a[2+c]-a[c])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),c.bind=function(){var t=[0,0],e=[0,0],r=[0,0];return function(){var n=this.plot,i=this.shader,a=n._tickBounds,o=n.dataBox,s=n.screenBox,l=n.viewBox;i.bind();for(var u=0;u<2;++u){var c=a[u],h=a[u+2],f=h-c,d=.5*(o[u+2]+o[u]),p=o[u+2]-o[u],m=l[u],g=l[u+2],v=g-m,y=s[u],b=s[u+2],x=b-y;e[u]=2*f/p*v/x,t[u]=2*(c-d)/p*v/x}r[1]=2*n.pixelRatio/(s[3]-s[1]),r[0]=r[1]*(s[3]-s[1])/(s[2]-s[0]),i.uniforms.dataScale=e,i.uniforms.dataShift=t,i.uniforms.textScale=r,this.vbo.bind(),i.attributes.textCoordinate.pointer()}}(),c.update=function(t){var e,r,n,i,a,o=[],l=t.ticks,u=t.bounds;for(a=0;a<2;++a){var c=[Math.floor(o.length/3)],h=[-1/0],f=l[a];for(e=0;er)for(t=r;te)for(t=e;t=0){for(var A=0|M.type.charAt(M.type.length-1),k=new Array(A),T=0;T=0;)S+=1;w[b]=S}var E=new Array(r.length);a(),d._relink=a,d.types={uniforms:l(r),attributes:l(n)},d.attributes=s(p,d,x,w),Object.defineProperty(d,"uniforms",o(p,d,r,E))},e.exports=a},{"./lib/GLError":194,"./lib/create-attributes":195,"./lib/create-uniforms":196,"./lib/reflect":197,"./lib/runtime-reflect":198,"./lib/shader-cache":199}],194:[function(t,e,r){function n(t,e,r){this.shortMessage=e||"",this.longMessage=r||"",this.rawError=t||"",this.message="gl-shader: "+(e||t||"")+(r?"\n"+r:""),this.stack=(new Error).stack}n.prototype=new Error,n.prototype.name="GLError",n.prototype.constructor=n,e.exports=n},{}],195:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}function i(t,e,r,i,a,o,s){for(var l=["gl","v"],u=[],c=0;c=0){var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+h+": "+f);i(t,e,d[0],n,p,o,h)}else{if(!(f.indexOf("mat")>=0))throw new s("","Unknown data type for attribute "+h+": "+f);var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+h+": "+f);a(t,e,d,n,p,o,h)}}}return o}e.exports=o;var s=t("./GLError"),l=n.prototype;l.pointer=function(t,e,r,n){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,t||a.FLOAT,!!e,r||0,n||0),a.enableVertexAttribArray(o)},l.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(l,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}})},{"./GLError":194}],196:[function(t,e,r){"use strict";function n(t){return new Function("y","return function(){return y}")(t)}function i(t,e){for(var r=new Array(t),n=0;n4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+i+"fv(locations["+e+"],false,obj"+t+")"}throw new s("","Unknown uniform data type for "+name+": "+r)}var i=r.charCodeAt(r.length-1)-48;if(i<2||i>4)throw new s("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+i+"iv(locations["+e+"],obj"+t+")";case"v":return"gl.uniform"+i+"fv(locations["+e+"],obj"+t+")";default:throw new s("","Unrecognized data type for vector "+name+": "+r)}}}function c(t,e){if("object"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],a=t;parseInt(n)+""===n?a+="["+n+"]":a+="."+n,"object"==typeof i?r.push.apply(r,c(a,i)):r.push([a,i])}return r}function h(e){for(var n=["return function updateProperty(obj){"],i=c("",e),o=0;o4)throw new s("","Invalid data type");return"b"===t.charAt(0)?i(r,!1):i(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+t);return i(r*r,0)}throw new s("","Unknown uniform data type for "+name+": "+t)}}function d(t,e,i){if("object"==typeof i){var o=p(i);Object.defineProperty(t,e,{get:n(o),set:h(i),enumerable:!0,configurable:!1})}else a[i]?Object.defineProperty(t,e,{get:l(i),set:h(i),enumerable:!0,configurable:!1}):t[e]=f(r[i].type)}function p(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var u=1;u1)for(var l=0;l=0){var m=e[p]-n[p]*(e[p+2]-e[p])/(n[p+2]-n[p]);0===p?o.drawLine(m,e[1],m,e[3],d[p],f[p]):o.drawLine(e[0],m,e[2],m,d[p],f[p])}}for(var p=0;p=0;--t)this.objects[t].dispose();this.objects.length=0;for(var t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},f.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},f.removeObject=function(t){for(var e=this.objects,r=0;r0){var r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function o(t){return"boolean"!=typeof t||t}function s(t){function e(){if(!w&&G.autoResize){var t=M.parentNode,e=1,r=1;t&&t!==document.body?(e=t.clientWidth,r=t.clientHeight):(e=window.innerWidth,r=window.innerHeight);var n=0|Math.ceil(e*G.pixelRatio),i=0|Math.ceil(r*G.pixelRatio);if(n!==M.width||i!==M.height){M.width=n,M.height=i;var a=M.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=e+"px",a.height=r+"px",N=!0}}}function r(){for(var t=O.length,e=F.length,r=0;r0&&0===j[e-1];)j.pop(),F.pop().dispose()}function s(){if(G.contextLost)return!0;k.isContextLost()&&(G.contextLost=!0,G.mouseListener.enabled=!1,G.selection.object=null,G.oncontextloss&&G.oncontextloss())}function b(){if(!s()){k.colorMask(!0,!0,!0,!0),k.depthMask(!0),k.disable(k.BLEND),k.enable(k.DEPTH_TEST);for(var t=O.length,e=F.length,r=0;rS.distance)continue;for(var u=0;u>>1;for(r=0;r=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}function a(t,e){var r=t.gl,i=s(r),a=s(r),l=o(r,u.pointVertex,u.pointFragment),c=o(r,u.pickVertex,u.pickFragment),h=new n(t,i,a,l,c);return h.update(e),t.addObject(h),h}var o=t("gl-shader"),s=t("gl-buffer"),l=t("typedarray-pool"),u=t("./lib/shader");e.exports=a;var c=n.prototype;c.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},c.update=function(t){function e(e,r){return e in t?t[e]:r}var r;t=t||{},this.sizeMin=e("sizeMin",.5),this.sizeMax=e("sizeMax",20),this.color=e("color",[1,0,0,1]).slice(),this.areaRatio=e("areaRatio",1),this.borderColor=e("borderColor",[0,0,0,1]).slice(),this.blend=e("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,a=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,o=t.positions,s=i?o:l.mallocFloat32(o.length),u=a?t.idToIndex:l.mallocInt32(n);if(i||s.set(o),!a)for(s.set(o),r=0;r>8&255,e[2]=r>>16&255,e[3]=r>>24&255,this.pickBuffer.bind(),a.attributes.pickId.pointer(o.UNSIGNED_BYTE),a.uniforms.pickOffset=e,this.pickOffset=r);var f=o.getParameter(o.BLEND),d=o.getParameter(o.DITHER);return f&&!this.blend&&o.disable(o.BLEND),d&&o.disable(o.DITHER),o.drawArrays(o.POINTS,0,this.pointCount),f&&!this.blend&&o.enable(o.BLEND),d&&o.enable(o.DITHER),r+this.pointCount}}(),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{"./lib/shader":203,"gl-buffer":138,"gl-shader":204,"typedarray-pool":518}],212:[function(t,e,r){function n(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=u*d+c*p+h*m+f*g,a<0&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*h+l*m,t[3]=s*f+l*g,t}e.exports=n},{}],213:[function(t,e,r){"use strict";e.exports={vertex:"precision highp float;\n#define GLSLIFY 1\n\n\nvec4 computePosition_1_0(vec2 posHi, vec2 posLo, vec2 scHi, vec2 scLo, vec2 trHi, vec2 trLo) {\n return vec4((posHi + trHi) * scHi\n \t\t\t//FIXME: this thingy does not give noticeable precision gain, need test\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo\n , 0, 1);\n}\n\n\nattribute vec2 positionHi, positionLo;\nattribute float size, border;\nattribute vec2 char, color;\n\n//this is 64-bit form of scale and translate\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform float pixelRatio;\nuniform vec4 viewBox;\nuniform sampler2D palette;\n\nvarying vec4 charColor, borderColor;\nvarying vec2 charId;\nvarying vec2 pointCoord;\nvarying float pointSize;\nvarying float borderWidth;\n\n\nvoid main() {\n charColor = texture2D(palette, vec2(color.x / 255., 0));\n borderColor = texture2D(palette, vec2(color.y / 255., 0));\n\n gl_PointSize = size * pixelRatio;\n pointSize = size * pixelRatio;\n\n charId = char;\n borderWidth = border;\n\n gl_Position = computePosition_1_0(\n positionHi, positionLo,\n scaleHi, scaleLo,\n translateHi, translateLo);\n\n pointCoord = viewBox.xy + (viewBox.zw - viewBox.xy) * (gl_Position.xy * .5 + .5);\n}\n",fragment:"precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D chars;\nuniform vec2 charsShape;\nuniform float charsStep, pixelRatio, charOffset;\n\nvarying vec4 borderColor;\nvarying vec4 charColor;\nvarying vec2 charId;\nvarying vec2 pointCoord;\nvarying float pointSize;\nvarying float borderWidth;\n\nvoid main() {\n\tvec2 pointUV = (pointCoord - gl_FragCoord.xy + pointSize * .5) / pointSize;\n\tpointUV.x = 1. - pointUV.x;\n\tpointUV.y += charOffset;\n\tvec2 texCoord = ((charId + pointUV) * charsStep) / charsShape;\n\tfloat dist = texture2D(chars, texCoord).r;\n\n\t//max-distance alpha\n\tif (dist < 1e-2)\n\t\tdiscard;\n\n\tfloat dif = 5. * pixelRatio * borderWidth / pointSize;\n\tfloat borderLevel = .748 - dif * .5;\n\tfloat charLevel = .748 + dif * .5;\n\tfloat gamma = .005 * charsStep / pointSize;\n\n\tfloat borderAmt = smoothstep(borderLevel - gamma, borderLevel + gamma, dist);\n\tfloat charAmt = smoothstep(charLevel - gamma, charLevel + gamma, dist);\n\n\tvec4 color = borderColor;\n\tcolor.a *= borderAmt;\n\n\tgl_FragColor = mix(color, charColor, charAmt);\n}\n",pickVertex:"precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 positionHi, positionLo;\nattribute vec4 id;\nattribute float size;\n\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform vec4 pickOffset;\nuniform float pixelRatio;\n\nvarying vec4 fragColor;\n\n\nvec4 computePosition_1_0(vec2 posHi, vec2 posLo, vec2 scHi, vec2 scLo, vec2 trHi, vec2 trLo) {\n return vec4((posHi + trHi) * scHi\n \t\t\t//FIXME: this thingy does not give noticeable precision gain, need test\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo\n , 0, 1);\n}\n\n\nvoid main() {\n vec4 fragId = id + pickOffset;\n\n fragId.y += floor(fragId.x / 256.0);\n fragId.x -= floor(fragId.x / 256.0) * 256.0;\n\n fragId.z += floor(fragId.y / 256.0);\n fragId.y -= floor(fragId.y / 256.0) * 256.0;\n\n fragId.w += floor(fragId.z / 256.0);\n fragId.z -= floor(fragId.z / 256.0) * 256.0;\n\n fragColor = fragId / 255.0;\n\n gl_PointSize = size * .25 * pixelRatio;\n\n gl_Position = computePosition_1_0(\n positionHi, positionLo,\n scaleHi, scaleLo,\n translateHi, translateLo);\n}\n",pickFragment:"precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n gl_FragColor = fragColor;\n}\n"}},{}],214:[function(t,e,r){arguments[4][74][0].apply(r,arguments)},{dup:74}],215:[function(t,e,r){arguments[4][193][0].apply(r,arguments)},{"./lib/GLError":216,"./lib/create-attributes":217,"./lib/create-uniforms":218,"./lib/reflect":219,"./lib/runtime-reflect":220,"./lib/shader-cache":221,dup:193}],216:[function(t,e,r){arguments[4][194][0].apply(r,arguments)},{dup:194}],217:[function(t,e,r){arguments[4][195][0].apply(r,arguments)},{"./GLError":216,dup:195}],218:[function(t,e,r){arguments[4][196][0].apply(r,arguments)},{"./GLError":216,"./reflect":219,dup:196}],219:[function(t,e,r){arguments[4][197][0].apply(r,arguments)},{dup:197}],220:[function(t,e,r){arguments[4][198][0].apply(r,arguments)},{dup:198}],221:[function(t,e,r){arguments[4][199][0].apply(r,arguments)},{"./GLError":216,dup:199,"gl-format-compiler-error":146,"weakmap-shim":539}],222:[function(t,e,r){"use strict";function n(t,e,r,n,a){a<=4*f?i(0,a-1,t,e,r,n):h(0,a-1,t,e,r,n)}function i(t,e,r,n,i,a){for(var o=t+1;o<=e;++o){for(var s=r[o],l=n[2*o],u=n[2*o+1],c=i[o],h=a[o],f=o;f>t;){var d=r[f-1],p=n[2*(f-1)];if((d-s||l-p)>=0)break;r[f]=d,n[2*f]=p,n[2*f+1]=n[2*f-1],i[f]=i[f-1],a[f]=a[f-1],f-=1}r[f]=s,n[2*f]=l,n[2*f+1]=u,i[f]=c,a[f]=h}}function a(t,e,r,n,i,a){var o=r[t],s=n[2*t],l=n[2*t+1],u=i[t],c=a[t];r[t]=r[e],n[2*t]=n[2*e],n[2*t+1]=n[2*e+1],i[t]=i[e],a[t]=a[e],r[e]=o,n[2*e]=s,n[2*e+1]=l,i[e]=u,a[e]=c}function o(t,e,r,n,i,a){r[t]=r[e],n[2*t]=n[2*e],n[2*t+1]=n[2*e+1],i[t]=i[e],a[t]=a[e]}function s(t,e,r,n,i,a,o){var s=n[t],l=i[2*t],u=i[2*t+1],c=a[t],h=o[t];n[t]=n[e],i[2*t]=i[2*e],i[2*t+1]=i[2*e+1],a[t]=a[e],o[t]=o[e],n[e]=n[r],i[2*e]=i[2*r],i[2*e+1]=i[2*r+1],a[e]=a[r],o[e]=o[r],n[r]=s,i[2*r]=l,i[2*r+1]=u,a[r]=c,o[r]=h}function l(t,e,r,n,i,a,o,s,l,u,c){s[t]=s[e],l[2*t]=l[2*e],l[2*t+1]=l[2*e+1],u[t]=u[e],c[t]=c[e],s[e]=r,l[2*e]=n,l[2*e+1]=i,u[e]=a,c[e]=o}function u(t,e,r,n,i){return(r[t]-r[e]||n[2*e]-n[2*t]||i[t]-i[e])<0}function c(t,e,r,n,i,a,o,s){return(e-a[t]||o[2*t]-r||i-s[t])<0}function h(t,e,r,n,d,p){var m=(e-t+1)/6|0,g=t+m,v=e-m,y=t+e>>1,b=y-m,x=y+m,_=g,w=b,M=y,A=x,k=v,T=t+1,S=e-1,E=0;u(_,w,r,n,d,p)&&(E=_,_=w,w=E),u(A,k,r,n,d,p)&&(E=A,A=k,k=E),u(_,M,r,n,d,p)&&(E=_,_=M,M=E),u(w,M,r,n,d,p)&&(E=w,w=M,M=E),u(_,A,r,n,d,p)&&(E=_,_=A,A=E),u(M,A,r,n,d,p)&&(E=M,M=A,A=E),u(w,k,r,n,d,p)&&(E=w,w=k,k=E),u(w,M,r,n,d,p)&&(E=w,w=M,M=E),u(A,k,r,n,d,p)&&(E=A,A=k,k=E);var L=r[w],C=n[2*w],D=n[2*w+1],z=d[w],I=p[w],P=r[A],O=n[2*A],R=n[2*A+1],j=d[A],F=p[A],N=_,B=M,U=k,V=g,H=y,q=v,G=r[N],Y=r[B],W=r[U];r[V]=G,r[H]=Y,r[q]=W;for(var X=0;X<2;++X){var Z=n[2*N+X],J=n[2*B+X],K=n[2*U+X];n[2*V+X]=Z,n[2*H+X]=J,n[2*q+X]=K}var Q=d[N],$=d[B],tt=d[U];d[V]=Q,d[H]=$,d[q]=tt;var et=p[N],rt=p[B],nt=p[U];p[V]=et,p[H]=rt,p[q]=nt,o(b,t,r,n,d,p),o(x,e,r,n,d,p);for(var it=T;it<=S;++it)if(c(it,L,C,D,z,r,n,d))it!==T&&a(it,T,r,n,d,p),++T;else if(!c(it,P,O,R,j,r,n,d))for(;;){if(c(S,P,O,R,j,r,n,d)){c(S,L,C,D,z,r,n,d)?(s(it,T,S,r,n,d,p),++T,--S):(a(it,S,r,n,d,p),--S);break}if(--S=Math.max(.9*d,32)){var b=u+s>>>1;l(g,v,h,f,b,c+1),f=b}l(g,v,h,f,y,c+1),f=y}}}var u=t.length>>>1;if(u<1)return[];for(var c=1/0,h=1/0,f=-1/0,d=-1/0,p=0;p=0;--_){t[2*_]=(t[2*_]-c)*v,t[2*_+1]=(t[2*_+1]-h)*y;var k=x[_];k!==M&&(w.push(new i(b*Math.pow(.5,k),_+1,A-(_+1))),A=_+1,M=k)}return w.push(new i(b*Math.pow(.5,k+1),0,A)),o.free(x),w}var o=t("typedarray-pool"),s=t("./lib/sort");e.exports=a},{"./lib/sort":222,"typedarray-pool":518}],224:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.sizeBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.charBuffer=s,this.pointCount=0,this.pickOffset=0,this.points=null,this.scales=[],this.xCoords=[],this.charCanvas=document.createElement("canvas"),this.charTexture=h(this.plot.gl,this.charCanvas),this.charStep=400,this.charOffset=.032,this.snapThreshold=1e4,this.paletteTexture=h(this.plot.gl,[256,1])}function i(t,e){var r=t.gl,i=a(r,l.vertex,l.fragment),s=a(r,l.pickVertex,l.pickFragment),u=o(r),c=o(r),h=o(r),f=o(r),d=o(r),p=new n(t,i,s,u,c,h,f,d);return p.update(e),t.addObject(p),p}e.exports=i;var a=t("gl-shader"),o=t("gl-buffer"),s=t("typedarray-pool"),l=t("./lib/shaders"),u=t("snap-points-2d"),c=t("font-atlas-sdf"),h=t("gl-texture2d"),f=t("color-id"),d=t("ndarray"),p=t("clamp"),m=t("binary-search-bounds"),g=n.prototype;!function(){function t(){var t=this.plot,u=t.viewBox,c=t.dataBox,h=t.pixelRatio,f=c[2]-c[0],d=c[3]-c[1],p=2/f,m=2/d,g=-c[0]-.5*f,v=-c[1]-.5*d;i[0]=p,a[0]=p-i[0],i[1]=m,a[1]=m-i[1],o[0]=g,s[0]=g-o[0],o[1]=v,s[1]=v-o[1];var y=u[2]-u[0],b=u[3]-u[1];e=Math.min(f/y,d/b),l[0]=2*h/y,l[1]=2*h/b,r=c[0],n=c[2]}var e,r,n,i=new Float32Array([0,0]),a=new Float32Array([0,0]),o=new Float32Array([0,0]),s=new Float32Array([0,0]),l=[0,0],u=[0,0,0,0];g.drawPick=function(l){var c=void 0!==l,h=this.plot,f=this.pointCount,d=f>this.snapThreshold;if(!f)return l;t.call(this);var p=h.gl,g=c?this.pickShader:this.shader,v=p.isEnabled(p.BLEND);if(g.bind(),c){this.pickOffset=l;for(var y=0;y<4;++y)u[y]=l>>8*y&255;g.uniforms.pickOffset=u,this.idBuffer.bind(),g.attributes.id.pointer(p.UNSIGNED_BYTE,!1)}else p.blendFuncSeparate(p.SRC_ALPHA,p.ONE_MINUS_SRC_ALPHA,p.ONE,p.ONE_MINUS_SRC_ALPHA),p.blendColor(0,0,0,1),v||p.enable(p.BLEND),this.colorBuffer.bind(),g.attributes.color.pointer(p.UNSIGNED_BYTE,!1),this.charBuffer.bind(),g.attributes.char.pointer(p.UNSIGNED_BYTE,!1),g.uniforms.chars=this.charTexture.bind(0),g.uniforms.charsShape=[this.charCanvas.width,this.charCanvas.height],g.uniforms.charsStep=this.charStep,g.uniforms.palette=this.paletteTexture.bind(1),g.uniforms.charOffset=this.charOffset;this.sizeBuffer.bind(),g.attributes.size.pointer(p.FLOAT,!1,8,0),c||g.attributes.border.pointer(p.FLOAT,!1,8,4),this.positionBuffer.bind(),g.attributes.positionHi.pointer(p.FLOAT,!1,16,0),g.attributes.positionLo.pointer(p.FLOAT,!1,16,8),g.uniforms.pixelRatio=h.pixelRatio,g.uniforms.scaleHi=i,g.uniforms.scaleLo=a,g.uniforms.translateHi=o,g.uniforms.translateLo=s,g.uniforms.viewBox=h.viewBox;var b=this.scales;if(d)for(var x=b.length-1;x>=0;x--){var _=b[x];if(!(_.pixelSize&&_.pixelSize<1.25*e&&x>1)){var w=_.offset,M=_.count+w,A=m.ge(this.xCoords,r,w,M-1),k=m.lt(this.xCoords,n,A,M-1)+1;k>A&&p.drawArrays(p.POINTS,A,k-A)}}else p.drawArrays(p.POINTS,0,f);if(c)return l+f;v?p.blendFunc(p.ONE,p.ONE_MINUS_SRC_ALPHA):p.disable(p.BLEND)}}(),g.draw=g.drawPick,g.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}},g.update=function(t){t=t||{};var e=t.positions||[],r=t.colors||[],n=t.glyphs||[],i=t.sizes||[],a=t.borderWidths||[],o=t.borderColors||[],l=this.plot.gl;null!=t.charOffset&&(this.charOffset=t.charOffset),this.points=e;var h=this.points.length/2,m=s.mallocInt32(h),g=s.mallocFloat32(2*h),v=s.mallocFloat64(2*h);v.set(this.points),this.pointCount=h;var y=h>this.snapThreshold;y&&(this.scales=u(v,m,g));for(var b=s.mallocFloat32(4*h),x=s.mallocFloat32(2*h),_=s.mallocUint8(2*h),w=s.mallocUint32(h),M=s.mallocUint8(2*h),A={},k=[],T=[],S=[],E=0,L=h,C=0;EO&&(O=i[E]);var R=this.charStep;this.charStep=p(Math.ceil(4*O),128,768);var j=Object.keys(I),F=this.charStep,N=Math.floor(F/2),B=l.getParameter(l.MAX_TEXTURE_SIZE),U=B/F*(B/F),V=Math.min(B,F*j.length),H=Math.min(B,F*Math.ceil(F*j.length/B)),q=Math.floor(V/F);j.length>U&&console.warn("gl-scatter2d-fancy: number of characters is more than maximum texture size. Try reducing it."),this.chars&&this.chars+""==j+""&&this.charStep==R||(this.charCanvas=c({ -canvas:this.charCanvas,family:"sans-serif",size:N,shape:[V,H],step:[F,F],chars:j}),this.chars=j);for(var E=0;E>>1,n=u.mallocInt32(r),i=u.mallocFloat32(2*r),a=u.mallocFloat64(2*r);a.set(this.points),this.scales=l(a,n,i,this.bounds);var o=u.mallocFloat64(r),s=u.mallocFloat32(2*r),c=u.mallocFloat32(2*r);s.set(a);for(var h=0,f=0;h>8&255,g[2]=t>>16&255,g[3]=t>>24&255,n.uniforms.pickOffset=g,l.bind(),n.attributes.pickId.pointer(v.UNSIGNED_BYTE)):(n.uniforms.useWeight=1,this.weightBuffer.bind(),n.attributes.weight.pointer());for(var z=this.xCoords,I=(x[0]-u[0]-S*c*y)/_,P=(x[2]-u[0]+S*c*y)/_,O=!0,R=i.length-1;R>=0;R--){var j=i[R];if(!(j.pixelSize1)){var F=j.offset,N=j.count+F,B=s.ge(z,I,F,N-1),U=s.lt(z,P,B,N-1)+1;U>B&&v.drawArrays(v.POINTS,B,U-B),!e&&O&&(O=!1,n.uniforms.useWeight=0)}}return t+this.pointCount},h.drawPick=h.draw,h.pick=function(t,e,r){var n=r-this.pickOffset;return n<0||n>=this.pointCount?null:{object:this,pointId:n,dataCoord:[this.points[2*n],this.points[2*n+1]]}}},{"./lib/shader":225,"binary-search-bounds":226,"gl-buffer":138,"gl-shader":236,"snap-points-2d":228,"typedarray-pool":518}],230:[function(t,e,r){"use strict";function n(t,e){var r=a[e];if(r||(r=a[e]={}),t in r)return r[t];for(var n=i(t,{textAlign:"center",textBaseline:"middle",lineHeight:1,font:e}),o=i(t,{triangles:!0,textAlign:"center",textBaseline:"middle",lineHeight:1,font:e}),s=[[1/0,1/0],[-1/0,-1/0]],l=0;lMath.abs(R[1])){var j=O;O=R,R=j,j=I,I=P,P=j;var F=D;D=z,z=F}O[0]<0&&(I[D]=-1),R[1]>0&&(P[z]=-1);for(var N=0,B=0,C=0;C<4;++C)N+=Math.pow(p[4*D+C],2),B+=Math.pow(p[4*z+C],2);I[D]/=Math.sqrt(N),P[z]/=Math.sqrt(B),d.axes[0]=I,d.axes[1]=P,d.fragClipBounds[0]=u(E,b[0],_,-1e8),d.fragClipBounds[1]=u(E,b[1],_,1e8),e.vao.draw(f.TRIANGLES,e.vertexCount),e.lineWidth>0&&(f.lineWidth(e.lineWidth),e.vao.draw(f.LINES,e.lineVertexCount,e.vertexCount))}}function f(t,e,r,n,i,a){var o=r.gl;if(r.vao.bind(),i===r.opacity<1||a){t.bind();var s=t.uniforms;s.model=n.model||x,s.view=n.view||x,s.projection=n.projection||x,w[0]=2/o.drawingBufferWidth,w[1]=2/o.drawingBufferHeight,s.screenSize=w,s.highlightId=r.highlightId,s.highlightScale=r.highlightScale,s.fragClipBounds=z,s.clipBounds=r.axes.bounds,s.opacity=r.opacity,s.pickGroup=r.pickId/255,s.pixelRatio=r.pixelRatio,r.vao.draw(o.TRIANGLES,r.vertexCount),r.lineWidth>0&&(o.lineWidth(r.lineWidth),r.vao.draw(o.LINES,r.lineVertexCount,r.vertexCount))}h(e,r,n,i,a),r.vao.unbind()}function d(t){var e=t.gl,r=y.createPerspective(e),n=y.createOrtho(e),i=y.createProject(e),a=y.createPickPerspective(e),s=y.createPickOrtho(e),l=y.createPickProject(e),u=p(e),c=p(e),h=p(e),f=p(e),d=m(e,[{buffer:u,size:3,type:e.FLOAT},{buffer:c,size:4,type:e.FLOAT},{buffer:h,size:2,type:e.FLOAT},{buffer:f,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),g=new o(e,r,n,i,u,c,h,f,d,a,s,l);return g.update(t),g}var p=t("gl-buffer"),m=t("gl-vao"),g=t("typedarray-pool"),v=t("gl-mat4/multiply"),y=t("./lib/shaders"),b=t("./lib/glyphs"),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];e.exports=d;var _=o.prototype;_.pickSlots=1,_.setPickBase=function(t){this.pickId=t},_.isTransparent=function(){if(this.opacity<1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]<1)return!0;return!1},_.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]>=1)return!0;return!1};var w=[0,0],M=[0,0,0],A=[0,0,0],k=[0,0,0,1],T=[0,0,0,1],S=x.slice(),E=[0,0,0],L=[[0,0,0],[0,0,0]],C=[-1e8,-1e8,-1e8],D=[1e8,1e8,1e8],z=[C,D];_.draw=function(t){f(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!1,!1)},_.drawTransparent=function(t){f(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!0,!1)},_.drawPick=function(t){f(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,!1,!0)},_.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[2]+(t.value[1]<<8)+(t.value[0]<<16);if(e>=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},_.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},_.update=function(t){if(t=t||{},"perspective"in t&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if("projectOpacity"in t)if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{var r=+t.projectOpacity;this.projectOpacity=[r,r,r]}"opacity"in t&&(this.opacity=t.opacity),this.dirty=!0;var n=t.position;if(n){var i=t.font||"normal",a=t.alignment||[0,0],o=[1/0,1/0,1/0],s=[-1/0,-1/0,-1/0],l=t.glyph,u=t.color,c=t.size,h=t.angle,f=t.lineColor,d=0,p=0,m=0,v=n.length;t:for(var y=0;y0&&(D[0]=-a[0]*(1+k[0][0]));for(var H=M.cells,q=M.positions,_=0;_0){var v=r*c;o.drawBox(h-v,f-v,d+v,f+v,a),o.drawBox(h-v,p-v,d+v,p+v,a),o.drawBox(h-v,f-v,h+v,p+v,a),o.drawBox(d-v,f-v,d+v,p+v,a)}}}},l.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},l.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":233,"gl-buffer":138,"gl-shader":236}],235:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function i(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}function a(t,e){return new i(t,o(t,e),s.mallocUint8(e[0]*e[1]*4))}e.exports=a;var o=t("gl-fbo"),s=t("typedarray-pool"),l=t("ndarray"),u=t("bit-twiddle").nextPow2,c=t("cwise/lib/wrapper")({args:["array",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},"scalar","scalar","index"],pre:{body:"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},body:{body:"{if(_inline_46_arg0_<255||_inline_46_arg1_<255||_inline_46_arg2_<255||_inline_46_arg3_<255){var _inline_46_l=_inline_46_arg4_-_inline_46_arg6_[0],_inline_46_a=_inline_46_arg5_-_inline_46_arg6_[1],_inline_46_f=_inline_46_l*_inline_46_l+_inline_46_a*_inline_46_a;_inline_46_fthis.buffer.length){s.free(this.buffer);for(var n=this.buffer=s.mallocUint8(u(r*e*4)),i=0;i=0){for(var A=0|M.type.charAt(M.type.length-1),k=new Array(A),T=0;T=0;)S+=1;_[w]=S}var E=new Array(r.length);a(),d._relink=a,d.types={uniforms:l(r),attributes:l(n)},d.attributes=s(p,d,b,_),Object.defineProperty(d,"uniforms",o(p,d,r,E))},e.exports=a},{"./lib/GLError":237,"./lib/create-attributes":238,"./lib/create-uniforms":239,"./lib/reflect":240,"./lib/runtime-reflect":241,"./lib/shader-cache":242}],237:[function(t,e,r){arguments[4][194][0].apply(r,arguments)},{dup:194}],238:[function(t,e,r){arguments[4][195][0].apply(r,arguments)},{"./GLError":237,dup:195}],239:[function(t,e,r){arguments[4][196][0].apply(r,arguments)},{"./GLError":237,"./reflect":240,dup:196}],240:[function(t,e,r){arguments[4][197][0].apply(r,arguments)},{dup:197}],241:[function(t,e,r){arguments[4][198][0].apply(r,arguments)},{dup:198}],242:[function(t,e,r){arguments[4][199][0].apply(r,arguments)},{"./GLError":237,dup:199,"gl-format-compiler-error":146,"weakmap-shim":539}],243:[function(t,e,r){"use strict";function n(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}function i(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r}e.exports=i;var a=n.prototype;a.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(t){return t.slice()}),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},a.draw=function(){var t=this.enable,e=this.width,r=this.color,n=this.center,i=this.plot,a=i.line,o=i.dataBox,s=i.viewBox;if(a.bind(),o[0]<=n[0]&&n[0]<=o[2]&&o[1]<=n[1]&&n[1]<=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),u=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&&a.drawLine(l,u,s[0],u,e[0],r[0]),t[1]&&a.drawLine(l,u,l,s[1],e[1],r[1]),t[2]&&a.drawLine(l,u,s[2],u,e[2],r[2]),t[3]&&a.drawLine(l,u,l,s[3],e[3],r[3])}},a.dispose=function(){this.plot.removeOverlay(this)}},{}],244:[function(t,e,r){"use strict";var n=t("gl-shader");e.exports=function(t){return n(t,"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, color;\nattribute float weight;\n\nuniform mat4 model, view, projection;\nuniform vec3 coordinates[3];\nuniform vec4 colors[3];\nuniform vec2 screenShape;\nuniform float lineWidth;\n\nvarying vec4 fragColor;\n\nvoid main() {\n vec3 vertexPosition = mix(coordinates[0],\n mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\n\n vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\n vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\n vec2 delta = weight * clipOffset * screenShape;\n vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\n\n gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\n fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\n}\n","precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}",null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},{"gl-shader":236}],245:[function(t,e,r){"use strict";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r, -this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}function i(t,e){function r(t,e,r,n,a,o){var s=[t,e,r,0,0,0,1];s[n+3]=1,s[n]=a,i.push.apply(i,s),s[6]=-1,i.push.apply(i,s),s[n]=o,i.push.apply(i,s),i.push.apply(i,s),s[6]=1,i.push.apply(i,s),s[n]=a,i.push.apply(i,s)}var i=[];r(0,0,0,0,0,1),r(0,0,0,1,0,1),r(0,0,0,2,0,1),r(1,0,0,1,-1,1),r(1,0,0,2,-1,1),r(0,1,0,0,-1,1),r(0,1,0,2,-1,1),r(0,0,1,0,-1,1),r(0,0,1,1,-1,1);var l=a(t,i),u=o(t,[{type:t.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:t.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:t.FLOAT,buffer:l,size:1,offset:24,stride:28}]),c=s(t);c.attributes.position.location=0,c.attributes.color.location=1,c.attributes.weight.location=2;var h=new n(t,l,u,c);return h.update(e),h}var a=t("gl-buffer"),o=t("gl-vao"),s=t("./shaders/index");e.exports=i;var l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],u=n.prototype,c=[0,0,0],h=[0,0,0],f=[0,0];u.isTransparent=function(){return!1},u.drawTransparent=function(t){},u.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||l,o=t.view||l,s=t.projection||l;this.axes&&(i=this.axes.lastCubeProps.axis);for(var u=c,d=h,p=0;p<3;++p)i&&i[p]<0?(u[p]=this.bounds[0][p],d[p]=this.bounds[1][p]):(u[p]=this.bounds[1][p],d[p]=this.bounds[0][p]);f[0]=e.drawingBufferWidth,f[1]=e.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=o,n.uniforms.projection=s,n.uniforms.coordinates=[this.position,u,d],n.uniforms.colors=this.colors,n.uniforms.screenShape=f;for(var p=0;p<3;++p)n.uniforms.lineWidth=this.lineWidth[p]*this.pixelRatio,this.enabled[p]&&(r.draw(e.TRIANGLES,6,6*p),this.drawSides[p]&&r.draw(e.TRIANGLES,12,18+12*p));r.unbind()},u.update=function(t){t&&("bounds"in t&&(this.bounds=t.bounds),"position"in t&&(this.position=t.position),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"colors"in t&&(this.colors=t.colors),"enabled"in t&&(this.enabled=t.enabled),"drawSides"in t&&(this.drawSides=t.drawSides))},u.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders/index":244,"gl-buffer":138,"gl-vao":252}],246:[function(t,e,r){var n=t("gl-shader"),i="precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n worldCoordinate = vec3(uv.zw, f.x);\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n",a="precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution_2_0(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\n\n\nfloat beckmannSpecular_1_1(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution_2_0(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\n\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (kill > 0.0 ||\n any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n discard;\n }\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = beckmannSpecular_1_1(L, V, N, roughness);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n",o="precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n vec4 worldPosition = model * vec4(dataCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z = clipPosition.z + zOffset;\n\n gl_Position = clipPosition;\n value = f;\n kill = -1.0;\n worldCoordinate = dataCoordinate;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n",s="precision mediump float;\n#define GLSLIFY 1\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if(kill > 0.0 ||\n any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n discard;\n }\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n";r.createShader=function(t){var e=n(t,i,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,i,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,o,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{"gl-shader":236}],247:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}function i(t){var e=x([y({colormap:t,nshades:R,format:"rgba"}).map(function(t){return[t[0],t[1],t[2],255*t[3]]})]);return b.divseq(e,255),e}function a(t,e,r,i,a,o,s,l,u,c,h,f,d,p){this.gl=t,this.shape=e,this.bounds=r,this.intensityBounds=[],this._shader=i,this._pickShader=a,this._coordinateBuffer=o,this._vao=s,this._colorMap=l,this._contourShader=u,this._contourPickShader=c,this._contourBuffer=h,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new n([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=p,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[0/0,0/0,0/0],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[_(v.mallocFloat(1024),[0,0]),_(v.mallocFloat(1024),[0,0]),_(v.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}function o(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||F,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=N.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],M(l,t.model,l);var u=N.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)u[i][n]=t.clipBounds[i][n];u[0][r]=-1e8,u[1][r]=1e8}return N.showSurface=o,N.showContour=s,N}function s(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=B;n.model=t.model||I,n.view=t.view||I,n.projection=t.projection||I,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.contourColor=this.contourColor[0],n.inverseModel=A(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],s=0;s<3;++s)a[s]=Math.min(Math.max(this.clipBounds[i][s],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=V,n.vertexColor=this.vertexColor;var l=U;for(M(l,n.view,n.model),M(l,n.projection,l),A(l,l),i=0;i<3;++i)n.eyePosition[i]=l[12+i]/l[15];var u=l[15];for(i=0;i<3;++i)u+=this.lightPosition[i]*l[4*i+3];for(i=0;i<3;++i){var c=l[12+i];for(s=0;s<3;++s)c+=l[4*s+i]*this.lightPosition[s];n.lightPosition[i]=c/u}var h=o(n,this);if(h.showSurface&&e===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=h.projections[i],this._shader.uniforms.clipBounds=h.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(h.showContour&&!e){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var d=this._contourVAO;for(d.bind(),i=0;i<3;++i)for(f.uniforms.permutation=O[i],r.lineWidth(this.contourWidth[i]),s=0;s=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},j.pickSlots=1,j.setPickBase=function(t){this.pickId=t};var F=[0,0,0],N={showSurface:!1,showContour:!1,projections:[I.slice(),I.slice(),I.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]},B={model:I,view:I,projection:I,inverseModel:I.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},U=I.slice(),V=[1,0,0,0,1,0,0,0,1];j.draw=function(t){return s.call(this,t,!1)},j.drawTransparent=function(t){return s.call(this,t,!0)};var H={model:I,view:I,projection:I,inverseModel:I,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};j.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=H;r.model=t.model||I,r.view=t.view||I,r.projection=t.projection||I,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.permutation=V;for(var n=0;n<2;++n)for(var i=r.clipBounds[n],a=0;a<3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);var s=o(r,this);if(s.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(e.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&(this._pickShader.uniforms.model=s.projections[n],this._pickShader.uniforms.clipBounds=s.clipBounds[n],this._vao.draw(e.TRIANGLES,this._vertexCount));this._vao.unbind()}if(s.showContour){var l=this._contourPickShader;l.bind(),l.uniforms=r;var u=this._contourVAO;for(u.bind(),a=0;a<3;++a)for(e.lineWidth(this.contourWidth[a]),l.uniforms.permutation=O[a],n=0;n>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var u=r.position;u[0]=u[1]=u[2]=0;for(var c=0;c<2;++c)for(var h=c?a:1-a,f=0;f<2;++f)for(var d=f?l:1-l,p=i+c,m=s+f,g=h*d,v=0;v<3;++v)u[v]+=this._field[v].get(p,m)*g;for(var y=this._pickResult.level,b=0;b<3;++b)if(y[b]=k.le(this.contourLevels[b],u[b]),y[b]<0)this.contourLevels[b].length>0&&(y[b]=0);else if(y[b]Math.abs(_-u[b])&&(y[b]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},j.update=function(t){t=t||{},this.dirty=!0,"contourWidth"in t&&(this.contourWidth=u(t.contourWidth,Number)),"showContour"in t&&(this.showContour=u(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=u(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=h(t.contourColor)),"contourProject"in t&&(this.contourProject=u(t.contourProject,function(t){return u(t,Boolean)})),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=h(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=u(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=u(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var n=(e.shape[0]+2)*(e.shape[1]+2);n>this._field[2].data.length&&(v.freeFloat(this._field[2].data),this._field[2].data=v.mallocFloat(d.nextPow2(n))),this._field[2]=_(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),l(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(v.freeFloat(this._field[o].data),this._field[o].data=v.mallocFloat(this._field[2].size)),this._field[o]=_(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var s=t.coords;if(!Array.isArray(s)||3!==s.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=s[o];for(y=0;y<2;++y)if(c.shape[y]!==a[y])throw new Error("gl-surface: coords have incorrect shape");l(this._field[o],c)}}else if(t.ticks){var f=t.ticks;if(!Array.isArray(f)||2!==f.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=f[o];if((Array.isArray(p)||p.length)&&(p=_(p)),p.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var m=_(p.data,a);m.stride[o]=p.stride[0],m.stride[1^o]=0,l(this._field[o],m)}}else{for(o=0;o<2;++o){var g=[0,0];g[o]=1,this._field[o]=_(this._field[o].data,[a[0]+2,a[1]+2],g,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var xt=0;xt<5;++xt)tt.pop();H-=1}continue t}tt.push(it[0],it[1],st[0],st[1],it[2]),H+=1}}nt.push(H)}this._contourOffsets[et]=rt,this._contourCounts[et]=nt}var _t=v.mallocFloat(tt.length);for(o=0;oi||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function o(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}function s(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function l(t,e,r,n,i,a,o,l){var u=l.dtype,c=l.shape.slice();if(c.length<2||c.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var h=0,f=0,d=s(c,l.stride.slice());"float32"===u?h=t.FLOAT:"float64"===u?(h=t.FLOAT,d=!1,u="float32"):"uint8"===u?h=t.UNSIGNED_BYTE:(h=t.UNSIGNED_BYTE,d=!1,u="uint8");if(2===c.length)f=t.LUMINANCE,c=[c[0],c[1],1],l=p(l.data,c,[l.stride[0],l.stride[1],1],l.offset);else{if(3!==c.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===c[2])f=t.ALPHA;else if(2===c[2])f=t.LUMINANCE_ALPHA;else if(3===c[2])f=t.RGB;else{if(4!==c[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");f=t.RGBA}c[2]}if(f!==t.LUMINANCE&&f!==t.ALPHA||i!==t.LUMINANCE&&i!==t.ALPHA||(f=i),f!==i)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var v=l.size,y=o.indexOf(n)<0;if(y&&o.push(n),h===a&&d)0===l.offset&&l.data.length===v?y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,l.data):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,l.data):y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,l.data.subarray(l.offset,l.offset+v)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,l.data.subarray(l.offset,l.offset+v));else{var b;b=a===t.FLOAT?g.mallocFloat32(v):g.mallocUint8(v);var _=p(b,c,[c[2],c[2]*c[0],1]);h===t.FLOAT&&a===t.UNSIGNED_BYTE?x(_,l):m.assign(_,l),y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,b.subarray(0,v)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,b.subarray(0,v)),a===t.FLOAT?g.freeFloat32(b):g.freeUint8(b)}}function u(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function c(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var s=u(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new o(t,s,e,r,n,i)}function h(t,e,r,n,i,a){var s=u(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new o(t,s,r,n,i,a)}function f(t,e){var r=e.dtype,n=e.shape.slice(),i=t.getParameter(t.MAX_TEXTURE_SIZE);if(n[0]<0||n[0]>i||n[1]<0||n[1]>i)throw new Error("gl-texture2d: Invalid texture size");var a=s(n,e.stride.slice()),l=0;"float32"===r?l=t.FLOAT:"float64"===r?(l=t.FLOAT,a=!1,r="float32"):"uint8"===r?l=t.UNSIGNED_BYTE:(l=t.UNSIGNED_BYTE,a=!1,r="uint8");var c=0;if(2===n.length)c=t.LUMINANCE,n=[n[0],n[1],1],e=p(e.data,n,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==n.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===n[2])c=t.ALPHA;else if(2===n[2])c=t.LUMINANCE_ALPHA;else if(3===n[2])c=t.RGB;else{if(4!==n[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");c=t.RGBA}}l!==t.FLOAT||t.getExtension("OES_texture_float")||(l=t.UNSIGNED_BYTE,a=!1);var h,f,d=e.size;if(a)h=0===e.offset&&e.data.length===d?e.data:e.data.subarray(e.offset,e.offset+d);else{var v=[n[2],n[2]*n[0],1];f=g.malloc(d,r);var y=p(f,n,v,0);"float32"!==r&&"float64"!==r||l!==t.UNSIGNED_BYTE?m.assign(y,e):x(y,e),h=f.subarray(0,d)}var b=u(t);return t.texImage2D(t.TEXTURE_2D,0,c,n[0],n[1],0,c,l,h),a||g.free(f),new o(t,b,n[0],n[1],c,l)}function d(t){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(v||n(t),"number"==typeof arguments[1])return c(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return c(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var e=arguments[1],r=i(e)?e:e.raw;if(r)return h(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return f(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")} -var p=t("ndarray"),m=t("ndarray-ops"),g=t("typedarray-pool");e.exports=d;var v=null,y=null,b=null,x=function(t,e){m.muls(t,e,255)},_=o.prototype;Object.defineProperties(_,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&v.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),y.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&v.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),y.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),b.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),b.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(b.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return a(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return t|=0,a(this,t,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,a(this,this._shape[0],t),t}}}),_.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},_.dispose=function(){this.gl.deleteTexture(this.handle)},_.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},_.setPixels=function(t,e,r,n){var a=this.gl;this.bind(),Array.isArray(e)?(n=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),n=n||0;var o=i(t)?t:t.raw;if(o){this._mipLevels.indexOf(n)<0?(a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,this.type,o),this._mipLevels.push(n)):a.texSubImage2D(a.TEXTURE_2D,n,e,r,this.format,this.type,o)}else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>n||r+t.shape[0]>this._shape[0]>>>n||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");l(a,e,r,n,this.format,this.type,this._mipLevels,t)}}},{ndarray:446,"ndarray-ops":440,"typedarray-pool":518}],249:[function(t,e,r){"use strict";function n(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}e.exports=n},{}],258:[function(t,e,r){function n(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}e.exports=n},{}],259:[function(t,e,r){function n(t,e,r,n){return i[0]=n,i[1]=r,i[2]=e,i[3]=t,a[0]}e.exports=n;var i=new Uint8Array(4),a=new Float32Array(i.buffer)},{}],260:[function(t,e,r){function n(t){for(var e=Array.isArray(t)?t:i(t),r=0;r0)continue;n=t.slice(0,1).join("")}return e(n),G+=n.length,U=U.slice(n.length),U.length}}function D(){return/[^a-fA-F0-9]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),R=O,F+1)}function z(){return"."===O?(U.push(O),B=g,R=O,F+1):/[eE]/.test(O)?(U.push(O),B=g,R=O,F+1):"x"===O&&1===U.length&&"0"===U[0]?(B=w,U.push(O),R=O,F+1):/[^\d]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),R=O,F+1)}function I(){return"f"===O&&(U.push(O),R=O,F+=1),/[eE]/.test(O)?(U.push(O),R=O,F+1):"-"===O&&/[eE]/.test(R)?(U.push(O),R=O,F+1):/[^\d]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),R=O,F+1)}function P(){if(/[^\d\w_]/.test(O)){var t=U.join("");return B=J.indexOf(t)>-1?b:Z.indexOf(t)>-1?y:v,e(U.join("")),B=u,F}return U.push(O),R=O,F+1}var O,R,j,F=0,N=0,B=u,U=[],V=[],H=1,q=0,G=0,Y=!1,W=!1,X="";t=t||{};var Z=o,J=i;return"300 es"===t.version&&(Z=l,J=s),function(t){return V=[],null!==t?r(t.replace?t.replace(/\r\n/g,"\n"):t):n()}}e.exports=n;var i=t("./lib/literals"),a=t("./lib/operators"),o=t("./lib/builtins"),s=t("./lib/literals-300es"),l=t("./lib/builtins-300es"),u=999,c=9999,h=0,f=1,d=2,p=3,m=4,g=5,v=6,y=7,b=8,x=9,_=10,w=11,M=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":263,"./lib/builtins-300es":262,"./lib/literals":265,"./lib/literals-300es":264,"./lib/operators":266}],262:[function(t,e,r){var n=t("./builtins");n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":263}],263:[function(t,e,r){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],264:[function(t,e,r){var n=t("./literals");e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":265}],265:[function(t,e,r){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],266:[function(t,e,r){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],267:[function(t,e,r){function n(t,e){var r=i(e),n=[];return n=n.concat(r(t)),n=n.concat(r(null))}var i=t("./index");e.exports=n},{"./index":261}],268:[function(t,e,r){"use strict";function n(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var a=new Int32Array(this.arrayBuffer);t=a[0],e=a[1],r=a[2],this.d=e+2*r;for(var o=0;o=u[f+0]&&n>=u[f+1]?(o[h]=!0,a.push(l[h])):o[h]=!1}}},n.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),u=this._convertToCellCoord(r),c=this._convertToCellCoord(n),h=s;h<=u;h++)for(var f=l;f<=c;f++){var d=this.d*f+h;if(i.call(this,t,e,r,n,d,a,o))return}},n.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},n.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=i+this.cells.length+1+1,r=0,n=0;n>1,c=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+t[e+h],h+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+h],h+=f,c-=8);if(0===a)a=1-u;else{if(a===l)return o?0/0:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),e+=o+h>=1?f/l:f*Math.pow(2,1-h),e*l>=2&&(o++,l/=2),o+h>=c?(s=0,o=c):o+h>=1?(s=(e*l-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;t[r+d]=255&o,d+=p,o/=256,u-=8);t[r+d-p]|=128*m}},{}],270:[function(t,e,r){"use strict";function n(t,e,r){this.vertices=t,this.adjacent=e,this.boundary=r,this.lastVisited=-1}function i(t,e,r){this.vertices=t,this.cell=e,this.index=r}function a(t,e){return c(t.vertices,e.vertices)}function o(t){for(var e=["function orient(){var tuple=this.tuple;return test("],r=0;r<=t;++r)r>0&&e.push(","),e.push("tuple[",r,"]");e.push(")}return orient");var n=new Function("test",e.join("")),i=u[t+1];return i||(i=u),n(i)}function s(t,e,r){this.dimension=t,this.vertices=e,this.simplices=r,this.interior=r.filter(function(t){return!t.boundary}),this.tuple=new Array(t+1);for(var n=0;n<=t;++n)this.tuple[n]=this.vertices[n];var i=h[t];i||(i=h[t]=o(t)),this.orient=i}function l(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var a=t.slice(0,i+1),o=u.apply(void 0,a);if(0===o)throw new Error("Input not in general position");for(var l=new Array(i+1),c=0;c<=i;++c)l[c]=c;o<0&&(l[0]=1,l[1]=0);for(var h=new n(l,new Array(i+1),!1),f=h.adjacent,d=new Array(i+2),c=0;c<=i;++c){for(var p=l.slice(),m=0;m<=i;++m)m===c&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var v=new n(p,new Array(i+1),!0);f[c]=v,d[c]=v}d[i+1]=h;for(var c=0;c<=i;++c)for(var p=f[c].vertices,y=f[c].adjacent,m=0;m<=i;++m){var b=p[m];if(b<0)y[m]=h;else for(var x=0;x<=i;++x)f[x].vertices.indexOf(b)<0&&(y[m]=f[x])}for(var _=new s(i,a,d),w=!!e,c=i+1;c0;){t=o.pop();for(var s=(t.vertices,t.adjacent),l=0;l<=r;++l){var u=s[l];if(u.boundary&&!(u.lastVisited<=-n)){for(var c=u.vertices,h=0;h<=r;++h){var f=c[h];i[h]=f<0?e:a[f]}var d=this.orient();if(d>0)return u;u.lastVisited=-n,0===d&&o.push(u)}}}return null},f.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,u=s.adjacent,c=0;c<=n;++c)a[c]=i[l[c]];s.lastVisited=r;for(var c=0;c<=n;++c){var h=u[c];if(!(h.lastVisited>=r)){var f=a[c];a[c]=t;var d=this.orient();if(a[c]=f,d<0){s=h;continue t}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},f.addPeaks=function(t,e){var r=this.vertices.length-1,o=this.dimension,s=this.vertices,l=this.tuple,u=this.interior,c=this.simplices,h=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,u.push(e);for(var f=[];h.length>0;){var e=h.pop(),d=e.vertices,p=e.adjacent,m=d.indexOf(r);if(!(m<0))for(var g=0;g<=o;++g)if(g!==m){var v=p[g];if(v.boundary&&!(v.lastVisited>=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var b=0,x=0;x<=o;++x)y[x]<0?(b=x,l[x]=t):l[x]=s[y[x]];var _=this.orient();if(_>0){y[b]=r,v.boundary=!1,u.push(v),h.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var w=v.adjacent,M=d.slice(),A=p.slice(),k=new n(M,A,!0);c.push(k);var T=w.indexOf(e);if(!(T<0)){w[T]=k,A[m]=v,M[g]=-1,A[g]=e,p[g]=k,k.flip();for(var x=0;x<=o;++x){var S=M[x];if(!(S<0||S===r)){for(var E=new Array(o-1),L=0,C=0;C<=o;++C){var D=M[C];D<0||C===x||(E[L++]=D)}f.push(new i(E,k,x))}}}}}}f.sort(a);for(var g=0;g+1=0?o[l++]=s[c]:u=1&c;if(u===(1&t)){var h=o[0];o[0]=o[1],o[1]=h}e.push(o)}}return e}},{"robust-orientation":486,"simplicial-complex":497}],271:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}function i(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function a(t,e){var r=p(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function o(t,e){var r=t.intervals([]);r.push(e),a(t,r)}function s(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?y:(r.splice(n,1),a(t,r),b)}function l(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function c(t,e){for(var r=0;r>1],a=[],o=[],s=[],r=0;r3*(e+1)?o(this,t):this.left.insert(t):this.left=p([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?o(this,t):this.right.insert(t):this.right=p([t]);else{var r=v.ge(this.leftPoints,t,f),n=v.ge(this.rightPoints,t,d);this.leftPoints.splice(r,0,t),this.rightPoints.splice(n,0,t)}},x.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1))return s(this,t);var r=this.left.remove(t);return 2===r?(this.left=null,this.count-=1,b):(r===b&&(this.count-=1),r)}if(t[0]>this.mid){if(!this.right)return y;if(4*(this.left?this.left.count:0)>3*(e-1))return s(this,t);var r=this.right.remove(t);return 2===r?(this.right=null,this.count-=1,b):(r===b&&(this.count-=1),r)}if(1===this.count)return this.leftPoints[0]===t?2:y;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var o=this.left,r=this.right;n.count-=a.count,n.right=a.left,a.left=o,a.right=r}i(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?i(this,this.left):i(this,this.right);return b}for(var o=v.ge(this.leftPoints,t,f);othis.mid){if(this.right){var r=this.right.queryPoint(t,e);if(r)return r}return u(this.rightPoints,t,e)}return c(this.leftPoints,e)},x.queryInterval=function(t,e,r){if(tthis.mid&&this.right){var n=this.right.queryInterval(t,e,r);if(n)return n}return ethis.mid?u(this.rightPoints,t,r):c(this.leftPoints,r)};var _=m.prototype;_.insert=function(t){this.root?this.root.insert(t):this.root=new n(t[0],null,null,[t],[t])},_.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==y}return!1},_.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},_.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(_,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(_,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":56}],272:[function(t,e,r){"use strict";function n(t,e){e=e||new Array(t.length);for(var r=0;r=r&&s<=i&&l>=n&&l<=a&&c.push(t[p]);else{var m=Math.floor((d+f)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[m]);var g=(h+1)%2;(0===h?r<=s:n<=l)&&(u.push(d),u.push(m-1),u.push(g)),(0===h?i>=s:a>=l)&&(u.push(m+1),u.push(f),u.push(g))}}return c}e.exports=n},{}],279:[function(t,e,r){"use strict";function n(t,e,r,a,o,s){if(!(o-a<=r)){var l=Math.floor((a+o)/2);i(t,e,l,a,o,s%2),n(t,e,r,a,l-1,s+1),n(t,e,r,l+1,o,s+1)}}function i(t,e,r,n,o,s){for(;o>n;){if(o-n>600){var l=o-n+1,u=r-n+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1);i(t,e,r,Math.max(n,Math.floor(r-u*h/l+f)),Math.min(o,Math.floor(r+(l-u)*h/l+f)),s)}var d=e[2*r+s],p=n,m=o;for(a(t,e,n,r),e[2*o+s]>d&&a(t,e,n,o);pd;)m--}e[2*n+s]===d?a(t,e,n,m):(m++,a(t,e,m,o)),m<=r&&(n=m+1),r<=m&&(o=m-1)}}function a(t,e,r,n){o(t,r,n),o(e,2*r,2*n),o(e,2*r+1,2*n+1)}function o(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}e.exports=n},{}],280:[function(t,e,r){"use strict";function n(t,e,r,n,a,o){for(var s=[0,t.length-1,0],l=[],u=a*a;s.length;){var c=s.pop(),h=s.pop(),f=s.pop();if(h-f<=o)for(var d=f;d<=h;d++)i(e[2*d],e[2*d+1],r,n)<=u&&l.push(t[d]);else{var p=Math.floor((f+h)/2),m=e[2*p],g=e[2*p+1];i(m,g,r,n)<=u&&l.push(t[p]);var v=(c+1)%2;(0===c?r-a<=m:n-a<=g)&&(s.push(f),s.push(p-1),s.push(v)),(0===c?r+a>=m:n+a>=g)&&(s.push(p+1),s.push(h),s.push(v))}}return l}function i(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}e.exports=n},{}],281:[function(t,e,r){"use strict";function n(t,e){var r;if(h(t)){var l,u=t.stops&&"object"==typeof t.stops[0][0],c=u||void 0!==t.property,f=u||!c,d=t.type||e||"exponential";if("exponential"===d)l=o;else if("interval"===d)l=a;else if("categorical"===d)l=i;else{if("identity"!==d)throw new Error('Unknown function type "'+d+'"');l=s}if(u){for(var p={},m=[],g=0;g=t.stops.length)break;if(e<=t.stops[n][0])break;n++}return 0===n?t.stops[n][1]:n===t.stops.length?t.stops[n-1][1]:l(e,r,t.stops[n-1][0],t.stops[n][0],t.stops[n-1][1],t.stops[n][1])}function s(t,e){return e}function l(t,e,r,n,i,a){return"function"==typeof i?function(){var o=i.apply(void 0,arguments),s=a.apply(void 0,arguments);return l(t,e,r,n,o,s)}:i.length?c(t,e,r,n,i,a):u(t,e,r,n,i,a)}function u(t,e,r,n,i,a){var o,s=n-r,l=t-r;return o=1===e?l/s:(Math.pow(e,l)-1)/(Math.pow(e,s)-1),i*(1-o)+a*o}function c(t,e,r,n,i,a){for(var o=[],s=0;s -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},linepattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_blur;\n\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_fade;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\nvoid main() {\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_linewidth.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_linewidth.t) or when fading out\n // (v_linewidth.s)\n float blur = u_blur * v_gamma_scale;\n float alpha = clamp(min(dist - (v_linewidth.t - blur), v_linewidth.s - dist) / blur, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n float y_a = 0.5 + (v_normal.y * v_linewidth.s / u_pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * v_linewidth.s / u_pattern_size_b.y);\n vec2 pos_a = mix(u_pattern_tl_a, u_pattern_br_a, vec2(x_a, y_a));\n vec2 pos_b = mix(u_pattern_tl_b, u_pattern_br_b, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n alpha *= u_opacity;\n\n gl_FragColor = color * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_linewidth;\nuniform mediump float u_gapwidth;\nuniform mediump float u_antialiasing;\nuniform mediump float u_extra;\nuniform mat2 u_antialiasingmatrix;\nuniform mediump float u_offset;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n v_linesofar = a_linesofar;\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},linesdfpattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform lowp vec4 u_color;\nuniform lowp float u_opacity;\n\nuniform float u_blur;\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\nvoid main() {\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_linewidth.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_linewidth.t) or when fading out\n // (v_linewidth.s)\n float blur = u_blur * v_gamma_scale;\n float alpha = clamp(min(dist - (v_linewidth.t - blur), v_linewidth.s - dist) / blur, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma, 0.5 + u_sdfgamma, sdfdist);\n\n gl_FragColor = u_color * (alpha * u_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_linewidth;\nuniform mediump float u_gapwidth;\nuniform mediump float u_antialiasing;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform float u_extra;\nuniform mat2 u_antialiasingmatrix;\nuniform mediump float u_offset;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},outline:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n#pragma mapbox: define lowp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = smoothstep(1.0, 0.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},outlinepattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\nvoid main() {\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = smoothstep(1.0, 0.0, dist);\n \n\n gl_FragColor = mix(color1, color2, u_mix) * alpha * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n vec2 scaled_size_a = u_scale_a * u_pattern_size_a;\n vec2 scaled_size_b = u_scale_b * u_pattern_size_b;\n\n // the correct offset needs to be calculated.\n //\n // The offset depends on how many pixels are between the world origin and\n // the edge of the tile:\n // vec2 offset = mod(pixel_coord, size)\n //\n // At high zoom levels there are a ton of pixels between the world origin\n // and the edge of the tile. The glsl spec only guarantees 16 bits of\n // precision for highp floats. We need more than that.\n //\n // The pixel_coord is passed in as two 16 bit values:\n // pixel_coord_upper = floor(pixel_coord / 2^16)\n // pixel_coord_lower = mod(pixel_coord, 2^16)\n //\n // The offset is calculated in a series of steps that should preserve this precision:\n vec2 offset_a = mod(mod(mod(u_pixel_coord_upper, scaled_size_a) * 256.0, scaled_size_a) * 256.0 + u_pixel_coord_lower, scaled_size_a);\n vec2 offset_b = mod(mod(mod(u_pixel_coord_upper, scaled_size_b) * 256.0, scaled_size_b) * 256.0 + u_pixel_coord_lower, scaled_size_b);\n\n v_pos_a = (u_tile_units_to_pixels * a_pos + offset_a) / scaled_size_a;\n v_pos_b = (u_tile_units_to_pixels * a_pos + offset_b) / scaled_size_b;\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},pattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n vec2 scaled_size_a = u_scale_a * u_pattern_size_a;\n vec2 scaled_size_b = u_scale_b * u_pattern_size_b;\n\n // the correct offset needs to be calculated.\n //\n // The offset depends on how many pixels are between the world origin and\n // the edge of the tile:\n // vec2 offset = mod(pixel_coord, size)\n //\n // At high zoom levels there are a ton of pixels between the world origin\n // and the edge of the tile. The glsl spec only guarantees 16 bits of\n // precision for highp floats. We need more than that.\n //\n // The pixel_coord is passed in as two 16 bit values:\n // pixel_coord_upper = floor(pixel_coord / 2^16)\n // pixel_coord_lower = mod(pixel_coord, 2^16)\n //\n // The offset is calculated in a series of steps that should preserve this precision:\n vec2 offset_a = mod(mod(mod(u_pixel_coord_upper, scaled_size_a) * 256.0, scaled_size_a) * 256.0 + u_pixel_coord_lower, scaled_size_a);\n vec2 offset_b = mod(mod(mod(u_pixel_coord_upper, scaled_size_b) * 256.0, scaled_size_b) * 256.0 + u_pixel_coord_lower, scaled_size_b);\n\n v_pos_a = (u_tile_units_to_pixels * a_pos + offset_a) / scaled_size_a;\n v_pos_b = (u_tile_units_to_pixels * a_pos + offset_b) / scaled_size_b;\n}\n"},raster:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity0;\nuniform float u_opacity1;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n vec4 color = color0 * u_opacity0 + color1 * u_opacity1;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb), color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n", -vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos0 = (((a_texture_pos / 32767.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},icon:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform lowp float u_opacity;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * u_opacity;\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_texture_pos;\nattribute vec4 a_data;\n\n\n// matrix is for the vertex position.\nuniform mat4 u_matrix;\n\nuniform mediump float u_zoom;\nuniform bool u_rotate_with_map;\nuniform vec2 u_extrude_scale;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n vec2 a_tex = a_texture_pos.xy;\n mediump float a_labelminzoom = a_data[0];\n mediump vec2 a_zoom = a_data.pq;\n mediump float a_minzoom = a_zoom[0];\n mediump float a_maxzoom = a_zoom[1];\n\n // u_zoom is the current zoom level adjusted for the change in font size\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\n\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\n if (u_rotate_with_map) {\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\n gl_Position.z += z * gl_Position.w;\n } else {\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n }\n\n v_tex = a_tex / u_texsize;\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\n}\n"},sdf:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform lowp vec4 u_color;\nuniform lowp float u_opacity;\nuniform lowp float u_buffer;\nuniform lowp float u_gamma;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\nvarying float v_gamma_scale;\n\nvoid main() {\n lowp float dist = texture2D(u_texture, v_tex).a;\n lowp float fade_alpha = texture2D(u_fadetexture, v_fade_tex).a;\n lowp float gamma = u_gamma * v_gamma_scale;\n lowp float alpha = smoothstep(u_buffer - gamma, u_buffer + gamma, dist) * fade_alpha;\n\n gl_FragColor = u_color * (alpha * u_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nconst float PI = 3.141592653589793;\n\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_texture_pos;\nattribute vec4 a_data;\n\n\n// matrix is for the vertex position.\nuniform mat4 u_matrix;\n\nuniform mediump float u_zoom;\nuniform bool u_rotate_with_map;\nuniform bool u_pitch_with_map;\nuniform mediump float u_pitch;\nuniform mediump float u_bearing;\nuniform mediump float u_aspect_ratio;\nuniform vec2 u_extrude_scale;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_tex = a_texture_pos.xy;\n mediump float a_labelminzoom = a_data[0];\n mediump vec2 a_zoom = a_data.pq;\n mediump float a_minzoom = a_zoom[0];\n mediump float a_maxzoom = a_zoom[1];\n\n // u_zoom is the current zoom level adjusted for the change in font size\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\n\n // pitch-alignment: map\n // rotation-alignment: map | viewport\n if (u_pitch_with_map) {\n lowp float angle = u_rotate_with_map ? (a_data[1] / 256.0 * 2.0 * PI) : u_bearing;\n lowp float asin = sin(angle);\n lowp float acos = cos(angle);\n mat2 RotationMatrix = mat2(acos, asin, -1.0 * asin, acos);\n vec2 offset = RotationMatrix * a_offset;\n vec2 extrude = u_extrude_scale * (offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\n gl_Position.z += z * gl_Position.w;\n // pitch-alignment: viewport\n // rotation-alignment: map\n } else if (u_rotate_with_map) {\n // foreshortening factor to apply on pitched maps\n // as a label goes from horizontal <=> vertical in angle\n // it goes from 0% foreshortening to up to around 70% foreshortening\n lowp float pitchfactor = 1.0 - cos(u_pitch * sin(u_pitch * 0.75));\n\n lowp float lineangle = a_data[1] / 256.0 * 2.0 * PI;\n\n // use the lineangle to position points a,b along the line\n // project the points and calculate the label angle in projected space\n // this calculation allows labels to be rendered unskewed on pitched maps\n vec4 a = u_matrix * vec4(a_pos, 0, 1);\n vec4 b = u_matrix * vec4(a_pos + vec2(cos(lineangle),sin(lineangle)), 0, 1);\n lowp float angle = atan((b[1]/b[3] - a[1]/a[3])/u_aspect_ratio, b[0]/b[3] - a[0]/a[3]);\n lowp float asin = sin(angle);\n lowp float acos = cos(angle);\n mat2 RotationMatrix = mat2(acos, -1.0 * asin, asin, acos);\n\n vec2 offset = RotationMatrix * (vec2((1.0-pitchfactor)+(pitchfactor*cos(angle*2.0)), 1.0) * a_offset);\n vec2 extrude = u_extrude_scale * (offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n gl_Position.z += z * gl_Position.w;\n // pitch-alignment: viewport\n // rotation-alignment: viewport\n } else {\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n }\n\n v_gamma_scale = (gl_Position.w - 0.5);\n\n v_tex = a_tex / u_texsize;\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\n}\n"},collisionbox:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_zoom;\nuniform float u_maxzoom;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\n\nvoid main() {\n\n float alpha = 0.5;\n\n gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0) * alpha;\n\n if (v_placement_zoom > u_zoom) {\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n }\n\n if (u_zoom >= v_max_zoom) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0) * alpha * 0.25;\n }\n\n if (v_placement_zoom >= u_maxzoom) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0) * alpha * 0.2;\n }\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_data;\n\nuniform mat4 u_matrix;\nuniform float u_scale;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos + a_extrude / u_scale, 0.0, 1.0);\n\n v_max_zoom = a_data.x;\n v_placement_zoom = a_data.y;\n}\n"}},e.exports.util="float evaluate_zoom_function_1(const vec4 values, const float t) {\n if (t < 1.0) {\n return mix(values[0], values[1], t);\n } else if (t < 2.0) {\n return mix(values[1], values[2], t - 1.0);\n } else {\n return mix(values[2], values[3], t - 2.0);\n }\n}\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\n if (t < 1.0) {\n return mix(value0, value1, t);\n } else if (t < 2.0) {\n return mix(value1, value2, t - 1.0);\n } else {\n return mix(value2, value3, t - 2.0);\n }\n}\n"},{path:454}],283:[function(t,e,r){"use strict";function n(t,e){this.message=(t?t+": ":"")+i.apply(i,Array.prototype.slice.call(arguments,2)),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)}var i=t("util").format;e.exports=n},{util:526}],284:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1;e7)return[new n(c,l,"constants have been deprecated as of v8")];if(!(l in f.constants))return[new n(c,l,'constant "%s" not found',l)];e=a({},e,{value:f.constants[l]})}return u.function&&"object"===i(l)?r(e):u.type&&s[u.type]?s[u.type](e):o(a({},e,{valueSpec:u.type?h[u.type]:u}))}},{"../error/validation_error":283,"../util/extend":284,"../util/get_type":285,"./validate_array":288,"./validate_boolean":289,"./validate_color":290,"./validate_constants":291,"./validate_enum":292,"./validate_filter":293,"./validate_function":294,"./validate_layer":296,"./validate_number":298,"./validate_object":299,"./validate_source":301,"./validate_string":302}],288:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("./validate"),a=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.valueSpec,o=t.style,s=t.styleSpec,l=t.key,u=t.arrayElementValidator||i;if("array"!==n(e))return[new a(l,e,"array expected, %s found",n(e))];if(r.length&&e.length!==r.length)return[new a(l,e,"array length %d expected, length %d found",r.length,e.length)];if(r["min-length"]&&e.length7)return r?[new n(e,r,"constants have been deprecated as of v8")]:[];var a=i(r);if("object"!==a)return[new n(e,r,"object expected, %s found",a)];var o=[];for(var s in r)"@"!==s[0]&&o.push(new n(e+"."+s,r[s],'constants must start with "@"'));return o}},{"../error/validation_error":283,"../util/get_type":285}],292:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint");e.exports=function(t){var e=t.key,r=t.value,a=t.valueSpec,o=[];return a.values.indexOf(i(r))===-1&&o.push(new n(e,r,"expected one of [%s], %s found",a.values.join(", "),r)),o}},{"../error/validation_error":283,"../util/unbundle_jsonlint":286}],293:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_enum"),a=t("../util/get_type"),o=t("../util/unbundle_jsonlint");e.exports=function t(e){var r,s=e.value,l=e.key,u=e.styleSpec,c=[];if("array"!==a(s))return[new n(l,s,"array expected, %s found",a(s))];if(s.length<1)return[new n(l,s,"filter array must have at least 1 element")];switch(c=c.concat(i({key:l+"[0]",value:s[0],valueSpec:u.filter_operator,style:e.style,styleSpec:e.styleSpec})),o(s[0])){case"<":case"<=":case">":case">=":s.length>=2&&"$type"==s[1]&&c.push(new n(l,s,'"$type" cannot be use with operator "%s"',s[0]));case"==":case"!=":3!=s.length&&c.push(new n(l,s,'filter array for operator "%s" must have 3 elements',s[0]));case"in":case"!in":s.length>=2&&(r=a(s[1]),"string"!==r?c.push(new n(l+"[1]",s[1],"string expected, %s found",r)):"@"===s[1][0]&&c.push(new n(l+"[1]",s[1],"filter key cannot be a constant")));for(var h=2;h=8&&(f&&!t.valueSpec["property-function"]?p.push(new n(t.key,t.value,"property functions not supported")):d&&!t.valueSpec["zoom-function"]&&p.push(new n(t.key,t.value,"zoom functions not supported"))),p}},{"../error/validation_error":283,"../util/get_type":285,"./validate":287,"./validate_array":288,"./validate_number":298,"./validate_object":299}],295:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_string");e.exports=function(t){var e=t.value,r=t.key,a=i(t);return a.length?a:(e.indexOf("{fontstack}")===-1&&a.push(new n(r,e,'"glyphs" url must include a "{fontstack}" token')),e.indexOf("{range}")===-1&&a.push(new n(r,e,'"glyphs" url must include a "{range}" token')),a)}},{"../error/validation_error":283,"./validate_string":302}],296:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),a=t("./validate_object"),o=t("./validate_filter"),s=t("./validate_paint_property"),l=t("./validate_layout_property"),u=t("../util/extend");e.exports=function(t){var e=[],r=t.value,c=t.key,h=t.style,f=t.styleSpec;r.type||r.ref||e.push(new n(c,r,'either "type" or "ref" is required'));var d=i(r.type),p=i(r.ref);if(r.id)for(var m=0;ma.maximum?[new i(e,r,"%s is greater than the maximum value %s",r,a.maximum)]:[]}},{"../error/validation_error":283,"../util/get_type":285}],299:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/get_type"),a=t("./validate");e.exports=function(t){var e=t.key,r=t.value,o=t.valueSpec,s=t.objectElementValidators||{},l=t.style,u=t.styleSpec,c=[],h=i(r);if("object"!==h)return[new n(e,r,"object expected, %s found",h)];for(var f in r){var d=f.split(".")[0],p=o&&(o[d]||o["*"]),m=s[d]||s["*"];p||m?c=c.concat((m||a)({key:(e?e+".":e)+f,value:r[f],valueSpec:p,style:l,styleSpec:u,object:r,objectKey:f})):""!==e&&1!==e.split(".").length&&c.push(new n(e,r[f],'unknown property "%s"',f))}for(d in o)o[d].required&&void 0===o[d].default&&void 0===r[d]&&c.push(new n(e,r,'missing required property "%s"',d));return c}},{"../error/validation_error":283,"../util/get_type":285,"./validate":287}],300:[function(t,e,r){"use strict";var n=t("./validate"),i=t("../error/validation_error");e.exports=function(t){var e=t.key,r=t.style,a=t.styleSpec,o=t.value,s=t.objectKey,l=a["paint_"+t.layerType],u=s.match(/^(.*)-transition$/);return u&&l[u[1]]&&l[u[1]].transition?n({key:e,value:o,valueSpec:a.transition,style:r,styleSpec:a}):t.valueSpec||l[s]?n({key:t.key,value:o,valueSpec:t.valueSpec||l[s],style:r,styleSpec:a}):[new i(e,o,'unknown property "%s"',s)]}},{"../error/validation_error":283,"./validate":287}],301:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),a=t("./validate_object"),o=t("./validate_enum");e.exports=function(t){var e=t.value,r=t.key,s=t.styleSpec,l=t.style;if(!e.type)return[new n(r,e,'"type" is required')];switch(i(e.type)){case"vector":case"raster":var u=[];if(u=u.concat(a({key:r,value:e,valueSpec:s.source_tile,style:t.style,styleSpec:s})),"url"in e)for(var c in e)["type","url","tileSize"].indexOf(c)<0&&u.push(new n(r+"."+c,e[c],'a source with a "url" property may not include a "%s" property',c));return u;case"geojson":return a({key:r,value:e,valueSpec:s.source_geojson,style:l,styleSpec:s});case"video":return a({key:r,value:e,valueSpec:s.source_video,style:l,styleSpec:s});case"image":return a({key:r,value:e,valueSpec:s.source_image,style:l,styleSpec:s});default:return o({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","geojson","video","image"]},style:l,styleSpec:s})}}},{"../error/validation_error":283,"../util/unbundle_jsonlint":286,"./validate_enum":292,"./validate_object":299}],302:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.key,a=n(e);return"string"!==a?[new i(r,e,"string expected, %s found",a)]:[]}},{"../error/validation_error":283,"../util/get_type":285}],303:[function(t,e,r){"use strict";function n(t,e){e=e||l;var r=[];return r=r.concat(s({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:u}})),e.$version>7&&t.constants&&(r=r.concat(o({key:"constants",value:t.constants,style:t,styleSpec:e}))),i(r)}function i(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function a(t){return function(){return i(t.apply(this,arguments))}}var o=t("./validate/validate_constants"),s=t("./validate/validate"),l=t("../reference/latest.min"),u=t("./validate/validate_glyphs_url");n.source=a(t("./validate/validate_source")),n.layer=a(t("./validate/validate_layer")),n.filter=a(t("./validate/validate_filter")),n.paintProperty=a(t("./validate/validate_paint_property")),n.layoutProperty=a(t("./validate/validate_layout_property")),e.exports=n},{"../reference/latest.min":304,"./validate/validate":287,"./validate/validate_constants":291,"./validate/validate_filter":293,"./validate/validate_glyphs_url":295,"./validate/validate_layer":296,"./validate/validate_layout_property":297,"./validate/validate_paint_property":300,"./validate/validate_source":301}],304:[function(t,e,r){e.exports=t("./v8.min.json")},{"./v8.min.json":305}],305:[function(t,e,r){e.exports={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_tile","source_geojson","source_video","source_image"],source_tile:{type:{required:!0,type:"enum",values:["vector","raster"]},url:{type:"string"},tiles:{type:"array",value:"string"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:["geojson"]},data:{type:"*"},maxzoom:{type:"number",default:14},buffer:{type:"number",default:64},tolerance:{type:"number",default:3},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:400},clusterMaxZoom:{type:"number"}},source_video:{type:{required:!0,type:"enum",values:["video"]},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:["image"]},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:["fill","line","symbol","circle","raster","background"]},metadata:{type:"*"},ref:{type:"string"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:22},maxzoom:{type:"number",minimum:0,maximum:22},interactive:{type:"boolean",default:!1},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"},"paint.*":{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],layout_background:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_fill:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_circle:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["butt","round","square"],default:"butt"},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["bevel","round","miter"],default:"miter"},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,"property-function":!0,requires:[{"line-join":"miter"}]},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,"property-function":!0,requires:[{"line-join":"round"}]},visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["point","line"],default:"point"},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,"property-function":!0,units:"pixels",requires:[{"symbol-placement":"line"}]},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image"]},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image"]},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image","text-field"]},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"viewport",requires:["icon-image"]},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!1,values:["none","both","width","height"],default:"none",requires:["icon-image","text-field"]},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image","icon-text-fit","text-field"]},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,tokens:!0},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",requires:["icon-image"]},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"pixels",requires:["icon-image"]},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],requires:["text-field"]},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"viewport",requires:["text-field"]},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"]},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-max-width":{type:"number",default:10,minimum:0,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-line-height":{type:"number",default:1.2,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-letter-spacing":{type:"number",default:0,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["left","center","right"],default:"center",requires:["text-field"]},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:"center",requires:["text-field"]},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field",{"symbol-placement":"line"}]},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]}, -"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["none","uppercase","lowercase"],default:"none",requires:["text-field"]},"text-offset":{type:"array",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"]},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field"]},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field"]},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field","icon-image"]},visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_raster:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:["==","!=",">",">=","<","<=","in","!in","all","any","none","has","!has"]},geometry_type:{type:"enum",values:["Point","LineString","Polygon"]},color_operation:{type:"enum",values:["lighten","saturate","spin","fade","mix"]},function:{stops:{type:"array",required:!0,value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:["exponential","interval","categorical"],default:"exponential"}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},paint:["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!0},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"fill-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}]},"fill-outline-color":{type:"color",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}]},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["fill-translate"]},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,transition:!0}},paint_line:{"line-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"line-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}]},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["line-translate"]},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-gap-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-offset":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,"property-function":!0,minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}]},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,transition:!0}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-blur":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["circle-translate"]},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["icon-image","icon-translate"]},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["text-field","text-translate"]}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees"},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,default:0,minimum:0,maximum:1,transition:!0},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,default:1,minimum:0,maximum:1,transition:!0},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!0,units:"milliseconds"}},paint_background:{"background-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}]},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}}}},{}],306:[function(t,e,r){"use strict";function n(t){return!!(i()&&a()&&o()&&s()&&l()&&u()&&c()&&h(t&&t.failIfMajorPerformanceCaveat))}function i(){return"undefined"!=typeof window&&"undefined"!=typeof document}function a(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function o(){return Function.prototype&&Function.prototype.bind}function s(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function l(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function u(){return"Worker"in window}function c(){return"Uint8ClampedArray"in window}function h(t){return void 0===d[t]&&(d[t]=f(t)),d[t]}function f(t){var e=document.createElement("canvas"),r=Object.create(n.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,e.probablySupportsContext?e.probablySupportsContext("webgl",r)||e.probablySupportsContext("experimental-webgl",r):e.supportsContext?e.supportsContext("webgl",r)||e.supportsContext("experimental-webgl",r):e.getContext("webgl",r)||e.getContext("experimental-webgl",r)}void 0!==e&&e.exports?e.exports=n:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=n);var d={};n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},{}],307:[function(t,e,r){"use strict";function n(t){var e=t.layoutVertexArrayType;this.layoutVertexArray=new e;var r=t.elementArrayType;r&&(this.elementArray=new r);var n=t.elementArrayType2;n&&(this.elementArray2=new n),this.paintVertexArrays=i.mapObject(t.paintVertexArrayTypes,function(t){return new t})}var i=t("../util/util");e.exports=n,n.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,n.prototype.hasCapacityFor=function(t){return this.layoutVertexArray.length+t<=n.MAX_VERTEX_ARRAY_LENGTH},n.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},n.prototype.trim=function(){this.layoutVertexArray.trim(),this.elementArray&&this.elementArray.trim(),this.elementArray2&&this.elementArray2.trim();for(var t in this.paintVertexArrays)this.paintVertexArrays[t].trim()},n.prototype.serialize=function(){return{layoutVertexArray:this.layoutVertexArray.serialize(),elementArray:this.elementArray&&this.elementArray.serialize(),elementArray2:this.elementArray2&&this.elementArray2.serialize(),paintVertexArrays:i.mapObject(this.paintVertexArrays,function(t){return t.serialize()})}},n.prototype.getTransferables=function(t){t.push(this.layoutVertexArray.arrayBuffer),this.elementArray&&t.push(this.elementArray.arrayBuffer),this.elementArray2&&t.push(this.elementArray2.arrayBuffer);for(var e in this.paintVertexArrays)t.push(this.paintVertexArrays[e].arrayBuffer)}},{"../util/util":421}],308:[function(t,e,r){"use strict";function n(t){if(this.zoom=t.zoom,this.overscaling=t.overscaling,this.layer=t.layer,this.childLayers=t.childLayers,this.type=this.layer.type,this.features=[],this.id=this.layer.id,this.index=t.index,this.sourceLayer=this.layer.sourceLayer,this.sourceLayerIndex=t.sourceLayerIndex,this.minZoom=this.layer.minzoom,this.maxZoom=this.layer.maxzoom,this.paintAttributes=i(this),t.arrays){var e=this.programInterfaces;this.bufferGroups=c.mapObject(t.arrays,function(r,n){var i=e[n],a=t.paintVertexArrayTypes[n];return r.map(function(t){return new u(t,{layoutVertexArrayType:i.layoutVertexArrayType.serialize(),elementArrayType:i.elementArrayType&&i.elementArrayType.serialize(),elementArrayType2:i.elementArrayType2&&i.elementArrayType2.serialize(),paintVertexArrayTypes:a})})})}}function i(t){var e={};for(var r in t.programInterfaces){for(var n=e[r]={},i=0;i1?p.name+_:p.name;x[w]=m[_]*g}}},n.VertexArrayType=function(t){return new h({members:t,alignment:4})},n.ElementArrayType=function(t){return new h({members:[{type:"Uint16",name:"vertices",components:t||3}]})}},{"../util/struct_array":419,"../util/util":421,"./array_group":307,"./bucket/circle_bucket":309,"./bucket/fill_bucket":310,"./bucket/line_bucket":311,"./bucket/symbol_bucket":312,"./buffer_group":314,assert:37,"feature-filter":114}],309:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var i=t("../bucket"),a=t("../../util/util"),o=t("../load_geometry"),s=i.EXTENT;e.exports=n,n.prototype=a.inherit(i,{}),n.prototype.addCircleVertex=function(t,e,r,n,i){return t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)},n.prototype.programInterfaces={circle:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"}]),elementArrayType:new i.ElementArrayType,paintAttributes:[{name:"a_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("circle-color",e,r)},multiplier:255,paintProperty:"circle-color"},{name:"a_radius",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-radius",e,r)]},multiplier:10,paintProperty:"circle-radius"},{name:"a_blur",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-blur",e,r)]},multiplier:10,paintProperty:"circle-blur"},{name:"a_opacity",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-opacity",e,r)]},multiplier:255,paintProperty:"circle-opacity"}]}},n.prototype.addFeature=function(t){for(var e={zoom:this.zoom},r=o(t),n=this.prepareArrayGroup("circle",0),i=n.layoutVertexArray.length,a=0;a=s||c<0||c>=s)){var h=this.prepareArrayGroup("circle",4),f=h.layoutVertexArray,d=this.addCircleVertex(f,u,c,-1,-1);this.addCircleVertex(f,u,c,1,-1),this.addCircleVertex(f,u,c,1,1),this.addCircleVertex(f,u,c,-1,1),h.elementArray.emplaceBack(d,d+1,d+2),h.elementArray.emplaceBack(d,d+3,d+2)}}this.populatePaintArrays("circle",e,t.properties,n,i)}},{"../../util/util":421,"../bucket":308,"../load_geometry":316}],310:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var i=t("../bucket"),a=t("../../util/util"),o=t("../load_geometry"),s=t("earcut"),l=t("../../util/classify_rings");e.exports=n,n.prototype=a.inherit(i,{}),n.prototype.programInterfaces={fill:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"}]),elementArrayType:new i.ElementArrayType(1),elementArrayType2:new i.ElementArrayType(2),paintAttributes:[{name:"a_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("fill-color",e,r)},multiplier:255,paintProperty:"fill-color"},{name:"a_outline_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("fill-outline-color",e,r)},multiplier:255,paintProperty:"fill-outline-color"},{name:"a_opacity",components:1,type:"Uint8",getValue:function(t,e,r){return[t.getPaintValue("fill-opacity",e,r)]},multiplier:255,paintProperty:"fill-opacity"}]}},n.prototype.addFeature=function(t){for(var e=o(t),r=l(e,500),n=this.prepareArrayGroup("fill",0),i=n.layoutVertexArray.length,a=0;a0&&a.push(i.length/2);for(var c=0;c=1&&n.elementArray2.emplaceBack(f-1,f),i.push(h.x),i.push(h.y)}}for(var d=s(i,a),p=0;p>6)},n.prototype.programInterfaces={line:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}]),elementArrayType:new i.ElementArrayType}},n.prototype.addFeature=function(t){for(var e=o(t,15),r=0;r2&&t[a-1].equals(t[a-2]);)a--;if(!(t.length<2)){"bevel"===e&&(n=1.05);var o=s/(512*this.overscaling)*15,u=t[0],c=t[a-1],h=u.equals(c);if(this.prepareArrayGroup("line",10*a),2!==a||!h){this.distance=0;var f,d,p,m,g,v,y,b=r,x=h?"butt":r,_=!0;this.e1=this.e2=this.e3=-1,h&&(f=t[a-2],g=u.sub(f)._unit()._perp());for(var w=0;w0){var S=f.dist(d);if(S>2*o){var E=f.sub(f.sub(d)._mult(o/S)._round());this.distance+=E.dist(d),this.addCurrentVertex(E,this.distance,m.mult(1),0,0,!1),d=E}}var L=d&&p,C=L?e:p?b:x;if(L&&"round"===C&&(kn&&(C="bevel"),"bevel"===C&&(k>2&&(C="flipbevel"),k100)M=g.clone();else{var D=m.x*g.y-m.y*g.x>0?-1:1,z=k*m.add(g).mag()/m.sub(g).mag();M._perp()._mult(z*D)}this.addCurrentVertex(f,this.distance,M,0,0,!1),this.addCurrentVertex(f,this.distance,M.mult(-1),0,0,!1)}else if("bevel"===C||"fakeround"===C){var I=m.x*g.y-m.y*g.x>0,P=-Math.sqrt(k*k-1);if(I?(y=0,v=P):(v=0,y=P),_||this.addCurrentVertex(f,this.distance,m,v,y,!1),"fakeround"===C){for(var O,R=Math.floor(8*(.5-(A-.5))),j=0;j=0;F--)O=m.mult((F+1)/(R+1))._add(g)._unit(),this.addPieSliceVertex(f,this.distance,O,I)}p&&this.addCurrentVertex(f,this.distance,g,-v,-y,!1)}else"butt"===C?(_||this.addCurrentVertex(f,this.distance,m,0,0,!1),p&&this.addCurrentVertex(f,this.distance,g,0,0,!1)):"square"===C?(_||(this.addCurrentVertex(f,this.distance,m,1,1,!1),this.e1=this.e2=-1),p&&this.addCurrentVertex(f,this.distance,g,-1,-1,!1)):"round"===C&&(_||(this.addCurrentVertex(f,this.distance,m,0,0,!1),this.addCurrentVertex(f,this.distance,m,1,1,!0),this.e1=this.e2=-1),p&&(this.addCurrentVertex(f,this.distance,g,-1,-1,!0),this.addCurrentVertex(f,this.distance,g,0,0,!1)));if(T&&w2*o){var B=f.add(p.sub(f)._mult(o/N)._round());this.distance+=B.dist(f),this.addCurrentVertex(B,this.distance,g.mult(1),0,0,!1),f=B}}_=!1}}}},n.prototype.addCurrentVertex=function(t,e,r,n,i,a){var o,s=a?1:0,l=this.arrayGroups.line[this.arrayGroups.line.length-1],c=l.layoutVertexArray,h=l.elementArray;o=r.clone(),n&&o._sub(r.perp()._mult(n)),this.e3=this.addLineVertex(c,t,o,s,0,n,e),this.e1>=0&&this.e2>=0&&h.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,o=r.mult(-1),i&&o._sub(r.perp()._mult(i)),this.e3=this.addLineVertex(c,t,o,s,1,-i,e),this.e1>=0&&this.e2>=0&&h.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,e>u/2&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,a))},n.prototype.addPieSliceVertex=function(t,e,r,n){var i=n?1:0;r=r.mult(n?-1:1);var a=this.arrayGroups.line[this.arrayGroups.line.length-1],o=a.layoutVertexArray,s=a.elementArray;this.e3=this.addLineVertex(o,t,r,0,i,0,e),this.e1>=0&&this.e2>=0&&s.emplaceBack(this.e1,this.e2,this.e3),n?this.e2=this.e3:this.e1=this.e3}},{"../../util/util":421,"../bucket":308,"../load_geometry":316}],312:[function(t,e,r){"use strict";function n(t){o.apply(this,arguments),this.showCollisionBoxes=t.showCollisionBoxes,this.overscaling=t.overscaling,this.collisionBoxArray=t.collisionBoxArray,this.symbolQuadsArray=t.symbolQuadsArray,this.symbolInstancesArray=t.symbolInstancesArray,this.sdfIcons=t.sdfIcons,this.iconsNeedLinear=t.iconsNeedLinear,this.adjustedTextSize=t.adjustedTextSize,this.adjustedIconSize=t.adjustedIconSize,this.fontstack=t.fontstack}function i(t,e,r,n,i,a,o,s,l,u,c){return t.emplaceBack(e,r,Math.round(64*n),Math.round(64*i),a/4,o/4,10*(u||0),c,10*(s||0),10*Math.min(l||25,25))}var a=t("point-geometry"),o=t("../bucket"),s=t("../../symbol/anchor"),l=t("../../symbol/get_anchors"),u=t("../../util/token"),c=t("../../symbol/quads"),h=t("../../symbol/shaping"),f=t("../../symbol/resolve_text"),d=t("../../symbol/mergelines"),p=t("../../symbol/clip_line"),m=t("../../util/util"),g=t("../load_geometry"),v=t("../../symbol/collision_feature"),y=h.shapeText,b=h.shapeIcon,x=c.getGlyphQuads,_=c.getIconQuads,w=o.EXTENT;e.exports=n,n.MAX_QUADS=65535,n.prototype=m.inherit(o,{}),n.prototype.serialize=function(){var t=o.prototype.serialize.apply(this);return t.sdfIcons=this.sdfIcons,t.iconsNeedLinear=this.iconsNeedLinear,t.adjustedTextSize=this.adjustedTextSize,t.adjustedIconSize=this.adjustedIconSize,t.fontstack=this.fontstack,t};var M=new o.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_offset",components:2,type:"Int16"},{name:"a_texture_pos",components:2,type:"Uint16"},{name:"a_data",components:4,type:"Uint8"}]),A=new o.ElementArrayType;n.prototype.addCollisionBoxVertex=function(t,e,r,n,i){return t.emplaceBack(e.x,e.y,Math.round(r.x),Math.round(r.y),10*n,10*i)},n.prototype.programInterfaces={glyph:{layoutVertexArrayType:M,elementArrayType:A},icon:{layoutVertexArrayType:M,elementArrayType:A},collisionBox:{layoutVertexArrayType:new o.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"},{name:"a_data",components:2,type:"Uint8"}])}},n.prototype.populateArrays=function(t,e,r){var n={lastIntegerZoom:1/0,lastIntegerZoomTime:0,lastZoom:0};this.adjustedTextMaxSize=this.layer.getLayoutValue("text-size",{zoom:18,zoomHistory:n}),this.adjustedTextSize=this.layer.getLayoutValue("text-size",{zoom:this.zoom+1,zoomHistory:n}),this.adjustedIconMaxSize=this.layer.getLayoutValue("icon-size",{zoom:18,zoomHistory:n}),this.adjustedIconSize=this.layer.getLayoutValue("icon-size",{zoom:this.zoom+1,zoomHistory:n});var i=512*this.overscaling;this.tilePixelRatio=w/i,this.compareText={},this.iconsNeedLinear=!1,this.symbolInstancesStartIndex=this.symbolInstancesArray.length;var a=this.layer.layout,o=this.features,s=this.textFeatures,l=.5,c=.5;switch(a["text-anchor"]){case"right":case"top-right":case"bottom-right":l=1;break;case"left":case"top-left":case"bottom-left":l=0}switch(a["text-anchor"]){case"bottom":case"bottom-right":case"bottom-left":c=1;break;case"top":case"top-right":case"top-left":c=0}for(var h="right"===a["text-justify"]?1:"left"===a["text-justify"]?0:.5,f=24*a["text-line-height"],p="line"!==a["symbol-placement"]?24*a["text-max-width"]:0,v=24*a["text-letter-spacing"],x=[24*a["text-offset"][0],24*a["text-offset"][1]],_=this.fontstack=a["text-font"].join(","),M=[],A=0;Aw||L.y<0||L.y>w);if(!d||C){var D=C||x;this.addSymbolInstance(L,T,e,r,this.layer,D,this.symbolInstancesArray.length,this.collisionBoxArray,n.index,this.sourceLayerIndex,this.index,u,m,y,h,g,b,{zoom:this.zoom},n.properties)}}}}},n.prototype.anchorIsTooClose=function(t,e,r){var n=this.compareText;if(t in n){for(var i=n[t],a=i.length-1;a>=0;a--)if(r.dist(i[a])3*Math.PI/2))){var g=p.tl,v=p.tr,y=p.bl,b=p.br,x=p.tex,_=p.anchorPoint,w=Math.max(h+Math.log(p.minScale)/Math.LN2,f),M=Math.min(h+Math.log(p.maxScale)/Math.LN2,25);if(!(M<=w)){w===f&&(w=0);var A=Math.round(p.glyphAngle/(2*Math.PI)*256),k=i(c,_.x,_.y,g.x,g.y,x.x,x.y,w,M,f,A);i(c,_.x,_.y,v.x,v.y,x.x+x.w,x.y,w,M,f,A),i(c,_.x,_.y,y.x,y.y,x.x,x.y+x.h,w,M,f,A),i(c,_.x,_.y,b.x,b.y,x.x+x.w,x.y+x.h,w,M,f,A),u.emplaceBack(k,k+1,k+2),u.emplaceBack(k+1,k+2,k+3)}}}},n.prototype.updateIcons=function(t){this.recalculateStyleLayers();var e=this.layer.layout["icon-image"];if(e)for(var r=0;rn.MAX_QUADS&&m.warnOnce("Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),k>n.MAX_QUADS&&m.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),this.symbolInstancesArray.emplaceBack(I,P,O,R,A,k,T,S,t.x,t.y,s)},n.prototype.addSymbolQuad=function(t){return this.symbolQuadsArray.emplaceBack(t.anchorPoint.x,t.anchorPoint.y,t.tl.x,t.tl.y,t.tr.x,t.tr.y,t.bl.x,t.bl.y,t.br.x,t.br.y,t.tex.h,t.tex.w,t.tex.x,t.tex.y,t.anchorAngle,t.glyphAngle,t.maxScale,t.minScale)}},{"../../symbol/anchor":370,"../../symbol/clip_line":372,"../../symbol/collision_feature":374,"../../symbol/get_anchors":376,"../../symbol/mergelines":379,"../../symbol/quads":380,"../../symbol/resolve_text":381,"../../symbol/shaping":382,"../../util/token":420,"../../util/util":421,"../bucket":308,"../load_geometry":316,"point-geometry":462}],313:[function(t,e,r){"use strict";function n(t,e,r){this.arrayBuffer=t.arrayBuffer,this.length=t.length,this.attributes=e.members,this.itemSize=e.bytesPerElement,this.type=r,this.arrayType=e}e.exports=n,n.prototype.bind=function(t){var e=t[this.type];this.buffer?t.bindBuffer(e,this.buffer):(this.buffer=t.createBuffer(),t.bindBuffer(e,this.buffer),t.bufferData(e,this.arrayBuffer,t.STATIC_DRAW),this.arrayBuffer=null)};var i={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT"};n.prototype.setVertexAttribPointers=function(t,e){for(var r=0;r0?t["line-gap-width"]+2*t["line-width"]:t["line-width"]}function s(t,e,r,n,i){if(!e[0]&&!e[1])return t;e=u.convert(e),"viewport"===r&&e._rotate(-n);for(var a=[],o=0;or.max||f.yr.max)&&i.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return l}},{"../util/util":421,"./bucket":308,assert:37}],317:[function(t,e,r){"use strict";function n(t,e,r){this.column=t,this.row=e,this.zoom=r}e.exports=n,n.prototype={clone:function(){return new n(this.column,this.row,this.zoom)},zoomTo:function(t){return this.clone()._zoomTo(t)},sub:function(t){return this.clone()._sub(t)},_zoomTo:function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},_sub:function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this}}},{}],318:[function(t,e,r){"use strict";function n(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}e.exports=n;var i=t("../util/util").wrap;n.prototype.wrap=function(){return new n(i(this.lng,-180,180),this.lat)},n.prototype.toArray=function(){return[this.lng,this.lat]},n.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{"../util/util":421}],319:[function(t,e,r){"use strict";function n(t,e){t&&(e?this.extend(t).extend(e):4===t.length?this.extend([t[0],t[1]]).extend([t[2],t[3]]):this.extend(t[0]).extend(t[1]))}e.exports=n;var i=t("./lng_lat");n.prototype={extend:function(t){var e,r,a=this._sw,o=this._ne;if(t instanceof i)e=t,r=t;else{if(!(t instanceof n))return t?this.extend(i.convert(t)||n.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return a||o?(a.lng=Math.min(e.lng,a.lng),a.lat=Math.min(e.lat,a.lat),o.lng=Math.max(r.lng,o.lng),o.lat=Math.max(r.lat,o.lat)):(this._sw=new i(e.lng,e.lat),this._ne=new i(r.lng,r.lat)),this},getCenter:function(){return new i((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},getSouthWest:function(){return this._sw},getNorthEast:function(){return this._ne},getNorthWest:function(){return new i(this.getWest(),this.getNorth())},getSouthEast:function(){return new i(this.getEast(),this.getSouth())},getWest:function(){return this._sw.lng},getSouth:function(){return this._sw.lat},getEast:function(){return this._ne.lng},getNorth:function(){return this._ne.lat},toArray:function(){return[this._sw.toArray(),this._ne.toArray()]},toString:function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"}},n.convert=function(t){return!t||t instanceof n?t:new n(t)}},{"./lng_lat":318}],320:[function(t,e,r){"use strict";function n(t,e){this.tileSize=512,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new i(0,0),this.zoom=0,this.angle=0,this._altitude=1.5,this._pitch=0,this._unmodified=!0}var i=t("./lng_lat"),a=t("point-geometry"),o=t("./coordinate"),s=t("../util/util").wrap,l=t("../util/interpolate"),u=t("../source/tile_coord"),c=t("../data/bucket").EXTENT,h=t("gl-matrix"),f=h.vec4,d=h.mat4,p=h.mat2;e.exports=n,n.prototype={get minZoom(){return this._minZoom},set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},get maxZoom(){return this._maxZoom},set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},get worldSize(){return this.tileSize*this.scale},get centerPoint(){return this.size._div(2)},get size(){return new a(this.width,this.height)},get bearing(){return-this.angle/Math.PI*180},set bearing(t){var e=-s(t,-180,180)*Math.PI/180;this.angle!==e&&(this._unmodified=!1,this.angle=e,this._calcMatrices(),this.rotationMatrix=p.create(),p.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},get pitch(){return this._pitch/Math.PI*180},set pitch(t){var e=Math.min(60,t)/180*Math.PI;this._pitch!==e&&(this._unmodified=!1,this._pitch=e,this._calcMatrices())},get altitude(){return this._altitude},set altitude(t){var e=Math.max(.75,t);this._altitude!==e&&(this._unmodified=!1,this._altitude=e,this._calcMatrices())},get zoom(){return this._zoom},set zoom(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._calcMatrices(),this._constrain())},get center(){return this._center},set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._calcMatrices(),this._constrain())},coveringZoomLevel:function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},coveringTiles:function(t){var e=this.coveringZoomLevel(t),r=e;if(et.maxzoom&&(e=t.maxzoom);var n=this,i=n.locationCoordinate(n.center)._zoomTo(e),o=new a(i.column-.5,i.row-.5);return u.cover(e,[n.pointCoordinate(new a(0,0))._zoomTo(e),n.pointCoordinate(new a(n.width,0))._zoomTo(e),n.pointCoordinate(new a(n.width,n.height))._zoomTo(e),n.pointCoordinate(new a(0,n.height))._zoomTo(e)],t.reparseOverscaled?r:e).sort(function(t,e){return o.dist(t)-o.dist(e)})},resize:function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._calcMatrices(),this._constrain()},get unmodified(){return this._unmodified},zoomScale:function(t){return Math.pow(2,t)},scaleZoom:function(t){return Math.log(t)/Math.LN2},project:function(t,e){return new a(this.lngX(t.lng,e),this.latY(t.lat,e))},unproject:function(t,e){return new i(this.xLng(t.x,e),this.yLat(t.y,e))},get x(){return this.lngX(this.center.lng)},get y(){return this.latY(this.center.lat)},get point(){return new a(this.x,this.y)},lngX:function(t,e){return(180+t)*(e||this.worldSize)/360},latY:function(t,e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*(e||this.worldSize)/360},xLng:function(t,e){return 360*t/(e||this.worldSize)-180},yLat:function(t,e){var r=180-360*t/(e||this.worldSize);return 360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90},panBy:function(t){var e=this.centerPoint._add(t);this.center=this.pointLocation(e)},setLocationAtPoint:function(t,e){var r=this.locationCoordinate(t),n=this.pointCoordinate(e),i=this.pointCoordinate(this.centerPoint),a=n._sub(r);this._unmodified=!1,this.center=this.coordinateLocation(i._sub(a))},locationPoint:function(t){return this.coordinatePoint(this.locationCoordinate(t))},pointLocation:function(t){return this.coordinateLocation(this.pointCoordinate(t))},locationCoordinate:function(t){var e=this.zoomScale(this.tileZoom)/this.worldSize,r=i.convert(t);return new o(this.lngX(r.lng)*e,this.latY(r.lat)*e,this.tileZoom)},coordinateLocation:function(t){var e=this.zoomScale(t.zoom);return new i(this.xLng(t.column,e),this.yLat(t.row,e))},pointCoordinate:function(t){var e=[t.x,t.y,0,1],r=[t.x,t.y,1,1];f.transformMat4(e,e,this.pixelMatrixInverse),f.transformMat4(r,r,this.pixelMatrixInverse);var n=e[3],i=r[3],a=e[0]/n,s=r[0]/i,u=e[1]/n,c=r[1]/i,h=e[2]/n,d=r[2]/i,p=h===d?0:(0-h)/(d-h),m=this.worldSize/this.zoomScale(this.tileZoom);return new o(l(a,s,p)/m,l(u,c,p)/m,this.tileZoom)},coordinatePoint:function(t){var e=this.worldSize/this.zoomScale(t.zoom),r=[t.column*e,t.row*e,0,1];return f.transformMat4(r,r,this.pixelMatrix),new a(r[0]/r[3],r[1]/r[3])},calculatePosMatrix:function(t,e){void 0===e&&(e=1/0),t instanceof u&&(t=t.toCoordinate(e));var r=Math.min(t.zoom,e),n=this.worldSize/Math.pow(2,r),i=new Float64Array(16);return d.identity(i),d.translate(i,i,[t.column*n,t.row*n,0]),d.scale(i,i,[n/c,n/c,1]),d.multiply(i,this.projMatrix,i),new Float32Array(i)},_constrain:function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,e,r,n,i,o,s,l,u=this.size,c=this._unmodified;this.latRange&&(t=this.latY(this.latRange[1]),e=this.latY(this.latRange[0]),i=e-te&&(l=e-d)}if(this.lngRange){var p=this.x,m=u.x/2;p-mn&&(s=n-m)}void 0===s&&void 0===l||(this.center=this.unproject(new a(void 0!==s?s:this.x,void 0!==l?l:this.y))),this._unmodified=c,this._constraining=!1}},_calcMatrices:function(){if(this.height){var t=Math.atan(.5/this.altitude),e=Math.sin(t)*this.altitude/Math.sin(Math.PI/2-this._pitch-t),r=Math.cos(Math.PI/2-this._pitch)*e+this.altitude,n=new Float64Array(16);if(d.perspective(n,2*Math.atan(this.height/2/this.altitude),this.width/this.height,.1,r),d.translate(n,n,[0,0,-this.altitude]),d.scale(n,n,[1,-1,1/this.height]),d.rotateX(n,n,this._pitch),d.rotateZ(n,n,this.angle),d.translate(n,n,[-this.x,-this.y,0]),this.projMatrix=n,n=d.create(),d.scale(n,n,[this.width/2,-this.height/2,1]),d.translate(n,n,[1,-1,0]),this.pixelMatrix=d.multiply(new Float64Array(16),n,this.projMatrix),!(n=d.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=n}}}},{"../data/bucket":308,"../source/tile_coord":348,"../util/interpolate":415,"../util/util":421,"./coordinate":317,"./lng_lat":318,"gl-matrix":174,"point-geometry":462}],321:[function(t,e,r){"use strict";var n={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]};e.exports=function(t,e,r,i){i=i||1;var a,o,s,l,u,c,h,f,d=[];for(a=0,o=t.length;a>16,_>>16),s.uniform2f(n.u_pixel_coord_lower,65535&x,65535&_)}s.uniformMatrix4fv(n.u_matrix,!1,t.transform.calculatePosMatrix(v)),s.drawArrays(s.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}s.stencilMask(0),s.stencilFunc(s.EQUAL,128,128)}var i=t("../source/pixels_to_tile_units"),a=t("./create_uniform_pragmas"),o=512;e.exports=n},{"../source/pixels_to_tile_units":342,"./create_uniform_pragmas":323}],325:[function(t,e,r){"use strict";function n(t,e,r,n){if(!t.isOpaquePass){var a=t.gl;t.setDepthSublayer(0),t.depthMask(!1),a.disable(a.STENCIL_TEST);for(var o=0;o>16,f>>16),o.uniform2f(a.u_pixel_coord_lower,65535&h,65535&f),o.activeTexture(o.TEXTURE0),i.spriteAtlas.bind(o,!0)}}var s=t("../source/pixels_to_tile_units");e.exports=n},{"../source/pixels_to_tile_units":342}],329:[function(t,e,r){"use strict";var n=t("../util/browser"),i=t("gl-matrix").mat2,a=t("../source/pixels_to_tile_units");e.exports=function(t,e,r,o){if(!t.isOpaquePass){t.setDepthSublayer(0),t.depthMask(!1);var s=t.gl;if(s.enable(s.STENCIL_TEST),!(r.paint["line-width"]<=0)){var l=1/n.devicePixelRatio,u=r.paint["line-blur"]+l,c=r.paint["line-color"],h=t.transform,f=i.create();i.scale(f,f,[1,Math.cos(h._pitch)]),i.rotate(f,f,t.transform.angle);var d,p,m,g,v,y=Math.sqrt(h.height*h.height/4*(1+h.altitude*h.altitude)),b=h.height/2*Math.tan(h._pitch),x=(y+b)/y-1,_=r.paint["line-dasharray"],w=r.paint["line-pattern"];if(_)d=t.useProgram("linesdfpattern"),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform4fv(d.u_color,c),s.uniform1f(d.u_opacity,r.paint["line-opacity"]),p=t.lineAtlas.getDash(_.from,"round"===r.layout["line-cap"]),m=t.lineAtlas.getDash(_.to,"round"===r.layout["line-cap"]),s.uniform1i(d.u_image,0),s.activeTexture(s.TEXTURE0),t.lineAtlas.bind(s),s.uniform1f(d.u_tex_y_a,p.y),s.uniform1f(d.u_tex_y_b,m.y),s.uniform1f(d.u_mix,_.t),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f);else if(w){if(g=t.spriteAtlas.getPosition(w.from,!0),v=t.spriteAtlas.getPosition(w.to,!0),!g||!v)return;d=t.useProgram("linepattern"),s.uniform1i(d.u_image,0),s.activeTexture(s.TEXTURE0),t.spriteAtlas.bind(s,!0),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform2fv(d.u_pattern_tl_a,g.tl),s.uniform2fv(d.u_pattern_br_a,g.br),s.uniform2fv(d.u_pattern_tl_b,v.tl),s.uniform2fv(d.u_pattern_br_b,v.br),s.uniform1f(d.u_fade,w.t),s.uniform1f(d.u_opacity,r.paint["line-opacity"]),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f)}else d=t.useProgram("line"),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f),s.uniform4fv(d.u_color,c),s.uniform1f(d.u_opacity,r.paint["line-opacity"]);for(var M=0;M0?1/(1-t):1+t}function s(t){return t>0?1-1/(1.001-t):-t}function l(t,e,r,n){var i=[1,0],a=r.paint["raster-fade-duration"];if(t.source&&a>0){var o=(new Date).getTime(),s=(o-t.timeAdded)/a,l=e?(o-e.timeAdded)/a:-1,c=n.coveringZoomLevel(t.source),h=!!e&&Math.abs(e.coord.z-c)>Math.abs(t.coord.z-c);!e||h?(i[0]=u.clamp(s,0,1),i[1]=1-i[0]):(i[0]=u.clamp(1-l,0,1),i[1]=1-i[0])}var f=r.paint["raster-opacity"];return i[0]*=f,i[1]*=f,i}var u=t("../util/util"),c=t("../util/struct_array");e.exports=n,n.RasterBoundsArray=new c({members:[{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]})},{"../util/struct_array":419,"../util/util":421}],331:[function(t,e,r){"use strict";function n(t,e,r,n){if(!t.isOpaquePass){var a=!(r.layout["text-allow-overlap"]||r.layout["icon-allow-overlap"]||r.layout["text-ignore-placement"]||r.layout["icon-ignore-placement"]),o=t.gl;a?o.disable(o.STENCIL_TEST):o.enable(o.STENCIL_TEST),t.setDepthSublayer(0),t.depthMask(!1),o.disable(o.DEPTH_TEST),i(t,e,r,n,!1,r.paint["icon-translate"],r.paint["icon-translate-anchor"],r.layout["icon-rotation-alignment"],r.layout["icon-rotation-alignment"],r.layout["icon-size"],r.paint["icon-halo-width"],r.paint["icon-halo-color"],r.paint["icon-halo-blur"],r.paint["icon-opacity"],r.paint["icon-color"]),i(t,e,r,n,!0,r.paint["text-translate"],r.paint["text-translate-anchor"],r.layout["text-rotation-alignment"],r.layout["text-pitch-alignment"],r.layout["text-size"],r.paint["text-halo-width"],r.paint["text-halo-color"],r.paint["text-halo-blur"],r.paint["text-opacity"],r.paint["text-color"]),o.enable(o.DEPTH_TEST),e.map.showCollisionBoxes&&s(t,e,r,n)}}function i(t,e,r,n,i,o,s,l,u,c,h,f,d,p,m){for(var g=0;gthis.previousZoom;r--)this.changeTimes[r]=e,this.changeOpacities[r]=this.opacities[r];for(r=0;r<256;r++){var n=e-this.changeTimes[r],i=n/this.fadeDuration*255;this.opacities[r]=r<=t?this.changeOpacities[r]+i:this.changeOpacities[r]-i}this.changed=!0,this.previousZoom=t},n.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.changed&&(t.texSubImage2D(t.TEXTURE_2D,0,0,0,256,1,t.ALPHA,t.UNSIGNED_BYTE,this.array),this.changed=!1)):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,256,1,0,t.ALPHA,t.UNSIGNED_BYTE,this.array))}},{}],333:[function(t,e,r){"use strict";function n(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}}var i=t("../util/util");e.exports=n,n.prototype.setSprite=function(t){this.sprite=t},n.prototype.getDash=function(t,e){var r=t.join(",")+e;return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},n.prototype.addDash=function(t,e){var r=e?7:0,n=2*r+1;if(this.nextRow+n>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o0?e.pop():null},n.prototype.lineWidth=function(t){this.gl.lineWidth(c.clamp(t,this.lineWidthRange[0],this.lineWidthRange[1]))},n.prototype.showOverdrawInspector=function(t){if(t||this._showOverdrawInspector){this._showOverdrawInspector=t;var e=this.gl;if(t){e.blendFunc(e.CONSTANT_COLOR,e.ONE);e.blendColor(1/8,1/8,1/8,0),e.clearColor(0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)}else e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)}}},{"../data/bucket":308,"../data/buffer":313,"../source/pixels_to_tile_units":342,"../source/source_cache":346,"../util/browser":405,"../util/struct_array":419,"../util/util":421,"./create_uniform_pragmas":323,"./draw_background":324,"./draw_circle":325,"./draw_debug":327,"./draw_fill":328,"./draw_line":329,"./draw_raster":330,"./draw_symbol":331,"./frame_history":332,"./painter/use_program":335,"./vertex_array_object":336,"gl-matrix":174}],335:[function(t,e,r){"use strict";function n(t,e){return t.replace(/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,function(t,r,n,i,a){return e[r][a].replace(/{type}/g,i).replace(/{precision}/g,n)})}var i=t("assert"),a=t("../../util/util"),o=t("mapbox-gl-shaders"),s=o.util;e.exports._createProgram=function(t,e,r,l){for(var u=this.gl,c=u.createProgram(),h=o[t],f="#define MAPBOX_GL_JS;\n",d=0;dthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,n={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,overscaling:r,angle:this.map.transform.angle, -pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send("load tile",n,function(r,n){if(t.unloadVectorData(this.map.painter),!t.aborted)return r?e(r):(t.loadVectorData(n,this.map.style),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(this)),e(null))}.bind(this),this.workerID)},abortTile:function(t){t.aborted=!0},unloadTile:function(t){t.unloadVectorData(this.map.painter),this.dispatcher.send("remove tile",{uid:t.uid,source:this.id},function(){},t.workerID)},serialize:function(){return{type:this.type,data:this._data}}})},{"../data/bucket":308,"../util/evented":413,"../util/util":421,"resolve-url":479}],338:[function(t,e,r){"use strict";function n(t,e,r){r&&(this.loadGeoJSON=r),h.call(this,t,e)}var i=t("../util/util"),a=t("../util/ajax"),o=t("geojson-rewind"),s=t("./geojson_wrapper"),l=t("vt-pbf"),u=t("supercluster"),c=t("geojson-vt"),h=t("./vector_tile_worker_source");e.exports=n,n.prototype=i.inherit(h,{_geoJSONIndexes:{},loadVectorData:function(t,e){var r=t.source,n=t.coord;if(!this._geoJSONIndexes[r])return e(null,null);var i=this._geoJSONIndexes[r].getTile(Math.min(n.z,t.maxZoom),n.x,n.y);if(!i)return e(null,null);var a=new s(i.features);a.name="_geojsonTileLayer";var o=l({layers:{_geojsonTileLayer:a}});0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{tile:a,rawTileData:o.buffer})},loadData:function(t,e){var r=function(r,n){return r?e(r):"object"!=typeof n?e(new Error("Input data is not a valid GeoJSON object.")):(o(n,!0),void this._indexData(n,t,function(r,n){if(r)return e(r);this._geoJSONIndexes[t.source]=n,e(null)}.bind(this)))}.bind(this);this.loadGeoJSON(t,r)},loadGeoJSON:function(t,e){if(t.url)a.getJSON(t.url,e);else{if("string"!=typeof t.data)return e(new Error("Input data is not a valid GeoJSON object."));try{return e(null,JSON.parse(t.data))}catch(t){return e(new Error("Input data is not a valid GeoJSON object."))}}},_indexData:function(t,e,r){try{e.cluster?r(null,u(e.superclusterOptions).load(t.features)):r(null,c(t,e.geojsonVtOptions))}catch(t){return r(t)}}})},{"../util/ajax":404,"../util/util":421,"./geojson_wrapper":339,"./vector_tile_worker_source":350,"geojson-rewind":120,"geojson-vt":124,supercluster:506,"vt-pbf":533}],339:[function(t,e,r){"use strict";function n(t){this.features=t,this.length=t.length,this.extent=s}function i(t){if(this.type=t.type,1===t.type){this.rawGeometry=[];for(var e=0;ee)){var o=Math.pow(2,Math.min(a.coord.z,this.maxzoom)-Math.min(t.z,this.maxzoom));if(Math.floor(a.coord.x/o)===t.x&&Math.floor(a.coord.y/o)===t.y)for(r[i]=!0,n=!0;a&&a.coord.z-1>t.z;){var s=a.coord.parent(this.maxzoom).id;a=this._tiles[s],a&&a.isRenderable()&&(delete r[i],r[s]=!0)}}}return n},findLoadedParent:function(t,e,r){for(var n=t.z-1;n>=e;n--){t=t.parent(this.maxzoom);var i=this._tiles[t.id];if(i&&i.isRenderable())return r[t.id]=!0,i;if(this._cache.has(t.id))return this.addTile(t),r[t.id]=!0,this._tiles[t.id]}},updateCacheSize:function(t){var e=Math.ceil(t.width/t.tileSize)+1,r=Math.ceil(t.height/t.tileSize)+1,n=e*r;this._cache.setMaxSize(Math.floor(5*n))},update:function(t,e){if(this._sourceLoaded){var r,i,a;this.updateCacheSize(t);var o=(this.roundZoom?Math.round:Math.floor)(this.getZoom(t)),s=Math.max(o-n.maxOverzooming,this.minzoom),l=Math.max(o+n.maxUnderzooming,this.minzoom),c={},h=(new Date).getTime();this._coveredTiles={};var d=this.used?t.coveringTiles(this._source):[];for(r=0;rh-(e||0)&&(this.findLoadedChildren(i,l,c)&&(c[v]=!0),this.findLoadedParent(i,s,p))}var y;for(y in p)c[y]||(this._coveredTiles[y]=!0);for(y in p)c[y]=!0;var b=f.keysDifference(this._tiles,c);for(r=0;rthis.maxzoom?Math.pow(2,n-this.maxzoom):1;e=new s(r,this.tileSize*i,this.maxzoom),this.loadTile(e,this._tileLoaded.bind(this,e))}return e.uses++,this._tiles[t.id]=e,this.fire("tile.add",{tile:e}),this._source.fire("tile.add",{tile:e}),e},removeTile:function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this.fire("tile.remove",{tile:e}),this._source.fire("tile.remove",{tile:e}),e.uses>0||(e.isRenderable()?this._cache.add(e.coord.wrapped().id,e):(e.aborted=!0,this.abortTile(e),this.unloadTile(e))))},clearTiles:function(){for(var t in this._tiles)this.removeTile(t);this._cache.reset()},tilesIn:function(t){for(var e={},r=this.getIds(),n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0].zoom,c=0;c=0&&v[1].y>=0){for(var y=[],b=0;b=0&&t%1==0),l(!isNaN(e)&&e>=0&&e%1==0),l(!isNaN(r)&&r>=0&&r%1==0),isNaN(n)&&(n=0),this.z=+t,this.x=+e,this.y=+r,this.w=+n,(n*=2)<0&&(n=n*-1-1);var i=1<0;a--)n=1<e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function o(t,e,r,n,i){var a=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx0,h=e.dx<0,f=a;fc.dy&&(l=u,u=c,c=l),u.dy>h.dy&&(l=u,u=h,h=l),c.dy>h.dy&&(l=c,c=h,h=l),u.dy&&o(h,u,n,i,s),c.dy&&o(h,c,n,i,s)}var l=t("assert"),u=t("whoots-js"),c=t("../geo/coordinate");e.exports=n,n.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y},n.prototype.toCoordinate=function(t){var e=Math.min(this.z,t),r=Math.pow(2,e),n=this.y,i=this.x+r*this.w;return new c(i,n,e)},n.fromID=function(t){var e=t%32,r=1<t?new n(this.z-1,this.x,this.y,this.w):new n(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},n.prototype.wrapped=function(){return new n(this.z,this.x,this.y,0)},n.prototype.children=function(t){if(this.z>=t)return[new n(this.z+1,this.x,this.y,this.w)];var e=this.z+1,r=2*this.x,i=2*this.y;return[new n(e,r,i,this.w),new n(e,r+1,i,this.w),new n(e,r,i+1,this.w),new n(e,r+1,i+1,this.w)]},n.cover=function(t,e,r){function i(t,e,i){var s,l,u;if(i>=0&&i<=a)for(s=t;sthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,i={url:s(t.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),uid:t.uid,coord:t.coord,zoom:t.coord.z,tileSize:this.tileSize*n,source:this.id,overscaling:n,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID?"loading"===t.state?t.reloadCallback=e:(i.rawTileData=t.rawTileData,this.dispatcher.send("reload tile",i,r.bind(this),t.workerID)):t.workerID=this.dispatcher.send("load tile",i,r.bind(this))},abortTile:function(t){this.dispatcher.send("abort tile",{uid:t.uid,source:this.id},null,t.workerID)},unloadTile:function(t){t.unloadVectorData(this.map.painter),this.dispatcher.send("remove tile",{uid:t.uid,source:this.id},null,t.workerID)}})},{"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./load_tilejson":341}],350:[function(t,e,r){"use strict";function n(t,e,r){this.actor=t,this.styleLayers=e,r&&(this.loadVectorData=r),this.loading={},this.loaded={}}var i=t("../util/ajax"),a=t("vector-tile"),o=t("pbf"),s=t("./worker_tile");e.exports=n,n.prototype={loadTile:function(t,e){function r(t,r){return delete this.loading[n][i],t?e(t):r?(a.data=r.tile,a.parse(a.data,this.styleLayers.getLayerFamilies(),this.actor,r.rawTileData,e),this.loaded[n]=this.loaded[n]||{},void(this.loaded[n][i]=a)):e(null,null)}var n=t.source,i=t.uid;this.loading[n]||(this.loading[n]={});var a=this.loading[n][i]=new s(t);a.abort=this.loadVectorData(t,r.bind(this))},reloadTile:function(t,e){var r=this.loaded[t.source],n=t.uid;if(r&&r[n]){var i=r[n];i.parse(i.data,this.styleLayers.getLayerFamilies(),this.actor,t.rawTileData,e)}},abortTile:function(t){var e=this.loading[t.source],r=t.uid;e&&e[r]&&e[r].abort&&(e[r].abort(),delete e[r])},removeTile:function(t){var e=this.loaded[t.source],r=t.uid;e&&e[r]&&delete e[r]},loadVectorData:function(t,e){function r(t,r){if(t)return e(t);var n=new a.VectorTile(new o(new Uint8Array(r)));e(t,{tile:n,rawTileData:r})}var n=i.getArrayBuffer(t.url,r.bind(this));return function(){n.abort()}},redoPlacement:function(t,e){var r=this.loaded[t.source],n=this.loading[t.source],i=t.uid;if(r&&r[i]){var a=r[i],o=a.redoPlacement(t.angle,t.pitch,t.showCollisionBoxes);o.result&&e(null,o.result,o.transferables)}else n&&n[i]&&(n[i].angle=t.angle)}}},{"../util/ajax":404,"./worker_tile":353,pbf:456,"vector-tile":527}],351:[function(t,e,r){"use strict";function n(t,e){this.id=t,this.urls=e.urls,this.coordinates=e.coordinates,u.getVideo(e.urls,function(t,r){if(t)return this.fire("error",{error:t});this.video=r,this.video.loop=!0;var n;this.video.addEventListener("playing",function(){n=this.map.style.animationLoop.set(1/0),this.map._rerender()}.bind(this)),this.video.addEventListener("pause",function(){this.map.style.animationLoop.cancel(n)}.bind(this)),this.map&&(this.video.play(),this.setCoordinates(e.coordinates)),this.fire("load")}.bind(this))}var i=t("../util/util"),a=t("./tile_coord"),o=t("../geo/lng_lat"),s=t("point-geometry"),l=t("../util/evented"),u=t("../util/ajax"),c=t("../data/bucket").EXTENT,h=t("../render/draw_raster").RasterBoundsArray,f=t("../data/buffer"),d=t("../render/vertex_array_object");e.exports=n,n.prototype=i.inherit(l,{minzoom:0,maxzoom:22,tileSize:512,roundZoom:!0,getVideo:function(){return this.video},onAdd:function(t){this.map||(this.map=t,this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},setCoordinates:function(t){this.coordinates=t;var e=this.map,r=t.map(function(t){return e.transform.locationCoordinate(o.convert(t)).zoomTo(0)}),n=this.centerCoord=i.getCoordinatesCenter(r);return n.column=Math.round(n.column),n.row=Math.round(n.row),this.minzoom=this.maxzoom=n.zoom,this._coord=new a(n.zoom,n.column,n.row),this._tileCoords=r.map(function(t){var e=t.zoomTo(n.zoom);return new s(Math.round((e.column-n.column)*c),Math.round((e.row-n.row)*c))}),this.fire("change"),this},_setTile:function(t){this._prepared=!1,this.tile=t;var e=new h;e.emplaceBack(this._tileCoords[0].x,this._tileCoords[0].y,0,0),e.emplaceBack(this._tileCoords[1].x,this._tileCoords[1].y,32767,0),e.emplaceBack(this._tileCoords[3].x,this._tileCoords[3].y,0,32767),e.emplaceBack(this._tileCoords[2].x,this._tileCoords[2].y,32767,32767),this.tile.buckets={},this.tile.boundsBuffer=new f(e.serialize(),h.serialize(),f.BufferType.VERTEX),this.tile.boundsVAO=new d,this.tile.state="loaded"},prepare:function(){if(!(this.video.readyState<2)&&this.tile){var t=this.map.painter.gl;this._prepared?(t.bindTexture(t.TEXTURE_2D,this.tile.texture),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,this.video)):(this._prepared=!0,this.tile.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.tile.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.video)),this._currentTime=this.video.currentTime}},loadTile:function(t,e){this._coord&&this._coord.toString()===t.coord.toString()?(this._setTile(t),e(null)):(t.state="errored",e(null))},serialize:function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}})},{"../data/bucket":308,"../data/buffer":313,"../geo/lng_lat":318,"../render/draw_raster":330,"../render/vertex_array_object":336,"../util/ajax":404,"../util/evented":413,"../util/util":421,"./tile_coord":348,"point-geometry":462}],352:[function(t,e,r){"use strict";function n(t){this.self=t,this.actor=new a(t,this);var e={getLayers:function(){return this.layers}.bind(this),getLayerFamilies:function(){return this.layerFamilies}.bind(this)};this.workerSources={vector:new l(this.actor,e),geojson:new u(this.actor,e)},this.self.registerWorkerSource=function(t,r){if(this.workerSources[t])throw new Error('Worker source with name "'+t+'" already registered.');this.workerSources[t]=new r(this.actor,e)}.bind(this)}function i(t){var e={};for(var r in t){var n=t[r],i=n.ref||n.id,a=t[i];a.layout&&"none"===a.layout.visibility||(e[i]=e[i]||[],r===i?e[i].unshift(n):e[i].push(n))}return e}var a=t("../util/actor"),o=t("../style/style_layer"),s=t("../util/util"),l=t("./vector_tile_worker_source"),u=t("./geojson_worker_source");e.exports=function(t){return new n(t)},s.extend(n.prototype,{"set layers":function(t){function e(t){var e=o.create(t,t.ref&&r.layers[t.ref]);e.updatePaintTransitions({},{transition:!1}),r.layers[e.id]=e}this.layers={};for(var r=this,n=[],a=0;a=0;e--)b(E,P[e]);x()}}function b(t,e){if(e.populateArrays(k,F,j),"symbol"!==e.type)for(var r=0;r=w.maxzoom||w.layout&&"none"===w.layout.visibility||t.layers&&!t.layers[w.sourceLayer]||(A=c.create({layer:w,index:D++,childLayers:e[z],zoom:this.zoom,overscaling:this.overscaling,showCollisionBoxes:this.showCollisionBoxes,collisionBoxArray:this.collisionBoxArray,symbolQuadsArray:this.symbolQuadsArray,symbolInstancesArray:this.symbolInstancesArray,sourceLayerIndex:S.encode(w.sourceLayer||"_geojsonTileLayer")}),A.createFilter(),L[w.id]=A,t.layers&&(M=w.sourceLayer,C[M]=C[M]||{},C[M][w.id]=A)));if(t.layers)for(M in C)1===w.version&&d.warnOnce('Vector tile source "'+this.source+'" layer "'+M+'" does not use vector tile spec v2 and therefore may have some rendering errors.'),(w=t.layers[M])&&v(w,C[M]);else v(t,L);var I=[],P=this.symbolBuckets=[],O=[];T.bucketLayerIDs={};for(var R in L)A=L[R],0!==A.features.length&&(T.bucketLayerIDs[A.index]=A.childLayers.map(s),I.push(A),"symbol"===A.type?P.push(A):O.push(A));var j={},F={},N=0;if(P.length>0){for(_=P.length-1;_>=0;_--)P[_].updateIcons(j),P[_].updateFont(F);for(var B in F)F[B]=Object.keys(F[B]).map(Number);j=Object.keys(j),r.send("get glyphs",{uid:this.uid,stacks:F},function(t,e){F=e,y(t)}),j.length?r.send("get icons",{icons:j},function(t,e){j=e,y(t)}):y()}for(_=O.length-1;_>=0;_--)b(this,O[_]);if(0===P.length)return x()},n.prototype.redoPlacement=function(t,e,r){if("done"!==this.status)return this.redoPlacementAfterDone=!0,this.angle=t,{};for(var n=new u(t,e,this.collisionBoxArray),s=this.symbolBuckets,l=s.length-1;l>=0;l--)s[l].placeFeatures(n,r);var c=n.serialize(),h=s.filter(i);return{result:{buckets:h.map(a),collisionTile:c.data},transferables:o(h).concat(c.transferables)}}},{"../data/bucket":308,"../data/feature_index":315,"../symbol/collision_box":373,"../symbol/collision_tile":375,"../symbol/symbol_instances":384,"../symbol/symbol_quads":385,"../util/dictionary_coder":411,"../util/util":421}],354:[function(t,e,r){"use strict";function n(){this.n=0,this.times=[]}e.exports=n,n.prototype.stopped=function(){return this.times=this.times.filter(function(t){return t.time>=(new Date).getTime()}),!this.times.length},n.prototype.set=function(t){return this.times.push({id:this.n,time:t+(new Date).getTime()}),this.n++},n.prototype.cancel=function(t){this.times=this.times.filter(function(e){return e.id!==t})}},{}],355:[function(t,e,r){"use strict";function n(t){this.base=t,this.retina=s.devicePixelRatio>1;var e=this.retina?"@2x":"";o.getJSON(l(t,e,".json"),function(t,e){if(t)return void this.fire("error",{error:t});this.data=e,this.img&&this.fire("load")}.bind(this)),o.getImage(l(t,e,".png"),function(t,e){if(t)return void this.fire("error",{error:t});for(var r=e.getData(),n=e.data=new Uint8Array(r.length),i=0;i1!==this.retina){var t=new n(this.base);t.on("load",function(){this.img=t.img,this.data=t.data,this.retina=t.retina}.bind(this))}},i.prototype={x:0,y:0,width:0,height:0,pixelRatio:1,sdf:!1},n.prototype.getSpritePosition=function(t){if(!this.loaded())return new i;var e=this.data&&this.data[t];return e&&this.img?e:new i}},{"../util/ajax":404,"../util/browser":405,"../util/evented":413,"../util/mapbox":418}],356:[function(t,e,r){"use strict";var n=t("csscolorparser").parseCSSColor,i=t("../util/util"),a=t("./style_function"),o={};e.exports=function t(e){if(a.isFunctionDefinition(e))return i.extend({},e,{stops:e.stops.map(function(e){return[e[0],t(e[1])]})});if("string"==typeof e){if(!o[e]){var r=n(e);if(!r)throw new Error("Invalid color "+e);o[e]=[r[0]/255*r[3],r[1]/255*r[3],r[2]/255*r[3],r[3]]}return o[e]}throw new Error("Invalid color "+e)}},{"../util/util":421,"./style_function":359,csscolorparser:98}],357:[function(t,e,r){"use strict";function n(t,e,r){this.animationLoop=e||new m,this.dispatcher=new p(r||1,this),this.spriteAtlas=new l(1024,1024),this.lineAtlas=new u(256,512),this._layers={},this._order=[],this._groups=[],this.sources={},this.zoomHistory={},c.bindAll(["_forwardSourceEvent","_forwardTileEvent","_forwardLayerEvent","_redoPlacement"],this),this._resetUpdates();var n=function(t,e){if(t)return void this.fire("error",{error:t});if(!g.emitErrors(this,g(e))){this._loaded=!0,this.stylesheet=e,this.updateClasses();var r=e.sources;for(var n in r)this.addSource(n,r[n]);e.sprite&&(this.sprite=new o(e.sprite),this.sprite.on("load",this.fire.bind(this,"change"))),this.glyphSource=new s(e.glyphs),this._resolve(),this.fire("load")}}.bind(this);"string"==typeof t?h.getJSON(f(t),n):d.frame(n.bind(this,null,t)),this.on("source.load",function(t){var e=t.source;if(e&&e.vectorLayerIds)for(var r in this._layers){var n=this._layers[r];n.source===e.id&&this._validateLayer(n)}})}var i=t("../util/evented"),a=t("./style_layer"),o=t("./image_sprite"),s=t("../symbol/glyph_source"),l=t("../symbol/sprite_atlas"),u=t("../render/line_atlas"),c=t("../util/util"),h=t("../util/ajax"),f=t("../util/mapbox").normalizeStyleURL,d=t("../util/browser"),p=t("../util/dispatcher"),m=t("./animation_loop"),g=t("./validate_style"),v=t("../source/source"),y=t("../source/query_features"),b=t("../source/source_cache"),x=t("./style_spec"),_=t("./style_function");e.exports=n,n.prototype=c.inherit(i,{_loaded:!1,_validateLayer:function(t){var e=this.sources[t.source];t.sourceLayer&&e&&e.vectorLayerIds&&e.vectorLayerIds.indexOf(t.sourceLayer)===-1&&this.fire("error",{error:new Error('Source layer "'+t.sourceLayer+'" does not exist on source "'+e.id+'" as specified by style layer "'+t.id+'"')})},loaded:function(){if(!this._loaded)return!1;if(Object.keys(this._updates.sources).length)return!1;for(var t in this.sources)if(!this.sources[t].loaded())return!1;return!(this.sprite&&!this.sprite.loaded())},_resolve:function(){var t,e;this._layers={},this._order=this.stylesheet.layers.map(function(t){return t.id});for(var r=0;rMath.floor(t)&&(e.lastIntegerZoom=Math.floor(t+1),e.lastIntegerZoomTime=Date.now()),e.lastZoom=t},_checkLoaded:function(){if(!this._loaded)throw new Error("Style is not done loading")},update:function(t,e){if(!this._updates.changed)return this;if(this._updates.allLayers)this._groupLayers(),this._updateWorkerLayers();else{var r=Object.keys(this._updates.layers);r.length&&this._updateWorkerLayers(r)}var n,i=Object.keys(this._updates.sources);for(n=0;n=0&&this._handleErrors(g.source,"sources."+t,e)?this:(e=new b(t,e,this.dispatcher),this.sources[t]=e,e.style=this,e.on("load",this._forwardSourceEvent).on("error",this._forwardSourceEvent).on("change",this._forwardSourceEvent).on("tile.add",this._forwardTileEvent).on("tile.load",this._forwardTileEvent).on("tile.error",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this._updates.events.push(["source.add",{source:e}]),this._updates.changed=!0,this)},removeSource:function(t){if(this._checkLoaded(),void 0===this.sources[t])throw new Error("There is no source with this ID");var e=this.sources[t];return delete this.sources[t],delete this._updates.sources[t],e.off("load",this._forwardSourceEvent).off("error",this._forwardSourceEvent).off("change",this._forwardSourceEvent).off("tile.add",this._forwardTileEvent).off("tile.load",this._forwardTileEvent).off("tile.error",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent),this._updates.events.push(["source.remove",{source:e}]),this._updates.changed=!0,this},getSource:function(t){return this.sources[t]&&this.sources[t].getSource()},addLayer:function(t,e){if(this._checkLoaded(),!(t instanceof a)){if(this._handleErrors(g.layer,"layers."+t.id,t,!1,{arrayIndex:-1}))return this;var r=t.ref&&this.getLayer(t.ref);t=a.create(t,r)}return this._validateLayer(t),t.on("error",this._forwardLayerEvent),this._layers[t.id]=t,this._order.splice(e?this._order.indexOf(e):1/0,0,t.id),this._updates.allLayers=!0,t.source&&(this._updates.sources[t.source]=!0),this._updates.events.push(["layer.add",{layer:t}]),this.updateClasses(t.id)},removeLayer:function(t){this._checkLoaded();var e=this._layers[t];if(void 0===e)throw new Error("There is no layer with this ID");for(var r in this._layers)this._layers[r].ref===t&&this.removeLayer(r);return e.off("error",this._forwardLayerEvent),delete this._layers[t],delete this._updates.layers[t],delete this._updates.paintProps[t],this._order.splice(this._order.indexOf(t),1),this._updates.allLayers=!0,this._updates.events.push(["layer.remove",{layer:e}]),this._updates.changed=!0,this},getLayer:function(t){return this._layers[t]},getReferentLayer:function(t){var e=this.getLayer(t);return e.ref&&(e=this.getLayer(e.ref)),e},setLayerZoomRange:function(t,e,r){this._checkLoaded();var n=this.getReferentLayer(t);return n.minzoom===e&&n.maxzoom===r?this:(null!=e&&(n.minzoom=e),null!=r&&(n.maxzoom=r),this._updateLayer(n))},setFilter:function(t,e){this._checkLoaded();var r=this.getReferentLayer(t);return null!==e&&this._handleErrors(g.filter,"layers."+r.id+".filter",e)?this:c.deepEqual(r.filter,e)?this:(r.filter=c.clone(e),this._updateLayer(r))},getFilter:function(t){return this.getReferentLayer(t).filter},setLayoutProperty:function(t,e,r){this._checkLoaded();var n=this.getReferentLayer(t);return c.deepEqual(n.getLayoutProperty(e),r)?this:(n.setLayoutProperty(e,r),this._updateLayer(n))},getLayoutProperty:function(t,e){return this.getReferentLayer(t).getLayoutProperty(e)},setPaintProperty:function(t,e,r,n){this._checkLoaded();var i=this.getLayer(t);if(c.deepEqual(i.getPaintProperty(e,n),r))return this;var a=i.isPaintValueFeatureConstant(e);return i.setPaintProperty(e,r,n),!(r&&_.isFunctionDefinition(r)&&"$zoom"!==r.property&&void 0!==r.property)&&a||(this._updates.layers[t]=!0,i.source&&(this._updates.sources[i.source]=!0)),this.updateClasses(t,e)},getPaintProperty:function(t,e,r){return this.getLayer(t).getPaintProperty(e,r)},updateClasses:function(t,e){if(this._updates.changed=!0,t){var r=this._updates.paintProps;r[t]||(r[t]={}),r[t][e||"all"]=!0}else this._updates.allPaintProps=!0;return this},serialize:function(){return c.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:c.mapObject(this.sources,function(t){return t.serialize()}),layers:this._order.map(function(t){return this._layers[t].serialize()},this)},function(t){return void 0!==t})},_updateLayer:function(t){return this._updates.layers[t.id]=!0,t.source&&(this._updates.sources[t.source]=!0),this._updates.changed=!0,this},_flattenRenderedFeatures:function(t){for(var e=[],r=this._order.length-1;r>=0;r--)for(var n=this._order[r],i=0;is.lastIntegerZoom?(n=u+(1-u)*c,h*=2,i=t({zoom:o-1},r),a=t({zoom:o},r)):(n=1-(1-c)*u,a=t({zoom:o},r),i=t({zoom:o+1},r),h/=2),void 0===i||void 0===a?void 0:{from:i,fromScale:h,to:a,toScale:1,t:n}}}var a=t("./style_function"),o=t("./parse_color"),s=t("../util/util");e.exports=n},{"../util/util":421,"./parse_color":356,"./style_function":359}],359:[function(t,e,r){"use strict";var n=t("mapbox-gl-function");r.interpolated=function(t){var e=n.interpolated(t),r=function(t,r){return e(t&&t.zoom,r||{})};return r.isFeatureConstant=e.isFeatureConstant,r.isZoomConstant=e.isZoomConstant,r},r["piecewise-constant"]=function(t){var e=n["piecewise-constant"](t),r=function(t,r){return e(t&&t.zoom,r||{})};return r.isFeatureConstant=e.isFeatureConstant,r.isZoomConstant=e.isZoomConstant,r},r.isFunctionDefinition=n.isFunctionDefinition},{"mapbox-gl-function":281}],360:[function(t,e,r){"use strict";function n(t,e){this.set(t,e)}function i(t){return t.value}var a=t("../util/util"),o=t("./style_transition"),s=t("./style_declaration"),l=t("./style_spec"),u=t("./validate_style"),c=t("./parse_color"),h=t("../util/evented");e.exports=n;n.create=function(e,r){return new({background:t("./style_layer/background_style_layer"),circle:t("./style_layer/circle_style_layer"),fill:t("./style_layer/fill_style_layer"),line:t("./style_layer/line_style_layer"),raster:t("./style_layer/raster_style_layer"),symbol:t("./style_layer/symbol_style_layer")}[(r||e).type])(e,r)},n.prototype=a.inherit(h,{set:function(t,e){this.id=t.id,this.ref=t.ref,this.metadata=t.metadata,this.type=(e||t).type,this.source=(e||t).source,this.sourceLayer=(e||t)["source-layer"],this.minzoom=(e||t).minzoom,this.maxzoom=(e||t).maxzoom,this.filter=(e||t).filter,this.paint={},this.layout={},this._paintSpecifications=l["paint_"+this.type],this._layoutSpecifications=l["layout_"+this.type],this._paintTransitions={},this._paintTransitionOptions={},this._paintDeclarations={},this._layoutDeclarations={},this._layoutFunctions={};var r,n;for(var i in t){var a=i.match(/^paint(?:\.(.*))?$/);if(a){var o=a[1]||"";for(r in t[i])this.setPaintProperty(r,t[i][r],o)}}if(this.ref)this._layoutDeclarations=e._layoutDeclarations;else for(n in t.layout)this.setLayoutProperty(n,t.layout[n]);for(r in this._paintSpecifications)this.paint[r]=this.getPaintValue(r);for(n in this._layoutSpecifications)this._updateLayoutValue(n)},setLayoutProperty:function(t,e){if(null==e)delete this._layoutDeclarations[t];else{var r="layers."+this.id+".layout."+t;if(this._handleErrors(u.layoutProperty,r,t,e))return;this._layoutDeclarations[t]=new s(this._layoutSpecifications[t],e)}this._updateLayoutValue(t)},getLayoutProperty:function(t){return this._layoutDeclarations[t]&&this._layoutDeclarations[t].value},getLayoutValue:function(t,e,r){var n=this._layoutSpecifications[t],i=this._layoutDeclarations[t];return i?i.calculate(e,r):n.default},setPaintProperty:function(t,e,r){var n="layers."+this.id+(r?'["paint.'+r+'"].':".paint.")+t;if(a.endsWith(t,"-transition"))if(this._paintTransitionOptions[r||""]||(this._paintTransitionOptions[r||""]={}),null===e||void 0===e)delete this._paintTransitionOptions[r||""][t];else{if(this._handleErrors(u.paintProperty,n,t,e))return;this._paintTransitionOptions[r||""][t]=e}else if(this._paintDeclarations[r||""]||(this._paintDeclarations[r||""]={}),null===e||void 0===e)delete this._paintDeclarations[r||""][t];else{if(this._handleErrors(u.paintProperty,n,t,e))return;this._paintDeclarations[r||""][t]=new s(this._paintSpecifications[t],e)}},getPaintProperty:function(t,e){return e=e||"",a.endsWith(t,"-transition")?this._paintTransitionOptions[e]&&this._paintTransitionOptions[e][t]:this._paintDeclarations[e]&&this._paintDeclarations[e][t]&&this._paintDeclarations[e][t].value},getPaintValue:function(t,e,r){var n=this._paintSpecifications[t],i=this._paintTransitions[t];return i?i.calculate(e,r):"color"===n.type&&n.default?c(n.default):n.default},getPaintValueStopZoomLevels:function(t){var e=this._paintTransitions[t];return e?e.declaration.stopZoomLevels:[]},getPaintInterpolationT:function(t,e){return this._paintTransitions[t].declaration.calculateInterpolationT({zoom:e})},isPaintValueFeatureConstant:function(t){var e=this._paintTransitions[t];return!e||e.declaration.isFeatureConstant},isLayoutValueFeatureConstant:function(t){var e=this._layoutDeclarations[t];return!e||e.isFeatureConstant},isPaintValueZoomConstant:function(t){var e=this._paintTransitions[t];return!e||e.declaration.isZoomConstant},isHidden:function(t){return!!(this.minzoom&&t=this.maxzoom)||("none"===this.layout.visibility||0===this.paint[this.type+"-opacity"]))},updatePaintTransitions:function(t,e,r,n){for(var i=a.extend({},this._paintDeclarations[""]),o=0;o-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],u=0;sn;)u-=l.shift().angleDelta;if(u>i)return!1;o++,s+=h.dist(f)}return!0}e.exports=n},{}],372:[function(t,e,r){"use strict";function n(t,e,r,n,a){for(var o=[],s=0;s=n&&f.x>=n||(h.x>=n?h=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round():f.x>=n&&(f=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round()),h.y>=a&&f.y>=a||(h.y>=a?h=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round():f.y>=a&&(f=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round()),l&&h.equals(l[l.length-1])||(l=[h],o.push(l)),l.push(f)))))}return o}var i=t("point-geometry");e.exports=n},{"point-geometry":462}],373:[function(t,e,r){ -"use strict";var n=t("../util/struct_array"),i=t("../util/util"),a=t("point-geometry"),o=e.exports=new n({members:[{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Float32",name:"maxScale"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"bbox0"},{type:"Int16",name:"bbox1"},{type:"Int16",name:"bbox2"},{type:"Int16",name:"bbox3"},{type:"Float32",name:"placementScale"}]});i.extendAll(o.prototype.StructType.prototype,{get anchorPoint(){return new a(this.anchorPointX,this.anchorPointY)}})},{"../util/struct_array":419,"../util/util":421,"point-geometry":462}],374:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l,u,c){var h=o.top*s-l,f=o.bottom*s+l,d=o.left*s-l,p=o.right*s+l;if(this.boxStartIndex=t.length,u){var m=f-h,g=p-d;if(m>0)if(m=Math.max(10*s,m),c){var v=e[r.segment+1].sub(e[r.segment])._unit()._mult(g),y=[r.sub(v),r.add(v)];this._addLineCollisionBoxes(t,y,r,0,g,m,n,i,a)}else this._addLineCollisionBoxes(t,e,r,r.segment,g,m,n,i,a)}else t.emplaceBack(r.x,r.y,d,h,p,f,1/0,n,i,a,0,0,0,0,0);this.boxEndIndex=t.length}e.exports=n,n.prototype._addLineCollisionBoxes=function(t,e,r,n,i,a,o,s,l){var u=a/2,c=Math.floor(i/u),h=-a/2,f=this.boxes,d=r,p=n+1,m=h;do{if(--p<0)return f;m-=e[p].dist(d),d=e[p]}while(m>-i/2);for(var g=e[p].dist(e[p+1]),v=0;v=e.length)return f;g=e[p].dist(e[p+1])}var b=y-m,x=e[p],_=e[p+1],w=_.sub(x)._unit()._mult(b)._add(x)._round(),M=Math.max(Math.abs(y-h)-u/2,0),A=i/2/M;t.emplaceBack(w.x,w.y,-a/2,-a/2,a/2,a/2,A,o,s,l,0,0,0,0,0)}return f}},{}],375:[function(t,e,r){"use strict";function n(t,e,r){if("object"==typeof t){var n=t;r=e,t=n.angle,e=n.pitch,this.grid=new o(n.grid),this.ignoredGrid=new o(n.ignoredGrid)}else this.grid=new o(a,12,6),this.ignoredGrid=new o(a,12,0);this.angle=t,this.pitch=e;var i=Math.sin(t),s=Math.cos(t);if(this.rotationMatrix=[s,-i,i,s],this.reverseRotationMatrix=[s,i,-i,s],this.yStretch=1/Math.cos(e/180*Math.PI),this.yStretch=Math.pow(this.yStretch,1.3),this.collisionBoxArray=r,0===r.length){r.emplaceBack();r.emplaceBack(0,0,0,-32767,0,32767,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(a,0,0,-32767,0,32767,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(0,0,-32767,0,32767,0,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(0,a,-32767,0,32767,0,32767,0,0,0,0,0,0,0,0,0)}this.tempCollisionBox=r.get(0),this.edges=[r.get(1),r.get(2),r.get(3),r.get(4)]}var i=t("point-geometry"),a=t("../data/bucket").EXTENT,o=t("grid-index");e.exports=n,n.prototype.serialize=function(){var t={angle:this.angle,pitch:this.pitch,grid:this.grid.toArrayBuffer(),ignoredGrid:this.ignoredGrid.toArrayBuffer()};return{data:t,transferables:[t.grid,t.ignoredGrid]}},n.prototype.minScale=.25,n.prototype.maxScale=2,n.prototype.placeCollisionFeature=function(t,e,r){for(var n=this.collisionBoxArray,a=this.minScale,o=this.rotationMatrix,s=this.yStretch,l=t.boxStartIndex;l=this.maxScale)return a}if(r){var _;if(this.angle){var w=this.reverseRotationMatrix,M=new i(u.x1,u.y1).matMult(w),A=new i(u.x2,u.y1).matMult(w),k=new i(u.x1,u.y2).matMult(w),T=new i(u.x2,u.y2).matMult(w);_=this.tempCollisionBox,_.anchorPointX=u.anchorPoint.x,_.anchorPointY=u.anchorPoint.y,_.x1=Math.min(M.x,A.x,k.x,T.x),_.y1=Math.min(M.y,A.x,k.x,T.x),_.x2=Math.max(M.x,A.x,k.x,T.x),_.y2=Math.max(M.y,A.x,k.x,T.x),_.maxScale=u.maxScale}else _=u;for(var S=0;S=this.maxScale)return a}}}return a},n.prototype.queryRenderedSymbols=function(t,e,r,n,a){var o={},s=[],l=this.collisionBoxArray,u=this.rotationMatrix,c=new i(t,e)._matMult(u),h=this.tempCollisionBox;h.anchorX=c.x,h.anchorY=c.y,h.x1=0,h.y1=0,h.x2=r-t,h.y2=n-e,h.maxScale=a,a=h.maxScale;for(var f=[c.x+h.x1/a,c.y+h.y1/a*this.yStretch,c.x+h.x2/a,c.y+h.y2/a*this.yStretch],d=this.grid.query(f[0],f[1],f[2],f[3]),p=this.ignoredGrid.query(f[0],f[1],f[2],f[3]),m=0;m=a&&(o[y][b]=!0,s.push(d[g]))}}return s},n.prototype.getPlacementScale=function(t,e,r,n,i){var a=e.x-n.x,o=e.y-n.y,s=(i.x1-r.x2)/a,l=(i.x2-r.x1)/a,u=(i.y1-r.y2)*this.yStretch/o,c=(i.y2-r.y1)*this.yStretch/o;(isNaN(s)||isNaN(l))&&(s=l=1),(isNaN(u)||isNaN(c))&&(u=c=1);var h=Math.min(Math.max(s,l),Math.max(u,c)),f=i.maxScale,d=r.maxScale;return h>f&&(h=f),h>d&&(h=d),h>t&&h>=i.placementScale&&(t=h),t},n.prototype.insertCollisionFeature=function(t,e,r){for(var n=r?this.ignoredGrid:this.grid,i=this.collisionBoxArray,a=t.boxStartIndex;a=0&&k=0&&T=0&&v+d<=p){var S=new o(k,T,M,b)._round();n&&!s(t,S,u,n,l)||y.push(S)}}g+=w}return h||y.length||c||(y=i(t,g/2,r,n,l,u,c,!0,f)),y}var a=t("../util/interpolate"),o=t("../symbol/anchor"),s=t("./check_max_angle");e.exports=n},{"../symbol/anchor":370,"../util/interpolate":415,"./check_max_angle":371}],377:[function(t,e,r){"use strict";function n(){this.width=o,this.height=o,this.bin=new i(this.width,this.height),this.index={},this.ids={},this.data=new Uint8Array(this.width*this.height)}var i=t("shelf-pack"),a=t("../util/util"),o=128;e.exports=n,n.prototype.getGlyphs=function(){var t,e,r,n={};for(var i in this.ids)t=i.split("#"),e=t[0],r=t[1],n[e]||(n[e]=[]),n[e].push(r);return n},n.prototype.getRects=function(){var t,e,r,n={};for(var i in this.ids)t=i.split("#"),e=t[0],r=t[1],n[e]||(n[e]={}),n[e][r]=this.index[i];return n},n.prototype.addGlyph=function(t,e,r,n){if(!r)return null;var i=e+"#"+r.id;if(this.index[i])return this.ids[i].indexOf(t)<0&&this.ids[i].push(t),this.index[i];if(!r.bitmap)return null;var o=r.width+2*n,s=r.height+2*n,l=o+2,u=s+2;l+=4-l%4,u+=4-u%4;var c=this.bin.packOne(l,u);if(c||(this.resize(),c=this.bin.packOne(l,u)),!c)return a.warnOnce("glyph bitmap overflow"),null;this.index[i]=c,this.ids[i]=[t];for(var h=this.data,f=r.bitmap,d=0;d=2048||e>=2048)){this.texture&&(this.gl&&this.gl.deleteTexture(this.texture),this.texture=null),this.width*=4,this.height*=4,this.bin.resize(this.width,this.height);for(var r=new ArrayBuffer(this.width*this.height),n=0;n65535)return r("glyphs > 65535 not supported");void 0===this.loading[t]&&(this.loading[t]={});var n=this.loading[t];if(n[e])n[e].push(r);else{n[e]=[r];var i=256*e+"-"+(256*e+255),o=a(t,i,this.url);s(o,function(t,r){for(var i=!t&&new l(new c(new Uint8Array(r))),a=0;an&&null!==c){var x=v[c+1].x;g=Math.max(x,g);for(var _=c+1;_<=y;_++)v[_].y+=r,v[_].x-=x;if(o){var w=c;h[v[c].codePoint]&&w--,s(v,e,p,w,o)}p=c+1,c=null,d+=x,m++}f[b.codePoint]&&(c=y)}var M=v[v.length-1],A=M.x+e[M.codePoint].advance;g=Math.max(g,A);var k=(m+1)*r;s(v,e,p,v.length-1,o),l(v,o,i,a,g,r,m,u),t.top+=-a*k,t.bottom=t.top+k,t.left+=-i*g,t.right=t.left+g}function s(t,e,r,n,i){for(var a=e[t[n].codePoint].advance,o=(t[n].x+a)*i,s=r;s<=n;s++)t[s].x-=o}function l(t,e,r,n,i,a,o,s){for(var l=(e-r)*i+s[0],u=(-n*(o+1)+.5)*a+s[1],c=0;c1?2:1,this.canvas&&(this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio)),this.sprite=t},n.prototype.addIcons=function(t,e){for(var r=0;r1||(w?(clearTimeout(w),w=null,v("dblclick",e)):w=setTimeout(d,300))}function c(t){y("touchmove",t)}function h(t){y("touchend",t)}function f(t){y("touchcancel",t)}function d(){w=null}function p(t){n.mousePos(b,t).equals(_)&&v("click",t)}function m(t){v("dblclick",t),t.preventDefault()}function g(t){x=t,t.preventDefault()}function v(e,r){var i=n.mousePos(b,r);return t.fire(e,{lngLat:t.unproject(i),point:i,originalEvent:r})}function y(e,r){var a=n.touchPos(b,r),o=a.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new i(0,0));return t.fire(e,{lngLat:t.unproject(o),point:o,lngLats:a.map(function(e){return t.unproject(e)},this),points:a,originalEvent:r})}var b=t.getCanvasContainer(),x=null,_=null,w=null;for(var M in a)t[M]=new a[M](t,e),e.interactive&&e[M]&&t[M].enable();b.addEventListener("mouseout",r,!1),b.addEventListener("mousedown",o,!1),b.addEventListener("mouseup",s,!1),b.addEventListener("mousemove",l,!1),b.addEventListener("touchstart",u,!1),b.addEventListener("touchend",h,!1),b.addEventListener("touchmove",c,!1),b.addEventListener("touchcancel",f,!1),b.addEventListener("click",p,!1),b.addEventListener("dblclick",m,!1),b.addEventListener("contextmenu",g,!1)}},{"../util/dom":407,"./handler/box_zoom":392,"./handler/dblclick_zoom":393,"./handler/drag_pan":394,"./handler/drag_rotate":395,"./handler/keyboard":396,"./handler/scroll_zoom":397,"./handler/touch_zoom_rotate":398,"point-geometry":462}],387:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("../util/interpolate"),a=t("../util/browser"),o=t("../geo/lng_lat"),s=t("../geo/lng_lat_bounds"),l=t("point-geometry"),u=e.exports=function(){};n.extend(u.prototype,{getCenter:function(){return this.transform.center},setCenter:function(t,e){return this.jumpTo({center:t},e),this},panBy:function(t,e,r){return this.panTo(this.transform.center,n.extend({offset:l.convert(t).mult(-1)},e),r),this},panTo:function(t,e,r){return this.easeTo(n.extend({center:t},e),r)},getZoom:function(){return this.transform.zoom},setZoom:function(t,e){return this.jumpTo({zoom:t},e),this},zoomTo:function(t,e,r){return this.easeTo(n.extend({zoom:t},e),r)},zoomIn:function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},zoomOut:function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},getBearing:function(){return this.transform.bearing},setBearing:function(t,e){return this.jumpTo({bearing:t},e),this},rotateTo:function(t,e,r){return this.easeTo(n.extend({bearing:t},e),r)},resetNorth:function(t,e){return this.rotateTo(0,n.extend({duration:1e3},t),e),this},snapToNorth:function(t,e){return Math.abs(this.getBearing())180&&(c.center.lng>0&&m.lng<0?m.lng+=360:c.center.lng<0&&m.lng>0&&(m.lng-=360));var b=c.zoomScale(g-f),x=c.point,_="center"in t?c.project(m).sub(h.div(b)):x,w=c.worldSize,M=t.curve,A=Math.max(c.width,c.height),k=A/b,T=_.sub(x).mag();if("minZoom"in t){var S=n.clamp(Math.min(t.minZoom,f,g),c.minZoom,c.maxZoom),E=A/c.zoomScale(S-f);M=Math.sqrt(E/T*2)}var L=M*M,C=r(0),D=function(t){return s(C)/s(C+M*t)},z=function(t){return A*((s(C)*u(C+M*t)-a(C))/L)/T},I=(r(1)-C)/M;if(Math.abs(T)<1e-6){if(Math.abs(A-k)<1e-6)return this.easeTo(t);var P=k=0)return!1;return!0}),e.join(" | ")},n.prototype=o.inherit(i,{options:{position:"bottom-right"},onAdd:function(t){var e=this._container=a.create("div","mapboxgl-ctrl-attrib",t.getContainer());return this._update(),t.on("source.load",this._update.bind(this)),t.on("source.change",this._update.bind(this)),t.on("source.remove",this._update.bind(this)),t.on("moveend",this._updateEditLink.bind(this)),e},_update:function(){this._map.style&&(this._container.innerHTML=n.createAttributionString(this._map.style.sources)),this._editLink=this._container.getElementsByClassName("mapbox-improve-map")[0],this._updateEditLink()},_updateEditLink:function(){if(this._editLink){var t=this._map.getCenter();this._editLink.href="https://www.mapbox.com/map-feedback/#/"+t.lng+"/"+t.lat+"/"+Math.round(this._map.getZoom()+1)}}})},{"../../util/dom":407,"../../util/util":421,"./control":389}],389:[function(t,e,r){"use strict";function n(){}var i=t("../../util/util"),a=t("../../util/evented");e.exports=n,n.prototype={addTo:function(t){this._map=t;var e=this._container=this.onAdd(t);if(this.options&&this.options.position){var r=this.options.position,n=t._controlCorners[r];e.className+=" mapboxgl-ctrl",r.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e)}return this},remove:function(){return this._container.parentNode.removeChild(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this}},i.extend(n.prototype,a)},{"../../util/evented":413,"../../util/util":421}],390:[function(t,e,r){"use strict";function n(t){s.setOptions(this,t)}var i=t("./control"),a=t("../../util/browser"),o=t("../../util/dom"),s=t("../../util/util");e.exports=n;var l={enableHighAccuracy:!1,timeout:6e3};n.prototype=s.inherit(i,{options:{position:"top-right"},onAdd:function(t){var e=this._container=o.create("div","mapboxgl-ctrl-group",t.getContainer());return a.supportsGeolocation?(this._container.addEventListener("contextmenu",this._onContextMenu.bind(this)),this._geolocateButton=o.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.addEventListener("click",this._onClickGeolocate.bind(this)),e):e},_onContextMenu:function(t){t.preventDefault()},_onClickGeolocate:function(){navigator.geolocation.getCurrentPosition(this._success.bind(this),this._error.bind(this),l),this._timeoutId=setTimeout(this._finish.bind(this),1e4)},_success:function(t){this._map.jumpTo({center:[t.coords.longitude,t.coords.latitude],zoom:17,bearing:0,pitch:0}), -this.fire("geolocate",t),this._finish()},_error:function(t){this.fire("error",t),this._finish()},_finish:function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}})},{"../../util/browser":405,"../../util/dom":407,"../../util/util":421,"./control":389}],391:[function(t,e,r){"use strict";function n(t){s.setOptions(this,t)}function i(t){return new MouseEvent(t.type,{button:2,buttons:2,bubbles:!0,cancelable:!0,detail:t.detail,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,movementX:t.movementX,movementY:t.movementY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey})}var a=t("./control"),o=t("../../util/dom"),s=t("../../util/util");e.exports=n,n.prototype=s.inherit(a,{options:{position:"top-right"},onAdd:function(t){var e="mapboxgl-ctrl",r=this._container=o.create("div",e+"-group",t.getContainer());return this._container.addEventListener("contextmenu",this._onContextMenu.bind(this)),this._zoomInButton=this._createButton(e+"-icon "+e+"-zoom-in",t.zoomIn.bind(t)),this._zoomOutButton=this._createButton(e+"-icon "+e+"-zoom-out",t.zoomOut.bind(t)),this._compass=this._createButton(e+"-icon "+e+"-compass",t.resetNorth.bind(t)),this._compassArrow=o.create("div","arrow",this._compass),this._compass.addEventListener("mousedown",this._onCompassDown.bind(this)),this._onCompassMove=this._onCompassMove.bind(this),this._onCompassUp=this._onCompassUp.bind(this),t.on("rotate",this._rotateCompassArrow.bind(this)),this._rotateCompassArrow(),this._el=t.getCanvasContainer(),r},_onContextMenu:function(t){t.preventDefault()},_onCompassDown:function(t){0===t.button&&(o.disableDrag(),document.addEventListener("mousemove",this._onCompassMove),document.addEventListener("mouseup",this._onCompassUp),this._el.dispatchEvent(i(t)),t.stopPropagation())},_onCompassMove:function(t){0===t.button&&(this._el.dispatchEvent(i(t)),t.stopPropagation())},_onCompassUp:function(t){0===t.button&&(document.removeEventListener("mousemove",this._onCompassMove),document.removeEventListener("mouseup",this._onCompassUp),o.enableDrag(),this._el.dispatchEvent(i(t)),t.stopPropagation())},_createButton:function(t,e){var r=o.create("button",t,this._container);return r.type="button",r.addEventListener("click",function(){e()}),r},_rotateCompassArrow:function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t}})},{"../../util/dom":407,"../../util/util":421,"./control":389}],392:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),o.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../geo/lng_lat_bounds"),o=t("../../util/util");e.exports=n,n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onMouseDown,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onMouseDown),this._enabled=!1)},_onMouseDown:function(t){t.shiftKey&&0===t.button&&(document.addEventListener("mousemove",this._onMouseMove,!1),document.addEventListener("keydown",this._onKeyDown,!1),document.addEventListener("mouseup",this._onMouseUp,!1),i.disableDrag(),this._startPos=i.mousePos(this._el,t),this._active=!0)},_onMouseMove:function(t){var e=this._startPos,r=i.mousePos(this._el,t);this._box||(this._box=i.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var n=Math.min(e.x,r.x),a=Math.max(e.x,r.x),o=Math.min(e.y,r.y),s=Math.max(e.y,r.y);i.setTransform(this._box,"translate("+n+"px,"+o+"px)"),this._box.style.width=a-n+"px",this._box.style.height=s-o+"px"},_onMouseUp:function(t){if(0===t.button){var e=this._startPos,r=i.mousePos(this._el,t),n=new a(this._map.unproject(e),this._map.unproject(r));this._finish(),e.x===r.x&&e.y===r.y?this._fireEvent("boxzoomcancel",t):this._map.fitBounds(n,{linear:!0}).fire("boxzoomend",{originalEvent:t,boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},_finish:function(){this._active=!1,document.removeEventListener("mousemove",this._onMouseMove,!1),document.removeEventListener("keydown",this._onKeyDown,!1),document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.parentNode.removeChild(this._box),this._box=null),i.enableDrag()},_fireEvent:function(t,e){return this._map.fire(t,{originalEvent:e})}}},{"../../geo/lng_lat_bounds":319,"../../util/dom":407,"../../util/util":421}],393:[function(t,e,r){"use strict";function n(t){this._map=t,this._onDblClick=this._onDblClick.bind(this)}e.exports=n,n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._map.on("dblclick",this._onDblClick),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._map.off("dblclick",this._onDblClick),this._enabled=!1)},_onDblClick:function(t){this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)}}},{}],394:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),a.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/util");e.exports=n;var o=a.bezier(0,0,.3,1);n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._el.addEventListener("touchstart",this._onDown),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._el.removeEventListener("touchstart",this._onDown),this._enabled=!1)},_onDown:function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(document.addEventListener("touchmove",this._onMove),document.addEventListener("touchend",this._onTouchEnd)):(document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onMouseUp)),this._active=!1,this._startPos=this._pos=i.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},_onMove:function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._fireEvent("dragstart",t),this._fireEvent("movestart",t));var e=i.mousePos(this._el,t),r=this._map;r.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),r.transform.setLocationAtPoint(r.transform.pointLocation(this._pos),e),this._fireEvent("drag",t),this._fireEvent("move",t),this._pos=e,t.preventDefault()}},_onUp:function(t){if(this.isActive()){this._active=!1,this._fireEvent("dragend",t),this._drainInertiaBuffer();var e=function(){this._fireEvent("moveend",t)}.bind(this),r=this._inertia;if(r.length<2)return void e();var n=r[r.length-1],i=r[0],a=n[1].sub(i[1]),s=(n[0]-i[0])/1e3;if(0===s||n[1].equals(i[1]))return void e();var l=a.mult(.3/s),u=l.mag();u>1400&&(u=1400,l._unit()._mult(u));var c=u/750,h=l.mult(-c/2);this._map.panBy(h,{duration:1e3*c,easing:o,noMoveStart:!0},{originalEvent:t})}},_onMouseUp:function(t){this._ignoreEvent(t)||(this._onUp(t),document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onMouseUp))},_onTouchEnd:function(t){this._ignoreEvent(t)||(this._onUp(t),document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onTouchEnd))},_fireEvent:function(t,e){return this._map.fire(t,{originalEvent:e})},_ignoreEvent:function(t){var e=this._map;if(e.boxZoom&&e.boxZoom.isActive())return!0;if(e.dragRotate&&e.dragRotate.isActive())return!0;if(t.touches)return t.touches.length>1;if(t.ctrlKey)return!0;return"mousemove"===t.type?t.buttons&!1:0!==t.button},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":407,"../../util/util":421}],395:[function(t,e,r){"use strict";function n(t,e){this._map=t,this._el=t.getCanvasContainer(),this._bearingSnap=e.bearingSnap,o.bindHandlers(this)}var i=t("../../util/dom"),a=t("point-geometry"),o=t("../../util/util");e.exports=n;var s=o.bezier(0,0,.25,1);n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._enabled=!1)},_onDown:function(t){if(!this._ignoreEvent(t)&&!this.isActive()){document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=i.mousePos(this._el,t),this._center=this._map.transform.centerPoint;var e=this._startPos.sub(this._center);e.mag()<200&&(this._center=this._startPos.add(new a(-200,0)._rotate(e.angle()))),t.preventDefault()}},_onMove:function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._fireEvent("rotatestart",t),this._fireEvent("movestart",t));var e=this._map;e.stop();var r=this._pos,n=i.mousePos(this._el,t),a=this._center,o=r.sub(a).angleWith(n.sub(a))/Math.PI*180,s=e.getBearing()-o,l=this._inertia,u=l[l.length-1];this._drainInertiaBuffer(),l.push([Date.now(),e._normalizeBearing(s,u[1])]),e.transform.bearing=s,this._fireEvent("rotate",t),this._fireEvent("move",t),this._pos=n}},_onUp:function(t){if(!this._ignoreEvent(t)&&(document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onUp),this.isActive())){this._active=!1,this._fireEvent("rotateend",t),this._drainInertiaBuffer();var e=this._map,r=e.getBearing(),n=this._inertia,i=function(){Math.abs(r)180&&(d=180);var p=d/180;u+=h*d*(p/2),Math.abs(e._normalizeBearing(u,0))1;var r=t.ctrlKey?1:2,n=t.ctrlKey?0:2;return"mousemove"===t.type?t.buttons&0===r:t.button!==n},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":407,"../../util/util":421,"point-geometry":462}],396:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),this._onKeyDown=this._onKeyDown.bind(this)}e.exports=n;n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=this._map,r={originalEvent:t};if(!e.isEasing())switch(t.keyCode){case 61:case 107:case 171:case 187:e.zoomTo(Math.round(e.getZoom())+(t.shiftKey?2:1),r);break;case 189:case 109:case 173:e.zoomTo(Math.round(e.getZoom())-(t.shiftKey?2:1),r);break;case 37:t.shiftKey?e.easeTo({bearing:e.getBearing()-2},r):(t.preventDefault(),e.panBy([-80,0],r));break;case 39:t.shiftKey?e.easeTo({bearing:e.getBearing()+2},r):(t.preventDefault(),e.panBy([80,0],r));break;case 38:t.shiftKey?e.easeTo({pitch:e.getPitch()+5},r):(t.preventDefault(),e.panBy([0,-80],r));break;case 40:t.shiftKey?e.easeTo({pitch:Math.max(e.getPitch()-5,0)},r):(t.preventDefault(),e.panBy([0,80],r))}}}}},{}],397:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),o.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/browser"),o=t("../../util/util");e.exports=n;var s="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",l=s.indexOf("firefox")!==-1,u=s.indexOf("safari")!==-1&&s.indexOf("chrom")===-1;n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("wheel",this._onWheel,!1),this._el.addEventListener("mousewheel",this._onWheel,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("wheel",this._onWheel),this._el.removeEventListener("mousewheel",this._onWheel),this._enabled=!1)},_onWheel:function(t){var e;"wheel"===t.type?(e=t.deltaY,l&&t.deltaMode===window.WheelEvent.DOM_DELTA_PIXEL&&(e/=a.devicePixelRatio),t.deltaMode===window.WheelEvent.DOM_DELTA_LINE&&(e*=40)):"mousewheel"===t.type&&(e=-t.wheelDeltaY,u&&(e/=3));var r=a.now(),n=r-(this._time||0);this._pos=i.mousePos(this._el,t),this._time=r,0!==e&&e%4.000244140625==0?(this._type="wheel",e=Math.floor(e/4)):0!==e&&Math.abs(e)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=e,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(n*e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,e+=this._lastValue)),t.shiftKey&&e&&(e/=4),this._type&&this._zoom(-e,t),t.preventDefault()},_onTimeout:function(){this._type="wheel",this._zoom(-this._lastValue)},_zoom:function(t,e){if(0!==t){var r=this._map,n=2/(1+Math.exp(-Math.abs(t/100)));t<0&&0!==n&&(n=1/n);var i=r.ease?r.ease.to:r.transform.scale,a=r.transform.scaleZoom(i*n);r.zoomTo(a,{duration:0,around:r.unproject(this._pos),delayEndEvents:200},{originalEvent:e})}}}},{"../../util/browser":405,"../../util/dom":407,"../../util/util":421}],398:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),a.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/util");e.exports=n;var o=a.bezier(0,0,.15,1);n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("touchstart",this._onStart,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("touchstart",this._onStart),this._enabled=!1)},disableRotation:function(){this._rotationDisabled=!0},enableRotation:function(){this._rotationDisabled=!1},_onStart:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]);this._startVec=e.sub(r),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],document.addEventListener("touchmove",this._onMove,!1),document.addEventListener("touchend",this._onEnd,!1)}},_onMove:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]),n=e.add(r).div(2),a=e.sub(r),o=a.mag()/this._startVec.mag(),s=this._rotationDisabled?0:180*a.angleWith(this._startVec)/Math.PI,l=this._map;if(this._gestureIntent){var u={duration:0,around:l.unproject(n)};"rotate"===this._gestureIntent&&(u.bearing=this._startBearing+s),"zoom"!==this._gestureIntent&&"rotate"!==this._gestureIntent||(u.zoom=l.transform.scaleZoom(this._startScale*o)),l.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),o,n]),l.easeTo(u,{originalEvent:t})}else{var c=Math.abs(1-o)>.15;Math.abs(s)>4?this._gestureIntent="rotate":c&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._startVec=a,this._startScale=l.transform.scale,this._startBearing=l.transform.bearing)}t.preventDefault()}},_onEnd:function(t){document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,r=this._map;if(e.length<2)return void r.snapToNorth({},{originalEvent:t});var n=e[e.length-1],i=e[0],a=r.transform.scaleZoom(this._startScale*n[1]),s=r.transform.scaleZoom(this._startScale*i[1]),l=a-s,u=(n[0]-i[0])/1e3,c=n[2];if(0===u||a===s)return void r.snapToNorth({},{originalEvent:t});var h=.15*l/u;Math.abs(h)>2.5&&(h=h>0?2.5:-2.5);var f=1e3*Math.abs(h/(12*.15)),d=a+h*f/2e3;d<0&&(d=0),r.easeTo({zoom:d,duration:f,easing:o,around:r.unproject(c)},{originalEvent:t})},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>2&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":407,"../../util/util":421}],399:[function(t,e,r){"use strict";function n(){i.bindAll(["_onHashChange","_updateHash"],this)}e.exports=n;var i=t("../util/util");n.prototype={addTo:function(t){return this._map=t,window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},remove:function(){return window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),delete this._map,this},_onHashChange:function(){var t=location.hash.replace("#","").split("/");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0)}),!0)},_updateHash:function(){var t=this._map.getCenter(),e=this._map.getZoom(),r=this._map.getBearing(),n=Math.max(0,Math.ceil(Math.log(e)/Math.LN2)),i="#"+Math.round(100*e)/100+"/"+t.lat.toFixed(n)+"/"+t.lng.toFixed(n)+(r?"/"+Math.round(10*r)/10:"");window.history.replaceState("","",i)}}},{"../util/util":421}],400:[function(t,e,r){"use strict";function n(t){t.parentNode&&t.parentNode.removeChild(t)}var i=t("../util/canvas"),a=t("../util/util"),o=t("../util/browser"),s=t("../util/browser").window,l=t("../util/evented"),u=t("../util/dom"),c=t("../style/style"),h=t("../style/animation_loop"),f=t("../render/painter"),d=t("../geo/transform"),p=t("./hash"),m=t("./bind_handlers"),g=t("./camera"),v=t("../geo/lng_lat"),y=t("../geo/lng_lat_bounds"),b=t("point-geometry"),x=t("./control/attribution"),_={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:20,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,workerCount:Math.max(o.hardwareConcurrency-1,1)},w=e.exports=function(t){if(t=a.extend({},_,t),t.workerCount<1)throw new Error("workerCount must an integer greater than or equal to 1.");this._interactive=t.interactive,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._trackResize=t.trackResize,this._workerCount=t.workerCount,this._bearingSnap=t.bearingSnap,"string"==typeof t.container?this._container=document.getElementById(t.container):this._container=t.container,this.animationLoop=new h,this.transform=new d(t.minZoom,t.maxZoom),t.maxBounds&&this.setMaxBounds(t.maxBounds),a.bindAll(["_forwardStyleEvent","_forwardSourceEvent","_forwardLayerEvent","_forwardTileEvent","_onStyleLoad","_onStyleChange","_onSourceAdd","_onSourceRemove","_onSourceUpdate","_onWindowOnline","_onWindowResize","_update","_render"],this),this._setupContainer(),this._setupPainter(),this.on("move",this._update.bind(this,!1)),this.on("zoom",this._update.bind(this,!0)),this.on("moveend",function(){this.animationLoop.set(300),this._rerender()}.bind(this)),void 0!==s&&(s.addEventListener("online",this._onWindowOnline,!1),s.addEventListener("resize",this._onWindowResize,!1)),m(this,t),this._hash=t.hash&&(new p).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),this.stacks={},this._classes=[],this.resize(),t.classes&&this.setClasses(t.classes),t.style&&this.setStyle(t.style),t.attributionControl&&this.addControl(new x(t.attributionControl));var e=this.fire.bind(this,"error");this.on("style.error",e),this.on("source.error",e),this.on("tile.error",e),this.on("layer.error",e)};a.extend(w.prototype,l),a.extend(w.prototype,g.prototype),a.extend(w.prototype,{addControl:function(t){return t.addTo(this),this},addClass:function(t,e){return this._classes.indexOf(t)>=0||""===t?this:(this._classes.push(t),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},removeClass:function(t,e){var r=this._classes.indexOf(t);return r<0||""===t?this:(this._classes.splice(r,1),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},setClasses:function(t,e){for(var r={},n=0;n=0},getClasses:function(){return this._classes},resize:function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),this._canvas.resize(t,e),this.transform.resize(t,e),this.painter.resize(t,e),this.fire("movestart").fire("move").fire("resize").fire("moveend")},getBounds:function(){var t=new y(this.transform.pointLocation(new b(0,0)),this.transform.pointLocation(this.transform.size));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new b(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new b(0,this.transform.size.y)))),t},setMaxBounds:function(t){if(t){var e=y.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=[],this.transform.latRange=[],this._update());return this},setMinZoom:function(t){if((t=null===t||void 0===t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom&&t<=20)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be between the current minZoom and 20, inclusive")},project:function(t){return this.transform.locationPoint(v.convert(t))},unproject:function(t){return this.transform.pointLocation(b.convert(t))},queryRenderedFeatures:function(){var t,e={};return 2===arguments.length?(t=arguments[0],e=arguments[1]):1===arguments.length&&function(t){return t instanceof b||Array.isArray(t)}(arguments[0])?t=arguments[0]:1===arguments.length&&(e=arguments[0]),this.style.queryRenderedFeatures(this._makeQueryGeometry(t),e,this.transform.zoom,this.transform.angle)},_makeQueryGeometry:function(t){void 0===t&&(t=[b.convert([0,0]),b.convert([this.transform.width,this.transform.height])]);var e;if(t instanceof b||"number"==typeof t[0])e=[b.convert(t)];else{var r=[b.convert(t[0]),b.convert(t[1])];e=[r[0],new b(r[1].x,r[0].y),r[1],new b(r[0].x,r[1].y),r[0]]}return e=e.map(function(t){return this.transform.pointCoordinate(t)}.bind(this))},querySourceFeatures:function(t,e){return this.style.querySourceFeatures(t,e)},setStyle:function(t){return this.style&&(this.style.off("load",this._onStyleLoad).off("error",this._forwardStyleEvent).off("change",this._onStyleChange).off("source.add",this._onSourceAdd).off("source.remove",this._onSourceRemove).off("source.load",this._onSourceUpdate).off("source.error",this._forwardSourceEvent).off("source.change",this._onSourceUpdate).off("layer.add",this._forwardLayerEvent).off("layer.remove",this._forwardLayerEvent).off("layer.error",this._forwardLayerEvent).off("tile.add",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.load",this._update).off("tile.error",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent)._remove(),this.off("rotate",this.style._redoPlacement),this.off("pitch",this.style._redoPlacement)),t?(this.style=t instanceof c?t:new c(t,this.animationLoop,this._workerCount),this.style.on("load",this._onStyleLoad).on("error",this._forwardStyleEvent).on("change",this._onStyleChange).on("source.add",this._onSourceAdd).on("source.remove",this._onSourceRemove).on("source.load",this._onSourceUpdate).on("source.error",this._forwardSourceEvent).on("source.change",this._onSourceUpdate).on("layer.add",this._forwardLayerEvent).on("layer.remove",this._forwardLayerEvent).on("layer.error",this._forwardLayerEvent).on("tile.add",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.load",this._update).on("tile.error",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this.on("rotate",this.style._redoPlacement),this.on("pitch",this.style._redoPlacement),this):(this.style=null,this)},getStyle:function(){if(this.style)return this.style.serialize()},addSource:function(t,e){return this.style.addSource(t,e),this._update(!0),this},addSourceType:function(t,e,r){return this.style.addSourceType(t,e,r)},removeSource:function(t){return this.style.removeSource(t),this._update(!0),this},getSource:function(t){return this.style.getSource(t)},addLayer:function(t,e){return this.style.addLayer(t,e),this._update(!0),this},removeLayer:function(t){return this.style.removeLayer(t),this._update(!0),this},getLayer:function(t){return this.style.getLayer(t)},setFilter:function(t,e){return this.style.setFilter(t,e),this._update(!0),this},setLayerZoomRange:function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},getFilter:function(t){return this.style.getFilter(t)},setPaintProperty:function(t,e,r,n){return this.style.setPaintProperty(t,e,r,n),this._update(!0),this},getPaintProperty:function(t,e,r){return this.style.getPaintProperty(t,e,r)},setLayoutProperty:function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},getLayoutProperty:function(t,e){return this.style.getLayoutProperty(t,e)},getContainer:function(){return this._container},getCanvasContainer:function(){return this._canvasContainer},getCanvas:function(){return this._canvas.getElement()},_setupContainer:function(){var t=this._container;t.classList.add("mapboxgl-map");var e=this._canvasContainer=u.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=new i(this,e);var r=this._controlContainer=u.create("div","mapboxgl-control-container",t),n=this._controlCorners={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){n[t]=u.create("div","mapboxgl-ctrl-"+t,r)})},_setupPainter:function(){var t=this._canvas.getWebGLContext({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer});if(!t)return void this.fire("error",{error:new Error("Failed to initialize WebGL")});this.painter=new f(t,this.transform)},_contextLost:function(t){t.preventDefault(),this._frameId&&o.cancelFrame(this._frameId),this.fire("webglcontextlost",{originalEvent:t})},_contextRestored:function(t){this._setupPainter(),this.resize(),this._update(),this.fire("webglcontextrestored",{originalEvent:t})},loaded:function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},_update:function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},_render:function(){try{this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(this._classes,this._classOptions),this._classOptions=null,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.painter.render(this.style,{debug:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,vertices:this.vertices,rotating:this.rotating,zooming:this.zooming}),this.fire("render"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire("load")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty)&&this._rerender()}catch(t){this.fire("error",{error:t})}return this},remove:function(){this._hash&&this._hash.remove(),o.cancelFrame(this._frameId),this.setStyle(null),void 0!==s&&s.removeEventListener("resize",this._onWindowResize,!1);var t=this.painter.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),n(this._canvasContainer),n(this._controlContainer),this._container.classList.remove("mapboxgl-map")},_rerender:function(){this.style&&!this._frameId&&(this._frameId=o.frame(this._render))},_forwardStyleEvent:function(t){this.fire("style."+t.type,a.extend({style:t.target},t))},_forwardSourceEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_forwardLayerEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_forwardTileEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_onStyleLoad:function(t){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update(this._classes,{transition:!1}),this._forwardStyleEvent(t)},_onStyleChange:function(t){this._update(!0),this._forwardStyleEvent(t)},_onSourceAdd:function(t){var e=t.source;e.onAdd&&e.onAdd(this),this._forwardSourceEvent(t)},_onSourceRemove:function(t){var e=t.source;e.onRemove&&e.onRemove(this),this._forwardSourceEvent(t)},_onSourceUpdate:function(t){this._update(),this._forwardSourceEvent(t)},_onWindowOnline:function(){this._update()},_onWindowResize:function(){this._trackResize&&this.stop().resize()._update()}}),a.extendAll(w.prototype,{_showTileBoundaries:!1,get showTileBoundaries(){return this._showTileBoundaries},set showTileBoundaries(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},_showCollisionBoxes:!1,get showCollisionBoxes(){return this._showCollisionBoxes},set showCollisionBoxes(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,this.style._redoPlacement())},_showOverdrawInspector:!1,get showOverdrawInspector(){return this._showOverdrawInspector},set showOverdrawInspector(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},_repaint:!1,get repaint(){return this._repaint},set repaint(t){this._repaint=t,this._update()},_vertices:!1,get vertices(){return this._vertices},set vertices(t){this._vertices=t,this._update()}})},{"../geo/lng_lat":318,"../geo/lng_lat_bounds":319,"../geo/transform":320,"../render/painter":334,"../style/animation_loop":354,"../style/style":357,"../util/browser":405,"../util/canvas":406,"../util/dom":407,"../util/evented":413,"../util/util":421,"./bind_handlers":386,"./camera":387,"./control/attribution":388,"./hash":399,"point-geometry":462}],401:[function(t,e,r){"use strict";function n(t,e){t||(t=i.create("div")),t.classList.add("mapboxgl-marker"),this._el=t,this._offset=o.convert(e&&e.offset||[0,0]),this._update=this._update.bind(this)}e.exports=n;var i=t("../util/dom"),a=t("../geo/lng_lat"),o=t("point-geometry");n.prototype={addTo:function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._el),t.on("move",this._update),this._update(),this},remove:function(){this._map&&(this._map.off("move",this._update),this._map=null);var t=this._el.parentNode;return t&&t.removeChild(this._el),this},getLngLat:function(){return this._lngLat},setLngLat:function(t){return this._lngLat=a.convert(t),this._update(),this},getElement:function(){return this._el},_update:function(){if(this._map){var t=this._map.project(this._lngLat)._add(this._offset);i.setTransform(this._el,"translate("+t.x+"px,"+t.y+"px)")}}}},{"../geo/lng_lat":318,"../util/dom":407,"point-geometry":462}],402:[function(t,e,r){"use strict";function n(t){i.setOptions(this,t),i.bindAll(["_update","_onClickClose"],this)}e.exports=n;var i=t("../util/util"),a=t("../util/evented"),o=t("../util/dom"),s=t("../geo/lng_lat");n.prototype=i.inherit(a,{options:{closeButton:!0,closeOnClick:!0},addTo:function(t){return this._map=t,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this},remove:function(){ -return this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._container&&(this._container.parentNode.removeChild(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire("close"),this},getLngLat:function(){return this._lngLat},setLngLat:function(t){return this._lngLat=s.convert(t),this._update(),this},setText:function(t){return this.setDOMContent(document.createTextNode(t))},setHTML:function(t){var e,r=document.createDocumentFragment(),n=document.createElement("body");for(n.innerHTML=t;;){if(!(e=n.firstChild))break;r.appendChild(e)}return this.setDOMContent(r)},setDOMContent:function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},_createContent:function(){this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._content=o.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=o.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClickClose))},_update:function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content));var t=this._map.project(this._lngLat).round(),e=this.options.anchor;if(!e){var r=this._container.offsetWidth,n=this._container.offsetHeight;e=t.ythis._map.transform.height-n?["bottom"]:[],t.xthis._map.transform.width-r/2&&e.push("right"),e=0===e.length?"bottom":e.join("-")}var i={top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"},a=this._container.classList;for(var s in i)a.remove("mapboxgl-popup-anchor-"+s);a.add("mapboxgl-popup-anchor-"+e),o.setTransform(this._container,i[e]+" translate("+t.x+"px,"+t.y+"px)")}},_onClickClose:function(){this.remove()}})},{"../geo/lng_lat":318,"../util/dom":407,"../util/evented":413,"../util/util":421}],403:[function(t,e,r){"use strict";function n(t,e){this.target=t,this.parent=e,this.callbacks={},this.callbackID=0,this.receive=this.receive.bind(this),this.target.addEventListener("message",this.receive,!1)}e.exports=n,n.prototype.receive=function(t){function e(t,e,r){this.postMessage({type:"",id:String(i),error:t?String(t):null,data:e},r)}var r,n=t.data,i=n.id;if(""===n.type)r=this.callbacks[n.id],delete this.callbacks[n.id],r&&r(n.error||null,n.data);else if(void 0!==n.id&&this.parent[n.type])this.parent[n.type](n.data,e.bind(this));else if(void 0!==n.id&&this.parent.workerSources){var a=n.type.split(".");this.parent.workerSources[a[0]][a[1]](n.data,e.bind(this))}else this.parent[n.type](n.data)},n.prototype.send=function(t,e,r,n){var i=null;r&&(this.callbacks[i=this.callbackID++]=r),this.postMessage({type:t,id:String(i),data:e},n)},n.prototype.postMessage=function(t,e){this.target.postMessage(t,e)}},{}],404:[function(t,e,r){"use strict";function n(t){var e=document.createElement("a");return e.href=t,e.protocol===document.location.protocol&&e.host===document.location.host}r.getJSON=function(t,e){var r=new XMLHttpRequest;return r.open("GET",t,!0),r.setRequestHeader("Accept","application/json"),r.onerror=function(t){e(t)},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var t;try{t=JSON.parse(r.response)}catch(t){return e(t)}e(null,t)}else e(new Error(r.statusText))},r.send(),r},r.getArrayBuffer=function(t,e){var r=new XMLHttpRequest;return r.open("GET",t,!0),r.responseType="arraybuffer",r.onerror=function(t){e(t)},r.onload=function(){r.status>=200&&r.status<300&&r.response?e(null,r.response):e(new Error(r.statusText))},r.send(),r},r.getImage=function(t,e){return r.getArrayBuffer(t,function(t,r){if(t)return e(t);var n=new Image;n.onload=function(){e(null,n),(window.URL||window.webkitURL).revokeObjectURL(n.src)};var i=new Blob([new Uint8Array(r)],{type:"image/png"});return n.src=(window.URL||window.webkitURL).createObjectURL(i),n.getData=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return t.width=n.width,t.height=n.height,e.drawImage(n,0,0),e.getImageData(0,0,n.width,n.height).data},n})},r.getVideo=function(t,e){var r=document.createElement("video");r.onloadstart=function(){e(null,r)};for(var i=0;i=s+n?t.call(i,1):(t.call(i,(l-s)/n),r.frame(a)))}if(!n)return t.call(i,1),null;var o=!1,s=e.exports.now();return r.frame(a),function(){o=!0}},r.supported=t("mapbox-gl-supported"),r.hardwareConcurrency=navigator.hardwareConcurrency||4,Object.defineProperty(r,"devicePixelRatio",{get:function(){return window.devicePixelRatio}}),r.supportsWebp=!1;var a=document.createElement("img");a.onload=function(){r.supportsWebp=!0},a.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=",r.supportsGeolocation=!!navigator.geolocation},{"mapbox-gl-supported":306}],406:[function(t,e,r){"use strict";function n(t,e){this.canvas=document.createElement("canvas"),t&&e&&(this.canvas.style.position="absolute",this.canvas.classList.add("mapboxgl-canvas"),this.canvas.addEventListener("webglcontextlost",t._contextLost.bind(t),!1),this.canvas.addEventListener("webglcontextrestored",t._contextRestored.bind(t),!1),this.canvas.setAttribute("tabindex",0),e.appendChild(this.canvas))}var i=t("../util"),a=t("mapbox-gl-supported");e.exports=n,n.prototype.resize=function(t,e){var r=window.devicePixelRatio||1;this.canvas.width=r*t,this.canvas.height=r*e,this.canvas.style.width=t+"px",this.canvas.style.height=e+"px"},n.prototype.getWebGLContext=function(t){return t=i.extend({},t,a.webGLContextAttributes),this.canvas.getContext("webgl",t)||this.canvas.getContext("experimental-webgl",t)},n.prototype.getElement=function(){return this.canvas}},{"../util":421,"mapbox-gl-supported":306}],407:[function(t,e,r){"use strict";function n(t){for(var e=0;e1)for(var h=0;h=0&&this._events[t].splice(r,1),this._events[t].length||delete this._events[t]}else delete this._events[t];return this},once:function(t,e){var r=function(n){this.off(t,r),e.call(this,n)}.bind(this);return this.on(t,r),this},fire:function(t,e){if(!this.listens(t))return n.endsWith(t,"error")&&console.error(e&&e.error||e||"Empty error event"),this;e=n.extend({},e),n.extend(e,{type:t,target:this});for(var r=this._events[t].slice(),i=0;i=3)for(var l=0;l1){if(s(t,e))return!0;for(var n=0;n(e.y-t.y)*(r.x-t.x)}function u(t,e,r,n){return l(t,r,n)!==l(e,r,n)&&l(t,e,r)!==l(t,e,n)}function c(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function f(t,e){for(var r,n,i,a=!1,o=0;oe.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a)}return a}function d(t,e){for(var r=!1,n=0,i=t.length-1;ne.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}e.exports={multiPolygonIntersectsBufferedMultiPoint:n,multiPolygonIntersectsMultiPolygon:i,multiPolygonIntersectsBufferedMultiLine:a}},{}],417:[function(t,e,r){"use strict";function n(t,e){this.max=t,this.onRemove=e,this.reset()}e.exports=n,n.prototype.reset=function(){for(var t in this.data)this.onRemove(this.data[t]);return this.data={},this.order=[],this},n.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.get(this.order[0]);r&&this.onRemove(r)}return this},n.prototype.has=function(t){return t in this.data},n.prototype.keys=function(){return this.order},n.prototype.get=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},n.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this.get(this.order[0]);e&&this.onRemove(e)}return this}},{}],418:[function(t,e,r){"use strict";function n(t,e,r){if(!(r=r||o.ACCESS_TOKEN)&&o.REQUIRE_ACCESS_TOKEN)throw new Error("An API access token is required to use Mapbox GL. See https://www.mapbox.com/developers/api/#access-tokens");if(t=t.replace(/^mapbox:\/\//,o.API_URL+e),t+=t.indexOf("?")!==-1?"&access_token=":"?access_token=",o.REQUIRE_ACCESS_TOKEN){if("s"===r[0])throw new Error("Use a public access token (pk.*) with Mapbox GL JS, not a secret access token (sk.*). See https://www.mapbox.com/developers/api/#access-tokens");t+=r}return t}function i(t){return t?"?"+t:""}function a(t){return t.access_token&&"tk."===t.access_token.slice(0,3)?u.extend({},t,{access_token:o.ACCESS_TOKEN}):t}var o=t("./config"),s=t("./browser"),l=t("url"),u=t("./util");e.exports.normalizeStyleURL=function(t,e){var r=l.parse(t);return"mapbox:"!==r.protocol?t:n("mapbox:/"+r.pathname+i(r.query),"/styles/v1/",e)},e.exports.normalizeSourceURL=function(t,e){return"mapbox:"!==l.parse(t).protocol?t:n(t+".json","/v4/",e)+"&secure"},e.exports.normalizeGlyphsURL=function(t,e){var r=l.parse(t);return"mapbox:"!==r.protocol?t:n("mapbox://"+r.pathname.split("/")[1]+"/{fontstack}/{range}.pbf"+i(r.query),"/fonts/v1/",e)},e.exports.normalizeSpriteURL=function(t,e,r,a){var o=l.parse(t);return"mapbox:"!==o.protocol?(o.pathname+=e+r,l.format(o)):n("mapbox:/"+o.pathname+"/sprite"+e+r+i(o.query),"/styles/v1/",a)},e.exports.normalizeTileURL=function(t,e,r){var n=l.parse(t,!0);if(!e)return t;if("mapbox:"!==l.parse(e).protocol)return t;var i=s.supportsWebp?".webp":"$1",o=s.devicePixelRatio>=2||512===r?"@2x":"";return l.format({protocol:n.protocol,hostname:n.hostname,pathname:n.pathname.replace(/(\.(?:png|jpg)\d*)/,o+i),query:a(n.query)})}},{"./browser":405,"./config":410,"./util":421,url:522}],419:[function(t,e,r){"use strict";function n(t){function e(){f.apply(this,arguments)}function r(){d.apply(this,arguments),this.members=e.prototype.members}var n=JSON.stringify(t);if(g[n])return g[n];void 0===t.alignment&&(t.alignment=1),e.prototype=Object.create(f.prototype);var s=0,u=0,v=["Uint8"];return e.prototype.members=t.members.map(function(r){r={name:r.name,type:r.type,components:r.components||1},p(r.name.length),p(r.type in m),v.indexOf(r.type)<0&&v.push(r.type);var n=o(r.type);u=Math.max(u,n),r.offset=s=a(s,Math.max(t.alignment,n));for(var i=0;ithis.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*this.RESIZE_MULTIPLIER),this.DEFAULT_CAPACITY),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},d.prototype._refreshViews=function(){for(var t=0;t=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)},r.bezier=function(t,e,r,i){var a=new n(t,e,r,i);return function(t){return a.solve(t)}},r.ease=r.bezier(.25,.1,.25,1),r.clamp=function(t,e,r){return Math.min(r,Math.max(e,t))},r.wrap=function(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i},r.coalesce=function(){for(var t=0;t=0)return!0;return!1};var o={};r.warnOnce=function(t){o[t]||("undefined"!=typeof console&&console.warn(t),o[t]=!0)}},{"../geo/coordinate":317,unitbezier:521}],422:[function(t,e,r){"use strict";function n(t,e,r,n){this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&&(this.id=t.id)}e.exports=n,n.prototype={type:"Feature",get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},set geometry(t){this._geometry=t},toJSON:function(){var t={};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&"toJSON"!==e&&(t[e]=this[e]);return t}}},{}],423:[function(t,e,r){e.exports={_args:[[{raw:"mapbox-gl@^0.22.0",scope:null,escapedName:"mapbox-gl",name:"mapbox-gl",rawSpec:"^0.22.0",spec:">=0.22.0 <0.23.0",type:"range"},"/home/etienne/Documents/plotly/plotly.js"]],_from:"mapbox-gl@>=0.22.0 <0.23.0",_id:"mapbox-gl@0.22.1",_inCache:!0,_location:"/mapbox-gl",_nodeVersion:"4.4.5",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/mapbox-gl-0.22.1.tgz_1471549891670_0.8762630566488951"},_npmUser:{name:"lucaswoj",email:"lucas@lucaswoj.com"},_npmVersion:"2.15.5",_phantomChildren:{},_requested:{raw:"mapbox-gl@^0.22.0",scope:null,escapedName:"mapbox-gl",name:"mapbox-gl",rawSpec:"^0.22.0",spec:">=0.22.0 <0.23.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz",_shasum:"92a965547d4c2f24c22cbc487eeda48694cb627a",_shrinkwrap:null,_spec:"mapbox-gl@^0.22.0",_where:"/home/etienne/Documents/plotly/plotly.js",browser:{"./js/util/ajax.js":"./js/util/browser/ajax.js","./js/util/browser.js":"./js/util/browser/browser.js","./js/util/canvas.js":"./js/util/browser/canvas.js","./js/util/dom.js":"./js/util/browser/dom.js","./js/util/web_worker.js":"./js/util/browser/web_worker.js"},bugs:{url:"https://github.com/mapbox/mapbox-gl-js/issues"},dependencies:{csscolorparser:"^1.0.2",earcut:"^2.0.3","feature-filter":"^2.2.0","geojson-rewind":"^0.1.0","geojson-vt":"^2.4.0","gl-matrix":"^2.3.1","grid-index":"^1.0.0","mapbox-gl-function":"^1.2.1","mapbox-gl-shaders":"github:mapbox/mapbox-gl-shaders#de2ab007455aa2587c552694c68583f94c9f2747","mapbox-gl-style-spec":"github:mapbox/mapbox-gl-style-spec#83b1a3e5837d785af582efd5ed1a212f2df6a4ae","mapbox-gl-supported":"^1.2.0",pbf:"^1.3.2",pngjs:"^2.2.0","point-geometry":"^0.0.0",quickselect:"^1.0.0",request:"^2.39.0","resolve-url":"^0.2.1","shelf-pack":"^1.0.0",supercluster:"^2.0.1",unassertify:"^2.0.0",unitbezier:"^0.0.0","vector-tile":"^1.3.0","vt-pbf":"^2.0.2",webworkify:"^1.3.0","whoots-js":"^2.0.0"},description:"A WebGL interactive maps library",devDependencies:{"babel-preset-react":"^6.11.1",babelify:"^7.3.0",benchmark:"~2.1.0",browserify:"^13.0.0",clipboard:"^1.5.12","concat-stream":"1.5.1",coveralls:"^2.11.8",doctrine:"^1.2.1",documentation:"https://github.com/documentationjs/documentation/archive/bb41619c734e59ef3fbc3648610032efcfdaaace.tar.gz","documentation-theme-utils":"3.0.0",envify:"^3.4.0",eslint:"^2.5.3","eslint-config-mourner":"^2.0.0","eslint-plugin-html":"^1.5.1",gl:"^4.0.1",handlebars:"4.0.5","highlight.js":"9.3.0",istanbul:"^0.4.2","json-loader":"^0.5.4",lodash:"^4.13.1","mapbox-gl-test-suite":"github:mapbox/mapbox-gl-test-suite#7babab52fb02788ebbc38384139bf350e8e38552","memory-fs":"^0.3.0",minifyify:"^7.0.1","npm-run-all":"^3.0.0",nyc:"6.4.0",proxyquire:"^1.7.9",remark:"4.2.2","remark-html":"3.0.0",sinon:"^1.15.4",st:"^1.2.0",tap:"^5.7.0","transform-loader":"^0.2.3","unist-util-visit":"1.1.0",vinyl:"1.1.1","vinyl-fs":"2.4.3",watchify:"^3.7.0",webpack:"^1.13.1","webworkify-webpack":"^1.1.3"},directories:{},dist:{shasum:"92a965547d4c2f24c22cbc487eeda48694cb627a",tarball:"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz"},engines:{node:">=4.0.0"},gitHead:"13a9015341f0602ccb55c98c53079838ad4b70b5",homepage:"https://github.com/mapbox/mapbox-gl-js#readme",license:"BSD-3-Clause",main:"js/mapbox-gl.js",maintainers:[{name:"aaronlidman",email:"aaronlidman@gmail.com"},{name:"ajashton",email:"aj.ashton@gmail.com"},{name:"ansis",email:"ansis.brammanis@gmail.com"},{name:"bergwerkgis",email:"wb@bergwerk-gis.at"},{name:"bhousel",email:"bryan@mapbox.com"},{name:"bsudekum",email:"bobby@mapbox.com"},{name:"camilleanne",email:"camille@mapbox.com"},{name:"dnomadb",email:"damon@mapbox.com"},{name:"dthompson",email:"dthompson@gmail.com"},{name:"emilymcafee",email:"emily@mapbox.com"},{name:"flippmoke",email:"flippmoke@gmail.com"},{name:"freenerd",email:"spam@freenerd.de"},{name:"gretacb",email:"carol@mapbox.com"},{name:"ian29",email:"ian.villeda@gmail.com"},{name:"ianshward",email:"ian@mapbox.com"},{name:"ingalls",email:"nicholas.ingalls@gmail.com"},{name:"jfirebaugh",email:"john.firebaugh@gmail.com"},{name:"jrpruit1",email:"jake@jakepruitt.com"},{name:"karenzshea",email:"karen@mapbox.com"},{name:"kkaefer",email:"kkaefer@gmail.com"},{name:"lbud",email:"lauren@mapbox.com"},{name:"lucaswoj",email:"lucas@lucaswoj.com"},{name:"lxbarth",email:"alex@mapbox.com"},{name:"lyzidiamond",email:"lyzi@mapbox.com"},{name:"mapbox-admin",email:"accounts@mapbox.com"},{name:"mateov",email:"matt@mapbox.com"},{name:"mcwhittemore",email:"mcwhittemore@gmail.com"},{name:"miccolis",email:"jeff@miccolis.net"},{name:"mikemorris",email:"michael.patrick.morris@gmail.com"},{name:"morganherlocker",email:"morgan.herlocker@gmail.com"},{name:"mourner",email:"agafonkin@gmail.com"},{name:"nickidlugash",email:"nicki@mapbox.com"},{name:"rclark",email:"ryan.clark.j@gmail.com"},{name:"samanbb",email:"saman@mapbox.com"},{name:"sbma44",email:"tlee@mapbox.com"},{name:"scothis",email:"scothis@gmail.com"},{name:"sgillies",email:"sean@mapbox.com"},{name:"springmeyer",email:"dane@mapbox.com"},{name:"themarex",email:"patrick@mapbox.com"},{name:"tmcw",email:"tom@macwright.org"},{name:"tristen",email:"tristen.brown@gmail.com"},{name:"willwhite",email:"will@mapbox.com"},{name:"yhahn",email:"young@mapbox.com"}],name:"mapbox-gl",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/mapbox/mapbox-gl-js.git"},scripts:{build:"npm run build-docs # invoked by publisher when publishing docs on the mb-pages branch","build-dev":"browserify js/mapbox-gl.js --debug --standalone mapboxgl > dist/mapbox-gl-dev.js && tap --no-coverage test/build/dev.test.js","build-docs":"documentation build --github --format html -c documentation.yml --theme ./docs/_theme --output docs/api/","build-min":"browserify js/mapbox-gl.js --debug -t unassertify --plugin [minifyify --map mapbox-gl.js.map --output dist/mapbox-gl.js.map] --standalone mapboxgl > dist/mapbox-gl.js && tap --no-coverage test/build/min.test.js","build-token":"browserify debug/access-token-src.js --debug -t envify > debug/access-token.js",lint:"eslint --ignore-path .gitignore js test bench docs/_posts/examples/*.html","open-changed-examples":"git diff --name-only mb-pages HEAD -- docs/_posts/examples/*.html | awk '{print \"http://127.0.0.1:4000/mapbox-gl-js/example/\" substr($0,33,length($0)-37)}' | xargs open",start:"run-p build-token watch-dev watch-bench start-server","start-bench":"run-p build-token watch-bench start-server","start-debug":"run-p build-token watch-dev start-server","start-docs":"npm run build-min && npm run build-docs && jekyll serve -w","start-server":"st --no-cache --localhost --port 9966 --index index.html .",test:"npm run lint && tap --reporter dot test/js/*/*.js test/build/webpack.test.js","test-suite":"node test/render.test.js && node test/query.test.js","watch-bench":"node bench/download-data.js && watchify bench/index.js --plugin [minifyify --no-map] -t [babelify --presets react] -t unassertify -t envify -o bench/bench.js -v","watch-dev":"watchify js/mapbox-gl.js --debug --standalone mapboxgl -o dist/mapbox-gl-dev.js -v"},version:"0.22.1"}},{}],424:[function(t,e,r){"use strict";function n(t,e,r){for(var n=new Array(t),i=0;ig[1][2]&&(b[0]=-b[0]),g[0][2]>g[2][0]&&(b[1]=-b[1]),g[1][0]>g[0][1]&&(b[2]=-b[2]),!0}},{"./normalize":426,"gl-mat4/clone":156,"gl-mat4/create":157,"gl-mat4/determinant":158,"gl-mat4/invert":162,"gl-mat4/transpose":172,"gl-vec3/cross":253,"gl-vec3/dot":254,"gl-vec3/length":255,"gl-vec3/normalize":257}],426:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],427:[function(t,e,r){function n(t,e,r,n){if(0===c(e)||0===c(r))return!1;var i=u(e,f.translate,f.scale,f.skew,f.perspective,f.quaternion),a=u(r,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!(!i||!a)&&(s(p.translate,f.translate,d.translate,n),s(p.skew,f.skew,d.skew,n),s(p.scale,f.scale,d.scale,n),s(p.perspective,f.perspective,d.perspective,n),h(p.quaternion,f.quaternion,d.quaternion,n),l(t,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function i(){return{translate:a(),scale:a(1),skew:a(),perspective:o(),quaternion:o()}}function a(t){return[t||0,t||0,t||0]}function o(){return[0,0,0,1]}var s=t("gl-vec3/lerp"),l=t("mat4-recompose"),u=t("mat4-decompose"),c=t("gl-mat4/determinant"),h=t("quat-slerp"),f=i(),d=i(),p=i();e.exports=n},{"gl-mat4/determinant":158,"gl-vec3/lerp":256,"mat4-decompose":425,"mat4-recompose":428,"quat-slerp":467}],428:[function(t,e,r){var n={identity:t("gl-mat4/identity"),translate:t("gl-mat4/translate"),multiply:t("gl-mat4/multiply"),create:t("gl-mat4/create"),scale:t("gl-mat4/scale"),fromRotationTranslation:t("gl-mat4/fromRotationTranslation")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{"gl-mat4/create":157,"gl-mat4/fromRotationTranslation":160,"gl-mat4/identity":161,"gl-mat4/multiply":164,"gl-mat4/scale":170,"gl-mat4/translate":171}],429:[function(t,e,r){"use strict";function n(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}function i(t){return t=t||{},new n(t.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}var a=t("binary-search-bounds"),o=t("mat4-interpolate"),s=t("gl-mat4/invert"),l=t("gl-mat4/rotateX"),u=t("gl-mat4/rotateY"),c=t("gl-mat4/rotateZ"),h=t("gl-mat4/lookAt"),f=t("gl-mat4/translate"),d=(t("gl-mat4/scale"),t("gl-vec3/normalize")),p=[0,0,0];e.exports=i;var m=n.prototype;m.recalcMatrix=function(t){var e=this._time,r=a.le(e,t),n=this.computedMatrix;if(!(r<0)){var i=this._components;if(r===e.length-1)for(var l=16*r,u=0;u<16;++u)n[u]=i[l++];else{for(var c=e[r+1]-e[r],l=16*r,h=this.prevMatrix,f=!0,u=0;u<16;++u)h[u]=i[l++];for(var p=this.nextMatrix,u=0;u<16;++u)p[u]=i[l++],f=f&&h[u]===p[u];if(c<1e-6||f)for(var u=0;u<16;++u)n[u]=h[u];else o(n,h,p,(t-e[r])/c)}var m=this.computedUp;m[0]=n[1],m[1]=n[5],m[2]=n[6],d(m,m);var g=this.computedInverse;s(g,n);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;for(var b=this.computedCenter,x=Math.exp(this.computedRadius[0]),u=0;u<3;++u)b[u]=v[u]-n[2+4*u]*x}},m.idle=function(t){if(!(t1&&i(t[o[c-2]],t[o[c-1]],u)<=0;)c-=1,o.pop();for(o.push(l),c=s.length;c>1&&i(t[s[c-2]],t[s[c-1]],u)>=0;)c-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),h=0,n=0,f=o.length;n0;--d)r[h++]=s[d];return r}e.exports=n;var i=t("robust-orientation")[3]},{"robust-orientation":486}],431:[function(t,e,r){"use strict";function n(t,e){function r(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==g.alt,g.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==g.shift,g.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==g.control,g.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==g.meta,g.meta=!!t.metaKey),e}function n(t,n){var a=i.x(n),o=i.y(n);"buttons"in n&&(t=0|n.buttons),(t!==d||a!==p||o!==m||r(n))&&(d=0|t,p=a||0,m=o||0,e&&e(d,p,m,g))}function a(t){n(0,t)}function o(){(d||p||m||g.shift||g.alt||g.meta||g.control)&&(p=m=0,d=0,g.shift=g.alt=g.control=g.meta=!1,e&&e(0,0,0,g))}function s(t){r(t)&&e&&e(d,p,m,g)}function l(t){0===i.buttons(t)?n(0,t):n(d,t)}function u(t){n(d|i.buttons(t),t)}function c(t){n(d&~i.buttons(t),t)}function h(){v||(v=!0,t.addEventListener("mousemove",l),t.addEventListener("mousedown",u),t.addEventListener("mouseup",c),t.addEventListener("mouseleave",a),t.addEventListener("mouseenter",a),t.addEventListener("mouseout",a),t.addEventListener("mouseover",a),t.addEventListener("blur",o),t.addEventListener("keyup",s),t.addEventListener("keydown",s),t.addEventListener("keypress",s),t!==window&&(window.addEventListener("blur",o),window.addEventListener("keyup",s),window.addEventListener("keydown",s),window.addEventListener("keypress",s)))}function f(){v&&(v=!1,t.removeEventListener("mousemove",l),t.removeEventListener("mousedown",u),t.removeEventListener("mouseup",c),t.removeEventListener("mouseleave",a),t.removeEventListener("mouseenter",a),t.removeEventListener("mouseout",a),t.removeEventListener("mouseover",a),t.removeEventListener("blur",o),t.removeEventListener("keyup",s),t.removeEventListener("keydown",s),t.removeEventListener("keypress",s),t!==window&&(window.removeEventListener("blur",o),window.removeEventListener("keyup",s),window.removeEventListener("keydown",s),window.removeEventListener("keypress",s)))}e||(e=t,t=window);var d=0,p=0,m=0,g={shift:!1,alt:!1,control:!1,meta:!1},v=!1;h();var y={element:t};return Object.defineProperties(y,{enabled:{get:function(){return v},set:function(t){t?h():f()},enumerable:!0},buttons:{get:function(){return d},enumerable:!0},x:{get:function(){return p},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return g},enumerable:!0}}),y}e.exports=n;var i=t("mouse-event")},{"mouse-event":433}],432:[function(t,e,r){function n(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var n=t.clientX||0,a=t.clientY||0,o=i(e);return r[0]=n-o.left,r[1]=a-o.top,r}function i(t){return t===window||t===document||t===document.body?a:t.getBoundingClientRect()}var a={left:0,top:0};e.exports=n},{}],433:[function(t,e,r){"use strict";function n(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){var e=t.which;if(2===e)return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<=0;--e)L(e,0);for(var r=[],e=0;e0;_=_-1&m)x.push(w+"["+T+"+"+g(_)+"]");x.push(v(0));for(var _=0;_0){",f(x[t]),"=1;"),P(t-1,e|1<0&&G.push(s(U,x[V-1])+"*"+o(x[V-1])),N.push(d(U,x[V])+"=("+G.join("-")+")|0")}for(var U=0;U=0;--U)Y.push(o(x[U]));N.push(k+"=("+Y.join("*")+")|0",M+"=mallocUint32("+k+")",w+"=mallocUint32("+k+")",T+"=0"),N.push(p(0)+"=0");for(var V=1;V<1< 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var a=t.getters||[],o=new Array(n),s=0;s=0?o[s]=!0:o[s]=!1;return b(t.vertex,t.cell,t.phase,i,r,o)}var _=t("typedarray-pool");e.exports=x;var w="V",M="P",A="N",k="Q",T="X",S="T"},{"typedarray-pool":518}],436:[function(t,e,r){"use strict";var n=t("cwise/lib/wrapper")({args:["index","array","scalar"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_1_arg1_=_inline_1_arg2_.apply(void 0,_inline_1_arg0_)}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"cwise",blockSize:64});e.exports=function(t,e){return n(t,e),t}},{"cwise/lib/wrapper":103}],437:[function(t,e,r){"use strict";function n(t){if(t in l)return l[t];for(var e=[],r=0;r=0?s.push("0"):e.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),n.push("1"),o.push("s["+l+"]-2"));var u=".lo("+n.join()+").hi("+o.join()+")";if(0===n.length&&(u=""),r>0){a.push("if(1");for(var l=0;l=0||e.indexOf(-(l+1))>=0||a.push("&&s[",l,"]>2");a.push("){grad",r,"(src.pick(",s.join(),")",u);for(var l=0;l=0||e.indexOf(-(l+1))>=0||a.push(",dst.pick(",s.join(),",",l,")",u);a.push(");")}for(var l=0;l1){dst.set(",s.join(),",",c,",0.5*(src.get(",f.join(),")-src.get(",d.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):a.push("if(s[",c,"]>1){diff(",h,",src.pick(",f.join(),")",u,",src.pick(",d.join(),")",u,");}else{zero(",h,");};");break;case"mirror":0===r?a.push("dst.set(",s.join(),",",c,",0);"):a.push("zero(",h,");");break;case"wrap":var p=s.slice(),m=s.slice();e[l]<0?(p[c]="s["+c+"]-2",m[c]="0"):(p[c]="s["+c+"]-1",m[c]="1"),0===r?a.push("if(s[",c,"]>2){dst.set(",s.join(),",",c,",0.5*(src.get(",p.join(),")-src.get(",m.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):a.push("if(s[",c,"]>2){diff(",h,",src.pick(",p.join(),")",u,",src.pick(",m.join(),")",u,");}else{zero(",h,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}r>0&&a.push("};")}(p)}}a.push("return dst;};return gradient");for(var m=["diff","zero"],g=[h,f],o=1;o<=i;++o)m.push("grad"+o),g.push(n(o));m.push(a.join(""));var v=Function.apply(void 0,m),r=v.apply(void 0,g);return l[e]=r,r}function a(t,e,r){if(Array.isArray(r)){if(r.length!==e.dimension)throw new Error("ndarray-gradient: invalid boundary conditions")}else r="string"==typeof r?o(e.dimension,r):o(e.dimension,"clamp");if(t.dimension!==e.dimension+1)throw new Error("ndarray-gradient: output dimension must be +1 input dimension");if(t.shape[e.dimension]!==e.dimension)throw new Error("ndarray-gradient: output shape must match input shape");for(var n=0;n>",rrshift:">>>"};!function(){for(var t in l){var e=l[t];r[t]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a"+e+"=b"},rvalue:!0,funcName:t+"eq"}),r[t+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a"+e+"=s"},rvalue:!0,funcName:t+"seq"})}}();var u={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in u){var e=u[t];r[t]=a({args:["array","array"],body:{args:["a","b"],body:"a="+e+"b"},funcName:t}),r[t+"eq"]=a({args:["array"],body:{args:["a"],body:"a="+e+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in c){var e=c[t];r[t]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a=a"+e+"b"},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+e+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var h=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=o({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=o({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=a({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=a({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=a({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=o({args:["array","array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":100}],441:[function(t,e,r){"use strict";var n=t("ndarray"),i=t("./doConvert.js");e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{"./doConvert.js":442,ndarray:446}],442:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":100}],443:[function(t,e,r){"use strict";function n(t){switch(t){case"uint8":return[l.mallocUint8,l.freeUint8];case"uint16":return[l.mallocUint16,l.freeUint16];case"uint32":return[l.mallocUint32,l.freeUint32];case"int8":return[l.mallocInt8,l.freeInt8];case"int16":return[l.mallocInt16,l.freeInt16];case"int32": -return[l.mallocInt32,l.freeInt32];case"float32":return[l.mallocFloat,l.freeFloat];case"float64":return[l.mallocDouble,l.freeDouble];default:return null}}function i(t){for(var e=[],r=0;r1){for(var h=[],f=1;f1){o.push("dptr=0;sptr=ptr");for(var f=t.length-1;f>=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"left){","dptr=0","sptr=cptr-s0");for(var f=1;fb){break __l}"].join(""));for(var f=t.length-1;f>=1;--f)o.push("sptr+=e"+f,"dptr+=f"+f,"}");o.push("dptr=cptr;sptr=cptr-s0");for(var f=t.length-1;f>=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"left)&&("+r("cptr-s0")+">scratch)){",a("cptr",r("cptr-s0")),"cptr-=s0","}",a("cptr","scratch"));if(o.push("}"),t.length>1&&u&&o.push("free(scratch)"),o.push("} return "+s),u){var p=new Function("malloc","free",o.join("\n"));return p(u[0],u[1])}var p=new Function(o.join("\n"));return p()}function o(t,e,r){function a(t){return["(offset+",t,"*s0)"].join("")}function o(t){return"generic"===e?["data.get(",t,")"].join(""):["data[",t,"]"].join("")}function s(t,r){return"generic"===e?["data.set(",t,",",r,")"].join(""):["data[",t,"]=",r].join("")}function l(e,r,n){if(1===e.length)_.push("ptr0="+a(e[0]));else for(var i=0;i=0;--i){var o=t[i];0!==o&&_.push(["for(i",o,"=0;i",o,"1)for(var i=0;i1?_.push("ptr_shift+=d"+o):_.push("ptr0+=d"+o),_.push("}"))}}function c(e,r,n,i){if(1===r.length)_.push("ptr0="+a(r[0]));else{for(var o=0;o1)for(var o=0;o=1;--o)n&&_.push("pivot_ptr+=f"+o),r.length>1?_.push("ptr_shift+=e"+o):_.push("ptr0+=e"+o),_.push("}")}function h(){t.length>1&&A&&_.push("free(pivot1)","free(pivot2)")}function f(e,r){var n="el"+e,i="el"+r;if(t.length>1){var s="__l"+ ++k;c(s,[n,i],!1,["comp=",o("ptr0"),"-",o("ptr1"),"\n","if(comp>0){tmp0=",n,";",n,"=",i,";",i,"=tmp0;break ",s,"}\n","if(comp<0){break ",s,"}"].join(""))}else _.push(["if(",o(a(n)),">",o(a(i)),"){tmp0=",n,";",n,"=",i,";",i,"=tmp0}"].join(""))}function d(e,r){t.length>1?l([e,r],!1,s("ptr0",o("ptr1"))):_.push(s(a(e),o(a(r))))}function p(e,r,n){if(t.length>1){var i="__l"+ ++k;c(i,[r],!0,[e,"=",o("ptr0"),"-pivot",n,"[pivot_ptr]\n","if(",e,"!==0){break ",i,"}"].join(""))}else _.push([e,"=",o(a(r)),"-pivot",n].join(""))}function m(e,r){t.length>1?l([e,r],!1,["tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1","tmp")].join("")):_.push(["ptr0=",a(e),"\n","ptr1=",a(r),"\n","tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1","tmp")].join(""))}function g(e,r,n){t.length>1?(l([e,r,n],!1,["tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1",o("ptr2")),"\n",s("ptr2","tmp")].join("")),_.push("++"+r,"--"+n)):_.push(["ptr0=",a(e),"\n","ptr1=",a(r),"\n","ptr2=",a(n),"\n","++",r,"\n","--",n,"\n","tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1",o("ptr2")),"\n",s("ptr2","tmp")].join(""))}function v(t,e){m(t,e),_.push("--"+e)}function y(e,r,n){t.length>1?l([e,r],!0,[s("ptr0",o("ptr1")),"\n",s("ptr1",["pivot",n,"[pivot_ptr]"].join(""))].join("")):_.push(s(a(e),o(a(r))),s(a(r),"pivot"+n))}function b(e,r){_.push(["if((",r,"-",e,")<=",u,"){\n","insertionSort(",e,",",r,",data,offset,",i(t.length).join(","),")\n","}else{\n",w,"(",e,",",r,",data,offset,",i(t.length).join(","),")\n","}"].join(""))}function x(e,r,n){t.length>1?(_.push(["__l",++k,":while(true){"].join("")),l([e],!0,["if(",o("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",k,"}"].join("")),_.push(n,"}")):_.push(["while(",o(a(e)),"===pivot",r,"){",n,"}"].join(""))}var _=["'use strict'"],w=["ndarrayQuickSort",t.join("d"),e].join(""),M=["left","right","data","offset"].concat(i(t.length)),A=n(e),k=0;_.push(["function ",w,"(",M.join(","),"){"].join(""));var T=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(t.length>1){for(var S=[],E=1;E1?l(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",o("ptr1"),"\n","pivot2[pivot_ptr]=",o("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",o("ptr0"),"\n","y=",o("ptr2"),"\n","z=",o("ptr4"),"\n",s("ptr5","x"),"\n",s("ptr6","y"),"\n",s("ptr7","z")].join("")):_.push(["pivot1=",o(a("el2")),"\n","pivot2=",o(a("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",o(a("el1")),"\n","y=",o(a("el3")),"\n","z=",o(a("el5")),"\n",s(a("index1"),"x"),"\n",s(a("index3"),"y"),"\n",s(a("index5"),"z")].join("")),d("index2","left"),d("index4","right"),_.push("if(pivots_are_equal){"),_.push("for(k=less;k<=great;++k){"),p("comp","k",1),_.push("if(comp===0){continue}"),_.push("if(comp<0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),_.push("while(true){"),p("comp","great",1),_.push("if(comp>0){"),_.push("great--"),_.push("}else if(comp<0){"),g("k","less","great"),_.push("break"),_.push("}else{"),v("k","great"),_.push("break"),_.push("}"),_.push("}"),_.push("}"),_.push("}"),_.push("}else{"),_.push("for(k=less;k<=great;++k){"),p("comp_pivot1","k",1),_.push("if(comp_pivot1<0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),p("comp_pivot2","k",2),_.push("if(comp_pivot2>0){"),_.push("while(true){"),p("comp","great",2),_.push("if(comp>0){"),_.push("if(--greatindex5){"),x("less",1,"++less"),x("great",2,"--great"),_.push("for(k=less;k<=great;++k){"),p("comp_pivot1","k",1),_.push("if(comp_pivot1===0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),p("comp_pivot2","k",2),_.push("if(comp_pivot2===0){"),_.push("while(true){"),p("comp","great",2),_.push("if(comp===0){"),_.push("if(--great1&&A){var L=new Function("insertionSort","malloc","free",_.join("\n"));return L(r,A[0],A[1])}var L=new Function("insertionSort",_.join("\n"));return L(r)}function s(t,e){var r=["'use strict'"],n=["ndarraySortWrapper",t.join("d"),e].join(""),s=["array"];r.push(["function ",n,"(",s.join(","),"){"].join(""));for(var l=["data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride"],c=0;c0?l.push(["d",g,"=s",g,"-d",p,"*n",p].join("")):l.push(["d",g,"=s",g].join("")),p=g);var d=t.length-1-c;0!==d&&(m>0?l.push(["e",d,"=s",d,"-e",m,"*n",m,",f",d,"=",h[d],"-f",m,"*n",m].join("")):l.push(["e",d,"=s",d,",f",d,"=",h[d]].join("")),m=d)}r.push("var "+l.join(","));var v=["0","n0-1","data","offset"].concat(i(t.length));r.push(["if(n0<=",u,"){","insertionSort(",v.join(","),")}else{","quickSort(",v.join(","),")}"].join("")),r.push("}return "+n);var y=new Function("insertionSort","quickSort",r.join("\n")),b=a(t,e);return y(b,o(t,e,b))}var l=t("typedarray-pool"),u=32;e.exports=s},{"typedarray-pool":518}],444:[function(t,e,r){"use strict";function n(t){var e=t.order,r=t.dtype,n=[e,r],o=n.join(":"),s=a[o];return s||(a[o]=s=i(e,r)),s(t),t}var i=t("./lib/compile_sort.js"),a={};e.exports=n},{"./lib/compile_sort.js":443}],445:[function(t,e,r){"use strict";var n=t("ndarray-linear-interpolate"),i=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=new Array(_inline_9_arg4_)}",args:[{name:"_inline_9_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg2_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_.apply(void 0,this_warped)}",args:[{name:"_inline_10_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_10_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg4_",lvalue:!1,rvalue:!1,count:0}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warpND",blockSize:64}),a=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0])}",args:[{name:"_inline_13_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_13_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp1D",blockSize:64}),o=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_16_arg2_(this_warped,_inline_16_arg0_),_inline_16_arg1_=_inline_16_arg3_(_inline_16_arg4_,this_warped[0],this_warped[1])}",args:[{name:"_inline_16_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_16_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp2D",blockSize:64}),s=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_19_arg2_(this_warped,_inline_19_arg0_),_inline_19_arg1_=_inline_19_arg3_(_inline_19_arg4_,this_warped[0],this_warped[1],this_warped[2])}",args:[{name:"_inline_19_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_19_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_19_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_19_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_19_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp3D",blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:a(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:i(t,r,n.bind(void 0,e),e.shape.length)}return t}},{"cwise/lib/wrapper":103,"ndarray-linear-interpolate":439}],446:[function(t,e,r){function n(t,e){return t[0]-e[0]}function i(){var t,e=this.stride,r=new Array(e.length);for(t=0;tMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&a.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):a.push("ORDER})")),a.push("proto.set=function "+r+"_set("+u.join(",")+",v){"),n?a.push("return this.data.set("+c+",v)}"):a.push("return this.data["+c+"]=v}"),a.push("proto.get=function "+r+"_get("+u.join(",")+"){"),n?a.push("return this.data.get("+c+")}"):a.push("return this.data["+c+"]}"),a.push("proto.index=function "+r+"_index(",u.join(),"){return "+c+"}"),a.push("proto.hi=function "+r+"_hi("+u.join(",")+"){return new "+r+"(this.data,"+s.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+s.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var p=s.map(function(t){return"a"+t+"=this.shape["+t+"]"}),m=s.map(function(t){return"c"+t+"=this.stride["+t+"]"});a.push("proto.lo=function "+r+"_lo("+u.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+m.join(","));for(var g=0;g=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");a.push("return new "+r+"(this.data,"+s.map(function(t){return"a"+t}).join(",")+","+s.map(function(t){return"c"+t}).join(",")+",b)}"),a.push("proto.step=function "+r+"_step("+u.join(",")+"){var "+s.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+s.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var g=0;g=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+s.map(function(t){return"shape["+t+"]"}).join(",")+","+s.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}");var o=new Function("CTOR_LIST","ORDER",a.join("\n"));return o(h[t],i)}function o(t){if(u(t))return"buffer";if(c)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(t)?"array":"generic"}function s(t,e,r,n){if(void 0===t){var i=h.array[0];return i([])}"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var s=e.length;if(void 0===r){r=new Array(s);for(var l=s-1,u=1;l>=0;--l)r[l]=u,u*=e[l]}if(void 0===n){n=0;for(var l=0;lt==t>0?n===o?(r+=1,n=0):n+=1:0===n?(n=o,r-=1):n-=1,i.pack(n,r)}var i=t("double-bits"),a=Math.pow(2,-1074),o=-1>>>0;e.exports=n},{"double-bits":106}],448:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa)for(var x=i[u],_=1/Math.sqrt(g*y),b=0;b<3;++b){var w=(b+1)%3,M=(b+2)%3;x[b]+=_*(v[w]*m[M]-v[M]*m[w])}}for(var o=0;oa)for(var _=1/Math.sqrt(A),b=0;b<3;++b)x[b]*=_;else for(var b=0;b<3;++b)x[b]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(d):0;for(var u=0;u<3;++u)f[u]*=d;i[o]=f}return i}},{}],449:[function(t,e,r){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,l=n(t),u=1;u0){var h=Math.sqrt(c+1);t[0]=.5*(o-l)/h,t[1]=.5*(s-n)/h,t[2]=.5*(r-a)/h,t[3]=.5*h}else{var f=Math.max(e,a,u),h=Math.sqrt(2*f-c+1);e>=f?(t[0]=.5*h,t[1]=.5*(i+r)/h,t[2]=.5*(s+n)/h,t[3]=.5*(o-l)/h):a>=f?(t[0]=.5*(r+i)/h,t[1]=.5*h,t[2]=.5*(l+o)/h,t[3]=.5*(s-n)/h):(t[0]=.5*(n+s)/h,t[1]=.5*(o+l)/h,t[2]=.5*h,t[3]=.5*(r-i)/h)}return t}e.exports=n},{}],451:[function(t,e,r){"use strict";function n(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function i(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function a(t,e){var r=e[0],n=e[1],a=e[2],o=e[3],s=i(r,n,a,o);s>1e-6?(t[0]=r/s,t[1]=n/s,t[2]=a/s,t[3]=o/s):(t[0]=t[1]=t[2]=0,t[3]=1)}function o(t,e,r){this.radius=l([r]),this.center=l(e),this.rotation=l(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}function s(t){t=t||{};var e=t.center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),r=[].slice.call(r,0,4),a(r,r);var i=new o(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i}e.exports=s;var l=t("filtered-vector"),u=t("gl-mat4/lookAt"),c=t("gl-mat4/fromQuat"),h=t("gl-mat4/invert"),f=t("./lib/quatFromFrame"),d=o.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;a(e,e);var r=this.computedMatrix;c(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var u=0,h=0;h<3;++h)u+=r[l+4*h]*i[h];r[12+l]=-u}},d.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},d.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},d.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},d.pan=function(t,e,r,i){e=e||0,r=r||0,i=i||0,this.recalcMatrix(t);var a=this.computedMatrix,o=a[1],s=a[5],l=a[9],u=n(o,s,l);o/=u,s/=u,l/=u;var c=a[0],h=a[4],f=a[8],d=c*o+h*s+f*l;c-=o*d,h-=s*d,f-=l*d;var p=n(c,h,f);c/=p,h/=p,f/=p;var m=a[2],g=a[6],v=a[10],y=m*o+g*s+v*l,b=m*c+g*h+v*f;m-=y*o+b*c,g-=y*s+b*h,v-=y*l+b*f;var x=n(m,g,v);m/=x,g/=x,v/=x;var _=c*e+o*r,w=h*e+s*r,M=f*e+l*r;this.center.move(t,_,w,M);var A=Math.exp(this.computedRadius[0]);A=Math.max(1e-4,A+i),this.radius.set(t,Math.log(A))},d.rotate=function(t,e,r,a){this.recalcMatrix(t),e=e||0,r=r||0;var o=this.computedMatrix,s=o[0],l=o[4],u=o[8],c=o[1],h=o[5],f=o[9],d=o[2],p=o[6],m=o[10],g=e*s+r*c,v=e*l+r*h,y=e*u+r*f,b=-(p*y-m*v),x=-(m*g-d*y),_=-(d*v-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(b,2)-Math.pow(x,2)-Math.pow(_,2))),M=i(b,x,_,w);M>1e-6?(b/=M,x/=M,_/=M,w/=M):(b=x=_=0,w=1);var A=this.computedRotation,k=A[0],T=A[1],S=A[2],E=A[3],L=k*w+E*b+T*_-S*x,C=T*w+E*x+S*b-k*_,D=S*w+E*_+k*x-T*b,z=E*w-k*b-T*x-S*_;if(a){b=d,x=p,_=m;var I=Math.sin(a)/n(b,x,_);b*=I,x*=I,_*=I,w=Math.cos(e),L=L*w+z*b+C*_-D*x,C=C*w+z*x+D*b-L*_,D=D*w+z*_+L*x-C*b,z=z*w-L*b-C*x-D*_}var P=i(L,C,D,z);P>1e-6?(L/=P,C/=P,D/=P,z/=P):(L=C=D=0,z=1),this.rotation.set(t,L,C,D,z)},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var i=this.computedMatrix;u(i,e,r,n);var o=this.computedRotation;f(o,i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10]),a(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var s=0,l=0;l<3;++l)s+=Math.pow(r[l]-e[l],2);this.radius.set(t,.5*Math.log(Math.max(s,1e-6))),this.center.set(t,r[0],r[1],r[2])},d.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},d.setMatrix=function(t,e){var r=this.computedRotation;f(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),a(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;h(n,e);var i=n[15];if(Math.abs(i)>1e-6){var o=n[12]/i,s=n[13]/i,l=n[14]/i;this.recalcMatrix(t);var u=Math.exp(this.computedRadius[0]);this.center.set(t,o-n[2]*u,s-n[6]*u,l-n[10]*u),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},d.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},d.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},d.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},d.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},d.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{"./lib/quatFromFrame":450,"filtered-vector":115,"gl-mat4/fromQuat":159,"gl-mat4/invert":162,"gl-mat4/lookAt":163}],452:[function(t,e,r){"use strict";var n=t("repeat-string");e.exports=function(t,e,r){return r=void 0!==r?r+"":" ",n(r,e)+t}},{"repeat-string":478}],453:[function(t,e,r){e.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},{}],454:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,i="/"===o.charAt(0))}return r=e(n(r.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(t){var i=r.isAbsolute(t),a="/"===o(t,-1);return t=e(n(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),a=n(e.split("/")),o=Math.min(i.length,a.length),s=o,l=0;l55295&&e<57344){if(!r){e>56319||a+1===n?i.push(239,191,189):r=e;continue}if(e<56320){i.push(239,191,189),r=e;continue}e=r-55296<<10|e-56320|65536,r=null}else r&&(i.push(239,191,189),r=null);e<128?i.push(e):e<2048?i.push(e>>6|192,63&e|128):e<65536?i.push(e>>12|224,e>>6&63|128,63&e|128):i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}return i}e.exports=n;var a,o,s,l=t("ieee754");a={readUInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},writeUInt32LE:function(t,e){this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24},readInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+(this[t+3]<<24)},readFloatLE:function(t){return l.read(this,t,!0,23,4)},readDoubleLE:function(t){return l.read(this,t,!0,52,8)},writeFloatLE:function(t,e){return l.write(this,t,e,!0,23,4)},writeDoubleLE:function(t,e){return l.write(this,t,e,!0,52,8)},toString:function(t,e,r){var n="",i="";e=e||0,r=Math.min(this.length,r||this.length);for(var a=e;a=1;){if(e.pos>=r)throw new Error("Given varint doesn't fit into 10 bytes");var n=255&t;e.buf[e.pos++]=n|(t>=128?128:0),t/=128}}function o(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function s(t,e){for(var r=0;r>3,a=this.pos;t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=this.buf.readUInt32LE(this.pos);return this.pos+=4,t},readSFixed32:function(){var t=this.buf.readInt32LE(this.pos);return this.pos+=4,t},readFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+4294967296*this.buf.readUInt32LE(this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+4294967296*this.buf.readInt32LE(this.pos+4);return this.pos+=8,t},readFloat:function(){var t=this.buf.readFloatLE(this.pos);return this.pos+=4,t},readDouble:function(){var t=this.buf.readDoubleLE(this.pos);return this.pos+=8,t},readVarint:function(){var t,e,r=this.buf;return e=r[this.pos++],t=127&e,e<128?t:(e=r[this.pos++],t|=(127&e)<<7,e<128?t:(e=r[this.pos++],t|=(127&e)<<14,e<128?t:(e=r[this.pos++],t|=(127&e)<<21,e<128?t:i(t,this))))},readVarint64:function(){var t=this.pos,e=this.readVarint();if(e127;);else if(e===n.Bytes)this.pos=this.readVarint()+this.pos;else if(e===n.Fixed32)this.pos+=4;else{if(e!==n.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455)return void a(t,this);this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127)))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t);var e=g.byteLength(t);this.writeVarint(e),this.realloc(e),this.buf.write(t,this.pos),this.pos+=e},writeFloat:function(t){this.realloc(4),this.buf.writeFloatLE(t,this.pos),this.pos+=4},writeDouble:function(t){this.realloc(8),this.buf.writeDoubleLE(t,this.pos),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&o(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,n.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,s,e)},writePackedSVarint:function(t,e){this.writeMessage(t,l,e)},writePackedBoolean:function(t,e){this.writeMessage(t,h,e)},writePackedFloat:function(t,e){this.writeMessage(t,u,e)},writePackedDouble:function(t,e){this.writeMessage(t,c,e)},writePackedFixed32:function(t,e){this.writeMessage(t,f,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,d,e)},writePackedFixed64:function(t,e){this.writeMessage(t,p,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,n.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,n.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,n.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,n.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./buffer":455}],457:[function(t,e,r){"use strict";function n(t){var e=t.length;if(e0;--i)n=l[i],r=s[i],s[i]=s[n],s[n]=r,l[i]=l[r],l[r]=n,u=(u+r)*i;return a.freeUint32(l),a.freeUint32(s),u}function i(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}r=r||new Array(t);var n,i,a,o=1;for(r[0]=0,a=1;a0;--a)n=e/o|0,e=e-n*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}var a=t("typedarray-pool"),o=t("invert-permutation");r.rank=n,r.unrank=i},{"invert-permutation":272,"typedarray-pool":518}],459:[function(t,e,r){"use strict";function n(t,e){function r(t,e){var r=s[e][t[e]];r.splice(r.indexOf(t),1)}function n(t,n,a){for(var o,l,u,c=0;c<2;++c)if(s[c][n].length>0){o=s[c][n][0],u=c;break}l=o[1^u];for(var h=0;h<2;++h)for(var f=s[h][n],d=0;d0&&(o=p,l=m,u=h)}return a?l:(o&&r(o,u),l)}for(var a=0|e.length,o=t.length,s=[new Array(a),new Array(a)],l=0;l0;){var d=(s[0][l].length,function(t,a){var o=s[a][t][0],l=[t];r(o,a);for(var u=o[1^a];;){for(;u!==t;)l.push(u),u=n(l[l.length-2],u,!1);if(s[0][t].length+s[1][t].length===0)break;var c=l[l.length-1],h=t,f=l[1],d=n(c,h,!0);if(i(e[c],e[h],e[f],e[d])<0)break;l.push(t),u=n(c,h)}return l}(l,h));!function(t,e){return e[1]===e[e.length-1]}(f,d)?(f.length>0&&c.push(f),f=d):f.push.apply(f,d)}f.length>0&&c.push(f)}return c}e.exports=n;var i=t("compare-angle")},{"compare-angle":90}],460:[function(t,e,r){"use strict";function n(t,e){for(var r=i(t,e.length),n=new Array(e.length),a=new Array(e.length),o=[],s=0;s0;){var u=o.pop();n[u]=!1;for(var c=r[u],s=0;s0}function a(t){for(var e=t.length,r=0;r0;){var U=N.pop(),V=z[U];h(V,function(t,e){return t-e});var H,q=V.length,G=B[U];if(0===G){var T=v[U];H=[T]}for(var g=0;g=0)&&(B[Y]=1^G,N.push(Y),0===G)){var T=v[Y];a(T)||(T.reverse(),H.push(T))}}0===G&&d.push(H)}return d}e.exports=a;var o=t("edges-to-adjacency-list"),s=t("planar-dual"),l=t("point-in-big-polygon"),u=t("two-product"),c=t("robust-sum"),h=t("uniq"),f=t("./lib/trim-leaves")},{"./lib/trim-leaves":460,"edges-to-adjacency-list":109,"planar-dual":459,"point-in-big-polygon":463,"robust-sum":491,"two-product":516,uniq:520}],462:[function(t,e,r){"use strict";function n(t,e){this.x=t,this.y=e}e.exports=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{}],463:[function(t,e,r){function n(){return!0}function i(t){return function(e,r){var i=t[e];return!!i&&!!i.queryPoint(r,n)}}function a(t){for(var e={},r=0;r0&&e[n]===r[0]))return 1;i=t[n-1]}for(var a=1;i;){var o=i.key,s=h(r,o[0],o[1]);if(o[0][0]0))return 0;a=-1,i=i.right}else if(s>0)i=i.left;else{if(!(s<0))return 0;a=1,i=i.right}}return a}}function s(t){return 1}function l(t){return function(e){return t(e[0],e[1])?0:1}}function u(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}function c(t){for(var e=t.length,r=[],n=[],i=0;i=u?(x=1,y=u+2*f+p):(x=-f/u,y=f*x+p)):(x=0,d>=0?(_=0,y=p):-d>=h?(_=1,y=h+2*d+p):(_=-d/h,y=d*_+p));else if(_<0)_=0,f>=0?(x=0,y=p):-f>=u?(x=1,y=u+2*f+p):(x=-f/u,y=f*x+p);else{var w=1/b;x*=w,_*=w,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p}else{var M,A,k,T;x<0?(M=c+f,A=h+d,A>M?(k=A-M,T=u-2*c+h,k>=T?(x=1,_=0,y=u+2*f+p):(x=k/T,_=1-x,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)):(x=0,A<=0?(_=1,y=h+2*d+p):d>=0?(_=0,y=p):(_=-d/h,y=d*_+p))):_<0?(M=c+d,A=u+f,A>M?(k=A-M,T=u-2*c+h,k>=T?(_=1,x=0,y=h+2*d+p):(_=k/T,x=1-_,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)):(_=0,A<=0?(x=1,y=u+2*f+p):f>=0?(x=0,y=p):(x=-f/u,y=f*x+p))):(k=h+d-c-f,k<=0?(x=0,_=1,y=h+2*d+p):(T=u-2*c+h,k>=T?(x=1,_=0,y=u+2*f+p):(x=k/T,_=1-x,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)))}for(var S=1-x-_,l=0;l1)for(var r=1;r1&&(n=r[0]+"@",t=r[1]),t=t.replace(I,"."),n+o(t.split("."),e).join(".")}function l(t){for(var e,r,n=[],i=0,a=t.length;i=55296&&e<=56319&&i65535&&(t-=65536,e+=j(t>>>10&1023|55296),t=56320|1023&t),e+=j(t)}).join("")}function c(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:M}function h(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,r){var n=0;for(t=r?R(t/S):t>>1,t+=R(t/e);t>O*k>>1;n+=M)t=R(t/O);return R(n+(O+1)*t/(t+T))}function d(t){var e,r,n,i,o,s,l,h,d,p,m=[],g=t.length,v=0,y=L,b=E;for(r=t.lastIndexOf(C),r<0&&(r=0),n=0;n=128&&a("not-basic"),m.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=g&&a("invalid-input"),h=c(t.charCodeAt(i++)),(h>=M||h>R((w-v)/s))&&a("overflow"),v+=h*s,d=l<=b?A:l>=b+k?k:l-b,!(hR(w/p)&&a("overflow"),s*=p;e=m.length+1,b=f(v-o,e,0==o),R(v/e)>w-y&&a("overflow"),y+=R(v/e),v%=e,m.splice(v++,0,y)}return u(m)}function p(t){var e,r,n,i,o,s,u,c,d,p,m,g,v,y,b,x=[];for(t=l(t),g=t.length,e=L,r=0,o=E,s=0;s=e&&mR((w-r)/v)&&a("overflow"),r+=(u-e)*v,e=u,s=0;sw&&a("overflow"),m==e){for(c=r,d=M;p=d<=o?A:d>=o+k?k:d-o,!(c= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=M-A,R=Math.floor,j=String.fromCharCode;if(x={version:"1.4.1",ucs2:{decode:l,encode:u},decode:d,encode:p,toASCII:g,toUnicode:m},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return x});else if(v&&y)if(r.exports==v)y.exports=x;else for(_ in x)x.hasOwnProperty(_)&&(v[_]=x[_]);else i.punycode=x}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],467:[function(t,e,r){e.exports=t("gl-quat/slerp")},{"gl-quat/slerp":212}],468:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,a){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;t=t.split(e);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var l=t.length;s>0&&l>s&&(l=s);for(var u=0;u=0?(c=p.substr(0,m),h=p.substr(m+1)):(c=p,h=""),f=decodeURIComponent(c),d=decodeURIComponent(h),n(o,f)?i(o[f])?o[f].push(d):o[f]=[o[f],d]:o[f]=d}return o};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],469:[function(t,e,r){"use strict";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;nr;){if(o-r>600){var l=o-r+1,u=e-r+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1);n(t,e,Math.max(r,Math.floor(e-u*h/l+f)),Math.min(o,Math.floor(e+(l-u)*h/l+f)),s)}var d=t[e],p=r,m=o;for(i(t,r,e),s(t[o],d)>0&&i(t,r,o);p0;)m--}0===s(t[r],d)?i(t,r,m):(m++,i(t,m,o)),m<=e&&(r=m+1),e<=m&&(o=m-1)}}function i(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function a(t,e){return te?1:0}e.exports=n},{}],472:[function(t,e,r){"use strict";function n(t,e){for(var r=t.length,n=new Array(r),a=0;a0){var u=t[r-1];if(0===i(s,u)&&o(u)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}var i=t("compare-cell"),a=t("compare-oriented-cell"),o=t("cell-orientation");e.exports=n},{"cell-orientation":75,"compare-cell":91,"compare-oriented-cell":92}],477:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.createREGL=i()}(this,function(){"use strict";function t(t){return"undefined"!=typeof btoa?btoa(t):"base64:"+t}function e(t){var e=new Error("(regl) "+t);throw console.error(e),e}function r(t,r){t||e(r)}function n(t){return t?": "+t:""}function i(t,r,i){t in r||e("unknown parameter ("+t+")"+n(i)+". possible values: "+Object.keys(r).join())}function a(t,r){Qt(t)||e("invalid parameter type"+n(r)+". must be a typed array")}function o(t,r,i){typeof t!==r&&e("invalid parameter type"+n(i)+". expected "+r+", got "+typeof t)}function s(t,r){t>=0&&(0|t)===t||e("invalid parameter type, ("+t+")"+n(r)+". must be a nonnegative integer")}function l(t,r,i){r.indexOf(t)<0&&e("invalid value"+n(i)+". must be one of: "+r)}function u(t){Object.keys(t).forEach(function(t){te.indexOf(t)<0&&e('invalid regl constructor argument "'+t+'". must be one of '+te)})}function c(t,e){for(t+="";t.length0&&e.push(new d("unknown",0,t))}}),e}function y(t,e){e.forEach(function(e){var r=t[e.file];if(r){var n=r.index[e.line];if(n)return n.errors.push(e),void(r.hasErrors=!0)}t.unknown.hasErrors=!0,t.unknown.lines[0].errors.push(e)})}function b(t,e,n,i,a){if(!t.getShaderParameter(e,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(e),s=i===t.FRAGMENT_SHADER?"fragment":"vertex";T(n,"string",s+" shader source must be a string",a);var l=g(n,a),u=v(o);y(l,u),Object.keys(l).forEach(function(t){function e(t,e){n.push(t),i.push(e||"")}var r=l[t];if(r.hasErrors){var n=[""],i=[""];e("file number "+t+": "+r.name+"\n","color:red;text-decoration:underline;font-weight:bold"),r.lines.forEach(function(t){if(t.errors.length>0){e(c(t.number,4)+"| ","background-color:yellow; font-weight:bold"),e(t.line+"\n","color:red; background-color:yellow; font-weight:bold");var r=0;t.errors.forEach(function(n){var i=n.message,a=/^\s*\'(.*)\'\s*\:\s*(.*)$/.exec(i);if(a){var o=a[1];switch(i=a[2],o){case"assign":o="="}r=Math.max(t.line.indexOf(o,r),0)}else r=0;e(c("| ",6)),e(c("^^^",r+3)+"\n","font-weight:bold"),e(c("| ",6)),e(i+"\n","font-weight:bold")}),e(c("| ",6)+"\n")}else e(c(t.number,4)+"| "),e(t.line+"\n","color:red")}),"undefined"!=typeof document?(i[0]=n.join("%c"),console.log.apply(console,i)):console.log(n.join(""))}}),r.raise("Error compiling "+s+" shader, "+l[0].name)}}function x(t,e,n,i,a){if(!t.getProgramParameter(e,t.LINK_STATUS)){var o=t.getProgramInfoLog(e),s=g(n,a),l=g(i,a),u='Error linking program with vertex shader, "'+l[0].name+'", and fragment shader "'+s[0].name+'"';"undefined"!=typeof document?console.log("%c"+u+"\n%c"+o,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(u+"\n"+o),r.raise(u)}}function _(t){t._commandRef=p()}function w(t,e,r,n){function i(t){return t?n.id(t):0}function a(t,e){Object.keys(e).forEach(function(e){t[n.id(e)]=!0})}_(t),t._fragId=i(t.static.frag),t._vertId=i(t.static.vert);var o=t._uniformSet={};a(o,e.static),a(o,e.dynamic);var s=t._attributeSet={};a(s,r.static),a(s,r.dynamic),t._hasCount="count"in t.static||"count"in t.dynamic||"elements"in t.static||"elements"in t.dynamic}function M(t,r){var n=m();e(t+" in command "+(r||p())+("unknown"===n?"":" called from "+n))}function A(t,e,r){t||M(e,r||p())}function k(t,e,r,i){t in e||M("unknown parameter ("+t+")"+n(r)+". possible values: "+Object.keys(e).join(),i||p())}function T(t,e,r,i){typeof t!==e&&M("invalid parameter type"+n(r)+". expected "+e+", got "+typeof t,i||p())}function S(t){t()}function E(t,e,r){t.texture?l(t.texture._texture.internalformat,e,"unsupported texture format for attachment"):l(t.renderbuffer._renderbuffer.format,r,"unsupported renderbuffer format for attachment")}function L(t,e){return t===ue||t===le||t===ce?2:t===he?4:fe[t]*e}function C(t){return!(t&t-1||!t)}function D(t,e,n){var i,a=e.width,o=e.height,s=e.channels;r(a>0&&a<=n.maxTextureSize&&o>0&&o<=n.maxTextureSize,"invalid texture shape"),t.wrapS===ee&&t.wrapT===ee||r(C(a)&&C(o),"incompatible wrap mode for texture, both width and height must be power of 2"),1===e.mipmask?1!==a&&1!==o&&r(t.minFilter!==ne&&t.minFilter!==ae&&t.minFilter!==ie&&t.minFilter!==oe,"min filter requires mipmap"):(r(C(a)&&C(o),"texture must be a square power of 2 to support mipmapping"),r(e.mipmask===(a<<1)-1,"missing or incomplete mipmap data")),e.type===se&&(n.extensions.indexOf("oes_texture_float_linear")<0&&r(t.minFilter===re&&t.magFilter===re,"filter not supported, must enable oes_texture_float_linear"),r(!t.genMipmaps,"mipmap generation not supported with float textures"));var l=e.images;for(i=0;i<16;++i)if(l[i]){var u=a>>i,c=o>>i;r(e.mipmask&1<0&&a<=i.maxTextureSize&&o>0&&o<=i.maxTextureSize,"invalid texture shape"),r(a===o,"cube map must be square"),r(e.wrapS===ee&&e.wrapT===ee,"wrap mode not supported by cube map");for(var l=0;l>h,p=o>>h;r(u.mipmask&1<1&&e===r&&('"'===e||"'"===e))return['"'+P(t.substr(1,t.length-2))+'"'];var n=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t);if(n)return O(t.substr(0,n.index)).concat(O(n[1])).concat(O(t.substr(n.index+n[0].length)));var i=t.split(".");if(1===i.length)return['"'+P(t)+'"'];for(var a=[],o=0;o0,"invalid pixel ratio"))):de.raise("invalid arguments to regl"),e&&("canvas"===e.nodeName.toLowerCase()?n=e:r=e),!i){if(!n){de("undefined"!=typeof document,"must manually specify webgl context outside of DOM environments");var d=U(r||document.body,h,u);if(!d)return null;n=d.canvas,f=d.onDestroy}i=V(n,o)}return i?{gl:i,canvas:n,container:r,extensions:s,optionalExtensions:l,pixelRatio:u,profile:c,onDone:h,onDestroy:f}:(f(),h("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function X(t,e){function r(e){de.type(e,"string","extension name must be string");var r,i=e.toLowerCase();try{r=n[i]=t.getExtension(i)}catch(t){}return!!r}for(var n={},i=0;i65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1}function $(t){var e=K(t),r=Ee[Q(e)>>2];return r.length>0?r.pop():new ArrayBuffer(e)}function tt(t){Ee[Q(t.byteLength)>>2].push(t)}function et(t,e){var r=null;switch(t){case _e:r=new Int8Array($(e),0,e);break;case we:r=new Uint8Array($(e),0,e);break;case Me:r=new Int16Array($(2*e),0,e);break;case Ae:r=new Uint16Array($(2*e),0,e);break;case ke:r=new Int32Array($(4*e),0,e);break;case Te:r=new Uint32Array($(4*e),0,e);break;case Se:r=new Float32Array($(4*e),0,e);break;default:return null}return r.length!==e?r.subarray(0,e):r}function rt(t){tt(t.buffer)}function nt(t,e,r){for(var n=0;n0){var l;if(Array.isArray(e[0])){s=Pe(e);for(var u=1,c=1;c0)if("number"==typeof t[0]){var i=Le.allocType(p.dtype,t.length);ct(i,t),h(i,n),Le.freeType(i)}else if(Array.isArray(t[0])||Qt(t[0])){r=Pe(t);var a=Ie(t,r,p.dtype);h(a,n),Le.freeType(a)}else de.raise("invalid buffer data")}else if(Qt(t))h(t,n);else if(Z(t)){r=t.shape;var o=t.stride,s=0,l=0,u=0,f=0;1===r.length?(s=r[0],l=1,u=o[0],f=0):2===r.length?(s=r[0],l=r[1],u=o[0],f=o[1]):de.raise("invalid shape");var d=Array.isArray(t.data)?p.dtype:ut(t.data),m=Le.allocType(d,s*l);ht(m,t.data,s,l,u,f,t.offset),h(m,n),Le.freeType(m)}else de.raise("invalid data for buffer subdata");return c}e.bufferCount++;var p=new n(a);return f[p.id]=p,o||c(i),c._reglType="buffer",c._buffer=p,c.subdata=d,r.profile&&(c.stats=p.stats),c.destroy=function(){l(p)},c}function c(){xe(f).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})}var h=0,f={};n.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},n.prototype.destroy=function(){l(this)};var d=[];return r.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:u,createStream:i,destroyStream:a,clear:function(){xe(f).forEach(l),d.forEach(l)},getBuffer:function(t){return t&&t._buffer instanceof n?t._buffer:null},restore:c,_initBuffer:s}}function dt(t,e,r,n){function i(t){this.id=h++,c[this.id]=this,this.buffer=t,this.primType=He,this.vertCount=0,this.type=0}function a(t){var e=d.pop();return e||(e=new i(r.create(null,Je,!0,!1)._buffer)),s(e,t,Ke,-1,-1,0,0),e}function o(t){d.push(t)}function s(n,i,a,o,s,l,u){if(n.buffer.bind(),i){var c=u;u||Qt(i)&&(!Z(i)||Qt(i.data))||(c=e.oes_element_index_uint?Ze:We),r._initBuffer(n.buffer,i,a,c,3)}else t.bufferData(Je,l,a),n.buffer.dtype=h||Ge,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l;var h=u;if(!u){switch(n.buffer.dtype){case Ge:case qe:h=Ge;break;case We:case Ye:h=We;break;case Ze:case Xe:h=Ze;break;default:de.raise("unsupported type for element array")}n.buffer.dtype=h}n.type=h,de(h!==Ze||!!e.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var f=s;f<0&&(f=n.buffer.byteLength,h===We?f>>=1:h===Ze&&(f>>=2)),n.vertCount=f;var d=o;if(o<0){d=He;var p=n.buffer.dimension;1===p&&(d=Ue),2===p&&(d=Ve),3===p&&(d=He)}n.primType=d}function l(t){n.elementsCount--,de(null!==t.buffer,"must not double destroy elements"),delete c[t.id],t.buffer.destroy(),t.buffer=null}function u(t,e){function a(t){if(t)if("number"==typeof t)o(t),u.primType=He,u.vertCount=0|t,u.type=Ge;else{var e=null,r=Qe,n=-1,i=-1,l=0,c=0;Array.isArray(t)||Qt(t)||Z(t)?e=t:(de.type(t,"object","invalid arguments for elements"),"data"in t&&(e=t.data,de(Array.isArray(e)||Qt(e)||Z(e),"invalid data for element buffer")),"usage"in t&&(de.parameter(t.usage,ze,"invalid element buffer usage"),r=ze[t.usage]),"primitive"in t&&(de.parameter(t.primitive,Be,"invalid element buffer primitive"),n=Be[t.primitive]),"count"in t&&(de("number"==typeof t.count&&t.count>=0,"invalid vertex count for elements"),i=0|t.count),"type"in t&&(de.parameter(t.type,f,"invalid buffer type"),c=f[t.type]),"length"in t?l=0|t.length:(l=i,c===We||c===Ye?l*=2:c!==Ze&&c!==Xe||(l*=4))),s(u,e,r,n,i,l,c)}else o(),u.primType=He,u.vertCount=0,u.type=Ge;return a}var o=r.create(null,Je,!0),u=new i(o._buffer);return n.elementsCount++,a(t),a._reglType="elements",a._elements=u,a.subdata=function(t,e){return o.subdata(t,e),a},a.destroy=function(){l(u)},a}var c={},h=0,f={uint8:Ge,uint16:We};e.oes_element_index_uint&&(f.uint32=Ze),i.prototype.bind=function(){this.buffer.bind()};var d=[];return{create:u,createStream:a,destroyStream:o,getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){xe(c).forEach(l)}}}function pt(t){for(var e=Le.allocType(er,t.length),r=0;r>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)e[r]=i;else if(a<-14){var s=-14-a;e[r]=i+(o+1024>>s)}else e[r]=a>15?i+31744:i+(a+15<<10)+o}return e}function mt(t){return Array.isArray(t)||Qt(t)}function gt(t){return"[object "+t+"]"}function vt(t){return Array.isArray(t)&&(0===t.length||"number"==typeof t[0])}function yt(t){return!!Array.isArray(t)&&!(0===t.length||!mt(t[0]))}function bt(t){return Object.prototype.toString.call(t)}function xt(t){return bt(t)===dn}function _t(t){return bt(t)===pn}function wt(t){return bt(t)===mn}function Mt(t){return bt(t)===gn}function At(t){if(!t)return!1;var e=bt(t);return vn.indexOf(e)>=0||(vt(t)||yt(t)||Z(t))}function kt(t){return 0|Kt[Object.prototype.toString.call(t)]}function Tt(t,e){var r=e.length;switch(t.type){case Or:case Rr:case jr:case Fr:var n=Le.allocType(t.type,r);n.set(e),t.data=n;break;case wr:t.data=pt(e);break;default:de.raise("unsupported texture type, must specify a typed array")}}function St(t,e){return Le.allocType(t.type===wr?Fr:t.type,e)}function Et(t,e){t.type===wr?(t.data=pt(e),Le.freeType(e)):t.data=e}function Lt(t,e,r,n,i,a){for(var o=t.width,s=t.height,l=t.channels,u=o*s*l,c=St(t,u),h=0,f=0;f=1;)s+=o*l*l,l/=2;return s}return o*r*n}function Dt(t,e,r,n,i,a,o){function s(){this.internalformat=or,this.format=or,this.type=Or,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=0,this.width=0,this.height=0,this.channels=0}function l(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function u(t,n){if("object"==typeof n&&n){if("premultiplyAlpha"in n&&(de.type(n.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),t.premultiplyAlpha=n.premultiplyAlpha),"flipY"in n&&(de.type(n.flipY,"boolean","invalid texture flip"),t.flipY=n.flipY),"alignment"in n&&(de.oneOf(n.alignment,[1,2,4,8],"invalid texture unpack alignment"),t.unpackAlignment=n.alignment),"colorSpace"in n&&(de.parameter(n.colorSpace,F,"invalid colorSpace"),t.colorSpace=F[n.colorSpace]),"type"in n){var i=n.type;de(e.oes_texture_float||!("float"===i||"float32"===i),"you must enable the OES_texture_float extension in order to use floating point textures."),de(e.oes_texture_half_float||!("half float"===i||"float16"===i),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),de(e.webgl_depth_texture||!("uint16"===i||"uint32"===i||"depth stencil"===i),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),de.parameter(i,N,"invalid texture type"),t.type=N[i]}var a=t.width,o=t.height,s=t.channels,l=!1;"shape"in n?(de(Array.isArray(n.shape)&&n.shape.length>=2,"shape must be an array"),a=n.shape[0],o=n.shape[1],3===n.shape.length&&(s=n.shape[2],de(s>0&&s<=4,"invalid number of channels"),l=!0),de(a>=0&&a<=r.maxTextureSize,"invalid width"),de(o>=0&&o<=r.maxTextureSize,"invalid height")):("radius"in n&&(a=o=n.radius,de(a>=0&&a<=r.maxTextureSize,"invalid radius")),"width"in n&&(a=n.width,de(a>=0&&a<=r.maxTextureSize,"invalid width")),"height"in n&&(o=n.height,de(o>=0&&o<=r.maxTextureSize,"invalid height")),"channels"in n&&(s=n.channels,de(s>0&&s<=4,"invalid number of channels"),l=!0)),t.width=0|a,t.height=0|o,t.channels=0|s;var u=!1;if("format"in n){var c=n.format;de(e.webgl_depth_texture||!("depth"===c||"depth stencil"===c),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),de.parameter(c,B,"invalid texture format");var h=t.internalformat=B[c];t.format=J[h],c in N&&("type"in n||(t.type=N[c])),c in U&&(t.compressed=!0),u=!0}!l&&u?t.channels=fn[t.format]:l&&!u?t.channels!==hn[t.format]&&(t.format=t.internalformat=hn[t.channels]):u&&l&&de(t.channels===fn[t.format],"number of channels inconsistent with specified format")}}function c(e){t.pixelStorei(an,e.flipY),t.pixelStorei(on,e.premultiplyAlpha),t.pixelStorei(sn,e.colorSpace),t.pixelStorei(nn,e.unpackAlignment)}function h(){s.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function f(t,e){var n=null;if(At(e)?n=e:e&&(de.type(e,"object","invalid pixel data type"),u(t,e),"x"in e&&(t.xOffset=0|e.x),"y"in e&&(t.yOffset=0|e.y),At(e.data)&&(n=e.data)),de(!t.compressed||n instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),e.copy){de(!n,"can not specify copy and data field for the same texture");var a=i.viewportWidth,o=i.viewportHeight;t.width=t.width||a-t.xOffset,t.height=t.height||o-t.yOffset,t.needsCopy=!0,de(t.xOffset>=0&&t.xOffset=0&&t.yOffset0&&t.width<=a&&t.height>0&&t.height<=o,"copy texture read out of bounds")}else if(n){if(Qt(n))t.channels=t.channels||4,t.data=n,"type"in e||t.type!==Or||(t.type=kt(n));else if(vt(n))t.channels=t.channels||4,Tt(t,n),t.alignment=1,t.needsFree=!0;else if(Z(n)){var s=n.data;Array.isArray(s)||t.type!==Or||(t.type=kt(s));var l,c,h,f,d,p,m=n.shape,g=n.stride;3===m.length?(h=m[2],p=g[2]):(de(2===m.length,"invalid ndarray pixel data, must be 2 or 3D"),h=1,p=1),l=m[0],c=m[1],f=g[0],d=g[1],t.alignment=1,t.width=l,t.height=c,t.channels=h,t.format=t.internalformat=hn[h],t.needsFree=!0,Lt(t,s,f,d,p,n.offset)}else if(xt(n)||_t(n))xt(n)?t.element=n:t.element=n.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(wt(n))t.element=n,t.width=n.naturalWidth,t.height=n.naturalHeight,t.channels=4;else if(Mt(n))t.element=n,t.width=n.videoWidth,t.height=n.videoHeight,t.channels=4;else if(yt(n)){var v=t.width||n[0].length,y=t.height||n.length,b=t.channels;b=mt(n[0][0])?b||n[0][0].length:b||1;for(var x=Ce.shape(n),_=1,w=0;w=0,"oes_texture_float extension not enabled"):t.type===wr&&de(r.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function d(e,r,i){var a=e.element,o=e.data,s=e.internalformat,l=e.format,u=e.type,h=e.width,f=e.height;c(e),a?t.texImage2D(r,i,l,l,u,a):e.compressed?t.compressedTexImage2D(r,i,s,h,f,0,o):e.needsCopy?(n(),t.copyTexImage2D(r,i,l,e.xOffset,e.yOffset,h,f,0)):t.texImage2D(r,i,l,h,f,0,l,u,o)}function p(e,r,i,a,o){var s=e.element,l=e.data,u=e.internalformat,h=e.format,f=e.type,d=e.width,p=e.height;c(e),s?t.texSubImage2D(r,o,i,a,h,f,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,u,d,p,l):e.needsCopy?(n(),t.copyTexSubImage2D(r,o,i,a,e.xOffset,e.yOffset,d,p)):t.texSubImage2D(r,o,i,a,d,p,h,f,l)}function m(){return K.pop()||new h}function g(t){t.needsFree&&Le.freeType(t.data),h.call(t),K.push(t)}function v(){s.call(this),this.genMipmaps=!1,this.mipmapHint=$r,this.mipmask=0,this.images=Array(16)}function y(t,e,r){var n=t.images[0]=m();t.mipmask=1,n.width=t.width=e,n.height=t.height=r,n.channels=t.channels=4}function b(t,e){var r=null;if(At(e))r=t.images[0]=m(),l(r,t),f(r,e),t.mipmask=1;else if(u(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i>=i,r.height>>=i,f(r,n[i]),t.mipmask|=1<=0&&(t.genMipmaps=!0)}if("mag"in e){var i=e.mag;de.parameter(i,R),t.magFilter=R[i]}var a=t.wrapS,o=t.wrapT;if("wrap"in e){var s=e.wrap;"string"==typeof s?(de.parameter(s,O),a=o=O[s]):Array.isArray(s)&&(de.parameter(s[0],O),de.parameter(s[1],O),a=O[s[0]],o=O[s[1]])}else{if("wrapS"in e){var l=e.wrapS;de.parameter(l,O),a=O[l]}if("wrapT"in e){var u=e.wrapT;de.parameter(u,O),o=O[u]}}if(t.wrapS=a,t.wrapT=o,"anisotropic"in e){var c=e.anisotropic;de("number"==typeof c&&c>=1&&c<=r.maxAnisotropic,"aniso samples must be between 1 and "),t.anisotropic=e.anisotropic}if("mipmap"in e){var h=!1;switch(typeof e.mipmap){case"string":de.parameter(e.mipmap,P,"invalid mipmap hint"),t.mipmapHint=P[e.mipmap],t.genMipmaps=!0,h=!0;break;case"boolean":h=t.genMipmaps=e.mipmap;break;case"object":de(Array.isArray(e.mipmap),"invalid mipmap type"),t.genMipmaps=!1,h=!0;break;default:de.raise("invalid mipmap type")}!h||"min"in e||(t.minFilter=Xr)}}function k(r,n){t.texParameteri(n,Gr,r.minFilter),t.texParameteri(n,qr,r.magFilter),t.texParameteri(n,Nr,r.wrapS),t.texParameteri(n,Br,r.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(n,rn,r.anisotropic),r.genMipmaps&&(t.hint(Qr,r.mipmapHint),t.generateMipmap(n))}function T(e){s.call(this),this.mipmask=0,this.internalformat=or,this.id=$++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new M,o.profile&&(this.stats={size:0})}function S(e){t.activeTexture(un),t.bindTexture(e.target,e.texture)}function E(){var e=rt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(nr,null)}function L(e){var r=e.texture;de(r,"must not double destroy texture");var n=e.unit,i=e.target;n>=0&&(t.activeTexture(un+n),t.bindTexture(i,null),rt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete tt[e.id],a.textureCount--}function C(e,n){function i(t,e){var n=c.texInfo;M.call(n);var a=_();return"number"==typeof t?"number"==typeof e?y(a,0|t,0|e):y(a,0|t,0|t):t?(de.type(t,"object","invalid arguments to regl.texture"),A(n,t),b(a,t)):y(a,1,1),n.genMipmaps&&(a.mipmask=(a.width<<1)-1),c.mipmask=a.mipmask,l(c,a),de.texture2D(n,a,r),c.internalformat=a.internalformat,i.width=a.width,i.height=a.height,S(c),x(a,nr),k(n,nr),E(),w(a),o.profile&&(c.stats.size=Ct(c.internalformat,c.type,a.width,a.height,n.genMipmaps,!1)),i.format=q[c.internalformat],i.type=G[c.type],i.mag=Y[n.magFilter],i.min=W[n.minFilter],i.wrapS=X[n.wrapS],i.wrapT=X[n.wrapT],i}function s(t,e,r,n){de(!!t,"must specify image data");var a=0|e,o=0|r,s=0|n,u=m();return l(u,c),u.width=0,u.height=0,f(u,t),u.width=u.width||(c.width>>s)-a,u.height=u.height||(c.height>>s)-o,de(c.type===u.type&&c.format===u.format&&c.internalformat===u.internalformat,"incompatible format for texture.subimage"),de(a>=0&&o>=0&&a+u.width<=c.width&&o+u.height<=c.height,"texture.subimage write out of bounds"),de(c.mipmask&1<>s;++s)t.texImage2D(nr,s,c.format,n>>s,a>>s,0,c.format,c.type,null);return E(),o.profile&&(c.stats.size=Ct(c.internalformat,c.type,n,a,!1,!1)),i}var c=new T(nr);return tt[c.id]=c,a.textureCount++,i(e,n),i.subimage=s,i.resize=u,i._reglType="texture2d",i._texture=c,o.profile&&(i.stats=c.stats),i.destroy=function(){c.decRef()},i}function D(e,n,i,s,c,h){function d(t,e,n,i,a,s){var c,h=C.texInfo;for(M.call(h),c=0;c<6;++c)D[c]=_();if("number"!=typeof t&&t)if("object"==typeof t)if(e)b(D[0],t),b(D[1],e),b(D[2],n),b(D[3],i),b(D[4],a),b(D[5],s);else if(A(h,t),u(C,t),"faces"in t){var f=t.faces;for(de(Array.isArray(f)&&6===f.length,"cube faces must be a length 6 array"),c=0;c<6;++c)de("object"==typeof f[c]&&!!f[c],"invalid input for cube map face"),l(D[c],C),b(D[c],f[c])}else for(c=0;c<6;++c)b(D[c],t);else de.raise("invalid arguments to cube map");else{var p=0|t||1;for(c=0;c<6;++c)y(D[c],p,p)}for(l(C,D[0]),h.genMipmaps?C.mipmask=(D[0].width<<1)-1:C.mipmask=D[0].mipmask,de.textureCube(C,h,D,r),C.internalformat=D[0].internalformat,d.width=D[0].width,d.height=D[0].height,S(C),c=0;c<6;++c)x(D[c],ar+c);for(k(h,ir),E(),o.profile&&(C.stats.size=Ct(C.internalformat,C.type,d.width,d.height,h.genMipmaps,!0)),d.format=q[C.internalformat],d.type=G[C.type],d.mag=Y[h.magFilter],d.min=W[h.minFilter],d.wrapS=X[h.wrapS],d.wrapT=X[h.wrapT],c=0;c<6;++c)w(D[c]);return d}function v(t,e,r,n,i){de(!!e,"must specify image data"),de("number"==typeof t&&t===(0|t)&&t>=0&&t<6,"invalid face");var a=0|r,o=0|n,s=0|i,u=m();return l(u,C),u.width=0,u.height=0,f(u,e),u.width=u.width||(C.width>>s)-a,u.height=u.height||(C.height>>s)-o,de(C.type===u.type&&C.format===u.format&&C.internalformat===u.internalformat,"incompatible format for texture.subimage"),de(a>=0&&o>=0&&a+u.width<=C.width&&o+u.height<=C.height,"texture.subimage write out of bounds"),de(C.mipmask&1<>i;++i)t.texImage2D(ar+n,i,C.format,r>>i,r>>i,0,C.format,C.type,null);return E(),o.profile&&(C.stats.size=Ct(C.internalformat,C.type,d.width,d.height,!1,!0)),d}}var C=new T(ir);tt[C.id]=C,a.cubeCount++;var D=new Array(6);return d(e,n,i,s,c,h),d.subimage=v,d.resize=L,d._reglType="textureCube",d._texture=C,o.profile&&(d.stats=C.stats),d.destroy=function(){C.decRef()},d}function z(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)t.texImage2D(ar+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);k(e.texInfo,e.target)})}var P={"don't care":$r,"dont care":$r,nice:en,fast:tn},O={repeat:Ur,clamp:Vr,mirror:Hr},R={nearest:Yr,linear:Wr},j=$t({mipmap:Kr,"nearest mipmap nearest":Xr,"linear mipmap nearest":Zr,"nearest mipmap linear":Jr,"linear mipmap linear":Kr},R),F={none:0,browser:ln},N={uint8:Or,rgba4:pr,rgb565:gr,"rgb5 a1":mr},B={alpha:sr,luminance:ur,"luminance alpha":cr,rgb:lr,rgba:or,rgba4:hr,"rgb5 a1":fr,rgb565:dr},U={};e.ext_srgb&&(B.srgb=xr,B.srgba=_r),e.oes_texture_float&&(N.float32=N.float=Fr),e.oes_texture_half_float&&(N.float16=N["half float"]=wr),e.webgl_depth_texture&&($t(B,{depth:yr,"depth stencil":br}),$t(N,{uint16:Rr,uint32:jr,"depth stencil":vr})),e.webgl_compressed_texture_s3tc&&$t(U,{"rgb s3tc dxt1":Mr,"rgba s3tc dxt1":Ar,"rgba s3tc dxt3":kr,"rgba s3tc dxt5":Tr}),e.webgl_compressed_texture_atc&&$t(U,{"rgb atc":Sr,"rgba atc explicit alpha":Er,"rgba atc interpolated alpha":Lr}),e.webgl_compressed_texture_pvrtc&&$t(U,{"rgb pvrtc 4bppv1":Cr,"rgb pvrtc 2bppv1":Dr,"rgba pvrtc 4bppv1":zr,"rgba pvrtc 2bppv1":Ir}),e.webgl_compressed_texture_etc1&&(U["rgb etc1"]=Pr);var V=Array.prototype.slice.call(t.getParameter(rr));Object.keys(U).forEach(function(t){var e=U[t];V.indexOf(e)>=0&&(B[t]=e)});var H=Object.keys(B);r.textureFormats=H;var q=[];Object.keys(B).forEach(function(t){var e=B[t];q[e]=t});var G=[];Object.keys(N).forEach(function(t){var e=N[t];G[e]=t});var Y=[];Object.keys(R).forEach(function(t){var e=R[t];Y[e]=t});var W=[];Object.keys(j).forEach(function(t){var e=j[t];W[e]=t});var X=[];Object.keys(O).forEach(function(t){var e=O[t];X[e]=t});var J=H.reduce(function(t,e){var r=B[e];return r===ur||r===sr||r===ur||r===cr||r===yr||r===br?t[r]=r:r===fr||e.indexOf("rgba")>=0?t[r]=or:t[r]=lr,t},{}),K=[],Q=[],$=0,tt={},et=r.maxTextureUnits,rt=Array(et).map(function(){return null});return $t(T.prototype,{bind:function(){var e=this;e.bindCount+=1;var r=e.unit;if(r<0){for(var n=0;n0)continue;i.unit=-1}rt[n]=e,r=n;break}r>=et&&de.raise("insufficient number of texture units"),o.profile&&a.maxTextureUnits=Sn&&e=2,"invalid shape for framebuffer"),u=z[0],d=z[1]}else"radius"in D&&(u=d=D.radius),"width"in D&&(u=D.width),"height"in D&&(d=D.height);("color"in D||"colors"in D)&&(y=D.color||D.colors,Array.isArray(y)&&de(1===y.length||o,"multiple render targets not supported")),y||("colorCount"in D&&(T=0|D.colorCount,de(T>0,"invalid color buffer count")),"colorTexture"in D&&(b=!!D.colorTexture,x="rgba4"),"colorType"in D&&(k=D.colorType,b?(de(e.oes_texture_float||!("float"===k||"float32"===k),"you must enable OES_texture_float in order to use floating point framebuffer objects"),de(e.oes_texture_half_float||!("half float"===k||"float16"===k),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):"half float"===k||"float16"===k?(de(e.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),x="rgba16f"):"float"!==k&&"float32"!==k||(de(e.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),x="rgba32f"),de.oneOf(k,A,"invalid color type")),"colorFormat"in D&&(x=D.colorFormat,w.indexOf(x)>=0?b=!0:M.indexOf(x)>=0?b=!1:b?de.oneOf(D.colorFormat,w,"invalid color format for texture"):de.oneOf(D.colorFormat,M,"invalid color format for renderbuffer"))),("depthTexture"in D||"depthStencilTexture"in D)&&(C=!(!D.depthTexture&&!D.depthStencilTexture),de(!C||e.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in D&&("boolean"==typeof D.depth?p=D.depth:(S=D.depth,g=!1)),"stencil"in D&&("boolean"==typeof D.stencil?g=D.stencil:(E=D.stencil,p=!1)),"depthStencil"in D&&("boolean"==typeof D.depthStencil?p=g=D.depthStencil:(L=D.depthStencil,p=!1,g=!1))}else u=d=1;var I=null,P=null,O=null,R=null;if(Array.isArray(y))I=y.map(c);else if(y)I=[c(y)];else for(I=new Array(T),a=0;a=0||I[a].renderbuffer&&Bn.indexOf(I[a].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+a+" is invalid"),I[a]&&I[a].texture){var F=On[I[a].texture._texture.format]*Rn[I[a].texture._texture.type];null===j?j=F:de(j===F,"all color attachments much have the same number of bits per pixel.")}return l(P,u,d),de(!P||P.texture&&P.texture._texture.format===In||P.renderbuffer&&P.renderbuffer._renderbuffer.format===jn,"invalid depth attachment for framebuffer object"),l(O,u,d),de(!O||O.renderbuffer&&O.renderbuffer._renderbuffer.format===Fn,"invalid stencil attachment for framebuffer object"),l(R,u,d),de(!R||R.texture&&R.texture._texture.format===Nn||R.renderbuffer&&R.renderbuffer._renderbuffer.format===Nn,"invalid depth-stencil attachment for framebuffer object"),m(s),s.width=u,s.height=d,s.colorAttachments=I,s.depthAttachment=P,s.stencilAttachment=O,s.depthStencilAttachment=R,i.color=I.map(f),i.depth=f(P),i.stencil=f(O),i.depthStencil=f(R),i.width=s.width,i.height=s.height,v(s),i}function o(t,e){de(_.next!==s,"can not resize a framebuffer which is currently in use");var r=0|t,n=0|e||r;if(r===s.width&&n===s.height)return i;for(var a=s.colorAttachments,o=0;o=2,"invalid shape for framebuffer"),de(p[0]===p[1],"cube framebuffer must be square"),l=p[0]}else"radius"in d&&(l=0|d.radius),"width"in d?(l=0|d.width,"height"in d&&de(d.height===l,"must be square")):"height"in d&&(l=0|d.height);("color"in d||"colors"in d)&&(u=d.color||d.colors,Array.isArray(u)&&de(1===u.length||a,"multiple render targets not supported")),u||("colorCount"in d&&(f=0|d.colorCount,de(f>0,"invalid color buffer count")),"colorType"in d&&(de.oneOf(d.colorType,A,"invalid color type"),h=d.colorType),"colorFormat"in d&&(c=d.colorFormat,de.oneOf(d.colorFormat,w,"invalid color format for texture"))),"depth"in d&&(s.depth=d.depth),"stencil"in d&&(s.stencil=d.stencil),"depthStencil"in d&&(s.depthStencil=d.depthStencil)}else l=1;var m;if(u)if(Array.isArray(u))for(m=[],r=0;r0&&(s.depth=o[0].depth,s.stencil=o[0].stencil,s.depthStencil=o[0].depthStencil),o[r]?o[r](s):o[r]=y(s)}return $t(i,{width:l,height:l,color:m})}function a(t){var e,n=0|t;if(de(n>0&&n<=r.maxCubeMapSize,"invalid radius for cube fbo"),n===i.width)return i;var a=i.color;for(e=0;e1)for(var m=0;mt&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return d.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);xe(c).forEach(e),c={},xe(h).forEach(e),h={},d.forEach(function(e){t.deleteProgram(e.program)}),d.length=0,f={},r.shaderCount=0},program:function(t,e,n){de.command(t>=0,"missing vertex shader",n),de.command(e>=0,"missing fragment shader",n);var i=f[e];i||(i=f[e]={});var a=i[t];return a||(a=new s(e,t),r.shaderCount++,l(a,n),i[t]=a,d.push(a)),a},restore:u,shader:o,frag:-1,vert:-1}}function jt(t,e,r,n,i,a){function o(o){var s;null===e.next?(de(i.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),s=Xn):(de(null!==e.next.colorAttachments[0].texture,"You cannot read from a renderbuffer"),s=e.next.colorAttachments[0].texture._texture.type,a.oes_texture_float?de(s===Xn||s===Jn,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"):de(s===Xn,"Reading from a framebuffer is only allowed for the type 'uint8'"));var l=0,u=0,c=n.framebufferWidth,h=n.framebufferHeight,f=null;Qt(o)?f=o:o&&(de.type(o,"object","invalid arguments to regl.read()"),l=0|o.x,u=0|o.y,de(l>=0&&l=0&&u0&&c+l<=n.framebufferWidth,"invalid width for read pixels"),de(h>0&&h+u<=n.framebufferHeight,"invalid height for read pixels"),r();var d=c*h*4;return f||(s===Xn?f=new Uint8Array(d):s===Jn&&(f=f||new Float32Array(d))),de.isTypedArray(f,"data buffer for regl.read() must be a typedarray"),de(f.byteLength>=d,"data buffer for regl.read() too small"),t.pixelStorei(Zn,4),t.readPixels(l,u,c,h,Wn,s,f),f}function s(t){var r;return e.setFBO({framebuffer:t.framebuffer},function(){r=o(t)}),r}function l(t){return t&&"framebuffer"in t?s(t):o(t)}return l}function Ft(t){return Array.prototype.slice.call(t)}function Nt(t){return Ft(t).join("")}function Bt(){function t(t){for(var e=0;e0&&(r.push(t,"="),r.push.apply(r,Ft(arguments)),r.push(";")),t}var r=[],n=[];return $t(t,{def:e,toString:function(){return Nt([n.length>0?"var "+n+";":"",Nt(r)])}})}function r(){function t(t,e){n(t,e,"=",r.def(t,e),";")}var r=e(),n=e(),i=r.toString,a=n.toString;return $t(function(){r.apply(r,Ft(arguments))},{def:r.def,entry:r,exit:n,save:t,set:function(e,n,i){t(e,n),r(e,n,"=",i,";")},toString:function(){return i()+a()}})}function n(){var t=Nt(arguments),e=r(),n=r(),i=e.toString,a=n.toString;return $t(e,{then:function(){return e.apply(e,Ft(arguments)),this},else:function(){return n.apply(n,Ft(arguments)),this},toString:function(){var e=a();return e&&(e="else{"+e+"}"),Nt(["if(",t,"){",i(),"}",e])}})}function i(t,e){function n(){var t="a"+i.length;return i.push(t),t}var i=[];e=e||0;for(var a=0;a=1,n>=2,e)}if(r===ai){var i=t.data;return new Ht(i.thisDep,i.contextDep,i.propDep,e)}return new Ht(r===ii,r===ni,r===ri,e)}function Wt(t,e,r,n,i,a,o,s,l,u,c,h,f,d,p){function m(t){return t.replace(".","_")}function g(t,e,r){var n=m(t);et.push(t),tt[n]=$[n]=!!r,rt[n]=e}function v(t,e,r){var n=m(t);et.push(t),Array.isArray(r)?($[n]=r.slice(),tt[n]=r.slice()):$[n]=tt[n]=r,nt[n]=e}function y(){var t=Bt(),r=t.link,n=t.global;t.id=ot++,t.batchId="0";var i=r(it),a=t.shared={props:"a0"};Object.keys(it).forEach(function(t){a[t]=n.def(i,".",t)}),de.optional(function(){t.CHECK=r(de),t.commandStr=de.guessCommand(),t.command=r(t.commandStr),t.assert=function(t,e,n){t("if(!(",e,"))",this.CHECK,".commandRaise(",r(n),",",this.command,");")},at.invalidBlendCombinations=Ua});var o=t.next={},s=t.current={};Object.keys(nt).forEach(function(t){Array.isArray($[t])&&(o[t]=n.def(a.next,".",t),s[t]=n.def(a.current,".",t))});var l=t.constants={};Object.keys(at).forEach(function(t){l[t]=n.def(JSON.stringify(at[t]))}),t.invoke=function(e,n){switch(n.type){case ei:var i=["this",a.context,a.props,t.batchId];return e.def(r(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case ri:return e.def(a.props,n.data);case ni:return e.def(a.context,n.data);case ii:return e.def("this",n.data);case ai:return n.data.append(t,e),n.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){var n=e.id(t);if(n in c)return c[n];var i=u.scope[n];return i||(i=u.scope[n]=new X),c[n]=r(i)},t}function b(t){var e,r=t.static,n=t.dynamic;if(Ii in r){var i=!!r[Ii];e=Gt(function(t,e){return i}),e.enable=i}else if(Ii in n){var a=n[Ii];e=Yt(a,function(t,e){return t.invoke(e,a)})}return e}function x(t,e){var r=t.static,n=t.dynamic;if(Pi in r){var i=r[Pi];return i?(i=s.getFramebuffer(i),de.command(i,"invalid framebuffer object"),Gt(function(t,e){var r=t.link(i),n=t.shared;e.set(n.framebuffer,".next",r);var a=n.context;return e.set(a,"."+Vi,r+".width"),e.set(a,"."+Hi,r+".height"),r})):Gt(function(t,e){var r=t.shared;e.set(r.framebuffer,".next","null");var n=r.context;return e.set(n,"."+Vi,n+"."+Yi),e.set(n,"."+Hi,n+"."+Wi),"null"})}if(Pi in n){var a=n[Pi];return Yt(a,function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer,o=e.def(i,".getFramebuffer(",r,")");de.optional(function(){t.assert(e,"!"+r+"||"+o,"invalid framebuffer object")}),e.set(i,".next",o);var s=n.context;return e.set(s,"."+Vi,o+"?"+o+".width:"+s+"."+Yi),e.set(s,"."+Hi,o+"?"+o+".height:"+s+"."+Wi),o})}return null}function _(t,e,r){function n(t){if(t in i){var n=i[t];de.commandType(n,"object","invalid "+t,r.commandStr);var o,s,l=!0,u=0|n.x,c=0|n.y;return"width"in n?(o=0|n.width,de.command(o>=0,"invalid "+t,r.commandStr)):l=!1,"height"in n?(s=0|n.height,de.command(s>=0,"invalid "+t,r.commandStr)):l=!1,new Ht(!l&&e&&e.thisDep,!l&&e&&e.contextDep,!l&&e&&e.propDep,function(t,e){var r=t.shared.context,i=o;"width"in n||(i=e.def(r,".",Vi,"-",u));var a=s;return"height"in n||(a=e.def(r,".",Hi,"-",c)),[u,c,i,a]})}if(t in a){var h=a[t],f=Yt(h,function(e,r){var n=e.invoke(r,h);de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)});var i=e.shared.context,a=r.def(n,".x|0"),o=r.def(n,".y|0"),s=r.def('"width" in ',n,"?",n,".width|0:","(",i,".",Vi,"-",a,")"),l=r.def('"height" in ',n,"?",n,".height|0:","(",i,".",Hi,"-",o,")");return de.optional(function(){e.assert(r,s+">=0&&"+l+">=0","invalid "+t)}),[a,o,s,l]});return e&&(f.thisDep=f.thisDep||e.thisDep,f.contextDep=f.contextDep||e.contextDep,f.propDep=f.propDep||e.propDep),f}return e?new Ht(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,".",Vi),e.def(r,".",Hi)]}):null}var i=t.static,a=t.dynamic,o=n(zi);if(o){var s=o;o=new Ht(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=s.append(t,e),n=t.shared.context;return e.set(n,"."+qi,r[2]),e.set(n,"."+Gi,r[3]),r})}return{viewport:o,scissor_box:n(Di)}}function w(t){function r(t){if(t in i){var r=e.id(i[t]);de.optional(function(){c.shader(qa[t],r,de.guessCommand())});var n=Gt(function(){return r});return n.id=r,n}if(t in a){var o=a[t];return Yt(o,function(e,r){var n=e.invoke(r,o),i=r.def(e.shared.strings,".id(",n,")");return de.optional(function(){r(e.shared.shader,".shader(",qa[t],",",i,",",e.command,");")}),i})}return null}var n,i=t.static,a=t.dynamic,o=r(Ri),s=r(Oi),l=null;return qt(o)&&qt(s)?(l=c.program(s.id,o.id),n=Gt(function(t,e){return t.link(l)})):n=new Ht(o&&o.thisDep||s&&s.thisDep,o&&o.contextDep||s&&s.contextDep,o&&o.propDep||s&&s.propDep,function(t,e){var r,n=t.shared.shader;r=o?o.append(t,e):e.def(n,".",Ri);var i;i=s?s.append(t,e):e.def(n,".",Oi);var a=n+".program("+i+","+r;return de.optional(function(){a+=","+t.command}),e.def(a+")")}),{frag:o,vert:s,progVar:n,program:l}}function M(t,e){function r(t,r){if(t in n){var a=0|n[t];return de.command(!r||a>=0,"invalid "+t,e.commandStr),Gt(function(t,e){return r&&(t.OFFSET=a),a})}if(t in i){var s=i[t];return Yt(s,function(e,n){var i=e.invoke(n,s);return r&&(e.OFFSET=i,de.optional(function(){e.assert(n,i+">=0","invalid "+t)})),i})}return r&&o?Gt(function(t,e){return t.OFFSET="0",0}):null}var n=t.static,i=t.dynamic,o=function(){if(ji in n){var t=n[ji];Ut(t)?t=a.getElements(a.create(t,!0)):t&&(t=a.getElements(t),de.command(t,"invalid elements",e.commandStr));var r=Gt(function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n,n}return e.ELEMENTS=null,null});return r.value=t,r}if(ji in i){var o=i[ji];return Yt(o,function(t,e){var r=t.shared,n=r.isBufferArgs,i=r.elements,a=t.invoke(e,o),s=e.def("null"),l=e.def(n,"(",a,")"),u=t.cond(l).then(s,"=",i,".createStream(",a,");").else(s,"=",i,".getElements(",a,");");return de.optional(function(){t.assert(u.else,"!"+a+"||"+s,"invalid elements")}),e.entry(u),e.exit(t.cond(l).then(i,".destroyStream(",s,");")),t.ELEMENTS=s,s})}return null}(),s=r(Bi,!0);return{elements:o,primitive:function(){if(Fi in n){var t=n[Fi];return de.commandParameter(t,Be,"invalid primitve",e.commandStr),Gt(function(e,r){return Be[t]})}if(Fi in i){var r=i[Fi];return Yt(r,function(t,e){var n=t.constants.primTypes,i=t.invoke(e,r);return de.optional(function(){t.assert(e,i+" in "+n,"invalid primitive, must be one of "+Object.keys(Be))}),e.def(n,"[",i,"]")})}return o?qt(o)?Gt(o.value?function(t,e){return e.def(t.ELEMENTS,".primType")}:function(){return ka}):new Ht(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=t.ELEMENTS;return e.def(r,"?",r,".primType:",ka)}):null}(),count:function(){if(Ni in n){var t=0|n[Ni];return de.command("number"==typeof t&&t>=0,"invalid vertex count",e.commandStr),Gt(function(){return t})}if(Ni in i){var r=i[Ni];return Yt(r,function(t,e){var n=t.invoke(e,r);return de.optional(function(){t.assert(e,"typeof "+n+'==="number"&&'+n+">=0&&"+n+"===("+n+"|0)","invalid vertex count")}),n})}if(o){if(qt(o)){if(o)return s?new Ht(s.thisDep,s.contextDep,s.propDep,function(t,e){var r=e.def(t.ELEMENTS,".vertCount-",t.OFFSET);return de.optional(function(){t.assert(e,r+">=0","invalid vertex offset/element buffer too small")}),r}):Gt(function(t,e){return e.def(t.ELEMENTS,".vertCount")});var a=Gt(function(){return-1});return de.optional(function(){a.MISSING=!0}),a}var l=new Ht(o.thisDep||s.thisDep,o.contextDep||s.contextDep,o.propDep||s.propDep,function(t,e){var r=t.ELEMENTS;return t.OFFSET?e.def(r,"?",r,".vertCount-",t.OFFSET,":-1"):e.def(r,"?",r,".vertCount:-1")});return de.optional(function(){l.DYNAMIC=!0}),l}return null}(),instances:r(Ui,!1),offset:s}}function A(t,e){var r=t.static,i=t.dynamic,a={};return et.forEach(function(t){function o(e,n){if(t in r){var o=e(r[t]);a[s]=Gt(function(){return o})}else if(t in i){var l=i[t];a[s]=Yt(l,function(t,e){return n(t,e,t.invoke(e,l))})}}var s=m(t);switch(t){case gi:case si:case oi:case ki:case hi:case Ci:case xi:case wi:case Mi:case pi:return o(function(r){return de.commandType(r,"boolean",t,e.commandStr),r},function(e,r,n){return de.optional(function(){e.assert(r,"typeof "+n+'==="boolean"',"invalid flag "+t,e.commandStr)}),n});case fi:return o(function(r){return de.commandParameter(r,Va,"invalid "+t,e.commandStr),Va[r]},function(e,r,n){var i=e.constants.compareFuncs;return de.optional(function(){e.assert(r,n+" in "+i,"invalid "+t+", must be one of "+Object.keys(Va))}),r.def(i,"[",n,"]")});case di:return o(function(t){return de.command(mt(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]&&t[0]<=t[1],"depth range is 2d array",e.commandStr),t},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===2&&typeof "+r+'[0]==="number"&&typeof '+r+'[1]==="number"&&'+r+"[0]<="+r+"[1]","depth range must be a 2d array")}),[e.def("+",r,"[0]"),e.def("+",r,"[1]")]});case ci:return o(function(t){de.commandType(t,"object","blend.func",e.commandStr);var r="srcRGB"in t?t.srcRGB:t.src,n="srcAlpha"in t?t.srcAlpha:t.src,i="dstRGB"in t?t.dstRGB:t.dst,a="dstAlpha"in t?t.dstAlpha:t.dst;return de.commandParameter(r,Ba,s+".srcRGB",e.commandStr),de.commandParameter(n,Ba,s+".srcAlpha",e.commandStr),de.commandParameter(i,Ba,s+".dstRGB",e.commandStr),de.commandParameter(a,Ba,s+".dstAlpha",e.commandStr),de.command(Ua.indexOf(r+", "+i)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+r+", "+i+")",e.commandStr),[Ba[r],Ba[i],Ba[n],Ba[a]]},function(e,r,n){function i(i,o){var s=r.def('"',i,o,'" in ',n,"?",n,".",i,o,":",n,".",i);return de.optional(function(){e.assert(r,s+" in "+a,"invalid "+t+"."+i+o+", must be one of "+Object.keys(Ba))}),s}var a=e.constants.blendFuncs;de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid blend func, must be an object")});var o=i("src","RGB"),s=i("dst","RGB");de.optional(function(){var t=e.constants.invalidBlendCombinations;e.assert(r,t+".indexOf("+o+'+", "+'+s+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var l=r.def(a,"[",o,"]"),u=r.def(a,"[",i("src","Alpha"),"]");return[l,r.def(a,"[",s,"]"),u,r.def(a,"[",i("dst","Alpha"),"]")]});case ui:return o(function(r){return"string"==typeof r?(de.commandParameter(r,Z,"invalid "+t,e.commandStr),[Z[r],Z[r]]):"object"==typeof r?(de.commandParameter(r.rgb,Z,t+".rgb",e.commandStr),de.commandParameter(r.alpha,Z,t+".alpha",e.commandStr),[Z[r.rgb],Z[r.alpha]]):void de.commandRaise("invalid blend.equation",e.commandStr)},function(e,r,n){var i=e.constants.blendEquations,a=r.def(),o=r.def(),s=e.cond("typeof ",n,'==="string"');return de.optional(function(){function r(t,r,n){e.assert(t,n+" in "+i,"invalid "+r+", must be one of "+Object.keys(Z))}r(s.then,t,n),e.assert(s.else,n+"&&typeof "+n+'==="object"',"invalid "+t),r(s.else,t+".rgb",n+".rgb"),r(s.else,t+".alpha",n+".alpha")}),s.then(a,"=",o,"=",i,"[",n,"];"),s.else(a,"=",i,"[",n,".rgb];",o,"=",i,"[",n,".alpha];"),r(s),[a,o]});case li:return o(function(t){return de.command(mt(t)&&4===t.length,"blend.color must be a 4d array",e.commandStr),J(4,function(e){return+t[e]})},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===4","blend.color must be a 4d array")}),J(4,function(t){return e.def("+",r,"[",t,"]")})});case Ti:return o(function(t){return de.commandType(t,"number",s,e.commandStr),0|t},function(t,e,r){return de.optional(function(){t.assert(e,"typeof "+r+'==="number"',"invalid stencil.mask")}),e.def(r,"|0")});case Si:return o(function(r){de.commandType(r,"object",s,e.commandStr);var n=r.cmp||"keep",i=r.ref||0,a="mask"in r?r.mask:-1;return de.commandParameter(n,Va,t+".cmp",e.commandStr),de.commandType(i,"number",t+".ref",e.commandStr),de.commandType(a,"number",t+".mask",e.commandStr),[Va[n],i,a]},function(t,e,r){var n=t.constants.compareFuncs;return de.optional(function(){function i(){t.assert(e,Array.prototype.join.call(arguments,""),"invalid stencil.func")}i(r+"&&typeof ",r,'==="object"'),i('!("cmp" in ',r,")||(",r,".cmp in ",n,")")}),[e.def('"cmp" in ',r,"?",n,"[",r,".cmp]",":",Ia),e.def(r,".ref|0"),e.def('"mask" in ',r,"?",r,".mask|0:-1")]});case Ei:case Li:return o(function(r){de.commandType(r,"object",s,e.commandStr);var n=r.fail||"keep",i=r.zfail||"keep",a=r.zpass||"keep";return de.commandParameter(n,Ha,t+".fail",e.commandStr),de.commandParameter(i,Ha,t+".zfail",e.commandStr),de.commandParameter(a,Ha,t+".zpass",e.commandStr),[t===Li?Sa:Ta,Ha[n],Ha[i],Ha[a]]},function(e,r,n){function i(i){return de.optional(function(){e.assert(r,'!("'+i+'" in '+n+")||("+n+"."+i+" in "+a+")","invalid "+t+"."+i+", must be one of "+Object.keys(Ha))}),r.def('"',i,'" in ',n,"?",a,"[",n,".",i,"]:",Ia)}var a=e.constants.stencilOps;return de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)}),[t===Li?Sa:Ta,i("fail"),i("zfail"),i("zpass")]});case _i:return o(function(t){de.commandType(t,"object",s,e.commandStr);var r=0|t.factor,n=0|t.units;return de.commandType(r,"number",s+".factor",e.commandStr),de.commandType(n,"number",s+".units",e.commandStr),[r,n]},function(e,r,n){return de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)}),[r.def(n,".factor|0"),r.def(n,".units|0")]});case vi:return o(function(t){var r=0;return"front"===t?r=Ta:"back"===t&&(r=Sa),de.command(!!r,s,e.commandStr),r},function(t,e,r){return de.optional(function(){t.assert(e,r+'==="front"||'+r+'==="back"',"invalid cull.face")}),e.def(r,'==="front"?',Ta,":",Sa)});case bi:return o(function(t){return de.command("number"==typeof t&&t>=n.lineWidthDims[0]&&t<=n.lineWidthDims[1],"invalid line width, must positive number between "+n.lineWidthDims[0]+" and "+n.lineWidthDims[1],e.commandStr),t},function(t,e,r){return de.optional(function(){t.assert(e,"typeof "+r+'==="number"&&'+r+">="+n.lineWidthDims[0]+"&&"+r+"<="+n.lineWidthDims[1],"invalid line width")}),r});case yi:return o(function(t){return de.commandParameter(t,Ga,s,e.commandStr),Ga[t]},function(t,e,r){return de.optional(function(){t.assert(e,r+'==="cw"||'+r+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),e.def(r+'==="cw"?'+Ea+":"+La)});case mi:return o(function(t){return de.command(mt(t)&&4===t.length,"color.mask must be length 4 array",e.commandStr),t.map(function(t){return!!t})},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===4","invalid color.mask")}),J(4,function(t){return"!!"+r+"["+t+"]"})});case Ai:return o(function(t){de.command("object"==typeof t&&t,s,e.commandStr);var r="value"in t?t.value:1,n=!!t.invert;return de.command("number"==typeof r&&r>=0&&r<=1,"sample.coverage.value must be a number between 0 and 1",e.commandStr),[r,n]},function(t,e,r){return de.optional(function(){t.assert(e,r+"&&typeof "+r+'==="object"',"invalid sample.coverage")}),[e.def('"value" in ',r,"?+",r,".value:1"),e.def("!!",r,".invert")]})}}),a}function k(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach(function(t){var n,a=r[t];if("number"==typeof a||"boolean"==typeof a)n=Gt(function(){return a});else if("function"==typeof a){var o=a._reglType;"texture2d"===o||"textureCube"===o?n=Gt(function(t){return t.link(a)}):"framebuffer"===o||"framebufferCube"===o?(de.command(a.color.length>0,'missing color attachment for framebuffer sent to uniform "'+t+'"',e.commandStr),n=Gt(function(t){return t.link(a.color[0])})):de.commandRaise('invalid data for uniform "'+t+'"',e.commandStr)}else mt(a)?n=Gt(function(e){return e.global.def("[",J(a.length,function(r){return de.command("number"==typeof a[r]||"boolean"==typeof a[r],"invalid uniform "+t,e.commandStr),a[r]}),"]")}):de.commandRaise('invalid or missing data for uniform "'+t+'"',e.commandStr);n.value=a,i[t]=n}),Object.keys(n).forEach(function(t){var e=n[t];i[t]=Yt(e,function(t,r){return t.invoke(r,e)})}),i}function T(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach(function(t){var a=n[t],s=e.id(t),l=new X;if(Ut(a))l.state=$n,l.buffer=i.getBuffer(i.create(a,Zi,!1,!0)),l.type=0;else{var u=i.getBuffer(a);if(u)l.state=$n,l.buffer=u,l.type=0;else if(de.command("object"==typeof a&&a,"invalid data for attribute "+t,r.commandStr),a.constant){var c=a.constant;l.buffer="null",l.state=ti,"number"==typeof c?l.x=c:(de.command(mt(c)&&c.length>0&&c.length<=4,"invalid constant for attribute "+t,r.commandStr),Kn.forEach(function(t,e){e=0,'invalid offset for attribute "'+t+'"',r.commandStr);var f=0|a.stride;de.command(f>=0&&f<256,'invalid stride for attribute "'+t+'", must be integer betweeen [0, 255]',r.commandStr);var d=0|a.size;de.command(!("size"in a)||d>0&&d<=4,'invalid size for attribute "'+t+'", must be 1,2,3,4',r.commandStr);var p=!!a.normalized,m=0;"type"in a&&(de.commandParameter(a.type,De,"invalid type for attribute "+t,r.commandStr),m=De[a.type]);var g=0|a.divisor;"divisor"in a&&(de.command(0===g||K,'cannot specify divisor for attribute "'+t+'", instancing not supported',r.commandStr),de.command(g>=0,'invalid divisor for attribute "'+t+'"',r.commandStr)),de.optional(function(){var e=r.commandStr,n=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(a).forEach(function(r){de.command(n.indexOf(r)>=0,'unknown parameter "'+r+'" for attribute pointer "'+t+'" (valid parameters are '+n+")",e)})}),l.buffer=u,l.state=$n,l.size=d,l.normalized=p,l.type=m||u.dtype,l.offset=h,l.stride=f,l.divisor=g}}o[t]=Gt(function(t,e){var r=t.attribCache;if(s in r)return r[s];var n={isStream:!1};return Object.keys(l).forEach(function(t){n[t]=l[t]}),l.buffer&&(n.buffer=t.link(l.buffer),n.type=n.type||n.buffer+".dtype"),r[s]=n,n})}), -Object.keys(a).forEach(function(t){function e(e,n){function i(t){n(u[t],"=",a,".",t,"|0;")}var a=e.invoke(n,r),o=e.shared,s=o.isBufferArgs,l=o.buffer;de.optional(function(){e.assert(n,a+"&&(typeof "+a+'==="object"||typeof '+a+'==="function")&&('+s+"("+a+")||"+l+".getBuffer("+a+")||"+l+".getBuffer("+a+".buffer)||"+s+"("+a+'.buffer)||("constant" in '+a+"&&(typeof "+a+'.constant==="number"||'+o.isArrayLike+"("+a+".constant))))",'invalid dynamic attribute "'+t+'"')});var u={isStream:n.def(!1)},c=new X;c.state=$n,Object.keys(c).forEach(function(t){u[t]=n.def(""+c[t])});var h=u.buffer,f=u.type;return n("if(",s,"(",a,")){",u.isStream,"=true;",h,"=",l,".createStream(",Zi,",",a,");",f,"=",h,".dtype;","}else{",h,"=",l,".getBuffer(",a,");","if(",h,"){",f,"=",h,".dtype;",'}else if("constant" in ',a,"){",u.state,"=",ti,";","if(typeof "+a+'.constant === "number"){',u[Kn[0]],"=",a,".constant;",Kn.slice(1).map(function(t){return u[t]}).join("="),"=0;","}else{",Kn.map(function(t,e){return u[t]+"="+a+".constant.length>="+e+"?"+a+".constant["+e+"]:0;"}).join(""),"}}else{","if(",s,"(",a,".buffer)){",h,"=",l,".createStream(",Zi,",",a,".buffer);","}else{",h,"=",l,".getBuffer(",a,".buffer);","}",f,'="type" in ',a,"?",o.glTypes,"[",a,".type]:",h,".dtype;",u.normalized,"=!!",a,".normalized;"),i("size"),i("offset"),i("stride"),i("divisor"),n("}}"),n.exit("if(",u.isStream,"){",l,".destroyStream(",h,");","}"),u}var r=a[t];o[t]=Yt(r,e)}),o}function S(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=Gt(function(t,e){return"number"==typeof r||"boolean"==typeof r?""+r:t.link(r)})}),Object.keys(r).forEach(function(t){var e=r[t];n[t]=Yt(e,function(t,r){return t.invoke(r,e)})}),n}function E(t,e,r,n,i){function a(t){var e=u[t];e&&(h[t]=e)}var o=t.static,s=t.dynamic;de.optional(function(){function t(t){Object.keys(t).forEach(function(t){de.command(e.indexOf(t)>=0,'unknown parameter "'+t+'"',i.commandStr)})}var e=[Pi,Oi,Ri,ji,Fi,Bi,Ni,Ui,Ii].concat(et);t(o),t(s)});var l=x(t,i),u=_(t,l,i),c=M(t,i),h=A(t,i),f=w(t,i);a(zi),a(m(Di));var d=Object.keys(h).length>0,p={framebuffer:l,draw:c,shader:f,state:h,dirty:d};return p.profile=b(t,i),p.uniforms=k(r,i),p.attributes=T(e,i),p.context=S(n,i),p}function L(t,e,r){var n=t.shared,i=n.context,a=t.scope();Object.keys(r).forEach(function(n){e.save(i,"."+n);var o=r[n];a(i,".",n,"=",o.append(t,e),";")}),e(a)}function C(t,e,r,n){var i,a=t.shared,o=a.gl,s=a.framebuffer;Q&&(i=e.def(a.extensions,".webgl_draw_buffers"));var l,u=t.constants,c=u.drawBuffer,h=u.backBuffer;l=r?r.append(t,e):e.def(s,".next"),n||e("if(",l,"!==",s,".cur){"),e("if(",l,"){",o,".bindFramebuffer(",Fa,",",l,".framebuffer);"),Q&&e(i,".drawBuffersWEBGL(",c,"[",l,".colorAttachments.length]);"),e("}else{",o,".bindFramebuffer(",Fa,",null);"),Q&&e(i,".drawBuffersWEBGL(",h,");"),e("}",s,".cur=",l,";"),n||e("}")}function D(t,e,r){var n=t.shared,i=n.gl,a=t.current,o=t.next,s=n.current,l=n.next,u=t.cond(s,".dirty");et.forEach(function(e){var n=m(e);if(!(n in r.state)){var c,h;if(n in o){c=o[n],h=a[n];var f=J($[n].length,function(t){return u.def(c,"[",t,"]")});u(t.cond(f.map(function(t,e){return t+"!=="+h+"["+e+"]"}).join("||")).then(i,".",nt[n],"(",f,");",f.map(function(t,e){return h+"["+e+"]="+t}).join(";"),";"))}else{c=u.def(l,".",n);var d=t.cond(c,"!==",s,".",n);u(d),n in rt?d(t.cond(c).then(i,".enable(",rt[n],");").else(i,".disable(",rt[n],");"),s,".",n,"=",c,";"):d(i,".",nt[n],"(",c,");",s,".",n,"=",c,";")}}}),0===Object.keys(r.state).length&&u(s,".dirty=false;"),e(u)}function z(t,e,r,n){var i=t.shared,a=t.current,o=i.current,s=i.gl;Vt(Object.keys(r)).forEach(function(i){var l=r[i];if(!n||n(l)){var u=l.append(t,e);if(rt[i]){var c=rt[i];qt(l)?u?e(s,".enable(",c,");"):e(s,".disable(",c,");"):e(t.cond(u).then(s,".enable(",c,");").else(s,".disable(",c,");")),e(o,".",i,"=",u,";")}else if(mt(u)){var h=a[i];e(s,".",nt[i],"(",u,");",u.map(function(t,e){return h+"["+e+"]="+t}).join(";"),";")}else e(s,".",nt[i],"(",u,");",o,".",i,"=",u,";")}})}function I(t,e){K&&(t.instancing=e.def(t.shared.extensions,".angle_instanced_arrays"))}function P(t,e,r,n,i){function a(){return"undefined"==typeof performance?"Date.now()":"performance.now()"}function o(t){u=e.def(),t(u,"=",a(),";"),"string"==typeof i?t(p,".count+=",i,";"):t(p,".count++;"),d&&(n?(c=e.def(),t(c,"=",g,".getNumPendingQueries();")):t(g,".beginQuery(",p,");"))}function s(t){t(p,".cpuTime+=",a(),"-",u,";"),d&&(n?t(g,".pushScopeStats(",c,",",g,".getNumPendingQueries(),",p,");"):t(g,".endQuery();"))}function l(t){var r=e.def(m,".profile");e(m,".profile=",t,";"),e.exit(m,".profile=",r,";")}var u,c,h,f=t.shared,p=t.stats,m=f.current,g=f.timer,v=r.profile;if(v){if(qt(v))return void(v.enable?(o(e),s(e.exit),l("true")):l("false"));h=v.append(t,e),l(h)}else h=e.def(m,".profile");var y=t.block();o(y),e("if(",h,"){",y,"}");var b=t.block();s(b),e.exit("if(",h,"){",b,"}")}function O(t,e,r,n,i){function a(t){switch(t){case ua:case da:case va:return 2;case ca:case pa:case ya:return 3;case ha:case ma:case ba:return 4;default:return 1}}function o(r,n,i){function a(){e("if(!",c,".buffer){",l,".enableVertexAttribArray(",u,");}");var r,a=i.type;if(r=i.size?e.def(i.size,"||",n):n,e("if(",c,".type!==",a,"||",c,".size!==",r,"||",p.map(function(t){return c+"."+t+"!=="+i[t]}).join("||"),"){",l,".bindBuffer(",Zi,",",f,".buffer);",l,".vertexAttribPointer(",[u,r,a,i.normalized,i.stride,i.offset],");",c,".type=",a,";",c,".size=",r,";",p.map(function(t){return c+"."+t+"="+i[t]+";"}).join(""),"}"),K){var o=i.divisor;e("if(",c,".divisor!==",o,"){",t.instancing,".vertexAttribDivisorANGLE(",[u,o],");",c,".divisor=",o,";}")}}function o(){e("if(",c,".buffer){",l,".disableVertexAttribArray(",u,");","}if(",Kn.map(function(t,e){return c+"."+t+"!=="+d[e]}).join("||"),"){",l,".vertexAttrib4f(",u,",",d,");",Kn.map(function(t,e){return c+"."+t+"="+d[e]+";"}).join(""),"}")}var l=s.gl,u=e.def(r,".location"),c=e.def(s.attributes,"[",u,"]"),h=i.state,f=i.buffer,d=[i.x,i.y,i.z,i.w],p=["buffer","normalized","offset","stride"];h===$n?a():h===ti?o():(e("if(",h,"===",$n,"){"),a(),e("}else{"),o(),e("}"))}var s=t.shared;n.forEach(function(n){var s,l=n.name,u=r.attributes[l];if(u){if(!i(u))return;s=u.append(t,e)}else{if(!i(Ya))return;var c=t.scopeAttrib(l);de.optional(function(){t.assert(e,c+".state","missing attribute "+l)}),s={},Object.keys(new X).forEach(function(t){s[t]=e.def(c,".",t)})}o(t.link(n),a(n.info.type),s)})}function R(t,r,n,i,a){for(var o,s=t.shared,l=s.gl,u=0;u1?J(_,function(t){return c+"["+t+"]"}):c);r(");")}}function j(t,e,r,n){function i(i){var a=c[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(u,".",i)}function a(){function t(){r(g,".drawElementsInstancedANGLE(",[f,p,v,d+"<<(("+v+"-"+Qn+")>>1)",m],");")}function e(){r(g,".drawArraysInstancedANGLE(",[f,d,p,m],");")}h?y?t():(r("if(",h,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(l+".drawElements("+[f,p,v,d+"<<(("+v+"-"+Qn+")>>1)"]+");")}function e(){r(l+".drawArrays("+[f,d,p]+");")}h?y?t():(r("if(",h,"){"),t(),r("}else{"),e(),r("}")):e()}var s=t.shared,l=s.gl,u=s.draw,c=n.draw,h=function(){var i,a=c.elements,o=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(o=r),i=a.append(t,o)):i=o.def(u,".",ji),i&&o("if("+i+")"+l+".bindBuffer("+Ji+","+i+".buffer.buffer);"),i}(),f=i(Fi),d=i(Bi),p=function(){var i,a=c.count,o=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(o=r),i=a.append(t,o),de.optional(function(){a.MISSING&&t.assert(e,"false","missing vertex count"),a.DYNAMIC&&t.assert(o,i+">=0","missing vertex count")})):(i=o.def(u,".",Ni),de.optional(function(){t.assert(o,i+">=0","missing vertex count")})),i}();if("number"==typeof p){if(0===p)return}else r("if(",p,"){"),r.exit("}");var m,g;K&&(m=i(Ui),g=t.instancing);var v=h+".type",y=c.elements&&qt(c.elements);K&&("number"!=typeof m||m>=0)?"string"==typeof m?(r("if(",m,">0){"),a(),r("}else if(",m,"<0){"),o(),r("}")):a():o()}function F(t,e,r,n,i){var a=y(),o=a.proc("body",i);return de.optional(function(){a.commandStr=e.commandStr,a.command=a.link(e.commandStr)}),K&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),t(a,o,r,n),a.compile().body}function N(t,e,r,n){I(t,e),O(t,e,r,n.attributes,function(){return!0}),R(t,e,r,n.uniforms,function(){return!0}),j(t,e,e,r)}function B(t,e){var r=t.proc("draw",1);I(t,r),L(t,r,e.context),C(t,r,e.framebuffer),D(t,r,e),z(t,r,e.state),P(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,".useProgram(",n,".program);"),e.shader.program)N(t,r,e,e.shader.program);else{var i=t.global.def("{}"),a=r.def(n,".id"),o=r.def(i,"[",a,"]");r(t.cond(o).then(o,".call(this,a0);").else(o,"=",i,"[",a,"]=",t.link(function(r){return F(N,t,e,r,1)}),"(",n,");",o,".call(this,a0);"))}Object.keys(e.state).length>0&&r(t.shared.current,".dirty=true;")}function U(t,e,r,n){function i(){return!0}t.batchId="a1",I(t,e),O(t,e,r,n.attributes,i),R(t,e,r,n.uniforms,i),j(t,e,e,r)}function V(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}I(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var u=t.scope(),c=t.scope();if(e(u.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",c,"}",u.exit),r.needsContext&&L(t,c,r.context),r.needsFramebuffer&&C(t,c,r.framebuffer),z(t,c,r.state,i),r.profile&&i(r.profile)&&P(t,c,r,!1,!0),n)O(t,u,r,n.attributes,a),O(t,c,r,n.attributes,i),R(t,u,r,n.uniforms,a),R(t,c,r,n.uniforms,i),j(t,u,c,r);else{var h=t.global.def("{}"),f=r.shader.progVar.append(t,c),d=c.def(f,".id"),p=c.def(h,"[",d,"]");c(t.shared.gl,".useProgram(",f,".program);","if(!",p,"){",p,"=",h,"[",d,"]=",t.link(function(e){return F(U,t,r,e,2)}),"(",f,");}",p,".call(this,a0[",s,"],",s,");")}}function H(t,e){function r(t){return t.contextDep&&i||t.propDep}var n=t.proc("batch",2);t.batchId="0",I(t,n);var i=!1,a=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(L(t,n,e.context),a=!1);var o=e.framebuffer,s=!1;o?(o.propDep?i=s=!0:o.contextDep&&i&&(s=!0),s||C(t,n,o)):C(t,n,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),D(t,n,e),z(t,n,e.state,function(t){return!r(t)}),e.profile&&r(e.profile)||P(t,n,e,!1,"a1"),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=s;var l=e.shader.progVar;if(l.contextDep&&i||l.propDep)V(t,n,e,null);else{var u=l.append(t,n);if(n(t.shared.gl,".useProgram(",u,".program);"),e.shader.program)V(t,n,e,e.shader.program);else{var c=t.global.def("{}"),h=n.def(u,".id"),f=n.def(c,"[",h,"]");n(t.cond(f).then(f,".call(this,a0,a1);").else(f,"=",c,"[",h,"]=",t.link(function(r){return F(V,t,e,r,2)}),"(",u,");",f,".call(this,a0,a1);"))}}Object.keys(e.state).length>0&&n(t.shared.current,".dirty=true;")}function q(t,r){function n(e){var n=r.shader[e];n&&i.set(a.shader,"."+e,n.append(t,i))}var i=t.proc("scope",3);t.batchId="a2";var a=t.shared,o=a.current;L(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),Vt(Object.keys(r.state)).forEach(function(e){var n=r.state[e],o=n.append(t,i);mt(o)?o.forEach(function(r,n){i.set(t.next[e],"["+n+"]",r)}):i.set(a.next,"."+e,o)}),P(t,i,r,!0,!0),[ji,Bi,Ni,Ui,Fi].forEach(function(e){var n=r.draw[e];n&&i.set(a.draw,"."+e,""+n.append(t,i))}),Object.keys(r.uniforms).forEach(function(n){i.set(a.uniforms,"["+e.id(n)+"]",r.uniforms[n].append(t,i))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new X).forEach(function(t){i.set(a,"."+t,n[t])})}),n(Oi),n(Ri),Object.keys(r.state).length>0&&(i(o,".dirty=true;"),i.exit(o,".dirty=true;")),i("a1(",t.shared.context,",a0,",t.batchId,");")}function G(t){if("object"==typeof t&&!mt(t)){for(var e=Object.keys(t),r=0;r=0;--t){var r=q[t];r&&r(E,null,0)}v.flush(),A&&A.update()}function r(){!J&&q.length>0&&(J=ve.next(e))}function n(){J&&(ve.cancel(e),J=null)}function i(t){t.preventDefault(),b=!0,n(),G.forEach(function(t){t()})}function a(t){v.getError(),b=!1,x.restore(),O.restore(),z.restore(),R.restore(),j.restore(),F.restore(),A&&A.restore(),N.procs.refresh(),r(),Y.forEach(function(t){t()})}function o(){q.length=0,n(),H&&(H.removeEventListener(eo,i),H.removeEventListener(ro,a)),O.clear(),F.clear(),j.clear(),R.clear(),I.clear(),z.clear(),A&&A.clear(),Z.forEach(function(t){t()})}function s(t){function e(t){var e={},r={};return Object.keys(t).forEach(function(n){var i=t[n];ge.isDynamic(i)?r[n]=ge.unbox(i,n):e[n]=i}),{dynamic:r,static:e}}function r(t){for(;d.length0)return h.call(this,r(0|t),0|t)}else{if(!Array.isArray(t))return c.call(this,t);if(t.length)return h.call(this,t,t.length)}}de(!!t,"invalid args to regl({...})"),de.type(t,"object","invalid args to regl({...})");var i=e(t.context||{}),a=e(t.uniforms||{}),o=e(t.attributes||{}),s=e(function(t){function e(t){if(t in r){var e=r[t];delete r[t],Object.keys(e).forEach(function(n){r[t+"."+n]=e[n]})}}var r=$t({},t);return delete r.uniforms,delete r.attributes,delete r.context,"stencil"in r&&r.stencil.op&&(r.stencil.opBack=r.stencil.opFront=r.stencil.op,delete r.stencil.op),e("blend"),e("depth"),e("cull"),e("stencil"),e("polygonOffset"),e("scissor"),e("sample"),r}(t)),l={gpuTime:0,cpuTime:0,count:0},u=N.compile(s,o,a,i,l),c=u.draw,h=u.batch,f=u.scope,d=[];return $t(n,{stats:l})}function l(t,e){var r=0;N.procs.poll();var n=e.color;n&&(v.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=Ka),"depth"in e&&(v.clearDepth(+e.depth),r|=Qa),"stencil"in e&&(v.clearStencil(0|e.stencil),r|=$a),de(!!r,"called regl.clear with no buffer specified"),v.clear(r)}function u(t){if(de("object"==typeof t&&t,"regl.clear() takes an object as input"),"framebuffer"in t)if(t.framebuffer&&"framebufferCube"===t.framebuffer_reglType)for(var e=0;e<6;++e)K($t({framebuffer:t.framebuffer.faces[e]},t),l);else K(t,l);else l(null,t)}function c(t){function e(){function e(){var t=Zt(q,e);q[t]=q[q.length-1],q.length-=1,q.length<=0&&n()}var r=Zt(q,t);de(r>=0,"cannot cancel a frame twice"),q[r]=e}return de.type(t,"function","regl.frame() callback must be a function"),q.push(t),r(),{cancel:e}}function h(){var t=V.viewport,e=V.scissor_box;t[0]=t[1]=e[0]=e[1]=0,E.viewportWidth=E.framebufferWidth=E.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,E.viewportHeight=E.framebufferHeight=E.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function f(){E.tick+=1,E.time=p(),h(),N.procs.poll()}function d(){h(),N.procs.refresh(),A&&A.update()}function p(){return(ye()-k)/1e3}function m(t,e){de.type(e,"function","listener callback must be a function");var r;switch(t){case"frame":return c(e);case"lost":r=G;break;case"restore":r=Y;break;case"destroy":r=Z;break;default:de.raise("invalid event, must be one of frame,lost,restore,destroy")}return r.push(e),{cancel:function(){for(var t=0;t=0},read:U,destroy:o,_gl:v,_refresh:d,poll:function(){f(),A&&A.update()},now:p,stats:w});return g.onDone(null,Q),Q}var Kt={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Qt=function(t){return Object.prototype.toString.call(t)in Kt},$t=function(t,e){for(var r=Object.keys(e),n=0;n=2,"invalid renderbuffer shape"),a=0|d[0],o=0|d[1]}else"radius"in f&&(a=o=0|f.radius),"width"in f&&(a=0|f.width),"height"in f&&(o=0|f.height);"format"in f&&(de.parameter(f.format,u,"invalid renderbuffer format"),l=u[f.format])}else"number"==typeof e?(a=0|e,o="number"==typeof n?0|n:a):e?de.raise("invalid arguments to renderbuffer constructor"):a=o=1;if(de(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),a!==h.width||o!==h.height||l!==h.format)return s.width=h.width=a,s.height=h.height=o,h.format=l,t.bindRenderbuffer(xn,h.renderbuffer),t.renderbufferStorage(xn,l,a,o),i.profile&&(h.stats.size=zt(h.format,h.width,h.height)),s.format=c[h.format],s}function l(e,n){var a=0|e,o=0|n||a;return a===h.width&&o===h.height?s:(de(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),s.width=h.width=a,s.height=h.height=o,t.bindRenderbuffer(xn,h.renderbuffer),t.renderbufferStorage(xn,h.format,a,o),i.profile&&(h.stats.size=zt(h.format,h.width,h.height)),s)}var h=new a(t.createRenderbuffer());return f[h.id]=h,n.renderbufferCount++,s(e,o),s.resize=l,s._reglType="renderbuffer",s._renderbuffer=h,i.profile&&(s.stats=h.stats),s.destroy=function(){h.decRef()},s}function l(){xe(f).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(xn,e.renderbuffer),t.renderbufferStorage(xn,e.format,e.width,e.height)}),t.bindRenderbuffer(xn,null)}var u={rgba4:_n,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};e.ext_srgb&&(u.srgba=35907),e.ext_color_buffer_half_float&&(u.rgba16f=34842,u.rgb16f=34843),e.webgl_color_buffer_float&&(u.rgba32f=34836);var c=[];Object.keys(u).forEach(function(t){var e=u[t];c[e]=t});var h=0,f={};return a.prototype.decRef=function(){--this.refCount<=0&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:s,clear:function(){xe(f).forEach(o)},restore:l}},An=36160,kn=36161,Tn=3553,Sn=34069,En=36064,Ln=36096,Cn=36128,Dn=33306,zn=36053,In=6402,Pn=[6408],On=[];On[6408]=4;var Rn=[];Rn[5121]=1,Rn[5126]=4,Rn[36193]=2;var jn=33189,Fn=36168,Nn=34041,Bn=[32854,32855,36194,35907,34842,34843,34836],Un={};Un[zn]="complete",Un[36054]="incomplete attachment",Un[36057]="incomplete dimensions",Un[36055]="incomplete, missing attachment",Un[36061]="unsupported" -;var Vn=5126,Hn=35632,qn=35633,Gn=35718,Yn=35721,Wn=6408,Xn=5121,Zn=3333,Jn=5126,Kn="xyzw".split(""),Qn=5121,$n=1,ti=2,ei=0,ri=1,ni=2,ii=3,ai=4,oi="dither",si="blend.enable",li="blend.color",ui="blend.equation",ci="blend.func",hi="depth.enable",fi="depth.func",di="depth.range",pi="depth.mask",mi="colorMask",gi="cull.enable",vi="cull.face",yi="frontFace",bi="lineWidth",xi="polygonOffset.enable",_i="polygonOffset.offset",wi="sample.alpha",Mi="sample.enable",Ai="sample.coverage",ki="stencil.enable",Ti="stencil.mask",Si="stencil.func",Ei="stencil.opFront",Li="stencil.opBack",Ci="scissor.enable",Di="scissor.box",zi="viewport",Ii="profile",Pi="framebuffer",Oi="vert",Ri="frag",ji="elements",Fi="primitive",Ni="count",Bi="offset",Ui="instances",Vi=Pi+"Width",Hi=Pi+"Height",qi=zi+"Width",Gi=zi+"Height",Yi="drawingBufferWidth",Wi="drawingBufferHeight",Xi=[ci,ui,Si,Ei,Li,Ai,zi,Di,_i],Zi=34962,Ji=34963,Ki=3553,Qi=34067,$i=2884,ta=3042,ea=3024,ra=2960,na=2929,ia=3089,aa=32823,oa=32926,sa=32928,la=5126,ua=35664,ca=35665,ha=35666,fa=5124,da=35667,pa=35668,ma=35669,ga=35670,va=35671,ya=35672,ba=35673,xa=35674,_a=35675,wa=35676,Ma=35678,Aa=35680,ka=4,Ta=1028,Sa=1029,Ea=2304,La=2305,Ca=32775,Da=32776,za=519,Ia=7680,Pa=0,Oa=1,Ra=32774,ja=513,Fa=36160,Na=36064,Ba={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Ua=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],Va={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ha={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},qa={frag:35632,vert:35633},Ga={cw:Ea,ccw:La},Ya=new Ht(!1,!1,!1,function(){}),Wa=34918,Xa=34919,Za=35007,Ja=function(t,e){function r(){return f.pop()||h.createQueryEXT()}function n(t){f.push(t)}function i(t){var e=r();h.beginQueryEXT(Za,e),d.push(e),u(d.length-1,d.length,t)}function a(){h.endQueryEXT(Za)}function o(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}function s(){return p.pop()||new o}function l(t){p.push(t)}function u(t,e,r){var n=s();n.startQueryIndex=t,n.endQueryIndex=e,n.sum=0,n.stats=r,m.push(n)}function c(){var t,e,r=d.length;if(0!==r){v.length=Math.max(v.length,r+1),g.length=Math.max(g.length,r+1),g[0]=0,v[0]=0;var i=0;for(t=0,e=0;e=r)return a.substr(0,r);for(;r>a.length&&e>1;)1&e&&(a+=t),e>>=1,t+=t;return a+=t,a=a.substr(0,r)}var i,a="";e.exports=n},{}],479:[function(e,r,n){!function(e,i){"function"==typeof t&&t.amd?t(i):"object"==typeof n?r.exports=i():e.resolveUrl=i()}(this,function(){function t(){var t=arguments.length;if(0===t)throw new Error("resolveUrl requires at least one argument; got none.");var e=document.createElement("base");if(e.href=arguments[0],1===t)return e.href;var r=document.getElementsByTagName("head")[0];r.insertBefore(e,r.firstChild);for(var n,i=document.createElement("a"),a=1;a=0;--i){var a=r,o=t[i];r=a+o;var s=r-a,l=o-s;l&&(t[--n]=r,r=l)}for(var u=0,i=n;i>1;return["sum(",o(t.slice(0,e)),",",o(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("");for(var e=[],r=0;r>1;return["sum(",a(t.slice(0,e)),",",a(t.slice(e)),")"].join("")}function o(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return o(e,t)}function s(t){return t&!0?"-":""}function l(t){if(2===t.length)return[["diff(",o(t[0][0],t[1][1]),",",o(t[1][0],t[0][1]),")"].join("")];for(var e=[],r=0;r0&&r.push(","),r.push("[");for(var a=0;a0&&r.push(","),a===n?r.push("+b[",i,"]"):r.push("+A[",i,"][",a,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",e);var s=new Function("det",r.join(""));return s(t<6?o[t]:o)}function i(){return[0]}function a(t,e){return[[e[0]],[t[0][0]]]}var o=t("robust-determinant"),s=6,l=[i,a];!function(){for(;l.length>1;return["sum(",o(t.slice(0,e)),",",o(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],r=0;r0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=3.3306690738754716e-16*n;return o>=s||o<=-s?o:m(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],u=r[1]-n[1],c=t[2]-n[2],h=e[2]-n[2],f=r[2]-n[2],d=a*u,p=o*l,m=o*s,v=i*u,y=i*l,b=a*s,x=c*(d-p)+h*(m-v)+f*(y-b),_=(Math.abs(d)+Math.abs(p))*Math.abs(c)+(Math.abs(m)+Math.abs(v))*Math.abs(h)+(Math.abs(y)+Math.abs(b))*Math.abs(f),w=7.771561172376103e-16*_;return x>w||-x>w?x:g(t,e,r,n)}];!function(){for(;v.length<=p;)v.push(l(v.length));for(var t=[],r=["slow"],n=0;n<=p;++n)t.push("a"+n),r.push("o"+n);for(var i=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"],n=2;n<=p;++n)i.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i0&&s>0||o<0&&s<0)return!1;var l=a(r,t,e),u=a(i,t,e);return!(l>0&&u>0||l<0&&u<0)&&(0!==o||0!==s||0!==l||0!==u||n(t,e,r,i))}e.exports=i;var a=t("robust-orientation")[3]},{"robust-orientation":486}],490:[function(t,e,r){"use strict";function n(t,e){var r=t+e,n=r-t,i=r-n,a=e-n,o=t-i,s=o+a;return s?[s,r]:[r]}function i(t,e){var r=0|t.length,i=0|e.length;if(1===r&&1===i)return n(t[0],-e[0]);var a,o,s=r+i,l=new Array(s),u=0,c=0,h=0,f=Math.abs,d=t[c],p=f(d),m=-e[h],g=f(m);p=i?(a=d,(c+=1)=i?(a=d,(c+=1)0){for(var s=0,l=0,u=0;un.h||t>n.free||rc)&&(h=2*Math.max(t,c)),(ll)&&(u=2*Math.max(r,l)),this.resize(h,u),this.packOne(t,r)}return null},t.prototype.clear=function(){this.shelves=[],this.stats={}},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;rthis.free||e>this.h)return null;var r=this.x;return this.x+=t,this.free-=t,{x:r,y:this.y,w:t,h:e,width:t,height:e}},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t})},{}],493:[function(t,e,r){"use strict";e.exports=function(t){return t<0?-1:t>0?1:0}},{}],494:[function(t,e,r){"use strict";function n(t){return a(i(t))}e.exports=n;var i=t("boundary-cells"),a=t("reduce-simplicial-complex")},{"boundary-cells":59,"reduce-simplicial-complex":476}],495:[function(t,e,r){"use strict";function n(t){for(var e=t.length,r=0,n=0;n>1,v=E[2*m+1];","if(v===b){return m}","if(b1;--n){n0&&l.push(","),l.push("[");for(var n=0;n0&&l.push(","),l.push("B(C,E,c[",i[0],"],c[",i[1],"])")}l.push("]")}l.push(");")}}(i[s]),l.push("break;");l.push("}}")}return l.push("}return R;};return getContour",t,"d"),new Function("pool",l.join(""))(a)}function i(t){var e=s[t];return e||(e=s[t]=n(t)),e}e.exports=i;var a=t("typedarray-pool"),o=t("marching-simplex-table"),s={}},{"marching-simplex-table":424,"typedarray-pool":518}],497:[function(t,e,r){"use strict";"use restrict";function n(t){for(var e=0,r=Math.max,n=0,i=t.length;n>1,s=o(t[a],e);s<=0?(0===s&&(i=a),r=a+1):s>0&&(n=a-1)}return i}function h(t,e){for(var r=new Array(t.length),n=0,i=r.length;n=t.length||0!==o(t[m],a))break}return r}function f(t,e){if(!e)return h(u(p(t,0)),t,0);for(var r=new Array(e),n=0;n>>c&1&&u.push(i[c]);e.push(u)}return l(e)}function p(t,e){if(e<0)return[];for(var r=[],n=(1<>1:(t>>1)-1}function u(t){for(var e=s(t);;){var r=e,n=2*t+1,i=2*(t+1),o=t;if(n0;){var r=l(t);if(r>=0){if(e0){var t=A[0];return a(0,T-1),T-=1,u(0),t}return-1}function f(t,e){var r=A[t];return y[r]===e?t:(y[r]=-1/0,c(t),h(),y[r]=e,T+=1,c(T-1))}function d(t,e){if(t[e]<0)return e;var r=e,n=e;do{var i=t[n];if(!b[n]||i<0||i===n)break;if(n=i,i=t[n],!b[n]||i<0||i===n)break;n=i,r=t[r]}while(r!==n);for(var a=e;a!==n;a=t[a])t[a]=n;return n}for(var p=e.length,m=t.length,g=new Array(p),v=new Array(p),y=new Array(p),b=new Array(p),x=0;x>1;x>=0;--x)u(x);for(;;){var S=h();if(S<0||y[S]>r)break;!function(t){if(!b[t]){b[t]=!0;var e=g[t],r=v[t];g[r]>=0&&(g[r]=e),v[e]>=0&&(v[e]=r),k[e]>=0&&f(k[e],i(e)),k[r]>=0&&f(k[r],i(r))}}(S)}for(var E=[],x=0;x=0&&r>=0&&e!==r){var n=k[e],i=k[r];n!==i&&L.push([n,i])}}),o.unique(o.normalize(L)),{positions:E,edges:L}}e.exports=i;var a=t("robust-orientation"),o=t("simplicial-complex")},{"robust-orientation":486,"simplicial-complex":499}],502:[function(t,e,r){"use strict";function n(t,e){var r,n;if(e[0][0]e[1][0])){var i=Math.min(t[0][1],t[1][1]),o=Math.max(t[0][1],t[1][1]),s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]);return ol?i-l:o-l}r=e[1],n=e[0]}var u,c;t[0][1]e[1][0]))return n(e,t);r=e[1],i=e[0]}var o,s;if(t[0][0]t[1][0]))return-n(t,e);o=t[1],s=t[0]}var l=a(r,i,s),u=a(r,i,o);if(l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;if(l=a(s,o,i),u=a(s,o,r),l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;return i[0]-s[0]}e.exports=i;var a=t("robust-orientation")},{"robust-orientation":486}],503:[function(t,e,r){"use strict";function n(t,e,r){this.slabs=t,this.coordinates=e,this.horizontal=r}function i(t,e){return t.y-e}function a(t,e){for(var r=null;t;){var n,i,o=t.key;o[0][0]0)if(e[0]!==o[1][0])r=t,t=t.right;else{var l=a(t.right,e);if(l)return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l=a(t.right,e);if(l)return l;t=t.left}}return r}function o(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function s(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}function l(t){for(var e=t.length,r=2*e,i=new Array(r),a=0;a0){var s=a(this.slabs[e-1],t);s&&(o?f(s.key,o)>0&&(o=s.key,n=s.value):(n=s.value,o=s.key))}var l=this.horizontal[e];if(l.length>0){var c=u.ge(l,t[1],i);if(c=l.length)return n;d=l[c]}}if(d.start)if(o){var p=h(o[0],o[1],[t[0],d.y]);o[0][0]>o[1][0]&&(p=-p),p>0&&(n=d.index)}else n=d.index;else d.y!==t[1]&&(n=d.index)}}}return n}},{"./lib/order-segments":502,"binary-search-bounds":56,"functional-red-black-tree":117,"robust-orientation":486}],504:[function(t,e,r){"use strict";function n(t,e){var r=u(l(t,e),[e[e.length-1]]);return r[r.length-1]}function i(t,e,r,n){var i=n-e,a=-e/i;a<0?a=0:a>1&&(a=1);for(var o=1-a,s=t.length,l=new Array(s),u=0;u0||o>0&&c<0){var h=i(s,c,l,o);r.push(h),a.push(h.slice())}c<0?a.push(l.slice()):c>0?r.push(l.slice()):(r.push(l.slice()),a.push(l.slice())),o=c}return{positive:r,negative:a}}function o(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l0||a>0&&u<0)&&r.push(i(o,u,s,a)),u>=0&&r.push(s.slice()),a=u}return r}function s(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l0||a>0&&u<0)&&r.push(i(o,u,s,a)),u<=0&&r.push(s.slice()),a=u}return r}var l=t("robust-dot-product"),u=t("robust-sum");e.exports=a,e.exports.positive=o,e.exports.negative=s},{"robust-dot-product":483,"robust-sum":491}],505:[function(e,r,n){!function(e){function r(){var t=arguments[0],e=r.cache;return e[t]&&e.hasOwnProperty(t)||(e[t]=r.parse(t)),r.format.call(null,e[t],arguments)}function i(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function a(t,e){return Array(e+1).join(t)}var o={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i, -key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};r.format=function(t,e){var n,s,l,u,c,h,f,d=1,p=t.length,m="",g=[],v=!0,y="";for(s=0;s=0),u[8]){case"b":n=n.toString(2);break;case"c":n=String.fromCharCode(n);break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,u[6]?parseInt(u[6]):0);break;case"e":n=u[7]?n.toExponential(u[7]):n.toExponential();break;case"f":n=u[7]?parseFloat(n).toFixed(u[7]):parseFloat(n);break;case"g":n=u[7]?parseFloat(n).toPrecision(u[7]):parseFloat(n);break;case"o":n=n.toString(8);break;case"s":n=(n=String(n))&&u[7]?n.substring(0,u[7]):n;break;case"u":n>>>=0;break;case"x":n=n.toString(16);break;case"X":n=n.toString(16).toUpperCase()}o.json.test(u[8])?g[g.length]=n:(!o.number.test(u[8])||v&&!u[3]?y="":(y=v?"+":"-",n=n.toString().replace(o.sign,"")),h=u[4]?"0"===u[4]?"0":u[4].charAt(1):" ",f=u[6]-(y+n).length,c=u[6]&&f>0?a(h,f):"",g[g.length]=u[5]?y+n+c:"0"===h?y+c+n:c+y+n)}return g.join("")},r.cache={},r.parse=function(t){for(var e=t,r=[],n=[],i=0;e;){if(null!==(r=o.text.exec(e)))n[n.length]=r[0];else if(null!==(r=o.modulo.exec(e)))n[n.length]="%";else{if(null===(r=o.placeholder.exec(e)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){i|=1;var a=[],s=r[2],l=[];if(null===(l=o.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a[a.length]=l[1];""!==(s=s.substring(l[0].length));)if(null!==(l=o.key_access.exec(s)))a[a.length]=l[1];else{if(null===(l=o.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a[a.length]=l[1]}r[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n[n.length]=r}e=e.substring(r[0].length)}return n};var s=function(t,e,n){return n=(e||[]).slice(0),n.splice(0,0,t),r.apply(null,n)};void 0!==n?(n.sprintf=r,n.vsprintf=s):(e.sprintf=r,e.vsprintf=s,"function"==typeof t&&t.amd&&t(function(){return{sprintf:r,vsprintf:s}}))}("undefined"==typeof window?this:window)},{}],506:[function(t,e,r){"use strict";function n(t){return new i(t)}function i(t){this.options=d(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function a(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}function o(t,e){var r=t.geometry.coordinates;return{x:u(r[0]),y:c(r[1]),zoom:1/0,id:e,parentId:-1}}function s(t){return{type:"Feature",properties:l(t),geometry:{type:"Point",coordinates:[h(t.x),f(t.y)]}}}function l(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return d(d({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function u(t){return t/360+.5}function c(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function h(t){return 360*(t-.5)}function f(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function d(t,e){for(var r in e)t[r]=e[r];return t}function p(t){return t.x}function m(t){return t.y}var g=t("kdbush");e.exports=n,i.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var r="prepare "+t.length+" points";e&&console.time(r),this.points=t;var n=t.map(o);e&&console.timeEnd(r);for(var i=this.options.maxZoom;i>=this.options.minZoom;i--){var a=+Date.now();this.trees[i+1]=g(n,p,m,this.options.nodeSize,Float32Array),n=this._cluster(n,i),e&&console.log("z%d: %d clusters in %dms",i,n.length,+Date.now()-a)}return this.trees[this.options.minZoom]=g(n,p,m,this.options.nodeSize,Float32Array),e&&console.timeEnd("total time"),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],n=r.range(u(t[0]),c(t[3]),u(t[2]),c(t[1])),i=[],a=0;a c)|0 },"),"generic"===e&&n.push("getters:[0],");for(var a=[],l=[],u=0;u>>7){");for(var u=0;u<1<<(1<128&&u%128==0){h.length>0&&f.push("}}");var d="vExtra"+h.length;n.push("case ",u>>>7,":",d,"(m&0x7f,",l.join(),");break;"),f=["function ",d,"(m,",l.join(),"){switch(m){"],h.push(f)}f.push("case ",127&u,":");for(var p=new Array(r),m=new Array(r),g=new Array(r),v=new Array(r),y=0,b=0;bb)&&!(u&1<<_)!=!(u&1<0&&(k="+"+g[x]+"*c");var T=p[x].length/y*.5,S=.5+v[x]/y*.5;A.push("d"+x+"-"+S+"-"+T+"*("+p[x].join("+")+k+")/("+m[x].join("+")+")")}f.push("a.push([",A.join(),"]);","break;")}n.push("}},"),h.length>0&&f.push("}}");for(var E=[],u=0;u<1<0&&(f+=.02);for(var p=new Float32Array(h),m=0,g=-.5*f,d=0;d=0?1.2:1))}function i(t,e,r,n,i,o,s){for(var l=0;l.5?l/(2-a-o):l/(a+o),a){case t:n=(e-r)/l+(e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}var i,a,o;if(t=S(t,360),e=S(e,100),r=S(r,100),0===e)i=a=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;i=n(l,s,t+1/3),a=n(l,s,t),o=n(l,s,t-1/3)}return{r:255*i,g:255*a,b:255*o}}function l(t,e,r){t=S(t,255),e=S(e,255),r=S(r,255);var n,i,a=q(t,e,r),o=H(t,e,r),s=a,l=a-o;if(i=0===a?0:l/a,a==o)n=0;else{switch(a){case t:n=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+a)%360,o.push(n(i));return o}function k(t,e){e=e||6;for(var r=n(t).toHsv(),i=r.h,a=r.s,o=r.v,s=[],l=1/e;e--;)s.push(n({h:i,s:a,v:o})),o=(o+l)%1;return s}function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function S(t,r){C(t)&&(t="100%");var n=D(t);return t=H(r,q(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function E(t){return H(1,q(0,t))}function L(t){return parseInt(t,16)}function C(t){return"string"==typeof t&&t.indexOf(".")!=-1&&1===parseFloat(t)}function D(t){return"string"==typeof t&&t.indexOf("%")!=-1}function z(t){return 1==t.length?"0"+t:""+t}function I(t){return t<=1&&(t=100*t+"%"),t}function P(t){return e.round(255*parseFloat(t)).toString(16)}function O(t){return L(t)/255}function R(t){return!!X.CSS_UNIT.exec(t)}function j(t){t=t.replace(N,"").replace(B,"").toLowerCase();var e=!1;if(Y[t])t=Y[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=X.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=X.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=X.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=X.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=X.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=X.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=X.hex8.exec(t))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),a:O(r[4]),format:e?"name":"hex8"}:(r=X.hex6.exec(t))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),format:e?"name":"hex"}:(r=X.hex4.exec(t))?{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),a:O(r[4]+""+r[4]),format:e?"name":"hex8"}:!!(r=X.hex3.exec(t))&&{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),format:e?"name":"hex"}}function F(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:e,size:r}}var N=/^\s+/,B=/\s+$/,U=0,V=e.round,H=e.min,q=e.max,G=e.random;n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,n,i,a,o,s=this.toRgb();return t=s.r/255,r=s.g/255,n=s.b/255,i=t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4),a=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),o=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*o},setAlpha:function(t){return this._a=T(t),this._roundA=V(100*this._a)/100,this},toHsv:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=l(this._r,this._g,this._b),e=V(360*t.h),r=V(100*t.s),n=V(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=o(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=o(this._r,this._g,this._b),e=V(360*t.h),r=V(100*t.s),n=V(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return c(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return h(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:V(this._r),g:V(this._g),b:V(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+V(this._r)+", "+V(this._g)+", "+V(this._b)+")":"rgba("+V(this._r)+", "+V(this._g)+", "+V(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:V(100*S(this._r,255))+"%",g:V(100*S(this._g,255))+"%",b:V(100*S(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+V(100*S(this._r,255))+"%, "+V(100*S(this._g,255))+"%, "+V(100*S(this._b,255))+"%)":"rgba("+V(100*S(this._r,255))+"%, "+V(100*S(this._g,255))+"%, "+V(100*S(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(W[c(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+f(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=n(t);r="#"+f(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(k,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]="a"===i?t[i]:I(t[i]));t=r}return n(t,e)},n.equals=function(t,e){return!(!t||!e)&&n(t).toRgbString()==n(e).toRgbString()},n.random=function(){return n.fromRatio({r:G(),g:G(),b:G()})},n.mix=function(t,e,r){r=0===r?0:r||50;var i=n(t).toRgb(),a=n(e).toRgb(),o=r/100;return n({r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a})},n.readability=function(t,r){var i=n(t),a=n(r);return(e.max(i.getLuminance(),a.getLuminance())+.05)/(e.min(i.getLuminance(),a.getLuminance())+.05)},n.isReadable=function(t,e,r){var i,a,o=n.readability(t,e);switch(a=!1,i=F(r),i.level+i.size){case"AAsmall":case"AAAlarge":a=o>=4.5;break;case"AAlarge":a=o>=3;break;case"AAAsmall":a=o>=7}return a},n.mostReadable=function(t,e,r){var i,a,o,s,l=null,u=0;r=r||{},a=r.includeFallbackColors,o=r.level,s=r.size;for(var c=0;cu&&(u=i,l=n(e[c]));return n.isReadable(t,l,{level:o,size:s})||!a?l:(r.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],r))};var Y=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},W=n.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(Y),X=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();void 0!==r&&r.exports?r.exports=n:"function"==typeof t&&t.amd?t(function(){return n}):window.tinycolor=n}(Math)},{}],512:[function(t,e,r){"use strict";function n(t,e){var r=o(getComputedStyle(t).getPropertyValue(e));return r[0]*a(r[1],t)}function i(t,e){var r=document.createElement("div");r.style["font-size"]="128"+t,e.appendChild(r);var i=n(r,"font-size")/128;return e.removeChild(r),i}function a(t,e){switch(e=e||document.body,t=(t||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case"%":return e.clientHeight/100;case"ch":case"ex":return i(t,e);case"em":return n(e,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return s;case"cm":return s/2.54;case"mm":return s/25.4;case"pt":return s/72;case"pc":return s/6}return 1}var o=t("parse-unit");e.exports=a;var s=96},{"parse-unit":453}],513:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.topojson=e.topojson||{})}(this,function(t){"use strict";function e(t,e){var n=e.id,i=e.bbox,a=null==e.properties?{}:e.properties,o=r(t,e);return null==n&&null==i?{type:"Feature",properties:a,geometry:o}:null==i?{type:"Feature",id:n,properties:a,geometry:o}:{type:"Feature",id:n,bbox:i,properties:a,geometry:o}}function r(t,e){function r(t,e){e.length&&e.pop();for(var r=h[t<0?~t:t],n=0,i=r.length;n1)n=i(t,e,r);else for(a=0,n=new Array(o=t.arcs.length);a1)for(var i,a,l=1,u=o(n[0]);lu&&(a=n[0],n[0]=n[l],n[l]=a,u=i);return n})}}var s=function(t){return t},l=function(t){if(null==(e=t.transform))return s;var e,r,n,i=e.scale[0],a=e.scale[1],o=e.translate[0],l=e.translate[1];return function(t,e){return e||(r=n=0),t[0]=(r+=t[0])*i+o,t[1]=(n+=t[1])*a+l,t}},u=function(t){function e(t){s[0]=t[0],s[1]=t[1],o(s),s[0]h&&(h=s[0]),s[1]f&&(f=s[1])}function r(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(r);break;case"Point":e(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(e)}}var n=t.bbox;if(!n){var i,a,o=l(t),s=new Array(2),u=1/0,c=u,h=-u,f=-u -;t.arcs.forEach(function(t){for(var e=-1,r=t.length;++eh&&(h=s[0]),s[1]f&&(f=s[1])});for(a in t.objects)r(t.objects[a]);n=t.bbox=[u,c,h,f]}return n},c=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r},h=function(t,r){return"GeometryCollection"===r.type?{type:"FeatureCollection",features:r.geometries.map(function(r){return e(t,r)})}:e(t,r)},f=function(t,e){function r(e){var r,n=t.arcs[e<0?~e:e],i=n[0];return t.transform?(r=[0,0],n.forEach(function(t){r[0]+=t[0],r[1]+=t[1]})):r=n[n.length-1],e<0?[r,i]:[i,r]}function n(t,e){for(var r in t){var n=t[r];delete e[n.start],delete n.start,delete n.end,n.forEach(function(t){i[t<0?~t:t]=1}),s.push(n)}}var i={},a={},o={},s=[],l=-1;return e.forEach(function(r,n){var i,a=t.arcs[r<0?~r:r];a.length<3&&!a[1][0]&&!a[1][1]&&(i=e[++l],e[l]=r,e[n]=i)}),e.forEach(function(t){var e,n,i=r(t),s=i[0],l=i[1];if(e=o[s])if(delete o[e.end],e.push(t),e.end=l,n=a[l]){delete a[n.start];var u=n===e?e:e.concat(n);a[u.start=e.start]=o[u.end=n.end]=u}else a[e.start]=o[e.end]=e;else if(e=a[l])if(delete a[e.start],e.unshift(t),e.start=s,n=o[s]){delete o[n.end];var c=n===e?e:n.concat(e);a[c.start=n.start]=o[c.end=e.end]=c}else a[e.start]=o[e.end]=e;else e=[t],a[e.start=s]=o[e.end=l]=e}),n(o,a),n(a,o),e.forEach(function(t){i[t<0?~t:t]||s.push([t])}),s},d=function(t){return r(t,n.apply(this,arguments))},p=function(t){return r(t,o.apply(this,arguments))},m=function(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error("n must be \u22652");if(t.transform)throw new Error("already quantized");var i,a=u(t),o=a[0],s=(a[2]-o)/(e-1)||1,l=a[1],c=(a[3]-l)/(e-1)||1;t.arcs.forEach(function(t){for(var e,r,n,i=1,a=1,u=t.length,h=t[0],f=h[0]=Math.round((h[0]-o)/s),d=h[1]=Math.round((h[1]-l)/c);iMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,s=0;s<3;++s)a+=t[s]*t[s],o+=i[s]*t[s];for(var s=0;s<3;++s)i[s]-=o/a*t[s];return f(i,i),i}function o(t,e,r,n,i,a,o,s){this.center=l(r),this.up=l(n),this.right=l(i),this.radius=l([a]),this.angle=l([o,s]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var u=0;u<16;++u)this.computedMatrix[u]=.5;this.recalcMatrix(0)}function s(t){t=t||{};var e=t.center||[0,0,0],r=t.up||[0,1,0],i=t.right||a(r),s=t.radius||1,l=t.theta||0,u=t.phi||0;if(e=[].slice.call(e,0,3),r=[].slice.call(r,0,3),f(r,r),i=[].slice.call(i,0,3),f(i,i),"eye"in t){var c=t.eye,p=[c[0]-e[0],c[1]-e[1],c[2]-e[2]];h(i,p,r),n(i[0],i[1],i[2])<1e-6?i=a(r):f(i,i),s=n(p[0],p[1],p[2]);var m=d(r,p)/s,g=d(i,p)/s;u=Math.acos(m),l=Math.acos(g)}return s=Math.log(s),new o(t.zoomMin,t.zoomMax,e,r,i,s,l,u)}e.exports=s;var l=t("filtered-vector"),u=t("gl-mat4/invert"),c=t("gl-mat4/rotate"),h=t("gl-vec3/cross"),f=t("gl-vec3/normalize"),d=t("gl-vec3/dot"),p=o.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,i=0,a=0,o=0;o<3;++o)a+=e[o]*r[o],i+=e[o]*e[o];for(var s=Math.sqrt(i),l=0,o=0;o<3;++o)r[o]-=e[o]*a/i,l+=r[o]*r[o],e[o]/=s;for(var u=Math.sqrt(l),o=0;o<3;++o)r[o]/=u;var c=this.computedToward;h(c,e,r),f(c,c);for(var d=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),v=Math.sin(p),y=Math.cos(m),b=Math.sin(m),x=this.computedCenter,_=g*y,w=v*y,M=b,A=-g*b,k=-v*b,T=y,S=this.computedEye,E=this.computedMatrix,o=0;o<3;++o){var L=_*r[o]+w*c[o]+M*e[o];E[4*o+1]=A*r[o]+k*c[o]+T*e[o],E[4*o+2]=L,E[4*o+3]=0}var C=E[1],D=E[5],z=E[9],I=E[2],P=E[6],O=E[10],R=D*O-z*P,j=z*I-C*O,F=C*P-D*I,N=n(R,j,F);R/=N,j/=N,F/=N,E[0]=R,E[4]=j,E[8]=F;for(var o=0;o<3;++o)S[o]=x[o]+E[2+4*o]*d;for(var o=0;o<3;++o){for(var l=0,B=0;B<3;++B)l+=E[o+4*B]*S[B];E[12+o]=-l}E[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var m=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;m[0]=i[2],m[1]=i[6],m[2]=i[10];for(var a=this.computedUp,o=this.computedRight,s=this.computedToward,l=0;l<3;++l)i[4*l]=a[l],i[4*l+1]=o[l],i[4*l+2]=s[l];c(i,i,n,m);for(var l=0;l<3;++l)a[l]=i[4*l],o[l]=i[4*l+1];this.up.set(t,a[0],a[1],a[2]),this.right.set(t,o[0],o[1],o[2])}},p.pan=function(t,e,r,i){e=e||0,r=r||0,i=i||0,this.recalcMatrix(t);var a=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),a[1]),s=a[5],l=a[9],u=n(o,s,l);o/=u,s/=u,l/=u;var c=a[0],h=a[4],f=a[8],d=c*o+h*s+f*l;c-=o*d,h-=s*d,f-=l*d;var p=n(c,h,f);c/=p,h/=p,f/=p;var m=c*e+o*r,g=h*e+s*r,v=f*e+l*r;this.center.move(t,m,g,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+i),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,a){var o=1;"number"==typeof r&&(o=0|r),(o<0||o>3)&&(o=1);var s=(o+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var l=e[o],c=e[o+4],h=e[o+8];if(a){var f=Math.abs(l),d=Math.abs(c),p=Math.abs(h),m=Math.max(f,d,p);f===m?(l=l<0?-1:1,c=h=0):p===m?(h=h<0?-1:1,l=c=0):(c=c<0?-1:1,l=h=0)}else{var g=n(l,c,h);l/=g,c/=g,h/=g}var v=e[s],y=e[s+4],b=e[s+8],x=v*l+y*c+b*h;v-=l*x,y-=c*x,b-=h*x;var _=n(v,y,b);v/=_,y/=_,b/=_;var w=c*b-h*y,M=h*v-l*b,A=l*y-c*v,k=n(w,M,A);w/=k,M/=k,A/=k,this.center.jump(t,q,G,Y),this.radius.idle(t),this.up.jump(t,l,c,h),this.right.jump(t,v,y,b);var T,S;if(2===o){var E=e[1],L=e[5],C=e[9],D=E*v+L*y+C*b,z=E*w+L*M+C*A;T=R<0?-Math.PI/2:Math.PI/2,S=Math.atan2(z,D)}else{var I=e[2],P=e[6],O=e[10],R=I*l+P*c+O*h,j=I*v+P*y+O*b,F=I*w+P*M+O*A;T=Math.asin(i(R)),S=Math.atan2(F,j)}this.angle.jump(t,S,T),this.recalcMatrix(t);var N=e[2],B=e[6],U=e[10],V=this.computedMatrix;u(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Y=V[14]/H,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-N*W,G-B*W,Y-U*W)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,a){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter,a=a||this.computedUp;var o=a[0],s=a[1],l=a[2],u=n(o,s,l);if(!(u<1e-6)){o/=u,s/=u,l/=u;var c=e[0]-r[0],h=e[1]-r[1],f=e[2]-r[2],d=n(c,h,f);if(!(d<1e-6)){c/=d,h/=d,f/=d;var p=this.computedRight,m=p[0],g=p[1],v=p[2],y=o*m+s*g+l*v;m-=y*o,g-=y*s,v-=y*l;var b=n(m,g,v);if(!(b<.01&&(m=s*f-l*h,g=l*c-o*f,v=o*h-s*c,(b=n(m,g,v))<1e-6))){m/=b,g/=b,v/=b,this.up.set(t,o,s,l),this.right.set(t,m,g,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(d));var x=s*v-l*g,_=l*m-o*v,w=o*g-s*m,M=n(x,_,w);x/=M,_/=M,w/=M;var A=o*c+s*h+l*f,k=m*c+g*h+v*f,T=x*c+_*h+w*f,S=Math.asin(i(A)),E=Math.atan2(T,k),L=this.angle._state,C=L[L.length-1],D=L[L.length-2];C%=2*Math.PI;var z=Math.abs(C+2*Math.PI-E),I=Math.abs(C-E),P=Math.abs(C-2*Math.PI-E);z0?r.pop():new ArrayBuffer(t)}function s(t){return new Uint8Array(o(t),0,t)}function l(t){return new Uint16Array(o(2*t),0,t)}function u(t){return new Uint32Array(o(4*t),0,t)}function c(t){return new Int8Array(o(t),0,t)}function h(t){return new Int16Array(o(2*t),0,t)}function f(t){return new Int32Array(o(4*t),0,t)}function d(t){return new Float32Array(o(4*t),0,t)}function p(t){return new Float64Array(o(8*t),0,t)}function m(t){return x?new Uint8ClampedArray(o(t),0,t):s(t)}function g(t){return new DataView(o(t),0,t)}function v(t){t=y.nextPow2(t);var e=y.log2(t),r=M[e];return r.length>0?r.pop():new n(t)}var y=t("bit-twiddle"),b=t("dup");e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:b([32,0]),UINT16:b([32,0]),UINT32:b([32,0]),INT8:b([32,0]),INT16:b([32,0]),INT32:b([32,0]),FLOAT:b([32,0]),DOUBLE:b([32,0]),DATA:b([32,0]),UINT8C:b([32,0]),BUFFER:b([32,0])});var x="undefined"!=typeof Uint8ClampedArray,_=e.__TYPEDARRAY_POOL;_.UINT8C||(_.UINT8C=b([32,0])),_.BUFFER||(_.BUFFER=b([32,0]));var w=_.DATA,M=_.BUFFER;r.free=function(t){if(n.isBuffer(t))M[y.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|y.log2(e);w[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=a,r.freeArrayBuffer=i,r.freeBuffer=function(t){M[y.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return o(t);switch(e){case"uint8":return s(t);case"uint16":return l(t);case"uint32":return u(t);case"int8":return c(t);case"int16":return h(t);case"int32":return f(t);case"float":case"float32":return d(t);case"double":case"float64":return p(t);case"uint8_clamped":return m(t);case"buffer":return v(t);case"data":case"dataview":return g(t);default:return null}return null},r.mallocArrayBuffer=o,r.mallocUint8=s,r.mallocUint16=l,r.mallocUint32=u,r.mallocInt8=c,r.mallocInt16=h,r.mallocInt32=f,r.mallocFloat32=r.mallocFloat=d,r.mallocFloat64=r.mallocDouble=p,r.mallocUint8Clamped=m,r.mallocDataView=g,r.mallocBuffer=v,r.clearCache=function(){for(var t=0;t<32;++t)_.UINT8[t].length=0,_.UINT16[t].length=0,_.UINT32[t].length=0,_.INT8[t].length=0,_.INT16[t].length=0,_.INT32[t].length=0,_.FLOAT[t].length=0,_.DOUBLE[t].length=0,_.UINT8C[t].length=0,w[t].length=0,M[t].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":57,buffer:67,dup:107}],519:[function(t,e,r){"use strict";"use restrict";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;en)return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},{}],522:[function(t,e,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,r){if(t&&u.isObject(t)&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}function a(t){return u.isString(t)&&(t=i(t)),t instanceof n?t.format():n.prototype.format.call(t)}function o(t,e){return i(t,!1,!0).resolve(e)}function s(t,e){return t?i(t,!1,!0).resolveObject(e):e}var l=t("punycode"),u=t("./util");r.parse=i,r.resolve=o,r.resolveObject=s,r.format=a,r.Url=n;var c=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),m=["'"].concat(p),g=["%","/","?",";","#"].concat(m),v=["/","?","#"],y={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=t("querystring");n.prototype.parse=function(t,e,r){if(!u.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=n!==-1&&n127?D+="x":D+=C[z];if(!D.match(/^[+a-z0-9A-Z_-]{0,63}$/)){var P=E.slice(0,M),O=E.slice(M+1),R=C.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);R&&(P.push(R[1]),O.unshift(R[2])),O.length&&(o="/"+O.join(".")+o),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=l.toASCII(this.hostname));var j=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+j,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!y[d])for(var M=0,L=m.length;M0)&&r.host.split("@");k&&(r.auth=k.shift(),r.host=r.hostname=k.shift())}return r.search=t.search,r.query=t.query,u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!M.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=M.slice(-1)[0],S=(r.host||t.host||M.length>1)&&("."===T||".."===T)||""===T,E=0,L=M.length;L>=0;L--)T=M[L],"."===T?M.splice(L,1):".."===T?(M.splice(L,1),E++):E&&(M.splice(L,1),E--);if(!_&&!w)for(;E--;E)M.unshift("..");!_||""===M[0]||M[0]&&"/"===M[0].charAt(0)||M.unshift(""),S&&"/"!==M.join("/").substr(-1)&&M.push("");var C=""===M[0]||M[0]&&"/"===M[0].charAt(0);if(A){r.hostname=r.host=C?"":M.length?M.shift():"";var k=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");k&&(r.auth=k.shift(),r.host=r.hostname=k.shift())}return _=_||r.host&&M.length,_&&!C&&M.unshift(""),M.length?r.pathname=M.join("/"):(r.pathname=null,r.path=null),u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=h.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":523,punycode:466,querystring:470}],523:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],524:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],525:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],526:[function(t,e,r){(function(e,n){function i(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(e)?n.showHidden=e:e&&r._extend(n,e),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),l(n,t,n.depth)}function a(t,e){var r=i.styles[e];return r?"\x1b["+i.colors[r][0]+"m"+t+"\x1b["+i.colors[r][1]+"m":t}function o(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function l(t,e,n){if(t.customInspect&&e&&T(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return b(i)||(i=l(t,i,n)),i}var a=u(t,e);if(a)return a;var o=Object.keys(e),m=s(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),k(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(e);if(0===o.length){if(T(e)){var g=e.name?": "+e.name:"";return t.stylize("[Function"+g+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(A(e))return t.stylize(Date.prototype.toString.call(e),"date");if(k(e))return c(e)}var v="",y=!1,x=["{","}"];if(p(e)&&(y=!0,x=["[","]"]),T(e)){v=" [Function"+(e.name?": "+e.name:"")+"]"}if(w(e)&&(v=" "+RegExp.prototype.toString.call(e)),A(e)&&(v=" "+Date.prototype.toUTCString.call(e)),k(e)&&(v=" "+c(e)),0===o.length&&(!y||0==e.length))return x[0]+v+x[1];if(n<0)return w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var _;return _=y?h(t,e,n,m,o):o.map(function(r){return f(t,e,n,m,r,y)}),t.seen.pop(),d(_,v,x)}function u(t,e){if(_(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var a=[],o=0,s=e.length;o-1&&(s=a?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),_(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function d(t,e,r){var n=0;return t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function p(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function g(t){return null===t}function v(t){return null==t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function x(t){return"symbol"==typeof t}function _(t){return void 0===t}function w(t){return M(t)&&"[object RegExp]"===E(t)}function M(t){return"object"==typeof t&&null!==t}function A(t){return M(t)&&"[object Date]"===E(t)}function k(t){return M(t)&&("[object Error]"===E(t)||t instanceof Error)}function T(t){return"function"==typeof t}function S(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function E(t){return Object.prototype.toString.call(t)}function L(t){return t<10?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[L(t.getHours()),L(t.getMinutes()),L(t.getSeconds())].join(":");return[t.getDate(),P[t.getMonth()],e].join(" ")}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.format=function(t){if(!b(t)){for(var e=[],r=0;r=a)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),s=n[r];r>3}if(i--,1===n||2===n)a+=t.readSVarint(),o+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new l(a,o));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&s.push(e),s},n.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;t.pos>3}if(n--,1===r||2===r)i+=t.readSVarint(),a+=t.readSVarint(),is&&(s=i),au&&(u=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,u]},n.prototype.toGeoJSON=function(t,e,r){function i(t){for(var e=0;e>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}var o=t("./vectortilefeature.js");e.exports=n,n.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new o(this._pbf,e,this.extent,this._keys,this._values)}},{"./vectortilefeature.js":529}],531:[function(t,e,r){"use strict";function n(t,e){return"object"==typeof e&&null!==e||(e={}),i(t,e.canvas||a,e.context||o,e)}e.exports=n;var i=t("./lib/vtext"),a=null,o=null;"undefined"!=typeof document&&(a=document.createElement("canvas"),a.width=8192,a.height=1024,o=a.getContext("2d"))},{"./lib/vtext":532}],532:[function(t,e,r){"use strict";function n(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l8192)throw new Error("vectorize-text: String too long (sorry, this will get fixed later)");var a=3*n;t.height>31}function l(t){for(var e=[],r=0,n=0,i=t.length,a=0;a=0?l[r]:e)}function e(t){var e=n(t);return e?u in e:s.indexOf(t)>=0}function r(t,e){var r,i=n(t);return i?i[u]=e:(r=s.indexOf(t),r>=0?l[r]=e:(r=s.length,l[r]=e,s[r]=t)),this}function o(t){var e,r,i=n(t);return i?u in i&&delete i[u]:!((e=s.indexOf(t))<0)&&(r=s.length-1,s[e]=void 0,l[e]=l[r],s[e]=s[r],s.length=r,l.length=r,!0)}this instanceof x||a();var s=[],l=[],u=b++;return Object.create(x.prototype,{get___:{value:i(t)},has___:{value:i(e)},set___:{value:i(r)},delete___:{value:i(o)}})};x.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof s?function(){function r(){function e(t,e){return c?u.has(t)?u.get(t):c.get___(t,e):u.get(t,e)}function r(t){return u.has(t)||!!c&&c.has___(t)}function n(t){var e=!!u.delete(t);return c?c.delete___(t)||e:e}this instanceof x||a();var l,u=new s,c=void 0,h=!1;return l=o?function(t,e){return u.set(t,e),u.has(t)||(c||(c=new x),c.set(t,e)),this}:function(t,e){if(h)try{u.set(t,e)}catch(r){c||(c=new x),c.set___(t,e)}else u.set(t,e);return this},Object.create(x.prototype,{get___:{value:i(e)},has___:{value:i(r)},set___:{value:i(l)},delete___:{value:i(n)},permitHostObjects___:{value:i(function(e){if(e!==t)throw new Error("bogus call to permitHostObjects___");h=!0})}})}o&&"undefined"!=typeof Proxy&&(Proxy=void 0),r.prototype=x.prototype,e.exports=r,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=x)}}()},{}],537:[function(t,e,r){function n(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:i(e,t)}}var i=t("./hidden-store.js");e.exports=n},{"./hidden-store.js":538}],538:[function(t,e,r){function n(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}e.exports=n},{}],539:[function(t,e,r){function n(){var t=i();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}var i=t("./create-store.js");e.exports=n},{"./create-store.js":537}],540:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":129}],541:[function(t,e,r){var n=arguments[3],i=arguments[4],a=arguments[5],o=JSON.stringify;e.exports=function(t,e){function r(t){g[t]=!0;for(var e in i[t][1]){var n=i[t][1][e];g[n]||r(n)}}for(var s,l=Object.keys(a),u=0,c=l.length;u=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a=n||{}}var o=p[i.year-p[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=p[a.year-p[0]];var l,u=o>>9&4095,c=o>>5&15,h=31&o,f=new Date(u,c-1,h),m=new Date(i.year,i.month-1,i.day);l=Math.round((m-f)/864e5);var g,v=d[a.year-d[0]];for(g=0;g<13;g++){var y=v&1<<12-g?30:29;if(l>13;return!b||g=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");var s;"object"==typeof n?(s=!1,a=n):(s=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:s}}var l;l=o.day-1;var u,c=d[o.year-d[0]],h=c>>13;u=h?o.month>h?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var f=0;f>9&4095,v=m>>5&15,y=31&m,b=new Date(g,v-1,y+l);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}var o=t("../main"),s=t("object-assign"),l=o.instance();n.prototype=new o.baseCalendar,s(n.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(c);return r?r[0]:""}var n=this._validateYear(t),i=t.month(),a=""+this.toChineseMonth(n,i);return e&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(t){if("string"==typeof t){var e=t.match(h);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=this.toChineseMonth(r,n),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(f);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=this.toChineseMonth(r,n),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"\u95f0"===e[0]&&(r=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var i=e[e.length-1];r="i"===i||"I"===i}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var n=this.intercalaryMonth(t);if(r&&e!==n||e<1||e>12)throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?!r&&e<=n?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(t=t.year(),e=t.month());var r=this.intercalaryMonth(t),n=r?12:11;if(e<0||e>n)throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>13},isIntercalaryMonth:function(t,e){t.year&&(t=t.year(),e=t.month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var n,i=this._validateYear(t,o.local.invalidyear),a=p[i-p[0]],s=a>>9&4095,u=a>>5&15,c=31&a;n=l.newDate(s,u,c),n.add(4-(n.dayOfWeek()||7),"d");var h=this.toJD(t,e,r)-n.toJD();return 1+Math.floor(h/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=d[t-d[0]];if(e>(r>>13?12:11))throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,s,r,o.local.invalidDate);t=this._validateYear(n.year()),e=n.month(),r=n.day();var i=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),u=a(t,s,r,i);return l.toJD(u.year,u.month,u.day)},fromJD:function(t){var e=l.fromJD(t),r=i(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(u),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var i=t.year(),a=t.month(),o=this.isIntercalaryMonth(i,a),s=this.toChineseMonth(i,a),l=Object.getPrototypeOf(n.prototype).add.call(this,t,e,r);if("y"===r){var u=l.year(),c=l.month(),h=this.isIntercalaryMonth(u,s),f=o&&h?this.toMonthIndex(u,s,!0):this.toMonthIndex(u,s,!1);f!==c&&l.month(f)}return l}});var u=/^\s*(-?\d\d\d\d|\d\d)[-\/](\d?\d)([iI]?)[-\/](\d?\d)/m,c=/^\d?\d[iI]?/m,h=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?\u6708/m,f=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;o.calendars.chinese=n;var d=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],p=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{"../main":558,"object-assign":449}],545:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Coptic",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()+(e.year()<0?1:0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),t<0&&t++,n.day()+30*(n.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),i.calendars.coptic=n},{"../main":558,"object-assign":449}],546:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,i.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n>=2&&n<=6},extraInfo:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return{century:o[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year()+(n.year()<0?1:0),e=n.month(),(r=n.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};i.calendars.discworld=n},{"../main":558,"object-assign":449}],547:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()+(e.year()<0?1:0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),t<0&&t++,n.day()+30*(n.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),i.calendars.ethiopian=n},{"../main":558,"object-assign":449}],548:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function i(t,e){return t-e*Math.floor(t/e)}var a=t("../main"),o=t("object-assign");n.prototype=new a.baseCalendar,o(n.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return t=t<0?t+1:t,i(7*t+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,a.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r) -;return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear).year(),this.toJD(t===-1?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,a.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===i(this.daysInYear(t),10)?30:9===e&&3===i(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var i=t<=0?t+1:t,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(var s=1;s=this.toJD(e===-1?1:e+1,7,1);)e++;for(var r=tthis.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),a.calendars.hebrew=n},{"../main":558,"object-assign":449}],549:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,i.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),e=n.month(),r=n.day(),t=t<=0?t+1:t,r+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),i.calendars.islamic=n},{"../main":558,"object-assign":449}],550:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()<0?e.year()+1:e.year();return t%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=e+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}}),i.calendars.julian=n},{"../main":558,"object-assign":449}],551:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function i(t,e){return t-e*Math.floor(t/e)}function a(t,e){return i(t-1,e)+1}var o=t("../main"),s=t("object-assign");n.prototype=new o.baseCalendar,s(n.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,o.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if(t=t.split("."),t.length<3)throw"Invalid Mayan year";for(var e=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,o.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate),!0},extraInfo:function(t,e,r){var n=this._validate(t,e,r,o.local.invalidDate),i=n.toJD(),a=this._toHaab(i),s=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[s[0]-1],tzolkinDay:s[0],tzolkinTrecena:s[1]}},_toHaab:function(t){t-=this.jdEpoch;var e=i(t+8+340,365);return[Math.floor(e/20)+1,i(e,20)]},_toTzolkin:function(t){return t-=this.jdEpoch,[a(t+20,20),a(t+4,13)]},toJD:function(t,e,r){var n=this._validate(t,e,r,o.local.invalidDate);return n.day()+20*n.month()+360*n.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),o.calendars.mayan=n},{"../main":558,"object-assign":449}],552:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar;var o=i.instance("gregorian");a(n.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidMonth),t=n.year();t<0&&t++;for(var a=n.day(),s=1;s=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),i.calendars.nanakshahi=n},{"../main":558,"object-assign":449}],553:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,i.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var a=i.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var u=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(t){var e=i.instance(),r=e.fromJD(t),n=r.year(),a=r.dayOfYear(),o=n+56;this._createMissingCalendarData(o);for(var s=9,l=this.NEPALI_CALENDAR_DATA[o][0],u=this.NEPALI_CALENDAR_DATA[o][s]-l+1;a>u;)s++,s>12&&(s=1,o++),u+=this.NEPALI_CALENDAR_DATA[o][s];var c=this.NEPALI_CALENDAR_DATA[o][s]-(u-a);return this.newDate(o,s,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,a.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var o=t-(t>=0?474:473),s=474+i(o,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(o/2820)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=t-this.toJD(475,1,1),r=Math.floor(e/1029983),n=i(e,1029983),a=2820;if(1029982!==n){var o=Math.floor(n/366),s=i(n,366);a=Math.floor((2134*o+2816*s+2815)/1028522)+o+1}var l=a+2820*r+474;l=l<=0?l-1:l;var u=t-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),h=t-this.toJD(l,c,1)+1;return this.newDate(l,c,h)}}),a.calendars.persian=n,a.calendars.jalali=n},{"../main":558,"object-assign":449}],555:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign"),o=i.instance();n.prototype=new i.baseCalendar,a(n.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(e.year());return o.leapYear(t)},weekOfYear:function(t,e,r){var n=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(n.year());return o.weekOfYear(t,n.month(),n.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),t=this._t2gYear(n.year());return o.toJD(t,n.month(),n.day())},fromJD:function(t){var e=o.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),i.calendars.taiwan=n},{"../main":558,"object-assign":449}],556:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign"),o=i.instance();n.prototype=new i.baseCalendar,a(n.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(e.year());return o.leapYear(t)},weekOfYear:function(t,e,r){var n=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(n.year());return o.weekOfYear(t,n.month(),n.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),t=this._t2gYear(n.year());return o.toJD(t,n.month(),n.day())},fromJD:function(t){var e=o.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),i.calendars.thai=n},{"../main":558,"object-assign":449}],557:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,i.local.invalidMonth),n=r.toJD()-24e5+.5,a=0,s=0;sn)return o[a]-o[a-1];a++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),a=12*(n.year()-1)+n.month()-15292;return n.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,u=e-o[r-1]+1;return this.newDate(s,l,u)},isValid:function(t,e,r){var n=i.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(t=null!=t.year?t.year:t,n=t>=1276&&t<=1500),n},_validate:function(t,e,r,n){var a=i.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}}),i.calendars.ummalqura=n -;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":558,"object-assign":449}],558:[function(t,e,r){function n(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(t,e){return t=""+t,"000000".substring(0,e-t.length)+t}function o(){this.shortYearCutoff="+10"}function s(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}var l=t("object-assign");l(n.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,i){return n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance(),n.newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,function(e){return t[e]})}},substituteChineseDigits:function(t,e){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),l(i.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),l(o.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new i(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+a(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0),i=t.day();"y"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(!function(t){for(;oe-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),i="m"===r?e:t.month(),a="d"===r?e:t.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var u=e.exports=new n;u.cdate=i,u.baseCalendar=o,u.calendars.gregorian=s},{"object-assign":449}],559:[function(t,e,r){var n=t("object-assign"),i=t("./main");n(i.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),i.local=i.regionalOptions[""],n(i.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.monthNumbers||this.local.monthNumbers,s=r.monthNamesShort||this.local.monthNamesShort,l=r.monthNames||this.local.monthNames,u=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;g+n1}),c=function(t,e,r,n){var i=""+e;if(u(t,n))for(;i.length1},b=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=e.substring(M).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=s[0].length,parseInt(s[0],10)},x=this,_=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s-1){d=1,p=m;for(var T=this.daysInMonth(f,d);p>T;T=this.daysInMonth(f,d))d++,p-=T}return h>-1?this.fromJD(h):this.newDate(f,d,p)},determineDate:function(t,e,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return e=e?e.newDate():null,t=null==t?e:"string"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}t=t.toLowerCase();for(var e=(t.match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||1/0===t||t===-1/0?e:a.today().add(t,"d"):a.newDate(t)}})},{"./main":558,"object-assign":449}],560:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}", -args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":100}],561:[function(t,e,r){"use strict";function n(t,e){var r=[];return e=+e||0,i(t.hi(t.shape[0]-1),r,e),r}e.exports=n;var i=t("./lib/zc-core")},{"./lib/zc-core":560}],562:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../color"),a=t("../../plots/cartesian/axes"),o=t("./attributes");e.exports=function(t,e,r,s,l){function u(r,i){return n.coerce(t,e,o,r,i)}s=s||{},l=l||{};var c=u("visible",!l.itemIsNotPlainObject),h=u("clicktoshow");if(!c&&!h)return e;u("opacity"),u("align"),u("bgcolor");var f=u("bordercolor"),d=i.opacity(f);u("borderpad");var p=u("borderwidth"),m=u("showarrow");u("text",m?" ":"new text"),u("textangle"),n.coerceFont(u,"font",r.font);for(var g=["x","y"],v=[-10,-30],y={_fullLayout:r},b=0;b<2;b++){var x=g[b],_=a.coerceRef(t,e,y,x,"","paper");if(a.coercePosition(e,y,u,_,x,.5),m){var w="a"+x,M=a.coerceRef(t,e,y,w,"pixel");"pixel"!==M&&M!==_&&(M=e[w]="pixel");var A="pixel"===M?v[b]:.4;a.coercePosition(e,y,u,M,w,A)}u(x+"anchor")}if(n.noneOrAll(t,e,["x","y"]),m&&(u("arrowcolor",d?e.bordercolor:i.defaultLine),u("arrowhead"),u("arrowsize"),u("arrowwidth",2*(d&&p||1)),u("standoff"),n.noneOrAll(t,e,["ax","ay"])),h){var k=u("xclick"),T=u("yclick");e._xclick=void 0===k?e.x:k,e._yclick=void 0===T?e.y:T}return e}},{"../../lib":680,"../../plots/cartesian/axes":719,"../color":575,"./attributes":564}],563:[function(t,e,r){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0},{path:"M2,2V-2H-2V2Z",backoff:0}]},{}],564:[function(t,e,r){"use strict";var n=t("./arrow_paths"),i=t("../../plots/font_attributes"),a=t("../../plots/cartesian/constants"),o=t("../../lib/extend").extendFlat;e.exports={_isLinkedToArray:"annotation",visible:{valType:"boolean",dflt:!0},text:{valType:"string"},textangle:{valType:"angle",dflt:0},font:o({},i,{}),opacity:{valType:"number",min:0,max:1,dflt:1},align:{valType:"enumerated",values:["left","center","right"],dflt:"center"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)"},borderpad:{valType:"number",min:0,dflt:1},borderwidth:{valType:"number",min:0,dflt:1},showarrow:{valType:"boolean",dflt:!0},arrowcolor:{valType:"color"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1},arrowsize:{valType:"number",min:.3,dflt:1},arrowwidth:{valType:"number",min:.1},standoff:{valType:"number",min:0,dflt:0},ax:{valType:"any"},ay:{valType:"any"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()]},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()]},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()]},x:{valType:"any"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()]},y:{valType:"any"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1},xclick:{valType:"any"},yclick:{valType:"any"},_deprecated:{ref:{valType:"string"}}}},{"../../lib/extend":672,"../../plots/cartesian/constants":724,"../../plots/font_attributes":739,"./arrow_paths":563}],565:[function(t,e,r){"use strict";function n(t){var e=t._fullLayout;i.filterVisible(e.annotations).forEach(function(e){var r=a.getFromId(t,e.xref),n=a.getFromId(t,e.yref),i=3*e.arrowsize*e.arrowwidth||0;r&&r.autorange&&(e.axref===e.xref?(a.expand(r,[r.r2c(e.x)],{ppadplus:i,ppadminus:i}),a.expand(r,[r.r2c(e.ax)],{ppadplus:e._xpadplus,ppadminus:e._xpadminus})):a.expand(r,[r.r2c(e.x)],{ppadplus:Math.max(e._xpadplus,i),ppadminus:Math.max(e._xpadminus,i)})),n&&n.autorange&&(e.ayref===e.yref?(a.expand(n,[n.r2c(e.y)],{ppadplus:i,ppadminus:i}),a.expand(n,[n.r2c(e.ay)],{ppadplus:e._ypadplus,ppadminus:e._ypadminus})):a.expand(n,[n.r2c(e.y)],{ppadplus:Math.max(e._ypadplus,i),ppadminus:Math.max(e._ypadminus,i)}))})}var i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./draw").draw;e.exports=function(t){var e=t._fullLayout,r=i.filterVisible(e.annotations);if(r.length&&t._fullData.length){var s={};r.forEach(function(t){s[t.xref]=!0,s[t.yref]=!0});if(a.list(t).filter(function(t){return t.autorange&&s[t._id]}).length)return i.syncOrAsync([o,n],t)}}},{"../../lib":680,"../../plots/cartesian/axes":719,"./draw":569}],566:[function(t,e,r){"use strict";function n(t,e){var r=a(t,e);return r.on.length>0||r.explicitOff.length>0}function i(t,e){var r,n=a(t,e),i=n.on,s=n.off.concat(n.explicitOff),l={};if(i.length||s.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}z.selectAll("tspan.line").attr({y:0,x:0});var n=T.select(".annotation-math-group"),i=!n.empty(),d=f.bBox((i?n:z).node()),y=d.width,E=d.height,D=Math.round(y+2*L),I=Math.round(E+2*L);b._w=y,b._h=E;var P=!1;if(["x","y"].forEach(function(e){var n,i,a,o,s,h=b[e+"ref"]||e,f=b["a"+e+"ref"],d=c.getFromId(t,h),p=(M+("x"===e?0:-90))*Math.PI/180,m=D*Math.cos(p),g=I*Math.sin(p),y=Math.abs(m)+Math.abs(g),x=b[e+"anchor"],_=w[e];if(d){var A=d.r2fraction(b[e]);if((t._dragging||!d.autorange)&&(A<0||A>1)&&(f===h?((A=d.r2fraction(b["a"+e]))<0||A>1)&&(P=!0):P=!0,P))return;n=d._offset+d.r2p(b[e]),o=.5}else"x"===e?(a=b[e],n=v.l+v.w*a):(a=1-b[e],n=v.t+v.h*a),o=b.showarrow?.5:a;if(b.showarrow){_.head=n;var k=b["a"+e];s=m*r(.5,b.xanchor)-g*r(.5,b.yanchor),f===h?(_.tail=d._offset+d.r2p(k),i=s):(_.tail=n+k,i=s+k),_.text=_.tail+s;var T=l["x"===e?"width":"height"];if("paper"===h&&(_.head=u.constrain(_.head,1,T-1)),"pixel"===f){var S=-Math.max(_.tail-3,_.text),E=Math.min(_.tail+3,_.text)-T;S>0?(_.tail+=S,_.text+=S):E>0&&(_.tail-=E,_.text-=E)}}else s=y*r(o,x),i=s,_.text=n+s;b["_"+e+"padplus"]=y/2+i,b["_"+e+"padminus"]=y/2-i,b["_"+e+"size"]=y,b["_"+e+"shift"]=s}),P)return void T.remove();if(i)n.select("svg").attr({x:L-1,y:L});else{var O=L-d.top,R=L-d.left;z.attr({x:R,y:O}),z.selectAll("tspan.line").attr({y:O,x:R})}C.call(f.setRect,S/2,S/2,D-S,I-S),T.call(f.setTranslate,Math.round(w.x.text-D/2),Math.round(w.y.text-I/2)),k.attr({transform:"rotate("+M+","+w.x.text+","+w.y.text+")"});var j="annotations["+e+"]",F=function(r,n){o.select(t).selectAll('.annotation-arrow-g[data-index="'+e+'"]').remove();var i=w.x.head,l=w.y.head,c=w.x.tail+r,d=w.y.tail+n,p=w.x.text+r,y=w.y.text+n,S=u.rotationXYMatrix(M,p,y),E=u.apply2DTransform(S),L=u.apply2DTransform2(S),D=+C.attr("width"),z=+C.attr("height"),I=p-.5*D,P=I+D,O=y-.5*z,R=O+z,F=[[I,O,I,R],[I,R,P,R],[P,R,P,O],[P,O,I,O]].map(L);if(!F.reduce(function(t,e){return t^!!a(i,l,i+1e6,l+1e6,e[0],e[1],e[2],e[3])},!1)){F.forEach(function(t){var e=a(c,d,i,l,t[0],t[1],t[2],t[3]);e&&(c=e.x,d=e.y)});var N=b.arrowwidth,B=b.arrowcolor,U=A.append("g").style({opacity:h.opacity(B)}).classed("annotation-arrow-g",!0).attr("data-index",String(e)),V=U.append("path").attr("d","M"+c+","+d+"L"+i+","+l).style("stroke-width",N+"px").call(h.stroke,h.rgb(B));if(g(V,b.arrowhead,"end",b.arrowsize,b.standoff),t._context.editable&&V.node().parentNode){var H=i,q=l;if(b.standoff){var G=Math.sqrt(Math.pow(i-c,2)+Math.pow(l-d,2));H+=b.standoff*(c-i)/G,q+=b.standoff*(d-l)/G}var Y,W,X,Z=U.append("path").classed("annotation",!0).classed("anndrag",!0).attr({"data-index":String(e),d:"M3,3H-3V-3H3ZM0,0L"+(c-H)+","+(d-q),transform:"translate("+H+","+q+")"}).style("stroke-width",N+6+"px").call(h.stroke,"rgba(0,0,0,0)").call(h.fill,"rgba(0,0,0,0)");m.init({element:Z.node(),prepFn:function(){var t=f.getTranslate(T);W=t.x,X=t.y,Y={},x&&x.autorange&&(Y[x._name+".autorange"]=!0),_&&_.autorange&&(Y[_._name+".autorange"]=!0)},moveFn:function(t,e){var r=E(W,X),n=r[0]+t,a=r[1]+e;T.call(f.setTranslate,n,a),Y[j+".x"]=x?x.p2r(x.r2p(b.x)+t):(i+t-v.l)/v.w,Y[j+".y"]=_?_.p2r(_.r2p(b.y)+e):1-(l+e-v.t)/v.h,b.axref===b.xref&&(Y[j+".ax"]=x?x.p2r(x.r2p(b.ax)+t):(i+t-v.l)/v.w),b.ayref===b.yref&&(Y[j+".ay"]=_?_.p2r(_.r2p(b.ay)+e):1-(l+e-v.t)/v.h),U.attr("transform","translate("+t+","+e+")"),k.attr({transform:"rotate("+M+","+n+","+a+")"})},doneFn:function(e){if(e){s.relayout(t,Y);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}};if(b.showarrow&&F(0,0),t._context.editable){var N,B;m.init({element:T.node(),prepFn:function(){B=k.attr("transform"),N={}},moveFn:function(t,e){var r="pointer";if(b.showarrow)b.axref===b.xref?N[j+".ax"]=x.p2r(x.r2p(b.ax)+t):N[j+".ax"]=b.ax+t,b.ayref===b.yref?N[j+".ay"]=_.p2r(_.r2p(b.ay)+e):N[j+".ay"]=b.ay+e,F(t,e);else{if(x)N[j+".x"]=b.x+t/x._m;else{var n=b._xsize/v.w,i=b.x+b._xshift/v.w-n/2;N[j+".x"]=m.align(i+t/v.w,n,0,1,b.xanchor)}if(_)N[j+".y"]=b.y+e/_._m;else{var a=b._ysize/v.h,o=b.y-b._yshift/v.h-a/2;N[j+".y"]=m.align(o-e/v.h,a,0,1,b.yanchor)}x&&_||(r=m.getCursor(x?.5:N[j+".x"],_?.5:N[j+".y"],b.xanchor,b.yanchor))}k.attr({transform:"translate("+t+","+e+")"+B}),p(T,r)},doneFn:function(e){if(p(T),e){s.relayout(t,N);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}var i=t.layout,l=t._fullLayout,v=t._fullLayout._size;l._infolayer.selectAll('.annotation[data-index="'+e+'"]').remove();var y=(i.annotations||[])[e],b=l.annotations[e];if(y&&b.visible!==!1){var x=c.getFromId(t,b.xref),_=c.getFromId(t,b.yref),w={x:{},y:{}},M=+b.textangle||0,A=l._infolayer.append("g").classed("annotation",!0).attr("data-index",String(e)).style("opacity",b.opacity).on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",{index:e,annotation:y,fullAnnotation:b})}),k=A.append("g").classed("annotation-text-g",!0).attr("data-index",String(e)),T=k.append("g"),S=b.borderwidth,E=b.borderpad,L=S+E,C=T.append("rect").attr("class","bg").style("stroke-width",S+"px").call(h.stroke,b.bordercolor).call(h.fill,b.bgcolor),D=b.font,z=T.append("text").classed("annotation",!0).attr("data-unformatted",b.text).text(b.text);t._context.editable?z.call(d.makeEditable,T).call(r).on("edit",function(n){b.text=n,this.attr({"data-unformatted":b.text}),this.call(r);var i={};i["annotations["+e+"].text"]=b.text,x&&x.autorange&&(i[x._name+".autorange"]=!0),_&&_.autorange&&(i[_._name+".autorange"]=!0),s.relayout(t,i)}):z.call(r)}}function a(t,e,r,n,i,a,o,s){var l=r-t,u=i-t,c=o-i,h=n-e,f=a-e,d=s-a,p=l*d-c*h;if(0===p)return null;var m=(u*d-c*f)/p,g=(u*h-l*f)/p;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+h*m}}var o=t("d3"),s=t("../../plotly"),l=t("../../plots/plots"),u=t("../../lib"),c=t("../../plots/cartesian/axes"),h=t("../color"),f=t("../drawing"),d=t("../../lib/svg_text_utils"),p=t("../../lib/setcursor"),m=t("../dragelement"),g=t("./draw_arrow_head");e.exports={draw:n,drawOne:i}},{"../../lib":680,"../../lib/setcursor":695,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../color":575,"../dragelement":596,"../drawing":598,"./draw_arrow_head":570,d3:104}],570:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("../color"),o=t("../drawing"),s=t("./arrow_paths");e.exports=function(t,e,r,l,u){function c(){t.style("stroke-dasharray","0px,100px")}function h(r,i){d.path&&(e>5&&(i=0),n.select(f.parentElement).append("path").attr({class:t.attr("class"),d:d.path,transform:"translate("+r.x+","+r.y+")rotate("+180*i/Math.PI+")scale("+y+")"}).style({fill:b,opacity:x,"stroke-width":0}))}i(l)||(l=1);var f=t.node(),d=s[e||0];"string"==typeof r&&r||(r="end");var p,m,g,v,y=(o.getPx(t,"stroke-width")||1)*l,b=t.style("stroke")||a.defaultLine,x=t.style("stroke-opacity")||1,_=r.indexOf("start")>=0,w=r.indexOf("end")>=0,M=d.backoff*y+u;if("line"===f.nodeName){p={x:+t.attr("x1"),y:+t.attr("y1")},m={x:+t.attr("x2"),y:+t.attr("y2")};var A=p.x-m.x,k=p.y-m.y;if(g=Math.atan2(k,A),v=g+Math.PI,M){if(M*M>A*A+k*k)return void c();var T=M*Math.cos(g),S=M*Math.sin(g);_&&(p.x-=T,p.y-=S,t.attr({x1:p.x,y1:p.y})),w&&(m.x+=T,m.y+=S,t.attr({x2:m.x,y2:m.y}))}}else if("path"===f.nodeName){var E=f.getTotalLength(),L="";if(E=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}var i=t("tinycolor2"),a=t("fast-isnumeric"),o=e.exports={},s=t("./attributes");o.defaults=s.defaults,o.defaultLine=s.defaultLine,o.lightLine=s.lightLine,o.background=s.background,o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(i(t))},o.opacity=function(t){return t?i(t).getAlpha():0},o.addOpacity=function(t,e){var r=i(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=i(t).toRgb();if(1===r.a)return i(t).toRgbString();var n=i(e||o.background).toRgb(),a=1===n.a?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},s={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return i(s).toRgbString()},o.contrast=function(t,e,r){var n=i(t);return(n.isLight()?n.darken(r):n.lighten(e)).toString()},o.stroke=function(t,e){var r=i(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=i(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,i,a,s=Object.keys(t);for(e=0;es&&(a[1]-=(st-s)/2):r.node()&&!r.classed("js-placeholder")&&(st=d.bBox(e.node()).height),st){if(st+=5,"top"===_.titleside)$.domain[1]-=st/T.h,a[1]*=-1;else{$.domain[0]+=st/T.h;var u=Math.max(1,r.selectAll("tspan.line").size());a[1]+=(1-u)*s}e.attr("transform","translate("+a+")"),$.setScale()}}at.selectAll(".cbfills,.cblines,.cbaxis").attr("transform","translate(0,"+Math.round(T.h*(1-$.domain[1]))+")");var h=at.select(".cbfills").selectAll("rect.cbfill").data(C);h.enter().append("rect").classed("cbfill",!0).style("stroke","none"),h.exit().remove(),h.each(function(t,e){var r=[0===e?E[0]:(C[e]+C[e-1])/2,e===C.length-1?E[1]:(C[e]+C[e+1])/2].map($.c2p).map(Math.round);e!==C.length-1&&(r[1]+=r[1]>r[0]?1:-1);var a=z(t).replace("e-",""),o=i(a).toHexString();n.select(this).attr({x:W,width:Math.max(B,2),y:n.min(r),height:Math.max(n.max(r)-n.min(r),2),fill:o})});var f=at.select(".cblines").selectAll("path.cbline").data(_.line.color&&_.line.width?L:[]);return f.enter().append("path").classed("cbline",!0),f.exit().remove(),f.each(function(t){n.select(this).attr("d","M"+W+","+(Math.round($.c2p(t))+_.line.width/2%1)+"h"+B).call(d.lineGroupStyle,_.line.width,D(t),_.line.dash)}),$._axislayer.selectAll("g."+$._id+"tick,path").remove(),$._pos=W+B+(_.outlinewidth||0)/2-("outside"===_.ticks?1:0),$.side="right",c.syncOrAsync([function(){return l.doTicks(t,$,!0)},function(){if(["top","bottom"].indexOf(_.titleside)===-1){var e=$.titlefont.size,r=$._offset+$._length/2,i=T.l+($.position||0)*T.w+("right"===$.side?10+e*($.showticklabels?1:.5):-10-e*($.showticklabels?.5:0));M("h"+$._id+"title",{avoid:{selection:n.select(t).selectAll("g."+$._id+"tick"),side:_.titleside,offsetLeft:T.l,offsetTop:T.t,maxShift:k.width},attributes:{x:i,y:r,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}}])}function M(e,r){var n,i=x();n=s.traceIs(i,"markerColorscale")?"marker.colorbar.title":"colorbar.title";var a={propContainer:$,propName:n,traceIndex:i.index,dfltName:"colorscale",containerGroup:at.select(".cbtitle")},o="h"===e.charAt(0)?e.substr(1):"h"+e;at.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(t,e,h(a,r||{}))}function A(){var r=B+_.outlinewidth/2+d.bBox($._axislayer.node()).width;if(j=ot.select("text"),j.node()&&!j.classed("js-placeholder")){var n,i=ot.select(".h"+$._id+"title-math-group").node();n=i&&["top","bottom"].indexOf(_.titleside)!==-1?d.bBox(i).width:d.bBox(ot.node()).right-W-T.l,r=Math.max(r,n)}var a=2*_.xpad+r+_.borderwidth+_.outlinewidth/2,s=J-K;at.select(".cbbg").attr({x:W-_.xpad-(_.borderwidth+_.outlinewidth)/2,y:K-G,width:Math.max(a,2),height:Math.max(s+2*G,2)}).call(p.fill,_.bgcolor).call(p.stroke,_.bordercolor).style({"stroke-width":_.borderwidth}),at.selectAll(".cboutline").attr({x:W,y:K+_.ypad+("top"===_.titleside?st:0),width:Math.max(B,2),height:Math.max(s-2*_.ypad-st,2)}).call(p.stroke,_.outlinecolor).style({fill:"None","stroke-width":_.outlinewidth});var l=({center:.5,right:1}[_.xanchor]||0)*a;at.attr("transform","translate("+(T.l-l)+","+T.t+")"),o.autoMargin(t,e,{x:_.x,y:_.y,l:a*({right:1,center:.5}[_.xanchor]||0),r:a*({left:1,center:.5}[_.xanchor]||0),t:s*({bottom:1,middle:.5}[_.yanchor]||0),b:s*({top:1,middle:.5}[_.yanchor]||0)})}var k=t._fullLayout,T=k._size;if("function"!=typeof _.fillcolor&&"function"!=typeof _.line.color)return void k._infolayer.selectAll("g."+e).remove();var S,E=n.extent(("function"==typeof _.fillcolor?_.fillcolor:_.line.color).domain()),L=[],C=[],D="function"==typeof _.line.color?_.line.color:function(){return _.line.color},z="function"==typeof _.fillcolor?_.fillcolor:function(){return _.fillcolor},I=_.levels.end+_.levels.size/100,P=_.levels.size,O=1.001*E[0]-.001*E[1],R=1.001*E[1]-.001*E[0];for(S=_.levels.start;(S-I)*P<0;S+=P)S>O&&SE[0]&&S1){var it=Math.pow(10,Math.floor(Math.log(nt)/Math.LN10));et*=it*c.roundUp(nt/it,[2,5,10]),(Math.abs(_.levels.start)/_.levels.size+1e-6)%1<2e-6&&($.tick0=0)}$.dtick=et}$.domain=[Z+Y,Z+H-Y],$.setScale();var at=k._infolayer.selectAll("g."+e).data([0]);at.enter().append("g").classed(e,!0).each(function(){var t=n.select(this);t.append("rect").classed("cbbg",!0),t.append("g").classed("cbfills",!0),t.append("g").classed("cblines",!0),t.append("g").classed("cbaxis",!0).classed("crisp",!0),t.append("g").classed("cbtitleunshift",!0).append("g").classed("cbtitle",!0),t.append("rect").classed("cboutline",!0),t.select(".cbtitle").datum(0)}),at.attr("transform","translate("+Math.round(T.l)+","+Math.round(T.t)+")");var ot=at.select(".cbtitleunshift").attr("transform","translate(-"+Math.round(T.l)+",-"+Math.round(T.t)+")");$._axislayer=at.select(".cbaxis");var st=0;if(["top","bottom"].indexOf(_.titleside)!==-1){var lt,ut=T.l+(_.x+q)*T.w,ct=$.titlefont.size;lt="top"===_.titleside?(1-(Z+H-Y))*T.h+T.t+3+.75*ct:(1-(Z+Y))*T.h+T.t-3-.25*ct,M($._id+"title",{attributes:{x:ut,y:lt,"text-anchor":"start"}})}var ht=c.syncOrAsync([o.previousPromises,w,o.previousPromises,A],t);if(ht&&ht.then&&(t._promises||[]).push(ht),t._context.editable){var ft,dt,pt;u.init({element:at.node(),prepFn:function(){ft=at.attr("transform"),f(at)},moveFn:function(t,e){at.attr("transform",ft+" translate("+t+","+e+")"),dt=u.align(X+t/T.w,U,0,1,_.xanchor),pt=u.align(Z-e/T.h,H,0,1,_.yanchor);var r=u.getCursor(dt,pt,_.xanchor,_.yanchor);f(at,r)},doneFn:function(e){f(at),e&&void 0!==dt&&void 0!==pt&&a.restyle(t,{"colorbar.x":dt,"colorbar.y":pt},x().index)}})}return ht}function x(){var r,n,i=e.substr(2);for(r=0;r=0?i.Reds:i.Blues,l.colorscale=m,s.reversescale&&(m=a(m)),s.colorscale=m)}},{"../../lib":680,"./flip_scale":586,"./scales":593}],582:[function(t,e,r){"use strict";var n=t("./attributes"),i=t("../../lib/extend").extendDeep;t("./scales.js");e.exports=function(t){return{color:{valType:"color",arrayOk:!0},colorscale:i({},n.colorscale,{}),cauto:i({},n.zauto,{}),cmax:i({},n.zmax,{}),cmin:i({},n.zmin,{}),autocolorscale:i({},n.autocolorscale,{}),reversescale:i({},n.reversescale,{})}}},{"../../lib/extend":672,"./attributes":580,"./scales.js":593}],583:[function(t,e,r){"use strict";var n=t("./scales");e.exports=n.RdBu},{"./scales":593}],584:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../colorbar/has_colorbar"),o=t("../colorbar/defaults"),s=t("./is_valid_scale"),l=t("./flip_scale");e.exports=function(t,e,r,u,c){var h=c.prefix,f=c.cLetter,d=h.slice(0,h.length-1),p=h?i.nestedProperty(t,d).get()||{}:t,m=h?i.nestedProperty(e,d).get()||{}:e,g=p[f+"min"],v=p[f+"max"],y=p.colorscale;u(h+f+"auto",!(n(g)&&n(v)&&g=0;i--,a++)e=t[i],n[a]=[1-e[0],e[1]];return n}},{}],587:[function(t,e,r){"use strict";var n=t("./scales"),i=t("./default_scale"),a=t("./is_valid_scale_array");e.exports=function(t,e){function r(){try{t=n[t]||JSON.parse(t)}catch(r){t=e}}return e||(e=i),t?("string"==typeof t&&(r(),"string"==typeof t&&r()),a(t)?t:e):e}},{"./default_scale":583,"./is_valid_scale_array":591,"./scales":593}],588:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("./is_valid_scale");e.exports=function(t,e){var r=e?i.nestedProperty(t,e).get()||{}:t,o=r.color,s=!1;if(Array.isArray(o))for(var l=0;l4/3-s?o:s}},{}],595:[function(t,e,r){"use strict";var n=t("../../lib"),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},{"../../lib":680}],596:[function(t,e,r){"use strict";function n(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function i(t){t._dragging=!1,t._replotPending&&a.plot(t)}var a=t("../../plotly"),o=t("../../lib"),s=t("../../plots/cartesian/constants"),l=t("../../constants/interactions"),u=e.exports={};u.align=t("./align"),u.getCursor=t("./cursor");var c=t("./unhover");u.unhover=c.wrapped,u.unhoverRaw=c.raw,u.init=function(t){function e(e){return t.element.onmousemove=m,g._dragged=!1,g._dragging=!0,c=e.clientX,h=e.clientY,p=e.target,f=(new Date).getTime(),f-g._mouseDownTimey&&(v=Math.max(v-1,1)),t.doneFn&&t.doneFn(g._dragged,v,e),!g._dragged){var r=document.createEvent("MouseEvents");r.initEvent("click",!0,!0),p.dispatchEvent(r)}return i(g),g._dragged=!1,o.pauseEvent(e)}var c,h,f,d,p,m,g=o.getPlotDiv(t.element)||{},v=1,y=l.DBLCLICKDELAY;g._mouseDownTime||(g._mouseDownTime=0),m=t.element.onmousemove,t.setCursor&&(t.element.onmousemove=t.setCursor),t.element.onmousedown=e,t.element.style.pointerEvents="all"},u.coverSlip=n},{"../../constants/interactions":661,"../../lib":680,"../../plotly":714,"../../plots/cartesian/constants":724,"./align":594,"./cursor":595,"./unhover":597}],597:[function(t,e,r){"use strict";var n=t("../../lib/events"),i=e.exports={};i.wrapped=function(t,e,r){"string"==typeof t&&(t=document.getElementById(t)),t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),i.raw(t,e,r)},i.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&n.triggerHandler(t,"plotly_beforehover",e)===!1||(r._hoverlayer.selectAll("g").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{points:i}))}},{"../../lib/events":671}],598:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){if(s.traceIs(r,"symbols")){var u=p(r);e.attr("d",function(t){var e;e="various"===t.ms||"various"===a.size?3:d.isBubble(r)?u(t.ms):(a.size||6)/2,t.mrc=e;var n=m.symbolNumber(t.mx||a.symbol)||0,i=n%100;return t.om=n%200>=100,m.symbolFuncs[i](e)+(n>=200?y:"")}).style("opacity",function(t){return(t.mo+1||a.opacity+1)-1})}var c,h,f;t.so?(f=o.outlierwidth,h=o.outliercolor,c=a.outliercolor):(f=(t.mlw+1||o.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,h="mlc"in t?t.mlcc=i(t.mlc):Array.isArray(o.color)?l.defaultLine:o.color,c="mc"in t?t.mcc=n(t.mc):Array.isArray(a.color)?l.defaultLine:a.color||"rgba(0,0,0,0)"),t.om?e.call(l.stroke,c).style({"stroke-width":(f||1)+"px",fill:"none"}):(e.style("stroke-width",f+"px").call(l.fill,c),f&&e.call(l.stroke,h))}function i(t,e,r,n){var i=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],u=Math.pow(i*i+o*o,x/2),c=Math.pow(s*s+l*l,x/2),h=(c*c*i-u*u*s)*n,f=(c*c*o-u*u*l)*n,d=3*c*(u+c),p=3*u*(u+c);return[[a.round(e[0]+(d&&h/d),2),a.round(e[1]+(d&&f/d),2)],[a.round(e[0]-(p&&h/p),2),a.round(e[1]-(p&&f/p),2)]]}var a=t("d3"),o=t("fast-isnumeric"),s=t("../../registry"),l=t("../color"),u=t("../colorscale"),c=t("../../lib"),h=t("../../lib/svg_text_utils"),f=t("../../constants/xmlns_namespaces"),d=t("../../traces/scatter/subtypes"),p=t("../../traces/scatter/make_bubble_size_func"),m=e.exports={};m.font=function(t,e,r,n){e&&e.family&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(l.fill,n)},m.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},m.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},m.setRect=function(t,e,r,n,i){t.call(m.setPosition,e,r).call(m.setSize,n,i)},m.translatePoint=function(t,e,r,n){var i=t.xp||r.c2p(t.x),a=t.yp||n.c2p(t.y);o(i)&&o(a)&&e.node()?"text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform","translate("+i+","+a+")"):e.remove()},m.translatePoints=function(t,e,r,n){t.each(function(t){var i=a.select(this);m.translatePoint(t,i,e,r,n)})},m.getPx=function(t,e){return Number(t.style(e).replace(/px$/,""))},m.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},m.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";l.stroke(e,n||a.color),m.dashLine(e,s,o)},m.lineGroupStyle=function(t,e,r,n){t.style("fill","none").each(function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},o=e||i.width||0,s=n||i.dash||"";a.select(this).call(l.stroke,r||i.color).call(m.dashLine,s,o)})},m.dashLine=function(t,e,r){r=+r||0;var n=Math.max(r,3);"solid"===e?e="":"dot"===e?e=n+"px,"+n+"px":"dash"===e?e=3*n+"px,"+3*n+"px":"longdash"===e?e=5*n+"px,"+5*n+"px":"dashdot"===e?e=3*n+"px,"+n+"px,"+n+"px,"+n+"px":"longdashdot"===e&&(e=5*n+"px,"+2*n+"px,"+n+"px,"+2*n+"px"),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},m.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(e){var r=a.select(this);try{r.call(l.fill,e[0].trace.fillcolor)}catch(e){c.error(e,t),r.remove()}})};var g=t("./symbol_defs");m.symbolNames=[],m.symbolFuncs=[],m.symbolNeedLines={},m.symbolNoDot={},m.symbolList=[],Object.keys(g).forEach(function(t){var e=g[t];m.symbolList=m.symbolList.concat([e.n,t,e.n+100,t+"-open"]),m.symbolNames[e.n]=t,m.symbolFuncs[e.n]=e.f,e.needLine&&(m.symbolNeedLines[e.n]=!0),e.noDot?m.symbolNoDot[e.n]=!0:m.symbolList=m.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"])});var v=m.symbolNames.length,y="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";m.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=m.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=v||t>=400?0:Math.floor(Math.max(t,0))},m.singlePointStyle=function(t,e,r){var i=r.marker,a=i.line;n(t,e,r,m.tryColorscale(i,""),m.tryColorscale(i,"line"),i,a)},m.pointStyle=function(t,e){if(t.size()){var r=e.marker,n=m.tryColorscale(r,""),i=m.tryColorscale(r,"line");t.each(function(t){m.singlePointStyle(t,a.select(this),e,n,i)})}},m.tryColorscale=function(t,e){var r=e?c.nestedProperty(t,e).get():t,n=r.colorscale,i=r.color;return n&&Array.isArray(i)?u.makeColorScaleFunc(u.extractScale(n,r.cmin,r.cmax)):c.identity};var b={start:1,end:-1,middle:0,bottom:1,top:-1};m.textPointStyle=function(t,e){t.each(function(t){var r=a.select(this),n=t.tx||e.text;if(!n||Array.isArray(n))return void r.remove();var i=t.tp||e.textposition,s=i.indexOf("top")!==-1?"top":i.indexOf("bottom")!==-1?"bottom":"middle",l=i.indexOf("left")!==-1?"end":i.indexOf("right")!==-1?"start":"middle",u=t.ts||e.textfont.size,c=t.mrc?t.mrc/.8+1:0;u=o(u)&&u>0?u:0,r.call(m.font,t.tf||e.textfont.family,u,t.tc||e.textfont.color).attr("text-anchor",l).text(n).call(h.convertToTspans);var f=a.select(this.parentNode),d=r.selectAll("tspan.line"),p=1.3*((d[0].length||1)-1)+1,g=b[l]*c,v=.75*u+b[s]*c+(b[s]-1)*p*u/2;f.attr("transform","translate("+g+","+v+")"),p>1&&d.attr({x:r.attr("x"),y:r.attr("y")})})};var x=.5;m.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],a=[];for(r=1;r=1e4&&(a.selectAll("[data-bb]").attr("data-bb",null),M=[]),t.setAttribute("data-bb",M.length),M.push(l),c.extendFlat({},l)},m.setClipUrl=function(t,e){if(!e)return void t.attr("clip-path",null);var r="#"+e,n=a.select("base");n.size()&&n.attr("href")&&(r=window.location.href.split("#")[0]+r),t.attr("clip-path","url("+r+")")},m.getTranslate=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}},m.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a+=" translate("+e+", "+r+")",a=a.trim(),t[i]("transform",a),a},m.getScale=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}},m.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a+=" scale("+e+", "+r+")",a=a.trim(),t[i]("transform",a),a},m.setPointGroupScale=function(t,e,r){var n,i,a;return e=e||1,r=r||1,i=1===e&&1===r?"":" scale("+e+","+r+")",a=/\s*sc.*/,t.each(function(){n=(this.getAttribute("transform")||"").replace(a,""),n+=i,n=n.trim(),this.setAttribute("transform",n)}),i}},{"../../constants/xmlns_namespaces":664,"../../lib":680,"../../lib/svg_text_utils":699,"../../registry":793,"../../traces/scatter/make_bubble_size_func":939,"../../traces/scatter/subtypes":944,"../color":575,"../colorscale":589,"./symbol_defs":599,d3:104,"fast-isnumeric":113}],599:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,i="l"+e+",-"+e,a="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+i+a+i+a+o+a+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),i=n.round(-t,2),a=n.round(t*-.309,2);return"M"+e+","+a+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+a+"L0,"+i+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M"+i+",-"+r+"V"+r+"L0,"+e+"L-"+i+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+i+"H"+r+"L"+e+",0L"+r+",-"+i+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),i=n.round(.951*e,2),a=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(e*-.309,2),u=n.round(.118*e,2),c=n.round(.809*e,2);return"M"+r+","+l+"H"+i+"L"+a+","+u+"L"+o+","+c+"L0,"+n.round(.382*e,2)+"L-"+o+","+c+"L-"+a+","+u+"L-"+i+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),i=n.round(.76*t,2);return"M-"+i+",0l-"+r+",-"+e+"h"+i+"l"+r+",-"+e+"l"+r+","+e+"h"+i+"l-"+r+","+e+"l"+r+","+e+"h-"+i+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+i+o+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+i+o+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+i+"-"+e+","+e+i+e+","+e+i+e+",-"+e+i+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+i+"0,"+e+i+e+",0"+i+"0,-"+e+i+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+","+i+"L0,0M"+e+","+i+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+",-"+i+"L0,0M"+e+",-"+i+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M"+i+","+e+"L0,0M"+i+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+i+","+e+"L0,0M-"+i+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0}}},{d3:104}],600:[function(t,e,r){"use strict";e.exports={visible:{valType:"boolean"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"]},symmetric:{valType:"boolean"},array:{valType:"data_array"},arrayminus:{valType:"data_array"},value:{valType:"number",min:0,dflt:10},valueminus:{valType:"number",min:0,dflt:10},traceref:{valType:"integer",min:0,dflt:0},tracerefminus:{valType:"integer",min:0,dflt:0},copy_ystyle:{valType:"boolean"},copy_zstyle:{valType:"boolean"},color:{valType:"color"},thickness:{valType:"number",min:0,dflt:2},width:{valType:"number",min:0},_deprecated:{opacity:{valType:"number"}}}},{}],601:[function(t,e,r){"use strict";function n(t,e,r,n){var a=e["error_"+n]||{},l=a.visible&&["linear","log"].indexOf(r.type)!==-1,u=[];if(l){for(var c=s(a),h=0;h0;t.each(function(t){var e,h=t[0].trace,f=h.error_x||{},d=h.error_y||{};h.ids&&(e=function(t){return t.id});var p=o.hasMarkers(h)&&h.marker.maxdisplayed>0;if(d.visible||f.visible){var m=i.select(this).selectAll("g.errorbar").data(t,e);m.exit().remove(),m.style("opacity",1);var g=m.enter().append("g").classed("errorbar",!0);c&&g.style("opacity",0).transition().duration(r.duration).style("opacity",1),m.each(function(t){var e=i.select(this),o=n(t,l,u);if(!p||t.vis){var h;if(d.visible&&a(o.x)&&a(o.yh)&&a(o.ys)){var m=d.width;h="M"+(o.x-m)+","+o.yh+"h"+2*m+"m-"+m+",0V"+o.ys,o.noYS||(h+="m-"+m+",0h"+2*m);var g=e.select("path.yerror");s=!g.size(),s?g=e.append("path").classed("yerror",!0):c&&(g=g.transition().duration(r.duration).ease(r.easing)),g.attr("d",h)}if(f.visible&&a(o.y)&&a(o.xh)&&a(o.xs)){var v=(f.copy_ystyle?d:f).width;h="M"+o.xh+","+(o.y-v)+"v"+2*v+"m0,-"+v+"H"+o.xs,o.noXS||(h+="m0,-"+v+"v"+2*v);var y=e.select("path.xerror");s=!y.size(),s?y=e.append("path").classed("xerror",!0):c&&(y=y.transition().duration(r.duration).ease(r.easing)),y.attr("d",h)}}})}})}},{"../../traces/scatter/subtypes":944,d3:104,"fast-isnumeric":113}],606:[function(t,e,r){"use strict";var n=t("d3"),i=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)})}},{"../color":575,d3:104}],607:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/constants");e.exports={_isLinkedToArray:"image",visible:{valType:"boolean",dflt:!0},source:{valType:"string"},layer:{valType:"enumerated",values:["below","above"],dflt:"above"},sizex:{valType:"number",dflt:0},sizey:{valType:"number",dflt:0},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain"},opacity:{valType:"number",min:0,max:1,dflt:1},x:{valType:"any",dflt:0},y:{valType:"any",dflt:0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper"}}},{"../../plots/cartesian/constants":724}],608:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib/to_log_range");e.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,u,c=t._fullLayout.images,h=e._id.charAt(0),f=0;f=2/3},r.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3},r.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],613:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.defaultLine},borderwidth:{valType:"number",min:0,dflt:0},font:a({},n,{}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"]},tracegroupgap:{valType:"number",min:0,dflt:10},x:{valType:"number",min:-2,max:3,dflt:1.02},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"}}},{"../../lib/extend":672,"../../plots/font_attributes":739,"../color/attributes":574}],614:[function(t,e,r){"use strict";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4}},{}],615:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("./attributes"),o=t("../../plots/layout_attributes"),s=t("./helpers");e.exports=function(t,e,r){function l(t,e){return i.coerce(d,p,a,t,e)}for(var u,c,h,f,d=t.legend||{},p=e.legend={},m=0,g="normal",v=0;v1)!==!1){if(l("bgcolor",e.paper_bgcolor),l("bordercolor"),l("borderwidth"),i.coerceFont(l,"font",e.font),l("orientation"),"h"===p.orientation){var b=t.xaxis;b&&b.rangeslider&&b.rangeslider.visible?(u=0,h="left",c=1.1,f="bottom"):(u=0,h="left",c=-.1,f="top")}l("traceorder",g),s.isGrouped(e.legend)&&l("tracegroupgap"),l("x",u),l("xanchor",h),l("y",c),l("yanchor",f),i.noneOrAll(d,p,["x","y"])}}},{"../../lib":680,"../../plots/layout_attributes":769,"../../registry":793,"./attributes":613,"./helpers":618}],616:[function(t,e,r){"use strict";function n(t,e){function r(r){y.convertToTspans(r,function(){r.selectAll("tspan.line").attr({x:r.attr("x")}),t.call(o,e)})}var n=t.data()[0][0],i=e._fullLayout,a=n.trace,s=p.traceIs(a,"pie"),l=a.index,u=s?n.label:a.name,c=t.selectAll("text.legendtext").data([0]);c.enter().append("text").classed("legendtext",!0),c.attr({x:40,y:0,"data-unformatted":u}).style("text-anchor","start").classed("user-select-none",!0).call(g.font,i.legend.font).text(u),e._context.editable&&!s?c.call(y.makeEditable).call(r).on("edit",function(t){this.attr({"data-unformatted":t}),this.text(t).call(r),this.text()||(t=" ");var i,a=n.trace._fullInput||{};if(["ohlc","candlestick"].indexOf(a.type)!==-1){var o=n.trace.transforms;i=o[o.length-1].direction+".name"}else i="name";h.restyle(e,i,t,l)}):c.call(r)}function i(t,e){var r,n=1,i=t.selectAll("rect").data([0]);i.enter().append("rect").classed("legendtoggle",!0).style("cursor","pointer").attr("pointer-events","all").call(v.fill,"rgba(0,0,0,0)"),i.on("mousedown",function(){r=(new Date).getTime(),r-e._legendMouseDownTimeT&&(n=Math.max(n-1,1)),1===n?r._clickTimeout=setTimeout(function(){a(t,e,n)},T):2===n&&(r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0,a(t,e,n))}})}function a(t,e,r){if(!e._dragged&&!e._editing){var n,i,a=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],o=t.data()[0][0],s=e._fullData,l=o.trace,u=l.legendgroup,c=[];if(1===r&&k&&e.data&&e._context.showTips?(f.notifier("Double click on legend to isolate individual trace","long"),k=!1):k=!1,p.traceIs(l,"pie")){var d=o.label,m=a.indexOf(d);1===r?m===-1?a.push(d):a.splice(m,1):2===r&&(a=[],e.calcdata[0].forEach(function(t){d!==t.label&&a.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===a.length&&m===-1&&(a=[])),h.relayout(e,"hiddenlabels",a)}else{var g,v=[],y=[];for(g=0;gtspan"),h=c[0].length||1;r=s*h,n=u.node()&&g.bBox(u.node()).width;var f=s*(.3+(1-h)/2);u.attr("y",f),c.attr("y",f)}r=Math.max(r,16)+3,i.height=r,i.width=n}function s(t,e,r){var n=t._fullLayout,i=n.legend,a=i.borderwidth,o=M.isGrouped(i);if(M.isVertical(i))o&&e.each(function(t,e){g.setTranslate(this,0,e*i.tracegroupgap)}),i.width=0,i.height=0,r.each(function(t){var e=t[0],r=e.height,n=e.width;g.setTranslate(this,a,5+a+i.height+r/2),i.height+=r,i.width=Math.max(i.width,n)}),i.width+=45+2*a,i.height+=10+2*a,o&&(i.height+=(i._lgroupsLength-1)*i.tracegroupgap),i.width=Math.ceil(i.width),i.height=Math.ceil(i.height),r.each(function(e){var r=e[0];c.select(this).select(".legendtoggle").call(g.setRect,0,-r.height/2,(t._context.editable?0:i.width)+40,r.height)});else if(o){i.width=0,i.height=0;for(var s=[i.width],l=e.data(),u=0,h=l.length;un.width-(n.margin.r+n.margin.l)&&(y=0,p+=m,i.height=i.height+m,m=0),g.setTranslate(this,a+y,5+a+e.height/2+p),i.width+=o+r,i.height=Math.max(i.height,e.height),y+=o+r,m=Math.max(e.height,m)}),i.width+=2*a,i.height+=10+2*a,i.width=Math.ceil(i.width),i.height=Math.ceil(i.height),r.each(function(e){var r=e[0];c.select(this).select(".legendtoggle").call(g.setRect,0,-r.height/2,t._context.editable?0:i.width,r.height)})}}function l(t){var e=t._fullLayout,r=e.legend,n="left";A.isRightAnchor(r)?n="right":A.isCenterAnchor(r)&&(n="center");var i="top";A.isBottomAnchor(r)?i="bottom":A.isMiddleAnchor(r)&&(i="middle"),d.autoMargin(t,"legend",{x:r.x,y:r.y,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:r.height*({top:1,middle:.5}[i]||0),t:r.height*({bottom:1,middle:.5}[i]||0)})}function u(t){var e=t._fullLayout,r=e.legend,n="left";A.isRightAnchor(r)?n="right":A.isCenterAnchor(r)&&(n="center"),d.autoMargin(t,"legend",{x:r.x,y:.5,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:0,t:0})}var c=t("d3"),h=t("../../plotly"),f=t("../../lib"),d=t("../../plots/plots"),p=t("../../registry"),m=t("../dragelement"),g=t("../drawing"),v=t("../color"),y=t("../../lib/svg_text_utils"),b=t("./constants"),x=t("../../constants/interactions"),_=t("./get_legend_data"),w=t("./style"),M=t("./helpers"),A=t("./anchor_utils"),k=!0,T=x.DBLCLICKDELAY;e.exports=function(t){function e(t,e){L.attr("data-scroll",e).call(g.setTranslate,0,e),C.call(g.setRect,N,t,b.scrollBarWidth,b.scrollBarHeight),S.select("rect").attr({y:y.borderwidth-e})}var r=t._fullLayout,o="legend"+r._uid;if(r._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var y=r.legend,x=r.showlegend&&_(t.calcdata,y),M=r.hiddenlabels||[];if(!r.showlegend||!x.length)return r._infolayer.selectAll(".legend").remove(),r._topdefs.select("#"+o).remove(),void d.autoMargin(t,"legend");var k=r._infolayer.selectAll("g.legend").data([0]);k.enter().append("g").attr({class:"legend","pointer-events":"all"});var S=r._topdefs.selectAll("#"+o).data([0]);S.enter().append("clipPath").attr("id",o).append("rect");var E=k.selectAll("rect.bg").data([0]);E.enter().append("rect").attr({class:"bg","shape-rendering":"crispEdges"}),E.call(v.stroke,y.bordercolor),E.call(v.fill,y.bgcolor),E.style("stroke-width",y.borderwidth+"px");var L=k.selectAll("g.scrollbox").data([0]);L.enter().append("g").attr("class","scrollbox");var C=k.selectAll("rect.scrollbar").data([0]);C.enter().append("rect").attr({class:"scrollbar",rx:20,ry:2,width:0,height:0}).call(v.fill,"#808BA4");var D=L.selectAll("g.groups").data(x);D.enter().append("g").attr("class","groups"),D.exit().remove();var z=D.selectAll("g.traces").data(f.identity);z.enter().append("g").attr("class","traces"),z.exit().remove(),z.call(w).style("opacity",function(t){var e=t[0].trace;return p.traceIs(e,"pie")?M.indexOf(t[0].label)!==-1?.5:1:"legendonly"===e.visible?.5:1}).each(function(){c.select(this).call(n,t).call(i,t)});var I=0!==k.enter().size();I&&(s(t,D,z),l(t));var P=r.width,O=r.height;s(t,D,z),y.height>O?u(t):l(t);var R=r._size,j=R.l+R.w*y.x,F=R.t+R.h*(1-y.y);A.isRightAnchor(y)?j-=y.width:A.isCenterAnchor(y)&&(j-=y.width/2),A.isBottomAnchor(y)?F-=y.height:A.isMiddleAnchor(y)&&(F-=y.height/2);var N=y.width,B=R.w;N>B?(j=R.l,N=B):(j+N>P&&(j=P-N),j<0&&(j=0),N=Math.min(P-j,y.width));var U=y.height,V=R.h;U>V?(F=R.t,U=V):(F+U>O&&(F=O-U),F<0&&(F=0),U=Math.min(O-F,y.height)),g.setTranslate(k,j,F);var H,q,G=U-b.scrollBarHeight-2*b.scrollBarMargin,Y=y.height-U;if(y.height<=U||t._context.staticPlot)E.attr({width:N-y.borderwidth,height:U-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),g.setTranslate(L,0,0),S.select("rect").attr({width:N-2*y.borderwidth,height:U-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth}),L.call(g.setClipUrl,o);else{H=b.scrollBarMargin,q=L.attr("data-scroll")||0,E.attr({width:N-2*y.borderwidth+b.scrollBarWidth+b.scrollBarMargin,height:U-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),S.select("rect").attr({width:N-2*y.borderwidth+b.scrollBarWidth+b.scrollBarMargin,height:U-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth-q}),L.call(g.setClipUrl,o),I&&e(H,q),k.on("wheel",null),k.on("wheel",function(){q=f.constrain(L.attr("data-scroll")-c.event.deltaY/G*Y,-Y,0),H=b.scrollBarMargin-q/Y*G,e(H,q),c.event.preventDefault()}),C.on(".drag",null),L.on(".drag",null);var W=c.behavior.drag().on("drag",function(){H=f.constrain(c.event.y-b.scrollBarHeight/2,b.scrollBarMargin,b.scrollBarMargin+G),q=-(H-b.scrollBarMargin)/G*Y,e(H,q)});C.call(W),L.call(W)}if(t._context.editable){var X,Z,J,K;k.classed("cursor-move",!0),m.init({element:k.node(),prepFn:function(){var t=g.getTranslate(k);J=t.x,K=t.y},moveFn:function(t,e){var r=J+t,n=K+e;g.setTranslate(k,r,n),X=m.align(r,0,R.l,R.l+R.w,y.xanchor),Z=m.align(n,0,R.t+R.h,R.t,y.yanchor)},doneFn:function(e,n,i){if(e&&void 0!==X&&void 0!==Z)h.relayout(t,{"legend.x":X,"legend.y":Z});else{var o=r._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return i.clientX>=t.left&&i.clientX<=t.right&&i.clientY>=t.top&&i.clientY<=t.bottom});o.size()>0&&(1===n?k._clickTimeout=setTimeout(function(){a(o,t,n)},T):2===n&&(k._clickTimeout&&clearTimeout(k._clickTimeout),a(o,t,n)))}}})}}}},{"../../constants/interactions":661,"../../lib":680,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/plots":778,"../../registry":793,"../color":575,"../dragelement":596,"../drawing":598,"./anchor_utils":612,"./constants":614,"./get_legend_data":617,"./helpers":618,"./style":620,d3:104}],617:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("./helpers");e.exports=function(t,e){function r(t,r){if(""!==t&&i.isGrouped(e))l.indexOf(t)===-1?(l.push(t),u=!0,s[t]=[[r]]):s[t].push([r]);else{var n="~~i"+h;l.push(n),s[n]=[[r]],h++}}var a,o,s={},l=[],u=!1,c={},h=0;for(a=0;ar[1])return r[1]}return i}function r(t){return t[0]}var n,i,a=t[0],o=a.trace,s=d.hasMarkers(o),u=d.hasText(o),f=d.hasLines(o);if(s||u||f){var p={},m={};s&&(p.mc=e("marker.color",r),p.mo=e("marker.opacity",c.mean,[.2,1]),p.ms=e("marker.size",c.mean,[2,16]),p.mlc=e("marker.line.color",r),p.mlw=e("marker.line.width",c.mean,[0,5]),m.marker={sizeref:1,sizemin:1,sizemode:"diameter"}),f&&(m.line={width:e("line.width",r,[0,10])}),u&&(p.tx="Aa",p.tp=e("textposition",r),p.ts=10,p.tc=e("textfont.color",r),p.tf=e("textfont.family",r)),n=[c.minExtend(a,p)],i=c.minExtend(o,m)}var g=l.select(this).select("g.legendpoints"),v=g.selectAll("path.scatterpts").data(s?n:[]);v.enter().append("path").classed("scatterpts",!0).attr("transform","translate(20,0)"),v.exit().remove(),v.call(h.pointStyle,i),s&&(n[0].mrc=3);var y=g.selectAll("g.pointtext").data(u?n:[]);y.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),y.exit().remove(),y.selectAll("text").call(h.textPointStyle,i)}function a(t){var e=t[0].trace,r=e.marker||{},n=r.line||{},i=l.select(this).select("g.legendpoints").selectAll("path.legendbar").data(u.traceIs(e,"bar")?[t]:[]);i.enter().append("path").classed("legendbar",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),i.exit().remove(),i.each(function(t){var e=l.select(this),i=t[0],a=(i.mlw+1||n.width+1)-1;e.style("stroke-width",a+"px").call(f.fill,i.mc||r.color),a&&e.call(f.stroke,i.mlc||n.color)})}function o(t){var e=t[0].trace,r=l.select(this).select("g.legendpoints").selectAll("path.legendbox").data(u.traceIs(e,"box")&&e.visible?[t]:[]);r.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.each(function(){var t=e.line.width,r=l.select(this);r.style("stroke-width",t+"px").call(f.fill,e.fillcolor),t&&r.call(f.stroke,e.line.color)})}function s(t){var e=t[0].trace,r=l.select(this).select("g.legendpoints").selectAll("path.legendpie").data(u.traceIs(e,"pie")&&e.visible?[t]:[]);r.enter().append("path").classed("legendpie",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.size()&&r.call(p,t[0],e)}var l=t("d3"),u=t("../../registry"),c=t("../../lib"),h=t("../drawing"),f=t("../color"),d=t("../../traces/scatter/subtypes"),p=t("../../traces/pie/style_one");e.exports=function(t){t.each(function(t){var e=l.select(this),r=e.selectAll("g.layers").data([0]);r.enter().append("g").classed("layers",!0),r.style("opacity",t[0].trace.opacity),r.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),r.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var n=r.selectAll("g.legendsymbols").data([t]);n.enter().append("g").classed("legendsymbols",!0),n.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(a).each(o).each(s).each(n).each(i)}},{"../../lib":680,"../../registry":793,"../../traces/pie/style_one":918,"../../traces/scatter/subtypes":944,"../color":575,"../drawing":598,d3:104}],621:[function(t,e,r){"use strict";function n(t,e){var r=e.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=t._fullLayout,o={};if("zoom"===n){for(var s,l,c="in"===i?.5:2,f=(1+c)/2,d=(1-c)/2,p=h.list(t,null,!0),m=0;m1)return n(["resetViews","toggleHover"]),o(g,r);c&&(n(["zoom3d","pan3d","orbitRotation","tableRotation"]),n(["resetCameraDefault3d","resetCameraLastSave3d"]),n(["hoverClosest3d"])),f&&(n(["zoomInGeo","zoomOutGeo","resetGeo"]),n(["hoverClosestGeo"]));var v=i(s),y=[];return((u||p)&&!v||m)&&(y=["zoom2d","pan2d"]),(u||m)&&a(l)&&(y.push("select2d"),y.push("lasso2d")),y.length&&n(y),!u&&!p||v||m||n(["zoomIn2d","zoomOut2d","autoScale2d","resetScale2d"]),u&&d?n(["toggleHover"]):p?n(["hoverClosestGl2d"]):u?n(["hoverClosestCartesian","hoverCompareCartesian"]):d&&n(["hoverClosestPie"]),o(g,r)}function i(t){for(var e=l.list({_fullLayout:t},null,!0),r=!0,n=0;n0)){var p=i(e,r,l);h("x",p[0]),h("y",p[1]),a.noneOrAll(t,e,["x","y"]),h("xanchor"),h("yanchor"),a.coerceFont(h,"font",r.font);var m=h("bgcolor");h("activecolor",o.contrast(m,u.lightAmount,u.darkAmount)),h("bordercolor"),h("borderwidth")}}},{"../../lib":680,"../color":575,"./attributes":625,"./button_attributes":626,"./constants":627}],629:[function(t,e,r){"use strict";function n(t){for(var e=v.list(t,"x",!0),r=[],n=0;np&&(p=f)));return p>=d?[d,p]:void 0}}var i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./constants"),s=t("./helpers");e.exports=function(t){var e=t._fullLayout,r=i.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var s=0;sY&&n>W&&!t.shiftKey?p.getCursor(i/r,1-a/n):"move";m(e,o),G=o.split("-")[0]}function a(e){N=h.getFromId(t,r.xref),B=h.getFromId(t,r.yref),U=v.getDataToPixel(t,N),V=v.getDataToPixel(t,B,!0),H=v.getPixelToData(t,N),q=v.getPixelToData(t,B,!0);var a="shapes["+n+"]";"path"===r.type?(j=r.path,F=a+".path"):(g=U(r.x0),y=V(r.y0),b=U(r.x1),x=V(r.y1),_=a+".x0",w=a+".y0",M=a+".x1",A=a+".y1"),gW&&(d[L]=r[I]=q(u),d[C]=r[P]=q(c)),f-h>Y&&(d[D]=r[O]=H(h),d[z]=r[R]=H(f))}e.attr("d",o(t,r))}var d,g,y,b,x,_,w,M,A,k,T,S,E,L,C,D,z,I,P,O,R,j,F,N,B,U,V,H,q,G,Y=10,W=10,X={setCursor:i,element:e.node(),prepFn:a,doneFn:s},Z=X.element.getBoundingClientRect();p.init(X)}function o(t,e){var r,n,i,a,o=e.type,l=h.getFromId(t,e.xref),u=h.getFromId(t,e.yref),c=t._fullLayout._size;if(l?(r=v.shapePositionToRange(l),n=function(t){return l._offset+l.r2p(r(t,!0))}):n=function(t){return c.l+c.w*t},u?(i=v.shapePositionToRange(u),a=function(t){return u._offset+u.r2p(i(t,!0))}):a=function(t){return c.t+c.h*(1-t)},"path"===o)return l&&"date"===l.type&&(n=v.decodeDate(n)),u&&"date"===u.type&&(a=v.decodeDate(a)),s(e.path,n,a);var f=n(e.x0),d=n(e.x1),p=a(e.y0),m=a(e.y1);if("line"===o)return"M"+f+","+p+"L"+d+","+m;if("rect"===o)return"M"+f+","+p+"H"+d+"V"+m+"H"+f+"Z";var g=(f+d)/2,y=(p+m)/2,b=Math.abs(g-f),x=Math.abs(y-p),_="A"+b+","+x,w=g+b+","+y;return"M"+w+_+" 0 1,1 "+g+","+(y-x)+_+" 0 0,1 "+w+"Z"}function s(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i],l=t.substr(1).replace(g.paramRE,function(t){return a[n]?t=e(t):o[n]&&(t=r(t)),n++,n>s&&(t="X"),t});return n>s&&(l=l.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+t)),i+l})}function l(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,function(t){return n>=s?t:(a[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}var u=t("../../plotly"),c=t("../../lib"),h=t("../../plots/cartesian/axes"),f=t("../color"),d=t("../drawing"),p=t("../dragelement"),m=t("../../lib/setcursor"),g=t("./constants"),v=t("./helpers");e.exports={draw:n,drawOne:i}},{"../../lib":680,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian/axes":719,"../color":575,"../dragelement":596,"../drawing":598,"./constants":640,"./helpers":643}],643:[function(t,e,r){"use strict";r.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},r.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},r.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},r.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},r.getDataToPixel=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.shapePositionToRange(e);i=function(t){return e._offset+e.r2p(o(t,!0))},"date"===e.type&&(i=r.decodeDate(i))}else i=n?function(t){return a.t+a.h*(1-t)}:function(t){return a.l+a.w*t};return i},r.getPixelToData=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.rangeToShapePosition(e);i=function(t){return o(e.p2r(t-e._offset))}}else i=n?function(t){return 1-(t-a.t)/a.h}:function(t){return(t-a.l)/a.w};return i}},{}],644:[function(t,e,r){"use strict";var n=t("./draw");e.exports={moduleType:"component",name:"shapes",layoutAttributes:t("./attributes"),supplyLayoutDefaults:t("./defaults"),calcAutorange:t("./calc_autorange"),draw:n.draw,drawOne:n.drawOne}},{"./attributes":638,"./calc_autorange":639,"./defaults":641,"./draw":642}],645:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("./attributes"),o=t("./helpers");e.exports=function(t,e,r,s,l){function u(r,i){return n.coerce(t,e,a,r,i)}if(s=s||{},l=l||{},!u("visible",!l.itemIsNotPlainObject))return e;u("layer"),u("opacity"),u("fillcolor"),u("line.color"),u("line.width"),u("line.dash");for(var c=t.path?"path":"rect",h=u("type",c),f=["x","y"],d=0;d<2;d++){var p=f[d],m={_fullLayout:r},g=i.coerceRef(t,e,m,p,"","paper");if("path"!==h){var v,y,b;"paper"!==g?(v=i.getFromId(m,g),b=o.rangeToShapePosition(v),y=o.shapePositionToRange(v)):y=b=n.identity;var x=p+"0",_=p+"1",w=t[x],M=t[_];t[x]=y(t[x],!0),t[_]=y(t[_],!0),i.coercePosition(e,m,u,g,x,.25),i.coercePosition(e,m,u,g,_,.75),e[x]=b(e[x]),e[_]=b(e[_]),t[x]=w,t[_]=M}}return"path"===h?u("path"):n.noneOrAll(t,e,["x0","x1","y0","y1"]),e}},{"../../lib":680,"../../plots/cartesian/axes":719,"./attributes":638,"./helpers":643}],646:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../../plots/pad_attributes"),a=t("../../lib/extend").extendFlat,o=t("../../lib/extend").extendDeep,s=t("../../plots/animation_attributes"),l=t("./constants"),u={_isLinkedToArray:"step",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"}};e.exports={_isLinkedToArray:"slider",visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1}, -x:{valType:"number",min:-2,max:3,dflt:0},pad:o({},i,{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:a({},n,{})},font:a({},n,{}),activebgcolor:{valType:"color",dflt:l.gripBgActiveColor},bgcolor:{valType:"color",dflt:l.railBgColor},bordercolor:{valType:"color",dflt:l.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l.tickLength},tickcolor:{valType:"color",dflt:l.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l.minorTickLength}}},{"../../lib/extend":672,"../../plots/animation_attributes":715,"../../plots/font_attributes":739,"../../plots/pad_attributes":777,"./constants":647}],647:[function(t,e,r){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,fontSizeToHeight:1.3,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],648:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return a.coerce(t,e,s,r,n)}n("visible",i(t,e).length>0)&&(n("active"),n("x"),n("y"),a.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("len"),n("lenmode"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),a.coerceFont(n,"font",r.font),n("currentvalue.visible")&&(n("currentvalue.xanchor"),n("currentvalue.prefix"),n("currentvalue.suffix"),n("currentvalue.offset"),a.coerceFont(n,"currentvalue.font",e.font)),n("transition.duration"),n("transition.easing"),n("bgcolor"),n("activebgcolor"),n("bordercolor"),n("borderwidth"),n("ticklen"),n("tickwidth"),n("tickcolor"),n("minorticklen"))}function i(t,e){function r(t,e){return a.coerce(n,i,c,t,e)}for(var n,i,o=t.steps||[],s=e.steps=[],l=0;l=r.steps.length&&(r.active=0),e.call(s,r).call(x,r).call(c,r).call(p,r).call(b,t,r).call(l,t,r),k.setTranslate(e,r.lx+r.pad.l,r.ly+r.pad.t),e.call(g,r,r.active/(r.steps.length-1),!1),e.call(s,r)}function s(t,e,r){if(e.currentvalue.visible){var n,i,a=t.selectAll("text").data([0]);switch(e.currentvalue.xanchor){case"right":n=e.inputAreaLength-E.currentValueInset-e.currentValueMaxWidth,i="left";break;case"center":n=.5*e.inputAreaLength,i="middle";break;default:n=E.currentValueInset,i="left"}a.enter().append("text").classed(E.labelClass,!0).classed("user-select-none",!0).attr("text-anchor",i);var o=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)o+=r;else{o+=e.steps[e.active].label}return e.currentvalue.suffix&&(o+=e.currentvalue.suffix),a.call(k.font,e.currentvalue.font).text(o).call(T.convertToTspans),k.setTranslate(a,n,e.currentValueHeight),a}}function l(t,e,r){var n=t.selectAll("rect."+E.gripRectClass).data([0]);n.enter().append("rect").classed(E.gripRectClass,!0).call(d,e,t,r).style("pointer-events","all"),n.attr({width:E.gripWidth,height:E.gripHeight,rx:E.gripRadius,ry:E.gripRadius}).call(A.stroke,r.bordercolor).call(A.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function u(t,e,r){var n=t.selectAll("text").data([0]);return n.enter().append("text").classed(E.labelClass,!0).classed("user-select-none",!0).attr("text-anchor","middle"),n.call(k.font,r.font).text(e.step.label).call(T.convertToTspans),n}function c(t,e){var r=t.selectAll("g."+E.labelsClass).data([0]);r.enter().append("g").classed(E.labelsClass,!0);var n=r.selectAll("g."+E.labelGroupClass).data(e.labelSteps);n.enter().append("g").classed(E.labelGroupClass,!0),n.exit().remove(),n.each(function(t){var r=w.select(this);r.call(u,t,e),k.setTranslate(r,v(e,t.fraction),E.tickOffset+e.ticklen+e.labelHeight+E.labelOffset+e.currentValueTotalHeight)})}function h(t,e,r,n,i){var a=Math.round(n*(r.steps.length-1));a!==r.active&&f(t,e,r,a,!0,i)}function f(t,e,r,n,i,a){var o=r.active;r._input.active=r.active=n;var l=r.steps[r.active];e.call(g,r,r.active/(r.steps.length-1),a),e.call(s,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),l&&l.method&&i&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=i,e._nextMethod.doTransition=a):(e._nextMethod={step:l,doCallback:i,doTransition:a},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&&(M.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function d(t,e,r){function n(){return r.data()[0]}var i=r.node(),a=w.select(e);t.on("mousedown",function(){var t=n();e.emit("plotly_sliderstart",{slider:t});var o=r.select("."+E.gripRectClass);w.event.stopPropagation(),w.event.preventDefault(),o.call(A.fill,t.activebgcolor);var s=y(t,w.mouse(i)[0]);h(e,r,t,s,!0),t._dragging=!0,a.on("mousemove",function(){var t=n(),a=y(t,w.mouse(i)[0]);h(e,r,t,a,!1)}),a.on("mouseup",function(){var t=n();t._dragging=!1,o.call(A.fill,t.bgcolor),a.on("mouseup",null),a.on("mousemove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})})})}function p(t,e){var r=t.selectAll("rect."+E.tickRectClass).data(e.steps);r.enter().append("rect").classed(E.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(t,r){var n=r%e.labelStride==0,i=w.select(this);i.attr({height:n?e.ticklen:e.minorticklen}).call(A.fill,e.tickcolor),k.setTranslate(i,v(e,r/(e.steps.length-1))-.5*e.tickwidth,(n?E.tickOffset:E.minorTickOffset)+e.currentValueTotalHeight)})}function m(t){t.labelSteps=[];for(var e=t.steps.length,r=0;r0&&(o=o.transition().duration(e.transition.duration).ease(e.transition.easing)),o.attr("transform","translate("+(a-.5*E.gripWidth)+","+e.currentValueTotalHeight+")")}}function v(t,e){return t.inputAreaStart+E.stepInset+(t.inputAreaLength-2*E.stepInset)*Math.min(1,Math.max(0,e))}function y(t,e){return Math.min(1,Math.max(0,(e-E.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*E.stepInset-2*t.inputAreaStart)))}function b(t,e,r){var n=t.selectAll("rect."+E.railTouchRectClass).data([0]);n.enter().append("rect").classed(E.railTouchRectClass,!0).call(d,e,t,r).style("pointer-events","all"),n.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,E.tickOffset+r.ticklen+r.labelHeight)}).call(A.fill,r.bgcolor).attr("opacity",0),k.setTranslate(n,0,r.currentValueTotalHeight)}function x(t,e){var r=t.selectAll("rect."+E.railRectClass).data([0]);r.enter().append("rect").classed(E.railRectClass,!0);var n=e.inputAreaLength-2*E.railInset;r.attr({width:n,height:E.railWidth,rx:E.railRadius,ry:E.railRadius,"shape-rendering":"crispEdges"}).call(A.stroke,e.bordercolor).call(A.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),k.setTranslate(r,E.railInset,.5*(e.inputAreaWidth-E.railWidth)+e.currentValueTotalHeight)}function _(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n0?[0]:[]);if(s.enter().append("g").classed(E.containerClassName,!0).style("cursor","ew-resize"),s.exit().remove(),s.exit().size()&&_(t),0!==r.length){var l=s.selectAll("g."+E.groupClassName).data(r,i);l.enter().append("g").classed(E.groupClassName,!0),l.exit().each(function(e){w.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,M.autoMargin(t,E.autoMarginIdRoot+e._index)});for(var u=0;u0||f<0){var m={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[b.side];e.attr("transform","translate("+m+")")}}}var m=r.propContainer,g=r.propName,v=r.traceIndex,y=r.dfltName,b=r.avoid||{},x=r.attributes,_=r.transform,w=r.containerGroup,M=t._fullLayout,A=m.titlefont.family,k=m.titlefont.size,T=m.titlefont.color,S=1,E=!1,L=m.title.trim();""===L&&(S=0),L.match(/Click to enter .+ title/)&&(S=.2,E=!0),w||(w=M._infolayer.selectAll(".g-"+e).data([0]),w.enter().append("g").classed("g-"+e,!0));var C=w.selectAll("text").data([0]);C.enter().append("text"),C.text(L).attr("class",e),C.attr({"data-unformatted":L}).call(f);var D="Click to enter "+y+" title";t._context.editable?(L?C.on(".opacity",null):function(){S=0,E=!0,L=D,C.attr({"data-unformatted":L}).text(L).on("mouseover.opacity",function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)})}(),C.call(c.makeEditable).on("edit",function(e){void 0!==v?a.restyle(t,g,e,v):a.relayout(t,g,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(f)}).on("input",function(t){this.text(t||" ").attr(x).selectAll("tspan.line").attr(x)})):L&&!L.match(/Click to enter .+ title/)||C.remove(),C.classed("js-placeholder",E)}},{"../../constants/interactions":661,"../../lib":680,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/plots":778,"../color":575,"../drawing":598,d3:104,"fast-isnumeric":113}],652:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat,o=t("../../plots/pad_attributes"),s={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""}};e.exports={_isLinkedToArray:"updatemenu",_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:s,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a({},o,{}),font:a({},n,{}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1}}},{"../../lib/extend":672,"../../plots/font_attributes":739,"../../plots/pad_attributes":777,"../color/attributes":574}],653:[function(t,e,r){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,fontSizeToHeight:1.3,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF"}},{}],654:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return a.coerce(t,e,s,r,n)}n("visible",i(t,e).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),a.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),a.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function i(t,e){function r(t,e){return a.coerce(n,i,c,t,e)}for(var n,i,o=t.buttons||[],s=e.buttons=[],l=0;l0?[0]:[]);if(a.enter().append("g").classed(E.containerClassName,!0).style("cursor","pointer"),a.exit().remove(),a.exit().size()&&_(t),0!==r.length){var c=a.selectAll("g."+E.headerGroupClassName).data(r,i);c.enter().append("g").classed(E.headerGroupClassName,!0);var h=a.selectAll("g."+E.dropdownButtonGroupClassName).data([0]);h.enter().append("g").classed(E.dropdownButtonGroupClassName,!0).style("pointer-events","all");for(var f=0;fM,T=n.barLength+2*n.barPad,S=n.barWidth+2*n.barPad,E=p,L=g+v;L+S>u&&(L=u-S);var C=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,n.barColor),k?(this.hbar=C.attr({rx:n.barRadius,ry:n.barRadius,x:E,y:L,width:T,height:S}),this._hbarXMin=E+T/2,this._hbarTranslateMax=M-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var D=v>A,z=n.barWidth+2*n.barPad,I=n.barLength+2*n.barPad,P=p+m,O=g;P+z>l&&(P=l-z);var R=this.container.selectAll("rect.scrollbar-vertical").data(D?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,n.barColor),D?(this.vbar=R.attr({rx:n.barRadius,ry:n.barRadius,x:P,y:O,width:z,height:I}),this._vbarYMin=O+I/2,this._vbarTranslateMax=A-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var j=this.id,F=c-.5,N=D?h+z+.5:h+.5,B=f-.5,U=k?d+S+.5:d+.5,V=s._topdefs.selectAll("#"+j).data(k||D?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",j).append("rect"),k||D?(this._clipRect=V.select("rect").attr({x:Math.floor(F),y:Math.floor(B),width:Math.ceil(N)-Math.floor(F),height:Math.ceil(U)-Math.floor(B)}),this.container.call(o.setClipUrl,j),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),k||D){var H=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(H);var q=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault(),i.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(q),D&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,r)},n.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},n.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=i.event.dx),this.vbar&&(e-=i.event.dy),this.setTranslate(t,e)},n.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=i.event.deltaY),this.vbar&&(e+=i.event.deltaY),this.setTranslate(t,e)},n.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,n=r+this._hbarTranslateMax;t=(s.constrain(i.event.x,r,n)-r)/(n-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,o=a+this._vbarTranslateMax;e=(s.constrain(i.event.y,a,o)-a)/(o-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},n.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=s.constrain(t||0,0,r),e=s.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(o.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(o.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var a=e/n;this.vbar.call(o.setTranslate,t,e+a*this._vbarTranslateMax)}}},{"../../lib":680,"../color":575,"../drawing":598,d3:104}],658:[function(t,e,r){"use strict";e.exports={solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}},{}],659:[function(t,e,r){"use strict";e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],660:[function(t,e,r){"use strict";e.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},{}],661:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300}},{}],662:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5}},{}],663:[function(t,e,r){"use strict";e.exports={entityToUnicode:{mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},unicodeToEntity:{"&":"amp","<":"lt",">":"gt",'"':"quot","'":"#x27","/":"#x2F"}}},{}], -664:[function(t,e,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],665:[function(t,e,r){"use strict";var n=t("./plotly");r.version="1.25.2",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config"),r.plot=n.plot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.setPlotConfig=t("./plot_api/set_plot_config"),r.register=t("./plot_api/register"),r.toImage=t("./plot_api/to_image"),r.downloadImage=t("./snapshot/download"),r.validate=t("./plot_api/validate"),r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.register(t("./traces/scatter")),r.register([t("./components/legend"),t("./components/annotations"),t("./components/shapes"),t("./components/images"),t("./components/updatemenus"),t("./components/sliders"),t("./components/rangeslider"),t("./components/rangeselector")]),r.Icons=t("../build/ploticon"),r.Plots=n.Plots,r.Fx=n.Fx,r.Snapshot=t("./snapshot"),r.PlotSchema=t("./plot_api/plot_schema"),r.Queue=t("./lib/queue"),r.d3=t("d3")},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":571,"./components/images":611,"./components/legend":619,"./components/rangeselector":631,"./components/rangeslider":637,"./components/shapes":644,"./components/sliders":650,"./components/updatemenus":656,"./fonts/mathjax_config":666,"./lib/queue":692,"./plot_api/plot_schema":708,"./plot_api/register":709,"./plot_api/set_plot_config":710,"./plot_api/to_image":712,"./plot_api/validate":713,"./plotly":714,"./snapshot":798,"./snapshot/download":795,"./traces/scatter":934,d3:104,"es6-promise":110}],666:[function(t,e,r){"use strict";"undefined"!=typeof MathJax?(r.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):r.MathJax=!1},{}],667:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){Array.isArray(t)&&(e[r]=t[n])}},{}],668:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../constants/numerical").BADNUM;e.exports=function(t){return"string"==typeof t&&(t=t.replace(/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,"")),n(t)?Number(t):i}},{"../constants/numerical":662,"fast-isnumeric":113}],669:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("tinycolor2"),a=t("../components/colorscale/get_scale"),o=(Object.keys(t("../components/colorscale/scales")),t("./nested_property")),s=/^([2-9]|[1-9][0-9]+)$/;r.valObjects={data_array:{coerceFunction:function(t,e,r){Array.isArray(t)?e.set(t):void 0!==r&&e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),n.values.indexOf(t)===-1?e.set(r):e.set(t)}},boolean:{coerceFunction:function(t,e,r){t===!0||t===!1?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;n.strict!==!0&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(a(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?(Math.abs(t)>180&&(t-=360*Math.round(t/360)),e.set(+t)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r){var n=r.length;if("string"==typeof t&&t.substr(0,n)===r&&s.test(t.substr(n)))return void e.set(t);e.set(r)},validateFunction:function(t,e){var r=e.dflt,n=r.length;return t===r||"string"==typeof t&&!(t.substr(0,n)!==r||!s.test(t.substr(n)))}},flaglist:{coerceFunction:function(t,e,r,n){if("string"!=typeof t)return void e.set(r);if((n.extras||[]).indexOf(t)!==-1)return void e.set(t);for(var i=t.split("+"),a=0;a0&&(o=o.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+o}return n}function l(t){return t.formatDate("yyyy")}function u(t){return t.formatDate("M yyyy")}function c(t){return t.formatDate("M d")}function h(t){return t.formatDate("M d, yyyy")}var f=t("d3"),d=t("fast-isnumeric"),p=t("./loggers").error,m=t("./mod"),g=t("../constants/numerical"),v=g.BADNUM,y=g.ONEDAY,b=g.ONEHOUR,x=g.ONEMIN,_=g.ONESEC,w=g.EPOCHJD,M=t("../registry"),A=f.time.format.utc,k=(new Date).getFullYear()-70;r.dateTick0=function(t,e){return n(t)?e?M.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:M.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"},r.dfltRange=function(t){return n(t)?M.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},r.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime};var T,S;r.dateTime2ms=function(t,e){if(r.isJSDate(t))return t=Number(t)-t.getTimezoneOffset()*x,t>=T&&t<=S?t:v;if("string"!=typeof t&&"number"!=typeof t)return v;t=String(t);var i=n(e),a=t.charAt(0);!i||"G"!==a&&"g"!==a||(t=t.substr(1),e="");var o=i&&"chinese"===e.substr(0,7),s=t.match(o?/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m:/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m);if(!s)return v;var l=s[1],u=s[3]||"1",c=Number(s[5]||1),h=Number(s[7]||0),f=Number(s[9]||0),d=Number(s[11]||0);if(i){if(2===l.length)return v;l=Number(l);var p;try{var m=M.getComponentMethod("calendars","getCal")(e);if(o){var g="i"===u.charAt(u.length-1);u=parseInt(u,10),p=m.newDate(l,m.toMonthIndex(l,u,g),c)}else p=m.newDate(l,Number(u),c)}catch(t){return v}return p?(p.toJD()-w)*y+h*b+f*x+d*_:v}l=2===l.length?(Number(l)+2e3-k)%100+k:Number(l),u-=1;var A=new Date(Date.UTC(2e3,u,c,h,f));return A.setUTCFullYear(l),A.getUTCMonth()!==u?v:A.getUTCDate()!==c?v:A.getTime()+d*_},T=r.MIN_MS=r.dateTime2ms("-9999"),S=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==v};var E=90*y,L=3*b,C=5*x;r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=T&&t<=S))return v;e||(e=0);var i,o,s,l,u,c,h=Math.floor(10*m(t+.05,1)),f=Math.round(t-h/10);if(n(r)){var d=Math.floor(f/y)+w,p=Math.floor(m(t,y));try{i=M.getComponentMethod("calendars","getCal")(r).fromJD(d).formatDate("yyyy-mm-dd")}catch(t){i=A("G%Y-%m-%d")(new Date(f))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=e=T+y&&t<=S-y))return v;var e=Math.floor(10*m(t+.05,1)),r=new Date(Math.round(t-e/10));return a(f.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,i){if(r.isJSDate(t)||"number"==typeof t){if(n(i))return p("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,i))return p("unrecognized date",t),e;return t};var D=/%\d?f/g,z=[59,59.9,59.99,59.999,59.9999],I=A("%Y"),P=A("%b %Y"),O=A("%b %-d"),R=A("%b %-d, %Y");r.formatDate=function(t,e,r,i){var a,f;if(i=n(i)&&i,e)return o(e,t,i);if(i)try{var d=Math.floor((t+.05)/y)+w,p=M.getComponentMethod("calendars","getCal")(i).fromJD(d);"y"===r?f=l(p):"m"===r?f=u(p):"d"===r?(a=l(p),f=c(p)):(a=h(p),f=s(t,r))}catch(t){return"Invalid"}else{var m=new Date(Math.floor(t+.05));"y"===r?f=I(m):"m"===r?f=P(m):"d"===r?(a=I(m),f=O(m)):(a=R(m),f=s(t,r))}return f+(a?"\n"+a:"")};var j=3*y;r.incrementMonth=function(t,e,r){r=n(r)&&r;var i=m(t,y);if(t=Math.round(t-i),r)try{var a=Math.round(t/y)+w,o=M.getComponentMethod("calendars","getCal")(r),s=o.fromJD(a);return e%12?o.add(s,e,"m"):o.add(s,e/12,"y"),(s.toJD()-w)*y+i}catch(e){p("invalid ms "+t+" in calendar "+r)}var l=new Date(t+j);return l.setUTCMonth(l.getUTCMonth()+e)+i-j},r.findExactDates=function(t,e){for(var r,i,a=0,o=0,s=0,l=0,u=n(e)&&M.getComponentMethod("calendars","getCal")(e),c=0;c0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n},r.makeLine=function(t,e){var r={};return r=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t},e&&(r.trace=e),r},r.makePolygon=function(t,e){var r={};if(1===t.length)r={type:"Polygon",coordinates:t};else{for(var n=new Array(t.length),i=0;i",e))>=0;){var r=t.indexOf("",e);if(r/g,"\n")}function a(t){return t.replace(/\<.*\>/g,"")}function o(t){for(var e=u.entityToUnicode,r=0;(r=t.indexOf("&",r))>=0;){var n=t.indexOf(";",r);if(nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},i.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},i.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o-1||1/0!==c&&c>=Math.pow(2,r)?t(e,r,n):l},i.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)},r["_"+e]=t,r},i.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,u=new Array(l),c=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*u[n];c[r]=a}return c},i.syncOrAsync=function(t,e,r){function n(){return i.syncOrAsync(t,e,r)}for(var a,o;t.length;)if(o=t.splice(0,1)[0],(a=o(e))&&a.then)return a.then(n).then(void 0,i.promiseError);return r&&r(e)},i.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},i.noneOrAll=function(t,e,r){if(t){var n,i,a=!1,o=!0;for(n=0;n1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l}},{"./clean_number":668,"./coerce":669,"./dates":670,"./extend":672,"./filter_unique":673,"./filter_visible":674,"./identity":679,"./is_array":681,"./is_plain_object":682,"./loggers":683,"./matrix":684,"./mod":685,"./nested_property":686,"./noop":687,"./notifier":688,"./push_unique":691,"./relink_private":693,"./search":694,"./stats":697,"./to_log_range":700,d3:104}],681:[function(t,e,r){"use strict";var n="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}};e.exports=function(t){return Array.isArray(t)||n.isView(t)}},{}],682:[function(t,e,r){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],683:[function(t,e,r){"use strict";function n(t,e){if(t.apply)t.apply(t,e);else for(var r=0;r1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;e=0;e--){if(n=t[e][0],a=t[e][1],l=!1,d(n))for(r=n.length-1;r>=0;r--)i(n[r],o(a,r))?l?n[r]=void 0:n.pop():l=!0;else if("object"==typeof n&&null!==n)for(s=Object.keys(n),l=!1,r=s.length-1;r>=0;r--)i(n[s[r]],o(a,s[r]))?delete n[s[r]]:l=!0;if(l)return}}function c(t){return void 0===t||null===t||"object"==typeof t&&(d(t)?!t.length:!Object.keys(t).length)}function h(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var f=t("fast-isnumeric"),d=t("./is_array"),p=t("./is_plain_object"),m=t("../plot_api/container_array_match");e.exports=function(t,e){if(f(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var r,i,o,s=0,l=e.split(".");s/g),s=0;sa||ns)&&(!e||!u(t))}function r(t,e){var r=t[0],l=t[1];if(ra||ls)return!1;var u,c,h,f,d,p=n.length,m=n[0][0],g=n[0][1],v=0;for(u=1;uMath.max(c,m)||l>Math.max(h,g)))if(lc||Math.abs(n(o,f))>i)return!0;return!1};i.filter=function(t,e){function r(r){t.push(r);var s=n.length,l=i;n.splice(o+1);for(var u=l+1;u1){r(t.pop())}return{addPt:r,raw:t,filtered:n}}},{"./matrix":684}],691:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;ra.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},o.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},o.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[], -sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},o.undo=function(t){var e,r;if(t.framework&&t.framework.isPolar)return void t.framework.undo();if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function o(t,e){return t>=e}var s=t("fast-isnumeric"),l=t("./loggers");r.findBin=function(t,e,r){if(s(e.start))return r?Math.ceil((t-e.start)/e.size)-1:Math.floor((t-e.start)/e.size);var u,c,h=0,f=e.length,d=0;for(c=e[e.length-1]>=e[0]?r?n:i:r?o:a;h90&&l.log("Long binary search..."),h-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,i=e[n]-e[0]||1,a=i/(n||1)/1e4,o=[e[0]],s=0;se[s]+a&&(i=Math.min(i,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:i}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;it.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{"fast-isnumeric":113}],698:[function(t,e,r){"use strict";function n(t){var e=i(t);return e.length?e:[0,0,0,1]}var i=t("color-rgba");e.exports=n},{"color-rgba":85}],699:[function(t,e,r){"use strict";function n(t,e){return t.node().getBoundingClientRect()[e]}function i(t){return t.replace(/(<|<|<)/g,"\\lt ").replace(/(>|>|>)/g,"\\gt ")}function a(t,e,r){var n="math-output-"+f.randstr([],64),a=h.select("body").append("div").attr({id:n}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(i(t));MathJax.Hub.Queue(["Typeset",MathJax.Hub,a.node()],function(){var e=h.select("body").select("#MathJax_SVG_glyphs");if(a.select(".MathJax_SVG").empty()||!a.select("svg").node())f.log("There was an error in the tex syntax.",t),r();else{var n=a.select("svg").node().getBoundingClientRect();r(a.select(".MathJax_SVG"),e,n)}a.remove()})}function o(t,e){for(var r=t||"",n=0;n]*>)/).map(function(t){var e=t.match(/<(\/?)([^ >]*)\s*(.*)>/i),n=e&&e[2].toLowerCase(),i=m[n];if(void 0!==i){var a=e[1],o=e[3],s=o.match(/^style\s*=\s*"([^"]+)"\s*/i);if("a"===n){if(a)return"
";if("href"!==o.substr(0,4).toLowerCase())return"";var u=o.substr(4).replace(/["']/g,"").replace(/=/,""),c=document.createElement("a");return c.href=u,g.indexOf(c.protocol)===-1?"":''}if("br"===n)return"
";if(a)return"sup"===n?'':"sub"===n?'':"";var h=""}return r.xml_entity_encode(t).replace(/");i>0;i=e.indexOf("
",i+1))n.push(i);var a=0;n.forEach(function(t){for(var r=t+a,n=e.slice(0,r),i="",o=n.length-1;o>=0;o--){var s=n[o].match(/<(\/?).*>/i);if(s&&"
"!==n[o]){s[1]||(i=n[o]);break}}i&&(e.splice(r+1,0,i),e.splice(r,0,""),a+=2)});var o=e.join(""),u=o.split(/
/gi);return u.length>1&&(e=u.map(function(t,e){return''+t+""})),e.join("")}function c(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||"top",l=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return i="bottom"===s?function(){return l.bottom-n.height}:"middle"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},a="right"===o?function(){return l.right-n.width}:"center"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:i()-u.top+"px",left:a()-u.left+"px","z-index":1e3}),this}}var h=t("d3"),f=t("../lib"),d=t("../constants/xmlns_namespaces"),p=t("../constants/string_mappings");h.selection.prototype.appendSVG=function(t){for(var e=['',t,""].join(""),r=(new DOMParser).parseFromString(e,"application/xml"),n=r.documentElement.firstChild;n;)this.node().appendChild(this.node().ownerDocument.importNode(n,!0)),n=n.nextSibling;return r.querySelector("parsererror")?(f.log(r.querySelector("parsererror div").textContent),null):h.select(this.node().lastChild)},r.html_entity_decode=function(t){var e=h.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":t.indexOf("<")!==-1||t.indexOf(">")!==-1?"":e.html(t).text()});return e.remove(),r},r.xml_entity_encode=function(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")},r.convertToTspans=function(t,e){function r(){d.empty()||(p=s.attr("class")+"-math",d.select("svg."+p).remove()),t.text("").style({visibility:"inherit","white-space":"pre"}),c=t.appendSVG(o),c||t.text(i),t.select("a").size()&&t.style("pointer-events","all"),e&&e.call(s)}var i=t.text(),o=u(i),s=t,l=!s.attr("data-notex")&&o.match(/([^$]*)([$]+[^$]*[$]+)([^$]*)/),c=i,d=h.select(s.node().parentNode);if(!d.empty()){var p=s.attr("class")?s.attr("class").split(" ")[0]:"text";p+="-math",d.selectAll("svg."+p).remove(),d.selectAll("g."+p+"-group").remove(),t.style({visibility:null});for(var m=t.node();m&&m.removeAttribute;m=m.parentNode)m.removeAttribute("data-bb");if(l){var g=f.getPlotDiv(s.node());(g&&g._promises||[]).push(new Promise(function(t){s.style({visibility:"hidden"});var i={fontSize:parseInt(s.style("font-size"),10)};a(l[2],i,function(i,a,o){d.selectAll("svg."+p).remove(),d.selectAll("g."+p+"-group").remove();var l=i&&i.select("svg");if(!l||!l.node())return r(),void t();var u=d.append("g").classed(p+"-group",!0).attr({"pointer-events":"none"});u.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild),l.attr({class:p,height:o.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=s.style("fill")||"black";l.select("g").attr({fill:c,stroke:c});var h=n(l,"width"),f=n(l,"height"),m=+s.attr("x")-h*{start:0,middle:.5,end:1}[s.attr("text-anchor")||"start"],g=parseInt(s.style("font-size"),10)||n(s,"height"),v=-g/4;"y"===p[0]?(u.attr({transform:"rotate("+[-90,+s.attr("x"),+s.attr("y")]+") translate("+[-h/2,v-f/2]+")"}),l.attr({x:+s.attr("x"),y:+s.attr("y")})):"l"===p[0]?l.attr({x:s.attr("x"),y:v-f/2}):"a"===p[0]?l.attr({x:0,y:v}):l.attr({x:m,y:+s.attr("y")+v-f/2}),e&&e.call(s,u),t(u)})}))}else r();return t}};var m={sup:'font-size:70%" dy="-0.6em',sub:'font-size:70%" dy="0.3em',b:"font-weight:bold",i:"font-style:italic",a:"",span:"",br:"",em:"font-style:italic;font-weight:bold"},g=["http:","https:","mailto:"],v=new RegExp("]*)?/?>","g"),y=Object.keys(p.entityToUnicode).map(function(t){return{regExp:new RegExp("&"+t+";","g"),sub:p.entityToUnicode[t]}}),b=Object.keys(p.unicodeToEntity).map(function(t){return{regExp:new RegExp(t,"g"),sub:"&"+p.unicodeToEntity[t]+";"}}),x=/(\r\n?|\n)/g;r.plainText=function(t){return(t||"").replace(v," ")},r.makeEditable=function(t,e,r){function n(){a(),o.style({opacity:0});var t,e=u.attr("class");(t=e?"."+e.split(" ")[0]+"-math-group":"[class*=-math-group]")&&h.select(o.node().parentNode).select(t).style({opacity:0})}function i(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}function a(){var t=f.getPlotDiv(o.node()),e=h.select(t),n=e.select(".svg-container"),a=n.append("div");a.classed("plugin-editable editable",!0).style({position:"absolute","font-family":o.style("font-family")||"Arial","font-size":o.style("font-size")||12,color:r.fill||o.style("fill")||"black",opacity:1,"background-color":r.background||"transparent",outline:"#ffffff33 1px solid",margin:[-parseFloat(o.style("font-size"))/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(r.text||o.attr("data-unformatted")).call(c(o,n,r)).on("blur",function(){t._editing=!1,o.text(this.textContent).style({opacity:1});var e,r=h.select(this).attr("class");(e=r?"."+r.split(" ")[0]+"-math-group":"[class*=-math-group]")&&h.select(o.node().parentNode).select(e).style({opacity:0});var n=this.textContent;h.select(this).transition().duration(0).remove(),h.select(document).on("mouseup",null),s.edit.call(o,n)}).on("focus",function(){var e=this;t._editing=!0,h.select(document).on("mouseup",function(){if(h.event.target===e)return!1;document.activeElement===a.node()&&a.node().blur()})}).on("keyup",function(){27===h.event.which?(t._editing=!1,o.style({opacity:1}),h.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),s.cancel.call(o,this.textContent)):(s.input.call(o,this.textContent),h.select(this).call(c(o,n,r)))}).on("keydown",function(){13===h.event.which&&this.blur()}).call(i)}r||(r={});var o=this,s=h.dispatch("edit","input","cancel"),l=h.select(this.node()).style({"pointer-events":"all"}),u=e||l;return e&&l.style({"pointer-events":"none"}),r.immediate?n():u.on("click",n),h.rebind(this,s,"on")}},{"../constants/string_mappings":663,"../constants/xmlns_namespaces":664,"../lib":680,d3:104}],700:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{"fast-isnumeric":113}],701:[function(t,e,r){"use strict";var n=e.exports={},i=t("../plots/geo/constants").locationmodeToLayer,a=t("topojson-client").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{"../plots/geo/constants":741,"topojson-client":513}],702:[function(t,e,r){"use strict";function n(t,e){for(var r=new Float32Array(e),n=0;n0)return t.substr(0,e)}var s=t("fast-isnumeric"),l=t("gl-mat4/fromQuat"),u=t("../registry"),c=t("../lib"),h=t("../plots/plots"),f=t("../plots/cartesian/axes"),d=t("../components/color");r.getGraphDiv=function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null===t||void 0===t)throw new Error("DOM element provided is null or undefined");return t},r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&c.log("Clearing previous rejected promises from queue."),t._promises=[]},r.cleanLayout=function(t){var e,r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1);var i=f.list({_fullLayout:t});for(e=0;e3?(g.x=1.02,g.xanchor="left"):g.x<-2&&(g.x=-.02,g.xanchor="right"),g.y>3?(g.y=1.02,g.yanchor="bottom"):g.y<-2&&(g.y=-.02,g.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var v=h.getSubplotIds(t,"gl3d");for(e=0;e1&&o.warn("Full array edits are incompatible with other edits",c);var v=r[""][""];if(u(v))e.set(null);else{if(!Array.isArray(v))return o.warn("Unrecognized full array edit value",c,v),!0;e.set(v)}return!p&&(h(m,g),f(t),!0)}var y,b,x,_,w,M,A,k=Object.keys(r).map(Number).sort(),T=e.get(),S=T||[],E=n(g,c).get(),L=[],C=-1,D=S.length;for(y=0;yS.length-(A?0:1))o.warn("index out of range",c,x);else if(void 0!==M)w.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",c,x),u(M)?L.push(x):A?("add"===M&&(M={}),S.splice(x,0,M),E&&E.splice(x,0,{})):o.warn("Unrecognized full object edit value",c,x,M),C===-1&&(C=x);else for(b=0;b=0;y--)S.splice(L[y],1),E&&E.splice(L[y],1);if(S.length?T||e.set(S):e.set(null),p)return!1;if(h(m,g),d!==a){var z;if(C===-1)z=k;else{for(D=Math.max(S.length,D),z=[],y=0;y=C);y++)z.push(x);for(y=C;y=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function l(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),s(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&s(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function u(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&lR.range[0]?[1,2]:[2,1]);else{var N=R.range[0],B=R.range[1];j?(N<=0&&B<=0&&r(z+".autorange",!0),N<=0?N=B/1e6:B<=0&&(B=N/1e6),r(z+".range[0]",Math.log(N)/Math.LN10),r(z+".range[1]",Math.log(B)/Math.LN10)):(r(z+".range[0]",Math.pow(10,N)),r(z+".range[1]",Math.pow(10,B)))}else r(z+".autorange",!0);w.getComponentMethod("annotations","convertCoords")(t,O,A,r),w.getComponentMethod("images","convertCoords")(t,O,A,r)}else r(z+".autorange",!0)}else if(E.match(I.AX_NAME_PATTERN)){var U=b.nestedProperty(l,x).get(),V=(A||{}).type;V&&"-"!==V||(V="linear"),w.getComponentMethod("annotations","convertCoords")(t,U,V,r),w.getComponentMethod("images","convertCoords")(t,U,V,r)}var H=C.containerArrayMatch(x);if(H){i=H.array,a=H.index;var q=H.property,G=b.nestedProperty(s,i),Y=(G||[])[a]||{};if(""===a)x.indexOf("updatemenus")===-1&&(m.docalc=!0);else if(""===q){var W=A;C.isAddVal(A)?v[x]=null:C.isRemoveVal(A)?(v[x]=Y,W=Y):b.warn("unrecognized full object value",e),(n(W,"x")||n(W,"y")&&x.indexOf("updatemenus")===-1)&&(m.docalc=!0)}else!n(Y,"x")&&!n(Y,"y")||b.containsAny(x,["color","opacity","align","dash","updatemenus"])||(m.docalc=!0);h[i]||(h[i]={});var X=h[i][a];X||(X=h[i][a]={}),X[q]=A,delete e[x]}else if("reverse"===E)P.range?P.range.reverse():(r(z+".autorange",!0),P.range=[1,0]),O.autorange?m.docalc=!0:m.doplot=!0;else{var Z=String(_.parts[1]||"");0===S.indexOf("scene")?"camera"===_.parts[1]?m.docamera=!0:m.doplot=!0:0===S.indexOf("geo")?m.doplot=!0:0===S.indexOf("ternary")?m.doplot=!0:"paper_bgcolor"===x?m.doplot=!0:!l._has("gl2d")||x.indexOf("axis")===-1&&"plot_bgcolor"!==x?"hiddenlabels"===x?m.docalc=!0:S.indexOf("legend")!==-1?m.dolegend=!0:x.indexOf("title")!==-1?m.doticks=!0:S.indexOf("bgcolor")!==-1?m.dolayoutstyle=!0:k>1&&b.containsAny(Z,["tick","exponent","grid","zeroline"])?m.doticks=!0:x.indexOf(".linewidth")!==-1&&x.indexOf("axis")!==-1?m.doticks=m.dolayoutstyle=!0:k>1&&Z.indexOf("line")!==-1?m.dolayoutstyle=!0:k>1&&"mirror"===Z?m.doticks=m.dolayoutstyle=!0:"margin.pad"===x?m.doticks=m.dolayoutstyle=!0:"margin"===S||"autorange"===Z||"rangemode"===Z||"type"===Z||"domain"===Z||x.indexOf("calendar")!==-1||x.match(/^(bar|box|font)/)?m.docalc=!0:["hovermode","dragmode"].indexOf(x)!==-1?m.domodebar=!0:["hovermode","dragmode","height","width","autosize"].indexOf(x)===-1&&(m.doplot=!0):m.doplot=!0,_.set(A)}}}for(i in h){C.applyContainerArrayChanges(t,b.nestedProperty(s,i),h[i],m)||(m.doplot=!0)}var J=t._fullLayout.width,K=t._fullLayout.height;return t.layout.autosize&&M.plotAutoSize(t,t.layout,t._fullLayout),(e.height||e.width||t._fullLayout.width!==J||t._fullLayout.height!==K)&&(m.docalc=!0),(m.doplot||m.docalc)&&(m.layoutReplot=!0),{flags:m,undoit:v,redoit:g,eventData:b.extendDeep({},g)}}function m(t){var e=g.select(t),r=t._fullLayout;if(r._container=e.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([0]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n=[];g.selectAll("defs").each(function(){this.id&&n.push(this.id.split("-")[1])}),r._uid=b.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(E.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0);var a=r._paper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._toppaper.append("g").classed("hoverlayer",!0),t.emit("plotly_framework")}var g=t("d3"),v=t("fast-isnumeric"),y=t("../plotly"),b=t("../lib"),x=t("../lib/events"),_=t("../lib/queue"),w=t("../registry"),M=t("../plots/plots"),A=t("../plots/cartesian/graph_interact"),k=t("../plots/polar"),T=t("../components/drawing"),S=t("../components/errorbars"),E=t("../constants/xmlns_namespaces"),L=t("../lib/svg_text_utils"),C=t("./manage_arrays"),D=t("./helpers"),z=t("./subroutines"),I=t("../plots/cartesian/constants");y.plot=function(t,e,r,n){function o(){if(v)return y.addFrames(t,v)}function s(){for(var e=E._basePlotModules,r=0;r=s.length?s[0]:s[t]:s}function i(t){return Array.isArray(l)?t>=l.length?l[0]:l[t]:l}function a(t,e){var r=0;return function(){if(t&&++r===e)return t()}}if(t=D.getGraphDiv(t),!b.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var o=t._transitionData;o._frameQueue||(o._frameQueue=[]),r=M.supplyAnimationDefaults(r);var s=r.transition,l=r.frame;return void 0===o._frameWaitingCnt&&(o._frameWaitingCnt=0),new Promise(function(l,u){function c(){t.emit("plotly_animated"),window.cancelAnimationFrame(o._animationRaf),o._animationRaf=null}function h(){o._currentFrame&&o._currentFrame.onComplete&&o._currentFrame.onComplete();var e=o._currentFrame=o._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,o._lastFrameAt=Date.now(),o._timeToNext=e.frameOpts.duration,M.transition(t,e.frame.data,e.frame.layout,D.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else c()}function f(){t.emit("plotly_animating"),o._lastFrameAt=-1/0,o._timeToNext=0,o._runningTransitions=0,o._currentFrame=null;var e=function(){o._animationRaf=window.requestAnimationFrame(e),Date.now()-o._lastFrameAt>o._timeToNext&&h()};e()}function d(t){return Array.isArray(s)?g>=s.length?t.transitionOpts=s[g]:t.transitionOpts=s[0]:t.transitionOpts=s,g++,t}var p,m,g=0,v=[],y=void 0===e||null===e,x=Array.isArray(e);if(y||x||!b.isPlainObject(e)){if(y||["string","number"].indexOf(typeof e)!==-1)for(p=0;p0&&AA)&&k.push(m);v=k}}v.length>0?function(e){if(0!==e.length){for(var s=0;s=0;i--)if(b.isPlainObject(e[i])){var f=(u[e[i].name]||{}).name,d=e[i].name;f&&d&&"number"==typeof d&&u[f]&&(n++,b.warn('addFrames: overwriting frame "'+u[f].name+'" with a frame whose name of type "number" also equates to "'+f+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),n>5&&b.warn("addFrames: This API call has yielded too many warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),h.push({frame:M.supplyFrameDefaults(e[i]),index:r&&void 0!==r[i]&&null!==r[i]?r[i]:c+i})}h.sort(function(t,e){return t.index>e.index?-1:t.index=0;i--){if(a=h[i].frame,"number"==typeof a.name&&b.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+t._transitionData._counter++];);if(u[a.name]){for(o=0;o=0;r--)n=e[r],a.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:i[n]});var s=M.modifyFrames,l=M.modifyFrames,u=[t,o],c=[t,a];return _&&_.add(t,s,u,l,c),M.modifyFrames(t,a)},y.purge=function(t){t=D.getGraphDiv(t);var e=t._fullLayout||{},r=t._fullData||[];return M.cleanPlot([],{},r,e),M.purge(t),x.purge(t),e._container&&e._container.remove(),delete t._context,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,delete t._hmpixcount,delete t._hmlumcount,t}},{"../components/drawing":598,"../components/errorbars":604,"../constants/xmlns_namespaces":664,"../lib":680,"../lib/events":671,"../lib/queue":692,"../lib/svg_text_utils":699,"../plotly":714,"../plots/cartesian/constants":724,"../plots/cartesian/graph_interact":726,"../plots/plots":778,"../plots/polar":781,"../registry":793,"./helpers":704,"./manage_arrays":705,"./subroutines":711,d3:104,"fast-isnumeric":113}],707:[function(t,e,r){"use strict";function n(t,r){try{t._fullLayout._paper.style("background",r)}catch(t){e.exports.logging>0&&console.error(t)}}e.exports={staticPlot:!1,editable:!1,autosizable:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:"reset+autosize",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:"Edit chart",showSources:!1,displayModeBar:"hover",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,displaylogo:!0,plotGlPixelRatio:2,setBackground:n,topojsonURL:"https://cdn.plot.ly/",mapboxAccessToken:null,logging:!1,globalTransforms:[]}},{}],708:[function(t,e,r){"use strict";function n(t){var e,r;"area"===t?(e={attributes:b},r={}):(e=d.modules[t]._module,r=e.basePlotModule);var n={};n.type=null,w(n,m),w(n,e.attributes),r.attributes&&w(n,r.attributes),Object.keys(d.componentsRegistry).forEach(function(e){var r=d.componentsRegistry[e];r.schema&&r.schema.traces&&r.schema.traces[t]&&Object.keys(r.schema.traces[t]).forEach(function(e){f(n,r.schema.traces[t][e],e)})}),n.type=t;var i={meta:e.meta||{},attributes:s(n)};if(e.layoutAttributes){var a={};w(a,e.layoutAttributes),i.layoutAttributes=s(a)}return i}function i(){var t={};return w(t,g),Object.keys(d.subplotsRegistry).forEach(function(e){var r=d.subplotsRegistry[e];if(r.layoutAttributes)if("cartesian"===r.name)h(t,r,"xaxis"),h(t,r,"yaxis");else{var n="subplot"===r.attr?r.name:r.attr;h(t,r,n)}}),t=c(t),Object.keys(d.componentsRegistry).forEach(function(e){var r=d.componentsRegistry[e];r.layoutAttributes&&(r.schema&&r.schema.layout?Object.keys(r.schema.layout).forEach(function(e){f(t,r.schema.layout[e],e)}):f(t,r.layoutAttributes,r.name))}),{layoutAttributes:s(t)}}function a(t){var e=d.transformsRegistry[t],r=w({},e.attributes);return Object.keys(d.componentsRegistry).forEach(function(e){var n=d.componentsRegistry[e];n.schema&&n.schema.transforms&&n.schema.transforms[t]&&Object.keys(n.schema.transforms[t]).forEach(function(e){f(r,n.schema.transforms[t][e],e)})}),{attributes:s(r)}}function o(){var t={frames:p.extendDeep({},v)};return s(t),t.frames}function s(t){return l(t),u(t),t}function l(t){function e(t){return{valType:"string"}}function n(t,n,i){r.isValObject(t)?"data_array"===t.valType?(t.role="data",i[n+"src"]=e(n)):t.arrayOk===!0&&(i[n+"src"]=e(n)):p.isPlainObject(t)&&(t.role="object")}r.crawl(t,n)}function u(t){function e(t,e,r){if(t){var n=t[A];n&&(delete t[A],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}r.crawl(t,e)}function c(t){return _(t,{radialaxis:x.radialaxis,angularaxis:x.angularaxis}),_(t,x.layout),t}function h(t,e,r){var n=p.nestedProperty(t,r),i=w({},e.layoutAttributes);i[M]=!0,n.set(i)}function f(t,e,r){var n=p.nestedProperty(t,r);n.set(w(n.get()||{},e))}var d=t("../registry"),p=t("../lib"),m=t("../plots/attributes"),g=t("../plots/layout_attributes"),v=t("../plots/frame_attributes"),y=t("../plots/animation_attributes"),b=t("../plots/polar/area_attributes"),x=t("../plots/polar/axis_attributes"),_=p.extendFlat,w=p.extendDeep,M="_isSubplotObj",A="_isLinkedToArray",k=[M,A,"_arrayAttrRegexps","_deprecated"];r.IS_SUBPLOT_OBJ=M,r.IS_LINKED_TO_ARRAY=A,r.DEPRECATED="_deprecated",r.UNDERSCORE_ATTRS=k,r.get=function(){var t={};d.allTypes.concat("area").forEach(function(e){t[e]=n(e)});var e={};return Object.keys(d.transformsRegistry).forEach(function(t){e[t]=a(t)}),{defs:{valObjects:p.valObjects,metaKeys:k.concat(["description","role"])},traces:t,layout:i(),transforms:e,frames:o(),animation:s(y)}},r.crawl=function(t,e,n){var i=n||0;Object.keys(t).forEach(function(n){var a=t[n];k.indexOf(n)===-1&&(e(a,n,t,i),r.isValObject(a)||p.isPlainObject(a)&&r.crawl(a,e,i+1))})},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){function e(e,r,o,s){if(a=a.slice(0,s).concat([r]),e&&("data_array"===e.valType||e.arrayOk===!0)){var l=n(a),u=p.nestedProperty(t,l).get();Array.isArray(u)&&i.push(l)}}function n(t){return t.join(".")}var i=[],a=[];if(r.crawl(t._module.attributes,e),t.transforms)for(var o=t.transforms,s=0;s=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}var i=t("d3"),a=t("../plotly"),o=t("../registry"),s=t("../plots/plots"),l=t("../lib"),u=t("../components/color"),c=t("../components/drawing"),h=t("../components/titles"),f=t("../components/modebar");r.layoutStyles=function(t){return l.syncOrAsync([s.doAutoMargin,r.lsInner],t)},r.lsInner=function(t){var e,o=t._fullLayout,s=o._size,l=a.Axes.list(t);for(e=0;e1)};f(e.width)&&f(e.height)||n(new Error("Height and width should be pixel values."));var d=l(t,{format:"png",height:e.height,width:e.width}),p=d.gd;p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var m=s.getRedrawFunc(p);a.plot(p,d.data,d.layout,d.config).then(m).then(h).then(function(t){r(t)}).catch(function(t){n(t)})})}var i=t("fast-isnumeric"),a=t("../plotly"),o=t("../lib"),s=t("../snapshot/helpers"),l=t("../snapshot/cloneplot"),u=t("../snapshot/tosvg"),c=t("../snapshot/svgtoimg");e.exports=n},{"../lib":680,"../plotly":714,"../snapshot/cloneplot":794,"../snapshot/helpers":797,"../snapshot/svgtoimg":799,"../snapshot/tosvg":801,"fast-isnumeric":113}],713:[function(t,e,r){"use strict";function n(t,e,r,i,a,u){u=u||[];for(var c=Object.keys(t),f=0;f1&&l.push(o("object","layout"))),f.supplyDefaults(u);for(var c=u._fullData,g=r.length,v=0;v.3*h||a(n)||a(i))){var f=r.dtick/2;t+=t+f.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=O.tickIncrement(t,"M6","reverse")+1.5*C:a.exactMonths>.8?t=O.tickIncrement(t,"M1","reverse")+15.5*C:t-=C/2;var s=O.tickIncrement(t,r);if(s<=n)return s}return t}function a(t){var e,r,n=t.tickvals,i=t.ticktext,a=new Array(n.length),o=_.simpleMap(t.range,t.r2l),s=1.0001*o[0]-1e-4*o[1],u=1.0001*o[1]-1e-4*o[0],c=Math.min(s,u),h=Math.max(s,u),f=0;Array.isArray(i)||(i=[]);var d="category"===t.type?t.d2l_noadd:t.d2l;for("log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1)),r=0;rc&&e10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=C&&i<=10||e>=15*C)t._tickround="d";else if(e>=z&&i<=16||e>=D)t._tickround="M";else if(e>=I&&i<=19||e>=z)t._tickround="S";else{var a=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,a)-20}}else if(b(e)||"L"===e.charAt(0)){var o=t.range.map(t.r2d||Number);b(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01);Math.abs(l)>3&&("SI"===t.exponentformat||"B"===t.exponentformat?t._tickexponent=3*Math.round((l-1)/3):t._tickexponent=l)}else t._tickround=null}function l(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}function u(t,e,r,n){var i=t._tickround,a=r&&t.hoverformat||t.tickformat;n&&(i=b(i)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o,s=_.formatDate(e.x,a,i,t.calendar),l=s.indexOf("\n");l!==-1&&(o=s.substr(l+1),s=s.substr(0,l)),n&&("00:00:00"===s||"00:00"===s?(s=o,o=""):8===s.length&&(s=s.replace(/:00$/,""))),o&&(r?"d"===i?s+=", "+o:s=o+(s?", "+s:""):t._inCalcTicks&&o===t._prevDateHead||(s+="
"+o,t._prevDateHead=o)),e.text=s}function c(t,e,r,n,i){var a=t.dtick,o=e.x;if(!n||"string"==typeof a&&"L"===a.charAt(0)||(a="L3"),t.tickformat||"string"==typeof a&&"L"===a.charAt(0))e.text=d(Math.pow(10,o),t,i,n);else if(b(a)||"D"===a.charAt(0)&&_.mod(o+.01,1)<.1)if(["e","E","power"].indexOf(t.exponentformat)!==-1){var s=Math.round(o);e.text=0===s?1:1===s?"10":s>1?"10"+s+"":"10\u2212"+-s+"",e.fontSize*=1.25}else e.text=d(Math.pow(10,o),t,"","fakehover"),"D1"===a&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6);else{if("D"!==a.charAt(0))throw"unrecognized dtick "+String(a);e.text=String(Math.round(Math.pow(10,_.mod(o,1)))),e.fontSize*=.75}if("D1"===t.dtick){var l=String(e.text).charAt(0);"0"!==l&&"1"!==l||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(o<0?.5:.25)))}}function h(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}function f(t,e,r,n,i){"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=d(e.x,t,i,n)}function d(t,e,r,n){var i=t<0,a=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,u=e.tickformat,c=e.separatethousands;if(n){var h={exponentformat:e.exponentformat,dtick:"none"===e.showexponent?e.dtick:b(t)?Math.abs(t)||1:1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};s(h),a=(Number(h._tickround)||0)+4,l=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return y.format(u)(t).replace(/-/g,"\u2212");var f=Math.pow(10,-a)/2;if("none"===o&&(l=0),(t=Math.abs(t))12||l<-15)?t+="e"+m:"E"===o?t+="E"+m:"power"===o?t+="\xd710"+m+"":"B"===o&&9===l?t+="B":"SI"!==o&&"B"!==o||(t+=H[l/3+5])}return i?"\u2212"+t:t}function p(t,e){var r,n,i=[];for(r=0;r1)for(n=1;n2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},O.getAutoRange=function(t){var e,r=[],n=t._min[0].val,i=t._max[0].val;for(e=1;e0&&c>0&&h/c>f&&(l=o,u=s,f=h/c);if(n===i){var m=n-1,g=n+1;r="tozero"===t.rangemode?n<0?[m,0]:[0,g]:"nonnegative"===t.rangemode?[Math.max(0,m),Math.max(0,g)]:[m,g]}else f&&("linear"!==t.type&&"-"!==t.type||("tozero"===t.rangemode?(l.val>=0&&(l={val:0,pad:0}),u.val<=0&&(u={val:0,pad:0})):"nonnegative"===t.rangemode&&(l.val-f*l.pad<0&&(l={val:0,pad:0}),u.val<0&&(u={val:1,pad:0})),f=(u.val-l.val)/(t._length-l.pad-u.pad)),r=[l.val-f*l.pad,u.val+f*u.pad]);return r[0]===r[1]&&("tozero"===t.rangemode?r=r[0]<0?[r[0],0]:r[0]>0?[0,r[0]]:[0,1]:(r=[r[0]-1,r[0]+1],"nonnegative"===t.rangemode&&(r[0]=Math.max(0,r[0])))),d&&r.reverse(),_.simpleMap(r,t.l2r||Number)},O.doAutoRange=function(t){t._length||t.setScale();var e=t._min&&t._max&&t._min.length&&t._max.length;if(t.autorange&&e){t.range=O.getAutoRange(t);var r=t._input;r.range=t.range.slice(),r.autorange=t.autorange}},O.saveRangeInitial=function(t,e){for(var r=O.list(t,"",!0),n=!1,i=0;i=f?d=!1:s.val>=u&&s.pad<=f&&(t._min.splice(o,1),o--);d&&t._min.push({val:u,pad:y&&0===u?0:f})}if(n(c)){for(d=!0,o=0;o=c&&s.pad>=h?d=!1:s.val<=c&&s.pad<=h&&(t._max.splice(o,1),o--);d&&t._max.push({val:c,pad:y&&0===c?0:h})}}}if((t.autorange||!!_.nestedProperty(t,"rangeslider.autorange").get())&&e){t._min||(t._min=[]),t._max||(t._max=[]),r||(r={}),t._m||t.setScale();var a,o,s,l,u,c,h,f,d,p,m,g=e.length,v=r.padded?.05*t._length:0,y=r.tozero&&("linear"===t.type||"-"===t.type),x=n((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),w=n((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),M=n(r.vpadplus||r.vpad),A=n(r.vpadminus||r.vpad);for(a=0;a<6;a++)i(a);for(a=g-1;a>5;a--)i(a)}},O.autoBin=function(t,e,r,a,o){var s=_.aggNums(Math.min,null,t),l=_.aggNums(Math.max,null,t);if(o||(o=e.calendar),"category"===e.type)return{start:s-.5,end:l+.5,size:1};var u;if(r)u=(l-s)/r;else{var c=_.distinctVals(t),h=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),f=h*_.roundUp(c.minDiff/h,[.9,1.9,4.9,9.9],!0);u=Math.max(f,2*_.stdev(t)/Math.pow(t.length,a?.25:.4)),b(u)||(u=1)}var d;d="log"===e.type?{type:"linear",range:[s,l]}:{type:e.type,range:_.simpleMap([s,l],e.c2r,0,o),calendar:o},O.setConvert(d),O.autoTicks(d,u);var p,m=O.tickIncrement(O.tickFirst(d),d.dtick,"reverse",o);if("number"==typeof d.dtick){m=n(m,t,d,s,l);p=m+(1+Math.floor((l-m)/d.dtick))*d.dtick}else for("M"===d.dtick.charAt(0)&&(m=i(m,t,d.dtick,s,o)),p=m;p<=l;)p=O.tickIncrement(p,d.dtick,!1,o);return{start:e.c2r(m,0,o),end:e.c2r(p,0,o),size:d.dtick}},O.calcTicks=function(t){var e=_.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=_.constrain(t._length/r,4,9)+1)),"array"===t.tickmode&&(n*=100),O.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}if(t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),s(t),"array"===t.tickmode)return a(t);t._tmin=O.tickFirst(t);var i=e[1]=l:u<=l)&&(o.push(u),!(o.length>1e3));u=O.tickIncrement(u,t.dtick,i,t.calendar));t._tmax=o[o.length-1],t._prevDateHead="",t._inCalcTicks=!0;for(var c=new Array(o.length),h=0;hE?(e/=E,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="M"+12*o(e,r,j)):n>L?(e/=L,t.dtick="M"+o(e,1,F)):n>C?(t.dtick=o(e,C,B),t.tick0=_.dateTick0(t.calendar,!0)):n>D?t.dtick=o(e,D,F):n>z?t.dtick=o(e,z,N):n>I?t.dtick=o(e,I,N):(r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=o(e,r,j))}else if("log"===t.type){t.tick0=0;var i=_.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(i[1]-i[0])<1){var a=1.5*Math.abs((i[1]-i[0])/e);e=Math.abs(Math.pow(10,i[1])-Math.pow(10,i[0]))/a,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="L"+o(e,r,j)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):(t.tick0=0,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=o(e,r,j));if(0===t.dtick&&(t.dtick=1),!b(t.dtick)&&"string"!=typeof t.dtick){var s=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(s)}},O.tickIncrement=function(t,e,r,n){var i=r?-1:1;if(b(e))return t+i*e;var a=e.charAt(0),o=i*Number(e.substr(1));if("M"===a)return _.incrementMonth(t,o,n);if("L"===a)return Math.log(Math.pow(10,t)+o)/Math.LN10;if("D"===a){var s="D2"===e?V:U,l=t+.01*i,u=_.roundUp(_.mod(l,1),s,r);return Math.floor(l)+Math.log(y.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(e)},O.tickFirst=function(t){var e=t.r2l||Number,r=_.simpleMap(t.range,e),n=r[1]1&&e2*i}function a(t){for(var e,r=Math.max(1,(t.length-1)/1e3),n=0,i=0,a=0;a2*n}var o=t("fast-isnumeric"),s=t("../../lib"),l=t("../../constants/numerical").BADNUM;e.exports=function(t,e){return i(t,e)?"date":a(t)?"category":n(t)?"linear":"-"}},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],721:[function(t,e,r){"use strict";function n(t,e){if("-"===t.type){var r=t._id,n=r.charAt(0);r.indexOf("scene")!==-1&&(r=n);var s=o(e,r,n);if(s){if("histogram"===s.type&&n==={v:"y",h:"x"}[s.orientation||"v"])return void(t.type="linear");var u=n+"calendar",c=s[u];if(a(s,n)){for(var h,f=i(s),d=[],p=0;p0;a&&(n="array");var o=r("categoryorder",n);"array"===o&&r("categoryarray"),a||"array"!==o||(e.categoryorder="trace")}}},{}],724:[function(t,e,r){"use strict";e.exports={idRegex:{x:/^x([2-9]|[1-9][0-9]+)?$/,y:/^y([2-9]|[1-9][0-9]+)?$/},attrRegex:{x:/^xaxis([2-9]|[1-9][0-9]+)?$/,y:/^yaxis([2-9]|[1-9][0-9]+)?$/},xAxisMatch:/^xaxis[0-9]*$/,yAxisMatch:/^yaxis[0-9]*$/,AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,MAXDIST:20,YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,BENDPX:1.5,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4]}},{}],725:[function(t,e,r){"use strict";function n(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,s.format("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,s.format("."+String(r)+"g")(n))}function i(t,e){return t?"nsew"===t?"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function a(t){s.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function o(t){return["lasso","select"].indexOf(t)!==-1}var s=t("d3"),l=t("tinycolor2"),u=t("../../plotly"),c=t("../../registry"),h=t("../../lib"),f=t("../../lib/svg_text_utils"),d=t("../../components/color"),p=t("../../components/drawing"),m=t("../../lib/setcursor"),g=t("../../components/dragelement"),v=t("./axes"),y=t("./select"),b=t("./constants"),x=!0;e.exports=function(t,e,r,s,_,w,M,A){function k(t,e){for(var r=0;r.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+mt+", "+gt+")").attr("d",ut+"Z"),dt=pt.append("path").attr("class","zoombox-corners").style({fill:d.background,stroke:d.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+mt+", "+gt+")").attr("d","M0,0Z"),E()}function E(){pt.selectAll(".select-outline").remove()}function L(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(H,e+at)),i=Math.max(0,Math.min(q,r+ot)),a=Math.abs(n-at),o=Math.abs(i-ot),s=Math.floor(Math.min(o,a,Y)/2);st.l=Math.min(at,n),st.r=Math.max(at,n),st.t=Math.min(ot,i),st.b=Math.max(ot,i),!$||o.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),dt.transition().style("opacity",1).duration(200),ct=!0)}function C(t,e,r){var n,i,a,o;for(n=0;nzoom back out","long"),x=!1)}function z(e,r){var i=1===(M+A).length;if(e)j();else if(2!==r||i){if(1===r&&i){var a=M?V[0]:U[0],o="s"===M||"w"===A?0:1,s=a._name+".range["+o+"]",l=n(a,o),c="left",h="middle";if(a.fixedrange)return;M?(h="n"===M?"top":"bottom","right"===a.side&&(c="right")):"e"===A&&(c="right"),t._context.showAxisRangeEntryBoxes&&rt.call(f.makeEditable,null,{immediate:!0,background:N.paper_bgcolor,text:String(l),fill:a.tickfont?a.tickfont.color:"#444",horizontalAlign:c,verticalAlign:h}).on("edit",function(e){var r=a.d2r(e);void 0!==r&&u.relayout(t,s,r)})}}else R()}function I(e){function r(t,e,r){function n(e){return t.l2r(a+(e-a)*r)}if(!t.fixedrange){var i=h.simpleMap(t.range,t.r2l),a=i[0]+(i[1]-i[0])*e;t.range=i.map(n)}}if(t._context.scrollZoom||N._enablescrollzoom){if(t._transitioningWithDuration)return h.pauseEvent(e);var n=t.querySelector(".plotly");if(T(),!(n.scrollHeight-n.clientHeight>10||n.scrollWidth-n.clientWidth>10)){clearTimeout(yt);var i=-e.deltaY;if(isFinite(i)||(i=e.wheelDelta/10),!isFinite(i))return void h.log("Did not find wheel motion attributes: ",e);var a,o=Math.exp(-Math.min(Math.max(i,-20),20)/100),s=xt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),l=(e.clientX-s.left)/s.width,u=vt[0]+vt[2]*l,c=(s.bottom-e.clientY)/s.height,f=vt[1]+vt[3]*(1-c);if(A){for(a=0;a=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function a(t,e,r){for(var n,a,o=1-e,s=0;s0;n--)r.push(e);return r}function i(t,e){for(var r=[],n=0;nK.width||J<0||J>K.height)return _.unhoverRaw(t,e)}else Z="xpx"in e?e.xpx:S[0]._length/2,J="ypx"in e?e.ypx:E[0]._length/2;if(P="xval"in e?n(a,e.xval):i(S,Z),O="yval"in e?n(a,e.yval):i(E,J),!m(P[0])||!m(O[0]))return g.warn("Fx.hover failed",e,t),_.unhoverRaw(t,e)}var Q=1/0;for(j=0;j1||N.hoverinfo.indexOf("name")!==-1?N.name:void 0,index:!1,distance:Math.min(Q,k.MAXDIST),color:b.defaultLine,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},o[B]&&(G.subplot=o[B]._subplot),Y=W.length,"array"===V){var $=e[j];"pointNumber"in $?(G.index=$.pointNumber,V="closest"):(V="","xval"in $&&(H=$.xval,V="x"),"yval"in $&&(q=$.yval,V=V?"closest":"y"))}else H=P[U],q=O[U];if(N._module&&N._module.hoverPoints){var tt=N._module.hoverPoints(G,H,q,V);if(tt)for(var et,rt=0;rtY&&(W.splice(0,Y),Q=W[0].distance)}if(0===W.length)return _.unhoverRaw(t,e);var nt="y"===I&&X.length>1;W.sort(function(t,e){return t.distance-e.distance});var it=b.combine(o.plot_bgcolor||b.background,o.paper_bgcolor),at={hovermode:I,rotateLabels:nt,bgColor:it,container:o._hoverlayer,outerContainer:o._paperdiv},ot=u(W,at);c(W,nt?"xa":"ya"),h(ot,nt);var st=t._hoverdata,lt=[];for(R=0;R128?"#000":b.background;void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&void 0===t.zLabelVal&&(r=y.plainText(t.name||""),r.length>15&&(r=r.substr(0,12)+"...")),void 0!==t.extraText&&(n+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(n+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(n+="y: "+t.yLabel+"
"),n+=(n?"z: ":"")+t.zLabel):A&&t[i+"Label"]===m?n=t[("x"===i?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&(n=t.yLabel):n=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",t.text&&!Array.isArray(t.text)&&(n+=(n?"
":"")+t.text),""===n&&(""===r&&e.remove(),n=r);var c=e.select("text.nums").style("fill",u).call(x.setPosition,0,0).text(n).attr("data-notex",1).call(y.convertToTspans);c.selectAll("tspan.line").call(x.setPosition,0,0);var h=e.select("text.name"),f=0;r&&r!==n?(h.style("fill",l).text(r).call(x.setPosition,0,0).attr("data-notex",1).call(y.convertToTspans),h.selectAll("tspan.line").call(x.setPosition,0,0),f=h.node().getBoundingClientRect().width+2*O):(h.remove(),e.select("rect").remove()),e.select("path").style({fill:l,stroke:u});var g,v,k=c.node().getBoundingClientRect(),T=t.xa._offset+(t.x0+t.x1)/2,S=t.ya._offset+(t.y0+t.y1)/2,E=Math.abs(t.x1-t.x0),C=Math.abs(t.y1-t.y0),D=k.width+P+O+f;t.ty0=_-k.top,t.bx=k.width+2*O,t.by=k.height+2*O,t.anchor="start",t.txwidth=k.width,t.tx2width=f,t.offset=0,a?(t.pos=T,g=S+C/2+D<=M,v=S-C/2-D>=0,"top"!==t.idealAlign&&g||!v?g?(S+=C/2,t.anchor="start"):t.anchor="middle":(S-=C/2,t.anchor="end")):(t.pos=S,g=T+E/2+D<=w,v=T-E/2-D>=0,"left"!==t.idealAlign&&g||!v?g?(T+=E/2,t.anchor="start"):t.anchor="middle":(T-=E/2,t.anchor="end")),c.attr("text-anchor",t.anchor),f&&h.attr("text-anchor",t.anchor),e.attr("transform","translate("+T+","+S+")"+(a?"rotate("+L+")":""))}),E}function c(t,e){function r(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var u=0;for(o=0;oe.pmax&&u++;for(o=t.length-1;o>=0&&!(u<=0);o--)l=t[o],l.pos>e.pmax-1&&(l.del=!0,u--);for(o=0;o=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(u<=0);o--)l=t[o],l.pos+l.dp+l.size>e.pmax&&(l.del=!0,u--)}}}for(var n,i,a,o,s,l,u,c=0,h=t.map(function(t,r){var n=t[e];return[{i:r,dp:0,pos:t.pos,posref:t.posref,size:t.by*("x"===n._id.charAt(0)?D:1)/2,pmin:n._offset,pmax:n._offset+n._length}]}).sort(function(t,e){return t[0].posref-e[0].posref});!n&&c<=t.length;){for(c++,n=!0,o=0;o.01&&p.pmin===m.pmin&&p.pmax===m.pmax){for(s=d.length-1;s>=0;s--)d[s].dp+=i;for(f.push.apply(f,d),h.splice(o+1,1),u=0,s=f.length-1;s>=0;s--)u+=f[s].dp;for(a=u/f.length,s=f.length-1;s>=0;s--)f[s].dp-=a;n=!1}else o++}h.forEach(r)}for(o=h.length-1;o>=0;o--){var g=h[o];for(s=g.length-1;s>=0;s--){var v=g[s],y=t[v.i];y.offset=v.dp,y.del=v.del}}}function h(t,e){t.each(function(t){var r=d.select(this);if(t.del)return void r.remove();var n="end"===t.anchor?-1:1,i=r.select("text.nums"),a={start:1,end:-1,middle:0}[t.anchor],o=a*(P+O),s=o+a*(t.txwidth+O),l=0,u=t.offset;"middle"===t.anchor&&(o-=t.tx2width/2,s-=t.tx2width/2),e&&(u*=-I,l=t.offset*z),r.select("path").attr("d","middle"===t.anchor?"M-"+t.bx/2+",-"+t.by/2+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(n*P+l)+","+(P+u)+"v"+(t.by/2-P)+"h"+n*t.bx+"v-"+t.by+"H"+(n*P+l)+"V"+(u-P)+"Z"),i.call(x.setPosition,o+l,u+t.ty0-t.by/2+O).selectAll("tspan.line").attr({x:i.attr("x"),y:i.attr("y")}),t.tx2width&&(r.select("text.name, text.name tspan.line").call(x.setPosition,s+a*O+l,u+t.ty0-t.by/2+O),r.select("rect").call(x.setRect,s+(a-1)*t.tx2width/2+l,u-t.by/2-1,t.tx2width,t.by+2))})}function f(t,e,r){if(!e.target)return!1;if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber))return!0}return!1}var d=t("d3"),p=t("tinycolor2"),m=t("fast-isnumeric"),g=t("../../lib"),v=t("../../lib/events"),y=t("../../lib/svg_text_utils"),b=t("../../components/color"),x=t("../../components/drawing"),_=t("../../components/dragelement"),w=t("../../lib/override_cursor"),M=t("../../registry"),A=t("./axes"),k=t("./constants"),T=t("./dragbox"),S=t("../layout_attributes"),E=e.exports={};E.unhover=_.unhover,E.supplyLayoutDefaults=function(t,e,r){function n(r,n){return g.coerce(t,e,S,r,n)}n("dragmode");var i;if(e._has("cartesian")){i=(e._isHoriz=E.isHoriz(r))?"y":"x"}else i="closest";n("hovermode",i)},E.isHoriz=function(t){for(var e=!0,r=0;rt._lastHoverTime+k.HOVERMINTIME)return o(t,e,r),void(t._lastHoverTime=Date.now());t._hoverTimer=setTimeout(function(){o(t,e,r),t._lastHoverTime=Date.now(),t._hoverTimer=void 0},k.HOVERMINTIME)},E.getDistanceFunction=function(t,e,r,n){return"closest"===t?n||a(e,r):"x"===t?e:r},E.getClosest=function(t,e,r){if(r.index!==!1)r.index>=0&&r.indexc[1]-.01&&(e.domain=[0,1]),i.noneOrAll(t.domain,e.domain,[0,1])}return e}},{"../../lib":680,"fast-isnumeric":113}],732:[function(t,e,r){"use strict";function n(t){return t._id}var i=t("../../lib/polygon"),a=t("../../components/color"),o=t("./axes"),s=t("./constants"),l=i.filter,u=i.tester,c=s.MINSELECT;e.exports=function(t,e,r,i,h){function f(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return t.p2d(r[e])}}function d(t,e){return t-e}var p,m=i.gd._fullLayout._zoomlayer,g=i.element.getBoundingClientRect(),v=i.plotinfo.xaxis._offset,y=i.plotinfo.yaxis._offset,b=e-g.left,x=r-g.top,_=b,w=x,M="M"+b+","+x,A=i.xaxes[0]._length,k=i.yaxes[0]._length,T=i.xaxes.map(n),S=i.yaxes.map(n),E=i.xaxes.concat(i.yaxes);"lasso"===h&&(p=l([[b,x]],s.BENDPX));var L=m.selectAll("path.select-outline").data([1,2]);L.enter().append("path").attr("class",function(t){return"select-outline select-outline-"+t}).attr("transform","translate("+v+", "+y+")").attr("d",M+"Z");var C,D,z,I,P,O=m.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1}).attr("transform","translate("+v+", "+y+")").attr("d","M0,0Z"),R=[],j=i.gd,F=[];for(C=0;Cf?d:o(t)?Number(t):d):d}var a=t("d3"),o=t("fast-isnumeric"),s=t("../../lib"),l=s.cleanNumber,u=s.ms2DateTime,c=s.dateTime2ms,h=t("../../constants/numerical"),f=h.FP_SAFE,d=h.BADNUM,p=t("./constants"),m=t("./axis_ids");e.exports=function(t,e){function r(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-3*w*Math.abs(n-i))}return d}function h(e,r,n){var i=c(e,n||t.calendar);if(i===d){if(!o(e))return d;i=c(new Date(+e))}return i}function g(e,r,n){return u(e,r,n||t.calendar)}function v(e){return t._categories[Math.round(e)]}function y(e){if(null!==e&&void 0!==e){var r=t._categories.indexOf(e);return r===-1?(t._categories.push(e),t._categories.length-1):r}return d}function b(e){var r=t._categories.indexOf(e);return r!==-1?r:"number"==typeof e?e:void 0}function x(e){return o(e)?a.round(t._b+t._m*e,2):d}function _(e){return(e-t._b)/t._m}e=e||{};var w=10;t.c2l="log"===t.type?r:i,t.l2c="log"===t.type?n:i,t.l2p=x,t.p2l=_,t.c2p="log"===t.type?function(t,e){return x(r(t,e))}:x,t.p2c="log"===t.type?function(t){return n(_(t))}:_,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=i,t.d2p=t.r2p=function(t){return x(l(t))},t.p2d=t.p2r=_):"log"===t.type?(t.d2r=t.d2l=function(t,e){return r(l(t),e)},t.r2d=t.r2c=function(t){return n(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=i,t.c2r=r,t.l2d=n,t.d2p=function(e,r){return x(t.d2r(e,r))},t.p2d=function(t){return n(_(t))},t.r2p=function(t){return x(l(t))},t.p2r=_):"date"===t.type?(t.d2r=t.r2d=s.identity,t.d2c=t.r2c=t.d2l=t.r2l=h,t.c2d=t.c2r=t.l2d=t.l2r=g,t.d2p=t.r2p=function(t,e,r){return x(h(t,0,r))},t.p2d=t.p2r=function(t,e,r){return g(_(t),e,r)}):"category"===t.type&&(t.d2r=t.d2c=t.d2l=y,t.r2d=t.c2d=t.l2d=v,t.d2l_noadd=b,t.r2l=t.l2r=t.r2c=t.c2r=i,t.d2p=function(t){return x(b(t))},t.p2d=function(t){return v(_(t))},t.r2p=x,t.p2r=_),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e){e||(e="range");var r,n,i=s.nestedProperty(t,e).get(),a=(t._id||"x").charAt(0);if(n="date"===t.type?s.dfltRange(t.calendar):"y"===a?p.DFLTRANGEY:p.DFLTRANGEX,n=n.slice(),!i||2!==i.length)return void s.nestedProperty(t,e).set(n);for("date"===t.type&&(i[0]=s.cleanDate(i[0],d,t.calendar),i[1]=s.cleanDate(i[1],d,t.calendar)),r=0;r<2;r++)if("date"===t.type){if(!s.isDateTime(i[r],t.calendar)){t[e]=n;break}if(t.r2l(i[0])===t.r2l(i[1])){var l=s.constrain(t.r2l(i[0]),s.MIN_MS+1e3,s.MAX_MS-1e3);i[0]=t.l2r(l-1e3),i[1]=t.l2r(l+1e3);break}}else{if(!o(i[r])){if(!o(i[1-r])){t[e]=n;break}i[r]=i[1-r]*(r?10:.1)}if(i[r]<-f?i[r]=-f:i[r]>f&&(i[r]=f),i[0]===i[1]){var u=Math.max(1,Math.abs(1e-6*i[0]));i[0]-=u,i[1]+=u}}},t.setScale=function(r){var n=e._size,i=t._id.charAt(0);if(t._categories||(t._categories=[]),t.overlaying){var a=m.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var o=r&&t._r?"_r":"range",l=t.calendar;t.cleanRange(o);var u=t.r2l(t[o][0],l),c=t.r2l(t[o][1],l);if("y"===i?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),!isFinite(t._m)||!isFinite(t._b))throw s.notifier("Something went wrong with axis scaling","long"),e._replotting=!1,new Error("axis scaling")},t.makeCalcdata=function(e,r){var n,i,a,o="date"===t.type&&e[r+"calendar"];if(r in e)for(n=e[r],i=new Array(n.length),a=0;a0?Number(c):u;else if("string"!=typeof c)e.dtick=u;else{var h=c.charAt(0),f=c.substr(1);f=n(f)?Number(f):0,(f<=0||!("date"===o&&"M"===h&&f===Math.round(f)||"log"===o&&"L"===h||"log"===o&&"D"===h&&(1===f||2===f)))&&(e.dtick=u)}var d="date"===o?i.dateTick0(e.calendar):0,p=r("tick0",d);"date"===o?e.tick0=i.cleanDate(p,d):n(p)&&"D1"!==c&&"D2"!==c?e.tick0=Number(p):e.tick0=d}else{var m=r("tickvals");void 0===m?e.tickmode="auto":r("ticktext")}}},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],737:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plotly"),a=t("../../registry"),o=t("../../components/drawing"),s=t("./axes"),l=/((x|y)([2-9]|[1-9][0-9]+)?)axis$/;e.exports=function(t,e,r,u){function c(e,r){function n(e,r){for(i=0;ir.duration?(d(),A=window.cancelAnimationFrame(m)):A=window.requestAnimationFrame(m)}var g=t._fullLayout,v=[],y=function(t){var e,r,n,i,a,o={};for(e in t)if(r=e.split("."),n=r[0].match(l)){var s=n[1],u=s+"axis";if(i=g[u],a={},Array.isArray(t[e])?a.to=t[e].slice(0):Array.isArray(t[e].range)&&(a.to=t[e].range.slice(0)),!a.to)continue;a.axisName=u,a.length=i._length,v.push(s),o[s]=a}return o}(e),b=Object.keys(y),x=function(t,e,r){var n,i,a,o=t._plots,s=[];for(n in o){var l=o[n];if(s.indexOf(l)===-1){var u=l.xaxis._id,c=l.yaxis._id,h=l.xaxis.range,f=l.yaxis.range;l.xaxis._r=l.xaxis.range.slice(),l.yaxis._r=l.yaxis.range.slice(),i=r[u]?r[u].to:h,a=r[c]?r[c].to:f,h[0]===i[0]&&h[1]===i[1]&&f[0]===a[0]&&f[1]===a[1]||e.indexOf(u)===-1&&e.indexOf(c)===-1||s.push(l)}}return s}(g,b,y);if(!x.length)return!1;var _;u&&(_=u());var w,M,A,k=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(A),A=null,p()}),w=Date.now(),A=window.requestAnimationFrame(m),Promise.resolve()}},{"../../components/drawing":598,"../../plotly":714,"../../registry":793,"./axes":719,d3:104}],738:[function(t,e,r){"use strict";function n(t,e,r){var n,i,a,o=!1;if("data"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if("layout"!==e.type)return!1;n=t._fullLayout}return i=u.nestedProperty(n,e.prop).get(),a=r[e.type]=r[e.type]||{},a.hasOwnProperty(e.prop)&&a[e.prop]!==i&&(o=!0),a[e.prop]=i,{changed:o,value:i}}function i(t,e){return Array.isArray(e[0])&&1===e[0].length&&["string","number"].indexOf(typeof e[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:e[0][0].toString()}]:[]}function a(t,e){var r=[],n=e[0],i={};if("string"==typeof n)i[n]=e[1];else{if(!u.isPlainObject(n))return r;i=n}return s(i,function(t,e,n){r.push({type:"layout",prop:t,value:n})},"",0),r}function o(t,e){var r,n,i,a,o=[];if(n=e[0],i=e[1],r=e[2],a={},"string"==typeof n)a[n]=i;else{if(!u.isPlainObject(n))return o;a=n,void 0===r&&(r=i)}return void 0===r&&(r=null),s(a,function(e,n,i){var a;if(Array.isArray(i)){var s=Math.min(i.length,t.data.length);r&&(s=Math.min(s,r.length)),a=[];for(var l=0;l0?".":"")+i;u.isPlainObject(a)?s(a,e,o,n+1):e(o,i,a)}})}var l=t("../plotly"),u=t("../lib");r.manageCommandObserver=function(t,e,i,a){var o={},s=!0;e&&e._commandObserver&&(o=e._commandObserver),o.cache||(o.cache={}),o.lookupTable={};var l=r.hasSimpleAPICommandBindings(t,i,o.lookupTable);if(e&&e._commandObserver){if(l)return o;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,o}if(l){n(t,l,o.cache),o.check=function(){if(s){var e=n(t,l,o.cache);return e.changed&&a&&void 0!==o.lookupTable[e.value]&&(o.disable(),Promise.resolve(a({value:e.value,type:l.type,prop:l.prop,traces:l.traces,index:o.lookupTable[e.value]})).then(o.enable,o.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;he*Math.PI/180},w.render=function(){function t(t){var e=r.projection(t.lonlat);return e?"translate("+e[0]+","+e[1]+")":null}function e(t){return r.isLonLatOverEdges(t.lonlat)?"0":"1.0"}var r=this,n=r.framework,i=n.select("g.choroplethlayer"),a=n.select("g.scattergeolayer"),o=r.path;n.selectAll("path.basepath").attr("d",o),n.selectAll("path.graticulepath").attr("d",o),i.selectAll("path.choroplethlocation").attr("d",o),i.selectAll("path.basepath").attr("d",o),a.selectAll("path.js-line").attr("d",o),null!==r.clipAngle?(a.selectAll("path.point").style("opacity",e).attr("transform",t),a.selectAll("text").style("opacity",e).attr("transform",t)):(a.selectAll("path.point").attr("transform",t),a.selectAll("text").attr("transform",t))}},{"../../components/color":575,"../../components/drawing":598,"../../lib/topojson_utils":701,"../cartesian/axes":719,"../cartesian/graph_interact":726,"../plots":778,"./constants":741,"./projections":749,"./set_scale":750,"./zoom":751,"./zoom_reset":752,d3:104,"topojson-client":513}],743:[function(t,e,r){"use strict";var n=t("./geo"),i=t("../../plots/plots");r.name="geo",r.attr="geo",r.idRoot="geo",r.idRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=i.getSubplotIds(e,"geo");void 0===window.PlotlyGeoAssets&&(window.PlotlyGeoAssets={topojson:{}});for(var o=0;on^d>n&&r<(f-u)*(n-c)/(d-c)+u&&(i=!i)}return i}function o(t){return t?t/Math.sin(t):1}function s(t){return t>1?D:t<-1?-D:Math.asin(t)}function l(t){return t>1?0:t<-1?C:Math.acos(t)}function u(t,e){var r=(2+D)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>E;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(C*(4+C))*t*(1+Math.cos(e)),2*Math.sqrt(C/(4+C))*Math.sin(e)]}function c(t,e){function r(r,n){var i=R(r/e,n);return i[0]*=t,i}return arguments.length<2&&(e=t),1===e?R:1/0===e?f:(r.invert=function(r,n){var i=R.invert(r/t,n);return i[0]*=e,i},r)}function h(){var t=2,e=O(c),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}function f(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function d(t,e){return[3*t/(2*C)*Math.sqrt(C*C/3-e*e),e]}function p(t,e){return[t,1.25*Math.log(Math.tan(C/4+.4*e))]}function m(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>E&&--i>0);return e/2}}function g(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function v(t,e){var r,n=Math.min(18,36*Math.abs(e)/C),i=Math.floor(n),a=n-i,o=(r=F[i])[0],s=r[1],l=(r=F[++i])[0],u=r[1],c=(r=F[Math.min(19,++i)])[0],h=r[1];return[t*(l+a*(c-o)/2+a*a*(c-2*l+o)/2),(e>0?D:-D)*(u+a*(h-s)/2+a*a*(h-2*u+s)/2)]}function y(t,e){return[t*Math.cos(e),e]}function b(t,e){var r=Math.cos(e),n=o(l(r*Math.cos(t/=2)));return[2*r*Math.sin(t)*n,Math.sin(e)*n]}function x(t,e){var r=b(t,e);return[(r[0]+t/D)/2,(r[1]+e)/2]}t.geo.project=function(t,e){var n=e.stream;if(!n)throw new Error("not yet supported");return(t&&_.hasOwnProperty(t.type)?_[t.type]:r)(t,n)};var _={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,r)})}}},w=[],M=[],A={point:function(t,e){w.push([t,e])},result:function(){var t=w.length?w.length<2?{type:"Point",coordinates:w[0]}:{type:"MultiPoint",coordinates:w}:null;return w=[],t}},k={lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){w.length&&(M.push(w),w=[])},result:function(){var t=M.length?M.length<2?{type:"LineString",coordinates:M[0]}:{type:"MultiLineString",coordinates:M}:null;return M=[],t}},T={polygonStart:n,lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){var t=w.length;if(t){do{w.push(w[0].slice())}while(++t<4);M.push(w),w=[]}},polygonEnd:n,result:function(){if(!M.length)return null;var t=[],e=[];return M.forEach(function(r){i(r)?t.push([r]):e.push(r)}),e.forEach(function(e){var r=e[0];t.some(function(t){if(a(t[0],r))return t.push(e),!0})||t.push([e])}),M=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},S={Point:A,MultiPoint:A,LineString:k,MultiLineString:k,Polygon:T,MultiPolygon:T,Sphere:T},E=1e-6,L=E*E,C=Math.PI,D=C/2,z=(Math.sqrt(C),C/180),I=180/C,P=t.geo.projection,O=t.geo.projectionMutator;t.geo.interrupt=function(e){function r(t,r){for(var n=r<0?-1:1,i=l[+(r<0)],a=0,o=i.length-1;ai[a][2][0];++a);var s=e(t-i[a][1][0],r);return s[0]+=e(i[a][1][0],n*r>n*i[a][0][1]?i[a][0][1]:r)[0],s}function n(){s=l.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]})})}function i(){for(var e=1e-6,r=[],n=0,i=l[0].length;n=0;--n){var o=l[1][n],s=180*o[0][0]/C,u=180*o[0][1]/C,c=180*o[1][1]/C,h=180*o[2][0]/C,f=180*o[2][1]/C;r.push(a([[h-e,f-e],[h-e,c+e],[s+e,c+e],[s+e,u-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}function a(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++aE&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return P(g)}).raw=g;var F=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];F.forEach(function(t){t[1]*=1.0144}),v.invert=function(t,e){var r=e/D,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=F[a][1],s=F[a+1][1],l=F[Math.min(19,a+2)][1],u=l-o,c=l-2*s+o,h=2*(Math.abs(r)-s)/u,f=c/u,d=h*(1-f*h*(1-2*f*h));if(d>=0||1===a){n=(e>=0?5:-5)*(d+i);var p,m=50;do{i=Math.min(18,Math.abs(n)/5),a=Math.floor(i),d=i-a,o=F[a][1],s=F[a+1][1],l=F[Math.min(19,a+2)][1],n-=(p=(e>=0?D:-D)*(s+d*(l-o)/2+d*d*(l-2*s+o)/2)-e)*I}while(Math.abs(p)>L&&--m>0);break}}while(--a>=0);var g=F[a][0],v=F[a+1][0],y=F[Math.min(19,a+2)][0];return[t/(v+d*(y-g)/2+d*d*(y-2*v+g)/2),n*z]},(t.geo.robinson=function(){return P(v)}).raw=v,y.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return P(y)}).raw=y,b.invert=function(t,e){if(!(t*t+4*e*e>C*C+E)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),u=Math.cos(r/2),c=Math.sin(n),h=Math.cos(n),f=Math.sin(2*n),d=c*c,p=h*h,m=s*s,g=1-p*u*u,v=g?l(h*u)*Math.sqrt(a=1/g):a=0,y=2*v*h*s-t,b=v*c-e,x=a*(p*m+v*h*u*d),_=a*(.5*o*f-2*v*c*s),w=.25*a*(f*s-v*c*p*o),M=a*(d*u+v*m*h),A=_*w-M*x;if(!A)break;var k=(b*_-y*M)/A,T=(y*w-b*x)/A;r-=k,n-=T}while((Math.abs(k)>E||Math.abs(T)>E)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return P(b)}).raw=b,x.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),u=Math.sin(2*n),c=s*s,h=o*o,f=Math.sin(r),d=Math.cos(r/2),p=Math.sin(r/2),m=p*p,g=1-h*d*d,v=g?l(o*d)*Math.sqrt(a=1/g):a=0,y=.5*(2*v*o*p+r/D)-t,b=.5*(v*s+n)-e,x=.5*a*(h*m+v*o*d*c)+.5/D,_=a*(f*u/4-v*s*p),w=.125*a*(u*p-v*s*h*f),M=.5*a*(c*d+v*m*o)+.5,A=_*w-M*x,k=(b*_-y*M)/A,T=(y*w-b*x)/A;r-=k,n-=T}while((Math.abs(k)>E||Math.abs(T)>E)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return P(x)}).raw=x}e.exports=n},{}],750:[function(t,e,r){"use strict";function n(t,e){var r=t.projection,n=t.lonaxis,o=t.lataxis,l=t.domain,u=t.framewidth||0,c=e.w*(l.x[1]-l.x[0]),h=e.h*(l.y[1]-l.y[0]),f=n.range[0]+s,d=n.range[1]-s,p=o.range[0]+s,m=o.range[1]-s,g=n._fullRange[0]+s,v=n._fullRange[1]-s,y=o._fullRange[0]+s,b=o._fullRange[1]-s;r._translate0=[e.l+c/2,e.t+h/2];var x=d-f,_=m-p,w=[f+x/2,p+_/2],M=r._rotate;return r._center=[w[0]+M[0],w[1]+M[1]],function(e){function n(t){return Math.min(_*c/(t[1][0]-t[0][0]),_*h/(t[1][1]-t[0][1]))}var o,s,l,x,_=e.scale(),w=r._translate0,M=i(f,p,d,m),A=i(g,y,v,b);l=a(e,M),o=n(l),x=a(e,A),r._fullScale=n(x),e.scale(o),l=a(e,M),s=[w[0]-l[0][0]+u,w[1]-l[0][1]+u],r._translate=s,e.translate(s),l=a(e,M),t._isAlbersUsa||e.clipExtent(l),o=r.scale*o,r._scale=o,t._width=Math.round(l[1][0])+u,t._height=Math.round(l[1][1])+u,t._marginX=(c-Math.round(l[1][0]))/2,t._marginY=(h-Math.round(l[1][1]))/2}}function i(t,e,r,n){var i=(r-t)/4;return{type:"Polygon",coordinates:[[[t,e],[t,n],[t+i,n],[t+2*i,n],[t+3*i,n],[r,n],[r,e],[r-i,e],[r-2*i,e],[r-3*i,e],[t,e]]]}}function a(t,e){return o.geo.path().projection(t).bounds(e)}var o=t("d3"),s=t("./constants").clipPad;e.exports=n},{"./constants":741,d3:104}],751:[function(t,e,r){"use strict";function n(t,e){return(e._isScoped?a:e._clipAngle?s:o)(t,e.projection)}function i(t,e){var r=e._fullScale;return _.behavior.zoom().translate(t.translate()).scale(t.scale()).scaleExtent([.5*r,100*r])}function a(t,e){function r(){_.select(this).style(A)}function n(){o.scale(_.event.scale).translate(_.event.translate),t.render()}function a(){_.select(this).style(k)}var o=t.projection,s=i(o,e);return s.on("zoomstart",r).on("zoom",n).on("zoomend",a),s}function o(t,e){function r(t){return g.invert(t)}function n(t){var e=g(r(t));return Math.abs(e[0]-t[0])>y||Math.abs(e[1]-t[1])>y}function a(){_.select(this).style(A),l=_.mouse(this),u=g.rotate(),c=g.translate(),h=u,f=r(l)}function o(){if(d=_.mouse(this),n(l))return v.scale(g.scale()),void v.translate(g.translate());g.scale(_.event.scale),g.translate([c[0],_.event.translate[1]]),f?r(d)&&(m=r(d),p=[h[0]+(m[0]-f[0]),u[1],u[2]],g.rotate(p),h=p):(l=d,f=r(l)),t.render()}function s(){_.select(this).style(k)}var l,u,c,h,f,d,p,m,g=t.projection,v=i(g,e),y=2;return v.on("zoomstart",a).on("zoom",o).on("zoomend",s),v}function s(t,e){function r(t){v++||t({type:"zoomstart"})}function n(t){t({type:"zoom"})}function a(t){--v||t({type:"zoomend"})}var o,s=t.projection,d={r:s.rotate(),k:s.scale()},p=i(s,e),m=x(p,"zoomstart","zoom","zoomend"),v=0,y=p.on;return p.on("zoomstart",function(){_.select(this).style(A);var t=_.mouse(this),e=s.rotate(),i=e,a=s.translate(),v=u(e);o=l(s,t),y.call(p,"zoom",function(){var r=_.mouse(this);if(s.scale(d.k=_.event.scale),o){if(l(s,r)){s.rotate(e).translate(a);var u=l(s,r),p=h(o,u),y=g(c(v,p)),b=d.r=f(y,o,i);isFinite(b[0])&&isFinite(b[1])&&isFinite(b[2])||(b=i),s.rotate(b),i=b}}else t=r,o=l(s,t);n(m.of(this,arguments))}),r(m.of(this,arguments))}).on("zoomend",function(){_.select(this).style(k),y.call(p,"zoom",null),a(m.of(this,arguments))}).on("zoom.redraw",function(){t.render()}),_.rebind(p,m,"on")}function l(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&v(r)}function u(t){var e=.5*t[0]*w,r=.5*t[1]*w,n=.5*t[2]*w,i=Math.sin(e),a=Math.cos(e),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function c(t,e){var r=t[0],n=t[1],i=t[2],a=t[3],o=e[0],s=e[1],l=e[2],u=e[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function h(t,e){if(t&&e){var r=b(t,e),n=Math.sqrt(y(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,y(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function f(t,e,r){var n=m(e,2,t[0]);n=m(n,1,t[1]),n=m(n,0,t[2]-r[2]);var i,a,o=e[0],s=e[1],l=e[2],u=n[0],c=n[1],h=n[2],f=Math.atan2(s,o)*M,p=Math.sqrt(o*o+s*s);Math.abs(c)>p?(a=(c>0?90:-90)-f,i=0):(a=Math.asin(c/p)*M-f,i=Math.sqrt(p*p-c*c));var g=180-a-2*f,v=(Math.atan2(h,u)-Math.atan2(l,i))*M,y=(Math.atan2(h,u)-Math.atan2(l,-i))*M;return d(r[0],r[1],a,v)<=d(r[0],r[1],g,y)?[a,v,r[2]]:[g,y,r[2]]}function d(t,e,r,n){var i=p(r-t),a=p(n-e);return Math.sqrt(i*i+a*a)}function p(t){return(t%360+540)%360-180}function m(t,e,r){var n=r*w,i=t.slice(),a=0===e?1:0,o=2===e?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=t[a]*s-t[o]*l,i[o]=t[o]*s+t[a]*l,i}function g(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*M,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*M,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*M]}function v(t){var e=t[0]*w,r=t[1]*w,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function y(t,e){for(var r=0,n=0,i=t.length;nh[d+2]&&(h[d]=-1,h[d+2]=1),f=this[y[d]],f._length=o.viewBox[d+2]-o.viewBox[d],l.doAutoRange(f),f.setScale();o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},b.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},b.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},b.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;rMath.abs(e))n.rotate(o,0,0,-t*r*Math.PI*f.rotateSpeed/window.innerWidth);else{var s=-f.zoomSpeed*a*e/window.innerHeight*(o-n.lastT())/100;n.pan(o,0,0,u*(Math.exp(s)-1))}}},!0),f}e.exports=n;var i=t("right-now"),a=t("3d-view"),o=t("mouse-change"),s=t("mouse-wheel")},{"3d-view":30,"mouse-change":431,"mouse-wheel":434,"right-now":480}],758:[function(t,e,r){"use strict";var n=t("./scene"),i=t("../plots"),a=t("../../lib"),o=t("../../constants/xmlns_namespaces");r.name="gl3d",r.attr="scene",r.idRoot="scene",r.idRegex=/^scene([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^scene([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,o=i.getSubplotIds(e,"gl3d"),s=0;s1;o(t,e,r,{type:"gl3d",attributes:s,handleDefaults:n,font:e.font,fullData:r,getDfltFromLayout:a,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":575,"../../../lib":680,"../../subplot_defaults":785,"./axis_defaults":761,"./layout_attributes":764}],764:[function(t,e,r){"use strict";function n(t,e,r){return{x:{valType:"number",dflt:t},y:{valType:"number",dflt:e},z:{valType:"number",dflt:r}}}var i=t("./axis_attributes"),a=t("../../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},camera:{up:a(n(0,0,1),{}),center:a(n(0,0,0),{}),eye:a(n(1.25,1.25,1.25),{})},domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto"},aspectratio:{x:{valType:"number",min:0},y:{valType:"number",min:0},z:{valType:"number",min:0}},xaxis:i,yaxis:i,zaxis:i,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],dflt:"turntable"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest"},_deprecated:{cameraposition:{valType:"info_array"}}}},{"../../../lib/extend":672,"./axis_attributes":760}],765:[function(t,e,r){"use strict";function n(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}function i(t){var e=new n;return e.merge(t),e}var a=t("../../../lib/str2rgbarray"),o=["xaxis","yaxis","zaxis"];n.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[o[e]];this.enabled[e]=r.showspikes,this.colors[e]=a(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness}},e.exports=i},{"../../../lib/str2rgbarray":698}],766:[function(t,e,r){"use strict";function n(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;af[1][o]?d[o]=1:f[1][o]===f[0][o]?d[o]=1:d[o]=1/(f[1][o]-f[0][o]);for(this.dataScale=d,a=0;am[1][a])m[0][a]=-1,m[1][a]=1;else{var x=m[1][a]-m[0][a];m[0][a]-=x/32,m[1][a]+=x/32}}else{var _=c[k[a]].range;m[0][a]=_[0],m[1][a]=_[1]}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),g[a]=m[1][a]-m[0][a],this.glplot.bounds[0][a]=m[0][a]*d[a],this.glplot.bounds[1][a]=m[1][a]*d[a]}var w=[1,1,1];for(a=0;a<3;++a){l=c[k[a]],u=l.type;var M=y[u];w[a]=Math.pow(M.acc,1/M.count)/d[a]}var A;if("auto"===c.aspectmode)A=Math.max.apply(null,w)/Math.min.apply(null,w)<=4?w:[1,1,1];else if("cube"===c.aspectmode)A=[1,1,1];else if("data"===c.aspectmode)A=w;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var T=c.aspectratio;A=[T.x,T.y,T.z]}c.aspectratio.x=h.aspectratio.x=A[0],c.aspectratio.y=h.aspectratio.y=A[1],c.aspectratio.z=h.aspectratio.z=A[2],this.glplot.aspect=A;var S=c.domain||null,E=e._size||null;if(S&&E){var L=this.container.style;L.position="absolute",L.left=E.l+S.x[0]*E.w+"px",L.top=E.t+(1-S.y[1])*E.h+"px",L.width=E.w*(S.x[1]-S.x[0])+"px",L.height=E.h*(S.y[1]-S.y[0])+"px"}this.glplot.redraw()}},A.destroy=function(){this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null},A.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),u(this.glplot.camera)},A.setCamera=function(t){this.glplot.camera.lookAt.apply(this,l(t))},A.saveCamera=function(t){var e=this.getCamera(),r=p.nestedProperty(t,this.id+".camera"),n=r.get(),i=!1;if(void 0===n)i=!0;else for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!function(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}(e,n,a,o)){i=!0;break}return i&&r.set(e),i},A.updateFx=function(t,e){var r=this.camera;r&&("orbit"===t?(r.mode="orbit",r.keyBindingMode="rotate"):"turntable"===t?(r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate"):r.keyBindingMode=t),this.fullSceneLayout.hovermode=e},A.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(c),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,n=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var i=new Uint8Array(r*n*4);e.readPixels(0,0,r,n,e.RGBA,e.UNSIGNED_BYTE,i);for(var a=0,o=n-1;a0}function a(t){var e={},r={};switch(t.type){case"circle":s.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":s.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity});break;case"fill":s.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var n=t.symbol,i=l(n.textposition,n.iconsize);s.extendFlat(e,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset}),s.extendFlat(r,{"icon-color":t.color,"text-color":n.textfont.color,"text-opacity":t.opacity})}return{layout:e,paint:r}}function o(t){var e,r=t.sourcetype,n=t.source,i={type:r},a="string"==typeof n;return"geojson"===r?e="data":"vector"===r&&(e=a?"url":"tiles"),i[e]=n,i}var s=t("../../lib"),l=t("./convert_text_opts"),u=n.prototype;u.update=function(t){this.visible?this.needsNewSource(t)?(this.updateLayer(t),this.updateSource(t)):this.needsNewLayer(t)&&this.updateLayer(t):(this.updateSource(t),this.updateLayer(t)),this.updateStyle(t),this.visible=i(t)},u.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},u.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==t.below},u.updateSource=function(t){var e=this.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,i(t)){var r=o(t);e.addSource(this.idSource,r)}},u.updateLayer=function(t){var e=this.map;if(e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),this.layerType=t.type,i(t)){e.addLayer({id:this.idLayer,source:this.idSource,"source-layer":t.sourcelayer||"",type:t.type},t.below);var r={visibility:"visible"};this.mapbox.setOptions(this.idLayer,"setLayoutProperty",r)}},u.updateStyle=function(t){var e=a(t);i(t)&&(this.mapbox.setOptions(this.idLayer,"setLayoutProperty",e.layout),this.mapbox.setOptions(this.idLayer,"setPaintProperty",e.paint))},u.dispose=function(){var t=this.map;t.removeLayer(this.idLayer),t.removeSource(this.idSource)},e.exports=function(t,e,r){var i=new n(t,e);return i.update(r),i}},{"../../lib":680,"./convert_text_opts":771}],774:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../components/color").defaultLine,a=t("../font_attributes"),o=t("../../traces/scatter/attributes").textposition;e.exports={_arrayAttrRegexps:[/^mapbox([2-9]|[1-9][0-9]+)?\.layers/],domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],dflt:"basic"},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},layers:{_isLinkedToArray:"layer",sourcetype:{valType:"enumerated",values:["geojson","vector"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},type:{valType:"enumerated",values:["circle","line","fill","symbol"],dflt:"circle"},below:{valType:"string",dflt:""},color:{valType:"color",dflt:i},opacity:{valType:"number",min:0,max:1,dflt:1},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2}},fill:{outlinecolor:{valType:"color",dflt:i}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},textfont:n.extendDeep({},a,{family:{dflt:"Open Sans Regular, Arial Unicode MS Regular"}}),textposition:n.extendFlat({},o,{arrayOk:!1})}}}},{"../../components/color":575,"../../lib":680,"../../traces/scatter/attributes":924,"../font_attributes":739}],775:[function(t,e,r){"use strict";function n(t,e,r){r("accesstoken"),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch"),i(t,e),e._input=t}function i(t,e){function r(t,e){return a.coerce(n,i,s.layers,t,e)}for(var n,i,o=t.layers||[],l=e.layers=[],u=0;u=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),u=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&n(t,o),l.text(o.text()&&u.text()?" - ":"")},d.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||"https://plot.ly",r=s.select(t).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return n.append("input").attr({type:"text",name:"data"}).node().value=d.graphJson(t,!1,"keepdata"),n.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1},d.supplyDefaults=function(t){var e,r=t._fullLayout||{},n=t._fullLayout={},i=t.layout||{},a=t._fullData||[],o=t._fullData=[],s=t.data||[];if(t._transitionData||d.createTransitionData(t),r._initialAutoSizeIsDone){var l=r.width,c=r.height;d.supplyLayoutGlobalDefaults(i,n),i.width||(n.width=l),i.height||(n.height=c)}else{d.supplyLayoutGlobalDefaults(i,n);var h=!i.width||!i.height,f=n.autosize,p=t._context&&t._context.autosizable;h&&(f||p)?d.plotAutoSize(t,i,n):h&&d.sanitizeMargins(t),!f&&h&&(i.width=n.width,i.height=n.height)}n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._globalTransforms=(t._context||{}).globalTransforms,d.supplyDataDefaults(s,o,i,n),n._has=d._hasPlotType.bind(n);var m=n._modules;for(e=0;e0){var c=o(t._boundingBoxMargins),f=c.left+c.right,p=c.bottom+c.top,m=1-2*s,g=r._container&&r._container.node?r._container.node().getBoundingClientRect():{width:r.width,height:r.height};n=Math.round(m*(g.width-f)),i=Math.round(m*(g.height-p))}else{var v=u?window.getComputedStyle(t):{};n=parseFloat(v.width)||r.width,i=parseFloat(v.height)||r.height}var y=d.layoutAttributes.width.min,b=d.layoutAttributes.height.min;n1,_=!e.height&&Math.abs(r.height-i)>1;(_||x)&&(x&&(r.width=n),_&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),d.sanitizeMargins(r)},d.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a;u.Axes.supplyLayoutDefaults(t,e,r);var o=e._basePlotModules;for(i=0;i.5*n.width&&(r.l=r.r=0),r.b+r.t>.5*n.height&&(r.b=r.t=0),n._pushmargin[e]={l:{val:r.x,size:r.l+i},r:{val:r.x,size:r.r+i},b:{val:r.y,size:r.b+i},t:{val:r.y,size:r.t+i}}}else delete n._pushmargin[e];n._replotting||d.doAutoMargin(t)}},d.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),e._pushmargin||(e._pushmargin={});var r=e._size,n=JSON.stringify(r),i=Math.max(e.margin.l||0,0),a=Math.max(e.margin.r||0,0),o=Math.max(e.margin.t||0,0),s=Math.max(e.margin.b||0,0),c=e._pushmargin;if(e.margin.autoexpand!==!1){c.base={l:{val:0,size:i},r:{val:1,size:a},t:{val:1,size:o},b:{val:0,size:s}} -;for(var h=Object.keys(c),f=0;fg){var A=(v*w+(M-e.width)*g)/(w-g),k=(M*(1-g)+(v-e.width)*(1-w))/(w-g);A>=0&&k>=0&&A+k>i+a&&(i=A,a=k)}}if(l(b)&&c[_].t){var T=c[_].t.val,S=c[_].t.size;if(T>y){var E=(b*T+(S-e.height)*y)/(T-y),L=(S*(1-y)+(b-e.height)*(1-T))/(T-y);E>=0&&L>=0&&E+L>s+o&&(s=E,o=L)}}}}if(r.l=Math.round(i),r.r=Math.round(a),r.t=Math.round(o),r.b=Math.round(s),r.p=Math.round(e.margin.pad),r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b,!e._replotting&&"{}"!==n&&n!==JSON.stringify(e._size))return u.plot(t)},d.graphJson=function(t,e,r,n,i){function a(t){if("function"==typeof t)return null;if(h.isPlainObject(t)){var e,n,i={};for(e in t)if("function"!=typeof t[e]&&["_","["].indexOf(e.charAt(0))===-1){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!h.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;i[e]=a(t[e])}return i}return Array.isArray(t)?t.map(a):h.isJSDate(t)?h.ms2DateTimeLocal(+t):t}(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&d.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames,u={data:(o||[]).map(function(t){var r=a(t);return e&&delete r.fit,r})};return e||(u.layout=a(s)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),l&&(u.frames=a(l)),"object"===n?u:JSON.stringify(u)},d.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){_=!0}),i.redraw&&t._transitionData._interruptCallbacks.push(function(){return u.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var o,s,l=0,c=0,d=t._fullLayout._basePlotModules,p=!1;if(r)for(s=0;s=0,E=S?h.angularAxis.domain:n.extent(M),L=Math.abs(M[1]-M[0]);k&&!A&&(L=0);var C=E.slice();T&&A&&(C[1]+=L);var D=h.angularAxis.ticksCount||4;D>8&&(D=D/(D/8)+D%8),h.angularAxis.ticksStep&&(D=(C[1]-C[0])/D);var z=h.angularAxis.ticksStep||(C[1]-C[0])/(D*(h.minorTicks+1));w&&(z=Math.max(Math.round(z),1)),C[2]||(C[2]=z);var I=n.range.apply(this,C);if(I=I.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===h.direction?[0,360]:[360,0]),c.layout.angularAxis.domain=s.domain(),c.layout.angularAxis.endPadding=T?L:0,void 0===(e=n.select(this).select("svg.chart-root"))||e.empty()){var P=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),O=this.appendChild(this.ownerDocument.importNode(P.documentElement,!0));e=n.select(O)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var R,j=e.select(".chart-group"),F={fill:"none",stroke:h.tickColor},N={"font-size":h.font.size,"font-family":h.font.family,fill:h.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+h.font.outlineColor}).join(",")};if(h.showLegend){R=e.select(".legend-group").attr({transform:"translate("+[b,h.margin.top]+")"}).style({display:"block"});var B=d.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend=void 0===t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:d.map(function(t,e){return t.name||"Element"+e}),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:R,elements:B,reverseOrder:h.legend.reverseOrder})})();var U=R.node().getBBox();b=Math.min(h.width-U.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,b=Math.max(10,b),_=[h.margin.left+b,h.margin.top+b],i.range([0,b]),c.layout.radialAxis.domain=i.domain(),R.attr("transform","translate("+[_[0]+b,_[1]-b]+")")}else R=e.select(".legend-group").style({display:"none"});e.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),j.attr("transform","translate("+_+")").style({cursor:"crosshair"});var V=[(h.width-(h.margin.left+h.margin.right+2*b+(U?U.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*b))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),e.select(".outer-group").attr("transform","translate("+V+")"),h.title){var H=e.select("g.title-group text").style(N).text(h.title),q=H.node().getBBox();H.attr({x:_[0]-q.width/2,y:_[1]-b-20})}var G=e.select(".radial.axis-group");if(h.radialAxis.gridLinesVisible){var Y=G.selectAll("circle.grid-circle").data(i.ticks(5));Y.enter().append("circle").attr({class:"grid-circle"}).style(F),Y.attr("r",i),Y.exit().remove()}G.select("circle.outside-circle").attr({r:b}).style(F);var W=e.select("circle.background-circle").attr({r:b}).style({fill:h.backgroundColor,stroke:h.stroke});if(h.radialAxis.visible){var X=n.svg.axis().scale(i).ticks(5).tickSize(5);G.call(X).attr({transform:"rotate("+h.radialAxis.orientation+")"}),G.selectAll(".domain").style(F),G.selectAll("g>text").text(function(t,e){return this.textContent+h.radialAxis.ticksSuffix}).style(N).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===h.radialAxis.tickOrientation?"rotate("+-h.radialAxis.orientation+") translate("+[0,N["font-size"]]+")":"translate("+[0,N["font-size"]]+")"}}),G.selectAll("g>line").style({stroke:"black"})}var Z=e.select(".angular.axis-group").selectAll("g.angular-tick").data(I),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+l(t,e)+")"}}).style({display:h.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(h.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(h.minorTicks+1)==0)}).style(F),J.selectAll(".minor").style({stroke:h.minorTickColor}),Z.select("line.grid-line").attr({x1:h.tickLength?b-h.tickLength:0,x2:b}).style({display:h.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(N);var K=Z.select("text.axis-text").attr({x:b+h.labelOffset,dy:".35em",transform:function(t,e){var r=l(t,e),n=b+h.labelOffset,i=h.angularAxis.tickOrientation;return"horizontal"==i?"rotate("+-r+" "+n+" 0)":"radial"==i?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:h.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(h.minorTicks+1)!=0?"":w?w[t]+h.angularAxis.ticksSuffix:t+h.angularAxis.ticksSuffix}).style(N);h.angularAxis.rewriteTicks&&K.text(function(t,e){return e%(h.minorTicks+1)!=0?"":h.angularAxis.rewriteTicks(this.textContent,e)});var Q=n.max(j.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));R.attr({transform:"translate("+[b+Q,h.margin.top]+")"});var $=e.select("g.geometry-group").selectAll("g").size()>0,tt=e.select("g.geometry-group").selectAll("g.geometry").data(d);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),d[0]||$){var et=[];d.forEach(function(t,e){var r={};r.radialScale=i,r.angularScale=s,r.container=tt.filter(function(t,r){return r==e}),r.geometry=t.geometry,r.orientation=h.orientation,r.direction=h.direction,r.index=e,et.push({data:t,geometryConfig:r})});var rt=n.nest().key(function(t,e){return void 0!==t.data.groupId||"unstacked"}).entries(et),nt=[];rt.forEach(function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return a(o[r].defaultConfig(),t)});o[r]().config(n)()})}var it,at,ot=e.select(".guides-group"),st=e.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,hasTick:!0})();if(!A){var ht=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});j.on("mousemove.angular-guide",function(t,e){var r=o.util.getMousePos(W).angle;ht.attr({x2:-b,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(b+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){ot.select("line").style({opacity:0})})}var ft=ot.select("circle").style({stroke:"grey",fill:"none"});j.on("mousemove.radial-guide",function(t,e){var r=o.util.getMousePos(W).radius;ft.attr({r:r}).style({opacity:.5}),at=i.invert(o.util.getMousePos(W).radius);var n=o.util.convertToCartesian(r,h.radialAxis.orientation);ut.text(o.util.round(at)).move([n[0]+_[0],n[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){ft.style({opacity:0}),ct.hide(),lt.hide(),ut.hide()}),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(t,r){var i=n.select(this),a=i.style("fill"),s="black",l=i.style("opacity")||1;if(i.attr({"data-opacity":l}),"none"!=a){i.attr({"data-fill":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var u={t:o.util.round(t[0]),r:o.util.round(t[1])};A&&(u.t=w[t[0]]);var c="t: "+u.t+", r: "+u.r,h=this.getBoundingClientRect(),f=e.node().getBoundingClientRect(),d=[h.left+h.width/2-V[0]-f.left,h.top+h.height/2-V[1]-f.top];ct.config({color:s}).text(c),ct.move(d)}else a=i.style("stroke"),i.attr({"data-stroke":a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ct.show()}).on("mouseout.tooltip",function(t,e){ct.hide();var r=n.select(this),i=r.attr("data-fill");i?r.style({fill:i,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})})}),f}var e,r,i,s,l={data:[],layout:{}},u={},c={},h=n.dispatch("hover"),f={};return f.render=function(e){return t(e),this},f.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),a(l.data[e],o.Axis.defaultConfig().data[0]),a(l.data[e],t)}),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,e.layout),this},f.getLiveConfig=function(){return c},f.getinputConfig=function(){return u},f.radialScale=function(t){return i},f.angularScale=function(t){return s},f.svg=function(){return e},n.rebind(f,h,"on"),f},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach(function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)});var s={t:a,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if(void 0===t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return r===-2},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i0)){var s=n.select(this.parentNode).selectAll("path.line").data([0]);s.enter().insert("path"),s.attr({class:"line",d:f(o),transform:function(e,r){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return g.fill(r,i,a)},"fill-opacity":0,stroke:function(t,e){return g.stroke(r,i,a)},"stroke-width":function(t,e){return g["stroke-width"](r,i,a)},"stroke-dasharray":function(t,e){return g["stroke-dasharray"](r,i,a)},opacity:function(t,e){return g.opacity(r,i,a)},display:function(t,e){return g.display(r,i,a)}})}};var d=t.angularScale.range(),p=Math.abs(d[1]-d[0])/l[0].length*Math.PI/180,m=n.svg.arc().startAngle(function(t){return-p/2}).endAngle(function(t){return p/2}).innerRadius(function(e){return t.radialScale(c+(e[2]||0))}).outerRadius(function(e){return t.radialScale(c+(e[2]||0))+t.radialScale(e[1])});h.arc=function(e,r,i){n.select(this).attr({class:"mark arc",d:m,transform:function(e,r){return"rotate("+(t.orientation+u(e[0])+90)+")"}})};var g={fill:function(t,r,n){return e[n].data.color},stroke:function(t,r,n){return e[n].data.strokeColor},"stroke-width":function(t,r,n){return e[n].data.strokeSize+"px"},"stroke-dasharray":function(t,r,n){return i[e[n].data.strokeDash]},opacity:function(t,r,n){return e[n].data.opacity},display:function(t,r,n){return void 0===e[n].data.visible||e[n].data.visible?"block":"none"}},v=n.select(this).selectAll("g.layer").data(l);v.enter().append("g").attr({class:"layer"});var y=v.selectAll("path.mark").data(function(t,e){return t});y.enter().append("path").attr({class:"mark"}),y.style(g).each(h[t.geometryType]),y.exit().remove(),v.exit().remove()})}var e=[o.PolyChart.defaultConfig()],r=n.dispatch("hover"),i={solid:"none",dash:[5,2],dot:[2,5]};return t.config=function(t){return arguments.length?(t.forEach(function(t,r){e[r]||(e[r]={}),a(e[r],o.PolyChart.defaultConfig()),a(e[r],t)}),this):e},t.getColorScale=function(){},n.rebind(t,r,"on"),t},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){function t(){var r=e.legendConfig,i=e.data.map(function(t,e){return[].concat(t).map(function(t,n){var i=a({},r.elements[e]);return i.name=t,i.color=[].concat(r.elements[e].color)[n],i})}),o=n.merge(i);o=o.filter(function(t,e){return r.elements[e]&&(r.elements[e].visibleInLegend||void 0===r.elements[e].visibleInLegend)}),r.reverseOrder&&(o=o.reverse());var s=r.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map(function(t,e){return t.color}),u=r.fontSize,c=null==r.isContinuous?"number"==typeof o[0]:r.isContinuous,h=c?r.height:u*o.length,f=s.classed("legend-group",!0),d=f.selectAll("svg").data([0]),p=d.enter().append("svg").attr({width:300,height:h+u,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var m=n.range(o.length),g=n.scale[c?"linear":"ordinal"]().domain(m).range(l),v=n.scale[c?"linear":"ordinal"]().domain(m)[c?"range":"rangePoints"]([0,h]),y=function(t,e){var r=3*e;return"line"===t?"M"+[[-e/2,-e/12],[e/2,-e/12],[e/2,e/12],[-e/2,e/12]]+"Z":n.svg.symbolTypes.indexOf(t)!=-1?n.svg.symbol().type(t).size(r)():n.svg.symbol().type("square").size(r)()};if(c){var b=d.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);b.enter().append("stop"),b.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),d.append("rect").classed("legend-mark",!0).attr({height:r.height,width:r.colorBandWidth,fill:"url(#grad1)"})}else{var x=d.select(".legend-marks").selectAll("path.legend-mark").data(o);x.enter().append("path").classed("legend-mark",!0),x.attr({transform:function(t,e){return"translate("+[u/2,v(e)+u/2]+")"},d:function(t,e){var r=t.symbol;return y(r,u)},fill:function(t,e){return g(e)}}),x.exit().remove()}var _=n.svg.axis().scale(v).orient("right"),w=d.select("g.legend-axis").attr({transform:"translate("+[c?r.colorBandWidth:u,u/2]+")"}).call(_);return w.selectAll(".domain").style({fill:"none",stroke:"none"}),w.selectAll("line").style({fill:"none",stroke:c?r.textColor:"none"}),w.selectAll("text").style({fill:r.textColor,"font-size":r.fontSize}).text(function(t,e){return o[e].name}),t}var e=o.Legend.defaultConfig(),r=n.dispatch("hover");return t.config=function(t){return arguments.length?(a(e,t),this):e},n.rebind(t,r,"on"),t},o.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=function(){t=i.container.selectAll("g."+s).data([0]);var n=t.enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:i.padding+10,dy:.3*+i.fontSize}),l};return l.text=function(a){var o=n.hsl(i.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",c=a||"";e.style({fill:u,"font-size":i.fontSize+"px"}).text(c);var h=i.padding,f=e.node().getBBox(),d={fill:i.color,stroke:s,"stroke-width":"2px"},p=f.width+2*h+10,m=f.height+2*h;return r.attr({d:"M"+[[10,-m/2],[10,-m/4],[i.hasTick?0:10,0],[10,m/4],[10,m/2],[p,m/2],[p,-m/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[10,-m/2+2*h]+")"}),t.style({display:"block"}),l},l.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),l},l.hide=function(){if(t)return t.style({display:"none"}),l},l.show=function(){if(t)return t.style({display:"block"}),l},l.config=function(t){return a(i,t),l},l},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={};return t.convert=function(t,e){var r={} -;if(t.data&&(r.data=t.data.map(function(t,r){var n=a({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",n.dotVisible===!0?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n}),!e&&t.layout&&"stack"===t.layout.barmode)){var i=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=i.indexOf(t.geometry);n!=-1&&(r.data[e].groupId=n)})}if(t.layout){var s=a({},t.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?(void 0!==s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&void 0!==s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&void 0!==s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&void 0!==s.margin.t){var l=["t","r","b","l","pad"],u=["top","right","bottom","left","pad"],c={};n.entries(s.margin).forEach(function(t,e){c[u[l.indexOf(t.key)]]=t.value}),s.margin=c}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r},t}},{"../../lib":680,d3:104}],783:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=i.extendDeepAll,u=e.exports={};u.framework=function(t){function e(e,i){return i&&(h=i),n.select(n.select(h).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),r=r?l(r,e):e,a||(a=o.Axis()),c=o.adapter.plotly().convert(r),a.config(c).render(h),t.data=r.data,t.layout=r.layout,u.fillLayout(t),r}var r,i,a,c,h,f=new s;return e.isPolar=!0,e.svg=function(){return a.svg()},e.getConfig=function(){return r},e.getLiveConfig=function(){return o.adapter.plotly().convert(a.getLiveConfig(),!0)},e.getLiveScales=function(){return{t:a.angularScale(),r:a.radialScale()}},e.setUndoPoint=function(){var t=this,e=o.util.cloneJson(r);!function(e,r){f.add({undo:function(){r&&t(r)},redo:function(){t(e)}})}(e,i),i=o.util.cloneJson(e)},e.undo=function(){f.undo()},e.redo=function(){f.redo()},e},u.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),i=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{"../../components/color":575,"../../lib":680,"./micropolar":782,"./undo_manager":784,d3:104}],784:[function(t,e,r){"use strict";e.exports=function(){function t(t,e){return t?(i=!0,t[e](),i=!1,this):this}var e,r=[],n=-1,i=!1;return{add:function(t){return i?this:(r.splice(n+1,r.length-n),r.push(t),n=r.length-1,this)},setCallback:function(t){e=t},undo:function(){var i=r[n];return i?(t(i,"undo"),n-=1,e&&e(i.undo),this):this},redo:function(){var i=r[n+1];return i?(t(i,"redo"),n+=1,e&&e(i.redo),this):this},clear:function(){r=[],n=-1},hasUndo:function(){return n!==-1},hasRedo:function(){return n=o&&(d.min=0,p.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}var i=t("../../../components/color"),a=t("../../subplot_defaults"),o=t("./layout_attributes"),s=t("./axis_defaults"),l=["aaxis","baxis","caxis"];e.exports=function(t,e,r){a(t,e,r,{type:"ternary",attributes:o,handleDefaults:n,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../../components/color":575,"../../subplot_defaults":785,"./axis_defaults":789,"./layout_attributes":791}],791:[function(t,e,r){"use strict";var n=t("../../../components/color/attributes"),i=t("./axis_attributes");e.exports={domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},bgcolor:{valType:"color",dflt:n.background},sum:{valType:"number",dflt:1,min:0},aaxis:i,baxis:i,caxis:i}},{"../../../components/color/attributes":574,"./axis_attributes":788}],792:[function(t,e,r){"use strict";function n(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework()}function i(t){a.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}var a=t("d3"),o=t("tinycolor2"),s=t("../../plotly"),l=t("../../lib"),u=t("../../components/color"),c=t("../../components/drawing"),h=t("../cartesian/set_convert"),f=t("../../lib/extend").extendFlat,d=t("../plots"),p=t("../cartesian/axes"),m=t("../../components/dragelement"),g=t("../../components/titles"),v=t("../cartesian/select"),y=t("../cartesian/constants"),b=t("../cartesian/graph_interact");e.exports=n;var x=n.prototype;x.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={}},x.plot=function(t,e){var r=this,n=e[r.id],i=e._size;r.adjustLayout(n,i),d.generalUpdatePerTraceModule(r,t,n),r.layers.plotbg.select("path").call(u.fill,n.bgcolor)},x.makeFramework=function(){var t=this,e=t.defs.selectAll("g.clips").data([0]);e.enter().append("g").classed("clips",!0);var r="clip"+t.layoutId+t.id;t.clipDef=e.selectAll("#"+r).data([0]),t.clipDef.enter().append("clipPath").attr("id",r).append("path").attr("d","M0,0Z"),t.plotContainer=t.container.selectAll("g."+t.id).data([0]),t.plotContainer.enter().append("g").classed(t.id,!0),t.layers={};var n=["draglayer","plotbg","backplot","grids","frontplot","zoom","aaxis","baxis","caxis","axlines"];t.plotContainer.selectAll("g.toplevel").data(n).enter().append("g").attr("class",function(t){return"toplevel "+t}).each(function(e){var r=a.select(this);t.layers[e]=r,"frontplot"===e?r.append("g").classed("scatterlayer",!0):"backplot"===e?r.append("g").classed("maplayer",!0):"plotbg"===e?r.append("path").attr("d","M0,0Z"):"axlines"===e&&r.selectAll("path").data(["aline","bline","cline"]).enter().append("path").each(function(t){a.select(this).classed(t,!0)})}),t.plotContainer.select(".grids").selectAll("g.grid").data(["agrid","bgrid","cgrid"]).enter().append("g").attr("class",function(t){return"grid "+t}).each(function(e){t.layers[e]=a.select(this)}),t.plotContainer.selectAll(".backplot,.frontplot,.grids").call(c.setClipUrl,r),t.graphDiv._context.staticPlot||t.initInteractions()};var _=Math.sqrt(4/3);x.adjustLayout=function(t,e){var r,n,i,a,o,s,l=this,c=t.domain,d=(c.x[0]+c.x[1])/2,p=(c.y[0]+c.y[1])/2,m=c.x[1]-c.x[0],g=c.y[1]-c.y[0],v=m*e.w,y=g*e.h,b=t.sum,x=t.aaxis.min,w=t.baxis.min,M=t.caxis.min;v>_*y?(a=y,i=a*_):(i=v,a=i/_),o=m*i/v,s=g*a/y,r=e.l+e.w*d-i/2,n=e.t+e.h*(1-p)-a/2,l.x0=r,l.y0=n,l.w=i,l.h=a,l.sum=b,l.xaxis={type:"linear",range:[x+2*M-b,b-x-2*w],domain:[d-o/2,d+o/2],_id:"x"},h(l.xaxis,l.graphDiv._fullLayout),l.xaxis.setScale(),l.yaxis={type:"linear",range:[x,b-w-M],domain:[p-s/2,p+s/2],_id:"y"},h(l.yaxis,l.graphDiv._fullLayout),l.yaxis.setScale();var A=l.yaxis.domain[0],k=l.aaxis=f({},t.aaxis,{range:[x,b-w-M],side:"left",_counterangle:30,tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*_],_axislayer:l.layers.aaxis,_gridlayer:l.layers.agrid,_pos:0,_id:"y",_length:i,_gridpath:"M0,0l"+a+",-"+i/2});h(k,l.graphDiv._fullLayout),k.setScale();var T=l.baxis=f({},t.baxis,{range:[b-x-M,w],side:"bottom",_counterangle:30,domain:l.xaxis.domain,_axislayer:l.layers.baxis,_gridlayer:l.layers.bgrid,_counteraxis:l.aaxis,_pos:0,_id:"x",_length:i,_gridpath:"M0,0l-"+i/2+",-"+a});h(T,l.graphDiv._fullLayout),T.setScale(),k._counteraxis=T;var S=l.caxis=f({},t.caxis,{range:[b-x-w,M],side:"right",_counterangle:30,tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*_],_axislayer:l.layers.caxis,_gridlayer:l.layers.cgrid,_counteraxis:l.baxis,_pos:0,_id:"y",_length:i,_gridpath:"M0,0l-"+a+","+i/2});h(S,l.graphDiv._fullLayout),S.setScale();var E="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";l.clipDef.select("path").attr("d",E),l.layers.plotbg.select("path").attr("d",E);var L="translate("+r+","+n+")";l.plotContainer.selectAll(".scatterlayer,.maplayer,.zoom").attr("transform",L);var C="translate("+r+","+(n+a)+")";l.layers.baxis.attr("transform",C),l.layers.bgrid.attr("transform",C);var D="translate("+(r+i/2)+","+n+")rotate(30)";l.layers.aaxis.attr("transform",D),l.layers.agrid.attr("transform",D);var z="translate("+(r+i/2)+","+n+")rotate(-30)";l.layers.caxis.attr("transform",z),l.layers.cgrid.attr("transform",z),l.drawAxes(!0),l.plotContainer.selectAll(".crisp").classed("crisp",!1);var I=l.layers.axlines;I.select(".aline").attr("d",k.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(u.stroke,k.linecolor||"#000").style("stroke-width",(k.linewidth||0)+"px"),I.select(".bline").attr("d",T.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(u.stroke,T.linecolor||"#000").style("stroke-width",(T.linewidth||0)+"px"),I.select(".cline").attr("d",S.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(u.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px")},x.drawAxes=function(t){var e=this,r=e.graphDiv,n=e.id.substr(7)+"title",i=e.aaxis,a=e.baxis,o=e.caxis;if(p.doTicks(r,i,!0),p.doTicks(r,a,!0),p.doTicks(r,o,!0),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0));g.draw(r,"a"+n,{propContainer:i,propName:e.id+".aaxis.title",dfltName:"Component A",attributes:{x:e.x0+e.w/2,y:e.y0-i.titlefont.size/3-s,"text-anchor":"middle"}});var l=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;g.draw(r,"b"+n,{propContainer:a,propName:e.id+".baxis.title",dfltName:"Component B",attributes:{x:e.x0-l,y:e.y0+e.h+.83*a.titlefont.size+l,"text-anchor":"middle"}}),g.draw(r,"c"+n,{propContainer:o,propName:e.id+".caxis.title",dfltName:"Component C",attributes:{x:e.x0+e.w+l,y:e.y0+e.h+.83*o.titlefont.size+l,"text-anchor":"middle"}})}};var w=y.MINZOOM/2+.87,M="m-0.87,.5h"+w+"v3h-"+(w+5.2)+"l"+(w/2+2.6)+",-"+(.87*w+4.5)+"l2.6,1.5l-"+w/2+","+.87*w+"Z",A="m0.87,.5h-"+w+"v3h"+(w+5.2)+"l-"+(w/2+2.6)+",-"+(.87*w+4.5)+"l-2.6,1.5l"+w/2+","+.87*w+"Z",k="m0,1l"+w/2+","+.87*w+"l2.6,-1.5l-"+(w/2+2.6)+",-"+(.87*w+4.5)+"l-"+(w/2+2.6)+","+(.87*w+4.5)+"l2.6,1.5l"+w/2+",-"+.87*w+"Z",T=!0;x.initInteractions=function(){function t(t,e,r){var n=R.getBoundingClientRect();x=e-n.left,w=r-n.top,S={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=S,E=O.aaxis.range[1]-S.a,C=o(O.graphDiv._fullLayout[O.id].bgcolor).getLuminance(),D="M0,"+O.h+"L"+O.w/2+", 0L"+O.w+","+O.h+"Z",z=!1,I=F.append("path").attr("class","zoombox").style({fill:C>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",D),P=F.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),p()}function e(t,e){return 1-e/O.h}function r(t,e){return 1-(t+(O.h-e)/Math.sqrt(3))/O.w}function n(t,e){return(t-(O.h-e)/Math.sqrt(3))/O.w}function a(t,i){var a=x+t,o=w+i,s=Math.max(0,Math.min(1,e(x,w),e(a,o))),l=Math.max(0,Math.min(1,r(x,w),r(a,o))),u=Math.max(0,Math.min(1,n(x,w),n(a,o))),c=(s/2+u)*O.w,h=(1-s/2-l)*O.w,f=(c+h)/2,d=h-c,p=(1-s)*O.h,m=p-d/_;d.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),P.transition().style("opacity",1).duration(200),z=!0)}function c(t,e){if(L===S)return 2===e&&g(),i(j);i(j);var r={};r[O.id+".aaxis.min"]=L.a,r[O.id+".baxis.min"]=L.b,r[O.id+".caxis.min"]=L.c,s.relayout(j,r),T&&j.data&&j._context.showTips&&(l.notifier("Double-click to
zoom back out","long"),T=!1)}function h(){S={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=S}function f(t,e){var r=t/O.xaxis._m,n=e/O.yaxis._m;L={a:S.a-n,b:S.b+(r+n)/2,c:S.c-(r-n)/2};var i=[L.a,L.b,L.c].sort(),a={a:i.indexOf(L.a),b:i.indexOf(L.b),c:i.indexOf(L.c)};i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),L={a:i[a.a],b:i[a.b],c:i[a.c]},e=(S.a-L.a)*O.yaxis._m,t=(S.c-L.c-S.b+L.b)*O.xaxis._m);var o="translate("+(O.x0+t)+","+(O.y0+e)+")";O.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",o),O.aaxis.range=[L.a,O.sum-L.b-L.c],O.baxis.range=[O.sum-L.a-L.c,L.b],O.caxis.range=[O.sum-L.a-L.b,L.c],O.drawAxes(!1),O.plotContainer.selectAll(".crisp").classed("crisp",!1)}function d(t,e){if(t){var r={};r[O.id+".aaxis.min"]=L.a,r[O.id+".baxis.min"]=L.b,r[O.id+".caxis.min"]=L.c,s.relayout(j,r)}else 2===e&&g()}function p(){O.plotContainer.selectAll(".select-outline").remove()}function g(){var t={};t[O.id+".aaxis.min"]=0,t[O.id+".baxis.min"]=0,t[O.id+".caxis.min"]=0,j.emit("plotly_doubleclick",null),s.relayout(j,t)}var x,w,S,E,L,C,D,z,I,P,O=this,R=O.layers.plotbg.select("path").node(),j=O.graphDiv,F=O.layers.zoom,N={element:R,gd:j,plotinfo:{plot:F},doubleclick:g,subplot:O.id,prepFn:function(e,r,n){N.xaxes=[O.xaxis],N.yaxes=[O.yaxis];var i=j._fullLayout.dragmode;e.shiftKey&&(i="pan"===i?"zoom":"pan"),N.minDrag="lasso"===i?1:void 0,"zoom"===i?(N.moveFn=a,N.doneFn=c,t(e,r,n)):"pan"===i?(N.moveFn=f,N.doneFn=d,h(),p()):"select"!==i&&"lasso"!==i||v(e,r,n,N,i)}};R.onmousemove=function(t){b.hover(j,t,O.id),j._fullLayout._lasthover=R,j._fullLayout._hoversubplot=O.id},R.onmouseout=function(t){j._dragging||m.unhover(j,t)},R.onclick=function(t){b.click(j,t)},m.init(N)}},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../components/titles":651,"../../lib":680,"../../lib/extend":672,"../../plotly":714,"../cartesian/axes":719,"../cartesian/constants":724,"../cartesian/graph_interact":726,"../cartesian/select":732,"../cartesian/set_convert":733,"../plots":778,d3:104,tinycolor2:511}],793:[function(t,e,r){"use strict";function n(t){if(t.layoutAttributes){var e=t.layoutAttributes._arrayAttrRegexps;if(e)for(var n=0;n-1}var a=t("../lib"),o=t("../plots/plots"),s=a.extendFlat,l=a.extendDeep;e.exports=function(t,e){t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var r,a=t.data,u=t.layout,c=l([],a),h=l({},u,n(e.tileClass));if(e.width&&(h.width=e.width),e.height&&(h.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){h.annotations=[];var f=Object.keys(h);for(r=0;r0&&k>0,N=M<=R&&k<=j,B=M<=j&&k<=R,U="h"===v?R>=M*(j/k):j>=k*(R/M);F&&(N||B||U)?b="inside":(b="outside",x.remove(),x=null)}else b="inside";if(!x&&(x=m(e,y,"outside"===b?E:S),_=A.bBox(x.node()),M=_.width,k=_.height,M<=0||k<=0))return void x.remove();var V;V="outside"===b?a(o,f,d,p,_,v):i(o,f,d,p,_,v),x.attr("transform",V)}}}function i(t,e,r,n,i,a){var s,l,u,c,h,f=i.width,d=i.height,p=(i.left+i.right)/2,m=(i.top+i.bottom)/2,g=Math.abs(e-t),v=Math.abs(n-r);g>2*z&&v>2*z?(h=z,g-=2*h,v-=2*h):h=0;var y,b;return f<=g&&d<=v?(y=!1,b=1):f<=v&&d<=g?(y=!0,b=1):fr?(u=(t+e)/2,c=n-h-l/2):(u=(t+e)/2,c=n+h+l/2),o(p,m,u,c,b,y)}function a(t,e,r,n,i,a){var s,l="h"===a?Math.abs(n-r):Math.abs(e-t);l>2*z&&(s=z,l-=2*s);var u,c,h,f,d="h"===a?Math.min(1,l/i.height):Math.min(1,l/i.width),p=(i.left+i.right)/2,m=(i.top+i.bottom)/2;return u=d*i.width,c=d*i.height,"h"===a?er?(h=(t+e)/2,f=n+s+c/2):(h=(t+e)/2,f=n-s-c/2),o(p,m,h,f,d,!1)}function o(t,e,r,n,i,a){var o,s;return i<1?o="scale("+i+") ":(i=1,o=""),s=a?"rotate("+a+" "+t+" "+e+") ":"","translate("+(r-i*t)+" "+(n-i*e)+")"+o+s}function s(t,e){var r=d(t.text,e);return p(S,r)}function l(t,e){var r=d(t.textposition,e);return m(E,r)}function u(t,e,r){return f(L,t.textfont,e,r)}function c(t,e,r){return f(C,t.insidetextfont,e,r)}function h(t,e,r){return f(D,t.outsidetextfont,e,r)}function f(t,e,r,n){e=e||{};var i=d(e.family,r),a=d(e.size,r),o=d(e.color,r);return{family:p(t.family,i,n.family),size:g(t.size,a,n.size),color:v(t.color,o,n.color)}}function d(t,e){var r;return Array.isArray(t)?ei))return e}return void 0!==r?r:t.dflt}function v(t,e,r){return x(e).isValid()?e:void 0!==r?r:t.dflt}var y=t("d3"),b=t("fast-isnumeric"),x=t("tinycolor2"),_=t("../../lib"),w=t("../../lib/svg_text_utils"),M=t("../../components/color"),A=t("../../components/drawing"),k=t("../../components/errorbars"),T=t("./attributes"),S=T.text,E=T.textposition,L=T.textfont,C=T.insidetextfont,D=T.outsidetextfont,z=3;e.exports=function(t,e,r){var i=e.xaxis,a=e.yaxis,o=t._fullLayout,s=e.plot.select(".barlayer").selectAll("g.trace.bars").data(r);s.enter().append("g").attr("class","trace bars"),s.append("g").attr("class","points").each(function(e){var r=e[0].t,s=e[0].trace,l=r.poffset,u=Array.isArray(l),c=r.barwidth,h=Array.isArray(c);y.select(this).selectAll("g.point").data(_.identity).enter().append("g").classed("point",!0).each(function(r,f){function d(t){return 0===o.bargap&&0===o.bargroupgap?y.round(Math.round(t)-S,2):t}function p(t,e){return Math.abs(t-e)>=2?d(t):t>e?Math.ceil(t):Math.floor(t)}var m,g,v,x,_=r.p+(u?l[f]:l),w=_+(h?c[f]:c),A=r.b,k=A+r.s;if("h"===s.orientation?(v=a.c2p(_,!0),x=a.c2p(w,!0),m=i.c2p(A,!0),g=i.c2p(k,!0)):(m=i.c2p(_,!0),g=i.c2p(w,!0),v=a.c2p(A,!0),x=a.c2p(k,!0)),!(b(m)&&b(g)&&b(v)&&b(x)&&m!==g&&v!==x))return void y.select(this).remove();var T=(r.mlw+1||s.marker.line.width+1||(r.trace?r.trace.marker.line.width:0)+1)-1,S=y.round(T/2%1,2);if(!t._context.staticPlot){var E=M.opacity(r.mc||s.marker.color),L=E<1||T>.01?d:p;m=L(m,g),g=L(g,m),v=L(v,x),x=L(x,v)}var C=y.select(this);C.append("path").attr("d","M"+m+","+v+"V"+x+"H"+g+"V"+v+"Z"),n(t,C,e,f,m,g,v,x)})}),s.call(k.plot,e)}},{"../../components/color":575,"../../components/drawing":598,"../../components/errorbars":604,"../../lib":680,"../../lib/svg_text_utils":699,"./attributes":803,d3:104,"fast-isnumeric":113,tinycolor2:511}],811:[function(t,e,r){"use strict";function n(t,e,r,n){if(n.length){var s,l,u,c,h,f=t._fullLayout.barmode,d="overlay"===f,p="group"===f;if(d)i(t,e,r,n);else if(p){for(s=[],l=[],u=0;uu+s||!y(l))&&(h=!0,f(c,t))}for(var i=r.traces,a=v(e),o="fraction"===t._fullLayout.barnorm?1:100,s=o/1e9,l=e.l2c(e.c2l(0)),u="stack"===t._fullLayout.barmode?o:l,c=[l,u],h=!1,d=0;d1||0===s.bargap&&0===s.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(t){var e=t[0].trace,r=e.marker,o=r.line,s=a.tryColorscale(r,""),l=a.tryColorscale(r,"line");n.select(this).selectAll("path").each(function(t){var e,a,u=(t.mlw+1||o.width+1)-1,c=n.select(this);e="mc"in t?t.mcc=s(t.mc):Array.isArray(r.color)?i.defaultLine:r.color,c.style("stroke-width",u+"px").call(i.fill,e),u&&(a="mlc"in t?t.mlcc=l(t.mlc):Array.isArray(o.color)?i.defaultLine:o.color,c.call(i.stroke,a))})}),e.call(o.style)}},{"../../components/color":575,"../../components/drawing":598,"../../components/errorbars":604,d3:104}],814:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),i(t,"marker")&&a(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width")}},{"../../components/color":575,"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588}],815:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../components/color/attributes"),a=t("../../lib/extend").extendFlat,o=n.marker,s=o.line;e.exports={y:{valType:"data_array"},x:{valType:"data_array"},x0:{valType:"any"},y0:{valType:"any"},xcalendar:n.xcalendar,ycalendar:n.ycalendar,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1},jitter:{valType:"number",min:0,max:1},pointpos:{valType:"number",min:-2,max:2},orientation:{valType:"enumerated",values:["v","h"]},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)"},symbol:a({},o.symbol,{arrayOk:!1}),opacity:a({},o.opacity,{arrayOk:!1,dflt:1}),size:a({},o.size,{arrayOk:!1}),color:a({},o.color,{arrayOk:!1}),line:{color:a({},s.color,{arrayOk:!1,dflt:i.defaultLine}),width:a({},s.width,{arrayOk:!1,dflt:0}),outliercolor:{valType:"color"},outlierwidth:{valType:"number",min:0,dflt:1}}},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2}},fillcolor:n.fillcolor}},{"../../components/color/attributes":574,"../../lib/extend":672,"../scatter/attributes":924}],816:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/cartesian/axes");e.exports=function(t,e){var r,o,s,l,u,c,h,f,d,p=a.getFromId(t,e.xaxis||"x"),m=a.getFromId(t,e.yaxis||"y"),g=e.orientation,v=[];"h"===g?(r=p,o="x",u=m,c="y"):(r=m,o="y",u=p,c="x"),s=r.makeCalcdata(e,o),a.expand(r,s,{padded:!0}),h=function(t,e,r,a,o){var s;return r in e?h=a.makeCalcdata(e,r):(s=r+"0"in e?e[r+"0"]:"name"in e&&("category"===a.type||n(e.name)&&["linear","log"].indexOf(a.type)!==-1||i.isDateTime(e.name)&&"date"===a.type)?e.name:t.numboxes,s=a.d2c(s,0,e[r+"calendar"]),h=o.map(function(){return s})),h}(t,e,c,u,s);var y=i.distinctVals(h);return f=y.vals,d=y.minDiff/2,l=function(t,e,r,a,o){var s,l,u,c,h=a.length,f=e.length,d=[],p=[];for(s=0;s=0&&u1,m=r.dPos*(1-c.boxgap)*(1-c.boxgroupgap)/(p?t.numboxes:1),g=p?2*r.dPos*(-.5+(r.boxnum+.5)/t.numboxes)*(1-c.boxgap):0,v=m*d.whiskerwidth;if(d.visible!==!0||r.emptybox)return void a.select(this).remove();"h"===d.orientation?(l=f,u=h):(l=h,u=f),r.bPos=g,r.bdPos=m,n(),a.select(this).selectAll("path.box").data(o.identity).enter().append("path").attr("class","box").each(function(t){var e=l.c2p(t.pos+g,!0),r=l.c2p(t.pos+g-m,!0),n=l.c2p(t.pos+g+m,!0),i=l.c2p(t.pos+g-v,!0),s=l.c2p(t.pos+g+v,!0),c=u.c2p(t.q1,!0),h=u.c2p(t.q3,!0),f=o.constrain(u.c2p(t.med,!0),Math.min(c,h)+1,Math.max(c,h)-1),p=u.c2p(d.boxpoints===!1?t.min:t.lf,!0),y=u.c2p(d.boxpoints===!1?t.max:t.uf,!0);"h"===d.orientation?a.select(this).attr("d","M"+f+","+r+"V"+n+"M"+c+","+r+"V"+n+"H"+h+"V"+r+"ZM"+c+","+e+"H"+p+"M"+h+","+e+"H"+y+(0===d.whiskerwidth?"":"M"+p+","+i+"V"+s+"M"+y+","+i+"V"+s)):a.select(this).attr("d","M"+r+","+f+"H"+n+"M"+r+","+c+"H"+n+"V"+h+"H"+r+"ZM"+e+","+c+"V"+p+"M"+e+","+h+"V"+y+(0===d.whiskerwidth?"":"M"+i+","+p+"H"+s+"M"+i+","+y+"H"+s))}),d.boxpoints&&a.select(this).selectAll("g.points").data(function(t){return t.forEach(function(t){t.t=r,t.trace=d}),t}).enter().append("g").attr("class","points").selectAll("path").data(function(t){var e,r,n,a,s,l,u,c="all"===d.boxpoints?t.val:t.val.filter(function(e){return et.uf}),h=Math.max((t.max-t.min)/10,t.q3-t.q1),f=1e-9*h,p=.01*h,v=[],y=0;if(d.jitter){if(0===h)for(y=1,v=new Array(c.length),e=0;et.lo&&(n.so=!0),n})}).enter().append("path").call(s.translatePoints,h,f),d.boxmean&&a.select(this).selectAll("path.mean").data(o.identity).enter().append("path").attr("class","mean").style("fill","none").each(function(t){var e=l.c2p(t.pos+g,!0),r=l.c2p(t.pos+g-m,!0),n=l.c2p(t.pos+g+m,!0),i=u.c2p(t.mean,!0),o=u.c2p(t.mean-t.sd,!0),s=u.c2p(t.mean+t.sd,!0);"h"===d.orientation?a.select(this).attr("d","M"+i+","+r+"V"+n+("sd"!==d.boxmean?"":"m0,0L"+o+","+e+"L"+i+","+r+"L"+s+","+e+"Z")):a.select(this).attr("d","M"+r+","+i+"H"+n+("sd"!==d.boxmean?"":"m0,0L"+e+","+o+"L"+r+","+i+"L"+e+","+s+"Z"))})})}},{"../../components/drawing":598,"../../lib":680,d3:104}],823:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/cartesian/axes"),a=t("../../lib");e.exports=function(t,e){var r,o,s,l,u=t._fullLayout,c=e.xaxis,h=e.yaxis,f=["v","h"];for(o=0;ol&&(e.z=c.slice(0,l)),s("locationmode"),s("text"),s("marker.line.color"),s("marker.line.width"),i(t,e,o,s,{prefix:"",cLetter:"z"}),s("hoverinfo",1===o._dataLength?"location+z+text":void 0)}},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":829}],832:[function(t,e,r){"use strict";e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],833:[function(t,e,r){"use strict";function n(t,e,r,n){var o=e.hoverinfo,s="all"===o?a.hoverinfo.flags:o.split("+"),l=s.indexOf("name")!==-1,u=s.indexOf("location")!==-1,c=s.indexOf("z")!==-1,h=s.indexOf("text")!==-1,f=!l&&u,d=[];f?t.nameOverride=r.id:(l&&(t.nameOverride=e.name),u&&d.push(r.id)),c&&d.push(function(t){return i.tickText(n,n.c2l(t),"hover").text}(r.z)),h&&d.push(r.tx),t.extraText=d.join("
")}var i=t("../../plots/cartesian/axes"),a=t("./attributes");e.exports=function(t){var e=t.cd,r=e[0].trace,i=t.subplot,a=i.choroplethHoverPt;if(a){var o=i.projection(a.properties.ct);return t.x0=t.x1=o[0],t.y0=t.y1=o[1],t.index=a.index,t.location=a.id,t.z=a.z,n(t,r,a,i.mockAxis),[t]}}},{"../../plots/cartesian/axes":719,"./attributes":829}],834:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"), -n.colorbar=t("../heatmap/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="choropleth",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","noOpacity"],n.meta={},e.exports=n},{"../../plots/geo":743,"../heatmap/colorbar":854,"./attributes":829,"./calc":830,"./defaults":831,"./event_data":832,"./hover":833,"./plot":835}],835:[function(t,e,r){"use strict";function n(t,e){for(var r,n=[],i=t.locations,a=i.length,o=u(t,e),s=(t.marker||{}).line||{},l=0;l0&&(n[0].trace=t),n}function i(t){t.framework.selectAll("g.trace.choropleth").each(function(t){var e=t[0].trace,r=a.select(this),n=e.marker||{},i=n.line||{},u=l.makeColorScaleFunc(l.extractScale(e.colorscale,e.zmin,e.zmax));r.selectAll("path.choroplethlocation").each(function(t){a.select(this).attr("fill",function(t){return u(t.z)}).call(o.stroke,t.mlc||i.color).call(s.dashLine,"",t.mlw||i.width||0)})})}var a=t("d3"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("../../components/colorscale"),u=t("../../lib/topojson_utils").getTopojsonFeatures,c=t("../../lib/geo_location_utils").locationToFeature,h=t("../../lib/array_to_calc_item"),f=t("../../plots/geo/constants");e.exports=function(t,e,r){function o(t){return t[0].trace.uid}var s,l=t.framework,u=l.select("g.choroplethlayer"),c=l.select("g.baselayer"),h=l.select("g.baselayeroverchoropleth"),d=f.baseLayersOverChoropleth,p=u.selectAll("g.trace.choropleth").data(e,o);p.enter().append("g").attr("class","trace choropleth"),p.exit().remove(),p.each(function(e){var r=e[0].trace,i=n(r,t.topojson),o=a.select(this).selectAll("path.choroplethlocation").data(i);o.enter().append("path").classed("choroplethlocation",!0).on("mouseover",function(e){t.choroplethHoverPt=e}).on("mouseout",function(){t.choroplethHoverPt=null}),o.exit().remove()}),h.selectAll("*").remove();for(var m=0;ms.end&&(s.start=s.end=(s.start+s.end)/2),e._input.contours||(e._input.contours={}),a(e._input.contours,{start:s.start,end:s.end,size:s.size}),e._input.autocontour=!0}else{var u=s.start,c=s.end,h=e._input.contours;if(u>c&&(s.start=h.start=c,c=s.end=h.end=u,u=s.start),!(s.size>0)){var f;f=u===c?1:n(u,c,e.ncontours).dtick,h.size=s.size=f}}return r}},{"../../lib":680,"../../plots/cartesian/axes":719,"../heatmap/calc":852}],838:[function(t,e,r){"use strict";var n=t("../../plots/plots"),i=t("../../components/colorbar/draw"),a=t("./make_color_map"),o=t("./end_plus");e.exports=function(t,e){var r=e[0].trace,s="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+s).remove(),r.showscale===!1)return void n.autoMargin(t,s);var l=i(t,s);e[0].t.cb=l;var u=r.contours,c=r.line,h=u.size||1,f=u.coloring,d=a(r,{isColorbar:!0});"heatmap"===f&&l.filllevels({start:r.zmin,end:r.zmax,size:(r.zmax-r.zmin)/254}),l.fillcolor("fill"===f||"heatmap"===f?d:"").line({color:"lines"===f?d:c.color,width:u.showlines!==!1?c.width:0,dash:c.dash}).levels({start:u.start,end:o(u),size:h}).options(r.colorbar)()}},{"../../components/colorbar/draw":578,"../../plots/plots":778,"./end_plus":842,"./make_color_map":846}],839:[function(t,e,r){"use strict";e.exports.BOTTOMSTART=[1,9,13,104,713],e.exports.TOPSTART=[4,6,7,104,713],e.exports.LEFTSTART=[8,12,14,208,1114],e.exports.RIGHTSTART=[2,3,11,208,1114],e.exports.NEWDELTA=[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],e.exports.CHOOSESADDLE={104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},e.exports.SADDLEREMAINDER={1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11}},{}],840:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){var a,o=n.coerce2(t,e,i,"contours.start"),s=n.coerce2(t,e,i,"contours.end"),l=o===!1||s===!1,u=r("contours.size");!(a=l?e.autocontour=!0:r("autocontour",!1))&&u||r("ncontours")}},{"../../lib":680,"./attributes":836}],841:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../heatmap/has_columns"),a=t("../heatmap/xyz_defaults"),o=t("./contours_defaults"),s=t("./style_defaults"),l=t("./attributes");e.exports=function(t,e,r,u){function c(r,i){return n.coerce(t,e,l,r,i)}if(!a(t,e,c,u))return void(e.visible=!1);c("text"),c("connectgaps",i(e)),o(t,e,c),s(t,e,c,u)}},{"../../lib":680,"../heatmap/has_columns":858,"../heatmap/xyz_defaults":866,"./attributes":836,"./contours_defaults":840,"./style_defaults":850}],842:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],843:[function(t,e,r){"use strict";function n(t,e){return Math.abs(t[0]-e[0])<.01&&Math.abs(t[1]-e[1])<.01}function i(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}function a(t,e,r){function a(t){return m[t%m.length]}var c,h=e.join(","),f=h,d=t.crossings[f],p=o(d,r,e),m=[s(t,e,[-p[0],-p[1]])],g=p.join(","),v=t.z.length,y=t.z[0].length;for(c=0;c<1e4;c++){if(d>20?(d=u.CHOOSESADDLE[d][(p[0]||p[1])<0?0:1],t.crossings[f]=u.SADDLEREMAINDER[d]):delete t.crossings[f],!(p=u.NEWDELTA[d])){l.log("Found bad marching index:",d,e,t.level);break}m.push(s(t,e,p)),e[0]+=p[0],e[1]+=p[1],n(m[m.length-1],m[m.length-2])&&m.pop(),f=e.join(",");var b=p[0]&&(e[0]<0||e[0]>y-2)||p[1]&&(e[1]<0||e[1]>v-2);if(f===h&&p.join(",")===g||r&&b)break;d=t.crossings[f]}1e4===c&&l.log("Infinite loop in contour?");var x,_,w,M,A,k,T,S=n(m[0],m[m.length-1]),E=0,L=.2*t.smoothing,C=[],D=0;for(c=1;c=D;c--)if((x=C[c])=D&&x+C[_]20&&e?208===t||1114===t?n=0===r[0]?1:-1:i=0===r[1]?1:-1:u.BOTTOMSTART.indexOf(t)!==-1?i=1:u.LEFTSTART.indexOf(t)!==-1?n=1:u.TOPSTART.indexOf(t)!==-1?i=-1:n=-1,[n,i]}function s(t,e,r){var n=e[0]+Math.max(r[0],0),i=e[1]+Math.max(r[1],0),a=t.z[i][n],o=t.xaxis,s=t.yaxis;if(r[1]){var l=(t.level-a)/(t.z[i][n+1]-a);return[o.c2p((1-l)*t.x[n]+l*t.x[n+1],!0),s.c2p(t.y[i],!0)]}var u=(t.level-a)/(t.z[i+1][n]-a);return[o.c2p(t.x[n],!0),s.c2p((1-u)*t.y[i]+u*t.y[i+1],!0)]}var l=t("../../lib"),u=t("./constants");e.exports=function(t){var e,r,n,i,o;for(n=0;nt?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);if(5===r||10===r){return t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208}return 15===r?0:r}var i=t("./constants");e.exports=function(t){var e,r,a,o,s,l,u,c,h,f=t[0].z,d=f.length,p=f[0].length,m=2===d||2===p;for(r=0;r1e3){d.warn("Too many contours, clipping at 1000",t);break}return i}function a(t,e,r){var n=t.plot.select(".maplayer").selectAll("g.contour."+r).data(e);return n.enter().append("g").classed("contour",!0).classed(r,!0),n.exit().remove(),n}function o(t,e,r){var n=t.selectAll("g.contourbg").data([0]);n.enter().append("g").classed("contourbg",!0);var i=n.selectAll("path").data("fill"===r.coloring?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+e.join("L")+"Z").style("stroke","none")}function s(t,e,r,n){var i=t.selectAll("g.contourfill").data([0]);i.enter().append("g").classed("contourfill",!0);var a=i.selectAll("path").data("fill"===n.coloring?e:[]);a.enter().append("path"),a.exit().remove(),a.each(function(t){var e=l(t,r);e?f.select(this).attr("d",e).style("stroke","none"):f.select(this).remove()})}function l(t,e){function r(t){return Math.abs(t[0]-e[2][0])<.01}for(var n,i,a,o,s,l,u=Math.min(t.z[0][0],t.z[0][1]),c=t.edgepaths.length||u<=t.level?"":"M"+e.join("L")+"Z",h=0,f=t.edgepaths.map(function(t,e){return e}),m=!0;f.length;){for(l=p.smoothopen(t.edgepaths[h],t.smoothing),c+=m?l:l.replace(/^M/,"L"),f.splice(f.indexOf(h),1),n=t.edgepaths[h][t.edgepaths[h].length-1],o=-1,a=0;a<4;a++){if(!n){d.log("Missing end?",h,t);break}for(!function(t){return Math.abs(t[1]-e[0][1])<.01}(n)||r(n)?!function(t){return Math.abs(t[0]-e[0][0])<.01}(n)?!function(t){return Math.abs(t[1]-e[2][1])<.01}(n)?r(n)&&(i=e[2]):i=e[3]:i=e[0]:i=e[1],s=0;s=0&&(i=g,o=s):Math.abs(n[1]-i[1])<.01?Math.abs(n[1]-g[1])<.01&&(g[0]-n[0])*(i[0]-g[0])>=0&&(i=g,o=s):d.log("endpt to newendpt is not vert. or horz.",n,i,g)}if(n=i,o>=0)break;c+="L"+i}if(o===t.edgepaths.length){d.log("unclosed perimeter path");break}h=o,m=f.indexOf(h)===-1,m&&(h=f[0],c+="Z")}for(h=0;hD){r("x scale is not linear");break}}if(y.length&&"fast"===E){var z=(y[y.length-1]-y[0])/(y.length-1),I=Math.abs(z/100);for(w=0;wI){r("y scale is not linear");break}}}var P=c(_),O="scaled"===e.xtype?"":m,R=p(e,O,g,v,P,M),j="scaled"===e.ytype?"":y,F=p(e,j,b,x,_.length,A);S||(a.expand(M,R),a.expand(A,F));var N={x:R,y:F,z:_,text:e.text};if(s(e,_,"","z"),k&&e.contours&&"heatmap"===e.contours.coloring){var B={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};N.xfill=p(B,O,g,v,P,M),N.yfill=p(B,j,b,x,_.length,A)}return[N]}},{"../../components/colorscale/calc":581,"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793,"../histogram2d/calc":880,"./clean_2d_array":853,"./convert_column_xyz":855,"./find_empties":857,"./has_columns":858,"./interp2d":861,"./make_bound_array":862,"./max_row_length":863}],853:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){var r,i,a,o,s,l;if(e){for(r=0,s=0;s=0;o--)a=f[o],r=a[0],i=a[1],(s=((h[[r-1,i]]||m)[2]+(h[[r+1,i]]||m)[2]+(h[[r,i-1]]||m)[2]+(h[[r,i+1]]||m)[2])/20)&&(l[a]=[r,i,s],f.splice(o,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(a in l)h[a]=l[a],c.push(l[a])}return c.sort(function(t,e){return e[2]-t[2]})}},{"./max_row_length":863}],858:[function(t,e,r){"use strict";e.exports=function(t){return!Array.isArray(t.z[0])}},{}],859:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/graph_interact"),i=t("../../lib"),a=t("../../plots/cartesian/constants").MAXDIST;e.exports=function(t,e,r,o,s){if(!(t.distance=y[0].length||h<0||h>y.length)return}else{if(n.inbox(e-g[0],e-g[g.length-1])>a||n.inbox(r-v[0],r-v[v.length-1])>a)return;if(s){var w;for(x=[2*g[0]-g[1]],w=1;wm&&(v=Math.max(v,Math.abs(t[i][a]-p)/(g-m))))}return v}var a=t("../../lib"),o=[[-1,0],[1,0],[0,-1],[0,1]];e.exports=function(t,e,r){var o,s,l=1;if(Array.isArray(r))for(o=0;o.01;o++)l=i(t,e,n(l));return l>.01&&a.log("interp2d didn't converge quickly",l),t}},{"../../lib":680}],862:[function(t,e,r){"use strict";var n=t("../../registry");e.exports=function(t,e,r,i,a,o){var s,l,u,c=[],h=n.traceIs(t,"contour"),f=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(Array.isArray(e)&&e.length>1&&!f&&"category"!==o.type){var p=e.length;if(!(p<=a))return h?e.slice(0,a):e.slice(0,a+1);if(h||d)c=e.slice(0,a);else if(1===a)c=[e[0]-.5,e[0]+.5];else{for(c=[1.5*e[0]-.5*e[1]],u=1;u0;)b=p.c2p(k[M]),M--;for(b0;)w=m.c2p(T[M]),M--;if(w<_&&(x=_,_=w,w=x,z=!0),S&&(k=r[0].xfill,T=r[0].yfill),"fast"!==E){var I="best"===E?0:.5;y=Math.max(-I*p._length,y),b=Math.min((1+I)*p._length,b),_=Math.max(-I*m._length,_),w=Math.min((1+I)*m._length,w)}var P=Math.round(b-y),O=Math.round(w-_),R=P<=0||O<=0,j=e.plot.select(".imagelayer").selectAll("g.hm."+v).data(R?[]:[0]);if(j.enter().append("g").classed("hm",!0).classed(v,!0),j.exit().remove(),!R){var F,N;"fast"===E?(F=C,N=L):(F=P,N=O);var B=document.createElement("canvas");B.width=F,B.height=N;var U,V,H=B.getContext("2d"),q=s.makeColorScaleFunc(s.extractScale(f.colorscale,f.zmin,f.zmax),{noNumericCheck:!0,returnArray:!0});"fast"===E?(U=D?function(t){return C-1-t}:o.identity,V=z?function(t){return L-1-t}:o.identity):(U=function(t){return o.constrain(Math.round(p.c2p(k[t])-y),0,P)},V=function(t){return o.constrain(Math.round(m.c2p(T[t])-_),0,O)});var G,Y,W,X,Z,J,K,Q=V(0),$=[Q,Q],tt=D?0:1,et=z?0:1,rt=0,nt=0,it=0,at=0;if(E){var ot,st=0;try{ot=new Uint8Array(P*O*4)}catch(t){ot=new Array(P*O*4)}if("best"===E){var lt,ut,ct,ht=new Array(k.length),ft=new Array(T.length),dt=new Array(P);for(M=0;M0&&a0&&s0&&(n=!0);for(var s=0;sa){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]=0;a--)i(a);else if("increasing"===e){for(a=1;a=0;a--)t[a]+=t[a+1];"exclude"===r&&(t.push(0),t.shift())}}var i=t("fast-isnumeric"),a=t("../../lib"),o=t("../../plots/cartesian/axes"),s=t("../bar/arrays_to_calcdata"),l=t("./bin_functions"),u=t("./norm_functions"),c=t("./average"),h=t("./clean_bins");e.exports=function(t,e){if(e.visible===!0){var r,f=[],d=[],p=o.getFromId(t,"h"===e.orientation?e.yaxis||"y":e.xaxis||"x"),m="h"===e.orientation?"y":"x",g={x:"y",y:"x"}[m],v=e[m+"calendar"],y=e.cumulative;h(e,p,m);var b,x=p.makeCalcdata(e,m),_=m+"bins";e["autobin"+m]===!1&&_ in e?b=e[_]:(b=o.autoBin(x,p,e["nbins"+m],!1,v),y.enabled&&"include"!==y.currentbin&&("decreasing"===y.direction?b.start=p.c2r(p.r2c(b.start)-b.size):b.end=p.c2r(p.r2c(b.end)+b.size)),e._input[_]=e[_]=b);var w,M,A,k="string"==typeof b.size,T=k?[]:b,S=[],E=[],L=0,C=e.histnorm,D=e.histfunc,z=C.indexOf("density")!==-1;y.enabled&&z&&(C=C.replace(/ ?density$/,""),z=!1);var I,P="max"===D||"min"===D,O=P?null:0,R=l.count,j=u[C],F=!1,N=function(t){return p.r2c(t,0,v)};for(Array.isArray(e[g])&&"count"!==D&&(I=e[g],F="avg"===D,R=l[D]),r=N(b.start),M=N(b.end)+(r-o.tickIncrement(r,b.size,!1,v))/1e6;r=0&&AH;r--)if(d[r]){q=r;break}for(r=H;r<=q;r++)i(f[r])&&i(d[r])&&V.push({p:f[r],s:d[r],b:0});return s(V,e),V}}},{"../../lib":680,"../../plots/cartesian/axes":719,"../bar/arrays_to_calcdata":802,"./average":871,"./bin_functions":873,"./clean_bins":875,"./norm_functions":878,"fast-isnumeric":113}],875:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib").cleanDate,a=t("../../constants/numerical"),o=a.ONEDAY,s=a.BADNUM;e.exports=function(t,e,r){var a=e.type,l=r+"bins",u=t[l];u||(u=t[l]={});var c="date"===a?function(t){return t||0===t?i(t,s,u.calendar):null}:function(t){return n(t)?Number(t):null};u.start=c(u.start),u.end=c(u.end);var h="date"===a?o:1,f=u.size;if(n(f))u.size=f>0?Number(f):h;else if("string"!=typeof f)u.size=h;else{var d=f.charAt(0),p=f.substr(1);p=n(p)?Number(p):0,(p<=0||"date"!==a||"M"!==d||p!==Math.round(p))&&(u.size=h)}var m="autobin"+r;"boolean"!=typeof t[m]&&(t[m]=!((u.start||0===u.start)&&(u.end||0===u.end))),t[m]||delete t["nbins"+r]}},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],876:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../components/color"),o=t("./bin_defaults"),s=t("../bar/style_defaults"),l=t("../../components/errorbars/defaults"),u=t("./attributes");e.exports=function(t,e,r,c){function h(r,n){return i.coerce(t,e,u,r,n)}var f=h("x"),d=h("y");h("cumulative.enabled")&&(h("cumulative.direction"),h("cumulative.currentbin")),h("text");var p=h("orientation",d&&!f?"h":"v"),m=e["v"===p?"x":"y"];if(!m||!m.length)return void(e.visible=!1);n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],c),e["h"===p?"x":"y"]&&h("histfunc"),o(t,e,h,"h"===p?["y"]:["x"]),s(t,e,h,r,c),l(t,e,a.defaultLine,{axis:"y"}),l(t,e,a.defaultLine,{axis:"x",inherit:"y"})}},{"../../components/color":575,"../../components/errorbars/defaults":603,"../../lib":680,"../../registry":793,"../bar/style_defaults":814,"./attributes":870,"./bin_defaults":872}],877:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.layoutAttributes=t("../bar/layout_attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("../bar/layout_defaults"),n.calc=t("./calc"),n.setPositions=t("../bar/set_positions"),n.plot=t("../bar/plot"),n.style=t("../bar/style"),n.colorbar=t("../scatter/colorbar"),n.hoverPoints=t("../bar/hover"),n.moduleType="trace",n.name="histogram",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","bar","histogram","oriented","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":727,"../bar/hover":806,"../bar/layout_attributes":808,"../bar/layout_defaults":809,"../bar/plot":810,"../bar/set_positions":811,"../bar/style":813,"../scatter/colorbar":927,"./attributes":870,"./calc":874,"./defaults":876}],878:[function(t,e,r){"use strict";e.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;iA&&m.splice(A,m.length-A),v.length>A&&v.splice(A,v.length-A),!e.autobinx&&"xbins"in e||(e.xbins=i.autoBin(m,p,e.nbinsx,"2d",y),"histogram2dcontour"===e.type&&(e.xbins.start=w(i.tickIncrement(x(e.xbins.start),e.xbins.size,!0,y)),e.xbins.end=w(i.tickIncrement(x(e.xbins.end),e.xbins.size,!1,y))),e._input.xbins=e.xbins),!e.autobiny&&"ybins"in e||(e.ybins=i.autoBin(v,g,e.nbinsy,"2d",b),"histogram2dcontour"===e.type&&(e.ybins.start=M(i.tickIncrement(_(e.ybins.start),e.ybins.size,!0,b)),e.ybins.end=M(i.tickIncrement(_(e.ybins.end),e.ybins.size,!1,b))),e._input.ybins=e.ybins),f=[];var k,T,S=[],E=[],L="string"==typeof e.xbins.size,C="string"==typeof e.ybins.size,D=L?[]:e.xbins,z=C?[]:e.ybins,I=0,P=[],O=e.histnorm,R=e.histfunc,j=O.indexOf("density")!==-1,F="max"===R||"min"===R,N=F?null:0,B=a.count,U=o[O],V=!1,H=[],q=[],G="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";G&&"count"!==R&&(V="avg"===R,B=a[R]);var Y=e.xbins,W=x(Y.start),X=x(Y.end)+(W-i.tickIncrement(W,Y.size,!1,y))/1e6;for(d=W;d=0&&k=0&&T0)s=h(t.alphahull,l);else{var u=["x","y","z"].indexOf(t.delaunayaxis);s=c(l.map(function(t){return[t[(u+1)%3],t[(u+2)%3]]}))}var p={positions:l,cells:s,lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:d(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};t.intensity?(this.color="#fff",p.vertexIntensity=t.intensity,p.colormap=i(t.colorscale)):t.vertexcolor?(this.color=t.vertexcolors[0],p.vertexColors=a(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],p.cellColors=a(t.facecolor)):(this.color=t.color,p.meshColor=d(t.color)),this.mesh.update(p)},p.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=s},{"../../lib/str2rgbarray":698,"alpha-shape":35,"convex-hull":93,"delaunay-triangulate":105,"gl-mesh3d":186,tinycolor2:511}],889:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../components/colorbar/defaults"),o=t("./attributes");e.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function u(t){var e=t.map(function(t){var e=l(t);return e&&Array.isArray(e)?e:null});return e.every(function(t){return t&&t.length===e[0].length})&&e}var c=u(["x","y","z"]),h=u(["i","j","k"]);if(!c)return void(e.visible=!1);h&&h.forEach(function(t){for(var e=0;ee}}},r.addRangeSlider=function(t,e){for(var r=!1,n=0;n1)){var h=o.simpleMap(c.x,e.d2c,0,r.xcalendar),f=o.distinctVals(h).minDiff;a=Math.min(a,f)}}for(1/0===a&&(a=1),u=0;u");_.push(o,o,o,o,o,o,null)}(L,d[L],p[L],m[L],g[L]));e.x=b,e.y=x,e.text=_}},{"../../lib":680,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_ids":722,"./helpers":894}],898:[function(t,e,r){"use strict";var n=t("../../components/colorscale/color_attributes"),i=t("../../components/colorbar/attributes"),a=t("../../components/colorscale/scales"),o=t("../../plots/cartesian/layout_attributes"),s=t("../../lib/extend").extendDeep,l=t("../../lib/extend").extendFlat;e.exports={domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},dimensions:{_isLinkedToArray:"dimension",label:{valType:"string"},tickvals:o.tickvals,ticktext:o.ticktext,tickformat:{valType:"string",dflt:"3s"},visible:{valType:"boolean",dflt:!0},range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},constraintrange:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},values:{valType:"data_array",dflt:[]}},line:l({},s({},n("line"),{colorscale:s({},n("line").colorscale,{dflt:a.Viridis}),autocolorscale:s({},n("line").autocolorscale,{dflt:!1})}),{showscale:{valType:"boolean",dflt:!1},colorbar:i})}},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/colorscale/scales":593,"../../lib/extend":672,"../../plots/cartesian/layout_attributes":728}],899:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plots/plots"),a=t("./plot"),o=t("../../constants/xmlns_namespaces"),s=t("./constants");r.name="parcoords",r.attr="type",r.plot=function(t){var e=i.getSubplotCalcData(t.calcdata,"parcoords","parcoords");e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords-line-layers").remove(),n._paperdiv.selectAll(".parcoords-line-layers").remove(),n._paperdiv.selectAll(".parcoords").remove(),n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){function e(e){var n=this,i=n.toDataURL("image/png"),a=r.append("svg:image"),l=t._fullLayout._size,u=t._fullData[e.model.key].domain;a.attr({xmlns:o.svg,"xlink:href":i,x:l.l+l.w*u.x[0]-s.overdrag,y:l.t+l.h*(1-u.y[1]),width:(u.x[1]-u.x[0])*l.w+2*s.overdrag,height:(u.y[1]-u.y[0])*l.h,preserveAspectRatio:"none"})}var r=t._fullLayout._glimages,i=n.selectAll(".svg-container");i.filter(function(t,e){return e===i.size()-1}).selectAll(".parcoords-lines.context, .parcoords-lines.focus").each(e),window.setTimeout(function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":664,"../../plots/plots":778,"./constants":902,"./plot":907,d3:104}],900:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/calc"),a=t("../../lib");e.exports=function(t,e){var r=!!e.line.colorscale&&a.isArray(e.line.color),o=r?e.line.color:Array.apply(0,Array(e.dimensions.reduce(function(t,e){return Math.max(t,e.values.length)},0))).map(function(){return.5}),s=r?e.line.colorscale:[[0,e.line.color],[1,e.line.color]];return n(e,"line")&&i(e,e.line.color,"line","c"),[{lineColor:o,cscale:s}]}},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"../../lib":680}],901:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../components/colorscale"),s=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,l=r.line,u="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===l||!l.showscale)return void a.autoMargin(t,u);var c=l.color,h=l.cmin,f=l.cmax;n(h)||(h=i.aggNums(Math.min,null,c)),n(f)||(f=i.aggNums(Math.max,null,c));var d=e[0].t.cb=s(t,u),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,h,f),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:h,end:f,size:(f-h)/254}).options(l.colorbar)()}},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],902:[function(t,e,r){"use strict";e.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50, -canvasPixelRatio:1,blockLineCount:5e3,scatter:!1,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,capturewidth:10,fillcolor:"magenta",fillopacity:1,strokecolor:"white",strokeopacity:1,strokewidth:1,handleheight:16,handleopacity:1,handleoverlap:0}}},{}],903:[function(t,e,r){"use strict";function n(t,e,r,n,i){i("line.color",r),s(t,"line")&&a.isArray(t.line.color)?(i("line.colorscale"),l(t,e,n,i,{prefix:"line.",cLetter:"c"})):i("line.color",r)}function i(t,e){function r(t,e){return a.coerce(n,i,o.dimensions,t,e)}var n,i,s,l=t.dimensions||[],c=e.dimensions=[],h=1/0;for(l.length>u&&(a.log("parcoords traces support up to "+u+" dimensions at the moment"),l.splice(u)),s=0;s0);d&&(r("label"),r("tickvals"),r("ticktext"),r("tickformat"),r("range"),r("constraintrange"),h=Math.min(h,i.values.length)),i._index=s,c.push(i)}if(isFinite(h))for(s=0;sh&&(i.values=i.values.slice(0,h));return c}var a=t("../../lib"),o=t("./attributes"),s=t("../../components/colorscale/has_colorscale"),l=t("../../components/colorscale/defaults"),u=t("./constants").maxDimensionCount;e.exports=function(t,e,r,s){function l(r,n){return a.coerce(t,e,o,r,n)}var u=i(t,e);n(t,e,r,s,l),l("domain.x"),l("domain.y"),Array.isArray(u)&&u.length||(e.visible=!1)}},{"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588,"../../lib":680,"./attributes":898,"./constants":902}],904:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.calc=t("./calc"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.moduleType="trace",n.name="parcoords",n.basePlotModule=t("./base_plot"),n.categories=["gl","noOpacity"],n.meta={},e.exports=n},{"./attributes":898,"./base_plot":899,"./calc":900,"./colorbar":901,"./defaults":903,"./plot":907}],905:[function(t,e,r){"use strict";function n(t){t.read({x:0,y:0,width:1,height:1,data:x})}function i(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function a(t,e,r,a,o,s){function l(n){var c;c=Math.min(a,o-n*a),s.offset=v*n*a,s.count=v*c,0===n&&(window.cancelAnimationFrame(r.currentRafs[u]),delete r.currentRafs[u],i(t,s.scissorX,s.scissorY,s.scissorWidth,s.viewBoxSize[1])),r.clearOnly||(e(s),n*a+c>>8*e)%256/255}function u(t,e,r,n){for(var i=[],a=0;a=g-4?l(a,g-2-s):.5);return i}function c(t,e,r){var n,i,a,o=[];for(i=0;if&&(f=t[l].dim2.canvasX,c=l),t[l].dim1.canvasXi)return a;i=o,a=n[r]}return n[n.length-1]}function l(t,e,r){var n=o(r);return r.tickvals?_.scale.ordinal().domain(r.tickvals).range(r.tickvals.map(function(t){return(t-n[0])/(n[1]-n[0])}).map(function(r){return t-e+r*(e-(t-e))})):_.scale.linear().domain(n).range([t-e,e])}function u(t,e){return _.scale.linear().range([t-e,e])}function c(t){return _.scale.linear().domain(o(t))}function h(t){var e=o(t);return t.tickvals&&_.scale.ordinal().domain(t.tickvals).range(t.tickvals.map(function(t){return(t-e[0])/(e[1]-e[0])}))}function f(t){var e=t.map(function(t){return t[0]}),r=t.map(function(t){return t[1]}),n=r.map(function(t){return _.rgb(t)}),i=function(t){return function(e){return e[t]}},a="rgb".split("").map(function(t){return _.scale.linear().clamp(!0).domain(e).range(n.map(i(t)))});return function(t){return a.map(function(e){return e(t)})}}function d(t){return t[0]}function p(t,e,r){var n=d(e),i=n.trace,o=n.lineColor,s=n.cscale,l=i.line,u=i.domain,h=i.dimensions,p=t.width,m=x.extendDeep({},l,{color:o.map(c({values:o,range:[l.cmin,l.cmax]})),blockLineCount:b.blockLineCount,canvasOverdrag:b.overdrag*b.canvasPixelRatio}),g=Math.floor(p*(u.x[1]-u.x[0])),v=Math.floor(t.height*(u.y[1]-u.y[0])),y=t.margin||{l:80,r:80,t:100,b:80},_=g,w=v;return{key:r,colCount:h.filter(a).length,dimensions:h,tickDistance:b.tickDistance,unitToColor:f(s),lines:m,translateX:u.x[0]*p,translateY:t.height-u.y[1]*t.height,pad:y,canvasWidth:_*b.canvasPixelRatio+2*m.canvasOverdrag,canvasHeight:w*b.canvasPixelRatio,width:_,height:w,canvasPixelRatio:b.canvasPixelRatio}}function m(t){var e=t.width,r=t.height,n=t.dimensions,i=t.canvasPixelRatio,o=function(r){return e*r/Math.max(1,t.colCount-1)},s=b.verticalPadding/(r*i),f=1-2*s,d=function(t){return s+f*t},p={key:t.key,xScale:o,model:t},m={};return p.dimensions=n.filter(a).map(function(e,n){var a=c(e),s=m[e.label];return m[e.label]=(s||0)+1,{key:e.label+(s?"__"+s:""),label:e.label,tickFormat:e.tickformat,tickvals:e.tickvals,ticktext:e.ticktext,ordinal:!!e.tickvals,scatter:b.scatter||e.scatter,xIndex:n,crossfilterDimensionIndex:n,visibleIndex:e._index,height:r,values:e.values,paddedUnitValues:e.values.map(a).map(d),xScale:o,x:o(n),canvasX:o(n)*i,unitScale:u(r,b.verticalPadding),domainScale:l(r,b.verticalPadding,e),ordinalScale:h(e),domainToUnitScale:a,filter:e.constraintrange?e.constraintrange.map(a):[0,1],parent:p,model:t}}),p}function g(t){return b.layers.map(function(e){return{key:e,context:"contextLineLayer"===e,pick:"pickLineLayer"===e,viewModel:t,model:t.model}})}function v(t){t.classed("axisExtentText",!0).attr("text-anchor","middle").style("font-weight",100).style("font-size","10px").style("cursor","default").style("user-select","none")}var y=t("./lines"),b=t("./constants"),x=t("../../lib"),_=t("d3");e.exports=function(t,e,r,a,o){function l(t){var e=t.selectAll("defs").data(i,n);e.enter().append("defs");var r=e.selectAll("#filterBarPattern").data(i,n);r.enter().append("pattern").attr("id","filterBarPattern").attr("patternUnits","userSpaceOnUse"),r.attr("x",-b.bar.width).attr("width",b.bar.capturewidth).attr("height",function(t){return t.model.height});var a=r.selectAll("rect").data(i,n);a.enter().append("rect").attr("shape-rendering","crispEdges"),a.attr("height",function(t){return t.model.height}).attr("width",b.bar.width).attr("x",b.bar.width/2).attr("fill",b.bar.fillcolor).attr("fill-opacity",b.bar.fillopacity).attr("stroke",b.bar.strokecolor).attr("stroke-opacity",b.bar.strokeopacity).attr("stroke-width",b.bar.strokewidth)}function u(t){return t.dimensions.some(function(t){return 0!==t.filter[0]||1!==t.filter[1]})}function c(t,e){for(var r=e.panels||(e.panels=[]),n=t.each(function(t){return t})[e.key].map(function(t){return t.__data__}),i=n.length-1,a=0;a<1;a++)for(var o=0;o=r||s>=n)return;var l=t.lineLayer.readPixel(a,n-1-s),u=0!==l[3],c=u?l[2]+256*(l[1]+256*l[0]):null,h={x:a,y:s,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:c};c!==D&&(u?o.hover(h):o.unhover&&o.unhover(h),D=c)}}),L.style("margin",function(t){var e=t.model.pad;return e.t+"px "+e.r+"px "+e.b+"px "+e.l+"px"}).attr("width",function(t){return t.model.canvasWidth}).attr("height",function(t){return t.model.canvasHeight}).style("width",function(t){return t.model.width+2*b.overdrag+"px"}).style("height",function(t){return t.model.height+"px"}).style("opacity",function(t){return t.pick?.01:1}),e.style("background","rgba(255, 255, 255, 0)");var z=e.selectAll(".parcoords").data(S,n);z.exit().remove(),z.enter().append("g").classed("parcoords",!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","none").call(l),z.attr("width",function(t){return t.model.width+t.model.pad.l+t.model.pad.r}).attr("height",function(t){return t.model.height+t.model.pad.t+t.model.pad.b}).attr("transform",function(t){return"translate("+t.model.translateX+","+t.model.translateY+")"});var I=z.selectAll(".parcoordsControlView").data(i,n);I.enter().append("g").classed("parcoordsControlView",!0).style("box-sizing","content-box"),I.attr("transform",function(t){return"translate("+t.model.pad.l+","+t.model.pad.t+")"});var P=I.selectAll(".yAxis").data(function(t){return t.dimensions},n);P.enter().append("g").classed("yAxis",!0).each(function(t){C.dimensions.push(t)}),I.each(function(t){f(P,t)}),L.each(function(t){t.lineLayer=y(this,t.model.lines,t.model.canvasWidth,t.model.canvasHeight,t.viewModel.dimensions,t.viewModel.panels,t.model.unitToColor,t.context,t.pick,b.scatter),t.viewModel[t.key]=t.lineLayer,C.renderers.push(function(){t.lineLayer.render(t.viewModel.panels,!0)}),t.lineLayer.render(t.viewModel.panels,!t.context)}),P.attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),P.call(_.behavior.drag().origin(function(t){return t}).on("drag",function(t){var e=t.parent;T=!1,k||(t.x=Math.max(-b.overdrag,Math.min(t.model.width+b.overdrag,_.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,P.sort(function(t,e){return t.x-e.x}).each(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio}),f(P,e),P.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),_.select(this).attr("transform","translate("+t.x+", 0)"),P.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLineLayer&&e.contextLineLayer.render(e.panels,!1,!u(e)),e.focusLineLayer.render&&e.focusLineLayer.render(e.panels))}).on("dragend",function(t){var e=t.parent;if(k)return void("ending"===k&&(k=!1));t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,f(P,e),_.select(this).attr("transform",function(t){return"translate("+t.x+", 0)"}),e.contextLineLayer&&e.contextLineLayer.render(e.panels,!1,!u(e)),e.focusLineLayer&&e.focusLineLayer.render(e.panels),e.pickLineLayer&&e.pickLineLayer.render(e.panels,!0),T=!0,o&&o.axesMoved&&o.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),P.exit().remove();var O=P.selectAll(".axisOverlays").data(i,n);O.enter().append("g").classed("axisOverlays",!0),O.selectAll(".axis").remove();var R=O.selectAll(".axis").data(i,n);R.enter().append("g").classed("axis",!0),R.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,n=r.domain(),i=t.ticktext;_.select(this).call(_.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?n.map(function(t,e){return i&&i[e]||t}):null).tickFormat(t.ordinal?function(t){return t}:null).scale(r))}),R.selectAll(".domain, .tick").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),R.selectAll("text").style("font-weight",100).style("font-size","10px").style("fill","black").style("fill-opacity",1).style("stroke","none").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default").style("user-select","none");var j=O.selectAll(".axisHeading").data(i,n);j.enter().append("g").classed("axisHeading",!0);var F=j.selectAll(".axisTitle").data(i,n);F.enter().append("text").classed("axisTitle",!0).attr("text-anchor","middle").style("font-family","sans-serif").style("font-size","10px").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),F.attr("transform","translate(0,"+-b.axisTitleOffset+")").text(function(t){return t.label});var N=O.selectAll(".axisExtent").data(i,n);N.enter().append("g").classed("axisExtent",!0);var B=N.selectAll(".axisExtentTop").data(i,n);B.enter().append("g").classed("axisExtentTop",!0),B.attr("transform","translate(0,"+-b.axisExtentOffset+")");var U=B.selectAll(".axisExtentTopText").data(i,n);U.enter().append("text").classed("axisExtentTopText",!0).attr("alignment-baseline","after-edge").call(v),U.text(function(t){return x(t)(t.domainScale.domain().slice(-1)[0])});var V=N.selectAll(".axisExtentBottom").data(i,n);V.enter().append("g").classed("axisExtentBottom",!0),V.attr("transform",function(t){return"translate(0,"+(t.model.height+b.axisExtentOffset)+")"});var H=V.selectAll(".axisExtentBottomText").data(i,n);H.enter().append("text").classed("axisExtentBottomText",!0).attr("alignment-baseline","before-edge").call(v),H.text(function(t){return x(t)(t.domainScale.domain()[0])});var q=O.selectAll(".axisBrush").data(i,n),G=q.enter().append("g").classed("axisBrush",!0);q.each(function(t){t.brush||(t.brush=_.svg.brush().y(t.unitScale).on("brushstart",w).on("brush",M).on("brushend",A),0===t.filter[0]&&1===t.filter[1]||t.brush.extent(t.filter),_.select(this).call(t.brush))}),G.selectAll("rect").attr("x",-b.bar.capturewidth/2).attr("width",b.bar.capturewidth),G.selectAll("rect.extent").attr("fill","url(#filterBarPattern)").style("cursor","ns-resize").filter(function(t){return 0===t.filter[0]&&1===t.filter[1]}).attr("y",-100),G.selectAll(".resize rect").attr("height",b.bar.handleheight).attr("opacity",0).style("visibility","visible"),G.selectAll(".resize.n rect").style("cursor","n-resize").attr("y",b.bar.handleoverlap-b.bar.handleheight),G.selectAll(".resize.s rect").style("cursor","s-resize").attr("y",b.bar.handleoverlap);var Y=!1,W=!1;return C}},{"../../lib":680,"./constants":902,"./lines":905,d3:104}],907:[function(t,e,r){"use strict";var n=t("./parcoords");e.exports=function(t,e){var r=t._fullLayout,i=r._paper,a=r._paperdiv,o={},s={},l=r._size;e.forEach(function(e,r){o[r]=t.data[r].dimensions,s[r]=t.data[r].dimensions.slice()});var u=function(e,r,n){var i=s[e][r],a=i.constraintrange;a&&2===a.length||(a=i.constraintrange=[]),a[0]=n[0],a[1]=n[1],t.emit("plotly_restyle")},c=function(e){t.emit("plotly_hover",e)},h=function(e){t.emit("plotly_unhover",e)},f=function(e,r){function n(t){return!("visible"in t)||t.visible}function i(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return i===-1&&(i+=e.length),i}var a=function(t){return function(e,n){return i(r,t,e)-i(r,t,n)}}(s[e].filter(n));o[e].sort(a),s[e].filter(function(t){return!n(t)}).sort(function(t){return s[e].indexOf(t)}).forEach(function(t){o[e].splice(o[e].indexOf(t),1),o[e].splice(s[e].indexOf(t),0,t)}),t.emit("plotly_restyle")};n(a,i,e,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:h,axesMoved:f})}},{"./parcoords":906}],908:[function(t,e,r){"use strict";var n=t("../../components/color/attributes"),i=t("../../plots/font_attributes"),a=t("../../plots/attributes"),o=t("../../lib/extend").extendFlat;e.exports={labels:{valType:"data_array"},label0:{valType:"number",dflt:0},dlabel:{valType:"number",dflt:1},values:{valType:"data_array"},marker:{colors:{valType:"data_array"},line:{color:{valType:"color",dflt:n.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}}},text:{valType:"data_array"},scalegroup:{valType:"string",dflt:""},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"]},hoverinfo:o({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0},textfont:o({},i,{}),insidetextfont:o({},i,{}),outsidetextfont:o({},i,{}),domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},hole:{valType:"number",min:0,max:1,dflt:0},sort:{valType:"boolean",dflt:!0},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise"},rotation:{valType:"number",min:-360,max:360,dflt:0},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0}}},{"../../components/color/attributes":574,"../../lib/extend":672,"../../plots/attributes":717,"../../plots/font_attributes":739}],909:[function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n")}return m};var l},{"../../components/color":575,"./helpers":912,"fast-isnumeric":113,tinycolor2:511}],911:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r,a){function o(r,a){return n.coerce(t,e,i,r,a)}var s=n.coerceFont,l=o("values");if(!Array.isArray(l)||!l.length)return void(e.visible=!1);var u=o("labels");Array.isArray(u)||(o("label0"),o("dlabel")),o("marker.line.width")&&o("marker.line.color");var c=o("marker.colors");Array.isArray(c)||(e.marker.colors=[]),o("scalegroup");var h=o("text"),f=o("textinfo",Array.isArray(h)?"text+percent":"percent");if(o("hoverinfo",1===a._dataLength?"label+text+value+percent":void 0),f&&"none"!==f){var d=o("textposition"),p=Array.isArray(d)||"auto"===d,m=p||"inside"===d,g=p||"outside"===d;if(m||g){var v=s(o,"textfont",a.font);m&&s(o,"insidetextfont",v),g&&s(o,"outsidetextfont",v)}}o("domain.x"),o("domain.y"),o("hole"),o("sort"),o("direction"),o("rotation"),o("pull")}},{"../../lib":680,"./attributes":908}],912:[function(t,e,r){"use strict";var n=t("../../lib");r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return r.lastIndexOf(".")!==-1&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)+"%"},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return r.lastIndexOf(".")!==-1&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)}},{"../../lib":680}],913:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("./layout_defaults"),n.layoutAttributes=t("./layout_attributes"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.styleOne=t("./style_one"),n.moduleType="trace",n.name="pie",n.basePlotModule=t("./base_plot"),n.categories=["pie","showLegend"],n.meta={},e.exports=n},{"./attributes":908,"./base_plot":909,"./calc":910,"./defaults":911,"./layout_attributes":914,"./layout_defaults":915,"./plot":916,"./style":917,"./style_one":918}],914:[function(t,e,r){"use strict";e.exports={hiddenlabels:{valType:"data_array"}}},{}],915:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){!function(r,a){n.coerce(t,e,i,r,a)}("hiddenlabels")}},{"../../lib":680,"./layout_attributes":914}],916:[function(t,e,r){"use strict";function n(t,e,r){var n=Math.sqrt(t.width*t.width+t.height*t.height),a=t.width/t.height,o=Math.PI*Math.min(e.v/r.vTotal,.5),s=1-r.trace.hole,l=i(e,r),u={scale:l*r.r*2/n,rCenter:1-l,rotate:0};if(u.scale>=1)return u;var c=a+1/(2*Math.tan(o)),h=r.r*Math.min(1/(Math.sqrt(c*c+.5)+c),s/(Math.sqrt(a*a+s/2)+a)),f={scale:2*h/t.height,rCenter:Math.cos(h/r.r)-h*a/r.r,rotate:(180/Math.PI*e.midangle+720)%180-90},d=1/a,p=d+1/(2*Math.tan(o)),m=r.r*Math.min(1/(Math.sqrt(p*p+.5)+p),s/(Math.sqrt(d*d+s/2)+d)),g={scale:2*m/t.width,rCenter:Math.cos(m/r.r)-m/a/r.r, -rotate:(180/Math.PI*e.midangle+810)%180-90},v=g.scale>f.scale?g:f;return u.scale<1&&v.scale>u.scale?v:u}function i(t,e){if(t.v===e.vTotal&&!e.trace.hole)return 1;var r=Math.PI*Math.min(t.v/e.vTotal,.5);return Math.min(1/(1+1/Math.sin(r)),(1-e.trace.hole)/2)}function a(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function o(t,e){function r(t,e){return t.pxmid[1]-e.pxmid[1]}function n(t,e){return e.pxmid[1]-t.pxmid[1]}var i,a,o,s,l,u,c,h,f,d,p,m,g;for(a=0;a<2;a++)for(o=a?r:n,l=a?Math.max:Math.min,c=a?1:-1,i=0;i<2;i++){for(s=i?Math.max:Math.min,u=i?1:-1,h=t[a][i],h.sort(o),f=t[1-a][i],d=f.concat(h),m=[],p=0;p0&&(t.labelExtraY=b),Array.isArray(e.pull))for(i=0;i=e.pull[o.i]||((t.pxmid[1]-o.pxmid[1])*c>0?(h=o.cyFinal+l(o.px0[1],o.px1[1]),(b=h-g-t.labelExtraY)*c>0&&(t.labelExtraY+=b)):(v+t.labelExtraY-y)*c>0&&(n=3*u*Math.abs(i-d.indexOf(t)),f=o.cxFinal+s(o.px0[0],o.px1[0]),(p=f+n-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*u>0&&(t.labelExtraX+=p)))}(m[p],v)}}}function s(t,e){var r,n,i,a,o,s,l,c,h,f,d=[];for(i=0;ic&&(c=s.pull[a]);o.r=Math.min(r/u(s.tilt,Math.sin(l),s.depth),n/u(s.tilt,Math.cos(l),s.depth))/(2+2*c),o.cx=e.l+e.w*(s.domain.x[1]+s.domain.x[0])/2,o.cy=e.t+e.h*(2-s.domain.y[1]-s.domain.y[0])/2,s.scalegroup&&d.indexOf(s.scalegroup)===-1&&d.push(s.scalegroup)}for(a=0;ah.vTotal/2?1:0)}function u(t,e,r){if(!t)return 1;var n=Math.sin(t*Math.PI/180);return Math.max(.01,r*n*Math.abs(e)+2*Math.sqrt(1-n*n*e*e))}var c=t("d3"),h=t("../../plots/cartesian/graph_interact"),f=t("../../components/color"),d=t("../../components/drawing"),p=t("../../lib/svg_text_utils"),m=t("./helpers");e.exports=function(t,e){var r=t._fullLayout;s(e,r._size);var u=r._pielayer.selectAll("g.trace").data(e);u.enter().append("g").attr({"stroke-linejoin":"round",class:"trace"}),u.exit().remove(),u.order(),u.each(function(e){var s=c.select(this),u=e[0],g=u.trace,v=(g.depth||0)*u.r*Math.sin(0)/2,y=g.tiltaxis||0,b=y*Math.PI/180,x=[v*Math.sin(b),v*Math.cos(b)],_=u.r*Math.cos(0),w=s.selectAll("g.part").data(g.tilt?["top","sides"]:["top"]);w.enter().append("g").attr("class",function(t){return t+" part"}),w.exit().remove(),w.order(),l(e),s.selectAll(".top").each(function(){var s=c.select(this).selectAll("g.slice").data(e);s.enter().append("g").classed("slice",!0),s.exit().remove();var l=[[[],[]],[[],[]]],v=!1;s.each(function(o){function s(e){var n=t._fullLayout,a=t._fullData[g.index],s=a.hoverinfo;if("all"===s&&(s="label+text+value+percent+name"),!t._dragging&&n.hovermode!==!1&&"none"!==s&&"skip"!==s&&s){var l=i(o,u),c=M+o.pxmid[0]*(1-l),f=A+o.pxmid[1]*(1-l),d=r.separators,p=[];s.indexOf("label")!==-1&&p.push(o.label),a.text&&a.text[o.i]&&s.indexOf("text")!==-1&&p.push(a.text[o.i]),s.indexOf("value")!==-1&&p.push(m.formatPieValue(o.v,d)),s.indexOf("percent")!==-1&&p.push(m.formatPiePercent(o.v/u.vTotal,d)),h.loneHover({x0:c-l*u.r,x1:c+l*u.r,y:f,text:p.join("
"),name:s.indexOf("name")!==-1?a.name:void 0,color:o.color,idealAlign:o.pxmid[0]<0?"left":"right"},{container:n._hoverlayer.node(),outerContainer:n._paper.node()}),h.hover(t,e,"pie"),S=!0}}function f(e){t.emit("plotly_unhover",{points:[e]}),S&&(h.loneUnhover(r._hoverlayer.node()),S=!1)}function b(){t._hoverdata=[o],t._hoverdata.trace=e.trace,h.click(t,{target:!0})}function w(t,e,r,n){return"a"+n*u.r+","+n*_+" "+y+" "+o.largeArc+(r?" 1 ":" 0 ")+n*(e[0]-t[0])+","+n*(e[1]-t[1])}if(o.hidden)return void c.select(this).selectAll("path,g").remove();l[o.pxmid[1]<0?0:1][o.pxmid[0]<0?0:1].push(o);var M=u.cx+x[0],A=u.cy+x[1],k=c.select(this),T=k.selectAll("path.surface").data([o]),S=!1;if(T.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),k.select("path.textline").remove(),k.on("mouseover",s).on("mouseout",f).on("click",b),g.pull){var E=+(Array.isArray(g.pull)?g.pull[o.i]:g.pull)||0;E>0&&(M+=E*o.pxmid[0],A+=E*o.pxmid[1])}o.cxFinal=M,o.cyFinal=A;var L=g.hole;if(o.v===u.vTotal){var C="M"+(M+o.px0[0])+","+(A+o.px0[1])+w(o.px0,o.pxmid,!0,1)+w(o.pxmid,o.px0,!0,1)+"Z";L?T.attr("d","M"+(M+L*o.px0[0])+","+(A+L*o.px0[1])+w(o.px0,o.pxmid,!1,L)+w(o.pxmid,o.px0,!1,L)+"Z"+C):T.attr("d",C)}else{var D=w(o.px0,o.px1,!0,1);if(L){var z=1-L;T.attr("d","M"+(M+L*o.px1[0])+","+(A+L*o.px1[1])+w(o.px1,o.px0,!1,L)+"l"+z*o.px0[0]+","+z*o.px0[1]+D+"Z")}else T.attr("d","M"+M+","+A+"l"+o.px0[0]+","+o.px0[1]+D+"Z")}var I=Array.isArray(g.textposition)?g.textposition[o.i]:g.textposition,P=k.selectAll("g.slicetext").data(o.text&&"none"!==I?[0]:[]);P.enter().append("g").classed("slicetext",!0),P.exit().remove(),P.each(function(){var t=c.select(this).selectAll("text").data([0]);t.enter().append("text").attr("data-notex",1),t.exit().remove(),t.text(o.text).attr({class:"slicetext",transform:"","data-bb":"","text-anchor":"middle",x:0,y:0}).call(d.font,"outside"===I?g.outsidetextfont:g.insidetextfont).call(p.convertToTspans),t.selectAll("tspan.line").attr({x:0,y:0});var e,r=d.bBox(t.node());"outside"===I?e=a(r,o):(e=n(r,o,u),"auto"===I&&e.scale<1&&(t.call(d.font,g.outsidetextfont),g.outsidetextfont.family===g.insidetextfont.family&&g.outsidetextfont.size===g.insidetextfont.size||(t.attr({"data-bb":""}),r=d.bBox(t.node())),e=a(r,o)));var i=M+o.pxmid[0]*e.rCenter+(e.x||0),s=A+o.pxmid[1]*e.rCenter+(e.y||0);e.outside&&(o.yLabelMin=s-r.height/2,o.yLabelMid=s,o.yLabelMax=s+r.height/2,o.labelExtraX=0,o.labelExtraY=0,v=!0),t.attr("transform","translate("+i+","+s+")"+(e.scale<1?"scale("+e.scale+")":"")+(e.rotate?"rotate("+e.rotate+")":"")+"translate("+-(r.left+r.right)/2+","+-(r.top+r.bottom)/2+")")})}),v&&o(l,g),s.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=c.select(this),r=e.select("g.slicetext text");r.attr("transform","translate("+t.labelExtraX+","+t.labelExtraY+")"+r.attr("transform"));var n=t.cxFinal+t.pxmid[0],i=t.cyFinal+t.pxmid[1],a="M"+n+","+i,o=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var s=t.labelExtraX*t.pxmid[1]/t.pxmid[0],l=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(s)>Math.abs(l)?a+="l"+l*t.pxmid[0]/t.pxmid[1]+","+l+"H"+(n+t.labelExtraX+o):a+="l"+t.labelExtraX+","+s+"v"+(l-s)+"h"+o}else a+="V"+(t.yLabelMid+t.labelExtraY)+"h"+o;e.append("path").classed("textline",!0).call(f.stroke,g.outsidetextfont.color).attr({"stroke-width":Math.min(2,g.outsidetextfont.size/8),d:a,fill:"none"})}})})}),setTimeout(function(){u.selectAll("tspan").each(function(){var t=c.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)}},{"../../components/color":575,"../../components/drawing":598,"../../lib/svg_text_utils":699,"../../plots/cartesian/graph_interact":726,"./helpers":912,d3:104}],917:[function(t,e,r){"use strict";var n=t("d3"),i=t("./style_one");e.exports=function(t){t._fullLayout._pielayer.selectAll(".trace").each(function(t){var e=t[0],r=e.trace,a=n.select(this);a.style({opacity:r.opacity}),a.selectAll(".top path.surface").each(function(t){n.select(this).call(i,t,r)})})}},{"./style_one":918,d3:104}],918:[function(t,e,r){"use strict";var n=t("../../components/color");e.exports=function(t,e,r){var i=r.marker.line.color;Array.isArray(i)&&(i=i[e.i]||n.defaultLine);var a=r.marker.line.width||0;Array.isArray(a)&&(a=a[e.i]||0),t.style({"stroke-width":a,fill:e.color}).call(n.stroke,i)}},{"../../components/color":575}],919:[function(t,e,r){"use strict";var n=t("../scattergl/attributes");e.exports={x:n.x,y:n.y,xy:{valType:"data_array"},indices:{valType:"data_array"},xbounds:{valType:"data_array"},ybounds:{valType:"data_array"},text:n.text,marker:{color:{valType:"color",arrayOk:!1},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1},blend:{valType:"boolean",dflt:null},sizemin:{valType:"number",min:.1,max:2,dflt:.5},sizemax:{valType:"number",min:.1,dflt:20},border:{color:{valType:"color",arrayOk:!1},arearatio:{valType:"number",min:0,max:1,dflt:0}}}}},{"../scattergl/attributes":960}],920:[function(t,e,r){"use strict";function n(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=a(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}function i(t,e){var r=new n(t,e.uid);return r.update(e),r}var a=t("gl-pointcloud2d"),o=t("../../lib/str2rgbarray"),s=t("../scatter/get_trace_color"),l=["xaxis","yaxis"],u=n.prototype;u.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},u.update=function(t){this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=s(t,{})},u.updateFast=function(t){var e,r,n,i,a,s,l=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,c=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,f=t.indices,d=this.bounds;if(c){if(n=c,e=c.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(s=0;sd[2]&&(d[2]=i),ad[3]&&(d[3]=a);if(f)r=f;else for(r=new Int32Array(e),s=0;sd[2]&&(d[2]=i),ad[3]&&(d[3]=a);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var p=o(t.marker.color),m=o(t.marker.border.color),g=t.opacity*t.marker.opacity;p[3]*=g,this.pointcloudOptions.color=p;var v=t.marker.blend;if(null===v){v=l.length<100||u.length<100}this.pointcloudOptions.blend=v,m[3]*=g,this.pointcloudOptions.borderColor=m;var y=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=y,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions),this.expandAxesFast(d,b/2)},u.expandAxesFast=function(t,e){for(var r,n,i,a=e||.5,o=0;o<2;o++)r=this.scene[l[o]],n=r._min,n||(n=[]),n.push({val:t[o],pad:a}),i=r._max,i||(i=[]),i.push({val:t[o+2],pad:a})},u.dispose=function(){this.pointcloud.dispose()},e.exports=i},{"../../lib/str2rgbarray":698,"../scatter/get_trace_color":932,"gl-pointcloud2d":211}],921:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a("text"),a("marker.color",r),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",r),a("marker.border.arearatio")}},{"../../lib":680,"./attributes":919}],922:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.calc=t("../scatter3d/calc"),n.plot=t("./convert"),n.moduleType="trace",n.name="pointcloud",n.basePlotModule=t("../../plots/gl2d"),n.categories=["gl2d","showLegend"],n.meta={},e.exports=n},{"../../plots/gl2d":755,"../scatter3d/calc":948,"./attributes":919,"./convert":920,"./defaults":921}],923:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){n.mergeArray(e.text,t,"tx"),n.mergeArray(e.customdata,t,"data"),n.mergeArray(e.textposition,t,"tp"),e.textfont&&(n.mergeArray(e.textfont.size,t,"ts"),n.mergeArray(e.textfont.color,t,"tc"),n.mergeArray(e.textfont.family,t,"tf"));var r=e.marker;if(r){n.mergeArray(r.size,t,"ms"),n.mergeArray(r.opacity,t,"mo"),n.mergeArray(r.symbol,t,"mx"),n.mergeArray(r.color,t,"mc");var i=r.line;r.line&&(n.mergeArray(i.color,t,"mlc"),n.mergeArray(i.width,t,"mlw"))}}},{"../../lib":680}],924:[function(t,e,r){"use strict";var n=t("../../components/colorscale/color_attributes"),i=t("../../components/errorbars/attributes"),a=t("../../components/colorbar/attributes"),o=t("../../components/drawing"),s=(t("./constants"),t("../../lib/extend").extendFlat);e.exports={x:{valType:"data_array"},x0:{valType:"any",dflt:0},dx:{valType:"number",dflt:1},y:{valType:"data_array"},y0:{valType:"any",dflt:0},customdata:{valType:"data_array"},dy:{valType:"number",dflt:1},ids:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},hoveron:{valType:"flaglist",flags:["points","fills"]},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear"},smoothing:{valType:"number",min:0,max:1.3,dflt:1},dash:{valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid"},simplify:{valType:"boolean",dflt:!0}},connectgaps:{valType:"boolean",dflt:!1},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],dflt:"none"},fillcolor:{valType:"color"},marker:s({},{symbol:{valType:"enumerated",values:o.symbolList,dflt:"circle",arrayOk:!0},opacity:{valType:"number",min:0,max:1,arrayOk:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0},maxdisplayed:{valType:"number",min:0,dflt:0},sizeref:{valType:"number",dflt:1},sizemin:{valType:"number",min:0,dflt:0},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter"},showscale:{valType:"boolean",dflt:!1},colorbar:a,line:s({},{width:{valType:"number",min:0,arrayOk:!0}},n("marker.line"))},n("marker")),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0},textfont:{family:{valType:"string",noBlank:!0,strict:!0,arrayOk:!0},size:{valType:"number",min:1,arrayOk:!0},color:{valType:"color",arrayOk:!0}},r:{valType:"data_array"},t:{valType:"data_array"},error_y:i,error_x:i}},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/drawing":598,"../../components/errorbars/attributes":600,"../../lib/extend":672,"./constants":929}],925:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("./subtypes"),o=t("./colorscale_calc"),s=t("./arrays_to_calcdata");e.exports=function(t,e){var r,l,u,c=i.getFromId(t,e.xaxis||"x"),h=i.getFromId(t,e.yaxis||"y"),f=c.makeCalcdata(e,"x"),d=h.makeCalcdata(e,"y"),p=Math.min(f.length,d.length);c._minDtick=0,h._minDtick=0,f.length>p&&f.splice(p,f.length-p),d.length>p&&d.splice(p,d.length-p);var m={padded:!0},g={padded:!0};if(a.hasMarkers(e)){if(r=e.marker,l=r.size,Array.isArray(l)){var v={type:"linear"};i.setConvert(v),l=v.makeCalcdata(e.marker,"size"),l.length>p&&l.splice(p,l.length-p)}var y,b=1.6*(e.marker.sizeref||1);y="area"===e.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/b),3)}:function(t){return Math.max((t||0)/b,3)},m.ppad=g.ppad=Array.isArray(l)?l.map(y):y(l)}o(e),!("tozerox"===e.fill||"tonextx"===e.fill&&t.firstscatter)||f[0]===f[p-1]&&d[0]===d[p-1]?e.error_y.visible||["tonexty","tozeroy"].indexOf(e.fill)===-1&&(a.hasMarkers(e)||a.hasText(e))||(m.padded=!1,m.ppad=0):m.tozero=!0,!("tozeroy"===e.fill||"tonexty"===e.fill&&t.firstscatter)||f[0]===f[p-1]&&d[0]===d[p-1]?["tonextx","tozerox"].indexOf(e.fill)!==-1&&(g.padded=!1):g.tozero=!0,i.expand(c,f,m),i.expand(h,d,g);var x=new Array(p);for(u=0;u=0;i--){var a=t[i];if("scatter"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],927:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../components/colorscale"),s=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,l=r.marker,u="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===l||!l.showscale)return void a.autoMargin(t,u);var c=l.color,h=l.cmin,f=l.cmax;n(h)||(h=i.aggNums(Math.min,null,c)),n(f)||(f=i.aggNums(Math.max,null,c));var d=e[0].t.cb=s(t,u),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,h,f),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:h,end:f,size:(f-h)/254}).options(l.colorbar)()}},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],928:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/calc"),a=t("./subtypes");e.exports=function(t){a.hasLines(t)&&n(t,"line")&&i(t,t.line.color,"line","c"),a.hasMarkers(t)&&(n(t,"marker")&&i(t,t.marker.color,"marker","c"),n(t,"marker.line")&&i(t,t.marker.line.color,"marker.line","c"))}},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"./subtypes":944}],929:[function(t,e,r){"use strict";e.exports={PTS_LINESONLY:20}},{}],930:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("./constants"),o=t("./subtypes"),s=t("./xy_defaults"),l=t("./marker_defaults"),u=t("./line_defaults"),c=t("./line_shape_defaults"),h=t("./text_defaults"),f=t("./fillcolor_defaults"),d=t("../../components/errorbars/defaults");e.exports=function(t,e,r,p){function m(r,a){return n.coerce(t,e,i,r,a)}var g=s(t,e,p,m),v=gU!=I>=U&&(C=E[T-1][0],D=E[T][0],L=C+(D-C)*(U-z)/(I-z),j=Math.min(j,L),F=Math.max(F,L));j=Math.max(j,0),F=Math.min(F,f._length);var V=l.defaultLine;return l.opacity(h.fillcolor)?V=h.fillcolor:l.opacity((h.line||{}).color)&&(V=h.line.color),n.extendFlat(t,{distance:a.MAXDIST+10,x0:j,x1:F,y0:U,y1:U,color:V}),delete t.index,h.text&&!Array.isArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}}},{"../../components/color":575,"../../components/errorbars":604,"../../lib":680,"../../plots/cartesian/constants":724,"../../plots/cartesian/graph_interact":726,"./get_trace_color":932}],934:[function(t,e,r){"use strict";var n={},i=t("./subtypes");n.hasLines=i.hasLines,n.hasMarkers=i.hasMarkers,n.hasText=i.hasText,n.isBubble=i.isBubble,n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.cleanData=t("./clean_data"),n.calc=t("./calc"),n.arraysToCalcdata=t("./arrays_to_calcdata"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.animatable=!0,n.moduleType="trace",n.name="scatter",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","symbols","markerColorscale","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":727,"./arrays_to_calcdata":923,"./attributes":924,"./calc":925,"./clean_data":926,"./colorbar":927,"./defaults":930,"./hover":933,"./plot":941,"./select":942,"./style":943,"./subtypes":944}],935:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,a,o){var s=(t.marker||{}).color;if(o("line.color",r),n(t,"line"))i(t,e,a,o,{prefix:"line.",cLetter:"c"});else{o("line.color",!Array.isArray(s)&&s||r)}o("line.width"),o("line.dash")}},{"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588}],936:[function(t,e,r){"use strict";var n=t("../../constants/numerical").BADNUM;e.exports=function(t,e){function r(e){var r=_.c2p(t[e].x),i=w.c2p(t[e].y);return r!==n&&i!==n&&[r,i]}function i(t){var e=t[0]/_._length,r=t[1]/w._length;return(1+10*Math.max(0,-e,e-1,-r,r-1))*k}var a,o,s,l,u,c,h,f,d,p,m,g,v,y,b,x,_=e.xaxis,w=e.yaxis,M=e.simplify,A=e.connectGaps,k=e.baseTolerance,T=e.linear,S=[],E=.2,L=new Array(t.length),C=0;for(M||(k=E=-1),a=0;ai(c))break;s=c,v=p[0]*d[0]+p[1]*d[1],v>m?(m=v,l=c,f=!1):v=t.length||!c)break;L[C++]=c,o=c}}else L[C++]=l}S.push(L.slice(0,C))}return S}},{"../../constants/numerical":662}],937:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],938:[function(t,e,r){"use strict";e.exports=function(t,e,r){for(var n,i,a=null,o=0;o0?Math.max(e,i):0}}},{"fast-isnumeric":113}],940:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults"),o=t("./subtypes");e.exports=function(t,e,r,s,l){var u,c=o.isBubble(t),h=(t.line||{}).color;h&&(r=h),l("marker.symbol"),l("marker.opacity",c?.7:1),l("marker.size"),l("marker.color",r),i(t,"marker")&&a(t,e,s,l,{prefix:"marker.",cLetter:"c"}),u=h&&!Array.isArray(h)&&e.marker.color!==h?h:c?n.background:n.defaultLine,l("marker.line.color",u),i(t,"marker.line")&&a(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",c?1:0),c&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode"))}},{"../../components/color":575,"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588,"./subtypes":944}],941:[function(t,e,r){"use strict";function n(t,e){var r;e.selectAll("g.trace").each(function(t){var e=o.select(this);if(r=t[0].trace,r._nexttrace){if(r._nextFill=e.select(".js-fill.js-tonext"),!r._nextFill.size()){var n=":first-child";e.select(".js-fill.js-tozero").size()&&(n+=" + *"),r._nextFill=e.insert("path",n).attr("class","js-fill js-tonext")}}else e.selectAll(".js-fill.js-tonext").remove(),r._nextFill=null;r.fill&&("tozero"===r.fill.substr(0,6)||"toself"===r.fill||"to"===r.fill.substr(0,2)&&!r._prevtrace)?(r._ownFill=e.select(".js-fill.js-tozero"),r._ownFill.size()||(r._ownFill=e.insert("path",":first-child").attr("class","js-fill js-tozero"))):(e.selectAll(".js-fill.js-tozero").remove(),r._ownFill=null)})}function i(t,e,r,n,i,f,p){function m(t){return M?t.transition():t}function g(t){return t.filter(function(t){return t.vis})}function v(t){return t.id}function y(t){if(t.ids)return v}function b(){return!1}function x(t){var e,r,n=t[0].trace,i=o.select(this),a=c.hasMarkers(n),u=c.hasText(n),h=y(n),f=b,d=b;a&&(f=n.marker.maxdisplayed?g:s.identity),u&&(d=n.marker.maxdisplayed?g:s.identity),r=i.selectAll("path.point"),e=r.data(f,h);var p=e.enter().append("path").classed("point",!0);p.call(l.pointStyle,n).call(l.translatePoints,A,k,n),M&&p.style("opacity",0).transition().style("opacity",1),e.each(function(t){var e=o.select(this),r=m(e);l.translatePoint(t,r,A,k),l.singlePointStyle(t,r,n),n.customdata&&e.classed("plotly-customdata",null!==t.data&&void 0!==t.data)}),M?e.exit().transition().style("opacity",0).remove():e.exit().remove(),r=i.selectAll("g"),e=r.data(d,h),e.enter().append("g").append("text"),e.each(function(t){var e=m(o.select(this).select("text"));l.translatePoint(t,e,A,k)}),e.selectAll("text").call(l.textPointStyle,n).each(function(t){var e=t.xp||A.c2p(t.x),r=t.yp||k.c2p(t.y);o.select(this).selectAll("tspan").each(function(){m(o.select(this)).attr({x:e,y:r})})}),e.exit().remove()}var _,w;a(t,e,r,n,i);var M=!!p&&p.duration>0,A=r.xaxis,k=r.yaxis,T=n[0].trace,S=T.line,E=o.select(f);if(E.call(u.plot,r,p),T.visible===!0){m(E).style("opacity",T.opacity);var L,C,D=T.fill.charAt(T.fill.length-1);"x"!==D&&"y"!==D&&(D=""),n[0].node3=E;var z="",I=[],P=T._prevtrace;P&&(z=P._prevRevpath||"",C=P._nextFill,I=P._polygons);var O,R,j,F,N,B,U,V,H,q="",G="",Y=[],W=[],X=s.noop;if(L=T._ownFill,c.hasLines(T)||"none"!==T.fill){for(C&&C.datum(n),["hv","vh","hvh","vhv"].indexOf(S.shape)!==-1?(j=l.steps(S.shape),F=l.steps(S.shape.split("").reverse().join(""))):j=F="spline"===S.shape?function(t){var e=t[t.length-1];return t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),S.smoothing):l.smoothopen(t,S.smoothing)}:function(t){return"M"+t.join("L")},N=function(t){return F(t.reverse())},Y=h(n,{xaxis:A,yaxis:k,connectGaps:T.connectgaps,baseTolerance:Math.max(S.width||1,3)/4,linear:"linear"===S.shape,simplify:S.simplify}),H=T._polygons=new Array(Y.length),w=0;w1}),X=function(t){return function(e){if(O=j(e),R=N(e),q?D?(q+="L"+O.substr(1),G=R+"L"+G.substr(1)):(q+="Z"+O,G=R+"Z"+G):(q=O,G=R),c.hasLines(T)&&e.length>1){var r=o.select(this);if(r.datum(n),t)m(r.style("opacity",0).attr("d",O).call(l.lineGroupStyle)).style("opacity",1);else{var i=m(r);i.attr("d",O),l.singleLineStyle(n,i)}}}}}var Z=E.selectAll(".js-line").data(W);m(Z.exit()).style("opacity",0).remove(),Z.each(X(!1)),Z.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(X(!0)),Y.length&&(L?B&&V&&(D?("y"===D?B[1]=V[1]=k.c2p(0,!0):"x"===D&&(B[0]=V[0]=A.c2p(0,!0)),m(L).attr("d","M"+V+"L"+B+"L"+q.substr(1))):m(L).attr("d",q+"Z")):"tonext"===T.fill.substr(0,6)&&q&&z&&("tonext"===T.fill?m(C).attr("d",q+"Z"+z+"Z"):m(C).attr("d",q+"L"+z.substr(1)+"Z"),T._polygons=T._polygons.concat(I)),T._prevRevpath=G,T._prevPolygons=H);var J=E.selectAll(".points");_=J.data([n]),J.each(x),_.enter().append("g").classed("points",!0).each(x),_.exit().remove()}}function a(t,e,r,n,i){var a=r.xaxis,l=r.yaxis,u=o.extent(s.simpleMap(a.range,a.r2c)),h=o.extent(s.simpleMap(l.range,l.r2c)),f=n[0].trace;if(c.hasMarkers(f)){var d=f.marker.maxdisplayed;if(0!==d){var p=n.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=h[0]&&t.y<=h[1]}),m=Math.ceil(p.length/d),g=0;i.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;for(c=p.selectAll("g.trace"),h=c.data(r,function(t){return t[0].trace.uid}),h.enter().append("g").attr("class",function(t){ -return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),f(t,e,r),n(t,p),l=0,u=[];lu.indexOf(e[0].trace.uid)?1:-1}),g){s&&(d=s());o.transition().duration(a.duration).ease(a.easing).each("end",function(){d&&d()}).each("interrupt",function(){d&&d()}).each(function(){p.selectAll("g.trace").each(function(n,o){i(t,o,e,n,r,this,a)})})}else p.selectAll("g.trace").each(function(n,o){i(t,o,e,n,r,this,a)});m&&h.exit().remove(),p.selectAll("path:not([d])").remove()}},{"../../components/drawing":598,"../../components/errorbars":604,"../../lib":680,"../../lib/polygon":690,"./line_points":936,"./link_traces":938,"./subtypes":944,d3:104}],942:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[],h=s[0].trace,f=h.index,d=h.marker,p=!n.hasMarkers(h)&&!n.hasText(h);if(h.visible===!0&&!p){var m=Array.isArray(d.opacity)?1:d.opacity;if(e===!1)for(r=0;r=0&&(e[1]+=1),t.indexOf("top")>=0&&(e[1]-=1),t.indexOf("left")>=0&&(e[0]-=1),t.indexOf("right")>=0&&(e[0]+=1),e)}function s(t,e){return e(4*t)}function l(t){return M[t]}function u(t,e,r,n,i){var a=null;if(Array.isArray(t)){a=[];for(var o=0;o=0){var f=i(l.position,l.delaunayColor,l.delaunayAxis);f.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(f):(f.gl=o,this.delaunayMesh=g(f),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},k.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},e.exports=f},{"../../constants/gl3d_dashes":659,"../../constants/gl_markers":660,"../../lib":680,"../../lib/gl_format_color":677,"../../lib/str2rgbarray":698,"../scatter/make_bubble_size_func":939,"./calc_errors":949,"delaunay-triangulate":105,"gl-error3d":143,"gl-line3d":153,"gl-mesh3d":186,"gl-scatter3d":232}],951:[function(t,e,r){"use strict";function n(t,e,r,n){var a=0,o=r("x"),s=r("y"),l=r("z");return i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),o&&s&&l&&(a=Math.min(o.length,s.length,l.length),a=0&&f("surfacecolor",d||p);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];f(v+".show")&&(f(v+".opacity"),f(v+".scale"))}c(t,e,r,{axis:"z"}),c(t,e,r,{axis:"y",inherit:"z"}),c(t,e,r,{axis:"x",inherit:"z"})}},{"../../components/errorbars/defaults":603,"../../lib":680,"../../registry":793,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":947}],952:[function(t,e,r){"use strict";var n={};n.plot=t("./convert"),n.attributes=t("./attributes"),n.markerSymbols=t("../../constants/gl_markers"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.moduleType="trace",n.name="scatter3d",n.basePlotModule=t("../../plots/gl3d"),n.categories=["gl3d","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../constants/gl_markers":660,"../../plots/gl3d":758,"../scatter/colorbar":927,"./attributes":947,"./calc":948,"./convert":950,"./defaults":951}],953:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/colorscale/color_attributes"),o=t("../../lib/extend").extendFlat,s=n.marker,l=n.line,u=s.line;e.exports={lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names"],dflt:"ISO-3"},mode:o({},n.mode,{dflt:"markers"}),text:o({},n.text,{}),textfont:n.textfont,textposition:n.textposition,line:{color:l.color,width:l.width,dash:l.dash},connectgaps:n.connectgaps,marker:o({},{symbol:s.symbol,opacity:s.opacity,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,showscale:s.showscale,colorbar:s.colorbar,line:o({},{width:u.width},a("marker.line"))},a("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:n.fillcolor,hoverinfo:o({},i.hoverinfo,{flags:["lon","lat","location","text","name"]})}},{"../../components/colorscale/color_attributes":582,"../../lib/extend":672,"../../plots/attributes":717,"../scatter/attributes":924}],954:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../scatter/colorscale_calc");e.exports=function(t,e){for(var r=Array.isArray(e.locations),a=r?e.locations.length:e.lon.length,o=[],s=0,l=0;l0&&(o[s-1].gapAfter=!0):(s++,o.push(c))}return i(e),o}},{"../scatter/colorscale_calc":928,"fast-isnumeric":113}],955:[function(t,e,r){"use strict";function n(t,e,r){var n,i,a=0,o=r("locations");return o?(r("locationmode"),a=o.length):(n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length),a")}var i=t("../../plots/cartesian/graph_interact"),a=t("../../plots/cartesian/axes"),o=t("../scatter/get_trace_color"),s=t("./attributes");e.exports=function(t){function e(t){return c.projection(t)}function r(t){var r=t.lonlat;if(null===r[0]||null===r[1])return 1/0;if(c.isLonLatOverEdges(r))return 1/0;var n=e(r),i=l.c2p(),a=u.c2p(),o=Math.abs(i-n[0]),s=Math.abs(a-n[1]),h=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(o*o+s*s)-h,1-3/h)}var a=t.cd,s=a[0].trace,l=t.xa,u=t.ya,c=t.subplot;if(!a[0].placeholder&&(i.getClosest(a,r,t),t.index!==!1)){var h=a[t.index],f=h.lonlat,d=e(f),p=h.mrc||1;return t.x0=d[0]-p,t.x1=d[0]+p,t.y0=d[1]-p,t.y1=d[1]+p,t.loc=h.loc,t.lat=f[0],t.lon=f[1],t.color=o(s,h),t.extraText=n(s,h,c.mockAxis),[t]}}},{"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"../scatter/get_trace_color":932,"./attributes":953}],958:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="scattergeo",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/geo":743,"../scatter/colorbar":927,"./attributes":953,"./calc":954,"./defaults":955,"./event_data":956,"./hover":957,"./plot":959}],959:[function(t,e,r){"use strict";function n(t,e){if(!Array.isArray(t.locations))return u.identity;var r=c(t,e),n=t.locationmode;return function(t){var e=h(n,t.loc,r);return e?(t.lonlat=e.properties.ct,t):(t.lonlat=[null,null],!1)}}function i(t,e,r){function n(t,n){d(t,e,n,r)}var i=t.marker;if(n(t.text,"tx"),n(t.textposition,"tp"),t.textfont&&(n(t.textfont.size,"ts"),n(t.textfont.color,"tc"),n(t.textfont.family,"tf")),i&&i.line){var a=i.line;n(i.opacity,"mo"),n(i.symbol,"mx"),n(i.color,"mc"),n(i.size,"ms"),n(a.color,"mlc"),n(a.width,"mlw")}}function a(t){var e=t.framework.selectAll("g.trace.scattergeo");e.style("opacity",function(t){return t[0].trace.opacity}),e.each(function(t){var e=t[0].trace,r=o.select(this);r.selectAll("path.point").call(s.pointStyle,e),r.selectAll("text").call(s.textPointStyle,e)}),e.selectAll("path.js-line").style("fill","none").each(function(t){var e=o.select(this),r=t.trace,n=r.line||{};e.call(l.stroke,n.color).call(s.dashLine,n.dash||"",n.width||0),"none"!==r.fill&&e.call(l.fill,r.fillcolor)})}var o=t("d3"),s=t("../../components/drawing"),l=t("../../components/color"),u=t("../../lib"),c=t("../../lib/topojson_utils").getTopojsonFeatures,h=t("../../lib/geo_location_utils").locationToFeature,f=t("../../lib/geojson_utils"),d=t("../../lib/array_to_calc_item"),p=t("../scatter/subtypes");e.exports=function(t,e){function r(t){return t[0].trace.uid}var s=t.framework.select(".scattergeolayer").selectAll("g.trace.scattergeo").data(e,r);s.enter().append("g").attr("class","trace scattergeo"),s.exit().remove(),s.selectAll("*").remove(),s.each(function(e){var r=o.select(this),a=e[0].trace,s=n(a,t.topojson);e[0].placeholder&&r.remove();for(var l=[],u=0;u=e.length?i:e[a]);return n}function o(t,e,r){return l(D(t,r),C(e,r),r)}function s(t,e,r,n){var i=w(t,e,n);return i=Array.isArray(i[0])?i:a(g.identity,[i],n),l(i,C(r,n),n)}function l(t,e,r){for(var n=new Array(4*r),i=0;i0&&(v[y-1].gapAfter=!0)}return v}},{"../../components/colorscale":589,"../../lib":680,"../scatter/colorscale_calc":928,"../scatter/make_bubble_size_func":939,"../scatter/subtypes":944,"fast-isnumeric":113}],966:[function(t,e,r){"use strict";function n(){return{geojson:h.makeBlank(),layout:{visibility:"none"},paint:{}}}function i(t,e){function r(t,r,n,i){void 0===e[r][n]&&(e[r][n]=i),t[r]=e[r][n]}for(var n=t[0].trace,i=n.marker,a=Array.isArray(i.color),o=Array.isArray(i.size),s=[],l=0;l")}var i=t("../../plots/cartesian/graph_interact"),a=t("../scatter/get_trace_color");e.exports=function(t,e,r){function o(t){var e=t.lonlat,n=Math.abs(u.c2p(e)-u.c2p([d,e[1]])),i=Math.abs(c.c2p(e)-c.c2p([e[0],r])),a=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(n*n+i*i)-a,1-3/a)}var s=t.cd,l=s[0].trace,u=t.xa,c=t.ya;if(!s[0].placeholder){var h=e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360),f=360*h,d=e-f;if(i.getClosest(s,o,t),t.index!==!1){var p=s[t.index],m=p.lonlat,g=[m[0]+f,m[1]],v=u.c2p(g),y=c.c2p(g),b=p.mrc||1;return t.x0=v-b,t.x1=v+b,t.y0=y-b,t.y1=y+b,t.color=a(l,p),t.extraText=n(l,p),[t]}}}},{"../../plots/cartesian/graph_interact":726,"../scatter/get_trace_color":932}],970:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.plot=t("./plot"),n.moduleType="trace",n.name="scattermapbox",n.basePlotModule=t("../../plots/mapbox"),n.categories=["mapbox","gl","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/mapbox":772,"../scatter/colorbar":927,"./attributes":964,"./calc":965,"./defaults":967,"./event_data":968,"./hover":969,"./plot":971}],971:[function(t,e,r){"use strict";function n(t,e){this.mapbox=t,this.map=t.map,this.uid=e,this.idSourceFill=e+"-source-fill",this.idSourceLine=e+"-source-line",this.idSourceCircle=e+"-source-circle",this.idSourceSymbol=e+"-source-symbol",this.idLayerFill=e+"-layer-fill",this.idLayerLine=e+"-layer-line",this.idLayerCircle=e+"-layer-circle",this.idLayerSymbol=e+"-layer-symbol",this.mapbox.initSource(this.idSourceFill),this.mapbox.initSource(this.idSourceLine),this.mapbox.initSource(this.idSourceCircle),this.mapbox.initSource(this.idSourceSymbol),this.map.addLayer({id:this.idLayerFill,source:this.idSourceFill,type:"fill"}),this.map.addLayer({id:this.idLayerLine,source:this.idSourceLine,type:"line"}),this.map.addLayer({id:this.idLayerCircle,source:this.idSourceCircle,type:"circle"}),this.map.addLayer({id:this.idLayerSymbol,source:this.idSourceSymbol,type:"symbol"})}function i(t){return"visible"===t.layout.visibility}var a=t("./convert"),o=n.prototype;o.update=function(t){var e=this.mapbox,r=a(t);e.setOptions(this.idLayerFill,"setLayoutProperty",r.fill.layout),e.setOptions(this.idLayerLine,"setLayoutProperty",r.line.layout),e.setOptions(this.idLayerCircle,"setLayoutProperty",r.circle.layout),e.setOptions(this.idLayerSymbol,"setLayoutProperty",r.symbol.layout),i(r.fill)&&(e.setSourceData(this.idSourceFill,r.fill.geojson),e.setOptions(this.idLayerFill,"setPaintProperty",r.fill.paint)),i(r.line)&&(e.setSourceData(this.idSourceLine,r.line.geojson),e.setOptions(this.idLayerLine,"setPaintProperty",r.line.paint)),i(r.circle)&&(e.setSourceData(this.idSourceCircle,r.circle.geojson),e.setOptions(this.idLayerCircle,"setPaintProperty",r.circle.paint)),i(r.symbol)&&(e.setSourceData(this.idSourceSymbol,r.symbol.geojson),e.setOptions(this.idLayerSymbol,"setPaintProperty",r.symbol.paint))},o.dispose=function(){var t=this.map;t.removeLayer(this.idLayerFill),t.removeLayer(this.idLayerLine),t.removeLayer(this.idLayerCircle),t.removeLayer(this.idLayerSymbol),t.removeSource(this.idSourceFill),t.removeSource(this.idSourceLine),t.removeSource(this.idSourceCircle),t.removeSource(this.idSourceSymbol)},e.exports=function(t,e){var r=e[0].trace,i=new n(t,r.uid);return i.update(e),i}},{"./convert":966}],972:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/colorscale/color_attributes"),o=t("../../components/colorbar/attributes"),s=t("../../lib/extend").extendFlat,l=n.marker,u=n.line,c=l.line;e.exports={a:{valType:"data_array"},b:{valType:"data_array"},c:{valType:"data_array"},sum:{valType:"number",dflt:0,min:0},mode:s({},n.mode,{dflt:"markers"}),text:s({},n.text,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:s({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing},connectgaps:n.connectgaps,fill:s({},n.fill,{values:["none","toself","tonext"]}),fillcolor:n.fillcolor,marker:s({},{symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:s({},{width:c.width},a("marker".line))},a("marker"),{showscale:l.showscale,colorbar:o}),textfont:n.textfont,textposition:n.textposition,hoverinfo:s({},i.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:n.hoveron}},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../lib/extend":672,"../../plots/attributes":717,"../scatter/attributes":924}],973:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("../scatter/subtypes"),o=t("../scatter/colorscale_calc"),s=t("../scatter/arrays_to_calcdata"),l=["a","b","c"],u={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,c,h,f,d,p,m=t._fullLayout[e.subplot],g=m.sum,v=e.sum||g;for(r=0;rA&&S.splice(A,S.length-A)}return o(e),s(k,e),k}},{"../../plots/cartesian/axes":719,"../scatter/arrays_to_calcdata":923,"../scatter/colorscale_calc":928,"../scatter/subtypes":944,"fast-isnumeric":113}],974:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../scatter/constants"),a=t("../scatter/subtypes"),o=t("../scatter/marker_defaults"),s=t("../scatter/line_defaults"),l=t("../scatter/line_shape_defaults"),u=t("../scatter/text_defaults"),c=t("../scatter/fillcolor_defaults"),h=t("./attributes");e.exports=function(t,e,r,f){function d(r,i){return n.coerce(t,e,h,r,i)}var p,m=d("a"),g=d("b"),v=d("c");if(m?(p=m.length,g?(p=Math.min(p,g.length),v&&(p=Math.min(p,v.length))):p=v?Math.min(p,v.length):0):g&&v&&(p=Math.min(g.length,v.length)),!p)return void(e.visible=!1);m&&p"),s}}},{"../../plots/cartesian/axes":719,"../scatter/hover":933}],976:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.moduleType="trace",n.name="scatterternary",n.basePlotModule=t("../../plots/ternary"),n.categories=["ternary","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/ternary":786,"../scatter/colorbar":927,"./attributes":972,"./calc":973,"./defaults":974,"./hover":975,"./plot":977,"./select":978,"./style":979}],977:[function(t,e,r){"use strict";var n=t("../scatter/plot");e.exports=function(t,e){var r=t.plotContainer;r.select(".scatterlayer").selectAll("*").remove();for(var i={xaxis:t.xaxis,yaxis:t.yaxis,plot:r},a=0;a":return function(t){return u(t)>i};case">=":return function(t){return u(t)>=i};case"[]":return function(t){var e=u(t);return e>=i[0]&&e<=i[1]};case"()":return function(t){var e=u(t);return e>i[0]&&e=i[0]&&ei[0]&&e<=i[1]};case"][":return function(t){var e=u(t);return e<=i[0]||e>=i[1]};case")(":return function(t){var e=u(t);return ei[1]};case"](":return function(t){var e=u(t);return e<=i[0]||e>i[1]};case")[":return function(t){var e=u(t);return e=i[1]};case"{}":return function(t){return i.indexOf(u(t))!==-1};case"}{":return function(t){return i.indexOf(u(t))===-1}}}var o=t("../lib"),s=t("../registry"),l=t("../plot_api/plot_schema"),u=t("../plots/cartesian/axis_ids"),c=t("../plots/cartesian/axis_autotype"),h=t("../plots/cartesian/set_convert"),f=["=","<",">=",">","<="],d=["[]","()","[)","(]","][",")(","](",")["],p=["{}","}{"];r.moduleType="transform",r.name="filter",r.attributes={enabled:{valType:"boolean",dflt:!0},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x"},operation:{valType:"enumerated",values:[].concat(f).concat(d).concat(p),dflt:"="},value:{valType:"any",dflt:0}},r.supplyDefaults=function(t){function e(e,i){return o.coerce(t,n,r.attributes,e,i)}var n={};if(e("enabled")){e("operation"),e("value"),e("target");var i=s.getComponentMethod("calendars","handleDefaults");i(t,n,"valuecalendar",null),i(t,n,"targetcalendar",null)}return n},r.calcTransform=function(t,e,r){if(r.enabled){var s=r.target,u=n(e,s),c=u.length;if(c){var h=r.targetcalendar;if("string"==typeof s){var f=o.nestedProperty(e,s+"calendar").get();f&&(h=f)}for(var d="x"===s||"y"===s||"z"===s?s:u,p=i(t,e,d),m=a(r,p,h),g=l.findArrayAttributes(e),v={},y=0;yMath.abs(e))u.rotate(o,0,0,-t*n*Math.PI*p.rotateSpeed/window.innerWidth);else{var s=p.zoomSpeed*a*e/window.innerHeight*(o-u.lastT())/100;u.pan(o,0,0,h*(Math.exp(s)-1))}},!0),p}e.exports=n;var i=t("right-now"),a=t("3d-view"),o=t("mouse-change"),s=t("mouse-wheel"),l=t("mouse-event-offset")},{"3d-view":31,"mouse-change":441,"mouse-event-offset":442,"mouse-wheel":444,"right-now":490}],31:[function(t,e,r){"use strict";function n(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}function i(t){t=t||{};var e=t.eye||[0,0,1],r=t.center||[0,0,0],i=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],u=t.mode||"turntable",c=a(),h=o(),f=s();return c.setDistanceLimits(l[0],l[1]),c.lookAt(0,e,r,i),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,i),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,i),new n({turntable:c,orbit:h,matrix:f},u)}e.exports=i;var a=t("turntable-camera-controller"),o=t("orbit-camera-controller"),s=t("matrix-camera-controller"),l=n.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n0&&(e.y+=r),a=e.y+e.dy+p;if((r=a-p-m[1])>0)for(a=e.y-=r,n=o-2;n>=0;--n)e=t[n],r=e.y+e.dy+p-a,r>0&&(e.y-=r),a=e.y})}function i(t,e){return t.y-e.y}var a=r.nest().key(function(t){return t.x}).sortKeys(e.ascending).entries(g).map(function(t){return t.values});!function(){var t=e.min(a,function(t){return(m[1]-(t.length-1)*p)/e.sum(t,h)});a.forEach(function(e){e.forEach(function(e,r){e.y=r,e.dy=e.value*t})}),v.forEach(function(e){e.dy=e.value*t})}(),n();for(var o=1;t>0;--t)!function(t){function r(t){return c(t.target)*t.value}a.slice().reverse().forEach(function(n){n.forEach(function(n){if(n.sourceLinks.length){var i=e.sum(n.sourceLinks,r)/e.sum(n.sourceLinks,h);n.y+=(i-c(n))*t}})})}(o*=.99),n(),function(t){function r(t){return c(t.source)*t.value}a.forEach(function(n){n.forEach(function(n){if(n.targetLinks.length){var i=e.sum(n.targetLinks,r)/e.sum(n.targetLinks,h);n.y+=(i-c(n))*t}})})}(o),n()}function u(){function t(t,e){return t.source.y-e.source.y||t.originalIndex-e.originalIndex}function e(t,e){return t.target.y-e.target.y||t.originalIndex-e.originalIndex}g.forEach(function(r){r.sourceLinks.sort(e),r.targetLinks.sort(t)}),g.forEach(function(t){var e=0,r=0;t.sourceLinks.forEach(function(t){t.sy=e,e+=t.dy}),t.targetLinks.forEach(function(t){t.ty=r,r+=t.dy})})}function c(t){return t.y+t.dy/2}function h(t){return t.value}var f={},d=24,p=8,m=[1,1],g=[],v=[];return f.nodeWidth=function(t){return arguments.length?(d=+t,f):d},f.nodePadding=function(t){return arguments.length?(p=+t,f):p},f.nodes=function(t){return arguments.length?(g=t,f):g},f.links=function(t){return arguments.length?(v=t,f):v},f.size=function(t){return arguments.length?(m=t,f):m},f.layout=function(e){return t(),i(),a(),l(e),u(),f},f.relayout=function(){return u(),f},f.link=function(){function t(t){var r=t.source.x+t.source.dx,i=t.target.x,a=n.interpolateNumber(r,i),o=a(e),s=a(1-e),l=t.source.y+t.sy+t.dy/2,u=t.target.y+t.ty+t.dy/2;return"M"+r+","+l+"C"+o+","+l+" "+s+","+u+" "+i+","+u}var e=.5;return t.curvature=function(r){return arguments.length?(e=+r,t):e},t},f};t.sankey=i,Object.defineProperty(t,"__esModule",{value:!0})})},{"d3-array":106,"d3-collection":107,"d3-interpolate":111}],33:[function(t,e,r){"use strict";function n(t){var e=s.get(t),r=e&&(e._triangleBuffer.handle||e._triangleBuffer.buffer);if(!r||!t.isBuffer(r)){var n=a(t,new Float32Array([-1,-1,-1,4,4,-1]));e=o(t,[{buffer:n,type:t.FLOAT,size:2}]),e._triangleBuffer=n,s.set(t,e)}e.bind(),t.drawArrays(t.TRIANGLES,0,3),e.unbind()}var i="undefined"==typeof WeakMap?t("weak-map"):WeakMap,a=t("gl-buffer"),o=t("gl-vao"),s=new i;e.exports=n},{"gl-buffer":148,"gl-vao":262,"weak-map":546}],34:[function(t,e,r){function n(t,e,r){e="number"==typeof e?e:1,r=r||": ";var n=t.split(/\r?\n/),a=String(n.length+e-1).length;return n.map(function(t,n){var o=n+e,s=String(o).length;return i(o,a-s)+r+t}).join("\n")}var i=t("pad-left");e.exports=n},{"pad-left":462}],35:[function(t,e,r){"use strict";function n(t,e){for(var r=new Array(e+1),n=0;n>16&255,r[1]=n>>8&255,r[2]=255&n):h.test(t)&&(n=t.match(f),r[0]=parseInt(n[1]),r[1]=parseInt(n[2]),r[2]=parseInt(n[3])),!e)for(var i=0;i<3;++i)r[i]=r[i]/255;return r}function u(t,e){var r,n;if("string"!=typeof t)return t;if(r=[],"#"===t[0]?(t=t.substr(1),3===t.length&&(t+=t),n=parseInt(t,16),r[0]=n>>16&255,r[1]=n>>8&255,r[2]=255&n):h.test(t)&&(n=t.match(f),r[0]=parseInt(n[1]),r[1]=parseInt(n[2]),r[2]=parseInt(n[3]),n[4]?r[3]=parseFloat(n[4]):r[3]=1),!e)for(var i=0;i<3;++i)r[i]=r[i]/255;return r}var c={},h=/^rgba?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*(,.*)?\)$/,f=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(.*)?\)$/;return c.isPlainObject=t,c.linspace=e,c.zip3=n,c.sum=i,c.zip=r,c.isEqual=s,c.copy2D=a,c.copy1D=o,c.str2RgbArray=l,c.str2RgbaArray=u,c}()},{}],39:[function(t,e,r){(function(r){"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i=0;s--)if(l[s]!==u[s])return!1;for(s=l.length-1;s>=0;s--)if(o=l[s],!d(t[o],e[o],r,n))return!1;return!0}function g(t,e,r){d(t,e,!0)&&h(t,e,r,"notDeepStrictEqual",g)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function y(t){var e;try{t()}catch(t){e=t}return e}function b(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=y(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&h(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!t&&x.isError(i),s=!t&&i&&!r;if((o&&a&&v(i,r)||s)&&h(i,r,"Got unwanted exception"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}var x=t("util/"),_=Object.prototype.hasOwnProperty,w=Array.prototype.slice,M=function(){return"foo"===function(){}.name}(),k=e.exports=f,A=/\s*function\s+([^\(\s]*)\s*/;k.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var e=t.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=s(e),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},x.inherits(k.AssertionError,Error),k.fail=h,k.ok=f,k.equal=function(t,e,r){t!=e&&h(t,e,r,"==",k.equal)},k.notEqual=function(t,e,r){t==e&&h(t,e,r,"!=",k.notEqual)},k.deepEqual=function(t,e,r){d(t,e,!1)||h(t,e,r,"deepEqual",k.deepEqual)},k.deepStrictEqual=function(t,e,r){d(t,e,!0)||h(t,e,r,"deepStrictEqual",k.deepStrictEqual)},k.notDeepEqual=function(t,e,r){d(t,e,!1)&&h(t,e,r,"notDeepEqual",k.notDeepEqual)},k.notDeepStrictEqual=g,k.strictEqual=function(t,e,r){t!==e&&h(t,e,r,"===",k.strictEqual)},k.notStrictEqual=function(t,e,r){t===e&&h(t,e,r,"!==",k.notStrictEqual)},k.throws=function(t,e,r){ +b(!0,t,e,r)},k.doesNotThrow=function(t,e,r){b(!1,t,e,r)},k.ifError=function(t){if(t)throw t};var T=Object.keys||function(t){var e=[];for(var r in t)_.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":536}],40:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],41:[function(t,e,r){"use strict";function n(t){for(var e=0,r=0;r0?r=r.ushln(h):h<0&&(c=c.ushln(-h)),l(r,c)}var i=t("./is-rat"),a=t("./lib/is-bn"),o=t("./lib/num-to-bn"),s=t("./lib/str-to-bn"),l=t("./lib/rationalize"),u=t("./div");e.exports=n},{"./div":44,"./is-rat":46,"./lib/is-bn":50,"./lib/num-to-bn":51,"./lib/rationalize":52,"./lib/str-to-bn":53}],46:[function(t,e,r){"use strict";function n(t){return Array.isArray(t)&&2===t.length&&i(t[0])&&i(t[1])}var i=t("./lib/is-bn");e.exports=n},{"./lib/is-bn":50}],47:[function(t,e,r){"use strict";function n(t){return t.cmp(new i(0))}var i=t("bn.js");e.exports=n},{"bn.js":60}],48:[function(t,e,r){"use strict";function n(t){var e=t.length,r=t.words,n=0;if(1===e)n=r[0];else if(2===e)n=r[0]+67108864*r[1];else for(var a=0;a20?52:r+32}var i=t("double-bits"),a=t("bit-twiddle").countTrailingZeros;e.exports=n},{"bit-twiddle":59,"double-bits":116}],50:[function(t,e,r){"use strict";function n(t){return t&&"object"==typeof t&&Boolean(t.words)}t("bn.js");e.exports=n},{"bn.js":60}],51:[function(t,e,r){"use strict";function n(t){var e=a.exponent(t);return e<52?new i(t):new i(t*Math.pow(2,52-e)).ushln(e-52)}var i=t("bn.js"),a=t("double-bits");e.exports=n},{"bn.js":60,"double-bits":116}],52:[function(t,e,r){"use strict";function n(t,e){var r=a(t),n=a(e);if(0===r)return[i(0),i(1)];if(0===n)return[i(0),i(0)];n<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]}var i=t("./num-to-bn"),a=t("./bn-sign");e.exports=n},{"./bn-sign":47,"./num-to-bn":51}],53:[function(t,e,r){"use strict";function n(t){return new i(t)}var i=t("bn.js");e.exports=n},{"bn.js":60}],54:[function(t,e,r){"use strict";function n(t,e){return i(t[0].mul(e[0]),t[1].mul(e[1]))}var i=t("./lib/rationalize");e.exports=n},{"./lib/rationalize":52}],55:[function(t,e,r){"use strict";function n(t){return i(t[0])*i(t[1])}var i=t("./lib/bn-sign");e.exports=n},{"./lib/bn-sign":47}],56:[function(t,e,r){"use strict";function n(t,e){return i(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}var i=t("./lib/rationalize");e.exports=n},{"./lib/rationalize":52}],57:[function(t,e,r){"use strict";function n(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var n=e.abs().divmod(r.abs()),o=n.div,s=i(o),l=n.mod,u=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return u*s;if(s){var c=a(s)+4,h=i(l.ushln(c).divRound(r));return u*(s+h*Math.pow(2,-c))}var f=r.bitLength()-l.bitLength()+53,h=i(l.ushln(f).divRound(r));return f<1023?u*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),u*h*Math.pow(2,1023-f))}var i=t("./lib/bn-to-num"),a=t("./lib/ctz");e.exports=n},{"./lib/bn-to-num":48,"./lib/ctz":49}],58:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=["function ",t,"(a,l,h,",n.join(","),"){",a?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return a?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),a?o.push("return -1};"):o.push("return i};"),o.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],!1,i),n("B","x"+t+"y",e,["y"],!0,i),n("P","c(x,y)"+t+"0",e,["y","c"],!1,i),n("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],59:[function(t,e,r){"use strict";"use restrict";function n(t){var e=32;return t&=-t,t&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return t-=t>>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},r.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),(t=65535&(t|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),t|r<<2},r.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),(t=1023&(t|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],60:[function(t,e,r){!function(e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}function o(t,e,r){for(var n=0,i=Math.min(t.length,r),a=e;a=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function s(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}function l(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}function u(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,h=67108863&l,f=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=f;d++){var p=u-d|0;i=0|t.words[p],a=0|e.words[d],o=i*a+h,c+=o/67108864|0,h=67108863&o}r.words[u]=0|h,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}function c(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function h(t,e,r){return(new f).mulp(t,e,r)}function f(t,e){this.x=t,this.y=e}function d(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function b(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var x;try{x=t("buffer").Buffer}catch(t){}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=o(t,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=o(t,e,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,l=Math.min(a,a-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var i=0,a=0,o=0;o>>24-i&16777215,r=0!==a||o!==this.length-1?_[6-l.length]+l+r:l+r,i+=2,i>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=w[t],c=M[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var f=h.modn(c).toString(t);h=h.idivn(c),r=h.isZero()?f+r:_[u-f.length]+f+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==x),this.toArrayLike(x,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,u=new t(a),c=this.clone();if(l){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],x=8191&b,_=b>>>13,w=0|o[4],M=8191&w,k=w>>>13,A=0|o[5],T=8191&A,S=A>>>13,E=0|o[6],L=8191&E,C=E>>>13,z=0|o[7],D=8191&z,I=z>>>13,P=0|o[8],O=8191&P,R=P>>>13,j=0|o[9],F=8191&j,N=j>>>13,B=0|s[0],U=8191&B,V=B>>>13,q=0|s[1],H=8191&q,Y=q>>>13,G=0|s[2],X=8191&G,W=G>>>13,Z=0|s[3],J=8191&Z,K=Z>>>13,Q=0|s[4],$=8191&Q,tt=Q>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ut=st>>>13,ct=0|s[8],ht=8191&ct,ft=ct>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,V),i=i+Math.imul(f,U)|0,a=Math.imul(f,V);var gt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=Math.imul(p,V),i=i+Math.imul(m,U)|0,a=Math.imul(m,V),n=n+Math.imul(h,H)|0,i=i+Math.imul(h,Y)|0,i=i+Math.imul(f,H)|0,a=a+Math.imul(f,Y)|0;var vt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=Math.imul(v,V),i=i+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(p,H)|0,i=i+Math.imul(p,Y)|0,i=i+Math.imul(m,H)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(h,X)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(f,X)|0,a=a+Math.imul(f,W)|0;var yt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(x,U),i=Math.imul(x,V),i=i+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(v,H)|0,i=i+Math.imul(v,Y)|0,i=i+Math.imul(y,H)|0,a=a+Math.imul(y,Y)|0,n=n+Math.imul(p,X)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(m,X)|0,a=a+Math.imul(m,W)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,K)|0,i=i+Math.imul(f,J)|0,a=a+Math.imul(f,K)|0;var bt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,U),i=Math.imul(M,V),i=i+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(x,H)|0,i=i+Math.imul(x,Y)|0,i=i+Math.imul(_,H)|0,a=a+Math.imul(_,Y)|0,n=n+Math.imul(v,X)|0,i=i+Math.imul(v,W)|0,i=i+Math.imul(y,X)|0,a=a+Math.imul(y,W)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,K)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,K)|0,n=n+Math.imul(h,$)|0,i=i+Math.imul(h,tt)|0,i=i+Math.imul(f,$)|0,a=a+Math.imul(f,tt)|0;var xt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(T,U),i=Math.imul(T,V),i=i+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(M,H)|0,i=i+Math.imul(M,Y)|0,i=i+Math.imul(k,H)|0,a=a+Math.imul(k,Y)|0,n=n+Math.imul(x,X)|0,i=i+Math.imul(x,W)|0,i=i+Math.imul(_,X)|0,a=a+Math.imul(_,W)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,K)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,K)|0,n=n+Math.imul(p,$)|0,i=i+Math.imul(p,tt)|0,i=i+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0,n=n+Math.imul(h,rt)|0,i=i+Math.imul(h,nt)|0,i=i+Math.imul(f,rt)|0,a=a+Math.imul(f,nt)|0;var _t=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,U),i=Math.imul(L,V),i=i+Math.imul(C,U)|0,a=Math.imul(C,V),n=n+Math.imul(T,H)|0,i=i+Math.imul(T,Y)|0,i=i+Math.imul(S,H)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(M,X)|0,i=i+Math.imul(M,W)|0,i=i+Math.imul(k,X)|0,a=a+Math.imul(k,W)|0,n=n+Math.imul(x,J)|0,i=i+Math.imul(x,K)|0,i=i+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(v,$)|0,i=i+Math.imul(v,tt)|0,i=i+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=i+Math.imul(p,nt)|0,i=i+Math.imul(m,rt)|0,a=a+Math.imul(m,nt)|0,n=n+Math.imul(h,at)|0,i=i+Math.imul(h,ot)|0,i=i+Math.imul(f,at)|0,a=a+Math.imul(f,ot)|0;var wt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,U),i=Math.imul(D,V),i=i+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(L,H)|0,i=i+Math.imul(L,Y)|0,i=i+Math.imul(C,H)|0,a=a+Math.imul(C,Y)|0,n=n+Math.imul(T,X)|0,i=i+Math.imul(T,W)|0,i=i+Math.imul(S,X)|0,a=a+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,i=i+Math.imul(M,K)|0,i=i+Math.imul(k,J)|0,a=a+Math.imul(k,K)|0,n=n+Math.imul(x,$)|0,i=i+Math.imul(x,tt)|0,i=i+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=i+Math.imul(v,nt)|0,i=i+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(p,at)|0,i=i+Math.imul(p,ot)|0,i=i+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0,n=n+Math.imul(h,lt)|0,i=i+Math.imul(h,ut)|0,i=i+Math.imul(f,lt)|0,a=a+Math.imul(f,ut)|0;var Mt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,U),i=Math.imul(O,V),i=i+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(D,H)|0,i=i+Math.imul(D,Y)|0,i=i+Math.imul(I,H)|0,a=a+Math.imul(I,Y)|0,n=n+Math.imul(L,X)|0,i=i+Math.imul(L,W)|0,i=i+Math.imul(C,X)|0,a=a+Math.imul(C,W)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,K)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(M,$)|0,i=i+Math.imul(M,tt)|0,i=i+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=i+Math.imul(x,nt)|0,i=i+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=i+Math.imul(v,ot)|0,i=i+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(p,lt)|0,i=i+Math.imul(p,ut)|0,i=i+Math.imul(m,lt)|0,a=a+Math.imul(m,ut)|0,n=n+Math.imul(h,ht)|0,i=i+Math.imul(h,ft)|0,i=i+Math.imul(f,ht)|0,a=a+Math.imul(f,ft)|0;var kt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,U),i=Math.imul(F,V),i=i+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(O,H)|0,i=i+Math.imul(O,Y)|0,i=i+Math.imul(R,H)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(D,X)|0,i=i+Math.imul(D,W)|0,i=i+Math.imul(I,X)|0,a=a+Math.imul(I,W)|0,n=n+Math.imul(L,J)|0,i=i+Math.imul(L,K)|0,i=i+Math.imul(C,J)|0,a=a+Math.imul(C,K)|0,n=n+Math.imul(T,$)|0,i=i+Math.imul(T,tt)|0,i=i+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(M,rt)|0,i=i+Math.imul(M,nt)|0,i=i+Math.imul(k,rt)|0,a=a+Math.imul(k,nt)|0,n=n+Math.imul(x,at)|0,i=i+Math.imul(x,ot)|0,i=i+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=i+Math.imul(v,ut)|0,i=i+Math.imul(y,lt)|0,a=a+Math.imul(y,ut)|0,n=n+Math.imul(p,ht)|0,i=i+Math.imul(p,ft)|0,i=i+Math.imul(m,ht)|0,a=a+Math.imul(m,ft)|0,n=n+Math.imul(h,pt)|0,i=i+Math.imul(h,mt)|0,i=i+Math.imul(f,pt)|0,a=a+Math.imul(f,mt)|0;var At=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,H),i=Math.imul(F,Y),i=i+Math.imul(N,H)|0,a=Math.imul(N,Y),n=n+Math.imul(O,X)|0,i=i+Math.imul(O,W)|0,i=i+Math.imul(R,X)|0,a=a+Math.imul(R,W)|0,n=n+Math.imul(D,J)|0,i=i+Math.imul(D,K)|0,i=i+Math.imul(I,J)|0,a=a+Math.imul(I,K)|0,n=n+Math.imul(L,$)|0,i=i+Math.imul(L,tt)|0,i=i+Math.imul(C,$)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=i+Math.imul(T,nt)|0,i=i+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(M,at)|0,i=i+Math.imul(M,ot)|0,i=i+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,n=n+Math.imul(x,lt)|0,i=i+Math.imul(x,ut)|0,i=i+Math.imul(_,lt)|0,a=a+Math.imul(_,ut)|0,n=n+Math.imul(v,ht)|0,i=i+Math.imul(v,ft)|0,i=i+Math.imul(y,ht)|0,a=a+Math.imul(y,ft)|0,n=n+Math.imul(p,pt)|0,i=i+Math.imul(p,mt)|0,i=i+Math.imul(m,pt)|0,a=a+Math.imul(m,mt)|0;var Tt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,X),i=Math.imul(F,W),i=i+Math.imul(N,X)|0,a=Math.imul(N,W),n=n+Math.imul(O,J)|0,i=i+Math.imul(O,K)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(D,$)|0,i=i+Math.imul(D,tt)|0,i=i+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(L,rt)|0,i=i+Math.imul(L,nt)|0,i=i+Math.imul(C,rt)|0,a=a+Math.imul(C,nt)|0,n=n+Math.imul(T,at)|0,i=i+Math.imul(T,ot)|0,i=i+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(M,lt)|0,i=i+Math.imul(M,ut)|0,i=i+Math.imul(k,lt)|0,a=a+Math.imul(k,ut)|0,n=n+Math.imul(x,ht)|0,i=i+Math.imul(x,ft)|0,i=i+Math.imul(_,ht)|0,a=a+Math.imul(_,ft)|0,n=n+Math.imul(v,pt)|0,i=i+Math.imul(v,mt)|0,i=i+Math.imul(y,pt)|0,a=a+Math.imul(y,mt)|0;var St=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,J),i=Math.imul(F,K),i=i+Math.imul(N,J)|0,a=Math.imul(N,K),n=n+Math.imul(O,$)|0,i=i+Math.imul(O,tt)|0,i=i+Math.imul(R,$)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(D,rt)|0,i=i+Math.imul(D,nt)|0,i=i+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(L,at)|0,i=i+Math.imul(L,ot)|0,i=i+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,n=n+Math.imul(T,lt)|0,i=i+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,a=a+Math.imul(S,ut)|0,n=n+Math.imul(M,ht)|0,i=i+Math.imul(M,ft)|0,i=i+Math.imul(k,ht)|0,a=a+Math.imul(k,ft)|0,n=n+Math.imul(x,pt)|0,i=i+Math.imul(x,mt)|0,i=i+Math.imul(_,pt)|0,a=a+Math.imul(_,mt)|0;var Et=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,$),i=Math.imul(F,tt),i=i+Math.imul(N,$)|0,a=Math.imul(N,tt),n=n+Math.imul(O,rt)|0,i=i+Math.imul(O,nt)|0,i=i+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(D,at)|0,i=i+Math.imul(D,ot)|0,i=i+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(L,lt)|0,i=i+Math.imul(L,ut)|0,i=i+Math.imul(C,lt)|0,a=a+Math.imul(C,ut)|0,n=n+Math.imul(T,ht)|0,i=i+Math.imul(T,ft)|0,i=i+Math.imul(S,ht)|0,a=a+Math.imul(S,ft)|0,n=n+Math.imul(M,pt)|0,i=i+Math.imul(M,mt)|0,i=i+Math.imul(k,pt)|0,a=a+Math.imul(k,mt)|0;var Lt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(F,rt),i=Math.imul(F,nt),i=i+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(O,at)|0,i=i+Math.imul(O,ot)|0,i=i+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(D,lt)|0,i=i+Math.imul(D,ut)|0,i=i+Math.imul(I,lt)|0,a=a+Math.imul(I,ut)|0,n=n+Math.imul(L,ht)|0,i=i+Math.imul(L,ft)|0,i=i+Math.imul(C,ht)|0,a=a+Math.imul(C,ft)|0,n=n+Math.imul(T,pt)|0,i=i+Math.imul(T,mt)|0,i=i+Math.imul(S,pt)|0,a=a+Math.imul(S,mt)|0;var Ct=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,at),i=Math.imul(F,ot),i=i+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(O,lt)|0,i=i+Math.imul(O,ut)|0,i=i+Math.imul(R,lt)|0,a=a+Math.imul(R,ut)|0,n=n+Math.imul(D,ht)|0,i=i+Math.imul(D,ft)|0,i=i+Math.imul(I,ht)|0,a=a+Math.imul(I,ft)|0,n=n+Math.imul(L,pt)|0,i=i+Math.imul(L,mt)|0,i=i+Math.imul(C,pt)|0,a=a+Math.imul(C,mt)|0;var zt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(F,lt),i=Math.imul(F,ut),i=i+Math.imul(N,lt)|0,a=Math.imul(N,ut),n=n+Math.imul(O,ht)|0,i=i+Math.imul(O,ft)|0,i=i+Math.imul(R,ht)|0,a=a+Math.imul(R,ft)|0,n=n+Math.imul(D,pt)|0,i=i+Math.imul(D,mt)|0,i=i+Math.imul(I,pt)|0,a=a+Math.imul(I,mt)|0;var Dt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(F,ht),i=Math.imul(F,ft),i=i+Math.imul(N,ht)|0,a=Math.imul(N,ft),n=n+Math.imul(O,pt)|0,i=i+Math.imul(O,mt)|0,i=i+Math.imul(R,pt)|0,a=a+Math.imul(R,mt)|0;var It=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,pt),i=Math.imul(F,mt),i=i+Math.imul(N,pt)|0,a=Math.imul(N,mt);var Pt=(u+n|0)+((8191&i)<<13)|0;return u=(a+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,l[0]=gt,l[1]=vt,l[2]=yt,l[3]=bt,l[4]=xt,l[5]=_t,l[6]=wt,l[7]=Mt,l[8]=kt,l[9]=At,l[10]=Tt,l[11]=St,l[12]=Et,l[13]=Lt,l[14]=Ct,l[15]=zt,l[16]=Dt,l[17]=It,l[18]=Pt,0!==u&&(l[19]=u,r.length++),r};Math.imul||(k=u),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?k(this,t,e):r<63?u(this,t,e):r<1024?c(this,t,e):h(this,t,e)},f.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},f.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=l(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0);var i;i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-a|h>>>a,c=h&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){s=new a(null),s.length=l+1,s.words=new Array(s.length);for(var u=0;u=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=f)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){if(n(!t.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var i,o,s;return 0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0==(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(c),l.isub(h)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(u)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0==(e.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(e.iushrn(l);l-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var c=0,h=1;0==(r.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o)):(r.isub(e),o.isub(i))}var f;return f=0===e.cmpn(1)?i:o,f.cmpn(0)<0&&f.iadd(t),f},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];r=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new y(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};d.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},d.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},d.prototype.split=function(t,e){t.iushrn(this.n,0,e)},d.prototype.imulK=function(t){return t.imul(this.k)},i(p,d),p.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},p.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new m;else if("p192"===t)e=new g;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new v}return A[t]=e,e},y.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},y.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},y.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},y.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},y.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},y.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},y.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=o;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var u=e.words[n],c=l-1;c>=0;c--){var h=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},y.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},y.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new b(t)},i(b,y),b.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},b.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},b.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},b.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},b.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{}],61:[function(t,e,r){"use strict";function n(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(s<=0)){var l,u=h.mallocDouble(2*s*a),c=h.mallocInt32(a);if((a=i(t,s,u,c))>0){if(1===s&&n)f.init(a),l=f.sweepComplete(s,r,0,a,u,c,0,a,u,c);else{var p=h.mallocDouble(2*s*o),m=h.mallocInt32(o);o=i(e,s,p,m),o>0&&(f.init(a+o),l=1===s?f.sweepBipartite(s,r,0,a,u,c,0,o,p,m):d(s,r,n,a,u,c,o,p,m),h.free(p),h.free(m))}h.free(u),h.free(c)}return l}}}function o(t,e){c.push([t,e])}function s(t){return c=[],a(t,t,o,!0),c}function l(t,e){return c=[],a(t,e,o,!1),c}function u(t,e,r){switch(arguments.length){case 1:return s(t);case 2:return"function"==typeof e?a(t,t,e,!0):l(t,e);case 3:return a(t,e,r,!1);default:throw new Error("box-intersect: Invalid arguments")}}e.exports=u;var c,h=t("typedarray-pool"),f=t("./lib/sweep"),d=t("./lib/intersect")},{"./lib/intersect":64,"./lib/sweep":68,"typedarray-pool":528}],63:[function(t,e,r){"use strict";function n(t,e,r){var n="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(r?"Full":""),i=["function ",n,"(",w.join(),"){","var ",u,"=2*",a,";"],l="for(var i="+c+","+p+"="+u+"*"+c+";i<"+h+";++i,"+p+"+="+u+"){var x0="+f+"["+o+"+"+p+"],x1="+f+"["+o+"+"+p+"+"+a+"],xi="+d+"[i];",M="for(var j="+m+","+b+"="+u+"*"+m+";j<"+g+";++j,"+b+"+="+u+"){var y0="+v+"["+o+"+"+b+"],"+(r?"y1="+v+"["+o+"+"+b+"+"+a+"],":"")+"yi="+y+"[j];";return t?i.push(l,_,":",M):i.push(M,_,":",l),r?i.push("if(y1"+g+"-"+m+"){"),t?(e(!0,!1),o.push("}else{"),e(!1,!1)):(o.push("if("+l+"){"),e(!0,!0),o.push("}else{"),e(!0,!1),o.push("}}else{if("+l+"){"),e(!1,!0),o.push("}else{"),e(!1,!1),o.push("}")),o.push("}}return "+r);var s=i.join("")+o.join("");return new Function(s)()}var a="d",o="ax",s="vv",l="fp",u="es",c="rs",h="re",f="rb",d="ri",p="rp",m="bs",g="be",v="bb",y="bi",b="bp",x="rv",_="Q",w=[a,o,s,c,h,f,d,m,g,v,y];r.partial=i(!1),r.full=i(!0)},{}],64:[function(t,e,r){"use strict";function n(t,e){var r=8*u.log2(e+1)*(t+1)|0,n=u.nextPow2(A*r);S.length0;){z-=1;var I=z*A,P=S[I],O=S[I+1],R=S[I+2],j=S[I+3],F=S[I+4],N=S[I+5],B=z*T,U=E[B],V=E[B+1],q=1&N,H=!!(16&N),Y=l,G=u,X=m,W=L;if(q&&(Y=m,G=L,X=l,W=u),!(2&N&&(R=_(t,P,O,R,Y,G,V),O>=R)||4&N&&(O=w(t,P,O,R,Y,G,U))>=R)){var Z=R-O,J=F-j;if(H){if(t*Z*(Z+J)=p0)&&!(p1>=hi)",["p0","p1"]),x=m("lo===p0",["p0"]),_=m("lor&&i[h+e]>u;--c,h-=o){for(var f=h,d=h+o,p=0;p>>1,f=2*t,d=h,p=a[f*h+e];u=b?(d=y,p=b):v>=_?(d=g,p=v):(d=x,p=_):b>=_?(d=y,p=b):_>=v?(d=g,p=v):(d=x,p=_);for(var w=f*(c-1),M=f*d,k=0;k=0&&n.push("lo=e[k+n]"),t.indexOf("hi")>=0&&n.push("hi=e[k+o]"),r.push(i.replace("_",n.join()).replace("$",t)),Function.apply(void 0,r)}e.exports=n;var i="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],67:[function(t,e,r){"use strict";function n(t,e){e<=4*f?i(0,e-1,t):h(0,e-1,t)}function i(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var u=r[l-2],c=r[l-1];if(ur[e+1])}function c(t,e,r,n){t*=2;var i=n[t];return i>1,g=m-n,v=m+n,y=d,b=g,x=m,_=v,w=p,M=t+1,k=e-1,A=0;u(y,b,r)&&(A=y,y=b,b=A),u(_,w,r)&&(A=_,_=w,w=A),u(y,x,r)&&(A=y,y=x,x=A),u(b,x,r)&&(A=b,b=x,x=A),u(y,_,r)&&(A=y,y=_,_=A),u(x,_,r)&&(A=x,x=_,_=A),u(b,w,r)&&(A=b,b=w,w=A),u(b,x,r)&&(A=b,b=x,x=A),u(_,w,r)&&(A=_,_=w,w=A);for(var T=r[2*b],S=r[2*b+1],E=r[2*_],L=r[2*_+1],C=2*y,z=2*x,D=2*w,I=2*d,P=2*m,O=2*p,R=0;R<2;++R){var j=r[C+R],F=r[z+R],N=r[D+R];r[I+R]=j,r[P+R]=F,r[O+R]=N}o(g,t,r),o(v,e,r);for(var B=M;B<=k;++B)if(c(B,T,S,r))B!==M&&a(B,M,r),++M;else if(!c(B,E,L,r))for(;;){if(c(k,E,L,r)){c(k,T,S,r)?(s(B,M,k,r),++M,--k):(a(B,k,r),--k);break}if(--k>>1;f(x,S);for(var E=0,L=0,M=0;M=d)C=C-d|0,i(g,v,L--,C);else if(C>=0)i(p,m,E--,C);else if(C<=-d){C=-C-d|0;for(var z=0;z>>1;f(x,E);for(var L=0,C=0,z=0,k=0;k>1==x[2*k+3]>>1&&(I=2,k+=1),D<0){for(var P=-(D>>1)-1,O=0;O>1)-1;0===I?i(p,m,L--,P):1===I?i(g,v,C--,P):2===I&&i(y,b,z--,P)}}}function l(t,e,r,n,o,s,l,u,c,h,g,v){var y=0,b=2*t,_=e,w=e+t,M=1,k=1;n?k=d:M=d;for(var A=o;A>>1;f(x,L);for(var C=0,A=0;A=d?(D=!n,T-=d):(D=!!n,T-=1),D)a(p,m,C++,T);else{var I=v[T],P=b*T,O=g[P+e+1],R=g[P+e+1+t];t:for(var j=0;j>>1;f(x,M);for(var k=0,y=0;y=d)p[k++]=b-d;else{b-=1;var T=c[b],S=m*b,E=u[S+e+1],L=u[S+e+1+t];t:for(var C=0;C=0;--C)if(p[C]===b){for(var P=C+1;PZ)throw new RangeError("Invalid typed array length");var e=new Uint8Array(t);return e.__proto__=i.prototype,e}function i(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(t)}return a(t,e,r)}function a(t,e,r){ +if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return t instanceof ArrayBuffer?h(t,e,r):"string"==typeof t?u(t,e):f(t)}function o(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function s(t,e,r){return o(t),t<=0?n(t):void 0!==e?"string"==typeof r?n(t).fill(e,r):n(t).fill(e):n(t)}function l(t){return o(t),n(t<0?0:0|d(t))}function u(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!i.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(t,e),a=n(r),o=a.write(t,e);return o!==r&&(a=a.slice(0,o)),a}function c(t){for(var e=t.length<0?0:0|d(t.length),r=n(e),i=0;i=Z)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z.toString(16)+" bytes");return 0|t}function p(t){return+t!=t&&(t=0),i.alloc(+t)}function m(t,e){if(i.isBuffer(t))return t.length;if(Y(t)||t instanceof ArrayBuffer)return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(t).length;default:if(n)return B(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return z(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,a){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,G(r)&&(r=a?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(a)return-1;r=t.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof e&&(e=i.from(e,n)),i.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,a);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,a);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){function a(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}var u;if(i){var c=-1;for(u=r;us&&(r=s-l),u=r;u>=0;u--){for(var h=!0,f=0;fi&&(n=i):n=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=r){var l,u,c,h;switch(s){case 1:a<128&&(o=a);break;case 2:l=t[i+1],128==(192&l)&&(h=(31&a)<<6|63&l)>127&&(o=h);break;case 3:l=t[i+1],u=t[i+2],128==(192&l)&&128==(192&u)&&(h=(15&a)<<12|(63&l)<<6|63&u)>2047&&(h<55296||h>57343)&&(o=h);break;case 4:l=t[i+1],u=t[i+2],c=t[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(h=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&h<1114112&&(o=h)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return E(n)}function E(t){var e=t.length;if(e<=J)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,r,n,a,o){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||et.length)throw new RangeError("Index out of range")}function O(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(t,e,r,n,52,8),r+8}function F(t){if(t=t.trim().replace(K,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function U(t){for(var e=[],r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function q(t){return X.toByteArray(F(t))}function H(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Y(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function G(t){return t!==t}var X=t("base64-js"),W=t("ieee754");r.Buffer=i,r.SlowBuffer=p,r.INSPECT_MAX_BYTES=50;var Z=2147483647;r.kMaxLength=Z,i.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(t,e,r){return a(t,e,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(t,e,r){return s(t,e,r)},i.allocUnsafe=function(t){return l(t)},i.allocUnsafeSlow=function(t){return l(t)},i.isBuffer=function(t){return null!=t&&!0===t._isBuffer},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,a=0,o=Math.min(r,n);a0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},i.prototype.compare=function(t,e,r,n,a){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),e<0||r>t.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&e>=r)return 0;if(n>=a)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,a>>>=0,this===t)return 0;for(var o=a-n,s=r-e,l=Math.min(o,s),u=this.slice(n,a),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return M(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;i.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},i.prototype.readUInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a=i&&(n-=Math.pow(2,8*e)),n},i.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*e)),a},i.prototype.readInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return t>>>=0,e||I(t,4,this.length),W.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return t>>>=0,e||I(t,4,this.length),W.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return t>>>=0,e||I(t,8,this.length),W.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return t>>>=0,e||I(t,8,this.length),W.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},i.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},i.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},i.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},i.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},i.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeFloatLE=function(t,e,r){return R(this,t,e,!0,r)},i.prototype.writeFloatBE=function(t,e,r){return R(this,t,e,!1,r)},i.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},i.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},i.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return 3*t.length/4-n(t)}function a(t){var e,r,i,a,o,s,l=t.length;o=n(t),s=new h(3*l/4-o),i=o>0?l-4:l;var u=0;for(e=0,r=0;e>16&255,s[u++]=a>>8&255,s[u++]=255&a;return 2===o?(a=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,s[u++]=255&a):1===o&&(a=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,s[u++]=a>>8&255,s[u++]=255&a),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function s(t,e,r){for(var n,i=[],a=e;al?l:o+16383));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),a.push(i),a.join("")}r.byteLength=i,r.toByteArray=a,r.fromByteArray=l;for(var u=[],c=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=f.length;d0;){for(var c=r.pop(),s=r.pop(),h=-1,f=-1,l=o[s],p=1;p=0||(e.flip(s,c),n(t,e,r,h,s,f),n(t,e,r,s,f,h),n(t,e,r,f,c,h),n(t,e,r,c,h,f)))}}var a=t("robust-in-sphere")[4];t("binary-search-bounds");e.exports=i},{"binary-search-bounds":76,"robust-in-sphere":494}],73:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function i(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}function a(t,e){for(var r=t.cells(),a=r.length,o=0;o0||l.length>0;){for(;s.length>0;){var d=s.pop();if(u[d]!==-i){u[d]=i;for(var p=(c[d],0);p<3;++p){var m=f[3*d+p];m>=0&&0===u[m]&&(h[3*d+p]?l.push(m):(s.push(m),u[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var v=o(c,u,e);return r?v.concat(n.boundary):v}var l=t("binary-search-bounds");e.exports=s,n.prototype.locate=function(){var t=[0,0,0];return function(e,r,n){var a=e,o=r,s=n;return r1&&d(r[c[h-2]],r[c[h-1]],n)>0;)t.push([c[h-1],c[h-2],i]),h-=1;c.length=h,c.push(i);for(var p=u.upperIds,h=p.length;h>1&&d(r[p[h-2]],r[p[h-1]],n)<0;)t.push([p[h-2],p[h-1],i]),h-=1;p.length=h,p.push(i)}}function l(t,e){var r;return(r=t.a[0]v[0]&&l.push(new i(v,d,g,h),new i(d,v,m,h))}l.sort(a);for(var y=l[0].a[0]-(1+Math.abs(l[0].a[0]))*Math.pow(2,-52),b=[new n([y,1],[y,0],-1,[],[],[],[])],x=[],h=0,_=l.length;h<_;++h){var w=l[h],M=w.type;M===p?s(x,b,t,w.a,w.idx):M===g?u(b,t,w):c(b,t,w)}return x}var f=t("binary-search-bounds"),d=t("robust-orientation")[3],p=0,m=1,g=2;e.exports=h},{"binary-search-bounds":76,"robust-orientation":496}],75:[function(t,e,r){"use strict";function n(t,e){this.stars=t,this.edges=e}function i(t,e,r){for(var n=1,i=t.length;n=0}}(),s.removeTriangle=function(t,e,r){var n=this.stars;i(n[t],e,r),i(n[e],r,t),i(n[r],t,e)},s.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},s.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n>>1,x=a[m]"];return i?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),r?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),i?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],i),n("P","c(x,y)"+t+"0",e,["y","c"],i),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],77:[function(t,e,r){"use strict";function n(t){for(var e=1,r=1;rr?r:t:te?e:t}e.exports=n},{}],81:[function(t,e,r){"use strict";function n(t){var e=_(t);return[M(e,-1/0),M(e,1/0)]}function i(t,e){for(var r=new Array(e.length),n=0;n=0;--a){var p=n[a];o=p[0];var m=e[o],g=m[0],v=m[1],y=t[g],M=t[v];if((y[0]-M[0]||y[1]-M[1])<0){var A=g;g=v,v=A}m[0]=g;var T,S=m[1]=p[1];for(i&&(T=m[2]);a>0&&n[a-1][0]===o;){var p=n[--a],E=p[1];i?e.push([S,E,T]):e.push([S,E]),S=E}i?e.push([S,v,T]):e.push([S,v])}return s}function u(t,e,r){for(var i=e.length,a=new g(i),o=[],s=0;se[2]?1:0)}function f(t,e,r){if(0!==t.length){if(e)for(var n=0;n0||d.length>0)}function m(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a10&&/[0-9](?:\s|\/)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),r=t.match(/([a-z])/gi).join("").toLowerCase());else"number"==typeof t?(r="rgb",n=[t>>>16,(65280&t)>>>8,255&t]):a(t)?(null!=t.r?(n=[t.r,t.g,t.b],r="rgb"):null!=t.red?(n=[t.red,t.green,t.blue],r="rgb"):null!=t.h?(n=[t.h,t.s,t.l],r="hsl"):null!=t.hue&&(n=[t.hue,t.saturation,t.lightness],r="hsl"),null!=t.a?s=t.a:null!=t.alpha?s=t.alpha:null!=t.opacity&&(s=t.opacity/100)):(Array.isArray(t)||ArrayBuffer.isView(t))&&(n=[t[0],t[1],t[2]],r="rgb",s=4===t.length?t[3]:1);return{space:r,values:n,alpha:s}}e.exports=n;var i=t("color-name"),a=t("is-plain-obj"),o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},{"color-name":85,"is-plain-obj":286}],87:[function(t,e,r){"use strict";var n=t("color-parse"),i=t("color-space/hsl"),a=t("clamp");e.exports=function(t,e){null==e&&(e=!0);var r=n(t);if(!r.space)return[];if(Array.isArray(t))return t;var o,s=r.values,l=s.length;for(o=0;o1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[u]=255*a;return i}},n.hsl=function(t){var e,r,n,i=t[0]/255,a=t[1]/255,o=t[2]/255,s=Math.min(i,a,o),l=Math.max(i,a,o),u=l-s;return l===s?e=0:i===l?e=(a-o)/u:a===l?e=2+(o-i)/u:o===l&&(e=4+(i-a)/u),e=Math.min(60*e,360),e<0&&(e+=360),n=(s+l)/2,r=l===s?0:n<=.5?u/(l+s):u/(2-l-s),[e,100*r,100*n]}},{"./rgb":89}],89:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],90:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:0,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],91:[function(t,e,r){"use strict";function n(t){var e,r,n,u,c,h,f,d,p,m,g,v,y,b=[],x=[],_=[],w=[];if(o.isPlainObject(t)||(t={}),p=t.nshades||72,d=t.format||"hex",f=t.colormap,f||(f="jet"),"string"==typeof f){if(f=f.toLowerCase(),!l[f])throw Error(f+" not a supported colorscale");h=s(l[f])}else{if(!Array.isArray(f))throw Error("unsupported colormap option",f);h=s(f)}if(h.length>p)throw new Error(f+" map requires nshades to be at least size "+h.length);for(g=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:s(t.alpha):"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=h.map(function(t){return Math.round(t.index*p)}),g[0]<0&&(g[0]=0),g[1]<0&&(g[0]=0),g[0]>1&&(g[0]=1),g[1]>1&&(g[0]=1),y=0;y=0&&r[3]<=1||(r[3]=g[0]+(g[1]-g[0])*v);for(y=0;y=0}function i(t,e,r,i){var s=a(e,r,i);if(0===s){var l=o(a(t,e,r)),u=o(a(t,e,i));if(l===u){if(0===l){var c=n(t,e,r);return c===n(t,e,i)?0:c?1:-1}return 0}return 0===u?l>0?-1:n(t,e,i)?-1:1:0===l?u>0?1:n(t,e,r)?1:-1:o(u-l)}var h=a(t,e,r);return h>0?s>0&&a(t,e,i)>0?1:-1:h<0?s>0||a(t,e,i)>0?1:-1:a(t,e,i)>0?1:n(t,e,r)?1:-1}e.exports=i;var a=t("robust-orientation"),o=t("signum"),s=t("two-sum"),l=t("robust-product"),u=t("robust-sum")},{"robust-orientation":496,"robust-product":497,"robust-sum":501,signum:503,"two-sum":527}],93:[function(t,e,r){function n(t,e){return t-e}function i(t,e){var r=t.length,i=t.length-e.length;if(i)return i;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||a(t[0],t[1])-a(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(i=o+t[2]-(s+e[2]))return i;var l=a(t[0],t[1]),u=a(e[0],e[1]);return a(l,t[2])-a(u,e[2])||a(l+t[2],o)-a(u+e[2],s);case 4:var c=t[0],h=t[1],f=t[2],d=t[3],p=e[0],m=e[1],g=e[2],v=e[3];return c+h+f+d-(p+m+g+v)||a(c,h,f,d)-a(p,m,g,v,p)||a(c+h,c+f,c+d,h+f,h+d,f+d)-a(p+m,p+g,p+v,m+g,m+v,g+v)||a(c+h+f,c+h+d,c+f+d,h+f+d)-a(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var y=t.slice().sort(n),b=e.slice().sort(n),x=0;xt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}e.exports=n},{}],97:[function(t,e,r){"use strict";function n(t){var e=i(t),r=e.length;if(r<=2)return[];for(var n=new Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}function a(t,e){try{return o(t,!0)}catch(u){var r=s(t);if(r.length<=e)return[];var a=n(t,r),l=o(a,!0);return i(l,r)}}e.exports=a;var o=t("incremental-convex-hull"),s=t("affine-hull")},{"affine-hull":35,"incremental-convex-hull":280}],99:[function(t,e,r){e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],100:[function(t,e,r){function n(t){return t=Math.round(t),t<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return n("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return i("%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function l(t){var e=t.replace(/ /g,"").toLowerCase();if(e in u)return u[e].slice();if("#"===e[0]){if(4===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=4095?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null}if(7===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=16777215?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null}return null}var i=e.indexOf("("),l=e.indexOf(")");if(-1!==i&&l+1===e.length){var c=e.substr(0,i),h=e.substr(i+1,l-(i+1)).split(","),f=1;switch(c){case"rgba":if(4!==h.length)return null;f=o(h.pop());case"rgb":return 3!==h.length?null:[a(h[0]),a(h[1]),a(h[2]),f];case"hsla":if(4!==h.length)return null;f=o(h.pop());case"hsl":if(3!==h.length)return null;var d=(parseFloat(h[0])%360+360)%360/360,p=o(h[1]),m=o(h[2]),g=m<=.5?m*(p+1):m+p-m*p,v=2*m-g;return[n(255*s(v,g,d+1/3)),n(255*s(v,g,d)),n(255*s(v,g,d-1/3)),f];default:return null}}return null}var u={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1], +olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{r.parseCSSColor=l}catch(t){}},{}],101:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,u=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var c=t.length-1;c>=0;--c)a[c]=o*t[c]+s*e[c]+l*r[c]+u*n[c];return a}return o*t+s*e+l*r[c]+u*n}function i(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,u=(1+2*i)*l,c=i*l,h=s*(3-2*i),f=s*o;if(t.length){a||(a=new Array(t.length));for(var d=t.length-1;d>=0;--d)a[d]=u*t[d]+c*e[d]+h*r[d]+f*n[d];return a}return u*t+c*e+h*r+f*n}e.exports=i,e.exports.derivative=n},{}],102:[function(t,e,r){"use strict";function n(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function i(t){var e=new n;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var i=0;i0)throw new Error("cwise: pre() block may not reference array args");if(i0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)e.scalarArgs.push(i),e.shimArgs.push("scalar"+i);else if("index"===o){if(e.indexArgs.push(i),i0)throw new Error("cwise: pre() block may not reference array index");if(i0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(e.shapeArgs.push(i),ir.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,a(e)}var a=t("./lib/thunk.js");e.exports=i},{"./lib/thunk.js":104}],103:[function(t,e,r){"use strict";function n(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],u=[],c=0,h=0;for(n=0;n=0;--n)c=t[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",h,"]-=s",h].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function i(t,e,r,i){for(var a=e.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,u=[],c=0;c0;){"].join("")),u.push(["if(j",c,"<",s,"){"].join("")),u.push(["s",e[c],"=j",c].join("")),u.push(["j",c,"=0"].join("")),u.push(["}else{s",e[c],"=",s].join("")),u.push(["j",c,"-=",s,"}"].join("")),l&&u.push(["index[",e[c],"]=j",c].join(""));for(var c=0;c0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}function l(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,l=new Array(t.arrayArgs.length),c=new Array(t.arrayArgs.length),h=0;h0&&_.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var w=new Array(r),h=0;h3&&x.push(o(t.pre,t,c));var T=o(t.body,t,c),S=a(g);S3&&x.push(o(t.post,t,c)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+x.join("\n")+"\n----------");var E=[t.funcName||"unnamed","_cwise_loop_",l[0].join("s"),"m",S,s(c)].join("");return new Function(["function ",E,"(",b.join(","),"){",x.join("\n"),"} return ",E].join(""))()}var u=t("uniq");e.exports=l},{uniq:530}],104:[function(t,e,r){"use strict";function n(t){var e=["'use strict'","var CACHED={}"],r=[],n=t.funcName+"_cwise_thunk";e.push(["return function ",n,"(",t.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],l=[],u=[],c=0;c0&&(l.push("array"+t.arrayArgs[0]+".shape.length===array"+h+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[c]))),u.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+h+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[c])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),e.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}"));for(var c=0;c=M?i*=10:a>=k?i*=5:a>=A&&(i*=2),ee?1:t>=e?0:NaN},o=function(t){return 1===t.length&&(t=e(t)),{left:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}},s=o(a),l=s.right,u=s.left,c=function(t,e){null==e&&(e=r);for(var n=0,i=t.length-1,a=t[0],o=new Array(i<0?0:i);nt?1:e>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,e){var r,n,i=t.length,a=0,o=0,s=-1,l=0;if(null==e)for(;++s1)return o/(l-1)},m=function(t,e){var r=p(t,e);return r?Math.sqrt(r):r},g=function(t,e){var r,n,i,a=-1,o=t.length;if(null==e){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i=h;)f.pop(),--d;var p,m=new Array(d+1);for(i=0;i<=d;++i)p=m[i]=[],p.x0=i>0?f[i-1]:c,p.x1=i=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t);return o+(+r(t[a+1],a+1,t)-o)*(i-a)}},C=function(t,e,r){return t=b.call(t,d).sort(a),Math.ceil((r-e)/(2*(L(t,.75)-L(t,.25))*Math.pow(t.length,-1/3)))},z=function(t,e,r){return Math.ceil((r-e)/(3.5*m(t)*Math.pow(t.length,-1/3)))},D=function(t,e){var r,n,i=-1,a=t.length;if(null==e){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},I=function(t,e){var r,n=0,i=t.length,a=-1,o=i;if(null==e)for(;++a=0;)for(n=t[i],e=n.length;--e>=0;)r[--o]=n[e];return r},R=function(t,e){var r,n,i=-1,a=t.length;if(null==e){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},j=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},F=function(t,e){if(r=t.length){var r,n,i=0,o=0,s=t[o];for(e||(e=a);++i=c.length)return null!=l?l(e):null!=s?e.sort(s):e;for(var o,u,h,f=-1,d=e.length,p=c[n++],m=r(),g=i();++fc.length)return t;var n,i=h[r-1];return null!=l&&r>=c.length?n=t.entries():(n=[],t.each(function(t,i){n.push({key:i,values:e(t,r)})})),null!=i?n.sort(function(t,e){return i(t.key,e.key)}):n}var s,l,u,c=[],h=[];return u={object:function(e){return t(e,0,n,i)},map:function(e){return t(e,0,a,o)},entries:function(r){return e(t(r,0,a,o),0)},key:function(t){return c.push(t),u},sortKeys:function(t){return h[c.length-1]=t,u},sortValues:function(t){return s=t,u},rollup:function(t){return l=t,u}}},c=r.prototype;s.prototype=l.prototype={constructor:s,has:c.has,add:function(t){return t+="",this["$"+t]=t,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};var h=function(t){var e=[];for(var r in t)e.push(r);return e},f=function(t){var e=[];for(var r in t)e.push(t[r]);return e},d=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e};t.nest=u,t.set=l,t.map=r,t.keys=h,t.values=f,t.entries=d,Object.defineProperty(t,"__esModule",{value:!0})})},{}],108:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.d3=e.d3||{})}(this,function(t){"use strict";function e(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function r(){}function n(t){var e;return t=(t+"").trim().toLowerCase(),(e=z.exec(t))?(e=parseInt(e[1],16),new l(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=D.exec(t))?i(parseInt(e[1],16)):(e=I.exec(t))?new l(e[1],e[2],e[3],1):(e=P.exec(t))?new l(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=O.exec(t))?a(e[1],e[2],e[3],e[4]):(e=R.exec(t))?a(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=j.exec(t))?u(e[1],e[2]/100,e[3]/100,1):(e=F.exec(t))?u(e[1],e[2]/100,e[3]/100,e[4]):N.hasOwnProperty(t)?i(N[t]):"transparent"===t?new l(NaN,NaN,NaN,0):null}function i(t){return new l(t>>16&255,t>>8&255,255&t,1)}function a(t,e,r,n){return n<=0&&(t=e=r=NaN),new l(t,e,r,n)}function o(t){return t instanceof r||(t=n(t)),t?(t=t.rgb(),new l(t.r,t.g,t.b,t.opacity)):new l}function s(t,e,r,n){return 1===arguments.length?o(t):new l(t,e,r,null==n?1:n)}function l(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function u(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new f(t,e,r,n)}function c(t){if(t instanceof f)return new f(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=n(t)),!t)return new f;if(t instanceof f)return t;t=t.rgb();var e=t.r/255,i=t.g/255,a=t.b/255,o=Math.min(e,i,a),s=Math.max(e,i,a),l=NaN,u=s-o,c=(s+o)/2;return u?(l=e===s?(i-a)/u+6*(i0&&c<1?0:l,new f(l,u,c,t.opacity)}function h(t,e,r,n){return 1===arguments.length?c(t):new f(t,e,r,null==n?1:n)}function f(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function d(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function p(t){if(t instanceof g)return new g(t.l,t.a,t.b,t.opacity);if(t instanceof M){var e=t.h*B;return new g(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof l||(t=o(t));var r=x(t.r),n=x(t.g),i=x(t.b),a=v((.4124564*r+.3575761*n+.1804375*i)/V),s=v((.2126729*r+.7151522*n+.072175*i)/q);return new g(116*s-16,500*(a-s),200*(s-v((.0193339*r+.119192*n+.9503041*i)/H)),t.opacity)}function m(t,e,r,n){return 1===arguments.length?p(t):new g(t,e,r,null==n?1:n)}function g(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function v(t){return t>W?Math.pow(t,1/3):t/X+Y}function y(t){return t>G?t*t*t:X*(t-Y)}function b(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function x(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function _(t){if(t instanceof M)return new M(t.h,t.c,t.l,t.opacity);t instanceof g||(t=p(t));var e=Math.atan2(t.b,t.a)*U;return new M(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function w(t,e,r,n){return 1===arguments.length?_(t):new M(t,e,r,null==n?1:n)}function M(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function k(t){if(t instanceof T)return new T(t.h,t.s,t.l,t.opacity);t instanceof l||(t=o(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(rt*n+tt*e-et*r)/(rt+tt-et),a=n-i,s=($*(r-i)-K*a)/Q,u=Math.sqrt(s*s+a*a)/($*i*(1-i)),c=u?Math.atan2(s,a)*U-120:NaN;return new T(c<0?c+360:c,u,i,t.opacity)}function A(t,e,r,n){return 1===arguments.length?k(t):new T(t,e,r,null==n?1:n)}function T(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}var S=function(t,e,r){t.prototype=e.prototype=r,r.constructor=t},E="\\s*([+-]?\\d+)\\s*",L="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",C="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z=/^#([0-9a-f]{3})$/,D=/^#([0-9a-f]{6})$/,I=new RegExp("^rgb\\("+[E,E,E]+"\\)$"),P=new RegExp("^rgb\\("+[C,C,C]+"\\)$"),O=new RegExp("^rgba\\("+[E,E,E,L]+"\\)$"),R=new RegExp("^rgba\\("+[C,C,C,L]+"\\)$"),j=new RegExp("^hsl\\("+[L,C,C]+"\\)$"),F=new RegExp("^hsla\\("+[L,C,C,L]+"\\)$"),N={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};S(r,n,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),S(l,s,e(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new l(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new l(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),S(f,h,e(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new f(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new f(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new l(d(t>=240?t-240:t+120,i,n),d(t,i,n),d(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var B=Math.PI/180,U=180/Math.PI,V=.95047,q=1,H=1.08883,Y=4/29,G=6/29,X=3*G*G,W=G*G*G;S(g,m,e(r,{brighter:function(t){return new g(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new g(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return t=q*y(t),e=V*y(e),r=H*y(r),new l(b(3.2404542*e-1.5371385*t-.4985314*r),b(-.969266*e+1.8760108*t+.041556*r),b(.0556434*e-.2040259*t+1.0572252*r),this.opacity)}})),S(M,w,e(r,{brighter:function(t){return new M(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new M(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return p(this).rgb()}}));var Z=-.14861,J=1.78277,K=-.29227,Q=-.90649,$=1.97294,tt=$*Q,et=$*J,rt=J*K-Q*Z;S(T,A,e(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new T(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new T(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*B,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new l(255*(e+r*(Z*n+J*i)),255*(e+r*(K*n+Q*i)),255*(e+r*($*n)),this.opacity)}})),t.color=n,t.rgb=s,t.hsl=h,t.lab=m,t.hcl=w,t.cubehelix=A,Object.defineProperty(t,"__esModule",{value:!0})})},{}],109:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.d3=e.d3||{})}(this,function(t){"use strict";function e(){for(var t,e=0,n=arguments.length,i={};e=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}function i(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),a=0;af+s||np+s||ih.index){var l=f-a.x-a.vx,c=p-a.y-a.vy,v=l*l+c*c;vt.r&&(t.r=t[e].r)}function i(){if(s){var e,r,n=s.length;for(l=new Array(n),e=0;e1?(null==e?p.remove(t):p.set(t,s(e)),l):p.get(t)},find:function(e,r,n){var i,a,o,s,l,u=0,c=t.length;for(null==n?n=1/0:n*=n,u=0;u1?(y.on(t,e),l):y.on(t)}}},b=function(){function t(t){var r,l=a.length,h=e.quadtree(a,u,c).visitAfter(n);for(s=t,r=0;r=m)){(t.data!==o||t.next)&&(0===i&&(i=d(),c+=i*i),0===a&&(a=d(),c+=a*a),c180||r<-180?r-360*Math.round(r/360):r):S(isNaN(t)?e:t)}function o(t){return 1==(t=+t)?s:function(e,r){return r-e?i(e,r,t):S(isNaN(e)?r:e)}}function s(t,e){var r=e-t;return r?n(t,r):S(isNaN(t)?e:t)}function l(t){return function(r){var n,i,a=r.length,o=new Array(a),s=new Array(a),l=new Array(a);for(n=0;n180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:I(t,e)})):e&&r.push(i(r)+"rotate("+e+n)}function s(t,e,r,a){t!==e?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:I(t,e)}):e&&r.push(i(r)+"skewX("+e+n)}function l(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:I(t,r)},{i:s-2,x:I(e,n)})}else 1===r&&1===n||a.push(i(a)+"scale("+r+","+n+")")}return function(e,r){var n=[],i=[];return e=t(e),r=t(r),a(e.translateX,e.translateY,r.translateX,r.translateY,n,i),o(e.rotate,r.rotate,n,i),s(e.skewX,r.skewX,n,i),l(e.scaleX,e.scaleY,r.scaleX,r.scaleY,n,i),e=r=null,function(t){for(var e,r=-1,a=i.length;++r=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,l=ia&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:I(r,n)})),a=R.lastIndex;return a=(a=(m+v)/2))?m=a:v=a,(c=r>=(o=(g+y)/2))?g=o:y=o,i=d,!(d=d[h=c<<1|u]))return i[h]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&r===l)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(u=e>=(a=(m+v)/2))?m=a:v=a,(c=r>=(o=(g+y)/2))?g=o:y=o}while((h=c<<1|u)==(f=(l>=o)<<1|s>=a));return i[f]=d,i[h]=p,t}function r(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),u=1/0,c=1/0,h=-1/0,f=-1/0;for(n=0;nh&&(h=i),af&&(f=a));for(ht||t>i||n>e||e>a))return this;var o,s,l=i-r,u=this._root;switch(s=(e<(n+a)/2)<<1|t<(r+i)/2){case 0:do{o=new Array(4),o[s]=u,u=o}while(l*=2,i=r+l,a=n+l,t>i||e>a);break;case 1:do{o=new Array(4),o[s]=u,u=o}while(l*=2,r=i-l,a=n+l,r>t||e>a);break;case 2:do{o=new Array(4),o[s]=u,u=o}while(l*=2,i=r+l,n=a-l,t>i||n>e);break;case 3:do{o=new Array(4),o[s]=u,u=o}while(l*=2,r=i-l,n=a-l,r>t||n>e)}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},h=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},f=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},d=function(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i},p=function(t,e,r){var n,i,a,o,s,l,u,c=this._x0,h=this._y0,f=this._x1,p=this._y1,m=[],g=this._root;for(g&&m.push(new d(g,c,h,f,p)),null==r?r=1/0:(c=t-r,h=e-r,f=t+r,p=e+r,r*=r);l=m.pop();)if(!(!(g=l.node)||(i=l.x0)>f||(a=l.y0)>p||(o=l.x1)=y)<<1|t>=v)&&(l=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=l)}else{var b=t-+this._x.call(null,g.data),x=e-+this._y.call(null,g.data),_=b*b+x*x;if(_=(s=(p+g)/2))?p=s:g=s,(c=o>=(l=(m+v)/2))?m=l:v=l,e=d,!(d=d[h=c<<1|u]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(r=e,f=h)}for(;d.data!==t;)if(n=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,n?(i?n.next=i:delete n.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(r?r[f]=d:this._root=d),this):(this._root=i,this)},g=function(){return this._root},v=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},y=function(t){var e,r,n,i,a,o,s=[],l=this._root;for(l&&s.push(new d(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,n=e.x0,i=e.y0,a=e.x1,o=e.y1)&&l.length){var u=(n+a)/2,c=(i+o)/2;(r=l[3])&&s.push(new d(r,u,c,a,o)),(r=l[2])&&s.push(new d(r,n,c,u,o)),(r=l[1])&&s.push(new d(r,u,i,a,c)),(r=l[0])&&s.push(new d(r,n,i,u,c))}return this},b=function(t){var e,r=[],n=[];for(this._root&&r.push(new d(this._root,this._x0,this._y0,this._x1,this._y1));e=r.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,l=e.x1,u=e.y1,c=(o+l)/2,h=(s+u)/2;(a=i[0])&&r.push(new d(a,o,s,c,h)),(a=i[1])&&r.push(new d(a,c,s,l,h)),(a=i[2])&&r.push(new d(a,o,h,c,u)),(a=i[3])&&r.push(new d(a,c,h,l,u))}n.push(e)}for(;e=n.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},x=function(t){return arguments.length?(this._x=t,this):this._x},_=function(t){return arguments.length?(this._y=t,this):this._y},w=o.prototype=s.prototype;w.copy=function(){var t,e,r=new s(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=l(n),r;for(t=[{source:n,target:r._root=new Array(4)}];n=t.pop();)for(var i=0;i<4;++i)(e=n.source[i])&&(e.length?t.push({source:e,target:n.target[i]=new Array(4)}):n.target[i]=l(e));return r},w.add=u,w.addAll=r,w.cover=c,w.data=h,w.extent=f,w.find=p,w.remove=m,w.removeAll=n,w.root=g,w.size=v,w.visit=y,w.visitAfter=b,w.x=x,w.y=_,t.quadtree=o,Object.defineProperty(t,"__esModule",{value:!0})})},{}],113:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.d3=e.d3||{})}(this,function(t){"use strict";function e(){return v||(x(r),v=b.now()+y)}function r(){v=0}function n(){this._call=this._time=this._next=null}function i(t,e,r){var i=new n;return i.restart(t,e,r),i}function a(){e(),++f;for(var t,r=c;r;)(t=v-r._time)>=0&&r._call.call(null,t),r=r._next;--f}function o(){v=(g=b.now())+y,f=d=0;try{a()}finally{f=0,l(),v=0}}function s(){var t=b.now(),e=t-g;e>m&&(y-=e,g=t)}function l(){for(var t,e,r=c,n=1/0;r;)r._call?(n>r._time&&(n=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:c=e);h=t,u(n)}function u(t){if(!f){d&&(d=clearTimeout(d));var e=t-v;e>24?(t<1/0&&(d=setTimeout(o,e)),p&&(p=clearInterval(p))):(p||(g=v,p=setInterval(s,m)),f=1,x(o))}}var c,h,f=0,d=0,p=0,m=1e3,g=0,v=0,y=0,b="object"==typeof performance&&performance.now?performance:Date,x="function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){setTimeout(t,17)};n.prototype=i.prototype={constructor:n,restart:function(t,r,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?e():+n)+(null==r?0:+r),this._next||h===this||(h?h._next=this:c=this,h=this),this._call=t,this._time=n,u()},stop:function(){this._call&&(this._call=null,this._time=1/0,u())}};var _=function(t,e,r){var i=new n;return e=null==e?0:+e,i.restart(function(r){i.stop(),t(r+e)},e,r),i},w=function(t,r,i){var a=new n,o=r;return null==r?(a.restart(t,r,i),a):(r=+r,i=null==i?e():+i,a.restart(function e(n){n+=o,a.restart(e,o+=r,i),t(n)},r,i),a)};t.now=e,t.timer=i,t.timerFlush=a,t.timeout=_,t.interval=w,Object.defineProperty(t,"__esModule",{value:!0})})},{}],114:[function(e,r,n){!function(){function e(t){return t&&(t.ownerDocument||t.document||t).documentElement}function n(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function i(t,e){return te?1:t>=e?0:NaN}function a(t){return null===t?NaN:+t}function o(t){return!isNaN(t)}function s(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}function l(t){return t.length}function u(t){for(var e=1;t*e%1;)e*=10;return e}function c(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function h(){this._=Object.create(null)}function f(t){return(t+="")===_o||t[0]===wo?wo+t:t}function d(t){return(t+="")[0]===wo?t.slice(1):t}function p(t){return f(t)in this._}function m(t){return(t=f(t))in this._&&delete this._[t]}function g(){var t=[];for(var e in this._)t.push(d(e));return t}function v(){var t=0;for(var e in this._)++t;return t}function y(){for(var t in this._)return!1;return!0}function b(){this._=Object.create(null)}function x(t){return t}function _(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function w(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=Mo.length;r=e&&(e=i+1);!(o=s[e])&&++e0&&(t=t.slice(0,s));var u=Io.get(t);return u&&(t=u,l=J),s?e?i:n:e?M:a}function Z(t,e){return function(r){var n=uo.event;uo.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{uo.event=n}}}function J(t,e){var r=Z(t,e);return function(t){var e=this,n=t.relatedTarget;n&&(n===e||8&n.compareDocumentPosition(e))||r.call(e,t)}}function K(t){var r=".dragsuppress-"+ ++Oo,i="click"+r,a=uo.select(n(t)).on("touchmove"+r,T).on("dragstart"+r,T).on("selectstart"+r,T);if(null==Po&&(Po=!("onselectstart"in t)&&w(t.style,"userSelect")),Po){var o=e(t).style,s=o[Po];o[Po]="none"}return function(t){if(a.on(r,null),Po&&(o[Po]=s),t){var e=function(){a.on(i,null)};a.on(i,function(){T(),e()},!0),setTimeout(e,0)}}}function Q(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(Ro<0){var a=n(t);if(a.scrollX||a.scrollY){r=uo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Ro=!(o.f||o.e),r.remove()}}return Ro?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function $(){return uo.event.changedTouches[0].identifier}function tt(t){return t>0?1:t<0?-1:0}function et(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function rt(t){return t>1?0:t<-1?No:Math.acos(t)}function nt(t){return t>1?Vo:t<-1?-Vo:Math.asin(t)}function it(t){return((t=Math.exp(t))-1/t)/2}function at(t){return((t=Math.exp(t))+1/t)/2}function ot(t){return((t=Math.exp(2*t))-1)/(t+1)}function st(t){return(t=Math.sin(t/2))*t}function lt(){}function ut(t,e,r){return this instanceof ut?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof ut?new ut(t.h,t.s,t.l):Mt(""+t,kt,ut):new ut(t,e,r)}function ct(t,e,r){function n(t){return t>360?t-=360:t<0&&(t+=360),t<60?a+(o-a)*t/60:t<180?o:t<240?a+(o-a)*(240-t)/60:a}function i(t){return Math.round(255*n(t))}var a,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,r=r<0?0:r>1?1:r,o=r<=.5?r*(1+e):r+e-r*e,a=2*r-o,new bt(i(t+120),i(t),i(t-120))}function ht(t,e,r){return this instanceof ht?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof ht?new ht(t.h,t.c,t.l):t instanceof dt?mt(t.l,t.a,t.b):mt((t=At((t=uo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ht(t,e,r)}function ft(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new dt(r,Math.cos(t*=qo)*e,Math.sin(t)*e)}function dt(t,e,r){return this instanceof dt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof dt?new dt(t.l,t.a,t.b):t instanceof ht?ft(t.h,t.c,t.l):At((t=bt(t)).r,t.g,t.b):new dt(t,e,r)}function pt(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return i=gt(i)*Qo,n=gt(n)*$o,a=gt(a)*ts,new bt(yt(3.2404542*i-1.5371385*n-.4985314*a),yt(-.969266*i+1.8760108*n+.041556*a),yt(.0556434*i-.2040259*n+1.0572252*a))}function mt(t,e,r){return t>0?new ht(Math.atan2(r,e)*Ho,Math.sqrt(e*e+r*r),t):new ht(NaN,NaN,t)}function gt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function vt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function yt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function bt(t,e,r){return this instanceof bt?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof bt?new bt(t.r,t.g,t.b):Mt(""+t,bt,ct):new bt(t,e,r)}function xt(t){return new bt(t>>16,t>>8&255,255&t)}function _t(t){return xt(t)+""}function wt(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function Mt(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(St(i[0]),St(i[1]),St(i[2]))}return(a=ns.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function kt(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e0&&l<1?0:n),new ut(n,i,l)}function At(t,e,r){t=Tt(t),e=Tt(e),r=Tt(r);var n=vt((.4124564*t+.3575761*e+.1804375*r)/Qo),i=vt((.2126729*t+.7151522*e+.072175*r)/$o);return dt(116*i-16,500*(n-i),200*(i-vt((.0193339*t+.119192*e+.9503041*r)/ts)))}function Tt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function St(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Et(t){return"function"==typeof t?t:function(){return t}}function Lt(t){return function(e,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),Ct(e,r,t,n)}}function Ct(t,e,r,n){function i(){var t,e=l.status;if(!e&&Dt(l)||e>=200&&e<300||304===e){try{t=r.call(a,l)}catch(t){return void o.error.call(a,t)}o.load.call(a,t)}else o.error.call(a,l)}var a={},o=uo.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(t){var e=uo.event;uo.event=t;try{o.progress.call(a,l)}finally{uo.event=e}},a.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==e?delete s[t]:s[t]=e+"",a)},a.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",a):e},a.responseType=function(t){return arguments.length?(u=t,a):u},a.response=function(t){return r=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(ho(arguments)))}}),a.send=function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),l.open(r,t,!0),null==e||"accept"in s||(s.accept=e+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=u&&(l.responseType=u),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),o.beforesend.call(a,l),l.send(null==n?null:n),a},a.abort=function(){return l.abort(),a},uo.rebind(a,o,"on"),null==n?a:a.get(zt(n))}function zt(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}function Dt(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function It(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i=r+e,a={c:t,t:i,n:null};return as?as.n=a:is=a,as=a,os||(ss=clearTimeout(ss),os=1,ls(Pt)),a}function Pt(){var t=Ot(),e=Rt()-t;e>24?(isFinite(e)&&(clearTimeout(ss),ss=setTimeout(Pt,e)),os=0):(os=1,ls(Pt))}function Ot(){for(var t=Date.now(),e=is;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Rt(){for(var t,e=is,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}}function Nt(t){var e=t.decimal,r=t.thousands,n=t.grouping,i=t.currency,a=n&&r?function(t,e){for(var i=t.length,a=[],o=0,s=n[0],l=0;i>0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>e));)s=n[o=(o+1)%n.length];return a.reverse().join(r)}:x;return function(t){ +var r=cs.exec(t),n=r[1]||" ",o=r[2]||">",s=r[3]||"-",l=r[4]||"",u=r[5],c=+r[6],h=r[7],f=r[8],d=r[9],p=1,m="",g="",v=!1,y=!0;switch(f&&(f=+f.substring(1)),(u||"0"===n&&"="===o)&&(u=n="0",o="="),d){case"n":h=!0,d="g";break;case"%":p=100,g="%",d="f";break;case"p":p=100,g="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(m="0"+d.toLowerCase());case"c":y=!1;case"d":v=!0,f=0;break;case"s":p=-1,d="r"}"$"===l&&(m=i[0],g=i[1]),"r"!=d||f||(d="g"),null!=f&&("g"==d?f=Math.max(1,Math.min(21,f)):"e"!=d&&"f"!=d||(f=Math.max(0,Math.min(20,f)))),d=hs.get(d)||Bt;var b=u&&h;return function(t){var r=g;if(v&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===s?"":s;if(p<0){var l=uo.formatPrefix(t,f);t=l.scale(t),r=l.symbol+g}else t*=p;t=d(t,f);var x,_,w=t.lastIndexOf(".");if(w<0){var M=y?t.lastIndexOf("e"):-1;M<0?(x=t,_=""):(x=t.substring(0,M),_=t.substring(M))}else x=t.substring(0,w),_=e+t.substring(w+1);!u&&h&&(x=a(x,1/0));var k=m.length+x.length+_.length+(b?0:i.length),A=k"===o?A+i+t:"^"===o?A.substring(0,k>>=1)+i+t+A.substring(k):i+(b?t:A+t))+r}}}function Bt(t){return t+""}function Ut(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Vt(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r1)for(;o=u)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=L[o in ms?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}function n(t,e,r){w.lastIndex=0;var n=w.exec(e.slice(r));return n?(t.w=M.get(n[0].toLowerCase()),r+n[0].length):-1}function i(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.w=_.get(n[0].toLowerCase()),r+n[0].length):-1}function a(t,e,r){T.lastIndex=0;var n=T.exec(e.slice(r));return n?(t.m=S.get(n[0].toLowerCase()),r+n[0].length):-1}function o(t,e,r){k.lastIndex=0;var n=k.exec(e.slice(r));return n?(t.m=A.get(n[0].toLowerCase()),r+n[0].length):-1}function s(t,e,n){return r(t,E.c.toString(),e,n)}function l(t,e,n){return r(t,E.x.toString(),e,n)}function u(t,e,n){return r(t,E.X.toString(),e,n)}function c(t,e,r){var n=b.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)}var h=t.dateTime,f=t.date,d=t.time,p=t.periods,m=t.days,g=t.shortDays,v=t.months,y=t.shortMonths;e.utc=function(t){function r(t){try{ds=Ut;var e=new ds;return e._=t,n(e)}finally{ds=Date}}var n=e(t);return r.parse=function(t){try{ds=Ut;var e=n.parse(t);return e&&e._}finally{ds=Date}},r.toString=n.toString,r},e.multi=e.utc.multi=ce;var b=uo.map(),x=Gt(m),_=Xt(m),w=Gt(g),M=Xt(g),k=Gt(v),A=Xt(v),T=Gt(y),S=Xt(y);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var E={a:function(t){return g[t.getDay()]},A:function(t){return m[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return v[t.getMonth()]},c:e(h),d:function(t,e){return Yt(t.getDate(),e,2)},e:function(t,e){return Yt(t.getDate(),e,2)},H:function(t,e){return Yt(t.getHours(),e,2)},I:function(t,e){return Yt(t.getHours()%12||12,e,2)},j:function(t,e){return Yt(1+fs.dayOfYear(t),e,3)},L:function(t,e){return Yt(t.getMilliseconds(),e,3)},m:function(t,e){return Yt(t.getMonth()+1,e,2)},M:function(t,e){return Yt(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Yt(t.getSeconds(),e,2)},U:function(t,e){return Yt(fs.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Yt(fs.mondayOfYear(t),e,2)},x:e(f),X:e(d),y:function(t,e){return Yt(t.getFullYear()%100,e,2)},Y:function(t,e){return Yt(t.getFullYear()%1e4,e,4)},Z:le,"%":function(){return"%"}},L={a:n,A:i,b:a,B:o,c:s,d:re,e:re,H:ie,I:ie,j:ne,L:se,m:ee,M:ae,p:c,S:oe,U:Zt,w:Wt,W:Jt,x:l,X:u,y:Qt,Y:Kt,Z:$t,"%":ue};return e}function Yt(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a68?1900:2e3)}function ee(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function re(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function ne(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function ie(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function ae(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function oe(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function se(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function le(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=xo(e)/60|0,i=xo(e)%60;return r+Yt(n,"0",2)+Yt(i,"0",2)}function ue(t,e,r){vs.lastIndex=0;var n=vs.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function ce(t){for(var e=t.length,r=-1;++r=0?1:-1,s=o*r,l=Math.cos(e),u=Math.sin(e),c=a*u,h=i*l+c*Math.cos(s),f=c*o*Math.sin(s);Ms.add(Math.atan2(f,h)),n=t,i=l,a=u}var e,r,n,i,a;ks.point=function(o,s){ks.point=t,n=(e=o)*qo,i=Math.cos(s=(r=s)*qo/2+No/4),a=Math.sin(s)},ks.lineEnd=function(){t(e,r)}}function ve(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function ye(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function be(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function xe(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _e(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function we(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Me(t){return[Math.atan2(t[1],t[0]),nt(t[2])]}function ke(t,e){return xo(t[0]-e[0])=0;--s)i.point((h=c[s])[0],h[1])}else n(d.x,d.p.x,-1,i);d=d.p}d=d.o,c=d.z,p=!p}while(!d.v);i.lineEnd()}}}function Ie(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n0){for(_||(a.polygonStart(),_=!0),a.lineStart();++o1&&2&e&&r.push(r.pop().concat(r.shift())),d.push(r.filter(Re))}var d,p,m,g=e(a),v=i.invert(n[0],n[1]),y={point:o,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=h,y.lineEnd=f,d=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=l,y.lineEnd=u,d=uo.merge(d);var t=Ve(v,p);d.length?(_||(a.polygonStart(),_=!0),De(d,Fe,t,r,a)):t&&(_||(a.polygonStart(),_=!0),a.lineStart(),r(null,null,1,a),a.lineEnd()),_&&(a.polygonEnd(),_=!1),d=p=null},sphere:function(){a.polygonStart(),a.lineStart(),r(null,null,1,a),a.lineEnd(),a.polygonEnd()}},b=je(),x=e(b),_=!1;return y}}function Re(t){return t.length>1}function je(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:M,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Fe(t,e){return((t=t.x)[0]<0?t[1]-Vo-jo:Vo-t[1])-((e=e.x)[0]<0?e[1]-Vo-jo:Vo-e[1])}function Ne(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?No:-No,l=xo(a-r);xo(l-No)0?Vo:-Vo),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=No&&(xo(r-i)jo?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}function Ue(t,e,r,n){var i;if(null==t)i=r*Vo,n.point(-No,i),n.point(0,i),n.point(No,i),n.point(No,0),n.point(No,-i),n.point(0,-i),n.point(-No,-i),n.point(-No,0),n.point(-No,i);else if(xo(t[0]-e[0])>jo){var a=t[0]=0?1:-1,M=w*_,k=M>No,A=p*b;if(Ms.add(Math.atan2(A*w*Math.sin(M),m*x+A*Math.cos(M))),a+=k?_+w*Bo:_,k^f>=r^v>=r){var T=be(ve(h),ve(t));we(T);var S=be(i,T);we(S);var E=(k^_>=0?-1:1)*nt(S[2]);(n>E||n===E&&(T[0]||T[1]))&&(o+=k^_>=0?1:-1)}if(!g++)break;f=v,p=b,m=x,h=t}}return(a<-jo||aa}function r(t){var r,a,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(h,f){var d,p=[h,f],m=e(h,f),g=o?m?0:i(h,f):m?i(h+(h<0?No:-No),f):0;if(!r&&(u=l=m)&&t.lineStart(),m!==l&&(d=n(r,p),(ke(r,d)||ke(p,d))&&(p[0]+=jo,p[1]+=jo,m=e(p[0],p[1]))),m!==l)c=0,m?(t.lineStart(),d=n(p,r),t.point(d[0],d[1])):(d=n(r,p),t.point(d[0],d[1]),t.lineEnd()),r=d;else if(s&&r&&o^m){var v;g&a||!(v=n(p,r,!0))||(c=0,o?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||r&&ke(r,p)||t.point(p[0],p[1]),r=p,l=m,a=g},lineEnd:function(){l&&t.lineEnd(),r=null},clean:function(){return c|(u&&l)<<1}}}function n(t,e,r){var n=ve(t),i=ve(e),o=[1,0,0],s=be(n,i),l=ye(s,s),u=s[0],c=l-u*u;if(!c)return!r&&t;var h=a*l/c,f=-a*u/c,d=be(o,s),p=_e(o,h);xe(p,_e(s,f));var m=d,g=ye(p,m),v=ye(m,m),y=g*g-v*(ye(p,p)-1);if(!(y<0)){var b=Math.sqrt(y),x=_e(m,(-g-b)/v);if(xe(x,p),x=Me(x),!r)return x;var _,w=t[0],M=e[0],k=t[1],A=e[1];M0^x[1]<(xo(x[0]-w)No^(w<=x[0]&&x[0]<=M)){var L=_e(m,(-g+b)/v);return xe(L,p),[x,Me(L)]}}}function i(e,r){var n=o?t:No-t,i=0;return e<-n?i|=1:e>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}var a=Math.cos(t),o=a>0,s=xo(a)>jo;return Oe(e,r,gr(t,6*qo),o?[0,-t]:[-No,t-No])}function He(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,u=o.y,c=s.x,h=s.y,f=0,d=1,p=c-l,m=h-u;if(a=t-l,p||!(a>0)){if(a/=p,p<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>d)return;a>f&&(f=a)}else if(p>0){if(a0)){if(a/=m,m<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=n-u,m||!(a<0)){if(a/=m,m<0){if(a>d)return;a>f&&(f=a)}else if(m>0){if(a0&&(i.a={x:l+f*p,y:u+f*m}),d<1&&(i.b={x:l+d*p,y:u+d*m}),i}}}}}}function Ye(t,e,r,n){function i(n,i){return xo(n[0]-t)0?0:3:xo(n[0]-r)0?2:1:xo(n[1]-e)0?1:0:i>0?3:2}function a(t,e){return o(t.x,e.x)}function o(t,e){var r=i(t,1),n=i(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(s){function l(t){for(var e=0,r=g.length,n=t[1],i=0;in&&et(u,a,t)>0&&++e:a[1]<=n&&et(u,a,t)<0&&--e,u=a;return 0!==e}function u(a,s,l,u){var c=0,h=0;if(null==a||(c=i(a,l))!==(h=i(s,l))||o(a,s)<0^l>0)do{u.point(0===c||3===c?t:r,c>1?n:e)}while((c=(c+l+4)%4)!==h);else u.point(s[0],s[1])}function c(i,a){return t<=i&&i<=r&&e<=a&&a<=n}function h(t,e){c(t,e)&&s.point(t,e)}function f(){L.point=p,g&&g.push(v=[]),k=!0,M=!1,_=w=NaN}function d(){m&&(p(y,b),x&&M&&S.rejoin(),m.push(S.buffer())),L.point=h,M&&s.lineEnd()}function p(t,e){t=Math.max(-Fs,Math.min(Fs,t)),e=Math.max(-Fs,Math.min(Fs,e));var r=c(t,e);if(g&&v.push([t,e]),k)y=t,b=e,x=r,k=!1,r&&(s.lineStart(),s.point(t,e));else if(r&&M)s.point(t,e);else{var n={a:{x:_,y:w},b:{x:t,y:e}};E(n)?(M||(s.lineStart(),s.point(n.a.x,n.a.y)),s.point(n.b.x,n.b.y),r||s.lineEnd(),A=!1):r&&(s.lineStart(),s.point(t,e),A=!1)}_=t,w=e,M=r}var m,g,v,y,b,x,_,w,M,k,A,T=s,S=je(),E=He(t,e,r,n),L={point:h,lineStart:f,lineEnd:d,polygonStart:function(){s=S,m=[],g=[],A=!0},polygonEnd:function(){s=T,m=uo.merge(m);var e=l([t,n]),r=A&&e,i=m.length;(r||i)&&(s.polygonStart(),r&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),i&&De(m,a,e,u,s),s.polygonEnd()),m=g=v=null}};return L}}function Ge(t){var e=0,r=No/3,n=lr(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*No/180,r=t[1]*No/180):[e/No*180,r/No*180]},i}function Xe(t,e){function r(t,e){var r=Math.sqrt(a-2*i*Math.sin(e))/i;return[r*Math.sin(t*=i),o-r*Math.cos(t)]}var n=Math.sin(t),i=(n+Math.sin(e))/2,a=1+n*(2*i-n),o=Math.sqrt(a)/i;return r.invert=function(t,e){var r=o-e;return[Math.atan2(t,r)/i,nt((a-(t*t+r*r)*i*i)/(2*i))]},r}function We(){function t(t,e){Bs+=i*t-n*e,n=t,i=e}var e,r,n,i;Ys.point=function(a,o){Ys.point=t,e=n=a,r=i=o},Ys.lineEnd=function(){t(e,r)}}function Ze(t,e){tqs&&(qs=t),eHs&&(Hs=e)}function Je(){function t(t,e){o.push("M",t,",",e,a)}function e(t,e){o.push("M",t,",",e),s.point=r}function r(t,e){o.push("L",t,",",e)}function n(){s.point=t}function i(){o.push("Z")}var a=Ke(4.5),o=[],s={point:t,lineStart:function(){s.point=e},lineEnd:n,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=n,s.point=t},pointRadius:function(t){return a=Ke(t),s},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return s}function Ke(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Qe(t,e){Ss+=t,Es+=e,++Ls}function $e(){function t(t,n){var i=t-e,a=n-r,o=Math.sqrt(i*i+a*a);Cs+=o*(e+t)/2,zs+=o*(r+n)/2,Ds+=o,Qe(e=t,r=n)}var e,r;Xs.point=function(n,i){Xs.point=t,Qe(e=n,r=i)}}function tr(){Xs.point=Qe}function er(){function t(t,e){var r=t-n,a=e-i,o=Math.sqrt(r*r+a*a);Cs+=o*(n+t)/2,zs+=o*(i+e)/2,Ds+=o,o=i*t-n*e,Is+=o*(n+t),Ps+=o*(i+e),Os+=3*o,Qe(n=t,i=e)}var e,r,n,i;Xs.point=function(a,o){Xs.point=t,Qe(e=n=a,r=i=o)},Xs.lineEnd=function(){t(e,r)}}function rr(t){function e(e,r){t.moveTo(e+o,r),t.arc(e,r,o,0,Bo)}function r(e,r){t.moveTo(e,r),s.point=n}function n(e,r){t.lineTo(e,r)}function i(){s.point=e}function a(){t.closePath()}var o=4.5,s={point:e,lineStart:function(){s.point=r},lineEnd:i,polygonStart:function(){s.lineEnd=a},polygonEnd:function(){s.lineEnd=i,s.point=e},pointRadius:function(t){return o=t,s},result:M};return s}function nr(t){function e(t){return(s?n:r)(t)}function r(e){return or(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})}function n(e){function r(r,n){r=t(r,n),e.point(r[0],r[1])}function n(){b=NaN,k.point=a,e.lineStart()}function a(r,n){var a=ve([r,n]),o=t(r,n);i(b,x,y,_,w,M,b=o[0],x=o[1],y=r,_=a[0],w=a[1],M=a[2],s,e),e.point(b,x)}function o(){k.point=r,e.lineEnd()}function l(){n(),k.point=u,k.lineEnd=c}function u(t,e){a(h=t,f=e),d=b,p=x,m=_,g=w,v=M,k.point=a}function c(){i(b,x,y,_,w,M,d,p,h,m,g,v,s,e),k.lineEnd=o,o()}var h,f,d,p,m,g,v,y,b,x,_,w,M,k={point:r,lineStart:n,lineEnd:o,polygonStart:function(){e.polygonStart(),k.lineStart=l},polygonEnd:function(){e.polygonEnd(),k.lineStart=n}};return k}function i(e,r,n,s,l,u,c,h,f,d,p,m,g,v){var y=c-e,b=h-r,x=y*y+b*b;if(x>4*a&&g--){var _=s+d,w=l+p,M=u+m,k=Math.sqrt(_*_+w*w+M*M),A=Math.asin(M/=k),T=xo(xo(M)-1)a||xo((y*C+b*z)/x-.5)>.3||s*d+l*p+u*m0&&16,e):Math.sqrt(a)},e}function ir(t){var e=nr(function(e,r){return t([e*Ho,r*Ho])});return function(t){return ur(e(t))}}function ar(t){this.stream=t}function or(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function sr(t){return lr(function(){return t})()}function lr(t){function e(t){return t=s(t[0]*qo,t[1]*qo),[t[0]*f+l,u-t[1]*f]}function r(t){return(t=s.invert((t[0]-l)/f,(u-t[1])/f))&&[t[0]*Ho,t[1]*Ho]}function n(){s=Ce(o=fr(v,y,b),a);var t=a(m,g);return l=d-t[0]*f,u=p+t[1]*f,i()}function i(){return c&&(c.valid=!1,c=null),e}var a,o,s,l,u,c,h=nr(function(t,e){return t=a(t,e),[t[0]*f+l,u-t[1]*f]}),f=150,d=480,p=250,m=0,g=0,v=0,y=0,b=0,_=js,w=x,M=null,k=null;return e.stream=function(t){return c&&(c.valid=!1),c=ur(_(o,h(w(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(_=null==t?(M=t,js):qe((M=+t)*qo),i()):M},e.clipExtent=function(t){return arguments.length?(k=t,w=t?Ye(t[0][0],t[0][1],t[1][0],t[1][1]):x,i()):k},e.scale=function(t){return arguments.length?(f=+t,n()):f},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],n()):[d,p]},e.center=function(t){return arguments.length?(m=t[0]%360*qo,g=t[1]%360*qo,n()):[m*Ho,g*Ho]},e.rotate=function(t){return arguments.length?(v=t[0]%360*qo,y=t[1]%360*qo,b=t.length>2?t[2]%360*qo:0,n()):[v*Ho,y*Ho,b*Ho]},uo.rebind(e,h,"precision"),function(){return a=t.apply(this,arguments),e.invert=a.invert&&r,n()}}function ur(t){return or(t,function(e,r){t.point(e*qo,r*qo)})}function cr(t,e){return[t,e]}function hr(t,e){return[t>No?t-Bo:t<-No?t+Bo:t,e]}function fr(t,e,r){return t?e||r?Ce(pr(t),mr(e,r)):pr(t):e||r?mr(e,r):hr}function dr(t){return function(e,r){return e+=t,[e>No?e-Bo:e<-No?e+Bo:e,r]}}function pr(t){var e=dr(t);return e.invert=dr(-t),e}function mr(t,e){function r(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,u=Math.sin(e),c=u*n+s*i;return[Math.atan2(l*a-c*o,s*n-u*i),nt(c*a+l*o)]}var n=Math.cos(t),i=Math.sin(t),a=Math.cos(e),o=Math.sin(e);return r.invert=function(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,u=Math.sin(e),c=u*a-l*o;return[Math.atan2(l*a+u*o,s*n+c*i),nt(c*n-s*i)]},r}function gr(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=vr(r,i),a=vr(r,a),(o>0?ia)&&(i+=o*Bo)):(i=t+o*Bo,a=t-.5*l);for(var u,c=i;o>0?c>a:c0?e<-Vo+jo&&(e=-Vo+jo):e>Vo-jo&&(e=Vo-jo);var r=o/Math.pow(i(e),a);return[r*Math.sin(a*t),o-r*Math.cos(a*t)]}var n=Math.cos(t),i=function(t){return Math.tan(No/4+t/2)},a=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(i(e)/i(t)),o=n*Math.pow(i(t),a)/a;return a?(r.invert=function(t,e){var r=o-e,n=tt(a)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/a,2*Math.atan(Math.pow(o/n,1/a))-Vo]},r):Sr}function Tr(t,e){function r(t,e){var r=a-e;return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}var n=Math.cos(t),i=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),a=n/i+t;return xo(i)1&&et(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function Ir(t,e){return t[0]-e[0]||t[1]-e[1]}function Pr(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function Or(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],u=r[1],c=e[1]-l,h=n[1]-u,f=(s*(l-u)-h*(i-a))/(h*o-s*c);return[i+f*o,l+f*c]}function Rr(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}function jr(){an(this),this.edge=this.site=this.circle=null}function Fr(t){var e=sl.pop()||new jr;return e.site=t,e}function Nr(t){Zr(t),il.remove(t),sl.push(t),an(t)}function Br(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];Nr(t);for(var l=a;l.circle&&xo(r-l.circle.x)jo)s=s.L;else{if(!((i=a-qr(s,o))>jo)){n>-jo?(e=s.P,r=s):i>-jo?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=Fr(t);if(il.insert(e,l),e||r){if(e===r)return Zr(e),r=Fr(e.site),il.insert(l,r),l.edge=r.edge=$r(e.site,l.site),Wr(e),void Wr(r);if(!r)return void(l.edge=$r(e.site,l.site));Zr(e),Zr(r);var u=e.site,c=u.x,h=u.y,f=t.x-c,d=t.y-h,p=r.site,m=p.x-c,g=p.y-h,v=2*(f*g-d*m),y=f*f+d*d,b=m*m+g*g,x={x:(g*y-d*b)/v+c,y:(f*b-m*y)/v+h};en(r.edge,u,p,x),l.edge=$r(u,t,null,x),r.edge=$r(t,p,null,x),Wr(e),Wr(r)}}function Vr(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;r=o.site;var s=r.x,l=r.y,u=l-e;if(!u)return s;var c=s-n,h=1/a-1/u,f=c/u;return h?(-f+Math.sqrt(f*f-2*h*(c*c/(-2*u)-l+u/2+i-a/2)))/h+n:(n+s)/2}function qr(t,e){var r=t.N;if(r)return Vr(r,e);var n=t.site;return n.y===e?n.x:1/0}function Hr(t){this.site=t,this.edges=[]}function Yr(t){for(var e,r,n,i,a,o,s,l,u,c,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],m=nl,g=m.length;g--;)if((a=m[g])&&a.prepare())for(s=a.edges,l=s.length,o=0;ojo||xo(i-r)>jo)&&(s.splice(o,0,new rn(tn(a.site,c,xo(n-h)jo?{x:h,y:xo(e-h)jo?{x:xo(r-p)jo?{x:f,y:xo(e-f)jo?{x:xo(r-d)=-Fo)){var d=l*l+u*u,p=c*c+h*h,m=(h*d-u*p)/f,g=(l*p-c*d)/f,h=g+s,v=ll.pop()||new Xr;v.arc=t,v.site=i,v.x=m+o,v.y=h+Math.sqrt(m*m+g*g),v.cy=h,t.circle=v;for(var y=null,b=ol._;b;)if(v.y=s)return;if(f>p){if(a){if(a.y>=u)return}else a={x:g,y:l};r={x:g,y:u}}else{if(a){if(a.y1)if(f>p){if(a){if(a.y>=u)return}else a={x:(l-i)/n,y:l};r={x:(u-i)/n,y:u}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.xa||h>o||f=x,M=r>=_,k=M<<1|w,A=k+4;ka&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o, +x:bn(r,n)})),a=hl.lastIndex;return a=0&&!(r=uo.interpolators[n](t,e)););return r}function wn(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1?1:t(e)}}function kn(t){return function(e){return 1-t(1-e)}}function An(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Tn(t){return t*t}function Sn(t){return t*t*t}function En(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Ln(t){return function(e){return Math.pow(e,t)}}function Cn(t){return 1-Math.cos(t*Vo)}function zn(t){return Math.pow(2,10*(t-1))}function Dn(t){return 1-Math.sqrt(1-t*t)}function In(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/Bo*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Bo/e)}}function Pn(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function On(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Rn(t,e){t=uo.hcl(t),e=uo.hcl(e);var r=t.h,n=t.c,i=t.l,a=e.h-r,o=e.c-n,s=e.l-i;return isNaN(o)&&(o=0,n=isNaN(n)?e.c:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return ft(r+a*t,n+o*t,i+s*t)+""}}function jn(t,e){t=uo.hsl(t),e=uo.hsl(e);var r=t.h,n=t.s,i=t.l,a=e.h-r,o=e.s-n,s=e.l-i;return isNaN(o)&&(o=0,n=isNaN(n)?e.s:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return ct(r+a*t,n+o*t,i+s*t)+""}}function Fn(t,e){t=uo.lab(t),e=uo.lab(e);var r=t.l,n=t.a,i=t.b,a=e.l-r,o=e.a-n,s=e.b-i;return function(t){return pt(r+a*t,n+o*t,i+s*t)+""}}function Nn(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Bn(t){var e=[t.a,t.b],r=[t.c,t.d],n=Vn(e),i=Un(e,r),a=Vn(qn(r,e,-i))||0;e[0]*r[1]180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Hn(r)+"rotate(",null,")")-2,x:bn(t,e)})):e&&r.push(Hn(r)+"rotate("+e+")")}function Xn(t,e,r,n){t!==e?n.push({i:r.push(Hn(r)+"skewX(",null,")")-2,x:bn(t,e)}):e&&r.push(Hn(r)+"skewX("+e+")")}function Wn(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(Hn(r)+"scale(",null,",",null,")");n.push({i:i-4,x:bn(t[0],e[0])},{i:i-2,x:bn(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Hn(r)+"scale("+e+")")}function Zn(t,e){var r=[],n=[];return t=uo.transform(t),e=uo.transform(e),Yn(t.translate,e.translate,r,n),Gn(t.rotate,e.rotate,r,n),Xn(t.skew,e.skew,r,n),Wn(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,a=n.length;++i=0;)r.push(i[n])}function li(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++oi&&(n=r,i=e);return n}function bi(t){return t.reduce(xi,0)}function xi(t,e){return t+e[1]}function _i(t,e){return wi(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wi(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Mi(t){return[uo.min(t),uo.max(t)]}function ki(t,e){return t.value-e.value}function Ai(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Ti(t,e){t._pack_next=e,e._pack_prev=t}function Si(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Ei(t){function e(t){c=Math.min(t.x-t.r,c),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}if((r=t.children)&&(u=r.length)){var r,n,i,a,o,s,l,u,c=1/0,h=-1/0,f=1/0,d=-1/0;if(r.forEach(Li),n=r[0],n.x=-n.r,n.y=0,e(n),u>1&&(i=r[1],i.x=i.r,i.y=0,e(i),u>2))for(a=r[2],Di(n,i,a),e(a),Ai(n,a),n._pack_prev=a,Ai(a,i),i=n._pack_next,o=3;o=0;)e=i[a],e.z+=r,e.m+=r,r+=e.s+(n+=e.c)}function Fi(t,e,r){return t.a.parent===e.parent?t.a:r}function Ni(t){return 1+uo.max(t,function(t){return t.y})}function Bi(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Ui(t){var e=t.children;return e&&e.length?Ui(e[0]):t}function Vi(t){var e,r=t.children;return r&&(e=r.length)?Vi(r[e-1]):t}function qi(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Hi(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i<0&&(r+=i/2,i=0),a<0&&(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function Yi(t){var e=t[0],r=t[t.length-1];return e2?Ji:Xi,l=n?Kn:Jn;return o=i(t,e,l,r),s=i(e,t,l,_n),a}function a(t){return o(t)}var o,s;return a.invert=function(t){return s(t)},a.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},a.range=function(t){return arguments.length?(e=t,i()):e},a.rangeRound=function(t){return a.range(t).interpolate(Nn)},a.clamp=function(t){return arguments.length?(n=t,i()):n},a.interpolate=function(t){return arguments.length?(r=t,i()):r},a.ticks=function(e){return ea(t,e)},a.tickFormat=function(e,r){return ra(t,e,r)},a.nice=function(e){return $i(t,e),i()},a.copy=function(){return Ki(t,e,r,n)},i()}function Qi(t,e){return uo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function $i(t,e){return Wi(t,Zi(ta(t,e)[2])),Wi(t,Zi(ta(t,e)[2])),t}function ta(t,e){null==e&&(e=10);var r=Yi(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function ea(t,e){return uo.range.apply(uo,ta(t,e))}function ra(t,e,r){var n=ta(t,e);if(r){var i=cs.exec(r);if(i.shift(),"s"===i[8]){var a=uo.formatPrefix(Math.max(xo(n[0]),xo(n[1])));return i[7]||(i[7]="."+na(a.scale(n[2]))),i[8]="f",r=uo.format(i.join("")),function(t){return r(a.scale(t))+a.symbol}}i[7]||(i[7]="."+ia(i[8],n)),r=i.join("")}else r=",."+na(n[2])+"f";return uo.format(r)}function na(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ia(t,e){var r=na(e[2]);return t in Ml?Math.abs(r-na(Math.max(xo(e[0]),xo(e[1]))))+ +("e"!==t):r-2*("%"===t)}function aa(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),o):e},o.nice=function(){var e=Wi(n.map(i),r?Math:Al);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Yi(n),o=[],s=t[0],l=t[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),h=e%1?2:e;if(isFinite(c-u)){if(r){for(;u0;f--)o.push(a(u)*f);for(u=0;o[u]l;c--);o=o.slice(u,c)}return o},o.tickFormat=function(t,r){if(!arguments.length)return kl;arguments.length<2?r=kl:"function"!=typeof r&&(r=uo.format(r));var n=Math.max(1,e*t/o.ticks().length);return function(t){var o=t/a(Math.round(i(t)));return o*e0?s[r-1]:t[0],r0?0:1}function xa(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,u=-s*a,c=t[0]+l,h=t[1]+u,f=e[0]+l,d=e[1]+u,p=(c+f)/2,m=(h+d)/2,g=f-c,v=d-h,y=g*g+v*v,b=r-n,x=c*d-f*h,_=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),w=(x*v-g*_)/y,M=(-x*g-v*_)/y,k=(x*v+g*_)/y,A=(-x*g+v*_)/y,T=w-p,S=M-m,E=k-p,L=A-m;return T*T+S*S>E*E+L*L&&(w=k,M=A),[[w-l,M-u],[w*r/b,M*r/b]]}function _a(t){function e(e){function o(){u.push("M",a(t(c),s))}for(var l,u=[],c=[],h=-1,f=e.length,d=Et(r),p=Et(n);++h1?t.join("L"):t+"Z"}function Ma(t){return t.join("L")+"Z"}function ka(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1&&i.push("H",n[0]),i.join("")}function Aa(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var u=2;u9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}function Ua(t){return t.length<3?wa(t):t[0]+Ca(t,Ba(t))}function Va(t){for(var e,r,n,i=-1,a=t.length;++i0;)d[--s].call(t,o);if(a>=1)return m.event&&m.event.end.call(t,t.__data__,e),--p.count?delete p[n]:delete t[r],1}var l,u,c,f,d,p=t[r]||(t[r]={active:0,count:0}),m=p[n];m||(l=i.time,u=It(a,0,l),m=p[n]={tween:new h,time:l,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++p.count)}function ro(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate("+(isFinite(n)?n:r(t))+",0)"})}function no(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate(0,"+(isFinite(n)?n:r(t))+")"})}function io(t){return t.toISOString()}function ao(t,e,r){function n(e){return t(e)}function i(t,r){var n=t[1]-t[0],i=n/r,a=uo.bisect(Jl,i);return a==Jl.length?[e.year,ta(t.map(function(t){return t/31536e6}),r)[2]]:a?e[i/Jl[a-1]1?{floor:function(e){for(;r(e=t.floor(e));)e=oo(e-1);return e},ceil:function(e){for(;r(e=t.ceil(e));)e=oo(+e+1);return e}}:t))},n.ticks=function(t,e){var r=Yi(n.domain()),a=null==t?i(r,10):"number"==typeof t?i(r,t):!t.range&&[{range:t},e];return a&&(t=a[0],e=a[1]),t.range(r[0],oo(+r[1]+1),e<1?1:e)},n.tickFormat=function(){return r},n.copy=function(){return ao(t.copy(),e,r)},Qi(n,t)}function oo(t){return new Date(t)}function so(t){return JSON.parse(t.responseText)}function lo(t){var e=fo.createRange();return e.selectNode(fo.body),e.createContextualFragment(t.responseText)}var uo={version:"3.5.17"},co=[].slice,ho=function(t){return co.call(t)},fo=this.document;if(fo)try{ho(fo.documentElement.childNodes)[0].nodeType}catch(t){ho=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),fo)try{fo.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var po=this.Element.prototype,mo=po.setAttribute,go=po.setAttributeNS,vo=this.CSSStyleDeclaration.prototype,yo=vo.setProperty;po.setAttribute=function(t,e){mo.call(this,t,e+"")},po.setAttributeNS=function(t,e,r){go.call(this,t,e,r+"")},vo.setProperty=function(t,e,r){yo.call(this,t,e+"",r)}}uo.ascending=i,uo.descending=function(t,e){return et?1:e>=t?0:NaN},uo.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},uo.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},uo.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return l/(c-1)},uo.deviation=function(){var t=uo.variance.apply(this,arguments);return t?Math.sqrt(t):t};var bo=s(i);uo.bisectLeft=bo.left,uo.bisect=uo.bisectRight=bo.right,uo.bisector=function(t){return s(1===t.length?function(e,r){return i(t(e),r)}:t)},uo.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},uo.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},uo.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(n=t[i],e=n.length;--e>=0;)r[--o]=n[e];return r};var xo=Math.abs;uo.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,i=[],a=u(xo(r)),o=-1;if(t*=a,e*=a,r*=a,r<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)=a.length)return n?n.call(i,o):r?o.sort(r):o;for(var l,u,c,f,d=-1,p=o.length,m=a[s++],g=new h;++d=a.length)return t;var n=[],i=o[r++];return t.forEach(function(t,i){n.push({key:t,values:e(i,r)})}),i?n.sort(function(t,e){return i(t.key,e.key)}):n}var r,n,i={},a=[],o=[];return i.map=function(e,r){return t(r,e,0)},i.entries=function(r){return e(t(uo.map,r,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return r=t,i},i.rollup=function(t){return n=t,i},i},uo.set=function(t){var e=new b;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},uo.event=null,uo.requote=function(t){return t.replace(ko,"\\$&")};var ko=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ao={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]},To=function(t,e){return e.querySelector(t)},So=function(t,e){return e.querySelectorAll(t)},Eo=function(t,e){var r=t.matches||t[w(t,"matchesSelector")];return(Eo=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(To=function(t,e){return Sizzle(t,e)[0]||null},So=Sizzle,Eo=Sizzle.matchesSelector),uo.selection=function(){return uo.select(fo.documentElement)};var Lo=uo.selection.prototype=[];Lo.select=function(t){var e,r,n,i,a=[];t=C(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),zo.hasOwnProperty(r)?{space:zo[r],local:t}:t}},Lo.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return t=uo.ns.qualify(t),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(D(e,t[e]));return this}return this.each(D(t,e))},Lo.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=O(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},Lo.sort=function(t){t=H.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(e=e.transition().duration(L)),e.call(t.event)}function s(){_&&_.domain(x.range().map(function(t){return(t-k.x)/k.k}).map(x.invert)),M&&M.domain(w.range().map(function(t){return(t-k.y)/k.k}).map(w.invert))}function l(t){C++||t({type:"zoomstart"})}function u(t){s(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function c(t){--C||(t({type:"zoomend"}),g=null)}function h(){function t(){s=1,a(uo.mouse(i),f),u(o)}function r(){h.on(D,null).on(I,null),d(s),c(o)}var i=this,o=O.of(i,arguments),s=0,h=uo.select(n(i)).on(D,t).on(I,r),f=e(uo.mouse(i)),d=K(i);Bl.call(i),l(o)}function f(){function t(){var t=uo.touches(p);return d=k.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function r(){var e=uo.event.target;uo.select(e).on(x,n).on(_,s),w.push(e);for(var r=uo.event.changedTouches,i=0,a=r.length;i1){var c=l[0],h=l[1],f=c[0]-h[0],d=c[1]-h[1];v=f*f+d*d}}function n(){var t,e,r,n,o=uo.touches(p);Bl.call(p);for(var s=0,l=o.length;s=u)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,hs=uo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=uo.round(t,jt(t,e))).toFixed(Math.max(0,Math.min(20,jt(t*(1+1e-15),e))))}}),fs=uo.time={},ds=Date;Ut.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ps.setUTCDate.apply(this._,arguments)},setDay:function(){ps.setUTCDay.apply(this._,arguments)},setFullYear:function(){ps.setUTCFullYear.apply(this._,arguments)},setHours:function(){ps.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ps.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ps.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ps.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ps.setUTCSeconds.apply(this._,arguments)},setTime:function(){ps.setTime.apply(this._,arguments)}};var ps=Date.prototype;fs.year=Vt(function(t){return t=fs.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),fs.years=fs.year.range,fs.years.utc=fs.year.utc.range,fs.day=Vt(function(t){var e=new ds(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),fs.days=fs.day.range,fs.days.utc=fs.day.utc.range,fs.dayOfYear=function(t){var e=fs.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var r=fs[t]=Vt(function(t){return(t=fs.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=fs.year(t).getDay();return Math.floor((fs.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});fs[t+"s"]=r.range,fs[t+"s"].utc=r.utc.range,fs[t+"OfYear"]=function(t){var r=fs.year(t).getDay();return Math.floor((fs.dayOfYear(t)+(r+e)%7)/7)}}),fs.week=fs.sunday,fs.weeks=fs.sunday.range,fs.weeks.utc=fs.sunday.utc.range,fs.weekOfYear=fs.sundayOfYear;var ms={"-":"",_:" ",0:"0"},gs=/^\s*\d+/,vs=/^%/;uo.locale=function(t){return{numberFormat:Nt(t),timeFormat:Ht(t)}};var ys=uo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});uo.format=ys.numberFormat,uo.geo={},he.prototype={s:0,t:0,add:function(t){fe(t,this.t,bs),fe(bs.s,this.s,this),this.s?this.t+=bs.t:this.s=bs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bs=new he;uo.geo.stream=function(t,e){t&&xs.hasOwnProperty(t.type)?xs[t.type](t,e):de(t,e)};var xs={Feature:function(t,e){de(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++nd&&(d=e)}function e(e,r){var n=ve([e*qo,r*qo]);if(v){var i=be(v,n),a=[i[1],-i[0],0],o=be(a,i);we(o),o=Me(o);var l=e-p,u=l>0?1:-1,m=o[0]*Ho*u,g=xo(l)>180;if(g^(u*pd&&(d=y)}else if(m=(m+360)%360-180,g^(u*pd&&(d=r);g?es(c,f)&&(f=e):s(e,f)>s(c,f)&&(c=e):f>=c?(ef&&(f=e)):e>p?s(c,e)>s(c,f)&&(f=e):s(e,f)>s(c,f)&&(c=e)}else t(e,r);v=n,p=e}function r(){_.point=e}function n(){x[0]=c,x[1]=f,_.point=t,v=null}function i(t,r){if(v){var n=t-p;y+=xo(n)>180?n+(n>0?360:-360):n}else m=t,g=r;ks.point(t,r),e(t,r)}function a(){ks.lineStart()}function o(){i(m,g),ks.lineEnd(),xo(y)>jo&&(c=-(f=180)),x[0]=c,x[1]=f,v=null}function s(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function u(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tjo?d=90:y<-jo&&(h=-90),x[0]=c,x[1]=f}};return function(t){d=f=-(c=h=1/0),b=[],uo.geo.stream(t,_);var e=b.length;if(e){b.sort(l);for(var r,n=1,i=b[0],a=[i];ns(i[0],i[1])&&(i[1]=r[1]),s(r[0],i[1])>s(i[0],i[1])&&(i[0]=r[0])):a.push(i=r);for(var o,r,p=-1/0,e=a.length-1,n=0,i=a[e];n<=e;i=r,++n)r=a[n],(o=s(i[1],r[0]))>p&&(p=o,c=r[0],f=i[1])}return b=x=null,c===1/0||h===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,h],[f,d]]}}(),uo.geo.centroid=function(t){As=Ts=Ss=Es=Ls=Cs=zs=Ds=Is=Ps=Os=0,uo.geo.stream(t,Rs);var e=Is,r=Ps,n=Os,i=e*e+r*r+n*n;return i=.12&&i<.234&&n>=-.425&&n<-.214?o:i>=.166&&i<.234&&n>=-.214&&n<-.115?s:a).invert(t)},t.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},t.precision=function(e){return arguments.length?(a.precision(e),o.precision(e),s.precision(e),t):a.precision()},t.scale=function(e){return arguments.length?(a.scale(e),o.scale(.35*e),s.scale(e),t.translate(a.translate())):a.scale()},t.translate=function(e){if(!arguments.length)return a.translate();var u=a.scale(),c=+e[0],h=+e[1];return r=a.translate(e).clipExtent([[c-.455*u,h-.238*u],[c+.455*u,h+.238*u]]).stream(l).point,n=o.translate([c-.307*u,h+.201*u]).clipExtent([[c-.425*u+jo,h+.12*u+jo],[c-.214*u-jo,h+.234*u-jo]]).stream(l).point,i=s.translate([c-.205*u,h+.212*u]).clipExtent([[c-.214*u+jo,h+.166*u+jo],[c-.115*u-jo,h+.234*u-jo]]).stream(l).point,t},t.scale(1070)};var Ns,Bs,Us,Vs,qs,Hs,Ys={point:M,lineStart:M,lineEnd:M,polygonStart:function(){Bs=0,Ys.lineStart=We},polygonEnd:function(){Ys.lineStart=Ys.lineEnd=Ys.point=M,Ns+=xo(Bs/2)}},Gs={point:Ze,lineStart:M,lineEnd:M,polygonStart:M,polygonEnd:M},Xs={point:Qe,lineStart:$e,lineEnd:tr,polygonStart:function(){Xs.lineStart=er},polygonEnd:function(){Xs.point=Qe,Xs.lineStart=$e,Xs.lineEnd=tr}};uo.geo.path=function(){function t(t){return t&&("function"==typeof s&&a.pointRadius(+s.apply(this,arguments)),o&&o.valid||(o=i(a)),uo.geo.stream(t,o)),a.result()}function e(){return o=null,t}var r,n,i,a,o,s=4.5;return t.area=function(t){return Ns=0,uo.geo.stream(t,i(Ys)),Ns},t.centroid=function(t){return Ss=Es=Ls=Cs=zs=Ds=Is=Ps=Os=0,uo.geo.stream(t,i(Xs)),Os?[Is/Os,Ps/Os]:Ds?[Cs/Ds,zs/Ds]:Ls?[Ss/Ls,Es/Ls]:[NaN,NaN]},t.bounds=function(t){return qs=Hs=-(Us=Vs=1/0),uo.geo.stream(t,i(Gs)),[[Us,Vs],[qs,Hs]]},t.projection=function(t){return arguments.length?(i=(r=t)?t.stream||ir(t):x,e()):r},t.context=function(t){return arguments.length?(a=null==(n=t)?new Je:new rr(t),"function"!=typeof s&&a.pointRadius(s),e()):n},t.pointRadius=function(e){return arguments.length?(s="function"==typeof e?e:(a.pointRadius(+e),+e),t):s},t.projection(uo.geo.albersUsa()).context(null)},uo.geo.transform=function(t){return{stream:function(e){var r=new ar(e);for(var n in t)r[n]=t[n];return r}}},ar.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},uo.geo.projection=sr,uo.geo.projectionMutator=lr,(uo.geo.equirectangular=function(){return sr(cr)}).raw=cr.invert=cr,uo.geo.rotation=function(t){function e(e){return e=t(e[0]*qo,e[1]*qo),e[0]*=Ho,e[1]*=Ho,e}return t=fr(t[0]%360*qo,t[1]*qo,t.length>2?t[2]*qo:0),e.invert=function(e){return e=t.invert(e[0]*qo,e[1]*qo),e[0]*=Ho,e[1]*=Ho,e},e},hr.invert=cr,uo.geo.circle=function(){function t(){var t="function"==typeof n?n.apply(this,arguments):n,e=fr(-t[0]*qo,-t[1]*qo,0).invert,i=[];return r(null,null,1,{point:function(t,r){i.push(t=e(t,r)),t[0]*=Ho,t[1]*=Ho}}),{type:"Polygon",coordinates:[i]}}var e,r,n=[0,0],i=6;return t.origin=function(e){return arguments.length?(n=e,t):n},t.angle=function(n){return arguments.length?(r=gr((e=+n)*qo,i*qo),t):e},t.precision=function(n){return arguments.length?(r=gr(e*qo,(i=+n)*qo),t):i},t.angle(90)},uo.geo.distance=function(t,e){var r,n=(e[0]-t[0])*qo,i=t[1]*qo,a=e[1]*qo,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),u=Math.cos(i),c=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((r=h*o)*r+(r=u*c-l*h*s)*r),l*c+u*h*s)},uo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return uo.range(Math.ceil(a/g)*g,i,g).map(f).concat(uo.range(Math.ceil(u/v)*v,l,v).map(d)).concat(uo.range(Math.ceil(n/p)*p,r,p).filter(function(t){return xo(t%g)>jo}).map(c)).concat(uo.range(Math.ceil(s/m)*m,o,m).filter(function(t){return xo(t%v)>jo}).map(h))}var r,n,i,a,o,s,l,u,c,h,f,d,p=10,m=p,g=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(l).slice(1),f(i).reverse().slice(1),d(u).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(a=+e[0][0],i=+e[1][0],u=+e[0][1],l=+e[1][1],a>i&&(e=a,a=i,i=e),u>l&&(e=u,u=l,l=e),t.precision(y)):[[a,u],[i,l]]},t.minorExtent=function(e){return arguments.length?(n=+e[0][0],r=+e[1][0],s=+e[0][1],o=+e[1][1],n>r&&(e=n,n=r,r=e),s>o&&(e=s,s=o,o=e),t.precision(y)):[[n,s],[r,o]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(g=+e[0],v=+e[1],t):[g,v]},t.minorStep=function(e){return arguments.length?(p=+e[0],m=+e[1],t):[p,m]},t.precision=function(e){return arguments.length?(y=+e,c=yr(s,o,90),h=br(n,r,y),f=yr(u,l,90),d=br(a,i,y),t):y},t.majorExtent([[-180,-90+jo],[180,90-jo]]).minorExtent([[-180,-80-jo],[180,80+jo]])},uo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}var e,r,n=xr,i=_r;return t.distance=function(){return uo.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},t.source=function(r){return arguments.length?(n=r,e="function"==typeof r?null:r,t):n},t.target=function(e){return arguments.length?(i=e,r="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},uo.geo.interpolate=function(t,e){return wr(t[0]*qo,t[1]*qo,e[0]*qo,e[1]*qo)},uo.geo.length=function(t){return Ws=0,uo.geo.stream(t,Zs),Ws};var Ws,Zs={sphere:M,point:M,lineStart:Mr,lineEnd:M,polygonStart:M,polygonEnd:M},Js=kr(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(uo.geo.azimuthalEqualArea=function(){return sr(Js)}).raw=Js;var Ks=kr(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},x);(uo.geo.azimuthalEquidistant=function(){return sr(Ks)}).raw=Ks,(uo.geo.conicConformal=function(){return Ge(Ar)}).raw=Ar,(uo.geo.conicEquidistant=function(){return Ge(Tr)}).raw=Tr;var Qs=kr(function(t){return 1/t},Math.atan);(uo.geo.gnomonic=function(){return sr(Qs)}).raw=Qs,Sr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Vo]},(uo.geo.mercator=function(){return Er(Sr)}).raw=Sr;var $s=kr(function(){return 1},Math.asin);(uo.geo.orthographic=function(){return sr($s)}).raw=$s;var tl=kr(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(uo.geo.stereographic=function(){return sr(tl)}).raw=tl,Lr.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Vo]},(uo.geo.transverseMercator=function(){var t=Er(Lr),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):(t=r(),[t[0],t[1],t[2]-90])},r([0,0,90])}).raw=Lr,uo.geom={},uo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=Et(r),a=Et(n),o=t.length,s=[],l=[];for(e=0;e=0;--e)d.push(t[s[u[e]][2]]);for(e=+h;e=n&&u.x<=a&&u.y>=i&&u.y<=o?[[n,o],[a,o],[a,i],[n,i]]:[]).point=t[s]}),e}function r(t){return t.map(function(t,e){return{x:Math.round(a(t,e)/jo)*jo,y:Math.round(o(t,e)/jo)*jo,i:e}})}var n=Cr,i=zr,a=n,o=i,s=ul;return t?e(t):(e.links=function(t){return un(r(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return un(r(t)).cells.forEach(function(r,n){for(var i,a=r.site,o=r.edges.sort(Gr),s=-1,l=o.length,u=o[l-1].edge,c=u.l===a?u.r:u.l;++s=u,f=n>=c,d=f<<1|h;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=pn()),h?i=u:s=u,f?o=c:l=c,a(t,e,r,n,i,o,s,l)}var c,h,f,d,p,m,g,v,y,b=Et(s),x=Et(l);if(null!=e)m=e,g=r,v=n,y=i;else if(v=y=-(m=g=1/0),h=[],f=[],p=t.length,o)for(d=0;dv&&(v=c.x),c.y>y&&(y=c.y),h.push(c.x),f.push(c.y);else for(d=0;dv&&(v=_),w>y&&(y=w),h.push(_),f.push(w)}var M=v-m,k=y-g;M>k?y=g+M:v=m+k;var A=pn();if(A.add=function(t){a(A,t,+b(t,++d),+x(t,d),m,g,v,y)},A.visit=function(t){mn(t,A,m,g,v,y)},A.find=function(t){return gn(A,t[0],t[1],m,g,v,y)},d=-1,null==e){for(;++d=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return r=dl.get(r)||fl,n=pl.get(n)||x,Mn(n(r.apply(null,co.call(arguments,1))))},uo.interpolateHcl=Rn,uo.interpolateHsl=jn,uo.interpolateLab=Fn,uo.interpolateRound=Nn,uo.transform=function(t){var e=fo.createElementNS(uo.ns.prefix.svg,"g");return(uo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Bn(r?r.matrix:ml)})(t)},Bn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};uo.interpolateTransform=Zn,uo.layout={},uo.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r0?i=t:(r.c=null,r.t=NaN,r=null,u.end({type:"end",alpha:i=0})):t>0&&(u.start({type:"start",alpha:i=t}),r=It(l.tick)),l):i},l.start=function(){function t(t,n){if(!r){for(r=new Array(i),l=0;l=0;)o.push(c=u[l]),c.parent=a,c.depth=a.depth+1;n&&(a.value=0),a.children=u}else n&&(a.value=+n.call(t,a,a.depth)||0),delete a.children;return li(i,function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)}),s}var e=hi,r=ui,n=ci;return t.sort=function(r){return arguments.length?(e=r,t):e},t.children=function(e){return arguments.length?(r=e,t):r},t.value=function(e){return arguments.length?(n=e,t):n},t.revalue=function(e){return n&&(si(e,function(t){t.children&&(t.value=0)}),li(e,function(e){var r;e.children||(e.value=+n.call(t,e,e.depth)||0),(r=e.parent)&&(r.value+=e.value)})),e},t},uo.layout.partition=function(){function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(n=e.value?n/e.value:0;++us&&(s=n),o.push(n)}for(r=0;r0)for(a=-1;++a=c[0]&&s<=c[1]&&(o=l[uo.bisect(h,s,1,d)-1],o.y+=p,o.push(t[a]));return l}var e=!0,r=Number,n=Mi,i=_i;return t.value=function(e){return arguments.length?(r=e,t):r},t.range=function(e){return arguments.length?(n=Et(e),t):n},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return wi(t,e)}:Et(e),t):i},t.frequency=function(r){return arguments.length?(e=!!r,t):e},t},uo.layout.pack=function(){function t(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],u=i[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,li(s,function(t){t.r=+c(t.value)}),li(s,Ei),n){var h=n*(e?1:Math.max(2*s.r/l,2*s.r/u))/2;li(s,function(t){t.r+=h}),li(s,Ei),li(s,function(t){t.r-=h})}return zi(s,l/2,u/2,e?1:1/Math.max(2*s.r/l,2*s.r/u)),o}var e,r=uo.layout.hierarchy().sort(ki),n=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(r){return arguments.length?(e=null==r||"function"==typeof r?r:+r,t):e},t.padding=function(e){return arguments.length?(n=+e,t):n},oi(t,r)},uo.layout.tree=function(){function t(t,i){var c=o.call(this,t,i),h=c[0],f=e(h);if(li(f,r),f.parent.m=-f.z,si(f,n),u)si(h,a);else{var d=h,p=h,m=h;si(h,function(t){t.xp.x&&(p=t),t.depth>m.depth&&(m=t)});var g=s(d,p)/2-d.x,v=l[0]/(p.x+s(p,d)/2+g),y=l[1]/(m.depth||1);si(h,function(t){t.x=(t.x+g)*v,t.y=t.depth*y})}return c}function e(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o0&&(Ri(Fi(o,t,r),t,n),u+=n,c+=n),h+=o.m,u+=i.m,f+=l.m,c+=a.m;o&&!Oi(a)&&(a.t=o,a.m+=h-c),i&&!Pi(l)&&(l.t=i,l.m+=u-f,r=t)}return r}function a(t){t.x*=l[0],t.y=t.depth*l[1]}var o=uo.layout.hierarchy().sort(null).value(null),s=Ii,l=[1,1],u=null;return t.separation=function(e){return arguments.length?(s=e,t):s},t.size=function(e){return arguments.length?(u=null==(l=e)?a:null,t):u?null:l},t.nodeSize=function(e){return arguments.length?(u=null==(l=e)?null:a,t):u?l:null},oi(t,o)},uo.layout.cluster=function(){function t(t,a){var o,s=e.call(this,t,a),l=s[0],u=0;li(l,function(t){var e=t.children;e&&e.length?(t.x=Bi(e),t.y=Ni(e)):(t.x=o?u+=r(t,o):0,t.y=0,o=t)});var c=Ui(l),h=Vi(l),f=c.x-r(c,h)/2,d=h.x+r(h,c)/2;return li(l,i?function(t){t.x=(t.x-l.x)*n[0],t.y=(l.y-t.y)*n[1]}:function(t){t.x=(t.x-f)/(d-f)*n[0],t.y=(1-(l.y?t.y/l.y:1))*n[1]}),s}var e=uo.layout.hierarchy().sort(null).value(null),r=Ii,n=[1,1],i=!1;return t.separation=function(e){return arguments.length?(r=e,t):r},t.size=function(e){return arguments.length?(i=null==(n=e),t):i?null:n},t.nodeSize=function(e){return arguments.length?(i=null!=(n=e),t):i?n:null},oi(t,e)},uo.layout.treemap=function(){function t(t,e){for(var r,n,i=-1,a=t.length;++i0;)c.push(o=f[l-1]),c.area+=o.area,"squarify"!==d||(s=n(c,m))<=p?(f.pop(),p=s):(c.area-=c.pop().area,i(c,m,u,!1),m=Math.min(u.dx,u.dy),c.length=c.area=0,p=1/0);c.length&&(i(c,m,u,!0),c.length=c.area=0),a.forEach(e)}}function r(e){var n=e.children;if(n&&n.length){var a,o=h(e),s=n.slice(),l=[];for(t(s,o.dx*o.dy/e.value),l.area=0;a=s.pop();)l.push(a),l.area+=a.area,null!=a.z&&(i(l,a.z?o.dx:o.dy,o,!s.length),l.length=l.area=0);n.forEach(r)}}function n(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++oi&&(i=r));return n*=n,e*=e,n?Math.max(e*i*p/n,n/(e*a*p)):1/0}function i(t,e,r,n){var i,a=-1,o=t.length,s=r.x,u=r.y,c=e?l(t.area/e):0;if(e==r.dx){for((n||c>r.dy)&&(c=r.dy);++ar.dx)&&(c=r.dx);++a1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=uo.random.normal.apply(uo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=uo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;rh?0:1;if(u=Uo)return e(u,d)+(t?e(t,1-d):"")+"Z";var p,m,g,v,y,b,x,_,w,M,k,A,T=0,S=0,E=[];if((v=(+l.apply(this,arguments)||0)/2)&&(g=a===Cl?Math.sqrt(t*t+u*u):+a.apply(this,arguments),d||(S*=-1),u&&(S=nt(g/u*Math.sin(v))),t&&(T=nt(g/t*Math.sin(v)))),u){y=u*Math.cos(c+S),b=u*Math.sin(c+S),x=u*Math.cos(h-S),_=u*Math.sin(h-S);var L=Math.abs(h-c-2*S)<=No?0:1;if(S&&ba(y,b,x,_)===d^L){var C=(c+h)/2;y=u*Math.cos(C),b=u*Math.sin(C),x=_=null}}else y=b=0;if(t){w=t*Math.cos(h-T),M=t*Math.sin(h-T),k=t*Math.cos(c+T),A=t*Math.sin(c+T);var z=Math.abs(c-h+2*T)<=No?0:1;if(T&&ba(w,M,k,A)===1-d^z){var D=(c+h)/2;w=t*Math.cos(D),M=t*Math.sin(D),k=A=null}}else w=M=0;if(f>jo&&(p=Math.min(Math.abs(u-t)/2,+i.apply(this,arguments)))>.001){m=tNo)+",1 "+e}function i(t,e,r,n){return"Q 0,0 "+n}var a=xr,o=_r,s=Ha,l=ga,u=va;return t.radius=function(e){return arguments.length?(s=Et(e),t):s},t.source=function(e){return arguments.length?(a=Et(e),t):a},t.target=function(e){return arguments.length?(o=Et(e),t):o},t.startAngle=function(e){return arguments.length?(l=Et(e),t):l},t.endAngle=function(e){return arguments.length?(u=Et(e),t):u},t},uo.svg.diagonal=function(){function t(t,i){var a=e.call(this,t,i),o=r.call(this,t,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return l=l.map(n),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=xr,r=_r,n=Ya;return t.source=function(r){return arguments.length?(e=Et(r),t):e},t.target=function(e){return arguments.length?(r=Et(e),t):r},t.projection=function(e){return arguments.length?(n=e,t):n},t},uo.svg.diagonal.radial=function(){var t=uo.svg.diagonal(),e=Ya,r=t.projection;return t.projection=function(t){return arguments.length?r(Ga(e=t)):e},t},uo.svg.symbol=function(){function t(t,n){return(Ol.get(e.call(this,t,n))||Za)(r.call(this,t,n))}var e=Wa,r=Xa;return t.type=function(r){return arguments.length?(e=Et(r),t):e},t.size=function(e){return arguments.length?(r=Et(e),t):r},t};var Ol=uo.map({circle:Za,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*jl)),r=e*jl;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Rl),r=e*Rl/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Rl),r=e*Rl/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});uo.svg.symbolTypes=Ol.keys();var Rl=Math.sqrt(3),jl=Math.tan(30*qo);Lo.transition=function(t){for(var e,r,n=Fl||++Vl,i=to(t),a=[],o=Nl||{time:Date.now(),ease:En,delay:0,duration:250},s=-1,l=this.length;++srect,.s>rect").attr("width",h[1]-h[0])}function i(t){t.select(".extent").attr("y",f[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function a(){function a(){32==uo.event.keyCode&&(L||(b=null,z[0]-=h[1],z[1]-=f[1],L=2),T())}function m(){32==uo.event.keyCode&&2==L&&(z[0]+=h[1],z[1]+=f[1],L=0,T())}function g(){var t=uo.mouse(_),n=!1;x&&(t[0]+=x[0],t[1]+=x[1]),L||(uo.event.altKey?(b||(b=[(h[0]+h[1])/2,(f[0]+f[1])/2]),z[0]=h[+(t[0]=2)return!1;t[r]=n}return!0}):w.filter(function(t){for(var e=0;e<=o;++e){var r=y[t[e]];if(r<0)return!1;t[e]=r}return!0}),1&o)for(var h=0;h>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t("buffer").Buffer)},{buffer:69}],117:[function(t,e,r){"use strict";function n(t,e,r){var i=0|t[r];if(i<=0)return[];var a,o=new Array(i);if(r===t.length-1)for(a=0;a0)return i(0|t,e);break;case"object":if("number"==typeof t.length)return n(t,e,0)}return[]}e.exports=a},{}],118:[function(t,e,r){"use strict";function n(t,e,r){r=r||2;var n=e&&e.length,a=n?e[0]*r:t.length,s=i(t,0,a,r,!0),l=[];if(!s)return l;var u,c,f,d,p,m,g;if(n&&(s=h(t,e,s,r)),t.length>80*r){u=f=t[0],c=d=t[1];for(var v=r;vf&&(f=p),m>d&&(d=m);g=Math.max(f-u,d-c)}return o(s,l,r,u,c,g),l}function i(t,e,r,n,i){var a,o;if(i===z(t,e,r,n)>0)for(a=e;a=e;a-=n)o=E(a,t[a],t[a+1],o);return o&&w(o,o.next)&&(L(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!w(n,n.next)&&0!==_(n.prev,n,n.next))n=n.next;else{if(L(n),(n=e=n.prev)===n.next)return null;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,h,f){if(t){!f&&h&&m(t,n,i,h);for(var d,p,g=t;t.prev!==t.next;)if(d=t.prev,p=t.next,h?l(t,n,i,h):s(t))e.push(d.i/r),e.push(t.i/r),e.push(p.i/r),L(t),t=p.next,g=p.next;else if((t=p)===g){f?1===f?(t=u(t,e,r),o(t,e,r,n,i,h,2)):2===f&&c(t,e,r,n,i,h):o(a(t),e,r,n,i,h,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(_(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(b(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&_(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(_(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,h=v(s,l,e,r,n),f=v(u,c,e,r,n),d=t.nextZ;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&b(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&b(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function u(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!w(i,a)&&M(i,n,n.next,a)&&A(i,a)&&A(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),L(n),L(n.next),n=t=a),n=n.next}while(n!==t);return n}function c(t,e,r,n,i,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&x(l,u)){var c=S(l,u);return l=a(l,l.next),c=a(c,c.next),o(l,e,r,n,i,s),void o(c,e,r,n,i,s)}u=u.next}l=l.next}while(l!==t)}function h(t,e,r,n){var o,s,l,u,c,h=[];for(o=0,s=e.length;o=n.next.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&b(ar.x)&&A(n,t)&&(r=n,f=l),n=n.next;return r}function m(t,e,r,n){var i=t;do{null===i.z&&(i.z=v(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(t){var e,r,n,i,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0===s?(i=n,n=n.nextZ,l--):0!==l&&n?r.z<=n.z?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,s--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return t}function v(t,e,r,n,i){return t=32767*(t-r)/i,e=32767*(e-n)/i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function y(t){var e=t,r=t;do{e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function x(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!k(t,e)&&A(t,e)&&A(e,t)&&T(t,e)}function _(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function M(t,e,r,n){return!!(w(t,e)&&w(r,n)||w(t,n)&&w(r,e))||_(t,e,r)>0!=_(t,e,n)>0&&_(r,n,t)>0!=_(r,n,e)>0}function k(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&M(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function A(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function T(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}function S(t,e){var r=new C(t.i,t.x,t.y),n=new C(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function E(t,e,r,n){var i=new C(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function L(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function C(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function z(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],119:[function(t,e,r){"use strict";function n(t,e){var r=t.length;if("number"!=typeof e){e=0;for(var n=0;n0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,a,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],a=r.length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},{}],122:[function(t,e,r){"use strict";function n(t,e,r){var n=e||0,i=r||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[i*t[12]-t[8],i*t[13]-t[9],i*t[14]-t[10],i*t[15]-t[11]]]}e.exports=n},{}],123:[function(t,e,r){"use strict";function n(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}e.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0===(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},{}],124:[function(t,e,r){"use strict";function n(t){return new Function("f","var p = (f && f.properties || {}); return "+i(t))}function i(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?o(t[1],t[2],"===",!1):"!="===e?o(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?o(t[1],t[2],e,!0):"any"===e?s(t.slice(1),"||"):"all"===e?s(t.slice(1),"&&"):"none"===e?c(s(t.slice(1),"||")):"in"===e?l(t[1],t.slice(2)):"!in"===e?c(l(t[1],t.slice(2))):"has"===e?u(t[1]):"!has"===e?c(u([t[1]])):"true")+")"}function a(t){return"$type"===t?"f.type":"$id"===t?"f.id":"p["+JSON.stringify(t)+"]"}function o(t,e,r,n){var i=a(t),o="$type"===t?f.indexOf(e):JSON.stringify(e);return(n?"typeof "+i+"=== typeof "+o+"&&":"")+i+r+o}function s(t,e){return t.map(i).join(e)} +function l(t,e){"$type"===t&&(e=e.map(function(t){return f.indexOf(t)}));var r=JSON.stringify(e.sort(h)),n=a(t);return e.length<=200?r+".indexOf("+n+") !== -1":"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }("+n+", "+r+",0,"+(e.length-1)+")"}function u(t){return JSON.stringify(t)+" in p"}function c(t){return"!("+t+")"}function h(t,e){return te?1:0}e.exports=n;var f=["Unknown","Point","LineString","Polygon"]},{}],125:[function(t,e,r){"use strict";function n(t,e,r){return Math.min(e,Math.max(t,r))}function i(t,e,r){this.dimension=t.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n=r-1)for(var f=o.length-1,p=t-e[r-1],d=0;d=r-1)for(var c=a.length-1,h=(e[r-1],0);h=0;--r)if(t[--e])return!1;return!0},u.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--h)i.push(n(l[h-1],u[h-1],arguments[h])),a.push(0)}},u.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var f=r;f>0;--f){var d=n(u[f-1],c[f-1],arguments[f]);i.push(d),a.push((d-i[o++])*h)}}},u.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(n(o[l-1],s[l-1],arguments[l])),i.push(0)}},u.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var i=this._state,a=this._velocity,o=i.length-this.dimension,s=this.bounds,l=s[0],u=s[1],c=t-e,h=c>1e-6?1/c:0;this._time.push(t);for(var f=r;f>0;--f){var d=arguments[f];i.push(n(l[f-1],u[f-1],i[o++]+d)),a.push(d*h)}}},u.idle=function(t){var e=this.lastT();if(!(t=0;--h)i.push(n(l[h],u[h],i[o]+c*a[o])),a.push(0),o+=1}}},{"binary-search-bounds":58,"cubic-hermite":101}],126:[function(t,e,r){"use strict";function n(t){t=t||{};var e,r,n=t.canvas||document.createElement("canvas"),a=t.family||"monospace",o=t.shape||[512,512],s=t.step||[32,32],l=t.size||16,u=t.chars||[32,126],c=Math.floor((s[0]-l)/2),h=t.radius||1.5*c,f=new i(l,c,h,0,a);if("number"==typeof l&&(l+="px"),Array.isArray(u)){if(2===u.length&&"number"==typeof u[0]&&"number"==typeof u[1]){var d=[];for(e=u[0],r=0;e<=u[1];e++)d[r++]=String.fromCharCode(e);u=d}}else u=String(u).split("");o=o.slice(),n.width=o[0],n.height=o[1];var p=n.getContext("2d");p.fillStyle="#000",p.fillRect(0,0,n.width,n.height),p.font=l+" "+a,p.textBaseline="middle";var m=0,g=0,v=Math.min(u.length,Math.floor(o[0]/s[0])*Math.ceil(o[1]/s[1])),y=f.ctx.textAlign,b=f.buffer;for(f.ctx.textAlign="center",f.buffer=f.size/2,e=0;eo[0]-s[0]&&(m=0,g+=s[1])}return f.ctx.textAlign=y,f.buffer=b,n}var i=t("tiny-sdf");e.exports=n},{"tiny-sdf":520}],127:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function i(t){return new n(t._color,t.key,t.value,t.left,t.right,t._count)}function a(t,e){return new n(t,e.key,e.value,e.left,e.right,e._count)}function o(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function s(t,e){this._compare=t,this.root=e}function l(t,e){if(e.left){var r=l(t,e.left);if(r)return r}var r=t(e.key,e.value);return r||(e.right?l(t,e.right):void 0)}function u(t,e,r,n){if(e(t,n.key)<=0){if(n.left){var i=u(t,e,r,n.left);if(i)return i}var i=r(n.key,n.value);if(i)return i}if(n.right)return u(t,e,r,n.right)}function c(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=c(t,e,r,n,i.left)))return a;if(s>0&&(a=n(i.key,i.value)))return a}if(s>0&&i.right)return c(t,e,r,n,i.right)}function h(t,e){this.tree=t,this._stack=e}function f(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t){for(var e,r,n,s,l=t.length-1;l>=0;--l){if(e=t[l],0===l)return void(e._color=v);if(r=t[l-1],r.left===e){if(n=r.right,n.right&&n.right._color===g){if(n=r.right=i(n),s=n.right=i(n.right),r.right=n.left,n.left=r,n.right=s,n._color=r._color,e._color=v,r._color=v,s._color=v,o(r),o(n),l>1){var u=t[l-2];u.left===r?u.left=n:u.right=n}return void(t[l-1]=n)}if(n.left&&n.left._color===g){if(n=r.right=i(n),s=n.left=i(n.left),r.right=s.left,n.left=s.right,s.left=r,s.right=n,s._color=r._color,r._color=v,n._color=v,e._color=v,o(r),o(n),o(s),l>1){var u=t[l-2];u.left===r?u.left=s:u.right=s}return void(t[l-1]=s)}if(n._color===v){if(r._color===g)return r._color=v,void(r.right=a(g,n));r.right=a(g,n);continue}if(n=i(n),r.right=n.left,n.left=r,n._color=r._color,r._color=g,o(r),o(n),l>1){var u=t[l-2];u.left===r?u.left=n:u.right=n}t[l-1]=n,t[l]=r,l+11){var u=t[l-2];u.right===r?u.right=n:u.left=n}return void(t[l-1]=n)}if(n.right&&n.right._color===g){if(n=r.left=i(n),s=n.right=i(n.right),r.left=s.right,n.right=s.left,s.right=r,s.left=n,s._color=r._color,r._color=v,n._color=v,e._color=v,o(r),o(n),o(s),l>1){var u=t[l-2];u.right===r?u.right=s:u.left=s}return void(t[l-1]=s)}if(n._color===v){if(r._color===g)return r._color=v,void(r.left=a(g,n));r.left=a(g,n);continue}if(n=i(n),r.left=n.right,n.right=r,n._color=r._color,r._color=g,o(r),o(n),l>1){var u=t[l-2];u.right===r?u.right=n:u.left=n}t[l-1]=n,t[l]=r,l+1e?1:0}function m(t){return new s(t||p,null)}e.exports=m;var g=0,v=1,y=s.prototype;Object.defineProperty(y,"keys",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(y,"values",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(y,"length",{get:function(){return this.root?this.root._count:0}}),y.insert=function(t,e){for(var r=this._compare,i=this.root,l=[],u=[];i;){var c=r(t,i.key);l.push(i),u.push(c),i=c<=0?i.left:i.right}l.push(new n(g,t,e,null,null,1));for(var h=l.length-2;h>=0;--h){var i=l[h];u[h]<=0?l[h]=new n(i._color,i.key,i.value,l[h+1],i.right,i._count+1):l[h]=new n(i._color,i.key,i.value,i.left,l[h+1],i._count+1)}for(var h=l.length-1;h>1;--h){var f=l[h-1],i=l[h];if(f._color===v||i._color===v)break;var d=l[h-2];if(d.left===f)if(f.left===i){var p=d.right;if(!p||p._color!==g){if(d._color=g,d.left=f.right,f._color=v,f.right=d,l[h-2]=f,l[h-1]=i,o(d),o(f),h>=3){var m=l[h-3];m.left===d?m.left=f:m.right=f}break}f._color=v,d.right=a(v,p),d._color=g,h-=1}else{var p=d.right;if(!p||p._color!==g){if(f.right=i.left,d._color=g,d.left=i.right,i._color=v,i.left=f,i.right=d,l[h-2]=i,l[h-1]=f,o(d),o(f),o(i),h>=3){var m=l[h-3];m.left===d?m.left=i:m.right=i}break}f._color=v,d.right=a(v,p),d._color=g,h-=1}else if(f.right===i){var p=d.left;if(!p||p._color!==g){if(d._color=g,d.right=f.left,f._color=v,f.left=d,l[h-2]=f,l[h-1]=i,o(d),o(f),h>=3){var m=l[h-3];m.right===d?m.right=f:m.left=f}break}f._color=v,d.left=a(v,p),d._color=g,h-=1}else{var p=d.left;if(!p||p._color!==g){if(f.left=i.right,d._color=g,d.right=i.left,i._color=v,i.right=f,i.left=d,l[h-2]=i,l[h-1]=f,o(d),o(f),o(i),h>=3){var m=l[h-3];m.right===d?m.right=i:m.left=i}break}f._color=v,d.left=a(v,p),d._color=g,h-=1}}return l[0]._color=v,new s(r,l[0])},y.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return l(t,this.root);case 2:return u(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return c(e,r,this._compare,t,this.root)}},Object.defineProperty(y,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(y,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),y.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new h(this,[])},y.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},y.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},y.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},y.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},y.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new h(this,n);r=i<=0?r.left:r.right}return new h(this,[])},y.remove=function(t){var e=this.find(t);return e?e.remove():this},y.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var b=h.prototype;Object.defineProperty(b,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(b,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),b.clone=function(){return new h(this.tree,this._stack.slice())},b.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new n(r._color,r.key,r.value,r.left,r.right,r._count);for(var i=t.length-2;i>=0;--i){var r=t[i];r.left===t[i+1]?e[i]=new n(r._color,r.key,r.value,e[i+1],r.right,r._count):e[i]=new n(r._color,r.key,r.value,r.left,e[i+1],r._count)}if(r=e[e.length-1],r.left&&r.right){var a=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var o=e[a-1];e.push(new n(r._color,o.key,o.value,r.left,r.right,r._count)),e[a-1].key=r.key,e[a-1].value=r.value;for(var i=e.length-2;i>=a;--i)r=e[i],e[i]=new n(r._color,r.key,r.value,r.left,e[i+1],r._count);e[a-1].left=e[a]}if(r=e[e.length-1],r._color===g){var l=e[e.length-2];l.left===r?l.left=null:l.right===r&&(l.right=null),e.pop();for(var i=0;i0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(b,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(b,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),b.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(b,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),b.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var r=new Array(e.length),i=e[e.length-1];r[r.length-1]=new n(i._color,i.key,t,i.left,i.right,i._count);for(var a=e.length-2;a>=0;--a)i=e[a],i.left===e[a+1]?r[a]=new n(i._color,i.key,i.value,r[a+1],i.right,i._count):r[a]=new n(i._color,i.key,i.value,i.left,r[a+1],i._count);return new s(this.tree._compare,r[0])},b.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(b,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],128:[function(t,e,r){function n(t){if(t<0)return Number("0/0");for(var e=o[0],r=o.length-1;r>0;--r)e+=o[r]/(t+r);var n=t+a+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}var i=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],a=607/128,o=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(n(e));e-=1;for(var r=i[0],a=1;a<9;a++)r+=i[a]/(e+a);var o=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(o,e+.5)*Math.exp(-o)*r},e.exports.log=n},{}],129:[function(t,e,r){function n(t){if("Polygon"===t.type)return i(t.coordinates);if("MultiPolygon"===t.type){for(var e=0,r=0;r0){e+=Math.abs(a(t[0]));for(var r=1;r2){for(var r,n,i=0;i=0}var u=t("geojson-area");e.exports=n},{"geojson-area":129}],131:[function(t,e,r){"use strict";function n(t,e,r,n,o,l,u,c){if(r/=e,n/=e,u>=r&&c<=n)return t;if(u>n||c=r&&p<=n)h.push(m);else if(!(d>n||p=e&&s<=r&&i.push(o)}return i}function a(t,e,r,n,i,a){for(var s=[],l=0;lr?(x.push(i(u,p,e),i(u,p,r)),a||(x=o(s,x,g,v,y))):d>=e&&x.push(i(u,p,e)):f>r?dr&&(x.push(i(u,p,r)),a||(x=o(s,x,g,v,y))));u=m[b-1],f=u[n],f>=e&&f<=r&&x.push(u),h=x[x.length-1],a&&h&&(x[0][0]!==h[0]||x[0][1]!==h[1])&&x.push(x[0]),o(s,x,g,v,y)}return s}function o(t,e,r,n,i){return e.length&&(e.area=r,e.dist=n,void 0!==i&&(e.outer=i),t.push(e)),[]}e.exports=n;var s=t("./feature")},{"./feature":133}],132:[function(t,e,r){"use strict";function n(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n1?1:n,[r,n,0]}function s(t){for(var e,r,n=0,i=0,a=0;a1)return!1;var a=i.geometry[0].length;if(5!==a)return!1;for(var o=0;o1&&console.time("creation"),b=this.tiles[y]=p(t,v,r,n,x,e===d.maxZoom),this.tileCoords.push({z:e,x:r,y:n}),m)){m>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,n,b.numFeatures,b.numPoints,b.numSimplified),console.timeEnd("creation"));var _="z"+e;this.stats[_]=(this.stats[_]||0)+1,this.total++}if(b.source=t,i){if(e===d.maxZoom||e===i)continue;var w=1<1&&console.time("clipping");var M,k,A,T,S,E,L=.5*d.buffer/d.extent,C=.5-L,z=.5+L,D=1+L;M=k=A=T=null,S=f(t,v,r-L,r+z,0,o,b.min[0],b.max[0]),E=f(t,v,r+C,r+D,0,o,b.min[0],b.max[0]),S&&(M=f(S,v,n-L,n+z,1,s,b.min[1],b.max[1]),k=f(S,v,n+C,n+D,1,s,b.min[1],b.max[1])),E&&(A=f(E,v,n-L,n+z,1,s,b.min[1],b.max[1]),T=f(E,v,n+C,n+D,1,s,b.min[1],b.max[1])),m>1&&console.timeEnd("clipping"),t.length&&(h.push(M||[],e+1,2*r,2*n),h.push(k||[],e+1,2*r,2*n+1),h.push(A||[],e+1,2*r+1,2*n),h.push(T||[],e+1,2*r+1,2*n+1))}else i&&(g=e)}return g},i.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,o=n.debug,s=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var c,f=t,d=e,p=r;!c&&f>0;)f--,d=Math.floor(d/2),p=Math.floor(p/2),c=this.tiles[a(f,d,p)];if(!c||!c.source)return null;if(o>1&&console.log("found parent tile z%d-%d-%d",f,d,p),u(c,i,n.buffer))return h.tile(c,i);o>1&&console.time("drilling down");var m=this.splitTile(c.source,f,d,p,t,e,r);if(o>1&&console.timeEnd("drilling down"),null!==m){var g=1<n&&(o=r,n=a);n>s?(t[o][2]=n,h.push(u),h.push(o),u=o):(c=h.pop(),u=h.pop())}}function i(t,e,r){var n=e[0],i=e[1],a=r[0],o=r[1],s=t[0],l=t[1],u=a-n,c=o-i;if(0!==u||0!==c){var h=((s-n)*u+(l-i)*c)/(u*u+c*c);h>1?(n=a,i=o):h>0&&(n+=u*h,i+=c*h)}return u=s-n,c=l-i,u*u+c*c}e.exports=n},{}],136:[function(t,e,r){"use strict";function n(t,e,r,n,a,o){for(var s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z2:e,transformed:!1,min:[2,1],max:[-1,0]},l=0;ls.max[0]&&(s.max[0]=c[0]),c[1]>s.max[1]&&(s.max[1]=c[1])}return s}function i(t,e,r,n){var i,o,s,l,u=e.geometry,c=e.type,h=[],f=r*r;if(1===c)for(i=0;if)&&(d.push(l),t.numSimplified++),t.numPoints++;3===c&&a(d,s.outer),h.push(d)}else t.numPoints+=s.length;if(h.length){var p={geometry:h,type:c,tags:e.tags||null};null!==e.id&&(p.id=e.id),t.features.push(p)}}function a(t,e){o(t)<0===e&&t.reverse()}function o(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i0?(d[c]=-1,p[c]=0):(d[c]=0,p[c]=1)}}function s(t,e){var r=new i(t);return r.update(e),r}e.exports=s;var l=t("./lib/text.js"),u=t("./lib/lines.js"),c=t("./lib/background.js"),h=t("./lib/cube.js"),f=t("./lib/ticks.js"),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=i.prototype;p.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,n=e.bind(this,!1,Number),i=e.bind(this,!1,Boolean),a=e.bind(this,!1,String),o=e.bind(this,!0,function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]}),s=!1,c=!1;if("bounds"in t)for(var h=t.bounds,d=0;d<2;++d)for(var p=0;p<3;++p)h[d][p]!==this.bounds[d][p]&&(c=!0),this.bounds[d][p]=h[d][p];if("ticks"in t){r=t.ticks,s=!0,this.autoTicks=!1;for(var d=0;d<3;++d)this.tickSpacing[d]=0}else n("tickSpacing")&&(this.autoTicks=!0,c=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),c=!0,s=!0,this._firstInit=!1),c&&this.autoTicks&&(r=f.create(this.bounds,this.tickSpacing),s=!0),s){for(var d=0;d<3;++d)r[d].sort(function(t,e){return t.x-e.x});f.equal(r,this.ticks)?s=!1:this.ticks=r}i("tickEnable"),a("tickFont")&&(s=!0),n("tickSize"),n("tickAngle"),n("tickPad"),o("tickColor");var m=a("labels");a("labelFont")&&(m=!0),i("labelEnable"),n("labelSize"),n("labelPad"),o("labelColor"),i("lineEnable"),i("lineMirror"),n("lineWidth"),o("lineColor"),i("lineTickEnable"),i("lineTickMirror"),n("lineTickLength"),n("lineTickWidth"),o("lineTickColor"),i("gridEnable"),n("gridWidth"),o("gridColor"),i("zeroEnable"),o("zeroLineColor"),n("zeroLineWidth"),i("backgroundEnable"),o("backgroundColor"),this._text?this._text&&(m||s)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=l(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&s&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};var m=[new a,new a,new a],g=[0,0,0],v={model:d,view:d,projection:d};p.isOpaque=function(){return!0},p.isTransparent=function(){return!1},p.drawTransparent=function(t){};var y=[0,0,0],b=[0,0,0],x=[0,0,0];p.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||d,i=t.view||d,a=t.projection||d,s=this.bounds,l=h(r,i,a,s),u=l.cubeEdges,c=l.axis,f=i[12],p=i[13],_=i[14],w=i[15],M=this.pixelRatio*(a[3]*f+a[7]*p+a[11]*_+a[15]*w)/e.drawingBufferHeight,k=0;k<3;++k)this.lastCubeProps.cubeEdges[k]=u[k],this.lastCubeProps.axis[k]=c[k];for(var A=m,k=0;k<3;++k)o(m[k],k,this.bounds,u,c);for(var e=this.gl,T=g,k=0;k<3;++k)this.backgroundEnable[k]?T[k]=c[k]:T[k]=0;this._background.draw(r,i,a,s,T,this.backgroundColor),this._lines.bind(r,i,a,this);for(var k=0;k<3;++k){var S=[0,0,0];c[k]>0?S[k]=s[1][k]:S[k]=s[0][k];for(var E=0;E<2;++E){var L=(k+1+E)%3,C=(k+1+(1^E))%3;this.gridEnable[L]&&this._lines.drawGrid(L,C,this.bounds,S,this.gridColor[L],this.gridWidth[L]*this.pixelRatio)}for(var E=0;E<2;++E){var L=(k+1+E)%3,C=(k+1+(1^E))%3;this.zeroEnable[C]&&s[0][C]<=0&&s[1][C]>=0&&this._lines.drawZero(L,C,this.bounds,S,this.zeroLineColor[C],this.zeroLineWidth[C]*this.pixelRatio)}}for(var k=0;k<3;++k){this.lineEnable[k]&&this._lines.drawAxisLine(k,this.bounds,A[k].primalOffset,this.lineColor[k],this.lineWidth[k]*this.pixelRatio), +this.lineMirror[k]&&this._lines.drawAxisLine(k,this.bounds,A[k].mirrorOffset,this.lineColor[k],this.lineWidth[k]*this.pixelRatio);for(var z=n(y,A[k].primalMinor),D=n(b,A[k].mirrorMinor),I=this.lineTickLength,E=0;E<3;++E){var P=M/r[5*E];z[E]*=I[E]*P,D[E]*=I[E]*P}this.lineTickEnable[k]&&this._lines.drawAxisTicks(k,A[k].primalOffset,z,this.lineTickColor[k],this.lineTickWidth[k]*this.pixelRatio),this.lineTickMirror[k]&&this._lines.drawAxisTicks(k,A[k].mirrorOffset,D,this.lineTickColor[k],this.lineTickWidth[k]*this.pixelRatio)}this._text.bind(r,i,a,this.pixelRatio);for(var k=0;k<3;++k){for(var O=A[k].primalMinor,R=n(x,A[k].primalOffset),E=0;E<3;++E)this.lineTickEnable[k]&&(R[E]+=M*O[E]*Math.max(this.lineTickLength[E],0)/r[5*E]);if(this.tickEnable[k]){for(var E=0;E<3;++E)R[E]+=M*O[E]*this.tickPad[E]/r[5*E];this._text.drawTicks(k,this.tickSize[k],this.tickAngle[k],R,this.tickColor[k])}if(this.labelEnable[k]){for(var E=0;E<3;++E)R[E]+=M*O[E]*this.labelPad[E]/r[5*E];R[k]+=.5*(s[0][k]+s[1][k]),this._text.drawLabel(k,this.labelSize[k],this.labelAngle[k],R,this.labelColor[k])}}},p.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":141,"./lib/cube.js":142,"./lib/lines.js":143,"./lib/text.js":145,"./lib/ticks.js":146}],141:[function(t,e,r){"use strict";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}function i(t){for(var e=[],r=[],i=0,l=0;l<3;++l)for(var u=(l+1)%3,c=(l+2)%3,h=[0,0,0],f=[0,0,0],d=-1;d<=1;d+=2){r.push(i,i+2,i+1,i+1,i+2,i+3),h[l]=d,f[l]=d;for(var p=-1;p<=1;p+=2){h[u]=p;for(var m=-1;m<=1;m+=2)h[c]=m,e.push(h[0],h[1],h[2],f[0],f[1],f[2]),i+=1}var g=u;u=c,c=g}var v=a(t,new Float32Array(e)),y=a(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),b=o(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],y),x=s(t);return x.attributes.position.location=0,x.attributes.normal.location=1,new n(t,v,b,x)}e.exports=i;var a=t("gl-buffer"),o=t("gl-vao"),s=t("./shaders").bg,l=n.prototype;l.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),l.disable(l.POLYGON_OFFSET_FILL)}},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":144,"gl-buffer":148,"gl-vao":262}],142:[function(t,e,r){"use strict";function n(t,e,r){for(var n=0;n<4;++n){t[n]=r[12+n];for(var i=0;i<3;++i)t[n]+=e[i]*r[4*i+n]}}function i(t){for(var e=0;eS&&(_|=1<S&&(_|=1<f[m][1]&&(O=m));for(var R=-1,m=0;m<3;++m){var j=O^1<f[F][0]&&(F=j)}}var N=g;N[0]=N[1]=N[2]=0,N[o.log2(R^O)]=O&R,N[o.log2(O^F)]=O&F;var B=7^F;B===_||B===P?(B=7^R,N[o.log2(F^B)]=B&F):N[o.log2(R^B)]=B&R;for(var U=v,V=_,k=0;k<3;++k)U[k]=V&1< 0.0) {\n vec3 nPosition = mix(bounds[0], bounds[1], 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n colorChannel = abs(normal);\n}","precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] + \n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}",null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":246}],145:[function(t,e,r){(function(r){"use strict";function n(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}function i(t,e){try{return l(t,e)}catch(t){return console.warn("error vectorizing text:",t),{cells:[],positions:[]}}}function a(t,e,r,i,a,l){var c=o(t),h=s(t,[{buffer:c,size:3}]),f=u(t);f.attributes.position.location=0;var d=new n(t,f,c,h);return d.update(e,r,i,a,l),d}e.exports=a;var o=t("gl-buffer"),s=t("gl-vao"),l=t("vectorize-text"),u=t("./shaders").text,c=window||r.global||{},h=c.__TEXT_CACHE||{};c.__TEXT_CACHE={};var f=n.prototype,d=[0,0];f.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},f.update=function(t,e,r,n,a){function o(t,e,r,n){var a=h[r];a||(a=h[r]={});var o=a[e];o||(o=a[e]=i(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle"}));for(var l=(n||12)/12,u=o.positions,c=o.cells,f=0,d=c.length;f=0;--m){var g=u[p[m]];s.push(l*g[0],-l*g[1],t)}}for(var s=(this.gl,[]),l=[0,0,0],u=[0,0,0],c=[0,0,0],f=[0,0,0],d=0;d<3;++d){c[d]=s.length/3|0,o(.5*(t[0][d]+t[1][d]),e[d],r),f[d]=(s.length/3|0)-c[d],l[d]=s.length/3|0;for(var p=0;p=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,u=o%a;o<0?(l=0|-Math.ceil(l),u=0|-u):(l=0|Math.floor(l),u|=0);var c=""+l;if(o<0&&(c="-"+c),i){for(var h=""+u;h.length=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r}function a(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function a(t,e){for(var r=l.malloc(t.length,e),n=t.length,i=0;i=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}function s(t,e,r,i){if(r=r||t.ARRAY_BUFFER,i=i||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(i!==t.DYNAMIC_DRAW&&i!==t.STATIC_DRAW&&i!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var a=t.createBuffer(),o=new n(t,r,a,0,i);return o.update(e),o}var l=t("typedarray-pool"),u=t("ndarray-ops"),c=t("ndarray"),h=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"],f=n.prototype;f.bind=function(){this.gl.bindBuffer(this.type,this.handle)},f.unbind=function(){this.gl.bindBuffer(this.type,null)},f.dispose=function(){this.gl.deleteBuffer(this.handle)},f.update=function(t,e){if("number"!=typeof e&&(e=-1),this.bind(),"object"==typeof t&&void 0!==t.shape){var r=t.dtype;if(h.indexOf(r)<0&&(r="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){r=gl.getExtension("OES_element_index_uint")&&"uint16"!==r?"uint32":"uint16"}if(r===t.dtype&&o(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=i(this.gl,this.type,this.length,this.usage,t.data,e):this.length=i(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var n=l.malloc(t.size,r),s=c(n,t.shape);u.assign(s,t),this.length=e<0?i(this.gl,this.type,this.length,this.usage,n,e):i(this.gl,this.type,this.length,this.usage,n.subarray(0,t.size),e),l.free(n)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?a(t,"uint16"):a(t,"float32"),this.length=e<0?i(this.gl,this.type,this.length,this.usage,f,e):i(this.gl,this.type,this.length,this.usage,f.subarray(0,t.length),e),l.free(f)}else if("object"==typeof t&&"number"==typeof t.length)this.length=i(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");t|=0,t<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=s},{ndarray:456,"ndarray-ops":450,"typedarray-pool":528}],149:[function(t,e,r){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],150:[function(t,e,r){var n=t("./1.0/numbers");e.exports=function(t){return n[t]}},{"./1.0/numbers":149}],151:[function(t,e,r){"use strict";function n(t,e,r,n){this.plot=t,this.shader=e,this.bufferHi=r,this.bufferLo=n,this.bounds=[1/0,1/0,-1/0,-1/0],this.numPoints=0,this.color=[0,0,0,1]}function i(t,e){var r=a(t.gl,l.vertex,l.fragment),i=o(t.gl),s=o(t.gl),u=new n(t,r,i,s);return u.update(e),t.addObject(u),u}var a=t("gl-shader"),o=t("gl-buffer"),s=t("typedarray-pool"),l=t("./lib/shaders");e.exports=i;var u=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]],c=n.prototype;c.draw=function(){var t=new Float32Array([0,0]),e=new Float32Array([0,0]),r=new Float32Array([0,0]),n=new Float32Array([0,0]),i=[1,1];return function(){var a=this.plot,o=this.shader,s=this.bounds,l=this.numPoints;if(l){var c=a.gl,h=a.dataBox,f=a.viewBox,d=a.pixelRatio,p=s[2]-s[0],m=s[3]-s[1],g=h[2]-h[0],v=h[3]-h[1],y=2*p/g,b=2*m/v,x=(s[0]-h[0]-.5*g)/p,_=(s[1]-h[1]-.5*v)/m;t[0]=y,t[1]=b,e[0]=y-t[0],e[1]=b-t[1],r[0]=x,r[1]=_,n[0]=x-r[0],n[1]=_-r[1];var w=f[2]-f[0],M=f[3]-f[1];i[0]=2*d/w,i[1]=2*d/M,o.bind(),o.uniforms.scaleHi=t,o.uniforms.scaleLo=e,o.uniforms.translateHi=r,o.uniforms.translateLo=n,o.uniforms.pixelScale=i,o.uniforms.color=this.color,this.bufferLo.bind(),o.attributes.positionLo.pointer(c.FLOAT,!1,16,0),this.bufferHi.bind(),o.attributes.positionHi.pointer(c.FLOAT,!1,16,0),o.attributes.pixelOffset.pointer(c.FLOAT,!1,16,8),c.drawArrays(c.TRIANGLES,0,l*u.length)}}}(),c.drawPick=function(t){return t},c.pick=function(){return null},c.update=function(t){t=t||{};var e,r,n,i=t.positions||[],a=t.errors||[],o=1;"lineWidth"in t&&(o=+t.lineWidth);var l=5;"capSize"in t&&(l=+t.capSize),this.color=(t.color||[0,0,0,1]).slice();var c=this.bounds=[1/0,1/0,-1/0,-1/0],h=this.numPoints=i.length>>1;for(e=0;e0&&(T*=_),S<0?S*=w:S>0&&(S*=M),g[b++]=f*(r-p+T),g[b++]=d*(n-m+S),g[b++]=o*A[2]+(l+o)*A[4],g[b++]=o*A[3]+(l+o)*A[5]}}for(e=0;e=1},h.isTransparent=function(){return this.opacity<1},h.drawTransparent=h.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||c,i=r.projection=t.projection||c;r.model=t.model||c,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],o=n[13],s=n[14],l=n[15],u=this.pixelRatio*(i[3]*a+i[7]*o+i[11]*s+i[15]*l)/e.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)e.lineWidth(this.lineWidth[h]),r.capSize=this.capSize[h]*u,e.drawArrays(e.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var f=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=(n+e)%3,o=[0,0,0];o[a]=i,r.push(o)}t[e]=r}return t}();h.update=function(t){t=t||{},"lineWidth"in t&&(this.lineWidth=t.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in t&&(this.capSize=t.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),"opacity"in t&&(this.opacity=t.opacity);var e=t.color||[[0,0,0],[0,0,0],[0,0,0]],r=t.position,n=t.error;if(Array.isArray(e[0])||(e=[e,e,e]),r&&n){var o=[],s=r.length,l=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var u=0;u<3;++u){this.lineOffset[u]=l;t:for(var c=0;c0){var m=h.slice();m[u]+=d[1][u],o.push(h[0],h[1],h[2],p[0],p[1],p[2],p[3],0,0,0,m[0],m[1],m[2],p[0],p[1],p[2],p[3],0,0,0),i(this.bounds,m),l+=2+a(o,m,p,u)}}}this.lineCount[u]=l-this.lineOffset[u]}this.buffer.update(o)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":154,"gl-buffer":148,"gl-vao":262}], +154:[function(t,e,r){"use strict";var n=t("gl-shader");e.exports=function(t){return n(t,"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}","precision mediump float;\n#define GLSLIFY 1\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if(any(lessThan(fragPosition, clipBounds[0])) || any(greaterThan(fragPosition, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = opacity * fragColor;\n}",null,[{name:"position",type:"vec3"},{name:"offset",type:"vec3"},{name:"color",type:"vec4"}])}},{"gl-shader":246}],155:[function(t,e,r){"use strict";function n(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function i(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function a(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);y=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;a1&&f.drawBuffersWEBGL(y[h]);var v=r.getExtension("WEBGL_depth_texture");v?d?t.depth=s(r,u,c,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p&&(t.depth=s(r,u,c,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):p&&d?t._depth_rb=l(r,u,c,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p?t._depth_rb=l(r,u,c,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=l(r,u,c,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var b=r.checkFramebufferStatus(r.FRAMEBUFFER);if(b!==r.FRAMEBUFFER_COMPLETE){t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null);for(var g=0;gs||r<0||r>s)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var l=n(a),u=0;uo||r<0||r>o)throw new Error("gl-fbo: Parameters are too large for FBO");n=n||{};var s=1;if("color"in n){if((s=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(s>1){if(!i)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(s>t.getParameter(i.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+s+" draw buffers")}}var l=t.UNSIGNED_BYTE,u=t.getExtension("OES_texture_float");if(n.float&&s>0){if(!u)throw new Error("gl-fbo: Context does not support floating point textures");l=t.FLOAT}else n.preferFloat&&s>0&&u&&(l=t.FLOAT);var h=!0;"depth"in n&&(h=!!n.depth);var f=!1;return"stencil"in n&&(f=!!n.stencil),new c(t,e,r,l,s,h,f,i)}var d=t("gl-texture2d");e.exports=f;var p,m,g,v,y=null,b=c.prototype;Object.defineProperties(b,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(t){if(Array.isArray(t)||(t=[0|t,0|t]),2!==t.length)throw new Error("gl-fbo: Shape vector must be length 2");var e=0|t[0],r=0|t[1];return h(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return t|=0,h(this,t,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t},enumerable:!1}}),b.bind=function(){if(!this._destroyed){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.handle),t.viewport(0,0,this._shape[0],this._shape[1])}},b.dispose=function(){if(!this._destroyed){this._destroyed=!0;var t=this.gl;t.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(t.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var e=0;e>8*d&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=t,p.pickOffset=e,p.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),h.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},h.update=function(t){t=t||{};var e=t.shape||[0,0],r=t.x||o(e[0]),n=t.y||o(e[1]),i=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=n;var l=t.colorLevels||[0],u=t.colorValues||[0,0,0,1],c=l.length,h=this.bounds,d=h[0]=r[0],p=h[1]=n[0],m=h[2]=r[r.length-1],g=h[3]=n[n.length-1],v=1/(m-d),y=1/(g-p),b=e[0],x=e[1];this.shape=[b,x];var _=(b-1)*(x-1)*(f.length>>>1);this.numVertices=_;for(var w=s.mallocUint8(4*_),M=s.mallocFloat32(2*_),k=s.mallocUint8(2*_),A=s.mallocUint32(_),T=0,S=0;S2&&!this.usingDashes){var b=this.mitreShader;this.lineBufferLo.bind(),b.attributes.aLo.pointer(l.FLOAT,!1,48,0),this.lineBufferHi.bind(),b.bind();var x=b.uniforms;this.setProjectionUniforms(x,a),x.color=c,x.radius=s*u,b.attributes.aHi.pointer(l.FLOAT,!1,48,0),l.drawArrays(l.POINTS,0,i/3|0)}}}}(),f.drawPick=function(){var t=[0,0,0,0];return function(e){var r=this.vertCount,n=this.numPoints;if(this.pickOffset=e,!r)return e+n;var i=this.setProjectionModel(),a=this.plot,o=this.width,s=a.gl,l=a.pickPixelRatio,u=this.pickShader,c=this.pickBuffer;t[0]=255&e,t[1]=e>>>8&255,t[2]=e>>>16&255,t[3]=e>>>24,u.bind();var h=u.uniforms;this.setProjectionUniforms(h,i),h.width=o*l,h.pickOffset=t;var f=u.attributes;return this.lineBufferHi.bind(),f.aHi.pointer(s.FLOAT,!1,16,0),f.dHi.pointer(s.FLOAT,!1,16,8),this.lineBufferLo.bind(),f.aLo.pointer(s.FLOAT,!1,16,0),c.bind(),f.pick0.pointer(s.UNSIGNED_BYTE,!1,8,0),f.pick1.pointer(s.UNSIGNED_BYTE,!1,8,4),s.drawArrays(s.TRIANGLES,0,r),e+n}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.numPoints;if(r=n+i)return null;var a=r-n,o=this.data;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}},f.update=function(t){t=t||{};var e,r,n,a,o,s=this.plot.gl;this.color=(t.color||[0,0,1,1]).slice(),this.width=+(t.width||1),this.fill=(t.fill||[!1,!1,!1,!1]).slice(),this.fillColor=i(t.fillColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var h=t.dashes||[1],f=0;for(e=0;e1,this.dashPattern=l(s,u(d,[f,1,4],[1,0,0])),this.dashPattern.minFilter=s.NEAREST,this.dashPattern.magFilter=s.NEAREST,this.dashLength=f,c.free(d);var m=t.positions;this.data=m;var g=this.bounds;g[0]=g[1]=1/0,g[2]=g[3]=-1/0;var v=this.numPoints=m.length>>>1;if(0!==v){for(e=0;e1;){var A=--n;a=m[2*n],o=m[2*n+1];var T=A-1,S=m[2*T],E=m[2*T+1];if(!(isNaN(a)||isNaN(o)||isNaN(S)||isNaN(E))){k+=1,a=(a-g[0])/(g[2]-g[0]),o=(o-g[1])/(g[3]-g[1]),S=(S-g[0])/(g[2]-g[0]),E=(E-g[1])/(g[3]-g[1]);var L=S-a,C=E-o,z=A|1<<24,D=A-1,I=A,P=A-1|1<<24;y[--w]=-C,y[--w]=-L,y[--w]=o,y[--w]=a,_[--M]=z,_[--M]=D,y[--w]=C,y[--w]=L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=-C,y[--w]=-L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=C,y[--w]=L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=-C,y[--w]=-L,y[--w]=o,y[--w]=a,_[--M]=z,_[--M]=D,y[--w]=C,y[--w]=L,y[--w]=o,y[--w]=a,_[--M]=z,_[--M]=D}}for(e=0;e FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n highp float e = floor(log2(av));\n highp float m = av * pow(2.0, -e) - 1.0;\n \n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n \n //Unpack exponent\n highp float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0; \n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\n\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if(any(lessThan(worldPosition, clipBounds[0])) || any(greaterThan(worldPosition, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = vec4(pickId/255.0, encode_float_1_0(pixelArcLength).xyz);\n}",null,a)}},{"gl-shader":246}],163:[function(t,e,r){"use strict";function n(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function i(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function a(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function o(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.dirty=!0,this.pixelRatio=1}function s(t){var e=t.gl||t.scene&&t.scene.gl,r=m(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var n=g(e);n.attributes.position.location=0,n.attributes.nextPosition.location=1,n.attributes.arcLength.location=2,n.attributes.lineWidth.location=3,n.attributes.color.location=4;for(var i=l(e),a=u(e,[{buffer:i,size:3,offset:0,stride:48},{buffer:i,size:3,offset:12,stride:48},{buffer:i,size:1,offset:24,stride:48},{buffer:i,size:1,offset:28,stride:48},{buffer:i,size:4,offset:32,stride:48}]),s=d(new Array(1024),[256,1,4]),h=0;h<1024;++h)s.data[h]=255;var f=c(e,s);f.wrap=e.REPEAT;var p=new o(e,r,n,i,a,f);return p.update(t),p}e.exports=s;var l=t("gl-buffer"),u=t("gl-vao"),c=t("gl-texture2d"),h=t("glsl-read-float"),f=t("binary-search-bounds"),d=t("ndarray"),p=t("./lib/shaders"),m=p.createShader,g=p.createPickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],y=o.prototype;y.isTransparent=function(){return this.opacity<1},y.isOpaque=function(){return this.opacity>=1},y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.drawTransparent=y.draw=function(t){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||v,view:t.view||v,projection:t.projection||v,clipBounds:i(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},y.drawPick=function(t){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||v,view:t.view||v,projection:t.projection||v,pickId:this.pickId,clipBounds:i(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},y.update=function(t){var e,r;this.dirty=!0;var i=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),"opacity"in t&&(this.opacity=+t.opacity);var a=t.position||t.positions;if(a){var o=t.color||t.colors||[0,0,0,1],s=t.lineWidth||1,l=[],u=[],c=[],h=0,p=0,m=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],g=!1;t:for(e=1;e0){for(var b=0;b<24;++b)l.push(l[l.length-12]);p+=2,g=!0}continue t}m[0][r]=Math.min(m[0][r],v[r],y[r]),m[1][r]=Math.max(m[1][r],v[r],y[r])}var x,_;Array.isArray(o[0])?(x=o[e-1],_=o[e]):x=_=o,3===x.length&&(x=[x[0],x[1],x[2],1]),3===_.length&&(_=[_[0],_[1],_[2],1]);var w;w=Array.isArray(s)?s[e-1]:s;var M=h;if(h+=n(v,y),g){for(r=0;r<2;++r)l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,x[0],x[1],x[2],x[3]);p+=2,g=!1}l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,x[0],x[1],x[2],x[3],v[0],v[1],v[2],y[0],y[1],y[2],M,-w,x[0],x[1],x[2],x[3],y[0],y[1],y[2],v[0],v[1],v[2],h,-w,_[0],_[1],_[2],_[3],y[0],y[1],y[2],v[0],v[1],v[2],h,w,_[0],_[1],_[2],_[3]),p+=4}if(this.buffer.update(l),u.push(h),c.push(a[a.length-1].slice()),this.bounds=m,this.vertexCount=p,this.points=c,this.arcLength=u,"dashes"in t){var k=t.dashes,A=k.slice();for(A.unshift(0),e=1;e0?(n=2*Math.sqrt(r+1),t[3]=.25*n,t[0]=(e[6]-e[9])/n,t[1]=(e[8]-e[2])/n,t[2]=(e[1]-e[4])/n):e[0]>e[5]&e[0]>e[10]?(n=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/n,t[0]=.25*n,t[1]=(e[1]+e[4])/n,t[2]=(e[8]+e[2])/n):e[5]>e[10]?(n=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/n,t[0]=(e[1]+e[4])/n,t[1]=.25*n,t[2]=(e[6]+e[9])/n):(n=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/n,t[0]=(e[8]+e[2])/n,t[1]=(e[6]+e[9])/n,t[2]=.25*n),t},i.fromRotationTranslationScale=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3],l=i+i,u=a+a,c=o+o,h=i*l,f=i*u,d=i*c,p=a*u,m=a*c,g=o*c,v=s*l,y=s*u,b=s*c,x=n[0],_=n[1],w=n[2];return t[0]=(1-(p+g))*x,t[1]=(f+b)*x,t[2]=(d-y)*x,t[3]=0,t[4]=(f-b)*_,t[5]=(1-(h+g))*_,t[6]=(m+v)*_,t[7]=0,t[8]=(d+y)*w,t[9]=(m-v)*w,t[10]=(1-(h+p))*w,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},i.fromRotationTranslationScaleOrigin=function(t,e,r,n,i){var a=e[0],o=e[1],s=e[2],l=e[3],u=a+a,c=o+o,h=s+s,f=a*u,d=a*c,p=a*h,m=o*c,g=o*h,v=s*h,y=l*u,b=l*c,x=l*h,_=n[0],w=n[1],M=n[2],k=i[0],A=i[1],T=i[2];return t[0]=(1-(m+v))*_,t[1]=(d+x)*_,t[2]=(p-b)*_,t[3]=0,t[4]=(d-x)*w,t[5]=(1-(f+v))*w,t[6]=(g+y)*w,t[7]=0,t[8]=(p+b)*M,t[9]=(g-y)*M,t[10]=(1-(f+m))*M,t[11]=0,t[12]=r[0]+k-(t[0]*k+t[4]*A+t[8]*T),t[13]=r[1]+A-(t[1]*k+t[5]*A+t[9]*T),t[14]=r[2]+T-(t[2]*k+t[6]*A+t[10]*T),t[15]=1,t},i.fromQuat=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,h=n*s,f=i*o,d=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return t[0]=1-h-p,t[1]=c+v,t[2]=f-g,t[3]=0,t[4]=c-v,t[5]=1-u-p,t[6]=d+m,t[7]=0,t[8]=f+g,t[9]=d-m,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.frustum=function(t,e,r,n,i,a,o){var s=1/(r-e),l=1/(i-n),u=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(o+a)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*u,t[15]=0,t},i.perspective=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t},i.perspectiveFromFieldOfView=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(o-s)*l*.5,t[9]=(i-a)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t},i.ortho=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t},i.lookAt=function(t,e,r,a){var o,s,l,u,c,h,f,d,p,m,g=e[0],v=e[1],y=e[2],b=a[0],x=a[1],_=a[2],w=r[0],M=r[1],k=r[2];return Math.abs(g-w).999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(a.cross(t,i,o),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=1+l,s.normalize(n,n))}}(),s.setAxes=function(){var t=i.create();return function(e,r,n,i){return t[0]=n[0],t[3]=n[1],t[6]=n[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],s.normalize(e,s.fromMat3(e,t))}}(),s.clone=o.clone,s.fromValues=o.fromValues,s.copy=o.copy,s.set=o.set,s.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},s.setAxisAngle=function(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t},s.getAxisAngle=function(t,e){var r=2*Math.acos(e[3]),n=Math.sin(r/2);return 0!=n?(t[0]=e[0]/n,t[1]=e[1]/n,t[2]=e[2]/n):(t[0]=1,t[1]=0,t[2]=0),r},s.add=o.add,s.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1],u=r[2],c=r[3];return t[0]=n*c+o*s+i*u-a*l,t[1]=i*c+o*l+a*s-n*u,t[2]=a*c+o*u+n*l-i*s,t[3]=o*c-n*s-i*l-a*u,t},s.mul=s.multiply,s.scale=o.scale,s.rotateX=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+o*s,t[1]=i*l+a*s,t[2]=a*l-i*s,t[3]=o*l-n*s,t},s.rotateY=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l-a*s,t[1]=i*l+o*s,t[2]=a*l+n*s,t[3]=o*l-i*s,t},s.rotateZ=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+i*s,t[1]=i*l-n*s,t[2]=a*l+o*s,t[3]=o*l-a*s,t},s.calculateW=function(t,e){var r=e[0],n=e[1],i=e[2];return t[0]=r,t[1]=n,t[2]=i,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),t},s.dot=o.dot,s.lerp=o.lerp,s.slerp=function(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=u*d+c*p+h*m+f*g,a<0&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*h+l*m,t[3]=s*f+l*g,t},s.sqlerp=function(){var t=s.create(),e=s.create();return function(r,n,i,a,o,l){return s.slerp(t,n,o,l),s.slerp(e,i,a,l),s.slerp(r,t,e,2*l*(1-l)),r}}(),s.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a,s=o?1/o:0;return t[0]=-r*s,t[1]=-n*s,t[2]=-i*s,t[3]=a*s,t},s.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},s.length=o.length,s.len=s.length,s.squaredLength=o.squaredLength,s.sqrLen=s.squaredLength,s.normalize=o.normalize,s.fromMat3=function(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(e[3*i+i]-e[3*a+a]-e[3*o+o]+1),t[i]=.5*r,r=.5/r,t[3]=(e[3*a+o]-e[3*o+a])*r,t[a]=(e[3*a+i]+e[3*i+a])*r,t[o]=(e[3*o+i]+e[3*i+o])*r}return t},s.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},s.exactEquals=o.exactEquals,s.equals=o.equals,e.exports=s},{"./common.js":185,"./mat3.js":188,"./vec3.js":192,"./vec4.js":193}],191:[function(t,e,r){var n=t("./common.js"),i={};i.create=function(){var t=new n.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},i.fromValues=function(t,e){var r=new n.ARRAY_TYPE(2);return r[0]=t,r[1]=e,r},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},i.set=function(t,e,r){return t[0]=e,t[1]=r,t},i.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t},i.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t},i.sub=i.subtract,i.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},i.mul=i.multiply,i.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},i.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},i.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t},i.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)},i.dist=i.distance,i.squaredDistance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1];return Math.sqrt(e*e+r*r)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1];return e*e+r*r},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},i.cross=function(t,e,r){var n=e[0]*r[1]-e[1]*r[0];return t[0]=t[1]=0,t[2]=n,t},i.lerp=function(t,e,r,n){var i=e[0],a=e[1];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t},i.random=function(t,e){e=e||1;var r=2*n.RANDOM()*Math.PI;return t[0]=Math.cos(r)*e,t[1]=Math.sin(r)*e,t},i.transformMat2=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t},i.transformMat2d=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t},i.transformMat3=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[3]*i+r[6],t[1]=r[1]*n+r[4]*i+r[7],t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=2),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},i.cross=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t},i.lerp=function(t,e,r,n){var i=e[0],a=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t},i.hermite=function(t,e,r,n,i,a){var o=a*a,s=o*(2*a-3)+1,l=o*(a-2)+a,u=o*(a-1),c=o*(3-2*a);return t[0]=e[0]*s+r[0]*l+n[0]*u+i[0]*c,t[1]=e[1]*s+r[1]*l+n[1]*u+i[1]*c,t[2]=e[2]*s+r[2]*l+n[2]*u+i[2]*c,t},i.bezier=function(t,e,r,n,i,a){var o=1-a,s=o*o,l=a*a,u=s*o,c=3*a*s,h=3*l*o,f=l*a;return t[0]=e[0]*u+r[0]*c+n[0]*h+i[0]*f,t[1]=e[1]*u+r[1]*c+n[1]*h+i[1]*f,t[2]=e[2]*u+r[2]*c+n[2]*h+i[2]*f,t},i.random=function(t,e){e=e||1;var r=2*n.RANDOM()*Math.PI,i=2*n.RANDOM()-1,a=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*e,t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t},i.transformMat3=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t},i.transformQuat=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,h=u*i+l*n-o*a,f=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+h*-l-f*-s,t[1]=h*u+d*-s+f*-o-c*-l,t[2]=f*u+d*-l+c*-s-h*-o,t},i.rotateX=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.rotateY=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.rotateZ=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=3),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s1?0:Math.acos(a)},i.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(l))},e.exports=i},{"./common.js":185}],193:[function(t,e,r){var n=t("./common.js"),i={};i.create=function(){var t=new n.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},i.fromValues=function(t,e,r,i){var a=new n.ARRAY_TYPE(4);return a[0]=t,a[1]=e,a[2]=r,a[3]=i,a},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},i.set=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t},i.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t},i.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t},i.sub=i.subtract,i.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t},i.mul=i.multiply,i.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},i.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t},i.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},i.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)},i.dist=i.distance,i.squaredDistance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},i.lerp=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t},i.random=function(t,e){return e=e||1,t[0]=n.RANDOM(),t[1]=n.RANDOM(),t[2]=n.RANDOM(),t[3]=n.RANDOM(),i.normalize(t,t),i.scale(t,t,e),t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t},i.transformQuat=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,h=u*i+l*n-o*a,f=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+h*-l-f*-s,t[1]=h*u+d*-s+f*-o-c*-l,t[2]=f*u+d*-l+c*-s-h*-o,t[3]=e[3],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=4),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s1.0001)return null;g+=m[c]}return Math.abs(g-1)>.001?null:[h,o(t,m),m]}var l=t("barycentric"),u=t("polytope-closest-point/lib/closest_point_2d.js");e.exports=s},{barycentric:41,"polytope-closest-point/lib/closest_point_2d.js":474}],195:[function(t,e,r){var n="precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if(any(lessThan(f_position, clipBounds[0])) || \n any(greaterThan(f_position, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = vec4(pickId, f_id.xyz);\n}";r.meshShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec4 m_position = model * vec4(position, 1.0);\n vec4 t_position = view * m_position;\n gl_Position = projection * t_position;\n f_color = color;\n f_normal = normal;\n f_data = position;\n f_eyeDirection = eyePosition - position;\n f_lightDirection = lightPosition - position;\n f_uv = uv;\n}", +fragment:"precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution_2_0(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\n\n\nfloat cookTorranceSpecular_1_1(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution_2_0(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(f_data, clipBounds[0])) || \n any(greaterThan(f_data, clipBounds[1]))) {\n discard;\n }\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n \n if(!gl_FrontFacing) {\n N = -N;\n }\n\n float specular = cookTorranceSpecular_1_1(L, V, N, roughness, fresnel);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(f_data, clipBounds[0])) || \n any(greaterThan(f_data, clipBounds[1]))) {\n discard;\n }\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(position, clipBounds[0])) || \n any(greaterThan(position, clipBounds[1]))) {\n gl_Position = vec4(0,0,0,0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5,0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}",fragment:n,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if(any(lessThan(position, clipBounds[0])) || \n any(greaterThan(position, clipBounds[1]))) {\n gl_Position = vec4(0,0,0,0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}",fragment:n,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor,1);\n}\n",attributes:[{name:"position",type:"vec3"}]}},{}],196:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l,u,c,h,f,d,p,m,g,v,y,b,x,_,w,M,k,A,T){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=c,this.triangleNormals=f,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=b,this.pointColors=_,this.pointUVs=w,this.pointSizes=M,this.pointIds=x,this.pointVAO=k,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=A,this.contourVAO=T,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this._model=I,this._view=I,this._projection=I,this._resolution=[1,1]}function i(t){for(var e=w({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return _(r,[256,256,4],[4,0,1])}function a(t,e,r){for(var n=new Array(e),i=0;i=1},P.isTransparent=function(){return this.opacity<1},P.pickSlots=1,P.setPickBase=function(t){this.pickId=t},P.highlight=function(t){if(!t||!this.contourEnable)return void(this.contourCount=0);for(var e=M(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=k.mallocFloat32(6*a),s=0,l=0;l0){var f=this.triShader;f.bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var f=this.lineShader;f.bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){var f=this.pointShader;f.bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var f=this.contourShader;f.bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind()}},P.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||I,n=t.view||I,i=t.projection||I,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255},l=this.pickShader;if(l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0){var l=this.pointPickShader;l.bind(),l.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}},P.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;as[k]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n],a.uniforms.angle=v[n],u.drawArrays(u.TRIANGLES,s[k],s[A]-s[k]))),y[n]&&M&&(e[1^n]-=T*d*b[n],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=x[n],a.uniforms.angle=_[n],u.drawArrays(u.TRIANGLES,w,M)),e[1^n]=T*c[2+(1^n)]-1,p[n+2]&&(e[1^n]+=T*d*m[n+2],ks[k]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n+2],a.uniforms.angle=v[n+2],u.drawArrays(u.TRIANGLES,s[k],s[A]-s[k]))),y[n+2]&&M&&(e[1^n]+=T*d*b[n+2],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=x[n+2],a.uniforms.angle=_[n+2],u.drawArrays(u.TRIANGLES,w,M))}}(),c.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,u=r.pixelRatio;if(this.titleCount){for(var c=0;c<2;++c)e[c]=2*(o[c]*u-a[c])/(a[2+c]-a[c])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),c.bind=function(){var t=[0,0],e=[0,0],r=[0,0];return function(){var n=this.plot,i=this.shader,a=n._tickBounds,o=n.dataBox,s=n.screenBox,l=n.viewBox;i.bind();for(var u=0;u<2;++u){var c=a[u],h=a[u+2],f=h-c,d=.5*(o[u+2]+o[u]),p=o[u+2]-o[u],m=l[u],g=l[u+2],v=g-m,y=s[u],b=s[u+2],x=b-y;e[u]=2*f/p*v/x,t[u]=2*(c-d)/p*v/x}r[1]=2*n.pixelRatio/(s[3]-s[1]),r[0]=r[1]*(s[3]-s[1])/(s[2]-s[0]),i.uniforms.dataScale=e,i.uniforms.dataShift=t,i.uniforms.textScale=r,this.vbo.bind(),i.attributes.textCoordinate.pointer()}}(),c.update=function(t){var e,r,n,i,a,o=[],l=t.ticks,u=t.bounds;for(a=0;a<2;++a){var c=[Math.floor(o.length/3)],h=[-1/0],f=l[a];for(e=0;er)for(t=r;te)for(t=e;t=0){for(var k=0|M.type.charAt(M.type.length-1),A=new Array(k),T=0;T=0;)S+=1;w[b]=S}var E=new Array(r.length);a(),d._relink=a,d.types={uniforms:l(r),attributes:l(n)},d.attributes=s(p,d,x,w),Object.defineProperty(d,"uniforms",o(p,d,r,E))},e.exports=a},{"./lib/GLError":204,"./lib/create-attributes":205,"./lib/create-uniforms":206,"./lib/reflect":207,"./lib/runtime-reflect":208,"./lib/shader-cache":209}],204:[function(t,e,r){function n(t,e,r){this.shortMessage=e||"",this.longMessage=r||"",this.rawError=t||"",this.message="gl-shader: "+(e||t||"")+(r?"\n"+r:""),this.stack=(new Error).stack}n.prototype=new Error,n.prototype.name="GLError",n.prototype.constructor=n,e.exports=n},{}],205:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}function i(t,e,r,i,a,o,s){for(var l=["gl","v"],u=[],c=0;c=0){var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+h+": "+f);i(t,e,d[0],n,p,o,h)}else{if(!(f.indexOf("mat")>=0))throw new s("","Unknown data type for attribute "+h+": "+f);var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+h+": "+f);a(t,e,d,n,p,o,h)}}}return o}e.exports=o;var s=t("./GLError"),l=n.prototype;l.pointer=function(t,e,r,n){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,t||a.FLOAT,!!e,r||0,n||0),a.enableVertexAttribArray(o)},l.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(l,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}})},{"./GLError":204}],206:[function(t,e,r){"use strict";function n(t){return new Function("y","return function(){return y}")(t)}function i(t,e){for(var r=new Array(t),n=0;n4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+i+"fv(locations["+e+"],false,obj"+t+")"}throw new s("","Unknown uniform data type for "+name+": "+r)}var i=r.charCodeAt(r.length-1)-48;if(i<2||i>4)throw new s("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+i+"iv(locations["+e+"],obj"+t+")";case"v":return"gl.uniform"+i+"fv(locations["+e+"],obj"+t+")";default:throw new s("","Unrecognized data type for vector "+name+": "+r)}}}function c(t,e){if("object"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],a=t;parseInt(n)+""===n?a+="["+n+"]":a+="."+n,"object"==typeof i?r.push.apply(r,c(a,i)):r.push([a,i])}return r}function h(e){for(var n=["return function updateProperty(obj){"],i=c("",e),o=0;o4)throw new s("","Invalid data type");return"b"===t.charAt(0)?i(r,!1):i(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+t);return i(r*r,0)}throw new s("","Unknown uniform data type for "+name+": "+t)}}function d(t,e,i){if("object"==typeof i){var o=p(i);Object.defineProperty(t,e,{get:n(o),set:h(i),enumerable:!0,configurable:!1})}else a[i]?Object.defineProperty(t,e,{get:l(i),set:h(i),enumerable:!0,configurable:!1}):t[e]=f(r[i].type)}function p(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var u=1;u1)for(var l=0;l=0){var m=e[p]-n[p]*(e[p+2]-e[p])/(n[p+2]-n[p]);0===p?o.drawLine(m,e[1],m,e[3],d[p],f[p]):o.drawLine(e[0],m,e[2],m,d[p],f[p])}}for(var p=0;p=0;--t)this.objects[t].dispose();this.objects.length=0;for(var t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},f.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},f.removeObject=function(t){for(var e=this.objects,r=0;r0){var r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function o(t){return"boolean"!=typeof t||t}function s(t){function e(){if(!w&&Y.autoResize){var t=M.parentNode,e=1,r=1;t&&t!==document.body?(e=t.clientWidth,r=t.clientHeight):(e=window.innerWidth,r=window.innerHeight);var n=0|Math.ceil(e*Y.pixelRatio),i=0|Math.ceil(r*Y.pixelRatio);if(n!==M.width||i!==M.height){M.width=n,M.height=i;var a=M.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=e+"px",a.height=r+"px",N=!0}}}function r(){for(var t=O.length,e=F.length,r=0;r0&&0===j[e-1];)j.pop(),F.pop().dispose()}function s(){if(Y.contextLost)return!0;A.isContextLost()&&(Y.contextLost=!0,Y.mouseListener.enabled=!1,Y.selection.object=null,Y.oncontextloss&&Y.oncontextloss())}function b(){if(!s()){A.colorMask(!0,!0,!0,!0),A.depthMask(!0),A.disable(A.BLEND),A.enable(A.DEPTH_TEST);for(var t=O.length,e=F.length,r=0;rS.distance)continue;for(var u=0;u>>1;for(r=0;r=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}function a(t,e){var r=t.gl,i=s(r),a=s(r),l=o(r,u.pointVertex,u.pointFragment),c=o(r,u.pickVertex,u.pickFragment),h=new n(t,i,a,l,c);return h.update(e),t.addObject(h),h}var o=t("gl-shader"),s=t("gl-buffer"),l=t("typedarray-pool"),u=t("./lib/shader");e.exports=a;var c=n.prototype;c.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},c.update=function(t){function e(e,r){return e in t?t[e]:r}var r;t=t||{},this.sizeMin=e("sizeMin",.5),this.sizeMax=e("sizeMax",20),this.color=e("color",[1,0,0,1]).slice(),this.areaRatio=e("areaRatio",1),this.borderColor=e("borderColor",[0,0,0,1]).slice(),this.blend=e("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,a=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,o=t.positions,s=i?o:l.mallocFloat32(o.length),u=a?t.idToIndex:l.mallocInt32(n);if(i||s.set(o),!a)for(s.set(o),r=0;r>8&255,e[2]=r>>16&255,e[3]=r>>24&255,this.pickBuffer.bind(),a.attributes.pickId.pointer(o.UNSIGNED_BYTE),a.uniforms.pickOffset=e,this.pickOffset=r);var f=o.getParameter(o.BLEND),d=o.getParameter(o.DITHER);return f&&!this.blend&&o.disable(o.BLEND),d&&o.disable(o.DITHER),o.drawArrays(o.POINTS,0,this.pointCount),f&&!this.blend&&o.enable(o.BLEND),d&&o.enable(o.DITHER),r+this.pointCount}}(),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{"./lib/shader":213,"gl-buffer":148,"gl-shader":214,"typedarray-pool":528}],222:[function(t,e,r){function n(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=u*d+c*p+h*m+f*g,a<0&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*h+l*m,t[3]=s*f+l*g,t}e.exports=n},{}],223:[function(t,e,r){"use strict";e.exports={ +vertex:"precision highp float;\n#define GLSLIFY 1\n\n\nvec4 computePosition_1_0(vec2 posHi, vec2 posLo, vec2 scHi, vec2 scLo, vec2 trHi, vec2 trLo) {\n return vec4((posHi + trHi) * scHi\n \t\t\t//FIXME: this thingy does not give noticeable precision gain, need test\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo\n , 0, 1);\n}\n\n\nattribute vec2 positionHi, positionLo;\nattribute float size, border;\nattribute vec2 char, color;\n\n//this is 64-bit form of scale and translate\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform float pixelRatio;\nuniform vec4 viewBox;\nuniform sampler2D palette;\n\nvarying vec4 charColor, borderColor;\nvarying vec2 charId;\nvarying vec2 pointCoord;\nvarying float pointSize;\nvarying float borderWidth;\n\n\nvoid main() {\n charColor = texture2D(palette, vec2(color.x / 255., 0));\n borderColor = texture2D(palette, vec2(color.y / 255., 0));\n\n gl_PointSize = size * pixelRatio;\n pointSize = size * pixelRatio;\n\n charId = char;\n borderWidth = border;\n\n gl_Position = computePosition_1_0(\n positionHi, positionLo,\n scaleHi, scaleLo,\n translateHi, translateLo);\n\n pointCoord = viewBox.xy + (viewBox.zw - viewBox.xy) * (gl_Position.xy * .5 + .5);\n}\n",fragment:"precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D chars;\nuniform vec2 charsShape;\nuniform float charsStep, pixelRatio, charOffset;\n\nvarying vec4 borderColor;\nvarying vec4 charColor;\nvarying vec2 charId;\nvarying vec2 pointCoord;\nvarying float pointSize;\nvarying float borderWidth;\n\nvoid main() {\n\tvec2 pointUV = (pointCoord - gl_FragCoord.xy + pointSize * .5) / pointSize;\n\tpointUV.x = 1. - pointUV.x;\n\tpointUV.y += charOffset;\n\tvec2 texCoord = ((charId + pointUV) * charsStep) / charsShape;\n\tfloat dist = texture2D(chars, texCoord).r;\n\n\t//max-distance alpha\n\tif (dist < 1e-2)\n\t\tdiscard;\n\n\tfloat dif = 5. * pixelRatio * borderWidth / pointSize;\n\tfloat borderLevel = .748 - dif * .5;\n\tfloat charLevel = .748 + dif * .5;\n\tfloat gamma = .005 * charsStep / pointSize;\n\n\tfloat borderAmt = smoothstep(borderLevel - gamma, borderLevel + gamma, dist);\n\tfloat charAmt = smoothstep(charLevel - gamma, charLevel + gamma, dist);\n\n\tvec4 color = borderColor;\n\tcolor.a *= borderAmt;\n\n\tgl_FragColor = mix(color, charColor, charAmt);\n}\n",pickVertex:"precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 positionHi, positionLo;\nattribute vec4 id;\nattribute float size;\n\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform vec4 pickOffset;\nuniform float pixelRatio;\n\nvarying vec4 fragColor;\n\n\nvec4 computePosition_1_0(vec2 posHi, vec2 posLo, vec2 scHi, vec2 scLo, vec2 trHi, vec2 trLo) {\n return vec4((posHi + trHi) * scHi\n \t\t\t//FIXME: this thingy does not give noticeable precision gain, need test\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo\n , 0, 1);\n}\n\n\nvoid main() {\n vec4 fragId = id + pickOffset;\n\n fragId.y += floor(fragId.x / 256.0);\n fragId.x -= floor(fragId.x / 256.0) * 256.0;\n\n fragId.z += floor(fragId.y / 256.0);\n fragId.y -= floor(fragId.y / 256.0) * 256.0;\n\n fragId.w += floor(fragId.z / 256.0);\n fragId.z -= floor(fragId.z / 256.0) * 256.0;\n\n fragColor = fragId / 255.0;\n\n gl_PointSize = size * .25 * pixelRatio;\n\n gl_Position = computePosition_1_0(\n positionHi, positionLo,\n scaleHi, scaleLo,\n translateHi, translateLo);\n}\n",pickFragment:"precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n gl_FragColor = fragColor;\n}\n"}},{}],224:[function(t,e,r){arguments[4][76][0].apply(r,arguments)},{dup:76}],225:[function(t,e,r){arguments[4][203][0].apply(r,arguments)},{"./lib/GLError":226,"./lib/create-attributes":227,"./lib/create-uniforms":228,"./lib/reflect":229,"./lib/runtime-reflect":230,"./lib/shader-cache":231,dup:203}],226:[function(t,e,r){arguments[4][204][0].apply(r,arguments)},{dup:204}],227:[function(t,e,r){arguments[4][205][0].apply(r,arguments)},{"./GLError":226,dup:205}],228:[function(t,e,r){arguments[4][206][0].apply(r,arguments)},{"./GLError":226,"./reflect":229,dup:206}],229:[function(t,e,r){arguments[4][207][0].apply(r,arguments)},{dup:207}],230:[function(t,e,r){arguments[4][208][0].apply(r,arguments)},{dup:208}],231:[function(t,e,r){arguments[4][209][0].apply(r,arguments)},{"./GLError":226,dup:209,"gl-format-compiler-error":156,"weakmap-shim":549}],232:[function(t,e,r){"use strict";function n(t,e,r,n,a){a<=4*f?i(0,a-1,t,e,r,n):h(0,a-1,t,e,r,n)}function i(t,e,r,n,i,a){for(var o=t+1;o<=e;++o){for(var s=r[o],l=n[2*o],u=n[2*o+1],c=i[o],h=a[o],f=o;f>t;){var d=r[f-1],p=n[2*(f-1)];if((d-s||l-p)>=0)break;r[f]=d,n[2*f]=p,n[2*f+1]=n[2*f-1],i[f]=i[f-1],a[f]=a[f-1],f-=1}r[f]=s,n[2*f]=l,n[2*f+1]=u,i[f]=c,a[f]=h}}function a(t,e,r,n,i,a){var o=r[t],s=n[2*t],l=n[2*t+1],u=i[t],c=a[t];r[t]=r[e],n[2*t]=n[2*e],n[2*t+1]=n[2*e+1],i[t]=i[e],a[t]=a[e],r[e]=o,n[2*e]=s,n[2*e+1]=l,i[e]=u,a[e]=c}function o(t,e,r,n,i,a){r[t]=r[e],n[2*t]=n[2*e],n[2*t+1]=n[2*e+1],i[t]=i[e],a[t]=a[e]}function s(t,e,r,n,i,a,o){var s=n[t],l=i[2*t],u=i[2*t+1],c=a[t],h=o[t];n[t]=n[e],i[2*t]=i[2*e],i[2*t+1]=i[2*e+1],a[t]=a[e],o[t]=o[e],n[e]=n[r],i[2*e]=i[2*r],i[2*e+1]=i[2*r+1],a[e]=a[r],o[e]=o[r],n[r]=s,i[2*r]=l,i[2*r+1]=u,a[r]=c,o[r]=h}function l(t,e,r,n,i,a,o,s,l,u,c){s[t]=s[e],l[2*t]=l[2*e],l[2*t+1]=l[2*e+1],u[t]=u[e],c[t]=c[e],s[e]=r,l[2*e]=n,l[2*e+1]=i,u[e]=a,c[e]=o}function u(t,e,r,n,i){return(r[t]-r[e]||n[2*e]-n[2*t]||i[t]-i[e])<0}function c(t,e,r,n,i,a,o,s){return(e-a[t]||o[2*t]-r||i-s[t])<0}function h(t,e,r,n,d,p){var m=(e-t+1)/6|0,g=t+m,v=e-m,y=t+e>>1,b=y-m,x=y+m,_=g,w=b,M=y,k=x,A=v,T=t+1,S=e-1,E=0;u(_,w,r,n,d,p)&&(E=_,_=w,w=E),u(k,A,r,n,d,p)&&(E=k,k=A,A=E),u(_,M,r,n,d,p)&&(E=_,_=M,M=E),u(w,M,r,n,d,p)&&(E=w,w=M,M=E),u(_,k,r,n,d,p)&&(E=_,_=k,k=E),u(M,k,r,n,d,p)&&(E=M,M=k,k=E),u(w,A,r,n,d,p)&&(E=w,w=A,A=E),u(w,M,r,n,d,p)&&(E=w,w=M,M=E),u(k,A,r,n,d,p)&&(E=k,k=A,A=E);var L=r[w],C=n[2*w],z=n[2*w+1],D=d[w],I=p[w],P=r[k],O=n[2*k],R=n[2*k+1],j=d[k],F=p[k],N=_,B=M,U=A,V=g,q=y,H=v,Y=r[N],G=r[B],X=r[U];r[V]=Y,r[q]=G,r[H]=X;for(var W=0;W<2;++W){var Z=n[2*N+W],J=n[2*B+W],K=n[2*U+W];n[2*V+W]=Z,n[2*q+W]=J,n[2*H+W]=K}var Q=d[N],$=d[B],tt=d[U];d[V]=Q,d[q]=$,d[H]=tt;var et=p[N],rt=p[B],nt=p[U];p[V]=et,p[q]=rt,p[H]=nt,o(b,t,r,n,d,p),o(x,e,r,n,d,p);for(var it=T;it<=S;++it)if(c(it,L,C,z,D,r,n,d))it!==T&&a(it,T,r,n,d,p),++T;else if(!c(it,P,O,R,j,r,n,d))for(;;){if(c(S,P,O,R,j,r,n,d)){c(S,L,C,z,D,r,n,d)?(s(it,T,S,r,n,d,p),++T,--S):(a(it,S,r,n,d,p),--S);break}if(--S=Math.max(.9*d,32)){var b=u+s>>>1;l(g,v,h,f,b,c+1),f=b}l(g,v,h,f,y,c+1),f=y}}}var u=t.length>>>1;if(u<1)return[];for(var c=1/0,h=1/0,f=-1/0,d=-1/0,p=0;p=0;--_){t[2*_]=(t[2*_]-c)*v,t[2*_+1]=(t[2*_+1]-h)*y;var A=x[_];A!==M&&(w.push(new i(b*Math.pow(.5,A),_+1,k-(_+1))),k=_+1,M=A)}return w.push(new i(b*Math.pow(.5,A+1),0,k)),o.free(x),w}var o=t("typedarray-pool"),s=t("./lib/sort");e.exports=a},{"./lib/sort":232,"typedarray-pool":528}],234:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.sizeBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.charBuffer=s,this.pointCount=0,this.pickOffset=0,this.points=null,this.scales=[],this.xCoords=[],this.charCanvas=document.createElement("canvas"),this.charTexture=h(this.plot.gl,this.charCanvas),this.charStep=400,this.charOffset=.032,this.snapThreshold=1e4,this.paletteTexture=h(this.plot.gl,[256,1])}function i(t,e){var r=t.gl,i=a(r,l.vertex,l.fragment),s=a(r,l.pickVertex,l.pickFragment),u=o(r),c=o(r),h=o(r),f=o(r),d=o(r),p=new n(t,i,s,u,c,h,f,d);return p.update(e),t.addObject(p),p}e.exports=i;var a=t("gl-shader"),o=t("gl-buffer"),s=t("typedarray-pool"),l=t("./lib/shaders"),u=t("snap-points-2d"),c=t("font-atlas-sdf"),h=t("gl-texture2d"),f=t("color-id"),d=t("ndarray"),p=t("clamp"),m=t("binary-search-bounds"),g=n.prototype;!function(){function t(){var t=this.plot,u=t.viewBox,c=t.dataBox,h=t.pixelRatio,f=c[2]-c[0],d=c[3]-c[1],p=2/f,m=2/d,g=-c[0]-.5*f,v=-c[1]-.5*d;i[0]=p,a[0]=p-i[0],i[1]=m,a[1]=m-i[1],o[0]=g,s[0]=g-o[0],o[1]=v,s[1]=v-o[1];var y=u[2]-u[0],b=u[3]-u[1];e=Math.min(f/y,d/b),l[0]=2*h/y,l[1]=2*h/b,r=c[0],n=c[2]}var e,r,n,i=new Float32Array([0,0]),a=new Float32Array([0,0]),o=new Float32Array([0,0]),s=new Float32Array([0,0]),l=[0,0],u=[0,0,0,0];g.drawPick=function(l){var c=void 0!==l,h=this.plot,f=this.pointCount,d=f>this.snapThreshold;if(!f)return l;t.call(this);var p=h.gl,g=c?this.pickShader:this.shader,v=p.isEnabled(p.BLEND);if(g.bind(),c){this.pickOffset=l;for(var y=0;y<4;++y)u[y]=l>>8*y&255;g.uniforms.pickOffset=u,this.idBuffer.bind(),g.attributes.id.pointer(p.UNSIGNED_BYTE,!1)}else p.blendFuncSeparate(p.SRC_ALPHA,p.ONE_MINUS_SRC_ALPHA,p.ONE,p.ONE_MINUS_SRC_ALPHA),p.blendColor(0,0,0,1),v||p.enable(p.BLEND),this.colorBuffer.bind(),g.attributes.color.pointer(p.UNSIGNED_BYTE,!1),this.charBuffer.bind(),g.attributes.char.pointer(p.UNSIGNED_BYTE,!1),g.uniforms.chars=this.charTexture.bind(0),g.uniforms.charsShape=[this.charCanvas.width,this.charCanvas.height],g.uniforms.charsStep=this.charStep,g.uniforms.palette=this.paletteTexture.bind(1),g.uniforms.charOffset=this.charOffset;this.sizeBuffer.bind(),g.attributes.size.pointer(p.FLOAT,!1,8,0),c||g.attributes.border.pointer(p.FLOAT,!1,8,4),this.positionBuffer.bind(),g.attributes.positionHi.pointer(p.FLOAT,!1,16,0),g.attributes.positionLo.pointer(p.FLOAT,!1,16,8),g.uniforms.pixelRatio=h.pixelRatio,g.uniforms.scaleHi=i,g.uniforms.scaleLo=a,g.uniforms.translateHi=o,g.uniforms.translateLo=s,g.uniforms.viewBox=h.viewBox;var b=this.scales;if(d)for(var x=b.length-1;x>=0;x--){var _=b[x];if(!(_.pixelSize&&_.pixelSize<1.25*e&&x>1)){var w=_.offset,M=_.count+w,k=m.ge(this.xCoords,r,w,M-1),A=m.lt(this.xCoords,n,k,M-1)+1;A>k&&p.drawArrays(p.POINTS,k,A-k)}}else p.drawArrays(p.POINTS,0,f);if(c)return l+f;v?p.blendFunc(p.ONE,p.ONE_MINUS_SRC_ALPHA):p.disable(p.BLEND)}}(),g.draw=g.drawPick,g.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}},g.update=function(t){t=t||{};var e=t.positions||[],r=t.colors||[],n=t.glyphs||[],i=t.sizes||[],a=t.borderWidths||[],o=t.borderColors||[],l=this.plot.gl;null!=t.charOffset&&(this.charOffset=t.charOffset),this.points=e;var h=this.points.length/2,m=s.mallocInt32(h),g=s.mallocFloat32(2*h),v=s.mallocFloat64(2*h);v.set(this.points),this.pointCount=h;var y=h>this.snapThreshold;y&&(this.scales=u(v,m,g));for(var b=s.mallocFloat32(4*h),x=s.mallocFloat32(2*h),_=s.mallocUint8(2*h),w=s.mallocUint32(h),M=s.mallocUint8(2*h),k={},A=[],T=[],S=[],E=0,L=h,C=0;EO&&(O=i[E]);var R=this.charStep;this.charStep=p(Math.ceil(4*O),128,768);var j=Object.keys(I),F=this.charStep,N=Math.floor(F/2),B=l.getParameter(l.MAX_TEXTURE_SIZE),U=B/F*(B/F),V=Math.min(B,F*j.length),q=Math.min(B,F*Math.ceil(F*j.length/B)),H=Math.floor(V/F);j.length>U&&console.warn("gl-scatter2d-fancy: number of characters is more than maximum texture size. Try reducing it."),this.chars&&this.chars+""==j+""&&this.charStep==R||(this.charCanvas=c({canvas:this.charCanvas,family:"sans-serif",size:N,shape:[V,q],step:[F,F],chars:j}),this.chars=j);for(var E=0;E>>1,n=u.mallocInt32(r),i=u.mallocFloat32(2*r),a=u.mallocFloat64(2*r);a.set(this.points),this.scales=l(a,n,i,this.bounds);var o=u.mallocFloat64(r),s=u.mallocFloat32(2*r),c=u.mallocFloat32(2*r);s.set(a);for(var h=0,f=0;h>8&255,g[2]=t>>16&255,g[3]=t>>24&255,n.uniforms.pickOffset=g,l.bind(),n.attributes.pickId.pointer(v.UNSIGNED_BYTE)):(n.uniforms.useWeight=1,this.weightBuffer.bind(),n.attributes.weight.pointer());for(var D=this.xCoords,I=(x[0]-u[0]-S*c*y)/_,P=(x[2]-u[0]+S*c*y)/_,O=!0,R=i.length-1;R>=0;R--){var j=i[R];if(!(j.pixelSize1)){var F=j.offset,N=j.count+F,B=s.ge(D,I,F,N-1),U=s.lt(D,P,B,N-1)+1;U>B&&v.drawArrays(v.POINTS,B,U-B),!e&&O&&(O=!1,n.uniforms.useWeight=0)}}return t+this.pointCount},h.drawPick=h.draw,h.pick=function(t,e,r){var n=r-this.pickOffset;return n<0||n>=this.pointCount?null:{object:this,pointId:n,dataCoord:[this.points[2*n],this.points[2*n+1]]}}},{"./lib/shader":235,"binary-search-bounds":236,"gl-buffer":148,"gl-shader":246,"snap-points-2d":238,"typedarray-pool":528}],240:[function(t,e,r){"use strict";function n(t,e){var r=a[e];if(r||(r=a[e]={}),t in r)return r[t];for(var n=i(t,{textAlign:"center",textBaseline:"middle",lineHeight:1,font:e}),o=i(t,{triangles:!0,textAlign:"center",textBaseline:"middle",lineHeight:1,font:e}),s=[[1/0,1/0],[-1/0,-1/0]],l=0;lMath.abs(R[1])){var j=O;O=R,R=j,j=I,I=P,P=j;var F=z;z=D,D=F}O[0]<0&&(I[z]=-1),R[1]>0&&(P[D]=-1);for(var N=0,B=0,C=0;C<4;++C)N+=Math.pow(p[4*z+C],2),B+=Math.pow(p[4*D+C],2);I[z]/=Math.sqrt(N),P[D]/=Math.sqrt(B),d.axes[0]=I,d.axes[1]=P,d.fragClipBounds[0]=u(E,b[0],_,-1e8),d.fragClipBounds[1]=u(E,b[1],_,1e8),e.vao.draw(f.TRIANGLES,e.vertexCount),e.lineWidth>0&&(f.lineWidth(e.lineWidth),e.vao.draw(f.LINES,e.lineVertexCount,e.vertexCount))}}function f(t,e,r,n,i,a){var o=r.gl;if(r.vao.bind(),i===r.opacity<1||a){t.bind();var s=t.uniforms;s.model=n.model||x,s.view=n.view||x,s.projection=n.projection||x,w[0]=2/o.drawingBufferWidth,w[1]=2/o.drawingBufferHeight,s.screenSize=w,s.highlightId=r.highlightId,s.highlightScale=r.highlightScale,s.fragClipBounds=D,s.clipBounds=r.axes.bounds,s.opacity=r.opacity,s.pickGroup=r.pickId/255,s.pixelRatio=r.pixelRatio,r.vao.draw(o.TRIANGLES,r.vertexCount),r.lineWidth>0&&(o.lineWidth(r.lineWidth),r.vao.draw(o.LINES,r.lineVertexCount,r.vertexCount))}h(e,r,n,i,a),r.vao.unbind()}function d(t){var e=t.gl,r=y.createPerspective(e),n=y.createOrtho(e),i=y.createProject(e),a=y.createPickPerspective(e),s=y.createPickOrtho(e),l=y.createPickProject(e),u=p(e),c=p(e),h=p(e),f=p(e),d=m(e,[{buffer:u,size:3,type:e.FLOAT},{buffer:c,size:4,type:e.FLOAT},{buffer:h,size:2,type:e.FLOAT},{buffer:f,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),g=new o(e,r,n,i,u,c,h,f,d,a,s,l);return g.update(t),g}var p=t("gl-buffer"),m=t("gl-vao"),g=t("typedarray-pool"),v=t("gl-mat4/multiply"),y=t("./lib/shaders"),b=t("./lib/glyphs"),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];e.exports=d;var _=o.prototype;_.pickSlots=1,_.setPickBase=function(t){this.pickId=t},_.isTransparent=function(){if(this.opacity<1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]<1)return!0;return!1},_.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]>=1)return!0;return!1};var w=[0,0],M=[0,0,0],k=[0,0,0],A=[0,0,0,1],T=[0,0,0,1],S=x.slice(),E=[0,0,0],L=[[0,0,0],[0,0,0]],C=[-1e8,-1e8,-1e8],z=[1e8,1e8,1e8],D=[C,z];_.draw=function(t){f(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!1,!1)},_.drawTransparent=function(t){f(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!0,!1)},_.drawPick=function(t){f(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,!1,!0)},_.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[2]+(t.value[1]<<8)+(t.value[0]<<16);if(e>=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},_.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},_.update=function(t){if(t=t||{},"perspective"in t&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if("projectOpacity"in t)if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{var r=+t.projectOpacity;this.projectOpacity=[r,r,r]}"opacity"in t&&(this.opacity=t.opacity),this.dirty=!0;var n=t.position;if(n){var i=t.font||"normal",a=t.alignment||[0,0],o=[1/0,1/0,1/0],s=[-1/0,-1/0,-1/0],l=t.glyph,u=t.color,c=t.size,h=t.angle,f=t.lineColor,d=0,p=0,m=0,v=n.length;t:for(var y=0;y0&&(z[0]=-a[0]*(1+A[0][0]));for(var q=M.cells,H=M.positions,_=0;_0){var v=r*c;o.drawBox(h-v,f-v,d+v,f+v,a),o.drawBox(h-v,p-v,d+v,p+v,a),o.drawBox(h-v,f-v,h+v,p+v,a),o.drawBox(d-v,f-v,d+v,p+v,a)}}}},l.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},l.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":243,"gl-buffer":148,"gl-shader":246}],245:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function i(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}function a(t,e){return new i(t,o(t,e),s.mallocUint8(e[0]*e[1]*4))}e.exports=a;var o=t("gl-fbo"),s=t("typedarray-pool"),l=t("ndarray"),u=t("bit-twiddle").nextPow2,c=t("cwise/lib/wrapper")({args:["array",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},"scalar","scalar","index"],pre:{body:"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},body:{body:"{if(_inline_31_arg0_<255||_inline_31_arg1_<255||_inline_31_arg2_<255||_inline_31_arg3_<255){var _inline_31_l=_inline_31_arg4_-_inline_31_arg6_[0],_inline_31_a=_inline_31_arg5_-_inline_31_arg6_[1],_inline_31_f=_inline_31_l*_inline_31_l+_inline_31_a*_inline_31_a;_inline_31_fthis.buffer.length){s.free(this.buffer);for(var n=this.buffer=s.mallocUint8(u(r*e*4)),i=0;i=0){for(var k=0|M.type.charAt(M.type.length-1),A=new Array(k),T=0;T=0;)S+=1;_[w]=S}var E=new Array(r.length);a(),d._relink=a,d.types={uniforms:l(r),attributes:l(n)},d.attributes=s(p,d,b,_),Object.defineProperty(d,"uniforms",o(p,d,r,E))},e.exports=a},{"./lib/GLError":247,"./lib/create-attributes":248,"./lib/create-uniforms":249,"./lib/reflect":250,"./lib/runtime-reflect":251,"./lib/shader-cache":252}],247:[function(t,e,r){arguments[4][204][0].apply(r,arguments)},{dup:204}],248:[function(t,e,r){arguments[4][205][0].apply(r,arguments)},{"./GLError":247,dup:205}],249:[function(t,e,r){arguments[4][206][0].apply(r,arguments)},{"./GLError":247,"./reflect":250,dup:206}],250:[function(t,e,r){arguments[4][207][0].apply(r,arguments)},{dup:207}],251:[function(t,e,r){arguments[4][208][0].apply(r,arguments)},{dup:208}],252:[function(t,e,r){arguments[4][209][0].apply(r,arguments)},{"./GLError":247,dup:209,"gl-format-compiler-error":156,"weakmap-shim":549}],253:[function(t,e,r){"use strict";function n(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}function i(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r}e.exports=i;var a=n.prototype;a.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(t){return t.slice()}),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},a.draw=function(){var t=this.enable,e=this.width,r=this.color,n=this.center,i=this.plot,a=i.line,o=i.dataBox,s=i.viewBox;if(a.bind(),o[0]<=n[0]&&n[0]<=o[2]&&o[1]<=n[1]&&n[1]<=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),u=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&&a.drawLine(l,u,s[0],u,e[0],r[0]),t[1]&&a.drawLine(l,u,l,s[1],e[1],r[1]),t[2]&&a.drawLine(l,u,s[2],u,e[2],r[2]),t[3]&&a.drawLine(l,u,l,s[3],e[3],r[3])}},a.dispose=function(){this.plot.removeOverlay(this)}},{}],254:[function(t,e,r){"use strict";var n=t("gl-shader");e.exports=function(t){return n(t,"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, color;\nattribute float weight;\n\nuniform mat4 model, view, projection;\nuniform vec3 coordinates[3];\nuniform vec4 colors[3];\nuniform vec2 screenShape;\nuniform float lineWidth;\n\nvarying vec4 fragColor;\n\nvoid main() {\n vec3 vertexPosition = mix(coordinates[0],\n mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\n\n vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\n vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\n vec2 delta = weight * clipOffset * screenShape;\n vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\n\n gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\n fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\n}\n","precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}",null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},{"gl-shader":246}],255:[function(t,e,r){"use strict";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}function i(t,e){function r(t,e,r,n,a,o){var s=[t,e,r,0,0,0,1];s[n+3]=1,s[n]=a,i.push.apply(i,s),s[6]=-1,i.push.apply(i,s),s[n]=o,i.push.apply(i,s),i.push.apply(i,s),s[6]=1,i.push.apply(i,s),s[n]=a,i.push.apply(i,s)}var i=[];r(0,0,0,0,0,1),r(0,0,0,1,0,1),r(0,0,0,2,0,1),r(1,0,0,1,-1,1),r(1,0,0,2,-1,1),r(0,1,0,0,-1,1),r(0,1,0,2,-1,1),r(0,0,1,0,-1,1),r(0,0,1,1,-1,1);var l=a(t,i),u=o(t,[{type:t.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:t.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:t.FLOAT,buffer:l,size:1,offset:24,stride:28}]),c=s(t);c.attributes.position.location=0,c.attributes.color.location=1,c.attributes.weight.location=2;var h=new n(t,l,u,c);return h.update(e),h}var a=t("gl-buffer"),o=t("gl-vao"),s=t("./shaders/index");e.exports=i;var l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],u=n.prototype,c=[0,0,0],h=[0,0,0],f=[0,0];u.isTransparent=function(){return!1},u.drawTransparent=function(t){},u.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||l,o=t.view||l,s=t.projection||l;this.axes&&(i=this.axes.lastCubeProps.axis);for(var u=c,d=h,p=0;p<3;++p)i&&i[p]<0?(u[p]=this.bounds[0][p],d[p]=this.bounds[1][p]):(u[p]=this.bounds[1][p],d[p]=this.bounds[0][p]);f[0]=e.drawingBufferWidth,f[1]=e.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=o,n.uniforms.projection=s,n.uniforms.coordinates=[this.position,u,d],n.uniforms.colors=this.colors,n.uniforms.screenShape=f;for(var p=0;p<3;++p)n.uniforms.lineWidth=this.lineWidth[p]*this.pixelRatio,this.enabled[p]&&(r.draw(e.TRIANGLES,6,6*p),this.drawSides[p]&&r.draw(e.TRIANGLES,12,18+12*p));r.unbind()},u.update=function(t){t&&("bounds"in t&&(this.bounds=t.bounds),"position"in t&&(this.position=t.position),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"colors"in t&&(this.colors=t.colors),"enabled"in t&&(this.enabled=t.enabled),"drawSides"in t&&(this.drawSides=t.drawSides))},u.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders/index":254,"gl-buffer":148,"gl-vao":262}],256:[function(t,e,r){var n=t("gl-shader"),i="precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n worldCoordinate = vec3(uv.zw, f.x);\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n",a="precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution_2_0(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\n\n\nfloat beckmannSpecular_1_1(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution_2_0(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\n\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (kill > 0.0 ||\n any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n discard;\n }\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = beckmannSpecular_1_1(L, V, N, roughness);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n",o="precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n vec4 worldPosition = model * vec4(dataCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z = clipPosition.z + zOffset;\n\n gl_Position = clipPosition;\n value = f;\n kill = -1.0;\n worldCoordinate = dataCoordinate;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n",s="precision mediump float;\n#define GLSLIFY 1\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if(kill > 0.0 ||\n any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n discard;\n }\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n";r.createShader=function(t){var e=n(t,i,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,i,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,o,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{"gl-shader":246}],257:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}function i(t){var e=x([y({colormap:t,nshades:R,format:"rgba"}).map(function(t){return[t[0],t[1],t[2],255*t[3]]})]);return b.divseq(e,255),e}function a(t,e,r,i,a,o,s,l,u,c,h,f,d,p){this.gl=t,this.shape=e,this.bounds=r,this.intensityBounds=[],this._shader=i,this._pickShader=a,this._coordinateBuffer=o,this._vao=s,this._colorMap=l,this._contourShader=u,this._contourPickShader=c,this._contourBuffer=h,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new n([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=p,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[_(v.mallocFloat(1024),[0,0]),_(v.mallocFloat(1024),[0,0]),_(v.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}function o(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||F,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=N.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],M(l,t.model,l);var u=N.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)u[i][n]=t.clipBounds[i][n];u[0][r]=-1e8,u[1][r]=1e8}return N.showSurface=o,N.showContour=s,N}function s(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=B;n.model=t.model||I,n.view=t.view||I,n.projection=t.projection||I,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.contourColor=this.contourColor[0],n.inverseModel=k(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],s=0;s<3;++s)a[s]=Math.min(Math.max(this.clipBounds[i][s],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=V,n.vertexColor=this.vertexColor;var l=U;for(M(l,n.view,n.model),M(l,n.projection,l),k(l,l),i=0;i<3;++i)n.eyePosition[i]=l[12+i]/l[15];var u=l[15];for(i=0;i<3;++i)u+=this.lightPosition[i]*l[4*i+3];for(i=0;i<3;++i){var c=l[12+i];for(s=0;s<3;++s)c+=l[4*s+i]*this.lightPosition[s];n.lightPosition[i]=c/u}var h=o(n,this);if(h.showSurface&&e===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=h.projections[i],this._shader.uniforms.clipBounds=h.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(h.showContour&&!e){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var d=this._contourVAO;for(d.bind(),i=0;i<3;++i)for(f.uniforms.permutation=O[i],r.lineWidth(this.contourWidth[i]),s=0;s=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},j.pickSlots=1,j.setPickBase=function(t){this.pickId=t};var F=[0,0,0],N={showSurface:!1,showContour:!1,projections:[I.slice(),I.slice(),I.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]},B={model:I,view:I,projection:I,inverseModel:I.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},U=I.slice(),V=[1,0,0,0,1,0,0,0,1];j.draw=function(t){return s.call(this,t,!1)},j.drawTransparent=function(t){return s.call(this,t,!0)};var q={model:I,view:I,projection:I,inverseModel:I,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};j.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=q;r.model=t.model||I,r.view=t.view||I,r.projection=t.projection||I,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.permutation=V;for(var n=0;n<2;++n)for(var i=r.clipBounds[n],a=0;a<3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);var s=o(r,this);if(s.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(e.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&(this._pickShader.uniforms.model=s.projections[n],this._pickShader.uniforms.clipBounds=s.clipBounds[n],this._vao.draw(e.TRIANGLES,this._vertexCount));this._vao.unbind()}if(s.showContour){var l=this._contourPickShader;l.bind(),l.uniforms=r;var u=this._contourVAO;for(u.bind(),a=0;a<3;++a)for(e.lineWidth(this.contourWidth[a]),l.uniforms.permutation=O[a],n=0;n>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var u=r.position;u[0]=u[1]=u[2]=0;for(var c=0;c<2;++c)for(var h=c?a:1-a,f=0;f<2;++f)for(var d=f?l:1-l,p=i+c,m=s+f,g=h*d,v=0;v<3;++v)u[v]+=this._field[v].get(p,m)*g;for(var y=this._pickResult.level,b=0;b<3;++b)if(y[b]=A.le(this.contourLevels[b],u[b]),y[b]<0)this.contourLevels[b].length>0&&(y[b]=0);else if(y[b]Math.abs(_-u[b])&&(y[b]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},j.update=function(t){t=t||{},this.dirty=!0,"contourWidth"in t&&(this.contourWidth=u(t.contourWidth,Number)),"showContour"in t&&(this.showContour=u(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=u(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=h(t.contourColor)),"contourProject"in t&&(this.contourProject=u(t.contourProject,function(t){return u(t,Boolean)})),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=h(t.dynamicColor)), +"dynamicTint"in t&&(this.dynamicTint=u(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=u(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var n=(e.shape[0]+2)*(e.shape[1]+2);n>this._field[2].data.length&&(v.freeFloat(this._field[2].data),this._field[2].data=v.mallocFloat(d.nextPow2(n))),this._field[2]=_(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),l(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(v.freeFloat(this._field[o].data),this._field[o].data=v.mallocFloat(this._field[2].size)),this._field[o]=_(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var s=t.coords;if(!Array.isArray(s)||3!==s.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=s[o];for(y=0;y<2;++y)if(c.shape[y]!==a[y])throw new Error("gl-surface: coords have incorrect shape");l(this._field[o],c)}}else if(t.ticks){var f=t.ticks;if(!Array.isArray(f)||2!==f.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=f[o];if((Array.isArray(p)||p.length)&&(p=_(p)),p.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var m=_(p.data,a);m.stride[o]=p.stride[0],m.stride[1^o]=0,l(this._field[o],m)}}else{for(o=0;o<2;++o){var g=[0,0];g[o]=1,this._field[o]=_(this._field[o].data,[a[0]+2,a[1]+2],g,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var xt=0;xt<5;++xt)tt.pop();q-=1}continue t}tt.push(it[0],it[1],st[0],st[1],it[2]),q+=1}}nt.push(q)}this._contourOffsets[et]=rt,this._contourCounts[et]=nt}var _t=v.mallocFloat(tt.length);for(o=0;oi||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function o(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}function s(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function l(t,e,r,n,i,a,o,l){var u=l.dtype,c=l.shape.slice();if(c.length<2||c.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var h=0,f=0,d=s(c,l.stride.slice());"float32"===u?h=t.FLOAT:"float64"===u?(h=t.FLOAT,d=!1,u="float32"):"uint8"===u?h=t.UNSIGNED_BYTE:(h=t.UNSIGNED_BYTE,d=!1,u="uint8");if(2===c.length)f=t.LUMINANCE,c=[c[0],c[1],1],l=p(l.data,c,[l.stride[0],l.stride[1],1],l.offset);else{if(3!==c.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===c[2])f=t.ALPHA;else if(2===c[2])f=t.LUMINANCE_ALPHA;else if(3===c[2])f=t.RGB;else{if(4!==c[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");f=t.RGBA}c[2]}if(f!==t.LUMINANCE&&f!==t.ALPHA||i!==t.LUMINANCE&&i!==t.ALPHA||(f=i),f!==i)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var v=l.size,y=o.indexOf(n)<0;if(y&&o.push(n),h===a&&d)0===l.offset&&l.data.length===v?y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,l.data):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,l.data):y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,l.data.subarray(l.offset,l.offset+v)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,l.data.subarray(l.offset,l.offset+v));else{var b;b=a===t.FLOAT?g.mallocFloat32(v):g.mallocUint8(v);var _=p(b,c,[c[2],c[2]*c[0],1]);h===t.FLOAT&&a===t.UNSIGNED_BYTE?x(_,l):m.assign(_,l),y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,b.subarray(0,v)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,b.subarray(0,v)),a===t.FLOAT?g.freeFloat32(b):g.freeUint8(b)}}function u(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function c(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var s=u(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new o(t,s,e,r,n,i)}function h(t,e,r,n,i,a){var s=u(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new o(t,s,r,n,i,a)}function f(t,e){var r=e.dtype,n=e.shape.slice(),i=t.getParameter(t.MAX_TEXTURE_SIZE);if(n[0]<0||n[0]>i||n[1]<0||n[1]>i)throw new Error("gl-texture2d: Invalid texture size");var a=s(n,e.stride.slice()),l=0;"float32"===r?l=t.FLOAT:"float64"===r?(l=t.FLOAT,a=!1,r="float32"):"uint8"===r?l=t.UNSIGNED_BYTE:(l=t.UNSIGNED_BYTE,a=!1,r="uint8");var c=0;if(2===n.length)c=t.LUMINANCE,n=[n[0],n[1],1],e=p(e.data,n,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==n.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===n[2])c=t.ALPHA;else if(2===n[2])c=t.LUMINANCE_ALPHA;else if(3===n[2])c=t.RGB;else{if(4!==n[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");c=t.RGBA}}l!==t.FLOAT||t.getExtension("OES_texture_float")||(l=t.UNSIGNED_BYTE,a=!1);var h,f,d=e.size;if(a)h=0===e.offset&&e.data.length===d?e.data:e.data.subarray(e.offset,e.offset+d);else{var v=[n[2],n[2]*n[0],1];f=g.malloc(d,r);var y=p(f,n,v,0);"float32"!==r&&"float64"!==r||l!==t.UNSIGNED_BYTE?m.assign(y,e):x(y,e),h=f.subarray(0,d)}var b=u(t);return t.texImage2D(t.TEXTURE_2D,0,c,n[0],n[1],0,c,l,h),a||g.free(f),new o(t,b,n[0],n[1],c,l)}function d(t){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(v||n(t),"number"==typeof arguments[1])return c(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return c(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var e=arguments[1],r=i(e)?e:e.raw;if(r)return h(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return f(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}var p=t("ndarray"),m=t("ndarray-ops"),g=t("typedarray-pool");e.exports=d;var v=null,y=null,b=null,x=function(t,e){m.muls(t,e,255)},_=o.prototype;Object.defineProperties(_,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&v.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),y.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&v.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),y.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),b.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),b.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(b.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return a(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return t|=0,a(this,t,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,a(this,this._shape[0],t),t}}}),_.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},_.dispose=function(){this.gl.deleteTexture(this.handle)},_.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},_.setPixels=function(t,e,r,n){var a=this.gl;this.bind(),Array.isArray(e)?(n=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),n=n||0;var o=i(t)?t:t.raw;if(o){this._mipLevels.indexOf(n)<0?(a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,this.type,o),this._mipLevels.push(n)):a.texSubImage2D(a.TEXTURE_2D,n,e,r,this.format,this.type,o)}else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>n||r+t.shape[0]>this._shape[0]>>>n||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");l(a,e,r,n,this.format,this.type,this._mipLevels,t)}}},{ndarray:456,"ndarray-ops":450,"typedarray-pool":528}],259:[function(t,e,r){"use strict";function n(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}e.exports=n},{}],268:[function(t,e,r){function n(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}e.exports=n},{}],269:[function(t,e,r){function n(t,e,r,n){return i[0]=n,i[1]=r,i[2]=e,i[3]=t,a[0]}e.exports=n;var i=new Uint8Array(4),a=new Float32Array(i.buffer)},{}],270:[function(t,e,r){function n(t){for(var e=Array.isArray(t)?t:i(t),r=0;r0)continue;n=t.slice(0,1).join("")}return e(n),Y+=n.length,U=U.slice(n.length),U.length}}function z(){return/[^a-fA-F0-9]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),R=O,F+1)}function D(){return"."===O?(U.push(O),B=g,R=O,F+1):/[eE]/.test(O)?(U.push(O),B=g,R=O,F+1):"x"===O&&1===U.length&&"0"===U[0]?(B=w,U.push(O),R=O,F+1):/[^\d]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),R=O,F+1)}function I(){return"f"===O&&(U.push(O),R=O,F+=1),/[eE]/.test(O)?(U.push(O),R=O,F+1):"-"===O&&/[eE]/.test(R)?(U.push(O),R=O,F+1):/[^\d]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),R=O,F+1)}function P(){if(/[^\d\w_]/.test(O)){var t=U.join("");return B=J.indexOf(t)>-1?b:Z.indexOf(t)>-1?y:v,e(U.join("")),B=u,F}return U.push(O),R=O,F+1}var O,R,j,F=0,N=0,B=u,U=[],V=[],q=1,H=0,Y=0,G=!1,X=!1,W="";t=t||{};var Z=o,J=i;return"300 es"===t.version&&(Z=l,J=s),function(t){return V=[],null!==t?r(t.replace?t.replace(/\r\n/g,"\n"):t):n()}}e.exports=n;var i=t("./lib/literals"),a=t("./lib/operators"),o=t("./lib/builtins"),s=t("./lib/literals-300es"),l=t("./lib/builtins-300es"),u=999,c=9999,h=0,f=1,d=2,p=3,m=4,g=5,v=6,y=7,b=8,x=9,_=10,w=11,M=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":273,"./lib/builtins-300es":272,"./lib/literals":275,"./lib/literals-300es":274,"./lib/operators":276}],272:[function(t,e,r){var n=t("./builtins");n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":273}],273:[function(t,e,r){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],274:[function(t,e,r){var n=t("./literals");e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":275}],275:[function(t,e,r){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],276:[function(t,e,r){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],277:[function(t,e,r){function n(t,e){var r=i(e),n=[];return n=n.concat(r(t)),n=n.concat(r(null))}var i=t("./index");e.exports=n},{"./index":271}],278:[function(t,e,r){"use strict";function n(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var a=new Int32Array(this.arrayBuffer);t=a[0],e=a[1],r=a[2],this.d=e+2*r;for(var o=0;o=u[f+0]&&n>=u[f+1]?(o[h]=!0,a.push(l[h])):o[h]=!1}}},n.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),u=this._convertToCellCoord(r),c=this._convertToCellCoord(n),h=s;h<=u;h++)for(var f=l;f<=c;f++){var d=this.d*f+h;if(i.call(this,t,e,r,n,d,a,o))return}},n.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}, +n.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=i+this.cells.length+1+1,r=0,n=0;n>1,c=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+t[e+h],h+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+h],h+=f,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),e+=o+h>=1?f/l:f*Math.pow(2,1-h),e*l>=2&&(o++,l/=2),o+h>=c?(s=0,o=c):o+h>=1?(s=(e*l-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;t[r+d]=255&o,d+=p,o/=256,u-=8);t[r+d-p]|=128*m}},{}],280:[function(t,e,r){"use strict";function n(t,e,r){this.vertices=t,this.adjacent=e,this.boundary=r,this.lastVisited=-1}function i(t,e,r){this.vertices=t,this.cell=e,this.index=r}function a(t,e){return c(t.vertices,e.vertices)}function o(t){for(var e=["function orient(){var tuple=this.tuple;return test("],r=0;r<=t;++r)r>0&&e.push(","),e.push("tuple[",r,"]");e.push(")}return orient");var n=new Function("test",e.join("")),i=u[t+1];return i||(i=u),n(i)}function s(t,e,r){this.dimension=t,this.vertices=e,this.simplices=r,this.interior=r.filter(function(t){return!t.boundary}),this.tuple=new Array(t+1);for(var n=0;n<=t;++n)this.tuple[n]=this.vertices[n];var i=h[t];i||(i=h[t]=o(t)),this.orient=i}function l(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var a=t.slice(0,i+1),o=u.apply(void 0,a);if(0===o)throw new Error("Input not in general position");for(var l=new Array(i+1),c=0;c<=i;++c)l[c]=c;o<0&&(l[0]=1,l[1]=0);for(var h=new n(l,new Array(i+1),!1),f=h.adjacent,d=new Array(i+2),c=0;c<=i;++c){for(var p=l.slice(),m=0;m<=i;++m)m===c&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var v=new n(p,new Array(i+1),!0);f[c]=v,d[c]=v}d[i+1]=h;for(var c=0;c<=i;++c)for(var p=f[c].vertices,y=f[c].adjacent,m=0;m<=i;++m){var b=p[m];if(b<0)y[m]=h;else for(var x=0;x<=i;++x)f[x].vertices.indexOf(b)<0&&(y[m]=f[x])}for(var _=new s(i,a,d),w=!!e,c=i+1;c0;){t=o.pop();for(var s=(t.vertices,t.adjacent),l=0;l<=r;++l){var u=s[l];if(u.boundary&&!(u.lastVisited<=-n)){for(var c=u.vertices,h=0;h<=r;++h){var f=c[h];i[h]=f<0?e:a[f]}var d=this.orient();if(d>0)return u;u.lastVisited=-n,0===d&&o.push(u)}}}return null},f.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,u=s.adjacent,c=0;c<=n;++c)a[c]=i[l[c]];s.lastVisited=r;for(var c=0;c<=n;++c){var h=u[c];if(!(h.lastVisited>=r)){var f=a[c];a[c]=t;var d=this.orient();if(a[c]=f,d<0){s=h;continue t}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},f.addPeaks=function(t,e){var r=this.vertices.length-1,o=this.dimension,s=this.vertices,l=this.tuple,u=this.interior,c=this.simplices,h=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,u.push(e);for(var f=[];h.length>0;){var e=h.pop(),d=e.vertices,p=e.adjacent,m=d.indexOf(r);if(!(m<0))for(var g=0;g<=o;++g)if(g!==m){var v=p[g];if(v.boundary&&!(v.lastVisited>=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var b=0,x=0;x<=o;++x)y[x]<0?(b=x,l[x]=t):l[x]=s[y[x]];var _=this.orient();if(_>0){y[b]=r,v.boundary=!1,u.push(v),h.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var w=v.adjacent,M=d.slice(),k=p.slice(),A=new n(M,k,!0);c.push(A);var T=w.indexOf(e);if(!(T<0)){w[T]=A,k[m]=v,M[g]=-1,k[g]=e,p[g]=A,A.flip();for(var x=0;x<=o;++x){var S=M[x];if(!(S<0||S===r)){for(var E=new Array(o-1),L=0,C=0;C<=o;++C){var z=M[C];z<0||C===x||(E[L++]=z)}f.push(new i(E,A,x))}}}}}}f.sort(a);for(var g=0;g+1=0?o[l++]=s[c]:u=1&c;if(u===(1&t)){var h=o[0];o[0]=o[1],o[1]=h}e.push(o)}}return e}},{"robust-orientation":496,"simplicial-complex":507}],281:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}function i(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function a(t,e){var r=p(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function o(t,e){var r=t.intervals([]);r.push(e),a(t,r)}function s(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?y:(r.splice(n,1),a(t,r),b)}function l(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function c(t,e){for(var r=0;r>1],a=[],o=[],s=[],r=0;r3*(e+1)?o(this,t):this.left.insert(t):this.left=p([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?o(this,t):this.right.insert(t):this.right=p([t]);else{var r=v.ge(this.leftPoints,t,f),n=v.ge(this.rightPoints,t,d);this.leftPoints.splice(r,0,t),this.rightPoints.splice(n,0,t)}},x.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1))return s(this,t);var r=this.left.remove(t);return 2===r?(this.left=null,this.count-=1,b):(r===b&&(this.count-=1),r)}if(t[0]>this.mid){if(!this.right)return y;if(4*(this.left?this.left.count:0)>3*(e-1))return s(this,t);var r=this.right.remove(t);return 2===r?(this.right=null,this.count-=1,b):(r===b&&(this.count-=1),r)}if(1===this.count)return this.leftPoints[0]===t?2:y;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var o=this.left,r=this.right;n.count-=a.count,n.right=a.left,a.left=o,a.right=r}i(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?i(this,this.left):i(this,this.right);return b}for(var o=v.ge(this.leftPoints,t,f);othis.mid){if(this.right){var r=this.right.queryPoint(t,e);if(r)return r}return u(this.rightPoints,t,e)}return c(this.leftPoints,e)},x.queryInterval=function(t,e,r){if(tthis.mid&&this.right){var n=this.right.queryInterval(t,e,r);if(n)return n}return ethis.mid?u(this.rightPoints,t,r):c(this.leftPoints,r)};var _=m.prototype;_.insert=function(t){this.root?this.root.insert(t):this.root=new n(t[0],null,null,[t],[t])},_.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==y}return!1},_.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},_.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(_,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(_,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":58}],282:[function(t,e,r){"use strict";function n(t,e){e=e||new Array(t.length);for(var r=0;r=r&&s<=i&&l>=n&&l<=a&&c.push(t[p]);else{var m=Math.floor((d+f)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[m]);var g=(h+1)%2;(0===h?r<=s:n<=l)&&(u.push(d),u.push(m-1),u.push(g)),(0===h?i>=s:a>=l)&&(u.push(m+1),u.push(f),u.push(g))}}return c}e.exports=n},{}],289:[function(t,e,r){"use strict";function n(t,e,r,a,o,s){if(!(o-a<=r)){var l=Math.floor((a+o)/2);i(t,e,l,a,o,s%2),n(t,e,r,a,l-1,s+1),n(t,e,r,l+1,o,s+1)}}function i(t,e,r,n,o,s){for(;o>n;){if(o-n>600){var l=o-n+1,u=r-n+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1);i(t,e,r,Math.max(n,Math.floor(r-u*h/l+f)),Math.min(o,Math.floor(r+(l-u)*h/l+f)),s)}var d=e[2*r+s],p=n,m=o;for(a(t,e,n,r),e[2*o+s]>d&&a(t,e,n,o);pd;)m--}e[2*n+s]===d?a(t,e,n,m):(m++,a(t,e,m,o)),m<=r&&(n=m+1),r<=m&&(o=m-1)}}function a(t,e,r,n){o(t,r,n),o(e,2*r,2*n),o(e,2*r+1,2*n+1)}function o(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}e.exports=n},{}],290:[function(t,e,r){"use strict";function n(t,e,r,n,a,o){for(var s=[0,t.length-1,0],l=[],u=a*a;s.length;){var c=s.pop(),h=s.pop(),f=s.pop();if(h-f<=o)for(var d=f;d<=h;d++)i(e[2*d],e[2*d+1],r,n)<=u&&l.push(t[d]);else{var p=Math.floor((f+h)/2),m=e[2*p],g=e[2*p+1];i(m,g,r,n)<=u&&l.push(t[p]);var v=(c+1)%2;(0===c?r-a<=m:n-a<=g)&&(s.push(f),s.push(p-1),s.push(v)),(0===c?r+a>=m:n+a>=g)&&(s.push(p+1),s.push(h),s.push(v))}}return l}function i(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}e.exports=n},{}],291:[function(t,e,r){"use strict";function n(t,e){var r;if(h(t)){var l,u=t.stops&&"object"==typeof t.stops[0][0],c=u||void 0!==t.property,f=u||!c,d=t.type||e||"exponential";if("exponential"===d)l=o;else if("interval"===d)l=a;else if("categorical"===d)l=i;else{if("identity"!==d)throw new Error('Unknown function type "'+d+'"');l=s}if(u){for(var p={},m=[],g=0;g=t.stops.length)break;if(e<=t.stops[n][0])break;n++}return 0===n?t.stops[n][1]:n===t.stops.length?t.stops[n-1][1]:l(e,r,t.stops[n-1][0],t.stops[n][0],t.stops[n-1][1],t.stops[n][1])}function s(t,e){return e}function l(t,e,r,n,i,a){return"function"==typeof i?function(){var o=i.apply(void 0,arguments),s=a.apply(void 0,arguments);return l(t,e,r,n,o,s)}:i.length?c(t,e,r,n,i,a):u(t,e,r,n,i,a)}function u(t,e,r,n,i,a){var o,s=n-r,l=t-r;return o=1===e?l/s:(Math.pow(e,l)-1)/(Math.pow(e,s)-1),i*(1-o)+a*o}function c(t,e,r,n,i,a){for(var o=[],s=0;s -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},linepattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_blur;\n\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_fade;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\nvoid main() {\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_linewidth.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_linewidth.t) or when fading out\n // (v_linewidth.s)\n float blur = u_blur * v_gamma_scale;\n float alpha = clamp(min(dist - (v_linewidth.t - blur), v_linewidth.s - dist) / blur, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n float y_a = 0.5 + (v_normal.y * v_linewidth.s / u_pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * v_linewidth.s / u_pattern_size_b.y);\n vec2 pos_a = mix(u_pattern_tl_a, u_pattern_br_a, vec2(x_a, y_a));\n vec2 pos_b = mix(u_pattern_tl_b, u_pattern_br_b, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n alpha *= u_opacity;\n\n gl_FragColor = color * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_linewidth;\nuniform mediump float u_gapwidth;\nuniform mediump float u_antialiasing;\nuniform mediump float u_extra;\nuniform mat2 u_antialiasingmatrix;\nuniform mediump float u_offset;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n v_linesofar = a_linesofar;\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},linesdfpattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform lowp vec4 u_color;\nuniform lowp float u_opacity;\n\nuniform float u_blur;\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\nvoid main() {\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_linewidth.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_linewidth.t) or when fading out\n // (v_linewidth.s)\n float blur = u_blur * v_gamma_scale;\n float alpha = clamp(min(dist - (v_linewidth.t - blur), v_linewidth.s - dist) / blur, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma, 0.5 + u_sdfgamma, sdfdist);\n\n gl_FragColor = u_color * (alpha * u_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n", +vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_linewidth;\nuniform mediump float u_gapwidth;\nuniform mediump float u_antialiasing;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform float u_extra;\nuniform mat2 u_antialiasingmatrix;\nuniform mediump float u_offset;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},outline:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n#pragma mapbox: define lowp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = smoothstep(1.0, 0.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},outlinepattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\nvoid main() {\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = smoothstep(1.0, 0.0, dist);\n \n\n gl_FragColor = mix(color1, color2, u_mix) * alpha * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n vec2 scaled_size_a = u_scale_a * u_pattern_size_a;\n vec2 scaled_size_b = u_scale_b * u_pattern_size_b;\n\n // the correct offset needs to be calculated.\n //\n // The offset depends on how many pixels are between the world origin and\n // the edge of the tile:\n // vec2 offset = mod(pixel_coord, size)\n //\n // At high zoom levels there are a ton of pixels between the world origin\n // and the edge of the tile. The glsl spec only guarantees 16 bits of\n // precision for highp floats. We need more than that.\n //\n // The pixel_coord is passed in as two 16 bit values:\n // pixel_coord_upper = floor(pixel_coord / 2^16)\n // pixel_coord_lower = mod(pixel_coord, 2^16)\n //\n // The offset is calculated in a series of steps that should preserve this precision:\n vec2 offset_a = mod(mod(mod(u_pixel_coord_upper, scaled_size_a) * 256.0, scaled_size_a) * 256.0 + u_pixel_coord_lower, scaled_size_a);\n vec2 offset_b = mod(mod(mod(u_pixel_coord_upper, scaled_size_b) * 256.0, scaled_size_b) * 256.0 + u_pixel_coord_lower, scaled_size_b);\n\n v_pos_a = (u_tile_units_to_pixels * a_pos + offset_a) / scaled_size_a;\n v_pos_b = (u_tile_units_to_pixels * a_pos + offset_b) / scaled_size_b;\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},pattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n vec2 scaled_size_a = u_scale_a * u_pattern_size_a;\n vec2 scaled_size_b = u_scale_b * u_pattern_size_b;\n\n // the correct offset needs to be calculated.\n //\n // The offset depends on how many pixels are between the world origin and\n // the edge of the tile:\n // vec2 offset = mod(pixel_coord, size)\n //\n // At high zoom levels there are a ton of pixels between the world origin\n // and the edge of the tile. The glsl spec only guarantees 16 bits of\n // precision for highp floats. We need more than that.\n //\n // The pixel_coord is passed in as two 16 bit values:\n // pixel_coord_upper = floor(pixel_coord / 2^16)\n // pixel_coord_lower = mod(pixel_coord, 2^16)\n //\n // The offset is calculated in a series of steps that should preserve this precision:\n vec2 offset_a = mod(mod(mod(u_pixel_coord_upper, scaled_size_a) * 256.0, scaled_size_a) * 256.0 + u_pixel_coord_lower, scaled_size_a);\n vec2 offset_b = mod(mod(mod(u_pixel_coord_upper, scaled_size_b) * 256.0, scaled_size_b) * 256.0 + u_pixel_coord_lower, scaled_size_b);\n\n v_pos_a = (u_tile_units_to_pixels * a_pos + offset_a) / scaled_size_a;\n v_pos_b = (u_tile_units_to_pixels * a_pos + offset_b) / scaled_size_b;\n}\n"},raster:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity0;\nuniform float u_opacity1;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n vec4 color = color0 * u_opacity0 + color1 * u_opacity1;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb), color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos0 = (((a_texture_pos / 32767.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},icon:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform lowp float u_opacity;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * u_opacity;\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_texture_pos;\nattribute vec4 a_data;\n\n\n// matrix is for the vertex position.\nuniform mat4 u_matrix;\n\nuniform mediump float u_zoom;\nuniform bool u_rotate_with_map;\nuniform vec2 u_extrude_scale;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n vec2 a_tex = a_texture_pos.xy;\n mediump float a_labelminzoom = a_data[0];\n mediump vec2 a_zoom = a_data.pq;\n mediump float a_minzoom = a_zoom[0];\n mediump float a_maxzoom = a_zoom[1];\n\n // u_zoom is the current zoom level adjusted for the change in font size\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\n\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\n if (u_rotate_with_map) {\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\n gl_Position.z += z * gl_Position.w;\n } else {\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n }\n\n v_tex = a_tex / u_texsize;\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\n}\n"},sdf:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform lowp vec4 u_color;\nuniform lowp float u_opacity;\nuniform lowp float u_buffer;\nuniform lowp float u_gamma;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\nvarying float v_gamma_scale;\n\nvoid main() {\n lowp float dist = texture2D(u_texture, v_tex).a;\n lowp float fade_alpha = texture2D(u_fadetexture, v_fade_tex).a;\n lowp float gamma = u_gamma * v_gamma_scale;\n lowp float alpha = smoothstep(u_buffer - gamma, u_buffer + gamma, dist) * fade_alpha;\n\n gl_FragColor = u_color * (alpha * u_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nconst float PI = 3.141592653589793;\n\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_texture_pos;\nattribute vec4 a_data;\n\n\n// matrix is for the vertex position.\nuniform mat4 u_matrix;\n\nuniform mediump float u_zoom;\nuniform bool u_rotate_with_map;\nuniform bool u_pitch_with_map;\nuniform mediump float u_pitch;\nuniform mediump float u_bearing;\nuniform mediump float u_aspect_ratio;\nuniform vec2 u_extrude_scale;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_tex = a_texture_pos.xy;\n mediump float a_labelminzoom = a_data[0];\n mediump vec2 a_zoom = a_data.pq;\n mediump float a_minzoom = a_zoom[0];\n mediump float a_maxzoom = a_zoom[1];\n\n // u_zoom is the current zoom level adjusted for the change in font size\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\n\n // pitch-alignment: map\n // rotation-alignment: map | viewport\n if (u_pitch_with_map) {\n lowp float angle = u_rotate_with_map ? (a_data[1] / 256.0 * 2.0 * PI) : u_bearing;\n lowp float asin = sin(angle);\n lowp float acos = cos(angle);\n mat2 RotationMatrix = mat2(acos, asin, -1.0 * asin, acos);\n vec2 offset = RotationMatrix * a_offset;\n vec2 extrude = u_extrude_scale * (offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\n gl_Position.z += z * gl_Position.w;\n // pitch-alignment: viewport\n // rotation-alignment: map\n } else if (u_rotate_with_map) {\n // foreshortening factor to apply on pitched maps\n // as a label goes from horizontal <=> vertical in angle\n // it goes from 0% foreshortening to up to around 70% foreshortening\n lowp float pitchfactor = 1.0 - cos(u_pitch * sin(u_pitch * 0.75));\n\n lowp float lineangle = a_data[1] / 256.0 * 2.0 * PI;\n\n // use the lineangle to position points a,b along the line\n // project the points and calculate the label angle in projected space\n // this calculation allows labels to be rendered unskewed on pitched maps\n vec4 a = u_matrix * vec4(a_pos, 0, 1);\n vec4 b = u_matrix * vec4(a_pos + vec2(cos(lineangle),sin(lineangle)), 0, 1);\n lowp float angle = atan((b[1]/b[3] - a[1]/a[3])/u_aspect_ratio, b[0]/b[3] - a[0]/a[3]);\n lowp float asin = sin(angle);\n lowp float acos = cos(angle);\n mat2 RotationMatrix = mat2(acos, -1.0 * asin, asin, acos);\n\n vec2 offset = RotationMatrix * (vec2((1.0-pitchfactor)+(pitchfactor*cos(angle*2.0)), 1.0) * a_offset);\n vec2 extrude = u_extrude_scale * (offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n gl_Position.z += z * gl_Position.w;\n // pitch-alignment: viewport\n // rotation-alignment: viewport\n } else {\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n }\n\n v_gamma_scale = (gl_Position.w - 0.5);\n\n v_tex = a_tex / u_texsize;\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\n}\n"},collisionbox:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_zoom;\nuniform float u_maxzoom;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\n\nvoid main() {\n\n float alpha = 0.5;\n\n gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0) * alpha;\n\n if (v_placement_zoom > u_zoom) {\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n }\n\n if (u_zoom >= v_max_zoom) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0) * alpha * 0.25;\n }\n\n if (v_placement_zoom >= u_maxzoom) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0) * alpha * 0.2;\n }\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_data;\n\nuniform mat4 u_matrix;\nuniform float u_scale;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos + a_extrude / u_scale, 0.0, 1.0);\n\n v_max_zoom = a_data.x;\n v_placement_zoom = a_data.y;\n}\n"}},e.exports.util="float evaluate_zoom_function_1(const vec4 values, const float t) {\n if (t < 1.0) {\n return mix(values[0], values[1], t);\n } else if (t < 2.0) {\n return mix(values[1], values[2], t - 1.0);\n } else {\n return mix(values[2], values[3], t - 2.0);\n }\n}\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\n if (t < 1.0) {\n return mix(value0, value1, t);\n } else if (t < 2.0) {\n return mix(value1, value2, t - 1.0);\n } else {\n return mix(value2, value3, t - 2.0);\n }\n}\n"},{path:464}],293:[function(t,e,r){"use strict";function n(t,e){this.message=(t?t+": ":"")+i.apply(i,Array.prototype.slice.call(arguments,2)),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)}var i=t("util").format;e.exports=n},{util:536}],294:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1;e7)return[new n(c,l,"constants have been deprecated as of v8")];if(!(l in f.constants))return[new n(c,l,'constant "%s" not found',l)];e=a({},e,{value:f.constants[l]})}return u.function&&"object"===i(l)?r(e):u.type&&s[u.type]?s[u.type](e):o(a({},e,{valueSpec:u.type?h[u.type]:u}))}},{"../error/validation_error":293,"../util/extend":294,"../util/get_type":295,"./validate_array":298,"./validate_boolean":299,"./validate_color":300,"./validate_constants":301,"./validate_enum":302,"./validate_filter":303,"./validate_function":304,"./validate_layer":306,"./validate_number":308,"./validate_object":309,"./validate_source":311,"./validate_string":312}],298:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("./validate"),a=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.valueSpec,o=t.style,s=t.styleSpec,l=t.key,u=t.arrayElementValidator||i;if("array"!==n(e))return[new a(l,e,"array expected, %s found",n(e))];if(r.length&&e.length!==r.length)return[new a(l,e,"array length %d expected, length %d found",r.length,e.length)];if(r["min-length"]&&e.length7)return r?[new n(e,r,"constants have been deprecated as of v8")]:[];var a=i(r);if("object"!==a)return[new n(e,r,"object expected, %s found",a)];var o=[];for(var s in r)"@"!==s[0]&&o.push(new n(e+"."+s,r[s],'constants must start with "@"'));return o}},{"../error/validation_error":293,"../util/get_type":295}],302:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint");e.exports=function(t){var e=t.key,r=t.value,a=t.valueSpec,o=[];return-1===a.values.indexOf(i(r))&&o.push(new n(e,r,"expected one of [%s], %s found",a.values.join(", "),r)),o}},{"../error/validation_error":293,"../util/unbundle_jsonlint":296}],303:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_enum"),a=t("../util/get_type"),o=t("../util/unbundle_jsonlint");e.exports=function t(e){var r,s=e.value,l=e.key,u=e.styleSpec,c=[];if("array"!==a(s))return[new n(l,s,"array expected, %s found",a(s))];if(s.length<1)return[new n(l,s,"filter array must have at least 1 element")];switch(c=c.concat(i({key:l+"[0]",value:s[0],valueSpec:u.filter_operator,style:e.style,styleSpec:e.styleSpec})),o(s[0])){case"<":case"<=":case">":case">=":s.length>=2&&"$type"==s[1]&&c.push(new n(l,s,'"$type" cannot be use with operator "%s"',s[0]));case"==":case"!=":3!=s.length&&c.push(new n(l,s,'filter array for operator "%s" must have 3 elements',s[0]));case"in":case"!in":s.length>=2&&(r=a(s[1]),"string"!==r?c.push(new n(l+"[1]",s[1],"string expected, %s found",r)):"@"===s[1][0]&&c.push(new n(l+"[1]",s[1],"filter key cannot be a constant")));for(var h=2;h=8&&(f&&!t.valueSpec["property-function"]?p.push(new n(t.key,t.value,"property functions not supported")):d&&!t.valueSpec["zoom-function"]&&p.push(new n(t.key,t.value,"zoom functions not supported"))),p}},{"../error/validation_error":293,"../util/get_type":295,"./validate":297,"./validate_array":298,"./validate_number":308,"./validate_object":309}],305:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_string");e.exports=function(t){var e=t.value,r=t.key,a=i(t);return a.length?a:(-1===e.indexOf("{fontstack}")&&a.push(new n(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&a.push(new n(r,e,'"glyphs" url must include a "{range}" token')),a)}},{"../error/validation_error":293,"./validate_string":312}],306:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),a=t("./validate_object"),o=t("./validate_filter"),s=t("./validate_paint_property"),l=t("./validate_layout_property"),u=t("../util/extend");e.exports=function(t){var e=[],r=t.value,c=t.key,h=t.style,f=t.styleSpec;r.type||r.ref||e.push(new n(c,r,'either "type" or "ref" is required'));var d=i(r.type),p=i(r.ref);if(r.id)for(var m=0;ma.maximum?[new i(e,r,"%s is greater than the maximum value %s",r,a.maximum)]:[]}},{"../error/validation_error":293,"../util/get_type":295}],309:[function(t,e,r){"use strict" +;var n=t("../error/validation_error"),i=t("../util/get_type"),a=t("./validate");e.exports=function(t){var e=t.key,r=t.value,o=t.valueSpec,s=t.objectElementValidators||{},l=t.style,u=t.styleSpec,c=[],h=i(r);if("object"!==h)return[new n(e,r,"object expected, %s found",h)];for(var f in r){var d=f.split(".")[0],p=o&&(o[d]||o["*"]),m=s[d]||s["*"];p||m?c=c.concat((m||a)({key:(e?e+".":e)+f,value:r[f],valueSpec:p,style:l,styleSpec:u,object:r,objectKey:f})):""!==e&&1!==e.split(".").length&&c.push(new n(e,r[f],'unknown property "%s"',f))}for(d in o)o[d].required&&void 0===o[d].default&&void 0===r[d]&&c.push(new n(e,r,'missing required property "%s"',d));return c}},{"../error/validation_error":293,"../util/get_type":295,"./validate":297}],310:[function(t,e,r){"use strict";var n=t("./validate"),i=t("../error/validation_error");e.exports=function(t){var e=t.key,r=t.style,a=t.styleSpec,o=t.value,s=t.objectKey,l=a["paint_"+t.layerType],u=s.match(/^(.*)-transition$/);return u&&l[u[1]]&&l[u[1]].transition?n({key:e,value:o,valueSpec:a.transition,style:r,styleSpec:a}):t.valueSpec||l[s]?n({key:t.key,value:o,valueSpec:t.valueSpec||l[s],style:r,styleSpec:a}):[new i(e,o,'unknown property "%s"',s)]}},{"../error/validation_error":293,"./validate":297}],311:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),a=t("./validate_object"),o=t("./validate_enum");e.exports=function(t){var e=t.value,r=t.key,s=t.styleSpec,l=t.style;if(!e.type)return[new n(r,e,'"type" is required')];switch(i(e.type)){case"vector":case"raster":var u=[];if(u=u.concat(a({key:r,value:e,valueSpec:s.source_tile,style:t.style,styleSpec:s})),"url"in e)for(var c in e)["type","url","tileSize"].indexOf(c)<0&&u.push(new n(r+"."+c,e[c],'a source with a "url" property may not include a "%s" property',c));return u;case"geojson":return a({key:r,value:e,valueSpec:s.source_geojson,style:l,styleSpec:s});case"video":return a({key:r,value:e,valueSpec:s.source_video,style:l,styleSpec:s});case"image":return a({key:r,value:e,valueSpec:s.source_image,style:l,styleSpec:s});default:return o({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","geojson","video","image"]},style:l,styleSpec:s})}}},{"../error/validation_error":293,"../util/unbundle_jsonlint":296,"./validate_enum":302,"./validate_object":309}],312:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.key,a=n(e);return"string"!==a?[new i(r,e,"string expected, %s found",a)]:[]}},{"../error/validation_error":293,"../util/get_type":295}],313:[function(t,e,r){"use strict";function n(t,e){e=e||l;var r=[];return r=r.concat(s({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:u}})),e.$version>7&&t.constants&&(r=r.concat(o({key:"constants",value:t.constants,style:t,styleSpec:e}))),i(r)}function i(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function a(t){return function(){return i(t.apply(this,arguments))}}var o=t("./validate/validate_constants"),s=t("./validate/validate"),l=t("../reference/latest.min"),u=t("./validate/validate_glyphs_url");n.source=a(t("./validate/validate_source")),n.layer=a(t("./validate/validate_layer")),n.filter=a(t("./validate/validate_filter")),n.paintProperty=a(t("./validate/validate_paint_property")),n.layoutProperty=a(t("./validate/validate_layout_property")),e.exports=n},{"../reference/latest.min":314,"./validate/validate":297,"./validate/validate_constants":301,"./validate/validate_filter":303,"./validate/validate_glyphs_url":305,"./validate/validate_layer":306,"./validate/validate_layout_property":307,"./validate/validate_paint_property":310,"./validate/validate_source":311}],314:[function(t,e,r){e.exports=t("./v8.min.json")},{"./v8.min.json":315}],315:[function(t,e,r){e.exports={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_tile","source_geojson","source_video","source_image"],source_tile:{type:{required:!0,type:"enum",values:["vector","raster"]},url:{type:"string"},tiles:{type:"array",value:"string"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:["geojson"]},data:{type:"*"},maxzoom:{type:"number",default:14},buffer:{type:"number",default:64},tolerance:{type:"number",default:3},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:400},clusterMaxZoom:{type:"number"}},source_video:{type:{required:!0,type:"enum",values:["video"]},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:["image"]},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:["fill","line","symbol","circle","raster","background"]},metadata:{type:"*"},ref:{type:"string"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:22},maxzoom:{type:"number",minimum:0,maximum:22},interactive:{type:"boolean",default:!1},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"},"paint.*":{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],layout_background:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_fill:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_circle:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["butt","round","square"],default:"butt"},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["bevel","round","miter"],default:"miter"},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,"property-function":!0,requires:[{"line-join":"miter"}]},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,"property-function":!0,requires:[{"line-join":"round"}]},visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["point","line"],default:"point"},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,"property-function":!0,units:"pixels",requires:[{"symbol-placement":"line"}]},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image"]},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image"]},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image","text-field"]},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"viewport",requires:["icon-image"]},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!1,values:["none","both","width","height"],default:"none",requires:["icon-image","text-field"]},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image","icon-text-fit","text-field"]},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,tokens:!0},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",requires:["icon-image"]},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"pixels",requires:["icon-image"]},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],requires:["text-field"]},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"viewport",requires:["text-field"]},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"]},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-max-width":{type:"number",default:10,minimum:0,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-line-height":{type:"number",default:1.2,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-letter-spacing":{type:"number",default:0,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["left","center","right"],default:"center",requires:["text-field"]},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:"center",requires:["text-field"]},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field",{"symbol-placement":"line"}]},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["none","uppercase","lowercase"],default:"none",requires:["text-field"]},"text-offset":{type:"array",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"]},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field"]},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field"]},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field","icon-image"]},visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_raster:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:["==","!=",">",">=","<","<=","in","!in","all","any","none","has","!has"]},geometry_type:{type:"enum",values:["Point","LineString","Polygon"]},color_operation:{type:"enum",values:["lighten","saturate","spin","fade","mix"]},function:{stops:{type:"array",required:!0,value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:["exponential","interval","categorical"],default:"exponential"}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},paint:["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!0},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"fill-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}]},"fill-outline-color":{type:"color",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}]},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["fill-translate"]},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,transition:!0}},paint_line:{"line-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"line-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}]},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["line-translate"]},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-gap-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-offset":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,"property-function":!0,minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}]},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,transition:!0}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-blur":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["circle-translate"]},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["icon-image","icon-translate"]},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["text-field","text-translate"]}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees"},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,default:0,minimum:0,maximum:1,transition:!0},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,default:1,minimum:0,maximum:1,transition:!0},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!0,units:"milliseconds"}},paint_background:{"background-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}]},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}}}},{}],316:[function(t,e,r){"use strict";function n(t){return!!(i()&&a()&&o()&&s()&&l()&&u()&&c()&&h(t&&t.failIfMajorPerformanceCaveat))}function i(){return"undefined"!=typeof window&&"undefined"!=typeof document}function a(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function o(){return Function.prototype&&Function.prototype.bind}function s(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function l(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function u(){return"Worker"in window}function c(){return"Uint8ClampedArray"in window}function h(t){return void 0===d[t]&&(d[t]=f(t)),d[t]}function f(t){var e=document.createElement("canvas"),r=Object.create(n.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,e.probablySupportsContext?e.probablySupportsContext("webgl",r)||e.probablySupportsContext("experimental-webgl",r):e.supportsContext?e.supportsContext("webgl",r)||e.supportsContext("experimental-webgl",r):e.getContext("webgl",r)||e.getContext("experimental-webgl",r)}void 0!==e&&e.exports?e.exports=n:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=n);var d={};n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},{}],317:[function(t,e,r){"use strict";function n(t){var e=t.layoutVertexArrayType;this.layoutVertexArray=new e;var r=t.elementArrayType;r&&(this.elementArray=new r);var n=t.elementArrayType2;n&&(this.elementArray2=new n),this.paintVertexArrays=i.mapObject(t.paintVertexArrayTypes,function(t){return new t})}var i=t("../util/util");e.exports=n,n.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,n.prototype.hasCapacityFor=function(t){return this.layoutVertexArray.length+t<=n.MAX_VERTEX_ARRAY_LENGTH},n.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},n.prototype.trim=function(){this.layoutVertexArray.trim(),this.elementArray&&this.elementArray.trim(),this.elementArray2&&this.elementArray2.trim();for(var t in this.paintVertexArrays)this.paintVertexArrays[t].trim()},n.prototype.serialize=function(){return{layoutVertexArray:this.layoutVertexArray.serialize(),elementArray:this.elementArray&&this.elementArray.serialize(),elementArray2:this.elementArray2&&this.elementArray2.serialize(),paintVertexArrays:i.mapObject(this.paintVertexArrays,function(t){return t.serialize()})}},n.prototype.getTransferables=function(t){t.push(this.layoutVertexArray.arrayBuffer),this.elementArray&&t.push(this.elementArray.arrayBuffer),this.elementArray2&&t.push(this.elementArray2.arrayBuffer);for(var e in this.paintVertexArrays)t.push(this.paintVertexArrays[e].arrayBuffer)}},{"../util/util":431}],318:[function(t,e,r){"use strict";function n(t){if(this.zoom=t.zoom,this.overscaling=t.overscaling,this.layer=t.layer,this.childLayers=t.childLayers,this.type=this.layer.type,this.features=[],this.id=this.layer.id,this.index=t.index,this.sourceLayer=this.layer.sourceLayer,this.sourceLayerIndex=t.sourceLayerIndex,this.minZoom=this.layer.minzoom,this.maxZoom=this.layer.maxzoom,this.paintAttributes=i(this),t.arrays){var e=this.programInterfaces;this.bufferGroups=c.mapObject(t.arrays,function(r,n){var i=e[n],a=t.paintVertexArrayTypes[n];return r.map(function(t){return new u(t,{layoutVertexArrayType:i.layoutVertexArrayType.serialize(),elementArrayType:i.elementArrayType&&i.elementArrayType.serialize(),elementArrayType2:i.elementArrayType2&&i.elementArrayType2.serialize(),paintVertexArrayTypes:a})})})}}function i(t){var e={};for(var r in t.programInterfaces){for(var n=e[r]={},i=0;i1?p.name+_:p.name;x[w]=m[_]*g}}},n.VertexArrayType=function(t){return new h({members:t,alignment:4})},n.ElementArrayType=function(t){return new h({members:[{type:"Uint16",name:"vertices",components:t||3}]})}},{"../util/struct_array":429,"../util/util":431,"./array_group":317,"./bucket/circle_bucket":319,"./bucket/fill_bucket":320,"./bucket/line_bucket":321,"./bucket/symbol_bucket":322,"./buffer_group":324,assert:39,"feature-filter":124}],319:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var i=t("../bucket"),a=t("../../util/util"),o=t("../load_geometry"),s=i.EXTENT;e.exports=n,n.prototype=a.inherit(i,{}),n.prototype.addCircleVertex=function(t,e,r,n,i){return t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)},n.prototype.programInterfaces={circle:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"}]),elementArrayType:new i.ElementArrayType,paintAttributes:[{name:"a_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("circle-color",e,r)},multiplier:255,paintProperty:"circle-color"},{name:"a_radius",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-radius",e,r)]},multiplier:10,paintProperty:"circle-radius"},{name:"a_blur",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){ +return[t.getPaintValue("circle-blur",e,r)]},multiplier:10,paintProperty:"circle-blur"},{name:"a_opacity",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-opacity",e,r)]},multiplier:255,paintProperty:"circle-opacity"}]}},n.prototype.addFeature=function(t){for(var e={zoom:this.zoom},r=o(t),n=this.prepareArrayGroup("circle",0),i=n.layoutVertexArray.length,a=0;a=s||c<0||c>=s)){var h=this.prepareArrayGroup("circle",4),f=h.layoutVertexArray,d=this.addCircleVertex(f,u,c,-1,-1);this.addCircleVertex(f,u,c,1,-1),this.addCircleVertex(f,u,c,1,1),this.addCircleVertex(f,u,c,-1,1),h.elementArray.emplaceBack(d,d+1,d+2),h.elementArray.emplaceBack(d,d+3,d+2)}}this.populatePaintArrays("circle",e,t.properties,n,i)}},{"../../util/util":431,"../bucket":318,"../load_geometry":326}],320:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var i=t("../bucket"),a=t("../../util/util"),o=t("../load_geometry"),s=t("earcut"),l=t("../../util/classify_rings");e.exports=n,n.prototype=a.inherit(i,{}),n.prototype.programInterfaces={fill:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"}]),elementArrayType:new i.ElementArrayType(1),elementArrayType2:new i.ElementArrayType(2),paintAttributes:[{name:"a_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("fill-color",e,r)},multiplier:255,paintProperty:"fill-color"},{name:"a_outline_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("fill-outline-color",e,r)},multiplier:255,paintProperty:"fill-outline-color"},{name:"a_opacity",components:1,type:"Uint8",getValue:function(t,e,r){return[t.getPaintValue("fill-opacity",e,r)]},multiplier:255,paintProperty:"fill-opacity"}]}},n.prototype.addFeature=function(t){for(var e=o(t),r=l(e,500),n=this.prepareArrayGroup("fill",0),i=n.layoutVertexArray.length,a=0;a0&&a.push(i.length/2);for(var c=0;c=1&&n.elementArray2.emplaceBack(f-1,f),i.push(h.x),i.push(h.y)}}for(var d=s(i,a),p=0;p>6)},n.prototype.programInterfaces={line:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}]),elementArrayType:new i.ElementArrayType}},n.prototype.addFeature=function(t){for(var e=o(t,15),r=0;r2&&t[a-1].equals(t[a-2]);)a--;if(!(t.length<2)){"bevel"===e&&(n=1.05);var o=s/(512*this.overscaling)*15,u=t[0],c=t[a-1],h=u.equals(c);if(this.prepareArrayGroup("line",10*a),2!==a||!h){this.distance=0;var f,d,p,m,g,v,y,b=r,x=h?"butt":r,_=!0;this.e1=this.e2=this.e3=-1,h&&(f=t[a-2],g=u.sub(f)._unit()._perp());for(var w=0;w0){var S=f.dist(d);if(S>2*o){var E=f.sub(f.sub(d)._mult(o/S)._round());this.distance+=E.dist(d),this.addCurrentVertex(E,this.distance,m.mult(1),0,0,!1),d=E}}var L=d&&p,C=L?e:p?b:x;if(L&&"round"===C&&(An&&(C="bevel"),"bevel"===C&&(A>2&&(C="flipbevel"),A100)M=g.clone();else{var z=m.x*g.y-m.y*g.x>0?-1:1,D=A*m.add(g).mag()/m.sub(g).mag();M._perp()._mult(D*z)}this.addCurrentVertex(f,this.distance,M,0,0,!1),this.addCurrentVertex(f,this.distance,M.mult(-1),0,0,!1)}else if("bevel"===C||"fakeround"===C){var I=m.x*g.y-m.y*g.x>0,P=-Math.sqrt(A*A-1);if(I?(y=0,v=P):(v=0,y=P),_||this.addCurrentVertex(f,this.distance,m,v,y,!1),"fakeround"===C){for(var O,R=Math.floor(8*(.5-(k-.5))),j=0;j=0;F--)O=m.mult((F+1)/(R+1))._add(g)._unit(),this.addPieSliceVertex(f,this.distance,O,I)}p&&this.addCurrentVertex(f,this.distance,g,-v,-y,!1)}else"butt"===C?(_||this.addCurrentVertex(f,this.distance,m,0,0,!1),p&&this.addCurrentVertex(f,this.distance,g,0,0,!1)):"square"===C?(_||(this.addCurrentVertex(f,this.distance,m,1,1,!1),this.e1=this.e2=-1),p&&this.addCurrentVertex(f,this.distance,g,-1,-1,!1)):"round"===C&&(_||(this.addCurrentVertex(f,this.distance,m,0,0,!1),this.addCurrentVertex(f,this.distance,m,1,1,!0),this.e1=this.e2=-1),p&&(this.addCurrentVertex(f,this.distance,g,-1,-1,!0),this.addCurrentVertex(f,this.distance,g,0,0,!1)));if(T&&w2*o){var B=f.add(p.sub(f)._mult(o/N)._round());this.distance+=B.dist(f),this.addCurrentVertex(B,this.distance,g.mult(1),0,0,!1),f=B}}_=!1}}}},n.prototype.addCurrentVertex=function(t,e,r,n,i,a){var o,s=a?1:0,l=this.arrayGroups.line[this.arrayGroups.line.length-1],c=l.layoutVertexArray,h=l.elementArray;o=r.clone(),n&&o._sub(r.perp()._mult(n)),this.e3=this.addLineVertex(c,t,o,s,0,n,e),this.e1>=0&&this.e2>=0&&h.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,o=r.mult(-1),i&&o._sub(r.perp()._mult(i)),this.e3=this.addLineVertex(c,t,o,s,1,-i,e),this.e1>=0&&this.e2>=0&&h.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,e>u/2&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,a))},n.prototype.addPieSliceVertex=function(t,e,r,n){var i=n?1:0;r=r.mult(n?-1:1);var a=this.arrayGroups.line[this.arrayGroups.line.length-1],o=a.layoutVertexArray,s=a.elementArray;this.e3=this.addLineVertex(o,t,r,0,i,0,e),this.e1>=0&&this.e2>=0&&s.emplaceBack(this.e1,this.e2,this.e3),n?this.e2=this.e3:this.e1=this.e3}},{"../../util/util":431,"../bucket":318,"../load_geometry":326}],322:[function(t,e,r){"use strict";function n(t){o.apply(this,arguments),this.showCollisionBoxes=t.showCollisionBoxes,this.overscaling=t.overscaling,this.collisionBoxArray=t.collisionBoxArray,this.symbolQuadsArray=t.symbolQuadsArray,this.symbolInstancesArray=t.symbolInstancesArray,this.sdfIcons=t.sdfIcons,this.iconsNeedLinear=t.iconsNeedLinear,this.adjustedTextSize=t.adjustedTextSize,this.adjustedIconSize=t.adjustedIconSize,this.fontstack=t.fontstack}function i(t,e,r,n,i,a,o,s,l,u,c){return t.emplaceBack(e,r,Math.round(64*n),Math.round(64*i),a/4,o/4,10*(u||0),c,10*(s||0),10*Math.min(l||25,25))}var a=t("point-geometry"),o=t("../bucket"),s=t("../../symbol/anchor"),l=t("../../symbol/get_anchors"),u=t("../../util/token"),c=t("../../symbol/quads"),h=t("../../symbol/shaping"),f=t("../../symbol/resolve_text"),d=t("../../symbol/mergelines"),p=t("../../symbol/clip_line"),m=t("../../util/util"),g=t("../load_geometry"),v=t("../../symbol/collision_feature"),y=h.shapeText,b=h.shapeIcon,x=c.getGlyphQuads,_=c.getIconQuads,w=o.EXTENT;e.exports=n,n.MAX_QUADS=65535,n.prototype=m.inherit(o,{}),n.prototype.serialize=function(){var t=o.prototype.serialize.apply(this);return t.sdfIcons=this.sdfIcons,t.iconsNeedLinear=this.iconsNeedLinear,t.adjustedTextSize=this.adjustedTextSize,t.adjustedIconSize=this.adjustedIconSize,t.fontstack=this.fontstack,t};var M=new o.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_offset",components:2,type:"Int16"},{name:"a_texture_pos",components:2,type:"Uint16"},{name:"a_data",components:4,type:"Uint8"}]),k=new o.ElementArrayType;n.prototype.addCollisionBoxVertex=function(t,e,r,n,i){return t.emplaceBack(e.x,e.y,Math.round(r.x),Math.round(r.y),10*n,10*i)},n.prototype.programInterfaces={glyph:{layoutVertexArrayType:M,elementArrayType:k},icon:{layoutVertexArrayType:M,elementArrayType:k},collisionBox:{layoutVertexArrayType:new o.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"},{name:"a_data",components:2,type:"Uint8"}])}},n.prototype.populateArrays=function(t,e,r){var n={lastIntegerZoom:1/0,lastIntegerZoomTime:0,lastZoom:0};this.adjustedTextMaxSize=this.layer.getLayoutValue("text-size",{zoom:18,zoomHistory:n}),this.adjustedTextSize=this.layer.getLayoutValue("text-size",{zoom:this.zoom+1,zoomHistory:n}),this.adjustedIconMaxSize=this.layer.getLayoutValue("icon-size",{zoom:18,zoomHistory:n}),this.adjustedIconSize=this.layer.getLayoutValue("icon-size",{zoom:this.zoom+1,zoomHistory:n});var i=512*this.overscaling;this.tilePixelRatio=w/i,this.compareText={},this.iconsNeedLinear=!1,this.symbolInstancesStartIndex=this.symbolInstancesArray.length;var a=this.layer.layout,o=this.features,s=this.textFeatures,l=.5,c=.5;switch(a["text-anchor"]){case"right":case"top-right":case"bottom-right":l=1;break;case"left":case"top-left":case"bottom-left":l=0}switch(a["text-anchor"]){case"bottom":case"bottom-right":case"bottom-left":c=1;break;case"top":case"top-right":case"top-left":c=0}for(var h="right"===a["text-justify"]?1:"left"===a["text-justify"]?0:.5,f=24*a["text-line-height"],p="line"!==a["symbol-placement"]?24*a["text-max-width"]:0,v=24*a["text-letter-spacing"],x=[24*a["text-offset"][0],24*a["text-offset"][1]],_=this.fontstack=a["text-font"].join(","),M=[],k=0;kw||L.y<0||L.y>w);if(!d||C){var z=C||x;this.addSymbolInstance(L,T,e,r,this.layer,z,this.symbolInstancesArray.length,this.collisionBoxArray,n.index,this.sourceLayerIndex,this.index,u,m,y,h,g,b,{zoom:this.zoom},n.properties)}}}}},n.prototype.anchorIsTooClose=function(t,e,r){var n=this.compareText;if(t in n){for(var i=n[t],a=i.length-1;a>=0;a--)if(r.dist(i[a])3*Math.PI/2))){var g=p.tl,v=p.tr,y=p.bl,b=p.br,x=p.tex,_=p.anchorPoint,w=Math.max(h+Math.log(p.minScale)/Math.LN2,f),M=Math.min(h+Math.log(p.maxScale)/Math.LN2,25);if(!(M<=w)){w===f&&(w=0);var k=Math.round(p.glyphAngle/(2*Math.PI)*256),A=i(c,_.x,_.y,g.x,g.y,x.x,x.y,w,M,f,k);i(c,_.x,_.y,v.x,v.y,x.x+x.w,x.y,w,M,f,k),i(c,_.x,_.y,y.x,y.y,x.x,x.y+x.h,w,M,f,k),i(c,_.x,_.y,b.x,b.y,x.x+x.w,x.y+x.h,w,M,f,k),u.emplaceBack(A,A+1,A+2),u.emplaceBack(A+1,A+2,A+3)}}}},n.prototype.updateIcons=function(t){this.recalculateStyleLayers();var e=this.layer.layout["icon-image"];if(e)for(var r=0;rn.MAX_QUADS&&m.warnOnce("Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),A>n.MAX_QUADS&&m.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),this.symbolInstancesArray.emplaceBack(I,P,O,R,k,A,T,S,t.x,t.y,s)},n.prototype.addSymbolQuad=function(t){return this.symbolQuadsArray.emplaceBack(t.anchorPoint.x,t.anchorPoint.y,t.tl.x,t.tl.y,t.tr.x,t.tr.y,t.bl.x,t.bl.y,t.br.x,t.br.y,t.tex.h,t.tex.w,t.tex.x,t.tex.y,t.anchorAngle,t.glyphAngle,t.maxScale,t.minScale)}},{"../../symbol/anchor":380,"../../symbol/clip_line":382,"../../symbol/collision_feature":384,"../../symbol/get_anchors":386,"../../symbol/mergelines":389,"../../symbol/quads":390,"../../symbol/resolve_text":391,"../../symbol/shaping":392,"../../util/token":430,"../../util/util":431,"../bucket":318,"../load_geometry":326,"point-geometry":472}],323:[function(t,e,r){"use strict";function n(t,e,r){this.arrayBuffer=t.arrayBuffer,this.length=t.length,this.attributes=e.members,this.itemSize=e.bytesPerElement,this.type=r,this.arrayType=e}e.exports=n,n.prototype.bind=function(t){var e=t[this.type];this.buffer?t.bindBuffer(e,this.buffer):(this.buffer=t.createBuffer(),t.bindBuffer(e,this.buffer),t.bufferData(e,this.arrayBuffer,t.STATIC_DRAW),this.arrayBuffer=null)};var i={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT"};n.prototype.setVertexAttribPointers=function(t,e){for(var r=0;r0?t["line-gap-width"]+2*t["line-width"]:t["line-width"]}function s(t,e,r,n,i){if(!e[0]&&!e[1])return t;e=u.convert(e),"viewport"===r&&e._rotate(-n);for(var a=[],o=0;or.max||f.yr.max)&&i.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return l}},{"../util/util":431,"./bucket":318,assert:39}],327:[function(t,e,r){"use strict";function n(t,e,r){this.column=t,this.row=e,this.zoom=r}e.exports=n,n.prototype={clone:function(){return new n(this.column,this.row,this.zoom)},zoomTo:function(t){return this.clone()._zoomTo(t)},sub:function(t){return this.clone()._sub(t)},_zoomTo:function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},_sub:function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this}}},{}],328:[function(t,e,r){"use strict";function n(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}e.exports=n;var i=t("../util/util").wrap;n.prototype.wrap=function(){return new n(i(this.lng,-180,180),this.lat)},n.prototype.toArray=function(){return[this.lng,this.lat]},n.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{"../util/util":431}],329:[function(t,e,r){"use strict";function n(t,e){t&&(e?this.extend(t).extend(e):4===t.length?this.extend([t[0],t[1]]).extend([t[2],t[3]]):this.extend(t[0]).extend(t[1]))}e.exports=n;var i=t("./lng_lat");n.prototype={extend:function(t){var e,r,a=this._sw,o=this._ne;if(t instanceof i)e=t,r=t;else{if(!(t instanceof n))return t?this.extend(i.convert(t)||n.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return a||o?(a.lng=Math.min(e.lng,a.lng),a.lat=Math.min(e.lat,a.lat),o.lng=Math.max(r.lng,o.lng),o.lat=Math.max(r.lat,o.lat)):(this._sw=new i(e.lng,e.lat),this._ne=new i(r.lng,r.lat)),this},getCenter:function(){return new i((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},getSouthWest:function(){return this._sw},getNorthEast:function(){return this._ne},getNorthWest:function(){return new i(this.getWest(),this.getNorth())},getSouthEast:function(){return new i(this.getEast(),this.getSouth())},getWest:function(){return this._sw.lng},getSouth:function(){return this._sw.lat},getEast:function(){return this._ne.lng},getNorth:function(){return this._ne.lat},toArray:function(){return[this._sw.toArray(),this._ne.toArray()]},toString:function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"}},n.convert=function(t){return!t||t instanceof n?t:new n(t)}},{"./lng_lat":328}],330:[function(t,e,r){"use strict";function n(t,e){this.tileSize=512,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new i(0,0),this.zoom=0,this.angle=0,this._altitude=1.5,this._pitch=0,this._unmodified=!0}var i=t("./lng_lat"),a=t("point-geometry"),o=t("./coordinate"),s=t("../util/util").wrap,l=t("../util/interpolate"),u=t("../source/tile_coord"),c=t("../data/bucket").EXTENT,h=t("gl-matrix"),f=h.vec4,d=h.mat4,p=h.mat2;e.exports=n,n.prototype={get minZoom(){return this._minZoom},set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},get maxZoom(){return this._maxZoom},set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},get worldSize(){return this.tileSize*this.scale},get centerPoint(){return this.size._div(2)},get size(){return new a(this.width,this.height)},get bearing(){return-this.angle/Math.PI*180},set bearing(t){var e=-s(t,-180,180)*Math.PI/180;this.angle!==e&&(this._unmodified=!1,this.angle=e,this._calcMatrices(),this.rotationMatrix=p.create(),p.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},get pitch(){return this._pitch/Math.PI*180},set pitch(t){var e=Math.min(60,t)/180*Math.PI;this._pitch!==e&&(this._unmodified=!1,this._pitch=e,this._calcMatrices())},get altitude(){return this._altitude},set altitude(t){var e=Math.max(.75,t);this._altitude!==e&&(this._unmodified=!1,this._altitude=e,this._calcMatrices())},get zoom(){return this._zoom},set zoom(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._calcMatrices(),this._constrain())},get center(){return this._center},set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._calcMatrices(),this._constrain())},coveringZoomLevel:function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},coveringTiles:function(t){var e=this.coveringZoomLevel(t),r=e;if(et.maxzoom&&(e=t.maxzoom);var n=this,i=n.locationCoordinate(n.center)._zoomTo(e),o=new a(i.column-.5,i.row-.5);return u.cover(e,[n.pointCoordinate(new a(0,0))._zoomTo(e),n.pointCoordinate(new a(n.width,0))._zoomTo(e),n.pointCoordinate(new a(n.width,n.height))._zoomTo(e),n.pointCoordinate(new a(0,n.height))._zoomTo(e)],t.reparseOverscaled?r:e).sort(function(t,e){return o.dist(t)-o.dist(e)})},resize:function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._calcMatrices(),this._constrain()},get unmodified(){return this._unmodified},zoomScale:function(t){return Math.pow(2,t)},scaleZoom:function(t){return Math.log(t)/Math.LN2},project:function(t,e){return new a(this.lngX(t.lng,e),this.latY(t.lat,e))},unproject:function(t,e){return new i(this.xLng(t.x,e),this.yLat(t.y,e))},get x(){return this.lngX(this.center.lng)},get y(){return this.latY(this.center.lat)},get point(){return new a(this.x,this.y)},lngX:function(t,e){return(180+t)*(e||this.worldSize)/360},latY:function(t,e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*(e||this.worldSize)/360},xLng:function(t,e){return 360*t/(e||this.worldSize)-180},yLat:function(t,e){var r=180-360*t/(e||this.worldSize);return 360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90},panBy:function(t){var e=this.centerPoint._add(t);this.center=this.pointLocation(e)},setLocationAtPoint:function(t,e){var r=this.locationCoordinate(t),n=this.pointCoordinate(e),i=this.pointCoordinate(this.centerPoint),a=n._sub(r);this._unmodified=!1,this.center=this.coordinateLocation(i._sub(a))},locationPoint:function(t){return this.coordinatePoint(this.locationCoordinate(t))},pointLocation:function(t){return this.coordinateLocation(this.pointCoordinate(t))},locationCoordinate:function(t){var e=this.zoomScale(this.tileZoom)/this.worldSize,r=i.convert(t);return new o(this.lngX(r.lng)*e,this.latY(r.lat)*e,this.tileZoom)},coordinateLocation:function(t){var e=this.zoomScale(t.zoom);return new i(this.xLng(t.column,e),this.yLat(t.row,e))},pointCoordinate:function(t){var e=[t.x,t.y,0,1],r=[t.x,t.y,1,1];f.transformMat4(e,e,this.pixelMatrixInverse),f.transformMat4(r,r,this.pixelMatrixInverse) +;var n=e[3],i=r[3],a=e[0]/n,s=r[0]/i,u=e[1]/n,c=r[1]/i,h=e[2]/n,d=r[2]/i,p=h===d?0:(0-h)/(d-h),m=this.worldSize/this.zoomScale(this.tileZoom);return new o(l(a,s,p)/m,l(u,c,p)/m,this.tileZoom)},coordinatePoint:function(t){var e=this.worldSize/this.zoomScale(t.zoom),r=[t.column*e,t.row*e,0,1];return f.transformMat4(r,r,this.pixelMatrix),new a(r[0]/r[3],r[1]/r[3])},calculatePosMatrix:function(t,e){void 0===e&&(e=1/0),t instanceof u&&(t=t.toCoordinate(e));var r=Math.min(t.zoom,e),n=this.worldSize/Math.pow(2,r),i=new Float64Array(16);return d.identity(i),d.translate(i,i,[t.column*n,t.row*n,0]),d.scale(i,i,[n/c,n/c,1]),d.multiply(i,this.projMatrix,i),new Float32Array(i)},_constrain:function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,e,r,n,i,o,s,l,u=this.size,c=this._unmodified;this.latRange&&(t=this.latY(this.latRange[1]),e=this.latY(this.latRange[0]),i=e-te&&(l=e-d)}if(this.lngRange){var p=this.x,m=u.x/2;p-mn&&(s=n-m)}void 0===s&&void 0===l||(this.center=this.unproject(new a(void 0!==s?s:this.x,void 0!==l?l:this.y))),this._unmodified=c,this._constraining=!1}},_calcMatrices:function(){if(this.height){var t=Math.atan(.5/this.altitude),e=Math.sin(t)*this.altitude/Math.sin(Math.PI/2-this._pitch-t),r=Math.cos(Math.PI/2-this._pitch)*e+this.altitude,n=new Float64Array(16);if(d.perspective(n,2*Math.atan(this.height/2/this.altitude),this.width/this.height,.1,r),d.translate(n,n,[0,0,-this.altitude]),d.scale(n,n,[1,-1,1/this.height]),d.rotateX(n,n,this._pitch),d.rotateZ(n,n,this.angle),d.translate(n,n,[-this.x,-this.y,0]),this.projMatrix=n,n=d.create(),d.scale(n,n,[this.width/2,-this.height/2,1]),d.translate(n,n,[1,-1,0]),this.pixelMatrix=d.multiply(new Float64Array(16),n,this.projMatrix),!(n=d.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=n}}}},{"../data/bucket":318,"../source/tile_coord":358,"../util/interpolate":425,"../util/util":431,"./coordinate":327,"./lng_lat":328,"gl-matrix":184,"point-geometry":472}],331:[function(t,e,r){"use strict";var n={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]};e.exports=function(t,e,r,i){i=i||1;var a,o,s,l,u,c,h,f,d=[];for(a=0,o=t.length;a>16,_>>16),s.uniform2f(n.u_pixel_coord_lower,65535&x,65535&_)}s.uniformMatrix4fv(n.u_matrix,!1,t.transform.calculatePosMatrix(v)),s.drawArrays(s.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}s.stencilMask(0),s.stencilFunc(s.EQUAL,128,128)}var i=t("../source/pixels_to_tile_units"),a=t("./create_uniform_pragmas"),o=512;e.exports=n},{"../source/pixels_to_tile_units":352,"./create_uniform_pragmas":333}],335:[function(t,e,r){"use strict";function n(t,e,r,n){if(!t.isOpaquePass){var a=t.gl;t.setDepthSublayer(0),t.depthMask(!1),a.disable(a.STENCIL_TEST);for(var o=0;o>16,f>>16),o.uniform2f(a.u_pixel_coord_lower,65535&h,65535&f),o.activeTexture(o.TEXTURE0),i.spriteAtlas.bind(o,!0)}}var s=t("../source/pixels_to_tile_units");e.exports=n},{"../source/pixels_to_tile_units":352}],339:[function(t,e,r){"use strict";var n=t("../util/browser"),i=t("gl-matrix").mat2,a=t("../source/pixels_to_tile_units");e.exports=function(t,e,r,o){if(!t.isOpaquePass){t.setDepthSublayer(0),t.depthMask(!1);var s=t.gl;if(s.enable(s.STENCIL_TEST),!(r.paint["line-width"]<=0)){var l=1/n.devicePixelRatio,u=r.paint["line-blur"]+l,c=r.paint["line-color"],h=t.transform,f=i.create();i.scale(f,f,[1,Math.cos(h._pitch)]),i.rotate(f,f,t.transform.angle);var d,p,m,g,v,y=Math.sqrt(h.height*h.height/4*(1+h.altitude*h.altitude)),b=h.height/2*Math.tan(h._pitch),x=(y+b)/y-1,_=r.paint["line-dasharray"],w=r.paint["line-pattern"];if(_)d=t.useProgram("linesdfpattern"),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform4fv(d.u_color,c),s.uniform1f(d.u_opacity,r.paint["line-opacity"]),p=t.lineAtlas.getDash(_.from,"round"===r.layout["line-cap"]),m=t.lineAtlas.getDash(_.to,"round"===r.layout["line-cap"]),s.uniform1i(d.u_image,0),s.activeTexture(s.TEXTURE0),t.lineAtlas.bind(s),s.uniform1f(d.u_tex_y_a,p.y),s.uniform1f(d.u_tex_y_b,m.y),s.uniform1f(d.u_mix,_.t),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f);else if(w){if(g=t.spriteAtlas.getPosition(w.from,!0),v=t.spriteAtlas.getPosition(w.to,!0),!g||!v)return;d=t.useProgram("linepattern"),s.uniform1i(d.u_image,0),s.activeTexture(s.TEXTURE0),t.spriteAtlas.bind(s,!0),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform2fv(d.u_pattern_tl_a,g.tl),s.uniform2fv(d.u_pattern_br_a,g.br),s.uniform2fv(d.u_pattern_tl_b,v.tl),s.uniform2fv(d.u_pattern_br_b,v.br),s.uniform1f(d.u_fade,w.t),s.uniform1f(d.u_opacity,r.paint["line-opacity"]),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f)}else d=t.useProgram("line"),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f),s.uniform4fv(d.u_color,c),s.uniform1f(d.u_opacity,r.paint["line-opacity"]);for(var M=0;M0?1/(1-t):1+t}function s(t){return t>0?1-1/(1.001-t):-t}function l(t,e,r,n){var i=[1,0],a=r.paint["raster-fade-duration"];if(t.source&&a>0){var o=(new Date).getTime(),s=(o-t.timeAdded)/a,l=e?(o-e.timeAdded)/a:-1,c=n.coveringZoomLevel(t.source),h=!!e&&Math.abs(e.coord.z-c)>Math.abs(t.coord.z-c);!e||h?(i[0]=u.clamp(s,0,1),i[1]=1-i[0]):(i[0]=u.clamp(1-l,0,1),i[1]=1-i[0])}var f=r.paint["raster-opacity"];return i[0]*=f,i[1]*=f,i}var u=t("../util/util"),c=t("../util/struct_array");e.exports=n,n.RasterBoundsArray=new c({members:[{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]})},{"../util/struct_array":429,"../util/util":431}],341:[function(t,e,r){"use strict";function n(t,e,r,n){if(!t.isOpaquePass){var a=!(r.layout["text-allow-overlap"]||r.layout["icon-allow-overlap"]||r.layout["text-ignore-placement"]||r.layout["icon-ignore-placement"]),o=t.gl;a?o.disable(o.STENCIL_TEST):o.enable(o.STENCIL_TEST),t.setDepthSublayer(0),t.depthMask(!1),o.disable(o.DEPTH_TEST),i(t,e,r,n,!1,r.paint["icon-translate"],r.paint["icon-translate-anchor"],r.layout["icon-rotation-alignment"],r.layout["icon-rotation-alignment"],r.layout["icon-size"],r.paint["icon-halo-width"],r.paint["icon-halo-color"],r.paint["icon-halo-blur"],r.paint["icon-opacity"],r.paint["icon-color"]),i(t,e,r,n,!0,r.paint["text-translate"],r.paint["text-translate-anchor"],r.layout["text-rotation-alignment"],r.layout["text-pitch-alignment"],r.layout["text-size"],r.paint["text-halo-width"],r.paint["text-halo-color"],r.paint["text-halo-blur"],r.paint["text-opacity"],r.paint["text-color"]),o.enable(o.DEPTH_TEST),e.map.showCollisionBoxes&&s(t,e,r,n)}}function i(t,e,r,n,i,o,s,l,u,c,h,f,d,p,m){for(var g=0;gthis.previousZoom;r--)this.changeTimes[r]=e,this.changeOpacities[r]=this.opacities[r];for(r=0;r<256;r++){var n=e-this.changeTimes[r],i=n/this.fadeDuration*255;this.opacities[r]=r<=t?this.changeOpacities[r]+i:this.changeOpacities[r]-i}this.changed=!0,this.previousZoom=t},n.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.changed&&(t.texSubImage2D(t.TEXTURE_2D,0,0,0,256,1,t.ALPHA,t.UNSIGNED_BYTE,this.array),this.changed=!1)):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,256,1,0,t.ALPHA,t.UNSIGNED_BYTE,this.array))}},{}],343:[function(t,e,r){"use strict";function n(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}}var i=t("../util/util");e.exports=n,n.prototype.setSprite=function(t){this.sprite=t},n.prototype.getDash=function(t,e){var r=t.join(",")+e;return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},n.prototype.addDash=function(t,e){var r=e?7:0,n=2*r+1;if(this.nextRow+n>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o0?e.pop():null},n.prototype.lineWidth=function(t){this.gl.lineWidth(c.clamp(t,this.lineWidthRange[0],this.lineWidthRange[1]))},n.prototype.showOverdrawInspector=function(t){if(t||this._showOverdrawInspector){this._showOverdrawInspector=t;var e=this.gl;if(t){e.blendFunc(e.CONSTANT_COLOR,e.ONE);e.blendColor(1/8,1/8,1/8,0),e.clearColor(0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)}else e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)}}},{"../data/bucket":318,"../data/buffer":323,"../source/pixels_to_tile_units":352,"../source/source_cache":356,"../util/browser":415,"../util/struct_array":429,"../util/util":431,"./create_uniform_pragmas":333,"./draw_background":334,"./draw_circle":335,"./draw_debug":337,"./draw_fill":338,"./draw_line":339,"./draw_raster":340,"./draw_symbol":341,"./frame_history":342,"./painter/use_program":345,"./vertex_array_object":346,"gl-matrix":184}],345:[function(t,e,r){"use strict";function n(t,e){return t.replace(/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,function(t,r,n,i,a){return e[r][a].replace(/{type}/g,i).replace(/{precision}/g,n)})}var i=t("assert"),a=t("../../util/util"),o=t("mapbox-gl-shaders"),s=o.util;e.exports._createProgram=function(t,e,r,l){for(var u=this.gl,c=u.createProgram(),h=o[t],f="#define MAPBOX_GL_JS;\n",d=0;dthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,n={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,overscaling:r,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send("load tile",n,function(r,n){if(t.unloadVectorData(this.map.painter),!t.aborted)return r?e(r):(t.loadVectorData(n,this.map.style),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(this)),e(null))}.bind(this),this.workerID)},abortTile:function(t){t.aborted=!0},unloadTile:function(t){t.unloadVectorData(this.map.painter),this.dispatcher.send("remove tile",{uid:t.uid,source:this.id},function(){},t.workerID)},serialize:function(){return{type:this.type,data:this._data}}})},{"../data/bucket":318,"../util/evented":423,"../util/util":431,"resolve-url":489}],348:[function(t,e,r){"use strict";function n(t,e,r){r&&(this.loadGeoJSON=r),h.call(this,t,e)}var i=t("../util/util"),a=t("../util/ajax"),o=t("geojson-rewind"),s=t("./geojson_wrapper"),l=t("vt-pbf"),u=t("supercluster"),c=t("geojson-vt"),h=t("./vector_tile_worker_source");e.exports=n,n.prototype=i.inherit(h,{_geoJSONIndexes:{},loadVectorData:function(t,e){var r=t.source,n=t.coord;if(!this._geoJSONIndexes[r])return e(null,null);var i=this._geoJSONIndexes[r].getTile(Math.min(n.z,t.maxZoom),n.x,n.y);if(!i)return e(null,null);var a=new s(i.features);a.name="_geojsonTileLayer";var o=l({layers:{_geojsonTileLayer:a}});0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{tile:a,rawTileData:o.buffer})},loadData:function(t,e){var r=function(r,n){return r?e(r):"object"!=typeof n?e(new Error("Input data is not a valid GeoJSON object.")):(o(n,!0),void this._indexData(n,t,function(r,n){if(r)return e(r);this._geoJSONIndexes[t.source]=n,e(null)}.bind(this)))}.bind(this);this.loadGeoJSON(t,r)},loadGeoJSON:function(t,e){if(t.url)a.getJSON(t.url,e);else{if("string"!=typeof t.data)return e(new Error("Input data is not a valid GeoJSON object."));try{return e(null,JSON.parse(t.data))}catch(t){return e(new Error("Input data is not a valid GeoJSON object."))}}},_indexData:function(t,e,r){try{e.cluster?r(null,u(e.superclusterOptions).load(t.features)):r(null,c(t,e.geojsonVtOptions))}catch(t){return r(t)}}})},{"../util/ajax":414,"../util/util":431,"./geojson_wrapper":349,"./vector_tile_worker_source":360,"geojson-rewind":130,"geojson-vt":134,supercluster:516,"vt-pbf":543}],349:[function(t,e,r){"use strict";function n(t){this.features=t,this.length=t.length,this.extent=s}function i(t){if(this.type=t.type,1===t.type){this.rawGeometry=[];for(var e=0;ee)){var o=Math.pow(2,Math.min(a.coord.z,this.maxzoom)-Math.min(t.z,this.maxzoom));if(Math.floor(a.coord.x/o)===t.x&&Math.floor(a.coord.y/o)===t.y)for(r[i]=!0,n=!0;a&&a.coord.z-1>t.z;){var s=a.coord.parent(this.maxzoom).id;a=this._tiles[s],a&&a.isRenderable()&&(delete r[i],r[s]=!0)}}}return n},findLoadedParent:function(t,e,r){for(var n=t.z-1;n>=e;n--){t=t.parent(this.maxzoom);var i=this._tiles[t.id];if(i&&i.isRenderable())return r[t.id]=!0,i;if(this._cache.has(t.id))return this.addTile(t),r[t.id]=!0,this._tiles[t.id]}},updateCacheSize:function(t){var e=Math.ceil(t.width/t.tileSize)+1,r=Math.ceil(t.height/t.tileSize)+1,n=e*r;this._cache.setMaxSize(Math.floor(5*n))},update:function(t,e){if(this._sourceLoaded){var r,i,a;this.updateCacheSize(t);var o=(this.roundZoom?Math.round:Math.floor)(this.getZoom(t)),s=Math.max(o-n.maxOverzooming,this.minzoom),l=Math.max(o+n.maxUnderzooming,this.minzoom),c={},h=(new Date).getTime();this._coveredTiles={};var d=this.used?t.coveringTiles(this._source):[];for(r=0;rh-(e||0)&&(this.findLoadedChildren(i,l,c)&&(c[v]=!0),this.findLoadedParent(i,s,p))}var y;for(y in p)c[y]||(this._coveredTiles[y]=!0);for(y in p)c[y]=!0;var b=f.keysDifference(this._tiles,c);for(r=0;rthis.maxzoom?Math.pow(2,n-this.maxzoom):1;e=new s(r,this.tileSize*i,this.maxzoom),this.loadTile(e,this._tileLoaded.bind(this,e))}return e.uses++,this._tiles[t.id]=e,this.fire("tile.add",{tile:e}),this._source.fire("tile.add",{tile:e}),e},removeTile:function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this.fire("tile.remove",{tile:e}),this._source.fire("tile.remove",{tile:e}),e.uses>0||(e.isRenderable()?this._cache.add(e.coord.wrapped().id,e):(e.aborted=!0,this.abortTile(e),this.unloadTile(e))))},clearTiles:function(){for(var t in this._tiles)this.removeTile(t);this._cache.reset()},tilesIn:function(t){for(var e={},r=this.getIds(),n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0].zoom,c=0;c=0&&v[1].y>=0){for(var y=[],b=0;b=0&&t%1==0),l(!isNaN(e)&&e>=0&&e%1==0),l(!isNaN(r)&&r>=0&&r%1==0),isNaN(n)&&(n=0),this.z=+t,this.x=+e,this.y=+r,this.w=+n,(n*=2)<0&&(n=-1*n-1);var i=1<0;a--)n=1<e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function o(t,e,r,n,i){var a=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx0,h=e.dx<0,f=a;fc.dy&&(l=u,u=c,c=l),u.dy>h.dy&&(l=u,u=h,h=l),c.dy>h.dy&&(l=c,c=h,h=l),u.dy&&o(h,u,n,i,s),c.dy&&o(h,c,n,i,s)}var l=t("assert"),u=t("whoots-js"),c=t("../geo/coordinate");e.exports=n,n.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y},n.prototype.toCoordinate=function(t){var e=Math.min(this.z,t),r=Math.pow(2,e),n=this.y,i=this.x+r*this.w +;return new c(i,n,e)},n.fromID=function(t){var e=t%32,r=1<t?new n(this.z-1,this.x,this.y,this.w):new n(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},n.prototype.wrapped=function(){return new n(this.z,this.x,this.y,0)},n.prototype.children=function(t){if(this.z>=t)return[new n(this.z+1,this.x,this.y,this.w)];var e=this.z+1,r=2*this.x,i=2*this.y;return[new n(e,r,i,this.w),new n(e,r+1,i,this.w),new n(e,r,i+1,this.w),new n(e,r+1,i+1,this.w)]},n.cover=function(t,e,r){function i(t,e,i){var s,l,u;if(i>=0&&i<=a)for(s=t;sthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,i={url:s(t.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),uid:t.uid,coord:t.coord,zoom:t.coord.z,tileSize:this.tileSize*n,source:this.id,overscaling:n,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID?"loading"===t.state?t.reloadCallback=e:(i.rawTileData=t.rawTileData,this.dispatcher.send("reload tile",i,r.bind(this),t.workerID)):t.workerID=this.dispatcher.send("load tile",i,r.bind(this))},abortTile:function(t){this.dispatcher.send("abort tile",{uid:t.uid,source:this.id},null,t.workerID)},unloadTile:function(t){t.unloadVectorData(this.map.painter),this.dispatcher.send("remove tile",{uid:t.uid,source:this.id},null,t.workerID)}})},{"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./load_tilejson":351}],360:[function(t,e,r){"use strict";function n(t,e,r){this.actor=t,this.styleLayers=e,r&&(this.loadVectorData=r),this.loading={},this.loaded={}}var i=t("../util/ajax"),a=t("vector-tile"),o=t("pbf"),s=t("./worker_tile");e.exports=n,n.prototype={loadTile:function(t,e){function r(t,r){return delete this.loading[n][i],t?e(t):r?(a.data=r.tile,a.parse(a.data,this.styleLayers.getLayerFamilies(),this.actor,r.rawTileData,e),this.loaded[n]=this.loaded[n]||{},void(this.loaded[n][i]=a)):e(null,null)}var n=t.source,i=t.uid;this.loading[n]||(this.loading[n]={});var a=this.loading[n][i]=new s(t);a.abort=this.loadVectorData(t,r.bind(this))},reloadTile:function(t,e){var r=this.loaded[t.source],n=t.uid;if(r&&r[n]){var i=r[n];i.parse(i.data,this.styleLayers.getLayerFamilies(),this.actor,t.rawTileData,e)}},abortTile:function(t){var e=this.loading[t.source],r=t.uid;e&&e[r]&&e[r].abort&&(e[r].abort(),delete e[r])},removeTile:function(t){var e=this.loaded[t.source],r=t.uid;e&&e[r]&&delete e[r]},loadVectorData:function(t,e){function r(t,r){if(t)return e(t);var n=new a.VectorTile(new o(new Uint8Array(r)));e(t,{tile:n,rawTileData:r})}var n=i.getArrayBuffer(t.url,r.bind(this));return function(){n.abort()}},redoPlacement:function(t,e){var r=this.loaded[t.source],n=this.loading[t.source],i=t.uid;if(r&&r[i]){var a=r[i],o=a.redoPlacement(t.angle,t.pitch,t.showCollisionBoxes);o.result&&e(null,o.result,o.transferables)}else n&&n[i]&&(n[i].angle=t.angle)}}},{"../util/ajax":414,"./worker_tile":363,pbf:466,"vector-tile":537}],361:[function(t,e,r){"use strict";function n(t,e){this.id=t,this.urls=e.urls,this.coordinates=e.coordinates,u.getVideo(e.urls,function(t,r){if(t)return this.fire("error",{error:t});this.video=r,this.video.loop=!0;var n;this.video.addEventListener("playing",function(){n=this.map.style.animationLoop.set(1/0),this.map._rerender()}.bind(this)),this.video.addEventListener("pause",function(){this.map.style.animationLoop.cancel(n)}.bind(this)),this.map&&(this.video.play(),this.setCoordinates(e.coordinates)),this.fire("load")}.bind(this))}var i=t("../util/util"),a=t("./tile_coord"),o=t("../geo/lng_lat"),s=t("point-geometry"),l=t("../util/evented"),u=t("../util/ajax"),c=t("../data/bucket").EXTENT,h=t("../render/draw_raster").RasterBoundsArray,f=t("../data/buffer"),d=t("../render/vertex_array_object");e.exports=n,n.prototype=i.inherit(l,{minzoom:0,maxzoom:22,tileSize:512,roundZoom:!0,getVideo:function(){return this.video},onAdd:function(t){this.map||(this.map=t,this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},setCoordinates:function(t){this.coordinates=t;var e=this.map,r=t.map(function(t){return e.transform.locationCoordinate(o.convert(t)).zoomTo(0)}),n=this.centerCoord=i.getCoordinatesCenter(r);return n.column=Math.round(n.column),n.row=Math.round(n.row),this.minzoom=this.maxzoom=n.zoom,this._coord=new a(n.zoom,n.column,n.row),this._tileCoords=r.map(function(t){var e=t.zoomTo(n.zoom);return new s(Math.round((e.column-n.column)*c),Math.round((e.row-n.row)*c))}),this.fire("change"),this},_setTile:function(t){this._prepared=!1,this.tile=t;var e=new h;e.emplaceBack(this._tileCoords[0].x,this._tileCoords[0].y,0,0),e.emplaceBack(this._tileCoords[1].x,this._tileCoords[1].y,32767,0),e.emplaceBack(this._tileCoords[3].x,this._tileCoords[3].y,0,32767),e.emplaceBack(this._tileCoords[2].x,this._tileCoords[2].y,32767,32767),this.tile.buckets={},this.tile.boundsBuffer=new f(e.serialize(),h.serialize(),f.BufferType.VERTEX),this.tile.boundsVAO=new d,this.tile.state="loaded"},prepare:function(){if(!(this.video.readyState<2)&&this.tile){var t=this.map.painter.gl;this._prepared?(t.bindTexture(t.TEXTURE_2D,this.tile.texture),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,this.video)):(this._prepared=!0,this.tile.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.tile.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.video)),this._currentTime=this.video.currentTime}},loadTile:function(t,e){this._coord&&this._coord.toString()===t.coord.toString()?(this._setTile(t),e(null)):(t.state="errored",e(null))},serialize:function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}})},{"../data/bucket":318,"../data/buffer":323,"../geo/lng_lat":328,"../render/draw_raster":340,"../render/vertex_array_object":346,"../util/ajax":414,"../util/evented":423,"../util/util":431,"./tile_coord":358,"point-geometry":472}],362:[function(t,e,r){"use strict";function n(t){this.self=t,this.actor=new a(t,this);var e={getLayers:function(){return this.layers}.bind(this),getLayerFamilies:function(){return this.layerFamilies}.bind(this)};this.workerSources={vector:new l(this.actor,e),geojson:new u(this.actor,e)},this.self.registerWorkerSource=function(t,r){if(this.workerSources[t])throw new Error('Worker source with name "'+t+'" already registered.');this.workerSources[t]=new r(this.actor,e)}.bind(this)}function i(t){var e={};for(var r in t){var n=t[r],i=n.ref||n.id,a=t[i];a.layout&&"none"===a.layout.visibility||(e[i]=e[i]||[],r===i?e[i].unshift(n):e[i].push(n))}return e}var a=t("../util/actor"),o=t("../style/style_layer"),s=t("../util/util"),l=t("./vector_tile_worker_source"),u=t("./geojson_worker_source");e.exports=function(t){return new n(t)},s.extend(n.prototype,{"set layers":function(t){function e(t){var e=o.create(t,t.ref&&r.layers[t.ref]);e.updatePaintTransitions({},{transition:!1}),r.layers[e.id]=e}this.layers={};for(var r=this,n=[],a=0;a=0;e--)b(E,P[e]);x()}}function b(t,e){if(e.populateArrays(A,F,j),"symbol"!==e.type)for(var r=0;r=w.maxzoom||w.layout&&"none"===w.layout.visibility||t.layers&&!t.layers[w.sourceLayer]||(k=c.create({layer:w,index:z++,childLayers:e[D],zoom:this.zoom,overscaling:this.overscaling,showCollisionBoxes:this.showCollisionBoxes,collisionBoxArray:this.collisionBoxArray,symbolQuadsArray:this.symbolQuadsArray,symbolInstancesArray:this.symbolInstancesArray,sourceLayerIndex:S.encode(w.sourceLayer||"_geojsonTileLayer")}),k.createFilter(),L[w.id]=k,t.layers&&(M=w.sourceLayer,C[M]=C[M]||{},C[M][w.id]=k)));if(t.layers)for(M in C)1===w.version&&d.warnOnce('Vector tile source "'+this.source+'" layer "'+M+'" does not use vector tile spec v2 and therefore may have some rendering errors.'),(w=t.layers[M])&&v(w,C[M]);else v(t,L);var I=[],P=this.symbolBuckets=[],O=[];T.bucketLayerIDs={};for(var R in L)k=L[R],0!==k.features.length&&(T.bucketLayerIDs[k.index]=k.childLayers.map(s),I.push(k),"symbol"===k.type?P.push(k):O.push(k));var j={},F={},N=0;if(P.length>0){for(_=P.length-1;_>=0;_--)P[_].updateIcons(j),P[_].updateFont(F);for(var B in F)F[B]=Object.keys(F[B]).map(Number);j=Object.keys(j),r.send("get glyphs",{uid:this.uid,stacks:F},function(t,e){F=e,y(t)}),j.length?r.send("get icons",{icons:j},function(t,e){j=e,y(t)}):y()}for(_=O.length-1;_>=0;_--)b(this,O[_]);if(0===P.length)return x()},n.prototype.redoPlacement=function(t,e,r){if("done"!==this.status)return this.redoPlacementAfterDone=!0,this.angle=t,{};for(var n=new u(t,e,this.collisionBoxArray),s=this.symbolBuckets,l=s.length-1;l>=0;l--)s[l].placeFeatures(n,r);var c=n.serialize(),h=s.filter(i);return{result:{buckets:h.map(a),collisionTile:c.data},transferables:o(h).concat(c.transferables)}}},{"../data/bucket":318,"../data/feature_index":325,"../symbol/collision_box":383,"../symbol/collision_tile":385,"../symbol/symbol_instances":394,"../symbol/symbol_quads":395,"../util/dictionary_coder":421,"../util/util":431}],364:[function(t,e,r){"use strict";function n(){this.n=0,this.times=[]}e.exports=n,n.prototype.stopped=function(){return this.times=this.times.filter(function(t){return t.time>=(new Date).getTime()}),!this.times.length},n.prototype.set=function(t){return this.times.push({id:this.n,time:t+(new Date).getTime()}),this.n++},n.prototype.cancel=function(t){this.times=this.times.filter(function(e){return e.id!==t})}},{}],365:[function(t,e,r){"use strict";function n(t){this.base=t,this.retina=s.devicePixelRatio>1;var e=this.retina?"@2x":"";o.getJSON(l(t,e,".json"),function(t,e){if(t)return void this.fire("error",{error:t});this.data=e,this.img&&this.fire("load")}.bind(this)),o.getImage(l(t,e,".png"),function(t,e){if(t)return void this.fire("error",{error:t});for(var r=e.getData(),n=e.data=new Uint8Array(r.length),i=0;i1!==this.retina){var t=new n(this.base);t.on("load",function(){this.img=t.img,this.data=t.data,this.retina=t.retina}.bind(this))}},i.prototype={x:0,y:0,width:0,height:0,pixelRatio:1,sdf:!1},n.prototype.getSpritePosition=function(t){if(!this.loaded())return new i;var e=this.data&&this.data[t];return e&&this.img?e:new i}},{"../util/ajax":414,"../util/browser":415,"../util/evented":423,"../util/mapbox":428}],366:[function(t,e,r){"use strict";var n=t("csscolorparser").parseCSSColor,i=t("../util/util"),a=t("./style_function"),o={};e.exports=function t(e){if(a.isFunctionDefinition(e))return i.extend({},e,{stops:e.stops.map(function(e){return[e[0],t(e[1])]})});if("string"==typeof e){if(!o[e]){var r=n(e);if(!r)throw new Error("Invalid color "+e);o[e]=[r[0]/255*r[3],r[1]/255*r[3],r[2]/255*r[3],r[3]]}return o[e]}throw new Error("Invalid color "+e)}},{"../util/util":431,"./style_function":369,csscolorparser:100}],367:[function(t,e,r){"use strict";function n(t,e,r){this.animationLoop=e||new m,this.dispatcher=new p(r||1,this),this.spriteAtlas=new l(1024,1024),this.lineAtlas=new u(256,512),this._layers={},this._order=[],this._groups=[],this.sources={},this.zoomHistory={},c.bindAll(["_forwardSourceEvent","_forwardTileEvent","_forwardLayerEvent","_redoPlacement"],this),this._resetUpdates();var n=function(t,e){if(t)return void this.fire("error",{error:t});if(!g.emitErrors(this,g(e))){this._loaded=!0,this.stylesheet=e,this.updateClasses();var r=e.sources;for(var n in r)this.addSource(n,r[n]);e.sprite&&(this.sprite=new o(e.sprite),this.sprite.on("load",this.fire.bind(this,"change"))),this.glyphSource=new s(e.glyphs),this._resolve(),this.fire("load")}}.bind(this);"string"==typeof t?h.getJSON(f(t),n):d.frame(n.bind(this,null,t)),this.on("source.load",function(t){var e=t.source;if(e&&e.vectorLayerIds)for(var r in this._layers){var n=this._layers[r];n.source===e.id&&this._validateLayer(n)}})}var i=t("../util/evented"),a=t("./style_layer"),o=t("./image_sprite"),s=t("../symbol/glyph_source"),l=t("../symbol/sprite_atlas"),u=t("../render/line_atlas"),c=t("../util/util"),h=t("../util/ajax"),f=t("../util/mapbox").normalizeStyleURL,d=t("../util/browser"),p=t("../util/dispatcher"),m=t("./animation_loop"),g=t("./validate_style"),v=t("../source/source"),y=t("../source/query_features"),b=t("../source/source_cache"),x=t("./style_spec"),_=t("./style_function");e.exports=n,n.prototype=c.inherit(i,{_loaded:!1,_validateLayer:function(t){var e=this.sources[t.source];t.sourceLayer&&e&&e.vectorLayerIds&&-1===e.vectorLayerIds.indexOf(t.sourceLayer)&&this.fire("error",{error:new Error('Source layer "'+t.sourceLayer+'" does not exist on source "'+e.id+'" as specified by style layer "'+t.id+'"')})},loaded:function(){if(!this._loaded)return!1;if(Object.keys(this._updates.sources).length)return!1;for(var t in this.sources)if(!this.sources[t].loaded())return!1;return!(this.sprite&&!this.sprite.loaded())},_resolve:function(){var t,e;this._layers={},this._order=this.stylesheet.layers.map(function(t){return t.id});for(var r=0;rMath.floor(t)&&(e.lastIntegerZoom=Math.floor(t+1),e.lastIntegerZoomTime=Date.now()),e.lastZoom=t},_checkLoaded:function(){if(!this._loaded)throw new Error("Style is not done loading")},update:function(t,e){if(!this._updates.changed)return this;if(this._updates.allLayers)this._groupLayers(),this._updateWorkerLayers();else{var r=Object.keys(this._updates.layers);r.length&&this._updateWorkerLayers(r)}var n,i=Object.keys(this._updates.sources);for(n=0;n=0&&this._handleErrors(g.source,"sources."+t,e)?this:(e=new b(t,e,this.dispatcher),this.sources[t]=e,e.style=this,e.on("load",this._forwardSourceEvent).on("error",this._forwardSourceEvent).on("change",this._forwardSourceEvent).on("tile.add",this._forwardTileEvent).on("tile.load",this._forwardTileEvent).on("tile.error",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this._updates.events.push(["source.add",{source:e}]),this._updates.changed=!0,this)},removeSource:function(t){if(this._checkLoaded(),void 0===this.sources[t])throw new Error("There is no source with this ID");var e=this.sources[t];return delete this.sources[t],delete this._updates.sources[t],e.off("load",this._forwardSourceEvent).off("error",this._forwardSourceEvent).off("change",this._forwardSourceEvent).off("tile.add",this._forwardTileEvent).off("tile.load",this._forwardTileEvent).off("tile.error",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent),this._updates.events.push(["source.remove",{source:e}]),this._updates.changed=!0,this},getSource:function(t){return this.sources[t]&&this.sources[t].getSource()},addLayer:function(t,e){if(this._checkLoaded(),!(t instanceof a)){if(this._handleErrors(g.layer,"layers."+t.id,t,!1,{arrayIndex:-1}))return this;var r=t.ref&&this.getLayer(t.ref);t=a.create(t,r)}return this._validateLayer(t),t.on("error",this._forwardLayerEvent),this._layers[t.id]=t,this._order.splice(e?this._order.indexOf(e):1/0,0,t.id),this._updates.allLayers=!0,t.source&&(this._updates.sources[t.source]=!0),this._updates.events.push(["layer.add",{layer:t}]),this.updateClasses(t.id)},removeLayer:function(t){this._checkLoaded();var e=this._layers[t];if(void 0===e)throw new Error("There is no layer with this ID");for(var r in this._layers)this._layers[r].ref===t&&this.removeLayer(r);return e.off("error",this._forwardLayerEvent),delete this._layers[t],delete this._updates.layers[t],delete this._updates.paintProps[t],this._order.splice(this._order.indexOf(t),1),this._updates.allLayers=!0,this._updates.events.push(["layer.remove",{layer:e}]),this._updates.changed=!0,this},getLayer:function(t){return this._layers[t]},getReferentLayer:function(t){var e=this.getLayer(t);return e.ref&&(e=this.getLayer(e.ref)),e},setLayerZoomRange:function(t,e,r){this._checkLoaded();var n=this.getReferentLayer(t);return n.minzoom===e&&n.maxzoom===r?this:(null!=e&&(n.minzoom=e),null!=r&&(n.maxzoom=r),this._updateLayer(n))},setFilter:function(t,e){this._checkLoaded();var r=this.getReferentLayer(t);return null!==e&&this._handleErrors(g.filter,"layers."+r.id+".filter",e)?this:c.deepEqual(r.filter,e)?this:(r.filter=c.clone(e),this._updateLayer(r))},getFilter:function(t){return this.getReferentLayer(t).filter},setLayoutProperty:function(t,e,r){this._checkLoaded();var n=this.getReferentLayer(t);return c.deepEqual(n.getLayoutProperty(e),r)?this:(n.setLayoutProperty(e,r),this._updateLayer(n))},getLayoutProperty:function(t,e){return this.getReferentLayer(t).getLayoutProperty(e)},setPaintProperty:function(t,e,r,n){this._checkLoaded();var i=this.getLayer(t);if(c.deepEqual(i.getPaintProperty(e,n),r))return this;var a=i.isPaintValueFeatureConstant(e);return i.setPaintProperty(e,r,n),!(r&&_.isFunctionDefinition(r)&&"$zoom"!==r.property&&void 0!==r.property)&&a||(this._updates.layers[t]=!0,i.source&&(this._updates.sources[i.source]=!0)),this.updateClasses(t,e)},getPaintProperty:function(t,e,r){return this.getLayer(t).getPaintProperty(e,r)},updateClasses:function(t,e){if(this._updates.changed=!0,t){var r=this._updates.paintProps;r[t]||(r[t]={}),r[t][e||"all"]=!0}else this._updates.allPaintProps=!0;return this},serialize:function(){return c.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:c.mapObject(this.sources,function(t){return t.serialize()}),layers:this._order.map(function(t){return this._layers[t].serialize()},this)},function(t){return void 0!==t})},_updateLayer:function(t){return this._updates.layers[t.id]=!0,t.source&&(this._updates.sources[t.source]=!0),this._updates.changed=!0,this},_flattenRenderedFeatures:function(t){for(var e=[],r=this._order.length-1;r>=0;r--)for(var n=this._order[r],i=0;is.lastIntegerZoom?(n=u+(1-u)*c,h*=2,i=t({zoom:o-1},r),a=t({zoom:o},r)):(n=1-(1-c)*u,a=t({zoom:o},r),i=t({zoom:o+1},r),h/=2),void 0===i||void 0===a?void 0:{from:i,fromScale:h,to:a,toScale:1,t:n}}}var a=t("./style_function"),o=t("./parse_color"),s=t("../util/util");e.exports=n},{"../util/util":431,"./parse_color":366,"./style_function":369}],369:[function(t,e,r){"use strict";var n=t("mapbox-gl-function");r.interpolated=function(t){var e=n.interpolated(t),r=function(t,r){return e(t&&t.zoom,r||{})};return r.isFeatureConstant=e.isFeatureConstant,r.isZoomConstant=e.isZoomConstant,r},r["piecewise-constant"]=function(t){var e=n["piecewise-constant"](t),r=function(t,r){return e(t&&t.zoom,r||{})};return r.isFeatureConstant=e.isFeatureConstant,r.isZoomConstant=e.isZoomConstant,r},r.isFunctionDefinition=n.isFunctionDefinition},{"mapbox-gl-function":291}],370:[function(t,e,r){"use strict";function n(t,e){this.set(t,e)}function i(t){return t.value}var a=t("../util/util"),o=t("./style_transition"),s=t("./style_declaration"),l=t("./style_spec"),u=t("./validate_style"),c=t("./parse_color"),h=t("../util/evented");e.exports=n;n.create=function(e,r){return new({background:t("./style_layer/background_style_layer"),circle:t("./style_layer/circle_style_layer"),fill:t("./style_layer/fill_style_layer"),line:t("./style_layer/line_style_layer"),raster:t("./style_layer/raster_style_layer"),symbol:t("./style_layer/symbol_style_layer")}[(r||e).type])(e,r)},n.prototype=a.inherit(h,{set:function(t,e){this.id=t.id,this.ref=t.ref,this.metadata=t.metadata,this.type=(e||t).type,this.source=(e||t).source,this.sourceLayer=(e||t)["source-layer"],this.minzoom=(e||t).minzoom,this.maxzoom=(e||t).maxzoom,this.filter=(e||t).filter,this.paint={},this.layout={},this._paintSpecifications=l["paint_"+this.type],this._layoutSpecifications=l["layout_"+this.type],this._paintTransitions={},this._paintTransitionOptions={},this._paintDeclarations={},this._layoutDeclarations={},this._layoutFunctions={};var r,n;for(var i in t){var a=i.match(/^paint(?:\.(.*))?$/);if(a){var o=a[1]||"";for(r in t[i])this.setPaintProperty(r,t[i][r],o)}}if(this.ref)this._layoutDeclarations=e._layoutDeclarations;else for(n in t.layout)this.setLayoutProperty(n,t.layout[n]);for(r in this._paintSpecifications)this.paint[r]=this.getPaintValue(r);for(n in this._layoutSpecifications)this._updateLayoutValue(n)},setLayoutProperty:function(t,e){if(null==e)delete this._layoutDeclarations[t];else{var r="layers."+this.id+".layout."+t;if(this._handleErrors(u.layoutProperty,r,t,e))return;this._layoutDeclarations[t]=new s(this._layoutSpecifications[t],e)}this._updateLayoutValue(t)},getLayoutProperty:function(t){return this._layoutDeclarations[t]&&this._layoutDeclarations[t].value}, +getLayoutValue:function(t,e,r){var n=this._layoutSpecifications[t],i=this._layoutDeclarations[t];return i?i.calculate(e,r):n.default},setPaintProperty:function(t,e,r){var n="layers."+this.id+(r?'["paint.'+r+'"].':".paint.")+t;if(a.endsWith(t,"-transition"))if(this._paintTransitionOptions[r||""]||(this._paintTransitionOptions[r||""]={}),null===e||void 0===e)delete this._paintTransitionOptions[r||""][t];else{if(this._handleErrors(u.paintProperty,n,t,e))return;this._paintTransitionOptions[r||""][t]=e}else if(this._paintDeclarations[r||""]||(this._paintDeclarations[r||""]={}),null===e||void 0===e)delete this._paintDeclarations[r||""][t];else{if(this._handleErrors(u.paintProperty,n,t,e))return;this._paintDeclarations[r||""][t]=new s(this._paintSpecifications[t],e)}},getPaintProperty:function(t,e){return e=e||"",a.endsWith(t,"-transition")?this._paintTransitionOptions[e]&&this._paintTransitionOptions[e][t]:this._paintDeclarations[e]&&this._paintDeclarations[e][t]&&this._paintDeclarations[e][t].value},getPaintValue:function(t,e,r){var n=this._paintSpecifications[t],i=this._paintTransitions[t];return i?i.calculate(e,r):"color"===n.type&&n.default?c(n.default):n.default},getPaintValueStopZoomLevels:function(t){var e=this._paintTransitions[t];return e?e.declaration.stopZoomLevels:[]},getPaintInterpolationT:function(t,e){return this._paintTransitions[t].declaration.calculateInterpolationT({zoom:e})},isPaintValueFeatureConstant:function(t){var e=this._paintTransitions[t];return!e||e.declaration.isFeatureConstant},isLayoutValueFeatureConstant:function(t){var e=this._layoutDeclarations[t];return!e||e.isFeatureConstant},isPaintValueZoomConstant:function(t){var e=this._paintTransitions[t];return!e||e.declaration.isZoomConstant},isHidden:function(t){return!!(this.minzoom&&t=this.maxzoom)||("none"===this.layout.visibility||0===this.paint[this.type+"-opacity"]))},updatePaintTransitions:function(t,e,r,n){for(var i=a.extend({},this._paintDeclarations[""]),o=0;o-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],u=0;sn;)u-=l.shift().angleDelta;if(u>i)return!1;o++,s+=h.dist(f)}return!0}e.exports=n},{}],382:[function(t,e,r){"use strict";function n(t,e,r,n,a){for(var o=[],s=0;s=n&&f.x>=n||(h.x>=n?h=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round():f.x>=n&&(f=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round()),h.y>=a&&f.y>=a||(h.y>=a?h=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round():f.y>=a&&(f=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round()),l&&h.equals(l[l.length-1])||(l=[h],o.push(l)),l.push(f)))))}return o}var i=t("point-geometry");e.exports=n},{"point-geometry":472}],383:[function(t,e,r){"use strict";var n=t("../util/struct_array"),i=t("../util/util"),a=t("point-geometry"),o=e.exports=new n({members:[{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Float32",name:"maxScale"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"bbox0"},{type:"Int16",name:"bbox1"},{type:"Int16",name:"bbox2"},{type:"Int16",name:"bbox3"},{type:"Float32",name:"placementScale"}]});i.extendAll(o.prototype.StructType.prototype,{get anchorPoint(){return new a(this.anchorPointX,this.anchorPointY)}})},{"../util/struct_array":429,"../util/util":431,"point-geometry":472}],384:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l,u,c){var h=o.top*s-l,f=o.bottom*s+l,d=o.left*s-l,p=o.right*s+l;if(this.boxStartIndex=t.length,u){var m=f-h,g=p-d;if(m>0)if(m=Math.max(10*s,m),c){var v=e[r.segment+1].sub(e[r.segment])._unit()._mult(g),y=[r.sub(v),r.add(v)];this._addLineCollisionBoxes(t,y,r,0,g,m,n,i,a)}else this._addLineCollisionBoxes(t,e,r,r.segment,g,m,n,i,a)}else t.emplaceBack(r.x,r.y,d,h,p,f,1/0,n,i,a,0,0,0,0,0);this.boxEndIndex=t.length}e.exports=n,n.prototype._addLineCollisionBoxes=function(t,e,r,n,i,a,o,s,l){var u=a/2,c=Math.floor(i/u),h=-a/2,f=this.boxes,d=r,p=n+1,m=h;do{if(--p<0)return f;m-=e[p].dist(d),d=e[p]}while(m>-i/2);for(var g=e[p].dist(e[p+1]),v=0;v=e.length)return f;g=e[p].dist(e[p+1])}var b=y-m,x=e[p],_=e[p+1],w=_.sub(x)._unit()._mult(b)._add(x)._round(),M=Math.max(Math.abs(y-h)-u/2,0),k=i/2/M;t.emplaceBack(w.x,w.y,-a/2,-a/2,a/2,a/2,k,o,s,l,0,0,0,0,0)}return f}},{}],385:[function(t,e,r){"use strict";function n(t,e,r){if("object"==typeof t){var n=t;r=e,t=n.angle,e=n.pitch,this.grid=new o(n.grid),this.ignoredGrid=new o(n.ignoredGrid)}else this.grid=new o(a,12,6),this.ignoredGrid=new o(a,12,0);this.angle=t,this.pitch=e;var i=Math.sin(t),s=Math.cos(t);if(this.rotationMatrix=[s,-i,i,s],this.reverseRotationMatrix=[s,i,-i,s],this.yStretch=1/Math.cos(e/180*Math.PI),this.yStretch=Math.pow(this.yStretch,1.3),this.collisionBoxArray=r,0===r.length){r.emplaceBack();r.emplaceBack(0,0,0,-32767,0,32767,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(a,0,0,-32767,0,32767,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(0,0,-32767,0,32767,0,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(0,a,-32767,0,32767,0,32767,0,0,0,0,0,0,0,0,0)}this.tempCollisionBox=r.get(0),this.edges=[r.get(1),r.get(2),r.get(3),r.get(4)]}var i=t("point-geometry"),a=t("../data/bucket").EXTENT,o=t("grid-index");e.exports=n,n.prototype.serialize=function(){var t={angle:this.angle,pitch:this.pitch,grid:this.grid.toArrayBuffer(),ignoredGrid:this.ignoredGrid.toArrayBuffer()};return{data:t,transferables:[t.grid,t.ignoredGrid]}},n.prototype.minScale=.25,n.prototype.maxScale=2,n.prototype.placeCollisionFeature=function(t,e,r){for(var n=this.collisionBoxArray,a=this.minScale,o=this.rotationMatrix,s=this.yStretch,l=t.boxStartIndex;l=this.maxScale)return a}if(r){var _;if(this.angle){var w=this.reverseRotationMatrix,M=new i(u.x1,u.y1).matMult(w),k=new i(u.x2,u.y1).matMult(w),A=new i(u.x1,u.y2).matMult(w),T=new i(u.x2,u.y2).matMult(w);_=this.tempCollisionBox,_.anchorPointX=u.anchorPoint.x,_.anchorPointY=u.anchorPoint.y,_.x1=Math.min(M.x,k.x,A.x,T.x),_.y1=Math.min(M.y,k.x,A.x,T.x),_.x2=Math.max(M.x,k.x,A.x,T.x),_.y2=Math.max(M.y,k.x,A.x,T.x),_.maxScale=u.maxScale}else _=u;for(var S=0;S=this.maxScale)return a}}}return a},n.prototype.queryRenderedSymbols=function(t,e,r,n,a){var o={},s=[],l=this.collisionBoxArray,u=this.rotationMatrix,c=new i(t,e)._matMult(u),h=this.tempCollisionBox;h.anchorX=c.x,h.anchorY=c.y,h.x1=0,h.y1=0,h.x2=r-t,h.y2=n-e,h.maxScale=a,a=h.maxScale;for(var f=[c.x+h.x1/a,c.y+h.y1/a*this.yStretch,c.x+h.x2/a,c.y+h.y2/a*this.yStretch],d=this.grid.query(f[0],f[1],f[2],f[3]),p=this.ignoredGrid.query(f[0],f[1],f[2],f[3]),m=0;m=a&&(o[y][b]=!0,s.push(d[g]))}}return s},n.prototype.getPlacementScale=function(t,e,r,n,i){var a=e.x-n.x,o=e.y-n.y,s=(i.x1-r.x2)/a,l=(i.x2-r.x1)/a,u=(i.y1-r.y2)*this.yStretch/o,c=(i.y2-r.y1)*this.yStretch/o;(isNaN(s)||isNaN(l))&&(s=l=1),(isNaN(u)||isNaN(c))&&(u=c=1);var h=Math.min(Math.max(s,l),Math.max(u,c)),f=i.maxScale,d=r.maxScale;return h>f&&(h=f),h>d&&(h=d),h>t&&h>=i.placementScale&&(t=h),t},n.prototype.insertCollisionFeature=function(t,e,r){for(var n=r?this.ignoredGrid:this.grid,i=this.collisionBoxArray,a=t.boxStartIndex;a=0&&A=0&&T=0&&v+d<=p){var S=new o(A,T,M,b)._round();n&&!s(t,S,u,n,l)||y.push(S)}}g+=w}return h||y.length||c||(y=i(t,g/2,r,n,l,u,c,!0,f)),y}var a=t("../util/interpolate"),o=t("../symbol/anchor"),s=t("./check_max_angle");e.exports=n},{"../symbol/anchor":380,"../util/interpolate":425,"./check_max_angle":381}],387:[function(t,e,r){"use strict";function n(){this.width=o,this.height=o,this.bin=new i(this.width,this.height),this.index={},this.ids={},this.data=new Uint8Array(this.width*this.height)}var i=t("shelf-pack"),a=t("../util/util"),o=128;e.exports=n,n.prototype.getGlyphs=function(){var t,e,r,n={};for(var i in this.ids)t=i.split("#"),e=t[0],r=t[1],n[e]||(n[e]=[]),n[e].push(r);return n},n.prototype.getRects=function(){var t,e,r,n={};for(var i in this.ids)t=i.split("#"),e=t[0],r=t[1],n[e]||(n[e]={}),n[e][r]=this.index[i];return n},n.prototype.addGlyph=function(t,e,r,n){if(!r)return null;var i=e+"#"+r.id;if(this.index[i])return this.ids[i].indexOf(t)<0&&this.ids[i].push(t),this.index[i];if(!r.bitmap)return null;var o=r.width+2*n,s=r.height+2*n,l=o+2,u=s+2;l+=4-l%4,u+=4-u%4;var c=this.bin.packOne(l,u);if(c||(this.resize(),c=this.bin.packOne(l,u)),!c)return a.warnOnce("glyph bitmap overflow"),null;this.index[i]=c,this.ids[i]=[t];for(var h=this.data,f=r.bitmap,d=0;d=2048||e>=2048)){this.texture&&(this.gl&&this.gl.deleteTexture(this.texture),this.texture=null),this.width*=4,this.height*=4,this.bin.resize(this.width,this.height);for(var r=new ArrayBuffer(this.width*this.height),n=0;n65535)return r("glyphs > 65535 not supported");void 0===this.loading[t]&&(this.loading[t]={});var n=this.loading[t];if(n[e])n[e].push(r);else{n[e]=[r];var i=256*e+"-"+(256*e+255),o=a(t,i,this.url);s(o,function(t,r){for(var i=!t&&new l(new c(new Uint8Array(r))),a=0;an&&null!==c){var x=v[c+1].x;g=Math.max(x,g);for(var _=c+1;_<=y;_++)v[_].y+=r,v[_].x-=x;if(o){var w=c;h[v[c].codePoint]&&w--,s(v,e,p,w,o)}p=c+1,c=null,d+=x,m++}f[b.codePoint]&&(c=y)}var M=v[v.length-1],k=M.x+e[M.codePoint].advance;g=Math.max(g,k);var A=(m+1)*r;s(v,e,p,v.length-1,o),l(v,o,i,a,g,r,m,u),t.top+=-a*A,t.bottom=t.top+A,t.left+=-i*g,t.right=t.left+g}function s(t,e,r,n,i){for(var a=e[t[n].codePoint].advance,o=(t[n].x+a)*i,s=r;s<=n;s++)t[s].x-=o}function l(t,e,r,n,i,a,o,s){for(var l=(e-r)*i+s[0],u=(-n*(o+1)+.5)*a+s[1],c=0;c1?2:1,this.canvas&&(this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio)),this.sprite=t},n.prototype.addIcons=function(t,e){for(var r=0;r1||(w?(clearTimeout(w),w=null,v("dblclick",e)):w=setTimeout(d,300))}function c(t){y("touchmove",t)}function h(t){y("touchend",t)}function f(t){y("touchcancel",t)}function d(){w=null}function p(t){n.mousePos(b,t).equals(_)&&v("click",t)}function m(t){v("dblclick",t),t.preventDefault()}function g(t){x=t,t.preventDefault()}function v(e,r){var i=n.mousePos(b,r);return t.fire(e,{lngLat:t.unproject(i),point:i,originalEvent:r})}function y(e,r){var a=n.touchPos(b,r),o=a.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new i(0,0));return t.fire(e,{lngLat:t.unproject(o),point:o,lngLats:a.map(function(e){return t.unproject(e)},this),points:a,originalEvent:r})}var b=t.getCanvasContainer(),x=null,_=null,w=null;for(var M in a)t[M]=new a[M](t,e),e.interactive&&e[M]&&t[M].enable();b.addEventListener("mouseout",r,!1),b.addEventListener("mousedown",o,!1),b.addEventListener("mouseup",s,!1),b.addEventListener("mousemove",l,!1),b.addEventListener("touchstart",u,!1),b.addEventListener("touchend",h,!1),b.addEventListener("touchmove",c,!1),b.addEventListener("touchcancel",f,!1),b.addEventListener("click",p,!1),b.addEventListener("dblclick",m,!1),b.addEventListener("contextmenu",g,!1)}},{"../util/dom":417,"./handler/box_zoom":402,"./handler/dblclick_zoom":403,"./handler/drag_pan":404,"./handler/drag_rotate":405,"./handler/keyboard":406,"./handler/scroll_zoom":407,"./handler/touch_zoom_rotate":408,"point-geometry":472}],397:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("../util/interpolate"),a=t("../util/browser"),o=t("../geo/lng_lat"),s=t("../geo/lng_lat_bounds"),l=t("point-geometry"),u=e.exports=function(){};n.extend(u.prototype,{getCenter:function(){return this.transform.center},setCenter:function(t,e){return this.jumpTo({center:t},e),this},panBy:function(t,e,r){return this.panTo(this.transform.center,n.extend({offset:l.convert(t).mult(-1)},e),r),this},panTo:function(t,e,r){return this.easeTo(n.extend({center:t},e),r)},getZoom:function(){return this.transform.zoom},setZoom:function(t,e){return this.jumpTo({zoom:t},e),this},zoomTo:function(t,e,r){return this.easeTo(n.extend({zoom:t},e),r)},zoomIn:function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},zoomOut:function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},getBearing:function(){return this.transform.bearing},setBearing:function(t,e){return this.jumpTo({bearing:t},e),this},rotateTo:function(t,e,r){return this.easeTo(n.extend({bearing:t},e),r)},resetNorth:function(t,e){return this.rotateTo(0,n.extend({duration:1e3},t),e),this},snapToNorth:function(t,e){return Math.abs(this.getBearing())180&&(c.center.lng>0&&m.lng<0?m.lng+=360:c.center.lng<0&&m.lng>0&&(m.lng-=360));var b=c.zoomScale(g-f),x=c.point,_="center"in t?c.project(m).sub(h.div(b)):x,w=c.worldSize,M=t.curve,k=Math.max(c.width,c.height),A=k/b,T=_.sub(x).mag();if("minZoom"in t){var S=n.clamp(Math.min(t.minZoom,f,g),c.minZoom,c.maxZoom),E=k/c.zoomScale(S-f);M=Math.sqrt(E/T*2)}var L=M*M,C=r(0),z=function(t){return s(C)/s(C+M*t)},D=function(t){return k*((s(C)*u(C+M*t)-a(C))/L)/T},I=(r(1)-C)/M;if(Math.abs(T)<1e-6){if(Math.abs(k-A)<1e-6)return this.easeTo(t);var P=A=0)return!1;return!0}),e.join(" | ")},n.prototype=o.inherit(i,{options:{position:"bottom-right"},onAdd:function(t){var e=this._container=a.create("div","mapboxgl-ctrl-attrib",t.getContainer());return this._update(),t.on("source.load",this._update.bind(this)),t.on("source.change",this._update.bind(this)),t.on("source.remove",this._update.bind(this)),t.on("moveend",this._updateEditLink.bind(this)),e},_update:function(){this._map.style&&(this._container.innerHTML=n.createAttributionString(this._map.style.sources)),this._editLink=this._container.getElementsByClassName("mapbox-improve-map")[0],this._updateEditLink()},_updateEditLink:function(){if(this._editLink){var t=this._map.getCenter();this._editLink.href="https://www.mapbox.com/map-feedback/#/"+t.lng+"/"+t.lat+"/"+Math.round(this._map.getZoom()+1)}}})},{"../../util/dom":417,"../../util/util":431,"./control":399}],399:[function(t,e,r){"use strict";function n(){}var i=t("../../util/util"),a=t("../../util/evented");e.exports=n,n.prototype={addTo:function(t){this._map=t;var e=this._container=this.onAdd(t);if(this.options&&this.options.position){var r=this.options.position,n=t._controlCorners[r];e.className+=" mapboxgl-ctrl",-1!==r.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e)}return this},remove:function(){return this._container.parentNode.removeChild(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this}},i.extend(n.prototype,a)},{"../../util/evented":423,"../../util/util":431}],400:[function(t,e,r){"use strict";function n(t){s.setOptions(this,t)}var i=t("./control"),a=t("../../util/browser"),o=t("../../util/dom"),s=t("../../util/util");e.exports=n;var l={enableHighAccuracy:!1,timeout:6e3};n.prototype=s.inherit(i,{options:{position:"top-right"},onAdd:function(t){var e=this._container=o.create("div","mapboxgl-ctrl-group",t.getContainer());return a.supportsGeolocation?(this._container.addEventListener("contextmenu",this._onContextMenu.bind(this)),this._geolocateButton=o.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.addEventListener("click",this._onClickGeolocate.bind(this)),e):e},_onContextMenu:function(t){t.preventDefault()},_onClickGeolocate:function(){navigator.geolocation.getCurrentPosition(this._success.bind(this),this._error.bind(this),l),this._timeoutId=setTimeout(this._finish.bind(this),1e4)},_success:function(t){this._map.jumpTo({center:[t.coords.longitude,t.coords.latitude],zoom:17,bearing:0,pitch:0}),this.fire("geolocate",t),this._finish()},_error:function(t){this.fire("error",t),this._finish()},_finish:function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}})},{"../../util/browser":415,"../../util/dom":417,"../../util/util":431,"./control":399}],401:[function(t,e,r){"use strict";function n(t){s.setOptions(this,t)}function i(t){return new MouseEvent(t.type,{button:2,buttons:2,bubbles:!0,cancelable:!0,detail:t.detail,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,movementX:t.movementX,movementY:t.movementY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey})}var a=t("./control"),o=t("../../util/dom"),s=t("../../util/util");e.exports=n,n.prototype=s.inherit(a,{options:{position:"top-right"},onAdd:function(t){var e="mapboxgl-ctrl",r=this._container=o.create("div",e+"-group",t.getContainer());return this._container.addEventListener("contextmenu",this._onContextMenu.bind(this)),this._zoomInButton=this._createButton(e+"-icon "+e+"-zoom-in",t.zoomIn.bind(t)),this._zoomOutButton=this._createButton(e+"-icon "+e+"-zoom-out",t.zoomOut.bind(t)),this._compass=this._createButton(e+"-icon "+e+"-compass",t.resetNorth.bind(t)),this._compassArrow=o.create("div","arrow",this._compass),this._compass.addEventListener("mousedown",this._onCompassDown.bind(this)),this._onCompassMove=this._onCompassMove.bind(this),this._onCompassUp=this._onCompassUp.bind(this),t.on("rotate",this._rotateCompassArrow.bind(this)),this._rotateCompassArrow(),this._el=t.getCanvasContainer(),r},_onContextMenu:function(t){t.preventDefault()},_onCompassDown:function(t){0===t.button&&(o.disableDrag(),document.addEventListener("mousemove",this._onCompassMove),document.addEventListener("mouseup",this._onCompassUp),this._el.dispatchEvent(i(t)),t.stopPropagation())},_onCompassMove:function(t){0===t.button&&(this._el.dispatchEvent(i(t)),t.stopPropagation())},_onCompassUp:function(t){0===t.button&&(document.removeEventListener("mousemove",this._onCompassMove),document.removeEventListener("mouseup",this._onCompassUp),o.enableDrag(),this._el.dispatchEvent(i(t)),t.stopPropagation())},_createButton:function(t,e){var r=o.create("button",t,this._container);return r.type="button",r.addEventListener("click",function(){e()}),r},_rotateCompassArrow:function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t}})},{"../../util/dom":417,"../../util/util":431,"./control":399}],402:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),o.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../geo/lng_lat_bounds"),o=t("../../util/util");e.exports=n,n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onMouseDown,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onMouseDown),this._enabled=!1)},_onMouseDown:function(t){t.shiftKey&&0===t.button&&(document.addEventListener("mousemove",this._onMouseMove,!1),document.addEventListener("keydown",this._onKeyDown,!1),document.addEventListener("mouseup",this._onMouseUp,!1),i.disableDrag(),this._startPos=i.mousePos(this._el,t),this._active=!0)},_onMouseMove:function(t){var e=this._startPos,r=i.mousePos(this._el,t);this._box||(this._box=i.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var n=Math.min(e.x,r.x),a=Math.max(e.x,r.x),o=Math.min(e.y,r.y),s=Math.max(e.y,r.y);i.setTransform(this._box,"translate("+n+"px,"+o+"px)"),this._box.style.width=a-n+"px",this._box.style.height=s-o+"px"},_onMouseUp:function(t){if(0===t.button){var e=this._startPos,r=i.mousePos(this._el,t),n=new a(this._map.unproject(e),this._map.unproject(r));this._finish(),e.x===r.x&&e.y===r.y?this._fireEvent("boxzoomcancel",t):this._map.fitBounds(n,{linear:!0}).fire("boxzoomend",{originalEvent:t,boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},_finish:function(){this._active=!1,document.removeEventListener("mousemove",this._onMouseMove,!1),document.removeEventListener("keydown",this._onKeyDown,!1),document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.parentNode.removeChild(this._box),this._box=null),i.enableDrag()},_fireEvent:function(t,e){return this._map.fire(t,{originalEvent:e})}}},{"../../geo/lng_lat_bounds":329,"../../util/dom":417,"../../util/util":431}],403:[function(t,e,r){"use strict";function n(t){this._map=t,this._onDblClick=this._onDblClick.bind(this)}e.exports=n,n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._map.on("dblclick",this._onDblClick),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._map.off("dblclick",this._onDblClick),this._enabled=!1)},_onDblClick:function(t){this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)}}},{}],404:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),a.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/util");e.exports=n;var o=a.bezier(0,0,.3,1);n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._el.addEventListener("touchstart",this._onDown),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._el.removeEventListener("touchstart",this._onDown),this._enabled=!1)},_onDown:function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(document.addEventListener("touchmove",this._onMove),document.addEventListener("touchend",this._onTouchEnd)):(document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onMouseUp)),this._active=!1,this._startPos=this._pos=i.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},_onMove:function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._fireEvent("dragstart",t),this._fireEvent("movestart",t));var e=i.mousePos(this._el,t),r=this._map;r.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),r.transform.setLocationAtPoint(r.transform.pointLocation(this._pos),e),this._fireEvent("drag",t),this._fireEvent("move",t),this._pos=e,t.preventDefault()}},_onUp:function(t){if(this.isActive()){this._active=!1,this._fireEvent("dragend",t),this._drainInertiaBuffer();var e=function(){this._fireEvent("moveend",t)}.bind(this),r=this._inertia;if(r.length<2)return void e();var n=r[r.length-1],i=r[0],a=n[1].sub(i[1]),s=(n[0]-i[0])/1e3;if(0===s||n[1].equals(i[1]))return void e();var l=a.mult(.3/s),u=l.mag();u>1400&&(u=1400,l._unit()._mult(u));var c=u/750,h=l.mult(-c/2);this._map.panBy(h,{duration:1e3*c,easing:o,noMoveStart:!0},{originalEvent:t})}},_onMouseUp:function(t){this._ignoreEvent(t)||(this._onUp(t),document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onMouseUp))},_onTouchEnd:function(t){this._ignoreEvent(t)||(this._onUp(t),document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onTouchEnd))},_fireEvent:function(t,e){return this._map.fire(t,{originalEvent:e})},_ignoreEvent:function(t){var e=this._map;if(e.boxZoom&&e.boxZoom.isActive())return!0;if(e.dragRotate&&e.dragRotate.isActive())return!0;if(t.touches)return t.touches.length>1;if(t.ctrlKey)return!0;return"mousemove"===t.type?!1&t.buttons:0!==t.button},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":417,"../../util/util":431}],405:[function(t,e,r){"use strict";function n(t,e){this._map=t,this._el=t.getCanvasContainer(),this._bearingSnap=e.bearingSnap,o.bindHandlers(this)}var i=t("../../util/dom"),a=t("point-geometry"),o=t("../../util/util");e.exports=n;var s=o.bezier(0,0,.25,1);n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._enabled=!1)},_onDown:function(t){if(!this._ignoreEvent(t)&&!this.isActive()){document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=i.mousePos(this._el,t),this._center=this._map.transform.centerPoint;var e=this._startPos.sub(this._center);e.mag()<200&&(this._center=this._startPos.add(new a(-200,0)._rotate(e.angle()))),t.preventDefault()}},_onMove:function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._fireEvent("rotatestart",t),this._fireEvent("movestart",t));var e=this._map;e.stop();var r=this._pos,n=i.mousePos(this._el,t),a=this._center,o=r.sub(a).angleWith(n.sub(a))/Math.PI*180,s=e.getBearing()-o,l=this._inertia,u=l[l.length-1];this._drainInertiaBuffer(),l.push([Date.now(),e._normalizeBearing(s,u[1])]),e.transform.bearing=s,this._fireEvent("rotate",t),this._fireEvent("move",t),this._pos=n}},_onUp:function(t){if(!this._ignoreEvent(t)&&(document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onUp),this.isActive())){this._active=!1,this._fireEvent("rotateend",t),this._drainInertiaBuffer();var e=this._map,r=e.getBearing(),n=this._inertia,i=function(){Math.abs(r)180&&(d=180);var p=d/180;u+=h*d*(p/2),Math.abs(e._normalizeBearing(u,0))1;var r=t.ctrlKey?1:2,n=t.ctrlKey?0:2;return"mousemove"===t.type?t.buttons&0===r:t.button!==n},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":417,"../../util/util":431,"point-geometry":472}],406:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),this._onKeyDown=this._onKeyDown.bind(this)}e.exports=n;n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=this._map,r={originalEvent:t};if(!e.isEasing())switch(t.keyCode){case 61:case 107:case 171:case 187:e.zoomTo(Math.round(e.getZoom())+(t.shiftKey?2:1),r);break;case 189:case 109:case 173:e.zoomTo(Math.round(e.getZoom())-(t.shiftKey?2:1),r);break;case 37:t.shiftKey?e.easeTo({bearing:e.getBearing()-2},r):(t.preventDefault(),e.panBy([-80,0],r));break;case 39:t.shiftKey?e.easeTo({bearing:e.getBearing()+2},r):(t.preventDefault(),e.panBy([80,0],r));break;case 38:t.shiftKey?e.easeTo({pitch:e.getPitch()+5},r):(t.preventDefault(),e.panBy([0,-80],r));break;case 40:t.shiftKey?e.easeTo({pitch:Math.max(e.getPitch()-5,0)},r):(t.preventDefault(),e.panBy([0,80],r))}}}}},{}],407:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),o.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/browser"),o=t("../../util/util");e.exports=n;var s="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",l=-1!==s.indexOf("firefox"),u=-1!==s.indexOf("safari")&&-1===s.indexOf("chrom");n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("wheel",this._onWheel,!1),this._el.addEventListener("mousewheel",this._onWheel,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("wheel",this._onWheel),this._el.removeEventListener("mousewheel",this._onWheel),this._enabled=!1)},_onWheel:function(t){var e;"wheel"===t.type?(e=t.deltaY,l&&t.deltaMode===window.WheelEvent.DOM_DELTA_PIXEL&&(e/=a.devicePixelRatio),t.deltaMode===window.WheelEvent.DOM_DELTA_LINE&&(e*=40)):"mousewheel"===t.type&&(e=-t.wheelDeltaY,u&&(e/=3));var r=a.now(),n=r-(this._time||0);this._pos=i.mousePos(this._el,t),this._time=r,0!==e&&e%4.000244140625==0?(this._type="wheel",e=Math.floor(e/4)):0!==e&&Math.abs(e)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=e,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(n*e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,e+=this._lastValue)),t.shiftKey&&e&&(e/=4),this._type&&this._zoom(-e,t),t.preventDefault()},_onTimeout:function(){this._type="wheel",this._zoom(-this._lastValue)},_zoom:function(t,e){if(0!==t){var r=this._map,n=2/(1+Math.exp(-Math.abs(t/100)));t<0&&0!==n&&(n=1/n);var i=r.ease?r.ease.to:r.transform.scale,a=r.transform.scaleZoom(i*n);r.zoomTo(a,{duration:0,around:r.unproject(this._pos),delayEndEvents:200},{originalEvent:e})}}}},{"../../util/browser":415,"../../util/dom":417,"../../util/util":431}],408:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),a.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/util");e.exports=n;var o=a.bezier(0,0,.15,1);n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("touchstart",this._onStart,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("touchstart",this._onStart),this._enabled=!1)},disableRotation:function(){this._rotationDisabled=!0},enableRotation:function(){this._rotationDisabled=!1},_onStart:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]);this._startVec=e.sub(r),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],document.addEventListener("touchmove",this._onMove,!1),document.addEventListener("touchend",this._onEnd,!1)}},_onMove:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]),n=e.add(r).div(2),a=e.sub(r),o=a.mag()/this._startVec.mag(),s=this._rotationDisabled?0:180*a.angleWith(this._startVec)/Math.PI,l=this._map;if(this._gestureIntent){var u={duration:0,around:l.unproject(n)};"rotate"===this._gestureIntent&&(u.bearing=this._startBearing+s),"zoom"!==this._gestureIntent&&"rotate"!==this._gestureIntent||(u.zoom=l.transform.scaleZoom(this._startScale*o)),l.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),o,n]),l.easeTo(u,{originalEvent:t})}else{var c=Math.abs(1-o)>.15;Math.abs(s)>4?this._gestureIntent="rotate":c&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._startVec=a,this._startScale=l.transform.scale,this._startBearing=l.transform.bearing)}t.preventDefault()}},_onEnd:function(t){document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,r=this._map;if(e.length<2)return void r.snapToNorth({},{originalEvent:t});var n=e[e.length-1],i=e[0],a=r.transform.scaleZoom(this._startScale*n[1]),s=r.transform.scaleZoom(this._startScale*i[1]),l=a-s,u=(n[0]-i[0])/1e3,c=n[2];if(0===u||a===s)return void r.snapToNorth({},{originalEvent:t});var h=.15*l/u;Math.abs(h)>2.5&&(h=h>0?2.5:-2.5);var f=1e3*Math.abs(h/(12*.15)),d=a+h*f/2e3;d<0&&(d=0),r.easeTo({zoom:d,duration:f,easing:o,around:r.unproject(c)},{originalEvent:t})},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>2&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":417,"../../util/util":431}],409:[function(t,e,r){"use strict";function n(){i.bindAll(["_onHashChange","_updateHash"],this)}e.exports=n;var i=t("../util/util");n.prototype={addTo:function(t){return this._map=t,window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},remove:function(){return window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),delete this._map,this},_onHashChange:function(){var t=location.hash.replace("#","").split("/");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0)}),!0)},_updateHash:function(){var t=this._map.getCenter(),e=this._map.getZoom(),r=this._map.getBearing(),n=Math.max(0,Math.ceil(Math.log(e)/Math.LN2)),i="#"+Math.round(100*e)/100+"/"+t.lat.toFixed(n)+"/"+t.lng.toFixed(n)+(r?"/"+Math.round(10*r)/10:"");window.history.replaceState("","",i)}}},{"../util/util":431}],410:[function(t,e,r){"use strict";function n(t){t.parentNode&&t.parentNode.removeChild(t)}var i=t("../util/canvas"),a=t("../util/util"),o=t("../util/browser"),s=t("../util/browser").window,l=t("../util/evented"),u=t("../util/dom"),c=t("../style/style"),h=t("../style/animation_loop"),f=t("../render/painter"),d=t("../geo/transform"),p=t("./hash"),m=t("./bind_handlers"),g=t("./camera"),v=t("../geo/lng_lat"),y=t("../geo/lng_lat_bounds"),b=t("point-geometry"),x=t("./control/attribution"),_={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:20,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,workerCount:Math.max(o.hardwareConcurrency-1,1)},w=e.exports=function(t){if(t=a.extend({},_,t),t.workerCount<1)throw new Error("workerCount must an integer greater than or equal to 1.");this._interactive=t.interactive,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._trackResize=t.trackResize,this._workerCount=t.workerCount,this._bearingSnap=t.bearingSnap,"string"==typeof t.container?this._container=document.getElementById(t.container):this._container=t.container,this.animationLoop=new h,this.transform=new d(t.minZoom,t.maxZoom),t.maxBounds&&this.setMaxBounds(t.maxBounds),a.bindAll(["_forwardStyleEvent","_forwardSourceEvent","_forwardLayerEvent","_forwardTileEvent","_onStyleLoad","_onStyleChange","_onSourceAdd","_onSourceRemove","_onSourceUpdate","_onWindowOnline","_onWindowResize","_update","_render"],this),this._setupContainer(),this._setupPainter(),this.on("move",this._update.bind(this,!1)),this.on("zoom",this._update.bind(this,!0)),this.on("moveend",function(){this.animationLoop.set(300),this._rerender()}.bind(this)),void 0!==s&&(s.addEventListener("online",this._onWindowOnline,!1),s.addEventListener("resize",this._onWindowResize,!1)),m(this,t),this._hash=t.hash&&(new p).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),this.stacks={},this._classes=[],this.resize(),t.classes&&this.setClasses(t.classes),t.style&&this.setStyle(t.style),t.attributionControl&&this.addControl(new x(t.attributionControl));var e=this.fire.bind(this,"error");this.on("style.error",e),this.on("source.error",e),this.on("tile.error",e),this.on("layer.error",e)};a.extend(w.prototype,l),a.extend(w.prototype,g.prototype),a.extend(w.prototype,{addControl:function(t){return t.addTo(this),this},addClass:function(t,e){return this._classes.indexOf(t)>=0||""===t?this:(this._classes.push(t),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},removeClass:function(t,e){var r=this._classes.indexOf(t);return r<0||""===t?this:(this._classes.splice(r,1),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},setClasses:function(t,e){for(var r={},n=0;n=0},getClasses:function(){return this._classes},resize:function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),this._canvas.resize(t,e),this.transform.resize(t,e),this.painter.resize(t,e), +this.fire("movestart").fire("move").fire("resize").fire("moveend")},getBounds:function(){var t=new y(this.transform.pointLocation(new b(0,0)),this.transform.pointLocation(this.transform.size));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new b(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new b(0,this.transform.size.y)))),t},setMaxBounds:function(t){if(t){var e=y.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=[],this.transform.latRange=[],this._update());return this},setMinZoom:function(t){if((t=null===t||void 0===t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom&&t<=20)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be between the current minZoom and 20, inclusive")},project:function(t){return this.transform.locationPoint(v.convert(t))},unproject:function(t){return this.transform.pointLocation(b.convert(t))},queryRenderedFeatures:function(){var t,e={};return 2===arguments.length?(t=arguments[0],e=arguments[1]):1===arguments.length&&function(t){return t instanceof b||Array.isArray(t)}(arguments[0])?t=arguments[0]:1===arguments.length&&(e=arguments[0]),this.style.queryRenderedFeatures(this._makeQueryGeometry(t),e,this.transform.zoom,this.transform.angle)},_makeQueryGeometry:function(t){void 0===t&&(t=[b.convert([0,0]),b.convert([this.transform.width,this.transform.height])]);var e;if(t instanceof b||"number"==typeof t[0])e=[b.convert(t)];else{var r=[b.convert(t[0]),b.convert(t[1])];e=[r[0],new b(r[1].x,r[0].y),r[1],new b(r[0].x,r[1].y),r[0]]}return e=e.map(function(t){return this.transform.pointCoordinate(t)}.bind(this))},querySourceFeatures:function(t,e){return this.style.querySourceFeatures(t,e)},setStyle:function(t){return this.style&&(this.style.off("load",this._onStyleLoad).off("error",this._forwardStyleEvent).off("change",this._onStyleChange).off("source.add",this._onSourceAdd).off("source.remove",this._onSourceRemove).off("source.load",this._onSourceUpdate).off("source.error",this._forwardSourceEvent).off("source.change",this._onSourceUpdate).off("layer.add",this._forwardLayerEvent).off("layer.remove",this._forwardLayerEvent).off("layer.error",this._forwardLayerEvent).off("tile.add",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.load",this._update).off("tile.error",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent)._remove(),this.off("rotate",this.style._redoPlacement),this.off("pitch",this.style._redoPlacement)),t?(this.style=t instanceof c?t:new c(t,this.animationLoop,this._workerCount),this.style.on("load",this._onStyleLoad).on("error",this._forwardStyleEvent).on("change",this._onStyleChange).on("source.add",this._onSourceAdd).on("source.remove",this._onSourceRemove).on("source.load",this._onSourceUpdate).on("source.error",this._forwardSourceEvent).on("source.change",this._onSourceUpdate).on("layer.add",this._forwardLayerEvent).on("layer.remove",this._forwardLayerEvent).on("layer.error",this._forwardLayerEvent).on("tile.add",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.load",this._update).on("tile.error",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this.on("rotate",this.style._redoPlacement),this.on("pitch",this.style._redoPlacement),this):(this.style=null,this)},getStyle:function(){if(this.style)return this.style.serialize()},addSource:function(t,e){return this.style.addSource(t,e),this._update(!0),this},addSourceType:function(t,e,r){return this.style.addSourceType(t,e,r)},removeSource:function(t){return this.style.removeSource(t),this._update(!0),this},getSource:function(t){return this.style.getSource(t)},addLayer:function(t,e){return this.style.addLayer(t,e),this._update(!0),this},removeLayer:function(t){return this.style.removeLayer(t),this._update(!0),this},getLayer:function(t){return this.style.getLayer(t)},setFilter:function(t,e){return this.style.setFilter(t,e),this._update(!0),this},setLayerZoomRange:function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},getFilter:function(t){return this.style.getFilter(t)},setPaintProperty:function(t,e,r,n){return this.style.setPaintProperty(t,e,r,n),this._update(!0),this},getPaintProperty:function(t,e,r){return this.style.getPaintProperty(t,e,r)},setLayoutProperty:function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},getLayoutProperty:function(t,e){return this.style.getLayoutProperty(t,e)},getContainer:function(){return this._container},getCanvasContainer:function(){return this._canvasContainer},getCanvas:function(){return this._canvas.getElement()},_setupContainer:function(){var t=this._container;t.classList.add("mapboxgl-map");var e=this._canvasContainer=u.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=new i(this,e);var r=this._controlContainer=u.create("div","mapboxgl-control-container",t),n=this._controlCorners={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){n[t]=u.create("div","mapboxgl-ctrl-"+t,r)})},_setupPainter:function(){var t=this._canvas.getWebGLContext({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer});if(!t)return void this.fire("error",{error:new Error("Failed to initialize WebGL")});this.painter=new f(t,this.transform)},_contextLost:function(t){t.preventDefault(),this._frameId&&o.cancelFrame(this._frameId),this.fire("webglcontextlost",{originalEvent:t})},_contextRestored:function(t){this._setupPainter(),this.resize(),this._update(),this.fire("webglcontextrestored",{originalEvent:t})},loaded:function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},_update:function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},_render:function(){try{this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(this._classes,this._classOptions),this._classOptions=null,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.painter.render(this.style,{debug:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,vertices:this.vertices,rotating:this.rotating,zooming:this.zooming}),this.fire("render"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire("load")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty)&&this._rerender()}catch(t){this.fire("error",{error:t})}return this},remove:function(){this._hash&&this._hash.remove(),o.cancelFrame(this._frameId),this.setStyle(null),void 0!==s&&s.removeEventListener("resize",this._onWindowResize,!1);var t=this.painter.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),n(this._canvasContainer),n(this._controlContainer),this._container.classList.remove("mapboxgl-map")},_rerender:function(){this.style&&!this._frameId&&(this._frameId=o.frame(this._render))},_forwardStyleEvent:function(t){this.fire("style."+t.type,a.extend({style:t.target},t))},_forwardSourceEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_forwardLayerEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_forwardTileEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_onStyleLoad:function(t){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update(this._classes,{transition:!1}),this._forwardStyleEvent(t)},_onStyleChange:function(t){this._update(!0),this._forwardStyleEvent(t)},_onSourceAdd:function(t){var e=t.source;e.onAdd&&e.onAdd(this),this._forwardSourceEvent(t)},_onSourceRemove:function(t){var e=t.source;e.onRemove&&e.onRemove(this),this._forwardSourceEvent(t)},_onSourceUpdate:function(t){this._update(),this._forwardSourceEvent(t)},_onWindowOnline:function(){this._update()},_onWindowResize:function(){this._trackResize&&this.stop().resize()._update()}}),a.extendAll(w.prototype,{_showTileBoundaries:!1,get showTileBoundaries(){return this._showTileBoundaries},set showTileBoundaries(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},_showCollisionBoxes:!1,get showCollisionBoxes(){return this._showCollisionBoxes},set showCollisionBoxes(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,this.style._redoPlacement())},_showOverdrawInspector:!1,get showOverdrawInspector(){return this._showOverdrawInspector},set showOverdrawInspector(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},_repaint:!1,get repaint(){return this._repaint},set repaint(t){this._repaint=t,this._update()},_vertices:!1,get vertices(){return this._vertices},set vertices(t){this._vertices=t,this._update()}})},{"../geo/lng_lat":328,"../geo/lng_lat_bounds":329,"../geo/transform":330,"../render/painter":344,"../style/animation_loop":364,"../style/style":367,"../util/browser":415,"../util/canvas":416,"../util/dom":417,"../util/evented":423,"../util/util":431,"./bind_handlers":396,"./camera":397,"./control/attribution":398,"./hash":409,"point-geometry":472}],411:[function(t,e,r){"use strict";function n(t,e){t||(t=i.create("div")),t.classList.add("mapboxgl-marker"),this._el=t,this._offset=o.convert(e&&e.offset||[0,0]),this._update=this._update.bind(this)}e.exports=n;var i=t("../util/dom"),a=t("../geo/lng_lat"),o=t("point-geometry");n.prototype={addTo:function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._el),t.on("move",this._update),this._update(),this},remove:function(){this._map&&(this._map.off("move",this._update),this._map=null);var t=this._el.parentNode;return t&&t.removeChild(this._el),this},getLngLat:function(){return this._lngLat},setLngLat:function(t){return this._lngLat=a.convert(t),this._update(),this},getElement:function(){return this._el},_update:function(){if(this._map){var t=this._map.project(this._lngLat)._add(this._offset);i.setTransform(this._el,"translate("+t.x+"px,"+t.y+"px)")}}}},{"../geo/lng_lat":328,"../util/dom":417,"point-geometry":472}],412:[function(t,e,r){"use strict";function n(t){i.setOptions(this,t),i.bindAll(["_update","_onClickClose"],this)}e.exports=n;var i=t("../util/util"),a=t("../util/evented"),o=t("../util/dom"),s=t("../geo/lng_lat");n.prototype=i.inherit(a,{options:{closeButton:!0,closeOnClick:!0},addTo:function(t){return this._map=t,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this},remove:function(){return this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._container&&(this._container.parentNode.removeChild(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire("close"),this},getLngLat:function(){return this._lngLat},setLngLat:function(t){return this._lngLat=s.convert(t),this._update(),this},setText:function(t){return this.setDOMContent(document.createTextNode(t))},setHTML:function(t){var e,r=document.createDocumentFragment(),n=document.createElement("body");for(n.innerHTML=t;;){if(!(e=n.firstChild))break;r.appendChild(e)}return this.setDOMContent(r)},setDOMContent:function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},_createContent:function(){this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._content=o.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=o.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClickClose))},_update:function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content));var t=this._map.project(this._lngLat).round(),e=this.options.anchor;if(!e){var r=this._container.offsetWidth,n=this._container.offsetHeight;e=t.ythis._map.transform.height-n?["bottom"]:[],t.xthis._map.transform.width-r/2&&e.push("right"),e=0===e.length?"bottom":e.join("-")}var i={top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"},a=this._container.classList;for(var s in i)a.remove("mapboxgl-popup-anchor-"+s);a.add("mapboxgl-popup-anchor-"+e),o.setTransform(this._container,i[e]+" translate("+t.x+"px,"+t.y+"px)")}},_onClickClose:function(){this.remove()}})},{"../geo/lng_lat":328,"../util/dom":417,"../util/evented":423,"../util/util":431}],413:[function(t,e,r){"use strict";function n(t,e){this.target=t,this.parent=e,this.callbacks={},this.callbackID=0,this.receive=this.receive.bind(this),this.target.addEventListener("message",this.receive,!1)}e.exports=n,n.prototype.receive=function(t){function e(t,e,r){this.postMessage({type:"",id:String(i),error:t?String(t):null,data:e},r)}var r,n=t.data,i=n.id;if(""===n.type)r=this.callbacks[n.id],delete this.callbacks[n.id],r&&r(n.error||null,n.data);else if(void 0!==n.id&&this.parent[n.type])this.parent[n.type](n.data,e.bind(this));else if(void 0!==n.id&&this.parent.workerSources){var a=n.type.split(".");this.parent.workerSources[a[0]][a[1]](n.data,e.bind(this))}else this.parent[n.type](n.data)},n.prototype.send=function(t,e,r,n){var i=null;r&&(this.callbacks[i=this.callbackID++]=r),this.postMessage({type:t,id:String(i),data:e},n)},n.prototype.postMessage=function(t,e){this.target.postMessage(t,e)}},{}],414:[function(t,e,r){"use strict";function n(t){var e=document.createElement("a");return e.href=t,e.protocol===document.location.protocol&&e.host===document.location.host}r.getJSON=function(t,e){var r=new XMLHttpRequest;return r.open("GET",t,!0),r.setRequestHeader("Accept","application/json"),r.onerror=function(t){e(t)},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var t;try{t=JSON.parse(r.response)}catch(t){return e(t)}e(null,t)}else e(new Error(r.statusText))},r.send(),r},r.getArrayBuffer=function(t,e){var r=new XMLHttpRequest;return r.open("GET",t,!0),r.responseType="arraybuffer",r.onerror=function(t){e(t)},r.onload=function(){r.status>=200&&r.status<300&&r.response?e(null,r.response):e(new Error(r.statusText))},r.send(),r},r.getImage=function(t,e){return r.getArrayBuffer(t,function(t,r){if(t)return e(t);var n=new Image;n.onload=function(){e(null,n),(window.URL||window.webkitURL).revokeObjectURL(n.src)};var i=new Blob([new Uint8Array(r)],{type:"image/png"});return n.src=(window.URL||window.webkitURL).createObjectURL(i),n.getData=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return t.width=n.width,t.height=n.height,e.drawImage(n,0,0),e.getImageData(0,0,n.width,n.height).data},n})},r.getVideo=function(t,e){var r=document.createElement("video");r.onloadstart=function(){e(null,r)};for(var i=0;i=s+n?t.call(i,1):(t.call(i,(l-s)/n),r.frame(a)))}if(!n)return t.call(i,1),null;var o=!1,s=e.exports.now();return r.frame(a),function(){o=!0}},r.supported=t("mapbox-gl-supported"),r.hardwareConcurrency=navigator.hardwareConcurrency||4,Object.defineProperty(r,"devicePixelRatio",{get:function(){return window.devicePixelRatio}}),r.supportsWebp=!1;var a=document.createElement("img");a.onload=function(){r.supportsWebp=!0},a.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=",r.supportsGeolocation=!!navigator.geolocation},{"mapbox-gl-supported":316}],416:[function(t,e,r){"use strict";function n(t,e){this.canvas=document.createElement("canvas"),t&&e&&(this.canvas.style.position="absolute",this.canvas.classList.add("mapboxgl-canvas"),this.canvas.addEventListener("webglcontextlost",t._contextLost.bind(t),!1),this.canvas.addEventListener("webglcontextrestored",t._contextRestored.bind(t),!1),this.canvas.setAttribute("tabindex",0),e.appendChild(this.canvas))}var i=t("../util"),a=t("mapbox-gl-supported");e.exports=n,n.prototype.resize=function(t,e){var r=window.devicePixelRatio||1;this.canvas.width=r*t,this.canvas.height=r*e,this.canvas.style.width=t+"px",this.canvas.style.height=e+"px"},n.prototype.getWebGLContext=function(t){return t=i.extend({},t,a.webGLContextAttributes),this.canvas.getContext("webgl",t)||this.canvas.getContext("experimental-webgl",t)},n.prototype.getElement=function(){return this.canvas}},{"../util":431,"mapbox-gl-supported":316}],417:[function(t,e,r){"use strict";function n(t){for(var e=0;e1)for(var h=0;h=0&&this._events[t].splice(r,1),this._events[t].length||delete this._events[t]}else delete this._events[t];return this},once:function(t,e){var r=function(n){this.off(t,r),e.call(this,n)}.bind(this);return this.on(t,r),this},fire:function(t,e){if(!this.listens(t))return n.endsWith(t,"error")&&console.error(e&&e.error||e||"Empty error event"),this;e=n.extend({},e),n.extend(e,{type:t,target:this});for(var r=this._events[t].slice(),i=0;i=3)for(var l=0;l1){if(s(t,e))return!0;for(var n=0;n(e.y-t.y)*(r.x-t.x)}function u(t,e,r,n){return l(t,r,n)!==l(e,r,n)&&l(t,e,r)!==l(t,e,n)}function c(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function f(t,e){for(var r,n,i,a=!1,o=0;oe.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a)}return a}function d(t,e){for(var r=!1,n=0,i=t.length-1;ne.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}e.exports={multiPolygonIntersectsBufferedMultiPoint:n,multiPolygonIntersectsMultiPolygon:i,multiPolygonIntersectsBufferedMultiLine:a}},{}],427:[function(t,e,r){"use strict";function n(t,e){this.max=t,this.onRemove=e,this.reset()}e.exports=n,n.prototype.reset=function(){for(var t in this.data)this.onRemove(this.data[t]);return this.data={},this.order=[],this},n.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.get(this.order[0]);r&&this.onRemove(r)}return this},n.prototype.has=function(t){return t in this.data},n.prototype.keys=function(){return this.order},n.prototype.get=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},n.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this.get(this.order[0]);e&&this.onRemove(e)}return this}},{}],428:[function(t,e,r){"use strict";function n(t,e,r){if(!(r=r||o.ACCESS_TOKEN)&&o.REQUIRE_ACCESS_TOKEN)throw new Error("An API access token is required to use Mapbox GL. See https://www.mapbox.com/developers/api/#access-tokens");if(t=t.replace(/^mapbox:\/\//,o.API_URL+e),t+=-1!==t.indexOf("?")?"&access_token=":"?access_token=",o.REQUIRE_ACCESS_TOKEN){if("s"===r[0])throw new Error("Use a public access token (pk.*) with Mapbox GL JS, not a secret access token (sk.*). See https://www.mapbox.com/developers/api/#access-tokens");t+=r}return t}function i(t){return t?"?"+t:""}function a(t){return t.access_token&&"tk."===t.access_token.slice(0,3)?u.extend({},t,{access_token:o.ACCESS_TOKEN}):t}var o=t("./config"),s=t("./browser"),l=t("url"),u=t("./util");e.exports.normalizeStyleURL=function(t,e){var r=l.parse(t);return"mapbox:"!==r.protocol?t:n("mapbox:/"+r.pathname+i(r.query),"/styles/v1/",e)},e.exports.normalizeSourceURL=function(t,e){return"mapbox:"!==l.parse(t).protocol?t:n(t+".json","/v4/",e)+"&secure"},e.exports.normalizeGlyphsURL=function(t,e){var r=l.parse(t);return"mapbox:"!==r.protocol?t:n("mapbox://"+r.pathname.split("/")[1]+"/{fontstack}/{range}.pbf"+i(r.query),"/fonts/v1/",e)},e.exports.normalizeSpriteURL=function(t,e,r,a){var o=l.parse(t);return"mapbox:"!==o.protocol?(o.pathname+=e+r,l.format(o)):n("mapbox:/"+o.pathname+"/sprite"+e+r+i(o.query),"/styles/v1/",a)},e.exports.normalizeTileURL=function(t,e,r){var n=l.parse(t,!0);if(!e)return t;if("mapbox:"!==l.parse(e).protocol)return t;var i=s.supportsWebp?".webp":"$1",o=s.devicePixelRatio>=2||512===r?"@2x":"";return l.format({protocol:n.protocol,hostname:n.hostname,pathname:n.pathname.replace(/(\.(?:png|jpg)\d*)/,o+i),query:a(n.query)})}},{"./browser":415,"./config":420,"./util":431,url:532}],429:[function(t,e,r){"use strict";function n(t){function e(){f.apply(this,arguments)}function r(){d.apply(this,arguments),this.members=e.prototype.members}var n=JSON.stringify(t);if(g[n])return g[n];void 0===t.alignment&&(t.alignment=1),e.prototype=Object.create(f.prototype);var s=0,u=0,v=["Uint8"];return e.prototype.members=t.members.map(function(r){r={name:r.name,type:r.type,components:r.components||1},p(r.name.length),p(r.type in m),v.indexOf(r.type)<0&&v.push(r.type);var n=o(r.type);u=Math.max(u,n),r.offset=s=a(s,Math.max(t.alignment,n));for(var i=0;ithis.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*this.RESIZE_MULTIPLIER),this.DEFAULT_CAPACITY),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},d.prototype._refreshViews=function(){for(var t=0;t=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)},r.bezier=function(t,e,r,i){var a=new n(t,e,r,i);return function(t){return a.solve(t)}},r.ease=r.bezier(.25,.1,.25,1),r.clamp=function(t,e,r){return Math.min(r,Math.max(e,t))},r.wrap=function(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i},r.coalesce=function(){for(var t=0;t=0)return!0;return!1};var o={};r.warnOnce=function(t){o[t]||("undefined"!=typeof console&&console.warn(t),o[t]=!0)}},{"../geo/coordinate":327,unitbezier:531}],432:[function(t,e,r){"use strict";function n(t,e,r,n){this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&&(this.id=t.id)}e.exports=n,n.prototype={type:"Feature",get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},set geometry(t){this._geometry=t},toJSON:function(){var t={};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&"toJSON"!==e&&(t[e]=this[e]);return t}}},{}],433:[function(t,e,r){e.exports={_args:[[{raw:"mapbox-gl@^0.22.0",scope:null,escapedName:"mapbox-gl",name:"mapbox-gl",rawSpec:"^0.22.0",spec:">=0.22.0 <0.23.0",type:"range"},"/Users/robert/repos/plotly/plotly.js"]],_from:"mapbox-gl@>=0.22.0 <0.23.0",_id:"mapbox-gl@0.22.1",_inCache:!0,_location:"/mapbox-gl",_nodeVersion:"4.4.5",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/mapbox-gl-0.22.1.tgz_1471549891670_0.8762630566488951"},_npmUser:{name:"lucaswoj",email:"lucas@lucaswoj.com"},_npmVersion:"2.15.5",_phantomChildren:{},_requested:{raw:"mapbox-gl@^0.22.0",scope:null,escapedName:"mapbox-gl",name:"mapbox-gl",rawSpec:"^0.22.0",spec:">=0.22.0 <0.23.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz",_shasum:"92a965547d4c2f24c22cbc487eeda48694cb627a",_shrinkwrap:null,_spec:"mapbox-gl@^0.22.0",_where:"/Users/robert/repos/plotly/plotly.js",browser:{"./js/util/ajax.js":"./js/util/browser/ajax.js","./js/util/browser.js":"./js/util/browser/browser.js","./js/util/canvas.js":"./js/util/browser/canvas.js","./js/util/dom.js":"./js/util/browser/dom.js","./js/util/web_worker.js":"./js/util/browser/web_worker.js"},bugs:{url:"https://github.com/mapbox/mapbox-gl-js/issues"},dependencies:{csscolorparser:"^1.0.2",earcut:"^2.0.3","feature-filter":"^2.2.0","geojson-rewind":"^0.1.0","geojson-vt":"^2.4.0","gl-matrix":"^2.3.1","grid-index":"^1.0.0","mapbox-gl-function":"^1.2.1","mapbox-gl-shaders":"github:mapbox/mapbox-gl-shaders#de2ab007455aa2587c552694c68583f94c9f2747","mapbox-gl-style-spec":"github:mapbox/mapbox-gl-style-spec#83b1a3e5837d785af582efd5ed1a212f2df6a4ae","mapbox-gl-supported":"^1.2.0",pbf:"^1.3.2",pngjs:"^2.2.0","point-geometry":"^0.0.0",quickselect:"^1.0.0",request:"^2.39.0","resolve-url":"^0.2.1","shelf-pack":"^1.0.0",supercluster:"^2.0.1",unassertify:"^2.0.0",unitbezier:"^0.0.0","vector-tile":"^1.3.0","vt-pbf":"^2.0.2",webworkify:"^1.3.0","whoots-js":"^2.0.0"},description:"A WebGL interactive maps library",devDependencies:{"babel-preset-react":"^6.11.1",babelify:"^7.3.0",benchmark:"~2.1.0",browserify:"^13.0.0",clipboard:"^1.5.12","concat-stream":"1.5.1",coveralls:"^2.11.8",doctrine:"^1.2.1",documentation:"https://github.com/documentationjs/documentation/archive/bb41619c734e59ef3fbc3648610032efcfdaaace.tar.gz","documentation-theme-utils":"3.0.0",envify:"^3.4.0",eslint:"^2.5.3","eslint-config-mourner":"^2.0.0","eslint-plugin-html":"^1.5.1",gl:"^4.0.1",handlebars:"4.0.5","highlight.js":"9.3.0",istanbul:"^0.4.2","json-loader":"^0.5.4",lodash:"^4.13.1","mapbox-gl-test-suite":"github:mapbox/mapbox-gl-test-suite#7babab52fb02788ebbc38384139bf350e8e38552","memory-fs":"^0.3.0",minifyify:"^7.0.1","npm-run-all":"^3.0.0",nyc:"6.4.0",proxyquire:"^1.7.9",remark:"4.2.2","remark-html":"3.0.0",sinon:"^1.15.4",st:"^1.2.0",tap:"^5.7.0","transform-loader":"^0.2.3","unist-util-visit":"1.1.0",vinyl:"1.1.1","vinyl-fs":"2.4.3",watchify:"^3.7.0",webpack:"^1.13.1","webworkify-webpack":"^1.1.3"},directories:{},dist:{shasum:"92a965547d4c2f24c22cbc487eeda48694cb627a",tarball:"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz"},engines:{node:">=4.0.0"},gitHead:"13a9015341f0602ccb55c98c53079838ad4b70b5",homepage:"https://github.com/mapbox/mapbox-gl-js#readme",license:"BSD-3-Clause",main:"js/mapbox-gl.js",maintainers:[{name:"aaronlidman",email:"aaronlidman@gmail.com"},{name:"ajashton",email:"aj.ashton@gmail.com"},{name:"ansis",email:"ansis.brammanis@gmail.com"},{name:"bergwerkgis",email:"wb@bergwerk-gis.at"},{name:"bhousel",email:"bryan@mapbox.com"},{name:"bsudekum",email:"bobby@mapbox.com"},{name:"camilleanne",email:"camille@mapbox.com"},{name:"dnomadb",email:"damon@mapbox.com"},{name:"dthompson",email:"dthompson@gmail.com"},{name:"emilymcafee",email:"emily@mapbox.com"},{name:"flippmoke",email:"flippmoke@gmail.com"},{name:"freenerd",email:"spam@freenerd.de"},{name:"gretacb",email:"carol@mapbox.com"},{name:"ian29",email:"ian.villeda@gmail.com"},{name:"ianshward",email:"ian@mapbox.com"},{name:"ingalls",email:"nicholas.ingalls@gmail.com"},{name:"jfirebaugh",email:"john.firebaugh@gmail.com"},{name:"jrpruit1",email:"jake@jakepruitt.com"},{name:"karenzshea",email:"karen@mapbox.com"},{name:"kkaefer",email:"kkaefer@gmail.com"},{name:"lbud",email:"lauren@mapbox.com"},{name:"lucaswoj",email:"lucas@lucaswoj.com"},{name:"lxbarth",email:"alex@mapbox.com"},{name:"lyzidiamond",email:"lyzi@mapbox.com"},{name:"mapbox-admin",email:"accounts@mapbox.com"},{name:"mateov",email:"matt@mapbox.com"},{name:"mcwhittemore",email:"mcwhittemore@gmail.com"},{name:"miccolis",email:"jeff@miccolis.net"},{name:"mikemorris",email:"michael.patrick.morris@gmail.com"},{name:"morganherlocker",email:"morgan.herlocker@gmail.com"},{name:"mourner",email:"agafonkin@gmail.com"},{name:"nickidlugash",email:"nicki@mapbox.com"},{name:"rclark",email:"ryan.clark.j@gmail.com"},{name:"samanbb",email:"saman@mapbox.com"},{name:"sbma44",email:"tlee@mapbox.com"},{name:"scothis",email:"scothis@gmail.com"},{name:"sgillies",email:"sean@mapbox.com"},{name:"springmeyer",email:"dane@mapbox.com"},{name:"themarex",email:"patrick@mapbox.com"},{name:"tmcw",email:"tom@macwright.org"},{name:"tristen",email:"tristen.brown@gmail.com"},{name:"willwhite",email:"will@mapbox.com"},{name:"yhahn",email:"young@mapbox.com"}],name:"mapbox-gl",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/mapbox/mapbox-gl-js.git"},scripts:{build:"npm run build-docs # invoked by publisher when publishing docs on the mb-pages branch","build-dev":"browserify js/mapbox-gl.js --debug --standalone mapboxgl > dist/mapbox-gl-dev.js && tap --no-coverage test/build/dev.test.js","build-docs":"documentation build --github --format html -c documentation.yml --theme ./docs/_theme --output docs/api/","build-min":"browserify js/mapbox-gl.js --debug -t unassertify --plugin [minifyify --map mapbox-gl.js.map --output dist/mapbox-gl.js.map] --standalone mapboxgl > dist/mapbox-gl.js && tap --no-coverage test/build/min.test.js","build-token":"browserify debug/access-token-src.js --debug -t envify > debug/access-token.js",lint:"eslint --ignore-path .gitignore js test bench docs/_posts/examples/*.html","open-changed-examples":"git diff --name-only mb-pages HEAD -- docs/_posts/examples/*.html | awk '{print \"http://127.0.0.1:4000/mapbox-gl-js/example/\" substr($0,33,length($0)-37)}' | xargs open",start:"run-p build-token watch-dev watch-bench start-server","start-bench":"run-p build-token watch-bench start-server","start-debug":"run-p build-token watch-dev start-server","start-docs":"npm run build-min && npm run build-docs && jekyll serve -w","start-server":"st --no-cache --localhost --port 9966 --index index.html .",test:"npm run lint && tap --reporter dot test/js/*/*.js test/build/webpack.test.js","test-suite":"node test/render.test.js && node test/query.test.js","watch-bench":"node bench/download-data.js && watchify bench/index.js --plugin [minifyify --no-map] -t [babelify --presets react] -t unassertify -t envify -o bench/bench.js -v","watch-dev":"watchify js/mapbox-gl.js --debug --standalone mapboxgl -o dist/mapbox-gl-dev.js -v"},version:"0.22.1"}},{}],434:[function(t,e,r){"use strict";function n(t,e,r){for(var n=new Array(t),i=0;ig[1][2]&&(b[0]=-b[0]),g[0][2]>g[2][0]&&(b[1]=-b[1]),g[1][0]>g[0][1]&&(b[2]=-b[2]),!0}},{"./normalize":436,"gl-mat4/clone":166,"gl-mat4/create":167,"gl-mat4/determinant":168,"gl-mat4/invert":172,"gl-mat4/transpose":182,"gl-vec3/cross":263,"gl-vec3/dot":264,"gl-vec3/length":265,"gl-vec3/normalize":267}],436:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],437:[function(t,e,r){function n(t,e,r,n){if(0===c(e)||0===c(r))return!1;var i=u(e,f.translate,f.scale,f.skew,f.perspective,f.quaternion),a=u(r,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!(!i||!a)&&(s(p.translate,f.translate,d.translate,n),s(p.skew,f.skew,d.skew,n),s(p.scale,f.scale,d.scale,n),s(p.perspective,f.perspective,d.perspective,n),h(p.quaternion,f.quaternion,d.quaternion,n),l(t,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function i(){return{translate:a(),scale:a(1),skew:a(),perspective:o(),quaternion:o()}}function a(t){return[t||0,t||0,t||0]}function o(){return[0,0,0,1]}var s=t("gl-vec3/lerp"),l=t("mat4-recompose"),u=t("mat4-decompose"),c=t("gl-mat4/determinant"),h=t("quat-slerp"),f=i(),d=i(),p=i();e.exports=n},{"gl-mat4/determinant":168,"gl-vec3/lerp":266,"mat4-decompose":435,"mat4-recompose":438,"quat-slerp":477}],438:[function(t,e,r){var n={identity:t("gl-mat4/identity"),translate:t("gl-mat4/translate"),multiply:t("gl-mat4/multiply"),create:t("gl-mat4/create"),scale:t("gl-mat4/scale"),fromRotationTranslation:t("gl-mat4/fromRotationTranslation")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{"gl-mat4/create":167,"gl-mat4/fromRotationTranslation":170,"gl-mat4/identity":171,"gl-mat4/multiply":174,"gl-mat4/scale":180,"gl-mat4/translate":181}],439:[function(t,e,r){"use strict";function n(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}function i(t){return t=t||{},new n(t.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}var a=t("binary-search-bounds"),o=t("mat4-interpolate"),s=t("gl-mat4/invert"),l=t("gl-mat4/rotateX"),u=t("gl-mat4/rotateY"),c=t("gl-mat4/rotateZ"),h=t("gl-mat4/lookAt"),f=t("gl-mat4/translate"),d=(t("gl-mat4/scale"),t("gl-vec3/normalize")),p=[0,0,0];e.exports=i;var m=n.prototype;m.recalcMatrix=function(t){var e=this._time,r=a.le(e,t),n=this.computedMatrix;if(!(r<0)){var i=this._components;if(r===e.length-1)for(var l=16*r,u=0;u<16;++u)n[u]=i[l++];else{for(var c=e[r+1]-e[r],l=16*r,h=this.prevMatrix,f=!0,u=0;u<16;++u)h[u]=i[l++];for(var p=this.nextMatrix,u=0;u<16;++u)p[u]=i[l++],f=f&&h[u]===p[u];if(c<1e-6||f)for(var u=0;u<16;++u)n[u]=h[u];else o(n,h,p,(t-e[r])/c)}var m=this.computedUp;m[0]=n[1],m[1]=n[5],m[2]=n[9],d(m,m);var g=this.computedInverse;s(g,n);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;for(var b=this.computedCenter,x=Math.exp(this.computedRadius[0]),u=0;u<3;++u)b[u]=v[u]-n[2+4*u]*x}},m.idle=function(t){if(!(t1&&i(t[o[c-2]],t[o[c-1]],u)<=0;)c-=1,o.pop();for(o.push(l),c=s.length;c>1&&i(t[s[c-2]],t[s[c-1]],u)>=0;)c-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),h=0,n=0,f=o.length;n0;--d)r[h++]=s[d];return r}e.exports=n;var i=t("robust-orientation")[3]},{"robust-orientation":496}],441:[function(t,e,r){"use strict";function n(t,e){function r(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==g.alt,g.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==g.shift,g.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==g.control,g.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==g.meta,g.meta=!!t.metaKey),e}function n(t,n){var a=i.x(n),o=i.y(n);"buttons"in n&&(t=0|n.buttons),(t!==d||a!==p||o!==m||r(n))&&(d=0|t,p=a||0,m=o||0,e&&e(d,p,m,g))}function a(t){n(0,t)}function o(){(d||p||m||g.shift||g.alt||g.meta||g.control)&&(p=m=0,d=0,g.shift=g.alt=g.control=g.meta=!1,e&&e(0,0,0,g))}function s(t){r(t)&&e&&e(d,p,m,g)}function l(t){0===i.buttons(t)?n(0,t):n(d,t)}function u(t){n(d|i.buttons(t),t)}function c(t){n(d&~i.buttons(t),t)}function h(){v||(v=!0,t.addEventListener("mousemove",l),t.addEventListener("mousedown",u),t.addEventListener("mouseup",c),t.addEventListener("mouseleave",a),t.addEventListener("mouseenter",a),t.addEventListener("mouseout",a),t.addEventListener("mouseover",a),t.addEventListener("blur",o),t.addEventListener("keyup",s),t.addEventListener("keydown",s),t.addEventListener("keypress",s),t!==window&&(window.addEventListener("blur",o),window.addEventListener("keyup",s),window.addEventListener("keydown",s),window.addEventListener("keypress",s)))}function f(){v&&(v=!1,t.removeEventListener("mousemove",l),t.removeEventListener("mousedown",u),t.removeEventListener("mouseup",c),t.removeEventListener("mouseleave",a),t.removeEventListener("mouseenter",a),t.removeEventListener("mouseout",a),t.removeEventListener("mouseover",a),t.removeEventListener("blur",o),t.removeEventListener("keyup",s),t.removeEventListener("keydown",s),t.removeEventListener("keypress",s),t!==window&&(window.removeEventListener("blur",o),window.removeEventListener("keyup",s),window.removeEventListener("keydown",s),window.removeEventListener("keypress",s)))}e||(e=t,t=window);var d=0,p=0,m=0,g={shift:!1,alt:!1,control:!1,meta:!1},v=!1;h();var y={element:t};return Object.defineProperties(y,{enabled:{get:function(){return v},set:function(t){t?h():f()},enumerable:!0},buttons:{get:function(){return d},enumerable:!0},x:{get:function(){return p},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return g},enumerable:!0}}),y}e.exports=n;var i=t("mouse-event")},{"mouse-event":443}],442:[function(t,e,r){function n(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var n=t.clientX||0,a=t.clientY||0,o=i(e);return r[0]=n-o.left,r[1]=a-o.top,r}function i(t){return t===window||t===document||t===document.body?a:t.getBoundingClientRect()}var a={left:0,top:0};e.exports=n},{}],443:[function(t,e,r){"use strict";function n(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){var e=t.which;if(2===e)return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<=0;--e)L(e,0);for(var r=[],e=0;e0;_=_-1&m)x.push(w+"["+T+"+"+g(_)+"]");x.push(v(0));for(var _=0;_0){",f(x[t]),"=1;"),P(t-1,e|1<0&&Y.push(s(U,x[V-1])+"*"+o(x[V-1])),N.push(d(U,x[V])+"=("+Y.join("-")+")|0")}for(var U=0;U=0;--U)G.push(o(x[U]));N.push(A+"=("+G.join("*")+")|0",M+"=mallocUint32("+A+")",w+"=mallocUint32("+A+")",T+"=0"),N.push(p(0)+"=0");for(var V=1;V<1< 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var a=t.getters||[],o=new Array(n),s=0;s=0?o[s]=!0:o[s]=!1;return b(t.vertex,t.cell,t.phase,i,r,o)}var _=t("typedarray-pool");e.exports=x;var w="V",M="P",k="N",A="Q",T="X",S="T"},{"typedarray-pool":528}],446:[function(t,e,r){"use strict";var n=t("cwise/lib/wrapper")({args:["index","array","scalar"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_1_arg1_=_inline_1_arg2_.apply(void 0,_inline_1_arg0_)}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"cwise",blockSize:64});e.exports=function(t,e){return n(t,e),t}},{"cwise/lib/wrapper":105}],447:[function(t,e,r){"use strict";function n(t){if(t in l)return l[t];for(var e=[],r=0;r=0?s.push("0"):e.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),n.push("1"),o.push("s["+l+"]-2"));var u=".lo("+n.join()+").hi("+o.join()+")";if(0===n.length&&(u=""),r>0){a.push("if(1");for(var l=0;l=0||e.indexOf(-(l+1))>=0||a.push("&&s[",l,"]>2");a.push("){grad",r,"(src.pick(",s.join(),")",u);for(var l=0;l=0||e.indexOf(-(l+1))>=0||a.push(",dst.pick(",s.join(),",",l,")",u);a.push(");")}for(var l=0;l1){dst.set(",s.join(),",",c,",0.5*(src.get(",f.join(),")-src.get(",d.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):a.push("if(s[",c,"]>1){diff(",h,",src.pick(",f.join(),")",u,",src.pick(",d.join(),")",u,");}else{zero(",h,");};");break;case"mirror":0===r?a.push("dst.set(",s.join(),",",c,",0);"):a.push("zero(",h,");");break;case"wrap":var p=s.slice(),m=s.slice();e[l]<0?(p[c]="s["+c+"]-2",m[c]="0"):(p[c]="s["+c+"]-1",m[c]="1"),0===r?a.push("if(s[",c,"]>2){dst.set(",s.join(),",",c,",0.5*(src.get(",p.join(),")-src.get(",m.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):a.push("if(s[",c,"]>2){diff(",h,",src.pick(",p.join(),")",u,",src.pick(",m.join(),")",u,");}else{zero(",h,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}r>0&&a.push("};")}(p)}}a.push("return dst;};return gradient");for(var m=["diff","zero"],g=[h,f],o=1;o<=i;++o)m.push("grad"+o),g.push(n(o));m.push(a.join(""));var v=Function.apply(void 0,m),r=v.apply(void 0,g);return l[e]=r,r}function a(t,e,r){if(Array.isArray(r)){if(r.length!==e.dimension)throw new Error("ndarray-gradient: invalid boundary conditions")}else r="string"==typeof r?o(e.dimension,r):o(e.dimension,"clamp");if(t.dimension!==e.dimension+1)throw new Error("ndarray-gradient: output dimension must be +1 input dimension");if(t.shape[e.dimension]!==e.dimension)throw new Error("ndarray-gradient: output shape must match input shape");for(var n=0;n>",rrshift:">>>"};!function(){for(var t in l){var e=l[t];r[t]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a"+e+"=b"},rvalue:!0,funcName:t+"eq"}),r[t+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a"+e+"=s"},rvalue:!0,funcName:t+"seq"})}}();var u={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in u){var e=u[t];r[t]=a({args:["array","array"],body:{args:["a","b"],body:"a="+e+"b"},funcName:t}),r[t+"eq"]=a({args:["array"],body:{args:["a"],body:"a="+e+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in c){var e=c[t];r[t]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a=a"+e+"b"},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+e+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var h=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=o({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=o({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=a({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=a({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=a({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=o({args:["array","array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":102}],451:[function(t,e,r){"use strict";var n=t("ndarray"),i=t("./doConvert.js");e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{"./doConvert.js":452,ndarray:456}],452:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":102}],453:[function(t,e,r){"use strict";function n(t){switch(t){case"uint8":return[l.mallocUint8,l.freeUint8];case"uint16":return[l.mallocUint16,l.freeUint16];case"uint32":return[l.mallocUint32,l.freeUint32];case"int8":return[l.mallocInt8,l.freeInt8];case"int16":return[l.mallocInt16,l.freeInt16];case"int32":return[l.mallocInt32,l.freeInt32];case"float32":return[l.mallocFloat,l.freeFloat];case"float64":return[l.mallocDouble,l.freeDouble];default:return null}}function i(t){for(var e=[],r=0;r1){for(var h=[],f=1;f1){o.push("dptr=0;sptr=ptr");for(var f=t.length-1;f>=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"b){break __l}"].join(""));for(var f=t.length-1;f>=1;--f)o.push("sptr+=e"+f,"dptr+=f"+f,"}");o.push("dptr=cptr;sptr=cptr-s0");for(var f=t.length-1;f>=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"scratch)){",a("cptr",r("cptr-s0")),"cptr-=s0","}",a("cptr","scratch"));if(o.push("}"),t.length>1&&u&&o.push("free(scratch)"),o.push("} return "+s),u){var p=new Function("malloc","free",o.join("\n"));return p(u[0],u[1])}var p=new Function(o.join("\n"));return p()}function o(t,e,r){function a(t){return["(offset+",t,"*s0)"].join("")}function o(t){return"generic"===e?["data.get(",t,")"].join(""):["data[",t,"]"].join("")}function s(t,r){return"generic"===e?["data.set(",t,",",r,")"].join(""):["data[",t,"]=",r].join("")}function l(e,r,n){if(1===e.length)_.push("ptr0="+a(e[0]));else for(var i=0;i=0;--i){var o=t[i];0!==o&&_.push(["for(i",o,"=0;i",o,"1)for(var i=0;i1?_.push("ptr_shift+=d"+o):_.push("ptr0+=d"+o),_.push("}"))}}function c(e,r,n,i){if(1===r.length)_.push("ptr0="+a(r[0]));else{for(var o=0;o1)for(var o=0;o=1;--o)n&&_.push("pivot_ptr+=f"+o),r.length>1?_.push("ptr_shift+=e"+o):_.push("ptr0+=e"+o),_.push("}")}function h(){t.length>1&&k&&_.push("free(pivot1)","free(pivot2)")}function f(e,r){var n="el"+e,i="el"+r;if(t.length>1){var s="__l"+ ++A;c(s,[n,i],!1,["comp=",o("ptr0"),"-",o("ptr1"),"\n","if(comp>0){tmp0=",n,";",n,"=",i,";",i,"=tmp0;break ",s,"}\n","if(comp<0){break ",s,"}"].join(""))}else _.push(["if(",o(a(n)),">",o(a(i)),"){tmp0=",n,";",n,"=",i,";",i,"=tmp0}"].join(""))}function d(e,r){t.length>1?l([e,r],!1,s("ptr0",o("ptr1"))):_.push(s(a(e),o(a(r))))}function p(e,r,n){if(t.length>1){var i="__l"+ ++A;c(i,[r],!0,[e,"=",o("ptr0"),"-pivot",n,"[pivot_ptr]\n","if(",e,"!==0){break ",i,"}"].join(""))}else _.push([e,"=",o(a(r)),"-pivot",n].join(""))}function m(e,r){t.length>1?l([e,r],!1,["tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1","tmp")].join("")):_.push(["ptr0=",a(e),"\n","ptr1=",a(r),"\n","tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1","tmp")].join(""))}function g(e,r,n){t.length>1?(l([e,r,n],!1,["tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1",o("ptr2")),"\n",s("ptr2","tmp")].join("")),_.push("++"+r,"--"+n)):_.push(["ptr0=",a(e),"\n","ptr1=",a(r),"\n","ptr2=",a(n),"\n","++",r,"\n","--",n,"\n","tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1",o("ptr2")),"\n",s("ptr2","tmp")].join(""))}function v(t,e){m(t,e),_.push("--"+e)}function y(e,r,n){t.length>1?l([e,r],!0,[s("ptr0",o("ptr1")),"\n",s("ptr1",["pivot",n,"[pivot_ptr]"].join(""))].join("")):_.push(s(a(e),o(a(r))),s(a(r),"pivot"+n))}function b(e,r){_.push(["if((",r,"-",e,")<=",u,"){\n","insertionSort(",e,",",r,",data,offset,",i(t.length).join(","),")\n","}else{\n",w,"(",e,",",r,",data,offset,",i(t.length).join(","),")\n","}"].join(""))}function x(e,r,n){t.length>1?(_.push(["__l",++A,":while(true){"].join("")),l([e],!0,["if(",o("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",A,"}"].join("")),_.push(n,"}")):_.push(["while(",o(a(e)),"===pivot",r,"){",n,"}"].join(""))}var _=["'use strict'"],w=["ndarrayQuickSort",t.join("d"),e].join(""),M=["left","right","data","offset"].concat(i(t.length)),k=n(e),A=0;_.push(["function ",w,"(",M.join(","),"){"].join(""));var T=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(t.length>1){for(var S=[],E=1;E1?l(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",o("ptr1"),"\n","pivot2[pivot_ptr]=",o("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",o("ptr0"),"\n","y=",o("ptr2"),"\n","z=",o("ptr4"),"\n",s("ptr5","x"),"\n",s("ptr6","y"),"\n",s("ptr7","z")].join("")):_.push(["pivot1=",o(a("el2")),"\n","pivot2=",o(a("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",o(a("el1")),"\n","y=",o(a("el3")),"\n","z=",o(a("el5")),"\n",s(a("index1"),"x"),"\n",s(a("index3"),"y"),"\n",s(a("index5"),"z")].join("")),d("index2","left"),d("index4","right"),_.push("if(pivots_are_equal){"),_.push("for(k=less;k<=great;++k){"),p("comp","k",1),_.push("if(comp===0){continue}"),_.push("if(comp<0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),_.push("while(true){"),p("comp","great",1),_.push("if(comp>0){"),_.push("great--"),_.push("}else if(comp<0){"),g("k","less","great"),_.push("break"),_.push("}else{"),v("k","great"),_.push("break"),_.push("}"),_.push("}"),_.push("}"),_.push("}"),_.push("}else{"),_.push("for(k=less;k<=great;++k){"),p("comp_pivot1","k",1),_.push("if(comp_pivot1<0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),p("comp_pivot2","k",2),_.push("if(comp_pivot2>0){"),_.push("while(true){"),p("comp","great",2),_.push("if(comp>0){"),_.push("if(--greatindex5){"),x("less",1,"++less"),x("great",2,"--great"),_.push("for(k=less;k<=great;++k){"),p("comp_pivot1","k",1),_.push("if(comp_pivot1===0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),p("comp_pivot2","k",2),_.push("if(comp_pivot2===0){"),_.push("while(true){"),p("comp","great",2),_.push("if(comp===0){"),_.push("if(--great1&&k){var L=new Function("insertionSort","malloc","free",_.join("\n"));return L(r,k[0],k[1])}var L=new Function("insertionSort",_.join("\n"));return L(r)}function s(t,e){var r=["'use strict'"],n=["ndarraySortWrapper",t.join("d"),e].join(""),s=["array"];r.push(["function ",n,"(",s.join(","),"){"].join(""));for(var l=["data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride"],c=0;c0?l.push(["d",g,"=s",g,"-d",p,"*n",p].join("")):l.push(["d",g,"=s",g].join("")),p=g);var d=t.length-1-c;0!==d&&(m>0?l.push(["e",d,"=s",d,"-e",m,"*n",m,",f",d,"=",h[d],"-f",m,"*n",m].join("")):l.push(["e",d,"=s",d,",f",d,"=",h[d]].join("")),m=d)}r.push("var "+l.join(","));var v=["0","n0-1","data","offset"].concat(i(t.length));r.push(["if(n0<=",u,"){","insertionSort(",v.join(","),")}else{","quickSort(",v.join(","),")}"].join("")),r.push("}return "+n);var y=new Function("insertionSort","quickSort",r.join("\n")),b=a(t,e);return y(b,o(t,e,b))}var l=t("typedarray-pool"),u=32;e.exports=s},{"typedarray-pool":528}],454:[function(t,e,r){"use strict";function n(t){var e=t.order,r=t.dtype,n=[e,r],o=n.join(":"),s=a[o];return s||(a[o]=s=i(e,r)),s(t),t}var i=t("./lib/compile_sort.js"),a={};e.exports=n},{"./lib/compile_sort.js":453}],455:[function(t,e,r){"use strict";var n=t("ndarray-linear-interpolate"),i=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=new Array(_inline_6_arg4_)}",args:[{name:"_inline_6_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_6_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_6_arg2_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_6_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_6_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_.apply(void 0,this_warped)}",args:[{name:"_inline_7_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_7_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg4_",lvalue:!1,rvalue:!1,count:0}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warpND",blockSize:64}),a=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0])}",args:[{name:"_inline_10_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_10_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp1D",blockSize:64}),o=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1])}",args:[{name:"_inline_13_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_13_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp2D",blockSize:64}),s=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_16_arg2_(this_warped,_inline_16_arg0_),_inline_16_arg1_=_inline_16_arg3_(_inline_16_arg4_,this_warped[0],this_warped[1],this_warped[2])}",args:[{name:"_inline_16_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_16_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp3D",blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:a(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:i(t,r,n.bind(void 0,e),e.shape.length)}return t}},{"cwise/lib/wrapper":105,"ndarray-linear-interpolate":449}],456:[function(t,e,r){function n(t,e){return t[0]-e[0]}function i(){var t,e=this.stride,r=new Array(e.length);for(t=0;tMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&a.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):a.push("ORDER})")),a.push("proto.set=function "+r+"_set("+u.join(",")+",v){"),n?a.push("return this.data.set("+c+",v)}"):a.push("return this.data["+c+"]=v}"),a.push("proto.get=function "+r+"_get("+u.join(",")+"){"),n?a.push("return this.data.get("+c+")}"):a.push("return this.data["+c+"]}"),a.push("proto.index=function "+r+"_index(",u.join(),"){return "+c+"}"),a.push("proto.hi=function "+r+"_hi("+u.join(",")+"){return new "+r+"(this.data,"+s.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+s.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var p=s.map(function(t){return"a"+t+"=this.shape["+t+"]"}),m=s.map(function(t){return"c"+t+"=this.stride["+t+"]"});a.push("proto.lo=function "+r+"_lo("+u.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+m.join(","));for(var g=0;g=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");a.push("return new "+r+"(this.data,"+s.map(function(t){return"a"+t}).join(",")+","+s.map(function(t){return"c"+t}).join(",")+",b)}"),a.push("proto.step=function "+r+"_step("+u.join(",")+"){var "+s.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+s.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var g=0;g=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+s.map(function(t){return"shape["+t+"]"}).join(",")+","+s.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}");var o=new Function("CTOR_LIST","ORDER",a.join("\n"));return o(h[t],i)}function o(t){if(u(t))return"buffer";if(c)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(t)?"array":"generic"}function s(t,e,r,n){if(void 0===t){var i=h.array[0];return i([])}"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var s=e.length;if(void 0===r){r=new Array(s);for(var l=s-1,u=1;l>=0;--l)r[l]=u,u*=e[l]}if(void 0===n){n=0;for(var l=0;lt==t>0?n===o?(r+=1,n=0):n+=1:0===n?(n=o,r-=1):n-=1,i.pack(n,r)}var i=t("double-bits"),a=Math.pow(2,-1074),o=-1>>>0;e.exports=n},{"double-bits":116}],458:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa)for(var x=i[u],_=1/Math.sqrt(g*y),b=0;b<3;++b){var w=(b+1)%3,M=(b+2)%3;x[b]+=_*(v[w]*m[M]-v[M]*m[w])}}for(var o=0;oa)for(var _=1/Math.sqrt(k),b=0;b<3;++b)x[b]*=_;else for(var b=0;b<3;++b)x[b]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(d):0;for(var u=0;u<3;++u)f[u]*=d;i[o]=f}return i}},{}],459:[function(t,e,r){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,l=n(t),u=1;u0){var h=Math.sqrt(c+1);t[0]=.5*(o-l)/h,t[1]=.5*(s-n)/h,t[2]=.5*(r-a)/h,t[3]=.5*h}else{var f=Math.max(e,a,u),h=Math.sqrt(2*f-c+1);e>=f?(t[0]=.5*h,t[1]=.5*(i+r)/h,t[2]=.5*(s+n)/h,t[3]=.5*(o-l)/h):a>=f?(t[0]=.5*(r+i)/h,t[1]=.5*h,t[2]=.5*(l+o)/h,t[3]=.5*(s-n)/h):(t[0]=.5*(n+s)/h,t[1]=.5*(o+l)/h,t[2]=.5*h,t[3]=.5*(r-i)/h)}return t}e.exports=n},{}],461:[function(t,e,r){"use strict";function n(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function i(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function a(t,e){var r=e[0],n=e[1],a=e[2],o=e[3],s=i(r,n,a,o);s>1e-6?(t[0]=r/s,t[1]=n/s,t[2]=a/s,t[3]=o/s):(t[0]=t[1]=t[2]=0,t[3]=1)}function o(t,e,r){this.radius=l([r]),this.center=l(e),this.rotation=l(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}function s(t){t=t||{};var e=t.center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),r=[].slice.call(r,0,4),a(r,r);var i=new o(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i}e.exports=s;var l=t("filtered-vector"),u=t("gl-mat4/lookAt"),c=t("gl-mat4/fromQuat"),h=t("gl-mat4/invert"),f=t("./lib/quatFromFrame"),d=o.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;a(e,e);var r=this.computedMatrix;c(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var u=0,h=0;h<3;++h)u+=r[l+4*h]*i[h];r[12+l]=-u}},d.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},d.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},d.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},d.pan=function(t,e,r,i){e=e||0,r=r||0,i=i||0,this.recalcMatrix(t);var a=this.computedMatrix,o=a[1],s=a[5],l=a[9],u=n(o,s,l);o/=u,s/=u,l/=u;var c=a[0],h=a[4],f=a[8],d=c*o+h*s+f*l;c-=o*d,h-=s*d,f-=l*d;var p=n(c,h,f);c/=p,h/=p,f/=p;var m=a[2],g=a[6],v=a[10],y=m*o+g*s+v*l,b=m*c+g*h+v*f;m-=y*o+b*c,g-=y*s+b*h,v-=y*l+b*f;var x=n(m,g,v);m/=x,g/=x,v/=x;var _=c*e+o*r,w=h*e+s*r,M=f*e+l*r;this.center.move(t,_,w,M);var k=Math.exp(this.computedRadius[0]);k=Math.max(1e-4,k+i),this.radius.set(t,Math.log(k))},d.rotate=function(t,e,r,a){this.recalcMatrix(t),e=e||0,r=r||0;var o=this.computedMatrix,s=o[0],l=o[4],u=o[8],c=o[1],h=o[5],f=o[9],d=o[2],p=o[6],m=o[10],g=e*s+r*c,v=e*l+r*h,y=e*u+r*f,b=-(p*y-m*v),x=-(m*g-d*y),_=-(d*v-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(b,2)-Math.pow(x,2)-Math.pow(_,2))),M=i(b,x,_,w);M>1e-6?(b/=M,x/=M,_/=M,w/=M):(b=x=_=0,w=1);var k=this.computedRotation,A=k[0],T=k[1],S=k[2],E=k[3],L=A*w+E*b+T*_-S*x,C=T*w+E*x+S*b-A*_,z=S*w+E*_+A*x-T*b,D=E*w-A*b-T*x-S*_;if(a){b=d,x=p,_=m;var I=Math.sin(a)/n(b,x,_);b*=I,x*=I,_*=I,w=Math.cos(e),L=L*w+D*b+C*_-z*x,C=C*w+D*x+z*b-L*_,z=z*w+D*_+L*x-C*b,D=D*w-L*b-C*x-z*_}var P=i(L,C,z,D);P>1e-6?(L/=P,C/=P,z/=P,D/=P):(L=C=z=0,D=1),this.rotation.set(t,L,C,z,D)},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var i=this.computedMatrix;u(i,e,r,n);var o=this.computedRotation;f(o,i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10]),a(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var s=0,l=0;l<3;++l)s+=Math.pow(r[l]-e[l],2);this.radius.set(t,.5*Math.log(Math.max(s,1e-6))),this.center.set(t,r[0],r[1],r[2])},d.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},d.setMatrix=function(t,e){var r=this.computedRotation;f(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),a(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;h(n,e);var i=n[15];if(Math.abs(i)>1e-6){var o=n[12]/i,s=n[13]/i,l=n[14]/i;this.recalcMatrix(t);var u=Math.exp(this.computedRadius[0]);this.center.set(t,o-n[2]*u,s-n[6]*u,l-n[10]*u),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},d.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},d.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},d.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},d.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},d.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{"./lib/quatFromFrame":460,"filtered-vector":125,"gl-mat4/fromQuat":169,"gl-mat4/invert":172,"gl-mat4/lookAt":173}],462:[function(t,e,r){"use strict";var n=t("repeat-string");e.exports=function(t,e,r){return r=void 0!==r?r+"":" ",n(r,e)+t}},{"repeat-string":488}],463:[function(t,e,r){e.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},{}],464:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,i="/"===o.charAt(0))}return r=e(n(r.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(t){var i=r.isAbsolute(t),a="/"===o(t,-1);return t=e(n(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),a=n(e.split("/")),o=Math.min(i.length,a.length),s=o,l=0;l55295&&e<57344){if(!r){e>56319||a+1===n?i.push(239,191,189):r=e;continue}if(e<56320){i.push(239,191,189),r=e;continue}e=r-55296<<10|e-56320|65536,r=null}else r&&(i.push(239,191,189),r=null);e<128?i.push(e):e<2048?i.push(e>>6|192,63&e|128):e<65536?i.push(e>>12|224,e>>6&63|128,63&e|128):i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}return i}e.exports=n;var a,o,s,l=t("ieee754");a={readUInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},writeUInt32LE:function(t,e){this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24},readInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+(this[t+3]<<24)},readFloatLE:function(t){return l.read(this,t,!0,23,4)},readDoubleLE:function(t){return l.read(this,t,!0,52,8)},writeFloatLE:function(t,e){return l.write(this,t,e,!0,23,4)},writeDoubleLE:function(t,e){return l.write(this,t,e,!0,52,8)},toString:function(t,e,r){var n="",i="";e=e||0,r=Math.min(this.length,r||this.length);for(var a=e;a=1;){if(e.pos>=r)throw new Error("Given varint doesn't fit into 10 bytes");var n=255&t;e.buf[e.pos++]=n|(t>=128?128:0),t/=128}}function o(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function s(t,e){for(var r=0;r>3,a=this.pos;t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=this.buf.readUInt32LE(this.pos);return this.pos+=4,t},readSFixed32:function(){var t=this.buf.readInt32LE(this.pos);return this.pos+=4,t},readFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+4294967296*this.buf.readUInt32LE(this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+4294967296*this.buf.readInt32LE(this.pos+4);return this.pos+=8,t},readFloat:function(){var t=this.buf.readFloatLE(this.pos);return this.pos+=4,t},readDouble:function(){var t=this.buf.readDoubleLE(this.pos);return this.pos+=8,t},readVarint:function(){var t,e,r=this.buf;return e=r[this.pos++],t=127&e,e<128?t:(e=r[this.pos++],t|=(127&e)<<7,e<128?t:(e=r[this.pos++],t|=(127&e)<<14,e<128?t:(e=r[this.pos++],t|=(127&e)<<21,e<128?t:i(t,this))))},readVarint64:function(){var t=this.pos,e=this.readVarint();if(e127;);else if(e===n.Bytes)this.pos=this.readVarint()+this.pos;else if(e===n.Fixed32)this.pos+=4;else{if(e!==n.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455)return void a(t,this);this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127)))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t);var e=g.byteLength(t);this.writeVarint(e),this.realloc(e),this.buf.write(t,this.pos),this.pos+=e},writeFloat:function(t){this.realloc(4),this.buf.writeFloatLE(t,this.pos),this.pos+=4},writeDouble:function(t){this.realloc(8),this.buf.writeDoubleLE(t,this.pos),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&o(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,n.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,s,e)},writePackedSVarint:function(t,e){this.writeMessage(t,l,e)},writePackedBoolean:function(t,e){this.writeMessage(t,h,e)},writePackedFloat:function(t,e){this.writeMessage(t,u,e)},writePackedDouble:function(t,e){this.writeMessage(t,c,e)},writePackedFixed32:function(t,e){this.writeMessage(t,f,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,d,e)},writePackedFixed64:function(t,e){this.writeMessage(t,p,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,n.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,n.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,n.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,n.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./buffer":465}],467:[function(t,e,r){"use strict";function n(t){var e=t.length;if(e0;--i)n=l[i],r=s[i],s[i]=s[n],s[n]=r,l[i]=l[r],l[r]=n,u=(u+r)*i;return a.freeUint32(l),a.freeUint32(s),u}function i(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}r=r||new Array(t);var n,i,a,o=1;for(r[0]=0,a=1;a0;--a)n=e/o|0,e=e-n*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}var a=t("typedarray-pool"),o=t("invert-permutation");r.rank=n,r.unrank=i},{"invert-permutation":282,"typedarray-pool":528}],469:[function(t,e,r){"use strict";function n(t,e){function r(t,e){var r=s[e][t[e]];r.splice(r.indexOf(t),1)}function n(t,n,a){for(var o,l,u,c=0;c<2;++c)if(s[c][n].length>0){o=s[c][n][0],u=c;break}l=o[1^u];for(var h=0;h<2;++h)for(var f=s[h][n],d=0;d0&&(o=p,l=m,u=h)}return a?l:(o&&r(o,u),l)}for(var a=0|e.length,o=t.length,s=[new Array(a),new Array(a)],l=0;l0;){var d=(s[0][l].length,function(t,a){var o=s[a][t][0],l=[t];r(o,a);for(var u=o[1^a];;){for(;u!==t;)l.push(u),u=n(l[l.length-2],u,!1);if(s[0][t].length+s[1][t].length===0)break;var c=l[l.length-1],h=t,f=l[1],d=n(c,h,!0);if(i(e[c],e[h],e[f],e[d])<0)break;l.push(t),u=n(c,h)}return l}(l,h));!function(t,e){return e[1]===e[e.length-1]}(f,d)?(f.length>0&&c.push(f),f=d):f.push.apply(f,d)}f.length>0&&c.push(f)}return c}e.exports=n;var i=t("compare-angle")},{"compare-angle":92}],470:[function(t,e,r){"use strict";function n(t,e){for(var r=i(t,e.length),n=new Array(e.length),a=new Array(e.length),o=[],s=0;s0;){var u=o.pop();n[u]=!1;for(var c=r[u],s=0;s0}function a(t){for(var e=t.length,r=0;r0;){var U=N.pop(),V=D[U];h(V,function(t,e){return t-e});var q,H=V.length,Y=B[U];if(0===Y){var T=v[U];q=[T]}for(var g=0;g=0)&&(B[G]=1^Y,N.push(G),0===Y)){var T=v[G];a(T)||(T.reverse(),q.push(T))}}0===Y&&d.push(q)}return d}e.exports=a;var o=t("edges-to-adjacency-list"),s=t("planar-dual"),l=t("point-in-big-polygon"),u=t("two-product"),c=t("robust-sum"),h=t("uniq"),f=t("./lib/trim-leaves")},{"./lib/trim-leaves":470,"edges-to-adjacency-list":119,"planar-dual":469,"point-in-big-polygon":473,"robust-sum":501,"two-product":526,uniq:530}],472:[function(t,e,r){"use strict";function n(t,e){this.x=t,this.y=e}e.exports=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{}],473:[function(t,e,r){function n(){return!0}function i(t){return function(e,r){var i=t[e];return!!i&&!!i.queryPoint(r,n)}}function a(t){for(var e={},r=0;r0&&e[n]===r[0]))return 1;i=t[n-1]}for(var a=1;i;){var o=i.key,s=h(r,o[0],o[1]);if(o[0][0]0))return 0;a=-1,i=i.right}else if(s>0)i=i.left;else{if(!(s<0))return 0;a=1,i=i.right}}return a}}function s(t){return 1}function l(t){return function(e){return t(e[0],e[1])?0:1}}function u(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}function c(t){for(var e=t.length,r=[],n=[],i=0;i=u?(x=1,y=u+2*f+p):(x=-f/u,y=f*x+p)):(x=0,d>=0?(_=0,y=p):-d>=h?(_=1,y=h+2*d+p):(_=-d/h,y=d*_+p));else if(_<0)_=0,f>=0?(x=0,y=p):-f>=u?(x=1,y=u+2*f+p):(x=-f/u,y=f*x+p);else{var w=1/b;x*=w,_*=w,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p}else{var M,k,A,T;x<0?(M=c+f,k=h+d,k>M?(A=k-M,T=u-2*c+h,A>=T?(x=1,_=0,y=u+2*f+p):(x=A/T,_=1-x,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)):(x=0,k<=0?(_=1,y=h+2*d+p):d>=0?(_=0,y=p):(_=-d/h,y=d*_+p))):_<0?(M=c+d,k=u+f,k>M?(A=k-M,T=u-2*c+h,A>=T?(_=1,x=0,y=h+2*d+p):(_=A/T,x=1-_,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)):(_=0,k<=0?(x=1,y=u+2*f+p):f>=0?(x=0,y=p):(x=-f/u,y=f*x+p))):(A=h+d-c-f,A<=0?(x=0,_=1,y=h+2*d+p):(T=u-2*c+h,A>=T?(x=1,_=0,y=u+2*f+p):(x=A/T,_=1-x,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)))}for(var S=1-x-_,l=0;l1)for(var r=1;r1&&(n=r[0]+"@",t=r[1]),t=t.replace(I,"."),n+o(t.split("."),e).join(".")}function l(t){for(var e,r,n=[],i=0,a=t.length;i=55296&&e<=56319&&i65535&&(t-=65536,e+=j(t>>>10&1023|55296),t=56320|1023&t),e+=j(t)}).join("")}function c(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:M}function h(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,r){var n=0;for(t=r?R(t/S):t>>1,t+=R(t/e);t>O*A>>1;n+=M)t=R(t/O);return R(n+(O+1)*t/(t+T))}function d(t){var e,r,n,i,o,s,l,h,d,p,m=[],g=t.length,v=0,y=L,b=E;for(r=t.lastIndexOf(C),r<0&&(r=0),n=0;n=128&&a("not-basic"),m.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=g&&a("invalid-input"),h=c(t.charCodeAt(i++)),(h>=M||h>R((w-v)/s))&&a("overflow"),v+=h*s,d=l<=b?k:l>=b+A?A:l-b,!(hR(w/p)&&a("overflow"),s*=p;e=m.length+1,b=f(v-o,e,0==o),R(v/e)>w-y&&a("overflow"),y+=R(v/e),v%=e,m.splice(v++,0,y)}return u(m)}function p(t){var e,r,n,i,o,s,u,c,d,p,m,g,v,y,b,x=[];for(t=l(t),g=t.length,e=L,r=0,o=E,s=0;s=e&&mR((w-r)/v)&&a("overflow"),r+=(u-e)*v,e=u,s=0;sw&&a("overflow"),m==e){for(c=r,d=M;p=d<=o?k:d>=o+A?A:d-o,!(c= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=M-k,R=Math.floor,j=String.fromCharCode;if(x={version:"1.4.1",ucs2:{decode:l,encode:u},decode:d,encode:p,toASCII:g,toUnicode:m},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return x});else if(v&&y)if(r.exports==v)y.exports=x;else for(_ in x)x.hasOwnProperty(_)&&(v[_]=x[_]);else i.punycode=x}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],477:[function(t,e,r){e.exports=t("gl-quat/slerp")},{"gl-quat/slerp":222}],478:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,a){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;t=t.split(e);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var l=t.length;s>0&&l>s&&(l=s);for(var u=0;u=0?(c=p.substr(0,m),h=p.substr(m+1)):(c=p,h=""),f=decodeURIComponent(c),d=decodeURIComponent(h),n(o,f)?i(o[f])?o[f].push(d):o[f]=[o[f],d]:o[f]=d}return o};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],479:[function(t,e,r){"use strict";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;nr;){if(o-r>600){var l=o-r+1,u=e-r+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1);n(t,e,Math.max(r,Math.floor(e-u*h/l+f)),Math.min(o,Math.floor(e+(l-u)*h/l+f)),s)}var d=t[e],p=r,m=o;for(i(t,r,e),s(t[o],d)>0&&i(t,r,o);p0;)m--}0===s(t[r],d)?i(t,r,m):(m++,i(t,m,o)),m<=e&&(r=m+1),e<=m&&(o=m-1)}}function i(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function a(t,e){return te?1:0}e.exports=n},{}],482:[function(t,e,r){"use strict";function n(t,e){for(var r=t.length,n=new Array(r),a=0;a0){var u=t[r-1];if(0===i(s,u)&&o(u)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}var i=t("compare-cell"),a=t("compare-oriented-cell"),o=t("cell-orientation");e.exports=n},{"cell-orientation":77,"compare-cell":93,"compare-oriented-cell":94}],487:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.createREGL=i()}(this,function(){"use strict";function t(t){return"undefined"!=typeof btoa?btoa(t):"base64:"+t}function e(t){var e=new Error("(regl) "+t);throw console.error(e),e}function r(t,r){t||e(r)}function n(t){return t?": "+t:""}function i(t,r,i){t in r||e("unknown parameter ("+t+")"+n(i)+". possible values: "+Object.keys(r).join())}function a(t,r){Qt(t)||e("invalid parameter type"+n(r)+". must be a typed array")}function o(t,r,i){typeof t!==r&&e("invalid parameter type"+n(i)+". expected "+r+", got "+typeof t)}function s(t,r){t>=0&&(0|t)===t||e("invalid parameter type, ("+t+")"+n(r)+". must be a nonnegative integer")}function l(t,r,i){r.indexOf(t)<0&&e("invalid value"+n(i)+". must be one of: "+r)}function u(t){Object.keys(t).forEach(function(t){te.indexOf(t)<0&&e('invalid regl constructor argument "'+t+'". must be one of '+te)})}function c(t,e){for(t+="";t.length0&&e.push(new d("unknown",0,t))}}),e}function y(t,e){e.forEach(function(e){var r=t[e.file];if(r){var n=r.index[e.line];if(n)return n.errors.push(e),void(r.hasErrors=!0)}t.unknown.hasErrors=!0,t.unknown.lines[0].errors.push(e)})}function b(t,e,n,i,a){if(!t.getShaderParameter(e,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(e),s=i===t.FRAGMENT_SHADER?"fragment":"vertex";T(n,"string",s+" shader source must be a string",a);var l=g(n,a),u=v(o);y(l,u),Object.keys(l).forEach(function(t){function e(t,e){n.push(t),i.push(e||"")}var r=l[t];if(r.hasErrors){var n=[""],i=[""];e("file number "+t+": "+r.name+"\n","color:red;text-decoration:underline;font-weight:bold"),r.lines.forEach(function(t){if(t.errors.length>0){e(c(t.number,4)+"| ","background-color:yellow; font-weight:bold"),e(t.line+"\n","color:red; background-color:yellow; font-weight:bold");var r=0;t.errors.forEach(function(n){var i=n.message,a=/^\s*\'(.*)\'\s*\:\s*(.*)$/.exec(i);if(a){var o=a[1];switch(i=a[2],o){case"assign":o="="}r=Math.max(t.line.indexOf(o,r),0)}else r=0;e(c("| ",6)),e(c("^^^",r+3)+"\n","font-weight:bold"),e(c("| ",6)),e(i+"\n","font-weight:bold")}),e(c("| ",6)+"\n")}else e(c(t.number,4)+"| "),e(t.line+"\n","color:red")}),"undefined"!=typeof document?(i[0]=n.join("%c"),console.log.apply(console,i)):console.log(n.join(""))}}),r.raise("Error compiling "+s+" shader, "+l[0].name)}}function x(t,e,n,i,a){if(!t.getProgramParameter(e,t.LINK_STATUS)){var o=t.getProgramInfoLog(e),s=g(n,a),l=g(i,a),u='Error linking program with vertex shader, "'+l[0].name+'", and fragment shader "'+s[0].name+'"';"undefined"!=typeof document?console.log("%c"+u+"\n%c"+o,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(u+"\n"+o),r.raise(u)}}function _(t){t._commandRef=p()}function w(t,e,r,n){function i(t){return t?n.id(t):0}function a(t,e){Object.keys(e).forEach(function(e){t[n.id(e)]=!0})}_(t),t._fragId=i(t.static.frag),t._vertId=i(t.static.vert);var o=t._uniformSet={};a(o,e.static),a(o,e.dynamic);var s=t._attributeSet={};a(s,r.static),a(s,r.dynamic),t._hasCount="count"in t.static||"count"in t.dynamic||"elements"in t.static||"elements"in t.dynamic}function M(t,r){var n=m();e(t+" in command "+(r||p())+("unknown"===n?"":" called from "+n))}function k(t,e,r){t||M(e,r||p())}function A(t,e,r,i){t in e||M("unknown parameter ("+t+")"+n(r)+". possible values: "+Object.keys(e).join(),i||p())}function T(t,e,r,i){typeof t!==e&&M("invalid parameter type"+n(r)+". expected "+e+", got "+typeof t,i||p())}function S(t){t()}function E(t,e,r){t.texture?l(t.texture._texture.internalformat,e,"unsupported texture format for attachment"):l(t.renderbuffer._renderbuffer.format,r,"unsupported renderbuffer format for attachment")}function L(t,e){return t===ue||t===le||t===ce?2:t===he?4:fe[t]*e}function C(t){return!(t&t-1||!t)}function z(t,e,n){var i,a=e.width,o=e.height,s=e.channels;r(a>0&&a<=n.maxTextureSize&&o>0&&o<=n.maxTextureSize,"invalid texture shape"),t.wrapS===ee&&t.wrapT===ee||r(C(a)&&C(o),"incompatible wrap mode for texture, both width and height must be power of 2"),1===e.mipmask?1!==a&&1!==o&&r(t.minFilter!==ne&&t.minFilter!==ae&&t.minFilter!==ie&&t.minFilter!==oe,"min filter requires mipmap"):(r(C(a)&&C(o),"texture must be a square power of 2 to support mipmapping"),r(e.mipmask===(a<<1)-1,"missing or incomplete mipmap data")),e.type===se&&(n.extensions.indexOf("oes_texture_float_linear")<0&&r(t.minFilter===re&&t.magFilter===re,"filter not supported, must enable oes_texture_float_linear"),r(!t.genMipmaps,"mipmap generation not supported with float textures"));var l=e.images;for(i=0;i<16;++i)if(l[i]){var u=a>>i,c=o>>i;r(e.mipmask&1<0&&a<=i.maxTextureSize&&o>0&&o<=i.maxTextureSize,"invalid texture shape"),r(a===o,"cube map must be square"),r(e.wrapS===ee&&e.wrapT===ee,"wrap mode not supported by cube map");for(var l=0;l>h,p=o>>h;r(u.mipmask&1<1&&e===r&&('"'===e||"'"===e))return['"'+P(t.substr(1,t.length-2))+'"'];var n=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t);if(n)return O(t.substr(0,n.index)).concat(O(n[1])).concat(O(t.substr(n.index+n[0].length)));var i=t.split(".");if(1===i.length)return['"'+P(t)+'"'];for(var a=[],o=0;o0,"invalid pixel ratio"))):de.raise("invalid arguments to regl"),e&&("canvas"===e.nodeName.toLowerCase()?n=e:r=e),!i){if(!n){de("undefined"!=typeof document,"must manually specify webgl context outside of DOM environments");var d=U(r||document.body,h,u);if(!d)return null;n=d.canvas,f=d.onDestroy}i=V(n,o)}return i?{gl:i,canvas:n,container:r,extensions:s,optionalExtensions:l,pixelRatio:u,profile:c,onDone:h,onDestroy:f}:(f(),h("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function W(t,e){function r(e){de.type(e,"string","extension name must be string");var r,i=e.toLowerCase();try{r=n[i]=t.getExtension(i)}catch(t){}return!!r}for(var n={},i=0;i65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1}function $(t){var e=K(t),r=Ee[Q(e)>>2];return r.length>0?r.pop():new ArrayBuffer(e)}function tt(t){Ee[Q(t.byteLength)>>2].push(t)}function et(t,e){var r=null;switch(t){case _e:r=new Int8Array($(e),0,e);break;case we:r=new Uint8Array($(e),0,e);break;case Me:r=new Int16Array($(2*e),0,e);break;case ke:r=new Uint16Array($(2*e),0,e);break;case Ae:r=new Int32Array($(4*e),0,e);break;case Te:r=new Uint32Array($(4*e),0,e);break;case Se:r=new Float32Array($(4*e),0,e);break;default:return null}return r.length!==e?r.subarray(0,e):r}function rt(t){tt(t.buffer)}function nt(t,e,r){for(var n=0;n0){var l;if(Array.isArray(e[0])){s=Pe(e);for(var u=1,c=1;c0)if("number"==typeof t[0]){var i=Le.allocType(p.dtype,t.length);ct(i,t),h(i,n),Le.freeType(i)}else if(Array.isArray(t[0])||Qt(t[0])){r=Pe(t);var a=Ie(t,r,p.dtype);h(a,n),Le.freeType(a)}else de.raise("invalid buffer data")}else if(Qt(t))h(t,n);else if(Z(t)){r=t.shape;var o=t.stride,s=0,l=0,u=0,f=0;1===r.length?(s=r[0],l=1,u=o[0],f=0):2===r.length?(s=r[0],l=r[1],u=o[0],f=o[1]):de.raise("invalid shape");var d=Array.isArray(t.data)?p.dtype:ut(t.data),m=Le.allocType(d,s*l);ht(m,t.data,s,l,u,f,t.offset),h(m,n),Le.freeType(m)}else de.raise("invalid data for buffer subdata");return c}e.bufferCount++;var p=new n(a);return f[p.id]=p,o||c(i),c._reglType="buffer",c._buffer=p,c.subdata=d,r.profile&&(c.stats=p.stats),c.destroy=function(){l(p)},c}function c(){xe(f).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})}var h=0,f={};n.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},n.prototype.destroy=function(){l(this)};var d=[];return r.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:u,createStream:i,destroyStream:a,clear:function(){xe(f).forEach(l),d.forEach(l)},getBuffer:function(t){return t&&t._buffer instanceof n?t._buffer:null},restore:c,_initBuffer:s}}function dt(t,e,r,n){function i(t){this.id=h++,c[this.id]=this,this.buffer=t,this.primType=qe,this.vertCount=0,this.type=0}function a(t){var e=d.pop();return e||(e=new i(r.create(null,Je,!0,!1)._buffer)),s(e,t,Ke,-1,-1,0,0),e}function o(t){d.push(t)}function s(n,i,a,o,s,l,u){if(n.buffer.bind(),i){var c=u;u||Qt(i)&&(!Z(i)||Qt(i.data))||(c=e.oes_element_index_uint?Ze:Xe),r._initBuffer(n.buffer,i,a,c,3)}else t.bufferData(Je,l,a),n.buffer.dtype=h||Ye,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l;var h=u;if(!u){switch(n.buffer.dtype){case Ye:case He:h=Ye;break;case Xe:case Ge:h=Xe;break;case Ze:case We:h=Ze;break;default:de.raise("unsupported type for element array")}n.buffer.dtype=h}n.type=h,de(h!==Ze||!!e.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var f=s;f<0&&(f=n.buffer.byteLength,h===Xe?f>>=1:h===Ze&&(f>>=2)),n.vertCount=f;var d=o;if(o<0){d=qe;var p=n.buffer.dimension;1===p&&(d=Ue),2===p&&(d=Ve),3===p&&(d=qe)}n.primType=d}function l(t){n.elementsCount--,de(null!==t.buffer,"must not double destroy elements"),delete c[t.id],t.buffer.destroy(),t.buffer=null}function u(t,e){function a(t){if(t)if("number"==typeof t)o(t),u.primType=qe,u.vertCount=0|t,u.type=Ye;else{var e=null,r=Qe,n=-1,i=-1,l=0,c=0;Array.isArray(t)||Qt(t)||Z(t)?e=t:(de.type(t,"object","invalid arguments for elements"),"data"in t&&(e=t.data,de(Array.isArray(e)||Qt(e)||Z(e),"invalid data for element buffer")),"usage"in t&&(de.parameter(t.usage,De,"invalid element buffer usage"),r=De[t.usage]),"primitive"in t&&(de.parameter(t.primitive,Be,"invalid element buffer primitive"),n=Be[t.primitive]),"count"in t&&(de("number"==typeof t.count&&t.count>=0,"invalid vertex count for elements"),i=0|t.count),"type"in t&&(de.parameter(t.type,f,"invalid buffer type"),c=f[t.type]),"length"in t?l=0|t.length:(l=i,c===Xe||c===Ge?l*=2:c!==Ze&&c!==We||(l*=4))),s(u,e,r,n,i,l,c)}else o(),u.primType=qe,u.vertCount=0,u.type=Ye;return a}var o=r.create(null,Je,!0),u=new i(o._buffer);return n.elementsCount++,a(t),a._reglType="elements",a._elements=u,a.subdata=function(t,e){return o.subdata(t,e),a},a.destroy=function(){l(u)},a}var c={},h=0,f={uint8:Ye,uint16:Xe};e.oes_element_index_uint&&(f.uint32=Ze),i.prototype.bind=function(){this.buffer.bind()};var d=[];return{create:u,createStream:a,destroyStream:o,getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){xe(c).forEach(l)}}}function pt(t){for(var e=Le.allocType(er,t.length),r=0;r>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)e[r]=i;else if(a<-14){var s=-14-a;e[r]=i+(o+1024>>s)}else e[r]=a>15?i+31744:i+(a+15<<10)+o}return e}function mt(t){return Array.isArray(t)||Qt(t)}function gt(t){return"[object "+t+"]"}function vt(t){return Array.isArray(t)&&(0===t.length||"number"==typeof t[0])}function yt(t){return!!Array.isArray(t)&&!(0===t.length||!mt(t[0]))}function bt(t){return Object.prototype.toString.call(t)}function xt(t){return bt(t)===dn}function _t(t){return bt(t)===pn}function wt(t){return bt(t)===mn}function Mt(t){return bt(t)===gn}function kt(t){if(!t)return!1;var e=bt(t);return vn.indexOf(e)>=0||(vt(t)||yt(t)||Z(t))}function At(t){return 0|Kt[Object.prototype.toString.call(t)]}function Tt(t,e){var r=e.length;switch(t.type){case Or:case Rr:case jr:case Fr:var n=Le.allocType(t.type,r);n.set(e),t.data=n;break;case wr:t.data=pt(e);break;default:de.raise("unsupported texture type, must specify a typed array")}}function St(t,e){return Le.allocType(t.type===wr?Fr:t.type,e)}function Et(t,e){t.type===wr?(t.data=pt(e),Le.freeType(e)):t.data=e}function Lt(t,e,r,n,i,a){for(var o=t.width,s=t.height,l=t.channels,u=o*s*l,c=St(t,u),h=0,f=0;f=1;)s+=o*l*l,l/=2;return s}return o*r*n}function zt(t,e,r,n,i,a,o){function s(){this.internalformat=or,this.format=or,this.type=Or,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=0,this.width=0,this.height=0,this.channels=0}function l(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function u(t,n){if("object"==typeof n&&n){if("premultiplyAlpha"in n&&(de.type(n.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),t.premultiplyAlpha=n.premultiplyAlpha),"flipY"in n&&(de.type(n.flipY,"boolean","invalid texture flip"),t.flipY=n.flipY),"alignment"in n&&(de.oneOf(n.alignment,[1,2,4,8],"invalid texture unpack alignment"),t.unpackAlignment=n.alignment),"colorSpace"in n&&(de.parameter(n.colorSpace,F,"invalid colorSpace"),t.colorSpace=F[n.colorSpace]),"type"in n){var i=n.type;de(e.oes_texture_float||!("float"===i||"float32"===i),"you must enable the OES_texture_float extension in order to use floating point textures."),de(e.oes_texture_half_float||!("half float"===i||"float16"===i),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),de(e.webgl_depth_texture||!("uint16"===i||"uint32"===i||"depth stencil"===i),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),de.parameter(i,N,"invalid texture type"),t.type=N[i]}var a=t.width,o=t.height,s=t.channels,l=!1;"shape"in n?(de(Array.isArray(n.shape)&&n.shape.length>=2,"shape must be an array"),a=n.shape[0],o=n.shape[1],3===n.shape.length&&(s=n.shape[2],de(s>0&&s<=4,"invalid number of channels"),l=!0),de(a>=0&&a<=r.maxTextureSize,"invalid width"),de(o>=0&&o<=r.maxTextureSize,"invalid height")):("radius"in n&&(a=o=n.radius,de(a>=0&&a<=r.maxTextureSize,"invalid radius")),"width"in n&&(a=n.width,de(a>=0&&a<=r.maxTextureSize,"invalid width")),"height"in n&&(o=n.height,de(o>=0&&o<=r.maxTextureSize,"invalid height")),"channels"in n&&(s=n.channels,de(s>0&&s<=4,"invalid number of channels"),l=!0)),t.width=0|a,t.height=0|o,t.channels=0|s;var u=!1;if("format"in n){var c=n.format;de(e.webgl_depth_texture||!("depth"===c||"depth stencil"===c),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),de.parameter(c,B,"invalid texture format");var h=t.internalformat=B[c];t.format=J[h],c in N&&("type"in n||(t.type=N[c])),c in U&&(t.compressed=!0),u=!0}!l&&u?t.channels=fn[t.format]:l&&!u?t.channels!==hn[t.format]&&(t.format=t.internalformat=hn[t.channels]):u&&l&&de(t.channels===fn[t.format],"number of channels inconsistent with specified format")}}function c(e){t.pixelStorei(an,e.flipY),t.pixelStorei(on,e.premultiplyAlpha),t.pixelStorei(sn,e.colorSpace),t.pixelStorei(nn,e.unpackAlignment)}function h(){s.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function f(t,e){var n=null;if(kt(e)?n=e:e&&(de.type(e,"object","invalid pixel data type"),u(t,e),"x"in e&&(t.xOffset=0|e.x),"y"in e&&(t.yOffset=0|e.y),kt(e.data)&&(n=e.data)),de(!t.compressed||n instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),e.copy){de(!n,"can not specify copy and data field for the same texture");var a=i.viewportWidth,o=i.viewportHeight;t.width=t.width||a-t.xOffset,t.height=t.height||o-t.yOffset,t.needsCopy=!0,de(t.xOffset>=0&&t.xOffset=0&&t.yOffset0&&t.width<=a&&t.height>0&&t.height<=o,"copy texture read out of bounds")}else if(n){if(Qt(n))t.channels=t.channels||4,t.data=n,"type"in e||t.type!==Or||(t.type=At(n));else if(vt(n))t.channels=t.channels||4,Tt(t,n),t.alignment=1,t.needsFree=!0;else if(Z(n)){var s=n.data;Array.isArray(s)||t.type!==Or||(t.type=At(s));var l,c,h,f,d,p,m=n.shape,g=n.stride;3===m.length?(h=m[2],p=g[2]):(de(2===m.length,"invalid ndarray pixel data, must be 2 or 3D"),h=1,p=1),l=m[0],c=m[1],f=g[0],d=g[1],t.alignment=1,t.width=l,t.height=c,t.channels=h,t.format=t.internalformat=hn[h],t.needsFree=!0,Lt(t,s,f,d,p,n.offset)}else if(xt(n)||_t(n))xt(n)?t.element=n:t.element=n.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(wt(n))t.element=n,t.width=n.naturalWidth,t.height=n.naturalHeight,t.channels=4;else if(Mt(n))t.element=n,t.width=n.videoWidth,t.height=n.videoHeight,t.channels=4;else if(yt(n)){var v=t.width||n[0].length,y=t.height||n.length,b=t.channels;b=mt(n[0][0])?b||n[0][0].length:b||1;for(var x=Ce.shape(n),_=1,w=0;w=0,"oes_texture_float extension not enabled"):t.type===wr&&de(r.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function d(e,r,i){var a=e.element,o=e.data,s=e.internalformat,l=e.format,u=e.type,h=e.width,f=e.height;c(e),a?t.texImage2D(r,i,l,l,u,a):e.compressed?t.compressedTexImage2D(r,i,s,h,f,0,o):e.needsCopy?(n(),t.copyTexImage2D(r,i,l,e.xOffset,e.yOffset,h,f,0)):t.texImage2D(r,i,l,h,f,0,l,u,o)}function p(e,r,i,a,o){var s=e.element,l=e.data,u=e.internalformat,h=e.format,f=e.type,d=e.width,p=e.height;c(e),s?t.texSubImage2D(r,o,i,a,h,f,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,u,d,p,l):e.needsCopy?(n(),t.copyTexSubImage2D(r,o,i,a,e.xOffset,e.yOffset,d,p)):t.texSubImage2D(r,o,i,a,d,p,h,f,l)}function m(){return K.pop()||new h}function g(t){t.needsFree&&Le.freeType(t.data),h.call(t),K.push(t)}function v(){s.call(this),this.genMipmaps=!1,this.mipmapHint=$r,this.mipmask=0,this.images=Array(16)}function y(t,e,r){var n=t.images[0]=m();t.mipmask=1, +n.width=t.width=e,n.height=t.height=r,n.channels=t.channels=4}function b(t,e){var r=null;if(kt(e))r=t.images[0]=m(),l(r,t),f(r,e),t.mipmask=1;else if(u(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i>=i,r.height>>=i,f(r,n[i]),t.mipmask|=1<=0&&(t.genMipmaps=!0)}if("mag"in e){var i=e.mag;de.parameter(i,R),t.magFilter=R[i]}var a=t.wrapS,o=t.wrapT;if("wrap"in e){var s=e.wrap;"string"==typeof s?(de.parameter(s,O),a=o=O[s]):Array.isArray(s)&&(de.parameter(s[0],O),de.parameter(s[1],O),a=O[s[0]],o=O[s[1]])}else{if("wrapS"in e){var l=e.wrapS;de.parameter(l,O),a=O[l]}if("wrapT"in e){var u=e.wrapT;de.parameter(u,O),o=O[u]}}if(t.wrapS=a,t.wrapT=o,"anisotropic"in e){var c=e.anisotropic;de("number"==typeof c&&c>=1&&c<=r.maxAnisotropic,"aniso samples must be between 1 and "),t.anisotropic=e.anisotropic}if("mipmap"in e){var h=!1;switch(typeof e.mipmap){case"string":de.parameter(e.mipmap,P,"invalid mipmap hint"),t.mipmapHint=P[e.mipmap],t.genMipmaps=!0,h=!0;break;case"boolean":h=t.genMipmaps=e.mipmap;break;case"object":de(Array.isArray(e.mipmap),"invalid mipmap type"),t.genMipmaps=!1,h=!0;break;default:de.raise("invalid mipmap type")}!h||"min"in e||(t.minFilter=Wr)}}function A(r,n){t.texParameteri(n,Yr,r.minFilter),t.texParameteri(n,Hr,r.magFilter),t.texParameteri(n,Nr,r.wrapS),t.texParameteri(n,Br,r.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(n,rn,r.anisotropic),r.genMipmaps&&(t.hint(Qr,r.mipmapHint),t.generateMipmap(n))}function T(e){s.call(this),this.mipmask=0,this.internalformat=or,this.id=$++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new M,o.profile&&(this.stats={size:0})}function S(e){t.activeTexture(un),t.bindTexture(e.target,e.texture)}function E(){var e=rt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(nr,null)}function L(e){var r=e.texture;de(r,"must not double destroy texture");var n=e.unit,i=e.target;n>=0&&(t.activeTexture(un+n),t.bindTexture(i,null),rt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete tt[e.id],a.textureCount--}function C(e,n){function i(t,e){var n=c.texInfo;M.call(n);var a=_();return"number"==typeof t?"number"==typeof e?y(a,0|t,0|e):y(a,0|t,0|t):t?(de.type(t,"object","invalid arguments to regl.texture"),k(n,t),b(a,t)):y(a,1,1),n.genMipmaps&&(a.mipmask=(a.width<<1)-1),c.mipmask=a.mipmask,l(c,a),de.texture2D(n,a,r),c.internalformat=a.internalformat,i.width=a.width,i.height=a.height,S(c),x(a,nr),A(n,nr),E(),w(a),o.profile&&(c.stats.size=Ct(c.internalformat,c.type,a.width,a.height,n.genMipmaps,!1)),i.format=H[c.internalformat],i.type=Y[c.type],i.mag=G[n.magFilter],i.min=X[n.minFilter],i.wrapS=W[n.wrapS],i.wrapT=W[n.wrapT],i}function s(t,e,r,n){de(!!t,"must specify image data");var a=0|e,o=0|r,s=0|n,u=m();return l(u,c),u.width=0,u.height=0,f(u,t),u.width=u.width||(c.width>>s)-a,u.height=u.height||(c.height>>s)-o,de(c.type===u.type&&c.format===u.format&&c.internalformat===u.internalformat,"incompatible format for texture.subimage"),de(a>=0&&o>=0&&a+u.width<=c.width&&o+u.height<=c.height,"texture.subimage write out of bounds"),de(c.mipmask&1<>s;++s)t.texImage2D(nr,s,c.format,n>>s,a>>s,0,c.format,c.type,null);return E(),o.profile&&(c.stats.size=Ct(c.internalformat,c.type,n,a,!1,!1)),i}var c=new T(nr);return tt[c.id]=c,a.textureCount++,i(e,n),i.subimage=s,i.resize=u,i._reglType="texture2d",i._texture=c,o.profile&&(i.stats=c.stats),i.destroy=function(){c.decRef()},i}function z(e,n,i,s,c,h){function d(t,e,n,i,a,s){var c,h=C.texInfo;for(M.call(h),c=0;c<6;++c)z[c]=_();if("number"!=typeof t&&t)if("object"==typeof t)if(e)b(z[0],t),b(z[1],e),b(z[2],n),b(z[3],i),b(z[4],a),b(z[5],s);else if(k(h,t),u(C,t),"faces"in t){var f=t.faces;for(de(Array.isArray(f)&&6===f.length,"cube faces must be a length 6 array"),c=0;c<6;++c)de("object"==typeof f[c]&&!!f[c],"invalid input for cube map face"),l(z[c],C),b(z[c],f[c])}else for(c=0;c<6;++c)b(z[c],t);else de.raise("invalid arguments to cube map");else{var p=0|t||1;for(c=0;c<6;++c)y(z[c],p,p)}for(l(C,z[0]),h.genMipmaps?C.mipmask=(z[0].width<<1)-1:C.mipmask=z[0].mipmask,de.textureCube(C,h,z,r),C.internalformat=z[0].internalformat,d.width=z[0].width,d.height=z[0].height,S(C),c=0;c<6;++c)x(z[c],ar+c);for(A(h,ir),E(),o.profile&&(C.stats.size=Ct(C.internalformat,C.type,d.width,d.height,h.genMipmaps,!0)),d.format=H[C.internalformat],d.type=Y[C.type],d.mag=G[h.magFilter],d.min=X[h.minFilter],d.wrapS=W[h.wrapS],d.wrapT=W[h.wrapT],c=0;c<6;++c)w(z[c]);return d}function v(t,e,r,n,i){de(!!e,"must specify image data"),de("number"==typeof t&&t===(0|t)&&t>=0&&t<6,"invalid face");var a=0|r,o=0|n,s=0|i,u=m();return l(u,C),u.width=0,u.height=0,f(u,e),u.width=u.width||(C.width>>s)-a,u.height=u.height||(C.height>>s)-o,de(C.type===u.type&&C.format===u.format&&C.internalformat===u.internalformat,"incompatible format for texture.subimage"),de(a>=0&&o>=0&&a+u.width<=C.width&&o+u.height<=C.height,"texture.subimage write out of bounds"),de(C.mipmask&1<>i;++i)t.texImage2D(ar+n,i,C.format,r>>i,r>>i,0,C.format,C.type,null);return E(),o.profile&&(C.stats.size=Ct(C.internalformat,C.type,d.width,d.height,!1,!0)),d}}var C=new T(ir);tt[C.id]=C,a.cubeCount++;var z=new Array(6);return d(e,n,i,s,c,h),d.subimage=v,d.resize=L,d._reglType="textureCube",d._texture=C,o.profile&&(d.stats=C.stats),d.destroy=function(){C.decRef()},d}function D(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)t.texImage2D(ar+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);A(e.texInfo,e.target)})}var P={"don't care":$r,"dont care":$r,nice:en,fast:tn},O={repeat:Ur,clamp:Vr,mirror:qr},R={nearest:Gr,linear:Xr},j=$t({mipmap:Kr,"nearest mipmap nearest":Wr,"linear mipmap nearest":Zr,"nearest mipmap linear":Jr,"linear mipmap linear":Kr},R),F={none:0,browser:ln},N={uint8:Or,rgba4:pr,rgb565:gr,"rgb5 a1":mr},B={alpha:sr,luminance:ur,"luminance alpha":cr,rgb:lr,rgba:or,rgba4:hr,"rgb5 a1":fr,rgb565:dr},U={};e.ext_srgb&&(B.srgb=xr,B.srgba=_r),e.oes_texture_float&&(N.float32=N.float=Fr),e.oes_texture_half_float&&(N.float16=N["half float"]=wr),e.webgl_depth_texture&&($t(B,{depth:yr,"depth stencil":br}),$t(N,{uint16:Rr,uint32:jr,"depth stencil":vr})),e.webgl_compressed_texture_s3tc&&$t(U,{"rgb s3tc dxt1":Mr,"rgba s3tc dxt1":kr,"rgba s3tc dxt3":Ar,"rgba s3tc dxt5":Tr}),e.webgl_compressed_texture_atc&&$t(U,{"rgb atc":Sr,"rgba atc explicit alpha":Er,"rgba atc interpolated alpha":Lr}),e.webgl_compressed_texture_pvrtc&&$t(U,{"rgb pvrtc 4bppv1":Cr,"rgb pvrtc 2bppv1":zr,"rgba pvrtc 4bppv1":Dr,"rgba pvrtc 2bppv1":Ir}),e.webgl_compressed_texture_etc1&&(U["rgb etc1"]=Pr);var V=Array.prototype.slice.call(t.getParameter(rr));Object.keys(U).forEach(function(t){var e=U[t];V.indexOf(e)>=0&&(B[t]=e)});var q=Object.keys(B);r.textureFormats=q;var H=[];Object.keys(B).forEach(function(t){var e=B[t];H[e]=t});var Y=[];Object.keys(N).forEach(function(t){var e=N[t];Y[e]=t});var G=[];Object.keys(R).forEach(function(t){var e=R[t];G[e]=t});var X=[];Object.keys(j).forEach(function(t){var e=j[t];X[e]=t});var W=[];Object.keys(O).forEach(function(t){var e=O[t];W[e]=t});var J=q.reduce(function(t,e){var r=B[e];return r===ur||r===sr||r===ur||r===cr||r===yr||r===br?t[r]=r:r===fr||e.indexOf("rgba")>=0?t[r]=or:t[r]=lr,t},{}),K=[],Q=[],$=0,tt={},et=r.maxTextureUnits,rt=Array(et).map(function(){return null});return $t(T.prototype,{bind:function(){var e=this;e.bindCount+=1;var r=e.unit;if(r<0){for(var n=0;n0)continue;i.unit=-1}rt[n]=e,r=n;break}r>=et&&de.raise("insufficient number of texture units"),o.profile&&a.maxTextureUnits=Sn&&e=2,"invalid shape for framebuffer"),u=D[0],d=D[1]}else"radius"in z&&(u=d=z.radius),"width"in z&&(u=z.width),"height"in z&&(d=z.height);("color"in z||"colors"in z)&&(y=z.color||z.colors,Array.isArray(y)&&de(1===y.length||o,"multiple render targets not supported")),y||("colorCount"in z&&(T=0|z.colorCount,de(T>0,"invalid color buffer count")),"colorTexture"in z&&(b=!!z.colorTexture,x="rgba4"),"colorType"in z&&(A=z.colorType,b?(de(e.oes_texture_float||!("float"===A||"float32"===A),"you must enable OES_texture_float in order to use floating point framebuffer objects"),de(e.oes_texture_half_float||!("half float"===A||"float16"===A),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):"half float"===A||"float16"===A?(de(e.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),x="rgba16f"):"float"!==A&&"float32"!==A||(de(e.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),x="rgba32f"),de.oneOf(A,k,"invalid color type")),"colorFormat"in z&&(x=z.colorFormat,w.indexOf(x)>=0?b=!0:M.indexOf(x)>=0?b=!1:b?de.oneOf(z.colorFormat,w,"invalid color format for texture"):de.oneOf(z.colorFormat,M,"invalid color format for renderbuffer"))),("depthTexture"in z||"depthStencilTexture"in z)&&(C=!(!z.depthTexture&&!z.depthStencilTexture),de(!C||e.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in z&&("boolean"==typeof z.depth?p=z.depth:(S=z.depth,g=!1)),"stencil"in z&&("boolean"==typeof z.stencil?g=z.stencil:(E=z.stencil,p=!1)),"depthStencil"in z&&("boolean"==typeof z.depthStencil?p=g=z.depthStencil:(L=z.depthStencil,p=!1,g=!1))}else u=d=1;var I=null,P=null,O=null,R=null;if(Array.isArray(y))I=y.map(c);else if(y)I=[c(y)];else for(I=new Array(T),a=0;a=0||I[a].renderbuffer&&Bn.indexOf(I[a].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+a+" is invalid"),I[a]&&I[a].texture){var F=On[I[a].texture._texture.format]*Rn[I[a].texture._texture.type];null===j?j=F:de(j===F,"all color attachments much have the same number of bits per pixel.")}return l(P,u,d),de(!P||P.texture&&P.texture._texture.format===In||P.renderbuffer&&P.renderbuffer._renderbuffer.format===jn,"invalid depth attachment for framebuffer object"),l(O,u,d),de(!O||O.renderbuffer&&O.renderbuffer._renderbuffer.format===Fn,"invalid stencil attachment for framebuffer object"),l(R,u,d),de(!R||R.texture&&R.texture._texture.format===Nn||R.renderbuffer&&R.renderbuffer._renderbuffer.format===Nn,"invalid depth-stencil attachment for framebuffer object"),m(s),s.width=u,s.height=d,s.colorAttachments=I,s.depthAttachment=P,s.stencilAttachment=O,s.depthStencilAttachment=R,i.color=I.map(f),i.depth=f(P),i.stencil=f(O),i.depthStencil=f(R),i.width=s.width,i.height=s.height,v(s),i}function o(t,e){de(_.next!==s,"can not resize a framebuffer which is currently in use");var r=0|t,n=0|e||r;if(r===s.width&&n===s.height)return i;for(var a=s.colorAttachments,o=0;o=2,"invalid shape for framebuffer"),de(p[0]===p[1],"cube framebuffer must be square"),l=p[0]}else"radius"in d&&(l=0|d.radius),"width"in d?(l=0|d.width,"height"in d&&de(d.height===l,"must be square")):"height"in d&&(l=0|d.height);("color"in d||"colors"in d)&&(u=d.color||d.colors,Array.isArray(u)&&de(1===u.length||a,"multiple render targets not supported")),u||("colorCount"in d&&(f=0|d.colorCount,de(f>0,"invalid color buffer count")),"colorType"in d&&(de.oneOf(d.colorType,k,"invalid color type"),h=d.colorType),"colorFormat"in d&&(c=d.colorFormat,de.oneOf(d.colorFormat,w,"invalid color format for texture"))),"depth"in d&&(s.depth=d.depth),"stencil"in d&&(s.stencil=d.stencil),"depthStencil"in d&&(s.depthStencil=d.depthStencil)}else l=1;var m;if(u)if(Array.isArray(u))for(m=[],r=0;r0&&(s.depth=o[0].depth,s.stencil=o[0].stencil,s.depthStencil=o[0].depthStencil),o[r]?o[r](s):o[r]=y(s)}return $t(i,{width:l,height:l,color:m})}function a(t){var e,n=0|t;if(de(n>0&&n<=r.maxCubeMapSize,"invalid radius for cube fbo"),n===i.width)return i;var a=i.color;for(e=0;e1)for(var m=0;mt&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return d.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);xe(c).forEach(e),c={},xe(h).forEach(e),h={},d.forEach(function(e){t.deleteProgram(e.program)}),d.length=0,f={},r.shaderCount=0},program:function(t,e,n){de.command(t>=0,"missing vertex shader",n),de.command(e>=0,"missing fragment shader",n);var i=f[e];i||(i=f[e]={});var a=i[t];return a||(a=new s(e,t),r.shaderCount++,l(a,n),i[t]=a,d.push(a)),a},restore:u,shader:o,frag:-1,vert:-1}}function jt(t,e,r,n,i,a){function o(o){var s;null===e.next?(de(i.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),s=Wn):(de(null!==e.next.colorAttachments[0].texture,"You cannot read from a renderbuffer"),s=e.next.colorAttachments[0].texture._texture.type,a.oes_texture_float?de(s===Wn||s===Jn,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"):de(s===Wn,"Reading from a framebuffer is only allowed for the type 'uint8'"));var l=0,u=0,c=n.framebufferWidth,h=n.framebufferHeight,f=null;Qt(o)?f=o:o&&(de.type(o,"object","invalid arguments to regl.read()"),l=0|o.x,u=0|o.y,de(l>=0&&l=0&&u0&&c+l<=n.framebufferWidth,"invalid width for read pixels"),de(h>0&&h+u<=n.framebufferHeight,"invalid height for read pixels"),r();var d=c*h*4;return f||(s===Wn?f=new Uint8Array(d):s===Jn&&(f=f||new Float32Array(d))),de.isTypedArray(f,"data buffer for regl.read() must be a typedarray"),de(f.byteLength>=d,"data buffer for regl.read() too small"),t.pixelStorei(Zn,4),t.readPixels(l,u,c,h,Xn,s,f),f}function s(t){var r;return e.setFBO({framebuffer:t.framebuffer},function(){r=o(t)}),r}function l(t){return t&&"framebuffer"in t?s(t):o(t)}return l}function Ft(t){return Array.prototype.slice.call(t)}function Nt(t){return Ft(t).join("")}function Bt(){function t(t){for(var e=0;e0&&(r.push(t,"="),r.push.apply(r,Ft(arguments)),r.push(";")),t}var r=[],n=[];return $t(t,{def:e,toString:function(){return Nt([n.length>0?"var "+n+";":"",Nt(r)])}})}function r(){function t(t,e){n(t,e,"=",r.def(t,e),";")}var r=e(),n=e(),i=r.toString,a=n.toString;return $t(function(){r.apply(r,Ft(arguments))},{def:r.def,entry:r,exit:n,save:t,set:function(e,n,i){t(e,n),r(e,n,"=",i,";")},toString:function(){return i()+a()}})}function n(){var t=Nt(arguments),e=r(),n=r(),i=e.toString,a=n.toString;return $t(e,{then:function(){return e.apply(e,Ft(arguments)),this},else:function(){return n.apply(n,Ft(arguments)),this},toString:function(){var e=a();return e&&(e="else{"+e+"}"),Nt(["if(",t,"){",i(),"}",e])}})}function i(t,e){function n(){var t="a"+i.length;return i.push(t),t}var i=[];e=e||0;for(var a=0;a=1,n>=2,e)}if(r===ai){var i=t.data;return new qt(i.thisDep,i.contextDep,i.propDep,e)}return new qt(r===ii,r===ni,r===ri,e)}function Xt(t,e,r,n,i,a,o,s,l,u,c,h,f,d,p){function m(t){return t.replace(".","_")}function g(t,e,r){var n=m(t);et.push(t),tt[n]=$[n]=!!r,rt[n]=e}function v(t,e,r){var n=m(t);et.push(t),Array.isArray(r)?($[n]=r.slice(),tt[n]=r.slice()):$[n]=tt[n]=r,nt[n]=e}function y(){var t=Bt(),r=t.link,n=t.global;t.id=ot++,t.batchId="0";var i=r(it),a=t.shared={props:"a0"};Object.keys(it).forEach(function(t){a[t]=n.def(i,".",t)}),de.optional(function(){t.CHECK=r(de),t.commandStr=de.guessCommand(),t.command=r(t.commandStr),t.assert=function(t,e,n){t("if(!(",e,"))",this.CHECK,".commandRaise(",r(n),",",this.command,");")},at.invalidBlendCombinations=Ua});var o=t.next={},s=t.current={};Object.keys(nt).forEach(function(t){Array.isArray($[t])&&(o[t]=n.def(a.next,".",t),s[t]=n.def(a.current,".",t))});var l=t.constants={};Object.keys(at).forEach(function(t){l[t]=n.def(JSON.stringify(at[t]))}),t.invoke=function(e,n){switch(n.type){case ei:var i=["this",a.context,a.props,t.batchId];return e.def(r(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case ri:return e.def(a.props,n.data);case ni:return e.def(a.context,n.data);case ii:return e.def("this",n.data);case ai:return n.data.append(t,e),n.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){var n=e.id(t);if(n in c)return c[n];var i=u.scope[n];return i||(i=u.scope[n]=new W),c[n]=r(i)},t}function b(t){var e,r=t.static,n=t.dynamic;if(Ii in r){var i=!!r[Ii];e=Yt(function(t,e){return i}),e.enable=i}else if(Ii in n){var a=n[Ii];e=Gt(a,function(t,e){return t.invoke(e,a)})}return e}function x(t,e){var r=t.static,n=t.dynamic;if(Pi in r){var i=r[Pi];return i?(i=s.getFramebuffer(i),de.command(i,"invalid framebuffer object"),Yt(function(t,e){var r=t.link(i),n=t.shared;e.set(n.framebuffer,".next",r);var a=n.context;return e.set(a,"."+Vi,r+".width"),e.set(a,"."+qi,r+".height"),r})):Yt(function(t,e){var r=t.shared;e.set(r.framebuffer,".next","null");var n=r.context;return e.set(n,"."+Vi,n+"."+Gi),e.set(n,"."+qi,n+"."+Xi),"null"})}if(Pi in n){var a=n[Pi];return Gt(a,function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer,o=e.def(i,".getFramebuffer(",r,")");de.optional(function(){t.assert(e,"!"+r+"||"+o,"invalid framebuffer object")}),e.set(i,".next",o);var s=n.context;return e.set(s,"."+Vi,o+"?"+o+".width:"+s+"."+Gi),e.set(s,"."+qi,o+"?"+o+".height:"+s+"."+Xi),o})}return null}function _(t,e,r){function n(t){if(t in i){var n=i[t];de.commandType(n,"object","invalid "+t,r.commandStr);var o,s,l=!0,u=0|n.x,c=0|n.y;return"width"in n?(o=0|n.width,de.command(o>=0,"invalid "+t,r.commandStr)):l=!1,"height"in n?(s=0|n.height,de.command(s>=0,"invalid "+t,r.commandStr)):l=!1,new qt(!l&&e&&e.thisDep,!l&&e&&e.contextDep,!l&&e&&e.propDep,function(t,e){var r=t.shared.context,i=o;"width"in n||(i=e.def(r,".",Vi,"-",u));var a=s;return"height"in n||(a=e.def(r,".",qi,"-",c)),[u,c,i,a]})}if(t in a){var h=a[t],f=Gt(h,function(e,r){var n=e.invoke(r,h);de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)});var i=e.shared.context,a=r.def(n,".x|0"),o=r.def(n,".y|0"),s=r.def('"width" in ',n,"?",n,".width|0:","(",i,".",Vi,"-",a,")"),l=r.def('"height" in ',n,"?",n,".height|0:","(",i,".",qi,"-",o,")");return de.optional(function(){e.assert(r,s+">=0&&"+l+">=0","invalid "+t)}),[a,o,s,l]});return e&&(f.thisDep=f.thisDep||e.thisDep,f.contextDep=f.contextDep||e.contextDep,f.propDep=f.propDep||e.propDep),f}return e?new qt(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,".",Vi),e.def(r,".",qi)]}):null}var i=t.static,a=t.dynamic,o=n(Di);if(o){var s=o;o=new qt(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=s.append(t,e),n=t.shared.context;return e.set(n,"."+Hi,r[2]),e.set(n,"."+Yi,r[3]),r})}return{viewport:o,scissor_box:n(zi)}}function w(t){function r(t){if(t in i){var r=e.id(i[t]);de.optional(function(){c.shader(Ha[t],r,de.guessCommand())});var n=Yt(function(){return r});return n.id=r,n}if(t in a){var o=a[t];return Gt(o,function(e,r){var n=e.invoke(r,o),i=r.def(e.shared.strings,".id(",n,")");return de.optional(function(){r(e.shared.shader,".shader(",Ha[t],",",i,",",e.command,");")}),i})}return null}var n,i=t.static,a=t.dynamic,o=r(Ri),s=r(Oi),l=null;return Ht(o)&&Ht(s)?(l=c.program(s.id,o.id),n=Yt(function(t,e){return t.link(l)})):n=new qt(o&&o.thisDep||s&&s.thisDep,o&&o.contextDep||s&&s.contextDep,o&&o.propDep||s&&s.propDep,function(t,e){var r,n=t.shared.shader;r=o?o.append(t,e):e.def(n,".",Ri);var i;i=s?s.append(t,e):e.def(n,".",Oi);var a=n+".program("+i+","+r;return de.optional(function(){a+=","+t.command}),e.def(a+")")}),{frag:o,vert:s,progVar:n,program:l}}function M(t,e){function r(t,r){if(t in n){var a=0|n[t];return de.command(!r||a>=0,"invalid "+t,e.commandStr),Yt(function(t,e){return r&&(t.OFFSET=a),a})}if(t in i){var s=i[t];return Gt(s,function(e,n){var i=e.invoke(n,s);return r&&(e.OFFSET=i,de.optional(function(){e.assert(n,i+">=0","invalid "+t)})),i})}return r&&o?Yt(function(t,e){return t.OFFSET="0",0}):null}var n=t.static,i=t.dynamic,o=function(){if(ji in n){var t=n[ji];Ut(t)?t=a.getElements(a.create(t,!0)):t&&(t=a.getElements(t),de.command(t,"invalid elements",e.commandStr));var r=Yt(function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n,n}return e.ELEMENTS=null,null});return r.value=t,r}if(ji in i){var o=i[ji];return Gt(o,function(t,e){var r=t.shared,n=r.isBufferArgs,i=r.elements,a=t.invoke(e,o),s=e.def("null"),l=e.def(n,"(",a,")"),u=t.cond(l).then(s,"=",i,".createStream(",a,");").else(s,"=",i,".getElements(",a,");");return de.optional(function(){t.assert(u.else,"!"+a+"||"+s,"invalid elements")}),e.entry(u),e.exit(t.cond(l).then(i,".destroyStream(",s,");")),t.ELEMENTS=s,s})}return null}(),s=r(Bi,!0);return{elements:o,primitive:function(){if(Fi in n){var t=n[Fi];return de.commandParameter(t,Be,"invalid primitve",e.commandStr),Yt(function(e,r){return Be[t]})}if(Fi in i){var r=i[Fi];return Gt(r,function(t,e){var n=t.constants.primTypes,i=t.invoke(e,r);return de.optional(function(){t.assert(e,i+" in "+n,"invalid primitive, must be one of "+Object.keys(Be))}),e.def(n,"[",i,"]")})}return o?Ht(o)?Yt(o.value?function(t,e){return e.def(t.ELEMENTS,".primType")}:function(){return Aa}):new qt(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=t.ELEMENTS;return e.def(r,"?",r,".primType:",Aa)}):null}(),count:function(){if(Ni in n){var t=0|n[Ni] +;return de.command("number"==typeof t&&t>=0,"invalid vertex count",e.commandStr),Yt(function(){return t})}if(Ni in i){var r=i[Ni];return Gt(r,function(t,e){var n=t.invoke(e,r);return de.optional(function(){t.assert(e,"typeof "+n+'==="number"&&'+n+">=0&&"+n+"===("+n+"|0)","invalid vertex count")}),n})}if(o){if(Ht(o)){if(o)return s?new qt(s.thisDep,s.contextDep,s.propDep,function(t,e){var r=e.def(t.ELEMENTS,".vertCount-",t.OFFSET);return de.optional(function(){t.assert(e,r+">=0","invalid vertex offset/element buffer too small")}),r}):Yt(function(t,e){return e.def(t.ELEMENTS,".vertCount")});var a=Yt(function(){return-1});return de.optional(function(){a.MISSING=!0}),a}var l=new qt(o.thisDep||s.thisDep,o.contextDep||s.contextDep,o.propDep||s.propDep,function(t,e){var r=t.ELEMENTS;return t.OFFSET?e.def(r,"?",r,".vertCount-",t.OFFSET,":-1"):e.def(r,"?",r,".vertCount:-1")});return de.optional(function(){l.DYNAMIC=!0}),l}return null}(),instances:r(Ui,!1),offset:s}}function k(t,e){var r=t.static,i=t.dynamic,a={};return et.forEach(function(t){function o(e,n){if(t in r){var o=e(r[t]);a[s]=Yt(function(){return o})}else if(t in i){var l=i[t];a[s]=Gt(l,function(t,e){return n(t,e,t.invoke(e,l))})}}var s=m(t);switch(t){case gi:case si:case oi:case Ai:case hi:case Ci:case xi:case wi:case Mi:case pi:return o(function(r){return de.commandType(r,"boolean",t,e.commandStr),r},function(e,r,n){return de.optional(function(){e.assert(r,"typeof "+n+'==="boolean"',"invalid flag "+t,e.commandStr)}),n});case fi:return o(function(r){return de.commandParameter(r,Va,"invalid "+t,e.commandStr),Va[r]},function(e,r,n){var i=e.constants.compareFuncs;return de.optional(function(){e.assert(r,n+" in "+i,"invalid "+t+", must be one of "+Object.keys(Va))}),r.def(i,"[",n,"]")});case di:return o(function(t){return de.command(mt(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]&&t[0]<=t[1],"depth range is 2d array",e.commandStr),t},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===2&&typeof "+r+'[0]==="number"&&typeof '+r+'[1]==="number"&&'+r+"[0]<="+r+"[1]","depth range must be a 2d array")}),[e.def("+",r,"[0]"),e.def("+",r,"[1]")]});case ci:return o(function(t){de.commandType(t,"object","blend.func",e.commandStr);var r="srcRGB"in t?t.srcRGB:t.src,n="srcAlpha"in t?t.srcAlpha:t.src,i="dstRGB"in t?t.dstRGB:t.dst,a="dstAlpha"in t?t.dstAlpha:t.dst;return de.commandParameter(r,Ba,s+".srcRGB",e.commandStr),de.commandParameter(n,Ba,s+".srcAlpha",e.commandStr),de.commandParameter(i,Ba,s+".dstRGB",e.commandStr),de.commandParameter(a,Ba,s+".dstAlpha",e.commandStr),de.command(-1===Ua.indexOf(r+", "+i),"unallowed blending combination (srcRGB, dstRGB) = ("+r+", "+i+")",e.commandStr),[Ba[r],Ba[i],Ba[n],Ba[a]]},function(e,r,n){function i(i,o){var s=r.def('"',i,o,'" in ',n,"?",n,".",i,o,":",n,".",i);return de.optional(function(){e.assert(r,s+" in "+a,"invalid "+t+"."+i+o+", must be one of "+Object.keys(Ba))}),s}var a=e.constants.blendFuncs;de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid blend func, must be an object")});var o=i("src","RGB"),s=i("dst","RGB");de.optional(function(){var t=e.constants.invalidBlendCombinations;e.assert(r,t+".indexOf("+o+'+", "+'+s+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var l=r.def(a,"[",o,"]"),u=r.def(a,"[",i("src","Alpha"),"]");return[l,r.def(a,"[",s,"]"),u,r.def(a,"[",i("dst","Alpha"),"]")]});case ui:return o(function(r){return"string"==typeof r?(de.commandParameter(r,Z,"invalid "+t,e.commandStr),[Z[r],Z[r]]):"object"==typeof r?(de.commandParameter(r.rgb,Z,t+".rgb",e.commandStr),de.commandParameter(r.alpha,Z,t+".alpha",e.commandStr),[Z[r.rgb],Z[r.alpha]]):void de.commandRaise("invalid blend.equation",e.commandStr)},function(e,r,n){var i=e.constants.blendEquations,a=r.def(),o=r.def(),s=e.cond("typeof ",n,'==="string"');return de.optional(function(){function r(t,r,n){e.assert(t,n+" in "+i,"invalid "+r+", must be one of "+Object.keys(Z))}r(s.then,t,n),e.assert(s.else,n+"&&typeof "+n+'==="object"',"invalid "+t),r(s.else,t+".rgb",n+".rgb"),r(s.else,t+".alpha",n+".alpha")}),s.then(a,"=",o,"=",i,"[",n,"];"),s.else(a,"=",i,"[",n,".rgb];",o,"=",i,"[",n,".alpha];"),r(s),[a,o]});case li:return o(function(t){return de.command(mt(t)&&4===t.length,"blend.color must be a 4d array",e.commandStr),J(4,function(e){return+t[e]})},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===4","blend.color must be a 4d array")}),J(4,function(t){return e.def("+",r,"[",t,"]")})});case Ti:return o(function(t){return de.commandType(t,"number",s,e.commandStr),0|t},function(t,e,r){return de.optional(function(){t.assert(e,"typeof "+r+'==="number"',"invalid stencil.mask")}),e.def(r,"|0")});case Si:return o(function(r){de.commandType(r,"object",s,e.commandStr);var n=r.cmp||"keep",i=r.ref||0,a="mask"in r?r.mask:-1;return de.commandParameter(n,Va,t+".cmp",e.commandStr),de.commandType(i,"number",t+".ref",e.commandStr),de.commandType(a,"number",t+".mask",e.commandStr),[Va[n],i,a]},function(t,e,r){var n=t.constants.compareFuncs;return de.optional(function(){function i(){t.assert(e,Array.prototype.join.call(arguments,""),"invalid stencil.func")}i(r+"&&typeof ",r,'==="object"'),i('!("cmp" in ',r,")||(",r,".cmp in ",n,")")}),[e.def('"cmp" in ',r,"?",n,"[",r,".cmp]",":",Ia),e.def(r,".ref|0"),e.def('"mask" in ',r,"?",r,".mask|0:-1")]});case Ei:case Li:return o(function(r){de.commandType(r,"object",s,e.commandStr);var n=r.fail||"keep",i=r.zfail||"keep",a=r.zpass||"keep";return de.commandParameter(n,qa,t+".fail",e.commandStr),de.commandParameter(i,qa,t+".zfail",e.commandStr),de.commandParameter(a,qa,t+".zpass",e.commandStr),[t===Li?Sa:Ta,qa[n],qa[i],qa[a]]},function(e,r,n){function i(i){return de.optional(function(){e.assert(r,'!("'+i+'" in '+n+")||("+n+"."+i+" in "+a+")","invalid "+t+"."+i+", must be one of "+Object.keys(qa))}),r.def('"',i,'" in ',n,"?",a,"[",n,".",i,"]:",Ia)}var a=e.constants.stencilOps;return de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)}),[t===Li?Sa:Ta,i("fail"),i("zfail"),i("zpass")]});case _i:return o(function(t){de.commandType(t,"object",s,e.commandStr);var r=0|t.factor,n=0|t.units;return de.commandType(r,"number",s+".factor",e.commandStr),de.commandType(n,"number",s+".units",e.commandStr),[r,n]},function(e,r,n){return de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)}),[r.def(n,".factor|0"),r.def(n,".units|0")]});case vi:return o(function(t){var r=0;return"front"===t?r=Ta:"back"===t&&(r=Sa),de.command(!!r,s,e.commandStr),r},function(t,e,r){return de.optional(function(){t.assert(e,r+'==="front"||'+r+'==="back"',"invalid cull.face")}),e.def(r,'==="front"?',Ta,":",Sa)});case bi:return o(function(t){return de.command("number"==typeof t&&t>=n.lineWidthDims[0]&&t<=n.lineWidthDims[1],"invalid line width, must positive number between "+n.lineWidthDims[0]+" and "+n.lineWidthDims[1],e.commandStr),t},function(t,e,r){return de.optional(function(){t.assert(e,"typeof "+r+'==="number"&&'+r+">="+n.lineWidthDims[0]+"&&"+r+"<="+n.lineWidthDims[1],"invalid line width")}),r});case yi:return o(function(t){return de.commandParameter(t,Ya,s,e.commandStr),Ya[t]},function(t,e,r){return de.optional(function(){t.assert(e,r+'==="cw"||'+r+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),e.def(r+'==="cw"?'+Ea+":"+La)});case mi:return o(function(t){return de.command(mt(t)&&4===t.length,"color.mask must be length 4 array",e.commandStr),t.map(function(t){return!!t})},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===4","invalid color.mask")}),J(4,function(t){return"!!"+r+"["+t+"]"})});case ki:return o(function(t){de.command("object"==typeof t&&t,s,e.commandStr);var r="value"in t?t.value:1,n=!!t.invert;return de.command("number"==typeof r&&r>=0&&r<=1,"sample.coverage.value must be a number between 0 and 1",e.commandStr),[r,n]},function(t,e,r){return de.optional(function(){t.assert(e,r+"&&typeof "+r+'==="object"',"invalid sample.coverage")}),[e.def('"value" in ',r,"?+",r,".value:1"),e.def("!!",r,".invert")]})}}),a}function A(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach(function(t){var n,a=r[t];if("number"==typeof a||"boolean"==typeof a)n=Yt(function(){return a});else if("function"==typeof a){var o=a._reglType;"texture2d"===o||"textureCube"===o?n=Yt(function(t){return t.link(a)}):"framebuffer"===o||"framebufferCube"===o?(de.command(a.color.length>0,'missing color attachment for framebuffer sent to uniform "'+t+'"',e.commandStr),n=Yt(function(t){return t.link(a.color[0])})):de.commandRaise('invalid data for uniform "'+t+'"',e.commandStr)}else mt(a)?n=Yt(function(e){return e.global.def("[",J(a.length,function(r){return de.command("number"==typeof a[r]||"boolean"==typeof a[r],"invalid uniform "+t,e.commandStr),a[r]}),"]")}):de.commandRaise('invalid or missing data for uniform "'+t+'"',e.commandStr);n.value=a,i[t]=n}),Object.keys(n).forEach(function(t){var e=n[t];i[t]=Gt(e,function(t,r){return t.invoke(r,e)})}),i}function T(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach(function(t){var a=n[t],s=e.id(t),l=new W;if(Ut(a))l.state=$n,l.buffer=i.getBuffer(i.create(a,Zi,!1,!0)),l.type=0;else{var u=i.getBuffer(a);if(u)l.state=$n,l.buffer=u,l.type=0;else if(de.command("object"==typeof a&&a,"invalid data for attribute "+t,r.commandStr),a.constant){var c=a.constant;l.buffer="null",l.state=ti,"number"==typeof c?l.x=c:(de.command(mt(c)&&c.length>0&&c.length<=4,"invalid constant for attribute "+t,r.commandStr),Kn.forEach(function(t,e){e=0,'invalid offset for attribute "'+t+'"',r.commandStr);var f=0|a.stride;de.command(f>=0&&f<256,'invalid stride for attribute "'+t+'", must be integer betweeen [0, 255]',r.commandStr);var d=0|a.size;de.command(!("size"in a)||d>0&&d<=4,'invalid size for attribute "'+t+'", must be 1,2,3,4',r.commandStr);var p=!!a.normalized,m=0;"type"in a&&(de.commandParameter(a.type,ze,"invalid type for attribute "+t,r.commandStr),m=ze[a.type]);var g=0|a.divisor;"divisor"in a&&(de.command(0===g||K,'cannot specify divisor for attribute "'+t+'", instancing not supported',r.commandStr),de.command(g>=0,'invalid divisor for attribute "'+t+'"',r.commandStr)),de.optional(function(){var e=r.commandStr,n=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(a).forEach(function(r){de.command(n.indexOf(r)>=0,'unknown parameter "'+r+'" for attribute pointer "'+t+'" (valid parameters are '+n+")",e)})}),l.buffer=u,l.state=$n,l.size=d,l.normalized=p,l.type=m||u.dtype,l.offset=h,l.stride=f,l.divisor=g}}o[t]=Yt(function(t,e){var r=t.attribCache;if(s in r)return r[s];var n={isStream:!1};return Object.keys(l).forEach(function(t){n[t]=l[t]}),l.buffer&&(n.buffer=t.link(l.buffer),n.type=n.type||n.buffer+".dtype"),r[s]=n,n})}),Object.keys(a).forEach(function(t){function e(e,n){function i(t){n(u[t],"=",a,".",t,"|0;")}var a=e.invoke(n,r),o=e.shared,s=o.isBufferArgs,l=o.buffer;de.optional(function(){e.assert(n,a+"&&(typeof "+a+'==="object"||typeof '+a+'==="function")&&('+s+"("+a+")||"+l+".getBuffer("+a+")||"+l+".getBuffer("+a+".buffer)||"+s+"("+a+'.buffer)||("constant" in '+a+"&&(typeof "+a+'.constant==="number"||'+o.isArrayLike+"("+a+".constant))))",'invalid dynamic attribute "'+t+'"')});var u={isStream:n.def(!1)},c=new W;c.state=$n,Object.keys(c).forEach(function(t){u[t]=n.def(""+c[t])});var h=u.buffer,f=u.type;return n("if(",s,"(",a,")){",u.isStream,"=true;",h,"=",l,".createStream(",Zi,",",a,");",f,"=",h,".dtype;","}else{",h,"=",l,".getBuffer(",a,");","if(",h,"){",f,"=",h,".dtype;",'}else if("constant" in ',a,"){",u.state,"=",ti,";","if(typeof "+a+'.constant === "number"){',u[Kn[0]],"=",a,".constant;",Kn.slice(1).map(function(t){return u[t]}).join("="),"=0;","}else{",Kn.map(function(t,e){return u[t]+"="+a+".constant.length>="+e+"?"+a+".constant["+e+"]:0;"}).join(""),"}}else{","if(",s,"(",a,".buffer)){",h,"=",l,".createStream(",Zi,",",a,".buffer);","}else{",h,"=",l,".getBuffer(",a,".buffer);","}",f,'="type" in ',a,"?",o.glTypes,"[",a,".type]:",h,".dtype;",u.normalized,"=!!",a,".normalized;"),i("size"),i("offset"),i("stride"),i("divisor"),n("}}"),n.exit("if(",u.isStream,"){",l,".destroyStream(",h,");","}"),u}var r=a[t];o[t]=Gt(r,e)}),o}function S(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=Yt(function(t,e){return"number"==typeof r||"boolean"==typeof r?""+r:t.link(r)})}),Object.keys(r).forEach(function(t){var e=r[t];n[t]=Gt(e,function(t,r){return t.invoke(r,e)})}),n}function E(t,e,r,n,i){function a(t){var e=u[t];e&&(h[t]=e)}var o=t.static,s=t.dynamic;de.optional(function(){function t(t){Object.keys(t).forEach(function(t){de.command(e.indexOf(t)>=0,'unknown parameter "'+t+'"',i.commandStr)})}var e=[Pi,Oi,Ri,ji,Fi,Bi,Ni,Ui,Ii].concat(et);t(o),t(s)});var l=x(t,i),u=_(t,l,i),c=M(t,i),h=k(t,i),f=w(t,i);a(Di),a(m(zi));var d=Object.keys(h).length>0,p={framebuffer:l,draw:c,shader:f,state:h,dirty:d};return p.profile=b(t,i),p.uniforms=A(r,i),p.attributes=T(e,i),p.context=S(n,i),p}function L(t,e,r){var n=t.shared,i=n.context,a=t.scope();Object.keys(r).forEach(function(n){e.save(i,"."+n);var o=r[n];a(i,".",n,"=",o.append(t,e),";")}),e(a)}function C(t,e,r,n){var i,a=t.shared,o=a.gl,s=a.framebuffer;Q&&(i=e.def(a.extensions,".webgl_draw_buffers"));var l,u=t.constants,c=u.drawBuffer,h=u.backBuffer;l=r?r.append(t,e):e.def(s,".next"),n||e("if(",l,"!==",s,".cur){"),e("if(",l,"){",o,".bindFramebuffer(",Fa,",",l,".framebuffer);"),Q&&e(i,".drawBuffersWEBGL(",c,"[",l,".colorAttachments.length]);"),e("}else{",o,".bindFramebuffer(",Fa,",null);"),Q&&e(i,".drawBuffersWEBGL(",h,");"),e("}",s,".cur=",l,";"),n||e("}")}function z(t,e,r){var n=t.shared,i=n.gl,a=t.current,o=t.next,s=n.current,l=n.next,u=t.cond(s,".dirty");et.forEach(function(e){var n=m(e);if(!(n in r.state)){var c,h;if(n in o){c=o[n],h=a[n];var f=J($[n].length,function(t){return u.def(c,"[",t,"]")});u(t.cond(f.map(function(t,e){return t+"!=="+h+"["+e+"]"}).join("||")).then(i,".",nt[n],"(",f,");",f.map(function(t,e){return h+"["+e+"]="+t}).join(";"),";"))}else{c=u.def(l,".",n);var d=t.cond(c,"!==",s,".",n);u(d),n in rt?d(t.cond(c).then(i,".enable(",rt[n],");").else(i,".disable(",rt[n],");"),s,".",n,"=",c,";"):d(i,".",nt[n],"(",c,");",s,".",n,"=",c,";")}}}),0===Object.keys(r.state).length&&u(s,".dirty=false;"),e(u)}function D(t,e,r,n){var i=t.shared,a=t.current,o=i.current,s=i.gl;Vt(Object.keys(r)).forEach(function(i){var l=r[i];if(!n||n(l)){var u=l.append(t,e);if(rt[i]){var c=rt[i];Ht(l)?u?e(s,".enable(",c,");"):e(s,".disable(",c,");"):e(t.cond(u).then(s,".enable(",c,");").else(s,".disable(",c,");")),e(o,".",i,"=",u,";")}else if(mt(u)){var h=a[i];e(s,".",nt[i],"(",u,");",u.map(function(t,e){return h+"["+e+"]="+t}).join(";"),";")}else e(s,".",nt[i],"(",u,");",o,".",i,"=",u,";")}})}function I(t,e){K&&(t.instancing=e.def(t.shared.extensions,".angle_instanced_arrays"))}function P(t,e,r,n,i){function a(){return"undefined"==typeof performance?"Date.now()":"performance.now()"}function o(t){u=e.def(),t(u,"=",a(),";"),"string"==typeof i?t(p,".count+=",i,";"):t(p,".count++;"),d&&(n?(c=e.def(),t(c,"=",g,".getNumPendingQueries();")):t(g,".beginQuery(",p,");"))}function s(t){t(p,".cpuTime+=",a(),"-",u,";"),d&&(n?t(g,".pushScopeStats(",c,",",g,".getNumPendingQueries(),",p,");"):t(g,".endQuery();"))}function l(t){var r=e.def(m,".profile");e(m,".profile=",t,";"),e.exit(m,".profile=",r,";")}var u,c,h,f=t.shared,p=t.stats,m=f.current,g=f.timer,v=r.profile;if(v){if(Ht(v))return void(v.enable?(o(e),s(e.exit),l("true")):l("false"));h=v.append(t,e),l(h)}else h=e.def(m,".profile");var y=t.block();o(y),e("if(",h,"){",y,"}");var b=t.block();s(b),e.exit("if(",h,"){",b,"}")}function O(t,e,r,n,i){function a(t){switch(t){case ua:case da:case va:return 2;case ca:case pa:case ya:return 3;case ha:case ma:case ba:return 4;default:return 1}}function o(r,n,i){function a(){e("if(!",c,".buffer){",l,".enableVertexAttribArray(",u,");}");var r,a=i.type;if(r=i.size?e.def(i.size,"||",n):n,e("if(",c,".type!==",a,"||",c,".size!==",r,"||",p.map(function(t){return c+"."+t+"!=="+i[t]}).join("||"),"){",l,".bindBuffer(",Zi,",",f,".buffer);",l,".vertexAttribPointer(",[u,r,a,i.normalized,i.stride,i.offset],");",c,".type=",a,";",c,".size=",r,";",p.map(function(t){return c+"."+t+"="+i[t]+";"}).join(""),"}"),K){var o=i.divisor;e("if(",c,".divisor!==",o,"){",t.instancing,".vertexAttribDivisorANGLE(",[u,o],");",c,".divisor=",o,";}")}}function o(){e("if(",c,".buffer){",l,".disableVertexAttribArray(",u,");","}if(",Kn.map(function(t,e){return c+"."+t+"!=="+d[e]}).join("||"),"){",l,".vertexAttrib4f(",u,",",d,");",Kn.map(function(t,e){return c+"."+t+"="+d[e]+";"}).join(""),"}")}var l=s.gl,u=e.def(r,".location"),c=e.def(s.attributes,"[",u,"]"),h=i.state,f=i.buffer,d=[i.x,i.y,i.z,i.w],p=["buffer","normalized","offset","stride"];h===$n?a():h===ti?o():(e("if(",h,"===",$n,"){"),a(),e("}else{"),o(),e("}"))}var s=t.shared;n.forEach(function(n){var s,l=n.name,u=r.attributes[l];if(u){if(!i(u))return;s=u.append(t,e)}else{if(!i(Ga))return;var c=t.scopeAttrib(l);de.optional(function(){t.assert(e,c+".state","missing attribute "+l)}),s={},Object.keys(new W).forEach(function(t){s[t]=e.def(c,".",t)})}o(t.link(n),a(n.info.type),s)})}function R(t,r,n,i,a){for(var o,s=t.shared,l=s.gl,u=0;u1?J(_,function(t){return c+"["+t+"]"}):c);r(");")}}function j(t,e,r,n){function i(i){var a=c[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(u,".",i)}function a(){function t(){r(g,".drawElementsInstancedANGLE(",[f,p,v,d+"<<(("+v+"-"+Qn+")>>1)",m],");")}function e(){r(g,".drawArraysInstancedANGLE(",[f,d,p,m],");")}h?y?t():(r("if(",h,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(l+".drawElements("+[f,p,v,d+"<<(("+v+"-"+Qn+")>>1)"]+");")}function e(){r(l+".drawArrays("+[f,d,p]+");")}h?y?t():(r("if(",h,"){"),t(),r("}else{"),e(),r("}")):e()}var s=t.shared,l=s.gl,u=s.draw,c=n.draw,h=function(){var i,a=c.elements,o=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(o=r),i=a.append(t,o)):i=o.def(u,".",ji),i&&o("if("+i+")"+l+".bindBuffer("+Ji+","+i+".buffer.buffer);"),i}(),f=i(Fi),d=i(Bi),p=function(){var i,a=c.count,o=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(o=r),i=a.append(t,o),de.optional(function(){a.MISSING&&t.assert(e,"false","missing vertex count"),a.DYNAMIC&&t.assert(o,i+">=0","missing vertex count")})):(i=o.def(u,".",Ni),de.optional(function(){t.assert(o,i+">=0","missing vertex count")})),i}();if("number"==typeof p){if(0===p)return}else r("if(",p,"){"),r.exit("}");var m,g;K&&(m=i(Ui),g=t.instancing);var v=h+".type",y=c.elements&&Ht(c.elements);K&&("number"!=typeof m||m>=0)?"string"==typeof m?(r("if(",m,">0){"),a(),r("}else if(",m,"<0){"),o(),r("}")):a():o()}function F(t,e,r,n,i){var a=y(),o=a.proc("body",i);return de.optional(function(){a.commandStr=e.commandStr,a.command=a.link(e.commandStr)}),K&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),t(a,o,r,n),a.compile().body}function N(t,e,r,n){I(t,e),O(t,e,r,n.attributes,function(){return!0}),R(t,e,r,n.uniforms,function(){return!0}),j(t,e,e,r)}function B(t,e){var r=t.proc("draw",1);I(t,r),L(t,r,e.context),C(t,r,e.framebuffer),z(t,r,e),D(t,r,e.state),P(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,".useProgram(",n,".program);"),e.shader.program)N(t,r,e,e.shader.program);else{var i=t.global.def("{}"),a=r.def(n,".id"),o=r.def(i,"[",a,"]");r(t.cond(o).then(o,".call(this,a0);").else(o,"=",i,"[",a,"]=",t.link(function(r){return F(N,t,e,r,1)}),"(",n,");",o,".call(this,a0);"))}Object.keys(e.state).length>0&&r(t.shared.current,".dirty=true;")}function U(t,e,r,n){function i(){return!0}t.batchId="a1",I(t,e),O(t,e,r,n.attributes,i),R(t,e,r,n.uniforms,i),j(t,e,e,r)}function V(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}I(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var u=t.scope(),c=t.scope();if(e(u.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",c,"}",u.exit),r.needsContext&&L(t,c,r.context),r.needsFramebuffer&&C(t,c,r.framebuffer),D(t,c,r.state,i),r.profile&&i(r.profile)&&P(t,c,r,!1,!0),n)O(t,u,r,n.attributes,a),O(t,c,r,n.attributes,i),R(t,u,r,n.uniforms,a),R(t,c,r,n.uniforms,i),j(t,u,c,r);else{var h=t.global.def("{}"),f=r.shader.progVar.append(t,c),d=c.def(f,".id"),p=c.def(h,"[",d,"]");c(t.shared.gl,".useProgram(",f,".program);","if(!",p,"){",p,"=",h,"[",d,"]=",t.link(function(e){return F(U,t,r,e,2)}),"(",f,");}",p,".call(this,a0[",s,"],",s,");")}}function q(t,e){function r(t){return t.contextDep&&i||t.propDep}var n=t.proc("batch",2);t.batchId="0",I(t,n);var i=!1,a=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(L(t,n,e.context),a=!1);var o=e.framebuffer,s=!1;o?(o.propDep?i=s=!0:o.contextDep&&i&&(s=!0),s||C(t,n,o)):C(t,n,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),z(t,n,e),D(t,n,e.state,function(t){return!r(t)}),e.profile&&r(e.profile)||P(t,n,e,!1,"a1"),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=s;var l=e.shader.progVar;if(l.contextDep&&i||l.propDep)V(t,n,e,null);else{var u=l.append(t,n);if(n(t.shared.gl,".useProgram(",u,".program);"),e.shader.program)V(t,n,e,e.shader.program);else{var c=t.global.def("{}"),h=n.def(u,".id"),f=n.def(c,"[",h,"]");n(t.cond(f).then(f,".call(this,a0,a1);").else(f,"=",c,"[",h,"]=",t.link(function(r){return F(V,t,e,r,2)}),"(",u,");",f,".call(this,a0,a1);"))}}Object.keys(e.state).length>0&&n(t.shared.current,".dirty=true;")}function H(t,r){function n(e){var n=r.shader[e];n&&i.set(a.shader,"."+e,n.append(t,i))}var i=t.proc("scope",3);t.batchId="a2";var a=t.shared,o=a.current;L(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),Vt(Object.keys(r.state)).forEach(function(e){var n=r.state[e],o=n.append(t,i);mt(o)?o.forEach(function(r,n){i.set(t.next[e],"["+n+"]",r)}):i.set(a.next,"."+e,o)}),P(t,i,r,!0,!0),[ji,Bi,Ni,Ui,Fi].forEach(function(e){var n=r.draw[e];n&&i.set(a.draw,"."+e,""+n.append(t,i))}),Object.keys(r.uniforms).forEach(function(n){i.set(a.uniforms,"["+e.id(n)+"]",r.uniforms[n].append(t,i))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new W).forEach(function(t){i.set(a,"."+t,n[t])})}),n(Oi),n(Ri),Object.keys(r.state).length>0&&(i(o,".dirty=true;"),i.exit(o,".dirty=true;")),i("a1(",t.shared.context,",a0,",t.batchId,");")}function Y(t){if("object"==typeof t&&!mt(t)){for(var e=Object.keys(t),r=0;r=0;--t){var r=H[t];r&&r(E,null,0)}v.flush(),k&&k.update()}function r(){!J&&H.length>0&&(J=ve.next(e))}function n(){J&&(ve.cancel(e),J=null)}function i(t){t.preventDefault(),b=!0,n(),Y.forEach(function(t){t()})}function a(t){v.getError(),b=!1,x.restore(),O.restore(),D.restore(),R.restore(),j.restore(),F.restore(),k&&k.restore(),N.procs.refresh(),r(),G.forEach(function(t){t()})}function o(){H.length=0,n(),q&&(q.removeEventListener(eo,i),q.removeEventListener(ro,a)),O.clear(),F.clear(),j.clear(),R.clear(),I.clear(),D.clear(),k&&k.clear(),Z.forEach(function(t){t()})}function s(t){function e(t){var e={},r={};return Object.keys(t).forEach(function(n){var i=t[n];ge.isDynamic(i)?r[n]=ge.unbox(i,n):e[n]=i}),{dynamic:r,static:e}}function r(t){for(;d.length0)return h.call(this,r(0|t),0|t)}else{if(!Array.isArray(t))return c.call(this,t);if(t.length)return h.call(this,t,t.length)}}de(!!t,"invalid args to regl({...})"),de.type(t,"object","invalid args to regl({...})");var i=e(t.context||{}),a=e(t.uniforms||{}),o=e(t.attributes||{}),s=e(function(t){function e(t){if(t in r){var e=r[t];delete r[t],Object.keys(e).forEach(function(n){r[t+"."+n]=e[n]})}}var r=$t({},t);return delete r.uniforms,delete r.attributes,delete r.context,"stencil"in r&&r.stencil.op&&(r.stencil.opBack=r.stencil.opFront=r.stencil.op, +delete r.stencil.op),e("blend"),e("depth"),e("cull"),e("stencil"),e("polygonOffset"),e("scissor"),e("sample"),r}(t)),l={gpuTime:0,cpuTime:0,count:0},u=N.compile(s,o,a,i,l),c=u.draw,h=u.batch,f=u.scope,d=[];return $t(n,{stats:l})}function l(t,e){var r=0;N.procs.poll();var n=e.color;n&&(v.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=Ka),"depth"in e&&(v.clearDepth(+e.depth),r|=Qa),"stencil"in e&&(v.clearStencil(0|e.stencil),r|=$a),de(!!r,"called regl.clear with no buffer specified"),v.clear(r)}function u(t){if(de("object"==typeof t&&t,"regl.clear() takes an object as input"),"framebuffer"in t)if(t.framebuffer&&"framebufferCube"===t.framebuffer_reglType)for(var e=0;e<6;++e)K($t({framebuffer:t.framebuffer.faces[e]},t),l);else K(t,l);else l(null,t)}function c(t){function e(){function e(){var t=Zt(H,e);H[t]=H[H.length-1],H.length-=1,H.length<=0&&n()}var r=Zt(H,t);de(r>=0,"cannot cancel a frame twice"),H[r]=e}return de.type(t,"function","regl.frame() callback must be a function"),H.push(t),r(),{cancel:e}}function h(){var t=V.viewport,e=V.scissor_box;t[0]=t[1]=e[0]=e[1]=0,E.viewportWidth=E.framebufferWidth=E.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,E.viewportHeight=E.framebufferHeight=E.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function f(){E.tick+=1,E.time=p(),h(),N.procs.poll()}function d(){h(),N.procs.refresh(),k&&k.update()}function p(){return(ye()-A)/1e3}function m(t,e){de.type(e,"function","listener callback must be a function");var r;switch(t){case"frame":return c(e);case"lost":r=Y;break;case"restore":r=G;break;case"destroy":r=Z;break;default:de.raise("invalid event, must be one of frame,lost,restore,destroy")}return r.push(e),{cancel:function(){for(var t=0;t=0},read:U,destroy:o,_gl:v,_refresh:d,poll:function(){f(),k&&k.update()},now:p,stats:w});return g.onDone(null,Q),Q}var Kt={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Qt=function(t){return Object.prototype.toString.call(t)in Kt},$t=function(t,e){for(var r=Object.keys(e),n=0;n=2,"invalid renderbuffer shape"),a=0|d[0],o=0|d[1]}else"radius"in f&&(a=o=0|f.radius),"width"in f&&(a=0|f.width),"height"in f&&(o=0|f.height);"format"in f&&(de.parameter(f.format,u,"invalid renderbuffer format"),l=u[f.format])}else"number"==typeof e?(a=0|e,o="number"==typeof n?0|n:a):e?de.raise("invalid arguments to renderbuffer constructor"):a=o=1;if(de(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),a!==h.width||o!==h.height||l!==h.format)return s.width=h.width=a,s.height=h.height=o,h.format=l,t.bindRenderbuffer(xn,h.renderbuffer),t.renderbufferStorage(xn,l,a,o),i.profile&&(h.stats.size=Dt(h.format,h.width,h.height)),s.format=c[h.format],s}function l(e,n){var a=0|e,o=0|n||a;return a===h.width&&o===h.height?s:(de(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),s.width=h.width=a,s.height=h.height=o,t.bindRenderbuffer(xn,h.renderbuffer),t.renderbufferStorage(xn,h.format,a,o),i.profile&&(h.stats.size=Dt(h.format,h.width,h.height)),s)}var h=new a(t.createRenderbuffer());return f[h.id]=h,n.renderbufferCount++,s(e,o),s.resize=l,s._reglType="renderbuffer",s._renderbuffer=h,i.profile&&(s.stats=h.stats),s.destroy=function(){h.decRef()},s}function l(){xe(f).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(xn,e.renderbuffer),t.renderbufferStorage(xn,e.format,e.width,e.height)}),t.bindRenderbuffer(xn,null)}var u={rgba4:_n,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};e.ext_srgb&&(u.srgba=35907),e.ext_color_buffer_half_float&&(u.rgba16f=34842,u.rgb16f=34843),e.webgl_color_buffer_float&&(u.rgba32f=34836);var c=[];Object.keys(u).forEach(function(t){var e=u[t];c[e]=t});var h=0,f={};return a.prototype.decRef=function(){--this.refCount<=0&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:s,clear:function(){xe(f).forEach(o)},restore:l}},kn=36160,An=36161,Tn=3553,Sn=34069,En=36064,Ln=36096,Cn=36128,zn=33306,Dn=36053,In=6402,Pn=[6408],On=[];On[6408]=4;var Rn=[];Rn[5121]=1,Rn[5126]=4,Rn[36193]=2;var jn=33189,Fn=36168,Nn=34041,Bn=[32854,32855,36194,35907,34842,34843,34836],Un={};Un[Dn]="complete",Un[36054]="incomplete attachment",Un[36057]="incomplete dimensions",Un[36055]="incomplete, missing attachment",Un[36061]="unsupported";var Vn=5126,qn=35632,Hn=35633,Yn=35718,Gn=35721,Xn=6408,Wn=5121,Zn=3333,Jn=5126,Kn="xyzw".split(""),Qn=5121,$n=1,ti=2,ei=0,ri=1,ni=2,ii=3,ai=4,oi="dither",si="blend.enable",li="blend.color",ui="blend.equation",ci="blend.func",hi="depth.enable",fi="depth.func",di="depth.range",pi="depth.mask",mi="colorMask",gi="cull.enable",vi="cull.face",yi="frontFace",bi="lineWidth",xi="polygonOffset.enable",_i="polygonOffset.offset",wi="sample.alpha",Mi="sample.enable",ki="sample.coverage",Ai="stencil.enable",Ti="stencil.mask",Si="stencil.func",Ei="stencil.opFront",Li="stencil.opBack",Ci="scissor.enable",zi="scissor.box",Di="viewport",Ii="profile",Pi="framebuffer",Oi="vert",Ri="frag",ji="elements",Fi="primitive",Ni="count",Bi="offset",Ui="instances",Vi=Pi+"Width",qi=Pi+"Height",Hi=Di+"Width",Yi=Di+"Height",Gi="drawingBufferWidth",Xi="drawingBufferHeight",Wi=[ci,ui,Si,Ei,Li,ki,Di,zi,_i],Zi=34962,Ji=34963,Ki=3553,Qi=34067,$i=2884,ta=3042,ea=3024,ra=2960,na=2929,ia=3089,aa=32823,oa=32926,sa=32928,la=5126,ua=35664,ca=35665,ha=35666,fa=5124,da=35667,pa=35668,ma=35669,ga=35670,va=35671,ya=35672,ba=35673,xa=35674,_a=35675,wa=35676,Ma=35678,ka=35680,Aa=4,Ta=1028,Sa=1029,Ea=2304,La=2305,Ca=32775,za=32776,Da=519,Ia=7680,Pa=0,Oa=1,Ra=32774,ja=513,Fa=36160,Na=36064,Ba={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Ua=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],Va={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},qa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ha={frag:35632,vert:35633},Ya={cw:Ea,ccw:La},Ga=new qt(!1,!1,!1,function(){}),Xa=34918,Wa=34919,Za=35007,Ja=function(t,e){function r(){return f.pop()||h.createQueryEXT()}function n(t){f.push(t)}function i(t){var e=r();h.beginQueryEXT(Za,e),d.push(e),u(d.length-1,d.length,t)}function a(){h.endQueryEXT(Za)}function o(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}function s(){return p.pop()||new o}function l(t){p.push(t)}function u(t,e,r){var n=s();n.startQueryIndex=t,n.endQueryIndex=e,n.sum=0,n.stats=r,m.push(n)}function c(){var t,e,r=d.length;if(0!==r){v.length=Math.max(v.length,r+1),g.length=Math.max(g.length,r+1),g[0]=0,v[0]=0;var i=0;for(t=0,e=0;e=r)return a.substr(0,r);for(;r>a.length&&e>1;)1&e&&(a+=t),e>>=1,t+=t;return a+=t,a=a.substr(0,r)}var i,a="";e.exports=n},{}],489:[function(e,r,n){!function(e,i){"function"==typeof t&&t.amd?t(i):"object"==typeof n?r.exports=i():e.resolveUrl=i()}(this,function(){function t(){var t=arguments.length;if(0===t)throw new Error("resolveUrl requires at least one argument; got none.");var e=document.createElement("base");if(e.href=arguments[0],1===t)return e.href;var r=document.getElementsByTagName("head")[0];r.insertBefore(e,r.firstChild);for(var n,i=document.createElement("a"),a=1;a=0;--i){var a=r,o=t[i];r=a+o;var s=r-a,l=o-s;l&&(t[--n]=r,r=l)}for(var u=0,i=n;i>1;return["sum(",o(t.slice(0,e)),",",o(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("");for(var e=[],r=0;r>1;return["sum(",a(t.slice(0,e)),",",a(t.slice(e)),")"].join("")}function o(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return o(e,t)}function s(t){return!0&t?"-":""}function l(t){if(2===t.length)return[["diff(",o(t[0][0],t[1][1]),",",o(t[1][0],t[0][1]),")"].join("")];for(var e=[],r=0;r0&&r.push(","),r.push("[");for(var a=0;a0&&r.push(","),a===n?r.push("+b[",i,"]"):r.push("+A[",i,"][",a,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",e);var s=new Function("det",r.join(""));return s(t<6?o[t]:o)}function i(){return[0]}function a(t,e){return[[e[0]],[t[0][0]]]}var o=t("robust-determinant"),s=6,l=[i,a];!function(){for(;l.length>1;return["sum(",o(t.slice(0,e)),",",o(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],r=0;r0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=3.3306690738754716e-16*n;return o>=s||o<=-s?o:m(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],u=r[1]-n[1],c=t[2]-n[2],h=e[2]-n[2],f=r[2]-n[2],d=a*u,p=o*l,m=o*s,v=i*u,y=i*l,b=a*s,x=c*(d-p)+h*(m-v)+f*(y-b),_=(Math.abs(d)+Math.abs(p))*Math.abs(c)+(Math.abs(m)+Math.abs(v))*Math.abs(h)+(Math.abs(y)+Math.abs(b))*Math.abs(f),w=7.771561172376103e-16*_;return x>w||-x>w?x:g(t,e,r,n)}];!function(){for(;v.length<=p;)v.push(l(v.length));for(var t=[],r=["slow"],n=0;n<=p;++n)t.push("a"+n),r.push("o"+n);for(var i=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"],n=2;n<=p;++n)i.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i0&&s>0||o<0&&s<0)return!1;var l=a(r,t,e),u=a(i,t,e);return!(l>0&&u>0||l<0&&u<0)&&(0!==o||0!==s||0!==l||0!==u||n(t,e,r,i))}e.exports=i;var a=t("robust-orientation")[3]},{"robust-orientation":496}],500:[function(t,e,r){"use strict";function n(t,e){var r=t+e,n=r-t,i=r-n,a=e-n,o=t-i,s=o+a;return s?[s,r]:[r]}function i(t,e){var r=0|t.length,i=0|e.length;if(1===r&&1===i)return n(t[0],-e[0]);var a,o,s=r+i,l=new Array(s),u=0,c=0,h=0,f=Math.abs,d=t[c],p=f(d),m=-e[h],g=f(m);p=i?(a=d,(c+=1)=i?(a=d,(c+=1)0){for(var s=0,l=0,u=0;un.h||t>n.free||rc)&&(h=2*Math.max(t,c)),(ll)&&(u=2*Math.max(r,l)),this.resize(h,u),this.packOne(t,r)}return null},t.prototype.clear=function(){this.shelves=[],this.stats={}},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;rthis.free||e>this.h)return null;var r=this.x;return this.x+=t,this.free-=t,{x:r,y:this.y,w:t,h:e,width:t,height:e}},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t})},{}],503:[function(t,e,r){"use strict";e.exports=function(t){return t<0?-1:t>0?1:0}},{}],504:[function(t,e,r){"use strict";function n(t){return a(i(t))}e.exports=n;var i=t("boundary-cells"),a=t("reduce-simplicial-complex")},{"boundary-cells":61,"reduce-simplicial-complex":486}],505:[function(t,e,r){"use strict";function n(t){for(var e=t.length,r=0,n=0;n>1,v=E[2*m+1];","if(v===b){return m}","if(b1;--n){n0&&l.push(","),l.push("[");for(var n=0;n0&&l.push(","),l.push("B(C,E,c[",i[0],"],c[",i[1],"])")}l.push("]")}l.push(");")}}(i[s]),l.push("break;");l.push("}}")}return l.push("}return R;};return getContour",t,"d"),new Function("pool",l.join(""))(a)}function i(t){var e=s[t];return e||(e=s[t]=n(t)),e}e.exports=i;var a=t("typedarray-pool"),o=t("marching-simplex-table"),s={}},{"marching-simplex-table":434,"typedarray-pool":528}],507:[function(t,e,r){"use strict";"use restrict";function n(t){for(var e=0,r=Math.max,n=0,i=t.length;n>1,s=o(t[a],e);s<=0?(0===s&&(i=a),r=a+1):s>0&&(n=a-1)}return i}function h(t,e){for(var r=new Array(t.length),n=0,i=r.length;n=t.length||0!==o(t[m],a))break}return r}function f(t,e){if(!e)return h(u(p(t,0)),t,0);for(var r=new Array(e),n=0;n>>c&1&&u.push(i[c]);e.push(u)}return l(e)}function p(t,e){if(e<0)return[];for(var r=[],n=(1<>1:(t>>1)-1}function u(t){for(var e=s(t);;){var r=e,n=2*t+1,i=2*(t+1),o=t;if(n0;){var r=l(t);if(r>=0){if(e0){var t=k[0];return a(0,T-1),T-=1,u(0),t}return-1}function f(t,e){var r=k[t];return y[r]===e?t:(y[r]=-1/0,c(t),h(),y[r]=e,T+=1,c(T-1))}function d(t,e){if(t[e]<0)return e;var r=e,n=e;do{var i=t[n];if(!b[n]||i<0||i===n)break;if(n=i,i=t[n],!b[n]||i<0||i===n)break;n=i,r=t[r]}while(r!==n);for(var a=e;a!==n;a=t[a])t[a]=n;return n}for(var p=e.length,m=t.length,g=new Array(p),v=new Array(p),y=new Array(p),b=new Array(p),x=0;x>1;x>=0;--x)u(x);for(;;){var S=h();if(S<0||y[S]>r)break;!function(t){if(!b[t]){b[t]=!0;var e=g[t],r=v[t];g[r]>=0&&(g[r]=e),v[e]>=0&&(v[e]=r),A[e]>=0&&f(A[e],i(e)),A[r]>=0&&f(A[r],i(r))}}(S)}for(var E=[],x=0;x=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&L.push([n,i])}}),o.unique(o.normalize(L)),{positions:E,edges:L}}e.exports=i;var a=t("robust-orientation"),o=t("simplicial-complex")},{"robust-orientation":496,"simplicial-complex":509}],512:[function(t,e,r){"use strict";function n(t,e){var r,n;if(e[0][0]e[1][0])){var i=Math.min(t[0][1],t[1][1]),o=Math.max(t[0][1],t[1][1]),s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]);return ol?i-l:o-l}r=e[1],n=e[0]}var u,c;t[0][1]e[1][0]))return n(e,t);r=e[1],i=e[0]}var o,s;if(t[0][0]t[1][0]))return-n(t,e);o=t[1],s=t[0]}var l=a(r,i,s),u=a(r,i,o);if(l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;if(l=a(s,o,i),u=a(s,o,r),l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;return i[0]-s[0]}e.exports=i;var a=t("robust-orientation")},{"robust-orientation":496}],513:[function(t,e,r){"use strict";function n(t,e,r){this.slabs=t,this.coordinates=e,this.horizontal=r}function i(t,e){return t.y-e}function a(t,e){for(var r=null;t;){var n,i,o=t.key;o[0][0]0)if(e[0]!==o[1][0])r=t,t=t.right;else{var l=a(t.right,e);if(l)return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l=a(t.right,e);if(l)return l;t=t.left}}return r}function o(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function s(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}function l(t){for(var e=t.length,r=2*e,i=new Array(r),a=0;a0){var s=a(this.slabs[e-1],t);s&&(o?f(s.key,o)>0&&(o=s.key,n=s.value):(n=s.value,o=s.key))}var l=this.horizontal[e];if(l.length>0){var c=u.ge(l,t[1],i);if(c=l.length)return n;d=l[c]}}if(d.start)if(o){var p=h(o[0],o[1],[t[0],d.y]);o[0][0]>o[1][0]&&(p=-p),p>0&&(n=d.index)}else n=d.index;else d.y!==t[1]&&(n=d.index)}}}return n}},{"./lib/order-segments":512,"binary-search-bounds":58,"functional-red-black-tree":127,"robust-orientation":496}],514:[function(t,e,r){"use strict";function n(t,e){var r=u(l(t,e),[e[e.length-1]]);return r[r.length-1]}function i(t,e,r,n){var i=n-e,a=-e/i;a<0?a=0:a>1&&(a=1);for(var o=1-a,s=t.length,l=new Array(s),u=0;u0||o>0&&c<0){var h=i(s,c,l,o);r.push(h),a.push(h.slice())}c<0?a.push(l.slice()):c>0?r.push(l.slice()):(r.push(l.slice()),a.push(l.slice())),o=c}return{positive:r,negative:a}}function o(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l0||a>0&&u<0)&&r.push(i(o,u,s,a)),u>=0&&r.push(s.slice()),a=u}return r}function s(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l0||a>0&&u<0)&&r.push(i(o,u,s,a)),u<=0&&r.push(s.slice()),a=u}return r}var l=t("robust-dot-product"),u=t("robust-sum");e.exports=a,e.exports.positive=o,e.exports.negative=s},{"robust-dot-product":493,"robust-sum":501}],515:[function(e,r,n){!function(e){function r(){var t=arguments[0],e=r.cache;return e[t]&&e.hasOwnProperty(t)||(e[t]=r.parse(t)),r.format.call(null,e[t],arguments)}function i(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function a(t,e){return Array(e+1).join(t)}var o={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};r.format=function(t,e){var n,s,l,u,c,h,f,d=1,p=t.length,m="",g=[],v=!0,y="";for(s=0;s=0),u[8]){case"b":n=n.toString(2);break;case"c":n=String.fromCharCode(n);break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,u[6]?parseInt(u[6]):0);break;case"e":n=u[7]?n.toExponential(u[7]):n.toExponential();break;case"f":n=u[7]?parseFloat(n).toFixed(u[7]):parseFloat(n);break;case"g":n=u[7]?parseFloat(n).toPrecision(u[7]):parseFloat(n);break;case"o":n=n.toString(8);break;case"s":n=(n=String(n))&&u[7]?n.substring(0,u[7]):n;break;case"u":n>>>=0;break;case"x":n=n.toString(16);break;case"X":n=n.toString(16).toUpperCase()}o.json.test(u[8])?g[g.length]=n:(!o.number.test(u[8])||v&&!u[3]?y="":(y=v?"+":"-",n=n.toString().replace(o.sign,"")),h=u[4]?"0"===u[4]?"0":u[4].charAt(1):" ",f=u[6]-(y+n).length,c=u[6]&&f>0?a(h,f):"",g[g.length]=u[5]?y+n+c:"0"===h?y+c+n:c+y+n)}return g.join("")},r.cache={},r.parse=function(t){for(var e=t,r=[],n=[],i=0;e;){if(null!==(r=o.text.exec(e)))n[n.length]=r[0];else if(null!==(r=o.modulo.exec(e)))n[n.length]="%";else{if(null===(r=o.placeholder.exec(e)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){i|=1;var a=[],s=r[2],l=[];if(null===(l=o.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a[a.length]=l[1];""!==(s=s.substring(l[0].length));)if(null!==(l=o.key_access.exec(s)))a[a.length]=l[1];else{if(null===(l=o.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a[a.length]=l[1]}r[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n[n.length]=r}e=e.substring(r[0].length)}return n};var s=function(t,e,n){return n=(e||[]).slice(0),n.splice(0,0,t),r.apply(null,n)};void 0!==n?(n.sprintf=r,n.vsprintf=s):(e.sprintf=r,e.vsprintf=s,"function"==typeof t&&t.amd&&t(function(){return{sprintf:r,vsprintf:s}}))}("undefined"==typeof window?this:window)},{}],516:[function(t,e,r){"use strict";function n(t){return new i(t)}function i(t){this.options=d(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function a(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}function o(t,e){var r=t.geometry.coordinates;return{x:u(r[0]),y:c(r[1]),zoom:1/0,id:e,parentId:-1}}function s(t){return{type:"Feature",properties:l(t),geometry:{type:"Point",coordinates:[h(t.x),f(t.y)]}}}function l(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return d(d({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function u(t){return t/360+.5}function c(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function h(t){return 360*(t-.5)}function f(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function d(t,e){for(var r in e)t[r]=e[r];return t}function p(t){return t.x}function m(t){return t.y}var g=t("kdbush");e.exports=n,i.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var r="prepare "+t.length+" points";e&&console.time(r),this.points=t;var n=t.map(o);e&&console.timeEnd(r);for(var i=this.options.maxZoom;i>=this.options.minZoom;i--){var a=+Date.now();this.trees[i+1]=g(n,p,m,this.options.nodeSize,Float32Array),n=this._cluster(n,i),e&&console.log("z%d: %d clusters in %dms",i,n.length,+Date.now()-a)}return this.trees[this.options.minZoom]=g(n,p,m,this.options.nodeSize,Float32Array),e&&console.timeEnd("total time"),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],n=r.range(u(t[0]),c(t[3]),u(t[2]),c(t[1])),i=[],a=0;a c)|0 },"),"generic"===e&&n.push("getters:[0],");for(var a=[],l=[],u=0;u>>7){");for(var u=0;u<1<<(1<128&&u%128==0){h.length>0&&f.push("}}");var d="vExtra"+h.length;n.push("case ",u>>>7,":",d,"(m&0x7f,",l.join(),");break;"),f=["function ",d,"(m,",l.join(),"){switch(m){"],h.push(f)}f.push("case ",127&u,":");for(var p=new Array(r),m=new Array(r),g=new Array(r),v=new Array(r),y=0,b=0;bb)&&!(u&1<<_)!=!(u&1<0&&(A="+"+g[x]+"*c");var T=p[x].length/y*.5,S=.5+v[x]/y*.5;k.push("d"+x+"-"+S+"-"+T+"*("+p[x].join("+")+A+")/("+m[x].join("+")+")")}f.push("a.push([",k.join(),"]);","break;")}n.push("}},"),h.length>0&&f.push("}}");for(var E=[],u=0;u<1<0&&(f+=.02);for(var p=new Float32Array(h),m=0,g=-.5*f,d=0;d=0?1.2:1))}function i(t,e,r,n,i,o,s){for(var l=0;l.5?l/(2-a-o):l/(a+o),a){case t:n=(e-r)/l+(e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}var i,a,o;if(t=S(t,360),e=S(e,100),r=S(r,100),0===e)i=a=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;i=n(l,s,t+1/3),a=n(l,s,t),o=n(l,s,t-1/3)}return{r:255*i,g:255*a,b:255*o}}function l(t,e,r){t=S(t,255),e=S(e,255),r=S(r,255);var n,i,a=H(t,e,r),o=q(t,e,r),s=a,l=a-o;if(i=0===a?0:l/a,a==o)n=0;else{switch(a){case t:n=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+a)%360,o.push(n(i));return o}function A(t,e){e=e||6;for(var r=n(t).toHsv(),i=r.h,a=r.s,o=r.v,s=[],l=1/e;e--;)s.push(n({h:i,s:a,v:o})),o=(o+l)%1;return s}function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function S(t,r){C(t)&&(t="100%");var n=z(t);return t=q(r,H(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function E(t){return q(1,H(0,t))}function L(t){return parseInt(t,16)}function C(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function z(t){return"string"==typeof t&&-1!=t.indexOf("%")}function D(t){return 1==t.length?"0"+t:""+t}function I(t){return t<=1&&(t=100*t+"%"),t}function P(t){return e.round(255*parseFloat(t)).toString(16)}function O(t){return L(t)/255}function R(t){return!!W.CSS_UNIT.exec(t)}function j(t){t=t.replace(N,"").replace(B,"").toLowerCase();var e=!1;if(G[t])t=G[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=W.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=W.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=W.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=W.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=W.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=W.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=W.hex8.exec(t))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),a:O(r[4]),format:e?"name":"hex8"}:(r=W.hex6.exec(t))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),format:e?"name":"hex"}:(r=W.hex4.exec(t))?{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),a:O(r[4]+""+r[4]),format:e?"name":"hex8"}:!!(r=W.hex3.exec(t))&&{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),format:e?"name":"hex"}}function F(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:e,size:r}}var N=/^\s+/,B=/\s+$/,U=0,V=e.round,q=e.min,H=e.max,Y=e.random;n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,n,i,a,o,s=this.toRgb();return t=s.r/255,r=s.g/255,n=s.b/255,i=t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4),a=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),o=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*o},setAlpha:function(t){return this._a=T(t),this._roundA=V(100*this._a)/100,this},toHsv:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=l(this._r,this._g,this._b),e=V(360*t.h),r=V(100*t.s),n=V(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=o(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=o(this._r,this._g,this._b),e=V(360*t.h),r=V(100*t.s),n=V(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return c(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return h(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:V(this._r),g:V(this._g),b:V(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+V(this._r)+", "+V(this._g)+", "+V(this._b)+")":"rgba("+V(this._r)+", "+V(this._g)+", "+V(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:V(100*S(this._r,255))+"%",g:V(100*S(this._g,255))+"%",b:V(100*S(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+V(100*S(this._r,255))+"%, "+V(100*S(this._g,255))+"%, "+V(100*S(this._b,255))+"%)":"rgba("+V(100*S(this._r,255))+"%, "+V(100*S(this._g,255))+"%, "+V(100*S(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(X[c(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+f(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=n(t);r="#"+f(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()), +"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(k,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]="a"===i?t[i]:I(t[i]));t=r}return n(t,e)},n.equals=function(t,e){return!(!t||!e)&&n(t).toRgbString()==n(e).toRgbString()},n.random=function(){return n.fromRatio({r:Y(),g:Y(),b:Y()})},n.mix=function(t,e,r){r=0===r?0:r||50;var i=n(t).toRgb(),a=n(e).toRgb(),o=r/100;return n({r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a})},n.readability=function(t,r){var i=n(t),a=n(r);return(e.max(i.getLuminance(),a.getLuminance())+.05)/(e.min(i.getLuminance(),a.getLuminance())+.05)},n.isReadable=function(t,e,r){var i,a,o=n.readability(t,e);switch(a=!1,i=F(r),i.level+i.size){case"AAsmall":case"AAAlarge":a=o>=4.5;break;case"AAlarge":a=o>=3;break;case"AAAsmall":a=o>=7}return a},n.mostReadable=function(t,e,r){var i,a,o,s,l=null,u=0;r=r||{},a=r.includeFallbackColors,o=r.level,s=r.size;for(var c=0;cu&&(u=i,l=n(e[c]));return n.isReadable(t,l,{level:o,size:s})||!a?l:(r.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],r))};var G=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},X=n.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(G),W=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();void 0!==r&&r.exports?r.exports=n:"function"==typeof t&&t.amd?t(function(){return n}):window.tinycolor=n}(Math)},{}],522:[function(t,e,r){"use strict";function n(t,e){var r=o(getComputedStyle(t).getPropertyValue(e));return r[0]*a(r[1],t)}function i(t,e){var r=document.createElement("div");r.style["font-size"]="128"+t,e.appendChild(r);var i=n(r,"font-size")/128;return e.removeChild(r),i}function a(t,e){switch(e=e||document.body,t=(t||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case"%":return e.clientHeight/100;case"ch":case"ex":return i(t,e);case"em":return n(e,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return s;case"cm":return s/2.54;case"mm":return s/25.4;case"pt":return s/72;case"pc":return s/6}return 1}var o=t("parse-unit");e.exports=a;var s=96},{"parse-unit":463}],523:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.topojson=e.topojson||{})}(this,function(t){"use strict";function e(t,e){var n=e.id,i=e.bbox,a=null==e.properties?{}:e.properties,o=r(t,e);return null==n&&null==i?{type:"Feature",properties:a,geometry:o}:null==i?{type:"Feature",id:n,properties:a,geometry:o}:{type:"Feature",id:n,bbox:i,properties:a,geometry:o}}function r(t,e){function r(t,e){e.length&&e.pop();for(var r=h[t<0?~t:t],n=0,i=r.length;n1)n=i(t,e,r);else for(a=0,n=new Array(o=t.arcs.length);a1)for(var i,a,l=1,u=o(n[0]);lu&&(a=n[0],n[0]=n[l],n[l]=a,u=i);return n})}}var s=function(t){return t},l=function(t){if(null==(e=t.transform))return s;var e,r,n,i=e.scale[0],a=e.scale[1],o=e.translate[0],l=e.translate[1];return function(t,e){return e||(r=n=0),t[0]=(r+=t[0])*i+o,t[1]=(n+=t[1])*a+l,t}},u=function(t){function e(t){s[0]=t[0],s[1]=t[1],o(s),s[0]h&&(h=s[0]),s[1]f&&(f=s[1])}function r(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(r);break;case"Point":e(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(e)}}var n=t.bbox;if(!n){var i,a,o=l(t),s=new Array(2),u=1/0,c=u,h=-u,f=-u;t.arcs.forEach(function(t){for(var e=-1,r=t.length;++eh&&(h=s[0]),s[1]f&&(f=s[1])});for(a in t.objects)r(t.objects[a]);n=t.bbox=[u,c,h,f]}return n},c=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r},h=function(t,r){return"GeometryCollection"===r.type?{type:"FeatureCollection",features:r.geometries.map(function(r){return e(t,r)})}:e(t,r)},f=function(t,e){function r(e){var r,n=t.arcs[e<0?~e:e],i=n[0];return t.transform?(r=[0,0],n.forEach(function(t){r[0]+=t[0],r[1]+=t[1]})):r=n[n.length-1],e<0?[r,i]:[i,r]}function n(t,e){for(var r in t){var n=t[r];delete e[n.start],delete n.start,delete n.end,n.forEach(function(t){i[t<0?~t:t]=1}),s.push(n)}}var i={},a={},o={},s=[],l=-1;return e.forEach(function(r,n){var i,a=t.arcs[r<0?~r:r];a.length<3&&!a[1][0]&&!a[1][1]&&(i=e[++l],e[l]=r,e[n]=i)}),e.forEach(function(t){var e,n,i=r(t),s=i[0],l=i[1];if(e=o[s])if(delete o[e.end],e.push(t),e.end=l,n=a[l]){delete a[n.start];var u=n===e?e:e.concat(n);a[u.start=e.start]=o[u.end=n.end]=u}else a[e.start]=o[e.end]=e;else if(e=a[l])if(delete a[e.start],e.unshift(t),e.start=s,n=o[s]){delete o[n.end];var c=n===e?e:n.concat(e);a[c.start=n.start]=o[c.end=e.end]=c}else a[e.start]=o[e.end]=e;else e=[t],a[e.start=s]=o[e.end=l]=e}),n(o,a),n(a,o),e.forEach(function(t){i[t<0?~t:t]||s.push([t])}),s},d=function(t){return r(t,n.apply(this,arguments))},p=function(t){return r(t,o.apply(this,arguments))},m=function(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error("n must be \u22652");if(t.transform)throw new Error("already quantized");var i,a=u(t),o=a[0],s=(a[2]-o)/(e-1)||1,l=a[1],c=(a[3]-l)/(e-1)||1;t.arcs.forEach(function(t){for(var e,r,n,i=1,a=1,u=t.length,h=t[0],f=h[0]=Math.round((h[0]-o)/s),d=h[1]=Math.round((h[1]-l)/c);iMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,s=0;s<3;++s)a+=t[s]*t[s],o+=i[s]*t[s];for(var s=0;s<3;++s)i[s]-=o/a*t[s];return f(i,i),i}function o(t,e,r,n,i,a,o,s){this.center=l(r),this.up=l(n),this.right=l(i),this.radius=l([a]),this.angle=l([o,s]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var u=0;u<16;++u)this.computedMatrix[u]=.5;this.recalcMatrix(0)}function s(t){t=t||{};var e=t.center||[0,0,0],r=t.up||[0,1,0],i=t.right||a(r),s=t.radius||1,l=t.theta||0,u=t.phi||0;if(e=[].slice.call(e,0,3),r=[].slice.call(r,0,3),f(r,r),i=[].slice.call(i,0,3),f(i,i),"eye"in t){var c=t.eye,p=[c[0]-e[0],c[1]-e[1],c[2]-e[2]];h(i,p,r),n(i[0],i[1],i[2])<1e-6?i=a(r):f(i,i),s=n(p[0],p[1],p[2]);var m=d(r,p)/s,g=d(i,p)/s;u=Math.acos(m),l=Math.acos(g)}return s=Math.log(s),new o(t.zoomMin,t.zoomMax,e,r,i,s,l,u)}e.exports=s;var l=t("filtered-vector"),u=t("gl-mat4/invert"),c=t("gl-mat4/rotate"),h=t("gl-vec3/cross"),f=t("gl-vec3/normalize"),d=t("gl-vec3/dot"),p=o.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,i=0,a=0,o=0;o<3;++o)a+=e[o]*r[o],i+=e[o]*e[o];for(var s=Math.sqrt(i),l=0,o=0;o<3;++o)r[o]-=e[o]*a/i,l+=r[o]*r[o],e[o]/=s;for(var u=Math.sqrt(l),o=0;o<3;++o)r[o]/=u;var c=this.computedToward;h(c,e,r),f(c,c);for(var d=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),v=Math.sin(p),y=Math.cos(m),b=Math.sin(m),x=this.computedCenter,_=g*y,w=v*y,M=b,k=-g*b,A=-v*b,T=y,S=this.computedEye,E=this.computedMatrix,o=0;o<3;++o){var L=_*r[o]+w*c[o]+M*e[o];E[4*o+1]=k*r[o]+A*c[o]+T*e[o],E[4*o+2]=L,E[4*o+3]=0}var C=E[1],z=E[5],D=E[9],I=E[2],P=E[6],O=E[10],R=z*O-D*P,j=D*I-C*O,F=C*P-z*I,N=n(R,j,F);R/=N,j/=N,F/=N,E[0]=R,E[4]=j,E[8]=F;for(var o=0;o<3;++o)S[o]=x[o]+E[2+4*o]*d;for(var o=0;o<3;++o){for(var l=0,B=0;B<3;++B)l+=E[o+4*B]*S[B];E[12+o]=-l}E[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var m=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;m[0]=i[2],m[1]=i[6],m[2]=i[10];for(var a=this.computedUp,o=this.computedRight,s=this.computedToward,l=0;l<3;++l)i[4*l]=a[l],i[4*l+1]=o[l],i[4*l+2]=s[l];c(i,i,n,m);for(var l=0;l<3;++l)a[l]=i[4*l],o[l]=i[4*l+1];this.up.set(t,a[0],a[1],a[2]),this.right.set(t,o[0],o[1],o[2])}},p.pan=function(t,e,r,i){e=e||0,r=r||0,i=i||0,this.recalcMatrix(t);var a=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),a[1]),s=a[5],l=a[9],u=n(o,s,l);o/=u,s/=u,l/=u;var c=a[0],h=a[4],f=a[8],d=c*o+h*s+f*l;c-=o*d,h-=s*d,f-=l*d;var p=n(c,h,f);c/=p,h/=p,f/=p;var m=c*e+o*r,g=h*e+s*r,v=f*e+l*r;this.center.move(t,m,g,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+i),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,a){var o=1;"number"==typeof r&&(o=0|r),(o<0||o>3)&&(o=1);var s=(o+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var l=e[o],c=e[o+4],h=e[o+8];if(a){var f=Math.abs(l),d=Math.abs(c),p=Math.abs(h),m=Math.max(f,d,p);f===m?(l=l<0?-1:1,c=h=0):p===m?(h=h<0?-1:1,l=c=0):(c=c<0?-1:1,l=h=0)}else{var g=n(l,c,h);l/=g,c/=g,h/=g}var v=e[s],y=e[s+4],b=e[s+8],x=v*l+y*c+b*h;v-=l*x,y-=c*x,b-=h*x;var _=n(v,y,b);v/=_,y/=_,b/=_;var w=c*b-h*y,M=h*v-l*b,k=l*y-c*v,A=n(w,M,k);w/=A,M/=A,k/=A,this.center.jump(t,H,Y,G),this.radius.idle(t),this.up.jump(t,l,c,h),this.right.jump(t,v,y,b);var T,S;if(2===o){var E=e[1],L=e[5],C=e[9],z=E*v+L*y+C*b,D=E*w+L*M+C*k;T=R<0?-Math.PI/2:Math.PI/2,S=Math.atan2(D,z)}else{var I=e[2],P=e[6],O=e[10],R=I*l+P*c+O*h,j=I*v+P*y+O*b,F=I*w+P*M+O*k;T=Math.asin(i(R)),S=Math.atan2(F,j)}this.angle.jump(t,S,T),this.recalcMatrix(t);var N=e[2],B=e[6],U=e[10],V=this.computedMatrix;u(V,e);var q=V[15],H=V[12]/q,Y=V[13]/q,G=V[14]/q,X=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*X,Y-B*X,G-U*X)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,a){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter,a=a||this.computedUp;var o=a[0],s=a[1],l=a[2],u=n(o,s,l);if(!(u<1e-6)){o/=u,s/=u,l/=u;var c=e[0]-r[0],h=e[1]-r[1],f=e[2]-r[2],d=n(c,h,f);if(!(d<1e-6)){c/=d,h/=d,f/=d;var p=this.computedRight,m=p[0],g=p[1],v=p[2],y=o*m+s*g+l*v;m-=y*o,g-=y*s,v-=y*l;var b=n(m,g,v);if(!(b<.01&&(m=s*f-l*h,g=l*c-o*f,v=o*h-s*c,(b=n(m,g,v))<1e-6))){m/=b,g/=b,v/=b,this.up.set(t,o,s,l),this.right.set(t,m,g,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(d));var x=s*v-l*g,_=l*m-o*v,w=o*g-s*m,M=n(x,_,w);x/=M,_/=M,w/=M;var k=o*c+s*h+l*f,A=m*c+g*h+v*f,T=x*c+_*h+w*f,S=Math.asin(i(k)),E=Math.atan2(T,A),L=this.angle._state,C=L[L.length-1],z=L[L.length-2];C%=2*Math.PI;var D=Math.abs(C+2*Math.PI-E),I=Math.abs(C-E),P=Math.abs(C-2*Math.PI-E);D0?r.pop():new ArrayBuffer(t)}function s(t){return new Uint8Array(o(t),0,t)}function l(t){return new Uint16Array(o(2*t),0,t)}function u(t){return new Uint32Array(o(4*t),0,t)}function c(t){return new Int8Array(o(t),0,t)}function h(t){return new Int16Array(o(2*t),0,t)}function f(t){return new Int32Array(o(4*t),0,t)}function d(t){return new Float32Array(o(4*t),0,t)}function p(t){return new Float64Array(o(8*t),0,t)}function m(t){return x?new Uint8ClampedArray(o(t),0,t):s(t)}function g(t){return new DataView(o(t),0,t)}function v(t){t=y.nextPow2(t);var e=y.log2(t),r=M[e];return r.length>0?r.pop():new n(t)}var y=t("bit-twiddle"),b=t("dup");e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:b([32,0]),UINT16:b([32,0]),UINT32:b([32,0]),INT8:b([32,0]),INT16:b([32,0]),INT32:b([32,0]),FLOAT:b([32,0]),DOUBLE:b([32,0]),DATA:b([32,0]),UINT8C:b([32,0]),BUFFER:b([32,0])});var x="undefined"!=typeof Uint8ClampedArray,_=e.__TYPEDARRAY_POOL;_.UINT8C||(_.UINT8C=b([32,0])),_.BUFFER||(_.BUFFER=b([32,0]));var w=_.DATA,M=_.BUFFER;r.free=function(t){if(n.isBuffer(t))M[y.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|y.log2(e);w[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=a,r.freeArrayBuffer=i,r.freeBuffer=function(t){M[y.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return o(t);switch(e){case"uint8":return s(t);case"uint16":return l(t);case"uint32":return u(t);case"int8":return c(t);case"int16":return h(t);case"int32":return f(t);case"float":case"float32":return d(t);case"double":case"float64":return p(t);case"uint8_clamped":return m(t);case"buffer":return v(t);case"data":case"dataview":return g(t);default:return null}return null},r.mallocArrayBuffer=o,r.mallocUint8=s,r.mallocUint16=l,r.mallocUint32=u,r.mallocInt8=c,r.mallocInt16=h,r.mallocInt32=f,r.mallocFloat32=r.mallocFloat=d,r.mallocFloat64=r.mallocDouble=p,r.mallocUint8Clamped=m,r.mallocDataView=g,r.mallocBuffer=v,r.clearCache=function(){for(var t=0;t<32;++t)_.UINT8[t].length=0,_.UINT16[t].length=0,_.UINT32[t].length=0,_.INT8[t].length=0,_.INT16[t].length=0,_.INT32[t].length=0,_.FLOAT[t].length=0,_.DOUBLE[t].length=0,_.UINT8C[t].length=0,w[t].length=0,M[t].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":59,buffer:69,dup:117}],529:[function(t,e,r){"use strict";"use restrict";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;en)return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},{}],532:[function(t,e,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,r){if(t&&u.isObject(t)&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}function a(t){return u.isString(t)&&(t=i(t)),t instanceof n?t.format():n.prototype.format.call(t)}function o(t,e){return i(t,!1,!0).resolve(e)}function s(t,e){return t?i(t,!1,!0).resolveObject(e):e}var l=t("punycode"),u=t("./util");r.parse=i,r.resolve=o,r.resolveObject=s,r.format=a,r.Url=n;var c=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),m=["'"].concat(p),g=["%","/","?",";","#"].concat(m),v=["/","?","#"],y={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=t("querystring");n.prototype.parse=function(t,e,r){if(!u.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=-1!==n&&n127?z+="x":z+=C[D];if(!z.match(/^[+a-z0-9A-Z_-]{0,63}$/)){var P=E.slice(0,M),O=E.slice(M+1),R=C.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);R&&(P.push(R[1]),O.unshift(R[2])),O.length&&(o="/"+O.join(".")+o),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=l.toASCII(this.hostname));var j=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+j,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!y[d])for(var M=0,L=m.length;M0)&&r.host.split("@");A&&(r.auth=A.shift(),r.host=r.hostname=A.shift())}return r.search=t.search,r.query=t.query,u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!M.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=M.slice(-1)[0],S=(r.host||t.host||M.length>1)&&("."===T||".."===T)||""===T,E=0,L=M.length;L>=0;L--)T=M[L],"."===T?M.splice(L,1):".."===T?(M.splice(L,1),E++):E&&(M.splice(L,1),E--);if(!_&&!w)for(;E--;E)M.unshift("..");!_||""===M[0]||M[0]&&"/"===M[0].charAt(0)||M.unshift(""),S&&"/"!==M.join("/").substr(-1)&&M.push("");var C=""===M[0]||M[0]&&"/"===M[0].charAt(0);if(k){r.hostname=r.host=C?"":M.length?M.shift():"";var A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");A&&(r.auth=A.shift(),r.host=r.hostname=A.shift())}return _=_||r.host&&M.length,_&&!C&&M.unshift(""),M.length?r.pathname=M.join("/"):(r.pathname=null,r.path=null),u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=h.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":533,punycode:476,querystring:480}],533:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],534:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],535:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],536:[function(t,e,r){(function(e,n){function i(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(e)?n.showHidden=e:e&&r._extend(n,e),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),l(n,t,n.depth)}function a(t,e){var r=i.styles[e];return r?"\x1b["+i.colors[r][0]+"m"+t+"\x1b["+i.colors[r][1]+"m":t}function o(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function l(t,e,n){if(t.customInspect&&e&&T(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return b(i)||(i=l(t,i,n)),i}var a=u(t,e);if(a)return a;var o=Object.keys(e),m=s(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),A(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(e);if(0===o.length){if(T(e)){var g=e.name?": "+e.name:"";return t.stylize("[Function"+g+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(k(e))return t.stylize(Date.prototype.toString.call(e),"date");if(A(e))return c(e)}var v="",y=!1,x=["{","}"];if(p(e)&&(y=!0,x=["[","]"]),T(e)){v=" [Function"+(e.name?": "+e.name:"")+"]"}if(w(e)&&(v=" "+RegExp.prototype.toString.call(e)),k(e)&&(v=" "+Date.prototype.toUTCString.call(e)),A(e)&&(v=" "+c(e)),0===o.length&&(!y||0==e.length))return x[0]+v+x[1];if(n<0)return w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var _;return _=y?h(t,e,n,m,o):o.map(function(r){return f(t,e,n,m,r,y)}),t.seen.pop(),d(_,v,x)}function u(t,e){if(_(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var a=[],o=0,s=e.length;o-1&&(s=a?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),_(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function d(t,e,r){var n=0;return t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function p(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function g(t){return null===t}function v(t){return null==t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function x(t){return"symbol"==typeof t}function _(t){return void 0===t}function w(t){return M(t)&&"[object RegExp]"===E(t)}function M(t){return"object"==typeof t&&null!==t}function k(t){return M(t)&&"[object Date]"===E(t)}function A(t){return M(t)&&("[object Error]"===E(t)||t instanceof Error)}function T(t){return"function"==typeof t}function S(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function E(t){return Object.prototype.toString.call(t)}function L(t){return t<10?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[L(t.getHours()),L(t.getMinutes()),L(t.getSeconds())].join(":");return[t.getDate(),P[t.getMonth()],e].join(" ")}function z(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.format=function(t){if(!b(t)){for(var e=[],r=0;r=a)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),s=n[r];r>3}if(i--,1===n||2===n)a+=t.readSVarint(),o+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new l(a,o));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&s.push(e),s},n.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;t.pos>3}if(n--,1===r||2===r)i+=t.readSVarint(),a+=t.readSVarint(),is&&(s=i),au&&(u=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,u]},n.prototype.toGeoJSON=function(t,e,r){function i(t){for(var e=0;e>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}var o=t("./vectortilefeature.js");e.exports=n,n.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new o(this._pbf,e,this.extent,this._keys,this._values)}},{"./vectortilefeature.js":539}],541:[function(t,e,r){"use strict";function n(t,e){return"object"==typeof e&&null!==e||(e={}),i(t,e.canvas||a,e.context||o,e)}e.exports=n;var i=t("./lib/vtext"),a=null,o=null;"undefined"!=typeof document&&(a=document.createElement("canvas"),a.width=8192,a.height=1024,o=a.getContext("2d"))},{"./lib/vtext":542}],542:[function(t,e,r){"use strict";function n(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l8192)throw new Error("vectorize-text: String too long (sorry, this will get fixed later)");var a=3*n;t.height>31}function l(t){for(var e=[],r=0,n=0,i=t.length,a=0;a=0?l[r]:e)}function e(t){var e=n(t);return e?u in e:s.indexOf(t)>=0}function r(t,e){var r,i=n(t);return i?i[u]=e:(r=s.indexOf(t),r>=0?l[r]=e:(r=s.length,l[r]=e,s[r]=t)),this}function o(t){var e,r,i=n(t);return i?u in i&&delete i[u]:!((e=s.indexOf(t))<0)&&(r=s.length-1,s[e]=void 0,l[e]=l[r],s[e]=s[r],s.length=r,l.length=r,!0)}this instanceof x||a();var s=[],l=[],u=b++;return Object.create(x.prototype,{get___:{value:i(t)},has___:{value:i(e)},set___:{value:i(r)},delete___:{value:i(o)}})};x.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof s?function(){function r(){function e(t,e){return c?u.has(t)?u.get(t):c.get___(t,e):u.get(t,e)}function r(t){return u.has(t)||!!c&&c.has___(t)}function n(t){var e=!!u.delete(t);return c?c.delete___(t)||e:e}this instanceof x||a();var l,u=new s,c=void 0,h=!1;return l=o?function(t,e){return u.set(t,e),u.has(t)||(c||(c=new x),c.set(t,e)),this}:function(t,e){if(h)try{u.set(t,e)}catch(r){c||(c=new x),c.set___(t,e)}else u.set(t,e);return this},Object.create(x.prototype,{get___:{value:i(e)},has___:{value:i(r)},set___:{value:i(l)},delete___:{value:i(n)},permitHostObjects___:{value:i(function(e){if(e!==t)throw new Error("bogus call to permitHostObjects___");h=!0})}})}o&&"undefined"!=typeof Proxy&&(Proxy=void 0),r.prototype=x.prototype,e.exports=r,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=x)}}()},{}],547:[function(t,e,r){function n(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:i(e,t)}}var i=t("./hidden-store.js");e.exports=n},{"./hidden-store.js":548}],548:[function(t,e,r){function n(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}e.exports=n},{}],549:[function(t,e,r){function n(){var t=i();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}var i=t("./create-store.js");e.exports=n},{"./create-store.js":547}],550:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":139}],551:[function(t,e,r){var n=arguments[3],i=arguments[4],a=arguments[5],o=JSON.stringify;e.exports=function(t,e){function r(t){g[t]=!0;for(var e in i[t][1]){var n=i[t][1][e];g[n]||r(n)}}for(var s,l=Object.keys(a),u=0,c=l.length;u=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a=n||{}}var o=p[i.year-p[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=p[a.year-p[0]];var l,u=o>>9&4095,c=o>>5&15,h=31&o,f=new Date(u,c-1,h),m=new Date(i.year,i.month-1,i.day);l=Math.round((m-f)/864e5);var g,v=d[a.year-d[0]];for(g=0;g<13;g++){var y=v&1<<12-g?30:29;if(l>13;return!b||g=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");var s;"object"==typeof n?(s=!1,a=n):(s=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:s}}var l;l=o.day-1;var u,c=d[o.year-d[0]],h=c>>13;u=h?o.month>h?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var f=0;f>9&4095,v=m>>5&15,y=31&m,b=new Date(g,v-1,y+l);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}var o=t("../main"),s=t("object-assign"),l=o.instance();n.prototype=new o.baseCalendar,s(n.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(c);return r?r[0]:""}var n=this._validateYear(t),i=t.month(),a=""+this.toChineseMonth(n,i);return e&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(t){if("string"==typeof t){var e=t.match(h);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=this.toChineseMonth(r,n),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(f);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=this.toChineseMonth(r,n),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"\u95f0"===e[0]&&(r=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var i=e[e.length-1];r="i"===i||"I"===i}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var n=this.intercalaryMonth(t);if(r&&e!==n||e<1||e>12)throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?!r&&e<=n?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(t=t.year(),e=t.month());var r=this.intercalaryMonth(t),n=r?12:11;if(e<0||e>n)throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>13},isIntercalaryMonth:function(t,e){t.year&&(t=t.year(),e=t.month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var n,i=this._validateYear(t,o.local.invalidyear),a=p[i-p[0]],s=a>>9&4095,u=a>>5&15,c=31&a;n=l.newDate(s,u,c),n.add(4-(n.dayOfWeek()||7),"d");var h=this.toJD(t,e,r)-n.toJD();return 1+Math.floor(h/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=d[t-d[0]];if(e>(r>>13?12:11))throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,s,r,o.local.invalidDate);t=this._validateYear(n.year()),e=n.month(),r=n.day();var i=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),u=a(t,s,r,i);return l.toJD(u.year,u.month,u.day)},fromJD:function(t){var e=l.fromJD(t),r=i(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(u),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var i=t.year(),a=t.month(),o=this.isIntercalaryMonth(i,a),s=this.toChineseMonth(i,a),l=Object.getPrototypeOf(n.prototype).add.call(this,t,e,r);if("y"===r){ +var u=l.year(),c=l.month(),h=this.isIntercalaryMonth(u,s),f=o&&h?this.toMonthIndex(u,s,!0):this.toMonthIndex(u,s,!1);f!==c&&l.month(f)}return l}});var u=/^\s*(-?\d\d\d\d|\d\d)[-\/](\d?\d)([iI]?)[-\/](\d?\d)/m,c=/^\d?\d[iI]?/m,h=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?\u6708/m,f=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;o.calendars.chinese=n;var d=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],p=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{"../main":568,"object-assign":459}],555:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Coptic",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()+(e.year()<0?1:0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),t<0&&t++,n.day()+30*(n.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),i.calendars.coptic=n},{"../main":568,"object-assign":459}],556:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,i.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n>=2&&n<=6},extraInfo:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return{century:o[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year()+(n.year()<0?1:0),e=n.month(),(r=n.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};i.calendars.discworld=n},{"../main":568,"object-assign":459}],557:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()+(e.year()<0?1:0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),t<0&&t++,n.day()+30*(n.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),i.calendars.ethiopian=n},{"../main":568,"object-assign":459}],558:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function i(t,e){return t-e*Math.floor(t/e)}var a=t("../main"),o=t("object-assign");n.prototype=new a.baseCalendar,o(n.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return t=t<0?t+1:t,i(7*t+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,a.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,a.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===i(this.daysInYear(t),10)?30:9===e&&3===i(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var i=t<=0?t+1:t,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(var s=1;s=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),a.calendars.hebrew=n},{"../main":568,"object-assign":459}],559:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,i.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),e=n.month(),r=n.day(),t=t<=0?t+1:t,r+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),i.calendars.islamic=n},{"../main":568,"object-assign":459}],560:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()<0?e.year()+1:e.year();return t%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=e+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}}),i.calendars.julian=n},{"../main":568,"object-assign":459}],561:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function i(t,e){return t-e*Math.floor(t/e)}function a(t,e){return i(t-1,e)+1}var o=t("../main"),s=t("object-assign");n.prototype=new o.baseCalendar,s(n.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,o.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if(t=t.split("."),t.length<3)throw"Invalid Mayan year";for(var e=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,o.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate),!0},extraInfo:function(t,e,r){var n=this._validate(t,e,r,o.local.invalidDate),i=n.toJD(),a=this._toHaab(i),s=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[s[0]-1],tzolkinDay:s[0],tzolkinTrecena:s[1]}},_toHaab:function(t){t-=this.jdEpoch;var e=i(t+8+340,365);return[Math.floor(e/20)+1,i(e,20)]},_toTzolkin:function(t){return t-=this.jdEpoch,[a(t+20,20),a(t+4,13)]},toJD:function(t,e,r){var n=this._validate(t,e,r,o.local.invalidDate);return n.day()+20*n.month()+360*n.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),o.calendars.mayan=n},{"../main":568,"object-assign":459}],562:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar;var o=i.instance("gregorian");a(n.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidMonth),t=n.year();t<0&&t++;for(var a=n.day(),s=1;s=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),i.calendars.nanakshahi=n},{"../main":568,"object-assign":459}],563:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,i.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var a=i.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var u=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(t){var e=i.instance(),r=e.fromJD(t),n=r.year(),a=r.dayOfYear(),o=n+56;this._createMissingCalendarData(o);for(var s=9,l=this.NEPALI_CALENDAR_DATA[o][0],u=this.NEPALI_CALENDAR_DATA[o][s]-l+1;a>u;)s++,s>12&&(s=1,o++),u+=this.NEPALI_CALENDAR_DATA[o][s];var c=this.NEPALI_CALENDAR_DATA[o][s]-(u-a);return this.newDate(o,s,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,a.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var o=t-(t>=0?474:473),s=474+i(o,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(o/2820)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=t-this.toJD(475,1,1),r=Math.floor(e/1029983),n=i(e,1029983),a=2820;if(1029982!==n){var o=Math.floor(n/366),s=i(n,366);a=Math.floor((2134*o+2816*s+2815)/1028522)+o+1}var l=a+2820*r+474;l=l<=0?l-1:l;var u=t-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),h=t-this.toJD(l,c,1)+1;return this.newDate(l,c,h)}}),a.calendars.persian=n,a.calendars.jalali=n},{"../main":568,"object-assign":459}],565:[function(t,e,r){function n(t){ +this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign"),o=i.instance();n.prototype=new i.baseCalendar,a(n.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(e.year());return o.leapYear(t)},weekOfYear:function(t,e,r){var n=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(n.year());return o.weekOfYear(t,n.month(),n.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),t=this._t2gYear(n.year());return o.toJD(t,n.month(),n.day())},fromJD:function(t){var e=o.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),i.calendars.taiwan=n},{"../main":568,"object-assign":459}],566:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign"),o=i.instance();n.prototype=new i.baseCalendar,a(n.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(e.year());return o.leapYear(t)},weekOfYear:function(t,e,r){var n=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(n.year());return o.weekOfYear(t,n.month(),n.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),t=this._t2gYear(n.year());return o.toJD(t,n.month(),n.day())},fromJD:function(t){var e=o.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),i.calendars.thai=n},{"../main":568,"object-assign":459}],567:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,i.local.invalidMonth),n=r.toJD()-24e5+.5,a=0,s=0;sn)return o[a]-o[a-1];a++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),a=12*(n.year()-1)+n.month()-15292;return n.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,u=e-o[r-1]+1;return this.newDate(s,l,u)},isValid:function(t,e,r){var n=i.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(t=null!=t.year?t.year:t,n=t>=1276&&t<=1500),n},_validate:function(t,e,r,n){var a=i.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}}),i.calendars.ummalqura=n;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":568,"object-assign":459}],568:[function(t,e,r){function n(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(t,e){return t=""+t,"000000".substring(0,e-t.length)+t}function o(){this.shortYearCutoff="+10"}function s(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}var l=t("object-assign");l(n.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,i){return n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance(),n.newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,function(e){return t[e]})}},substituteChineseDigits:function(t,e){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),l(i.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),l(o.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new i(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+a(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0),i=t.day();"y"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(!function(t){for(;oe-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),i="m"===r?e:t.month(),a="d"===r?e:t.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var u=e.exports=new n;u.cdate=i,u.baseCalendar=o,u.calendars.gregorian=s},{"object-assign":459}],569:[function(t,e,r){ +var n=t("object-assign"),i=t("./main");n(i.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),i.local=i.regionalOptions[""],n(i.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.monthNumbers||this.local.monthNumbers,s=r.monthNamesShort||this.local.monthNamesShort,l=r.monthNames||this.local.monthNames,u=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;g+n1}),c=function(t,e,r,n){var i=""+e;if(u(t,n))for(;i.length1},b=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=e.substring(M).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=s[0].length,parseInt(s[0],10)},x=this,_=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s-1){d=1,p=m;for(var T=this.daysInMonth(f,d);p>T;T=this.daysInMonth(f,d))d++,p-=T}return h>-1?this.fromJD(h):this.newDate(f,d,p)},determineDate:function(t,e,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return e=e?e.newDate():null,t=null==t?e:"string"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}t=t.toLowerCase();for(var e=(t.match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?e:a.today().add(t,"d"):a.newDate(t)}})},{"./main":568,"object-assign":459}],570:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":102}],571:[function(t,e,r){"use strict";function n(t,e){var r=[];return e=+e||0,i(t.hi(t.shape[0]-1),r,e),r}e.exports=n;var i=t("./lib/zc-core")},{"./lib/zc-core":570}],572:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../color"),a=t("../../plots/cartesian/axes"),o=t("../../plots/cartesian/constants"),s=t("./attributes");e.exports=function(t,e,r,l,u){function c(r,i){return n.coerce(t,e,s,r,i)}l=l||{},u=u||{};var h=c("visible",!u.itemIsNotPlainObject),f=c("clicktoshow");if(!h&&!f)return e;c("opacity");var d=c("bgcolor"),p=c("bordercolor"),m=i.opacity(p);c("borderpad");var g=c("borderwidth"),v=c("showarrow");c("text",v?" ":"new text"),c("textangle"),n.coerceFont(c,"font",r.font),c("width"),c("align"),c("height")&&c("valign");for(var y=["x","y"],b=[-10,-30],x={_fullLayout:r},_=0;_<2;_++){var w=y[_],M=a.coerceRef(t,e,x,w,"","paper");if(a.coercePosition(e,x,c,M,w,.5),v){var k="a"+w,A=a.coerceRef(t,e,x,k,"pixel");"pixel"!==A&&A!==M&&(A=e[k]="pixel");var T="pixel"===A?b[_]:.4;a.coercePosition(e,x,c,A,k,T)}c(w+"anchor")}if(n.noneOrAll(t,e,["x","y"]),v&&(c("arrowcolor",m?e.bordercolor:i.defaultLine),c("arrowhead"),c("arrowsize"),c("arrowwidth",2*(m&&g||1)),c("standoff"),n.noneOrAll(t,e,["ax","ay"])),f){var S=c("xclick"),E=c("yclick");e._xclick=void 0===S?e.x:S,e._yclick=void 0===E?e.y:E}var L=c("hovertext");if(L){var C=c("hoverlabel.bgcolor",i.opacity(d)?i.rgb(d):i.defaultLine),z=c("hoverlabel.bordercolor",i.contrast(C));n.coerceFont(c,"hoverlabel.font",{family:o.HOVERFONT,size:o.HOVERFONTSIZE,color:z})}return c("captureevents",!!L),e}},{"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/constants":734,"../color":585,"./attributes":574}],573:[function(t,e,r){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0},{path:"M2,2V-2H-2V2Z",backoff:0}]},{}],574:[function(t,e,r){"use strict";var n=t("./arrow_paths"),i=t("../../plots/font_attributes"),a=t("../../plots/cartesian/constants"),o=t("../../lib/extend").extendFlat;e.exports={_isLinkedToArray:"annotation",visible:{valType:"boolean",dflt:!0},text:{valType:"string"},textangle:{valType:"angle",dflt:0},font:o({},i,{}),width:{valType:"number",min:1,dflt:null},height:{valType:"number",min:1,dflt:null},opacity:{valType:"number",min:0,max:1,dflt:1},align:{valType:"enumerated",values:["left","center","right"],dflt:"center"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)"},borderpad:{valType:"number",min:0,dflt:1},borderwidth:{valType:"number",min:0,dflt:1},showarrow:{valType:"boolean",dflt:!0},arrowcolor:{valType:"color"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1},arrowsize:{valType:"number",min:.3,dflt:1},arrowwidth:{valType:"number",min:.1},standoff:{valType:"number",min:0,dflt:0},ax:{valType:"any"},ay:{valType:"any"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()]},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()]},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()]},x:{valType:"any"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()]},y:{valType:"any"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1},xclick:{valType:"any"},yclick:{valType:"any"},hovertext:{valType:"string"},hoverlabel:{bgcolor:{valType:"color"},bordercolor:{valType:"color"},font:o({},i,{})},captureevents:{valType:"boolean"},_deprecated:{ref:{valType:"string"}}}},{"../../lib/extend":682,"../../plots/cartesian/constants":734,"../../plots/font_attributes":753,"./arrow_paths":573}],575:[function(t,e,r){"use strict";function n(t){var e=t._fullLayout;i.filterVisible(e.annotations).forEach(function(e){var r=a.getFromId(t,e.xref),n=a.getFromId(t,e.yref),i=3*e.arrowsize*e.arrowwidth||0;r&&r.autorange&&(e.axref===e.xref?(a.expand(r,[r.r2c(e.x)],{ppadplus:i,ppadminus:i}),a.expand(r,[r.r2c(e.ax)],{ppadplus:e._xpadplus,ppadminus:e._xpadminus})):a.expand(r,[r.r2c(e.x)],{ppadplus:Math.max(e._xpadplus,i),ppadminus:Math.max(e._xpadminus,i)})),n&&n.autorange&&(e.ayref===e.yref?(a.expand(n,[n.r2c(e.y)],{ppadplus:i,ppadminus:i}),a.expand(n,[n.r2c(e.ay)],{ppadplus:e._ypadplus,ppadminus:e._ypadminus})):a.expand(n,[n.r2c(e.y)],{ppadplus:Math.max(e._ypadplus,i),ppadminus:Math.max(e._ypadminus,i)}))})}var i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./draw").draw;e.exports=function(t){var e=t._fullLayout,r=i.filterVisible(e.annotations);if(r.length&&t._fullData.length){var s={};r.forEach(function(t){s[t.xref]=!0,s[t.yref]=!0});if(a.list(t).filter(function(t){return t.autorange&&s[t._id]}).length)return i.syncOrAsync([o,n],t)}}},{"../../lib":690,"../../plots/cartesian/axes":729,"./draw":579}],576:[function(t,e,r){"use strict";function n(t,e){var r=a(t,e);return r.on.length>0||r.explicitOff.length>0}function i(t,e){var r,n=a(t,e),i=n.on,s=n.off.concat(n.explicitOff),l={};if(i.length||s.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}R.selectAll("tspan.line").attr({y:0,x:0});var n=E.select(".annotation-math-group"),i=!n.empty(),h=d.bBox((i?n:R).node()),p=h.width,b=h.height,C=x.width||p,O=x.height||b,j=Math.round(C+2*z),F=Math.round(O+2*z);x._w=C,x._h=O;var N=!1;if(["x","y"].forEach(function(e){var n,i,a,o,s,h=x[e+"ref"]||e,f=x["a"+e+"ref"],d=c.getFromId(t,h),p=(A+("x"===e?0:-90))*Math.PI/180,m=j*Math.cos(p),g=F*Math.sin(p),v=Math.abs(m)+Math.abs(g),b=x[e+"anchor"],_=k[e];if(d){var w=d.r2fraction(x[e]);if((t._dragging||!d.autorange)&&(w<0||w>1)&&(f===h?((w=d.r2fraction(x["a"+e]))<0||w>1)&&(N=!0):N=!0,N))return;n=d._offset+d.r2p(x[e]),o=.5}else"x"===e?(a=x[e],n=y.l+y.w*a):(a=1-x[e],n=y.t+y.h*a),o=x.showarrow?.5:a;if(x.showarrow){_.head=n;var M=x["a"+e];s=m*r(.5,x.xanchor)-g*r(.5,x.yanchor),f===h?(_.tail=d._offset+d.r2p(M),i=s):(_.tail=n+M,i=s+M),_.text=_.tail+s;var T=l["x"===e?"width":"height"];if("paper"===h&&(_.head=u.constrain(_.head,1,T-1)),"pixel"===f){var S=-Math.max(_.tail-3,_.text),E=Math.min(_.tail+3,_.text)-T;S>0?(_.tail+=S,_.text+=S):E>0&&(_.tail-=E,_.text-=E)}}else s=v*r(o,b),i=s,_.text=n+s;x["_"+e+"padplus"]=v/2+i,x["_"+e+"padminus"]=v/2-i,x["_"+e+"size"]=v,x["_"+e+"shift"]=s}),N)return void E.remove();var B=0,U=0;if("left"!==x.align&&(B=(C-p)*("center"===x.align?.5:1)),"top"!==x.valign&&(U=(O-b)*("middle"===x.valign?.5:1)),i)n.select("svg").attr({x:z+B-1,y:z+U}).call(d.setClipUrl,I?_:null);else{var V=z+U-h.top,q=z+B-h.left;R.attr({x:q,y:V}).call(d.setClipUrl,I?_:null),R.selectAll("tspan.line").attr({y:V,x:q})}P.select("rect").call(d.setRect,z,z,C,O),D.call(d.setRect,L/2,L/2,j-L,F-L),E.call(d.setTranslate,Math.round(k.x.text-j/2),Math.round(k.y.text-F/2)),S.attr({transform:"rotate("+A+","+k.x.text+","+k.y.text+")"});var H="annotations["+e+"]",Y=function(r,n){o.select(t).selectAll('.annotation-arrow-g[data-index="'+e+'"]').remove();var i=k.x.head,l=k.y.head,c=k.x.tail+r,h=k.y.tail+n,p=k.x.text+r,m=k.y.text+n,b=u.rotationXYMatrix(A,p,m),_=u.apply2DTransform(b),L=u.apply2DTransform2(b),C=+D.attr("width"),z=+D.attr("height"),I=p-.5*C,P=I+C,O=m-.5*z,R=O+z,j=[[I,O,I,R],[I,R,P,R],[P,R,P,O],[P,O,I,O]].map(L);if(!j.reduce(function(t,e){return t^!!a(i,l,i+1e6,l+1e6,e[0],e[1],e[2],e[3])},!1)){j.forEach(function(t){var e=a(c,h,i,l,t[0],t[1],t[2],t[3]);e&&(c=e.x,h=e.y)});var F=x.arrowwidth,N=x.arrowcolor,B=T.append("g").style({opacity:f.opacity(N)}).classed("annotation-arrow-g",!0).attr("data-index",String(e)),U=B.append("path").attr("d","M"+c+","+h+"L"+i+","+l).style("stroke-width",F+"px").call(f.stroke,f.rgb(N));if(v(U,x.arrowhead,"end",x.arrowsize,x.standoff),t._context.editable&&U.node().parentNode){var V=i,q=l;if(x.standoff){var Y=Math.sqrt(Math.pow(i-c,2)+Math.pow(l-h,2));V+=x.standoff*(c-i)/Y,q+=x.standoff*(h-l)/Y}var G,X,W,Z=B.append("path").classed("annotation",!0).classed("anndrag",!0).attr({"data-index":String(e),d:"M3,3H-3V-3H3ZM0,0L"+(c-V)+","+(h-q),transform:"translate("+V+","+q+")"}).style("stroke-width",F+6+"px").call(f.stroke,"rgba(0,0,0,0)").call(f.fill,"rgba(0,0,0,0)");g.init({element:Z.node(),prepFn:function(){var t=d.getTranslate(E);X=t.x,W=t.y,G={},w&&w.autorange&&(G[w._name+".autorange"]=!0),M&&M.autorange&&(G[M._name+".autorange"]=!0)},moveFn:function(t,e){var r=_(X,W),n=r[0]+t,a=r[1]+e;E.call(d.setTranslate,n,a),G[H+".x"]=w?w.p2r(w.r2p(x.x)+t):(i+t-y.l)/y.w,G[H+".y"]=M?M.p2r(M.r2p(x.y)+e):1-(l+e-y.t)/y.h,x.axref===x.xref&&(G[H+".ax"]=w?w.p2r(w.r2p(x.ax)+t):(i+t-y.l)/y.w),x.ayref===x.yref&&(G[H+".ay"]=M?M.p2r(M.r2p(x.ay)+e):1-(l+e-y.t)/y.h),B.attr("transform","translate("+t+","+e+")"),S.attr({transform:"rotate("+A+","+n+","+a+")"})},doneFn:function(e){if(e){s.relayout(t,G);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}};if(x.showarrow&&Y(0,0),t._context.editable){var G,X;g.init({element:E.node(),prepFn:function(){X=S.attr("transform"),G={}},moveFn:function(t,e){var r="pointer";if(x.showarrow)x.axref===x.xref?G[H+".ax"]=w.p2r(w.r2p(x.ax)+t):G[H+".ax"]=x.ax+t,x.ayref===x.yref?G[H+".ay"]=M.p2r(M.r2p(x.ay)+e):G[H+".ay"]=x.ay+e,Y(t,e);else{if(w)G[H+".x"]=x.x+t/w._m;else{var n=x._xsize/y.w,i=x.x+x._xshift/y.w-n/2;G[H+".x"]=g.align(i+t/y.w,n,0,1,x.xanchor)}if(M)G[H+".y"]=x.y+e/M._m;else{var a=x._ysize/y.h,o=x.y-x._yshift/y.h-a/2;G[H+".y"]=g.align(o-e/y.h,a,0,1,x.yanchor)}w&&M||(r=g.getCursor(w?.5:G[H+".x"],M?.5:G[H+".y"],x.xanchor,x.yanchor))}S.attr({transform:"translate("+t+","+e+")"+X}),m(E,r)},doneFn:function(e){if(m(E),e){s.relayout(t,G);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}var i=t.layout,l=t._fullLayout,y=t._fullLayout._size;l._infolayer.selectAll('.annotation[data-index="'+e+'"]').remove();var b=(i.annotations||[])[e],x=l.annotations[e],_="clip"+l._uid+"_ann"+e;if(!b||!1===x.visible)return void o.selectAll("#"+_).remove();var w=c.getFromId(t,x.xref),M=c.getFromId(t,x.yref),k={x:{},y:{}},A=+x.textangle||0,T=l._infolayer.append("g").classed("annotation",!0).attr("data-index",String(e)).style("opacity",x.opacity),S=T.append("g").classed("annotation-text-g",!0).attr("data-index",String(e)),E=S.append("g").style("pointer-events",x.captureevents?"all":null).call(m,"default").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",{index:e,annotation:b,fullAnnotation:x})});x.hovertext&&E.on("mouseover",function(){var e=x.hoverlabel,r=e.font,n=this.getBoundingClientRect(),i=t.getBoundingClientRect();h.loneHover({x0:n.left-i.left,x1:n.right-i.left,y:(n.top+n.bottom)/2-i.top,text:x.hovertext,color:e.bgcolor,borderColor:e.bordercolor,fontFamily:r.family,fontSize:r.size,fontColor:r.color},{container:l._hoverlayer.node(),outerContainer:l._paper.node()})}).on("mouseout",function(){h.loneUnhover(l._hoverlayer.node())});var L=x.borderwidth,C=x.borderpad,z=L+C,D=E.append("rect").attr("class","bg").style("stroke-width",L+"px").call(f.stroke,x.bordercolor).call(f.fill,x.bgcolor),I=x.width||x.height,P=l._defs.select(".clips").selectAll("#"+_).data(I?[0]:[]);P.enter().append("clipPath").classed("annclip",!0).attr("id",_).append("rect"),P.exit().remove();var O=x.font,R=E.append("text").classed("annotation",!0).attr("data-unformatted",x.text).text(x.text);t._context.editable?R.call(p.makeEditable,E).call(r).on("edit",function(n){x.text=n,this.attr({"data-unformatted":x.text}),this.call(r);var i={};i["annotations["+e+"].text"]=x.text,w&&w.autorange&&(i[w._name+".autorange"]=!0),M&&M.autorange&&(i[M._name+".autorange"]=!0),s.relayout(t,i)}):R.call(r)}function a(t,e,r,n,i,a,o,s){var l=r-t,u=i-t,c=o-i,h=n-e,f=a-e,d=s-a,p=l*d-c*h;if(0===p)return null;var m=(u*d-c*f)/p,g=(u*h-l*f)/p;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+h*m}}var o=t("d3"),s=t("../../plotly"),l=t("../../plots/plots"),u=t("../../lib"),c=t("../../plots/cartesian/axes"),h=t("../../plots/cartesian/graph_interact"),f=t("../color"),d=t("../drawing"),p=t("../../lib/svg_text_utils"),m=t("../../lib/setcursor"),g=t("../dragelement"),v=t("./draw_arrow_head");e.exports={draw:n,drawOne:i}},{"../../lib":690,"../../lib/setcursor":705,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"../../plots/plots":792,"../color":585,"../dragelement":606,"../drawing":608,"./draw_arrow_head":580,d3:114}],580:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("../color"),o=t("../drawing"),s=t("./arrow_paths");e.exports=function(t,e,r,l,u){function c(){t.style("stroke-dasharray","0px,100px")}function h(r,i){d.path&&(e>5&&(i=0),n.select(f.parentElement).append("path").attr({class:t.attr("class"),d:d.path,transform:"translate("+r.x+","+r.y+")rotate("+180*i/Math.PI+")scale("+y+")"}).style({fill:b,opacity:x,"stroke-width":0}))}i(l)||(l=1);var f=t.node(),d=s[e||0];"string"==typeof r&&r||(r="end");var p,m,g,v,y=(o.getPx(t,"stroke-width")||1)*l,b=t.style("stroke")||a.defaultLine,x=t.style("stroke-opacity")||1,_=r.indexOf("start")>=0,w=r.indexOf("end")>=0,M=d.backoff*y+u;if("line"===f.nodeName){p={x:+t.attr("x1"),y:+t.attr("y1")},m={x:+t.attr("x2"),y:+t.attr("y2")};var k=p.x-m.x,A=p.y-m.y;if(g=Math.atan2(A,k),v=g+Math.PI,M){if(M*M>k*k+A*A)return void c();var T=M*Math.cos(g),S=M*Math.sin(g);_&&(p.x-=T,p.y-=S,t.attr({x1:p.x,y1:p.y})),w&&(m.x+=T,m.y+=S,t.attr({x2:m.x,y2:m.y}))}}else if("path"===f.nodeName){var E=f.getTotalLength(),L="";if(E=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}var i=t("tinycolor2"),a=t("fast-isnumeric"),o=e.exports={},s=t("./attributes");o.defaults=s.defaults;var l=o.defaultLine=s.defaultLine;o.lightLine=s.lightLine;var u=o.background=s.background;o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(i(t))},o.opacity=function(t){return t?i(t).getAlpha():0},o.addOpacity=function(t,e){var r=i(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=i(t).toRgb();if(1===r.a)return i(t).toRgbString();var n=i(e||u).toRgb(),a=1===n.a?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return i(o).toRgbString()},o.contrast=function(t,e,r){var n=i(t);return 1!==n.getAlpha()&&(n=i(o.combine(t,u))),(n.isDark()?e?n.lighten(e):u:r?n.darken(r):l).toString()},o.stroke=function(t,e){var r=i(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=i(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,i,a,s=Object.keys(t);for(e=0;es&&(a[1]-=(st-s)/2):r.node()&&!r.classed("js-placeholder")&&(st=d.bBox(e.node()).height),st){if(st+=5,"top"===_.titleside)$.domain[1]-=st/T.h,a[1]*=-1;else{$.domain[0]+=st/T.h;var u=Math.max(1,r.selectAll("tspan.line").size());a[1]+=(1-u)*s}e.attr("transform","translate("+a+")"),$.setScale()}}at.selectAll(".cbfills,.cblines,.cbaxis").attr("transform","translate(0,"+Math.round(T.h*(1-$.domain[1]))+")");var h=at.select(".cbfills").selectAll("rect.cbfill").data(C);h.enter().append("rect").classed("cbfill",!0).style("stroke","none"),h.exit().remove(),h.each(function(t,e){var r=[0===e?E[0]:(C[e]+C[e-1])/2,e===C.length-1?E[1]:(C[e]+C[e+1])/2].map($.c2p).map(Math.round);e!==C.length-1&&(r[1]+=r[1]>r[0]?1:-1);var a=D(t).replace("e-",""),o=i(a).toHexString();n.select(this).attr({x:X,width:Math.max(B,2),y:n.min(r),height:Math.max(n.max(r)-n.min(r),2),fill:o})});var f=at.select(".cblines").selectAll("path.cbline").data(_.line.color&&_.line.width?L:[]);return f.enter().append("path").classed("cbline",!0),f.exit().remove(),f.each(function(t){n.select(this).attr("d","M"+X+","+(Math.round($.c2p(t))+_.line.width/2%1)+"h"+B).call(d.lineGroupStyle,_.line.width,z(t),_.line.dash)}),$._axislayer.selectAll("g."+$._id+"tick,path").remove(),$._pos=X+B+(_.outlinewidth||0)/2-("outside"===_.ticks?1:0),$.side="right",c.syncOrAsync([function(){return l.doTicks(t,$,!0)},function(){if(-1===["top","bottom"].indexOf(_.titleside)){var e=$.titlefont.size,r=$._offset+$._length/2,i=T.l+($.position||0)*T.w+("right"===$.side?10+e*($.showticklabels?1:.5):-10-e*($.showticklabels?.5:0));M("h"+$._id+"title",{avoid:{selection:n.select(t).selectAll("g."+$._id+"tick"),side:_.titleside,offsetLeft:T.l,offsetTop:T.t,maxShift:A.width},attributes:{x:i,y:r,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}}])}function M(e,r){var n,i=x();n=s.traceIs(i,"markerColorscale")?"marker.colorbar.title":"colorbar.title";var a={propContainer:$,propName:n,traceIndex:i.index,dfltName:"colorscale",containerGroup:at.select(".cbtitle")},o="h"===e.charAt(0)?e.substr(1):"h"+e;at.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(t,e,h(a,r||{}))}function k(){var r=B+_.outlinewidth/2+d.bBox($._axislayer.node()).width;if(j=ot.select("text"),j.node()&&!j.classed("js-placeholder")){var n,i=ot.select(".h"+$._id+"title-math-group").node();n=i&&-1!==["top","bottom"].indexOf(_.titleside)?d.bBox(i).width:d.bBox(ot.node()).right-X-T.l,r=Math.max(r,n)}var a=2*_.xpad+r+_.borderwidth+_.outlinewidth/2,s=J-K;at.select(".cbbg").attr({x:X-_.xpad-(_.borderwidth+_.outlinewidth)/2,y:K-Y,width:Math.max(a,2),height:Math.max(s+2*Y,2)}).call(p.fill,_.bgcolor).call(p.stroke,_.bordercolor).style({"stroke-width":_.borderwidth}),at.selectAll(".cboutline").attr({x:X,y:K+_.ypad+("top"===_.titleside?st:0),width:Math.max(B,2),height:Math.max(s-2*_.ypad-st,2)}).call(p.stroke,_.outlinecolor).style({fill:"None","stroke-width":_.outlinewidth});var l=({center:.5,right:1}[_.xanchor]||0)*a;at.attr("transform","translate("+(T.l-l)+","+T.t+")"),o.autoMargin(t,e,{x:_.x,y:_.y,l:a*({right:1,center:.5}[_.xanchor]||0),r:a*({left:1,center:.5}[_.xanchor]||0),t:s*({bottom:1,middle:.5}[_.yanchor]||0),b:s*({top:1,middle:.5}[_.yanchor]||0)})}var A=t._fullLayout,T=A._size;if("function"!=typeof _.fillcolor&&"function"!=typeof _.line.color)return void A._infolayer.selectAll("g."+e).remove();var S,E=n.extent(("function"==typeof _.fillcolor?_.fillcolor:_.line.color).domain()),L=[],C=[],z="function"==typeof _.line.color?_.line.color:function(){return _.line.color},D="function"==typeof _.fillcolor?_.fillcolor:function(){return _.fillcolor},I=_.levels.end+_.levels.size/100,P=_.levels.size,O=1.001*E[0]-.001*E[1],R=1.001*E[1]-.001*E[0];for(S=_.levels.start;(S-I)*P<0;S+=P)S>O&&SE[0]&&S1){var it=Math.pow(10,Math.floor(Math.log(nt)/Math.LN10));et*=it*c.roundUp(nt/it,[2,5,10]),(Math.abs(_.levels.start)/_.levels.size+1e-6)%1<2e-6&&($.tick0=0)}$.dtick=et}$.domain=[Z+G,Z+q-G],$.setScale();var at=A._infolayer.selectAll("g."+e).data([0]);at.enter().append("g").classed(e,!0).each(function(){var t=n.select(this);t.append("rect").classed("cbbg",!0),t.append("g").classed("cbfills",!0),t.append("g").classed("cblines",!0),t.append("g").classed("cbaxis",!0).classed("crisp",!0),t.append("g").classed("cbtitleunshift",!0).append("g").classed("cbtitle",!0),t.append("rect").classed("cboutline",!0),t.select(".cbtitle").datum(0)}),at.attr("transform","translate("+Math.round(T.l)+","+Math.round(T.t)+")");var ot=at.select(".cbtitleunshift").attr("transform","translate(-"+Math.round(T.l)+",-"+Math.round(T.t)+")");$._axislayer=at.select(".cbaxis");var st=0;if(-1!==["top","bottom"].indexOf(_.titleside)){var lt,ut=T.l+(_.x+H)*T.w,ct=$.titlefont.size;lt="top"===_.titleside?(1-(Z+q-G))*T.h+T.t+3+.75*ct:(1-(Z+G))*T.h+T.t-3-.25*ct,M($._id+"title",{attributes:{x:ut,y:lt,"text-anchor":"start"}})}var ht=c.syncOrAsync([o.previousPromises,w,o.previousPromises,k],t);if(ht&&ht.then&&(t._promises||[]).push(ht),t._context.editable){var ft,dt,pt;u.init({element:at.node(),prepFn:function(){ft=at.attr("transform"),f(at)},moveFn:function(t,e){at.attr("transform",ft+" translate("+t+","+e+")"),dt=u.align(W+t/T.w,U,0,1,_.xanchor),pt=u.align(Z-e/T.h,q,0,1,_.yanchor);var r=u.getCursor(dt,pt,_.xanchor,_.yanchor);f(at,r)},doneFn:function(e){f(at),e&&void 0!==dt&&void 0!==pt&&a.restyle(t,{"colorbar.x":dt,"colorbar.y":pt},x().index)}})}return ht}function x(){var r,n,i=e.substr(2);for(r=0;r=0?i.Reds:i.Blues,l.colorscale=m,s.reversescale&&(m=a(m)),s.colorscale=m)}},{"../../lib":690,"./flip_scale":596,"./scales":603}],592:[function(t,e,r){"use strict";var n=t("./attributes"),i=t("../../lib/extend").extendDeep;t("./scales.js");e.exports=function(t){return{color:{valType:"color",arrayOk:!0},colorscale:i({},n.colorscale,{}),cauto:i({},n.zauto,{}),cmax:i({},n.zmax,{}),cmin:i({},n.zmin,{}),autocolorscale:i({},n.autocolorscale,{}),reversescale:i({},n.reversescale,{})}}},{"../../lib/extend":682,"./attributes":590,"./scales.js":603}],593:[function(t,e,r){"use strict";var n=t("./scales");e.exports=n.RdBu},{"./scales":603}],594:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../colorbar/has_colorbar"),o=t("../colorbar/defaults"),s=t("./is_valid_scale"),l=t("./flip_scale");e.exports=function(t,e,r,u,c){var h=c.prefix,f=c.cLetter,d=h.slice(0,h.length-1),p=h?i.nestedProperty(t,d).get()||{}:t,m=h?i.nestedProperty(e,d).get()||{}:e,g=p[f+"min"],v=p[f+"max"],y=p.colorscale;u(h+f+"auto",!(n(g)&&n(v)&&g=0;i--,a++)e=t[i],n[a]=[1-e[0],e[1]];return n}},{}],597:[function(t,e,r){"use strict";var n=t("./scales"),i=t("./default_scale"),a=t("./is_valid_scale_array");e.exports=function(t,e){function r(){try{t=n[t]||JSON.parse(t)}catch(r){t=e}}return e||(e=i),t?("string"==typeof t&&(r(),"string"==typeof t&&r()),a(t)?t:e):e}},{"./default_scale":593,"./is_valid_scale_array":601,"./scales":603}],598:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("./is_valid_scale");e.exports=function(t,e){var r=e?i.nestedProperty(t,e).get()||{}:t,o=r.color,s=!1;if(Array.isArray(o))for(var l=0;l4/3-s?o:s}},{}],605:[function(t,e,r){"use strict";var n=t("../../lib"),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},{"../../lib":690}],606:[function(t,e,r){"use strict";function n(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function i(t){t._dragging=!1,t._replotPending&&a.plot(t)}var a=t("../../plotly"),o=t("../../lib"),s=t("../../plots/cartesian/constants"),l=t("../../constants/interactions"),u=e.exports={};u.align=t("./align"),u.getCursor=t("./cursor");var c=t("./unhover");u.unhover=c.wrapped,u.unhoverRaw=c.raw,u.init=function(t){function e(e){return t.element.onmousemove=m,g._dragged=!1,g._dragging=!0,c=e.clientX,h=e.clientY,p=e.target,f=(new Date).getTime(),f-g._mouseDownTimey&&(v=Math.max(v-1,1)),t.doneFn&&t.doneFn(g._dragged,v,e),!g._dragged){var r;try{r=new MouseEvent("click",e)}catch(t){r=document.createEvent("MouseEvents"),r.initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}p.dispatchEvent(r)}return i(g),g._dragged=!1,o.pauseEvent(e)}var c,h,f,d,p,m,g=o.getPlotDiv(t.element)||{},v=1,y=l.DBLCLICKDELAY;g._mouseDownTime||(g._mouseDownTime=0),m=t.element.onmousemove,t.setCursor&&(t.element.onmousemove=t.setCursor),t.element.onmousedown=e,t.element.style.pointerEvents="all"},u.coverSlip=n},{"../../constants/interactions":671,"../../lib":690,"../../plotly":724,"../../plots/cartesian/constants":734,"./align":604,"./cursor":605,"./unhover":607}],607:[function(t,e,r){"use strict";var n=t("../../lib/events"),i=e.exports={};i.wrapped=function(t,e,r){"string"==typeof t&&(t=document.getElementById(t)),t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),i.raw(t,e,r)},i.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},{"../../lib/events":681}],608:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){if(s.traceIs(r,"symbols")){var u=p(r);e.attr("d",function(t){var e;e="various"===t.ms||"various"===a.size?3:d.isBubble(r)?u(t.ms):(a.size||6)/2,t.mrc=e;var n=m.symbolNumber(t.mx||a.symbol)||0,i=n%100;return t.om=n%200>=100,m.symbolFuncs[i](e)+(n>=200?y:"")}).style("opacity",function(t){return(t.mo+1||a.opacity+1)-1})}var c,h,f;t.so?(f=o.outlierwidth,h=o.outliercolor,c=a.outliercolor):(f=(t.mlw+1||o.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,h="mlc"in t?t.mlcc=i(t.mlc):Array.isArray(o.color)?l.defaultLine:o.color,c="mc"in t?t.mcc=n(t.mc):Array.isArray(a.color)?l.defaultLine:a.color||"rgba(0,0,0,0)"),t.om?e.call(l.stroke,c).style({"stroke-width":(f||1)+"px",fill:"none"}):(e.style("stroke-width",f+"px").call(l.fill,c),f&&e.call(l.stroke,h))}function i(t,e,r,n){var i=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],u=Math.pow(i*i+o*o,x/2),c=Math.pow(s*s+l*l,x/2),h=(c*c*i-u*u*s)*n,f=(c*c*o-u*u*l)*n,d=3*c*(u+c),p=3*u*(u+c);return[[a.round(e[0]+(d&&h/d),2),a.round(e[1]+(d&&f/d),2)],[a.round(e[0]-(p&&h/p),2),a.round(e[1]-(p&&f/p),2)]]}var a=t("d3"),o=t("fast-isnumeric"),s=t("../../registry"),l=t("../color"),u=t("../colorscale"),c=t("../../lib"),h=t("../../lib/svg_text_utils"),f=t("../../constants/xmlns_namespaces"),d=t("../../traces/scatter/subtypes"),p=t("../../traces/scatter/make_bubble_size_func"),m=e.exports={};m.font=function(t,e,r,n){e&&e.family&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(l.fill,n)},m.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},m.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},m.setRect=function(t,e,r,n,i){t.call(m.setPosition,e,r).call(m.setSize,n,i)},m.translatePoint=function(t,e,r,n){var i=t.xp||r.c2p(t.x),a=t.yp||n.c2p(t.y);o(i)&&o(a)&&e.node()?"text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform","translate("+i+","+a+")"):e.remove()},m.translatePoints=function(t,e,r,n){t.each(function(t){var i=a.select(this);m.translatePoint(t,i,e,r,n)})},m.getPx=function(t,e){return Number(t.style(e).replace(/px$/,""))},m.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},m.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";l.stroke(e,n||a.color),m.dashLine(e,s,o)},m.lineGroupStyle=function(t,e,r,n){t.style("fill","none").each(function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},o=e||i.width||0,s=n||i.dash||"";a.select(this).call(l.stroke,r||i.color).call(m.dashLine,s,o)})},m.dashLine=function(t,e,r){r=+r||0;var n=Math.max(r,3);"solid"===e?e="":"dot"===e?e=n+"px,"+n+"px":"dash"===e?e=3*n+"px,"+3*n+"px":"longdash"===e?e=5*n+"px,"+5*n+"px":"dashdot"===e?e=3*n+"px,"+n+"px,"+n+"px,"+n+"px":"longdashdot"===e&&(e=5*n+"px,"+2*n+"px,"+n+"px,"+2*n+"px"),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},m.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(e){var r=a.select(this);try{r.call(l.fill,e[0].trace.fillcolor)}catch(e){c.error(e,t),r.remove()}})};var g=t("./symbol_defs");m.symbolNames=[],m.symbolFuncs=[],m.symbolNeedLines={},m.symbolNoDot={},m.symbolList=[],Object.keys(g).forEach(function(t){var e=g[t];m.symbolList=m.symbolList.concat([e.n,t,e.n+100,t+"-open"]),m.symbolNames[e.n]=t,m.symbolFuncs[e.n]=e.f,e.needLine&&(m.symbolNeedLines[e.n]=!0),e.noDot?m.symbolNoDot[e.n]=!0:m.symbolList=m.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"])});var v=m.symbolNames.length,y="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";m.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=m.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=v||t>=400?0:Math.floor(Math.max(t,0))},m.singlePointStyle=function(t,e,r){var i=r.marker,a=i.line;n(t,e,r,m.tryColorscale(i,""),m.tryColorscale(i,"line"),i,a)},m.pointStyle=function(t,e){if(t.size()){var r=e.marker,n=m.tryColorscale(r,""),i=m.tryColorscale(r,"line");t.each(function(t){m.singlePointStyle(t,a.select(this),e,n,i)})}},m.tryColorscale=function(t,e){var r=e?c.nestedProperty(t,e).get():t,n=r.colorscale,i=r.color;return n&&Array.isArray(i)?u.makeColorScaleFunc(u.extractScale(n,r.cmin,r.cmax)):c.identity};var b={start:1,end:-1,middle:0,bottom:1,top:-1};m.textPointStyle=function(t,e){t.each(function(t){var r=a.select(this),n=t.tx||e.text;if(!n||Array.isArray(n))return void r.remove();var i=t.tp||e.textposition,s=-1!==i.indexOf("top")?"top":-1!==i.indexOf("bottom")?"bottom":"middle",l=-1!==i.indexOf("left")?"end":-1!==i.indexOf("right")?"start":"middle",u=t.ts||e.textfont.size,c=t.mrc?t.mrc/.8+1:0;u=o(u)&&u>0?u:0,r.call(m.font,t.tf||e.textfont.family,u,t.tc||e.textfont.color).attr("text-anchor",l).text(n).call(h.convertToTspans);var f=a.select(this.parentNode),d=r.selectAll("tspan.line"),p=1.3*((d[0].length||1)-1)+1,g=b[l]*c,v=.75*u+b[s]*c+(b[s]-1)*p*u/2;f.attr("transform","translate("+g+","+v+")"),p>1&&d.attr({x:r.attr("x"),y:r.attr("y")})})};var x=.5;m.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],a=[];for(r=1;r=1e4&&(a.selectAll("[data-bb]").attr("data-bb",null),M=[]),t.setAttribute("data-bb",M.length),M.push(l),c.extendFlat({},l)},m.setClipUrl=function(t,e){if(!e)return void t.attr("clip-path",null);var r="#"+e,n=a.select("base");n.size()&&n.attr("href")&&(r=window.location.href.split("#")[0]+r),t.attr("clip-path","url("+r+")")},m.getTranslate=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}},m.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a+=" translate("+e+", "+r+")",a=a.trim(),t[i]("transform",a),a},m.getScale=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}},m.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a+=" scale("+e+", "+r+")",a=a.trim(),t[i]("transform",a),a},m.setPointGroupScale=function(t,e,r){var n,i,a;return e=e||1,r=r||1,i=1===e&&1===r?"":" scale("+e+","+r+")",a=/\s*sc.*/,t.each(function(){n=(this.getAttribute("transform")||"").replace(a,""),n+=i,n=n.trim(),this.setAttribute("transform",n)}),i}},{"../../constants/xmlns_namespaces":674,"../../lib":690,"../../lib/svg_text_utils":709,"../../registry":807,"../../traces/scatter/make_bubble_size_func":962,"../../traces/scatter/subtypes":967,"../color":585,"../colorscale":599,"./symbol_defs":609,d3:114,"fast-isnumeric":123}],609:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,i="l"+e+",-"+e,a="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+i+a+i+a+o+a+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8, +f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),i=n.round(-t,2),a=n.round(-.309*t,2);return"M"+e+","+a+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+a+"L0,"+i+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M"+i+",-"+r+"V"+r+"L0,"+e+"L-"+i+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+i+"H"+r+"L"+e+",0L"+r+",-"+i+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),i=n.round(.951*e,2),a=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(-.309*e,2),u=n.round(.118*e,2),c=n.round(.809*e,2);return"M"+r+","+l+"H"+i+"L"+a+","+u+"L"+o+","+c+"L0,"+n.round(.382*e,2)+"L-"+o+","+c+"L-"+a+","+u+"L-"+i+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),i=n.round(.76*t,2);return"M-"+i+",0l-"+r+",-"+e+"h"+i+"l"+r+",-"+e+"l"+r+","+e+"h"+i+"l-"+r+","+e+"l"+r+","+e+"h-"+i+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+i+o+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+i+o+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+i+"-"+e+","+e+i+e+","+e+i+e+",-"+e+i+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+i+"0,"+e+i+e+",0"+i+"0,-"+e+i+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+","+i+"L0,0M"+e+","+i+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+",-"+i+"L0,0M"+e+",-"+i+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M"+i+","+e+"L0,0M"+i+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+i+","+e+"L0,0M-"+i+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0}}},{d3:114}],610:[function(t,e,r){"use strict";e.exports={visible:{valType:"boolean"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"]},symmetric:{valType:"boolean"},array:{valType:"data_array"},arrayminus:{valType:"data_array"},value:{valType:"number",min:0,dflt:10},valueminus:{valType:"number",min:0,dflt:10},traceref:{valType:"integer",min:0,dflt:0},tracerefminus:{valType:"integer",min:0,dflt:0},copy_ystyle:{valType:"boolean"},copy_zstyle:{valType:"boolean"},color:{valType:"color"},thickness:{valType:"number",min:0,dflt:2},width:{valType:"number",min:0},_deprecated:{opacity:{valType:"number"}}}},{}],611:[function(t,e,r){"use strict";function n(t,e,r,n){var a=e["error_"+n]||{},l=a.visible&&-1!==["linear","log"].indexOf(r.type),u=[];if(l){for(var c=s(a),h=0;h0;t.each(function(t){var e,h=t[0].trace,f=h.error_x||{},d=h.error_y||{};h.ids&&(e=function(t){return t.id});var p=o.hasMarkers(h)&&h.marker.maxdisplayed>0;if(d.visible||f.visible){var m=i.select(this).selectAll("g.errorbar").data(t,e);m.exit().remove(),m.style("opacity",1);var g=m.enter().append("g").classed("errorbar",!0);c&&g.style("opacity",0).transition().duration(r.duration).style("opacity",1),m.each(function(t){var e=i.select(this),o=n(t,l,u);if(!p||t.vis){var h;if(d.visible&&a(o.x)&&a(o.yh)&&a(o.ys)){var m=d.width;h="M"+(o.x-m)+","+o.yh+"h"+2*m+"m-"+m+",0V"+o.ys,o.noYS||(h+="m-"+m+",0h"+2*m);var g=e.select("path.yerror");s=!g.size(),s?g=e.append("path").classed("yerror",!0):c&&(g=g.transition().duration(r.duration).ease(r.easing)),g.attr("d",h)}if(f.visible&&a(o.y)&&a(o.xh)&&a(o.xs)){var v=(f.copy_ystyle?d:f).width;h="M"+o.xh+","+(o.y-v)+"v"+2*v+"m0,-"+v+"H"+o.xs,o.noXS||(h+="m0,-"+v+"v"+2*v);var y=e.select("path.xerror");s=!y.size(),s?y=e.append("path").classed("xerror",!0):c&&(y=y.transition().duration(r.duration).ease(r.easing)),y.attr("d",h)}}})}})}},{"../../traces/scatter/subtypes":967,d3:114,"fast-isnumeric":123}],616:[function(t,e,r){"use strict";var n=t("d3"),i=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)})}},{"../color":585,d3:114}],617:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/constants");e.exports={_isLinkedToArray:"image",visible:{valType:"boolean",dflt:!0},source:{valType:"string"},layer:{valType:"enumerated",values:["below","above"],dflt:"above"},sizex:{valType:"number",dflt:0},sizey:{valType:"number",dflt:0},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain"},opacity:{valType:"number",min:0,max:1,dflt:1},x:{valType:"any",dflt:0},y:{valType:"any",dflt:0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper"}}},{"../../plots/cartesian/constants":734}],618:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib/to_log_range");e.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,u,c=t._fullLayout.images,h=e._id.charAt(0),f=0;f=2/3},r.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3},r.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],623:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.defaultLine},borderwidth:{valType:"number",min:0,dflt:0},font:a({},n,{}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"]},tracegroupgap:{valType:"number",min:0,dflt:10},x:{valType:"number",min:-2,max:3,dflt:1.02},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"}}},{"../../lib/extend":682,"../../plots/font_attributes":753,"../color/attributes":584}],624:[function(t,e,r){"use strict";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4}},{}],625:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("./attributes"),o=t("../../plots/layout_attributes"),s=t("./helpers");e.exports=function(t,e,r){function l(t,e){return i.coerce(d,p,a,t,e)}for(var u,c,h,f,d=t.legend||{},p=e.legend={},m=0,g="normal",v=0;v1)){if(l("bgcolor",e.paper_bgcolor),l("bordercolor"),l("borderwidth"),i.coerceFont(l,"font",e.font),l("orientation"),"h"===p.orientation){var b=t.xaxis;b&&b.rangeslider&&b.rangeslider.visible?(u=0,h="left",c=1.1,f="bottom"):(u=0,h="left",c=-.1,f="top")}l("traceorder",g),s.isGrouped(e.legend)&&l("tracegroupgap"),l("x",u),l("xanchor",h),l("y",c),l("yanchor",f),i.noneOrAll(d,p,["x","y"])}}},{"../../lib":690,"../../plots/layout_attributes":783,"../../registry":807,"./attributes":623,"./helpers":628}],626:[function(t,e,r){"use strict";function n(t,e){function r(r){y.convertToTspans(r,function(){r.selectAll("tspan.line").attr({x:r.attr("x")}),t.call(o,e)})}var n=t.data()[0][0],i=e._fullLayout,a=n.trace,s=p.traceIs(a,"pie"),l=a.index,u=s?n.label:a.name,c=t.selectAll("text.legendtext").data([0]);c.enter().append("text").classed("legendtext",!0),c.attr({x:40,y:0,"data-unformatted":u}).style("text-anchor","start").classed("user-select-none",!0).call(g.font,i.legend.font).text(u),e._context.editable&&!s?c.call(y.makeEditable).call(r).on("edit",function(t){this.attr({"data-unformatted":t}),this.text(t).call(r),this.text()||(t=" ");var i,a=n.trace._fullInput||{};if(-1!==["ohlc","candlestick"].indexOf(a.type)){var o=n.trace.transforms;i=o[o.length-1].direction+".name"}else i="name";h.restyle(e,i,t,l)}):c.call(r)}function i(t,e){var r,n=1,i=t.selectAll("rect").data([0]);i.enter().append("rect").classed("legendtoggle",!0).style("cursor","pointer").attr("pointer-events","all").call(v.fill,"rgba(0,0,0,0)"),i.on("mousedown",function(){r=(new Date).getTime(),r-e._legendMouseDownTimeT&&(n=Math.max(n-1,1)),1===n?r._clickTimeout=setTimeout(function(){a(t,e,n)},T):2===n&&(r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0,a(t,e,n))}})}function a(t,e,r){if(!e._dragged&&!e._editing){var n,i,a=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],o=t.data()[0][0],s=e._fullData,l=o.trace,u=l.legendgroup,c=[];if(1===r&&A&&e.data&&e._context.showTips?(f.notifier("Double click on legend to isolate individual trace","long"),A=!1):A=!1,p.traceIs(l,"pie")){var d=o.label,m=a.indexOf(d);1===r?-1===m?a.push(d):a.splice(m,1):2===r&&(a=[],e.calcdata[0].forEach(function(t){d!==t.label&&a.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===a.length&&-1===m&&(a=[])),h.relayout(e,"hiddenlabels",a)}else{var g,v=[],y=[];for(g=0;gtspan"),h=c[0].length||1;r=s*h,n=u.node()&&g.bBox(u.node()).width;var f=s*(.3+(1-h)/2);u.attr("y",f),c.attr("y",f)}r=Math.max(r,16)+3,i.height=r,i.width=n}function s(t,e,r){var n=t._fullLayout,i=n.legend,a=i.borderwidth,o=M.isGrouped(i);if(M.isVertical(i))o&&e.each(function(t,e){g.setTranslate(this,0,e*i.tracegroupgap)}),i.width=0,i.height=0,r.each(function(t){var e=t[0],r=e.height,n=e.width;g.setTranslate(this,a,5+a+i.height+r/2),i.height+=r,i.width=Math.max(i.width,n)}),i.width+=45+2*a,i.height+=10+2*a,o&&(i.height+=(i._lgroupsLength-1)*i.tracegroupgap),i.width=Math.ceil(i.width),i.height=Math.ceil(i.height),r.each(function(e){var r=e[0];c.select(this).select(".legendtoggle").call(g.setRect,0,-r.height/2,(t._context.editable?0:i.width)+40,r.height)});else if(o){i.width=0,i.height=0;for(var s=[i.width],l=e.data(),u=0,h=l.length;un.width-(n.margin.r+n.margin.l)&&(y=0,p+=m,i.height=i.height+m,m=0),g.setTranslate(this,a+y,5+a+e.height/2+p),i.width+=o+r,i.height=Math.max(i.height,e.height),y+=o+r,m=Math.max(e.height,m)}),i.width+=2*a,i.height+=10+2*a,i.width=Math.ceil(i.width),i.height=Math.ceil(i.height),r.each(function(e){var r=e[0];c.select(this).select(".legendtoggle").call(g.setRect,0,-r.height/2,t._context.editable?0:i.width,r.height)})}}function l(t){var e=t._fullLayout,r=e.legend,n="left";k.isRightAnchor(r)?n="right":k.isCenterAnchor(r)&&(n="center");var i="top";k.isBottomAnchor(r)?i="bottom":k.isMiddleAnchor(r)&&(i="middle"),d.autoMargin(t,"legend",{x:r.x,y:r.y,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:r.height*({top:1,middle:.5}[i]||0),t:r.height*({bottom:1,middle:.5}[i]||0)})}function u(t){var e=t._fullLayout,r=e.legend,n="left";k.isRightAnchor(r)?n="right":k.isCenterAnchor(r)&&(n="center"),d.autoMargin(t,"legend",{x:r.x,y:.5,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:0,t:0})}var c=t("d3"),h=t("../../plotly"),f=t("../../lib"),d=t("../../plots/plots"),p=t("../../registry"),m=t("../dragelement"),g=t("../drawing"),v=t("../color"),y=t("../../lib/svg_text_utils"),b=t("./constants"),x=t("../../constants/interactions"),_=t("./get_legend_data"),w=t("./style"),M=t("./helpers"),k=t("./anchor_utils"),A=!0,T=x.DBLCLICKDELAY;e.exports=function(t){function e(t,e){L.attr("data-scroll",e).call(g.setTranslate,0,e),C.call(g.setRect,N,t,b.scrollBarWidth,b.scrollBarHeight),S.select("rect").attr({y:y.borderwidth-e})}var r=t._fullLayout,o="legend"+r._uid;if(r._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var y=r.legend,x=r.showlegend&&_(t.calcdata,y),M=r.hiddenlabels||[];if(!r.showlegend||!x.length)return r._infolayer.selectAll(".legend").remove(),r._topdefs.select("#"+o).remove(),void d.autoMargin(t,"legend");var A=r._infolayer.selectAll("g.legend").data([0]);A.enter().append("g").attr({class:"legend","pointer-events":"all"});var S=r._topdefs.selectAll("#"+o).data([0]);S.enter().append("clipPath").attr("id",o).append("rect");var E=A.selectAll("rect.bg").data([0]);E.enter().append("rect").attr({class:"bg","shape-rendering":"crispEdges"}),E.call(v.stroke,y.bordercolor),E.call(v.fill,y.bgcolor),E.style("stroke-width",y.borderwidth+"px");var L=A.selectAll("g.scrollbox").data([0]);L.enter().append("g").attr("class","scrollbox");var C=A.selectAll("rect.scrollbar").data([0]);C.enter().append("rect").attr({class:"scrollbar",rx:20,ry:2,width:0,height:0}).call(v.fill,"#808BA4");var z=L.selectAll("g.groups").data(x);z.enter().append("g").attr("class","groups"),z.exit().remove();var D=z.selectAll("g.traces").data(f.identity);D.enter().append("g").attr("class","traces"),D.exit().remove(),D.call(w).style("opacity",function(t){var e=t[0].trace;return p.traceIs(e,"pie")?-1!==M.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1}).each(function(){c.select(this).call(n,t).call(i,t)});var I=0!==A.enter().size();I&&(s(t,z,D),l(t));var P=r.width,O=r.height;s(t,z,D),y.height>O?u(t):l(t);var R=r._size,j=R.l+R.w*y.x,F=R.t+R.h*(1-y.y);k.isRightAnchor(y)?j-=y.width:k.isCenterAnchor(y)&&(j-=y.width/2),k.isBottomAnchor(y)?F-=y.height:k.isMiddleAnchor(y)&&(F-=y.height/2);var N=y.width,B=R.w;N>B?(j=R.l,N=B):(j+N>P&&(j=P-N),j<0&&(j=0),N=Math.min(P-j,y.width));var U=y.height,V=R.h;U>V?(F=R.t,U=V):(F+U>O&&(F=O-U),F<0&&(F=0),U=Math.min(O-F,y.height)),g.setTranslate(A,j,F);var q,H,Y=U-b.scrollBarHeight-2*b.scrollBarMargin,G=y.height-U;if(y.height<=U||t._context.staticPlot)E.attr({width:N-y.borderwidth,height:U-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),g.setTranslate(L,0,0),S.select("rect").attr({width:N-2*y.borderwidth,height:U-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth}),L.call(g.setClipUrl,o);else{q=b.scrollBarMargin,H=L.attr("data-scroll")||0,E.attr({width:N-2*y.borderwidth+b.scrollBarWidth+b.scrollBarMargin,height:U-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),S.select("rect").attr({width:N-2*y.borderwidth+b.scrollBarWidth+b.scrollBarMargin,height:U-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth-H}),L.call(g.setClipUrl,o),I&&e(q,H),A.on("wheel",null),A.on("wheel",function(){H=f.constrain(L.attr("data-scroll")-c.event.deltaY/Y*G,-G,0),q=b.scrollBarMargin-H/G*Y,e(q,H),c.event.preventDefault()}),C.on(".drag",null),L.on(".drag",null);var X=c.behavior.drag().on("drag",function(){q=f.constrain(c.event.y-b.scrollBarHeight/2,b.scrollBarMargin,b.scrollBarMargin+Y),H=-(q-b.scrollBarMargin)/Y*G,e(q,H)});C.call(X),L.call(X)}if(t._context.editable){var W,Z,J,K;A.classed("cursor-move",!0),m.init({element:A.node(),prepFn:function(){var t=g.getTranslate(A);J=t.x,K=t.y},moveFn:function(t,e){var r=J+t,n=K+e;g.setTranslate(A,r,n),W=m.align(r,0,R.l,R.l+R.w,y.xanchor),Z=m.align(n,0,R.t+R.h,R.t,y.yanchor)},doneFn:function(e,n,i){if(e&&void 0!==W&&void 0!==Z)h.relayout(t,{"legend.x":W,"legend.y":Z});else{var o=r._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return i.clientX>=t.left&&i.clientX<=t.right&&i.clientY>=t.top&&i.clientY<=t.bottom});o.size()>0&&(1===n?A._clickTimeout=setTimeout(function(){a(o,t,n)},T):2===n&&(A._clickTimeout&&clearTimeout(A._clickTimeout),a(o,t,n)))}}})}}}},{"../../constants/interactions":671,"../../lib":690,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/plots":792,"../../registry":807,"../color":585,"../dragelement":606,"../drawing":608,"./anchor_utils":622,"./constants":624,"./get_legend_data":627,"./helpers":628,"./style":630,d3:114}],627:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("./helpers");e.exports=function(t,e){function r(t,r){if(""!==t&&i.isGrouped(e))-1===l.indexOf(t)?(l.push(t),u=!0,s[t]=[[r]]):s[t].push([r]);else{var n="~~i"+h;l.push(n),s[n]=[[r]],h++}}var a,o,s={},l=[],u=!1,c={},h=0;for(a=0;ar[1])return r[1]}return i}function r(t){return t[0]}var n,i,a=t[0],o=a.trace,s=d.hasMarkers(o),u=d.hasText(o),f=d.hasLines(o);if(s||u||f){var p={},m={};s&&(p.mc=e("marker.color",r),p.mo=e("marker.opacity",c.mean,[.2,1]),p.ms=e("marker.size",c.mean,[2,16]),p.mlc=e("marker.line.color",r),p.mlw=e("marker.line.width",c.mean,[0,5]),m.marker={sizeref:1,sizemin:1,sizemode:"diameter"}),f&&(m.line={width:e("line.width",r,[0,10])}),u&&(p.tx="Aa",p.tp=e("textposition",r),p.ts=10,p.tc=e("textfont.color",r),p.tf=e("textfont.family",r)),n=[c.minExtend(a,p)],i=c.minExtend(o,m)}var g=l.select(this).select("g.legendpoints"),v=g.selectAll("path.scatterpts").data(s?n:[]);v.enter().append("path").classed("scatterpts",!0).attr("transform","translate(20,0)"),v.exit().remove(),v.call(h.pointStyle,i),s&&(n[0].mrc=3);var y=g.selectAll("g.pointtext").data(u?n:[]);y.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),y.exit().remove(),y.selectAll("text").call(h.textPointStyle,i)}function a(t){var e=t[0].trace,r=e.marker||{},n=r.line||{},i=l.select(this).select("g.legendpoints").selectAll("path.legendbar").data(u.traceIs(e,"bar")?[t]:[]);i.enter().append("path").classed("legendbar",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),i.exit().remove(),i.each(function(t){var e=l.select(this),i=t[0],a=(i.mlw+1||n.width+1)-1;e.style("stroke-width",a+"px").call(f.fill,i.mc||r.color),a&&e.call(f.stroke,i.mlc||n.color)})}function o(t){ +var e=t[0].trace,r=l.select(this).select("g.legendpoints").selectAll("path.legendbox").data(u.traceIs(e,"box")&&e.visible?[t]:[]);r.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.each(function(){var t=e.line.width,r=l.select(this);r.style("stroke-width",t+"px").call(f.fill,e.fillcolor),t&&r.call(f.stroke,e.line.color)})}function s(t){var e=t[0].trace,r=l.select(this).select("g.legendpoints").selectAll("path.legendpie").data(u.traceIs(e,"pie")&&e.visible?[t]:[]);r.enter().append("path").classed("legendpie",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.size()&&r.call(p,t[0],e)}var l=t("d3"),u=t("../../registry"),c=t("../../lib"),h=t("../drawing"),f=t("../color"),d=t("../../traces/scatter/subtypes"),p=t("../../traces/pie/style_one");e.exports=function(t){t.each(function(t){var e=l.select(this),r=e.selectAll("g.layers").data([0]);r.enter().append("g").classed("layers",!0),r.style("opacity",t[0].trace.opacity),r.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),r.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var n=r.selectAll("g.legendsymbols").data([t]);n.enter().append("g").classed("legendsymbols",!0),n.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(a).each(o).each(s).each(n).each(i)}},{"../../lib":690,"../../registry":807,"../../traces/pie/style_one":932,"../../traces/scatter/subtypes":967,"../color":585,"../drawing":608,d3:114}],631:[function(t,e,r){"use strict";function n(t,e){var r=e.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=t._fullLayout,o={};if("zoom"===n){for(var s,l,c="in"===i?.5:2,f=(1+c)/2,d=(1-c)/2,p=h.list(t,null,!0),m=0;m1)return n(["resetViews","toggleHover"]),o(g,r);c&&(n(["zoom3d","pan3d","orbitRotation","tableRotation"]),n(["resetCameraDefault3d","resetCameraLastSave3d"]),n(["hoverClosest3d"])),f&&(n(["zoomInGeo","zoomOutGeo","resetGeo"]),n(["hoverClosestGeo"]));var v=i(s),y=[];return((u||p)&&!v||m)&&(y=["zoom2d","pan2d"]),(u||m)&&a(l)&&(y.push("select2d"),y.push("lasso2d")),y.length&&n(y),!u&&!p||v||m||n(["zoomIn2d","zoomOut2d","autoScale2d","resetScale2d"]),u&&d?n(["toggleHover"]):p?n(["hoverClosestGl2d"]):u?n(["hoverClosestCartesian","hoverCompareCartesian"]):d&&n(["hoverClosestPie"]),o(g,r)}function i(t){for(var e=l.list({_fullLayout:t},null,!0),r=!0,n=0;n0)){var p=i(e,r,l);h("x",p[0]),h("y",p[1]),a.noneOrAll(t,e,["x","y"]),h("xanchor"),h("yanchor"),a.coerceFont(h,"font",r.font);var m=h("bgcolor");h("activecolor",o.contrast(m,u.lightAmount,u.darkAmount)),h("bordercolor"),h("borderwidth")}}},{"../../lib":690,"../color":585,"./attributes":635,"./button_attributes":636,"./constants":637}],639:[function(t,e,r){"use strict";function n(t){for(var e=v.list(t,"x",!0),r=[],n=0;np&&(p=f)));return p>=d?[d,p]:void 0}}var i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./constants"),s=t("./helpers");e.exports=function(t){var e=t._fullLayout,r=i.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var s=0;sG&&n>X&&!t.shiftKey?p.getCursor(i/r,1-a/n):"move";m(e,o),Y=o.split("-")[0]}function a(e){N=h.getFromId(t,r.xref),B=h.getFromId(t,r.yref),U=v.getDataToPixel(t,N),V=v.getDataToPixel(t,B,!0),q=v.getPixelToData(t,N),H=v.getPixelToData(t,B,!0);var a="shapes["+n+"]";"path"===r.type?(j=r.path,F=a+".path"):(g=U(r.x0),y=V(r.y0),b=U(r.x1),x=V(r.y1),_=a+".x0",w=a+".y0",M=a+".x1",k=a+".y1"),gX&&(d[L]=r[I]=H(u),d[C]=r[P]=H(c)),f-h>G&&(d[z]=r[O]=q(h),d[D]=r[R]=q(f))}e.attr("d",o(t,r))}var d,g,y,b,x,_,w,M,k,A,T,S,E,L,C,z,D,I,P,O,R,j,F,N,B,U,V,q,H,Y,G=10,X=10,W={setCursor:i,element:e.node(),prepFn:a,doneFn:s},Z=W.element.getBoundingClientRect();p.init(W)}function o(t,e){var r,n,i,a,o=e.type,l=h.getFromId(t,e.xref),u=h.getFromId(t,e.yref),c=t._fullLayout._size;if(l?(r=v.shapePositionToRange(l),n=function(t){return l._offset+l.r2p(r(t,!0))}):n=function(t){return c.l+c.w*t},u?(i=v.shapePositionToRange(u),a=function(t){return u._offset+u.r2p(i(t,!0))}):a=function(t){return c.t+c.h*(1-t)},"path"===o)return l&&"date"===l.type&&(n=v.decodeDate(n)),u&&"date"===u.type&&(a=v.decodeDate(a)),s(e.path,n,a);var f=n(e.x0),d=n(e.x1),p=a(e.y0),m=a(e.y1);if("line"===o)return"M"+f+","+p+"L"+d+","+m;if("rect"===o)return"M"+f+","+p+"H"+d+"V"+m+"H"+f+"Z";var g=(f+d)/2,y=(p+m)/2,b=Math.abs(g-f),x=Math.abs(y-p),_="A"+b+","+x,w=g+b+","+y;return"M"+w+_+" 0 1,1 "+g+","+(y-x)+_+" 0 0,1 "+w+"Z"}function s(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i],l=t.substr(1).replace(g.paramRE,function(t){return a[n]?t=e(t):o[n]&&(t=r(t)),n++,n>s&&(t="X"),t});return n>s&&(l=l.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+t)),i+l})}function l(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,function(t){return n>=s?t:(a[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}var u=t("../../plotly"),c=t("../../lib"),h=t("../../plots/cartesian/axes"),f=t("../color"),d=t("../drawing"),p=t("../dragelement"),m=t("../../lib/setcursor"),g=t("./constants"),v=t("./helpers");e.exports={draw:n,drawOne:i}},{"../../lib":690,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian/axes":729,"../color":585,"../dragelement":606,"../drawing":608,"./constants":650,"./helpers":653}],653:[function(t,e,r){"use strict";r.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},r.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},r.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},r.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},r.getDataToPixel=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.shapePositionToRange(e);i=function(t){return e._offset+e.r2p(o(t,!0))},"date"===e.type&&(i=r.decodeDate(i))}else i=n?function(t){return a.t+a.h*(1-t)}:function(t){return a.l+a.w*t};return i},r.getPixelToData=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.rangeToShapePosition(e);i=function(t){return o(e.p2r(t-e._offset))}}else i=n?function(t){return 1-(t-a.t)/a.h}:function(t){return(t-a.l)/a.w};return i}},{}],654:[function(t,e,r){"use strict";var n=t("./draw");e.exports={moduleType:"component",name:"shapes",layoutAttributes:t("./attributes"),supplyLayoutDefaults:t("./defaults"),calcAutorange:t("./calc_autorange"),draw:n.draw,drawOne:n.drawOne}},{"./attributes":648,"./calc_autorange":649,"./defaults":651,"./draw":652}],655:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("./attributes"),o=t("./helpers");e.exports=function(t,e,r,s,l){function u(r,i){return n.coerce(t,e,a,r,i)}if(s=s||{},l=l||{},!u("visible",!l.itemIsNotPlainObject))return e;u("layer"),u("opacity"),u("fillcolor"),u("line.color"),u("line.width"),u("line.dash");for(var c=t.path?"path":"rect",h=u("type",c),f=["x","y"],d=0;d<2;d++){var p=f[d],m={_fullLayout:r},g=i.coerceRef(t,e,m,p,"","paper");if("path"!==h){var v,y,b;"paper"!==g?(v=i.getFromId(m,g),b=o.rangeToShapePosition(v),y=o.shapePositionToRange(v)):y=b=n.identity;var x=p+"0",_=p+"1",w=t[x],M=t[_];t[x]=y(t[x],!0),t[_]=y(t[_],!0),i.coercePosition(e,m,u,g,x,.25),i.coercePosition(e,m,u,g,_,.75),e[x]=b(e[x]),e[_]=b(e[_]),t[x]=w,t[_]=M}}return"path"===h?u("path"):n.noneOrAll(t,e,["x0","x1","y0","y1"]),e}},{"../../lib":690,"../../plots/cartesian/axes":729,"./attributes":648,"./helpers":653}],656:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../../plots/pad_attributes"),a=t("../../lib/extend").extendFlat,o=t("../../lib/extend").extendDeep,s=t("../../plots/animation_attributes"),l=t("./constants"),u={_isLinkedToArray:"step",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"}};e.exports={_isLinkedToArray:"slider",visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:o({},i,{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:a({},n,{})},font:a({},n,{}),activebgcolor:{valType:"color",dflt:l.gripBgActiveColor},bgcolor:{valType:"color",dflt:l.railBgColor},bordercolor:{valType:"color",dflt:l.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l.tickLength},tickcolor:{valType:"color",dflt:l.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l.minorTickLength}}},{"../../lib/extend":682,"../../plots/animation_attributes":725,"../../plots/font_attributes":753,"../../plots/pad_attributes":791,"./constants":657}],657:[function(t,e,r){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,fontSizeToHeight:1.3,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],658:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return a.coerce(t,e,s,r,n)}n("visible",i(t,e).length>0)&&(n("active"),n("x"),n("y"),a.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("len"),n("lenmode"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),a.coerceFont(n,"font",r.font),n("currentvalue.visible")&&(n("currentvalue.xanchor"),n("currentvalue.prefix"),n("currentvalue.suffix"),n("currentvalue.offset"),a.coerceFont(n,"currentvalue.font",e.font)),n("transition.duration"),n("transition.easing"),n("bgcolor"),n("activebgcolor"),n("bordercolor"),n("borderwidth"),n("ticklen"),n("tickwidth"),n("tickcolor"),n("minorticklen"))}function i(t,e){function r(t,e){return a.coerce(n,i,c,t,e)}for(var n,i,o=t.steps||[],s=e.steps=[],l=0;l=r.steps.length&&(r.active=0),e.call(s,r).call(x,r).call(c,r).call(p,r).call(b,t,r).call(l,t,r),A.setTranslate(e,r.lx+r.pad.l,r.ly+r.pad.t),e.call(g,r,r.active/(r.steps.length-1),!1),e.call(s,r)}function s(t,e,r){if(e.currentvalue.visible){var n,i,a=t.selectAll("text").data([0]);switch(e.currentvalue.xanchor){case"right":n=e.inputAreaLength-E.currentValueInset-e.currentValueMaxWidth,i="left";break;case"center":n=.5*e.inputAreaLength,i="middle";break;default:n=E.currentValueInset,i="left"}a.enter().append("text").classed(E.labelClass,!0).classed("user-select-none",!0).attr("text-anchor",i);var o=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)o+=r;else{o+=e.steps[e.active].label}return e.currentvalue.suffix&&(o+=e.currentvalue.suffix),a.call(A.font,e.currentvalue.font).text(o).call(T.convertToTspans),A.setTranslate(a,n,e.currentValueHeight),a}}function l(t,e,r){var n=t.selectAll("rect."+E.gripRectClass).data([0]);n.enter().append("rect").classed(E.gripRectClass,!0).call(d,e,t,r).style("pointer-events","all"),n.attr({width:E.gripWidth,height:E.gripHeight,rx:E.gripRadius,ry:E.gripRadius}).call(k.stroke,r.bordercolor).call(k.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function u(t,e,r){var n=t.selectAll("text").data([0]);return n.enter().append("text").classed(E.labelClass,!0).classed("user-select-none",!0).attr("text-anchor","middle"),n.call(A.font,r.font).text(e.step.label).call(T.convertToTspans),n}function c(t,e){var r=t.selectAll("g."+E.labelsClass).data([0]);r.enter().append("g").classed(E.labelsClass,!0);var n=r.selectAll("g."+E.labelGroupClass).data(e.labelSteps);n.enter().append("g").classed(E.labelGroupClass,!0),n.exit().remove(),n.each(function(t){var r=w.select(this);r.call(u,t,e),A.setTranslate(r,v(e,t.fraction),E.tickOffset+e.ticklen+e.labelHeight+E.labelOffset+e.currentValueTotalHeight)})}function h(t,e,r,n,i){var a=Math.round(n*(r.steps.length-1));a!==r.active&&f(t,e,r,a,!0,i)}function f(t,e,r,n,i,a){var o=r.active;r._input.active=r.active=n;var l=r.steps[r.active];e.call(g,r,r.active/(r.steps.length-1),a),e.call(s,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),l&&l.method&&i&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=i,e._nextMethod.doTransition=a):(e._nextMethod={step:l,doCallback:i,doTransition:a},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&&(M.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function d(t,e,r){function n(){return r.data()[0]}var i=r.node(),a=w.select(e);t.on("mousedown",function(){var t=n();e.emit("plotly_sliderstart",{slider:t});var o=r.select("."+E.gripRectClass);w.event.stopPropagation(),w.event.preventDefault(),o.call(k.fill,t.activebgcolor);var s=y(t,w.mouse(i)[0]);h(e,r,t,s,!0),t._dragging=!0,a.on("mousemove",function(){var t=n(),a=y(t,w.mouse(i)[0]);h(e,r,t,a,!1)}),a.on("mouseup",function(){var t=n();t._dragging=!1,o.call(k.fill,t.bgcolor),a.on("mouseup",null),a.on("mousemove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})})})}function p(t,e){var r=t.selectAll("rect."+E.tickRectClass).data(e.steps);r.enter().append("rect").classed(E.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(t,r){var n=r%e.labelStride==0,i=w.select(this);i.attr({height:n?e.ticklen:e.minorticklen}).call(k.fill,e.tickcolor),A.setTranslate(i,v(e,r/(e.steps.length-1))-.5*e.tickwidth,(n?E.tickOffset:E.minorTickOffset)+e.currentValueTotalHeight)})}function m(t){t.labelSteps=[];for(var e=t.steps.length,r=0;r0&&(o=o.transition().duration(e.transition.duration).ease(e.transition.easing)),o.attr("transform","translate("+(a-.5*E.gripWidth)+","+e.currentValueTotalHeight+")")}}function v(t,e){return t.inputAreaStart+E.stepInset+(t.inputAreaLength-2*E.stepInset)*Math.min(1,Math.max(0,e))}function y(t,e){return Math.min(1,Math.max(0,(e-E.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*E.stepInset-2*t.inputAreaStart)))}function b(t,e,r){var n=t.selectAll("rect."+E.railTouchRectClass).data([0]);n.enter().append("rect").classed(E.railTouchRectClass,!0).call(d,e,t,r).style("pointer-events","all"),n.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,E.tickOffset+r.ticklen+r.labelHeight)}).call(k.fill,r.bgcolor).attr("opacity",0),A.setTranslate(n,0,r.currentValueTotalHeight)}function x(t,e){var r=t.selectAll("rect."+E.railRectClass).data([0]);r.enter().append("rect").classed(E.railRectClass,!0);var n=e.inputAreaLength-2*E.railInset;r.attr({width:n,height:E.railWidth,rx:E.railRadius,ry:E.railRadius,"shape-rendering":"crispEdges"}).call(k.stroke,e.bordercolor).call(k.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),A.setTranslate(r,E.railInset,.5*(e.inputAreaWidth-E.railWidth)+e.currentValueTotalHeight)}function _(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n0?[0]:[]);if(s.enter().append("g").classed(E.containerClassName,!0).style("cursor","ew-resize"),s.exit().remove(),s.exit().size()&&_(t),0!==r.length){var l=s.selectAll("g."+E.groupClassName).data(r,i);l.enter().append("g").classed(E.groupClassName,!0),l.exit().each(function(e){w.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,M.autoMargin(t,E.autoMarginIdRoot+e._index)});for(var u=0;u0||f<0){var m={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[b.side];e.attr("transform","translate("+m+")")}}}var m=r.propContainer,g=r.propName,v=r.traceIndex,y=r.dfltName,b=r.avoid||{},x=r.attributes,_=r.transform,w=r.containerGroup,M=t._fullLayout,k=m.titlefont.family,A=m.titlefont.size,T=m.titlefont.color,S=1,E=!1,L=m.title.trim();""===L&&(S=0),L.match(/Click to enter .+ title/)&&(S=.2,E=!0),w||(w=M._infolayer.selectAll(".g-"+e).data([0]),w.enter().append("g").classed("g-"+e,!0));var C=w.selectAll("text").data([0]);C.enter().append("text"),C.text(L).attr("class",e),C.attr({"data-unformatted":L}).call(f);var z="Click to enter "+y+" title";t._context.editable?(L?C.on(".opacity",null):function(){S=0,E=!0,L=z,C.attr({"data-unformatted":L}).text(L).on("mouseover.opacity",function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)})}(),C.call(c.makeEditable).on("edit",function(e){void 0!==v?a.restyle(t,g,e,v):a.relayout(t,g,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(f)}).on("input",function(t){this.text(t||" ").attr(x).selectAll("tspan.line").attr(x)})):L&&!L.match(/Click to enter .+ title/)||C.remove(),C.classed("js-placeholder",E)}},{"../../constants/interactions":671,"../../lib":690,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/plots":792,"../color":585,"../drawing":608,d3:114,"fast-isnumeric":123}],662:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat,o=t("../../plots/pad_attributes"),s={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""}};e.exports={_isLinkedToArray:"updatemenu",_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:s,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a({},o,{}),font:a({},n,{}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1}}},{"../../lib/extend":682,"../../plots/font_attributes":753,"../../plots/pad_attributes":791,"../color/attributes":584}],663:[function(t,e,r){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,fontSizeToHeight:1.3,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF"}},{}],664:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return a.coerce(t,e,s,r,n)}n("visible",i(t,e).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),a.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),a.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function i(t,e){function r(t,e){return a.coerce(n,i,c,t,e)}for(var n,i,o=t.buttons||[],s=e.buttons=[],l=0;l0?[0]:[]);if(a.enter().append("g").classed(E.containerClassName,!0).style("cursor","pointer"),a.exit().remove(),a.exit().size()&&_(t),0!==r.length){var c=a.selectAll("g."+E.headerGroupClassName).data(r,i);c.enter().append("g").classed(E.headerGroupClassName,!0);var h=a.selectAll("g."+E.dropdownButtonGroupClassName).data([0]);h.enter().append("g").classed(E.dropdownButtonGroupClassName,!0).style("pointer-events","all");for(var f=0;fM,T=n.barLength+2*n.barPad,S=n.barWidth+2*n.barPad,E=p,L=g+v;L+S>u&&(L=u-S);var C=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,n.barColor),A?(this.hbar=C.attr({rx:n.barRadius,ry:n.barRadius,x:E,y:L,width:T,height:S}),this._hbarXMin=E+T/2,this._hbarTranslateMax=M-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var z=v>k,D=n.barWidth+2*n.barPad,I=n.barLength+2*n.barPad,P=p+m,O=g;P+D>l&&(P=l-D);var R=this.container.selectAll("rect.scrollbar-vertical").data(z?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,n.barColor),z?(this.vbar=R.attr({rx:n.barRadius,ry:n.barRadius,x:P,y:O,width:D,height:I}),this._vbarYMin=O+I/2,this._vbarTranslateMax=k-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var j=this.id,F=c-.5,N=z?h+D+.5:h+.5,B=f-.5,U=A?d+S+.5:d+.5,V=s._topdefs.selectAll("#"+j).data(A||z?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",j).append("rect"),A||z?(this._clipRect=V.select("rect").attr({x:Math.floor(F),y:Math.floor(B),width:Math.ceil(N)-Math.floor(F),height:Math.ceil(U)-Math.floor(B)}),this.container.call(o.setClipUrl,j),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),A||z){var q=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(q);var H=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault(),i.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(H),z&&this.vbar.on(".drag",null).call(H)}this.setTranslate(e,r)},n.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},n.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=i.event.dx),this.vbar&&(e-=i.event.dy),this.setTranslate(t,e)},n.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=i.event.deltaY),this.vbar&&(e+=i.event.deltaY),this.setTranslate(t,e)},n.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,n=r+this._hbarTranslateMax;t=(s.constrain(i.event.x,r,n)-r)/(n-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,o=a+this._vbarTranslateMax;e=(s.constrain(i.event.y,a,o)-a)/(o-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},n.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=s.constrain(t||0,0,r),e=s.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(o.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(o.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var a=e/n;this.vbar.call(o.setTranslate,t,e+a*this._vbarTranslateMax)}}},{"../../lib":690,"../color":585,"../drawing":608,d3:114}],668:[function(t,e,r){"use strict";e.exports={solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}},{}],669:[function(t,e,r){"use strict";e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],670:[function(t,e,r){"use strict";e.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},{}],671:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300}},{}],672:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6}},{}],673:[function(t,e,r){"use strict";e.exports={entityToUnicode:{mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},unicodeToEntity:{"&":"amp","<":"lt",">":"gt",'"':"quot","'":"#x27","/":"#x2F"}}},{}],674:[function(t,e,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],675:[function(t,e,r){"use strict";var n=t("./plotly");r.version="1.25.2",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config"),r.plot=n.plot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.setPlotConfig=t("./plot_api/set_plot_config"),r.register=t("./plot_api/register"),r.toImage=t("./plot_api/to_image"),r.downloadImage=t("./snapshot/download"),r.validate=t("./plot_api/validate"),r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.register(t("./traces/scatter")),r.register([t("./components/legend"),t("./components/annotations"),t("./components/shapes"),t("./components/images"),t("./components/updatemenus"),t("./components/sliders"),t("./components/rangeslider"),t("./components/rangeselector")]),r.Icons=t("../build/ploticon"),r.Plots=n.Plots,r.Fx=n.Fx,r.Snapshot=t("./snapshot"),r.PlotSchema=t("./plot_api/plot_schema"),r.Queue=t("./lib/queue"),r.d3=t("d3")},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":581,"./components/images":621,"./components/legend":629,"./components/rangeselector":641,"./components/rangeslider":647,"./components/shapes":654,"./components/sliders":660,"./components/updatemenus":666,"./fonts/mathjax_config":676,"./lib/queue":702,"./plot_api/plot_schema":718,"./plot_api/register":719,"./plot_api/set_plot_config":720,"./plot_api/to_image":722,"./plot_api/validate":723,"./plotly":724,"./snapshot":812,"./snapshot/download":809,"./traces/scatter":957,d3:114,"es6-promise":120}],676:[function(t,e,r){"use strict";"undefined"!=typeof MathJax?(r.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):r.MathJax=!1},{}],677:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){Array.isArray(t)&&(e[r]=t[n])}},{}],678:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../constants/numerical").BADNUM;e.exports=function(t){return"string"==typeof t&&(t=t.replace(/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,"")),n(t)?Number(t):i}},{"../constants/numerical":672,"fast-isnumeric":123}],679:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("tinycolor2"),a=t("../components/colorscale/get_scale"),o=(Object.keys(t("../components/colorscale/scales")),t("./nested_property")),s=/^([2-9]|[1-9][0-9]+)$/;r.valObjects={data_array:{coerceFunction:function(t,e,r){Array.isArray(t)?e.set(t):void 0!==r&&e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)}},boolean:{coerceFunction:function(t,e,r){!0===t||!1===t?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(a(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?(Math.abs(t)>180&&(t-=360*Math.round(t/360)),e.set(+t)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r){var n=r.length;if("string"==typeof t&&t.substr(0,n)===r&&s.test(t.substr(n)))return void e.set(t);e.set(r)},validateFunction:function(t,e){var r=e.dflt,n=r.length;return t===r||"string"==typeof t&&!(t.substr(0,n)!==r||!s.test(t.substr(n)))}},flaglist:{coerceFunction:function(t,e,r,n){if("string"!=typeof t)return void e.set(r);if(-1!==(n.extras||[]).indexOf(t))return void e.set(t);for(var i=t.split("+"),a=0;a0&&(o=o.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+o}return n}function l(t){return t.formatDate("yyyy")}function u(t){return t.formatDate("M yyyy")}function c(t){return t.formatDate("M d")}function h(t){return t.formatDate("M d, yyyy")}var f=t("d3"),d=t("fast-isnumeric"),p=t("./loggers").error,m=t("./mod"),g=t("../constants/numerical"),v=g.BADNUM,y=g.ONEDAY,b=g.ONEHOUR,x=g.ONEMIN,_=g.ONESEC,w=g.EPOCHJD,M=t("../registry"),k=f.time.format.utc,A=(new Date).getFullYear()-70;r.dateTick0=function(t,e){return n(t)?e?M.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:M.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"},r.dfltRange=function(t){return n(t)?M.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},r.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime};var T,S;r.dateTime2ms=function(t,e){if(r.isJSDate(t))return t=Number(t)-t.getTimezoneOffset()*x,t>=T&&t<=S?t:v;if("string"!=typeof t&&"number"!=typeof t)return v;t=String(t);var i=n(e),a=t.charAt(0);!i||"G"!==a&&"g"!==a||(t=t.substr(1),e="");var o=i&&"chinese"===e.substr(0,7),s=t.match(o?/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m:/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m);if(!s)return v;var l=s[1],u=s[3]||"1",c=Number(s[5]||1),h=Number(s[7]||0),f=Number(s[9]||0),d=Number(s[11]||0);if(i){if(2===l.length)return v;l=Number(l);var p;try{var m=M.getComponentMethod("calendars","getCal")(e);if(o){var g="i"===u.charAt(u.length-1);u=parseInt(u,10),p=m.newDate(l,m.toMonthIndex(l,u,g),c)}else p=m.newDate(l,Number(u),c)}catch(t){return v}return p?(p.toJD()-w)*y+h*b+f*x+d*_:v}l=2===l.length?(Number(l)+2e3-A)%100+A:Number(l),u-=1;var k=new Date(Date.UTC(2e3,u,c,h,f));return k.setUTCFullYear(l),k.getUTCMonth()!==u?v:k.getUTCDate()!==c?v:k.getTime()+d*_},T=r.MIN_MS=r.dateTime2ms("-9999"),S=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==v};var E=90*y,L=3*b,C=5*x;r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=T&&t<=S))return v;e||(e=0);var i,o,s,l,u,c,h=Math.floor(10*m(t+.05,1)),f=Math.round(t-h/10);if(n(r)){var d=Math.floor(f/y)+w,p=Math.floor(m(t,y));try{i=M.getComponentMethod("calendars","getCal")(r).fromJD(d).formatDate("yyyy-mm-dd")}catch(t){i=k("G%Y-%m-%d")(new Date(f))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=e=T+y&&t<=S-y))return v;var e=Math.floor(10*m(t+.05,1)),r=new Date(Math.round(t-e/10));return a(f.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,i){if(r.isJSDate(t)||"number"==typeof t){if(n(i))return p("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,i))return p("unrecognized date",t),e;return t};var z=/%\d?f/g,D=[59,59.9,59.99,59.999,59.9999],I=k("%Y"),P=k("%b %Y"),O=k("%b %-d"),R=k("%b %-d, %Y");r.formatDate=function(t,e,r,i){var a,f;if(i=n(i)&&i,e)return o(e,t,i);if(i)try{var d=Math.floor((t+.05)/y)+w,p=M.getComponentMethod("calendars","getCal")(i).fromJD(d);"y"===r?f=l(p):"m"===r?f=u(p):"d"===r?(a=l(p),f=c(p)):(a=h(p),f=s(t,r))}catch(t){return"Invalid"}else{var m=new Date(Math.floor(t+.05));"y"===r?f=I(m):"m"===r?f=P(m):"d"===r?(a=I(m),f=O(m)):(a=R(m),f=s(t,r))}return f+(a?"\n"+a:"")};var j=3*y;r.incrementMonth=function(t,e,r){r=n(r)&&r;var i=m(t,y);if(t=Math.round(t-i),r)try{var a=Math.round(t/y)+w,o=M.getComponentMethod("calendars","getCal")(r),s=o.fromJD(a);return e%12?o.add(s,e,"m"):o.add(s,e/12,"y"),(s.toJD()-w)*y+i}catch(e){p("invalid ms "+t+" in calendar "+r)}var l=new Date(t+j);return l.setUTCMonth(l.getUTCMonth()+e)+i-j},r.findExactDates=function(t,e){for(var r,i,a=0,o=0,s=0,l=0,u=n(e)&&M.getComponentMethod("calendars","getCal")(e),c=0;c0&&(i.push(a),a=[])}return a.length>0&&i.push(a),i},r.makeLine=function(t,e){var r={};return r=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t},e&&(r.trace=e),r},r.makePolygon=function(t,e){var r={};if(1===t.length)r={type:"Polygon",coordinates:t};else{for(var n=new Array(t.length),i=0;i",e))>=0;){var r=t.indexOf("",e);if(r/g,"\n")}function a(t){return t.replace(/\<.*\>/g,"")}function o(t){for(var e=u.entityToUnicode,r=0;(r=t.indexOf("&",r))>=0;){var n=t.indexOf(";",r);if(nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},i.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},i.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o-1||c!==1/0&&c>=Math.pow(2,r)?t(e,r,n):l},i.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)},r["_"+e]=t,r},i.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,u=new Array(l),c=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*u[n];c[r]=a}return c},i.syncOrAsync=function(t,e,r){function n(){return i.syncOrAsync(t,e,r)}for(var a,o;t.length;)if(o=t.splice(0,1)[0],(a=o(e))&&a.then)return a.then(n).then(void 0,i.promiseError);return r&&r(e)},i.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},i.noneOrAll=function(t,e,r){if(t){var n,i,a=!1,o=!0;for(n=0;n1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l}},{"./clean_number":678,"./coerce":679,"./dates":680,"./extend":682,"./filter_unique":683,"./filter_visible":684,"./identity":689,"./is_array":691,"./is_plain_object":692,"./loggers":693,"./matrix":694,"./mod":695,"./nested_property":696,"./noop":697,"./notifier":698,"./push_unique":701,"./relink_private":703,"./search":704,"./stats":707,"./to_log_range":710,d3:114}],691:[function(t,e,r){"use strict";var n="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}};e.exports=function(t){return Array.isArray(t)||n.isView(t)}},{}],692:[function(t,e,r){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],693:[function(t,e,r){"use strict";function n(t,e){if(t.apply)t.apply(t,e);else for(var r=0;r1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;e=0;e--){if(n=t[e][0],a=t[e][1],l=!1,d(n))for(r=n.length-1;r>=0;r--)i(n[r],o(a,r))?l?n[r]=void 0:n.pop():l=!0;else if("object"==typeof n&&null!==n)for(s=Object.keys(n),l=!1,r=s.length-1;r>=0;r--)i(n[s[r]],o(a,s[r]))?delete n[s[r]]:l=!0;if(l)return}}function c(t){return void 0===t||null===t||"object"==typeof t&&(d(t)?!t.length:!Object.keys(t).length)}function h(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var f=t("fast-isnumeric"),d=t("./is_array"),p=t("./is_plain_object"),m=t("../plot_api/container_array_match");e.exports=function(t,e){if(f(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var r,i,o,s=0,l=e.split(".");s/g),s=0;sa||ns)&&(!e||!u(t))}function r(t,e){var r=t[0],l=t[1];if(ra||ls)return!1;var u,c,h,f,d,p=n.length,m=n[0][0],g=n[0][1],v=0;for(u=1;uMath.max(c,m)||l>Math.max(h,g)))if(lc||Math.abs(n(o,f))>i)return!0;return!1};i.filter=function(t,e){function r(r){t.push(r);var s=n.length,l=i;n.splice(o+1);for(var u=l+1;u1){r(t.pop())}return{addPt:r,raw:t,filtered:n}}},{"./matrix":694}],701:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;ra.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},o.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},o.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},o.undo=function(t){var e,r;if(t.framework&&t.framework.isPolar)return void t.framework.undo();if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function o(t,e){return t>=e}var s=t("fast-isnumeric"),l=t("./loggers");r.findBin=function(t,e,r){if(s(e.start))return r?Math.ceil((t-e.start)/e.size)-1:Math.floor((t-e.start)/e.size);var u,c,h=0,f=e.length,d=0;for(c=e[e.length-1]>=e[0]?r?n:i:r?o:a;h90&&l.log("Long binary search..."),h-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,i=e[n]-e[0]||1,a=i/(n||1)/1e4,o=[e[0]],s=0;se[s]+a&&(i=Math.min(i,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:i}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;it.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{"fast-isnumeric":123}],708:[function(t,e,r){"use strict";function n(t){var e=i(t);return e.length?e:[0,0,0,1]}var i=t("color-rgba");e.exports=n},{"color-rgba":87}],709:[function(t,e,r){"use strict";function n(t,e){return t.node().getBoundingClientRect()[e]}function i(t){return t.replace(/(<|<|<)/g,"\\lt ").replace(/(>|>|>)/g,"\\gt ")}function a(t,e,r){var n="math-output-"+f.randstr([],64),a=h.select("body").append("div").attr({id:n}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(i(t));MathJax.Hub.Queue(["Typeset",MathJax.Hub,a.node()],function(){var e=h.select("body").select("#MathJax_SVG_glyphs");if(a.select(".MathJax_SVG").empty()||!a.select("svg").node())f.log("There was an error in the tex syntax.",t),r();else{var n=a.select("svg").node().getBoundingClientRect();r(a.select(".MathJax_SVG"),e,n)}a.remove()})}function o(t,e){for(var r=t||"",n=0;n]*>)/).map(function(t){var e=t.match(/<(\/?)([^ >]*)\s*(.*)>/i),n=e&&e[2].toLowerCase(),i=m[n];if(void 0!==i){var a=e[1],o=e[3],s=o.match(/^style\s*=\s*"([^"]+)"\s*/i);if("a"===n){if(a)return"
";if("href"!==o.substr(0,4).toLowerCase())return"";var u=o.substr(4).replace(/["']/g,"").replace(/=/,""),c=document.createElement("a");return c.href=u,-1===g.indexOf(c.protocol)?"":''}if("br"===n)return"
";if(a)return"sup"===n?'':"sub"===n?'':"";var h=""}return r.xml_entity_encode(t).replace(/");i>0;i=e.indexOf("
",i+1))n.push(i);var a=0;n.forEach(function(t){for(var r=t+a,n=e.slice(0,r),i="",o=n.length-1;o>=0;o--){var s=n[o].match(/<(\/?).*>/i);if(s&&"
"!==n[o]){s[1]||(i=n[o]);break}}i&&(e.splice(r+1,0,i),e.splice(r,0,""),a+=2)});var o=e.join(""),u=o.split(/
/gi);return u.length>1&&(e=u.map(function(t,e){return''+t+""})),e.join("")}function c(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||"top",l=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return i="bottom"===s?function(){return l.bottom-n.height}:"middle"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},a="right"===o?function(){return l.right-n.width}:"center"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:i()-u.top+"px",left:a()-u.left+"px","z-index":1e3}),this}}var h=t("d3"),f=t("../lib"),d=t("../constants/xmlns_namespaces"),p=t("../constants/string_mappings");h.selection.prototype.appendSVG=function(t){for(var e=['',t,""].join(""),r=(new DOMParser).parseFromString(e,"application/xml"),n=r.documentElement.firstChild;n;)this.node().appendChild(this.node().ownerDocument.importNode(n,!0)),n=n.nextSibling;return r.querySelector("parsererror")?(f.log(r.querySelector("parsererror div").textContent),null):h.select(this.node().lastChild)},r.html_entity_decode=function(t){var e=h.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":-1!==t.indexOf("<")||-1!==t.indexOf(">")?"":e.html(t).text()});return e.remove(),r},r.xml_entity_encode=function(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")},r.convertToTspans=function(t,e){function r(){d.empty()||(p=s.attr("class")+"-math",d.select("svg."+p).remove()),t.text("").style({visibility:"inherit","white-space":"pre"}),c=t.appendSVG(o),c||t.text(i),t.select("a").size()&&t.style("pointer-events","all"),e&&e.call(s)}var i=t.text(),o=u(i),s=t,l=!s.attr("data-notex")&&o.match(/([^$]*)([$]+[^$]*[$]+)([^$]*)/),c=i,d=h.select(s.node().parentNode);if(!d.empty()){var p=s.attr("class")?s.attr("class").split(" ")[0]:"text";p+="-math",d.selectAll("svg."+p).remove(),d.selectAll("g."+p+"-group").remove(),t.style({visibility:null});for(var m=t.node();m&&m.removeAttribute;m=m.parentNode)m.removeAttribute("data-bb");if(l){var g=f.getPlotDiv(s.node());(g&&g._promises||[]).push(new Promise(function(t){s.style({visibility:"hidden"});var i={fontSize:parseInt(s.style("font-size"),10)};a(l[2],i,function(i,a,o){d.selectAll("svg."+p).remove(),d.selectAll("g."+p+"-group").remove();var l=i&&i.select("svg");if(!l||!l.node())return r(),void t();var u=d.append("g").classed(p+"-group",!0).attr({"pointer-events":"none"});u.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild),l.attr({class:p,height:o.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=s.style("fill")||"black";l.select("g").attr({fill:c,stroke:c});var h=n(l,"width"),f=n(l,"height"),m=+s.attr("x")-h*{start:0,middle:.5,end:1}[s.attr("text-anchor")||"start"],g=parseInt(s.style("font-size"),10)||n(s,"height"),v=-g/4;"y"===p[0]?(u.attr({transform:"rotate("+[-90,+s.attr("x"),+s.attr("y")]+") translate("+[-h/2,v-f/2]+")"}),l.attr({x:+s.attr("x"),y:+s.attr("y")})):"l"===p[0]?l.attr({x:s.attr("x"),y:v-f/2}):"a"===p[0]?l.attr({x:0,y:v}):l.attr({x:m,y:+s.attr("y")+v-f/2}),e&&e.call(s,u),t(u)})}))}else r();return t}};var m={sup:'font-size:70%" dy="-0.6em',sub:'font-size:70%" dy="0.3em',b:"font-weight:bold",i:"font-style:italic",a:"",span:"",br:"",em:"font-style:italic;font-weight:bold"},g=["http:","https:","mailto:"],v=new RegExp("]*)?/?>","g"),y=Object.keys(p.entityToUnicode).map(function(t){return{regExp:new RegExp("&"+t+";","g"),sub:p.entityToUnicode[t]}}),b=Object.keys(p.unicodeToEntity).map(function(t){return{regExp:new RegExp(t,"g"),sub:"&"+p.unicodeToEntity[t]+";"}}),x=/(\r\n?|\n)/g;r.plainText=function(t){return(t||"").replace(v," ")},r.makeEditable=function(t,e,r){function n(){a(),o.style({opacity:0});var t,e=u.attr("class");(t=e?"."+e.split(" ")[0]+"-math-group":"[class*=-math-group]")&&h.select(o.node().parentNode).select(t).style({opacity:0})}function i(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}function a(){var t=f.getPlotDiv(o.node()),e=h.select(t),n=e.select(".svg-container"),a=n.append("div");a.classed("plugin-editable editable",!0).style({position:"absolute","font-family":o.style("font-family")||"Arial","font-size":o.style("font-size")||12,color:r.fill||o.style("fill")||"black",opacity:1,"background-color":r.background||"transparent",outline:"#ffffff33 1px solid",margin:[-parseFloat(o.style("font-size"))/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(r.text||o.attr("data-unformatted")).call(c(o,n,r)).on("blur",function(){t._editing=!1,o.text(this.textContent).style({opacity:1});var e,r=h.select(this).attr("class");(e=r?"."+r.split(" ")[0]+"-math-group":"[class*=-math-group]")&&h.select(o.node().parentNode).select(e).style({opacity:0});var n=this.textContent;h.select(this).transition().duration(0).remove(),h.select(document).on("mouseup",null),s.edit.call(o,n)}).on("focus",function(){var e=this;t._editing=!0,h.select(document).on("mouseup",function(){if(h.event.target===e)return!1;document.activeElement===a.node()&&a.node().blur()})}).on("keyup",function(){27===h.event.which?(t._editing=!1,o.style({opacity:1}),h.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),s.cancel.call(o,this.textContent)):(s.input.call(o,this.textContent),h.select(this).call(c(o,n,r)))}).on("keydown",function(){13===h.event.which&&this.blur()}).call(i)}r||(r={});var o=this,s=h.dispatch("edit","input","cancel"),l=h.select(this.node()).style({"pointer-events":"all"}),u=e||l;return e&&l.style({"pointer-events":"none"}),r.immediate?n():u.on("click",n),h.rebind(this,s,"on")}},{"../constants/string_mappings":673,"../constants/xmlns_namespaces":674,"../lib":690,d3:114}],710:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{"fast-isnumeric":123}],711:[function(t,e,r){"use strict";var n=e.exports={},i=t("../plots/geo/constants").locationmodeToLayer,a=t("topojson-client").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{"../plots/geo/constants":755,"topojson-client":523}],712:[function(t,e,r){"use strict";function n(t,e){for(var r=new Float32Array(e),n=0;n0)return t.substr(0,e)}var s=t("fast-isnumeric"),l=t("gl-mat4/fromQuat"),u=t("../registry"),c=t("../lib"),h=t("../plots/plots"),f=t("../plots/cartesian/axes"),d=t("../components/color");r.getGraphDiv=function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null===t||void 0===t)throw new Error("DOM element provided is null or undefined");return t},r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&c.log("Clearing previous rejected promises from queue."),t._promises=[]},r.cleanLayout=function(t){var e,r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1);var i=f.list({_fullLayout:t});for(e=0;e3?(g.x=1.02,g.xanchor="left"):g.x<-2&&(g.x=-.02,g.xanchor="right"),g.y>3?(g.y=1.02,g.yanchor="bottom"):g.y<-2&&(g.y=-.02,g.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var v=h.getSubplotIds(t,"gl3d");for(e=0;e1&&o.warn("Full array edits are incompatible with other edits",c);var v=r[""][""];if(u(v))e.set(null);else{if(!Array.isArray(v))return o.warn("Unrecognized full array edit value",c,v),!0;e.set(v)}return!p&&(h(m,g),f(t),!0)}var y,b,x,_,w,M,k,A=Object.keys(r).map(Number).sort(),T=e.get(),S=T||[],E=n(g,c).get(),L=[],C=-1,z=S.length;for(y=0;yS.length-(k?0:1))o.warn("index out of range",c,x);else if(void 0!==M)w.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",c,x),u(M)?L.push(x):k?("add"===M&&(M={}),S.splice(x,0,M),E&&E.splice(x,0,{})):o.warn("Unrecognized full object edit value",c,x,M),-1===C&&(C=x);else for(b=0;b=0;y--)S.splice(L[y],1),E&&E.splice(L[y],1);if(S.length?T||e.set(S):e.set(null),p)return!1;if(h(m,g),d!==a){var D;if(-1===C)D=A;else{for(z=Math.max(S.length,z),D=[],y=0;y=C);y++)D.push(x);for(y=C;y=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function l(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),s(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&s(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function u(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&lN.range[0]?[1,2]:[2,1]);else{var V=N.range[0],q=N.range[1];B?(V<=0&&q<=0&&r(R+".autorange",!0),V<=0?V=q/1e6:q<=0&&(q=V/1e6),r(R+".range[0]",Math.log(V)/Math.LN10),r(R+".range[1]",Math.log(q)/Math.LN10)):(r(R+".range[0]",Math.pow(10,V)),r(R+".range[1]",Math.pow(10,q)))}else r(R+".autorange",!0);w.getComponentMethod("annotations","convertCoords")(t,F,T,r),w.getComponentMethod("images","convertCoords")(t,F,T,r)}else r(R+".autorange",!0)}else if(D.match(I.AX_NAME_PATTERN)){var H=b.nestedProperty(u,k).get(),Y=(T||{}).type;Y&&"-"!==Y||(Y="linear"),w.getComponentMethod("annotations","convertCoords")(t,H,Y,r),w.getComponentMethod("images","convertCoords")(t,H,Y,r)}var G=C.containerArrayMatch(k);if(G){a=G.array,o=G.index;var X=G.property,W=b.nestedProperty(l,a),Z=(W||[])[o]||{};if(""===o)-1===k.indexOf("updatemenus")&&(g.docalc=!0);else if(""===X){var J=T;C.isAddVal(T)?x[k]=null:C.isRemoveVal(T)?(x[k]=Z,J=Z):b.warn("unrecognized full object value",e),(n(J,"x")||n(J,"y")&&-1===k.indexOf("updatemenus"))&&(g.docalc=!0)}else!n(Z,"x")&&!n(Z,"y")||b.containsAny(k,["color","opacity","align","dash","updatemenus"])||(g.docalc=!0);f[a]||(f[a]={});var K=f[a][o];K||(K=f[a][o]={}),K[X]=T,delete e[k]}else if("reverse"===D)j.range?j.range.reverse():(r(R+".autorange",!0),j.range=[1,0]),F.autorange?g.docalc=!0:g.doplot=!0;else{var Q=String(A.parts[1]||"");0===L.indexOf("scene")?"camera"===A.parts[1]?g.docamera=!0:g.doplot=!0:0===L.indexOf("geo")?g.doplot=!0:0===L.indexOf("ternary")?g.doplot=!0:"paper_bgcolor"===k?g.doplot=!0:"margin"===L||"autorange"===Q||"rangemode"===Q||"type"===Q||"domain"===Q||"fixedrange"===Q||"scaleanchor"===Q||"scaleratio"===Q||-1!==k.indexOf("calendar")||k.match(/^(bar|box|font)/)?g.docalc=!0:!u._has("gl2d")||-1===k.indexOf("axis")&&"plot_bgcolor"!==k?"hiddenlabels"===k?g.docalc=!0:-1!==L.indexOf("legend")?g.dolegend=!0:-1!==k.indexOf("title")?g.doticks=!0:-1!==L.indexOf("bgcolor")?g.dolayoutstyle=!0:S>1&&b.containsAny(Q,["tick","exponent","grid","zeroline"])?g.doticks=!0:-1!==k.indexOf(".linewidth")&&-1!==k.indexOf("axis")?g.doticks=g.dolayoutstyle=!0:S>1&&-1!==Q.indexOf("line")?g.dolayoutstyle=!0:S>1&&"mirror"===Q?g.doticks=g.dolayoutstyle=!0:"margin.pad"===k?g.doticks=g.dolayoutstyle=!0:-1!==["hovermode","dragmode"].indexOf(k)?g.domodebar=!0:-1===["hovermode","dragmode","height","width","autosize"].indexOf(k)&&(g.doplot=!0):g.doplot=!0,A.set(T)}}}for(a in f){C.applyContainerArrayChanges(t,b.nestedProperty(l,a),f[a],g)||(g.doplot=!0)}var $=u._axisConstraintGroups;for(var tt in _)for(o=0;o<$.length;o++){var et=$[o];if(et[tt]){g.docalc=!0;for(var rt in et)_[rt]||(O.getFromId(t,rt)._constraintShrinkable=!0)}}var nt=u.width,it=u.height;return t.layout.autosize&&M.plotAutoSize(t,t.layout,u),(e.height||e.width||u.width!==nt||u.height!==it)&&(g.docalc=!0),(g.doplot||g.docalc)&&(g.layoutReplot=!0),{flags:g,undoit:x,redoit:v,eventData:b.extendDeep({},v)}}function m(t){var e=g.select(t),r=t._fullLayout;if(r._container=e.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([0]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n=[];g.selectAll("defs").each(function(){this.id&&n.push(this.id.split("-")[1])}),r._uid=b.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(E.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0);var a=r._paper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._toppaper.append("g").classed("hoverlayer",!0),t.emit("plotly_framework")}var g=t("d3"),v=t("fast-isnumeric"),y=t("../plotly"),b=t("../lib"),x=t("../lib/events"),_=t("../lib/queue"),w=t("../registry"),M=t("../plots/plots"),k=t("../plots/cartesian/graph_interact"),A=t("../plots/polar"),T=t("../components/drawing"),S=t("../components/errorbars"),E=t("../constants/xmlns_namespaces"),L=t("../lib/svg_text_utils"),C=t("./manage_arrays"),z=t("./helpers"),D=t("./subroutines"),I=t("../plots/cartesian/constants"),P=t("../plots/cartesian/constraints"),O=t("../plots/cartesian/axis_ids");y.plot=function(t,e,r,n){function o(){if(v)return y.addFrames(t,v)}function s(){for(var e=E._basePlotModules,r=0;r=s.length?s[0]:s[t]:s}function i(t){return Array.isArray(l)?t>=l.length?l[0]:l[t]:l}function a(t,e){var r=0;return function(){if(t&&++r===e)return t()}}if(t=z.getGraphDiv(t),!b.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var o=t._transitionData;o._frameQueue||(o._frameQueue=[]),r=M.supplyAnimationDefaults(r);var s=r.transition,l=r.frame;return void 0===o._frameWaitingCnt&&(o._frameWaitingCnt=0),new Promise(function(l,u){function c(){t.emit("plotly_animated"),window.cancelAnimationFrame(o._animationRaf),o._animationRaf=null}function h(){o._currentFrame&&o._currentFrame.onComplete&&o._currentFrame.onComplete();var e=o._currentFrame=o._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,o._lastFrameAt=Date.now(),o._timeToNext=e.frameOpts.duration,M.transition(t,e.frame.data,e.frame.layout,z.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else c()}function f(){t.emit("plotly_animating"),o._lastFrameAt=-1/0,o._timeToNext=0,o._runningTransitions=0,o._currentFrame=null;var e=function(){o._animationRaf=window.requestAnimationFrame(e),Date.now()-o._lastFrameAt>o._timeToNext&&h()};e()}function d(t){return Array.isArray(s)?g>=s.length?t.transitionOpts=s[g]:t.transitionOpts=s[0]:t.transitionOpts=s,g++,t}var p,m,g=0,v=[],y=void 0===e||null===e,x=Array.isArray(e);if(y||x||!b.isPlainObject(e)){if(y||-1!==["string","number"].indexOf(typeof e))for(p=0;p0&&kk)&&A.push(m);v=A}}v.length>0?function(e){if(0!==e.length){for(var s=0;s=0;i--)if(b.isPlainObject(e[i])){var f=(u[e[i].name]||{}).name,d=e[i].name;f&&d&&"number"==typeof d&&u[f]&&(n++,b.warn('addFrames: overwriting frame "'+u[f].name+'" with a frame whose name of type "number" also equates to "'+f+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),n>5&&b.warn("addFrames: This API call has yielded too many warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),h.push({frame:M.supplyFrameDefaults(e[i]),index:r&&void 0!==r[i]&&null!==r[i]?r[i]:c+i})}h.sort(function(t,e){return t.index>e.index?-1:t.index=0;i--){if(a=h[i].frame,"number"==typeof a.name&&b.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+t._transitionData._counter++];);if(u[a.name]){for(o=0;o=0;r--)n=e[r],a.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:i[n]});var s=M.modifyFrames,l=M.modifyFrames,u=[t,o],c=[t,a];return _&&_.add(t,s,u,l,c),M.modifyFrames(t,a)},y.purge=function(t){t=z.getGraphDiv(t);var e=t._fullLayout||{},r=t._fullData||[];return M.cleanPlot([],{},r,e),M.purge(t),x.purge(t),e._container&&e._container.remove(),delete t._context,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,delete t._hmpixcount,delete t._hmlumcount,t}},{"../components/drawing":608, +"../components/errorbars":614,"../constants/xmlns_namespaces":674,"../lib":690,"../lib/events":681,"../lib/queue":702,"../lib/svg_text_utils":709,"../plotly":724,"../plots/cartesian/axis_ids":732,"../plots/cartesian/constants":734,"../plots/cartesian/constraints":736,"../plots/cartesian/graph_interact":738,"../plots/plots":792,"../plots/polar":795,"../registry":807,"./helpers":714,"./manage_arrays":715,"./subroutines":721,d3:114,"fast-isnumeric":123}],717:[function(t,e,r){"use strict";function n(t,r){try{t._fullLayout._paper.style("background",r)}catch(t){e.exports.logging>0&&console.error(t)}}e.exports={staticPlot:!1,editable:!1,autosizable:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:"reset+autosize",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:"Edit chart",showSources:!1,displayModeBar:"hover",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,displaylogo:!0,plotGlPixelRatio:2,setBackground:n,topojsonURL:"https://cdn.plot.ly/",mapboxAccessToken:null,logging:!1,globalTransforms:[]}},{}],718:[function(t,e,r){"use strict";function n(t){var e,r;"area"===t?(e={attributes:b},r={}):(e=d.modules[t]._module,r=e.basePlotModule);var n={};n.type=null,w(n,m),w(n,e.attributes),r.attributes&&w(n,r.attributes),Object.keys(d.componentsRegistry).forEach(function(e){var r=d.componentsRegistry[e];r.schema&&r.schema.traces&&r.schema.traces[t]&&Object.keys(r.schema.traces[t]).forEach(function(e){f(n,r.schema.traces[t][e],e)})}),n.type=t;var i={meta:e.meta||{},attributes:s(n)};if(e.layoutAttributes){var a={};w(a,e.layoutAttributes),i.layoutAttributes=s(a)}return i}function i(){var t={};return w(t,g),Object.keys(d.subplotsRegistry).forEach(function(e){var r=d.subplotsRegistry[e];if(r.layoutAttributes)if("cartesian"===r.name)h(t,r,"xaxis"),h(t,r,"yaxis");else{var n="subplot"===r.attr?r.name:r.attr;h(t,r,n)}}),t=c(t),Object.keys(d.componentsRegistry).forEach(function(e){var r=d.componentsRegistry[e];r.layoutAttributes&&(r.schema&&r.schema.layout?Object.keys(r.schema.layout).forEach(function(e){f(t,r.schema.layout[e],e)}):f(t,r.layoutAttributes,r.name))}),{layoutAttributes:s(t)}}function a(t){var e=d.transformsRegistry[t],r=w({},e.attributes);return Object.keys(d.componentsRegistry).forEach(function(e){var n=d.componentsRegistry[e];n.schema&&n.schema.transforms&&n.schema.transforms[t]&&Object.keys(n.schema.transforms[t]).forEach(function(e){f(r,n.schema.transforms[t][e],e)})}),{attributes:s(r)}}function o(){var t={frames:p.extendDeep({},v)};return s(t),t.frames}function s(t){return l(t),u(t),t}function l(t){function e(t){return{valType:"string"}}function n(t,n,i){r.isValObject(t)?"data_array"===t.valType?(t.role="data",i[n+"src"]=e(n)):!0===t.arrayOk&&(i[n+"src"]=e(n)):p.isPlainObject(t)&&(t.role="object")}r.crawl(t,n)}function u(t){function e(t,e,r){if(t){var n=t[k];n&&(delete t[k],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}r.crawl(t,e)}function c(t){return _(t,{radialaxis:x.radialaxis,angularaxis:x.angularaxis}),_(t,x.layout),t}function h(t,e,r){var n=p.nestedProperty(t,r),i=w({},e.layoutAttributes);i[M]=!0,n.set(i)}function f(t,e,r){var n=p.nestedProperty(t,r);n.set(w(n.get()||{},e))}var d=t("../registry"),p=t("../lib"),m=t("../plots/attributes"),g=t("../plots/layout_attributes"),v=t("../plots/frame_attributes"),y=t("../plots/animation_attributes"),b=t("../plots/polar/area_attributes"),x=t("../plots/polar/axis_attributes"),_=p.extendFlat,w=p.extendDeep,M="_isSubplotObj",k="_isLinkedToArray",A=[M,k,"_arrayAttrRegexps","_deprecated"];r.IS_SUBPLOT_OBJ=M,r.IS_LINKED_TO_ARRAY=k,r.DEPRECATED="_deprecated",r.UNDERSCORE_ATTRS=A,r.get=function(){var t={};d.allTypes.concat("area").forEach(function(e){t[e]=n(e)});var e={};return Object.keys(d.transformsRegistry).forEach(function(t){e[t]=a(t)}),{defs:{valObjects:p.valObjects,metaKeys:A.concat(["description","role"])},traces:t,layout:i(),transforms:e,frames:o(),animation:s(y)}},r.crawl=function(t,e,n){var i=n||0;Object.keys(t).forEach(function(n){var a=t[n];-1===A.indexOf(n)&&(e(a,n,t,i),r.isValObject(a)||p.isPlainObject(a)&&r.crawl(a,e,i+1))})},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){function e(e,r,o,s){if(a=a.slice(0,s).concat([r]),e&&("data_array"===e.valType||!0===e.arrayOk)){var l=n(a),u=p.nestedProperty(t,l).get();Array.isArray(u)&&i.push(l)}}function n(t){return t.join(".")}var i=[],a=[];if(r.crawl(t._module.attributes,e),t.transforms)for(var o=t.transforms,s=0;s=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}var i=t("d3"),a=t("../plotly"),o=t("../registry"),s=t("../plots/plots"),l=t("../lib"),u=t("../components/color"),c=t("../components/drawing"),h=t("../components/titles"),f=t("../components/modebar");r.layoutStyles=function(t){return l.syncOrAsync([s.doAutoMargin,r.lsInner],t)},r.lsInner=function(t){var e,o=t._fullLayout,s=o._size,l=a.Axes.list(t);for(e=0;e1)};f(e.width)&&f(e.height)||n(new Error("Height and width should be pixel values."));var d=l(t,{format:"png",height:e.height,width:e.width}),p=d.gd;p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var m=s.getRedrawFunc(p);a.plot(p,d.data,d.layout,d.config).then(m).then(h).then(function(t){r(t)}).catch(function(t){n(t)})})}var i=t("fast-isnumeric"),a=t("../plotly"),o=t("../lib"),s=t("../snapshot/helpers"),l=t("../snapshot/cloneplot"),u=t("../snapshot/tosvg"),c=t("../snapshot/svgtoimg");e.exports=n},{"../lib":690,"../plotly":724,"../snapshot/cloneplot":808,"../snapshot/helpers":811,"../snapshot/svgtoimg":813,"../snapshot/tosvg":815,"fast-isnumeric":123}],723:[function(t,e,r){"use strict";function n(t,e,r,i,a,u){u=u||[];for(var c=Object.keys(t),f=0;f1&&l.push(o("object","layout"))),f.supplyDefaults(u);for(var c=u._fullData,g=r.length,v=0;v.3*h||a(n)||a(i))){var f=r.dtick/2;t+=t+f.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=O.tickIncrement(t,"M6","reverse")+1.5*C:a.exactMonths>.8?t=O.tickIncrement(t,"M1","reverse")+15.5*C:t-=C/2;var s=O.tickIncrement(t,r);if(s<=n)return s}return t}function a(t){var e,r,n=t.tickvals,i=t.ticktext,a=new Array(n.length),o=_.simpleMap(t.range,t.r2l),s=1.0001*o[0]-1e-4*o[1],u=1.0001*o[1]-1e-4*o[0],c=Math.min(s,u),h=Math.max(s,u),f=0;Array.isArray(i)||(i=[]);var d="category"===t.type?t.d2l_noadd:t.d2l;for("log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1)),r=0;rc&&e10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=C&&i<=10||e>=15*C)t._tickround="d";else if(e>=D&&i<=16||e>=z)t._tickround="M";else if(e>=I&&i<=19||e>=D)t._tickround="S";else{var a=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,a)-20}}else if(b(e)||"L"===e.charAt(0)){var o=t.range.map(t.r2d||Number);b(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01);Math.abs(l)>3&&("SI"===t.exponentformat||"B"===t.exponentformat?t._tickexponent=3*Math.round((l-1)/3):t._tickexponent=l)}else t._tickround=null}function l(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}function u(t,e,r,n){var i=t._tickround,a=r&&t.hoverformat||t.tickformat;n&&(i=b(i)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o,s=_.formatDate(e.x,a,i,t.calendar),l=s.indexOf("\n");-1!==l&&(o=s.substr(l+1),s=s.substr(0,l)),n&&("00:00:00"===s||"00:00"===s?(s=o,o=""):8===s.length&&(s=s.replace(/:00$/,""))),o&&(r?"d"===i?s+=", "+o:s=o+(s?", "+s:""):t._inCalcTicks&&o===t._prevDateHead||(s+="
"+o,t._prevDateHead=o)),e.text=s}function c(t,e,r,n,i){var a=t.dtick,o=e.x;if(!n||"string"==typeof a&&"L"===a.charAt(0)||(a="L3"),t.tickformat||"string"==typeof a&&"L"===a.charAt(0))e.text=d(Math.pow(10,o),t,i,n);else if(b(a)||"D"===a.charAt(0)&&_.mod(o+.01,1)<.1)if(-1!==["e","E","power"].indexOf(t.exponentformat)){var s=Math.round(o);e.text=0===s?1:1===s?"10":s>1?"10"+s+"":"10\u2212"+-s+"",e.fontSize*=1.25}else e.text=d(Math.pow(10,o),t,"","fakehover"),"D1"===a&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6);else{if("D"!==a.charAt(0))throw"unrecognized dtick "+String(a);e.text=String(Math.round(Math.pow(10,_.mod(o,1)))),e.fontSize*=.75}if("D1"===t.dtick){var l=String(e.text).charAt(0);"0"!==l&&"1"!==l||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(o<0?.5:.25)))}}function h(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}function f(t,e,r,n,i){"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=d(e.x,t,i,n)}function d(t,e,r,n){var i=t<0,a=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,u=e.tickformat,c=e.separatethousands;if(n){var h={exponentformat:e.exponentformat,dtick:"none"===e.showexponent?e.dtick:b(t)?Math.abs(t)||1:1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};s(h),a=(Number(h._tickround)||0)+4,l=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return y.format(u)(t).replace(/-/g,"\u2212");var f=Math.pow(10,-a)/2;if("none"===o&&(l=0),(t=Math.abs(t))12||l<-15)?t+="e"+m:"E"===o?t+="E"+m:"power"===o?t+="\xd710"+m+"":"B"===o&&9===l?t+="B":"SI"!==o&&"B"!==o||(t+=q[l/3+5])}return i?"\u2212"+t:t}function p(t,e){var r,n,i=[];for(r=0;r1)for(n=1;n2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},O.getAutoRange=function(t){var e,r=[],n=t._min[0].val,i=t._max[0].val;for(e=1;e0&&c>0&&h/c>f&&(l=o,u=s,f=h/c);if(n===i){var m=n-1,g=n+1;r="tozero"===t.rangemode?n<0?[m,0]:[0,g]:"nonnegative"===t.rangemode?[Math.max(0,m),Math.max(0,g)]:[m,g]}else f&&("linear"!==t.type&&"-"!==t.type||("tozero"===t.rangemode?(l.val>=0&&(l={val:0,pad:0}),u.val<=0&&(u={val:0,pad:0})):"nonnegative"===t.rangemode&&(l.val-f*l.pad<0&&(l={val:0,pad:0}),u.val<0&&(u={val:1,pad:0})),f=(u.val-l.val)/(t._length-l.pad-u.pad)),r=[l.val-f*l.pad,u.val+f*u.pad]);return r[0]===r[1]&&("tozero"===t.rangemode?r=r[0]<0?[r[0],0]:r[0]>0?[0,r[0]]:[0,1]:(r=[r[0]-1,r[0]+1],"nonnegative"===t.rangemode&&(r[0]=Math.max(0,r[0])))),d&&r.reverse(),_.simpleMap(r,t.l2r||Number)},O.doAutoRange=function(t){t._length||t.setScale();var e=t._min&&t._max&&t._min.length&&t._max.length;if(t.autorange&&e){t.range=O.getAutoRange(t);var r=t._input;r.range=t.range.slice(),r.autorange=t.autorange}},O.saveRangeInitial=function(t,e){for(var r=O.list(t,"",!0),n=!1,i=0;i=f?d=!1:s.val>=u&&s.pad<=f&&(t._min.splice(o,1),o--);d&&t._min.push({val:u,pad:y&&0===u?0:f})}if(n(c)){for(d=!0,o=0;o=c&&s.pad>=h?d=!1:s.val<=c&&s.pad<=h&&(t._max.splice(o,1),o--);d&&t._max.push({val:c,pad:y&&0===c?0:h})}}}if((t.autorange||!!_.nestedProperty(t,"rangeslider.autorange").get())&&e){t._min||(t._min=[]),t._max||(t._max=[]),r||(r={}),t._m||t.setScale();var a,o,s,l,u,c,h,f,d,p,m,g=e.length,v=r.padded?.05*t._length:0,y=r.tozero&&("linear"===t.type||"-"===t.type),x=n((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),w=n((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),M=n(r.vpadplus||r.vpad),k=n(r.vpadminus||r.vpad);for(a=0;a<6;a++)i(a);for(a=g-1;a>5;a--)i(a)}},O.autoBin=function(t,e,r,a,o){var s=_.aggNums(Math.min,null,t),l=_.aggNums(Math.max,null,t);if(o||(o=e.calendar),"category"===e.type)return{start:s-.5,end:l+.5,size:1};var u;if(r)u=(l-s)/r;else{var c=_.distinctVals(t),h=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),f=h*_.roundUp(c.minDiff/h,[.9,1.9,4.9,9.9],!0);u=Math.max(f,2*_.stdev(t)/Math.pow(t.length,a?.25:.4)),b(u)||(u=1)}var d;d="log"===e.type?{type:"linear",range:[s,l]}:{type:e.type,range:_.simpleMap([s,l],e.c2r,0,o),calendar:o},O.setConvert(d),O.autoTicks(d,u);var p,m=O.tickIncrement(O.tickFirst(d),d.dtick,"reverse",o);if("number"==typeof d.dtick){m=n(m,t,d,s,l);p=m+(1+Math.floor((l-m)/d.dtick))*d.dtick}else for("M"===d.dtick.charAt(0)&&(m=i(m,t,d.dtick,s,o)),p=m;p<=l;)p=O.tickIncrement(p,d.dtick,!1,o);return{start:e.c2r(m,0,o),end:e.c2r(p,0,o),size:d.dtick}},O.calcTicks=function(t){var e=_.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=_.constrain(t._length/r,4,9)+1)),"array"===t.tickmode&&(n*=100),O.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}if(t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),s(t),"array"===t.tickmode)return a(t);t._tmin=O.tickFirst(t);var i=e[1]=l:u<=l)&&(o.push(u),!(o.length>1e3));u=O.tickIncrement(u,t.dtick,i,t.calendar));t._tmax=o[o.length-1],t._prevDateHead="",t._inCalcTicks=!0;for(var c=new Array(o.length),h=0;hE?(e/=E,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="M"+12*o(e,r,j)):n>L?(e/=L,t.dtick="M"+o(e,1,F)):n>C?(t.dtick=o(e,C,B),t.tick0=_.dateTick0(t.calendar,!0)):n>z?t.dtick=o(e,z,F):n>D?t.dtick=o(e,D,N):n>I?t.dtick=o(e,I,N):(r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=o(e,r,j))}else if("log"===t.type){t.tick0=0;var i=_.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(i[1]-i[0])<1){var a=1.5*Math.abs((i[1]-i[0])/e);e=Math.abs(Math.pow(10,i[1])-Math.pow(10,i[0]))/a,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="L"+o(e,r,j)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):(t.tick0=0,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=o(e,r,j));if(0===t.dtick&&(t.dtick=1),!b(t.dtick)&&"string"!=typeof t.dtick){var s=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(s)}},O.tickIncrement=function(t,e,r,n){var i=r?-1:1;if(b(e))return t+i*e;var a=e.charAt(0),o=i*Number(e.substr(1));if("M"===a)return _.incrementMonth(t,o,n);if("L"===a)return Math.log(Math.pow(10,t)+o)/Math.LN10;if("D"===a){var s="D2"===e?V:U,l=t+.01*i,u=_.roundUp(_.mod(l,1),s,r);return Math.floor(l)+Math.log(y.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(e)},O.tickFirst=function(t){var e=t.r2l||Number,r=_.simpleMap(t.range,e),n=r[1]1&&e2*i}function a(t){for(var e,r=Math.max(1,(t.length-1)/1e3),n=0,i=0,a=0;a2*n}var o=t("fast-isnumeric"),s=t("../../lib"),l=t("../../constants/numerical").BADNUM;e.exports=function(t,e){return i(t,e)?"date":a(t)?"category":n(t)?"linear":"-"}},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],731:[function(t,e,r){"use strict";var n=t("tinycolor2").mix,i=t("../../registry"),a=t("../../lib"),o=t("../../components/color/attributes").lightFraction,s=t("./layout_attributes"),l=t("./tick_value_defaults"),u=t("./tick_mark_defaults"),c=t("./tick_label_defaults"),h=t("./category_order_defaults"),f=t("./set_convert"),d=t("./ordered_categories");e.exports=function(t,e,r,p,m){function g(r,n){return a.coerce2(t,e,s,r,n)}var v=p.letter,y=p.font||{},b="Click to enter "+(p.title||v.toUpperCase()+" axis")+" title",x=e.type;if("date"===x){i.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",p.calendar)}f(e,m);var _=r("color"),w=_===t.color?_:y.color;r("title",b),a.coerceFont(r,"titlefont",{family:y.family,size:Math.round(1.2*y.size),color:w}),r("autorange",!e.isValidRange(t.range))&&r("rangemode"),r("range"),e.cleanRange(),l(t,e,r,x),c(t,e,r,x,p),u(t,e,r,p),h(t,e,r);var M=g("linecolor",_),k=g("linewidth"),A=r("showline",!!M||!!k);A||(delete e.linecolor,delete e.linewidth),(A||e.ticks)&&r("mirror");var T=g("gridcolor",n(_,p.bgColor,o).toRgbString()),S=g("gridwidth");r("showgrid",p.showGrid||!!T||!!S)||(delete e.gridcolor,delete e.gridwidth);var E=g("zerolinecolor",_),L=g("zerolinewidth");return r("zeroline",p.showGrid||!!E||!!L)||(delete e.zerolinecolor,delete e.zerolinewidth),e._initialCategories="category"===x?d(v,e.categoryorder,e.categoryarray,p.data):[],e}},{"../../components/color/attributes":584,"../../lib":690,"../../registry":807,"./category_order_defaults":733,"./layout_attributes":740,"./ordered_categories":742,"./set_convert":746,"./tick_label_defaults":747,"./tick_mark_defaults":748,"./tick_value_defaults":749,tinycolor2:521}],732:[function(t,e,r){"use strict";function n(t,e,r){function n(t,r){for(var n=Object.keys(t),i=/^[xyz]axis[0-9]*/,a=[],o=0;o0;a&&(n="array");var o=r("categoryorder",n);"array"===o&&r("categoryarray"),a||"array"!==o||(e.categoryorder="trace")}}},{}],734:[function(t,e,r){"use strict";e.exports={idRegex:{x:/^x([2-9]|[1-9][0-9]+)?$/,y:/^y([2-9]|[1-9][0-9]+)?$/},attrRegex:{x:/^xaxis([2-9]|[1-9][0-9]+)?$/,y:/^yaxis([2-9]|[1-9][0-9]+)?$/},xAxisMatch:/^xaxis[0-9]*$/,yAxisMatch:/^yaxis[0-9]*$/,AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,MAXDIST:20,YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,BENDPX:1.5,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4]}},{}],735:[function(t,e,r){"use strict";function n(t,e,r,n){var i,a,s,l,u=n[o(e)].type,c=[];for(a=0;aa*p))for(r=0;r=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function u(t,e){return t?"nsew"===t?"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function c(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",i+"Z")}function h(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:T.background,stroke:T.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+r+")").attr("d","M0,0Z")}function f(t){t.selectAll(".select-outline").remove()}function d(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),i||(t.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function p(t){x.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function m(t){return-1!==["lasso","select"].indexOf(t)}function g(t,e){return"M"+(t.l-.5)+","+(e-R-.5)+"h-3v"+(2*R+1)+"h3ZM"+(t.r+.5)+","+(e-R-.5)+"h3v"+(2*R+1)+"h-3Z"}function v(t,e){return"M"+(e-R-.5)+","+(t.t-.5)+"v-3h"+(2*R+1)+"v3ZM"+(e-R-.5)+","+(t.b+.5)+"v3h"+(2*R+1)+"v-3Z"}function y(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,R)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function b(t,e,r){var n,i,a,o,s,l,u=!1,c={},h={};for(n=0;nR||s>R?(wt="xy",o/nt>s/it?(s=o*it/nt,vt>a?yt.t=vt-s:yt.b=vt+s):(o=s*nt/it,gt>i?yt.l=gt-o:yt.r=gt+o),kt.attr("d",y(yt))):n():!ot||szoom back out","long"),j=!1)}function Y(e,r){var n=1===(N+B).length;if(e)J();else if(2!==r||n){if(1===r&&n){var i=N?tt[0]:$[0],o="s"===N||"w"===B?0:1,s=i._name+".range["+o+"]",l=a(i,o),u="left",c="middle";if(i.fixedrange)return;N?(c="n"===N?"top":"bottom","right"===i.side&&(u="right")):"e"===B&&(u="right"),t._context.showAxisRangeEntryBoxes&&x.select(pt).call(A.makeEditable,null,{immediate:!0,background:ht.paper_bgcolor,text:String(l),fill:i.tickfont?i.tickfont.color:"#444",horizontalAlign:u,verticalAlign:c}).on("edit",function(e){var r=i.d2r(e);void 0!==r&&w.relayout(t,s,r)})}}else Z()}function G(e){function r(t,e,r){function n(e){return t.l2r(a+(e-a)*r)}if(!t.fixedrange){var i=k.simpleMap(t.range,t.r2l),a=i[0]+(i[1]-i[0])*e;t.range=i.map(n)}}if(t._context.scrollZoom||ht._enablescrollzoom){if(t._transitioningWithDuration)return k.pauseEvent(e);var n=t.querySelector(".plotly");if(U(),!(n.scrollHeight-n.clientHeight>10||n.scrollWidth-n.clientWidth>10)){clearTimeout(Tt);var i=-e.deltaY;if(isFinite(i)||(i=e.wheelDelta/10),!isFinite(i))return void k.log("Did not find wheel motion attributes: ",e);var a,o=Math.exp(-Math.min(Math.max(i,-20),20)/100),s=Et.draglayer.select(".nsewdrag").node().getBoundingClientRect(),l=(e.clientX-s.left)/s.width,u=(s.bottom-e.clientY)/s.height;if(B||lt){for(B||(l=.5),a=0;a<$.length;a++)r($[a],l,o);At[2]*=o,At[0]+=At[2]*l*(1/o-1)}if(N||lt){for(N||(u=.5),a=0;a0;n--)r.push(e);return r}function i(t,e){for(var r=[],n=0;nQ.width||J<0||J>Q.height)return x.unhoverRaw(t,e)}if(P="xval"in e?n(a,e.xval):i(S,Z),O="yval"in e?n(a,e.yval):i(E,J),!p(P[0])||!p(O[0]))return m.warn("Fx.hover failed",e,t),x.unhoverRaw(t,e)}var $=1/0;for(j=0;j1||-1!==N.hoverinfo.indexOf("name")?N.name:void 0,index:!1,distance:Math.min($,k.MAXDIST),color:y.defaultLine,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},o[B]&&(Y.subplot=o[B]._subplot),G=X.length,"array"===V){var tt=e[j] +;"pointNumber"in tt?(Y.index=tt.pointNumber,V="closest"):(V="","xval"in tt&&(q=tt.xval,V="x"),"yval"in tt&&(H=tt.yval,V=V?"closest":"y"))}else q=P[U],H=O[U];if(N._module&&N._module.hoverPoints){var et=N._module.hoverPoints(Y,q,H,V);if(et)for(var rt,nt=0;ntG&&(X.splice(0,G),$=X[0].distance)}if(0===X.length)return x.unhoverRaw(t,e);var it="y"===I&&W.length>1;X.sort(function(t,e){return t.distance-e.distance});var at=y.combine(o.plot_bgcolor||y.background,o.paper_bgcolor),ot={hovermode:I,rotateLabels:it,bgColor:at,container:o._hoverlayer,outerContainer:o._paperdiv},st=u(X,ot);c(X,it?"xa":"ya"),h(st,it);var lt=t._hoverdata,ut=[];for(R=0;R15&&(r=r.substr(0,12)+"...")),void 0!==t.extraText&&(n+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(n+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(n+="y: "+t.yLabel+"
"),n+=(n?"z: ":"")+t.zLabel):T&&t[i+"Label"]===g?n=t[("x"===i?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&(n=t.yLabel):n=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",t.text&&!Array.isArray(t.text)&&(n+=(n?"
":"")+t.text),""===n&&(""===r&&e.remove(),n=r);var f=e.select("text.nums").call(b.font,t.fontFamily||u,t.fontSize||c,t.fontColor||h).call(b.setPosition,0,0).text(n).attr("data-notex",1).call(v.convertToTspans);f.selectAll("tspan.line").call(b.setPosition,0,0);var p=e.select("text.name"),m=0;r&&r!==n?(p.call(b.font,t.fontFamily||u,t.fontSize||c,l).text(r).call(b.setPosition,0,0).attr("data-notex",1).call(v.convertToTspans),p.selectAll("tspan.line").call(b.setPosition,0,0),m=p.node().getBoundingClientRect().width+2*P):(p.remove(),e.select("rect").remove()),e.select("path").style({fill:l,stroke:h});var x,_,k=f.node().getBoundingClientRect(),S=t.xa._offset+(t.x0+t.x1)/2,L=t.ya._offset+(t.y0+t.y1)/2,C=Math.abs(t.x1-t.x0),z=Math.abs(t.y1-t.y0),D=k.width+I+P+m;t.ty0=w-k.top,t.bx=k.width+2*P,t.by=k.height+2*P,t.anchor="start",t.txwidth=k.width,t.tx2width=m,t.offset=0,a?(t.pos=S,x=L+z/2+D<=A,_=L-z/2-D>=0,"top"!==t.idealAlign&&x||!_?x?(L+=z/2,t.anchor="start"):t.anchor="middle":(L-=z/2,t.anchor="end")):(t.pos=L,x=S+C/2+D<=M,_=S-C/2-D>=0,"left"!==t.idealAlign&&x||!_?x?(S+=C/2,t.anchor="start"):t.anchor="middle":(S-=C/2,t.anchor="end")),f.attr("text-anchor",t.anchor),m&&p.attr("text-anchor",t.anchor),e.attr("transform","translate("+S+","+L+")"+(a?"rotate("+E+")":""))}),C}function c(t,e){function r(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var u=0;for(o=0;oe.pmax&&u++;for(o=t.length-1;o>=0&&!(u<=0);o--)l=t[o],l.pos>e.pmax-1&&(l.del=!0,u--);for(o=0;o=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(u<=0);o--)l=t[o],l.pos+l.dp+l.size>e.pmax&&(l.del=!0,u--)}}}for(var n,i,a,o,s,l,u,c=0,h=t.map(function(t,r){var n=t[e];return[{i:r,dp:0,pos:t.pos,posref:t.posref,size:t.by*("x"===n._id.charAt(0)?C:1)/2,pmin:n._offset,pmax:n._offset+n._length}]}).sort(function(t,e){return t[0].posref-e[0].posref});!n&&c<=t.length;){for(c++,n=!0,o=0;o.01&&p.pmin===m.pmin&&p.pmax===m.pmax){for(s=d.length-1;s>=0;s--)d[s].dp+=i;for(f.push.apply(f,d),h.splice(o+1,1),u=0,s=f.length-1;s>=0;s--)u+=f[s].dp;for(a=u/f.length,s=f.length-1;s>=0;s--)f[s].dp-=a;n=!1}else o++}h.forEach(r)}for(o=h.length-1;o>=0;o--){var g=h[o];for(s=g.length-1;s>=0;s--){var v=g[s],y=t[v.i];y.offset=v.dp,y.del=v.del}}}function h(t,e){t.each(function(t){var r=d.select(this);if(t.del)return void r.remove();var n="end"===t.anchor?-1:1,i=r.select("text.nums"),a={start:1,end:-1,middle:0}[t.anchor],o=a*(I+P),s=o+a*(t.txwidth+P),l=0,u=t.offset;"middle"===t.anchor&&(o-=t.tx2width/2,s-=t.tx2width/2),e&&(u*=-D,l=t.offset*z),r.select("path").attr("d","middle"===t.anchor?"M-"+t.bx/2+",-"+t.by/2+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(n*I+l)+","+(I+u)+"v"+(t.by/2-I)+"h"+n*t.bx+"v-"+t.by+"H"+(n*I+l)+"V"+(u-I)+"Z"),i.call(b.setPosition,o+l,u+t.ty0-t.by/2+P).selectAll("tspan.line").attr({x:i.attr("x"),y:i.attr("y")}),t.tx2width&&(r.select("text.name, text.name tspan.line").call(b.setPosition,s+a*P+l,u+t.ty0-t.by/2+P),r.select("rect").call(b.setRect,s+(a-1)*t.tx2width/2+l,u-t.by/2-1,t.tx2width,t.by+2))})}function f(t,e,r){if(!e.target)return!1;if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber))return!0}return!1}var d=t("d3"),p=t("fast-isnumeric"),m=t("../../lib"),g=t("../../lib/events"),v=t("../../lib/svg_text_utils"),y=t("../../components/color"),b=t("../../components/drawing"),x=t("../../components/dragelement"),_=t("../../lib/override_cursor"),w=t("../../registry"),M=t("./axes"),k=t("./constants"),A=t("./dragbox"),T=t("../layout_attributes"),S=e.exports={};S.unhover=x.unhover,S.supplyLayoutDefaults=function(t,e,r){function n(r,n){return m.coerce(t,e,T,r,n)}n("dragmode");var i;if(e._has("cartesian")){i=(e._isHoriz=S.isHoriz(r))?"y":"x"}else i="closest";n("hovermode",i)},S.isHoriz=function(t){for(var e=!0,r=0;rt._lastHoverTime+k.HOVERMINTIME)return o(t,e,r),void(t._lastHoverTime=Date.now());t._hoverTimer=setTimeout(function(){o(t,e,r),t._lastHoverTime=Date.now(),t._hoverTimer=void 0},k.HOVERMINTIME)},S.getDistanceFunction=function(t,e,r,n){return"closest"===t?n||a(e,r):"x"===t?e:r},S.getClosest=function(t,e,r){if(!1!==r.index)r.index>=0&&r.indexc[1]-.01&&(e.domain=[0,1]),i.noneOrAll(t.domain,e.domain,[0,1])}return e}},{"../../lib":690,"fast-isnumeric":123}],744:[function(t,e,r){"use strict";e.exports=function(t,e,r){void 0===r&&(r=.5);var n=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=n[0]+(n[1]-n[0])*r,a=(i-n[0])*e;t.range=t._input.range=[t.l2r(i-a),t.l2r(i+a)]}},{}],745:[function(t,e,r){"use strict";function n(t){return t._id}var i=t("../../lib/polygon"),a=t("../../components/color"),o=t("./axes"),s=t("./constants"),l=i.filter,u=i.tester,c=s.MINSELECT;e.exports=function(t,e,r,i,h){function f(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return t.p2d(r[e])}}function d(t,e){return t-e}var p,m=i.gd._fullLayout._zoomlayer,g=i.element.getBoundingClientRect(),v=i.plotinfo.xaxis._offset,y=i.plotinfo.yaxis._offset,b=e-g.left,x=r-g.top,_=b,w=x,M="M"+b+","+x,k=i.xaxes[0]._length,A=i.yaxes[0]._length,T=i.xaxes.map(n),S=i.yaxes.map(n),E=i.xaxes.concat(i.yaxes);"lasso"===h&&(p=l([[b,x]],s.BENDPX));var L=m.selectAll("path.select-outline").data([1,2]);L.enter().append("path").attr("class",function(t){return"select-outline select-outline-"+t}).attr("transform","translate("+v+", "+y+")").attr("d",M+"Z");var C,z,D,I,P,O=m.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1}).attr("transform","translate("+v+", "+y+")").attr("d","M0,0Z"),R=[],j=i.gd,F=[];for(C=0;Cf?d:o(t)?Number(t):d):d}var a=t("d3"),o=t("fast-isnumeric"),s=t("../../lib"),l=s.cleanNumber,u=s.ms2DateTime,c=s.dateTime2ms,h=t("../../constants/numerical"),f=h.FP_SAFE,d=h.BADNUM,p=t("./constants"),m=t("./axis_ids");e.exports=function(t,e){function r(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-3*w*Math.abs(n-i))}return d}function h(e,r,n){var i=c(e,n||t.calendar);if(i===d){if(!o(e))return d;i=c(new Date(+e))}return i}function g(e,r,n){return u(e,r,n||t.calendar)}function v(e){return t._categories[Math.round(e)]}function y(e){if(null!==e&&void 0!==e){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return d}function b(e){if(t._categoriesMap){var r=t._categoriesMap[e];if(void 0!==r)return r}if("number"==typeof e)return e}function x(e){return o(e)?a.round(t._b+t._m*e,2):d}function _(e){return(e-t._b)/t._m}e=e||{};var w=10;t.c2l="log"===t.type?r:i,t.l2c="log"===t.type?n:i,t.l2p=x,t.p2l=_,t.c2p="log"===t.type?function(t,e){return x(r(t,e))}:x,t.p2c="log"===t.type?function(t){return n(_(t))}:_,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=i,t.d2p=t.r2p=function(t){return x(l(t))},t.p2d=t.p2r=_):"log"===t.type?(t.d2r=t.d2l=function(t,e){return r(l(t),e)},t.r2d=t.r2c=function(t){return n(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=i,t.c2r=r,t.l2d=n,t.d2p=function(e,r){return x(t.d2r(e,r))},t.p2d=function(t){return n(_(t))},t.r2p=function(t){return x(l(t))},t.p2r=_):"date"===t.type?(t.d2r=t.r2d=s.identity,t.d2c=t.r2c=t.d2l=t.r2l=h,t.c2d=t.c2r=t.l2d=t.l2r=g,t.d2p=t.r2p=function(t,e,r){return x(h(t,0,r))},t.p2d=t.p2r=function(t,e,r){return g(_(t),e,r)}):"category"===t.type&&(t.d2r=t.d2c=t.d2l=y,t.r2d=t.c2d=t.l2d=v,t.d2l_noadd=b,t.r2l=t.l2r=t.r2c=t.c2r=i,t.d2p=function(t){return x(b(t))},t.p2d=function(t){return v(_(t))},t.r2p=x,t.p2r=_),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e){e||(e="range");var r,n,i=s.nestedProperty(t,e).get(),a=(t._id||"x").charAt(0);if(n="date"===t.type?s.dfltRange(t.calendar):"y"===a?p.DFLTRANGEY:p.DFLTRANGEX,n=n.slice(),!i||2!==i.length)return void s.nestedProperty(t,e).set(n);for("date"===t.type&&(i[0]=s.cleanDate(i[0],d,t.calendar),i[1]=s.cleanDate(i[1],d,t.calendar)),r=0;r<2;r++)if("date"===t.type){if(!s.isDateTime(i[r],t.calendar)){t[e]=n;break}if(t.r2l(i[0])===t.r2l(i[1])){var l=s.constrain(t.r2l(i[0]),s.MIN_MS+1e3,s.MAX_MS-1e3);i[0]=t.l2r(l-1e3),i[1]=t.l2r(l+1e3);break}}else{if(!o(i[r])){if(!o(i[1-r])){t[e]=n;break}i[r]=i[1-r]*(r?10:.1)}if(i[r]<-f?i[r]=-f:i[r]>f&&(i[r]=f),i[0]===i[1]){var u=Math.max(1,Math.abs(1e-6*i[0]));i[0]-=u,i[1]+=u}}},t.setScale=function(r){var n=e._size,i=t._id.charAt(0);if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var a=m.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var o=r&&t._r?"_r":"range",l=t.calendar;t.cleanRange(o);var u=t.r2l(t[o][0],l),c=t.r2l(t[o][1],l);if("y"===i?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),!isFinite(t._m)||!isFinite(t._b))throw s.notifier("Something went wrong with axis scaling","long"),e._replotting=!1,new Error("axis scaling")},t.makeCalcdata=function(e,r){var n,i,a,o="date"===t.type&&e[r+"calendar"];if(r in e)for(n=e[r],i=new Array(n.length),a=0;a0?Number(c):u;else if("string"!=typeof c)e.dtick=u;else{var h=c.charAt(0),f=c.substr(1);f=n(f)?Number(f):0,(f<=0||!("date"===o&&"M"===h&&f===Math.round(f)||"log"===o&&"L"===h||"log"===o&&"D"===h&&(1===f||2===f)))&&(e.dtick=u)}var d="date"===o?i.dateTick0(e.calendar):0,p=r("tick0",d);"date"===o?e.tick0=i.cleanDate(p,d):n(p)&&"D1"!==c&&"D2"!==c?e.tick0=Number(p):e.tick0=d}else{var m=r("tickvals");void 0===m?e.tickmode="auto":r("ticktext")}}},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],750:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plotly"),a=t("../../registry"),o=t("../../components/drawing"),s=t("./axes"),l=/((x|y)([2-9]|[1-9][0-9]+)?)axis$/;e.exports=function(t,e,r,u){function c(e,r){function n(e,r){for(i=0;ir.duration?(d(),k=window.cancelAnimationFrame(m)):k=window.requestAnimationFrame(m)}var g=t._fullLayout,v=[],y=function(t){var e,r,n,i,a,o={};for(e in t)if(r=e.split("."),n=r[0].match(l)){var s=n[1],u=s+"axis";if(i=g[u],a={},Array.isArray(t[e])?a.to=t[e].slice(0):Array.isArray(t[e].range)&&(a.to=t[e].range.slice(0)),!a.to)continue;a.axisName=u,a.length=i._length,v.push(s),o[s]=a}return o}(e),b=Object.keys(y),x=function(t,e,r){var n,i,a,o=t._plots,s=[];for(n in o){var l=o[n];if(-1===s.indexOf(l)){var u=l.xaxis._id,c=l.yaxis._id,h=l.xaxis.range,f=l.yaxis.range;l.xaxis._r=l.xaxis.range.slice(),l.yaxis._r=l.yaxis.range.slice(),i=r[u]?r[u].to:h,a=r[c]?r[c].to:f,h[0]===i[0]&&h[1]===i[1]&&f[0]===a[0]&&f[1]===a[1]||-1===e.indexOf(u)&&-1===e.indexOf(c)||s.push(l)}}return s}(g,b,y);if(!x.length)return!1;var _;u&&(_=u());var w,M,k,A=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(k),k=null,p()}),w=Date.now(),k=window.requestAnimationFrame(m),Promise.resolve()}},{"../../components/drawing":608,"../../plotly":724,"../../registry":807,"./axes":729,d3:114}],751:[function(t,e,r){"use strict";function n(t,e){if("-"===t.type){var r=t._id,n=r.charAt(0);-1!==r.indexOf("scene")&&(r=n);var u=i(e,r,n);if(u){if("histogram"===u.type&&n==={v:"y",h:"x"}[u.orientation||"v"])return void(t.type="linear");var c=n+"calendar",h=u[c];if(o(u,n)){for(var f,d=a(u),p=[],m=0;m0?".":"")+i;u.isPlainObject(a)?s(a,e,o,n+1):e(o,i,a)}})}var l=t("../plotly"),u=t("../lib");r.manageCommandObserver=function(t,e,i,a){var o={},s=!0;e&&e._commandObserver&&(o=e._commandObserver),o.cache||(o.cache={}),o.lookupTable={};var l=r.hasSimpleAPICommandBindings(t,i,o.lookupTable);if(e&&e._commandObserver){if(l)return o;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,o}if(l){n(t,l,o.cache),o.check=function(){if(s){var e=n(t,l,o.cache);return e.changed&&a&&void 0!==o.lookupTable[e.value]&&(o.disable(),Promise.resolve(a({value:e.value,type:l.type,prop:l.prop,traces:l.traces,index:o.lookupTable[e.value]})).then(o.enable,o.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;he*Math.PI/180},w.render=function(){function t(t){var e=r.projection(t.lonlat);return e?"translate("+e[0]+","+e[1]+")":null}function e(t){return r.isLonLatOverEdges(t.lonlat)?"0":"1.0"}var r=this,n=r.framework,i=n.select("g.choroplethlayer"),a=n.select("g.scattergeolayer"),o=r.path;n.selectAll("path.basepath").attr("d",o),n.selectAll("path.graticulepath").attr("d",o),i.selectAll("path.choroplethlocation").attr("d",o),i.selectAll("path.basepath").attr("d",o),a.selectAll("path.js-line").attr("d",o),null!==r.clipAngle?(a.selectAll("path.point").style("opacity",e).attr("transform",t),a.selectAll("text").style("opacity",e).attr("transform",t)):(a.selectAll("path.point").attr("transform",t),a.selectAll("text").attr("transform",t))}},{"../../components/color":585,"../../components/drawing":608,"../../lib/topojson_utils":711,"../cartesian/axes":729,"../cartesian/graph_interact":738,"../plots":792,"./constants":755,"./projections":763,"./set_scale":764,"./zoom":765,"./zoom_reset":766,d3:114,"topojson-client":523}],757:[function(t,e,r){"use strict";var n=t("./geo"),i=t("../../plots/plots");r.name="geo",r.attr="geo",r.idRoot="geo",r.idRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=i.getSubplotIds(e,"geo");void 0===window.PlotlyGeoAssets&&(window.PlotlyGeoAssets={topojson:{}});for(var o=0;on^d>n&&r<(f-u)*(n-c)/(d-c)+u&&(i=!i)}return i}function o(t){return t?t/Math.sin(t):1}function s(t){return t>1?z:t<-1?-z:Math.asin(t)}function l(t){return t>1?0:t<-1?C:Math.acos(t)}function u(t,e){var r=(2+z)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>E;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(C*(4+C))*t*(1+Math.cos(e)),2*Math.sqrt(C/(4+C))*Math.sin(e)]}function c(t,e){function r(r,n){var i=R(r/e,n);return i[0]*=t,i}return arguments.length<2&&(e=t),1===e?R:e===1/0?f:(r.invert=function(r,n){var i=R.invert(r/t,n);return i[0]*=e,i},r)}function h(){var t=2,e=O(c),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}function f(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function d(t,e){return[3*t/(2*C)*Math.sqrt(C*C/3-e*e),e]}function p(t,e){return[t,1.25*Math.log(Math.tan(C/4+.4*e))]}function m(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>E&&--i>0);return e/2}}function g(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function v(t,e){var r,n=Math.min(18,36*Math.abs(e)/C),i=Math.floor(n),a=n-i,o=(r=F[i])[0],s=r[1],l=(r=F[++i])[0],u=r[1],c=(r=F[Math.min(19,++i)])[0],h=r[1];return[t*(l+a*(c-o)/2+a*a*(c-2*l+o)/2),(e>0?z:-z)*(u+a*(h-s)/2+a*a*(h-2*u+s)/2)]}function y(t,e){return[t*Math.cos(e),e]}function b(t,e){var r=Math.cos(e),n=o(l(r*Math.cos(t/=2)));return[2*r*Math.sin(t)*n,Math.sin(e)*n]}function x(t,e){var r=b(t,e);return[(r[0]+t/z)/2,(r[1]+e)/2]}t.geo.project=function(t,e){var n=e.stream;if(!n)throw new Error("not yet supported");return(t&&_.hasOwnProperty(t.type)?_[t.type]:r)(t,n)};var _={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,r)})}}},w=[],M=[],k={point:function(t,e){w.push([t,e])},result:function(){var t=w.length?w.length<2?{type:"Point",coordinates:w[0]}:{type:"MultiPoint",coordinates:w}:null;return w=[],t}},A={lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){w.length&&(M.push(w),w=[])},result:function(){var t=M.length?M.length<2?{type:"LineString",coordinates:M[0]}:{type:"MultiLineString",coordinates:M}:null;return M=[],t}},T={polygonStart:n,lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){var t=w.length;if(t){do{w.push(w[0].slice())}while(++t<4);M.push(w),w=[]}},polygonEnd:n,result:function(){if(!M.length)return null;var t=[],e=[];return M.forEach(function(r){i(r)?t.push([r]):e.push(r)}),e.forEach(function(e){var r=e[0];t.some(function(t){if(a(t[0],r))return t.push(e),!0})||t.push([e])}),M=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},S={Point:k,MultiPoint:k,LineString:A,MultiLineString:A,Polygon:T,MultiPolygon:T,Sphere:T},E=1e-6,L=E*E,C=Math.PI,z=C/2,D=(Math.sqrt(C),C/180),I=180/C,P=t.geo.projection,O=t.geo.projectionMutator;t.geo.interrupt=function(e){function r(t,r){for(var n=r<0?-1:1,i=l[+(r<0)],a=0,o=i.length-1;ai[a][2][0];++a);var s=e(t-i[a][1][0],r);return s[0]+=e(i[a][1][0],n*r>n*i[a][0][1]?i[a][0][1]:r)[0],s}function n(){s=l.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]})})}function i(){for(var e=1e-6,r=[],n=0,i=l[0].length;n=0;--n){var o=l[1][n],s=180*o[0][0]/C,u=180*o[0][1]/C,c=180*o[1][1]/C,h=180*o[2][0]/C,f=180*o[2][1]/C;r.push(a([[h-e,f-e],[h-e,c+e],[s+e,c+e],[s+e,u-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}function a(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++aE&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return P(g)}).raw=g;var F=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];F.forEach(function(t){t[1]*=1.0144}),v.invert=function(t,e){var r=e/z,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=F[a][1],s=F[a+1][1],l=F[Math.min(19,a+2)][1],u=l-o,c=l-2*s+o,h=2*(Math.abs(r)-s)/u,f=c/u,d=h*(1-f*h*(1-2*f*h));if(d>=0||1===a){n=(e>=0?5:-5)*(d+i);var p,m=50;do{i=Math.min(18,Math.abs(n)/5),a=Math.floor(i),d=i-a,o=F[a][1],s=F[a+1][1],l=F[Math.min(19,a+2)][1],n-=(p=(e>=0?z:-z)*(s+d*(l-o)/2+d*d*(l-2*s+o)/2)-e)*I}while(Math.abs(p)>L&&--m>0);break}}while(--a>=0);var g=F[a][0],v=F[a+1][0],y=F[Math.min(19,a+2)][0];return[t/(v+d*(y-g)/2+d*d*(y-2*v+g)/2),n*D]},(t.geo.robinson=function(){return P(v)}).raw=v,y.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return P(y)}).raw=y,b.invert=function(t,e){if(!(t*t+4*e*e>C*C+E)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),u=Math.cos(r/2),c=Math.sin(n),h=Math.cos(n),f=Math.sin(2*n),d=c*c,p=h*h,m=s*s,g=1-p*u*u,v=g?l(h*u)*Math.sqrt(a=1/g):a=0,y=2*v*h*s-t,b=v*c-e,x=a*(p*m+v*h*u*d),_=a*(.5*o*f-2*v*c*s),w=.25*a*(f*s-v*c*p*o),M=a*(d*u+v*m*h),k=_*w-M*x;if(!k)break;var A=(b*_-y*M)/k,T=(y*w-b*x)/k;r-=A,n-=T}while((Math.abs(A)>E||Math.abs(T)>E)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return P(b)}).raw=b,x.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),u=Math.sin(2*n),c=s*s,h=o*o,f=Math.sin(r),d=Math.cos(r/2),p=Math.sin(r/2),m=p*p,g=1-h*d*d,v=g?l(o*d)*Math.sqrt(a=1/g):a=0,y=.5*(2*v*o*p+r/z)-t,b=.5*(v*s+n)-e,x=.5*a*(h*m+v*o*d*c)+.5/z,_=a*(f*u/4-v*s*p),w=.125*a*(u*p-v*s*h*f),M=.5*a*(c*d+v*m*o)+.5,k=_*w-M*x,A=(b*_-y*M)/k,T=(y*w-b*x)/k;r-=A,n-=T}while((Math.abs(A)>E||Math.abs(T)>E)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return P(x)}).raw=x}e.exports=n},{}],764:[function(t,e,r){"use strict";function n(t,e){var r=t.projection,n=t.lonaxis,o=t.lataxis,l=t.domain,u=t.framewidth||0,c=e.w*(l.x[1]-l.x[0]),h=e.h*(l.y[1]-l.y[0]),f=n.range[0]+s,d=n.range[1]-s,p=o.range[0]+s,m=o.range[1]-s,g=n._fullRange[0]+s,v=n._fullRange[1]-s,y=o._fullRange[0]+s,b=o._fullRange[1]-s;r._translate0=[e.l+c/2,e.t+h/2];var x=d-f,_=m-p,w=[f+x/2,p+_/2],M=r._rotate;return r._center=[w[0]+M[0],w[1]+M[1]],function(e){function n(t){return Math.min(_*c/(t[1][0]-t[0][0]),_*h/(t[1][1]-t[0][1]))}var o,s,l,x,_=e.scale(),w=r._translate0,M=i(f,p,d,m),k=i(g,y,v,b);l=a(e,M),o=n(l),x=a(e,k),r._fullScale=n(x),e.scale(o),l=a(e,M),s=[w[0]-l[0][0]+u,w[1]-l[0][1]+u],r._translate=s,e.translate(s),l=a(e,M),t._isAlbersUsa||e.clipExtent(l),o=r.scale*o,r._scale=o,t._width=Math.round(l[1][0])+u,t._height=Math.round(l[1][1])+u,t._marginX=(c-Math.round(l[1][0]))/2,t._marginY=(h-Math.round(l[1][1]))/2}}function i(t,e,r,n){var i=(r-t)/4;return{type:"Polygon",coordinates:[[[t,e],[t,n],[t+i,n],[t+2*i,n],[t+3*i,n],[r,n],[r,e],[r-i,e],[r-2*i,e],[r-3*i,e],[t,e]]]}}function a(t,e){return o.geo.path().projection(t).bounds(e)}var o=t("d3"),s=t("./constants").clipPad;e.exports=n},{"./constants":755,d3:114}],765:[function(t,e,r){"use strict";function n(t,e){return(e._isScoped?a:e._clipAngle?s:o)(t,e.projection)}function i(t,e){var r=e._fullScale;return _.behavior.zoom().translate(t.translate()).scale(t.scale()).scaleExtent([.5*r,100*r])}function a(t,e){function r(){_.select(this).style(k)}function n(){o.scale(_.event.scale).translate(_.event.translate),t.render()}function a(){_.select(this).style(A)}var o=t.projection,s=i(o,e);return s.on("zoomstart",r).on("zoom",n).on("zoomend",a),s}function o(t,e){function r(t){return g.invert(t)}function n(t){var e=g(r(t));return Math.abs(e[0]-t[0])>y||Math.abs(e[1]-t[1])>y}function a(){_.select(this).style(k),l=_.mouse(this),u=g.rotate(),c=g.translate(),h=u,f=r(l)}function o(){if(d=_.mouse(this),n(l))return v.scale(g.scale()),void v.translate(g.translate());g.scale(_.event.scale),g.translate([c[0],_.event.translate[1]]),f?r(d)&&(m=r(d),p=[h[0]+(m[0]-f[0]),u[1],u[2]],g.rotate(p),h=p):(l=d,f=r(l)),t.render()}function s(){_.select(this).style(A)}var l,u,c,h,f,d,p,m,g=t.projection,v=i(g,e),y=2;return v.on("zoomstart",a).on("zoom",o).on("zoomend",s),v}function s(t,e){function r(t){v++||t({type:"zoomstart"})}function n(t){t({type:"zoom"})}function a(t){--v||t({type:"zoomend"})}var o,s=t.projection,d={r:s.rotate(),k:s.scale()},p=i(s,e),m=x(p,"zoomstart","zoom","zoomend"),v=0,y=p.on;return p.on("zoomstart",function(){_.select(this).style(k);var t=_.mouse(this),e=s.rotate(),i=e,a=s.translate(),v=u(e);o=l(s,t),y.call(p,"zoom",function(){var r=_.mouse(this);if(s.scale(d.k=_.event.scale),o){if(l(s,r)){s.rotate(e).translate(a);var u=l(s,r),p=h(o,u),y=g(c(v,p)),b=d.r=f(y,o,i);isFinite(b[0])&&isFinite(b[1])&&isFinite(b[2])||(b=i),s.rotate(b),i=b}}else t=r,o=l(s,t);n(m.of(this,arguments))}),r(m.of(this,arguments))}).on("zoomend",function(){_.select(this).style(A),y.call(p,"zoom",null),a(m.of(this,arguments))}).on("zoom.redraw",function(){t.render()}),_.rebind(p,m,"on")}function l(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&v(r)}function u(t){var e=.5*t[0]*w,r=.5*t[1]*w,n=.5*t[2]*w,i=Math.sin(e),a=Math.cos(e),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function c(t,e){var r=t[0],n=t[1],i=t[2],a=t[3],o=e[0],s=e[1],l=e[2],u=e[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function h(t,e){if(t&&e){var r=b(t,e),n=Math.sqrt(y(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,y(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function f(t,e,r){var n=m(e,2,t[0]);n=m(n,1,t[1]),n=m(n,0,t[2]-r[2]);var i,a,o=e[0],s=e[1],l=e[2],u=n[0],c=n[1],h=n[2],f=Math.atan2(s,o)*M,p=Math.sqrt(o*o+s*s);Math.abs(c)>p?(a=(c>0?90:-90)-f,i=0):(a=Math.asin(c/p)*M-f,i=Math.sqrt(p*p-c*c));var g=180-a-2*f,v=(Math.atan2(h,u)-Math.atan2(l,i))*M,y=(Math.atan2(h,u)-Math.atan2(l,-i))*M;return d(r[0],r[1],a,v)<=d(r[0],r[1],g,y)?[a,v,r[2]]:[g,y,r[2]]}function d(t,e,r,n){var i=p(r-t),a=p(n-e);return Math.sqrt(i*i+a*a)}function p(t){return(t%360+540)%360-180}function m(t,e,r){var n=r*w,i=t.slice(),a=0===e?1:0,o=2===e?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=t[a]*s-t[o]*l,i[o]=t[o]*s+t[a]*l,i}function g(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*M,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*M,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*M]}function v(t){var e=t[0]*w,r=t[1]*w,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function y(t,e){for(var r=0,n=0,i=t.length;nMath.abs(h)?(u.boxEnd[1]=u.boxStart[1]+Math.abs(c)*w*(Math.sign(h)||1),u.boxEnd[1]f[3]&&(u.boxEnd[1]=f[3],u.boxEnd[0]=u.boxStart[0]+(f[3]-u.boxStart[1])/Math.abs(w))):(u.boxEnd[0]=u.boxStart[0]+Math.abs(h)/w*(Math.sign(c)||1),u.boxEnd[0]f[2]&&(u.boxEnd[0]=f[2],u.boxEnd[1]=u.boxStart[1]+(f[2]-u.boxStart[0])*Math.abs(w)))}}else u.boxEnabled&&(c=u.boxStart[0]!==u.boxEnd[0],h=u.boxStart[1]!==u.boxEnd[1],c||h?(c&&(o(0,u.boxStart[0],u.boxEnd[0]),t.xaxis.autorange=!1),h&&(o(1,u.boxStart[1],u.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),u.boxEnabled=!1,u.boxInited=!1);break;case"pan":u.boxEnabled=!1,u.boxInited=!1,n?(u.panning||(u.dragStart[0]=i,u.dragStart[1]=a),Math.abs(u.dragStart[0]-i)h[d+2]&&(h[d]=-1,h[d+2]=1),f=this[b[d]],f._length=o.viewBox[d+2]-o.viewBox[d],l.doAutoRange(f),f.setScale();var v={_axisConstraintGroups:this.graphDiv._fullLayout._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis};y({_fullLayout:v}),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},x.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},x.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},x.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;rMath.abs(e))n.rotate(o,0,0,-t*r*Math.PI*f.rotateSpeed/window.innerWidth);else{var s=-f.zoomSpeed*a*e/window.innerHeight*(o-n.lastT())/100;n.pan(o,0,0,u*(Math.exp(s)-1))}}},!0),f}e.exports=n;var i=t("right-now"),a=t("3d-view"),o=t("mouse-change"),s=t("mouse-wheel")},{"3d-view":31,"mouse-change":441,"mouse-wheel":444,"right-now":490}],772:[function(t,e,r){"use strict";var n=t("./scene"),i=t("../plots"),a=t("../../lib"),o=t("../../constants/xmlns_namespaces");r.name="gl3d",r.attr="scene",r.idRoot="scene",r.idRegex=/^scene([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^scene([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,o=i.getSubplotIds(e,"gl3d"),s=0;s1;o(t,e,r,{type:"gl3d",attributes:s,handleDefaults:n,font:e.font,fullData:r,getDfltFromLayout:a,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":585,"../../../lib":690,"../../subplot_defaults":799,"./axis_defaults":775,"./layout_attributes":778}],778:[function(t,e,r){"use strict";function n(t,e,r){return{x:{valType:"number",dflt:t},y:{valType:"number",dflt:e},z:{valType:"number",dflt:r}}}var i=t("./axis_attributes"),a=t("../../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},camera:{up:a(n(0,0,1),{}),center:a(n(0,0,0),{}),eye:a(n(1.25,1.25,1.25),{})},domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto"},aspectratio:{x:{valType:"number",min:0},y:{valType:"number",min:0},z:{valType:"number",min:0}},xaxis:i,yaxis:i,zaxis:i,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],dflt:"turntable"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest"},_deprecated:{cameraposition:{valType:"info_array"}}}},{"../../../lib/extend":682,"./axis_attributes":774}],779:[function(t,e,r){"use strict";function n(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}function i(t){var e=new n;return e.merge(t),e}var a=t("../../../lib/str2rgbarray"),o=["xaxis","yaxis","zaxis"];n.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[o[e]];this.enabled[e]=r.showspikes,this.colors[e]=a(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness}},e.exports=i},{"../../../lib/str2rgbarray":708}],780:[function(t,e,r){"use strict";function n(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;af[1][o]?d[o]=1:f[1][o]===f[0][o]?d[o]=1:d[o]=1/(f[1][o]-f[0][o]);for(this.dataScale=d,a=0;am[1][a])m[0][a]=-1,m[1][a]=1;else{var x=m[1][a]-m[0][a];m[0][a]-=x/32,m[1][a]+=x/32}}else{var _=c[A[a]].range;m[0][a]=_[0],m[1][a]=_[1]}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),g[a]=m[1][a]-m[0][a],this.glplot.bounds[0][a]=m[0][a]*d[a],this.glplot.bounds[1][a]=m[1][a]*d[a]}var w=[1,1,1];for(a=0;a<3;++a){l=c[A[a]],u=l.type;var M=y[u];w[a]=Math.pow(M.acc,1/M.count)/d[a]}var k;if("auto"===c.aspectmode)k=Math.max.apply(null,w)/Math.min.apply(null,w)<=4?w:[1,1,1];else if("cube"===c.aspectmode)k=[1,1,1];else if("data"===c.aspectmode)k=w;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var T=c.aspectratio;k=[T.x,T.y,T.z]}c.aspectratio.x=h.aspectratio.x=k[0],c.aspectratio.y=h.aspectratio.y=k[1],c.aspectratio.z=h.aspectratio.z=k[2],this.glplot.aspect=k;var S=c.domain||null,E=e._size||null;if(S&&E){var L=this.container.style;L.position="absolute",L.left=E.l+S.x[0]*E.w+"px",L.top=E.t+(1-S.y[1])*E.h+"px",L.width=E.w*(S.x[1]-S.x[0])+"px",L.height=E.h*(S.y[1]-S.y[0])+"px"}this.glplot.redraw()}},k.destroy=function(){this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null},k.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),u(this.glplot.camera)},k.setCamera=function(t){this.glplot.camera.lookAt.apply(this,l(t))},k.saveCamera=function(t){var e=this.getCamera(),r=p.nestedProperty(t,this.id+".camera"),n=r.get(),i=!1;if(void 0===n)i=!0;else for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!function(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}(e,n,a,o)){i=!0;break}return i&&r.set(e),i},k.updateFx=function(t,e){var r=this.camera;r&&("orbit"===t?(r.mode="orbit",r.keyBindingMode="rotate"):"turntable"===t?(r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate"):r.keyBindingMode=t),this.fullSceneLayout.hovermode=e},k.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(c),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,n=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var i=new Uint8Array(r*n*4);e.readPixels(0,0,r,n,e.RGBA,e.UNSIGNED_BYTE,i);for(var a=0,o=n-1;a0}function a(t){var e={},r={};switch(t.type){case"circle":s.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":s.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity});break;case"fill":s.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var n=t.symbol,i=l(n.textposition,n.iconsize);s.extendFlat(e,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset}),s.extendFlat(r,{"icon-color":t.color,"text-color":n.textfont.color,"text-opacity":t.opacity})}return{layout:e,paint:r}}function o(t){var e,r=t.sourcetype,n=t.source,i={type:r},a="string"==typeof n;return"geojson"===r?e="data":"vector"===r&&(e=a?"url":"tiles"),i[e]=n,i}var s=t("../../lib"),l=t("./convert_text_opts"),u=n.prototype;u.update=function(t){this.visible?this.needsNewSource(t)?(this.updateLayer(t),this.updateSource(t)):this.needsNewLayer(t)&&this.updateLayer(t):(this.updateSource(t),this.updateLayer(t)),this.updateStyle(t),this.visible=i(t)},u.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},u.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==t.below},u.updateSource=function(t){var e=this.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,i(t)){var r=o(t);e.addSource(this.idSource,r)}},u.updateLayer=function(t){var e=this.map;if(e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),this.layerType=t.type,i(t)){e.addLayer({id:this.idLayer,source:this.idSource,"source-layer":t.sourcelayer||"",type:t.type},t.below);var r={visibility:"visible"};this.mapbox.setOptions(this.idLayer,"setLayoutProperty",r)}},u.updateStyle=function(t){var e=a(t);i(t)&&(this.mapbox.setOptions(this.idLayer,"setLayoutProperty",e.layout),this.mapbox.setOptions(this.idLayer,"setPaintProperty",e.paint))},u.dispose=function(){var t=this.map;t.removeLayer(this.idLayer),t.removeSource(this.idSource)},e.exports=function(t,e,r){var i=new n(t,e);return i.update(r),i}},{"../../lib":690,"./convert_text_opts":785}],788:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../components/color").defaultLine,a=t("../font_attributes"),o=t("../../traces/scatter/attributes").textposition;e.exports={_arrayAttrRegexps:[/^mapbox([2-9]|[1-9][0-9]+)?\.layers/],domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],dflt:"basic"},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},layers:{_isLinkedToArray:"layer",sourcetype:{valType:"enumerated",values:["geojson","vector"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},type:{valType:"enumerated",values:["circle","line","fill","symbol"],dflt:"circle"},below:{valType:"string",dflt:""},color:{valType:"color",dflt:i},opacity:{valType:"number",min:0,max:1,dflt:1},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2}},fill:{outlinecolor:{valType:"color",dflt:i}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},textfont:n.extendDeep({},a,{family:{dflt:"Open Sans Regular, Arial Unicode MS Regular"}}),textposition:n.extendFlat({},o,{arrayOk:!1})}}}},{"../../components/color":585,"../../lib":690,"../../traces/scatter/attributes":947,"../font_attributes":753}],789:[function(t,e,r){"use strict";function n(t,e,r){r("accesstoken"),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch"),i(t,e),e._input=t}function i(t,e){function r(t,e){return a.coerce(n,i,s.layers,t,e)}for(var n,i,o=t.layers||[],l=e.layers=[],u=0;u=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var s=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),u=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&n(t,s),l.text(s.text()&&u.text()?" - ":"")}},d.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||"https://plot.ly",r=o.select(t).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return n.append("input").attr({type:"text",name:"data"}).node().value=d.graphJson(t,!1,"keepdata"),n.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1},d.supplyDefaults=function(t){var e,r=t._fullLayout||{},n=t._fullLayout={},i=t.layout||{},a=t._fullData||[],o=t._fullData=[],s=t.data||[];if(t._transitionData||d.createTransitionData(t),r._initialAutoSizeIsDone){var u=r.width,c=r.height;d.supplyLayoutGlobalDefaults(i,n),i.width||(n.width=u),i.height||(n.height=c)}else{d.supplyLayoutGlobalDefaults(i,n);var h=!i.width||!i.height,f=n.autosize,p=t._context&&t._context.autosizable;h&&(f||p)?d.plotAutoSize(t,i,n):h&&d.sanitizeMargins(t),!f&&h&&(i.width=n.width,i.height=n.height)}n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._globalTransforms=(t._context||{}).globalTransforms,d.supplyDataDefaults(s,o,i,n),n._has=d._hasPlotType.bind(n);var m=n._modules;for(e=0;e0){var h=a(t._boundingBoxMargins),f=h.left+h.right,p=h.bottom+h.top,m=1-2*l,g=r._container&&r._container.node?r._container.node().getBoundingClientRect():{width:r.width,height:r.height};n=Math.round(m*(g.width-f)),i=Math.round(m*(g.height-p))}else{var v=u?window.getComputedStyle(t):{};n=parseFloat(v.width)||r.width,i=parseFloat(v.height)||r.height}var y=d.layoutAttributes.width.min,b=d.layoutAttributes.height.min;n1,_=!e.height&&Math.abs(r.height-i)>1;(_||x)&&(x&&(r.width=n),_&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),d.sanitizeMargins(r)},d.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a;l.Axes.supplyLayoutDefaults(t,e,r);var o=e._basePlotModules;for(i=0;i.5*n.width&&(r.l=r.r=0),r.b+r.t>.5*n.height&&(r.b=r.t=0),n._pushmargin[e]={l:{val:r.x,size:r.l+i},r:{val:r.x,size:r.r+i},b:{val:r.y,size:r.b+i},t:{val:r.y,size:r.t+i}}}else delete n._pushmargin[e];n._replotting||d.doAutoMargin(t)}},d.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),e._pushmargin||(e._pushmargin={});var r=e._size,n=JSON.stringify(r),i=Math.max(e.margin.l||0,0),a=Math.max(e.margin.r||0,0),o=Math.max(e.margin.t||0,0),u=Math.max(e.margin.b||0,0),c=e._pushmargin;if(!1!==e.margin.autoexpand){c.base={l:{val:0,size:i},r:{val:1,size:a},t:{val:1,size:o},b:{val:0,size:u}};for(var h=Object.keys(c),f=0;fg){var k=(v*w+(M-e.width)*g)/(w-g),A=(M*(1-g)+(v-e.width)*(1-w))/(w-g);k>=0&&A>=0&&k+A>i+a&&(i=k,a=A)}}if(s(b)&&c[_].t){var T=c[_].t.val,S=c[_].t.size;if(T>y){var E=(b*T+(S-e.height)*y)/(T-y),L=(S*(1-y)+(b-e.height)*(1-T))/(T-y);E>=0&&L>=0&&E+L>u+o&&(u=E,o=L)}}}}if(r.l=Math.round(i),r.r=Math.round(a),r.t=Math.round(o),r.b=Math.round(u),r.p=Math.round(e.margin.pad),r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b,!e._replotting&&"{}"!==n&&n!==JSON.stringify(e._size))return l.plot(t)},d.graphJson=function(t,e,r,n,i){function a(t){if("function"==typeof t)return null;if(c.isPlainObject(t)){var e,n,i={};for(e in t)if("function"!=typeof t[e]&&-1===["_","["].indexOf(e.charAt(0))){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!c.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;i[e]=a(t[e])}return i}return Array.isArray(t)?t.map(a):c.isJSDate(t)?c.ms2DateTimeLocal(+t):t}(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&d.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames,u={data:(o||[]).map(function(t){var r=a(t);return e&&delete r.fit,r})};return e||(u.layout=a(s)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),l&&(u.frames=a(l)),"object"===n?u:JSON.stringify(u)},d.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){_=!0}),i.redraw&&t._transitionData._interruptCallbacks.push(function(){return l.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var o,s,u=0,h=0,d=t._fullLayout._basePlotModules,p=!1;if(r)for(s=0;s=0,E=S?h.angularAxis.domain:n.extent(M),L=Math.abs(M[1]-M[0]);A&&!k&&(L=0);var C=E.slice();T&&k&&(C[1]+=L);var z=h.angularAxis.ticksCount||4;z>8&&(z=z/(z/8)+z%8),h.angularAxis.ticksStep&&(z=(C[1]-C[0])/z);var D=h.angularAxis.ticksStep||(C[1]-C[0])/(z*(h.minorTicks+1));w&&(D=Math.max(Math.round(D),1)),C[2]||(C[2]=D);var I=n.range.apply(this,C);if(I=I.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===h.direction?[0,360]:[360,0]),c.layout.angularAxis.domain=s.domain(),c.layout.angularAxis.endPadding=T?L:0,void 0===(e=n.select(this).select("svg.chart-root"))||e.empty()){var P=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),O=this.appendChild(this.ownerDocument.importNode(P.documentElement,!0));e=n.select(O)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var R,j=e.select(".chart-group"),F={fill:"none",stroke:h.tickColor},N={"font-size":h.font.size,"font-family":h.font.family,fill:h.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+h.font.outlineColor}).join(",")};if(h.showLegend){R=e.select(".legend-group").attr({transform:"translate("+[b,h.margin.top]+")"}).style({display:"block"});var B=d.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend=void 0===t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:d.map(function(t,e){return t.name||"Element"+e}),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:R,elements:B,reverseOrder:h.legend.reverseOrder})})();var U=R.node().getBBox();b=Math.min(h.width-U.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,b=Math.max(10,b),_=[h.margin.left+b,h.margin.top+b],i.range([0,b]),c.layout.radialAxis.domain=i.domain(),R.attr("transform","translate("+[_[0]+b,_[1]-b]+")")}else R=e.select(".legend-group").style({display:"none"});e.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),j.attr("transform","translate("+_+")").style({cursor:"crosshair"});var V=[(h.width-(h.margin.left+h.margin.right+2*b+(U?U.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*b))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),e.select(".outer-group").attr("transform","translate("+V+")"),h.title){var q=e.select("g.title-group text").style(N).text(h.title),H=q.node().getBBox();q.attr({x:_[0]-H.width/2,y:_[1]-b-20})}var Y=e.select(".radial.axis-group");if(h.radialAxis.gridLinesVisible){var G=Y.selectAll("circle.grid-circle").data(i.ticks(5));G.enter().append("circle").attr({class:"grid-circle"}).style(F),G.attr("r",i),G.exit().remove()}Y.select("circle.outside-circle").attr({r:b}).style(F);var X=e.select("circle.background-circle").attr({r:b}).style({fill:h.backgroundColor,stroke:h.stroke});if(h.radialAxis.visible){var W=n.svg.axis().scale(i).ticks(5).tickSize(5);Y.call(W).attr({transform:"rotate("+h.radialAxis.orientation+")"}),Y.selectAll(".domain").style(F),Y.selectAll("g>text").text(function(t,e){return this.textContent+h.radialAxis.ticksSuffix}).style(N).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===h.radialAxis.tickOrientation?"rotate("+-h.radialAxis.orientation+") translate("+[0,N["font-size"]]+")":"translate("+[0,N["font-size"]]+")"}}),Y.selectAll("g>line").style({stroke:"black"})}var Z=e.select(".angular.axis-group").selectAll("g.angular-tick").data(I),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+l(t,e)+")"}}).style({display:h.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(h.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(h.minorTicks+1)==0)}).style(F),J.selectAll(".minor").style({stroke:h.minorTickColor}),Z.select("line.grid-line").attr({x1:h.tickLength?b-h.tickLength:0,x2:b}).style({display:h.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(N);var K=Z.select("text.axis-text").attr({x:b+h.labelOffset,dy:".35em",transform:function(t,e){var r=l(t,e),n=b+h.labelOffset,i=h.angularAxis.tickOrientation;return"horizontal"==i?"rotate("+-r+" "+n+" 0)":"radial"==i?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:h.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(h.minorTicks+1)!=0?"":w?w[t]+h.angularAxis.ticksSuffix:t+h.angularAxis.ticksSuffix}).style(N);h.angularAxis.rewriteTicks&&K.text(function(t,e){return e%(h.minorTicks+1)!=0?"":h.angularAxis.rewriteTicks(this.textContent,e)});var Q=n.max(j.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));R.attr({transform:"translate("+[b+Q,h.margin.top]+")"});var $=e.select("g.geometry-group").selectAll("g").size()>0,tt=e.select("g.geometry-group").selectAll("g.geometry").data(d);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),d[0]||$){var et=[];d.forEach(function(t,e){var r={};r.radialScale=i, +r.angularScale=s,r.container=tt.filter(function(t,r){return r==e}),r.geometry=t.geometry,r.orientation=h.orientation,r.direction=h.direction,r.index=e,et.push({data:t,geometryConfig:r})});var rt=n.nest().key(function(t,e){return void 0!==t.data.groupId||"unstacked"}).entries(et),nt=[];rt.forEach(function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return a(o[r].defaultConfig(),t)});o[r]().config(n)()})}var it,at,ot=e.select(".guides-group"),st=e.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,hasTick:!0})();if(!k){var ht=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});j.on("mousemove.angular-guide",function(t,e){var r=o.util.getMousePos(X).angle;ht.attr({x2:-b,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(b+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){ot.select("line").style({opacity:0})})}var ft=ot.select("circle").style({stroke:"grey",fill:"none"});j.on("mousemove.radial-guide",function(t,e){var r=o.util.getMousePos(X).radius;ft.attr({r:r}).style({opacity:.5}),at=i.invert(o.util.getMousePos(X).radius);var n=o.util.convertToCartesian(r,h.radialAxis.orientation);ut.text(o.util.round(at)).move([n[0]+_[0],n[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){ft.style({opacity:0}),ct.hide(),lt.hide(),ut.hide()}),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(t,r){var i=n.select(this),a=i.style("fill"),s="black",l=i.style("opacity")||1;if(i.attr({"data-opacity":l}),"none"!=a){i.attr({"data-fill":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var u={t:o.util.round(t[0]),r:o.util.round(t[1])};k&&(u.t=w[t[0]]);var c="t: "+u.t+", r: "+u.r,h=this.getBoundingClientRect(),f=e.node().getBoundingClientRect(),d=[h.left+h.width/2-V[0]-f.left,h.top+h.height/2-V[1]-f.top];ct.config({color:s}).text(c),ct.move(d)}else a=i.style("stroke"),i.attr({"data-stroke":a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ct.show()}).on("mouseout.tooltip",function(t,e){ct.hide();var r=n.select(this),i=r.attr("data-fill");i?r.style({fill:i,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})})}),f}var e,r,i,s,l={data:[],layout:{}},u={},c={},h=n.dispatch("hover"),f={};return f.render=function(e){return t(e),this},f.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),a(l.data[e],o.Axis.defaultConfig().data[0]),a(l.data[e],t)}),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,e.layout),this},f.getLiveConfig=function(){return c},f.getinputConfig=function(){return u},f.radialScale=function(t){return i},f.angularScale=function(t){return s},f.svg=function(){return e},n.rebind(f,h,"on"),f},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach(function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)});var s={t:a,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if(void 0===t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i0)){var s=n.select(this.parentNode).selectAll("path.line").data([0]);s.enter().insert("path"),s.attr({class:"line",d:f(o),transform:function(e,r){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return g.fill(r,i,a)},"fill-opacity":0,stroke:function(t,e){return g.stroke(r,i,a)},"stroke-width":function(t,e){return g["stroke-width"](r,i,a)},"stroke-dasharray":function(t,e){return g["stroke-dasharray"](r,i,a)},opacity:function(t,e){return g.opacity(r,i,a)},display:function(t,e){return g.display(r,i,a)}})}};var d=t.angularScale.range(),p=Math.abs(d[1]-d[0])/l[0].length*Math.PI/180,m=n.svg.arc().startAngle(function(t){return-p/2}).endAngle(function(t){return p/2}).innerRadius(function(e){return t.radialScale(c+(e[2]||0))}).outerRadius(function(e){return t.radialScale(c+(e[2]||0))+t.radialScale(e[1])});h.arc=function(e,r,i){n.select(this).attr({class:"mark arc",d:m,transform:function(e,r){return"rotate("+(t.orientation+u(e[0])+90)+")"}})};var g={fill:function(t,r,n){return e[n].data.color},stroke:function(t,r,n){return e[n].data.strokeColor},"stroke-width":function(t,r,n){return e[n].data.strokeSize+"px"},"stroke-dasharray":function(t,r,n){return i[e[n].data.strokeDash]},opacity:function(t,r,n){return e[n].data.opacity},display:function(t,r,n){return void 0===e[n].data.visible||e[n].data.visible?"block":"none"}},v=n.select(this).selectAll("g.layer").data(l);v.enter().append("g").attr({class:"layer"});var y=v.selectAll("path.mark").data(function(t,e){return t});y.enter().append("path").attr({class:"mark"}),y.style(g).each(h[t.geometryType]),y.exit().remove(),v.exit().remove()})}var e=[o.PolyChart.defaultConfig()],r=n.dispatch("hover"),i={solid:"none",dash:[5,2],dot:[2,5]};return t.config=function(t){return arguments.length?(t.forEach(function(t,r){e[r]||(e[r]={}),a(e[r],o.PolyChart.defaultConfig()),a(e[r],t)}),this):e},t.getColorScale=function(){},n.rebind(t,r,"on"),t},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){function t(){var r=e.legendConfig,i=e.data.map(function(t,e){return[].concat(t).map(function(t,n){var i=a({},r.elements[e]);return i.name=t,i.color=[].concat(r.elements[e].color)[n],i})}),o=n.merge(i);o=o.filter(function(t,e){return r.elements[e]&&(r.elements[e].visibleInLegend||void 0===r.elements[e].visibleInLegend)}),r.reverseOrder&&(o=o.reverse());var s=r.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map(function(t,e){return t.color}),u=r.fontSize,c=null==r.isContinuous?"number"==typeof o[0]:r.isContinuous,h=c?r.height:u*o.length,f=s.classed("legend-group",!0),d=f.selectAll("svg").data([0]),p=d.enter().append("svg").attr({width:300,height:h+u,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var m=n.range(o.length),g=n.scale[c?"linear":"ordinal"]().domain(m).range(l),v=n.scale[c?"linear":"ordinal"]().domain(m)[c?"range":"rangePoints"]([0,h]),y=function(t,e){var r=3*e;return"line"===t?"M"+[[-e/2,-e/12],[e/2,-e/12],[e/2,e/12],[-e/2,e/12]]+"Z":-1!=n.svg.symbolTypes.indexOf(t)?n.svg.symbol().type(t).size(r)():n.svg.symbol().type("square").size(r)()};if(c){var b=d.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);b.enter().append("stop"),b.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),d.append("rect").classed("legend-mark",!0).attr({height:r.height,width:r.colorBandWidth,fill:"url(#grad1)"})}else{var x=d.select(".legend-marks").selectAll("path.legend-mark").data(o);x.enter().append("path").classed("legend-mark",!0),x.attr({transform:function(t,e){return"translate("+[u/2,v(e)+u/2]+")"},d:function(t,e){var r=t.symbol;return y(r,u)},fill:function(t,e){return g(e)}}),x.exit().remove()}var _=n.svg.axis().scale(v).orient("right"),w=d.select("g.legend-axis").attr({transform:"translate("+[c?r.colorBandWidth:u,u/2]+")"}).call(_);return w.selectAll(".domain").style({fill:"none",stroke:"none"}),w.selectAll("line").style({fill:"none",stroke:c?r.textColor:"none"}),w.selectAll("text").style({fill:r.textColor,"font-size":r.fontSize}).text(function(t,e){return o[e].name}),t}var e=o.Legend.defaultConfig(),r=n.dispatch("hover");return t.config=function(t){return arguments.length?(a(e,t),this):e},n.rebind(t,r,"on"),t},o.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=function(){t=i.container.selectAll("g."+s).data([0]);var n=t.enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:i.padding+10,dy:.3*+i.fontSize}),l};return l.text=function(a){var o=n.hsl(i.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",c=a||"";e.style({fill:u,"font-size":i.fontSize+"px"}).text(c);var h=i.padding,f=e.node().getBBox(),d={fill:i.color,stroke:s,"stroke-width":"2px"},p=f.width+2*h+10,m=f.height+2*h;return r.attr({d:"M"+[[10,-m/2],[10,-m/4],[i.hasTick?0:10,0],[10,m/4],[10,m/2],[p,m/2],[p,-m/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[10,-m/2+2*h]+")"}),t.style({display:"block"}),l},l.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),l},l.hide=function(){if(t)return t.style({display:"none"}),l},l.show=function(){if(t)return t.style({display:"block"}),l},l.config=function(t){return a(i,t),l},l},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={};return t.convert=function(t,e){var r={};if(t.data&&(r.data=t.data.map(function(t,r){var n=a({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",!0===n.dotVisible?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n}),!e&&t.layout&&"stack"===t.layout.barmode)){var i=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=i.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)})}if(t.layout){var s=a({},t.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?(void 0!==s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&void 0!==s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&void 0!==s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&void 0!==s.margin.t){var l=["t","r","b","l","pad"],u=["top","right","bottom","left","pad"],c={};n.entries(s.margin).forEach(function(t,e){c[u[l.indexOf(t.key)]]=t.value}),s.margin=c}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r},t}},{"../../lib":690,d3:114}],797:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=i.extendDeepAll,u=e.exports={};u.framework=function(t){function e(e,i){return i&&(h=i),n.select(n.select(h).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),r=r?l(r,e):e,a||(a=o.Axis()),c=o.adapter.plotly().convert(r),a.config(c).render(h),t.data=r.data,t.layout=r.layout,u.fillLayout(t),r}var r,i,a,c,h,f=new s;return e.isPolar=!0,e.svg=function(){return a.svg()},e.getConfig=function(){return r},e.getLiveConfig=function(){return o.adapter.plotly().convert(a.getLiveConfig(),!0)},e.getLiveScales=function(){return{t:a.angularScale(),r:a.radialScale()}},e.setUndoPoint=function(){var t=this,e=o.util.cloneJson(r);!function(e,r){f.add({undo:function(){r&&t(r)},redo:function(){t(e)}})}(e,i),i=o.util.cloneJson(e)},e.undo=function(){f.undo()},e.redo=function(){f.redo()},e},u.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),i=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{"../../components/color":585,"../../lib":690,"./micropolar":796,"./undo_manager":798,d3:114}],798:[function(t,e,r){"use strict";e.exports=function(){function t(t,e){return t?(i=!0,t[e](),i=!1,this):this}var e,r=[],n=-1,i=!1;return{add:function(t){return i?this:(r.splice(n+1,r.length-n),r.push(t),n=r.length-1,this)},setCallback:function(t){e=t},undo:function(){var i=r[n];return i?(t(i,"undo"),n-=1,e&&e(i.undo),this):this},redo:function(){var i=r[n+1];return i?(t(i,"redo"),n+=1,e&&e(i.redo),this):this},clear:function(){r=[],n=-1},hasUndo:function(){return-1!==n},hasRedo:function(){return n=o&&(d.min=0,p.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}var i=t("../../../components/color"),a=t("../../subplot_defaults"),o=t("./layout_attributes"),s=t("./axis_defaults"),l=["aaxis","baxis","caxis"];e.exports=function(t,e,r){a(t,e,r,{type:"ternary",attributes:o,handleDefaults:n,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../../components/color":585,"../../subplot_defaults":799,"./axis_defaults":803,"./layout_attributes":805}],805:[function(t,e,r){"use strict";var n=t("../../../components/color/attributes"),i=t("./axis_attributes");e.exports={domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},bgcolor:{valType:"color",dflt:n.background},sum:{valType:"number",dflt:1,min:0},aaxis:i,baxis:i,caxis:i}},{"../../../components/color/attributes":584,"./axis_attributes":802}],806:[function(t,e,r){"use strict";function n(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework()}function i(t){a.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}var a=t("d3"),o=t("tinycolor2"),s=t("../../plotly"),l=t("../../lib"),u=t("../../components/color"),c=t("../../components/drawing"),h=t("../cartesian/set_convert"),f=t("../../lib/extend").extendFlat,d=t("../plots"),p=t("../cartesian/axes"),m=t("../../components/dragelement"),g=t("../../components/titles"),v=t("../cartesian/select"),y=t("../cartesian/constants"),b=t("../cartesian/graph_interact");e.exports=n;var x=n.prototype;x.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={}},x.plot=function(t,e){var r=this,n=e[r.id],i=e._size;r.adjustLayout(n,i),d.generalUpdatePerTraceModule(r,t,n),r.layers.plotbg.select("path").call(u.fill,n.bgcolor)},x.makeFramework=function(){var t=this,e=t.defs.selectAll("g.clips").data([0]);e.enter().append("g").classed("clips",!0);var r="clip"+t.layoutId+t.id;t.clipDef=e.selectAll("#"+r).data([0]),t.clipDef.enter().append("clipPath").attr("id",r).append("path").attr("d","M0,0Z"),t.plotContainer=t.container.selectAll("g."+t.id).data([0]),t.plotContainer.enter().append("g").classed(t.id,!0),t.layers={};var n=["draglayer","plotbg","backplot","grids","frontplot","zoom","aaxis","baxis","caxis","axlines"];t.plotContainer.selectAll("g.toplevel").data(n).enter().append("g").attr("class",function(t){return"toplevel "+t}).each(function(e){var r=a.select(this);t.layers[e]=r,"frontplot"===e?r.append("g").classed("scatterlayer",!0):"backplot"===e?r.append("g").classed("maplayer",!0):"plotbg"===e?r.append("path").attr("d","M0,0Z"):"axlines"===e&&r.selectAll("path").data(["aline","bline","cline"]).enter().append("path").each(function(t){a.select(this).classed(t,!0)})}),t.plotContainer.select(".grids").selectAll("g.grid").data(["agrid","bgrid","cgrid"]).enter().append("g").attr("class",function(t){return"grid "+t}).each(function(e){t.layers[e]=a.select(this)}),t.plotContainer.selectAll(".backplot,.frontplot,.grids").call(c.setClipUrl,r),t.graphDiv._context.staticPlot||t.initInteractions()};var _=Math.sqrt(4/3);x.adjustLayout=function(t,e){var r,n,i,a,o,s,l=this,c=t.domain,d=(c.x[0]+c.x[1])/2,p=(c.y[0]+c.y[1])/2,m=c.x[1]-c.x[0],g=c.y[1]-c.y[0],v=m*e.w,y=g*e.h,b=t.sum,x=t.aaxis.min,w=t.baxis.min,M=t.caxis.min;v>_*y?(a=y,i=a*_):(i=v,a=i/_),o=m*i/v,s=g*a/y,r=e.l+e.w*d-i/2,n=e.t+e.h*(1-p)-a/2,l.x0=r,l.y0=n,l.w=i,l.h=a,l.sum=b,l.xaxis={type:"linear",range:[x+2*M-b,b-x-2*w],domain:[d-o/2,d+o/2],_id:"x"},h(l.xaxis,l.graphDiv._fullLayout),l.xaxis.setScale(),l.yaxis={type:"linear",range:[x,b-w-M],domain:[p-s/2,p+s/2],_id:"y"},h(l.yaxis,l.graphDiv._fullLayout),l.yaxis.setScale();var k=l.yaxis.domain[0],A=l.aaxis=f({},t.aaxis,{range:[x,b-w-M],side:"left",_counterangle:30,tickangle:(+t.aaxis.tickangle||0)-30,domain:[k,k+s*_],_axislayer:l.layers.aaxis,_gridlayer:l.layers.agrid,_pos:0,_id:"y",_length:i,_gridpath:"M0,0l"+a+",-"+i/2});h(A,l.graphDiv._fullLayout),A.setScale();var T=l.baxis=f({},t.baxis,{range:[b-x-M,w],side:"bottom",_counterangle:30,domain:l.xaxis.domain,_axislayer:l.layers.baxis,_gridlayer:l.layers.bgrid,_counteraxis:l.aaxis,_pos:0,_id:"x",_length:i,_gridpath:"M0,0l-"+i/2+",-"+a});h(T,l.graphDiv._fullLayout),T.setScale(),A._counteraxis=T;var S=l.caxis=f({},t.caxis,{range:[b-x-w,M],side:"right",_counterangle:30,tickangle:(+t.caxis.tickangle||0)+30,domain:[k,k+s*_],_axislayer:l.layers.caxis,_gridlayer:l.layers.cgrid,_counteraxis:l.baxis,_pos:0,_id:"y",_length:i,_gridpath:"M0,0l-"+a+","+i/2});h(S,l.graphDiv._fullLayout),S.setScale();var E="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";l.clipDef.select("path").attr("d",E),l.layers.plotbg.select("path").attr("d",E);var L="translate("+r+","+n+")";l.plotContainer.selectAll(".scatterlayer,.maplayer,.zoom").attr("transform",L);var C="translate("+r+","+(n+a)+")";l.layers.baxis.attr("transform",C),l.layers.bgrid.attr("transform",C);var z="translate("+(r+i/2)+","+n+")rotate(30)";l.layers.aaxis.attr("transform",z),l.layers.agrid.attr("transform",z);var D="translate("+(r+i/2)+","+n+")rotate(-30)";l.layers.caxis.attr("transform",D),l.layers.cgrid.attr("transform",D),l.drawAxes(!0),l.plotContainer.selectAll(".crisp").classed("crisp",!1);var I=l.layers.axlines;I.select(".aline").attr("d",A.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(u.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),I.select(".bline").attr("d",T.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(u.stroke,T.linecolor||"#000").style("stroke-width",(T.linewidth||0)+"px"),I.select(".cline").attr("d",S.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(u.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px")},x.drawAxes=function(t){var e=this,r=e.graphDiv,n=e.id.substr(7)+"title",i=e.aaxis,a=e.baxis,o=e.caxis;if(p.doTicks(r,i,!0),p.doTicks(r,a,!0),p.doTicks(r,o,!0),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0));g.draw(r,"a"+n,{propContainer:i,propName:e.id+".aaxis.title",dfltName:"Component A",attributes:{x:e.x0+e.w/2,y:e.y0-i.titlefont.size/3-s,"text-anchor":"middle"}});var l=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;g.draw(r,"b"+n,{propContainer:a,propName:e.id+".baxis.title",dfltName:"Component B",attributes:{x:e.x0-l,y:e.y0+e.h+.83*a.titlefont.size+l,"text-anchor":"middle"}}),g.draw(r,"c"+n,{propContainer:o,propName:e.id+".caxis.title",dfltName:"Component C",attributes:{x:e.x0+e.w+l,y:e.y0+e.h+.83*o.titlefont.size+l,"text-anchor":"middle"}})}};var w=y.MINZOOM/2+.87,M="m-0.87,.5h"+w+"v3h-"+(w+5.2)+"l"+(w/2+2.6)+",-"+(.87*w+4.5)+"l2.6,1.5l-"+w/2+","+.87*w+"Z",k="m0.87,.5h-"+w+"v3h"+(w+5.2)+"l-"+(w/2+2.6)+",-"+(.87*w+4.5)+"l-2.6,1.5l"+w/2+","+.87*w+"Z",A="m0,1l"+w/2+","+.87*w+"l2.6,-1.5l-"+(w/2+2.6)+",-"+(.87*w+4.5)+"l-"+(w/2+2.6)+","+(.87*w+4.5)+"l2.6,1.5l"+w/2+",-"+.87*w+"Z",T=!0;x.initInteractions=function(){function t(t,e,r){var n=R.getBoundingClientRect();x=e-n.left,w=r-n.top,S={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=S,E=O.aaxis.range[1]-S.a,C=o(O.graphDiv._fullLayout[O.id].bgcolor).getLuminance(), +z="M0,"+O.h+"L"+O.w/2+", 0L"+O.w+","+O.h+"Z",D=!1,I=F.append("path").attr("class","zoombox").style({fill:C>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",z),P=F.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),p()}function e(t,e){return 1-e/O.h}function r(t,e){return 1-(t+(O.h-e)/Math.sqrt(3))/O.w}function n(t,e){return(t-(O.h-e)/Math.sqrt(3))/O.w}function a(t,i){var a=x+t,o=w+i,s=Math.max(0,Math.min(1,e(x,w),e(a,o))),l=Math.max(0,Math.min(1,r(x,w),r(a,o))),u=Math.max(0,Math.min(1,n(x,w),n(a,o))),c=(s/2+u)*O.w,h=(1-s/2-l)*O.w,f=(c+h)/2,d=h-c,p=(1-s)*O.h,m=p-d/_;d.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),P.transition().style("opacity",1).duration(200),D=!0)}function c(t,e){if(L===S)return 2===e&&g(),i(j);i(j);var r={};r[O.id+".aaxis.min"]=L.a,r[O.id+".baxis.min"]=L.b,r[O.id+".caxis.min"]=L.c,s.relayout(j,r),T&&j.data&&j._context.showTips&&(l.notifier("Double-click to
zoom back out","long"),T=!1)}function h(){S={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=S}function f(t,e){var r=t/O.xaxis._m,n=e/O.yaxis._m;L={a:S.a-n,b:S.b+(r+n)/2,c:S.c-(r-n)/2};var i=[L.a,L.b,L.c].sort(),a={a:i.indexOf(L.a),b:i.indexOf(L.b),c:i.indexOf(L.c)};i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),L={a:i[a.a],b:i[a.b],c:i[a.c]},e=(S.a-L.a)*O.yaxis._m,t=(S.c-L.c-S.b+L.b)*O.xaxis._m);var o="translate("+(O.x0+t)+","+(O.y0+e)+")";O.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",o),O.aaxis.range=[L.a,O.sum-L.b-L.c],O.baxis.range=[O.sum-L.a-L.c,L.b],O.caxis.range=[O.sum-L.a-L.b,L.c],O.drawAxes(!1),O.plotContainer.selectAll(".crisp").classed("crisp",!1)}function d(t,e){if(t){var r={};r[O.id+".aaxis.min"]=L.a,r[O.id+".baxis.min"]=L.b,r[O.id+".caxis.min"]=L.c,s.relayout(j,r)}else 2===e&&g()}function p(){O.plotContainer.selectAll(".select-outline").remove()}function g(){var t={};t[O.id+".aaxis.min"]=0,t[O.id+".baxis.min"]=0,t[O.id+".caxis.min"]=0,j.emit("plotly_doubleclick",null),s.relayout(j,t)}var x,w,S,E,L,C,z,D,I,P,O=this,R=O.layers.plotbg.select("path").node(),j=O.graphDiv,F=O.layers.zoom,N={element:R,gd:j,plotinfo:{plot:F},doubleclick:g,subplot:O.id,prepFn:function(e,r,n){N.xaxes=[O.xaxis],N.yaxes=[O.yaxis];var i=j._fullLayout.dragmode;e.shiftKey&&(i="pan"===i?"zoom":"pan"),N.minDrag="lasso"===i?1:void 0,"zoom"===i?(N.moveFn=a,N.doneFn=c,t(e,r,n)):"pan"===i?(N.moveFn=f,N.doneFn=d,h(),p()):"select"!==i&&"lasso"!==i||v(e,r,n,N,i)}};R.onmousemove=function(t){b.hover(j,t,O.id),j._fullLayout._lasthover=R,j._fullLayout._hoversubplot=O.id},R.onmouseout=function(t){j._dragging||m.unhover(j,t)},R.onclick=function(t){b.click(j,t)},m.init(N)}},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../components/titles":661,"../../lib":690,"../../lib/extend":682,"../../plotly":724,"../cartesian/axes":729,"../cartesian/constants":734,"../cartesian/graph_interact":738,"../cartesian/select":745,"../cartesian/set_convert":746,"../plots":792,d3:114,tinycolor2:521}],807:[function(t,e,r){"use strict";function n(t){if(t.layoutAttributes){var e=t.layoutAttributes._arrayAttrRegexps;if(e)for(var n=0;n-1}var a=t("../lib"),o=t("../plots/plots"),s=a.extendFlat,l=a.extendDeep;e.exports=function(t,e){t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var r,a=t.data,u=t.layout,c=l([],a),h=l({},u,n(e.tileClass));if(e.width&&(h.width=e.width),e.height&&(h.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){h.annotations=[];var f=Object.keys(h);for(r=0;r0&&A>0,N=M<=R&&A<=j,B=M<=j&&A<=R,U="h"===v?R>=M*(j/A):j>=A*(R/M);F&&(N||B||U)?b="inside":(b="outside",x.remove(),x=null)}else b="inside";if(!x&&(x=m(e,y,"outside"===b?E:S),_=k.bBox(x.node()),M=_.width,A=_.height,M<=0||A<=0))return void x.remove();var V;V="outside"===b?a(o,f,d,p,_,v):i(o,f,d,p,_,v),x.attr("transform",V)}}}function i(t,e,r,n,i,a){var s,l,u,c,h,f=i.width,d=i.height,p=(i.left+i.right)/2,m=(i.top+i.bottom)/2,g=Math.abs(e-t),v=Math.abs(n-r);g>2*D&&v>2*D?(h=D,g-=2*h,v-=2*h):h=0;var y,b;return f<=g&&d<=v?(y=!1,b=1):f<=v&&d<=g?(y=!0,b=1):fr?(u=(t+e)/2,c=n-h-l/2):(u=(t+e)/2,c=n+h+l/2),o(p,m,u,c,b,y)}function a(t,e,r,n,i,a){var s,l="h"===a?Math.abs(n-r):Math.abs(e-t);l>2*D&&(s=D,l-=2*s);var u,c,h,f,d="h"===a?Math.min(1,l/i.height):Math.min(1,l/i.width),p=(i.left+i.right)/2,m=(i.top+i.bottom)/2;return u=d*i.width,c=d*i.height,"h"===a?er?(h=(t+e)/2,f=n+s+c/2):(h=(t+e)/2,f=n-s-c/2),o(p,m,h,f,d,!1)}function o(t,e,r,n,i,a){var o,s;return i<1?o="scale("+i+") ":(i=1,o=""),s=a?"rotate("+a+" "+t+" "+e+") ":"","translate("+(r-i*t)+" "+(n-i*e)+")"+o+s}function s(t,e){var r=d(t.text,e);return p(S,r)}function l(t,e){var r=d(t.textposition,e);return m(E,r)}function u(t,e,r){return f(L,t.textfont,e,r)}function c(t,e,r){return f(C,t.insidetextfont,e,r)}function h(t,e,r){return f(z,t.outsidetextfont,e,r)}function f(t,e,r,n){e=e||{};var i=d(e.family,r),a=d(e.size,r),o=d(e.color,r);return{family:p(t.family,i,n.family),size:g(t.size,a,n.size),color:v(t.color,o,n.color)}}function d(t,e){var r;return Array.isArray(t)?ei))return e}return void 0!==r?r:t.dflt}function v(t,e,r){return x(e).isValid()?e:void 0!==r?r:t.dflt}var y=t("d3"),b=t("fast-isnumeric"),x=t("tinycolor2"),_=t("../../lib"),w=t("../../lib/svg_text_utils"),M=t("../../components/color"),k=t("../../components/drawing"),A=t("../../components/errorbars"),T=t("./attributes"),S=T.text,E=T.textposition,L=T.textfont,C=T.insidetextfont,z=T.outsidetextfont,D=3;e.exports=function(t,e,r){var i=e.xaxis,a=e.yaxis,o=t._fullLayout,s=e.plot.select(".barlayer").selectAll("g.trace.bars").data(r);s.enter().append("g").attr("class","trace bars"),s.append("g").attr("class","points").each(function(e){var r=e[0].t,s=e[0].trace,l=r.poffset,u=Array.isArray(l);y.select(this).selectAll("g.point").data(_.identity).enter().append("g").classed("point",!0).each(function(r,c){function h(t){return 0===o.bargap&&0===o.bargroupgap?y.round(Math.round(t)-A,2):t}function f(t,e){return Math.abs(t-e)>=2?h(t):t>e?Math.ceil(t):Math.floor(t)}var d,p,m,g,v=r.p+(u?l[c]:l),x=v+r.w,_=r.b,w=_+r.s;if("h"===s.orientation?(m=a.c2p(v,!0),g=a.c2p(x,!0),d=i.c2p(_,!0),p=i.c2p(w,!0)):(d=i.c2p(v,!0),p=i.c2p(x,!0),m=a.c2p(_,!0),g=a.c2p(w,!0)),!(b(d)&&b(p)&&b(m)&&b(g)&&d!==p&&m!==g))return void y.select(this).remove();var k=(r.mlw+1||s.marker.line.width+1||(r.trace?r.trace.marker.line.width:0)+1)-1,A=y.round(k/2%1,2);if(!t._context.staticPlot){var T=M.opacity(r.mc||s.marker.color),S=T<1||k>.01?h:f;d=S(d,p),p=S(p,d),m=S(m,g),g=S(g,m)}var E=y.select(this);E.append("path").attr("d","M"+d+","+m+"V"+g+"H"+p+"V"+m+"Z"),n(t,E,e,c,d,p,m,g)})}),s.call(A.plot,e)}},{"../../components/color":585,"../../components/drawing":608,"../../components/errorbars":614,"../../lib":690,"../../lib/svg_text_utils":709,"./attributes":817,d3:114,"fast-isnumeric":123,tinycolor2:521}],825:[function(t,e,r){"use strict";function n(t,e,r,n){if(n.length){var s,l,u,c,h,f=t._fullLayout.barmode,d="overlay"===f,p="group"===f;if(d)i(t,e,r,n);else if(p){for(s=[],l=[],u=0;uu+s||!y(l))&&(h=!0,f(c,t))}for(var i=r.traces,a=v(e),o="fraction"===t._fullLayout.barnorm?1:100,s=o/1e9,l=e.l2c(e.c2l(0)),u="stack"===t._fullLayout.barmode?o:l,c=[l,u],h=!1,d=0;d1||0===s.bargap&&0===s.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(t){var e=t[0].trace,r=e.marker,o=r.line,s=a.tryColorscale(r,""),l=a.tryColorscale(r,"line");n.select(this).selectAll("path").each(function(t){var e,a,u=(t.mlw+1||o.width+1)-1,c=n.select(this);e="mc"in t?t.mcc=s(t.mc):Array.isArray(r.color)?i.defaultLine:r.color,c.style("stroke-width",u+"px").call(i.fill,e),u&&(a="mlc"in t?t.mlcc=l(t.mlc):Array.isArray(o.color)?i.defaultLine:o.color,c.call(i.stroke,a))})}),e.call(o.style)}},{"../../components/color":585,"../../components/drawing":608,"../../components/errorbars":614,d3:114}],828:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),i(t,"marker")&&a(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width")}},{"../../components/color":585,"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598}],829:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../components/color/attributes"),a=t("../../lib/extend").extendFlat,o=n.marker,s=o.line;e.exports={y:{valType:"data_array"},x:{valType:"data_array"},x0:{valType:"any"},y0:{valType:"any"},xcalendar:n.xcalendar,ycalendar:n.ycalendar,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1},jitter:{valType:"number",min:0,max:1},pointpos:{valType:"number",min:-2,max:2},orientation:{valType:"enumerated",values:["v","h"]},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)"},symbol:a({},o.symbol,{arrayOk:!1}),opacity:a({},o.opacity,{arrayOk:!1,dflt:1}),size:a({},o.size,{arrayOk:!1}),color:a({},o.color,{arrayOk:!1}),line:{color:a({},s.color,{arrayOk:!1,dflt:i.defaultLine}),width:a({},s.width,{arrayOk:!1,dflt:0}),outliercolor:{valType:"color"},outlierwidth:{valType:"number",min:0,dflt:1}}},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2}},fillcolor:n.fillcolor}},{"../../components/color/attributes":584,"../../lib/extend":682,"../scatter/attributes":947}],830:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/cartesian/axes");e.exports=function(t,e){ +var r,o,s,l,u,c,h,f,d,p=a.getFromId(t,e.xaxis||"x"),m=a.getFromId(t,e.yaxis||"y"),g=e.orientation,v=[];"h"===g?(r=p,o="x",u=m,c="y"):(r=m,o="y",u=p,c="x"),s=r.makeCalcdata(e,o),a.expand(r,s,{padded:!0}),h=function(t,e,r,a,o){var s;return r in e?h=a.makeCalcdata(e,r):(s=r+"0"in e?e[r+"0"]:"name"in e&&("category"===a.type||n(e.name)&&-1!==["linear","log"].indexOf(a.type)||i.isDateTime(e.name)&&"date"===a.type)?e.name:t.numboxes,s=a.d2c(s,0,e[r+"calendar"]),h=o.map(function(){return s})),h}(t,e,c,u,s);var y=i.distinctVals(h);return f=y.vals,d=y.minDiff/2,l=function(t,e,r,a,o){var s,l,u,c,h=a.length,f=e.length,d=[],p=[];for(s=0;s=0&&u1,m=r.dPos*(1-c.boxgap)*(1-c.boxgroupgap)/(p?t.numboxes:1),g=p?2*r.dPos*((r.boxnum+.5)/t.numboxes-.5)*(1-c.boxgap):0,v=m*d.whiskerwidth;if(!0!==d.visible||r.emptybox)return void a.select(this).remove();"h"===d.orientation?(l=f,u=h):(l=h,u=f),r.bPos=g,r.bdPos=m,n(),a.select(this).selectAll("path.box").data(o.identity).enter().append("path").attr("class","box").each(function(t){var e=l.c2p(t.pos+g,!0),r=l.c2p(t.pos+g-m,!0),n=l.c2p(t.pos+g+m,!0),i=l.c2p(t.pos+g-v,!0),s=l.c2p(t.pos+g+v,!0),c=u.c2p(t.q1,!0),h=u.c2p(t.q3,!0),f=o.constrain(u.c2p(t.med,!0),Math.min(c,h)+1,Math.max(c,h)-1),p=u.c2p(!1===d.boxpoints?t.min:t.lf,!0),y=u.c2p(!1===d.boxpoints?t.max:t.uf,!0);"h"===d.orientation?a.select(this).attr("d","M"+f+","+r+"V"+n+"M"+c+","+r+"V"+n+"H"+h+"V"+r+"ZM"+c+","+e+"H"+p+"M"+h+","+e+"H"+y+(0===d.whiskerwidth?"":"M"+p+","+i+"V"+s+"M"+y+","+i+"V"+s)):a.select(this).attr("d","M"+r+","+f+"H"+n+"M"+r+","+c+"H"+n+"V"+h+"H"+r+"ZM"+e+","+c+"V"+p+"M"+e+","+h+"V"+y+(0===d.whiskerwidth?"":"M"+i+","+p+"H"+s+"M"+i+","+y+"H"+s))}),d.boxpoints&&a.select(this).selectAll("g.points").data(function(t){return t.forEach(function(t){t.t=r,t.trace=d}),t}).enter().append("g").attr("class","points").selectAll("path").data(function(t){var e,r,n,a,s,l,u,c="all"===d.boxpoints?t.val:t.val.filter(function(e){return et.uf}),h=Math.max((t.max-t.min)/10,t.q3-t.q1),f=1e-9*h,p=.01*h,v=[],y=0;if(d.jitter){if(0===h)for(y=1,v=new Array(c.length),e=0;et.lo&&(n.so=!0),n})}).enter().append("path").call(s.translatePoints,h,f),d.boxmean&&a.select(this).selectAll("path.mean").data(o.identity).enter().append("path").attr("class","mean").style("fill","none").each(function(t){var e=l.c2p(t.pos+g,!0),r=l.c2p(t.pos+g-m,!0),n=l.c2p(t.pos+g+m,!0),i=u.c2p(t.mean,!0),o=u.c2p(t.mean-t.sd,!0),s=u.c2p(t.mean+t.sd,!0);"h"===d.orientation?a.select(this).attr("d","M"+i+","+r+"V"+n+("sd"!==d.boxmean?"":"m0,0L"+o+","+e+"L"+i+","+r+"L"+s+","+e+"Z")):a.select(this).attr("d","M"+r+","+i+"H"+n+("sd"!==d.boxmean?"":"m0,0L"+e+","+o+"L"+r+","+i+"L"+e+","+s+"Z"))})})}},{"../../components/drawing":608,"../../lib":690,d3:114}],837:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/cartesian/axes"),a=t("../../lib");e.exports=function(t,e){var r,o,s,l,u=t._fullLayout,c=e.xaxis,h=e.yaxis,f=["v","h"];for(o=0;ol&&(e.z=c.slice(0,l)),s("locationmode"),s("text"),s("marker.line.color"),s("marker.line.width"),i(t,e,o,s,{prefix:"",cLetter:"z"}),s("hoverinfo",1===o._dataLength?"location+z+text":void 0)}},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":843}],846:[function(t,e,r){"use strict";e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],847:[function(t,e,r){"use strict";function n(t,e,r,n){var o=e.hoverinfo,s="all"===o?a.hoverinfo.flags:o.split("+"),l=-1!==s.indexOf("name"),u=-1!==s.indexOf("location"),c=-1!==s.indexOf("z"),h=-1!==s.indexOf("text"),f=!l&&u,d=[];f?t.nameOverride=r.id:(l&&(t.nameOverride=e.name),u&&d.push(r.id)),c&&d.push(function(t){return i.tickText(n,n.c2l(t),"hover").text}(r.z)),h&&d.push(r.tx),t.extraText=d.join("
")}var i=t("../../plots/cartesian/axes"),a=t("./attributes");e.exports=function(t){var e=t.cd,r=e[0].trace,i=t.subplot,a=i.choroplethHoverPt;if(a){var o=i.projection(a.properties.ct);return t.x0=t.x1=o[0],t.y0=t.y1=o[1],t.index=a.index,t.location=a.id,t.z=a.z,n(t,r,a,i.mockAxis),[t]}}},{"../../plots/cartesian/axes":729,"./attributes":843}],848:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../heatmap/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="choropleth",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","noOpacity"],n.meta={},e.exports=n},{"../../plots/geo":757,"../heatmap/colorbar":868,"./attributes":843,"./calc":844,"./defaults":845,"./event_data":846,"./hover":847,"./plot":849}],849:[function(t,e,r){"use strict";function n(t,e){for(var r,n=[],i=t.locations,a=i.length,o=u(t,e),s=(t.marker||{}).line||{},l=0;l0&&(n[0].trace=t),n}function i(t){t.framework.selectAll("g.trace.choropleth").each(function(t){var e=t[0].trace,r=a.select(this),n=e.marker||{},i=n.line||{},u=l.makeColorScaleFunc(l.extractScale(e.colorscale,e.zmin,e.zmax));r.selectAll("path.choroplethlocation").each(function(t){a.select(this).attr("fill",function(t){return u(t.z)}).call(o.stroke,t.mlc||i.color).call(s.dashLine,"",t.mlw||i.width||0)})})}var a=t("d3"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("../../components/colorscale"),u=t("../../lib/topojson_utils").getTopojsonFeatures,c=t("../../lib/geo_location_utils").locationToFeature,h=t("../../lib/array_to_calc_item"),f=t("../../plots/geo/constants");e.exports=function(t,e,r){function o(t){return t[0].trace.uid}var s,l=t.framework,u=l.select("g.choroplethlayer"),c=l.select("g.baselayer"),h=l.select("g.baselayeroverchoropleth"),d=f.baseLayersOverChoropleth,p=u.selectAll("g.trace.choropleth").data(e,o);p.enter().append("g").attr("class","trace choropleth"),p.exit().remove(),p.each(function(e){var r=e[0].trace,i=n(r,t.topojson),o=a.select(this).selectAll("path.choroplethlocation").data(i);o.enter().append("path").classed("choroplethlocation",!0).on("mouseover",function(e){t.choroplethHoverPt=e}).on("mouseout",function(){t.choroplethHoverPt=null}),o.exit().remove()}),h.selectAll("*").remove();for(var m=0;ms.end&&(s.start=s.end=(s.start+s.end)/2),e._input.contours||(e._input.contours={}),a(e._input.contours,{start:s.start,end:s.end,size:s.size}),e._input.autocontour=!0}else{var u=s.start,c=s.end,h=e._input.contours;if(u>c&&(s.start=h.start=c,c=s.end=h.end=u,u=s.start),!(s.size>0)){var f;f=u===c?1:n(u,c,e.ncontours).dtick,h.size=s.size=f}}return r}},{"../../lib":690,"../../plots/cartesian/axes":729,"../heatmap/calc":866}],852:[function(t,e,r){"use strict";var n=t("../../plots/plots"),i=t("../../components/colorbar/draw"),a=t("./make_color_map"),o=t("./end_plus");e.exports=function(t,e){var r=e[0].trace,s="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+s).remove(),!1===r.showscale)return void n.autoMargin(t,s);var l=i(t,s);e[0].t.cb=l;var u=r.contours,c=r.line,h=u.size||1,f=u.coloring,d=a(r,{isColorbar:!0});"heatmap"===f&&l.filllevels({start:r.zmin,end:r.zmax,size:(r.zmax-r.zmin)/254}),l.fillcolor("fill"===f||"heatmap"===f?d:"").line({color:"lines"===f?d:c.color,width:!1!==u.showlines?c.width:0,dash:c.dash}).levels({start:u.start,end:o(u),size:h}).options(r.colorbar)()}},{"../../components/colorbar/draw":588,"../../plots/plots":792,"./end_plus":856,"./make_color_map":860}],853:[function(t,e,r){"use strict";e.exports.BOTTOMSTART=[1,9,13,104,713],e.exports.TOPSTART=[4,6,7,104,713],e.exports.LEFTSTART=[8,12,14,208,1114],e.exports.RIGHTSTART=[2,3,11,208,1114],e.exports.NEWDELTA=[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],e.exports.CHOOSESADDLE={104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},e.exports.SADDLEREMAINDER={1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11}},{}],854:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){var a,o=n.coerce2(t,e,i,"contours.start"),s=n.coerce2(t,e,i,"contours.end"),l=!1===o||!1===s,u=r("contours.size");!(a=l?e.autocontour=!0:r("autocontour",!1))&&u||r("ncontours")}},{"../../lib":690,"./attributes":850}],855:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../heatmap/has_columns"),a=t("../heatmap/xyz_defaults"),o=t("./contours_defaults"),s=t("./style_defaults"),l=t("./attributes");e.exports=function(t,e,r,u){function c(r,i){return n.coerce(t,e,l,r,i)}if(!a(t,e,c,u))return void(e.visible=!1);c("text"),c("connectgaps",i(e)),o(t,e,c),s(t,e,c,u)}},{"../../lib":690,"../heatmap/has_columns":872,"../heatmap/xyz_defaults":880,"./attributes":850,"./contours_defaults":854,"./style_defaults":864}],856:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],857:[function(t,e,r){"use strict";function n(t,e){return Math.abs(t[0]-e[0])<.01&&Math.abs(t[1]-e[1])<.01}function i(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}function a(t,e,r){function a(t){return m[t%m.length]}var c,h=e.join(","),f=h,d=t.crossings[f],p=o(d,r,e),m=[s(t,e,[-p[0],-p[1]])],g=p.join(","),v=t.z.length,y=t.z[0].length;for(c=0;c<1e4;c++){if(d>20?(d=u.CHOOSESADDLE[d][(p[0]||p[1])<0?0:1],t.crossings[f]=u.SADDLEREMAINDER[d]):delete t.crossings[f],!(p=u.NEWDELTA[d])){l.log("Found bad marching index:",d,e,t.level);break}m.push(s(t,e,p)),e[0]+=p[0],e[1]+=p[1],n(m[m.length-1],m[m.length-2])&&m.pop(),f=e.join(",");var b=p[0]&&(e[0]<0||e[0]>y-2)||p[1]&&(e[1]<0||e[1]>v-2);if(f===h&&p.join(",")===g||r&&b)break;d=t.crossings[f]}1e4===c&&l.log("Infinite loop in contour?");var x,_,w,M,k,A,T,S=n(m[0],m[m.length-1]),E=0,L=.2*t.smoothing,C=[],z=0;for(c=1;c=z;c--)if((x=C[c])=z&&x+C[_]20&&e?208===t||1114===t?n=0===r[0]?1:-1:i=0===r[1]?1:-1:-1!==u.BOTTOMSTART.indexOf(t)?i=1:-1!==u.LEFTSTART.indexOf(t)?n=1:-1!==u.TOPSTART.indexOf(t)?i=-1:n=-1,[n,i]}function s(t,e,r){var n=e[0]+Math.max(r[0],0),i=e[1]+Math.max(r[1],0),a=t.z[i][n],o=t.xaxis,s=t.yaxis;if(r[1]){var l=(t.level-a)/(t.z[i][n+1]-a);return[o.c2p((1-l)*t.x[n]+l*t.x[n+1],!0),s.c2p(t.y[i],!0)]}var u=(t.level-a)/(t.z[i+1][n]-a);return[o.c2p(t.x[n],!0),s.c2p((1-u)*t.y[i]+u*t.y[i+1],!0)]}var l=t("../../lib"),u=t("./constants");e.exports=function(t){var e,r,n,i,o;for(n=0;nt?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);if(5===r||10===r){return t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208}return 15===r?0:r}var i=t("./constants");e.exports=function(t){var e,r,a,o,s,l,u,c,h,f=t[0].z,d=f.length,p=f[0].length,m=2===d||2===p;for(r=0;r1e3){d.warn("Too many contours, clipping at 1000",t);break}return i}function a(t,e,r){var n=t.plot.select(".maplayer").selectAll("g.contour."+r).data(e);return n.enter().append("g").classed("contour",!0).classed(r,!0),n.exit().remove(),n}function o(t,e,r){var n=t.selectAll("g.contourbg").data([0]);n.enter().append("g").classed("contourbg",!0);var i=n.selectAll("path").data("fill"===r.coloring?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+e.join("L")+"Z").style("stroke","none")}function s(t,e,r,n){var i=t.selectAll("g.contourfill").data([0]);i.enter().append("g").classed("contourfill",!0);var a=i.selectAll("path").data("fill"===n.coloring?e:[]);a.enter().append("path"),a.exit().remove(),a.each(function(t){var e=l(t,r);e?f.select(this).attr("d",e).style("stroke","none"):f.select(this).remove()})}function l(t,e){function r(t){return Math.abs(t[0]-e[2][0])<.01}for(var n,i,a,o,s,l,u=Math.min(t.z[0][0],t.z[0][1]),c=t.edgepaths.length||u<=t.level?"":"M"+e.join("L")+"Z",h=0,f=t.edgepaths.map(function(t,e){return e}),m=!0;f.length;){for(l=p.smoothopen(t.edgepaths[h],t.smoothing),c+=m?l:l.replace(/^M/,"L"),f.splice(f.indexOf(h),1),n=t.edgepaths[h][t.edgepaths[h].length-1],o=-1,a=0;a<4;a++){if(!n){d.log("Missing end?",h,t);break}for(!function(t){return Math.abs(t[1]-e[0][1])<.01}(n)||r(n)?!function(t){return Math.abs(t[0]-e[0][0])<.01}(n)?!function(t){return Math.abs(t[1]-e[2][1])<.01}(n)?r(n)&&(i=e[2]):i=e[3]:i=e[0]:i=e[1],s=0;s=0&&(i=g,o=s):Math.abs(n[1]-i[1])<.01?Math.abs(n[1]-g[1])<.01&&(g[0]-n[0])*(i[0]-g[0])>=0&&(i=g,o=s):d.log("endpt to newendpt is not vert. or horz.",n,i,g)}if(n=i,o>=0)break;c+="L"+i}if(o===t.edgepaths.length){d.log("unclosed perimeter path");break}h=o,m=-1===f.indexOf(h),m&&(h=f[0],c+="Z")}for(h=0;hz){r("x scale is not linear");break}}if(y.length&&"fast"===E){var D=(y[y.length-1]-y[0])/(y.length-1),I=Math.abs(D/100);for(w=0;wI){r("y scale is not linear");break}}}var P=c(_),O="scaled"===e.xtype?"":m,R=p(e,O,g,v,P,M),j="scaled"===e.ytype?"":y,F=p(e,j,b,x,_.length,k);S||(a.expand(M,R),a.expand(k,F));var N={x:R,y:F,z:_,text:e.text};if(s(e,_,"","z"),A&&e.contours&&"heatmap"===e.contours.coloring){var B={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};N.xfill=p(B,O,g,v,P,M),N.yfill=p(B,j,b,x,_.length,k)}return[N]}},{"../../components/colorscale/calc":591,"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807,"../histogram2d/calc":894,"./clean_2d_array":867,"./convert_column_xyz":869,"./find_empties":871,"./has_columns":872,"./interp2d":875,"./make_bound_array":876,"./max_row_length":877}],867:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){var r,i,a,o,s,l;if(e){for(r=0,s=0;s=0;o--)a=f[o],r=a[0],i=a[1],(s=((h[[r-1,i]]||m)[2]+(h[[r+1,i]]||m)[2]+(h[[r,i-1]]||m)[2]+(h[[r,i+1]]||m)[2])/20)&&(l[a]=[r,i,s],f.splice(o,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(a in l)h[a]=l[a],c.push(l[a])}return c.sort(function(t,e){return e[2]-t[2]})}},{"./max_row_length":877}],872:[function(t,e,r){"use strict";e.exports=function(t){return!Array.isArray(t.z[0])}},{}],873:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/graph_interact"),i=t("../../lib"),a=t("../../plots/cartesian/constants").MAXDIST;e.exports=function(t,e,r,o,s){if(!(t.distance=y[0].length||h<0||h>y.length)return}else{if(n.inbox(e-g[0],e-g[g.length-1])>a||n.inbox(r-v[0],r-v[v.length-1])>a)return;if(s){var w;for(x=[2*g[0]-g[1]],w=1;wm&&(v=Math.max(v,Math.abs(t[i][a]-p)/(g-m))))}return v}var a=t("../../lib"),o=[[-1,0],[1,0],[0,-1],[0,1]];e.exports=function(t,e,r){var o,s,l=1;if(Array.isArray(r))for(o=0;o.01;o++)l=i(t,e,n(l));return l>.01&&a.log("interp2d didn't converge quickly",l),t}},{"../../lib":690}],876:[function(t,e,r){"use strict";var n=t("../../registry");e.exports=function(t,e,r,i,a,o){var s,l,u,c=[],h=n.traceIs(t,"contour"),f=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(Array.isArray(e)&&e.length>1&&!f&&"category"!==o.type){var p=e.length;if(!(p<=a))return h?e.slice(0,a):e.slice(0,a+1);if(h||d)c=e.slice(0,a);else if(1===a)c=[e[0]-.5,e[0]+.5];else{for(c=[1.5*e[0]-.5*e[1]],u=1;u0;)b=p.c2p(A[M]),M--;for(b0;)w=m.c2p(T[M]),M--;if(w<_&&(x=_,_=w,w=x,D=!0),S&&(A=r[0].xfill,T=r[0].yfill),"fast"!==E){var I="best"===E?0:.5;y=Math.max(-I*p._length,y),b=Math.min((1+I)*p._length,b),_=Math.max(-I*m._length,_),w=Math.min((1+I)*m._length,w)}var P=Math.round(b-y),O=Math.round(w-_),R=P<=0||O<=0,j=e.plot.select(".imagelayer").selectAll("g.hm."+v).data(R?[]:[0]);if(j.enter().append("g").classed("hm",!0).classed(v,!0),j.exit().remove(),!R){var F,N;"fast"===E?(F=C,N=L):(F=P,N=O);var B=document.createElement("canvas");B.width=F,B.height=N;var U,V,q=B.getContext("2d"),H=s.makeColorScaleFunc(s.extractScale(f.colorscale,f.zmin,f.zmax),{noNumericCheck:!0,returnArray:!0});"fast"===E?(U=z?function(t){return C-1-t}:o.identity,V=D?function(t){return L-1-t}:o.identity):(U=function(t){return o.constrain(Math.round(p.c2p(A[t])-y),0,P)},V=function(t){return o.constrain(Math.round(m.c2p(T[t])-_),0,O)});var Y,G,X,W,Z,J,K,Q=V(0),$=[Q,Q],tt=z?0:1,et=D?0:1,rt=0,nt=0,it=0,at=0;if(E){var ot,st=0;try{ot=new Uint8Array(P*O*4)}catch(t){ot=new Array(P*O*4)}if("best"===E){var lt,ut,ct,ht=new Array(A.length),ft=new Array(T.length),dt=new Array(P);for(M=0;M0&&a0&&s0&&(n=!0);for(var s=0;sa){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]=0;a--)i(a);else if("increasing"===e){for(a=1;a=0;a--)t[a]+=t[a+1];"exclude"===r&&(t.push(0),t.shift())}}var i=t("fast-isnumeric"),a=t("../../lib"),o=t("../../plots/cartesian/axes"),s=t("../bar/arrays_to_calcdata"),l=t("./bin_functions"),u=t("./norm_functions"),c=t("./average"),h=t("./clean_bins");e.exports=function(t,e){if(!0===e.visible){var r,f=[],d=[],p=o.getFromId(t,"h"===e.orientation?e.yaxis||"y":e.xaxis||"x"),m="h"===e.orientation?"y":"x",g={x:"y",y:"x"}[m],v=e[m+"calendar"],y=e.cumulative;h(e,p,m);var b,x=p.makeCalcdata(e,m),_=m+"bins";!1===e["autobin"+m]&&_ in e?b=e[_]:(b=o.autoBin(x,p,e["nbins"+m],!1,v),y.enabled&&"include"!==y.currentbin&&("decreasing"===y.direction?b.start=p.c2r(p.r2c(b.start)-b.size):b.end=p.c2r(p.r2c(b.end)+b.size)),e._input[_]=e[_]=b);var w,M,k,A="string"==typeof b.size,T=A?[]:b,S=[],E=[],L=0,C=e.histnorm,z=e.histfunc,D=-1!==C.indexOf("density");y.enabled&&D&&(C=C.replace(/ ?density$/,""),D=!1);var I,P="max"===z||"min"===z,O=P?null:0,R=l.count,j=u[C],F=!1,N=function(t){return p.r2c(t,0,v)};for(Array.isArray(e[g])&&"count"!==z&&(I=e[g],F="avg"===z,R=l[z]),r=N(b.start),M=N(b.end)+(r-o.tickIncrement(r,b.size,!1,v))/1e6;r=0&&kq;r--)if(d[r]){H=r;break}for(r=q;r<=H;r++)i(f[r])&&i(d[r])&&V.push({p:f[r],s:d[r],b:0});return s(V,e),V}}},{"../../lib":690,"../../plots/cartesian/axes":729,"../bar/arrays_to_calcdata":816,"./average":885,"./bin_functions":887,"./clean_bins":889,"./norm_functions":892,"fast-isnumeric":123}],889:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib").cleanDate,a=t("../../constants/numerical"),o=a.ONEDAY,s=a.BADNUM;e.exports=function(t,e,r){var a=e.type,l=r+"bins",u=t[l];u||(u=t[l]={});var c="date"===a?function(t){return t||0===t?i(t,s,u.calendar):null}:function(t){return n(t)?Number(t):null};u.start=c(u.start),u.end=c(u.end);var h="date"===a?o:1,f=u.size;if(n(f))u.size=f>0?Number(f):h;else if("string"!=typeof f)u.size=h;else{var d=f.charAt(0),p=f.substr(1);p=n(p)?Number(p):0,(p<=0||"date"!==a||"M"!==d||p!==Math.round(p))&&(u.size=h)}var m="autobin"+r;"boolean"!=typeof t[m]&&(t[m]=!((u.start||0===u.start)&&(u.end||0===u.end))),t[m]||delete t["nbins"+r]}},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],890:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../components/color"),o=t("./bin_defaults"),s=t("../bar/style_defaults"),l=t("../../components/errorbars/defaults"),u=t("./attributes");e.exports=function(t,e,r,c){function h(r,n){return i.coerce(t,e,u,r,n)}var f=h("x"),d=h("y");h("cumulative.enabled")&&(h("cumulative.direction"),h("cumulative.currentbin")),h("text");var p=h("orientation",d&&!f?"h":"v"),m=e["v"===p?"x":"y"];if(!m||!m.length)return void(e.visible=!1);n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],c),e["h"===p?"x":"y"]&&h("histfunc"),o(t,e,h,"h"===p?["y"]:["x"]),s(t,e,h,r,c),l(t,e,a.defaultLine,{axis:"y"}),l(t,e,a.defaultLine,{axis:"x",inherit:"y"})}},{"../../components/color":585,"../../components/errorbars/defaults":613,"../../lib":690,"../../registry":807,"../bar/style_defaults":828,"./attributes":884,"./bin_defaults":886}],891:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.layoutAttributes=t("../bar/layout_attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("../bar/layout_defaults"),n.calc=t("./calc"),n.setPositions=t("../bar/set_positions"),n.plot=t("../bar/plot"),n.style=t("../bar/style"),n.colorbar=t("../scatter/colorbar"),n.hoverPoints=t("../bar/hover"),n.moduleType="trace",n.name="histogram",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","bar","histogram","oriented","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":739,"../bar/hover":820,"../bar/layout_attributes":822,"../bar/layout_defaults":823,"../bar/plot":824,"../bar/set_positions":825,"../bar/style":827,"../scatter/colorbar":950,"./attributes":884,"./calc":888,"./defaults":890}],892:[function(t,e,r){"use strict";e.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;ik&&m.splice(k,m.length-k),v.length>k&&v.splice(k,v.length-k),!e.autobinx&&"xbins"in e||(e.xbins=i.autoBin(m,p,e.nbinsx,"2d",y),"histogram2dcontour"===e.type&&(e.xbins.start=w(i.tickIncrement(x(e.xbins.start),e.xbins.size,!0,y)),e.xbins.end=w(i.tickIncrement(x(e.xbins.end),e.xbins.size,!1,y))),e._input.xbins=e.xbins),!e.autobiny&&"ybins"in e||(e.ybins=i.autoBin(v,g,e.nbinsy,"2d",b),"histogram2dcontour"===e.type&&(e.ybins.start=M(i.tickIncrement(_(e.ybins.start),e.ybins.size,!0,b)),e.ybins.end=M(i.tickIncrement(_(e.ybins.end),e.ybins.size,!1,b))),e._input.ybins=e.ybins),f=[];var A,T,S=[],E=[],L="string"==typeof e.xbins.size,C="string"==typeof e.ybins.size,z=L?[]:e.xbins,D=C?[]:e.ybins,I=0,P=[],O=e.histnorm,R=e.histfunc,j=-1!==O.indexOf("density"),F="max"===R||"min"===R,N=F?null:0,B=a.count,U=o[O],V=!1,q=[],H=[],Y="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";Y&&"count"!==R&&(V="avg"===R,B=a[R]);var G=e.xbins,X=x(G.start),W=x(G.end)+(X-i.tickIncrement(X,G.size,!1,y))/1e6;for(d=X;d=0&&A=0&&T0)s=h(t.alphahull,l);else{var u=["x","y","z"].indexOf(t.delaunayaxis);s=c(l.map(function(t){return[t[(u+1)%3],t[(u+2)%3]]}))}var p={positions:l,cells:s,lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:d(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};t.intensity?(this.color="#fff",p.vertexIntensity=t.intensity,p.colormap=i(t.colorscale)):t.vertexcolor?(this.color=t.vertexcolors[0],p.vertexColors=a(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],p.cellColors=a(t.facecolor)):(this.color=t.color,p.meshColor=d(t.color)),this.mesh.update(p)},p.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=s},{"../../lib/str2rgbarray":708,"alpha-shape":37,"convex-hull":95,"delaunay-triangulate":115,"gl-mesh3d":196,tinycolor2:521}],903:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../components/colorbar/defaults"),o=t("./attributes");e.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function u(t){var e=t.map(function(t){var e=l(t);return e&&Array.isArray(e)?e:null});return e.every(function(t){return t&&t.length===e[0].length})&&e}var c=u(["x","y","z"]),h=u(["i","j","k"]);if(!c)return void(e.visible=!1);h&&h.forEach(function(t){for(var e=0;ee}}},r.addRangeSlider=function(t,e){for(var r=!1,n=0;n1)){var h=o.simpleMap(c.x,e.d2c,0,r.xcalendar),f=o.distinctVals(h).minDiff;a=Math.min(a,f)}}for(a===1/0&&(a=1),u=0;u");_.push(o,o,o,o,o,o,null)}(L,d[L],p[L],m[L],g[L]));e.x=b,e.y=x,e.text=_}},{"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_ids":732,"./helpers":908}],912:[function(t,e,r){"use strict";var n=t("../../components/colorscale/color_attributes"),i=t("../../components/colorbar/attributes"),a=t("../../components/colorscale/scales"),o=t("../../plots/cartesian/layout_attributes"),s=t("../../lib/extend").extendDeep,l=t("../../lib/extend").extendFlat;e.exports={domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},dimensions:{_isLinkedToArray:"dimension",label:{valType:"string"},tickvals:o.tickvals,ticktext:o.ticktext,tickformat:{valType:"string",dflt:"3s"},visible:{valType:"boolean",dflt:!0},range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},constraintrange:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},values:{valType:"data_array",dflt:[]}},line:l({},s({},n("line"),{colorscale:s({},n("line").colorscale,{dflt:a.Viridis}),autocolorscale:s({},n("line").autocolorscale,{dflt:!1})}),{showscale:{valType:"boolean",dflt:!1},colorbar:i})}},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/colorscale/scales":603,"../../lib/extend":682,"../../plots/cartesian/layout_attributes":740}],913:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plots/plots"),a=t("./plot"),o=t("../../constants/xmlns_namespaces"),s=t("./constants");r.name="parcoords",r.attr="type",r.plot=function(t){var e=i.getSubplotCalcData(t.calcdata,"parcoords","parcoords");e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords-line-layers").remove(),n._paperdiv.selectAll(".parcoords-line-layers").remove(),n._paperdiv.selectAll(".parcoords").remove(),n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){function e(e){var n=this,i=n.toDataURL("image/png"),a=r.append("svg:image"),l=t._fullLayout._size,u=t._fullData[e.model.key].domain;a.attr({xmlns:o.svg,"xlink:href":i,x:l.l+l.w*u.x[0]-s.overdrag,y:l.t+l.h*(1-u.y[1]),width:(u.x[1]-u.x[0])*l.w+2*s.overdrag,height:(u.y[1]-u.y[0])*l.h,preserveAspectRatio:"none"})}var r=t._fullLayout._glimages,i=n.selectAll(".svg-container");i.filter(function(t,e){return e===i.size()-1}).selectAll(".parcoords-lines.context, .parcoords-lines.focus").each(e),window.setTimeout(function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":674,"../../plots/plots":792,"./constants":916,"./plot":921,d3:114}],914:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/calc"),a=t("../../lib");e.exports=function(t,e){var r=!!e.line.colorscale&&a.isArray(e.line.color),o=r?e.line.color:Array.apply(0,Array(e.dimensions.reduce(function(t,e){return Math.max(t,e.values.length)},0))).map(function(){return.5}),s=r?e.line.colorscale:[[0,e.line.color],[1,e.line.color]];return n(e,"line")&&i(e,e.line.color,"line","c"),[{lineColor:o,cscale:s}]}},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"../../lib":690}],915:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../components/colorscale"),s=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,l=r.line,u="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===l||!l.showscale)return void a.autoMargin(t,u);var c=l.color,h=l.cmin,f=l.cmax;n(h)||(h=i.aggNums(Math.min,null,c)),n(f)||(f=i.aggNums(Math.max,null,c));var d=e[0].t.cb=s(t,u),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,h,f),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:h,end:f,size:(f-h)/254}).options(l.colorbar)()}},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],916:[function(t,e,r){"use strict";e.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,scatter:!1,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,capturewidth:10,fillcolor:"magenta",fillopacity:1,strokecolor:"white",strokeopacity:1,strokewidth:1,handleheight:16,handleopacity:1,handleoverlap:0}}},{}],917:[function(t,e,r){"use strict";function n(t,e,r,n,i){i("line.color",r),s(t,"line")&&a.isArray(t.line.color)?(i("line.colorscale"),l(t,e,n,i,{prefix:"line.",cLetter:"c"})):i("line.color",r)}function i(t,e){function r(t,e){return a.coerce(n,i,o.dimensions,t,e)}var n,i,s,l=t.dimensions||[],c=e.dimensions=[],h=1/0;for(l.length>u&&(a.log("parcoords traces support up to "+u+" dimensions at the moment"),l.splice(u)),s=0;s0);d&&(r("label"),r("tickvals"),r("ticktext"),r("tickformat"),r("range"),r("constraintrange"),h=Math.min(h,i.values.length)),i._index=s,c.push(i)}if(isFinite(h))for(s=0;sh&&(i.values=i.values.slice(0,h));return c}var a=t("../../lib"),o=t("./attributes"),s=t("../../components/colorscale/has_colorscale"),l=t("../../components/colorscale/defaults"),u=t("./constants").maxDimensionCount;e.exports=function(t,e,r,s){function l(r,n){return a.coerce(t,e,o,r,n)}var u=i(t,e);n(t,e,r,s,l),l("domain.x"),l("domain.y"),Array.isArray(u)&&u.length||(e.visible=!1)}},{"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598,"../../lib":690,"./attributes":912,"./constants":916}],918:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.calc=t("./calc"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.moduleType="trace",n.name="parcoords",n.basePlotModule=t("./base_plot"),n.categories=["gl","noOpacity"],n.meta={},e.exports=n},{"./attributes":912,"./base_plot":913,"./calc":914,"./colorbar":915,"./defaults":917,"./plot":921}],919:[function(t,e,r){"use strict";function n(t){t.read({x:0,y:0,width:1,height:1,data:x})}function i(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function a(t,e,r,a,o,s){function l(n){var c;c=Math.min(a,o-n*a),s.offset=v*n*a,s.count=v*c,0===n&&(window.cancelAnimationFrame(r.currentRafs[u]),delete r.currentRafs[u],i(t,s.scissorX,s.scissorY,s.scissorWidth,s.viewBoxSize[1])),r.clearOnly||(e(s),n*a+c>>8*e)%256/255}function u(t,e,r,n){for(var i=[],a=0;a=g-4?l(a,g-2-s):.5);return i}function c(t,e,r){var n,i,a,o=[];for(i=0;if&&(f=t[l].dim2.canvasX,c=l),t[l].dim1.canvasXi)return a;i=o,a=n[r]}return n[n.length-1]}function l(t,e,r){var n=o(r);return r.tickvals?_.scale.ordinal().domain(r.tickvals).range(r.tickvals.map(function(t){return(t-n[0])/(n[1]-n[0])}).map(function(r){return t-e+r*(e-(t-e))})):_.scale.linear().domain(n).range([t-e,e])}function u(t,e){return _.scale.linear().range([t-e,e])}function c(t){return _.scale.linear().domain(o(t))}function h(t){var e=o(t);return t.tickvals&&_.scale.ordinal().domain(t.tickvals).range(t.tickvals.map(function(t){return(t-e[0])/(e[1]-e[0])}))}function f(t){var e=t.map(function(t){return t[0]}),r=t.map(function(t){return t[1]}),n=r.map(function(t){return _.rgb(t)}),i=function(t){return function(e){return e[t]}},a="rgb".split("").map(function(t){return _.scale.linear().clamp(!0).domain(e).range(n.map(i(t)))});return function(t){return a.map(function(e){return e(t)})}}function d(t){return t[0]}function p(t,e,r){var n=d(e),i=n.trace,o=n.lineColor,s=n.cscale,l=i.line,u=i.domain,h=i.dimensions,p=t.width,m=x.extendDeep({},l,{color:o.map(c({values:o,range:[l.cmin,l.cmax]})),blockLineCount:b.blockLineCount,canvasOverdrag:b.overdrag*b.canvasPixelRatio}),g=Math.floor(p*(u.x[1]-u.x[0])),v=Math.floor(t.height*(u.y[1]-u.y[0])),y=t.margin||{l:80,r:80,t:100,b:80},_=g,w=v;return{key:r,colCount:h.filter(a).length,dimensions:h,tickDistance:b.tickDistance,unitToColor:f(s),lines:m,translateX:u.x[0]*p,translateY:t.height-u.y[1]*t.height,pad:y,canvasWidth:_*b.canvasPixelRatio+2*m.canvasOverdrag,canvasHeight:w*b.canvasPixelRatio,width:_,height:w,canvasPixelRatio:b.canvasPixelRatio}}function m(t){var e=t.width,r=t.height,n=t.dimensions,i=t.canvasPixelRatio,o=function(r){return e*r/Math.max(1,t.colCount-1)},s=b.verticalPadding/(r*i),f=1-2*s,d=function(t){return s+f*t},p={key:t.key,xScale:o,model:t},m={};return p.dimensions=n.filter(a).map(function(e,n){var a=c(e),s=m[e.label];return m[e.label]=(s||0)+1,{key:e.label+(s?"__"+s:""),label:e.label,tickFormat:e.tickformat,tickvals:e.tickvals,ticktext:e.ticktext,ordinal:!!e.tickvals,scatter:b.scatter||e.scatter,xIndex:n,crossfilterDimensionIndex:n,visibleIndex:e._index,height:r,values:e.values,paddedUnitValues:e.values.map(a).map(d),xScale:o,x:o(n),canvasX:o(n)*i,unitScale:u(r,b.verticalPadding),domainScale:l(r,b.verticalPadding,e),ordinalScale:h(e),domainToUnitScale:a,filter:e.constraintrange?e.constraintrange.map(a):[0,1],parent:p,model:t}}),p}function g(t){return b.layers.map(function(e){return{key:e,context:"contextLineLayer"===e,pick:"pickLineLayer"===e,viewModel:t,model:t.model}})}function v(t){t.classed("axisExtentText",!0).attr("text-anchor","middle").style("font-weight",100).style("font-size","10px").style("cursor","default").style("user-select","none")}var y=t("./lines"),b=t("./constants"),x=t("../../lib"),_=t("d3");e.exports=function(t,e,r,a,o){function l(t){var e=t.selectAll("defs").data(i,n);e.enter().append("defs");var r=e.selectAll("#filterBarPattern").data(i,n);r.enter().append("pattern").attr("id","filterBarPattern").attr("patternUnits","userSpaceOnUse"),r.attr("x",-b.bar.width).attr("width",b.bar.capturewidth).attr("height",function(t){return t.model.height});var a=r.selectAll("rect").data(i,n);a.enter().append("rect").attr("shape-rendering","crispEdges"),a.attr("height",function(t){return t.model.height}).attr("width",b.bar.width).attr("x",b.bar.width/2).attr("fill",b.bar.fillcolor).attr("fill-opacity",b.bar.fillopacity).attr("stroke",b.bar.strokecolor).attr("stroke-opacity",b.bar.strokeopacity).attr("stroke-width",b.bar.strokewidth)}function u(t){return t.dimensions.some(function(t){return 0!==t.filter[0]||1!==t.filter[1]})}function c(t,e){for(var r=e.panels||(e.panels=[]),n=t.each(function(t){return t})[e.key].map(function(t){return t.__data__}),i=n.length-1,a=0;a<1;a++)for(var o=0;o=r||s>=n)return;var l=t.lineLayer.readPixel(a,n-1-s),u=0!==l[3],c=u?l[2]+256*(l[1]+256*l[0]):null,h={x:a,y:s,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:c};c!==z&&(u?o.hover(h):o.unhover&&o.unhover(h),z=c)}}),L.style("margin",function(t){var e=t.model.pad;return e.t+"px "+e.r+"px "+e.b+"px "+e.l+"px"}).attr("width",function(t){return t.model.canvasWidth}).attr("height",function(t){return t.model.canvasHeight}).style("width",function(t){return t.model.width+2*b.overdrag+"px"}).style("height",function(t){return t.model.height+"px"}).style("opacity",function(t){return t.pick?.01:1}),e.style("background","rgba(255, 255, 255, 0)");var D=e.selectAll(".parcoords").data(S,n);D.exit().remove(),D.enter().append("g").classed("parcoords",!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","none").call(l),D.attr("width",function(t){return t.model.width+t.model.pad.l+t.model.pad.r}).attr("height",function(t){return t.model.height+t.model.pad.t+t.model.pad.b}).attr("transform",function(t){return"translate("+t.model.translateX+","+t.model.translateY+")"});var I=D.selectAll(".parcoordsControlView").data(i,n);I.enter().append("g").classed("parcoordsControlView",!0).style("box-sizing","content-box"),I.attr("transform",function(t){return"translate("+t.model.pad.l+","+t.model.pad.t+")"});var P=I.selectAll(".yAxis").data(function(t){return t.dimensions},n);P.enter().append("g").classed("yAxis",!0).each(function(t){C.dimensions.push(t)}),I.each(function(t){f(P,t)}),L.each(function(t){t.lineLayer=y(this,t.model.lines,t.model.canvasWidth,t.model.canvasHeight,t.viewModel.dimensions,t.viewModel.panels,t.model.unitToColor,t.context,t.pick,b.scatter),t.viewModel[t.key]=t.lineLayer,C.renderers.push(function(){t.lineLayer.render(t.viewModel.panels,!0)}),t.lineLayer.render(t.viewModel.panels,!t.context)}),P.attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),P.call(_.behavior.drag().origin(function(t){return t}).on("drag",function(t){var e=t.parent;T=!1,A||(t.x=Math.max(-b.overdrag,Math.min(t.model.width+b.overdrag,_.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,P.sort(function(t,e){return t.x-e.x}).each(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio}),f(P,e),P.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),_.select(this).attr("transform","translate("+t.x+", 0)"),P.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLineLayer&&e.contextLineLayer.render(e.panels,!1,!u(e)),e.focusLineLayer.render&&e.focusLineLayer.render(e.panels))}).on("dragend",function(t){var e=t.parent;if(A)return void("ending"===A&&(A=!1));t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,f(P,e),_.select(this).attr("transform",function(t){return"translate("+t.x+", 0)"}),e.contextLineLayer&&e.contextLineLayer.render(e.panels,!1,!u(e)),e.focusLineLayer&&e.focusLineLayer.render(e.panels),e.pickLineLayer&&e.pickLineLayer.render(e.panels,!0),T=!0,o&&o.axesMoved&&o.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),P.exit().remove();var O=P.selectAll(".axisOverlays").data(i,n);O.enter().append("g").classed("axisOverlays",!0),O.selectAll(".axis").remove();var R=O.selectAll(".axis").data(i,n);R.enter().append("g").classed("axis",!0),R.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,n=r.domain(),i=t.ticktext;_.select(this).call(_.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?n.map(function(t,e){return i&&i[e]||t}):null).tickFormat(t.ordinal?function(t){return t}:null).scale(r))}),R.selectAll(".domain, .tick").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),R.selectAll("text").style("font-weight",100).style("font-size","10px").style("fill","black").style("fill-opacity",1).style("stroke","none").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default").style("user-select","none");var j=O.selectAll(".axisHeading").data(i,n);j.enter().append("g").classed("axisHeading",!0);var F=j.selectAll(".axisTitle").data(i,n);F.enter().append("text").classed("axisTitle",!0).attr("text-anchor","middle").style("font-family","sans-serif").style("font-size","10px").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),F.attr("transform","translate(0,"+-b.axisTitleOffset+")").text(function(t){return t.label});var N=O.selectAll(".axisExtent").data(i,n);N.enter().append("g").classed("axisExtent",!0);var B=N.selectAll(".axisExtentTop").data(i,n);B.enter().append("g").classed("axisExtentTop",!0),B.attr("transform","translate(0,"+-b.axisExtentOffset+")");var U=B.selectAll(".axisExtentTopText").data(i,n);U.enter().append("text").classed("axisExtentTopText",!0).attr("alignment-baseline","after-edge").call(v),U.text(function(t){return x(t)(t.domainScale.domain().slice(-1)[0])});var V=N.selectAll(".axisExtentBottom").data(i,n);V.enter().append("g").classed("axisExtentBottom",!0),V.attr("transform",function(t){return"translate(0,"+(t.model.height+b.axisExtentOffset)+")"});var q=V.selectAll(".axisExtentBottomText").data(i,n);q.enter().append("text").classed("axisExtentBottomText",!0).attr("alignment-baseline","before-edge").call(v),q.text(function(t){return x(t)(t.domainScale.domain()[0])});var H=O.selectAll(".axisBrush").data(i,n),Y=H.enter().append("g").classed("axisBrush",!0);H.each(function(t){t.brush||(t.brush=_.svg.brush().y(t.unitScale).on("brushstart",w).on("brush",M).on("brushend",k),0===t.filter[0]&&1===t.filter[1]||t.brush.extent(t.filter),_.select(this).call(t.brush))}),Y.selectAll("rect").attr("x",-b.bar.capturewidth/2).attr("width",b.bar.capturewidth),Y.selectAll("rect.extent").attr("fill","url(#filterBarPattern)").style("cursor","ns-resize").filter(function(t){return 0===t.filter[0]&&1===t.filter[1]}).attr("y",-100),Y.selectAll(".resize rect").attr("height",b.bar.handleheight).attr("opacity",0).style("visibility","visible"),Y.selectAll(".resize.n rect").style("cursor","n-resize").attr("y",b.bar.handleoverlap-b.bar.handleheight),Y.selectAll(".resize.s rect").style("cursor","s-resize").attr("y",b.bar.handleoverlap);var G=!1,X=!1;return C}},{"../../lib":690,"./constants":916,"./lines":919,d3:114}],921:[function(t,e,r){"use strict";var n=t("./parcoords");e.exports=function(t,e){var r=t._fullLayout,i=r._paper,a=r._paperdiv,o={},s={},l=r._size;e.forEach(function(e,r){o[r]=t.data[r].dimensions,s[r]=t.data[r].dimensions.slice()});var u=function(e,r,n){var i=s[e][r],a=i.constraintrange;a&&2===a.length||(a=i.constraintrange=[]),a[0]=n[0],a[1]=n[1],t.emit("plotly_restyle")},c=function(e){t.emit("plotly_hover",e)},h=function(e){t.emit("plotly_unhover",e)},f=function(e,r){function n(t){return!("visible"in t)||t.visible}function i(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}var a=function(t){return function(e,n){return i(r,t,e)-i(r,t,n)}}(s[e].filter(n));o[e].sort(a),s[e].filter(function(t){return!n(t)}).sort(function(t){return s[e].indexOf(t)}).forEach(function(t){o[e].splice(o[e].indexOf(t),1),o[e].splice(s[e].indexOf(t),0,t)}),t.emit("plotly_restyle")};n(a,i,e,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:h,axesMoved:f})}},{"./parcoords":920}],922:[function(t,e,r){"use strict";var n=t("../../components/color/attributes"),i=t("../../plots/font_attributes"),a=t("../../plots/attributes"),o=t("../../lib/extend").extendFlat;e.exports={labels:{valType:"data_array"},label0:{valType:"number",dflt:0},dlabel:{valType:"number",dflt:1},values:{valType:"data_array"},marker:{colors:{valType:"data_array"},line:{color:{valType:"color",dflt:n.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}}},text:{valType:"data_array"},hovertext:{valType:"string",dflt:"",arrayOk:!0},scalegroup:{valType:"string",dflt:""},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"]},hoverinfo:o({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0},textfont:o({},i,{}),insidetextfont:o({},i,{}),outsidetextfont:o({},i,{}),domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},hole:{valType:"number",min:0,max:1,dflt:0},sort:{valType:"boolean",dflt:!0},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise"},rotation:{valType:"number",min:-360,max:360,dflt:0},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0}}},{"../../components/color/attributes":584,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/font_attributes":753}],923:[function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n")}return m};var l},{"../../components/color":585,"./helpers":926,"fast-isnumeric":123,tinycolor2:521}],925:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r,a){function o(r,a){return n.coerce(t,e,i,r,a)}var s=n.coerceFont,l=o("values");if(!Array.isArray(l)||!l.length)return void(e.visible=!1);var u=o("labels");Array.isArray(u)||(o("label0"),o("dlabel")),o("marker.line.width")&&o("marker.line.color");var c=o("marker.colors");Array.isArray(c)||(e.marker.colors=[]),o("scalegroup");var h=o("text"),f=o("textinfo",Array.isArray(h)?"text+percent":"percent");if(o("hovertext"),o("hoverinfo",1===a._dataLength?"label+text+value+percent":void 0),f&&"none"!==f){var d=o("textposition"),p=Array.isArray(d)||"auto"===d,m=p||"inside"===d,g=p||"outside"===d;if(m||g){var v=s(o,"textfont",a.font);m&&s(o,"insidetextfont",v),g&&s(o,"outsidetextfont",v)}}o("domain.x"),o("domain.y"),o("hole"),o("sort"),o("direction"),o("rotation"),o("pull")}},{"../../lib":690,"./attributes":922}],926:[function(t,e,r){"use strict";var n=t("../../lib");r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)+"%"},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)}},{"../../lib":690}],927:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("./layout_defaults"),n.layoutAttributes=t("./layout_attributes"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.styleOne=t("./style_one"),n.moduleType="trace",n.name="pie",n.basePlotModule=t("./base_plot"),n.categories=["pie","showLegend"],n.meta={},e.exports=n},{"./attributes":922,"./base_plot":923,"./calc":924,"./defaults":925,"./layout_attributes":928,"./layout_defaults":929,"./plot":930,"./style":931,"./style_one":932}],928:[function(t,e,r){"use strict";e.exports={hiddenlabels:{valType:"data_array"}}},{}],929:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){!function(r,a){n.coerce(t,e,i,r,a)}("hiddenlabels")}},{"../../lib":690,"./layout_attributes":928}],930:[function(t,e,r){"use strict";function n(t,e,r){var n=Math.sqrt(t.width*t.width+t.height*t.height),a=t.width/t.height,o=Math.PI*Math.min(e.v/r.vTotal,.5),s=1-r.trace.hole,l=i(e,r),u={scale:l*r.r*2/n,rCenter:1-l,rotate:0};if(u.scale>=1)return u;var c=a+1/(2*Math.tan(o)),h=r.r*Math.min(1/(Math.sqrt(c*c+.5)+c),s/(Math.sqrt(a*a+s/2)+a)),f={scale:2*h/t.height,rCenter:Math.cos(h/r.r)-h*a/r.r,rotate:(180/Math.PI*e.midangle+720)%180-90},d=1/a,p=d+1/(2*Math.tan(o)),m=r.r*Math.min(1/(Math.sqrt(p*p+.5)+p),s/(Math.sqrt(d*d+s/2)+d)),g={scale:2*m/t.width,rCenter:Math.cos(m/r.r)-m/a/r.r,rotate:(180/Math.PI*e.midangle+810)%180-90},v=g.scale>f.scale?g:f;return u.scale<1&&v.scale>u.scale?v:u}function i(t,e){if(t.v===e.vTotal&&!e.trace.hole)return 1;var r=Math.PI*Math.min(t.v/e.vTotal,.5);return Math.min(1/(1+1/Math.sin(r)),(1-e.trace.hole)/2)}function a(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function o(t,e){function r(t,e){return t.pxmid[1]-e.pxmid[1]}function n(t,e){return e.pxmid[1]-t.pxmid[1]}var i,a,o,s,l,u,c,h,f,d,p,m,g;for(a=0;a<2;a++)for(o=a?r:n,l=a?Math.max:Math.min,c=a?1:-1,i=0;i<2;i++){for(s=i?Math.max:Math.min,u=i?1:-1,h=t[a][i],h.sort(o),f=t[1-a][i],d=f.concat(h),m=[],p=0;p0&&(t.labelExtraY=b),Array.isArray(e.pull))for(i=0;i=e.pull[o.i]||((t.pxmid[1]-o.pxmid[1])*c>0?(h=o.cyFinal+l(o.px0[1],o.px1[1]),(b=h-g-t.labelExtraY)*c>0&&(t.labelExtraY+=b)):(v+t.labelExtraY-y)*c>0&&(n=3*u*Math.abs(i-d.indexOf(t)),f=o.cxFinal+s(o.px0[0],o.px1[0]),(p=f+n-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*u>0&&(t.labelExtraX+=p)))}(m[p],v)}}}function s(t,e){var r,n,i,a,o,s,l,c,h,f,d=[];for(i=0;ic&&(c=s.pull[a]);o.r=Math.min(r/u(s.tilt,Math.sin(l),s.depth),n/u(s.tilt,Math.cos(l),s.depth))/(2+2*c),o.cx=e.l+e.w*(s.domain.x[1]+s.domain.x[0])/2,o.cy=e.t+e.h*(2-s.domain.y[1]-s.domain.y[0])/2,s.scalegroup&&-1===d.indexOf(s.scalegroup)&&d.push(s.scalegroup)}for(a=0;ah.vTotal/2?1:0)}function u(t,e,r){if(!t)return 1;var n=Math.sin(t*Math.PI/180);return Math.max(.01,r*n*Math.abs(e)+2*Math.sqrt(1-n*n*e*e))}var c=t("d3"),h=t("../../plots/cartesian/graph_interact"),f=t("../../components/color"),d=t("../../components/drawing"),p=t("../../lib/svg_text_utils"),m=t("./helpers");e.exports=function(t,e){var r=t._fullLayout;s(e,r._size);var u=r._pielayer.selectAll("g.trace").data(e);u.enter().append("g").attr({"stroke-linejoin":"round",class:"trace"}),u.exit().remove(),u.order(),u.each(function(e){var s=c.select(this),u=e[0],g=u.trace,v=(g.depth||0)*u.r*Math.sin(0)/2,y=g.tiltaxis||0,b=y*Math.PI/180,x=[v*Math.sin(b),v*Math.cos(b)],_=u.r*Math.cos(0),w=s.selectAll("g.part").data(g.tilt?["top","sides"]:["top"]);w.enter().append("g").attr("class",function(t){return t+" part"}),w.exit().remove(),w.order(),l(e),s.selectAll(".top").each(function(){var s=c.select(this).selectAll("g.slice").data(e);s.enter().append("g").classed("slice",!0),s.exit().remove();var l=[[[],[]],[[],[]]],v=!1;s.each(function(e){function o(n){n.originalEvent=c.event;var a=t._fullLayout,o=t._fullData[g.index],s=o.hoverinfo;if("all"===s&&(s="label+text+value+percent+name"),t._dragging||!1===a.hovermode||"none"===s||"skip"===s||!s)return void h.hover(t,n,"pie");var l=i(e,u),f=w+e.pxmid[0]*(1-l),d=M+e.pxmid[1]*(1-l),p=r.separators,v=[];-1!==s.indexOf("label")&&v.push(e.label),-1!==s.indexOf("text")&&(o.hovertext?v.push(Array.isArray(o.hovertext)?o.hovertext[e.i]:o.hovertext):o.text&&o.text[e.i]&&v.push(o.text[e.i])),-1!==s.indexOf("value")&&v.push(m.formatPieValue(e.v,p)),-1!==s.indexOf("percent")&&v.push(m.formatPiePercent(e.v/u.vTotal,p)),h.loneHover({x0:f-l*u.r,x1:f+l*u.r,y:d,text:v.join("
"),name:-1!==s.indexOf("name")?o.name:void 0,color:e.color,idealAlign:e.pxmid[0]<0?"left":"right"},{container:a._hoverlayer.node(),outerContainer:a._paper.node()}),h.hover(t,n,"pie"),T=!0}function s(e){e.originalEvent=c.event,t.emit("plotly_unhover",{event:c.event,points:[e]}),T&&(h.loneUnhover(r._hoverlayer.node()),T=!1)}function f(){t._hoverdata=[e],t._hoverdata.trace=u.trace,h.click(t,c.event)}function b(t,r,n,i){return"a"+i*u.r+","+i*_+" "+y+" "+e.largeArc+(n?" 1 ":" 0 ")+i*(r[0]-t[0])+","+i*(r[1]-t[1])}if(e.hidden)return void c.select(this).selectAll("path,g").remove();l[e.pxmid[1]<0?0:1][e.pxmid[0]<0?0:1].push(e);var w=u.cx+x[0],M=u.cy+x[1],k=c.select(this),A=k.selectAll("path.surface").data([e]),T=!1;if(A.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),k.select("path.textline").remove(),k.on("mouseover",o).on("mouseout",s).on("click",f),g.pull){var S=+(Array.isArray(g.pull)?g.pull[e.i]:g.pull)||0;S>0&&(w+=S*e.pxmid[0],M+=S*e.pxmid[1])}e.cxFinal=w,e.cyFinal=M;var E=g.hole;if(e.v===u.vTotal){var L="M"+(w+e.px0[0])+","+(M+e.px0[1])+b(e.px0,e.pxmid,!0,1)+b(e.pxmid,e.px0,!0,1)+"Z";E?A.attr("d","M"+(w+E*e.px0[0])+","+(M+E*e.px0[1])+b(e.px0,e.pxmid,!1,E)+b(e.pxmid,e.px0,!1,E)+"Z"+L):A.attr("d",L)}else{var C=b(e.px0,e.px1,!0,1);if(E){var z=1-E;A.attr("d","M"+(w+E*e.px1[0])+","+(M+E*e.px1[1])+b(e.px1,e.px0,!1,E)+"l"+z*e.px0[0]+","+z*e.px0[1]+C+"Z")}else A.attr("d","M"+w+","+M+"l"+e.px0[0]+","+e.px0[1]+C+"Z")}var D=Array.isArray(g.textposition)?g.textposition[e.i]:g.textposition,I=k.selectAll("g.slicetext").data(e.text&&"none"!==D?[0]:[]);I.enter().append("g").classed("slicetext",!0),I.exit().remove(),I.each(function(){var t=c.select(this).selectAll("text").data([0]);t.enter().append("text").attr("data-notex",1),t.exit().remove(),t.text(e.text).attr({class:"slicetext",transform:"","data-bb":"","text-anchor":"middle",x:0,y:0}).call(d.font,"outside"===D?g.outsidetextfont:g.insidetextfont).call(p.convertToTspans),t.selectAll("tspan.line").attr({x:0,y:0});var r,i=d.bBox(t.node());"outside"===D?r=a(i,e):(r=n(i,e,u),"auto"===D&&r.scale<1&&(t.call(d.font,g.outsidetextfont),g.outsidetextfont.family===g.insidetextfont.family&&g.outsidetextfont.size===g.insidetextfont.size||(t.attr({"data-bb":""}),i=d.bBox(t.node())),r=a(i,e)));var o=w+e.pxmid[0]*r.rCenter+(r.x||0),s=M+e.pxmid[1]*r.rCenter+(r.y||0);r.outside&&(e.yLabelMin=s-i.height/2,e.yLabelMid=s,e.yLabelMax=s+i.height/2,e.labelExtraX=0,e.labelExtraY=0,v=!0),t.attr("transform","translate("+o+","+s+")"+(r.scale<1?"scale("+r.scale+")":"")+(r.rotate?"rotate("+r.rotate+")":"")+"translate("+-(i.left+i.right)/2+","+-(i.top+i.bottom)/2+")")})}),v&&o(l,g),s.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=c.select(this),r=e.select("g.slicetext text");r.attr("transform","translate("+t.labelExtraX+","+t.labelExtraY+")"+r.attr("transform"));var n=t.cxFinal+t.pxmid[0],i=t.cyFinal+t.pxmid[1],a="M"+n+","+i,o=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var s=t.labelExtraX*t.pxmid[1]/t.pxmid[0],l=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(s)>Math.abs(l)?a+="l"+l*t.pxmid[0]/t.pxmid[1]+","+l+"H"+(n+t.labelExtraX+o):a+="l"+t.labelExtraX+","+s+"v"+(l-s)+"h"+o}else a+="V"+(t.yLabelMid+t.labelExtraY)+"h"+o;e.append("path").classed("textline",!0).call(f.stroke,g.outsidetextfont.color).attr({"stroke-width":Math.min(2,g.outsidetextfont.size/8),d:a,fill:"none"})}})})}),setTimeout(function(){u.selectAll("tspan").each(function(){var t=c.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)}},{"../../components/color":585,"../../components/drawing":608,"../../lib/svg_text_utils":709,"../../plots/cartesian/graph_interact":738,"./helpers":926,d3:114}],931:[function(t,e,r){"use strict";var n=t("d3"),i=t("./style_one");e.exports=function(t){t._fullLayout._pielayer.selectAll(".trace").each(function(t){var e=t[0],r=e.trace,a=n.select(this);a.style({opacity:r.opacity}),a.selectAll(".top path.surface").each(function(t){n.select(this).call(i,t,r)})})}},{"./style_one":932,d3:114}],932:[function(t,e,r){"use strict";var n=t("../../components/color");e.exports=function(t,e,r){var i=r.marker.line.color;Array.isArray(i)&&(i=i[e.i]||n.defaultLine);var a=r.marker.line.width||0;Array.isArray(a)&&(a=a[e.i]||0),t.style({"stroke-width":a,fill:e.color}).call(n.stroke,i)}},{"../../components/color":585}],933:[function(t,e,r){"use strict";var n=t("../scattergl/attributes");e.exports={x:n.x,y:n.y,xy:{valType:"data_array"},indices:{valType:"data_array"},xbounds:{valType:"data_array"},ybounds:{valType:"data_array"},text:n.text,marker:{color:{valType:"color",arrayOk:!1},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1},blend:{valType:"boolean",dflt:null},sizemin:{valType:"number",min:.1,max:2,dflt:.5},sizemax:{valType:"number",min:.1,dflt:20},border:{color:{valType:"color",arrayOk:!1},arearatio:{valType:"number",min:0,max:1,dflt:0}}}}},{"../scattergl/attributes":983}],934:[function(t,e,r){"use strict";function n(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=a(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}function i(t,e){var r=new n(t,e.uid);return r.update(e),r}var a=t("gl-pointcloud2d"),o=t("../../lib/str2rgbarray"),s=t("../scatter/get_trace_color"),l=["xaxis","yaxis"],u=n.prototype;u.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},u.update=function(t){this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=s(t,{})},u.updateFast=function(t){var e,r,n,i,a,s,l=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,c=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,f=t.indices,d=this.bounds;if(c){if(n=c,e=c.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(s=0;sd[2]&&(d[2]=i),ad[3]&&(d[3]=a);if(f)r=f;else for(r=new Int32Array(e),s=0;sd[2]&&(d[2]=i),ad[3]&&(d[3]=a);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var p=o(t.marker.color),m=o(t.marker.border.color),g=t.opacity*t.marker.opacity;p[3]*=g,this.pointcloudOptions.color=p;var v=t.marker.blend;if(null===v){v=l.length<100||u.length<100}this.pointcloudOptions.blend=v,m[3]*=g,this.pointcloudOptions.borderColor=m;var y=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=y,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions),this.expandAxesFast(d,b/2)},u.expandAxesFast=function(t,e){for(var r,n,i,a=e||.5,o=0;o<2;o++)r=this.scene[l[o]],n=r._min,n||(n=[]),n.push({val:t[o],pad:a}),i=r._max,i||(i=[]),i.push({val:t[o+2],pad:a})},u.dispose=function(){this.pointcloud.dispose()},e.exports=i},{"../../lib/str2rgbarray":708,"../scatter/get_trace_color":955,"gl-pointcloud2d":221}],935:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a("text"),a("marker.color",r),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",r),a("marker.border.arearatio")}},{"../../lib":690,"./attributes":933}],936:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.calc=t("../scatter3d/calc"),n.plot=t("./convert"),n.moduleType="trace",n.name="pointcloud",n.basePlotModule=t("../../plots/gl2d"),n.categories=["gl2d","showLegend"],n.meta={},e.exports=n},{"../../plots/gl2d":769,"../scatter3d/calc":971,"./attributes":933,"./convert":934,"./defaults":935}],937:[function(t,e,r){"use strict";var n=t("../../components/shapes/attributes"),i=t("../../plots/font_attributes"),a=t("../../plots/attributes"),o=t("../../lib/extend").extendFlat;e.exports={hoverinfo:o({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},nodepad:{valType:"number",min:0,dflt:20},nodethickness:{valType:"number",min:1,dflt:20},valueformat:{valType:"string",dflt:".3s"},valueunit:{valType:"string",dflt:""},followmouse:{valType:"boolean",dflt:!0},textfont:i,nodes:{_isLinkedToArray:"node",label:{valType:"string",dflt:""},visible:n.visible,color:o({},n.fillcolor,{dflt:"rgb(0,255,0,0.5)"})},links:{_isLinkedToArray:"link",label:{valType:"string",dflt:""},visible:n.visible,color:o({},n.fillcolor,{dflt:"rgba(0,0,0,0.2)"}),source:{valType:"number"},target:{valType:"number"},value:{valType:"number",dflt:1}}}},{"../../components/shapes/attributes":648,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/font_attributes":753}],938:[function(t,e,r){"use strict";var n=t("../../plots/plots"),i=t("./plot");r.name="sankey",r.attr="type",r.plot=function(t){var e=n.getSubplotCalcData(t.calcdata,"sankey","sankey");e.length&&i(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has("sankey"),a=e._has&&e._has("sankey");i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".sankey").remove())},r.toSVG=function(){}},{"../../plots/plots":792,"./plot":944}],939:[function(t,e,r){"use strict";e.exports=function(){return[{}]}},{}],940:[function(t,e,r){arguments[4][915][0].apply(r,arguments)},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,dup:915,"fast-isnumeric":123}],941:[function(t,e,r){"use strict";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,movable:!0,sideways:!0,useForceSnap:!0,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear"}},{}],942:[function(t,e,r){"use strict";function n(t,e){function r(t,e){return a.coerce(n,i,o.links,t,e)}var n,i,s,l=t.links||[],u=e.links=[];for(s=0;s"),color:g.addOpacity(i.tinyColorHue,1),idealAlign:m.event.x"),color:i.tinyColorHue,idealAlign:"left"},{container:r._hoverlayer.node(),outerContainer:r._paper.node()});a(d,.85),o(d,i.tinyColorHue)},k=function(e,n,i){m.select(e).call(c,n,i),t.emit("plotly_unhover",{points:[n.node]}),s&&(p.loneUnhover(r._hoverlayer.node()),s=!1)};d(i,e,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{linkEvents:{hover:y,follow:b,unhover:x,select:v},nodeEvents:{hover:w,follow:M,unhover:k,select:_}})}},{"../../components/color":585,"../../plots/cartesian/graph_interact":738,"./render":945,d3:114}],945:[function(t,e,r){"use strict";function n(t){return t.key}function i(t){return[t]}function a(t){return t[0]}function o(t){for(var e=0;e0&&window.requestAnimationFrame(r)})}}).on("drag",function(r){if(k.movable){var n=r.horizontal?A.event.x:A.event.y,i=r.horizontal?A.event.y:A.event.x;k.useForceSnap?(r.node.x=n,r.node.y=i):(k.sideways&&(r.node.x=n),r.node.y=Math.max(r.node.dy/2,Math.min(r.size-r.node.dy/2,i))),s(r.node),r.sankey.relayout(),k.useForceSnap||(y(t.filter(l(r)),e),t.call(p))}}).on("dragend",function(t){t.interactionState.dragInProgress=!1});t.on(".drag",null).call(n)}function w(t,e,r){var n=r.sankey.nodes().filter(function(t){return t.originalX===r.node.originalX});r.forceLayouts[e]=C.forceSimulation(n).alphaDecay(0).force("collide",C.forceCollide().radius(function(t){return t.dy/2+r.nodePad/2}).strength(1).iterations(k.forceIterations)).force("constrain",M(t,e,n,r)).stop()}function M(t,e,r,n){return function(){for(var i=0,a=0;a5?t.node.label:""}).style("fill",function(t){return t.darkBackground&&!t.horizontal?"white":"black"})}},{"../../components/color":585,"../../components/drawing":608,"./constants":941,"@monfera/d3-sankey":32,d3:114,"d3-force":110,tinycolor2:521}],946:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){n.mergeArray(e.text,t,"tx"),n.mergeArray(e.hovertext,t,"htx"),n.mergeArray(e.customdata,t,"data"),n.mergeArray(e.textposition,t,"tp"),e.textfont&&(n.mergeArray(e.textfont.size,t,"ts"),n.mergeArray(e.textfont.color,t,"tc"),n.mergeArray(e.textfont.family,t,"tf"));var r=e.marker;if(r){n.mergeArray(r.size,t,"ms"),n.mergeArray(r.opacity,t,"mo"),n.mergeArray(r.symbol,t,"mx"),n.mergeArray(r.color,t,"mc");var i=r.line;r.line&&(n.mergeArray(i.color,t,"mlc"),n.mergeArray(i.width,t,"mlw"))}}},{"../../lib":690}],947:[function(t,e,r){"use strict";var n=t("../../components/colorscale/color_attributes"),i=t("../../components/errorbars/attributes"),a=t("../../components/colorbar/attributes"),o=t("../../components/drawing"),s=(t("./constants"),t("../../lib/extend").extendFlat);e.exports={x:{valType:"data_array"},x0:{valType:"any",dflt:0},dx:{valType:"number",dflt:1},y:{valType:"data_array"},y0:{valType:"any",dflt:0},customdata:{valType:"data_array"},dy:{valType:"number",dflt:1},ids:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},hoveron:{valType:"flaglist",flags:["points","fills"]},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear"},smoothing:{valType:"number",min:0,max:1.3,dflt:1},dash:{valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid"},simplify:{valType:"boolean",dflt:!0}},connectgaps:{valType:"boolean",dflt:!1},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],dflt:"none"},fillcolor:{valType:"color"},marker:s({},{symbol:{valType:"enumerated",values:o.symbolList,dflt:"circle",arrayOk:!0},opacity:{valType:"number",min:0,max:1,arrayOk:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0},maxdisplayed:{valType:"number",min:0,dflt:0},sizeref:{valType:"number",dflt:1},sizemin:{valType:"number",min:0,dflt:0},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter"},showscale:{valType:"boolean",dflt:!1},colorbar:a,line:s({},{width:{valType:"number",min:0,arrayOk:!0}},n("marker.line"))},n("marker")),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0},textfont:{family:{valType:"string",noBlank:!0,strict:!0,arrayOk:!0},size:{valType:"number",min:1,arrayOk:!0},color:{valType:"color",arrayOk:!0}},r:{valType:"data_array"},t:{valType:"data_array"},error_y:i,error_x:i}},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/drawing":608,"../../components/errorbars/attributes":610,"../../lib/extend":682,"./constants":952}],948:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("./subtypes"),o=t("./colorscale_calc"),s=t("./arrays_to_calcdata");e.exports=function(t,e){var r,l,u,c=i.getFromId(t,e.xaxis||"x"),h=i.getFromId(t,e.yaxis||"y"),f=c.makeCalcdata(e,"x"),d=h.makeCalcdata(e,"y"),p=Math.min(f.length,d.length);c._minDtick=0,h._minDtick=0,f.length>p&&f.splice(p,f.length-p),d.length>p&&d.splice(p,d.length-p);var m={padded:!0},g={padded:!0};if(a.hasMarkers(e)){if(r=e.marker,l=r.size,Array.isArray(l)){var v={type:"linear"};i.setConvert(v),l=v.makeCalcdata(e.marker,"size"),l.length>p&&l.splice(p,l.length-p)}var y,b=1.6*(e.marker.sizeref||1);y="area"===e.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/b),3)}:function(t){return Math.max((t||0)/b,3)},m.ppad=g.ppad=Array.isArray(l)?l.map(y):y(l)}o(e),!("tozerox"===e.fill||"tonextx"===e.fill&&t.firstscatter)||f[0]===f[p-1]&&d[0]===d[p-1]?e.error_y.visible||-1===["tonexty","tozeroy"].indexOf(e.fill)&&(a.hasMarkers(e)||a.hasText(e))||(m.padded=!1,m.ppad=0):m.tozero=!0,!("tozeroy"===e.fill||"tonexty"===e.fill&&t.firstscatter)||f[0]===f[p-1]&&d[0]===d[p-1]?-1!==["tonextx","tozerox"].indexOf(e.fill)&&(g.padded=!1):g.tozero=!0,i.expand(c,f,m),i.expand(h,d,g);var x=new Array(p);for(u=0;u=0;i--){var a=t[i];if("scatter"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],950:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../components/colorscale"),s=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,l=r.marker,u="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===l||!l.showscale)return void a.autoMargin(t,u);var c=l.color,h=l.cmin,f=l.cmax;n(h)||(h=i.aggNums(Math.min,null,c)),n(f)||(f=i.aggNums(Math.max,null,c));var d=e[0].t.cb=s(t,u),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,h,f),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:h,end:f,size:(f-h)/254}).options(l.colorbar)()}},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],951:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/calc"),a=t("./subtypes");e.exports=function(t){a.hasLines(t)&&n(t,"line")&&i(t,t.line.color,"line","c"),a.hasMarkers(t)&&(n(t,"marker")&&i(t,t.marker.color,"marker","c"),n(t,"marker.line")&&i(t,t.marker.line.color,"marker.line","c"))}},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"./subtypes":967}],952:[function(t,e,r){"use strict";e.exports={PTS_LINESONLY:20}},{}],953:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("./constants"),o=t("./subtypes"),s=t("./xy_defaults"),l=t("./marker_defaults"),u=t("./line_defaults"),c=t("./line_shape_defaults"),h=t("./text_defaults"),f=t("./fillcolor_defaults"),d=t("../../components/errorbars/defaults");e.exports=function(t,e,r,p){function m(r,a){return n.coerce(t,e,i,r,a)}var g=s(t,e,p,m),v=gU!=I>=U&&(C=E[T-1][0],z=E[T][0],L=C+(z-C)*(U-D)/(I-D),j=Math.min(j,L),F=Math.max(F,L));j=Math.max(j,0),F=Math.min(F,f._length);var V=l.defaultLine;return l.opacity(h.fillcolor)?V=h.fillcolor:l.opacity((h.line||{}).color)&&(V=h.line.color),n.extendFlat(t,{distance:a.MAXDIST+10,x0:j,x1:F,y0:U,y1:U,color:V}),delete t.index,h.text&&!Array.isArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}}},{"../../components/color":585,"../../components/errorbars":614,"../../lib":690,"../../plots/cartesian/constants":734,"../../plots/cartesian/graph_interact":738,"./get_trace_color":955}],957:[function(t,e,r){"use strict";var n={},i=t("./subtypes");n.hasLines=i.hasLines,n.hasMarkers=i.hasMarkers,n.hasText=i.hasText,n.isBubble=i.isBubble,n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.cleanData=t("./clean_data"),n.calc=t("./calc"),n.arraysToCalcdata=t("./arrays_to_calcdata"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.animatable=!0,n.moduleType="trace",n.name="scatter",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","symbols","markerColorscale","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":739,"./arrays_to_calcdata":946,"./attributes":947,"./calc":948,"./clean_data":949,"./colorbar":950,"./defaults":953,"./hover":956,"./plot":964,"./select":965,"./style":966,"./subtypes":967}],958:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,a,o){var s=(t.marker||{}).color;if(o("line.color",r),n(t,"line"))i(t,e,a,o,{prefix:"line.",cLetter:"c"});else{o("line.color",!Array.isArray(s)&&s||r)}o("line.width"),o("line.dash")}},{"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598}],959:[function(t,e,r){"use strict";var n=t("../../constants/numerical").BADNUM;e.exports=function(t,e){function r(e){var r=_.c2p(t[e].x),i=w.c2p(t[e].y);return r!==n&&i!==n&&[r,i]}function i(t){var e=t[0]/_._length,r=t[1]/w._length;return(1+10*Math.max(0,-e,e-1,-r,r-1))*A}var a,o,s,l,u,c,h,f,d,p,m,g,v,y,b,x,_=e.xaxis,w=e.yaxis,M=e.simplify,k=e.connectGaps,A=e.baseTolerance,T=e.linear,S=[],E=.2,L=new Array(t.length),C=0;for(M||(A=E=-1),a=0;ai(c))break;s=c,v=p[0]*d[0]+p[1]*d[1],v>m?(m=v,l=c,f=!1):v=t.length||!c)break;L[C++]=c,o=c}}else L[C++]=l}S.push(L.slice(0,C))}return S}},{"../../constants/numerical":672}],960:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],961:[function(t,e,r){"use strict";e.exports=function(t,e,r){for(var n,i,a=null,o=0;o0?Math.max(e,i):0}}},{"fast-isnumeric":123}],963:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults"),o=t("./subtypes");e.exports=function(t,e,r,s,l){var u,c=o.isBubble(t),h=(t.line||{}).color;h&&(r=h),l("marker.symbol"),l("marker.opacity",c?.7:1),l("marker.size"),l("marker.color",r),i(t,"marker")&&a(t,e,s,l,{prefix:"marker.",cLetter:"c"}),u=h&&!Array.isArray(h)&&e.marker.color!==h?h:c?n.background:n.defaultLine,l("marker.line.color",u),i(t,"marker.line")&&a(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",c?1:0),c&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode"))}},{"../../components/color":585,"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598,"./subtypes":967}],964:[function(t,e,r){"use strict";function n(t,e){var r;e.selectAll("g.trace").each(function(t){var e=o.select(this);if(r=t[0].trace,r._nexttrace){if(r._nextFill=e.select(".js-fill.js-tonext"),!r._nextFill.size()){var n=":first-child";e.select(".js-fill.js-tozero").size()&&(n+=" + *"),r._nextFill=e.insert("path",n).attr("class","js-fill js-tonext")}}else e.selectAll(".js-fill.js-tonext").remove(),r._nextFill=null;r.fill&&("tozero"===r.fill.substr(0,6)||"toself"===r.fill||"to"===r.fill.substr(0,2)&&!r._prevtrace)?(r._ownFill=e.select(".js-fill.js-tozero"),r._ownFill.size()||(r._ownFill=e.insert("path",":first-child").attr("class","js-fill js-tozero"))):(e.selectAll(".js-fill.js-tozero").remove(),r._ownFill=null)})}function i(t,e,r,n,i,f,p){function m(t){return M?t.transition():t}function g(t){return t.filter(function(t){return t.vis})}function v(t){return t.id}function y(t){if(t.ids)return v}function b(){return!1}function x(t){var e,r,n=t[0].trace,i=o.select(this),a=c.hasMarkers(n),u=c.hasText(n),h=y(n),f=b,d=b;a&&(f=n.marker.maxdisplayed?g:s.identity),u&&(d=n.marker.maxdisplayed?g:s.identity),r=i.selectAll("path.point"),e=r.data(f,h);var p=e.enter().append("path").classed("point",!0);p.call(l.pointStyle,n).call(l.translatePoints,k,A,n),M&&p.style("opacity",0).transition().style("opacity",1),e.each(function(t){var e=o.select(this),r=m(e);l.translatePoint(t,r,k,A),l.singlePointStyle(t,r,n),n.customdata&&e.classed("plotly-customdata",null!==t.data&&void 0!==t.data)}),M?e.exit().transition().style("opacity",0).remove():e.exit().remove(),r=i.selectAll("g"),e=r.data(d,h),e.enter().append("g").append("text"),e.each(function(t){var e=m(o.select(this).select("text"));l.translatePoint(t,e,k,A)}),e.selectAll("text").call(l.textPointStyle,n).each(function(t){var e=t.xp||k.c2p(t.x),r=t.yp||A.c2p(t.y);o.select(this).selectAll("tspan").each(function(){m(o.select(this)).attr({x:e,y:r})})}),e.exit().remove()}var _,w;a(t,e,r,n,i);var M=!!p&&p.duration>0,k=r.xaxis,A=r.yaxis,T=n[0].trace,S=T.line,E=o.select(f);if(E.call(u.plot,r,p),!0===T.visible){m(E).style("opacity",T.opacity);var L,C,z=T.fill.charAt(T.fill.length-1);"x"!==z&&"y"!==z&&(z=""),n[0].node3=E;var D="",I=[],P=T._prevtrace;P&&(D=P._prevRevpath||"",C=P._nextFill,I=P._polygons);var O,R,j,F,N,B,U,V,q,H="",Y="",G=[],X=[],W=s.noop;if(L=T._ownFill,c.hasLines(T)||"none"!==T.fill){for(C&&C.datum(n),-1!==["hv","vh","hvh","vhv"].indexOf(S.shape)?(j=l.steps(S.shape),F=l.steps(S.shape.split("").reverse().join(""))):j=F="spline"===S.shape?function(t){var e=t[t.length-1];return t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),S.smoothing):l.smoothopen(t,S.smoothing)}:function(t){return"M"+t.join("L")},N=function(t){return F(t.reverse())},G=h(n,{xaxis:k,yaxis:A,connectGaps:T.connectgaps,baseTolerance:Math.max(S.width||1,3)/4,linear:"linear"===S.shape,simplify:S.simplify}),q=T._polygons=new Array(G.length),w=0;w1}),W=function(t){return function(e){if(O=j(e),R=N(e),H?z?(H+="L"+O.substr(1),Y=R+"L"+Y.substr(1)):(H+="Z"+O,Y=R+"Z"+Y):(H=O,Y=R),c.hasLines(T)&&e.length>1){var r=o.select(this);if(r.datum(n),t)m(r.style("opacity",0).attr("d",O).call(l.lineGroupStyle)).style("opacity",1);else{var i=m(r);i.attr("d",O),l.singleLineStyle(n,i)}}}}}var Z=E.selectAll(".js-line").data(X);m(Z.exit()).style("opacity",0).remove(),Z.each(W(!1)),Z.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(W(!0)),G.length&&(L?B&&V&&(z?("y"===z?B[1]=V[1]=A.c2p(0,!0):"x"===z&&(B[0]=V[0]=k.c2p(0,!0)),m(L).attr("d","M"+V+"L"+B+"L"+H.substr(1))):m(L).attr("d",H+"Z")):"tonext"===T.fill.substr(0,6)&&H&&D&&("tonext"===T.fill?m(C).attr("d",H+"Z"+D+"Z"):m(C).attr("d",H+"L"+D.substr(1)+"Z"),T._polygons=T._polygons.concat(I)),T._prevRevpath=Y,T._prevPolygons=q);var J=E.selectAll(".points");_=J.data([n]),J.each(x),_.enter().append("g").classed("points",!0).each(x),_.exit().remove()}}function a(t,e,r,n,i){var a=r.xaxis,l=r.yaxis,u=o.extent(s.simpleMap(a.range,a.r2c)),h=o.extent(s.simpleMap(l.range,l.r2c)),f=n[0].trace;if(c.hasMarkers(f)){var d=f.marker.maxdisplayed;if(0!==d){var p=n.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=h[0]&&t.y<=h[1]}),m=Math.ceil(p.length/d),g=0;i.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;for(c=p.selectAll("g.trace"),h=c.data(r,function(t){return t[0].trace.uid}),h.enter().append("g").attr("class",function(t){return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),f(t,e,r),n(t,p),l=0, +u={};lu[e[0].trace.uid]?1:-1}),g){s&&(d=s());o.transition().duration(a.duration).ease(a.easing).each("end",function(){d&&d()}).each("interrupt",function(){d&&d()}).each(function(){p.selectAll("g.trace").each(function(n,o){i(t,o,e,n,r,this,a)})})}else p.selectAll("g.trace").each(function(n,o){i(t,o,e,n,r,this,a)});m&&h.exit().remove(),p.selectAll("path:not([d])").remove()}},{"../../components/drawing":608,"../../components/errorbars":614,"../../lib":690,"../../lib/polygon":700,"./line_points":959,"./link_traces":961,"./subtypes":967,d3:114}],965:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[],h=s[0].trace,f=h.index,d=h.marker,p=!n.hasMarkers(h)&&!n.hasText(h);if(!0===h.visible&&!p){var m=Array.isArray(d.opacity)?1:d.opacity;if(!1===e)for(r=0;r=0&&(e[1]+=1),t.indexOf("top")>=0&&(e[1]-=1),t.indexOf("left")>=0&&(e[0]-=1),t.indexOf("right")>=0&&(e[0]+=1),e)}function s(t,e){return e(4*t)}function l(t){return M[t]}function u(t,e,r,n,i){var a=null;if(Array.isArray(t)){a=[];for(var o=0;o=0){var f=i(l.position,l.delaunayColor,l.delaunayAxis);f.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(f):(f.gl=o,this.delaunayMesh=g(f),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},A.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},e.exports=f},{"../../constants/gl3d_dashes":669,"../../constants/gl_markers":670,"../../lib":690,"../../lib/gl_format_color":687,"../../lib/str2rgbarray":708,"../scatter/make_bubble_size_func":962,"./calc_errors":972,"delaunay-triangulate":115,"gl-error3d":153,"gl-line3d":163,"gl-mesh3d":196,"gl-scatter3d":242}],974:[function(t,e,r){"use strict";function n(t,e,r,n){var a=0,o=r("x"),s=r("y"),l=r("z");return i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),o&&s&&l&&(a=Math.min(o.length,s.length,l.length),a=0&&f("surfacecolor",d||p);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];f(v+".show")&&(f(v+".opacity"),f(v+".scale"))}c(t,e,r,{axis:"z"}),c(t,e,r,{axis:"y",inherit:"z"}),c(t,e,r,{axis:"x",inherit:"z"})}},{"../../components/errorbars/defaults":613,"../../lib":690,"../../registry":807,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":970}],975:[function(t,e,r){"use strict";var n={};n.plot=t("./convert"),n.attributes=t("./attributes"),n.markerSymbols=t("../../constants/gl_markers"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.moduleType="trace",n.name="scatter3d",n.basePlotModule=t("../../plots/gl3d"),n.categories=["gl3d","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../constants/gl_markers":670,"../../plots/gl3d":772,"../scatter/colorbar":950,"./attributes":970,"./calc":971,"./convert":973,"./defaults":974}],976:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/colorscale/color_attributes"),o=t("../../lib/extend").extendFlat,s=n.marker,l=n.line,u=s.line;e.exports={lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names"],dflt:"ISO-3"},mode:o({},n.mode,{dflt:"markers"}),text:o({},n.text,{}),hovertext:o({},n.hovertext,{}),textfont:n.textfont,textposition:n.textposition,line:{color:l.color,width:l.width,dash:l.dash},connectgaps:n.connectgaps,marker:o({},{symbol:s.symbol,opacity:s.opacity,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,showscale:s.showscale,colorbar:s.colorbar,line:o({},{width:u.width},a("marker.line"))},a("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:n.fillcolor,hoverinfo:o({},i.hoverinfo,{flags:["lon","lat","location","text","name"]})}},{"../../components/colorscale/color_attributes":592,"../../lib/extend":682,"../../plots/attributes":727,"../scatter/attributes":947}],977:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../constants/numerical").BADNUM,a=t("../scatter/colorscale_calc"),o=t("../scatter/arrays_to_calcdata");e.exports=function(t,e){for(var r=Array.isArray(e.locations),s=r?e.locations.length:e.lon.length,l=new Array(s),u=0;u")}var i=t("../../plots/cartesian/graph_interact"),a=t("../../plots/cartesian/axes"),o=t("../../constants/numerical").BADNUM,s=t("../scatter/get_trace_color"),l=t("./attributes");e.exports=function(t){function e(t){return h.projection(t)}function r(t){var r=t.lonlat;if(r[0]===o)return 1/0;if(h.isLonLatOverEdges(r))return 1/0;var n=e(r),i=u.c2p(),a=c.c2p(),s=Math.abs(i-n[0]),l=Math.abs(a-n[1]),f=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-f,1-3/f)}var a=t.cd,l=a[0].trace,u=t.xa,c=t.ya,h=t.subplot;if(i.getClosest(a,r,t),!1!==t.index){var f=a[t.index],d=f.lonlat,p=e(d),m=f.mrc||1;return t.x0=p[0]-m,t.x1=p[0]+m,t.y0=p[1]-m,t.y1=p[1]+m,t.loc=f.loc,t.lat=d[0],t.lon=d[1],t.color=s(l,f),t.extraText=n(l,f,h.mockAxis),[t]}}},{"../../constants/numerical":672,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"../scatter/get_trace_color":955,"./attributes":976}],981:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="scattergeo",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/geo":757,"../scatter/colorbar":950,"./attributes":976,"./calc":977,"./defaults":978,"./event_data":979,"./hover":980,"./plot":982}],982:[function(t,e,r){"use strict";function n(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=c(r,e),i=r.locationmode,a=0;a=e.length?i:e[a]);return n}function o(t,e,r){return l(z(t,r),C(e,r),r)}function s(t,e,r,n){var i=w(t,e,n);return i=Array.isArray(i[0])?i:a(g.identity,[i],n),l(i,C(r,n),n)}function l(t,e,r){for(var n=new Array(4*r),i=0;i")}var i=t("../../plots/cartesian/graph_interact"),a=t("../scatter/get_trace_color"),o=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r){function s(t){var e=t.lonlat;if(e[0]===o)return 1/0;var n=Math.abs(c.c2p(e)-c.c2p([p,e[1]])),i=Math.abs(h.c2p(e)-h.c2p([e[0],r])),a=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(n*n+i*i)-a,1-3/a)}var l=t.cd,u=l[0].trace,c=t.xa,h=t.ya,f=e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360),d=360*f,p=e-d;if(i.getClosest(l,s,t),!1!==t.index){var m=l[t.index],g=m.lonlat,v=[g[0]+d,g[1]],y=c.c2p(v),b=h.c2p(v),x=m.mrc||1;return t.x0=y-x,t.x1=y+x,t.y0=b-x,t.y1=b+x,t.color=a(u,m),t.extraText=n(u,m),[t]}}},{"../../constants/numerical":672,"../../plots/cartesian/graph_interact":738,"../scatter/get_trace_color":955}],992:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("../scattergeo/calc"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.plot=t("./plot"),n.moduleType="trace",n.name="scattermapbox",n.basePlotModule=t("../../plots/mapbox"),n.categories=["mapbox","gl","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/mapbox":786,"../scatter/colorbar":950,"../scattergeo/calc":977,"./attributes":987,"./defaults":989,"./event_data":990,"./hover":991,"./plot":993}],993:[function(t,e,r){"use strict";function n(t,e){this.mapbox=t,this.map=t.map,this.uid=e,this.idSourceFill=e+"-source-fill",this.idSourceLine=e+"-source-line",this.idSourceCircle=e+"-source-circle",this.idSourceSymbol=e+"-source-symbol",this.idLayerFill=e+"-layer-fill",this.idLayerLine=e+"-layer-line",this.idLayerCircle=e+"-layer-circle",this.idLayerSymbol=e+"-layer-symbol",this.mapbox.initSource(this.idSourceFill),this.mapbox.initSource(this.idSourceLine),this.mapbox.initSource(this.idSourceCircle),this.mapbox.initSource(this.idSourceSymbol),this.map.addLayer({id:this.idLayerFill,source:this.idSourceFill,type:"fill"}),this.map.addLayer({id:this.idLayerLine,source:this.idSourceLine,type:"line"}),this.map.addLayer({id:this.idLayerCircle,source:this.idSourceCircle,type:"circle"}),this.map.addLayer({id:this.idLayerSymbol,source:this.idSourceSymbol,type:"symbol"})}function i(t){return"visible"===t.layout.visibility}var a=t("./convert"),o=n.prototype;o.update=function(t){var e=this.mapbox,r=a(t);e.setOptions(this.idLayerFill,"setLayoutProperty",r.fill.layout),e.setOptions(this.idLayerLine,"setLayoutProperty",r.line.layout),e.setOptions(this.idLayerCircle,"setLayoutProperty",r.circle.layout),e.setOptions(this.idLayerSymbol,"setLayoutProperty",r.symbol.layout),i(r.fill)&&(e.setSourceData(this.idSourceFill,r.fill.geojson),e.setOptions(this.idLayerFill,"setPaintProperty",r.fill.paint)),i(r.line)&&(e.setSourceData(this.idSourceLine,r.line.geojson),e.setOptions(this.idLayerLine,"setPaintProperty",r.line.paint)),i(r.circle)&&(e.setSourceData(this.idSourceCircle,r.circle.geojson),e.setOptions(this.idLayerCircle,"setPaintProperty",r.circle.paint)),i(r.symbol)&&(e.setSourceData(this.idSourceSymbol,r.symbol.geojson),e.setOptions(this.idLayerSymbol,"setPaintProperty",r.symbol.paint))},o.dispose=function(){var t=this.map;t.removeLayer(this.idLayerFill),t.removeLayer(this.idLayerLine),t.removeLayer(this.idLayerCircle),t.removeLayer(this.idLayerSymbol),t.removeSource(this.idSourceFill),t.removeSource(this.idSourceLine),t.removeSource(this.idSourceCircle),t.removeSource(this.idSourceSymbol)},e.exports=function(t,e){var r=e[0].trace,i=new n(t,r.uid);return i.update(e),i}},{"./convert":988}],994:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/colorscale/color_attributes"),o=t("../../components/colorbar/attributes"),s=t("../../lib/extend").extendFlat,l=n.marker,u=n.line,c=l.line;e.exports={a:{valType:"data_array"},b:{valType:"data_array"},c:{valType:"data_array"},sum:{valType:"number",dflt:0,min:0},mode:s({},n.mode,{dflt:"markers"}),text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:s({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing},connectgaps:n.connectgaps,fill:s({},n.fill,{values:["none","toself","tonext"]}),fillcolor:n.fillcolor,marker:s({},{symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:s({},{width:c.width},a("marker".line))},a("marker"),{showscale:l.showscale,colorbar:o}),textfont:n.textfont,textposition:n.textposition,hoverinfo:s({},i.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:n.hoveron}},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../lib/extend":682,"../../plots/attributes":727,"../scatter/attributes":947}],995:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("../scatter/subtypes"),o=t("../scatter/colorscale_calc"),s=t("../scatter/arrays_to_calcdata"),l=["a","b","c"],u={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,c,h,f,d,p,m=t._fullLayout[e.subplot],g=m.sum,v=e.sum||g;for(r=0;rk&&S.splice(k,S.length-k)}return o(e),s(A,e),A}},{"../../plots/cartesian/axes":729,"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951,"../scatter/subtypes":967,"fast-isnumeric":123}],996:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../scatter/constants"),a=t("../scatter/subtypes"),o=t("../scatter/marker_defaults"),s=t("../scatter/line_defaults"),l=t("../scatter/line_shape_defaults"),u=t("../scatter/text_defaults"),c=t("../scatter/fillcolor_defaults"),h=t("./attributes");e.exports=function(t,e,r,f){function d(r,i){return n.coerce(t,e,h,r,i)}var p,m=d("a"),g=d("b"),v=d("c");if(m?(p=m.length,g?(p=Math.min(p,g.length),v&&(p=Math.min(p,v.length))):p=v?Math.min(p,v.length):0):g&&v&&(p=Math.min(g.length,v.length)),!p)return void(e.visible=!1);m&&p"),s}}},{"../../plots/cartesian/axes":729,"../scatter/hover":956}],998:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.moduleType="trace",n.name="scatterternary",n.basePlotModule=t("../../plots/ternary"),n.categories=["ternary","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/ternary":800,"../scatter/colorbar":950,"./attributes":994,"./calc":995,"./defaults":996,"./hover":997,"./plot":999,"./select":1e3,"./style":1001}],999:[function(t,e,r){"use strict";var n=t("../scatter/plot");e.exports=function(t,e){var r=t.plotContainer;r.select(".scatterlayer").selectAll("*").remove();for(var i={xaxis:t.xaxis,yaxis:t.yaxis,plot:r},a=0;a":return function(t){return u(t)>i};case">=":return function(t){return u(t)>=i};case"[]":return function(t){var e=u(t);return e>=i[0]&&e<=i[1]};case"()":return function(t){var e=u(t);return e>i[0]&&e=i[0]&&ei[0]&&e<=i[1]};case"][":return function(t){var e=u(t);return e<=i[0]||e>=i[1]};case")(":return function(t){var e=u(t);return ei[1]};case"](":return function(t){var e=u(t);return e<=i[0]||e>i[1]};case")[":return function(t){var e=u(t);return e=i[1]};case"{}":return function(t){return-1!==i.indexOf(u(t))};case"}{":return function(t){return-1===i.indexOf(u(t))}}}var o=t("../lib"),s=t("../registry"),l=t("../plot_api/plot_schema"),u=t("../plots/cartesian/axis_ids"),c=t("../plots/cartesian/axis_autotype"),h=t("../plots/cartesian/set_convert"),f=["=","<",">=",">","<="],d=["[]","()","[)","(]","][",")(","](",")["],p=["{}","}{"];r.moduleType="transform",r.name="filter",r.attributes={enabled:{valType:"boolean",dflt:!0},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x"},operation:{valType:"enumerated",values:[].concat(f).concat(d).concat(p),dflt:"="},value:{valType:"any",dflt:0}},r.supplyDefaults=function(t){function e(e,i){return o.coerce(t,n,r.attributes,e,i)}var n={};if(e("enabled")){e("operation"),e("value"),e("target");var i=s.getComponentMethod("calendars","handleDefaults");i(t,n,"valuecalendar",null),i(t,n,"targetcalendar",null)}return n},r.calcTransform=function(t,e,r){if(r.enabled){var s=r.target,u=n(e,s),c=u.length;if(c){var h=r.targetcalendar;if("string"==typeof s){var f=o.nestedProperty(e,s+"calendar").get();f&&(h=f)}for(var d="x"===s||"y"===s||"z"===s?s:u,p=i(t,e,d),m=a(r,p,h),g=l.findArrayAttributes(e),v={},y=0;y'), + color: Color.addOpacity(d.tinyColorHue, 1), + idealAlign: d3.event.x < hoverCenterX ? 'right' : 'left' + }, { + container: fullLayout._hoverlayer.node(), + outerContainer: fullLayout._paper.node() + }); + + makeTranslucent(tooltip, 0.67); + }; + + var linkUnhover = function(element, d, sankey) { + d3.select(element).call(linkNonHoveredStyle, d, sankey); + if(log) console.log('unhover link', d.link); + gd.emit('plotly_unhover', { + points: [d.link] + }); + + if(hasHoverData) { + Fx.loneUnhover(fullLayout._hoverlayer.node()); + hasHoverData = false; + } + }; + + var nodeSelect = function(element, d, sankey) { + if(log) console.log('select node', d.node); + gd._hoverdata = [d.node]; + gd._hoverdata.trace = calcData.trace; + d3.select(element).call(linkNonHoveredStyle, d, sankey); + d3.select(element).call(nodeNonHoveredStyle, d, sankey); + Fx.click(gd, { target: true }); + }; + + var nodeHover = function(element, d, sankey) { + + if(log) console.log('hover node', d.node); + + d3.select(element).call(nodeHoveredStyle, d, sankey); + + Fx.hover(gd, d.node, 'sankey'); + + hasHoverData = true; + + }; + + + var nodeHoverFollow = function(element, d) { + + var nodeRect = d3.select(element).select('.nodeRect'); + + var followMouse = gd.data[0].followmouse; + + var boundingBox = nodeRect.node().getBoundingClientRect(); + var hoverCenterX0 = boundingBox.left - 2; + var hoverCenterX1 = boundingBox.right + 2; + var hoverCenterY = followMouse ? d3.event.y : boundingBox.top + boundingBox.height / 4; + + var tooltip = Fx.loneHover({ + x0: hoverCenterX0, + x1: hoverCenterX1, + y: hoverCenterY, + name: d3.format(d.valueFormat)(d.node.value) + d.valueUnit, + text: [ + d.node.label, + ['Incoming flow count:', d.node.targetLinks.length].join(' '), + ['Outgoing flow count:', d.node.sourceLinks.length].join(' ') + ].filter(renderableValuePresent).join('
'), + color: d.tinyColorHue, + idealAlign: 'left' + }, { + container: fullLayout._hoverlayer.node(), + outerContainer: fullLayout._paper.node() + }); + + makeTranslucent(tooltip, 0.85); + makeTextContrasty(tooltip, d.tinyColorHue); + }; + + var nodeUnhover = function(element, d, sankey) { + + d3.select(element).call(nodeNonHoveredStyle, d, sankey); + if(log) console.log('unhover node', d.node); + gd.emit('plotly_unhover', { + points: [d.node] + }); + + if(hasHoverData) { + Fx.loneUnhover(fullLayout._hoverlayer.node()); + hasHoverData = false; + } + }; + + render( + svg, + calcData, + { + width: size.w, + height: size.h, + margin: { + t: size.t, + r: size.r, + b: size.b, + l: size.l + } + }, + { + linkEvents: { + hover: linkHover, + follow: linkHoverFollow, + unhover: linkUnhover, + select: linkSelect + }, + nodeEvents: { + hover: nodeHover, + follow: nodeHoverFollow, + unhover: nodeUnhover, + select: nodeSelect + } + } + ); +}; diff --git a/src/traces/sankey/render.js b/src/traces/sankey/render.js new file mode 100644 index 00000000000..07cee9dc9b5 --- /dev/null +++ b/src/traces/sankey/render.js @@ -0,0 +1,538 @@ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var c = require('./constants'); +var d3 = require('d3'); +var tinycolor = require('tinycolor2'); +var Color = require('../../components/color'); +var Drawing = require('../../components/drawing'); +var d3sankey = require('@monfera/d3-sankey').sankey; +var d3Force = require('d3-force'); + + +// basic data utilities + +function keyFun(d) {return d.key;} +function repeat(d) {return [d];} // d3 data binding convention +function unwrap(d) {return d[0];} // plotly data structure convention +function visible(nodeOrLink) {return !('visible' in nodeOrLink) || nodeOrLink.visible;} + +function persistOriginalPlace(nodes) { + for (var i = 0; i < nodes.length; i++) { + nodes[i].originalX = nodes[i].x; + nodes[i].originalY = nodes[i].y; + } +} + +function saveCurrentDragPosition(d) { + d.lastDraggedX = d.x + d.lastDraggedY = d.y +} + +function sameLayer(d) { + return function(n) {return n.node.originalX === d.node.originalX;}; +} + +function switchToForceFormat(nodes) { + // force uses x, y as centers + for (var i = 0; i < nodes.length; i++) { + nodes[i].y = nodes[i].y + nodes[i].dy / 2; + } +} + +function switchToSankeyFormat(nodes) { + // sankey uses x, y as top left + for (var i = 0; i < nodes.length; i++) { + nodes[i].y = nodes[i].y - nodes[i].dy / 2; + } +} + + +// view models + +function sankeyModel(layout, d, i) { + + var trace = unwrap(d).trace, + domain = trace.domain, + nodes = trace.nodes, + links = trace.links, + horizontal = trace.orientation === 'h', + nodePad = trace.nodepad, + nodeThickness = trace.nodethickness, + valueFormat = trace.valueformat, + valueUnit = trace.valueunit, + textFont = trace.textfont; + + var width = layout.width * (domain.x[1] - domain.x[0]), + height = layout.height * (domain.y[1] - domain.y[0]); + + var sankey = d3sankey() + .size(horizontal ? [width, height] : [height, width]) + .nodeWidth(nodeThickness) + .nodePadding(nodePad) + .nodes(nodes) + .links(links) + .layout(c.sankeyIterations); + + switchToForceFormat(nodes); + + return { + key: i, + guid: Math.floor(1e12 * (1 + Math.random())), + horizontal: horizontal, + width: width, + height: height, + nodePad: nodePad, + valueFormat: valueFormat, + valueUnit: valueUnit, + textFont: textFont, + translateX: domain.x[0] * width + layout.margin.l, + translateY: layout.height - domain.y[1] * layout.height + layout.margin.t, + dragParallel: horizontal ? height : width, + dragPerpendicular: horizontal ? width : height, + nodes: nodes, + links: links, + sankey: sankey, + forceLayouts: {}, + interactionState: { + dragInProgress: false, + hovered: false + } + }; +} + +function linkModel(d, l) { + + var tc = tinycolor(l.color); + + return { + key: l.source.label + '|' + l.target.label, + traceId: d.key, + link: l, + tinyColorHue: Color.tinyRGB(tc), + tinyColorAlpha: tc.getAlpha(), + valueFormat: d.valueFormat, + valueUnit: d.valueUnit, + sankey: d.sankey, + interactionState: d.interactionState + }; +} + +function nodeModel(uniqueKeys, d, n) { + + var tc = tinycolor(n.color), + zoneThicknessPad = c.nodePadAcross, + zoneLengthPad = d.nodePad / 2, + visibleThickness = n.dx + 0.5, + visibleLength = n.dy - 0.5, + zoneThickness = visibleThickness + 2 * zoneThicknessPad, + zoneLength = visibleLength + 2 * zoneLengthPad; + + var foundKey = uniqueKeys[n.label]; + uniqueKeys[n.label] = (foundKey === void(0) ? foundKey : 0) + 1; + var key = n.label + (foundKey === void(0) ? '' : '__' + foundKey); + + return { + key: key, + traceId: d.key, + node: n, + nodePad: d.nodePad, + textFont: d.textFont, + size: d.horizontal ? d.height : d.width, + visibleWidth: Math.ceil(d.horizontal ? visibleThickness : visibleLength), + visibleHeight: Math.ceil(d.horizontal ? visibleLength : visibleThickness), + zoneX: d.horizontal ? -zoneThicknessPad : -zoneLengthPad, + zoneY: d.horizontal ? -zoneLengthPad : -zoneThicknessPad, + zoneWidth: d.horizontal ? zoneThickness : zoneLength, + zoneHeight: d.horizontal ? zoneLength : zoneThickness, + labelY: d.horizontal ? n.dy / 2 + 1 : n.dx / 2 + 1, + sizeAcross: d.horizontal ? d.width : d.height, + forceLayouts: d.forceLayouts, + horizontal: d.horizontal, + darkBackground: tc.getBrightness() <= 128, + tinyColorHue: Color.tinyRGB(tc), + tinyColorAlpha: tc.getAlpha(), + valueFormat: d.valueFormat, + valueUnit: d.valueUnit, + sankey: d.sankey, + uniqueNodeLabelPathId: JSON.stringify({sankeyGuid: d.guid, traceId: d.key, nodeKey: n.label}), + interactionState: d.interactionState + }; +} + + +// rendering snippets + +function crispLinesOnEnd(sankeyNode) { + d3.select(sankeyNode.node().parentElement).style('shape-rendering', 'crispEdges'); +} + +function updateNodePositions(sankeyNode) { + sankeyNode + .attr('transform', function(d) { + return d.horizontal + ? 'translate(' + (d.node.x - 0.5) + ', ' + (d.node.y - d.node.dy / 2 + 0.5) + ')' + : 'translate(' + (d.node.y - d.node.dy / 2 - 0.5) + ', ' + (d.node.x + 0.5) + ')' + }) +} + +function linkPath(d) { + var nodes = d.sankey.nodes(); + switchToSankeyFormat(nodes); + var result = d.sankey.link()(d.link); + switchToForceFormat(nodes); + return result; +} + +function updateNodeShapes(sankeyNode) { + d3.select(sankeyNode.node().parentElement).style('shape-rendering', 'optimizeSpeed'); + sankeyNode.call(updateNodePositions); +} + +function updateShapes(sankeyNode, sankeyLink) { + sankeyNode.call(updateNodeShapes); + sankeyLink.attr('d', linkPath); +} + +function sizeNode(rect) { + rect.attr('width', function(d) {return d.visibleWidth;}) + .attr('height', function(d) {return d.visibleHeight;}); +} + + +// event handling + +function attachPointerEvents(selection, sankey, eventSet) { + selection + .on('.basic', null) // remove any preexisting handlers + .on('mouseover.basic', function (d) { + if (!d.interactionState.dragInProgress) { + eventSet.hover(this, d, sankey); + d.interactionState.hovered = [this, d]; + } + }) + .on('mousemove.basic', function (d) { + if (!d.interactionState.dragInProgress) { + eventSet.follow(this, d); + d.interactionState.hovered = [this, d]; + } + }) + .on('mouseout.basic', function (d) { + if (!d.interactionState.dragInProgress) { + eventSet.unhover(this, d, sankey); + d.interactionState.hovered = false; + } + }) + .on('click.basic', function (d) { + if (d.interactionState.hovered) { + eventSet.unhover(this, d, sankey); + d.interactionState.hovered = false; + } + if (!d.interactionState.dragInProgress) { + eventSet.select(this, d, sankey); + } + }); +} + +function attachDragHandler(sankeyNode, sankeyLink, callbacks) { + + var dragBehavior = d3.behavior.drag() + + .origin(function(d) {return d.horizontal ? d.node : {x: d.node['y'], y: d.node['x']};}) + + .on('dragstart', function(d) { + if(!c.movable) return; + this.parentNode.appendChild(this); // bring element to top (painter's algo) + d.interactionState.dragInProgress = d.node; + saveCurrentDragPosition(d.node); + if(d.interactionState.hovered) { + callbacks.nodeEvents.unhover.apply(0, d.interactionState.hovered); + d.interactionState.hovered = false; + } + if(c.useForceSnap) { + var forceKey = d.traceId + '|' + Math.floor(d.node.originalX); + if (d.forceLayouts[forceKey]) { + d.forceLayouts[forceKey].alpha(1); + } else { // make a forceLayout iff needed + attachForce(sankeyNode, forceKey, d); + } + window.requestAnimationFrame(function faster() { + for(var i = 0; i < c.forceTicksPerFrame; i++) d.forceLayouts[forceKey].tick(); + updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink); + if(d.forceLayouts[forceKey].alpha() > 0) { + window.requestAnimationFrame(faster); + } + }) + } + }) + + .on('drag', function(d) { + if(!c.movable) return; + var x = d.horizontal ? d3.event.x : d3.event.y; + var y = d.horizontal ? d3.event.y : d3.event.x; + if(c.useForceSnap) { + d.node.x = x; + d.node.y = y; + } else { + if(c.sideways) { + d.node.x = x; + } + d.node.y = Math.max(d.node.dy / 2, Math.min(d.size - d.node.dy / 2, y)); + } + saveCurrentDragPosition(d.node); + d.sankey.relayout(); + if(!c.useForceSnap) { + updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink); + sankeyNode.call(crispLinesOnEnd); + } + }) + + .on('dragend', function(d) {d.interactionState.dragInProgress = false;}); + + + sankeyNode + .on('.drag', null) // remove possible previous handlers + .call(dragBehavior); +} + +function attachForce(sankeyNode, forceKey, d) { + var nodes = d.sankey.nodes().filter(function(n) {return n.originalX === d.node.originalX;}); + d.forceLayouts[forceKey] = d3Force.forceSimulation(nodes) + .alphaDecay(0) + .force('collide', d3Force.forceCollide() + .radius(function (n) {return n.dy / 2 + d.nodePad / 2;}) + .strength(1) + .iterations(c.forceIterations)) + .force('constrain', snappingForce(sankeyNode, forceKey, nodes, d)) + .stop(); +} + +function snappingForce(sankeyNode, forceKey, nodes, d) { + return function _snappingForce() { + var maxVelocity = 0; + for (var i = 0; i < nodes.length; i++) { + var n = nodes[i]; + if (n === d.interactionState.dragInProgress) { // constrain node position to the dragging pointer + n.x = n.lastDraggedX; + n.y = n.lastDraggedY; + } else { + n.vx = (n.originalX - n.x) / c.forceTicksPerFrame; // snap to layer + n.y = Math.min(d.size - n.dy / 2, Math.max(n.dy / 2, n.y)); // constrain to extent + } + maxVelocity = Math.max(maxVelocity, Math.abs(n.vx), Math.abs(n.vy)); + } + if (!d.interactionState.dragInProgress && maxVelocity < 0.1) { + d.forceLayouts[forceKey].alpha(0); + window.setTimeout(function () { + sankeyNode.call(crispLinesOnEnd); + }, 30); // geome on move, crisp when static + } + } +} + + +// scene graph + +module.exports = function(svg, styledData, layout, callbacks) { + + svg.style('overflow', 'visible'); + + var sankey = svg.selectAll('.sankey') + .data(styledData + .filter(function(d) {return unwrap(d).trace.visible;}) + .map(sankeyModel.bind(null, layout)), + keyFun); + + sankey.exit() + .remove(); + + sankey.enter() + .append('g') + .classed('sankey', true) + .attr('overflow', 'visible') + .style('box-sizing', 'content-box') + .style('position', 'absolute') + .style('left', 0) + .style('overflow', 'visible') + .style('shape-rendering', 'geometricPrecision') + .style('pointer-events', 'auto') + .style('box-sizing', 'content-box'); + + sankey + .attr('transform', function(d) {return 'translate(' + d.translateX + ',' + d.translateY + ')';}); + + + var sankeyLinks = sankey.selectAll('.sankeyLinks') + .data(repeat, keyFun); + + sankeyLinks.enter() + .append('g') + .classed('sankeyLinks', true) + .style('fill', 'none'); + + sankeyLinks.transition() + .ease(c.ease).duration(c.duration) + .style('transform', function(d) {return d.horizontal ? 'matrix(1,0,0,1,0,0)' : 'matrix(0,1,1,0,0,0)'}); + + + var sankeyLink = sankeyLinks.selectAll('.sankeyLink') + .data(function(d) { + return d.sankey.links() + .filter(function(l) {return l.visible && l.value;}) + .map(linkModel.bind(null, d)); + }, keyFun); + + sankeyLink.enter() + .append('path') + .classed('sankeyLink', true) + .style('stroke-width', function(d) {return Math.max(1, d.link.dy);}) + .style('opacity', 0) + .call(attachPointerEvents, sankey, callbacks.linkEvents); + + sankeyLink + .style('stroke', function(d) {return d.tinyColorHue;}) + .style('stroke-opacity', function(d) {return d.tinyColorAlpha;}); + + sankeyLink.transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 1) + .attr('d', linkPath) + .style('stroke-width', function(d) {return Math.max(1, d.link.dy);}); + + sankeyLink.exit().transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 0) + .remove(); + + + var sankeyNodeSet = sankey.selectAll('.sankeyNodeSet') + .data(repeat, keyFun); + + sankeyNodeSet.enter() + .append('g') + .style('shape-rendering', 'geometricPrecision') + .classed('sankeyNodeSet', true); + + sankeyNodeSet + .each(function(d) {Drawing.font(sankeyNodeSet, d.textFont);}); // fixme causes scerenshot trouble + + + var sankeyNode = sankeyNodeSet.selectAll('.sankeyNode') + .data(function(d) { + var nodes = d.sankey.nodes(); + var uniqueKeys = {}; + persistOriginalPlace(nodes); + return nodes + .filter(function(n) {return n.visible && n.value;}) + .map(nodeModel.bind(null, uniqueKeys, d)); + }, keyFun); + + sankeyNode.enter() + .append('g') + .classed('sankeyNode', true) + .style('opacity', 0) + .style('cursor', 'move') + .call(updateNodePositions) + .call(attachPointerEvents, sankey, callbacks.nodeEvents); + + sankeyNode + .call(attachDragHandler, sankeyLink, callbacks); // has to be here as it binds sankeyLink + + sankeyNode.transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 1) + .call(updateNodePositions); + + sankeyNode.exit().transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 0) + .remove(); + + + var nodeRect = sankeyNode.selectAll('.nodeRect') + .data(repeat); + + nodeRect.enter() + .append('rect') + .classed('nodeRect', true) + .style('stroke-width', 0.5) + .call(Color.stroke, 'rgba(0, 0, 0, 1)') + .call(sizeNode); + + nodeRect + .style('fill', function(d) {return d.tinyColorHue;}) + .style('fill-opacity', function(d) {return d.tinyColorAlpha;}); + + nodeRect.transition() + .ease(c.ease).duration(c.duration) + .call(sizeNode); + + + var nodeCapture = sankeyNode.selectAll('.nodeCapture') + .data(repeat); + + nodeCapture.enter() + .append('rect') + .classed('nodeCapture', true) + .style('fill-opacity', 0); + + nodeCapture + .attr('x', function(d) {return d.zoneX;}) + .attr('y', function(d) {return d.zoneY;}) + .attr('width', function(d) {return d.zoneWidth;}) + .attr('height', function(d) {return d.zoneHeight;}); + + + var nodeLabelGuide = sankeyNode.selectAll('.nodeLabelGuide') + .data(repeat); + + nodeLabelGuide.enter() + .append('path') + .classed('nodeLabelGuide', true) + .attr('id', function(d) {return d.uniqueNodeLabelPathId;}); // fixme causes scerenshot trouble + + nodeLabelGuide + .transition() + .ease(c.ease).duration(c.duration) + .attr('d', function(d) { + return d3.svg.line()([ + [d.horizontal ? d.visibleWidth + c.nodeTextOffsetHorizontal : c.nodeTextOffsetHorizontal, d.labelY], + [d.horizontal ? d.sizeAcross : d.visibleWidth - c.nodeTextOffsetHorizontal, d.labelY] + ]);}); + + + var nodeLabel = sankeyNode.selectAll('.nodeLabel') + .data(repeat); + + nodeLabel.enter() + .append('text') + .classed('nodeLabel', true) + .style('user-select', 'none') + .style('cursor', 'default') + .style('fill', 'black'); + + nodeLabel + .style('text-shadow', function(d) { + return d.horizontal ? '0 1px 1px #fff' : 'none'; + }); + + var nodeLabelTextPath = nodeLabel.selectAll('.nodeLabelTextPath') + .data(repeat); + + nodeLabelTextPath.enter() + .append('textPath') + .classed('nodeLabelTextPath', true) + .attr('alignment-baseline', 'middle') + .attr('xlink:href', function(d) {return '#' + d.uniqueNodeLabelPathId;}); + + nodeLabelTextPath + .text(function(d) {return d.horizontal || d.node.dy > 5 ? d.node.label : '';}) + .style('fill', function(d) {return d.darkBackground && !d.horizontal ? 'white' : 'black';}); +}; diff --git a/tasks/util/constants.js b/tasks/util/constants.js index 9c8b1aaf828..1f579c3d298 100644 --- a/tasks/util/constants.js +++ b/tasks/util/constants.js @@ -13,7 +13,7 @@ var pathToTopojsonSrc = path.join( ); var partialBundleNames = [ - 'basic', 'cartesian', 'geo', 'gl3d', 'gl2d', 'mapbox', 'finance' + 'sankey' ]; var partialBundlePaths = partialBundleNames.map(function(name) { diff --git a/test/image/baselines/sankey.png b/test/image/baselines/sankey.png new file mode 100644 index 0000000000000000000000000000000000000000..1bffefd071a06d2c11d35e5d1695d0c7c15bdb97 GIT binary patch literal 53847 zcmeF3bySpH`|qU@LAs=o5^0c{`>6Gs7I(wdY-*^4i z^R9KyzvrB_<_~5@XYPCNebx8+Tob4uCxM3Y4CT?IM`)67MU@^sf=_?+2qpp<5xkN} zL{RnU5&0uYQQ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%pF0Oe5dt?ex^ zHwF4EVUmaeCGYd|!7Mf<0MHnXd3)d$2UDO$zZ-M~!eR5HH5FSgVwjFSz<{e{S{?-= zjqFE~97#Rp;7I0Be*6AiR7e%P4fI4?G9j-VoPqw!J=p>)NLQ#D_kNNpQ|C=?c7gaEv z!ZdWHciqez`1+2xftWD|e(m^6Ow#}vS|eu3j~r8t6j9xDDwAb0@6&Tw^6^k z_x!Cuok;9z->>(bO*{cYgulYe{~q_h#r)q
G&i-MhcM%8r7fw(VOJNy0361Mnd= MWo@N`>vtaiA5acs!~g&Q literal 0 HcmV?d00001 diff --git a/test/image/baselines/sankey_large.png b/test/image/baselines/sankey_large.png new file mode 100644 index 0000000000000000000000000000000000000000..7e7c78893a11fbd9268d4246c1e380bb0c36aae4 GIT binary patch literal 55933 zcmeFZbyU=CyEZK0P=iPhA|c%^D2>t}AR^sJmvpxv-O?o?Akrz_-Jmo`cbD{c%^iC` zdq4NHzJI=Nt@n?2tywM^W#)>rj^jMeUyy>F1Sa|;^n3U2VM0wGz7JY zd!a0uzV9A7wA2T?uz$`-z<(|3i$;yYp5Yx5jBqjZ=IY#HX!Wc=mCvKjdZ^yvfwBFU zy4p*Zg0BVhw_j^VJHv>1lA=)qz5n^O5-3bfr0|@gz(PzIS@fS?j}eFzzM@i)BmU#- zIW;*FL$33u@BjSqf!p!eJP*@JF+q;)u z+mPj-7e+yjB<=7|`+;wgJQw+$@G4$02jM?13;{b5A&2)r?3g0*4I)Q|ZLmsW$bVQ{ zx3?n6Kkpa;yPF;y=ktz&{{M8`?}YOo{Kw0R^@ir9EWKU($EyHua%3o>{Np8pH*KYb zAxd(G40iwFHsIHc^q)TX|6cRI-^u^I=Ko>j|L1tK&k3^C_f>+c>*Jx_dAEIL+vf8H zFKgp8moHDP=Vu{Mn8J$ng6CCXs>j*X*?H65T)4oQYTfPS_O86wWsH{lVMm9)cD-|{ z!}iYstEL;r8Mplg>LApWSnn;3e{mp5Cg3tbpXBcU8AK#GeCXeNnY65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LE}!tMG*h{CpZ2bAWH;Vg>xI2DY;N1<7+PcQ zGZDSny0g8oW2!j?&32=MOLT1c6gr2Jhsmv^1at(V-Bs#`!6JCfb3hjvopDbobZ-@$ z^2X>-WSst4(fRsH>#D1F7Zcrx8Pr)PeW@bEEM>_E2?oDHNPv9#0emx0Y~WuIOpf5+Tt85+dCaTzF+ODC8HK(zTRxErLAo=e>BiD-in%nPy8BZZbsAR z!$`9#%`m$sWTHyL(*kJptLU_rg9N+>uI-NVXBA^yYJSeOfR?uYz>6Xrr*EK^=7<*) zCXxwCEm;L28Rar_(}kw1;_9n5QVRgacw3;L=|9xwwA+Uz@MBpkj!2y2FEJB7DZ_53 z{bN0634vBp6CIWo5}MbRZ9mg|Gv1a_Na2FYxv}%*@413g+Ql-heBQ8K#}gI+@Xk}8 zY{)nkqI8NvUg5NtV;;K{6oZd$XL+0w@kwr4*n2xI{=&W)4$AyTIrVSOTw{JNCTI1c zsjz8*l`4NRu`if1Cbel7VJZtt_I2WS3AaBKo?j7Q+MuztvgV?i(rnhb`66<0O-8Ci zR#9Oqkh{N@f?Fk1j4Oeb!z-K;V(F0PSBRya^bS|x?*H%;Zv_B2U+NnL^FQamFLa?! zaGAUi_vZ|kE_xSrAu)Z%HSIrrIEt_ua@>C1j86%>DB}P5g9_c7MUZ3_`uWnIGk25> zBC)?wq4?)((-4EapHAlz$KgMH_%4d~{3s$V8MntL{(Nl|>cOPOp%gvMe1A^SU%|@E z^7nlCbMk+nk^DulmRO^2?A$E-sC3vjuDd;kCd literal 0 HcmV?d00001 diff --git a/test/image/mocks/energy.json b/test/image/mocks/energy.json new file mode 100644 index 00000000000..a8cd37cbffa --- /dev/null +++ b/test/image/mocks/energy.json @@ -0,0 +1,214 @@ +{ + "data": [ + { + "type": "sankey", + "domain": { + "x": [ + 0, + 1 + ], + "y": [ + 0, + 1 + ] + }, + "orientation": "h", + "nodepad": 15, + "nodethickness": 15, + "valueformat": ".0f", + "valueunit": "TWh", + "followmouse": true, + "nodes": [ + {"label":"Agricultural 'waste'"}, + {"label":"Bio-conversion"}, + {"label":"Liquid"}, + {"label":"Losses"}, + {"label":"Solid"}, + {"label":"Gas"}, + {"label":"Biofuel imports"}, + {"label":"Biomass imports"}, + {"label":"Coal imports"}, + {"label":"Coal"}, + {"label":"Coal reserves"}, + {"label":"District heating"}, + {"label":"Industry"}, + {"label":"Heating and cooling - commercial"}, + {"label":"Heating and cooling - homes"}, + {"label":"Electricity grid"}, + {"label":"Over generation / exports"}, + {"label":"H2 conversion"}, + {"label":"Road transport"}, + {"label":"Agriculture"}, + {"label":"Rail transport"}, + {"label":"Lighting & appliances - commercial"}, + {"label":"Lighting & appliances - homes"}, + {"label":"Gas imports"}, + {"label":"Ngas"}, + {"label":"Gas reserves"}, + {"label":"Thermal generation"}, + {"label":"Geothermal"}, + {"label":"H2"}, + {"label":"Hydro"}, + {"label":"International shipping"}, + {"label":"Domestic aviation"}, + {"label":"International aviation"}, + {"label":"National navigation"}, + {"label":"Marine algae"}, + {"label":"Nuclear"}, + {"label":"Oil imports"}, + {"label":"Oil"}, + {"label":"Oil reserves"}, + {"label":"Other waste"}, + {"label":"Pumped heat"}, + {"label":"Solar PV"}, + {"label":"Solar Thermal"}, + {"label":"Solar"}, + {"label":"Tidal"}, + {"label":"UK land based bioenergy"}, + {"label":"Wave"}, + {"label":"Wind"} + ], + "links": [ + {"source":0,"target":1,"value":124.729}, + {"source":1,"target":2,"value":0.597}, + {"source":1,"target":3,"value":26.862}, + {"source":1,"target":4,"value":280.322}, + {"source":1,"target":5,"value":81.144}, + {"source":6,"target":2,"value":35}, + {"source":7,"target":4,"value":35}, + {"source":8,"target":9,"value":11.606}, + {"source":10,"target":9,"value":63.965}, + {"source":9,"target":4,"value":75.571}, + {"source":11,"target":12,"value":10.639}, + {"source":11,"target":13,"value":22.505}, + {"source":11,"target":14,"value":46.184}, + {"source":15,"target":16,"value":104.453}, + {"source":15,"target":14,"value":113.726}, + {"source":15,"target":17,"value":27.14}, + {"source":15,"target":12,"value":342.165}, + {"source":15,"target":18,"value":37.797}, + {"source":15,"target":19,"value":4.412}, + {"source":15,"target":13,"value":40.858}, + {"source":15,"target":3,"value":56.691}, + {"source":15,"target":20,"value":7.863}, + {"source":15,"target":21,"value":90.008}, + {"source":15,"target":22,"value":93.494}, + {"source":23,"target":24,"value":40.719}, + {"source":25,"target":24,"value":82.233}, + {"source":5,"target":13,"value":0.129}, + {"source":5,"target":3,"value":1.401}, + {"source":5,"target":26,"value":151.891}, + {"source":5,"target":19,"value":2.096}, + {"source":5,"target":12,"value":48.58}, + {"source":27,"target":15,"value":7.013}, + {"source":17,"target":28,"value":20.897}, + {"source":17,"target":3,"value":6.242}, + {"source":28,"target":18,"value":20.897}, + {"source":29,"target":15,"value":6.995}, + {"source":2,"target":12,"value":121.066}, + {"source":2,"target":30,"value":128.69}, + {"source":2,"target":18,"value":135.835}, + {"source":2,"target":31,"value":14.458}, + {"source":2,"target":32,"value":206.267}, + {"source":2,"target":19,"value":3.64}, + {"source":2,"target":33,"value":33.218}, + {"source":2,"target":20,"value":4.413}, + {"source":34,"target":1,"value":14.375}, + {"source":24,"target":5,"value":122.952}, + {"source":35,"target":26,"value":839.978}, + {"source":36,"target":37,"value":504.287}, + {"source":38,"target":37,"value":107.703}, + {"source":37,"target":2,"value":611.99}, + {"source":39,"target":4,"value":56.587}, + {"source":39,"target":1,"value":77.81}, + {"source":40,"target":14,"value":193.026}, + {"source":40,"target":13,"value":70.672}, + {"source":41,"target":15,"value":59.901}, + {"source":42,"target":14,"value":19.263}, + {"source":43,"target":42,"value":19.263}, + {"source":43,"target":41,"value":59.901}, + {"source":4,"target":19,"value":0.882}, + {"source":4,"target":26,"value":400.12}, + {"source":4,"target":12,"value":46.477}, + {"source":26,"target":15,"value":525.531}, + {"source":26,"target":3,"value":787.129}, + {"source":26,"target":11,"value":79.329}, + {"source":44,"target":15,"value":9.452}, + {"source":45,"target":1,"value":182.01}, + {"source":46,"target":15,"value":19.013}, + {"source":47,"target":15,"value":289.366} + ] + } + ], + "layout": { + "title": "Energy forecast for 2050, UK — Department of Energy & Climate Change
Imperfect copy of
Mike Bostock's example
with numerous Plotly features", + "width": 1118, + "height": 772, + "font": { + "size": 10 + }, + "updatemenus": [ + { + "y": 0.7, + "buttons": [ + { + "label": "Horizontal", + "method": "restyle", + "args": [ "orientation", "h" ] + }, + { + "label": "Vertical", + "method": "restyle", + "args": [ "orientation", "v"] + } + ] + }, + { + "y": 0.8, + "buttons": [ + { + "label": "Follow mouse", + "method": "restyle", + "args": [ "followmouse", true ] + }, + { + "label": "Stick tooltip", + "method": "restyle", + "args": [ "followmouse", false] + } + ] + }, + { + "y": 1, + "buttons": [ + { + "label": "Thick", + "method": "restyle", + "args": [ "nodethickness", 15 ] + }, + { + "label": "Thin", + "method": "restyle", + "args": [ "nodethickness", 8] + } + ] + }, + { + "y": 0.9, + "buttons": [ + { + "label": "Small gap", + "method": "restyle", + "args": [ "nodepad", 15 ] + }, + { + "label": "Large gap", + "method": "restyle", + "args": [ "nodepad", 20] + } + ] + } + + ] + } +} \ No newline at end of file diff --git a/test/image/mocks/sankey.json b/test/image/mocks/sankey.json new file mode 100644 index 00000000000..24518d45e98 --- /dev/null +++ b/test/image/mocks/sankey.json @@ -0,0 +1,13334 @@ +{ + "layout": { + "width": 1184, + "height": 400, + "title": "Widget parameters and cost" + }, + + "data": [{ + + "type": "sankey", + + "line": { + "showscale": true, + "reversescale": true, + "colorscale": "Jet", + "cmin": -4000, + "cmax": -100, + "color": [-41, -1317, -164, -1856, -79, -931, -191, -2983, -341, -3846, -278, -3019, -523, -2357, -985, -3447, -211, -2842, -458, -4388, -784, -2563, -935, -2253, -313, -3667, -1479, -1030, -632, -623, -1945, -1324, -1221, -878, -947, -1615, -697, -575, -482, -905, -869, -433, -484, -349, -667, -248, -1135, -888, -1019, -223, -2067, -729, -579, -659, -334, -340, -554, -455, -377, -375, -453, -834, -934, -334, -369, -290, -354, -497, -490, -329, -729, -1794, -151, -1162, -3935, -1013, -509, -825, -997, -320, -680, -422, -785, -542, -563, -489, -1283, -680, -78, -450, -514, -449, -548, -661, -641, -503, -570, -257, -394, -450] + }, + + "dimensions": [ + { + "constraintrange": [100000, 150000], + "label": "Block height", + "values": [32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 86600, 163400, 162600, 90000, 93100, 163000, 140500, 130000, 100700, 164500, 147700, 121700, 107500, 176600, 133600, 111100, 93100, 72400, 130100, 54500, 182600, 160300, 218100, 66500, 95800, 164800, 107200, 101600, 91100, 91100, 78100, 63300, 75700, 69600, 88500, 115800, 195700, 88900, 74800, 65400, 74900, 115300, 91400, 67800, 85300, 171300, 32000, 227900, 163200, 122899, 112300, 101500, 111199, 73300, 120800, 93100, 117200, 118500, 104800, 108500, 146500, 90300, 32000, 93000, 110700, 103500, 93300, 106300, 118500, 93000, 67600, 51400, 89000, 94000] + }, + { + "label": "Block width", + "range": [0, 700000], + "tickformat": "", + "values": [268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 436900, 373600, 268630, 439000, 381800, 491200, 402800, 381400, 485600, 600000, 372200, 394700, 383800, 401100, 356500, 313200, 487100, 490700, 432299, 530300, 521500, 456700, 333800, 343200, 394000, 328200, 487700, 383600, 317700, 324600, 482900, 515100, 500100, 562700, 486000, 453400, 352900, 331300, 496200, 469099, 472500, 354700, 507700, 509000, 439300, 525300, 347600, 379000, 432800, 378800, 383200, 523800, 600000, 313600, 497700, 411300, 420000, 381100, 342800, 385900, 268630, 495800, 488000, 446400, 397900, 373300, 385700, 396500, 475700, 510600, 586800, 596000, 407600, 439200] + }, + { + "label": "Cylinder material", + "tickvals": [0, 0.5, 1, 2, 3], + "ticktext": ["A", "AB", "B", "Y", "Z"], + "values": [0, 0, 1, 0.5, 2, 3, 3, 0, 1, 1, 2, 2, 3, 0, 0, 1, 2, 2, 3, 3, 0, 1, 1, 2, 3, 3, 3, 0, 2, 3, 1, 0, 1, 3, 1, 0, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 3, 2, 2, 0, 0, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 0, 3, 0, 2, 2, 0, 2, 0, 2, 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 0, 2, 2, 2] + }, + { + "label": "Block material", + "tickvals": [0, 1, 2, 3], + "range": [-1, 4], + "values": [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + }, + { + "label": "Total weight", + "visible": true, + "values": [160, 1324, 252, 1711, 173, 624, 228, 2474, 371, 3103, 312, 2408, 460, 1727, 754, 2457, 227, 1963, 354, 2797, 377, 1327, 462, 1009, 166, 1415, 1118, 1063, 593, 498, 959, 1331, 1146, 645, 921, 1596, 663, 568, 492, 833, 630, 445, 504, 394, 647, 314, 1039, 829, 911, 282, 925, 681, 581, 506, 368, 373, 628, 538, 418, 419, 478, 884, 847, 369, 410, 344, 396, 501, 510, 379, 733, 1649, 239, 1035, 1839, 967, 514, 875, 794, 414, 664, 447, 839, 540, 636, 499, 1059, 743, 173, 473, 519, 465, 623, 726, 631, 521, 643, 323, 424, 472] + }, + { + "label": "Assembly total cost", + "visible": false, + "values": [1125, 9274, 2735, 16920, 2193, 20704, 4814, 34689, 5565, 46554, 5225, 38887, 9746, 37715, 17798, 55250, 5697, 49083, 11226, 81939, 24258, 62488, 27363, 61924, 12511, 106196, 24444, 7443, 9111, 12527, 50738, 9320, 12291, 17571, 9508, 11176, 9142, 7687, 6724, 11219, 17825, 6506, 6367, 4966, 8495, 3860, 12844, 10688, 13026, 4007, 57281, 9790, 7335, 13748, 5358, 5393, 4401, 3769, 5233, 5058, 6047, 6188, 11899, 5297, 5154, 4406, 5061, 7022, 6358, 4721, 7723, 16745, 2651, 14194, 100772, 10504, 7021, 6131, 16730, 2904, 8334, 5968, 5876, 7394, 4454, 6800, 18376, 5204, 2190, 6146, 7013, 6412, 4361, 5082, 8028, 6484, 4504, 3832, 5687, 6174] + }, + { + "label": "Assembly penalty weight", + "values": [9, 794, 34, 1409, 17, 536, 39, 7133, 115, 9843, 107, 7017, 273, 5131, 1210, 9032, 82, 7312, 252, 16778, 760, 4349, 891, 4228, 123, 10800, 1593, 467, 260, 226, 2940, 803, 689, 420, 422, 1229, 275, 198, 150, 423, 423, 134, 146, 89, 248, 55, 612, 401, 546, 52, 4208, 307, 194, 257, 91, 93, 178, 133, 99, 98, 131, 345, 461, 90, 96, 69, 91, 160, 148, 81, 274, 1332, 31, 667, 11733, 502, 163, 354, 480, 67, 252, 120, 303, 181, 162, 153, 1142, 251, 17, 131, 165, 135, 162, 222, 230, 154, 198, 58, 109, 132] + }, + { + "label": "Height st width", + "values": [236630, 326876, 347086, 437333, 457543, 105963, 568000, 216420, 236630, 326876, 347086, 437333, 457543, 105963, 568000, 216420, 236630, 326876, 347086, 437333, 457543, 105963, 568000, 216420, 236630, 326876, 350300, 210200, 106030, 349000, 288700, 328200, 262300, 251400, 384900, 435500, 224500, 273000, 276300, 224500, 222900, 202100, 394000, 418300, 302200, 475800, 338900, 296400, 115700, 276700, 298200, 163400, 380500, 282000, 226600, 233500, 404799, 451800, 424400, 493100, 397500, 337600, 157200, 242399, 421400, 403700, 397600, 239400, 416300, 441200, 354000, 354000, 315599, 151100, 269600, 255900, 270900, 422299, 488800, 240300, 376900, 318200, 302800, 262600, 238000, 277400, 122130, 405500, 455999, 353400, 287200, 269800, 292400, 290200, 357200, 417600, 519200, 544600, 318600, 345200] + }, + { + "label": "Min height width", + "values": [5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, 42910, 126039, 135736, 46100, 54920, 113880, 100220, 91860, 52140, 104500, 110480, 82230, 69120, 136490, 97950, 79780, 44390, 23330, 86870, 1469, 130450, 114629, 184720, 32180, 56400, 131980, 58430, 63240, 59330, 58640, 29810, 11790, 25690, 13330, 39900, 70460, 160410, 55770, 25179, 18490, 27650, 79830, 40630, 16900, 41369, 118770, -2760, 190000, 119920, 85020, 73980, 49120, 51200, 41940, 71030, 51970, 75200, 80390, 70520, 69910, 119636, 40720, -16800, 48360, 70910, 66170, 54730, 66650, 70930, 41940, 8919, -8201, 48240, 50080] + }, + { + "label": "Min width diameter", + "values": [98453, 319366, 234498, 455411, 391333, 147711, 479081, 208910, 124041, 344954, 280876, 501789, 368624, 98453, 429823, 234498, 170419, 391333, 258167, 479081, 319366, 124041, 455411, 280876, 147711, 368624, 315981, 203423, 170419, 318081, 237211, 321023, 258211, 260481, 341011, 429823, 273989, 296489, 285589, 302889, 235581, 214989, 388889, 392489, 334089, 432089, 423289, 358489, 235589, 244989, 223823, 229989, 389489, 262681, 219489, 226389, 312723, 344923, 401889, 464489, 387789, 283223, 254689, 233089, 397989, 370889, 374289, 256489, 409489, 410789, 294711, 380711, 203011, 280789, 288211, 234211, 284989, 353623, 479081, 143423, 399489, 313089, 249823, 282889, 172623, 287689, 170419, 325623, 389789, 348189, 299689, 275089, 215523, 226323, 377489, 412389, 416623, 497789, 309389, 340989] + }, + { + "label": "RF block", + "values": [1417, 23377, 3376, 33336, 5635, 10812, 6898, 21273, 2484, 35126, 5626, 51096, 7384, 22020, 18912, 52449, 7498, 87528, 11359, 107154, 9197, 18159, 13115, 41120, 4254, 53966, 17129, 14957, 12469, 12882, 19875, 23547, 16325, 15238, 15452, 31817, 18210, 16237, 13815, 24070, 14163, 10748, 16292, 12787, 19559, 10597, 34781, 25859, 23121, 7331, 19298, 17056, 18788, 12009, 8997, 9280, 10990, 9825, 13690, 14547, 15443, 14758, 22429, 9324, 13396, 10915, 12615, 13307, 16842, 12533, 11312, 29347, 2923, 28796, 42332, 12953, 14401, 16151, 23973, 4730, 21716, 13116, 13175, 15085, 8140, 14046, 15629, 13231, 5612, 14571, 14929, 12812, 9048, 10826, 20129, 17258, 12673, 11513, 12391, 14423] + } + ], + "sankeydata": { + "version": "1.0", + "encoding": "UTF-8", + "feed": { + "xmlns": "http://www.w3.org/2005/Atom", + "xmlns$openSearch": "http://a9.com/-/spec/opensearchrss/1.0/", + "xmlns$gsx": "http://schemas.google.com/spreadsheets/2006/extended", + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "drones_20140602" + }, + "link": [ + { + "rel": "alternate", + "type": "application/atom+xml", + "href": "https://docs.google.com/spreadsheets/d/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/pubhtml" + }, + { + "rel": "http://schemas.google.com/g/2005#feed", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values" + }, + { + "rel": "http://schemas.google.com/g/2005#post", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values" + }, + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values?alt=json-in-script" + } + ], + "author": [ + { + "name": { + "$t": "june15.washpost" + }, + "email": { + "$t": "june15.washpost@gmail.com" + } + } + ], + "openSearch$totalResults": { + "$t": "194" + }, + "openSearch$startIndex": { + "$t": "1" + }, + "entry": [ + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cokwr" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "1" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/11/2001, mishapyear: 2001, mishapcountry: Iraq, mishaplocation: near Basra, narrative: A Predator reconnaissance drone crashed in southern Iraq, near Basra, during a surveillance mission. Officials said it was unclear whether the aircraft was shot down by Iraqi forces or crashed because of mechanical problems. The drone had been based at Ali Al Salem Air Base in Kuwait. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 388, dronetype: RQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cokwr" + } + ], + "gsx$crashid": { + "$t": "1" + }, + "gsx$mishapdate": { + "$t": "9/11/2001" + }, + "gsx$mishapyear": { + "$t": "2001" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "near Basra" + }, + "gsx$narrative": { + "$t": "A Predator reconnaissance drone crashed in southern Iraq, near Basra, during a surveillance mission. Officials said it was unclear whether the aircraft was shot down by Iraqi forces or crashed because of mechanical problems. The drone had been based at Ali Al Salem Air Base in Kuwait. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "388" + }, + "gsx$dronetype": { + "$t": "RQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cpzh4" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "2" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/3/2001, mishapyear: 2001, mishapcountry: United States, mishaplocation: Holloman Air Force Base, N.M., narrative: An aerial target drone crashed 1.6 seconds after takeoff. The automatic flight control system commanded the aircraft to nose-dive immediately after takeoff because of erroneous inputs from the tri-axis rate gyro. Investigators concluded the accident was caused by the incorrect installation of the tri-axis rate gyro. The drone was being used as a target for a surface-to-air missile test., narrativelength: 389, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,101,749.00, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cpzh4" + } + ], + "gsx$crashid": { + "$t": "2" + }, + "gsx$mishapdate": { + "$t": "10/3/2001" + }, + "gsx$mishapyear": { + "$t": "2001" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Holloman Air Force Base, N.M." + }, + "gsx$narrative": { + "$t": "An aerial target drone crashed 1.6 seconds after takeoff. The automatic flight control system commanded the aircraft to nose-dive immediately after takeoff because of erroneous inputs from the tri-axis rate gyro. Investigators concluded the accident was caused by the incorrect installation of the tri-axis rate gyro. The drone was being used as a target for a surface-to-air missile test." + }, + "gsx$narrativelength": { + "$t": "389" + }, + "gsx$dronetype": { + "$t": "QF-4E" + }, + "gsx$dronename": { + "$t": "Phantom" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$1,101,749.00" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cre1l" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "3" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/10/2001, mishapyear: 2001, mishapcountry: Iraq, mishaplocation: southern Iraq, narrative: A Predator reconnaissance drone crashed during a surveillance mission in the no-fly zone over southern Iraq. it is unclear whether the aircraft was shot down or crashed because of mechanical failure. The drone was based at Ali Al Salem Air Base in Kuwait. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report. , narrativelength: 359, dronetype: RQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cre1l" + } + ], + "gsx$crashid": { + "$t": "3" + }, + "gsx$mishapdate": { + "$t": "10/10/2001" + }, + "gsx$mishapyear": { + "$t": "2001" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "southern Iraq" + }, + "gsx$narrative": { + "$t": "A Predator reconnaissance drone crashed during a surveillance mission in the no-fly zone over southern Iraq. it is unclear whether the aircraft was shot down or crashed because of mechanical failure. The drone was based at Ali Al Salem Air Base in Kuwait. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report. " + }, + "gsx$narrativelength": { + "$t": "359" + }, + "gsx$dronetype": { + "$t": "RQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/chk2m" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "4" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/25/2001, mishapyear: 2001, mishapcountry: United States, mishaplocation: Tyndall Air Force Base, Fla., narrative: An aerial target drone crashed 4,000 feet from the runway in a wooded area, leaving a scar in the ground 50 feet long and four feet deep. Firefighters allowed the blaze to burn for 26 hours until it extinguished itself. Investigators blamed the navigation system but also concluded that the pilot ordered the drone to climb too rapidly. The pilot told investigators he saw the drone as it \"leaped off the ground\" and thought to himself that \"this is not a good thing.\" , narrativelength: 469, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,523,469, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/chk2m" + } + ], + "gsx$crashid": { + "$t": "4" + }, + "gsx$mishapdate": { + "$t": "10/25/2001" + }, + "gsx$mishapyear": { + "$t": "2001" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Tyndall Air Force Base, Fla." + }, + "gsx$narrative": { + "$t": "An aerial target drone crashed 4,000 feet from the runway in a wooded area, leaving a scar in the ground 50 feet long and four feet deep. Firefighters allowed the blaze to burn for 26 hours until it extinguished itself. Investigators blamed the navigation system but also concluded that the pilot ordered the drone to climb too rapidly. The pilot told investigators he saw the drone as it \"leaped off the ground\" and thought to himself that \"this is not a good thing.\" " + }, + "gsx$narrativelength": { + "$t": "469" + }, + "gsx$dronetype": { + "$t": "QF-4E" + }, + "gsx$dronename": { + "$t": "Phantom" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$1,523,469" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ciyn3" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "5" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/3/2001, mishapyear: 2001, mishapcountry: Afghanistan, mishaplocation: eastern Afghanistan, narrative: A Predator reconnaissance drone crashed in eastern Afghanistan, marking the first drone crash in the Afghanistan war. Pentagon officials said bad weather and icing were the probable cause. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 291, dronetype: RQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ciyn3" + } + ], + "gsx$crashid": { + "$t": "5" + }, + "gsx$mishapdate": { + "$t": "11/3/2001" + }, + "gsx$mishapyear": { + "$t": "2001" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "eastern Afghanistan" + }, + "gsx$narrative": { + "$t": "A Predator reconnaissance drone crashed in eastern Afghanistan, marking the first drone crash in the Afghanistan war. Pentagon officials said bad weather and icing were the probable cause. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "291" + }, + "gsx$dronetype": { + "$t": "RQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ckd7g" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "6" + }, + "content": { + "type": "text", + "$t": "mishapdate: 12/30/2001, mishapyear: 2001, mishapcountry: United Arab Emirates, mishaplocation: about 80 miles south of al-Dhafra Air Base, narrative: A Global Hawk crashed in a desert while returning to base in the United Arab Emirates after an aborted surveillance flight over Afghanistan. Investigators concluded the cause was structural failure of the right V-tail and ruddervator. An control rod in the ruddervator failed because of metal fatigue after it came in contact with an improperly installed bolt. , narrativelength: 361, dronetype: RQ-4A, dronename: Global Hawk, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $40,600,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ckd7g" + } + ], + "gsx$crashid": { + "$t": "6" + }, + "gsx$mishapdate": { + "$t": "12/30/2001" + }, + "gsx$mishapyear": { + "$t": "2001" + }, + "gsx$mishapcountry": { + "$t": "United Arab Emirates" + }, + "gsx$mishaplocation": { + "$t": "about 80 miles south of al-Dhafra Air Base" + }, + "gsx$narrative": { + "$t": "A Global Hawk crashed in a desert while returning to base in the United Arab Emirates after an aborted surveillance flight over Afghanistan. Investigators concluded the cause was structural failure of the right V-tail and ruddervator. An control rod in the ruddervator failed because of metal fatigue after it came in contact with an improperly installed bolt. " + }, + "gsx$narrativelength": { + "$t": "361" + }, + "gsx$dronetype": { + "$t": "RQ-4A" + }, + "gsx$dronename": { + "$t": "Global Hawk" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$40,600,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/clrrx" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "7" + }, + "content": { + "type": "text", + "$t": "mishapdate: 1/22/2002, mishapyear: 2002, mishapcountry: Pakistan, mishaplocation: 9 nautical miles from end of a runway at a classified location, narrative: A Predator on a surveillance mission crashed after its engine failed and the aircraft went into an uncommanded dive. Investigators determined the cause was pilot error; the crew failed to follow proper procedures during a lost link when handing off control to another ground-control station. An investigative report states that the Predator was based at a classified location, but Pentagon officials said at the time that the drone crashed in Pakistan., narrativelength: 452, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,251,400" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/clrrx" + } + ], + "gsx$crashid": { + "$t": "7" + }, + "gsx$mishapdate": { + "$t": "1/22/2002" + }, + "gsx$mishapyear": { + "$t": "2002" + }, + "gsx$mishapcountry": { + "$t": "Pakistan" + }, + "gsx$mishaplocation": { + "$t": "9 nautical miles from end of a runway at a classified location" + }, + "gsx$narrative": { + "$t": "A Predator on a surveillance mission crashed after its engine failed and the aircraft went into an uncommanded dive. Investigators determined the cause was pilot error; the crew failed to follow proper procedures during a lost link when handing off control to another ground-control station. An investigative report states that the Predator was based at a classified location, but Pentagon officials said at the time that the drone crashed in Pakistan." + }, + "gsx$narrativelength": { + "$t": "452" + }, + "gsx$dronetype": { + "$t": "RQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,251,400" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cyevm" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "8" + }, + "content": { + "type": "text", + "$t": "mishapdate: 1/25/2002, mishapyear: 2002, mishapcountry: Pakistan, mishaplocation: a runway at an undisclosed air base, narrative: A Predator crashed during a landing attempt after returning early from a surveillance mission over Afghanistan because of fluctuating oil pressure. At the time, Pentagon officials said the drone crashed in Afghanistan, but the Air Force accident investigation report indicates the location was in Pakistan. The report states the drone flew into Afghanistan from a country with a time zone matching Pakistan's. The drone bounced on the runway and crashed near tents that housed U.S. troops. The Predator had been searching for a \"high-ranking\" enemy leader in Afghanistan, according to the report., narrativelength: 596, dronetype: RQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,142,700" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cyevm" + } + ], + "gsx$crashid": { + "$t": "8" + }, + "gsx$mishapdate": { + "$t": "1/25/2002" + }, + "gsx$mishapyear": { + "$t": "2002" + }, + "gsx$mishapcountry": { + "$t": "Pakistan" + }, + "gsx$mishaplocation": { + "$t": "a runway at an undisclosed air base" + }, + "gsx$narrative": { + "$t": "A Predator crashed during a landing attempt after returning early from a surveillance mission over Afghanistan because of fluctuating oil pressure. At the time, Pentagon officials said the drone crashed in Afghanistan, but the Air Force accident investigation report indicates the location was in Pakistan. The report states the drone flew into Afghanistan from a country with a time zone matching Pakistan's. The drone bounced on the runway and crashed near tents that housed U.S. troops. The Predator had been searching for a \"high-ranking\" enemy leader in Afghanistan, according to the report." + }, + "gsx$narrativelength": { + "$t": "596" + }, + "gsx$dronetype": { + "$t": "RQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,142,700" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cztg3" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "9" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/17/2002, mishapyear: 2002, mishapcountry: Pakistan, mishaplocation: Karim Bakhsh, a village 15 miles northeast of Jacobabad Air Base, narrative: A Predator crashed near a Pakistani village after the pilot lost control and the aircraft went into an inverted spin. The Air Force accident investigation report conceals the location, but U.S. military officials announced at the time that the site was in Pakistan. Pakistani officials said the drone had departed from the Jacobabad air base. An Air Force investigation determined the cause was the improper assembly of a control servo by the manufacturer., narrativelength: 456, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,342,700" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cztg3" + } + ], + "gsx$crashid": { + "$t": "9" + }, + "gsx$mishapdate": { + "$t": "5/17/2002" + }, + "gsx$mishapyear": { + "$t": "2002" + }, + "gsx$mishapcountry": { + "$t": "Pakistan" + }, + "gsx$mishaplocation": { + "$t": "Karim Bakhsh, a village 15 miles northeast of Jacobabad Air Base" + }, + "gsx$narrative": { + "$t": "A Predator crashed near a Pakistani village after the pilot lost control and the aircraft went into an inverted spin. The Air Force accident investigation report conceals the location, but U.S. military officials announced at the time that the site was in Pakistan. Pakistani officials said the drone had departed from the Jacobabad air base. An Air Force investigation determined the cause was the improper assembly of a control servo by the manufacturer." + }, + "gsx$narrativelength": { + "$t": "456" + }, + "gsx$dronetype": { + "$t": "RQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,342,700" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d180g" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "10" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/25/2002, mishapyear: 2002, mishapcountry: Kuwait, mishaplocation: 6 nautical miles north of Ali Al Salem Air Base, narrative: A Predator crashed while trying to return to Kuwait after a surveillance mission over southern Iraq. Air Force investigators determined the cause was a broken cylinder rocker arm, which resulted in engine failure. The drone lost its link shortly before it crashed six miles from Ali Al Salem Air Base., narrativelength: 301, dronetype: RQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,480,500" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d180g" + } + ], + "gsx$crashid": { + "$t": "10" + }, + "gsx$mishapdate": { + "$t": "5/25/2002" + }, + "gsx$mishapyear": { + "$t": "2002" + }, + "gsx$mishapcountry": { + "$t": "Kuwait" + }, + "gsx$mishaplocation": { + "$t": "6 nautical miles north of Ali Al Salem Air Base" + }, + "gsx$narrative": { + "$t": "A Predator crashed while trying to return to Kuwait after a surveillance mission over southern Iraq. Air Force investigators determined the cause was a broken cylinder rocker arm, which resulted in engine failure. The drone lost its link shortly before it crashed six miles from Ali Al Salem Air Base." + }, + "gsx$narrativelength": { + "$t": "301" + }, + "gsx$dronetype": { + "$t": "RQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$1,480,500" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d2mkx" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "11" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/10/2002, mishapyear: 2002, mishapcountry: Pakistan, narrative: A Global Hawk experienced engine failure because of fuel problems and crashed while trying to return to a base in Pakistan. Investigators determined the engine failed because a fuel nozzle was stuck in a high-flow position. The Air Force accident investigation report conceals the site of the crash, but U.S. military officials told reporters at the time that the Global Hawk was housed at the Shamsi air base in Pakistan., narrativelength: 422, dronetype: RQ-4A, dronename: Global Hawk, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $40,600,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d2mkx" + } + ], + "gsx$crashid": { + "$t": "11" + }, + "gsx$mishapdate": { + "$t": "7/10/2002" + }, + "gsx$mishapyear": { + "$t": "2002" + }, + "gsx$mishapcountry": { + "$t": "Pakistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Global Hawk experienced engine failure because of fuel problems and crashed while trying to return to a base in Pakistan. Investigators determined the engine failed because a fuel nozzle was stuck in a high-flow position. The Air Force accident investigation report conceals the site of the crash, but U.S. military officials told reporters at the time that the Global Hawk was housed at the Shamsi air base in Pakistan." + }, + "gsx$narrativelength": { + "$t": "422" + }, + "gsx$dronetype": { + "$t": "RQ-4A" + }, + "gsx$dronename": { + "$t": "Global Hawk" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$40,600,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cssly" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "12" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/17/2002, mishapyear: 2002, mishapcountry: Afghanistan, mishaplocation: about 35 km southwest of Khost, narrative: A Predator crashed in a mountainous area after the pilot unintentionally flew it through storm clouds. The drone lost its satellite links. Investigators concluded it was probably struck by lightning. Two weather forecasters and a sensor operator had warned against flying in the area, because of the risk of bad weather, but were overruled by the pilot. U.S. Army ground troops recovered part of the wreckage, but investigators suspect that Afghan residents took the remainder., narrativelength: 477, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cssly" + } + ], + "gsx$crashid": { + "$t": "12" + }, + "gsx$mishapdate": { + "$t": "9/17/2002" + }, + "gsx$mishapyear": { + "$t": "2002" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "about 35 km southwest of Khost" + }, + "gsx$narrative": { + "$t": "A Predator crashed in a mountainous area after the pilot unintentionally flew it through storm clouds. The drone lost its satellite links. Investigators concluded it was probably struck by lightning. Two weather forecasters and a sensor operator had warned against flying in the area, because of the risk of bad weather, but were overruled by the pilot. U.S. Army ground troops recovered part of the wreckage, but investigators suspect that Afghan residents took the remainder." + }, + "gsx$narrativelength": { + "$t": "477" + }, + "gsx$dronetype": { + "$t": "RQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cu76f" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "13" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/25/2002, mishapyear: 2002, mishapcountry: United States, mishaplocation: 9 nautical miles west of Indian Springs Air Force Auxiliary Field, Nev., narrative: A Predator on a training mission crashed into a Nevada mountain after the crew lost its control link. Air Force investigators blamed inattention on the part of the crew, finding that it was distracted by other tasks. \"As soon as we regained line-of-sight, of course we saw the mountain in our path,\" one crew member testified. \"We knew that at that point it was almost unrecoverable.\", narrativelength: 384, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,300,000, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cu76f" + } + ], + "gsx$crashid": { + "$t": "13" + }, + "gsx$mishapdate": { + "$t": "10/25/2002" + }, + "gsx$mishapyear": { + "$t": "2002" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "9 nautical miles west of Indian Springs Air Force Auxiliary Field, Nev." + }, + "gsx$narrative": { + "$t": "A Predator on a training mission crashed into a Nevada mountain after the crew lost its control link. Air Force investigators blamed inattention on the part of the crew, finding that it was distracted by other tasks. \"As soon as we regained line-of-sight, of course we saw the mountain in our path,\" one crew member testified. \"We knew that at that point it was almost unrecoverable.\"" + }, + "gsx$narrativelength": { + "$t": "384" + }, + "gsx$dronetype": { + "$t": "RQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,300,000" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cvlqs" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "14" + }, + "content": { + "type": "text", + "$t": "mishapdate: 1/1/2003, mishapyear: 2003, mishapcountry: Pakistan, mishaplocation: Bashir Khan Jikhrani, a village a few miles northeast of Jacobabad air base, narrative: Eight minutes after takeoff, a Predator's engine seized because of an oil leak and the aircraft crashed near a Pakistani village. Air Force investigators determined the cause was the total loss of oil and an engine fire due to poor maintenance. O-ring fragments were found lodged in the crankcase. The investigative report conceals the crash location. But Pakistani officials told reporters at the time that the Predator crashed a few miles from the Jacobabad air base., narrativelength: 469, dronetype: RQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,200,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cvlqs" + } + ], + "gsx$crashid": { + "$t": "14" + }, + "gsx$mishapdate": { + "$t": "1/1/2003" + }, + "gsx$mishapyear": { + "$t": "2003" + }, + "gsx$mishapcountry": { + "$t": "Pakistan" + }, + "gsx$mishaplocation": { + "$t": "Bashir Khan Jikhrani, a village a few miles northeast of Jacobabad air base" + }, + "gsx$narrative": { + "$t": "Eight minutes after takeoff, a Predator's engine seized because of an oil leak and the aircraft crashed near a Pakistani village. Air Force investigators determined the cause was the total loss of oil and an engine fire due to poor maintenance. O-ring fragments were found lodged in the crankcase. The investigative report conceals the crash location. But Pakistani officials told reporters at the time that the Predator crashed a few miles from the Jacobabad air base." + }, + "gsx$narrativelength": { + "$t": "469" + }, + "gsx$dronetype": { + "$t": "RQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,200,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cx0b9" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "15" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2/11/2003, mishapyear: 2003, mishapcountry: United States, mishaplocation: 16 miles southwest of Holloman Air Force Base, on the confines of White Sands National Monument, NM, narrative: An aerial target drone crashes near White Sands National Monument after an uncommanded nosedive during a live-fire missile test. Investigators blamed a \"spurious electrical input\" but could not pinpoint the cause of the problem., narrativelength: 228, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cx0b9" + } + ], + "gsx$crashid": { + "$t": "15" + }, + "gsx$mishapdate": { + "$t": "2/11/2003" + }, + "gsx$mishapyear": { + "$t": "2003" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "16 miles southwest of Holloman Air Force Base, on the confines of White Sands National Monument, NM" + }, + "gsx$narrative": { + "$t": "An aerial target drone crashes near White Sands National Monument after an uncommanded nosedive during a live-fire missile test. Investigators blamed a \"spurious electrical input\" but could not pinpoint the cause of the problem." + }, + "gsx$narrativelength": { + "$t": "228" + }, + "gsx$dronetype": { + "$t": "QF-4E" + }, + "gsx$dronename": { + "$t": "Phantom" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d9ney" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "16" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/22/2003, mishapyear: 2003, mishapcountry: United States, mishaplocation: about 13 miles northwest of Holloman Air Force Base on the confines of the White Sands Missile Range, NM, narrative: An aerial target drone was intentionally blown up in midair by its crew when it lost link shortly after takeoff. The aircraft landed in two major pieces, burning a mile apart in the White Sands Missile Range. Investigators determined the cause of the lost link was a dual failure of the command telemetry system., narrativelength: 312, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $880,000, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d9ney" + } + ], + "gsx$crashid": { + "$t": "16" + }, + "gsx$mishapdate": { + "$t": "5/22/2003" + }, + "gsx$mishapyear": { + "$t": "2003" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "about 13 miles northwest of Holloman Air Force Base on the confines of the White Sands Missile Range, NM" + }, + "gsx$narrative": { + "$t": "An aerial target drone was intentionally blown up in midair by its crew when it lost link shortly after takeoff. The aircraft landed in two major pieces, burning a mile apart in the White Sands Missile Range. Investigators determined the cause of the lost link was a dual failure of the command telemetry system." + }, + "gsx$narrativelength": { + "$t": "312" + }, + "gsx$dronetype": { + "$t": "QF-4E" + }, + "gsx$dronename": { + "$t": "Phantom" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$880,000" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/db1zf" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "17" + }, + "content": { + "type": "text", + "$t": "mishapdate: 12/11/2003, mishapyear: 2003, mishapcountry: Afghanistan, mishaplocation: in a classified location, somewhere in a desert, narrative: A Predator crashed in the Afghanistan desert after a lost link. Investigators said the inexperienced pilot misinterpreted an icing warning, disengaged the autopilot and then gave an overly aggressive command to climb, triggering the lost link. The pilot's \"inexperience with the [aircraft] was magnified by his limited experience flying without the assistance of the autopilot system,\" the report stated., narrativelength: 404, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,300,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/db1zf" + } + ], + "gsx$crashid": { + "$t": "17" + }, + "gsx$mishapdate": { + "$t": "12/11/2003" + }, + "gsx$mishapyear": { + "$t": "2003" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "in a classified location, somewhere in a desert" + }, + "gsx$narrative": { + "$t": "A Predator crashed in the Afghanistan desert after a lost link. Investigators said the inexperienced pilot misinterpreted an icing warning, disengaged the autopilot and then gave an overly aggressive command to climb, triggering the lost link. The pilot's \"inexperience with the [aircraft] was magnified by his limited experience flying without the assistance of the autopilot system,\" the report stated." + }, + "gsx$narrativelength": { + "$t": "404" + }, + "gsx$dronetype": { + "$t": "RQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,300,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dcgjs" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "18" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2004 - specific date classified, mishapyear: 2004, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dcgjs" + } + ], + "gsx$crashid": { + "$t": "18" + }, + "gsx$mishapdate": { + "$t": "2004 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2004" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "215" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ddv49" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "19" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2004 - specific date classified, mishapyear: 2004, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ddv49" + } + ], + "gsx$crashid": { + "$t": "19" + }, + "gsx$mishapdate": { + "$t": "2004 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2004" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "215" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d415a" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "20" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/10/2004, mishapyear: 2004, mishapcountry: United States, mishaplocation: Florida, narrative: An Army Hunter drone crashed into trees after it lost its link from its ground-control station, according to Army safety officials. The Army's Forces Command said it did not conduct a publicly releasable investigation., narrativelength: 218, dronetype: RQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d415a" + } + ], + "gsx$crashid": { + "$t": "20" + }, + "gsx$mishapdate": { + "$t": "5/10/2004" + }, + "gsx$mishapyear": { + "$t": "2004" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Florida" + }, + "gsx$narrative": { + "$t": "An Army Hunter drone crashed into trees after it lost its link from its ground-control station, according to Army safety officials. The Army's Forces Command said it did not conduct a publicly releasable investigation." + }, + "gsx$narrativelength": { + "$t": "218" + }, + "gsx$dronetype": { + "$t": "RQ-5A" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d5fpr" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "21" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/14/2004, mishapyear: 2004, mishapcountry: United States, mishaplocation: Indian Springs Auxiliary Field, Nev., narrative: A Predator with the call sign DEADLY01 crashed after a student pilot botched a landing exercise. Air Force investigators said that the pilot and his instructor aligned poorly for landing and that the crew did not request updated information about gusty conditions. The operations director for the 11th Reconnaissance Squadron had ordered extra training after a series of \"tail-scrape\" incidents in the weeks before. , narrativelength: 416, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,200,000, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d5fpr" + } + ], + "gsx$crashid": { + "$t": "21" + }, + "gsx$mishapdate": { + "$t": "6/14/2004" + }, + "gsx$mishapyear": { + "$t": "2004" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Indian Springs Auxiliary Field, Nev." + }, + "gsx$narrative": { + "$t": "A Predator with the call sign DEADLY01 crashed after a student pilot botched a landing exercise. Air Force investigators said that the pilot and his instructor aligned poorly for landing and that the crew did not request updated information about gusty conditions. The operations director for the 11th Reconnaissance Squadron had ordered extra training after a series of \"tail-scrape\" incidents in the weeks before. " + }, + "gsx$narrativelength": { + "$t": "416" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,200,000" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d6ua4" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "22" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/17/2004, mishapyear: 2004, mishapcountry: Iraq, mishaplocation: 10 miles north of Balad Air Base, narrative: An armed Predator burned and broke apart in midair after its engine caught fire. It was the first Class A accident involving a Predator in Iraq since the U.S.-led invastion a year earlier. Investigators determined the fire started in the engine compartment because of a poorly routed oil supply line., narrativelength: 300, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,288,000, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d6ua4" + } + ], + "gsx$crashid": { + "$t": "22" + }, + "gsx$mishapdate": { + "$t": "8/17/2004" + }, + "gsx$mishapyear": { + "$t": "2004" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "10 miles north of Balad Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator burned and broke apart in midair after its engine caught fire. It was the first Class A accident involving a Predator in Iraq since the U.S.-led invastion a year earlier. Investigators determined the fire started in the engine compartment because of a poorly routed oil supply line." + }, + "gsx$narrativelength": { + "$t": "300" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,288,000" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d88ul" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "23" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/8/2004, mishapyear: 2004, mishapcountry: United States, mishaplocation: 17 miles northwest of Holloman Air Force Base, White Sands Missile Range, NM, narrative: An aerial target drone was blown up in midflight by controllers after it departed from its planned flight path and did not respond to directions. The aircraft exploded over the White Sands Missile Range. The drone was supposed to be used as target practice for F-22 fighter jets., narrativelength: 279, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,506,500" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d88ul" + } + ], + "gsx$crashid": { + "$t": "23" + }, + "gsx$mishapdate": { + "$t": "9/8/2004" + }, + "gsx$mishapyear": { + "$t": "2004" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "17 miles northwest of Holloman Air Force Base, White Sands Missile Range, NM" + }, + "gsx$narrative": { + "$t": "An aerial target drone was blown up in midflight by controllers after it departed from its planned flight path and did not respond to directions. The aircraft exploded over the White Sands Missile Range. The drone was supposed to be used as target practice for F-22 fighter jets." + }, + "gsx$narrativelength": { + "$t": "279" + }, + "gsx$dronetype": { + "$t": "QF-4E" + }, + "gsx$dronename": { + "$t": "Phantom" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$1,506,500" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dkvya" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "24" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/22/2004, mishapyear: 2004, mishapcountry: United States, mishaplocation: Indian Springs Auxiliary Field, Nev., narrative: A Predator experienced a hard landing and nearly skidded off the runway. Investigators said the pilot reacted poorly because he was isolated in his ground-control station and could not feel the aircraft bumping on the runway or hear the scraping sounds of damaged landing gear., narrativelength: 277, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,883,977" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dkvya" + } + ], + "gsx$crashid": { + "$t": "24" + }, + "gsx$mishapdate": { + "$t": "9/22/2004" + }, + "gsx$mishapyear": { + "$t": "2004" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Indian Springs Auxiliary Field, Nev." + }, + "gsx$narrative": { + "$t": "A Predator experienced a hard landing and nearly skidded off the runway. Investigators said the pilot reacted poorly because he was isolated in his ground-control station and could not feel the aircraft bumping on the runway or hear the scraping sounds of damaged landing gear." + }, + "gsx$narrativelength": { + "$t": "277" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$2,883,977" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dmair" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "25" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/13/2004, mishapyear: 2004, mishapcountry: United States, mishaplocation: Palmdale, Calif., narrative: A brand-new Predator crashed after it hit the runway nose-first. The front of the aircraft was sheared off. Air Force investigators blamed the student pilot but also criticized the instructor for not intervening and a contractor for not providing appropriate classroom training., narrativelength: 278, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,721,973" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dmair" + } + ], + "gsx$crashid": { + "$t": "25" + }, + "gsx$mishapdate": { + "$t": "10/13/2004" + }, + "gsx$mishapyear": { + "$t": "2004" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Palmdale, Calif." + }, + "gsx$narrative": { + "$t": "A brand-new Predator crashed after it hit the runway nose-first. The front of the aircraft was sheared off. Air Force investigators blamed the student pilot but also criticized the instructor for not intervening and a contractor for not providing appropriate classroom training." + }, + "gsx$narrativelength": { + "$t": "278" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$1,721,973" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dnp34" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "26" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/24/2004, mishapyear: 2004, mishapcountry: Pakistan, mishaplocation: in a classified location, narrative: A brand-new Predator crashed 300 feet short of the runway while attempting to land during a functional flight check. The Air Force accident investigation report classified the location of the base but reported the local time of the incident as being in the same time zone as Pakistan. Investigators blamed pilot error and found there was minimal supervision of flight operations. The pilot was a civilian contractor employed by General Atomics., narrativelength: 444, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,555,536" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dnp34" + } + ], + "gsx$crashid": { + "$t": "26" + }, + "gsx$mishapdate": { + "$t": "11/24/2004" + }, + "gsx$mishapyear": { + "$t": "2004" + }, + "gsx$mishapcountry": { + "$t": "Pakistan" + }, + "gsx$mishaplocation": { + "$t": "in a classified location" + }, + "gsx$narrative": { + "$t": "A brand-new Predator crashed 300 feet short of the runway while attempting to land during a functional flight check. The Air Force accident investigation report classified the location of the base but reported the local time of the incident as being in the same time zone as Pakistan. Investigators blamed pilot error and found there was minimal supervision of flight operations. The pilot was a civilian contractor employed by General Atomics." + }, + "gsx$narrativelength": { + "$t": "444" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,555,536" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dp3nl" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "27" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2005 - specific date classified, mishapyear: 2005, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dp3nl" + } + ], + "gsx$crashid": { + "$t": "27" + }, + "gsx$mishapdate": { + "$t": "2005 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2005" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "215" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/df9om" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "28" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2005 - specific date classified, mishapyear: 2005, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/df9om" + } + ], + "gsx$crashid": { + "$t": "28" + }, + "gsx$mishapdate": { + "$t": "2005 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2005" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "215" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dgo93" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "29" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2005 - specific date classified, mishapyear: 2005, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dgo93" + } + ], + "gsx$crashid": { + "$t": "29" + }, + "gsx$mishapdate": { + "$t": "2005 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2005" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "215" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/di2tg" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "30" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2005 - specific date classified, mishapyear: 2005, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/di2tg" + } + ], + "gsx$crashid": { + "$t": "30" + }, + "gsx$mishapdate": { + "$t": "2005 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2005" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "215" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/djhdx" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "31" + }, + "content": { + "type": "text", + "$t": "mishapdate: 1/14/2005, mishapyear: 2005, mishapcountry: Afghanistan, mishaplocation: in a location withheld by the U.S. military, narrative: A Predator crashed in Afghanistan after it lost its links to a ground-control station. The aircraft flew a programmed lost-link pattern for 12 hours but eventually ran out of fuel. The pilot, on loan from the British Royal Air Force, was \"distracted\" and bungled a reboot of the ground-control station while trying to reestablish the communications links. The U.S. Air Force investigation report found he was \"marginally prepared to fly unsupervised during an operational mission.\" The report classified the location of the base, but there are indications it was in Pakistan., narrativelength: 575, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,579,320" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/djhdx" + } + ], + "gsx$crashid": { + "$t": "31" + }, + "gsx$mishapdate": { + "$t": "1/14/2005" + }, + "gsx$mishapyear": { + "$t": "2005" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "in a location withheld by the U.S. military" + }, + "gsx$narrative": { + "$t": "A Predator crashed in Afghanistan after it lost its links to a ground-control station. The aircraft flew a programmed lost-link pattern for 12 hours but eventually ran out of fuel. The pilot, on loan from the British Royal Air Force, was \"distracted\" and bungled a reboot of the ground-control station while trying to reestablish the communications links. The U.S. Air Force investigation report found he was \"marginally prepared to fly unsupervised during an operational mission.\" The report classified the location of the base, but there are indications it was in Pakistan." + }, + "gsx$narrativelength": { + "$t": "575" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,579,320" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dw4je" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "32" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/23/2005, mishapyear: 2005, mishapcountry: Iraq, mishaplocation: west Mosul, narrative: An Army IGNAT surveillance drone was flying about 6,000 feet above ground level when it lost its data link with the ground-control station, entered an inverted spin and crashed. A Freedom of Information Act request filed in October 2013 for the Army's accident investigation report is pending. A military incident report published by WikiLeaks stated that ground troops recovered the wreckage and brought it back to Forward Operating Base Marez., narrativelength: 445, dronetype: RQ-1L, dronename: IGNAT, ownerservice: Army, ownerservicedupe: Army, damageestimate: $1,000,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dw4je" + } + ], + "gsx$crashid": { + "$t": "32" + }, + "gsx$mishapdate": { + "$t": "3/23/2005" + }, + "gsx$mishapyear": { + "$t": "2005" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "west Mosul" + }, + "gsx$narrative": { + "$t": "An Army IGNAT surveillance drone was flying about 6,000 feet above ground level when it lost its data link with the ground-control station, entered an inverted spin and crashed. A Freedom of Information Act request filed in October 2013 for the Army's accident investigation report is pending. A military incident report published by WikiLeaks stated that ground troops recovered the wreckage and brought it back to Forward Operating Base Marez." + }, + "gsx$narrativelength": { + "$t": "445" + }, + "gsx$dronetype": { + "$t": "RQ-1L" + }, + "gsx$dronename": { + "$t": "IGNAT" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "$1,000,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dxj3v" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "33" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/27/2005, mishapyear: 2005, mishapcountry: Iraq, mishaplocation: 10 miles north of Balad Air Base, narrative: An armed Predator broke apart midair after a fuel leak in the engine compartment caused a catastrophic engine fire. An investigation noted that the Predator had fuel and oil lines made of rubber instead of braided metal., narrativelength: 220, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,792,200, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dxj3v" + } + ], + "gsx$crashid": { + "$t": "33" + }, + "gsx$mishapdate": { + "$t": "3/27/2005" + }, + "gsx$mishapyear": { + "$t": "2005" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "10 miles north of Balad Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator broke apart midair after a fuel leak in the engine compartment caused a catastrophic engine fire. An investigation noted that the Predator had fuel and oil lines made of rubber instead of braided metal." + }, + "gsx$narrativelength": { + "$t": "220" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,792,200" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dyxo8" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "34" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/30/2005, mishapyear: 2005, mishapcountry: Iraq, mishaplocation: Rawah, narrative: An armed Predator lost altitude and crashed. The pilot tried to make an emergency landing on a road but said he had to turn away at the last second \"to avoid endangering persons on the ground\" after seeing a car 200 feet below. The drone and its Hellfire missiles crashed on the desert floor. Investigators determined that the pilot bearing that encases the propeller shaft failed, but they could not figure out why., narrativelength: 416, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,359,991" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dyxo8" + } + ], + "gsx$crashid": { + "$t": "34" + }, + "gsx$mishapdate": { + "$t": "3/30/2005" + }, + "gsx$mishapyear": { + "$t": "2005" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "Rawah" + }, + "gsx$narrative": { + "$t": "An armed Predator lost altitude and crashed. The pilot tried to make an emergency landing on a road but said he had to turn away at the last second \"to avoid endangering persons on the ground\" after seeing a car 200 feet below. The drone and its Hellfire missiles crashed on the desert floor. Investigators determined that the pilot bearing that encases the propeller shaft failed, but they could not figure out why." + }, + "gsx$narrativelength": { + "$t": "416" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,359,991" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e0c8p" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "35" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/8/2005, mishapyear: 2005, mishapcountry: Iraq, mishaplocation: Balad Air Base, narrative: A Predator departed a runway and was substantially damaged. The Air Force did not conduct a publicly releasable investigation., narrativelength: 126, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e0c8p" + } + ], + "gsx$crashid": { + "$t": "35" + }, + "gsx$mishapdate": { + "$t": "6/8/2005" + }, + "gsx$mishapyear": { + "$t": "2005" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "Balad Air Base" + }, + "gsx$narrative": { + "$t": "A Predator departed a runway and was substantially damaged. The Air Force did not conduct a publicly releasable investigation." + }, + "gsx$narrativelength": { + "$t": "126" + }, + "gsx$dronetype": { + "$t": "RQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dqi9q" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "36" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/29/2005, mishapyear: 2005, mishapcountry: Afghanistan, mishaplocation: Kunar province, near Pakistani border, narrative: An unarmed Predator crashed during a search for a downed helicopter in Afghanistan's Kunar province. Air Force officials later described the crash as a \"combat loss\" but withheld details about the cause. The Air Force did not conduct a publicly releasable investigation., narrativelength: 270, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dqi9q" + } + ], + "gsx$crashid": { + "$t": "36" + }, + "gsx$mishapdate": { + "$t": "6/29/2005" + }, + "gsx$mishapyear": { + "$t": "2005" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "Kunar province, near Pakistani border" + }, + "gsx$narrative": { + "$t": "An unarmed Predator crashed during a search for a downed helicopter in Afghanistan's Kunar province. Air Force officials later described the crash as a \"combat loss\" but withheld details about the cause. The Air Force did not conduct a publicly releasable investigation." + }, + "gsx$narrativelength": { + "$t": "270" + }, + "gsx$dronetype": { + "$t": "RQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/drwu7" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "37" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/21/2005, mishapyear: 2005, mishapcountry: United States, mishaplocation: Palmdale, Calif., narrative: A Reaper on a training flight crashed just short of the runway. Air Force investigators concluded the cause was pilot error, finding that an instructor pilot failed to control the aircraft's glidepath, aimpoint and airspeed and was too late to execute a go-around. Investigators cited some traits about the Reaper that made it noticeably more challenging to fly consistent approaches and landings compared to the Predator. \"Given the inherent difficulties in landing any remotely piloted aircraft from a ground-control station without 'seat of the pants' and other sensory cues, these undesirable MQ-9A characteristics further complicate the approach and landing task,\" the report concluded., narrativelength: 691, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $6,796,497" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/drwu7" + } + ], + "gsx$crashid": { + "$t": "37" + }, + "gsx$mishapdate": { + "$t": "10/21/2005" + }, + "gsx$mishapyear": { + "$t": "2005" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Palmdale, Calif." + }, + "gsx$narrative": { + "$t": "A Reaper on a training flight crashed just short of the runway. Air Force investigators concluded the cause was pilot error, finding that an instructor pilot failed to control the aircraft's glidepath, aimpoint and airspeed and was too late to execute a go-around. Investigators cited some traits about the Reaper that made it noticeably more challenging to fly consistent approaches and landings compared to the Predator. \"Given the inherent difficulties in landing any remotely piloted aircraft from a ground-control station without 'seat of the pants' and other sensory cues, these undesirable MQ-9A characteristics further complicate the approach and landing task,\" the report concluded." + }, + "gsx$narrativelength": { + "$t": "691" + }, + "gsx$dronetype": { + "$t": "MQ-9A" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$6,796,497" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dtbek" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "38" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/1/2005, mishapyear: 2005, mishapcountry: United States, mishaplocation: 1.5 miles northeast of McNeal, Ariz., narrative: An Army Hunter crashed near McNeal, Ariz., after a reported engine failure during flight, according to Army safety officials. The Army Materiel Command, which owned the drone, said it did not conduct a publicly releasable investigation., narrativelength: 236, dronetype: RQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: $1,288,861" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dtbek" + } + ], + "gsx$crashid": { + "$t": "38" + }, + "gsx$mishapdate": { + "$t": "11/1/2005" + }, + "gsx$mishapyear": { + "$t": "2005" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "1.5 miles northeast of McNeal, Ariz." + }, + "gsx$narrative": { + "$t": "An Army Hunter crashed near McNeal, Ariz., after a reported engine failure during flight, according to Army safety officials. The Army Materiel Command, which owned the drone, said it did not conduct a publicly releasable investigation." + }, + "gsx$narrativelength": { + "$t": "236" + }, + "gsx$dronetype": { + "$t": "RQ-5A" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "$1,288,861" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dupz1" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "39" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2006 - specific date classified, mishapyear: 2006, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dupz1" + } + ], + "gsx$crashid": { + "$t": "39" + }, + "gsx$mishapdate": { + "$t": "2006 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2006" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "215" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e7d2q" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "40" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2006 - specific date classified, mishapyear: 2006, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e7d2q" + } + ], + "gsx$crashid": { + "$t": "40" + }, + "gsx$mishapdate": { + "$t": "2006 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2006" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "215" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e8rn7" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "41" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2/1/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: Nevada, narrative: A Predator crashed after departure from Creech Air Force Base. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 165, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e8rn7" + } + ], + "gsx$crashid": { + "$t": "41" + }, + "gsx$mishapdate": { + "$t": "2/1/2006" + }, + "gsx$mishapyear": { + "$t": "2006" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Nevada" + }, + "gsx$narrative": { + "$t": "A Predator crashed after departure from Creech Air Force Base. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "165" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ea67k" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "42" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2/5/2006, mishapyear: 2006, mishapcountry: Iraq, narrative: An Army IGNAT surveillance drone crashed after an engine failure and burned after crashing on the ground. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 240, dronetype: RQ-1L, dronename: IGNAT, ownerservice: Army, ownerservicedupe: Army, damageestimate: $1,000,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ea67k" + } + ], + "gsx$crashid": { + "$t": "42" + }, + "gsx$mishapdate": { + "$t": "2/5/2006" + }, + "gsx$mishapyear": { + "$t": "2006" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "An Army IGNAT surveillance drone crashed after an engine failure and burned after crashing on the ground. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " + }, + "gsx$narrativelength": { + "$t": "240" + }, + "gsx$dronetype": { + "$t": "RQ-1L" + }, + "gsx$dronename": { + "$t": "IGNAT" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "$1,000,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ebks1" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "43" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/21/2006, mishapyear: 2006, mishapcountry: Iraq, mishaplocation: 34 miles west of Balad Air Base, narrative: An armed Predator crashed in a remote area after its pilot mistakenly turned off the Stability Augmentation System, causing the drone to lose its link and plummet to the ground. Air Force investigators blamed pilot error, finding that he flew too fast in responding to a request to help ground troops, kept switching commands to the aircraft and didn't ask for help when he was \"confused.\", narrativelength: 389, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,368,400, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ebks1" + } + ], + "gsx$crashid": { + "$t": "43" + }, + "gsx$mishapdate": { + "$t": "3/21/2006" + }, + "gsx$mishapyear": { + "$t": "2006" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "34 miles west of Balad Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed in a remote area after its pilot mistakenly turned off the Stability Augmentation System, causing the drone to lose its link and plummet to the ground. Air Force investigators blamed pilot error, finding that he flew too fast in responding to a request to help ground troops, kept switching commands to the aircraft and didn't ask for help when he was \"confused.\"" + }, + "gsx$narrativelength": { + "$t": "389" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,368,400" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e1qt2" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "44" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/25/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: over the ocean, 88 miles south of Tyndall Air Force Base, Fla., narrative: An aerial target drone was intentionally blown up by remote-control operators over the Gulf of Mexico after it pitched up without warning and flew out of control. The drone was the intended target of an F-15 fighter jet during a test-fire mission. About three minutes after the F-15's missile missed the drone, the aircraft \"violently pitched up without input from the controller and became unresponsive,\" according to Air Force investigators. Investigators were unable to pinpoint the cause of the malfunction because of the explosion and because the wreckage was not salvaged., narrativelength: 578, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,450,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e1qt2" + } + ], + "gsx$crashid": { + "$t": "44" + }, + "gsx$mishapdate": { + "$t": "4/25/2006" + }, + "gsx$mishapyear": { + "$t": "2006" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "over the ocean, 88 miles south of Tyndall Air Force Base, Fla." + }, + "gsx$narrative": { + "$t": "An aerial target drone was intentionally blown up by remote-control operators over the Gulf of Mexico after it pitched up without warning and flew out of control. The drone was the intended target of an F-15 fighter jet during a test-fire mission. About three minutes after the F-15's missile missed the drone, the aircraft \"violently pitched up without input from the controller and became unresponsive,\" according to Air Force investigators. Investigators were unable to pinpoint the cause of the malfunction because of the explosion and because the wreckage was not salvaged." + }, + "gsx$narrativelength": { + "$t": "578" + }, + "gsx$dronetype": { + "$t": "QF-4E" + }, + "gsx$dronename": { + "$t": "Phantom" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$2,450,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e35dj" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "45" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/1/2006, mishapyear: 2006, mishapcountry: Iraq, mishaplocation: Balad Air Base runway, narrative: An unarmed Army Hunter crashed on the runway after the lighting system failed and the controllers couldn't see through the darkness. The nose of the drone pitched down as the aircraft accelerated onto the runway, according to an Army safety investigation. A crew member testified that they couldn't see anything until the drone landed in a shower of sparks, bounced back in the air, spun around and skidded off the runway. An instructor testified that the student pilot was told to press a button to change the direction of an antenna shortly before landing but that he failed to click it properly. As a result, the antenna stayed in the wrong mode and the lights went out right as the Hunter was gliding toward landing. , narrativelength: 721, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: $2,782,012, photo: 3" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e35dj" + } + ], + "gsx$crashid": { + "$t": "45" + }, + "gsx$mishapdate": { + "$t": "6/1/2006" + }, + "gsx$mishapyear": { + "$t": "2006" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "Balad Air Base runway" + }, + "gsx$narrative": { + "$t": "An unarmed Army Hunter crashed on the runway after the lighting system failed and the controllers couldn't see through the darkness. The nose of the drone pitched down as the aircraft accelerated onto the runway, according to an Army safety investigation. A crew member testified that they couldn't see anything until the drone landed in a shower of sparks, bounced back in the air, spun around and skidded off the runway. An instructor testified that the student pilot was told to press a button to change the direction of an antenna shortly before landing but that he failed to click it properly. As a result, the antenna stayed in the wrong mode and the lights went out right as the Hunter was gliding toward landing. " + }, + "gsx$narrativelength": { + "$t": "721" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "$2,782,012" + }, + "gsx$photo": { + "$t": "3" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e4jxw" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "46" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/22/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: Arizona, narrative: An unarmed Army Hunter crashed during a training mission after failing to respond to commands, according to Army safety officials. The Army Training and Doctrine Command, which owned the aircraft, said it did not conduct a publicly releasable accident investigation., narrativelength: 266, dronetype: RQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e4jxw" + } + ], + "gsx$crashid": { + "$t": "46" + }, + "gsx$mishapdate": { + "$t": "6/22/2006" + }, + "gsx$mishapyear": { + "$t": "2006" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Arizona" + }, + "gsx$narrative": { + "$t": "An unarmed Army Hunter crashed during a training mission after failing to respond to commands, according to Army safety officials. The Army Training and Doctrine Command, which owned the aircraft, said it did not conduct a publicly releasable accident investigation." + }, + "gsx$narrativelength": { + "$t": "266" + }, + "gsx$dronetype": { + "$t": "RQ-5A" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e5yid" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "47" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/22/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: Creech Air Force Base, Nev., narrative: Five minutes after takeoff, a Predator rapidly lost engine oil and the pilot intentionally crashed it into the side of a mountain to avoid falling on military personnel. Air Force investigators concluded that the cause was a loose oil filter that was likely installed improperly. Investigators said the student pilot did the right thing by intentionally crashing into the mountainside instead of risking a collision with people on the ground., narrativelength: 442, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,700,000, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e5yid" + } + ], + "gsx$crashid": { + "$t": "47" + }, + "gsx$mishapdate": { + "$t": "6/22/2006" + }, + "gsx$mishapyear": { + "$t": "2006" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Creech Air Force Base, Nev." + }, + "gsx$narrative": { + "$t": "Five minutes after takeoff, a Predator rapidly lost engine oil and the pilot intentionally crashed it into the side of a mountain to avoid falling on military personnel. Air Force investigators concluded that the cause was a loose oil filter that was likely installed improperly. Investigators said the student pilot did the right thing by intentionally crashing into the mountainside instead of risking a collision with people on the ground." + }, + "gsx$narrativelength": { + "$t": "442" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,700,000" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eilm2" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "48" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/3/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: Nevada, narrative: A Predator crashed on the runway after the instructor pilot botched a landing exercise. Air Force investigators determined the pilot thought he was raising the landing gear but hit the wrong switch and turned off the engine. The pilot also turned his head to talk to someone at the moment a warning message flashed on his screen. The pilot absent-mindedly pressed a button to confirm the command. The pilot tried to glide to a landing and \"exercised profoundly poor judgment by remaining fixated on a course of action that he knew was destined to fail,\" investigators wrote. The pilot was forced by his employer to resign soon after, according to the report., narrativelength: 658, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,436,765, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eilm2" + } + ], + "gsx$crashid": { + "$t": "48" + }, + "gsx$mishapdate": { + "$t": "8/3/2006" + }, + "gsx$mishapyear": { + "$t": "2006" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Nevada" + }, + "gsx$narrative": { + "$t": "A Predator crashed on the runway after the instructor pilot botched a landing exercise. Air Force investigators determined the pilot thought he was raising the landing gear but hit the wrong switch and turned off the engine. The pilot also turned his head to talk to someone at the moment a warning message flashed on his screen. The pilot absent-mindedly pressed a button to confirm the command. The pilot tried to glide to a landing and \"exercised profoundly poor judgment by remaining fixated on a course of action that he knew was destined to fail,\" investigators wrote. The pilot was forced by his employer to resign soon after, according to the report." + }, + "gsx$narrativelength": { + "$t": "658" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$1,436,765" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ek06j" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "49" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/10/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: Holloman Air Force Base, N.M., narrative: An aerial target drone crashed during takeoff. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report, but an unclassified presentation from an Air Force test and evaluation analyst said the cause was mechanical, attributing it to a \"control amplifier issue.\", narrativelength: 306, dronetype: QF-4, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ek06j" + } + ], + "gsx$crashid": { + "$t": "49" + }, + "gsx$mishapdate": { + "$t": "8/10/2006" + }, + "gsx$mishapyear": { + "$t": "2006" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Holloman Air Force Base, N.M." + }, + "gsx$narrative": { + "$t": "An aerial target drone crashed during takeoff. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report, but an unclassified presentation from an Air Force test and evaluation analyst said the cause was mechanical, attributing it to a \"control amplifier issue.\"" + }, + "gsx$narrativelength": { + "$t": "306" + }, + "gsx$dronetype": { + "$t": "QF-4" + }, + "gsx$dronename": { + "$t": "Phantom" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eleqw" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "50" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/12/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: Arizona, narrative: An Army Hunter flew out of control during an operator training exercise. A recovery parachute was deployed but it separated from the airframe, according to Army safety officials.The drone burned in a fire after the crash. The Army Training and Doctrine Command said it did not conduct a publicly releasable accident investigation., narrativelength: 330, dronetype: RQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eleqw" + } + ], + "gsx$crashid": { + "$t": "50" + }, + "gsx$mishapdate": { + "$t": "10/12/2006" + }, + "gsx$mishapyear": { + "$t": "2006" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Arizona" + }, + "gsx$narrative": { + "$t": "An Army Hunter flew out of control during an operator training exercise. A recovery parachute was deployed but it separated from the airframe, according to Army safety officials.The drone burned in a fire after the crash. The Army Training and Doctrine Command said it did not conduct a publicly releasable accident investigation." + }, + "gsx$narrativelength": { + "$t": "330" + }, + "gsx$dronetype": { + "$t": "RQ-5A" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/emtbd" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "51" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2007 - specific date classified, mishapyear: 2007, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/emtbd" + } + ], + "gsx$crashid": { + "$t": "51" + }, + "gsx$mishapdate": { + "$t": "2007 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "215" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eczce" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "52" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2007 - specific date classified, mishapyear: 2007, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eczce" + } + ], + "gsx$crashid": { + "$t": "52" + }, + "gsx$mishapdate": { + "$t": "2007 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "215" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eedwv" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "53" + }, + "content": { + "type": "text", + "$t": "mishapdate: 1/17/2007, mishapyear: 2007, mishapcountry: Iraq, mishaplocation: 5 miles southeast of Baghdad International Airport, narrative: An armed Predator crash-landed in the Iraqi desert due to an engine failure after the crankshaft failed, possibly due to a metallurgical flaw. The pilot, an Air Force major, said the crew debated whether to try to land the stricken drone at Baghdad's main airport but decided against it. Commanders ordered the crew to crash as hard as possible \"and try to leave as little left as you can\" to prevent enemy forces from seizing the Predator's missiles or classified technology. , narrativelength: 477, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,160,391" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eedwv" + } + ], + "gsx$crashid": { + "$t": "53" + }, + "gsx$mishapdate": { + "$t": "1/17/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "5 miles southeast of Baghdad International Airport" + }, + "gsx$narrative": { + "$t": "An armed Predator crash-landed in the Iraqi desert due to an engine failure after the crankshaft failed, possibly due to a metallurgical flaw. The pilot, an Air Force major, said the crew debated whether to try to land the stricken drone at Baghdad's main airport but decided against it. Commanders ordered the crew to crash as hard as possible \"and try to leave as little left as you can\" to prevent enemy forces from seizing the Predator's missiles or classified technology. " + }, + "gsx$narrativelength": { + "$t": "477" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,160,391" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/efsh8" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "54" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2/23/2007, mishapyear: 2007, mishapcountry: Afghanistan, mishaplocation: 60 miles northeast of Jalalabad, narrative: An armed Predator intentionally crashed into a mountain in Afghanistan after partial loss of engine power and propeller problems. Investigators pinpointed the cause as the failure of the variable pitch propeller mechanism, possibly because of a broken wire. The Predator had a history of similar problems with the variable pitch propeller, according to the investigative report. The Predator was 270 miles away from its base when it experienced engine trouble. The crew was ordered to crash the drone \"into tiny bits\" to prevent it from falling into enemy hands. For the same reason, the crew was directed to detonate the Hellfire missiles in a remote location before crashing the plane. As the crew prepared to shoot, it realized that it was aiming too close to a house. \"I called abort,\" the sensor operator testified. \"I didn't want to fire into the vicinity of the home.\", narrativelength: 875, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,742,655" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/efsh8" + } + ], + "gsx$crashid": { + "$t": "54" + }, + "gsx$mishapdate": { + "$t": "2/23/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "60 miles northeast of Jalalabad" + }, + "gsx$narrative": { + "$t": "An armed Predator intentionally crashed into a mountain in Afghanistan after partial loss of engine power and propeller problems. Investigators pinpointed the cause as the failure of the variable pitch propeller mechanism, possibly because of a broken wire. The Predator had a history of similar problems with the variable pitch propeller, according to the investigative report. The Predator was 270 miles away from its base when it experienced engine trouble. The crew was ordered to crash the drone \"into tiny bits\" to prevent it from falling into enemy hands. For the same reason, the crew was directed to detonate the Hellfire missiles in a remote location before crashing the plane. As the crew prepared to shoot, it realized that it was aiming too close to a house. \"I called abort,\" the sensor operator testified. \"I didn't want to fire into the vicinity of the home.\"" + }, + "gsx$narrativelength": { + "$t": "875" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,742,655" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eh71p" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "55" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/26/2007, mishapyear: 2007, mishapcountry: Afghanistan, mishaplocation: Kandahar Air Base, narrative: An armed Predator crashed and skidded off the runway after it landed nose-first and bounced in the air seven times. Investigators blamed the pilot, saying he misjudged the height above touchdown and mistakenly thought the bouncing was normal. The crew testified that they couldn't detect the first bounce at all. , narrativelength: 313, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,727,425, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eh71p" + } + ], + "gsx$crashid": { + "$t": "55" + }, + "gsx$mishapdate": { + "$t": "3/26/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "Kandahar Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed and skidded off the runway after it landed nose-first and bounced in the air seven times. Investigators blamed the pilot, saying he misjudged the height above touchdown and mistakenly thought the bouncing was normal. The crew testified that they couldn't detect the first bounce at all. " + }, + "gsx$narrativelength": { + "$t": "313" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$1,727,425" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/etu5e" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "56" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/1/2007, mishapyear: 2007, mishapcountry: Iraq, narrative: An Army Hunter crashed after engine failure. The drone was ascending when the fuel pump failed, followed by the engine, according to Army safety officials. A Freedom of Information Act request for the accident investigation report is pending. , narrativelength: 243, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/etu5e" + } + ], + "gsx$crashid": { + "$t": "56" + }, + "gsx$mishapdate": { + "$t": "4/1/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "An Army Hunter crashed after engine failure. The drone was ascending when the fuel pump failed, followed by the engine, according to Army safety officials. A Freedom of Information Act request for the accident investigation report is pending. " + }, + "gsx$narrativelength": { + "$t": "243" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ev8pv" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "57" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/21/2007, mishapyear: 2007, mishapcountry: Iraq, narrative: An Army Warrior crashed during a hard landing, according to Army safety officials, who gave no other details. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. , narrativelength: 221, dronetype: RQ-1C, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ev8pv" + } + ], + "gsx$crashid": { + "$t": "57" + }, + "gsx$mishapdate": { + "$t": "4/21/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "An Army Warrior crashed during a hard landing, according to Army safety officials, who gave no other details. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. " + }, + "gsx$narrativelength": { + "$t": "221" + }, + "gsx$dronetype": { + "$t": "RQ-1C" + }, + "gsx$dronename": { + "$t": "Warrior" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ewna8" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "58" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/4/2007, mishapyear: 2007, mishapcountry: Iraq, mishaplocation: Al-Jadidah (Baghdad state), narrative: An Army Hunter armed with Viper Strike munitions crashed after it lost link because of a power failure in the ground-control station. Power was restored, but the crew could not regain links with the drone and it crashed three hours later, according to an Army safety investigative report. Iraqi police called almost three hours later to say they had recovered the aircraft. The aircraft was \"contractor operated\" and that mission commander was a \"civilian army contractor,\" according to the report., narrativelength: 498, dronetype: MQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: $2,584,890" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ewna8" + } + ], + "gsx$crashid": { + "$t": "58" + }, + "gsx$mishapdate": { + "$t": "6/4/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "Al-Jadidah (Baghdad state)" + }, + "gsx$narrative": { + "$t": "An Army Hunter armed with Viper Strike munitions crashed after it lost link because of a power failure in the ground-control station. Power was restored, but the crew could not regain links with the drone and it crashed three hours later, according to an Army safety investigative report. Iraqi police called almost three hours later to say they had recovered the aircraft. The aircraft was \"contractor operated\" and that mission commander was a \"civilian army contractor,\" according to the report." + }, + "gsx$narrativelength": { + "$t": "498" + }, + "gsx$dronetype": { + "$t": "MQ-5A" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "$2,584,890" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ey1up" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "59" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/30/2007, mishapyear: 2007, mishapcountry: Iraq, mishaplocation: Balad Air Base runway, narrative: An armed Predator crashed about 300 feet short of the runway during an attempted emergency landing due to an overheated engine and ignition failure. The drone was returning from a 20-hour flight when it skidded on its fuselage and left wing tip, spun and crashed into airfield lights. An engineering report found that a circuit failed due to an improperly manufactured wiring connection that was not soldered as required., narrativelength: 421, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,210,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ey1up" + } + ], + "gsx$crashid": { + "$t": "59" + }, + "gsx$mishapdate": { + "$t": "7/30/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "Balad Air Base runway" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed about 300 feet short of the runway during an attempted emergency landing due to an overheated engine and ignition failure. The drone was returning from a 20-hour flight when it skidded on its fuselage and left wing tip, spun and crashed into airfield lights. An engineering report found that a circuit failed due to an improperly manufactured wiring connection that was not soldered as required." + }, + "gsx$narrativelength": { + "$t": "421" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$2,210,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eo7vq" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "60" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/31/2007, mishapyear: 2007, mishapcountry: Iraq, mishaplocation: 30 miles west of Balad Air Base, narrative: A pilot intentionally crashed an armed Predator after loss of engine power. Fighter jets were dispatched to blow up the wreckage to keep it out of enemy hands. Investigators concluded the cause was partial failure of the manifold air pressure sensor, which decreased fuel flow to the engine. The crew was flying the drone via satellite from March Air Force Base in California. \"Bottom line is the engine appeared to quit, we ran the checklist, we couldn't figure out how to get it started and the rest is history,\" the sensor operator testified. A supervisor wondered at first if the pilot had killed the engine inadvertently. \"The first thing I said, 'Is the ignition on?' Because in the Predator, the two buttons for firing the missile, the Hellfire, and shutting the engine down are directly adjacent to each other,\" the supervisor testified. \"It is not that difficult to squeeze the wrong button.\", narrativelength: 901, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,828,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eo7vq" + } + ], + "gsx$crashid": { + "$t": "60" + }, + "gsx$mishapdate": { + "$t": "7/31/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "30 miles west of Balad Air Base" + }, + "gsx$narrative": { + "$t": "A pilot intentionally crashed an armed Predator after loss of engine power. Fighter jets were dispatched to blow up the wreckage to keep it out of enemy hands. Investigators concluded the cause was partial failure of the manifold air pressure sensor, which decreased fuel flow to the engine. The crew was flying the drone via satellite from March Air Force Base in California. \"Bottom line is the engine appeared to quit, we ran the checklist, we couldn't figure out how to get it started and the rest is history,\" the sensor operator testified. A supervisor wondered at first if the pilot had killed the engine inadvertently. \"The first thing I said, 'Is the ignition on?' Because in the Predator, the two buttons for firing the missile, the Hellfire, and shutting the engine down are directly adjacent to each other,\" the supervisor testified. \"It is not that difficult to squeeze the wrong button.\"" + }, + "gsx$narrativelength": { + "$t": "901" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,828,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/epmg7" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "61" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/29/2007, mishapyear: 2007, mishapcountry: Iraq, narrative: An Army Hunter crashed in Iraq after one of its engines lost power. The drone was on a surveillance mission at an altitude of 5,000 feet when a fuel pump warning light came on and the aft engine lost power, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. , narrativelength: 354, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/epmg7" + } + ], + "gsx$crashid": { + "$t": "61" + }, + "gsx$mishapdate": { + "$t": "8/29/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "An Army Hunter crashed in Iraq after one of its engines lost power. The drone was on a surveillance mission at an altitude of 5,000 feet when a fuel pump warning light came on and the aft engine lost power, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. " + }, + "gsx$narrativelength": { + "$t": "354" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/er10k" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "62" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/4/2007, mishapyear: 2007, mishapcountry: United States, mishaplocation: Nevada, narrative: The Air Force withheld information about the circumstances of this Reaper crash. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 192, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/er10k" + } + ], + "gsx$crashid": { + "$t": "62" + }, + "gsx$mishapdate": { + "$t": "9/4/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Nevada" + }, + "gsx$narrative": { + "$t": "The Air Force withheld information about the circumstances of this Reaper crash. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "192" + }, + "gsx$dronetype": { + "$t": "MQ-9A" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/esfl1" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "63" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/20/2007, mishapyear: 2007, mishapcountry: Iraq, narrative: An Army Hunter crashed shortly after takeoff when its left wing fell off. The drone was on a maintenance test flight and had reached an altitude of 2,000 feet when the operator leveled the aircraft and waited for the proper airspeed before rolling left, according to an Army safety investigative report. Instead, the left wing fell off. The crew tried to deploy the aircraft's parachute but the aircraft already was out of control and too close to the ground. The heavily redacted accident report does not specify a cause for the accident., narrativelength: 539, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/esfl1" + } + ], + "gsx$crashid": { + "$t": "63" + }, + "gsx$mishapdate": { + "$t": "11/20/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "An Army Hunter crashed shortly after takeoff when its left wing fell off. The drone was on a maintenance test flight and had reached an altitude of 2,000 feet when the operator leveled the aircraft and waited for the proper airspeed before rolling left, according to an Army safety investigative report. Instead, the left wing fell off. The crew tried to deploy the aircraft's parachute but the aircraft already was out of control and too close to the ground. The heavily redacted accident report does not specify a cause for the accident." + }, + "gsx$narrativelength": { + "$t": "539" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a59y2" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "64" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/29/2007, mishapyear: 2007, mishapcountry: Iraq, mishaplocation: 37 nautical miles northwest of Ali Air Base, narrative: An armed Predator with the callsign Overlord 04 crashed in an uninhabited area after it pitched steeply up, then jerked nose-down and went into a rapid spin. Fighter jets blew up the wreckage to keep it out of enemy hands. Investigators were unable to pinpoint why the RS-422 receiver on the right tail computer board failed because the wreckage was destroyed. Crew members complained to investigators about frequent problems with their Predator fleet. \"We've had link problems as well,\" the mission coordinator testified. \"I don't want to be the one that crashes a plane, but I hope that this causes folks, and when I say folks, I mean GA [General Atomics], I hope we hold them accountable for some of this stuff,\" an instructor pilot added. \"We know we are flying with some defective stuff.\", narrativelength: 793, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,828,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a59y2" + } + ], + "gsx$crashid": { + "$t": "64" + }, + "gsx$mishapdate": { + "$t": "11/29/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "37 nautical miles northwest of Ali Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator with the callsign Overlord 04 crashed in an uninhabited area after it pitched steeply up, then jerked nose-down and went into a rapid spin. Fighter jets blew up the wreckage to keep it out of enemy hands. Investigators were unable to pinpoint why the RS-422 receiver on the right tail computer board failed because the wreckage was destroyed. Crew members complained to investigators about frequent problems with their Predator fleet. \"We've had link problems as well,\" the mission coordinator testified. \"I don't want to be the one that crashes a plane, but I hope that this causes folks, and when I say folks, I mean GA [General Atomics], I hope we hold them accountable for some of this stuff,\" an instructor pilot added. \"We know we are flying with some defective stuff.\"" + }, + "gsx$narrativelength": { + "$t": "793" + }, + "gsx$dronetype": { + "$t": "MQ-1L" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,828,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a6oij" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "65" + }, + "content": { + "type": "text", + "$t": "mishapdate: 12/7/2007, mishapyear: 2007, mishapcountry: Iraq, narrative: An Army Hunter drone lost its video link during a surveillance mission and was destroyed when it hit the ground, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. , narrativelength: 260, dronetype: MQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a6oij" + } + ], + "gsx$crashid": { + "$t": "65" + }, + "gsx$mishapdate": { + "$t": "12/7/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "An Army Hunter drone lost its video link during a surveillance mission and was destroyed when it hit the ground, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. " + }, + "gsx$narrativelength": { + "$t": "260" + }, + "gsx$dronetype": { + "$t": "MQ-5A" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a832w" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "66" + }, + "content": { + "type": "text", + "$t": "mishapdate: 12/17/2007, mishapyear: 2007, mishapcountry: Iraq, mishaplocation: 30 nautical miles northeast of Balad Air Base (near al-Muqdadiya), narrative: An armed Predator broke apart midair and crashed in hostile territory. About 6.5 hours into flight, the aircraft suddenly lost its satellite links and failed to follow its preprogrammed lost link route. Air Force investigators blamed a major power failure in the alternators, which they suspected was likely triggered by a short circuit. A military incident report published by WikiLeaks stated that small pieces of wreckage were found near an Iraqi schoolhouse. Investigators found no evidence that the Predator had been shot down by enemy forces., narrativelength: 548, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,849,481" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a832w" + } + ], + "gsx$crashid": { + "$t": "66" + }, + "gsx$mishapdate": { + "$t": "12/17/2007" + }, + "gsx$mishapyear": { + "$t": "2007" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "30 nautical miles northeast of Balad Air Base (near al-Muqdadiya)" + }, + "gsx$narrative": { + "$t": "An armed Predator broke apart midair and crashed in hostile territory. About 6.5 hours into flight, the aircraft suddenly lost its satellite links and failed to follow its preprogrammed lost link route. Air Force investigators blamed a major power failure in the alternators, which they suspected was likely triggered by a short circuit. A military incident report published by WikiLeaks stated that small pieces of wreckage were found near an Iraqi schoolhouse. Investigators found no evidence that the Predator had been shot down by enemy forces." + }, + "gsx$narrativelength": { + "$t": "548" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,849,481" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a9hnd" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "67" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2008 - specific date classified, mishapyear: 2008, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a9hnd" + } + ], + "gsx$crashid": { + "$t": "67" + }, + "gsx$mishapdate": { + "$t": "2008 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "215" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/9znoe" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "68" + }, + "content": { + "type": "text", + "$t": "mishapdate: 1/23/2008, mishapyear: 2008, mishapcountry: Classified, narrative: The Air Force confirmed the date of this Reaper accident but classified information about where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 222, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/9znoe" + } + ], + "gsx$crashid": { + "$t": "68" + }, + "gsx$mishapdate": { + "$t": "1/23/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force confirmed the date of this Reaper accident but classified information about where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "222" + }, + "gsx$dronetype": { + "$t": "MQ-9A" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a128v" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "69" + }, + "content": { + "type": "text", + "$t": "mishapdate: 1/28/2008, mishapyear: 2008, mishapcountry: Afghanistan, narrative: An Army Warrior flew off and was never located after it lost link during flight. Attempts to restart the links were unsuccessful, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. , narrativelength: 277, dronetype: RQ-1C, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a128v" + } + ], + "gsx$crashid": { + "$t": "69" + }, + "gsx$mishapdate": { + "$t": "1/28/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "An Army Warrior flew off and was never located after it lost link during flight. Attempts to restart the links were unsuccessful, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. " + }, + "gsx$narrativelength": { + "$t": "277" + }, + "gsx$dronetype": { + "$t": "RQ-1C" + }, + "gsx$dronename": { + "$t": "Warrior" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a2gt8" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "70" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/11/2008, mishapyear: 2008, mishapcountry: Iraq, narrative: An Army Hunter crashed short of the runway in rough terrain. The controller lost visual contact with the aircraft during the descent in hazy conditions, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending., narrativelength: 299, dronetype: MQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a2gt8" + } + ], + "gsx$crashid": { + "$t": "70" + }, + "gsx$mishapdate": { + "$t": "3/11/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "An Army Hunter crashed short of the runway in rough terrain. The controller lost visual contact with the aircraft during the descent in hazy conditions, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending." + }, + "gsx$narrativelength": { + "$t": "299" + }, + "gsx$dronetype": { + "$t": "MQ-5A" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a3vdp" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "71" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/22/2008, mishapyear: 2008, mishapcountry: Afghanistan, narrative: An Army IGNAT crashed after a lost link incident. The aircraft was cruising at an altitude of 14,000 feet when controllers lost the communication link with the aircraft. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 304, dronetype: RQ-1L, dronename: IGNAT, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a3vdp" + } + ], + "gsx$crashid": { + "$t": "71" + }, + "gsx$mishapdate": { + "$t": "3/22/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "An Army IGNAT crashed after a lost link incident. The aircraft was cruising at an altitude of 14,000 feet when controllers lost the communication link with the aircraft. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " + }, + "gsx$narrativelength": { + "$t": "304" + }, + "gsx$dronetype": { + "$t": "RQ-1L" + }, + "gsx$dronename": { + "$t": "IGNAT" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/agihe" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "72" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/9/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: in a classified location, somewhere in the vicinity of Tikrit, narrative: An armed Predator was intentionally flown into the ground after engine failure. According to the crew, the engine stopped working and would only run at idle speed, so it rotated nose-down and starting falling from the sky. As the drone fell to an altitude of 3,000 feet, the pilot was ordered to fire the Hellfire missile into a sparsely populated area; he testified that he couldn't see exactly where it blew up. \"Normally when aircraft loss is probable and we are far away from our primary airfield the normal guidance is to go ahead and crash the plane into as many bits, as many small pieces as possible,\" a crew member testified. Ground forces later blew up much of the wreckage with C-4 explosives but recovered a few parts. Investigators concluded that the engine failed because something malfunctioned in the throttle body assembly, restricting air intake, but could not pinpoint the broken part., narrativelength: 904, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $5,000,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/agihe" + } + ], + "gsx$crashid": { + "$t": "72" + }, + "gsx$mishapdate": { + "$t": "4/9/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "in a classified location, somewhere in the vicinity of Tikrit" + }, + "gsx$narrative": { + "$t": "An armed Predator was intentionally flown into the ground after engine failure. According to the crew, the engine stopped working and would only run at idle speed, so it rotated nose-down and starting falling from the sky. As the drone fell to an altitude of 3,000 feet, the pilot was ordered to fire the Hellfire missile into a sparsely populated area; he testified that he couldn't see exactly where it blew up. \"Normally when aircraft loss is probable and we are far away from our primary airfield the normal guidance is to go ahead and crash the plane into as many bits, as many small pieces as possible,\" a crew member testified. Ground forces later blew up much of the wreckage with C-4 explosives but recovered a few parts. Investigators concluded that the engine failed because something malfunctioned in the throttle body assembly, restricting air intake, but could not pinpoint the broken part." + }, + "gsx$narrativelength": { + "$t": "904" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$5,000,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ahx1v" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "73" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/2/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: 45 nautical miles east of Ali Air Base, narrative: An armed Predator crashed after the engine sputtered repeatedly while returning to base. Investigators said the cause was a failure of the ignition module, which reduced engine speed and resulted in lost links. The aircraft had been on a 19-hour mission when the engine failed. The crew was able to restart it once, but it only ran for 15 seconds before conking out for good., narrativelength: 375, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,828,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ahx1v" + } + ], + "gsx$crashid": { + "$t": "73" + }, + "gsx$mishapdate": { + "$t": "5/2/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "45 nautical miles east of Ali Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed after the engine sputtered repeatedly while returning to base. Investigators said the cause was a failure of the ignition module, which reduced engine speed and resulted in lost links. The aircraft had been on a 19-hour mission when the engine failed. The crew was able to restart it once, but it only ran for 15 seconds before conking out for good." + }, + "gsx$narrativelength": { + "$t": "375" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,828,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ajbm8" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "74" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/7/2008, mishapyear: 2008, mishapcountry: United States, mishaplocation: Arizona, narrative: A Hunter drifted off course during student training and crashed into hilly terrain, according to Army safety officials. The Army Training and Doctrine Command said it did not conduct a publicly releasable accident investigation., narrativelength: 228, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ajbm8" + } + ], + "gsx$crashid": { + "$t": "74" + }, + "gsx$mishapdate": { + "$t": "5/7/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Arizona" + }, + "gsx$narrative": { + "$t": "A Hunter drifted off course during student training and crashed into hilly terrain, according to Army safety officials. The Army Training and Doctrine Command said it did not conduct a publicly releasable accident investigation." + }, + "gsx$narrativelength": { + "$t": "228" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/akq6p" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "75" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/12/2008, mishapyear: 2008, mishapcountry: Classified, mishaplocation: Southwest Asia, narrative: The Air Force confirmed the date of this Reaper accident and said it occurred in Southwest Asia, which usually refers to a country in the Persian Gulf, but it classified the exact location and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 303, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/akq6p" + } + ], + "gsx$crashid": { + "$t": "75" + }, + "gsx$mishapdate": { + "$t": "5/12/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "Southwest Asia" + }, + "gsx$narrative": { + "$t": "The Air Force confirmed the date of this Reaper accident and said it occurred in Southwest Asia, which usually refers to a country in the Persian Gulf, but it classified the exact location and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "303" + }, + "gsx$dronetype": { + "$t": "MQ-9A" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/aaw7q" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "76" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/2/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: About 1 mile northwest of Balad Air Base, narrative: An armed Predator crashed about 11 minutes after takeoff after it lost electrical power and its control links. Air traffic control at Balad Air Base lost track of the aircraft on radar; it was later found about a mile from the base. Air Force investigators attributed the cause to an alternator failure. The broken alternator triggered a failure in the primary control module, including the flight control computer., narrativelength: 415, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,050,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/aaw7q" + } + ], + "gsx$crashid": { + "$t": "76" + }, + "gsx$mishapdate": { + "$t": "6/2/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "About 1 mile northwest of Balad Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed about 11 minutes after takeoff after it lost electrical power and its control links. Air traffic control at Balad Air Base lost track of the aircraft on radar; it was later found about a mile from the base. Air Force investigators attributed the cause to an alternator failure. The broken alternator triggered a failure in the primary control module, including the flight control computer." + }, + "gsx$narrativelength": { + "$t": "415" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,050,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/acas7" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "77" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/13/2008, mishapyear: 2008, mishapcountry: Afghanistan, mishaplocation: 6 miles south/southwest of Kandahar Air Base, narrative: An armed Predator crashed in an unpopulated area. About 10 minutes after takeoff, the drone began moving erratically and finally out of control. As the crash happened, the pilot radioed the Kandahar air-traffic control tower and reported, \"No souls on board. It's a UAV so it shouldn't be a big deal.\" Investigators determined the cause was mechanical: the faulty connection of a cable to the primary control module. The manufacturer, General Atomics, suggested that poor maintenance was to blame, but investigators said there was not enough evidence to rule that in or out. Crew members complained about recurring mechanical problems. The doomed aircraft \"always kind of seemed to have a, we like to call them demons I guess,\" a staff sergeant testified. \"It's just one of those planes that seem to be broke a lot. We would always fix it and it seemed problems would go away and then come back.\", narrativelength: 896, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,849,481, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/acas7" + } + ], + "gsx$crashid": { + "$t": "77" + }, + "gsx$mishapdate": { + "$t": "6/13/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "6 miles south/southwest of Kandahar Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed in an unpopulated area. About 10 minutes after takeoff, the drone began moving erratically and finally out of control. As the crash happened, the pilot radioed the Kandahar air-traffic control tower and reported, \"No souls on board. It's a UAV so it shouldn't be a big deal.\" Investigators determined the cause was mechanical: the faulty connection of a cable to the primary control module. The manufacturer, General Atomics, suggested that poor maintenance was to blame, but investigators said there was not enough evidence to rule that in or out. Crew members complained about recurring mechanical problems. The doomed aircraft \"always kind of seemed to have a, we like to call them demons I guess,\" a staff sergeant testified. \"It's just one of those planes that seem to be broke a lot. We would always fix it and it seemed problems would go away and then come back.\"" + }, + "gsx$narrativelength": { + "$t": "896" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,849,481" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/adpck" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "78" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/11/2008, mishapyear: 2008, mishapcountry: Iraq, narrative: A Hunter crashed after an engine failed while about 800 feet above the ground. A recovery parachute was deployed, but the aircraft was too close to the ground, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 330, dronetype: MQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/adpck" + } + ], + "gsx$crashid": { + "$t": "78" + }, + "gsx$mishapdate": { + "$t": "7/11/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Hunter crashed after an engine failed while about 800 feet above the ground. A recovery parachute was deployed, but the aircraft was too close to the ground, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " + }, + "gsx$narrativelength": { + "$t": "330" + }, + "gsx$dronetype": { + "$t": "MQ-5A" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/af3x1" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "79" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/13/2008, mishapyear: 2008, mishapcountry: Iraq, narrative: An Army Warrior crashed after the operator ordered a rapid descent and the aircraft's nose pitched down. The drone went into an uncontrolled spiral, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 319, dronetype: RQ-1C, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/af3x1" + } + ], + "gsx$crashid": { + "$t": "79" + }, + "gsx$mishapdate": { + "$t": "7/13/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "An Army Warrior crashed after the operator ordered a rapid descent and the aircraft's nose pitched down. The drone went into an uncontrolled spiral, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " + }, + "gsx$narrativelength": { + "$t": "319" + }, + "gsx$dronetype": { + "$t": "RQ-1C" + }, + "gsx$dronename": { + "$t": "Warrior" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/arr0q" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "80" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/21/2008, mishapyear: 2008, mishapcountry: Afghanistan, mishaplocation: about 100 nautical miles northeast of Kandahar Airfield, narrative: An armed Predator presumably crashed after it lost link and disappeared while flying over Afghanistan during a power loss to the ground-control station at Cannon Air Force Base in New Mexico. Two other Predators flying in Afghanistan lost their links at the same time because of the power failure. The crew regained power and was able to regain link to those two drones. The Predator that disappeared was preprogrammed to return to base in the event of a lost link but for some reason did not. Investigators speculated that it flew into hazardous weather and crashed. It has not been found., narrativelength: 590, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,849,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/arr0q" + } + ], + "gsx$crashid": { + "$t": "80" + }, + "gsx$mishapdate": { + "$t": "7/21/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "about 100 nautical miles northeast of Kandahar Airfield" + }, + "gsx$narrative": { + "$t": "An armed Predator presumably crashed after it lost link and disappeared while flying over Afghanistan during a power loss to the ground-control station at Cannon Air Force Base in New Mexico. Two other Predators flying in Afghanistan lost their links at the same time because of the power failure. The crew regained power and was able to regain link to those two drones. The Predator that disappeared was preprogrammed to return to base in the event of a lost link but for some reason did not. Investigators speculated that it flew into hazardous weather and crashed. It has not been found." + }, + "gsx$narrativelength": { + "$t": "590" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,849,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/at5l7" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "81" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/1/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: about five miles from Balad Air Base, narrative: An armed Predator crashed in a grove of palm trees, about 150 yards from a house. About 10 minutes after takeoff, the aircraft's electrical system went haywire and it lost link. Investigators determined a short circuit, probably in one of the alternators, likely caused the electrical problem. The Predator was burned in the post-wreckage fire. A crew member testified that the two Hellfire missiles either detonated when the aircraft crashed or else \"cooked off\" during the fire. According to the pilot, extremely hot daytime temperatures in Iraq limited when drones could take off or land. The pilot testified that high temperatures \"can cause issues with the electronics of the aircraft.\", narrativelength: 691, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,013,000, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/at5l7" + } + ], + "gsx$crashid": { + "$t": "81" + }, + "gsx$mishapdate": { + "$t": "8/1/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "about five miles from Balad Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed in a grove of palm trees, about 150 yards from a house. About 10 minutes after takeoff, the aircraft's electrical system went haywire and it lost link. Investigators determined a short circuit, probably in one of the alternators, likely caused the electrical problem. The Predator was burned in the post-wreckage fire. A crew member testified that the two Hellfire missiles either detonated when the aircraft crashed or else \"cooked off\" during the fire. According to the pilot, extremely hot daytime temperatures in Iraq limited when drones could take off or land. The pilot testified that high temperatures \"can cause issues with the electronics of the aircraft.\"" + }, + "gsx$narrativelength": { + "$t": "691" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,013,000" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/auk5k" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "82" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/8/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: Ali Air Base, narrative: A Predator ran off the runway during landing and was substantially damaged, according to Air Combat Command. Rainy weather and crosswinds may have played a role. Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 269, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/auk5k" + } + ], + "gsx$crashid": { + "$t": "82" + }, + "gsx$mishapdate": { + "$t": "9/8/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "Ali Air Base" + }, + "gsx$narrative": { + "$t": "A Predator ran off the runway during landing and was substantially damaged, according to Air Combat Command. Rainy weather and crosswinds may have played a role. Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "269" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/avyq1" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "83" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/9/2008, mishapyear: 2008, mishapcountry: United States, mishaplocation: California, narrative: The Air Force withheld information about the circumstances of this Reaper crash. The Air Force Materiel Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 200, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/avyq1" + } + ], + "gsx$crashid": { + "$t": "83" + }, + "gsx$mishapdate": { + "$t": "9/9/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "California" + }, + "gsx$narrative": { + "$t": "The Air Force withheld information about the circumstances of this Reaper crash. The Air Force Materiel Command did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "200" + }, + "gsx$dronetype": { + "$t": "MQ-9A" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/am4r2" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "84" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/19/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: about 1.5 miles from Ali Air Base, narrative: An armed Predator crashed about 1.5 miles short of the runway after a propeller shaft malfunction. The aircraft had been on a 20-hour mission when it suddenly pitched up and down, lost link and struck the ground. Investigators determined the cause was a failure of the propeller quill shaft bearing. They also found that the tool used by maintenance personnel to install the bearing had been worn and used improperly., narrativelength: 417, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,738,515, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/am4r2" + } + ], + "gsx$crashid": { + "$t": "84" + }, + "gsx$mishapdate": { + "$t": "10/19/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "about 1.5 miles from Ali Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed about 1.5 miles short of the runway after a propeller shaft malfunction. The aircraft had been on a 20-hour mission when it suddenly pitched up and down, lost link and struck the ground. Investigators determined the cause was a failure of the propeller quill shaft bearing. They also found that the tool used by maintenance personnel to install the bearing had been worn and used improperly." + }, + "gsx$narrativelength": { + "$t": "417" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,738,515" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/anjbj" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "85" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/2/2008, mishapyear: 2008, mishapcountry: Afghanistan, mishaplocation: Kandahar Air Base, narrative: An armed Predator crashed into a ditch on base shortly after taking off into a stiff headwind. Investigators were unable to pinpoint a precise cause but concluded that factors included lopsided weight on the Predator because of its single Hellfire missile, wind gusts and an overly aggressive left turn by the pilot. The pilot overshot the intended course and tried to avoid entering a no-fly area over the base. \"As the plane was going down, all I saw were tents, and I was afraid that I had killed someone,\" testified the pilot, Maj. Richard Wageman. \"I felt numb, and I am certain that a few cuss words came out of my mouth.\" No one was injured. Wageman testified that it was his first Predator deployment and that \"it has been difficult\" to adjust to flying drones after his previous career as an F-16 pilot., narrativelength: 812, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,670,000, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/anjbj" + } + ], + "gsx$crashid": { + "$t": "85" + }, + "gsx$mishapdate": { + "$t": "11/2/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "Kandahar Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed into a ditch on base shortly after taking off into a stiff headwind. Investigators were unable to pinpoint a precise cause but concluded that factors included lopsided weight on the Predator because of its single Hellfire missile, wind gusts and an overly aggressive left turn by the pilot. The pilot overshot the intended course and tried to avoid entering a no-fly area over the base. \"As the plane was going down, all I saw were tents, and I was afraid that I had killed someone,\" testified the pilot, Maj. Richard Wageman. \"I felt numb, and I am certain that a few cuss words came out of my mouth.\" No one was injured. Wageman testified that it was his first Predator deployment and that \"it has been difficult\" to adjust to flying drones after his previous career as an F-16 pilot." + }, + "gsx$narrativelength": { + "$t": "812" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,670,000" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/aoxvw" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "86" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/17/2008, mishapyear: 2008, mishapcountry: United States, mishaplocation: California, narrative: A Warrior crashed after it lost link with its ground-control station. The aircraft was on a training mission operated by contractors, according to Army safety officials. The Army said it did not conduct a publicly releasable accident investigation., narrativelength: 248, dronetype: MQ-1C, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/aoxvw" + } + ], + "gsx$crashid": { + "$t": "86" + }, + "gsx$mishapdate": { + "$t": "11/17/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "California" + }, + "gsx$narrative": { + "$t": "A Warrior crashed after it lost link with its ground-control station. The aircraft was on a training mission operated by contractors, according to Army safety officials. The Army said it did not conduct a publicly releasable accident investigation." + }, + "gsx$narrativelength": { + "$t": "248" + }, + "gsx$dronetype": { + "$t": "MQ-1C" + }, + "gsx$dronename": { + "$t": "Warrior" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/aqcgd" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "87" + }, + "content": { + "type": "text", + "$t": "mishapdate: 12/4/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: Balad Air Base runway, narrative: The Air Force withheld information about the circumstances of this crash. A military incident report given to WikiLeaks said the Predator crashed at 7:30 a.m. on the runway at Balad Air Base and that its Hellfire missile came loose. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report. , narrativelength: 345, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/aqcgd" + } + ], + "gsx$crashid": { + "$t": "87" + }, + "gsx$mishapdate": { + "$t": "12/4/2008" + }, + "gsx$mishapyear": { + "$t": "2008" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "Balad Air Base runway" + }, + "gsx$narrative": { + "$t": "The Air Force withheld information about the circumstances of this crash. A military incident report given to WikiLeaks said the Predator crashed at 7:30 a.m. on the runway at Balad Air Base and that its Hellfire missile came loose. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report. " + }, + "gsx$narrativelength": { + "$t": "345" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b2zk2" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "88" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2009 - specific date classified, mishapyear: 2009, mishapcountry: Classified, narrative: The Air Force classified the date of this Reaper accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 214, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b2zk2" + } + ], + "gsx$crashid": { + "$t": "88" + }, + "gsx$mishapdate": { + "$t": "2009 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the date of this Reaper accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "214" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b4e4j" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "89" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2/8/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: in a classified location in southern Afghanistan, narrative: The Air Force Special Operations Command said a Predator crashed in a classified location in southern Afghanistan after a suspected engine failure. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 250, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: unknown" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b4e4j" + } + ], + "gsx$crashid": { + "$t": "89" + }, + "gsx$mishapdate": { + "$t": "2/8/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "in a classified location in southern Afghanistan" + }, + "gsx$narrative": { + "$t": "The Air Force Special Operations Command said a Predator crashed in a classified location in southern Afghanistan after a suspected engine failure. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "250" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "unknown" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b5sow" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "90" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2/22/2009, mishapyear: 2009, mishapcountry: Iraq, mishaplocation: in a classified location, south of Khaniqin, narrative: An armed Predator crashed after losing link and going into an unrecoverable spin. The aircraft began experiencing electrical problems and went into \"self-termination mode,\" shutting down its engine and going into a stall, according to an Air Force investigation. The report concluded the electrical failure occurred within the primary control module, probably in a power converter or the flight computer board. The same drone had reported a lost-link malfunction two days earlier but recovered. Investigators concluded that the two lost links were unrelated., narrativelength: 558, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,456,200, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b5sow" + } + ], + "gsx$crashid": { + "$t": "90" + }, + "gsx$mishapdate": { + "$t": "2/22/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "in a classified location, south of Khaniqin" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed after losing link and going into an unrecoverable spin. The aircraft began experiencing electrical problems and went into \"self-termination mode,\" shutting down its engine and going into a stall, according to an Air Force investigation. The report concluded the electrical failure occurred within the primary control module, probably in a power converter or the flight computer board. The same drone had reported a lost-link malfunction two days earlier but recovered. Investigators concluded that the two lost links were unrelated." + }, + "gsx$narrativelength": { + "$t": "558" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,456,200" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b779d" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "91" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/20/2009, mishapyear: 2009, mishapcountry: United States, mishaplocation: National Training Center complex, Fort Irwin, Calif., 20 nautical miles north of Bicycle Lake Army Air Field, Calif., narrative: A Reaper crashed during an emergency landing in the desert after an engine failure and loss of oil pressure. Air Force investigators attributed the cause to an oil system temperature control valve that was improperly assembled during manufacturing. General Atomics reported that a similar incident occurred a month earlier, when a Reaper lost oil pressure and was slightly damaged during an emergency landing. General Atomics determined that the valve sliders had been installed upside down by the supplier, a Houston firm. According to the Air Force report, the valves were not of aerospace grade and were not intended for use in the aircraft., narrativelength: 644, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,929,647, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b779d" + } + ], + "gsx$crashid": { + "$t": "91" + }, + "gsx$mishapdate": { + "$t": "3/20/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "National Training Center complex, Fort Irwin, Calif., 20 nautical miles north of Bicycle Lake Army Air Field, Calif." + }, + "gsx$narrative": { + "$t": "A Reaper crashed during an emergency landing in the desert after an engine failure and loss of oil pressure. Air Force investigators attributed the cause to an oil system temperature control valve that was improperly assembled during manufacturing. General Atomics reported that a similar incident occurred a month earlier, when a Reaper lost oil pressure and was slightly damaged during an emergency landing. General Atomics determined that the valve sliders had been installed upside down by the supplier, a Houston firm. According to the Air Force report, the valves were not of aerospace grade and were not intended for use in the aircraft." + }, + "gsx$narrativelength": { + "$t": "644" + }, + "gsx$dronetype": { + "$t": "MQ-9A" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,929,647" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/axdae" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "92" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/10/2009, mishapyear: 2009, mishapcountry: United States, mishaplocation: Wright Army Airfield, Hinesville, Ga., narrative: A Hunter crashed after it lost link during a training mission, according to Army safety officials. Army Intelligence and Security Command said it did not conduct a publicly releasable accident investigation., narrativelength: 207, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: $2,265,299, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/axdae" + } + ], + "gsx$crashid": { + "$t": "92" + }, + "gsx$mishapdate": { + "$t": "4/10/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Wright Army Airfield, Hinesville, Ga." + }, + "gsx$narrative": { + "$t": "A Hunter crashed after it lost link during a training mission, according to Army safety officials. Army Intelligence and Security Command said it did not conduct a publicly releasable accident investigation." + }, + "gsx$narrativelength": { + "$t": "207" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "$2,265,299" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ayruv" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "93" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/20/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: 90 nautical miles south of Kabul Air Base, near Sinkay village, narrative: An armed Predator disappeared after losing its data links, and its transponder stopped working nine hours into flight. Airborne searchers found the wreckage the next day near the Afghan village of Sinkay. Investigators said the cause was a catastrophic electrical system failure, most likely because of a short circuit. Only a complete electrical failure could account for a lost link, the loss of the transponder signal and the inability of the aircraft to perform its preprogrammed lost-link emergency mission, according to the report. The pilot testified that lost links are not uncommon with Predators but usually only last for a few seconds or minutes. \"After doing this for a while, you sort of see this; it's a reoccurring thing,\" he testified. \"I'd say after the 3- to 5-minute period you sort of get the feeling that the plane just stopped talking to us and we may not recover this one.\", narrativelength: 896, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,700,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ayruv" + } + ], + "gsx$crashid": { + "$t": "93" + }, + "gsx$mishapdate": { + "$t": "4/20/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "90 nautical miles south of Kabul Air Base, near Sinkay village" + }, + "gsx$narrative": { + "$t": "An armed Predator disappeared after losing its data links, and its transponder stopped working nine hours into flight. Airborne searchers found the wreckage the next day near the Afghan village of Sinkay. Investigators said the cause was a catastrophic electrical system failure, most likely because of a short circuit. Only a complete electrical failure could account for a lost link, the loss of the transponder signal and the inability of the aircraft to perform its preprogrammed lost-link emergency mission, according to the report. The pilot testified that lost links are not uncommon with Predators but usually only last for a few seconds or minutes. \"After doing this for a while, you sort of see this; it's a reoccurring thing,\" he testified. \"I'd say after the 3- to 5-minute period you sort of get the feeling that the plane just stopped talking to us and we may not recover this one.\"" + }, + "gsx$narrativelength": { + "$t": "896" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,700,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b06f8" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "94" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/21/2009, mishapyear: 2009, mishapcountry: Iraq, mishaplocation: COB Speicher Airfield, Tikrit, narrative: A Hunter crashed after losing link and making an earlier-than-expected nighttime landing at a military airstrip. While turning during the descent, the aircraft lost its data links and flew out of control about 200 feet above ground level, according to an Army safety report. The Hunter crashed on the runway with its left wing and nose pointing down. According to the mission commander, the aircraft started having data link problems when it was about 30 miles away from the base. , narrativelength: 481, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: 3,112,882, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b06f8" + } + ], + "gsx$crashid": { + "$t": "94" + }, + "gsx$mishapdate": { + "$t": "4/21/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "COB Speicher Airfield, Tikrit" + }, + "gsx$narrative": { + "$t": "A Hunter crashed after losing link and making an earlier-than-expected nighttime landing at a military airstrip. While turning during the descent, the aircraft lost its data links and flew out of control about 200 feet above ground level, according to an Army safety report. The Hunter crashed on the runway with its left wing and nose pointing down. According to the mission commander, the aircraft started having data link problems when it was about 30 miles away from the base. " + }, + "gsx$narrativelength": { + "$t": "481" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "3,112,882" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b1kzp" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "95" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/28/2009, mishapyear: 2009, mishapcountry: United States, mishaplocation: 1.5 miles west of Creech Air Force Base, Nev., narrative: A Reaper on a training mission crashed into desert terrain a minute after takeoff because of an engine malfunction. Investigators determined that a vacuum line to the carburetors became disconnected. The flight was the first for the Predator since its old engine had been replaced with a rebuilt model five days earlier. Investigators determined that the vacuum line had been installed correctly but that it was too short and subject to chafing. The pilot's skillful emergency landing saved the aircraft from being a total loss., narrativelength: 528, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $543,178, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b1kzp" + } + ], + "gsx$crashid": { + "$t": "95" + }, + "gsx$mishapdate": { + "$t": "4/28/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "1.5 miles west of Creech Air Force Base, Nev." + }, + "gsx$narrative": { + "$t": "A Reaper on a training mission crashed into desert terrain a minute after takeoff because of an engine malfunction. Investigators determined that a vacuum line to the carburetors became disconnected. The flight was the first for the Predator since its old engine had been replaced with a rebuilt model five days earlier. Investigators determined that the vacuum line had been installed correctly but that it was too short and subject to chafing. The pilot's skillful emergency landing saved the aircraft from being a total loss." + }, + "gsx$narrativelength": { + "$t": "528" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$543,178" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/be856" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "96" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/8/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: 28 miles southwest of Ghazni, narrative: An armed Predator rolled uncontrollably and crashed in an uninhabited area two hours into a mission. Investigators determined that a software chip on the right wing's control module came loose, likely due to vibrations, locking the right aileron into a fixed position. The chip was attached to the control module with a silicone adhesive but did not appear to bond properly. The mission operator testified that this Predator often broke down: \"It seemed like whenever there was an issue on a plane, that this was the tail number.\" He agreed with investigators' description of the Predator as \"just kind of a little possessed aircraft.\", narrativelength: 635, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,698,281" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/be856" + } + ], + "gsx$crashid": { + "$t": "96" + }, + "gsx$mishapdate": { + "$t": "5/8/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "28 miles southwest of Ghazni" + }, + "gsx$narrative": { + "$t": "An armed Predator rolled uncontrollably and crashed in an uninhabited area two hours into a mission. Investigators determined that a software chip on the right wing's control module came loose, likely due to vibrations, locking the right aileron into a fixed position. The chip was attached to the control module with a silicone adhesive but did not appear to bond properly. The mission operator testified that this Predator often broke down: \"It seemed like whenever there was an issue on a plane, that this was the tail number.\" He agreed with investigators' description of the Predator as \"just kind of a little possessed aircraft.\"" + }, + "gsx$narrativelength": { + "$t": "635" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,698,281" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bfmpn" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "97" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/13/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: in a classified location, narrative: An armed Predator mysteriously vanished in Afghanistan about 5 hours into a flight. The skies were clear and the aircraft was flying well above a mountain range when the return satellite data link was lost to Creech Air Force Base in Nevada. The transponder signal was lost three minutes later. Investigators concluded that there was no evidence of bad weather, icing, fuel loss or pilot error. A sergeant raised the possibility that the aircraft could have had its satellite links hacked or hijacked, saying: \"If somebody else was on the same frequencies, they could have taken over the aircraft or just knocked it out completely.\" Investigators found no evidence of hacking., narrativelength: 676, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,900,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bfmpn" + } + ], + "gsx$crashid": { + "$t": "97" + }, + "gsx$mishapdate": { + "$t": "5/13/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "in a classified location" + }, + "gsx$narrative": { + "$t": "An armed Predator mysteriously vanished in Afghanistan about 5 hours into a flight. The skies were clear and the aircraft was flying well above a mountain range when the return satellite data link was lost to Creech Air Force Base in Nevada. The transponder signal was lost three minutes later. Investigators concluded that there was no evidence of bad weather, icing, fuel loss or pilot error. A sergeant raised the possibility that the aircraft could have had its satellite links hacked or hijacked, saying: \"If somebody else was on the same frequencies, they could have taken over the aircraft or just knocked it out completely.\" Investigators found no evidence of hacking." + }, + "gsx$narrativelength": { + "$t": "676" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,900,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bh1a0" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "98" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/28/2009, mishapyear: 2009, mishapcountry: United States, mishaplocation: Rogers Dry Lake bed, adjacent to airfield at Edwards Air Force Base, Calif., narrative: Edwards Air Force Base officials said a Global Hawk on a test flight made an emergency landing shortly after midnight on a dry lake bed, damaging the right wing and landing gear. The Air Force Materiel Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 298, dronetype: RQ-4A, dronename: Global Hawk, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bh1a0" + } + ], + "gsx$crashid": { + "$t": "98" + }, + "gsx$mishapdate": { + "$t": "5/28/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Rogers Dry Lake bed, adjacent to airfield at Edwards Air Force Base, Calif." + }, + "gsx$narrative": { + "$t": "Edwards Air Force Base officials said a Global Hawk on a test flight made an emergency landing shortly after midnight on a dry lake bed, damaging the right wing and landing gear. The Air Force Materiel Command did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "298" + }, + "gsx$dronetype": { + "$t": "RQ-4A" + }, + "gsx$dronename": { + "$t": "Global Hawk" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bifuh" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "99" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/12/2009, mishapyear: 2009, mishapcountry: United States, mishaplocation: Nevada, narrative: The Air Force withheld information about the circumstances of this crash. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 185, dronetype: RQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bifuh" + } + ], + "gsx$crashid": { + "$t": "99" + }, + "gsx$mishapdate": { + "$t": "6/12/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Nevada" + }, + "gsx$narrative": { + "$t": "The Air Force withheld information about the circumstances of this crash. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "185" + }, + "gsx$dronetype": { + "$t": "RQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b8lvi" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "100" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/4/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: Kandahar Air Base, narrative: The Air Force withheld information about the circumstances of this crash except to say that it did not occur due to \"hostile fire.\" A military incident report published by WikiLeaks said the Reaper crashed during landing at Kandahar Air Base while carrying two Hellfire missiles and other munitions, but they did not detonate. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 438, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b8lvi" + } + ], + "gsx$crashid": { + "$t": "100" + }, + "gsx$mishapdate": { + "$t": "7/4/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "Kandahar Air Base" + }, + "gsx$narrative": { + "$t": "The Air Force withheld information about the circumstances of this crash except to say that it did not occur due to \"hostile fire.\" A military incident report published by WikiLeaks said the Reaper crashed during landing at Kandahar Air Base while carrying two Hellfire missiles and other munitions, but they did not detonate. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "438" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ba0fz" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "101" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/13/2009, mishapyear: 2009, mishapcountry: Iraq, mishaplocation: Ramadi, 1 km south of the Engineer Bridge on the Southern Ramadi bypass, narrative: An armed Predator crashed in a remote area 10 hours into flight after the engine lost power and the aircraft went into a stall. The camera operator testified that the crew had just started to follow a target -- a suspect in a car -- when \"the plane did something weird.\" Investigators determined that the propeller quill shaft failed due to cracks left during the manufacturing process. The quill shaft eventually sheared apart after the cracks widened from normal wear and tear, according to the Air Force report. A report from General Atomics disclosed that another Predator was affected by a similar quill shaft failure recently, but the details were redacted., narrativelength: 663, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,780,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ba0fz" + } + ], + "gsx$crashid": { + "$t": "101" + }, + "gsx$mishapdate": { + "$t": "8/13/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "Ramadi, 1 km south of the Engineer Bridge on the Southern Ramadi bypass" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed in a remote area 10 hours into flight after the engine lost power and the aircraft went into a stall. The camera operator testified that the crew had just started to follow a target -- a suspect in a car -- when \"the plane did something weird.\" Investigators determined that the propeller quill shaft failed due to cracks left during the manufacturing process. The quill shaft eventually sheared apart after the cracks widened from normal wear and tear, according to the Air Force report. A report from General Atomics disclosed that another Predator was affected by a similar quill shaft failure recently, but the details were redacted." + }, + "gsx$narrativelength": { + "$t": "663" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$2,780,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bbf0c" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "102" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/22/2009, mishapyear: 2009, mishapcountry: Iraq, mishaplocation: Tikrit, narrative: An unarmed Hunter crashed next to a highway after a massive fuel leak caused the engine to fail, according to an Army safety investigation report. A crew member reported that the camera showed the fuel \"just spewing out, it looked like Niagara Falls coming over the front of the aircraft.\" The aircraft glided over a populated area but failed to return to base. The crew released the parachute when the aircraft descended to 2,000 feet, but it was too late. \"They would have popped the chute earlier but didn't want to have a parachute being deployed over the city, and this was a concern here,\" the mission commander reported., narrativelength: 627, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: $3,112,882, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bbf0c" + } + ], + "gsx$crashid": { + "$t": "102" + }, + "gsx$mishapdate": { + "$t": "8/22/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "Tikrit" + }, + "gsx$narrative": { + "$t": "An unarmed Hunter crashed next to a highway after a massive fuel leak caused the engine to fail, according to an Army safety investigation report. A crew member reported that the camera showed the fuel \"just spewing out, it looked like Niagara Falls coming over the front of the aircraft.\" The aircraft glided over a populated area but failed to return to base. The crew released the parachute when the aircraft descended to 2,000 feet, but it was too late. \"They would have popped the chute earlier but didn't want to have a parachute being deployed over the city, and this was a concern here,\" the mission commander reported." + }, + "gsx$narrativelength": { + "$t": "627" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "$3,112,882" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bctkt" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "103" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/4/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: 70 miles west of Jalalabad, narrative: An armed Predator crashed into a mountain after the propeller failed 15 hours into a flight. The aircraft dropped 16,300 feet in about three minutes. Investigators attributed the cause to a failed variable pitch propeller servo, a common problem in Predators. Investigators suggested that \"it would be reasonable to conclude that there may be a flaw in the part's design or accepted refurbishment process.\" Investigators noted that 20 other incidents of failed or broken variable pitch propellers were reported in subsequent months., narrativelength: 532, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,960,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bctkt" + } + ], + "gsx$crashid": { + "$t": "103" + }, + "gsx$mishapdate": { + "$t": "9/4/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "70 miles west of Jalalabad" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed into a mountain after the propeller failed 15 hours into a flight. The aircraft dropped 16,300 feet in about three minutes. Investigators attributed the cause to a failed variable pitch propeller servo, a common problem in Predators. Investigators suggested that \"it would be reasonable to conclude that there may be a flaw in the part's design or accepted refurbishment process.\" Investigators noted that 20 other incidents of failed or broken variable pitch propellers were reported in subsequent months." + }, + "gsx$narrativelength": { + "$t": "532" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,960,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bpgoi" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "104" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/11/2009, mishapyear: 2009, mishapcountry: United States, mishaplocation: Holloman Air Force Base, N.M., narrative: Air Force officials said a Predator crashed during takeoff, hitting a fence. The accident occurred one day after a unit of four Predators began flying at Holloman Air Force Base -- the first time there were drone operations at the base. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report. , narrativelength: 349, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bpgoi" + } + ], + "gsx$crashid": { + "$t": "104" + }, + "gsx$mishapdate": { + "$t": "9/11/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Holloman Air Force Base, N.M." + }, + "gsx$narrative": { + "$t": "Air Force officials said a Predator crashed during takeoff, hitting a fence. The accident occurred one day after a unit of four Predators began flying at Holloman Air Force Base -- the first time there were drone operations at the base. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report. " + }, + "gsx$narrativelength": { + "$t": "349" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bqv8z" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "105" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/13/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: Ragh district, a remote area of northern Afghanistan near the Tajikistan border, narrative: An armed Reaper lost its control link while on a combat mission in southern Afghanistan, then flew north for hundreds of miles. An F-15 fighter jet shot down the Reaper just before it crossed into Tajikistan, according to a military incident report published by WikiLeaks. The drone crashed into a mountain near the border in Ragh district. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 443, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bqv8z" + } + ], + "gsx$crashid": { + "$t": "105" + }, + "gsx$mishapdate": { + "$t": "9/13/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "Ragh district, a remote area of northern Afghanistan near the Tajikistan border" + }, + "gsx$narrative": { + "$t": "An armed Reaper lost its control link while on a combat mission in southern Afghanistan, then flew north for hundreds of miles. An F-15 fighter jet shot down the Reaper just before it crossed into Tajikistan, according to a military incident report published by WikiLeaks. The drone crashed into a mountain near the border in Ragh district. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "443" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bs9tc" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "106" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/14/2009, mishapyear: 2009, mishapcountry: Iraq, mishaplocation: 9 miles northeast of Balad Air Base, narrative: An armed Predator crashed after pilots lost control and the data links about nine hours into flight. Investigators blamed a failure of the sero potentiometer or a cable connecting to it. The link was lost because the aircraft lost altitude so quickly, disrupting the satellite connection., narrativelength: 288, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,689,468, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bs9tc" + } + ], + "gsx$crashid": { + "$t": "106" + }, + "gsx$mishapdate": { + "$t": "9/14/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "9 miles northeast of Balad Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed after pilots lost control and the data links about nine hours into flight. Investigators blamed a failure of the sero potentiometer or a cable connecting to it. The link was lost because the aircraft lost altitude so quickly, disrupting the satellite connection." + }, + "gsx$narrativelength": { + "$t": "288" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,689,468" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/btodt" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "107" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/3/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: 78 miles north of Jalalabad, narrative: An armed Predator flew straight into a mountain at 17,000 feet because the pilot was not paying attention, according to an Air Force investigation report. The pilot was rushing to help troops on the ground but ignored warnings from other personnel to watch out for high mountains in the area. Investigators notified the pilot that he is suspected of dereliction of duty. The pilot says he was not warned about the high terrain and only became aware of it shortly before the crash when he looked up at his video screen and saw the mountain straight ahead. \"I knew, with the climbing capability of the Predator, you're not going to out-climb much, if anything,\" the major testified., narrativelength: 680, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,807,680" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/btodt" + } + ], + "gsx$crashid": { + "$t": "107" + }, + "gsx$mishapdate": { + "$t": "10/3/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "78 miles north of Jalalabad" + }, + "gsx$narrative": { + "$t": "An armed Predator flew straight into a mountain at 17,000 feet because the pilot was not paying attention, according to an Air Force investigation report. The pilot was rushing to help troops on the ground but ignored warnings from other personnel to watch out for high mountains in the area. Investigators notified the pilot that he is suspected of dereliction of duty. The pilot says he was not warned about the high terrain and only became aware of it shortly before the crash when he looked up at his video screen and saw the mountain straight ahead. \"I knew, with the climbing capability of the Predator, you're not going to out-climb much, if anything,\" the major testified." + }, + "gsx$narrativelength": { + "$t": "680" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,807,680" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bjueu" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "108" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/14/2009, mishapyear: 2009, mishapcountry: Afghanistan, narrative: A Warrior crashed while returning to base after the Stability Augmentation System became disengaged, according to Army safety officials. The aircraft entered a flat inverted spin and hit the ground. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 333, dronetype: MQ-1B, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bjueu" + } + ], + "gsx$crashid": { + "$t": "108" + }, + "gsx$mishapdate": { + "$t": "11/14/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Warrior crashed while returning to base after the Stability Augmentation System became disengaged, according to Army safety officials. The aircraft entered a flat inverted spin and hit the ground. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " + }, + "gsx$narrativelength": { + "$t": "333" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Warrior" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bl8zb" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "109" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/20/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: 7 miles northwest of Kandahar, narrative: An armed Predator lost link and crashed 20 minutes after takeoff. The wreckage was not found for five weeks. Investigators blamed a catastrophic electrical system failure, most likely caused by a short circuit in an alternator cable. The Predator aborted a mission the day before after a link problem, but it was fixed. In a report, General Atomics said similar catastrophic power shorts have occurred on other aircraft., narrativelength: 420, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,588,282" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bl8zb" + } + ], + "gsx$crashid": { + "$t": "109" + }, + "gsx$mishapdate": { + "$t": "11/20/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "7 miles northwest of Kandahar" + }, + "gsx$narrative": { + "$t": "An armed Predator lost link and crashed 20 minutes after takeoff. The wreckage was not found for five weeks. Investigators blamed a catastrophic electrical system failure, most likely caused by a short circuit in an alternator cable. The Predator aborted a mission the day before after a link problem, but it was fixed. In a report, General Atomics said similar catastrophic power shorts have occurred on other aircraft." + }, + "gsx$narrativelength": { + "$t": "420" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,588,282" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bmnjo" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "110" + }, + "content": { + "type": "text", + "$t": "mishapdate: 12/13/2009, mishapyear: 2009, mishapcountry: Afghanistan, narrative: A Hunter crashed shortly after takeoff. Once the aircraft climbed to about 75 feet, the engine idled and the operator lost control, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending., narrativelength: 301, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bmnjo" + } + ], + "gsx$crashid": { + "$t": "110" + }, + "gsx$mishapdate": { + "$t": "12/13/2009" + }, + "gsx$mishapyear": { + "$t": "2009" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Hunter crashed shortly after takeoff. Once the aircraft climbed to about 75 feet, the engine idled and the operator lost control, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending." + }, + "gsx$narrativelength": { + "$t": "301" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bo245" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "111" + }, + "content": { + "type": "text", + "$t": "mishapdate: 1/15/2010, mishapyear: 2010, mishapcountry: Afghanistan, mishaplocation: a few miles east of Kandahar Air Base, narrative: An armed Predator crashed after a pilot ignored repeated warnings from personnel that she was flying upside down. Crew members warned the pilot that an autopilot sensor had malfunctioned and that she needed to use a backup, manual sensor. According to investigators, the pilot thought the crew was joking when they warned her the Predator would fly upside down with the malfunctioning autopilot sensor. \"I didn't think, clearly understand, I guess, that when he said the plane will flip upside down, that he legitimately meant the plane would go out of control and point towards the ground,\" the pilot testified. When investigators asked her how well her training had prepared her for the incident, she replied: \"Um, I guess I'll just be blunt and say not well.\" The pilot was under suspicion for dereliction of duty., narrativelength: 817, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,800,139" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bo245" + } + ], + "gsx$crashid": { + "$t": "111" + }, + "gsx$mishapdate": { + "$t": "1/15/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "a few miles east of Kandahar Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed after a pilot ignored repeated warnings from personnel that she was flying upside down. Crew members warned the pilot that an autopilot sensor had malfunctioned and that she needed to use a backup, manual sensor. According to investigators, the pilot thought the crew was joking when they warned her the Predator would fly upside down with the malfunctioning autopilot sensor. \"I didn't think, clearly understand, I guess, that when he said the plane will flip upside down, that he legitimately meant the plane would go out of control and point towards the ground,\" the pilot testified. When investigators asked her how well her training had prepared her for the incident, she replied: \"Um, I guess I'll just be blunt and say not well.\" The pilot was under suspicion for dereliction of duty." + }, + "gsx$narrativelength": { + "$t": "817" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,800,139" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c0p7u" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "112" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2/13/2010, mishapyear: 2010, mishapcountry: Afghanistan, narrative: A Hunter crashed shortly after launch, falling about 100 feet west of the runway, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 252, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c0p7u" + } + ], + "gsx$crashid": { + "$t": "112" + }, + "gsx$mishapdate": { + "$t": "2/13/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Hunter crashed shortly after launch, falling about 100 feet west of the runway, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " + }, + "gsx$narrativelength": { + "$t": "252" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c23sb" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "113" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/14/2010, mishapyear: 2010, mishapcountry: Afghanistan, mishaplocation: southern Afghanistan, narrative: A Predator crashed in southern Afghanistan. Air Force officials classified the exact location and withheld details about the circumstances except to say that it was not shot down by hostile fire. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 307, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c23sb" + } + ], + "gsx$crashid": { + "$t": "113" + }, + "gsx$mishapdate": { + "$t": "3/14/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "southern Afghanistan" + }, + "gsx$narrative": { + "$t": "A Predator crashed in southern Afghanistan. Air Force officials classified the exact location and withheld details about the circumstances except to say that it was not shot down by hostile fire. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "307" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c3ico" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "114" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/20/2010, mishapyear: 2010, mishapcountry: United States, mishaplocation: Victorville, Calif., narrative: A Predator crashed while attempting to land after a training mission. Investigators determined that a student pilot first flew too fast, then too slow as the aircraft descended during an attempted go-around landing. Difficult wind conditions were a contributing factor. The president of the Air Force's Accident Investigation Board, Lt. Col. Neil Neaderhiser, an experienced pilot, said Predators are especially difficult to handle. \"Of the eight aircraft types I have flown, from Cessna 152s to F-16s, the MQ-1 is by far the hardest to land.\", narrativelength: 543, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,742,211, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c3ico" + } + ], + "gsx$crashid": { + "$t": "114" + }, + "gsx$mishapdate": { + "$t": "4/20/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Victorville, Calif." + }, + "gsx$narrative": { + "$t": "A Predator crashed while attempting to land after a training mission. Investigators determined that a student pilot first flew too fast, then too slow as the aircraft descended during an attempted go-around landing. Difficult wind conditions were a contributing factor. The president of the Air Force's Accident Investigation Board, Lt. Col. Neil Neaderhiser, an experienced pilot, said Predators are especially difficult to handle. \"Of the eight aircraft types I have flown, from Cessna 152s to F-16s, the MQ-1 is by far the hardest to land.\"" + }, + "gsx$narrativelength": { + "$t": "543" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,742,211" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c4wx5" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "115" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/14/2010, mishapyear: 2010, mishapcountry: Iraq, narrative: A Hunter crashed after it was buffeted by a microburst of wind during an attempted landing go-around, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 272, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c4wx5" + } + ], + "gsx$crashid": { + "$t": "115" + }, + "gsx$mishapdate": { + "$t": "5/14/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Hunter crashed after it was buffeted by a microburst of wind during an attempted landing go-around, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " + }, + "gsx$narrativelength": { + "$t": "272" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bv2y6" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "116" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/28/2010, mishapyear: 2010, mishapcountry: United States, mishaplocation: Victorville, Calif., narrative: An experimental Hummingbird helicopter drone crashed during a test flight. The helicopter ran dry on fuel, leading air to bleed into the fuel system intake and causing an engine shutdown, according to an Army report. Investigators blamed pilot error on the part of the civilian contractors, citing \"operator overconfidence and complacency in operating at a low fuel condition.\" Due to the risk of a \"runaway aircraft,\" the experimental drone had been restricted on its test flights to a maximum range of 304 miles. The Army ordered Boeing, the manufacturer, to pay $100,000 for crashing experimental aircraft., narrativelength: 609, dronetype: A160T Hummingbird, dronename: Hummingbird, ownerservice: Army, ownerservicedupe: Army, damageestimate: $5,000,000, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bv2y6" + } + ], + "gsx$crashid": { + "$t": "116" + }, + "gsx$mishapdate": { + "$t": "7/28/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Victorville, Calif." + }, + "gsx$narrative": { + "$t": "An experimental Hummingbird helicopter drone crashed during a test flight. The helicopter ran dry on fuel, leading air to bleed into the fuel system intake and causing an engine shutdown, according to an Army report. Investigators blamed pilot error on the part of the civilian contractors, citing \"operator overconfidence and complacency in operating at a low fuel condition.\" Due to the risk of a \"runaway aircraft,\" the experimental drone had been restricted on its test flights to a maximum range of 304 miles. The Army ordered Boeing, the manufacturer, to pay $100,000 for crashing experimental aircraft." + }, + "gsx$narrativelength": { + "$t": "609" + }, + "gsx$dronetype": { + "$t": "A160T Hummingbird" + }, + "gsx$dronename": { + "$t": "Hummingbird" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "$5,000,000" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bwhin" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "117" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/28/2010, mishapyear: 2010, mishapcountry: United States, mishaplocation: Cannon Air Force Base runway, N.M., narrative: A Predator on a training mission accelerated too fast down the runway and crashed into a perimeter fence, landing in a corn field. The pilot lost link and control of the aircraft soon after it started moving. According to investigators, a backup ground station \"hostilely\" took control of the aircraft because a crew member inadvertently turned on a transmitter. As a result, the throttle jumped from 0 to 70 percent. That crew member declined to testify. An instructor testified things could have been worse. \"If I had gone down back up through Gulf taxi way with what had happened here, the aircraft would have, at some point, would have been heading right towards the hangar where there are people, other aircraft and that type of thing,\" the instructor testified. \"It could have been a lot worse than a Pred stuck in a fence.\", narrativelength: 830, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $988,149" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bwhin" + } + ], + "gsx$crashid": { + "$t": "117" + }, + "gsx$mishapdate": { + "$t": "7/28/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Cannon Air Force Base runway, N.M." + }, + "gsx$narrative": { + "$t": "A Predator on a training mission accelerated too fast down the runway and crashed into a perimeter fence, landing in a corn field. The pilot lost link and control of the aircraft soon after it started moving. According to investigators, a backup ground station \"hostilely\" took control of the aircraft because a crew member inadvertently turned on a transmitter. As a result, the throttle jumped from 0 to 70 percent. That crew member declined to testify. An instructor testified things could have been worse. \"If I had gone down back up through Gulf taxi way with what had happened here, the aircraft would have, at some point, would have been heading right towards the hangar where there are people, other aircraft and that type of thing,\" the instructor testified. \"It could have been a lot worse than a Pred stuck in a fence.\"" + }, + "gsx$narrativelength": { + "$t": "830" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$988,149" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bxw30" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "118" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/16/2010, mishapyear: 2010, mishapcountry: Iraq, mishaplocation: in a plowed field a couple miles northwest of Balad Air Base, narrative: An armed Predator crashed immediately after takeoff. An investigator blamed pilot error, finding that the pilot forgot to turn on the Stability Augmentation System, which caused the drone to spin out of control. According to the investigation, the pilot and the camera operator failed to notice that the \"SAS on\" message did not appear -- as required by proper procedures -- on their video displays., narrativelength: 399, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,900,278" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bxw30" + } + ], + "gsx$crashid": { + "$t": "118" + }, + "gsx$mishapdate": { + "$t": "8/16/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "in a plowed field a couple miles northwest of Balad Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed immediately after takeoff. An investigator blamed pilot error, finding that the pilot forgot to turn on the Stability Augmentation System, which caused the drone to spin out of control. According to the investigation, the pilot and the camera operator failed to notice that the \"SAS on\" message did not appear -- as required by proper procedures -- on their video displays." + }, + "gsx$narrativelength": { + "$t": "399" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,900,278" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bzanh" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "119" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/18/2010, mishapyear: 2010, mishapcountry: Iraq, narrative: A Warrior presumably crashed after it lost link and controllers were unable to initiate emergency recovery procedures, according to Army safety officials. The aircraft rose to 3,500 feet, then began to drop when radar contact was lost. The Warrior was not recovered. The Army said it did not produce a publicly releasable accident investigation report., narrativelength: 352, dronetype: MQ-1B, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bzanh" + } + ], + "gsx$crashid": { + "$t": "119" + }, + "gsx$mishapdate": { + "$t": "8/18/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Warrior presumably crashed after it lost link and controllers were unable to initiate emergency recovery procedures, according to Army safety officials. The aircraft rose to 3,500 feet, then began to drop when radar contact was lost. The Warrior was not recovered. The Army said it did not produce a publicly releasable accident investigation report." + }, + "gsx$narrativelength": { + "$t": "352" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Warrior" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cbxr6" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "120" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/31/2010, mishapyear: 2010, mishapcountry: United States, mishaplocation: two miles north of Gray Butte Airfield, Palmdale, Calif., narrative: A brand-new Reaper crashed on private property in the California desert during a training mission. About two hours into the flight, the Reaper stalled after it slowed down too much and rolled left, entering into a spin before crashing onto the desert floor. Air Force investigators concluded that the cause was pilot error due to improper control of the aircraft's speed and angle. Investigators also found that the training program did not adequately prepare the pilot for risks associated with a slow flight. \"We were all in disbelief,\" a contractor who was in the ground-control station told investigators. \"We just didn't, I just didn't expect anything to happen on a fairly benign flight.\", narrativelength: 694, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $10,300,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cbxr6" + } + ], + "gsx$crashid": { + "$t": "120" + }, + "gsx$mishapdate": { + "$t": "8/31/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "two miles north of Gray Butte Airfield, Palmdale, Calif." + }, + "gsx$narrative": { + "$t": "A brand-new Reaper crashed on private property in the California desert during a training mission. About two hours into the flight, the Reaper stalled after it slowed down too much and rolled left, entering into a spin before crashing onto the desert floor. Air Force investigators concluded that the cause was pilot error due to improper control of the aircraft's speed and angle. Investigators also found that the training program did not adequately prepare the pilot for risks associated with a slow flight. \"We were all in disbelief,\" a contractor who was in the ground-control station told investigators. \"We just didn't, I just didn't expect anything to happen on a fairly benign flight.\"" + }, + "gsx$narrativelength": { + "$t": "694" + }, + "gsx$dronetype": { + "$t": "MQ-9A" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$10,300,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cdcbn" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "121" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/19/2010, mishapyear: 2010, mishapcountry: Afghanistan, mishaplocation: about 20 miles south of Kabul, narrative: An armed Predator intentionally crashed into a mountain after the engine failed because it ran out of oil. Investigators were unable to determine why the oil system malfunctioned. The crash and fire destroyed most of the aircraft. An explosives team from the U.S. military blew up the remains to prevent the wreckage from falling into enemy hands. According to testimony, the crew had debated whether to return to base after it received warnings that the oil temperature was rising, but temperatures dropped when they activated a cooling fan, so they kept going., narrativelength: 562, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,800,278" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cdcbn" + } + ], + "gsx$crashid": { + "$t": "121" + }, + "gsx$mishapdate": { + "$t": "9/19/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "about 20 miles south of Kabul" + }, + "gsx$narrative": { + "$t": "An armed Predator intentionally crashed into a mountain after the engine failed because it ran out of oil. Investigators were unable to determine why the oil system malfunctioned. The crash and fire destroyed most of the aircraft. An explosives team from the U.S. military blew up the remains to prevent the wreckage from falling into enemy hands. According to testimony, the crew had debated whether to return to base after it received warnings that the oil temperature was rising, but temperatures dropped when they activated a cooling fan, so they kept going." + }, + "gsx$narrativelength": { + "$t": "562" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,800,278" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ceqw0" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "122" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/17/2010, mishapyear: 2010, mishapcountry: Afghanistan, narrative: A Hunter crashed during a landing attempt after missing the first and second arresting cables designed to catch the aircraft, according to Army safety officials. The Hunter kept going off the runway, crossed 300 feet of gravel and smashed into a concrete barrier. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending., narrativelength: 397, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ceqw0" + } + ], + "gsx$crashid": { + "$t": "122" + }, + "gsx$mishapdate": { + "$t": "10/17/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Hunter crashed during a landing attempt after missing the first and second arresting cables designed to catch the aircraft, according to Army safety officials. The Hunter kept going off the runway, crossed 300 feet of gravel and smashed into a concrete barrier. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending." + }, + "gsx$narrativelength": { + "$t": "397" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cg5gh" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "123" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/2/2010, mishapyear: 2010, mishapcountry: Afghanistan, mishaplocation: about 3 miles from Jalalabad Air Base, narrative: An unarmed Hunter crashed about 15 minutes after takeoff when it lost its data links. It took searchers more than an hour to locate the wreckage, which was about three miles from the base in Jalalabad. Many aircraft components were missing from the site and were presumably taken by Afghans, according to an Army safety investigation report. Civilian contractors were operating the drone., narrativelength: 388, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: $3,449,950" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cg5gh" + } + ], + "gsx$crashid": { + "$t": "123" + }, + "gsx$mishapdate": { + "$t": "11/2/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "about 3 miles from Jalalabad Air Base" + }, + "gsx$narrative": { + "$t": "An unarmed Hunter crashed about 15 minutes after takeoff when it lost its data links. It took searchers more than an hour to locate the wreckage, which was about three miles from the base in Jalalabad. Many aircraft components were missing from the site and were presumably taken by Afghans, according to an Army safety investigation report. Civilian contractors were operating the drone." + }, + "gsx$narrativelength": { + "$t": "388" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "$3,449,950" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c6bhi" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "124" + }, + "content": { + "type": "text", + "$t": "mishapdate: 12/9/2010, mishapyear: 2010, mishapcountry: Afghanistan, mishaplocation: 22 nautical miles northeast of Kandahar, narrative: An armed Predator crashed while approaching for landing after a pilot pressed the wrong button on his joystick. Investigators concluded that the pilot inadvertently disabled the Predator's Stability Augmentation System, which keeps the aircraft from wobbling. The pilot was trying to turn off another switch in response to low coolant temperature but acknowledged in testimony that he pressed the \"big red button that says send the aircraft out of control.\" When he realized his mistake, he moved too quickly to reactivate the Stability Augmentation System when the aircraft was pitched down instead of waiting until the aircraft was straight and level. That made things worse, causing the Predator \"to aggressively pitch down further,\" according to the accident report., narrativelength: 770, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c6bhi" + } + ], + "gsx$crashid": { + "$t": "124" + }, + "gsx$mishapdate": { + "$t": "12/9/2010" + }, + "gsx$mishapyear": { + "$t": "2010" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "22 nautical miles northeast of Kandahar" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed while approaching for landing after a pilot pressed the wrong button on his joystick. Investigators concluded that the pilot inadvertently disabled the Predator's Stability Augmentation System, which keeps the aircraft from wobbling. The pilot was trying to turn off another switch in response to low coolant temperature but acknowledged in testimony that he pressed the \"big red button that says send the aircraft out of control.\" When he realized his mistake, he moved too quickly to reactivate the Stability Augmentation System when the aircraft was pitched down instead of waiting until the aircraft was straight and level. That made things worse, causing the Predator \"to aggressively pitch down further,\" according to the accident report." + }, + "gsx$narrativelength": { + "$t": "770" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,400,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c7q1z" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "125" + }, + "content": { + "type": "text", + "$t": "mishapdate: 1/3/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: about 100 nautical miles west of Kandahar Air Base and 30 miles southwest of Highway A1, narrative: An armed Predator crashed in the desert after the aircraft lost power and its satellite link. Investigators concluded that an alternator bearing failed, triggering a shutdown of the electrical system. According to voice recordings from the ground-control station, the pilot and sensor operator received warnings about the alternator but the aircraft soon lost link for about 85 seconds, signaling bigger problems. The crew said they were an hour flight from both Kandahar Air Base and Shindand Air Base and knew they couldn't reach either in time. \"We avoided -- attempted to avoid populated areas, stuff like that, so we were thinking, you know, if we were going to actually put this plane in the dirt, where do we not want to go, essentially,\" the pilot testified. \"And then eventually we just lost link with the airplane and never got it back.\", narrativelength: 847, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c7q1z" + } + ], + "gsx$crashid": { + "$t": "125" + }, + "gsx$mishapdate": { + "$t": "1/3/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "about 100 nautical miles west of Kandahar Air Base and 30 miles southwest of Highway A1" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed in the desert after the aircraft lost power and its satellite link. Investigators concluded that an alternator bearing failed, triggering a shutdown of the electrical system. According to voice recordings from the ground-control station, the pilot and sensor operator received warnings about the alternator but the aircraft soon lost link for about 85 seconds, signaling bigger problems. The crew said they were an hour flight from both Kandahar Air Base and Shindand Air Base and knew they couldn't reach either in time. \"We avoided -- attempted to avoid populated areas, stuff like that, so we were thinking, you know, if we were going to actually put this plane in the dirt, where do we not want to go, essentially,\" the pilot testified. \"And then eventually we just lost link with the airplane and never got it back.\"" + }, + "gsx$narrativelength": { + "$t": "847" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,400,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c94mc" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "126" + }, + "content": { + "type": "text", + "$t": "mishapdate: 1/14/2011, mishapyear: 2011, mishapcountry: Djibouti, mishaplocation: Gulf of Aden, three miles offshore from Djibouti and 52 miles from Camp Lemonnier, narrative: An armed Predator crashed in the Gulf of Aden after its engine failed nine hours into a flight. Investigators concluded that cylinder malfunction and oil loss caused the engine failure but couldn't pinpoint the problem because the Predator sank in 150 feet of water and was not recovered. The drone's engine had been replaced one week earlier, but crews had to abort three other recent flights because of low oil pressure. Maintenance crews made a variety of repairs, and the aircraft flew a sortie on Jan. 13 without incident. \"It has a history of maintenance for engine problems, oil problems on that aircraft,\" the sensor operator testified. \"Without recovering the engine, we don't know exactly what happened.\", narrativelength: 714, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,120,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c94mc" + } + ], + "gsx$crashid": { + "$t": "126" + }, + "gsx$mishapdate": { + "$t": "1/14/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Djibouti" + }, + "gsx$mishaplocation": { + "$t": "Gulf of Aden, three miles offshore from Djibouti and 52 miles from Camp Lemonnier" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed in the Gulf of Aden after its engine failed nine hours into a flight. Investigators concluded that cylinder malfunction and oil loss caused the engine failure but couldn't pinpoint the problem because the Predator sank in 150 feet of water and was not recovered. The drone's engine had been replaced one week earlier, but crews had to abort three other recent flights because of low oil pressure. Maintenance crews made a variety of repairs, and the aircraft flew a sortie on Jan. 13 without incident. \"It has a history of maintenance for engine problems, oil problems on that aircraft,\" the sensor operator testified. \"Without recovering the engine, we don't know exactly what happened.\"" + }, + "gsx$narrativelength": { + "$t": "714" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,120,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/caj6t" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "127" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2/7/2011, mishapyear: 2011, mishapcountry: Iraq, narrative: A Warrior crashed after an operator entered the incorrect altitude in the navigator mode, according to Army safety officials. The Army said it did not conduct a publicly releasable investigation., dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/caj6t" + } + ], + "gsx$crashid": { + "$t": "127" + }, + "gsx$mishapdate": { + "$t": "2/7/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Warrior crashed after an operator entered the incorrect altitude in the navigator mode, according to Army safety officials. The Army said it did not conduct a publicly releasable investigation." + }, + "gsx$narrativelength": { + "$t": "" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hmyxm" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "128" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/15/2011, mishapyear: 2011, mishapcountry: Djibouti, mishaplocation: Camp Lemonnier, narrative: An armed Predator crashed on the runway at an airport shared by U.S. military and civilian airliners in Djibouti. The Predator came in too fast and too steep for landing and smashed into a perimeter fence. Investigators concluded that the cause was a combination of mechanical problems with the throttle and pilot error. The pilot was advised that he was under suspicion for dereliction of duty for failing to follow proper procedures during landing. A military officer testified that the incident was the fourth involving an MQ-1 Predator in recent months. \"I have no illusions that this won't happen again, whether it's an MQ-1 or otherwise,\" the officer said. A drone squadron commander testified that the doomed drone was \"one of our hangar queens, if you will. It flew regularly but it had one of the worst maintenance records of the aircraft we had on station at the time.\", narrativelength: 879, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,357,000, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hmyxm" + } + ], + "gsx$crashid": { + "$t": "128" + }, + "gsx$mishapdate": { + "$t": "3/15/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Djibouti" + }, + "gsx$mishaplocation": { + "$t": "Camp Lemonnier" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed on the runway at an airport shared by U.S. military and civilian airliners in Djibouti. The Predator came in too fast and too steep for landing and smashed into a perimeter fence. Investigators concluded that the cause was a combination of mechanical problems with the throttle and pilot error. The pilot was advised that he was under suspicion for dereliction of duty for failing to follow proper procedures during landing. A military officer testified that the incident was the fourth involving an MQ-1 Predator in recent months. \"I have no illusions that this won't happen again, whether it's an MQ-1 or otherwise,\" the officer said. A drone squadron commander testified that the doomed drone was \"one of our hangar queens, if you will. It flew regularly but it had one of the worst maintenance records of the aircraft we had on station at the time.\"" + }, + "gsx$narrativelength": { + "$t": "879" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$1,357,000" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hodi3" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "129" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/16/2011, mishapyear: 2011, mishapcountry: United States, mishaplocation: California, narrative: A Gray Eagle crashed during a high-altitude test flight, according to Army safety officials. The Army said it did not conduct a publicly releasable accident report., dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hodi3" + } + ], + "gsx$crashid": { + "$t": "129" + }, + "gsx$mishapdate": { + "$t": "3/16/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "California" + }, + "gsx$narrative": { + "$t": "A Gray Eagle crashed during a high-altitude test flight, according to Army safety officials. The Army said it did not conduct a publicly releasable accident report." + }, + "gsx$narrativelength": { + "$t": "" + }, + "gsx$dronetype": { + "$t": "MQ-1C" + }, + "gsx$dronename": { + "$t": "Gray Eagle" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hps2g" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "130" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/1/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: 115 miles northeast of Kandahar Air Base, narrative: A Predator crashed in a remote area after the engine failed. Investigators concluded that a mechanical bearing failed and contaminated the oil system with metal shavings and other debris. The pilot crashed the aircraft about a mile from a military forward operating base. The drone was damaged but not destroyed. U.S. ground troops recovered the aircraft but had to cut off the wings so they could fit the drone on their Humvees., narrativelength: 429, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,020,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hps2g" + } + ], + "gsx$crashid": { + "$t": "130" + }, + "gsx$mishapdate": { + "$t": "5/1/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "115 miles northeast of Kandahar Air Base" + }, + "gsx$narrative": { + "$t": "A Predator crashed in a remote area after the engine failed. Investigators concluded that a mechanical bearing failed and contaminated the oil system with metal shavings and other debris. The pilot crashed the aircraft about a mile from a military forward operating base. The drone was damaged but not destroyed. U.S. ground troops recovered the aircraft but had to cut off the wings so they could fit the drone on their Humvees." + }, + "gsx$narrativelength": { + "$t": "429" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$2,020,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hr6mx" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "131" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/5/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: 0.5 nautical miles northeast of Kandahar Air Base, narrative: An armed Predator crashed into a base perimeter fence near a bunch of shipping containers during an emergency landing. Investigators attributed the cause of the accident to a combination of mechanical problems and pilot error. The engine failed because of a malfunctioning cooling system. According to the investigation, the pilot knew the engine was about to seize up during the emergency descent but didn't recognize it had already stopped a few minutes earlier. \"Where the hell is -- where is the runway? It's all the way over here. I overshot,\" the pilot shouted, according to a transcript of the voice recorder in the ground-control station. Oh shit, oh damn, oh my God what is that!? ... What was all that stuff that I just hit?\" , narrativelength: 736, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,200,000, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hr6mx" + } + ], + "gsx$crashid": { + "$t": "131" + }, + "gsx$mishapdate": { + "$t": "5/5/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "0.5 nautical miles northeast of Kandahar Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed into a base perimeter fence near a bunch of shipping containers during an emergency landing. Investigators attributed the cause of the accident to a combination of mechanical problems and pilot error. The engine failed because of a malfunctioning cooling system. According to the investigation, the pilot knew the engine was about to seize up during the emergency descent but didn't recognize it had already stopped a few minutes earlier. \"Where the hell is -- where is the runway? It's all the way over here. I overshot,\" the pilot shouted, according to a transcript of the voice recorder in the ground-control station. Oh shit, oh damn, oh my God what is that!? ... What was all that stuff that I just hit?\" " + }, + "gsx$narrativelength": { + "$t": "736" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,200,000" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hhcny" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "132" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/7/2011, mishapyear: 2011, mishapcountry: Djibouti, mishaplocation: 1.5 miles off the coast of Djibouti, about 3 miles east of Camp Lemonnier, narrative: An armed Predator crashed in the sea off the coast of Djibouti as it was descending for an emergency landing. The drone \"violently\" rolled right and then uncontrollably rolled left because of electrical problems in the right-wing control module, according to investigators. The sensor operator testified that the aircraft had a history of doing \"weird stuff,\" and when it made its final roll, \"it pitched real hard, it was the hardest bank I had ever seen a Pred do.\" He added: \"It just gave it up. It just nosed over on its belly and just went straight for the ground. ... It was one of those moments when you feel your heart sink and, well, there it goes. And I mean, it pretty much did its own thing, it pretty much gave up, it wasn't taking inputs whatsoever. It just completely nosed over. Then the screen went black, and that was it.\", narrativelength: 840, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hhcny" + } + ], + "gsx$crashid": { + "$t": "132" + }, + "gsx$mishapdate": { + "$t": "5/7/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Djibouti" + }, + "gsx$mishaplocation": { + "$t": "1.5 miles off the coast of Djibouti, about 3 miles east of Camp Lemonnier" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed in the sea off the coast of Djibouti as it was descending for an emergency landing. The drone \"violently\" rolled right and then uncontrollably rolled left because of electrical problems in the right-wing control module, according to investigators. The sensor operator testified that the aircraft had a history of doing \"weird stuff,\" and when it made its final roll, \"it pitched real hard, it was the hardest bank I had ever seen a Pred do.\" He added: \"It just gave it up. It just nosed over on its belly and just went straight for the ground. ... It was one of those moments when you feel your heart sink and, well, there it goes. And I mean, it pretty much did its own thing, it pretty much gave up, it wasn't taking inputs whatsoever. It just completely nosed over. Then the screen went black, and that was it.\"" + }, + "gsx$narrativelength": { + "$t": "840" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,400,000" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hir8f" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "133" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/13/2011, mishapyear: 2011, mishapcountry: United States, mishaplocation: Gulf of Mexico, 16 nautical miles south of Tyndall Air Force Base, Fla., narrative: An aerial target drone crashed in the Gulf of Mexico. Investigators blamed the crash on an electrical malfunction that caused the drone to fly in a nearly inverted position. The aircraft crashed into waters about four nautical miles from the nearest boat, according to the accident investigation report., narrativelength: 303, dronetype: QRF-4C, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,801,574, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hir8f" + } + ], + "gsx$crashid": { + "$t": "133" + }, + "gsx$mishapdate": { + "$t": "5/13/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Gulf of Mexico, 16 nautical miles south of Tyndall Air Force Base, Fla." + }, + "gsx$narrative": { + "$t": "An aerial target drone crashed in the Gulf of Mexico. Investigators blamed the crash on an electrical malfunction that caused the drone to fly in a nearly inverted position. The aircraft crashed into waters about four nautical miles from the nearest boat, according to the accident investigation report." + }, + "gsx$narrativelength": { + "$t": "303" + }, + "gsx$dronetype": { + "$t": "QRF-4C" + }, + "gsx$dronename": { + "$t": "Phantom" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$2,801,574" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hk5ss" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "134" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/17/2011, mishapyear: 2011, mishapcountry: Djibouti, mishaplocation: 2.4 nautical miles west of Camp Lemonnier, narrative: An armed Predator crashed a couple miles short of the runway near a residential area in Djibouti, the fourth Predator crash in Djibouti in four months. Investigators attributed the cause to a combination of mechanical problems and pilot error. Sensors gave inaccurate altitude readings and the crew failed to recognize the problem, in part because the camera was fogged over. \"Dude, look at this camera. Seriously, I can't do anything. There's nothing I can do,\" the camera operator said to the pilot, according to a voice-recording transcript. \"Yeah, dude, I literally have no picture right now. This camera's like, completely messed up.\" The pilot didn't realize he was too low until he was 20 feet above ground level. The aircraft was trying to return to base after a 17-hour mission because of an oil leak, but investigators concluded that problem did not contribute to the crash., narrativelength: 884, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,983,766, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hk5ss" + } + ], + "gsx$crashid": { + "$t": "134" + }, + "gsx$mishapdate": { + "$t": "5/17/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Djibouti" + }, + "gsx$mishaplocation": { + "$t": "2.4 nautical miles west of Camp Lemonnier" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed a couple miles short of the runway near a residential area in Djibouti, the fourth Predator crash in Djibouti in four months. Investigators attributed the cause to a combination of mechanical problems and pilot error. Sensors gave inaccurate altitude readings and the crew failed to recognize the problem, in part because the camera was fogged over. \"Dude, look at this camera. Seriously, I can't do anything. There's nothing I can do,\" the camera operator said to the pilot, according to a voice-recording transcript. \"Yeah, dude, I literally have no picture right now. This camera's like, completely messed up.\" The pilot didn't realize he was too low until he was 20 feet above ground level. The aircraft was trying to return to base after a 17-hour mission because of an oil leak, but investigators concluded that problem did not contribute to the crash." + }, + "gsx$narrativelength": { + "$t": "884" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$2,983,766" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hlkd9" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "135" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/20/2011, mishapyear: 2011, mishapcountry: United States, mishaplocation: Creech Air Force Base, Nev., narrative: A Reaper crashed after takeoff from Creech Air Force Base, but the Air Force withheld details of the circumstances. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 227, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hlkd9" + } + ], + "gsx$crashid": { + "$t": "135" + }, + "gsx$mishapdate": { + "$t": "5/20/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Creech Air Force Base, Nev." + }, + "gsx$narrative": { + "$t": "A Reaper crashed after takeoff from Creech Air Force Base, but the Air Force withheld details of the circumstances. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "227" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hy7gy" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "136" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/5/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: 60 nautical miles northeast of Jalalabad, narrative: An armed Predator was struck by lightning and presumably crashed. The aircraft lost satellite links after the lightning struck and was not recovered. The crew knew it was flying in the vicinity of thunderstorms but had an urgent mission to assist ground troops in the area who were under enemy fire., narrativelength: 299, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hy7gy" + } + ], + "gsx$crashid": { + "$t": "136" + }, + "gsx$mishapdate": { + "$t": "6/5/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "60 nautical miles northeast of Jalalabad" + }, + "gsx$narrative": { + "$t": "An armed Predator was struck by lightning and presumably crashed. The aircraft lost satellite links after the lightning struck and was not recovered. The crew knew it was flying in the vicinity of thunderstorms but had an urgent mission to assist ground troops in the area who were under enemy fire." + }, + "gsx$narrativelength": { + "$t": "299" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,400,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hzm1f" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "137" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/28/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: about 20 nautical miles northeast of Jalalabad Air Base, narrative: An armed Predator crashed after it flew into bad weather and lost its links. The aircraft flew into severe turbulence and plunged 8,600 feet in 80 seconds, according to the report. The drone was forced to fly through bad weather because it was supporting ground troops in the area. \"We kind of just sat there and looked at each other, hoping that it would regain its link,\" the pilot testified. The Predator was unable to fly its preprogrammed emergency mission. \"All of a sudden, just like a snap, everything pretty much went,\" the camera operator testified. \"Not exactly like a black screen or so, but pretty much to that effect.\" According to the mission coordinator, ground troops in the area reported seeing \"something fall out of the sky,\" which turned out to be the stricken Predator., narrativelength: 791, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hzm1f" + } + ], + "gsx$crashid": { + "$t": "137" + }, + "gsx$mishapdate": { + "$t": "6/28/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "about 20 nautical miles northeast of Jalalabad Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed after it flew into bad weather and lost its links. The aircraft flew into severe turbulence and plunged 8,600 feet in 80 seconds, according to the report. The drone was forced to fly through bad weather because it was supporting ground troops in the area. \"We kind of just sat there and looked at each other, hoping that it would regain its link,\" the pilot testified. The Predator was unable to fly its preprogrammed emergency mission. \"All of a sudden, just like a snap, everything pretty much went,\" the camera operator testified. \"Not exactly like a black screen or so, but pretty much to that effect.\" According to the mission coordinator, ground troops in the area reported seeing \"something fall out of the sky,\" which turned out to be the stricken Predator." + }, + "gsx$narrativelength": { + "$t": "791" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,400,000" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i10ls" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "138" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/10/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: last seen about 20 miles south of Jalalabad, narrative: An armed Predator disappeared and presumably crashed. It was the third Predator crash near Jalalabad in five weeks. In each case, the drones lost their satellite links and did not fly their emergency preprogrammed mission. Unlike the previous two accidents, the weather in this case was clear and investigators were unable to determine a cause. They found no evidence of maintenance or operational problems prior to the lost link. The aircraft had been flying for about 19 hours but still had 138 gallons of fuel in the tank., narrativelength: 525, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i10ls" + } + ], + "gsx$crashid": { + "$t": "138" + }, + "gsx$mishapdate": { + "$t": "7/10/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "last seen about 20 miles south of Jalalabad" + }, + "gsx$narrative": { + "$t": "An armed Predator disappeared and presumably crashed. It was the third Predator crash near Jalalabad in five weeks. In each case, the drones lost their satellite links and did not fly their emergency preprogrammed mission. Unlike the previous two accidents, the weather in this case was clear and investigators were unable to determine a cause. They found no evidence of maintenance or operational problems prior to the lost link. The aircraft had been flying for about 19 hours but still had 138 gallons of fuel in the tank." + }, + "gsx$narrativelength": { + "$t": "525" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,400,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i2f69" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "139" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/15/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: Sharana airstrip, Paktika province, narrative: An Army Shadow drone crashed into a C-130 Hercules aircraft as both were preparing to land at a forward operating base in eastern Afghanistan. According to an Air Force safety report, the Shadow smashed into the cargo plane’s left wing between two propellers. Jet fuel cascaded out of a gash in the wing. \"Holy shit!\" the cargo plane's navigator shouted, according to a voice-recording transcript. \"We got hit by a UAV! We got hit by a UAV!\" The Hercules crew shut down one engine and radioed to clear the runway. Within two minutes, the plane landed, smoke pouring from the left side.\"There's a big frickin' hole in the airplane,\" the pilot reported. No one was injured. The official cause was redacted from the Air Force report, but other documents suggest an air-traffic controller was temporarily demoted and received remedial training afterward., narrativelength: 850, dronetype: RQ-7B, dronename: Shadow, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i2f69" + } + ], + "gsx$crashid": { + "$t": "139" + }, + "gsx$mishapdate": { + "$t": "8/15/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "Sharana airstrip, Paktika province" + }, + "gsx$narrative": { + "$t": "An Army Shadow drone crashed into a C-130 Hercules aircraft as both were preparing to land at a forward operating base in eastern Afghanistan. According to an Air Force safety report, the Shadow smashed into the cargo plane’s left wing between two propellers. Jet fuel cascaded out of a gash in the wing. \"Holy shit!\" the cargo plane's navigator shouted, according to a voice-recording transcript. \"We got hit by a UAV! We got hit by a UAV!\" The Hercules crew shut down one engine and radioed to clear the runway. Within two minutes, the plane landed, smoke pouring from the left side.\"There's a big frickin' hole in the airplane,\" the pilot reported. No one was injured. The official cause was redacted from the Air Force report, but other documents suggest an air-traffic controller was temporarily demoted and received remedial training afterward." + }, + "gsx$narrativelength": { + "$t": "850" + }, + "gsx$dronetype": { + "$t": "RQ-7B" + }, + "gsx$dronename": { + "$t": "Shadow" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hsl7a" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "140" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/20/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: 2 miles southwest of Jalalabad Airfield, narrative: An armed Predator crashed into a residential area in Jalalabad after a mechanical breakdown. No one was injured, but the aircraft burst into flames and damaged two Afghan housing compounds. The owners were compensated an undisclosed sum by the U.S. Army foreign claims commission, according to the Air Force accident investigation report. Investigators blamed the accident on a broken variable pitch propeller quill shaft. The crew realized they couldn't make it back to the airfield, so they scanned the ground for a place to crash. \"I looked below us and there were houses everywhere,\" the camera operator testified. \"We were above the city, there, there wasn't a whole lot we could aim for except for that.\", narrativelength: 710, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,844,825, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hsl7a" + } + ], + "gsx$crashid": { + "$t": "140" + }, + "gsx$mishapdate": { + "$t": "8/20/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "2 miles southwest of Jalalabad Airfield" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed into a residential area in Jalalabad after a mechanical breakdown. No one was injured, but the aircraft burst into flames and damaged two Afghan housing compounds. The owners were compensated an undisclosed sum by the U.S. Army foreign claims commission, according to the Air Force accident investigation report. Investigators blamed the accident on a broken variable pitch propeller quill shaft. The crew realized they couldn't make it back to the airfield, so they scanned the ground for a place to crash. \"I looked below us and there were houses everywhere,\" the camera operator testified. \"We were above the city, there, there wasn't a whole lot we could aim for except for that.\"" + }, + "gsx$narrativelength": { + "$t": "710" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,844,825" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/htzrr" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "141" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/20/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: 105 nautical miles northwest of Kandahar; between Kandahar and Shindand Air Base (Shindand was nearest airfield), narrative: A Global Hawk on a communications-relay mission over Afghanistan crashed after it lost link nine hours into a flight at 51,000 feet; it kept flying autonomously for about 30 seconds, then went into a steep dive, according to the Air Force's accident investigation report. The aircraft lost altitude so quickly that the wings sheared off. Investigators could not definitively determine a cause but found that it was likely because of an electrical malfunction. A loose connector interrupted power to the aileron and spoiler flight-control actuators, rendering the aircraft uncontrollable., narrativelength: 587, dronetype: EQ-4B, dronename: Global Hawk, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $72,800,000, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/htzrr" + } + ], + "gsx$crashid": { + "$t": "141" + }, + "gsx$mishapdate": { + "$t": "8/20/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "105 nautical miles northwest of Kandahar; between Kandahar and Shindand Air Base (Shindand was nearest airfield)" + }, + "gsx$narrative": { + "$t": "A Global Hawk on a communications-relay mission over Afghanistan crashed after it lost link nine hours into a flight at 51,000 feet; it kept flying autonomously for about 30 seconds, then went into a steep dive, according to the Air Force's accident investigation report. The aircraft lost altitude so quickly that the wings sheared off. Investigators could not definitively determine a cause but found that it was likely because of an electrical malfunction. A loose connector interrupted power to the aileron and spoiler flight-control actuators, rendering the aircraft uncontrollable." + }, + "gsx$narrativelength": { + "$t": "587" + }, + "gsx$dronetype": { + "$t": "EQ-4B" + }, + "gsx$dronename": { + "$t": "Global Hawk" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$72,800,000" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hvec4" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "142" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/24/2011, mishapyear: 2011, mishapcountry: United States, mishaplocation: Holloman Air Force Base, N.M., narrative: A Reaper on a training mission crashed during landing about 1:30 p.m. at Holloman Air Force Base. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 209, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hvec4" + } + ], + "gsx$crashid": { + "$t": "142" + }, + "gsx$mishapdate": { + "$t": "8/24/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Holloman Air Force Base, N.M." + }, + "gsx$narrative": { + "$t": "A Reaper on a training mission crashed during landing about 1:30 p.m. at Holloman Air Force Base. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "209" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hwswl" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "143" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/22/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: Sar-E Pul province, narrative: An Armed Warrior crashed in a remote area after its engine seized up. As the aircraft was flying about 200 miles from its departure point at Bagram air base, the camera showed a fluid leak. About 20 minutes later, the engine seized and the aircraft steadily lost altitude before crashing, according to an Army safety investigation report., narrativelength: 338, dronetype: MQ-1B, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army, damageestimate: 3,892,524.00" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hwswl" + } + ], + "gsx$crashid": { + "$t": "143" + }, + "gsx$mishapdate": { + "$t": "9/22/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "Sar-E Pul province" + }, + "gsx$narrative": { + "$t": "An Armed Warrior crashed in a remote area after its engine seized up. As the aircraft was flying about 200 miles from its departure point at Bagram air base, the camera showed a fluid leak. About 20 minutes later, the engine seized and the aircraft steadily lost altitude before crashing, according to an Army safety investigation report." + }, + "gsx$narrativelength": { + "$t": "338" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Warrior" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "3,892,524.00" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i9g0a" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "144" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/7/2011, mishapyear: 2011, mishapcountry: United States, mishaplocation: Holloman Air Force Base, N.M., narrative: A Reaper crashed during landing about 6:45 p.m., the second Reaper crash at Holloman Air Force Base in six weeks. A base spokesman said investigators were looking into reports that the Reaper may have struck a power line. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 333, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i9g0a" + } + ], + "gsx$crashid": { + "$t": "144" + }, + "gsx$mishapdate": { + "$t": "10/7/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Holloman Air Force Base, N.M." + }, + "gsx$narrative": { + "$t": "A Reaper crashed during landing about 6:45 p.m., the second Reaper crash at Holloman Air Force Base in six weeks. A base spokesman said investigators were looking into reports that the Reaper may have struck a power line. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "333" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iaukr" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "145" + }, + "content": { + "type": "text", + "$t": "mishapdate: 12/4/2011, mishapyear: 2011, mishapcountry: Iran, mishaplocation: Kashmar, narrative: A stealth surveillance drone, operated by the Air Force and the CIA, crashed in Iranian territory for reasons that remain unclear. The Iranian government announced that it had captured the aircraft through a cyberattack. U.S. officials cast doubt on the Iranian assertion but have not provided a consistent explanation for how it lost the Sentinel. After the Iranian government released photographs of the Sentinel, the U.S. Defense Department announced that it had lost a drone that it said had been on a surveillance mission in western Afghanistan. U.S. officials later acknowledged that the drone had been on a mission for the CIA., narrativelength: 634, dronetype: RQ-170, dronename: Sentinel, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iaukr" + } + ], + "gsx$crashid": { + "$t": "145" + }, + "gsx$mishapdate": { + "$t": "12/4/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Iran" + }, + "gsx$mishaplocation": { + "$t": "Kashmar" + }, + "gsx$narrative": { + "$t": "A stealth surveillance drone, operated by the Air Force and the CIA, crashed in Iranian territory for reasons that remain unclear. The Iranian government announced that it had captured the aircraft through a cyberattack. U.S. officials cast doubt on the Iranian assertion but have not provided a consistent explanation for how it lost the Sentinel. After the Iranian government released photographs of the Sentinel, the U.S. Defense Department announced that it had lost a drone that it said had been on a surveillance mission in western Afghanistan. U.S. officials later acknowledged that the drone had been on a mission for the CIA." + }, + "gsx$narrativelength": { + "$t": "634" + }, + "gsx$dronetype": { + "$t": "RQ-170" + }, + "gsx$dronename": { + "$t": "Sentinel" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ic954" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "146" + }, + "content": { + "type": "text", + "$t": "mishapdate: 12/13/2011, mishapyear: 2011, mishapcountry: Seychelles, mishaplocation: Victoria, narrative: An unarmed Reaper crashed on the runway at an international airport. The pilot, an employee of an Air Force contractor, came in too high, too fast and landed almost halfway down the runway, according to an Air Force accident investigation report. The Reaper bounced over the airport perimeter road, struck a rock breakwater and landed in the ocean. Investigators attributed the mishap to a combination of pilot error and a mechanical malfunction. Investigators found that an electrical short occurred in a cable assembly but could not conclusively determine why., narrativelength: 562, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $9,643,000, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ic954" + } + ], + "gsx$crashid": { + "$t": "146" + }, + "gsx$mishapdate": { + "$t": "12/13/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Seychelles" + }, + "gsx$mishaplocation": { + "$t": "Victoria" + }, + "gsx$narrative": { + "$t": "An unarmed Reaper crashed on the runway at an international airport. The pilot, an employee of an Air Force contractor, came in too high, too fast and landed almost halfway down the runway, according to an Air Force accident investigation report. The Reaper bounced over the airport perimeter road, struck a rock breakwater and landed in the ocean. Investigators attributed the mishap to a combination of pilot error and a mechanical malfunction. Investigators found that an electrical short occurred in a cable assembly but could not conclusively determine why." + }, + "gsx$narrativelength": { + "$t": "562" + }, + "gsx$dronetype": { + "$t": "MQ-9A" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$9,643,000" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/idnpl" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "147" + }, + "content": { + "type": "text", + "$t": "mishapdate: 12/27/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: in a classified location, narrative: A Predator crashed in a classified location in Afghanistan following a lost link and a suspected power plant failure, according to the Air Force Special Operations Command. Air Force officials said they blew up the aircraft's wreckage because it was in a remote area and it was not practical to recover. The Air Force Special Operations Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 433, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/idnpl" + } + ], + "gsx$crashid": { + "$t": "147" + }, + "gsx$mishapdate": { + "$t": "12/27/2011" + }, + "gsx$mishapyear": { + "$t": "2011" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "in a classified location" + }, + "gsx$narrative": { + "$t": "A Predator crashed in a classified location in Afghanistan following a lost link and a suspected power plant failure, according to the Air Force Special Operations Command. Air Force officials said they blew up the aircraft's wreckage because it was in a remote area and it was not practical to recover. The Air Force Special Operations Command did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "433" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i3tqm" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "148" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2012 - specific date classified, mishapyear: 2012, mishapcountry: Classified, narrative: The Air Force classified the precise date of this Predator accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 224, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i3tqm" + } + ], + "gsx$crashid": { + "$t": "148" + }, + "gsx$mishapdate": { + "$t": "2012 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this Predator accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "224" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i58b3" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "149" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2012 - specific date classified, mishapyear: 2012, mishapcountry: Classified, narrative: The Air Force classified the precise date of this Reaper accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 222, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i58b3" + } + ], + "gsx$crashid": { + "$t": "149" + }, + "gsx$mishapdate": { + "$t": "2012 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this Reaper accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "222" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i6mvg" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "150" + }, + "content": { + "type": "text", + "$t": "mishapdate: 1/10/2012, mishapyear: 2012, mishapcountry: United States, mishaplocation: Georgia, narrative: A Hunter crashed during a bungled landing. The drone was caught by an arresting cable during the landing but the nose wheel collapsed, according to Army safety officials. The Hunter swerved and ran off the runway, damaging the propeller. The Army said it did not conduct a publicly releasable accident investigation., narrativelength: 316, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i6mvg" + } + ], + "gsx$crashid": { + "$t": "150" + }, + "gsx$mishapdate": { + "$t": "1/10/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Georgia" + }, + "gsx$narrative": { + "$t": "A Hunter crashed during a bungled landing. The drone was caught by an arresting cable during the landing but the nose wheel collapsed, according to Army safety officials. The Hunter swerved and ran off the runway, damaging the propeller. The Army said it did not conduct a publicly releasable accident investigation." + }, + "gsx$narrativelength": { + "$t": "316" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i81fx" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "151" + }, + "content": { + "type": "text", + "$t": "mishapdate: 1/30/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: one to two miles southwest of Kandahar Air Base, narrative: An armed Predator crashed after attempting an emergency landing at Kandahar Air Base due to engine trouble. The engine malfunctioned because of a damaged coolant pump supply line; investigators determined that maintenance crews failed to notice the problem during a scheduled inspection. Investigators also partly blamed pilot error for improperly handing over remote control of the aircraft to a local recovery crew. The problems started when the crew received warnings of an overheated engine and used the infrared camera on the aircraft to see \"a warm liquid dripping from the engine compartment.\" As it neared Kandahar, the crew realized it would not reach the base so it tried to avoid crashing. \"If we would have continued to try to make the runway, we wouldn't have made it and it could have cost people their lives. I'm sure it would have,\" one of the pilots testified., narrativelength: 877, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,500,000, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i81fx" + } + ], + "gsx$crashid": { + "$t": "151" + }, + "gsx$mishapdate": { + "$t": "1/30/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "one to two miles southwest of Kandahar Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed after attempting an emergency landing at Kandahar Air Base due to engine trouble. The engine malfunctioned because of a damaged coolant pump supply line; investigators determined that maintenance crews failed to notice the problem during a scheduled inspection. Investigators also partly blamed pilot error for improperly handing over remote control of the aircraft to a local recovery crew. The problems started when the crew received warnings of an overheated engine and used the infrared camera on the aircraft to see \"a warm liquid dripping from the engine compartment.\" As it neared Kandahar, the crew realized it would not reach the base so it tried to avoid crashing. \"If we would have continued to try to make the runway, we wouldn't have made it and it could have cost people their lives. I'm sure it would have,\" one of the pilots testified." + }, + "gsx$narrativelength": { + "$t": "877" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,500,000" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ikojm" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "152" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2/14/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: 1.1 miles northeast of the runway in a farm field, Jalalabad, narrative: An armed Predator crashed into a field near Jalalabad. Investigators determined that both alternators on the aircraft failed but that pilot error was also to blame because the crew \"failed to land the [Predator] as soon as possible, and instead displayed extremely poor judgment by electing to maneuver the [aircraft] over the airfield.\" The crash resulted in damage to crops, and the explosion blew out windows in nearby buildings. The U.S. military compensated the Afghan owners an undisclosed sum, according to the Air Force accident investigation report., narrativelength: 558, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,960,209.91, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ikojm" + } + ], + "gsx$crashid": { + "$t": "152" + }, + "gsx$mishapdate": { + "$t": "2/14/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "1.1 miles northeast of the runway in a farm field, Jalalabad" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed into a field near Jalalabad. Investigators determined that both alternators on the aircraft failed but that pilot error was also to blame because the crew \"failed to land the [Predator] as soon as possible, and instead displayed extremely poor judgment by electing to maneuver the [aircraft] over the airfield.\" The crash resulted in damage to crops, and the explosion blew out windows in nearby buildings. The U.S. military compensated the Afghan owners an undisclosed sum, according to the Air Force accident investigation report." + }, + "gsx$narrativelength": { + "$t": "558" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,960,209.91" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/im343" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "153" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2/21/2012, mishapyear: 2012, mishapcountry: Djibouti, mishaplocation: 90 miles off the coast of Djibouti City, narrative: An armed Predator crashed into the Gulf of Aden after the engine failed because the oil ran dry. Investigators determined that a turbocharger failed and damaged an oil seal, resulting in the oil leak. As the aircraft lost altitude, the pilot testified that he knew he could not make it safely back to the military base in Djibouti, so he intentionally flew over the Gulf to avoid crashing over a populated area., narrativelength: 411, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/im343" + } + ], + "gsx$crashid": { + "$t": "153" + }, + "gsx$mishapdate": { + "$t": "2/21/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Djibouti" + }, + "gsx$mishaplocation": { + "$t": "90 miles off the coast of Djibouti City" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed into the Gulf of Aden after the engine failed because the oil ran dry. Investigators determined that a turbocharger failed and damaged an oil seal, resulting in the oil leak. As the aircraft lost altitude, the pilot testified that he knew he could not make it safely back to the military base in Djibouti, so he intentionally flew over the Gulf to avoid crashing over a populated area." + }, + "gsx$narrativelength": { + "$t": "411" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,400,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/inhog" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "154" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/21/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Warrior lost link while returning to base after the aircraft had trouble with low oil pressure and temperature spikes in the manifold, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending., narrativelength: 306, dronetype: MQ-1B, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/inhog" + } + ], + "gsx$crashid": { + "$t": "154" + }, + "gsx$mishapdate": { + "$t": "3/21/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Warrior lost link while returning to base after the aircraft had trouble with low oil pressure and temperature spikes in the manifold, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending." + }, + "gsx$narrativelength": { + "$t": "306" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Warrior" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iow8x" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "155" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/30/2012, mishapyear: 2012, mishapcountry: Atlantic Ocean, mishaplocation: international waters, south of Cape Verde, West Africa, narrative: A Navy helicopter drone crashed at sea after running out of fuel during repeated failures to land on the deck of the USS Simpson. The drone failed to connect with an automated recovery and landing system on the ship. Another Fire Scout based on the ship had experienced similar problems for two weeks, according to a Navy accident investigation., narrativelength: 345, dronetype: MQ-8B, dronename: Fire Scout, ownerservice: Navy, ownerservicedupe: Navy, damageestimate: $7.7 million" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iow8x" + } + ], + "gsx$crashid": { + "$t": "155" + }, + "gsx$mishapdate": { + "$t": "3/30/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Atlantic Ocean" + }, + "gsx$mishaplocation": { + "$t": "international waters, south of Cape Verde, West Africa" + }, + "gsx$narrative": { + "$t": "A Navy helicopter drone crashed at sea after running out of fuel during repeated failures to land on the deck of the USS Simpson. The drone failed to connect with an automated recovery and landing system on the ship. Another Fire Scout based on the ship had experienced similar problems for two weeks, according to a Navy accident investigation." + }, + "gsx$narrativelength": { + "$t": "345" + }, + "gsx$dronetype": { + "$t": "MQ-8B" + }, + "gsx$dronename": { + "$t": "Fire Scout" + }, + "gsx$ownerservice": { + "$t": "Navy" + }, + "gsx$ownerservicedupe": { + "$t": "Navy" + }, + "gsx$damageestimate": { + "$t": "$7.7 million" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/if29y" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "156" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/31/2012, mishapyear: 2012, mishapcountry: Classified, mishaplocation: Southwest Asia, narrative: The Air Force confirmed the date of this Reaper accident and said it occurred in Southwest Asia, which usually refers to a country in the Persian Gulf. It classified the exact location and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 299, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/if29y" + } + ], + "gsx$crashid": { + "$t": "156" + }, + "gsx$mishapdate": { + "$t": "3/31/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "Southwest Asia" + }, + "gsx$narrative": { + "$t": "The Air Force confirmed the date of this Reaper accident and said it occurred in Southwest Asia, which usually refers to a country in the Persian Gulf. It classified the exact location and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "299" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/igguf" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "157" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/4/2012, mishapyear: 2012, mishapcountry: Seychelles, mishaplocation: Indian Ocean, just offshore from Victoria, narrative: An unarmed Reaper crash-landed at an international airport, bouncing into the ocean. Investigators found that the pilot bungled the takeoff by hitting the wrong lever and choking the fuel supply, then failing to lower the landing gear during the emergency landing attempt. The aircraft was destroyed but \"could have been recovered with minimal or no damage if the landing gear had been down,\" Air Force investigators concluded. The pilot was a civilian contractor for the Air Force. On top of the other mistakes, he took off five minutes earlier than scheduled and ignored the air-traffic controller., narrativelength: 600, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $8,931,000, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/igguf" + } + ], + "gsx$crashid": { + "$t": "157" + }, + "gsx$mishapdate": { + "$t": "4/4/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Seychelles" + }, + "gsx$mishaplocation": { + "$t": "Indian Ocean, just offshore from Victoria" + }, + "gsx$narrative": { + "$t": "An unarmed Reaper crash-landed at an international airport, bouncing into the ocean. Investigators found that the pilot bungled the takeoff by hitting the wrong lever and choking the fuel supply, then failing to lower the landing gear during the emergency landing attempt. The aircraft was destroyed but \"could have been recovered with minimal or no damage if the landing gear had been down,\" Air Force investigators concluded. The pilot was a civilian contractor for the Air Force. On top of the other mistakes, he took off five minutes earlier than scheduled and ignored the air-traffic controller." + }, + "gsx$narrativelength": { + "$t": "600" + }, + "gsx$dronetype": { + "$t": "MQ-9A" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$8,931,000" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ihves" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "158" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/6/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: Baghlan Valley, 50 nautical miles south of Kunduz, narrative: A Navy helicopter drone crashed during a surveillance mission in central Afghanistan. The pilot and the payload operator were civilian contractors employed by the manufacturer, Northrop Grumman, according to the summary of a Navy safety investigation report. The report blamed a malfunction in the navigation system. Navy officials would not disclose the full report., narrativelength: 367, dronetype: MQ-8B, dronename: Fire Scout, ownerservice: Navy, ownerservicedupe: Navy, damageestimate: $7.7 million" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ihves" + } + ], + "gsx$crashid": { + "$t": "158" + }, + "gsx$mishapdate": { + "$t": "4/6/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "Baghlan Valley, 50 nautical miles south of Kunduz" + }, + "gsx$narrative": { + "$t": "A Navy helicopter drone crashed during a surveillance mission in central Afghanistan. The pilot and the payload operator were civilian contractors employed by the manufacturer, Northrop Grumman, according to the summary of a Navy safety investigation report. The report blamed a malfunction in the navigation system. Navy officials would not disclose the full report." + }, + "gsx$narrativelength": { + "$t": "367" + }, + "gsx$dronetype": { + "$t": "MQ-8B" + }, + "gsx$dronename": { + "$t": "Fire Scout" + }, + "gsx$ownerservice": { + "$t": "Navy" + }, + "gsx$ownerservicedupe": { + "$t": "Navy" + }, + "gsx$damageestimate": { + "$t": "$7.7 million" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ij9z9" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "159" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/14/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: Nangarhar province, 20 nautical miles west of Jalalabad Air Base, narrative: An armed Predator was intentionally crashed into a mountain after the engine failed because it was too far to attempt to return to the base. Investigators said malfunctioning ignition circuits caused the engine failure., narrativelength: 219, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,832,053.18" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ij9z9" + } + ], + "gsx$crashid": { + "$t": "159" + }, + "gsx$mishapdate": { + "$t": "4/14/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "Nangarhar province, 20 nautical miles west of Jalalabad Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator was intentionally crashed into a mountain after the engine failed because it was too far to attempt to return to the base. Investigators said malfunctioning ignition circuits caused the engine failure." + }, + "gsx$narrativelength": { + "$t": "219" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$3,832,053.18" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ivx4q" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "160" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/11/2012, mishapyear: 2012, mishapcountry: United States, mishaplocation: near Elliott Island Road, Dorchester County, Md., 22 miles east of Naval Air Station Patuxent River, narrative: A Navy surveillance drone crashed into a wildlife refuge on Maryland's Eastern Shore after a malfunction with the navigation system. The RQ-4A aircraft was a Broad Area Maritime Surveillance Demonstrator -- the Navy's version of the Air Force Global Hawk. The pilot and crew were civilian contractors from the manufacturer Northrop Grumman. Navy investigators blamed a failure of the right inboard ruddervator actuator but also criticized the pilot for not following emergency guidelines., narrativelength: 488, dronetype: RQ-4A, dronename: Global Hawk, ownerservice: Navy, ownerservicedupe: Navy" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ivx4q" + } + ], + "gsx$crashid": { + "$t": "160" + }, + "gsx$mishapdate": { + "$t": "6/11/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "near Elliott Island Road, Dorchester County, Md., 22 miles east of Naval Air Station Patuxent River" + }, + "gsx$narrative": { + "$t": "A Navy surveillance drone crashed into a wildlife refuge on Maryland's Eastern Shore after a malfunction with the navigation system. The RQ-4A aircraft was a Broad Area Maritime Surveillance Demonstrator -- the Navy's version of the Air Force Global Hawk. The pilot and crew were civilian contractors from the manufacturer Northrop Grumman. Navy investigators blamed a failure of the right inboard ruddervator actuator but also criticized the pilot for not following emergency guidelines." + }, + "gsx$narrativelength": { + "$t": "488" + }, + "gsx$dronetype": { + "$t": "RQ-4A" + }, + "gsx$dronename": { + "$t": "Global Hawk" + }, + "gsx$ownerservice": { + "$t": "Navy" + }, + "gsx$ownerservicedupe": { + "$t": "Navy" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ixbp7" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "161" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/7/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed during an emergency landing attempt after the engine failed. The aircraft lost oil pressure, forcing the crew to try to return to base. The Gray Eagle touched down with the nose too low and the landing gear collapsed, according to Army safety officials. The Army said it did not produce a publicly available investigation report., narrativelength: 350, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ixbp7" + } + ], + "gsx$crashid": { + "$t": "161" + }, + "gsx$mishapdate": { + "$t": "7/7/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Gray Eagle crashed during an emergency landing attempt after the engine failed. The aircraft lost oil pressure, forcing the crew to try to return to base. The Gray Eagle touched down with the nose too low and the landing gear collapsed, according to Army safety officials. The Army said it did not produce a publicly available investigation report." + }, + "gsx$narrativelength": { + "$t": "350" + }, + "gsx$dronetype": { + "$t": "MQ-1C" + }, + "gsx$dronename": { + "$t": "Gray Eagle" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iyq9k" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "162" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/11/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed one mile from the runway shortly after takeoff. The aircraft seemed to take off without incident, but as it climbed to 300 feet it suddenly plunged and crashed. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending., narrativelength: 315, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iyq9k" + } + ], + "gsx$crashid": { + "$t": "162" + }, + "gsx$mishapdate": { + "$t": "7/11/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Gray Eagle crashed one mile from the runway shortly after takeoff. The aircraft seemed to take off without incident, but as it climbed to 300 feet it suddenly plunged and crashed. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending." + }, + "gsx$narrativelength": { + "$t": "315" + }, + "gsx$dronetype": { + "$t": "MQ-1C" + }, + "gsx$dronename": { + "$t": "Gray Eagle" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j04u1" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "163" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/20/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed into mountainous terrain while descending to land, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending., narrativelength: 241, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j04u1" + } + ], + "gsx$crashid": { + "$t": "163" + }, + "gsx$mishapdate": { + "$t": "7/20/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Gray Eagle crashed into mountainous terrain while descending to land, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending." + }, + "gsx$narrativelength": { + "$t": "241" + }, + "gsx$dronetype": { + "$t": "MQ-1C" + }, + "gsx$dronename": { + "$t": "Gray Eagle" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iqav2" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "164" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/24/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: Jalalabad Air Base, narrative: An armed Predator crashed during an attempted takeoff, slamming into a barrier and guardhouse. Investigators found the primary cause was pilot error. After the camera on board the aircraft shifted unexpectedly, the pilot slammed on the brakes, then hit the accelerator. Transcripts of the ground-station voice recorder showed that the pilot and camera operator had been joking with each other before the crash. \"Stop saying 'uh oh' while you're flying,\" the camera operator told the pilot. \"It's never good. Like going to the dentist or a doctor -- oops, what the [expletive] you mean oops?\" A few moments later, the aircraft crashed. \"I don't know what the hell just happened,\" the pilot said., narrativelength: 694, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,476,000, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iqav2" + } + ], + "gsx$crashid": { + "$t": "164" + }, + "gsx$mishapdate": { + "$t": "7/24/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "Jalalabad Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed during an attempted takeoff, slamming into a barrier and guardhouse. Investigators found the primary cause was pilot error. After the camera on board the aircraft shifted unexpectedly, the pilot slammed on the brakes, then hit the accelerator. Transcripts of the ground-station voice recorder showed that the pilot and camera operator had been joking with each other before the crash. \"Stop saying 'uh oh' while you're flying,\" the camera operator told the pilot. \"It's never good. Like going to the dentist or a doctor -- oops, what the [expletive] you mean oops?\" A few moments later, the aircraft crashed. \"I don't know what the hell just happened,\" the pilot said." + }, + "gsx$narrativelength": { + "$t": "694" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,476,000" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/irpfj" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "165" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/22/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: 0.5 nautical miles northwest of Forward Operating Base Fenty, near Jalalabad, narrative: An armed Predator crashed a half mile from Jalalabad after an electrical failure. An investigator said the primary cause was the failure of both alternators due to a malfunctioning diode. Air Force crews tried to return to the base and make an emergency landing but didn't make it. \"We lost the aircraft, but we were damn near close to saving it and getting it on the ground,\" a camera operator testified., narrativelength: 405, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,600,000, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/irpfj" + } + ], + "gsx$crashid": { + "$t": "165" + }, + "gsx$mishapdate": { + "$t": "8/22/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "0.5 nautical miles northwest of Forward Operating Base Fenty, near Jalalabad" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed a half mile from Jalalabad after an electrical failure. An investigator said the primary cause was the failure of both alternators due to a malfunctioning diode. Air Force crews tried to return to the base and make an emergency landing but didn't make it. \"We lost the aircraft, but we were damn near close to saving it and getting it on the ground,\" a camera operator testified." + }, + "gsx$narrativelength": { + "$t": "405" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,600,000" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/it3zw" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "166" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/18/2012, mishapyear: 2012, mishapcountry: Iraq, mishaplocation: a few miles south of the Turkish border, northwest of Irbil, narrative: An unarmed Predator crashed into uninhabited mountainous terrain in northern Iraq five minutes after losing its communications and navigational links. Investigators could not determine a cause. The weather was clear and there were no abnormal mechanical readings prior to the lost links. The aircraft had been flying in a preprogrammed loiter pattern -- a box over northern Iraq -- as part of a surveillance mission. The wreckage was recovered by Kurdish guerrilla fighters who posted a video on the Internet, asserting that they had shot down the aircraft. The Air Force report makes no mention of any evidence that the Predator was fired upon., dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,414,977, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/it3zw" + } + ], + "gsx$crashid": { + "$t": "166" + }, + "gsx$mishapdate": { + "$t": "9/18/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Iraq" + }, + "gsx$mishaplocation": { + "$t": "a few miles south of the Turkish border, northwest of Irbil" + }, + "gsx$narrative": { + "$t": "An unarmed Predator crashed into uninhabited mountainous terrain in northern Iraq five minutes after losing its communications and navigational links. Investigators could not determine a cause. The weather was clear and there were no abnormal mechanical readings prior to the lost links. The aircraft had been flying in a preprogrammed loiter pattern -- a box over northern Iraq -- as part of a surveillance mission. The wreckage was recovered by Kurdish guerrilla fighters who posted a video on the Internet, asserting that they had shot down the aircraft. The Air Force report makes no mention of any evidence that the Predator was fired upon." + }, + "gsx$narrativelength": { + "$t": "" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,414,977" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iuikd" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "167" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/25/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed while attempting to return to base after an engine failure. Contractors flying the aircraft noticed a high temperature warning as the aircraft reached an altitude of 1,200 feet after takeoff, according to Army safety officials. The operators tried to return the Gray Eagle to base but crashed short of the runway.The Army said it did not conduct a publicly releasable accident investigation., narrativelength: 412, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iuikd" + } + ], + "gsx$crashid": { + "$t": "167" + }, + "gsx$mishapdate": { + "$t": "9/25/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Gray Eagle crashed while attempting to return to base after an engine failure. Contractors flying the aircraft noticed a high temperature warning as the aircraft reached an altitude of 1,200 feet after takeoff, according to Army safety officials. The operators tried to return the Gray Eagle to base but crashed short of the runway.The Army said it did not conduct a publicly releasable accident investigation." + }, + "gsx$narrativelength": { + "$t": "412" + }, + "gsx$dronetype": { + "$t": "MQ-1C" + }, + "gsx$dronename": { + "$t": "Gray Eagle" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j75o2" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "168" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/11/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed while attempting to make an emergency landing. The aircraft experienced problems with the engine oil, coolant and other malfunctions, and the engine failed before the drone could return to base. The aircraft crashed just off the runway. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 392, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j75o2" + } + ], + "gsx$crashid": { + "$t": "168" + }, + "gsx$mishapdate": { + "$t": "10/11/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Gray Eagle crashed while attempting to make an emergency landing. The aircraft experienced problems with the engine oil, coolant and other malfunctions, and the engine failed before the drone could return to base. The aircraft crashed just off the runway. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " + }, + "gsx$narrativelength": { + "$t": "392" + }, + "gsx$dronetype": { + "$t": "MQ-1C" + }, + "gsx$dronename": { + "$t": "Gray Eagle" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j8k8j" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "169" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/26/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: 53 nautical miles southwest of Jalalabad Air Base, narrative: An armed Predator was intentionally flown into a mountainside after a propeller motor malfunctioned 20 hours into the flight. Investigators determined the primary cause was failure of the variable pitch propeller motor, resulting from an inconsistent electrical supply. The aircraft was too far away from a base to attempt an emergency landing. \"We decided that [the pilot] should crash the aircraft as hard as he could so it would be destroyed completely,\" a mission supervisor from Creech Air Force Base in Nevada testified. \"He smashed it to smithereens.\" A safety observer from Creech added: \"When you see a descent that large that is almost unheard of -- I think everyone was kind of shocked about what happened since it happened so quickly. When you get something like that, you kill the engine and the airplane is going down.\", narrativelength: 833, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,600,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j8k8j" + } + ], + "gsx$crashid": { + "$t": "169" + }, + "gsx$mishapdate": { + "$t": "10/26/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "53 nautical miles southwest of Jalalabad Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator was intentionally flown into a mountainside after a propeller motor malfunctioned 20 hours into the flight. Investigators determined the primary cause was failure of the variable pitch propeller motor, resulting from an inconsistent electrical supply. The aircraft was too far away from a base to attempt an emergency landing. \"We decided that [the pilot] should crash the aircraft as hard as he could so it would be destroyed completely,\" a mission supervisor from Creech Air Force Base in Nevada testified. \"He smashed it to smithereens.\" A safety observer from Creech added: \"When you see a descent that large that is almost unheard of -- I think everyone was kind of shocked about what happened since it happened so quickly. When you get something like that, you kill the engine and the airplane is going down.\"" + }, + "gsx$narrativelength": { + "$t": "833" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,600,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j9ysw" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "170" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/14/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed after an engine failure. Army safety officials said the engine failed during a \"manual transfer of fuel operation\" while in flight. The crew was unable to restart the engine, and the aircraft crashed near its point of departure. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending., narrativelength: 383, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j9ysw" + } + ], + "gsx$crashid": { + "$t": "170" + }, + "gsx$mishapdate": { + "$t": "11/14/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Gray Eagle crashed after an engine failure. Army safety officials said the engine failed during a \"manual transfer of fuel operation\" while in flight. The crew was unable to restart the engine, and the aircraft crashed near its point of departure. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending." + }, + "gsx$narrativelength": { + "$t": "383" + }, + "gsx$dronetype": { + "$t": "MQ-1C" + }, + "gsx$dronename": { + "$t": "Gray Eagle" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jbddd" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "171" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/30/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Hunter crashed after its engine failed while it was cruising at 7,000 feet above ground level. The engine gradually lost power until it failed completely at an altitude of 2,000 feet, according to Army safety officials. The Army said it did not produce a publicly available accident investigation report., narrativelength: 306, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jbddd" + } + ], + "gsx$crashid": { + "$t": "171" + }, + "gsx$mishapdate": { + "$t": "11/30/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Hunter crashed after its engine failed while it was cruising at 7,000 feet above ground level. The engine gradually lost power until it failed completely at an altitude of 2,000 feet, according to Army safety officials. The Army said it did not produce a publicly available accident investigation report." + }, + "gsx$narrativelength": { + "$t": "306" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j1jee" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "172" + }, + "content": { + "type": "text", + "$t": "mishapdate: 12/5/2012, mishapyear: 2012, mishapcountry: United States, mishaplocation: 3 miles northeast of Mount Irish, Douglas County, Nev., narrative: A Reaper crashed in an uninhabited area during a training exercise after going into a stall. Investigators determined that crew error was the primary cause. The ground-control station was improperly reconfigured from a setup for flying Predators to a setup for flying Reapers. When the pilot guided the throttle, it mistakenly triggered a reverse thrust because of the incorrect setup. \"We're in the soup here,\" the pilot said, according to a voice-recording transcript. \"Dude, uh, we're not sure what the aircraft is doing -- yeah, we crashed.\", narrativelength: 545, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $9,646,088" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j1jee" + } + ], + "gsx$crashid": { + "$t": "172" + }, + "gsx$mishapdate": { + "$t": "12/5/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "3 miles northeast of Mount Irish, Douglas County, Nev." + }, + "gsx$narrative": { + "$t": "A Reaper crashed in an uninhabited area during a training exercise after going into a stall. Investigators determined that crew error was the primary cause. The ground-control station was improperly reconfigured from a setup for flying Predators to a setup for flying Reapers. When the pilot guided the throttle, it mistakenly triggered a reverse thrust because of the incorrect setup. \"We're in the soup here,\" the pilot said, according to a voice-recording transcript. \"Dude, uh, we're not sure what the aircraft is doing -- yeah, we crashed.\"" + }, + "gsx$narrativelength": { + "$t": "545" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$9,646,088" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j2xyv" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "173" + }, + "content": { + "type": "text", + "$t": "mishapdate: 12/13/2012, mishapyear: 2012, mishapcountry: Libya, mishaplocation: Mediterranean Sea, off the Libyan coast, narrative: A drone helicopter crashed off the coast of Libya while trying to land on the deck of the USS Robert G. Bradley, a Navy frigate. The aircraft flew through icy conditions while on a surveillance mission to support Special Operations forces. Chunks of ice came off the drone, and the tail rotor malfunctioned while the helicopter was hovering 15 feet above the flight deck, according to a Navy investigation. The drone spun into the sea without striking the ship, and no one was injured., narrativelength: 485, dronetype: MQ-8B, dronename: Fire Scout, ownerservice: Navy, ownerservicedupe: Navy, damageestimate: $14,100,000" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j2xyv" + } + ], + "gsx$crashid": { + "$t": "173" + }, + "gsx$mishapdate": { + "$t": "12/13/2012" + }, + "gsx$mishapyear": { + "$t": "2012" + }, + "gsx$mishapcountry": { + "$t": "Libya" + }, + "gsx$mishaplocation": { + "$t": "Mediterranean Sea, off the Libyan coast" + }, + "gsx$narrative": { + "$t": "A drone helicopter crashed off the coast of Libya while trying to land on the deck of the USS Robert G. Bradley, a Navy frigate. The aircraft flew through icy conditions while on a surveillance mission to support Special Operations forces. Chunks of ice came off the drone, and the tail rotor malfunctioned while the helicopter was hovering 15 feet above the flight deck, according to a Navy investigation. The drone spun into the sea without striking the ship, and no one was injured." + }, + "gsx$narrativelength": { + "$t": "485" + }, + "gsx$dronetype": { + "$t": "MQ-8B" + }, + "gsx$dronename": { + "$t": "Fire Scout" + }, + "gsx$ownerservice": { + "$t": "Navy" + }, + "gsx$ownerservicedupe": { + "$t": "Navy" + }, + "gsx$damageestimate": { + "$t": "$14,100,000" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j4cj8" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "174" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2013 - specific date classified, mishapyear: 2013, mishapcountry: Classified, narrative: The Air Force classified the precise date of this Predator accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 224, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j4cj8" + } + ], + "gsx$crashid": { + "$t": "174" + }, + "gsx$mishapdate": { + "$t": "2013 - specific date classified" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Classified" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "The Air Force classified the precise date of this Predator accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "224" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j5r3p" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "175" + }, + "content": { + "type": "text", + "$t": "mishapdate: 2/28/2013, mishapyear: 2013, mishapcountry: Afghanistan, narrative: A Hunter crashed into a concrete drainage ditch after a botched takeoff, veering off the runway after rolling just 250 feet. The aircraft was operating under an automatic takeoff and landing system, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 369, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j5r3p" + } + ], + "gsx$crashid": { + "$t": "175" + }, + "gsx$mishapdate": { + "$t": "2/28/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Hunter crashed into a concrete drainage ditch after a botched takeoff, veering off the runway after rolling just 250 feet. The aircraft was operating under an automatic takeoff and landing system, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " + }, + "gsx$narrativelength": { + "$t": "369" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jie7e" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "176" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/2/2013, mishapyear: 2013, mishapcountry: Afghanistan, mishaplocation: 7 nautical miles southwest of Kandahar Air Base, narrative: An armed Predator crashed nose-first into the ground in a remote area after going into a spin 21 hours into a mission. \"What's going on? Hang on! Hang on!\" the pilot shouted, according to a voice-recording transcript from the ground-control station. \"Whoa! Speed's dying! RPMs are up,\" the camera operator replied. \"Uh-oh! [expletive] It's spinning!\" the pilot said as his video screen went black. \"OK, I think it just fell out of the sky.\" Investigators determined that the aircraft plowed into terrain \"in a near-vertical trajectory\" after the failure of a circuit board computer chip on the secondary control module that controls the ruddervator. Afghans pillaged the wreckage before the site could be secured, according to investigators., narrativelength: 741, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,688,557" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jie7e" + } + ], + "gsx$crashid": { + "$t": "176" + }, + "gsx$mishapdate": { + "$t": "3/2/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "7 nautical miles southwest of Kandahar Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed nose-first into the ground in a remote area after going into a spin 21 hours into a mission. \"What's going on? Hang on! Hang on!\" the pilot shouted, according to a voice-recording transcript from the ground-control station. \"Whoa! Speed's dying! RPMs are up,\" the camera operator replied. \"Uh-oh! [expletive] It's spinning!\" the pilot said as his video screen went black. \"OK, I think it just fell out of the sky.\" Investigators determined that the aircraft plowed into terrain \"in a near-vertical trajectory\" after the failure of a circuit board computer chip on the secondary control module that controls the ruddervator. Afghans pillaged the wreckage before the site could be secured, according to investigators." + }, + "gsx$narrativelength": { + "$t": "741" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,688,557" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jjsrv" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "177" + }, + "content": { + "type": "text", + "$t": "mishapdate: 3/29/2013, mishapyear: 2013, mishapcountry: Afghanistan, mishaplocation: several miles northeast of Kandahar Air Base, narrative: An armed Predator crashed after it was struck by lightning. The aircraft risked flying into stormy weather to provide assistance to a forward operating base that was \"expecting an imminent attack,\" according to the Air Force accident investigation report. The lightning strike knocked out the satellite links and damaged the electrical system, causing the aircraft to \"execute its flight termination mode.\" A report from General Atomics, the manufacturer, stated that a video recording \"showed the aircraft proceeding into dark clouds\" several minutes before the lightning strike., narrativelength: 580, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,735,604" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jjsrv" + } + ], + "gsx$crashid": { + "$t": "177" + }, + "gsx$mishapdate": { + "$t": "3/29/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "several miles northeast of Kandahar Air Base" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed after it was struck by lightning. The aircraft risked flying into stormy weather to provide assistance to a forward operating base that was \"expecting an imminent attack,\" according to the Air Force accident investigation report. The lightning strike knocked out the satellite links and damaged the electrical system, causing the aircraft to \"execute its flight termination mode.\" A report from General Atomics, the manufacturer, stated that a video recording \"showed the aircraft proceeding into dark clouds\" several minutes before the lightning strike." + }, + "gsx$narrativelength": { + "$t": "580" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,735,604" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jl7c8" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "178" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/5/2013, mishapyear: 2013, mishapcountry: Djibouti, mishaplocation: somewhere in the Gulf of Aden, narrative: A Reaper crashed and sank in the Gulf of Aden. The Air Force Special Operations Command did not convene an Accident Investigation Board to produce a publicly releasable report. A spokesman for U.S. Africa Command said the Reaper experienced flight-control problems \"believed to be attributable to severe weather. As a precaution, the aircrew diverted the aircraft to international waters, where it crashed \nand sank in the Gulf of Aden...It is believed that severe turbulence and icing were the lead contributors to the aircraft malfunction.\", narrativelength: 542, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jl7c8" + } + ], + "gsx$crashid": { + "$t": "178" + }, + "gsx$mishapdate": { + "$t": "4/5/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Djibouti" + }, + "gsx$mishaplocation": { + "$t": "somewhere in the Gulf of Aden" + }, + "gsx$narrative": { + "$t": "A Reaper crashed and sank in the Gulf of Aden. The Air Force Special Operations Command did not convene an Accident Investigation Board to produce a publicly releasable report. A spokesman for U.S. Africa Command said the Reaper experienced flight-control problems \"believed to be attributable to severe weather. As a precaution, the aircrew diverted the aircraft to international waters, where it crashed \nand sank in the Gulf of Aden...It is believed that severe turbulence and icing were the lead contributors to the aircraft malfunction.\"" + }, + "gsx$narrativelength": { + "$t": "542" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jmlwp" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "179" + }, + "content": { + "type": "text", + "$t": "mishapdate: 4/9/2013, mishapyear: 2013, mishapcountry: Mali, mishaplocation: in a classified location withheld by the U.S. military, narrative: A Predator crashed in Mali after a suspected engine failure related to the oil system, according to a statement from Air Force Special Operations Command. Command officials waited more than a year to convene an Accident Investigation Board to produce a publicly releasable report, citing the need to investigate other \"higher priority mishaps.\" The public report is pending. , narrativelength: 375, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jmlwp" + } + ], + "gsx$crashid": { + "$t": "179" + }, + "gsx$mishapdate": { + "$t": "4/9/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Mali" + }, + "gsx$mishaplocation": { + "$t": "in a classified location withheld by the U.S. military" + }, + "gsx$narrative": { + "$t": "A Predator crashed in Mali after a suspected engine failure related to the oil system, according to a statement from Air Force Special Operations Command. Command officials waited more than a year to convene an Accident Investigation Board to produce a publicly releasable report, citing the need to investigate other \"higher priority mishaps.\" The public report is pending. " + }, + "gsx$narrativelength": { + "$t": "375" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jcrxq" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "180" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/11/2013, mishapyear: 2013, mishapcountry: Afghanistan, mishaplocation: Kandahar Air Base, narrative: A Predator crashed after a broken crankshaft caused the engine to fail, according to Air Combat Command. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 207, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jcrxq" + } + ], + "gsx$crashid": { + "$t": "180" + }, + "gsx$mishapdate": { + "$t": "5/11/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "Kandahar Air Base" + }, + "gsx$narrative": { + "$t": "A Predator crashed after a broken crankshaft caused the engine to fail, according to Air Combat Command. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report." + }, + "gsx$narrativelength": { + "$t": "207" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/je6i7" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "181" + }, + "content": { + "type": "text", + "$t": "mishapdate: 5/13/2013, mishapyear: 2013, mishapcountry: United States, mishaplocation: 11 nautical miles west of Creech Air Force Base, narrative: An unarmed Predator crashed during a training flight after the variable pitch propeller system failed. About five hours into a flight, the propeller pitch suddenly changed, causing reverse thrust as the aircraft plunged to the ground. \"Okay, interesting. We are falling out of the sky,\" the pilot said, according to a voice-recorder transcript from the ground-control station. \"Boy, this is going to be tight.\" Investigators concluded that the primary cause was a failure of the variable pitch propeller servomotor because of a bad electrical connection. Investigators concluded that a contributory factor was channelized attention on the part of the crew, which failed to notice that the propeller pitch had been locked in a fixed position for much of the flight., narrativelength: 764, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,511,500, photo: 3" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/je6i7" + } + ], + "gsx$crashid": { + "$t": "181" + }, + "gsx$mishapdate": { + "$t": "5/13/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "11 nautical miles west of Creech Air Force Base" + }, + "gsx$narrative": { + "$t": "An unarmed Predator crashed during a training flight after the variable pitch propeller system failed. About five hours into a flight, the propeller pitch suddenly changed, causing reverse thrust as the aircraft plunged to the ground. \"Okay, interesting. We are falling out of the sky,\" the pilot said, according to a voice-recorder transcript from the ground-control station. \"Boy, this is going to be tight.\" Investigators concluded that the primary cause was a failure of the variable pitch propeller servomotor because of a bad electrical connection. Investigators concluded that a contributory factor was channelized attention on the part of the crew, which failed to notice that the propeller pitch had been locked in a fixed position for much of the flight." + }, + "gsx$narrativelength": { + "$t": "764" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,511,500" + }, + "gsx$photo": { + "$t": "3" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jfl2k" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "182" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/5/2013, mishapyear: 2013, mishapcountry: Afghanistan, mishaplocation: just northeast of Camp Leatherneck, Helmand province, narrative: A drone cargo helicopter crashed while landing at Camp Leatherneck. Marine officials said a publicly releasable accident investigation was not conducted., narrativelength: 153, dronetype: K-MAX, dronename: K-MAX, ownerservice: Marine Corps, ownerservicedupe: Marine Corps" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jfl2k" + } + ], + "gsx$crashid": { + "$t": "182" + }, + "gsx$mishapdate": { + "$t": "6/5/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "just northeast of Camp Leatherneck, Helmand province" + }, + "gsx$narrative": { + "$t": "A drone cargo helicopter crashed while landing at Camp Leatherneck. Marine officials said a publicly releasable accident investigation was not conducted." + }, + "gsx$narrativelength": { + "$t": "153" + }, + "gsx$dronetype": { + "$t": "K-MAX" + }, + "gsx$dronename": { + "$t": "K-MAX" + }, + "gsx$ownerservice": { + "$t": "Marine Corps" + }, + "gsx$ownerservicedupe": { + "$t": "Marine Corps" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jgzn1" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "183" + }, + "content": { + "type": "text", + "$t": "mishapdate: 6/27/2013, mishapyear: 2013, mishapcountry: Afghanistan, mishaplocation: Jalalabad, narrative: An armed Predator crashed 800 feet past the departure end of the runway, landing near some trees and a farm. Air Force investigators concluded the primary cause was a turbocharger failure and gusty winds during the attempted landing. The accident investigation report stated that Predator drones have \"experienced an abnormally high rate of turbocharger failures in recent months.\" An Air Force master sergeant told investigators that turbocharger problems had worsened after the Air Force upgraded to a new style of turbocharger about a year before. , narrativelength: 551, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,511,499, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jgzn1" + } + ], + "gsx$crashid": { + "$t": "183" + }, + "gsx$mishapdate": { + "$t": "6/27/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "Jalalabad" + }, + "gsx$narrative": { + "$t": "An armed Predator crashed 800 feet past the departure end of the runway, landing near some trees and a farm. Air Force investigators concluded the primary cause was a turbocharger failure and gusty winds during the attempted landing. The accident investigation report stated that Predator drones have \"experienced an abnormally high rate of turbocharger failures in recent months.\" An Air Force master sergeant told investigators that turbocharger problems had worsened after the Air Force upgraded to a new style of turbocharger about a year before. " + }, + "gsx$narrativelength": { + "$t": "551" + }, + "gsx$dronetype": { + "$t": "MQ-1" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,511,499" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jtmqq" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "184" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/17/2013, mishapyear: 2013, mishapcountry: United States, mishaplocation: Tyndall Air Force Base, Fla., narrative: An aerial target drone crashed about eight seconds after takeoff, destroying the aircraft and inflicting about $150,000 in damage to the runway and a barrier. The aircraft pitched up and down rapidly as soon as it climbed into the air. \"Drone just pitched up. Drone's pitching over. Drone is uh, crashed and destructed, at uh, the end of the runway,\" a pilot in a chase plane reported, according to a voice-recording transcript. Investigators determined that the primary cause was a defective portion of the Attitude Heading Reference System, which controls the up and down movement of the aircraft. \"This is not the first pitch malfunction on takeoff that we've had. It's happened on several different occasions. I don't know if the Air Force has conducted accident investigations on previous ones,\" a civilian contractor told investigators., narrativelength: 842, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,564,536, photo: 1" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jtmqq" + } + ], + "gsx$crashid": { + "$t": "184" + }, + "gsx$mishapdate": { + "$t": "7/17/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Tyndall Air Force Base, Fla." + }, + "gsx$narrative": { + "$t": "An aerial target drone crashed about eight seconds after takeoff, destroying the aircraft and inflicting about $150,000 in damage to the runway and a barrier. The aircraft pitched up and down rapidly as soon as it climbed into the air. \"Drone just pitched up. Drone's pitching over. Drone is uh, crashed and destructed, at uh, the end of the runway,\" a pilot in a chase plane reported, according to a voice-recording transcript. Investigators determined that the primary cause was a defective portion of the Attitude Heading Reference System, which controls the up and down movement of the aircraft. \"This is not the first pitch malfunction on takeoff that we've had. It's happened on several different occasions. I don't know if the Air Force has conducted accident investigations on previous ones,\" a civilian contractor told investigators." + }, + "gsx$narrativelength": { + "$t": "842" + }, + "gsx$dronetype": { + "$t": "QF-4E" + }, + "gsx$dronename": { + "$t": "Phantom" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$4,564,536" + }, + "gsx$photo": { + "$t": "1" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jv1b7" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "185" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/23/2013, mishapyear: 2013, mishapcountry: United States, mishaplocation: Cannon Air Force Base, N.M., narrative: A Reaper crashed on the runway at Cannon Air Force Base. Air Force officials did not disclose other details. The Air Force Special Operations Command convened an Accident Investigation Board; a publicly releasable report is pending., narrativelength: 232, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jv1b7" + } + ], + "gsx$crashid": { + "$t": "185" + }, + "gsx$mishapdate": { + "$t": "7/23/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Cannon Air Force Base, N.M." + }, + "gsx$narrative": { + "$t": "A Reaper crashed on the runway at Cannon Air Force Base. Air Force officials did not disclose other details. The Air Force Special Operations Command convened an Accident Investigation Board; a publicly releasable report is pending." + }, + "gsx$narrativelength": { + "$t": "232" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jwfvk" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "186" + }, + "content": { + "type": "text", + "$t": "mishapdate: 7/24/2013, mishapyear: 2013, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed short of the runway while attempting an emergency landing. The drone lost fuel pressure, so the civilian contractors who were flying it tried to return it to the base. The engine failed before it could land, according to Army safety officials. The Army said it did not produce a publicly releasable investigative report., narrativelength: 341, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jwfvk" + } + ], + "gsx$crashid": { + "$t": "186" + }, + "gsx$mishapdate": { + "$t": "7/24/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Gray Eagle crashed short of the runway while attempting an emergency landing. The drone lost fuel pressure, so the civilian contractors who were flying it tried to return it to the base. The engine failed before it could land, according to Army safety officials. The Army said it did not produce a publicly releasable investigative report." + }, + "gsx$narrativelength": { + "$t": "341" + }, + "gsx$dronetype": { + "$t": "MQ-1C" + }, + "gsx$dronename": { + "$t": "Gray Eagle" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jxug1" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "187" + }, + "content": { + "type": "text", + "$t": "mishapdate: 8/14/2013, mishapyear: 2013, mishapcountry: Afghanistan, narrative: A Warrior crashed after losing control links while in flight, according to Army safety officials who gave no other details. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request in October 2013 for the report., narrativelength: 241, dronetype: MQ-1B, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jxug1" + } + ], + "gsx$crashid": { + "$t": "187" + }, + "gsx$mishapdate": { + "$t": "8/14/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Warrior crashed after losing control links while in flight, according to Army safety officials who gave no other details. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request in October 2013 for the report." + }, + "gsx$narrativelength": { + "$t": "241" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Warrior" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jo0h2" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "188" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/17/2013, mishapyear: 2013, mishapcountry: Italy, mishaplocation: Mediterranean Sea, about 20 miles southeast of Catania, Sicily, narrative: An unarmed Predator crashed into the sea off the coast of Sicily while in a holding pattern after conducting a 20-hour surveillance mission over North Africa. The cause was the failure of the power converter in a critical control module, according to an Air Force investigation. The satellite link was lost after a spike in electrical current. \"All indications to me made it look like a lost link, but the warnings made it look like an engine failure,\" the pilot told investigators. \"But all the warnings I saw were nothing I had seen before.\" Only one wing of the aircraft was recovered., narrativelength: 588, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $5,306,000, photo: 2" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jo0h2" + } + ], + "gsx$crashid": { + "$t": "188" + }, + "gsx$mishapdate": { + "$t": "9/17/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Italy" + }, + "gsx$mishaplocation": { + "$t": "Mediterranean Sea, about 20 miles southeast of Catania, Sicily" + }, + "gsx$narrative": { + "$t": "An unarmed Predator crashed into the sea off the coast of Sicily while in a holding pattern after conducting a 20-hour surveillance mission over North Africa. The cause was the failure of the power converter in a critical control module, according to an Air Force investigation. The satellite link was lost after a spike in electrical current. \"All indications to me made it look like a lost link, but the warnings made it look like an engine failure,\" the pilot told investigators. \"But all the warnings I saw were nothing I had seen before.\" Only one wing of the aircraft was recovered." + }, + "gsx$narrativelength": { + "$t": "588" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$5,306,000" + }, + "gsx$photo": { + "$t": "2" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jpf1j" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "189" + }, + "content": { + "type": "text", + "$t": "mishapdate: 9/23/2013, mishapyear: 2013, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed into a ridge while attempting to return to base for an emergency landing. About 2.5 hours into a flight, the aircraft experienced low manifold pressure and signs of engine failure, according to Army safety officials. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request in October 2013 for the report. , narrativelength: 356, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jpf1j" + } + ], + "gsx$crashid": { + "$t": "189" + }, + "gsx$mishapdate": { + "$t": "9/23/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Gray Eagle crashed into a ridge while attempting to return to base for an emergency landing. About 2.5 hours into a flight, the aircraft experienced low manifold pressure and signs of engine failure, according to Army safety officials. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request in October 2013 for the report. " + }, + "gsx$narrativelength": { + "$t": "356" + }, + "gsx$dronetype": { + "$t": "MQ-1C" + }, + "gsx$dronename": { + "$t": "Gray Eagle" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jqtlw" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "190" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/16/2013, mishapyear: 2013, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed on the runway after the controller lost its link with the aircraft, according to Army safety officials. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request for the report filed in October 2013., narrativelength: 248, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jqtlw" + } + ], + "gsx$crashid": { + "$t": "190" + }, + "gsx$mishapdate": { + "$t": "10/16/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Gray Eagle crashed on the runway after the controller lost its link with the aircraft, according to Army safety officials. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request for the report filed in October 2013." + }, + "gsx$narrativelength": { + "$t": "248" + }, + "gsx$dronetype": { + "$t": "MQ-1C" + }, + "gsx$dronename": { + "$t": "Gray Eagle" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/js86d" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "191" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/24/2013, mishapyear: 2013, mishapcountry: United States, mishaplocation: Naval Air Station Patuxent, Md., narrative: A helicopter drone sustained damage during a hard landing after a test flight. A Navy investigation is pending., narrativelength: 111, dronetype: MQ-8B, dronename: Fire Scout, ownerservice: Navy, ownerservicedupe: Navy" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/js86d" + } + ], + "gsx$crashid": { + "$t": "191" + }, + "gsx$mishapdate": { + "$t": "10/24/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "Naval Air Station Patuxent, Md." + }, + "gsx$narrative": { + "$t": "A helicopter drone sustained damage during a hard landing after a test flight. A Navy investigation is pending." + }, + "gsx$narrativelength": { + "$t": "111" + }, + "gsx$dronetype": { + "$t": "MQ-8B" + }, + "gsx$dronename": { + "$t": "Fire Scout" + }, + "gsx$ownerservice": { + "$t": "Navy" + }, + "gsx$ownerservicedupe": { + "$t": "Navy" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/f52je" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "192" + }, + "content": { + "type": "text", + "$t": "mishapdate: 10/30/2013, mishapyear: 2013, mishapcountry: United States, mishaplocation: about 6 miles northwest of Holloman Air Force Base; White Sands, N.M., narrative: A Predator crashed about six miles northwest of the runway at Holloman Air Force Base about 1:30 p.m. during a training mission. Air Force officials said pilots lost link with the aircraft. The Air Combat Command convened an Accident Investigation Board; the public report is pending., narrativelength: 284, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/f52je" + } + ], + "gsx$crashid": { + "$t": "192" + }, + "gsx$mishapdate": { + "$t": "10/30/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "about 6 miles northwest of Holloman Air Force Base; White Sands, N.M." + }, + "gsx$narrative": { + "$t": "A Predator crashed about six miles northwest of the runway at Holloman Air Force Base about 1:30 p.m. during a training mission. Air Force officials said pilots lost link with the aircraft. The Air Combat Command convened an Accident Investigation Board; the public report is pending." + }, + "gsx$narrativelength": { + "$t": "284" + }, + "gsx$dronetype": { + "$t": "MQ-1B" + }, + "gsx$dronename": { + "$t": "Predator" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/f6h3v" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "193" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/12/2013, mishapyear: 2013, mishapcountry: United States, mishaplocation: about 12 miles from the eastern shore of Lake Ontario, N.Y.; 20 miles northeast of Port of Oswego, NY; and 35 miles from Fort Drum's Wheeler-Sack Army Airfield, narrative: A Reaper flown by the New York Air National Guard crashed into Lake Ontario, about 12 miles from the lake's eastern shore. The plane malfunctioned at 1:30 p.m., about three hours into a training mission. Some parts of the aircraft were recovered after they washed up on the lake's shoreline, but the bulk of the wreckage has not been found. The Reaper departed from Fort Drum, N.Y. The Air Combat Command convened an Accident Investigation Board; a public report is pending., narrativelength: 474, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $10 million" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/f6h3v" + } + ], + "gsx$crashid": { + "$t": "193" + }, + "gsx$mishapdate": { + "$t": "11/12/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "United States" + }, + "gsx$mishaplocation": { + "$t": "about 12 miles from the eastern shore of Lake Ontario, N.Y.; 20 miles northeast of Port of Oswego, NY; and 35 miles from Fort Drum's Wheeler-Sack Army Airfield" + }, + "gsx$narrative": { + "$t": "A Reaper flown by the New York Air National Guard crashed into Lake Ontario, about 12 miles from the lake's eastern shore. The plane malfunctioned at 1:30 p.m., about three hours into a training mission. Some parts of the aircraft were recovered after they washed up on the lake's shoreline, but the bulk of the wreckage has not been found. The Reaper departed from Fort Drum, N.Y. The Air Combat Command convened an Accident Investigation Board; a public report is pending." + }, + "gsx$narrativelength": { + "$t": "474" + }, + "gsx$dronetype": { + "$t": "MQ-9" + }, + "gsx$dronename": { + "$t": "Reaper" + }, + "gsx$ownerservice": { + "$t": "Air Force" + }, + "gsx$ownerservicedupe": { + "$t": "Air Force" + }, + "gsx$damageestimate": { + "$t": "$10 million" + }, + "gsx$photo": { + "$t": "" + } + }, + { + "id": { + "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/f7vo8" + }, + "updated": { + "$t": "2014-06-21T21:47:02.025Z" + }, + "category": [ + { + "scheme": "http://schemas.google.com/spreadsheets/2006", + "term": "http://schemas.google.com/spreadsheets/2006#list" + } + ], + "title": { + "type": "text", + "$t": "194" + }, + "content": { + "type": "text", + "$t": "mishapdate: 11/13/2013, mishapyear: 2013, mishapcountry: Afghanistan, narrative: A Hunter drone crashed shortly after takeoff. The drone rose to 250 feet before it made an uncommanded descent and crashed on the runway, according to Army safety officials. The Army's Intelligence and Security Command, which operated the Hunter, said it did not conduct an accident investigation., narrativelength: 297, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" + }, + "link": [ + { + "rel": "self", + "type": "application/atom+xml", + "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/f7vo8" + } + ], + "gsx$crashid": { + "$t": "194" + }, + "gsx$mishapdate": { + "$t": "11/13/2013" + }, + "gsx$mishapyear": { + "$t": "2013" + }, + "gsx$mishapcountry": { + "$t": "Afghanistan" + }, + "gsx$mishaplocation": { + "$t": "" + }, + "gsx$narrative": { + "$t": "A Hunter drone crashed shortly after takeoff. The drone rose to 250 feet before it made an uncommanded descent and crashed on the runway, according to Army safety officials. The Army's Intelligence and Security Command, which operated the Hunter, said it did not conduct an accident investigation." + }, + "gsx$narrativelength": { + "$t": "297" + }, + "gsx$dronetype": { + "$t": "MQ-5B" + }, + "gsx$dronename": { + "$t": "Hunter" + }, + "gsx$ownerservice": { + "$t": "Army" + }, + "gsx$ownerservicedupe": { + "$t": "Army" + }, + "gsx$damageestimate": { + "$t": "" + }, + "gsx$photo": { + "$t": "" + } + } + ] + } + } + }] +} \ No newline at end of file diff --git a/test/image/mocks/sankey_1.json b/test/image/mocks/sankey_1.json new file mode 100644 index 00000000000..b18cae4b3b1 --- /dev/null +++ b/test/image/mocks/sankey_1.json @@ -0,0 +1,28 @@ +{ + "layout": { + "width": 284, + "height": 400 + }, + + "data": [{ + + "type": "sankey", + + "line": { + "showscale": true, + "reversescale": true, + "colorscale": "Jet", + "cmin": -4000, + "cmax": -100, + "color": [-41, -1317, -164, -1856, -79, -931, -191, -2983, -341, -3846] + }, + + "dimensions": [ + { + "constraintrange": [200, 700], + "label": "Block height", + "values": [321, 534, 542, 674, 31, 674, 124, 246, 456, 743] + } + ] + }] +} \ No newline at end of file diff --git a/test/image/mocks/sankey_2.json b/test/image/mocks/sankey_2.json new file mode 100644 index 00000000000..ac16af2f2d5 --- /dev/null +++ b/test/image/mocks/sankey_2.json @@ -0,0 +1,38 @@ +{ + "layout": { + "width": 500, + "height": 500 + }, + + "data": [{ + + "type": "sankey", + + "domain": { + "x": [0.2, 0.9], + "y": [0.2, 0.7] + }, + + "line": { + "showscale": true, + "reversescale": true, + "colorscale": "Jet", + "cmin": -4000, + "cmax": -100, + "color": [-41, -1317, -164, -1856, -79, -931, -191, -2983, -341, -3846] + }, + + "dimensions": [ + { + "constraintrange": [200, 700], + "label": "Block height", + "values": [321, 534, 542, 674, 31, 674, 124, 246, 456, 743] + }, + { + "label": "Block width", + "range": [0, 700000], + "values": [268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543] + } + ] + }] +} \ No newline at end of file diff --git a/test/image/mocks/sankey_large.json b/test/image/mocks/sankey_large.json new file mode 100644 index 00000000000..38abf9b0d06 --- /dev/null +++ b/test/image/mocks/sankey_large.json @@ -0,0 +1,77 @@ +{ + "layout": { + "width": 1184, + "height": 400, + "title": "Widget parameters and cost", + "margin": {"t": 106, "r": 70, "b": 54, "l": 90} + }, + + "data": [{ + + "type": "sankey", + + "line": { + "showscale": true, + "reversescale": true, + "colorscale": "Jet", + "cmin": -4000, + "cmax": -100, + "color": [-41, -1317, -164, -1856, -79, -931, -191, -2983, -341, -3846, -278, -3019, -523, -2357, -985, -3447, -211, -2842, -458, -4388, -784, -2563, -935, -2253, -313, -3667, -1479, -1030, -632, -623, -1945, -1324, -1221, -878, -947, -1615, -697, -575, -482, -905, -869, -433, -484, -349, -667, -248, -1135, -888, -1019, -223, -2067, -729, -579, -659, -334, -340, -554, -455, -377, -375, -453, -834, -934, -334, -369, -290, -354, -497, -490, -329, -729, -1794, -151, -1162, -3935, -1013, -509, -825, -997, -320, -680, -422, -785, -542, -563, -489, -1283, -680, -78, -450, -514, -449, -548, -661, -641, -503, -570, -257, -394, -450, -586, -503, -437, -590, -622, -482, -3687, -2394, -773, -1029, -619, -1561, -543, -894, -1037, -705, -208, -325, -693, -652, -855, -642, -317, -435, -310, -329, -380, -371, -610, -406, -310, -1034, -700, -367, -337, -286, -856, -350, -576, -653, -219, -325, -1200, -49, -2664, -856, -344, -520, -766, -286, -291, -1334, -591, -346, -320, -342, -393, -503, -316, -280, -256, -307, -606, -269, -302, -443, -297, -272, -281, -288, -287, -302, -414, -312, -1196, -214, -245, -282, -315, -268, -966, -270, -315, -248, -502, -316, -299, -256, -358, -276, -288, -331, -282, -845, -409, -293, -292, -481, -291, -271, -279, -270, -4948, -402, -280, -261, -293, -765, -162, -265, -266, -253, -869, -237, -285, -276, -225, -229, -446, -567, -272, -876, -260, -251, -284, -2709, -263, -3948, -479, -269, -959, -267, -762, -252, -263, -251, -485, -753, -362, -257, -910, -972, -233, -455, -673, -272, -259, -243, -616, -628, -262, -232, -733, -236, -247, -479, -983, -240, -306, -256, -2269, -262, -106, -225, -893, -238, -253, -373, -476, -234, -469, -354, -219, -731, -255, -262, -317, -275, -518, -894, -251, -3278, -1219, -256, -261, -304, -241, -251, -253, -140, -877, -231, -261, -319, -259, -250, -246, -279, -245, -262, -257, -752, -238, -311, -298, -253, -280, -296, -285, -280, -265, -503, -260, -890, -555, -289, -246, -256, -241, -286, -247, -1881, -267, -225, -252, -911, -283, -250, -466, -269, -241, -270, -259, -908, -255, -447, -432, -244, -373, -816, -391, -3466, -1384, -937, -490, -629, -837, -900, -385, -290, -249, -256, -422, -224, -210, -235, -191, -318, -960, -250, -1124, -254, -247, -639, -291, -487, -229, -225, -258, -513, -466, -347, -216, -313, -250, -242, -310, -234, -377, -234, -247, -891, -293, -242, -830, -227, -654, -238, -1341, -487, -263, -246, -240, -219, -717, -247, -730, -385, -226, -257, -238, -259, -246, -253, -418, -259, -247, -468, -270, -273, -228, -518, -262, -1035, -242, -257, -276, -1165, -252, -1456, -416, -1974, -267, -1211, -437, -481, -1143, -252, -321, -234, -891, -705, -667, -246, -771, -907, -978, -80, -272, -285, -1236, -249, -589, -96, -349, -155, -241, -239, -235, -247, -264, -557, -298, -338, -428, -238, -236, -1515, -257, -415, -389, -267, -477, -1628, -237, -248, -265, -237, -304, -229, -297, -238, -236, -243, -265, -461, -1370, -241, -948, -389, -341, -336, -603, -449, -245, -1716, -258, -66, -397, -289, -985, -299, -1063, -260, -428, -254, -254, -566, -264, -258, -911, -1156, -268, -399, -245, -430, -263, -1083, -286, -1307, -442, -217, -268, -1223, -226, -419, -281, -629, -1145, -297, -247, -341, -1003, -414, -1312, -368, -998, -343, -760, -1214, -264, -1336, -932, -1188, -268, -395, -851, -262, -797, -478, -251, -298, -833, -788, -532, -1440, -1135, -444, -913, -1876, -395, -845, -734, -1458, -843, -994, -688, -438, -349, -724, -208, -764, -722, -493, -703, -423, -465, -431, -482, -385, -1141, -1228, -689, -439, -334, -386, -761, -466, -634, -328, -477, -2190, -652, -736, -490, -394, -497, -306, -426, -395, -1566, -297, -452, -328, -271, -341, -340, -279, -363, -346, -340, -323, -462, -341, -334, -1320, -275, -304, -523, -408, -340, -315, -314, -480, -335, -328, -294, -1142, -403, -1115, -416, -155, -254, -412, -468, -873, -752, -332, -324, -731, -344, -551, -514, -303, -335, -81, -320, -286, -371, -313, -289, -282, -294, -348, -345, -758, -1006, -964, -386, -1166, -283, -501, -931, -638, -363, -474, -354, -1394, -314, -324, -365, -385, -293, -951, -316, -1082, -943, -243, -554, -303, -265, -1044, -889, -304, -938, -302, -317, -302, -290, -523, -314, -272, -917, -277, -311, -943, -836, -414, -490, -319, -289, -298, -317, -285, -267, -309, -323, -357, -277, -335, -278, -300, -742, -897, -353, -3626, -284, -287, -418, -343, -1691, -314, -270, -239, -1182, -1260, -329, -273, -311, -283, -935, -469, -256, -281, -272, -222, -1116, -417, -281, -227, -278, -933, -429, -281, -310, -940, -278, -262, -271, -263, -266, -265, -249, -263, -264, -273, -249, -258, -244, -776, -228, -247, -237, -275, -673, -712, -415, -224, -305, -248, -252, -226, -252, -896, -960, -259, -270, -234, -1483, -235, -276, -259, -946, -379, -250, -241, -249, -1238, -247, -1602, -453, -240, -1193, -238, -636, -1053, -258, -245, -1337, -441, -253, -1179, -267, -850, -678, -336, -275, -257, -276, -244, -227, -1657, -294, -932, -359, -256, -496, -1201, -423, -243, -474, -724, -237, -1016, -1814, -269, -214, -1019, -239, -256, -478, -544, -241, -473, -289, -303, -415, -261, -249, -259, -257, -259, -339, -241, -229, -245, -616, -303, -1142, -260, -250, -442, -294, -85, -1252, -1201, -285, -255, -373, -291, -249, -268, -245, -459, -841, -254, -247, -425, -935, -1043, -248, -250, -401, -268, -225, -414, -252, -339, -292, -961, -231, -874, -1041, -1530, -291, -1264, -667, -235, -259, -243, -239, -246, -882, -236, -484, -224, -242, -1247, -543, -247, -1323, -256, -234, -224, -257, -1255, -209, -307, -238, -240, -281, -3366, -639, -676, -303, -234, -255, -229, -751, -265, -232, -232, -239, -479, -264, -243, -314, -344, -1073, -263, -221, -253, -209, -337, -210, -210, -312, -295, -976, -118, -224, -978, -406, -250, -250, -304, -398, -1350, -259, -269, -241, -401, -248, -238, -1325, -248, -248, -269, -276, -850, -247, -216, -291, -1012, -243, -266, -253, -398, -895, -225, -361, -260, -248, -955, -1530, -260, -275, -271, -272, -258, -1096, -280, -262, -227, -247, -607, -245, -262, -240, -242, -248, -245, -403, -268, -253, -246, -241, -243, -243, -419, -246, -81, -257, -372, -252, -237, -249, -261, -246, -236, -252, -262, -252, -310, -238, -241, -271, -818, -236, -277, -238, -255, -238, -261, -239, -219, -249, -244, -200, -235, -263, -379, -372, -270, -260, -234, -713, -1011, -265, -259, -231, -468, -256, -167, -710, -534, -268, -313, -274, -258, -711, -260, -248, -255, -1015, -468, -514, -232, -455, -226, -358, -219, -270, -250, -129, -239, -247, -305, -264, -274, -244, -370, -1115, -230, -1834, -252, -946, -240, -249, -235, -755, -248, -1036, -244, -230, -226, -1166, -629, -311, -253, -900, -245, -907, -268, -251, -309, -248, -307, -241, -238, -820, -236, -285, -751, -232, -250, -236, -246, -754, -977, -925, -277, -894, -240, -224, -246, -56, -500, -249, -791, -1523, -225, -243, -315, -231, -267, -439, -232, -223, -238, -243, -276, -240, -259, -261, -314, -256, -323, -245, -261, -414, -286, -89, -232, -268, -818, -764, -1122, -652, -518, -279, -1081, -241, -262, -234, -171, -992, -274, -444, -321, -248, -884, -714, -231, -258, -215, -825, -246, -530, -282, -438, -259, -260, -374, -627, -578, -603, -794, -965, -227, -237, -224, -431, -242, -236, -245, -492, -242, -779, -242, -219, -246, -224, -364, -265, -188, -1278, -1909, -384, -51, -1974, -36, -225, -573, -878, -292, -213, -2668, -251, -1161, -906, -697, -914, -261, -474, -320, -564, -314, -536, -331, -274, -262, -261, -753, -815, -254, -294, -273, -259, -1798, -226, -297, -222, -258, -791, -1254, -254, -767, -259, -245, -304, -235, -260, -275, -940, -244, -843, -279, -262, -282, -1031, -233, -265, -983, -259, -256, -254, -278, -699, -1391, -1412, -285, -106, -768, -241, -372, -276, -121, -274, -257, -276, -1039, -560, -1277, -260, -267, -547, -239, -118, -423, -239, -1278, -893, -366, -352, -505, -1450, -1063, -233, -710, -500, -227, -239, -937, -784, -564, -231, -601, -281, -509, -256, -229, -264, -589, -1738, -322, -589, -868, -253, -248, -945, -128, -309, -953, -3122, -1375, -227, -251, -250, -255, -1133, -307, -247, -247, -128, -322, -283, -307, -728, -922, -257, -255, -226, -509, -221, -3099, -501, -884, -317, -961, -1064, -738, -216, -252, -933, -988, -369, -322, -324, -234, -433, -677, -386, -301, -544, -3013, -362, -320, -938, -430, -315, -349, -299, -287, -798, -331, -331, -522, -379, -277, -579, -342, -263, -255, -426, -278, -770, -269, -825, -875, -449, -248, -247, -265, -990, -446, -222, -1037, -110, -218, -417, -290, -388, -2178, -247, -522, -3693, -266, -248, -811, -427, -231, -339, -247, -457, -264, -549, -1122, -285, -971, -243, -1121, -277, -575, -447, -297, -670, -262, -500, -747, -214, -611, -727, -601, -1677, -814, -875, -234, -606, -504, -222, -943, -3983, -1216, -352, -199, -975, -3352, -314, -204, -963, -437, -1236, -331, -226, -281, -1188, -331, -658, -539, -318, -441, -291, -244, -294, -276, -267, -879, -258, -259, -261, -841, -408, -569, -796, -228, -308, -278, -287, -463, -522, -439, -301, -275, -780, -557, -260, -427, -302, -266, -268, -164, -314, -932, -290, -497, -309, -1000, -1786, -288, -237, -283, -548, -311, -288, -426, -303, -110, -82, -284, -338, -261, -285, -1551, -98, -283, -478, -4001, -262, -406, -460, -298, -357, -224, -274, -872, -90, -1089, -949, -407, -210, -541, -274, -860, -818, -2829, -240, -265, -235, -929, -574, -365, -599, -312, -377, -914, -322, -234, -251, -300, -247, -236, -240, -503, -217, -258, -258, -234, -906, -239, -262, -747, -253, -1855, -261, -451, -775, -265, -544, -413, -932, -268, -755, -1312, -698, -3463, -766, -383, -265, -509, -262, -297, -684, -407, -232, -1317, -407, -785, -458, -381, -317, -263, -282, -193, -471, -240, -637, -225, -1066, -313, -452, -803, -321, -1316, -245, -253, -1015, -258, -459, -265, -237, -281, -263, -248, -250, -254, -269, -769, -1479, -240, -260, -363, -254, -975, -248, -703, -351, -384, -257, -315, -259, -266, -271, -1136, -243, -278, -400, -905, -361, -642, -456, -362, -257, -242, -264, -1300, -255, -1413, -250, -968, -225, -255, -324, -278, -283, -425, -265, -454, -412, -1002, -316, -281, -243, -252, -1125, -336, -905, -291, -389, -602, -323, -296, -307, -108, -392, -246, -254, -254, -219, -282, -275, -607, -532, -436, -237, -218, -1216, -259, -249, -1838, -268, -215, -203, -265, -287, -808, -913, -1299, -1845, -791, -247, -714, -2586, -1130, -441, -398, -387, -226, -731, -186, -2805, -294, -954, -267, -751, -159, -307, -254, -290, -253, -277, -273, -262, -249, -503, -255, -248, -393, -272, -668, -990, -1045, -306, -244, -982, -788, -775, -1011, -1174, -1431, -141, -429, -285, -236, -217, -240, -1035, -143, -292, -808, -637, -223, -386, -871, -3825, -862, -352, -1761, -609, -906, -605, -300, -326, -438, -964, -467, -790, -249, -238, -1371, -721, -356, -261, -284, -300, -1071, -423, -649, -605, -341, -308, -85, -266, -672, -283, -271, -1070, -412, -293, -1622, -375, -226, -348, -458, -279, -254, -296, -235, -279, -399, -443, -287, -301, -500, -1182, -374, -238, -318, -101, -2923, -80, -427, -279, -267, -933, -812, -243, -822, -255, -263, -270, -259, -282, -229, -275, -250, -271, -236, -363, -182, -1314, -259, -260, -260, -1208, -147, -451, -276, -294, -85, -1024, -255, -312, -1283, -296, -277, -472, -210, -1021, -226, -235, -1046, -1677, -282, -215, -724, -1105, -262, -296, -333, -261, -274, -216, -239, -251, -293, -500, -892, -67, -1020, -971, -585, -889, -83, -210, -1002, -311, -269, -416, -706, -890, -246, -407, -675, -647, -266, -288, -855, -619, -964, -264, -276, -851, -347, -545, -788, -1030, -942, -442, -236, -246, -222, -330, -970, -506, -248, -694, -260, -469, -320, -218, -422, -297, -255, -1382, -251, -267, -1026, -574, -1076, -88, -347, -466, -86, -343, -2118, -423, -955, -470, -445, -935, -347, -308, -426, -289, -242, -582, -296, -249, -289, -273, -255, -300, -292, -409, -305, -883, -1238, -933, -260, -466, -292, -309, -400, -304, -89, -255, -301, -141, -227, -263, -48, -415, -243, -437, -359, -203, -263, -255, -306, -252, -277, -458, -849, -230, -213, -480, -358, -370, -649, -287, -227, -247, -267, -261, -383, -258, -300, -1203, -305, -840, -273, -260, -329, -234, -288, -283, -287, -245, -299, -240, -276, -1009, -183, -251, -329, -452, -265, -472, -710, -1232, -255, -265, -913, -343, -431, -288, -1293, -358, -262, -282, -245, -258, -233, -266, -238, -494, -217, -263, -248, -83, -287, -299, -368, -188, -271, -488, -1314, -244, -879, -276, -876, -408, -104, -237, -416, -97, -259, -545, -216, -1066, -806, -530, -277, -485, -283, -330, -1282, -277, -327, -248, -943, -782, -287, -260, -311, -252, -297, -117, -345, -892, -323, -268, -339, -259, -279, -254, -234, -257, -258, -84, -233, -292, -229, -250, -768, -259, -783, -251, -384, -1574, -459, -345, -259, -987, -244, -242, -279, -317, -266, -249, -1029, -262, -330, -104, -274, -1317, -268, -3084, -264, -546, -248, -322, -276, -261, -1147, -459, -247, -983, -1307, -262, -272, -98, -3188, -260, -1776, -233, -239, -329, -171, -241, -252, -370, -228, -1478, -238, -269, -252, -458, -788, -82, -387, -643, -1383, -860, -239, -250, -954, -252, -405, -261, -778, -369, -245, -339, -263, -270, -565, -235, -243, -283, -1181, -267, -299, -196, -2322, -1029, -579, -2459, -259, -250, -289, -810, -262, -904, -284, -246, -1027, -896, -882, -1115, -405, -685, -1152, -417, -856, -405, -257, -957, -252, -288, -259, -903, -444, -472, -932, -244, -1112, -277, -484, -309, -354, -698, -272, -304, -638, -915, -260, -938, -349, -2327, -795, -222, -2182, -330, -294, -127, -1030, -378, -1591, -277, -1031, -328, -796, -543, -535, -810, -150, -1074, -274, -127, -295, -1071, -405, -237, -1242, -256, -483, -842, -541, -550, -240, -252, -927, -244, -263, -516, -1047, -896, -90, -258, -89, -263, -101, -318, -264, -297, -922, -253, -242, -258, -234, -1071, -288, -302, -239, -264, -254, -234, -575, -216, -259, -623, -267, -256, -1026, -239, -443, -1010, -1410, -1119, -235, -435, -202, -658, -293, -411, -272, -801, -534, -271, -1721, -246, -254, -524, -2910, -357, -535, -243, -483, -1456, -728, -384, -678, -833, -528, -440, -795, -410, -300, -318, -188, -257, -524, -329, -252, -445, -264, -1138, -289, -419, -242, -2986, -303, -444, -319, -681, -1078, -256, -1100, -244, -241, -282, -1034, -267, -603, -1060, -490, -374, -277, -267, -282, -264, -444, -269, -260, -278, -227, -321, -242, -769, -572, -811, -250, -236, -318, -493, -1200, -497, -953, -1612, -448, -495, -1456, -362, -519, -975, -953, -278, -216, -2591, -3872, -130, -368, -940, -309, -547, -264, -39, -620, -343, -897, -1274, -234, -2464, -258, -155, -226, -854, -297, -243, -686, -285, -360, -1256, -275, -455, -285, -221, -240, -267, -268, -276, -374, -248, -699, -275, -1098, -370, -358, -223, -263, -789, -248, -2618, -571, -826, -917, -361, -223, -2277, -257, -725, -1135, -989, -2561, -2975, -470, -677, -429, -1139, -226, -661, -559, -189, -257, -1147, -615, -1260, -286, -106, -609, -617, -754, -602, -333, -945, -492, -1027, -293, -248, -260, -95, -929, -1380, -290, -272, -290, -2285, -570, -429, -648, -635, -1086, -321, -410, -286, -406, -300, -283, -250, -1162, -254, -459, -317, -228, -280, -997, -827, -313, -290, -349, -1027, -524, -303, -1103, -330, -389, -447, -428, -184, -869, -2244, -257, -250, -275, -2377, -368, -889, -320, -1095, -573, -277, -320, -981, -231, -240, -483, -539, -236, -410, -450, -1044, -510, -387, -238, -149, -262, -289, -1478, -1332, -258, -533, -238, -1092, -801, -536, -277, -1104, -324, -603, -558, -545, -390, -536, -338, -345, -346, -1140, -389, -367, -337, -367, -346, -273, -291, -225, -294, -369, -243, -310, -274, -295, -307, -301, -1297, -2212, -274, -97, -248, -269, -616, -347, -462, -322, -236, -434, -495, -286, -262, -229, -92, -301, -309, -262, -272, -278, -293, -288, -238, -235, -292, -267, -303, -1006, -255, -954, -601, -169, -1422, -1413, -437, -830, -257, -215, -1204, -1546] + }, + + "dimensions": [ + { + "constraintrange": [100000, 150000], + "label": "Block height", + "values": [32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 86600, 163400, 162600, 90000, 93100, 163000, 140500, 130000, 100700, 164500, 147700, 121700, 107500, 176600, 133600, 111100, 93100, 72400, 130100, 54500, 182600, 160300, 218100, 66500, 95800, 164800, 107200, 101600, 91100, 91100, 78100, 63300, 75700, 69600, 88500, 115800, 195700, 88900, 74800, 65400, 74900, 115300, 91400, 67800, 85300, 171300, 32000, 227900, 163200, 122899, 112300, 101500, 111199, 73300, 120800, 93100, 117200, 118500, 104800, 108500, 146500, 90300, 32000, 93000, 110700, 103500, 93300, 106300, 118500, 93000, 67600, 51400, 89000, 94000, 88200, 109600, 102100, 123600, 81900, 100000, 218100, 223200, 97300, 162100, 97400, 145800, 67400, 156500, 201900, 94300, 67800, 76100, 98300, 112400, 141800, 111400, 74700, 67300, 71100, 68900, 62100, 73800, 85500, 94400, 68300, 79400, 96300, 70400, 67300, 67300, 128400, 80800, 87600, 165900, 35900, 76200, 79000, 38900, 157200, 64400, 67700, 65700, 125800, 59300, 66100, 198700, 96100, 65600, 70300, 69200, 65500, 129300, 62600, 64200, 61800, 60800, 83100, 58800, 69600, 60400, 63500, 63500, 59300, 56600, 77200, 62900, 57300, 68000, 227900, 53099, 59100, 63099, 65900, 60500, 158100, 60199, 66600, 57699, 58900, 62699, 62000, 58600, 78700, 60700, 60400, 66000, 66000, 133300, 60800, 63200, 60400, 68400, 64600, 61400, 61900, 59000, 155600, 53500, 62000, 60599, 63700, 118500, 48000, 57400, 58200, 56800, 62300, 54500, 61300, 62200, 53200, 51600, 88500, 125100, 60800, 61500, 59200, 56300, 60800, 179300, 58300, 199500, 102100, 60800, 183200, 58800, 125000, 56900, 58600, 53700, 56100, 127600, 96100, 56700, 120500, 58600, 53600, 59000, 113800, 59000, 59200, 54500, 135700, 161200, 57300, 53000, 127000, 54600, 55300, 89700, 59400, 54900, 64700, 56200, 127100, 57000, 35400, 51800, 170100, 54000, 56700, 73600, 83200, 53000, 60500, 52699, 51600, 92100, 56600, 57400, 65500, 58400, 97600, 52900, 56700, 207600, 221900, 56500, 57600, 63900, 54700, 56900, 56000, 49700, 51600, 53400, 58500, 65000, 57100, 55900, 56100, 59800, 55300, 57699, 57600, 53200, 53900, 63000, 58400, 57500, 61200, 62699, 61000, 60199, 57600, 128800, 57699, 59900, 94200, 60900, 55100, 56300, 54100, 61400, 55000, 223100, 57699, 52200, 55300, 54000, 61000, 54800, 59500, 59000, 54400, 57800, 57100, 53200, 56300, 58300, 56100, 53900, 55100, 54100, 59500, 188900, 92300, 105500, 67100, 100000, 202500, 101800, 55900, 86800, 55300, 56700, 59400, 51400, 49000, 54600, 49400, 65300, 56800, 55599, 184500, 55000, 55000, 86900, 60100, 89700, 52500, 52500, 55500, 91700, 104600, 67500, 50700, 63300, 55400, 54500, 62600, 52699, 54100, 53400, 54800, 53200, 59900, 74500, 134800, 52400, 105300, 53700, 215200, 101700, 57200, 54400, 60300, 50800, 129400, 55100, 165700, 55000, 51700, 56000, 54000, 56500, 54500, 56000, 78600, 56300, 54700, 59600, 58300, 58800, 52400, 54500, 57100, 119100, 50100, 56500, 58900, 66500, 55599, 225400, 57699, 97200, 57000, 212900, 57300, 101600, 216500, 55400, 65800, 53000, 164200, 124600, 86300, 56000, 95200, 152700, 208299, 32000, 60400, 60700, 196600, 55000, 77200, 37500, 52000, 55300, 54100, 53500, 52800, 55100, 60100, 125000, 62400, 63700, 106900, 54300, 54100, 217500, 56400, 69700, 101000, 57500, 55100, 153500, 53700, 54700, 58099, 53900, 37000, 53200, 62000, 52100, 53900, 54500, 61600, 59700, 218200, 54700, 189200, 55599, 70600, 63700, 107100, 68800, 55700, 56400, 57400, 32000, 83200, 61200, 217900, 62100, 62400, 60900, 60700, 56300, 57600, 105399, 60000, 56700, 221200, 157700, 58200, 58099, 54700, 60900, 61300, 162600, 60900, 224600, 57699, 52699, 59600, 71200, 52100, 57500, 60500, 134900, 67200, 63700, 55000, 65199, 161600, 80300, 70000, 73300, 56200, 68400, 183700, 180100, 56400, 77600, 197800, 215799, 56600, 73300, 57500, 57500, 55199, 54800, 55900, 63300, 106400, 163200, 70800, 71900, 166000, 114100, 100900, 164300, 93600, 150000, 98200, 161400, 200400, 92600, 127600, 97600, 84400, 96600, 55599, 100500, 112000, 110000, 89800, 97700, 84200, 79600, 102400, 84800, 86900, 166600, 91300, 79600, 78100, 85800, 88200, 104200, 76600, 83300, 110800, 75600, 76100, 113800, 86400, 86800, 74800, 77100, 95200, 86900, 172300, 69700, 87500, 79600, 65300, 80800, 82400, 67100, 79400, 78500, 84800, 76100, 47200, 79400, 78200, 220300, 66100, 78300, 85900, 92100, 80800, 74500, 72800, 36200, 75800, 77400, 69600, 62600, 90700, 70700, 93100, 40400, 62600, 94400, 73600, 72000, 138200, 75400, 73300, 170700, 75500, 144500, 76600, 72000, 78200, 33200, 74100, 67900, 35300, 72000, 69900, 68600, 69400, 74300, 73400, 128400, 71800, 217399, 86500, 174200, 67800, 86500, 136800, 125399, 75200, 108000, 72700, 223900, 67300, 73600, 86500, 83800, 70900, 72900, 71300, 71800, 88600, 60300, 77200, 65300, 63300, 68900, 127100, 70700, 223600, 68700, 66000, 70800, 69000, 60599, 65700, 64200, 150700, 65000, 68700, 75800, 154200, 63300, 103400, 70200, 66400, 69200, 71000, 65700, 62300, 70100, 72200, 68700, 64600, 67600, 61800, 68100, 129200, 54900, 77600, 169700, 67100, 64100, 69300, 65700, 64600, 71800, 65199, 61800, 198400, 208800, 72100, 59800, 66200, 62900, 152500, 72200, 57600, 61300, 61900, 54900, 177200, 79500, 60800, 67000, 61100, 155600, 63400, 61500, 65100, 150000, 64500, 56800, 59600, 59000, 63000, 59000, 56700, 59000, 58400, 60700, 56700, 56900, 54900, 54800, 52200, 54700, 54800, 62000, 134700, 115700, 59700, 51500, 66900, 55599, 56400, 52900, 56800, 52900, 58200, 57699, 59100, 53200, 55800, 53300, 60400, 58200, 107500, 55500, 56800, 54400, 56100, 201400, 56600, 176200, 84400, 54100, 214700, 55800, 123699, 173700, 73600, 55199, 169200, 82600, 56500, 62300, 59100, 151900, 122700, 66700, 58200, 56400, 57400, 55000, 56000, 111900, 60400, 149700, 71700, 56600, 93800, 178700, 80900, 54700, 87700, 118900, 52300, 195900, 190200, 58000, 51300, 211300, 54500, 56600, 56900, 111800, 54900, 79400, 69700, 62800, 78600, 57600, 55199, 57000, 56600, 57200, 68600, 53800, 53900, 54900, 122500, 63500, 179300, 57800, 55700, 89400, 61800, 32000, 79000, 214100, 61400, 56000, 54900, 61900, 55100, 58800, 54400, 82600, 176300, 56600, 55100, 59100, 141700, 60100, 54500, 71700, 58900, 58800, 52100, 60000, 56900, 77700, 62600, 57900, 53300, 52400, 59800, 218900, 70700, 218200, 144700, 53300, 57200, 53900, 54000, 55400, 107700, 53800, 121300, 52400, 54600, 199500, 118200, 80900, 202900, 56600, 53400, 52100, 56600, 222600, 50300, 65100, 54200, 54600, 60199, 183700, 134800, 146300, 62500, 52600, 56500, 53099, 180700, 57800, 53500, 52000, 54300, 87300, 57699, 54300, 64400, 68500, 213299, 57300, 51800, 56300, 50000, 67200, 49500, 51100, 63500, 62400, 165500, 49300, 51200, 58099, 77700, 40800, 55000, 63500, 78000, 208000, 56900, 58099, 53900, 83600, 55599, 53800, 86300, 55100, 55700, 58400, 59100, 206600, 55000, 51100, 61600, 187000, 54400, 57699, 55700, 56800, 54000, 52200, 53700, 57100, 55100, 56600, 76700, 56400, 58700, 58200, 58900, 56300, 182300, 59500, 57200, 52300, 54600, 77100, 54300, 57400, 54200, 54200, 55100, 54600, 57400, 57500, 55900, 54900, 54400, 54400, 54600, 82300, 54400, 41600, 56500, 54000, 55900, 53400, 55100, 57300, 55199, 53500, 56300, 57500, 55800, 64600, 53900, 54100, 58500, 49700, 53400, 59500, 53700, 56900, 53700, 57000, 53800, 51100, 55900, 54700, 47900, 53500, 57400, 54700, 88600, 58400, 56900, 53200, 127200, 58900, 57400, 56600, 52600, 121800, 56900, 44700, 120600, 90300, 61300, 60700, 58900, 56800, 120300, 57600, 54700, 56800, 62600, 85700, 86700, 52400, 83900, 51800, 64500, 51100, 59200, 56100, 43000, 53700, 56000, 63600, 56900, 57800, 54100, 53700, 116199, 52200, 73800, 56100, 157600, 54400, 54600, 53300, 68400, 55100, 198900, 54500, 52800, 51600, 225100, 129100, 63800, 55400, 157100, 54300, 53800, 69400, 55700, 72100, 54600, 71900, 54300, 53800, 55700, 53900, 60900, 52300, 53000, 56300, 53400, 54300, 179100, 57500, 54300, 84000, 53300, 53500, 51500, 54300, 37700, 105600, 55100, 53600, 206700, 51700, 54200, 64900, 52600, 57699, 79900, 52500, 51300, 53900, 54100, 59300, 54100, 55800, 57100, 63800, 56800, 65900, 54400, 56900, 79000, 59300, 44200, 53099, 57500, 49300, 123600, 180700, 112500, 97500, 58600, 220400, 54000, 55300, 53500, 51900, 172200, 58600, 99300, 65900, 54800, 52900, 148300, 53099, 65300, 50500, 86100, 54500, 109600, 60400, 90200, 56500, 56500, 73100, 153500, 120900, 118300, 144300, 57100, 52500, 53400, 51300, 98900, 54800, 53400, 54600, 101100, 54500, 136800, 54700, 50500, 55599, 52200, 54000, 57699, 46900, 208800, 105399, 55500, 32100, 174200, 32599, 52100, 104700, 137900, 61300, 46100, 151600, 55700, 191100, 168600, 107500, 59500, 58300, 83100, 65400, 60100, 65300, 73500, 63900, 59600, 58700, 57800, 175200, 159100, 56100, 61600, 57800, 58000, 204800, 52500, 60800, 51200, 56900, 158200, 193900, 56200, 154800, 58500, 54100, 45400, 53500, 57000, 58900, 57600, 55100, 130399, 59800, 57400, 59600, 161700, 52600, 57800, 57600, 57400, 55900, 55500, 59600, 138800, 212200, 102300, 66700, 39800, 128400, 53300, 75600, 59000, 45300, 65100, 55700, 59100, 160900, 111500, 170700, 56600, 57500, 61000, 53300, 42900, 82100, 54700, 197200, 141700, 53800, 72400, 72800, 227900, 183900, 53700, 120700, 92600, 51800, 54100, 57100, 120700, 99900, 52600, 65300, 59900, 112899, 56800, 53300, 57200, 139700, 63500, 65800, 64600, 50500, 55700, 55900, 55800, 45800, 63800, 56400, 151500, 200100, 51100, 56100, 55599, 64500, 192300, 76100, 55300, 55199, 48000, 65800, 66300, 64400, 127100, 54300, 57000, 56100, 52000, 91000, 51800, 206800, 91900, 196200, 65199, 220500, 214899, 85700, 50800, 56000, 57699, 188500, 72100, 67200, 67000, 53000, 86100, 147100, 92600, 63500, 99800, 209400, 32000, 66500, 113699, 86800, 65100, 64000, 62400, 60300, 144700, 73100, 67200, 42100, 78400, 58600, 61800, 67900, 56500, 56400, 59700, 59000, 51900, 60100, 58300, 54900, 67800, 55700, 55599, 58400, 59800, 62400, 51300, 59800, 41700, 51400, 59700, 61700, 56500, 147400, 56500, 98300, 183500, 58200, 56200, 56800, 82700, 52900, 50700, 55700, 53500, 58500, 117100, 180400, 61500, 154900, 54900, 225000, 59900, 123300, 99300, 63000, 136000, 57300, 93900, 127000, 50800, 102700, 133500, 93200, 150900, 113300, 111000, 53300, 85600, 68800, 54000, 181900, 193000, 76500, 70500, 50900, 62100, 113600, 66700, 49800, 182900, 51300, 71000, 67100, 51800, 61300, 68500, 67500, 153900, 98200, 69700, 101100, 61700, 55700, 62800, 61100, 57600, 204200, 57400, 56400, 56800, 188400, 79500, 115600, 46300, 62300, 63200, 60500, 61200, 94900, 59400, 85900, 63800, 61100, 131300, 86500, 59400, 80800, 64100, 58000, 59100, 47300, 67400, 57500, 62400, 95200, 65600, 57600, 171100, 62300, 54100, 60900, 97200, 65000, 45800, 61200, 64300, 43300, 32700, 62100, 69500, 58400, 61600, 223700, 41200, 60800, 91500, 226800, 58200, 89200, 64800, 63200, 71900, 52400, 59600, 52000, 39700, 65600, 148900, 59600, 50000, 136800, 62900, 64100, 58900, 135400, 63099, 58600, 53200, 55599, 117800, 73300, 70900, 72100, 55100, 72400, 67200, 53600, 55000, 63800, 56000, 53600, 54000, 68900, 51200, 57500, 56700, 54700, 56100, 53700, 58200, 135500, 57300, 182200, 57900, 85200, 121100, 58600, 111300, 60199, 55300, 57500, 118400, 222000, 123200, 193400, 131300, 77300, 57800, 70300, 58400, 63099, 118900, 79200, 52800, 74600, 58600, 172100, 86500, 55400, 65300, 57500, 60100, 50000, 110200, 54400, 49600, 51900, 62100, 66100, 63000, 44900, 67200, 59400, 54800, 56200, 179700, 56600, 63900, 56900, 54900, 59800, 58500, 55100, 55000, 56100, 57100, 146400, 83200, 54500, 57600, 53600, 56600, 57200, 56200, 110200, 51700, 87300, 57200, 73700, 57000, 58600, 58700, 177800, 54400, 60599, 58000, 53000, 68400, 147200, 103600, 53900, 56100, 54700, 57699, 155400, 57400, 225799, 56100, 202000, 52100, 55900, 80100, 59300, 59000, 89200, 65300, 86100, 78400, 58900, 63500, 63900, 55000, 55599, 64700, 68200, 53200, 60900, 93600, 132900, 67000, 61400, 64600, 42600, 93500, 54800, 55900, 56100, 54900, 59600, 58800, 137400, 87500, 59300, 54400, 51500, 183200, 57200, 55900, 65000, 58000, 50500, 48700, 58600, 60500, 140700, 122500, 192500, 65300, 122600, 59600, 162700, 106700, 61300, 60599, 57699, 74400, 55100, 49600, 49800, 190300, 80200, 81600, 58000, 128100, 40300, 64900, 81300, 61900, 55199, 59900, 59100, 57000, 55800, 57600, 56300, 68800, 69300, 58800, 145700, 58600, 164700, 61000, 55700, 168000, 139200, 167700, 172000, 65600, 155200, 46200, 84200, 64000, 54000, 51600, 54200, 95000, 47200, 58900, 140400, 53400, 52400, 56500, 51500, 223800, 181600, 65800, 92700, 114800, 169200, 138500, 59300, 60300, 87100, 63600, 83000, 53600, 55300, 53600, 140500, 155100, 66700, 56000, 57699, 60900, 173700, 84700, 86100, 104700, 65700, 61300, 38600, 57500, 59000, 61100, 57100, 57000, 77500, 58800, 173800, 73600, 71200, 69400, 61200, 60400, 55100, 60599, 53800, 58500, 57400, 59200, 58099, 62600, 57699, 168800, 72600, 58800, 65400, 35800, 152500, 32000, 60100, 60300, 57200, 223900, 55900, 54200, 147200, 55700, 57300, 68800, 56800, 60100, 58200, 58600, 56100, 74800, 54500, 70600, 49400, 132700, 56700, 57300, 57000, 189800, 46300, 86100, 58700, 62500, 38900, 74000, 65500, 73200, 188900, 71000, 60199, 81700, 50100, 221900, 52500, 53099, 163500, 61000, 69000, 51800, 51200, 197600, 56600, 61600, 68800, 56900, 59700, 47800, 54600, 54800, 62200, 69300, 52300, 36000, 213600, 56600, 94200, 52500, 39100, 49600, 181000, 64200, 57300, 60100, 169800, 54400, 55400, 62600, 112700, 118500, 58000, 61100, 52600, 85800, 84400, 57600, 58800, 62200, 75200, 95900, 51800, 60100, 56500, 87300, 54300, 56300, 51500, 68300, 56700, 49100, 56800, 127700, 59400, 54100, 66900, 50900, 94900, 62900, 56700, 71300, 55700, 57600, 184300, 100500, 63000, 39000, 69400, 65100, 32000, 69300, 113500, 60000, 80100, 87600, 62100, 216000, 74700, 64300, 65500, 61700, 54100, 135300, 73100, 55100, 61500, 59200, 60900, 63600, 62200, 105800, 63500, 49500, 214600, 63400, 59900, 95600, 62000, 64000, 58099, 63300, 35500, 58700, 63300, 44200, 55599, 56000, 32000, 60199, 57000, 86100, 74700, 49600, 59100, 57400, 65400, 55900, 60700, 53200, 177300, 53200, 52100, 92700, 74300, 73900, 129600, 64500, 52699, 56000, 60800, 58300, 76400, 57000, 65500, 177100, 66800, 49900, 58900, 57300, 66700, 58200, 61600, 62100, 68200, 55199, 64300, 53500, 60199, 60700, 47600, 57000, 94400, 95200, 59600, 61200, 161400, 51800, 56900, 59000, 165500, 69500, 61800, 62600, 205200, 52600, 58800, 61100, 55599, 58600, 53900, 60400, 53400, 115399, 50100, 58700, 56300, 37900, 61800, 63400, 75100, 52400, 59800, 113300, 210700, 55800, 138900, 59600, 185300, 102700, 42100, 54900, 87200, 40900, 58200, 135400, 51700, 62500, 171300, 109000, 59800, 102700, 62600, 77800, 198400, 61200, 65400, 55100, 153700, 165900, 62000, 58600, 71000, 56500, 63099, 40900, 83200, 60599, 73800, 59800, 70900, 58500, 61300, 56300, 55100, 58000, 57800, 38000, 53500, 61800, 53800, 55500, 54300, 56000, 54700, 55700, 71500, 179800, 53500, 64100, 58400, 63700, 55500, 54600, 60800, 64300, 58800, 56600, 186600, 58200, 61500, 35100, 60100, 212399, 58600, 171800, 58300, 96700, 56900, 66400, 60300, 58500, 71300, 65100, 56300, 59600, 196000, 57800, 60000, 42600, 181600, 57300, 195500, 54200, 55400, 61500, 44500, 55000, 56300, 66700, 52699, 143500, 54400, 58400, 56300, 53300, 191900, 38000, 76000, 111000, 198900, 160900, 54500, 55400, 56100, 55000, 81500, 57100, 119400, 74200, 55700, 70200, 57600, 58600, 134700, 53000, 55100, 60199, 224100, 58000, 62500, 56500, 134200, 60300, 73800, 209400, 57000, 55900, 62200, 55900, 57500, 159200, 61200, 55300, 168000, 55700, 55300, 219200, 76600, 128800, 211000, 87500, 58600, 57500, 56300, 202600, 56200, 61100, 56800, 153900, 88400, 97400, 166600, 54900, 220000, 81800, 98600, 66900, 86500, 152300, 59100, 86400, 73100, 55000, 57100, 54800, 65500, 138200, 177700, 51600, 108699, 67000, 61500, 45500, 58500, 55400, 133800, 59200, 213100, 66600, 122100, 97100, 92100, 135300, 49600, 73000, 58200, 51900, 61400, 60700, 58099, 53300, 192600, 55800, 121500, 139700, 40100, 115700, 54300, 56000, 58400, 54400, 57699, 98800, 214800, 161400, 39300, 56900, 41700, 57000, 39600, 65600, 56600, 65900, 219100, 55800, 54300, 56300, 52600, 61100, 60800, 65500, 53700, 57100, 54800, 52500, 46500, 50900, 55199, 46300, 57100, 56300, 58900, 53500, 59800, 217399, 59300, 185900, 43300, 59000, 51700, 133000, 75300, 58000, 57699, 97800, 117400, 57200, 185500, 53800, 56700, 115600, 170200, 65900, 79000, 55199, 100000, 96700, 123699, 76700, 169400, 136700, 71400, 61000, 127400, 58800, 62400, 48400, 44200, 55599, 91600, 67000, 55599, 62800, 58000, 65600, 61700, 59300, 54300, 201700, 62699, 108400, 64100, 71100, 59900, 56300, 227900, 54100, 53900, 61700, 165200, 59100, 115800, 62400, 92400, 55599, 59500, 58800, 60500, 57400, 80700, 58500, 56500, 59800, 60400, 63300, 55199, 118900, 63500, 195000, 54700, 53099, 67100, 55700, 219200, 56900, 70300, 156000, 83600, 95100, 210200, 67000, 48000, 56700, 172100, 59400, 62800, 195400, 133800, 44800, 54900, 57300, 63000, 95000, 57600, 32000, 138600, 71000, 61200, 73500, 53400, 194800, 56900, 49200, 51900, 60300, 60900, 57000, 116100, 61300, 81000, 205000, 57800, 117000, 61300, 51800, 54300, 58600, 57800, 61500, 82400, 55900, 156600, 59300, 227800, 55000, 54400, 52000, 58900, 54100, 55599, 177500, 92500, 57100, 148600, 53400, 52200, 113200, 57300, 87100, 227100, 215200, 195700, 144300, 91500, 148700, 91100, 198200, 52600, 108500, 90700, 68600, 56500, 174600, 103400, 215600, 60500, 41600, 102899, 81100, 121300, 79200, 67400, 64400, 109400, 57000, 61400, 54800, 56300, 41500, 175700, 140300, 61000, 68200, 59700, 84600, 43300, 82600, 112300, 34900, 168200, 71700, 79800, 60800, 79500, 61700, 60800, 54800, 69300, 60100, 64100, 64500, 52100, 58600, 58900, 56200, 65500, 58700, 70400, 216700, 103400, 62699, 64600, 66600, 56300, 66300, 73800, 50500, 170100, 122000, 55300, 56000, 58099, 126500, 52200, 147000, 65900, 193200, 115300, 62600, 65900, 202300, 52800, 53900, 101000, 95000, 53700, 73300, 84400, 227900, 54300, 93200, 60500, 38400, 57300, 61400, 170400, 224500, 57100, 95000, 53400, 208900, 138800, 73200, 59600, 223600, 70400, 111900, 72900, 100500, 76000, 71600, 68000, 71100, 67700, 75900, 74200, 72800, 66500, 69400, 66200, 59400, 61000, 52300, 62900, 71200, 55400, 67000, 59300, 63200, 64500, 65100, 222600, 183400, 59600, 40400, 55599, 58500, 125000, 64700, 115399, 66400, 54500, 81700, 124400, 60500, 56300, 53900, 32000, 64200, 64800, 58300, 56800, 65000, 62800, 62300, 53200, 58300, 61300, 58600, 64400, 58099, 55700, 158400, 155100, 49700, 170000, 213500, 75600, 162300, 59900, 47000, 223600, 187300] + }, + { + "label": "Block width", + "range": [0, 700000], + "values": [268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 436900, 373600, 268630, 439000, 381800, 491200, 402800, 381400, 485600, 600000, 372200, 394700, 383800, 401100, 356500, 313200, 487100, 490700, 432299, 530300, 521500, 456700, 333800, 343200, 394000, 328200, 487700, 383600, 317700, 324600, 482900, 515100, 500100, 562700, 486000, 453400, 352900, 331300, 496200, 469099, 472500, 354700, 507700, 509000, 439300, 525300, 347600, 379000, 432800, 378800, 383200, 523800, 600000, 313600, 497700, 411300, 420000, 381100, 342800, 385900, 268630, 495800, 488000, 446400, 397900, 373300, 385700, 396500, 475700, 510600, 586800, 596000, 407600, 439200, 440800, 393100, 274600, 291900, 509799, 432800, 303000, 530600, 515900, 376800, 377400, 553500, 433600, 270800, 288000, 488000, 306800, 418000, 456900, 526300, 524500, 524000, 418800, 442800, 443200, 497200, 427500, 510300, 476000, 382700, 472200, 380400, 472900, 541100, 528200, 441599, 374600, 414099, 437299, 272500, 550000, 417299, 443700, 268630, 545800, 403400, 534400, 557200, 545200, 537400, 464300, 571200, 589400, 564000, 466500, 514500, 433200, 293600, 550100, 466599, 450100, 557200, 489000, 512200, 445600, 531000, 504400, 459799, 528800, 579800, 352900, 520700, 532000, 477900, 395600, 478900, 461300, 481400, 507500, 487200, 522299, 496000, 499600, 485200, 491500, 548300, 526000, 489600, 444000, 500900, 527600, 533200, 450000, 566500, 486300, 500700, 534900, 493000, 481100, 482500, 490900, 510200, 584700, 560700, 492000, 474600, 495300, 594100, 433700, 522500, 513100, 507500, 488100, 506400, 510400, 482700, 500400, 532000, 477700, 369600, 491200, 499400, 489200, 509099, 513600, 479600, 507299, 547600, 415300, 485900, 410400, 507700, 546700, 503300, 503600, 547700, 509200, 522400, 319700, 517200, 473000, 506800, 511400, 559200, 537900, 515300, 487500, 519000, 361100, 270800, 519000, 518200, 508200, 503900, 516500, 508600, 504900, 506500, 505300, 522000, 507500, 521400, 504600, 521400, 418700, 516700, 508400, 515400, 387000, 522299, 557300, 516599, 510600, 383600, 514700, 516700, 515600, 528200, 491500, 517900, 505000, 430300, 425300, 517800, 512600, 511599, 511300, 501599, 519099, 359700, 522400, 510400, 501100, 524600, 516000, 513800, 503100, 517000, 511400, 513700, 504000, 506900, 517000, 535700, 572700, 497900, 501900, 512600, 513800, 515000, 520700, 295100, 509700, 522299, 338800, 521300, 517200, 519500, 520800, 509300, 520700, 356000, 523000, 513600, 525100, 515700, 510000, 528300, 565200, 509300, 515500, 526900, 514200, 522200, 518500, 557400, 565100, 530700, 511100, 538200, 483700, 588800, 285200, 569100, 520800, 406300, 278300, 569500, 513900, 289000, 519600, 513600, 526900, 525500, 530300, 502000, 480000, 518500, 513000, 516900, 507000, 534300, 520400, 488500, 536000, 518900, 519000, 509400, 535500, 533600, 384900, 542700, 517200, 535700, 520500, 517100, 538700, 525900, 524200, 517100, 523600, 512900, 542400, 306800, 544600, 516599, 582200, 519900, 510900, 427200, 521300, 525900, 438200, 523500, 480000, 519600, 325400, 523300, 525200, 526500, 516400, 523800, 525400, 518700, 530800, 526400, 524400, 566400, 519500, 519700, 518400, 580400, 520600, 567600, 585000, 519300, 524300, 520800, 520900, 533400, 529500, 583500, 531400, 450000, 557600, 420700, 402900, 524500, 518700, 521800, 316400, 497100, 518900, 504400, 539400, 507000, 339700, 493800, 496700, 517500, 523400, 524400, 526200, 311300, 519200, 327600, 520400, 524800, 526400, 519200, 485200, 361000, 519300, 574400, 330400, 511800, 511200, 592800, 520900, 390400, 322200, 524600, 513300, 542400, 517200, 527300, 512700, 516100, 570800, 508900, 523500, 543500, 513700, 519700, 469000, 557400, 515000, 511000, 382700, 521400, 497900, 571100, 514099, 461100, 505600, 563300, 509200, 446300, 458000, 518000, 316500, 525600, 515700, 468600, 516300, 515400, 499000, 487500, 486900, 519099, 270200, 290900, 518000, 509900, 519300, 517299, 468700, 582300, 517200, 461100, 558600, 490500, 499099, 507100, 517600, 535200, 512100, 375300, 506100, 502200, 519600, 559900, 531200, 508100, 553600, 510700, 538600, 525200, 286400, 581800, 534900, 503500, 345400, 428300, 539400, 552000, 523400, 516300, 514099, 519200, 515800, 508000, 500400, 374900, 529900, 527100, 600000, 309600, 583500, 600000, 376000, 473900, 484799, 419300, 287200, 596600, 464600, 398900, 383900, 487000, 431900, 490700, 600000, 381100, 515800, 381500, 540900, 539100, 416500, 428800, 439300, 441300, 496000, 550800, 414300, 422100, 598200, 387800, 561100, 364000, 359700, 523400, 455300, 600000, 380400, 424000, 458600, 382500, 401100, 425100, 550500, 436599, 493200, 393200, 437900, 401100, 386300, 432299, 444799, 428200, 368800, 415700, 369900, 413400, 413000, 482100, 436000, 368600, 369300, 401300, 400400, 418300, 432299, 278800, 436100, 411800, 431300, 551100, 406300, 541500, 404200, 547200, 437000, 390200, 417900, 415800, 460600, 434900, 442600, 309300, 452000, 272200, 459700, 423300, 414799, 468900, 429300, 436700, 427400, 438800, 421100, 421700, 434000, 470700, 474799, 521599, 414400, 307300, 416700, 579600, 432400, 566100, 416200, 432500, 483100, 373200, 494799, 507400, 489700, 440800, 389200, 436599, 418000, 446500, 450700, 445200, 594100, 443900, 489000, 493300, 448900, 449700, 406000, 437400, 278100, 453400, 509500, 433000, 431200, 308600, 507500, 452500, 524700, 451700, 468700, 423600, 447200, 472600, 418500, 466000, 457000, 442299, 455000, 458400, 463800, 450900, 452900, 544200, 456500, 521700, 490900, 457200, 502500, 499099, 446800, 597000, 440600, 478700, 428700, 556900, 498300, 442000, 437900, 419000, 486000, 490700, 463000, 505500, 496700, 486200, 528300, 434200, 502600, 502400, 477800, 470500, 533400, 520700, 508400, 346400, 498900, 511300, 486900, 499300, 508100, 545700, 458400, 524300, 504700, 497299, 454300, 501100, 499900, 497800, 506900, 494500, 501000, 515300, 515000, 505300, 520200, 524099, 502600, 483000, 413400, 562300, 511700, 523500, 478800, 514600, 511100, 505500, 505300, 519099, 499600, 506900, 510500, 519900, 512400, 520400, 504500, 500900, 433200, 515900, 500700, 517100, 508200, 505900, 498900, 274800, 523200, 518100, 434600, 491100, 439900, 508300, 338800, 513900, 464600, 524000, 511100, 565900, 503700, 331700, 484200, 533800, 530700, 519799, 544000, 513200, 466100, 484799, 537100, 541300, 513500, 515100, 495600, 580400, 514600, 517000, 519600, 552000, 538400, 399700, 448000, 522100, 503600, 353100, 511300, 515700, 487700, 421700, 509200, 600000, 422400, 523700, 526700, 513000, 521500, 516400, 518100, 513300, 516700, 524400, 499099, 517299, 428600, 514700, 540300, 507500, 517200, 464900, 519099, 512100, 537200, 440900, 507900, 522500, 514799, 513900, 523500, 510100, 525100, 548400, 361100, 512700, 518100, 524400, 588900, 527800, 528500, 341500, 500100, 510300, 516000, 504200, 502900, 424200, 506599, 502700, 511000, 512200, 524099, 595200, 415700, 460400, 361800, 519700, 514300, 527300, 516900, 512900, 532100, 514900, 312800, 510400, 515100, 518500, 383900, 269400, 547800, 515000, 515100, 514300, 518700, 316300, 508700, 503200, 512700, 511599, 515500, 506599, 384900, 362200, 527700, 527500, 515600, 510100, 289800, 517400, 510600, 531900, 513800, 530100, 517600, 522700, 522900, 525700, 376000, 520100, 512100, 513900, 512400, 528600, 521900, 498500, 530200, 514700, 494200, 315900, 527900, 514700, 521599, 521599, 526700, 516400, 507900, 542600, 518600, 521500, 523500, 459700, 513400, 517900, 515400, 521400, 512900, 517600, 522100, 274700, 520800, 511599, 517000, 428600, 520500, 519799, 522800, 526400, 506700, 514000, 513100, 517900, 520200, 517600, 583600, 526800, 524400, 523900, 515900, 523300, 498700, 524200, 519200, 517500, 525100, 549400, 526000, 517200, 516900, 520700, 521000, 521300, 525700, 527200, 519400, 518600, 516900, 519600, 517400, 496300, 527400, 322400, 518300, 519200, 518400, 523400, 523100, 516599, 516100, 517900, 512500, 514600, 519500, 514200, 517600, 520200, 519200, 515200, 520100, 517000, 519600, 509900, 520900, 519799, 519900, 518200, 512400, 517700, 526200, 516700, 519799, 519900, 382200, 518900, 520000, 518200, 488700, 523600, 522299, 522299, 521900, 295200, 511599, 499400, 526900, 572800, 478500, 570100, 520000, 516599, 530600, 509799, 526000, 512000, 491599, 530200, 581800, 525800, 529700, 522200, 598700, 517400, 508500, 510200, 428700, 522200, 507100, 517299, 527600, 534400, 526500, 520700, 486900, 526200, 525600, 514799, 510400, 514900, 529600, 520100, 330400, 520800, 401100, 520600, 516000, 525100, 388800, 404700, 525800, 526400, 480100, 525700, 515300, 391100, 518100, 431599, 527800, 430300, 517400, 518700, 523500, 512400, 514300, 516100, 517299, 508200, 520900, 527200, 296700, 514400, 520100, 289600, 513900, 528000, 522700, 527600, 308500, 415200, 522800, 527500, 402800, 521400, 523300, 518800, 521200, 522200, 547400, 525300, 522800, 518000, 524800, 518300, 518300, 534100, 518400, 530400, 512800, 520500, 524900, 522500, 520200, 537200, 307300, 517200, 527300, 514099, 557900, 521599, 525600, 492800, 533800, 359300, 522299, 546000, 514200, 401500, 475200, 523900, 394000, 517800, 525400, 517600, 382800, 513200, 414900, 519000, 517100, 525300, 421700, 515300, 453800, 522299, 525300, 522200, 297000, 402100, 440400, 462900, 517700, 514200, 522299, 526700, 382000, 513200, 519799, 521000, 436200, 516400, 490400, 514099, 526800, 510600, 513400, 509900, 518900, 512400, 500400, 521700, 517100, 390400, 589900, 327700, 517100, 499799, 565300, 522299, 589000, 495000, 519099, 502299, 433100, 413000, 540000, 503200, 563400, 521599, 553100, 511500, 503200, 558600, 510200, 499799, 510100, 308500, 410700, 518400, 522700, 532000, 502400, 386700, 512700, 538900, 522900, 516300, 396900, 545300, 517400, 393900, 495600, 529600, 552900, 516900, 519300, 521800, 495100, 513500, 583300, 516800, 516300, 526400, 550500, 526300, 517100, 516800, 510400, 525000, 526500, 518200, 414300, 548400, 395800, 447800, 419799, 530100, 532300, 493200, 522600, 373100, 445500, 530000, 520500, 560400, 440000, 297700, 524200, 526100, 518600, 528400, 400700, 503000, 508600, 545500, 555400, 520600, 494900, 473200, 521599, 471700, 509099, 526800, 510800, 525700, 516900, 498300, 595700, 526300, 520600, 525600, 519400, 380300, 514099, 506100, 524000, 321100, 522500, 520000, 520600, 529700, 521800, 510300, 520500, 385100, 522200, 518300, 577600, 588400, 536100, 513100, 518000, 419000, 480700, 392500, 515900, 517400, 353900, 520800, 448300, 511200, 502700, 518500, 512900, 521300, 519799, 535700, 512299, 407000, 517100, 322600, 518700, 297300, 366500, 600000, 515200, 516300, 490700, 408800, 525700, 504300, 509600, 521300, 481400, 359700, 371300, 511900, 504300, 451300, 467600, 507700, 532300, 470600, 516800, 590300, 522000, 526000, 463900, 455600, 518500, 406100, 475600, 529000, 547300, 529000, 531400, 517500, 527800, 526600, 459500, 494200, 500000, 487000, 469000, 511300, 511700, 508600, 504500, 519900, 521700, 522299, 400400, 511100, 513900, 513900, 511100, 408500, 498900, 490600, 559100, 514200, 505500, 506300, 503800, 516599, 524200, 510100, 510600, 505700, 395700, 523100, 506599, 542700, 512700, 366700, 511800, 386800, 397700, 511000, 404200, 518300, 499400, 520500, 511800, 555900, 465500, 268630, 582200, 305800, 500800, 518400, 472200, 512700, 483300, 405400, 573000, 465600, 516500, 476000, 472000, 546000, 496200, 503400, 414000, 516800, 514000, 520800, 523700, 502900, 513900, 515400, 318200, 511500, 469900, 379700, 515300, 504200, 506500, 495500, 523200, 297100, 508100, 525600, 522800, 321100, 507299, 423900, 536700, 394000, 527100, 506900, 515400, 447800, 509900, 490900, 508000, 493400, 523200, 429900, 486800, 522100, 505400, 517299, 506800, 448600, 489000, 496800, 504300, 486200, 500300, 525300, 278500, 501900, 512400, 510400, 530000, 511500, 370200, 507600, 504500, 373400, 485300, 497600, 504200, 501100, 505400, 587500, 373900, 511500, 492299, 560600, 506500, 421500, 506100, 509099, 509300, 508600, 511300, 515200, 376500, 499900, 558600, 500200, 514400, 293900, 470700, 407400, 490100, 375800, 406100, 506100, 520900, 514099, 415600, 506200, 581600, 435400, 512500, 432800, 504200, 513900, 529300, 506000, 507000, 518400, 520600, 515900, 512200, 508200, 517900, 497500, 497100, 523300, 506800, 471000, 500600, 269500, 508100, 512600, 584400, 505900, 425000, 501900, 513300, 526800, 584700, 472500, 287400, 573200, 510700, 492200, 517600, 506300, 502800, 509200, 514400, 508800, 520600, 518200, 515100, 340000, 510500, 521000, 517400, 516800, 519900, 476700, 357200, 514000, 404600, 519300, 514900, 501200, 521200, 559700, 503000, 514500, 518100, 515100, 458600, 519200, 518300, 530500, 501100, 520600, 503800, 521599, 527200, 519300, 534200, 433200, 521599, 512100, 510400, 518500, 511599, 516500, 505600, 594900, 528900, 407600, 510400, 425800, 517100, 508700, 516599, 543700, 520400, 506300, 511599, 523000, 554000, 332400, 379900, 511500, 525100, 513700, 516400, 513600, 503400, 510400, 511200, 352600, 515200, 524000, 382400, 521900, 536300, 445300, 427200, 508700, 523800, 518800, 538100, 470400, 511300, 520900, 518700, 516200, 520700, 526600, 367700, 362200, 507200, 528800, 508200, 380900, 372500, 520300, 521500, 517900, 464000, 525900, 522299, 345600, 597300, 549000, 507000, 508800, 569100, 513400, 511599, 539300, 519700, 517299, 519300, 507600, 523200, 493300, 465700, 577300, 538600, 589000, 460100, 325400, 440200, 552600, 537500, 514200, 528100, 474900, 460000, 463300, 401500, 340400, 340200, 518700, 517400, 560500, 505200, 276800, 510800, 530500, 513100, 515000, 523300, 512000, 510600, 517400, 365200, 596600, 517500, 358600, 515700, 545500, 553000, 505000, 487000, 484700, 349200, 488700, 532400, 436200, 411300, 492600, 477600, 511000, 506500, 517299, 358800, 400700, 555400, 494900, 372200, 507800, 511300, 520300, 542100, 355900, 571500, 552800, 467500, 430700, 339400, 564100, 600000, 478700, 454500, 554800, 458400, 519300, 521700, 484099, 359500, 567700, 535200, 555500, 541900, 520500, 479700, 501100, 533700, 554300, 552300, 379700, 522500, 404900, 508300, 538600, 573200, 532700, 557100, 565900, 518500, 309200, 522100, 538500, 509400, 533200, 539900, 511900, 535400, 519900, 542900, 556800, 523100, 505900, 382700, 527400, 451500, 518400, 479300, 535600, 493100, 516300, 510800, 529600, 274700, 516500, 522400, 470500, 526800, 519300, 401300, 519000, 518900, 441599, 526800, 510100, 349400, 505000, 531900, 461100, 272200, 521500, 514799, 519200, 535000, 424300, 505000, 525600, 510500, 375100, 407500, 408600, 425000, 583700, 420700, 508100, 574900, 513700, 324400, 512299, 522900, 552100, 510800, 418200, 498000, 510900, 444700, 528100, 526300, 504099, 521300, 509500, 565800, 509700, 531100, 512400, 506400, 528700, 368900, 346700, 520300, 599300, 519400, 364400, 520100, 445700, 520200, 531600, 504500, 295700, 500200, 513200, 460600, 547600, 481400, 515700, 518100, 499700, 337200, 330600, 517500, 525300, 479000, 460400, 536200, 470500, 516100, 506500, 482200, 507800, 499600, 519099, 504400, 518800, 331800, 498100, 469400, 486200, 518400, 504099, 518000, 399400, 511000, 512200, 571100, 518000, 524900, 447600, 368500, 511200, 382200, 521000, 513400, 515600, 514300, 529500, 519400, 347900, 516200, 522900, 295600, 464799, 514099, 465600, 512000, 522000, 334300, 401000, 522700, 514200, 513900, 459099, 507700, 510500, 316200, 518900, 550100, 458700, 513200, 480300, 445900, 513400, 519000, 510700, 519000, 448300, 486200, 514400, 441700, 471200, 537400, 381700, 503700, 484799, 485800, 483000, 505100, 496599, 502100, 497800, 518000, 502500, 517100, 363100, 511400, 489600, 484900, 485300, 508000, 419300, 473900, 511800, 505800, 483300, 503700, 501200, 515200, 486100, 589600, 479300, 520400, 517299, 513300, 522100, 451700, 510600, 495600, 434900, 513400, 498600, 527900, 507400, 500300, 489300, 500700, 290900, 432000, 493800, 553300, 327400, 519799, 510100, 501500, 451400, 512400, 504400, 498200, 522200, 517800, 498900, 507200, 508300, 494099, 507400, 485200, 523800, 351500, 529700, 500700, 504500, 386000, 506400, 508300, 491700, 432100, 502800, 357100, 512700, 503000, 560900, 514400, 352000, 333500, 377100, 500500, 450100, 377500, 499799, 303100, 501800, 511000, 356300, 425300, 513500, 418000, 490600, 410700, 543000, 496700, 533000, 520000, 528400, 360400, 504900, 497400, 445000, 508600, 509300, 431700, 387900, 444799, 436200, 496000, 490500, 496900, 499000, 516800, 493000, 498700, 503200, 387400, 512900, 516900, 499400, 519400, 505500, 531300, 510900, 517700, 556400, 538300, 512500, 581200, 497200, 464200, 506200, 515000, 505400, 529900, 506100, 502600, 440800, 505600, 589800, 503100, 504099, 508200, 511700, 497200, 507800, 530800, 495000, 513100, 505600, 500700, 551700, 502600, 501599, 497900, 566800, 511100, 501800, 352200, 562800, 513500, 563100, 503000, 499099, 587700, 512900, 508300, 512700, 591100, 514200, 523800, 511000, 516700, 511900, 514300, 279100, 381800, 511700, 527600, 598300, 434600, 511000, 519900, 522200, 531000, 483500, 519700, 600000, 503700, 505800, 498400, 515800, 516900, 322900, 523700, 511500, 519600, 399600, 518500, 519700, 397500, 484600, 513700, 268630, 315400, 517200, 514500, 505900, 515300, 516000, 473100, 509099, 514500, 301900, 490500, 486900, 380200, 531800, 455000, 425100, 448300, 515200, 527100, 522299, 344700, 514200, 518500, 519099, 497800, 475100, 440200, 459700, 515900, 376300, 304500, 445500, 485800, 375000, 354000, 513200, 309700, 472900, 507299, 516300, 521900, 569700, 546300, 327100, 517900, 578300, 518800, 524000, 386000, 531300, 510600, 378600, 521400, 354000, 520200, 596800, 524200, 557800, 525100, 383600, 433600, 528500, 305900, 526000, 530100, 519200, 523900, 543400, 527400, 310200, 525900, 442000, 404400, 515800, 516599, 558500, 523300, 514200, 479700, 357800, 457800, 380700, 514900, 341800, 524500, 407400, 516300, 532800, 476599, 281100, 520600, 519500, 524300, 527000, 526200, 522400, 488700, 523100, 524200, 536500, 530300, 396000, 514700, 540900, 428100, 531600, 520600, 525500, 525100, 537000, 330700, 552700, 497800, 318000, 537300, 472299, 298100, 377500, 529200, 533300, 531200, 380000, 537300, 583800, 535800, 511200, 379700, 472600, 579400, 444400, 509799, 433500, 430500, 523700, 500600, 277800, 535700, 518500, 530200, 560800, 516200, 522700, 525000, 561000, 531700, 549000, 517200, 522600, 514000, 512200, 516500, 511400, 522600, 519700, 402100, 524900, 339000, 534900, 541700, 546700, 519600, 348100, 527100, 523700, 498600, 535500, 504700, 456200, 509300, 499500, 503600, 517700, 507100, 513500, 520900, 545600, 515300, 525500, 515300, 412700, 550000, 507800, 594700, 275700, 284100, 531200, 524300, 497600, 526100, 424000, 513200, 406100, 520600, 524000, 484600, 590700, 573700, 402900, 521400, 450200, 520500, 366400, 414500, 531300, 404700, 504400, 503100, 531300, 546200, 517299, 348800, 351000, 496900, 513600, 514900, 515200, 393600, 515800, 400400, 521400, 497700, 537300, 484200, 535100, 510100, 426100, 502400, 537200, 305700, 509200, 510900, 516200, 509900, 523000, 490000, 433000, 508700, 337600, 515800, 347200, 507700, 498500, 514099, 498000, 521300, 513600, 467700, 597800, 512600, 535700, 517600, 510400, 361500, 508400, 550900, 367600, 326100, 352700, 579200, 483200, 352800, 434600, 462100, 510700, 564600, 600000, 268630, 519400, 565500, 555200, 466900, 521900, 390200, 552600, 512000, 563600, 513800, 519600, 439900, 383100, 544900, 522200, 525900, 529000, 361000, 420000, 490000, 522000, 410200, 540600, 563200, 493900, 507500, 523200, 600000, 556000, 453800, 507800, 517100, 504300, 532700, 512000, 529500, 501800, 467100, 515700, 526900, 522299, 534600, 511400, 522400, 508400, 554200, 512900, 341500, 455800, 525300, 509400, 524099, 519400, 471200, 597300, 448200, 402800, 519300, 537200, 513000, 532300, 529800, 535000, 522700, 516200, 455400, 429700, 479799, 516400, 359000, 518400, 520400, 427200, 536700, 515900, 576100, 518100, 320200, 297400, 368200, 432600, 571800, 517600, 515400, 534900, 474200, 513300, 530600, 524099, 399500, 497299, 507500, 516500, 362100, 471800, 480600, 538100, 500400, 515800, 518200, 522000, 498000, 538500, 440800, 533600, 514300, 538000, 552600, 556500, 512000, 523900, 514099, 505700, 535800, 505900, 485100, 515300, 503500, 510400, 492200, 462600, 375000, 511599, 384700, 514500, 516400, 414300, 577900, 320200, 513300, 504300, 522200, 308000, 521500, 531300, 499300, 535800, 502600, 509300, 505600, 545000, 453800, 505700, 502000, 526500, 452900, 522100, 510900, 503100, 523600, 526500, 512800, 272000, 427299, 365300, 554800, 590700, 407900, 475500, 575700, 412299, 351000] + }, + { + "label": "Cylinder material", + "tickvals": [0, 0.5, 1, 2, 3], + "ticktext": ["A", "AB", "B", "Y", "Z"], + "values": [0, 0, 1, 0.5, 2, 3, 3, 0, 1, 1, 2, 2, 3, 0, 0, 1, 2, 2, 3, 3, 0, 1, 1, 2, 3, 3, 3, 0, 2, 3, 1, 0, 1, 3, 1, 0, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 3, 2, 2, 0, 0, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 0, 3, 0, 2, 2, 0, 2, 0, 2, 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 0, 2, 2, 2, 0, 2, 0, 0, 0, 2, 0, 1, 0, 0, 3, 1, 1, 3, 0, 0, 2, 2, 0, 2, 2, 2, 2, 3, 2, 2, 3, 2, 0, 2, 2, 2, 0, 2, 2, 2, 3, 2, 0, 2, 0, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + }, + { + "label": "Total weight", + "visible": true, + "values": [160, 1324, 252, 1711, 173, 624, 228, 2474, 371, 3103, 312, 2408, 460, 1727, 754, 2457, 227, 1963, 354, 2797, 377, 1327, 462, 1009, 166, 1415, 1118, 1063, 593, 498, 959, 1331, 1146, 645, 921, 1596, 663, 568, 492, 833, 630, 445, 504, 394, 647, 314, 1039, 829, 911, 282, 925, 681, 581, 506, 368, 373, 628, 538, 418, 419, 478, 884, 847, 369, 410, 344, 396, 501, 510, 379, 733, 1649, 239, 1035, 1839, 967, 514, 875, 794, 414, 664, 447, 839, 540, 636, 499, 1059, 743, 173, 473, 519, 465, 623, 726, 631, 521, 643, 323, 424, 472, 657, 510, 521, 661, 690, 497, 1664, 2162, 828, 1062, 479, 1452, 574, 604, 1069, 766, 268, 369, 755, 644, 811, 636, 363, 375, 359, 378, 336, 413, 680, 431, 361, 493, 761, 412, 386, 339, 628, 390, 648, 611, 323, 369, 555, 142, 2133, 653, 392, 597, 740, 345, 345, 1211, 600, 396, 369, 390, 481, 498, 371, 337, 316, 363, 676, 330, 353, 527, 352, 329, 341, 349, 334, 357, 501, 363, 1066, 284, 307, 338, 367, 327, 901, 330, 367, 311, 543, 370, 355, 318, 398, 335, 346, 382, 337, 807, 365, 349, 350, 415, 346, 330, 337, 330, 2201, 489, 338, 322, 349, 744, 239, 327, 327, 317, 763, 303, 343, 334, 293, 298, 472, 558, 331, 769, 321, 315, 342, 2161, 325, 1667, 493, 328, 878, 328, 737, 315, 325, 317, 529, 727, 390, 320, 953, 729, 300, 538, 663, 333, 320, 309, 596, 591, 325, 300, 709, 303, 312, 501, 737, 306, 360, 320, 1585, 324, 196, 294, 827, 305, 316, 415, 557, 302, 550, 332, 289, 730, 319, 324, 369, 335, 532, 422, 315, 1423, 1091, 320, 323, 358, 307, 314, 317, 218, 414, 299, 323, 371, 322, 314, 311, 338, 310, 324, 319, 674, 305, 366, 356, 316, 338, 352, 343, 339, 327, 497, 323, 780, 427, 346, 311, 319, 307, 343, 312, 1695, 329, 293, 316, 429, 341, 315, 548, 330, 307, 331, 321, 427, 319, 530, 516, 310, 344, 724, 479, 2748, 667, 977, 426, 696, 755, 944, 474, 331, 314, 319, 381, 294, 282, 302, 264, 370, 449, 314, 1029, 318, 312, 706, 349, 508, 297, 293, 322, 531, 480, 396, 286, 367, 315, 308, 365, 302, 467, 302, 313, 421, 351, 295, 792, 296, 651, 305, 1207, 501, 325, 311, 302, 290, 693, 312, 681, 474, 296, 321, 305, 322, 312, 317, 453, 322, 312, 550, 331, 334, 297, 560, 324, 812, 311, 320, 336, 533, 316, 1305, 502, 857, 329, 1089, 521, 495, 1025, 316, 373, 301, 935, 685, 547, 311, 622, 851, 880, 175, 331, 343, 1122, 314, 494, 211, 329, 228, 307, 306, 302, 312, 324, 549, 354, 390, 443, 305, 303, 1364, 320, 352, 412, 328, 522, 1509, 303, 314, 326, 304, 376, 297, 354, 305, 303, 309, 324, 543, 1231, 306, 865, 477, 388, 388, 603, 532, 310, 1249, 321, 162, 431, 346, 880, 355, 789, 320, 383, 317, 317, 571, 324, 321, 810, 1075, 329, 363, 310, 385, 322, 1005, 344, 1169, 526, 286, 328, 558, 295, 505, 339, 608, 526, 352, 312, 391, 933, 448, 590, 411, 463, 391, 697, 1113, 327, 604, 845, 1066, 330, 435, 750, 325, 709, 523, 315, 353, 882, 736, 456, 1111, 1050, 454, 955, 1728, 423, 796, 793, 1348, 761, 970, 668, 459, 386, 783, 276, 820, 708, 501, 764, 445, 492, 464, 496, 419, 967, 1243, 751, 472, 377, 419, 628, 480, 701, 368, 486, 949, 668, 720, 570, 425, 576, 352, 449, 427, 1551, 349, 478, 370, 327, 381, 379, 333, 403, 387, 378, 368, 450, 382, 376, 1184, 330, 349, 416, 435, 381, 362, 362, 426, 379, 372, 345, 841, 432, 952, 441, 238, 313, 437, 392, 763, 719, 376, 370, 679, 387, 531, 591, 352, 377, 174, 366, 340, 383, 361, 341, 335, 346, 392, 390, 731, 477, 861, 419, 1073, 337, 523, 972, 624, 404, 485, 398, 1249, 366, 371, 400, 419, 344, 823, 365, 506, 925, 305, 628, 357, 323, 489, 662, 354, 833, 353, 369, 352, 342, 493, 366, 329, 862, 333, 361, 816, 785, 500, 502, 368, 343, 349, 366, 340, 325, 359, 371, 403, 333, 385, 336, 352, 716, 424, 395, 1525, 338, 342, 504, 392, 808, 362, 327, 300, 1073, 1137, 376, 332, 363, 340, 876, 396, 319, 339, 330, 290, 1026, 452, 339, 286, 336, 873, 514, 339, 363, 883, 334, 324, 331, 324, 324, 326, 313, 324, 325, 332, 313, 321, 309, 692, 296, 312, 303, 333, 649, 697, 374, 294, 357, 313, 316, 294, 316, 422, 450, 321, 331, 302, 713, 303, 335, 321, 916, 350, 313, 307, 313, 1121, 312, 1299, 481, 306, 1072, 304, 622, 970, 310, 310, 980, 472, 317, 535, 328, 898, 661, 386, 335, 320, 337, 309, 293, 1362, 351, 876, 403, 319, 514, 1102, 456, 309, 498, 706, 305, 922, 1655, 330, 284, 915, 305, 319, 522, 546, 307, 502, 341, 358, 450, 324, 314, 322, 320, 321, 388, 307, 297, 310, 605, 358, 1048, 322, 315, 468, 350, 179, 1056, 1079, 342, 319, 345, 348, 314, 329, 311, 488, 775, 318, 312, 510, 884, 776, 313, 304, 488, 329, 294, 501, 315, 381, 348, 450, 299, 414, 481, 1377, 342, 1135, 637, 302, 322, 309, 305, 311, 696, 303, 486, 293, 308, 1131, 541, 295, 1198, 319, 301, 293, 321, 1268, 281, 361, 304, 306, 339, 1439, 618, 644, 359, 302, 319, 297, 690, 327, 299, 300, 305, 503, 326, 309, 367, 392, 964, 325, 291, 317, 281, 386, 282, 281, 366, 351, 906, 198, 294, 733, 442, 350, 315, 359, 435, 1220, 322, 330, 307, 434, 313, 304, 1111, 313, 313, 330, 336, 764, 312, 286, 348, 924, 309, 327, 317, 364, 423, 294, 337, 323, 313, 718, 676, 323, 335, 332, 332, 321, 1004, 340, 324, 296, 312, 512, 311, 324, 306, 308, 313, 310, 367, 330, 317, 311, 307, 308, 309, 451, 312, 169, 320, 462, 316, 304, 314, 324, 311, 303, 316, 324, 316, 364, 305, 307, 332, 628, 303, 336, 305, 318, 305, 323, 305, 289, 314, 309, 274, 302, 326, 469, 404, 331, 323, 301, 690, 755, 327, 322, 299, 470, 319, 246, 692, 551, 327, 369, 334, 321, 694, 322, 313, 319, 758, 494, 536, 300, 483, 295, 407, 289, 330, 314, 212, 306, 312, 360, 326, 335, 310, 461, 1065, 299, 1554, 316, 883, 306, 314, 302, 381, 313, 939, 310, 298, 295, 1040, 613, 365, 317, 842, 311, 427, 322, 315, 358, 313, 356, 307, 305, 727, 303, 343, 674, 300, 314, 303, 311, 694, 456, 434, 320, 422, 307, 293, 311, 149, 510, 314, 704, 1070, 294, 309, 368, 299, 328, 471, 300, 292, 305, 309, 336, 306, 323, 323, 367, 319, 374, 311, 324, 449, 345, 175, 300, 330, 390, 740, 1029, 644, 532, 339, 966, 307, 325, 301, 245, 916, 334, 463, 373, 313, 671, 678, 298, 315, 286, 820, 312, 535, 340, 464, 322, 323, 416, 595, 571, 596, 753, 725, 295, 304, 294, 451, 308, 303, 310, 506, 308, 744, 308, 289, 311, 293, 455, 327, 263, 1153, 1348, 473, 148, 1811, 134, 294, 577, 834, 349, 287, 1848, 316, 1058, 839, 759, 799, 323, 501, 372, 598, 366, 454, 383, 334, 324, 323, 696, 763, 318, 351, 334, 321, 1631, 295, 354, 292, 321, 741, 1141, 318, 722, 320, 311, 303, 302, 323, 335, 442, 310, 807, 338, 324, 341, 958, 301, 327, 458, 321, 319, 318, 337, 670, 1254, 1019, 340, 193, 740, 308, 413, 336, 203, 330, 321, 336, 966, 561, 1178, 323, 329, 582, 306, 202, 455, 305, 1161, 845, 341, 396, 428, 1298, 973, 300, 692, 519, 296, 306, 441, 759, 572, 299, 628, 340, 514, 320, 296, 326, 569, 823, 373, 618, 410, 317, 313, 712, 210, 363, 717, 1324, 1247, 297, 315, 315, 313, 1031, 354, 312, 312, 208, 374, 338, 361, 704, 433, 320, 319, 295, 528, 291, 1356, 520, 802, 369, 856, 954, 612, 286, 316, 440, 901, 413, 373, 375, 301, 462, 645, 414, 356, 554, 2389, 377, 371, 735, 458, 368, 400, 355, 345, 756, 377, 381, 275, 417, 337, 611, 390, 326, 319, 383, 338, 375, 329, 730, 416, 532, 312, 312, 326, 741, 396, 292, 480, 196, 288, 375, 347, 477, 969, 311, 535, 1560, 328, 312, 719, 459, 299, 324, 312, 505, 325, 547, 1029, 342, 908, 308, 999, 336, 568, 466, 353, 645, 324, 518, 722, 285, 613, 699, 610, 1555, 792, 683, 302, 676, 582, 290, 865, 1675, 559, 398, 271, 459, 1523, 366, 276, 882, 488, 562, 381, 295, 339, 543, 381, 623, 551, 367, 459, 348, 309, 350, 335, 328, 792, 320, 323, 324, 767, 443, 567, 380, 290, 362, 337, 345, 483, 560, 467, 356, 334, 749, 631, 321, 460, 356, 328, 329, 241, 366, 703, 346, 515, 362, 465, 841, 344, 304, 341, 560, 364, 355, 381, 357, 194, 176, 341, 386, 322, 342, 1393, 185, 341, 499, 3154, 324, 435, 542, 353, 402, 292, 334, 413, 179, 806, 892, 494, 281, 527, 332, 655, 724, 1253, 300, 326, 302, 701, 570, 408, 669, 360, 466, 795, 373, 301, 316, 355, 312, 303, 307, 434, 287, 321, 321, 300, 686, 306, 324, 716, 316, 875, 323, 479, 751, 326, 547, 371, 438, 329, 734, 1176, 495, 2745, 736, 421, 327, 436, 323, 353, 670, 442, 300, 595, 369, 727, 484, 352, 369, 325, 341, 266, 481, 306, 323, 294, 493, 365, 400, 382, 372, 540, 310, 317, 932, 321, 404, 328, 303, 340, 324, 313, 315, 318, 331, 729, 1063, 306, 322, 339, 317, 455, 312, 693, 332, 416, 320, 362, 322, 327, 331, 1044, 309, 337, 363, 426, 407, 613, 471, 337, 321, 308, 326, 976, 318, 1265, 314, 874, 294, 319, 366, 337, 343, 453, 322, 481, 447, 749, 370, 337, 308, 316, 516, 385, 426, 349, 416, 585, 373, 353, 360, 194, 419, 311, 318, 317, 287, 341, 335, 587, 551, 393, 303, 288, 1113, 322, 313, 863, 329, 285, 276, 327, 345, 769, 956, 1183, 866, 765, 309, 668, 1849, 516, 395, 363, 427, 293, 359, 260, 1235, 339, 465, 329, 725, 242, 361, 302, 347, 318, 337, 333, 325, 313, 544, 318, 304, 436, 332, 638, 741, 969, 362, 309, 909, 751, 721, 934, 535, 1328, 221, 459, 341, 302, 287, 306, 883, 222, 351, 769, 326, 292, 353, 412, 3017, 791, 401, 1250, 603, 839, 584, 358, 381, 465, 455, 495, 609, 313, 305, 1283, 680, 404, 325, 344, 356, 987, 453, 530, 606, 391, 364, 175, 327, 610, 341, 333, 794, 448, 351, 1603, 417, 283, 395, 540, 338, 319, 354, 302, 339, 364, 526, 347, 357, 542, 840, 416, 301, 370, 191, 1251, 174, 512, 338, 329, 828, 721, 309, 777, 319, 325, 325, 322, 341, 293, 336, 314, 321, 303, 408, 257, 955, 322, 323, 323, 1101, 227, 478, 336, 350, 175, 486, 313, 359, 1170, 346, 336, 500, 282, 910, 295, 303, 971, 1226, 335, 285, 653, 1002, 325, 353, 382, 323, 334, 289, 305, 316, 349, 430, 677, 160, 914, 453, 595, 419, 173, 281, 920, 364, 331, 502, 657, 421, 311, 360, 665, 636, 327, 346, 407, 632, 471, 326, 336, 749, 391, 557, 381, 478, 442, 469, 303, 310, 292, 379, 453, 274, 312, 673, 321, 516, 371, 288, 446, 352, 318, 617, 315, 329, 939, 646, 497, 178, 394, 409, 180, 390, 922, 380, 465, 495, 396, 835, 391, 362, 511, 346, 308, 565, 345, 314, 346, 333, 316, 355, 348, 427, 360, 415, 1113, 813, 321, 486, 349, 363, 363, 359, 181, 317, 356, 223, 294, 326, 146, 372, 307, 465, 402, 275, 324, 317, 359, 316, 336, 506, 782, 298, 283, 500, 401, 412, 631, 342, 296, 311, 327, 323, 422, 321, 354, 1106, 357, 399, 333, 322, 380, 298, 345, 340, 340, 310, 354, 307, 336, 470, 258, 315, 361, 473, 326, 553, 666, 1079, 318, 326, 848, 390, 516, 344, 1169, 449, 324, 340, 310, 320, 300, 326, 305, 498, 288, 324, 312, 174, 344, 354, 409, 260, 331, 494, 1185, 309, 835, 336, 801, 428, 190, 303, 446, 185, 321, 532, 286, 493, 746, 536, 336, 499, 340, 373, 1164, 336, 378, 313, 883, 728, 344, 322, 360, 315, 353, 203, 384, 426, 369, 328, 386, 321, 337, 318, 301, 319, 320, 175, 300, 349, 296, 315, 686, 323, 698, 315, 427, 1174, 506, 396, 321, 464, 309, 308, 338, 370, 327, 313, 941, 323, 384, 194, 333, 1186, 329, 1325, 325, 558, 311, 373, 335, 323, 977, 542, 311, 460, 1188, 324, 332, 184, 2534, 322, 1325, 300, 305, 383, 250, 307, 316, 417, 297, 1378, 305, 330, 316, 506, 717, 173, 426, 637, 1256, 803, 305, 314, 718, 317, 439, 324, 755, 411, 310, 386, 325, 331, 550, 302, 309, 341, 1055, 328, 355, 265, 1013, 477, 533, 1710, 322, 315, 346, 719, 324, 844, 342, 311, 700, 424, 419, 998, 442, 664, 1037, 446, 754, 369, 321, 864, 316, 346, 322, 847, 470, 490, 865, 310, 994, 322, 501, 361, 390, 661, 332, 344, 657, 431, 322, 440, 398, 1876, 732, 292, 1528, 380, 351, 209, 476, 467, 1304, 337, 925, 378, 769, 555, 551, 774, 227, 503, 334, 205, 351, 493, 368, 304, 1131, 320, 484, 800, 281, 549, 306, 316, 809, 310, 325, 529, 939, 836, 179, 321, 176, 326, 189, 370, 327, 351, 822, 317, 308, 321, 301, 494, 346, 355, 306, 326, 318, 302, 298, 287, 323, 316, 329, 320, 475, 306, 527, 902, 575, 1023, 309, 520, 273, 723, 341, 373, 334, 854, 534, 333, 1296, 312, 318, 525, 1259, 406, 441, 309, 498, 663, 706, 423, 631, 794, 452, 393, 766, 371, 356, 309, 265, 321, 542, 379, 317, 394, 325, 522, 346, 378, 308, 1310, 358, 457, 372, 698, 799, 319, 978, 310, 307, 339, 959, 328, 598, 491, 509, 463, 337, 328, 340, 326, 475, 330, 323, 337, 290, 375, 308, 747, 310, 736, 315, 303, 369, 536, 1075, 539, 717, 1493, 477, 513, 1314, 409, 494, 454, 881, 337, 278, 2065, 1757, 212, 458, 708, 363, 560, 326, 137, 598, 390, 785, 928, 301, 1965, 321, 232, 295, 751, 354, 307, 674, 343, 398, 1135, 336, 462, 343, 290, 306, 328, 329, 334, 410, 312, 659, 335, 976, 342, 449, 293, 324, 703, 313, 2091, 583, 731, 863, 337, 292, 1122, 320, 784, 1010, 885, 1148, 1264, 492, 644, 454, 1033, 294, 655, 574, 250, 320, 1056, 617, 1132, 344, 192, 611, 686, 732, 672, 382, 449, 500, 474, 350, 314, 324, 182, 856, 1291, 347, 327, 349, 1909, 536, 461, 641, 507, 1004, 369, 445, 344, 441, 356, 341, 315, 855, 315, 404, 370, 297, 339, 465, 732, 366, 349, 396, 918, 534, 359, 508, 380, 357, 388, 465, 257, 805, 975, 321, 315, 335, 1028, 458, 838, 372, 997, 571, 335, 372, 886, 299, 306, 498, 552, 303, 449, 478, 927, 280, 415, 301, 234, 324, 346, 1107, 1192, 321, 548, 305, 983, 763, 455, 337, 985, 372, 600, 476, 555, 429, 612, 387, 391, 394, 530, 429, 410, 387, 412, 395, 333, 348, 294, 350, 413, 308, 361, 334, 350, 361, 355, 1161, 1772, 334, 185, 313, 330, 603, 397, 469, 373, 302, 465, 493, 344, 325, 297, 185, 355, 362, 324, 334, 334, 349, 345, 305, 299, 349, 328, 357, 467, 319, 891, 570, 245, 1310, 1273, 472, 775, 318, 288, 1076, 1412] + }, + { + "label": "Assembly total cost", + "visible": false, + "values": [1125, 9274, 2735, 16920, 2193, 20704, 4814, 34689, 5565, 46554, 5225, 38887, 9746, 37715, 17798, 55250, 5697, 49083, 11226, 81939, 24258, 62488, 27363, 61924, 12511, 106196, 24444, 7443, 9111, 12527, 50738, 9320, 12291, 17571, 9508, 11176, 9142, 7687, 6724, 11219, 17825, 6506, 6367, 4966, 8495, 3860, 12844, 10688, 13026, 4007, 57281, 9790, 7335, 13748, 5358, 5393, 4401, 3769, 5233, 5058, 6047, 6188, 11899, 5297, 5154, 4406, 5061, 7022, 6358, 4721, 7723, 16745, 2651, 14194, 100772, 10504, 7021, 6131, 16730, 2904, 8334, 5968, 5876, 7394, 4454, 6800, 18376, 5204, 2190, 6146, 7013, 6412, 4361, 5082, 8028, 6484, 4504, 3832, 5687, 6174, 4603, 6913, 3651, 4631, 4833, 6532, 97138, 21918, 5801, 7435, 13138, 14597, 6070, 19943, 7487, 5362, 3945, 4907, 5287, 7937, 9998, 7852, 4820, 9385, 4686, 4751, 8594, 5144, 4760, 5899, 4614, 30326, 5332, 5030, 4759, 4429, 17294, 5192, 4542, 9333, 2261, 4911, 34968, 2179, 34658, 16325, 4811, 4185, 9017, 4224, 4435, 14536, 7129, 4772, 4726, 4840, 3369, 7428, 4504, 4316, 4097, 4399, 4733, 4105, 4597, 3691, 4405, 4245, 4195, 4168, 4694, 4421, 3507, 4615, 14408, 3607, 3956, 4295, 4583, 4138, 11128, 4147, 4602, 3940, 5590, 4505, 4377, 4016, 5191, 4199, 4269, 4686, 4375, 9716, 8664, 4371, 4294, 9779, 4396, 4183, 4247, 4112, 129671, 3426, 4257, 4102, 4386, 8822, 3138, 4040, 4066, 3950, 12502, 3787, 4273, 4238, 3678, 3660, 6006, 7725, 4172, 12580, 4056, 3920, 4249, 35461, 4054, 108185, 6568, 4154, 11735, 4090, 8971, 3943, 4062, 3857, 5408, 8982, 5662, 3974, 6673, 18248, 3739, 3770, 8110, 4129, 4050, 3826, 8314, 9053, 4022, 3718, 8838, 3786, 3874, 6244, 18434, 3815, 4491, 3954, 39629, 4009, 2456, 3643, 10976, 3783, 3946, 5151, 3900, 3730, 3854, 7621, 3597, 7909, 3959, 4022, 4585, 4130, 6699, 27180, 3935, 89225, 14401, 3962, 4022, 4459, 3816, 3938, 3931, 3041, 26734, 3722, 4047, 4583, 3998, 3907, 3887, 4191, 3858, 4033, 3994, 11019, 3777, 4482, 4277, 3968, 4237, 4378, 4264, 4212, 4049, 7410, 4020, 12723, 12452, 4283, 3862, 3953, 3803, 4276, 3866, 18642, 4063, 3648, 3901, 27631, 4251, 3875, 3837, 4109, 3808, 4083, 3993, 27553, 3950, 3715, 3617, 3819, 7947, 11786, 3358, 44432, 38355, 6845, 9723, 4878, 11458, 6609, 3321, 4964, 3884, 3963, 8633, 3627, 3471, 3780, 3359, 4582, 28916, 3896, 12827, 3908, 3865, 4945, 4276, 6296, 3685, 3657, 3948, 6513, 6549, 4829, 3554, 4503, 3893, 3820, 4464, 3720, 3270, 3743, 3861, 27079, 4284, 4335, 9658, 3671, 7768, 3772, 15008, 6611, 4023, 3840, 3957, 3579, 8798, 3870, 9817, 3319, 3647, 3955, 3782, 3981, 3845, 3930, 5570, 3975, 3856, 3851, 4094, 4130, 3676, 5579, 4013, 17649, 3704, 3967, 4152, 34352, 3909, 16007, 3517, 56056, 4041, 14115, 3652, 6567, 13776, 3906, 4618, 3729, 6550, 8592, 12494, 3885, 13919, 10616, 12510, 2200, 4164, 4256, 13850, 3877, 11216, 1477, 7529, 3283, 3802, 3773, 3728, 3868, 4104, 7658, 4381, 4671, 6364, 3789, 3774, 16177, 3965, 9465, 5965, 4054, 5330, 15225, 3764, 3865, 4058, 3775, 3758, 3704, 4368, 3729, 3767, 3828, 4150, 3804, 15268, 3815, 11823, 3345, 4872, 4659, 7489, 3729, 3868, 29343, 3997, 2114, 5553, 4292, 12800, 4382, 19742, 4101, 8777, 3940, 3978, 7211, 4103, 3980, 12415, 12316, 4082, 8375, 3841, 8810, 4128, 11997, 4269, 15031, 3683, 3614, 4116, 35845, 3653, 3538, 4223, 8373, 33766, 4411, 3863, 4728, 11456, 5587, 38362, 5111, 29991, 4825, 10478, 13283, 4010, 38799, 11943, 14042, 4038, 5282, 12235, 4027, 11570, 5328, 3914, 4404, 6180, 10126, 10305, 23044, 12414, 6658, 6690, 17090, 5813, 10147, 5552, 14343, 11440, 9605, 8565, 6188, 5280, 5483, 3629, 5741, 8375, 6864, 5353, 6098, 6015, 5678, 6594, 5520, 15985, 8704, 5263, 5731, 5020, 5553, 13258, 6541, 4909, 5117, 6779, 61602, 6992, 8510, 3993, 5627, 4035, 4817, 6048, 5638, 10862, 4568, 6015, 5021, 4284, 5133, 5166, 4381, 5240, 5107, 5232, 4897, 7559, 5099, 5020, 15005, 4330, 4830, 11538, 5852, 5130, 4805, 4753, 9282, 4965, 4964, 4540, 21046, 5789, 15483, 5931, 2900, 4104, 5939, 10136, 12664, 9245, 4934, 4829, 9958, 5014, 8126, 4141, 4664, 5028, 2236, 4825, 4450, 6349, 4727, 4520, 4438, 4538, 5013, 4969, 9032, 29764, 12658, 5571, 12826, 4427, 6303, 6807, 8189, 5126, 6691, 5004, 15571, 4613, 4841, 5437, 5492, 4572, 13590, 4729, 31885, 9172, 3977, 4397, 4489, 4192, 30894, 17398, 4636, 12650, 4567, 4597, 4625, 4501, 8431, 4569, 4265, 10628, 4315, 4627, 13535, 10198, 3503, 6671, 4717, 4428, 4557, 4727, 4387, 4179, 4651, 4798, 4920, 4306, 4756, 4240, 4542, 8949, 27217, 5130, 100064, 4412, 4353, 3534, 4753, 45902, 4727, 4278, 3988, 13557, 14324, 4833, 4152, 4563, 4299, 10786, 10025, 3990, 4245, 4201, 3703, 12584, 5588, 4231, 4049, 4219, 10855, 3598, 4248, 4530, 10756, 4306, 4004, 4135, 4069, 4192, 4082, 3919, 4071, 4059, 4177, 3922, 3982, 3841, 11321, 3668, 3855, 3796, 4226, 8651, 8405, 8613, 3628, 4544, 3889, 3934, 3673, 3943, 27240, 28881, 4011, 4120, 3737, 40767, 3746, 4190, 4026, 9678, 8023, 3928, 3813, 3904, 13989, 3909, 22474, 5945, 3795, 14047, 3829, 8130, 12089, 4416, 3859, 23854, 5822, 3941, 34877, 4097, 6289, 8372, 4738, 4124, 3961, 4110, 3843, 3763, 22330, 4302, 10698, 5011, 3960, 6460, 13165, 5659, 3833, 6159, 8569, 3728, 12430, 17360, 4081, 3556, 12850, 3802, 3962, 5382, 7233, 3823, 5937, 4512, 4425, 5552, 4024, 3882, 3993, 3970, 3997, 4806, 3793, 3723, 3848, 7973, 4442, 12803, 4020, 3904, 6002, 4338, 2233, 17184, 14084, 4271, 3942, 7932, 4327, 3882, 4098, 3837, 5936, 10801, 3953, 3865, 3573, 10508, 19422, 3855, 4313, 3419, 4098, 3648, 3507, 3942, 5038, 4350, 28905, 3717, 26636, 31080, 16310, 4550, 14594, 8871, 3743, 4000, 3809, 3784, 3870, 15692, 3764, 7100, 3653, 3821, 13999, 7394, 4537, 14574, 3960, 3737, 3643, 3972, 8878, 3501, 4511, 3785, 3810, 4214, 92394, 8440, 8972, 4418, 3717, 3955, 3701, 10342, 4052, 3730, 3688, 3796, 6183, 4046, 3823, 4535, 4834, 13248, 4026, 3616, 3936, 3491, 4754, 3483, 3528, 4498, 4365, 11386, 2894, 3620, 18349, 5466, 2455, 3885, 4448, 5426, 14879, 3993, 4086, 3797, 5588, 3885, 3773, 18127, 3875, 3891, 4095, 4159, 11648, 3866, 3565, 4317, 12171, 3823, 4053, 3922, 8253, 27165, 3649, 7753, 4005, 3871, 17967, 44240, 3984, 4138, 4101, 4124, 3966, 12588, 4194, 4016, 3667, 3851, 11327, 3833, 4023, 3798, 3810, 3874, 3840, 8337, 4063, 3925, 3852, 3812, 3820, 3828, 5671, 3844, 2457, 3964, 3237, 3922, 3762, 3880, 4014, 3866, 3752, 3931, 4022, 3918, 4517, 3779, 3801, 4107, 15710, 3752, 4170, 3771, 3965, 3775, 4004, 3779, 3585, 3903, 3836, 3382, 3748, 4032, 3283, 5534, 4099, 3997, 3732, 8711, 18895, 4040, 3984, 3701, 7008, 3970, 3088, 8520, 6614, 4162, 4436, 4138, 3979, 8524, 4013, 3861, 3965, 18961, 6070, 6394, 3698, 5940, 3645, 4818, 3582, 4120, 3910, 2799, 3779, 3893, 4458, 4022, 4108, 3820, 3227, 10985, 3685, 22218, 3925, 10987, 3806, 3865, 3745, 22845, 3873, 12636, 3830, 3697, 3640, 14144, 8228, 4503, 3912, 10683, 3832, 27508, 4369, 3907, 4705, 3860, 4686, 3807, 3775, 11854, 3763, 4259, 10998, 3715, 3918, 3754, 3837, 10320, 29350, 28013, 4806, 27181, 3783, 3626, 3838, 2197, 6793, 3880, 11481, 28248, 3636, 3818, 4555, 3699, 4061, 5737, 3704, 3612, 3780, 3815, 4160, 3795, 3964, 4006, 4520, 3967, 4631, 3837, 4005, 5551, 4224, 2573, 3722, 4063, 25150, 8949, 12712, 7939, 6700, 4162, 13481, 3801, 3966, 3741, 3298, 11662, 4130, 6268, 4621, 3866, 16793, 9268, 3710, 4199, 3545, 8357, 3845, 7090, 4227, 5999, 3976, 3986, 5145, 8848, 7687, 7778, 9672, 18129, 3671, 3758, 3623, 6176, 3829, 3751, 3839, 6623, 3818, 9382, 3824, 3567, 3876, 3648, 3187, 4050, 3274, 14438, 33701, 3315, 2019, 17972, 1935, 3651, 7236, 10042, 4314, 3418, 46207, 3910, 13235, 11016, 5315, 12999, 4040, 6042, 4600, 6015, 4556, 10560, 4629, 4154, 4057, 4028, 10213, 10194, 3936, 4337, 4100, 4017, 17640, 3666, 4336, 3605, 3985, 10013, 13900, 3940, 9771, 4029, 3830, 6681, 3749, 4002, 4144, 28335, 3851, 9628, 4190, 4020, 4209, 11639, 3714, 4051, 29534, 4001, 3943, 3919, 4181, 8921, 15249, 25498, 4413, 2570, 9094, 3781, 5196, 4153, 2806, 4299, 3944, 4153, 11672, 7329, 13429, 3990, 4059, 5928, 3770, 2724, 5689, 3807, 14139, 10239, 7795, 4983, 10307, 16032, 12418, 3739, 8526, 6457, 3656, 3791, 28264, 8997, 7054, 3697, 6385, 4206, 7040, 3971, 3702, 4031, 8243, 47305, 4623, 6289, 26518, 3919, 3896, 17804, 2868, 4490, 17926, 86514, 14833, 3636, 3919, 3900, 4163, 13083, 4797, 3872, 3870, 2921, 4626, 4389, 4492, 8805, 27930, 3981, 3945, 3652, 6474, 3616, 84260, 6441, 11593, 4576, 12714, 13232, 12893, 3555, 3922, 28141, 12058, 5088, 4661, 4667, 3727, 5861, 9001, 5727, 4432, 6923, 39382, 6197, 4625, 16568, 5855, 4562, 4751, 4391, 4257, 9707, 4869, 4715, 17117, 5311, 4147, 6155, 4805, 4006, 3954, 8680, 4167, 23759, 4134, 11938, 26580, 3728, 3886, 3880, 4065, 18544, 9038, 3609, 30977, 2647, 3585, 8622, 4313, 3341, 60270, 3902, 6742, 101532, 4069, 3902, 11753, 5734, 3706, 7359, 3882, 5163, 4062, 7403, 12706, 4274, 11082, 3834, 13857, 4180, 7733, 6289, 4394, 8664, 4020, 6487, 8926, 3545, 7424, 8967, 7105, 15471, 8990, 15930, 3739, 4733, 4080, 3681, 11600, 109361, 35468, 4939, 3449, 29173, 88421, 4596, 3452, 11753, 4978, 36214, 4717, 3650, 4247, 34932, 4724, 9055, 6852, 4699, 6300, 4318, 3863, 4364, 4208, 4057, 11771, 3994, 3980, 3999, 11116, 5528, 7493, 24623, 3933, 4465, 4205, 4283, 6279, 5729, 5893, 4439, 4200, 9248, 4421, 4061, 5686, 4450, 4066, 4108, 3132, 4617, 17583, 4328, 6506, 4535, 30003, 48630, 4313, 3777, 4245, 6884, 4535, 3881, 8812, 4461, 2683, 2233, 4284, 4820, 4040, 4277, 16571, 2554, 4242, 6285, 51154, 4044, 5770, 3800, 4401, 5008, 3647, 4158, 26583, 2467, 20174, 10786, 3461, 3497, 7861, 4243, 16393, 11861, 76828, 4026, 4071, 3740, 17541, 7580, 5092, 4687, 4720, 3266, 13157, 4661, 3747, 3893, 4432, 3893, 3761, 3795, 9961, 3574, 4001, 3976, 3773, 17165, 3782, 4045, 9144, 3962, 50212, 4029, 5950, 8949, 4070, 7221, 8644, 28169, 4062, 8752, 15000, 15842, 44456, 9155, 5309, 4053, 10116, 4046, 4394, 8316, 5514, 3711, 38351, 8468, 10339, 6030, 8029, 4578, 4029, 4222, 3390, 6727, 3803, 20095, 3644, 31728, 4573, 9131, 24869, 4656, 40536, 3844, 3932, 12001, 3974, 9248, 4031, 3798, 4203, 4056, 3876, 3886, 3939, 4057, 9567, 26598, 3804, 4015, 7758, 3949, 29312, 3902, 8209, 7521, 5578, 3987, 4785, 3995, 4079, 4112, 12730, 3823, 4210, 8367, 27490, 4937, 8779, 6457, 7775, 3957, 3823, 4042, 22441, 3978, 15741, 3913, 12279, 3646, 3940, 5004, 4172, 4199, 5890, 4245, 5994, 5525, 18737, 4526, 4310, 3837, 3909, 33292, 4777, 27477, 4301, 5769, 8151, 4658, 4344, 4495, 2657, 5789, 3851, 3932, 3934, 3683, 4207, 4138, 8298, 6530, 8710, 3782, 3585, 13380, 3997, 3900, 49974, 4074, 3540, 3419, 4076, 4261, 9672, 6695, 14148, 50140, 9092, 3985, 9640, 42657, 33535, 8852, 8334, 5261, 3730, 22730, 3339, 76534, 4819, 28020, 4070, 8981, 2923, 4505, 4593, 4316, 3911, 4185, 4135, 4015, 3895, 5559, 3947, 4231, 5169, 4122, 8906, 18540, 11809, 4399, 3866, 11489, 9502, 10162, 11780, 34617, 14012, 2961, 5785, 4343, 3766, 3585, 3799, 14853, 2997, 4256, 9665, 19975, 3645, 8150, 26579, 49058, 11073, 4814, 31254, 7724, 11033, 8315, 4314, 4509, 5916, 28810, 5994, 15238, 3883, 3771, 13249, 9488, 4866, 3982, 4169, 4354, 12208, 5757, 12358, 7437, 4743, 4418, 2405, 4048, 10157, 4252, 4071, 19869, 5500, 4254, 11221, 5164, 4153, 4884, 3785, 4207, 3912, 4325, 3755, 4161, 8314, 3687, 4203, 4409, 5546, 22831, 5131, 3903, 4589, 2432, 80943, 2199, 3585, 4205, 4049, 12623, 11762, 3815, 9929, 3934, 4023, 4371, 3987, 4218, 3830, 4139, 3910, 4533, 3782, 5007, 3306, 23891, 3988, 4008, 4002, 13496, 3002, 5976, 4142, 4357, 2414, 30186, 4189, 4749, 13952, 4589, 4189, 5993, 3502, 13135, 3665, 3739, 11784, 28602, 4450, 3574, 10675, 13041, 4002, 4349, 4771, 4001, 4159, 3482, 3804, 3884, 4343, 9972, 16927, 2221, 12913, 29211, 7041, 27050, 2402, 3485, 11956, 4511, 4063, 3515, 9775, 27027, 3871, 8808, 8094, 8066, 4060, 4286, 26107, 7034, 28205, 4038, 4148, 12288, 5029, 6825, 24260, 30775, 28412, 5946, 3777, 3890, 3615, 4738, 29181, 16464, 3920, 8606, 4059, 5257, 4640, 3570, 6020, 4387, 3958, 40271, 3907, 4062, 12193, 4527, 31964, 2436, 4879, 9400, 2240, 4846, 59578, 8689, 28097, 6135, 9008, 12433, 5015, 4496, 3579, 4307, 3807, 8084, 4643, 3879, 4300, 4138, 4068, 4424, 4336, 6213, 4457, 26961, 14333, 13269, 4073, 6316, 4332, 4492, 8378, 4443, 2350, 4011, 4427, 2909, 3752, 3989, 1997, 8651, 3891, 5882, 5091, 3443, 4074, 3974, 4512, 3921, 4204, 5164, 10883, 3711, 3570, 6328, 5074, 5141, 8367, 4363, 3678, 3889, 4145, 4042, 5286, 3989, 4476, 13140, 4539, 25758, 4129, 4004, 4694, 3864, 4295, 4277, 4463, 3857, 4439, 3782, 4186, 30163, 3261, 3942, 5408, 6214, 4099, 3875, 9581, 15415, 3965, 4083, 10985, 4853, 3614, 4321, 14442, 3146, 4061, 4248, 3869, 4031, 3748, 4124, 3763, 7007, 3547, 4060, 3906, 2375, 4294, 4412, 5156, 3421, 4143, 6916, 14716, 3866, 10080, 4168, 11257, 6132, 2617, 3796, 5781, 2543, 4022, 7851, 3579, 31698, 10449, 7074, 4179, 6623, 4294, 4985, 14197, 4219, 4643, 3871, 10871, 10158, 4303, 4042, 4687, 3933, 4395, 2669, 5223, 26888, 4835, 4120, 4863, 4033, 4234, 3945, 3787, 4005, 4006, 2384, 3737, 4331, 3717, 3897, 11221, 3970, 11405, 3906, 5170, 26275, 5172, 4725, 4027, 29448, 3856, 3820, 4221, 4553, 4084, 3920, 12274, 4041, 4563, 2432, 4168, 14781, 4089, 84860, 4055, 6853, 3917, 4639, 4187, 4046, 15864, 3795, 3896, 29479, 14289, 4031, 4153, 2588, 41096, 4004, 28909, 3755, 3826, 4556, 3108, 3827, 3932, 4954, 3685, 14009, 3794, 4092, 3929, 5161, 10867, 2372, 5304, 7846, 14855, 10527, 3801, 3892, 17953, 3898, 5557, 4010, 8929, 5144, 3868, 4846, 4033, 4106, 7961, 3734, 3844, 4228, 14218, 4070, 4390, 3578, 64666, 30739, 9257, 42766, 3995, 3910, 4320, 11739, 4026, 10762, 4262, 3868, 21774, 27155, 26769, 13667, 5432, 8575, 13691, 5792, 12304, 8357, 3962, 12225, 3930, 4287, 3987, 10619, 5986, 6403, 11136, 3844, 13668, 4749, 6511, 4570, 5367, 9270, 4129, 5042, 6824, 27699, 3999, 28366, 4786, 30493, 10545, 3619, 38201, 4702, 4334, 2851, 30809, 3274, 21828, 4164, 12971, 4680, 9109, 6845, 6667, 9545, 3102, 31606, 4117, 3017, 4334, 31897, 8413, 3756, 13786, 3943, 7094, 9861, 17684, 7372, 3802, 3923, 13130, 3832, 4035, 6716, 13120, 10771, 2451, 3981, 2509, 4019, 2530, 4595, 4017, 4468, 12432, 3922, 3813, 3969, 3716, 31879, 4280, 4485, 3782, 4025, 3901, 3719, 18455, 3560, 3943, 19801, 4049, 3957, 30692, 3774, 3690, 12946, 43153, 12827, 3480, 3642, 3492, 5065, 4683, 8439, 4097, 5979, 7318, 4074, 27698, 3828, 3955, 7204, 80055, 4851, 11026, 3846, 6536, 41579, 8716, 5304, 9580, 9725, 10335, 8879, 9245, 8502, 4393, 7028, 3207, 3943, 6586, 4696, 3914, 9070, 4049, 33617, 4304, 8600, 3814, 81235, 4422, 6506, 4557, 7048, 19991, 3954, 13795, 3822, 3798, 4260, 11751, 4101, 7718, 31546, 6384, 3247, 4172, 4088, 4228, 4035, 5786, 4094, 3987, 4185, 3877, 4554, 3840, 8856, 17877, 11098, 3877, 3743, 4629, 5448, 14210, 5504, 17927, 15188, 5892, 6491, 15609, 4910, 8230, 29322, 11412, 4175, 3866, 34283, 101349, 2855, 3210, 17724, 4466, 6815, 4038, 1938, 8412, 4895, 12817, 23221, 3737, 32782, 3984, 3123, 3650, 12300, 4338, 3889, 8256, 4272, 5260, 14199, 4117, 6801, 4269, 3612, 3803, 4083, 4070, 4216, 5383, 3891, 9386, 4152, 13778, 7919, 3149, 3636, 4064, 11473, 3886, 34380, 6906, 11939, 10572, 7726, 3639, 58427, 3988, 5494, 13997, 12759, 69547, 82624, 6238, 9041, 5960, 13276, 3667, 7896, 6782, 3844, 3967, 12716, 7470, 14500, 4257, 2617, 7419, 4804, 8821, 4705, 4733, 28271, 6839, 30762, 4321, 3868, 3984, 2542, 11350, 13299, 4292, 4368, 4264, 27377, 8775, 5744, 7910, 12689, 12160, 4769, 5551, 4261, 5514, 4379, 4244, 3879, 21386, 4042, 9266, 4556, 3667, 4165, 29895, 11939, 4558, 4237, 4917, 13036, 6889, 4424, 32664, 4694, 8153, 9377, 5507, 3342, 10823, 62847, 3939, 3912, 4122, 66439, 3210, 10350, 4615, 12868, 7511, 4255, 4616, 12370, 3704, 3788, 6565, 6764, 3760, 5382, 5920, 13436, 16417, 5747, 3951, 2810, 4018, 4297, 24861, 15191, 3990, 6731, 3764, 13253, 9573, 10539, 4175, 13712, 4754, 7612, 10652, 6949, 5321, 4285, 4785, 4906, 4827, 33385, 5270, 5091, 4739, 5003, 4787, 4146, 4299, 3657, 4368, 5066, 3848, 4575, 4150, 4381, 4496, 4471, 14916, 29694, 4159, 2529, 3889, 4098, 8034, 4757, 6803, 4640, 3780, 5750, 7248, 4255, 3991, 3723, 2276, 4447, 4513, 4048, 4071, 4323, 4361, 4313, 3757, 3874, 4314, 4087, 4463, 30169, 3933, 11064, 8721, 3231, 14337, 15420, 5613, 10373, 4057, 3450, 14347, 15572] + }, + { + "label": "Assembly penalty weight", + "values": [9, 794, 34, 1409, 17, 536, 39, 7133, 115, 9843, 107, 7017, 273, 5131, 1210, 9032, 82, 7312, 252, 16778, 760, 4349, 891, 4228, 123, 10800, 1593, 467, 260, 226, 2940, 803, 689, 420, 422, 1229, 275, 198, 150, 423, 423, 134, 146, 89, 248, 55, 612, 401, 546, 52, 4208, 307, 194, 257, 91, 93, 178, 133, 99, 98, 131, 345, 461, 90, 96, 69, 91, 160, 148, 81, 274, 1332, 31, 667, 11733, 502, 163, 354, 480, 67, 252, 120, 303, 181, 162, 153, 1142, 251, 17, 131, 165, 135, 162, 222, 230, 154, 198, 58, 109, 132, 189, 159, 102, 167, 218, 147, 11969, 2288, 316, 467, 234, 1025, 169, 497, 435, 265, 49, 82, 252, 234, 372, 229, 79, 127, 76, 82, 105, 97, 207, 115, 75, 1014, 259, 95, 84, 68, 404, 91, 183, 273, 49, 82, 1378, 14, 5405, 769, 86, 168, 308, 67, 69, 818, 200, 87, 79, 86, 100, 174, 77, 66, 58, 74, 206, 62, 73, 129, 71, 63, 65, 67, 71, 72, 116, 76, 696, 46, 55, 66, 77, 61, 460, 62, 77, 55, 146, 77, 71, 58, 93, 64, 68, 82, 66, 364, 113, 69, 69, 145, 69, 62, 65, 62, 19984, 113, 65, 60, 69, 307, 33, 60, 60, 57, 676, 52, 67, 64, 49, 50, 129, 196, 63, 690, 59, 56, 66, 5409, 60, 13549, 146, 62, 466, 61, 305, 56, 60, 56, 138, 299, 102, 58, 406, 1019, 51, 137, 247, 63, 59, 54, 226, 257, 59, 51, 286, 52, 55, 143, 1039, 53, 73, 58, 4807, 59, 22, 49, 411, 52, 57, 98, 129, 51, 143, 90, 47, 284, 57, 59, 77, 63, 162, 849, 56, 8935, 711, 58, 59, 73, 53, 56, 57, 30, 822, 50, 59, 78, 59, 56, 55, 65, 54, 60, 58, 532, 52, 75, 71, 57, 65, 70, 67, 65, 60, 173, 59, 717, 203, 68, 55, 57, 53, 67, 55, 1579, 61, 49, 56, 877, 66, 56, 142, 62, 53, 62, 58, 873, 57, 132, 126, 54, 98, 622, 103, 9106, 1860, 454, 148, 206, 412, 423, 103, 77, 55, 57, 118, 49, 45, 52, 40, 77, 960, 56, 603, 57, 55, 225, 68, 146, 50, 49, 58, 159, 142, 88, 46, 76, 56, 54, 75, 51, 100, 51, 55, 842, 69, 59, 353, 49, 236, 52, 829, 150, 60, 54, 54, 47, 277, 55, 309, 104, 49, 58, 52, 59, 55, 57, 116, 58, 55, 143, 62, 63, 50, 151, 59, 515, 53, 58, 64, 1357, 56, 961, 117, 3664, 61, 696, 128, 147, 639, 56, 79, 51, 342, 268, 245, 55, 311, 413, 505, 17, 63, 67, 713, 55, 199, 17, 89, 34, 53, 53, 51, 55, 60, 192, 71, 84, 130, 52, 52, 1033, 58, 122, 113, 61, 134, 1110, 52, 55, 60, 52, 68, 50, 71, 52, 52, 54, 61, 139, 861, 53, 464, 105, 86, 84, 207, 125, 54, 3281, 58, 15, 108, 68, 523, 71, 1197, 59, 120, 57, 57, 187, 60, 58, 483, 696, 61, 109, 54, 121, 60, 563, 67, 797, 130, 47, 61, 1473, 49, 119, 65, 231, 1307, 71, 55, 85, 491, 114, 1705, 96, 1039, 86, 346, 690, 60, 1724, 462, 677, 61, 106, 664, 59, 590, 134, 56, 71, 355, 338, 168, 1600, 612, 141, 437, 1438, 111, 367, 283, 942, 412, 453, 259, 128, 92, 277, 45, 304, 278, 156, 269, 123, 136, 121, 148, 104, 1063, 676, 257, 125, 85, 105, 301, 142, 232, 85, 150, 4912, 226, 287, 135, 108, 147, 77, 123, 109, 1131, 72, 131, 84, 63, 88, 88, 66, 95, 89, 90, 81, 222, 88, 85, 808, 64, 76, 179, 115, 88, 78, 77, 236, 85, 83, 71, 1381, 113, 1075, 118, 31, 58, 117, 144, 653, 301, 84, 81, 315, 88, 207, 155, 74, 86, 17, 80, 68, 166, 77, 69, 67, 71, 89, 88, 303, 989, 509, 105, 642, 67, 153, 405, 231, 94, 147, 90, 889, 76, 81, 98, 104, 71, 773, 78, 1146, 413, 55, 178, 73, 61, 1077, 421, 74, 503, 73, 77, 73, 69, 255, 76, 63, 420, 65, 76, 752, 363, 112, 151, 78, 68, 72, 78, 67, 61, 75, 80, 91, 65, 84, 65, 72, 292, 847, 91, 11709, 67, 67, 110, 86, 2467, 77, 63, 54, 662, 742, 82, 63, 75, 66, 434, 144, 58, 65, 63, 48, 594, 115, 65, 53, 64, 433, 119, 65, 75, 438, 65, 59, 62, 60, 61, 60, 56, 60, 60, 63, 56, 58, 54, 561, 49, 55, 52, 64, 254, 271, 115, 48, 73, 55, 56, 49, 56, 853, 954, 59, 62, 51, 1951, 52, 64, 59, 430, 100, 56, 53, 55, 717, 55, 1725, 131, 53, 681, 53, 229, 536, 63, 54, 842, 126, 57, 1413, 61, 321, 252, 84, 63, 58, 63, 54, 50, 2153, 69, 432, 92, 57, 151, 677, 118, 54, 140, 279, 52, 519, 1391, 61, 46, 538, 53, 58, 135, 178, 53, 140, 69, 72, 115, 59, 56, 58, 58, 58, 85, 53, 50, 54, 218, 72, 618, 59, 56, 127, 69, 18, 1321, 688, 67, 57, 98, 69, 56, 61, 54, 133, 382, 57, 55, 120, 434, 1165, 55, 60, 108, 61, 49, 114, 56, 86, 69, 957, 50, 814, 1112, 1052, 70, 751, 257, 51, 59, 54, 52, 55, 392, 52, 160, 49, 53, 726, 181, 64, 806, 57, 51, 49, 58, 629, 45, 74, 52, 53, 65, 9789, 237, 263, 72, 51, 57, 50, 337, 60, 51, 50, 53, 143, 60, 54, 76, 87, 580, 60, 48, 57, 44, 84, 45, 45, 75, 70, 470, 26, 48, 1034, 110, 56, 56, 73, 108, 837, 59, 62, 53, 110, 55, 52, 1450, 55, 55, 62, 64, 426, 55, 46, 68, 509, 54, 60, 57, 107, 846, 49, 93, 59, 55, 992, 2282, 59, 63, 62, 62, 58, 577, 65, 59, 49, 55, 208, 54, 59, 53, 53, 55, 54, 109, 61, 57, 55, 53, 54, 54, 116, 55, 19, 58, 98, 56, 52, 56, 59, 55, 52, 56, 59, 56, 75, 52, 53, 62, 758, 52, 64, 52, 57, 52, 59, 52, 47, 56, 54, 42, 51, 60, 101, 101, 62, 59, 51, 274, 1101, 60, 58, 50, 155, 58, 34, 270, 169, 62, 76, 63, 58, 272, 59, 55, 57, 1092, 137, 159, 51, 132, 49, 92, 47, 62, 56, 26, 53, 55, 73, 60, 63, 54, 98, 564, 50, 3025, 56, 444, 53, 55, 52, 564, 55, 537, 54, 50, 49, 667, 228, 75, 57, 409, 54, 869, 63, 56, 76, 55, 75, 53, 52, 623, 52, 66, 534, 51, 56, 52, 54, 337, 989, 902, 72, 848, 53, 48, 55, 15, 157, 55, 586, 1108, 49, 54, 76, 50, 61, 125, 51, 48, 52, 54, 64, 53, 59, 59, 76, 58, 79, 54, 59, 114, 67, 21, 51, 61, 726, 306, 600, 234, 162, 65, 594, 53, 59, 51, 36, 485, 63, 131, 79, 55, 867, 285, 50, 60, 46, 330, 55, 171, 66, 126, 58, 59, 98, 247, 199, 210, 330, 1010, 49, 52, 48, 126, 54, 52, 54, 151, 53, 318, 53, 47, 55, 49, 95, 60, 39, 760, 3499, 103, 13, 1582, 12, 49, 190, 388, 69, 45, 6497, 56, 640, 418, 246, 757, 59, 140, 78, 174, 76, 172, 82, 63, 60, 59, 331, 352, 57, 69, 63, 58, 1417, 49, 70, 48, 58, 336, 732, 57, 319, 58, 54, 72, 52, 59, 63, 918, 54, 363, 64, 59, 66, 515, 51, 60, 1002, 58, 57, 57, 64, 270, 883, 1867, 68, 22, 309, 53, 97, 64, 25, 64, 58, 64, 523, 186, 826, 59, 61, 166, 53, 24, 118, 53, 758, 400, 95, 90, 158, 954, 549, 51, 271, 153, 49, 53, 914, 320, 185, 50, 193, 65, 164, 58, 50, 60, 217, 2632, 79, 187, 810, 57, 55, 976, 27, 74, 988, 8719, 865, 49, 56, 56, 59, 614, 77, 55, 55, 27, 79, 67, 74, 283, 897, 58, 57, 49, 157, 48, 7908, 153, 430, 77, 511, 575, 285, 46, 56, 904, 492, 96, 79, 80, 51, 123, 265, 108, 72, 175, 6523, 163, 78, 437, 122, 76, 88, 71, 67, 333, 83, 82, 326, 100, 64, 181, 86, 60, 57, 119, 64, 639, 62, 622, 806, 126, 55, 55, 60, 1051, 128, 48, 1104, 23, 47, 116, 68, 104, 4048, 55, 164, 11963, 61, 55, 605, 120, 50, 85, 55, 125, 60, 183, 600, 67, 464, 54, 631, 64, 199, 132, 71, 253, 59, 153, 295, 46, 210, 284, 233, 1168, 369, 390, 51, 204, 156, 48, 454, 13920, 1427, 90, 42, 967, 9234, 76, 43, 469, 117, 1506, 82, 49, 65, 1401, 82, 262, 172, 78, 131, 68, 54, 69, 64, 61, 438, 58, 59, 59, 395, 112, 192, 700, 51, 74, 64, 67, 137, 155, 125, 72, 63, 318, 173, 59, 120, 72, 61, 61, 34, 77, 941, 68, 152, 75, 1036, 2493, 67, 52, 66, 177, 75, 68, 120, 72, 23, 17, 66, 85, 59, 67, 1079, 21, 66, 143, 11880, 59, 113, 134, 71, 92, 48, 63, 812, 20, 1241, 446, 111, 45, 195, 64, 778, 609, 7556, 54, 60, 51, 944, 195, 95, 214, 77, 100, 716, 79, 51, 56, 72, 55, 52, 53, 155, 47, 58, 58, 51, 897, 53, 60, 297, 57, 2646, 59, 130, 313, 60, 178, 115, 911, 61, 300, 801, 317, 9038, 308, 102, 60, 158, 59, 70, 255, 111, 51, 1691, 112, 345, 133, 101, 77, 60, 66, 41, 147, 53, 449, 49, 1156, 76, 131, 717, 79, 1595, 54, 57, 507, 58, 134, 60, 52, 65, 60, 55, 56, 57, 61, 315, 2179, 53, 59, 94, 57, 987, 55, 266, 89, 105, 58, 78, 59, 61, 62, 613, 54, 65, 109, 870, 93, 248, 138, 94, 58, 53, 60, 785, 57, 911, 56, 491, 49, 57, 83, 64, 66, 120, 61, 132, 113, 1080, 77, 66, 54, 56, 1274, 84, 868, 69, 109, 217, 79, 70, 74, 23, 110, 55, 57, 57, 48, 65, 63, 223, 169, 123, 52, 47, 692, 58, 56, 2946, 61, 46, 43, 60, 67, 339, 407, 779, 2965, 325, 56, 298, 6838, 1303, 125, 108, 103, 49, 585, 39, 6512, 75, 852, 61, 298, 32, 74, 66, 68, 57, 64, 63, 59, 55, 145, 57, 58, 105, 62, 259, 1056, 528, 73, 54, 476, 325, 335, 501, 1382, 903, 29, 121, 67, 52, 47, 53, 846, 30, 69, 339, 438, 48, 103, 812, 10805, 400, 89, 3049, 211, 419, 223, 71, 80, 125, 938, 137, 693, 55, 52, 820, 294, 91, 59, 66, 71, 553, 118, 235, 207, 85, 74, 19, 60, 416, 66, 62, 1242, 113, 69, 1218, 98, 54, 88, 136, 65, 57, 70, 51, 65, 108, 129, 67, 72, 145, 710, 98, 53, 78, 21, 7564, 17, 120, 65, 61, 500, 611, 54, 350, 57, 60, 64, 58, 65, 50, 63, 56, 66, 52, 93, 38, 1462, 59, 59, 59, 684, 30, 130, 63, 69, 19, 1015, 59, 77, 762, 71, 64, 139, 45, 552, 49, 52, 529, 3101, 67, 46, 501, 592, 59, 70, 83, 59, 63, 46, 53, 56, 69, 153, 885, 16, 541, 981, 196, 841, 18, 45, 498, 75, 61, 115, 302, 836, 55, 114, 248, 233, 60, 68, 780, 225, 860, 60, 64, 649, 89, 175, 668, 1088, 925, 127, 52, 55, 48, 82, 979, 293, 55, 263, 59, 130, 78, 47, 121, 70, 57, 1886, 56, 61, 519, 172, 1172, 19, 88, 137, 18, 86, 4092, 118, 859, 139, 127, 489, 89, 74, 116, 68, 53, 210, 72, 55, 68, 63, 58, 71, 69, 123, 73, 842, 723, 775, 59, 139, 69, 74, 109, 73, 19, 58, 72, 29, 50, 59, 13, 115, 54, 124, 93, 43, 60, 57, 74, 56, 64, 126, 388, 50, 46, 144, 92, 97, 238, 67, 49, 55, 61, 59, 102, 58, 72, 679, 73, 763, 63, 59, 81, 52, 67, 66, 68, 54, 71, 53, 64, 1041, 38, 56, 92, 133, 60, 144, 294, 1454, 57, 60, 422, 86, 121, 67, 775, 93, 60, 66, 54, 58, 51, 61, 52, 159, 47, 60, 55, 18, 67, 71, 96, 40, 62, 156, 798, 54, 390, 64, 412, 121, 22, 52, 116, 21, 59, 195, 46, 1153, 356, 171, 64, 149, 66, 84, 762, 64, 80, 55, 441, 337, 67, 59, 76, 56, 71, 24, 90, 815, 80, 61, 85, 59, 65, 57, 51, 58, 58, 18, 51, 69, 50, 56, 551, 59, 572, 56, 102, 1107, 126, 87, 59, 983, 54, 53, 65, 77, 61, 56, 523, 59, 82, 21, 63, 802, 61, 8238, 60, 175, 55, 79, 64, 59, 1136, 134, 55, 994, 788, 59, 63, 21, 7677, 59, 1377, 51, 53, 81, 35, 53, 57, 96, 50, 932, 53, 61, 56, 126, 371, 18, 103, 229, 875, 382, 53, 56, 993, 56, 111, 59, 316, 96, 54, 85, 60, 62, 203, 51, 54, 66, 679, 61, 71, 42, 4768, 1085, 289, 4911, 59, 56, 68, 608, 59, 412, 66, 55, 604, 842, 817, 619, 110, 258, 642, 117, 668, 110, 58, 484, 57, 68, 58, 410, 127, 142, 437, 54, 617, 71, 147, 75, 95, 280, 62, 80, 216, 879, 59, 926, 88, 4185, 356, 48, 4600, 81, 69, 27, 1094, 100, 1870, 64, 548, 81, 328, 174, 170, 339, 31, 1122, 63, 28, 70, 1173, 111, 52, 719, 58, 160, 362, 352, 183, 53, 56, 781, 54, 60, 161, 562, 408, 19, 58, 20, 60, 21, 78, 60, 71, 486, 57, 53, 58, 51, 1170, 68, 72, 53, 60, 57, 51, 377, 46, 58, 439, 61, 58, 1085, 53, 129, 538, 1842, 598, 55, 126, 43, 201, 72, 113, 62, 339, 177, 62, 1294, 55, 57, 172, 7283, 91, 176, 54, 147, 1940, 282, 102, 288, 355, 167, 125, 328, 113, 71, 78, 39, 58, 164, 81, 56, 128, 60, 1299, 68, 116, 53, 7338, 72, 136, 78, 237, 1244, 57, 618, 54, 53, 66, 519, 61, 209, 1141, 148, 98, 64, 61, 65, 60, 126, 61, 59, 64, 51, 78, 54, 310, 336, 388, 56, 52, 77, 141, 691, 143, 929, 1094, 129, 151, 960, 93, 272, 989, 455, 64, 49, 4784, 12101, 27, 96, 959, 74, 176, 60, 12, 230, 87, 724, 1656, 51, 4285, 58, 32, 49, 659, 70, 54, 256, 67, 94, 736, 63, 146, 66, 48, 53, 61, 61, 64, 100, 55, 284, 63, 616, 97, 92, 48, 60, 583, 55, 5038, 189, 627, 420, 93, 48, 3879, 58, 289, 644, 522, 5278, 7955, 139, 266, 122, 622, 49, 240, 182, 46, 58, 623, 213, 745, 67, 22, 209, 216, 299, 207, 83, 899, 155, 1094, 69, 55, 59, 21, 440, 828, 68, 64, 68, 4618, 334, 121, 232, 511, 565, 79, 113, 67, 111, 71, 66, 56, 1396, 57, 134, 77, 49, 65, 1026, 632, 76, 68, 89, 549, 166, 72, 1224, 82, 104, 131, 120, 39, 394, 4543, 58, 56, 63, 5089, 98, 398, 78, 581, 194, 64, 78, 500, 50, 53, 148, 172, 52, 112, 129, 577, 286, 108, 53, 30, 59, 68, 987, 823, 58, 169, 52, 590, 333, 172, 64, 616, 80, 207, 181, 176, 104, 172, 85, 87, 87, 1255, 104, 95, 84, 95, 87, 63, 68, 49, 69, 96, 54, 75, 63, 70, 74, 72, 786, 3447, 63, 21, 55, 62, 219, 88, 148, 79, 52, 122, 167, 67, 59, 50, 19, 72, 74, 60, 62, 65, 69, 67, 52, 52, 69, 61, 72, 1047, 57, 451, 238, 35, 934, 908, 124, 364, 58, 46, 698, 1102] + }, + { + "label": "Height st width", + "values": [236630, 326876, 347086, 437333, 457543, 105963, 568000, 216420, 236630, 326876, 347086, 437333, 457543, 105963, 568000, 216420, 236630, 326876, 347086, 437333, 457543, 105963, 568000, 216420, 236630, 326876, 350300, 210200, 106030, 349000, 288700, 328200, 262300, 251400, 384900, 435500, 224500, 273000, 276300, 224500, 222900, 202100, 394000, 418300, 302200, 475800, 338900, 296400, 115700, 276700, 298200, 163400, 380500, 282000, 226600, 233500, 404799, 451800, 424400, 493100, 397500, 337600, 157200, 242399, 421400, 403700, 397600, 239400, 416300, 441200, 354000, 354000, 315599, 151100, 269600, 255900, 270900, 422299, 488800, 240300, 376900, 318200, 302800, 262600, 238000, 277400, 122130, 405500, 455999, 353400, 287200, 269800, 292400, 290200, 357200, 417600, 519200, 544600, 318600, 345200, 352600, 283500, 172500, 168299, 427900, 332800, 84900, 307400, 418600, 214700, 280000, 407700, 366200, 114300, 86100, 393700, 239000, 341900, 358600, 413900, 382700, 412600, 344099, 375500, 372100, 428300, 365400, 436500, 390500, 288300, 403900, 301000, 376599, 470700, 460900, 374300, 246200, 333300, 349700, 106600, 514099, 341100, 364700, 229730, 388600, 339000, 466700, 491500, 419400, 478100, 398200, 372500, 493300, 498400, 396200, 445300, 367700, 164300, 487500, 402400, 388300, 496400, 405900, 453400, 376000, 470600, 440900, 396300, 469500, 523200, 275700, 457800, 474700, 409900, 167700, 425800, 402200, 418300, 441599, 426700, 364200, 435800, 433000, 427500, 432600, 485600, 464000, 431000, 365300, 440200, 467200, 467200, 384000, 433200, 425500, 437500, 474500, 424600, 416500, 421100, 429000, 451200, 429099, 507200, 430000, 414000, 431599, 475600, 385700, 465100, 454900, 450700, 425800, 451900, 449099, 420500, 447200, 480400, 389200, 244500, 430400, 437900, 430000, 452800, 452800, 300300, 449000, 348100, 313200, 425100, 227200, 448900, 421700, 446400, 445000, 494000, 453100, 394799, 223600, 460500, 352500, 448200, 457800, 500200, 424099, 456300, 428300, 464500, 225400, 109600, 461700, 465200, 381200, 449300, 461200, 418900, 445500, 451599, 440600, 465800, 380400, 464400, 469200, 469600, 248600, 462700, 451700, 441800, 303800, 469300, 496800, 463900, 459000, 291500, 458100, 459300, 450100, 469799, 393900, 465000, 448300, 222700, 203400, 461300, 455000, 447700, 456599, 444700, 463100, 310000, 470800, 457000, 442600, 459600, 458900, 457900, 447000, 457200, 456100, 456000, 446400, 453700, 463100, 472700, 514300, 440400, 440700, 449900, 452800, 454799, 463100, 166300, 452000, 462400, 244600, 460400, 462100, 463200, 466700, 447900, 465700, 132900, 465300, 461400, 469799, 461700, 449000, 473500, 505700, 450300, 461100, 469099, 457100, 469000, 462200, 499099, 509000, 476800, 456000, 484099, 424200, 399900, 192900, 463600, 453700, 306300, 75800, 467700, 458000, 202200, 464300, 456900, 467500, 474099, 481300, 447400, 430600, 453200, 456200, 461300, 322500, 479300, 465400, 401599, 475900, 429200, 466500, 456900, 480000, 441900, 280300, 475200, 466500, 472400, 465100, 462600, 476100, 473200, 470100, 463700, 468800, 459700, 482500, 232300, 409799, 464200, 476900, 466200, 295700, 325500, 464099, 471500, 377900, 472700, 350600, 464500, 159700, 468300, 473500, 470500, 462400, 467299, 470900, 462700, 452200, 470100, 469700, 506800, 461200, 460900, 466000, 525900, 463500, 448500, 534900, 462800, 465400, 454300, 465300, 308000, 471800, 486300, 474400, 237100, 500300, 319100, 186400, 469099, 452900, 468800, 152200, 372500, 432600, 448400, 444200, 354300, 131400, 461799, 436300, 456800, 326800, 469400, 449000, 273800, 467200, 272300, 466300, 471300, 473600, 464099, 425100, 236000, 456900, 510700, 223500, 457500, 457100, 375300, 464500, 320700, 221200, 467100, 458200, 388900, 463500, 472600, 454600, 462200, 533800, 455700, 461500, 491400, 459799, 465200, 407400, 497700, 296800, 456300, 193500, 465800, 427299, 507400, 407000, 392299, 449900, 506900, 451800, 414299, 374799, 456800, 98600, 463500, 453300, 407700, 455600, 459099, 441400, 382100, 426900, 462400, 49000, 133200, 459799, 451800, 464600, 456400, 407400, 419700, 456300, 236500, 500900, 437800, 439500, 435900, 465500, 477700, 451599, 240400, 438900, 438500, 464600, 494700, 369600, 427800, 483600, 437400, 482400, 456800, 102700, 401700, 478500, 425900, 147600, 212500, 482800, 478700, 465900, 458800, 458900, 464400, 459900, 444700, 394000, 211700, 459099, 455200, 434000, 195500, 482600, 435700, 282400, 323900, 386599, 257900, 86800, 504000, 337000, 301300, 299500, 390400, 376300, 390200, 488000, 271100, 426000, 283800, 456700, 459500, 314100, 344000, 352400, 274700, 404700, 471200, 336200, 336300, 510000, 283600, 484500, 280700, 248900, 447800, 379200, 486200, 294000, 337200, 383800, 305400, 305900, 338200, 378200, 366900, 405700, 313600, 372600, 320300, 303900, 365200, 365400, 349700, 284000, 339600, 322700, 334000, 334799, 261800, 369900, 290300, 283400, 309200, 319600, 343800, 359500, 242600, 360300, 334400, 361700, 488500, 315600, 470800, 311100, 506800, 374400, 295800, 344300, 343800, 322400, 359500, 369300, 138600, 376500, 127700, 383100, 351300, 336599, 435700, 355200, 368800, 392100, 366800, 351200, 353100, 364600, 396400, 401400, 393200, 342600, 89900, 330200, 405400, 364600, 479600, 279400, 307100, 407900, 265200, 422100, 283500, 422400, 367200, 302700, 352800, 347100, 373600, 379400, 373400, 505500, 383600, 411800, 428000, 385600, 380800, 278900, 366700, 54500, 384700, 443500, 362200, 362200, 248000, 441800, 388300, 374000, 386700, 400000, 347800, 293000, 409300, 315100, 395800, 390600, 373100, 384000, 392700, 401500, 380800, 380700, 475500, 391900, 454099, 429099, 389099, 373300, 444200, 369200, 427299, 373500, 414600, 359400, 491200, 433700, 370200, 372700, 357200, 287600, 281900, 390900, 445700, 430500, 423300, 375800, 362000, 445000, 441100, 415900, 415600, 356200, 441200, 447600, 279400, 437800, 355700, 423500, 437800, 443000, 395700, 393900, 467500, 445100, 438300, 391300, 442100, 443200, 438800, 448500, 433800, 444300, 458400, 460100, 450500, 468000, 469400, 447800, 421000, 278700, 446599, 452000, 472000, 411900, 459000, 454700, 452600, 448500, 466200, 441400, 449200, 451400, 466700, 456599, 467100, 444099, 442700, 325700, 460400, 443900, 462700, 452100, 304500, 442299, 98600, 438800, 464000, 219899, 435300, 316200, 334600, 265200, 458700, 295400, 441400, 454600, 503600, 444600, 179800, 361500, 467100, 472500, 463400, 486599, 458200, 410100, 372900, 476700, 391599, 441800, 458500, 401800, 401700, 433700, 462299, 431900, 433100, 486100, 203800, 257800, 464099, 452299, 141800, 456800, 459099, 430800, 309900, 454300, 520600, 352700, 460900, 448100, 455400, 466300, 459400, 461500, 456100, 448100, 470600, 445200, 462400, 306100, 451200, 361000, 449700, 461500, 375500, 457299, 480099, 458200, 226800, 446500, 466500, 459900, 452000, 468400, 451300, 470700, 465800, 184800, 456100, 463000, 465300, 447200, 467700, 474000, 269800, 441200, 451500, 463900, 444200, 446000, 346500, 444000, 444799, 457700, 459799, 464300, 376300, 345000, 242200, 217100, 466400, 457100, 473400, 462900, 457500, 424400, 461100, 191500, 458000, 460500, 319000, 265700, 188500, 344900, 458400, 461700, 462200, 462100, 93699, 458400, 438100, 458500, 457000, 455300, 322900, 250100, 215900, 465200, 474900, 459099, 457000, 109100, 459600, 457100, 479900, 459500, 442800, 459900, 468400, 458500, 457200, 162700, 462800, 460300, 457600, 462400, 461400, 472400, 447400, 466700, 452299, 328700, 266600, 476700, 456599, 443900, 480800, 471700, 452900, 429900, 334600, 461700, 463400, 469600, 376100, 457800, 464099, 429099, 466300, 457200, 459200, 463000, 68100, 465800, 460500, 455400, 241600, 466100, 462100, 467100, 469600, 452700, 461800, 459400, 460800, 465100, 461000, 506900, 470400, 465700, 465700, 457000, 467000, 316400, 464700, 462000, 465200, 470500, 472299, 471700, 459799, 462700, 466500, 465900, 466700, 468300, 469700, 463500, 463700, 462500, 465200, 462800, 414000, 473000, 280800, 461800, 465200, 462500, 470000, 468000, 459300, 460900, 464400, 456200, 457100, 463700, 449600, 463700, 466100, 460700, 465500, 466700, 457500, 465900, 453000, 467200, 462800, 466100, 467100, 456500, 463000, 478300, 463200, 462400, 465200, 293600, 460500, 463100, 465000, 361500, 464700, 464900, 465700, 469300, 173400, 454700, 454700, 406300, 482500, 417200, 509400, 461100, 459799, 410300, 452200, 471300, 455200, 429000, 444500, 495100, 473400, 445800, 470400, 534200, 466300, 449300, 454099, 385700, 468500, 451100, 453700, 470700, 476599, 472400, 467000, 370700, 474000, 451800, 458700, 352800, 460500, 475000, 466800, 262000, 465700, 202200, 466100, 463200, 473500, 163700, 275600, 462000, 471000, 323000, 471400, 461500, 321700, 462400, 359500, 473200, 358400, 463100, 464900, 467800, 458500, 453400, 463800, 464300, 451900, 467500, 472900, 117600, 456900, 465800, 205600, 460600, 474500, 471200, 473300, 270800, 309600, 467700, 473900, 196100, 469700, 469099, 453900, 468600, 464500, 467500, 472800, 471500, 464099, 470700, 459000, 464200, 478300, 461300, 466599, 456000, 454600, 470500, 465600, 441200, 477900, 263100, 464099, 469799, 464799, 434300, 340900, 413100, 395300, 475200, 138900, 468300, 490700, 460700, 349600, 303000, 465300, 294700, 451900, 470600, 464700, 234500, 460100, 349600, 468500, 431000, 470800, 312100, 454900, 363600, 465800, 468800, 449099, 143500, 281200, 322100, 318600, 460600, 461700, 468900, 475400, 283100, 458400, 466400, 466400, 335100, 461900, 353600, 459400, 476300, 455000, 461200, 455900, 461200, 465500, 291600, 416300, 461599, 358300, 415700, 295100, 465000, 395100, 427400, 461000, 542900, 343400, 463400, 311200, 264500, 305500, 480500, 444900, 480300, 456200, 493000, 446200, 429700, 494700, 450600, 441100, 452299, 133300, 251600, 462299, 461100, 474200, 444400, 181900, 460200, 478100, 471700, 459400, 238700, 351400, 461200, 239100, 437100, 475500, 507500, 463400, 462299, 462900, 437500, 458400, 452900, 457000, 458900, 466800, 388800, 473700, 459300, 459200, 453000, 469099, 471000, 458600, 275500, 336200, 293500, 381100, 380000, 401700, 479000, 417600, 463600, 327800, 380400, 474300, 461400, 399500, 328500, 127000, 467600, 468600, 457600, 475100, 357800, 420900, 453900, 348300, 413700, 466800, 422500, 400400, 293700, 287800, 455400, 406100, 418200, 473900, 462800, 441200, 475000, 426400, 468000, 460300, 459500, 267400, 457299, 452800, 466800, 181400, 459000, 454200, 456000, 479200, 466100, 454400, 464700, 339300, 458400, 461900, 426100, 388300, 485000, 457000, 462400, 354500, 288400, 316400, 460600, 462200, 305900, 455000, 382000, 446800, 375600, 464200, 455900, 465200, 467800, 444700, 460500, 200200, 425200, 126400, 453500, 76800, 151600, 514300, 464400, 460300, 433000, 220300, 453600, 437100, 442600, 468300, 395300, 212600, 278700, 448400, 404500, 241900, 435599, 441200, 418600, 383800, 451700, 526300, 459600, 465700, 319200, 382500, 451300, 364000, 397200, 470400, 485500, 461100, 474900, 461100, 468100, 467600, 407600, 434099, 441700, 432100, 401200, 455600, 456100, 450200, 444700, 457500, 470400, 462500, 358700, 459700, 454200, 452200, 454600, 261100, 442400, 392299, 375600, 456000, 449300, 449500, 421100, 463700, 473500, 454400, 457100, 447200, 278600, 342700, 445100, 387800, 457800, 141700, 451900, 263500, 298400, 448000, 268200, 461000, 405500, 393500, 461000, 453200, 332000, 175430, 431300, 192500, 389799, 465100, 386599, 443900, 429300, 223500, 380000, 389099, 446000, 425100, 409900, 432400, 429500, 453600, 231100, 465500, 443000, 453700, 471900, 441599, 445400, 447900, 164300, 413300, 400200, 278600, 453600, 448500, 443700, 434400, 465600, 92899, 450700, 469200, 466000, 132700, 427800, 308300, 490400, 331700, 463900, 446400, 454200, 352900, 450500, 405000, 444200, 432299, 391900, 343400, 427400, 441300, 441300, 459300, 447700, 401300, 421599, 439300, 441900, 391000, 434700, 467700, 107400, 439600, 458300, 449500, 432800, 446500, 324400, 446400, 440200, 330100, 452600, 435500, 434700, 442700, 443800, 363800, 332700, 450700, 400800, 333800, 448300, 332299, 441300, 445900, 437400, 456200, 451700, 463200, 336800, 434300, 409700, 440600, 464400, 157100, 407800, 343300, 431200, 240400, 343000, 447500, 467700, 458500, 297800, 432900, 510700, 363300, 457400, 360400, 437000, 460300, 474300, 442200, 451000, 464799, 466599, 447000, 461000, 450700, 461200, 442800, 441000, 469600, 448600, 335500, 443300, 87300, 450200, 427400, 463300, 447299, 313700, 441700, 458000, 469300, 466300, 250500, 164200, 379799, 379400, 414900, 459799, 436000, 444400, 446100, 395500, 429600, 467800, 443600, 456500, 167900, 424000, 465600, 452100, 459300, 459799, 426700, 247000, 459600, 355000, 467400, 452800, 435100, 458200, 514799, 435800, 455100, 463300, 458900, 278900, 462600, 454400, 473600, 446200, 460800, 445300, 466500, 472200, 463200, 477100, 286800, 438400, 457600, 452800, 464900, 455000, 459300, 449400, 484700, 477200, 320300, 453200, 352100, 460100, 450100, 457900, 365900, 466000, 445700, 453600, 470000, 485600, 185200, 276300, 457600, 469000, 459000, 458700, 358200, 446000, 284600, 455100, 150600, 463100, 468100, 302300, 462600, 477299, 356100, 361900, 422600, 445400, 459900, 474600, 406500, 456300, 465300, 454000, 448000, 467500, 465700, 274100, 229300, 440200, 467400, 443600, 338300, 279000, 465500, 465600, 461800, 409099, 466300, 463500, 208200, 509799, 489700, 452600, 457299, 385900, 456200, 455700, 474300, 461700, 466800, 470600, 449000, 462700, 352600, 343200, 384799, 473300, 466400, 400500, 162700, 333500, 491300, 476900, 456500, 453700, 419799, 410400, 413500, 211200, 260200, 258600, 460700, 389300, 520200, 440300, 195500, 448900, 475300, 453200, 455900, 466300, 456200, 453000, 461100, 296400, 527300, 458700, 212900, 457100, 380800, 492000, 449300, 319000, 345500, 181500, 316700, 466800, 281000, 365100, 408400, 413600, 457000, 454900, 463100, 263800, 353500, 496500, 354500, 318800, 455400, 454799, 468800, 318300, 174300, 505700, 460100, 352700, 261500, 200900, 504799, 539700, 391599, 390900, 471800, 404799, 464000, 468100, 343600, 204400, 501000, 479200, 497800, 481000, 346800, 395000, 415000, 429000, 488600, 491000, 341100, 465000, 345900, 447200, 481500, 516200, 455200, 498300, 392100, 444900, 238000, 452700, 477299, 449000, 478100, 479300, 458100, 476900, 462500, 483700, 498700, 460500, 448200, 213900, 454799, 392700, 453000, 443500, 383100, 461099, 456200, 450500, 472400, 50800, 460600, 468200, 323300, 471100, 462000, 332500, 462200, 458800, 383400, 468200, 454000, 274600, 450500, 461300, 411700, 139500, 464799, 457500, 462200, 345200, 378000, 418900, 466900, 448000, 336200, 333500, 343100, 351800, 394799, 349700, 447900, 493200, 463600, 102500, 459799, 469799, 388600, 449799, 349200, 446200, 459700, 247100, 471500, 464700, 435300, 464400, 449799, 518000, 455100, 476300, 450200, 437100, 476400, 332900, 133100, 463700, 505100, 466900, 325300, 470500, 264700, 456000, 474300, 444400, 125900, 445800, 457800, 398000, 434900, 362900, 457700, 457000, 447100, 251400, 246200, 459900, 466500, 416800, 385200, 440300, 418700, 456000, 450000, 394900, 453500, 443300, 467600, 436100, 462100, 282700, 441300, 341700, 426800, 464300, 437200, 467100, 304500, 448100, 455500, 499799, 462299, 467299, 263300, 268000, 448200, 343200, 451599, 448300, 483599, 445000, 416000, 459400, 267800, 428600, 460800, 79600, 390100, 449799, 400100, 450300, 467900, 199000, 327900, 467600, 452700, 454700, 398200, 444099, 448300, 210400, 455400, 500600, 244100, 449799, 420400, 350300, 451400, 455000, 452600, 455700, 412800, 427500, 451100, 397500, 415600, 481400, 349699, 443500, 427800, 399700, 408300, 455500, 437500, 444700, 432400, 462100, 441800, 463900, 185799, 458200, 437500, 392200, 411000, 434099, 289700, 409400, 459099, 449799, 422500, 445400, 424799, 458200, 420600, 412500, 412500, 470500, 458400, 456000, 455400, 393500, 449000, 433500, 366700, 458200, 434300, 474400, 447200, 439600, 441700, 443700, 196500, 336800, 434200, 492100, 166000, 468000, 453200, 442500, 285900, 442900, 442600, 435600, 317000, 465200, 440100, 446100, 452700, 435500, 453500, 424799, 470400, 236100, 479600, 442000, 448200, 348100, 444600, 444900, 416599, 379700, 443000, 243800, 302000, 447200, 422000, 454799, 166700, 230799, 335000, 445600, 362900, 336599, 441599, 167700, 450100, 448500, 185000, 316300, 453700, 315300, 428000, 332900, 344600, 435500, 467600, 464900, 374700, 194500, 442900, 438800, 374000, 452100, 446200, 390800, 304700, 384200, 362400, 436200, 419600, 438400, 437700, 460500, 437900, 440700, 445400, 349400, 459400, 455100, 445600, 463900, 451200, 475300, 456200, 462000, 484900, 358500, 459000, 517100, 438800, 400500, 450700, 460400, 444600, 465600, 447299, 446000, 254200, 447400, 528300, 468000, 444000, 295800, 453100, 325400, 449500, 434099, 438100, 446700, 445300, 442200, 480400, 437500, 445300, 438300, 370800, 453300, 441800, 309600, 381200, 456200, 367600, 448800, 443700, 526200, 468400, 453300, 456400, 524400, 461500, 380300, 456599, 458300, 455600, 461000, 87200, 343800, 435700, 416599, 399400, 273700, 456500, 464500, 466100, 476000, 402000, 462600, 480600, 429500, 450100, 428200, 458200, 458300, 188200, 470700, 456400, 459400, 175500, 460500, 457200, 341000, 350400, 453400, 194830, 106000, 460200, 458600, 443700, 459400, 458500, 313900, 447900, 459200, 133900, 434799, 431599, 161000, 455200, 326200, 214100, 360800, 456599, 469600, 466000, 142100, 458000, 457400, 462299, 343900, 386700, 342800, 293100, 461000, 156300, 222700, 346900, 418900, 288500, 201700, 454099, 223299, 399799, 452299, 459200, 467100, 504200, 408100, 149400, 466300, 469600, 451800, 462500, 340500, 472800, 455200, 244800, 462200, 140900, 453600, 474700, 427100, 465700, 389799, 334000, 360600, 470300, 254000, 464600, 469400, 461100, 470600, 350800, 471599, 188700, 386200, 401900, 288700, 461500, 460600, 500100, 468900, 456500, 380900, 143000, 296400, 341400, 458000, 300100, 467500, 367800, 450700, 476200, 410700, 62000, 464799, 465200, 468000, 474400, 465100, 461599, 423200, 469400, 467100, 481700, 477800, 349500, 463800, 485700, 381800, 474500, 464300, 466599, 471599, 477200, 113300, 493400, 311900, 274700, 478300, 420600, 165100, 302200, 471200, 475600, 433400, 262600, 480100, 398300, 482000, 454500, 264100, 302400, 513500, 365400, 454600, 333500, 333800, 400000, 423900, 108400, 399000, 447100, 469200, 433400, 457400, 460300, 476599, 516800, 476100, 457400, 450200, 467000, 451200, 454200, 450900, 449700, 463300, 465400, 200400, 462200, 230600, 470800, 470600, 486800, 463300, 120200, 473000, 469799, 436900, 370300, 445600, 340400, 446900, 407100, 448000, 458200, 448300, 453000, 463500, 464900, 456800, 469000, 455500, 352299, 486700, 452600, 475800, 212200, 89100, 476500, 471200, 430500, 470400, 204800, 456300, 335800, 364600, 440400, 389500, 380500, 506700, 354900, 464700, 278100, 461100, 303600, 219100, 397500, 359900, 449500, 445800, 468300, 451200, 459700, 316799, 212399, 425900, 452400, 441400, 461800, 198800, 458900, 351200, 469500, 437400, 476400, 427200, 419000, 448800, 345100, 297400, 479400, 188700, 447900, 459099, 461900, 451300, 465200, 428500, 350600, 452800, 181000, 456500, 119400, 452700, 444099, 462100, 439099, 467200, 458000, 290200, 505300, 455500, 387100, 464200, 458200, 248299, 451100, 463800, 140500, 110900, 157000, 434900, 391700, 204100, 343500, 263900, 458100, 456100, 509300, 200030, 462900, 390900, 451800, 251300, 461400, 348600, 449700, 430900, 442299, 434600, 452200, 375500, 273700, 487900, 460800, 471100, 472700, 319500, 244300, 349700, 461000, 342000, 480900, 478600, 450600, 424900, 410900, 565100, 387800, 382100, 428000, 456300, 424799, 471000, 451200, 474700, 432500, 407000, 451599, 462400, 470200, 476000, 452500, 466200, 442900, 495500, 442500, 124800, 352400, 462600, 444799, 457500, 463100, 404900, 523500, 397700, 232700, 397299, 481900, 457000, 474200, 403300, 482800, 375700, 450300, 262200, 314400, 417200, 450500, 156700, 465600, 466500, 326200, 441700, 462200, 502800, 433700, 92300, 243100, 275000, 372100, 533400, 460300, 454000, 364500, 249700, 456200, 435600, 470700, 190600, 358500, 434300, 456900, 138500, 401400, 368700, 465200, 399900, 439799, 446599, 454000, 426900, 470800, 364900, 459400, 441500, 471500, 483200, 490300, 452600, 462900, 461800, 442800, 464600, 450500, 418100, 456000, 440300, 445900, 427100, 240000, 191600, 452000, 344300, 458900, 457900, 289300, 513200, 204800, 446900, 449799, 440500, 183600, 461000, 475000, 445400, 503799, 438400, 444500, 447299, 488200, 388800, 442900, 439700, 473300, 394600, 460800, 452299, 438700, 465500, 470800, 354400, 116900, 377600, 195300, 341300, 515100, 245600, 415600, 528700, 188700, 163700] + }, + { + "label": "Min height width", + "values": [5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, 42910, 126039, 135736, 46100, 54920, 113880, 100220, 91860, 52140, 104500, 110480, 82230, 69120, 136490, 97950, 79780, 44390, 23330, 86870, 1469, 130450, 114629, 184720, 32180, 56400, 131980, 58430, 63240, 59330, 58640, 29810, 11790, 25690, 13330, 39900, 70460, 160410, 55770, 25179, 18490, 27650, 79830, 40630, 16900, 41369, 118770, -2760, 190000, 119920, 85020, 73980, 49120, 51200, 41940, 71030, 51970, 75200, 80390, 70520, 69910, 119636, 40720, -16800, 48360, 70910, 66170, 54730, 66650, 70930, 41940, 8919, -8201, 48240, 50080, 44120, 70290, 74640, 94410, 30920, 56720, 187800, 170140, 45710, 124420, 59660, 90450, 24040, 129420, 173100, 45500, 37120, 34300, 52610, 59770, 89350, 59000, 32820, 23020, 26780, 19180, 19350, 22770, 37900, 56130, 21080, 41360, 49010, 16290, 14480, 23140, 90940, 39390, 43869, 138650, -19100, 34470, 34630, 12036, 102620, 24060, 14260, 9980, 71280, 5559, 19670, 141580, 37160, 9199, 23650, 17750, 22180, 99940, 7589, 17540, 16790, 5080, 34200, 7580, 25040, 7300, 13060, 17520, 6419, -1381, 41910, 10830, 4100, 20210, 188340, 5209, 12970, 14960, 15149, 11780, 105870, 10600, 16640, 9179, 9750, 7869, 9400, 9640, 34300, 10610, 7640, 12680, 21000, 76650, 12170, 13130, 6909, 19100, 16490, 13150, 12810, 7980, 97129, -2571, 12800, 13140, 14170, 59090, 4630, 5150, 6889, 6050, 13490, 3860, 10260, 13930, 3160, -1600, 40730, 88140, 11680, 11560, 10280, 5390, 9440, 131340, 7570, 144740, 60570, 12210, 142160, 8029, 70330, 6570, 8240, -1070, 5180, 75360, 64130, 4979, 73200, 7920, 2460, 3080, 60010, 7470, 10450, 2600, 99590, 134120, 5400, 1179, 76180, 4209, 3650, 38840, 8910, 4250, 14170, 3999, 76350, 4860, -15060, -341, 128230, 2330, 5859, 22060, 44500, 770, 4769, 1039, 539, 53740, 5130, 5729, 13939, 5580, 48450, 1110, 6199, 164570, 179370, 4720, 6339, 12740, 3569, 6740, 4089, 13730, -641, 2360, 8390, 12540, 5500, 4519, 5790, 8100, 4159, 6329, 7200, 2510, 2199, 9430, 1130, 7710, 11010, 11439, 9619, 8699, 5529, 99290, 6729, 7670, 60320, 8769, 3379, 4350, 2020, 10470, 2929, 187500, 5399, 839, 2790, 2430, 9999, 1970, 2979, 8070, 2849, 5110, 5679, 979, 4449, 2559, -410, 829, 3989, 279, 11130, 130020, 63780, 48590, 15020, 59370, 174670, 44850, 4510, 57900, 3340, 5340, 6710, -1150, -4031, 4400, 1400, 13450, 5500, 3909, 133800, 1570, 2959, 38050, 6499, 37810, 599, 1560, 1949, 38340, 66110, 13230, -1020, 9730, 3350, 2790, 8729, 109, 1679, 1690, 2440, 1910, 5659, 43820, 80340, 739, 47080, 1709, 164110, 58980, 5069, 1810, 16480, -1550, 81400, 3139, 133160, 2669, -821, 3349, 2360, 4120, 1960, 4129, 25520, 3660, 2260, 2959, 6350, 6830, 559, -3540, 5040, 62340, -8401, 4570, 6469, 14420, 3509, 172060, 4749, 38850, 3860, 167900, 1540, 59530, 176210, 2949, 13930, 819, 132560, 74890, 34410, 5559, 41260, 102000, 174330, -17380, 10730, 8950, 144260, 2560, 24580, 6370, 80, 22540, 2060, 1019, 160, 3180, 11580, 88900, 10470, 6260, 73860, 3119, 2980, 158220, 4309, 30660, 68780, 5040, 3770, 99260, 1980, 1970, 6829, 2289, -20080, 2310, 9650, -2251, 2529, 2530, 14700, 3959, 166700, 3599, 150930, 3459, 20810, 6590, 55690, 22690, 5139, 69, 6480, -12630, 37400, 9400, 186250, 9540, 10830, 14040, 9070, 4760, 7700, 56650, 11310, 4790, 194180, 128610, 6400, 7109, 2769, 9170, 14430, 104370, 9179, 178490, 1839, 3649, 9690, 20490, 339, 3980, 9289, 97370, 16590, 13480, 3039, 9209, 108480, 29490, 14640, 22230, 2340, 15880, 155060, 121920, 2909, 27250, 163260, 172970, 2660, 18100, 5159, 5870, 3790, 2880, 4320, 12500, 56360, 125710, 17810, 19190, 106000, 83140, 42550, 104300, 56000, 102609, 49720, 119469, 171680, 32940, 81140, 57710, 46010, 47900, 12410, 51430, 52000, 71890, 38220, 59550, 30110, 25690, 60750, 41920, 42970, 122470, 41700, 24520, 36670, 43590, 28380, 65420, 20490, 46900, 74830, 23260, 30570, 53800, 48360, 44400, 28940, 38850, 55090, 44390, 117250, 26040, 38180, 40279, 21509, 40690, 43770, 23870, 34920, 35680, 47920, 34530, 10209, 38060, 36900, 172090, 22500, 41440, 48970, 51970, 40759, 32670, 29570, 8320, 32190, 36220, 26469, 7490, 50070, 16550, 52680, -14320, 18900, 55380, 31810, 30419, 92140, 31910, 29040, 139770, 30299, 117280, 30630, 29670, 36720, -13690, 31170, 24230, -7440, 28120, 27790, 26429, 26000, 27230, 25920, 76240, 30360, 186670, 44830, 116240, 24560, 29890, 95180, 82150, 26890, 70680, 23220, 173160, 18330, 29520, 47580, 40140, 29100, 28250, 26230, 27280, 29190, 15910, 28300, 15970, 18410, 23929, 86500, 26960, 195790, 23360, 15049, 27500, 25880, 29740, 14950, 18950, 98230, 19830, 21830, 33440, 109480, 16040, 61550, 23600, 20700, 24970, 25500, 19860, 15920, 25010, 26910, 14280, 18950, 15430, 12709, 22380, 78950, 4990, 32920, 110000, 23040, 16230, 26429, 10009, 14770, 27599, 21410, 19900, 149800, 159730, 25800, 9250, 16530, 14280, 99670, 28780, 7340, 11060, 14120, 7850, 123859, 27430, 9960, 32360, 11210, 104469, 14710, 11570, 14290, 95429, 18660, 4369, 9129, 9270, 17570, 8890, 6709, 9220, 7710, 11250, 6599, 5370, 3400, 4270, 179, 2290, 4540, 13700, 93360, 59470, 8529, -851, 19020, 4139, 5289, 2350, 6269, 990, 8240, 7010, 8050, 1210, 4560, 1259, 9949, 8110, 64180, 3909, 6729, 2690, 5280, 150810, 6709, 148720, 32080, 2289, 171240, 6690, 79710, 122870, 39720, 3809, 122739, 30200, 5390, 5709, 8730, 118730, 74280, 13320, 5130, 4419, 3000, 3679, 9389, 63420, 6690, 95570, 20350, 5090, 44240, 120660, 29440, 2999, 35740, 63700, -1540, 155930, 145400, 5790, 939, 175990, 3370, 5030, 8129, 69630, 3980, 19400, 27460, 10430, 25930, 6300, 3050, 5360, 4789, 5870, 16930, 1360, 3990, 3170, 79640, 12030, 125269, 7050, 3980, 42910, 9890, -19210, 25280, 170010, 10610, 3749, 3420, 10510, 2749, 7790, 1890, 27759, 140190, 5329, 3289, 6660, 82810, 7319, 1650, 37550, 8889, 7769, 499, 9579, 6610, 35280, 11940, 7629, 2200, 1180, 7390, 159380, 29129, 172160, 108520, 1330, 5769, 1170, 2310, 4110, 54490, 2309, 90020, 1360, 3090, 147650, 79810, 53960, 148120, 5100, 1890, 669, 4730, 190970, -570, 14780, 2929, 3439, 8649, 133040, 96310, 110079, 9729, -151, 4940, 2090, 151720, 6060, 2439, -1190, 2919, 34290, 5939, 2029, 12110, 15930, 175700, 5290, 589, 4910, -1241, 14340, -2690, 1250, 10480, 10930, 116080, 17710, -1590, 6629, 25540, -11360, 2330, 11860, 27210, 153740, 5040, 5950, 1549, 37630, 4259, 2010, 34760, 2959, 4410, 6640, 6889, 179130, 2920, -60, 9899, 144140, 2350, 5719, 3420, 4159, 3330, 799, 2390, 5310, 3079, 4840, 18340, 3719, 6260, 5810, 7309, 3969, 132430, 7079, 5280, 549, 2090, 22160, 1699, 5679, 2509, 2129, 2999, 2469, 4830, 4780, 3960, 3040, 2710, 2440, 2859, 32670, 1659, 9360, 4670, 2080, 4059, 1059, 2789, 5639, 3589, 1709, 5050, 6039, 3850, 13180, 2140, 2079, 6579, -1821, 1389, 7799, 1739, 5910, 1610, 5020, 1809, -721, 4659, 2929, -4720, 1829, 5420, 2709, 50380, 6510, 4900, 1380, 78330, 6539, 5170, 4370, 409, 92280, 5740, -5240, 67910, 33020, 13450, 3690, 6899, 5139, 67240, 6620, 2099, 5599, 13440, 32679, 28520, -180, 30930, -421, 4630, -641, 8349, 5080, 129, 1480, 5289, 11870, 4140, 4360, 1450, 1629, 67510, -421, 21240, 4620, 106560, 2909, 1640, 1290, 35360, 3020, 158790, 2440, 1200, -911, 186220, 88630, 11220, 2760, 109090, 1729, 2269, 30290, 3889, 28940, 1820, 28870, 2559, 1930, 3350, 2659, 9469, 690, 1270, 5479, 1309, 1579, 149430, 6060, 2289, 55039, 1910, 699, -770, 1540, 6850, 64080, 2819, 850, 166420, -441, 1869, 13020, 480, 5479, 25160, -31, -981, 2100, 1620, 7470, 2270, 2390, 5259, 10760, 5520, 13850, 1910, 4650, 26980, 5580, 13470, 1379, 4770, -2110, 67810, 128539, 59940, 48220, 5219, 184470, 1770, 699, 2079, 11750, 124680, 6210, 59900, 14120, 2260, 1140, 110020, 1779, 23809, -1401, 34390, 1970, 67430, 8870, 44820, 4270, 3970, 20880, 123800, 80690, 74260, 98010, 5329, 1080, 1170, -1370, 60700, 3479, 1419, 2499, 57480, 2859, 87760, 3290, -2181, 4539, 859, 3010, 5810, -4340, 158760, 53230, 3790, -6940, 115210, -171, 389, 54720, 81370, 9070, -12800, 102100, 3790, 140870, 125290, 66200, 5500, 7980, 26760, 13240, 4789, 14150, 23180, 8039, 8580, 8720, 6790, 144350, 118030, 4259, 9330, 4600, 7759, 166130, 1229, 6909, -1090, 5270, 118510, 139370, 4460, 115410, 8939, 1140, -9890, 1809, 5070, 6720, 8089, 3749, 72070, 8120, 5770, 6959, 106649, -31, 6090, 5920, 6360, 3400, 2849, 7780, 97370, 157360, 62720, 21920, -2180, 75390, 69, 26280, 6740, 7990, 20550, 2700, 7050, 104860, 67500, 140930, 4179, 4890, 9140, 459, 2829, 31800, 3839, 142650, 86160, 1739, 22910, 25480, 175740, 136730, 2790, 68020, 41520, -771, 2410, 7269, 61130, 47270, 539, 12740, 7960, 74870, 5390, 2690, 4800, 107590, 11250, 13799, 12540, -2471, 3520, 4869, 3750, 7290, 11580, 4570, 93740, 141260, -2510, 4790, 3800, 22599, 144230, 36850, 3710, 3459, 12609, 13720, 21469, 13280, 76830, 2449, 5709, 3969, 19, 37430, 569, 166100, 40190, 163939, 13330, 190770, 178250, 25700, -721, 4369, 8630, 147620, 19530, 16770, 16040, 869, 37960, 111130, 55470, 12310, 49370, 164270, -14760, 15730, 60470, 39740, 13420, 4970, 10200, 7700, 98310, 27540, 15350, 1490, 30840, 5699, 7070, 15000, 3360, 4649, 6919, 6340, 5950, 10680, 8300, 6199, 20900, 4570, 4429, 7540, 9350, 10410, -871, 7570, 1659, 289, 8310, 10310, 5390, 106550, 6610, 49240, 127590, 6780, 5649, 6169, 32320, 1240, -1721, 4690, 2439, 7929, 77530, 128090, 10840, 100630, 3630, 188329, 8720, 84620, 59530, 11900, 95580, 5470, 43960, 74950, -381, 47110, 86950, 66336, 92680, 82720, 60920, 1459, 38380, 17530, 5669, 141360, 135700, 29940, 18850, 3299, 14900, 59000, 17080, -541, 141500, -381, 19600, 15020, -571, 11010, 17110, 15960, 122080, 47050, 22710, 63130, 10169, 5280, 12150, 11550, 5280, 174490, 6590, 3839, 4519, 156290, 28769, 73210, -7371, 22900, 10490, 9810, 9660, 50119, 8410, 36810, 13000, 11760, 78980, 43510, 10720, 28590, 13560, 6270, 8420, 2440, 18500, 7820, 11970, 46580, 15570, 5070, 143250, 12110, 2859, 9860, 44200, 13850, 8780, 10440, 13850, 5960, -15830, 12340, 19080, 8290, 11060, 164950, 3810, 9650, 42270, 170740, 7550, 47050, 14190, 12290, 20970, 1540, 8470, 479, 2050, 15610, 93040, 9579, -1440, 107410, 15830, 23360, 9890, 97820, 22490, 7990, 1110, 4190, 76240, 22679, 12740, 28560, 3850, 29120, 16780, 2210, 2070, 13200, 5299, 1759, 1940, 17310, -20, 6679, 4910, 4949, 6390, 1370, 7520, 88400, 7240, 155250, 7090, 33940, 62660, 8009, 68800, 10009, 3970, 4819, 59930, 174750, 94460, 136080, 80230, 28080, 6040, 19670, 8119, 12180, 67460, 28320, 739, 22780, 7090, 138100, 35450, 3299, 13560, 5820, 8109, 2330, 74480, 3000, 9140, -31, 10610, 15980, 10880, -11070, 16900, 7950, 2989, 4690, 133840, 4680, 12070, 3850, 4790, 7740, 8119, 2940, 2280, 4170, 3679, 103080, 31040, 3290, 6560, 1750, 5440, 5550, 5639, 50710, -1191, 46540, 6160, 31120, 5290, 7730, 7040, 123430, 2360, 9969, 6840, 699, 13000, 113960, 65610, 2749, 3590, 3329, 6059, 104040, 7060, 174760, 4980, 166740, 579, 3500, 41860, 7109, 5370, 44670, 22580, 35230, 26020, 7019, 9689, 16860, 3870, 3509, 12830, 16580, 1130, 8240, 56830, 96679, 16279, 8519, 13779, 4509, 56250, 2770, 3750, 4310, 8500, 7010, 6570, 102840, 27770, 4400, 3700, 619, 126290, 5859, 4740, 11070, 6030, -1230, -3230, 7840, 8179, 91370, 75930, 134770, 11439, 63700, 13590, 130160, 62680, 6040, 6850, 6279, 21589, 7609, 3599, 3469, 150150, 46160, 47580, 6130, 76360, -15750, 14380, 53620, 10820, 2150, 8590, 7600, 4670, 4599, 6539, 4560, 32280, 9640, 7049, 109840, 7030, 110150, 5699, 5200, 119300, 90730, 132780, 123130, 12360, 111580, 5070, 34940, 16240, 2900, 949, 2470, 59120, 7129, 3359, 90910, 16180, 1620, 5370, -530, 169590, 146010, 8650, 37420, 68050, 126130, 104560, 2890, 300, 39230, 18150, 27519, 7760, 3370, 1429, 92090, 119149, 9929, 2479, 2150, 6709, 121649, 36730, 35990, 51330, 10270, 6070, 629, 5249, 18510, 10270, 3240, -320, 24230, 3089, 117210, 21750, 40279, 17190, 7349, 9460, 1779, 6609, 2610, 4960, 5409, 4910, 2419, 10290, 7109, 130530, 19860, 13650, 13560, -12130, 98940, -17310, 8470, 9220, 4239, 196430, 4250, 1960, 100150, 3020, 5370, 28670, 4899, 8210, 14040, 5920, 5090, 39860, 3999, 17410, 3290, 105480, 4550, 5820, 5080, 136300, 3870, 35600, 6140, 11450, 1390, 33250, 24640, 30700, 130530, 28929, 9389, 24210, -1271, 189460, 1270, 809, 108290, 9919, 27180, 1999, 109, 153130, 3790, 8969, 18390, 4769, 8749, -8780, 3630, 1690, 10960, 18660, -570, -890, 178930, 4570, 34270, 560, 2660, -2411, 136430, 12180, 4140, 9649, 140230, 4380, 4079, 16540, 57939, 70360, 6430, 9289, 2630, 52080, 51340, 5849, 6270, 14300, 29160, 42280, 4750, 8489, 5850, 39080, 3519, 6339, -410, 17860, 4819, 15920, 6989, 80760, 10780, 2259, 16490, -900, 54960, 11800, 5480, 14190, 3900, 5109, 139540, 63650, 11880, 779, 17300, 13759, -19560, 17870, 60550, 8060, 45310, 35980, 9810, 186439, 28220, 12890, 18940, 10500, 1900, 101870, 33000, 2829, 10080, 7810, 14990, 12830, 11150, 74180, 11610, -5510, 168730, 12080, 11870, 51010, 10660, 12100, 7029, 11399, -9330, 10080, 11860, 29, 8480, 2259, -6170, 9830, 8520, 37520, 26400, -911, 9440, 7189, 15620, 4100, 10450, 1490, 140990, 2060, 3139, 44210, 25770, 23100, 87670, 17110, 1519, 5420, 12470, 7930, 26280, 5479, 16890, 118140, 18870, -2140, 7170, 5970, 14490, 13030, 10540, 12540, 24710, 3859, 14440, 709, 9459, 10670, -1331, 6929, 65310, 52000, 10220, 5870, 128660, -181, 5890, 8850, 120360, 18260, 11359, 12780, 152980, 819, 8909, 10380, 4769, 9190, 3159, 11880, 1019, 80250, -2871, 8630, 5849, -701, 11160, 12569, 25930, 9190, 9520, 77590, 159430, 5500, 82810, 8159, 150100, 69350, 4390, 4850, 42190, 3150, 8220, 105090, 1519, 11399, 135670, 66470, 8450, 60900, 13540, 36730, 144100, 11530, 12100, 3100, 100860, 129860, 11510, 8860, 26500, 5639, 12170, -2270, 44410, 16120, 30179, 10200, 21850, 8809, 11399, 4620, 5800, 8129, 7480, -741, 2209, 10109, 3860, 3560, 3750, 2869, 3609, 3930, 15860, 125970, 2250, 5980, 8679, 17280, 4880, 3100, 10260, 11310, 8189, 6340, 142520, 7639, 2520, -15210, 9689, 161580, 7429, 122080, 7520, 43620, 7400, 15089, 9739, 8429, 16130, 14840, 6140, 9810, 139320, 6690, 9819, 7380, 125320, 5950, 139190, 3900, 5490, 2730, -6791, 4170, 5029, 7589, 1279, 91120, 3300, 6729, 5110, 1869, 163990, -181, 24830, 58240, 139070, 117440, 3400, 3409, 3880, 1900, 33150, 5130, 59400, 23830, 5120, 20360, 6019, 6909, 102410, 629, 3950, 8239, 184140, 6149, 10530, 16750, 85740, 8930, 46936, 177860, 5280, 4449, 11610, 4369, 5900, 111890, 10290, 3850, 137810, 6650, 6610, 181180, 23420, 83300, 168490, 42670, 7079, 4789, 4069, 168130, 4780, 9250, 4890, 104120, 40890, 53380, 120630, 3310, 182369, 51350, 54050, 18320, 49000, 116900, 7780, 55430, 25810, 4270, 5470, 2610, 8530, 83570, 144990, -191, 50870, 15120, 9100, 6899, 5369, 4339, 95940, 7060, 177700, 14580, 62420, 44680, 36320, 82790, 11240, 29640, 5350, 21309, 8799, 7690, 6179, 909, 138260, 3059, 90480, 87110, -4101, 75260, 2719, 4339, 2549, 2070, 6279, 50830, 179020, 115620, 1230, 5409, 7520, 4549, -1141, 13970, 3320, 18240, 190990, 3740, 2349, 3870, -101, 8480, 8560, 16630, 1389, 4679, 1150, -531, 6899, -571, 1109, 3489, 3940, 4239, 6350, 989, 6099, 184330, 4029, 136120, 11500, 5270, 4470, 103190, 37550, 5079, 4369, 44680, 79400, 3469, 127120, 219, 5580, 77630, 122940, 7959, 34560, 4220, 56650, 53650, 71330, 26640, 141620, 83130, 19550, 7979, 71320, 7180, 10129, -4100, -11900, 2429, 36700, 15280, 3340, 11399, 6780, 13950, 10560, 7040, 2330, 161490, 10209, 74500, 10610, 16930, 5230, 4339, 193090, 1389, 1530, 11840, 111649, 8630, 70180, 11470, 42450, 5239, 7730, 8089, 9149, 5310, 26140, 6969, 3950, 8270, 19130, 8300, 4419, 59429, 35930, 166590, 1579, 669, 17340, 3090, 176800, 5580, 29690, 103940, 31200, 46640, 151130, 9630, 7710, 4560, 127080, 7350, 26160, 153950, 80670, 4330, 4460, 6990, 9869, 40380, 5870, -2880, 103500, 21309, 9840, 22010, 1879, 155440, 5320, 9159, -240, 10530, 7170, 8580, 62590, 10290, 38390, 154760, 4079, 86430, 10380, 709, 2680, 7610, 5500, 12500, 39100, 5030, 122840, 7719, 193080, 4229, 4550, 590, 9099, 1969, 4239, 130730, 32719, 5840, 95030, 1640, 1160, 77050, 6460, 32010, 190340, 182590, 160430, 86380, 43179, 113420, 47640, 151990, 1530, 52040, 30700, 41736, 4560, 118050, 47880, 168909, 8310, 2580, 47640, 29900, 64940, 27820, 15440, 20410, 71090, 2509, 9179, 2210, 3400, 5400, 133700, 91300, 8799, 27180, 5639, 28280, -6090, 31850, 59980, -25100, 112600, 26320, 29020, 9090, 29070, 8429, 9599, 1850, 19120, 13390, 12529, 11810, -130, 5140, 7759, 3960, 14660, 3279, 19110, 182550, 57820, 10169, 13660, 14190, 4360, 19180, 14070, 5679, 129820, 70070, 1580, 4700, 4869, 73520, -1301, 94730, 14280, 147660, 72330, 14620, 14260, 166400, 959, 1859, 58280, 41330, 2109, 15690, 32590, 195880, 24560, 56380, 17240, -18780, 5540, 9860, 116910, 177079, 5770, 41940, 990, 168950, 89070, 22450, 7950, 187390, 23220, 63840, 19090, 50460, 24420, 19780, 15800, 21300, 13850, 31820, 20840, 21370, 12700, 14140, 10550, 8199, 8609, 890, 12330, 17620, 4809, 18490, 7769, 12850, 13460, 15880, 176340, 145900, 8440, 1930, 4149, 6859, 83570, 6909, 83379, 15069, 4069, 29480, 93600, 8350, 3169, 3969, -21580, 13939, 13870, 7739, 2300, 19620, 12230, 12100, 549, 13010, 9090, 7509, 14090, 5739, 3050, 107120, 127899, 6969, 133470, 158020, 16530, 121510, 12350, -10570, 182369, 152200] + }, + { + "label": "Min width diameter", + "values": [98453, 319366, 234498, 455411, 391333, 147711, 479081, 208910, 124041, 344954, 280876, 501789, 368624, 98453, 429823, 234498, 170419, 391333, 258167, 479081, 319366, 124041, 455411, 280876, 147711, 368624, 315981, 203423, 170419, 318081, 237211, 321023, 258211, 260481, 341011, 429823, 273989, 296489, 285589, 302889, 235581, 214989, 388889, 392489, 334089, 432089, 423289, 358489, 235589, 244989, 223823, 229989, 389489, 262681, 219489, 226389, 312723, 344923, 401889, 464489, 387789, 283223, 254689, 233089, 397989, 370889, 374289, 256489, 409489, 410789, 294711, 380711, 203011, 280789, 288211, 234211, 284989, 353623, 479081, 143423, 399489, 313089, 249823, 282889, 172623, 287689, 170419, 325623, 389789, 348189, 299689, 275089, 215523, 226323, 377489, 412389, 416623, 497789, 309389, 340989, 270623, 294889, 104423, 121723, 339623, 334589, 132823, 386011, 345723, 206623, 256481, 408911, 289011, 149881, 117823, 317823, 208589, 319789, 286723, 428089, 426289, 425789, 320589, 321881, 344989, 398989, 306581, 412089, 305823, 284489, 373989, 282189, 302723, 442889, 429989, 343389, 253681, 315889, 267123, 174289, 379823, 319089, 345489, 170419, 447589, 305189, 436189, 387023, 446989, 439189, 366089, 472989, 491189, 465789, 368289, 416289, 263023, 195389, 451889, 368389, 351889, 458989, 318823, 413989, 347389, 360823, 406189, 361589, 430589, 481589, 254689, 422489, 361823, 379689, 297389, 380689, 363089, 383189, 409289, 388989, 424089, 397789, 401389, 386989, 346911, 450089, 427789, 391389, 345789, 402689, 429389, 434989, 351789, 468289, 365381, 402489, 436689, 372081, 382889, 384289, 392689, 411989, 440111, 390523, 393789, 376389, 397089, 495889, 335489, 424289, 414889, 409289, 389889, 408189, 412189, 384489, 402189, 433789, 379489, 271389, 392989, 401189, 390989, 410889, 415389, 381389, 409089, 449389, 317089, 387689, 312189, 409489, 448489, 405089, 405389, 449489, 364611, 424189, 221489, 418989, 302823, 408589, 413189, 389023, 439689, 417089, 389289, 420789, 262889, 172589, 420789, 419989, 409989, 405689, 418289, 410389, 406689, 408289, 407089, 423789, 409289, 423189, 406389, 423189, 320489, 418489, 410189, 417189, 216823, 424089, 387123, 395681, 412389, 239011, 416489, 418489, 417389, 429989, 393289, 419689, 406789, 332089, 327089, 419589, 414389, 413389, 413089, 403389, 420889, 261489, 424189, 412189, 402889, 426389, 417789, 415589, 404889, 418789, 413189, 415489, 405789, 408689, 418789, 437489, 474489, 399689, 403689, 414389, 415589, 416789, 422489, 196889, 411489, 424089, 217881, 423089, 418989, 421289, 422589, 411089, 422489, 211411, 424789, 415389, 426889, 417489, 411789, 430089, 395023, 411089, 417289, 428689, 415989, 423989, 420289, 387223, 394923, 432489, 390181, 439989, 313523, 490589, 115023, 398923, 399881, 236123, 180089, 399323, 343723, 190789, 421389, 415389, 405981, 427289, 432089, 403789, 381789, 420289, 414789, 418689, 408789, 436089, 422189, 318323, 437789, 420689, 420789, 411189, 437289, 435389, 286689, 444489, 418989, 437489, 422289, 418889, 440489, 427689, 354023, 418889, 425389, 414689, 444189, 208589, 446389, 418389, 483989, 421689, 412689, 328989, 423089, 427689, 339989, 425289, 381789, 421389, 227189, 353123, 426989, 428289, 418189, 425589, 427189, 420489, 432589, 428189, 426189, 396223, 421289, 421489, 420189, 435811, 422389, 446681, 486789, 421089, 426089, 422589, 422689, 435189, 359323, 485289, 433189, 351789, 387423, 322489, 304689, 426289, 420489, 423589, 146223, 398889, 397981, 406189, 418481, 408789, 241489, 395589, 398489, 419289, 425189, 426189, 405281, 141123, 398281, 229389, 422189, 426589, 428189, 420989, 386989, 262789, 421089, 476189, 232189, 413589, 412989, 494589, 422689, 269481, 223989, 426389, 368711, 397811, 418989, 429089, 414489, 417889, 426211, 410689, 425289, 445289, 415489, 421489, 370789, 387223, 416789, 412789, 284489, 351223, 399689, 472889, 415889, 290923, 407389, 393123, 410989, 348089, 359789, 419789, 218289, 427389, 417489, 370389, 395381, 417189, 400789, 389289, 388689, 420889, 171989, 146311, 419789, 388981, 421089, 396381, 370489, 484089, 418989, 362889, 388423, 392289, 400889, 408889, 419389, 365023, 413889, 277089, 407889, 403989, 421389, 461689, 432989, 409889, 455389, 412489, 440389, 426989, 188189, 483589, 436689, 405289, 247189, 330089, 441189, 453789, 425189, 418089, 415889, 374611, 417589, 409789, 330223, 276689, 408981, 406181, 501789, 211389, 413323, 455411, 277789, 375689, 314623, 274711, 188989, 452011, 366389, 300689, 285689, 316823, 333689, 320523, 501789, 282889, 345623, 283289, 442689, 440889, 318289, 330589, 341089, 271123, 325823, 452589, 316089, 323889, 477281, 289589, 390923, 265789, 261489, 353223, 310711, 501789, 210223, 325789, 288423, 284289, 302889, 326889, 380323, 338389, 394989, 294989, 339689, 302889, 288089, 334089, 346589, 329989, 270589, 317489, 271689, 315189, 314789, 383889, 337789, 270389, 248381, 303089, 302189, 320089, 334089, 134211, 337889, 313589, 333089, 452889, 308089, 443289, 305989, 448989, 338789, 291989, 296981, 317589, 362389, 336689, 344389, 211089, 353789, 173989, 289523, 325089, 316589, 370689, 331089, 338489, 329189, 340589, 322889, 323489, 335789, 372489, 376589, 423389, 316189, 209089, 318489, 481389, 334189, 467889, 246023, 334289, 384889, 274989, 396589, 409189, 391489, 342589, 290989, 338389, 319789, 348289, 352489, 346989, 449511, 345689, 318823, 395089, 350689, 351489, 285081, 339189, 179889, 355189, 411289, 334789, 332989, 210389, 409289, 354289, 426489, 353489, 370489, 325389, 348989, 302423, 320289, 367789, 358789, 344089, 356789, 360189, 365589, 352689, 354689, 445989, 358289, 423489, 392689, 358989, 404289, 400889, 348589, 498789, 342389, 380489, 258523, 458689, 353711, 343789, 339689, 320789, 387789, 392489, 364789, 407289, 398489, 387989, 430089, 313281, 404389, 404189, 379589, 372289, 435189, 422489, 410189, 248189, 400689, 413089, 316723, 401089, 409889, 447489, 360189, 426089, 406489, 399089, 356089, 402889, 401689, 399589, 408689, 396289, 402789, 417089, 416789, 407089, 421989, 425889, 404389, 384789, 315189, 464089, 390781, 425289, 380589, 416389, 412889, 407289, 407089, 420889, 401389, 408689, 412289, 421689, 367811, 422189, 406289, 402689, 288611, 394981, 402489, 418889, 409989, 407689, 400689, 176589, 424989, 419889, 336389, 392889, 341689, 410089, 240589, 415689, 343681, 425789, 412889, 467689, 405489, 161523, 385989, 435589, 432489, 421589, 445789, 414989, 367889, 386589, 438889, 443089, 415289, 416889, 397389, 482189, 416389, 418789, 421389, 453789, 440189, 301489, 303411, 423889, 405389, 254889, 413089, 417489, 343111, 323489, 410989, 501789, 324189, 425489, 428489, 414789, 423289, 418189, 419889, 415089, 418489, 426189, 400889, 419089, 330389, 416489, 442089, 409289, 418989, 366689, 420889, 413889, 438989, 342689, 409689, 424289, 393881, 415689, 425289, 411889, 426889, 450189, 262889, 414489, 419889, 354223, 490689, 429589, 430289, 243289, 329923, 412089, 417789, 334023, 404689, 325989, 408389, 404489, 412789, 413989, 425889, 496989, 317489, 362189, 263589, 421489, 416089, 429089, 418689, 414689, 411181, 416689, 214589, 412189, 416889, 420289, 285689, 171189, 449589, 416789, 416889, 416089, 420489, 146123, 410489, 404989, 414489, 413389, 417289, 408389, 286689, 263989, 429489, 429289, 417389, 411889, 191589, 419189, 412389, 433689, 415589, 431889, 419389, 424489, 424689, 427489, 277789, 421889, 413889, 415689, 414189, 430389, 423689, 400289, 431989, 416489, 395989, 217689, 429689, 416489, 423389, 351423, 428489, 418189, 409689, 444389, 420389, 423289, 425289, 361489, 415189, 419689, 417189, 423189, 414689, 419389, 423889, 176489, 422589, 413389, 418789, 330389, 422289, 421589, 424589, 405481, 408489, 415789, 392181, 419689, 421989, 419389, 485389, 428589, 426189, 425689, 417689, 425089, 400489, 425989, 420989, 419289, 426889, 428481, 427789, 418989, 418689, 422489, 422789, 423089, 404781, 428989, 421189, 420389, 418689, 421389, 419189, 398089, 429189, 224189, 420089, 349023, 420189, 425189, 424889, 418389, 417889, 419689, 414289, 416389, 421289, 415989, 419389, 421989, 420989, 416989, 421889, 418789, 421389, 411689, 422689, 421589, 421689, 419989, 414189, 419489, 427989, 418489, 421589, 349723, 283989, 420689, 421789, 419989, 390489, 425389, 424089, 424089, 423689, 196989, 413389, 401189, 428689, 474589, 380289, 471889, 421789, 418389, 432389, 411589, 427789, 413789, 393389, 431989, 483589, 427589, 431489, 423989, 500489, 419189, 410289, 411989, 330489, 423989, 408889, 419089, 429389, 436189, 428289, 350523, 342311, 427989, 355423, 416589, 412189, 416689, 431389, 421889, 232189, 422589, 302889, 422389, 417789, 426889, 290589, 306489, 427589, 428189, 381889, 427489, 417089, 292889, 419889, 333389, 429589, 332089, 419189, 420489, 425289, 414189, 416089, 417889, 419089, 409989, 422689, 428989, 198489, 416189, 421889, 191389, 415689, 429789, 424489, 429389, 210289, 316989, 424589, 429289, 281881, 423189, 425089, 420589, 422989, 423989, 449189, 427089, 424589, 419789, 426589, 420089, 420089, 435889, 420189, 432189, 414589, 422289, 426689, 424289, 421989, 438989, 209089, 418989, 429089, 415889, 459689, 423389, 427389, 394589, 435589, 261089, 424089, 447789, 415989, 303289, 376989, 425689, 295789, 419589, 427189, 419389, 284589, 414989, 316689, 420789, 372511, 427089, 323489, 417089, 355589, 424089, 427089, 423989, 198789, 303889, 342189, 364689, 419489, 415989, 424089, 428489, 283789, 414989, 421589, 422789, 337989, 418189, 392189, 415889, 428589, 412389, 415189, 339723, 420689, 414189, 402189, 423489, 346923, 292189, 445311, 229489, 418889, 401589, 467089, 424089, 490789, 396789, 420889, 404089, 334889, 242823, 441789, 404989, 465189, 423389, 408511, 413289, 382281, 460389, 411989, 401589, 411889, 210289, 312489, 420189, 424489, 433789, 404189, 242111, 414489, 440689, 424689, 418089, 298689, 447089, 419189, 295689, 397389, 431389, 431981, 418689, 421089, 423589, 396889, 415289, 485089, 418589, 418089, 428189, 452289, 428089, 418889, 418589, 412189, 426789, 428289, 419989, 316089, 450189, 297589, 349589, 321589, 431889, 434089, 394989, 424389, 274889, 347289, 431789, 422289, 462189, 341789, 153111, 425989, 427889, 374011, 430189, 302489, 404789, 410389, 447289, 457189, 399681, 396689, 352281, 423389, 373489, 410889, 428589, 412589, 427489, 418689, 400089, 497489, 428089, 422389, 381011, 421189, 282089, 415889, 407889, 425789, 222889, 377911, 421789, 376011, 431489, 423589, 412089, 422289, 286889, 423989, 420089, 479389, 490189, 437889, 414889, 419789, 320789, 382489, 294289, 417689, 419189, 255689, 422589, 350089, 412989, 404489, 420289, 414689, 423089, 421589, 437489, 414089, 308789, 418889, 224389, 420489, 199089, 268289, 479081, 416989, 418089, 392489, 310589, 427489, 406089, 411389, 423089, 383189, 261489, 273089, 413689, 406089, 353089, 369389, 409489, 411381, 372389, 418589, 492089, 423789, 427789, 365689, 357389, 420289, 307889, 377389, 430789, 402711, 430789, 433189, 419289, 406881, 428389, 361289, 395989, 401789, 388789, 298823, 413089, 413489, 410389, 406289, 398981, 423489, 424089, 302189, 412889, 392981, 415689, 340923, 310289, 400689, 392389, 460889, 415989, 407289, 408089, 405589, 418389, 403281, 411889, 366011, 407489, 297489, 424889, 408389, 444489, 414489, 268489, 413589, 288589, 299489, 412789, 305989, 420089, 401189, 422289, 413589, 457689, 367289, 124041, 437611, 161211, 379881, 420189, 302023, 342523, 385089, 307189, 474789, 367389, 418289, 377789, 373789, 401411, 397989, 405189, 315789, 372211, 415789, 422589, 425489, 404689, 415689, 417189, 219989, 413289, 371689, 281489, 417089, 405989, 408289, 397289, 424989, 198889, 409889, 427389, 424589, 222889, 409089, 325689, 438489, 295789, 428889, 408689, 417189, 349589, 365311, 392689, 409789, 395189, 424989, 259723, 388589, 423889, 407189, 419089, 408589, 350389, 390789, 398589, 406089, 387989, 402089, 427089, 180289, 403689, 414189, 412189, 431789, 413289, 225611, 386681, 406289, 275189, 387089, 399389, 405989, 402889, 407189, 489289, 275689, 413289, 394089, 462389, 408289, 323289, 335923, 410889, 411089, 410389, 413089, 416989, 278289, 401689, 460389, 330023, 416189, 195689, 372489, 309189, 391889, 205623, 307889, 407889, 422689, 415889, 317389, 407989, 411423, 337189, 342323, 334589, 405989, 415689, 431089, 407789, 408789, 420189, 422389, 394981, 413989, 409989, 419689, 399289, 398889, 425089, 408589, 372789, 402389, 171289, 409889, 414389, 486189, 407689, 326789, 380981, 415089, 428589, 486489, 374289, 166481, 474989, 412489, 393989, 419389, 385381, 404589, 410989, 416189, 410589, 422389, 419989, 394181, 241789, 412289, 400081, 419189, 418589, 421689, 378489, 258989, 415789, 306389, 421089, 416689, 402989, 400281, 461489, 404789, 393581, 419889, 416889, 360389, 420989, 397381, 432289, 402889, 422389, 405589, 423389, 428989, 421089, 435989, 334989, 423389, 413889, 412189, 397581, 413389, 418289, 407389, 496689, 407981, 309389, 412189, 327589, 418889, 410489, 418389, 445489, 422189, 408089, 390681, 424789, 455789, 234189, 281689, 390581, 426889, 415489, 418189, 392681, 405189, 412189, 412989, 254389, 416989, 425789, 284189, 423689, 438089, 347089, 328989, 410489, 425589, 420589, 439889, 372189, 413089, 422689, 420489, 417989, 422489, 428389, 269489, 263989, 408989, 430589, 409989, 282689, 274289, 422089, 423289, 419689, 365789, 427689, 424089, 247389, 499089, 428081, 408789, 410589, 470889, 415189, 413389, 394711, 421489, 419089, 421089, 409389, 424989, 395089, 295523, 479089, 394011, 490789, 361889, 227189, 270023, 454389, 416581, 393281, 429889, 376689, 361789, 365089, 303289, 242189, 241989, 420489, 419189, 462289, 406989, 178589, 412589, 432289, 414889, 416789, 425089, 413789, 366011, 419189, 266989, 498389, 419289, 260389, 417489, 447289, 454789, 406789, 388789, 386489, 250989, 390489, 434189, 291611, 313089, 394389, 379389, 412789, 408289, 419089, 260589, 302489, 457189, 396689, 273989, 409589, 390381, 422089, 443889, 257689, 473289, 454589, 369289, 332489, 241189, 465889, 501789, 380489, 356289, 456589, 360189, 421089, 423489, 339511, 261289, 469489, 436989, 457289, 443689, 422289, 381489, 380181, 435489, 456089, 454089, 281489, 424289, 306689, 410089, 440389, 474989, 434489, 458889, 395723, 420289, 210989, 423889, 368323, 411189, 434989, 441689, 413689, 437189, 398981, 372723, 458589, 424889, 361311, 261781, 429189, 353289, 420189, 381089, 437389, 394889, 346123, 412589, 431389, 176489, 418289, 424189, 372289, 428589, 421089, 303089, 420789, 420689, 343389, 428589, 411889, 251189, 406789, 433689, 362889, 173989, 423289, 416589, 420989, 436789, 326089, 406789, 427389, 412289, 276889, 309289, 310389, 326789, 485489, 322489, 409889, 476689, 415489, 226189, 414089, 424689, 453889, 340623, 319989, 399789, 412689, 346489, 429889, 428089, 405889, 423089, 411289, 467589, 411489, 432889, 414189, 385481, 430489, 270689, 248489, 422089, 501089, 421189, 266189, 421889, 347489, 421989, 433389, 334323, 197489, 401989, 414989, 339681, 449389, 383189, 417489, 419889, 401489, 192611, 232389, 419289, 427089, 380789, 362189, 437989, 372289, 417889, 408289, 383989, 409589, 401389, 420889, 406189, 420589, 233589, 399889, 371189, 387989, 373811, 405889, 419789, 301189, 412789, 413989, 472889, 419789, 426689, 349389, 198323, 412989, 283989, 422789, 392481, 417389, 416089, 431289, 398481, 249689, 417989, 401981, 197389, 366589, 415889, 295423, 413789, 423789, 236089, 302789, 424489, 415989, 415689, 360889, 409489, 412289, 217989, 420689, 451889, 360489, 414989, 382089, 347689, 415189, 420789, 389781, 420789, 350089, 387989, 416189, 343489, 372989, 439189, 283489, 382781, 386589, 387589, 384789, 406889, 398389, 403889, 399589, 419789, 404289, 372511, 264889, 413189, 391389, 386689, 387089, 409789, 321089, 375689, 413589, 407589, 385089, 405489, 402989, 416989, 387889, 491389, 381089, 422189, 419089, 415089, 423889, 353489, 412389, 397389, 336689, 415189, 400389, 429689, 409189, 402089, 391089, 402489, 192689, 333789, 395589, 383123, 229189, 349623, 411889, 403289, 353189, 414189, 334223, 399989, 423989, 347623, 400689, 408989, 410089, 395889, 409189, 386989, 425589, 253289, 431489, 402489, 406289, 287789, 408189, 410089, 393489, 333889, 404589, 258889, 414489, 404789, 462689, 416189, 253789, 235289, 278889, 402289, 351889, 279289, 401589, 204889, 403589, 412789, 258089, 327089, 415289, 319789, 392389, 312489, 444789, 398489, 434789, 421789, 430189, 262189, 406689, 399189, 346789, 410389, 411089, 333489, 289689, 346589, 337989, 397789, 392289, 398689, 400789, 418589, 394789, 400489, 404989, 289189, 414689, 418689, 401189, 421189, 407289, 433089, 412689, 419489, 458189, 417381, 367911, 482989, 398989, 365989, 407989, 416789, 407189, 431689, 407889, 404389, 342589, 407389, 491589, 404889, 405889, 409989, 413489, 398989, 409589, 432589, 396789, 414889, 407389, 402489, 453489, 332423, 403389, 399689, 468589, 412889, 403589, 253989, 464589, 415289, 442181, 404789, 400889, 489489, 414689, 410089, 414489, 492889, 415989, 379211, 412789, 418489, 413689, 369711, 180889, 283589, 413489, 429389, 500089, 336389, 412789, 421689, 423989, 432789, 385289, 421489, 501789, 405489, 407589, 400189, 417589, 418689, 224689, 425489, 413289, 421389, 301389, 420289, 421489, 299289, 386389, 415489, 170419, 217189, 418989, 416289, 407689, 417089, 417789, 374889, 410889, 416289, 180981, 392289, 388689, 281989, 433589, 356789, 326889, 350089, 416989, 406181, 424089, 246489, 415989, 420289, 420889, 399589, 376889, 341989, 361489, 417689, 278089, 206289, 347289, 387589, 276789, 255789, 414989, 211489, 328311, 409089, 418089, 423689, 471489, 448089, 228889, 419689, 480089, 420589, 425789, 287789, 433089, 340423, 280389, 423189, 255789, 421989, 498589, 425989, 459589, 426889, 285389, 335389, 430289, 207689, 427789, 431889, 398281, 425689, 445189, 429189, 211989, 427689, 343789, 306189, 417589, 418389, 460289, 425089, 415989, 381489, 259589, 359589, 282489, 416689, 243589, 426289, 309189, 418089, 434589, 378389, 182889, 422389, 421289, 426089, 428789, 427989, 424189, 390489, 424889, 425989, 438289, 432089, 297789, 416489, 442689, 329889, 433389, 422389, 427289, 426889, 366823, 232489, 431781, 399589, 173411, 367123, 374089, 127923, 279289, 408281, 435089, 361023, 281789, 439089, 462881, 437589, 412989, 281489, 374389, 481189, 323481, 411589, 335289, 332289, 425489, 402389, 179589, 437489, 397581, 409281, 462589, 395281, 424489, 404081, 462789, 433489, 450789, 418989, 424389, 393081, 413989, 418289, 413189, 401681, 421489, 303889, 426689, 240789, 436689, 397111, 448489, 421389, 249889, 428889, 425489, 400389, 437289, 406489, 357989, 411089, 401289, 333423, 419489, 408889, 415289, 422689, 447389, 417089, 427289, 417089, 314489, 451789, 409589, 496489, 177489, 185889, 432989, 426089, 399389, 381511, 325789, 368611, 307889, 376011, 425789, 386389, 492489, 475489, 304689, 423189, 351989, 422289, 268189, 316289, 386711, 306489, 334223, 404889, 433089, 447989, 419089, 250589, 252789, 398689, 415389, 416689, 416989, 295389, 417589, 302189, 423189, 399489, 439089, 385989, 436889, 411889, 327889, 404189, 438989, 207489, 410989, 412689, 417989, 411689, 424789, 391789, 334789, 410489, 239389, 417589, 248989, 386781, 328323, 415889, 399789, 423089, 415389, 369489, 499589, 414389, 437489, 396681, 412189, 216911, 410189, 380723, 269389, 227889, 254489, 480989, 384989, 254589, 336389, 363889, 412489, 466389, 501789, 170419, 421189, 467289, 456989, 368689, 423689, 291989, 454389, 341823, 465389, 343623, 421389, 341689, 284889, 446689, 423989, 427689, 430789, 262789, 321789, 345411, 423789, 311989, 442389, 393023, 395689, 409289, 424989, 501789, 457789, 355589, 409589, 418889, 406089, 434489, 413789, 431289, 403589, 368889, 394781, 428689, 424089, 436389, 413189, 424189, 410189, 455989, 414689, 243289, 357589, 427089, 411189, 425889, 398481, 350281, 499089, 349989, 304589, 421089, 438989, 414789, 434089, 431589, 364823, 424489, 417989, 357189, 331489, 381589, 418189, 260789, 420189, 422189, 328989, 438489, 417689, 477889, 419889, 221989, 199189, 269989, 334389, 473589, 419389, 417189, 413981, 375989, 415089, 432389, 425889, 301289, 399089, 386581, 418289, 263889, 373589, 382389, 417181, 402189, 417589, 348023, 423789, 399789, 440289, 342589, 435389, 416089, 439789, 454389, 458289, 413789, 425689, 415889, 407489, 437589, 407689, 386889, 417089, 405289, 412189, 393989, 364389, 276789, 413389, 286489, 416289, 418189, 316089, 479689, 221989, 415089, 406089, 423989, 209789, 423289, 433089, 401089, 437589, 404389, 411089, 407389, 446789, 355589, 407489, 403789, 428289, 354689, 423889, 412689, 404889, 425389, 428289, 414589, 173789, 329089, 220711, 456589, 492489, 309689, 377289, 477489, 314089, 206411] + }, + { + "label": "RF block", + "values": [1417, 23377, 3376, 33336, 5635, 10812, 6898, 21273, 2484, 35126, 5626, 51096, 7384, 22020, 18912, 52449, 7498, 87528, 11359, 107154, 9197, 18159, 13115, 41120, 4254, 53966, 17129, 14957, 12469, 12882, 19875, 23547, 16325, 15238, 15452, 31817, 18210, 16237, 13815, 24070, 14163, 10748, 16292, 12787, 19559, 10597, 34781, 25859, 23121, 7331, 19298, 17056, 18788, 12009, 8997, 9280, 10990, 9825, 13690, 14547, 15443, 14758, 22429, 9324, 13396, 10915, 12615, 13307, 16842, 12533, 11312, 29347, 2923, 28796, 42332, 12953, 14401, 16151, 23973, 4730, 21716, 13116, 13175, 15085, 8140, 14046, 15629, 13231, 5612, 14571, 14929, 12812, 9048, 10826, 20129, 17258, 12673, 11513, 12391, 14423, 10741, 14543, 4797, 6770, 12516, 15056, 26071, 38770, 15137, 15072, 11241, 26828, 8765, 10555, 10704, 13486, 6364, 10951, 12683, 21652, 27201, 21344, 10776, 9748, 11037, 12370, 8567, 13685, 11766, 12085, 11494, 20165, 13118, 14030, 13022, 10399, 14657, 11485, 10530, 13011, 6136, 10941, 24564, 2983, 44046, 27024, 13288, 11442, 25304, 11719, 10889, 42292, 21241, 13750, 11650, 12963, 7752, 11368, 12729, 10642, 9786, 12557, 11922, 10954, 10880, 9807, 11606, 10332, 11490, 12266, 8847, 11958, 9329, 11618, 30498, 9096, 9656, 10880, 12137, 10590, 30171, 10776, 12029, 10048, 9194, 12699, 11935, 10320, 12246, 10999, 11670, 12919, 10448, 28090, 9996, 11446, 11869, 11452, 11130, 10617, 10938, 10938, 61633, 9401, 10986, 10264, 11382, 26443, 7246, 10959, 10865, 10461, 15205, 10010, 11370, 10761, 9628, 10072, 15113, 15277, 10752, 15445, 10415, 10409, 11365, 42807, 10732, 80687, 14568, 10607, 25736, 10835, 25227, 10372, 10690, 10861, 9204, 24356, 9578, 10690, 16420, 32922, 9966, 10328, 22516, 11073, 10370, 10319, 16053, 12519, 10850, 10016, 23430, 9967, 10409, 16565, 33216, 10086, 11852, 10717, 71528, 10854, 6473, 9864, 24531, 10169, 10465, 13817, 8117, 10114, 10539, 9383, 9575, 9905, 10607, 10809, 12302, 11300, 17273, 19981, 10379, 62047, 32661, 10668, 10740, 11887, 10168, 10328, 10606, 5848, 19699, 9904, 10606, 12471, 10735, 10454, 10221, 11269, 10282, 10788, 10518, 13610, 10157, 12402, 12469, 10341, 11117, 11692, 11407, 11290, 10950, 11411, 10684, 15902, 9235, 11594, 10388, 10673, 10287, 11358, 10456, 21224, 11029, 9757, 10623, 20290, 11303, 10606, 10576, 10914, 10215, 11150, 10688, 20300, 10648, 10158, 9969, 10490, 9674, 14900, 8394, 58012, 9555, 18938, 12074, 10625, 16410, 18293, 8646, 7452, 10486, 10598, 10851, 9883, 9527, 9921, 8487, 12350, 21204, 10475, 33939, 10793, 10449, 12448, 11840, 16981, 9941, 9714, 10921, 17966, 13494, 13501, 9559, 12461, 10527, 10273, 12408, 10142, 8618, 10065, 10490, 19855, 11973, 6992, 27078, 9865, 22933, 10190, 39964, 15056, 10890, 10469, 9225, 9722, 22231, 10448, 16940, 8739, 9933, 10792, 10162, 10820, 10476, 10596, 15300, 10848, 10490, 10626, 11052, 11152, 9908, 10688, 10853, 23939, 10974, 10706, 11293, 25292, 10575, 44141, 9329, 42453, 11111, 33703, 9989, 14744, 29684, 10627, 12450, 10102, 10804, 22365, 15455, 10235, 17927, 28090, 22636, 5696, 10830, 11452, 37616, 10548, 14079, 2381, 9319, 5708, 10278, 10270, 10173, 10438, 10466, 14781, 11824, 13649, 11169, 10106, 10054, 48407, 10727, 8452, 10180, 11032, 9142, 27478, 10124, 10562, 10836, 10135, 7096, 9831, 11865, 10439, 10077, 10337, 10278, 10402, 40924, 10160, 24221, 8787, 12698, 13555, 20043, 9006, 10211, 30486, 10615, 5012, 13470, 11561, 21404, 11943, 35820, 10150, 10799, 10569, 10388, 18464, 10494, 10739, 17119, 10382, 10994, 10169, 10365, 10862, 10219, 35420, 11482, 36677, 10085, 9303, 10751, 26201, 9832, 9444, 11268, 16820, 24669, 11580, 10429, 13545, 31487, 14811, 28689, 13605, 22274, 13142, 15556, 39192, 11083, 28305, 22002, 32055, 11237, 14968, 15304, 10818, 14371, 9237, 10504, 11672, 15811, 20320, 13030, 18281, 37483, 10853, 18766, 33670, 11700, 25359, 13903, 19952, 17043, 18835, 21038, 13206, 10850, 13772, 8348, 14495, 25290, 14003, 13966, 12454, 16773, 15792, 14666, 12615, 18555, 20326, 13386, 16211, 11108, 12505, 18943, 13578, 13475, 9963, 13037, 24033, 10640, 25696, 8173, 12725, 9708, 9863, 12975, 12783, 29488, 10613, 15552, 10566, 9981, 11013, 10682, 10087, 12383, 11656, 10325, 10872, 8027, 11261, 11077, 38056, 10047, 9527, 9601, 12561, 10987, 10731, 10944, 6680, 11525, 10922, 10432, 38982, 12574, 19619, 12819, 8162, 9543, 12403, 9836, 14314, 22537, 11423, 11359, 16214, 12020, 11313, 9979, 10532, 11140, 5538, 11040, 10342, 7274, 11035, 10156, 9986, 10486, 12454, 12438, 24463, 20432, 20455, 12397, 37736, 10196, 18212, 15145, 18863, 13024, 13364, 12974, 41227, 11856, 11346, 11326, 12760, 10202, 15894, 11309, 22422, 17922, 9380, 11075, 11609, 9989, 21795, 16305, 10791, 18100, 10980, 12215, 10666, 10339, 7981, 12100, 10235, 28922, 10339, 11453, 15440, 24216, 8614, 14903, 11618, 10720, 10714, 11399, 10649, 10249, 11125, 11523, 13787, 10415, 12882, 10920, 11001, 23505, 19807, 12172, 76180, 10338, 10975, 8062, 13561, 20564, 11107, 9966, 8921, 34621, 36878, 11835, 10960, 11871, 10982, 29514, 10178, 10481, 11149, 10573, 9197, 34702, 15114, 11222, 7482, 11016, 28924, 9036, 11100, 12007, 30205, 10454, 10890, 10902, 10595, 10095, 10696, 10249, 10609, 10740, 10824, 10277, 10679, 10296, 13965, 9912, 10483, 9972, 10735, 19105, 24162, 10498, 9856, 11457, 10418, 10479, 9695, 10405, 20038, 21024, 10611, 10964, 10095, 18471, 10126, 11042, 10546, 13961, 9864, 10287, 10254, 10350, 36948, 10205, 19478, 16141, 10222, 32500, 9865, 19020, 32054, 7968, 10325, 26167, 15826, 10497, 26223, 10784, 11040, 21312, 13074, 11326, 10699, 11514, 10271, 9270, 27080, 11929, 29848, 13399, 10618, 16773, 38775, 15158, 10308, 16630, 24280, 10359, 26577, 25968, 11063, 9358, 24236, 10131, 10633, 8785, 16274, 10153, 17928, 10168, 12024, 15155, 10751, 10514, 10726, 10694, 10684, 12918, 10318, 9723, 10353, 18212, 11901, 35670, 10645, 10501, 14751, 11704, 5960, 21709, 33016, 11319, 10692, 9730, 11579, 10545, 10898, 10450, 16733, 20856, 10557, 10411, 9420, 31288, 35500, 10552, 7849, 8744, 10903, 9795, 9018, 10362, 11398, 11504, 21077, 9900, 19523, 22921, 48955, 10100, 35563, 17163, 10109, 10710, 10407, 10174, 10338, 19927, 10088, 11713, 9719, 10242, 37731, 15195, 6232, 41049, 10615, 10017, 9755, 10709, 14637, 9291, 11864, 10109, 10156, 11304, 67519, 17390, 17379, 12079, 10161, 10612, 9842, 15579, 10903, 9928, 10148, 10154, 16966, 10889, 10372, 12307, 13177, 26663, 10878, 9647, 10531, 9319, 13014, 9437, 9204, 12344, 11695, 29491, 4829, 9900, 33272, 14803, 6452, 10605, 11949, 14380, 41594, 10764, 11066, 10315, 13599, 10388, 10160, 22538, 10492, 10394, 11021, 11273, 16408, 10459, 9505, 11608, 27802, 10337, 10946, 10642, 10364, 19852, 9766, 9477, 10783, 10463, 32639, 33506, 10877, 11257, 11148, 11070, 10769, 32854, 11405, 10836, 9867, 10488, 14866, 10453, 10822, 10211, 10304, 10483, 10395, 10455, 11100, 10595, 10385, 10249, 10315, 10299, 14743, 10506, 4196, 10680, 8481, 10569, 10217, 10535, 10788, 10380, 10104, 10496, 10774, 10578, 12092, 10172, 10273, 11082, 28496, 10138, 11213, 10182, 10541, 10214, 10813, 10209, 9657, 10418, 10325, 9225, 10075, 10889, 8608, 11322, 11055, 10799, 10054, 22351, 34451, 10954, 10801, 10028, 10797, 10584, 8069, 23265, 19284, 10490, 12889, 11179, 10694, 23407, 10668, 10530, 10576, 33861, 16659, 18867, 10082, 16290, 9883, 14526, 9639, 10930, 10400, 6394, 10245, 10304, 11994, 10994, 11345, 10426, 8470, 17899, 10053, 16420, 10516, 29232, 10200, 10599, 10119, 14293, 10478, 27110, 10359, 9926, 9912, 29435, 17805, 12276, 10674, 26997, 10445, 20195, 9146, 10524, 10816, 10555, 10744, 10242, 10180, 14829, 10046, 11402, 13681, 9995, 10387, 10157, 10482, 15997, 21537, 20617, 7234, 19940, 10347, 9837, 10492, 3567, 15063, 10527, 14404, 26219, 9845, 10367, 12283, 10012, 11008, 16150, 10090, 9801, 10182, 10385, 11210, 10227, 10945, 10796, 12408, 10596, 12523, 10445, 10863, 15001, 11714, 4158, 10011, 11102, 18453, 25567, 34427, 21636, 17312, 11486, 25894, 10305, 11143, 10014, 7083, 29212, 11225, 13217, 12442, 10534, 30505, 18992, 9916, 9305, 9562, 14432, 10474, 15954, 11336, 14433, 10782, 10858, 13947, 13731, 16533, 18216, 23681, 32935, 9827, 10190, 9891, 12630, 10233, 10130, 10387, 15376, 10256, 24143, 10237, 9739, 10317, 9752, 8255, 10923, 8741, 37789, 61374, 8664, 4220, 34907, 3366, 9820, 18920, 28985, 11698, 10181, 82710, 10549, 34749, 25408, 11746, 16455, 10624, 17395, 12460, 11048, 12144, 12643, 13238, 11049, 10607, 10713, 16579, 22372, 10607, 11766, 11282, 10549, 22312, 9792, 12057, 9784, 10705, 21263, 39010, 10601, 20597, 10461, 10502, 8825, 10079, 10800, 11227, 20574, 10297, 28465, 11264, 10799, 11484, 32910, 10132, 10895, 21699, 10646, 10735, 10696, 11264, 19742, 42988, 41859, 10492, 5759, 24954, 10411, 13437, 11267, 5603, 10173, 10822, 11230, 33464, 17149, 11761, 10849, 11071, 10266, 10318, 5839, 14954, 10101, 39692, 29152, 9676, 12924, 11540, 43420, 30908, 9929, 23278, 17192, 9964, 10193, 20560, 27021, 19244, 9997, 11196, 11353, 14331, 10630, 9783, 10959, 14011, 21597, 12489, 10930, 19611, 10617, 10366, 32400, 5912, 12172, 32577, 65364, 44139, 10069, 10473, 10503, 9310, 33098, 10077, 10394, 10412, 5522, 12512, 10444, 11968, 23134, 20539, 10636, 10680, 9865, 17915, 9652, 57471, 17323, 19811, 12337, 19754, 25944, 18475, 9532, 10535, 20382, 26345, 13869, 12280, 12403, 10090, 14846, 17309, 11379, 11821, 18237, 46284, 7399, 12253, 21048, 14545, 12262, 14172, 11900, 11608, 23811, 11756, 12709, 11665, 13314, 11359, 11199, 13162, 11013, 10641, 10930, 11373, 16875, 10709, 14663, 19210, 9117, 10354, 10345, 10785, 33407, 11203, 9776, 22824, 5670, 9550, 10557, 11541, 8667, 41163, 10187, 17357, 76115, 10894, 10300, 14510, 15094, 9959, 9200, 10324, 8811, 10727, 15676, 34492, 11302, 30983, 10239, 27184, 11148, 16012, 13382, 11702, 18726, 10832, 16952, 24133, 9454, 21152, 22064, 5202, 29716, 8219, 18975, 10078, 11633, 10604, 9357, 25145, 82471, 25294, 13270, 8653, 20891, 41040, 11945, 9080, 25991, 8592, 26568, 12760, 9918, 11163, 25627, 12672, 15235, 18263, 11658, 12806, 11580, 10176, 11538, 10923, 11015, 18276, 10587, 10847, 10852, 18896, 14635, 16942, 18271, 8292, 12197, 11126, 11489, 14929, 9764, 15179, 11765, 10865, 25110, 10109, 10387, 15412, 11745, 10938, 10866, 7458, 11852, 31513, 11403, 16621, 11869, 22140, 27762, 11317, 10083, 11296, 18886, 12088, 4649, 10649, 11756, 5362, 5696, 11160, 12697, 10587, 11287, 49254, 5111, 11307, 16226, 65648, 10693, 12976, 9795, 11685, 13300, 9676, 11079, 19515, 4971, 36232, 30848, 8851, 9364, 12046, 10543, 27251, 14449, 25057, 8742, 10756, 10119, 31794, 16824, 13457, 13126, 10940, 8487, 15164, 12277, 10026, 10669, 11707, 10301, 10134, 10264, 12246, 9538, 10608, 10708, 9828, 30769, 10272, 10700, 22730, 10375, 28088, 10679, 15887, 26494, 10750, 16367, 10320, 20659, 11089, 25920, 37391, 9229, 57506, 24371, 13704, 10908, 12191, 10632, 11670, 22268, 14633, 10035, 28198, 10394, 18725, 16048, 9974, 12317, 10831, 11404, 8516, 12843, 10178, 13677, 9834, 23288, 11986, 11347, 18648, 12240, 21040, 10354, 10543, 29142, 10722, 11426, 11068, 9953, 11366, 10677, 10497, 10617, 10630, 11202, 22069, 48435, 10150, 10683, 9589, 10529, 21533, 10302, 24630, 9491, 12154, 10609, 10864, 10744, 10824, 11051, 35643, 10335, 11128, 10196, 20262, 14029, 15512, 13132, 9473, 10776, 10227, 10858, 27460, 10466, 41882, 10425, 23124, 9776, 10710, 10243, 11306, 11631, 13932, 9667, 15904, 15014, 34062, 12569, 10702, 10223, 10575, 24485, 12828, 20228, 11740, 11350, 15787, 12331, 11897, 11918, 5419, 11540, 10408, 10647, 10595, 9036, 11470, 11221, 15296, 19651, 11423, 10007, 9515, 38820, 10686, 10398, 23090, 11000, 9523, 9228, 10795, 11570, 25015, 16290, 41501, 23156, 27076, 9705, 16633, 39615, 25068, 11360, 10211, 14392, 9340, 16150, 8181, 51944, 8740, 17771, 10974, 24164, 8383, 11886, 6533, 11492, 10738, 11183, 11084, 10903, 10390, 9487, 10620, 8266, 15542, 11094, 17072, 33639, 33150, 12483, 10196, 29392, 24209, 18940, 30223, 25634, 20366, 6509, 14943, 10926, 10030, 9480, 10221, 15497, 6424, 12117, 25062, 13167, 9658, 9925, 19563, 62188, 21058, 14014, 57943, 19077, 25315, 15032, 12432, 13616, 14913, 20394, 17053, 26546, 10478, 10214, 21465, 18236, 14091, 11012, 11873, 12159, 33008, 14540, 14730, 20518, 13484, 12526, 4889, 10978, 11327, 11275, 11315, 37227, 15152, 12142, 30949, 13920, 6760, 13238, 10143, 11176, 10785, 12044, 10015, 11509, 10305, 9929, 11989, 11969, 9381, 19884, 14021, 9348, 12366, 6139, 60031, 5686, 9360, 11195, 11103, 17782, 14637, 10345, 24660, 10742, 10857, 9383, 10755, 11377, 8993, 11301, 10398, 8455, 9976, 13778, 8067, 31746, 10800, 10741, 10798, 37306, 6794, 15761, 11289, 11595, 4846, 20598, 9148, 10764, 41269, 10303, 11103, 17525, 9367, 22586, 9782, 10147, 33394, 28569, 9935, 9319, 13227, 30809, 10949, 11866, 12566, 10833, 11049, 10057, 10110, 10675, 11593, 12021, 30957, 4385, 23884, 21501, 21241, 19901, 4683, 9416, 28303, 12191, 11174, 9041, 15090, 19681, 10345, 9568, 22790, 20433, 10896, 11544, 19006, 7436, 17652, 10867, 11300, 14826, 12256, 18901, 17356, 22603, 20761, 15085, 10008, 10169, 9754, 12484, 21462, 10322, 10221, 21330, 10370, 9100, 12219, 9615, 12862, 11684, 10562, 30345, 10522, 11059, 28976, 8969, 23416, 4984, 13203, 11497, 6010, 12975, 44056, 10758, 18000, 16477, 11233, 19186, 12322, 12033, 8707, 11488, 10317, 14374, 9960, 10525, 11512, 11073, 9890, 11719, 11539, 10378, 12021, 20131, 34812, 16470, 10299, 14957, 11583, 12118, 10190, 11986, 5592, 10248, 11855, 6832, 9332, 11067, 4082, 10369, 9916, 15017, 12934, 9081, 10595, 10432, 11759, 10559, 11043, 8917, 21134, 9891, 9176, 16130, 12942, 13627, 18725, 10904, 9808, 10271, 10536, 10638, 13854, 10695, 11433, 39161, 11455, 18960, 11107, 10703, 12723, 9257, 11431, 11105, 10333, 10313, 11585, 10344, 11084, 21966, 8377, 10323, 8185, 14299, 10609, 10551, 16646, 11337, 10546, 10707, 26303, 12953, 9294, 11267, 39151, 8228, 10602, 11245, 10260, 10439, 9924, 10518, 10226, 13153, 9727, 10631, 10293, 4908, 11351, 11699, 13297, 7873, 10887, 13199, 39299, 10164, 28920, 11162, 21162, 10873, 5283, 9938, 13808, 5140, 10517, 12483, 9389, 23219, 19894, 16043, 11175, 14779, 11053, 10940, 39710, 10974, 12795, 10458, 29754, 19573, 11346, 10526, 11079, 10434, 11672, 6137, 10845, 18903, 11224, 10704, 12516, 10495, 11055, 10604, 9788, 10452, 10533, 4945, 9983, 11643, 9712, 10519, 13844, 10913, 14131, 10514, 14742, 33770, 8857, 13931, 10485, 20982, 10189, 10240, 11140, 12490, 10792, 10299, 28767, 10669, 13604, 6395, 10977, 39186, 10903, 61691, 10745, 18824, 10159, 12396, 11054, 10595, 20240, 9738, 10219, 21439, 41329, 10739, 10896, 4868, 52815, 10708, 38900, 9872, 9994, 13546, 8304, 10149, 10501, 14794, 9865, 24487, 10105, 10997, 10480, 8867, 15620, 4849, 14141, 21448, 44760, 24356, 10123, 10512, 32705, 10711, 14130, 10830, 26961, 13539, 10216, 12642, 10823, 11040, 13619, 10147, 10247, 11415, 30393, 10969, 11854, 7609, 46668, 22548, 7873, 62534, 10747, 10471, 11411, 14595, 10810, 26857, 11315, 10359, 13682, 19665, 19345, 27815, 14945, 20679, 31038, 13784, 15296, 10509, 10744, 22472, 10520, 11555, 10757, 27673, 14992, 14989, 27100, 10319, 27530, 7593, 15409, 11668, 10774, 17530, 11036, 8222, 10799, 20249, 10742, 20896, 13897, 38765, 18303, 9745, 71755, 12680, 11783, 5892, 22802, 8486, 23485, 11273, 24528, 12647, 27395, 18613, 19047, 25991, 6369, 22035, 11269, 4850, 11819, 23594, 10413, 10210, 38584, 10776, 11590, 26886, 12407, 15941, 10203, 10543, 16827, 10406, 10801, 16961, 25091, 26117, 4995, 10669, 4570, 10934, 5509, 12342, 11069, 11221, 18032, 10606, 10294, 10794, 10149, 23535, 11605, 11509, 10267, 10945, 10808, 10208, 12462, 9539, 10996, 13746, 11135, 10701, 22650, 10277, 9871, 22744, 23044, 33427, 3378, 9747, 8703, 7656, 9463, 10656, 11297, 15888, 14886, 11302, 38639, 10594, 10537, 14643, 57349, 14269, 11499, 10223, 15088, 28919, 23684, 13888, 13690, 26912, 12774, 11234, 26520, 10459, 11919, 8800, 9204, 10845, 18581, 12632, 10618, 11108, 10805, 24695, 11472, 10718, 10299, 55165, 12039, 11745, 12596, 12705, 36938, 10675, 25627, 10441, 10320, 11116, 32508, 10810, 18654, 23086, 16685, 8342, 11231, 10819, 11306, 10918, 16246, 10979, 10863, 11223, 8547, 12869, 10174, 26564, 10143, 16311, 10658, 10181, 12059, 9562, 32135, 9438, 29761, 26396, 16018, 16535, 46584, 14336, 9155, 21595, 27259, 11287, 7579, 38688, 46567, 6178, 8256, 31900, 12278, 19151, 10862, 3608, 15766, 12738, 15914, 42111, 10020, 36021, 10692, 6690, 9883, 15079, 12033, 9900, 22825, 11361, 11951, 37286, 11418, 10924, 11337, 9619, 10213, 10856, 11048, 10842, 12414, 10325, 16869, 11143, 25523, 9572, 8037, 9731, 10596, 14328, 10393, 41055, 20795, 14812, 29254, 9532, 9682, 22098, 10576, 14922, 27530, 22068, 44823, 62466, 15851, 17035, 13790, 32455, 9763, 22771, 20480, 5260, 10708, 36714, 21263, 35770, 11534, 5466, 21040, 12474, 25403, 12246, 12780, 19804, 14025, 22915, 11714, 10546, 10914, 4907, 25442, 21807, 11633, 9574, 11884, 20814, 10725, 15213, 21476, 24079, 34650, 11473, 14708, 11460, 14527, 12063, 11321, 10635, 38457, 9976, 11387, 12442, 9942, 11507, 21903, 14923, 12090, 12044, 13137, 23724, 16638, 12050, 23906, 12763, 10095, 10450, 16574, 7953, 23314, 46235, 10924, 10452, 11349, 49136, 8569, 28080, 12395, 31054, 17199, 10749, 12401, 23741, 9983, 10240, 14952, 18745, 10093, 15763, 15947, 22766, 9734, 11323, 9103, 8183, 10813, 11526, 31744, 37984, 10665, 18484, 10234, 28322, 24927, 12733, 11218, 26552, 11835, 19255, 13685, 18189, 14281, 11213, 12967, 12791, 13413, 23402, 14537, 13631, 13160, 14190, 13652, 11060, 11685, 9787, 11534, 14020, 10163, 11664, 11130, 11526, 11963, 11541, 36500, 31777, 11087, 5208, 10415, 11008, 17780, 13966, 11527, 12402, 9959, 15587, 11744, 11524, 10972, 9728, 6301, 11682, 11987, 10687, 11419, 10401, 11515, 11320, 10253, 9305, 11693, 10882, 11733, 22243, 10735, 29551, 12129, 7360, 16884, 43866, 16754, 22618, 10169, 10098, 31603, 17397] + } + ] + }] +} \ No newline at end of file diff --git a/test/image/mocks/sankey_new.json b/test/image/mocks/sankey_new.json new file mode 100644 index 00000000000..020fdefb14e --- /dev/null +++ b/test/image/mocks/sankey_new.json @@ -0,0 +1,2320 @@ +{ + "layout": { + "title": "Fallen from the skies: drone crashes database - Washington Post", + "width": 800, + "height": 800 + }, + "data": [ + { + "type": "sankey", + "orientation": "h", + "nodepad": 10, + "line": { + "color": [ + 2001, + 2001, + 2001, + 2001, + 2001, + 2001, + 2002, + 2002, + 2002, + 2002, + 2002, + 2002, + 2002, + 2003, + 2003, + 2003, + 2003, + 2004, + 2004, + 2004, + 2004, + 2004, + 2004, + 2004, + 2004, + 2004, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013 + ], + "colorscale": "Jet", + "reversescale": true, + "cmin": 2001, + "cmax": 2013, + "cauto": true + }, + "dimensions": [ + { + "label": "Narrative", + "visible": true, + "values": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 17, + 17, + 17, + 17, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 17, + 17, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 17, + 17, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 17, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 137, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182 + ], + "tickvals": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182 + ], + "ticktext": [ + "A Predator reconnaissance drone crashed in southern Iraq, near Basra, during a surveillance mission. Officials said it was unclear whether the aircraft was shot down by Iraqi forces or crashed because of mechanical problems. The drone had been based at Ali Al Salem Air Base in Kuwait. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An aerial target drone crashed 1.6 seconds after takeoff. The automatic flight control system commanded the aircraft to nose-dive immediately after takeoff because of erroneous inputs from the tri-axis rate gyro. Investigators concluded the accident was caused by the incorrect installation of the tri-axis rate gyro. The drone was being used as a target for a surface-to-air missile test.", + "A Predator reconnaissance drone crashed during a surveillance mission in the no-fly zone over southern Iraq. it is unclear whether the aircraft was shot down or crashed because of mechanical failure. The drone was based at Ali Al Salem Air Base in Kuwait. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report. ", + "An aerial target drone crashed 4,000 feet from the runway in a wooded area, leaving a scar in the ground 50 feet long and four feet deep. Firefighters allowed the blaze to burn for 26 hours until it extinguished itself. Investigators blamed the navigation system but also concluded that the pilot ordered the drone to climb too rapidly. The pilot told investigators he saw the drone as it \"leaped off the ground\" and thought to himself that \"this is not a good thing.\" ", + "A Predator reconnaissance drone crashed in eastern Afghanistan, marking the first drone crash in the Afghanistan war. Pentagon officials said bad weather and icing were the probable cause. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report.", + "A Global Hawk crashed in a desert while returning to base in the United Arab Emirates after an aborted surveillance flight over Afghanistan. Investigators concluded the cause was structural failure of the right V-tail and ruddervator. An control rod in the ruddervator failed because of metal fatigue after it came in contact with an improperly installed bolt. ", + "A Predator on a surveillance mission crashed after its engine failed and the aircraft went into an uncommanded dive. Investigators determined the cause was pilot error; the crew failed to follow proper procedures during a lost link when handing off control to another ground-control station. An investigative report states that the Predator was based at a classified location, but Pentagon officials said at the time that the drone crashed in Pakistan.", + "A Predator crashed during a landing attempt after returning early from a surveillance mission over Afghanistan because of fluctuating oil pressure. At the time, Pentagon officials said the drone crashed in Afghanistan, but the Air Force accident investigation report indicates the location was in Pakistan. The report states the drone flew into Afghanistan from a country with a time zone matching Pakistan's. The drone bounced on the runway and crashed near tents that housed U.S. troops. The Predator had been searching for a \"high-ranking\" enemy leader in Afghanistan, according to the report.", + "A Predator crashed near a Pakistani village after the pilot lost control and the aircraft went into an inverted spin. The Air Force accident investigation report conceals the location, but U.S. military officials announced at the time that the site was in Pakistan. Pakistani officials said the drone had departed from the Jacobabad air base. An Air Force investigation determined the cause was the improper assembly of a control servo by the manufacturer.", + "A Predator crashed while trying to return to Kuwait after a surveillance mission over southern Iraq. Air Force investigators determined the cause was a broken cylinder rocker arm, which resulted in engine failure. The drone lost its link shortly before it crashed six miles from Ali Al Salem Air Base.", + "A Global Hawk experienced engine failure because of fuel problems and crashed while trying to return to a base in Pakistan. Investigators determined the engine failed because a fuel nozzle was stuck in a high-flow position. The Air Force accident investigation report conceals the site of the crash, but U.S. military officials told reporters at the time that the Global Hawk was housed at the Shamsi air base in Pakistan.", + "A Predator crashed in a mountainous area after the pilot unintentionally flew it through storm clouds. The drone lost its satellite links. Investigators concluded it was probably struck by lightning. Two weather forecasters and a sensor operator had warned against flying in the area, because of the risk of bad weather, but were overruled by the pilot. U.S. Army ground troops recovered part of the wreckage, but investigators suspect that Afghan residents took the remainder.", + "A Predator on a training mission crashed into a Nevada mountain after the crew lost its control link. Air Force investigators blamed inattention on the part of the crew, finding that it was distracted by other tasks. \"As soon as we regained line-of-sight, of course we saw the mountain in our path,\" one crew member testified. \"We knew that at that point it was almost unrecoverable.\"", + "Eight minutes after takeoff, a Predator's engine seized because of an oil leak and the aircraft crashed near a Pakistani village. Air Force investigators determined the cause was the total loss of oil and an engine fire due to poor maintenance. O-ring fragments were found lodged in the crankcase. The investigative report conceals the crash location. But Pakistani officials told reporters at the time that the Predator crashed a few miles from the Jacobabad air base.", + "An aerial target drone crashes near White Sands National Monument after an uncommanded nosedive during a live-fire missile test. Investigators blamed a \"spurious electrical input\" but could not pinpoint the cause of the problem.", + "An aerial target drone was intentionally blown up in midair by its crew when it lost link shortly after takeoff. The aircraft landed in two major pieces, burning a mile apart in the White Sands Missile Range. Investigators determined the cause of the lost link was a dual failure of the command telemetry system.", + "A Predator crashed in the Afghanistan desert after a lost link. Investigators said the inexperienced pilot misinterpreted an icing warning, disengaged the autopilot and then gave an overly aggressive command to climb, triggering the lost link. The pilot's \"inexperience with the [aircraft] was magnified by his limited experience flying without the assistance of the autopilot system,\" the report stated.", + "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An Army Hunter drone crashed into trees after it lost its link from its ground-control station, according to Army safety officials. The Army's Forces Command said it did not conduct a publicly releasable investigation.", + "A Predator with the call sign DEADLY01 crashed after a student pilot botched a landing exercise. Air Force investigators said that the pilot and his instructor aligned poorly for landing and that the crew did not request updated information about gusty conditions. The operations director for the 11th Reconnaissance Squadron had ordered extra training after a series of \"tail-scrape\" incidents in the weeks before. ", + "An armed Predator burned and broke apart in midair after its engine caught fire. It was the first Class A accident involving a Predator in Iraq since the U.S.-led invastion a year earlier. Investigators determined the fire started in the engine compartment because of a poorly routed oil supply line.", + "An aerial target drone was blown up in midflight by controllers after it departed from its planned flight path and did not respond to directions. The aircraft exploded over the White Sands Missile Range. The drone was supposed to be used as target practice for F-22 fighter jets.", + "A Predator experienced a hard landing and nearly skidded off the runway. Investigators said the pilot reacted poorly because he was isolated in his ground-control station and could not feel the aircraft bumping on the runway or hear the scraping sounds of damaged landing gear.", + "A brand-new Predator crashed after it hit the runway nose-first. The front of the aircraft was sheared off. Air Force investigators blamed the student pilot but also criticized the instructor for not intervening and a contractor for not providing appropriate classroom training.", + "A brand-new Predator crashed 300 feet short of the runway while attempting to land during a functional flight check. The Air Force accident investigation report classified the location of the base but reported the local time of the incident as being in the same time zone as Pakistan. Investigators blamed pilot error and found there was minimal supervision of flight operations. The pilot was a civilian contractor employed by General Atomics.", + "A Predator crashed in Afghanistan after it lost its links to a ground-control station. The aircraft flew a programmed lost-link pattern for 12 hours but eventually ran out of fuel. The pilot, on loan from the British Royal Air Force, was \"distracted\" and bungled a reboot of the ground-control station while trying to reestablish the communications links. The U.S. Air Force investigation report found he was \"marginally prepared to fly unsupervised during an operational mission.\" The report classified the location of the base, but there are indications it was in Pakistan.", + "An Army IGNAT surveillance drone was flying about 6,000 feet above ground level when it lost its data link with the ground-control station, entered an inverted spin and crashed. A Freedom of Information Act request filed in October 2013 for the Army's accident investigation report is pending. A military incident report published by WikiLeaks stated that ground troops recovered the wreckage and brought it back to Forward Operating Base Marez.", + "An armed Predator broke apart midair after a fuel leak in the engine compartment caused a catastrophic engine fire. An investigation noted that the Predator had fuel and oil lines made of rubber instead of braided metal.", + "An armed Predator lost altitude and crashed. The pilot tried to make an emergency landing on a road but said he had to turn away at the last second \"to avoid endangering persons on the ground\" after seeing a car 200 feet below. The drone and its Hellfire missiles crashed on the desert floor. Investigators determined that the pilot bearing that encases the propeller shaft failed, but they could not figure out why.", + "A Predator departed a runway and was substantially damaged. The Air Force did not conduct a publicly releasable investigation.", + "An unarmed Predator crashed during a search for a downed helicopter in Afghanistan's Kunar province. Air Force officials later described the crash as a \"combat loss\" but withheld details about the cause. The Air Force did not conduct a publicly releasable investigation.", + "A Reaper on a training flight crashed just short of the runway. Air Force investigators concluded the cause was pilot error, finding that an instructor pilot failed to control the aircraft's glidepath, aimpoint and airspeed and was too late to execute a go-around. Investigators cited some traits about the Reaper that made it noticeably more challenging to fly consistent approaches and landings compared to the Predator. \"Given the inherent difficulties in landing any remotely piloted aircraft from a ground-control station without 'seat of the pants' and other sensory cues, these undesirable MQ-9A characteristics further complicate the approach and landing task,\" the report concluded.", + "An Army Hunter crashed near McNeal, Ariz., after a reported engine failure during flight, according to Army safety officials. The Army Materiel Command, which owned the drone, said it did not conduct a publicly releasable investigation.", + "A Predator crashed after departure from Creech Air Force Base. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An Army IGNAT surveillance drone crashed after an engine failure and burned after crashing on the ground. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", + "An armed Predator crashed in a remote area after its pilot mistakenly turned off the Stability Augmentation System, causing the drone to lose its link and plummet to the ground. Air Force investigators blamed pilot error, finding that he flew too fast in responding to a request to help ground troops, kept switching commands to the aircraft and didn't ask for help when he was \"confused.\"", + "An aerial target drone was intentionally blown up by remote-control operators over the Gulf of Mexico after it pitched up without warning and flew out of control. The drone was the intended target of an F-15 fighter jet during a test-fire mission. About three minutes after the F-15's missile missed the drone, the aircraft \"violently pitched up without input from the controller and became unresponsive,\" according to Air Force investigators. Investigators were unable to pinpoint the cause of the malfunction because of the explosion and because the wreckage was not salvaged.", + "An unarmed Army Hunter crashed on the runway after the lighting system failed and the controllers couldn't see through the darkness. The nose of the drone pitched down as the aircraft accelerated onto the runway, according to an Army safety investigation. A crew member testified that they couldn't see anything until the drone landed in a shower of sparks, bounced back in the air, spun around and skidded off the runway. An instructor testified that the student pilot was told to press a button to change the direction of an antenna shortly before landing but that he failed to click it properly. As a result, the antenna stayed in the wrong mode and the lights went out right as the Hunter was gliding toward landing. ", + "An unarmed Army Hunter crashed during a training mission after failing to respond to commands, according to Army safety officials. The Army Training and Doctrine Command, which owned the aircraft, said it did not conduct a publicly releasable accident investigation.", + "Five minutes after takeoff, a Predator rapidly lost engine oil and the pilot intentionally crashed it into the side of a mountain to avoid falling on military personnel. Air Force investigators concluded that the cause was a loose oil filter that was likely installed improperly. Investigators said the student pilot did the right thing by intentionally crashing into the mountainside instead of risking a collision with people on the ground.", + "A Predator crashed on the runway after the instructor pilot botched a landing exercise. Air Force investigators determined the pilot thought he was raising the landing gear but hit the wrong switch and turned off the engine. The pilot also turned his head to talk to someone at the moment a warning message flashed on his screen. The pilot absent-mindedly pressed a button to confirm the command. The pilot tried to glide to a landing and \"exercised profoundly poor judgment by remaining fixated on a course of action that he knew was destined to fail,\" investigators wrote. The pilot was forced by his employer to resign soon after, according to the report.", + "An aerial target drone crashed during takeoff. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report, but an unclassified presentation from an Air Force test and evaluation analyst said the cause was mechanical, attributing it to a \"control amplifier issue.\"", + "An Army Hunter flew out of control during an operator training exercise. A recovery parachute was deployed but it separated from the airframe, according to Army safety officials.The drone burned in a fire after the crash. The Army Training and Doctrine Command said it did not conduct a publicly releasable accident investigation.", + "An armed Predator crash-landed in the Iraqi desert due to an engine failure after the crankshaft failed, possibly due to a metallurgical flaw. The pilot, an Air Force major, said the crew debated whether to try to land the stricken drone at Baghdad's main airport but decided against it. Commanders ordered the crew to crash as hard as possible \"and try to leave as little left as you can\" to prevent enemy forces from seizing the Predator's missiles or classified technology. ", + "An armed Predator intentionally crashed into a mountain in Afghanistan after partial loss of engine power and propeller problems. Investigators pinpointed the cause as the failure of the variable pitch propeller mechanism, possibly because of a broken wire. The Predator had a history of similar problems with the variable pitch propeller, according to the investigative report. The Predator was 270 miles away from its base when it experienced engine trouble. The crew was ordered to crash the drone \"into tiny bits\" to prevent it from falling into enemy hands. For the same reason, the crew was directed to detonate the Hellfire missiles in a remote location before crashing the plane. As the crew prepared to shoot, it realized that it was aiming too close to a house. \"I called abort,\" the sensor operator testified. \"I didn't want to fire into the vicinity of the home.\"", + "An armed Predator crashed and skidded off the runway after it landed nose-first and bounced in the air seven times. Investigators blamed the pilot, saying he misjudged the height above touchdown and mistakenly thought the bouncing was normal. The crew testified that they couldn't detect the first bounce at all. ", + "An Army Hunter crashed after engine failure. The drone was ascending when the fuel pump failed, followed by the engine, according to Army safety officials. A Freedom of Information Act request for the accident investigation report is pending. ", + "An Army Warrior crashed during a hard landing, according to Army safety officials, who gave no other details. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. ", + "An Army Hunter armed with Viper Strike munitions crashed after it lost link because of a power failure in the ground-control station. Power was restored, but the crew could not regain links with the drone and it crashed three hours later, according to an Army safety investigative report. Iraqi police called almost three hours later to say they had recovered the aircraft. The aircraft was \"contractor operated\" and that mission commander was a \"civilian army contractor,\" according to the report.", + "An armed Predator crashed about 300 feet short of the runway during an attempted emergency landing due to an overheated engine and ignition failure. The drone was returning from a 20-hour flight when it skidded on its fuselage and left wing tip, spun and crashed into airfield lights. An engineering report found that a circuit failed due to an improperly manufactured wiring connection that was not soldered as required.", + "A pilot intentionally crashed an armed Predator after loss of engine power. Fighter jets were dispatched to blow up the wreckage to keep it out of enemy hands. Investigators concluded the cause was partial failure of the manifold air pressure sensor, which decreased fuel flow to the engine. The crew was flying the drone via satellite from March Air Force Base in California. \"Bottom line is the engine appeared to quit, we ran the checklist, we couldn't figure out how to get it started and the rest is history,\" the sensor operator testified. A supervisor wondered at first if the pilot had killed the engine inadvertently. \"The first thing I said, 'Is the ignition on?' Because in the Predator, the two buttons for firing the missile, the Hellfire, and shutting the engine down are directly adjacent to each other,\" the supervisor testified. \"It is not that difficult to squeeze the wrong button.\"", + "An Army Hunter crashed in Iraq after one of its engines lost power. The drone was on a surveillance mission at an altitude of 5,000 feet when a fuel pump warning light came on and the aft engine lost power, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. ", + "The Air Force withheld information about the circumstances of this Reaper crash. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An Army Hunter crashed shortly after takeoff when its left wing fell off. The drone was on a maintenance test flight and had reached an altitude of 2,000 feet when the operator leveled the aircraft and waited for the proper airspeed before rolling left, according to an Army safety investigative report. Instead, the left wing fell off. The crew tried to deploy the aircraft's parachute but the aircraft already was out of control and too close to the ground. The heavily redacted accident report does not specify a cause for the accident.", + "An armed Predator with the callsign Overlord 04 crashed in an uninhabited area after it pitched steeply up, then jerked nose-down and went into a rapid spin. Fighter jets blew up the wreckage to keep it out of enemy hands. Investigators were unable to pinpoint why the RS-422 receiver on the right tail computer board failed because the wreckage was destroyed. Crew members complained to investigators about frequent problems with their Predator fleet. \"We've had link problems as well,\" the mission coordinator testified. \"I don't want to be the one that crashes a plane, but I hope that this causes folks, and when I say folks, I mean GA [General Atomics], I hope we hold them accountable for some of this stuff,\" an instructor pilot added. \"We know we are flying with some defective stuff.\"", + "An Army Hunter drone lost its video link during a surveillance mission and was destroyed when it hit the ground, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. ", + "An armed Predator broke apart midair and crashed in hostile territory. About 6.5 hours into flight, the aircraft suddenly lost its satellite links and failed to follow its preprogrammed lost link route. Air Force investigators blamed a major power failure in the alternators, which they suspected was likely triggered by a short circuit. A military incident report published by WikiLeaks stated that small pieces of wreckage were found near an Iraqi schoolhouse. Investigators found no evidence that the Predator had been shot down by enemy forces.", + "The Air Force confirmed the date of this Reaper accident but classified information about where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An Army Warrior flew off and was never located after it lost link during flight. Attempts to restart the links were unsuccessful, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. ", + "An Army Hunter crashed short of the runway in rough terrain. The controller lost visual contact with the aircraft during the descent in hazy conditions, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending.", + "An Army IGNAT crashed after a lost link incident. The aircraft was cruising at an altitude of 14,000 feet when controllers lost the communication link with the aircraft. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", + "An armed Predator was intentionally flown into the ground after engine failure. According to the crew, the engine stopped working and would only run at idle speed, so it rotated nose-down and starting falling from the sky. As the drone fell to an altitude of 3,000 feet, the pilot was ordered to fire the Hellfire missile into a sparsely populated area; he testified that he couldn't see exactly where it blew up. \"Normally when aircraft loss is probable and we are far away from our primary airfield the normal guidance is to go ahead and crash the plane into as many bits, as many small pieces as possible,\" a crew member testified. Ground forces later blew up much of the wreckage with C-4 explosives but recovered a few parts. Investigators concluded that the engine failed because something malfunctioned in the throttle body assembly, restricting air intake, but could not pinpoint the broken part.", + "An armed Predator crashed after the engine sputtered repeatedly while returning to base. Investigators said the cause was a failure of the ignition module, which reduced engine speed and resulted in lost links. The aircraft had been on a 19-hour mission when the engine failed. The crew was able to restart it once, but it only ran for 15 seconds before conking out for good.", + "A Hunter drifted off course during student training and crashed into hilly terrain, according to Army safety officials. The Army Training and Doctrine Command said it did not conduct a publicly releasable accident investigation.", + "The Air Force confirmed the date of this Reaper accident and said it occurred in Southwest Asia, which usually refers to a country in the Persian Gulf, but it classified the exact location and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An armed Predator crashed about 11 minutes after takeoff after it lost electrical power and its control links. Air traffic control at Balad Air Base lost track of the aircraft on radar; it was later found about a mile from the base. Air Force investigators attributed the cause to an alternator failure. The broken alternator triggered a failure in the primary control module, including the flight control computer.", + "An armed Predator crashed in an unpopulated area. About 10 minutes after takeoff, the drone began moving erratically and finally out of control. As the crash happened, the pilot radioed the Kandahar air-traffic control tower and reported, \"No souls on board. It's a UAV so it shouldn't be a big deal.\" Investigators determined the cause was mechanical: the faulty connection of a cable to the primary control module. The manufacturer, General Atomics, suggested that poor maintenance was to blame, but investigators said there was not enough evidence to rule that in or out. Crew members complained about recurring mechanical problems. The doomed aircraft \"always kind of seemed to have a, we like to call them demons I guess,\" a staff sergeant testified. \"It's just one of those planes that seem to be broke a lot. We would always fix it and it seemed problems would go away and then come back.\"", + "A Hunter crashed after an engine failed while about 800 feet above the ground. A recovery parachute was deployed, but the aircraft was too close to the ground, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", + "An Army Warrior crashed after the operator ordered a rapid descent and the aircraft's nose pitched down. The drone went into an uncontrolled spiral, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", + "An armed Predator presumably crashed after it lost link and disappeared while flying over Afghanistan during a power loss to the ground-control station at Cannon Air Force Base in New Mexico. Two other Predators flying in Afghanistan lost their links at the same time because of the power failure. The crew regained power and was able to regain link to those two drones. The Predator that disappeared was preprogrammed to return to base in the event of a lost link but for some reason did not. Investigators speculated that it flew into hazardous weather and crashed. It has not been found.", + "An armed Predator crashed in a grove of palm trees, about 150 yards from a house. About 10 minutes after takeoff, the aircraft's electrical system went haywire and it lost link. Investigators determined a short circuit, probably in one of the alternators, likely caused the electrical problem. The Predator was burned in the post-wreckage fire. A crew member testified that the two Hellfire missiles either detonated when the aircraft crashed or else \"cooked off\" during the fire. According to the pilot, extremely hot daytime temperatures in Iraq limited when drones could take off or land. The pilot testified that high temperatures \"can cause issues with the electronics of the aircraft.\"", + "A Predator ran off the runway during landing and was substantially damaged, according to Air Combat Command. Rainy weather and crosswinds may have played a role. Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", + "The Air Force withheld information about the circumstances of this Reaper crash. The Air Force Materiel Command did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An armed Predator crashed about 1.5 miles short of the runway after a propeller shaft malfunction. The aircraft had been on a 20-hour mission when it suddenly pitched up and down, lost link and struck the ground. Investigators determined the cause was a failure of the propeller quill shaft bearing. They also found that the tool used by maintenance personnel to install the bearing had been worn and used improperly.", + "An armed Predator crashed into a ditch on base shortly after taking off into a stiff headwind. Investigators were unable to pinpoint a precise cause but concluded that factors included lopsided weight on the Predator because of its single Hellfire missile, wind gusts and an overly aggressive left turn by the pilot. The pilot overshot the intended course and tried to avoid entering a no-fly area over the base. \"As the plane was going down, all I saw were tents, and I was afraid that I had killed someone,\" testified the pilot, Maj. Richard Wageman. \"I felt numb, and I am certain that a few cuss words came out of my mouth.\" No one was injured. Wageman testified that it was his first Predator deployment and that \"it has been difficult\" to adjust to flying drones after his previous career as an F-16 pilot.", + "A Warrior crashed after it lost link with its ground-control station. The aircraft was on a training mission operated by contractors, according to Army safety officials. The Army said it did not conduct a publicly releasable accident investigation.", + "The Air Force withheld information about the circumstances of this crash. A military incident report given to WikiLeaks said the Predator crashed at 7:30 a.m. on the runway at Balad Air Base and that its Hellfire missile came loose. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report. ", + "The Air Force classified the date of this Reaper accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", + "The Air Force Special Operations Command said a Predator crashed in a classified location in southern Afghanistan after a suspected engine failure. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An armed Predator crashed after losing link and going into an unrecoverable spin. The aircraft began experiencing electrical problems and went into \"self-termination mode,\" shutting down its engine and going into a stall, according to an Air Force investigation. The report concluded the electrical failure occurred within the primary control module, probably in a power converter or the flight computer board. The same drone had reported a lost-link malfunction two days earlier but recovered. Investigators concluded that the two lost links were unrelated.", + "A Reaper crashed during an emergency landing in the desert after an engine failure and loss of oil pressure. Air Force investigators attributed the cause to an oil system temperature control valve that was improperly assembled during manufacturing. General Atomics reported that a similar incident occurred a month earlier, when a Reaper lost oil pressure and was slightly damaged during an emergency landing. General Atomics determined that the valve sliders had been installed upside down by the supplier, a Houston firm. According to the Air Force report, the valves were not of aerospace grade and were not intended for use in the aircraft.", + "A Hunter crashed after it lost link during a training mission, according to Army safety officials. Army Intelligence and Security Command said it did not conduct a publicly releasable accident investigation.", + "An armed Predator disappeared after losing its data links, and its transponder stopped working nine hours into flight. Airborne searchers found the wreckage the next day near the Afghan village of Sinkay. Investigators said the cause was a catastrophic electrical system failure, most likely because of a short circuit. Only a complete electrical failure could account for a lost link, the loss of the transponder signal and the inability of the aircraft to perform its preprogrammed lost-link emergency mission, according to the report. The pilot testified that lost links are not uncommon with Predators but usually only last for a few seconds or minutes. \"After doing this for a while, you sort of see this; it's a reoccurring thing,\" he testified. \"I'd say after the 3- to 5-minute period you sort of get the feeling that the plane just stopped talking to us and we may not recover this one.\"", + "A Hunter crashed after losing link and making an earlier-than-expected nighttime landing at a military airstrip. While turning during the descent, the aircraft lost its data links and flew out of control about 200 feet above ground level, according to an Army safety report. The Hunter crashed on the runway with its left wing and nose pointing down. According to the mission commander, the aircraft started having data link problems when it was about 30 miles away from the base. ", + "A Reaper on a training mission crashed into desert terrain a minute after takeoff because of an engine malfunction. Investigators determined that a vacuum line to the carburetors became disconnected. The flight was the first for the Predator since its old engine had been replaced with a rebuilt model five days earlier. Investigators determined that the vacuum line had been installed correctly but that it was too short and subject to chafing. The pilot's skillful emergency landing saved the aircraft from being a total loss.", + "An armed Predator rolled uncontrollably and crashed in an uninhabited area two hours into a mission. Investigators determined that a software chip on the right wing's control module came loose, likely due to vibrations, locking the right aileron into a fixed position. The chip was attached to the control module with a silicone adhesive but did not appear to bond properly. The mission operator testified that this Predator often broke down: \"It seemed like whenever there was an issue on a plane, that this was the tail number.\" He agreed with investigators' description of the Predator as \"just kind of a little possessed aircraft.\"", + "An armed Predator mysteriously vanished in Afghanistan about 5 hours into a flight. The skies were clear and the aircraft was flying well above a mountain range when the return satellite data link was lost to Creech Air Force Base in Nevada. The transponder signal was lost three minutes later. Investigators concluded that there was no evidence of bad weather, icing, fuel loss or pilot error. A sergeant raised the possibility that the aircraft could have had its satellite links hacked or hijacked, saying: \"If somebody else was on the same frequencies, they could have taken over the aircraft or just knocked it out completely.\" Investigators found no evidence of hacking.", + "Edwards Air Force Base officials said a Global Hawk on a test flight made an emergency landing shortly after midnight on a dry lake bed, damaging the right wing and landing gear. The Air Force Materiel Command did not convene an Accident Investigation Board to produce a publicly releasable report.", + "The Air Force withheld information about the circumstances of this crash. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", + "The Air Force withheld information about the circumstances of this crash except to say that it did not occur due to \"hostile fire.\" A military incident report published by WikiLeaks said the Reaper crashed during landing at Kandahar Air Base while carrying two Hellfire missiles and other munitions, but they did not detonate. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An armed Predator crashed in a remote area 10 hours into flight after the engine lost power and the aircraft went into a stall. The camera operator testified that the crew had just started to follow a target -- a suspect in a car -- when \"the plane did something weird.\" Investigators determined that the propeller quill shaft failed due to cracks left during the manufacturing process. The quill shaft eventually sheared apart after the cracks widened from normal wear and tear, according to the Air Force report. A report from General Atomics disclosed that another Predator was affected by a similar quill shaft failure recently, but the details were redacted.", + "An unarmed Hunter crashed next to a highway after a massive fuel leak caused the engine to fail, according to an Army safety investigation report. A crew member reported that the camera showed the fuel \"just spewing out, it looked like Niagara Falls coming over the front of the aircraft.\" The aircraft glided over a populated area but failed to return to base. The crew released the parachute when the aircraft descended to 2,000 feet, but it was too late. \"They would have popped the chute earlier but didn't want to have a parachute being deployed over the city, and this was a concern here,\" the mission commander reported.", + "An armed Predator crashed into a mountain after the propeller failed 15 hours into a flight. The aircraft dropped 16,300 feet in about three minutes. Investigators attributed the cause to a failed variable pitch propeller servo, a common problem in Predators. Investigators suggested that \"it would be reasonable to conclude that there may be a flaw in the part's design or accepted refurbishment process.\" Investigators noted that 20 other incidents of failed or broken variable pitch propellers were reported in subsequent months.", + "Air Force officials said a Predator crashed during takeoff, hitting a fence. The accident occurred one day after a unit of four Predators began flying at Holloman Air Force Base -- the first time there were drone operations at the base. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report. ", + "An armed Reaper lost its control link while on a combat mission in southern Afghanistan, then flew north for hundreds of miles. An F-15 fighter jet shot down the Reaper just before it crossed into Tajikistan, according to a military incident report published by WikiLeaks. The drone crashed into a mountain near the border in Ragh district. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An armed Predator crashed after pilots lost control and the data links about nine hours into flight. Investigators blamed a failure of the sero potentiometer or a cable connecting to it. The link was lost because the aircraft lost altitude so quickly, disrupting the satellite connection.", + "An armed Predator flew straight into a mountain at 17,000 feet because the pilot was not paying attention, according to an Air Force investigation report. The pilot was rushing to help troops on the ground but ignored warnings from other personnel to watch out for high mountains in the area. Investigators notified the pilot that he is suspected of dereliction of duty. The pilot says he was not warned about the high terrain and only became aware of it shortly before the crash when he looked up at his video screen and saw the mountain straight ahead. \"I knew, with the climbing capability of the Predator, you're not going to out-climb much, if anything,\" the major testified.", + "A Warrior crashed while returning to base after the Stability Augmentation System became disengaged, according to Army safety officials. The aircraft entered a flat inverted spin and hit the ground. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", + "An armed Predator lost link and crashed 20 minutes after takeoff. The wreckage was not found for five weeks. Investigators blamed a catastrophic electrical system failure, most likely caused by a short circuit in an alternator cable. The Predator aborted a mission the day before after a link problem, but it was fixed. In a report, General Atomics said similar catastrophic power shorts have occurred on other aircraft.", + "A Hunter crashed shortly after takeoff. Once the aircraft climbed to about 75 feet, the engine idled and the operator lost control, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending.", + "An armed Predator crashed after a pilot ignored repeated warnings from personnel that she was flying upside down. Crew members warned the pilot that an autopilot sensor had malfunctioned and that she needed to use a backup, manual sensor. According to investigators, the pilot thought the crew was joking when they warned her the Predator would fly upside down with the malfunctioning autopilot sensor. \"I didn't think, clearly understand, I guess, that when he said the plane will flip upside down, that he legitimately meant the plane would go out of control and point towards the ground,\" the pilot testified. When investigators asked her how well her training had prepared her for the incident, she replied: \"Um, I guess I'll just be blunt and say not well.\" The pilot was under suspicion for dereliction of duty.", + "A Hunter crashed shortly after launch, falling about 100 feet west of the runway, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", + "A Predator crashed in southern Afghanistan. Air Force officials classified the exact location and withheld details about the circumstances except to say that it was not shot down by hostile fire. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", + "A Predator crashed while attempting to land after a training mission. Investigators determined that a student pilot first flew too fast, then too slow as the aircraft descended during an attempted go-around landing. Difficult wind conditions were a contributing factor. The president of the Air Force's Accident Investigation Board, Lt. Col. Neil Neaderhiser, an experienced pilot, said Predators are especially difficult to handle. \"Of the eight aircraft types I have flown, from Cessna 152s to F-16s, the MQ-1 is by far the hardest to land.\"", + "A Hunter crashed after it was buffeted by a microburst of wind during an attempted landing go-around, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", + "An experimental Hummingbird helicopter drone crashed during a test flight. The helicopter ran dry on fuel, leading air to bleed into the fuel system intake and causing an engine shutdown, according to an Army report. Investigators blamed pilot error on the part of the civilian contractors, citing \"operator overconfidence and complacency in operating at a low fuel condition.\" Due to the risk of a \"runaway aircraft,\" the experimental drone had been restricted on its test flights to a maximum range of 304 miles. The Army ordered Boeing, the manufacturer, to pay $100,000 for crashing experimental aircraft.", + "A Predator on a training mission accelerated too fast down the runway and crashed into a perimeter fence, landing in a corn field. The pilot lost link and control of the aircraft soon after it started moving. According to investigators, a backup ground station \"hostilely\" took control of the aircraft because a crew member inadvertently turned on a transmitter. As a result, the throttle jumped from 0 to 70 percent. That crew member declined to testify. An instructor testified things could have been worse. \"If I had gone down back up through Gulf taxi way with what had happened here, the aircraft would have, at some point, would have been heading right towards the hangar where there are people, other aircraft and that type of thing,\" the instructor testified. \"It could have been a lot worse than a Pred stuck in a fence.\"", + "An armed Predator crashed immediately after takeoff. An investigator blamed pilot error, finding that the pilot forgot to turn on the Stability Augmentation System, which caused the drone to spin out of control. According to the investigation, the pilot and the camera operator failed to notice that the \"SAS on\" message did not appear -- as required by proper procedures -- on their video displays.", + "A Warrior presumably crashed after it lost link and controllers were unable to initiate emergency recovery procedures, according to Army safety officials. The aircraft rose to 3,500 feet, then began to drop when radar contact was lost. The Warrior was not recovered. The Army said it did not produce a publicly releasable accident investigation report.", + "A brand-new Reaper crashed on private property in the California desert during a training mission. About two hours into the flight, the Reaper stalled after it slowed down too much and rolled left, entering into a spin before crashing onto the desert floor. Air Force investigators concluded that the cause was pilot error due to improper control of the aircraft's speed and angle. Investigators also found that the training program did not adequately prepare the pilot for risks associated with a slow flight. \"We were all in disbelief,\" a contractor who was in the ground-control station told investigators. \"We just didn't, I just didn't expect anything to happen on a fairly benign flight.\"", + "An armed Predator intentionally crashed into a mountain after the engine failed because it ran out of oil. Investigators were unable to determine why the oil system malfunctioned. The crash and fire destroyed most of the aircraft. An explosives team from the U.S. military blew up the remains to prevent the wreckage from falling into enemy hands. According to testimony, the crew had debated whether to return to base after it received warnings that the oil temperature was rising, but temperatures dropped when they activated a cooling fan, so they kept going.", + "A Hunter crashed during a landing attempt after missing the first and second arresting cables designed to catch the aircraft, according to Army safety officials. The Hunter kept going off the runway, crossed 300 feet of gravel and smashed into a concrete barrier. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending.", + "An unarmed Hunter crashed about 15 minutes after takeoff when it lost its data links. It took searchers more than an hour to locate the wreckage, which was about three miles from the base in Jalalabad. Many aircraft components were missing from the site and were presumably taken by Afghans, according to an Army safety investigation report. Civilian contractors were operating the drone.", + "An armed Predator crashed while approaching for landing after a pilot pressed the wrong button on his joystick. Investigators concluded that the pilot inadvertently disabled the Predator's Stability Augmentation System, which keeps the aircraft from wobbling. The pilot was trying to turn off another switch in response to low coolant temperature but acknowledged in testimony that he pressed the \"big red button that says send the aircraft out of control.\" When he realized his mistake, he moved too quickly to reactivate the Stability Augmentation System when the aircraft was pitched down instead of waiting until the aircraft was straight and level. That made things worse, causing the Predator \"to aggressively pitch down further,\" according to the accident report.", + "An armed Predator crashed in the desert after the aircraft lost power and its satellite link. Investigators concluded that an alternator bearing failed, triggering a shutdown of the electrical system. According to voice recordings from the ground-control station, the pilot and sensor operator received warnings about the alternator but the aircraft soon lost link for about 85 seconds, signaling bigger problems. The crew said they were an hour flight from both Kandahar Air Base and Shindand Air Base and knew they couldn't reach either in time. \"We avoided -- attempted to avoid populated areas, stuff like that, so we were thinking, you know, if we were going to actually put this plane in the dirt, where do we not want to go, essentially,\" the pilot testified. \"And then eventually we just lost link with the airplane and never got it back.\"", + "An armed Predator crashed in the Gulf of Aden after its engine failed nine hours into a flight. Investigators concluded that cylinder malfunction and oil loss caused the engine failure but couldn't pinpoint the problem because the Predator sank in 150 feet of water and was not recovered. The drone's engine had been replaced one week earlier, but crews had to abort three other recent flights because of low oil pressure. Maintenance crews made a variety of repairs, and the aircraft flew a sortie on Jan. 13 without incident. \"It has a history of maintenance for engine problems, oil problems on that aircraft,\" the sensor operator testified. \"Without recovering the engine, we don't know exactly what happened.\"", + "A Warrior crashed after an operator entered the incorrect altitude in the navigator mode, according to Army safety officials. The Army said it did not conduct a publicly releasable investigation.", + "An armed Predator crashed on the runway at an airport shared by U.S. military and civilian airliners in Djibouti. The Predator came in too fast and too steep for landing and smashed into a perimeter fence. Investigators concluded that the cause was a combination of mechanical problems with the throttle and pilot error. The pilot was advised that he was under suspicion for dereliction of duty for failing to follow proper procedures during landing. A military officer testified that the incident was the fourth involving an MQ-1 Predator in recent months. \"I have no illusions that this won't happen again, whether it's an MQ-1 or otherwise,\" the officer said. A drone squadron commander testified that the doomed drone was \"one of our hangar queens, if you will. It flew regularly but it had one of the worst maintenance records of the aircraft we had on station at the time.\"", + "A Gray Eagle crashed during a high-altitude test flight, according to Army safety officials. The Army said it did not conduct a publicly releasable accident report.", + "A Predator crashed in a remote area after the engine failed. Investigators concluded that a mechanical bearing failed and contaminated the oil system with metal shavings and other debris. The pilot crashed the aircraft about a mile from a military forward operating base. The drone was damaged but not destroyed. U.S. ground troops recovered the aircraft but had to cut off the wings so they could fit the drone on their Humvees.", + "An armed Predator crashed into a base perimeter fence near a bunch of shipping containers during an emergency landing. Investigators attributed the cause of the accident to a combination of mechanical problems and pilot error. The engine failed because of a malfunctioning cooling system. According to the investigation, the pilot knew the engine was about to seize up during the emergency descent but didn't recognize it had already stopped a few minutes earlier. \"Where the hell is -- where is the runway? It's all the way over here. I overshot,\" the pilot shouted, according to a transcript of the voice recorder in the ground-control station. Oh shit, oh damn, oh my God what is that!? ... What was all that stuff that I just hit?\" ", + "An armed Predator crashed in the sea off the coast of Djibouti as it was descending for an emergency landing. The drone \"violently\" rolled right and then uncontrollably rolled left because of electrical problems in the right-wing control module, according to investigators. The sensor operator testified that the aircraft had a history of doing \"weird stuff,\" and when it made its final roll, \"it pitched real hard, it was the hardest bank I had ever seen a Pred do.\" He added: \"It just gave it up. It just nosed over on its belly and just went straight for the ground. ... It was one of those moments when you feel your heart sink and, well, there it goes. And I mean, it pretty much did its own thing, it pretty much gave up, it wasn't taking inputs whatsoever. It just completely nosed over. Then the screen went black, and that was it.\"", + "An aerial target drone crashed in the Gulf of Mexico. Investigators blamed the crash on an electrical malfunction that caused the drone to fly in a nearly inverted position. The aircraft crashed into waters about four nautical miles from the nearest boat, according to the accident investigation report.", + "An armed Predator crashed a couple miles short of the runway near a residential area in Djibouti, the fourth Predator crash in Djibouti in four months. Investigators attributed the cause to a combination of mechanical problems and pilot error. Sensors gave inaccurate altitude readings and the crew failed to recognize the problem, in part because the camera was fogged over. \"Dude, look at this camera. Seriously, I can't do anything. There's nothing I can do,\" the camera operator said to the pilot, according to a voice-recording transcript. \"Yeah, dude, I literally have no picture right now. This camera's like, completely messed up.\" The pilot didn't realize he was too low until he was 20 feet above ground level. The aircraft was trying to return to base after a 17-hour mission because of an oil leak, but investigators concluded that problem did not contribute to the crash.", + "A Reaper crashed after takeoff from Creech Air Force Base, but the Air Force withheld details of the circumstances. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An armed Predator was struck by lightning and presumably crashed. The aircraft lost satellite links after the lightning struck and was not recovered. The crew knew it was flying in the vicinity of thunderstorms but had an urgent mission to assist ground troops in the area who were under enemy fire.", + "An armed Predator crashed after it flew into bad weather and lost its links. The aircraft flew into severe turbulence and plunged 8,600 feet in 80 seconds, according to the report. The drone was forced to fly through bad weather because it was supporting ground troops in the area. \"We kind of just sat there and looked at each other, hoping that it would regain its link,\" the pilot testified. The Predator was unable to fly its preprogrammed emergency mission. \"All of a sudden, just like a snap, everything pretty much went,\" the camera operator testified. \"Not exactly like a black screen or so, but pretty much to that effect.\" According to the mission coordinator, ground troops in the area reported seeing \"something fall out of the sky,\" which turned out to be the stricken Predator.", + "An armed Predator disappeared and presumably crashed. It was the third Predator crash near Jalalabad in five weeks. In each case, the drones lost their satellite links and did not fly their emergency preprogrammed mission. Unlike the previous two accidents, the weather in this case was clear and investigators were unable to determine a cause. They found no evidence of maintenance or operational problems prior to the lost link. The aircraft had been flying for about 19 hours but still had 138 gallons of fuel in the tank.", + "An Army Shadow drone crashed into a C-130 Hercules aircraft as both were preparing to land at a forward operating base in eastern Afghanistan. According to an Air Force safety report, the Shadow smashed into the cargo plane’s left wing between two propellers. Jet fuel cascaded out of a gash in the wing. \"Holy shit!\" the cargo plane's navigator shouted, according to a voice-recording transcript. \"We got hit by a UAV! We got hit by a UAV!\" The Hercules crew shut down one engine and radioed to clear the runway. Within two minutes, the plane landed, smoke pouring from the left side.\"There's a big frickin' hole in the airplane,\" the pilot reported. No one was injured. The official cause was redacted from the Air Force report, but other documents suggest an air-traffic controller was temporarily demoted and received remedial training afterward.", + "An armed Predator crashed into a residential area in Jalalabad after a mechanical breakdown. No one was injured, but the aircraft burst into flames and damaged two Afghan housing compounds. The owners were compensated an undisclosed sum by the U.S. Army foreign claims commission, according to the Air Force accident investigation report. Investigators blamed the accident on a broken variable pitch propeller quill shaft. The crew realized they couldn't make it back to the airfield, so they scanned the ground for a place to crash. \"I looked below us and there were houses everywhere,\" the camera operator testified. \"We were above the city, there, there wasn't a whole lot we could aim for except for that.\"", + "A Global Hawk on a communications-relay mission over Afghanistan crashed after it lost link nine hours into a flight at 51,000 feet; it kept flying autonomously for about 30 seconds, then went into a steep dive, according to the Air Force's accident investigation report. The aircraft lost altitude so quickly that the wings sheared off. Investigators could not definitively determine a cause but found that it was likely because of an electrical malfunction. A loose connector interrupted power to the aileron and spoiler flight-control actuators, rendering the aircraft uncontrollable.", + "A Reaper on a training mission crashed during landing about 1:30 p.m. at Holloman Air Force Base. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An Armed Warrior crashed in a remote area after its engine seized up. As the aircraft was flying about 200 miles from its departure point at Bagram air base, the camera showed a fluid leak. About 20 minutes later, the engine seized and the aircraft steadily lost altitude before crashing, according to an Army safety investigation report.", + "A Reaper crashed during landing about 6:45 p.m., the second Reaper crash at Holloman Air Force Base in six weeks. A base spokesman said investigators were looking into reports that the Reaper may have struck a power line. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", + "A stealth surveillance drone, operated by the Air Force and the CIA, crashed in Iranian territory for reasons that remain unclear. The Iranian government announced that it had captured the aircraft through a cyberattack. U.S. officials cast doubt on the Iranian assertion but have not provided a consistent explanation for how it lost the Sentinel. After the Iranian government released photographs of the Sentinel, the U.S. Defense Department announced that it had lost a drone that it said had been on a surveillance mission in western Afghanistan. U.S. officials later acknowledged that the drone had been on a mission for the CIA.", + "An unarmed Reaper crashed on the runway at an international airport. The pilot, an employee of an Air Force contractor, came in too high, too fast and landed almost halfway down the runway, according to an Air Force accident investigation report. The Reaper bounced over the airport perimeter road, struck a rock breakwater and landed in the ocean. Investigators attributed the mishap to a combination of pilot error and a mechanical malfunction. Investigators found that an electrical short occurred in a cable assembly but could not conclusively determine why.", + "A Predator crashed in a classified location in Afghanistan following a lost link and a suspected power plant failure, according to the Air Force Special Operations Command. Air Force officials said they blew up the aircraft's wreckage because it was in a remote area and it was not practical to recover. The Air Force Special Operations Command did not convene an Accident Investigation Board to produce a publicly releasable report.", + "The Air Force classified the precise date of this Predator accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", + "The Air Force classified the precise date of this Reaper accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", + "A Hunter crashed during a bungled landing. The drone was caught by an arresting cable during the landing but the nose wheel collapsed, according to Army safety officials. The Hunter swerved and ran off the runway, damaging the propeller. The Army said it did not conduct a publicly releasable accident investigation.", + "An armed Predator crashed after attempting an emergency landing at Kandahar Air Base due to engine trouble. The engine malfunctioned because of a damaged coolant pump supply line; investigators determined that maintenance crews failed to notice the problem during a scheduled inspection. Investigators also partly blamed pilot error for improperly handing over remote control of the aircraft to a local recovery crew. The problems started when the crew received warnings of an overheated engine and used the infrared camera on the aircraft to see \"a warm liquid dripping from the engine compartment.\" As it neared Kandahar, the crew realized it would not reach the base so it tried to avoid crashing. \"If we would have continued to try to make the runway, we wouldn't have made it and it could have cost people their lives. I'm sure it would have,\" one of the pilots testified.", + "An armed Predator crashed into a field near Jalalabad. Investigators determined that both alternators on the aircraft failed but that pilot error was also to blame because the crew \"failed to land the [Predator] as soon as possible, and instead displayed extremely poor judgment by electing to maneuver the [aircraft] over the airfield.\" The crash resulted in damage to crops, and the explosion blew out windows in nearby buildings. The U.S. military compensated the Afghan owners an undisclosed sum, according to the Air Force accident investigation report.", + "An armed Predator crashed into the Gulf of Aden after the engine failed because the oil ran dry. Investigators determined that a turbocharger failed and damaged an oil seal, resulting in the oil leak. As the aircraft lost altitude, the pilot testified that he knew he could not make it safely back to the military base in Djibouti, so he intentionally flew over the Gulf to avoid crashing over a populated area.", + "A Warrior lost link while returning to base after the aircraft had trouble with low oil pressure and temperature spikes in the manifold, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending.", + "A Navy helicopter drone crashed at sea after running out of fuel during repeated failures to land on the deck of the USS Simpson. The drone failed to connect with an automated recovery and landing system on the ship. Another Fire Scout based on the ship had experienced similar problems for two weeks, according to a Navy accident investigation.", + "The Air Force confirmed the date of this Reaper accident and said it occurred in Southwest Asia, which usually refers to a country in the Persian Gulf. It classified the exact location and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An unarmed Reaper crash-landed at an international airport, bouncing into the ocean. Investigators found that the pilot bungled the takeoff by hitting the wrong lever and choking the fuel supply, then failing to lower the landing gear during the emergency landing attempt. The aircraft was destroyed but \"could have been recovered with minimal or no damage if the landing gear had been down,\" Air Force investigators concluded. The pilot was a civilian contractor for the Air Force. On top of the other mistakes, he took off five minutes earlier than scheduled and ignored the air-traffic controller.", + "A Navy helicopter drone crashed during a surveillance mission in central Afghanistan. The pilot and the payload operator were civilian contractors employed by the manufacturer, Northrop Grumman, according to the summary of a Navy safety investigation report. The report blamed a malfunction in the navigation system. Navy officials would not disclose the full report.", + "An armed Predator was intentionally crashed into a mountain after the engine failed because it was too far to attempt to return to the base. Investigators said malfunctioning ignition circuits caused the engine failure.", + "A Navy surveillance drone crashed into a wildlife refuge on Maryland's Eastern Shore after a malfunction with the navigation system. The RQ-4A aircraft was a Broad Area Maritime Surveillance Demonstrator -- the Navy's version of the Air Force Global Hawk. The pilot and crew were civilian contractors from the manufacturer Northrop Grumman. Navy investigators blamed a failure of the right inboard ruddervator actuator but also criticized the pilot for not following emergency guidelines.", + "A Gray Eagle crashed during an emergency landing attempt after the engine failed. The aircraft lost oil pressure, forcing the crew to try to return to base. The Gray Eagle touched down with the nose too low and the landing gear collapsed, according to Army safety officials. The Army said it did not produce a publicly available investigation report.", + "A Gray Eagle crashed one mile from the runway shortly after takeoff. The aircraft seemed to take off without incident, but as it climbed to 300 feet it suddenly plunged and crashed. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending.", + "A Gray Eagle crashed into mountainous terrain while descending to land, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending.", + "An armed Predator crashed during an attempted takeoff, slamming into a barrier and guardhouse. Investigators found the primary cause was pilot error. After the camera on board the aircraft shifted unexpectedly, the pilot slammed on the brakes, then hit the accelerator. Transcripts of the ground-station voice recorder showed that the pilot and camera operator had been joking with each other before the crash. \"Stop saying 'uh oh' while you're flying,\" the camera operator told the pilot. \"It's never good. Like going to the dentist or a doctor -- oops, what the [expletive] you mean oops?\" A few moments later, the aircraft crashed. \"I don't know what the hell just happened,\" the pilot said.", + "An armed Predator crashed a half mile from Jalalabad after an electrical failure. An investigator said the primary cause was the failure of both alternators due to a malfunctioning diode. Air Force crews tried to return to the base and make an emergency landing but didn't make it. \"We lost the aircraft, but we were damn near close to saving it and getting it on the ground,\" a camera operator testified.", + "An unarmed Predator crashed into uninhabited mountainous terrain in northern Iraq five minutes after losing its communications and navigational links. Investigators could not determine a cause. The weather was clear and there were no abnormal mechanical readings prior to the lost links. The aircraft had been flying in a preprogrammed loiter pattern -- a box over northern Iraq -- as part of a surveillance mission. The wreckage was recovered by Kurdish guerrilla fighters who posted a video on the Internet, asserting that they had shot down the aircraft. The Air Force report makes no mention of any evidence that the Predator was fired upon.", + "A Gray Eagle crashed while attempting to return to base after an engine failure. Contractors flying the aircraft noticed a high temperature warning as the aircraft reached an altitude of 1,200 feet after takeoff, according to Army safety officials. The operators tried to return the Gray Eagle to base but crashed short of the runway.The Army said it did not conduct a publicly releasable accident investigation.", + "A Gray Eagle crashed while attempting to make an emergency landing. The aircraft experienced problems with the engine oil, coolant and other malfunctions, and the engine failed before the drone could return to base. The aircraft crashed just off the runway. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", + "An armed Predator was intentionally flown into a mountainside after a propeller motor malfunctioned 20 hours into the flight. Investigators determined the primary cause was failure of the variable pitch propeller motor, resulting from an inconsistent electrical supply. The aircraft was too far away from a base to attempt an emergency landing. \"We decided that [the pilot] should crash the aircraft as hard as he could so it would be destroyed completely,\" a mission supervisor from Creech Air Force Base in Nevada testified. \"He smashed it to smithereens.\" A safety observer from Creech added: \"When you see a descent that large that is almost unheard of -- I think everyone was kind of shocked about what happened since it happened so quickly. When you get something like that, you kill the engine and the airplane is going down.\"", + "A Gray Eagle crashed after an engine failure. Army safety officials said the engine failed during a \"manual transfer of fuel operation\" while in flight. The crew was unable to restart the engine, and the aircraft crashed near its point of departure. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending.", + "A Hunter crashed after its engine failed while it was cruising at 7,000 feet above ground level. The engine gradually lost power until it failed completely at an altitude of 2,000 feet, according to Army safety officials. The Army said it did not produce a publicly available accident investigation report.", + "A Reaper crashed in an uninhabited area during a training exercise after going into a stall. Investigators determined that crew error was the primary cause. The ground-control station was improperly reconfigured from a setup for flying Predators to a setup for flying Reapers. When the pilot guided the throttle, it mistakenly triggered a reverse thrust because of the incorrect setup. \"We're in the soup here,\" the pilot said, according to a voice-recording transcript. \"Dude, uh, we're not sure what the aircraft is doing -- yeah, we crashed.\"", + "A drone helicopter crashed off the coast of Libya while trying to land on the deck of the USS Robert G. Bradley, a Navy frigate. The aircraft flew through icy conditions while on a surveillance mission to support Special Operations forces. Chunks of ice came off the drone, and the tail rotor malfunctioned while the helicopter was hovering 15 feet above the flight deck, according to a Navy investigation. The drone spun into the sea without striking the ship, and no one was injured.", + "A Hunter crashed into a concrete drainage ditch after a botched takeoff, veering off the runway after rolling just 250 feet. The aircraft was operating under an automatic takeoff and landing system, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", + "An armed Predator crashed nose-first into the ground in a remote area after going into a spin 21 hours into a mission. \"What's going on? Hang on! Hang on!\" the pilot shouted, according to a voice-recording transcript from the ground-control station. \"Whoa! Speed's dying! RPMs are up,\" the camera operator replied. \"Uh-oh! [expletive] It's spinning!\" the pilot said as his video screen went black. \"OK, I think it just fell out of the sky.\" Investigators determined that the aircraft plowed into terrain \"in a near-vertical trajectory\" after the failure of a circuit board computer chip on the secondary control module that controls the ruddervator. Afghans pillaged the wreckage before the site could be secured, according to investigators.", + "An armed Predator crashed after it was struck by lightning. The aircraft risked flying into stormy weather to provide assistance to a forward operating base that was \"expecting an imminent attack,\" according to the Air Force accident investigation report. The lightning strike knocked out the satellite links and damaged the electrical system, causing the aircraft to \"execute its flight termination mode.\" A report from General Atomics, the manufacturer, stated that a video recording \"showed the aircraft proceeding into dark clouds\" several minutes before the lightning strike.", + "A Reaper crashed and sank in the Gulf of Aden. The Air Force Special Operations Command did not convene an Accident Investigation Board to produce a publicly releasable report. A spokesman for U.S. Africa Command said the Reaper experienced flight-control problems \"believed to be attributable to severe weather. As a precaution, the aircrew diverted the aircraft to international waters, where it crashed \nand sank in the Gulf of Aden...It is believed that severe turbulence and icing were the lead contributors to the aircraft malfunction.\"", + "A Predator crashed in Mali after a suspected engine failure related to the oil system, according to a statement from Air Force Special Operations Command. Command officials waited more than a year to convene an Accident Investigation Board to produce a publicly releasable report, citing the need to investigate other \"higher priority mishaps.\" The public report is pending. ", + "A Predator crashed after a broken crankshaft caused the engine to fail, according to Air Combat Command. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report.", + "An unarmed Predator crashed during a training flight after the variable pitch propeller system failed. About five hours into a flight, the propeller pitch suddenly changed, causing reverse thrust as the aircraft plunged to the ground. \"Okay, interesting. We are falling out of the sky,\" the pilot said, according to a voice-recorder transcript from the ground-control station. \"Boy, this is going to be tight.\" Investigators concluded that the primary cause was a failure of the variable pitch propeller servomotor because of a bad electrical connection. Investigators concluded that a contributory factor was channelized attention on the part of the crew, which failed to notice that the propeller pitch had been locked in a fixed position for much of the flight.", + "A drone cargo helicopter crashed while landing at Camp Leatherneck. Marine officials said a publicly releasable accident investigation was not conducted.", + "An armed Predator crashed 800 feet past the departure end of the runway, landing near some trees and a farm. Air Force investigators concluded the primary cause was a turbocharger failure and gusty winds during the attempted landing. The accident investigation report stated that Predator drones have \"experienced an abnormally high rate of turbocharger failures in recent months.\" An Air Force master sergeant told investigators that turbocharger problems had worsened after the Air Force upgraded to a new style of turbocharger about a year before. ", + "An aerial target drone crashed about eight seconds after takeoff, destroying the aircraft and inflicting about $150,000 in damage to the runway and a barrier. The aircraft pitched up and down rapidly as soon as it climbed into the air. \"Drone just pitched up. Drone's pitching over. Drone is uh, crashed and destructed, at uh, the end of the runway,\" a pilot in a chase plane reported, according to a voice-recording transcript. Investigators determined that the primary cause was a defective portion of the Attitude Heading Reference System, which controls the up and down movement of the aircraft. \"This is not the first pitch malfunction on takeoff that we've had. It's happened on several different occasions. I don't know if the Air Force has conducted accident investigations on previous ones,\" a civilian contractor told investigators.", + "A Reaper crashed on the runway at Cannon Air Force Base. Air Force officials did not disclose other details. The Air Force Special Operations Command convened an Accident Investigation Board; a publicly releasable report is pending.", + "A Gray Eagle crashed short of the runway while attempting an emergency landing. The drone lost fuel pressure, so the civilian contractors who were flying it tried to return it to the base. The engine failed before it could land, according to Army safety officials. The Army said it did not produce a publicly releasable investigative report.", + "A Warrior crashed after losing control links while in flight, according to Army safety officials who gave no other details. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request in October 2013 for the report.", + "An unarmed Predator crashed into the sea off the coast of Sicily while in a holding pattern after conducting a 20-hour surveillance mission over North Africa. The cause was the failure of the power converter in a critical control module, according to an Air Force investigation. The satellite link was lost after a spike in electrical current. \"All indications to me made it look like a lost link, but the warnings made it look like an engine failure,\" the pilot told investigators. \"But all the warnings I saw were nothing I had seen before.\" Only one wing of the aircraft was recovered.", + "A Gray Eagle crashed into a ridge while attempting to return to base for an emergency landing. About 2.5 hours into a flight, the aircraft experienced low manifold pressure and signs of engine failure, according to Army safety officials. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request in October 2013 for the report. ", + "A Gray Eagle crashed on the runway after the controller lost its link with the aircraft, according to Army safety officials. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request for the report filed in October 2013.", + "A helicopter drone sustained damage during a hard landing after a test flight. A Navy investigation is pending.", + "A Predator crashed about six miles northwest of the runway at Holloman Air Force Base about 1:30 p.m. during a training mission. Air Force officials said pilots lost link with the aircraft. The Air Combat Command convened an Accident Investigation Board; the public report is pending.", + "A Reaper flown by the New York Air National Guard crashed into Lake Ontario, about 12 miles from the lake's eastern shore. The plane malfunctioned at 1:30 p.m., about three hours into a training mission. Some parts of the aircraft were recovered after they washed up on the lake's shoreline, but the bulk of the wreckage has not been found. The Reaper departed from Fort Drum, N.Y. The Air Combat Command convened an Accident Investigation Board; a public report is pending.", + "A Hunter drone crashed shortly after takeoff. The drone rose to 250 feet before it made an uncommanded descent and crashed on the runway, according to Army safety officials. The Army's Intelligence and Security Command, which operated the Hunter, said it did not conduct an accident investigation." + ] + }, + { + "label": "Crash ID", + "visible": true, + "values": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187, + 188, + 189, + 190, + 191, + 192, + 193, + 194 + ] + }, + { + "label": "Year", + "tickformat": ".4r", + "visible": true, + "values": [ + 2001, + 2001, + 2001, + 2001, + 2001, + 2001, + 2002, + 2002, + 2002, + 2002, + 2002, + 2002, + 2002, + 2003, + 2003, + 2003, + 2003, + 2004, + 2004, + 2004, + 2004, + 2004, + 2004, + 2004, + 2004, + 2004, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2005, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2006, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2007, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2008, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2009, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2010, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2011, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2012, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013, + 2013 + ] + }, + { + "label": "Mishap Country", + "visible": true, + "values": [ + 8, + 0, + 8, + 0, + 13, + 1, + 3, + 3, + 3, + 6, + 3, + 13, + 0, + 3, + 0, + 0, + 13, + 11, + 11, + 0, + 0, + 8, + 0, + 0, + 0, + 3, + 11, + 11, + 11, + 11, + 13, + 8, + 8, + 8, + 8, + 13, + 0, + 0, + 11, + 11, + 0, + 8, + 8, + 0, + 8, + 0, + 0, + 0, + 0, + 0, + 11, + 11, + 8, + 13, + 13, + 8, + 8, + 8, + 8, + 8, + 8, + 0, + 8, + 8, + 8, + 8, + 11, + 11, + 13, + 8, + 13, + 8, + 8, + 0, + 11, + 8, + 13, + 8, + 8, + 13, + 8, + 8, + 0, + 8, + 13, + 0, + 8, + 11, + 13, + 8, + 0, + 0, + 13, + 8, + 0, + 13, + 13, + 0, + 0, + 13, + 8, + 8, + 13, + 0, + 13, + 8, + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 0, + 8, + 0, + 0, + 8, + 8, + 0, + 13, + 13, + 13, + 13, + 13, + 10, + 8, + 10, + 0, + 13, + 13, + 10, + 0, + 10, + 0, + 13, + 13, + 13, + 13, + 13, + 13, + 0, + 13, + 0, + 9, + 2, + 13, + 11, + 11, + 0, + 13, + 13, + 10, + 13, + 12, + 11, + 2, + 13, + 13, + 0, + 13, + 13, + 13, + 13, + 13, + 8, + 13, + 13, + 13, + 13, + 13, + 0, + 5, + 11, + 13, + 13, + 13, + 10, + 4, + 13, + 0, + 13, + 13, + 0, + 0, + 13, + 13, + 7, + 13, + 13, + 0, + 0, + 0, + 13 + ], + "tickvals": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ], + "ticktext": [ + "United States", + "United Arab Emirates", + "Seychelles", + "Pakistan", + "Mali", + "Libya", + "Kuwait", + "Italy", + "Iraq", + "Iran", + "Djibouti", + "Classified", + "Atlantic Ocean", + "Afghanistan" + ] + }, + { + "label": "Owner Service", + "visible": true, + "values": [ + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 2, + 3, + 3, + 3, + 3, + 3, + 2, + 3, + 3, + 3, + 2, + 3, + 3, + 2, + 2, + 3, + 3, + 3, + 2, + 3, + 3, + 3, + 3, + 3, + 2, + 2, + 2, + 3, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 3, + 3, + 2, + 2, + 2, + 3, + 3, + 2, + 3, + 3, + 3, + 2, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 2, + 3, + 3, + 3, + 3, + 3, + 2, + 3, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 2, + 3, + 3, + 3, + 3, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 3, + 2, + 2, + 3, + 3, + 2, + 3, + 3, + 2, + 2, + 3, + 3, + 3, + 2, + 3, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 2, + 3, + 3, + 3, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 2, + 3, + 3, + 3, + 2, + 0, + 3, + 3, + 0, + 3, + 0, + 2, + 2, + 2, + 3, + 3, + 3, + 2, + 2, + 3, + 2, + 2, + 3, + 0, + 3, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 1, + 3, + 3, + 3, + 2, + 2, + 3, + 2, + 2, + 0, + 3, + 3, + 2 + ], + "tickvals": [ + 0, + 1, + 2, + 3 + ], + "ticktext": [ + "Navy", + "Marine Corps", + "Army", + "Air Force" + ] + }, + { + "label": "Drone Make", + "visible": true, + "values": [ + 4, + 5, + 4, + 5, + 4, + 11, + 4, + 4, + 4, + 4, + 11, + 4, + 4, + 4, + 5, + 5, + 4, + 4, + 4, + 8, + 4, + 4, + 5, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 7, + 4, + 4, + 4, + 4, + 3, + 8, + 3, + 4, + 4, + 7, + 4, + 5, + 8, + 8, + 4, + 4, + 5, + 8, + 4, + 4, + 4, + 4, + 4, + 8, + 0, + 8, + 4, + 4, + 8, + 3, + 8, + 4, + 8, + 4, + 4, + 3, + 0, + 8, + 7, + 4, + 4, + 8, + 3, + 4, + 4, + 8, + 0, + 4, + 4, + 4, + 3, + 4, + 4, + 0, + 4, + 3, + 4, + 4, + 3, + 8, + 4, + 8, + 4, + 4, + 4, + 11, + 4, + 3, + 4, + 8, + 4, + 4, + 3, + 4, + 4, + 0, + 4, + 8, + 4, + 8, + 4, + 4, + 8, + 9, + 4, + 4, + 0, + 3, + 4, + 8, + 8, + 4, + 4, + 4, + 8, + 4, + 10, + 4, + 4, + 4, + 5, + 4, + 3, + 4, + 4, + 4, + 1, + 4, + 11, + 3, + 0, + 3, + 2, + 3, + 4, + 4, + 3, + 8, + 4, + 4, + 4, + 0, + 12, + 3, + 3, + 12, + 4, + 11, + 10, + 10, + 10, + 4, + 4, + 4, + 10, + 10, + 4, + 10, + 8, + 3, + 12, + 4, + 8, + 4, + 4, + 3, + 4, + 4, + 4, + 6, + 4, + 5, + 3, + 10, + 0, + 4, + 10, + 10, + 12, + 4, + 3, + 8 + ], + "tickvals": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12 + ], + "ticktext": [ + "Warrior", + "Shadow", + "Sentinel", + "Reaper", + "Predator", + "Phantom", + "K-MAX", + "IGNAT", + "Hunter", + "Hummingbird", + "Gray Eagle", + "Global Hawk", + "Fire Scout" + ] + }, + { + "label": "Drone Type", + "visible": true, + "values": [ + 9, + 14, + 9, + 14, + 9, + 23, + 7, + 8, + 7, + 8, + 23, + 7, + 7, + 8, + 14, + 14, + 7, + 12, + 12, + 18, + 10, + 10, + 14, + 10, + 10, + 10, + 12, + 12, + 12, + 12, + 10, + 17, + 10, + 10, + 7, + 7, + 5, + 18, + 6, + 12, + 12, + 17, + 10, + 14, + 19, + 18, + 10, + 11, + 15, + 18, + 12, + 12, + 11, + 10, + 11, + 19, + 0, + 20, + 11, + 10, + 19, + 5, + 19, + 10, + 20, + 11, + 12, + 5, + 0, + 20, + 17, + 11, + 11, + 19, + 5, + 11, + 11, + 20, + 0, + 11, + 11, + 12, + 5, + 11, + 11, + 1, + 12, + 6, + 11, + 11, + 5, + 19, + 11, + 19, + 11, + 11, + 11, + 23, + 9, + 6, + 11, + 19, + 11, + 11, + 6, + 11, + 11, + 2, + 11, + 19, + 11, + 19, + 11, + 11, + 19, + 21, + 11, + 11, + 2, + 5, + 11, + 19, + 19, + 11, + 11, + 11, + 19, + 11, + 22, + 11, + 11, + 11, + 13, + 11, + 6, + 11, + 11, + 11, + 3, + 11, + 24, + 6, + 2, + 6, + 4, + 5, + 11, + 11, + 6, + 19, + 11, + 11, + 11, + 2, + 25, + 6, + 5, + 25, + 11, + 23, + 22, + 22, + 22, + 11, + 11, + 11, + 22, + 22, + 11, + 22, + 19, + 6, + 25, + 12, + 19, + 11, + 11, + 6, + 11, + 12, + 11, + 16, + 12, + 14, + 6, + 22, + 2, + 11, + 22, + 22, + 25, + 11, + 6, + 19 + ], + "tickvals": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25 + ], + "ticktext": [ + "Warrior RQ-1C", + "Warrior MQ-1C", + "Warrior MQ-1B", + "Shadow RQ-7B", + "Sentinel RQ-170", + "Reaper MQ-9A", + "Reaper MQ-9", + "Predator RQ-1L", + "Predator RQ-1B", + "Predator RQ-1", + "Predator MQ-1L", + "Predator MQ-1B", + "Predator MQ-1", + "Phantom QRF-4C", + "Phantom QF-4E", + "Phantom QF-4", + "K-MAX K-MAX", + "IGNAT RQ-1L", + "Hunter RQ-5A", + "Hunter MQ-5B", + "Hunter MQ-5A", + "Hummingbird A160T Hummingbird", + "Gray Eagle MQ-1C", + "Global Hawk RQ-4A", + "Global Hawk EQ-4B", + "Fire Scout MQ-8B" + ] + }, + { + "label": "Damage USD", + "visible": true, + "values": [ + 0, + 110174900, + 0, + 1523469, + 0, + 40600000, + 3251400, + 3142700, + 3342700, + 1480500, + 40600000, + 0, + 3300000, + 3200000, + 0, + 880000, + 3300000, + 0, + 0, + 0, + 4200000, + 4288000, + 1506500, + 2883977, + 1721973, + 3555536, + 0, + 0, + 0, + 0, + 3579320, + 1000000, + 3792200, + 4359991, + 0, + 0, + 6796497, + 1288861, + 0, + 0, + 0, + 1000000, + 4368400, + 2450000, + 2782012, + 0, + 4700000, + 1436765, + 0, + 0, + 0, + 0, + 4160391, + 3742655, + 1727425, + 0, + 0, + 2584890, + 2210000, + 3828000, + 0, + 0, + 0, + 3828000, + 0, + 3849481, + 0, + 0, + 0, + 0, + 0, + 5000000, + 3828000, + 0, + 0, + 4050000, + 3849481, + 0, + 0, + 3849000, + 4013000, + 0, + 0, + 3738515, + 4670000, + 0, + 0, + 0, + 0, + 4456200, + 3929647, + 2265299, + 4700000, + 3112882, + 543178, + 4698281, + 3900000, + 0, + 0, + 0, + 2780000, + 3112882, + 4960000, + 0, + 0, + 3689468, + 3807680, + 0, + 4588282, + 0, + 3800139, + 0, + 0, + 3742211, + 0, + 5000000, + 988149, + 3900278, + 0, + 10300000, + 3800278, + 0, + 3449950, + 4400000, + 4400000, + 4120000, + 0, + 1357000, + 0, + 2020000, + 4200000, + 4400000, + 2801574, + 2983766, + 0, + 4400000, + 4400000, + 4400000, + 0, + 3844825, + 72800000, + 0, + 389252400, + 0, + 0, + 9643000, + 0, + 0, + 0, + 0, + 4500000, + 396020991, + 4400000, + 0, + 77, + 0, + 8931000, + 77, + 383205318, + 0, + 0, + 0, + 0, + 4476000, + 4600000, + 4414977, + 0, + 0, + 4600000, + 0, + 0, + 9646088, + 14100000, + 0, + 0, + 4688557, + 4735604, + 0, + 0, + 0, + 4511500, + 0, + 4511499, + 4564536, + 0, + 0, + 0, + 5306000, + 0, + 0, + 0, + 0, + 10, + 0 + ] + } + ], + "uid": "2cb165" + } + ]} \ No newline at end of file diff --git a/test/jasmine/tests/sankey_test.js b/test/jasmine/tests/sankey_test.js new file mode 100644 index 00000000000..ddad38620bd --- /dev/null +++ b/test/jasmine/tests/sankey_test.js @@ -0,0 +1,942 @@ +var Plotly = require('@lib/index'); +var Lib = require('@src/lib'); +var d3 = require('d3'); +var Plots = require('@src/plots/plots'); +var Sankey = require('@src/traces/sankey'); +var attributes = require('@src/traces/sankey/attributes'); + +var createGraphDiv = require('../assets/create_graph_div'); +var destroyGraphDiv = require('../assets/destroy_graph_div'); +var hasWebGLSupport = require('../assets/has_webgl_support'); +// var mouseEvent = require('../assets/mouse_event'); + +// mock with two dimensions (one panel); special case, e.g. left and right panel is obv. the same +var mock2 = require('@mocks/sankey_2.json'); + +// mock with one dimension (zero panels); special case, as no panel can be rendered +var mock1 = require('@mocks/sankey_1.json'); + +// mock with zero dimensions; special case, as no dimension can be rendered +var mock0 = Lib.extendDeep({}, mock1); +mock0.data[0].dimensions = []; + +var mock = require('@mocks/sankey_large.json'); + +var lineStart = 30; +var lineCount = 10; + +describe('sankey basic', function() { + + var mock = require('@mocks/sankey_new.json'); + + fit('', function() { + + var gd = createGraphDiv(); + + + mock.data[0].domain = {x: [0, 1], y: [0, 1]}; + var nodes = []; + mock.data[0].nodes = []; + var links = []; + mock.data[0].links = []; + + var dims = mock.data[0].dimensions.slice(1, 4); + + var dim, i, j, s, t; + + for(j = 0; j < dims.length; j++) { + dim = dims[j]; + for(i = 0; i < dim.ticktext.length; i++) { + nodes.push({ + label: dim.ticktext[i], + visible: true + }); + } + } + + var nodeLabels = nodes.map(function(d) {return d.label;}); + + for(i = 0; i < dims[0].values.length; i++) { + + for(j = 1; j < dims.length; j++) { + s = dims[j - 1]; + t = dims[j]; + links.push({ + source: nodeLabels.indexOf(s.ticktext[s.values[i]]), + target: nodeLabels.indexOf(t.ticktext[t.values[i]]), + value: 1 + }); + } + } + + var aggregate = false; + + if(aggregate) { + + var agg = {}, link; + for (i = 0; i < links.length; i++) { + link = links[i]; + if (agg[link.source] == undefined) { + agg[link.source] = {}; + } + if (agg[link.source][link.target] == undefined) { + agg[link.source][link.target] = 0; + } + agg[link.source][link.target] += link.value; + } + + for (i in agg) { + for (j in agg[i]) { + mock.data[0].links.push({ + label: '', + visible: true, + source: i, + target: j, + value: agg[i][j] + }); + } + } + } else { + for (i = 0; i < links.length; i++) { + link = links[i]; + mock.data[0].links.push({ + label: '', + visible: true, + source: link.source, + target: link.target, + value: link.value + }); + } + mock.data[0].links.sort(function(a, b) { + return a.source < b.source + ? -1 + : a.source > b.source + ? 1 + : a.target < b.target + ? -1 + : a.target > b.target + ? 1 + : 0 + }) + } + + mock.data[0].nodes = nodes; + nodes = nodes.map(function(d) {return {name: d.label};}); + links = mock.data[0].links.map(function(d) { + return { + source: nodes[d.source], + target: nodes[d.target], + value: d.value + }; + }); + + Plotly.plot(gd, mock.data, mock.layout); + + }); + +}); + + +describe('sankey initialization tests', function() { + + 'use strict'; + + describe('sankey defaults', function() { + + function _supply(traceIn) { + var traceOut = { visible: true }, + defaultColor = '#444', + layout = { }; + + Sankey.supplyDefaults(traceIn, traceOut, defaultColor, layout); + + return traceOut; + } + + it('\'line\' specification should yield a default color', function() { + var fullTrace = _supply({}); + expect(fullTrace.line.color).toEqual('#444'); + }); + + it('\'colorscale\' should assume a default value if the \'color\' array is specified', function() { + var fullTrace = _supply({ + line: { + color: [35, 63, 21, 42] + }, + dimensions: [ + {values: [321, 534, 542, 674]}, + {values: [562, 124, 942, 189]}, + {values: [287, 183, 385, 884]}, + {values: [113, 489, 731, 454]} + ] + }); + expect(fullTrace.line).toEqual({ + color: [35, 63, 21, 42], + colorscale: attributes.line.colorscale.dflt, + cauto: true, + autocolorscale: false, + reversescale: false, + showscale: false + }); + }); + + it('\'domain\' specification should have a default', function() { + var fullTrace = _supply({}); + expect(fullTrace.domain).toEqual({x: [0, 1], y: [0, 1]}); + }); + + it('\'dimension\' specification should have a default of an empty array', function() { + var fullTrace = _supply({}); + expect(fullTrace.dimensions).toEqual([]); + }); + + it('\'dimension\' should be used with default values where attributes are not provided', function() { + var fullTrace = _supply({ + dimensions: [{ + values: [1], + alienProperty: 'Alpha Centauri' + }] + }); + expect(fullTrace.dimensions).toEqual([{values: [1], visible: true, tickformat: '3s', _index: 0}]); + }); + + it('\'dimension.visible\' should be set to false, and other props just passed through if \'values\' is not provided', function() { + var fullTrace = _supply({ + dimensions: [{ + alienProperty: 'Alpha Centauri' + }] + }); + expect(fullTrace.dimensions).toEqual([{visible: false, values: [], _index: 0}]); + }); + + it('\'dimension.visible\' should be set to false, and other props just passed through if \'values\' is an empty array', function() { + var fullTrace = _supply({ + dimensions: [{ + values: [], + alienProperty: 'Alpha Centauri' + }] + }); + expect(fullTrace.dimensions).toEqual([{visible: false, values: [], _index: 0}]); + }); + + it('\'dimension.visible\' should be set to false, and other props just passed through if \'values\' is not an array', function() { + var fullTrace = _supply({ + dimensions: [{ + values: null, + alienProperty: 'Alpha Centauri' + }] + }); + expect(fullTrace.dimensions).toEqual([{visible: false, values: [], _index: 0}]); + }); + + it('\'dimension.values\' should get truncated to a common shortest length', function() { + var fullTrace = _supply({dimensions: [ + {values: [321, 534, 542, 674]}, + {values: [562, 124, 942]}, + {values: [], visible: true}, + {values: [1, 2], visible: false} // shouldn't be truncated to as false + ]}); + expect(fullTrace.dimensions).toEqual([ + {values: [], visible: true, tickformat: '3s', _index: 0}, + {values: [], visible: true, tickformat: '3s', _index: 1}, + {values: [], visible: true, tickformat: '3s', _index: 2}, + {values: [1, 2], visible: false, _index: 3} + ]); + }); + }); + + describe('sankey calc', function() { + + function _calc(trace) { + var gd = { data: [trace] }; + + Plots.supplyDefaults(gd); + + var fullTrace = gd._fullData[0]; + Sankey.calc(gd, fullTrace); + return fullTrace; + } + + var base = { type: 'sankey' }; + + it('\'colorscale\' should assume a default value if the \'color\' array is specified', function() { + + var fullTrace = _calc(Lib.extendDeep({}, base, { + line: { + color: [35, 63, 21, 42] + }, + dimensions: [ + {values: [321, 534, 542, 674]}, + {values: [562, 124, 942, 189]}, + {values: [287, 183, 385, 884]}, + {values: [113, 489, 731, 454]} + ] + })); + + expect(fullTrace.line).toEqual({ + color: [35, 63, 21, 42], + colorscale: attributes.line.colorscale.dflt, + cauto: true, + cmin: 21, + cmax: 63, + autocolorscale: false, + reversescale: false, + showscale: false + }); + }); + + it('use a singular \'color\' if it is not an array', function() { + + var fullTrace = _calc(Lib.extendDeep({}, base, { + line: { + color: '#444' + }, + dimensions: [ + {values: [321, 534, 542, 674]}, + {values: [562, 124, 942, 189]} + ] + })); + + expect(fullTrace.line).toEqual({ + color: [0.5, 0.5, 0.5, 0.5], + colorscale: [[0, '#444'], [1, '#444']], + cmin: 0, + cmax: 1 + }); + }); + + it('use a singular \'color\' even if a \'colorscale\' is supplied', function() { + + var fullTrace = _calc(Lib.extendDeep({}, base, { + line: { + color: '#444', + colorscale: 'Jet' + }, + dimensions: [ + {values: [321, 534, 542, 674]}, + {values: [562, 124, 942, 189]} + ] + })); + + expect(fullTrace.line).toEqual({ + color: [0.5, 0.5, 0.5, 0.5], + colorscale: [[0, '#444'], [1, '#444']], + autocolorscale: false, + showscale: false, + reversescale: false, + cauto: true, + cmin: 0, + cmax: 1 + }); + }); + }); +}); + +describe('sankey', function() { + + if(!hasWebGLSupport('sankey')) return; + + beforeAll(function() { + mock.data[0].dimensions.forEach(function(d) { + d.values = d.values.slice(lineStart, lineStart + lineCount); + }); + mock.data[0].line.color = mock.data[0].line.color.slice(lineStart, lineStart + lineCount); + }); + + afterEach(destroyGraphDiv); + + describe('edge cases', function() { + + it('Works fine with one panel only', function(done) { + + var mockCopy = Lib.extendDeep({}, mock2); + var gd = createGraphDiv(); + Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { + + expect(gd.data.length).toEqual(1); + expect(gd.data[0].dimensions.length).toEqual(2); + expect(document.querySelectorAll('.axis').length).toEqual(2); + expect(gd.data[0].dimensions[0].visible).not.toBeDefined(); + expect(gd.data[0].dimensions[0].range).not.toBeDefined(); + expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); + expect(gd.data[0].dimensions[0].constraintrange).toEqual([200, 700]); + expect(gd.data[0].dimensions[1].range).toBeDefined(); + expect(gd.data[0].dimensions[1].range).toEqual([0, 700000]); + expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); + + done(); + }); + }); + + it('Do something sensible if there is no panel i.e. dimension count is less than 2', function(done) { + + var mockCopy = Lib.extendDeep({}, mock1); + var gd = createGraphDiv(); + Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { + + expect(gd.data.length).toEqual(1); + expect(gd.data[0].dimensions.length).toEqual(1); + expect(document.querySelectorAll('.axis').length).toEqual(1); // sole axis still shows up + expect(gd.data[0].line.cmin).toEqual(-4000); + expect(gd.data[0].dimensions[0].visible).not.toBeDefined(); + expect(gd.data[0].dimensions[0].range).not.toBeDefined(); + expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); + expect(gd.data[0].dimensions[0].constraintrange).toEqual([200, 700]); + + done(); + }); + }); + + it('Does not error with zero dimensions', function(done) { + + var mockCopy = Lib.extendDeep({}, mock0); + var gd = createGraphDiv(); + + Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { + expect(gd.data.length).toEqual(1); + expect(gd.data[0].dimensions.length).toEqual(0); + expect(document.querySelectorAll('.axis').length).toEqual(0); + done(); + }); + }); + + it('Works with a single line; also, use a longer color array than the number of lines', function(done) { + + var mockCopy = Lib.extendDeep({}, mock2); + var dim, i, j; + + mockCopy.layout.width = 320; + for(i = 0; i < mockCopy.data[0].dimensions.length; i++) { + dim = mockCopy.data[0].dimensions[i]; + delete dim.constraintrange; + dim.range = [1, 2]; + dim.values = []; + for(j = 0; j < 1; j++) { + dim.values[j] = 1 + Math.random(); + } + } + + var gd = createGraphDiv(); + Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { + + expect(gd.data.length).toEqual(1); + expect(gd.data[0].dimensions.length).toEqual(2); + expect(document.querySelectorAll('.axis').length).toEqual(2); + expect(gd.data[0].dimensions[0].values.length).toEqual(1); + done(); + }); + }); + + it('Does not raise an error with zero lines and no specified range', function(done) { + + var mockCopy = Lib.extendDeep({}, mock2); + var dim, i; + + mockCopy.layout.width = 320; + for(i = 0; i < mockCopy.data[0].dimensions.length; i++) { + dim = mockCopy.data[0].dimensions[i]; + delete dim.range; + delete dim.constraintrange; + dim.values = []; + } + + var gd = createGraphDiv(); + Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { + + expect(gd.data.length).toEqual(1); + expect(gd.data[0].dimensions.length).toEqual(2); + expect(document.querySelectorAll('.axis').length).toEqual(0); + expect(gd.data[0].dimensions[0].values.length).toEqual(0); + done(); + }); + }); + + it('Works with non-finite `values` elements', function(done) { + + var mockCopy = Lib.extendDeep({}, mock2); + var dim, i, j; + var values = [[0, 1, 2, 3, 4], [Infinity, NaN, void(0), null, 1]]; + + mockCopy.layout.width = 320; + for(i = 0; i < values.length; i++) { + dim = mockCopy.data[0].dimensions[i]; + delete dim.range; + delete dim.constraintrange; + dim.values = []; + for(j = 0; j < values[0].length; j++) { + dim.values[j] = values[i][j]; + } + } + + var gd = createGraphDiv(); + Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { + + expect(gd.data.length).toEqual(1); + expect(gd.data[0].dimensions.length).toEqual(2); + expect(document.querySelectorAll('.axis').length).toEqual(2); + expect(gd.data[0].dimensions[0].values.length).toEqual(values[0].length); + done(); + }); + }); + + it('Works with 60 dimensions', function(done) { + + var mockCopy = Lib.extendDeep({}, mock1); + var newDimension, i, j; + + mockCopy.layout.width = 1680; + mockCopy.data[0].dimensions = []; + for(i = 0; i < 60; i++) { + newDimension = Lib.extendDeep({}, mock1.data[0].dimensions[0]); + newDimension.id = 'S' + i; + newDimension.label = 'S' + i; + delete newDimension.constraintrange; + newDimension.range = [1, 2]; + newDimension.values = []; + for(j = 0; j < 100; j++) { + newDimension.values[j] = 1 + Math.random(); + } + mockCopy.data[0].dimensions[i] = newDimension; + } + + var gd = createGraphDiv(); + Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { + + expect(gd.data.length).toEqual(1); + expect(gd.data[0].dimensions.length).toEqual(60); + expect(document.querySelectorAll('.axis').length).toEqual(60); + done(); + }); + }); + + it('Truncates dimension values to the shortest array, retaining only 3 lines', function(done) { + + var mockCopy = Lib.extendDeep({}, mock1); + var newDimension, i, j; + + mockCopy.layout.width = 1680; + for(i = 0; i < 60; i++) { + newDimension = Lib.extendDeep({}, mock1.data[0].dimensions[0]); + newDimension.id = 'S' + i; + newDimension.label = 'S' + i; + delete newDimension.constraintrange; + newDimension.range = [0, 999]; + newDimension.values = []; + for(j = 0; j < 65 - i; j++) { + newDimension.values[j] = Math.floor(1000 * Math.random()); + } + mockCopy.data[0].dimensions[i] = newDimension; + } + + var gd = createGraphDiv(); + Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { + + expect(gd.data.length).toEqual(1); + expect(gd.data[0].dimensions.length).toEqual(60); + expect(document.querySelectorAll('.axis').length).toEqual(60); + done(); + }); + }); + + it('Skip dimensions which are not plain objects or whose `values` is not an array', function(done) { + + var mockCopy = Lib.extendDeep({}, mock1); + var newDimension, i, j; + + mockCopy.layout.width = 680; + mockCopy.data[0].dimensions = []; + for(i = 0; i < 5; i++) { + newDimension = Lib.extendDeep({}, mock1.data[0].dimensions[0]); + newDimension.id = 'S' + i; + newDimension.label = 'S' + i; + delete newDimension.constraintrange; + newDimension.range = [1, 2]; + newDimension.values = []; + for(j = 0; j < 100; j++) { + newDimension.values[j] = 1 + Math.random(); + } + mockCopy.data[0].dimensions[i] = newDimension; + } + + mockCopy.data[0].dimensions[0] = 'This is not a plain object'; + mockCopy.data[0].dimensions[1].values = 'This is not an array'; + + var gd = createGraphDiv(); + Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { + + expect(gd.data.length).toEqual(1); + expect(gd.data[0].dimensions.length).toEqual(5); // it's still five, but ... + expect(document.querySelectorAll('.axis').length).toEqual(3); // only 3 axes shown + done(); + }); + }); + + + }); + + describe('basic use', function() { + var mockCopy, + gd; + + beforeEach(function(done) { + mockCopy = Lib.extendDeep({}, mock); + mockCopy.data[0].domain = { + x: [0.1, 0.9], + y: [0.05, 0.85] + }; + gd = createGraphDiv(); + Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(done); + }); + + it('`Plotly.plot` should have proper fields on `gd.data` on initial rendering', function() { + + expect(gd.data.length).toEqual(1); + expect(gd.data[0].dimensions.length).toEqual(11); + expect(document.querySelectorAll('.axis').length).toEqual(10); // one dimension is `visible: false` + expect(gd.data[0].line.cmin).toEqual(-4000); + expect(gd.data[0].dimensions[0].visible).not.toBeDefined(); + expect(gd.data[0].dimensions[4].visible).toEqual(true); + expect(gd.data[0].dimensions[5].visible).toEqual(false); + expect(gd.data[0].dimensions[0].range).not.toBeDefined(); + expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); + expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]); + expect(gd.data[0].dimensions[1].range).toBeDefined(); + expect(gd.data[0].dimensions[1].range).toEqual([0, 700000]); + expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); + + }); + + it('Calling `Plotly.plot` again should add the new sankey', function(done) { + + var reversedMockCopy = Lib.extendDeep({}, mockCopy); + reversedMockCopy.data[0].dimensions = reversedMockCopy.data[0].dimensions.slice().reverse(); + reversedMockCopy.data[0].dimensions.forEach(function(d) {d.id = 'R_' + d.id;}); + reversedMockCopy.data[0].dimensions.forEach(function(d) {d.label = 'R_' + d.label;}); + + Plotly.plot(gd, reversedMockCopy.data, reversedMockCopy.layout).then(function() { + + expect(gd.data.length).toEqual(2); + + expect(gd.data[0].dimensions.length).toEqual(11); + expect(gd.data[0].line.cmin).toEqual(-4000); + expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); + expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]); + expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); + + expect(gd.data[1].dimensions.length).toEqual(11); + expect(gd.data[1].line.cmin).toEqual(-4000); + expect(gd.data[1].dimensions[10].constraintrange).toBeDefined(); + expect(gd.data[1].dimensions[10].constraintrange).toEqual([100000, 150000]); + expect(gd.data[1].dimensions[1].constraintrange).not.toBeDefined(); + + expect(document.querySelectorAll('.axis').length).toEqual(20); // one dimension is `visible: false` + + done(); + }); + + }); + + it('Calling `Plotly.restyle` with a string path should amend the preexisting sankey', function(done) { + + expect(gd.data.length).toEqual(1); + + Plotly.restyle(gd, 'line.colorscale', 'Viridis').then(function() { + + expect(gd.data.length).toEqual(1); + + expect(gd.data[0].line.colorscale).toEqual('Viridis'); + expect(gd.data[0].dimensions.length).toEqual(11); + expect(gd.data[0].line.cmin).toEqual(-4000); + expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); + expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]); + expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); + + done(); + }); + + }); + + it('Calling `Plotly.restyle` for a dimension should amend the preexisting dimension', function(done) { + + function restyleDimension(key, setterValue) { + + // array values need to be wrapped in an array; unwrapping here for value comparison + var value = Lib.isArray(setterValue) ? setterValue[0] : setterValue; + + return function() { + return Plotly.restyle(gd, 'dimensions[2].' + key, setterValue).then(function() { + expect(gd.data[0].dimensions[2][key]).toEqual(value, 'for dimension attribute \'' + key + '\''); + }); + }; + } + + restyleDimension('label', 'new label')() + .then(restyleDimension('tickvals', [[0, 0.1, 0.4, 1, 2]])) + .then(restyleDimension('ticktext', [['alpha', 'gamma', 'beta', 'omega', 'epsilon']])) + .then(restyleDimension('tickformat', '4s')) + .then(restyleDimension('range', [[0, 2]])) + .then(restyleDimension('constraintrange', [[0, 1]])) + .then(restyleDimension('values', [[0, 0.1, 0.4, 1, 2, 0, 0.1, 0.4, 1, 2]])) + .then(restyleDimension('visible', false)) + .then(done); + }); + + it('Calling `Plotly.restyle` with an object should amend the preexisting sankey', function(done) { + + var newStyle = Lib.extendDeep({}, mockCopy.data[0].line); + newStyle.colorscale = 'Viridis'; + newStyle.reversescale = false; + + Plotly.restyle(gd, {line: newStyle}).then(function() { + + expect(gd.data.length).toEqual(1); + + expect(gd.data[0].line.colorscale).toEqual('Viridis'); + expect(gd.data[0].line.reversescale).toEqual(false); + expect(gd.data[0].dimensions.length).toEqual(11); + expect(gd.data[0].line.cmin).toEqual(-4000); + expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); + expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]); + expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); + + done(); + }); + + + }); + + it('Should emit a \'plotly_restyle\' event', function(done) { + + var tester = (function() { + + var eventCalled = false; + + return { + set: function(d) {eventCalled = d;}, + get: function() {return eventCalled;} + }; + })(); + + gd.on('plotly_restyle', function() { + tester.set(true); + }); + + expect(tester.get()).toBe(false); + Plotly.restyle(gd, 'line.colorscale', 'Viridis') + .then(window.setTimeout(function() { + expect(tester.get()).toBe(true); + done(); + }, 0)); + + }); + + it('Calling `Plotly.relayout` with string should amend the preexisting sankey', function(done) { + + expect(gd.layout.width).toEqual(1184); + + Plotly.relayout(gd, 'width', 500).then(function() { + + expect(gd.data.length).toEqual(1); + + expect(gd.layout.width).toEqual(500); + expect(gd.data[0].line.colorscale).toEqual('Jet'); + expect(gd.data[0].dimensions.length).toEqual(11); + expect(gd.data[0].line.cmin).toEqual(-4000); + expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); + expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]); + expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); + + done(); + }); + + }); + + it('Calling `Plotly.relayout`with object should amend the preexisting sankey', function(done) { + + expect(gd.layout.width).toEqual(1184); + + Plotly.relayout(gd, {width: 500}).then(function() { + + expect(gd.data.length).toEqual(1); + + expect(gd.layout.width).toEqual(500); + expect(gd.data[0].line.colorscale).toEqual('Jet'); + expect(gd.data[0].dimensions.length).toEqual(11); + expect(gd.data[0].line.cmin).toEqual(-4000); + expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); + expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]); + expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); + + done(); + }); + + }); + + }); + + describe('Lifecycle methods', function() { + + it('Plotly.deleteTraces with one trace removes the plot', function(done) { + + var gd = createGraphDiv(); + var mockCopy = Lib.extendDeep({}, mock); + + mockCopy.data[0].line.showscale = false; + + Plotly.plot(gd, mockCopy).then(function() { + + expect(gd.data.length).toEqual(1); + + Plotly.deleteTraces(gd, 0).then(function() { + expect(d3.selectAll('.sankey').node()).toEqual(null); + expect(gd.data.length).toEqual(0); + done(); + }); + }); + }); + + it('Plotly.deleteTraces with two traces removes the deleted plot', function(done) { + + var gd = createGraphDiv(); + var mockCopy = Lib.extendDeep({}, mock); + var mockCopy2 = Lib.extendDeep({}, mock); + mockCopy2.data[0].dimensions.splice(3, 4); + mockCopy.data[0].line.showscale = false; + + Plotly.plot(gd, mockCopy) + .then(function() { + expect(gd.data.length).toEqual(1); + expect(document.querySelectorAll('.yAxis').length).toEqual(10); + return Plotly.plot(gd, mockCopy2); + }) + .then(function() { + expect(gd.data.length).toEqual(2); + expect(document.querySelectorAll('.yAxis').length).toEqual(10 + 7); + return Plotly.deleteTraces(gd, [0]); + }) + .then(function() { + expect(document.querySelectorAll('.sankey').length).toEqual(1); + expect(document.querySelectorAll('.yAxis').length).toEqual(7); + expect(gd.data.length).toEqual(1); + return Plotly.deleteTraces(gd, 0); + }) + .then(function() { + expect(document.querySelectorAll('.sankey').length).toEqual(0); + expect(document.querySelectorAll('.yAxis').length).toEqual(0); + expect(gd.data.length).toEqual(0); + done(); + }); + }); + + describe('Having two datasets', function() { + + it('Two subsequent calls to Plotly.plot should create two sankey rows', function(done) { + + var gd = createGraphDiv(); + var mockCopy = Lib.extendDeep({}, mock); + var mockCopy2 = Lib.extendDeep({}, mock); + mockCopy.data[0].domain = {x: [0, 0.45]}; + mockCopy2.data[0].domain = {x: [0.55, 1]}; + mockCopy2.data[0].dimensions.splice(3, 4); + + expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(0); + + Plotly.plot(gd, mockCopy) + .then(function() { + + expect(1).toEqual(1); + expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(1); + expect(gd.data.length).toEqual(1); + + return Plotly.plot(gd, mockCopy2); + }) + .then(function() { + + expect(1).toEqual(1); + expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(2); + expect(gd.data.length).toEqual(2); + + done(); + }); + }); + + it('Plotly.addTraces should add a new sankey row', function(done) { + + var gd = createGraphDiv(); + var mockCopy = Lib.extendDeep({}, mock); + var mockCopy2 = Lib.extendDeep({}, mock); + mockCopy.data[0].domain = {y: [0, 0.35]}; + mockCopy2.data[0].domain = {y: [0.65, 1]}; + mockCopy2.data[0].dimensions.splice(3, 4); + + expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(0); + + Plotly.plot(gd, mockCopy) + .then(function() { + + expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(1); + expect(gd.data.length).toEqual(1); + + return Plotly.addTraces(gd, [mockCopy2.data[0]]); + }) + .then(function() { + + expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(2); + expect(gd.data.length).toEqual(2); + + done(); + }); + + }); + + it('Plotly.restyle should update the existing sankey row', function(done) { + + var gd = createGraphDiv(); + var mockCopy = Lib.extendDeep({}, mock); + var mockCopy2 = Lib.extendDeep({}, mock); + + delete mockCopy.data[0].dimensions[0].constraintrange; + delete mockCopy2.data[0].dimensions[0].constraintrange; + + // in this example, the brush range doesn't change... + mockCopy.data[0].dimensions[2].constraintrange = [0, 2]; + mockCopy2.data[0].dimensions[2].constraintrange = [0, 2]; + + // .. but what's inside the brush does: + function numberUpdater(v) { + switch(v) { + case 0.5: return 2.5; + default: return v; + } + } + + // shuffle around categorical values + mockCopy2.data[0].dimensions[2].ticktext = ['A', 'B', 'Y', 'AB', 'Z']; + mockCopy2.data[0].dimensions[2].tickvals = [0, 1, 2, 2.5, 3]; + mockCopy2.data[0].dimensions[2].values = mockCopy2.data[0].dimensions[2].values.map(numberUpdater); + + expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(0); + + Plotly.plot(gd, mockCopy) + .then(function() { + + expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(1); + expect(gd.data.length).toEqual(1); + + return Plotly.restyle(gd, { + // wrap the `dimensions` array + dimensions: [mockCopy2.data[0].dimensions] + }); + }) + .then(function() { + + expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(1); + expect(gd.data.length).toEqual(1); + + done(); + }); + + }); + }); + }); +}); From e7892fefa895e6995c15900582fccd6a194e0763 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Thu, 13 Apr 2017 23:46:21 +0200 Subject: [PATCH 02/26] PR feedback and other updates to Sankey (cherry picked from commit b48bf7c) --- dist/plotly-sankey.min.js | 28 - lib/index-sankey.js | 17 - package.json | 5 +- src/traces/sankey/attributes.js | 33 +- src/traces/sankey/base_plot.js | 1 - src/traces/sankey/calc.js | 1 - src/traces/sankey/colorbar.js | 2 - src/traces/sankey/constants.js | 4 - src/traces/sankey/defaults.js | 33 +- src/traces/sankey/index.js | 4 +- src/traces/sankey/plot.js | 128 +- src/traces/sankey/render.js | 218 +- tasks/util/constants.js | 2 +- test/image/baselines/energy.png | Bin 0 -> 166152 bytes test/image/baselines/energy_dark.png | Bin 0 -> 179495 bytes test/image/baselines/sankey.png | Bin 53847 -> 0 bytes test/image/baselines/sankey_1.png | Bin 12949 -> 0 bytes test/image/baselines/sankey_2.png | Bin 22568 -> 0 bytes test/image/baselines/sankey_large.png | Bin 55933 -> 0 bytes test/image/mocks/energy.json | 78 +- test/image/mocks/energy_dark.json | 239 + test/image/mocks/sankey.json | 13334 ------------------------ test/image/mocks/sankey_1.json | 28 - test/image/mocks/sankey_2.json | 38 - test/image/mocks/sankey_large.json | 77 - test/image/mocks/sankey_new.json | 2320 ----- test/jasmine/tests/sankey_test.js | 942 -- 27 files changed, 527 insertions(+), 17005 deletions(-) delete mode 100644 dist/plotly-sankey.min.js delete mode 100644 lib/index-sankey.js create mode 100644 test/image/baselines/energy.png create mode 100644 test/image/baselines/energy_dark.png delete mode 100644 test/image/baselines/sankey.png delete mode 100644 test/image/baselines/sankey_1.png delete mode 100644 test/image/baselines/sankey_2.png delete mode 100644 test/image/baselines/sankey_large.png create mode 100644 test/image/mocks/energy_dark.json delete mode 100644 test/image/mocks/sankey.json delete mode 100644 test/image/mocks/sankey_1.json delete mode 100644 test/image/mocks/sankey_2.json delete mode 100644 test/image/mocks/sankey_large.json delete mode 100644 test/image/mocks/sankey_new.json delete mode 100644 test/jasmine/tests/sankey_test.js diff --git a/dist/plotly-sankey.min.js b/dist/plotly-sankey.min.js deleted file mode 100644 index 1f4016a4c30..00000000000 --- a/dist/plotly-sankey.min.js +++ /dev/null @@ -1,28 +0,0 @@ -/** -* plotly.js (sankey - minified) v1.25.2 -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* Licensed under the MIT license -*/ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Plotly=t()}}(function(){var t;return function t(e,n,r){function a(i,l){if(!n[i]){if(!e[i]){var s="function"==typeof require&&require;if(!l&&s)return s(i,!0);if(o)return o(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[i]={exports:{}};e[i][0].call(c.exports,function(t){var n=e[i][1][t];return a(n||t)},c,c.exports,t,e,n,r)}return n[i].exports}for(var o="function"==typeof require&&require,i=0;i0&&(e.y+=n),o=e.y+e.dy+p;if((n=o-p-g[1])>0)for(o=e.y-=n,r=i-2;r>=0;--r)e=t[r],n=e.y+e.dy+p-o,n>0&&(e.y-=n),o=e.y})}function a(t,e){return t.y-e.y}var o=n.nest().key(function(t){return t.x}).sortKeys(e.ascending).entries(v).map(function(t){return t.values});!function(){var t=e.min(o,function(t){return(g[1]-(t.length-1)*p)/e.sum(t,f)});o.forEach(function(e){e.forEach(function(e,n){e.y=n,e.dy=e.value*t})}),m.forEach(function(e){e.dy=e.value*t})}(),r();for(var i=1;t>0;--t)!function(t){function n(t){return c(t.target)*t.value}o.slice().reverse().forEach(function(r){r.forEach(function(r){if(r.sourceLinks.length){var a=e.sum(r.sourceLinks,n)/e.sum(r.sourceLinks,f);r.y+=(a-c(r))*t}})})}(i*=.99),r(),function(t){function n(t){return c(t.source)*t.value}o.forEach(function(r){r.forEach(function(r){if(r.targetLinks.length){var a=e.sum(r.targetLinks,n)/e.sum(r.targetLinks,f);r.y+=(a-c(r))*t}})})}(i),r()}function u(){function t(t,e){return t.source.y-e.source.y||t.originalIndex-e.originalIndex}function e(t,e){return t.target.y-e.target.y||t.originalIndex-e.originalIndex}v.forEach(function(n){n.sourceLinks.sort(e),n.targetLinks.sort(t)}),v.forEach(function(t){var e=0,n=0;t.sourceLinks.forEach(function(t){t.sy=e,e+=t.dy}),t.targetLinks.forEach(function(t){t.ty=n,n+=t.dy})})}function c(t){return t.y+t.dy/2}function f(t){return t.value}var d={},h=24,p=8,g=[1,1],v=[],m=[];return d.nodeWidth=function(t){return arguments.length?(h=+t,d):h},d.nodePadding=function(t){return arguments.length?(p=+t,d):p},d.nodes=function(t){return arguments.length?(v=t,d):v},d.links=function(t){return arguments.length?(m=t,d):m},d.size=function(t){return arguments.length?(g=t,d):g},d.layout=function(e){return t(),a(),o(),s(e),u(),d},d.relayout=function(){return u(),d},d.link=function(){function t(t){var n=t.source.x+t.source.dx,a=t.target.x,o=r.interpolateNumber(n,a),i=o(e),l=o(1-e),s=t.source.y+t.sy+t.dy/2,u=t.target.y+t.ty+t.dy/2;return"M"+n+","+s+"C"+i+","+s+" "+l+","+u+" "+a+","+u}var e=.5;return t.curvature=function(n){return arguments.length?(e=+n,t):e},t},d};t.sankey=a,Object.defineProperty(t,"__esModule",{value:!0})})},{"d3-array":7,"d3-collection":8,"d3-interpolate":12}],7:[function(e,n,r){!function(e,a){"object"==typeof r&&void 0!==n?a(r):"function"==typeof t&&t.amd?t(["exports"],a):a(e.d3=e.d3||{})}(this,function(t){"use strict";function e(t){return function(e,n){return o(t(e),n)}}function n(t,e){return[t,e]}function r(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/a;return o>=k?a*=10:o>=M?a*=5:o>=A&&(a*=2),ee?1:t>=e?0:NaN},i=function(t){return 1===t.length&&(t=e(t)),{left:function(e,n,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;t(e[o],n)<0?r=o+1:a=o}return r},right:function(e,n,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;t(e[o],n)>0?a=o:r=o+1}return r}}},l=i(o),s=l.right,u=l.left,c=function(t,e){null==e&&(e=n);for(var r=0,a=t.length-1,o=t[0],i=new Array(a<0?0:a);rt?1:e>=t?0:NaN},h=function(t){return null===t?NaN:+t},p=function(t,e){var n,r,a=t.length,o=0,i=0,l=-1,s=0;if(null==e)for(;++l1)return i/(s-1)},g=function(t,e){var n=p(t,e);return n?Math.sqrt(n):n},v=function(t,e){var n,r,a,o=-1,i=t.length;if(null==e){for(;++o=r){n=a=r;break}for(;++or&&(n=r),a=r){n=a=r;break}for(;++or&&(n=r),a=f;)d.pop(),--h;var p,g=new Array(h+1);for(a=0;a<=h;++a)p=g[a]=[],p.x0=a>0?d[a-1]:c,p.x1=a=1)return+n(t[r-1],r-1,t);var r,a=(r-1)*e,o=Math.floor(a),i=+n(t[o],o,t);return i+(+n(t[o+1],o+1,t)-i)*(a-o)}},S=function(t,e,n){return t=x.call(t,h).sort(o),Math.ceil((n-e)/(2*(z(t,.75)-z(t,.25))*Math.pow(t.length,-1/3)))},O=function(t,e,n){return Math.ceil((n-e)/(3.5*g(t)*Math.pow(t.length,-1/3)))},N=function(t,e){var n,r,a=-1,o=t.length;if(null==e){for(;++a=r){n=r;break}for(;++an&&(n=r)}else{for(;++a=r){n=r;break}for(;++an&&(n=r)}return n},D=function(t,e){var n,r=0,a=t.length,o=-1,i=a;if(null==e)for(;++o=0;)for(r=t[a],e=r.length;--e>=0;)n[--i]=r[e];return n},R=function(t,e){var n,r,a=-1,o=t.length;if(null==e){for(;++a=r){n=r;break}for(;++ar&&(n=r)}else{for(;++a=r){n=r;break}for(;++ar&&(n=r)}return n},I=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},j=function(t,e){if(n=t.length){var n,r,a=0,i=0,l=t[i];for(e||(e=o);++a=c.length)return null!=s?s(e):null!=l?e.sort(l):e;for(var i,u,f,d=-1,h=e.length,p=c[r++],g=n(),v=a();++dc.length)return t;var r,a=f[n-1];return null!=s&&n>=c.length?r=t.entries():(r=[],t.each(function(t,a){r.push({key:a,values:e(t,n)})})),null!=a?r.sort(function(t,e){return a(t.key,e.key)}):r}var l,s,u,c=[],f=[];return u={object:function(e){return t(e,0,r,a)},map:function(e){return t(e,0,o,i)},entries:function(n){return e(t(n,0,o,i),0)},key:function(t){return c.push(t),u},sortKeys:function(t){return f[c.length-1]=t,u},sortValues:function(t){return l=t,u},rollup:function(t){return s=t,u}}},c=n.prototype;l.prototype=s.prototype={constructor:l,has:c.has,add:function(t){return t+="",this["$"+t]=t,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};var f=function(t){var e=[];for(var n in t)e.push(n);return e},d=function(t){var e=[];for(var n in t)e.push(t[n]);return e},h=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e};t.nest=u,t.set=s,t.map=n,t.keys=f,t.values=d,t.entries=h,Object.defineProperty(t,"__esModule",{value:!0})})},{}],9:[function(e,n,r){!function(e,a){"object"==typeof r&&void 0!==n?a(r):"function"==typeof t&&t.amd?t(["exports"],a):a(e.d3=e.d3||{})}(this,function(t){"use strict";function e(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function n(){}function r(t){var e;return t=(t+"").trim().toLowerCase(),(e=O.exec(t))?(e=parseInt(e[1],16),new s(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=N.exec(t))?a(parseInt(e[1],16)):(e=D.exec(t))?new s(e[1],e[2],e[3],1):(e=P.exec(t))?new s(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=E.exec(t))?o(e[1],e[2],e[3],e[4]):(e=R.exec(t))?o(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=I.exec(t))?u(e[1],e[2]/100,e[3]/100,1):(e=j.exec(t))?u(e[1],e[2]/100,e[3]/100,e[4]):F.hasOwnProperty(t)?a(F[t]):"transparent"===t?new s(NaN,NaN,NaN,0):null}function a(t){return new s(t>>16&255,t>>8&255,255&t,1)}function o(t,e,n,r){return r<=0&&(t=e=n=NaN),new s(t,e,n,r)}function i(t){return t instanceof n||(t=r(t)),t?(t=t.rgb(),new s(t.r,t.g,t.b,t.opacity)):new s}function l(t,e,n,r){return 1===arguments.length?i(t):new s(t,e,n,null==r?1:r)}function s(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function u(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new d(t,e,n,r)}function c(t){if(t instanceof d)return new d(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=r(t)),!t)return new d;if(t instanceof d)return t;t=t.rgb();var e=t.r/255,a=t.g/255,o=t.b/255,i=Math.min(e,a,o),l=Math.max(e,a,o),s=NaN,u=l-i,c=(l+i)/2;return u?(s=e===l?(a-o)/u+6*(a0&&c<1?0:s,new d(s,u,c,t.opacity)}function f(t,e,n,r){return 1===arguments.length?c(t):new d(t,e,n,null==r?1:r)}function d(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function h(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function p(t){if(t instanceof v)return new v(t.l,t.a,t.b,t.opacity);if(t instanceof k){var e=t.h*q;return new v(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof s||(t=i(t));var n=b(t.r),r=b(t.g),a=b(t.b),o=m((.4124564*n+.3575761*r+.1804375*a)/H),l=m((.2126729*n+.7151522*r+.072175*a)/V);return new v(116*l-16,500*(o-l),200*(l-m((.0193339*n+.119192*r+.9503041*a)/X)),t.opacity)}function g(t,e,n,r){return 1===arguments.length?p(t):new v(t,e,n,null==r?1:r)}function v(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function m(t){return t>Z?Math.pow(t,1/3):t/G+U}function y(t){return t>Y?t*t*t:G*(t-U)}function x(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function b(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function _(t){if(t instanceof k)return new k(t.h,t.c,t.l,t.opacity);t instanceof v||(t=p(t));var e=Math.atan2(t.b,t.a)*B;return new k(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function w(t,e,n,r){return 1===arguments.length?_(t):new k(t,e,n,null==r?1:r)}function k(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function M(t){if(t instanceof T)return new T(t.h,t.s,t.l,t.opacity);t instanceof s||(t=i(t));var e=t.r/255,n=t.g/255,r=t.b/255,a=(nt*r+tt*e-et*n)/(nt+tt-et),o=r-a,l=(K*(n-a)-Q*o)/J,u=Math.sqrt(l*l+o*o)/(K*a*(1-a)),c=u?Math.atan2(l,o)*B-120:NaN;return new T(c<0?c+360:c,u,a,t.opacity)}function A(t,e,n,r){return 1===arguments.length?M(t):new T(t,e,n,null==r?1:r)}function T(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}var L=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t},C="\\s*([+-]?\\d+)\\s*",z="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",S="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",O=/^#([0-9a-f]{3})$/,N=/^#([0-9a-f]{6})$/,D=new RegExp("^rgb\\("+[C,C,C]+"\\)$"),P=new RegExp("^rgb\\("+[S,S,S]+"\\)$"),E=new RegExp("^rgba\\("+[C,C,C,z]+"\\)$"),R=new RegExp("^rgba\\("+[S,S,S,z]+"\\)$"),I=new RegExp("^hsl\\("+[z,S,S]+"\\)$"),j=new RegExp("^hsla\\("+[z,S,S,z]+"\\)$"),F={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};L(n,r,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),L(s,l,e(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new s(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new s(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),L(d,f,e(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new d(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new d(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,a=2*n-r;return new s(h(t>=240?t-240:t+120,a,r),h(t,a,r),h(t<120?t+240:t-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var q=Math.PI/180,B=180/Math.PI,H=.95047,V=1,X=1.08883,U=4/29,Y=6/29,G=3*Y*Y,Z=Y*Y*Y;L(v,g,e(n,{brighter:function(t){return new v(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new v(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=V*y(t),e=H*y(e),n=X*y(n),new s(x(3.2404542*e-1.5371385*t-.4985314*n),x(-.969266*e+1.8760108*t+.041556*n),x(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),L(k,w,e(n,{brighter:function(t){ -return new k(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new k(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return p(this).rgb()}}));var W=-.14861,$=1.78277,Q=-.29227,J=-.90649,K=1.97294,tt=K*J,et=K*$,nt=$*Q-J*W;L(T,A,e(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new T(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new T(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*q,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),a=Math.sin(t);return new s(255*(e+n*(W*r+$*a)),255*(e+n*(Q*r+J*a)),255*(e+n*(K*r)),this.opacity)}})),t.color=r,t.rgb=l,t.hsl=f,t.lab=g,t.hcl=w,t.cubehelix=A,Object.defineProperty(t,"__esModule",{value:!0})})},{}],10:[function(e,n,r){!function(e,a){"object"==typeof r&&void 0!==n?a(r):"function"==typeof t&&t.amd?t(["exports"],a):a(e.d3=e.d3||{})}(this,function(t){"use strict";function e(){for(var t,e=0,r=arguments.length,a={};e=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function a(t,e){for(var n,r=0,a=t.length;r0)for(var n,r,a=new Array(n),o=0;od+l||rp+l||af.index){var s=d-o.x-o.vx,c=p-o.y-o.vy,m=s*s+c*c;mt.r&&(t.r=t[e].r)}function a(){if(l){var e,n,r=l.length;for(s=new Array(r),e=0;e1?(null==e?p.remove(t):p.set(t,l(e)),s):p.get(t)},find:function(e,n,r){var a,o,i,l,s,u=0,c=t.length;for(null==r?r=1/0:r*=r,u=0;u1?(y.on(t,e),s):y.on(t)}}},x=function(){function t(t){var n,s=o.length,f=e.quadtree(o,u,c).visitAfter(r);for(l=t,n=0;n=g)){(t.data!==i||t.next)&&(0===a&&(a=h(),c+=a*a),0===o&&(o=h(),c+=o*o),c180||n<-180?n-360*Math.round(n/360):n):L(isNaN(t)?e:t)}function i(t){return 1==(t=+t)?l:function(e,n){return n-e?a(e,n,t):L(isNaN(e)?n:e)}}function l(t,e){var n=e-t;return n?r(t,n):L(isNaN(t)?e:t)}function s(t){return function(n){var r,a,o=n.length,i=new Array(o),l=new Array(o),s=new Array(o);for(r=0;r180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(a(n)+"rotate(",null,r)-2,x:D(t,e)})):e&&n.push(a(n)+"rotate("+e+r)}function l(t,e,n,o){t!==e?o.push({i:n.push(a(n)+"skewX(",null,r)-2,x:D(t,e)}):e&&n.push(a(n)+"skewX("+e+r)}function s(t,e,n,r,o,i){if(t!==n||e!==r){var l=o.push(a(o)+"scale(",null,",",null,")");i.push({i:l-4,x:D(t,n)},{i:l-2,x:D(e,r)})}else 1===n&&1===r||o.push(a(o)+"scale("+n+","+r+")")}return function(e,n){var r=[],a=[];return e=t(e),n=t(n),o(e.translateX,e.translateY,n.translateX,n.translateY,r,a),i(e.rotate,n.rotate,r,a),l(e.skewX,n.skewX,r,a),s(e.scaleX,e.scaleY,n.scaleX,n.scaleY,r,a),e=n=null,function(t){for(var e,n=-1,o=a.length;++n=1?(r=1,e-1):Math.floor(r*e),o=t[a],i=t[a+1],l=a>0?t[a-1]:2*o-i,s=ao&&(a=e.slice(o,a),l[i]?l[i]+=a:l[++i]=a),(n=n[0])===(r=r[0])?l[i]?l[i]+=r:l[++i]=r:(l[++i]=null,s.push({i:i,x:D(n,r)})),o=R.lastIndex;return o=(o=(g+m)/2))?g=o:m=o,(c=n>=(i=(v+y)/2))?v=i:y=i,a=h,!(h=h[f=c<<1|u]))return a[f]=p,t;if(l=+t._x.call(null,h.data),s=+t._y.call(null,h.data),e===l&&n===s)return p.next=h,a?a[f]=p:t._root=p,t;do{a=a?a[f]=new Array(4):t._root=new Array(4),(u=e>=(o=(g+m)/2))?g=o:m=o,(c=n>=(i=(v+y)/2))?v=i:y=i}while((f=c<<1|u)==(d=(s>=i)<<1|l>=o));return a[d]=h,a[f]=p,t}function n(t){var n,r,a,o,i=t.length,l=new Array(i),s=new Array(i),u=1/0,c=1/0,f=-1/0,d=-1/0;for(r=0;rf&&(f=a),od&&(d=o));for(ft||t>a||r>e||e>o))return this;var i,l,s=a-n,u=this._root;switch(l=(e<(r+o)/2)<<1|t<(n+a)/2){case 0:do{i=new Array(4),i[l]=u,u=i}while(s*=2,a=n+s,o=r+s,t>a||e>o);break;case 1:do{i=new Array(4),i[l]=u,u=i}while(s*=2,n=a-s,o=r+s,n>t||e>o);break;case 2:do{i=new Array(4),i[l]=u,u=i}while(s*=2,a=n+s,r=o-s,t>a||r>e);break;case 3:do{i=new Array(4),i[l]=u,u=i}while(s*=2,n=a-s,r=o-s,n>t||r>e)}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=a,this._y1=o,this},f=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},d=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},h=function(t,e,n,r,a){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=a},p=function(t,e,n){var r,a,o,i,l,s,u,c=this._x0,f=this._y0,d=this._x1,p=this._y1,g=[],v=this._root;for(v&&g.push(new h(v,c,f,d,p)),null==n?n=1/0:(c=t-n,f=e-n,d=t+n,p=e+n,n*=n);s=g.pop();)if(!(!(v=s.node)||(a=s.x0)>d||(o=s.y0)>p||(i=s.x1)=y)<<1|t>=m)&&(s=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=s)}else{var x=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=x*x+b*b;if(_=(l=(p+v)/2))?p=l:v=l,(c=i>=(s=(g+m)/2))?g=s:m=s,e=h,!(h=h[f=c<<1|u]))return this;if(!h.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,d=f)}for(;h.data!==t;)if(r=h,!(h=h.next))return this;return(a=h.next)&&delete h.next,r?(a?r.next=a:delete r.next,this):e?(a?e[f]=a:delete e[f],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[d]=h:this._root=h),this):(this._root=a,this)},v=function(){return this._root},m=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},y=function(t){var e,n,r,a,o,i,l=[],s=this._root;for(s&&l.push(new h(s,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(s=e.node,r=e.x0,a=e.y0,o=e.x1,i=e.y1)&&s.length){var u=(r+o)/2,c=(a+i)/2;(n=s[3])&&l.push(new h(n,u,c,o,i)),(n=s[2])&&l.push(new h(n,r,c,u,i)),(n=s[1])&&l.push(new h(n,u,a,o,c)),(n=s[0])&&l.push(new h(n,r,a,u,c))}return this},x=function(t){var e,n=[],r=[];for(this._root&&n.push(new h(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var a=e.node;if(a.length){var o,i=e.x0,l=e.y0,s=e.x1,u=e.y1,c=(i+s)/2,f=(l+u)/2;(o=a[0])&&n.push(new h(o,i,l,c,f)),(o=a[1])&&n.push(new h(o,c,l,s,f)),(o=a[2])&&n.push(new h(o,i,f,c,u)),(o=a[3])&&n.push(new h(o,c,f,s,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},b=function(t){return arguments.length?(this._x=t,this):this._x},_=function(t){return arguments.length?(this._y=t,this):this._y},w=i.prototype=l.prototype;w.copy=function(){var t,e,n=new l(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=s(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var a=0;a<4;++a)(e=r.source[a])&&(e.length?t.push({source:e,target:r.target[a]=new Array(4)}):r.target[a]=s(e));return n},w.add=u,w.addAll=n,w.cover=c,w.data=f,w.extent=d,w.find=p,w.remove=g,w.removeAll=r,w.root=v,w.size=m,w.visit=y,w.visitAfter=x,w.x=b,w.y=_,t.quadtree=i,Object.defineProperty(t,"__esModule",{value:!0})})},{}],14:[function(e,n,r){!function(e,a){"object"==typeof r&&void 0!==n?a(r):"function"==typeof t&&t.amd?t(["exports"],a):a(e.d3=e.d3||{})}(this,function(t){"use strict";function e(){return m||(b(n),m=x.now()+y)}function n(){m=0}function r(){this._call=this._time=this._next=null}function a(t,e,n){var a=new r;return a.restart(t,e,n),a}function o(){e(),++d;for(var t,n=c;n;)(t=m-n._time)>=0&&n._call.call(null,t),n=n._next;--d}function i(){m=(v=x.now())+y,d=h=0;try{o()}finally{d=0,s(),m=0}}function l(){var t=x.now(),e=t-v;e>g&&(y-=e,v=t)}function s(){for(var t,e,n=c,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:c=e);f=t,u(r)}function u(t){if(!d){h&&(h=clearTimeout(h));var e=t-m;e>24?(t<1/0&&(h=setTimeout(i,e)),p&&(p=clearInterval(p))):(p||(v=m,p=setInterval(l,g)),d=1,b(i))}}var c,f,d=0,h=0,p=0,g=1e3,v=0,m=0,y=0,x="object"==typeof performance&&performance.now?performance:Date,b="function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){setTimeout(t,17)};r.prototype=a.prototype={constructor:r,restart:function(t,n,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?e():+r)+(null==n?0:+n),this._next||f===this||(f?f._next=this:c=this,f=this),this._call=t,this._time=r,u()},stop:function(){this._call&&(this._call=null,this._time=1/0,u())}};var _=function(t,e,n){var a=new r;return e=null==e?0:+e,a.restart(function(n){a.stop(),t(n+e)},e,n),a},w=function(t,n,a){var o=new r,i=n;return null==n?(o.restart(t,n,a),o):(n=+n,a=null==a?e():+a,o.restart(function e(r){r+=i,o.restart(e,i+=n,a),t(r)},n,a),o)};t.now=e,t.timer=a,t.timerFlush=o,t.timeout=_,t.interval=w,Object.defineProperty(t,"__esModule",{value:!0})})},{}],15:[function(e,n,r){!function(){function e(t){return t&&(t.ownerDocument||t.document||t).documentElement}function r(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function a(t,e){return te?1:t>=e?0:NaN}function o(t){return null===t?NaN:+t}function i(t){return!isNaN(t)}function l(t){return{left:function(e,n,r,a){for(arguments.length<3&&(r=0),arguments.length<4&&(a=e.length);r>>1;t(e[o],n)<0?r=o+1:a=o}return r},right:function(e,n,r,a){for(arguments.length<3&&(r=0),arguments.length<4&&(a=e.length);r>>1;t(e[o],n)>0?a=o:r=o+1}return r}}}function s(t){return t.length}function u(t){for(var e=1;t*e%1;)e*=10;return e}function c(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function f(){this._=Object.create(null)}function d(t){return(t+="")===_i||t[0]===wi?wi+t:t}function h(t){return(t+="")[0]===wi?t.slice(1):t}function p(t){return d(t)in this._}function g(t){return(t=d(t))in this._&&delete this._[t]}function v(){var t=[];for(var e in this._)t.push(h(e));return t}function m(){var t=0;for(var e in this._)++t;return t}function y(){for(var t in this._)return!1;return!0}function x(){this._=Object.create(null)}function b(t){return t}function _(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function w(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=ki.length;n=e&&(e=a+1);!(i=l[e])&&++e0&&(t=t.slice(0,l));var u=Di.get(t);return u&&(t=u,s=$),l?e?a:r:e?k:o}function W(t,e){return function(n){var r=ci.event;ci.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{ci.event=r}}}function $(t,e){var n=W(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}function Q(t){var n=".dragsuppress-"+ ++Ei,a="click"+n,o=ci.select(r(t)).on("touchmove"+n,T).on("dragstart"+n,T).on("selectstart"+n,T);if(null==Pi&&(Pi=!("onselectstart"in t)&&w(t.style,"userSelect")),Pi){var i=e(t).style,l=i[Pi];i[Pi]="none"}return function(t){if(o.on(n,null),Pi&&(i[Pi]=l),t){var e=function(){o.on(a,null)};o.on(a,function(){T(),e()},!0),setTimeout(e,0)}}}function J(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var a=n.createSVGPoint();if(Ri<0){var o=r(t);if(o.scrollX||o.scrollY){n=ci.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=n[0][0].getScreenCTM();Ri=!(i.f||i.e),n.remove()}}return Ri?(a.x=e.pageX,a.y=e.pageY):(a.x=e.clientX,a.y=e.clientY),a=a.matrixTransform(t.getScreenCTM().inverse()),[a.x,a.y]}var l=t.getBoundingClientRect();return[e.clientX-l.left-t.clientLeft,e.clientY-l.top-t.clientTop]}function K(){return ci.event.changedTouches[0].identifier}function tt(t){return t>0?1:t<0?-1:0}function et(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function nt(t){return t>1?0:t<-1?Fi:Math.acos(t)}function rt(t){return t>1?Hi:t<-1?-Hi:Math.asin(t)}function at(t){return((t=Math.exp(t))-1/t)/2}function ot(t){return((t=Math.exp(t))+1/t)/2}function it(t){return((t=Math.exp(2*t))-1)/(t+1)}function lt(t){return(t=Math.sin(t/2))*t}function st(){}function ut(t,e,n){return this instanceof ut?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof ut?new ut(t.h,t.s,t.l):kt(""+t,Mt,ut):new ut(t,e,n)}function ct(t,e,n){function r(t){return t>360?t-=360:t<0&&(t+=360),t<60?o+(i-o)*t/60:t<180?i:t<240?o+(i-o)*(240-t)/60:o}function a(t){return Math.round(255*r(t))}var o,i;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,n=n<0?0:n>1?1:n,i=n<=.5?n*(1+e):n+e-n*e,o=2*n-i,new xt(a(t+120),a(t),a(t-120))}function ft(t,e,n){return this instanceof ft?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof ft?new ft(t.h,t.c,t.l):t instanceof ht?gt(t.l,t.a,t.b):gt((t=At((t=ci.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ft(t,e,n)}function dt(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new ht(n,Math.cos(t*=Vi)*e,Math.sin(t)*e)}function ht(t,e,n){return this instanceof ht?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof ht?new ht(t.l,t.a,t.b):t instanceof ft?dt(t.h,t.c,t.l):At((t=xt(t)).r,t.g,t.b):new ht(t,e,n)}function pt(t,e,n){var r=(t+16)/116,a=r+e/500,o=r-n/200;return a=vt(a)*Ji,r=vt(r)*Ki,o=vt(o)*tl,new xt(yt(3.2404542*a-1.5371385*r-.4985314*o),yt(-.969266*a+1.8760108*r+.041556*o),yt(.0556434*a-.2040259*r+1.0572252*o))}function gt(t,e,n){ -return t>0?new ft(Math.atan2(n,e)*Xi,Math.sqrt(e*e+n*n),t):new ft(NaN,NaN,t)}function vt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function mt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function yt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function xt(t,e,n){return this instanceof xt?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof xt?new xt(t.r,t.g,t.b):kt(""+t,xt,ct):new xt(t,e,n)}function bt(t){return new xt(t>>16,t>>8&255,255&t)}function _t(t){return bt(t)+""}function wt(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function kt(t,e,n){var r,a,o,i=0,l=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(a=r[2].split(","),r[1]){case"hsl":return n(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return e(Lt(a[0]),Lt(a[1]),Lt(a[2]))}return(o=rl.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(i=(3840&o)>>4,i|=i>>4,l=240&o,l|=l>>4,s=15&o,s|=s<<4):7===t.length&&(i=(16711680&o)>>16,l=(65280&o)>>8,s=255&o)),e(i,l,s))}function Mt(t,e,n){var r,a,o=Math.min(t/=255,e/=255,n/=255),i=Math.max(t,e,n),l=i-o,s=(i+o)/2;return l?(a=s<.5?l/(i+o):l/(2-i-o),r=t==i?(e-n)/l+(e0&&s<1?0:r),new ut(r,a,s)}function At(t,e,n){t=Tt(t),e=Tt(e),n=Tt(n);var r=mt((.4124564*t+.3575761*e+.1804375*n)/Ji),a=mt((.2126729*t+.7151522*e+.072175*n)/Ki);return ht(116*a-16,500*(r-a),200*(a-mt((.0193339*t+.119192*e+.9503041*n)/tl)))}function Tt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Lt(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Ct(t){return"function"==typeof t?t:function(){return t}}function zt(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),St(e,n,t,r)}}function St(t,e,n,r){function a(){var t,e=s.status;if(!e&&Nt(s)||e>=200&&e<300||304===e){try{t=n.call(o,s)}catch(t){return void i.error.call(o,t)}i.load.call(o,t)}else i.error.call(o,s)}var o={},i=ci.dispatch("beforesend","progress","load","error"),l={},s=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=a:s.onreadystatechange=function(){s.readyState>3&&a()},s.onprogress=function(t){var e=ci.event;ci.event=t;try{i.progress.call(o,s)}finally{ci.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return n=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(di(arguments)))}}),o.send=function(n,r,a){if(2===arguments.length&&"function"==typeof r&&(a=r,r=null),s.open(n,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),s.setRequestHeader)for(var c in l)s.setRequestHeader(c,l[c]);return null!=e&&s.overrideMimeType&&s.overrideMimeType(e),null!=u&&(s.responseType=u),null!=a&&o.on("error",a).on("load",function(t){a(null,t)}),i.beforesend.call(o,s),s.send(null==r?null:r),o},o.abort=function(){return s.abort(),o},ci.rebind(o,i,"on"),null==r?o:o.get(Ot(r))}function Ot(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function Nt(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Dt(t,e,n){var r=arguments.length;r<2&&(e=0),r<3&&(n=Date.now());var a=n+e,o={c:t,t:a,n:null};return ol?ol.n=o:al=o,ol=o,il||(ll=clearTimeout(ll),il=1,sl(Pt)),o}function Pt(){var t=Et(),e=Rt()-t;e>24?(isFinite(e)&&(clearTimeout(ll),ll=setTimeout(Pt,e)),il=0):(il=1,sl(Pt))}function Et(){for(var t=Date.now(),e=al;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Rt(){for(var t,e=al,n=1/0;e;)e.c?(e.t8?function(t){return t/n}:function(t){return t*n},symbol:t}}function Ft(t){var e=t.decimal,n=t.thousands,r=t.grouping,a=t.currency,o=r&&n?function(t,e){for(var a=t.length,o=[],i=0,l=r[0],s=0;a>0&&l>0&&(s+l+1>e&&(l=Math.max(1,e-s)),o.push(t.substring(a-=l,a+l)),!((s+=l+1)>e));)l=r[i=(i+1)%r.length];return o.reverse().join(n)}:b;return function(t){var n=cl.exec(t),r=n[1]||" ",i=n[2]||">",l=n[3]||"-",s=n[4]||"",u=n[5],c=+n[6],f=n[7],d=n[8],h=n[9],p=1,g="",v="",m=!1,y=!0;switch(d&&(d=+d.substring(1)),(u||"0"===r&&"="===i)&&(u=r="0",i="="),h){case"n":f=!0,h="g";break;case"%":p=100,v="%",h="f";break;case"p":p=100,v="%",h="r";break;case"b":case"o":case"x":case"X":"#"===s&&(g="0"+h.toLowerCase());case"c":y=!1;case"d":m=!0,d=0;break;case"s":p=-1,h="r"}"$"===s&&(g=a[0],v=a[1]),"r"!=h||d||(h="g"),null!=d&&("g"==h?d=Math.max(1,Math.min(21,d)):"e"!=h&&"f"!=h||(d=Math.max(0,Math.min(20,d)))),h=fl.get(h)||qt;var x=u&&f;return function(t){var n=v;if(m&&t%1)return"";var a=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===l?"":l;if(p<0){var s=ci.formatPrefix(t,d);t=s.scale(t),n=s.symbol+v}else t*=p;t=h(t,d);var b,_,w=t.lastIndexOf(".");if(w<0){var k=y?t.lastIndexOf("e"):-1;k<0?(b=t,_=""):(b=t.substring(0,k),_=t.substring(k))}else b=t.substring(0,w),_=e+t.substring(w+1);!u&&f&&(b=o(b,1/0));var M=g.length+b.length+_.length+(x?0:a.length),A=M"===i?A+a+t:"^"===i?A.substring(0,M>>=1)+a+t+A.substring(M):a+(x?t:A+t))+n}}}function qt(t){return t+""}function Bt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(t,e,n){function r(e){var n=t(e),r=o(n,1);return e-n1)for(;i=u)return-1;if(37===(a=e.charCodeAt(l++))){if(i=e.charAt(l++),!(o=z[i in gl?e.charAt(l++):i])||(r=o(t,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}function r(t,e,n){w.lastIndex=0;var r=w.exec(e.slice(n));return r?(t.w=k.get(r[0].toLowerCase()),n+r[0].length):-1}function a(t,e,n){b.lastIndex=0;var r=b.exec(e.slice(n));return r?(t.w=_.get(r[0].toLowerCase()),n+r[0].length):-1}function o(t,e,n){T.lastIndex=0;var r=T.exec(e.slice(n));return r?(t.m=L.get(r[0].toLowerCase()),n+r[0].length):-1}function i(t,e,n){M.lastIndex=0;var r=M.exec(e.slice(n));return r?(t.m=A.get(r[0].toLowerCase()),n+r[0].length):-1}function l(t,e,r){return n(t,C.c.toString(),e,r)}function s(t,e,r){return n(t,C.x.toString(),e,r)}function u(t,e,r){return n(t,C.X.toString(),e,r)}function c(t,e,n){var r=x.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)}var f=t.dateTime,d=t.date,h=t.time,p=t.periods,g=t.days,v=t.shortDays,m=t.months,y=t.shortMonths;e.utc=function(t){function n(t){try{hl=Bt;var e=new hl;return e._=t,r(e)}finally{hl=Date}}var r=e(t);return n.parse=function(t){try{hl=Bt;var e=r.parse(t);return e&&e._}finally{hl=Date}},n.toString=r.toString,n},e.multi=e.utc.multi=ce;var x=ci.map(),b=Yt(g),_=Gt(g),w=Yt(v),k=Gt(v),M=Yt(m),A=Gt(m),T=Yt(y),L=Gt(y);p.forEach(function(t,e){x.set(t.toLowerCase(),e)});var C={a:function(t){return v[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return m[t.getMonth()]},c:e(f),d:function(t,e){return Ut(t.getDate(),e,2)},e:function(t,e){return Ut(t.getDate(),e,2)},H:function(t,e){return Ut(t.getHours(),e,2)},I:function(t,e){return Ut(t.getHours()%12||12,e,2)},j:function(t,e){return Ut(1+dl.dayOfYear(t),e,3)},L:function(t,e){return Ut(t.getMilliseconds(),e,3)},m:function(t,e){return Ut(t.getMonth()+1,e,2)},M:function(t,e){return Ut(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Ut(t.getSeconds(),e,2)},U:function(t,e){return Ut(dl.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ut(dl.mondayOfYear(t),e,2)},x:e(d),X:e(h),y:function(t,e){return Ut(t.getFullYear()%100,e,2)},Y:function(t,e){return Ut(t.getFullYear()%1e4,e,4)},Z:se,"%":function(){return"%"}},z={a:r,A:a,b:o,B:i,c:l,d:ne,e:ne,H:ae,I:ae,j:re,L:le,m:ee,M:oe,p:c,S:ie,U:Wt,w:Zt,W:$t,x:s,X:u,y:Jt,Y:Qt,Z:Kt,"%":ue};return e}function Ut(t,e,n){var r=t<0?"-":"",a=(r?-t:t)+"",o=a.length;return r+(o68?1900:2e3)}function ee(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ne(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function re(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function ae(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function oe(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function ie(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function le(t,e,n){vl.lastIndex=0;var r=vl.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function se(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=bi(e)/60|0,a=bi(e)%60;return n+Ut(r,"0",2)+Ut(a,"0",2)}function ue(t,e,n){ml.lastIndex=0;var r=ml.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ce(t){for(var e=t.length,n=-1;++n=0?1:-1,l=i*n,s=Math.cos(e),u=Math.sin(e),c=o*u,f=a*s+c*Math.cos(l),d=c*i*Math.sin(l);kl.add(Math.atan2(d,f)),r=t,a=s,o=u}var e,n,r,a,o;Ml.point=function(i,l){Ml.point=t,r=(e=i)*Vi,a=Math.cos(l=(n=l)*Vi/2+Fi/4),o=Math.sin(l)},Ml.lineEnd=function(){t(e,n)}}function me(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function ye(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function xe(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function be(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _e(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function we(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function ke(t){return[Math.atan2(t[1],t[0]),rt(t[2])]}function Me(t,e){return bi(t[0]-e[0])=0;--l)a.point((f=c[l])[0],f[1])}else r(h.x,h.p.x,-1,a);h=h.p}h=h.o,c=h.z,p=!p}while(!h.v);a.lineEnd()}}}function De(t){if(e=t.length){for(var e,n,r=0,a=t[0];++r0){for(_||(o.polygonStart(),_=!0),o.lineStart();++i1&&2&e&&n.push(n.pop().concat(n.shift())),h.push(n.filter(Re))}var h,p,g,v=e(o),m=a.invert(r[0],r[1]),y={point:i,lineStart:s,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=f,y.lineEnd=d,h=[],p=[]},polygonEnd:function(){y.point=i,y.lineStart=s,y.lineEnd=u,h=ci.merge(h);var t=He(m,p);h.length?(_||(o.polygonStart(),_=!0),Ne(h,je,t,n,o)):t&&(_||(o.polygonStart(),_=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),_&&(o.polygonEnd(),_=!1),h=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},x=Ie(),b=e(x),_=!1;return y}}function Re(t){return t.length>1}function Ie(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:k,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function je(t,e){return((t=t.x)[0]<0?t[1]-Hi-Ii:Hi-t[1])-((e=e.x)[0]<0?e[1]-Hi-Ii:Hi-e[1])}function Fe(t){var e,n=NaN,r=NaN,a=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,i){var l=o>0?Fi:-Fi,s=bi(o-n);bi(s-Fi)0?Hi:-Hi),t.point(a,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(o,r),e=0):a!==l&&s>=Fi&&(bi(n-a)Ii?Math.atan((Math.sin(e)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(a=Math.cos(e))*Math.sin(t))/(a*o*i)):(e+r)/2}function Be(t,e,n,r){var a;if(null==t)a=n*Hi,r.point(-Fi,a),r.point(0,a),r.point(Fi,a),r.point(Fi,0),r.point(Fi,-a),r.point(0,-a),r.point(-Fi,-a),r.point(-Fi,0),r.point(-Fi,a);else if(bi(t[0]-e[0])>Ii){var o=t[0]=0?1:-1,k=w*_,M=k>Fi,A=p*x;if(kl.add(Math.atan2(A*w*Math.sin(k),g*b+A*Math.cos(k))),o+=M?_+w*qi:_,M^d>=n^m>=n){var T=xe(me(f),me(t));we(T);var L=xe(a,T);we(L);var C=(M^_>=0?-1:1)*rt(L[2]);(r>C||r===C&&(T[0]||T[1]))&&(i+=M^_>=0?1:-1)}if(!v++)break;d=m,p=x,g=b,f=t}}return(o<-Ii||oo}function n(t){var n,o,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,d){var h,p=[f,d],g=e(f,d),v=i?g?0:a(f,d):g?a(f+(f<0?Fi:-Fi),d):0;if(!n&&(u=s=g)&&t.lineStart(),g!==s&&(h=r(n,p),(Me(n,h)||Me(p,h))&&(p[0]+=Ii,p[1]+=Ii,g=e(p[0],p[1]))),g!==s)c=0,g?(t.lineStart(),h=r(p,n),t.point(h[0],h[1])):(h=r(n,p),t.point(h[0],h[1]),t.lineEnd()),n=h;else if(l&&n&&i^g){var m;v&o||!(m=r(p,n,!0))||(c=0,i?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||n&&Me(n,p)||t.point(p[0],p[1]),n=p,s=g,o=v},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return c|(u&&s)<<1}}}function r(t,e,n){var r=me(t),a=me(e),i=[1,0,0],l=xe(r,a),s=ye(l,l),u=l[0],c=s-u*u;if(!c)return!n&&t;var f=o*s/c,d=-o*u/c,h=xe(i,l),p=_e(i,f);be(p,_e(l,d));var g=h,v=ye(p,g),m=ye(g,g),y=v*v-m*(ye(p,p)-1);if(!(y<0)){var x=Math.sqrt(y),b=_e(g,(-v-x)/m);if(be(b,p),b=ke(b),!n)return b;var _,w=t[0],k=e[0],M=t[1],A=e[1];k0^b[1]<(bi(b[0]-w)Fi^(w<=b[0]&&b[0]<=k)){var z=_e(g,(-v+x)/m);return be(z,p),[b,ke(z)]}}}function a(e,n){var r=i?t:Fi-t,a=0;return e<-r?a|=1:e>r&&(a|=2),n<-r?a|=4:n>r&&(a|=8),a}var o=Math.cos(t),i=o>0,l=bi(o)>Ii;return Ee(e,n,mn(t,6*Vi),i?[0,-t]:[-Fi,t-Fi])}function Xe(t,e,n,r){return function(a){var o,i=a.a,l=a.b,s=i.x,u=i.y,c=l.x,f=l.y,d=0,h=1,p=c-s,g=f-u;if(o=t-s,p||!(o>0)){if(o/=p,p<0){if(o0){if(o>h)return;o>d&&(d=o)}if(o=n-s,p||!(o<0)){if(o/=p,p<0){if(o>h)return;o>d&&(d=o)}else if(p>0){if(o0)){if(o/=g,g<0){if(o0){if(o>h)return;o>d&&(d=o)}if(o=r-u,g||!(o<0)){if(o/=g,g<0){if(o>h)return;o>d&&(d=o)}else if(g>0){if(o0&&(a.a={x:s+d*p,y:u+d*g}),h<1&&(a.b={x:s+h*p,y:u+h*g}),a}}}}}}function Ue(t,e,n,r){function a(r,a){return bi(r[0]-t)0?0:3:bi(r[0]-n)0?2:1:bi(r[1]-e)0?1:0:a>0?3:2}function o(t,e){return i(t.x,e.x)}function i(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(l){function s(t){for(var e=0,n=v.length,r=t[1],a=0;ar&&et(u,o,t)>0&&++e:o[1]<=r&&et(u,o,t)<0&&--e,u=o;return 0!==e}function u(o,l,s,u){var c=0,f=0;if(null==o||(c=a(o,s))!==(f=a(l,s))||i(o,l)<0^s>0)do{u.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+s+4)%4)!==f);else u.point(l[0],l[1])}function c(a,o){return t<=a&&a<=n&&e<=o&&o<=r}function f(t,e){c(t,e)&&l.point(t,e)}function d(){z.point=p,v&&v.push(m=[]),M=!0,k=!1,_=w=NaN}function h(){g&&(p(y,x),b&&k&&L.rejoin(),g.push(L.buffer())),z.point=f,k&&l.lineEnd()}function p(t,e){t=Math.max(-jl,Math.min(jl,t)),e=Math.max(-jl,Math.min(jl,e));var n=c(t,e);if(v&&m.push([t,e]),M)y=t,x=e,b=n,M=!1,n&&(l.lineStart(),l.point(t,e));else if(n&&k)l.point(t,e);else{var r={a:{x:_,y:w},b:{x:t,y:e}};C(r)?(k||(l.lineStart(),l.point(r.a.x,r.a.y)),l.point(r.b.x,r.b.y),n||l.lineEnd(),A=!1):n&&(l.lineStart(),l.point(t,e),A=!1)}_=t,w=e,k=n}var g,v,m,y,x,b,_,w,k,M,A,T=l,L=Ie(),C=Xe(t,e,n,r),z={point:f,lineStart:d,lineEnd:h,polygonStart:function(){l=L,g=[],v=[],A=!0},polygonEnd:function(){l=T,g=ci.merge(g);var e=s([t,r]),n=A&&e,a=g.length;(n||a)&&(l.polygonStart(),n&&(l.lineStart(),u(null,null,1,l),l.lineEnd()),a&&Ne(g,o,e,u,l),l.polygonEnd()),g=v=m=null}};return z}}function Ye(t){var e=0,n=Fi/3,r=un(t),a=r(e,n);return a.parallels=function(t){return arguments.length?r(e=t[0]*Fi/180,n=t[1]*Fi/180):[e/Fi*180,n/Fi*180]},a}function Ge(t,e){function n(t,e){var n=Math.sqrt(o-2*a*Math.sin(e))/a;return[n*Math.sin(t*=a),i-n*Math.cos(t)]}var r=Math.sin(t),a=(r+Math.sin(e))/2,o=1+r*(2*a-r),i=Math.sqrt(o)/a;return n.invert=function(t,e){var n=i-e;return[Math.atan2(t,n)/a,rt((o-(t*t+n*n)*a*a)/(2*a))]},n}function Ze(){function t(t,e){ql+=a*t-r*e,r=t,a=e}var e,n,r,a;Ul.point=function(o,i){Ul.point=t,e=r=o,n=a=i},Ul.lineEnd=function(){t(e,n)}}function We(t,e){tVl&&(Vl=t),eXl&&(Xl=e)}function $e(){function t(t,e){i.push("M",t,",",e,o)}function e(t,e){i.push("M",t,",",e),l.point=n}function n(t,e){i.push("L",t,",",e)}function r(){l.point=t}function a(){i.push("Z")}var o=Qe(4.5),i=[],l={point:t,lineStart:function(){l.point=e},lineEnd:r,polygonStart:function(){l.lineEnd=a},polygonEnd:function(){l.lineEnd=r,l.point=t},pointRadius:function(t){return o=Qe(t),l},result:function(){if(i.length){var t=i.join("");return i=[],t}}};return l}function Qe(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Je(t,e){Ll+=t,Cl+=e,++zl}function Ke(){function t(t,r){var a=t-e,o=r-n,i=Math.sqrt(a*a+o*o);Sl+=i*(e+t)/2,Ol+=i*(n+r)/2,Nl+=i,Je(e=t,n=r)}var e,n;Gl.point=function(r,a){Gl.point=t,Je(e=r,n=a)}}function tn(){Gl.point=Je}function en(){function t(t,e){var n=t-r,o=e-a,i=Math.sqrt(n*n+o*o);Sl+=i*(r+t)/2,Ol+=i*(a+e)/2,Nl+=i,i=a*t-r*e,Dl+=i*(r+t),Pl+=i*(a+e),El+=3*i,Je(r=t,a=e)}var e,n,r,a;Gl.point=function(o,i){Gl.point=t,Je(e=r=o,n=a=i)},Gl.lineEnd=function(){t(e,n)}}function nn(t){function e(e,n){t.moveTo(e+i,n),t.arc(e,n,i,0,qi)}function n(e,n){t.moveTo(e,n),l.point=r}function r(e,n){t.lineTo(e,n)}function a(){l.point=e}function o(){t.closePath()}var i=4.5,l={point:e,lineStart:function(){l.point=n},lineEnd:a,polygonStart:function(){l.lineEnd=o},polygonEnd:function(){l.lineEnd=a,l.point=e},pointRadius:function(t){return i=t,l},result:k};return l}function rn(t){function e(t){return(l?r:n)(t)}function n(e){return ln(e,function(n,r){n=t(n,r),e.point(n[0],n[1])})}function r(e){function n(n,r){n=t(n,r),e.point(n[0],n[1])}function r(){x=NaN,M.point=o,e.lineStart()}function o(n,r){var o=me([n,r]),i=t(n,r);a(x,b,y,_,w,k,x=i[0],b=i[1],y=n,_=o[0],w=o[1],k=o[2],l,e),e.point(x,b)}function i(){M.point=n,e.lineEnd()}function s(){r(),M.point=u,M.lineEnd=c}function u(t,e){o(f=t,d=e),h=x,p=b,g=_,v=w,m=k,M.point=o}function c(){a(x,b,y,_,w,k,h,p,f,g,v,m,l,e),M.lineEnd=i,i()}var f,d,h,p,g,v,m,y,x,b,_,w,k,M={point:n,lineStart:r,lineEnd:i,polygonStart:function(){e.polygonStart(),M.lineStart=s},polygonEnd:function(){e.polygonEnd(),M.lineStart=r}};return M}function a(e,n,r,l,s,u,c,f,d,h,p,g,v,m){var y=c-e,x=f-n,b=y*y+x*x;if(b>4*o&&v--){var _=l+h,w=s+p,k=u+g,M=Math.sqrt(_*_+w*w+k*k),A=Math.asin(k/=M),T=bi(bi(k)-1)o||bi((y*S+x*O)/b-.5)>.3||l*h+s*p+u*g0&&16,e):Math.sqrt(o)},e}function an(t){var e=rn(function(e,n){return t([e*Xi,n*Xi])});return function(t){return cn(e(t))}}function on(t){this.stream=t}function ln(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function sn(t){return un(function(){return t})()}function un(t){function e(t){return t=l(t[0]*Vi,t[1]*Vi),[t[0]*d+s,u-t[1]*d]}function n(t){return(t=l.invert((t[0]-s)/d,(u-t[1])/d))&&[t[0]*Xi,t[1]*Xi]}function r(){l=Se(i=hn(m,y,x),o);var t=o(g,v);return s=h-t[0]*d,u=p+t[1]*d,a()}function a(){return c&&(c.valid=!1,c=null),e}var o,i,l,s,u,c,f=rn(function(t,e){return t=o(t,e),[t[0]*d+s,u-t[1]*d]}),d=150,h=480,p=250,g=0,v=0,m=0,y=0,x=0,_=Il,w=b,k=null,M=null;return e.stream=function(t){return c&&(c.valid=!1),c=cn(_(i,f(w(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(_=null==t?(k=t,Il):Ve((k=+t)*Vi),a()):k},e.clipExtent=function(t){return arguments.length?(M=t,w=t?Ue(t[0][0],t[0][1],t[1][0],t[1][1]):b,a()):M},e.scale=function(t){return arguments.length?(d=+t,r()):d},e.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],r()):[h,p]},e.center=function(t){return arguments.length?(g=t[0]%360*Vi,v=t[1]%360*Vi,r()):[g*Xi,v*Xi]},e.rotate=function(t){return arguments.length?(m=t[0]%360*Vi,y=t[1]%360*Vi,x=t.length>2?t[2]%360*Vi:0,r()):[m*Xi,y*Xi,x*Xi]},ci.rebind(e,f,"precision"),function(){return o=t.apply(this,arguments),e.invert=o.invert&&n,r()}}function cn(t){return ln(t,function(e,n){t.point(e*Vi,n*Vi)})}function fn(t,e){return[t,e]}function dn(t,e){return[t>Fi?t-qi:t<-Fi?t+qi:t,e]}function hn(t,e,n){return t?e||n?Se(gn(t),vn(e,n)):gn(t):e||n?vn(e,n):dn}function pn(t){return function(e,n){return e+=t,[e>Fi?e-qi:e<-Fi?e+qi:e,n]}}function gn(t){var e=pn(t);return e.invert=pn(-t),e}function vn(t,e){function n(t,e){var n=Math.cos(e),l=Math.cos(t)*n,s=Math.sin(t)*n,u=Math.sin(e),c=u*r+l*a;return[Math.atan2(s*o-c*i,l*r-u*a),rt(c*o+s*i)]}var r=Math.cos(t),a=Math.sin(t),o=Math.cos(e),i=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),l=Math.cos(t)*n,s=Math.sin(t)*n,u=Math.sin(e),c=u*o-s*i;return[Math.atan2(s*o+u*i,l*r+c*a),rt(c*r-l*a)]},n}function mn(t,e){var n=Math.cos(t),r=Math.sin(t);return function(a,o,i,l){var s=i*e;null!=a?(a=yn(n,a),o=yn(n,o),(i>0?ao)&&(a+=i*qi)):(a=t+i*qi,o=t-.5*s);for(var u,c=a;i>0?c>o:c0?e<-Hi+Ii&&(e=-Hi+Ii):e>Hi-Ii&&(e=Hi-Ii);var n=i/Math.pow(a(e),o);return[n*Math.sin(o*t),i-n*Math.cos(o*t)]}var r=Math.cos(t),a=function(t){return Math.tan(Fi/4+t/2)},o=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(a(e)/a(t)),i=r*Math.pow(a(t),o)/o;return o?(n.invert=function(t,e){var n=i-e,r=tt(o)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/o,2*Math.atan(Math.pow(i/r,1/o))-Hi]},n):Cn}function Ln(t,e){function n(t,e){var n=o-e;return[n*Math.sin(a*t),o-n*Math.cos(a*t)]}var r=Math.cos(t),a=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),o=r/a+t;return bi(a)1&&et(t[n[r-2]],t[n[r-1]],t[a])<=0;)--r;n[r++]=a}return n.slice(0,r)}function Pn(t,e){return t[0]-e[0]||t[1]-e[1]}function En(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Rn(t,e,n,r){var a=t[0],o=n[0],i=e[0]-a,l=r[0]-o,s=t[1],u=n[1],c=e[1]-s,f=r[1]-u,d=(l*(s-u)-f*(a-o))/(f*i-l*c);return[a+d*i,s+d*c]}function In(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function jn(){or(this),this.edge=this.site=this.circle=null}function Fn(t){var e=ls.pop()||new jn;return e.site=t,e}function qn(t){$n(t),as.remove(t),ls.push(t),or(t)}function Bn(t){var e=t.circle,n=e.x,r=e.cy,a={x:n,y:r},o=t.P,i=t.N,l=[t];qn(t);for(var s=o;s.circle&&bi(n-s.circle.x)Ii)l=l.L;else{if(!((a=o-Xn(l,i))>Ii)){r>-Ii?(e=l.P,n=l):a>-Ii?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}var s=Fn(t);if(as.insert(e,s),e||n){if(e===n)return $n(e),n=Fn(e.site),as.insert(s,n),s.edge=n.edge=tr(e.site,s.site),Wn(e),void Wn(n);if(!n)return void(s.edge=tr(e.site,s.site));$n(e),$n(n);var u=e.site,c=u.x,f=u.y,d=t.x-c,h=t.y-f,p=n.site,g=p.x-c,v=p.y-f,m=2*(d*v-h*g),y=d*d+h*h,x=g*g+v*v,b={x:(v*y-h*x)/m+c,y:(d*x-g*y)/m+f};nr(n.edge,u,p,b),s.edge=tr(u,t,null,b),n.edge=tr(t,p,null,b),Wn(e),Wn(n)}}function Vn(t,e){var n=t.site,r=n.x,a=n.y,o=a-e;if(!o)return r;var i=t.P;if(!i)return-1/0;n=i.site;var l=n.x,s=n.y,u=s-e;if(!u)return l;var c=l-r,f=1/o-1/u,d=c/u;return f?(-d+Math.sqrt(d*d-2*f*(c*c/(-2*u)-s+u/2+a-o/2)))/f+r:(r+l)/2}function Xn(t,e){var n=t.N;if(n)return Vn(n,e);var r=t.site;return r.y===e?r.x:1/0}function Un(t){this.site=t,this.edges=[]}function Yn(t){ -for(var e,n,r,a,o,i,l,s,u,c,f=t[0][0],d=t[1][0],h=t[0][1],p=t[1][1],g=rs,v=g.length;v--;)if((o=g[v])&&o.prepare())for(l=o.edges,s=l.length,i=0;iIi||bi(a-n)>Ii)&&(l.splice(i,0,new rr(er(o.site,c,bi(r-f)Ii?{x:f,y:bi(e-f)Ii?{x:bi(n-p)Ii?{x:d,y:bi(e-d)Ii?{x:bi(n-h)=-ji)){var h=s*s+u*u,p=c*c+f*f,g=(f*h-u*p)/d,v=(s*p-c*h)/d,f=v+l,m=ss.pop()||new Zn;m.arc=t,m.site=a,m.x=g+i,m.y=f+Math.sqrt(g*g+v*v),m.cy=f,t.circle=m;for(var y=null,x=is._;x;)if(m.y=l)return;if(d>p){if(o){if(o.y>=u)return}else o={x:v,y:s};n={x:v,y:u}}else{if(o){if(o.y1)if(d>p){if(o){if(o.y>=u)return}else o={x:(s-a)/r,y:s};n={x:(u-a)/r,y:u}}else{if(o){if(o.y=l)return}else o={x:i,y:r*i+a};n={x:l,y:r*l+a}}else{if(o){if(o.xo||f>i||d=b,k=n>=_,M=k<<1|w,A=M+4;Mo&&(a=e.slice(o,a),l[i]?l[i]+=a:l[++i]=a),(n=n[0])===(r=r[0])?l[i]?l[i]+=r:l[++i]=r:(l[++i]=null,s.push({i:i,x:xr(n,r)})),o=fs.lastIndex;return o=0&&!(n=ci.interpolators[r](t,e)););return n}function wr(t,e){var n,r=[],a=[],o=t.length,i=e.length,l=Math.min(t.length,e.length);for(n=0;n=1?1:t(e)}}function Mr(t){return function(e){return 1-t(1-e)}}function Ar(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Tr(t){return t*t}function Lr(t){return t*t*t}function Cr(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}function zr(t){return function(e){return Math.pow(e,t)}}function Sr(t){return 1-Math.cos(t*Hi)}function Or(t){return Math.pow(2,10*(t-1))}function Nr(t){return 1-Math.sqrt(1-t*t)}function Dr(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/qi*Math.asin(1/t):(t=1,n=e/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*qi/e)}}function Pr(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Er(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Rr(t,e){t=ci.hcl(t),e=ci.hcl(e);var n=t.h,r=t.c,a=t.l,o=e.h-n,i=e.c-r,l=e.l-a;return isNaN(i)&&(i=0,r=isNaN(r)?e.c:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:o<-180&&(o+=360),function(t){return dt(n+o*t,r+i*t,a+l*t)+""}}function Ir(t,e){t=ci.hsl(t),e=ci.hsl(e);var n=t.h,r=t.s,a=t.l,o=e.h-n,i=e.s-r,l=e.l-a;return isNaN(i)&&(i=0,r=isNaN(r)?e.s:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:o<-180&&(o+=360),function(t){return ct(n+o*t,r+i*t,a+l*t)+""}}function jr(t,e){t=ci.lab(t),e=ci.lab(e);var n=t.l,r=t.a,a=t.b,o=e.l-n,i=e.a-r,l=e.b-a;return function(t){return pt(n+o*t,r+i*t,a+l*t)+""}}function Fr(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function qr(t){var e=[t.a,t.b],n=[t.c,t.d],r=Hr(e),a=Br(e,n),o=Hr(Vr(n,e,-a))||0;e[0]*n[1]180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(Xr(n)+"rotate(",null,")")-2,x:xr(t,e)})):e&&n.push(Xr(n)+"rotate("+e+")")}function Gr(t,e,n,r){t!==e?r.push({i:n.push(Xr(n)+"skewX(",null,")")-2,x:xr(t,e)}):e&&n.push(Xr(n)+"skewX("+e+")")}function Zr(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var a=n.push(Xr(n)+"scale(",null,",",null,")");r.push({i:a-4,x:xr(t[0],e[0])},{i:a-2,x:xr(t[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(Xr(n)+"scale("+e+")")}function Wr(t,e){var n=[],r=[];return t=ci.transform(t),e=ci.transform(e),Ur(t.translate,e.translate,n,r),Yr(t.rotate,e.rotate,n,r),Gr(t.skew,e.skew,n,r),Zr(t.scale,e.scale,n,r),t=e=null,function(t){for(var e,a=-1,o=r.length;++a=0;)n.push(a[r])}function sa(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(o=t.children)&&(a=o.length))for(var a,o,i=-1;++ia&&(r=n,a=e);return r}function xa(t){return t.reduce(ba,0)}function ba(t,e){return t+e[1]}function _a(t,e){return wa(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wa(t,e){for(var n=-1,r=+t[0],a=(t[1]-r)/e,o=[];++n<=e;)o[n]=a*n+r;return o}function ka(t){return[ci.min(t),ci.max(t)]}function Ma(t,e){return t.value-e.value}function Aa(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Ta(t,e){t._pack_next=e,e._pack_prev=t}function La(t,e){var n=e.x-t.x,r=e.y-t.y,a=t.r+e.r;return.999*a*a>n*n+r*r}function Ca(t){function e(t){c=Math.min(t.x-t.r,c),f=Math.max(t.x+t.r,f),d=Math.min(t.y-t.r,d),h=Math.max(t.y+t.r,h)}if((n=t.children)&&(u=n.length)){var n,r,a,o,i,l,s,u,c=1/0,f=-1/0,d=1/0,h=-1/0;if(n.forEach(za),r=n[0],r.x=-r.r,r.y=0,e(r),u>1&&(a=n[1],a.x=a.r,a.y=0,e(a),u>2))for(o=n[2],Na(r,a,o),e(o),Aa(r,o),r._pack_prev=o,Aa(o,a),a=r._pack_next,i=3;i=0;)e=a[o],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}function ja(t,e,n){return t.a.parent===e.parent?t.a:n}function Fa(t){return 1+ci.max(t,function(t){return t.y})}function qa(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Ba(t){var e=t.children;return e&&e.length?Ba(e[0]):t}function Ha(t){var e,n=t.children;return n&&(e=n.length)?Ha(n[e-1]):t}function Va(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Xa(t,e){var n=t.x+e[3],r=t.y+e[0],a=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return a<0&&(n+=a/2,a=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:a,dy:o}}function Ua(t){var e=t[0],n=t[t.length-1];return e2?$a:Ga,s=r?Qr:$r;return i=a(t,e,s,n),l=a(e,t,s,_r),o}function o(t){return i(t)}var i,l;return o.invert=function(t){return l(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),a()):t},o.range=function(t){return arguments.length?(e=t,a()):e},o.rangeRound=function(t){return o.range(t).interpolate(Fr)},o.clamp=function(t){return arguments.length?(r=t,a()):r},o.interpolate=function(t){return arguments.length?(n=t,a()):n},o.ticks=function(e){return eo(t,e)},o.tickFormat=function(e,n){return no(t,e,n)},o.nice=function(e){return Ka(t,e),a()},o.copy=function(){return Qa(t,e,n,r)},a()}function Ja(t,e){return ci.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Ka(t,e){return Za(t,Wa(to(t,e)[2])),Za(t,Wa(to(t,e)[2])),t}function to(t,e){null==e&&(e=10);var n=Ua(t),r=n[1]-n[0],a=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),o=e/r*a;return o<=.15?a*=10:o<=.35?a*=5:o<=.75&&(a*=2),n[0]=Math.ceil(n[0]/a)*a,n[1]=Math.floor(n[1]/a)*a+.5*a,n[2]=a,n}function eo(t,e){return ci.range.apply(ci,to(t,e))}function no(t,e,n){var r=to(t,e);if(n){var a=cl.exec(n);if(a.shift(),"s"===a[8]){var o=ci.formatPrefix(Math.max(bi(r[0]),bi(r[1])));return a[7]||(a[7]="."+ro(o.scale(r[2]))),a[8]="f",n=ci.format(a.join("")),function(t){return n(o.scale(t))+o.symbol}}a[7]||(a[7]="."+ao(a[8],r)),n=a.join("")}else n=",."+ro(r[2])+"f";return ci.format(n)}function ro(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ao(t,e){var n=ro(e[2]);return t in ks?Math.abs(n-ro(Math.max(bi(e[0]),bi(e[1]))))+ +("e"!==t):n-2*("%"===t)}function oo(t,e,n,r){function a(t){return(n?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function i(e){return t(a(e))}return i.invert=function(e){return o(t.invert(e))},i.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(a)),i):r},i.base=function(n){return arguments.length?(e=+n,t.domain(r.map(a)),i):e},i.nice=function(){var e=Za(r.map(a),n?Math:As);return t.domain(e),r=e.map(o),i},i.ticks=function(){var t=Ua(r),i=[],l=t[0],s=t[1],u=Math.floor(a(l)),c=Math.ceil(a(s)),f=e%1?2:e;if(isFinite(c-u)){if(n){for(;u0;d--)i.push(o(u)*d);for(u=0;i[u]s;c--);i=i.slice(u,c)}return i},i.tickFormat=function(t,n){if(!arguments.length)return Ms;arguments.length<2?n=Ms:"function"!=typeof n&&(n=ci.format(n));var r=Math.max(1,e*t/i.ticks().length);return function(t){var i=t/o(Math.round(a(t)));return i*e0?l[n-1]:t[0],n0?0:1}function _o(t,e,n,r,a){var o=t[0]-e[0],i=t[1]-e[1],l=(a?r:-r)/Math.sqrt(o*o+i*i),s=l*i,u=-l*o,c=t[0]+s,f=t[1]+u,d=e[0]+s,h=e[1]+u,p=(c+d)/2,g=(f+h)/2,v=d-c,m=h-f,y=v*v+m*m,x=n-r,b=c*h-d*f,_=(m<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*m-v*_)/y,k=(-b*v-m*_)/y,M=(b*m+v*_)/y,A=(-b*v+m*_)/y,T=w-p,L=k-g,C=M-p,z=A-g;return T*T+L*L>C*C+z*z&&(w=M,k=A),[[w-s,k-u],[w*n/x,k*n/x]]}function wo(t){function e(e){function i(){u.push("M",o(t(c),l))}for(var s,u=[],c=[],f=-1,d=e.length,h=Ct(n),p=Ct(r);++f1?t.join("L"):t+"Z"}function Mo(t){return t.join("L")+"Z"}function Ao(t){for(var e=0,n=t.length,r=t[0],a=[r[0],",",r[1]];++e1&&a.push("H",r[0]),a.join("")}function To(t){for(var e=0,n=t.length,r=t[0],a=[r[0],",",r[1]];++e1){l=e[1],o=t[s],s++,r+="C"+(a[0]+i[0])+","+(a[1]+i[1])+","+(o[0]-l[0])+","+(o[1]-l[1])+","+o[0]+","+o[1];for(var u=2;u9&&(a=3*e/Math.sqrt(a),i[l]=a*n,i[l+1]=a*r));for(l=-1;++l<=s;)a=(t[Math.min(s,l+1)][0]-t[Math.max(0,l-1)][0])/(6*(1+i[l]*i[l])),o.push([a||0,i[l]*a||0]);return o}function Ho(t){return t.length<3?ko(t):t[0]+Oo(t,Bo(t))}function Vo(t){for(var e,n,r,a=-1,o=t.length;++a0;)h[--l].call(t,i);if(o>=1)return g.event&&g.event.end.call(t,t.__data__,e),--p.count?delete p[r]:delete t[n],1}var s,u,c,d,h,p=t[n]||(t[n]={active:0,count:0}),g=p[r];g||(s=a.time,u=Dt(o,0,s),g=p[r]={tween:new f,time:s,timer:u,delay:a.delay,duration:a.duration,ease:a.ease,index:e},a=null,++p.count)}function ri(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"})}function ai(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"})}function oi(t){return t.toISOString()}function ii(t,e,n){function r(e){return t(e)}function a(t,n){var r=t[1]-t[0],a=r/n,o=ci.bisect($s,a);return o==$s.length?[e.year,to(t.map(function(t){return t/31536e6}),n)[2]]:o?e[a/$s[o-1]<$s[o]/a?o-1:o]:[Ks,to(t,n)[2]]}return r.invert=function(e){return li(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain(e),r):t.domain().map(li)},r.nice=function(t,e){function n(n){return!isNaN(n)&&!t.range(n,li(+n+1),e).length}var o=r.domain(),i=Ua(o),l=null==t?a(i,10):"number"==typeof t&&a(i,t);return l&&(t=l[0],e=l[1]),r.domain(Za(o,e>1?{floor:function(e){for(;n(e=t.floor(e));)e=li(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=li(+e+1);return e}}:t))},r.ticks=function(t,e){var n=Ua(r.domain()),o=null==t?a(n,10):"number"==typeof t?a(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],li(+n[1]+1),e<1?1:e)},r.tickFormat=function(){return n},r.copy=function(){return ii(t.copy(),e,n)},Ja(r,t)}function li(t){return new Date(t)}function si(t){return JSON.parse(t.responseText)}function ui(t){var e=hi.createRange();return e.selectNode(hi.body),e.createContextualFragment(t.responseText)}var ci={version:"3.5.17"},fi=[].slice,di=function(t){return fi.call(t)},hi=this.document;if(hi)try{di(hi.documentElement.childNodes)[0].nodeType}catch(t){di=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),hi)try{hi.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var pi=this.Element.prototype,gi=pi.setAttribute,vi=pi.setAttributeNS,mi=this.CSSStyleDeclaration.prototype,yi=mi.setProperty;pi.setAttribute=function(t,e){gi.call(this,t,e+"")},pi.setAttributeNS=function(t,e,n){vi.call(this,t,e,n+"")},mi.setProperty=function(t,e,n){yi.call(this,t,e+"",n)}}ci.ascending=a,ci.descending=function(t,e){return et?1:e>=t?0:NaN},ci.min=function(t,e){var n,r,a=-1,o=t.length;if(1===arguments.length){for(;++a=r){n=r;break}for(;++ar&&(n=r)}else{for(;++a=r){n=r;break}for(;++ar&&(n=r)}return n},ci.max=function(t,e){var n,r,a=-1,o=t.length;if(1===arguments.length){for(;++a=r){n=r;break}for(;++an&&(n=r)}else{for(;++a=r){n=r;break}for(;++an&&(n=r)}return n},ci.extent=function(t,e){var n,r,a,o=-1,i=t.length;if(1===arguments.length){for(;++o=r){n=a=r;break}for(;++or&&(n=r),a=r){n=a=r;break}for(;++or&&(n=r),a1)return s/(c-1)},ci.deviation=function(){var t=ci.variance.apply(this,arguments);return t?Math.sqrt(t):t};var xi=l(a);ci.bisectLeft=xi.left,ci.bisect=ci.bisectRight=xi.right,ci.bisector=function(t){return l(1===t.length?function(e,n){return a(t(e),n)}:t)},ci.shuffle=function(t,e,n){(o=arguments.length)<3&&(n=t.length,o<2&&(e=0));for(var r,a,o=n-e;o;)a=Math.random()*o--|0,r=t[o+e],t[o+e]=t[a+e],t[a+e]=r;return t},ci.permute=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},ci.pairs=function(t){for(var e=0,n=t.length-1,r=t[0],a=new Array(n<0?0:n);e=0;)for(r=t[a],e=r.length;--e>=0;)n[--i]=r[e];return n};var bi=Math.abs;ci.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n==1/0)throw new Error("infinite range");var r,a=[],o=u(bi(n)),i=-1 -;if(t*=o,e*=o,n*=o,n<0)for(;(r=t+n*++i)>e;)a.push(r/o);else for(;(r=t+n*++i)=o.length)return r?r.call(a,i):n?i.sort(n):i;for(var s,u,c,d,h=-1,p=i.length,g=o[l++],v=new f;++h=o.length)return t;var r=[],a=i[n++];return t.forEach(function(t,a){r.push({key:t,values:e(a,n)})}),a?r.sort(function(t,e){return a(t.key,e.key)}):r}var n,r,a={},o=[],i=[];return a.map=function(e,n){return t(n,e,0)},a.entries=function(n){return e(t(ci.map,n,0),0)},a.key=function(t){return o.push(t),a},a.sortKeys=function(t){return i[o.length-1]=t,a},a.sortValues=function(t){return n=t,a},a.rollup=function(t){return r=t,a},a},ci.set=function(t){var e=new x;if(t)for(var n=0,r=t.length;n=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},ci.event=null,ci.requote=function(t){return t.replace(Mi,"\\$&")};var Mi=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ai={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},Ti=function(t,e){return e.querySelector(t)},Li=function(t,e){return e.querySelectorAll(t)},Ci=function(t,e){var n=t.matches||t[w(t,"matchesSelector")];return(Ci=function(t,e){return n.call(t,e)})(t,e)};"function"==typeof Sizzle&&(Ti=function(t,e){return Sizzle(t,e)[0]||null},Li=Sizzle,Ci=Sizzle.matchesSelector),ci.selection=function(){return ci.select(hi.documentElement)};var zi=ci.selection.prototype=[];zi.select=function(t){var e,n,r,a,o=[];t=S(t);for(var i=-1,l=this.length;++i=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Oi.hasOwnProperty(n)?{space:Oi[n],local:t}:t}},zi.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=ci.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(N(e,t[e]));return this}return this.each(N(t,e))},zi.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=E(t)).length,a=-1;if(e=n.classList){for(;++a=0;)(n=r[a])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},zi.sort=function(t){t=X.apply(this,arguments);for(var e=-1,n=this.length;++e0&&(e=e.transition().duration(z)),e.call(t.event)}function l(){_&&_.domain(b.range().map(function(t){return(t-M.x)/M.k}).map(b.invert)),k&&k.domain(w.range().map(function(t){return(t-M.y)/M.k}).map(w.invert))}function s(t){S++||t({type:"zoomstart"})}function u(t){l(),t({type:"zoom",scale:M.k,translate:[M.x,M.y]})}function c(t){--S||(t({type:"zoomend"}),v=null)}function f(){function t(){l=1,o(ci.mouse(a),d),u(i)}function n(){f.on(N,null).on(D,null),h(l),c(i)}var a=this,i=E.of(a,arguments),l=0,f=ci.select(r(a)).on(N,t).on(D,n),d=e(ci.mouse(a)),h=Q(a);qs.call(a),s(i)}function d(){function t(){var t=ci.touches(p);return h=M.k,t.forEach(function(t){t.identifier in v&&(v[t.identifier]=e(t))}),t}function n(){var e=ci.event.target;ci.select(e).on(b,r).on(_,l),w.push(e);for(var n=ci.event.changedTouches,a=0,o=n.length;a1){var c=s[0],f=s[1],d=c[0]-f[0],h=c[1]-f[1];m=d*d+h*h}}function r(){var t,e,n,r,i=ci.touches(p);qs.call(p);for(var l=0,s=i.length;l=u)return i;if(a)return a=!1,o;var e=c;if(34===t.charCodeAt(e)){for(var n=e;n++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,fl=ci.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=ci.round(t,It(t,e))).toFixed(Math.max(0,Math.min(20,It(t*(1+1e-15),e))))}}),dl=ci.time={},hl=Date;Bt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){pl.setUTCDate.apply(this._,arguments)},setDay:function(){pl.setUTCDay.apply(this._,arguments)},setFullYear:function(){pl.setUTCFullYear.apply(this._,arguments)},setHours:function(){pl.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){pl.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){pl.setUTCMinutes.apply(this._,arguments)},setMonth:function(){pl.setUTCMonth.apply(this._,arguments)},setSeconds:function(){pl.setUTCSeconds.apply(this._,arguments)},setTime:function(){pl.setTime.apply(this._,arguments)}};var pl=Date.prototype;dl.year=Ht(function(t){return t=dl.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),dl.years=dl.year.range,dl.years.utc=dl.year.utc.range,dl.day=Ht(function(t){var e=new hl(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),dl.days=dl.day.range,dl.days.utc=dl.day.utc.range,dl.dayOfYear=function(t){var e=dl.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=dl[t]=Ht(function(t){return(t=dl.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=dl.year(t).getDay();return Math.floor((dl.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});dl[t+"s"]=n.range,dl[t+"s"].utc=n.utc.range,dl[t+"OfYear"]=function(t){var n=dl.year(t).getDay();return Math.floor((dl.dayOfYear(t)+(n+e)%7)/7)}}),dl.week=dl.sunday,dl.weeks=dl.sunday.range,dl.weeks.utc=dl.sunday.utc.range,dl.weekOfYear=dl.sundayOfYear;var gl={"-":"",_:" ",0:"0"},vl=/^\s*\d+/,ml=/^%/;ci.locale=function(t){return{numberFormat:Ft(t),timeFormat:Xt(t)}};var yl=ci.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ci.format=yl.numberFormat,ci.geo={},fe.prototype={s:0,t:0,add:function(t){de(t,this.t,xl),de(xl.s,this.s,this),this.s?this.t+=xl.t:this.s=xl.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var xl=new fe;ci.geo.stream=function(t,e){t&&bl.hasOwnProperty(t.type)?bl[t.type](t,e):he(t,e)};var bl={Feature:function(t,e){he(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,a=n.length;++rh&&(h=e)}function e(e,n){var r=me([e*Vi,n*Vi]);if(m){var a=xe(m,r),o=[a[1],-a[0],0],i=xe(o,a);we(i),i=ke(i);var s=e-p,u=s>0?1:-1,g=i[0]*Xi*u,v=bi(s)>180;if(v^(u*ph&&(h=y)}else if(g=(g+360)%360-180,v^(u*ph&&(h=n);v?el(c,d)&&(d=e):l(e,d)>l(c,d)&&(c=e):d>=c?(ed&&(d=e)):e>p?l(c,e)>l(c,d)&&(d=e):l(e,d)>l(c,d)&&(c=e)}else t(e,n);m=r,p=e}function n(){_.point=e}function r(){b[0]=c,b[1]=d,_.point=t,m=null}function a(t,n){if(m){var r=t-p;y+=bi(r)>180?r+(r>0?360:-360):r}else g=t,v=n;Ml.point(t,n),e(t,n)}function o(){Ml.lineStart()}function i(){a(g,v),Ml.lineEnd(),bi(y)>Ii&&(c=-(d=180)),b[0]=c,b[1]=d,m=null}function l(t,e){return(e-=t)<0?e+360:e}function s(t,e){return t[0]-e[0]}function u(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tIi?h=90:y<-Ii&&(f=-90),b[0]=c,b[1]=d}};return function(t){h=d=-(c=f=1/0),x=[],ci.geo.stream(t,_);var e=x.length;if(e){x.sort(s);for(var n,r=1,a=x[0],o=[a];rl(a[0],a[1])&&(a[1]=n[1]),l(n[0],a[1])>l(a[0],a[1])&&(a[0]=n[0])):o.push(a=n);for(var i,n,p=-1/0,e=o.length-1,r=0,a=o[e];r<=e;a=n,++r)n=o[r],(i=l(a[1],n[0]))>p&&(p=i,c=n[0],d=a[1])}return x=b=null,c===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,f],[d,h]]}}(),ci.geo.centroid=function(t){Al=Tl=Ll=Cl=zl=Sl=Ol=Nl=Dl=Pl=El=0,ci.geo.stream(t,Rl);var e=Dl,n=Pl,r=El,a=e*e+n*n+r*r;return a=.12&&a<.234&&r>=-.425&&r<-.214?i:a>=.166&&a<.234&&r>=-.214&&r<-.115?l:o).invert(t)},t.stream=function(t){var e=o.stream(t),n=i.stream(t),r=l.stream(t);return{point:function(t,a){e.point(t,a),n.point(t,a),r.point(t,a)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),i.precision(e),l.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),i.scale(.35*e),l.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var u=o.scale(),c=+e[0],f=+e[1];return n=o.translate(e).clipExtent([[c-.455*u,f-.238*u],[c+.455*u,f+.238*u]]).stream(s).point,r=i.translate([c-.307*u,f+.201*u]).clipExtent([[c-.425*u+Ii,f+.12*u+Ii],[c-.214*u-Ii,f+.234*u-Ii]]).stream(s).point,a=l.translate([c-.205*u,f+.212*u]).clipExtent([[c-.214*u+Ii,f+.166*u+Ii],[c-.115*u-Ii,f+.234*u-Ii]]).stream(s).point,t},t.scale(1070)};var Fl,ql,Bl,Hl,Vl,Xl,Ul={point:k,lineStart:k,lineEnd:k,polygonStart:function(){ql=0,Ul.lineStart=Ze},polygonEnd:function(){Ul.lineStart=Ul.lineEnd=Ul.point=k,Fl+=bi(ql/2)}},Yl={point:We,lineStart:k,lineEnd:k,polygonStart:k,polygonEnd:k},Gl={point:Je,lineStart:Ke,lineEnd:tn,polygonStart:function(){Gl.lineStart=en},polygonEnd:function(){Gl.point=Je,Gl.lineStart=Ke,Gl.lineEnd=tn}};ci.geo.path=function(){function t(t){return t&&("function"==typeof l&&o.pointRadius(+l.apply(this,arguments)),i&&i.valid||(i=a(o)),ci.geo.stream(t,i)),o.result()}function e(){return i=null,t}var n,r,a,o,i,l=4.5;return t.area=function(t){return Fl=0,ci.geo.stream(t,a(Ul)),Fl},t.centroid=function(t){return Ll=Cl=zl=Sl=Ol=Nl=Dl=Pl=El=0,ci.geo.stream(t,a(Gl)),El?[Dl/El,Pl/El]:Nl?[Sl/Nl,Ol/Nl]:zl?[Ll/zl,Cl/zl]:[NaN,NaN]},t.bounds=function(t){return Vl=Xl=-(Bl=Hl=1/0),ci.geo.stream(t,a(Yl)),[[Bl,Hl],[Vl,Xl]]},t.projection=function(t){return arguments.length?(a=(n=t)?t.stream||an(t):b,e()):n},t.context=function(t){return arguments.length?(o=null==(r=t)?new $e:new nn(t),"function"!=typeof l&&o.pointRadius(l),e()):r},t.pointRadius=function(e){return arguments.length?(l="function"==typeof e?e:(o.pointRadius(+e),+e),t):l},t.projection(ci.geo.albersUsa()).context(null)},ci.geo.transform=function(t){return{stream:function(e){var n=new on(e);for(var r in t)n[r]=t[r];return n}}},on.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ci.geo.projection=sn,ci.geo.projectionMutator=un,(ci.geo.equirectangular=function(){return sn(fn)}).raw=fn.invert=fn,ci.geo.rotation=function(t){function e(e){return e=t(e[0]*Vi,e[1]*Vi),e[0]*=Xi,e[1]*=Xi,e}return t=hn(t[0]%360*Vi,t[1]*Vi,t.length>2?t[2]*Vi:0),e.invert=function(e){return e=t.invert(e[0]*Vi,e[1]*Vi),e[0]*=Xi,e[1]*=Xi,e},e},dn.invert=fn,ci.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,e=hn(-t[0]*Vi,-t[1]*Vi,0).invert,a=[];return n(null,null,1,{point:function(t,n){ -a.push(t=e(t,n)),t[0]*=Xi,t[1]*=Xi}}),{type:"Polygon",coordinates:[a]}}var e,n,r=[0,0],a=6;return t.origin=function(e){return arguments.length?(r=e,t):r},t.angle=function(r){return arguments.length?(n=mn((e=+r)*Vi,a*Vi),t):e},t.precision=function(r){return arguments.length?(n=mn(e*Vi,(a=+r)*Vi),t):a},t.angle(90)},ci.geo.distance=function(t,e){var n,r=(e[0]-t[0])*Vi,a=t[1]*Vi,o=e[1]*Vi,i=Math.sin(r),l=Math.cos(r),s=Math.sin(a),u=Math.cos(a),c=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((n=f*i)*n+(n=u*c-s*f*l)*n),s*c+u*f*l)},ci.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return ci.range(Math.ceil(o/v)*v,a,v).map(d).concat(ci.range(Math.ceil(u/m)*m,s,m).map(h)).concat(ci.range(Math.ceil(r/p)*p,n,p).filter(function(t){return bi(t%v)>Ii}).map(c)).concat(ci.range(Math.ceil(l/g)*g,i,g).filter(function(t){return bi(t%m)>Ii}).map(f))}var n,r,a,o,i,l,s,u,c,f,d,h,p=10,g=p,v=90,m=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[d(o).concat(h(s).slice(1),d(a).reverse().slice(1),h(u).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],a=+e[1][0],u=+e[0][1],s=+e[1][1],o>a&&(e=o,o=a,a=e),u>s&&(e=u,u=s,s=e),t.precision(y)):[[o,u],[a,s]]},t.minorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],l=+e[0][1],i=+e[1][1],r>n&&(e=r,r=n,n=e),l>i&&(e=l,l=i,i=e),t.precision(y)):[[r,l],[n,i]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(v=+e[0],m=+e[1],t):[v,m]},t.minorStep=function(e){return arguments.length?(p=+e[0],g=+e[1],t):[p,g]},t.precision=function(e){return arguments.length?(y=+e,c=xn(l,i,90),f=bn(r,n,y),d=xn(u,s,90),h=bn(o,a,y),t):y},t.majorExtent([[-180,-90+Ii],[180,90-Ii]]).minorExtent([[-180,-80-Ii],[180,80+Ii]])},ci.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||r.apply(this,arguments),n||a.apply(this,arguments)]}}var e,n,r=_n,a=wn;return t.distance=function(){return ci.geo.distance(e||r.apply(this,arguments),n||a.apply(this,arguments))},t.source=function(n){return arguments.length?(r=n,e="function"==typeof n?null:n,t):r},t.target=function(e){return arguments.length?(a=e,n="function"==typeof e?null:e,t):a},t.precision=function(){return arguments.length?t:0},t},ci.geo.interpolate=function(t,e){return kn(t[0]*Vi,t[1]*Vi,e[0]*Vi,e[1]*Vi)},ci.geo.length=function(t){return Zl=0,ci.geo.stream(t,Wl),Zl};var Zl,Wl={sphere:k,point:k,lineStart:Mn,lineEnd:k,polygonStart:k,polygonEnd:k},$l=An(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(ci.geo.azimuthalEqualArea=function(){return sn($l)}).raw=$l;var Ql=An(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},b);(ci.geo.azimuthalEquidistant=function(){return sn(Ql)}).raw=Ql,(ci.geo.conicConformal=function(){return Ye(Tn)}).raw=Tn,(ci.geo.conicEquidistant=function(){return Ye(Ln)}).raw=Ln;var Jl=An(function(t){return 1/t},Math.atan);(ci.geo.gnomonic=function(){return sn(Jl)}).raw=Jl,Cn.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Hi]},(ci.geo.mercator=function(){return zn(Cn)}).raw=Cn;var Kl=An(function(){return 1},Math.asin);(ci.geo.orthographic=function(){return sn(Kl)}).raw=Kl;var ts=An(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(ci.geo.stereographic=function(){return sn(ts)}).raw=ts,Sn.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Hi]},(ci.geo.transverseMercator=function(){var t=zn(Sn),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},n([0,0,90])}).raw=Sn,ci.geom={},ci.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,a=Ct(n),o=Ct(r),i=t.length,l=[],s=[];for(e=0;e=0;--e)h.push(t[l[u[e]][2]]);for(e=+f;e=r&&u.x<=o&&u.y>=a&&u.y<=i?[[r,i],[o,i],[o,a],[r,a]]:[]).point=t[l]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(o(t,e)/Ii)*Ii,y:Math.round(i(t,e)/Ii)*Ii,i:e}})}var r=On,a=Nn,o=r,i=a,l=us;return t?e(t):(e.links=function(t){return ur(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return ur(n(t)).cells.forEach(function(n,r){for(var a,o=n.site,i=n.edges.sort(Gn),l=-1,s=i.length,u=i[s-1].edge,c=u.l===o?u.r:u.l;++l=u,d=r>=c,h=d<<1|f;t.leaf=!1,t=t.nodes[h]||(t.nodes[h]=pr()),f?a=u:l=u,d?i=c:s=c,o(t,e,n,r,a,i,l,s)}var c,f,d,h,p,g,v,m,y,x=Ct(l),b=Ct(s);if(null!=e)g=e,v=n,m=r,y=a;else if(m=y=-(g=v=1/0),f=[],d=[],p=t.length,i)for(h=0;hm&&(m=c.x),c.y>y&&(y=c.y),f.push(c.x),d.push(c.y);else for(h=0;hm&&(m=_),w>y&&(y=w),f.push(_),d.push(w)}var k=m-g,M=y-v;k>M?y=v+k:m=g+M;var A=pr();if(A.add=function(t){o(A,t,+x(t,++h),+b(t,h),g,v,m,y)},A.visit=function(t){gr(t,A,g,v,m,y)},A.find=function(t){return vr(A,t[0],t[1],g,v,m,y)},h=-1,null==e){for(;++h=0?t.slice(0,e):t,r=e>=0?t.slice(e+1):"in";return n=hs.get(n)||ds,r=ps.get(r)||b,kr(r(n.apply(null,fi.call(arguments,1))))},ci.interpolateHcl=Rr,ci.interpolateHsl=Ir,ci.interpolateLab=jr,ci.interpolateRound=Fr,ci.transform=function(t){var e=hi.createElementNS(ci.ns.prefix.svg,"g");return(ci.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new qr(n?n.matrix:gs)})(t)},qr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var gs={a:1,b:0,c:0,d:1,e:0,f:0};ci.interpolateTransform=Wr,ci.layout={},ci.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++n0?a=t:(n.c=null,n.t=NaN,n=null,u.end({type:"end",alpha:a=0})):t>0&&(u.start({type:"start",alpha:a=t}),n=Dt(s.tick)),s):a},s.start=function(){function t(t,r){if(!n){for(n=new Array(a),s=0;s=0;)i.push(c=u[s]),c.parent=o,c.depth=o.depth+1;r&&(o.value=0),o.children=u}else r&&(o.value=+r.call(t,o,o.depth)||0),delete o.children;return sa(a,function(t){var n,a;e&&(n=t.children)&&n.sort(e),r&&(a=t.parent)&&(a.value+=t.value)}),l}var e=fa,n=ua,r=ca;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(r=e,t):r},t.revalue=function(e){return r&&(la(e,function(t){t.children&&(t.value=0)}),sa(e,function(e){var n;e.children||(e.value=+r.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)})),e},t},ci.layout.partition=function(){function t(e,n,r,a){var o=e.children;if(e.x=n,e.y=e.depth*a,e.dx=r,e.dy=a,o&&(i=o.length)){var i,l,s,u=-1;for(r=e.value?r/e.value:0;++ul&&(l=r),i.push(r)}for(n=0;n0)for(o=-1;++o=c[0]&&l<=c[1]&&(i=s[ci.bisect(f,l,1,h)-1],i.y+=p,i.push(t[o]));return s}var e=!0,n=Number,r=ka,a=_a;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(r=Ct(e),t):r},t.bins=function(e){return arguments.length?(a="number"==typeof e?function(t){return wa(t,e)}:Ct(e),t):a},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},ci.layout.pack=function(){function t(t,o){var i=n.call(this,t,o),l=i[0],s=a[0],u=a[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(l.x=l.y=0,sa(l,function(t){t.r=+c(t.value)}),sa(l,Ca),r){var f=r*(e?1:Math.max(2*l.r/s,2*l.r/u))/2;sa(l,function(t){t.r+=f}),sa(l,Ca),sa(l,function(t){t.r-=f})}return Oa(l,s/2,u/2,e?1:1/Math.max(2*l.r/s,2*l.r/u)),i}var e,n=ci.layout.hierarchy().sort(Ma),r=0,a=[1,1];return t.size=function(e){return arguments.length?(a=e,t):a},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(r=+e,t):r},ia(t,n)},ci.layout.tree=function(){function t(t,a){var c=i.call(this,t,a),f=c[0],d=e(f);if(sa(d,n),d.parent.m=-d.z,la(d,r),u)la(f,o);else{var h=f,p=f,g=f;la(f,function(t){t.xp.x&&(p=t),t.depth>g.depth&&(g=t)});var v=l(h,p)/2-h.x,m=s[0]/(p.x+l(p,h)/2+v),y=s[1]/(g.depth||1);la(f,function(t){t.x=(t.x+v)*m,t.y=t.depth*y})}return c}function e(t){for(var e,n={A:null,children:[t]},r=[n];null!=(e=r.pop());)for(var a,o=e.children,i=0,l=o.length;i0&&(Ra(ja(i,t,n),t,r),u+=r,c+=r),f+=i.m,u+=a.m,d+=s.m,c+=o.m;i&&!Ea(o)&&(o.t=i,o.m+=f-c),a&&!Pa(s)&&(s.t=a,s.m+=u-d,n=t)}return n}function o(t){t.x*=s[0],t.y=t.depth*s[1]}var i=ci.layout.hierarchy().sort(null).value(null),l=Da,s=[1,1],u=null;return t.separation=function(e){return arguments.length?(l=e,t):l},t.size=function(e){return arguments.length?(u=null==(s=e)?o:null,t):u?null:s},t.nodeSize=function(e){return arguments.length?(u=null==(s=e)?null:o,t):u?s:null},ia(t,i)},ci.layout.cluster=function(){function t(t,o){var i,l=e.call(this,t,o),s=l[0],u=0;sa(s,function(t){var e=t.children;e&&e.length?(t.x=qa(e),t.y=Fa(e)):(t.x=i?u+=n(t,i):0,t.y=0,i=t)});var c=Ba(s),f=Ha(s),d=c.x-n(c,f)/2,h=f.x+n(f,c)/2;return sa(s,a?function(t){t.x=(t.x-s.x)*r[0],t.y=(s.y-t.y)*r[1]}:function(t){t.x=(t.x-d)/(h-d)*r[0],t.y=(1-(s.y?t.y/s.y:1))*r[1]}),l}var e=ci.layout.hierarchy().sort(null).value(null),n=Da,r=[1,1],a=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(a=null==(r=e),t):a?null:r},t.nodeSize=function(e){return arguments.length?(a=null!=(r=e),t):a?r:null},ia(t,e)},ci.layout.treemap=function(){function t(t,e){for(var n,r,a=-1,o=t.length;++a0;)c.push(i=d[s-1]),c.area+=i.area,"squarify"!==h||(l=r(c,g))<=p?(d.pop(),p=l):(c.area-=c.pop().area,a(c,g,u,!1),g=Math.min(u.dx,u.dy),c.length=c.area=0,p=1/0);c.length&&(a(c,g,u,!0),c.length=c.area=0),o.forEach(e)}}function n(e){var r=e.children;if(r&&r.length){var o,i=f(e),l=r.slice(),s=[];for(t(l,i.dx*i.dy/e.value),s.area=0;o=l.pop();)s.push(o),s.area+=o.area,null!=o.z&&(a(s,o.z?i.dx:i.dy,i,!l.length),s.length=s.area=0);r.forEach(n)}}function r(t,e){for(var n,r=t.area,a=0,o=1/0,i=-1,l=t.length;++ia&&(a=n));return r*=r,e*=e,r?Math.max(e*a*p/r,r/(e*o*p)):1/0}function a(t,e,n,r){var a,o=-1,i=t.length,l=n.x,u=n.y,c=e?s(t.area/e):0;if(e==n.dx){for((r||c>n.dy)&&(c=n.dy);++on.dx)&&(c=n.dx);++o1);return t+e*n*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var t=ci.random.normal.apply(ci,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=ci.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;nf?0:1;if(u=Bi)return e(u,h)+(t?e(t,1-h):"")+"Z";var p,g,v,m,y,x,b,_,w,k,M,A,T=0,L=0,C=[];if((m=(+s.apply(this,arguments)||0)/2)&&(v=o===Ss?Math.sqrt(t*t+u*u):+o.apply(this,arguments),h||(L*=-1),u&&(L=rt(v/u*Math.sin(m))),t&&(T=rt(v/t*Math.sin(m)))),u){y=u*Math.cos(c+L),x=u*Math.sin(c+L),b=u*Math.cos(f-L),_=u*Math.sin(f-L);var z=Math.abs(f-c-2*L)<=Fi?0:1;if(L&&bo(y,x,b,_)===h^z){var S=(c+f)/2;y=u*Math.cos(S),x=u*Math.sin(S),b=_=null}}else y=x=0;if(t){w=t*Math.cos(f-T),k=t*Math.sin(f-T),M=t*Math.cos(c+T),A=t*Math.sin(c+T);var O=Math.abs(c-f+2*T)<=Fi?0:1;if(T&&bo(w,k,M,A)===1-h^O){var N=(c+f)/2;w=t*Math.cos(N),k=t*Math.sin(N),M=A=null}}else w=k=0;if(d>Ii&&(p=Math.min(Math.abs(u-t)/2,+a.apply(this,arguments)))>.001){g=tFi)+",1 "+e}function a(t,e,n,r){return"Q 0,0 "+r}var o=_n,i=wn,l=Uo,s=mo,u=yo;return t.radius=function(e){return arguments.length?(l=Ct(e),t):l},t.source=function(e){return arguments.length?(o=Ct(e),t):o},t.target=function(e){return arguments.length?(i=Ct(e),t):i},t.startAngle=function(e){return arguments.length?(s=Ct(e),t):s},t.endAngle=function(e){return arguments.length?(u=Ct(e),t):u},t},ci.svg.diagonal=function(){function t(t,a){var o=e.call(this,t,a),i=n.call(this,t,a),l=(o.y+i.y)/2,s=[o,{x:o.x,y:l},{x:i.x,y:l},i] -;return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var e=_n,n=wn,r=Yo;return t.source=function(n){return arguments.length?(e=Ct(n),t):e},t.target=function(e){return arguments.length?(n=Ct(e),t):n},t.projection=function(e){return arguments.length?(r=e,t):r},t},ci.svg.diagonal.radial=function(){var t=ci.svg.diagonal(),e=Yo,n=t.projection;return t.projection=function(t){return arguments.length?n(Go(e=t)):e},t},ci.svg.symbol=function(){function t(t,r){return(Es.get(e.call(this,t,r))||$o)(n.call(this,t,r))}var e=Wo,n=Zo;return t.type=function(n){return arguments.length?(e=Ct(n),t):e},t.size=function(e){return arguments.length?(n=Ct(e),t):n},t};var Es=ci.map({circle:$o,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Is)),n=e*Is;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Rs),n=e*Rs/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Rs),n=e*Rs/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});ci.svg.symbolTypes=Es.keys();var Rs=Math.sqrt(3),Is=Math.tan(30*Vi);zi.transition=function(t){for(var e,n,r=js||++Hs,a=ei(t),o=[],i=Fs||{time:Date.now(),ease:Cr,delay:0,duration:250},l=-1,s=this.length;++lrect,.s>rect").attr("width",f[1]-f[0])}function a(t){t.select(".extent").attr("y",d[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",d[1]-d[0])}function o(){function o(){32==ci.event.keyCode&&(z||(x=null,O[0]-=f[1],O[1]-=d[1],z=2),T())}function g(){32==ci.event.keyCode&&2==z&&(O[0]+=f[1],O[1]+=d[1],z=0,T())}function v(){var t=ci.mouse(_),r=!1;b&&(t[0]+=b[0],t[1]+=b[1]),z||(ci.event.altKey?(x||(x=[(f[0]+f[1])/2,(d[0]+d[1])/2]),O[0]=f[+(t[0]0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!a(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},r.prototype.removeListener=function(t,e){var n,r,o,l;if(!a(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,r=-1,n===e||a(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(n)){for(l=o;l-- >0;)if(n[l]===e||n[l].listener&&n[l].listener===e){r=l;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],a(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?a(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(a(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},{}],18:[function(t,e,n){"use strict";function r(t){for(var e,n=t.length,r=0;r13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}e.exports=function(t){var e=typeof t;if("string"===e){var n=t;if(0===(t=+t)&&r(n))return!1}else if("number"!==e)return!1;return t-t<1}},{}],19:[function(t,e,n){function r(t,e){var n=e[0],r=e[1],a=e[2],o=e[3],i=n+n,l=r+r,s=a+a,u=n*i,c=r*i,f=r*l,d=a*i,h=a*l,p=a*s,g=o*i,v=o*l,m=o*s;return t[0]=1-f-p,t[1]=c+m,t[2]=d-v,t[3]=0,t[4]=c-m,t[5]=1-u-p,t[6]=h+g,t[7]=0,t[8]=d+v,t[9]=h-g,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}e.exports=r},{}],20:[function(t,e,n){function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(t){if(f===setTimeout)return setTimeout(t,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0)}}}function i(t){if(d===clearTimeout)return clearTimeout(t);if((d===a||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function l(){v&&p&&(v=!1,p.length?g=p.concat(g):m=-1,g.length&&s())}function s(){if(!v){var t=o(l);v=!0;for(var e=g.length;e;){for(p=g,g=[];++m1)for(var n=1;n.5?s/(2-o-i):s/(o+i),o){case t:r=(e-n)/s+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var a,o,i;if(t=L(t,360),e=L(e,100),n=L(n,100),0===e)a=o=i=n;else{var l=n<.5?n*(1+e):n+e-n*e,s=2*n-l;a=r(s,l,t+1/3),o=r(s,l,t),i=r(s,l,t-1/3)}return{r:255*a,g:255*o,b:255*i}}function s(t,e,n){t=L(t,255),e=L(e,255),n=L(n,255);var r,a,o=X(t,e,n),i=V(t,e,n),l=o,s=o-i;if(a=0===o?0:s/o,o==i)r=0;else{switch(o){case t:r=(e-n)/s+(e>1)+720)%360;--e;)a.h=(a.h+o)%360,i.push(r(a));return i}function A(t,e){e=e||6;for(var n=r(t).toHsv(),a=n.h,o=n.s,i=n.v,l=[],s=1/e;e--;)l.push(r({h:a,s:o,v:i})),i=(i+s)%1;return l}function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(t,n){S(t)&&(t="100%");var r=O(t) -;return t=V(n,X(0,parseFloat(t))),r&&(t=parseInt(t*n,10)/100),e.abs(t-n)<1e-6?1:t%n/parseFloat(n)}function C(t){return V(1,X(0,t))}function z(t){return parseInt(t,16)}function S(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function O(t){return"string"==typeof t&&-1!=t.indexOf("%")}function N(t){return 1==t.length?"0"+t:""+t}function D(t){return t<=1&&(t=100*t+"%"),t}function P(t){return e.round(255*parseFloat(t)).toString(16)}function E(t){return z(t)/255}function R(t){return!!Z.CSS_UNIT.exec(t)}function I(t){t=t.replace(F,"").replace(q,"").toLowerCase();var e=!1;if(Y[t])t=Y[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Z.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Z.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Z.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Z.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Z.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Z.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Z.hex8.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),a:E(n[4]),format:e?"name":"hex8"}:(n=Z.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:(n=Z.hex4.exec(t))?{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),a:E(n[4]+""+n[4]),format:e?"name":"hex8"}:!!(n=Z.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}function j(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==n&&"large"!==n&&(n="small"),{level:e,size:n}}var F=/^\s+/,q=/\s+$/,B=0,H=e.round,V=e.min,X=e.max,U=e.random;r.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,n,r,a,o,i,l=this.toRgb();return t=l.r/255,n=l.g/255,r=l.b/255,a=t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4),o=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),i=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),.2126*a+.7152*o+.0722*i},setAlpha:function(t){return this._a=T(t),this._roundA=H(100*this._a)/100,this},toHsv:function(){var t=s(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=s(this._r,this._g,this._b),e=H(360*t.h),n=H(100*t.s),r=H(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+r+"%)":"hsva("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=i(this._r,this._g,this._b),e=H(360*t.h),n=H(100*t.s),r=H(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return c(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return f(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:H(this._r),g:H(this._g),b:H(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+H(this._r)+", "+H(this._g)+", "+H(this._b)+")":"rgba("+H(this._r)+", "+H(this._g)+", "+H(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:H(100*L(this._r,255))+"%",g:H(100*L(this._g,255))+"%",b:H(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+H(100*L(this._r,255))+"%, "+H(100*L(this._g,255))+"%, "+H(100*L(this._b,255))+"%)":"rgba("+H(100*L(this._r,255))+"%, "+H(100*L(this._g,255))+"%, "+H(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(G[c(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+d(this._r,this._g,this._b,this._a),n=e,a=this._gradientType?"GradientType = 1, ":"";if(t){var o=r(t);n="#"+d(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return r(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},r.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var a in t)t.hasOwnProperty(a)&&(n[a]="a"===a?t[a]:D(t[a]));t=n}return r(t,e)},r.equals=function(t,e){return!(!t||!e)&&r(t).toRgbString()==r(e).toRgbString()},r.random=function(){return r.fromRatio({r:U(),g:U(),b:U()})},r.mix=function(t,e,n){n=0===n?0:n||50;var a=r(t).toRgb(),o=r(e).toRgb(),i=n/100;return r({r:(o.r-a.r)*i+a.r,g:(o.g-a.g)*i+a.g,b:(o.b-a.b)*i+a.b,a:(o.a-a.a)*i+a.a})},r.readability=function(t,n){var a=r(t),o=r(n);return(e.max(a.getLuminance(),o.getLuminance())+.05)/(e.min(a.getLuminance(),o.getLuminance())+.05)},r.isReadable=function(t,e,n){var a,o,i=r.readability(t,e);switch(o=!1,a=j(n),a.level+a.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},r.mostReadable=function(t,e,n){var a,o,i,l,s=null,u=0;n=n||{},o=n.includeFallbackColors,i=n.level,l=n.size;for(var c=0;cu&&(u=a,s=r(e[c]));return r.isReadable(t,s,{level:i,size:l})||!o?s:(n.includeFallbackColors=!1,r.mostReadable(t,["#fff","#000"],n))};var Y=r.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},G=r.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(Y),Z=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();void 0!==n&&n.exports?n.exports=r:"function"==typeof t&&t.amd?t(function(){return r}):window.tinycolor=r}(Math)},{}],22:[function(t,e,n){"use strict";var r=t("../../lib"),a=t("../color"),o=t("../../plots/cartesian/axes"),i=t("../../plots/cartesian/constants"),l=t("./attributes");e.exports=function(t,e,n,s,u){function c(n,a){return r.coerce(t,e,l,n,a)}s=s||{},u=u||{};var f=c("visible",!u.itemIsNotPlainObject),d=c("clicktoshow");if(!f&&!d)return e;c("opacity");var h=c("bgcolor"),p=c("bordercolor"),g=a.opacity(p);c("borderpad");var v=c("borderwidth"),m=c("showarrow");c("text",m?" ":"new text"),c("textangle"),r.coerceFont(c,"font",n.font),c("width"),c("align"),c("height")&&c("valign");for(var y=["x","y"],x=[-10,-30],b={_fullLayout:n},_=0;_<2;_++){var w=y[_],k=o.coerceRef(t,e,b,w,"","paper");if(o.coercePosition(e,b,c,k,w,.5),m){var M="a"+w,A=o.coerceRef(t,e,b,M,"pixel");"pixel"!==A&&A!==k&&(A=e[M]="pixel");var T="pixel"===A?x[_]:.4;o.coercePosition(e,b,c,A,M,T)}c(w+"anchor")}if(r.noneOrAll(t,e,["x","y"]),m&&(c("arrowcolor",g?e.bordercolor:a.defaultLine),c("arrowhead"),c("arrowsize"),c("arrowwidth",2*(g&&v||1)),c("standoff"),r.noneOrAll(t,e,["ax","ay"])),d){var L=c("xclick"),C=c("yclick");e._xclick=void 0===L?e.x:L,e._yclick=void 0===C?e.y:C}var z=c("hovertext");if(z){var S=c("hoverlabel.bgcolor",a.opacity(h)?a.rgb(h):a.defaultLine),O=c("hoverlabel.bordercolor",a.contrast(S));r.coerceFont(c,"hoverlabel.font",{family:i.HOVERFONT,size:i.HOVERFONTSIZE,color:O})}return c("captureevents",!!z),e}},{"../../lib":130,"../../plots/cartesian/axes":165,"../../plots/cartesian/constants":170,"../color":33,"./attributes":24}],23:[function(t,e,n){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0},{path:"M2,2V-2H-2V2Z",backoff:0}]},{}],24:[function(t,e,n){"use strict";var r=t("./arrow_paths"),a=t("../../plots/font_attributes"),o=t("../../plots/cartesian/constants"),i=t("../../lib/extend").extendFlat;e.exports={_isLinkedToArray:"annotation",visible:{valType:"boolean",dflt:!0},text:{valType:"string"},textangle:{valType:"angle",dflt:0},font:i({},a,{}),width:{valType:"number",min:1,dflt:null},height:{valType:"number",min:1,dflt:null},opacity:{valType:"number",min:0,max:1,dflt:1},align:{valType:"enumerated",values:["left","center","right"],dflt:"center"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)"},borderpad:{valType:"number",min:0,dflt:1},borderwidth:{valType:"number",min:0,dflt:1},showarrow:{valType:"boolean",dflt:!0},arrowcolor:{valType:"color"},arrowhead:{valType:"integer",min:0,max:r.length,dflt:1},arrowsize:{valType:"number",min:.3,dflt:1},arrowwidth:{valType:"number",min:.1},standoff:{valType:"number",min:0,dflt:0},ax:{valType:"any"},ay:{valType:"any"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.x.toString()]},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()]},xref:{valType:"enumerated",values:["paper",o.idRegex.x.toString()]},x:{valType:"any"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yref:{valType:"enumerated",values:["paper",o.idRegex.y.toString()]},y:{valType:"any"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1},xclick:{valType:"any"},yclick:{valType:"any"},hovertext:{valType:"string"},hoverlabel:{bgcolor:{valType:"color"},bordercolor:{valType:"color"},font:i({},a,{})},captureevents:{valType:"boolean"},_deprecated:{ref:{valType:"string"}}}},{"../../lib/extend":126,"../../plots/cartesian/constants":170,"../../plots/font_attributes":189,"./arrow_paths":23}],25:[function(t,e,n){"use strict";function r(t){var e=t._fullLayout;a.filterVisible(e.annotations).forEach(function(e){var n=o.getFromId(t,e.xref),r=o.getFromId(t,e.yref),a=3*e.arrowsize*e.arrowwidth||0;n&&n.autorange&&(e.axref===e.xref?(o.expand(n,[n.r2c(e.x)],{ppadplus:a,ppadminus:a}),o.expand(n,[n.r2c(e.ax)],{ppadplus:e._xpadplus,ppadminus:e._xpadminus})):o.expand(n,[n.r2c(e.x)],{ppadplus:Math.max(e._xpadplus,a),ppadminus:Math.max(e._xpadminus,a)})),r&&r.autorange&&(e.ayref===e.yref?(o.expand(r,[r.r2c(e.y)],{ppadplus:a,ppadminus:a}),o.expand(r,[r.r2c(e.ay)],{ppadplus:e._ypadplus,ppadminus:e._ypadminus})):o.expand(r,[r.r2c(e.y)],{ppadplus:Math.max(e._ypadplus,a),ppadminus:Math.max(e._ypadminus,a)}))})}var a=t("../../lib"),o=t("../../plots/cartesian/axes"),i=t("./draw").draw;e.exports=function(t){var e=t._fullLayout,n=a.filterVisible(e.annotations);if(n.length&&t._fullData.length){var l={};n.forEach(function(t){l[t.xref]=!0,l[t.yref]=!0});if(o.list(t).filter(function(t){return t.autorange&&l[t._id]}).length)return a.syncOrAsync([i,r],t)}}},{"../../lib":130,"../../plots/cartesian/axes":165,"./draw":29}],26:[function(t,e,n){"use strict";function r(t,e){var n=o(t,e);return n.on.length>0||n.explicitOff.length>0}function a(t,e){var n,r=o(t,e),a=r.on,l=r.off.concat(r.explicitOff),s={};if(a.length||l.length){for(n=0;n2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}R.selectAll("tspan.line").attr({y:0,x:0});var r=C.select(".annotation-math-group"),a=!r.empty(),f=h.bBox((a?r:R).node()),p=f.width,x=f.height,S=b.width||p,E=b.height||x,I=Math.round(S+2*O),j=Math.round(E+2*O);b._w=S,b._h=E;var F=!1;if(["x","y"].forEach(function(e){var r,a,o,i,l,f=b[e+"ref"]||e,d=b["a"+e+"ref"],h=c.getFromId(t,f),p=(A+("x"===e?0:-90))*Math.PI/180,g=I*Math.cos(p),v=j*Math.sin(p),m=Math.abs(g)+Math.abs(v),x=b[e+"anchor"],_=M[e];if(h){var w=h.r2fraction(b[e]);if((t._dragging||!h.autorange)&&(w<0||w>1)&&(d===f?((w=h.r2fraction(b["a"+e]))<0||w>1)&&(F=!0):F=!0,F))return;r=h._offset+h.r2p(b[e]),i=.5}else"x"===e?(o=b[e],r=y.l+y.w*o):(o=1-b[e],r=y.t+y.h*o),i=b.showarrow?.5:o;if(b.showarrow){_.head=r;var k=b["a"+e];l=g*n(.5,b.xanchor)-v*n(.5,b.yanchor),d===f?(_.tail=h._offset+h.r2p(k),a=l):(_.tail=r+k,a=l+k),_.text=_.tail+l;var T=s["x"===e?"width":"height"];if("paper"===f&&(_.head=u.constrain(_.head,1,T-1)),"pixel"===d){var L=-Math.max(_.tail-3,_.text),C=Math.min(_.tail+3,_.text)-T;L>0?(_.tail+=L,_.text+=L):C>0&&(_.tail-=C,_.text-=C)}}else l=m*n(i,x),a=l,_.text=r+l;b["_"+e+"padplus"]=m/2+a,b["_"+e+"padminus"]=m/2-a,b["_"+e+"size"]=m,b["_"+e+"shift"]=l}),F)return void C.remove();var q=0,B=0;if("left"!==b.align&&(q=(S-p)*("center"===b.align?.5:1)),"top"!==b.valign&&(B=(E-x)*("middle"===b.valign?.5:1)),a)r.select("svg").attr({x:O+q-1,y:O+B}).call(h.setClipUrl,D?_:null);else{var H=O+B-f.top,V=O+q-f.left;R.attr({x:V,y:H}).call(h.setClipUrl,D?_:null),R.selectAll("tspan.line").attr({y:H,x:V})}P.select("rect").call(h.setRect,O,O,S,E),N.call(h.setRect,z/2,z/2,I-z,j-z),C.call(h.setTranslate,Math.round(M.x.text-I/2),Math.round(M.y.text-j/2)),L.attr({transform:"rotate("+A+","+M.x.text+","+M.y.text+")"});var X="annotations["+e+"]",U=function(n,r){i.select(t).selectAll('.annotation-arrow-g[data-index="'+e+'"]').remove();var a=M.x.head,s=M.y.head,c=M.x.tail+n,f=M.y.tail+r,p=M.x.text+n,g=M.y.text+r,x=u.rotationXYMatrix(A,p,g),_=u.apply2DTransform(x),z=u.apply2DTransform2(x),S=+N.attr("width"),O=+N.attr("height"),D=p-.5*S,P=D+S,E=g-.5*O,R=E+O,I=[[D,E,D,R],[D,R,P,R],[P,R,P,E],[P,E,D,E]].map(z);if(!I.reduce(function(t,e){return t^!!o(a,s,a+1e6,s+1e6,e[0],e[1],e[2],e[3])},!1)){I.forEach(function(t){var e=o(c,f,a,s,t[0],t[1],t[2],t[3]);e&&(c=e.x,f=e.y)});var j=b.arrowwidth,F=b.arrowcolor,q=T.append("g").style({opacity:d.opacity(F)}).classed("annotation-arrow-g",!0).attr("data-index",String(e)),B=q.append("path").attr("d","M"+c+","+f+"L"+a+","+s).style("stroke-width",j+"px").call(d.stroke,d.rgb(F));if(m(B,b.arrowhead,"end",b.arrowsize,b.standoff),t._context.editable&&B.node().parentNode){var H=a,V=s;if(b.standoff){var U=Math.sqrt(Math.pow(a-c,2)+Math.pow(s-f,2));H+=b.standoff*(c-a)/U,V+=b.standoff*(f-s)/U}var Y,G,Z,W=q.append("path").classed("annotation",!0).classed("anndrag",!0).attr({"data-index":String(e),d:"M3,3H-3V-3H3ZM0,0L"+(c-H)+","+(f-V),transform:"translate("+H+","+V+")"}).style("stroke-width",j+6+"px").call(d.stroke,"rgba(0,0,0,0)").call(d.fill,"rgba(0,0,0,0)");v.init({element:W.node(),prepFn:function(){var t=h.getTranslate(C);G=t.x,Z=t.y,Y={},w&&w.autorange&&(Y[w._name+".autorange"]=!0),k&&k.autorange&&(Y[k._name+".autorange"]=!0)},moveFn:function(t,e){var n=_(G,Z),r=n[0]+t,o=n[1]+e;C.call(h.setTranslate,r,o),Y[X+".x"]=w?w.p2r(w.r2p(b.x)+t):(a+t-y.l)/y.w,Y[X+".y"]=k?k.p2r(k.r2p(b.y)+e):1-(s+e-y.t)/y.h,b.axref===b.xref&&(Y[X+".ax"]=w?w.p2r(w.r2p(b.ax)+t):(a+t-y.l)/y.w),b.ayref===b.yref&&(Y[X+".ay"]=k?k.p2r(k.r2p(b.ay)+e):1-(s+e-y.t)/y.h),q.attr("transform","translate("+t+","+e+")"),L.attr({transform:"rotate("+A+","+r+","+o+")"})},doneFn:function(e){if(e){l.relayout(t,Y);var n=document.querySelector(".js-notes-box-panel");n&&n.redraw(n.selectedObj)}}})}}};if(b.showarrow&&U(0,0),t._context.editable){var Y,G;v.init({element:C.node(),prepFn:function(){G=L.attr("transform"),Y={}},moveFn:function(t,e){var n="pointer";if(b.showarrow)b.axref===b.xref?Y[X+".ax"]=w.p2r(w.r2p(b.ax)+t):Y[X+".ax"]=b.ax+t,b.ayref===b.yref?Y[X+".ay"]=k.p2r(k.r2p(b.ay)+e):Y[X+".ay"]=b.ay+e,U(t,e);else{if(w)Y[X+".x"]=b.x+t/w._m;else{var r=b._xsize/y.w,a=b.x+b._xshift/y.w-r/2;Y[X+".x"]=v.align(a+t/y.w,r,0,1,b.xanchor)}if(k)Y[X+".y"]=b.y+e/k._m;else{var o=b._ysize/y.h,i=b.y-b._yshift/y.h-o/2;Y[X+".y"]=v.align(i-e/y.h,o,0,1,b.yanchor)}w&&k||(n=v.getCursor(w?.5:Y[X+".x"],k?.5:Y[X+".y"],b.xanchor,b.yanchor))}L.attr({transform:"translate("+t+","+e+")"+G}),g(C,n)},doneFn:function(e){if(g(C),e){l.relayout(t,Y);var n=document.querySelector(".js-notes-box-panel");n&&n.redraw(n.selectedObj)}}})}}var a=t.layout,s=t._fullLayout,y=t._fullLayout._size;s._infolayer.selectAll('.annotation[data-index="'+e+'"]').remove();var x=(a.annotations||[])[e],b=s.annotations[e],_="clip"+s._uid+"_ann"+e;if(!x||!1===b.visible)return void i.selectAll("#"+_).remove();var w=c.getFromId(t,b.xref),k=c.getFromId(t,b.yref),M={x:{},y:{}},A=+b.textangle||0,T=s._infolayer.append("g").classed("annotation",!0).attr("data-index",String(e)).style("opacity",b.opacity),L=T.append("g").classed("annotation-text-g",!0).attr("data-index",String(e)),C=L.append("g").style("pointer-events",b.captureevents?"all":null).call(g,"default").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",{index:e,annotation:x,fullAnnotation:b})});b.hovertext&&C.on("mouseover",function(){var e=b.hoverlabel,n=e.font,r=this.getBoundingClientRect(),a=t.getBoundingClientRect();f.loneHover({x0:r.left-a.left,x1:r.right-a.left,y:(r.top+r.bottom)/2-a.top,text:b.hovertext,color:e.bgcolor,borderColor:e.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:s._hoverlayer.node(),outerContainer:s._paper.node()})}).on("mouseout",function(){f.loneUnhover(s._hoverlayer.node())});var z=b.borderwidth,S=b.borderpad,O=z+S,N=C.append("rect").attr("class","bg").style("stroke-width",z+"px").call(d.stroke,b.bordercolor).call(d.fill,b.bgcolor),D=b.width||b.height,P=s._defs.select(".clips").selectAll("#"+_).data(D?[0]:[]);P.enter().append("clipPath").classed("annclip",!0).attr("id",_).append("rect"),P.exit().remove();var E=b.font,R=C.append("text").classed("annotation",!0).attr("data-unformatted",b.text).text(b.text);t._context.editable?R.call(p.makeEditable,C).call(n).on("edit",function(r){b.text=r,this.attr({"data-unformatted":b.text}),this.call(n);var a={};a["annotations["+e+"].text"]=b.text,w&&w.autorange&&(a[w._name+".autorange"]=!0),k&&k.autorange&&(a[k._name+".autorange"]=!0),l.relayout(t,a)}):R.call(n)}function o(t,e,n,r,a,o,i,l){var s=n-t,u=a-t,c=i-a,f=r-e,d=o-e,h=l-o,p=s*h-c*f;if(0===p)return null;var g=(u*h-c*d)/p,v=(u*f-s*d)/p;return v<0||v>1||g<0||g>1?null:{x:t+s*g,y:e+f*g}}var i=t("d3"),l=t("../../plotly"),s=t("../../plots/plots"),u=t("../../lib"),c=t("../../plots/cartesian/axes"),f=t("../../plots/cartesian/graph_interact"),d=t("../color"),h=t("../drawing"),p=t("../../lib/svg_text_utils"),g=t("../../lib/setcursor"),v=t("../dragelement"),m=t("./draw_arrow_head");e.exports={draw:r,drawOne:a}},{"../../lib":130,"../../lib/setcursor":145,"../../lib/svg_text_utils":147,"../../plotly":160,"../../plots/cartesian/axes":165,"../../plots/cartesian/graph_interact":174,"../../plots/plots":193,"../color":33,"../dragelement":54,"../drawing":56,"./draw_arrow_head":30,d3:15}],30:[function(t,e,n){"use strict";var r=t("d3"),a=t("fast-isnumeric"),o=t("../color"),i=t("../drawing"),l=t("./arrow_paths");e.exports=function(t,e,n,s,u){function c(){t.style("stroke-dasharray","0px,100px")}function f(n,a){h.path&&(e>5&&(a=0),r.select(d.parentElement).append("path").attr({class:t.attr("class"),d:h.path,transform:"translate("+n.x+","+n.y+")rotate("+180*a/Math.PI+")scale("+y+")"}).style({fill:x,opacity:b,"stroke-width":0}))}a(s)||(s=1);var d=t.node(),h=l[e||0];"string"==typeof n&&n||(n="end");var p,g,v,m,y=(i.getPx(t,"stroke-width")||1)*s,x=t.style("stroke")||o.defaultLine,b=t.style("stroke-opacity")||1,_=n.indexOf("start")>=0,w=n.indexOf("end")>=0,k=h.backoff*y+u;if("line"===d.nodeName){p={x:+t.attr("x1"),y:+t.attr("y1")},g={x:+t.attr("x2"),y:+t.attr("y2")};var M=p.x-g.x,A=p.y-g.y;if(v=Math.atan2(A,M),m=v+Math.PI,k){if(k*k>M*M+A*A)return void c();var T=k*Math.cos(v),L=k*Math.sin(v);_&&(p.x-=T,p.y-=L,t.attr({x1:p.x,y1:p.y})),w&&(g.x+=T,g.y+=L,t.attr({x2:g.x,y2:g.y}))}}else if("path"===d.nodeName){var C=d.getTotalLength(),z="";if(C=0))return t;if(3===i)r[i]>1&&(r[i]=1);else if(r[i]>=1)return t}var l=Math.round(255*r[0])+", "+Math.round(255*r[1])+", "+Math.round(255*r[2]);return a?"rgba("+l+", "+r[3]+")":"rgb("+l+")"}var a=t("tinycolor2"),o=t("fast-isnumeric"),i=e.exports={},l=t("./attributes");i.defaults=l.defaults;var s=i.defaultLine=l.defaultLine;i.lightLine=l.lightLine;var u=i.background=l.background;i.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},i.rgb=function(t){return i.tinyRGB(a(t))},i.opacity=function(t){return t?a(t).getAlpha():0},i.addOpacity=function(t,e){var n=a(t).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+e+")"},i.combine=function(t,e){var n=a(t).toRgb();if(1===n.a)return a(t).toRgbString();var r=a(e||u).toRgb(),o=1===r.a?r:{r:255*(1-r.a)+r.r*r.a,g:255*(1-r.a)+r.g*r.a,b:255*(1-r.a)+r.b*r.a},i={r:o.r*(1-n.a)+n.r*n.a,g:o.g*(1-n.a)+n.g*n.a,b:o.b*(1-n.a)+n.b*n.a};return a(i).toRgbString()},i.contrast=function(t,e,n){var r=a(t);return 1!==r.getAlpha()&&(r=a(i.combine(t,u))),(r.isDark()?e?r.lighten(e):u:n?r.darken(n):s).toString()},i.stroke=function(t,e){var n=a(e);t.style({stroke:i.tinyRGB(n),"stroke-opacity":n.getAlpha()})},i.fill=function(t,e){var n=a(e);t.style({fill:i.tinyRGB(n),"fill-opacity":n.getAlpha()})},i.clean=function(t){if(t&&"object"==typeof t){var e,n,a,o,l=Object.keys(t);for(e=0;el&&(o[1]-=(lt-l)/2):n.node()&&!n.classed("js-placeholder")&&(lt=h.bBox(e.node()).height),lt){if(lt+=5,"top"===_.titleside)K.domain[1]-=lt/T.h,o[1]*=-1;else{K.domain[0]+=lt/T.h;var u=Math.max(1,n.selectAll("tspan.line").size());o[1]+=(1-u)*l}e.attr("transform","translate("+o+")"),K.setScale()}}ot.selectAll(".cbfills,.cblines,.cbaxis").attr("transform","translate(0,"+Math.round(T.h*(1-K.domain[1]))+")");var f=ot.select(".cbfills").selectAll("rect.cbfill").data(S);f.enter().append("rect").classed("cbfill",!0).style("stroke","none"),f.exit().remove(),f.each(function(t,e){var n=[0===e?C[0]:(S[e]+S[e-1])/2,e===S.length-1?C[1]:(S[e]+S[e+1])/2].map(K.c2p).map(Math.round);e!==S.length-1&&(n[1]+=n[1]>n[0]?1:-1);var o=N(t).replace("e-",""),i=a(o).toHexString();r.select(this).attr({x:G,width:Math.max(q,2),y:r.min(n),height:Math.max(r.max(n)-r.min(n),2),fill:i})});var d=ot.select(".cblines").selectAll("path.cbline").data(_.line.color&&_.line.width?z:[]);return d.enter().append("path").classed("cbline",!0),d.exit().remove(),d.each(function(t){r.select(this).attr("d","M"+G+","+(Math.round(K.c2p(t))+_.line.width/2%1)+"h"+q).call(h.lineGroupStyle,_.line.width,O(t),_.line.dash)}),K._axislayer.selectAll("g."+K._id+"tick,path").remove(),K._pos=G+q+(_.outlinewidth||0)/2-("outside"===_.ticks?1:0),K.side="right",c.syncOrAsync([function(){return s.doTicks(t,K,!0)},function(){if(-1===["top","bottom"].indexOf(_.titleside)){var e=K.titlefont.size,n=K._offset+K._length/2,a=T.l+(K.position||0)*T.w+("right"===K.side?10+e*(K.showticklabels?1:.5):-10-e*(K.showticklabels?.5:0));k("h"+K._id+"title",{avoid:{selection:r.select(t).selectAll("g."+K._id+"tick"),side:_.titleside,offsetLeft:T.l,offsetTop:T.t,maxShift:A.width},attributes:{x:a,y:n,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}}])}function k(e,n){var r,a=b();r=l.traceIs(a,"markerColorscale")?"marker.colorbar.title":"colorbar.title";var o={propContainer:K,propName:r,traceIndex:a.index,dfltName:"colorscale",containerGroup:ot.select(".cbtitle")},i="h"===e.charAt(0)?e.substr(1):"h"+e;ot.selectAll("."+i+",."+i+"-math-group").remove(),g.draw(t,e,f(o,n||{}))}function M(){var n=q+_.outlinewidth/2+h.bBox(K._axislayer.node()).width;if(I=it.select("text"),I.node()&&!I.classed("js-placeholder")){var r,a=it.select(".h"+K._id+"title-math-group").node();r=a&&-1!==["top","bottom"].indexOf(_.titleside)?h.bBox(a).width:h.bBox(it.node()).right-G-T.l,n=Math.max(n,r)}var o=2*_.xpad+n+_.borderwidth+_.outlinewidth/2,l=$-Q;ot.select(".cbbg").attr({x:G-_.xpad-(_.borderwidth+_.outlinewidth)/2,y:Q-U,width:Math.max(o,2),height:Math.max(l+2*U,2)}).call(p.fill,_.bgcolor).call(p.stroke,_.bordercolor).style({"stroke-width":_.borderwidth}),ot.selectAll(".cboutline").attr({x:G,y:Q+_.ypad+("top"===_.titleside?lt:0),width:Math.max(q,2),height:Math.max(l-2*_.ypad-lt,2)}).call(p.stroke,_.outlinecolor).style({fill:"None","stroke-width":_.outlinewidth});var s=({center:.5,right:1}[_.xanchor]||0)*o;ot.attr("transform","translate("+(T.l-s)+","+T.t+")"),i.autoMargin(t,e,{x:_.x,y:_.y,l:o*({right:1,center:.5}[_.xanchor]||0),r:o*({left:1,center:.5}[_.xanchor]||0),t:l*({bottom:1,middle:.5}[_.yanchor]||0),b:l*({top:1,middle:.5}[_.yanchor]||0)})}var A=t._fullLayout,T=A._size;if("function"!=typeof _.fillcolor&&"function"!=typeof _.line.color)return void A._infolayer.selectAll("g."+e).remove();var L,C=r.extent(("function"==typeof _.fillcolor?_.fillcolor:_.line.color).domain()),z=[],S=[],O="function"==typeof _.line.color?_.line.color:function(){return _.line.color},N="function"==typeof _.fillcolor?_.fillcolor:function(){return _.fillcolor},D=_.levels.end+_.levels.size/100,P=_.levels.size,E=1.001*C[0]-.001*C[1],R=1.001*C[1]-.001*C[0];for(L=_.levels.start;(L-D)*P<0;L+=P)L>E&&LC[0]&&L1){var at=Math.pow(10,Math.floor(Math.log(rt)/Math.LN10));et*=at*c.roundUp(rt/at,[2,5,10]),(Math.abs(_.levels.start)/_.levels.size+1e-6)%1<2e-6&&(K.tick0=0)}K.dtick=et}K.domain=[W+Y,W+V-Y],K.setScale();var ot=A._infolayer.selectAll("g."+e).data([0]);ot.enter().append("g").classed(e,!0).each(function(){var t=r.select(this);t.append("rect").classed("cbbg",!0),t.append("g").classed("cbfills",!0),t.append("g").classed("cblines",!0),t.append("g").classed("cbaxis",!0).classed("crisp",!0),t.append("g").classed("cbtitleunshift",!0).append("g").classed("cbtitle",!0),t.append("rect").classed("cboutline",!0),t.select(".cbtitle").datum(0)}),ot.attr("transform","translate("+Math.round(T.l)+","+Math.round(T.t)+")");var it=ot.select(".cbtitleunshift").attr("transform","translate(-"+Math.round(T.l)+",-"+Math.round(T.t)+")");K._axislayer=ot.select(".cbaxis");var lt=0;if(-1!==["top","bottom"].indexOf(_.titleside)){var st,ut=T.l+(_.x+X)*T.w,ct=K.titlefont.size;st="top"===_.titleside?(1-(W+V-Y))*T.h+T.t+3+.75*ct:(1-(W+Y))*T.h+T.t-3-.25*ct,k(K._id+"title",{attributes:{x:ut,y:st,"text-anchor":"start"}})}var ft=c.syncOrAsync([i.previousPromises,w,i.previousPromises,M],t);if(ft&&ft.then&&(t._promises||[]).push(ft),t._context.editable){var dt,ht,pt;u.init({element:ot.node(),prepFn:function(){dt=ot.attr("transform"),d(ot)},moveFn:function(t,e){ot.attr("transform",dt+" translate("+t+","+e+")"),ht=u.align(Z+t/T.w,B,0,1,_.xanchor),pt=u.align(W-e/T.h,V,0,1,_.yanchor);var n=u.getCursor(ht,pt,_.xanchor,_.yanchor);d(ot,n)},doneFn:function(e){d(ot),e&&void 0!==ht&&void 0!==pt&&o.restyle(t,{"colorbar.x":ht,"colorbar.y":pt},b().index)}})}return ft}function b(){var n,r,a=e.substr(2);for(n=0;n=0?a.Reds:a.Blues,s.colorscale=g,l.reversescale&&(g=o(g)),l.colorscale=g)}},{"../../lib":130,"./flip_scale":44,"./scales":51}],40:[function(t,e,n){"use strict";var r=t("./attributes"),a=t("../../lib/extend").extendDeep;t("./scales.js");e.exports=function(t){return{color:{valType:"color",arrayOk:!0},colorscale:a({},r.colorscale,{}),cauto:a({},r.zauto,{}),cmax:a({},r.zmax,{}),cmin:a({},r.zmin,{}),autocolorscale:a({},r.autocolorscale,{}),reversescale:a({},r.reversescale,{})}}},{"../../lib/extend":126,"./attributes":38,"./scales.js":51}],41:[function(t,e,n){"use strict";var r=t("./scales");e.exports=r.RdBu},{"./scales":51}],42:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../../lib"),o=t("../colorbar/has_colorbar"),i=t("../colorbar/defaults"),l=t("./is_valid_scale"),s=t("./flip_scale");e.exports=function(t,e,n,u,c){var f=c.prefix,d=c.cLetter,h=f.slice(0,f.length-1),p=f?a.nestedProperty(t,h).get()||{}:t,g=f?a.nestedProperty(e,h).get()||{}:e,v=p[d+"min"],m=p[d+"max"],y=p.colorscale;u(f+d+"auto",!(r(v)&&r(m)&&v=0;a--,o++)e=t[a],r[o]=[1-e[0],e[1]];return r}},{}],45:[function(t,e,n){"use strict";var r=t("./scales"),a=t("./default_scale"),o=t("./is_valid_scale_array");e.exports=function(t,e){function n(){try{t=r[t]||JSON.parse(t)}catch(n){t=e}}return e||(e=a),t?("string"==typeof t&&(n(),"string"==typeof t&&n()),o(t)?t:e):e}},{"./default_scale":41,"./is_valid_scale_array":49,"./scales":51}],46:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../../lib"),o=t("./is_valid_scale");e.exports=function(t,e){var n=e?a.nestedProperty(t,e).get()||{}:t,i=n.color,l=!1;if(Array.isArray(i))for(var s=0;s4/3-l?i:l}},{}],53:[function(t,e,n){"use strict";var r=t("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,n,o){return t="left"===n?0:"center"===n?1:"right"===n?2:r.constrain(Math.floor(3*t),0,2),e="bottom"===o?0:"middle"===o?1:"top"===o?2:r.constrain(Math.floor(3*e),0,2),a[e][t]}},{"../../lib":130}],54:[function(t,e,n){"use strict";function r(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function a(t){t._dragging=!1,t._replotPending&&o.plot(t)}var o=t("../../plotly"),i=t("../../lib"),l=t("../../plots/cartesian/constants"),s=t("../../constants/interactions"),u=e.exports={};u.align=t("./align"),u.getCursor=t("./cursor");var c=t("./unhover");u.unhover=c.wrapped,u.unhoverRaw=c.raw,u.init=function(t){function e(e){return t.element.onmousemove=g,v._dragged=!1,v._dragging=!0,c=e.clientX,f=e.clientY,p=e.target,d=(new Date).getTime(),d-v._mouseDownTimey&&(m=Math.max(m-1,1)),t.doneFn&&t.doneFn(v._dragged,m,e),!v._dragged){var n;try{n=new MouseEvent("click",e)}catch(t){n=document.createEvent("MouseEvents"),n.initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}p.dispatchEvent(n)}return a(v),v._dragged=!1,i.pauseEvent(e)}var c,f,d,h,p,g,v=i.getPlotDiv(t.element)||{},m=1,y=s.DBLCLICKDELAY;v._mouseDownTime||(v._mouseDownTime=0),g=t.element.onmousemove,t.setCursor&&(t.element.onmousemove=t.setCursor),t.element.onmousedown=e,t.element.style.pointerEvents="all"},u.coverSlip=r},{"../../constants/interactions":116,"../../lib":130,"../../plotly":160,"../../plots/cartesian/constants":170,"./align":52,"./cursor":53,"./unhover":55}],55:[function(t,e,n){"use strict";var r=t("../../lib/events"),a=e.exports={};a.wrapped=function(t,e,n){"string"==typeof t&&(t=document.getElementById(t)),t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),a.raw(t,e,n)},a.raw=function(t,e){var n=t._fullLayout,a=t._hoverdata;e||(e={}),e.target&&!1===r.triggerHandler(t,"plotly_beforehover",e)||(n._hoverlayer.selectAll("g").remove(),t._hoverdata=void 0,e.target&&a&&t.emit("plotly_unhover",{event:e,points:a}))}},{"../../lib/events":125}],56:[function(t,e,n){"use strict";function r(t,e,n,r,a,o,i){if(l.traceIs(n,"symbols")){var u=p(n);e.attr("d",function(t){var e;e="various"===t.ms||"various"===o.size?3:h.isBubble(n)?u(t.ms):(o.size||6)/2,t.mrc=e;var r=g.symbolNumber(t.mx||o.symbol)||0,a=r%100;return t.om=r%200>=100,g.symbolFuncs[a](e)+(r>=200?y:"")}).style("opacity",function(t){return(t.mo+1||o.opacity+1)-1})}var c,f,d;t.so?(d=i.outlierwidth,f=i.outliercolor,c=o.outliercolor):(d=(t.mlw+1||i.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,f="mlc"in t?t.mlcc=a(t.mlc):Array.isArray(i.color)?s.defaultLine:i.color,c="mc"in t?t.mcc=r(t.mc):Array.isArray(o.color)?s.defaultLine:o.color||"rgba(0,0,0,0)"),t.om?e.call(s.stroke,c).style({"stroke-width":(d||1)+"px",fill:"none"}):(e.style("stroke-width",d+"px").call(s.fill,c),d&&e.call(s.stroke,f))}function a(t,e,n,r){var a=t[0]-e[0],i=t[1]-e[1],l=n[0]-e[0],s=n[1]-e[1],u=Math.pow(a*a+i*i,b/2),c=Math.pow(l*l+s*s,b/2),f=(c*c*a-u*u*l)*r,d=(c*c*i-u*u*s)*r,h=3*c*(u+c),p=3*u*(u+c);return[[o.round(e[0]+(h&&f/h),2),o.round(e[1]+(h&&d/h),2)],[o.round(e[0]-(p&&f/p),2),o.round(e[1]-(p&&d/p),2)]]}var o=t("d3"),i=t("fast-isnumeric"),l=t("../../registry"),s=t("../color"),u=t("../colorscale"),c=t("../../lib"),f=t("../../lib/svg_text_utils"),d=t("../../constants/xmlns_namespaces"),h=t("../../traces/scatter/subtypes"),p=t("../../traces/scatter/make_bubble_size_func"),g=e.exports={};g.font=function(t,e,n,r){e&&e.family&&(r=e.color,n=e.size,e=e.family),e&&t.style("font-family",e),n+1&&t.style("font-size",n+"px"),r&&t.call(s.fill,r)},g.setPosition=function(t,e,n){t.attr("x",e).attr("y",n)},g.setSize=function(t,e,n){t.attr("width",e).attr("height",n)},g.setRect=function(t,e,n,r,a){t.call(g.setPosition,e,n).call(g.setSize,r,a)},g.translatePoint=function(t,e,n,r){var a=t.xp||n.c2p(t.x),o=t.yp||r.c2p(t.y);i(a)&&i(o)&&e.node()?"text"===e.node().nodeName?e.attr("x",a).attr("y",o):e.attr("transform","translate("+a+","+o+")"):e.remove()},g.translatePoints=function(t,e,n,r){t.each(function(t){var a=o.select(this);g.translatePoint(t,a,e,n,r)})},g.getPx=function(t,e){return Number(t.style(e).replace(/px$/,""))},g.crispRound=function(t,e,n){return e&&i(e)?t._context.staticPlot?e:e<1?1:Math.round(e):n||0},g.singleLineStyle=function(t,e,n,r,a){e.style("fill","none");var o=(((t||[])[0]||{}).trace||{}).line||{},i=n||o.width||0,l=a||o.dash||"";s.stroke(e,r||o.color),g.dashLine(e,l,i)},g.lineGroupStyle=function(t,e,n,r){t.style("fill","none").each(function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},i=e||a.width||0,l=r||a.dash||"";o.select(this).call(s.stroke,n||a.color).call(g.dashLine,l,i)})},g.dashLine=function(t,e,n){n=+n||0;var r=Math.max(n,3);"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t.style({"stroke-dasharray":e,"stroke-width":n+"px"})},g.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(e){var n=o.select(this);try{n.call(s.fill,e[0].trace.fillcolor)}catch(e){c.error(e,t),n.remove()}})};var v=t("./symbol_defs");g.symbolNames=[],g.symbolFuncs=[],g.symbolNeedLines={},g.symbolNoDot={},g.symbolList=[],Object.keys(v).forEach(function(t){var e=v[t];g.symbolList=g.symbolList.concat([e.n,t,e.n+100,t+"-open"]),g.symbolNames[e.n]=t,g.symbolFuncs[e.n]=e.f,e.needLine&&(g.symbolNeedLines[e.n]=!0),e.noDot?g.symbolNoDot[e.n]=!0:g.symbolList=g.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"])});var m=g.symbolNames.length,y="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";g.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=g.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=m||t>=400?0:Math.floor(Math.max(t,0))},g.singlePointStyle=function(t,e,n){var a=n.marker,o=a.line;r(t,e,n,g.tryColorscale(a,""),g.tryColorscale(a,"line"),a,o)},g.pointStyle=function(t,e){if(t.size()){var n=e.marker,r=g.tryColorscale(n,""),a=g.tryColorscale(n,"line");t.each(function(t){g.singlePointStyle(t,o.select(this),e,r,a)})}},g.tryColorscale=function(t,e){var n=e?c.nestedProperty(t,e).get():t,r=n.colorscale,a=n.color;return r&&Array.isArray(a)?u.makeColorScaleFunc(u.extractScale(r,n.cmin,n.cmax)):c.identity};var x={start:1,end:-1,middle:0,bottom:1,top:-1};g.textPointStyle=function(t,e){t.each(function(t){var n=o.select(this),r=t.tx||e.text;if(!r||Array.isArray(r))return void n.remove();var a=t.tp||e.textposition,l=-1!==a.indexOf("top")?"top":-1!==a.indexOf("bottom")?"bottom":"middle",s=-1!==a.indexOf("left")?"end":-1!==a.indexOf("right")?"start":"middle",u=t.ts||e.textfont.size,c=t.mrc?t.mrc/.8+1:0;u=i(u)&&u>0?u:0,n.call(g.font,t.tf||e.textfont.family,u,t.tc||e.textfont.color).attr("text-anchor",s).text(r).call(f.convertToTspans);var d=o.select(this.parentNode),h=n.selectAll("tspan.line"),p=1.3*((h[0].length||1)-1)+1,v=x[s]*c,m=.75*u+x[l]*c+(x[l]-1)*p*u/2;d.attr("transform","translate("+v+","+m+")"),p>1&&h.attr({x:n.attr("x"),y:n.attr("y")})})};var b=.5;g.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var n,r="M"+t[0],o=[];for(n=1;n=1e4&&(o.selectAll("[data-bb]").attr("data-bb",null),k=[]),t.setAttribute("data-bb",k.length),k.push(s),c.extendFlat({},s)},g.setClipUrl=function(t,e){if(!e)return void t.attr("clip-path",null);var n="#"+e,r=o.select("base");r.size()&&r.attr("href")&&(n=window.location.href.split("#")[0]+n),t.attr("clip-path","url("+n+")")},g.getTranslate=function(t){var e=t.attr?"attr":"getAttribute",n=t[e]("transform")||"",r=n.replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,n){return[e,n].join(" ")}).split(" ");return{x:+r[0]||0,y:+r[1]||0}},g.setTranslate=function(t,e,n){var r=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",o=t[r]("transform")||"";return e=e||0,n=n||0,o=o.replace(/(\btranslate\(.*?\);?)/,"").trim(),o+=" translate("+e+", "+n+")",o=o.trim(),t[a]("transform",o),o},g.getScale=function(t){var e=t.attr?"attr":"getAttribute",n=t[e]("transform")||"",r=n.replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,n){return[e,n].join(" ")}).split(" ");return{x:+r[0]||1,y:+r[1]||1}},g.setScale=function(t,e,n){var r=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",o=t[r]("transform")||"";return e=e||1,n=n||1,o=o.replace(/(\bscale\(.*?\);?)/,"").trim(),o+=" scale("+e+", "+n+")",o=o.trim(),t[a]("transform",o),o},g.setPointGroupScale=function(t,e,n){var r,a,o;return e=e||1,n=n||1,a=1===e&&1===n?"":" scale("+e+","+n+")",o=/\s*sc.*/,t.each(function(){r=(this.getAttribute("transform")||"").replace(o,""),r+=a,r=r.trim(),this.setAttribute("transform",r)}),a}},{"../../constants/xmlns_namespaces":119,"../../lib":130,"../../lib/svg_text_utils":147,"../../registry":200,"../../traces/scatter/make_bubble_size_func":235,"../../traces/scatter/subtypes":240,"../color":33,"../colorscale":47,"./symbol_defs":57,d3:15,"fast-isnumeric":18}],57:[function(t,e,n){"use strict";var r=t("d3");e.exports={circle:{n:0,f:function(t){var e=r.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=r.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=r.round(.4*t,2),n=r.round(1.2*t,2);return"M"+n+","+e+"H"+e+"V"+n+"H-"+e+"V"+e+"H-"+n+"V-"+e+"H-"+e+"V-"+n+"H"+e+"V-"+e+"H"+n+"Z"}},x:{n:4,f:function(t){var e=r.round(.8*t/Math.sqrt(2),2),n="l"+e+","+e,a="l"+e+",-"+e,o="l-"+e+",-"+e,i="l-"+e+","+e;return"M0,"+e+n+a+o+a+o+i+o+i+n+i+n+"Z"}},"triangle-up":{n:5,f:function(t){var e=r.round(2*t/Math.sqrt(3),2);return"M-"+e+","+r.round(t/2,2)+"H"+e+"L0,-"+r.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=r.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+r.round(t/2,2)+"H"+e+"L0,"+r.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=r.round(2*t/Math.sqrt(3),2);return"M"+r.round(t/2,2)+",-"+e+"V"+e+"L-"+r.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=r.round(2*t/Math.sqrt(3),2);return"M-"+r.round(t/2,2)+",-"+e+"V"+e+"L"+r.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=r.round(.6*t,2),n=r.round(1.2*t,2);return"M-"+n+",-"+e+"H"+e+"V"+n+"Z"}},"triangle-se":{n:10,f:function(t){var e=r.round(.6*t,2),n=r.round(1.2*t,2);return"M"+e+",-"+n+"V"+e+"H-"+n+"Z"}},"triangle-sw":{n:11,f:function(t){var e=r.round(.6*t,2),n=r.round(1.2*t,2);return"M"+n+","+e+"H-"+e+"V-"+n+"Z"}},"triangle-nw":{n:12,f:function(t){var e=r.round(.6*t,2),n=r.round(1.2*t,2);return"M-"+e+","+n+"V-"+e+"H"+n+"Z"}},pentagon:{n:13,f:function(t){var e=r.round(.951*t,2),n=r.round(.588*t,2),a=r.round(-t,2),o=r.round(-.309*t,2);return"M"+e+","+o+"L"+n+","+r.round(.809*t,2)+"H-"+n+"L-"+e+","+o+"L0,"+a+"Z"}},hexagon:{n:14,f:function(t){var e=r.round(t,2),n=r.round(t/2,2),a=r.round(t*Math.sqrt(3)/2,2);return"M"+a+",-"+n+"V"+n+"L0,"+e+"L-"+a+","+n+"V-"+n+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=r.round(t,2),n=r.round(t/2,2),a=r.round(t*Math.sqrt(3)/2,2);return"M-"+n+","+a+"H"+n+"L"+e+",0L"+n+",-"+a+"H-"+n+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=r.round(.924*t,2),n=r.round(.383*t,2);return"M-"+n+",-"+e+"H"+n+"L"+e+",-"+n+"V"+n+"L"+n+","+e+"H-"+n+"L-"+e+","+n+"V-"+n+"Z"}},star:{n:17,f:function(t){ -var e=1.4*t,n=r.round(.225*e,2),a=r.round(.951*e,2),o=r.round(.363*e,2),i=r.round(.588*e,2),l=r.round(-e,2),s=r.round(-.309*e,2),u=r.round(.118*e,2),c=r.round(.809*e,2);return"M"+n+","+s+"H"+a+"L"+o+","+u+"L"+i+","+c+"L0,"+r.round(.382*e,2)+"L-"+i+","+c+"L-"+o+","+u+"L-"+a+","+s+"H-"+n+"L0,"+l+"Z"}},hexagram:{n:18,f:function(t){var e=r.round(.66*t,2),n=r.round(.38*t,2),a=r.round(.76*t,2);return"M-"+a+",0l-"+n+",-"+e+"h"+a+"l"+n+",-"+e+"l"+n+","+e+"h"+a+"l-"+n+","+e+"l"+n+","+e+"h-"+a+"l-"+n+","+e+"l-"+n+",-"+e+"h-"+a+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=r.round(t*Math.sqrt(3)*.8,2),n=r.round(.8*t,2),a=r.round(1.6*t,2),o=r.round(4*t,2),i="A "+o+","+o+" 0 0 1 ";return"M-"+e+","+n+i+e+","+n+i+"0,-"+a+i+"-"+e+","+n+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=r.round(t*Math.sqrt(3)*.8,2),n=r.round(.8*t,2),a=r.round(1.6*t,2),o=r.round(4*t,2),i="A "+o+","+o+" 0 0 1 ";return"M"+e+",-"+n+i+"-"+e+",-"+n+i+"0,"+a+i+e+",-"+n+"Z"}},"star-square":{n:21,f:function(t){var e=r.round(1.1*t,2),n=r.round(2*t,2),a="A "+n+","+n+" 0 0 1 ";return"M-"+e+",-"+e+a+"-"+e+","+e+a+e+","+e+a+e+",-"+e+a+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=r.round(1.4*t,2),n=r.round(1.9*t,2),a="A "+n+","+n+" 0 0 1 ";return"M-"+e+",0"+a+"0,"+e+a+e+",0"+a+"0,-"+e+a+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=r.round(.7*t,2),n=r.round(1.4*t,2);return"M0,"+n+"L"+e+",0L0,-"+n+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=r.round(1.4*t,2),n=r.round(.7*t,2);return"M0,"+n+"L"+e+",0L0,-"+n+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=r.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=r.round(t,2),n=r.round(t/Math.sqrt(2),2);return"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=r.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=r.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=r.round(1.3*t,2),n=r.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=r.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0},"x-thin":{n:34,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},asterisk:{n:35,f:function(t){var e=r.round(1.2*t,2),n=r.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n},needLine:!0,noDot:!0},hash:{n:36,f:function(t){var e=r.round(t/2,2),n=r.round(t,2);return"M"+e+","+n+"V-"+n+"m-"+n+",0V"+n+"M"+n+","+e+"H-"+n+"m0,-"+n+"H"+n},needLine:!0},"y-up":{n:37,f:function(t){var e=r.round(1.2*t,2),n=r.round(1.6*t,2),a=r.round(.8*t,2);return"M-"+e+","+a+"L0,0M"+e+","+a+"L0,0M0,-"+n+"L0,0"},needLine:!0,noDot:!0},"y-down":{n:38,f:function(t){var e=r.round(1.2*t,2),n=r.round(1.6*t,2),a=r.round(.8*t,2);return"M-"+e+",-"+a+"L0,0M"+e+",-"+a+"L0,0M0,"+n+"L0,0"},needLine:!0,noDot:!0},"y-left":{n:39,f:function(t){var e=r.round(1.2*t,2),n=r.round(1.6*t,2),a=r.round(.8*t,2);return"M"+a+","+e+"L0,0M"+a+",-"+e+"L0,0M-"+n+",0L0,0"},needLine:!0,noDot:!0},"y-right":{n:40,f:function(t){var e=r.round(1.2*t,2),n=r.round(1.6*t,2),a=r.round(.8*t,2);return"M-"+a+","+e+"L0,0M-"+a+",-"+e+"L0,0M"+n+",0L0,0"},needLine:!0,noDot:!0},"line-ew":{n:41,f:function(t){var e=r.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0},"line-ns":{n:42,f:function(t){var e=r.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0},"line-ne":{n:43,f:function(t){var e=r.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},"line-nw":{n:44,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0}}},{d3:15}],58:[function(t,e,n){"use strict";e.exports={visible:{valType:"boolean"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"]},symmetric:{valType:"boolean"},array:{valType:"data_array"},arrayminus:{valType:"data_array"},value:{valType:"number",min:0,dflt:10},valueminus:{valType:"number",min:0,dflt:10},traceref:{valType:"integer",min:0,dflt:0},tracerefminus:{valType:"integer",min:0,dflt:0},copy_ystyle:{valType:"boolean"},copy_zstyle:{valType:"boolean"},color:{valType:"color"},thickness:{valType:"number",min:0,dflt:2},width:{valType:"number",min:0},_deprecated:{opacity:{valType:"number"}}}},{}],59:[function(t,e,n){"use strict";function r(t,e,n,r){var o=e["error_"+r]||{},s=o.visible&&-1!==["linear","log"].indexOf(n.type),u=[];if(s){for(var c=l(o),f=0;f0;t.each(function(t){var e,f=t[0].trace,d=f.error_x||{},h=f.error_y||{};f.ids&&(e=function(t){return t.id});var p=i.hasMarkers(f)&&f.marker.maxdisplayed>0;if(h.visible||d.visible){var g=a.select(this).selectAll("g.errorbar").data(t,e);g.exit().remove(),g.style("opacity",1);var v=g.enter().append("g").classed("errorbar",!0);c&&v.style("opacity",0).transition().duration(n.duration).style("opacity",1),g.each(function(t){var e=a.select(this),i=r(t,s,u);if(!p||t.vis){var f;if(h.visible&&o(i.x)&&o(i.yh)&&o(i.ys)){var g=h.width;f="M"+(i.x-g)+","+i.yh+"h"+2*g+"m-"+g+",0V"+i.ys,i.noYS||(f+="m-"+g+",0h"+2*g);var v=e.select("path.yerror");l=!v.size(),l?v=e.append("path").classed("yerror",!0):c&&(v=v.transition().duration(n.duration).ease(n.easing)),v.attr("d",f)}if(d.visible&&o(i.y)&&o(i.xh)&&o(i.xs)){var m=(d.copy_ystyle?h:d).width;f="M"+i.xh+","+(i.y-m)+"v"+2*m+"m0,-"+m+"H"+i.xs,i.noXS||(f+="m0,-"+m+"v"+2*m);var y=e.select("path.xerror");l=!y.size(),l?y=e.append("path").classed("xerror",!0):c&&(y=y.transition().duration(n.duration).ease(n.easing)),y.attr("d",f)}}})}})}},{"../../traces/scatter/subtypes":240,d3:15,"fast-isnumeric":18}],64:[function(t,e,n){"use strict";var r=t("d3"),a=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,n=e.error_y||{},o=e.error_x||{},i=r.select(this);i.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(a.stroke,n.color),o.copy_ystyle&&(o=n),i.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(a.stroke,o.color)})}},{"../color":33,d3:15}],65:[function(t,e,n){"use strict";var r=t("../../plots/cartesian/constants");e.exports={_isLinkedToArray:"image",visible:{valType:"boolean",dflt:!0},source:{valType:"string"},layer:{valType:"enumerated",values:["below","above"],dflt:"above"},sizex:{valType:"number",dflt:0},sizey:{valType:"number",dflt:0},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain"},opacity:{valType:"number",min:0,max:1,dflt:1},x:{valType:"any",dflt:0},y:{valType:"any",dflt:0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top"},xref:{valType:"enumerated",values:["paper",r.idRegex.x.toString()],dflt:"paper"},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],dflt:"paper"}}},{"../../plots/cartesian/constants":170}],66:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../../lib/to_log_range");e.exports=function(t,e,n,o){e=e||{};var i="log"===n&&"linear"===e.type,l="linear"===n&&"log"===e.type;if(i||l)for(var s,u,c=t._fullLayout.images,f=e._id.charAt(0),d=0;d=2/3},n.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},n.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3},n.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],71:[function(t,e,n){"use strict";var r=t("../../plots/font_attributes"),a=t("../color/attributes"),o=t("../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.defaultLine},borderwidth:{valType:"number",min:0,dflt:0},font:o({},r,{}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"]},tracegroupgap:{valType:"number",min:0,dflt:10},x:{valType:"number",min:-2,max:3,dflt:1.02},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"}}},{"../../lib/extend":126,"../../plots/font_attributes":189,"../color/attributes":32}],72:[function(t,e,n){"use strict";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4}},{}],73:[function(t,e,n){"use strict";var r=t("../../registry"),a=t("../../lib"),o=t("./attributes"),i=t("../../plots/layout_attributes"),l=t("./helpers");e.exports=function(t,e,n){function s(t,e){return a.coerce(h,p,o,t,e)}for(var u,c,f,d,h=t.legend||{},p=e.legend={},g=0,v="normal",m=0;m1)){if(s("bgcolor",e.paper_bgcolor),s("bordercolor"),s("borderwidth"),a.coerceFont(s,"font",e.font),s("orientation"),"h"===p.orientation){var x=t.xaxis;x&&x.rangeslider&&x.rangeslider.visible?(u=0,f="left",c=1.1,d="bottom"):(u=0,f="left",c=-.1,d="top")}s("traceorder",v),l.isGrouped(e.legend)&&s("tracegroupgap"),s("x",u),s("xanchor",f),s("y",c),s("yanchor",d),a.noneOrAll(h,p,["x","y"])}}},{"../../lib":130,"../../plots/layout_attributes":191,"../../registry":200,"./attributes":71,"./helpers":76}],74:[function(t,e,n){"use strict";function r(t,e){function n(n){y.convertToTspans(n,function(){n.selectAll("tspan.line").attr({x:n.attr("x")}),t.call(i,e)})}var r=t.data()[0][0],a=e._fullLayout,o=r.trace,l=p.traceIs(o,"pie"),s=o.index,u=l?r.label:o.name,c=t.selectAll("text.legendtext").data([0]);c.enter().append("text").classed("legendtext",!0),c.attr({x:40,y:0,"data-unformatted":u}).style("text-anchor","start").classed("user-select-none",!0).call(v.font,a.legend.font).text(u),e._context.editable&&!l?c.call(y.makeEditable).call(n).on("edit",function(t){this.attr({"data-unformatted":t}),this.text(t).call(n),this.text()||(t=" ");var a,o=r.trace._fullInput||{};if(-1!==["ohlc","candlestick"].indexOf(o.type)){var i=r.trace.transforms;a=i[i.length-1].direction+".name"}else a="name";f.restyle(e,a,t,s)}):c.call(n)}function a(t,e){var n,r=1,a=t.selectAll("rect").data([0]);a.enter().append("rect").classed("legendtoggle",!0).style("cursor","pointer").attr("pointer-events","all").call(m.fill,"rgba(0,0,0,0)"),a.on("mousedown",function(){n=(new Date).getTime(),n-e._legendMouseDownTimeT&&(r=Math.max(r-1,1)),1===r?n._clickTimeout=setTimeout(function(){o(t,e,r)},T):2===r&&(n._clickTimeout&&clearTimeout(n._clickTimeout),e._legendMouseDownTime=0,o(t,e,r))}})}function o(t,e,n){if(!e._dragged&&!e._editing){var r,a,o=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],i=t.data()[0][0],l=e._fullData,s=i.trace,u=s.legendgroup,c=[];if(1===n&&A&&e.data&&e._context.showTips?(d.notifier("Double click on legend to isolate individual trace","long"),A=!1):A=!1,p.traceIs(s,"pie")){var h=i.label,g=o.indexOf(h);1===n?-1===g?o.push(h):o.splice(g,1):2===n&&(o=[],e.calcdata[0].forEach(function(t){h!==t.label&&o.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===o.length&&-1===g&&(o=[])),f.relayout(e,"hiddenlabels",o)}else{var v,m=[],y=[];for(v=0;vtspan"),f=c[0].length||1;n=l*f,r=u.node()&&v.bBox(u.node()).width;var d=l*(.3+(1-f)/2);u.attr("y",d),c.attr("y",d)}n=Math.max(n,16)+3,a.height=n,a.width=r}function l(t,e,n){var r=t._fullLayout,a=r.legend,o=a.borderwidth,i=k.isGrouped(a);if(k.isVertical(a))i&&e.each(function(t,e){v.setTranslate(this,0,e*a.tracegroupgap)}),a.width=0,a.height=0,n.each(function(t){var e=t[0],n=e.height,r=e.width;v.setTranslate(this,o,5+o+a.height+n/2),a.height+=n,a.width=Math.max(a.width,r)}),a.width+=45+2*o,a.height+=10+2*o,i&&(a.height+=(a._lgroupsLength-1)*a.tracegroupgap),a.width=Math.ceil(a.width),a.height=Math.ceil(a.height),n.each(function(e){var n=e[0];c.select(this).select(".legendtoggle").call(v.setRect,0,-n.height/2,(t._context.editable?0:a.width)+40,n.height)});else if(i){a.width=0,a.height=0;for(var l=[a.width],s=e.data(),u=0,f=s.length;ur.width-(r.margin.r+r.margin.l)&&(y=0,p+=g,a.height=a.height+g,g=0),v.setTranslate(this,o+y,5+o+e.height/2+p),a.width+=i+n,a.height=Math.max(a.height,e.height),y+=i+n,g=Math.max(e.height,g)}),a.width+=2*o,a.height+=10+2*o,a.width=Math.ceil(a.width),a.height=Math.ceil(a.height),n.each(function(e){var n=e[0];c.select(this).select(".legendtoggle").call(v.setRect,0,-n.height/2,t._context.editable?0:a.width,n.height)})}}function s(t){var e=t._fullLayout,n=e.legend,r="left";M.isRightAnchor(n)?r="right":M.isCenterAnchor(n)&&(r="center");var a="top";M.isBottomAnchor(n)?a="bottom":M.isMiddleAnchor(n)&&(a="middle"),h.autoMargin(t,"legend",{x:n.x,y:n.y,l:n.width*({right:1,center:.5}[r]||0),r:n.width*({left:1,center:.5}[r]||0),b:n.height*({top:1,middle:.5}[a]||0),t:n.height*({bottom:1,middle:.5}[a]||0)})}function u(t){var e=t._fullLayout,n=e.legend,r="left";M.isRightAnchor(n)?r="right":M.isCenterAnchor(n)&&(r="center"),h.autoMargin(t,"legend",{x:n.x,y:.5,l:n.width*({right:1,center:.5}[r]||0),r:n.width*({left:1,center:.5}[r]||0),b:0,t:0})}var c=t("d3"),f=t("../../plotly"),d=t("../../lib"),h=t("../../plots/plots"),p=t("../../registry"),g=t("../dragelement"),v=t("../drawing"),m=t("../color"),y=t("../../lib/svg_text_utils"),x=t("./constants"),b=t("../../constants/interactions"),_=t("./get_legend_data"),w=t("./style"),k=t("./helpers"),M=t("./anchor_utils"),A=!0,T=b.DBLCLICKDELAY;e.exports=function(t){function e(t,e){z.attr("data-scroll",e).call(v.setTranslate,0,e),S.call(v.setRect,F,t,x.scrollBarWidth,x.scrollBarHeight),L.select("rect").attr({y:y.borderwidth-e})}var n=t._fullLayout,i="legend"+n._uid;if(n._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var y=n.legend,b=n.showlegend&&_(t.calcdata,y),k=n.hiddenlabels||[];if(!n.showlegend||!b.length)return n._infolayer.selectAll(".legend").remove(),n._topdefs.select("#"+i).remove(),void h.autoMargin(t,"legend");var A=n._infolayer.selectAll("g.legend").data([0]);A.enter().append("g").attr({class:"legend","pointer-events":"all"});var L=n._topdefs.selectAll("#"+i).data([0]);L.enter().append("clipPath").attr("id",i).append("rect");var C=A.selectAll("rect.bg").data([0]);C.enter().append("rect").attr({class:"bg","shape-rendering":"crispEdges"}),C.call(m.stroke,y.bordercolor),C.call(m.fill,y.bgcolor),C.style("stroke-width",y.borderwidth+"px");var z=A.selectAll("g.scrollbox").data([0]);z.enter().append("g").attr("class","scrollbox");var S=A.selectAll("rect.scrollbar").data([0]);S.enter().append("rect").attr({class:"scrollbar",rx:20,ry:2,width:0,height:0}).call(m.fill,"#808BA4");var O=z.selectAll("g.groups").data(b);O.enter().append("g").attr("class","groups"),O.exit().remove();var N=O.selectAll("g.traces").data(d.identity);N.enter().append("g").attr("class","traces"),N.exit().remove(),N.call(w).style("opacity",function(t){var e=t[0].trace;return p.traceIs(e,"pie")?-1!==k.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1}).each(function(){c.select(this).call(r,t).call(a,t)});var D=0!==A.enter().size();D&&(l(t,O,N),s(t));var P=n.width,E=n.height;l(t,O,N),y.height>E?u(t):s(t);var R=n._size,I=R.l+R.w*y.x,j=R.t+R.h*(1-y.y);M.isRightAnchor(y)?I-=y.width:M.isCenterAnchor(y)&&(I-=y.width/2),M.isBottomAnchor(y)?j-=y.height:M.isMiddleAnchor(y)&&(j-=y.height/2);var F=y.width,q=R.w;F>q?(I=R.l,F=q):(I+F>P&&(I=P-F),I<0&&(I=0),F=Math.min(P-I,y.width));var B=y.height,H=R.h;B>H?(j=R.t,B=H):(j+B>E&&(j=E-B),j<0&&(j=0),B=Math.min(E-j,y.height)),v.setTranslate(A,I,j);var V,X,U=B-x.scrollBarHeight-2*x.scrollBarMargin,Y=y.height-B;if(y.height<=B||t._context.staticPlot)C.attr({width:F-y.borderwidth,height:B-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),v.setTranslate(z,0,0),L.select("rect").attr({width:F-2*y.borderwidth,height:B-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth}),z.call(v.setClipUrl,i);else{V=x.scrollBarMargin,X=z.attr("data-scroll")||0,C.attr({width:F-2*y.borderwidth+x.scrollBarWidth+x.scrollBarMargin,height:B-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),L.select("rect").attr({width:F-2*y.borderwidth+x.scrollBarWidth+x.scrollBarMargin,height:B-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth-X}),z.call(v.setClipUrl,i),D&&e(V,X),A.on("wheel",null),A.on("wheel",function(){X=d.constrain(z.attr("data-scroll")-c.event.deltaY/U*Y,-Y,0),V=x.scrollBarMargin-X/Y*U,e(V,X),c.event.preventDefault()}),S.on(".drag",null),z.on(".drag",null);var G=c.behavior.drag().on("drag",function(){V=d.constrain(c.event.y-x.scrollBarHeight/2,x.scrollBarMargin,x.scrollBarMargin+U),X=-(V-x.scrollBarMargin)/U*Y,e(V,X)});S.call(G),z.call(G)}if(t._context.editable){var Z,W,$,Q;A.classed("cursor-move",!0),g.init({element:A.node(),prepFn:function(){var t=v.getTranslate(A);$=t.x,Q=t.y},moveFn:function(t,e){var n=$+t,r=Q+e;v.setTranslate(A,n,r),Z=g.align(n,0,R.l,R.l+R.w,y.xanchor),W=g.align(r,0,R.t+R.h,R.t,y.yanchor)},doneFn:function(e,r,a){if(e&&void 0!==Z&&void 0!==W)f.relayout(t,{"legend.x":Z,"legend.y":W});else{var i=n._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return a.clientX>=t.left&&a.clientX<=t.right&&a.clientY>=t.top&&a.clientY<=t.bottom});i.size()>0&&(1===r?A._clickTimeout=setTimeout(function(){o(i,t,r)},T):2===r&&(A._clickTimeout&&clearTimeout(A._clickTimeout),o(i,t,r)))}}})}}}},{"../../constants/interactions":116,"../../lib":130,"../../lib/svg_text_utils":147,"../../plotly":160,"../../plots/plots":193,"../../registry":200,"../color":33,"../dragelement":54,"../drawing":56,"./anchor_utils":70,"./constants":72,"./get_legend_data":75,"./helpers":76,"./style":78,d3:15}],75:[function(t,e,n){"use strict";var r=t("../../registry"),a=t("./helpers");e.exports=function(t,e){function n(t,n){if(""!==t&&a.isGrouped(e))-1===s.indexOf(t)?(s.push(t),u=!0,l[t]=[[n]]):l[t].push([n]);else{var r="~~i"+f;s.push(r),l[r]=[[n]],f++}}var o,i,l={},s=[],u=!1,c={},f=0;for(o=0;on[1])return n[1]}return a}function n(t){return t[0]}var r,a,o=t[0],i=o.trace,l=h.hasMarkers(i),u=h.hasText(i),d=h.hasLines(i);if(l||u||d){var p={},g={};l&&(p.mc=e("marker.color",n),p.mo=e("marker.opacity",c.mean,[.2,1]),p.ms=e("marker.size",c.mean,[2,16]),p.mlc=e("marker.line.color",n),p.mlw=e("marker.line.width",c.mean,[0,5]),g.marker={sizeref:1,sizemin:1,sizemode:"diameter"}),d&&(g.line={width:e("line.width",n,[0,10])}),u&&(p.tx="Aa",p.tp=e("textposition",n),p.ts=10,p.tc=e("textfont.color",n),p.tf=e("textfont.family",n)),r=[c.minExtend(o,p)],a=c.minExtend(i,g)}var v=s.select(this).select("g.legendpoints"),m=v.selectAll("path.scatterpts").data(l?r:[]);m.enter().append("path").classed("scatterpts",!0).attr("transform","translate(20,0)"),m.exit().remove(),m.call(f.pointStyle,a),l&&(r[0].mrc=3);var y=v.selectAll("g.pointtext").data(u?r:[]);y.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),y.exit().remove(),y.selectAll("text").call(f.textPointStyle,a)}function o(t){var e=t[0].trace,n=e.marker||{},r=n.line||{},a=s.select(this).select("g.legendpoints").selectAll("path.legendbar").data(u.traceIs(e,"bar")?[t]:[]);a.enter().append("path").classed("legendbar",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),a.exit().remove(),a.each(function(t){var e=s.select(this),a=t[0],o=(a.mlw+1||r.width+1)-1;e.style("stroke-width",o+"px").call(d.fill,a.mc||n.color),o&&e.call(d.stroke,a.mlc||r.color)})}function i(t){var e=t[0].trace,n=s.select(this).select("g.legendpoints").selectAll("path.legendbox").data(u.traceIs(e,"box")&&e.visible?[t]:[]);n.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),n.exit().remove(),n.each(function(){var t=e.line.width,n=s.select(this);n.style("stroke-width",t+"px").call(d.fill,e.fillcolor),t&&n.call(d.stroke,e.line.color)})}function l(t){var e=t[0].trace,n=s.select(this).select("g.legendpoints").selectAll("path.legendpie").data(u.traceIs(e,"pie")&&e.visible?[t]:[]);n.enter().append("path").classed("legendpie",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),n.exit().remove(),n.size()&&n.call(p,t[0],e)}var s=t("d3"),u=t("../../registry"),c=t("../../lib"),f=t("../drawing"),d=t("../color"),h=t("../../traces/scatter/subtypes"),p=t("../../traces/pie/style_one");e.exports=function(t){t.each(function(t){var e=s.select(this),n=e.selectAll("g.layers").data([0]);n.enter().append("g").classed("layers",!0),n.style("opacity",t[0].trace.opacity),n.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),n.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var r=n.selectAll("g.legendsymbols").data([t]);r.enter().append("g").classed("legendsymbols",!0),r.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0) -}).each(o).each(i).each(l).each(r).each(a)}},{"../../lib":130,"../../registry":200,"../../traces/pie/style_one":209,"../../traces/scatter/subtypes":240,"../color":33,"../drawing":56,d3:15}],79:[function(t,e,n){"use strict";function r(t,e){var n=e.currentTarget,r=n.getAttribute("data-attr"),a=n.getAttribute("data-val")||!0,o=t._fullLayout,i={};if("zoom"===r){for(var l,s,c="in"===a?.5:2,d=(1+c)/2,h=(1-c)/2,p=f.list(t,null,!0),g=0;g1)return r(["resetViews","toggleHover"]),i(v,n);c&&(r(["zoom3d","pan3d","orbitRotation","tableRotation"]),r(["resetCameraDefault3d","resetCameraLastSave3d"]),r(["hoverClosest3d"])),d&&(r(["zoomInGeo","zoomOutGeo","resetGeo"]),r(["hoverClosestGeo"]));var m=a(l),y=[];return((u||p)&&!m||g)&&(y=["zoom2d","pan2d"]),(u||g)&&o(s)&&(y.push("select2d"),y.push("lasso2d")),y.length&&r(y),!u&&!p||m||g||r(["zoomIn2d","zoomOut2d","autoScale2d","resetScale2d"]),u&&h?r(["toggleHover"]):p?r(["hoverClosestGl2d"]):u?r(["hoverClosestCartesian","hoverCompareCartesian"]):h&&r(["hoverClosestPie"]),i(v,n)}function a(t){for(var e=s.list({_fullLayout:t},null,!0),n=!0,r=0;r0)){var p=a(e,n,s);f("x",p[0]),f("y",p[1]),o.noneOrAll(t,e,["x","y"]),f("xanchor"),f("yanchor"),o.coerceFont(f,"font",n.font);var g=f("bgcolor");f("activecolor",i.contrast(g,u.lightAmount,u.darkAmount)),f("bordercolor"),f("borderwidth")}}},{"../../lib":130,"../color":33,"./attributes":83,"./button_attributes":84,"./constants":85}],87:[function(t,e,n){"use strict";function r(t){for(var e=m.list(t,"x",!0),n=[],r=0;rp&&(p=d)));return p>=h?[h,p]:void 0}}var a=t("../../lib"),o=t("../../plots/cartesian/axes"),i=t("./constants"),l=t("./helpers");e.exports=function(t){var e=t._fullLayout,n=a.filterVisible(e.shapes);if(n.length&&t._fullData.length)for(var l=0;lY&&r>G&&!t.shiftKey?p.getCursor(a/n,1-o/r):"move";g(e,i),U=i.split("-")[0]}function o(e){F=f.getFromId(t,n.xref),q=f.getFromId(t,n.yref),B=m.getDataToPixel(t,F),H=m.getDataToPixel(t,q,!0),V=m.getPixelToData(t,F),X=m.getPixelToData(t,q,!0);var o="shapes["+r+"]";"path"===n.type?(I=n.path,j=o+".path"):(v=B(n.x0),y=H(n.y0),x=B(n.x1),b=H(n.y1),_=o+".x0",w=o+".y0",k=o+".x1",M=o+".y1"),vG&&(h[z]=n[D]=X(u),h[S]=n[P]=X(c)),d-f>Y&&(h[O]=n[E]=V(f),h[N]=n[R]=V(d))}e.attr("d",i(t,n))}var h,v,y,x,b,_,w,k,M,A,T,L,C,z,S,O,N,D,P,E,R,I,j,F,q,B,H,V,X,U,Y=10,G=10,Z={setCursor:a,element:e.node(),prepFn:o,doneFn:l},W=Z.element.getBoundingClientRect();p.init(Z)}function i(t,e){var n,r,a,o,i=e.type,s=f.getFromId(t,e.xref),u=f.getFromId(t,e.yref),c=t._fullLayout._size;if(s?(n=m.shapePositionToRange(s),r=function(t){return s._offset+s.r2p(n(t,!0))}):r=function(t){return c.l+c.w*t},u?(a=m.shapePositionToRange(u),o=function(t){return u._offset+u.r2p(a(t,!0))}):o=function(t){return c.t+c.h*(1-t)},"path"===i)return s&&"date"===s.type&&(r=m.decodeDate(r)),u&&"date"===u.type&&(o=m.decodeDate(o)),l(e.path,r,o);var d=r(e.x0),h=r(e.x1),p=o(e.y0),g=o(e.y1);if("line"===i)return"M"+d+","+p+"L"+h+","+g;if("rect"===i)return"M"+d+","+p+"H"+h+"V"+g+"H"+d+"Z";var v=(d+h)/2,y=(p+g)/2,x=Math.abs(v-d),b=Math.abs(y-p),_="A"+x+","+b,w=v+x+","+y;return"M"+w+_+" 0 1,1 "+v+","+(y-b)+_+" 0 0,1 "+w+"Z"}function l(t,e,n){return t.replace(v.segmentRE,function(t){var r=0,a=t.charAt(0),o=v.paramIsX[a],i=v.paramIsY[a],l=v.numParams[a],s=t.substr(1).replace(v.paramRE,function(t){return o[r]?t=e(t):i[r]&&(t=n(t)),r++,r>l&&(t="X"),t});return r>l&&(s=s.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+t)),a+s})}function s(t,e,n){return t.replace(v.segmentRE,function(t){var r=0,a=t.charAt(0),o=v.paramIsX[a],i=v.paramIsY[a],l=v.numParams[a];return a+t.substr(1).replace(v.paramRE,function(t){return r>=l?t:(o[r]?t=e(t):i[r]&&(t=n(t)),r++,t)})})}var u=t("../../plotly"),c=t("../../lib"),f=t("../../plots/cartesian/axes"),d=t("../color"),h=t("../drawing"),p=t("../dragelement"),g=t("../../lib/setcursor"),v=t("./constants"),m=t("./helpers");e.exports={draw:r,drawOne:a}},{"../../lib":130,"../../lib/setcursor":145,"../../plotly":160,"../../plots/cartesian/axes":165,"../color":33,"../dragelement":54,"../drawing":56,"./constants":98,"./helpers":101}],101:[function(t,e,n){"use strict";n.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},n.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},n.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},n.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},n.getDataToPixel=function(t,e,r){var a,o=t._fullLayout._size;if(e){var i=n.shapePositionToRange(e);a=function(t){return e._offset+e.r2p(i(t,!0))},"date"===e.type&&(a=n.decodeDate(a))}else a=r?function(t){return o.t+o.h*(1-t)}:function(t){return o.l+o.w*t};return a},n.getPixelToData=function(t,e,r){var a,o=t._fullLayout._size;if(e){var i=n.rangeToShapePosition(e);a=function(t){return i(e.p2r(t-e._offset))}}else a=r?function(t){return 1-(t-o.t)/o.h}:function(t){return(t-o.l)/o.w};return a}},{}],102:[function(t,e,n){"use strict";var r=t("./draw");e.exports={moduleType:"component",name:"shapes",layoutAttributes:t("./attributes"),supplyLayoutDefaults:t("./defaults"),calcAutorange:t("./calc_autorange"),draw:r.draw,drawOne:r.drawOne}},{"./attributes":96,"./calc_autorange":97,"./defaults":99,"./draw":100}],103:[function(t,e,n){"use strict";var r=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./attributes"),i=t("./helpers");e.exports=function(t,e,n,l,s){function u(n,a){return r.coerce(t,e,o,n,a)}if(l=l||{},s=s||{},!u("visible",!s.itemIsNotPlainObject))return e;u("layer"),u("opacity"),u("fillcolor"),u("line.color"),u("line.width"),u("line.dash");for(var c=t.path?"path":"rect",f=u("type",c),d=["x","y"],h=0;h<2;h++){var p=d[h],g={_fullLayout:n},v=a.coerceRef(t,e,g,p,"","paper");if("path"!==f){var m,y,x;"paper"!==v?(m=a.getFromId(g,v),x=i.rangeToShapePosition(m),y=i.shapePositionToRange(m)):y=x=r.identity;var b=p+"0",_=p+"1",w=t[b],k=t[_];t[b]=y(t[b],!0),t[_]=y(t[_],!0),a.coercePosition(e,g,u,v,b,.25),a.coercePosition(e,g,u,v,_,.75),e[b]=x(e[b]),e[_]=x(e[_]),t[b]=w,t[_]=k}}return"path"===f?u("path"):r.noneOrAll(t,e,["x0","x1","y0","y1"]),e}},{"../../lib":130,"../../plots/cartesian/axes":165,"./attributes":96,"./helpers":101}],104:[function(t,e,n){"use strict";var r=t("../../plots/font_attributes"),a=t("../../plots/pad_attributes"),o=t("../../lib/extend").extendFlat,i=t("../../lib/extend").extendDeep,l=t("../../plots/animation_attributes"),s=t("./constants"),u={_isLinkedToArray:"step",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"}};e.exports={_isLinkedToArray:"slider",visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i({},a,{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:l.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:o({},r,{})},font:o({},r,{}),activebgcolor:{valType:"color",dflt:s.gripBgActiveColor},bgcolor:{valType:"color",dflt:s.railBgColor},bordercolor:{valType:"color",dflt:s.railBorderColor},borderwidth:{valType:"number",min:0,dflt:s.railBorderWidth},ticklen:{valType:"number",min:0,dflt:s.tickLength},tickcolor:{valType:"color",dflt:s.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:s.minorTickLength}}},{"../../lib/extend":126,"../../plots/animation_attributes":161,"../../plots/font_attributes":189,"../../plots/pad_attributes":192,"./constants":105}],105:[function(t,e,n){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,fontSizeToHeight:1.3,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],106:[function(t,e,n){"use strict";function r(t,e,n){function r(n,r){return o.coerce(t,e,l,n,r)}r("visible",a(t,e).length>0)&&(r("active"),r("x"),r("y"),o.noneOrAll(t,e,["x","y"]),r("xanchor"),r("yanchor"),r("len"),r("lenmode"),r("pad.t"),r("pad.r"),r("pad.b"),r("pad.l"),o.coerceFont(r,"font",n.font),r("currentvalue.visible")&&(r("currentvalue.xanchor"),r("currentvalue.prefix"),r("currentvalue.suffix"),r("currentvalue.offset"),o.coerceFont(r,"currentvalue.font",e.font)),r("transition.duration"),r("transition.easing"),r("bgcolor"),r("activebgcolor"),r("bordercolor"),r("borderwidth"),r("ticklen"),r("tickwidth"),r("tickcolor"),r("minorticklen"))}function a(t,e){function n(t,e){return o.coerce(r,a,c,t,e)}for(var r,a,i=t.steps||[],l=e.steps=[],s=0;s=n.steps.length&&(n.active=0),e.call(l,n).call(b,n).call(c,n).call(p,n).call(x,t,n).call(s,t,n),A.setTranslate(e,n.lx+n.pad.l,n.ly+n.pad.t),e.call(v,n,n.active/(n.steps.length-1),!1),e.call(l,n)}function l(t,e,n){if(e.currentvalue.visible){var r,a,o=t.selectAll("text").data([0]);switch(e.currentvalue.xanchor){case"right":r=e.inputAreaLength-C.currentValueInset-e.currentValueMaxWidth,a="left";break;case"center":r=.5*e.inputAreaLength,a="middle";break;default:r=C.currentValueInset,a="left"}o.enter().append("text").classed(C.labelClass,!0).classed("user-select-none",!0).attr("text-anchor",a);var i=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof n)i+=n;else{i+=e.steps[e.active].label}return e.currentvalue.suffix&&(i+=e.currentvalue.suffix),o.call(A.font,e.currentvalue.font).text(i).call(T.convertToTspans),A.setTranslate(o,r,e.currentValueHeight),o}}function s(t,e,n){var r=t.selectAll("rect."+C.gripRectClass).data([0]);r.enter().append("rect").classed(C.gripRectClass,!0).call(h,e,t,n).style("pointer-events","all"),r.attr({width:C.gripWidth,height:C.gripHeight,rx:C.gripRadius,ry:C.gripRadius}).call(M.stroke,n.bordercolor).call(M.fill,n.bgcolor).style("stroke-width",n.borderwidth+"px")}function u(t,e,n){var r=t.selectAll("text").data([0]);return r.enter().append("text").classed(C.labelClass,!0).classed("user-select-none",!0).attr("text-anchor","middle"),r.call(A.font,n.font).text(e.step.label).call(T.convertToTspans),r}function c(t,e){var n=t.selectAll("g."+C.labelsClass).data([0]);n.enter().append("g").classed(C.labelsClass,!0);var r=n.selectAll("g."+C.labelGroupClass).data(e.labelSteps);r.enter().append("g").classed(C.labelGroupClass,!0),r.exit().remove(),r.each(function(t){var n=w.select(this);n.call(u,t,e),A.setTranslate(n,m(e,t.fraction),C.tickOffset+e.ticklen+e.labelHeight+C.labelOffset+e.currentValueTotalHeight)})}function f(t,e,n,r,a){var o=Math.round(r*(n.steps.length-1));o!==n.active&&d(t,e,n,o,!0,a)}function d(t,e,n,r,a,o){var i=n.active;n._input.active=n.active=r;var s=n.steps[n.active];e.call(v,n,n.active/(n.steps.length-1),o),e.call(l,n),t.emit("plotly_sliderchange",{slider:n,step:n.steps[n.active],interaction:a,previousActive:i}),s&&s.method&&a&&(e._nextMethod?(e._nextMethod.step=s,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:s,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame(function(){var n=e._nextMethod.step;n.method&&(k.executeAPICommand(t,n.method,n.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function h(t,e,n){function r(){return n.data()[0]}var a=n.node(),o=w.select(e);t.on("mousedown",function(){var t=r();e.emit("plotly_sliderstart",{slider:t});var i=n.select("."+C.gripRectClass);w.event.stopPropagation(),w.event.preventDefault(),i.call(M.fill,t.activebgcolor);var l=y(t,w.mouse(a)[0]);f(e,n,t,l,!0),t._dragging=!0,o.on("mousemove",function(){var t=r(),o=y(t,w.mouse(a)[0]);f(e,n,t,o,!1)}),o.on("mouseup",function(){var t=r();t._dragging=!1,i.call(M.fill,t.bgcolor),o.on("mouseup",null),o.on("mousemove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})})})}function p(t,e){var n=t.selectAll("rect."+C.tickRectClass).data(e.steps);n.enter().append("rect").classed(C.tickRectClass,!0),n.exit().remove(),n.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),n.each(function(t,n){var r=n%e.labelStride==0,a=w.select(this);a.attr({height:r?e.ticklen:e.minorticklen}).call(M.fill,e.tickcolor),A.setTranslate(a,m(e,n/(e.steps.length-1))-.5*e.tickwidth,(r?C.tickOffset:C.minorTickOffset)+e.currentValueTotalHeight)})}function g(t){t.labelSteps=[];for(var e=t.steps.length,n=0;n0&&(i=i.transition().duration(e.transition.duration).ease(e.transition.easing)),i.attr("transform","translate("+(o-.5*C.gripWidth)+","+e.currentValueTotalHeight+")")}}function m(t,e){return t.inputAreaStart+C.stepInset+(t.inputAreaLength-2*C.stepInset)*Math.min(1,Math.max(0,e))}function y(t,e){return Math.min(1,Math.max(0,(e-C.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*C.stepInset-2*t.inputAreaStart)))}function x(t,e,n){var r=t.selectAll("rect."+C.railTouchRectClass).data([0]);r.enter().append("rect").classed(C.railTouchRectClass,!0).call(h,e,t,n).style("pointer-events","all"),r.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,C.tickOffset+n.ticklen+n.labelHeight)}).call(M.fill,n.bgcolor).attr("opacity",0),A.setTranslate(r,0,n.currentValueTotalHeight)}function b(t,e){var n=t.selectAll("rect."+C.railRectClass).data([0]);n.enter().append("rect").classed(C.railRectClass,!0);var r=e.inputAreaLength-2*C.railInset;n.attr({width:r,height:C.railWidth,rx:C.railRadius,ry:C.railRadius,"shape-rendering":"crispEdges"}).call(M.stroke,e.bordercolor).call(M.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),A.setTranslate(n,C.railInset,.5*(e.inputAreaWidth-C.railWidth)+e.currentValueTotalHeight)}function _(t){for(var e=t._fullLayout._pushmargin||{},n=Object.keys(e),r=0;r0?[0]:[]);if(l.enter().append("g").classed(C.containerClassName,!0).style("cursor","ew-resize"),l.exit().remove(),l.exit().size()&&_(t),0!==n.length){var s=l.selectAll("g."+C.groupClassName).data(n,a);s.enter().append("g").classed(C.groupClassName,!0),s.exit().each(function(e){w.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,k.autoMargin(t,C.autoMarginIdRoot+e._index)});for(var u=0;u0||d<0){var g={left:[-n,0],right:[n,0],top:[0,-n],bottom:[0,n]}[x.side];e.attr("transform","translate("+g+")")}}}var g=n.propContainer,v=n.propName,m=n.traceIndex,y=n.dfltName,x=n.avoid||{},b=n.attributes,_=n.transform,w=n.containerGroup,k=t._fullLayout,M=g.titlefont.family,A=g.titlefont.size,T=g.titlefont.color,L=1,C=!1,z=g.title.trim();""===z&&(L=0),z.match(/Click to enter .+ title/)&&(L=.2,C=!0),w||(w=k._infolayer.selectAll(".g-"+e).data([0]),w.enter().append("g").classed("g-"+e,!0));var S=w.selectAll("text").data([0]);S.enter().append("text"),S.text(z).attr("class",e),S.attr({"data-unformatted":z}).call(d);var O="Click to enter "+y+" title";t._context.editable?(z?S.on(".opacity",null):function(){L=0,C=!0,z=O,S.attr({"data-unformatted":z}).text(z).on("mouseover.opacity",function(){r.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)})}(),S.call(c.makeEditable).on("edit",function(e){void 0!==m?o.restyle(t,v,e,m):o.relayout(t,v,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(d)}).on("input",function(t){this.text(t||" ").attr(b).selectAll("tspan.line").attr(b)})):z&&!z.match(/Click to enter .+ title/)||S.remove(),S.classed("js-placeholder",C)}},{"../../constants/interactions":116,"../../lib":130,"../../lib/svg_text_utils":147,"../../plotly":160,"../../plots/plots":193,"../color":33,"../drawing":56,d3:15,"fast-isnumeric":18}],110:[function(t,e,n){"use strict";var r=t("../../plots/font_attributes"),a=t("../color/attributes"),o=t("../../lib/extend").extendFlat,i=t("../../plots/pad_attributes"),l={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""}};e.exports={_isLinkedToArray:"updatemenu",_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:l,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:o({},i,{}),font:o({},r,{}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1}}},{"../../lib/extend":126,"../../plots/font_attributes":189,"../../plots/pad_attributes":192,"../color/attributes":32}],111:[function(t,e,n){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,fontSizeToHeight:1.3,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF"}},{}],112:[function(t,e,n){"use strict";function r(t,e,n){function r(n,r){return o.coerce(t,e,l,n,r)}r("visible",a(t,e).length>0)&&(r("active"),r("direction"),r("type"),r("showactive"),r("x"),r("y"),o.noneOrAll(t,e,["x","y"]),r("xanchor"),r("yanchor"),r("pad.t"),r("pad.r"),r("pad.b"),r("pad.l"),o.coerceFont(r,"font",n.font),r("bgcolor",n.paper_bgcolor),r("bordercolor"),r("borderwidth"))}function a(t,e){function n(t,e){return o.coerce(r,a,c,t,e)}for(var r,a,i=t.buttons||[],l=e.buttons=[],s=0;s0?[0]:[]);if(o.enter().append("g").classed(C.containerClassName,!0).style("cursor","pointer"),o.exit().remove(),o.exit().size()&&_(t),0!==n.length){var c=o.selectAll("g."+C.headerGroupClassName).data(n,a);c.enter().append("g").classed(C.headerGroupClassName,!0);var f=o.selectAll("g."+C.dropdownButtonGroupClassName).data([0]);f.enter().append("g").classed(C.dropdownButtonGroupClassName,!0).style("pointer-events","all");for(var d=0;dk,T=r.barLength+2*r.barPad,L=r.barWidth+2*r.barPad,C=p,z=v+m;z+L>u&&(z=u-L);var S=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);S.exit().on(".drag",null).remove(),S.enter().append("rect").classed("scrollbar-horizontal",!0).call(o.fill,r.barColor),A?(this.hbar=S.attr({rx:r.barRadius,ry:r.barRadius,x:C,y:z,width:T,height:L}),this._hbarXMin=C+T/2,this._hbarTranslateMax=k-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=m>M,N=r.barWidth+2*r.barPad,D=r.barLength+2*r.barPad,P=p+g,E=v;P+N>s&&(P=s-N);var R=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(o.fill,r.barColor),O?(this.vbar=R.attr({rx:r.barRadius,ry:r.barRadius,x:P,y:E,width:N,height:D}),this._vbarYMin=E+D/2,this._vbarTranslateMax=M-D):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var I=this.id,j=c-.5,F=O?f+N+.5:f+.5,q=d-.5,B=A?h+L+.5:h+.5,H=l._topdefs.selectAll("#"+I).data(A||O?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",I).append("rect"),A||O?(this._clipRect=H.select("rect").attr({x:Math.floor(j),y:Math.floor(q),width:Math.ceil(F)-Math.floor(j),height:Math.ceil(B)-Math.floor(q)}),this.container.call(i.setClipUrl,I),this.bg.attr({x:p,y:v,width:g,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),A||O){var V=a.behavior.drag().on("dragstart",function(){a.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var X=a.behavior.drag().on("dragstart",function(){a.event.sourceEvent.preventDefault(),a.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(X),O&&this.vbar.on(".drag",null).call(X)}this.setTranslate(e,n)},r.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},r.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=a.event.dx),this.vbar&&(e-=a.event.dy),this.setTranslate(t,e)},r.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=a.event.deltaY),this.vbar&&(e+=a.event.deltaY),this.setTranslate(t,e)},r.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var n=t+this._hbarXMin,r=n+this._hbarTranslateMax;t=(l.constrain(a.event.x,n,r)-n)/(r-n)*(this.position.w-this._box.w)}if(this.vbar){var o=e+this._vbarYMin,i=o+this._vbarTranslateMax;e=(l.constrain(a.event.y,o,i)-o)/(i-o)*(this.position.h-this._box.h)}this.setTranslate(t,e)},r.prototype.setTranslate=function(t,e){var n=this.position.w-this._box.w,r=this.position.h-this._box.h;if(t=l.constrain(t||0,0,n),e=l.constrain(e||0,0,r),this.translateX=t,this.translateY=e,this.container.call(i.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var a=t/n;this.hbar.call(i.setTranslate,t+a*this._hbarTranslateMax,e)}if(this.vbar){var o=e/r;this.vbar.call(i.setTranslate,t,e+o*this._vbarTranslateMax)}}},{"../../lib":130,"../color":33,"../drawing":56,d3:15}],116:[function(t,e,n){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300}},{}],117:[function(t,e,n){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6}},{}],118:[function(t,e,n){"use strict";e.exports={entityToUnicode:{mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},unicodeToEntity:{"&":"amp","<":"lt",">":"gt",'"':"quot","'":"#x27","/":"#x2F"}}},{}],119:[function(t,e,n){"use strict";n.xmlns="http://www.w3.org/2000/xmlns/",n.svg="http://www.w3.org/2000/svg",n.xlink="http://www.w3.org/1999/xlink",n.svgAttrs={xmlns:n.svg,"xmlns:xlink":n.xlink}},{}],120:[function(t,e,n){"use strict";var r=t("./plotly");n.version="1.25.2",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config"),n.plot=r.plot,n.newPlot=r.newPlot,n.restyle=r.restyle,n.relayout=r.relayout,n.redraw=r.redraw,n.update=r.update,n.extendTraces=r.extendTraces,n.prependTraces=r.prependTraces,n.addTraces=r.addTraces,n.deleteTraces=r.deleteTraces,n.moveTraces=r.moveTraces,n.purge=r.purge,n.setPlotConfig=t("./plot_api/set_plot_config"),n.register=t("./plot_api/register"),n.toImage=t("./plot_api/to_image"),n.downloadImage=t("./snapshot/download"),n.validate=t("./plot_api/validate"),n.addFrames=r.addFrames,n.deleteFrames=r.deleteFrames,n.animate=r.animate,n.register(t("./traces/scatter")),n.register([t("./components/legend"),t("./components/annotations"),t("./components/shapes"),t("./components/images"),t("./components/updatemenus"),t("./components/sliders"),t("./components/rangeslider"),t("./components/rangeselector")]),n.Icons=t("../build/ploticon"),n.Plots=r.Plots,n.Fx=r.Fx,n.Snapshot=t("./snapshot"),n.PlotSchema=t("./plot_api/plot_schema"),n.Queue=t("./lib/queue"),n.d3=t("d3")},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":31,"./components/images":69,"./components/legend":77,"./components/rangeselector":89,"./components/rangeslider":95,"./components/shapes":102,"./components/sliders":108,"./components/updatemenus":114,"./fonts/mathjax_config":121,"./lib/queue":142,"./plot_api/plot_schema":154,"./plot_api/register":155,"./plot_api/set_plot_config":156,"./plot_api/to_image":158,"./plot_api/validate":159,"./plotly":160,"./snapshot":205,"./snapshot/download":202,"./traces/scatter":230,d3:15,"es6-promise":16}],121:[function(t,e,n){"use strict";"undefined"!=typeof MathJax?(n.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):n.MathJax=!1},{}],122:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../constants/numerical").BADNUM;e.exports=function(t){return"string"==typeof t&&(t=t.replace(/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,"")),r(t)?Number(t):a}},{"../constants/numerical":117,"fast-isnumeric":18}],123:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("tinycolor2"),o=t("../components/colorscale/get_scale"),i=(Object.keys(t("../components/colorscale/scales")),t("./nested_property")),l=/^([2-9]|[1-9][0-9]+)$/;n.valObjects={data_array:{coerceFunction:function(t,e,n){Array.isArray(t)?e.set(t):void 0!==n&&e.set(n)}},enumerated:{coerceFunction:function(t,e,n,r){r.coerceNumber&&(t=+t),-1===r.values.indexOf(t)?e.set(n):e.set(t)}},boolean:{coerceFunction:function(t,e,n){!0===t||!1===t?e.set(t):e.set(n)}},number:{coerceFunction:function(t,e,n,a){!r(t)||void 0!==a.min&&ta.max?e.set(n):e.set(+t)}},integer:{coerceFunction:function(t,e,n,a){t%1||!r(t)||void 0!==a.min&&ta.max?e.set(n):e.set(+t)}},string:{coerceFunction:function(t,e,n,r){if("string"!=typeof t){var a="number"==typeof t;!0!==r.strict&&a?e.set(String(t)):e.set(n)}else r.noBlank&&!t?e.set(n):e.set(t)}},color:{coerceFunction:function(t,e,n){a(t).isValid()?e.set(t):e.set(n)}},colorscale:{coerceFunction:function(t,e,n){e.set(o(t,n))}},angle:{coerceFunction:function(t,e,n){"auto"===t?e.set("auto"):r(t)?(Math.abs(t)>180&&(t-=360*Math.round(t/360)),e.set(+t)):e.set(n)}},subplotid:{coerceFunction:function(t,e,n){var r=n.length;if("string"==typeof t&&t.substr(0,r)===n&&l.test(t.substr(r)))return void e.set(t);e.set(n)},validateFunction:function(t,e){var n=e.dflt,r=n.length;return t===n||"string"==typeof t&&!(t.substr(0,r)!==n||!l.test(t.substr(r)))}},flaglist:{coerceFunction:function(t,e,n,r){if("string"!=typeof t)return void e.set(n);if(-1!==(r.extras||[]).indexOf(t))return void e.set(t);for(var a=t.split("+"),o=0;o0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),r+=":"+i}return r}function s(t){return t.formatDate("yyyy")}function u(t){return t.formatDate("M yyyy")}function c(t){return t.formatDate("M d")}function f(t){return t.formatDate("M d, yyyy")}var d=t("d3"),h=t("fast-isnumeric"),p=t("./loggers").error,g=t("./mod"),v=t("../constants/numerical"),m=v.BADNUM,y=v.ONEDAY,x=v.ONEHOUR,b=v.ONEMIN,_=v.ONESEC,w=v.EPOCHJD,k=t("../registry"),M=d.time.format.utc,A=(new Date).getFullYear()-70;n.dateTick0=function(t,e){return r(t)?e?k.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:k.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"},n.dfltRange=function(t){return r(t)?k.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},n.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime};var T,L;n.dateTime2ms=function(t,e){if(n.isJSDate(t))return t=Number(t)-t.getTimezoneOffset()*b,t>=T&&t<=L?t:m;if("string"!=typeof t&&"number"!=typeof t)return m;t=String(t);var a=r(e),o=t.charAt(0);!a||"G"!==o&&"g"!==o||(t=t.substr(1),e="");var i=a&&"chinese"===e.substr(0,7),l=t.match(i?/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m:/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m);if(!l)return m;var s=l[1],u=l[3]||"1",c=Number(l[5]||1),f=Number(l[7]||0),d=Number(l[9]||0),h=Number(l[11]||0);if(a){if(2===s.length)return m;s=Number(s);var p;try{var g=k.getComponentMethod("calendars","getCal")(e);if(i){var v="i"===u.charAt(u.length-1);u=parseInt(u,10),p=g.newDate(s,g.toMonthIndex(s,u,v),c)}else p=g.newDate(s,Number(u),c)}catch(t){return m}return p?(p.toJD()-w)*y+f*x+d*b+h*_:m}s=2===s.length?(Number(s)+2e3-A)%100+A:Number(s),u-=1;var M=new Date(Date.UTC(2e3,u,c,f,d));return M.setUTCFullYear(s),M.getUTCMonth()!==u?m:M.getUTCDate()!==c?m:M.getTime()+h*_},T=n.MIN_MS=n.dateTime2ms("-9999"),L=n.MAX_MS=n.dateTime2ms("9999-12-31 23:59:59.9999"),n.isDateTime=function(t,e){return n.dateTime2ms(t,e)!==m};var C=90*y,z=3*x,S=5*b;n.ms2DateTime=function(t,e,n){if("number"!=typeof t||!(t>=T&&t<=L))return m;e||(e=0);var a,i,l,s,u,c,f=Math.floor(10*g(t+.05,1)),d=Math.round(t-f/10);if(r(n)){var h=Math.floor(d/y)+w,p=Math.floor(g(t,y));try{a=k.getComponentMethod("calendars","getCal")(n).fromJD(h).formatDate("yyyy-mm-dd")}catch(t){a=M("G%Y-%m-%d")(new Date(d))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;i=e=T+y&&t<=L-y))return m;var e=Math.floor(10*g(t+.05,1)),n=new Date(Math.round(t-e/10));return o(d.time.format("%Y-%m-%d")(n),n.getHours(),n.getMinutes(),n.getSeconds(),10*n.getUTCMilliseconds()+e)},n.cleanDate=function(t,e,a){if(n.isJSDate(t)||"number"==typeof t){if(r(a))return p("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=n.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!n.isDateTime(t,a))return p("unrecognized date",t),e;return t};var O=/%\d?f/g,N=[59,59.9,59.99,59.999,59.9999],D=M("%Y"),P=M("%b %Y"),E=M("%b %-d"),R=M("%b %-d, %Y");n.formatDate=function(t,e,n,a){var o,d;if(a=r(a)&&a,e)return i(e,t,a);if(a)try{var h=Math.floor((t+.05)/y)+w,p=k.getComponentMethod("calendars","getCal")(a).fromJD(h);"y"===n?d=s(p):"m"===n?d=u(p):"d"===n?(o=s(p),d=c(p)):(o=f(p),d=l(t,n))}catch(t){return"Invalid"}else{var g=new Date(Math.floor(t+.05));"y"===n?d=D(g):"m"===n?d=P(g):"d"===n?(o=D(g),d=E(g)):(o=R(g),d=l(t,n))}return d+(o?"\n"+o:"")};var I=3*y;n.incrementMonth=function(t,e,n){n=r(n)&&n;var a=g(t,y);if(t=Math.round(t-a),n)try{var o=Math.round(t/y)+w,i=k.getComponentMethod("calendars","getCal")(n),l=i.fromJD(o);return e%12?i.add(l,e,"m"):i.add(l,e/12,"y"),(l.toJD()-w)*y+a}catch(e){p("invalid ms "+t+" in calendar "+n)}var s=new Date(t+I);return s.setUTCMonth(s.getUTCMonth()+e)+a-I},n.findExactDates=function(t,e){for(var n,a,o=0,i=0,l=0,s=0,u=r(e)&&k.getComponentMethod("calendars","getCal")(e),c=0;cn?Math.max(n,Math.min(e,t)):Math.max(e,Math.min(n,t))},a.bBoxIntersect=function(t,e,n){return n=n||0,t.left<=e.right+n&&e.left<=t.right+n&&t.top<=e.bottom+n&&e.top<=t.bottom+n},a.simpleMap=function(t,e,n,r){for(var a=t.length,o=new Array(a),i=0;i-1||c!==1/0&&c>=Math.pow(2,n)?t(e,n,r):s},a.OptionControl=function(t,e){t||(t={}),e||(e="opt");var n={};return n.optionList=[],n._newoption=function(r){r[e]=t,n[r.name]=r,n.optionList.push(r)},n["_"+e]=t,n},a.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var n,r,a,o,i=t.length,l=2*i,s=2*e-1,u=new Array(s),c=new Array(i);for(n=0;n=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=i&&(a=l-1-a),o+=t[a]*u[r];c[n]=o}return c},a.syncOrAsync=function(t,e,n){function r(){return a.syncOrAsync(t,e,n)}for(var o,i;t.length;)if(i=t.splice(0,1)[0],(o=i(e))&&o.then)return o.then(r).then(void 0,a.promiseError);return n&&n(e)},a.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},a.noneOrAll=function(t,e,n){if(t){var r,a,o=!1,i=!0;for(r=0;r1?a+i[1]:"";if(o&&(i.length>1||l.length>4||n))for(;r.test(l);)l=l.replace(r,"$1"+o+"$2");return l+s}},{"./clean_number":122,"./coerce":123,"./dates":124,"./extend":126,"./filter_unique":127,"./filter_visible":128,"./identity":129,"./is_array":131,"./is_plain_object":132,"./loggers":133,"./matrix":134,"./mod":135,"./nested_property":136,"./noop":137,"./notifier":138,"./push_unique":141,"./relink_private":143,"./search":144,"./stats":146,"./to_log_range":148,d3:15}],131:[function(t,e,n){"use strict";var r="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}};e.exports=function(t){return Array.isArray(t)||r.isView(t)}},{}],132:[function(t,e,n){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],133:[function(t,e,n){"use strict";function r(t,e){if(t.apply)t.apply(t,e);else for(var n=0;n1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;e=0;e--){if(r=t[e][0],o=t[e][1],s=!1,h(r))for(n=r.length-1;n>=0;n--)a(r[n],i(o,n))?s?r[n]=void 0:r.pop():s=!0;else if("object"==typeof r&&null!==r)for(l=Object.keys(r),s=!1,n=l.length-1;n>=0;n--)a(r[l[n]],i(o,l[n]))?delete r[l[n]]:s=!0;if(s)return}}function c(t){return void 0===t||null===t||"object"==typeof t&&(h(t)?!t.length:!Object.keys(t).length)}function f(t,e,n){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:n,obj:t}}var d=t("fast-isnumeric"),h=t("./is_array"),p=t("./is_plain_object"),g=t("../plot_api/container_array_match");e.exports=function(t,e){if(d(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var n,a,i,l=0,s=e.split(".");l/g),l=0;lo||rl)&&(!e||!u(t))}function n(t,e){var n=t[0],s=t[1];if(no||sl)return!1;var u,c,f,d,h,p=r.length,g=r[0][0],v=r[0][1],m=0;for(u=1;uMath.max(c,g)||s>Math.max(f,v)))if(sc||Math.abs(r(i,d))>a)return!0;return!1};a.filter=function(t,e){function n(n){t.push(n);var l=r.length,s=a;r.splice(i+1);for(var u=s+1;u1){n(t.pop())}return{addPt:n,raw:t,filtered:r}}},{"./matrix":134}],141:[function(t,e,n){"use strict";e.exports=function(t,e){if(e instanceof RegExp){var n,r=e.toString();for(n=0;no.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},i.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},i.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},i.undo=function(t){var e,n;if(t.framework&&t.framework.isPolar)return void t.framework.undo();if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;ne}function i(t,e){return t>=e}var l=t("fast-isnumeric"),s=t("./loggers");n.findBin=function(t,e,n){if(l(e.start))return n?Math.ceil((t-e.start)/e.size)-1:Math.floor((t-e.start)/e.size);var u,c,f=0,d=e.length,h=0;for(c=e[e.length-1]>=e[0]?n?r:a:n?i:o;f90&&s.log("Long binary search..."),f-1},n.sorterAsc=function(t,e){return t-e},n.sorterDes=function(t,e){return e-t},n.distinctVals=function(t){var e=t.slice();e.sort(n.sorterAsc);for(var r=e.length-1,a=e[r]-e[0]||1,o=a/(r||1)/1e4,i=[e[0]],l=0;le[l]+o&&(a=Math.min(a,e[l+1]-e[l]),i.push(e[l+1]));return{vals:i,minDiff:a}},n.roundUp=function(t,e,n){for(var r,a=0,o=e.length-1,i=0,l=n?0:1,s=n?1:0,u=n?Math.ceil:Math.floor;at.length-1)return t[t.length-1];var n=e%1;return n*t[Math.ceil(e)]+(1-n)*t[Math.floor(e)]}},{"fast-isnumeric":18}],147:[function(t,e,n){"use strict";function r(t,e){return t.node().getBoundingClientRect()[e]}function a(t){return t.replace(/(<|<|<)/g,"\\lt ").replace(/(>|>|>)/g,"\\gt ")}function o(t,e,n){var r="math-output-"+d.randstr([],64),o=f.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(a(t));MathJax.Hub.Queue(["Typeset",MathJax.Hub,o.node()],function(){var e=f.select("body").select("#MathJax_SVG_glyphs");if(o.select(".MathJax_SVG").empty()||!o.select("svg").node())d.log("There was an error in the tex syntax.",t),n();else{var r=o.select("svg").node().getBoundingClientRect();n(o.select(".MathJax_SVG"),e,r)}o.remove()})}function i(t,e){for(var n=t||"",r=0;r]*>)/).map(function(t){var e=t.match(/<(\/?)([^ >]*)\s*(.*)>/i),r=e&&e[2].toLowerCase(),a=g[r];if(void 0!==a){var o=e[1],i=e[3],l=i.match(/^style\s*=\s*"([^"]+)"\s*/i);if("a"===r){if(o)return"";if("href"!==i.substr(0,4).toLowerCase())return"";var u=i.substr(4).replace(/["']/g,"").replace(/=/,""),c=document.createElement("a");return c.href=u,-1===v.indexOf(c.protocol)?"":''}if("br"===r)return"
";if(o)return"sup"===r?'':"sub"===r?'':"";var f=""}return n.xml_entity_encode(t).replace(/");a>0;a=e.indexOf("
",a+1))r.push(a);var o=0;r.forEach(function(t){for(var n=t+o,r=e.slice(0,n),a="",i=r.length-1;i>=0;i--){var l=r[i].match(/<(\/?).*>/i);if(l&&"
"!==r[i]){l[1]||(a=r[i]);break}}a&&(e.splice(n+1,0,a),e.splice(n,0,""),o+=2)});var i=e.join(""),u=i.split(/
/gi);return u.length>1&&(e=u.map(function(t,e){return''+t+""})),e.join("")}function c(t,e,n){var r,a,o,i=n.horizontalAlign,l=n.verticalAlign||"top",s=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a="bottom"===l?function(){return s.bottom-r.height}:"middle"===l?function(){return s.top+(s.height-r.height)/2}:function(){return s.top},o="right"===i?function(){return s.right-r.width}:"center"===i?function(){return s.left+(s.width-r.width)/2}:function(){return s.left},function(){return r=this.node().getBoundingClientRect(),this.style({top:a()-u.top+"px",left:o()-u.left+"px","z-index":1e3}),this}}var f=t("d3"),d=t("../lib"),h=t("../constants/xmlns_namespaces"),p=t("../constants/string_mappings");f.selection.prototype.appendSVG=function(t){for(var e=['',t,""].join(""),n=(new DOMParser).parseFromString(e,"application/xml"),r=n.documentElement.firstChild;r;)this.node().appendChild(this.node().ownerDocument.importNode(r,!0)),r=r.nextSibling;return n.querySelector("parsererror")?(d.log(n.querySelector("parsererror div").textContent),null):f.select(this.node().lastChild)},n.html_entity_decode=function(t){var e=f.select("body").append("div").style({display:"none"}).html(""),n=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":-1!==t.indexOf("<")||-1!==t.indexOf(">")?"":e.html(t).text()});return e.remove(),n},n.xml_entity_encode=function(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")},n.convertToTspans=function(t,e){function n(){h.empty()||(p=l.attr("class")+"-math",h.select("svg."+p).remove()),t.text("").style({visibility:"inherit","white-space":"pre"}),c=t.appendSVG(i),c||t.text(a),t.select("a").size()&&t.style("pointer-events","all"),e&&e.call(l)}var a=t.text(),i=u(a),l=t,s=!l.attr("data-notex")&&i.match(/([^$]*)([$]+[^$]*[$]+)([^$]*)/),c=a,h=f.select(l.node().parentNode);if(!h.empty()){var p=l.attr("class")?l.attr("class").split(" ")[0]:"text";p+="-math",h.selectAll("svg."+p).remove(),h.selectAll("g."+p+"-group").remove(),t.style({visibility:null});for(var g=t.node();g&&g.removeAttribute;g=g.parentNode)g.removeAttribute("data-bb");if(s){var v=d.getPlotDiv(l.node());(v&&v._promises||[]).push(new Promise(function(t){l.style({visibility:"hidden"});var a={fontSize:parseInt(l.style("font-size"),10)};o(s[2],a,function(a,o,i){h.selectAll("svg."+p).remove(),h.selectAll("g."+p+"-group").remove();var s=a&&a.select("svg");if(!s||!s.node())return n(),void t();var u=h.append("g").classed(p+"-group",!0).attr({"pointer-events":"none"});u.node().appendChild(s.node()),o&&o.node()&&s.node().insertBefore(o.node().cloneNode(!0),s.node().firstChild),s.attr({class:p,height:i.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=l.style("fill")||"black";s.select("g").attr({fill:c,stroke:c});var f=r(s,"width"),d=r(s,"height"),g=+l.attr("x")-f*{start:0,middle:.5,end:1}[l.attr("text-anchor")||"start"],v=parseInt(l.style("font-size"),10)||r(l,"height"),m=-v/4;"y"===p[0]?(u.attr({transform:"rotate("+[-90,+l.attr("x"),+l.attr("y")]+") translate("+[-f/2,m-d/2]+")"}),s.attr({x:+l.attr("x"),y:+l.attr("y")})):"l"===p[0]?s.attr({x:l.attr("x"),y:m-d/2}):"a"===p[0]?s.attr({x:0,y:m}):s.attr({x:g,y:+l.attr("y")+m-d/2}),e&&e.call(l,u),t(u)})}))}else n();return t}};var g={sup:'font-size:70%" dy="-0.6em',sub:'font-size:70%" dy="0.3em',b:"font-weight:bold",i:"font-style:italic",a:"",span:"",br:"",em:"font-style:italic;font-weight:bold"},v=["http:","https:","mailto:"],m=new RegExp("]*)?/?>","g"),y=Object.keys(p.entityToUnicode).map(function(t){return{regExp:new RegExp("&"+t+";","g"),sub:p.entityToUnicode[t]}}),x=Object.keys(p.unicodeToEntity).map(function(t){return{regExp:new RegExp(t,"g"),sub:"&"+p.unicodeToEntity[t]+";"}}),b=/(\r\n?|\n)/g;n.plainText=function(t){return(t||"").replace(m," ")},n.makeEditable=function(t,e,n){function r(){o(),i.style({opacity:0});var t,e=u.attr("class");(t=e?"."+e.split(" ")[0]+"-math-group":"[class*=-math-group]")&&f.select(i.node().parentNode).select(t).style({opacity:0})}function a(t){var e=t.node(),n=document.createRange();n.selectNodeContents(e);var r=window.getSelection();r.removeAllRanges(),r.addRange(n),e.focus()}function o(){var t=d.getPlotDiv(i.node()),e=f.select(t),r=e.select(".svg-container"),o=r.append("div");o.classed("plugin-editable editable",!0).style({position:"absolute","font-family":i.style("font-family")||"Arial","font-size":i.style("font-size")||12,color:n.fill||i.style("fill")||"black",opacity:1,"background-color":n.background||"transparent",outline:"#ffffff33 1px solid",margin:[-parseFloat(i.style("font-size"))/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(n.text||i.attr("data-unformatted")).call(c(i,r,n)).on("blur",function(){t._editing=!1,i.text(this.textContent).style({opacity:1});var e,n=f.select(this).attr("class");(e=n?"."+n.split(" ")[0]+"-math-group":"[class*=-math-group]")&&f.select(i.node().parentNode).select(e).style({opacity:0});var r=this.textContent;f.select(this).transition().duration(0).remove(),f.select(document).on("mouseup",null),l.edit.call(i,r)}).on("focus",function(){var e=this;t._editing=!0,f.select(document).on("mouseup",function(){if(f.event.target===e)return!1;document.activeElement===o.node()&&o.node().blur()})}).on("keyup",function(){27===f.event.which?(t._editing=!1,i.style({opacity:1}),f.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),l.cancel.call(i,this.textContent)):(l.input.call(i,this.textContent),f.select(this).call(c(i,r,n)))}).on("keydown",function(){13===f.event.which&&this.blur()}).call(a)}n||(n={});var i=this,l=f.dispatch("edit","input","cancel"),s=f.select(this.node()).style({"pointer-events":"all"}),u=e||s;return e&&s.style({"pointer-events":"none"}),n.immediate?r():u.on("click",r),f.rebind(this,l,"on")}},{"../constants/string_mappings":118,"../constants/xmlns_namespaces":119,"../lib":130,d3:15}],148:[function(t,e,n){"use strict";var r=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(e[0],e[1]))/Math.LN10;return r(n)||(n=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),n}},{"fast-isnumeric":18}],149:[function(t,e,n){"use strict";var r=t("../registry");e.exports=function(t){for(var e,n,a=r.layoutArrayContainers,o=r.layoutArrayRegexes,i=t.split("[")[0],l=0;l0)return t.substr(0,e)}var l=t("fast-isnumeric"),s=t("gl-mat4/fromQuat"),u=t("../registry"),c=t("../lib"),f=t("../plots/plots"),d=t("../plots/cartesian/axes"),h=t("../components/color");n.getGraphDiv=function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null===t||void 0===t)throw new Error("DOM element provided is null or undefined");return t},n.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&c.log("Clearing previous rejected promises from queue."),t._promises=[]},n.cleanLayout=function(t){var e,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1);var a=d.list({_fullLayout:t});for(e=0;e3?(v.x=1.02,v.xanchor="left"):v.x<-2&&(v.x=-.02,v.xanchor="right"),v.y>3?(v.y=1.02,v.yanchor="bottom"):v.y<-2&&(v.y=-.02,v.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var m=f.getSubplotIds(t,"gl3d");for(e=0;e1&&i.warn("Full array edits are incompatible with other edits",c);var m=n[""][""];if(u(m))e.set(null);else{if(!Array.isArray(m))return i.warn("Unrecognized full array edit value",c,m),!0;e.set(m)}return!p&&(f(g,v),d(t),!0)}var y,x,b,_,w,k,M,A=Object.keys(n).map(Number).sort(),T=e.get(),L=T||[],C=r(v,c).get(),z=[],S=-1,O=L.length;for(y=0;yL.length-(M?0:1))i.warn("index out of range",c,b);else if(void 0!==k)w.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",c,b),u(k)?z.push(b):M?("add"===k&&(k={}),L.splice(b,0,k),C&&C.splice(b,0,{})):i.warn("Unrecognized full object edit value",c,b,k),-1===S&&(S=b);else for(x=0;x=0;y--)L.splice(z[y],1),C&&C.splice(z[y],1);if(L.length?T||e.set(L):e.set(null),p)return!1;if(f(g,v),h!==o){var N;if(-1===S)N=A;else{for(O=Math.max(L.length,O),N=[],y=0;y=S);y++)N.push(b);for(y=S;y=t.data.length||a<-t.data.length)throw new Error(n+" must be valid indices for gd.data.");if(e.indexOf(a,r+1)>-1||a>=0&&e.indexOf(-t.data.length+a)>-1||a<0&&e.indexOf(t.data.length+a)>-1)throw new Error("each index in "+n+" must be unique.")}}function s(t,e,n){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),l(t,e,"currentIndices"),void 0===n||Array.isArray(n)||(n=[n]),void 0!==n&&l(t,n,"newIndices"),void 0!==n&&e.length!==n.length)throw new Error("current and new indices must be of equal length.")}function u(t,e,n){var r,a;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),r=0;r=0&&sF.range[0]?[1,2]:[2,1]);else{var H=F.range[0],V=F.range[1];q?(H<=0&&V<=0&&n(R+".autorange",!0),H<=0?H=V/1e6:V<=0&&(V=H/1e6),n(R+".range[0]",Math.log(H)/Math.LN10),n(R+".range[1]",Math.log(V)/Math.LN10)):(n(R+".range[0]",Math.pow(10,H)),n(R+".range[1]",Math.pow(10,V)))}else n(R+".autorange",!0);w.getComponentMethod("annotations","convertCoords")(t,j,T,n),w.getComponentMethod("images","convertCoords")(t,j,T,n)}else n(R+".autorange",!0)}else if(N.match(D.AX_NAME_PATTERN)){var X=x.nestedProperty(u,M).get(),U=(T||{}).type;U&&"-"!==U||(U="linear"),w.getComponentMethod("annotations","convertCoords")(t,X,U,n),w.getComponentMethod("images","convertCoords")(t,X,U,n)}var Y=S.containerArrayMatch(M);if(Y){o=Y.array,i=Y.index;var G=Y.property,Z=x.nestedProperty(s,o),W=(Z||[])[i]||{};if(""===i)-1===M.indexOf("updatemenus")&&(v.docalc=!0);else if(""===G){var $=T;S.isAddVal(T)?b[M]=null:S.isRemoveVal(T)?(b[M]=W,$=W):x.warn("unrecognized full object value",e),(r($,"x")||r($,"y")&&-1===M.indexOf("updatemenus"))&&(v.docalc=!0)}else!r(W,"x")&&!r(W,"y")||x.containsAny(M,["color","opacity","align","dash","updatemenus"])||(v.docalc=!0);d[o]||(d[o]={});var Q=d[o][i];Q||(Q=d[o][i]={}),Q[G]=T,delete e[M]}else if("reverse"===N)I.range?I.range.reverse():(n(R+".autorange",!0),I.range=[1,0]),j.autorange?v.docalc=!0:v.doplot=!0;else{var J=String(A.parts[1]||"");0===z.indexOf("scene")?"camera"===A.parts[1]?v.docamera=!0:v.doplot=!0:0===z.indexOf("geo")?v.doplot=!0:0===z.indexOf("ternary")?v.doplot=!0:"paper_bgcolor"===M?v.doplot=!0:"margin"===z||"autorange"===J||"rangemode"===J||"type"===J||"domain"===J||"fixedrange"===J||"scaleanchor"===J||"scaleratio"===J||-1!==M.indexOf("calendar")||M.match(/^(bar|box|font)/)?v.docalc=!0:!u._has("gl2d")||-1===M.indexOf("axis")&&"plot_bgcolor"!==M?"hiddenlabels"===M?v.docalc=!0:-1!==z.indexOf("legend")?v.dolegend=!0:-1!==M.indexOf("title")?v.doticks=!0:-1!==z.indexOf("bgcolor")?v.dolayoutstyle=!0:L>1&&x.containsAny(J,["tick","exponent","grid","zeroline"])?v.doticks=!0:-1!==M.indexOf(".linewidth")&&-1!==M.indexOf("axis")?v.doticks=v.dolayoutstyle=!0:L>1&&-1!==J.indexOf("line")?v.dolayoutstyle=!0:L>1&&"mirror"===J?v.doticks=v.dolayoutstyle=!0:"margin.pad"===M?v.doticks=v.dolayoutstyle=!0:-1!==["hovermode","dragmode"].indexOf(M)?v.domodebar=!0:-1===["hovermode","dragmode","height","width","autosize"].indexOf(M)&&(v.doplot=!0):v.doplot=!0,A.set(T)}}}for(o in d){S.applyContainerArrayChanges(t,x.nestedProperty(s,o),d[o],v)||(v.doplot=!0)}var K=u._axisConstraintGroups;for(var tt in _)for(i=0;i=l.length?l[0]:l[t]:l}function a(t){return Array.isArray(s)?t>=s.length?s[0]:s[t]:s}function o(t,e){var n=0;return function(){if(t&&++n===e)return t()}}if(t=O.getGraphDiv(t),!x.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var i=t._transitionData;i._frameQueue||(i._frameQueue=[]),n=k.supplyAnimationDefaults(n);var l=n.transition,s=n.frame;return void 0===i._frameWaitingCnt&&(i._frameWaitingCnt=0),new Promise(function(s,u){function c(){t.emit("plotly_animated"),window.cancelAnimationFrame(i._animationRaf),i._animationRaf=null}function f(){i._currentFrame&&i._currentFrame.onComplete&&i._currentFrame.onComplete();var e=i._currentFrame=i._frameQueue.shift();if(e){var n=e.name?e.name.toString():null;t._fullLayout._currentFrame=n,i._lastFrameAt=Date.now(),i._timeToNext=e.frameOpts.duration,k.transition(t,e.frame.data,e.frame.layout,O.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:n,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else c()}function d(){t.emit("plotly_animating"),i._lastFrameAt=-1/0,i._timeToNext=0,i._runningTransitions=0,i._currentFrame=null;var e=function(){i._animationRaf=window.requestAnimationFrame(e),Date.now()-i._lastFrameAt>i._timeToNext&&f()};e()}function h(t){return Array.isArray(l)?v>=l.length?t.transitionOpts=l[v]:t.transitionOpts=l[0]:t.transitionOpts=l,v++,t}var p,g,v=0,m=[],y=void 0===e||null===e,b=Array.isArray(e);if(y||b||!x.isPlainObject(e)){if(y||-1!==["string","number"].indexOf(typeof e))for(p=0;p0&&MM)&&A.push(g);m=A}}m.length>0?function(e){if(0!==e.length){for(var l=0;l=0;a--)if(x.isPlainObject(e[a])){var d=(u[e[a].name]||{}).name,h=e[a].name;d&&h&&"number"==typeof h&&u[d]&&(r++,x.warn('addFrames: overwriting frame "'+u[d].name+'" with a frame whose name of type "number" also equates to "'+d+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),r>5&&x.warn("addFrames: This API call has yielded too many warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),f.push({frame:k.supplyFrameDefaults(e[a]),index:n&&void 0!==n[a]&&null!==n[a]?n[a]:c+a})}f.sort(function(t,e){return t.index>e.index?-1:t.index=0;a--){if(o=f[a].frame,"number"==typeof o.name&&x.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!o.name)for(;u[o.name="frame "+t._transitionData._counter++];);if(u[o.name]){for(i=0;i=0;n--)r=e[n],o.push({type:"delete",index:r}),i.unshift({type:"insert",index:r,value:a[r]});var l=k.modifyFrames,s=k.modifyFrames,u=[t,i],c=[t,o];return _&&_.add(t,l,u,s,c),k.modifyFrames(t,o)},y.purge=function(t){t=O.getGraphDiv(t);var e=t._fullLayout||{},n=t._fullData||[];return k.cleanPlot([],{},n,e),k.purge(t),b.purge(t),e._container&&e._container.remove(),delete t._context,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,delete t._hmpixcount,delete t._hmlumcount,t}},{"../components/drawing":56,"../components/errorbars":62,"../constants/xmlns_namespaces":119,"../lib":130,"../lib/events":125,"../lib/queue":142,"../lib/svg_text_utils":147,"../plotly":160,"../plots/cartesian/axis_ids":168,"../plots/cartesian/constants":170,"../plots/cartesian/constraints":172,"../plots/cartesian/graph_interact":174,"../plots/plots":193,"../plots/polar":196,"../registry":200,"./helpers":150,"./manage_arrays":151,"./subroutines":157,d3:15,"fast-isnumeric":18}],153:[function(t,e,n){"use strict";function r(t,n){try{t._fullLayout._paper.style("background",n)}catch(t){e.exports.logging>0&&console.error(t)}}e.exports={staticPlot:!1,editable:!1,autosizable:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:"reset+autosize",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:"Edit chart",showSources:!1,displayModeBar:"hover",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,displaylogo:!0,plotGlPixelRatio:2,setBackground:r,topojsonURL:"https://cdn.plot.ly/",mapboxAccessToken:null,logging:!1,globalTransforms:[]}},{}],154:[function(t,e,n){"use strict";function r(t){var e,n;"area"===t?(e={attributes:x},n={}):(e=h.modules[t]._module,n=e.basePlotModule);var r={};r.type=null,w(r,g),w(r,e.attributes),n.attributes&&w(r,n.attributes),Object.keys(h.componentsRegistry).forEach(function(e){var n=h.componentsRegistry[e];n.schema&&n.schema.traces&&n.schema.traces[t]&&Object.keys(n.schema.traces[t]).forEach(function(e){d(r,n.schema.traces[t][e],e)})}),r.type=t;var a={meta:e.meta||{},attributes:l(r)};if(e.layoutAttributes){var o={};w(o,e.layoutAttributes),a.layoutAttributes=l(o)}return a}function a(){var t={};return w(t,v),Object.keys(h.subplotsRegistry).forEach(function(e){var n=h.subplotsRegistry[e];if(n.layoutAttributes)if("cartesian"===n.name)f(t,n,"xaxis"),f(t,n,"yaxis");else{var r="subplot"===n.attr?n.name:n.attr;f(t,n,r)}}),t=c(t),Object.keys(h.componentsRegistry).forEach(function(e){var n=h.componentsRegistry[e];n.layoutAttributes&&(n.schema&&n.schema.layout?Object.keys(n.schema.layout).forEach(function(e){d(t,n.schema.layout[e],e)}):d(t,n.layoutAttributes,n.name))}),{layoutAttributes:l(t)}}function o(t){var e=h.transformsRegistry[t],n=w({},e.attributes);return Object.keys(h.componentsRegistry).forEach(function(e){var r=h.componentsRegistry[e];r.schema&&r.schema.transforms&&r.schema.transforms[t]&&Object.keys(r.schema.transforms[t]).forEach(function(e){d(n,r.schema.transforms[t][e],e)})}),{attributes:l(n)}}function i(){var t={frames:p.extendDeep({},m)};return l(t),t.frames}function l(t){return s(t),u(t),t}function s(t){function e(t){return{valType:"string"}}function r(t,r,a){n.isValObject(t)?"data_array"===t.valType?(t.role="data",a[r+"src"]=e(r)):!0===t.arrayOk&&(a[r+"src"]=e(r)):p.isPlainObject(t)&&(t.role="object")}n.crawl(t,r)}function u(t){function e(t,e,n){if(t){var r=t[M];r&&(delete t[M],n[e]={items:{}},n[e].items[r]=t,n[e].role="object")}}n.crawl(t,e)}function c(t){return _(t,{radialaxis:b.radialaxis,angularaxis:b.angularaxis}),_(t,b.layout),t}function f(t,e,n){var r=p.nestedProperty(t,n),a=w({},e.layoutAttributes);a[k]=!0,r.set(a)}function d(t,e,n){var r=p.nestedProperty(t,n);r.set(w(r.get()||{},e))}var h=t("../registry"),p=t("../lib"),g=t("../plots/attributes"),v=t("../plots/layout_attributes"),m=t("../plots/frame_attributes"),y=t("../plots/animation_attributes"),x=t("../plots/polar/area_attributes"),b=t("../plots/polar/axis_attributes"),_=p.extendFlat,w=p.extendDeep,k="_isSubplotObj",M="_isLinkedToArray",A=[k,M,"_arrayAttrRegexps","_deprecated"];n.IS_SUBPLOT_OBJ=k,n.IS_LINKED_TO_ARRAY=M,n.DEPRECATED="_deprecated",n.UNDERSCORE_ATTRS=A,n.get=function(){var t={};h.allTypes.concat("area").forEach(function(e){t[e]=r(e)});var e={};return Object.keys(h.transformsRegistry).forEach(function(t){e[t]=o(t)}),{defs:{valObjects:p.valObjects,metaKeys:A.concat(["description","role"])},traces:t,layout:a(),transforms:e,frames:i(),animation:l(y)}},n.crawl=function(t,e,r){var a=r||0;Object.keys(t).forEach(function(r){var o=t[r];-1===A.indexOf(r)&&(e(o,r,t,a),n.isValObject(o)||p.isPlainObject(o)&&n.crawl(o,e,a+1))})},n.isValObject=function(t){return t&&void 0!==t.valType},n.findArrayAttributes=function(t){function e(e,n,i,l){if(o=o.slice(0,l).concat([n]),e&&("data_array"===e.valType||!0===e.arrayOk)){var s=r(o),u=p.nestedProperty(t,s).get();Array.isArray(u)&&a.push(s)}}function r(t){return t.join(".")}var a=[],o=[];if(n.crawl(t._module.attributes,e),t.transforms)for(var i=t.transforms,l=0;l=t[1]||a[1]<=t[0])&&(o[0]e[0]))return!0}return!1}var a=t("d3"),o=t("../plotly"),i=t("../registry"),l=t("../plots/plots"),s=t("../lib"),u=t("../components/color"),c=t("../components/drawing"),f=t("../components/titles"),d=t("../components/modebar");n.layoutStyles=function(t){return s.syncOrAsync([l.doAutoMargin,n.lsInner],t)},n.lsInner=function(t){var e,i=t._fullLayout,l=i._size,s=o.Axes.list(t);for(e=0;e1)};d(e.width)&&d(e.height)||r(new Error("Height and width should be pixel values."));var h=s(t,{format:"png",height:e.height,width:e.width}),p=h.gd;p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var g=l.getRedrawFunc(p);o.plot(p,h.data,h.layout,h.config).then(g).then(f).then(function(t){n(t)}).catch(function(t){r(t)})})}var a=t("fast-isnumeric"),o=t("../plotly"),i=t("../lib"),l=t("../snapshot/helpers"),s=t("../snapshot/cloneplot"),u=t("../snapshot/tosvg"),c=t("../snapshot/svgtoimg");e.exports=r},{"../lib":130,"../plotly":160,"../snapshot/cloneplot":201,"../snapshot/helpers":204,"../snapshot/svgtoimg":206,"../snapshot/tosvg":208,"fast-isnumeric":18}],159:[function(t,e,n){"use strict";function r(t,e,n,a,o,u){u=u||[];for(var c=Object.keys(t),d=0;d1&&s.push(i("object","layout"))),d.supplyDefaults(u);for(var c=u._fullData,v=n.length,m=0;m.3*f||o(r)||o(a))){var d=n.dtick/2;t+=t+d.8){var i=Number(n.substr(1));o.exactYears>.8&&i%12==0?t=E.tickIncrement(t,"M6","reverse")+1.5*S:o.exactMonths>.8?t=E.tickIncrement(t,"M1","reverse")+15.5*S:t-=S/2;var l=E.tickIncrement(t,n);if(l<=r)return l}return t}function o(t){var e,n,r=t.tickvals,a=t.ticktext,o=new Array(r.length),i=_.simpleMap(t.range,t.r2l),l=1.0001*i[0]-1e-4*i[1],u=1.0001*i[1]-1e-4*i[0],c=Math.min(l,u),f=Math.max(l,u),d=0;Array.isArray(a)||(a=[]);var h="category"===t.type?t.d2l_noadd:t.d2l;for("log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1)),n=0;nc&&e10||"01-01"!==r.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=S&&a<=10||e>=15*S)t._tickround="d";else if(e>=N&&a<=16||e>=O)t._tickround="M";else if(e>=D&&a<=19||e>=N)t._tickround="S";else{var o=t.l2r(n+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20}}else if(x(e)||"L"===e.charAt(0)){var i=t.range.map(t.r2d||Number);x(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(i[0]),Math.abs(i[1])),s=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(s)>3&&("SI"===t.exponentformat||"B"===t.exponentformat?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}function s(t,e,n){var r=t.tickfont||{};return{x:e,dx:0,dy:0,text:n||"",fontSize:r.size,font:r.family,fontColor:r.color}}function u(t,e,n,r){var a=t._tickround,o=n&&t.hoverformat||t.tickformat;r&&(a=x(a)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[a]);var i,l=_.formatDate(e.x,o,a,t.calendar),s=l.indexOf("\n");-1!==s&&(i=l.substr(s+1),l=l.substr(0,s)),r&&("00:00:00"===l||"00:00"===l?(l=i,i=""):8===l.length&&(l=l.replace(/:00$/,""))),i&&(n?"d"===a?l+=", "+i:l=i+(l?", "+l:""):t._inCalcTicks&&i===t._prevDateHead||(l+="
"+i,t._prevDateHead=i)),e.text=l}function c(t,e,n,r,a){var o=t.dtick,i=e.x;if(!r||"string"==typeof o&&"L"===o.charAt(0)||(o="L3"),t.tickformat||"string"==typeof o&&"L"===o.charAt(0))e.text=h(Math.pow(10,i),t,a,r);else if(x(o)||"D"===o.charAt(0)&&_.mod(i+.01,1)<.1)if(-1!==["e","E","power"].indexOf(t.exponentformat)){var l=Math.round(i);e.text=0===l?1:1===l?"10":l>1?"10"+l+"":"10\u2212"+-l+"",e.fontSize*=1.25}else e.text=h(Math.pow(10,i),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6);else{if("D"!==o.charAt(0))throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,_.mod(i,1)))),e.fontSize*=.75}if("D1"===t.dtick){var s=String(e.text).charAt(0);"0"!==s&&"1"!==s||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(i<0?.5:.25)))}}function f(t,e){var n=t._categories[Math.round(e.x)];void 0===n&&(n=""),e.text=String(n)}function d(t,e,n,r,a){"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(a="hide"),e.text=h(e.x,t,a,r)}function h(t,e,n,r){var a=t<0,o=e._tickround,i=n||e.exponentformat||"B",s=e._tickexponent,u=e.tickformat,c=e.separatethousands;if(r){var f={exponentformat:e.exponentformat,dtick:"none"===e.showexponent?e.dtick:x(t)?Math.abs(t)||1:1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};l(f),o=(Number(f._tickround)||0)+4,s=f._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return y.format(u)(t).replace(/-/g,"\u2212");var d=Math.pow(10,-o)/2;if("none"===i&&(s=0),(t=Math.abs(t))12||s<-15)?t+="e"+g:"E"===i?t+="E"+g:"power"===i?t+="\xd710"+g+"":"B"===i&&9===s?t+="B":"SI"!==i&&"B"!==i||(t+=V[s/3+5])}return a?"\u2212"+t:t}function p(t,e){var n,r,a=[];for(n=0;n1)for(r=1;r2e-6||((n-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},E.getAutoRange=function(t){var e,n=[],r=t._min[0].val,a=t._max[0].val;for(e=1;e0&&c>0&&f/c>d&&(s=i,u=l,d=f/c);if(r===a){var g=r-1,v=r+1;n="tozero"===t.rangemode?r<0?[g,0]:[0,v]:"nonnegative"===t.rangemode?[Math.max(0,g),Math.max(0,v)]:[g,v]}else d&&("linear"!==t.type&&"-"!==t.type||("tozero"===t.rangemode?(s.val>=0&&(s={val:0,pad:0}),u.val<=0&&(u={val:0,pad:0})):"nonnegative"===t.rangemode&&(s.val-d*s.pad<0&&(s={val:0,pad:0}),u.val<0&&(u={val:1,pad:0})),d=(u.val-s.val)/(t._length-s.pad-u.pad)),n=[s.val-d*s.pad,u.val+d*u.pad]);return n[0]===n[1]&&("tozero"===t.rangemode?n=n[0]<0?[n[0],0]:n[0]>0?[0,n[0]]:[0,1]:(n=[n[0]-1,n[0]+1],"nonnegative"===t.rangemode&&(n[0]=Math.max(0,n[0])))),h&&n.reverse(),_.simpleMap(n,t.l2r||Number)},E.doAutoRange=function(t){t._length||t.setScale();var e=t._min&&t._max&&t._min.length&&t._max.length;if(t.autorange&&e){t.range=E.getAutoRange(t);var n=t._input;n.range=t.range.slice(),n.autorange=t.autorange}},E.saveRangeInitial=function(t,e){for(var n=E.list(t,"",!0),r=!1,a=0;a=d?h=!1:l.val>=u&&l.pad<=d&&(t._min.splice(i,1),i--);h&&t._min.push({val:u,pad:y&&0===u?0:d})}if(r(c)){for(h=!0,i=0;i=c&&l.pad>=f?h=!1:l.val<=c&&l.pad<=f&&(t._max.splice(i,1),i--);h&&t._max.push({val:c,pad:y&&0===c?0:f})}}}if((t.autorange||!!_.nestedProperty(t,"rangeslider.autorange").get())&&e){t._min||(t._min=[]),t._max||(t._max=[]),n||(n={}),t._m||t.setScale();var o,i,l,s,u,c,f,d,h,p,g,v=e.length,m=n.padded?.05*t._length:0,y=n.tozero&&("linear"===t.type||"-"===t.type),b=r((t._m>0?n.ppadplus:n.ppadminus)||n.ppad||0),w=r((t._m>0?n.ppadminus:n.ppadplus)||n.ppad||0),k=r(n.vpadplus||n.vpad),M=r(n.vpadminus||n.vpad);for(o=0;o<6;o++)a(o);for(o=v-1;o>5;o--)a(o)}},E.autoBin=function(t,e,n,o,i){var l=_.aggNums(Math.min,null,t),s=_.aggNums(Math.max,null,t);if(i||(i=e.calendar),"category"===e.type)return{start:l-.5,end:s+.5,size:1};var u;if(n)u=(s-l)/n;else{var c=_.distinctVals(t),f=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),d=f*_.roundUp(c.minDiff/f,[.9,1.9,4.9,9.9],!0);u=Math.max(d,2*_.stdev(t)/Math.pow(t.length,o?.25:.4)),x(u)||(u=1)}var h;h="log"===e.type?{type:"linear",range:[l,s]}:{type:e.type,range:_.simpleMap([l,s],e.c2r,0,i),calendar:i},E.setConvert(h),E.autoTicks(h,u);var p,g=E.tickIncrement(E.tickFirst(h),h.dtick,"reverse",i);if("number"==typeof h.dtick){g=r(g,t,h,l,s);p=g+(1+Math.floor((s-g)/h.dtick))*h.dtick}else for("M"===h.dtick.charAt(0)&&(g=a(g,t,h.dtick,l,i)),p=g;p<=s;)p=E.tickIncrement(p,h.dtick,!1,i);return{start:e.c2r(g,0,i),end:e.c2r(p,0,i),size:h.dtick}},E.calcTicks=function(t){var e=_.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var n,r=t.nticks;r||("category"===t.type?(n=t.tickfont?1.2*(t.tickfont.size||12):15,r=t._length/n):(n="y"===t._id.charAt(0)?40:80,r=_.constrain(t._length/n,4,9)+1)),"array"===t.tickmode&&(r*=100),E.autoTicks(t,Math.abs(e[1]-e[0])/r),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}if(t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),l(t),"array"===t.tickmode)return o(t);t._tmin=E.tickFirst(t);var a=e[1]=s:u<=s)&&(i.push(u),!(i.length>1e3));u=E.tickIncrement(u,t.dtick,a,t.calendar));t._tmax=i[i.length-1],t._prevDateHead="",t._inCalcTicks=!0;for(var c=new Array(i.length),f=0;fC?(e/=C,n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="M"+12*i(e,n,I)):r>z?(e/=z,t.dtick="M"+i(e,1,j)):r>S?(t.dtick=i(e,S,q),t.tick0=_.dateTick0(t.calendar,!0)):r>O?t.dtick=i(e,O,j):r>N?t.dtick=i(e,N,F):r>D?t.dtick=i(e,D,F):(n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=i(e,n,I))}else if("log"===t.type){t.tick0=0;var a=_.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(a[1]-a[0])<1){var o=1.5*Math.abs((a[1]-a[0])/e);e=Math.abs(Math.pow(10,a[1])-Math.pow(10,a[0]))/o,n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="L"+i(e,n,I)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):(t.tick0=0,n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=i(e,n,I));if(0===t.dtick&&(t.dtick=1),!x(t.dtick)&&"string"!=typeof t.dtick){var l=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(l)}},E.tickIncrement=function(t,e,n,r){var a=n?-1:1;if(x(e))return t+a*e;var o=e.charAt(0),i=a*Number(e.substr(1));if("M"===o)return _.incrementMonth(t,i,r);if("L"===o)return Math.log(Math.pow(10,t)+i)/Math.LN10;if("D"===o){var l="D2"===e?H:B,s=t+.01*a,u=_.roundUp(_.mod(s,1),l,n);return Math.floor(s)+Math.log(y.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(e)},E.tickFirst=function(t){var e=t.r2l||Number,n=_.simpleMap(t.range,e),r=n[1]1&&e2*a}function o(t){for(var e,n=Math.max(1,(t.length-1)/1e3),r=0,a=0,o=0;o2*r}var i=t("fast-isnumeric"),l=t("../../lib"),s=t("../../constants/numerical").BADNUM;e.exports=function(t,e){return a(t,e)?"date":o(t)?"category":r(t)?"linear":"-"}},{"../../constants/numerical":117,"../../lib":130,"fast-isnumeric":18}],167:[function(t,e,n){"use strict";var r=t("tinycolor2").mix,a=t("../../registry"),o=t("../../lib"),i=t("../../components/color/attributes").lightFraction,l=t("./layout_attributes"),s=t("./tick_value_defaults"),u=t("./tick_mark_defaults"),c=t("./tick_label_defaults"),f=t("./category_order_defaults"),d=t("./set_convert"),h=t("./ordered_categories");e.exports=function(t,e,n,p,g){function v(n,r){return o.coerce2(t,e,l,n,r)}var m=p.letter,y=p.font||{},x="Click to enter "+(p.title||m.toUpperCase()+" axis")+" title",b=e.type;if("date"===b){a.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",p.calendar)}d(e,g);var _=n("color"),w=_===t.color?_:y.color;n("title",x),o.coerceFont(n,"titlefont",{family:y.family,size:Math.round(1.2*y.size),color:w}),n("autorange",!e.isValidRange(t.range))&&n("rangemode"),n("range"),e.cleanRange(),s(t,e,n,b),c(t,e,n,b,p),u(t,e,n,p),f(t,e,n);var k=v("linecolor",_),M=v("linewidth"),A=n("showline",!!k||!!M);A||(delete e.linecolor,delete e.linewidth),(A||e.ticks)&&n("mirror");var T=v("gridcolor",r(_,p.bgColor,i).toRgbString()),L=v("gridwidth");n("showgrid",p.showGrid||!!T||!!L)||(delete e.gridcolor,delete e.gridwidth);var C=v("zerolinecolor",_),z=v("zerolinewidth");return n("zeroline",p.showGrid||!!C||!!z)||(delete e.zerolinecolor,delete e.zerolinewidth),e._initialCategories="category"===b?h(m,e.categoryorder,e.categoryarray,p.data):[],e}},{"../../components/color/attributes":32,"../../lib":130,"../../registry":200,"./category_order_defaults":169,"./layout_attributes":176,"./ordered_categories":178,"./set_convert":182,"./tick_label_defaults":183,"./tick_mark_defaults":184,"./tick_value_defaults":185,tinycolor2:21}],168:[function(t,e,n){"use strict";function r(t,e,n){function r(t,n){for(var r=Object.keys(t),a=/^[xyz]axis[0-9]*/,o=[],i=0;i0;o&&(r="array");var i=n("categoryorder",r);"array"===i&&n("categoryarray"),o||"array"!==i||(e.categoryorder="trace")}}},{}],170:[function(t,e,n){"use strict";e.exports={idRegex:{x:/^x([2-9]|[1-9][0-9]+)?$/,y:/^y([2-9]|[1-9][0-9]+)?$/},attrRegex:{x:/^xaxis([2-9]|[1-9][0-9]+)?$/,y:/^yaxis([2-9]|[1-9][0-9]+)?$/},xAxisMatch:/^xaxis[0-9]*$/,yAxisMatch:/^yaxis[0-9]*$/,AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,MAXDIST:20,YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,BENDPX:1.5,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4]}},{}],171:[function(t,e,n){"use strict";function r(t,e,n,r){var a,o,l,s,u=r[i(e)].type,c=[];for(o=0;oo*p))for(n=0;n=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function u(t,e){return t?"nsew"===t?"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function c(t,e,n,r,a){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+n+", "+r+")").attr("d",a+"Z")}function f(t,e,n){return t.append("path").attr("class","zoombox-corners").style({fill:T.background,stroke:T.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+n+")").attr("d","M0,0Z")}function d(t){t.selectAll(".select-outline").remove()}function h(t,e,n,r,a,o){t.attr("d",r+"M"+n.l+","+n.t+"v"+n.h+"h"+n.w+"v-"+n.h+"h-"+n.w+"Z"),a||(t.transition().style("fill",o>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function p(t){b.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function g(t){return-1!==["lasso","select"].indexOf(t)}function v(t,e){return"M"+(t.l-.5)+","+(e-R-.5)+"h-3v"+(2*R+1)+"h3ZM"+(t.r+.5)+","+(e-R-.5)+"h3v"+(2*R+1)+"h-3Z"}function m(t,e){return"M"+(e-R-.5)+","+(t.t-.5)+"v-3h"+(2*R+1)+"v3ZM"+(e-R-.5)+","+(t.b+.5)+"v3h"+(2*R+1)+"v-3Z"}function y(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,R)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function x(t,e,n){var r,a,o,i,l,s,u=!1,c={},f={};for(r=0;rR||l>R?(wt="xy",i/rt>l/at?(l=i*at/rt,mt>o?yt.t=mt-l:yt.b=mt+l):(i=l*rt/at,vt>a?yt.l=vt-i:yt.r=vt+i),Mt.attr("d",y(yt))):r():!it||lzoom back out","long"),I=!1)}function U(e,n){var r=1===(F+q).length;if(e)$();else if(2!==n||r){if(1===n&&r){var a=F?tt[0]:K[0],i="s"===F||"w"===q?0:1,l=a._name+".range["+i+"]",s=o(a,i),u="left",c="middle";if(a.fixedrange)return;F?(c="n"===F?"top":"bottom","right"===a.side&&(u="right")):"e"===q&&(u="right"),t._context.showAxisRangeEntryBoxes&&b.select(pt).call(A.makeEditable,null,{immediate:!0,background:ft.paper_bgcolor,text:String(s),fill:a.tickfont?a.tickfont.color:"#444",horizontalAlign:u,verticalAlign:c}).on("edit",function(e){var n=a.d2r(e);void 0!==n&&w.relayout(t,l,n)})}}else W()}function Y(e){function n(t,e,n){function r(e){return t.l2r(o+(e-o)*n)}if(!t.fixedrange){var a=M.simpleMap(t.range,t.r2l),o=a[0]+(a[1]-a[0])*e;t.range=a.map(r)}}if(t._context.scrollZoom||ft._enablescrollzoom){if(t._transitioningWithDuration)return M.pauseEvent(e);var r=t.querySelector(".plotly");if(B(),!(r.scrollHeight-r.clientHeight>10||r.scrollWidth-r.clientWidth>10)){clearTimeout(Tt);var a=-e.deltaY;if(isFinite(a)||(a=e.wheelDelta/10),!isFinite(a))return void M.log("Did not find wheel motion attributes: ",e);var o,i=Math.exp(-Math.min(Math.max(a,-20),20)/100),l=Ct.draglayer.select(".nsewdrag").node().getBoundingClientRect(),s=(e.clientX-l.left)/l.width,u=(l.bottom-e.clientY)/l.height;if(q||st){for(q||(s=.5),o=0;o0;r--)n.push(e);return n}function a(t,e){for(var n=[],r=0;rJ.width||$<0||$>J.height)return b.unhoverRaw(t,e)}if(P="xval"in e?r(o,e.xval):a(L,W),E="yval"in e?r(o,e.yval):a(C,$),!p(P[0])||!p(E[0]))return g.warn("Fx.hover failed",e,t),b.unhoverRaw(t,e)}var K=1/0;for(I=0;I1||-1!==F.hoverinfo.indexOf("name")?F.name:void 0,index:!1,distance:Math.min(K,M.MAXDIST),color:y.defaultLine,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},i[q]&&(U.subplot=i[q]._subplot),Y=G.length,"array"===H){var tt=e[I];"pointNumber"in tt?(U.index=tt.pointNumber,H="closest"):(H="","xval"in tt&&(V=tt.xval,H="x"),"yval"in tt&&(X=tt.yval,H=H?"closest":"y"))}else V=P[B],X=E[B];if(F._module&&F._module.hoverPoints){var et=F._module.hoverPoints(U,V,X,H);if(et)for(var nt,rt=0;rtY&&(G.splice(0,Y),K=G[0].distance)}if(0===G.length)return b.unhoverRaw(t,e);var at="y"===D&&Z.length>1;G.sort(function(t,e){return t.distance-e.distance});var ot=y.combine(i.plot_bgcolor||y.background,i.paper_bgcolor),it={hovermode:D,rotateLabels:at,bgColor:ot,container:i._hoverlayer,outerContainer:i._paperdiv},lt=u(G,it);c(G,at?"xa":"ya"),f(lt,at);var st=t._hoverdata,ut=[];for(R=0;R15&&(n=n.substr(0,12)+"...")),void 0!==t.extraText&&(r+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(r+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(r+="y: "+t.yLabel+"
"),r+=(r?"z: ":"")+t.zLabel):T&&t[a+"Label"]===v?r=t[("x"===a?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&(r=t.yLabel):r=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",t.text&&!Array.isArray(t.text)&&(r+=(r?"
":"")+t.text),""===r&&(""===n&&e.remove(),r=n);var d=e.select("text.nums").call(x.font,t.fontFamily||u,t.fontSize||c,t.fontColor||f).call(x.setPosition,0,0).text(r).attr("data-notex",1).call(m.convertToTspans);d.selectAll("tspan.line").call(x.setPosition,0,0);var p=e.select("text.name"),g=0;n&&n!==r?(p.call(x.font,t.fontFamily||u,t.fontSize||c,s).text(n).call(x.setPosition,0,0).attr("data-notex",1).call(m.convertToTspans), -p.selectAll("tspan.line").call(x.setPosition,0,0),g=p.node().getBoundingClientRect().width+2*P):(p.remove(),e.select("rect").remove()),e.select("path").style({fill:s,stroke:f});var b,_,M=d.node().getBoundingClientRect(),L=t.xa._offset+(t.x0+t.x1)/2,z=t.ya._offset+(t.y0+t.y1)/2,S=Math.abs(t.x1-t.x0),O=Math.abs(t.y1-t.y0),N=M.width+D+P+g;t.ty0=w-M.top,t.bx=M.width+2*P,t.by=M.height+2*P,t.anchor="start",t.txwidth=M.width,t.tx2width=g,t.offset=0,o?(t.pos=L,b=z+O/2+N<=A,_=z-O/2-N>=0,"top"!==t.idealAlign&&b||!_?b?(z+=O/2,t.anchor="start"):t.anchor="middle":(z-=O/2,t.anchor="end")):(t.pos=z,b=L+S/2+N<=k,_=L-S/2-N>=0,"left"!==t.idealAlign&&b||!_?b?(L+=S/2,t.anchor="start"):t.anchor="middle":(L-=S/2,t.anchor="end")),d.attr("text-anchor",t.anchor),g&&p.attr("text-anchor",t.anchor),e.attr("transform","translate("+L+","+z+")"+(o?"rotate("+C+")":""))}),S}function c(t,e){function n(t){var e=t[0],n=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=n.pos+n.dp+n.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;r=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;r=!1}if(r){var u=0;for(i=0;ie.pmax&&u++;for(i=t.length-1;i>=0&&!(u<=0);i--)s=t[i],s.pos>e.pmax-1&&(s.del=!0,u--);for(i=0;i=0;l--)t[l].dp-=o;for(i=t.length-1;i>=0&&!(u<=0);i--)s=t[i],s.pos+s.dp+s.size>e.pmax&&(s.del=!0,u--)}}}for(var r,a,o,i,l,s,u,c=0,f=t.map(function(t,n){var r=t[e];return[{i:n,dp:0,pos:t.pos,posref:t.posref,size:t.by*("x"===r._id.charAt(0)?S:1)/2,pmin:r._offset,pmax:r._offset+r._length}]}).sort(function(t,e){return t[0].posref-e[0].posref});!r&&c<=t.length;){for(c++,r=!0,i=0;i.01&&p.pmin===g.pmin&&p.pmax===g.pmax){for(l=h.length-1;l>=0;l--)h[l].dp+=a;for(d.push.apply(d,h),f.splice(i+1,1),u=0,l=d.length-1;l>=0;l--)u+=d[l].dp;for(o=u/d.length,l=d.length-1;l>=0;l--)d[l].dp-=o;r=!1}else i++}f.forEach(n)}for(i=f.length-1;i>=0;i--){var v=f[i];for(l=v.length-1;l>=0;l--){var m=v[l],y=t[m.i];y.offset=m.dp,y.del=m.del}}}function f(t,e){t.each(function(t){var n=h.select(this);if(t.del)return void n.remove();var r="end"===t.anchor?-1:1,a=n.select("text.nums"),o={start:1,end:-1,middle:0}[t.anchor],i=o*(D+P),l=i+o*(t.txwidth+P),s=0,u=t.offset;"middle"===t.anchor&&(i-=t.tx2width/2,l-=t.tx2width/2),e&&(u*=-N,s=t.offset*O),n.select("path").attr("d","middle"===t.anchor?"M-"+t.bx/2+",-"+t.by/2+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(r*D+s)+","+(D+u)+"v"+(t.by/2-D)+"h"+r*t.bx+"v-"+t.by+"H"+(r*D+s)+"V"+(u-D)+"Z"),a.call(x.setPosition,i+s,u+t.ty0-t.by/2+P).selectAll("tspan.line").attr({x:a.attr("x"),y:a.attr("y")}),t.tx2width&&(n.select("text.name, text.name tspan.line").call(x.setPosition,l+o*P+s,u+t.ty0-t.by/2+P),n.select("rect").call(x.setRect,l+(o-1)*t.tx2width/2+s,u-t.by/2-1,t.tx2width,t.by+2))})}function d(t,e,n){if(!e.target)return!1;if(!n||n.length!==t._hoverdata.length)return!0;for(var r=n.length-1;r>=0;r--){var a=n[r],o=t._hoverdata[r];if(a.curveNumber!==o.curveNumber||String(a.pointNumber)!==String(o.pointNumber))return!0}return!1}var h=t("d3"),p=t("fast-isnumeric"),g=t("../../lib"),v=t("../../lib/events"),m=t("../../lib/svg_text_utils"),y=t("../../components/color"),x=t("../../components/drawing"),b=t("../../components/dragelement"),_=t("../../lib/override_cursor"),w=t("../../registry"),k=t("./axes"),M=t("./constants"),A=t("./dragbox"),T=t("../layout_attributes"),L=e.exports={};L.unhover=b.unhover,L.supplyLayoutDefaults=function(t,e,n){function r(n,r){return g.coerce(t,e,T,n,r)}r("dragmode");var a;if(e._has("cartesian")){a=(e._isHoriz=L.isHoriz(n))?"y":"x"}else a="closest";r("hovermode",a)},L.isHoriz=function(t){for(var e=!0,n=0;nt._lastHoverTime+M.HOVERMINTIME)return i(t,e,n),void(t._lastHoverTime=Date.now());t._hoverTimer=setTimeout(function(){i(t,e,n),t._lastHoverTime=Date.now(),t._hoverTimer=void 0},M.HOVERMINTIME)},L.getDistanceFunction=function(t,e,n,r){return"closest"===t?r||o(e,n):"x"===t?e:n},L.getClosest=function(t,e,n){if(!1!==n.index)n.index>=0&&n.indexc[1]-.01&&(e.domain=[0,1]),a.noneOrAll(t.domain,e.domain,[0,1])}return e}},{"../../lib":130,"fast-isnumeric":18}],180:[function(t,e,n){"use strict";e.exports=function(t,e,n){void 0===n&&(n=.5);var r=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=r[0]+(r[1]-r[0])*n,o=(a-r[0])*e;t.range=t._input.range=[t.l2r(a-o),t.l2r(a+o)]}},{}],181:[function(t,e,n){"use strict";function r(t){return t._id}var a=t("../../lib/polygon"),o=t("../../components/color"),i=t("./axes"),l=t("./constants"),s=a.filter,u=a.tester,c=l.MINSELECT;e.exports=function(t,e,n,a,f){function d(t){var e="y"===t._id.charAt(0)?1:0;return function(n){return t.p2d(n[e])}}function h(t,e){return t-e}var p,g=a.gd._fullLayout._zoomlayer,v=a.element.getBoundingClientRect(),m=a.plotinfo.xaxis._offset,y=a.plotinfo.yaxis._offset,x=e-v.left,b=n-v.top,_=x,w=b,k="M"+x+","+b,M=a.xaxes[0]._length,A=a.yaxes[0]._length,T=a.xaxes.map(r),L=a.yaxes.map(r),C=a.xaxes.concat(a.yaxes);"lasso"===f&&(p=s([[x,b]],l.BENDPX));var z=g.selectAll("path.select-outline").data([1,2]);z.enter().append("path").attr("class",function(t){return"select-outline select-outline-"+t}).attr("transform","translate("+m+", "+y+")").attr("d",k+"Z");var S,O,N,D,P,E=g.append("path").attr("class","zoombox-corners").style({fill:o.background,stroke:o.defaultLine,"stroke-width":1}).attr("transform","translate("+m+", "+y+")").attr("d","M0,0Z"),R=[],I=a.gd,j=[];for(S=0;Sd?h:i(t)?Number(t):h):h}var o=t("d3"),i=t("fast-isnumeric"),l=t("../../lib"),s=l.cleanNumber,u=l.ms2DateTime,c=l.dateTime2ms,f=t("../../constants/numerical"),d=f.FP_SAFE,h=f.BADNUM,p=t("./constants"),g=t("./axis_ids");e.exports=function(t,e){function n(e,n){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&n&&t.range&&2===t.range.length){var r=t.range[0],a=t.range[1];return.5*(r+a-3*w*Math.abs(r-a))}return h}function f(e,n,r){var a=c(e,r||t.calendar);if(a===h){if(!i(e))return h;a=c(new Date(+e))}return a}function v(e,n,r){return u(e,n,r||t.calendar)}function m(e){return t._categories[Math.round(e)]}function y(e){if(null!==e&&void 0!==e){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(e);var n=t._categories.length-1;return t._categoriesMap[e]=n,n}return h}function x(e){if(t._categoriesMap){var n=t._categoriesMap[e];if(void 0!==n)return n}if("number"==typeof e)return e}function b(e){return i(e)?o.round(t._b+t._m*e,2):h}function _(e){return(e-t._b)/t._m}e=e||{};var w=10;t.c2l="log"===t.type?n:a,t.l2c="log"===t.type?r:a,t.l2p=b,t.p2l=_,t.c2p="log"===t.type?function(t,e){return b(n(t,e))}:b,t.p2c="log"===t.type?function(t){return r(_(t))}:_,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=s,t.c2d=t.c2r=t.l2d=t.l2r=a,t.d2p=t.r2p=function(t){return b(s(t))},t.p2d=t.p2r=_):"log"===t.type?(t.d2r=t.d2l=function(t,e){return n(s(t),e)},t.r2d=t.r2c=function(t){return r(s(t))},t.d2c=t.r2l=s,t.c2d=t.l2r=a,t.c2r=n,t.l2d=r,t.d2p=function(e,n){return b(t.d2r(e,n))},t.p2d=function(t){return r(_(t))},t.r2p=function(t){return b(s(t))},t.p2r=_):"date"===t.type?(t.d2r=t.r2d=l.identity,t.d2c=t.r2c=t.d2l=t.r2l=f,t.c2d=t.c2r=t.l2d=t.l2r=v,t.d2p=t.r2p=function(t,e,n){return b(f(t,0,n))},t.p2d=t.p2r=function(t,e,n){return v(_(t),e,n)}):"category"===t.type&&(t.d2r=t.d2c=t.d2l=y,t.r2d=t.c2d=t.l2d=m,t.d2l_noadd=x,t.r2l=t.l2r=t.r2c=t.c2r=a,t.d2p=function(t){return b(x(t))},t.p2d=function(t){return m(_(t))},t.r2p=b,t.p2r=_),t.fraction2r=function(e){var n=t.r2l(t.range[0]),r=t.r2l(t.range[1]);return t.l2r(n+e*(r-n))},t.r2fraction=function(e){var n=t.r2l(t.range[0]),r=t.r2l(t.range[1]);return(t.r2l(e)-n)/(r-n)},t.cleanRange=function(e){e||(e="range");var n,r,a=l.nestedProperty(t,e).get(),o=(t._id||"x").charAt(0);if(r="date"===t.type?l.dfltRange(t.calendar):"y"===o?p.DFLTRANGEY:p.DFLTRANGEX,r=r.slice(),!a||2!==a.length)return void l.nestedProperty(t,e).set(r);for("date"===t.type&&(a[0]=l.cleanDate(a[0],h,t.calendar),a[1]=l.cleanDate(a[1],h,t.calendar)),n=0;n<2;n++)if("date"===t.type){if(!l.isDateTime(a[n],t.calendar)){t[e]=r;break}if(t.r2l(a[0])===t.r2l(a[1])){var s=l.constrain(t.r2l(a[0]),l.MIN_MS+1e3,l.MAX_MS-1e3);a[0]=t.l2r(s-1e3),a[1]=t.l2r(s+1e3);break}}else{if(!i(a[n])){if(!i(a[1-n])){t[e]=r;break}a[n]=a[1-n]*(n?10:.1)}if(a[n]<-d?a[n]=-d:a[n]>d&&(a[n]=d),a[0]===a[1]){var u=Math.max(1,Math.abs(1e-6*a[0]));a[0]-=u,a[1]+=u}}},t.setScale=function(n){var r=e._size,a=t._id.charAt(0);if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var o=g.getFromId({_fullLayout:e},t.overlaying);t.domain=o.domain}var i=n&&t._r?"_r":"range",s=t.calendar;t.cleanRange(i);var u=t.r2l(t[i][0],s),c=t.r2l(t[i][1],s);if("y"===a?(t._offset=r.t+(1-t.domain[1])*r.h,t._length=r.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=r.l+t.domain[0]*r.w,t._length=r.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),!isFinite(t._m)||!isFinite(t._b))throw l.notifier("Something went wrong with axis scaling","long"),e._replotting=!1,new Error("axis scaling")},t.makeCalcdata=function(e,n){var r,a,o,i="date"===t.type&&e[n+"calendar"];if(n in e)for(r=e[n],a=new Array(r.length),o=0;o0?Number(c):u;else if("string"!=typeof c)e.dtick=u;else{var f=c.charAt(0),d=c.substr(1);d=r(d)?Number(d):0,(d<=0||!("date"===i&&"M"===f&&d===Math.round(d)||"log"===i&&"L"===f||"log"===i&&"D"===f&&(1===d||2===d)))&&(e.dtick=u)}var h="date"===i?a.dateTick0(e.calendar):0,p=n("tick0",h);"date"===i?e.tick0=a.cleanDate(p,h):r(p)&&"D1"!==c&&"D2"!==c?e.tick0=Number(p):e.tick0=h}else{var g=n("tickvals");void 0===g?e.tickmode="auto":n("ticktext")}}},{"../../constants/numerical":117,"../../lib":130,"fast-isnumeric":18}],186:[function(t,e,n){"use strict";var r=t("d3"),a=t("../../plotly"),o=t("../../registry"),i=t("../../components/drawing"),l=t("./axes"),s=/((x|y)([2-9]|[1-9][0-9]+)?)axis$/;e.exports=function(t,e,n,u){function c(e,n){function r(e,n){for(a=0;an.duration?(h(),M=window.cancelAnimationFrame(g)):M=window.requestAnimationFrame(g)}var v=t._fullLayout,m=[],y=function(t){var e,n,r,a,o,i={};for(e in t)if(n=e.split("."),r=n[0].match(s)){var l=r[1],u=l+"axis";if(a=v[u],o={},Array.isArray(t[e])?o.to=t[e].slice(0):Array.isArray(t[e].range)&&(o.to=t[e].range.slice(0)),!o.to)continue;o.axisName=u,o.length=a._length,m.push(l),i[l]=o}return i}(e),x=Object.keys(y),b=function(t,e,n){var r,a,o,i=t._plots,l=[];for(r in i){var s=i[r];if(-1===l.indexOf(s)){var u=s.xaxis._id,c=s.yaxis._id,f=s.xaxis.range,d=s.yaxis.range;s.xaxis._r=s.xaxis.range.slice(),s.yaxis._r=s.yaxis.range.slice(),a=n[u]?n[u].to:f,o=n[c]?n[c].to:d,f[0]===a[0]&&f[1]===a[1]&&d[0]===o[0]&&d[1]===o[1]||-1===e.indexOf(u)&&-1===e.indexOf(c)||l.push(s)}}return l}(v,x,y);if(!b.length)return!1;var _;u&&(_=u());var w,k,M,A=r.ease(n.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(M),M=null,p()}),w=Date.now(),M=window.requestAnimationFrame(g),Promise.resolve()}},{"../../components/drawing":56,"../../plotly":160,"../../registry":200,"./axes":165,d3:15}],187:[function(t,e,n){"use strict";function r(t,e){if("-"===t.type){var n=t._id,r=n.charAt(0);-1!==n.indexOf("scene")&&(n=r);var u=a(e,n,r);if(u){if("histogram"===u.type&&r==={v:"y",h:"x"}[u.orientation||"v"])return void(t.type="linear");var c=r+"calendar",f=u[c];if(i(u,r)){for(var d,h=o(u),p=[],g=0;g0?".":"")+a;u.isPlainObject(o)?l(o,e,i,r+1):e(i,a,o)}})}var s=t("../plotly"),u=t("../lib");n.manageCommandObserver=function(t,e,a,o){var i={},l=!0;e&&e._commandObserver&&(i=e._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var s=n.hasSimpleAPICommandBindings(t,a,i.lookupTable);if(e&&e._commandObserver){if(s)return i;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,i}if(s){r(t,s,i.cache),i.check=function(){if(l){var e=r(t,s,i.cache);return e.changed&&o&&void 0!==i.lookupTable[e.value]&&(i.disable(),Promise.resolve(o({value:e.value,type:s.type,prop:s.prop,traces:s.traces,index:i.lookupTable[e.value]})).then(i.enable,i.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f=e.width-20?(o["text-anchor"]="start",o.x=5):(o["text-anchor"]="end",o.x=e._paper.attr("width")-7),n.attr(o);var l=n.select(".js-link-to-tool"),s=n.select(".js-link-spacer"),u=n.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&r(t,l),s.text(l.text()&&u.text()?" - ":"")}},h.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||"https://plot.ly",n=i.select(t).append("div").attr("id","hiddenform").style("display","none"),r=n.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return r.append("input").attr({type:"text",name:"data"}).node().value=h.graphJson(t,!1,"keepdata"),r.node().submit(),n.remove(),t.emit("plotly_afterexport"),!1},h.supplyDefaults=function(t){var e,n=t._fullLayout||{},r=t._fullLayout={},a=t.layout||{},o=t._fullData||[],i=t._fullData=[],l=t.data||[];if(t._transitionData||h.createTransitionData(t),n._initialAutoSizeIsDone){var u=n.width,c=n.height;h.supplyLayoutGlobalDefaults(a,r),a.width||(r.width=u),a.height||(r.height=c)}else{h.supplyLayoutGlobalDefaults(a,r);var f=!a.width||!a.height,d=r.autosize,p=t._context&&t._context.autosizable;f&&(d||p)?h.plotAutoSize(t,a,r):f&&h.sanitizeMargins(t),!d&&f&&(a.width=r.width,a.height=r.height)}r._initialAutoSizeIsDone=!0,r._dataLength=l.length,r._globalTransforms=(t._context||{}).globalTransforms,h.supplyDataDefaults(l,i,a,r),r._has=h._hasPlotType.bind(r);var g=r._modules;for(e=0;e0){var f=o(t._boundingBoxMargins),d=f.left+f.right,p=f.bottom+f.top,g=1-2*s,v=n._container&&n._container.node?n._container.node().getBoundingClientRect():{width:n.width,height:n.height};r=Math.round(g*(v.width-d)),a=Math.round(g*(v.height-p))}else{var m=u?window.getComputedStyle(t):{};r=parseFloat(m.width)||n.width,a=parseFloat(m.height)||n.height}var y=h.layoutAttributes.width.min,x=h.layoutAttributes.height.min;r1,_=!e.height&&Math.abs(n.height-a)>1;(_||b)&&(b&&(n.width=r),_&&(n.height=a)),t._initialAutoSize||(t._initialAutoSize={width:r,height:a}),h.sanitizeMargins(n)},h.supplyLayoutModuleDefaults=function(t,e,n,r){var a,o;s.Axes.supplyLayoutDefaults(t,e,n);var i=e._basePlotModules;for(a=0;a.5*r.width&&(n.l=n.r=0),n.b+n.t>.5*r.height&&(n.b=n.t=0),r._pushmargin[e]={l:{val:n.x,size:n.l+a},r:{val:n.x,size:n.r+a},b:{val:n.y,size:n.b+a},t:{val:n.y,size:n.t+a}}}else delete r._pushmargin[e];r._replotting||h.doAutoMargin(t)}},h.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),e._pushmargin||(e._pushmargin={});var n=e._size,r=JSON.stringify(n),a=Math.max(e.margin.l||0,0),o=Math.max(e.margin.r||0,0),i=Math.max(e.margin.t||0,0),u=Math.max(e.margin.b||0,0),c=e._pushmargin;if(!1!==e.margin.autoexpand){c.base={l:{val:0,size:a},r:{val:1,size:o},t:{val:1,size:i},b:{val:0,size:u}};for(var f=Object.keys(c),d=0;dv){var M=(m*w+(k-e.width)*v)/(w-v),A=(k*(1-v)+(m-e.width)*(1-w))/(w-v);M>=0&&A>=0&&M+A>a+o&&(a=M,o=A)}}if(l(x)&&c[_].t){var T=c[_].t.val,L=c[_].t.size;if(T>y){var C=(x*T+(L-e.height)*y)/(T-y),z=(L*(1-y)+(x-e.height)*(1-T))/(T-y);C>=0&&z>=0&&C+z>u+i&&(u=C,i=z)}}}}if(n.l=Math.round(a),n.r=Math.round(o),n.t=Math.round(i),n.b=Math.round(u),n.p=Math.round(e.margin.pad),n.w=Math.round(e.width)-n.l-n.r,n.h=Math.round(e.height)-n.t-n.b,!e._replotting&&"{}"!==r&&r!==JSON.stringify(e._size))return s.plot(t)},h.graphJson=function(t,e,n,r,a){function o(t){if("function"==typeof t)return null;if(c.isPlainObject(t)){var e,r,a={};for(e in t)if("function"!=typeof t[e]&&-1===["_","["].indexOf(e.charAt(0))){if("keepdata"===n){if("src"===e.substr(e.length-3))continue}else if("keepstream"===n){if("string"==typeof(r=t[e+"src"])&&r.indexOf(":")>0&&!c.isPlainObject(t.stream))continue}else if("keepall"!==n&&"string"==typeof(r=t[e+"src"])&&r.indexOf(":")>0)continue;a[e]=o(t[e])}return a}return Array.isArray(t)?t.map(o):c.isJSDate(t)?c.ms2DateTimeLocal(+t):t}(a&&e&&!t._fullData||a&&!e&&!t._fullLayout)&&h.supplyDefaults(t);var i=a?t._fullData:t.data,l=a?t._fullLayout:t.layout,s=(t._transitionData||{})._frames,u={data:(i||[]).map(function(t){var n=o(t);return e&&delete n.fit,n})};return e||(u.layout=o(l)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),s&&(u.frames=o(s)),"object"===r?u:JSON.stringify(u)},h.modifyFrames=function(t,e){var n,r,a,o=t._transitionData._frames,i=t._transitionData._frameHash;for(n=0;n0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){_=!0}),a.redraw&&t._transitionData._interruptCallbacks.push(function(){return s.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var i,l,u=0,f=0,h=t._fullLayout._basePlotModules,p=!1;if(n)for(l=0;l=0,C=L?f.angularAxis.domain:r.extent(k),z=Math.abs(k[1]-k[0]);A&&!M&&(z=0);var S=C.slice();T&&M&&(S[1]+=z);var O=f.angularAxis.ticksCount||4;O>8&&(O=O/(O/8)+O%8),f.angularAxis.ticksStep&&(O=(S[1]-S[0])/O);var N=f.angularAxis.ticksStep||(S[1]-S[0])/(O*(f.minorTicks+1));w&&(N=Math.max(Math.round(N),1)),S[2]||(S[2]=N);var D=r.range.apply(this,S);if(D=D.map(function(t,e){return parseFloat(t.toPrecision(12))}), -l=r.scale.linear().domain(S.slice(0,2)).range("clockwise"===f.direction?[0,360]:[360,0]),c.layout.angularAxis.domain=l.domain(),c.layout.angularAxis.endPadding=T?z:0,void 0===(e=r.select(this).select("svg.chart-root"))||e.empty()){var P=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),E=this.appendChild(this.ownerDocument.importNode(P.documentElement,!0));e=r.select(E)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var R,I=e.select(".chart-group"),j={fill:"none",stroke:f.tickColor},F={"font-size":f.font.size,"font-family":f.font.family,fill:f.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+f.font.outlineColor}).join(",")};if(f.showLegend){R=e.select(".legend-group").attr({transform:"translate("+[x,f.margin.top]+")"}).style({display:"block"});var q=h.map(function(t,e){var n=i.util.cloneJson(t);return n.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",n.visibleInLegend=void 0===t.visibleInLegend||t.visibleInLegend,n.color="LinePlot"===t.geometry?t.strokeColor:t.color,n});i.Legend().config({data:h.map(function(t,e){return t.name||"Element"+e}),legendConfig:o({},i.Legend.defaultConfig().legendConfig,{container:R,elements:q,reverseOrder:f.legend.reverseOrder})})();var B=R.node().getBBox();x=Math.min(f.width-B.width-f.margin.left-f.margin.right,f.height-f.margin.top-f.margin.bottom)/2,x=Math.max(10,x),_=[f.margin.left+x,f.margin.top+x],a.range([0,x]),c.layout.radialAxis.domain=a.domain(),R.attr("transform","translate("+[_[0]+x,_[1]-x]+")")}else R=e.select(".legend-group").style({display:"none"});e.attr({width:f.width,height:f.height}).style({opacity:f.opacity}),I.attr("transform","translate("+_+")").style({cursor:"crosshair"});var H=[(f.width-(f.margin.left+f.margin.right+2*x+(B?B.width:0)))/2,(f.height-(f.margin.top+f.margin.bottom+2*x))/2];if(H[0]=Math.max(0,H[0]),H[1]=Math.max(0,H[1]),e.select(".outer-group").attr("transform","translate("+H+")"),f.title){var V=e.select("g.title-group text").style(F).text(f.title),X=V.node().getBBox();V.attr({x:_[0]-X.width/2,y:_[1]-x-20})}var U=e.select(".radial.axis-group");if(f.radialAxis.gridLinesVisible){var Y=U.selectAll("circle.grid-circle").data(a.ticks(5));Y.enter().append("circle").attr({class:"grid-circle"}).style(j),Y.attr("r",a),Y.exit().remove()}U.select("circle.outside-circle").attr({r:x}).style(j);var G=e.select("circle.background-circle").attr({r:x}).style({fill:f.backgroundColor,stroke:f.stroke});if(f.radialAxis.visible){var Z=r.svg.axis().scale(a).ticks(5).tickSize(5);U.call(Z).attr({transform:"rotate("+f.radialAxis.orientation+")"}),U.selectAll(".domain").style(j),U.selectAll("g>text").text(function(t,e){return this.textContent+f.radialAxis.ticksSuffix}).style(F).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===f.radialAxis.tickOrientation?"rotate("+-f.radialAxis.orientation+") translate("+[0,F["font-size"]]+")":"translate("+[0,F["font-size"]]+")"}}),U.selectAll("g>line").style({stroke:"black"})}var W=e.select(".angular.axis-group").selectAll("g.angular-tick").data(D),$=W.enter().append("g").classed("angular-tick",!0);W.attr({transform:function(t,e){return"rotate("+s(t,e)+")"}}).style({display:f.angularAxis.visible?"block":"none"}),W.exit().remove(),$.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(f.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(f.minorTicks+1)==0)}).style(j),$.selectAll(".minor").style({stroke:f.minorTickColor}),W.select("line.grid-line").attr({x1:f.tickLength?x-f.tickLength:0,x2:x}).style({display:f.angularAxis.gridLinesVisible?"block":"none"}),$.append("text").classed("axis-text",!0).style(F);var Q=W.select("text.axis-text").attr({x:x+f.labelOffset,dy:".35em",transform:function(t,e){var n=s(t,e),r=x+f.labelOffset,a=f.angularAxis.tickOrientation;return"horizontal"==a?"rotate("+-n+" "+r+" 0)":"radial"==a?n<270&&n>90?"rotate(180 "+r+" 0)":null:"rotate("+(n<=180&&n>0?-90:90)+" "+r+" 0)"}}).style({"text-anchor":"middle",display:f.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(f.minorTicks+1)!=0?"":w?w[t]+f.angularAxis.ticksSuffix:t+f.angularAxis.ticksSuffix}).style(F);f.angularAxis.rewriteTicks&&Q.text(function(t,e){return e%(f.minorTicks+1)!=0?"":f.angularAxis.rewriteTicks(this.textContent,e)});var J=r.max(I.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));R.attr({transform:"translate("+[x+J,f.margin.top]+")"});var K=e.select("g.geometry-group").selectAll("g").size()>0,tt=e.select("g.geometry-group").selectAll("g.geometry").data(h);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),h[0]||K){var et=[];h.forEach(function(t,e){var n={};n.radialScale=a,n.angularScale=l,n.container=tt.filter(function(t,n){return n==e}),n.geometry=t.geometry,n.orientation=f.orientation,n.direction=f.direction,n.index=e,et.push({data:t,geometryConfig:n})});var nt=r.nest().key(function(t,e){return void 0!==t.data.groupId||"unstacked"}).entries(et),rt=[];nt.forEach(function(t,e){"unstacked"===t.key?rt=rt.concat(t.values.map(function(t,e){return[t]})):rt.push(t.values)}),rt.forEach(function(t,e){var n;n=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var r=t.map(function(t,e){return o(i[n].defaultConfig(),t)});i[n]().config(r)()})}var at,ot,it=e.select(".guides-group"),lt=e.select(".tooltips-group"),st=i.tooltipPanel().config({container:lt,fontSize:8})(),ut=i.tooltipPanel().config({container:lt,fontSize:8})(),ct=i.tooltipPanel().config({container:lt,hasTick:!0})();if(!M){var ft=it.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});I.on("mousemove.angular-guide",function(t,e){var n=i.util.getMousePos(G).angle;ft.attr({x2:-x,transform:"rotate("+n+")"}).style({opacity:.5});var r=(n+180+360-f.orientation)%360;at=l.invert(r);var a=i.util.convertToCartesian(x+12,n+180);st.text(i.util.round(at)).move([a[0]+_[0],a[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){it.select("line").style({opacity:0})})}var dt=it.select("circle").style({stroke:"grey",fill:"none"});I.on("mousemove.radial-guide",function(t,e){var n=i.util.getMousePos(G).radius;dt.attr({r:n}).style({opacity:.5}),ot=a.invert(i.util.getMousePos(G).radius);var r=i.util.convertToCartesian(n,f.radialAxis.orientation);ut.text(i.util.round(ot)).move([r[0]+_[0],r[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){dt.style({opacity:0}),ct.hide(),st.hide(),ut.hide()}),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(t,n){var a=r.select(this),o=a.style("fill"),l="black",s=a.style("opacity")||1;if(a.attr({"data-opacity":s}),"none"!=o){a.attr({"data-fill":o}),l=r.hsl(o).darker().toString(),a.style({fill:l,opacity:1});var u={t:i.util.round(t[0]),r:i.util.round(t[1])};M&&(u.t=w[t[0]]);var c="t: "+u.t+", r: "+u.r,f=this.getBoundingClientRect(),d=e.node().getBoundingClientRect(),h=[f.left+f.width/2-H[0]-d.left,f.top+f.height/2-H[1]-d.top];ct.config({color:l}).text(c),ct.move(h)}else o=a.style("stroke"),a.attr({"data-stroke":o}),l=r.hsl(o).darker().toString(),a.style({stroke:l,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=r.event.which)return!1;r.select(this).attr("data-fill")&&ct.show()}).on("mouseout.tooltip",function(t,e){ct.hide();var n=r.select(this),a=n.attr("data-fill");a?n.style({fill:a,opacity:n.attr("data-opacity")}):n.style({stroke:n.attr("data-stroke"),opacity:n.attr("data-opacity")})})}),d}var e,n,a,l,s={data:[],layout:{}},u={},c={},f=r.dispatch("hover"),d={};return d.render=function(e){return t(e),this},d.config=function(t){if(!arguments.length)return s;var e=i.util.cloneJson(t);return e.data.forEach(function(t,e){s.data[e]||(s.data[e]={}),o(s.data[e],i.Axis.defaultConfig().data[0]),o(s.data[e],t)}),o(s.layout,i.Axis.defaultConfig().layout),o(s.layout,e.layout),this},d.getLiveConfig=function(){return c},d.getinputConfig=function(){return u},d.radialScale=function(t){return a},d.angularScale=function(t){return l},d.svg=function(){return e},r.rebind(d,f,"on"),d},i.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:r.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},i.util={},i.DATAEXTENT="dataExtent",i.AREA="AreaChart",i.LINE="LinePlot",i.DOT="DotPlot",i.BAR="BarChart",i.util._override=function(t,e){for(var n in t)n in e&&(e[n]=t[n])},i.util._extend=function(t,e){for(var n in t)e[n]=t[n]},i.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},i.util.dataFromEquation2=function(t,e){var n=e||6;return r.range(0,360+n,n).map(function(e,n){var r=e*Math.PI/180;return[e,t(r)]})},i.util.dataFromEquation=function(t,e,n){var a=e||6,o=[],i=[];r.range(0,360+a,a).forEach(function(e,n){var r=e*Math.PI/180,a=t(r);o.push(e),i.push(a)});var l={t:o,r:i};return n&&(l.name=n),l},i.util.ensureArray=function(t,e){if(void 0===t)return null;var n=[].concat(t);return r.range(e).map(function(t,e){return n[e]||n[0]})},i.util.fillArrays=function(t,e,n){return e.forEach(function(e,r){t[e]=i.util.ensureArray(t[e],n)}),t},i.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},i.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var n=e.shift();return t[n]&&(!e.length||objHasKeys(t[n],e))},i.util.sumArrays=function(t,e){return r.zip(t,e).map(function(t,e){return r.sum(t)})},i.util.arrayLast=function(t){return t[t.length-1]},i.util.arrayEqual=function(t,e){for(var n=Math.max(t.length,e.length,1);n-- >=0&&t[n]===e[n];);return-2===n},i.util.flattenArray=function(t){for(var e=[];!i.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},i.util.deduplicate=function(t){return t.filter(function(t,e,n){return n.indexOf(t)==e})},i.util.convertToCartesian=function(t,e){var n=e*Math.PI/180;return[t*Math.cos(n),t*Math.sin(n)]},i.util.round=function(t,e){var n=e||2,r=Math.pow(10,n);return Math.round(t*r)/r},i.util.getMousePos=function(t){var e=r.mouse(t.node()),n=e[0],a=e[1],o={};return o.x=n,o.y=a,o.pos=e,o.angle=180*(Math.atan2(a,n)+Math.PI)/Math.PI,o.radius=Math.sqrt(n*n+a*a),o},i.util.duplicatesCount=function(t){for(var e,n={},r={},a=0,o=t.length;a0)){var l=r.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:d(i),transform:function(e,n){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return v.fill(n,a,o)},"fill-opacity":0,stroke:function(t,e){return v.stroke(n,a,o)},"stroke-width":function(t,e){return v["stroke-width"](n,a,o)},"stroke-dasharray":function(t,e){return v["stroke-dasharray"](n,a,o)},opacity:function(t,e){return v.opacity(n,a,o)},display:function(t,e){return v.display(n,a,o)}})}};var h=t.angularScale.range(),p=Math.abs(h[1]-h[0])/s[0].length*Math.PI/180,g=r.svg.arc().startAngle(function(t){return-p/2}).endAngle(function(t){return p/2}).innerRadius(function(e){return t.radialScale(c+(e[2]||0))}).outerRadius(function(e){return t.radialScale(c+(e[2]||0))+t.radialScale(e[1])});f.arc=function(e,n,a){r.select(this).attr({class:"mark arc",d:g,transform:function(e,n){return"rotate("+(t.orientation+u(e[0])+90)+")"}})};var v={fill:function(t,n,r){return e[r].data.color},stroke:function(t,n,r){return e[r].data.strokeColor},"stroke-width":function(t,n,r){return e[r].data.strokeSize+"px"},"stroke-dasharray":function(t,n,r){return a[e[r].data.strokeDash]},opacity:function(t,n,r){return e[r].data.opacity},display:function(t,n,r){return void 0===e[r].data.visible||e[r].data.visible?"block":"none"}},m=r.select(this).selectAll("g.layer").data(s);m.enter().append("g").attr({class:"layer"});var y=m.selectAll("path.mark").data(function(t,e){return t});y.enter().append("path").attr({class:"mark"}),y.style(v).each(f[t.geometryType]),y.exit().remove(),m.exit().remove()})}var e=[i.PolyChart.defaultConfig()],n=r.dispatch("hover"),a={solid:"none",dash:[5,2],dot:[2,5]};return t.config=function(t){return arguments.length?(t.forEach(function(t,n){e[n]||(e[n]={}),o(e[n],i.PolyChart.defaultConfig()),o(e[n],t)}),this):e},t.getColorScale=function(){},r.rebind(t,n,"on"),t},i.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:r.scale.category20()}}},i.BarChart=function(){return i.PolyChart()},i.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},i.AreaChart=function(){return i.PolyChart()},i.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},i.DotPlot=function(){return i.PolyChart()},i.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},i.LinePlot=function(){return i.PolyChart()},i.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},i.Legend=function(){function t(){var n=e.legendConfig,a=e.data.map(function(t,e){return[].concat(t).map(function(t,r){var a=o({},n.elements[e]);return a.name=t,a.color=[].concat(n.elements[e].color)[r],a})}),i=r.merge(a);i=i.filter(function(t,e){return n.elements[e]&&(n.elements[e].visibleInLegend||void 0===n.elements[e].visibleInLegend)}),n.reverseOrder&&(i=i.reverse());var l=n.container;("string"==typeof l||l.nodeName)&&(l=r.select(l));var s=i.map(function(t,e){return t.color}),u=n.fontSize,c=null==n.isContinuous?"number"==typeof i[0]:n.isContinuous,f=c?n.height:u*i.length,d=l.classed("legend-group",!0),h=d.selectAll("svg").data([0]),p=h.enter().append("svg").attr({width:300,height:f+u,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var g=r.range(i.length),v=r.scale[c?"linear":"ordinal"]().domain(g).range(s),m=r.scale[c?"linear":"ordinal"]().domain(g)[c?"range":"rangePoints"]([0,f]),y=function(t,e){var n=3*e;return"line"===t?"M"+[[-e/2,-e/12],[e/2,-e/12],[e/2,e/12],[-e/2,e/12]]+"Z":-1!=r.svg.symbolTypes.indexOf(t)?r.svg.symbol().type(t).size(n)():r.svg.symbol().type("square").size(n)()};if(c){var x=h.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(s);x.enter().append("stop"),x.attr({offset:function(t,e){return e/(s.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),h.append("rect").classed("legend-mark",!0).attr({height:n.height,width:n.colorBandWidth,fill:"url(#grad1)"})}else{var b=h.select(".legend-marks").selectAll("path.legend-mark").data(i);b.enter().append("path").classed("legend-mark",!0),b.attr({transform:function(t,e){return"translate("+[u/2,m(e)+u/2]+")"},d:function(t,e){var n=t.symbol;return y(n,u)},fill:function(t,e){return v(e)}}),b.exit().remove()}var _=r.svg.axis().scale(m).orient("right"),w=h.select("g.legend-axis").attr({transform:"translate("+[c?n.colorBandWidth:u,u/2]+")"}).call(_);return w.selectAll(".domain").style({fill:"none",stroke:"none"}),w.selectAll("line").style({fill:"none",stroke:c?n.textColor:"none"}),w.selectAll("text").style({fill:n.textColor,"font-size":n.fontSize}).text(function(t,e){return i[e].name}),t}var e=i.Legend.defaultConfig(),n=r.dispatch("hover");return t.config=function(t){return arguments.length?(o(e,t),this):e},r.rebind(t,n,"on"),t},i.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},i.tooltipPanel=function(){var t,e,n,a={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},l="tooltip-"+i.tooltipPanel.uid++,s=function(){t=a.container.selectAll("g."+l).data([0]);var r=t.enter().append("g").classed(l,!0).style({"pointer-events":"none",display:"none"});return n=r.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=r.append("text").attr({dx:a.padding+10,dy:.3*+a.fontSize}),s};return s.text=function(o){var i=r.hsl(a.color).l,l=i>=.5?"#aaa":"white",u=i>=.5?"black":"white",c=o||"";e.style({fill:u,"font-size":a.fontSize+"px"}).text(c);var f=a.padding,d=e.node().getBBox(),h={fill:a.color,stroke:l,"stroke-width":"2px"},p=d.width+2*f+10,g=d.height+2*f;return n.attr({d:"M"+[[10,-g/2],[10,-g/4],[a.hasTick?0:10,0],[10,g/4],[10,g/2],[p,g/2],[p,-g/2]].join("L")+"Z"}).style(h),t.attr({transform:"translate("+[10,-g/2+2*f]+")"}),t.style({display:"block"}),s},s.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),s},s.hide=function(){if(t)return t.style({display:"none"}),s},s.show=function(){if(t)return t.style({display:"block"}),s},s.config=function(t){return o(a,t),s},s},i.tooltipPanel.uid=1,i.adapter={},i.adapter.plotly=function(){var t={};return t.convert=function(t,e){var n={};if(t.data&&(n.data=t.data.map(function(t,n){var r=o({},t);return[[r,["marker","color"],["color"]],[r,["marker","opacity"],["opacity"]],[r,["marker","line","color"],["strokeColor"]],[r,["marker","line","dash"],["strokeDash"]],[r,["marker","line","width"],["strokeSize"]],[r,["marker","symbol"],["dotType"]],[r,["marker","size"],["dotSize"]],[r,["marker","barWidth"],["barWidth"]],[r,["line","interpolation"],["lineInterpolation"]],[r,["showlegend"],["visibleInLegend"]]].forEach(function(t,n){i.util.translator.apply(null,t.concat(e))}),e||delete r.marker,e&&delete r.groupId,e?("LinePlot"===r.geometry?(r.type="scatter",!0===r.dotVisible?(delete r.dotVisible,r.mode="lines+markers"):r.mode="lines"):"DotPlot"===r.geometry?(r.type="scatter",r.mode="markers"):"AreaChart"===r.geometry?r.type="area":"BarChart"===r.geometry&&(r.type="bar"),delete r.geometry):("scatter"===r.type?"lines"===r.mode?r.geometry="LinePlot":"markers"===r.mode?r.geometry="DotPlot":"lines+markers"===r.mode&&(r.geometry="LinePlot",r.dotVisible=!0):"area"===r.type?r.geometry="AreaChart":"bar"===r.type&&(r.geometry="BarChart"),delete r.mode,delete r.type),r}),!e&&t.layout&&"stack"===t.layout.barmode)){var a=i.util.duplicates(n.data.map(function(t,e){return t.geometry}));n.data.forEach(function(t,e){var r=a.indexOf(t.geometry);-1!=r&&(n.data[e].groupId=r)})}if(t.layout){var l=o({},t.layout);if([[l,["plot_bgcolor"],["backgroundColor"]],[l,["showlegend"],["showLegend"]],[l,["radialaxis"],["radialAxis"]],[l,["angularaxis"],["angularAxis"]],[l.angularaxis,["showline"],["gridLinesVisible"]],[l.angularaxis,["showticklabels"],["labelsVisible"]],[l.angularaxis,["nticks"],["ticksCount"]],[l.angularaxis,["tickorientation"],["tickOrientation"]],[l.angularaxis,["ticksuffix"],["ticksSuffix"]],[l.angularaxis,["range"],["domain"]],[l.angularaxis,["endpadding"],["endPadding"]],[l.radialaxis,["showline"],["gridLinesVisible"]],[l.radialaxis,["tickorientation"],["tickOrientation"]],[l.radialaxis,["ticksuffix"],["ticksSuffix"]],[l.radialaxis,["range"],["domain"]],[l.angularAxis,["showline"],["gridLinesVisible"]],[l.angularAxis,["showticklabels"],["labelsVisible"]],[l.angularAxis,["nticks"],["ticksCount"]],[l.angularAxis,["tickorientation"],["tickOrientation"]],[l.angularAxis,["ticksuffix"],["ticksSuffix"]],[l.angularAxis,["range"],["domain"]],[l.angularAxis,["endpadding"],["endPadding"]],[l.radialAxis,["showline"],["gridLinesVisible"]],[l.radialAxis,["tickorientation"],["tickOrientation"]],[l.radialAxis,["ticksuffix"],["ticksSuffix"]],[l.radialAxis,["range"],["domain"]],[l.font,["outlinecolor"],["outlineColor"]],[l.legend,["traceorder"],["reverseOrder"]],[l,["labeloffset"],["labelOffset"]],[l,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,n){i.util.translator.apply(null,t.concat(e))}),e?(void 0!==l.tickLength&&(l.angularaxis.ticklen=l.tickLength,delete l.tickLength),l.tickColor&&(l.angularaxis.tickcolor=l.tickColor,delete l.tickColor)):(l.angularAxis&&void 0!==l.angularAxis.ticklen&&(l.tickLength=l.angularAxis.ticklen),l.angularAxis&&void 0!==l.angularAxis.tickcolor&&(l.tickColor=l.angularAxis.tickcolor)),l.legend&&"boolean"!=typeof l.legend.reverseOrder&&(l.legend.reverseOrder="normal"!=l.legend.reverseOrder),l.legend&&"boolean"==typeof l.legend.traceorder&&(l.legend.traceorder=l.legend.traceorder?"reversed":"normal",delete l.legend.reverseOrder),l.margin&&void 0!==l.margin.t){var s=["t","r","b","l","pad"],u=["top","right","bottom","left","pad"],c={};r.entries(l.margin).forEach(function(t,e){c[u[s.indexOf(t.key)]]=t.value}),l.margin=c}e&&(delete l.needsEndSpacing,delete l.minorTickColor,delete l.minorTicks,delete l.angularaxis.ticksCount,delete l.angularaxis.ticksCount,delete l.angularaxis.ticksStep,delete l.angularaxis.rewriteTicks,delete l.angularaxis.nticks,delete l.radialaxis.ticksCount,delete l.radialaxis.ticksCount,delete l.radialaxis.ticksStep,delete l.radialaxis.rewriteTicks,delete l.radialaxis.nticks),n.layout=l}return n},t}},{"../../lib":130,d3:15}],198:[function(t,e,n){"use strict";var r=t("d3"),a=t("../../lib"),o=t("../../components/color"),i=t("./micropolar"),l=t("./undo_manager"),s=a.extendDeepAll,u=e.exports={};u.framework=function(t){function e(e,a){return a&&(f=a),r.select(r.select(f).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),n=n?s(n,e):e,o||(o=i.Axis()),c=i.adapter.plotly().convert(n),o.config(c).render(f),t.data=n.data,t.layout=n.layout,u.fillLayout(t),n}var n,a,o,c,f,d=new l;return e.isPolar=!0,e.svg=function(){return o.svg()},e.getConfig=function(){return n},e.getLiveConfig=function(){return i.adapter.plotly().convert(o.getLiveConfig(),!0)},e.getLiveScales=function(){return{t:o.angularScale(),r:o.radialScale()}},e.setUndoPoint=function(){var t=this,e=i.util.cloneJson(n);!function(e,n){d.add({undo:function(){n&&t(n)},redo:function(){t(e)}})}(e,a),a=i.util.cloneJson(e)},e.undo=function(){d.undo()},e.redo=function(){d.redo()},e},u.fillLayout=function(t){var e=r.select(t).selectAll(".plot-container"),n=e.selectAll(".svg-container"),a=t.framework&&t.framework.svg&&t.framework.svg(),i={width:800,height:600,paper_bgcolor:o.background,_container:e,_paperdiv:n,_paper:a};t._fullLayout=s(i,t.layout)}},{"../../components/color":33,"../../lib":130,"./micropolar":197,"./undo_manager":199,d3:15}],199:[function(t,e,n){"use strict";e.exports=function(){function t(t,e){return t?(a=!0,t[e](),a=!1,this):this}var e,n=[],r=-1,a=!1;return{add:function(t){return a?this:(n.splice(r+1,n.length-r),n.push(t),r=n.length-1,this)},setCallback:function(t){e=t},undo:function(){var a=n[r];return a?(t(a,"undo"),r-=1,e&&e(a.undo),this):this},redo:function(){var a=n[r+1];return a?(t(a,"redo"),r+=1,e&&e(a.redo),this):this},clear:function(){n=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r-1}var o=t("../lib"),i=t("../plots/plots"),l=o.extendFlat,s=o.extendDeep;e.exports=function(t,e){t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var n,o=t.data,u=t.layout,c=s([],o),f=s({},u,r(e.tileClass));if(e.width&&(f.width=e.width),e.height&&(f.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){f.annotations=[];var d=Object.keys(f);for(n=0;n"),color:v.addOpacity(a.tinyColorHue,1),idealAlign:g.event.x"),color:a.tinyColorHue,idealAlign:"left"},{container:n._hoverlayer.node(),outerContainer:n._paper.node()});o(h,.85),i(h,a.tinyColorHue)},M=function(e,r,a){g.select(e).call(c,r,a),t.emit("plotly_unhover",{points:[r.node]}),l&&(p.loneUnhover(n._hoverlayer.node()),l=!1)};h(a,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},{linkEvents:{hover:y,follow:x,unhover:b,select:m},nodeEvents:{hover:w,follow:k,unhover:M,select:_}})}},{"../../components/color":33,"../../plots/cartesian/graph_interact":174,"./render":218,d3:15}],218:[function(t,e,n){"use strict";function r(t){return t.key}function a(t){return[t]}function o(t){return t[0]}function i(t){for(var e=0;e0&&window.requestAnimationFrame(n)})}}).on("drag",function(n){if(M.movable){var r=n.horizontal?A.event.x:A.event.y,a=n.horizontal?A.event.y:A.event.x;M.useForceSnap?(n.node.x=r,n.node.y=a):(M.sideways&&(n.node.x=r),n.node.y=Math.max(n.node.dy/2,Math.min(n.size-n.node.dy/2,a))),l(n.node),n.sankey.relayout(),M.useForceSnap||(y(t.filter(s(n)),e),t.call(p))}}).on("dragend",function(t){t.interactionState.dragInProgress=!1});t.on(".drag",null).call(r)}function w(t,e,n){var r=n.sankey.nodes().filter(function(t){return t.originalX===n.node.originalX});n.forceLayouts[e]=S.forceSimulation(r).alphaDecay(0).force("collide",S.forceCollide().radius(function(t){return t.dy/2+n.nodePad/2}).strength(1).iterations(M.forceIterations)).force("constrain",k(t,e,r,n)).stop()}function k(t,e,n,r){return function(){for(var a=0,o=0;o5?t.node.label:""}).style("fill",function(t){return t.darkBackground&&!t.horizontal?"white":"black"})}},{"../../components/color":33,"../../components/drawing":56,"./constants":214,"@monfera/d3-sankey":6,d3:15,"d3-force":11,tinycolor2:21}],219:[function(t,e,n){"use strict";var r=t("../../lib");e.exports=function(t,e){r.mergeArray(e.text,t,"tx"),r.mergeArray(e.hovertext,t,"htx"),r.mergeArray(e.customdata,t,"data"),r.mergeArray(e.textposition,t,"tp"),e.textfont&&(r.mergeArray(e.textfont.size,t,"ts"),r.mergeArray(e.textfont.color,t,"tc"),r.mergeArray(e.textfont.family,t,"tf"));var n=e.marker;if(n){r.mergeArray(n.size,t,"ms"),r.mergeArray(n.opacity,t,"mo"),r.mergeArray(n.symbol,t,"mx"),r.mergeArray(n.color,t,"mc");var a=n.line;n.line&&(r.mergeArray(a.color,t,"mlc"),r.mergeArray(a.width,t,"mlw"))}}},{"../../lib":130}],220:[function(t,e,n){"use strict";var r=t("../../components/colorscale/color_attributes"),a=t("../../components/errorbars/attributes"),o=t("../../components/colorbar/attributes"),i=t("../../components/drawing"),l=(t("./constants"),t("../../lib/extend").extendFlat);e.exports={x:{valType:"data_array"},x0:{valType:"any",dflt:0},dx:{valType:"number",dflt:1},y:{valType:"data_array"},y0:{valType:"any",dflt:0},customdata:{valType:"data_array"},dy:{valType:"number",dflt:1},ids:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},hoveron:{valType:"flaglist",flags:["points","fills"]},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear"},smoothing:{valType:"number",min:0,max:1.3,dflt:1},dash:{valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid"},simplify:{valType:"boolean",dflt:!0}},connectgaps:{valType:"boolean",dflt:!1},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],dflt:"none"},fillcolor:{valType:"color"},marker:l({},{symbol:{valType:"enumerated",values:i.symbolList,dflt:"circle",arrayOk:!0},opacity:{valType:"number",min:0,max:1,arrayOk:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0},maxdisplayed:{valType:"number",min:0,dflt:0},sizeref:{valType:"number",dflt:1},sizemin:{valType:"number",min:0,dflt:0},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter"},showscale:{valType:"boolean",dflt:!1},colorbar:o,line:l({},{width:{valType:"number",min:0,arrayOk:!0}},r("marker.line"))},r("marker")),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0},textfont:{family:{valType:"string",noBlank:!0,strict:!0,arrayOk:!0},size:{valType:"number",min:1,arrayOk:!0},color:{valType:"color",arrayOk:!0}},r:{valType:"data_array"},t:{valType:"data_array"},error_y:a,error_x:a}},{"../../components/colorbar/attributes":34,"../../components/colorscale/color_attributes":40,"../../components/drawing":56,"../../components/errorbars/attributes":58,"../../lib/extend":126,"./constants":225}],221:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../../plots/cartesian/axes"),o=t("./subtypes"),i=t("./colorscale_calc"),l=t("./arrays_to_calcdata");e.exports=function(t,e){var n,s,u,c=a.getFromId(t,e.xaxis||"x"),f=a.getFromId(t,e.yaxis||"y"),d=c.makeCalcdata(e,"x"),h=f.makeCalcdata(e,"y"),p=Math.min(d.length,h.length);c._minDtick=0,f._minDtick=0,d.length>p&&d.splice(p,d.length-p),h.length>p&&h.splice(p,h.length-p);var g={padded:!0},v={padded:!0};if(o.hasMarkers(e)){if(n=e.marker,s=n.size,Array.isArray(s)){var m={type:"linear"};a.setConvert(m),s=m.makeCalcdata(e.marker,"size"),s.length>p&&s.splice(p,s.length-p)}var y,x=1.6*(e.marker.sizeref||1);y="area"===e.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/x),3)}:function(t){return Math.max((t||0)/x,3)},g.ppad=v.ppad=Array.isArray(s)?s.map(y):y(s)}i(e),!("tozerox"===e.fill||"tonextx"===e.fill&&t.firstscatter)||d[0]===d[p-1]&&h[0]===h[p-1]?e.error_y.visible||-1===["tonexty","tozeroy"].indexOf(e.fill)&&(o.hasMarkers(e)||o.hasText(e))||(g.padded=!1,g.ppad=0):g.tozero=!0,!("tozeroy"===e.fill||"tonexty"===e.fill&&t.firstscatter)||d[0]===d[p-1]&&h[0]===h[p-1]?-1!==["tonextx","tozerox"].indexOf(e.fill)&&(v.padded=!1):v.tozero=!0,a.expand(c,d,g),a.expand(f,h,v);var b=new Array(p);for(u=0;u=0;a--){var o=t[a];if("scatter"===o.type&&o.xaxis===n.xaxis&&o.yaxis===n.yaxis){o.opacity=void 0;break}}}}}},{}],223:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../../lib"),o=t("../../plots/plots"),i=t("../../components/colorscale"),l=t("../../components/colorbar/draw");e.exports=function(t,e){var n=e[0].trace,s=n.marker,u="cb"+n.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===s||!s.showscale)return void o.autoMargin(t,u);var c=s.color,f=s.cmin,d=s.cmax;r(f)||(f=a.aggNums(Math.min,null,c)),r(d)||(d=a.aggNums(Math.max,null,c));var h=e[0].t.cb=l(t,u),p=i.makeColorScaleFunc(i.extractScale(s.colorscale,f,d),{noNumericCheck:!0});h.fillcolor(p).filllevels({start:f,end:d,size:(d-f)/254}).options(s.colorbar)()}},{"../../components/colorbar/draw":36,"../../components/colorscale":47,"../../lib":130,"../../plots/plots":193,"fast-isnumeric":18}],224:[function(t,e,n){"use strict";var r=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/calc"),o=t("./subtypes");e.exports=function(t){o.hasLines(t)&&r(t,"line")&&a(t,t.line.color,"line","c"),o.hasMarkers(t)&&(r(t,"marker")&&a(t,t.marker.color,"marker","c"),r(t,"marker.line")&&a(t,t.marker.line.color,"marker.line","c"))}},{"../../components/colorscale/calc":39,"../../components/colorscale/has_colorscale":46,"./subtypes":240}],225:[function(t,e,n){"use strict";e.exports={PTS_LINESONLY:20}},{}],226:[function(t,e,n){"use strict";var r=t("../../lib"),a=t("./attributes"),o=t("./constants"),i=t("./subtypes"),l=t("./xy_defaults"),s=t("./marker_defaults"),u=t("./line_defaults"),c=t("./line_shape_defaults"),f=t("./text_defaults"),d=t("./fillcolor_defaults"),h=t("../../components/errorbars/defaults");e.exports=function(t,e,n,p){function g(n,o){return r.coerce(t,e,a,n,o)}var v=l(t,e,p,g),m=vB!=D>=B&&(S=C[T-1][0],O=C[T][0],z=S+(O-S)*(B-N)/(D-N),I=Math.min(I,z),j=Math.max(j,z));I=Math.max(I,0),j=Math.min(j,d._length);var H=s.defaultLine;return s.opacity(f.fillcolor)?H=f.fillcolor:s.opacity((f.line||{}).color)&&(H=f.line.color),r.extendFlat(t,{distance:o.MAXDIST+10,x0:I,x1:j,y0:B,y1:B,color:H}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{"../../components/color":33,"../../components/errorbars":62,"../../lib":130,"../../plots/cartesian/constants":170,"../../plots/cartesian/graph_interact":174,"./get_trace_color":228}],230:[function(t,e,n){"use strict";var r={},a=t("./subtypes");r.hasLines=a.hasLines,r.hasMarkers=a.hasMarkers,r.hasText=a.hasText,r.isBubble=a.isBubble,r.attributes=t("./attributes"),r.supplyDefaults=t("./defaults"),r.cleanData=t("./clean_data"),r.calc=t("./calc"),r.arraysToCalcdata=t("./arrays_to_calcdata"),r.plot=t("./plot"),r.colorbar=t("./colorbar"),r.style=t("./style"),r.hoverPoints=t("./hover"),r.selectPoints=t("./select"),r.animatable=!0,r.moduleType="trace",r.name="scatter",r.basePlotModule=t("../../plots/cartesian"),r.categories=["cartesian","symbols","markerColorscale","errorBarsOK","showLegend"],r.meta={},e.exports=r},{"../../plots/cartesian":175,"./arrays_to_calcdata":219,"./attributes":220,"./calc":221,"./clean_data":222,"./colorbar":223,"./defaults":226,"./hover":229,"./plot":237,"./select":238,"./style":239,"./subtypes":240}],231:[function(t,e,n){"use strict";var r=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults");e.exports=function(t,e,n,o,i){var l=(t.marker||{}).color;if(i("line.color",n),r(t,"line"))a(t,e,o,i,{prefix:"line.",cLetter:"c"});else{i("line.color",!Array.isArray(l)&&l||n)}i("line.width"),i("line.dash")}},{"../../components/colorscale/defaults":42,"../../components/colorscale/has_colorscale":46}],232:[function(t,e,n){"use strict";var r=t("../../constants/numerical").BADNUM;e.exports=function(t,e){function n(e){var n=_.c2p(t[e].x),a=w.c2p(t[e].y);return n!==r&&a!==r&&[n,a]} -function a(t){var e=t[0]/_._length,n=t[1]/w._length;return(1+10*Math.max(0,-e,e-1,-n,n-1))*A}var o,i,l,s,u,c,f,d,h,p,g,v,m,y,x,b,_=e.xaxis,w=e.yaxis,k=e.simplify,M=e.connectGaps,A=e.baseTolerance,T=e.linear,L=[],C=.2,z=new Array(t.length),S=0;for(k||(A=C=-1),o=0;oa(c))break;l=c,m=p[0]*h[0]+p[1]*h[1],m>g?(g=m,s=c,d=!1):m=t.length||!c)break;z[S++]=c,i=c}}else z[S++]=s}L.push(z.slice(0,S))}return L}},{"../../constants/numerical":117}],233:[function(t,e,n){"use strict";e.exports=function(t,e,n){"spline"===n("line.shape")&&n("line.smoothing")}},{}],234:[function(t,e,n){"use strict";e.exports=function(t,e,n){for(var r,a,o=null,i=0;i0?Math.max(e,a):0}}},{"fast-isnumeric":18}],236:[function(t,e,n){"use strict";var r=t("../../components/color"),a=t("../../components/colorscale/has_colorscale"),o=t("../../components/colorscale/defaults"),i=t("./subtypes");e.exports=function(t,e,n,l,s){var u,c=i.isBubble(t),f=(t.line||{}).color;f&&(n=f),s("marker.symbol"),s("marker.opacity",c?.7:1),s("marker.size"),s("marker.color",n),a(t,"marker")&&o(t,e,l,s,{prefix:"marker.",cLetter:"c"}),u=f&&!Array.isArray(f)&&e.marker.color!==f?f:c?r.background:r.defaultLine,s("marker.line.color",u),a(t,"marker.line")&&o(t,e,l,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",c?1:0),c&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode"))}},{"../../components/color":33,"../../components/colorscale/defaults":42,"../../components/colorscale/has_colorscale":46,"./subtypes":240}],237:[function(t,e,n){"use strict";function r(t,e){var n;e.selectAll("g.trace").each(function(t){var e=i.select(this);if(n=t[0].trace,n._nexttrace){if(n._nextFill=e.select(".js-fill.js-tonext"),!n._nextFill.size()){var r=":first-child";e.select(".js-fill.js-tozero").size()&&(r+=" + *"),n._nextFill=e.insert("path",r).attr("class","js-fill js-tonext")}}else e.selectAll(".js-fill.js-tonext").remove(),n._nextFill=null;n.fill&&("tozero"===n.fill.substr(0,6)||"toself"===n.fill||"to"===n.fill.substr(0,2)&&!n._prevtrace)?(n._ownFill=e.select(".js-fill.js-tozero"),n._ownFill.size()||(n._ownFill=e.insert("path",":first-child").attr("class","js-fill js-tozero"))):(e.selectAll(".js-fill.js-tozero").remove(),n._ownFill=null)})}function a(t,e,n,r,a,d,p){function g(t){return k?t.transition():t}function v(t){return t.filter(function(t){return t.vis})}function m(t){return t.id}function y(t){if(t.ids)return m}function x(){return!1}function b(t){var e,n,r=t[0].trace,a=i.select(this),o=c.hasMarkers(r),u=c.hasText(r),f=y(r),d=x,h=x;o&&(d=r.marker.maxdisplayed?v:l.identity),u&&(h=r.marker.maxdisplayed?v:l.identity),n=a.selectAll("path.point"),e=n.data(d,f);var p=e.enter().append("path").classed("point",!0);p.call(s.pointStyle,r).call(s.translatePoints,M,A,r),k&&p.style("opacity",0).transition().style("opacity",1),e.each(function(t){var e=i.select(this),n=g(e);s.translatePoint(t,n,M,A),s.singlePointStyle(t,n,r),r.customdata&&e.classed("plotly-customdata",null!==t.data&&void 0!==t.data)}),k?e.exit().transition().style("opacity",0).remove():e.exit().remove(),n=a.selectAll("g"),e=n.data(h,f),e.enter().append("g").append("text"),e.each(function(t){var e=g(i.select(this).select("text"));s.translatePoint(t,e,M,A)}),e.selectAll("text").call(s.textPointStyle,r).each(function(t){var e=t.xp||M.c2p(t.x),n=t.yp||A.c2p(t.y);i.select(this).selectAll("tspan").each(function(){g(i.select(this)).attr({x:e,y:n})})}),e.exit().remove()}var _,w;o(t,e,n,r,a);var k=!!p&&p.duration>0,M=n.xaxis,A=n.yaxis,T=r[0].trace,L=T.line,C=i.select(d);if(C.call(u.plot,n,p),!0===T.visible){g(C).style("opacity",T.opacity);var z,S,O=T.fill.charAt(T.fill.length-1);"x"!==O&&"y"!==O&&(O=""),r[0].node3=C;var N="",D=[],P=T._prevtrace;P&&(N=P._prevRevpath||"",S=P._nextFill,D=P._polygons);var E,R,I,j,F,q,B,H,V,X="",U="",Y=[],G=[],Z=l.noop;if(z=T._ownFill,c.hasLines(T)||"none"!==T.fill){for(S&&S.datum(r),-1!==["hv","vh","hvh","vhv"].indexOf(L.shape)?(I=s.steps(L.shape),j=s.steps(L.shape.split("").reverse().join(""))):I=j="spline"===L.shape?function(t){var e=t[t.length-1];return t[0][0]===e[0]&&t[0][1]===e[1]?s.smoothclosed(t.slice(1),L.smoothing):s.smoothopen(t,L.smoothing)}:function(t){return"M"+t.join("L")},F=function(t){return j(t.reverse())},Y=f(r,{xaxis:M,yaxis:A,connectGaps:T.connectgaps,baseTolerance:Math.max(L.width||1,3)/4,linear:"linear"===L.shape,simplify:L.simplify}),V=T._polygons=new Array(Y.length),w=0;w1}),Z=function(t){return function(e){if(E=I(e),R=F(e),X?O?(X+="L"+E.substr(1),U=R+"L"+U.substr(1)):(X+="Z"+E,U=R+"Z"+U):(X=E,U=R),c.hasLines(T)&&e.length>1){var n=i.select(this);if(n.datum(r),t)g(n.style("opacity",0).attr("d",E).call(s.lineGroupStyle)).style("opacity",1);else{var a=g(n);a.attr("d",E),s.singleLineStyle(r,a)}}}}}var W=C.selectAll(".js-line").data(G);g(W.exit()).style("opacity",0).remove(),W.each(Z(!1)),W.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(s.lineGroupStyle).each(Z(!0)),Y.length&&(z?q&&H&&(O?("y"===O?q[1]=H[1]=A.c2p(0,!0):"x"===O&&(q[0]=H[0]=M.c2p(0,!0)),g(z).attr("d","M"+H+"L"+q+"L"+X.substr(1))):g(z).attr("d",X+"Z")):"tonext"===T.fill.substr(0,6)&&X&&N&&("tonext"===T.fill?g(S).attr("d",X+"Z"+N+"Z"):g(S).attr("d",X+"L"+N.substr(1)+"Z"),T._polygons=T._polygons.concat(D)),T._prevRevpath=U,T._prevPolygons=V);var $=C.selectAll(".points");_=$.data([r]),$.each(b),_.enter().append("g").classed("points",!0).each(b),_.exit().remove()}}function o(t,e,n,r,a){var o=n.xaxis,s=n.yaxis,u=i.extent(l.simpleMap(o.range,o.r2c)),f=i.extent(l.simpleMap(s.range,s.r2c)),d=r[0].trace;if(c.hasMarkers(d)){var h=d.marker.maxdisplayed;if(0!==h){var p=r.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=f[0]&&t.y<=f[1]}),g=Math.ceil(p.length/h),v=0;a.forEach(function(t,n){var r=t[0].trace;c.hasMarkers(r)&&r.marker.maxdisplayed>0&&n0;for(c=p.selectAll("g.trace"),f=c.data(n,function(t){return t[0].trace.uid}),f.enter().append("g").attr("class",function(t){return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),d(t,e,n),r(t,p),s=0,u={};su[e[0].trace.uid]?1:-1}),v){l&&(h=l());i.transition().duration(o.duration).ease(o.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).each(function(){p.selectAll("g.trace").each(function(r,i){a(t,i,e,r,n,this,o)})})}else p.selectAll("g.trace").each(function(r,i){a(t,i,e,r,n,this,o)});g&&f.exit().remove(),p.selectAll("path:not([d])").remove()}},{"../../components/drawing":56,"../../components/errorbars":62,"../../lib":130,"../../lib/polygon":140,"./line_points":232,"./link_traces":234,"./subtypes":240,d3:15}],238:[function(t,e,n){"use strict";var r=t("./subtypes");e.exports=function(t,e){var n,a,o,i,l=t.cd,s=t.xaxis,u=t.yaxis,c=[],f=l[0].trace,d=f.index,h=f.marker,p=!r.hasMarkers(f)&&!r.hasText(f);if(!0===f.visible&&!p){var g=Array.isArray(h.opacity)?1:h.opacity;if(!1===e)for(n=0;n 0) { - window.requestAnimationFrame(faster); - } - }) + startForce(sankeyNode, sankeyLink, d, forceKey); } }) .on('drag', function(d) { - if(!c.movable) return; + if(d.arrangement === 'fixed') return; var x = d.horizontal ? d3.event.x : d3.event.y; var y = d.horizontal ? d3.event.y : d3.event.x; - if(c.useForceSnap) { + if(d.arrangement === 'snap') { d.node.x = x; d.node.y = y; } else { - if(c.sideways) { + if(d.arrangement === 'freeform') { d.node.x = x; } d.node.y = Math.max(d.node.dy / 2, Math.min(d.size - d.node.dy / 2, y)); } saveCurrentDragPosition(d.node); - d.sankey.relayout(); - if(!c.useForceSnap) { + if(d.arrangement !== 'snap') { + d.sankey.relayout(); updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink); sankeyNode.call(crispLinesOnEnd); } }) - .on('dragend', function(d) {d.interactionState.dragInProgress = false;}); - + .on('dragend', function(d) { + if(d.arrangement !== 'snap') { + repositionedCallback(d, [d.node]); + } + d.interactionState.dragInProgress = false; + }); sankeyNode .on('.drag', null) // remove possible previous handlers .call(dragBehavior); } -function attachForce(sankeyNode, forceKey, d) { +function attachForce(sankeyNode, forceKey, repositionedCallback, d) { var nodes = d.sankey.nodes().filter(function(n) {return n.originalX === d.node.originalX;}); d.forceLayouts[forceKey] = d3Force.forceSimulation(nodes) .alphaDecay(0) .force('collide', d3Force.forceCollide() - .radius(function (n) {return n.dy / 2 + d.nodePad / 2;}) + .radius(function(n) {return n.dy / 2 + d.nodePad / 2;}) .strength(1) .iterations(c.forceIterations)) - .force('constrain', snappingForce(sankeyNode, forceKey, nodes, d)) + .force('constrain', snappingForce(sankeyNode, forceKey, nodes, repositionedCallback, d)) .stop(); } -function snappingForce(sankeyNode, forceKey, nodes, d) { +function startForce(sankeyNode, sankeyLink, d, forceKey) { + window.requestAnimationFrame(function faster() { + for(var i = 0; i < c.forceTicksPerFrame; i++) { + d.forceLayouts[forceKey].tick(); + } + d.sankey.relayout(); + updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink); + if(d.forceLayouts[forceKey].alpha() > 0) { + window.requestAnimationFrame(faster); + } + }); +} + +function snappingForce(sankeyNode, forceKey, nodes, repositionedCallback, d) { return function _snappingForce() { var maxVelocity = 0; - for (var i = 0; i < nodes.length; i++) { + for(var i = 0; i < nodes.length; i++) { var n = nodes[i]; - if (n === d.interactionState.dragInProgress) { // constrain node position to the dragging pointer + if(n === d.interactionState.dragInProgress) { // constrain node position to the dragging pointer n.x = n.lastDraggedX; n.y = n.lastDraggedY; } else { @@ -328,22 +364,20 @@ function snappingForce(sankeyNode, forceKey, nodes, d) { } maxVelocity = Math.max(maxVelocity, Math.abs(n.vx), Math.abs(n.vy)); } - if (!d.interactionState.dragInProgress && maxVelocity < 0.1) { + if(!d.interactionState.dragInProgress && maxVelocity < 0.1 && d.forceLayouts[forceKey].alpha() > 0) { d.forceLayouts[forceKey].alpha(0); - window.setTimeout(function () { + window.setTimeout(function() { sankeyNode.call(crispLinesOnEnd); + repositionedCallback(d, nodes); }, 30); // geome on move, crisp when static } - } + }; } - // scene graph module.exports = function(svg, styledData, layout, callbacks) { - svg.style('overflow', 'visible'); - var sankey = svg.selectAll('.sankey') .data(styledData .filter(function(d) {return unwrap(d).trace.visible;}) @@ -356,11 +390,9 @@ module.exports = function(svg, styledData, layout, callbacks) { sankey.enter() .append('g') .classed('sankey', true) - .attr('overflow', 'visible') .style('box-sizing', 'content-box') .style('position', 'absolute') .style('left', 0) - .style('overflow', 'visible') .style('shape-rendering', 'geometricPrecision') .style('pointer-events', 'auto') .style('box-sizing', 'content-box'); @@ -368,7 +400,6 @@ module.exports = function(svg, styledData, layout, callbacks) { sankey .attr('transform', function(d) {return 'translate(' + d.translateX + ',' + d.translateY + ')';}); - var sankeyLinks = sankey.selectAll('.sankeyLinks') .data(repeat, keyFun); @@ -379,39 +410,37 @@ module.exports = function(svg, styledData, layout, callbacks) { sankeyLinks.transition() .ease(c.ease).duration(c.duration) - .style('transform', function(d) {return d.horizontal ? 'matrix(1,0,0,1,0,0)' : 'matrix(0,1,1,0,0,0)'}); - + .style('transform', function(d) {return d.horizontal ? 'matrix(1,0,0,1,0,0)' : 'matrix(0,1,1,0,0,0)';}); var sankeyLink = sankeyLinks.selectAll('.sankeyLink') .data(function(d) { + var uniqueKeys = {}; return d.sankey.links() .filter(function(l) {return l.visible && l.value;}) - .map(linkModel.bind(null, d)); + .map(linkModel.bind(null, uniqueKeys, d)); }, keyFun); sankeyLink.enter() .append('path') .classed('sankeyLink', true) - .style('stroke-width', function(d) {return Math.max(1, d.link.dy);}) - .style('opacity', 0) .call(attachPointerEvents, sankey, callbacks.linkEvents); sankeyLink - .style('stroke', function(d) {return d.tinyColorHue;}) - .style('stroke-opacity', function(d) {return d.tinyColorAlpha;}); + .style('stroke', function(d) {return d.link.dy > 1 ? 'rgba(0,0,0,0)' : d.tinyColorHue;}) + .style('stroke-width', function(d) {return d.link.dy > 1 ? 2 : 1;}) + .style('stroke-opacity', function(d) {return d.tinyColorAlpha;}) + .style('fill', function(d) {return d.tinyColorHue;}) + .style('fill-opacity', function(d) {return d.tinyColorAlpha;}); sankeyLink.transition() .ease(c.ease).duration(c.duration) - .style('opacity', 1) - .attr('d', linkPath) - .style('stroke-width', function(d) {return Math.max(1, d.link.dy);}); + .attr('d', linkPath); sankeyLink.exit().transition() .ease(c.ease).duration(c.duration) .style('opacity', 0) .remove(); - var sankeyNodeSet = sankey.selectAll('.sankeyNodeSet') .data(repeat, keyFun); @@ -421,8 +450,13 @@ module.exports = function(svg, styledData, layout, callbacks) { .classed('sankeyNodeSet', true); sankeyNodeSet - .each(function(d) {Drawing.font(sankeyNodeSet, d.textFont);}); // fixme causes scerenshot trouble - + .style('cursor', function(d) { + switch(d.arrangement) { + case 'fixed': return 'default'; + case 'perpendicular': return 'ns-resize'; + default: return 'move'; + } + }); var sankeyNode = sankeyNodeSet.selectAll('.sankeyNode') .data(function(d) { @@ -437,8 +471,6 @@ module.exports = function(svg, styledData, layout, callbacks) { sankeyNode.enter() .append('g') .classed('sankeyNode', true) - .style('opacity', 0) - .style('cursor', 'move') .call(updateNodePositions) .call(attachPointerEvents, sankey, callbacks.nodeEvents); @@ -447,7 +479,6 @@ module.exports = function(svg, styledData, layout, callbacks) { sankeyNode.transition() .ease(c.ease).duration(c.duration) - .style('opacity', 1) .call(updateNodePositions); sankeyNode.exit().transition() @@ -455,7 +486,6 @@ module.exports = function(svg, styledData, layout, callbacks) { .style('opacity', 0) .remove(); - var nodeRect = sankeyNode.selectAll('.nodeRect') .data(repeat); @@ -474,7 +504,6 @@ module.exports = function(svg, styledData, layout, callbacks) { .ease(c.ease).duration(c.duration) .call(sizeNode); - var nodeCapture = sankeyNode.selectAll('.nodeCapture') .data(repeat); @@ -489,25 +518,23 @@ module.exports = function(svg, styledData, layout, callbacks) { .attr('width', function(d) {return d.zoneWidth;}) .attr('height', function(d) {return d.zoneHeight;}); - var nodeLabelGuide = sankeyNode.selectAll('.nodeLabelGuide') .data(repeat); nodeLabelGuide.enter() .append('path') .classed('nodeLabelGuide', true) - .attr('id', function(d) {return d.uniqueNodeLabelPathId;}); // fixme causes scerenshot trouble + .attr('id', function(d) {return d.uniqueNodeLabelPathId;}); nodeLabelGuide .transition() .ease(c.ease).duration(c.duration) .attr('d', function(d) { return d3.svg.line()([ - [d.horizontal ? d.visibleWidth + c.nodeTextOffsetHorizontal : c.nodeTextOffsetHorizontal, d.labelY], - [d.horizontal ? d.sizeAcross : d.visibleWidth - c.nodeTextOffsetHorizontal, d.labelY] + [d.horizontal ? (d.left ? -d.sizeAcross : d.visibleWidth + c.nodeTextOffsetHorizontal) : c.nodeTextOffsetHorizontal, d.labelY], + [d.horizontal ? (d.left ? - c.nodeTextOffsetHorizontal : d.sizeAcross) : d.visibleWidth - c.nodeTextOffsetHorizontal, d.labelY] ]);}); - var nodeLabel = sankeyNode.selectAll('.nodeLabel') .data(repeat); @@ -520,8 +547,9 @@ module.exports = function(svg, styledData, layout, callbacks) { nodeLabel .style('text-shadow', function(d) { - return d.horizontal ? '0 1px 1px #fff' : 'none'; - }); + return d.horizontal ? '-1px 1px 1px #fff, 1px 1px 1px #fff, 1px -1px 1px #fff, -1px -1px 1px #fff' : 'none'; + }) + .each(function(d) {Drawing.font(nodeLabel, d.textFont);}); var nodeLabelTextPath = nodeLabel.selectAll('.nodeLabelTextPath') .data(repeat); @@ -534,5 +562,7 @@ module.exports = function(svg, styledData, layout, callbacks) { nodeLabelTextPath .text(function(d) {return d.horizontal || d.node.dy > 5 ? d.node.label : '';}) + .attr('startOffset', function(d) {return d.horizontal && d.left ? '100%' : '0%';}) + .style('text-anchor', function(d) {return d.horizontal && d.left ? 'end' : 'start';}) .style('fill', function(d) {return d.darkBackground && !d.horizontal ? 'white' : 'black';}); }; diff --git a/tasks/util/constants.js b/tasks/util/constants.js index 1f579c3d298..9c8b1aaf828 100644 --- a/tasks/util/constants.js +++ b/tasks/util/constants.js @@ -13,7 +13,7 @@ var pathToTopojsonSrc = path.join( ); var partialBundleNames = [ - 'sankey' + 'basic', 'cartesian', 'geo', 'gl3d', 'gl2d', 'mapbox', 'finance' ]; var partialBundlePaths = partialBundleNames.map(function(name) { diff --git a/test/image/baselines/energy.png b/test/image/baselines/energy.png new file mode 100644 index 0000000000000000000000000000000000000000..7b23bc7a03508fe61f9cf16ab7304adccb3dfd62 GIT binary patch literal 166152 zcmeFZXH-*J8#b&6(o{kVNGEg!0*LfZ=mOF~Aanug9i&MQy;x8IQNV%%QbP;X&_qN8 zq=R&%2c)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>59kDK>BNClqc;vN6vka$osaP02i6oqxs+x6mRYl$(<0q*0}WRl`r^n6aS zpG=77!R~|HnijV`ziZivd{WrE#Z>oQxbgwJoWSoyV>mSDK+5Z6sg!f5%cJ-1wbIB!>)rp~iy zwt#q*WcnE9h7x~apok?xXD7UtCDUkOZsrg%6J}6YVQ<@OYT$Z7KXfeQgnRV?{hoT z5Y5c3S^<)K1X2Xt0wfRpG<<%kMLc9fuM$Tw|{-Q4=rY(0Tu$~V-KhO5@SI(**dWU~q+NzPC?tD8w{==aN!?SZa zCe4|pmhj<{iTU)P1tyHE(mbBoZkXzpa~R>~+<*lY)-Qn#3HPb&;?kVTGdM(dY&hW> zq?I5MGwnf&_d)L1niWFoG7p_}n7BnR%M&G!jBV< z+|0j?-uXN=s^L$FVANX^^wBTiGq8fc&b#jRjJNCcD>9q&%YD~QI_T}Y_ikQJwZMvN zu`6xYY=6B1-j)GZsUI8}o5jC#vEG^iY->nYJIBa^I>+E1GKg3p2^`=*d!RTFMHDQb z;0=^|CyxjZ7|X#ED4}}r)*7VZ1}c~E;gKEKT2x|+O2UUAp*3f#_|ARqouzb`D#Ab!`F P0SG)@{an^LB{Ts5+Yd_y literal 0 HcmV?d00001 diff --git a/test/image/baselines/energy_dark.png b/test/image/baselines/energy_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..2d8853ea637191b9c45111472b653c4c24477c5c GIT binary patch literal 179495 zcmeEubyQT{_qPH{iL`)p4Itg!IWRO*%FqJRNDSTGA>EA%(j5v&BML}|q%;g2BJUl2 ze7-*4-}A2ZuJ!)=`-jEcxpVJ1d+)R3vp?sAtEtFiVLZgRb?X)uSV2bP)-4q1ty{<_ zXm^1tA*V}UZ{4E01(uQ2f&J-jDOt{hr<HwhB3$Nbx6IyDedL<*Nb@00)1$4|-R!W{4YDYxGm^XI}< zYfVCbGp+dh%Ae2v5NY~vm(l-MRewwAe^vGOV)=7bsi7k&D=RM*CaPf2%0;1hp6y{Z zEc$o~zz&S)Uuo2Hm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: Robert Monfera Date: Mon, 1 May 2017 18:09:20 +0200 Subject: [PATCH 12/26] working around image gen sensitivity --- src/traces/sankey/render.js | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/traces/sankey/render.js b/src/traces/sankey/render.js index 8e3b5e3fb5c..0424b81f2b6 100644 --- a/src/traces/sankey/render.js +++ b/src/traces/sankey/render.js @@ -247,6 +247,16 @@ function sizeNode(rect) { .attr('height', function(d) {return d.visibleHeight;}); } +function linksTransform(d) { + return d.horizontal ? 'matrix(1,0,0,1,0,0)' : 'matrix(0,1,1,0,0,0)'; +} + +function textGuidePath(d) { + return d3.svg.line()([ + [d.horizontal ? (d.left ? -d.sizeAcross : d.visibleWidth + c.nodeTextOffsetHorizontal) : c.nodeTextOffsetHorizontal, d.labelY], + [d.horizontal ? (d.left ? - c.nodeTextOffsetHorizontal : d.sizeAcross) : d.visibleWidth - c.nodeTextOffsetHorizontal, d.labelY] + ]);} + // event handling function attachPointerEvents(selection, sankey, eventSet) { @@ -417,11 +427,12 @@ module.exports = function(svg, styledData, layout, callbacks) { sankeyLinks.enter() .append('g') .classed('sankeyLinks', true) - .style('fill', 'none'); + .style('fill', 'none') + .style('transform', linksTransform); sankeyLinks.transition() .ease(c.ease).duration(c.duration) - .style('transform', function(d) {return d.horizontal ? 'matrix(1,0,0,1,0,0)' : 'matrix(0,1,1,0,0,0)';}); + .style('transform', linksTransform); var sankeyLink = sankeyLinks.selectAll('.sankeyLink') .data(function(d) { @@ -441,16 +452,10 @@ module.exports = function(svg, styledData, layout, callbacks) { .style('stroke-width', function(d) {return d.link.dy > 1 ? 2 : 1;}) .style('stroke-opacity', function(d) {return d.tinyColorAlpha;}) .style('fill', function(d) {return d.tinyColorHue;}) - .style('fill-opacity', function(d) {return d.tinyColorAlpha;}); - - sankeyLink.transition() - .ease(c.ease).duration(c.duration) + .style('fill-opacity', function(d) {return d.tinyColorAlpha;}) .attr('d', linkPath); - sankeyLink.exit().transition() - .ease(c.ease).duration(c.duration) - .style('opacity', 0) - .remove(); + sankeyLink.exit().remove(); var sankeyNodeSet = sankey.selectAll('.sankeyNodeSet') .data(repeat, keyFun); @@ -535,16 +540,13 @@ module.exports = function(svg, styledData, layout, callbacks) { nodeLabelGuide.enter() .append('path') .classed('nodeLabelGuide', true) - .attr('id', function(d) {return d.uniqueNodeLabelPathId;}); + .attr('id', function(d) {return d.uniqueNodeLabelPathId;}) + .attr('d', textGuidePath); nodeLabelGuide .transition() .ease(c.ease).duration(c.duration) - .attr('d', function(d) { - return d3.svg.line()([ - [d.horizontal ? (d.left ? -d.sizeAcross : d.visibleWidth + c.nodeTextOffsetHorizontal) : c.nodeTextOffsetHorizontal, d.labelY], - [d.horizontal ? (d.left ? - c.nodeTextOffsetHorizontal : d.sizeAcross) : d.visibleWidth - c.nodeTextOffsetHorizontal, d.labelY] - ]);}); + .attr('d', textGuidePath); var nodeLabel = sankeyNode.selectAll('.nodeLabel') .data(repeat); From 747eb23733c1387a254f19f03858c7b2745ff435 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Mon, 1 May 2017 18:42:17 +0200 Subject: [PATCH 13/26] Alex's suggestion for checking self-links too --- src/traces/sankey/defaults.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/traces/sankey/defaults.js b/src/traces/sankey/defaults.js index be67e806d78..a1fe66c087e 100644 --- a/src/traces/sankey/defaults.js +++ b/src/traces/sankey/defaults.js @@ -20,6 +20,9 @@ function circularityPresent(nodeList, sources, targets) { var nodes = nodeList.map(function() {return [];}); for(var i = 0; i < Math.min(sources.length, targets.length); i++) { + if(sources[i] === targets[i]) { + return true; // self-link which is also a scc of one + } nodes[sources[i]].push(targets[i]); } From 1cbc2f2c3c61047b1e640745cca7bbf901b94931 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Mon, 1 May 2017 19:37:53 +0200 Subject: [PATCH 14/26] attribute work: - putting nodepad, nodewidth under node - adding line color and thickness --- src/traces/sankey/attributes.js | 54 ++++++++++++++++++++++--------- src/traces/sankey/defaults.js | 6 ++-- src/traces/sankey/plot.js | 4 --- src/traces/sankey/render.js | 26 +++++++++++---- test/image/mocks/energy.json | 16 +++++---- test/image/mocks/energy_dark.json | 16 +++++---- 6 files changed, 82 insertions(+), 40 deletions(-) diff --git a/src/traces/sankey/attributes.js b/src/traces/sankey/attributes.js index 2f35b0445e8..4c4c0a5f24f 100644 --- a/src/traces/sankey/attributes.js +++ b/src/traces/sankey/attributes.js @@ -11,6 +11,7 @@ var shapeAttrs = require('../../components/shapes/attributes'); var fontAttrs = require('../../plots/font_attributes'); var plotAttrs = require('../../plots/attributes'); +var colorAttrs = require('../../components/color/attributes'); var extendFlat = require('../../lib/extend').extendFlat; @@ -55,22 +56,6 @@ module.exports = { description: 'Sets the orientation of the Sankey diagram.' }, - nodepad: { - valType: 'number', - min: 0, - dflt: 20, - role: 'style', - description: 'Sets the padding (in px) between the `nodes`.' - }, - - nodethickness: { - valType: 'number', - min: 1, - dflt: 20, - role: 'style', - description: 'Sets the thickness (in px) of the `nodes`.' - }, - valueformat: { valType: 'string', dflt: '.3s', @@ -119,6 +104,43 @@ module.exports = { arrayOk: true, dflt: 'rgb(0,255,0,0.5)' }), + line: { + color: { + valType: 'color', + role: 'style', + dflt: colorAttrs.defaultLine, + arrayOk: true, + description: [ + 'Sets the color of the line enclosing each sector.' + ].join(' ') + }, + width: { + valType: 'number', + role: 'style', + min: 0, + dflt: 0.5, + arrayOk: true, + description: [ + 'Sets the width (in px) of the line enclosing each sector.' + ].join(' ') + } + }, + pad: { + valType: 'number', + arrayOk: false, + min: 0, + dflt: 20, + role: 'style', + description: 'Sets the padding (in px) between the `nodes`.' + }, + thickness: { + valType: 'number', + arrayOk: false, + min: 1, + dflt: 20, + role: 'style', + description: 'Sets the thickness (in px) of the `nodes`.' + }, description: 'The nodes of the Sankey plot.' }, diff --git a/src/traces/sankey/defaults.js b/src/traces/sankey/defaults.js index a1fe66c087e..8652623d27e 100644 --- a/src/traces/sankey/defaults.js +++ b/src/traces/sankey/defaults.js @@ -42,6 +42,10 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('node.label'); + coerce('node.pad'); + coerce('node.thickness'); + coerce('node.line.color'); + coerce('node.line.width'); var defaultNodePalette = function(i) {return colors[i % colors.length];}; @@ -65,8 +69,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('domain.x'); coerce('domain.y'); coerce('orientation'); - coerce('nodepad'); - coerce('nodethickness'); coerce('valueformat'); coerce('valuesuffix'); coerce('arrangement'); diff --git a/src/traces/sankey/plot.js b/src/traces/sankey/plot.js index 0ab31f86936..62adfd3607d 100644 --- a/src/traces/sankey/plot.js +++ b/src/traces/sankey/plot.js @@ -48,8 +48,6 @@ function relatedNodes(l) { function nodeHoveredStyle(sankeyNode, d, sankey) { - sankeyNode.select('.nodeRect').style('stroke-width', 1); - if(d && sankey) { ownTrace(sankey, d) .selectAll('.sankeyLink') @@ -60,8 +58,6 @@ function nodeHoveredStyle(sankeyNode, d, sankey) { function nodeNonHoveredStyle(sankeyNode, d, sankey) { - sankeyNode.select('.nodeRect').style('stroke-width', 0.5); - if(d && sankey) { ownTrace(sankey, d) .selectAll('.sankeyLink') diff --git a/src/traces/sankey/render.js b/src/traces/sankey/render.js index 0424b81f2b6..e13384f4b07 100644 --- a/src/traces/sankey/render.js +++ b/src/traces/sankey/render.js @@ -72,8 +72,10 @@ function sankeyModel(layout, d, i) { linkSpec = trace.link, arrangement = trace.arrangement, horizontal = trace.orientation === 'h', - nodePad = trace.nodepad, - nodeThickness = trace.nodethickness, + nodePad = trace.node.pad, + nodeThickness = trace.node.thickness, + nodelineColor = trace.node.line.color, + nodelineWidth = trace.node.line.width, valueFormat = trace.valueformat, valueSuffix = trace.valuesuffix, textFont = trace.textfont; @@ -124,6 +126,8 @@ function sankeyModel(layout, d, i) { width: width, height: height, nodePad: nodePad, + nodelineColor: nodelineColor, + nodelineWidth: nodelineWidth, valueFormat: valueFormat, valueSuffix: valueSuffix, textFont: textFont, @@ -184,6 +188,8 @@ function nodeModel(uniqueKeys, d, n) { traceId: d.key, node: n, nodePad: d.nodePad, + nodelineColor: d.nodelineColor, + nodelineWidth: d.nodelineWidth, textFont: d.textFont, size: d.horizontal ? d.height : d.width, visibleWidth: Math.ceil(d.horizontal ? visibleThickness : visibleLength), @@ -445,6 +451,7 @@ module.exports = function(svg, styledData, layout, callbacks) { sankeyLink.enter() .append('path') .classed('sankeyLink', true) + .attr('d', linkPath) .call(attachPointerEvents, sankey, callbacks.linkEvents); sankeyLink @@ -452,10 +459,16 @@ module.exports = function(svg, styledData, layout, callbacks) { .style('stroke-width', function(d) {return d.link.dy > 1 ? 2 : 1;}) .style('stroke-opacity', function(d) {return d.tinyColorAlpha;}) .style('fill', function(d) {return d.tinyColorHue;}) - .style('fill-opacity', function(d) {return d.tinyColorAlpha;}) + .style('fill-opacity', function(d) {return d.tinyColorAlpha;}); + + sankeyLink.transition() + .ease(c.ease).duration(c.duration) .attr('d', linkPath); - sankeyLink.exit().remove(); + sankeyLink.exit().transition() + .ease(c.ease).duration(c.duration) + .style('opacity', 0) + .remove(); var sankeyNodeSet = sankey.selectAll('.sankeyNodeSet') .data(repeat, keyFun); @@ -508,11 +521,12 @@ module.exports = function(svg, styledData, layout, callbacks) { nodeRect.enter() .append('rect') .classed('nodeRect', true) - .style('stroke-width', 0.5) - .call(Color.stroke, 'rgba(0, 0, 0, 1)') .call(sizeNode); nodeRect + .style('stroke-width', function(d) {return d.nodelineWidth;}) + .style('stroke', function(d) {return Color.tinyRGB(tinycolor(d.nodelineColor));}) + .style('stroke-opacity', function(d) {return Color.opacity(d.nodelineColor);}) .style('fill', function(d) {return d.tinyColorHue;}) .style('fill-opacity', function(d) {return d.tinyColorAlpha;}); diff --git a/test/image/mocks/energy.json b/test/image/mocks/energy.json index 439130d40cf..b70e8eb450e 100644 --- a/test/image/mocks/energy.json +++ b/test/image/mocks/energy.json @@ -13,11 +13,15 @@ ] }, "orientation": "h", - "nodepad": 15, - "nodethickness": 15, "valueformat": ".0f", "valuesuffix": "TWh", "node": { + "pad": 15, + "thickness": 15, + "line": { + "color": "black", + "width": 0.5 + }, "label": [ "Agricultural 'waste'", "Bio-conversion", @@ -505,12 +509,12 @@ { "label": "Thick", "method": "restyle", - "args": [ "nodethickness", 15 ] + "args": [ "node.thickness", 15 ] }, { "label": "Thin", "method": "restyle", - "args": [ "nodethickness", 8] + "args": [ "node.thickness", 8] } ] }, @@ -520,12 +524,12 @@ { "label": "Small gap", "method": "restyle", - "args": [ "nodepad", 15 ] + "args": [ "node.pad", 15 ] }, { "label": "Large gap", "method": "restyle", - "args": [ "nodepad", 20] + "args": [ "node.pad", 20] } ] }, diff --git a/test/image/mocks/energy_dark.json b/test/image/mocks/energy_dark.json index f85b41f633a..1952da02079 100644 --- a/test/image/mocks/energy_dark.json +++ b/test/image/mocks/energy_dark.json @@ -13,11 +13,15 @@ ] }, "orientation": "v", - "nodepad": 15, - "nodethickness": 15, "valueformat": ".0f", "valuesuffix": "TWh", "node": { + "pad": 15, + "thickness": 15, + "line": { + "color": "black", + "width": 0.5 + }, "label": [ "Agricultural 'waste'", "Bio-conversion", @@ -435,12 +439,12 @@ { "label": "Thick", "method": "restyle", - "args": [ "nodethickness", 15 ] + "args": [ "node.thickness", 15 ] }, { "label": "Thin", "method": "restyle", - "args": [ "nodethickness", 8] + "args": [ "node.thickness", 8] } ] }, @@ -450,12 +454,12 @@ { "label": "Small gap", "method": "restyle", - "args": [ "nodepad", 15 ] + "args": [ "node.pad", 15 ] }, { "label": "Large gap", "method": "restyle", - "args": [ "nodepad", 20] + "args": [ "node.pad", 20] } ] }, From e69e3a2839729abb899dd3594fafc28c97aa1c4f Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Mon, 1 May 2017 22:13:03 +0200 Subject: [PATCH 15/26] attribute work: - link line styling - more consistent node line var names --- src/traces/sankey/attributes.js | 40 +++++++++++++++++++++++++++++---- src/traces/sankey/defaults.js | 2 ++ src/traces/sankey/render.js | 38 +++++++++++++++++++++---------- 3 files changed, 64 insertions(+), 16 deletions(-) diff --git a/src/traces/sankey/attributes.js b/src/traces/sankey/attributes.js index 4c4c0a5f24f..006dcd2548d 100644 --- a/src/traces/sankey/attributes.js +++ b/src/traces/sankey/attributes.js @@ -102,7 +102,12 @@ module.exports = { }, color: extendFlat({}, shapeAttrs.fillcolor, { arrayOk: true, - dflt: 'rgb(0,255,0,0.5)' + description: [ + 'Sets the `node` color. It can be a single value, or an array for specifying color for each `node`.', + 'If `node.color` is omitted, then the default `Plotly` color palette will be cycled through', + 'to have a variety of colors. These defaults are not fully opaque, to allow some visibility of', + 'what is beneath the node.' + ].join(' ') }), line: { color: { @@ -111,7 +116,7 @@ module.exports = { dflt: colorAttrs.defaultLine, arrayOk: true, description: [ - 'Sets the color of the line enclosing each sector.' + 'Sets the color of the `line` around each `node`.' ].join(' ') }, width: { @@ -121,7 +126,7 @@ module.exports = { dflt: 0.5, arrayOk: true, description: [ - 'Sets the width (in px) of the line enclosing each sector.' + 'Sets the width (in px) of the `line` around each `node`.' ].join(' ') } }, @@ -151,7 +156,34 @@ module.exports = { role: 'info', description: 'The shown name of the link.' }, - color: extendFlat({}, shapeAttrs.fillcolor, {arrayOk: true, dflt: 'rgba(0,0,0,0.2)'}), + color: extendFlat({}, shapeAttrs.fillcolor, { + arrayOk: true, + description: [ + 'Sets the `link` color. It can be a single value, or an array for specifying color for each `link`.', + 'If `link.color` is omitted, then by default, a translucent grey link will be used.' + ].join(' ') + }), + line: { + color: { + valType: 'color', + role: 'style', + dflt: colorAttrs.defaultLine, + arrayOk: true, + description: [ + 'Sets the color of the `line` around each `link`.' + ].join(' ') + }, + width: { + valType: 'number', + role: 'style', + min: 0, + dflt: 0, + arrayOk: true, + description: [ + 'Sets the width (in px) of the `line` around each `link`.' + ].join(' ') + } + }, source: { valType: 'data_array', role: 'info', diff --git a/src/traces/sankey/defaults.js b/src/traces/sankey/defaults.js index 8652623d27e..477e8982927 100644 --- a/src/traces/sankey/defaults.js +++ b/src/traces/sankey/defaults.js @@ -57,6 +57,8 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('link.source'); coerce('link.target'); coerce('link.value'); + coerce('link.line.color'); + coerce('link.line.width'); coerce('link.color', traceIn.link.value.map(function() { return tinycolor(layout.paper_bgcolor).getLuminance() < 0.333 ? diff --git a/src/traces/sankey/render.js b/src/traces/sankey/render.js index e13384f4b07..709d84dc3ed 100644 --- a/src/traces/sankey/render.js +++ b/src/traces/sankey/render.js @@ -74,8 +74,10 @@ function sankeyModel(layout, d, i) { horizontal = trace.orientation === 'h', nodePad = trace.node.pad, nodeThickness = trace.node.thickness, - nodelineColor = trace.node.line.color, - nodelineWidth = trace.node.line.width, + nodeLineColor = trace.node.line.color, + nodeLineWidth = trace.node.line.width, + linkLineColor = trace.link.line.color, + linkLineWidth = trace.link.line.width, valueFormat = trace.valueformat, valueSuffix = trace.valuesuffix, textFont = trace.textfont; @@ -126,8 +128,10 @@ function sankeyModel(layout, d, i) { width: width, height: height, nodePad: nodePad, - nodelineColor: nodelineColor, - nodelineWidth: nodelineWidth, + nodeLineColor: nodeLineColor, + nodeLineWidth: nodeLineWidth, + linkLineColor: linkLineColor, + linkLineWidth: linkLineWidth, valueFormat: valueFormat, valueSuffix: valueSuffix, textFont: textFont, @@ -161,6 +165,8 @@ function linkModel(uniqueKeys, d, l) { link: l, tinyColorHue: Color.tinyRGB(tc), tinyColorAlpha: tc.getAlpha(), + linkLineColor: d.linkLineColor, + linkLineWidth: d.linkLineWidth, valueFormat: d.valueFormat, valueSuffix: d.valueSuffix, sankey: d.sankey, @@ -188,8 +194,8 @@ function nodeModel(uniqueKeys, d, n) { traceId: d.key, node: n, nodePad: d.nodePad, - nodelineColor: d.nodelineColor, - nodelineWidth: d.nodelineWidth, + nodeLineColor: d.nodeLineColor, + nodeLineWidth: d.nodeLineWidth, textFont: d.textFont, size: d.horizontal ? d.height : d.width, visibleWidth: Math.ceil(d.horizontal ? visibleThickness : visibleLength), @@ -253,6 +259,10 @@ function sizeNode(rect) { .attr('height', function(d) {return d.visibleHeight;}); } +function salientEnough(d) { + return d.link.dy > 1 || d.linkLineWidth > 0; +} + function linksTransform(d) { return d.horizontal ? 'matrix(1,0,0,1,0,0)' : 'matrix(0,1,1,0,0,0)'; } @@ -455,9 +465,13 @@ module.exports = function(svg, styledData, layout, callbacks) { .call(attachPointerEvents, sankey, callbacks.linkEvents); sankeyLink - .style('stroke', function(d) {return d.link.dy > 1 ? 'rgba(0,0,0,0)' : d.tinyColorHue;}) - .style('stroke-width', function(d) {return d.link.dy > 1 ? 2 : 1;}) - .style('stroke-opacity', function(d) {return d.tinyColorAlpha;}) + .style('stroke', function(d) { + return salientEnough(d) ? Color.tinyRGB(tinycolor(d.linkLineColor)) : d.tinyColorHue; + }) + .style('stroke-opacity', function(d) { + return salientEnough(d) ? Color.opacity(d.linkLineColor) : d.tinyColorAlpha; + }) + .style('stroke-width', function(d) {return salientEnough(d) ? d.linkLineWidth : 1;}) .style('fill', function(d) {return d.tinyColorHue;}) .style('fill-opacity', function(d) {return d.tinyColorAlpha;}); @@ -524,9 +538,9 @@ module.exports = function(svg, styledData, layout, callbacks) { .call(sizeNode); nodeRect - .style('stroke-width', function(d) {return d.nodelineWidth;}) - .style('stroke', function(d) {return Color.tinyRGB(tinycolor(d.nodelineColor));}) - .style('stroke-opacity', function(d) {return Color.opacity(d.nodelineColor);}) + .style('stroke-width', function(d) {return d.nodeLineWidth;}) + .style('stroke', function(d) {return Color.tinyRGB(tinycolor(d.nodeLineColor));}) + .style('stroke-opacity', function(d) {return Color.opacity(d.nodeLineColor);}) .style('fill', function(d) {return d.tinyColorHue;}) .style('fill-opacity', function(d) {return d.tinyColorAlpha;}); From 90c003ae15028e23fce305696bef3d57d6483bdf Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Tue, 2 May 2017 13:03:21 +0200 Subject: [PATCH 16/26] having published our d3-sankey fork under the @plotly scope --- package.json | 2 +- src/traces/sankey/render.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 334b709c48a..bf06599bb11 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "3d-view": "^2.0.0", - "@monfera/d3-sankey": "^0.5.0", + "@plotly/d3-sankey": "^0.5.0", "alpha-shape": "^1.0.0", "arraytools": "^1.0.0", "color-rgba": "^1.0.4", diff --git a/src/traces/sankey/render.js b/src/traces/sankey/render.js index 709d84dc3ed..c12713cfe92 100644 --- a/src/traces/sankey/render.js +++ b/src/traces/sankey/render.js @@ -13,7 +13,7 @@ var d3 = require('d3'); var tinycolor = require('tinycolor2'); var Color = require('../../components/color'); var Drawing = require('../../components/drawing'); -var d3sankey = require('@monfera/d3-sankey').sankey; +var d3sankey = require('@plotly/d3-sankey').sankey; var d3Force = require('d3-force'); var Lib = require('../../lib'); From 3d107141d4be1903b2e3e54c1d35127375b56b64 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Tue, 2 May 2017 13:54:18 +0200 Subject: [PATCH 17/26] using traceOut in defaults for downstream default generation --- src/traces/sankey/defaults.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/traces/sankey/defaults.js b/src/traces/sankey/defaults.js index 477e8982927..4b3526c7861 100644 --- a/src/traces/sankey/defaults.js +++ b/src/traces/sankey/defaults.js @@ -41,7 +41,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); } - coerce('node.label'); + coerce('node.label', []); coerce('node.pad'); coerce('node.thickness'); coerce('node.line.color'); @@ -49,18 +49,18 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout var defaultNodePalette = function(i) {return colors[i % colors.length];}; - coerce('node.color', traceIn.node.label.map(function(d, i) { + coerce('node.color', traceOut.node.label.map(function(d, i) { return Color.addOpacity(defaultNodePalette(i), 0.8); })); coerce('link.label'); - coerce('link.source'); - coerce('link.target'); - coerce('link.value'); + coerce('link.source', []); + coerce('link.target', []); + coerce('link.value', []); coerce('link.line.color'); coerce('link.line.width'); - coerce('link.color', traceIn.link.value.map(function() { + coerce('link.color', traceOut.link.value.map(function() { return tinycolor(layout.paper_bgcolor).getLuminance() < 0.333 ? 'rgba(255, 255, 255, 0.6)' : 'rgba(0, 0, 0, 0.2)'; @@ -78,10 +78,11 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout Lib.coerceFont(coerce, 'textfont', Lib.extendFlat({}, layout.font)); var missing = function(n, i) { - return traceIn.link.source.indexOf(i) === -1 && - traceIn.link.target.indexOf(i) === -1; + return traceOut.link.source.indexOf(i) === -1 && + traceOut.link.target.indexOf(i) === -1; }; - if(traceIn.node.label.some(missing)) { + + if(traceOut.node.label.some(missing)) { Lib.log('Some of the nodes are neither sources nor targets, please remove them.'); } From a2a416e300cdb7bc4bc2fcdb62bfa50ca1f0dae2 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Tue, 2 May 2017 16:42:16 +0200 Subject: [PATCH 18/26] jasmine tests for Sankey --- test/jasmine/tests/sankey_test.js | 178 ++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 test/jasmine/tests/sankey_test.js diff --git a/test/jasmine/tests/sankey_test.js b/test/jasmine/tests/sankey_test.js new file mode 100644 index 00000000000..83d3be094ba --- /dev/null +++ b/test/jasmine/tests/sankey_test.js @@ -0,0 +1,178 @@ +var Lib = require('@src/lib'); +var Sankey = require('@src/traces/sankey'); +var attributes = require('@src/traces/sankey/attributes'); + +describe('sankey initialization tests', function() { + + 'use strict'; + + function _supply(traceIn) { + var traceOut = { visible: true }, + defaultColor = '#444', + layout = { }; + + Sankey.supplyDefaults(traceIn, traceOut, defaultColor, layout); + + return traceOut; + } + + function _supplyWithLayout(traceIn, layout) { + var traceOut = { visible: true }, + defaultColor = '#444'; + + Sankey.supplyDefaults(traceIn, traceOut, defaultColor, layout); + + return traceOut; + } + + describe('don\'t remove nodes if encountering no circularity', function() { + + it('removing a single self-pointing node', function() { + var fullTrace = _supply({ + node: { + label: ['a', 'b'] + }, + link: { + value: [1], + source: [1], + target: [0] + } + }); + + expect(fullTrace.node.label).toEqual(['a', 'b'], 'node labels retained'); + expect(fullTrace.link.value).toEqual([1], 'link value(s) retained'); + expect(fullTrace.link.source).toEqual([1], 'link source(s) retained'); + expect(fullTrace.link.target).toEqual([0], 'link target(s) retained'); + }); + }); + + describe('remove nodes if encountering circularity', function() { + + it('removing a single self-pointing node', function() { + var fullTrace = _supply({ + node: { + label: ['a'] + }, + link: { + value: [1], + source: [0], + target: [0] + } + }); + + expect(fullTrace.node.label).toEqual([], 'node label(s) removed'); + expect(fullTrace.link.value).toEqual([], 'link value(s) removed'); + expect(fullTrace.link.source).toEqual([], 'link source(s) removed'); + expect(fullTrace.link.target).toEqual([], 'link target(s) removed'); + + }); + + it('removing everything if detecting a circle', function() { + var fullTrace = _supply({ + node: { + label: ['a', 'b', 'c', 'd', 'e'] + }, + link: { + value: [1, 1, 1, 1, 1, 1, 1, 1], + source: [0, 1, 2, 3], + target: [1, 2, 0, 4] + } + }); + + expect(fullTrace.node.label).toEqual([], 'node label(s) removed'); + expect(fullTrace.link.value).toEqual([], 'link value(s) removed'); + expect(fullTrace.link.source).toEqual([], 'link source(s) removed'); + expect(fullTrace.link.target).toEqual([], 'link target(s) removed'); + + }); + + }); + + describe('sankey defaults', function() { + + it('\'Sankey\' specification should have proper arrays where mandatory', + function() { + + var fullTrace = _supply({}); + + expect(fullTrace.node.label) + .toEqual([], 'presence of node label array is guaranteed'); + + expect(fullTrace.link.value) + .toEqual([], 'presence of link value array is guaranteed'); + + expect(fullTrace.link.source) + .toEqual([], 'presence of link source array is guaranteed'); + + expect(fullTrace.link.target) + .toEqual([], 'presence of link target array is guaranteed'); + + }); + + it('\'Sankey\' specification should have proper types', + function() { + + var fullTrace = _supply({}); + + expect(fullTrace.orientation) + .toEqual(attributes.orientation.dflt, 'use orientation by default'); + + expect(fullTrace.valueformat) + .toEqual(attributes.valueformat.dflt, 'valueformat by default'); + + expect(fullTrace.valuesuffix) + .toEqual(attributes.valuesuffix.dflt, 'valuesuffix by default'); + + expect(fullTrace.arrangement) + .toEqual(attributes.arrangement.dflt, 'arrangement by default'); + + expect(fullTrace.domain.x) + .toEqual(attributes.domain.x.dflt, 'x domain by default'); + + expect(fullTrace.domain.y) + .toEqual(attributes.domain.y.dflt, 'y domain by default'); + }); + + it('\'Sankey\' layout dependent specification should have proper types', + function() { + + var fullTrace = _supplyWithLayout({}, {font: {family: 'Arial'}}); + expect(fullTrace.textfont) + .toEqual({family: 'Arial'}, 'textfont is defined'); + }); + + it('\'line\' specifications should yield the default values', + function() { + + var fullTrace = _supply({}); + + expect(fullTrace.node.line.color) + .toEqual('#444', 'default node line color'); + expect(fullTrace.node.line.width) + .toEqual(0.5, 'default node line thickness'); + + expect(fullTrace.link.line.color) + .toEqual('#444', 'default link line color'); + expect(fullTrace.link.line.width) + .toEqual(0, 'default link line thickness'); + }); + + it('fills \'node\' colors if not specified', function() { + + var fullTrace = _supply({ + node: { + label: ['a', 'b'] + }, + link: { + source: [0], + target: [1], + value: [1] + } + }); + + expect(Lib.isArray(fullTrace.node.color)).toBe(true, 'set up color array'); + + }); + + }); +}); From 3e2a455dbc89587216accbdc955a58311deb2139 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Tue, 2 May 2017 18:10:03 +0200 Subject: [PATCH 19/26] jasmine tests for Sankey - warning / error test (and defaults.js improv) --- src/traces/sankey/defaults.js | 4 +-- test/jasmine/tests/sankey_test.js | 50 ++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/src/traces/sankey/defaults.js b/src/traces/sankey/defaults.js index 4b3526c7861..b5b8261fb83 100644 --- a/src/traces/sankey/defaults.js +++ b/src/traces/sankey/defaults.js @@ -83,11 +83,11 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout }; if(traceOut.node.label.some(missing)) { - Lib.log('Some of the nodes are neither sources nor targets, please remove them.'); + Lib.warn('Some of the nodes are neither sources nor targets, please remove them.'); } if(circularityPresent(traceOut.node.label, traceOut.link.source, traceOut.link.target)) { - Lib.log('Circularity is present in the Sankey data. Removing all nodes and links.'); + Lib.error('Circularity is present in the Sankey data. Removing all nodes and links.'); traceOut.link.label = []; traceOut.link.source = []; traceOut.link.target = []; diff --git a/test/jasmine/tests/sankey_test.js b/test/jasmine/tests/sankey_test.js index 83d3be094ba..0bbdb96f299 100644 --- a/test/jasmine/tests/sankey_test.js +++ b/test/jasmine/tests/sankey_test.js @@ -2,7 +2,7 @@ var Lib = require('@src/lib'); var Sankey = require('@src/traces/sankey'); var attributes = require('@src/traces/sankey/attributes'); -describe('sankey initialization tests', function() { +describe('sankey tests', function() { 'use strict'; @@ -88,6 +88,54 @@ describe('sankey initialization tests', function() { }); + describe('log warning if issue is encountered with graph structure', + function() { + + it('some nodes are not linked', function() { + + var warnings = []; + spyOn(Lib, 'warn').and.callFake(function(msg) { + warnings.push(msg); + }); + + _supply({ + node: { + label: ['a', 'b', 'c'] + }, + link: { + value: [1], + source: [0], + target: [1] + } + }); + + expect(warnings.length).toEqual(1); + }); + + it('circularity is detected', function() { + + var errors = []; + spyOn(Lib, 'error').and.callFake(function(msg) { + errors.push(msg); + }); + + _supply({ + node: { + label: ['a', 'b', 'c'] + }, + link: { + value: [1, 1, 1], + source: [0, 1, 2], + target: [1, 2, 0] + } + }); + + expect(errors.length).toEqual(1); + }); + + + }); + describe('sankey defaults', function() { it('\'Sankey\' specification should have proper arrays where mandatory', From b91aa250b00992fd906ec0c4acfeb5feb0ebfcc9 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Tue, 2 May 2017 20:23:41 +0200 Subject: [PATCH 20/26] default empty arrays in attributes.js --- src/traces/sankey/attributes.js | 8 +++++--- src/traces/sankey/defaults.js | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/traces/sankey/attributes.js b/src/traces/sankey/attributes.js index 006dcd2548d..ccd49ccba70 100644 --- a/src/traces/sankey/attributes.js +++ b/src/traces/sankey/attributes.js @@ -96,7 +96,7 @@ module.exports = { node: { label: { valType: 'data_array', - dflt: '', + dflt: [], role: 'info', description: 'The shown name of the node.' }, @@ -152,7 +152,7 @@ module.exports = { link: { label: { valType: 'data_array', - dflt: '', + dflt: [], role: 'info', description: 'The shown name of the link.' }, @@ -187,16 +187,18 @@ module.exports = { source: { valType: 'data_array', role: 'info', + dflt: [], description: 'An integer number `[0..nodes.length - 1]` that represents the source node.' }, target: { valType: 'data_array', role: 'info', + dflt: [], description: 'An integer number `[0..nodes.length - 1]` that represents the target node.' }, value: { valType: 'data_array', - dflt: 1, + dflt: [], role: 'info', description: 'A numeric value representing the flow volume value.' }, diff --git a/src/traces/sankey/defaults.js b/src/traces/sankey/defaults.js index b5b8261fb83..7478c28984c 100644 --- a/src/traces/sankey/defaults.js +++ b/src/traces/sankey/defaults.js @@ -41,7 +41,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); } - coerce('node.label', []); + coerce('node.label'); coerce('node.pad'); coerce('node.thickness'); coerce('node.line.color'); @@ -54,9 +54,9 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout })); coerce('link.label'); - coerce('link.source', []); - coerce('link.target', []); - coerce('link.value', []); + coerce('link.source'); + coerce('link.target'); + coerce('link.value'); coerce('link.line.color'); coerce('link.line.width'); From 223421e4ae19cee634e9a9bb804e1d19882515ee Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Tue, 2 May 2017 20:28:38 +0200 Subject: [PATCH 21/26] warning message update (PR feedback, thanks Alex!) --- src/traces/sankey/defaults.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/traces/sankey/defaults.js b/src/traces/sankey/defaults.js index 7478c28984c..557eb019d2f 100644 --- a/src/traces/sankey/defaults.js +++ b/src/traces/sankey/defaults.js @@ -83,7 +83,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout }; if(traceOut.node.label.some(missing)) { - Lib.warn('Some of the nodes are neither sources nor targets, please remove them.'); + Lib.warn('Some of the nodes are neither sources nor targets, they will not be displayed.'); } if(circularityPresent(traceOut.node.label, traceOut.link.source, traceOut.link.target)) { From 4c3521ae90f9a14f45c868d4c552b9b7518d6bda Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Wed, 3 May 2017 00:06:10 +0200 Subject: [PATCH 22/26] removed unused colorbar --- src/traces/sankey/colorbar.js | 50 ----------------------------------- src/traces/sankey/index.js | 1 - 2 files changed, 51 deletions(-) delete mode 100644 src/traces/sankey/colorbar.js diff --git a/src/traces/sankey/colorbar.js b/src/traces/sankey/colorbar.js deleted file mode 100644 index 169872ba87b..00000000000 --- a/src/traces/sankey/colorbar.js +++ /dev/null @@ -1,50 +0,0 @@ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var isNumeric = require('fast-isnumeric'); - -var Lib = require('../../lib'); -var Plots = require('../../plots/plots'); -var Colorscale = require('../../components/colorscale'); -var drawColorbar = require('../../components/colorbar/draw'); - -module.exports = function colorbar(gd, cd) { - var trace = cd[0].trace, - line = trace.line, - cbId = 'cb' + trace.uid; - - gd._fullLayout._infolayer.selectAll('.' + cbId).remove(); - - if((line === undefined) || !line.showscale) { - Plots.autoMargin(gd, cbId); - return; - } - - var vals = line.color, - cmin = line.cmin, - cmax = line.cmax; - - if(!isNumeric(cmin)) cmin = Lib.aggNums(Math.min, null, vals); - if(!isNumeric(cmax)) cmax = Lib.aggNums(Math.max, null, vals); - - var cb = cd[0].t.cb = drawColorbar(gd, cbId); - var sclFunc = Colorscale.makeColorScaleFunc( - Colorscale.extractScale( - line.colorscale, - cmin, - cmax - ), - { noNumericCheck: true } - ); - - cb.fillcolor(sclFunc) - .filllevels({start: cmin, end: cmax, size: (cmax - cmin) / 254}) - .options(line.colorbar)(); -}; diff --git a/src/traces/sankey/index.js b/src/traces/sankey/index.js index 29ff631b6a5..24e62cb5c3b 100644 --- a/src/traces/sankey/index.js +++ b/src/traces/sankey/index.js @@ -14,7 +14,6 @@ Plot.attributes = require('./attributes'); Plot.supplyDefaults = require('./defaults'); Plot.calc = require('./calc'); Plot.plot = require('./plot'); -Plot.colorbar = require('./colorbar'); Plot.moduleType = 'trace'; Plot.name = 'sankey'; From af1c43b5f028dedbf17ad8c4fb709c1363c87f9e Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Tue, 9 May 2017 08:43:03 +0200 Subject: [PATCH 23/26] PR feedback: noOpacity; no need to add toSVG; no empty line after function line if it's the only empty line in the function body --- src/traces/sankey/base_plot.js | 2 -- src/traces/sankey/index.js | 2 +- src/traces/sankey/plot.js | 3 --- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/traces/sankey/base_plot.js b/src/traces/sankey/base_plot.js index d429e501b7b..479ead95f0d 100644 --- a/src/traces/sankey/base_plot.js +++ b/src/traces/sankey/base_plot.js @@ -28,5 +28,3 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) oldFullLayout._paperdiv.selectAll('.sankey').remove(); } }; - -exports.toSVG = function() {}; diff --git a/src/traces/sankey/index.js b/src/traces/sankey/index.js index 24e62cb5c3b..4ca291bf70c 100644 --- a/src/traces/sankey/index.js +++ b/src/traces/sankey/index.js @@ -18,7 +18,7 @@ Plot.plot = require('./plot'); Plot.moduleType = 'trace'; Plot.name = 'sankey'; Plot.basePlotModule = require('./base_plot'); -Plot.categories = []; +Plot.categories = ['noOpacity']; Plot.meta = { description: [ 'Sankey plots for network flow data analysis.', diff --git a/src/traces/sankey/plot.js b/src/traces/sankey/plot.js index 62adfd3607d..1810603a8ab 100644 --- a/src/traces/sankey/plot.js +++ b/src/traces/sankey/plot.js @@ -47,7 +47,6 @@ function relatedNodes(l) { } function nodeHoveredStyle(sankeyNode, d, sankey) { - if(d && sankey) { ownTrace(sankey, d) .selectAll('.sankeyLink') @@ -57,7 +56,6 @@ function nodeHoveredStyle(sankeyNode, d, sankey) { } function nodeNonHoveredStyle(sankeyNode, d, sankey) { - if(d && sankey) { ownTrace(sankey, d) .selectAll('.sankeyLink') @@ -175,7 +173,6 @@ module.exports = function plot(gd, calcData) { var nodeHoverFollow = function(element, d) { var nodeRect = d3.select(element).select('.nodeRect'); - var boundingBox = nodeRect.node().getBoundingClientRect(); var hoverCenterX0 = boundingBox.left - 2; var hoverCenterX1 = boundingBox.right + 2; From 9214c92870fbd660d284b7341b2e8c5544561122 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Tue, 9 May 2017 11:30:04 +0200 Subject: [PATCH 24/26] PR feedback: moved circularity check into calc.js --- src/traces/sankey/calc.js | 42 ++++++++- src/traces/sankey/defaults.js | 32 ------- test/jasmine/tests/sankey_test.js | 149 +++++++++++++++++------------- 3 files changed, 127 insertions(+), 96 deletions(-) diff --git a/src/traces/sankey/calc.js b/src/traces/sankey/calc.js index f28e3060eed..4d877c5ad7e 100644 --- a/src/traces/sankey/calc.js +++ b/src/traces/sankey/calc.js @@ -8,6 +8,44 @@ 'use strict'; -module.exports = function calc() { - return [{}]; +var tarjan = require('strongly-connected-components'); +var Lib = require('../../lib'); + +function circularityPresent(nodeList, sources, targets) { + + var nodes = nodeList.map(function() {return [];}); + + for(var i = 0; i < Math.min(sources.length, targets.length); i++) { + if(sources[i] === targets[i]) { + return true; // self-link which is also a scc of one + } + nodes[sources[i]].push(targets[i]); + } + + var scc = tarjan(nodes); + + // Tarján's strongly connected components algorithm coded by Mikola Lysenko + // returns at least one non-singular component if there's circularity in the graph + return scc.components.some(function(c) { + return c.length > 1; + }); +} + +module.exports = function calc(gd, trace) { + + if(circularityPresent(trace.node.label, trace.link.source, trace.link.target)) { + Lib.error('Circularity is present in the Sankey data. Removing all nodes and links.'); + trace.link.label = []; + trace.link.source = []; + trace.link.target = []; + trace.link.value = []; + trace.link.color = []; + trace.node.label = []; + trace.node.color = []; + } + + return [{ + link: trace.link, + node: trace.node + }]; }; diff --git a/src/traces/sankey/defaults.js b/src/traces/sankey/defaults.js index 557eb019d2f..adfcf5db1ae 100644 --- a/src/traces/sankey/defaults.js +++ b/src/traces/sankey/defaults.js @@ -13,27 +13,6 @@ var attributes = require('./attributes'); var colors = require('../../components/color/attributes').defaults; var Color = require('../../components/color'); var tinycolor = require('tinycolor2'); -var tarjan = require('strongly-connected-components'); - -function circularityPresent(nodeList, sources, targets) { - - var nodes = nodeList.map(function() {return [];}); - - for(var i = 0; i < Math.min(sources.length, targets.length); i++) { - if(sources[i] === targets[i]) { - return true; // self-link which is also a scc of one - } - nodes[sources[i]].push(targets[i]); - } - - var scc = tarjan(nodes); - - // Tarján's strongly connected components algorithm coded by Mikola Lysenko - // returns at least one non-singular component if there's circularity in the graph - return scc.components.some(function(c) { - return c.length > 1; - }); -} module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { @@ -85,15 +64,4 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout if(traceOut.node.label.some(missing)) { Lib.warn('Some of the nodes are neither sources nor targets, they will not be displayed.'); } - - if(circularityPresent(traceOut.node.label, traceOut.link.source, traceOut.link.target)) { - Lib.error('Circularity is present in the Sankey data. Removing all nodes and links.'); - traceOut.link.label = []; - traceOut.link.source = []; - traceOut.link.target = []; - traceOut.link.value = []; - traceOut.link.color = []; - traceOut.node.label = []; - traceOut.node.color = []; - } }; diff --git a/test/jasmine/tests/sankey_test.js b/test/jasmine/tests/sankey_test.js index 0bbdb96f299..5fffb88bdf8 100644 --- a/test/jasmine/tests/sankey_test.js +++ b/test/jasmine/tests/sankey_test.js @@ -1,6 +1,8 @@ +var attributes = require('@src/traces/sankey/attributes'); var Lib = require('@src/lib'); +var mock = require('@mocks/energy.json'); +var Plots = require('@src/plots/plots'); var Sankey = require('@src/traces/sankey'); -var attributes = require('@src/traces/sankey/attributes'); describe('sankey tests', function() { @@ -46,48 +48,6 @@ describe('sankey tests', function() { }); }); - describe('remove nodes if encountering circularity', function() { - - it('removing a single self-pointing node', function() { - var fullTrace = _supply({ - node: { - label: ['a'] - }, - link: { - value: [1], - source: [0], - target: [0] - } - }); - - expect(fullTrace.node.label).toEqual([], 'node label(s) removed'); - expect(fullTrace.link.value).toEqual([], 'link value(s) removed'); - expect(fullTrace.link.source).toEqual([], 'link source(s) removed'); - expect(fullTrace.link.target).toEqual([], 'link target(s) removed'); - - }); - - it('removing everything if detecting a circle', function() { - var fullTrace = _supply({ - node: { - label: ['a', 'b', 'c', 'd', 'e'] - }, - link: { - value: [1, 1, 1, 1, 1, 1, 1, 1], - source: [0, 1, 2, 3], - target: [1, 2, 0, 4] - } - }); - - expect(fullTrace.node.label).toEqual([], 'node label(s) removed'); - expect(fullTrace.link.value).toEqual([], 'link value(s) removed'); - expect(fullTrace.link.source).toEqual([], 'link source(s) removed'); - expect(fullTrace.link.target).toEqual([], 'link target(s) removed'); - - }); - - }); - describe('log warning if issue is encountered with graph structure', function() { @@ -111,31 +71,20 @@ describe('sankey tests', function() { expect(warnings.length).toEqual(1); }); + }); - it('circularity is detected', function() { - - var errors = []; - spyOn(Lib, 'error').and.callFake(function(msg) { - errors.push(msg); - }); - - _supply({ - node: { - label: ['a', 'b', 'c'] - }, - link: { - value: [1, 1, 1], - source: [0, 1, 2], - target: [1, 2, 0] - } - }); + describe('sankey global defaults', function() { - expect(errors.length).toEqual(1); - }); + it('should not coerce trace opacity', function() { + var gd = Lib.extendDeep({}, mock); + Plots.supplyDefaults(gd); + expect(gd._fullData[0].opacity).toBeUndefined(); }); + }); + describe('sankey defaults', function() { it('\'Sankey\' specification should have proper arrays where mandatory', @@ -223,4 +172,80 @@ describe('sankey tests', function() { }); }); + + describe('sankey calc', function() { + + function _calc(trace) { + var gd = { data: [trace] }; + + Plots.supplyDefaults(gd); + var fullTrace = gd._fullData[0]; + Sankey.calc(gd, fullTrace); + return fullTrace; + } + + var base = { type: 'sankey' }; + + it('circularity is detected', function() { + + var errors = []; + spyOn(Lib, 'error').and.callFake(function(msg) { + errors.push(msg); + }); + + _calc(Lib.extendDeep({}, base, { + node: { + label: ['a', 'b', 'c'] + }, + link: { + value: [1, 1, 1], + source: [0, 1, 2], + target: [1, 2, 0] + } + })); + + expect(errors.length).toEqual(1); + }); + + describe('remove nodes if encountering circularity', function() { + + it('removing a single self-pointing node', function() { + var fullTrace = _calc(Lib.extendDeep({}, base, { + node: { + label: ['a'] + }, + link: { + value: [1], + source: [0], + target: [0] + } + })); + + expect(fullTrace.node.label).toEqual([], 'node label(s) removed'); + expect(fullTrace.link.value).toEqual([], 'link value(s) removed'); + expect(fullTrace.link.source).toEqual([], 'link source(s) removed'); + expect(fullTrace.link.target).toEqual([], 'link target(s) removed'); + + }); + + it('removing everything if detecting a circle', function() { + var fullTrace = _calc(Lib.extendDeep({}, base, { + node: { + label: ['a', 'b', 'c', 'd', 'e'] + }, + link: { + value: [1, 1, 1, 1, 1, 1, 1, 1], + source: [0, 1, 2, 3], + target: [1, 2, 0, 4] + } + })); + + expect(fullTrace.node.label).toEqual([], 'node label(s) removed'); + expect(fullTrace.link.value).toEqual([], 'link value(s) removed'); + expect(fullTrace.link.source).toEqual([], 'link source(s) removed'); + expect(fullTrace.link.target).toEqual([], 'link target(s) removed'); + + }); + }); + }); }); From aa83612e0deed9be275bd386581b28b606db5973 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Tue, 9 May 2017 19:37:55 +0200 Subject: [PATCH 25/26] PR feedback: testing lifecycle methods and visible; file rename --- .../{energy.png => sankey_energy.png} | Bin ...energy_dark.png => sankey_energy_dark.png} | Bin .../mocks/{energy.json => sankey_energy.json} | 0 ...ergy_dark.json => sankey_energy_dark.json} | 0 test/jasmine/tests/sankey_test.js | 65 +++++++++++++++++- 5 files changed, 64 insertions(+), 1 deletion(-) rename test/image/baselines/{energy.png => sankey_energy.png} (100%) rename test/image/baselines/{energy_dark.png => sankey_energy_dark.png} (100%) rename test/image/mocks/{energy.json => sankey_energy.json} (100%) rename test/image/mocks/{energy_dark.json => sankey_energy_dark.json} (100%) diff --git a/test/image/baselines/energy.png b/test/image/baselines/sankey_energy.png similarity index 100% rename from test/image/baselines/energy.png rename to test/image/baselines/sankey_energy.png diff --git a/test/image/baselines/energy_dark.png b/test/image/baselines/sankey_energy_dark.png similarity index 100% rename from test/image/baselines/energy_dark.png rename to test/image/baselines/sankey_energy_dark.png diff --git a/test/image/mocks/energy.json b/test/image/mocks/sankey_energy.json similarity index 100% rename from test/image/mocks/energy.json rename to test/image/mocks/sankey_energy.json diff --git a/test/image/mocks/energy_dark.json b/test/image/mocks/sankey_energy_dark.json similarity index 100% rename from test/image/mocks/energy_dark.json rename to test/image/mocks/sankey_energy_dark.json diff --git a/test/jasmine/tests/sankey_test.js b/test/jasmine/tests/sankey_test.js index 5fffb88bdf8..97dba24f3a8 100644 --- a/test/jasmine/tests/sankey_test.js +++ b/test/jasmine/tests/sankey_test.js @@ -1,9 +1,15 @@ +var Plotly = require('@lib/index'); var attributes = require('@src/traces/sankey/attributes'); var Lib = require('@src/lib'); -var mock = require('@mocks/energy.json'); +var d3 = require('d3'); +var mock = require('@mocks/sankey_energy.json'); +var mockDark = require('@mocks/sankey_energy_dark.json'); var Plots = require('@src/plots/plots'); var Sankey = require('@src/traces/sankey'); +var createGraphDiv = require('../assets/create_graph_div'); +var destroyGraphDiv = require('../assets/destroy_graph_div'); + describe('sankey tests', function() { 'use strict'; @@ -248,4 +254,61 @@ describe('sankey tests', function() { }); }); }); + + describe('lifecycle methods', function() { + + afterEach(destroyGraphDiv); + + it('Plotly.deleteTraces with two traces removes the deleted plot', function(done) { + + var gd = createGraphDiv(); + var mockCopy = Lib.extendDeep({}, mock); + var mockCopy2 = Lib.extendDeep({}, mockDark); + + Plotly.plot(gd, mockCopy) + .then(function() { + expect(gd.data.length).toEqual(1); + expect(d3.selectAll('.sankey').size()).toEqual(1); + return Plotly.plot(gd, mockCopy2); + }) + .then(function() { + expect(gd.data.length).toEqual(2); + expect(d3.selectAll('.sankey').size()).toEqual(2); + return Plotly.deleteTraces(gd, [0]); + }) + .then(function() { + expect(gd.data.length).toEqual(1); + expect(d3.selectAll('.sankey').size()).toEqual(1); + return Plotly.deleteTraces(gd, 0); + }) + .then(function() { + expect(gd.data.length).toEqual(0); + expect(d3.selectAll('.sankey').size()).toEqual(0); + done(); + }); + }); + + it('Plotly.plot does not show Sankey if \'visible\' is false', function(done) { + + var gd = createGraphDiv(); + var mockCopy = Lib.extendDeep({}, mock); + + Plotly.plot(gd, mockCopy) + .then(function() { + expect(gd.data.length).toEqual(1); + expect(d3.selectAll('.sankey').size()).toEqual(1); + return Plotly.restyle(gd, 'visible', false); + }) + .then(function() { + expect(gd.data.length).toEqual(1); + expect(d3.selectAll('.sankey').size()).toEqual(0); + return Plotly.restyle(gd, 'visible', true); + }) + .then(function() { + expect(gd.data.length).toEqual(1); + expect(d3.selectAll('.sankey').size()).toEqual(1); + done(); + }); + }); + }); }); From 742728436b109221735c3ed5e5293e5a65dc327a Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Tue, 9 May 2017 20:25:07 +0200 Subject: [PATCH 26/26] PR feedback: hover tooltip tests; switching to addTraces --- test/jasmine/tests/sankey_test.js | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/test/jasmine/tests/sankey_test.js b/test/jasmine/tests/sankey_test.js index 97dba24f3a8..a03da2c9c59 100644 --- a/test/jasmine/tests/sankey_test.js +++ b/test/jasmine/tests/sankey_test.js @@ -9,6 +9,7 @@ var Sankey = require('@src/traces/sankey'); var createGraphDiv = require('../assets/create_graph_div'); var destroyGraphDiv = require('../assets/destroy_graph_div'); +var mouseEvent = require('../assets/mouse_event'); describe('sankey tests', function() { @@ -269,7 +270,7 @@ describe('sankey tests', function() { .then(function() { expect(gd.data.length).toEqual(1); expect(d3.selectAll('.sankey').size()).toEqual(1); - return Plotly.plot(gd, mockCopy2); + return Plotly.addTraces(gd, mockCopy2.data[0]); }) .then(function() { expect(gd.data.length).toEqual(2); @@ -310,5 +311,32 @@ describe('sankey tests', function() { done(); }); }); + + it('Plotly.plot shows and removes tooltip on node, link', function(done) { + + var gd = createGraphDiv(); + var mockCopy = Lib.extendDeep({}, mock); + + Plotly.plot(gd, mockCopy) + .then(function() { + + mouseEvent('mousemove', 400, 300); + mouseEvent('mouseover', 400, 300); + + window.setTimeout(function() { + expect(d3.select('.hoverlayer>.hovertext>text').node().innerHTML) + .toEqual('447TWh', 'tooltip present'); + + mouseEvent('mousemove', 450, 300); + mouseEvent('mouseover', 450, 300); + + window.setTimeout(function() { + expect(d3.select('.hoverlayer>.hovertext>text').node().innerHTML) + .toEqual('46TWh', 'tooltip jumped to link'); + done(); + }, 60); + }, 60); + }); + }); }); });

5T=J38<0kGT3AiwzLR14;C1aK5Hc;P25uJ}(*n+HbG-)ACAc z<~yfQ-sLZYBa_wN5y%}(L3R|}aPv({ls45px0TRkJa+TrMW$<8#zEnpFZ;xBxq27S z5>3U49*QB4ihBAyQIm;91FpD{GND0F0fT45zDXou zX2&Zgx~LYRGDk73B@Bv$EL)OX-CBe!t$H1|w7b6g@zZCw?FYhkx9#WYYBi-L|yIoGzfh4DP9Ym)n`er>WEMn|q=LSP_>l7h zUtD4ZpBg+?NK8Bm1-5=`{ULIS7j&&amoO?~+0S9Z3{cIi*}V>Esw!mbrU;Xa=WFGH|4Aj9)aNN`oTI|~SLnADBgFL7U)<}|-7u*Ch6`)F@!e}=VN$^W(hj<{G&E4U|al+djt#*Ud?bgvc2 z5xlS40z5|tuVUL*&^K_+Cc-?;{jKSXq<6s?wO?-wQk?vc>6lyJIh##~<)i4yz%#|-|yl@v+0kbWV3?@)S*XW?RR z4rCb=!6=y;qbBlDpx^T?tcZ0SJx3wNK2lKf1KrK^9z=6eW_b*PsnS-y^2#@svU1I5 z1Jg7pAUDwQYX5XB%oh!;(fn0I(r(Uv|3QX1cun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cmV?d00001 diff --git a/test/image/baselines/sankey.png b/test/image/baselines/sankey.png deleted file mode 100644 index 1bffefd071a06d2c11d35e5d1695d0c7c15bdb97..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53847 zcmeF3bySpH`|qU@LAs=o5^0c{`>6Gs7I(wdY-*^4i z^R9KyzvrB_<_~5@XYPCNebx8+Tob4uCxM3Y4CT?IM`)67MU@^sf=_?+2qpp<5xkN} zL{RnU5&0uYQQ>z^+PjTN3Akd{O?Q+D$gmk1U!++u;o(`y30S=J(8v*mK71PJ&G`Kc zrd%Hu2Q`=nQzoDnWj&eY(RL7)3Op`#K#=ZbalOYwYRSeYmz<5{vD|u-)H)_+hYdS5 zwMBUq`(I<$Drz@7CC&G2)R-7B|NICD5PC(ZfElS$MM)0(kB=}2DxC`aKmTtGueXo8 zAwf7LZ214>^CMugdH>4?Q)0Y;AykO`t+M`)-wR%3OMizXDg^(J4@zosIC`aqUafzA zTT}=!W*dSW@Q)9nEO+*1MEf4ied ztOyv~7urTl|Gd_eVJMXU^q+4Sf-EW}g!nGYDYo{% zED6};U;kwb|Nkcc!@~UkP5w`-{y(u~azxlkE!$A{`>PFyA^wY)y6bSkd($pr+mOAw zonnU$T(y|%y_V-zv*{h8->zlpmv=44a9p}}}cLQ=fYcXsGy7#wN4x^H^)0-oi zmi2p8!OK?mJq4mdXGQe+MXtDi?w8jguyS9M?B{>kOS&$6j$F#eNgdC|P?FaZoYRKU zQEm@6iw`r5)pPp43RKFwNL~9mr*yre78`6k!^y0PtQ$(%OE?$ZY+oO?z!|(sr<0hk zvoDeeCq-CMPGl?i=oV!x3lU>e#R*NgKArs zEgd&i+C{2~HLyBAHvCPbNG^rCq(mMG1fX{K}>nro*K->M=jb|frXWPHZJ;4f4Yn0tufxW0umgoO< zxA(n#u*|Y*y7T_5#50!oSx^j`I%6}xf&kF!ag#k++fO|JUu?LukBpEtYZL%YTG z`(@MRCbPY$r^s)KKb#l-^w|F5Vx7d#Z;%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q`)?6D2@*KI0S@2sB>mIHyMrtYp|AJBv@++I5YbVkaI?(wPG< zUfJHI|AiG8z;!HK-<~=G7NBP)5&?c}5`ORCynVC)=M>|MxeboOIMJsY6e|Dx*~<23 z8)+;PQr<4A{h)(eZoOAe49L@~0IkjYi&d}$a{CBCH_VRJ)x2{W?r*Xr4E>`K0W|*K zeyg8*in}W$Kc4l zQds=kJ9_@sGoT(=`0~HeF^o<2QPbc11|A&)eFFwZl}U@HD$H<<(3%pF0Oe5dt?ex^ zHwF4EVUmaeCGYd|!7Mf<0MHnXd3)d$2UDO$zZ-M~!eR5HH5FSgVwjFSz<{e{S{?-= zjqFE~97#Rp;7I0Be*6AiR7e%P4fI4?G9j-VoPqw!J=p>)NLQ#D_kNNpQ|C=?c7gaEv z!ZdWHciqez`1+2xftWD|e(m^6Ow#}vS|eu3j~r8t6j9xDDwAb0@6&Tw^6^k z_x!Cuok;9z->>(bO*{cYgulYe{~q_h#r)qG&i-MhcM%8r7fw(VOJNy0361Mnd= MWo@N`>vtaiA5acs!~g&Q diff --git a/test/image/baselines/sankey_large.png b/test/image/baselines/sankey_large.png deleted file mode 100644 index 7e7c78893a11fbd9268d4246c1e380bb0c36aae4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 55933 zcmeFZbyU=CyEZK0P=iPhA|c%^D2>t}AR^sJmvpxv-O?o?Akrz_-Jmo`cbD{c%^iC` zdq4NHzJI=Nt@n?2tywM^W#)>rj^jMeUyy>F1Sa|;^n3U2VM0wGz7JY zd!a0uzV9A7wA2T?uz$`-z<(|3i$;yYp5Yx5jBqjZ=IY#HX!Wc=mCvKjdZ^yvfwBFU zy4p*Zg0BVhw_j^VJHv>1lA=)qz5n^O5-3bfr0|@gz(PzIS@fS?j}eFzzM@i)BmU#- zIW;*FL$33u@BjSqf!p!eJP*@JF+q;)u z+mPj-7e+yjB<=7|`+;wgJQw+$@G4$02jM?13;{b5A&2)r?3g0*4I)Q|ZLmsW$bVQ{ zx3?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juDd;kCd diff --git a/test/image/mocks/energy.json b/test/image/mocks/energy.json index a8cd37cbffa..e707a37123c 100644 --- a/test/image/mocks/energy.json +++ b/test/image/mocks/energy.json @@ -16,8 +16,7 @@ "nodepad": 15, "nodethickness": 15, "valueformat": ".0f", - "valueunit": "TWh", - "followmouse": true, + "valuesuffix": "TWh", "nodes": [ {"label":"Agricultural 'waste'"}, {"label":"Bio-conversion"}, @@ -69,11 +68,11 @@ {"label":"Wind"} ], "links": [ - {"source":0,"target":1,"value":124.729}, + {"source":0,"target":1,"value":124.729, "label": "stream 1"}, {"source":1,"target":2,"value":0.597}, {"source":1,"target":3,"value":26.862}, {"source":1,"target":4,"value":280.322}, - {"source":1,"target":5,"value":81.144}, + {"source":1,"target":5,"value":81.144, "label": "stream 1"}, {"source":6,"target":2,"value":35}, {"source":7,"target":4,"value":35}, {"source":8,"target":9,"value":11.606}, @@ -99,7 +98,7 @@ {"source":5,"target":3,"value":1.401}, {"source":5,"target":26,"value":151.891}, {"source":5,"target":19,"value":2.096}, - {"source":5,"target":12,"value":48.58}, + {"source":5,"target":12,"value":48.58, "label": "stream 1"}, {"source":27,"target":15,"value":7.013}, {"source":17,"target":28,"value":20.897}, {"source":17,"target":3,"value":6.242}, @@ -115,7 +114,8 @@ {"source":2,"target":20,"value":4.413}, {"source":34,"target":1,"value":14.375}, {"source":24,"target":5,"value":122.952}, - {"source":35,"target":26,"value":839.978}, + {"source":35,"target":26,"value":500,"color":"rgba(33,102,172,0.35)","label":"Old generation plant (made-up)"}, + {"source":35,"target":26,"value":339.978,"color":"rgba(178,24,43,0.35)","label":"New generation plant (made-up)"}, {"source":36,"target":37,"value":504.287}, {"source":38,"target":37,"value":107.703}, {"source":37,"target":2,"value":611.99}, @@ -149,17 +149,32 @@ }, "updatemenus": [ { - "y": 0.7, + "y": 1, "buttons": [ { - "label": "Horizontal", + "label": "Light", + "method": "relayout", + "args": [ "paper_bgcolor", "white" ] + }, + { + "label": "Dark", + "method": "relayout", + "args": [ "paper_bgcolor", "black"] + } + ] + }, + { + "y": 0.9, + "buttons": [ + { + "label": "Thick", "method": "restyle", - "args": [ "orientation", "h" ] + "args": [ "nodethickness", 15 ] }, { - "label": "Vertical", + "label": "Thin", "method": "restyle", - "args": [ "orientation", "v"] + "args": [ "nodethickness", 8] } ] }, @@ -167,48 +182,57 @@ "y": 0.8, "buttons": [ { - "label": "Follow mouse", + "label": "Small gap", "method": "restyle", - "args": [ "followmouse", true ] + "args": [ "nodepad", 15 ] }, { - "label": "Stick tooltip", + "label": "Large gap", "method": "restyle", - "args": [ "followmouse", false] + "args": [ "nodepad", 20] } ] }, { - "y": 1, + "y": 0.7, "buttons": [ { - "label": "Thick", + "label": "Snap", "method": "restyle", - "args": [ "nodethickness", 15 ] + "args": [ "arrangement", "snap" ] }, { - "label": "Thin", + "label": "Perpendicular", "method": "restyle", - "args": [ "nodethickness", 8] + "args": [ "arrangement", "perpendicular"] + }, + { + "label": "Freeform", + "method": "restyle", + "args": [ "arrangement", "freeform"] + }, + { + "label": "Fixed", + "method": "restyle", + "args": [ "arrangement", "fixed"] } ] }, { - "y": 0.9, + "y": 0.6, "buttons": [ { - "label": "Small gap", + "label": "Horizontal", "method": "restyle", - "args": [ "nodepad", 15 ] + "args": [ "orientation", "h" ] }, { - "label": "Large gap", + "label": "Vertical", "method": "restyle", - "args": [ "nodepad", 20] + "args": [ "orientation", "v"] } ] } - ] } -} \ No newline at end of file +} diff --git a/test/image/mocks/energy_dark.json b/test/image/mocks/energy_dark.json new file mode 100644 index 00000000000..4a060dbb1c5 --- /dev/null +++ b/test/image/mocks/energy_dark.json @@ -0,0 +1,239 @@ +{ + "data": [ + { + "type": "sankey", + "domain": { + "x": [ + 0, + 1 + ], + "y": [ + 0, + 1 + ] + }, + "orientation": "h", + "nodepad": 15, + "nodethickness": 15, + "valueformat": ".0f", + "valuesuffix": "TWh", + "nodes": [ + {"label":"Agricultural 'waste'"}, + {"label":"Bio-conversion"}, + {"label":"Liquid"}, + {"label":"Losses"}, + {"label":"Solid"}, + {"label":"Gas"}, + {"label":"Biofuel imports"}, + {"label":"Biomass imports"}, + {"label":"Coal imports"}, + {"label":"Coal"}, + {"label":"Coal reserves"}, + {"label":"District heating"}, + {"label":"Industry"}, + {"label":"Heating and cooling - commercial"}, + {"label":"Heating and cooling - homes"}, + {"label":"Electricity grid"}, + {"label":"Over generation / exports"}, + {"label":"H2 conversion"}, + {"label":"Road transport"}, + {"label":"Agriculture"}, + {"label":"Rail transport"}, + {"label":"Lighting & appliances - commercial"}, + {"label":"Lighting & appliances - homes"}, + {"label":"Gas imports"}, + {"label":"Ngas"}, + {"label":"Gas reserves"}, + {"label":"Thermal generation"}, + {"label":"Geothermal"}, + {"label":"H2"}, + {"label":"Hydro"}, + {"label":"International shipping"}, + {"label":"Domestic aviation"}, + {"label":"International aviation"}, + {"label":"National navigation"}, + {"label":"Marine algae"}, + {"label":"Nuclear"}, + {"label":"Oil imports"}, + {"label":"Oil"}, + {"label":"Oil reserves"}, + {"label":"Other waste"}, + {"label":"Pumped heat"}, + {"label":"Solar PV"}, + {"label":"Solar Thermal"}, + {"label":"Solar"}, + {"label":"Tidal"}, + {"label":"UK land based bioenergy"}, + {"label":"Wave"}, + {"label":"Wind"} + ], + "links": [ + {"source":0,"target":1,"value":124.729}, + {"source":1,"target":2,"value":0.597}, + {"source":1,"target":3,"value":26.862}, + {"source":1,"target":4,"value":280.322}, + {"source":1,"target":5,"value":81.144}, + {"source":6,"target":2,"value":35}, + {"source":7,"target":4,"value":35}, + {"source":8,"target":9,"value":11.606}, + {"source":10,"target":9,"value":63.965}, + {"source":9,"target":4,"value":75.571}, + {"source":11,"target":12,"value":10.639}, + {"source":11,"target":13,"value":22.505}, + {"source":11,"target":14,"value":46.184}, + {"source":15,"target":16,"value":104.453}, + {"source":15,"target":14,"value":113.726}, + {"source":15,"target":17,"value":27.14}, + {"source":15,"target":12,"value":342.165}, + {"source":15,"target":18,"value":37.797}, + {"source":15,"target":19,"value":4.412}, + {"source":15,"target":13,"value":40.858}, + {"source":15,"target":3,"value":56.691}, + {"source":15,"target":20,"value":7.863}, + {"source":15,"target":21,"value":90.008}, + {"source":15,"target":22,"value":93.494}, + {"source":23,"target":24,"value":40.719}, + {"source":25,"target":24,"value":82.233}, + {"source":5,"target":13,"value":0.129}, + {"source":5,"target":3,"value":1.401}, + {"source":5,"target":26,"value":151.891}, + {"source":5,"target":19,"value":2.096}, + {"source":5,"target":12,"value":48.58}, + {"source":27,"target":15,"value":7.013}, + {"source":17,"target":28,"value":20.897}, + {"source":17,"target":3,"value":6.242}, + {"source":28,"target":18,"value":20.897}, + {"source":29,"target":15,"value":6.995}, + {"source":2,"target":12,"value":121.066}, + {"source":2,"target":30,"value":128.69}, + {"source":2,"target":18,"value":135.835}, + {"source":2,"target":31,"value":14.458}, + {"source":2,"target":32,"value":206.267}, + {"source":2,"target":19,"value":3.64}, + {"source":2,"target":33,"value":33.218}, + {"source":2,"target":20,"value":4.413}, + {"source":34,"target":1,"value":14.375}, + {"source":24,"target":5,"value":122.952}, + {"source":35,"target":26,"value":500,"color":"rgba(33,102,172,0.65)","label":"Old generation plant (made-up)"}, + {"source":35,"target":26,"value":339.978,"color":"rgba(178,24,43,0.65)","label":"New generation plant (made-up)"}, + {"source":36,"target":37,"value":504.287}, + {"source":38,"target":37,"value":107.703}, + {"source":37,"target":2,"value":611.99}, + {"source":39,"target":4,"value":56.587}, + {"source":39,"target":1,"value":77.81}, + {"source":40,"target":14,"value":193.026}, + {"source":40,"target":13,"value":70.672}, + {"source":41,"target":15,"value":59.901}, + {"source":42,"target":14,"value":19.263}, + {"source":43,"target":42,"value":19.263}, + {"source":43,"target":41,"value":59.901}, + {"source":4,"target":19,"value":0.882}, + {"source":4,"target":26,"value":400.12}, + {"source":4,"target":12,"value":46.477}, + {"source":26,"target":15,"value":525.531}, + {"source":26,"target":3,"value":787.129}, + {"source":26,"target":11,"value":79.329}, + {"source":44,"target":15,"value":9.452}, + {"source":45,"target":1,"value":182.01}, + {"source":46,"target":15,"value":19.013}, + {"source":47,"target":15,"value":289.366} + ] + } + ], + "layout": { + "paper_bgcolor": "rgba(0,0,0,1)", + "title": "Energy forecast for 2050, UK — Department of Energy & Climate Change
Imperfect copy of
Mike Bostock's example
with numerous Plotly features", + "width": 1118, + "height": 772, + "font": { + "size": 10 + }, + "updatemenus": [ + { + "y": 1, + "buttons": [ + { + "label": "Thick", + "method": "restyle", + "args": [ "nodethickness", 15 ] + }, + { + "label": "Thin", + "method": "restyle", + "args": [ "nodethickness", 8] + } + ] + }, + { + "y": 0.9, + "buttons": [ + { + "label": "Small gap", + "method": "restyle", + "args": [ "nodepad", 15 ] + }, + { + "label": "Large gap", + "method": "restyle", + "args": [ "nodepad", 20] + } + ] + }, + { + "y": 0.8, + "buttons": [ + { + "label": "Follow mouse", + "method": "restyle", + "args": [ "followmouse", true ] + }, + { + "label": "Stick tooltip", + "method": "restyle", + "args": [ "followmouse", false] + } + ] + }, + { + "y": 0.7, + "buttons": [ + { + "label": "Snap", + "method": "restyle", + "args": [ "arrangement", "snap" ] + }, + { + "label": "Perpendicular", + "method": "restyle", + "args": [ "arrangement", "perpendicular"] + }, + { + "label": "Freeform", + "method": "restyle", + "args": [ "arrangement", "freeform"] + }, + { + "label": "Fixed", + "method": "restyle", + "args": [ "arrangement", "fixed"] + } + ] + }, + { + "y": 0.6, + "buttons": [ + { + "label": "Horizontal", + "method": "restyle", + "args": [ "orientation", "h" ] + }, + { + "label": "Vertical", + "method": "restyle", + "args": [ "orientation", "v"] + } + ] + } + ] + } +} diff --git a/test/image/mocks/sankey.json b/test/image/mocks/sankey.json deleted file mode 100644 index 24518d45e98..00000000000 --- a/test/image/mocks/sankey.json +++ /dev/null @@ -1,13334 +0,0 @@ -{ - "layout": { - "width": 1184, - "height": 400, - "title": "Widget parameters and cost" - }, - - "data": [{ - - "type": "sankey", - - "line": { - "showscale": true, - "reversescale": true, - "colorscale": "Jet", - "cmin": -4000, - "cmax": -100, - "color": [-41, -1317, -164, -1856, -79, -931, -191, -2983, -341, -3846, -278, -3019, -523, -2357, -985, -3447, -211, -2842, -458, -4388, -784, -2563, -935, -2253, -313, -3667, -1479, -1030, -632, -623, -1945, -1324, -1221, -878, -947, -1615, -697, -575, -482, -905, -869, -433, -484, -349, -667, -248, -1135, -888, -1019, -223, -2067, -729, -579, -659, -334, -340, -554, -455, -377, -375, -453, -834, -934, -334, -369, -290, -354, -497, -490, -329, -729, -1794, -151, -1162, -3935, -1013, -509, -825, -997, -320, -680, -422, -785, -542, -563, -489, -1283, -680, -78, -450, -514, -449, -548, -661, -641, -503, -570, -257, -394, -450] - }, - - "dimensions": [ - { - "constraintrange": [100000, 150000], - "label": "Block height", - "values": [32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 86600, 163400, 162600, 90000, 93100, 163000, 140500, 130000, 100700, 164500, 147700, 121700, 107500, 176600, 133600, 111100, 93100, 72400, 130100, 54500, 182600, 160300, 218100, 66500, 95800, 164800, 107200, 101600, 91100, 91100, 78100, 63300, 75700, 69600, 88500, 115800, 195700, 88900, 74800, 65400, 74900, 115300, 91400, 67800, 85300, 171300, 32000, 227900, 163200, 122899, 112300, 101500, 111199, 73300, 120800, 93100, 117200, 118500, 104800, 108500, 146500, 90300, 32000, 93000, 110700, 103500, 93300, 106300, 118500, 93000, 67600, 51400, 89000, 94000] - }, - { - "label": "Block width", - "range": [0, 700000], - "tickformat": "", - "values": [268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 436900, 373600, 268630, 439000, 381800, 491200, 402800, 381400, 485600, 600000, 372200, 394700, 383800, 401100, 356500, 313200, 487100, 490700, 432299, 530300, 521500, 456700, 333800, 343200, 394000, 328200, 487700, 383600, 317700, 324600, 482900, 515100, 500100, 562700, 486000, 453400, 352900, 331300, 496200, 469099, 472500, 354700, 507700, 509000, 439300, 525300, 347600, 379000, 432800, 378800, 383200, 523800, 600000, 313600, 497700, 411300, 420000, 381100, 342800, 385900, 268630, 495800, 488000, 446400, 397900, 373300, 385700, 396500, 475700, 510600, 586800, 596000, 407600, 439200] - }, - { - "label": "Cylinder material", - "tickvals": [0, 0.5, 1, 2, 3], - "ticktext": ["A", "AB", "B", "Y", "Z"], - "values": [0, 0, 1, 0.5, 2, 3, 3, 0, 1, 1, 2, 2, 3, 0, 0, 1, 2, 2, 3, 3, 0, 1, 1, 2, 3, 3, 3, 0, 2, 3, 1, 0, 1, 3, 1, 0, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 3, 2, 2, 0, 0, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 0, 3, 0, 2, 2, 0, 2, 0, 2, 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 0, 2, 2, 2] - }, - { - "label": "Block material", - "tickvals": [0, 1, 2, 3], - "range": [-1, 4], - "values": [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] - }, - { - "label": "Total weight", - "visible": true, - "values": [160, 1324, 252, 1711, 173, 624, 228, 2474, 371, 3103, 312, 2408, 460, 1727, 754, 2457, 227, 1963, 354, 2797, 377, 1327, 462, 1009, 166, 1415, 1118, 1063, 593, 498, 959, 1331, 1146, 645, 921, 1596, 663, 568, 492, 833, 630, 445, 504, 394, 647, 314, 1039, 829, 911, 282, 925, 681, 581, 506, 368, 373, 628, 538, 418, 419, 478, 884, 847, 369, 410, 344, 396, 501, 510, 379, 733, 1649, 239, 1035, 1839, 967, 514, 875, 794, 414, 664, 447, 839, 540, 636, 499, 1059, 743, 173, 473, 519, 465, 623, 726, 631, 521, 643, 323, 424, 472] - }, - { - "label": "Assembly total cost", - "visible": false, - "values": [1125, 9274, 2735, 16920, 2193, 20704, 4814, 34689, 5565, 46554, 5225, 38887, 9746, 37715, 17798, 55250, 5697, 49083, 11226, 81939, 24258, 62488, 27363, 61924, 12511, 106196, 24444, 7443, 9111, 12527, 50738, 9320, 12291, 17571, 9508, 11176, 9142, 7687, 6724, 11219, 17825, 6506, 6367, 4966, 8495, 3860, 12844, 10688, 13026, 4007, 57281, 9790, 7335, 13748, 5358, 5393, 4401, 3769, 5233, 5058, 6047, 6188, 11899, 5297, 5154, 4406, 5061, 7022, 6358, 4721, 7723, 16745, 2651, 14194, 100772, 10504, 7021, 6131, 16730, 2904, 8334, 5968, 5876, 7394, 4454, 6800, 18376, 5204, 2190, 6146, 7013, 6412, 4361, 5082, 8028, 6484, 4504, 3832, 5687, 6174] - }, - { - "label": "Assembly penalty weight", - "values": [9, 794, 34, 1409, 17, 536, 39, 7133, 115, 9843, 107, 7017, 273, 5131, 1210, 9032, 82, 7312, 252, 16778, 760, 4349, 891, 4228, 123, 10800, 1593, 467, 260, 226, 2940, 803, 689, 420, 422, 1229, 275, 198, 150, 423, 423, 134, 146, 89, 248, 55, 612, 401, 546, 52, 4208, 307, 194, 257, 91, 93, 178, 133, 99, 98, 131, 345, 461, 90, 96, 69, 91, 160, 148, 81, 274, 1332, 31, 667, 11733, 502, 163, 354, 480, 67, 252, 120, 303, 181, 162, 153, 1142, 251, 17, 131, 165, 135, 162, 222, 230, 154, 198, 58, 109, 132] - }, - { - "label": "Height st width", - "values": [236630, 326876, 347086, 437333, 457543, 105963, 568000, 216420, 236630, 326876, 347086, 437333, 457543, 105963, 568000, 216420, 236630, 326876, 347086, 437333, 457543, 105963, 568000, 216420, 236630, 326876, 350300, 210200, 106030, 349000, 288700, 328200, 262300, 251400, 384900, 435500, 224500, 273000, 276300, 224500, 222900, 202100, 394000, 418300, 302200, 475800, 338900, 296400, 115700, 276700, 298200, 163400, 380500, 282000, 226600, 233500, 404799, 451800, 424400, 493100, 397500, 337600, 157200, 242399, 421400, 403700, 397600, 239400, 416300, 441200, 354000, 354000, 315599, 151100, 269600, 255900, 270900, 422299, 488800, 240300, 376900, 318200, 302800, 262600, 238000, 277400, 122130, 405500, 455999, 353400, 287200, 269800, 292400, 290200, 357200, 417600, 519200, 544600, 318600, 345200] - }, - { - "label": "Min height width", - "values": [5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, 42910, 126039, 135736, 46100, 54920, 113880, 100220, 91860, 52140, 104500, 110480, 82230, 69120, 136490, 97950, 79780, 44390, 23330, 86870, 1469, 130450, 114629, 184720, 32180, 56400, 131980, 58430, 63240, 59330, 58640, 29810, 11790, 25690, 13330, 39900, 70460, 160410, 55770, 25179, 18490, 27650, 79830, 40630, 16900, 41369, 118770, -2760, 190000, 119920, 85020, 73980, 49120, 51200, 41940, 71030, 51970, 75200, 80390, 70520, 69910, 119636, 40720, -16800, 48360, 70910, 66170, 54730, 66650, 70930, 41940, 8919, -8201, 48240, 50080] - }, - { - "label": "Min width diameter", - "values": [98453, 319366, 234498, 455411, 391333, 147711, 479081, 208910, 124041, 344954, 280876, 501789, 368624, 98453, 429823, 234498, 170419, 391333, 258167, 479081, 319366, 124041, 455411, 280876, 147711, 368624, 315981, 203423, 170419, 318081, 237211, 321023, 258211, 260481, 341011, 429823, 273989, 296489, 285589, 302889, 235581, 214989, 388889, 392489, 334089, 432089, 423289, 358489, 235589, 244989, 223823, 229989, 389489, 262681, 219489, 226389, 312723, 344923, 401889, 464489, 387789, 283223, 254689, 233089, 397989, 370889, 374289, 256489, 409489, 410789, 294711, 380711, 203011, 280789, 288211, 234211, 284989, 353623, 479081, 143423, 399489, 313089, 249823, 282889, 172623, 287689, 170419, 325623, 389789, 348189, 299689, 275089, 215523, 226323, 377489, 412389, 416623, 497789, 309389, 340989] - }, - { - "label": "RF block", - "values": [1417, 23377, 3376, 33336, 5635, 10812, 6898, 21273, 2484, 35126, 5626, 51096, 7384, 22020, 18912, 52449, 7498, 87528, 11359, 107154, 9197, 18159, 13115, 41120, 4254, 53966, 17129, 14957, 12469, 12882, 19875, 23547, 16325, 15238, 15452, 31817, 18210, 16237, 13815, 24070, 14163, 10748, 16292, 12787, 19559, 10597, 34781, 25859, 23121, 7331, 19298, 17056, 18788, 12009, 8997, 9280, 10990, 9825, 13690, 14547, 15443, 14758, 22429, 9324, 13396, 10915, 12615, 13307, 16842, 12533, 11312, 29347, 2923, 28796, 42332, 12953, 14401, 16151, 23973, 4730, 21716, 13116, 13175, 15085, 8140, 14046, 15629, 13231, 5612, 14571, 14929, 12812, 9048, 10826, 20129, 17258, 12673, 11513, 12391, 14423] - } - ], - "sankeydata": { - "version": "1.0", - "encoding": "UTF-8", - "feed": { - "xmlns": "http://www.w3.org/2005/Atom", - "xmlns$openSearch": "http://a9.com/-/spec/opensearchrss/1.0/", - "xmlns$gsx": "http://schemas.google.com/spreadsheets/2006/extended", - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "drones_20140602" - }, - "link": [ - { - "rel": "alternate", - "type": "application/atom+xml", - "href": "https://docs.google.com/spreadsheets/d/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/pubhtml" - }, - { - "rel": "http://schemas.google.com/g/2005#feed", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values" - }, - { - "rel": "http://schemas.google.com/g/2005#post", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values" - }, - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values?alt=json-in-script" - } - ], - "author": [ - { - "name": { - "$t": "june15.washpost" - }, - "email": { - "$t": "june15.washpost@gmail.com" - } - } - ], - "openSearch$totalResults": { - "$t": "194" - }, - "openSearch$startIndex": { - "$t": "1" - }, - "entry": [ - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cokwr" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "1" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/11/2001, mishapyear: 2001, mishapcountry: Iraq, mishaplocation: near Basra, narrative: A Predator reconnaissance drone crashed in southern Iraq, near Basra, during a surveillance mission. Officials said it was unclear whether the aircraft was shot down by Iraqi forces or crashed because of mechanical problems. The drone had been based at Ali Al Salem Air Base in Kuwait. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 388, dronetype: RQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cokwr" - } - ], - "gsx$crashid": { - "$t": "1" - }, - "gsx$mishapdate": { - "$t": "9/11/2001" - }, - "gsx$mishapyear": { - "$t": "2001" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "near Basra" - }, - "gsx$narrative": { - "$t": "A Predator reconnaissance drone crashed in southern Iraq, near Basra, during a surveillance mission. Officials said it was unclear whether the aircraft was shot down by Iraqi forces or crashed because of mechanical problems. The drone had been based at Ali Al Salem Air Base in Kuwait. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "388" - }, - "gsx$dronetype": { - "$t": "RQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cpzh4" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "2" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/3/2001, mishapyear: 2001, mishapcountry: United States, mishaplocation: Holloman Air Force Base, N.M., narrative: An aerial target drone crashed 1.6 seconds after takeoff. The automatic flight control system commanded the aircraft to nose-dive immediately after takeoff because of erroneous inputs from the tri-axis rate gyro. Investigators concluded the accident was caused by the incorrect installation of the tri-axis rate gyro. The drone was being used as a target for a surface-to-air missile test., narrativelength: 389, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,101,749.00, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cpzh4" - } - ], - "gsx$crashid": { - "$t": "2" - }, - "gsx$mishapdate": { - "$t": "10/3/2001" - }, - "gsx$mishapyear": { - "$t": "2001" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Holloman Air Force Base, N.M." - }, - "gsx$narrative": { - "$t": "An aerial target drone crashed 1.6 seconds after takeoff. The automatic flight control system commanded the aircraft to nose-dive immediately after takeoff because of erroneous inputs from the tri-axis rate gyro. Investigators concluded the accident was caused by the incorrect installation of the tri-axis rate gyro. The drone was being used as a target for a surface-to-air missile test." - }, - "gsx$narrativelength": { - "$t": "389" - }, - "gsx$dronetype": { - "$t": "QF-4E" - }, - "gsx$dronename": { - "$t": "Phantom" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$1,101,749.00" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cre1l" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "3" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/10/2001, mishapyear: 2001, mishapcountry: Iraq, mishaplocation: southern Iraq, narrative: A Predator reconnaissance drone crashed during a surveillance mission in the no-fly zone over southern Iraq. it is unclear whether the aircraft was shot down or crashed because of mechanical failure. The drone was based at Ali Al Salem Air Base in Kuwait. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report. , narrativelength: 359, dronetype: RQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cre1l" - } - ], - "gsx$crashid": { - "$t": "3" - }, - "gsx$mishapdate": { - "$t": "10/10/2001" - }, - "gsx$mishapyear": { - "$t": "2001" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "southern Iraq" - }, - "gsx$narrative": { - "$t": "A Predator reconnaissance drone crashed during a surveillance mission in the no-fly zone over southern Iraq. it is unclear whether the aircraft was shot down or crashed because of mechanical failure. The drone was based at Ali Al Salem Air Base in Kuwait. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report. " - }, - "gsx$narrativelength": { - "$t": "359" - }, - "gsx$dronetype": { - "$t": "RQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/chk2m" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "4" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/25/2001, mishapyear: 2001, mishapcountry: United States, mishaplocation: Tyndall Air Force Base, Fla., narrative: An aerial target drone crashed 4,000 feet from the runway in a wooded area, leaving a scar in the ground 50 feet long and four feet deep. Firefighters allowed the blaze to burn for 26 hours until it extinguished itself. Investigators blamed the navigation system but also concluded that the pilot ordered the drone to climb too rapidly. The pilot told investigators he saw the drone as it \"leaped off the ground\" and thought to himself that \"this is not a good thing.\" , narrativelength: 469, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,523,469, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/chk2m" - } - ], - "gsx$crashid": { - "$t": "4" - }, - "gsx$mishapdate": { - "$t": "10/25/2001" - }, - "gsx$mishapyear": { - "$t": "2001" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Tyndall Air Force Base, Fla." - }, - "gsx$narrative": { - "$t": "An aerial target drone crashed 4,000 feet from the runway in a wooded area, leaving a scar in the ground 50 feet long and four feet deep. Firefighters allowed the blaze to burn for 26 hours until it extinguished itself. Investigators blamed the navigation system but also concluded that the pilot ordered the drone to climb too rapidly. The pilot told investigators he saw the drone as it \"leaped off the ground\" and thought to himself that \"this is not a good thing.\" " - }, - "gsx$narrativelength": { - "$t": "469" - }, - "gsx$dronetype": { - "$t": "QF-4E" - }, - "gsx$dronename": { - "$t": "Phantom" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$1,523,469" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ciyn3" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "5" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/3/2001, mishapyear: 2001, mishapcountry: Afghanistan, mishaplocation: eastern Afghanistan, narrative: A Predator reconnaissance drone crashed in eastern Afghanistan, marking the first drone crash in the Afghanistan war. Pentagon officials said bad weather and icing were the probable cause. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 291, dronetype: RQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ciyn3" - } - ], - "gsx$crashid": { - "$t": "5" - }, - "gsx$mishapdate": { - "$t": "11/3/2001" - }, - "gsx$mishapyear": { - "$t": "2001" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "eastern Afghanistan" - }, - "gsx$narrative": { - "$t": "A Predator reconnaissance drone crashed in eastern Afghanistan, marking the first drone crash in the Afghanistan war. Pentagon officials said bad weather and icing were the probable cause. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "291" - }, - "gsx$dronetype": { - "$t": "RQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ckd7g" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "6" - }, - "content": { - "type": "text", - "$t": "mishapdate: 12/30/2001, mishapyear: 2001, mishapcountry: United Arab Emirates, mishaplocation: about 80 miles south of al-Dhafra Air Base, narrative: A Global Hawk crashed in a desert while returning to base in the United Arab Emirates after an aborted surveillance flight over Afghanistan. Investigators concluded the cause was structural failure of the right V-tail and ruddervator. An control rod in the ruddervator failed because of metal fatigue after it came in contact with an improperly installed bolt. , narrativelength: 361, dronetype: RQ-4A, dronename: Global Hawk, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $40,600,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ckd7g" - } - ], - "gsx$crashid": { - "$t": "6" - }, - "gsx$mishapdate": { - "$t": "12/30/2001" - }, - "gsx$mishapyear": { - "$t": "2001" - }, - "gsx$mishapcountry": { - "$t": "United Arab Emirates" - }, - "gsx$mishaplocation": { - "$t": "about 80 miles south of al-Dhafra Air Base" - }, - "gsx$narrative": { - "$t": "A Global Hawk crashed in a desert while returning to base in the United Arab Emirates after an aborted surveillance flight over Afghanistan. Investigators concluded the cause was structural failure of the right V-tail and ruddervator. An control rod in the ruddervator failed because of metal fatigue after it came in contact with an improperly installed bolt. " - }, - "gsx$narrativelength": { - "$t": "361" - }, - "gsx$dronetype": { - "$t": "RQ-4A" - }, - "gsx$dronename": { - "$t": "Global Hawk" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$40,600,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/clrrx" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "7" - }, - "content": { - "type": "text", - "$t": "mishapdate: 1/22/2002, mishapyear: 2002, mishapcountry: Pakistan, mishaplocation: 9 nautical miles from end of a runway at a classified location, narrative: A Predator on a surveillance mission crashed after its engine failed and the aircraft went into an uncommanded dive. Investigators determined the cause was pilot error; the crew failed to follow proper procedures during a lost link when handing off control to another ground-control station. An investigative report states that the Predator was based at a classified location, but Pentagon officials said at the time that the drone crashed in Pakistan., narrativelength: 452, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,251,400" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/clrrx" - } - ], - "gsx$crashid": { - "$t": "7" - }, - "gsx$mishapdate": { - "$t": "1/22/2002" - }, - "gsx$mishapyear": { - "$t": "2002" - }, - "gsx$mishapcountry": { - "$t": "Pakistan" - }, - "gsx$mishaplocation": { - "$t": "9 nautical miles from end of a runway at a classified location" - }, - "gsx$narrative": { - "$t": "A Predator on a surveillance mission crashed after its engine failed and the aircraft went into an uncommanded dive. Investigators determined the cause was pilot error; the crew failed to follow proper procedures during a lost link when handing off control to another ground-control station. An investigative report states that the Predator was based at a classified location, but Pentagon officials said at the time that the drone crashed in Pakistan." - }, - "gsx$narrativelength": { - "$t": "452" - }, - "gsx$dronetype": { - "$t": "RQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,251,400" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cyevm" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "8" - }, - "content": { - "type": "text", - "$t": "mishapdate: 1/25/2002, mishapyear: 2002, mishapcountry: Pakistan, mishaplocation: a runway at an undisclosed air base, narrative: A Predator crashed during a landing attempt after returning early from a surveillance mission over Afghanistan because of fluctuating oil pressure. At the time, Pentagon officials said the drone crashed in Afghanistan, but the Air Force accident investigation report indicates the location was in Pakistan. The report states the drone flew into Afghanistan from a country with a time zone matching Pakistan's. The drone bounced on the runway and crashed near tents that housed U.S. troops. The Predator had been searching for a \"high-ranking\" enemy leader in Afghanistan, according to the report., narrativelength: 596, dronetype: RQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,142,700" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cyevm" - } - ], - "gsx$crashid": { - "$t": "8" - }, - "gsx$mishapdate": { - "$t": "1/25/2002" - }, - "gsx$mishapyear": { - "$t": "2002" - }, - "gsx$mishapcountry": { - "$t": "Pakistan" - }, - "gsx$mishaplocation": { - "$t": "a runway at an undisclosed air base" - }, - "gsx$narrative": { - "$t": "A Predator crashed during a landing attempt after returning early from a surveillance mission over Afghanistan because of fluctuating oil pressure. At the time, Pentagon officials said the drone crashed in Afghanistan, but the Air Force accident investigation report indicates the location was in Pakistan. The report states the drone flew into Afghanistan from a country with a time zone matching Pakistan's. The drone bounced on the runway and crashed near tents that housed U.S. troops. The Predator had been searching for a \"high-ranking\" enemy leader in Afghanistan, according to the report." - }, - "gsx$narrativelength": { - "$t": "596" - }, - "gsx$dronetype": { - "$t": "RQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,142,700" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cztg3" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "9" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/17/2002, mishapyear: 2002, mishapcountry: Pakistan, mishaplocation: Karim Bakhsh, a village 15 miles northeast of Jacobabad Air Base, narrative: A Predator crashed near a Pakistani village after the pilot lost control and the aircraft went into an inverted spin. The Air Force accident investigation report conceals the location, but U.S. military officials announced at the time that the site was in Pakistan. Pakistani officials said the drone had departed from the Jacobabad air base. An Air Force investigation determined the cause was the improper assembly of a control servo by the manufacturer., narrativelength: 456, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,342,700" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cztg3" - } - ], - "gsx$crashid": { - "$t": "9" - }, - "gsx$mishapdate": { - "$t": "5/17/2002" - }, - "gsx$mishapyear": { - "$t": "2002" - }, - "gsx$mishapcountry": { - "$t": "Pakistan" - }, - "gsx$mishaplocation": { - "$t": "Karim Bakhsh, a village 15 miles northeast of Jacobabad Air Base" - }, - "gsx$narrative": { - "$t": "A Predator crashed near a Pakistani village after the pilot lost control and the aircraft went into an inverted spin. The Air Force accident investigation report conceals the location, but U.S. military officials announced at the time that the site was in Pakistan. Pakistani officials said the drone had departed from the Jacobabad air base. An Air Force investigation determined the cause was the improper assembly of a control servo by the manufacturer." - }, - "gsx$narrativelength": { - "$t": "456" - }, - "gsx$dronetype": { - "$t": "RQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,342,700" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d180g" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "10" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/25/2002, mishapyear: 2002, mishapcountry: Kuwait, mishaplocation: 6 nautical miles north of Ali Al Salem Air Base, narrative: A Predator crashed while trying to return to Kuwait after a surveillance mission over southern Iraq. Air Force investigators determined the cause was a broken cylinder rocker arm, which resulted in engine failure. The drone lost its link shortly before it crashed six miles from Ali Al Salem Air Base., narrativelength: 301, dronetype: RQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,480,500" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d180g" - } - ], - "gsx$crashid": { - "$t": "10" - }, - "gsx$mishapdate": { - "$t": "5/25/2002" - }, - "gsx$mishapyear": { - "$t": "2002" - }, - "gsx$mishapcountry": { - "$t": "Kuwait" - }, - "gsx$mishaplocation": { - "$t": "6 nautical miles north of Ali Al Salem Air Base" - }, - "gsx$narrative": { - "$t": "A Predator crashed while trying to return to Kuwait after a surveillance mission over southern Iraq. Air Force investigators determined the cause was a broken cylinder rocker arm, which resulted in engine failure. The drone lost its link shortly before it crashed six miles from Ali Al Salem Air Base." - }, - "gsx$narrativelength": { - "$t": "301" - }, - "gsx$dronetype": { - "$t": "RQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$1,480,500" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d2mkx" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "11" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/10/2002, mishapyear: 2002, mishapcountry: Pakistan, narrative: A Global Hawk experienced engine failure because of fuel problems and crashed while trying to return to a base in Pakistan. Investigators determined the engine failed because a fuel nozzle was stuck in a high-flow position. The Air Force accident investigation report conceals the site of the crash, but U.S. military officials told reporters at the time that the Global Hawk was housed at the Shamsi air base in Pakistan., narrativelength: 422, dronetype: RQ-4A, dronename: Global Hawk, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $40,600,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d2mkx" - } - ], - "gsx$crashid": { - "$t": "11" - }, - "gsx$mishapdate": { - "$t": "7/10/2002" - }, - "gsx$mishapyear": { - "$t": "2002" - }, - "gsx$mishapcountry": { - "$t": "Pakistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Global Hawk experienced engine failure because of fuel problems and crashed while trying to return to a base in Pakistan. Investigators determined the engine failed because a fuel nozzle was stuck in a high-flow position. The Air Force accident investigation report conceals the site of the crash, but U.S. military officials told reporters at the time that the Global Hawk was housed at the Shamsi air base in Pakistan." - }, - "gsx$narrativelength": { - "$t": "422" - }, - "gsx$dronetype": { - "$t": "RQ-4A" - }, - "gsx$dronename": { - "$t": "Global Hawk" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$40,600,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cssly" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "12" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/17/2002, mishapyear: 2002, mishapcountry: Afghanistan, mishaplocation: about 35 km southwest of Khost, narrative: A Predator crashed in a mountainous area after the pilot unintentionally flew it through storm clouds. The drone lost its satellite links. Investigators concluded it was probably struck by lightning. Two weather forecasters and a sensor operator had warned against flying in the area, because of the risk of bad weather, but were overruled by the pilot. U.S. Army ground troops recovered part of the wreckage, but investigators suspect that Afghan residents took the remainder., narrativelength: 477, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cssly" - } - ], - "gsx$crashid": { - "$t": "12" - }, - "gsx$mishapdate": { - "$t": "9/17/2002" - }, - "gsx$mishapyear": { - "$t": "2002" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "about 35 km southwest of Khost" - }, - "gsx$narrative": { - "$t": "A Predator crashed in a mountainous area after the pilot unintentionally flew it through storm clouds. The drone lost its satellite links. Investigators concluded it was probably struck by lightning. Two weather forecasters and a sensor operator had warned against flying in the area, because of the risk of bad weather, but were overruled by the pilot. U.S. Army ground troops recovered part of the wreckage, but investigators suspect that Afghan residents took the remainder." - }, - "gsx$narrativelength": { - "$t": "477" - }, - "gsx$dronetype": { - "$t": "RQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cu76f" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "13" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/25/2002, mishapyear: 2002, mishapcountry: United States, mishaplocation: 9 nautical miles west of Indian Springs Air Force Auxiliary Field, Nev., narrative: A Predator on a training mission crashed into a Nevada mountain after the crew lost its control link. Air Force investigators blamed inattention on the part of the crew, finding that it was distracted by other tasks. \"As soon as we regained line-of-sight, of course we saw the mountain in our path,\" one crew member testified. \"We knew that at that point it was almost unrecoverable.\", narrativelength: 384, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,300,000, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cu76f" - } - ], - "gsx$crashid": { - "$t": "13" - }, - "gsx$mishapdate": { - "$t": "10/25/2002" - }, - "gsx$mishapyear": { - "$t": "2002" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "9 nautical miles west of Indian Springs Air Force Auxiliary Field, Nev." - }, - "gsx$narrative": { - "$t": "A Predator on a training mission crashed into a Nevada mountain after the crew lost its control link. Air Force investigators blamed inattention on the part of the crew, finding that it was distracted by other tasks. \"As soon as we regained line-of-sight, of course we saw the mountain in our path,\" one crew member testified. \"We knew that at that point it was almost unrecoverable.\"" - }, - "gsx$narrativelength": { - "$t": "384" - }, - "gsx$dronetype": { - "$t": "RQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,300,000" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cvlqs" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "14" - }, - "content": { - "type": "text", - "$t": "mishapdate: 1/1/2003, mishapyear: 2003, mishapcountry: Pakistan, mishaplocation: Bashir Khan Jikhrani, a village a few miles northeast of Jacobabad air base, narrative: Eight minutes after takeoff, a Predator's engine seized because of an oil leak and the aircraft crashed near a Pakistani village. Air Force investigators determined the cause was the total loss of oil and an engine fire due to poor maintenance. O-ring fragments were found lodged in the crankcase. The investigative report conceals the crash location. But Pakistani officials told reporters at the time that the Predator crashed a few miles from the Jacobabad air base., narrativelength: 469, dronetype: RQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,200,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cvlqs" - } - ], - "gsx$crashid": { - "$t": "14" - }, - "gsx$mishapdate": { - "$t": "1/1/2003" - }, - "gsx$mishapyear": { - "$t": "2003" - }, - "gsx$mishapcountry": { - "$t": "Pakistan" - }, - "gsx$mishaplocation": { - "$t": "Bashir Khan Jikhrani, a village a few miles northeast of Jacobabad air base" - }, - "gsx$narrative": { - "$t": "Eight minutes after takeoff, a Predator's engine seized because of an oil leak and the aircraft crashed near a Pakistani village. Air Force investigators determined the cause was the total loss of oil and an engine fire due to poor maintenance. O-ring fragments were found lodged in the crankcase. The investigative report conceals the crash location. But Pakistani officials told reporters at the time that the Predator crashed a few miles from the Jacobabad air base." - }, - "gsx$narrativelength": { - "$t": "469" - }, - "gsx$dronetype": { - "$t": "RQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,200,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cx0b9" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "15" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2/11/2003, mishapyear: 2003, mishapcountry: United States, mishaplocation: 16 miles southwest of Holloman Air Force Base, on the confines of White Sands National Monument, NM, narrative: An aerial target drone crashes near White Sands National Monument after an uncommanded nosedive during a live-fire missile test. Investigators blamed a \"spurious electrical input\" but could not pinpoint the cause of the problem., narrativelength: 228, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cx0b9" - } - ], - "gsx$crashid": { - "$t": "15" - }, - "gsx$mishapdate": { - "$t": "2/11/2003" - }, - "gsx$mishapyear": { - "$t": "2003" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "16 miles southwest of Holloman Air Force Base, on the confines of White Sands National Monument, NM" - }, - "gsx$narrative": { - "$t": "An aerial target drone crashes near White Sands National Monument after an uncommanded nosedive during a live-fire missile test. Investigators blamed a \"spurious electrical input\" but could not pinpoint the cause of the problem." - }, - "gsx$narrativelength": { - "$t": "228" - }, - "gsx$dronetype": { - "$t": "QF-4E" - }, - "gsx$dronename": { - "$t": "Phantom" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d9ney" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "16" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/22/2003, mishapyear: 2003, mishapcountry: United States, mishaplocation: about 13 miles northwest of Holloman Air Force Base on the confines of the White Sands Missile Range, NM, narrative: An aerial target drone was intentionally blown up in midair by its crew when it lost link shortly after takeoff. The aircraft landed in two major pieces, burning a mile apart in the White Sands Missile Range. Investigators determined the cause of the lost link was a dual failure of the command telemetry system., narrativelength: 312, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $880,000, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d9ney" - } - ], - "gsx$crashid": { - "$t": "16" - }, - "gsx$mishapdate": { - "$t": "5/22/2003" - }, - "gsx$mishapyear": { - "$t": "2003" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "about 13 miles northwest of Holloman Air Force Base on the confines of the White Sands Missile Range, NM" - }, - "gsx$narrative": { - "$t": "An aerial target drone was intentionally blown up in midair by its crew when it lost link shortly after takeoff. The aircraft landed in two major pieces, burning a mile apart in the White Sands Missile Range. Investigators determined the cause of the lost link was a dual failure of the command telemetry system." - }, - "gsx$narrativelength": { - "$t": "312" - }, - "gsx$dronetype": { - "$t": "QF-4E" - }, - "gsx$dronename": { - "$t": "Phantom" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$880,000" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/db1zf" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "17" - }, - "content": { - "type": "text", - "$t": "mishapdate: 12/11/2003, mishapyear: 2003, mishapcountry: Afghanistan, mishaplocation: in a classified location, somewhere in a desert, narrative: A Predator crashed in the Afghanistan desert after a lost link. Investigators said the inexperienced pilot misinterpreted an icing warning, disengaged the autopilot and then gave an overly aggressive command to climb, triggering the lost link. The pilot's \"inexperience with the [aircraft] was magnified by his limited experience flying without the assistance of the autopilot system,\" the report stated., narrativelength: 404, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,300,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/db1zf" - } - ], - "gsx$crashid": { - "$t": "17" - }, - "gsx$mishapdate": { - "$t": "12/11/2003" - }, - "gsx$mishapyear": { - "$t": "2003" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "in a classified location, somewhere in a desert" - }, - "gsx$narrative": { - "$t": "A Predator crashed in the Afghanistan desert after a lost link. Investigators said the inexperienced pilot misinterpreted an icing warning, disengaged the autopilot and then gave an overly aggressive command to climb, triggering the lost link. The pilot's \"inexperience with the [aircraft] was magnified by his limited experience flying without the assistance of the autopilot system,\" the report stated." - }, - "gsx$narrativelength": { - "$t": "404" - }, - "gsx$dronetype": { - "$t": "RQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,300,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dcgjs" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "18" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2004 - specific date classified, mishapyear: 2004, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dcgjs" - } - ], - "gsx$crashid": { - "$t": "18" - }, - "gsx$mishapdate": { - "$t": "2004 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2004" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "215" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ddv49" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "19" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2004 - specific date classified, mishapyear: 2004, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ddv49" - } - ], - "gsx$crashid": { - "$t": "19" - }, - "gsx$mishapdate": { - "$t": "2004 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2004" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "215" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d415a" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "20" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/10/2004, mishapyear: 2004, mishapcountry: United States, mishaplocation: Florida, narrative: An Army Hunter drone crashed into trees after it lost its link from its ground-control station, according to Army safety officials. The Army's Forces Command said it did not conduct a publicly releasable investigation., narrativelength: 218, dronetype: RQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d415a" - } - ], - "gsx$crashid": { - "$t": "20" - }, - "gsx$mishapdate": { - "$t": "5/10/2004" - }, - "gsx$mishapyear": { - "$t": "2004" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Florida" - }, - "gsx$narrative": { - "$t": "An Army Hunter drone crashed into trees after it lost its link from its ground-control station, according to Army safety officials. The Army's Forces Command said it did not conduct a publicly releasable investigation." - }, - "gsx$narrativelength": { - "$t": "218" - }, - "gsx$dronetype": { - "$t": "RQ-5A" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d5fpr" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "21" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/14/2004, mishapyear: 2004, mishapcountry: United States, mishaplocation: Indian Springs Auxiliary Field, Nev., narrative: A Predator with the call sign DEADLY01 crashed after a student pilot botched a landing exercise. Air Force investigators said that the pilot and his instructor aligned poorly for landing and that the crew did not request updated information about gusty conditions. The operations director for the 11th Reconnaissance Squadron had ordered extra training after a series of \"tail-scrape\" incidents in the weeks before. , narrativelength: 416, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,200,000, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d5fpr" - } - ], - "gsx$crashid": { - "$t": "21" - }, - "gsx$mishapdate": { - "$t": "6/14/2004" - }, - "gsx$mishapyear": { - "$t": "2004" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Indian Springs Auxiliary Field, Nev." - }, - "gsx$narrative": { - "$t": "A Predator with the call sign DEADLY01 crashed after a student pilot botched a landing exercise. Air Force investigators said that the pilot and his instructor aligned poorly for landing and that the crew did not request updated information about gusty conditions. The operations director for the 11th Reconnaissance Squadron had ordered extra training after a series of \"tail-scrape\" incidents in the weeks before. " - }, - "gsx$narrativelength": { - "$t": "416" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,200,000" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d6ua4" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "22" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/17/2004, mishapyear: 2004, mishapcountry: Iraq, mishaplocation: 10 miles north of Balad Air Base, narrative: An armed Predator burned and broke apart in midair after its engine caught fire. It was the first Class A accident involving a Predator in Iraq since the U.S.-led invastion a year earlier. Investigators determined the fire started in the engine compartment because of a poorly routed oil supply line., narrativelength: 300, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,288,000, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d6ua4" - } - ], - "gsx$crashid": { - "$t": "22" - }, - "gsx$mishapdate": { - "$t": "8/17/2004" - }, - "gsx$mishapyear": { - "$t": "2004" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "10 miles north of Balad Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator burned and broke apart in midair after its engine caught fire. It was the first Class A accident involving a Predator in Iraq since the U.S.-led invastion a year earlier. Investigators determined the fire started in the engine compartment because of a poorly routed oil supply line." - }, - "gsx$narrativelength": { - "$t": "300" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,288,000" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d88ul" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "23" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/8/2004, mishapyear: 2004, mishapcountry: United States, mishaplocation: 17 miles northwest of Holloman Air Force Base, White Sands Missile Range, NM, narrative: An aerial target drone was blown up in midflight by controllers after it departed from its planned flight path and did not respond to directions. The aircraft exploded over the White Sands Missile Range. The drone was supposed to be used as target practice for F-22 fighter jets., narrativelength: 279, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,506,500" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/d88ul" - } - ], - "gsx$crashid": { - "$t": "23" - }, - "gsx$mishapdate": { - "$t": "9/8/2004" - }, - "gsx$mishapyear": { - "$t": "2004" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "17 miles northwest of Holloman Air Force Base, White Sands Missile Range, NM" - }, - "gsx$narrative": { - "$t": "An aerial target drone was blown up in midflight by controllers after it departed from its planned flight path and did not respond to directions. The aircraft exploded over the White Sands Missile Range. The drone was supposed to be used as target practice for F-22 fighter jets." - }, - "gsx$narrativelength": { - "$t": "279" - }, - "gsx$dronetype": { - "$t": "QF-4E" - }, - "gsx$dronename": { - "$t": "Phantom" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$1,506,500" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dkvya" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "24" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/22/2004, mishapyear: 2004, mishapcountry: United States, mishaplocation: Indian Springs Auxiliary Field, Nev., narrative: A Predator experienced a hard landing and nearly skidded off the runway. Investigators said the pilot reacted poorly because he was isolated in his ground-control station and could not feel the aircraft bumping on the runway or hear the scraping sounds of damaged landing gear., narrativelength: 277, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,883,977" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dkvya" - } - ], - "gsx$crashid": { - "$t": "24" - }, - "gsx$mishapdate": { - "$t": "9/22/2004" - }, - "gsx$mishapyear": { - "$t": "2004" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Indian Springs Auxiliary Field, Nev." - }, - "gsx$narrative": { - "$t": "A Predator experienced a hard landing and nearly skidded off the runway. Investigators said the pilot reacted poorly because he was isolated in his ground-control station and could not feel the aircraft bumping on the runway or hear the scraping sounds of damaged landing gear." - }, - "gsx$narrativelength": { - "$t": "277" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$2,883,977" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dmair" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "25" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/13/2004, mishapyear: 2004, mishapcountry: United States, mishaplocation: Palmdale, Calif., narrative: A brand-new Predator crashed after it hit the runway nose-first. The front of the aircraft was sheared off. Air Force investigators blamed the student pilot but also criticized the instructor for not intervening and a contractor for not providing appropriate classroom training., narrativelength: 278, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,721,973" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dmair" - } - ], - "gsx$crashid": { - "$t": "25" - }, - "gsx$mishapdate": { - "$t": "10/13/2004" - }, - "gsx$mishapyear": { - "$t": "2004" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Palmdale, Calif." - }, - "gsx$narrative": { - "$t": "A brand-new Predator crashed after it hit the runway nose-first. The front of the aircraft was sheared off. Air Force investigators blamed the student pilot but also criticized the instructor for not intervening and a contractor for not providing appropriate classroom training." - }, - "gsx$narrativelength": { - "$t": "278" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$1,721,973" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dnp34" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "26" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/24/2004, mishapyear: 2004, mishapcountry: Pakistan, mishaplocation: in a classified location, narrative: A brand-new Predator crashed 300 feet short of the runway while attempting to land during a functional flight check. The Air Force accident investigation report classified the location of the base but reported the local time of the incident as being in the same time zone as Pakistan. Investigators blamed pilot error and found there was minimal supervision of flight operations. The pilot was a civilian contractor employed by General Atomics., narrativelength: 444, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,555,536" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dnp34" - } - ], - "gsx$crashid": { - "$t": "26" - }, - "gsx$mishapdate": { - "$t": "11/24/2004" - }, - "gsx$mishapyear": { - "$t": "2004" - }, - "gsx$mishapcountry": { - "$t": "Pakistan" - }, - "gsx$mishaplocation": { - "$t": "in a classified location" - }, - "gsx$narrative": { - "$t": "A brand-new Predator crashed 300 feet short of the runway while attempting to land during a functional flight check. The Air Force accident investigation report classified the location of the base but reported the local time of the incident as being in the same time zone as Pakistan. Investigators blamed pilot error and found there was minimal supervision of flight operations. The pilot was a civilian contractor employed by General Atomics." - }, - "gsx$narrativelength": { - "$t": "444" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,555,536" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dp3nl" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "27" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2005 - specific date classified, mishapyear: 2005, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dp3nl" - } - ], - "gsx$crashid": { - "$t": "27" - }, - "gsx$mishapdate": { - "$t": "2005 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2005" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "215" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/df9om" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "28" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2005 - specific date classified, mishapyear: 2005, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/df9om" - } - ], - "gsx$crashid": { - "$t": "28" - }, - "gsx$mishapdate": { - "$t": "2005 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2005" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "215" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dgo93" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "29" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2005 - specific date classified, mishapyear: 2005, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dgo93" - } - ], - "gsx$crashid": { - "$t": "29" - }, - "gsx$mishapdate": { - "$t": "2005 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2005" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "215" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/di2tg" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "30" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2005 - specific date classified, mishapyear: 2005, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/di2tg" - } - ], - "gsx$crashid": { - "$t": "30" - }, - "gsx$mishapdate": { - "$t": "2005 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2005" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "215" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/djhdx" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "31" - }, - "content": { - "type": "text", - "$t": "mishapdate: 1/14/2005, mishapyear: 2005, mishapcountry: Afghanistan, mishaplocation: in a location withheld by the U.S. military, narrative: A Predator crashed in Afghanistan after it lost its links to a ground-control station. The aircraft flew a programmed lost-link pattern for 12 hours but eventually ran out of fuel. The pilot, on loan from the British Royal Air Force, was \"distracted\" and bungled a reboot of the ground-control station while trying to reestablish the communications links. The U.S. Air Force investigation report found he was \"marginally prepared to fly unsupervised during an operational mission.\" The report classified the location of the base, but there are indications it was in Pakistan., narrativelength: 575, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,579,320" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/djhdx" - } - ], - "gsx$crashid": { - "$t": "31" - }, - "gsx$mishapdate": { - "$t": "1/14/2005" - }, - "gsx$mishapyear": { - "$t": "2005" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "in a location withheld by the U.S. military" - }, - "gsx$narrative": { - "$t": "A Predator crashed in Afghanistan after it lost its links to a ground-control station. The aircraft flew a programmed lost-link pattern for 12 hours but eventually ran out of fuel. The pilot, on loan from the British Royal Air Force, was \"distracted\" and bungled a reboot of the ground-control station while trying to reestablish the communications links. The U.S. Air Force investigation report found he was \"marginally prepared to fly unsupervised during an operational mission.\" The report classified the location of the base, but there are indications it was in Pakistan." - }, - "gsx$narrativelength": { - "$t": "575" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,579,320" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dw4je" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "32" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/23/2005, mishapyear: 2005, mishapcountry: Iraq, mishaplocation: west Mosul, narrative: An Army IGNAT surveillance drone was flying about 6,000 feet above ground level when it lost its data link with the ground-control station, entered an inverted spin and crashed. A Freedom of Information Act request filed in October 2013 for the Army's accident investigation report is pending. A military incident report published by WikiLeaks stated that ground troops recovered the wreckage and brought it back to Forward Operating Base Marez., narrativelength: 445, dronetype: RQ-1L, dronename: IGNAT, ownerservice: Army, ownerservicedupe: Army, damageestimate: $1,000,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dw4je" - } - ], - "gsx$crashid": { - "$t": "32" - }, - "gsx$mishapdate": { - "$t": "3/23/2005" - }, - "gsx$mishapyear": { - "$t": "2005" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "west Mosul" - }, - "gsx$narrative": { - "$t": "An Army IGNAT surveillance drone was flying about 6,000 feet above ground level when it lost its data link with the ground-control station, entered an inverted spin and crashed. A Freedom of Information Act request filed in October 2013 for the Army's accident investigation report is pending. A military incident report published by WikiLeaks stated that ground troops recovered the wreckage and brought it back to Forward Operating Base Marez." - }, - "gsx$narrativelength": { - "$t": "445" - }, - "gsx$dronetype": { - "$t": "RQ-1L" - }, - "gsx$dronename": { - "$t": "IGNAT" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "$1,000,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dxj3v" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "33" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/27/2005, mishapyear: 2005, mishapcountry: Iraq, mishaplocation: 10 miles north of Balad Air Base, narrative: An armed Predator broke apart midair after a fuel leak in the engine compartment caused a catastrophic engine fire. An investigation noted that the Predator had fuel and oil lines made of rubber instead of braided metal., narrativelength: 220, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,792,200, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dxj3v" - } - ], - "gsx$crashid": { - "$t": "33" - }, - "gsx$mishapdate": { - "$t": "3/27/2005" - }, - "gsx$mishapyear": { - "$t": "2005" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "10 miles north of Balad Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator broke apart midair after a fuel leak in the engine compartment caused a catastrophic engine fire. An investigation noted that the Predator had fuel and oil lines made of rubber instead of braided metal." - }, - "gsx$narrativelength": { - "$t": "220" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,792,200" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dyxo8" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "34" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/30/2005, mishapyear: 2005, mishapcountry: Iraq, mishaplocation: Rawah, narrative: An armed Predator lost altitude and crashed. The pilot tried to make an emergency landing on a road but said he had to turn away at the last second \"to avoid endangering persons on the ground\" after seeing a car 200 feet below. The drone and its Hellfire missiles crashed on the desert floor. Investigators determined that the pilot bearing that encases the propeller shaft failed, but they could not figure out why., narrativelength: 416, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,359,991" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dyxo8" - } - ], - "gsx$crashid": { - "$t": "34" - }, - "gsx$mishapdate": { - "$t": "3/30/2005" - }, - "gsx$mishapyear": { - "$t": "2005" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "Rawah" - }, - "gsx$narrative": { - "$t": "An armed Predator lost altitude and crashed. The pilot tried to make an emergency landing on a road but said he had to turn away at the last second \"to avoid endangering persons on the ground\" after seeing a car 200 feet below. The drone and its Hellfire missiles crashed on the desert floor. Investigators determined that the pilot bearing that encases the propeller shaft failed, but they could not figure out why." - }, - "gsx$narrativelength": { - "$t": "416" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,359,991" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e0c8p" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "35" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/8/2005, mishapyear: 2005, mishapcountry: Iraq, mishaplocation: Balad Air Base, narrative: A Predator departed a runway and was substantially damaged. The Air Force did not conduct a publicly releasable investigation., narrativelength: 126, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e0c8p" - } - ], - "gsx$crashid": { - "$t": "35" - }, - "gsx$mishapdate": { - "$t": "6/8/2005" - }, - "gsx$mishapyear": { - "$t": "2005" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "Balad Air Base" - }, - "gsx$narrative": { - "$t": "A Predator departed a runway and was substantially damaged. The Air Force did not conduct a publicly releasable investigation." - }, - "gsx$narrativelength": { - "$t": "126" - }, - "gsx$dronetype": { - "$t": "RQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dqi9q" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "36" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/29/2005, mishapyear: 2005, mishapcountry: Afghanistan, mishaplocation: Kunar province, near Pakistani border, narrative: An unarmed Predator crashed during a search for a downed helicopter in Afghanistan's Kunar province. Air Force officials later described the crash as a \"combat loss\" but withheld details about the cause. The Air Force did not conduct a publicly releasable investigation., narrativelength: 270, dronetype: RQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dqi9q" - } - ], - "gsx$crashid": { - "$t": "36" - }, - "gsx$mishapdate": { - "$t": "6/29/2005" - }, - "gsx$mishapyear": { - "$t": "2005" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "Kunar province, near Pakistani border" - }, - "gsx$narrative": { - "$t": "An unarmed Predator crashed during a search for a downed helicopter in Afghanistan's Kunar province. Air Force officials later described the crash as a \"combat loss\" but withheld details about the cause. The Air Force did not conduct a publicly releasable investigation." - }, - "gsx$narrativelength": { - "$t": "270" - }, - "gsx$dronetype": { - "$t": "RQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/drwu7" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "37" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/21/2005, mishapyear: 2005, mishapcountry: United States, mishaplocation: Palmdale, Calif., narrative: A Reaper on a training flight crashed just short of the runway. Air Force investigators concluded the cause was pilot error, finding that an instructor pilot failed to control the aircraft's glidepath, aimpoint and airspeed and was too late to execute a go-around. Investigators cited some traits about the Reaper that made it noticeably more challenging to fly consistent approaches and landings compared to the Predator. \"Given the inherent difficulties in landing any remotely piloted aircraft from a ground-control station without 'seat of the pants' and other sensory cues, these undesirable MQ-9A characteristics further complicate the approach and landing task,\" the report concluded., narrativelength: 691, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $6,796,497" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/drwu7" - } - ], - "gsx$crashid": { - "$t": "37" - }, - "gsx$mishapdate": { - "$t": "10/21/2005" - }, - "gsx$mishapyear": { - "$t": "2005" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Palmdale, Calif." - }, - "gsx$narrative": { - "$t": "A Reaper on a training flight crashed just short of the runway. Air Force investigators concluded the cause was pilot error, finding that an instructor pilot failed to control the aircraft's glidepath, aimpoint and airspeed and was too late to execute a go-around. Investigators cited some traits about the Reaper that made it noticeably more challenging to fly consistent approaches and landings compared to the Predator. \"Given the inherent difficulties in landing any remotely piloted aircraft from a ground-control station without 'seat of the pants' and other sensory cues, these undesirable MQ-9A characteristics further complicate the approach and landing task,\" the report concluded." - }, - "gsx$narrativelength": { - "$t": "691" - }, - "gsx$dronetype": { - "$t": "MQ-9A" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$6,796,497" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dtbek" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "38" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/1/2005, mishapyear: 2005, mishapcountry: United States, mishaplocation: 1.5 miles northeast of McNeal, Ariz., narrative: An Army Hunter crashed near McNeal, Ariz., after a reported engine failure during flight, according to Army safety officials. The Army Materiel Command, which owned the drone, said it did not conduct a publicly releasable investigation., narrativelength: 236, dronetype: RQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: $1,288,861" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dtbek" - } - ], - "gsx$crashid": { - "$t": "38" - }, - "gsx$mishapdate": { - "$t": "11/1/2005" - }, - "gsx$mishapyear": { - "$t": "2005" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "1.5 miles northeast of McNeal, Ariz." - }, - "gsx$narrative": { - "$t": "An Army Hunter crashed near McNeal, Ariz., after a reported engine failure during flight, according to Army safety officials. The Army Materiel Command, which owned the drone, said it did not conduct a publicly releasable investigation." - }, - "gsx$narrativelength": { - "$t": "236" - }, - "gsx$dronetype": { - "$t": "RQ-5A" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "$1,288,861" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dupz1" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "39" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2006 - specific date classified, mishapyear: 2006, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/dupz1" - } - ], - "gsx$crashid": { - "$t": "39" - }, - "gsx$mishapdate": { - "$t": "2006 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2006" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "215" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e7d2q" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "40" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2006 - specific date classified, mishapyear: 2006, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e7d2q" - } - ], - "gsx$crashid": { - "$t": "40" - }, - "gsx$mishapdate": { - "$t": "2006 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2006" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "215" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e8rn7" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "41" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2/1/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: Nevada, narrative: A Predator crashed after departure from Creech Air Force Base. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 165, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e8rn7" - } - ], - "gsx$crashid": { - "$t": "41" - }, - "gsx$mishapdate": { - "$t": "2/1/2006" - }, - "gsx$mishapyear": { - "$t": "2006" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Nevada" - }, - "gsx$narrative": { - "$t": "A Predator crashed after departure from Creech Air Force Base. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "165" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ea67k" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "42" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2/5/2006, mishapyear: 2006, mishapcountry: Iraq, narrative: An Army IGNAT surveillance drone crashed after an engine failure and burned after crashing on the ground. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 240, dronetype: RQ-1L, dronename: IGNAT, ownerservice: Army, ownerservicedupe: Army, damageestimate: $1,000,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ea67k" - } - ], - "gsx$crashid": { - "$t": "42" - }, - "gsx$mishapdate": { - "$t": "2/5/2006" - }, - "gsx$mishapyear": { - "$t": "2006" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "An Army IGNAT surveillance drone crashed after an engine failure and burned after crashing on the ground. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " - }, - "gsx$narrativelength": { - "$t": "240" - }, - "gsx$dronetype": { - "$t": "RQ-1L" - }, - "gsx$dronename": { - "$t": "IGNAT" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "$1,000,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ebks1" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "43" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/21/2006, mishapyear: 2006, mishapcountry: Iraq, mishaplocation: 34 miles west of Balad Air Base, narrative: An armed Predator crashed in a remote area after its pilot mistakenly turned off the Stability Augmentation System, causing the drone to lose its link and plummet to the ground. Air Force investigators blamed pilot error, finding that he flew too fast in responding to a request to help ground troops, kept switching commands to the aircraft and didn't ask for help when he was \"confused.\", narrativelength: 389, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,368,400, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ebks1" - } - ], - "gsx$crashid": { - "$t": "43" - }, - "gsx$mishapdate": { - "$t": "3/21/2006" - }, - "gsx$mishapyear": { - "$t": "2006" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "34 miles west of Balad Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed in a remote area after its pilot mistakenly turned off the Stability Augmentation System, causing the drone to lose its link and plummet to the ground. Air Force investigators blamed pilot error, finding that he flew too fast in responding to a request to help ground troops, kept switching commands to the aircraft and didn't ask for help when he was \"confused.\"" - }, - "gsx$narrativelength": { - "$t": "389" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,368,400" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e1qt2" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "44" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/25/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: over the ocean, 88 miles south of Tyndall Air Force Base, Fla., narrative: An aerial target drone was intentionally blown up by remote-control operators over the Gulf of Mexico after it pitched up without warning and flew out of control. The drone was the intended target of an F-15 fighter jet during a test-fire mission. About three minutes after the F-15's missile missed the drone, the aircraft \"violently pitched up without input from the controller and became unresponsive,\" according to Air Force investigators. Investigators were unable to pinpoint the cause of the malfunction because of the explosion and because the wreckage was not salvaged., narrativelength: 578, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,450,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e1qt2" - } - ], - "gsx$crashid": { - "$t": "44" - }, - "gsx$mishapdate": { - "$t": "4/25/2006" - }, - "gsx$mishapyear": { - "$t": "2006" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "over the ocean, 88 miles south of Tyndall Air Force Base, Fla." - }, - "gsx$narrative": { - "$t": "An aerial target drone was intentionally blown up by remote-control operators over the Gulf of Mexico after it pitched up without warning and flew out of control. The drone was the intended target of an F-15 fighter jet during a test-fire mission. About three minutes after the F-15's missile missed the drone, the aircraft \"violently pitched up without input from the controller and became unresponsive,\" according to Air Force investigators. Investigators were unable to pinpoint the cause of the malfunction because of the explosion and because the wreckage was not salvaged." - }, - "gsx$narrativelength": { - "$t": "578" - }, - "gsx$dronetype": { - "$t": "QF-4E" - }, - "gsx$dronename": { - "$t": "Phantom" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$2,450,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e35dj" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "45" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/1/2006, mishapyear: 2006, mishapcountry: Iraq, mishaplocation: Balad Air Base runway, narrative: An unarmed Army Hunter crashed on the runway after the lighting system failed and the controllers couldn't see through the darkness. The nose of the drone pitched down as the aircraft accelerated onto the runway, according to an Army safety investigation. A crew member testified that they couldn't see anything until the drone landed in a shower of sparks, bounced back in the air, spun around and skidded off the runway. An instructor testified that the student pilot was told to press a button to change the direction of an antenna shortly before landing but that he failed to click it properly. As a result, the antenna stayed in the wrong mode and the lights went out right as the Hunter was gliding toward landing. , narrativelength: 721, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: $2,782,012, photo: 3" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e35dj" - } - ], - "gsx$crashid": { - "$t": "45" - }, - "gsx$mishapdate": { - "$t": "6/1/2006" - }, - "gsx$mishapyear": { - "$t": "2006" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "Balad Air Base runway" - }, - "gsx$narrative": { - "$t": "An unarmed Army Hunter crashed on the runway after the lighting system failed and the controllers couldn't see through the darkness. The nose of the drone pitched down as the aircraft accelerated onto the runway, according to an Army safety investigation. A crew member testified that they couldn't see anything until the drone landed in a shower of sparks, bounced back in the air, spun around and skidded off the runway. An instructor testified that the student pilot was told to press a button to change the direction of an antenna shortly before landing but that he failed to click it properly. As a result, the antenna stayed in the wrong mode and the lights went out right as the Hunter was gliding toward landing. " - }, - "gsx$narrativelength": { - "$t": "721" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "$2,782,012" - }, - "gsx$photo": { - "$t": "3" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e4jxw" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "46" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/22/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: Arizona, narrative: An unarmed Army Hunter crashed during a training mission after failing to respond to commands, according to Army safety officials. The Army Training and Doctrine Command, which owned the aircraft, said it did not conduct a publicly releasable accident investigation., narrativelength: 266, dronetype: RQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e4jxw" - } - ], - "gsx$crashid": { - "$t": "46" - }, - "gsx$mishapdate": { - "$t": "6/22/2006" - }, - "gsx$mishapyear": { - "$t": "2006" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Arizona" - }, - "gsx$narrative": { - "$t": "An unarmed Army Hunter crashed during a training mission after failing to respond to commands, according to Army safety officials. The Army Training and Doctrine Command, which owned the aircraft, said it did not conduct a publicly releasable accident investigation." - }, - "gsx$narrativelength": { - "$t": "266" - }, - "gsx$dronetype": { - "$t": "RQ-5A" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e5yid" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "47" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/22/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: Creech Air Force Base, Nev., narrative: Five minutes after takeoff, a Predator rapidly lost engine oil and the pilot intentionally crashed it into the side of a mountain to avoid falling on military personnel. Air Force investigators concluded that the cause was a loose oil filter that was likely installed improperly. Investigators said the student pilot did the right thing by intentionally crashing into the mountainside instead of risking a collision with people on the ground., narrativelength: 442, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,700,000, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/e5yid" - } - ], - "gsx$crashid": { - "$t": "47" - }, - "gsx$mishapdate": { - "$t": "6/22/2006" - }, - "gsx$mishapyear": { - "$t": "2006" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Creech Air Force Base, Nev." - }, - "gsx$narrative": { - "$t": "Five minutes after takeoff, a Predator rapidly lost engine oil and the pilot intentionally crashed it into the side of a mountain to avoid falling on military personnel. Air Force investigators concluded that the cause was a loose oil filter that was likely installed improperly. Investigators said the student pilot did the right thing by intentionally crashing into the mountainside instead of risking a collision with people on the ground." - }, - "gsx$narrativelength": { - "$t": "442" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,700,000" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eilm2" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "48" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/3/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: Nevada, narrative: A Predator crashed on the runway after the instructor pilot botched a landing exercise. Air Force investigators determined the pilot thought he was raising the landing gear but hit the wrong switch and turned off the engine. The pilot also turned his head to talk to someone at the moment a warning message flashed on his screen. The pilot absent-mindedly pressed a button to confirm the command. The pilot tried to glide to a landing and \"exercised profoundly poor judgment by remaining fixated on a course of action that he knew was destined to fail,\" investigators wrote. The pilot was forced by his employer to resign soon after, according to the report., narrativelength: 658, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,436,765, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eilm2" - } - ], - "gsx$crashid": { - "$t": "48" - }, - "gsx$mishapdate": { - "$t": "8/3/2006" - }, - "gsx$mishapyear": { - "$t": "2006" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Nevada" - }, - "gsx$narrative": { - "$t": "A Predator crashed on the runway after the instructor pilot botched a landing exercise. Air Force investigators determined the pilot thought he was raising the landing gear but hit the wrong switch and turned off the engine. The pilot also turned his head to talk to someone at the moment a warning message flashed on his screen. The pilot absent-mindedly pressed a button to confirm the command. The pilot tried to glide to a landing and \"exercised profoundly poor judgment by remaining fixated on a course of action that he knew was destined to fail,\" investigators wrote. The pilot was forced by his employer to resign soon after, according to the report." - }, - "gsx$narrativelength": { - "$t": "658" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$1,436,765" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ek06j" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "49" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/10/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: Holloman Air Force Base, N.M., narrative: An aerial target drone crashed during takeoff. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report, but an unclassified presentation from an Air Force test and evaluation analyst said the cause was mechanical, attributing it to a \"control amplifier issue.\", narrativelength: 306, dronetype: QF-4, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ek06j" - } - ], - "gsx$crashid": { - "$t": "49" - }, - "gsx$mishapdate": { - "$t": "8/10/2006" - }, - "gsx$mishapyear": { - "$t": "2006" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Holloman Air Force Base, N.M." - }, - "gsx$narrative": { - "$t": "An aerial target drone crashed during takeoff. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report, but an unclassified presentation from an Air Force test and evaluation analyst said the cause was mechanical, attributing it to a \"control amplifier issue.\"" - }, - "gsx$narrativelength": { - "$t": "306" - }, - "gsx$dronetype": { - "$t": "QF-4" - }, - "gsx$dronename": { - "$t": "Phantom" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eleqw" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "50" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/12/2006, mishapyear: 2006, mishapcountry: United States, mishaplocation: Arizona, narrative: An Army Hunter flew out of control during an operator training exercise. A recovery parachute was deployed but it separated from the airframe, according to Army safety officials.The drone burned in a fire after the crash. The Army Training and Doctrine Command said it did not conduct a publicly releasable accident investigation., narrativelength: 330, dronetype: RQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eleqw" - } - ], - "gsx$crashid": { - "$t": "50" - }, - "gsx$mishapdate": { - "$t": "10/12/2006" - }, - "gsx$mishapyear": { - "$t": "2006" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Arizona" - }, - "gsx$narrative": { - "$t": "An Army Hunter flew out of control during an operator training exercise. A recovery parachute was deployed but it separated from the airframe, according to Army safety officials.The drone burned in a fire after the crash. The Army Training and Doctrine Command said it did not conduct a publicly releasable accident investigation." - }, - "gsx$narrativelength": { - "$t": "330" - }, - "gsx$dronetype": { - "$t": "RQ-5A" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/emtbd" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "51" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2007 - specific date classified, mishapyear: 2007, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/emtbd" - } - ], - "gsx$crashid": { - "$t": "51" - }, - "gsx$mishapdate": { - "$t": "2007 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "215" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eczce" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "52" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2007 - specific date classified, mishapyear: 2007, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eczce" - } - ], - "gsx$crashid": { - "$t": "52" - }, - "gsx$mishapdate": { - "$t": "2007 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "215" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eedwv" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "53" - }, - "content": { - "type": "text", - "$t": "mishapdate: 1/17/2007, mishapyear: 2007, mishapcountry: Iraq, mishaplocation: 5 miles southeast of Baghdad International Airport, narrative: An armed Predator crash-landed in the Iraqi desert due to an engine failure after the crankshaft failed, possibly due to a metallurgical flaw. The pilot, an Air Force major, said the crew debated whether to try to land the stricken drone at Baghdad's main airport but decided against it. Commanders ordered the crew to crash as hard as possible \"and try to leave as little left as you can\" to prevent enemy forces from seizing the Predator's missiles or classified technology. , narrativelength: 477, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,160,391" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eedwv" - } - ], - "gsx$crashid": { - "$t": "53" - }, - "gsx$mishapdate": { - "$t": "1/17/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "5 miles southeast of Baghdad International Airport" - }, - "gsx$narrative": { - "$t": "An armed Predator crash-landed in the Iraqi desert due to an engine failure after the crankshaft failed, possibly due to a metallurgical flaw. The pilot, an Air Force major, said the crew debated whether to try to land the stricken drone at Baghdad's main airport but decided against it. Commanders ordered the crew to crash as hard as possible \"and try to leave as little left as you can\" to prevent enemy forces from seizing the Predator's missiles or classified technology. " - }, - "gsx$narrativelength": { - "$t": "477" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,160,391" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/efsh8" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "54" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2/23/2007, mishapyear: 2007, mishapcountry: Afghanistan, mishaplocation: 60 miles northeast of Jalalabad, narrative: An armed Predator intentionally crashed into a mountain in Afghanistan after partial loss of engine power and propeller problems. Investigators pinpointed the cause as the failure of the variable pitch propeller mechanism, possibly because of a broken wire. The Predator had a history of similar problems with the variable pitch propeller, according to the investigative report. The Predator was 270 miles away from its base when it experienced engine trouble. The crew was ordered to crash the drone \"into tiny bits\" to prevent it from falling into enemy hands. For the same reason, the crew was directed to detonate the Hellfire missiles in a remote location before crashing the plane. As the crew prepared to shoot, it realized that it was aiming too close to a house. \"I called abort,\" the sensor operator testified. \"I didn't want to fire into the vicinity of the home.\", narrativelength: 875, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,742,655" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/efsh8" - } - ], - "gsx$crashid": { - "$t": "54" - }, - "gsx$mishapdate": { - "$t": "2/23/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "60 miles northeast of Jalalabad" - }, - "gsx$narrative": { - "$t": "An armed Predator intentionally crashed into a mountain in Afghanistan after partial loss of engine power and propeller problems. Investigators pinpointed the cause as the failure of the variable pitch propeller mechanism, possibly because of a broken wire. The Predator had a history of similar problems with the variable pitch propeller, according to the investigative report. The Predator was 270 miles away from its base when it experienced engine trouble. The crew was ordered to crash the drone \"into tiny bits\" to prevent it from falling into enemy hands. For the same reason, the crew was directed to detonate the Hellfire missiles in a remote location before crashing the plane. As the crew prepared to shoot, it realized that it was aiming too close to a house. \"I called abort,\" the sensor operator testified. \"I didn't want to fire into the vicinity of the home.\"" - }, - "gsx$narrativelength": { - "$t": "875" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,742,655" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eh71p" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "55" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/26/2007, mishapyear: 2007, mishapcountry: Afghanistan, mishaplocation: Kandahar Air Base, narrative: An armed Predator crashed and skidded off the runway after it landed nose-first and bounced in the air seven times. Investigators blamed the pilot, saying he misjudged the height above touchdown and mistakenly thought the bouncing was normal. The crew testified that they couldn't detect the first bounce at all. , narrativelength: 313, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,727,425, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eh71p" - } - ], - "gsx$crashid": { - "$t": "55" - }, - "gsx$mishapdate": { - "$t": "3/26/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "Kandahar Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed and skidded off the runway after it landed nose-first and bounced in the air seven times. Investigators blamed the pilot, saying he misjudged the height above touchdown and mistakenly thought the bouncing was normal. The crew testified that they couldn't detect the first bounce at all. " - }, - "gsx$narrativelength": { - "$t": "313" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$1,727,425" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/etu5e" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "56" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/1/2007, mishapyear: 2007, mishapcountry: Iraq, narrative: An Army Hunter crashed after engine failure. The drone was ascending when the fuel pump failed, followed by the engine, according to Army safety officials. A Freedom of Information Act request for the accident investigation report is pending. , narrativelength: 243, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/etu5e" - } - ], - "gsx$crashid": { - "$t": "56" - }, - "gsx$mishapdate": { - "$t": "4/1/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "An Army Hunter crashed after engine failure. The drone was ascending when the fuel pump failed, followed by the engine, according to Army safety officials. A Freedom of Information Act request for the accident investigation report is pending. " - }, - "gsx$narrativelength": { - "$t": "243" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ev8pv" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "57" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/21/2007, mishapyear: 2007, mishapcountry: Iraq, narrative: An Army Warrior crashed during a hard landing, according to Army safety officials, who gave no other details. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. , narrativelength: 221, dronetype: RQ-1C, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ev8pv" - } - ], - "gsx$crashid": { - "$t": "57" - }, - "gsx$mishapdate": { - "$t": "4/21/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "An Army Warrior crashed during a hard landing, according to Army safety officials, who gave no other details. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. " - }, - "gsx$narrativelength": { - "$t": "221" - }, - "gsx$dronetype": { - "$t": "RQ-1C" - }, - "gsx$dronename": { - "$t": "Warrior" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ewna8" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "58" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/4/2007, mishapyear: 2007, mishapcountry: Iraq, mishaplocation: Al-Jadidah (Baghdad state), narrative: An Army Hunter armed with Viper Strike munitions crashed after it lost link because of a power failure in the ground-control station. Power was restored, but the crew could not regain links with the drone and it crashed three hours later, according to an Army safety investigative report. Iraqi police called almost three hours later to say they had recovered the aircraft. The aircraft was \"contractor operated\" and that mission commander was a \"civilian army contractor,\" according to the report., narrativelength: 498, dronetype: MQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: $2,584,890" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ewna8" - } - ], - "gsx$crashid": { - "$t": "58" - }, - "gsx$mishapdate": { - "$t": "6/4/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "Al-Jadidah (Baghdad state)" - }, - "gsx$narrative": { - "$t": "An Army Hunter armed with Viper Strike munitions crashed after it lost link because of a power failure in the ground-control station. Power was restored, but the crew could not regain links with the drone and it crashed three hours later, according to an Army safety investigative report. Iraqi police called almost three hours later to say they had recovered the aircraft. The aircraft was \"contractor operated\" and that mission commander was a \"civilian army contractor,\" according to the report." - }, - "gsx$narrativelength": { - "$t": "498" - }, - "gsx$dronetype": { - "$t": "MQ-5A" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "$2,584,890" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ey1up" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "59" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/30/2007, mishapyear: 2007, mishapcountry: Iraq, mishaplocation: Balad Air Base runway, narrative: An armed Predator crashed about 300 feet short of the runway during an attempted emergency landing due to an overheated engine and ignition failure. The drone was returning from a 20-hour flight when it skidded on its fuselage and left wing tip, spun and crashed into airfield lights. An engineering report found that a circuit failed due to an improperly manufactured wiring connection that was not soldered as required., narrativelength: 421, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,210,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ey1up" - } - ], - "gsx$crashid": { - "$t": "59" - }, - "gsx$mishapdate": { - "$t": "7/30/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "Balad Air Base runway" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed about 300 feet short of the runway during an attempted emergency landing due to an overheated engine and ignition failure. The drone was returning from a 20-hour flight when it skidded on its fuselage and left wing tip, spun and crashed into airfield lights. An engineering report found that a circuit failed due to an improperly manufactured wiring connection that was not soldered as required." - }, - "gsx$narrativelength": { - "$t": "421" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$2,210,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eo7vq" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "60" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/31/2007, mishapyear: 2007, mishapcountry: Iraq, mishaplocation: 30 miles west of Balad Air Base, narrative: A pilot intentionally crashed an armed Predator after loss of engine power. Fighter jets were dispatched to blow up the wreckage to keep it out of enemy hands. Investigators concluded the cause was partial failure of the manifold air pressure sensor, which decreased fuel flow to the engine. The crew was flying the drone via satellite from March Air Force Base in California. \"Bottom line is the engine appeared to quit, we ran the checklist, we couldn't figure out how to get it started and the rest is history,\" the sensor operator testified. A supervisor wondered at first if the pilot had killed the engine inadvertently. \"The first thing I said, 'Is the ignition on?' Because in the Predator, the two buttons for firing the missile, the Hellfire, and shutting the engine down are directly adjacent to each other,\" the supervisor testified. \"It is not that difficult to squeeze the wrong button.\", narrativelength: 901, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,828,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/eo7vq" - } - ], - "gsx$crashid": { - "$t": "60" - }, - "gsx$mishapdate": { - "$t": "7/31/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "30 miles west of Balad Air Base" - }, - "gsx$narrative": { - "$t": "A pilot intentionally crashed an armed Predator after loss of engine power. Fighter jets were dispatched to blow up the wreckage to keep it out of enemy hands. Investigators concluded the cause was partial failure of the manifold air pressure sensor, which decreased fuel flow to the engine. The crew was flying the drone via satellite from March Air Force Base in California. \"Bottom line is the engine appeared to quit, we ran the checklist, we couldn't figure out how to get it started and the rest is history,\" the sensor operator testified. A supervisor wondered at first if the pilot had killed the engine inadvertently. \"The first thing I said, 'Is the ignition on?' Because in the Predator, the two buttons for firing the missile, the Hellfire, and shutting the engine down are directly adjacent to each other,\" the supervisor testified. \"It is not that difficult to squeeze the wrong button.\"" - }, - "gsx$narrativelength": { - "$t": "901" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,828,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/epmg7" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "61" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/29/2007, mishapyear: 2007, mishapcountry: Iraq, narrative: An Army Hunter crashed in Iraq after one of its engines lost power. The drone was on a surveillance mission at an altitude of 5,000 feet when a fuel pump warning light came on and the aft engine lost power, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. , narrativelength: 354, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/epmg7" - } - ], - "gsx$crashid": { - "$t": "61" - }, - "gsx$mishapdate": { - "$t": "8/29/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "An Army Hunter crashed in Iraq after one of its engines lost power. The drone was on a surveillance mission at an altitude of 5,000 feet when a fuel pump warning light came on and the aft engine lost power, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. " - }, - "gsx$narrativelength": { - "$t": "354" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/er10k" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "62" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/4/2007, mishapyear: 2007, mishapcountry: United States, mishaplocation: Nevada, narrative: The Air Force withheld information about the circumstances of this Reaper crash. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 192, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/er10k" - } - ], - "gsx$crashid": { - "$t": "62" - }, - "gsx$mishapdate": { - "$t": "9/4/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Nevada" - }, - "gsx$narrative": { - "$t": "The Air Force withheld information about the circumstances of this Reaper crash. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "192" - }, - "gsx$dronetype": { - "$t": "MQ-9A" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/esfl1" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "63" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/20/2007, mishapyear: 2007, mishapcountry: Iraq, narrative: An Army Hunter crashed shortly after takeoff when its left wing fell off. The drone was on a maintenance test flight and had reached an altitude of 2,000 feet when the operator leveled the aircraft and waited for the proper airspeed before rolling left, according to an Army safety investigative report. Instead, the left wing fell off. The crew tried to deploy the aircraft's parachute but the aircraft already was out of control and too close to the ground. The heavily redacted accident report does not specify a cause for the accident., narrativelength: 539, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/esfl1" - } - ], - "gsx$crashid": { - "$t": "63" - }, - "gsx$mishapdate": { - "$t": "11/20/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "An Army Hunter crashed shortly after takeoff when its left wing fell off. The drone was on a maintenance test flight and had reached an altitude of 2,000 feet when the operator leveled the aircraft and waited for the proper airspeed before rolling left, according to an Army safety investigative report. Instead, the left wing fell off. The crew tried to deploy the aircraft's parachute but the aircraft already was out of control and too close to the ground. The heavily redacted accident report does not specify a cause for the accident." - }, - "gsx$narrativelength": { - "$t": "539" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a59y2" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "64" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/29/2007, mishapyear: 2007, mishapcountry: Iraq, mishaplocation: 37 nautical miles northwest of Ali Air Base, narrative: An armed Predator with the callsign Overlord 04 crashed in an uninhabited area after it pitched steeply up, then jerked nose-down and went into a rapid spin. Fighter jets blew up the wreckage to keep it out of enemy hands. Investigators were unable to pinpoint why the RS-422 receiver on the right tail computer board failed because the wreckage was destroyed. Crew members complained to investigators about frequent problems with their Predator fleet. \"We've had link problems as well,\" the mission coordinator testified. \"I don't want to be the one that crashes a plane, but I hope that this causes folks, and when I say folks, I mean GA [General Atomics], I hope we hold them accountable for some of this stuff,\" an instructor pilot added. \"We know we are flying with some defective stuff.\", narrativelength: 793, dronetype: MQ-1L, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,828,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a59y2" - } - ], - "gsx$crashid": { - "$t": "64" - }, - "gsx$mishapdate": { - "$t": "11/29/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "37 nautical miles northwest of Ali Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator with the callsign Overlord 04 crashed in an uninhabited area after it pitched steeply up, then jerked nose-down and went into a rapid spin. Fighter jets blew up the wreckage to keep it out of enemy hands. Investigators were unable to pinpoint why the RS-422 receiver on the right tail computer board failed because the wreckage was destroyed. Crew members complained to investigators about frequent problems with their Predator fleet. \"We've had link problems as well,\" the mission coordinator testified. \"I don't want to be the one that crashes a plane, but I hope that this causes folks, and when I say folks, I mean GA [General Atomics], I hope we hold them accountable for some of this stuff,\" an instructor pilot added. \"We know we are flying with some defective stuff.\"" - }, - "gsx$narrativelength": { - "$t": "793" - }, - "gsx$dronetype": { - "$t": "MQ-1L" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,828,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a6oij" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "65" - }, - "content": { - "type": "text", - "$t": "mishapdate: 12/7/2007, mishapyear: 2007, mishapcountry: Iraq, narrative: An Army Hunter drone lost its video link during a surveillance mission and was destroyed when it hit the ground, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. , narrativelength: 260, dronetype: MQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a6oij" - } - ], - "gsx$crashid": { - "$t": "65" - }, - "gsx$mishapdate": { - "$t": "12/7/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "An Army Hunter drone lost its video link during a surveillance mission and was destroyed when it hit the ground, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. " - }, - "gsx$narrativelength": { - "$t": "260" - }, - "gsx$dronetype": { - "$t": "MQ-5A" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a832w" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "66" - }, - "content": { - "type": "text", - "$t": "mishapdate: 12/17/2007, mishapyear: 2007, mishapcountry: Iraq, mishaplocation: 30 nautical miles northeast of Balad Air Base (near al-Muqdadiya), narrative: An armed Predator broke apart midair and crashed in hostile territory. About 6.5 hours into flight, the aircraft suddenly lost its satellite links and failed to follow its preprogrammed lost link route. Air Force investigators blamed a major power failure in the alternators, which they suspected was likely triggered by a short circuit. A military incident report published by WikiLeaks stated that small pieces of wreckage were found near an Iraqi schoolhouse. Investigators found no evidence that the Predator had been shot down by enemy forces., narrativelength: 548, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,849,481" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a832w" - } - ], - "gsx$crashid": { - "$t": "66" - }, - "gsx$mishapdate": { - "$t": "12/17/2007" - }, - "gsx$mishapyear": { - "$t": "2007" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "30 nautical miles northeast of Balad Air Base (near al-Muqdadiya)" - }, - "gsx$narrative": { - "$t": "An armed Predator broke apart midair and crashed in hostile territory. About 6.5 hours into flight, the aircraft suddenly lost its satellite links and failed to follow its preprogrammed lost link route. Air Force investigators blamed a major power failure in the alternators, which they suspected was likely triggered by a short circuit. A military incident report published by WikiLeaks stated that small pieces of wreckage were found near an Iraqi schoolhouse. Investigators found no evidence that the Predator had been shot down by enemy forces." - }, - "gsx$narrativelength": { - "$t": "548" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,849,481" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a9hnd" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "67" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2008 - specific date classified, mishapyear: 2008, mishapcountry: Classified, narrative: The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 215, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a9hnd" - } - ], - "gsx$crashid": { - "$t": "67" - }, - "gsx$mishapdate": { - "$t": "2008 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "215" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/9znoe" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "68" - }, - "content": { - "type": "text", - "$t": "mishapdate: 1/23/2008, mishapyear: 2008, mishapcountry: Classified, narrative: The Air Force confirmed the date of this Reaper accident but classified information about where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 222, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/9znoe" - } - ], - "gsx$crashid": { - "$t": "68" - }, - "gsx$mishapdate": { - "$t": "1/23/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force confirmed the date of this Reaper accident but classified information about where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "222" - }, - "gsx$dronetype": { - "$t": "MQ-9A" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a128v" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "69" - }, - "content": { - "type": "text", - "$t": "mishapdate: 1/28/2008, mishapyear: 2008, mishapcountry: Afghanistan, narrative: An Army Warrior flew off and was never located after it lost link during flight. Attempts to restart the links were unsuccessful, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. , narrativelength: 277, dronetype: RQ-1C, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a128v" - } - ], - "gsx$crashid": { - "$t": "69" - }, - "gsx$mishapdate": { - "$t": "1/28/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "An Army Warrior flew off and was never located after it lost link during flight. Attempts to restart the links were unsuccessful, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. " - }, - "gsx$narrativelength": { - "$t": "277" - }, - "gsx$dronetype": { - "$t": "RQ-1C" - }, - "gsx$dronename": { - "$t": "Warrior" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a2gt8" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "70" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/11/2008, mishapyear: 2008, mishapcountry: Iraq, narrative: An Army Hunter crashed short of the runway in rough terrain. The controller lost visual contact with the aircraft during the descent in hazy conditions, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending., narrativelength: 299, dronetype: MQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a2gt8" - } - ], - "gsx$crashid": { - "$t": "70" - }, - "gsx$mishapdate": { - "$t": "3/11/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "An Army Hunter crashed short of the runway in rough terrain. The controller lost visual contact with the aircraft during the descent in hazy conditions, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending." - }, - "gsx$narrativelength": { - "$t": "299" - }, - "gsx$dronetype": { - "$t": "MQ-5A" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a3vdp" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "71" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/22/2008, mishapyear: 2008, mishapcountry: Afghanistan, narrative: An Army IGNAT crashed after a lost link incident. The aircraft was cruising at an altitude of 14,000 feet when controllers lost the communication link with the aircraft. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 304, dronetype: RQ-1L, dronename: IGNAT, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/a3vdp" - } - ], - "gsx$crashid": { - "$t": "71" - }, - "gsx$mishapdate": { - "$t": "3/22/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "An Army IGNAT crashed after a lost link incident. The aircraft was cruising at an altitude of 14,000 feet when controllers lost the communication link with the aircraft. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " - }, - "gsx$narrativelength": { - "$t": "304" - }, - "gsx$dronetype": { - "$t": "RQ-1L" - }, - "gsx$dronename": { - "$t": "IGNAT" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/agihe" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "72" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/9/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: in a classified location, somewhere in the vicinity of Tikrit, narrative: An armed Predator was intentionally flown into the ground after engine failure. According to the crew, the engine stopped working and would only run at idle speed, so it rotated nose-down and starting falling from the sky. As the drone fell to an altitude of 3,000 feet, the pilot was ordered to fire the Hellfire missile into a sparsely populated area; he testified that he couldn't see exactly where it blew up. \"Normally when aircraft loss is probable and we are far away from our primary airfield the normal guidance is to go ahead and crash the plane into as many bits, as many small pieces as possible,\" a crew member testified. Ground forces later blew up much of the wreckage with C-4 explosives but recovered a few parts. Investigators concluded that the engine failed because something malfunctioned in the throttle body assembly, restricting air intake, but could not pinpoint the broken part., narrativelength: 904, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $5,000,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/agihe" - } - ], - "gsx$crashid": { - "$t": "72" - }, - "gsx$mishapdate": { - "$t": "4/9/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "in a classified location, somewhere in the vicinity of Tikrit" - }, - "gsx$narrative": { - "$t": "An armed Predator was intentionally flown into the ground after engine failure. According to the crew, the engine stopped working and would only run at idle speed, so it rotated nose-down and starting falling from the sky. As the drone fell to an altitude of 3,000 feet, the pilot was ordered to fire the Hellfire missile into a sparsely populated area; he testified that he couldn't see exactly where it blew up. \"Normally when aircraft loss is probable and we are far away from our primary airfield the normal guidance is to go ahead and crash the plane into as many bits, as many small pieces as possible,\" a crew member testified. Ground forces later blew up much of the wreckage with C-4 explosives but recovered a few parts. Investigators concluded that the engine failed because something malfunctioned in the throttle body assembly, restricting air intake, but could not pinpoint the broken part." - }, - "gsx$narrativelength": { - "$t": "904" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$5,000,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ahx1v" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "73" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/2/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: 45 nautical miles east of Ali Air Base, narrative: An armed Predator crashed after the engine sputtered repeatedly while returning to base. Investigators said the cause was a failure of the ignition module, which reduced engine speed and resulted in lost links. The aircraft had been on a 19-hour mission when the engine failed. The crew was able to restart it once, but it only ran for 15 seconds before conking out for good., narrativelength: 375, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,828,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ahx1v" - } - ], - "gsx$crashid": { - "$t": "73" - }, - "gsx$mishapdate": { - "$t": "5/2/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "45 nautical miles east of Ali Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed after the engine sputtered repeatedly while returning to base. Investigators said the cause was a failure of the ignition module, which reduced engine speed and resulted in lost links. The aircraft had been on a 19-hour mission when the engine failed. The crew was able to restart it once, but it only ran for 15 seconds before conking out for good." - }, - "gsx$narrativelength": { - "$t": "375" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,828,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ajbm8" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "74" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/7/2008, mishapyear: 2008, mishapcountry: United States, mishaplocation: Arizona, narrative: A Hunter drifted off course during student training and crashed into hilly terrain, according to Army safety officials. The Army Training and Doctrine Command said it did not conduct a publicly releasable accident investigation., narrativelength: 228, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ajbm8" - } - ], - "gsx$crashid": { - "$t": "74" - }, - "gsx$mishapdate": { - "$t": "5/7/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Arizona" - }, - "gsx$narrative": { - "$t": "A Hunter drifted off course during student training and crashed into hilly terrain, according to Army safety officials. The Army Training and Doctrine Command said it did not conduct a publicly releasable accident investigation." - }, - "gsx$narrativelength": { - "$t": "228" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/akq6p" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "75" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/12/2008, mishapyear: 2008, mishapcountry: Classified, mishaplocation: Southwest Asia, narrative: The Air Force confirmed the date of this Reaper accident and said it occurred in Southwest Asia, which usually refers to a country in the Persian Gulf, but it classified the exact location and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 303, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/akq6p" - } - ], - "gsx$crashid": { - "$t": "75" - }, - "gsx$mishapdate": { - "$t": "5/12/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "Southwest Asia" - }, - "gsx$narrative": { - "$t": "The Air Force confirmed the date of this Reaper accident and said it occurred in Southwest Asia, which usually refers to a country in the Persian Gulf, but it classified the exact location and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "303" - }, - "gsx$dronetype": { - "$t": "MQ-9A" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/aaw7q" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "76" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/2/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: About 1 mile northwest of Balad Air Base, narrative: An armed Predator crashed about 11 minutes after takeoff after it lost electrical power and its control links. Air traffic control at Balad Air Base lost track of the aircraft on radar; it was later found about a mile from the base. Air Force investigators attributed the cause to an alternator failure. The broken alternator triggered a failure in the primary control module, including the flight control computer., narrativelength: 415, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,050,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/aaw7q" - } - ], - "gsx$crashid": { - "$t": "76" - }, - "gsx$mishapdate": { - "$t": "6/2/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "About 1 mile northwest of Balad Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed about 11 minutes after takeoff after it lost electrical power and its control links. Air traffic control at Balad Air Base lost track of the aircraft on radar; it was later found about a mile from the base. Air Force investigators attributed the cause to an alternator failure. The broken alternator triggered a failure in the primary control module, including the flight control computer." - }, - "gsx$narrativelength": { - "$t": "415" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,050,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/acas7" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "77" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/13/2008, mishapyear: 2008, mishapcountry: Afghanistan, mishaplocation: 6 miles south/southwest of Kandahar Air Base, narrative: An armed Predator crashed in an unpopulated area. About 10 minutes after takeoff, the drone began moving erratically and finally out of control. As the crash happened, the pilot radioed the Kandahar air-traffic control tower and reported, \"No souls on board. It's a UAV so it shouldn't be a big deal.\" Investigators determined the cause was mechanical: the faulty connection of a cable to the primary control module. The manufacturer, General Atomics, suggested that poor maintenance was to blame, but investigators said there was not enough evidence to rule that in or out. Crew members complained about recurring mechanical problems. The doomed aircraft \"always kind of seemed to have a, we like to call them demons I guess,\" a staff sergeant testified. \"It's just one of those planes that seem to be broke a lot. We would always fix it and it seemed problems would go away and then come back.\", narrativelength: 896, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,849,481, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/acas7" - } - ], - "gsx$crashid": { - "$t": "77" - }, - "gsx$mishapdate": { - "$t": "6/13/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "6 miles south/southwest of Kandahar Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed in an unpopulated area. About 10 minutes after takeoff, the drone began moving erratically and finally out of control. As the crash happened, the pilot radioed the Kandahar air-traffic control tower and reported, \"No souls on board. It's a UAV so it shouldn't be a big deal.\" Investigators determined the cause was mechanical: the faulty connection of a cable to the primary control module. The manufacturer, General Atomics, suggested that poor maintenance was to blame, but investigators said there was not enough evidence to rule that in or out. Crew members complained about recurring mechanical problems. The doomed aircraft \"always kind of seemed to have a, we like to call them demons I guess,\" a staff sergeant testified. \"It's just one of those planes that seem to be broke a lot. We would always fix it and it seemed problems would go away and then come back.\"" - }, - "gsx$narrativelength": { - "$t": "896" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,849,481" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/adpck" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "78" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/11/2008, mishapyear: 2008, mishapcountry: Iraq, narrative: A Hunter crashed after an engine failed while about 800 feet above the ground. A recovery parachute was deployed, but the aircraft was too close to the ground, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 330, dronetype: MQ-5A, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/adpck" - } - ], - "gsx$crashid": { - "$t": "78" - }, - "gsx$mishapdate": { - "$t": "7/11/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Hunter crashed after an engine failed while about 800 feet above the ground. A recovery parachute was deployed, but the aircraft was too close to the ground, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " - }, - "gsx$narrativelength": { - "$t": "330" - }, - "gsx$dronetype": { - "$t": "MQ-5A" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/af3x1" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "79" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/13/2008, mishapyear: 2008, mishapcountry: Iraq, narrative: An Army Warrior crashed after the operator ordered a rapid descent and the aircraft's nose pitched down. The drone went into an uncontrolled spiral, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 319, dronetype: RQ-1C, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/af3x1" - } - ], - "gsx$crashid": { - "$t": "79" - }, - "gsx$mishapdate": { - "$t": "7/13/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "An Army Warrior crashed after the operator ordered a rapid descent and the aircraft's nose pitched down. The drone went into an uncontrolled spiral, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " - }, - "gsx$narrativelength": { - "$t": "319" - }, - "gsx$dronetype": { - "$t": "RQ-1C" - }, - "gsx$dronename": { - "$t": "Warrior" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/arr0q" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "80" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/21/2008, mishapyear: 2008, mishapcountry: Afghanistan, mishaplocation: about 100 nautical miles northeast of Kandahar Airfield, narrative: An armed Predator presumably crashed after it lost link and disappeared while flying over Afghanistan during a power loss to the ground-control station at Cannon Air Force Base in New Mexico. Two other Predators flying in Afghanistan lost their links at the same time because of the power failure. The crew regained power and was able to regain link to those two drones. The Predator that disappeared was preprogrammed to return to base in the event of a lost link but for some reason did not. Investigators speculated that it flew into hazardous weather and crashed. It has not been found., narrativelength: 590, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,849,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/arr0q" - } - ], - "gsx$crashid": { - "$t": "80" - }, - "gsx$mishapdate": { - "$t": "7/21/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "about 100 nautical miles northeast of Kandahar Airfield" - }, - "gsx$narrative": { - "$t": "An armed Predator presumably crashed after it lost link and disappeared while flying over Afghanistan during a power loss to the ground-control station at Cannon Air Force Base in New Mexico. Two other Predators flying in Afghanistan lost their links at the same time because of the power failure. The crew regained power and was able to regain link to those two drones. The Predator that disappeared was preprogrammed to return to base in the event of a lost link but for some reason did not. Investigators speculated that it flew into hazardous weather and crashed. It has not been found." - }, - "gsx$narrativelength": { - "$t": "590" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,849,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/at5l7" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "81" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/1/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: about five miles from Balad Air Base, narrative: An armed Predator crashed in a grove of palm trees, about 150 yards from a house. About 10 minutes after takeoff, the aircraft's electrical system went haywire and it lost link. Investigators determined a short circuit, probably in one of the alternators, likely caused the electrical problem. The Predator was burned in the post-wreckage fire. A crew member testified that the two Hellfire missiles either detonated when the aircraft crashed or else \"cooked off\" during the fire. According to the pilot, extremely hot daytime temperatures in Iraq limited when drones could take off or land. The pilot testified that high temperatures \"can cause issues with the electronics of the aircraft.\", narrativelength: 691, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,013,000, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/at5l7" - } - ], - "gsx$crashid": { - "$t": "81" - }, - "gsx$mishapdate": { - "$t": "8/1/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "about five miles from Balad Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed in a grove of palm trees, about 150 yards from a house. About 10 minutes after takeoff, the aircraft's electrical system went haywire and it lost link. Investigators determined a short circuit, probably in one of the alternators, likely caused the electrical problem. The Predator was burned in the post-wreckage fire. A crew member testified that the two Hellfire missiles either detonated when the aircraft crashed or else \"cooked off\" during the fire. According to the pilot, extremely hot daytime temperatures in Iraq limited when drones could take off or land. The pilot testified that high temperatures \"can cause issues with the electronics of the aircraft.\"" - }, - "gsx$narrativelength": { - "$t": "691" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,013,000" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/auk5k" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "82" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/8/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: Ali Air Base, narrative: A Predator ran off the runway during landing and was substantially damaged, according to Air Combat Command. Rainy weather and crosswinds may have played a role. Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 269, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/auk5k" - } - ], - "gsx$crashid": { - "$t": "82" - }, - "gsx$mishapdate": { - "$t": "9/8/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "Ali Air Base" - }, - "gsx$narrative": { - "$t": "A Predator ran off the runway during landing and was substantially damaged, according to Air Combat Command. Rainy weather and crosswinds may have played a role. Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "269" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/avyq1" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "83" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/9/2008, mishapyear: 2008, mishapcountry: United States, mishaplocation: California, narrative: The Air Force withheld information about the circumstances of this Reaper crash. The Air Force Materiel Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 200, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/avyq1" - } - ], - "gsx$crashid": { - "$t": "83" - }, - "gsx$mishapdate": { - "$t": "9/9/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "California" - }, - "gsx$narrative": { - "$t": "The Air Force withheld information about the circumstances of this Reaper crash. The Air Force Materiel Command did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "200" - }, - "gsx$dronetype": { - "$t": "MQ-9A" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/am4r2" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "84" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/19/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: about 1.5 miles from Ali Air Base, narrative: An armed Predator crashed about 1.5 miles short of the runway after a propeller shaft malfunction. The aircraft had been on a 20-hour mission when it suddenly pitched up and down, lost link and struck the ground. Investigators determined the cause was a failure of the propeller quill shaft bearing. They also found that the tool used by maintenance personnel to install the bearing had been worn and used improperly., narrativelength: 417, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,738,515, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/am4r2" - } - ], - "gsx$crashid": { - "$t": "84" - }, - "gsx$mishapdate": { - "$t": "10/19/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "about 1.5 miles from Ali Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed about 1.5 miles short of the runway after a propeller shaft malfunction. The aircraft had been on a 20-hour mission when it suddenly pitched up and down, lost link and struck the ground. Investigators determined the cause was a failure of the propeller quill shaft bearing. They also found that the tool used by maintenance personnel to install the bearing had been worn and used improperly." - }, - "gsx$narrativelength": { - "$t": "417" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,738,515" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/anjbj" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "85" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/2/2008, mishapyear: 2008, mishapcountry: Afghanistan, mishaplocation: Kandahar Air Base, narrative: An armed Predator crashed into a ditch on base shortly after taking off into a stiff headwind. Investigators were unable to pinpoint a precise cause but concluded that factors included lopsided weight on the Predator because of its single Hellfire missile, wind gusts and an overly aggressive left turn by the pilot. The pilot overshot the intended course and tried to avoid entering a no-fly area over the base. \"As the plane was going down, all I saw were tents, and I was afraid that I had killed someone,\" testified the pilot, Maj. Richard Wageman. \"I felt numb, and I am certain that a few cuss words came out of my mouth.\" No one was injured. Wageman testified that it was his first Predator deployment and that \"it has been difficult\" to adjust to flying drones after his previous career as an F-16 pilot., narrativelength: 812, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,670,000, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/anjbj" - } - ], - "gsx$crashid": { - "$t": "85" - }, - "gsx$mishapdate": { - "$t": "11/2/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "Kandahar Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed into a ditch on base shortly after taking off into a stiff headwind. Investigators were unable to pinpoint a precise cause but concluded that factors included lopsided weight on the Predator because of its single Hellfire missile, wind gusts and an overly aggressive left turn by the pilot. The pilot overshot the intended course and tried to avoid entering a no-fly area over the base. \"As the plane was going down, all I saw were tents, and I was afraid that I had killed someone,\" testified the pilot, Maj. Richard Wageman. \"I felt numb, and I am certain that a few cuss words came out of my mouth.\" No one was injured. Wageman testified that it was his first Predator deployment and that \"it has been difficult\" to adjust to flying drones after his previous career as an F-16 pilot." - }, - "gsx$narrativelength": { - "$t": "812" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,670,000" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/aoxvw" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "86" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/17/2008, mishapyear: 2008, mishapcountry: United States, mishaplocation: California, narrative: A Warrior crashed after it lost link with its ground-control station. The aircraft was on a training mission operated by contractors, according to Army safety officials. The Army said it did not conduct a publicly releasable accident investigation., narrativelength: 248, dronetype: MQ-1C, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/aoxvw" - } - ], - "gsx$crashid": { - "$t": "86" - }, - "gsx$mishapdate": { - "$t": "11/17/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "California" - }, - "gsx$narrative": { - "$t": "A Warrior crashed after it lost link with its ground-control station. The aircraft was on a training mission operated by contractors, according to Army safety officials. The Army said it did not conduct a publicly releasable accident investigation." - }, - "gsx$narrativelength": { - "$t": "248" - }, - "gsx$dronetype": { - "$t": "MQ-1C" - }, - "gsx$dronename": { - "$t": "Warrior" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/aqcgd" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "87" - }, - "content": { - "type": "text", - "$t": "mishapdate: 12/4/2008, mishapyear: 2008, mishapcountry: Iraq, mishaplocation: Balad Air Base runway, narrative: The Air Force withheld information about the circumstances of this crash. A military incident report given to WikiLeaks said the Predator crashed at 7:30 a.m. on the runway at Balad Air Base and that its Hellfire missile came loose. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report. , narrativelength: 345, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/aqcgd" - } - ], - "gsx$crashid": { - "$t": "87" - }, - "gsx$mishapdate": { - "$t": "12/4/2008" - }, - "gsx$mishapyear": { - "$t": "2008" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "Balad Air Base runway" - }, - "gsx$narrative": { - "$t": "The Air Force withheld information about the circumstances of this crash. A military incident report given to WikiLeaks said the Predator crashed at 7:30 a.m. on the runway at Balad Air Base and that its Hellfire missile came loose. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report. " - }, - "gsx$narrativelength": { - "$t": "345" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b2zk2" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "88" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2009 - specific date classified, mishapyear: 2009, mishapcountry: Classified, narrative: The Air Force classified the date of this Reaper accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 214, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b2zk2" - } - ], - "gsx$crashid": { - "$t": "88" - }, - "gsx$mishapdate": { - "$t": "2009 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the date of this Reaper accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "214" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b4e4j" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "89" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2/8/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: in a classified location in southern Afghanistan, narrative: The Air Force Special Operations Command said a Predator crashed in a classified location in southern Afghanistan after a suspected engine failure. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 250, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: unknown" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b4e4j" - } - ], - "gsx$crashid": { - "$t": "89" - }, - "gsx$mishapdate": { - "$t": "2/8/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "in a classified location in southern Afghanistan" - }, - "gsx$narrative": { - "$t": "The Air Force Special Operations Command said a Predator crashed in a classified location in southern Afghanistan after a suspected engine failure. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "250" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "unknown" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b5sow" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "90" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2/22/2009, mishapyear: 2009, mishapcountry: Iraq, mishaplocation: in a classified location, south of Khaniqin, narrative: An armed Predator crashed after losing link and going into an unrecoverable spin. The aircraft began experiencing electrical problems and went into \"self-termination mode,\" shutting down its engine and going into a stall, according to an Air Force investigation. The report concluded the electrical failure occurred within the primary control module, probably in a power converter or the flight computer board. The same drone had reported a lost-link malfunction two days earlier but recovered. Investigators concluded that the two lost links were unrelated., narrativelength: 558, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,456,200, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b5sow" - } - ], - "gsx$crashid": { - "$t": "90" - }, - "gsx$mishapdate": { - "$t": "2/22/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "in a classified location, south of Khaniqin" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed after losing link and going into an unrecoverable spin. The aircraft began experiencing electrical problems and went into \"self-termination mode,\" shutting down its engine and going into a stall, according to an Air Force investigation. The report concluded the electrical failure occurred within the primary control module, probably in a power converter or the flight computer board. The same drone had reported a lost-link malfunction two days earlier but recovered. Investigators concluded that the two lost links were unrelated." - }, - "gsx$narrativelength": { - "$t": "558" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,456,200" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b779d" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "91" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/20/2009, mishapyear: 2009, mishapcountry: United States, mishaplocation: National Training Center complex, Fort Irwin, Calif., 20 nautical miles north of Bicycle Lake Army Air Field, Calif., narrative: A Reaper crashed during an emergency landing in the desert after an engine failure and loss of oil pressure. Air Force investigators attributed the cause to an oil system temperature control valve that was improperly assembled during manufacturing. General Atomics reported that a similar incident occurred a month earlier, when a Reaper lost oil pressure and was slightly damaged during an emergency landing. General Atomics determined that the valve sliders had been installed upside down by the supplier, a Houston firm. According to the Air Force report, the valves were not of aerospace grade and were not intended for use in the aircraft., narrativelength: 644, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,929,647, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b779d" - } - ], - "gsx$crashid": { - "$t": "91" - }, - "gsx$mishapdate": { - "$t": "3/20/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "National Training Center complex, Fort Irwin, Calif., 20 nautical miles north of Bicycle Lake Army Air Field, Calif." - }, - "gsx$narrative": { - "$t": "A Reaper crashed during an emergency landing in the desert after an engine failure and loss of oil pressure. Air Force investigators attributed the cause to an oil system temperature control valve that was improperly assembled during manufacturing. General Atomics reported that a similar incident occurred a month earlier, when a Reaper lost oil pressure and was slightly damaged during an emergency landing. General Atomics determined that the valve sliders had been installed upside down by the supplier, a Houston firm. According to the Air Force report, the valves were not of aerospace grade and were not intended for use in the aircraft." - }, - "gsx$narrativelength": { - "$t": "644" - }, - "gsx$dronetype": { - "$t": "MQ-9A" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,929,647" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/axdae" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "92" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/10/2009, mishapyear: 2009, mishapcountry: United States, mishaplocation: Wright Army Airfield, Hinesville, Ga., narrative: A Hunter crashed after it lost link during a training mission, according to Army safety officials. Army Intelligence and Security Command said it did not conduct a publicly releasable accident investigation., narrativelength: 207, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: $2,265,299, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/axdae" - } - ], - "gsx$crashid": { - "$t": "92" - }, - "gsx$mishapdate": { - "$t": "4/10/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Wright Army Airfield, Hinesville, Ga." - }, - "gsx$narrative": { - "$t": "A Hunter crashed after it lost link during a training mission, according to Army safety officials. Army Intelligence and Security Command said it did not conduct a publicly releasable accident investigation." - }, - "gsx$narrativelength": { - "$t": "207" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "$2,265,299" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ayruv" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "93" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/20/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: 90 nautical miles south of Kabul Air Base, near Sinkay village, narrative: An armed Predator disappeared after losing its data links, and its transponder stopped working nine hours into flight. Airborne searchers found the wreckage the next day near the Afghan village of Sinkay. Investigators said the cause was a catastrophic electrical system failure, most likely because of a short circuit. Only a complete electrical failure could account for a lost link, the loss of the transponder signal and the inability of the aircraft to perform its preprogrammed lost-link emergency mission, according to the report. The pilot testified that lost links are not uncommon with Predators but usually only last for a few seconds or minutes. \"After doing this for a while, you sort of see this; it's a reoccurring thing,\" he testified. \"I'd say after the 3- to 5-minute period you sort of get the feeling that the plane just stopped talking to us and we may not recover this one.\", narrativelength: 896, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,700,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ayruv" - } - ], - "gsx$crashid": { - "$t": "93" - }, - "gsx$mishapdate": { - "$t": "4/20/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "90 nautical miles south of Kabul Air Base, near Sinkay village" - }, - "gsx$narrative": { - "$t": "An armed Predator disappeared after losing its data links, and its transponder stopped working nine hours into flight. Airborne searchers found the wreckage the next day near the Afghan village of Sinkay. Investigators said the cause was a catastrophic electrical system failure, most likely because of a short circuit. Only a complete electrical failure could account for a lost link, the loss of the transponder signal and the inability of the aircraft to perform its preprogrammed lost-link emergency mission, according to the report. The pilot testified that lost links are not uncommon with Predators but usually only last for a few seconds or minutes. \"After doing this for a while, you sort of see this; it's a reoccurring thing,\" he testified. \"I'd say after the 3- to 5-minute period you sort of get the feeling that the plane just stopped talking to us and we may not recover this one.\"" - }, - "gsx$narrativelength": { - "$t": "896" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,700,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b06f8" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "94" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/21/2009, mishapyear: 2009, mishapcountry: Iraq, mishaplocation: COB Speicher Airfield, Tikrit, narrative: A Hunter crashed after losing link and making an earlier-than-expected nighttime landing at a military airstrip. While turning during the descent, the aircraft lost its data links and flew out of control about 200 feet above ground level, according to an Army safety report. The Hunter crashed on the runway with its left wing and nose pointing down. According to the mission commander, the aircraft started having data link problems when it was about 30 miles away from the base. , narrativelength: 481, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: 3,112,882, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b06f8" - } - ], - "gsx$crashid": { - "$t": "94" - }, - "gsx$mishapdate": { - "$t": "4/21/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "COB Speicher Airfield, Tikrit" - }, - "gsx$narrative": { - "$t": "A Hunter crashed after losing link and making an earlier-than-expected nighttime landing at a military airstrip. While turning during the descent, the aircraft lost its data links and flew out of control about 200 feet above ground level, according to an Army safety report. The Hunter crashed on the runway with its left wing and nose pointing down. According to the mission commander, the aircraft started having data link problems when it was about 30 miles away from the base. " - }, - "gsx$narrativelength": { - "$t": "481" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "3,112,882" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b1kzp" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "95" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/28/2009, mishapyear: 2009, mishapcountry: United States, mishaplocation: 1.5 miles west of Creech Air Force Base, Nev., narrative: A Reaper on a training mission crashed into desert terrain a minute after takeoff because of an engine malfunction. Investigators determined that a vacuum line to the carburetors became disconnected. The flight was the first for the Predator since its old engine had been replaced with a rebuilt model five days earlier. Investigators determined that the vacuum line had been installed correctly but that it was too short and subject to chafing. The pilot's skillful emergency landing saved the aircraft from being a total loss., narrativelength: 528, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $543,178, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b1kzp" - } - ], - "gsx$crashid": { - "$t": "95" - }, - "gsx$mishapdate": { - "$t": "4/28/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "1.5 miles west of Creech Air Force Base, Nev." - }, - "gsx$narrative": { - "$t": "A Reaper on a training mission crashed into desert terrain a minute after takeoff because of an engine malfunction. Investigators determined that a vacuum line to the carburetors became disconnected. The flight was the first for the Predator since its old engine had been replaced with a rebuilt model five days earlier. Investigators determined that the vacuum line had been installed correctly but that it was too short and subject to chafing. The pilot's skillful emergency landing saved the aircraft from being a total loss." - }, - "gsx$narrativelength": { - "$t": "528" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$543,178" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/be856" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "96" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/8/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: 28 miles southwest of Ghazni, narrative: An armed Predator rolled uncontrollably and crashed in an uninhabited area two hours into a mission. Investigators determined that a software chip on the right wing's control module came loose, likely due to vibrations, locking the right aileron into a fixed position. The chip was attached to the control module with a silicone adhesive but did not appear to bond properly. The mission operator testified that this Predator often broke down: \"It seemed like whenever there was an issue on a plane, that this was the tail number.\" He agreed with investigators' description of the Predator as \"just kind of a little possessed aircraft.\", narrativelength: 635, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,698,281" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/be856" - } - ], - "gsx$crashid": { - "$t": "96" - }, - "gsx$mishapdate": { - "$t": "5/8/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "28 miles southwest of Ghazni" - }, - "gsx$narrative": { - "$t": "An armed Predator rolled uncontrollably and crashed in an uninhabited area two hours into a mission. Investigators determined that a software chip on the right wing's control module came loose, likely due to vibrations, locking the right aileron into a fixed position. The chip was attached to the control module with a silicone adhesive but did not appear to bond properly. The mission operator testified that this Predator often broke down: \"It seemed like whenever there was an issue on a plane, that this was the tail number.\" He agreed with investigators' description of the Predator as \"just kind of a little possessed aircraft.\"" - }, - "gsx$narrativelength": { - "$t": "635" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,698,281" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bfmpn" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "97" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/13/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: in a classified location, narrative: An armed Predator mysteriously vanished in Afghanistan about 5 hours into a flight. The skies were clear and the aircraft was flying well above a mountain range when the return satellite data link was lost to Creech Air Force Base in Nevada. The transponder signal was lost three minutes later. Investigators concluded that there was no evidence of bad weather, icing, fuel loss or pilot error. A sergeant raised the possibility that the aircraft could have had its satellite links hacked or hijacked, saying: \"If somebody else was on the same frequencies, they could have taken over the aircraft or just knocked it out completely.\" Investigators found no evidence of hacking., narrativelength: 676, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,900,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bfmpn" - } - ], - "gsx$crashid": { - "$t": "97" - }, - "gsx$mishapdate": { - "$t": "5/13/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "in a classified location" - }, - "gsx$narrative": { - "$t": "An armed Predator mysteriously vanished in Afghanistan about 5 hours into a flight. The skies were clear and the aircraft was flying well above a mountain range when the return satellite data link was lost to Creech Air Force Base in Nevada. The transponder signal was lost three minutes later. Investigators concluded that there was no evidence of bad weather, icing, fuel loss or pilot error. A sergeant raised the possibility that the aircraft could have had its satellite links hacked or hijacked, saying: \"If somebody else was on the same frequencies, they could have taken over the aircraft or just knocked it out completely.\" Investigators found no evidence of hacking." - }, - "gsx$narrativelength": { - "$t": "676" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,900,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bh1a0" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "98" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/28/2009, mishapyear: 2009, mishapcountry: United States, mishaplocation: Rogers Dry Lake bed, adjacent to airfield at Edwards Air Force Base, Calif., narrative: Edwards Air Force Base officials said a Global Hawk on a test flight made an emergency landing shortly after midnight on a dry lake bed, damaging the right wing and landing gear. The Air Force Materiel Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 298, dronetype: RQ-4A, dronename: Global Hawk, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bh1a0" - } - ], - "gsx$crashid": { - "$t": "98" - }, - "gsx$mishapdate": { - "$t": "5/28/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Rogers Dry Lake bed, adjacent to airfield at Edwards Air Force Base, Calif." - }, - "gsx$narrative": { - "$t": "Edwards Air Force Base officials said a Global Hawk on a test flight made an emergency landing shortly after midnight on a dry lake bed, damaging the right wing and landing gear. The Air Force Materiel Command did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "298" - }, - "gsx$dronetype": { - "$t": "RQ-4A" - }, - "gsx$dronename": { - "$t": "Global Hawk" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bifuh" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "99" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/12/2009, mishapyear: 2009, mishapcountry: United States, mishaplocation: Nevada, narrative: The Air Force withheld information about the circumstances of this crash. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 185, dronetype: RQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bifuh" - } - ], - "gsx$crashid": { - "$t": "99" - }, - "gsx$mishapdate": { - "$t": "6/12/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Nevada" - }, - "gsx$narrative": { - "$t": "The Air Force withheld information about the circumstances of this crash. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "185" - }, - "gsx$dronetype": { - "$t": "RQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b8lvi" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "100" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/4/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: Kandahar Air Base, narrative: The Air Force withheld information about the circumstances of this crash except to say that it did not occur due to \"hostile fire.\" A military incident report published by WikiLeaks said the Reaper crashed during landing at Kandahar Air Base while carrying two Hellfire missiles and other munitions, but they did not detonate. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 438, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/b8lvi" - } - ], - "gsx$crashid": { - "$t": "100" - }, - "gsx$mishapdate": { - "$t": "7/4/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "Kandahar Air Base" - }, - "gsx$narrative": { - "$t": "The Air Force withheld information about the circumstances of this crash except to say that it did not occur due to \"hostile fire.\" A military incident report published by WikiLeaks said the Reaper crashed during landing at Kandahar Air Base while carrying two Hellfire missiles and other munitions, but they did not detonate. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "438" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ba0fz" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "101" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/13/2009, mishapyear: 2009, mishapcountry: Iraq, mishaplocation: Ramadi, 1 km south of the Engineer Bridge on the Southern Ramadi bypass, narrative: An armed Predator crashed in a remote area 10 hours into flight after the engine lost power and the aircraft went into a stall. The camera operator testified that the crew had just started to follow a target -- a suspect in a car -- when \"the plane did something weird.\" Investigators determined that the propeller quill shaft failed due to cracks left during the manufacturing process. The quill shaft eventually sheared apart after the cracks widened from normal wear and tear, according to the Air Force report. A report from General Atomics disclosed that another Predator was affected by a similar quill shaft failure recently, but the details were redacted., narrativelength: 663, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,780,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ba0fz" - } - ], - "gsx$crashid": { - "$t": "101" - }, - "gsx$mishapdate": { - "$t": "8/13/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "Ramadi, 1 km south of the Engineer Bridge on the Southern Ramadi bypass" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed in a remote area 10 hours into flight after the engine lost power and the aircraft went into a stall. The camera operator testified that the crew had just started to follow a target -- a suspect in a car -- when \"the plane did something weird.\" Investigators determined that the propeller quill shaft failed due to cracks left during the manufacturing process. The quill shaft eventually sheared apart after the cracks widened from normal wear and tear, according to the Air Force report. A report from General Atomics disclosed that another Predator was affected by a similar quill shaft failure recently, but the details were redacted." - }, - "gsx$narrativelength": { - "$t": "663" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$2,780,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bbf0c" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "102" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/22/2009, mishapyear: 2009, mishapcountry: Iraq, mishaplocation: Tikrit, narrative: An unarmed Hunter crashed next to a highway after a massive fuel leak caused the engine to fail, according to an Army safety investigation report. A crew member reported that the camera showed the fuel \"just spewing out, it looked like Niagara Falls coming over the front of the aircraft.\" The aircraft glided over a populated area but failed to return to base. The crew released the parachute when the aircraft descended to 2,000 feet, but it was too late. \"They would have popped the chute earlier but didn't want to have a parachute being deployed over the city, and this was a concern here,\" the mission commander reported., narrativelength: 627, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: $3,112,882, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bbf0c" - } - ], - "gsx$crashid": { - "$t": "102" - }, - "gsx$mishapdate": { - "$t": "8/22/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "Tikrit" - }, - "gsx$narrative": { - "$t": "An unarmed Hunter crashed next to a highway after a massive fuel leak caused the engine to fail, according to an Army safety investigation report. A crew member reported that the camera showed the fuel \"just spewing out, it looked like Niagara Falls coming over the front of the aircraft.\" The aircraft glided over a populated area but failed to return to base. The crew released the parachute when the aircraft descended to 2,000 feet, but it was too late. \"They would have popped the chute earlier but didn't want to have a parachute being deployed over the city, and this was a concern here,\" the mission commander reported." - }, - "gsx$narrativelength": { - "$t": "627" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "$3,112,882" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bctkt" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "103" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/4/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: 70 miles west of Jalalabad, narrative: An armed Predator crashed into a mountain after the propeller failed 15 hours into a flight. The aircraft dropped 16,300 feet in about three minutes. Investigators attributed the cause to a failed variable pitch propeller servo, a common problem in Predators. Investigators suggested that \"it would be reasonable to conclude that there may be a flaw in the part's design or accepted refurbishment process.\" Investigators noted that 20 other incidents of failed or broken variable pitch propellers were reported in subsequent months., narrativelength: 532, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,960,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bctkt" - } - ], - "gsx$crashid": { - "$t": "103" - }, - "gsx$mishapdate": { - "$t": "9/4/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "70 miles west of Jalalabad" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed into a mountain after the propeller failed 15 hours into a flight. The aircraft dropped 16,300 feet in about three minutes. Investigators attributed the cause to a failed variable pitch propeller servo, a common problem in Predators. Investigators suggested that \"it would be reasonable to conclude that there may be a flaw in the part's design or accepted refurbishment process.\" Investigators noted that 20 other incidents of failed or broken variable pitch propellers were reported in subsequent months." - }, - "gsx$narrativelength": { - "$t": "532" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,960,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bpgoi" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "104" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/11/2009, mishapyear: 2009, mishapcountry: United States, mishaplocation: Holloman Air Force Base, N.M., narrative: Air Force officials said a Predator crashed during takeoff, hitting a fence. The accident occurred one day after a unit of four Predators began flying at Holloman Air Force Base -- the first time there were drone operations at the base. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report. , narrativelength: 349, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bpgoi" - } - ], - "gsx$crashid": { - "$t": "104" - }, - "gsx$mishapdate": { - "$t": "9/11/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Holloman Air Force Base, N.M." - }, - "gsx$narrative": { - "$t": "Air Force officials said a Predator crashed during takeoff, hitting a fence. The accident occurred one day after a unit of four Predators began flying at Holloman Air Force Base -- the first time there were drone operations at the base. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report. " - }, - "gsx$narrativelength": { - "$t": "349" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bqv8z" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "105" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/13/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: Ragh district, a remote area of northern Afghanistan near the Tajikistan border, narrative: An armed Reaper lost its control link while on a combat mission in southern Afghanistan, then flew north for hundreds of miles. An F-15 fighter jet shot down the Reaper just before it crossed into Tajikistan, according to a military incident report published by WikiLeaks. The drone crashed into a mountain near the border in Ragh district. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 443, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bqv8z" - } - ], - "gsx$crashid": { - "$t": "105" - }, - "gsx$mishapdate": { - "$t": "9/13/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "Ragh district, a remote area of northern Afghanistan near the Tajikistan border" - }, - "gsx$narrative": { - "$t": "An armed Reaper lost its control link while on a combat mission in southern Afghanistan, then flew north for hundreds of miles. An F-15 fighter jet shot down the Reaper just before it crossed into Tajikistan, according to a military incident report published by WikiLeaks. The drone crashed into a mountain near the border in Ragh district. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "443" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bs9tc" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "106" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/14/2009, mishapyear: 2009, mishapcountry: Iraq, mishaplocation: 9 miles northeast of Balad Air Base, narrative: An armed Predator crashed after pilots lost control and the data links about nine hours into flight. Investigators blamed a failure of the sero potentiometer or a cable connecting to it. The link was lost because the aircraft lost altitude so quickly, disrupting the satellite connection., narrativelength: 288, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,689,468, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bs9tc" - } - ], - "gsx$crashid": { - "$t": "106" - }, - "gsx$mishapdate": { - "$t": "9/14/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "9 miles northeast of Balad Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed after pilots lost control and the data links about nine hours into flight. Investigators blamed a failure of the sero potentiometer or a cable connecting to it. The link was lost because the aircraft lost altitude so quickly, disrupting the satellite connection." - }, - "gsx$narrativelength": { - "$t": "288" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,689,468" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/btodt" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "107" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/3/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: 78 miles north of Jalalabad, narrative: An armed Predator flew straight into a mountain at 17,000 feet because the pilot was not paying attention, according to an Air Force investigation report. The pilot was rushing to help troops on the ground but ignored warnings from other personnel to watch out for high mountains in the area. Investigators notified the pilot that he is suspected of dereliction of duty. The pilot says he was not warned about the high terrain and only became aware of it shortly before the crash when he looked up at his video screen and saw the mountain straight ahead. \"I knew, with the climbing capability of the Predator, you're not going to out-climb much, if anything,\" the major testified., narrativelength: 680, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,807,680" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/btodt" - } - ], - "gsx$crashid": { - "$t": "107" - }, - "gsx$mishapdate": { - "$t": "10/3/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "78 miles north of Jalalabad" - }, - "gsx$narrative": { - "$t": "An armed Predator flew straight into a mountain at 17,000 feet because the pilot was not paying attention, according to an Air Force investigation report. The pilot was rushing to help troops on the ground but ignored warnings from other personnel to watch out for high mountains in the area. Investigators notified the pilot that he is suspected of dereliction of duty. The pilot says he was not warned about the high terrain and only became aware of it shortly before the crash when he looked up at his video screen and saw the mountain straight ahead. \"I knew, with the climbing capability of the Predator, you're not going to out-climb much, if anything,\" the major testified." - }, - "gsx$narrativelength": { - "$t": "680" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,807,680" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bjueu" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "108" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/14/2009, mishapyear: 2009, mishapcountry: Afghanistan, narrative: A Warrior crashed while returning to base after the Stability Augmentation System became disengaged, according to Army safety officials. The aircraft entered a flat inverted spin and hit the ground. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 333, dronetype: MQ-1B, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bjueu" - } - ], - "gsx$crashid": { - "$t": "108" - }, - "gsx$mishapdate": { - "$t": "11/14/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Warrior crashed while returning to base after the Stability Augmentation System became disengaged, according to Army safety officials. The aircraft entered a flat inverted spin and hit the ground. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " - }, - "gsx$narrativelength": { - "$t": "333" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Warrior" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bl8zb" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "109" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/20/2009, mishapyear: 2009, mishapcountry: Afghanistan, mishaplocation: 7 miles northwest of Kandahar, narrative: An armed Predator lost link and crashed 20 minutes after takeoff. The wreckage was not found for five weeks. Investigators blamed a catastrophic electrical system failure, most likely caused by a short circuit in an alternator cable. The Predator aborted a mission the day before after a link problem, but it was fixed. In a report, General Atomics said similar catastrophic power shorts have occurred on other aircraft., narrativelength: 420, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,588,282" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bl8zb" - } - ], - "gsx$crashid": { - "$t": "109" - }, - "gsx$mishapdate": { - "$t": "11/20/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "7 miles northwest of Kandahar" - }, - "gsx$narrative": { - "$t": "An armed Predator lost link and crashed 20 minutes after takeoff. The wreckage was not found for five weeks. Investigators blamed a catastrophic electrical system failure, most likely caused by a short circuit in an alternator cable. The Predator aborted a mission the day before after a link problem, but it was fixed. In a report, General Atomics said similar catastrophic power shorts have occurred on other aircraft." - }, - "gsx$narrativelength": { - "$t": "420" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,588,282" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bmnjo" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "110" - }, - "content": { - "type": "text", - "$t": "mishapdate: 12/13/2009, mishapyear: 2009, mishapcountry: Afghanistan, narrative: A Hunter crashed shortly after takeoff. Once the aircraft climbed to about 75 feet, the engine idled and the operator lost control, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending., narrativelength: 301, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bmnjo" - } - ], - "gsx$crashid": { - "$t": "110" - }, - "gsx$mishapdate": { - "$t": "12/13/2009" - }, - "gsx$mishapyear": { - "$t": "2009" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Hunter crashed shortly after takeoff. Once the aircraft climbed to about 75 feet, the engine idled and the operator lost control, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending." - }, - "gsx$narrativelength": { - "$t": "301" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bo245" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "111" - }, - "content": { - "type": "text", - "$t": "mishapdate: 1/15/2010, mishapyear: 2010, mishapcountry: Afghanistan, mishaplocation: a few miles east of Kandahar Air Base, narrative: An armed Predator crashed after a pilot ignored repeated warnings from personnel that she was flying upside down. Crew members warned the pilot that an autopilot sensor had malfunctioned and that she needed to use a backup, manual sensor. According to investigators, the pilot thought the crew was joking when they warned her the Predator would fly upside down with the malfunctioning autopilot sensor. \"I didn't think, clearly understand, I guess, that when he said the plane will flip upside down, that he legitimately meant the plane would go out of control and point towards the ground,\" the pilot testified. When investigators asked her how well her training had prepared her for the incident, she replied: \"Um, I guess I'll just be blunt and say not well.\" The pilot was under suspicion for dereliction of duty., narrativelength: 817, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,800,139" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bo245" - } - ], - "gsx$crashid": { - "$t": "111" - }, - "gsx$mishapdate": { - "$t": "1/15/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "a few miles east of Kandahar Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed after a pilot ignored repeated warnings from personnel that she was flying upside down. Crew members warned the pilot that an autopilot sensor had malfunctioned and that she needed to use a backup, manual sensor. According to investigators, the pilot thought the crew was joking when they warned her the Predator would fly upside down with the malfunctioning autopilot sensor. \"I didn't think, clearly understand, I guess, that when he said the plane will flip upside down, that he legitimately meant the plane would go out of control and point towards the ground,\" the pilot testified. When investigators asked her how well her training had prepared her for the incident, she replied: \"Um, I guess I'll just be blunt and say not well.\" The pilot was under suspicion for dereliction of duty." - }, - "gsx$narrativelength": { - "$t": "817" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,800,139" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c0p7u" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "112" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2/13/2010, mishapyear: 2010, mishapcountry: Afghanistan, narrative: A Hunter crashed shortly after launch, falling about 100 feet west of the runway, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 252, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c0p7u" - } - ], - "gsx$crashid": { - "$t": "112" - }, - "gsx$mishapdate": { - "$t": "2/13/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Hunter crashed shortly after launch, falling about 100 feet west of the runway, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " - }, - "gsx$narrativelength": { - "$t": "252" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c23sb" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "113" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/14/2010, mishapyear: 2010, mishapcountry: Afghanistan, mishaplocation: southern Afghanistan, narrative: A Predator crashed in southern Afghanistan. Air Force officials classified the exact location and withheld details about the circumstances except to say that it was not shot down by hostile fire. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 307, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c23sb" - } - ], - "gsx$crashid": { - "$t": "113" - }, - "gsx$mishapdate": { - "$t": "3/14/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "southern Afghanistan" - }, - "gsx$narrative": { - "$t": "A Predator crashed in southern Afghanistan. Air Force officials classified the exact location and withheld details about the circumstances except to say that it was not shot down by hostile fire. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "307" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c3ico" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "114" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/20/2010, mishapyear: 2010, mishapcountry: United States, mishaplocation: Victorville, Calif., narrative: A Predator crashed while attempting to land after a training mission. Investigators determined that a student pilot first flew too fast, then too slow as the aircraft descended during an attempted go-around landing. Difficult wind conditions were a contributing factor. The president of the Air Force's Accident Investigation Board, Lt. Col. Neil Neaderhiser, an experienced pilot, said Predators are especially difficult to handle. \"Of the eight aircraft types I have flown, from Cessna 152s to F-16s, the MQ-1 is by far the hardest to land.\", narrativelength: 543, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,742,211, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c3ico" - } - ], - "gsx$crashid": { - "$t": "114" - }, - "gsx$mishapdate": { - "$t": "4/20/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Victorville, Calif." - }, - "gsx$narrative": { - "$t": "A Predator crashed while attempting to land after a training mission. Investigators determined that a student pilot first flew too fast, then too slow as the aircraft descended during an attempted go-around landing. Difficult wind conditions were a contributing factor. The president of the Air Force's Accident Investigation Board, Lt. Col. Neil Neaderhiser, an experienced pilot, said Predators are especially difficult to handle. \"Of the eight aircraft types I have flown, from Cessna 152s to F-16s, the MQ-1 is by far the hardest to land.\"" - }, - "gsx$narrativelength": { - "$t": "543" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,742,211" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c4wx5" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "115" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/14/2010, mishapyear: 2010, mishapcountry: Iraq, narrative: A Hunter crashed after it was buffeted by a microburst of wind during an attempted landing go-around, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 272, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c4wx5" - } - ], - "gsx$crashid": { - "$t": "115" - }, - "gsx$mishapdate": { - "$t": "5/14/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Hunter crashed after it was buffeted by a microburst of wind during an attempted landing go-around, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " - }, - "gsx$narrativelength": { - "$t": "272" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bv2y6" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "116" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/28/2010, mishapyear: 2010, mishapcountry: United States, mishaplocation: Victorville, Calif., narrative: An experimental Hummingbird helicopter drone crashed during a test flight. The helicopter ran dry on fuel, leading air to bleed into the fuel system intake and causing an engine shutdown, according to an Army report. Investigators blamed pilot error on the part of the civilian contractors, citing \"operator overconfidence and complacency in operating at a low fuel condition.\" Due to the risk of a \"runaway aircraft,\" the experimental drone had been restricted on its test flights to a maximum range of 304 miles. The Army ordered Boeing, the manufacturer, to pay $100,000 for crashing experimental aircraft., narrativelength: 609, dronetype: A160T Hummingbird, dronename: Hummingbird, ownerservice: Army, ownerservicedupe: Army, damageestimate: $5,000,000, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bv2y6" - } - ], - "gsx$crashid": { - "$t": "116" - }, - "gsx$mishapdate": { - "$t": "7/28/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Victorville, Calif." - }, - "gsx$narrative": { - "$t": "An experimental Hummingbird helicopter drone crashed during a test flight. The helicopter ran dry on fuel, leading air to bleed into the fuel system intake and causing an engine shutdown, according to an Army report. Investigators blamed pilot error on the part of the civilian contractors, citing \"operator overconfidence and complacency in operating at a low fuel condition.\" Due to the risk of a \"runaway aircraft,\" the experimental drone had been restricted on its test flights to a maximum range of 304 miles. The Army ordered Boeing, the manufacturer, to pay $100,000 for crashing experimental aircraft." - }, - "gsx$narrativelength": { - "$t": "609" - }, - "gsx$dronetype": { - "$t": "A160T Hummingbird" - }, - "gsx$dronename": { - "$t": "Hummingbird" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "$5,000,000" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bwhin" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "117" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/28/2010, mishapyear: 2010, mishapcountry: United States, mishaplocation: Cannon Air Force Base runway, N.M., narrative: A Predator on a training mission accelerated too fast down the runway and crashed into a perimeter fence, landing in a corn field. The pilot lost link and control of the aircraft soon after it started moving. According to investigators, a backup ground station \"hostilely\" took control of the aircraft because a crew member inadvertently turned on a transmitter. As a result, the throttle jumped from 0 to 70 percent. That crew member declined to testify. An instructor testified things could have been worse. \"If I had gone down back up through Gulf taxi way with what had happened here, the aircraft would have, at some point, would have been heading right towards the hangar where there are people, other aircraft and that type of thing,\" the instructor testified. \"It could have been a lot worse than a Pred stuck in a fence.\", narrativelength: 830, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $988,149" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bwhin" - } - ], - "gsx$crashid": { - "$t": "117" - }, - "gsx$mishapdate": { - "$t": "7/28/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Cannon Air Force Base runway, N.M." - }, - "gsx$narrative": { - "$t": "A Predator on a training mission accelerated too fast down the runway and crashed into a perimeter fence, landing in a corn field. The pilot lost link and control of the aircraft soon after it started moving. According to investigators, a backup ground station \"hostilely\" took control of the aircraft because a crew member inadvertently turned on a transmitter. As a result, the throttle jumped from 0 to 70 percent. That crew member declined to testify. An instructor testified things could have been worse. \"If I had gone down back up through Gulf taxi way with what had happened here, the aircraft would have, at some point, would have been heading right towards the hangar where there are people, other aircraft and that type of thing,\" the instructor testified. \"It could have been a lot worse than a Pred stuck in a fence.\"" - }, - "gsx$narrativelength": { - "$t": "830" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$988,149" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bxw30" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "118" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/16/2010, mishapyear: 2010, mishapcountry: Iraq, mishaplocation: in a plowed field a couple miles northwest of Balad Air Base, narrative: An armed Predator crashed immediately after takeoff. An investigator blamed pilot error, finding that the pilot forgot to turn on the Stability Augmentation System, which caused the drone to spin out of control. According to the investigation, the pilot and the camera operator failed to notice that the \"SAS on\" message did not appear -- as required by proper procedures -- on their video displays., narrativelength: 399, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,900,278" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bxw30" - } - ], - "gsx$crashid": { - "$t": "118" - }, - "gsx$mishapdate": { - "$t": "8/16/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "in a plowed field a couple miles northwest of Balad Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed immediately after takeoff. An investigator blamed pilot error, finding that the pilot forgot to turn on the Stability Augmentation System, which caused the drone to spin out of control. According to the investigation, the pilot and the camera operator failed to notice that the \"SAS on\" message did not appear -- as required by proper procedures -- on their video displays." - }, - "gsx$narrativelength": { - "$t": "399" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,900,278" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bzanh" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "119" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/18/2010, mishapyear: 2010, mishapcountry: Iraq, narrative: A Warrior presumably crashed after it lost link and controllers were unable to initiate emergency recovery procedures, according to Army safety officials. The aircraft rose to 3,500 feet, then began to drop when radar contact was lost. The Warrior was not recovered. The Army said it did not produce a publicly releasable accident investigation report., narrativelength: 352, dronetype: MQ-1B, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/bzanh" - } - ], - "gsx$crashid": { - "$t": "119" - }, - "gsx$mishapdate": { - "$t": "8/18/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Warrior presumably crashed after it lost link and controllers were unable to initiate emergency recovery procedures, according to Army safety officials. The aircraft rose to 3,500 feet, then began to drop when radar contact was lost. The Warrior was not recovered. The Army said it did not produce a publicly releasable accident investigation report." - }, - "gsx$narrativelength": { - "$t": "352" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Warrior" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cbxr6" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "120" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/31/2010, mishapyear: 2010, mishapcountry: United States, mishaplocation: two miles north of Gray Butte Airfield, Palmdale, Calif., narrative: A brand-new Reaper crashed on private property in the California desert during a training mission. About two hours into the flight, the Reaper stalled after it slowed down too much and rolled left, entering into a spin before crashing onto the desert floor. Air Force investigators concluded that the cause was pilot error due to improper control of the aircraft's speed and angle. Investigators also found that the training program did not adequately prepare the pilot for risks associated with a slow flight. \"We were all in disbelief,\" a contractor who was in the ground-control station told investigators. \"We just didn't, I just didn't expect anything to happen on a fairly benign flight.\", narrativelength: 694, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $10,300,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cbxr6" - } - ], - "gsx$crashid": { - "$t": "120" - }, - "gsx$mishapdate": { - "$t": "8/31/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "two miles north of Gray Butte Airfield, Palmdale, Calif." - }, - "gsx$narrative": { - "$t": "A brand-new Reaper crashed on private property in the California desert during a training mission. About two hours into the flight, the Reaper stalled after it slowed down too much and rolled left, entering into a spin before crashing onto the desert floor. Air Force investigators concluded that the cause was pilot error due to improper control of the aircraft's speed and angle. Investigators also found that the training program did not adequately prepare the pilot for risks associated with a slow flight. \"We were all in disbelief,\" a contractor who was in the ground-control station told investigators. \"We just didn't, I just didn't expect anything to happen on a fairly benign flight.\"" - }, - "gsx$narrativelength": { - "$t": "694" - }, - "gsx$dronetype": { - "$t": "MQ-9A" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$10,300,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cdcbn" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "121" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/19/2010, mishapyear: 2010, mishapcountry: Afghanistan, mishaplocation: about 20 miles south of Kabul, narrative: An armed Predator intentionally crashed into a mountain after the engine failed because it ran out of oil. Investigators were unable to determine why the oil system malfunctioned. The crash and fire destroyed most of the aircraft. An explosives team from the U.S. military blew up the remains to prevent the wreckage from falling into enemy hands. According to testimony, the crew had debated whether to return to base after it received warnings that the oil temperature was rising, but temperatures dropped when they activated a cooling fan, so they kept going., narrativelength: 562, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,800,278" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cdcbn" - } - ], - "gsx$crashid": { - "$t": "121" - }, - "gsx$mishapdate": { - "$t": "9/19/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "about 20 miles south of Kabul" - }, - "gsx$narrative": { - "$t": "An armed Predator intentionally crashed into a mountain after the engine failed because it ran out of oil. Investigators were unable to determine why the oil system malfunctioned. The crash and fire destroyed most of the aircraft. An explosives team from the U.S. military blew up the remains to prevent the wreckage from falling into enemy hands. According to testimony, the crew had debated whether to return to base after it received warnings that the oil temperature was rising, but temperatures dropped when they activated a cooling fan, so they kept going." - }, - "gsx$narrativelength": { - "$t": "562" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,800,278" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ceqw0" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "122" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/17/2010, mishapyear: 2010, mishapcountry: Afghanistan, narrative: A Hunter crashed during a landing attempt after missing the first and second arresting cables designed to catch the aircraft, according to Army safety officials. The Hunter kept going off the runway, crossed 300 feet of gravel and smashed into a concrete barrier. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending., narrativelength: 397, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ceqw0" - } - ], - "gsx$crashid": { - "$t": "122" - }, - "gsx$mishapdate": { - "$t": "10/17/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Hunter crashed during a landing attempt after missing the first and second arresting cables designed to catch the aircraft, according to Army safety officials. The Hunter kept going off the runway, crossed 300 feet of gravel and smashed into a concrete barrier. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending." - }, - "gsx$narrativelength": { - "$t": "397" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cg5gh" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "123" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/2/2010, mishapyear: 2010, mishapcountry: Afghanistan, mishaplocation: about 3 miles from Jalalabad Air Base, narrative: An unarmed Hunter crashed about 15 minutes after takeoff when it lost its data links. It took searchers more than an hour to locate the wreckage, which was about three miles from the base in Jalalabad. Many aircraft components were missing from the site and were presumably taken by Afghans, according to an Army safety investigation report. Civilian contractors were operating the drone., narrativelength: 388, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army, damageestimate: $3,449,950" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/cg5gh" - } - ], - "gsx$crashid": { - "$t": "123" - }, - "gsx$mishapdate": { - "$t": "11/2/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "about 3 miles from Jalalabad Air Base" - }, - "gsx$narrative": { - "$t": "An unarmed Hunter crashed about 15 minutes after takeoff when it lost its data links. It took searchers more than an hour to locate the wreckage, which was about three miles from the base in Jalalabad. Many aircraft components were missing from the site and were presumably taken by Afghans, according to an Army safety investigation report. Civilian contractors were operating the drone." - }, - "gsx$narrativelength": { - "$t": "388" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "$3,449,950" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c6bhi" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "124" - }, - "content": { - "type": "text", - "$t": "mishapdate: 12/9/2010, mishapyear: 2010, mishapcountry: Afghanistan, mishaplocation: 22 nautical miles northeast of Kandahar, narrative: An armed Predator crashed while approaching for landing after a pilot pressed the wrong button on his joystick. Investigators concluded that the pilot inadvertently disabled the Predator's Stability Augmentation System, which keeps the aircraft from wobbling. The pilot was trying to turn off another switch in response to low coolant temperature but acknowledged in testimony that he pressed the \"big red button that says send the aircraft out of control.\" When he realized his mistake, he moved too quickly to reactivate the Stability Augmentation System when the aircraft was pitched down instead of waiting until the aircraft was straight and level. That made things worse, causing the Predator \"to aggressively pitch down further,\" according to the accident report., narrativelength: 770, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c6bhi" - } - ], - "gsx$crashid": { - "$t": "124" - }, - "gsx$mishapdate": { - "$t": "12/9/2010" - }, - "gsx$mishapyear": { - "$t": "2010" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "22 nautical miles northeast of Kandahar" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed while approaching for landing after a pilot pressed the wrong button on his joystick. Investigators concluded that the pilot inadvertently disabled the Predator's Stability Augmentation System, which keeps the aircraft from wobbling. The pilot was trying to turn off another switch in response to low coolant temperature but acknowledged in testimony that he pressed the \"big red button that says send the aircraft out of control.\" When he realized his mistake, he moved too quickly to reactivate the Stability Augmentation System when the aircraft was pitched down instead of waiting until the aircraft was straight and level. That made things worse, causing the Predator \"to aggressively pitch down further,\" according to the accident report." - }, - "gsx$narrativelength": { - "$t": "770" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,400,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c7q1z" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "125" - }, - "content": { - "type": "text", - "$t": "mishapdate: 1/3/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: about 100 nautical miles west of Kandahar Air Base and 30 miles southwest of Highway A1, narrative: An armed Predator crashed in the desert after the aircraft lost power and its satellite link. Investigators concluded that an alternator bearing failed, triggering a shutdown of the electrical system. According to voice recordings from the ground-control station, the pilot and sensor operator received warnings about the alternator but the aircraft soon lost link for about 85 seconds, signaling bigger problems. The crew said they were an hour flight from both Kandahar Air Base and Shindand Air Base and knew they couldn't reach either in time. \"We avoided -- attempted to avoid populated areas, stuff like that, so we were thinking, you know, if we were going to actually put this plane in the dirt, where do we not want to go, essentially,\" the pilot testified. \"And then eventually we just lost link with the airplane and never got it back.\", narrativelength: 847, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c7q1z" - } - ], - "gsx$crashid": { - "$t": "125" - }, - "gsx$mishapdate": { - "$t": "1/3/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "about 100 nautical miles west of Kandahar Air Base and 30 miles southwest of Highway A1" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed in the desert after the aircraft lost power and its satellite link. Investigators concluded that an alternator bearing failed, triggering a shutdown of the electrical system. According to voice recordings from the ground-control station, the pilot and sensor operator received warnings about the alternator but the aircraft soon lost link for about 85 seconds, signaling bigger problems. The crew said they were an hour flight from both Kandahar Air Base and Shindand Air Base and knew they couldn't reach either in time. \"We avoided -- attempted to avoid populated areas, stuff like that, so we were thinking, you know, if we were going to actually put this plane in the dirt, where do we not want to go, essentially,\" the pilot testified. \"And then eventually we just lost link with the airplane and never got it back.\"" - }, - "gsx$narrativelength": { - "$t": "847" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,400,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c94mc" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "126" - }, - "content": { - "type": "text", - "$t": "mishapdate: 1/14/2011, mishapyear: 2011, mishapcountry: Djibouti, mishaplocation: Gulf of Aden, three miles offshore from Djibouti and 52 miles from Camp Lemonnier, narrative: An armed Predator crashed in the Gulf of Aden after its engine failed nine hours into a flight. Investigators concluded that cylinder malfunction and oil loss caused the engine failure but couldn't pinpoint the problem because the Predator sank in 150 feet of water and was not recovered. The drone's engine had been replaced one week earlier, but crews had to abort three other recent flights because of low oil pressure. Maintenance crews made a variety of repairs, and the aircraft flew a sortie on Jan. 13 without incident. \"It has a history of maintenance for engine problems, oil problems on that aircraft,\" the sensor operator testified. \"Without recovering the engine, we don't know exactly what happened.\", narrativelength: 714, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,120,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/c94mc" - } - ], - "gsx$crashid": { - "$t": "126" - }, - "gsx$mishapdate": { - "$t": "1/14/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Djibouti" - }, - "gsx$mishaplocation": { - "$t": "Gulf of Aden, three miles offshore from Djibouti and 52 miles from Camp Lemonnier" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed in the Gulf of Aden after its engine failed nine hours into a flight. Investigators concluded that cylinder malfunction and oil loss caused the engine failure but couldn't pinpoint the problem because the Predator sank in 150 feet of water and was not recovered. The drone's engine had been replaced one week earlier, but crews had to abort three other recent flights because of low oil pressure. Maintenance crews made a variety of repairs, and the aircraft flew a sortie on Jan. 13 without incident. \"It has a history of maintenance for engine problems, oil problems on that aircraft,\" the sensor operator testified. \"Without recovering the engine, we don't know exactly what happened.\"" - }, - "gsx$narrativelength": { - "$t": "714" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,120,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/caj6t" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "127" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2/7/2011, mishapyear: 2011, mishapcountry: Iraq, narrative: A Warrior crashed after an operator entered the incorrect altitude in the navigator mode, according to Army safety officials. The Army said it did not conduct a publicly releasable investigation., dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/caj6t" - } - ], - "gsx$crashid": { - "$t": "127" - }, - "gsx$mishapdate": { - "$t": "2/7/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Warrior crashed after an operator entered the incorrect altitude in the navigator mode, according to Army safety officials. The Army said it did not conduct a publicly releasable investigation." - }, - "gsx$narrativelength": { - "$t": "" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hmyxm" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "128" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/15/2011, mishapyear: 2011, mishapcountry: Djibouti, mishaplocation: Camp Lemonnier, narrative: An armed Predator crashed on the runway at an airport shared by U.S. military and civilian airliners in Djibouti. The Predator came in too fast and too steep for landing and smashed into a perimeter fence. Investigators concluded that the cause was a combination of mechanical problems with the throttle and pilot error. The pilot was advised that he was under suspicion for dereliction of duty for failing to follow proper procedures during landing. A military officer testified that the incident was the fourth involving an MQ-1 Predator in recent months. \"I have no illusions that this won't happen again, whether it's an MQ-1 or otherwise,\" the officer said. A drone squadron commander testified that the doomed drone was \"one of our hangar queens, if you will. It flew regularly but it had one of the worst maintenance records of the aircraft we had on station at the time.\", narrativelength: 879, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $1,357,000, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hmyxm" - } - ], - "gsx$crashid": { - "$t": "128" - }, - "gsx$mishapdate": { - "$t": "3/15/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Djibouti" - }, - "gsx$mishaplocation": { - "$t": "Camp Lemonnier" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed on the runway at an airport shared by U.S. military and civilian airliners in Djibouti. The Predator came in too fast and too steep for landing and smashed into a perimeter fence. Investigators concluded that the cause was a combination of mechanical problems with the throttle and pilot error. The pilot was advised that he was under suspicion for dereliction of duty for failing to follow proper procedures during landing. A military officer testified that the incident was the fourth involving an MQ-1 Predator in recent months. \"I have no illusions that this won't happen again, whether it's an MQ-1 or otherwise,\" the officer said. A drone squadron commander testified that the doomed drone was \"one of our hangar queens, if you will. It flew regularly but it had one of the worst maintenance records of the aircraft we had on station at the time.\"" - }, - "gsx$narrativelength": { - "$t": "879" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$1,357,000" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hodi3" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "129" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/16/2011, mishapyear: 2011, mishapcountry: United States, mishaplocation: California, narrative: A Gray Eagle crashed during a high-altitude test flight, according to Army safety officials. The Army said it did not conduct a publicly releasable accident report., dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hodi3" - } - ], - "gsx$crashid": { - "$t": "129" - }, - "gsx$mishapdate": { - "$t": "3/16/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "California" - }, - "gsx$narrative": { - "$t": "A Gray Eagle crashed during a high-altitude test flight, according to Army safety officials. The Army said it did not conduct a publicly releasable accident report." - }, - "gsx$narrativelength": { - "$t": "" - }, - "gsx$dronetype": { - "$t": "MQ-1C" - }, - "gsx$dronename": { - "$t": "Gray Eagle" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hps2g" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "130" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/1/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: 115 miles northeast of Kandahar Air Base, narrative: A Predator crashed in a remote area after the engine failed. Investigators concluded that a mechanical bearing failed and contaminated the oil system with metal shavings and other debris. The pilot crashed the aircraft about a mile from a military forward operating base. The drone was damaged but not destroyed. U.S. ground troops recovered the aircraft but had to cut off the wings so they could fit the drone on their Humvees., narrativelength: 429, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,020,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hps2g" - } - ], - "gsx$crashid": { - "$t": "130" - }, - "gsx$mishapdate": { - "$t": "5/1/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "115 miles northeast of Kandahar Air Base" - }, - "gsx$narrative": { - "$t": "A Predator crashed in a remote area after the engine failed. Investigators concluded that a mechanical bearing failed and contaminated the oil system with metal shavings and other debris. The pilot crashed the aircraft about a mile from a military forward operating base. The drone was damaged but not destroyed. U.S. ground troops recovered the aircraft but had to cut off the wings so they could fit the drone on their Humvees." - }, - "gsx$narrativelength": { - "$t": "429" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$2,020,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hr6mx" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "131" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/5/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: 0.5 nautical miles northeast of Kandahar Air Base, narrative: An armed Predator crashed into a base perimeter fence near a bunch of shipping containers during an emergency landing. Investigators attributed the cause of the accident to a combination of mechanical problems and pilot error. The engine failed because of a malfunctioning cooling system. According to the investigation, the pilot knew the engine was about to seize up during the emergency descent but didn't recognize it had already stopped a few minutes earlier. \"Where the hell is -- where is the runway? It's all the way over here. I overshot,\" the pilot shouted, according to a transcript of the voice recorder in the ground-control station. Oh shit, oh damn, oh my God what is that!? ... What was all that stuff that I just hit?\" , narrativelength: 736, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,200,000, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hr6mx" - } - ], - "gsx$crashid": { - "$t": "131" - }, - "gsx$mishapdate": { - "$t": "5/5/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "0.5 nautical miles northeast of Kandahar Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed into a base perimeter fence near a bunch of shipping containers during an emergency landing. Investigators attributed the cause of the accident to a combination of mechanical problems and pilot error. The engine failed because of a malfunctioning cooling system. According to the investigation, the pilot knew the engine was about to seize up during the emergency descent but didn't recognize it had already stopped a few minutes earlier. \"Where the hell is -- where is the runway? It's all the way over here. I overshot,\" the pilot shouted, according to a transcript of the voice recorder in the ground-control station. Oh shit, oh damn, oh my God what is that!? ... What was all that stuff that I just hit?\" " - }, - "gsx$narrativelength": { - "$t": "736" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,200,000" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hhcny" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "132" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/7/2011, mishapyear: 2011, mishapcountry: Djibouti, mishaplocation: 1.5 miles off the coast of Djibouti, about 3 miles east of Camp Lemonnier, narrative: An armed Predator crashed in the sea off the coast of Djibouti as it was descending for an emergency landing. The drone \"violently\" rolled right and then uncontrollably rolled left because of electrical problems in the right-wing control module, according to investigators. The sensor operator testified that the aircraft had a history of doing \"weird stuff,\" and when it made its final roll, \"it pitched real hard, it was the hardest bank I had ever seen a Pred do.\" He added: \"It just gave it up. It just nosed over on its belly and just went straight for the ground. ... It was one of those moments when you feel your heart sink and, well, there it goes. And I mean, it pretty much did its own thing, it pretty much gave up, it wasn't taking inputs whatsoever. It just completely nosed over. Then the screen went black, and that was it.\", narrativelength: 840, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hhcny" - } - ], - "gsx$crashid": { - "$t": "132" - }, - "gsx$mishapdate": { - "$t": "5/7/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Djibouti" - }, - "gsx$mishaplocation": { - "$t": "1.5 miles off the coast of Djibouti, about 3 miles east of Camp Lemonnier" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed in the sea off the coast of Djibouti as it was descending for an emergency landing. The drone \"violently\" rolled right and then uncontrollably rolled left because of electrical problems in the right-wing control module, according to investigators. The sensor operator testified that the aircraft had a history of doing \"weird stuff,\" and when it made its final roll, \"it pitched real hard, it was the hardest bank I had ever seen a Pred do.\" He added: \"It just gave it up. It just nosed over on its belly and just went straight for the ground. ... It was one of those moments when you feel your heart sink and, well, there it goes. And I mean, it pretty much did its own thing, it pretty much gave up, it wasn't taking inputs whatsoever. It just completely nosed over. Then the screen went black, and that was it.\"" - }, - "gsx$narrativelength": { - "$t": "840" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,400,000" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hir8f" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "133" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/13/2011, mishapyear: 2011, mishapcountry: United States, mishaplocation: Gulf of Mexico, 16 nautical miles south of Tyndall Air Force Base, Fla., narrative: An aerial target drone crashed in the Gulf of Mexico. Investigators blamed the crash on an electrical malfunction that caused the drone to fly in a nearly inverted position. The aircraft crashed into waters about four nautical miles from the nearest boat, according to the accident investigation report., narrativelength: 303, dronetype: QRF-4C, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,801,574, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hir8f" - } - ], - "gsx$crashid": { - "$t": "133" - }, - "gsx$mishapdate": { - "$t": "5/13/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Gulf of Mexico, 16 nautical miles south of Tyndall Air Force Base, Fla." - }, - "gsx$narrative": { - "$t": "An aerial target drone crashed in the Gulf of Mexico. Investigators blamed the crash on an electrical malfunction that caused the drone to fly in a nearly inverted position. The aircraft crashed into waters about four nautical miles from the nearest boat, according to the accident investigation report." - }, - "gsx$narrativelength": { - "$t": "303" - }, - "gsx$dronetype": { - "$t": "QRF-4C" - }, - "gsx$dronename": { - "$t": "Phantom" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$2,801,574" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hk5ss" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "134" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/17/2011, mishapyear: 2011, mishapcountry: Djibouti, mishaplocation: 2.4 nautical miles west of Camp Lemonnier, narrative: An armed Predator crashed a couple miles short of the runway near a residential area in Djibouti, the fourth Predator crash in Djibouti in four months. Investigators attributed the cause to a combination of mechanical problems and pilot error. Sensors gave inaccurate altitude readings and the crew failed to recognize the problem, in part because the camera was fogged over. \"Dude, look at this camera. Seriously, I can't do anything. There's nothing I can do,\" the camera operator said to the pilot, according to a voice-recording transcript. \"Yeah, dude, I literally have no picture right now. This camera's like, completely messed up.\" The pilot didn't realize he was too low until he was 20 feet above ground level. The aircraft was trying to return to base after a 17-hour mission because of an oil leak, but investigators concluded that problem did not contribute to the crash., narrativelength: 884, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $2,983,766, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hk5ss" - } - ], - "gsx$crashid": { - "$t": "134" - }, - "gsx$mishapdate": { - "$t": "5/17/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Djibouti" - }, - "gsx$mishaplocation": { - "$t": "2.4 nautical miles west of Camp Lemonnier" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed a couple miles short of the runway near a residential area in Djibouti, the fourth Predator crash in Djibouti in four months. Investigators attributed the cause to a combination of mechanical problems and pilot error. Sensors gave inaccurate altitude readings and the crew failed to recognize the problem, in part because the camera was fogged over. \"Dude, look at this camera. Seriously, I can't do anything. There's nothing I can do,\" the camera operator said to the pilot, according to a voice-recording transcript. \"Yeah, dude, I literally have no picture right now. This camera's like, completely messed up.\" The pilot didn't realize he was too low until he was 20 feet above ground level. The aircraft was trying to return to base after a 17-hour mission because of an oil leak, but investigators concluded that problem did not contribute to the crash." - }, - "gsx$narrativelength": { - "$t": "884" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$2,983,766" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hlkd9" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "135" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/20/2011, mishapyear: 2011, mishapcountry: United States, mishaplocation: Creech Air Force Base, Nev., narrative: A Reaper crashed after takeoff from Creech Air Force Base, but the Air Force withheld details of the circumstances. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 227, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hlkd9" - } - ], - "gsx$crashid": { - "$t": "135" - }, - "gsx$mishapdate": { - "$t": "5/20/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Creech Air Force Base, Nev." - }, - "gsx$narrative": { - "$t": "A Reaper crashed after takeoff from Creech Air Force Base, but the Air Force withheld details of the circumstances. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "227" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hy7gy" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "136" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/5/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: 60 nautical miles northeast of Jalalabad, narrative: An armed Predator was struck by lightning and presumably crashed. The aircraft lost satellite links after the lightning struck and was not recovered. The crew knew it was flying in the vicinity of thunderstorms but had an urgent mission to assist ground troops in the area who were under enemy fire., narrativelength: 299, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hy7gy" - } - ], - "gsx$crashid": { - "$t": "136" - }, - "gsx$mishapdate": { - "$t": "6/5/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "60 nautical miles northeast of Jalalabad" - }, - "gsx$narrative": { - "$t": "An armed Predator was struck by lightning and presumably crashed. The aircraft lost satellite links after the lightning struck and was not recovered. The crew knew it was flying in the vicinity of thunderstorms but had an urgent mission to assist ground troops in the area who were under enemy fire." - }, - "gsx$narrativelength": { - "$t": "299" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,400,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hzm1f" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "137" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/28/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: about 20 nautical miles northeast of Jalalabad Air Base, narrative: An armed Predator crashed after it flew into bad weather and lost its links. The aircraft flew into severe turbulence and plunged 8,600 feet in 80 seconds, according to the report. The drone was forced to fly through bad weather because it was supporting ground troops in the area. \"We kind of just sat there and looked at each other, hoping that it would regain its link,\" the pilot testified. The Predator was unable to fly its preprogrammed emergency mission. \"All of a sudden, just like a snap, everything pretty much went,\" the camera operator testified. \"Not exactly like a black screen or so, but pretty much to that effect.\" According to the mission coordinator, ground troops in the area reported seeing \"something fall out of the sky,\" which turned out to be the stricken Predator., narrativelength: 791, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hzm1f" - } - ], - "gsx$crashid": { - "$t": "137" - }, - "gsx$mishapdate": { - "$t": "6/28/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "about 20 nautical miles northeast of Jalalabad Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed after it flew into bad weather and lost its links. The aircraft flew into severe turbulence and plunged 8,600 feet in 80 seconds, according to the report. The drone was forced to fly through bad weather because it was supporting ground troops in the area. \"We kind of just sat there and looked at each other, hoping that it would regain its link,\" the pilot testified. The Predator was unable to fly its preprogrammed emergency mission. \"All of a sudden, just like a snap, everything pretty much went,\" the camera operator testified. \"Not exactly like a black screen or so, but pretty much to that effect.\" According to the mission coordinator, ground troops in the area reported seeing \"something fall out of the sky,\" which turned out to be the stricken Predator." - }, - "gsx$narrativelength": { - "$t": "791" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,400,000" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i10ls" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "138" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/10/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: last seen about 20 miles south of Jalalabad, narrative: An armed Predator disappeared and presumably crashed. It was the third Predator crash near Jalalabad in five weeks. In each case, the drones lost their satellite links and did not fly their emergency preprogrammed mission. Unlike the previous two accidents, the weather in this case was clear and investigators were unable to determine a cause. They found no evidence of maintenance or operational problems prior to the lost link. The aircraft had been flying for about 19 hours but still had 138 gallons of fuel in the tank., narrativelength: 525, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i10ls" - } - ], - "gsx$crashid": { - "$t": "138" - }, - "gsx$mishapdate": { - "$t": "7/10/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "last seen about 20 miles south of Jalalabad" - }, - "gsx$narrative": { - "$t": "An armed Predator disappeared and presumably crashed. It was the third Predator crash near Jalalabad in five weeks. In each case, the drones lost their satellite links and did not fly their emergency preprogrammed mission. Unlike the previous two accidents, the weather in this case was clear and investigators were unable to determine a cause. They found no evidence of maintenance or operational problems prior to the lost link. The aircraft had been flying for about 19 hours but still had 138 gallons of fuel in the tank." - }, - "gsx$narrativelength": { - "$t": "525" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,400,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i2f69" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "139" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/15/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: Sharana airstrip, Paktika province, narrative: An Army Shadow drone crashed into a C-130 Hercules aircraft as both were preparing to land at a forward operating base in eastern Afghanistan. According to an Air Force safety report, the Shadow smashed into the cargo plane’s left wing between two propellers. Jet fuel cascaded out of a gash in the wing. \"Holy shit!\" the cargo plane's navigator shouted, according to a voice-recording transcript. \"We got hit by a UAV! We got hit by a UAV!\" The Hercules crew shut down one engine and radioed to clear the runway. Within two minutes, the plane landed, smoke pouring from the left side.\"There's a big frickin' hole in the airplane,\" the pilot reported. No one was injured. The official cause was redacted from the Air Force report, but other documents suggest an air-traffic controller was temporarily demoted and received remedial training afterward., narrativelength: 850, dronetype: RQ-7B, dronename: Shadow, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i2f69" - } - ], - "gsx$crashid": { - "$t": "139" - }, - "gsx$mishapdate": { - "$t": "8/15/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "Sharana airstrip, Paktika province" - }, - "gsx$narrative": { - "$t": "An Army Shadow drone crashed into a C-130 Hercules aircraft as both were preparing to land at a forward operating base in eastern Afghanistan. According to an Air Force safety report, the Shadow smashed into the cargo plane’s left wing between two propellers. Jet fuel cascaded out of a gash in the wing. \"Holy shit!\" the cargo plane's navigator shouted, according to a voice-recording transcript. \"We got hit by a UAV! We got hit by a UAV!\" The Hercules crew shut down one engine and radioed to clear the runway. Within two minutes, the plane landed, smoke pouring from the left side.\"There's a big frickin' hole in the airplane,\" the pilot reported. No one was injured. The official cause was redacted from the Air Force report, but other documents suggest an air-traffic controller was temporarily demoted and received remedial training afterward." - }, - "gsx$narrativelength": { - "$t": "850" - }, - "gsx$dronetype": { - "$t": "RQ-7B" - }, - "gsx$dronename": { - "$t": "Shadow" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hsl7a" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "140" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/20/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: 2 miles southwest of Jalalabad Airfield, narrative: An armed Predator crashed into a residential area in Jalalabad after a mechanical breakdown. No one was injured, but the aircraft burst into flames and damaged two Afghan housing compounds. The owners were compensated an undisclosed sum by the U.S. Army foreign claims commission, according to the Air Force accident investigation report. Investigators blamed the accident on a broken variable pitch propeller quill shaft. The crew realized they couldn't make it back to the airfield, so they scanned the ground for a place to crash. \"I looked below us and there were houses everywhere,\" the camera operator testified. \"We were above the city, there, there wasn't a whole lot we could aim for except for that.\", narrativelength: 710, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,844,825, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hsl7a" - } - ], - "gsx$crashid": { - "$t": "140" - }, - "gsx$mishapdate": { - "$t": "8/20/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "2 miles southwest of Jalalabad Airfield" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed into a residential area in Jalalabad after a mechanical breakdown. No one was injured, but the aircraft burst into flames and damaged two Afghan housing compounds. The owners were compensated an undisclosed sum by the U.S. Army foreign claims commission, according to the Air Force accident investigation report. Investigators blamed the accident on a broken variable pitch propeller quill shaft. The crew realized they couldn't make it back to the airfield, so they scanned the ground for a place to crash. \"I looked below us and there were houses everywhere,\" the camera operator testified. \"We were above the city, there, there wasn't a whole lot we could aim for except for that.\"" - }, - "gsx$narrativelength": { - "$t": "710" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,844,825" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/htzrr" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "141" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/20/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: 105 nautical miles northwest of Kandahar; between Kandahar and Shindand Air Base (Shindand was nearest airfield), narrative: A Global Hawk on a communications-relay mission over Afghanistan crashed after it lost link nine hours into a flight at 51,000 feet; it kept flying autonomously for about 30 seconds, then went into a steep dive, according to the Air Force's accident investigation report. The aircraft lost altitude so quickly that the wings sheared off. Investigators could not definitively determine a cause but found that it was likely because of an electrical malfunction. A loose connector interrupted power to the aileron and spoiler flight-control actuators, rendering the aircraft uncontrollable., narrativelength: 587, dronetype: EQ-4B, dronename: Global Hawk, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $72,800,000, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/htzrr" - } - ], - "gsx$crashid": { - "$t": "141" - }, - "gsx$mishapdate": { - "$t": "8/20/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "105 nautical miles northwest of Kandahar; between Kandahar and Shindand Air Base (Shindand was nearest airfield)" - }, - "gsx$narrative": { - "$t": "A Global Hawk on a communications-relay mission over Afghanistan crashed after it lost link nine hours into a flight at 51,000 feet; it kept flying autonomously for about 30 seconds, then went into a steep dive, according to the Air Force's accident investigation report. The aircraft lost altitude so quickly that the wings sheared off. Investigators could not definitively determine a cause but found that it was likely because of an electrical malfunction. A loose connector interrupted power to the aileron and spoiler flight-control actuators, rendering the aircraft uncontrollable." - }, - "gsx$narrativelength": { - "$t": "587" - }, - "gsx$dronetype": { - "$t": "EQ-4B" - }, - "gsx$dronename": { - "$t": "Global Hawk" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$72,800,000" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hvec4" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "142" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/24/2011, mishapyear: 2011, mishapcountry: United States, mishaplocation: Holloman Air Force Base, N.M., narrative: A Reaper on a training mission crashed during landing about 1:30 p.m. at Holloman Air Force Base. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 209, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hvec4" - } - ], - "gsx$crashid": { - "$t": "142" - }, - "gsx$mishapdate": { - "$t": "8/24/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Holloman Air Force Base, N.M." - }, - "gsx$narrative": { - "$t": "A Reaper on a training mission crashed during landing about 1:30 p.m. at Holloman Air Force Base. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "209" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hwswl" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "143" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/22/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: Sar-E Pul province, narrative: An Armed Warrior crashed in a remote area after its engine seized up. As the aircraft was flying about 200 miles from its departure point at Bagram air base, the camera showed a fluid leak. About 20 minutes later, the engine seized and the aircraft steadily lost altitude before crashing, according to an Army safety investigation report., narrativelength: 338, dronetype: MQ-1B, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army, damageestimate: 3,892,524.00" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/hwswl" - } - ], - "gsx$crashid": { - "$t": "143" - }, - "gsx$mishapdate": { - "$t": "9/22/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "Sar-E Pul province" - }, - "gsx$narrative": { - "$t": "An Armed Warrior crashed in a remote area after its engine seized up. As the aircraft was flying about 200 miles from its departure point at Bagram air base, the camera showed a fluid leak. About 20 minutes later, the engine seized and the aircraft steadily lost altitude before crashing, according to an Army safety investigation report." - }, - "gsx$narrativelength": { - "$t": "338" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Warrior" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "3,892,524.00" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i9g0a" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "144" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/7/2011, mishapyear: 2011, mishapcountry: United States, mishaplocation: Holloman Air Force Base, N.M., narrative: A Reaper crashed during landing about 6:45 p.m., the second Reaper crash at Holloman Air Force Base in six weeks. A base spokesman said investigators were looking into reports that the Reaper may have struck a power line. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 333, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i9g0a" - } - ], - "gsx$crashid": { - "$t": "144" - }, - "gsx$mishapdate": { - "$t": "10/7/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Holloman Air Force Base, N.M." - }, - "gsx$narrative": { - "$t": "A Reaper crashed during landing about 6:45 p.m., the second Reaper crash at Holloman Air Force Base in six weeks. A base spokesman said investigators were looking into reports that the Reaper may have struck a power line. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "333" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iaukr" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "145" - }, - "content": { - "type": "text", - "$t": "mishapdate: 12/4/2011, mishapyear: 2011, mishapcountry: Iran, mishaplocation: Kashmar, narrative: A stealth surveillance drone, operated by the Air Force and the CIA, crashed in Iranian territory for reasons that remain unclear. The Iranian government announced that it had captured the aircraft through a cyberattack. U.S. officials cast doubt on the Iranian assertion but have not provided a consistent explanation for how it lost the Sentinel. After the Iranian government released photographs of the Sentinel, the U.S. Defense Department announced that it had lost a drone that it said had been on a surveillance mission in western Afghanistan. U.S. officials later acknowledged that the drone had been on a mission for the CIA., narrativelength: 634, dronetype: RQ-170, dronename: Sentinel, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iaukr" - } - ], - "gsx$crashid": { - "$t": "145" - }, - "gsx$mishapdate": { - "$t": "12/4/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Iran" - }, - "gsx$mishaplocation": { - "$t": "Kashmar" - }, - "gsx$narrative": { - "$t": "A stealth surveillance drone, operated by the Air Force and the CIA, crashed in Iranian territory for reasons that remain unclear. The Iranian government announced that it had captured the aircraft through a cyberattack. U.S. officials cast doubt on the Iranian assertion but have not provided a consistent explanation for how it lost the Sentinel. After the Iranian government released photographs of the Sentinel, the U.S. Defense Department announced that it had lost a drone that it said had been on a surveillance mission in western Afghanistan. U.S. officials later acknowledged that the drone had been on a mission for the CIA." - }, - "gsx$narrativelength": { - "$t": "634" - }, - "gsx$dronetype": { - "$t": "RQ-170" - }, - "gsx$dronename": { - "$t": "Sentinel" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ic954" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "146" - }, - "content": { - "type": "text", - "$t": "mishapdate: 12/13/2011, mishapyear: 2011, mishapcountry: Seychelles, mishaplocation: Victoria, narrative: An unarmed Reaper crashed on the runway at an international airport. The pilot, an employee of an Air Force contractor, came in too high, too fast and landed almost halfway down the runway, according to an Air Force accident investigation report. The Reaper bounced over the airport perimeter road, struck a rock breakwater and landed in the ocean. Investigators attributed the mishap to a combination of pilot error and a mechanical malfunction. Investigators found that an electrical short occurred in a cable assembly but could not conclusively determine why., narrativelength: 562, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $9,643,000, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ic954" - } - ], - "gsx$crashid": { - "$t": "146" - }, - "gsx$mishapdate": { - "$t": "12/13/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Seychelles" - }, - "gsx$mishaplocation": { - "$t": "Victoria" - }, - "gsx$narrative": { - "$t": "An unarmed Reaper crashed on the runway at an international airport. The pilot, an employee of an Air Force contractor, came in too high, too fast and landed almost halfway down the runway, according to an Air Force accident investigation report. The Reaper bounced over the airport perimeter road, struck a rock breakwater and landed in the ocean. Investigators attributed the mishap to a combination of pilot error and a mechanical malfunction. Investigators found that an electrical short occurred in a cable assembly but could not conclusively determine why." - }, - "gsx$narrativelength": { - "$t": "562" - }, - "gsx$dronetype": { - "$t": "MQ-9A" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$9,643,000" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/idnpl" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "147" - }, - "content": { - "type": "text", - "$t": "mishapdate: 12/27/2011, mishapyear: 2011, mishapcountry: Afghanistan, mishaplocation: in a classified location, narrative: A Predator crashed in a classified location in Afghanistan following a lost link and a suspected power plant failure, according to the Air Force Special Operations Command. Air Force officials said they blew up the aircraft's wreckage because it was in a remote area and it was not practical to recover. The Air Force Special Operations Command did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 433, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/idnpl" - } - ], - "gsx$crashid": { - "$t": "147" - }, - "gsx$mishapdate": { - "$t": "12/27/2011" - }, - "gsx$mishapyear": { - "$t": "2011" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "in a classified location" - }, - "gsx$narrative": { - "$t": "A Predator crashed in a classified location in Afghanistan following a lost link and a suspected power plant failure, according to the Air Force Special Operations Command. Air Force officials said they blew up the aircraft's wreckage because it was in a remote area and it was not practical to recover. The Air Force Special Operations Command did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "433" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i3tqm" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "148" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2012 - specific date classified, mishapyear: 2012, mishapcountry: Classified, narrative: The Air Force classified the precise date of this Predator accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 224, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i3tqm" - } - ], - "gsx$crashid": { - "$t": "148" - }, - "gsx$mishapdate": { - "$t": "2012 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this Predator accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "224" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i58b3" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "149" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2012 - specific date classified, mishapyear: 2012, mishapcountry: Classified, narrative: The Air Force classified the precise date of this Reaper accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 222, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i58b3" - } - ], - "gsx$crashid": { - "$t": "149" - }, - "gsx$mishapdate": { - "$t": "2012 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this Reaper accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "222" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i6mvg" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "150" - }, - "content": { - "type": "text", - "$t": "mishapdate: 1/10/2012, mishapyear: 2012, mishapcountry: United States, mishaplocation: Georgia, narrative: A Hunter crashed during a bungled landing. The drone was caught by an arresting cable during the landing but the nose wheel collapsed, according to Army safety officials. The Hunter swerved and ran off the runway, damaging the propeller. The Army said it did not conduct a publicly releasable accident investigation., narrativelength: 316, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i6mvg" - } - ], - "gsx$crashid": { - "$t": "150" - }, - "gsx$mishapdate": { - "$t": "1/10/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Georgia" - }, - "gsx$narrative": { - "$t": "A Hunter crashed during a bungled landing. The drone was caught by an arresting cable during the landing but the nose wheel collapsed, according to Army safety officials. The Hunter swerved and ran off the runway, damaging the propeller. The Army said it did not conduct a publicly releasable accident investigation." - }, - "gsx$narrativelength": { - "$t": "316" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i81fx" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "151" - }, - "content": { - "type": "text", - "$t": "mishapdate: 1/30/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: one to two miles southwest of Kandahar Air Base, narrative: An armed Predator crashed after attempting an emergency landing at Kandahar Air Base due to engine trouble. The engine malfunctioned because of a damaged coolant pump supply line; investigators determined that maintenance crews failed to notice the problem during a scheduled inspection. Investigators also partly blamed pilot error for improperly handing over remote control of the aircraft to a local recovery crew. The problems started when the crew received warnings of an overheated engine and used the infrared camera on the aircraft to see \"a warm liquid dripping from the engine compartment.\" As it neared Kandahar, the crew realized it would not reach the base so it tried to avoid crashing. \"If we would have continued to try to make the runway, we wouldn't have made it and it could have cost people their lives. I'm sure it would have,\" one of the pilots testified., narrativelength: 877, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,500,000, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/i81fx" - } - ], - "gsx$crashid": { - "$t": "151" - }, - "gsx$mishapdate": { - "$t": "1/30/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "one to two miles southwest of Kandahar Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed after attempting an emergency landing at Kandahar Air Base due to engine trouble. The engine malfunctioned because of a damaged coolant pump supply line; investigators determined that maintenance crews failed to notice the problem during a scheduled inspection. Investigators also partly blamed pilot error for improperly handing over remote control of the aircraft to a local recovery crew. The problems started when the crew received warnings of an overheated engine and used the infrared camera on the aircraft to see \"a warm liquid dripping from the engine compartment.\" As it neared Kandahar, the crew realized it would not reach the base so it tried to avoid crashing. \"If we would have continued to try to make the runway, we wouldn't have made it and it could have cost people their lives. I'm sure it would have,\" one of the pilots testified." - }, - "gsx$narrativelength": { - "$t": "877" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,500,000" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ikojm" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "152" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2/14/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: 1.1 miles northeast of the runway in a farm field, Jalalabad, narrative: An armed Predator crashed into a field near Jalalabad. Investigators determined that both alternators on the aircraft failed but that pilot error was also to blame because the crew \"failed to land the [Predator] as soon as possible, and instead displayed extremely poor judgment by electing to maneuver the [aircraft] over the airfield.\" The crash resulted in damage to crops, and the explosion blew out windows in nearby buildings. The U.S. military compensated the Afghan owners an undisclosed sum, according to the Air Force accident investigation report., narrativelength: 558, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,960,209.91, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ikojm" - } - ], - "gsx$crashid": { - "$t": "152" - }, - "gsx$mishapdate": { - "$t": "2/14/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "1.1 miles northeast of the runway in a farm field, Jalalabad" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed into a field near Jalalabad. Investigators determined that both alternators on the aircraft failed but that pilot error was also to blame because the crew \"failed to land the [Predator] as soon as possible, and instead displayed extremely poor judgment by electing to maneuver the [aircraft] over the airfield.\" The crash resulted in damage to crops, and the explosion blew out windows in nearby buildings. The U.S. military compensated the Afghan owners an undisclosed sum, according to the Air Force accident investigation report." - }, - "gsx$narrativelength": { - "$t": "558" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,960,209.91" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/im343" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "153" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2/21/2012, mishapyear: 2012, mishapcountry: Djibouti, mishaplocation: 90 miles off the coast of Djibouti City, narrative: An armed Predator crashed into the Gulf of Aden after the engine failed because the oil ran dry. Investigators determined that a turbocharger failed and damaged an oil seal, resulting in the oil leak. As the aircraft lost altitude, the pilot testified that he knew he could not make it safely back to the military base in Djibouti, so he intentionally flew over the Gulf to avoid crashing over a populated area., narrativelength: 411, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,400,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/im343" - } - ], - "gsx$crashid": { - "$t": "153" - }, - "gsx$mishapdate": { - "$t": "2/21/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Djibouti" - }, - "gsx$mishaplocation": { - "$t": "90 miles off the coast of Djibouti City" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed into the Gulf of Aden after the engine failed because the oil ran dry. Investigators determined that a turbocharger failed and damaged an oil seal, resulting in the oil leak. As the aircraft lost altitude, the pilot testified that he knew he could not make it safely back to the military base in Djibouti, so he intentionally flew over the Gulf to avoid crashing over a populated area." - }, - "gsx$narrativelength": { - "$t": "411" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,400,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/inhog" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "154" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/21/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Warrior lost link while returning to base after the aircraft had trouble with low oil pressure and temperature spikes in the manifold, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending., narrativelength: 306, dronetype: MQ-1B, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/inhog" - } - ], - "gsx$crashid": { - "$t": "154" - }, - "gsx$mishapdate": { - "$t": "3/21/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Warrior lost link while returning to base after the aircraft had trouble with low oil pressure and temperature spikes in the manifold, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending." - }, - "gsx$narrativelength": { - "$t": "306" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Warrior" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iow8x" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "155" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/30/2012, mishapyear: 2012, mishapcountry: Atlantic Ocean, mishaplocation: international waters, south of Cape Verde, West Africa, narrative: A Navy helicopter drone crashed at sea after running out of fuel during repeated failures to land on the deck of the USS Simpson. The drone failed to connect with an automated recovery and landing system on the ship. Another Fire Scout based on the ship had experienced similar problems for two weeks, according to a Navy accident investigation., narrativelength: 345, dronetype: MQ-8B, dronename: Fire Scout, ownerservice: Navy, ownerservicedupe: Navy, damageestimate: $7.7 million" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iow8x" - } - ], - "gsx$crashid": { - "$t": "155" - }, - "gsx$mishapdate": { - "$t": "3/30/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Atlantic Ocean" - }, - "gsx$mishaplocation": { - "$t": "international waters, south of Cape Verde, West Africa" - }, - "gsx$narrative": { - "$t": "A Navy helicopter drone crashed at sea after running out of fuel during repeated failures to land on the deck of the USS Simpson. The drone failed to connect with an automated recovery and landing system on the ship. Another Fire Scout based on the ship had experienced similar problems for two weeks, according to a Navy accident investigation." - }, - "gsx$narrativelength": { - "$t": "345" - }, - "gsx$dronetype": { - "$t": "MQ-8B" - }, - "gsx$dronename": { - "$t": "Fire Scout" - }, - "gsx$ownerservice": { - "$t": "Navy" - }, - "gsx$ownerservicedupe": { - "$t": "Navy" - }, - "gsx$damageestimate": { - "$t": "$7.7 million" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/if29y" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "156" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/31/2012, mishapyear: 2012, mishapcountry: Classified, mishaplocation: Southwest Asia, narrative: The Air Force confirmed the date of this Reaper accident and said it occurred in Southwest Asia, which usually refers to a country in the Persian Gulf. It classified the exact location and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 299, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/if29y" - } - ], - "gsx$crashid": { - "$t": "156" - }, - "gsx$mishapdate": { - "$t": "3/31/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "Southwest Asia" - }, - "gsx$narrative": { - "$t": "The Air Force confirmed the date of this Reaper accident and said it occurred in Southwest Asia, which usually refers to a country in the Persian Gulf. It classified the exact location and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "299" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/igguf" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "157" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/4/2012, mishapyear: 2012, mishapcountry: Seychelles, mishaplocation: Indian Ocean, just offshore from Victoria, narrative: An unarmed Reaper crash-landed at an international airport, bouncing into the ocean. Investigators found that the pilot bungled the takeoff by hitting the wrong lever and choking the fuel supply, then failing to lower the landing gear during the emergency landing attempt. The aircraft was destroyed but \"could have been recovered with minimal or no damage if the landing gear had been down,\" Air Force investigators concluded. The pilot was a civilian contractor for the Air Force. On top of the other mistakes, he took off five minutes earlier than scheduled and ignored the air-traffic controller., narrativelength: 600, dronetype: MQ-9A, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $8,931,000, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/igguf" - } - ], - "gsx$crashid": { - "$t": "157" - }, - "gsx$mishapdate": { - "$t": "4/4/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Seychelles" - }, - "gsx$mishaplocation": { - "$t": "Indian Ocean, just offshore from Victoria" - }, - "gsx$narrative": { - "$t": "An unarmed Reaper crash-landed at an international airport, bouncing into the ocean. Investigators found that the pilot bungled the takeoff by hitting the wrong lever and choking the fuel supply, then failing to lower the landing gear during the emergency landing attempt. The aircraft was destroyed but \"could have been recovered with minimal or no damage if the landing gear had been down,\" Air Force investigators concluded. The pilot was a civilian contractor for the Air Force. On top of the other mistakes, he took off five minutes earlier than scheduled and ignored the air-traffic controller." - }, - "gsx$narrativelength": { - "$t": "600" - }, - "gsx$dronetype": { - "$t": "MQ-9A" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$8,931,000" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ihves" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "158" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/6/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: Baghlan Valley, 50 nautical miles south of Kunduz, narrative: A Navy helicopter drone crashed during a surveillance mission in central Afghanistan. The pilot and the payload operator were civilian contractors employed by the manufacturer, Northrop Grumman, according to the summary of a Navy safety investigation report. The report blamed a malfunction in the navigation system. Navy officials would not disclose the full report., narrativelength: 367, dronetype: MQ-8B, dronename: Fire Scout, ownerservice: Navy, ownerservicedupe: Navy, damageestimate: $7.7 million" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ihves" - } - ], - "gsx$crashid": { - "$t": "158" - }, - "gsx$mishapdate": { - "$t": "4/6/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "Baghlan Valley, 50 nautical miles south of Kunduz" - }, - "gsx$narrative": { - "$t": "A Navy helicopter drone crashed during a surveillance mission in central Afghanistan. The pilot and the payload operator were civilian contractors employed by the manufacturer, Northrop Grumman, according to the summary of a Navy safety investigation report. The report blamed a malfunction in the navigation system. Navy officials would not disclose the full report." - }, - "gsx$narrativelength": { - "$t": "367" - }, - "gsx$dronetype": { - "$t": "MQ-8B" - }, - "gsx$dronename": { - "$t": "Fire Scout" - }, - "gsx$ownerservice": { - "$t": "Navy" - }, - "gsx$ownerservicedupe": { - "$t": "Navy" - }, - "gsx$damageestimate": { - "$t": "$7.7 million" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ij9z9" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "159" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/14/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: Nangarhar province, 20 nautical miles west of Jalalabad Air Base, narrative: An armed Predator was intentionally crashed into a mountain after the engine failed because it was too far to attempt to return to the base. Investigators said malfunctioning ignition circuits caused the engine failure., narrativelength: 219, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $3,832,053.18" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ij9z9" - } - ], - "gsx$crashid": { - "$t": "159" - }, - "gsx$mishapdate": { - "$t": "4/14/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "Nangarhar province, 20 nautical miles west of Jalalabad Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator was intentionally crashed into a mountain after the engine failed because it was too far to attempt to return to the base. Investigators said malfunctioning ignition circuits caused the engine failure." - }, - "gsx$narrativelength": { - "$t": "219" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$3,832,053.18" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ivx4q" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "160" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/11/2012, mishapyear: 2012, mishapcountry: United States, mishaplocation: near Elliott Island Road, Dorchester County, Md., 22 miles east of Naval Air Station Patuxent River, narrative: A Navy surveillance drone crashed into a wildlife refuge on Maryland's Eastern Shore after a malfunction with the navigation system. The RQ-4A aircraft was a Broad Area Maritime Surveillance Demonstrator -- the Navy's version of the Air Force Global Hawk. The pilot and crew were civilian contractors from the manufacturer Northrop Grumman. Navy investigators blamed a failure of the right inboard ruddervator actuator but also criticized the pilot for not following emergency guidelines., narrativelength: 488, dronetype: RQ-4A, dronename: Global Hawk, ownerservice: Navy, ownerservicedupe: Navy" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ivx4q" - } - ], - "gsx$crashid": { - "$t": "160" - }, - "gsx$mishapdate": { - "$t": "6/11/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "near Elliott Island Road, Dorchester County, Md., 22 miles east of Naval Air Station Patuxent River" - }, - "gsx$narrative": { - "$t": "A Navy surveillance drone crashed into a wildlife refuge on Maryland's Eastern Shore after a malfunction with the navigation system. The RQ-4A aircraft was a Broad Area Maritime Surveillance Demonstrator -- the Navy's version of the Air Force Global Hawk. The pilot and crew were civilian contractors from the manufacturer Northrop Grumman. Navy investigators blamed a failure of the right inboard ruddervator actuator but also criticized the pilot for not following emergency guidelines." - }, - "gsx$narrativelength": { - "$t": "488" - }, - "gsx$dronetype": { - "$t": "RQ-4A" - }, - "gsx$dronename": { - "$t": "Global Hawk" - }, - "gsx$ownerservice": { - "$t": "Navy" - }, - "gsx$ownerservicedupe": { - "$t": "Navy" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ixbp7" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "161" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/7/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed during an emergency landing attempt after the engine failed. The aircraft lost oil pressure, forcing the crew to try to return to base. The Gray Eagle touched down with the nose too low and the landing gear collapsed, according to Army safety officials. The Army said it did not produce a publicly available investigation report., narrativelength: 350, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/ixbp7" - } - ], - "gsx$crashid": { - "$t": "161" - }, - "gsx$mishapdate": { - "$t": "7/7/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Gray Eagle crashed during an emergency landing attempt after the engine failed. The aircraft lost oil pressure, forcing the crew to try to return to base. The Gray Eagle touched down with the nose too low and the landing gear collapsed, according to Army safety officials. The Army said it did not produce a publicly available investigation report." - }, - "gsx$narrativelength": { - "$t": "350" - }, - "gsx$dronetype": { - "$t": "MQ-1C" - }, - "gsx$dronename": { - "$t": "Gray Eagle" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iyq9k" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "162" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/11/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed one mile from the runway shortly after takeoff. The aircraft seemed to take off without incident, but as it climbed to 300 feet it suddenly plunged and crashed. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending., narrativelength: 315, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iyq9k" - } - ], - "gsx$crashid": { - "$t": "162" - }, - "gsx$mishapdate": { - "$t": "7/11/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Gray Eagle crashed one mile from the runway shortly after takeoff. The aircraft seemed to take off without incident, but as it climbed to 300 feet it suddenly plunged and crashed. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending." - }, - "gsx$narrativelength": { - "$t": "315" - }, - "gsx$dronetype": { - "$t": "MQ-1C" - }, - "gsx$dronename": { - "$t": "Gray Eagle" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j04u1" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "163" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/20/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed into mountainous terrain while descending to land, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending., narrativelength: 241, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j04u1" - } - ], - "gsx$crashid": { - "$t": "163" - }, - "gsx$mishapdate": { - "$t": "7/20/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Gray Eagle crashed into mountainous terrain while descending to land, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending." - }, - "gsx$narrativelength": { - "$t": "241" - }, - "gsx$dronetype": { - "$t": "MQ-1C" - }, - "gsx$dronename": { - "$t": "Gray Eagle" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iqav2" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "164" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/24/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: Jalalabad Air Base, narrative: An armed Predator crashed during an attempted takeoff, slamming into a barrier and guardhouse. Investigators found the primary cause was pilot error. After the camera on board the aircraft shifted unexpectedly, the pilot slammed on the brakes, then hit the accelerator. Transcripts of the ground-station voice recorder showed that the pilot and camera operator had been joking with each other before the crash. \"Stop saying 'uh oh' while you're flying,\" the camera operator told the pilot. \"It's never good. Like going to the dentist or a doctor -- oops, what the [expletive] you mean oops?\" A few moments later, the aircraft crashed. \"I don't know what the hell just happened,\" the pilot said., narrativelength: 694, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,476,000, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iqav2" - } - ], - "gsx$crashid": { - "$t": "164" - }, - "gsx$mishapdate": { - "$t": "7/24/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "Jalalabad Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed during an attempted takeoff, slamming into a barrier and guardhouse. Investigators found the primary cause was pilot error. After the camera on board the aircraft shifted unexpectedly, the pilot slammed on the brakes, then hit the accelerator. Transcripts of the ground-station voice recorder showed that the pilot and camera operator had been joking with each other before the crash. \"Stop saying 'uh oh' while you're flying,\" the camera operator told the pilot. \"It's never good. Like going to the dentist or a doctor -- oops, what the [expletive] you mean oops?\" A few moments later, the aircraft crashed. \"I don't know what the hell just happened,\" the pilot said." - }, - "gsx$narrativelength": { - "$t": "694" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,476,000" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/irpfj" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "165" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/22/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: 0.5 nautical miles northwest of Forward Operating Base Fenty, near Jalalabad, narrative: An armed Predator crashed a half mile from Jalalabad after an electrical failure. An investigator said the primary cause was the failure of both alternators due to a malfunctioning diode. Air Force crews tried to return to the base and make an emergency landing but didn't make it. \"We lost the aircraft, but we were damn near close to saving it and getting it on the ground,\" a camera operator testified., narrativelength: 405, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,600,000, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/irpfj" - } - ], - "gsx$crashid": { - "$t": "165" - }, - "gsx$mishapdate": { - "$t": "8/22/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "0.5 nautical miles northwest of Forward Operating Base Fenty, near Jalalabad" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed a half mile from Jalalabad after an electrical failure. An investigator said the primary cause was the failure of both alternators due to a malfunctioning diode. Air Force crews tried to return to the base and make an emergency landing but didn't make it. \"We lost the aircraft, but we were damn near close to saving it and getting it on the ground,\" a camera operator testified." - }, - "gsx$narrativelength": { - "$t": "405" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,600,000" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/it3zw" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "166" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/18/2012, mishapyear: 2012, mishapcountry: Iraq, mishaplocation: a few miles south of the Turkish border, northwest of Irbil, narrative: An unarmed Predator crashed into uninhabited mountainous terrain in northern Iraq five minutes after losing its communications and navigational links. Investigators could not determine a cause. The weather was clear and there were no abnormal mechanical readings prior to the lost links. The aircraft had been flying in a preprogrammed loiter pattern -- a box over northern Iraq -- as part of a surveillance mission. The wreckage was recovered by Kurdish guerrilla fighters who posted a video on the Internet, asserting that they had shot down the aircraft. The Air Force report makes no mention of any evidence that the Predator was fired upon., dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,414,977, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/it3zw" - } - ], - "gsx$crashid": { - "$t": "166" - }, - "gsx$mishapdate": { - "$t": "9/18/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Iraq" - }, - "gsx$mishaplocation": { - "$t": "a few miles south of the Turkish border, northwest of Irbil" - }, - "gsx$narrative": { - "$t": "An unarmed Predator crashed into uninhabited mountainous terrain in northern Iraq five minutes after losing its communications and navigational links. Investigators could not determine a cause. The weather was clear and there were no abnormal mechanical readings prior to the lost links. The aircraft had been flying in a preprogrammed loiter pattern -- a box over northern Iraq -- as part of a surveillance mission. The wreckage was recovered by Kurdish guerrilla fighters who posted a video on the Internet, asserting that they had shot down the aircraft. The Air Force report makes no mention of any evidence that the Predator was fired upon." - }, - "gsx$narrativelength": { - "$t": "" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,414,977" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iuikd" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "167" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/25/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed while attempting to return to base after an engine failure. Contractors flying the aircraft noticed a high temperature warning as the aircraft reached an altitude of 1,200 feet after takeoff, according to Army safety officials. The operators tried to return the Gray Eagle to base but crashed short of the runway.The Army said it did not conduct a publicly releasable accident investigation., narrativelength: 412, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/iuikd" - } - ], - "gsx$crashid": { - "$t": "167" - }, - "gsx$mishapdate": { - "$t": "9/25/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Gray Eagle crashed while attempting to return to base after an engine failure. Contractors flying the aircraft noticed a high temperature warning as the aircraft reached an altitude of 1,200 feet after takeoff, according to Army safety officials. The operators tried to return the Gray Eagle to base but crashed short of the runway.The Army said it did not conduct a publicly releasable accident investigation." - }, - "gsx$narrativelength": { - "$t": "412" - }, - "gsx$dronetype": { - "$t": "MQ-1C" - }, - "gsx$dronename": { - "$t": "Gray Eagle" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j75o2" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "168" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/11/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed while attempting to make an emergency landing. The aircraft experienced problems with the engine oil, coolant and other malfunctions, and the engine failed before the drone could return to base. The aircraft crashed just off the runway. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 392, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j75o2" - } - ], - "gsx$crashid": { - "$t": "168" - }, - "gsx$mishapdate": { - "$t": "10/11/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Gray Eagle crashed while attempting to make an emergency landing. The aircraft experienced problems with the engine oil, coolant and other malfunctions, and the engine failed before the drone could return to base. The aircraft crashed just off the runway. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " - }, - "gsx$narrativelength": { - "$t": "392" - }, - "gsx$dronetype": { - "$t": "MQ-1C" - }, - "gsx$dronename": { - "$t": "Gray Eagle" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j8k8j" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "169" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/26/2012, mishapyear: 2012, mishapcountry: Afghanistan, mishaplocation: 53 nautical miles southwest of Jalalabad Air Base, narrative: An armed Predator was intentionally flown into a mountainside after a propeller motor malfunctioned 20 hours into the flight. Investigators determined the primary cause was failure of the variable pitch propeller motor, resulting from an inconsistent electrical supply. The aircraft was too far away from a base to attempt an emergency landing. \"We decided that [the pilot] should crash the aircraft as hard as he could so it would be destroyed completely,\" a mission supervisor from Creech Air Force Base in Nevada testified. \"He smashed it to smithereens.\" A safety observer from Creech added: \"When you see a descent that large that is almost unheard of -- I think everyone was kind of shocked about what happened since it happened so quickly. When you get something like that, you kill the engine and the airplane is going down.\", narrativelength: 833, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,600,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j8k8j" - } - ], - "gsx$crashid": { - "$t": "169" - }, - "gsx$mishapdate": { - "$t": "10/26/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "53 nautical miles southwest of Jalalabad Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator was intentionally flown into a mountainside after a propeller motor malfunctioned 20 hours into the flight. Investigators determined the primary cause was failure of the variable pitch propeller motor, resulting from an inconsistent electrical supply. The aircraft was too far away from a base to attempt an emergency landing. \"We decided that [the pilot] should crash the aircraft as hard as he could so it would be destroyed completely,\" a mission supervisor from Creech Air Force Base in Nevada testified. \"He smashed it to smithereens.\" A safety observer from Creech added: \"When you see a descent that large that is almost unheard of -- I think everyone was kind of shocked about what happened since it happened so quickly. When you get something like that, you kill the engine and the airplane is going down.\"" - }, - "gsx$narrativelength": { - "$t": "833" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,600,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j9ysw" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "170" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/14/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed after an engine failure. Army safety officials said the engine failed during a \"manual transfer of fuel operation\" while in flight. The crew was unable to restart the engine, and the aircraft crashed near its point of departure. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending., narrativelength: 383, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j9ysw" - } - ], - "gsx$crashid": { - "$t": "170" - }, - "gsx$mishapdate": { - "$t": "11/14/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Gray Eagle crashed after an engine failure. Army safety officials said the engine failed during a \"manual transfer of fuel operation\" while in flight. The crew was unable to restart the engine, and the aircraft crashed near its point of departure. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending." - }, - "gsx$narrativelength": { - "$t": "383" - }, - "gsx$dronetype": { - "$t": "MQ-1C" - }, - "gsx$dronename": { - "$t": "Gray Eagle" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jbddd" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "171" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/30/2012, mishapyear: 2012, mishapcountry: Afghanistan, narrative: A Hunter crashed after its engine failed while it was cruising at 7,000 feet above ground level. The engine gradually lost power until it failed completely at an altitude of 2,000 feet, according to Army safety officials. The Army said it did not produce a publicly available accident investigation report., narrativelength: 306, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jbddd" - } - ], - "gsx$crashid": { - "$t": "171" - }, - "gsx$mishapdate": { - "$t": "11/30/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Hunter crashed after its engine failed while it was cruising at 7,000 feet above ground level. The engine gradually lost power until it failed completely at an altitude of 2,000 feet, according to Army safety officials. The Army said it did not produce a publicly available accident investigation report." - }, - "gsx$narrativelength": { - "$t": "306" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j1jee" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "172" - }, - "content": { - "type": "text", - "$t": "mishapdate: 12/5/2012, mishapyear: 2012, mishapcountry: United States, mishaplocation: 3 miles northeast of Mount Irish, Douglas County, Nev., narrative: A Reaper crashed in an uninhabited area during a training exercise after going into a stall. Investigators determined that crew error was the primary cause. The ground-control station was improperly reconfigured from a setup for flying Predators to a setup for flying Reapers. When the pilot guided the throttle, it mistakenly triggered a reverse thrust because of the incorrect setup. \"We're in the soup here,\" the pilot said, according to a voice-recording transcript. \"Dude, uh, we're not sure what the aircraft is doing -- yeah, we crashed.\", narrativelength: 545, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $9,646,088" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j1jee" - } - ], - "gsx$crashid": { - "$t": "172" - }, - "gsx$mishapdate": { - "$t": "12/5/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "3 miles northeast of Mount Irish, Douglas County, Nev." - }, - "gsx$narrative": { - "$t": "A Reaper crashed in an uninhabited area during a training exercise after going into a stall. Investigators determined that crew error was the primary cause. The ground-control station was improperly reconfigured from a setup for flying Predators to a setup for flying Reapers. When the pilot guided the throttle, it mistakenly triggered a reverse thrust because of the incorrect setup. \"We're in the soup here,\" the pilot said, according to a voice-recording transcript. \"Dude, uh, we're not sure what the aircraft is doing -- yeah, we crashed.\"" - }, - "gsx$narrativelength": { - "$t": "545" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$9,646,088" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j2xyv" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "173" - }, - "content": { - "type": "text", - "$t": "mishapdate: 12/13/2012, mishapyear: 2012, mishapcountry: Libya, mishaplocation: Mediterranean Sea, off the Libyan coast, narrative: A drone helicopter crashed off the coast of Libya while trying to land on the deck of the USS Robert G. Bradley, a Navy frigate. The aircraft flew through icy conditions while on a surveillance mission to support Special Operations forces. Chunks of ice came off the drone, and the tail rotor malfunctioned while the helicopter was hovering 15 feet above the flight deck, according to a Navy investigation. The drone spun into the sea without striking the ship, and no one was injured., narrativelength: 485, dronetype: MQ-8B, dronename: Fire Scout, ownerservice: Navy, ownerservicedupe: Navy, damageestimate: $14,100,000" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j2xyv" - } - ], - "gsx$crashid": { - "$t": "173" - }, - "gsx$mishapdate": { - "$t": "12/13/2012" - }, - "gsx$mishapyear": { - "$t": "2012" - }, - "gsx$mishapcountry": { - "$t": "Libya" - }, - "gsx$mishaplocation": { - "$t": "Mediterranean Sea, off the Libyan coast" - }, - "gsx$narrative": { - "$t": "A drone helicopter crashed off the coast of Libya while trying to land on the deck of the USS Robert G. Bradley, a Navy frigate. The aircraft flew through icy conditions while on a surveillance mission to support Special Operations forces. Chunks of ice came off the drone, and the tail rotor malfunctioned while the helicopter was hovering 15 feet above the flight deck, according to a Navy investigation. The drone spun into the sea without striking the ship, and no one was injured." - }, - "gsx$narrativelength": { - "$t": "485" - }, - "gsx$dronetype": { - "$t": "MQ-8B" - }, - "gsx$dronename": { - "$t": "Fire Scout" - }, - "gsx$ownerservice": { - "$t": "Navy" - }, - "gsx$ownerservicedupe": { - "$t": "Navy" - }, - "gsx$damageestimate": { - "$t": "$14,100,000" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j4cj8" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "174" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2013 - specific date classified, mishapyear: 2013, mishapcountry: Classified, narrative: The Air Force classified the precise date of this Predator accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 224, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j4cj8" - } - ], - "gsx$crashid": { - "$t": "174" - }, - "gsx$mishapdate": { - "$t": "2013 - specific date classified" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Classified" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "The Air Force classified the precise date of this Predator accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "224" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j5r3p" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "175" - }, - "content": { - "type": "text", - "$t": "mishapdate: 2/28/2013, mishapyear: 2013, mishapcountry: Afghanistan, narrative: A Hunter crashed into a concrete drainage ditch after a botched takeoff, veering off the runway after rolling just 250 feet. The aircraft was operating under an automatic takeoff and landing system, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. , narrativelength: 369, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/j5r3p" - } - ], - "gsx$crashid": { - "$t": "175" - }, - "gsx$mishapdate": { - "$t": "2/28/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Hunter crashed into a concrete drainage ditch after a botched takeoff, veering off the runway after rolling just 250 feet. The aircraft was operating under an automatic takeoff and landing system, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. " - }, - "gsx$narrativelength": { - "$t": "369" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jie7e" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "176" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/2/2013, mishapyear: 2013, mishapcountry: Afghanistan, mishaplocation: 7 nautical miles southwest of Kandahar Air Base, narrative: An armed Predator crashed nose-first into the ground in a remote area after going into a spin 21 hours into a mission. \"What's going on? Hang on! Hang on!\" the pilot shouted, according to a voice-recording transcript from the ground-control station. \"Whoa! Speed's dying! RPMs are up,\" the camera operator replied. \"Uh-oh! [expletive] It's spinning!\" the pilot said as his video screen went black. \"OK, I think it just fell out of the sky.\" Investigators determined that the aircraft plowed into terrain \"in a near-vertical trajectory\" after the failure of a circuit board computer chip on the secondary control module that controls the ruddervator. Afghans pillaged the wreckage before the site could be secured, according to investigators., narrativelength: 741, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,688,557" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jie7e" - } - ], - "gsx$crashid": { - "$t": "176" - }, - "gsx$mishapdate": { - "$t": "3/2/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "7 nautical miles southwest of Kandahar Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed nose-first into the ground in a remote area after going into a spin 21 hours into a mission. \"What's going on? Hang on! Hang on!\" the pilot shouted, according to a voice-recording transcript from the ground-control station. \"Whoa! Speed's dying! RPMs are up,\" the camera operator replied. \"Uh-oh! [expletive] It's spinning!\" the pilot said as his video screen went black. \"OK, I think it just fell out of the sky.\" Investigators determined that the aircraft plowed into terrain \"in a near-vertical trajectory\" after the failure of a circuit board computer chip on the secondary control module that controls the ruddervator. Afghans pillaged the wreckage before the site could be secured, according to investigators." - }, - "gsx$narrativelength": { - "$t": "741" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,688,557" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jjsrv" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "177" - }, - "content": { - "type": "text", - "$t": "mishapdate: 3/29/2013, mishapyear: 2013, mishapcountry: Afghanistan, mishaplocation: several miles northeast of Kandahar Air Base, narrative: An armed Predator crashed after it was struck by lightning. The aircraft risked flying into stormy weather to provide assistance to a forward operating base that was \"expecting an imminent attack,\" according to the Air Force accident investigation report. The lightning strike knocked out the satellite links and damaged the electrical system, causing the aircraft to \"execute its flight termination mode.\" A report from General Atomics, the manufacturer, stated that a video recording \"showed the aircraft proceeding into dark clouds\" several minutes before the lightning strike., narrativelength: 580, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,735,604" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jjsrv" - } - ], - "gsx$crashid": { - "$t": "177" - }, - "gsx$mishapdate": { - "$t": "3/29/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "several miles northeast of Kandahar Air Base" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed after it was struck by lightning. The aircraft risked flying into stormy weather to provide assistance to a forward operating base that was \"expecting an imminent attack,\" according to the Air Force accident investigation report. The lightning strike knocked out the satellite links and damaged the electrical system, causing the aircraft to \"execute its flight termination mode.\" A report from General Atomics, the manufacturer, stated that a video recording \"showed the aircraft proceeding into dark clouds\" several minutes before the lightning strike." - }, - "gsx$narrativelength": { - "$t": "580" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,735,604" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jl7c8" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "178" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/5/2013, mishapyear: 2013, mishapcountry: Djibouti, mishaplocation: somewhere in the Gulf of Aden, narrative: A Reaper crashed and sank in the Gulf of Aden. The Air Force Special Operations Command did not convene an Accident Investigation Board to produce a publicly releasable report. A spokesman for U.S. Africa Command said the Reaper experienced flight-control problems \"believed to be attributable to severe weather. As a precaution, the aircrew diverted the aircraft to international waters, where it crashed \nand sank in the Gulf of Aden...It is believed that severe turbulence and icing were the lead contributors to the aircraft malfunction.\", narrativelength: 542, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jl7c8" - } - ], - "gsx$crashid": { - "$t": "178" - }, - "gsx$mishapdate": { - "$t": "4/5/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Djibouti" - }, - "gsx$mishaplocation": { - "$t": "somewhere in the Gulf of Aden" - }, - "gsx$narrative": { - "$t": "A Reaper crashed and sank in the Gulf of Aden. The Air Force Special Operations Command did not convene an Accident Investigation Board to produce a publicly releasable report. A spokesman for U.S. Africa Command said the Reaper experienced flight-control problems \"believed to be attributable to severe weather. As a precaution, the aircrew diverted the aircraft to international waters, where it crashed \nand sank in the Gulf of Aden...It is believed that severe turbulence and icing were the lead contributors to the aircraft malfunction.\"" - }, - "gsx$narrativelength": { - "$t": "542" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jmlwp" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "179" - }, - "content": { - "type": "text", - "$t": "mishapdate: 4/9/2013, mishapyear: 2013, mishapcountry: Mali, mishaplocation: in a classified location withheld by the U.S. military, narrative: A Predator crashed in Mali after a suspected engine failure related to the oil system, according to a statement from Air Force Special Operations Command. Command officials waited more than a year to convene an Accident Investigation Board to produce a publicly releasable report, citing the need to investigate other \"higher priority mishaps.\" The public report is pending. , narrativelength: 375, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jmlwp" - } - ], - "gsx$crashid": { - "$t": "179" - }, - "gsx$mishapdate": { - "$t": "4/9/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Mali" - }, - "gsx$mishaplocation": { - "$t": "in a classified location withheld by the U.S. military" - }, - "gsx$narrative": { - "$t": "A Predator crashed in Mali after a suspected engine failure related to the oil system, according to a statement from Air Force Special Operations Command. Command officials waited more than a year to convene an Accident Investigation Board to produce a publicly releasable report, citing the need to investigate other \"higher priority mishaps.\" The public report is pending. " - }, - "gsx$narrativelength": { - "$t": "375" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jcrxq" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "180" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/11/2013, mishapyear: 2013, mishapcountry: Afghanistan, mishaplocation: Kandahar Air Base, narrative: A Predator crashed after a broken crankshaft caused the engine to fail, according to Air Combat Command. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report., narrativelength: 207, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jcrxq" - } - ], - "gsx$crashid": { - "$t": "180" - }, - "gsx$mishapdate": { - "$t": "5/11/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "Kandahar Air Base" - }, - "gsx$narrative": { - "$t": "A Predator crashed after a broken crankshaft caused the engine to fail, according to Air Combat Command. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report." - }, - "gsx$narrativelength": { - "$t": "207" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/je6i7" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "181" - }, - "content": { - "type": "text", - "$t": "mishapdate: 5/13/2013, mishapyear: 2013, mishapcountry: United States, mishaplocation: 11 nautical miles west of Creech Air Force Base, narrative: An unarmed Predator crashed during a training flight after the variable pitch propeller system failed. About five hours into a flight, the propeller pitch suddenly changed, causing reverse thrust as the aircraft plunged to the ground. \"Okay, interesting. We are falling out of the sky,\" the pilot said, according to a voice-recorder transcript from the ground-control station. \"Boy, this is going to be tight.\" Investigators concluded that the primary cause was a failure of the variable pitch propeller servomotor because of a bad electrical connection. Investigators concluded that a contributory factor was channelized attention on the part of the crew, which failed to notice that the propeller pitch had been locked in a fixed position for much of the flight., narrativelength: 764, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,511,500, photo: 3" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/je6i7" - } - ], - "gsx$crashid": { - "$t": "181" - }, - "gsx$mishapdate": { - "$t": "5/13/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "11 nautical miles west of Creech Air Force Base" - }, - "gsx$narrative": { - "$t": "An unarmed Predator crashed during a training flight after the variable pitch propeller system failed. About five hours into a flight, the propeller pitch suddenly changed, causing reverse thrust as the aircraft plunged to the ground. \"Okay, interesting. We are falling out of the sky,\" the pilot said, according to a voice-recorder transcript from the ground-control station. \"Boy, this is going to be tight.\" Investigators concluded that the primary cause was a failure of the variable pitch propeller servomotor because of a bad electrical connection. Investigators concluded that a contributory factor was channelized attention on the part of the crew, which failed to notice that the propeller pitch had been locked in a fixed position for much of the flight." - }, - "gsx$narrativelength": { - "$t": "764" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,511,500" - }, - "gsx$photo": { - "$t": "3" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jfl2k" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "182" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/5/2013, mishapyear: 2013, mishapcountry: Afghanistan, mishaplocation: just northeast of Camp Leatherneck, Helmand province, narrative: A drone cargo helicopter crashed while landing at Camp Leatherneck. Marine officials said a publicly releasable accident investigation was not conducted., narrativelength: 153, dronetype: K-MAX, dronename: K-MAX, ownerservice: Marine Corps, ownerservicedupe: Marine Corps" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jfl2k" - } - ], - "gsx$crashid": { - "$t": "182" - }, - "gsx$mishapdate": { - "$t": "6/5/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "just northeast of Camp Leatherneck, Helmand province" - }, - "gsx$narrative": { - "$t": "A drone cargo helicopter crashed while landing at Camp Leatherneck. Marine officials said a publicly releasable accident investigation was not conducted." - }, - "gsx$narrativelength": { - "$t": "153" - }, - "gsx$dronetype": { - "$t": "K-MAX" - }, - "gsx$dronename": { - "$t": "K-MAX" - }, - "gsx$ownerservice": { - "$t": "Marine Corps" - }, - "gsx$ownerservicedupe": { - "$t": "Marine Corps" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jgzn1" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "183" - }, - "content": { - "type": "text", - "$t": "mishapdate: 6/27/2013, mishapyear: 2013, mishapcountry: Afghanistan, mishaplocation: Jalalabad, narrative: An armed Predator crashed 800 feet past the departure end of the runway, landing near some trees and a farm. Air Force investigators concluded the primary cause was a turbocharger failure and gusty winds during the attempted landing. The accident investigation report stated that Predator drones have \"experienced an abnormally high rate of turbocharger failures in recent months.\" An Air Force master sergeant told investigators that turbocharger problems had worsened after the Air Force upgraded to a new style of turbocharger about a year before. , narrativelength: 551, dronetype: MQ-1, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,511,499, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jgzn1" - } - ], - "gsx$crashid": { - "$t": "183" - }, - "gsx$mishapdate": { - "$t": "6/27/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "Jalalabad" - }, - "gsx$narrative": { - "$t": "An armed Predator crashed 800 feet past the departure end of the runway, landing near some trees and a farm. Air Force investigators concluded the primary cause was a turbocharger failure and gusty winds during the attempted landing. The accident investigation report stated that Predator drones have \"experienced an abnormally high rate of turbocharger failures in recent months.\" An Air Force master sergeant told investigators that turbocharger problems had worsened after the Air Force upgraded to a new style of turbocharger about a year before. " - }, - "gsx$narrativelength": { - "$t": "551" - }, - "gsx$dronetype": { - "$t": "MQ-1" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,511,499" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jtmqq" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "184" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/17/2013, mishapyear: 2013, mishapcountry: United States, mishaplocation: Tyndall Air Force Base, Fla., narrative: An aerial target drone crashed about eight seconds after takeoff, destroying the aircraft and inflicting about $150,000 in damage to the runway and a barrier. The aircraft pitched up and down rapidly as soon as it climbed into the air. \"Drone just pitched up. Drone's pitching over. Drone is uh, crashed and destructed, at uh, the end of the runway,\" a pilot in a chase plane reported, according to a voice-recording transcript. Investigators determined that the primary cause was a defective portion of the Attitude Heading Reference System, which controls the up and down movement of the aircraft. \"This is not the first pitch malfunction on takeoff that we've had. It's happened on several different occasions. I don't know if the Air Force has conducted accident investigations on previous ones,\" a civilian contractor told investigators., narrativelength: 842, dronetype: QF-4E, dronename: Phantom, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $4,564,536, photo: 1" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jtmqq" - } - ], - "gsx$crashid": { - "$t": "184" - }, - "gsx$mishapdate": { - "$t": "7/17/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Tyndall Air Force Base, Fla." - }, - "gsx$narrative": { - "$t": "An aerial target drone crashed about eight seconds after takeoff, destroying the aircraft and inflicting about $150,000 in damage to the runway and a barrier. The aircraft pitched up and down rapidly as soon as it climbed into the air. \"Drone just pitched up. Drone's pitching over. Drone is uh, crashed and destructed, at uh, the end of the runway,\" a pilot in a chase plane reported, according to a voice-recording transcript. Investigators determined that the primary cause was a defective portion of the Attitude Heading Reference System, which controls the up and down movement of the aircraft. \"This is not the first pitch malfunction on takeoff that we've had. It's happened on several different occasions. I don't know if the Air Force has conducted accident investigations on previous ones,\" a civilian contractor told investigators." - }, - "gsx$narrativelength": { - "$t": "842" - }, - "gsx$dronetype": { - "$t": "QF-4E" - }, - "gsx$dronename": { - "$t": "Phantom" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$4,564,536" - }, - "gsx$photo": { - "$t": "1" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jv1b7" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "185" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/23/2013, mishapyear: 2013, mishapcountry: United States, mishaplocation: Cannon Air Force Base, N.M., narrative: A Reaper crashed on the runway at Cannon Air Force Base. Air Force officials did not disclose other details. The Air Force Special Operations Command convened an Accident Investigation Board; a publicly releasable report is pending., narrativelength: 232, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jv1b7" - } - ], - "gsx$crashid": { - "$t": "185" - }, - "gsx$mishapdate": { - "$t": "7/23/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Cannon Air Force Base, N.M." - }, - "gsx$narrative": { - "$t": "A Reaper crashed on the runway at Cannon Air Force Base. Air Force officials did not disclose other details. The Air Force Special Operations Command convened an Accident Investigation Board; a publicly releasable report is pending." - }, - "gsx$narrativelength": { - "$t": "232" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jwfvk" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "186" - }, - "content": { - "type": "text", - "$t": "mishapdate: 7/24/2013, mishapyear: 2013, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed short of the runway while attempting an emergency landing. The drone lost fuel pressure, so the civilian contractors who were flying it tried to return it to the base. The engine failed before it could land, according to Army safety officials. The Army said it did not produce a publicly releasable investigative report., narrativelength: 341, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jwfvk" - } - ], - "gsx$crashid": { - "$t": "186" - }, - "gsx$mishapdate": { - "$t": "7/24/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Gray Eagle crashed short of the runway while attempting an emergency landing. The drone lost fuel pressure, so the civilian contractors who were flying it tried to return it to the base. The engine failed before it could land, according to Army safety officials. The Army said it did not produce a publicly releasable investigative report." - }, - "gsx$narrativelength": { - "$t": "341" - }, - "gsx$dronetype": { - "$t": "MQ-1C" - }, - "gsx$dronename": { - "$t": "Gray Eagle" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jxug1" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "187" - }, - "content": { - "type": "text", - "$t": "mishapdate: 8/14/2013, mishapyear: 2013, mishapcountry: Afghanistan, narrative: A Warrior crashed after losing control links while in flight, according to Army safety officials who gave no other details. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request in October 2013 for the report., narrativelength: 241, dronetype: MQ-1B, dronename: Warrior, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jxug1" - } - ], - "gsx$crashid": { - "$t": "187" - }, - "gsx$mishapdate": { - "$t": "8/14/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Warrior crashed after losing control links while in flight, according to Army safety officials who gave no other details. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request in October 2013 for the report." - }, - "gsx$narrativelength": { - "$t": "241" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Warrior" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jo0h2" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "188" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/17/2013, mishapyear: 2013, mishapcountry: Italy, mishaplocation: Mediterranean Sea, about 20 miles southeast of Catania, Sicily, narrative: An unarmed Predator crashed into the sea off the coast of Sicily while in a holding pattern after conducting a 20-hour surveillance mission over North Africa. The cause was the failure of the power converter in a critical control module, according to an Air Force investigation. The satellite link was lost after a spike in electrical current. \"All indications to me made it look like a lost link, but the warnings made it look like an engine failure,\" the pilot told investigators. \"But all the warnings I saw were nothing I had seen before.\" Only one wing of the aircraft was recovered., narrativelength: 588, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $5,306,000, photo: 2" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jo0h2" - } - ], - "gsx$crashid": { - "$t": "188" - }, - "gsx$mishapdate": { - "$t": "9/17/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Italy" - }, - "gsx$mishaplocation": { - "$t": "Mediterranean Sea, about 20 miles southeast of Catania, Sicily" - }, - "gsx$narrative": { - "$t": "An unarmed Predator crashed into the sea off the coast of Sicily while in a holding pattern after conducting a 20-hour surveillance mission over North Africa. The cause was the failure of the power converter in a critical control module, according to an Air Force investigation. The satellite link was lost after a spike in electrical current. \"All indications to me made it look like a lost link, but the warnings made it look like an engine failure,\" the pilot told investigators. \"But all the warnings I saw were nothing I had seen before.\" Only one wing of the aircraft was recovered." - }, - "gsx$narrativelength": { - "$t": "588" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$5,306,000" - }, - "gsx$photo": { - "$t": "2" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jpf1j" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "189" - }, - "content": { - "type": "text", - "$t": "mishapdate: 9/23/2013, mishapyear: 2013, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed into a ridge while attempting to return to base for an emergency landing. About 2.5 hours into a flight, the aircraft experienced low manifold pressure and signs of engine failure, according to Army safety officials. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request in October 2013 for the report. , narrativelength: 356, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jpf1j" - } - ], - "gsx$crashid": { - "$t": "189" - }, - "gsx$mishapdate": { - "$t": "9/23/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Gray Eagle crashed into a ridge while attempting to return to base for an emergency landing. About 2.5 hours into a flight, the aircraft experienced low manifold pressure and signs of engine failure, according to Army safety officials. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request in October 2013 for the report. " - }, - "gsx$narrativelength": { - "$t": "356" - }, - "gsx$dronetype": { - "$t": "MQ-1C" - }, - "gsx$dronename": { - "$t": "Gray Eagle" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jqtlw" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "190" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/16/2013, mishapyear: 2013, mishapcountry: Afghanistan, narrative: A Gray Eagle crashed on the runway after the controller lost its link with the aircraft, according to Army safety officials. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request for the report filed in October 2013., narrativelength: 248, dronetype: MQ-1C, dronename: Gray Eagle, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/jqtlw" - } - ], - "gsx$crashid": { - "$t": "190" - }, - "gsx$mishapdate": { - "$t": "10/16/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Gray Eagle crashed on the runway after the controller lost its link with the aircraft, according to Army safety officials. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request for the report filed in October 2013." - }, - "gsx$narrativelength": { - "$t": "248" - }, - "gsx$dronetype": { - "$t": "MQ-1C" - }, - "gsx$dronename": { - "$t": "Gray Eagle" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/js86d" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "191" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/24/2013, mishapyear: 2013, mishapcountry: United States, mishaplocation: Naval Air Station Patuxent, Md., narrative: A helicopter drone sustained damage during a hard landing after a test flight. A Navy investigation is pending., narrativelength: 111, dronetype: MQ-8B, dronename: Fire Scout, ownerservice: Navy, ownerservicedupe: Navy" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/js86d" - } - ], - "gsx$crashid": { - "$t": "191" - }, - "gsx$mishapdate": { - "$t": "10/24/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "Naval Air Station Patuxent, Md." - }, - "gsx$narrative": { - "$t": "A helicopter drone sustained damage during a hard landing after a test flight. A Navy investigation is pending." - }, - "gsx$narrativelength": { - "$t": "111" - }, - "gsx$dronetype": { - "$t": "MQ-8B" - }, - "gsx$dronename": { - "$t": "Fire Scout" - }, - "gsx$ownerservice": { - "$t": "Navy" - }, - "gsx$ownerservicedupe": { - "$t": "Navy" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/f52je" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "192" - }, - "content": { - "type": "text", - "$t": "mishapdate: 10/30/2013, mishapyear: 2013, mishapcountry: United States, mishaplocation: about 6 miles northwest of Holloman Air Force Base; White Sands, N.M., narrative: A Predator crashed about six miles northwest of the runway at Holloman Air Force Base about 1:30 p.m. during a training mission. Air Force officials said pilots lost link with the aircraft. The Air Combat Command convened an Accident Investigation Board; the public report is pending., narrativelength: 284, dronetype: MQ-1B, dronename: Predator, ownerservice: Air Force, ownerservicedupe: Air Force" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/f52je" - } - ], - "gsx$crashid": { - "$t": "192" - }, - "gsx$mishapdate": { - "$t": "10/30/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "about 6 miles northwest of Holloman Air Force Base; White Sands, N.M." - }, - "gsx$narrative": { - "$t": "A Predator crashed about six miles northwest of the runway at Holloman Air Force Base about 1:30 p.m. during a training mission. Air Force officials said pilots lost link with the aircraft. The Air Combat Command convened an Accident Investigation Board; the public report is pending." - }, - "gsx$narrativelength": { - "$t": "284" - }, - "gsx$dronetype": { - "$t": "MQ-1B" - }, - "gsx$dronename": { - "$t": "Predator" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/f6h3v" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "193" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/12/2013, mishapyear: 2013, mishapcountry: United States, mishaplocation: about 12 miles from the eastern shore of Lake Ontario, N.Y.; 20 miles northeast of Port of Oswego, NY; and 35 miles from Fort Drum's Wheeler-Sack Army Airfield, narrative: A Reaper flown by the New York Air National Guard crashed into Lake Ontario, about 12 miles from the lake's eastern shore. The plane malfunctioned at 1:30 p.m., about three hours into a training mission. Some parts of the aircraft were recovered after they washed up on the lake's shoreline, but the bulk of the wreckage has not been found. The Reaper departed from Fort Drum, N.Y. The Air Combat Command convened an Accident Investigation Board; a public report is pending., narrativelength: 474, dronetype: MQ-9, dronename: Reaper, ownerservice: Air Force, ownerservicedupe: Air Force, damageestimate: $10 million" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/f6h3v" - } - ], - "gsx$crashid": { - "$t": "193" - }, - "gsx$mishapdate": { - "$t": "11/12/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "United States" - }, - "gsx$mishaplocation": { - "$t": "about 12 miles from the eastern shore of Lake Ontario, N.Y.; 20 miles northeast of Port of Oswego, NY; and 35 miles from Fort Drum's Wheeler-Sack Army Airfield" - }, - "gsx$narrative": { - "$t": "A Reaper flown by the New York Air National Guard crashed into Lake Ontario, about 12 miles from the lake's eastern shore. The plane malfunctioned at 1:30 p.m., about three hours into a training mission. Some parts of the aircraft were recovered after they washed up on the lake's shoreline, but the bulk of the wreckage has not been found. The Reaper departed from Fort Drum, N.Y. The Air Combat Command convened an Accident Investigation Board; a public report is pending." - }, - "gsx$narrativelength": { - "$t": "474" - }, - "gsx$dronetype": { - "$t": "MQ-9" - }, - "gsx$dronename": { - "$t": "Reaper" - }, - "gsx$ownerservice": { - "$t": "Air Force" - }, - "gsx$ownerservicedupe": { - "$t": "Air Force" - }, - "gsx$damageestimate": { - "$t": "$10 million" - }, - "gsx$photo": { - "$t": "" - } - }, - { - "id": { - "$t": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/f7vo8" - }, - "updated": { - "$t": "2014-06-21T21:47:02.025Z" - }, - "category": [ - { - "scheme": "http://schemas.google.com/spreadsheets/2006", - "term": "http://schemas.google.com/spreadsheets/2006#list" - } - ], - "title": { - "type": "text", - "$t": "194" - }, - "content": { - "type": "text", - "$t": "mishapdate: 11/13/2013, mishapyear: 2013, mishapcountry: Afghanistan, narrative: A Hunter drone crashed shortly after takeoff. The drone rose to 250 feet before it made an uncommanded descent and crashed on the runway, according to Army safety officials. The Army's Intelligence and Security Command, which operated the Hunter, said it did not conduct an accident investigation., narrativelength: 297, dronetype: MQ-5B, dronename: Hunter, ownerservice: Army, ownerservicedupe: Army" - }, - "link": [ - { - "rel": "self", - "type": "application/atom+xml", - "href": "https://spreadsheets.google.com/feeds/list/1-VfIjXSdI12kaTQgw_Vt0mJhNHoJJgOx1BdVqdKpjgQ/1/public/values/f7vo8" - } - ], - "gsx$crashid": { - "$t": "194" - }, - "gsx$mishapdate": { - "$t": "11/13/2013" - }, - "gsx$mishapyear": { - "$t": "2013" - }, - "gsx$mishapcountry": { - "$t": "Afghanistan" - }, - "gsx$mishaplocation": { - "$t": "" - }, - "gsx$narrative": { - "$t": "A Hunter drone crashed shortly after takeoff. The drone rose to 250 feet before it made an uncommanded descent and crashed on the runway, according to Army safety officials. The Army's Intelligence and Security Command, which operated the Hunter, said it did not conduct an accident investigation." - }, - "gsx$narrativelength": { - "$t": "297" - }, - "gsx$dronetype": { - "$t": "MQ-5B" - }, - "gsx$dronename": { - "$t": "Hunter" - }, - "gsx$ownerservice": { - "$t": "Army" - }, - "gsx$ownerservicedupe": { - "$t": "Army" - }, - "gsx$damageestimate": { - "$t": "" - }, - "gsx$photo": { - "$t": "" - } - } - ] - } - } - }] -} \ No newline at end of file diff --git a/test/image/mocks/sankey_1.json b/test/image/mocks/sankey_1.json deleted file mode 100644 index b18cae4b3b1..00000000000 --- a/test/image/mocks/sankey_1.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "layout": { - "width": 284, - "height": 400 - }, - - "data": [{ - - "type": "sankey", - - "line": { - "showscale": true, - "reversescale": true, - "colorscale": "Jet", - "cmin": -4000, - "cmax": -100, - "color": [-41, -1317, -164, -1856, -79, -931, -191, -2983, -341, -3846] - }, - - "dimensions": [ - { - "constraintrange": [200, 700], - "label": "Block height", - "values": [321, 534, 542, 674, 31, 674, 124, 246, 456, 743] - } - ] - }] -} \ No newline at end of file diff --git a/test/image/mocks/sankey_2.json b/test/image/mocks/sankey_2.json deleted file mode 100644 index ac16af2f2d5..00000000000 --- a/test/image/mocks/sankey_2.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "layout": { - "width": 500, - "height": 500 - }, - - "data": [{ - - "type": "sankey", - - "domain": { - "x": [0.2, 0.9], - "y": [0.2, 0.7] - }, - - "line": { - "showscale": true, - "reversescale": true, - "colorscale": "Jet", - "cmin": -4000, - "cmax": -100, - "color": [-41, -1317, -164, -1856, -79, -931, -191, -2983, -341, -3846] - }, - - "dimensions": [ - { - "constraintrange": [200, 700], - "label": "Block height", - "values": [321, 534, 542, 674, 31, 674, 124, 246, 456, 743] - }, - { - "label": "Block width", - "range": [0, 700000], - "values": [268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543] - } - ] - }] -} \ No newline at end of file diff --git a/test/image/mocks/sankey_large.json b/test/image/mocks/sankey_large.json deleted file mode 100644 index 38abf9b0d06..00000000000 --- a/test/image/mocks/sankey_large.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "layout": { - "width": 1184, - "height": 400, - "title": "Widget parameters and cost", - "margin": {"t": 106, "r": 70, "b": 54, "l": 90} - }, - - "data": [{ - - "type": "sankey", - - "line": { - "showscale": true, - "reversescale": true, - "colorscale": "Jet", - "cmin": -4000, - "cmax": -100, - "color": [-41, -1317, -164, -1856, -79, -931, -191, -2983, -341, -3846, -278, -3019, -523, -2357, -985, -3447, -211, -2842, -458, -4388, -784, -2563, -935, -2253, -313, -3667, -1479, -1030, -632, -623, -1945, -1324, -1221, -878, -947, -1615, -697, -575, -482, -905, -869, -433, -484, -349, -667, -248, -1135, -888, -1019, -223, -2067, -729, -579, -659, -334, -340, -554, -455, -377, -375, -453, -834, -934, -334, -369, -290, -354, -497, -490, -329, -729, -1794, -151, -1162, -3935, -1013, -509, -825, -997, -320, -680, -422, -785, -542, -563, -489, -1283, -680, -78, -450, -514, -449, -548, -661, -641, -503, -570, -257, -394, -450, -586, -503, -437, -590, -622, -482, -3687, -2394, -773, -1029, -619, -1561, -543, -894, -1037, -705, -208, -325, -693, -652, -855, -642, -317, -435, -310, -329, -380, -371, -610, -406, -310, -1034, -700, -367, -337, -286, -856, -350, -576, -653, -219, -325, -1200, -49, -2664, -856, -344, -520, -766, -286, -291, -1334, -591, -346, -320, -342, -393, -503, -316, -280, -256, -307, -606, -269, -302, -443, -297, -272, -281, -288, -287, -302, -414, -312, -1196, -214, -245, -282, -315, -268, -966, -270, -315, -248, -502, -316, -299, -256, -358, -276, -288, -331, -282, -845, -409, -293, -292, -481, -291, -271, -279, -270, -4948, -402, -280, -261, -293, -765, -162, -265, -266, -253, -869, -237, -285, -276, -225, -229, -446, -567, -272, -876, -260, -251, -284, -2709, -263, -3948, -479, -269, -959, -267, -762, -252, -263, -251, -485, -753, -362, -257, -910, -972, -233, -455, -673, -272, -259, -243, -616, -628, -262, -232, -733, -236, -247, -479, -983, -240, -306, -256, -2269, -262, -106, -225, -893, -238, -253, -373, -476, -234, -469, -354, -219, -731, -255, -262, -317, -275, -518, -894, -251, -3278, -1219, -256, -261, -304, -241, -251, -253, -140, -877, -231, -261, -319, -259, -250, -246, -279, -245, -262, -257, -752, -238, -311, -298, -253, -280, -296, -285, -280, -265, -503, -260, -890, -555, -289, -246, -256, -241, -286, -247, -1881, -267, -225, -252, -911, -283, -250, -466, -269, -241, -270, -259, -908, -255, -447, -432, -244, -373, -816, -391, -3466, -1384, -937, -490, -629, -837, -900, -385, -290, -249, -256, -422, -224, -210, -235, -191, -318, -960, -250, -1124, -254, -247, -639, -291, -487, -229, -225, -258, -513, -466, -347, -216, -313, -250, -242, -310, -234, -377, -234, -247, -891, -293, -242, -830, -227, -654, -238, -1341, -487, -263, -246, -240, -219, -717, -247, -730, -385, -226, -257, -238, -259, -246, -253, -418, -259, -247, -468, -270, -273, -228, -518, -262, -1035, -242, -257, -276, -1165, -252, -1456, -416, -1974, -267, -1211, -437, -481, -1143, -252, -321, -234, -891, -705, -667, -246, -771, -907, -978, -80, -272, -285, -1236, -249, -589, -96, -349, -155, -241, -239, -235, -247, -264, -557, -298, -338, -428, -238, -236, -1515, -257, -415, -389, -267, -477, -1628, -237, -248, -265, -237, -304, -229, -297, -238, -236, -243, -265, -461, -1370, -241, -948, -389, -341, -336, -603, -449, -245, -1716, -258, -66, -397, -289, -985, -299, -1063, -260, -428, -254, -254, -566, -264, -258, -911, -1156, -268, -399, -245, -430, -263, -1083, -286, -1307, -442, -217, -268, -1223, -226, -419, -281, -629, -1145, -297, -247, -341, -1003, -414, -1312, -368, -998, -343, -760, -1214, -264, -1336, -932, -1188, -268, -395, -851, -262, -797, -478, -251, -298, -833, -788, -532, -1440, -1135, -444, -913, -1876, -395, -845, -734, -1458, -843, -994, -688, -438, -349, -724, -208, -764, -722, -493, -703, -423, -465, -431, -482, -385, -1141, -1228, -689, -439, -334, -386, -761, -466, -634, -328, -477, -2190, -652, -736, -490, -394, -497, -306, -426, -395, -1566, -297, -452, -328, -271, -341, -340, -279, -363, -346, -340, -323, -462, -341, -334, -1320, -275, -304, -523, -408, -340, -315, -314, -480, -335, -328, -294, -1142, -403, -1115, -416, -155, -254, -412, -468, -873, -752, -332, -324, -731, -344, -551, -514, -303, -335, -81, -320, -286, -371, -313, -289, -282, -294, -348, -345, -758, -1006, -964, -386, -1166, -283, -501, -931, -638, -363, -474, -354, -1394, -314, -324, -365, -385, -293, -951, -316, -1082, -943, -243, -554, -303, -265, -1044, -889, -304, -938, -302, -317, -302, -290, -523, -314, -272, -917, -277, -311, -943, -836, -414, -490, -319, -289, -298, -317, -285, -267, -309, -323, -357, -277, -335, -278, -300, -742, -897, -353, -3626, -284, -287, -418, -343, -1691, -314, -270, -239, -1182, -1260, -329, -273, -311, -283, -935, -469, -256, -281, -272, -222, -1116, -417, -281, -227, -278, -933, -429, -281, -310, -940, -278, -262, -271, -263, -266, -265, -249, -263, -264, -273, -249, -258, -244, -776, -228, -247, -237, -275, -673, -712, -415, -224, -305, -248, -252, -226, -252, -896, -960, -259, -270, -234, -1483, -235, -276, -259, -946, -379, -250, -241, -249, -1238, -247, -1602, -453, -240, -1193, -238, -636, -1053, -258, -245, -1337, -441, -253, -1179, -267, -850, -678, -336, -275, -257, -276, -244, -227, -1657, -294, -932, -359, -256, -496, -1201, -423, -243, -474, -724, -237, -1016, -1814, -269, -214, -1019, -239, -256, -478, -544, -241, -473, -289, -303, -415, -261, -249, -259, -257, -259, -339, -241, -229, -245, -616, -303, -1142, -260, -250, -442, -294, -85, -1252, -1201, -285, -255, -373, -291, -249, -268, -245, -459, -841, -254, -247, -425, -935, -1043, -248, -250, -401, -268, -225, -414, -252, -339, -292, -961, -231, -874, -1041, -1530, -291, -1264, -667, -235, -259, -243, -239, -246, -882, -236, -484, -224, -242, -1247, -543, -247, -1323, -256, -234, -224, -257, -1255, -209, -307, -238, -240, -281, -3366, -639, -676, -303, -234, -255, -229, -751, -265, -232, -232, -239, -479, -264, -243, -314, -344, -1073, -263, -221, -253, -209, -337, -210, -210, -312, -295, -976, -118, -224, -978, -406, -250, -250, -304, -398, -1350, -259, -269, -241, -401, -248, -238, -1325, -248, -248, -269, -276, -850, -247, -216, -291, -1012, -243, -266, -253, -398, -895, -225, -361, -260, -248, -955, -1530, -260, -275, -271, -272, -258, -1096, -280, -262, -227, -247, -607, -245, -262, -240, -242, -248, -245, -403, -268, -253, -246, -241, -243, -243, -419, -246, -81, -257, -372, -252, -237, -249, -261, -246, -236, -252, -262, -252, -310, -238, -241, -271, -818, -236, -277, -238, -255, -238, -261, -239, -219, -249, -244, -200, -235, -263, -379, -372, -270, -260, -234, -713, -1011, -265, -259, -231, -468, -256, -167, -710, -534, -268, -313, -274, -258, -711, -260, -248, -255, -1015, -468, -514, -232, -455, -226, -358, -219, -270, -250, -129, -239, -247, -305, -264, -274, -244, -370, -1115, -230, -1834, -252, -946, -240, -249, -235, -755, -248, -1036, -244, -230, -226, -1166, -629, -311, -253, -900, -245, -907, -268, -251, -309, -248, -307, -241, -238, -820, -236, -285, -751, -232, -250, -236, -246, -754, -977, -925, -277, -894, -240, -224, -246, -56, -500, -249, -791, -1523, -225, -243, -315, -231, -267, -439, -232, -223, -238, -243, -276, -240, -259, -261, -314, -256, -323, -245, -261, -414, -286, -89, -232, -268, -818, -764, -1122, -652, -518, -279, -1081, -241, -262, -234, -171, -992, -274, -444, -321, -248, -884, -714, -231, -258, -215, -825, -246, -530, -282, -438, -259, -260, -374, -627, -578, -603, -794, -965, -227, -237, -224, -431, -242, -236, -245, -492, -242, -779, -242, -219, -246, -224, -364, -265, -188, -1278, -1909, -384, -51, -1974, -36, -225, -573, -878, -292, -213, -2668, -251, -1161, -906, -697, -914, -261, -474, -320, -564, -314, -536, -331, -274, -262, -261, -753, -815, -254, -294, -273, -259, -1798, -226, -297, -222, -258, -791, -1254, -254, -767, -259, -245, -304, -235, -260, -275, -940, -244, -843, -279, -262, -282, -1031, -233, -265, -983, -259, -256, -254, -278, -699, -1391, -1412, -285, -106, -768, -241, -372, -276, -121, -274, -257, -276, -1039, -560, -1277, -260, -267, -547, -239, -118, -423, -239, -1278, -893, -366, -352, -505, -1450, -1063, -233, -710, -500, -227, -239, -937, -784, -564, -231, -601, -281, -509, -256, -229, -264, -589, -1738, -322, -589, -868, -253, -248, -945, -128, -309, -953, -3122, -1375, -227, -251, -250, -255, -1133, -307, -247, -247, -128, -322, -283, -307, -728, -922, -257, -255, -226, -509, -221, -3099, -501, -884, -317, -961, -1064, -738, -216, -252, -933, -988, -369, -322, -324, -234, -433, -677, -386, -301, -544, -3013, -362, -320, -938, -430, -315, -349, -299, -287, -798, -331, -331, -522, -379, -277, -579, -342, -263, -255, -426, -278, -770, -269, -825, -875, -449, -248, -247, -265, -990, -446, -222, -1037, -110, -218, -417, -290, -388, -2178, -247, -522, -3693, -266, -248, -811, -427, -231, -339, -247, -457, -264, -549, -1122, -285, -971, -243, -1121, -277, -575, -447, -297, -670, -262, -500, -747, -214, -611, -727, -601, -1677, -814, -875, -234, -606, -504, -222, -943, -3983, -1216, -352, -199, -975, -3352, -314, -204, -963, -437, -1236, -331, -226, -281, -1188, -331, -658, -539, -318, -441, -291, -244, -294, -276, -267, -879, -258, -259, -261, -841, -408, -569, -796, -228, -308, -278, -287, -463, -522, -439, -301, -275, -780, -557, -260, -427, -302, -266, -268, -164, -314, -932, -290, -497, -309, -1000, -1786, -288, -237, -283, -548, -311, -288, -426, -303, -110, -82, -284, -338, -261, -285, -1551, -98, -283, -478, -4001, -262, -406, -460, -298, -357, -224, -274, -872, -90, -1089, -949, -407, -210, -541, -274, -860, -818, -2829, -240, -265, -235, -929, -574, -365, -599, -312, -377, -914, -322, -234, -251, -300, -247, -236, -240, -503, -217, -258, -258, -234, -906, -239, -262, -747, -253, -1855, -261, -451, -775, -265, -544, -413, -932, -268, -755, -1312, -698, -3463, -766, -383, -265, -509, -262, -297, -684, -407, -232, -1317, -407, -785, -458, -381, -317, -263, -282, -193, -471, -240, -637, -225, -1066, -313, -452, -803, -321, -1316, -245, -253, -1015, -258, -459, -265, -237, -281, -263, -248, -250, -254, -269, -769, -1479, -240, -260, -363, -254, -975, -248, -703, -351, -384, -257, -315, -259, -266, -271, -1136, -243, -278, -400, -905, -361, -642, -456, -362, -257, -242, -264, -1300, -255, -1413, -250, -968, -225, -255, -324, -278, -283, -425, -265, -454, -412, -1002, -316, -281, -243, -252, -1125, -336, -905, -291, -389, -602, -323, -296, -307, -108, -392, -246, -254, -254, -219, -282, -275, -607, -532, -436, -237, -218, -1216, -259, -249, -1838, -268, -215, -203, -265, -287, -808, -913, -1299, -1845, -791, -247, -714, -2586, -1130, -441, -398, -387, -226, -731, -186, -2805, -294, -954, -267, -751, -159, -307, -254, -290, -253, -277, -273, -262, -249, -503, -255, -248, -393, -272, -668, -990, -1045, -306, -244, -982, -788, -775, -1011, -1174, -1431, -141, -429, -285, -236, -217, -240, -1035, -143, -292, -808, -637, -223, -386, -871, -3825, -862, -352, -1761, -609, -906, -605, -300, -326, -438, -964, -467, -790, -249, -238, -1371, -721, -356, -261, -284, -300, -1071, -423, -649, -605, -341, -308, -85, -266, -672, -283, -271, -1070, -412, -293, -1622, -375, -226, -348, -458, -279, -254, -296, -235, -279, -399, -443, -287, -301, -500, -1182, -374, -238, -318, -101, -2923, -80, -427, -279, -267, -933, -812, -243, -822, -255, -263, -270, -259, -282, -229, -275, -250, -271, -236, -363, -182, -1314, -259, -260, -260, -1208, -147, -451, -276, -294, -85, -1024, -255, -312, -1283, -296, -277, -472, -210, -1021, -226, -235, -1046, -1677, -282, -215, -724, -1105, -262, -296, -333, -261, -274, -216, -239, -251, -293, -500, -892, -67, -1020, -971, -585, -889, -83, -210, -1002, -311, -269, -416, -706, -890, -246, -407, -675, -647, -266, -288, -855, -619, -964, -264, -276, -851, -347, -545, -788, -1030, -942, -442, -236, -246, -222, -330, -970, -506, -248, -694, -260, -469, -320, -218, -422, -297, -255, -1382, -251, -267, -1026, -574, -1076, -88, -347, -466, -86, -343, -2118, -423, -955, -470, -445, -935, -347, -308, -426, -289, -242, -582, -296, -249, -289, -273, -255, -300, -292, -409, -305, -883, -1238, -933, -260, -466, -292, -309, -400, -304, -89, -255, -301, -141, -227, -263, -48, -415, -243, -437, -359, -203, -263, -255, -306, -252, -277, -458, -849, -230, -213, -480, -358, -370, -649, -287, -227, -247, -267, -261, -383, -258, -300, -1203, -305, -840, -273, -260, -329, -234, -288, -283, -287, -245, -299, -240, -276, -1009, -183, -251, -329, -452, -265, -472, -710, -1232, -255, -265, -913, -343, -431, -288, -1293, -358, -262, -282, -245, -258, -233, -266, -238, -494, -217, -263, -248, -83, -287, -299, -368, -188, -271, -488, -1314, -244, -879, -276, -876, -408, -104, -237, -416, -97, -259, -545, -216, -1066, -806, -530, -277, -485, -283, -330, -1282, -277, -327, -248, -943, -782, -287, -260, -311, -252, -297, -117, -345, -892, -323, -268, -339, -259, -279, -254, -234, -257, -258, -84, -233, -292, -229, -250, -768, -259, -783, -251, -384, -1574, -459, -345, -259, -987, -244, -242, -279, -317, -266, -249, -1029, -262, -330, -104, -274, -1317, -268, -3084, -264, -546, -248, -322, -276, -261, -1147, -459, -247, -983, -1307, -262, -272, -98, -3188, -260, -1776, -233, -239, -329, -171, -241, -252, -370, -228, -1478, -238, -269, -252, -458, -788, -82, -387, -643, -1383, -860, -239, -250, -954, -252, -405, -261, -778, -369, -245, -339, -263, -270, -565, -235, -243, -283, -1181, -267, -299, -196, -2322, -1029, -579, -2459, -259, -250, -289, -810, -262, -904, -284, -246, -1027, -896, -882, -1115, -405, -685, -1152, -417, -856, -405, -257, -957, -252, -288, -259, -903, -444, -472, -932, -244, -1112, -277, -484, -309, -354, -698, -272, -304, -638, -915, -260, -938, -349, -2327, -795, -222, -2182, -330, -294, -127, -1030, -378, -1591, -277, -1031, -328, -796, -543, -535, -810, -150, -1074, -274, -127, -295, -1071, -405, -237, -1242, -256, -483, -842, -541, -550, -240, -252, -927, -244, -263, -516, -1047, -896, -90, -258, -89, -263, -101, -318, -264, -297, -922, -253, -242, -258, -234, -1071, -288, -302, -239, -264, -254, -234, -575, -216, -259, -623, -267, -256, -1026, -239, -443, -1010, -1410, -1119, -235, -435, -202, -658, -293, -411, -272, -801, -534, -271, -1721, -246, -254, -524, -2910, -357, -535, -243, -483, -1456, -728, -384, -678, -833, -528, -440, -795, -410, -300, -318, -188, -257, -524, -329, -252, -445, -264, -1138, -289, -419, -242, -2986, -303, -444, -319, -681, -1078, -256, -1100, -244, -241, -282, -1034, -267, -603, -1060, -490, -374, -277, -267, -282, -264, -444, -269, -260, -278, -227, -321, -242, -769, -572, -811, -250, -236, -318, -493, -1200, -497, -953, -1612, -448, -495, -1456, -362, -519, -975, -953, -278, -216, -2591, -3872, -130, -368, -940, -309, -547, -264, -39, -620, -343, -897, -1274, -234, -2464, -258, -155, -226, -854, -297, -243, -686, -285, -360, -1256, -275, -455, -285, -221, -240, -267, -268, -276, -374, -248, -699, -275, -1098, -370, -358, -223, -263, -789, -248, -2618, -571, -826, -917, -361, -223, -2277, -257, -725, -1135, -989, -2561, -2975, -470, -677, -429, -1139, -226, -661, -559, -189, -257, -1147, -615, -1260, -286, -106, -609, -617, -754, -602, -333, -945, -492, -1027, -293, -248, -260, -95, -929, -1380, -290, -272, -290, -2285, -570, -429, -648, -635, -1086, -321, -410, -286, -406, -300, -283, -250, -1162, -254, -459, -317, -228, -280, -997, -827, -313, -290, -349, -1027, -524, -303, -1103, -330, -389, -447, -428, -184, -869, -2244, -257, -250, -275, -2377, -368, -889, -320, -1095, -573, -277, -320, -981, -231, -240, -483, -539, -236, -410, -450, -1044, -510, -387, -238, -149, -262, -289, -1478, -1332, -258, -533, -238, -1092, -801, -536, -277, -1104, -324, -603, -558, -545, -390, -536, -338, -345, -346, -1140, -389, -367, -337, -367, -346, -273, -291, -225, -294, -369, -243, -310, -274, -295, -307, -301, -1297, -2212, -274, -97, -248, -269, -616, -347, -462, -322, -236, -434, -495, -286, -262, -229, -92, -301, -309, -262, -272, -278, -293, -288, -238, -235, -292, -267, -303, -1006, -255, -954, -601, -169, -1422, -1413, -437, -830, -257, -215, -1204, -1546] - }, - - "dimensions": [ - { - "constraintrange": [100000, 150000], - "label": "Block height", - "values": [32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 86600, 163400, 162600, 90000, 93100, 163000, 140500, 130000, 100700, 164500, 147700, 121700, 107500, 176600, 133600, 111100, 93100, 72400, 130100, 54500, 182600, 160300, 218100, 66500, 95800, 164800, 107200, 101600, 91100, 91100, 78100, 63300, 75700, 69600, 88500, 115800, 195700, 88900, 74800, 65400, 74900, 115300, 91400, 67800, 85300, 171300, 32000, 227900, 163200, 122899, 112300, 101500, 111199, 73300, 120800, 93100, 117200, 118500, 104800, 108500, 146500, 90300, 32000, 93000, 110700, 103500, 93300, 106300, 118500, 93000, 67600, 51400, 89000, 94000, 88200, 109600, 102100, 123600, 81900, 100000, 218100, 223200, 97300, 162100, 97400, 145800, 67400, 156500, 201900, 94300, 67800, 76100, 98300, 112400, 141800, 111400, 74700, 67300, 71100, 68900, 62100, 73800, 85500, 94400, 68300, 79400, 96300, 70400, 67300, 67300, 128400, 80800, 87600, 165900, 35900, 76200, 79000, 38900, 157200, 64400, 67700, 65700, 125800, 59300, 66100, 198700, 96100, 65600, 70300, 69200, 65500, 129300, 62600, 64200, 61800, 60800, 83100, 58800, 69600, 60400, 63500, 63500, 59300, 56600, 77200, 62900, 57300, 68000, 227900, 53099, 59100, 63099, 65900, 60500, 158100, 60199, 66600, 57699, 58900, 62699, 62000, 58600, 78700, 60700, 60400, 66000, 66000, 133300, 60800, 63200, 60400, 68400, 64600, 61400, 61900, 59000, 155600, 53500, 62000, 60599, 63700, 118500, 48000, 57400, 58200, 56800, 62300, 54500, 61300, 62200, 53200, 51600, 88500, 125100, 60800, 61500, 59200, 56300, 60800, 179300, 58300, 199500, 102100, 60800, 183200, 58800, 125000, 56900, 58600, 53700, 56100, 127600, 96100, 56700, 120500, 58600, 53600, 59000, 113800, 59000, 59200, 54500, 135700, 161200, 57300, 53000, 127000, 54600, 55300, 89700, 59400, 54900, 64700, 56200, 127100, 57000, 35400, 51800, 170100, 54000, 56700, 73600, 83200, 53000, 60500, 52699, 51600, 92100, 56600, 57400, 65500, 58400, 97600, 52900, 56700, 207600, 221900, 56500, 57600, 63900, 54700, 56900, 56000, 49700, 51600, 53400, 58500, 65000, 57100, 55900, 56100, 59800, 55300, 57699, 57600, 53200, 53900, 63000, 58400, 57500, 61200, 62699, 61000, 60199, 57600, 128800, 57699, 59900, 94200, 60900, 55100, 56300, 54100, 61400, 55000, 223100, 57699, 52200, 55300, 54000, 61000, 54800, 59500, 59000, 54400, 57800, 57100, 53200, 56300, 58300, 56100, 53900, 55100, 54100, 59500, 188900, 92300, 105500, 67100, 100000, 202500, 101800, 55900, 86800, 55300, 56700, 59400, 51400, 49000, 54600, 49400, 65300, 56800, 55599, 184500, 55000, 55000, 86900, 60100, 89700, 52500, 52500, 55500, 91700, 104600, 67500, 50700, 63300, 55400, 54500, 62600, 52699, 54100, 53400, 54800, 53200, 59900, 74500, 134800, 52400, 105300, 53700, 215200, 101700, 57200, 54400, 60300, 50800, 129400, 55100, 165700, 55000, 51700, 56000, 54000, 56500, 54500, 56000, 78600, 56300, 54700, 59600, 58300, 58800, 52400, 54500, 57100, 119100, 50100, 56500, 58900, 66500, 55599, 225400, 57699, 97200, 57000, 212900, 57300, 101600, 216500, 55400, 65800, 53000, 164200, 124600, 86300, 56000, 95200, 152700, 208299, 32000, 60400, 60700, 196600, 55000, 77200, 37500, 52000, 55300, 54100, 53500, 52800, 55100, 60100, 125000, 62400, 63700, 106900, 54300, 54100, 217500, 56400, 69700, 101000, 57500, 55100, 153500, 53700, 54700, 58099, 53900, 37000, 53200, 62000, 52100, 53900, 54500, 61600, 59700, 218200, 54700, 189200, 55599, 70600, 63700, 107100, 68800, 55700, 56400, 57400, 32000, 83200, 61200, 217900, 62100, 62400, 60900, 60700, 56300, 57600, 105399, 60000, 56700, 221200, 157700, 58200, 58099, 54700, 60900, 61300, 162600, 60900, 224600, 57699, 52699, 59600, 71200, 52100, 57500, 60500, 134900, 67200, 63700, 55000, 65199, 161600, 80300, 70000, 73300, 56200, 68400, 183700, 180100, 56400, 77600, 197800, 215799, 56600, 73300, 57500, 57500, 55199, 54800, 55900, 63300, 106400, 163200, 70800, 71900, 166000, 114100, 100900, 164300, 93600, 150000, 98200, 161400, 200400, 92600, 127600, 97600, 84400, 96600, 55599, 100500, 112000, 110000, 89800, 97700, 84200, 79600, 102400, 84800, 86900, 166600, 91300, 79600, 78100, 85800, 88200, 104200, 76600, 83300, 110800, 75600, 76100, 113800, 86400, 86800, 74800, 77100, 95200, 86900, 172300, 69700, 87500, 79600, 65300, 80800, 82400, 67100, 79400, 78500, 84800, 76100, 47200, 79400, 78200, 220300, 66100, 78300, 85900, 92100, 80800, 74500, 72800, 36200, 75800, 77400, 69600, 62600, 90700, 70700, 93100, 40400, 62600, 94400, 73600, 72000, 138200, 75400, 73300, 170700, 75500, 144500, 76600, 72000, 78200, 33200, 74100, 67900, 35300, 72000, 69900, 68600, 69400, 74300, 73400, 128400, 71800, 217399, 86500, 174200, 67800, 86500, 136800, 125399, 75200, 108000, 72700, 223900, 67300, 73600, 86500, 83800, 70900, 72900, 71300, 71800, 88600, 60300, 77200, 65300, 63300, 68900, 127100, 70700, 223600, 68700, 66000, 70800, 69000, 60599, 65700, 64200, 150700, 65000, 68700, 75800, 154200, 63300, 103400, 70200, 66400, 69200, 71000, 65700, 62300, 70100, 72200, 68700, 64600, 67600, 61800, 68100, 129200, 54900, 77600, 169700, 67100, 64100, 69300, 65700, 64600, 71800, 65199, 61800, 198400, 208800, 72100, 59800, 66200, 62900, 152500, 72200, 57600, 61300, 61900, 54900, 177200, 79500, 60800, 67000, 61100, 155600, 63400, 61500, 65100, 150000, 64500, 56800, 59600, 59000, 63000, 59000, 56700, 59000, 58400, 60700, 56700, 56900, 54900, 54800, 52200, 54700, 54800, 62000, 134700, 115700, 59700, 51500, 66900, 55599, 56400, 52900, 56800, 52900, 58200, 57699, 59100, 53200, 55800, 53300, 60400, 58200, 107500, 55500, 56800, 54400, 56100, 201400, 56600, 176200, 84400, 54100, 214700, 55800, 123699, 173700, 73600, 55199, 169200, 82600, 56500, 62300, 59100, 151900, 122700, 66700, 58200, 56400, 57400, 55000, 56000, 111900, 60400, 149700, 71700, 56600, 93800, 178700, 80900, 54700, 87700, 118900, 52300, 195900, 190200, 58000, 51300, 211300, 54500, 56600, 56900, 111800, 54900, 79400, 69700, 62800, 78600, 57600, 55199, 57000, 56600, 57200, 68600, 53800, 53900, 54900, 122500, 63500, 179300, 57800, 55700, 89400, 61800, 32000, 79000, 214100, 61400, 56000, 54900, 61900, 55100, 58800, 54400, 82600, 176300, 56600, 55100, 59100, 141700, 60100, 54500, 71700, 58900, 58800, 52100, 60000, 56900, 77700, 62600, 57900, 53300, 52400, 59800, 218900, 70700, 218200, 144700, 53300, 57200, 53900, 54000, 55400, 107700, 53800, 121300, 52400, 54600, 199500, 118200, 80900, 202900, 56600, 53400, 52100, 56600, 222600, 50300, 65100, 54200, 54600, 60199, 183700, 134800, 146300, 62500, 52600, 56500, 53099, 180700, 57800, 53500, 52000, 54300, 87300, 57699, 54300, 64400, 68500, 213299, 57300, 51800, 56300, 50000, 67200, 49500, 51100, 63500, 62400, 165500, 49300, 51200, 58099, 77700, 40800, 55000, 63500, 78000, 208000, 56900, 58099, 53900, 83600, 55599, 53800, 86300, 55100, 55700, 58400, 59100, 206600, 55000, 51100, 61600, 187000, 54400, 57699, 55700, 56800, 54000, 52200, 53700, 57100, 55100, 56600, 76700, 56400, 58700, 58200, 58900, 56300, 182300, 59500, 57200, 52300, 54600, 77100, 54300, 57400, 54200, 54200, 55100, 54600, 57400, 57500, 55900, 54900, 54400, 54400, 54600, 82300, 54400, 41600, 56500, 54000, 55900, 53400, 55100, 57300, 55199, 53500, 56300, 57500, 55800, 64600, 53900, 54100, 58500, 49700, 53400, 59500, 53700, 56900, 53700, 57000, 53800, 51100, 55900, 54700, 47900, 53500, 57400, 54700, 88600, 58400, 56900, 53200, 127200, 58900, 57400, 56600, 52600, 121800, 56900, 44700, 120600, 90300, 61300, 60700, 58900, 56800, 120300, 57600, 54700, 56800, 62600, 85700, 86700, 52400, 83900, 51800, 64500, 51100, 59200, 56100, 43000, 53700, 56000, 63600, 56900, 57800, 54100, 53700, 116199, 52200, 73800, 56100, 157600, 54400, 54600, 53300, 68400, 55100, 198900, 54500, 52800, 51600, 225100, 129100, 63800, 55400, 157100, 54300, 53800, 69400, 55700, 72100, 54600, 71900, 54300, 53800, 55700, 53900, 60900, 52300, 53000, 56300, 53400, 54300, 179100, 57500, 54300, 84000, 53300, 53500, 51500, 54300, 37700, 105600, 55100, 53600, 206700, 51700, 54200, 64900, 52600, 57699, 79900, 52500, 51300, 53900, 54100, 59300, 54100, 55800, 57100, 63800, 56800, 65900, 54400, 56900, 79000, 59300, 44200, 53099, 57500, 49300, 123600, 180700, 112500, 97500, 58600, 220400, 54000, 55300, 53500, 51900, 172200, 58600, 99300, 65900, 54800, 52900, 148300, 53099, 65300, 50500, 86100, 54500, 109600, 60400, 90200, 56500, 56500, 73100, 153500, 120900, 118300, 144300, 57100, 52500, 53400, 51300, 98900, 54800, 53400, 54600, 101100, 54500, 136800, 54700, 50500, 55599, 52200, 54000, 57699, 46900, 208800, 105399, 55500, 32100, 174200, 32599, 52100, 104700, 137900, 61300, 46100, 151600, 55700, 191100, 168600, 107500, 59500, 58300, 83100, 65400, 60100, 65300, 73500, 63900, 59600, 58700, 57800, 175200, 159100, 56100, 61600, 57800, 58000, 204800, 52500, 60800, 51200, 56900, 158200, 193900, 56200, 154800, 58500, 54100, 45400, 53500, 57000, 58900, 57600, 55100, 130399, 59800, 57400, 59600, 161700, 52600, 57800, 57600, 57400, 55900, 55500, 59600, 138800, 212200, 102300, 66700, 39800, 128400, 53300, 75600, 59000, 45300, 65100, 55700, 59100, 160900, 111500, 170700, 56600, 57500, 61000, 53300, 42900, 82100, 54700, 197200, 141700, 53800, 72400, 72800, 227900, 183900, 53700, 120700, 92600, 51800, 54100, 57100, 120700, 99900, 52600, 65300, 59900, 112899, 56800, 53300, 57200, 139700, 63500, 65800, 64600, 50500, 55700, 55900, 55800, 45800, 63800, 56400, 151500, 200100, 51100, 56100, 55599, 64500, 192300, 76100, 55300, 55199, 48000, 65800, 66300, 64400, 127100, 54300, 57000, 56100, 52000, 91000, 51800, 206800, 91900, 196200, 65199, 220500, 214899, 85700, 50800, 56000, 57699, 188500, 72100, 67200, 67000, 53000, 86100, 147100, 92600, 63500, 99800, 209400, 32000, 66500, 113699, 86800, 65100, 64000, 62400, 60300, 144700, 73100, 67200, 42100, 78400, 58600, 61800, 67900, 56500, 56400, 59700, 59000, 51900, 60100, 58300, 54900, 67800, 55700, 55599, 58400, 59800, 62400, 51300, 59800, 41700, 51400, 59700, 61700, 56500, 147400, 56500, 98300, 183500, 58200, 56200, 56800, 82700, 52900, 50700, 55700, 53500, 58500, 117100, 180400, 61500, 154900, 54900, 225000, 59900, 123300, 99300, 63000, 136000, 57300, 93900, 127000, 50800, 102700, 133500, 93200, 150900, 113300, 111000, 53300, 85600, 68800, 54000, 181900, 193000, 76500, 70500, 50900, 62100, 113600, 66700, 49800, 182900, 51300, 71000, 67100, 51800, 61300, 68500, 67500, 153900, 98200, 69700, 101100, 61700, 55700, 62800, 61100, 57600, 204200, 57400, 56400, 56800, 188400, 79500, 115600, 46300, 62300, 63200, 60500, 61200, 94900, 59400, 85900, 63800, 61100, 131300, 86500, 59400, 80800, 64100, 58000, 59100, 47300, 67400, 57500, 62400, 95200, 65600, 57600, 171100, 62300, 54100, 60900, 97200, 65000, 45800, 61200, 64300, 43300, 32700, 62100, 69500, 58400, 61600, 223700, 41200, 60800, 91500, 226800, 58200, 89200, 64800, 63200, 71900, 52400, 59600, 52000, 39700, 65600, 148900, 59600, 50000, 136800, 62900, 64100, 58900, 135400, 63099, 58600, 53200, 55599, 117800, 73300, 70900, 72100, 55100, 72400, 67200, 53600, 55000, 63800, 56000, 53600, 54000, 68900, 51200, 57500, 56700, 54700, 56100, 53700, 58200, 135500, 57300, 182200, 57900, 85200, 121100, 58600, 111300, 60199, 55300, 57500, 118400, 222000, 123200, 193400, 131300, 77300, 57800, 70300, 58400, 63099, 118900, 79200, 52800, 74600, 58600, 172100, 86500, 55400, 65300, 57500, 60100, 50000, 110200, 54400, 49600, 51900, 62100, 66100, 63000, 44900, 67200, 59400, 54800, 56200, 179700, 56600, 63900, 56900, 54900, 59800, 58500, 55100, 55000, 56100, 57100, 146400, 83200, 54500, 57600, 53600, 56600, 57200, 56200, 110200, 51700, 87300, 57200, 73700, 57000, 58600, 58700, 177800, 54400, 60599, 58000, 53000, 68400, 147200, 103600, 53900, 56100, 54700, 57699, 155400, 57400, 225799, 56100, 202000, 52100, 55900, 80100, 59300, 59000, 89200, 65300, 86100, 78400, 58900, 63500, 63900, 55000, 55599, 64700, 68200, 53200, 60900, 93600, 132900, 67000, 61400, 64600, 42600, 93500, 54800, 55900, 56100, 54900, 59600, 58800, 137400, 87500, 59300, 54400, 51500, 183200, 57200, 55900, 65000, 58000, 50500, 48700, 58600, 60500, 140700, 122500, 192500, 65300, 122600, 59600, 162700, 106700, 61300, 60599, 57699, 74400, 55100, 49600, 49800, 190300, 80200, 81600, 58000, 128100, 40300, 64900, 81300, 61900, 55199, 59900, 59100, 57000, 55800, 57600, 56300, 68800, 69300, 58800, 145700, 58600, 164700, 61000, 55700, 168000, 139200, 167700, 172000, 65600, 155200, 46200, 84200, 64000, 54000, 51600, 54200, 95000, 47200, 58900, 140400, 53400, 52400, 56500, 51500, 223800, 181600, 65800, 92700, 114800, 169200, 138500, 59300, 60300, 87100, 63600, 83000, 53600, 55300, 53600, 140500, 155100, 66700, 56000, 57699, 60900, 173700, 84700, 86100, 104700, 65700, 61300, 38600, 57500, 59000, 61100, 57100, 57000, 77500, 58800, 173800, 73600, 71200, 69400, 61200, 60400, 55100, 60599, 53800, 58500, 57400, 59200, 58099, 62600, 57699, 168800, 72600, 58800, 65400, 35800, 152500, 32000, 60100, 60300, 57200, 223900, 55900, 54200, 147200, 55700, 57300, 68800, 56800, 60100, 58200, 58600, 56100, 74800, 54500, 70600, 49400, 132700, 56700, 57300, 57000, 189800, 46300, 86100, 58700, 62500, 38900, 74000, 65500, 73200, 188900, 71000, 60199, 81700, 50100, 221900, 52500, 53099, 163500, 61000, 69000, 51800, 51200, 197600, 56600, 61600, 68800, 56900, 59700, 47800, 54600, 54800, 62200, 69300, 52300, 36000, 213600, 56600, 94200, 52500, 39100, 49600, 181000, 64200, 57300, 60100, 169800, 54400, 55400, 62600, 112700, 118500, 58000, 61100, 52600, 85800, 84400, 57600, 58800, 62200, 75200, 95900, 51800, 60100, 56500, 87300, 54300, 56300, 51500, 68300, 56700, 49100, 56800, 127700, 59400, 54100, 66900, 50900, 94900, 62900, 56700, 71300, 55700, 57600, 184300, 100500, 63000, 39000, 69400, 65100, 32000, 69300, 113500, 60000, 80100, 87600, 62100, 216000, 74700, 64300, 65500, 61700, 54100, 135300, 73100, 55100, 61500, 59200, 60900, 63600, 62200, 105800, 63500, 49500, 214600, 63400, 59900, 95600, 62000, 64000, 58099, 63300, 35500, 58700, 63300, 44200, 55599, 56000, 32000, 60199, 57000, 86100, 74700, 49600, 59100, 57400, 65400, 55900, 60700, 53200, 177300, 53200, 52100, 92700, 74300, 73900, 129600, 64500, 52699, 56000, 60800, 58300, 76400, 57000, 65500, 177100, 66800, 49900, 58900, 57300, 66700, 58200, 61600, 62100, 68200, 55199, 64300, 53500, 60199, 60700, 47600, 57000, 94400, 95200, 59600, 61200, 161400, 51800, 56900, 59000, 165500, 69500, 61800, 62600, 205200, 52600, 58800, 61100, 55599, 58600, 53900, 60400, 53400, 115399, 50100, 58700, 56300, 37900, 61800, 63400, 75100, 52400, 59800, 113300, 210700, 55800, 138900, 59600, 185300, 102700, 42100, 54900, 87200, 40900, 58200, 135400, 51700, 62500, 171300, 109000, 59800, 102700, 62600, 77800, 198400, 61200, 65400, 55100, 153700, 165900, 62000, 58600, 71000, 56500, 63099, 40900, 83200, 60599, 73800, 59800, 70900, 58500, 61300, 56300, 55100, 58000, 57800, 38000, 53500, 61800, 53800, 55500, 54300, 56000, 54700, 55700, 71500, 179800, 53500, 64100, 58400, 63700, 55500, 54600, 60800, 64300, 58800, 56600, 186600, 58200, 61500, 35100, 60100, 212399, 58600, 171800, 58300, 96700, 56900, 66400, 60300, 58500, 71300, 65100, 56300, 59600, 196000, 57800, 60000, 42600, 181600, 57300, 195500, 54200, 55400, 61500, 44500, 55000, 56300, 66700, 52699, 143500, 54400, 58400, 56300, 53300, 191900, 38000, 76000, 111000, 198900, 160900, 54500, 55400, 56100, 55000, 81500, 57100, 119400, 74200, 55700, 70200, 57600, 58600, 134700, 53000, 55100, 60199, 224100, 58000, 62500, 56500, 134200, 60300, 73800, 209400, 57000, 55900, 62200, 55900, 57500, 159200, 61200, 55300, 168000, 55700, 55300, 219200, 76600, 128800, 211000, 87500, 58600, 57500, 56300, 202600, 56200, 61100, 56800, 153900, 88400, 97400, 166600, 54900, 220000, 81800, 98600, 66900, 86500, 152300, 59100, 86400, 73100, 55000, 57100, 54800, 65500, 138200, 177700, 51600, 108699, 67000, 61500, 45500, 58500, 55400, 133800, 59200, 213100, 66600, 122100, 97100, 92100, 135300, 49600, 73000, 58200, 51900, 61400, 60700, 58099, 53300, 192600, 55800, 121500, 139700, 40100, 115700, 54300, 56000, 58400, 54400, 57699, 98800, 214800, 161400, 39300, 56900, 41700, 57000, 39600, 65600, 56600, 65900, 219100, 55800, 54300, 56300, 52600, 61100, 60800, 65500, 53700, 57100, 54800, 52500, 46500, 50900, 55199, 46300, 57100, 56300, 58900, 53500, 59800, 217399, 59300, 185900, 43300, 59000, 51700, 133000, 75300, 58000, 57699, 97800, 117400, 57200, 185500, 53800, 56700, 115600, 170200, 65900, 79000, 55199, 100000, 96700, 123699, 76700, 169400, 136700, 71400, 61000, 127400, 58800, 62400, 48400, 44200, 55599, 91600, 67000, 55599, 62800, 58000, 65600, 61700, 59300, 54300, 201700, 62699, 108400, 64100, 71100, 59900, 56300, 227900, 54100, 53900, 61700, 165200, 59100, 115800, 62400, 92400, 55599, 59500, 58800, 60500, 57400, 80700, 58500, 56500, 59800, 60400, 63300, 55199, 118900, 63500, 195000, 54700, 53099, 67100, 55700, 219200, 56900, 70300, 156000, 83600, 95100, 210200, 67000, 48000, 56700, 172100, 59400, 62800, 195400, 133800, 44800, 54900, 57300, 63000, 95000, 57600, 32000, 138600, 71000, 61200, 73500, 53400, 194800, 56900, 49200, 51900, 60300, 60900, 57000, 116100, 61300, 81000, 205000, 57800, 117000, 61300, 51800, 54300, 58600, 57800, 61500, 82400, 55900, 156600, 59300, 227800, 55000, 54400, 52000, 58900, 54100, 55599, 177500, 92500, 57100, 148600, 53400, 52200, 113200, 57300, 87100, 227100, 215200, 195700, 144300, 91500, 148700, 91100, 198200, 52600, 108500, 90700, 68600, 56500, 174600, 103400, 215600, 60500, 41600, 102899, 81100, 121300, 79200, 67400, 64400, 109400, 57000, 61400, 54800, 56300, 41500, 175700, 140300, 61000, 68200, 59700, 84600, 43300, 82600, 112300, 34900, 168200, 71700, 79800, 60800, 79500, 61700, 60800, 54800, 69300, 60100, 64100, 64500, 52100, 58600, 58900, 56200, 65500, 58700, 70400, 216700, 103400, 62699, 64600, 66600, 56300, 66300, 73800, 50500, 170100, 122000, 55300, 56000, 58099, 126500, 52200, 147000, 65900, 193200, 115300, 62600, 65900, 202300, 52800, 53900, 101000, 95000, 53700, 73300, 84400, 227900, 54300, 93200, 60500, 38400, 57300, 61400, 170400, 224500, 57100, 95000, 53400, 208900, 138800, 73200, 59600, 223600, 70400, 111900, 72900, 100500, 76000, 71600, 68000, 71100, 67700, 75900, 74200, 72800, 66500, 69400, 66200, 59400, 61000, 52300, 62900, 71200, 55400, 67000, 59300, 63200, 64500, 65100, 222600, 183400, 59600, 40400, 55599, 58500, 125000, 64700, 115399, 66400, 54500, 81700, 124400, 60500, 56300, 53900, 32000, 64200, 64800, 58300, 56800, 65000, 62800, 62300, 53200, 58300, 61300, 58600, 64400, 58099, 55700, 158400, 155100, 49700, 170000, 213500, 75600, 162300, 59900, 47000, 223600, 187300] - }, - { - "label": "Block width", - "range": [0, 700000], - "values": [268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 436900, 373600, 268630, 439000, 381800, 491200, 402800, 381400, 485600, 600000, 372200, 394700, 383800, 401100, 356500, 313200, 487100, 490700, 432299, 530300, 521500, 456700, 333800, 343200, 394000, 328200, 487700, 383600, 317700, 324600, 482900, 515100, 500100, 562700, 486000, 453400, 352900, 331300, 496200, 469099, 472500, 354700, 507700, 509000, 439300, 525300, 347600, 379000, 432800, 378800, 383200, 523800, 600000, 313600, 497700, 411300, 420000, 381100, 342800, 385900, 268630, 495800, 488000, 446400, 397900, 373300, 385700, 396500, 475700, 510600, 586800, 596000, 407600, 439200, 440800, 393100, 274600, 291900, 509799, 432800, 303000, 530600, 515900, 376800, 377400, 553500, 433600, 270800, 288000, 488000, 306800, 418000, 456900, 526300, 524500, 524000, 418800, 442800, 443200, 497200, 427500, 510300, 476000, 382700, 472200, 380400, 472900, 541100, 528200, 441599, 374600, 414099, 437299, 272500, 550000, 417299, 443700, 268630, 545800, 403400, 534400, 557200, 545200, 537400, 464300, 571200, 589400, 564000, 466500, 514500, 433200, 293600, 550100, 466599, 450100, 557200, 489000, 512200, 445600, 531000, 504400, 459799, 528800, 579800, 352900, 520700, 532000, 477900, 395600, 478900, 461300, 481400, 507500, 487200, 522299, 496000, 499600, 485200, 491500, 548300, 526000, 489600, 444000, 500900, 527600, 533200, 450000, 566500, 486300, 500700, 534900, 493000, 481100, 482500, 490900, 510200, 584700, 560700, 492000, 474600, 495300, 594100, 433700, 522500, 513100, 507500, 488100, 506400, 510400, 482700, 500400, 532000, 477700, 369600, 491200, 499400, 489200, 509099, 513600, 479600, 507299, 547600, 415300, 485900, 410400, 507700, 546700, 503300, 503600, 547700, 509200, 522400, 319700, 517200, 473000, 506800, 511400, 559200, 537900, 515300, 487500, 519000, 361100, 270800, 519000, 518200, 508200, 503900, 516500, 508600, 504900, 506500, 505300, 522000, 507500, 521400, 504600, 521400, 418700, 516700, 508400, 515400, 387000, 522299, 557300, 516599, 510600, 383600, 514700, 516700, 515600, 528200, 491500, 517900, 505000, 430300, 425300, 517800, 512600, 511599, 511300, 501599, 519099, 359700, 522400, 510400, 501100, 524600, 516000, 513800, 503100, 517000, 511400, 513700, 504000, 506900, 517000, 535700, 572700, 497900, 501900, 512600, 513800, 515000, 520700, 295100, 509700, 522299, 338800, 521300, 517200, 519500, 520800, 509300, 520700, 356000, 523000, 513600, 525100, 515700, 510000, 528300, 565200, 509300, 515500, 526900, 514200, 522200, 518500, 557400, 565100, 530700, 511100, 538200, 483700, 588800, 285200, 569100, 520800, 406300, 278300, 569500, 513900, 289000, 519600, 513600, 526900, 525500, 530300, 502000, 480000, 518500, 513000, 516900, 507000, 534300, 520400, 488500, 536000, 518900, 519000, 509400, 535500, 533600, 384900, 542700, 517200, 535700, 520500, 517100, 538700, 525900, 524200, 517100, 523600, 512900, 542400, 306800, 544600, 516599, 582200, 519900, 510900, 427200, 521300, 525900, 438200, 523500, 480000, 519600, 325400, 523300, 525200, 526500, 516400, 523800, 525400, 518700, 530800, 526400, 524400, 566400, 519500, 519700, 518400, 580400, 520600, 567600, 585000, 519300, 524300, 520800, 520900, 533400, 529500, 583500, 531400, 450000, 557600, 420700, 402900, 524500, 518700, 521800, 316400, 497100, 518900, 504400, 539400, 507000, 339700, 493800, 496700, 517500, 523400, 524400, 526200, 311300, 519200, 327600, 520400, 524800, 526400, 519200, 485200, 361000, 519300, 574400, 330400, 511800, 511200, 592800, 520900, 390400, 322200, 524600, 513300, 542400, 517200, 527300, 512700, 516100, 570800, 508900, 523500, 543500, 513700, 519700, 469000, 557400, 515000, 511000, 382700, 521400, 497900, 571100, 514099, 461100, 505600, 563300, 509200, 446300, 458000, 518000, 316500, 525600, 515700, 468600, 516300, 515400, 499000, 487500, 486900, 519099, 270200, 290900, 518000, 509900, 519300, 517299, 468700, 582300, 517200, 461100, 558600, 490500, 499099, 507100, 517600, 535200, 512100, 375300, 506100, 502200, 519600, 559900, 531200, 508100, 553600, 510700, 538600, 525200, 286400, 581800, 534900, 503500, 345400, 428300, 539400, 552000, 523400, 516300, 514099, 519200, 515800, 508000, 500400, 374900, 529900, 527100, 600000, 309600, 583500, 600000, 376000, 473900, 484799, 419300, 287200, 596600, 464600, 398900, 383900, 487000, 431900, 490700, 600000, 381100, 515800, 381500, 540900, 539100, 416500, 428800, 439300, 441300, 496000, 550800, 414300, 422100, 598200, 387800, 561100, 364000, 359700, 523400, 455300, 600000, 380400, 424000, 458600, 382500, 401100, 425100, 550500, 436599, 493200, 393200, 437900, 401100, 386300, 432299, 444799, 428200, 368800, 415700, 369900, 413400, 413000, 482100, 436000, 368600, 369300, 401300, 400400, 418300, 432299, 278800, 436100, 411800, 431300, 551100, 406300, 541500, 404200, 547200, 437000, 390200, 417900, 415800, 460600, 434900, 442600, 309300, 452000, 272200, 459700, 423300, 414799, 468900, 429300, 436700, 427400, 438800, 421100, 421700, 434000, 470700, 474799, 521599, 414400, 307300, 416700, 579600, 432400, 566100, 416200, 432500, 483100, 373200, 494799, 507400, 489700, 440800, 389200, 436599, 418000, 446500, 450700, 445200, 594100, 443900, 489000, 493300, 448900, 449700, 406000, 437400, 278100, 453400, 509500, 433000, 431200, 308600, 507500, 452500, 524700, 451700, 468700, 423600, 447200, 472600, 418500, 466000, 457000, 442299, 455000, 458400, 463800, 450900, 452900, 544200, 456500, 521700, 490900, 457200, 502500, 499099, 446800, 597000, 440600, 478700, 428700, 556900, 498300, 442000, 437900, 419000, 486000, 490700, 463000, 505500, 496700, 486200, 528300, 434200, 502600, 502400, 477800, 470500, 533400, 520700, 508400, 346400, 498900, 511300, 486900, 499300, 508100, 545700, 458400, 524300, 504700, 497299, 454300, 501100, 499900, 497800, 506900, 494500, 501000, 515300, 515000, 505300, 520200, 524099, 502600, 483000, 413400, 562300, 511700, 523500, 478800, 514600, 511100, 505500, 505300, 519099, 499600, 506900, 510500, 519900, 512400, 520400, 504500, 500900, 433200, 515900, 500700, 517100, 508200, 505900, 498900, 274800, 523200, 518100, 434600, 491100, 439900, 508300, 338800, 513900, 464600, 524000, 511100, 565900, 503700, 331700, 484200, 533800, 530700, 519799, 544000, 513200, 466100, 484799, 537100, 541300, 513500, 515100, 495600, 580400, 514600, 517000, 519600, 552000, 538400, 399700, 448000, 522100, 503600, 353100, 511300, 515700, 487700, 421700, 509200, 600000, 422400, 523700, 526700, 513000, 521500, 516400, 518100, 513300, 516700, 524400, 499099, 517299, 428600, 514700, 540300, 507500, 517200, 464900, 519099, 512100, 537200, 440900, 507900, 522500, 514799, 513900, 523500, 510100, 525100, 548400, 361100, 512700, 518100, 524400, 588900, 527800, 528500, 341500, 500100, 510300, 516000, 504200, 502900, 424200, 506599, 502700, 511000, 512200, 524099, 595200, 415700, 460400, 361800, 519700, 514300, 527300, 516900, 512900, 532100, 514900, 312800, 510400, 515100, 518500, 383900, 269400, 547800, 515000, 515100, 514300, 518700, 316300, 508700, 503200, 512700, 511599, 515500, 506599, 384900, 362200, 527700, 527500, 515600, 510100, 289800, 517400, 510600, 531900, 513800, 530100, 517600, 522700, 522900, 525700, 376000, 520100, 512100, 513900, 512400, 528600, 521900, 498500, 530200, 514700, 494200, 315900, 527900, 514700, 521599, 521599, 526700, 516400, 507900, 542600, 518600, 521500, 523500, 459700, 513400, 517900, 515400, 521400, 512900, 517600, 522100, 274700, 520800, 511599, 517000, 428600, 520500, 519799, 522800, 526400, 506700, 514000, 513100, 517900, 520200, 517600, 583600, 526800, 524400, 523900, 515900, 523300, 498700, 524200, 519200, 517500, 525100, 549400, 526000, 517200, 516900, 520700, 521000, 521300, 525700, 527200, 519400, 518600, 516900, 519600, 517400, 496300, 527400, 322400, 518300, 519200, 518400, 523400, 523100, 516599, 516100, 517900, 512500, 514600, 519500, 514200, 517600, 520200, 519200, 515200, 520100, 517000, 519600, 509900, 520900, 519799, 519900, 518200, 512400, 517700, 526200, 516700, 519799, 519900, 382200, 518900, 520000, 518200, 488700, 523600, 522299, 522299, 521900, 295200, 511599, 499400, 526900, 572800, 478500, 570100, 520000, 516599, 530600, 509799, 526000, 512000, 491599, 530200, 581800, 525800, 529700, 522200, 598700, 517400, 508500, 510200, 428700, 522200, 507100, 517299, 527600, 534400, 526500, 520700, 486900, 526200, 525600, 514799, 510400, 514900, 529600, 520100, 330400, 520800, 401100, 520600, 516000, 525100, 388800, 404700, 525800, 526400, 480100, 525700, 515300, 391100, 518100, 431599, 527800, 430300, 517400, 518700, 523500, 512400, 514300, 516100, 517299, 508200, 520900, 527200, 296700, 514400, 520100, 289600, 513900, 528000, 522700, 527600, 308500, 415200, 522800, 527500, 402800, 521400, 523300, 518800, 521200, 522200, 547400, 525300, 522800, 518000, 524800, 518300, 518300, 534100, 518400, 530400, 512800, 520500, 524900, 522500, 520200, 537200, 307300, 517200, 527300, 514099, 557900, 521599, 525600, 492800, 533800, 359300, 522299, 546000, 514200, 401500, 475200, 523900, 394000, 517800, 525400, 517600, 382800, 513200, 414900, 519000, 517100, 525300, 421700, 515300, 453800, 522299, 525300, 522200, 297000, 402100, 440400, 462900, 517700, 514200, 522299, 526700, 382000, 513200, 519799, 521000, 436200, 516400, 490400, 514099, 526800, 510600, 513400, 509900, 518900, 512400, 500400, 521700, 517100, 390400, 589900, 327700, 517100, 499799, 565300, 522299, 589000, 495000, 519099, 502299, 433100, 413000, 540000, 503200, 563400, 521599, 553100, 511500, 503200, 558600, 510200, 499799, 510100, 308500, 410700, 518400, 522700, 532000, 502400, 386700, 512700, 538900, 522900, 516300, 396900, 545300, 517400, 393900, 495600, 529600, 552900, 516900, 519300, 521800, 495100, 513500, 583300, 516800, 516300, 526400, 550500, 526300, 517100, 516800, 510400, 525000, 526500, 518200, 414300, 548400, 395800, 447800, 419799, 530100, 532300, 493200, 522600, 373100, 445500, 530000, 520500, 560400, 440000, 297700, 524200, 526100, 518600, 528400, 400700, 503000, 508600, 545500, 555400, 520600, 494900, 473200, 521599, 471700, 509099, 526800, 510800, 525700, 516900, 498300, 595700, 526300, 520600, 525600, 519400, 380300, 514099, 506100, 524000, 321100, 522500, 520000, 520600, 529700, 521800, 510300, 520500, 385100, 522200, 518300, 577600, 588400, 536100, 513100, 518000, 419000, 480700, 392500, 515900, 517400, 353900, 520800, 448300, 511200, 502700, 518500, 512900, 521300, 519799, 535700, 512299, 407000, 517100, 322600, 518700, 297300, 366500, 600000, 515200, 516300, 490700, 408800, 525700, 504300, 509600, 521300, 481400, 359700, 371300, 511900, 504300, 451300, 467600, 507700, 532300, 470600, 516800, 590300, 522000, 526000, 463900, 455600, 518500, 406100, 475600, 529000, 547300, 529000, 531400, 517500, 527800, 526600, 459500, 494200, 500000, 487000, 469000, 511300, 511700, 508600, 504500, 519900, 521700, 522299, 400400, 511100, 513900, 513900, 511100, 408500, 498900, 490600, 559100, 514200, 505500, 506300, 503800, 516599, 524200, 510100, 510600, 505700, 395700, 523100, 506599, 542700, 512700, 366700, 511800, 386800, 397700, 511000, 404200, 518300, 499400, 520500, 511800, 555900, 465500, 268630, 582200, 305800, 500800, 518400, 472200, 512700, 483300, 405400, 573000, 465600, 516500, 476000, 472000, 546000, 496200, 503400, 414000, 516800, 514000, 520800, 523700, 502900, 513900, 515400, 318200, 511500, 469900, 379700, 515300, 504200, 506500, 495500, 523200, 297100, 508100, 525600, 522800, 321100, 507299, 423900, 536700, 394000, 527100, 506900, 515400, 447800, 509900, 490900, 508000, 493400, 523200, 429900, 486800, 522100, 505400, 517299, 506800, 448600, 489000, 496800, 504300, 486200, 500300, 525300, 278500, 501900, 512400, 510400, 530000, 511500, 370200, 507600, 504500, 373400, 485300, 497600, 504200, 501100, 505400, 587500, 373900, 511500, 492299, 560600, 506500, 421500, 506100, 509099, 509300, 508600, 511300, 515200, 376500, 499900, 558600, 500200, 514400, 293900, 470700, 407400, 490100, 375800, 406100, 506100, 520900, 514099, 415600, 506200, 581600, 435400, 512500, 432800, 504200, 513900, 529300, 506000, 507000, 518400, 520600, 515900, 512200, 508200, 517900, 497500, 497100, 523300, 506800, 471000, 500600, 269500, 508100, 512600, 584400, 505900, 425000, 501900, 513300, 526800, 584700, 472500, 287400, 573200, 510700, 492200, 517600, 506300, 502800, 509200, 514400, 508800, 520600, 518200, 515100, 340000, 510500, 521000, 517400, 516800, 519900, 476700, 357200, 514000, 404600, 519300, 514900, 501200, 521200, 559700, 503000, 514500, 518100, 515100, 458600, 519200, 518300, 530500, 501100, 520600, 503800, 521599, 527200, 519300, 534200, 433200, 521599, 512100, 510400, 518500, 511599, 516500, 505600, 594900, 528900, 407600, 510400, 425800, 517100, 508700, 516599, 543700, 520400, 506300, 511599, 523000, 554000, 332400, 379900, 511500, 525100, 513700, 516400, 513600, 503400, 510400, 511200, 352600, 515200, 524000, 382400, 521900, 536300, 445300, 427200, 508700, 523800, 518800, 538100, 470400, 511300, 520900, 518700, 516200, 520700, 526600, 367700, 362200, 507200, 528800, 508200, 380900, 372500, 520300, 521500, 517900, 464000, 525900, 522299, 345600, 597300, 549000, 507000, 508800, 569100, 513400, 511599, 539300, 519700, 517299, 519300, 507600, 523200, 493300, 465700, 577300, 538600, 589000, 460100, 325400, 440200, 552600, 537500, 514200, 528100, 474900, 460000, 463300, 401500, 340400, 340200, 518700, 517400, 560500, 505200, 276800, 510800, 530500, 513100, 515000, 523300, 512000, 510600, 517400, 365200, 596600, 517500, 358600, 515700, 545500, 553000, 505000, 487000, 484700, 349200, 488700, 532400, 436200, 411300, 492600, 477600, 511000, 506500, 517299, 358800, 400700, 555400, 494900, 372200, 507800, 511300, 520300, 542100, 355900, 571500, 552800, 467500, 430700, 339400, 564100, 600000, 478700, 454500, 554800, 458400, 519300, 521700, 484099, 359500, 567700, 535200, 555500, 541900, 520500, 479700, 501100, 533700, 554300, 552300, 379700, 522500, 404900, 508300, 538600, 573200, 532700, 557100, 565900, 518500, 309200, 522100, 538500, 509400, 533200, 539900, 511900, 535400, 519900, 542900, 556800, 523100, 505900, 382700, 527400, 451500, 518400, 479300, 535600, 493100, 516300, 510800, 529600, 274700, 516500, 522400, 470500, 526800, 519300, 401300, 519000, 518900, 441599, 526800, 510100, 349400, 505000, 531900, 461100, 272200, 521500, 514799, 519200, 535000, 424300, 505000, 525600, 510500, 375100, 407500, 408600, 425000, 583700, 420700, 508100, 574900, 513700, 324400, 512299, 522900, 552100, 510800, 418200, 498000, 510900, 444700, 528100, 526300, 504099, 521300, 509500, 565800, 509700, 531100, 512400, 506400, 528700, 368900, 346700, 520300, 599300, 519400, 364400, 520100, 445700, 520200, 531600, 504500, 295700, 500200, 513200, 460600, 547600, 481400, 515700, 518100, 499700, 337200, 330600, 517500, 525300, 479000, 460400, 536200, 470500, 516100, 506500, 482200, 507800, 499600, 519099, 504400, 518800, 331800, 498100, 469400, 486200, 518400, 504099, 518000, 399400, 511000, 512200, 571100, 518000, 524900, 447600, 368500, 511200, 382200, 521000, 513400, 515600, 514300, 529500, 519400, 347900, 516200, 522900, 295600, 464799, 514099, 465600, 512000, 522000, 334300, 401000, 522700, 514200, 513900, 459099, 507700, 510500, 316200, 518900, 550100, 458700, 513200, 480300, 445900, 513400, 519000, 510700, 519000, 448300, 486200, 514400, 441700, 471200, 537400, 381700, 503700, 484799, 485800, 483000, 505100, 496599, 502100, 497800, 518000, 502500, 517100, 363100, 511400, 489600, 484900, 485300, 508000, 419300, 473900, 511800, 505800, 483300, 503700, 501200, 515200, 486100, 589600, 479300, 520400, 517299, 513300, 522100, 451700, 510600, 495600, 434900, 513400, 498600, 527900, 507400, 500300, 489300, 500700, 290900, 432000, 493800, 553300, 327400, 519799, 510100, 501500, 451400, 512400, 504400, 498200, 522200, 517800, 498900, 507200, 508300, 494099, 507400, 485200, 523800, 351500, 529700, 500700, 504500, 386000, 506400, 508300, 491700, 432100, 502800, 357100, 512700, 503000, 560900, 514400, 352000, 333500, 377100, 500500, 450100, 377500, 499799, 303100, 501800, 511000, 356300, 425300, 513500, 418000, 490600, 410700, 543000, 496700, 533000, 520000, 528400, 360400, 504900, 497400, 445000, 508600, 509300, 431700, 387900, 444799, 436200, 496000, 490500, 496900, 499000, 516800, 493000, 498700, 503200, 387400, 512900, 516900, 499400, 519400, 505500, 531300, 510900, 517700, 556400, 538300, 512500, 581200, 497200, 464200, 506200, 515000, 505400, 529900, 506100, 502600, 440800, 505600, 589800, 503100, 504099, 508200, 511700, 497200, 507800, 530800, 495000, 513100, 505600, 500700, 551700, 502600, 501599, 497900, 566800, 511100, 501800, 352200, 562800, 513500, 563100, 503000, 499099, 587700, 512900, 508300, 512700, 591100, 514200, 523800, 511000, 516700, 511900, 514300, 279100, 381800, 511700, 527600, 598300, 434600, 511000, 519900, 522200, 531000, 483500, 519700, 600000, 503700, 505800, 498400, 515800, 516900, 322900, 523700, 511500, 519600, 399600, 518500, 519700, 397500, 484600, 513700, 268630, 315400, 517200, 514500, 505900, 515300, 516000, 473100, 509099, 514500, 301900, 490500, 486900, 380200, 531800, 455000, 425100, 448300, 515200, 527100, 522299, 344700, 514200, 518500, 519099, 497800, 475100, 440200, 459700, 515900, 376300, 304500, 445500, 485800, 375000, 354000, 513200, 309700, 472900, 507299, 516300, 521900, 569700, 546300, 327100, 517900, 578300, 518800, 524000, 386000, 531300, 510600, 378600, 521400, 354000, 520200, 596800, 524200, 557800, 525100, 383600, 433600, 528500, 305900, 526000, 530100, 519200, 523900, 543400, 527400, 310200, 525900, 442000, 404400, 515800, 516599, 558500, 523300, 514200, 479700, 357800, 457800, 380700, 514900, 341800, 524500, 407400, 516300, 532800, 476599, 281100, 520600, 519500, 524300, 527000, 526200, 522400, 488700, 523100, 524200, 536500, 530300, 396000, 514700, 540900, 428100, 531600, 520600, 525500, 525100, 537000, 330700, 552700, 497800, 318000, 537300, 472299, 298100, 377500, 529200, 533300, 531200, 380000, 537300, 583800, 535800, 511200, 379700, 472600, 579400, 444400, 509799, 433500, 430500, 523700, 500600, 277800, 535700, 518500, 530200, 560800, 516200, 522700, 525000, 561000, 531700, 549000, 517200, 522600, 514000, 512200, 516500, 511400, 522600, 519700, 402100, 524900, 339000, 534900, 541700, 546700, 519600, 348100, 527100, 523700, 498600, 535500, 504700, 456200, 509300, 499500, 503600, 517700, 507100, 513500, 520900, 545600, 515300, 525500, 515300, 412700, 550000, 507800, 594700, 275700, 284100, 531200, 524300, 497600, 526100, 424000, 513200, 406100, 520600, 524000, 484600, 590700, 573700, 402900, 521400, 450200, 520500, 366400, 414500, 531300, 404700, 504400, 503100, 531300, 546200, 517299, 348800, 351000, 496900, 513600, 514900, 515200, 393600, 515800, 400400, 521400, 497700, 537300, 484200, 535100, 510100, 426100, 502400, 537200, 305700, 509200, 510900, 516200, 509900, 523000, 490000, 433000, 508700, 337600, 515800, 347200, 507700, 498500, 514099, 498000, 521300, 513600, 467700, 597800, 512600, 535700, 517600, 510400, 361500, 508400, 550900, 367600, 326100, 352700, 579200, 483200, 352800, 434600, 462100, 510700, 564600, 600000, 268630, 519400, 565500, 555200, 466900, 521900, 390200, 552600, 512000, 563600, 513800, 519600, 439900, 383100, 544900, 522200, 525900, 529000, 361000, 420000, 490000, 522000, 410200, 540600, 563200, 493900, 507500, 523200, 600000, 556000, 453800, 507800, 517100, 504300, 532700, 512000, 529500, 501800, 467100, 515700, 526900, 522299, 534600, 511400, 522400, 508400, 554200, 512900, 341500, 455800, 525300, 509400, 524099, 519400, 471200, 597300, 448200, 402800, 519300, 537200, 513000, 532300, 529800, 535000, 522700, 516200, 455400, 429700, 479799, 516400, 359000, 518400, 520400, 427200, 536700, 515900, 576100, 518100, 320200, 297400, 368200, 432600, 571800, 517600, 515400, 534900, 474200, 513300, 530600, 524099, 399500, 497299, 507500, 516500, 362100, 471800, 480600, 538100, 500400, 515800, 518200, 522000, 498000, 538500, 440800, 533600, 514300, 538000, 552600, 556500, 512000, 523900, 514099, 505700, 535800, 505900, 485100, 515300, 503500, 510400, 492200, 462600, 375000, 511599, 384700, 514500, 516400, 414300, 577900, 320200, 513300, 504300, 522200, 308000, 521500, 531300, 499300, 535800, 502600, 509300, 505600, 545000, 453800, 505700, 502000, 526500, 452900, 522100, 510900, 503100, 523600, 526500, 512800, 272000, 427299, 365300, 554800, 590700, 407900, 475500, 575700, 412299, 351000] - }, - { - "label": "Cylinder material", - "tickvals": [0, 0.5, 1, 2, 3], - "ticktext": ["A", "AB", "B", "Y", "Z"], - "values": [0, 0, 1, 0.5, 2, 3, 3, 0, 1, 1, 2, 2, 3, 0, 0, 1, 2, 2, 3, 3, 0, 1, 1, 2, 3, 3, 3, 0, 2, 3, 1, 0, 1, 3, 1, 0, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 3, 2, 2, 0, 0, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 0, 3, 0, 2, 2, 0, 2, 0, 2, 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 0, 2, 2, 2, 0, 2, 0, 0, 0, 2, 0, 1, 0, 0, 3, 1, 1, 3, 0, 0, 2, 2, 0, 2, 2, 2, 2, 3, 2, 2, 3, 2, 0, 2, 2, 2, 0, 2, 2, 2, 3, 2, 0, 2, 0, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2,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, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] - }, - { - "label": "Total weight", - "visible": true, - "values": [160, 1324, 252, 1711, 173, 624, 228, 2474, 371, 3103, 312, 2408, 460, 1727, 754, 2457, 227, 1963, 354, 2797, 377, 1327, 462, 1009, 166, 1415, 1118, 1063, 593, 498, 959, 1331, 1146, 645, 921, 1596, 663, 568, 492, 833, 630, 445, 504, 394, 647, 314, 1039, 829, 911, 282, 925, 681, 581, 506, 368, 373, 628, 538, 418, 419, 478, 884, 847, 369, 410, 344, 396, 501, 510, 379, 733, 1649, 239, 1035, 1839, 967, 514, 875, 794, 414, 664, 447, 839, 540, 636, 499, 1059, 743, 173, 473, 519, 465, 623, 726, 631, 521, 643, 323, 424, 472, 657, 510, 521, 661, 690, 497, 1664, 2162, 828, 1062, 479, 1452, 574, 604, 1069, 766, 268, 369, 755, 644, 811, 636, 363, 375, 359, 378, 336, 413, 680, 431, 361, 493, 761, 412, 386, 339, 628, 390, 648, 611, 323, 369, 555, 142, 2133, 653, 392, 597, 740, 345, 345, 1211, 600, 396, 369, 390, 481, 498, 371, 337, 316, 363, 676, 330, 353, 527, 352, 329, 341, 349, 334, 357, 501, 363, 1066, 284, 307, 338, 367, 327, 901, 330, 367, 311, 543, 370, 355, 318, 398, 335, 346, 382, 337, 807, 365, 349, 350, 415, 346, 330, 337, 330, 2201, 489, 338, 322, 349, 744, 239, 327, 327, 317, 763, 303, 343, 334, 293, 298, 472, 558, 331, 769, 321, 315, 342, 2161, 325, 1667, 493, 328, 878, 328, 737, 315, 325, 317, 529, 727, 390, 320, 953, 729, 300, 538, 663, 333, 320, 309, 596, 591, 325, 300, 709, 303, 312, 501, 737, 306, 360, 320, 1585, 324, 196, 294, 827, 305, 316, 415, 557, 302, 550, 332, 289, 730, 319, 324, 369, 335, 532, 422, 315, 1423, 1091, 320, 323, 358, 307, 314, 317, 218, 414, 299, 323, 371, 322, 314, 311, 338, 310, 324, 319, 674, 305, 366, 356, 316, 338, 352, 343, 339, 327, 497, 323, 780, 427, 346, 311, 319, 307, 343, 312, 1695, 329, 293, 316, 429, 341, 315, 548, 330, 307, 331, 321, 427, 319, 530, 516, 310, 344, 724, 479, 2748, 667, 977, 426, 696, 755, 944, 474, 331, 314, 319, 381, 294, 282, 302, 264, 370, 449, 314, 1029, 318, 312, 706, 349, 508, 297, 293, 322, 531, 480, 396, 286, 367, 315, 308, 365, 302, 467, 302, 313, 421, 351, 295, 792, 296, 651, 305, 1207, 501, 325, 311, 302, 290, 693, 312, 681, 474, 296, 321, 305, 322, 312, 317, 453, 322, 312, 550, 331, 334, 297, 560, 324, 812, 311, 320, 336, 533, 316, 1305, 502, 857, 329, 1089, 521, 495, 1025, 316, 373, 301, 935, 685, 547, 311, 622, 851, 880, 175, 331, 343, 1122, 314, 494, 211, 329, 228, 307, 306, 302, 312, 324, 549, 354, 390, 443, 305, 303, 1364, 320, 352, 412, 328, 522, 1509, 303, 314, 326, 304, 376, 297, 354, 305, 303, 309, 324, 543, 1231, 306, 865, 477, 388, 388, 603, 532, 310, 1249, 321, 162, 431, 346, 880, 355, 789, 320, 383, 317, 317, 571, 324, 321, 810, 1075, 329, 363, 310, 385, 322, 1005, 344, 1169, 526, 286, 328, 558, 295, 505, 339, 608, 526, 352, 312, 391, 933, 448, 590, 411, 463, 391, 697, 1113, 327, 604, 845, 1066, 330, 435, 750, 325, 709, 523, 315, 353, 882, 736, 456, 1111, 1050, 454, 955, 1728, 423, 796, 793, 1348, 761, 970, 668, 459, 386, 783, 276, 820, 708, 501, 764, 445, 492, 464, 496, 419, 967, 1243, 751, 472, 377, 419, 628, 480, 701, 368, 486, 949, 668, 720, 570, 425, 576, 352, 449, 427, 1551, 349, 478, 370, 327, 381, 379, 333, 403, 387, 378, 368, 450, 382, 376, 1184, 330, 349, 416, 435, 381, 362, 362, 426, 379, 372, 345, 841, 432, 952, 441, 238, 313, 437, 392, 763, 719, 376, 370, 679, 387, 531, 591, 352, 377, 174, 366, 340, 383, 361, 341, 335, 346, 392, 390, 731, 477, 861, 419, 1073, 337, 523, 972, 624, 404, 485, 398, 1249, 366, 371, 400, 419, 344, 823, 365, 506, 925, 305, 628, 357, 323, 489, 662, 354, 833, 353, 369, 352, 342, 493, 366, 329, 862, 333, 361, 816, 785, 500, 502, 368, 343, 349, 366, 340, 325, 359, 371, 403, 333, 385, 336, 352, 716, 424, 395, 1525, 338, 342, 504, 392, 808, 362, 327, 300, 1073, 1137, 376, 332, 363, 340, 876, 396, 319, 339, 330, 290, 1026, 452, 339, 286, 336, 873, 514, 339, 363, 883, 334, 324, 331, 324, 324, 326, 313, 324, 325, 332, 313, 321, 309, 692, 296, 312, 303, 333, 649, 697, 374, 294, 357, 313, 316, 294, 316, 422, 450, 321, 331, 302, 713, 303, 335, 321, 916, 350, 313, 307, 313, 1121, 312, 1299, 481, 306, 1072, 304, 622, 970, 310, 310, 980, 472, 317, 535, 328, 898, 661, 386, 335, 320, 337, 309, 293, 1362, 351, 876, 403, 319, 514, 1102, 456, 309, 498, 706, 305, 922, 1655, 330, 284, 915, 305, 319, 522, 546, 307, 502, 341, 358, 450, 324, 314, 322, 320, 321, 388, 307, 297, 310, 605, 358, 1048, 322, 315, 468, 350, 179, 1056, 1079, 342, 319, 345, 348, 314, 329, 311, 488, 775, 318, 312, 510, 884, 776, 313, 304, 488, 329, 294, 501, 315, 381, 348, 450, 299, 414, 481, 1377, 342, 1135, 637, 302, 322, 309, 305, 311, 696, 303, 486, 293, 308, 1131, 541, 295, 1198, 319, 301, 293, 321, 1268, 281, 361, 304, 306, 339, 1439, 618, 644, 359, 302, 319, 297, 690, 327, 299, 300, 305, 503, 326, 309, 367, 392, 964, 325, 291, 317, 281, 386, 282, 281, 366, 351, 906, 198, 294, 733, 442, 350, 315, 359, 435, 1220, 322, 330, 307, 434, 313, 304, 1111, 313, 313, 330, 336, 764, 312, 286, 348, 924, 309, 327, 317, 364, 423, 294, 337, 323, 313, 718, 676, 323, 335, 332, 332, 321, 1004, 340, 324, 296, 312, 512, 311, 324, 306, 308, 313, 310, 367, 330, 317, 311, 307, 308, 309, 451, 312, 169, 320, 462, 316, 304, 314, 324, 311, 303, 316, 324, 316, 364, 305, 307, 332, 628, 303, 336, 305, 318, 305, 323, 305, 289, 314, 309, 274, 302, 326, 469, 404, 331, 323, 301, 690, 755, 327, 322, 299, 470, 319, 246, 692, 551, 327, 369, 334, 321, 694, 322, 313, 319, 758, 494, 536, 300, 483, 295, 407, 289, 330, 314, 212, 306, 312, 360, 326, 335, 310, 461, 1065, 299, 1554, 316, 883, 306, 314, 302, 381, 313, 939, 310, 298, 295, 1040, 613, 365, 317, 842, 311, 427, 322, 315, 358, 313, 356, 307, 305, 727, 303, 343, 674, 300, 314, 303, 311, 694, 456, 434, 320, 422, 307, 293, 311, 149, 510, 314, 704, 1070, 294, 309, 368, 299, 328, 471, 300, 292, 305, 309, 336, 306, 323, 323, 367, 319, 374, 311, 324, 449, 345, 175, 300, 330, 390, 740, 1029, 644, 532, 339, 966, 307, 325, 301, 245, 916, 334, 463, 373, 313, 671, 678, 298, 315, 286, 820, 312, 535, 340, 464, 322, 323, 416, 595, 571, 596, 753, 725, 295, 304, 294, 451, 308, 303, 310, 506, 308, 744, 308, 289, 311, 293, 455, 327, 263, 1153, 1348, 473, 148, 1811, 134, 294, 577, 834, 349, 287, 1848, 316, 1058, 839, 759, 799, 323, 501, 372, 598, 366, 454, 383, 334, 324, 323, 696, 763, 318, 351, 334, 321, 1631, 295, 354, 292, 321, 741, 1141, 318, 722, 320, 311, 303, 302, 323, 335, 442, 310, 807, 338, 324, 341, 958, 301, 327, 458, 321, 319, 318, 337, 670, 1254, 1019, 340, 193, 740, 308, 413, 336, 203, 330, 321, 336, 966, 561, 1178, 323, 329, 582, 306, 202, 455, 305, 1161, 845, 341, 396, 428, 1298, 973, 300, 692, 519, 296, 306, 441, 759, 572, 299, 628, 340, 514, 320, 296, 326, 569, 823, 373, 618, 410, 317, 313, 712, 210, 363, 717, 1324, 1247, 297, 315, 315, 313, 1031, 354, 312, 312, 208, 374, 338, 361, 704, 433, 320, 319, 295, 528, 291, 1356, 520, 802, 369, 856, 954, 612, 286, 316, 440, 901, 413, 373, 375, 301, 462, 645, 414, 356, 554, 2389, 377, 371, 735, 458, 368, 400, 355, 345, 756, 377, 381, 275, 417, 337, 611, 390, 326, 319, 383, 338, 375, 329, 730, 416, 532, 312, 312, 326, 741, 396, 292, 480, 196, 288, 375, 347, 477, 969, 311, 535, 1560, 328, 312, 719, 459, 299, 324, 312, 505, 325, 547, 1029, 342, 908, 308, 999, 336, 568, 466, 353, 645, 324, 518, 722, 285, 613, 699, 610, 1555, 792, 683, 302, 676, 582, 290, 865, 1675, 559, 398, 271, 459, 1523, 366, 276, 882, 488, 562, 381, 295, 339, 543, 381, 623, 551, 367, 459, 348, 309, 350, 335, 328, 792, 320, 323, 324, 767, 443, 567, 380, 290, 362, 337, 345, 483, 560, 467, 356, 334, 749, 631, 321, 460, 356, 328, 329, 241, 366, 703, 346, 515, 362, 465, 841, 344, 304, 341, 560, 364, 355, 381, 357, 194, 176, 341, 386, 322, 342, 1393, 185, 341, 499, 3154, 324, 435, 542, 353, 402, 292, 334, 413, 179, 806, 892, 494, 281, 527, 332, 655, 724, 1253, 300, 326, 302, 701, 570, 408, 669, 360, 466, 795, 373, 301, 316, 355, 312, 303, 307, 434, 287, 321, 321, 300, 686, 306, 324, 716, 316, 875, 323, 479, 751, 326, 547, 371, 438, 329, 734, 1176, 495, 2745, 736, 421, 327, 436, 323, 353, 670, 442, 300, 595, 369, 727, 484, 352, 369, 325, 341, 266, 481, 306, 323, 294, 493, 365, 400, 382, 372, 540, 310, 317, 932, 321, 404, 328, 303, 340, 324, 313, 315, 318, 331, 729, 1063, 306, 322, 339, 317, 455, 312, 693, 332, 416, 320, 362, 322, 327, 331, 1044, 309, 337, 363, 426, 407, 613, 471, 337, 321, 308, 326, 976, 318, 1265, 314, 874, 294, 319, 366, 337, 343, 453, 322, 481, 447, 749, 370, 337, 308, 316, 516, 385, 426, 349, 416, 585, 373, 353, 360, 194, 419, 311, 318, 317, 287, 341, 335, 587, 551, 393, 303, 288, 1113, 322, 313, 863, 329, 285, 276, 327, 345, 769, 956, 1183, 866, 765, 309, 668, 1849, 516, 395, 363, 427, 293, 359, 260, 1235, 339, 465, 329, 725, 242, 361, 302, 347, 318, 337, 333, 325, 313, 544, 318, 304, 436, 332, 638, 741, 969, 362, 309, 909, 751, 721, 934, 535, 1328, 221, 459, 341, 302, 287, 306, 883, 222, 351, 769, 326, 292, 353, 412, 3017, 791, 401, 1250, 603, 839, 584, 358, 381, 465, 455, 495, 609, 313, 305, 1283, 680, 404, 325, 344, 356, 987, 453, 530, 606, 391, 364, 175, 327, 610, 341, 333, 794, 448, 351, 1603, 417, 283, 395, 540, 338, 319, 354, 302, 339, 364, 526, 347, 357, 542, 840, 416, 301, 370, 191, 1251, 174, 512, 338, 329, 828, 721, 309, 777, 319, 325, 325, 322, 341, 293, 336, 314, 321, 303, 408, 257, 955, 322, 323, 323, 1101, 227, 478, 336, 350, 175, 486, 313, 359, 1170, 346, 336, 500, 282, 910, 295, 303, 971, 1226, 335, 285, 653, 1002, 325, 353, 382, 323, 334, 289, 305, 316, 349, 430, 677, 160, 914, 453, 595, 419, 173, 281, 920, 364, 331, 502, 657, 421, 311, 360, 665, 636, 327, 346, 407, 632, 471, 326, 336, 749, 391, 557, 381, 478, 442, 469, 303, 310, 292, 379, 453, 274, 312, 673, 321, 516, 371, 288, 446, 352, 318, 617, 315, 329, 939, 646, 497, 178, 394, 409, 180, 390, 922, 380, 465, 495, 396, 835, 391, 362, 511, 346, 308, 565, 345, 314, 346, 333, 316, 355, 348, 427, 360, 415, 1113, 813, 321, 486, 349, 363, 363, 359, 181, 317, 356, 223, 294, 326, 146, 372, 307, 465, 402, 275, 324, 317, 359, 316, 336, 506, 782, 298, 283, 500, 401, 412, 631, 342, 296, 311, 327, 323, 422, 321, 354, 1106, 357, 399, 333, 322, 380, 298, 345, 340, 340, 310, 354, 307, 336, 470, 258, 315, 361, 473, 326, 553, 666, 1079, 318, 326, 848, 390, 516, 344, 1169, 449, 324, 340, 310, 320, 300, 326, 305, 498, 288, 324, 312, 174, 344, 354, 409, 260, 331, 494, 1185, 309, 835, 336, 801, 428, 190, 303, 446, 185, 321, 532, 286, 493, 746, 536, 336, 499, 340, 373, 1164, 336, 378, 313, 883, 728, 344, 322, 360, 315, 353, 203, 384, 426, 369, 328, 386, 321, 337, 318, 301, 319, 320, 175, 300, 349, 296, 315, 686, 323, 698, 315, 427, 1174, 506, 396, 321, 464, 309, 308, 338, 370, 327, 313, 941, 323, 384, 194, 333, 1186, 329, 1325, 325, 558, 311, 373, 335, 323, 977, 542, 311, 460, 1188, 324, 332, 184, 2534, 322, 1325, 300, 305, 383, 250, 307, 316, 417, 297, 1378, 305, 330, 316, 506, 717, 173, 426, 637, 1256, 803, 305, 314, 718, 317, 439, 324, 755, 411, 310, 386, 325, 331, 550, 302, 309, 341, 1055, 328, 355, 265, 1013, 477, 533, 1710, 322, 315, 346, 719, 324, 844, 342, 311, 700, 424, 419, 998, 442, 664, 1037, 446, 754, 369, 321, 864, 316, 346, 322, 847, 470, 490, 865, 310, 994, 322, 501, 361, 390, 661, 332, 344, 657, 431, 322, 440, 398, 1876, 732, 292, 1528, 380, 351, 209, 476, 467, 1304, 337, 925, 378, 769, 555, 551, 774, 227, 503, 334, 205, 351, 493, 368, 304, 1131, 320, 484, 800, 281, 549, 306, 316, 809, 310, 325, 529, 939, 836, 179, 321, 176, 326, 189, 370, 327, 351, 822, 317, 308, 321, 301, 494, 346, 355, 306, 326, 318, 302, 298, 287, 323, 316, 329, 320, 475, 306, 527, 902, 575, 1023, 309, 520, 273, 723, 341, 373, 334, 854, 534, 333, 1296, 312, 318, 525, 1259, 406, 441, 309, 498, 663, 706, 423, 631, 794, 452, 393, 766, 371, 356, 309, 265, 321, 542, 379, 317, 394, 325, 522, 346, 378, 308, 1310, 358, 457, 372, 698, 799, 319, 978, 310, 307, 339, 959, 328, 598, 491, 509, 463, 337, 328, 340, 326, 475, 330, 323, 337, 290, 375, 308, 747, 310, 736, 315, 303, 369, 536, 1075, 539, 717, 1493, 477, 513, 1314, 409, 494, 454, 881, 337, 278, 2065, 1757, 212, 458, 708, 363, 560, 326, 137, 598, 390, 785, 928, 301, 1965, 321, 232, 295, 751, 354, 307, 674, 343, 398, 1135, 336, 462, 343, 290, 306, 328, 329, 334, 410, 312, 659, 335, 976, 342, 449, 293, 324, 703, 313, 2091, 583, 731, 863, 337, 292, 1122, 320, 784, 1010, 885, 1148, 1264, 492, 644, 454, 1033, 294, 655, 574, 250, 320, 1056, 617, 1132, 344, 192, 611, 686, 732, 672, 382, 449, 500, 474, 350, 314, 324, 182, 856, 1291, 347, 327, 349, 1909, 536, 461, 641, 507, 1004, 369, 445, 344, 441, 356, 341, 315, 855, 315, 404, 370, 297, 339, 465, 732, 366, 349, 396, 918, 534, 359, 508, 380, 357, 388, 465, 257, 805, 975, 321, 315, 335, 1028, 458, 838, 372, 997, 571, 335, 372, 886, 299, 306, 498, 552, 303, 449, 478, 927, 280, 415, 301, 234, 324, 346, 1107, 1192, 321, 548, 305, 983, 763, 455, 337, 985, 372, 600, 476, 555, 429, 612, 387, 391, 394, 530, 429, 410, 387, 412, 395, 333, 348, 294, 350, 413, 308, 361, 334, 350, 361, 355, 1161, 1772, 334, 185, 313, 330, 603, 397, 469, 373, 302, 465, 493, 344, 325, 297, 185, 355, 362, 324, 334, 334, 349, 345, 305, 299, 349, 328, 357, 467, 319, 891, 570, 245, 1310, 1273, 472, 775, 318, 288, 1076, 1412] - }, - { - "label": "Assembly total cost", - "visible": false, - "values": [1125, 9274, 2735, 16920, 2193, 20704, 4814, 34689, 5565, 46554, 5225, 38887, 9746, 37715, 17798, 55250, 5697, 49083, 11226, 81939, 24258, 62488, 27363, 61924, 12511, 106196, 24444, 7443, 9111, 12527, 50738, 9320, 12291, 17571, 9508, 11176, 9142, 7687, 6724, 11219, 17825, 6506, 6367, 4966, 8495, 3860, 12844, 10688, 13026, 4007, 57281, 9790, 7335, 13748, 5358, 5393, 4401, 3769, 5233, 5058, 6047, 6188, 11899, 5297, 5154, 4406, 5061, 7022, 6358, 4721, 7723, 16745, 2651, 14194, 100772, 10504, 7021, 6131, 16730, 2904, 8334, 5968, 5876, 7394, 4454, 6800, 18376, 5204, 2190, 6146, 7013, 6412, 4361, 5082, 8028, 6484, 4504, 3832, 5687, 6174, 4603, 6913, 3651, 4631, 4833, 6532, 97138, 21918, 5801, 7435, 13138, 14597, 6070, 19943, 7487, 5362, 3945, 4907, 5287, 7937, 9998, 7852, 4820, 9385, 4686, 4751, 8594, 5144, 4760, 5899, 4614, 30326, 5332, 5030, 4759, 4429, 17294, 5192, 4542, 9333, 2261, 4911, 34968, 2179, 34658, 16325, 4811, 4185, 9017, 4224, 4435, 14536, 7129, 4772, 4726, 4840, 3369, 7428, 4504, 4316, 4097, 4399, 4733, 4105, 4597, 3691, 4405, 4245, 4195, 4168, 4694, 4421, 3507, 4615, 14408, 3607, 3956, 4295, 4583, 4138, 11128, 4147, 4602, 3940, 5590, 4505, 4377, 4016, 5191, 4199, 4269, 4686, 4375, 9716, 8664, 4371, 4294, 9779, 4396, 4183, 4247, 4112, 129671, 3426, 4257, 4102, 4386, 8822, 3138, 4040, 4066, 3950, 12502, 3787, 4273, 4238, 3678, 3660, 6006, 7725, 4172, 12580, 4056, 3920, 4249, 35461, 4054, 108185, 6568, 4154, 11735, 4090, 8971, 3943, 4062, 3857, 5408, 8982, 5662, 3974, 6673, 18248, 3739, 3770, 8110, 4129, 4050, 3826, 8314, 9053, 4022, 3718, 8838, 3786, 3874, 6244, 18434, 3815, 4491, 3954, 39629, 4009, 2456, 3643, 10976, 3783, 3946, 5151, 3900, 3730, 3854, 7621, 3597, 7909, 3959, 4022, 4585, 4130, 6699, 27180, 3935, 89225, 14401, 3962, 4022, 4459, 3816, 3938, 3931, 3041, 26734, 3722, 4047, 4583, 3998, 3907, 3887, 4191, 3858, 4033, 3994, 11019, 3777, 4482, 4277, 3968, 4237, 4378, 4264, 4212, 4049, 7410, 4020, 12723, 12452, 4283, 3862, 3953, 3803, 4276, 3866, 18642, 4063, 3648, 3901, 27631, 4251, 3875, 3837, 4109, 3808, 4083, 3993, 27553, 3950, 3715, 3617, 3819, 7947, 11786, 3358, 44432, 38355, 6845, 9723, 4878, 11458, 6609, 3321, 4964, 3884, 3963, 8633, 3627, 3471, 3780, 3359, 4582, 28916, 3896, 12827, 3908, 3865, 4945, 4276, 6296, 3685, 3657, 3948, 6513, 6549, 4829, 3554, 4503, 3893, 3820, 4464, 3720, 3270, 3743, 3861, 27079, 4284, 4335, 9658, 3671, 7768, 3772, 15008, 6611, 4023, 3840, 3957, 3579, 8798, 3870, 9817, 3319, 3647, 3955, 3782, 3981, 3845, 3930, 5570, 3975, 3856, 3851, 4094, 4130, 3676, 5579, 4013, 17649, 3704, 3967, 4152, 34352, 3909, 16007, 3517, 56056, 4041, 14115, 3652, 6567, 13776, 3906, 4618, 3729, 6550, 8592, 12494, 3885, 13919, 10616, 12510, 2200, 4164, 4256, 13850, 3877, 11216, 1477, 7529, 3283, 3802, 3773, 3728, 3868, 4104, 7658, 4381, 4671, 6364, 3789, 3774, 16177, 3965, 9465, 5965, 4054, 5330, 15225, 3764, 3865, 4058, 3775, 3758, 3704, 4368, 3729, 3767, 3828, 4150, 3804, 15268, 3815, 11823, 3345, 4872, 4659, 7489, 3729, 3868, 29343, 3997, 2114, 5553, 4292, 12800, 4382, 19742, 4101, 8777, 3940, 3978, 7211, 4103, 3980, 12415, 12316, 4082, 8375, 3841, 8810, 4128, 11997, 4269, 15031, 3683, 3614, 4116, 35845, 3653, 3538, 4223, 8373, 33766, 4411, 3863, 4728, 11456, 5587, 38362, 5111, 29991, 4825, 10478, 13283, 4010, 38799, 11943, 14042, 4038, 5282, 12235, 4027, 11570, 5328, 3914, 4404, 6180, 10126, 10305, 23044, 12414, 6658, 6690, 17090, 5813, 10147, 5552, 14343, 11440, 9605, 8565, 6188, 5280, 5483, 3629, 5741, 8375, 6864, 5353, 6098, 6015, 5678, 6594, 5520, 15985, 8704, 5263, 5731, 5020, 5553, 13258, 6541, 4909, 5117, 6779, 61602, 6992, 8510, 3993, 5627, 4035, 4817, 6048, 5638, 10862, 4568, 6015, 5021, 4284, 5133, 5166, 4381, 5240, 5107, 5232, 4897, 7559, 5099, 5020, 15005, 4330, 4830, 11538, 5852, 5130, 4805, 4753, 9282, 4965, 4964, 4540, 21046, 5789, 15483, 5931, 2900, 4104, 5939, 10136, 12664, 9245, 4934, 4829, 9958, 5014, 8126, 4141, 4664, 5028, 2236, 4825, 4450, 6349, 4727, 4520, 4438, 4538, 5013, 4969, 9032, 29764, 12658, 5571, 12826, 4427, 6303, 6807, 8189, 5126, 6691, 5004, 15571, 4613, 4841, 5437, 5492, 4572, 13590, 4729, 31885, 9172, 3977, 4397, 4489, 4192, 30894, 17398, 4636, 12650, 4567, 4597, 4625, 4501, 8431, 4569, 4265, 10628, 4315, 4627, 13535, 10198, 3503, 6671, 4717, 4428, 4557, 4727, 4387, 4179, 4651, 4798, 4920, 4306, 4756, 4240, 4542, 8949, 27217, 5130, 100064, 4412, 4353, 3534, 4753, 45902, 4727, 4278, 3988, 13557, 14324, 4833, 4152, 4563, 4299, 10786, 10025, 3990, 4245, 4201, 3703, 12584, 5588, 4231, 4049, 4219, 10855, 3598, 4248, 4530, 10756, 4306, 4004, 4135, 4069, 4192, 4082, 3919, 4071, 4059, 4177, 3922, 3982, 3841, 11321, 3668, 3855, 3796, 4226, 8651, 8405, 8613, 3628, 4544, 3889, 3934, 3673, 3943, 27240, 28881, 4011, 4120, 3737, 40767, 3746, 4190, 4026, 9678, 8023, 3928, 3813, 3904, 13989, 3909, 22474, 5945, 3795, 14047, 3829, 8130, 12089, 4416, 3859, 23854, 5822, 3941, 34877, 4097, 6289, 8372, 4738, 4124, 3961, 4110, 3843, 3763, 22330, 4302, 10698, 5011, 3960, 6460, 13165, 5659, 3833, 6159, 8569, 3728, 12430, 17360, 4081, 3556, 12850, 3802, 3962, 5382, 7233, 3823, 5937, 4512, 4425, 5552, 4024, 3882, 3993, 3970, 3997, 4806, 3793, 3723, 3848, 7973, 4442, 12803, 4020, 3904, 6002, 4338, 2233, 17184, 14084, 4271, 3942, 7932, 4327, 3882, 4098, 3837, 5936, 10801, 3953, 3865, 3573, 10508, 19422, 3855, 4313, 3419, 4098, 3648, 3507, 3942, 5038, 4350, 28905, 3717, 26636, 31080, 16310, 4550, 14594, 8871, 3743, 4000, 3809, 3784, 3870, 15692, 3764, 7100, 3653, 3821, 13999, 7394, 4537, 14574, 3960, 3737, 3643, 3972, 8878, 3501, 4511, 3785, 3810, 4214, 92394, 8440, 8972, 4418, 3717, 3955, 3701, 10342, 4052, 3730, 3688, 3796, 6183, 4046, 3823, 4535, 4834, 13248, 4026, 3616, 3936, 3491, 4754, 3483, 3528, 4498, 4365, 11386, 2894, 3620, 18349, 5466, 2455, 3885, 4448, 5426, 14879, 3993, 4086, 3797, 5588, 3885, 3773, 18127, 3875, 3891, 4095, 4159, 11648, 3866, 3565, 4317, 12171, 3823, 4053, 3922, 8253, 27165, 3649, 7753, 4005, 3871, 17967, 44240, 3984, 4138, 4101, 4124, 3966, 12588, 4194, 4016, 3667, 3851, 11327, 3833, 4023, 3798, 3810, 3874, 3840, 8337, 4063, 3925, 3852, 3812, 3820, 3828, 5671, 3844, 2457, 3964, 3237, 3922, 3762, 3880, 4014, 3866, 3752, 3931, 4022, 3918, 4517, 3779, 3801, 4107, 15710, 3752, 4170, 3771, 3965, 3775, 4004, 3779, 3585, 3903, 3836, 3382, 3748, 4032, 3283, 5534, 4099, 3997, 3732, 8711, 18895, 4040, 3984, 3701, 7008, 3970, 3088, 8520, 6614, 4162, 4436, 4138, 3979, 8524, 4013, 3861, 3965, 18961, 6070, 6394, 3698, 5940, 3645, 4818, 3582, 4120, 3910, 2799, 3779, 3893, 4458, 4022, 4108, 3820, 3227, 10985, 3685, 22218, 3925, 10987, 3806, 3865, 3745, 22845, 3873, 12636, 3830, 3697, 3640, 14144, 8228, 4503, 3912, 10683, 3832, 27508, 4369, 3907, 4705, 3860, 4686, 3807, 3775, 11854, 3763, 4259, 10998, 3715, 3918, 3754, 3837, 10320, 29350, 28013, 4806, 27181, 3783, 3626, 3838, 2197, 6793, 3880, 11481, 28248, 3636, 3818, 4555, 3699, 4061, 5737, 3704, 3612, 3780, 3815, 4160, 3795, 3964, 4006, 4520, 3967, 4631, 3837, 4005, 5551, 4224, 2573, 3722, 4063, 25150, 8949, 12712, 7939, 6700, 4162, 13481, 3801, 3966, 3741, 3298, 11662, 4130, 6268, 4621, 3866, 16793, 9268, 3710, 4199, 3545, 8357, 3845, 7090, 4227, 5999, 3976, 3986, 5145, 8848, 7687, 7778, 9672, 18129, 3671, 3758, 3623, 6176, 3829, 3751, 3839, 6623, 3818, 9382, 3824, 3567, 3876, 3648, 3187, 4050, 3274, 14438, 33701, 3315, 2019, 17972, 1935, 3651, 7236, 10042, 4314, 3418, 46207, 3910, 13235, 11016, 5315, 12999, 4040, 6042, 4600, 6015, 4556, 10560, 4629, 4154, 4057, 4028, 10213, 10194, 3936, 4337, 4100, 4017, 17640, 3666, 4336, 3605, 3985, 10013, 13900, 3940, 9771, 4029, 3830, 6681, 3749, 4002, 4144, 28335, 3851, 9628, 4190, 4020, 4209, 11639, 3714, 4051, 29534, 4001, 3943, 3919, 4181, 8921, 15249, 25498, 4413, 2570, 9094, 3781, 5196, 4153, 2806, 4299, 3944, 4153, 11672, 7329, 13429, 3990, 4059, 5928, 3770, 2724, 5689, 3807, 14139, 10239, 7795, 4983, 10307, 16032, 12418, 3739, 8526, 6457, 3656, 3791, 28264, 8997, 7054, 3697, 6385, 4206, 7040, 3971, 3702, 4031, 8243, 47305, 4623, 6289, 26518, 3919, 3896, 17804, 2868, 4490, 17926, 86514, 14833, 3636, 3919, 3900, 4163, 13083, 4797, 3872, 3870, 2921, 4626, 4389, 4492, 8805, 27930, 3981, 3945, 3652, 6474, 3616, 84260, 6441, 11593, 4576, 12714, 13232, 12893, 3555, 3922, 28141, 12058, 5088, 4661, 4667, 3727, 5861, 9001, 5727, 4432, 6923, 39382, 6197, 4625, 16568, 5855, 4562, 4751, 4391, 4257, 9707, 4869, 4715, 17117, 5311, 4147, 6155, 4805, 4006, 3954, 8680, 4167, 23759, 4134, 11938, 26580, 3728, 3886, 3880, 4065, 18544, 9038, 3609, 30977, 2647, 3585, 8622, 4313, 3341, 60270, 3902, 6742, 101532, 4069, 3902, 11753, 5734, 3706, 7359, 3882, 5163, 4062, 7403, 12706, 4274, 11082, 3834, 13857, 4180, 7733, 6289, 4394, 8664, 4020, 6487, 8926, 3545, 7424, 8967, 7105, 15471, 8990, 15930, 3739, 4733, 4080, 3681, 11600, 109361, 35468, 4939, 3449, 29173, 88421, 4596, 3452, 11753, 4978, 36214, 4717, 3650, 4247, 34932, 4724, 9055, 6852, 4699, 6300, 4318, 3863, 4364, 4208, 4057, 11771, 3994, 3980, 3999, 11116, 5528, 7493, 24623, 3933, 4465, 4205, 4283, 6279, 5729, 5893, 4439, 4200, 9248, 4421, 4061, 5686, 4450, 4066, 4108, 3132, 4617, 17583, 4328, 6506, 4535, 30003, 48630, 4313, 3777, 4245, 6884, 4535, 3881, 8812, 4461, 2683, 2233, 4284, 4820, 4040, 4277, 16571, 2554, 4242, 6285, 51154, 4044, 5770, 3800, 4401, 5008, 3647, 4158, 26583, 2467, 20174, 10786, 3461, 3497, 7861, 4243, 16393, 11861, 76828, 4026, 4071, 3740, 17541, 7580, 5092, 4687, 4720, 3266, 13157, 4661, 3747, 3893, 4432, 3893, 3761, 3795, 9961, 3574, 4001, 3976, 3773, 17165, 3782, 4045, 9144, 3962, 50212, 4029, 5950, 8949, 4070, 7221, 8644, 28169, 4062, 8752, 15000, 15842, 44456, 9155, 5309, 4053, 10116, 4046, 4394, 8316, 5514, 3711, 38351, 8468, 10339, 6030, 8029, 4578, 4029, 4222, 3390, 6727, 3803, 20095, 3644, 31728, 4573, 9131, 24869, 4656, 40536, 3844, 3932, 12001, 3974, 9248, 4031, 3798, 4203, 4056, 3876, 3886, 3939, 4057, 9567, 26598, 3804, 4015, 7758, 3949, 29312, 3902, 8209, 7521, 5578, 3987, 4785, 3995, 4079, 4112, 12730, 3823, 4210, 8367, 27490, 4937, 8779, 6457, 7775, 3957, 3823, 4042, 22441, 3978, 15741, 3913, 12279, 3646, 3940, 5004, 4172, 4199, 5890, 4245, 5994, 5525, 18737, 4526, 4310, 3837, 3909, 33292, 4777, 27477, 4301, 5769, 8151, 4658, 4344, 4495, 2657, 5789, 3851, 3932, 3934, 3683, 4207, 4138, 8298, 6530, 8710, 3782, 3585, 13380, 3997, 3900, 49974, 4074, 3540, 3419, 4076, 4261, 9672, 6695, 14148, 50140, 9092, 3985, 9640, 42657, 33535, 8852, 8334, 5261, 3730, 22730, 3339, 76534, 4819, 28020, 4070, 8981, 2923, 4505, 4593, 4316, 3911, 4185, 4135, 4015, 3895, 5559, 3947, 4231, 5169, 4122, 8906, 18540, 11809, 4399, 3866, 11489, 9502, 10162, 11780, 34617, 14012, 2961, 5785, 4343, 3766, 3585, 3799, 14853, 2997, 4256, 9665, 19975, 3645, 8150, 26579, 49058, 11073, 4814, 31254, 7724, 11033, 8315, 4314, 4509, 5916, 28810, 5994, 15238, 3883, 3771, 13249, 9488, 4866, 3982, 4169, 4354, 12208, 5757, 12358, 7437, 4743, 4418, 2405, 4048, 10157, 4252, 4071, 19869, 5500, 4254, 11221, 5164, 4153, 4884, 3785, 4207, 3912, 4325, 3755, 4161, 8314, 3687, 4203, 4409, 5546, 22831, 5131, 3903, 4589, 2432, 80943, 2199, 3585, 4205, 4049, 12623, 11762, 3815, 9929, 3934, 4023, 4371, 3987, 4218, 3830, 4139, 3910, 4533, 3782, 5007, 3306, 23891, 3988, 4008, 4002, 13496, 3002, 5976, 4142, 4357, 2414, 30186, 4189, 4749, 13952, 4589, 4189, 5993, 3502, 13135, 3665, 3739, 11784, 28602, 4450, 3574, 10675, 13041, 4002, 4349, 4771, 4001, 4159, 3482, 3804, 3884, 4343, 9972, 16927, 2221, 12913, 29211, 7041, 27050, 2402, 3485, 11956, 4511, 4063, 3515, 9775, 27027, 3871, 8808, 8094, 8066, 4060, 4286, 26107, 7034, 28205, 4038, 4148, 12288, 5029, 6825, 24260, 30775, 28412, 5946, 3777, 3890, 3615, 4738, 29181, 16464, 3920, 8606, 4059, 5257, 4640, 3570, 6020, 4387, 3958, 40271, 3907, 4062, 12193, 4527, 31964, 2436, 4879, 9400, 2240, 4846, 59578, 8689, 28097, 6135, 9008, 12433, 5015, 4496, 3579, 4307, 3807, 8084, 4643, 3879, 4300, 4138, 4068, 4424, 4336, 6213, 4457, 26961, 14333, 13269, 4073, 6316, 4332, 4492, 8378, 4443, 2350, 4011, 4427, 2909, 3752, 3989, 1997, 8651, 3891, 5882, 5091, 3443, 4074, 3974, 4512, 3921, 4204, 5164, 10883, 3711, 3570, 6328, 5074, 5141, 8367, 4363, 3678, 3889, 4145, 4042, 5286, 3989, 4476, 13140, 4539, 25758, 4129, 4004, 4694, 3864, 4295, 4277, 4463, 3857, 4439, 3782, 4186, 30163, 3261, 3942, 5408, 6214, 4099, 3875, 9581, 15415, 3965, 4083, 10985, 4853, 3614, 4321, 14442, 3146, 4061, 4248, 3869, 4031, 3748, 4124, 3763, 7007, 3547, 4060, 3906, 2375, 4294, 4412, 5156, 3421, 4143, 6916, 14716, 3866, 10080, 4168, 11257, 6132, 2617, 3796, 5781, 2543, 4022, 7851, 3579, 31698, 10449, 7074, 4179, 6623, 4294, 4985, 14197, 4219, 4643, 3871, 10871, 10158, 4303, 4042, 4687, 3933, 4395, 2669, 5223, 26888, 4835, 4120, 4863, 4033, 4234, 3945, 3787, 4005, 4006, 2384, 3737, 4331, 3717, 3897, 11221, 3970, 11405, 3906, 5170, 26275, 5172, 4725, 4027, 29448, 3856, 3820, 4221, 4553, 4084, 3920, 12274, 4041, 4563, 2432, 4168, 14781, 4089, 84860, 4055, 6853, 3917, 4639, 4187, 4046, 15864, 3795, 3896, 29479, 14289, 4031, 4153, 2588, 41096, 4004, 28909, 3755, 3826, 4556, 3108, 3827, 3932, 4954, 3685, 14009, 3794, 4092, 3929, 5161, 10867, 2372, 5304, 7846, 14855, 10527, 3801, 3892, 17953, 3898, 5557, 4010, 8929, 5144, 3868, 4846, 4033, 4106, 7961, 3734, 3844, 4228, 14218, 4070, 4390, 3578, 64666, 30739, 9257, 42766, 3995, 3910, 4320, 11739, 4026, 10762, 4262, 3868, 21774, 27155, 26769, 13667, 5432, 8575, 13691, 5792, 12304, 8357, 3962, 12225, 3930, 4287, 3987, 10619, 5986, 6403, 11136, 3844, 13668, 4749, 6511, 4570, 5367, 9270, 4129, 5042, 6824, 27699, 3999, 28366, 4786, 30493, 10545, 3619, 38201, 4702, 4334, 2851, 30809, 3274, 21828, 4164, 12971, 4680, 9109, 6845, 6667, 9545, 3102, 31606, 4117, 3017, 4334, 31897, 8413, 3756, 13786, 3943, 7094, 9861, 17684, 7372, 3802, 3923, 13130, 3832, 4035, 6716, 13120, 10771, 2451, 3981, 2509, 4019, 2530, 4595, 4017, 4468, 12432, 3922, 3813, 3969, 3716, 31879, 4280, 4485, 3782, 4025, 3901, 3719, 18455, 3560, 3943, 19801, 4049, 3957, 30692, 3774, 3690, 12946, 43153, 12827, 3480, 3642, 3492, 5065, 4683, 8439, 4097, 5979, 7318, 4074, 27698, 3828, 3955, 7204, 80055, 4851, 11026, 3846, 6536, 41579, 8716, 5304, 9580, 9725, 10335, 8879, 9245, 8502, 4393, 7028, 3207, 3943, 6586, 4696, 3914, 9070, 4049, 33617, 4304, 8600, 3814, 81235, 4422, 6506, 4557, 7048, 19991, 3954, 13795, 3822, 3798, 4260, 11751, 4101, 7718, 31546, 6384, 3247, 4172, 4088, 4228, 4035, 5786, 4094, 3987, 4185, 3877, 4554, 3840, 8856, 17877, 11098, 3877, 3743, 4629, 5448, 14210, 5504, 17927, 15188, 5892, 6491, 15609, 4910, 8230, 29322, 11412, 4175, 3866, 34283, 101349, 2855, 3210, 17724, 4466, 6815, 4038, 1938, 8412, 4895, 12817, 23221, 3737, 32782, 3984, 3123, 3650, 12300, 4338, 3889, 8256, 4272, 5260, 14199, 4117, 6801, 4269, 3612, 3803, 4083, 4070, 4216, 5383, 3891, 9386, 4152, 13778, 7919, 3149, 3636, 4064, 11473, 3886, 34380, 6906, 11939, 10572, 7726, 3639, 58427, 3988, 5494, 13997, 12759, 69547, 82624, 6238, 9041, 5960, 13276, 3667, 7896, 6782, 3844, 3967, 12716, 7470, 14500, 4257, 2617, 7419, 4804, 8821, 4705, 4733, 28271, 6839, 30762, 4321, 3868, 3984, 2542, 11350, 13299, 4292, 4368, 4264, 27377, 8775, 5744, 7910, 12689, 12160, 4769, 5551, 4261, 5514, 4379, 4244, 3879, 21386, 4042, 9266, 4556, 3667, 4165, 29895, 11939, 4558, 4237, 4917, 13036, 6889, 4424, 32664, 4694, 8153, 9377, 5507, 3342, 10823, 62847, 3939, 3912, 4122, 66439, 3210, 10350, 4615, 12868, 7511, 4255, 4616, 12370, 3704, 3788, 6565, 6764, 3760, 5382, 5920, 13436, 16417, 5747, 3951, 2810, 4018, 4297, 24861, 15191, 3990, 6731, 3764, 13253, 9573, 10539, 4175, 13712, 4754, 7612, 10652, 6949, 5321, 4285, 4785, 4906, 4827, 33385, 5270, 5091, 4739, 5003, 4787, 4146, 4299, 3657, 4368, 5066, 3848, 4575, 4150, 4381, 4496, 4471, 14916, 29694, 4159, 2529, 3889, 4098, 8034, 4757, 6803, 4640, 3780, 5750, 7248, 4255, 3991, 3723, 2276, 4447, 4513, 4048, 4071, 4323, 4361, 4313, 3757, 3874, 4314, 4087, 4463, 30169, 3933, 11064, 8721, 3231, 14337, 15420, 5613, 10373, 4057, 3450, 14347, 15572] - }, - { - "label": "Assembly penalty weight", - "values": [9, 794, 34, 1409, 17, 536, 39, 7133, 115, 9843, 107, 7017, 273, 5131, 1210, 9032, 82, 7312, 252, 16778, 760, 4349, 891, 4228, 123, 10800, 1593, 467, 260, 226, 2940, 803, 689, 420, 422, 1229, 275, 198, 150, 423, 423, 134, 146, 89, 248, 55, 612, 401, 546, 52, 4208, 307, 194, 257, 91, 93, 178, 133, 99, 98, 131, 345, 461, 90, 96, 69, 91, 160, 148, 81, 274, 1332, 31, 667, 11733, 502, 163, 354, 480, 67, 252, 120, 303, 181, 162, 153, 1142, 251, 17, 131, 165, 135, 162, 222, 230, 154, 198, 58, 109, 132, 189, 159, 102, 167, 218, 147, 11969, 2288, 316, 467, 234, 1025, 169, 497, 435, 265, 49, 82, 252, 234, 372, 229, 79, 127, 76, 82, 105, 97, 207, 115, 75, 1014, 259, 95, 84, 68, 404, 91, 183, 273, 49, 82, 1378, 14, 5405, 769, 86, 168, 308, 67, 69, 818, 200, 87, 79, 86, 100, 174, 77, 66, 58, 74, 206, 62, 73, 129, 71, 63, 65, 67, 71, 72, 116, 76, 696, 46, 55, 66, 77, 61, 460, 62, 77, 55, 146, 77, 71, 58, 93, 64, 68, 82, 66, 364, 113, 69, 69, 145, 69, 62, 65, 62, 19984, 113, 65, 60, 69, 307, 33, 60, 60, 57, 676, 52, 67, 64, 49, 50, 129, 196, 63, 690, 59, 56, 66, 5409, 60, 13549, 146, 62, 466, 61, 305, 56, 60, 56, 138, 299, 102, 58, 406, 1019, 51, 137, 247, 63, 59, 54, 226, 257, 59, 51, 286, 52, 55, 143, 1039, 53, 73, 58, 4807, 59, 22, 49, 411, 52, 57, 98, 129, 51, 143, 90, 47, 284, 57, 59, 77, 63, 162, 849, 56, 8935, 711, 58, 59, 73, 53, 56, 57, 30, 822, 50, 59, 78, 59, 56, 55, 65, 54, 60, 58, 532, 52, 75, 71, 57, 65, 70, 67, 65, 60, 173, 59, 717, 203, 68, 55, 57, 53, 67, 55, 1579, 61, 49, 56, 877, 66, 56, 142, 62, 53, 62, 58, 873, 57, 132, 126, 54, 98, 622, 103, 9106, 1860, 454, 148, 206, 412, 423, 103, 77, 55, 57, 118, 49, 45, 52, 40, 77, 960, 56, 603, 57, 55, 225, 68, 146, 50, 49, 58, 159, 142, 88, 46, 76, 56, 54, 75, 51, 100, 51, 55, 842, 69, 59, 353, 49, 236, 52, 829, 150, 60, 54, 54, 47, 277, 55, 309, 104, 49, 58, 52, 59, 55, 57, 116, 58, 55, 143, 62, 63, 50, 151, 59, 515, 53, 58, 64, 1357, 56, 961, 117, 3664, 61, 696, 128, 147, 639, 56, 79, 51, 342, 268, 245, 55, 311, 413, 505, 17, 63, 67, 713, 55, 199, 17, 89, 34, 53, 53, 51, 55, 60, 192, 71, 84, 130, 52, 52, 1033, 58, 122, 113, 61, 134, 1110, 52, 55, 60, 52, 68, 50, 71, 52, 52, 54, 61, 139, 861, 53, 464, 105, 86, 84, 207, 125, 54, 3281, 58, 15, 108, 68, 523, 71, 1197, 59, 120, 57, 57, 187, 60, 58, 483, 696, 61, 109, 54, 121, 60, 563, 67, 797, 130, 47, 61, 1473, 49, 119, 65, 231, 1307, 71, 55, 85, 491, 114, 1705, 96, 1039, 86, 346, 690, 60, 1724, 462, 677, 61, 106, 664, 59, 590, 134, 56, 71, 355, 338, 168, 1600, 612, 141, 437, 1438, 111, 367, 283, 942, 412, 453, 259, 128, 92, 277, 45, 304, 278, 156, 269, 123, 136, 121, 148, 104, 1063, 676, 257, 125, 85, 105, 301, 142, 232, 85, 150, 4912, 226, 287, 135, 108, 147, 77, 123, 109, 1131, 72, 131, 84, 63, 88, 88, 66, 95, 89, 90, 81, 222, 88, 85, 808, 64, 76, 179, 115, 88, 78, 77, 236, 85, 83, 71, 1381, 113, 1075, 118, 31, 58, 117, 144, 653, 301, 84, 81, 315, 88, 207, 155, 74, 86, 17, 80, 68, 166, 77, 69, 67, 71, 89, 88, 303, 989, 509, 105, 642, 67, 153, 405, 231, 94, 147, 90, 889, 76, 81, 98, 104, 71, 773, 78, 1146, 413, 55, 178, 73, 61, 1077, 421, 74, 503, 73, 77, 73, 69, 255, 76, 63, 420, 65, 76, 752, 363, 112, 151, 78, 68, 72, 78, 67, 61, 75, 80, 91, 65, 84, 65, 72, 292, 847, 91, 11709, 67, 67, 110, 86, 2467, 77, 63, 54, 662, 742, 82, 63, 75, 66, 434, 144, 58, 65, 63, 48, 594, 115, 65, 53, 64, 433, 119, 65, 75, 438, 65, 59, 62, 60, 61, 60, 56, 60, 60, 63, 56, 58, 54, 561, 49, 55, 52, 64, 254, 271, 115, 48, 73, 55, 56, 49, 56, 853, 954, 59, 62, 51, 1951, 52, 64, 59, 430, 100, 56, 53, 55, 717, 55, 1725, 131, 53, 681, 53, 229, 536, 63, 54, 842, 126, 57, 1413, 61, 321, 252, 84, 63, 58, 63, 54, 50, 2153, 69, 432, 92, 57, 151, 677, 118, 54, 140, 279, 52, 519, 1391, 61, 46, 538, 53, 58, 135, 178, 53, 140, 69, 72, 115, 59, 56, 58, 58, 58, 85, 53, 50, 54, 218, 72, 618, 59, 56, 127, 69, 18, 1321, 688, 67, 57, 98, 69, 56, 61, 54, 133, 382, 57, 55, 120, 434, 1165, 55, 60, 108, 61, 49, 114, 56, 86, 69, 957, 50, 814, 1112, 1052, 70, 751, 257, 51, 59, 54, 52, 55, 392, 52, 160, 49, 53, 726, 181, 64, 806, 57, 51, 49, 58, 629, 45, 74, 52, 53, 65, 9789, 237, 263, 72, 51, 57, 50, 337, 60, 51, 50, 53, 143, 60, 54, 76, 87, 580, 60, 48, 57, 44, 84, 45, 45, 75, 70, 470, 26, 48, 1034, 110, 56, 56, 73, 108, 837, 59, 62, 53, 110, 55, 52, 1450, 55, 55, 62, 64, 426, 55, 46, 68, 509, 54, 60, 57, 107, 846, 49, 93, 59, 55, 992, 2282, 59, 63, 62, 62, 58, 577, 65, 59, 49, 55, 208, 54, 59, 53, 53, 55, 54, 109, 61, 57, 55, 53, 54, 54, 116, 55, 19, 58, 98, 56, 52, 56, 59, 55, 52, 56, 59, 56, 75, 52, 53, 62, 758, 52, 64, 52, 57, 52, 59, 52, 47, 56, 54, 42, 51, 60, 101, 101, 62, 59, 51, 274, 1101, 60, 58, 50, 155, 58, 34, 270, 169, 62, 76, 63, 58, 272, 59, 55, 57, 1092, 137, 159, 51, 132, 49, 92, 47, 62, 56, 26, 53, 55, 73, 60, 63, 54, 98, 564, 50, 3025, 56, 444, 53, 55, 52, 564, 55, 537, 54, 50, 49, 667, 228, 75, 57, 409, 54, 869, 63, 56, 76, 55, 75, 53, 52, 623, 52, 66, 534, 51, 56, 52, 54, 337, 989, 902, 72, 848, 53, 48, 55, 15, 157, 55, 586, 1108, 49, 54, 76, 50, 61, 125, 51, 48, 52, 54, 64, 53, 59, 59, 76, 58, 79, 54, 59, 114, 67, 21, 51, 61, 726, 306, 600, 234, 162, 65, 594, 53, 59, 51, 36, 485, 63, 131, 79, 55, 867, 285, 50, 60, 46, 330, 55, 171, 66, 126, 58, 59, 98, 247, 199, 210, 330, 1010, 49, 52, 48, 126, 54, 52, 54, 151, 53, 318, 53, 47, 55, 49, 95, 60, 39, 760, 3499, 103, 13, 1582, 12, 49, 190, 388, 69, 45, 6497, 56, 640, 418, 246, 757, 59, 140, 78, 174, 76, 172, 82, 63, 60, 59, 331, 352, 57, 69, 63, 58, 1417, 49, 70, 48, 58, 336, 732, 57, 319, 58, 54, 72, 52, 59, 63, 918, 54, 363, 64, 59, 66, 515, 51, 60, 1002, 58, 57, 57, 64, 270, 883, 1867, 68, 22, 309, 53, 97, 64, 25, 64, 58, 64, 523, 186, 826, 59, 61, 166, 53, 24, 118, 53, 758, 400, 95, 90, 158, 954, 549, 51, 271, 153, 49, 53, 914, 320, 185, 50, 193, 65, 164, 58, 50, 60, 217, 2632, 79, 187, 810, 57, 55, 976, 27, 74, 988, 8719, 865, 49, 56, 56, 59, 614, 77, 55, 55, 27, 79, 67, 74, 283, 897, 58, 57, 49, 157, 48, 7908, 153, 430, 77, 511, 575, 285, 46, 56, 904, 492, 96, 79, 80, 51, 123, 265, 108, 72, 175, 6523, 163, 78, 437, 122, 76, 88, 71, 67, 333, 83, 82, 326, 100, 64, 181, 86, 60, 57, 119, 64, 639, 62, 622, 806, 126, 55, 55, 60, 1051, 128, 48, 1104, 23, 47, 116, 68, 104, 4048, 55, 164, 11963, 61, 55, 605, 120, 50, 85, 55, 125, 60, 183, 600, 67, 464, 54, 631, 64, 199, 132, 71, 253, 59, 153, 295, 46, 210, 284, 233, 1168, 369, 390, 51, 204, 156, 48, 454, 13920, 1427, 90, 42, 967, 9234, 76, 43, 469, 117, 1506, 82, 49, 65, 1401, 82, 262, 172, 78, 131, 68, 54, 69, 64, 61, 438, 58, 59, 59, 395, 112, 192, 700, 51, 74, 64, 67, 137, 155, 125, 72, 63, 318, 173, 59, 120, 72, 61, 61, 34, 77, 941, 68, 152, 75, 1036, 2493, 67, 52, 66, 177, 75, 68, 120, 72, 23, 17, 66, 85, 59, 67, 1079, 21, 66, 143, 11880, 59, 113, 134, 71, 92, 48, 63, 812, 20, 1241, 446, 111, 45, 195, 64, 778, 609, 7556, 54, 60, 51, 944, 195, 95, 214, 77, 100, 716, 79, 51, 56, 72, 55, 52, 53, 155, 47, 58, 58, 51, 897, 53, 60, 297, 57, 2646, 59, 130, 313, 60, 178, 115, 911, 61, 300, 801, 317, 9038, 308, 102, 60, 158, 59, 70, 255, 111, 51, 1691, 112, 345, 133, 101, 77, 60, 66, 41, 147, 53, 449, 49, 1156, 76, 131, 717, 79, 1595, 54, 57, 507, 58, 134, 60, 52, 65, 60, 55, 56, 57, 61, 315, 2179, 53, 59, 94, 57, 987, 55, 266, 89, 105, 58, 78, 59, 61, 62, 613, 54, 65, 109, 870, 93, 248, 138, 94, 58, 53, 60, 785, 57, 911, 56, 491, 49, 57, 83, 64, 66, 120, 61, 132, 113, 1080, 77, 66, 54, 56, 1274, 84, 868, 69, 109, 217, 79, 70, 74, 23, 110, 55, 57, 57, 48, 65, 63, 223, 169, 123, 52, 47, 692, 58, 56, 2946, 61, 46, 43, 60, 67, 339, 407, 779, 2965, 325, 56, 298, 6838, 1303, 125, 108, 103, 49, 585, 39, 6512, 75, 852, 61, 298, 32, 74, 66, 68, 57, 64, 63, 59, 55, 145, 57, 58, 105, 62, 259, 1056, 528, 73, 54, 476, 325, 335, 501, 1382, 903, 29, 121, 67, 52, 47, 53, 846, 30, 69, 339, 438, 48, 103, 812, 10805, 400, 89, 3049, 211, 419, 223, 71, 80, 125, 938, 137, 693, 55, 52, 820, 294, 91, 59, 66, 71, 553, 118, 235, 207, 85, 74, 19, 60, 416, 66, 62, 1242, 113, 69, 1218, 98, 54, 88, 136, 65, 57, 70, 51, 65, 108, 129, 67, 72, 145, 710, 98, 53, 78, 21, 7564, 17, 120, 65, 61, 500, 611, 54, 350, 57, 60, 64, 58, 65, 50, 63, 56, 66, 52, 93, 38, 1462, 59, 59, 59, 684, 30, 130, 63, 69, 19, 1015, 59, 77, 762, 71, 64, 139, 45, 552, 49, 52, 529, 3101, 67, 46, 501, 592, 59, 70, 83, 59, 63, 46, 53, 56, 69, 153, 885, 16, 541, 981, 196, 841, 18, 45, 498, 75, 61, 115, 302, 836, 55, 114, 248, 233, 60, 68, 780, 225, 860, 60, 64, 649, 89, 175, 668, 1088, 925, 127, 52, 55, 48, 82, 979, 293, 55, 263, 59, 130, 78, 47, 121, 70, 57, 1886, 56, 61, 519, 172, 1172, 19, 88, 137, 18, 86, 4092, 118, 859, 139, 127, 489, 89, 74, 116, 68, 53, 210, 72, 55, 68, 63, 58, 71, 69, 123, 73, 842, 723, 775, 59, 139, 69, 74, 109, 73, 19, 58, 72, 29, 50, 59, 13, 115, 54, 124, 93, 43, 60, 57, 74, 56, 64, 126, 388, 50, 46, 144, 92, 97, 238, 67, 49, 55, 61, 59, 102, 58, 72, 679, 73, 763, 63, 59, 81, 52, 67, 66, 68, 54, 71, 53, 64, 1041, 38, 56, 92, 133, 60, 144, 294, 1454, 57, 60, 422, 86, 121, 67, 775, 93, 60, 66, 54, 58, 51, 61, 52, 159, 47, 60, 55, 18, 67, 71, 96, 40, 62, 156, 798, 54, 390, 64, 412, 121, 22, 52, 116, 21, 59, 195, 46, 1153, 356, 171, 64, 149, 66, 84, 762, 64, 80, 55, 441, 337, 67, 59, 76, 56, 71, 24, 90, 815, 80, 61, 85, 59, 65, 57, 51, 58, 58, 18, 51, 69, 50, 56, 551, 59, 572, 56, 102, 1107, 126, 87, 59, 983, 54, 53, 65, 77, 61, 56, 523, 59, 82, 21, 63, 802, 61, 8238, 60, 175, 55, 79, 64, 59, 1136, 134, 55, 994, 788, 59, 63, 21, 7677, 59, 1377, 51, 53, 81, 35, 53, 57, 96, 50, 932, 53, 61, 56, 126, 371, 18, 103, 229, 875, 382, 53, 56, 993, 56, 111, 59, 316, 96, 54, 85, 60, 62, 203, 51, 54, 66, 679, 61, 71, 42, 4768, 1085, 289, 4911, 59, 56, 68, 608, 59, 412, 66, 55, 604, 842, 817, 619, 110, 258, 642, 117, 668, 110, 58, 484, 57, 68, 58, 410, 127, 142, 437, 54, 617, 71, 147, 75, 95, 280, 62, 80, 216, 879, 59, 926, 88, 4185, 356, 48, 4600, 81, 69, 27, 1094, 100, 1870, 64, 548, 81, 328, 174, 170, 339, 31, 1122, 63, 28, 70, 1173, 111, 52, 719, 58, 160, 362, 352, 183, 53, 56, 781, 54, 60, 161, 562, 408, 19, 58, 20, 60, 21, 78, 60, 71, 486, 57, 53, 58, 51, 1170, 68, 72, 53, 60, 57, 51, 377, 46, 58, 439, 61, 58, 1085, 53, 129, 538, 1842, 598, 55, 126, 43, 201, 72, 113, 62, 339, 177, 62, 1294, 55, 57, 172, 7283, 91, 176, 54, 147, 1940, 282, 102, 288, 355, 167, 125, 328, 113, 71, 78, 39, 58, 164, 81, 56, 128, 60, 1299, 68, 116, 53, 7338, 72, 136, 78, 237, 1244, 57, 618, 54, 53, 66, 519, 61, 209, 1141, 148, 98, 64, 61, 65, 60, 126, 61, 59, 64, 51, 78, 54, 310, 336, 388, 56, 52, 77, 141, 691, 143, 929, 1094, 129, 151, 960, 93, 272, 989, 455, 64, 49, 4784, 12101, 27, 96, 959, 74, 176, 60, 12, 230, 87, 724, 1656, 51, 4285, 58, 32, 49, 659, 70, 54, 256, 67, 94, 736, 63, 146, 66, 48, 53, 61, 61, 64, 100, 55, 284, 63, 616, 97, 92, 48, 60, 583, 55, 5038, 189, 627, 420, 93, 48, 3879, 58, 289, 644, 522, 5278, 7955, 139, 266, 122, 622, 49, 240, 182, 46, 58, 623, 213, 745, 67, 22, 209, 216, 299, 207, 83, 899, 155, 1094, 69, 55, 59, 21, 440, 828, 68, 64, 68, 4618, 334, 121, 232, 511, 565, 79, 113, 67, 111, 71, 66, 56, 1396, 57, 134, 77, 49, 65, 1026, 632, 76, 68, 89, 549, 166, 72, 1224, 82, 104, 131, 120, 39, 394, 4543, 58, 56, 63, 5089, 98, 398, 78, 581, 194, 64, 78, 500, 50, 53, 148, 172, 52, 112, 129, 577, 286, 108, 53, 30, 59, 68, 987, 823, 58, 169, 52, 590, 333, 172, 64, 616, 80, 207, 181, 176, 104, 172, 85, 87, 87, 1255, 104, 95, 84, 95, 87, 63, 68, 49, 69, 96, 54, 75, 63, 70, 74, 72, 786, 3447, 63, 21, 55, 62, 219, 88, 148, 79, 52, 122, 167, 67, 59, 50, 19, 72, 74, 60, 62, 65, 69, 67, 52, 52, 69, 61, 72, 1047, 57, 451, 238, 35, 934, 908, 124, 364, 58, 46, 698, 1102] - }, - { - "label": "Height st width", - "values": [236630, 326876, 347086, 437333, 457543, 105963, 568000, 216420, 236630, 326876, 347086, 437333, 457543, 105963, 568000, 216420, 236630, 326876, 347086, 437333, 457543, 105963, 568000, 216420, 236630, 326876, 350300, 210200, 106030, 349000, 288700, 328200, 262300, 251400, 384900, 435500, 224500, 273000, 276300, 224500, 222900, 202100, 394000, 418300, 302200, 475800, 338900, 296400, 115700, 276700, 298200, 163400, 380500, 282000, 226600, 233500, 404799, 451800, 424400, 493100, 397500, 337600, 157200, 242399, 421400, 403700, 397600, 239400, 416300, 441200, 354000, 354000, 315599, 151100, 269600, 255900, 270900, 422299, 488800, 240300, 376900, 318200, 302800, 262600, 238000, 277400, 122130, 405500, 455999, 353400, 287200, 269800, 292400, 290200, 357200, 417600, 519200, 544600, 318600, 345200, 352600, 283500, 172500, 168299, 427900, 332800, 84900, 307400, 418600, 214700, 280000, 407700, 366200, 114300, 86100, 393700, 239000, 341900, 358600, 413900, 382700, 412600, 344099, 375500, 372100, 428300, 365400, 436500, 390500, 288300, 403900, 301000, 376599, 470700, 460900, 374300, 246200, 333300, 349700, 106600, 514099, 341100, 364700, 229730, 388600, 339000, 466700, 491500, 419400, 478100, 398200, 372500, 493300, 498400, 396200, 445300, 367700, 164300, 487500, 402400, 388300, 496400, 405900, 453400, 376000, 470600, 440900, 396300, 469500, 523200, 275700, 457800, 474700, 409900, 167700, 425800, 402200, 418300, 441599, 426700, 364200, 435800, 433000, 427500, 432600, 485600, 464000, 431000, 365300, 440200, 467200, 467200, 384000, 433200, 425500, 437500, 474500, 424600, 416500, 421100, 429000, 451200, 429099, 507200, 430000, 414000, 431599, 475600, 385700, 465100, 454900, 450700, 425800, 451900, 449099, 420500, 447200, 480400, 389200, 244500, 430400, 437900, 430000, 452800, 452800, 300300, 449000, 348100, 313200, 425100, 227200, 448900, 421700, 446400, 445000, 494000, 453100, 394799, 223600, 460500, 352500, 448200, 457800, 500200, 424099, 456300, 428300, 464500, 225400, 109600, 461700, 465200, 381200, 449300, 461200, 418900, 445500, 451599, 440600, 465800, 380400, 464400, 469200, 469600, 248600, 462700, 451700, 441800, 303800, 469300, 496800, 463900, 459000, 291500, 458100, 459300, 450100, 469799, 393900, 465000, 448300, 222700, 203400, 461300, 455000, 447700, 456599, 444700, 463100, 310000, 470800, 457000, 442600, 459600, 458900, 457900, 447000, 457200, 456100, 456000, 446400, 453700, 463100, 472700, 514300, 440400, 440700, 449900, 452800, 454799, 463100, 166300, 452000, 462400, 244600, 460400, 462100, 463200, 466700, 447900, 465700, 132900, 465300, 461400, 469799, 461700, 449000, 473500, 505700, 450300, 461100, 469099, 457100, 469000, 462200, 499099, 509000, 476800, 456000, 484099, 424200, 399900, 192900, 463600, 453700, 306300, 75800, 467700, 458000, 202200, 464300, 456900, 467500, 474099, 481300, 447400, 430600, 453200, 456200, 461300, 322500, 479300, 465400, 401599, 475900, 429200, 466500, 456900, 480000, 441900, 280300, 475200, 466500, 472400, 465100, 462600, 476100, 473200, 470100, 463700, 468800, 459700, 482500, 232300, 409799, 464200, 476900, 466200, 295700, 325500, 464099, 471500, 377900, 472700, 350600, 464500, 159700, 468300, 473500, 470500, 462400, 467299, 470900, 462700, 452200, 470100, 469700, 506800, 461200, 460900, 466000, 525900, 463500, 448500, 534900, 462800, 465400, 454300, 465300, 308000, 471800, 486300, 474400, 237100, 500300, 319100, 186400, 469099, 452900, 468800, 152200, 372500, 432600, 448400, 444200, 354300, 131400, 461799, 436300, 456800, 326800, 469400, 449000, 273800, 467200, 272300, 466300, 471300, 473600, 464099, 425100, 236000, 456900, 510700, 223500, 457500, 457100, 375300, 464500, 320700, 221200, 467100, 458200, 388900, 463500, 472600, 454600, 462200, 533800, 455700, 461500, 491400, 459799, 465200, 407400, 497700, 296800, 456300, 193500, 465800, 427299, 507400, 407000, 392299, 449900, 506900, 451800, 414299, 374799, 456800, 98600, 463500, 453300, 407700, 455600, 459099, 441400, 382100, 426900, 462400, 49000, 133200, 459799, 451800, 464600, 456400, 407400, 419700, 456300, 236500, 500900, 437800, 439500, 435900, 465500, 477700, 451599, 240400, 438900, 438500, 464600, 494700, 369600, 427800, 483600, 437400, 482400, 456800, 102700, 401700, 478500, 425900, 147600, 212500, 482800, 478700, 465900, 458800, 458900, 464400, 459900, 444700, 394000, 211700, 459099, 455200, 434000, 195500, 482600, 435700, 282400, 323900, 386599, 257900, 86800, 504000, 337000, 301300, 299500, 390400, 376300, 390200, 488000, 271100, 426000, 283800, 456700, 459500, 314100, 344000, 352400, 274700, 404700, 471200, 336200, 336300, 510000, 283600, 484500, 280700, 248900, 447800, 379200, 486200, 294000, 337200, 383800, 305400, 305900, 338200, 378200, 366900, 405700, 313600, 372600, 320300, 303900, 365200, 365400, 349700, 284000, 339600, 322700, 334000, 334799, 261800, 369900, 290300, 283400, 309200, 319600, 343800, 359500, 242600, 360300, 334400, 361700, 488500, 315600, 470800, 311100, 506800, 374400, 295800, 344300, 343800, 322400, 359500, 369300, 138600, 376500, 127700, 383100, 351300, 336599, 435700, 355200, 368800, 392100, 366800, 351200, 353100, 364600, 396400, 401400, 393200, 342600, 89900, 330200, 405400, 364600, 479600, 279400, 307100, 407900, 265200, 422100, 283500, 422400, 367200, 302700, 352800, 347100, 373600, 379400, 373400, 505500, 383600, 411800, 428000, 385600, 380800, 278900, 366700, 54500, 384700, 443500, 362200, 362200, 248000, 441800, 388300, 374000, 386700, 400000, 347800, 293000, 409300, 315100, 395800, 390600, 373100, 384000, 392700, 401500, 380800, 380700, 475500, 391900, 454099, 429099, 389099, 373300, 444200, 369200, 427299, 373500, 414600, 359400, 491200, 433700, 370200, 372700, 357200, 287600, 281900, 390900, 445700, 430500, 423300, 375800, 362000, 445000, 441100, 415900, 415600, 356200, 441200, 447600, 279400, 437800, 355700, 423500, 437800, 443000, 395700, 393900, 467500, 445100, 438300, 391300, 442100, 443200, 438800, 448500, 433800, 444300, 458400, 460100, 450500, 468000, 469400, 447800, 421000, 278700, 446599, 452000, 472000, 411900, 459000, 454700, 452600, 448500, 466200, 441400, 449200, 451400, 466700, 456599, 467100, 444099, 442700, 325700, 460400, 443900, 462700, 452100, 304500, 442299, 98600, 438800, 464000, 219899, 435300, 316200, 334600, 265200, 458700, 295400, 441400, 454600, 503600, 444600, 179800, 361500, 467100, 472500, 463400, 486599, 458200, 410100, 372900, 476700, 391599, 441800, 458500, 401800, 401700, 433700, 462299, 431900, 433100, 486100, 203800, 257800, 464099, 452299, 141800, 456800, 459099, 430800, 309900, 454300, 520600, 352700, 460900, 448100, 455400, 466300, 459400, 461500, 456100, 448100, 470600, 445200, 462400, 306100, 451200, 361000, 449700, 461500, 375500, 457299, 480099, 458200, 226800, 446500, 466500, 459900, 452000, 468400, 451300, 470700, 465800, 184800, 456100, 463000, 465300, 447200, 467700, 474000, 269800, 441200, 451500, 463900, 444200, 446000, 346500, 444000, 444799, 457700, 459799, 464300, 376300, 345000, 242200, 217100, 466400, 457100, 473400, 462900, 457500, 424400, 461100, 191500, 458000, 460500, 319000, 265700, 188500, 344900, 458400, 461700, 462200, 462100, 93699, 458400, 438100, 458500, 457000, 455300, 322900, 250100, 215900, 465200, 474900, 459099, 457000, 109100, 459600, 457100, 479900, 459500, 442800, 459900, 468400, 458500, 457200, 162700, 462800, 460300, 457600, 462400, 461400, 472400, 447400, 466700, 452299, 328700, 266600, 476700, 456599, 443900, 480800, 471700, 452900, 429900, 334600, 461700, 463400, 469600, 376100, 457800, 464099, 429099, 466300, 457200, 459200, 463000, 68100, 465800, 460500, 455400, 241600, 466100, 462100, 467100, 469600, 452700, 461800, 459400, 460800, 465100, 461000, 506900, 470400, 465700, 465700, 457000, 467000, 316400, 464700, 462000, 465200, 470500, 472299, 471700, 459799, 462700, 466500, 465900, 466700, 468300, 469700, 463500, 463700, 462500, 465200, 462800, 414000, 473000, 280800, 461800, 465200, 462500, 470000, 468000, 459300, 460900, 464400, 456200, 457100, 463700, 449600, 463700, 466100, 460700, 465500, 466700, 457500, 465900, 453000, 467200, 462800, 466100, 467100, 456500, 463000, 478300, 463200, 462400, 465200, 293600, 460500, 463100, 465000, 361500, 464700, 464900, 465700, 469300, 173400, 454700, 454700, 406300, 482500, 417200, 509400, 461100, 459799, 410300, 452200, 471300, 455200, 429000, 444500, 495100, 473400, 445800, 470400, 534200, 466300, 449300, 454099, 385700, 468500, 451100, 453700, 470700, 476599, 472400, 467000, 370700, 474000, 451800, 458700, 352800, 460500, 475000, 466800, 262000, 465700, 202200, 466100, 463200, 473500, 163700, 275600, 462000, 471000, 323000, 471400, 461500, 321700, 462400, 359500, 473200, 358400, 463100, 464900, 467800, 458500, 453400, 463800, 464300, 451900, 467500, 472900, 117600, 456900, 465800, 205600, 460600, 474500, 471200, 473300, 270800, 309600, 467700, 473900, 196100, 469700, 469099, 453900, 468600, 464500, 467500, 472800, 471500, 464099, 470700, 459000, 464200, 478300, 461300, 466599, 456000, 454600, 470500, 465600, 441200, 477900, 263100, 464099, 469799, 464799, 434300, 340900, 413100, 395300, 475200, 138900, 468300, 490700, 460700, 349600, 303000, 465300, 294700, 451900, 470600, 464700, 234500, 460100, 349600, 468500, 431000, 470800, 312100, 454900, 363600, 465800, 468800, 449099, 143500, 281200, 322100, 318600, 460600, 461700, 468900, 475400, 283100, 458400, 466400, 466400, 335100, 461900, 353600, 459400, 476300, 455000, 461200, 455900, 461200, 465500, 291600, 416300, 461599, 358300, 415700, 295100, 465000, 395100, 427400, 461000, 542900, 343400, 463400, 311200, 264500, 305500, 480500, 444900, 480300, 456200, 493000, 446200, 429700, 494700, 450600, 441100, 452299, 133300, 251600, 462299, 461100, 474200, 444400, 181900, 460200, 478100, 471700, 459400, 238700, 351400, 461200, 239100, 437100, 475500, 507500, 463400, 462299, 462900, 437500, 458400, 452900, 457000, 458900, 466800, 388800, 473700, 459300, 459200, 453000, 469099, 471000, 458600, 275500, 336200, 293500, 381100, 380000, 401700, 479000, 417600, 463600, 327800, 380400, 474300, 461400, 399500, 328500, 127000, 467600, 468600, 457600, 475100, 357800, 420900, 453900, 348300, 413700, 466800, 422500, 400400, 293700, 287800, 455400, 406100, 418200, 473900, 462800, 441200, 475000, 426400, 468000, 460300, 459500, 267400, 457299, 452800, 466800, 181400, 459000, 454200, 456000, 479200, 466100, 454400, 464700, 339300, 458400, 461900, 426100, 388300, 485000, 457000, 462400, 354500, 288400, 316400, 460600, 462200, 305900, 455000, 382000, 446800, 375600, 464200, 455900, 465200, 467800, 444700, 460500, 200200, 425200, 126400, 453500, 76800, 151600, 514300, 464400, 460300, 433000, 220300, 453600, 437100, 442600, 468300, 395300, 212600, 278700, 448400, 404500, 241900, 435599, 441200, 418600, 383800, 451700, 526300, 459600, 465700, 319200, 382500, 451300, 364000, 397200, 470400, 485500, 461100, 474900, 461100, 468100, 467600, 407600, 434099, 441700, 432100, 401200, 455600, 456100, 450200, 444700, 457500, 470400, 462500, 358700, 459700, 454200, 452200, 454600, 261100, 442400, 392299, 375600, 456000, 449300, 449500, 421100, 463700, 473500, 454400, 457100, 447200, 278600, 342700, 445100, 387800, 457800, 141700, 451900, 263500, 298400, 448000, 268200, 461000, 405500, 393500, 461000, 453200, 332000, 175430, 431300, 192500, 389799, 465100, 386599, 443900, 429300, 223500, 380000, 389099, 446000, 425100, 409900, 432400, 429500, 453600, 231100, 465500, 443000, 453700, 471900, 441599, 445400, 447900, 164300, 413300, 400200, 278600, 453600, 448500, 443700, 434400, 465600, 92899, 450700, 469200, 466000, 132700, 427800, 308300, 490400, 331700, 463900, 446400, 454200, 352900, 450500, 405000, 444200, 432299, 391900, 343400, 427400, 441300, 441300, 459300, 447700, 401300, 421599, 439300, 441900, 391000, 434700, 467700, 107400, 439600, 458300, 449500, 432800, 446500, 324400, 446400, 440200, 330100, 452600, 435500, 434700, 442700, 443800, 363800, 332700, 450700, 400800, 333800, 448300, 332299, 441300, 445900, 437400, 456200, 451700, 463200, 336800, 434300, 409700, 440600, 464400, 157100, 407800, 343300, 431200, 240400, 343000, 447500, 467700, 458500, 297800, 432900, 510700, 363300, 457400, 360400, 437000, 460300, 474300, 442200, 451000, 464799, 466599, 447000, 461000, 450700, 461200, 442800, 441000, 469600, 448600, 335500, 443300, 87300, 450200, 427400, 463300, 447299, 313700, 441700, 458000, 469300, 466300, 250500, 164200, 379799, 379400, 414900, 459799, 436000, 444400, 446100, 395500, 429600, 467800, 443600, 456500, 167900, 424000, 465600, 452100, 459300, 459799, 426700, 247000, 459600, 355000, 467400, 452800, 435100, 458200, 514799, 435800, 455100, 463300, 458900, 278900, 462600, 454400, 473600, 446200, 460800, 445300, 466500, 472200, 463200, 477100, 286800, 438400, 457600, 452800, 464900, 455000, 459300, 449400, 484700, 477200, 320300, 453200, 352100, 460100, 450100, 457900, 365900, 466000, 445700, 453600, 470000, 485600, 185200, 276300, 457600, 469000, 459000, 458700, 358200, 446000, 284600, 455100, 150600, 463100, 468100, 302300, 462600, 477299, 356100, 361900, 422600, 445400, 459900, 474600, 406500, 456300, 465300, 454000, 448000, 467500, 465700, 274100, 229300, 440200, 467400, 443600, 338300, 279000, 465500, 465600, 461800, 409099, 466300, 463500, 208200, 509799, 489700, 452600, 457299, 385900, 456200, 455700, 474300, 461700, 466800, 470600, 449000, 462700, 352600, 343200, 384799, 473300, 466400, 400500, 162700, 333500, 491300, 476900, 456500, 453700, 419799, 410400, 413500, 211200, 260200, 258600, 460700, 389300, 520200, 440300, 195500, 448900, 475300, 453200, 455900, 466300, 456200, 453000, 461100, 296400, 527300, 458700, 212900, 457100, 380800, 492000, 449300, 319000, 345500, 181500, 316700, 466800, 281000, 365100, 408400, 413600, 457000, 454900, 463100, 263800, 353500, 496500, 354500, 318800, 455400, 454799, 468800, 318300, 174300, 505700, 460100, 352700, 261500, 200900, 504799, 539700, 391599, 390900, 471800, 404799, 464000, 468100, 343600, 204400, 501000, 479200, 497800, 481000, 346800, 395000, 415000, 429000, 488600, 491000, 341100, 465000, 345900, 447200, 481500, 516200, 455200, 498300, 392100, 444900, 238000, 452700, 477299, 449000, 478100, 479300, 458100, 476900, 462500, 483700, 498700, 460500, 448200, 213900, 454799, 392700, 453000, 443500, 383100, 461099, 456200, 450500, 472400, 50800, 460600, 468200, 323300, 471100, 462000, 332500, 462200, 458800, 383400, 468200, 454000, 274600, 450500, 461300, 411700, 139500, 464799, 457500, 462200, 345200, 378000, 418900, 466900, 448000, 336200, 333500, 343100, 351800, 394799, 349700, 447900, 493200, 463600, 102500, 459799, 469799, 388600, 449799, 349200, 446200, 459700, 247100, 471500, 464700, 435300, 464400, 449799, 518000, 455100, 476300, 450200, 437100, 476400, 332900, 133100, 463700, 505100, 466900, 325300, 470500, 264700, 456000, 474300, 444400, 125900, 445800, 457800, 398000, 434900, 362900, 457700, 457000, 447100, 251400, 246200, 459900, 466500, 416800, 385200, 440300, 418700, 456000, 450000, 394900, 453500, 443300, 467600, 436100, 462100, 282700, 441300, 341700, 426800, 464300, 437200, 467100, 304500, 448100, 455500, 499799, 462299, 467299, 263300, 268000, 448200, 343200, 451599, 448300, 483599, 445000, 416000, 459400, 267800, 428600, 460800, 79600, 390100, 449799, 400100, 450300, 467900, 199000, 327900, 467600, 452700, 454700, 398200, 444099, 448300, 210400, 455400, 500600, 244100, 449799, 420400, 350300, 451400, 455000, 452600, 455700, 412800, 427500, 451100, 397500, 415600, 481400, 349699, 443500, 427800, 399700, 408300, 455500, 437500, 444700, 432400, 462100, 441800, 463900, 185799, 458200, 437500, 392200, 411000, 434099, 289700, 409400, 459099, 449799, 422500, 445400, 424799, 458200, 420600, 412500, 412500, 470500, 458400, 456000, 455400, 393500, 449000, 433500, 366700, 458200, 434300, 474400, 447200, 439600, 441700, 443700, 196500, 336800, 434200, 492100, 166000, 468000, 453200, 442500, 285900, 442900, 442600, 435600, 317000, 465200, 440100, 446100, 452700, 435500, 453500, 424799, 470400, 236100, 479600, 442000, 448200, 348100, 444600, 444900, 416599, 379700, 443000, 243800, 302000, 447200, 422000, 454799, 166700, 230799, 335000, 445600, 362900, 336599, 441599, 167700, 450100, 448500, 185000, 316300, 453700, 315300, 428000, 332900, 344600, 435500, 467600, 464900, 374700, 194500, 442900, 438800, 374000, 452100, 446200, 390800, 304700, 384200, 362400, 436200, 419600, 438400, 437700, 460500, 437900, 440700, 445400, 349400, 459400, 455100, 445600, 463900, 451200, 475300, 456200, 462000, 484900, 358500, 459000, 517100, 438800, 400500, 450700, 460400, 444600, 465600, 447299, 446000, 254200, 447400, 528300, 468000, 444000, 295800, 453100, 325400, 449500, 434099, 438100, 446700, 445300, 442200, 480400, 437500, 445300, 438300, 370800, 453300, 441800, 309600, 381200, 456200, 367600, 448800, 443700, 526200, 468400, 453300, 456400, 524400, 461500, 380300, 456599, 458300, 455600, 461000, 87200, 343800, 435700, 416599, 399400, 273700, 456500, 464500, 466100, 476000, 402000, 462600, 480600, 429500, 450100, 428200, 458200, 458300, 188200, 470700, 456400, 459400, 175500, 460500, 457200, 341000, 350400, 453400, 194830, 106000, 460200, 458600, 443700, 459400, 458500, 313900, 447900, 459200, 133900, 434799, 431599, 161000, 455200, 326200, 214100, 360800, 456599, 469600, 466000, 142100, 458000, 457400, 462299, 343900, 386700, 342800, 293100, 461000, 156300, 222700, 346900, 418900, 288500, 201700, 454099, 223299, 399799, 452299, 459200, 467100, 504200, 408100, 149400, 466300, 469600, 451800, 462500, 340500, 472800, 455200, 244800, 462200, 140900, 453600, 474700, 427100, 465700, 389799, 334000, 360600, 470300, 254000, 464600, 469400, 461100, 470600, 350800, 471599, 188700, 386200, 401900, 288700, 461500, 460600, 500100, 468900, 456500, 380900, 143000, 296400, 341400, 458000, 300100, 467500, 367800, 450700, 476200, 410700, 62000, 464799, 465200, 468000, 474400, 465100, 461599, 423200, 469400, 467100, 481700, 477800, 349500, 463800, 485700, 381800, 474500, 464300, 466599, 471599, 477200, 113300, 493400, 311900, 274700, 478300, 420600, 165100, 302200, 471200, 475600, 433400, 262600, 480100, 398300, 482000, 454500, 264100, 302400, 513500, 365400, 454600, 333500, 333800, 400000, 423900, 108400, 399000, 447100, 469200, 433400, 457400, 460300, 476599, 516800, 476100, 457400, 450200, 467000, 451200, 454200, 450900, 449700, 463300, 465400, 200400, 462200, 230600, 470800, 470600, 486800, 463300, 120200, 473000, 469799, 436900, 370300, 445600, 340400, 446900, 407100, 448000, 458200, 448300, 453000, 463500, 464900, 456800, 469000, 455500, 352299, 486700, 452600, 475800, 212200, 89100, 476500, 471200, 430500, 470400, 204800, 456300, 335800, 364600, 440400, 389500, 380500, 506700, 354900, 464700, 278100, 461100, 303600, 219100, 397500, 359900, 449500, 445800, 468300, 451200, 459700, 316799, 212399, 425900, 452400, 441400, 461800, 198800, 458900, 351200, 469500, 437400, 476400, 427200, 419000, 448800, 345100, 297400, 479400, 188700, 447900, 459099, 461900, 451300, 465200, 428500, 350600, 452800, 181000, 456500, 119400, 452700, 444099, 462100, 439099, 467200, 458000, 290200, 505300, 455500, 387100, 464200, 458200, 248299, 451100, 463800, 140500, 110900, 157000, 434900, 391700, 204100, 343500, 263900, 458100, 456100, 509300, 200030, 462900, 390900, 451800, 251300, 461400, 348600, 449700, 430900, 442299, 434600, 452200, 375500, 273700, 487900, 460800, 471100, 472700, 319500, 244300, 349700, 461000, 342000, 480900, 478600, 450600, 424900, 410900, 565100, 387800, 382100, 428000, 456300, 424799, 471000, 451200, 474700, 432500, 407000, 451599, 462400, 470200, 476000, 452500, 466200, 442900, 495500, 442500, 124800, 352400, 462600, 444799, 457500, 463100, 404900, 523500, 397700, 232700, 397299, 481900, 457000, 474200, 403300, 482800, 375700, 450300, 262200, 314400, 417200, 450500, 156700, 465600, 466500, 326200, 441700, 462200, 502800, 433700, 92300, 243100, 275000, 372100, 533400, 460300, 454000, 364500, 249700, 456200, 435600, 470700, 190600, 358500, 434300, 456900, 138500, 401400, 368700, 465200, 399900, 439799, 446599, 454000, 426900, 470800, 364900, 459400, 441500, 471500, 483200, 490300, 452600, 462900, 461800, 442800, 464600, 450500, 418100, 456000, 440300, 445900, 427100, 240000, 191600, 452000, 344300, 458900, 457900, 289300, 513200, 204800, 446900, 449799, 440500, 183600, 461000, 475000, 445400, 503799, 438400, 444500, 447299, 488200, 388800, 442900, 439700, 473300, 394600, 460800, 452299, 438700, 465500, 470800, 354400, 116900, 377600, 195300, 341300, 515100, 245600, 415600, 528700, 188700, 163700] - }, - { - "label": "Min height width", - "values": [5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, 42910, 126039, 135736, 46100, 54920, 113880, 100220, 91860, 52140, 104500, 110480, 82230, 69120, 136490, 97950, 79780, 44390, 23330, 86870, 1469, 130450, 114629, 184720, 32180, 56400, 131980, 58430, 63240, 59330, 58640, 29810, 11790, 25690, 13330, 39900, 70460, 160410, 55770, 25179, 18490, 27650, 79830, 40630, 16900, 41369, 118770, -2760, 190000, 119920, 85020, 73980, 49120, 51200, 41940, 71030, 51970, 75200, 80390, 70520, 69910, 119636, 40720, -16800, 48360, 70910, 66170, 54730, 66650, 70930, 41940, 8919, -8201, 48240, 50080, 44120, 70290, 74640, 94410, 30920, 56720, 187800, 170140, 45710, 124420, 59660, 90450, 24040, 129420, 173100, 45500, 37120, 34300, 52610, 59770, 89350, 59000, 32820, 23020, 26780, 19180, 19350, 22770, 37900, 56130, 21080, 41360, 49010, 16290, 14480, 23140, 90940, 39390, 43869, 138650, -19100, 34470, 34630, 12036, 102620, 24060, 14260, 9980, 71280, 5559, 19670, 141580, 37160, 9199, 23650, 17750, 22180, 99940, 7589, 17540, 16790, 5080, 34200, 7580, 25040, 7300, 13060, 17520, 6419, -1381, 41910, 10830, 4100, 20210, 188340, 5209, 12970, 14960, 15149, 11780, 105870, 10600, 16640, 9179, 9750, 7869, 9400, 9640, 34300, 10610, 7640, 12680, 21000, 76650, 12170, 13130, 6909, 19100, 16490, 13150, 12810, 7980, 97129, -2571, 12800, 13140, 14170, 59090, 4630, 5150, 6889, 6050, 13490, 3860, 10260, 13930, 3160, -1600, 40730, 88140, 11680, 11560, 10280, 5390, 9440, 131340, 7570, 144740, 60570, 12210, 142160, 8029, 70330, 6570, 8240, -1070, 5180, 75360, 64130, 4979, 73200, 7920, 2460, 3080, 60010, 7470, 10450, 2600, 99590, 134120, 5400, 1179, 76180, 4209, 3650, 38840, 8910, 4250, 14170, 3999, 76350, 4860, -15060, -341, 128230, 2330, 5859, 22060, 44500, 770, 4769, 1039, 539, 53740, 5130, 5729, 13939, 5580, 48450, 1110, 6199, 164570, 179370, 4720, 6339, 12740, 3569, 6740, 4089, 13730, -641, 2360, 8390, 12540, 5500, 4519, 5790, 8100, 4159, 6329, 7200, 2510, 2199, 9430, 1130, 7710, 11010, 11439, 9619, 8699, 5529, 99290, 6729, 7670, 60320, 8769, 3379, 4350, 2020, 10470, 2929, 187500, 5399, 839, 2790, 2430, 9999, 1970, 2979, 8070, 2849, 5110, 5679, 979, 4449, 2559, -410, 829, 3989, 279, 11130, 130020, 63780, 48590, 15020, 59370, 174670, 44850, 4510, 57900, 3340, 5340, 6710, -1150, -4031, 4400, 1400, 13450, 5500, 3909, 133800, 1570, 2959, 38050, 6499, 37810, 599, 1560, 1949, 38340, 66110, 13230, -1020, 9730, 3350, 2790, 8729, 109, 1679, 1690, 2440, 1910, 5659, 43820, 80340, 739, 47080, 1709, 164110, 58980, 5069, 1810, 16480, -1550, 81400, 3139, 133160, 2669, -821, 3349, 2360, 4120, 1960, 4129, 25520, 3660, 2260, 2959, 6350, 6830, 559, -3540, 5040, 62340, -8401, 4570, 6469, 14420, 3509, 172060, 4749, 38850, 3860, 167900, 1540, 59530, 176210, 2949, 13930, 819, 132560, 74890, 34410, 5559, 41260, 102000, 174330, -17380, 10730, 8950, 144260, 2560, 24580, 6370, 80, 22540, 2060, 1019, 160, 3180, 11580, 88900, 10470, 6260, 73860, 3119, 2980, 158220, 4309, 30660, 68780, 5040, 3770, 99260, 1980, 1970, 6829, 2289, -20080, 2310, 9650, -2251, 2529, 2530, 14700, 3959, 166700, 3599, 150930, 3459, 20810, 6590, 55690, 22690, 5139, 69, 6480, -12630, 37400, 9400, 186250, 9540, 10830, 14040, 9070, 4760, 7700, 56650, 11310, 4790, 194180, 128610, 6400, 7109, 2769, 9170, 14430, 104370, 9179, 178490, 1839, 3649, 9690, 20490, 339, 3980, 9289, 97370, 16590, 13480, 3039, 9209, 108480, 29490, 14640, 22230, 2340, 15880, 155060, 121920, 2909, 27250, 163260, 172970, 2660, 18100, 5159, 5870, 3790, 2880, 4320, 12500, 56360, 125710, 17810, 19190, 106000, 83140, 42550, 104300, 56000, 102609, 49720, 119469, 171680, 32940, 81140, 57710, 46010, 47900, 12410, 51430, 52000, 71890, 38220, 59550, 30110, 25690, 60750, 41920, 42970, 122470, 41700, 24520, 36670, 43590, 28380, 65420, 20490, 46900, 74830, 23260, 30570, 53800, 48360, 44400, 28940, 38850, 55090, 44390, 117250, 26040, 38180, 40279, 21509, 40690, 43770, 23870, 34920, 35680, 47920, 34530, 10209, 38060, 36900, 172090, 22500, 41440, 48970, 51970, 40759, 32670, 29570, 8320, 32190, 36220, 26469, 7490, 50070, 16550, 52680, -14320, 18900, 55380, 31810, 30419, 92140, 31910, 29040, 139770, 30299, 117280, 30630, 29670, 36720, -13690, 31170, 24230, -7440, 28120, 27790, 26429, 26000, 27230, 25920, 76240, 30360, 186670, 44830, 116240, 24560, 29890, 95180, 82150, 26890, 70680, 23220, 173160, 18330, 29520, 47580, 40140, 29100, 28250, 26230, 27280, 29190, 15910, 28300, 15970, 18410, 23929, 86500, 26960, 195790, 23360, 15049, 27500, 25880, 29740, 14950, 18950, 98230, 19830, 21830, 33440, 109480, 16040, 61550, 23600, 20700, 24970, 25500, 19860, 15920, 25010, 26910, 14280, 18950, 15430, 12709, 22380, 78950, 4990, 32920, 110000, 23040, 16230, 26429, 10009, 14770, 27599, 21410, 19900, 149800, 159730, 25800, 9250, 16530, 14280, 99670, 28780, 7340, 11060, 14120, 7850, 123859, 27430, 9960, 32360, 11210, 104469, 14710, 11570, 14290, 95429, 18660, 4369, 9129, 9270, 17570, 8890, 6709, 9220, 7710, 11250, 6599, 5370, 3400, 4270, 179, 2290, 4540, 13700, 93360, 59470, 8529, -851, 19020, 4139, 5289, 2350, 6269, 990, 8240, 7010, 8050, 1210, 4560, 1259, 9949, 8110, 64180, 3909, 6729, 2690, 5280, 150810, 6709, 148720, 32080, 2289, 171240, 6690, 79710, 122870, 39720, 3809, 122739, 30200, 5390, 5709, 8730, 118730, 74280, 13320, 5130, 4419, 3000, 3679, 9389, 63420, 6690, 95570, 20350, 5090, 44240, 120660, 29440, 2999, 35740, 63700, -1540, 155930, 145400, 5790, 939, 175990, 3370, 5030, 8129, 69630, 3980, 19400, 27460, 10430, 25930, 6300, 3050, 5360, 4789, 5870, 16930, 1360, 3990, 3170, 79640, 12030, 125269, 7050, 3980, 42910, 9890, -19210, 25280, 170010, 10610, 3749, 3420, 10510, 2749, 7790, 1890, 27759, 140190, 5329, 3289, 6660, 82810, 7319, 1650, 37550, 8889, 7769, 499, 9579, 6610, 35280, 11940, 7629, 2200, 1180, 7390, 159380, 29129, 172160, 108520, 1330, 5769, 1170, 2310, 4110, 54490, 2309, 90020, 1360, 3090, 147650, 79810, 53960, 148120, 5100, 1890, 669, 4730, 190970, -570, 14780, 2929, 3439, 8649, 133040, 96310, 110079, 9729, -151, 4940, 2090, 151720, 6060, 2439, -1190, 2919, 34290, 5939, 2029, 12110, 15930, 175700, 5290, 589, 4910, -1241, 14340, -2690, 1250, 10480, 10930, 116080, 17710, -1590, 6629, 25540, -11360, 2330, 11860, 27210, 153740, 5040, 5950, 1549, 37630, 4259, 2010, 34760, 2959, 4410, 6640, 6889, 179130, 2920, -60, 9899, 144140, 2350, 5719, 3420, 4159, 3330, 799, 2390, 5310, 3079, 4840, 18340, 3719, 6260, 5810, 7309, 3969, 132430, 7079, 5280, 549, 2090, 22160, 1699, 5679, 2509, 2129, 2999, 2469, 4830, 4780, 3960, 3040, 2710, 2440, 2859, 32670, 1659, 9360, 4670, 2080, 4059, 1059, 2789, 5639, 3589, 1709, 5050, 6039, 3850, 13180, 2140, 2079, 6579, -1821, 1389, 7799, 1739, 5910, 1610, 5020, 1809, -721, 4659, 2929, -4720, 1829, 5420, 2709, 50380, 6510, 4900, 1380, 78330, 6539, 5170, 4370, 409, 92280, 5740, -5240, 67910, 33020, 13450, 3690, 6899, 5139, 67240, 6620, 2099, 5599, 13440, 32679, 28520, -180, 30930, -421, 4630, -641, 8349, 5080, 129, 1480, 5289, 11870, 4140, 4360, 1450, 1629, 67510, -421, 21240, 4620, 106560, 2909, 1640, 1290, 35360, 3020, 158790, 2440, 1200, -911, 186220, 88630, 11220, 2760, 109090, 1729, 2269, 30290, 3889, 28940, 1820, 28870, 2559, 1930, 3350, 2659, 9469, 690, 1270, 5479, 1309, 1579, 149430, 6060, 2289, 55039, 1910, 699, -770, 1540, 6850, 64080, 2819, 850, 166420, -441, 1869, 13020, 480, 5479, 25160, -31, -981, 2100, 1620, 7470, 2270, 2390, 5259, 10760, 5520, 13850, 1910, 4650, 26980, 5580, 13470, 1379, 4770, -2110, 67810, 128539, 59940, 48220, 5219, 184470, 1770, 699, 2079, 11750, 124680, 6210, 59900, 14120, 2260, 1140, 110020, 1779, 23809, -1401, 34390, 1970, 67430, 8870, 44820, 4270, 3970, 20880, 123800, 80690, 74260, 98010, 5329, 1080, 1170, -1370, 60700, 3479, 1419, 2499, 57480, 2859, 87760, 3290, -2181, 4539, 859, 3010, 5810, -4340, 158760, 53230, 3790, -6940, 115210, -171, 389, 54720, 81370, 9070, -12800, 102100, 3790, 140870, 125290, 66200, 5500, 7980, 26760, 13240, 4789, 14150, 23180, 8039, 8580, 8720, 6790, 144350, 118030, 4259, 9330, 4600, 7759, 166130, 1229, 6909, -1090, 5270, 118510, 139370, 4460, 115410, 8939, 1140, -9890, 1809, 5070, 6720, 8089, 3749, 72070, 8120, 5770, 6959, 106649, -31, 6090, 5920, 6360, 3400, 2849, 7780, 97370, 157360, 62720, 21920, -2180, 75390, 69, 26280, 6740, 7990, 20550, 2700, 7050, 104860, 67500, 140930, 4179, 4890, 9140, 459, 2829, 31800, 3839, 142650, 86160, 1739, 22910, 25480, 175740, 136730, 2790, 68020, 41520, -771, 2410, 7269, 61130, 47270, 539, 12740, 7960, 74870, 5390, 2690, 4800, 107590, 11250, 13799, 12540, -2471, 3520, 4869, 3750, 7290, 11580, 4570, 93740, 141260, -2510, 4790, 3800, 22599, 144230, 36850, 3710, 3459, 12609, 13720, 21469, 13280, 76830, 2449, 5709, 3969, 19, 37430, 569, 166100, 40190, 163939, 13330, 190770, 178250, 25700, -721, 4369, 8630, 147620, 19530, 16770, 16040, 869, 37960, 111130, 55470, 12310, 49370, 164270, -14760, 15730, 60470, 39740, 13420, 4970, 10200, 7700, 98310, 27540, 15350, 1490, 30840, 5699, 7070, 15000, 3360, 4649, 6919, 6340, 5950, 10680, 8300, 6199, 20900, 4570, 4429, 7540, 9350, 10410, -871, 7570, 1659, 289, 8310, 10310, 5390, 106550, 6610, 49240, 127590, 6780, 5649, 6169, 32320, 1240, -1721, 4690, 2439, 7929, 77530, 128090, 10840, 100630, 3630, 188329, 8720, 84620, 59530, 11900, 95580, 5470, 43960, 74950, -381, 47110, 86950, 66336, 92680, 82720, 60920, 1459, 38380, 17530, 5669, 141360, 135700, 29940, 18850, 3299, 14900, 59000, 17080, -541, 141500, -381, 19600, 15020, -571, 11010, 17110, 15960, 122080, 47050, 22710, 63130, 10169, 5280, 12150, 11550, 5280, 174490, 6590, 3839, 4519, 156290, 28769, 73210, -7371, 22900, 10490, 9810, 9660, 50119, 8410, 36810, 13000, 11760, 78980, 43510, 10720, 28590, 13560, 6270, 8420, 2440, 18500, 7820, 11970, 46580, 15570, 5070, 143250, 12110, 2859, 9860, 44200, 13850, 8780, 10440, 13850, 5960, -15830, 12340, 19080, 8290, 11060, 164950, 3810, 9650, 42270, 170740, 7550, 47050, 14190, 12290, 20970, 1540, 8470, 479, 2050, 15610, 93040, 9579, -1440, 107410, 15830, 23360, 9890, 97820, 22490, 7990, 1110, 4190, 76240, 22679, 12740, 28560, 3850, 29120, 16780, 2210, 2070, 13200, 5299, 1759, 1940, 17310, -20, 6679, 4910, 4949, 6390, 1370, 7520, 88400, 7240, 155250, 7090, 33940, 62660, 8009, 68800, 10009, 3970, 4819, 59930, 174750, 94460, 136080, 80230, 28080, 6040, 19670, 8119, 12180, 67460, 28320, 739, 22780, 7090, 138100, 35450, 3299, 13560, 5820, 8109, 2330, 74480, 3000, 9140, -31, 10610, 15980, 10880, -11070, 16900, 7950, 2989, 4690, 133840, 4680, 12070, 3850, 4790, 7740, 8119, 2940, 2280, 4170, 3679, 103080, 31040, 3290, 6560, 1750, 5440, 5550, 5639, 50710, -1191, 46540, 6160, 31120, 5290, 7730, 7040, 123430, 2360, 9969, 6840, 699, 13000, 113960, 65610, 2749, 3590, 3329, 6059, 104040, 7060, 174760, 4980, 166740, 579, 3500, 41860, 7109, 5370, 44670, 22580, 35230, 26020, 7019, 9689, 16860, 3870, 3509, 12830, 16580, 1130, 8240, 56830, 96679, 16279, 8519, 13779, 4509, 56250, 2770, 3750, 4310, 8500, 7010, 6570, 102840, 27770, 4400, 3700, 619, 126290, 5859, 4740, 11070, 6030, -1230, -3230, 7840, 8179, 91370, 75930, 134770, 11439, 63700, 13590, 130160, 62680, 6040, 6850, 6279, 21589, 7609, 3599, 3469, 150150, 46160, 47580, 6130, 76360, -15750, 14380, 53620, 10820, 2150, 8590, 7600, 4670, 4599, 6539, 4560, 32280, 9640, 7049, 109840, 7030, 110150, 5699, 5200, 119300, 90730, 132780, 123130, 12360, 111580, 5070, 34940, 16240, 2900, 949, 2470, 59120, 7129, 3359, 90910, 16180, 1620, 5370, -530, 169590, 146010, 8650, 37420, 68050, 126130, 104560, 2890, 300, 39230, 18150, 27519, 7760, 3370, 1429, 92090, 119149, 9929, 2479, 2150, 6709, 121649, 36730, 35990, 51330, 10270, 6070, 629, 5249, 18510, 10270, 3240, -320, 24230, 3089, 117210, 21750, 40279, 17190, 7349, 9460, 1779, 6609, 2610, 4960, 5409, 4910, 2419, 10290, 7109, 130530, 19860, 13650, 13560, -12130, 98940, -17310, 8470, 9220, 4239, 196430, 4250, 1960, 100150, 3020, 5370, 28670, 4899, 8210, 14040, 5920, 5090, 39860, 3999, 17410, 3290, 105480, 4550, 5820, 5080, 136300, 3870, 35600, 6140, 11450, 1390, 33250, 24640, 30700, 130530, 28929, 9389, 24210, -1271, 189460, 1270, 809, 108290, 9919, 27180, 1999, 109, 153130, 3790, 8969, 18390, 4769, 8749, -8780, 3630, 1690, 10960, 18660, -570, -890, 178930, 4570, 34270, 560, 2660, -2411, 136430, 12180, 4140, 9649, 140230, 4380, 4079, 16540, 57939, 70360, 6430, 9289, 2630, 52080, 51340, 5849, 6270, 14300, 29160, 42280, 4750, 8489, 5850, 39080, 3519, 6339, -410, 17860, 4819, 15920, 6989, 80760, 10780, 2259, 16490, -900, 54960, 11800, 5480, 14190, 3900, 5109, 139540, 63650, 11880, 779, 17300, 13759, -19560, 17870, 60550, 8060, 45310, 35980, 9810, 186439, 28220, 12890, 18940, 10500, 1900, 101870, 33000, 2829, 10080, 7810, 14990, 12830, 11150, 74180, 11610, -5510, 168730, 12080, 11870, 51010, 10660, 12100, 7029, 11399, -9330, 10080, 11860, 29, 8480, 2259, -6170, 9830, 8520, 37520, 26400, -911, 9440, 7189, 15620, 4100, 10450, 1490, 140990, 2060, 3139, 44210, 25770, 23100, 87670, 17110, 1519, 5420, 12470, 7930, 26280, 5479, 16890, 118140, 18870, -2140, 7170, 5970, 14490, 13030, 10540, 12540, 24710, 3859, 14440, 709, 9459, 10670, -1331, 6929, 65310, 52000, 10220, 5870, 128660, -181, 5890, 8850, 120360, 18260, 11359, 12780, 152980, 819, 8909, 10380, 4769, 9190, 3159, 11880, 1019, 80250, -2871, 8630, 5849, -701, 11160, 12569, 25930, 9190, 9520, 77590, 159430, 5500, 82810, 8159, 150100, 69350, 4390, 4850, 42190, 3150, 8220, 105090, 1519, 11399, 135670, 66470, 8450, 60900, 13540, 36730, 144100, 11530, 12100, 3100, 100860, 129860, 11510, 8860, 26500, 5639, 12170, -2270, 44410, 16120, 30179, 10200, 21850, 8809, 11399, 4620, 5800, 8129, 7480, -741, 2209, 10109, 3860, 3560, 3750, 2869, 3609, 3930, 15860, 125970, 2250, 5980, 8679, 17280, 4880, 3100, 10260, 11310, 8189, 6340, 142520, 7639, 2520, -15210, 9689, 161580, 7429, 122080, 7520, 43620, 7400, 15089, 9739, 8429, 16130, 14840, 6140, 9810, 139320, 6690, 9819, 7380, 125320, 5950, 139190, 3900, 5490, 2730, -6791, 4170, 5029, 7589, 1279, 91120, 3300, 6729, 5110, 1869, 163990, -181, 24830, 58240, 139070, 117440, 3400, 3409, 3880, 1900, 33150, 5130, 59400, 23830, 5120, 20360, 6019, 6909, 102410, 629, 3950, 8239, 184140, 6149, 10530, 16750, 85740, 8930, 46936, 177860, 5280, 4449, 11610, 4369, 5900, 111890, 10290, 3850, 137810, 6650, 6610, 181180, 23420, 83300, 168490, 42670, 7079, 4789, 4069, 168130, 4780, 9250, 4890, 104120, 40890, 53380, 120630, 3310, 182369, 51350, 54050, 18320, 49000, 116900, 7780, 55430, 25810, 4270, 5470, 2610, 8530, 83570, 144990, -191, 50870, 15120, 9100, 6899, 5369, 4339, 95940, 7060, 177700, 14580, 62420, 44680, 36320, 82790, 11240, 29640, 5350, 21309, 8799, 7690, 6179, 909, 138260, 3059, 90480, 87110, -4101, 75260, 2719, 4339, 2549, 2070, 6279, 50830, 179020, 115620, 1230, 5409, 7520, 4549, -1141, 13970, 3320, 18240, 190990, 3740, 2349, 3870, -101, 8480, 8560, 16630, 1389, 4679, 1150, -531, 6899, -571, 1109, 3489, 3940, 4239, 6350, 989, 6099, 184330, 4029, 136120, 11500, 5270, 4470, 103190, 37550, 5079, 4369, 44680, 79400, 3469, 127120, 219, 5580, 77630, 122940, 7959, 34560, 4220, 56650, 53650, 71330, 26640, 141620, 83130, 19550, 7979, 71320, 7180, 10129, -4100, -11900, 2429, 36700, 15280, 3340, 11399, 6780, 13950, 10560, 7040, 2330, 161490, 10209, 74500, 10610, 16930, 5230, 4339, 193090, 1389, 1530, 11840, 111649, 8630, 70180, 11470, 42450, 5239, 7730, 8089, 9149, 5310, 26140, 6969, 3950, 8270, 19130, 8300, 4419, 59429, 35930, 166590, 1579, 669, 17340, 3090, 176800, 5580, 29690, 103940, 31200, 46640, 151130, 9630, 7710, 4560, 127080, 7350, 26160, 153950, 80670, 4330, 4460, 6990, 9869, 40380, 5870, -2880, 103500, 21309, 9840, 22010, 1879, 155440, 5320, 9159, -240, 10530, 7170, 8580, 62590, 10290, 38390, 154760, 4079, 86430, 10380, 709, 2680, 7610, 5500, 12500, 39100, 5030, 122840, 7719, 193080, 4229, 4550, 590, 9099, 1969, 4239, 130730, 32719, 5840, 95030, 1640, 1160, 77050, 6460, 32010, 190340, 182590, 160430, 86380, 43179, 113420, 47640, 151990, 1530, 52040, 30700, 41736, 4560, 118050, 47880, 168909, 8310, 2580, 47640, 29900, 64940, 27820, 15440, 20410, 71090, 2509, 9179, 2210, 3400, 5400, 133700, 91300, 8799, 27180, 5639, 28280, -6090, 31850, 59980, -25100, 112600, 26320, 29020, 9090, 29070, 8429, 9599, 1850, 19120, 13390, 12529, 11810, -130, 5140, 7759, 3960, 14660, 3279, 19110, 182550, 57820, 10169, 13660, 14190, 4360, 19180, 14070, 5679, 129820, 70070, 1580, 4700, 4869, 73520, -1301, 94730, 14280, 147660, 72330, 14620, 14260, 166400, 959, 1859, 58280, 41330, 2109, 15690, 32590, 195880, 24560, 56380, 17240, -18780, 5540, 9860, 116910, 177079, 5770, 41940, 990, 168950, 89070, 22450, 7950, 187390, 23220, 63840, 19090, 50460, 24420, 19780, 15800, 21300, 13850, 31820, 20840, 21370, 12700, 14140, 10550, 8199, 8609, 890, 12330, 17620, 4809, 18490, 7769, 12850, 13460, 15880, 176340, 145900, 8440, 1930, 4149, 6859, 83570, 6909, 83379, 15069, 4069, 29480, 93600, 8350, 3169, 3969, -21580, 13939, 13870, 7739, 2300, 19620, 12230, 12100, 549, 13010, 9090, 7509, 14090, 5739, 3050, 107120, 127899, 6969, 133470, 158020, 16530, 121510, 12350, -10570, 182369, 152200] - }, - { - "label": "Min width diameter", - "values": [98453, 319366, 234498, 455411, 391333, 147711, 479081, 208910, 124041, 344954, 280876, 501789, 368624, 98453, 429823, 234498, 170419, 391333, 258167, 479081, 319366, 124041, 455411, 280876, 147711, 368624, 315981, 203423, 170419, 318081, 237211, 321023, 258211, 260481, 341011, 429823, 273989, 296489, 285589, 302889, 235581, 214989, 388889, 392489, 334089, 432089, 423289, 358489, 235589, 244989, 223823, 229989, 389489, 262681, 219489, 226389, 312723, 344923, 401889, 464489, 387789, 283223, 254689, 233089, 397989, 370889, 374289, 256489, 409489, 410789, 294711, 380711, 203011, 280789, 288211, 234211, 284989, 353623, 479081, 143423, 399489, 313089, 249823, 282889, 172623, 287689, 170419, 325623, 389789, 348189, 299689, 275089, 215523, 226323, 377489, 412389, 416623, 497789, 309389, 340989, 270623, 294889, 104423, 121723, 339623, 334589, 132823, 386011, 345723, 206623, 256481, 408911, 289011, 149881, 117823, 317823, 208589, 319789, 286723, 428089, 426289, 425789, 320589, 321881, 344989, 398989, 306581, 412089, 305823, 284489, 373989, 282189, 302723, 442889, 429989, 343389, 253681, 315889, 267123, 174289, 379823, 319089, 345489, 170419, 447589, 305189, 436189, 387023, 446989, 439189, 366089, 472989, 491189, 465789, 368289, 416289, 263023, 195389, 451889, 368389, 351889, 458989, 318823, 413989, 347389, 360823, 406189, 361589, 430589, 481589, 254689, 422489, 361823, 379689, 297389, 380689, 363089, 383189, 409289, 388989, 424089, 397789, 401389, 386989, 346911, 450089, 427789, 391389, 345789, 402689, 429389, 434989, 351789, 468289, 365381, 402489, 436689, 372081, 382889, 384289, 392689, 411989, 440111, 390523, 393789, 376389, 397089, 495889, 335489, 424289, 414889, 409289, 389889, 408189, 412189, 384489, 402189, 433789, 379489, 271389, 392989, 401189, 390989, 410889, 415389, 381389, 409089, 449389, 317089, 387689, 312189, 409489, 448489, 405089, 405389, 449489, 364611, 424189, 221489, 418989, 302823, 408589, 413189, 389023, 439689, 417089, 389289, 420789, 262889, 172589, 420789, 419989, 409989, 405689, 418289, 410389, 406689, 408289, 407089, 423789, 409289, 423189, 406389, 423189, 320489, 418489, 410189, 417189, 216823, 424089, 387123, 395681, 412389, 239011, 416489, 418489, 417389, 429989, 393289, 419689, 406789, 332089, 327089, 419589, 414389, 413389, 413089, 403389, 420889, 261489, 424189, 412189, 402889, 426389, 417789, 415589, 404889, 418789, 413189, 415489, 405789, 408689, 418789, 437489, 474489, 399689, 403689, 414389, 415589, 416789, 422489, 196889, 411489, 424089, 217881, 423089, 418989, 421289, 422589, 411089, 422489, 211411, 424789, 415389, 426889, 417489, 411789, 430089, 395023, 411089, 417289, 428689, 415989, 423989, 420289, 387223, 394923, 432489, 390181, 439989, 313523, 490589, 115023, 398923, 399881, 236123, 180089, 399323, 343723, 190789, 421389, 415389, 405981, 427289, 432089, 403789, 381789, 420289, 414789, 418689, 408789, 436089, 422189, 318323, 437789, 420689, 420789, 411189, 437289, 435389, 286689, 444489, 418989, 437489, 422289, 418889, 440489, 427689, 354023, 418889, 425389, 414689, 444189, 208589, 446389, 418389, 483989, 421689, 412689, 328989, 423089, 427689, 339989, 425289, 381789, 421389, 227189, 353123, 426989, 428289, 418189, 425589, 427189, 420489, 432589, 428189, 426189, 396223, 421289, 421489, 420189, 435811, 422389, 446681, 486789, 421089, 426089, 422589, 422689, 435189, 359323, 485289, 433189, 351789, 387423, 322489, 304689, 426289, 420489, 423589, 146223, 398889, 397981, 406189, 418481, 408789, 241489, 395589, 398489, 419289, 425189, 426189, 405281, 141123, 398281, 229389, 422189, 426589, 428189, 420989, 386989, 262789, 421089, 476189, 232189, 413589, 412989, 494589, 422689, 269481, 223989, 426389, 368711, 397811, 418989, 429089, 414489, 417889, 426211, 410689, 425289, 445289, 415489, 421489, 370789, 387223, 416789, 412789, 284489, 351223, 399689, 472889, 415889, 290923, 407389, 393123, 410989, 348089, 359789, 419789, 218289, 427389, 417489, 370389, 395381, 417189, 400789, 389289, 388689, 420889, 171989, 146311, 419789, 388981, 421089, 396381, 370489, 484089, 418989, 362889, 388423, 392289, 400889, 408889, 419389, 365023, 413889, 277089, 407889, 403989, 421389, 461689, 432989, 409889, 455389, 412489, 440389, 426989, 188189, 483589, 436689, 405289, 247189, 330089, 441189, 453789, 425189, 418089, 415889, 374611, 417589, 409789, 330223, 276689, 408981, 406181, 501789, 211389, 413323, 455411, 277789, 375689, 314623, 274711, 188989, 452011, 366389, 300689, 285689, 316823, 333689, 320523, 501789, 282889, 345623, 283289, 442689, 440889, 318289, 330589, 341089, 271123, 325823, 452589, 316089, 323889, 477281, 289589, 390923, 265789, 261489, 353223, 310711, 501789, 210223, 325789, 288423, 284289, 302889, 326889, 380323, 338389, 394989, 294989, 339689, 302889, 288089, 334089, 346589, 329989, 270589, 317489, 271689, 315189, 314789, 383889, 337789, 270389, 248381, 303089, 302189, 320089, 334089, 134211, 337889, 313589, 333089, 452889, 308089, 443289, 305989, 448989, 338789, 291989, 296981, 317589, 362389, 336689, 344389, 211089, 353789, 173989, 289523, 325089, 316589, 370689, 331089, 338489, 329189, 340589, 322889, 323489, 335789, 372489, 376589, 423389, 316189, 209089, 318489, 481389, 334189, 467889, 246023, 334289, 384889, 274989, 396589, 409189, 391489, 342589, 290989, 338389, 319789, 348289, 352489, 346989, 449511, 345689, 318823, 395089, 350689, 351489, 285081, 339189, 179889, 355189, 411289, 334789, 332989, 210389, 409289, 354289, 426489, 353489, 370489, 325389, 348989, 302423, 320289, 367789, 358789, 344089, 356789, 360189, 365589, 352689, 354689, 445989, 358289, 423489, 392689, 358989, 404289, 400889, 348589, 498789, 342389, 380489, 258523, 458689, 353711, 343789, 339689, 320789, 387789, 392489, 364789, 407289, 398489, 387989, 430089, 313281, 404389, 404189, 379589, 372289, 435189, 422489, 410189, 248189, 400689, 413089, 316723, 401089, 409889, 447489, 360189, 426089, 406489, 399089, 356089, 402889, 401689, 399589, 408689, 396289, 402789, 417089, 416789, 407089, 421989, 425889, 404389, 384789, 315189, 464089, 390781, 425289, 380589, 416389, 412889, 407289, 407089, 420889, 401389, 408689, 412289, 421689, 367811, 422189, 406289, 402689, 288611, 394981, 402489, 418889, 409989, 407689, 400689, 176589, 424989, 419889, 336389, 392889, 341689, 410089, 240589, 415689, 343681, 425789, 412889, 467689, 405489, 161523, 385989, 435589, 432489, 421589, 445789, 414989, 367889, 386589, 438889, 443089, 415289, 416889, 397389, 482189, 416389, 418789, 421389, 453789, 440189, 301489, 303411, 423889, 405389, 254889, 413089, 417489, 343111, 323489, 410989, 501789, 324189, 425489, 428489, 414789, 423289, 418189, 419889, 415089, 418489, 426189, 400889, 419089, 330389, 416489, 442089, 409289, 418989, 366689, 420889, 413889, 438989, 342689, 409689, 424289, 393881, 415689, 425289, 411889, 426889, 450189, 262889, 414489, 419889, 354223, 490689, 429589, 430289, 243289, 329923, 412089, 417789, 334023, 404689, 325989, 408389, 404489, 412789, 413989, 425889, 496989, 317489, 362189, 263589, 421489, 416089, 429089, 418689, 414689, 411181, 416689, 214589, 412189, 416889, 420289, 285689, 171189, 449589, 416789, 416889, 416089, 420489, 146123, 410489, 404989, 414489, 413389, 417289, 408389, 286689, 263989, 429489, 429289, 417389, 411889, 191589, 419189, 412389, 433689, 415589, 431889, 419389, 424489, 424689, 427489, 277789, 421889, 413889, 415689, 414189, 430389, 423689, 400289, 431989, 416489, 395989, 217689, 429689, 416489, 423389, 351423, 428489, 418189, 409689, 444389, 420389, 423289, 425289, 361489, 415189, 419689, 417189, 423189, 414689, 419389, 423889, 176489, 422589, 413389, 418789, 330389, 422289, 421589, 424589, 405481, 408489, 415789, 392181, 419689, 421989, 419389, 485389, 428589, 426189, 425689, 417689, 425089, 400489, 425989, 420989, 419289, 426889, 428481, 427789, 418989, 418689, 422489, 422789, 423089, 404781, 428989, 421189, 420389, 418689, 421389, 419189, 398089, 429189, 224189, 420089, 349023, 420189, 425189, 424889, 418389, 417889, 419689, 414289, 416389, 421289, 415989, 419389, 421989, 420989, 416989, 421889, 418789, 421389, 411689, 422689, 421589, 421689, 419989, 414189, 419489, 427989, 418489, 421589, 349723, 283989, 420689, 421789, 419989, 390489, 425389, 424089, 424089, 423689, 196989, 413389, 401189, 428689, 474589, 380289, 471889, 421789, 418389, 432389, 411589, 427789, 413789, 393389, 431989, 483589, 427589, 431489, 423989, 500489, 419189, 410289, 411989, 330489, 423989, 408889, 419089, 429389, 436189, 428289, 350523, 342311, 427989, 355423, 416589, 412189, 416689, 431389, 421889, 232189, 422589, 302889, 422389, 417789, 426889, 290589, 306489, 427589, 428189, 381889, 427489, 417089, 292889, 419889, 333389, 429589, 332089, 419189, 420489, 425289, 414189, 416089, 417889, 419089, 409989, 422689, 428989, 198489, 416189, 421889, 191389, 415689, 429789, 424489, 429389, 210289, 316989, 424589, 429289, 281881, 423189, 425089, 420589, 422989, 423989, 449189, 427089, 424589, 419789, 426589, 420089, 420089, 435889, 420189, 432189, 414589, 422289, 426689, 424289, 421989, 438989, 209089, 418989, 429089, 415889, 459689, 423389, 427389, 394589, 435589, 261089, 424089, 447789, 415989, 303289, 376989, 425689, 295789, 419589, 427189, 419389, 284589, 414989, 316689, 420789, 372511, 427089, 323489, 417089, 355589, 424089, 427089, 423989, 198789, 303889, 342189, 364689, 419489, 415989, 424089, 428489, 283789, 414989, 421589, 422789, 337989, 418189, 392189, 415889, 428589, 412389, 415189, 339723, 420689, 414189, 402189, 423489, 346923, 292189, 445311, 229489, 418889, 401589, 467089, 424089, 490789, 396789, 420889, 404089, 334889, 242823, 441789, 404989, 465189, 423389, 408511, 413289, 382281, 460389, 411989, 401589, 411889, 210289, 312489, 420189, 424489, 433789, 404189, 242111, 414489, 440689, 424689, 418089, 298689, 447089, 419189, 295689, 397389, 431389, 431981, 418689, 421089, 423589, 396889, 415289, 485089, 418589, 418089, 428189, 452289, 428089, 418889, 418589, 412189, 426789, 428289, 419989, 316089, 450189, 297589, 349589, 321589, 431889, 434089, 394989, 424389, 274889, 347289, 431789, 422289, 462189, 341789, 153111, 425989, 427889, 374011, 430189, 302489, 404789, 410389, 447289, 457189, 399681, 396689, 352281, 423389, 373489, 410889, 428589, 412589, 427489, 418689, 400089, 497489, 428089, 422389, 381011, 421189, 282089, 415889, 407889, 425789, 222889, 377911, 421789, 376011, 431489, 423589, 412089, 422289, 286889, 423989, 420089, 479389, 490189, 437889, 414889, 419789, 320789, 382489, 294289, 417689, 419189, 255689, 422589, 350089, 412989, 404489, 420289, 414689, 423089, 421589, 437489, 414089, 308789, 418889, 224389, 420489, 199089, 268289, 479081, 416989, 418089, 392489, 310589, 427489, 406089, 411389, 423089, 383189, 261489, 273089, 413689, 406089, 353089, 369389, 409489, 411381, 372389, 418589, 492089, 423789, 427789, 365689, 357389, 420289, 307889, 377389, 430789, 402711, 430789, 433189, 419289, 406881, 428389, 361289, 395989, 401789, 388789, 298823, 413089, 413489, 410389, 406289, 398981, 423489, 424089, 302189, 412889, 392981, 415689, 340923, 310289, 400689, 392389, 460889, 415989, 407289, 408089, 405589, 418389, 403281, 411889, 366011, 407489, 297489, 424889, 408389, 444489, 414489, 268489, 413589, 288589, 299489, 412789, 305989, 420089, 401189, 422289, 413589, 457689, 367289, 124041, 437611, 161211, 379881, 420189, 302023, 342523, 385089, 307189, 474789, 367389, 418289, 377789, 373789, 401411, 397989, 405189, 315789, 372211, 415789, 422589, 425489, 404689, 415689, 417189, 219989, 413289, 371689, 281489, 417089, 405989, 408289, 397289, 424989, 198889, 409889, 427389, 424589, 222889, 409089, 325689, 438489, 295789, 428889, 408689, 417189, 349589, 365311, 392689, 409789, 395189, 424989, 259723, 388589, 423889, 407189, 419089, 408589, 350389, 390789, 398589, 406089, 387989, 402089, 427089, 180289, 403689, 414189, 412189, 431789, 413289, 225611, 386681, 406289, 275189, 387089, 399389, 405989, 402889, 407189, 489289, 275689, 413289, 394089, 462389, 408289, 323289, 335923, 410889, 411089, 410389, 413089, 416989, 278289, 401689, 460389, 330023, 416189, 195689, 372489, 309189, 391889, 205623, 307889, 407889, 422689, 415889, 317389, 407989, 411423, 337189, 342323, 334589, 405989, 415689, 431089, 407789, 408789, 420189, 422389, 394981, 413989, 409989, 419689, 399289, 398889, 425089, 408589, 372789, 402389, 171289, 409889, 414389, 486189, 407689, 326789, 380981, 415089, 428589, 486489, 374289, 166481, 474989, 412489, 393989, 419389, 385381, 404589, 410989, 416189, 410589, 422389, 419989, 394181, 241789, 412289, 400081, 419189, 418589, 421689, 378489, 258989, 415789, 306389, 421089, 416689, 402989, 400281, 461489, 404789, 393581, 419889, 416889, 360389, 420989, 397381, 432289, 402889, 422389, 405589, 423389, 428989, 421089, 435989, 334989, 423389, 413889, 412189, 397581, 413389, 418289, 407389, 496689, 407981, 309389, 412189, 327589, 418889, 410489, 418389, 445489, 422189, 408089, 390681, 424789, 455789, 234189, 281689, 390581, 426889, 415489, 418189, 392681, 405189, 412189, 412989, 254389, 416989, 425789, 284189, 423689, 438089, 347089, 328989, 410489, 425589, 420589, 439889, 372189, 413089, 422689, 420489, 417989, 422489, 428389, 269489, 263989, 408989, 430589, 409989, 282689, 274289, 422089, 423289, 419689, 365789, 427689, 424089, 247389, 499089, 428081, 408789, 410589, 470889, 415189, 413389, 394711, 421489, 419089, 421089, 409389, 424989, 395089, 295523, 479089, 394011, 490789, 361889, 227189, 270023, 454389, 416581, 393281, 429889, 376689, 361789, 365089, 303289, 242189, 241989, 420489, 419189, 462289, 406989, 178589, 412589, 432289, 414889, 416789, 425089, 413789, 366011, 419189, 266989, 498389, 419289, 260389, 417489, 447289, 454789, 406789, 388789, 386489, 250989, 390489, 434189, 291611, 313089, 394389, 379389, 412789, 408289, 419089, 260589, 302489, 457189, 396689, 273989, 409589, 390381, 422089, 443889, 257689, 473289, 454589, 369289, 332489, 241189, 465889, 501789, 380489, 356289, 456589, 360189, 421089, 423489, 339511, 261289, 469489, 436989, 457289, 443689, 422289, 381489, 380181, 435489, 456089, 454089, 281489, 424289, 306689, 410089, 440389, 474989, 434489, 458889, 395723, 420289, 210989, 423889, 368323, 411189, 434989, 441689, 413689, 437189, 398981, 372723, 458589, 424889, 361311, 261781, 429189, 353289, 420189, 381089, 437389, 394889, 346123, 412589, 431389, 176489, 418289, 424189, 372289, 428589, 421089, 303089, 420789, 420689, 343389, 428589, 411889, 251189, 406789, 433689, 362889, 173989, 423289, 416589, 420989, 436789, 326089, 406789, 427389, 412289, 276889, 309289, 310389, 326789, 485489, 322489, 409889, 476689, 415489, 226189, 414089, 424689, 453889, 340623, 319989, 399789, 412689, 346489, 429889, 428089, 405889, 423089, 411289, 467589, 411489, 432889, 414189, 385481, 430489, 270689, 248489, 422089, 501089, 421189, 266189, 421889, 347489, 421989, 433389, 334323, 197489, 401989, 414989, 339681, 449389, 383189, 417489, 419889, 401489, 192611, 232389, 419289, 427089, 380789, 362189, 437989, 372289, 417889, 408289, 383989, 409589, 401389, 420889, 406189, 420589, 233589, 399889, 371189, 387989, 373811, 405889, 419789, 301189, 412789, 413989, 472889, 419789, 426689, 349389, 198323, 412989, 283989, 422789, 392481, 417389, 416089, 431289, 398481, 249689, 417989, 401981, 197389, 366589, 415889, 295423, 413789, 423789, 236089, 302789, 424489, 415989, 415689, 360889, 409489, 412289, 217989, 420689, 451889, 360489, 414989, 382089, 347689, 415189, 420789, 389781, 420789, 350089, 387989, 416189, 343489, 372989, 439189, 283489, 382781, 386589, 387589, 384789, 406889, 398389, 403889, 399589, 419789, 404289, 372511, 264889, 413189, 391389, 386689, 387089, 409789, 321089, 375689, 413589, 407589, 385089, 405489, 402989, 416989, 387889, 491389, 381089, 422189, 419089, 415089, 423889, 353489, 412389, 397389, 336689, 415189, 400389, 429689, 409189, 402089, 391089, 402489, 192689, 333789, 395589, 383123, 229189, 349623, 411889, 403289, 353189, 414189, 334223, 399989, 423989, 347623, 400689, 408989, 410089, 395889, 409189, 386989, 425589, 253289, 431489, 402489, 406289, 287789, 408189, 410089, 393489, 333889, 404589, 258889, 414489, 404789, 462689, 416189, 253789, 235289, 278889, 402289, 351889, 279289, 401589, 204889, 403589, 412789, 258089, 327089, 415289, 319789, 392389, 312489, 444789, 398489, 434789, 421789, 430189, 262189, 406689, 399189, 346789, 410389, 411089, 333489, 289689, 346589, 337989, 397789, 392289, 398689, 400789, 418589, 394789, 400489, 404989, 289189, 414689, 418689, 401189, 421189, 407289, 433089, 412689, 419489, 458189, 417381, 367911, 482989, 398989, 365989, 407989, 416789, 407189, 431689, 407889, 404389, 342589, 407389, 491589, 404889, 405889, 409989, 413489, 398989, 409589, 432589, 396789, 414889, 407389, 402489, 453489, 332423, 403389, 399689, 468589, 412889, 403589, 253989, 464589, 415289, 442181, 404789, 400889, 489489, 414689, 410089, 414489, 492889, 415989, 379211, 412789, 418489, 413689, 369711, 180889, 283589, 413489, 429389, 500089, 336389, 412789, 421689, 423989, 432789, 385289, 421489, 501789, 405489, 407589, 400189, 417589, 418689, 224689, 425489, 413289, 421389, 301389, 420289, 421489, 299289, 386389, 415489, 170419, 217189, 418989, 416289, 407689, 417089, 417789, 374889, 410889, 416289, 180981, 392289, 388689, 281989, 433589, 356789, 326889, 350089, 416989, 406181, 424089, 246489, 415989, 420289, 420889, 399589, 376889, 341989, 361489, 417689, 278089, 206289, 347289, 387589, 276789, 255789, 414989, 211489, 328311, 409089, 418089, 423689, 471489, 448089, 228889, 419689, 480089, 420589, 425789, 287789, 433089, 340423, 280389, 423189, 255789, 421989, 498589, 425989, 459589, 426889, 285389, 335389, 430289, 207689, 427789, 431889, 398281, 425689, 445189, 429189, 211989, 427689, 343789, 306189, 417589, 418389, 460289, 425089, 415989, 381489, 259589, 359589, 282489, 416689, 243589, 426289, 309189, 418089, 434589, 378389, 182889, 422389, 421289, 426089, 428789, 427989, 424189, 390489, 424889, 425989, 438289, 432089, 297789, 416489, 442689, 329889, 433389, 422389, 427289, 426889, 366823, 232489, 431781, 399589, 173411, 367123, 374089, 127923, 279289, 408281, 435089, 361023, 281789, 439089, 462881, 437589, 412989, 281489, 374389, 481189, 323481, 411589, 335289, 332289, 425489, 402389, 179589, 437489, 397581, 409281, 462589, 395281, 424489, 404081, 462789, 433489, 450789, 418989, 424389, 393081, 413989, 418289, 413189, 401681, 421489, 303889, 426689, 240789, 436689, 397111, 448489, 421389, 249889, 428889, 425489, 400389, 437289, 406489, 357989, 411089, 401289, 333423, 419489, 408889, 415289, 422689, 447389, 417089, 427289, 417089, 314489, 451789, 409589, 496489, 177489, 185889, 432989, 426089, 399389, 381511, 325789, 368611, 307889, 376011, 425789, 386389, 492489, 475489, 304689, 423189, 351989, 422289, 268189, 316289, 386711, 306489, 334223, 404889, 433089, 447989, 419089, 250589, 252789, 398689, 415389, 416689, 416989, 295389, 417589, 302189, 423189, 399489, 439089, 385989, 436889, 411889, 327889, 404189, 438989, 207489, 410989, 412689, 417989, 411689, 424789, 391789, 334789, 410489, 239389, 417589, 248989, 386781, 328323, 415889, 399789, 423089, 415389, 369489, 499589, 414389, 437489, 396681, 412189, 216911, 410189, 380723, 269389, 227889, 254489, 480989, 384989, 254589, 336389, 363889, 412489, 466389, 501789, 170419, 421189, 467289, 456989, 368689, 423689, 291989, 454389, 341823, 465389, 343623, 421389, 341689, 284889, 446689, 423989, 427689, 430789, 262789, 321789, 345411, 423789, 311989, 442389, 393023, 395689, 409289, 424989, 501789, 457789, 355589, 409589, 418889, 406089, 434489, 413789, 431289, 403589, 368889, 394781, 428689, 424089, 436389, 413189, 424189, 410189, 455989, 414689, 243289, 357589, 427089, 411189, 425889, 398481, 350281, 499089, 349989, 304589, 421089, 438989, 414789, 434089, 431589, 364823, 424489, 417989, 357189, 331489, 381589, 418189, 260789, 420189, 422189, 328989, 438489, 417689, 477889, 419889, 221989, 199189, 269989, 334389, 473589, 419389, 417189, 413981, 375989, 415089, 432389, 425889, 301289, 399089, 386581, 418289, 263889, 373589, 382389, 417181, 402189, 417589, 348023, 423789, 399789, 440289, 342589, 435389, 416089, 439789, 454389, 458289, 413789, 425689, 415889, 407489, 437589, 407689, 386889, 417089, 405289, 412189, 393989, 364389, 276789, 413389, 286489, 416289, 418189, 316089, 479689, 221989, 415089, 406089, 423989, 209789, 423289, 433089, 401089, 437589, 404389, 411089, 407389, 446789, 355589, 407489, 403789, 428289, 354689, 423889, 412689, 404889, 425389, 428289, 414589, 173789, 329089, 220711, 456589, 492489, 309689, 377289, 477489, 314089, 206411] - }, - { - "label": "RF block", - "values": [1417, 23377, 3376, 33336, 5635, 10812, 6898, 21273, 2484, 35126, 5626, 51096, 7384, 22020, 18912, 52449, 7498, 87528, 11359, 107154, 9197, 18159, 13115, 41120, 4254, 53966, 17129, 14957, 12469, 12882, 19875, 23547, 16325, 15238, 15452, 31817, 18210, 16237, 13815, 24070, 14163, 10748, 16292, 12787, 19559, 10597, 34781, 25859, 23121, 7331, 19298, 17056, 18788, 12009, 8997, 9280, 10990, 9825, 13690, 14547, 15443, 14758, 22429, 9324, 13396, 10915, 12615, 13307, 16842, 12533, 11312, 29347, 2923, 28796, 42332, 12953, 14401, 16151, 23973, 4730, 21716, 13116, 13175, 15085, 8140, 14046, 15629, 13231, 5612, 14571, 14929, 12812, 9048, 10826, 20129, 17258, 12673, 11513, 12391, 14423, 10741, 14543, 4797, 6770, 12516, 15056, 26071, 38770, 15137, 15072, 11241, 26828, 8765, 10555, 10704, 13486, 6364, 10951, 12683, 21652, 27201, 21344, 10776, 9748, 11037, 12370, 8567, 13685, 11766, 12085, 11494, 20165, 13118, 14030, 13022, 10399, 14657, 11485, 10530, 13011, 6136, 10941, 24564, 2983, 44046, 27024, 13288, 11442, 25304, 11719, 10889, 42292, 21241, 13750, 11650, 12963, 7752, 11368, 12729, 10642, 9786, 12557, 11922, 10954, 10880, 9807, 11606, 10332, 11490, 12266, 8847, 11958, 9329, 11618, 30498, 9096, 9656, 10880, 12137, 10590, 30171, 10776, 12029, 10048, 9194, 12699, 11935, 10320, 12246, 10999, 11670, 12919, 10448, 28090, 9996, 11446, 11869, 11452, 11130, 10617, 10938, 10938, 61633, 9401, 10986, 10264, 11382, 26443, 7246, 10959, 10865, 10461, 15205, 10010, 11370, 10761, 9628, 10072, 15113, 15277, 10752, 15445, 10415, 10409, 11365, 42807, 10732, 80687, 14568, 10607, 25736, 10835, 25227, 10372, 10690, 10861, 9204, 24356, 9578, 10690, 16420, 32922, 9966, 10328, 22516, 11073, 10370, 10319, 16053, 12519, 10850, 10016, 23430, 9967, 10409, 16565, 33216, 10086, 11852, 10717, 71528, 10854, 6473, 9864, 24531, 10169, 10465, 13817, 8117, 10114, 10539, 9383, 9575, 9905, 10607, 10809, 12302, 11300, 17273, 19981, 10379, 62047, 32661, 10668, 10740, 11887, 10168, 10328, 10606, 5848, 19699, 9904, 10606, 12471, 10735, 10454, 10221, 11269, 10282, 10788, 10518, 13610, 10157, 12402, 12469, 10341, 11117, 11692, 11407, 11290, 10950, 11411, 10684, 15902, 9235, 11594, 10388, 10673, 10287, 11358, 10456, 21224, 11029, 9757, 10623, 20290, 11303, 10606, 10576, 10914, 10215, 11150, 10688, 20300, 10648, 10158, 9969, 10490, 9674, 14900, 8394, 58012, 9555, 18938, 12074, 10625, 16410, 18293, 8646, 7452, 10486, 10598, 10851, 9883, 9527, 9921, 8487, 12350, 21204, 10475, 33939, 10793, 10449, 12448, 11840, 16981, 9941, 9714, 10921, 17966, 13494, 13501, 9559, 12461, 10527, 10273, 12408, 10142, 8618, 10065, 10490, 19855, 11973, 6992, 27078, 9865, 22933, 10190, 39964, 15056, 10890, 10469, 9225, 9722, 22231, 10448, 16940, 8739, 9933, 10792, 10162, 10820, 10476, 10596, 15300, 10848, 10490, 10626, 11052, 11152, 9908, 10688, 10853, 23939, 10974, 10706, 11293, 25292, 10575, 44141, 9329, 42453, 11111, 33703, 9989, 14744, 29684, 10627, 12450, 10102, 10804, 22365, 15455, 10235, 17927, 28090, 22636, 5696, 10830, 11452, 37616, 10548, 14079, 2381, 9319, 5708, 10278, 10270, 10173, 10438, 10466, 14781, 11824, 13649, 11169, 10106, 10054, 48407, 10727, 8452, 10180, 11032, 9142, 27478, 10124, 10562, 10836, 10135, 7096, 9831, 11865, 10439, 10077, 10337, 10278, 10402, 40924, 10160, 24221, 8787, 12698, 13555, 20043, 9006, 10211, 30486, 10615, 5012, 13470, 11561, 21404, 11943, 35820, 10150, 10799, 10569, 10388, 18464, 10494, 10739, 17119, 10382, 10994, 10169, 10365, 10862, 10219, 35420, 11482, 36677, 10085, 9303, 10751, 26201, 9832, 9444, 11268, 16820, 24669, 11580, 10429, 13545, 31487, 14811, 28689, 13605, 22274, 13142, 15556, 39192, 11083, 28305, 22002, 32055, 11237, 14968, 15304, 10818, 14371, 9237, 10504, 11672, 15811, 20320, 13030, 18281, 37483, 10853, 18766, 33670, 11700, 25359, 13903, 19952, 17043, 18835, 21038, 13206, 10850, 13772, 8348, 14495, 25290, 14003, 13966, 12454, 16773, 15792, 14666, 12615, 18555, 20326, 13386, 16211, 11108, 12505, 18943, 13578, 13475, 9963, 13037, 24033, 10640, 25696, 8173, 12725, 9708, 9863, 12975, 12783, 29488, 10613, 15552, 10566, 9981, 11013, 10682, 10087, 12383, 11656, 10325, 10872, 8027, 11261, 11077, 38056, 10047, 9527, 9601, 12561, 10987, 10731, 10944, 6680, 11525, 10922, 10432, 38982, 12574, 19619, 12819, 8162, 9543, 12403, 9836, 14314, 22537, 11423, 11359, 16214, 12020, 11313, 9979, 10532, 11140, 5538, 11040, 10342, 7274, 11035, 10156, 9986, 10486, 12454, 12438, 24463, 20432, 20455, 12397, 37736, 10196, 18212, 15145, 18863, 13024, 13364, 12974, 41227, 11856, 11346, 11326, 12760, 10202, 15894, 11309, 22422, 17922, 9380, 11075, 11609, 9989, 21795, 16305, 10791, 18100, 10980, 12215, 10666, 10339, 7981, 12100, 10235, 28922, 10339, 11453, 15440, 24216, 8614, 14903, 11618, 10720, 10714, 11399, 10649, 10249, 11125, 11523, 13787, 10415, 12882, 10920, 11001, 23505, 19807, 12172, 76180, 10338, 10975, 8062, 13561, 20564, 11107, 9966, 8921, 34621, 36878, 11835, 10960, 11871, 10982, 29514, 10178, 10481, 11149, 10573, 9197, 34702, 15114, 11222, 7482, 11016, 28924, 9036, 11100, 12007, 30205, 10454, 10890, 10902, 10595, 10095, 10696, 10249, 10609, 10740, 10824, 10277, 10679, 10296, 13965, 9912, 10483, 9972, 10735, 19105, 24162, 10498, 9856, 11457, 10418, 10479, 9695, 10405, 20038, 21024, 10611, 10964, 10095, 18471, 10126, 11042, 10546, 13961, 9864, 10287, 10254, 10350, 36948, 10205, 19478, 16141, 10222, 32500, 9865, 19020, 32054, 7968, 10325, 26167, 15826, 10497, 26223, 10784, 11040, 21312, 13074, 11326, 10699, 11514, 10271, 9270, 27080, 11929, 29848, 13399, 10618, 16773, 38775, 15158, 10308, 16630, 24280, 10359, 26577, 25968, 11063, 9358, 24236, 10131, 10633, 8785, 16274, 10153, 17928, 10168, 12024, 15155, 10751, 10514, 10726, 10694, 10684, 12918, 10318, 9723, 10353, 18212, 11901, 35670, 10645, 10501, 14751, 11704, 5960, 21709, 33016, 11319, 10692, 9730, 11579, 10545, 10898, 10450, 16733, 20856, 10557, 10411, 9420, 31288, 35500, 10552, 7849, 8744, 10903, 9795, 9018, 10362, 11398, 11504, 21077, 9900, 19523, 22921, 48955, 10100, 35563, 17163, 10109, 10710, 10407, 10174, 10338, 19927, 10088, 11713, 9719, 10242, 37731, 15195, 6232, 41049, 10615, 10017, 9755, 10709, 14637, 9291, 11864, 10109, 10156, 11304, 67519, 17390, 17379, 12079, 10161, 10612, 9842, 15579, 10903, 9928, 10148, 10154, 16966, 10889, 10372, 12307, 13177, 26663, 10878, 9647, 10531, 9319, 13014, 9437, 9204, 12344, 11695, 29491, 4829, 9900, 33272, 14803, 6452, 10605, 11949, 14380, 41594, 10764, 11066, 10315, 13599, 10388, 10160, 22538, 10492, 10394, 11021, 11273, 16408, 10459, 9505, 11608, 27802, 10337, 10946, 10642, 10364, 19852, 9766, 9477, 10783, 10463, 32639, 33506, 10877, 11257, 11148, 11070, 10769, 32854, 11405, 10836, 9867, 10488, 14866, 10453, 10822, 10211, 10304, 10483, 10395, 10455, 11100, 10595, 10385, 10249, 10315, 10299, 14743, 10506, 4196, 10680, 8481, 10569, 10217, 10535, 10788, 10380, 10104, 10496, 10774, 10578, 12092, 10172, 10273, 11082, 28496, 10138, 11213, 10182, 10541, 10214, 10813, 10209, 9657, 10418, 10325, 9225, 10075, 10889, 8608, 11322, 11055, 10799, 10054, 22351, 34451, 10954, 10801, 10028, 10797, 10584, 8069, 23265, 19284, 10490, 12889, 11179, 10694, 23407, 10668, 10530, 10576, 33861, 16659, 18867, 10082, 16290, 9883, 14526, 9639, 10930, 10400, 6394, 10245, 10304, 11994, 10994, 11345, 10426, 8470, 17899, 10053, 16420, 10516, 29232, 10200, 10599, 10119, 14293, 10478, 27110, 10359, 9926, 9912, 29435, 17805, 12276, 10674, 26997, 10445, 20195, 9146, 10524, 10816, 10555, 10744, 10242, 10180, 14829, 10046, 11402, 13681, 9995, 10387, 10157, 10482, 15997, 21537, 20617, 7234, 19940, 10347, 9837, 10492, 3567, 15063, 10527, 14404, 26219, 9845, 10367, 12283, 10012, 11008, 16150, 10090, 9801, 10182, 10385, 11210, 10227, 10945, 10796, 12408, 10596, 12523, 10445, 10863, 15001, 11714, 4158, 10011, 11102, 18453, 25567, 34427, 21636, 17312, 11486, 25894, 10305, 11143, 10014, 7083, 29212, 11225, 13217, 12442, 10534, 30505, 18992, 9916, 9305, 9562, 14432, 10474, 15954, 11336, 14433, 10782, 10858, 13947, 13731, 16533, 18216, 23681, 32935, 9827, 10190, 9891, 12630, 10233, 10130, 10387, 15376, 10256, 24143, 10237, 9739, 10317, 9752, 8255, 10923, 8741, 37789, 61374, 8664, 4220, 34907, 3366, 9820, 18920, 28985, 11698, 10181, 82710, 10549, 34749, 25408, 11746, 16455, 10624, 17395, 12460, 11048, 12144, 12643, 13238, 11049, 10607, 10713, 16579, 22372, 10607, 11766, 11282, 10549, 22312, 9792, 12057, 9784, 10705, 21263, 39010, 10601, 20597, 10461, 10502, 8825, 10079, 10800, 11227, 20574, 10297, 28465, 11264, 10799, 11484, 32910, 10132, 10895, 21699, 10646, 10735, 10696, 11264, 19742, 42988, 41859, 10492, 5759, 24954, 10411, 13437, 11267, 5603, 10173, 10822, 11230, 33464, 17149, 11761, 10849, 11071, 10266, 10318, 5839, 14954, 10101, 39692, 29152, 9676, 12924, 11540, 43420, 30908, 9929, 23278, 17192, 9964, 10193, 20560, 27021, 19244, 9997, 11196, 11353, 14331, 10630, 9783, 10959, 14011, 21597, 12489, 10930, 19611, 10617, 10366, 32400, 5912, 12172, 32577, 65364, 44139, 10069, 10473, 10503, 9310, 33098, 10077, 10394, 10412, 5522, 12512, 10444, 11968, 23134, 20539, 10636, 10680, 9865, 17915, 9652, 57471, 17323, 19811, 12337, 19754, 25944, 18475, 9532, 10535, 20382, 26345, 13869, 12280, 12403, 10090, 14846, 17309, 11379, 11821, 18237, 46284, 7399, 12253, 21048, 14545, 12262, 14172, 11900, 11608, 23811, 11756, 12709, 11665, 13314, 11359, 11199, 13162, 11013, 10641, 10930, 11373, 16875, 10709, 14663, 19210, 9117, 10354, 10345, 10785, 33407, 11203, 9776, 22824, 5670, 9550, 10557, 11541, 8667, 41163, 10187, 17357, 76115, 10894, 10300, 14510, 15094, 9959, 9200, 10324, 8811, 10727, 15676, 34492, 11302, 30983, 10239, 27184, 11148, 16012, 13382, 11702, 18726, 10832, 16952, 24133, 9454, 21152, 22064, 5202, 29716, 8219, 18975, 10078, 11633, 10604, 9357, 25145, 82471, 25294, 13270, 8653, 20891, 41040, 11945, 9080, 25991, 8592, 26568, 12760, 9918, 11163, 25627, 12672, 15235, 18263, 11658, 12806, 11580, 10176, 11538, 10923, 11015, 18276, 10587, 10847, 10852, 18896, 14635, 16942, 18271, 8292, 12197, 11126, 11489, 14929, 9764, 15179, 11765, 10865, 25110, 10109, 10387, 15412, 11745, 10938, 10866, 7458, 11852, 31513, 11403, 16621, 11869, 22140, 27762, 11317, 10083, 11296, 18886, 12088, 4649, 10649, 11756, 5362, 5696, 11160, 12697, 10587, 11287, 49254, 5111, 11307, 16226, 65648, 10693, 12976, 9795, 11685, 13300, 9676, 11079, 19515, 4971, 36232, 30848, 8851, 9364, 12046, 10543, 27251, 14449, 25057, 8742, 10756, 10119, 31794, 16824, 13457, 13126, 10940, 8487, 15164, 12277, 10026, 10669, 11707, 10301, 10134, 10264, 12246, 9538, 10608, 10708, 9828, 30769, 10272, 10700, 22730, 10375, 28088, 10679, 15887, 26494, 10750, 16367, 10320, 20659, 11089, 25920, 37391, 9229, 57506, 24371, 13704, 10908, 12191, 10632, 11670, 22268, 14633, 10035, 28198, 10394, 18725, 16048, 9974, 12317, 10831, 11404, 8516, 12843, 10178, 13677, 9834, 23288, 11986, 11347, 18648, 12240, 21040, 10354, 10543, 29142, 10722, 11426, 11068, 9953, 11366, 10677, 10497, 10617, 10630, 11202, 22069, 48435, 10150, 10683, 9589, 10529, 21533, 10302, 24630, 9491, 12154, 10609, 10864, 10744, 10824, 11051, 35643, 10335, 11128, 10196, 20262, 14029, 15512, 13132, 9473, 10776, 10227, 10858, 27460, 10466, 41882, 10425, 23124, 9776, 10710, 10243, 11306, 11631, 13932, 9667, 15904, 15014, 34062, 12569, 10702, 10223, 10575, 24485, 12828, 20228, 11740, 11350, 15787, 12331, 11897, 11918, 5419, 11540, 10408, 10647, 10595, 9036, 11470, 11221, 15296, 19651, 11423, 10007, 9515, 38820, 10686, 10398, 23090, 11000, 9523, 9228, 10795, 11570, 25015, 16290, 41501, 23156, 27076, 9705, 16633, 39615, 25068, 11360, 10211, 14392, 9340, 16150, 8181, 51944, 8740, 17771, 10974, 24164, 8383, 11886, 6533, 11492, 10738, 11183, 11084, 10903, 10390, 9487, 10620, 8266, 15542, 11094, 17072, 33639, 33150, 12483, 10196, 29392, 24209, 18940, 30223, 25634, 20366, 6509, 14943, 10926, 10030, 9480, 10221, 15497, 6424, 12117, 25062, 13167, 9658, 9925, 19563, 62188, 21058, 14014, 57943, 19077, 25315, 15032, 12432, 13616, 14913, 20394, 17053, 26546, 10478, 10214, 21465, 18236, 14091, 11012, 11873, 12159, 33008, 14540, 14730, 20518, 13484, 12526, 4889, 10978, 11327, 11275, 11315, 37227, 15152, 12142, 30949, 13920, 6760, 13238, 10143, 11176, 10785, 12044, 10015, 11509, 10305, 9929, 11989, 11969, 9381, 19884, 14021, 9348, 12366, 6139, 60031, 5686, 9360, 11195, 11103, 17782, 14637, 10345, 24660, 10742, 10857, 9383, 10755, 11377, 8993, 11301, 10398, 8455, 9976, 13778, 8067, 31746, 10800, 10741, 10798, 37306, 6794, 15761, 11289, 11595, 4846, 20598, 9148, 10764, 41269, 10303, 11103, 17525, 9367, 22586, 9782, 10147, 33394, 28569, 9935, 9319, 13227, 30809, 10949, 11866, 12566, 10833, 11049, 10057, 10110, 10675, 11593, 12021, 30957, 4385, 23884, 21501, 21241, 19901, 4683, 9416, 28303, 12191, 11174, 9041, 15090, 19681, 10345, 9568, 22790, 20433, 10896, 11544, 19006, 7436, 17652, 10867, 11300, 14826, 12256, 18901, 17356, 22603, 20761, 15085, 10008, 10169, 9754, 12484, 21462, 10322, 10221, 21330, 10370, 9100, 12219, 9615, 12862, 11684, 10562, 30345, 10522, 11059, 28976, 8969, 23416, 4984, 13203, 11497, 6010, 12975, 44056, 10758, 18000, 16477, 11233, 19186, 12322, 12033, 8707, 11488, 10317, 14374, 9960, 10525, 11512, 11073, 9890, 11719, 11539, 10378, 12021, 20131, 34812, 16470, 10299, 14957, 11583, 12118, 10190, 11986, 5592, 10248, 11855, 6832, 9332, 11067, 4082, 10369, 9916, 15017, 12934, 9081, 10595, 10432, 11759, 10559, 11043, 8917, 21134, 9891, 9176, 16130, 12942, 13627, 18725, 10904, 9808, 10271, 10536, 10638, 13854, 10695, 11433, 39161, 11455, 18960, 11107, 10703, 12723, 9257, 11431, 11105, 10333, 10313, 11585, 10344, 11084, 21966, 8377, 10323, 8185, 14299, 10609, 10551, 16646, 11337, 10546, 10707, 26303, 12953, 9294, 11267, 39151, 8228, 10602, 11245, 10260, 10439, 9924, 10518, 10226, 13153, 9727, 10631, 10293, 4908, 11351, 11699, 13297, 7873, 10887, 13199, 39299, 10164, 28920, 11162, 21162, 10873, 5283, 9938, 13808, 5140, 10517, 12483, 9389, 23219, 19894, 16043, 11175, 14779, 11053, 10940, 39710, 10974, 12795, 10458, 29754, 19573, 11346, 10526, 11079, 10434, 11672, 6137, 10845, 18903, 11224, 10704, 12516, 10495, 11055, 10604, 9788, 10452, 10533, 4945, 9983, 11643, 9712, 10519, 13844, 10913, 14131, 10514, 14742, 33770, 8857, 13931, 10485, 20982, 10189, 10240, 11140, 12490, 10792, 10299, 28767, 10669, 13604, 6395, 10977, 39186, 10903, 61691, 10745, 18824, 10159, 12396, 11054, 10595, 20240, 9738, 10219, 21439, 41329, 10739, 10896, 4868, 52815, 10708, 38900, 9872, 9994, 13546, 8304, 10149, 10501, 14794, 9865, 24487, 10105, 10997, 10480, 8867, 15620, 4849, 14141, 21448, 44760, 24356, 10123, 10512, 32705, 10711, 14130, 10830, 26961, 13539, 10216, 12642, 10823, 11040, 13619, 10147, 10247, 11415, 30393, 10969, 11854, 7609, 46668, 22548, 7873, 62534, 10747, 10471, 11411, 14595, 10810, 26857, 11315, 10359, 13682, 19665, 19345, 27815, 14945, 20679, 31038, 13784, 15296, 10509, 10744, 22472, 10520, 11555, 10757, 27673, 14992, 14989, 27100, 10319, 27530, 7593, 15409, 11668, 10774, 17530, 11036, 8222, 10799, 20249, 10742, 20896, 13897, 38765, 18303, 9745, 71755, 12680, 11783, 5892, 22802, 8486, 23485, 11273, 24528, 12647, 27395, 18613, 19047, 25991, 6369, 22035, 11269, 4850, 11819, 23594, 10413, 10210, 38584, 10776, 11590, 26886, 12407, 15941, 10203, 10543, 16827, 10406, 10801, 16961, 25091, 26117, 4995, 10669, 4570, 10934, 5509, 12342, 11069, 11221, 18032, 10606, 10294, 10794, 10149, 23535, 11605, 11509, 10267, 10945, 10808, 10208, 12462, 9539, 10996, 13746, 11135, 10701, 22650, 10277, 9871, 22744, 23044, 33427, 3378, 9747, 8703, 7656, 9463, 10656, 11297, 15888, 14886, 11302, 38639, 10594, 10537, 14643, 57349, 14269, 11499, 10223, 15088, 28919, 23684, 13888, 13690, 26912, 12774, 11234, 26520, 10459, 11919, 8800, 9204, 10845, 18581, 12632, 10618, 11108, 10805, 24695, 11472, 10718, 10299, 55165, 12039, 11745, 12596, 12705, 36938, 10675, 25627, 10441, 10320, 11116, 32508, 10810, 18654, 23086, 16685, 8342, 11231, 10819, 11306, 10918, 16246, 10979, 10863, 11223, 8547, 12869, 10174, 26564, 10143, 16311, 10658, 10181, 12059, 9562, 32135, 9438, 29761, 26396, 16018, 16535, 46584, 14336, 9155, 21595, 27259, 11287, 7579, 38688, 46567, 6178, 8256, 31900, 12278, 19151, 10862, 3608, 15766, 12738, 15914, 42111, 10020, 36021, 10692, 6690, 9883, 15079, 12033, 9900, 22825, 11361, 11951, 37286, 11418, 10924, 11337, 9619, 10213, 10856, 11048, 10842, 12414, 10325, 16869, 11143, 25523, 9572, 8037, 9731, 10596, 14328, 10393, 41055, 20795, 14812, 29254, 9532, 9682, 22098, 10576, 14922, 27530, 22068, 44823, 62466, 15851, 17035, 13790, 32455, 9763, 22771, 20480, 5260, 10708, 36714, 21263, 35770, 11534, 5466, 21040, 12474, 25403, 12246, 12780, 19804, 14025, 22915, 11714, 10546, 10914, 4907, 25442, 21807, 11633, 9574, 11884, 20814, 10725, 15213, 21476, 24079, 34650, 11473, 14708, 11460, 14527, 12063, 11321, 10635, 38457, 9976, 11387, 12442, 9942, 11507, 21903, 14923, 12090, 12044, 13137, 23724, 16638, 12050, 23906, 12763, 10095, 10450, 16574, 7953, 23314, 46235, 10924, 10452, 11349, 49136, 8569, 28080, 12395, 31054, 17199, 10749, 12401, 23741, 9983, 10240, 14952, 18745, 10093, 15763, 15947, 22766, 9734, 11323, 9103, 8183, 10813, 11526, 31744, 37984, 10665, 18484, 10234, 28322, 24927, 12733, 11218, 26552, 11835, 19255, 13685, 18189, 14281, 11213, 12967, 12791, 13413, 23402, 14537, 13631, 13160, 14190, 13652, 11060, 11685, 9787, 11534, 14020, 10163, 11664, 11130, 11526, 11963, 11541, 36500, 31777, 11087, 5208, 10415, 11008, 17780, 13966, 11527, 12402, 9959, 15587, 11744, 11524, 10972, 9728, 6301, 11682, 11987, 10687, 11419, 10401, 11515, 11320, 10253, 9305, 11693, 10882, 11733, 22243, 10735, 29551, 12129, 7360, 16884, 43866, 16754, 22618, 10169, 10098, 31603, 17397] - } - ] - }] -} \ No newline at end of file diff --git a/test/image/mocks/sankey_new.json b/test/image/mocks/sankey_new.json deleted file mode 100644 index 020fdefb14e..00000000000 --- a/test/image/mocks/sankey_new.json +++ /dev/null @@ -1,2320 +0,0 @@ -{ - "layout": { - "title": "Fallen from the skies: drone crashes database - Washington Post", - "width": 800, - "height": 800 - }, - "data": [ - { - "type": "sankey", - "orientation": "h", - "nodepad": 10, - "line": { - "color": [ - 2001, - 2001, - 2001, - 2001, - 2001, - 2001, - 2002, - 2002, - 2002, - 2002, - 2002, - 2002, - 2002, - 2003, - 2003, - 2003, - 2003, - 2004, - 2004, - 2004, - 2004, - 2004, - 2004, - 2004, - 2004, - 2004, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013 - ], - "colorscale": "Jet", - "reversescale": true, - "cmin": 2001, - "cmax": 2013, - "cauto": true - }, - "dimensions": [ - { - "label": "Narrative", - "visible": true, - "values": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 17, - 17, - 17, - 17, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 17, - 17, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 17, - 17, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 17, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135, - 136, - 137, - 138, - 139, - 140, - 141, - 142, - 143, - 144, - 145, - 146, - 147, - 148, - 149, - 150, - 151, - 152, - 153, - 154, - 155, - 156, - 157, - 158, - 159, - 160, - 161, - 162, - 137, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 174, - 175, - 176, - 177, - 178, - 179, - 180, - 181, - 182 - ], - "tickvals": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135, - 136, - 137, - 138, - 139, - 140, - 141, - 142, - 143, - 144, - 145, - 146, - 147, - 148, - 149, - 150, - 151, - 152, - 153, - 154, - 155, - 156, - 157, - 158, - 159, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 174, - 175, - 176, - 177, - 178, - 179, - 180, - 181, - 182 - ], - "ticktext": [ - "A Predator reconnaissance drone crashed in southern Iraq, near Basra, during a surveillance mission. Officials said it was unclear whether the aircraft was shot down by Iraqi forces or crashed because of mechanical problems. The drone had been based at Ali Al Salem Air Base in Kuwait. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An aerial target drone crashed 1.6 seconds after takeoff. The automatic flight control system commanded the aircraft to nose-dive immediately after takeoff because of erroneous inputs from the tri-axis rate gyro. Investigators concluded the accident was caused by the incorrect installation of the tri-axis rate gyro. The drone was being used as a target for a surface-to-air missile test.", - "A Predator reconnaissance drone crashed during a surveillance mission in the no-fly zone over southern Iraq. it is unclear whether the aircraft was shot down or crashed because of mechanical failure. The drone was based at Ali Al Salem Air Base in Kuwait. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report. ", - "An aerial target drone crashed 4,000 feet from the runway in a wooded area, leaving a scar in the ground 50 feet long and four feet deep. Firefighters allowed the blaze to burn for 26 hours until it extinguished itself. Investigators blamed the navigation system but also concluded that the pilot ordered the drone to climb too rapidly. The pilot told investigators he saw the drone as it \"leaped off the ground\" and thought to himself that \"this is not a good thing.\" ", - "A Predator reconnaissance drone crashed in eastern Afghanistan, marking the first drone crash in the Afghanistan war. Pentagon officials said bad weather and icing were the probable cause. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report.", - "A Global Hawk crashed in a desert while returning to base in the United Arab Emirates after an aborted surveillance flight over Afghanistan. Investigators concluded the cause was structural failure of the right V-tail and ruddervator. An control rod in the ruddervator failed because of metal fatigue after it came in contact with an improperly installed bolt. ", - "A Predator on a surveillance mission crashed after its engine failed and the aircraft went into an uncommanded dive. Investigators determined the cause was pilot error; the crew failed to follow proper procedures during a lost link when handing off control to another ground-control station. An investigative report states that the Predator was based at a classified location, but Pentagon officials said at the time that the drone crashed in Pakistan.", - "A Predator crashed during a landing attempt after returning early from a surveillance mission over Afghanistan because of fluctuating oil pressure. At the time, Pentagon officials said the drone crashed in Afghanistan, but the Air Force accident investigation report indicates the location was in Pakistan. The report states the drone flew into Afghanistan from a country with a time zone matching Pakistan's. The drone bounced on the runway and crashed near tents that housed U.S. troops. The Predator had been searching for a \"high-ranking\" enemy leader in Afghanistan, according to the report.", - "A Predator crashed near a Pakistani village after the pilot lost control and the aircraft went into an inverted spin. The Air Force accident investigation report conceals the location, but U.S. military officials announced at the time that the site was in Pakistan. Pakistani officials said the drone had departed from the Jacobabad air base. An Air Force investigation determined the cause was the improper assembly of a control servo by the manufacturer.", - "A Predator crashed while trying to return to Kuwait after a surveillance mission over southern Iraq. Air Force investigators determined the cause was a broken cylinder rocker arm, which resulted in engine failure. The drone lost its link shortly before it crashed six miles from Ali Al Salem Air Base.", - "A Global Hawk experienced engine failure because of fuel problems and crashed while trying to return to a base in Pakistan. Investigators determined the engine failed because a fuel nozzle was stuck in a high-flow position. The Air Force accident investigation report conceals the site of the crash, but U.S. military officials told reporters at the time that the Global Hawk was housed at the Shamsi air base in Pakistan.", - "A Predator crashed in a mountainous area after the pilot unintentionally flew it through storm clouds. The drone lost its satellite links. Investigators concluded it was probably struck by lightning. Two weather forecasters and a sensor operator had warned against flying in the area, because of the risk of bad weather, but were overruled by the pilot. U.S. Army ground troops recovered part of the wreckage, but investigators suspect that Afghan residents took the remainder.", - "A Predator on a training mission crashed into a Nevada mountain after the crew lost its control link. Air Force investigators blamed inattention on the part of the crew, finding that it was distracted by other tasks. \"As soon as we regained line-of-sight, of course we saw the mountain in our path,\" one crew member testified. \"We knew that at that point it was almost unrecoverable.\"", - "Eight minutes after takeoff, a Predator's engine seized because of an oil leak and the aircraft crashed near a Pakistani village. Air Force investigators determined the cause was the total loss of oil and an engine fire due to poor maintenance. O-ring fragments were found lodged in the crankcase. The investigative report conceals the crash location. But Pakistani officials told reporters at the time that the Predator crashed a few miles from the Jacobabad air base.", - "An aerial target drone crashes near White Sands National Monument after an uncommanded nosedive during a live-fire missile test. Investigators blamed a \"spurious electrical input\" but could not pinpoint the cause of the problem.", - "An aerial target drone was intentionally blown up in midair by its crew when it lost link shortly after takeoff. The aircraft landed in two major pieces, burning a mile apart in the White Sands Missile Range. Investigators determined the cause of the lost link was a dual failure of the command telemetry system.", - "A Predator crashed in the Afghanistan desert after a lost link. Investigators said the inexperienced pilot misinterpreted an icing warning, disengaged the autopilot and then gave an overly aggressive command to climb, triggering the lost link. The pilot's \"inexperience with the [aircraft] was magnified by his limited experience flying without the assistance of the autopilot system,\" the report stated.", - "The Air Force classified the precise date of this accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An Army Hunter drone crashed into trees after it lost its link from its ground-control station, according to Army safety officials. The Army's Forces Command said it did not conduct a publicly releasable investigation.", - "A Predator with the call sign DEADLY01 crashed after a student pilot botched a landing exercise. Air Force investigators said that the pilot and his instructor aligned poorly for landing and that the crew did not request updated information about gusty conditions. The operations director for the 11th Reconnaissance Squadron had ordered extra training after a series of \"tail-scrape\" incidents in the weeks before. ", - "An armed Predator burned and broke apart in midair after its engine caught fire. It was the first Class A accident involving a Predator in Iraq since the U.S.-led invastion a year earlier. Investigators determined the fire started in the engine compartment because of a poorly routed oil supply line.", - "An aerial target drone was blown up in midflight by controllers after it departed from its planned flight path and did not respond to directions. The aircraft exploded over the White Sands Missile Range. The drone was supposed to be used as target practice for F-22 fighter jets.", - "A Predator experienced a hard landing and nearly skidded off the runway. Investigators said the pilot reacted poorly because he was isolated in his ground-control station and could not feel the aircraft bumping on the runway or hear the scraping sounds of damaged landing gear.", - "A brand-new Predator crashed after it hit the runway nose-first. The front of the aircraft was sheared off. Air Force investigators blamed the student pilot but also criticized the instructor for not intervening and a contractor for not providing appropriate classroom training.", - "A brand-new Predator crashed 300 feet short of the runway while attempting to land during a functional flight check. The Air Force accident investigation report classified the location of the base but reported the local time of the incident as being in the same time zone as Pakistan. Investigators blamed pilot error and found there was minimal supervision of flight operations. The pilot was a civilian contractor employed by General Atomics.", - "A Predator crashed in Afghanistan after it lost its links to a ground-control station. The aircraft flew a programmed lost-link pattern for 12 hours but eventually ran out of fuel. The pilot, on loan from the British Royal Air Force, was \"distracted\" and bungled a reboot of the ground-control station while trying to reestablish the communications links. The U.S. Air Force investigation report found he was \"marginally prepared to fly unsupervised during an operational mission.\" The report classified the location of the base, but there are indications it was in Pakistan.", - "An Army IGNAT surveillance drone was flying about 6,000 feet above ground level when it lost its data link with the ground-control station, entered an inverted spin and crashed. A Freedom of Information Act request filed in October 2013 for the Army's accident investigation report is pending. A military incident report published by WikiLeaks stated that ground troops recovered the wreckage and brought it back to Forward Operating Base Marez.", - "An armed Predator broke apart midair after a fuel leak in the engine compartment caused a catastrophic engine fire. An investigation noted that the Predator had fuel and oil lines made of rubber instead of braided metal.", - "An armed Predator lost altitude and crashed. The pilot tried to make an emergency landing on a road but said he had to turn away at the last second \"to avoid endangering persons on the ground\" after seeing a car 200 feet below. The drone and its Hellfire missiles crashed on the desert floor. Investigators determined that the pilot bearing that encases the propeller shaft failed, but they could not figure out why.", - "A Predator departed a runway and was substantially damaged. The Air Force did not conduct a publicly releasable investigation.", - "An unarmed Predator crashed during a search for a downed helicopter in Afghanistan's Kunar province. Air Force officials later described the crash as a \"combat loss\" but withheld details about the cause. The Air Force did not conduct a publicly releasable investigation.", - "A Reaper on a training flight crashed just short of the runway. Air Force investigators concluded the cause was pilot error, finding that an instructor pilot failed to control the aircraft's glidepath, aimpoint and airspeed and was too late to execute a go-around. Investigators cited some traits about the Reaper that made it noticeably more challenging to fly consistent approaches and landings compared to the Predator. \"Given the inherent difficulties in landing any remotely piloted aircraft from a ground-control station without 'seat of the pants' and other sensory cues, these undesirable MQ-9A characteristics further complicate the approach and landing task,\" the report concluded.", - "An Army Hunter crashed near McNeal, Ariz., after a reported engine failure during flight, according to Army safety officials. The Army Materiel Command, which owned the drone, said it did not conduct a publicly releasable investigation.", - "A Predator crashed after departure from Creech Air Force Base. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An Army IGNAT surveillance drone crashed after an engine failure and burned after crashing on the ground. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", - "An armed Predator crashed in a remote area after its pilot mistakenly turned off the Stability Augmentation System, causing the drone to lose its link and plummet to the ground. Air Force investigators blamed pilot error, finding that he flew too fast in responding to a request to help ground troops, kept switching commands to the aircraft and didn't ask for help when he was \"confused.\"", - "An aerial target drone was intentionally blown up by remote-control operators over the Gulf of Mexico after it pitched up without warning and flew out of control. The drone was the intended target of an F-15 fighter jet during a test-fire mission. About three minutes after the F-15's missile missed the drone, the aircraft \"violently pitched up without input from the controller and became unresponsive,\" according to Air Force investigators. Investigators were unable to pinpoint the cause of the malfunction because of the explosion and because the wreckage was not salvaged.", - "An unarmed Army Hunter crashed on the runway after the lighting system failed and the controllers couldn't see through the darkness. The nose of the drone pitched down as the aircraft accelerated onto the runway, according to an Army safety investigation. A crew member testified that they couldn't see anything until the drone landed in a shower of sparks, bounced back in the air, spun around and skidded off the runway. An instructor testified that the student pilot was told to press a button to change the direction of an antenna shortly before landing but that he failed to click it properly. As a result, the antenna stayed in the wrong mode and the lights went out right as the Hunter was gliding toward landing. ", - "An unarmed Army Hunter crashed during a training mission after failing to respond to commands, according to Army safety officials. The Army Training and Doctrine Command, which owned the aircraft, said it did not conduct a publicly releasable accident investigation.", - "Five minutes after takeoff, a Predator rapidly lost engine oil and the pilot intentionally crashed it into the side of a mountain to avoid falling on military personnel. Air Force investigators concluded that the cause was a loose oil filter that was likely installed improperly. Investigators said the student pilot did the right thing by intentionally crashing into the mountainside instead of risking a collision with people on the ground.", - "A Predator crashed on the runway after the instructor pilot botched a landing exercise. Air Force investigators determined the pilot thought he was raising the landing gear but hit the wrong switch and turned off the engine. The pilot also turned his head to talk to someone at the moment a warning message flashed on his screen. The pilot absent-mindedly pressed a button to confirm the command. The pilot tried to glide to a landing and \"exercised profoundly poor judgment by remaining fixated on a course of action that he knew was destined to fail,\" investigators wrote. The pilot was forced by his employer to resign soon after, according to the report.", - "An aerial target drone crashed during takeoff. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report, but an unclassified presentation from an Air Force test and evaluation analyst said the cause was mechanical, attributing it to a \"control amplifier issue.\"", - "An Army Hunter flew out of control during an operator training exercise. A recovery parachute was deployed but it separated from the airframe, according to Army safety officials.The drone burned in a fire after the crash. The Army Training and Doctrine Command said it did not conduct a publicly releasable accident investigation.", - "An armed Predator crash-landed in the Iraqi desert due to an engine failure after the crankshaft failed, possibly due to a metallurgical flaw. The pilot, an Air Force major, said the crew debated whether to try to land the stricken drone at Baghdad's main airport but decided against it. Commanders ordered the crew to crash as hard as possible \"and try to leave as little left as you can\" to prevent enemy forces from seizing the Predator's missiles or classified technology. ", - "An armed Predator intentionally crashed into a mountain in Afghanistan after partial loss of engine power and propeller problems. Investigators pinpointed the cause as the failure of the variable pitch propeller mechanism, possibly because of a broken wire. The Predator had a history of similar problems with the variable pitch propeller, according to the investigative report. The Predator was 270 miles away from its base when it experienced engine trouble. The crew was ordered to crash the drone \"into tiny bits\" to prevent it from falling into enemy hands. For the same reason, the crew was directed to detonate the Hellfire missiles in a remote location before crashing the plane. As the crew prepared to shoot, it realized that it was aiming too close to a house. \"I called abort,\" the sensor operator testified. \"I didn't want to fire into the vicinity of the home.\"", - "An armed Predator crashed and skidded off the runway after it landed nose-first and bounced in the air seven times. Investigators blamed the pilot, saying he misjudged the height above touchdown and mistakenly thought the bouncing was normal. The crew testified that they couldn't detect the first bounce at all. ", - "An Army Hunter crashed after engine failure. The drone was ascending when the fuel pump failed, followed by the engine, according to Army safety officials. A Freedom of Information Act request for the accident investigation report is pending. ", - "An Army Warrior crashed during a hard landing, according to Army safety officials, who gave no other details. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. ", - "An Army Hunter armed with Viper Strike munitions crashed after it lost link because of a power failure in the ground-control station. Power was restored, but the crew could not regain links with the drone and it crashed three hours later, according to an Army safety investigative report. Iraqi police called almost three hours later to say they had recovered the aircraft. The aircraft was \"contractor operated\" and that mission commander was a \"civilian army contractor,\" according to the report.", - "An armed Predator crashed about 300 feet short of the runway during an attempted emergency landing due to an overheated engine and ignition failure. The drone was returning from a 20-hour flight when it skidded on its fuselage and left wing tip, spun and crashed into airfield lights. An engineering report found that a circuit failed due to an improperly manufactured wiring connection that was not soldered as required.", - "A pilot intentionally crashed an armed Predator after loss of engine power. Fighter jets were dispatched to blow up the wreckage to keep it out of enemy hands. Investigators concluded the cause was partial failure of the manifold air pressure sensor, which decreased fuel flow to the engine. The crew was flying the drone via satellite from March Air Force Base in California. \"Bottom line is the engine appeared to quit, we ran the checklist, we couldn't figure out how to get it started and the rest is history,\" the sensor operator testified. A supervisor wondered at first if the pilot had killed the engine inadvertently. \"The first thing I said, 'Is the ignition on?' Because in the Predator, the two buttons for firing the missile, the Hellfire, and shutting the engine down are directly adjacent to each other,\" the supervisor testified. \"It is not that difficult to squeeze the wrong button.\"", - "An Army Hunter crashed in Iraq after one of its engines lost power. The drone was on a surveillance mission at an altitude of 5,000 feet when a fuel pump warning light came on and the aft engine lost power, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. ", - "The Air Force withheld information about the circumstances of this Reaper crash. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An Army Hunter crashed shortly after takeoff when its left wing fell off. The drone was on a maintenance test flight and had reached an altitude of 2,000 feet when the operator leveled the aircraft and waited for the proper airspeed before rolling left, according to an Army safety investigative report. Instead, the left wing fell off. The crew tried to deploy the aircraft's parachute but the aircraft already was out of control and too close to the ground. The heavily redacted accident report does not specify a cause for the accident.", - "An armed Predator with the callsign Overlord 04 crashed in an uninhabited area after it pitched steeply up, then jerked nose-down and went into a rapid spin. Fighter jets blew up the wreckage to keep it out of enemy hands. Investigators were unable to pinpoint why the RS-422 receiver on the right tail computer board failed because the wreckage was destroyed. Crew members complained to investigators about frequent problems with their Predator fleet. \"We've had link problems as well,\" the mission coordinator testified. \"I don't want to be the one that crashes a plane, but I hope that this causes folks, and when I say folks, I mean GA [General Atomics], I hope we hold them accountable for some of this stuff,\" an instructor pilot added. \"We know we are flying with some defective stuff.\"", - "An Army Hunter drone lost its video link during a surveillance mission and was destroyed when it hit the ground, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. ", - "An armed Predator broke apart midair and crashed in hostile territory. About 6.5 hours into flight, the aircraft suddenly lost its satellite links and failed to follow its preprogrammed lost link route. Air Force investigators blamed a major power failure in the alternators, which they suspected was likely triggered by a short circuit. A military incident report published by WikiLeaks stated that small pieces of wreckage were found near an Iraqi schoolhouse. Investigators found no evidence that the Predator had been shot down by enemy forces.", - "The Air Force confirmed the date of this Reaper accident but classified information about where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An Army Warrior flew off and was never located after it lost link during flight. Attempts to restart the links were unsuccessful, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending. ", - "An Army Hunter crashed short of the runway in rough terrain. The controller lost visual contact with the aircraft during the descent in hazy conditions, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013, is pending.", - "An Army IGNAT crashed after a lost link incident. The aircraft was cruising at an altitude of 14,000 feet when controllers lost the communication link with the aircraft. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", - "An armed Predator was intentionally flown into the ground after engine failure. According to the crew, the engine stopped working and would only run at idle speed, so it rotated nose-down and starting falling from the sky. As the drone fell to an altitude of 3,000 feet, the pilot was ordered to fire the Hellfire missile into a sparsely populated area; he testified that he couldn't see exactly where it blew up. \"Normally when aircraft loss is probable and we are far away from our primary airfield the normal guidance is to go ahead and crash the plane into as many bits, as many small pieces as possible,\" a crew member testified. Ground forces later blew up much of the wreckage with C-4 explosives but recovered a few parts. Investigators concluded that the engine failed because something malfunctioned in the throttle body assembly, restricting air intake, but could not pinpoint the broken part.", - "An armed Predator crashed after the engine sputtered repeatedly while returning to base. Investigators said the cause was a failure of the ignition module, which reduced engine speed and resulted in lost links. The aircraft had been on a 19-hour mission when the engine failed. The crew was able to restart it once, but it only ran for 15 seconds before conking out for good.", - "A Hunter drifted off course during student training and crashed into hilly terrain, according to Army safety officials. The Army Training and Doctrine Command said it did not conduct a publicly releasable accident investigation.", - "The Air Force confirmed the date of this Reaper accident and said it occurred in Southwest Asia, which usually refers to a country in the Persian Gulf, but it classified the exact location and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An armed Predator crashed about 11 minutes after takeoff after it lost electrical power and its control links. Air traffic control at Balad Air Base lost track of the aircraft on radar; it was later found about a mile from the base. Air Force investigators attributed the cause to an alternator failure. The broken alternator triggered a failure in the primary control module, including the flight control computer.", - "An armed Predator crashed in an unpopulated area. About 10 minutes after takeoff, the drone began moving erratically and finally out of control. As the crash happened, the pilot radioed the Kandahar air-traffic control tower and reported, \"No souls on board. It's a UAV so it shouldn't be a big deal.\" Investigators determined the cause was mechanical: the faulty connection of a cable to the primary control module. The manufacturer, General Atomics, suggested that poor maintenance was to blame, but investigators said there was not enough evidence to rule that in or out. Crew members complained about recurring mechanical problems. The doomed aircraft \"always kind of seemed to have a, we like to call them demons I guess,\" a staff sergeant testified. \"It's just one of those planes that seem to be broke a lot. We would always fix it and it seemed problems would go away and then come back.\"", - "A Hunter crashed after an engine failed while about 800 feet above the ground. A recovery parachute was deployed, but the aircraft was too close to the ground, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", - "An Army Warrior crashed after the operator ordered a rapid descent and the aircraft's nose pitched down. The drone went into an uncontrolled spiral, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", - "An armed Predator presumably crashed after it lost link and disappeared while flying over Afghanistan during a power loss to the ground-control station at Cannon Air Force Base in New Mexico. Two other Predators flying in Afghanistan lost their links at the same time because of the power failure. The crew regained power and was able to regain link to those two drones. The Predator that disappeared was preprogrammed to return to base in the event of a lost link but for some reason did not. Investigators speculated that it flew into hazardous weather and crashed. It has not been found.", - "An armed Predator crashed in a grove of palm trees, about 150 yards from a house. About 10 minutes after takeoff, the aircraft's electrical system went haywire and it lost link. Investigators determined a short circuit, probably in one of the alternators, likely caused the electrical problem. The Predator was burned in the post-wreckage fire. A crew member testified that the two Hellfire missiles either detonated when the aircraft crashed or else \"cooked off\" during the fire. According to the pilot, extremely hot daytime temperatures in Iraq limited when drones could take off or land. The pilot testified that high temperatures \"can cause issues with the electronics of the aircraft.\"", - "A Predator ran off the runway during landing and was substantially damaged, according to Air Combat Command. Rainy weather and crosswinds may have played a role. Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", - "The Air Force withheld information about the circumstances of this Reaper crash. The Air Force Materiel Command did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An armed Predator crashed about 1.5 miles short of the runway after a propeller shaft malfunction. The aircraft had been on a 20-hour mission when it suddenly pitched up and down, lost link and struck the ground. Investigators determined the cause was a failure of the propeller quill shaft bearing. They also found that the tool used by maintenance personnel to install the bearing had been worn and used improperly.", - "An armed Predator crashed into a ditch on base shortly after taking off into a stiff headwind. Investigators were unable to pinpoint a precise cause but concluded that factors included lopsided weight on the Predator because of its single Hellfire missile, wind gusts and an overly aggressive left turn by the pilot. The pilot overshot the intended course and tried to avoid entering a no-fly area over the base. \"As the plane was going down, all I saw were tents, and I was afraid that I had killed someone,\" testified the pilot, Maj. Richard Wageman. \"I felt numb, and I am certain that a few cuss words came out of my mouth.\" No one was injured. Wageman testified that it was his first Predator deployment and that \"it has been difficult\" to adjust to flying drones after his previous career as an F-16 pilot.", - "A Warrior crashed after it lost link with its ground-control station. The aircraft was on a training mission operated by contractors, according to Army safety officials. The Army said it did not conduct a publicly releasable accident investigation.", - "The Air Force withheld information about the circumstances of this crash. A military incident report given to WikiLeaks said the Predator crashed at 7:30 a.m. on the runway at Balad Air Base and that its Hellfire missile came loose. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report. ", - "The Air Force classified the date of this Reaper accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", - "The Air Force Special Operations Command said a Predator crashed in a classified location in southern Afghanistan after a suspected engine failure. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An armed Predator crashed after losing link and going into an unrecoverable spin. The aircraft began experiencing electrical problems and went into \"self-termination mode,\" shutting down its engine and going into a stall, according to an Air Force investigation. The report concluded the electrical failure occurred within the primary control module, probably in a power converter or the flight computer board. The same drone had reported a lost-link malfunction two days earlier but recovered. Investigators concluded that the two lost links were unrelated.", - "A Reaper crashed during an emergency landing in the desert after an engine failure and loss of oil pressure. Air Force investigators attributed the cause to an oil system temperature control valve that was improperly assembled during manufacturing. General Atomics reported that a similar incident occurred a month earlier, when a Reaper lost oil pressure and was slightly damaged during an emergency landing. General Atomics determined that the valve sliders had been installed upside down by the supplier, a Houston firm. According to the Air Force report, the valves were not of aerospace grade and were not intended for use in the aircraft.", - "A Hunter crashed after it lost link during a training mission, according to Army safety officials. Army Intelligence and Security Command said it did not conduct a publicly releasable accident investigation.", - "An armed Predator disappeared after losing its data links, and its transponder stopped working nine hours into flight. Airborne searchers found the wreckage the next day near the Afghan village of Sinkay. Investigators said the cause was a catastrophic electrical system failure, most likely because of a short circuit. Only a complete electrical failure could account for a lost link, the loss of the transponder signal and the inability of the aircraft to perform its preprogrammed lost-link emergency mission, according to the report. The pilot testified that lost links are not uncommon with Predators but usually only last for a few seconds or minutes. \"After doing this for a while, you sort of see this; it's a reoccurring thing,\" he testified. \"I'd say after the 3- to 5-minute period you sort of get the feeling that the plane just stopped talking to us and we may not recover this one.\"", - "A Hunter crashed after losing link and making an earlier-than-expected nighttime landing at a military airstrip. While turning during the descent, the aircraft lost its data links and flew out of control about 200 feet above ground level, according to an Army safety report. The Hunter crashed on the runway with its left wing and nose pointing down. According to the mission commander, the aircraft started having data link problems when it was about 30 miles away from the base. ", - "A Reaper on a training mission crashed into desert terrain a minute after takeoff because of an engine malfunction. Investigators determined that a vacuum line to the carburetors became disconnected. The flight was the first for the Predator since its old engine had been replaced with a rebuilt model five days earlier. Investigators determined that the vacuum line had been installed correctly but that it was too short and subject to chafing. The pilot's skillful emergency landing saved the aircraft from being a total loss.", - "An armed Predator rolled uncontrollably and crashed in an uninhabited area two hours into a mission. Investigators determined that a software chip on the right wing's control module came loose, likely due to vibrations, locking the right aileron into a fixed position. The chip was attached to the control module with a silicone adhesive but did not appear to bond properly. The mission operator testified that this Predator often broke down: \"It seemed like whenever there was an issue on a plane, that this was the tail number.\" He agreed with investigators' description of the Predator as \"just kind of a little possessed aircraft.\"", - "An armed Predator mysteriously vanished in Afghanistan about 5 hours into a flight. The skies were clear and the aircraft was flying well above a mountain range when the return satellite data link was lost to Creech Air Force Base in Nevada. The transponder signal was lost three minutes later. Investigators concluded that there was no evidence of bad weather, icing, fuel loss or pilot error. A sergeant raised the possibility that the aircraft could have had its satellite links hacked or hijacked, saying: \"If somebody else was on the same frequencies, they could have taken over the aircraft or just knocked it out completely.\" Investigators found no evidence of hacking.", - "Edwards Air Force Base officials said a Global Hawk on a test flight made an emergency landing shortly after midnight on a dry lake bed, damaging the right wing and landing gear. The Air Force Materiel Command did not convene an Accident Investigation Board to produce a publicly releasable report.", - "The Air Force withheld information about the circumstances of this crash. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", - "The Air Force withheld information about the circumstances of this crash except to say that it did not occur due to \"hostile fire.\" A military incident report published by WikiLeaks said the Reaper crashed during landing at Kandahar Air Base while carrying two Hellfire missiles and other munitions, but they did not detonate. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An armed Predator crashed in a remote area 10 hours into flight after the engine lost power and the aircraft went into a stall. The camera operator testified that the crew had just started to follow a target -- a suspect in a car -- when \"the plane did something weird.\" Investigators determined that the propeller quill shaft failed due to cracks left during the manufacturing process. The quill shaft eventually sheared apart after the cracks widened from normal wear and tear, according to the Air Force report. A report from General Atomics disclosed that another Predator was affected by a similar quill shaft failure recently, but the details were redacted.", - "An unarmed Hunter crashed next to a highway after a massive fuel leak caused the engine to fail, according to an Army safety investigation report. A crew member reported that the camera showed the fuel \"just spewing out, it looked like Niagara Falls coming over the front of the aircraft.\" The aircraft glided over a populated area but failed to return to base. The crew released the parachute when the aircraft descended to 2,000 feet, but it was too late. \"They would have popped the chute earlier but didn't want to have a parachute being deployed over the city, and this was a concern here,\" the mission commander reported.", - "An armed Predator crashed into a mountain after the propeller failed 15 hours into a flight. The aircraft dropped 16,300 feet in about three minutes. Investigators attributed the cause to a failed variable pitch propeller servo, a common problem in Predators. Investigators suggested that \"it would be reasonable to conclude that there may be a flaw in the part's design or accepted refurbishment process.\" Investigators noted that 20 other incidents of failed or broken variable pitch propellers were reported in subsequent months.", - "Air Force officials said a Predator crashed during takeoff, hitting a fence. The accident occurred one day after a unit of four Predators began flying at Holloman Air Force Base -- the first time there were drone operations at the base. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report. ", - "An armed Reaper lost its control link while on a combat mission in southern Afghanistan, then flew north for hundreds of miles. An F-15 fighter jet shot down the Reaper just before it crossed into Tajikistan, according to a military incident report published by WikiLeaks. The drone crashed into a mountain near the border in Ragh district. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An armed Predator crashed after pilots lost control and the data links about nine hours into flight. Investigators blamed a failure of the sero potentiometer or a cable connecting to it. The link was lost because the aircraft lost altitude so quickly, disrupting the satellite connection.", - "An armed Predator flew straight into a mountain at 17,000 feet because the pilot was not paying attention, according to an Air Force investigation report. The pilot was rushing to help troops on the ground but ignored warnings from other personnel to watch out for high mountains in the area. Investigators notified the pilot that he is suspected of dereliction of duty. The pilot says he was not warned about the high terrain and only became aware of it shortly before the crash when he looked up at his video screen and saw the mountain straight ahead. \"I knew, with the climbing capability of the Predator, you're not going to out-climb much, if anything,\" the major testified.", - "A Warrior crashed while returning to base after the Stability Augmentation System became disengaged, according to Army safety officials. The aircraft entered a flat inverted spin and hit the ground. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", - "An armed Predator lost link and crashed 20 minutes after takeoff. The wreckage was not found for five weeks. Investigators blamed a catastrophic electrical system failure, most likely caused by a short circuit in an alternator cable. The Predator aborted a mission the day before after a link problem, but it was fixed. In a report, General Atomics said similar catastrophic power shorts have occurred on other aircraft.", - "A Hunter crashed shortly after takeoff. Once the aircraft climbed to about 75 feet, the engine idled and the operator lost control, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending.", - "An armed Predator crashed after a pilot ignored repeated warnings from personnel that she was flying upside down. Crew members warned the pilot that an autopilot sensor had malfunctioned and that she needed to use a backup, manual sensor. According to investigators, the pilot thought the crew was joking when they warned her the Predator would fly upside down with the malfunctioning autopilot sensor. \"I didn't think, clearly understand, I guess, that when he said the plane will flip upside down, that he legitimately meant the plane would go out of control and point towards the ground,\" the pilot testified. When investigators asked her how well her training had prepared her for the incident, she replied: \"Um, I guess I'll just be blunt and say not well.\" The pilot was under suspicion for dereliction of duty.", - "A Hunter crashed shortly after launch, falling about 100 feet west of the runway, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", - "A Predator crashed in southern Afghanistan. Air Force officials classified the exact location and withheld details about the circumstances except to say that it was not shot down by hostile fire. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", - "A Predator crashed while attempting to land after a training mission. Investigators determined that a student pilot first flew too fast, then too slow as the aircraft descended during an attempted go-around landing. Difficult wind conditions were a contributing factor. The president of the Air Force's Accident Investigation Board, Lt. Col. Neil Neaderhiser, an experienced pilot, said Predators are especially difficult to handle. \"Of the eight aircraft types I have flown, from Cessna 152s to F-16s, the MQ-1 is by far the hardest to land.\"", - "A Hunter crashed after it was buffeted by a microburst of wind during an attempted landing go-around, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", - "An experimental Hummingbird helicopter drone crashed during a test flight. The helicopter ran dry on fuel, leading air to bleed into the fuel system intake and causing an engine shutdown, according to an Army report. Investigators blamed pilot error on the part of the civilian contractors, citing \"operator overconfidence and complacency in operating at a low fuel condition.\" Due to the risk of a \"runaway aircraft,\" the experimental drone had been restricted on its test flights to a maximum range of 304 miles. The Army ordered Boeing, the manufacturer, to pay $100,000 for crashing experimental aircraft.", - "A Predator on a training mission accelerated too fast down the runway and crashed into a perimeter fence, landing in a corn field. The pilot lost link and control of the aircraft soon after it started moving. According to investigators, a backup ground station \"hostilely\" took control of the aircraft because a crew member inadvertently turned on a transmitter. As a result, the throttle jumped from 0 to 70 percent. That crew member declined to testify. An instructor testified things could have been worse. \"If I had gone down back up through Gulf taxi way with what had happened here, the aircraft would have, at some point, would have been heading right towards the hangar where there are people, other aircraft and that type of thing,\" the instructor testified. \"It could have been a lot worse than a Pred stuck in a fence.\"", - "An armed Predator crashed immediately after takeoff. An investigator blamed pilot error, finding that the pilot forgot to turn on the Stability Augmentation System, which caused the drone to spin out of control. According to the investigation, the pilot and the camera operator failed to notice that the \"SAS on\" message did not appear -- as required by proper procedures -- on their video displays.", - "A Warrior presumably crashed after it lost link and controllers were unable to initiate emergency recovery procedures, according to Army safety officials. The aircraft rose to 3,500 feet, then began to drop when radar contact was lost. The Warrior was not recovered. The Army said it did not produce a publicly releasable accident investigation report.", - "A brand-new Reaper crashed on private property in the California desert during a training mission. About two hours into the flight, the Reaper stalled after it slowed down too much and rolled left, entering into a spin before crashing onto the desert floor. Air Force investigators concluded that the cause was pilot error due to improper control of the aircraft's speed and angle. Investigators also found that the training program did not adequately prepare the pilot for risks associated with a slow flight. \"We were all in disbelief,\" a contractor who was in the ground-control station told investigators. \"We just didn't, I just didn't expect anything to happen on a fairly benign flight.\"", - "An armed Predator intentionally crashed into a mountain after the engine failed because it ran out of oil. Investigators were unable to determine why the oil system malfunctioned. The crash and fire destroyed most of the aircraft. An explosives team from the U.S. military blew up the remains to prevent the wreckage from falling into enemy hands. According to testimony, the crew had debated whether to return to base after it received warnings that the oil temperature was rising, but temperatures dropped when they activated a cooling fan, so they kept going.", - "A Hunter crashed during a landing attempt after missing the first and second arresting cables designed to catch the aircraft, according to Army safety officials. The Hunter kept going off the runway, crossed 300 feet of gravel and smashed into a concrete barrier. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending.", - "An unarmed Hunter crashed about 15 minutes after takeoff when it lost its data links. It took searchers more than an hour to locate the wreckage, which was about three miles from the base in Jalalabad. Many aircraft components were missing from the site and were presumably taken by Afghans, according to an Army safety investigation report. Civilian contractors were operating the drone.", - "An armed Predator crashed while approaching for landing after a pilot pressed the wrong button on his joystick. Investigators concluded that the pilot inadvertently disabled the Predator's Stability Augmentation System, which keeps the aircraft from wobbling. The pilot was trying to turn off another switch in response to low coolant temperature but acknowledged in testimony that he pressed the \"big red button that says send the aircraft out of control.\" When he realized his mistake, he moved too quickly to reactivate the Stability Augmentation System when the aircraft was pitched down instead of waiting until the aircraft was straight and level. That made things worse, causing the Predator \"to aggressively pitch down further,\" according to the accident report.", - "An armed Predator crashed in the desert after the aircraft lost power and its satellite link. Investigators concluded that an alternator bearing failed, triggering a shutdown of the electrical system. According to voice recordings from the ground-control station, the pilot and sensor operator received warnings about the alternator but the aircraft soon lost link for about 85 seconds, signaling bigger problems. The crew said they were an hour flight from both Kandahar Air Base and Shindand Air Base and knew they couldn't reach either in time. \"We avoided -- attempted to avoid populated areas, stuff like that, so we were thinking, you know, if we were going to actually put this plane in the dirt, where do we not want to go, essentially,\" the pilot testified. \"And then eventually we just lost link with the airplane and never got it back.\"", - "An armed Predator crashed in the Gulf of Aden after its engine failed nine hours into a flight. Investigators concluded that cylinder malfunction and oil loss caused the engine failure but couldn't pinpoint the problem because the Predator sank in 150 feet of water and was not recovered. The drone's engine had been replaced one week earlier, but crews had to abort three other recent flights because of low oil pressure. Maintenance crews made a variety of repairs, and the aircraft flew a sortie on Jan. 13 without incident. \"It has a history of maintenance for engine problems, oil problems on that aircraft,\" the sensor operator testified. \"Without recovering the engine, we don't know exactly what happened.\"", - "A Warrior crashed after an operator entered the incorrect altitude in the navigator mode, according to Army safety officials. The Army said it did not conduct a publicly releasable investigation.", - "An armed Predator crashed on the runway at an airport shared by U.S. military and civilian airliners in Djibouti. The Predator came in too fast and too steep for landing and smashed into a perimeter fence. Investigators concluded that the cause was a combination of mechanical problems with the throttle and pilot error. The pilot was advised that he was under suspicion for dereliction of duty for failing to follow proper procedures during landing. A military officer testified that the incident was the fourth involving an MQ-1 Predator in recent months. \"I have no illusions that this won't happen again, whether it's an MQ-1 or otherwise,\" the officer said. A drone squadron commander testified that the doomed drone was \"one of our hangar queens, if you will. It flew regularly but it had one of the worst maintenance records of the aircraft we had on station at the time.\"", - "A Gray Eagle crashed during a high-altitude test flight, according to Army safety officials. The Army said it did not conduct a publicly releasable accident report.", - "A Predator crashed in a remote area after the engine failed. Investigators concluded that a mechanical bearing failed and contaminated the oil system with metal shavings and other debris. The pilot crashed the aircraft about a mile from a military forward operating base. The drone was damaged but not destroyed. U.S. ground troops recovered the aircraft but had to cut off the wings so they could fit the drone on their Humvees.", - "An armed Predator crashed into a base perimeter fence near a bunch of shipping containers during an emergency landing. Investigators attributed the cause of the accident to a combination of mechanical problems and pilot error. The engine failed because of a malfunctioning cooling system. According to the investigation, the pilot knew the engine was about to seize up during the emergency descent but didn't recognize it had already stopped a few minutes earlier. \"Where the hell is -- where is the runway? It's all the way over here. I overshot,\" the pilot shouted, according to a transcript of the voice recorder in the ground-control station. Oh shit, oh damn, oh my God what is that!? ... What was all that stuff that I just hit?\" ", - "An armed Predator crashed in the sea off the coast of Djibouti as it was descending for an emergency landing. The drone \"violently\" rolled right and then uncontrollably rolled left because of electrical problems in the right-wing control module, according to investigators. The sensor operator testified that the aircraft had a history of doing \"weird stuff,\" and when it made its final roll, \"it pitched real hard, it was the hardest bank I had ever seen a Pred do.\" He added: \"It just gave it up. It just nosed over on its belly and just went straight for the ground. ... It was one of those moments when you feel your heart sink and, well, there it goes. And I mean, it pretty much did its own thing, it pretty much gave up, it wasn't taking inputs whatsoever. It just completely nosed over. Then the screen went black, and that was it.\"", - "An aerial target drone crashed in the Gulf of Mexico. Investigators blamed the crash on an electrical malfunction that caused the drone to fly in a nearly inverted position. The aircraft crashed into waters about four nautical miles from the nearest boat, according to the accident investigation report.", - "An armed Predator crashed a couple miles short of the runway near a residential area in Djibouti, the fourth Predator crash in Djibouti in four months. Investigators attributed the cause to a combination of mechanical problems and pilot error. Sensors gave inaccurate altitude readings and the crew failed to recognize the problem, in part because the camera was fogged over. \"Dude, look at this camera. Seriously, I can't do anything. There's nothing I can do,\" the camera operator said to the pilot, according to a voice-recording transcript. \"Yeah, dude, I literally have no picture right now. This camera's like, completely messed up.\" The pilot didn't realize he was too low until he was 20 feet above ground level. The aircraft was trying to return to base after a 17-hour mission because of an oil leak, but investigators concluded that problem did not contribute to the crash.", - "A Reaper crashed after takeoff from Creech Air Force Base, but the Air Force withheld details of the circumstances. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An armed Predator was struck by lightning and presumably crashed. The aircraft lost satellite links after the lightning struck and was not recovered. The crew knew it was flying in the vicinity of thunderstorms but had an urgent mission to assist ground troops in the area who were under enemy fire.", - "An armed Predator crashed after it flew into bad weather and lost its links. The aircraft flew into severe turbulence and plunged 8,600 feet in 80 seconds, according to the report. The drone was forced to fly through bad weather because it was supporting ground troops in the area. \"We kind of just sat there and looked at each other, hoping that it would regain its link,\" the pilot testified. The Predator was unable to fly its preprogrammed emergency mission. \"All of a sudden, just like a snap, everything pretty much went,\" the camera operator testified. \"Not exactly like a black screen or so, but pretty much to that effect.\" According to the mission coordinator, ground troops in the area reported seeing \"something fall out of the sky,\" which turned out to be the stricken Predator.", - "An armed Predator disappeared and presumably crashed. It was the third Predator crash near Jalalabad in five weeks. In each case, the drones lost their satellite links and did not fly their emergency preprogrammed mission. Unlike the previous two accidents, the weather in this case was clear and investigators were unable to determine a cause. They found no evidence of maintenance or operational problems prior to the lost link. The aircraft had been flying for about 19 hours but still had 138 gallons of fuel in the tank.", - "An Army Shadow drone crashed into a C-130 Hercules aircraft as both were preparing to land at a forward operating base in eastern Afghanistan. According to an Air Force safety report, the Shadow smashed into the cargo plane’s left wing between two propellers. Jet fuel cascaded out of a gash in the wing. \"Holy shit!\" the cargo plane's navigator shouted, according to a voice-recording transcript. \"We got hit by a UAV! We got hit by a UAV!\" The Hercules crew shut down one engine and radioed to clear the runway. Within two minutes, the plane landed, smoke pouring from the left side.\"There's a big frickin' hole in the airplane,\" the pilot reported. No one was injured. The official cause was redacted from the Air Force report, but other documents suggest an air-traffic controller was temporarily demoted and received remedial training afterward.", - "An armed Predator crashed into a residential area in Jalalabad after a mechanical breakdown. No one was injured, but the aircraft burst into flames and damaged two Afghan housing compounds. The owners were compensated an undisclosed sum by the U.S. Army foreign claims commission, according to the Air Force accident investigation report. Investigators blamed the accident on a broken variable pitch propeller quill shaft. The crew realized they couldn't make it back to the airfield, so they scanned the ground for a place to crash. \"I looked below us and there were houses everywhere,\" the camera operator testified. \"We were above the city, there, there wasn't a whole lot we could aim for except for that.\"", - "A Global Hawk on a communications-relay mission over Afghanistan crashed after it lost link nine hours into a flight at 51,000 feet; it kept flying autonomously for about 30 seconds, then went into a steep dive, according to the Air Force's accident investigation report. The aircraft lost altitude so quickly that the wings sheared off. Investigators could not definitively determine a cause but found that it was likely because of an electrical malfunction. A loose connector interrupted power to the aileron and spoiler flight-control actuators, rendering the aircraft uncontrollable.", - "A Reaper on a training mission crashed during landing about 1:30 p.m. at Holloman Air Force Base. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An Armed Warrior crashed in a remote area after its engine seized up. As the aircraft was flying about 200 miles from its departure point at Bagram air base, the camera showed a fluid leak. About 20 minutes later, the engine seized and the aircraft steadily lost altitude before crashing, according to an Army safety investigation report.", - "A Reaper crashed during landing about 6:45 p.m., the second Reaper crash at Holloman Air Force Base in six weeks. A base spokesman said investigators were looking into reports that the Reaper may have struck a power line. The Air Combat Command did not convene an Accident Investigation Board to produce a publicly releasable report.", - "A stealth surveillance drone, operated by the Air Force and the CIA, crashed in Iranian territory for reasons that remain unclear. The Iranian government announced that it had captured the aircraft through a cyberattack. U.S. officials cast doubt on the Iranian assertion but have not provided a consistent explanation for how it lost the Sentinel. After the Iranian government released photographs of the Sentinel, the U.S. Defense Department announced that it had lost a drone that it said had been on a surveillance mission in western Afghanistan. U.S. officials later acknowledged that the drone had been on a mission for the CIA.", - "An unarmed Reaper crashed on the runway at an international airport. The pilot, an employee of an Air Force contractor, came in too high, too fast and landed almost halfway down the runway, according to an Air Force accident investigation report. The Reaper bounced over the airport perimeter road, struck a rock breakwater and landed in the ocean. Investigators attributed the mishap to a combination of pilot error and a mechanical malfunction. Investigators found that an electrical short occurred in a cable assembly but could not conclusively determine why.", - "A Predator crashed in a classified location in Afghanistan following a lost link and a suspected power plant failure, according to the Air Force Special Operations Command. Air Force officials said they blew up the aircraft's wreckage because it was in a remote area and it was not practical to recover. The Air Force Special Operations Command did not convene an Accident Investigation Board to produce a publicly releasable report.", - "The Air Force classified the precise date of this Predator accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", - "The Air Force classified the precise date of this Reaper accident, as well as the country where it occurred and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", - "A Hunter crashed during a bungled landing. The drone was caught by an arresting cable during the landing but the nose wheel collapsed, according to Army safety officials. The Hunter swerved and ran off the runway, damaging the propeller. The Army said it did not conduct a publicly releasable accident investigation.", - "An armed Predator crashed after attempting an emergency landing at Kandahar Air Base due to engine trouble. The engine malfunctioned because of a damaged coolant pump supply line; investigators determined that maintenance crews failed to notice the problem during a scheduled inspection. Investigators also partly blamed pilot error for improperly handing over remote control of the aircraft to a local recovery crew. The problems started when the crew received warnings of an overheated engine and used the infrared camera on the aircraft to see \"a warm liquid dripping from the engine compartment.\" As it neared Kandahar, the crew realized it would not reach the base so it tried to avoid crashing. \"If we would have continued to try to make the runway, we wouldn't have made it and it could have cost people their lives. I'm sure it would have,\" one of the pilots testified.", - "An armed Predator crashed into a field near Jalalabad. Investigators determined that both alternators on the aircraft failed but that pilot error was also to blame because the crew \"failed to land the [Predator] as soon as possible, and instead displayed extremely poor judgment by electing to maneuver the [aircraft] over the airfield.\" The crash resulted in damage to crops, and the explosion blew out windows in nearby buildings. The U.S. military compensated the Afghan owners an undisclosed sum, according to the Air Force accident investigation report.", - "An armed Predator crashed into the Gulf of Aden after the engine failed because the oil ran dry. Investigators determined that a turbocharger failed and damaged an oil seal, resulting in the oil leak. As the aircraft lost altitude, the pilot testified that he knew he could not make it safely back to the military base in Djibouti, so he intentionally flew over the Gulf to avoid crashing over a populated area.", - "A Warrior lost link while returning to base after the aircraft had trouble with low oil pressure and temperature spikes in the manifold, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending.", - "A Navy helicopter drone crashed at sea after running out of fuel during repeated failures to land on the deck of the USS Simpson. The drone failed to connect with an automated recovery and landing system on the ship. Another Fire Scout based on the ship had experienced similar problems for two weeks, according to a Navy accident investigation.", - "The Air Force confirmed the date of this Reaper accident and said it occurred in Southwest Asia, which usually refers to a country in the Persian Gulf. It classified the exact location and all other details. It did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An unarmed Reaper crash-landed at an international airport, bouncing into the ocean. Investigators found that the pilot bungled the takeoff by hitting the wrong lever and choking the fuel supply, then failing to lower the landing gear during the emergency landing attempt. The aircraft was destroyed but \"could have been recovered with minimal or no damage if the landing gear had been down,\" Air Force investigators concluded. The pilot was a civilian contractor for the Air Force. On top of the other mistakes, he took off five minutes earlier than scheduled and ignored the air-traffic controller.", - "A Navy helicopter drone crashed during a surveillance mission in central Afghanistan. The pilot and the payload operator were civilian contractors employed by the manufacturer, Northrop Grumman, according to the summary of a Navy safety investigation report. The report blamed a malfunction in the navigation system. Navy officials would not disclose the full report.", - "An armed Predator was intentionally crashed into a mountain after the engine failed because it was too far to attempt to return to the base. Investigators said malfunctioning ignition circuits caused the engine failure.", - "A Navy surveillance drone crashed into a wildlife refuge on Maryland's Eastern Shore after a malfunction with the navigation system. The RQ-4A aircraft was a Broad Area Maritime Surveillance Demonstrator -- the Navy's version of the Air Force Global Hawk. The pilot and crew were civilian contractors from the manufacturer Northrop Grumman. Navy investigators blamed a failure of the right inboard ruddervator actuator but also criticized the pilot for not following emergency guidelines.", - "A Gray Eagle crashed during an emergency landing attempt after the engine failed. The aircraft lost oil pressure, forcing the crew to try to return to base. The Gray Eagle touched down with the nose too low and the landing gear collapsed, according to Army safety officials. The Army said it did not produce a publicly available investigation report.", - "A Gray Eagle crashed one mile from the runway shortly after takeoff. The aircraft seemed to take off without incident, but as it climbed to 300 feet it suddenly plunged and crashed. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending.", - "A Gray Eagle crashed into mountainous terrain while descending to land, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending.", - "An armed Predator crashed during an attempted takeoff, slamming into a barrier and guardhouse. Investigators found the primary cause was pilot error. After the camera on board the aircraft shifted unexpectedly, the pilot slammed on the brakes, then hit the accelerator. Transcripts of the ground-station voice recorder showed that the pilot and camera operator had been joking with each other before the crash. \"Stop saying 'uh oh' while you're flying,\" the camera operator told the pilot. \"It's never good. Like going to the dentist or a doctor -- oops, what the [expletive] you mean oops?\" A few moments later, the aircraft crashed. \"I don't know what the hell just happened,\" the pilot said.", - "An armed Predator crashed a half mile from Jalalabad after an electrical failure. An investigator said the primary cause was the failure of both alternators due to a malfunctioning diode. Air Force crews tried to return to the base and make an emergency landing but didn't make it. \"We lost the aircraft, but we were damn near close to saving it and getting it on the ground,\" a camera operator testified.", - "An unarmed Predator crashed into uninhabited mountainous terrain in northern Iraq five minutes after losing its communications and navigational links. Investigators could not determine a cause. The weather was clear and there were no abnormal mechanical readings prior to the lost links. The aircraft had been flying in a preprogrammed loiter pattern -- a box over northern Iraq -- as part of a surveillance mission. The wreckage was recovered by Kurdish guerrilla fighters who posted a video on the Internet, asserting that they had shot down the aircraft. The Air Force report makes no mention of any evidence that the Predator was fired upon.", - "A Gray Eagle crashed while attempting to return to base after an engine failure. Contractors flying the aircraft noticed a high temperature warning as the aircraft reached an altitude of 1,200 feet after takeoff, according to Army safety officials. The operators tried to return the Gray Eagle to base but crashed short of the runway.The Army said it did not conduct a publicly releasable accident investigation.", - "A Gray Eagle crashed while attempting to make an emergency landing. The aircraft experienced problems with the engine oil, coolant and other malfunctions, and the engine failed before the drone could return to base. The aircraft crashed just off the runway. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", - "An armed Predator was intentionally flown into a mountainside after a propeller motor malfunctioned 20 hours into the flight. Investigators determined the primary cause was failure of the variable pitch propeller motor, resulting from an inconsistent electrical supply. The aircraft was too far away from a base to attempt an emergency landing. \"We decided that [the pilot] should crash the aircraft as hard as he could so it would be destroyed completely,\" a mission supervisor from Creech Air Force Base in Nevada testified. \"He smashed it to smithereens.\" A safety observer from Creech added: \"When you see a descent that large that is almost unheard of -- I think everyone was kind of shocked about what happened since it happened so quickly. When you get something like that, you kill the engine and the airplane is going down.\"", - "A Gray Eagle crashed after an engine failure. Army safety officials said the engine failed during a \"manual transfer of fuel operation\" while in flight. The crew was unable to restart the engine, and the aircraft crashed near its point of departure. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending.", - "A Hunter crashed after its engine failed while it was cruising at 7,000 feet above ground level. The engine gradually lost power until it failed completely at an altitude of 2,000 feet, according to Army safety officials. The Army said it did not produce a publicly available accident investigation report.", - "A Reaper crashed in an uninhabited area during a training exercise after going into a stall. Investigators determined that crew error was the primary cause. The ground-control station was improperly reconfigured from a setup for flying Predators to a setup for flying Reapers. When the pilot guided the throttle, it mistakenly triggered a reverse thrust because of the incorrect setup. \"We're in the soup here,\" the pilot said, according to a voice-recording transcript. \"Dude, uh, we're not sure what the aircraft is doing -- yeah, we crashed.\"", - "A drone helicopter crashed off the coast of Libya while trying to land on the deck of the USS Robert G. Bradley, a Navy frigate. The aircraft flew through icy conditions while on a surveillance mission to support Special Operations forces. Chunks of ice came off the drone, and the tail rotor malfunctioned while the helicopter was hovering 15 feet above the flight deck, according to a Navy investigation. The drone spun into the sea without striking the ship, and no one was injured.", - "A Hunter crashed into a concrete drainage ditch after a botched takeoff, veering off the runway after rolling just 250 feet. The aircraft was operating under an automatic takeoff and landing system, according to Army safety officials. A Freedom of Information Act request for the accident investigation report, filed in October 2013 with U.S. Army Central, is pending. ", - "An armed Predator crashed nose-first into the ground in a remote area after going into a spin 21 hours into a mission. \"What's going on? Hang on! Hang on!\" the pilot shouted, according to a voice-recording transcript from the ground-control station. \"Whoa! Speed's dying! RPMs are up,\" the camera operator replied. \"Uh-oh! [expletive] It's spinning!\" the pilot said as his video screen went black. \"OK, I think it just fell out of the sky.\" Investigators determined that the aircraft plowed into terrain \"in a near-vertical trajectory\" after the failure of a circuit board computer chip on the secondary control module that controls the ruddervator. Afghans pillaged the wreckage before the site could be secured, according to investigators.", - "An armed Predator crashed after it was struck by lightning. The aircraft risked flying into stormy weather to provide assistance to a forward operating base that was \"expecting an imminent attack,\" according to the Air Force accident investigation report. The lightning strike knocked out the satellite links and damaged the electrical system, causing the aircraft to \"execute its flight termination mode.\" A report from General Atomics, the manufacturer, stated that a video recording \"showed the aircraft proceeding into dark clouds\" several minutes before the lightning strike.", - "A Reaper crashed and sank in the Gulf of Aden. The Air Force Special Operations Command did not convene an Accident Investigation Board to produce a publicly releasable report. A spokesman for U.S. Africa Command said the Reaper experienced flight-control problems \"believed to be attributable to severe weather. As a precaution, the aircrew diverted the aircraft to international waters, where it crashed \nand sank in the Gulf of Aden...It is believed that severe turbulence and icing were the lead contributors to the aircraft malfunction.\"", - "A Predator crashed in Mali after a suspected engine failure related to the oil system, according to a statement from Air Force Special Operations Command. Command officials waited more than a year to convene an Accident Investigation Board to produce a publicly releasable report, citing the need to investigate other \"higher priority mishaps.\" The public report is pending. ", - "A Predator crashed after a broken crankshaft caused the engine to fail, according to Air Combat Command. The Air Force did not convene an Accident Investigation Board to produce a publicly releasable report.", - "An unarmed Predator crashed during a training flight after the variable pitch propeller system failed. About five hours into a flight, the propeller pitch suddenly changed, causing reverse thrust as the aircraft plunged to the ground. \"Okay, interesting. We are falling out of the sky,\" the pilot said, according to a voice-recorder transcript from the ground-control station. \"Boy, this is going to be tight.\" Investigators concluded that the primary cause was a failure of the variable pitch propeller servomotor because of a bad electrical connection. Investigators concluded that a contributory factor was channelized attention on the part of the crew, which failed to notice that the propeller pitch had been locked in a fixed position for much of the flight.", - "A drone cargo helicopter crashed while landing at Camp Leatherneck. Marine officials said a publicly releasable accident investigation was not conducted.", - "An armed Predator crashed 800 feet past the departure end of the runway, landing near some trees and a farm. Air Force investigators concluded the primary cause was a turbocharger failure and gusty winds during the attempted landing. The accident investigation report stated that Predator drones have \"experienced an abnormally high rate of turbocharger failures in recent months.\" An Air Force master sergeant told investigators that turbocharger problems had worsened after the Air Force upgraded to a new style of turbocharger about a year before. ", - "An aerial target drone crashed about eight seconds after takeoff, destroying the aircraft and inflicting about $150,000 in damage to the runway and a barrier. The aircraft pitched up and down rapidly as soon as it climbed into the air. \"Drone just pitched up. Drone's pitching over. Drone is uh, crashed and destructed, at uh, the end of the runway,\" a pilot in a chase plane reported, according to a voice-recording transcript. Investigators determined that the primary cause was a defective portion of the Attitude Heading Reference System, which controls the up and down movement of the aircraft. \"This is not the first pitch malfunction on takeoff that we've had. It's happened on several different occasions. I don't know if the Air Force has conducted accident investigations on previous ones,\" a civilian contractor told investigators.", - "A Reaper crashed on the runway at Cannon Air Force Base. Air Force officials did not disclose other details. The Air Force Special Operations Command convened an Accident Investigation Board; a publicly releasable report is pending.", - "A Gray Eagle crashed short of the runway while attempting an emergency landing. The drone lost fuel pressure, so the civilian contractors who were flying it tried to return it to the base. The engine failed before it could land, according to Army safety officials. The Army said it did not produce a publicly releasable investigative report.", - "A Warrior crashed after losing control links while in flight, according to Army safety officials who gave no other details. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request in October 2013 for the report.", - "An unarmed Predator crashed into the sea off the coast of Sicily while in a holding pattern after conducting a 20-hour surveillance mission over North Africa. The cause was the failure of the power converter in a critical control module, according to an Air Force investigation. The satellite link was lost after a spike in electrical current. \"All indications to me made it look like a lost link, but the warnings made it look like an engine failure,\" the pilot told investigators. \"But all the warnings I saw were nothing I had seen before.\" Only one wing of the aircraft was recovered.", - "A Gray Eagle crashed into a ridge while attempting to return to base for an emergency landing. About 2.5 hours into a flight, the aircraft experienced low manifold pressure and signs of engine failure, according to Army safety officials. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request in October 2013 for the report. ", - "A Gray Eagle crashed on the runway after the controller lost its link with the aircraft, according to Army safety officials. U.S. Army Central conducted an investigation but has yet to respond to a FOIA request for the report filed in October 2013.", - "A helicopter drone sustained damage during a hard landing after a test flight. A Navy investigation is pending.", - "A Predator crashed about six miles northwest of the runway at Holloman Air Force Base about 1:30 p.m. during a training mission. Air Force officials said pilots lost link with the aircraft. The Air Combat Command convened an Accident Investigation Board; the public report is pending.", - "A Reaper flown by the New York Air National Guard crashed into Lake Ontario, about 12 miles from the lake's eastern shore. The plane malfunctioned at 1:30 p.m., about three hours into a training mission. Some parts of the aircraft were recovered after they washed up on the lake's shoreline, but the bulk of the wreckage has not been found. The Reaper departed from Fort Drum, N.Y. The Air Combat Command convened an Accident Investigation Board; a public report is pending.", - "A Hunter drone crashed shortly after takeoff. The drone rose to 250 feet before it made an uncommanded descent and crashed on the runway, according to Army safety officials. The Army's Intelligence and Security Command, which operated the Hunter, said it did not conduct an accident investigation." - ] - }, - { - "label": "Crash ID", - "visible": true, - "values": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135, - 136, - 137, - 138, - 139, - 140, - 141, - 142, - 143, - 144, - 145, - 146, - 147, - 148, - 149, - 150, - 151, - 152, - 153, - 154, - 155, - 156, - 157, - 158, - 159, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 174, - 175, - 176, - 177, - 178, - 179, - 180, - 181, - 182, - 183, - 184, - 185, - 186, - 187, - 188, - 189, - 190, - 191, - 192, - 193, - 194 - ] - }, - { - "label": "Year", - "tickformat": ".4r", - "visible": true, - "values": [ - 2001, - 2001, - 2001, - 2001, - 2001, - 2001, - 2002, - 2002, - 2002, - 2002, - 2002, - 2002, - 2002, - 2003, - 2003, - 2003, - 2003, - 2004, - 2004, - 2004, - 2004, - 2004, - 2004, - 2004, - 2004, - 2004, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2005, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2006, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2007, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2008, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2009, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2010, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2011, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2012, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013, - 2013 - ] - }, - { - "label": "Mishap Country", - "visible": true, - "values": [ - 8, - 0, - 8, - 0, - 13, - 1, - 3, - 3, - 3, - 6, - 3, - 13, - 0, - 3, - 0, - 0, - 13, - 11, - 11, - 0, - 0, - 8, - 0, - 0, - 0, - 3, - 11, - 11, - 11, - 11, - 13, - 8, - 8, - 8, - 8, - 13, - 0, - 0, - 11, - 11, - 0, - 8, - 8, - 0, - 8, - 0, - 0, - 0, - 0, - 0, - 11, - 11, - 8, - 13, - 13, - 8, - 8, - 8, - 8, - 8, - 8, - 0, - 8, - 8, - 8, - 8, - 11, - 11, - 13, - 8, - 13, - 8, - 8, - 0, - 11, - 8, - 13, - 8, - 8, - 13, - 8, - 8, - 0, - 8, - 13, - 0, - 8, - 11, - 13, - 8, - 0, - 0, - 13, - 8, - 0, - 13, - 13, - 0, - 0, - 13, - 8, - 8, - 13, - 0, - 13, - 8, - 13, - 13, - 13, - 13, - 13, - 13, - 13, - 0, - 8, - 0, - 0, - 8, - 8, - 0, - 13, - 13, - 13, - 13, - 13, - 10, - 8, - 10, - 0, - 13, - 13, - 10, - 0, - 10, - 0, - 13, - 13, - 13, - 13, - 13, - 13, - 0, - 13, - 0, - 9, - 2, - 13, - 11, - 11, - 0, - 13, - 13, - 10, - 13, - 12, - 11, - 2, - 13, - 13, - 0, - 13, - 13, - 13, - 13, - 13, - 8, - 13, - 13, - 13, - 13, - 13, - 0, - 5, - 11, - 13, - 13, - 13, - 10, - 4, - 13, - 0, - 13, - 13, - 0, - 0, - 13, - 13, - 7, - 13, - 13, - 0, - 0, - 0, - 13 - ], - "tickvals": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 - ], - "ticktext": [ - "United States", - "United Arab Emirates", - "Seychelles", - "Pakistan", - "Mali", - "Libya", - "Kuwait", - "Italy", - "Iraq", - "Iran", - "Djibouti", - "Classified", - "Atlantic Ocean", - "Afghanistan" - ] - }, - { - "label": "Owner Service", - "visible": true, - "values": [ - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 2, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 2, - 3, - 3, - 3, - 3, - 3, - 2, - 3, - 3, - 3, - 2, - 3, - 3, - 2, - 2, - 3, - 3, - 3, - 2, - 3, - 3, - 3, - 3, - 3, - 2, - 2, - 2, - 3, - 3, - 2, - 3, - 2, - 3, - 2, - 3, - 3, - 3, - 2, - 2, - 2, - 3, - 3, - 2, - 3, - 3, - 3, - 2, - 2, - 3, - 3, - 3, - 3, - 3, - 3, - 2, - 3, - 3, - 3, - 3, - 3, - 2, - 3, - 2, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 2, - 3, - 3, - 3, - 3, - 3, - 2, - 3, - 2, - 3, - 2, - 3, - 3, - 2, - 2, - 3, - 3, - 2, - 3, - 3, - 2, - 2, - 3, - 3, - 3, - 2, - 3, - 2, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 2, - 3, - 3, - 3, - 2, - 3, - 3, - 3, - 3, - 3, - 3, - 2, - 3, - 3, - 3, - 2, - 0, - 3, - 3, - 0, - 3, - 0, - 2, - 2, - 2, - 3, - 3, - 3, - 2, - 2, - 3, - 2, - 2, - 3, - 0, - 3, - 2, - 3, - 3, - 3, - 3, - 3, - 3, - 1, - 3, - 3, - 3, - 2, - 2, - 3, - 2, - 2, - 0, - 3, - 3, - 2 - ], - "tickvals": [ - 0, - 1, - 2, - 3 - ], - "ticktext": [ - "Navy", - "Marine Corps", - "Army", - "Air Force" - ] - }, - { - "label": "Drone Make", - "visible": true, - "values": [ - 4, - 5, - 4, - 5, - 4, - 11, - 4, - 4, - 4, - 4, - 11, - 4, - 4, - 4, - 5, - 5, - 4, - 4, - 4, - 8, - 4, - 4, - 5, - 4, - 4, - 4, - 4, - 4, - 4, - 4, - 4, - 7, - 4, - 4, - 4, - 4, - 3, - 8, - 3, - 4, - 4, - 7, - 4, - 5, - 8, - 8, - 4, - 4, - 5, - 8, - 4, - 4, - 4, - 4, - 4, - 8, - 0, - 8, - 4, - 4, - 8, - 3, - 8, - 4, - 8, - 4, - 4, - 3, - 0, - 8, - 7, - 4, - 4, - 8, - 3, - 4, - 4, - 8, - 0, - 4, - 4, - 4, - 3, - 4, - 4, - 0, - 4, - 3, - 4, - 4, - 3, - 8, - 4, - 8, - 4, - 4, - 4, - 11, - 4, - 3, - 4, - 8, - 4, - 4, - 3, - 4, - 4, - 0, - 4, - 8, - 4, - 8, - 4, - 4, - 8, - 9, - 4, - 4, - 0, - 3, - 4, - 8, - 8, - 4, - 4, - 4, - 8, - 4, - 10, - 4, - 4, - 4, - 5, - 4, - 3, - 4, - 4, - 4, - 1, - 4, - 11, - 3, - 0, - 3, - 2, - 3, - 4, - 4, - 3, - 8, - 4, - 4, - 4, - 0, - 12, - 3, - 3, - 12, - 4, - 11, - 10, - 10, - 10, - 4, - 4, - 4, - 10, - 10, - 4, - 10, - 8, - 3, - 12, - 4, - 8, - 4, - 4, - 3, - 4, - 4, - 4, - 6, - 4, - 5, - 3, - 10, - 0, - 4, - 10, - 10, - 12, - 4, - 3, - 8 - ], - "tickvals": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12 - ], - "ticktext": [ - "Warrior", - "Shadow", - "Sentinel", - "Reaper", - "Predator", - "Phantom", - "K-MAX", - "IGNAT", - "Hunter", - "Hummingbird", - "Gray Eagle", - "Global Hawk", - "Fire Scout" - ] - }, - { - "label": "Drone Type", - "visible": true, - "values": [ - 9, - 14, - 9, - 14, - 9, - 23, - 7, - 8, - 7, - 8, - 23, - 7, - 7, - 8, - 14, - 14, - 7, - 12, - 12, - 18, - 10, - 10, - 14, - 10, - 10, - 10, - 12, - 12, - 12, - 12, - 10, - 17, - 10, - 10, - 7, - 7, - 5, - 18, - 6, - 12, - 12, - 17, - 10, - 14, - 19, - 18, - 10, - 11, - 15, - 18, - 12, - 12, - 11, - 10, - 11, - 19, - 0, - 20, - 11, - 10, - 19, - 5, - 19, - 10, - 20, - 11, - 12, - 5, - 0, - 20, - 17, - 11, - 11, - 19, - 5, - 11, - 11, - 20, - 0, - 11, - 11, - 12, - 5, - 11, - 11, - 1, - 12, - 6, - 11, - 11, - 5, - 19, - 11, - 19, - 11, - 11, - 11, - 23, - 9, - 6, - 11, - 19, - 11, - 11, - 6, - 11, - 11, - 2, - 11, - 19, - 11, - 19, - 11, - 11, - 19, - 21, - 11, - 11, - 2, - 5, - 11, - 19, - 19, - 11, - 11, - 11, - 19, - 11, - 22, - 11, - 11, - 11, - 13, - 11, - 6, - 11, - 11, - 11, - 3, - 11, - 24, - 6, - 2, - 6, - 4, - 5, - 11, - 11, - 6, - 19, - 11, - 11, - 11, - 2, - 25, - 6, - 5, - 25, - 11, - 23, - 22, - 22, - 22, - 11, - 11, - 11, - 22, - 22, - 11, - 22, - 19, - 6, - 25, - 12, - 19, - 11, - 11, - 6, - 11, - 12, - 11, - 16, - 12, - 14, - 6, - 22, - 2, - 11, - 22, - 22, - 25, - 11, - 6, - 19 - ], - "tickvals": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25 - ], - "ticktext": [ - "Warrior RQ-1C", - "Warrior MQ-1C", - "Warrior MQ-1B", - "Shadow RQ-7B", - "Sentinel RQ-170", - "Reaper MQ-9A", - "Reaper MQ-9", - "Predator RQ-1L", - "Predator RQ-1B", - "Predator RQ-1", - "Predator MQ-1L", - "Predator MQ-1B", - "Predator MQ-1", - "Phantom QRF-4C", - "Phantom QF-4E", - "Phantom QF-4", - "K-MAX K-MAX", - "IGNAT RQ-1L", - "Hunter RQ-5A", - "Hunter MQ-5B", - "Hunter MQ-5A", - "Hummingbird A160T Hummingbird", - "Gray Eagle MQ-1C", - "Global Hawk RQ-4A", - "Global Hawk EQ-4B", - "Fire Scout MQ-8B" - ] - }, - { - "label": "Damage USD", - "visible": true, - "values": [ - 0, - 110174900, - 0, - 1523469, - 0, - 40600000, - 3251400, - 3142700, - 3342700, - 1480500, - 40600000, - 0, - 3300000, - 3200000, - 0, - 880000, - 3300000, - 0, - 0, - 0, - 4200000, - 4288000, - 1506500, - 2883977, - 1721973, - 3555536, - 0, - 0, - 0, - 0, - 3579320, - 1000000, - 3792200, - 4359991, - 0, - 0, - 6796497, - 1288861, - 0, - 0, - 0, - 1000000, - 4368400, - 2450000, - 2782012, - 0, - 4700000, - 1436765, - 0, - 0, - 0, - 0, - 4160391, - 3742655, - 1727425, - 0, - 0, - 2584890, - 2210000, - 3828000, - 0, - 0, - 0, - 3828000, - 0, - 3849481, - 0, - 0, - 0, - 0, - 0, - 5000000, - 3828000, - 0, - 0, - 4050000, - 3849481, - 0, - 0, - 3849000, - 4013000, - 0, - 0, - 3738515, - 4670000, - 0, - 0, - 0, - 0, - 4456200, - 3929647, - 2265299, - 4700000, - 3112882, - 543178, - 4698281, - 3900000, - 0, - 0, - 0, - 2780000, - 3112882, - 4960000, - 0, - 0, - 3689468, - 3807680, - 0, - 4588282, - 0, - 3800139, - 0, - 0, - 3742211, - 0, - 5000000, - 988149, - 3900278, - 0, - 10300000, - 3800278, - 0, - 3449950, - 4400000, - 4400000, - 4120000, - 0, - 1357000, - 0, - 2020000, - 4200000, - 4400000, - 2801574, - 2983766, - 0, - 4400000, - 4400000, - 4400000, - 0, - 3844825, - 72800000, - 0, - 389252400, - 0, - 0, - 9643000, - 0, - 0, - 0, - 0, - 4500000, - 396020991, - 4400000, - 0, - 77, - 0, - 8931000, - 77, - 383205318, - 0, - 0, - 0, - 0, - 4476000, - 4600000, - 4414977, - 0, - 0, - 4600000, - 0, - 0, - 9646088, - 14100000, - 0, - 0, - 4688557, - 4735604, - 0, - 0, - 0, - 4511500, - 0, - 4511499, - 4564536, - 0, - 0, - 0, - 5306000, - 0, - 0, - 0, - 0, - 10, - 0 - ] - } - ], - "uid": "2cb165" - } - ]} \ No newline at end of file diff --git a/test/jasmine/tests/sankey_test.js b/test/jasmine/tests/sankey_test.js deleted file mode 100644 index ddad38620bd..00000000000 --- a/test/jasmine/tests/sankey_test.js +++ /dev/null @@ -1,942 +0,0 @@ -var Plotly = require('@lib/index'); -var Lib = require('@src/lib'); -var d3 = require('d3'); -var Plots = require('@src/plots/plots'); -var Sankey = require('@src/traces/sankey'); -var attributes = require('@src/traces/sankey/attributes'); - -var createGraphDiv = require('../assets/create_graph_div'); -var destroyGraphDiv = require('../assets/destroy_graph_div'); -var hasWebGLSupport = require('../assets/has_webgl_support'); -// var mouseEvent = require('../assets/mouse_event'); - -// mock with two dimensions (one panel); special case, e.g. left and right panel is obv. the same -var mock2 = require('@mocks/sankey_2.json'); - -// mock with one dimension (zero panels); special case, as no panel can be rendered -var mock1 = require('@mocks/sankey_1.json'); - -// mock with zero dimensions; special case, as no dimension can be rendered -var mock0 = Lib.extendDeep({}, mock1); -mock0.data[0].dimensions = []; - -var mock = require('@mocks/sankey_large.json'); - -var lineStart = 30; -var lineCount = 10; - -describe('sankey basic', function() { - - var mock = require('@mocks/sankey_new.json'); - - fit('', function() { - - var gd = createGraphDiv(); - - - mock.data[0].domain = {x: [0, 1], y: [0, 1]}; - var nodes = []; - mock.data[0].nodes = []; - var links = []; - mock.data[0].links = []; - - var dims = mock.data[0].dimensions.slice(1, 4); - - var dim, i, j, s, t; - - for(j = 0; j < dims.length; j++) { - dim = dims[j]; - for(i = 0; i < dim.ticktext.length; i++) { - nodes.push({ - label: dim.ticktext[i], - visible: true - }); - } - } - - var nodeLabels = nodes.map(function(d) {return d.label;}); - - for(i = 0; i < dims[0].values.length; i++) { - - for(j = 1; j < dims.length; j++) { - s = dims[j - 1]; - t = dims[j]; - links.push({ - source: nodeLabels.indexOf(s.ticktext[s.values[i]]), - target: nodeLabels.indexOf(t.ticktext[t.values[i]]), - value: 1 - }); - } - } - - var aggregate = false; - - if(aggregate) { - - var agg = {}, link; - for (i = 0; i < links.length; i++) { - link = links[i]; - if (agg[link.source] == undefined) { - agg[link.source] = {}; - } - if (agg[link.source][link.target] == undefined) { - agg[link.source][link.target] = 0; - } - agg[link.source][link.target] += link.value; - } - - for (i in agg) { - for (j in agg[i]) { - mock.data[0].links.push({ - label: '', - visible: true, - source: i, - target: j, - value: agg[i][j] - }); - } - } - } else { - for (i = 0; i < links.length; i++) { - link = links[i]; - mock.data[0].links.push({ - label: '', - visible: true, - source: link.source, - target: link.target, - value: link.value - }); - } - mock.data[0].links.sort(function(a, b) { - return a.source < b.source - ? -1 - : a.source > b.source - ? 1 - : a.target < b.target - ? -1 - : a.target > b.target - ? 1 - : 0 - }) - } - - mock.data[0].nodes = nodes; - nodes = nodes.map(function(d) {return {name: d.label};}); - links = mock.data[0].links.map(function(d) { - return { - source: nodes[d.source], - target: nodes[d.target], - value: d.value - }; - }); - - Plotly.plot(gd, mock.data, mock.layout); - - }); - -}); - - -describe('sankey initialization tests', function() { - - 'use strict'; - - describe('sankey defaults', function() { - - function _supply(traceIn) { - var traceOut = { visible: true }, - defaultColor = '#444', - layout = { }; - - Sankey.supplyDefaults(traceIn, traceOut, defaultColor, layout); - - return traceOut; - } - - it('\'line\' specification should yield a default color', function() { - var fullTrace = _supply({}); - expect(fullTrace.line.color).toEqual('#444'); - }); - - it('\'colorscale\' should assume a default value if the \'color\' array is specified', function() { - var fullTrace = _supply({ - line: { - color: [35, 63, 21, 42] - }, - dimensions: [ - {values: [321, 534, 542, 674]}, - {values: [562, 124, 942, 189]}, - {values: [287, 183, 385, 884]}, - {values: [113, 489, 731, 454]} - ] - }); - expect(fullTrace.line).toEqual({ - color: [35, 63, 21, 42], - colorscale: attributes.line.colorscale.dflt, - cauto: true, - autocolorscale: false, - reversescale: false, - showscale: false - }); - }); - - it('\'domain\' specification should have a default', function() { - var fullTrace = _supply({}); - expect(fullTrace.domain).toEqual({x: [0, 1], y: [0, 1]}); - }); - - it('\'dimension\' specification should have a default of an empty array', function() { - var fullTrace = _supply({}); - expect(fullTrace.dimensions).toEqual([]); - }); - - it('\'dimension\' should be used with default values where attributes are not provided', function() { - var fullTrace = _supply({ - dimensions: [{ - values: [1], - alienProperty: 'Alpha Centauri' - }] - }); - expect(fullTrace.dimensions).toEqual([{values: [1], visible: true, tickformat: '3s', _index: 0}]); - }); - - it('\'dimension.visible\' should be set to false, and other props just passed through if \'values\' is not provided', function() { - var fullTrace = _supply({ - dimensions: [{ - alienProperty: 'Alpha Centauri' - }] - }); - expect(fullTrace.dimensions).toEqual([{visible: false, values: [], _index: 0}]); - }); - - it('\'dimension.visible\' should be set to false, and other props just passed through if \'values\' is an empty array', function() { - var fullTrace = _supply({ - dimensions: [{ - values: [], - alienProperty: 'Alpha Centauri' - }] - }); - expect(fullTrace.dimensions).toEqual([{visible: false, values: [], _index: 0}]); - }); - - it('\'dimension.visible\' should be set to false, and other props just passed through if \'values\' is not an array', function() { - var fullTrace = _supply({ - dimensions: [{ - values: null, - alienProperty: 'Alpha Centauri' - }] - }); - expect(fullTrace.dimensions).toEqual([{visible: false, values: [], _index: 0}]); - }); - - it('\'dimension.values\' should get truncated to a common shortest length', function() { - var fullTrace = _supply({dimensions: [ - {values: [321, 534, 542, 674]}, - {values: [562, 124, 942]}, - {values: [], visible: true}, - {values: [1, 2], visible: false} // shouldn't be truncated to as false - ]}); - expect(fullTrace.dimensions).toEqual([ - {values: [], visible: true, tickformat: '3s', _index: 0}, - {values: [], visible: true, tickformat: '3s', _index: 1}, - {values: [], visible: true, tickformat: '3s', _index: 2}, - {values: [1, 2], visible: false, _index: 3} - ]); - }); - }); - - describe('sankey calc', function() { - - function _calc(trace) { - var gd = { data: [trace] }; - - Plots.supplyDefaults(gd); - - var fullTrace = gd._fullData[0]; - Sankey.calc(gd, fullTrace); - return fullTrace; - } - - var base = { type: 'sankey' }; - - it('\'colorscale\' should assume a default value if the \'color\' array is specified', function() { - - var fullTrace = _calc(Lib.extendDeep({}, base, { - line: { - color: [35, 63, 21, 42] - }, - dimensions: [ - {values: [321, 534, 542, 674]}, - {values: [562, 124, 942, 189]}, - {values: [287, 183, 385, 884]}, - {values: [113, 489, 731, 454]} - ] - })); - - expect(fullTrace.line).toEqual({ - color: [35, 63, 21, 42], - colorscale: attributes.line.colorscale.dflt, - cauto: true, - cmin: 21, - cmax: 63, - autocolorscale: false, - reversescale: false, - showscale: false - }); - }); - - it('use a singular \'color\' if it is not an array', function() { - - var fullTrace = _calc(Lib.extendDeep({}, base, { - line: { - color: '#444' - }, - dimensions: [ - {values: [321, 534, 542, 674]}, - {values: [562, 124, 942, 189]} - ] - })); - - expect(fullTrace.line).toEqual({ - color: [0.5, 0.5, 0.5, 0.5], - colorscale: [[0, '#444'], [1, '#444']], - cmin: 0, - cmax: 1 - }); - }); - - it('use a singular \'color\' even if a \'colorscale\' is supplied', function() { - - var fullTrace = _calc(Lib.extendDeep({}, base, { - line: { - color: '#444', - colorscale: 'Jet' - }, - dimensions: [ - {values: [321, 534, 542, 674]}, - {values: [562, 124, 942, 189]} - ] - })); - - expect(fullTrace.line).toEqual({ - color: [0.5, 0.5, 0.5, 0.5], - colorscale: [[0, '#444'], [1, '#444']], - autocolorscale: false, - showscale: false, - reversescale: false, - cauto: true, - cmin: 0, - cmax: 1 - }); - }); - }); -}); - -describe('sankey', function() { - - if(!hasWebGLSupport('sankey')) return; - - beforeAll(function() { - mock.data[0].dimensions.forEach(function(d) { - d.values = d.values.slice(lineStart, lineStart + lineCount); - }); - mock.data[0].line.color = mock.data[0].line.color.slice(lineStart, lineStart + lineCount); - }); - - afterEach(destroyGraphDiv); - - describe('edge cases', function() { - - it('Works fine with one panel only', function(done) { - - var mockCopy = Lib.extendDeep({}, mock2); - var gd = createGraphDiv(); - Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { - - expect(gd.data.length).toEqual(1); - expect(gd.data[0].dimensions.length).toEqual(2); - expect(document.querySelectorAll('.axis').length).toEqual(2); - expect(gd.data[0].dimensions[0].visible).not.toBeDefined(); - expect(gd.data[0].dimensions[0].range).not.toBeDefined(); - expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); - expect(gd.data[0].dimensions[0].constraintrange).toEqual([200, 700]); - expect(gd.data[0].dimensions[1].range).toBeDefined(); - expect(gd.data[0].dimensions[1].range).toEqual([0, 700000]); - expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); - - done(); - }); - }); - - it('Do something sensible if there is no panel i.e. dimension count is less than 2', function(done) { - - var mockCopy = Lib.extendDeep({}, mock1); - var gd = createGraphDiv(); - Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { - - expect(gd.data.length).toEqual(1); - expect(gd.data[0].dimensions.length).toEqual(1); - expect(document.querySelectorAll('.axis').length).toEqual(1); // sole axis still shows up - expect(gd.data[0].line.cmin).toEqual(-4000); - expect(gd.data[0].dimensions[0].visible).not.toBeDefined(); - expect(gd.data[0].dimensions[0].range).not.toBeDefined(); - expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); - expect(gd.data[0].dimensions[0].constraintrange).toEqual([200, 700]); - - done(); - }); - }); - - it('Does not error with zero dimensions', function(done) { - - var mockCopy = Lib.extendDeep({}, mock0); - var gd = createGraphDiv(); - - Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { - expect(gd.data.length).toEqual(1); - expect(gd.data[0].dimensions.length).toEqual(0); - expect(document.querySelectorAll('.axis').length).toEqual(0); - done(); - }); - }); - - it('Works with a single line; also, use a longer color array than the number of lines', function(done) { - - var mockCopy = Lib.extendDeep({}, mock2); - var dim, i, j; - - mockCopy.layout.width = 320; - for(i = 0; i < mockCopy.data[0].dimensions.length; i++) { - dim = mockCopy.data[0].dimensions[i]; - delete dim.constraintrange; - dim.range = [1, 2]; - dim.values = []; - for(j = 0; j < 1; j++) { - dim.values[j] = 1 + Math.random(); - } - } - - var gd = createGraphDiv(); - Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { - - expect(gd.data.length).toEqual(1); - expect(gd.data[0].dimensions.length).toEqual(2); - expect(document.querySelectorAll('.axis').length).toEqual(2); - expect(gd.data[0].dimensions[0].values.length).toEqual(1); - done(); - }); - }); - - it('Does not raise an error with zero lines and no specified range', function(done) { - - var mockCopy = Lib.extendDeep({}, mock2); - var dim, i; - - mockCopy.layout.width = 320; - for(i = 0; i < mockCopy.data[0].dimensions.length; i++) { - dim = mockCopy.data[0].dimensions[i]; - delete dim.range; - delete dim.constraintrange; - dim.values = []; - } - - var gd = createGraphDiv(); - Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { - - expect(gd.data.length).toEqual(1); - expect(gd.data[0].dimensions.length).toEqual(2); - expect(document.querySelectorAll('.axis').length).toEqual(0); - expect(gd.data[0].dimensions[0].values.length).toEqual(0); - done(); - }); - }); - - it('Works with non-finite `values` elements', function(done) { - - var mockCopy = Lib.extendDeep({}, mock2); - var dim, i, j; - var values = [[0, 1, 2, 3, 4], [Infinity, NaN, void(0), null, 1]]; - - mockCopy.layout.width = 320; - for(i = 0; i < values.length; i++) { - dim = mockCopy.data[0].dimensions[i]; - delete dim.range; - delete dim.constraintrange; - dim.values = []; - for(j = 0; j < values[0].length; j++) { - dim.values[j] = values[i][j]; - } - } - - var gd = createGraphDiv(); - Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { - - expect(gd.data.length).toEqual(1); - expect(gd.data[0].dimensions.length).toEqual(2); - expect(document.querySelectorAll('.axis').length).toEqual(2); - expect(gd.data[0].dimensions[0].values.length).toEqual(values[0].length); - done(); - }); - }); - - it('Works with 60 dimensions', function(done) { - - var mockCopy = Lib.extendDeep({}, mock1); - var newDimension, i, j; - - mockCopy.layout.width = 1680; - mockCopy.data[0].dimensions = []; - for(i = 0; i < 60; i++) { - newDimension = Lib.extendDeep({}, mock1.data[0].dimensions[0]); - newDimension.id = 'S' + i; - newDimension.label = 'S' + i; - delete newDimension.constraintrange; - newDimension.range = [1, 2]; - newDimension.values = []; - for(j = 0; j < 100; j++) { - newDimension.values[j] = 1 + Math.random(); - } - mockCopy.data[0].dimensions[i] = newDimension; - } - - var gd = createGraphDiv(); - Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { - - expect(gd.data.length).toEqual(1); - expect(gd.data[0].dimensions.length).toEqual(60); - expect(document.querySelectorAll('.axis').length).toEqual(60); - done(); - }); - }); - - it('Truncates dimension values to the shortest array, retaining only 3 lines', function(done) { - - var mockCopy = Lib.extendDeep({}, mock1); - var newDimension, i, j; - - mockCopy.layout.width = 1680; - for(i = 0; i < 60; i++) { - newDimension = Lib.extendDeep({}, mock1.data[0].dimensions[0]); - newDimension.id = 'S' + i; - newDimension.label = 'S' + i; - delete newDimension.constraintrange; - newDimension.range = [0, 999]; - newDimension.values = []; - for(j = 0; j < 65 - i; j++) { - newDimension.values[j] = Math.floor(1000 * Math.random()); - } - mockCopy.data[0].dimensions[i] = newDimension; - } - - var gd = createGraphDiv(); - Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { - - expect(gd.data.length).toEqual(1); - expect(gd.data[0].dimensions.length).toEqual(60); - expect(document.querySelectorAll('.axis').length).toEqual(60); - done(); - }); - }); - - it('Skip dimensions which are not plain objects or whose `values` is not an array', function(done) { - - var mockCopy = Lib.extendDeep({}, mock1); - var newDimension, i, j; - - mockCopy.layout.width = 680; - mockCopy.data[0].dimensions = []; - for(i = 0; i < 5; i++) { - newDimension = Lib.extendDeep({}, mock1.data[0].dimensions[0]); - newDimension.id = 'S' + i; - newDimension.label = 'S' + i; - delete newDimension.constraintrange; - newDimension.range = [1, 2]; - newDimension.values = []; - for(j = 0; j < 100; j++) { - newDimension.values[j] = 1 + Math.random(); - } - mockCopy.data[0].dimensions[i] = newDimension; - } - - mockCopy.data[0].dimensions[0] = 'This is not a plain object'; - mockCopy.data[0].dimensions[1].values = 'This is not an array'; - - var gd = createGraphDiv(); - Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() { - - expect(gd.data.length).toEqual(1); - expect(gd.data[0].dimensions.length).toEqual(5); // it's still five, but ... - expect(document.querySelectorAll('.axis').length).toEqual(3); // only 3 axes shown - done(); - }); - }); - - - }); - - describe('basic use', function() { - var mockCopy, - gd; - - beforeEach(function(done) { - mockCopy = Lib.extendDeep({}, mock); - mockCopy.data[0].domain = { - x: [0.1, 0.9], - y: [0.05, 0.85] - }; - gd = createGraphDiv(); - Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(done); - }); - - it('`Plotly.plot` should have proper fields on `gd.data` on initial rendering', function() { - - expect(gd.data.length).toEqual(1); - expect(gd.data[0].dimensions.length).toEqual(11); - expect(document.querySelectorAll('.axis').length).toEqual(10); // one dimension is `visible: false` - expect(gd.data[0].line.cmin).toEqual(-4000); - expect(gd.data[0].dimensions[0].visible).not.toBeDefined(); - expect(gd.data[0].dimensions[4].visible).toEqual(true); - expect(gd.data[0].dimensions[5].visible).toEqual(false); - expect(gd.data[0].dimensions[0].range).not.toBeDefined(); - expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); - expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]); - expect(gd.data[0].dimensions[1].range).toBeDefined(); - expect(gd.data[0].dimensions[1].range).toEqual([0, 700000]); - expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); - - }); - - it('Calling `Plotly.plot` again should add the new sankey', function(done) { - - var reversedMockCopy = Lib.extendDeep({}, mockCopy); - reversedMockCopy.data[0].dimensions = reversedMockCopy.data[0].dimensions.slice().reverse(); - reversedMockCopy.data[0].dimensions.forEach(function(d) {d.id = 'R_' + d.id;}); - reversedMockCopy.data[0].dimensions.forEach(function(d) {d.label = 'R_' + d.label;}); - - Plotly.plot(gd, reversedMockCopy.data, reversedMockCopy.layout).then(function() { - - expect(gd.data.length).toEqual(2); - - expect(gd.data[0].dimensions.length).toEqual(11); - expect(gd.data[0].line.cmin).toEqual(-4000); - expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); - expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]); - expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); - - expect(gd.data[1].dimensions.length).toEqual(11); - expect(gd.data[1].line.cmin).toEqual(-4000); - expect(gd.data[1].dimensions[10].constraintrange).toBeDefined(); - expect(gd.data[1].dimensions[10].constraintrange).toEqual([100000, 150000]); - expect(gd.data[1].dimensions[1].constraintrange).not.toBeDefined(); - - expect(document.querySelectorAll('.axis').length).toEqual(20); // one dimension is `visible: false` - - done(); - }); - - }); - - it('Calling `Plotly.restyle` with a string path should amend the preexisting sankey', function(done) { - - expect(gd.data.length).toEqual(1); - - Plotly.restyle(gd, 'line.colorscale', 'Viridis').then(function() { - - expect(gd.data.length).toEqual(1); - - expect(gd.data[0].line.colorscale).toEqual('Viridis'); - expect(gd.data[0].dimensions.length).toEqual(11); - expect(gd.data[0].line.cmin).toEqual(-4000); - expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); - expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]); - expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); - - done(); - }); - - }); - - it('Calling `Plotly.restyle` for a dimension should amend the preexisting dimension', function(done) { - - function restyleDimension(key, setterValue) { - - // array values need to be wrapped in an array; unwrapping here for value comparison - var value = Lib.isArray(setterValue) ? setterValue[0] : setterValue; - - return function() { - return Plotly.restyle(gd, 'dimensions[2].' + key, setterValue).then(function() { - expect(gd.data[0].dimensions[2][key]).toEqual(value, 'for dimension attribute \'' + key + '\''); - }); - }; - } - - restyleDimension('label', 'new label')() - .then(restyleDimension('tickvals', [[0, 0.1, 0.4, 1, 2]])) - .then(restyleDimension('ticktext', [['alpha', 'gamma', 'beta', 'omega', 'epsilon']])) - .then(restyleDimension('tickformat', '4s')) - .then(restyleDimension('range', [[0, 2]])) - .then(restyleDimension('constraintrange', [[0, 1]])) - .then(restyleDimension('values', [[0, 0.1, 0.4, 1, 2, 0, 0.1, 0.4, 1, 2]])) - .then(restyleDimension('visible', false)) - .then(done); - }); - - it('Calling `Plotly.restyle` with an object should amend the preexisting sankey', function(done) { - - var newStyle = Lib.extendDeep({}, mockCopy.data[0].line); - newStyle.colorscale = 'Viridis'; - newStyle.reversescale = false; - - Plotly.restyle(gd, {line: newStyle}).then(function() { - - expect(gd.data.length).toEqual(1); - - expect(gd.data[0].line.colorscale).toEqual('Viridis'); - expect(gd.data[0].line.reversescale).toEqual(false); - expect(gd.data[0].dimensions.length).toEqual(11); - expect(gd.data[0].line.cmin).toEqual(-4000); - expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); - expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]); - expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); - - done(); - }); - - - }); - - it('Should emit a \'plotly_restyle\' event', function(done) { - - var tester = (function() { - - var eventCalled = false; - - return { - set: function(d) {eventCalled = d;}, - get: function() {return eventCalled;} - }; - })(); - - gd.on('plotly_restyle', function() { - tester.set(true); - }); - - expect(tester.get()).toBe(false); - Plotly.restyle(gd, 'line.colorscale', 'Viridis') - .then(window.setTimeout(function() { - expect(tester.get()).toBe(true); - done(); - }, 0)); - - }); - - it('Calling `Plotly.relayout` with string should amend the preexisting sankey', function(done) { - - expect(gd.layout.width).toEqual(1184); - - Plotly.relayout(gd, 'width', 500).then(function() { - - expect(gd.data.length).toEqual(1); - - expect(gd.layout.width).toEqual(500); - expect(gd.data[0].line.colorscale).toEqual('Jet'); - expect(gd.data[0].dimensions.length).toEqual(11); - expect(gd.data[0].line.cmin).toEqual(-4000); - expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); - expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]); - expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); - - done(); - }); - - }); - - it('Calling `Plotly.relayout`with object should amend the preexisting sankey', function(done) { - - expect(gd.layout.width).toEqual(1184); - - Plotly.relayout(gd, {width: 500}).then(function() { - - expect(gd.data.length).toEqual(1); - - expect(gd.layout.width).toEqual(500); - expect(gd.data[0].line.colorscale).toEqual('Jet'); - expect(gd.data[0].dimensions.length).toEqual(11); - expect(gd.data[0].line.cmin).toEqual(-4000); - expect(gd.data[0].dimensions[0].constraintrange).toBeDefined(); - expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]); - expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined(); - - done(); - }); - - }); - - }); - - describe('Lifecycle methods', function() { - - it('Plotly.deleteTraces with one trace removes the plot', function(done) { - - var gd = createGraphDiv(); - var mockCopy = Lib.extendDeep({}, mock); - - mockCopy.data[0].line.showscale = false; - - Plotly.plot(gd, mockCopy).then(function() { - - expect(gd.data.length).toEqual(1); - - Plotly.deleteTraces(gd, 0).then(function() { - expect(d3.selectAll('.sankey').node()).toEqual(null); - expect(gd.data.length).toEqual(0); - done(); - }); - }); - }); - - it('Plotly.deleteTraces with two traces removes the deleted plot', function(done) { - - var gd = createGraphDiv(); - var mockCopy = Lib.extendDeep({}, mock); - var mockCopy2 = Lib.extendDeep({}, mock); - mockCopy2.data[0].dimensions.splice(3, 4); - mockCopy.data[0].line.showscale = false; - - Plotly.plot(gd, mockCopy) - .then(function() { - expect(gd.data.length).toEqual(1); - expect(document.querySelectorAll('.yAxis').length).toEqual(10); - return Plotly.plot(gd, mockCopy2); - }) - .then(function() { - expect(gd.data.length).toEqual(2); - expect(document.querySelectorAll('.yAxis').length).toEqual(10 + 7); - return Plotly.deleteTraces(gd, [0]); - }) - .then(function() { - expect(document.querySelectorAll('.sankey').length).toEqual(1); - expect(document.querySelectorAll('.yAxis').length).toEqual(7); - expect(gd.data.length).toEqual(1); - return Plotly.deleteTraces(gd, 0); - }) - .then(function() { - expect(document.querySelectorAll('.sankey').length).toEqual(0); - expect(document.querySelectorAll('.yAxis').length).toEqual(0); - expect(gd.data.length).toEqual(0); - done(); - }); - }); - - describe('Having two datasets', function() { - - it('Two subsequent calls to Plotly.plot should create two sankey rows', function(done) { - - var gd = createGraphDiv(); - var mockCopy = Lib.extendDeep({}, mock); - var mockCopy2 = Lib.extendDeep({}, mock); - mockCopy.data[0].domain = {x: [0, 0.45]}; - mockCopy2.data[0].domain = {x: [0.55, 1]}; - mockCopy2.data[0].dimensions.splice(3, 4); - - expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(0); - - Plotly.plot(gd, mockCopy) - .then(function() { - - expect(1).toEqual(1); - expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(1); - expect(gd.data.length).toEqual(1); - - return Plotly.plot(gd, mockCopy2); - }) - .then(function() { - - expect(1).toEqual(1); - expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(2); - expect(gd.data.length).toEqual(2); - - done(); - }); - }); - - it('Plotly.addTraces should add a new sankey row', function(done) { - - var gd = createGraphDiv(); - var mockCopy = Lib.extendDeep({}, mock); - var mockCopy2 = Lib.extendDeep({}, mock); - mockCopy.data[0].domain = {y: [0, 0.35]}; - mockCopy2.data[0].domain = {y: [0.65, 1]}; - mockCopy2.data[0].dimensions.splice(3, 4); - - expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(0); - - Plotly.plot(gd, mockCopy) - .then(function() { - - expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(1); - expect(gd.data.length).toEqual(1); - - return Plotly.addTraces(gd, [mockCopy2.data[0]]); - }) - .then(function() { - - expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(2); - expect(gd.data.length).toEqual(2); - - done(); - }); - - }); - - it('Plotly.restyle should update the existing sankey row', function(done) { - - var gd = createGraphDiv(); - var mockCopy = Lib.extendDeep({}, mock); - var mockCopy2 = Lib.extendDeep({}, mock); - - delete mockCopy.data[0].dimensions[0].constraintrange; - delete mockCopy2.data[0].dimensions[0].constraintrange; - - // in this example, the brush range doesn't change... - mockCopy.data[0].dimensions[2].constraintrange = [0, 2]; - mockCopy2.data[0].dimensions[2].constraintrange = [0, 2]; - - // .. but what's inside the brush does: - function numberUpdater(v) { - switch(v) { - case 0.5: return 2.5; - default: return v; - } - } - - // shuffle around categorical values - mockCopy2.data[0].dimensions[2].ticktext = ['A', 'B', 'Y', 'AB', 'Z']; - mockCopy2.data[0].dimensions[2].tickvals = [0, 1, 2, 2.5, 3]; - mockCopy2.data[0].dimensions[2].values = mockCopy2.data[0].dimensions[2].values.map(numberUpdater); - - expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(0); - - Plotly.plot(gd, mockCopy) - .then(function() { - - expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(1); - expect(gd.data.length).toEqual(1); - - return Plotly.restyle(gd, { - // wrap the `dimensions` array - dimensions: [mockCopy2.data[0].dimensions] - }); - }) - .then(function() { - - expect(document.querySelectorAll('.sankey-line-layers').length).toEqual(1); - expect(gd.data.length).toEqual(1); - - done(); - }); - - }); - }); - }); -}); From 65b2d57efd26c36f05e0499f2c91b35ceccc938e Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Fri, 28 Apr 2017 20:03:31 +0200 Subject: [PATCH 03/26] fix up bundle files --- dist/README.md | 142 +- dist/npm-ls.json | 409 +- dist/plotly-with-meta.js | 14016 +++++++++++++++++++++---------------- dist/plotly.js | 13673 ++++++++++++++++++++---------------- dist/plotly.min.js | 139 +- 5 files changed, 15594 insertions(+), 12785 deletions(-) diff --git a/dist/README.md b/dist/README.md index 2dd00bc2c6d..df324d6b0fd 100644 --- a/dist/README.md +++ b/dist/README.md @@ -37,11 +37,11 @@ The main plotly.js bundle includes all the official (non-beta) trace modules. It be can imported as minified javascript - using dist file `dist/plotly.min.js` -- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.25.2.min.js +- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.26.1.min.js or as raw javascript: - using dist file `dist/plotly.js` -- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.25.2.js +- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.26.1.js - using CommonJS with `require('plotly.js')` If you would like to have access to the attribute meta information (including attribute descriptions as on the [schema reference page](https://plot.ly/javascript/reference/)), use dist file `dist/plotly-with-meta.js` @@ -50,31 +50,145 @@ The main plotly.js bundle weights in at: | plotly.js | plotly.min.js | plotly.min.js + gzip | plotly-with-meta.js | |-----------|---------------|----------------------|---------------------| -| 5.1 MB | 2.1 MB | 634.4 kB | 5.2 MB | +| 5.2 MB | 2.1 MB | 632.9 kB | 5.3 MB | ## Partial bundles Starting in `v1.15.0`, plotly.js also ships with several _partial_ bundles: -- [sankey](#plotlyjs-sankey) +- [basic](#plotlyjs-basic) +- [cartesian](#plotlyjs-cartesian) +- [geo](#plotlyjs-geo) +- [gl3d](#plotlyjs-gl3d) +- [gl2d](#plotlyjs-gl2d) +- [mapbox](#plotlyjs-mapbox) +- [finance](#plotlyjs-finance) -### plotly.js sankey +### plotly.js basic -The `sankey` partial bundle contains the `scatter` and `sankey` trace modules. +The `basic` partial bundle contains the `scatter`, `bar` and `pie` trace modules. | Way to import | Location | |---------------|----------| -| dist bundle | `dist/plotly-sankey.js` | -| dist bundle (minified) | `dist/plotly-sankey.min.js` | -| CDN URL (latest) | https://cdn.plot.ly/plotly-sankey-latest.js | -| CDN URL (latest minified) | https://cdn.plot.ly/plotly-sankey-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-sankey-1.25.2.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-sankey-1.25.2.min.js | -| CommonJS | `require('plotly.js/lib/index-sankey')` | +| dist bundle | `dist/plotly-basic.js` | +| dist bundle (minified) | `dist/plotly-basic.min.js` | +| CDN URL (latest) | https://cdn.plot.ly/plotly-basic-latest.js | +| CDN URL (latest minified) | https://cdn.plot.ly/plotly-basic-latest.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-basic-1.26.1.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-basic-1.26.1.min.js | +| CommonJS | `require('plotly.js/lib/index-basic')` | | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 1.7 MB | 665.9 kB | 216.4 kB | +| 1.7 MB | 646.2 kB | 210.3 kB | + +### plotly.js cartesian + +The `cartesian` partial bundle contains the `scatter`, `bar`, `box`, `heatmap`, `histogram`, `histogram2d`, `histogram2dcontour`, `pie`, `contour` and `scatterternary` trace modules. + +| Way to import | Location | +|---------------|----------| +| dist bundle | `dist/plotly-cartesian.js` | +| dist bundle (minified) | `dist/plotly-cartesian.min.js` | +| CDN URL (latest) | https://cdn.plot.ly/plotly-cartesian-latest.js | +| CDN URL (latest minified) | https://cdn.plot.ly/plotly-cartesian-latest.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-cartesian-1.26.1.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-cartesian-1.26.1.min.js | +| CommonJS | `require('plotly.js/lib/index-cartesian')` | + +| Raw size | Minified size | Minified + gzip size | +|------|-----------------|------------------------| +| 1.9 MB | 721.2 kB | 232.8 kB | + +### plotly.js geo + +The `geo` partial bundle contains the `scatter`, `scattergeo` and `choropleth` trace modules. + +| Way to import | Location | +|---------------|----------| +| dist bundle | `dist/plotly-geo.js` | +| dist bundle (minified) | `dist/plotly-geo.min.js` | +| CDN URL (latest) | https://cdn.plot.ly/plotly-geo-latest.js | +| CDN URL (latest minified) | https://cdn.plot.ly/plotly-geo-latest.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-geo-1.26.1.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-geo-1.26.1.min.js | +| CommonJS | `require('plotly.js/lib/index-geo')` | + +| Raw size | Minified size | Minified + gzip size | +|------|-----------------|------------------------| +| 1.7 MB | 669.1 kB | 218.8 kB | + +### plotly.js gl3d + +The `gl3d` partial bundle contains the `scatter`, `scatter3d`, `surface` and `mesh3d` trace modules. + +| Way to import | Location | +|---------------|----------| +| dist bundle | `dist/plotly-gl3d.js` | +| dist bundle (minified) | `dist/plotly-gl3d.min.js` | +| CDN URL (latest) | https://cdn.plot.ly/plotly-gl3d-latest.js | +| CDN URL (latest minified) | https://cdn.plot.ly/plotly-gl3d-latest.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl3d-1.26.1.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl3d-1.26.1.min.js | +| CommonJS | `require('plotly.js/lib/index-gl3d')` | + +| Raw size | Minified size | Minified + gzip size | +|------|-----------------|------------------------| +| 2.6 MB | 1.1 MB | 348 kB | + +### plotly.js gl2d + +The `gl2d` partial bundle contains the `scatter`, `scattergl`, `pointcloud`, `heatmapgl`, `contourgl` and `parcoords` trace modules. + +| Way to import | Location | +|---------------|----------| +| dist bundle | `dist/plotly-gl2d.js` | +| dist bundle (minified) | `dist/plotly-gl2d.min.js` | +| CDN URL (latest) | https://cdn.plot.ly/plotly-gl2d-latest.js | +| CDN URL (latest minified) | https://cdn.plot.ly/plotly-gl2d-latest.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl2d-1.26.1.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl2d-1.26.1.min.js | +| CommonJS | `require('plotly.js/lib/index-gl2d')` | + +| Raw size | Minified size | Minified + gzip size | +|------|-----------------|------------------------| +| 2.7 MB | 1.1 MB | 354.7 kB | + +### plotly.js mapbox + +The `mapbox` partial bundle contains the `scatter` and `scattermapbox` trace modules. + +| Way to import | Location | +|---------------|----------| +| dist bundle | `dist/plotly-mapbox.js` | +| dist bundle (minified) | `dist/plotly-mapbox.min.js` | +| CDN URL (latest) | https://cdn.plot.ly/plotly-mapbox-latest.js | +| CDN URL (latest minified) | https://cdn.plot.ly/plotly-mapbox-latest.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-mapbox-1.26.1.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-mapbox-1.26.1.min.js | +| CommonJS | `require('plotly.js/lib/index-mapbox')` | + +| Raw size | Minified size | Minified + gzip size | +|------|-----------------|------------------------| +| 2.8 MB | 1.1 MB | 323.1 kB | + +### plotly.js finance + +The `finance` partial bundle contains the `scatter`, `bar`, `histogram`, `pie`, `ohlc` and `candlestick` trace modules. + +| Way to import | Location | +|---------------|----------| +| dist bundle | `dist/plotly-finance.js` | +| dist bundle (minified) | `dist/plotly-finance.min.js` | +| CDN URL (latest) | https://cdn.plot.ly/plotly-finance-latest.js | +| CDN URL (latest minified) | https://cdn.plot.ly/plotly-finance-latest.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-finance-1.26.1.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-finance-1.26.1.min.js | +| CommonJS | `require('plotly.js/lib/index-finance')` | + +| Raw size | Minified size | Minified + gzip size | +|------|-----------------|------------------------| +| 1.8 MB | 673.1 kB | 217.8 kB | ---------------- diff --git a/dist/npm-ls.json b/dist/npm-ls.json index 8b94ae1a084..bafdeddd8e9 100644 --- a/dist/npm-ls.json +++ b/dist/npm-ls.json @@ -1,26 +1,6 @@ { "name": "plotly.js", - "version": "1.25.2", - "problems": [ - "missing: through2@^0.6.3, required by glslify@4.0.0", - "missing: through2@^0.6.3, required by glsl-tokenizer@2.1.2", - "missing: falafel@^1.0.0, required by static-module@1.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], + "version": "1.26.1", "dependencies": { "3d-view": { "version": "2.0.0", @@ -53,11 +33,6 @@ } } }, - "@monfera/d3-sankey": { - "version": "0.4.2", - "from": "@monfera/d3-sankey@>=0.4.2 <0.5.0", - "resolved": "https://registry.npmjs.org/@monfera/d3-sankey/-/d3-sankey-0.4.2.tgz" - }, "alpha-shape": { "version": "1.0.0", "from": "alpha-shape@>=1.0.0 <2.0.0", @@ -140,9 +115,9 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", "dependencies": { "brace-expansion": { - "version": "1.1.7", + "version": "1.1.6", "from": "brace-expansion@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", "dependencies": { "balanced-match": { "version": "0.4.2", @@ -190,11 +165,6 @@ "from": "define-properties@>=1.1.2 <2.0.0", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "dependencies": { - "foreach": { - "version": "2.0.5", - "from": "foreach@>=2.0.5 <3.0.0", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz" - }, "object-keys": { "version": "1.0.11", "from": "object-keys@>=1.0.8 <2.0.0", @@ -268,11 +238,6 @@ } } }, - "arraytools": { - "version": "1.1.2", - "from": "arraytools@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/arraytools/-/arraytools-1.1.2.tgz" - }, "color-rgba": { "version": "1.1.0", "from": "color-rgba@>=1.0.4 <2.0.0", @@ -365,50 +330,6 @@ "from": "d3@>=3.5.12 <4.0.0", "resolved": "https://registry.npmjs.org/d3/-/d3-3.5.17.tgz" }, - "d3-array": { - "version": "1.1.1", - "from": "d3-array@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.1.1.tgz" - }, - "d3-collection": { - "version": "1.0.3", - "from": "d3-collection@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/d3-collection/-/d3-collection-1.0.3.tgz" - }, - "d3-force": { - "version": "1.0.6", - "from": "d3-force@>=1.0.6 <2.0.0", - "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-1.0.6.tgz", - "dependencies": { - "d3-dispatch": { - "version": "1.0.3", - "from": "d3-dispatch@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.3.tgz" - }, - "d3-quadtree": { - "version": "1.0.3", - "from": "d3-quadtree@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-1.0.3.tgz" - }, - "d3-timer": { - "version": "1.0.5", - "from": "d3-timer@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.5.tgz" - } - } - }, - "d3-interpolate": { - "version": "1.1.4", - "from": "d3-interpolate@>=1.1.3 <2.0.0", - "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.1.4.tgz", - "dependencies": { - "d3-color": { - "version": "1.0.3", - "from": "d3-color@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.0.3.tgz" - } - } - }, "delaunay-triangulate": { "version": "1.1.6", "from": "delaunay-triangulate@>=1.1.6 <2.0.0", @@ -435,11 +356,6 @@ "version": "1.1.3", "from": "gl-contour2d@>=1.1.2 <2.0.0", "resolved": "https://registry.npmjs.org/gl-contour2d/-/gl-contour2d-1.1.3.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@4.0.0", - "missing: through2@^0.6.3, required by glsl-tokenizer@2.1.2", - "missing: falafel@^1.0.0, required by static-module@1.3.1" - ], "dependencies": { "cdt2d": { "version": "1.0.0", @@ -521,11 +437,6 @@ "version": "4.0.0", "from": "glslify@>=4.0.0 <5.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-4.0.0.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@4.0.0", - "missing: through2@^0.6.3, required by glsl-tokenizer@2.1.2", - "missing: falafel@^1.0.0, required by static-module@1.3.1" - ], "dependencies": { "bl": { "version": "1.2.0", @@ -533,35 +444,35 @@ "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.0.tgz", "dependencies": { "readable-stream": { - "version": "2.2.9", + "version": "2.2.6", "from": "readable-stream@>=2.0.5 <3.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.6.tgz", "dependencies": { "isarray": { "version": "1.0.0", "from": "isarray@>=1.0.0 <1.1.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" }, - "string_decoder": { - "version": "1.0.0", - "from": "string_decoder@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.0.tgz" - }, "buffer-shims": { "version": "1.0.0", - "from": "buffer-shims@>=1.0.0 <1.1.0", + "from": "buffer-shims@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" }, "core-util-is": { "version": "1.0.2", "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" }, "process-nextick-args": { "version": "1.0.7", "from": "process-nextick-args@>=1.0.6 <1.1.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, "util-deprecate": { "version": "1.0.2", "from": "util-deprecate@>=1.0.1 <1.1.0", @@ -592,9 +503,6 @@ "version": "4.0.1", "from": "glslify-bundle@>=4.0.0 <5.0.0", "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-4.0.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glsl-tokenizer@2.1.2" - ], "dependencies": { "glsl-inject-defines": { "version": "1.0.3", @@ -654,13 +562,11 @@ "version": "2.1.2", "from": "glsl-tokenizer@>=2.0.2 <3.0.0", "resolved": "https://registry.npmjs.org/glsl-tokenizer/-/glsl-tokenizer-2.1.2.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glsl-tokenizer@2.1.2" - ], "dependencies": { "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@>=0.6.3 <0.7.0", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -729,6 +635,25 @@ } } }, + "through2": { + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "from": "readable-stream@>=1.0.33-1 <1.1.0-0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "dependencies": { + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + } + } + } + } + }, "minimist": { "version": "1.2.0", "from": "minimist@>=1.2.0 <1.3.0", @@ -743,9 +668,6 @@ "version": "1.3.1", "from": "static-module@>=1.1.2 <2.0.0", "resolved": "https://registry.npmjs.org/static-module/-/static-module-1.3.1.tgz", - "problems": [ - "missing: falafel@^1.0.0, required by static-module@1.3.1" - ], "dependencies": { "concat-stream": { "version": "1.4.10", @@ -829,23 +751,6 @@ } } }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "string_decoder": { - "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - } - } - }, "static-eval": { "version": "0.2.4", "from": "static-eval@>=0.2.0 <0.3.0", @@ -870,6 +775,28 @@ } } }, + "falafel": { + "version": "1.2.0", + "from": "falafel@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", + "dependencies": { + "foreach": { + "version": "2.0.5", + "from": "foreach@>=2.0.5 <3.0.0", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz" + }, + "acorn": { + "version": "1.2.2", + "from": "acorn@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz" + }, + "object-keys": { + "version": "1.0.11", + "from": "object-keys@>=1.0.6 <2.0.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz" + } + } + }, "object-inspect": { "version": "0.4.0", "from": "object-inspect@>=0.4.0 <0.5.0", @@ -893,10 +820,6 @@ } } } - }, - "falafel": { - "required": "^1.0.0", - "missing": true } } }, @@ -904,10 +827,6 @@ "version": "4.0.1", "from": "xtend@>=4.0.0 <4.1.0-0", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - }, - "through2": { - "required": "^0.6.3", - "missing": true } } }, @@ -968,17 +887,11 @@ "version": "1.2.1", "from": "gl-error2d@>=1.2.1 <2.0.0", "resolved": "https://registry.npmjs.org/gl-error2d/-/gl-error2d-1.2.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "glslify": { "version": "2.3.1", "from": "glslify@>=2.3.1 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -991,8 +904,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -1007,17 +921,11 @@ "version": "1.0.4", "from": "gl-error3d@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/gl-error3d/-/gl-error3d-1.0.4.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "glslify": { "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1030,8 +938,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -1058,17 +967,11 @@ "version": "1.4.1", "from": "gl-line2d@>=1.4.1 <2.0.0", "resolved": "https://registry.npmjs.org/gl-line2d/-/gl-line2d-1.4.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "glslify": { "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1081,8 +984,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -1102,9 +1006,6 @@ "version": "1.1.0", "from": "gl-line3d@>=1.1.0 <2.0.0", "resolved": "https://registry.npmjs.org/gl-line3d/-/gl-line3d-1.1.0.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "binary-search-bounds": { "version": "1.0.0", @@ -1115,9 +1016,6 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1130,8 +1028,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -1151,9 +1050,6 @@ "version": "1.2.0", "from": "gl-mesh3d@>=1.2.0 <2.0.0", "resolved": "https://registry.npmjs.org/gl-mesh3d/-/gl-mesh3d-1.2.0.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "barycentric": { "version": "1.0.1", @@ -1186,6 +1082,11 @@ "from": "colormap@>=2.1.0 <3.0.0", "resolved": "https://registry.npmjs.org/colormap/-/colormap-2.2.0.tgz", "dependencies": { + "arraytools": { + "version": "1.1.2", + "from": "arraytools@>=1.1.2 <2.0.0", + "resolved": "https://registry.npmjs.org/arraytools/-/arraytools-1.1.2.tgz" + }, "clone": { "version": "1.0.2", "from": "clone@>=1.0.2 <2.0.0", @@ -1197,9 +1098,6 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1212,8 +1110,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -1262,9 +1161,6 @@ "version": "1.2.0", "from": "gl-plot2d@>=1.2.0 <2.0.0", "resolved": "https://registry.npmjs.org/gl-plot2d/-/gl-plot2d-1.2.0.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "binary-search-bounds": { "version": "2.0.3", @@ -1280,9 +1176,6 @@ "version": "2.3.1", "from": "glslify@>=2.2.1 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1295,8 +1188,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -1319,13 +1213,8 @@ }, "gl-plot3d": { "version": "1.5.4", - "from": "gl-plot3d@>=1.5.4 <2.0.0", + "from": "gl-plot3d@1.5.4", "resolved": "https://registry.npmjs.org/gl-plot3d/-/gl-plot3d-1.5.4.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1", - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "3d-view-controls": { "version": "2.2.0", @@ -1355,9 +1244,6 @@ "version": "1.2.5", "from": "gl-axes3d@>=1.2.5 <2.0.0", "resolved": "https://registry.npmjs.org/gl-axes3d/-/gl-axes3d-1.2.5.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "extract-frustum-planes": { "version": "1.0.0", @@ -1368,9 +1254,6 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1383,8 +1266,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -1421,9 +1305,6 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1436,8 +1317,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -1445,17 +1327,11 @@ "version": "1.0.5", "from": "gl-spikes3d@>=1.0.3 <2.0.0", "resolved": "https://registry.npmjs.org/gl-spikes3d/-/gl-spikes3d-1.0.5.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "glslify": { "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1468,8 +1344,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } } @@ -1486,9 +1363,6 @@ "version": "1.0.0", "from": "gl-pointcloud2d@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/gl-pointcloud2d/-/gl-pointcloud2d-1.0.0.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "gl-shader": { "version": "4.2.1", @@ -1499,9 +1373,6 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1514,8 +1385,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } } @@ -1525,9 +1397,6 @@ "version": "1.2.2", "from": "gl-scatter2d@>=1.2.2 <2.0.0", "resolved": "https://registry.npmjs.org/gl-scatter2d/-/gl-scatter2d-1.2.2.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "binary-search-bounds": { "version": "2.0.3", @@ -1538,9 +1407,6 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1553,8 +1419,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -1569,9 +1436,6 @@ "version": "1.3.4", "from": "gl-scatter2d-sdf@1.3.4", "resolved": "https://registry.npmjs.org/gl-scatter2d-sdf/-/gl-scatter2d-sdf-1.3.4.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "color-id": { "version": "1.0.3", @@ -1604,9 +1468,6 @@ "version": "2.3.1", "from": "glslify@>=2.3.1 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1619,8 +1480,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@>=0.6.3 <0.7.0", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -1635,17 +1497,11 @@ "version": "1.0.10", "from": "gl-scatter3d@>=1.0.4 <2.0.0", "resolved": "https://registry.npmjs.org/gl-scatter3d/-/gl-scatter3d-1.0.10.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "glslify": { "version": "2.3.1", "from": "glslify@>=2.2.1 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1658,8 +1514,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -1765,17 +1622,11 @@ "version": "1.0.1", "from": "gl-select-box@>=1.0.1 <2.0.0", "resolved": "https://registry.npmjs.org/gl-select-box/-/gl-select-box-1.0.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "glslify": { "version": "2.3.1", "from": "glslify@>=2.2.1 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1788,8 +1639,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } } @@ -1864,9 +1716,6 @@ "version": "1.3.0", "from": "gl-surface3d@>=1.3.0 <2.0.0", "resolved": "https://registry.npmjs.org/gl-surface3d/-/gl-surface3d-1.3.0.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bit-twiddle": { "version": "1.0.2", @@ -1882,9 +1731,6 @@ "version": "2.3.1", "from": "glslify@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/glslify/-/glslify-2.3.1.tgz", - "problems": [ - "missing: through2@^0.6.3, required by glslify@2.3.1" - ], "dependencies": { "bl": { "version": "0.9.5", @@ -1897,8 +1743,9 @@ "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-2.0.4.tgz" }, "through2": { - "required": "^0.6.3", - "missing": true + "version": "0.6.5", + "from": "through2@^0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" } } }, @@ -2036,23 +1883,18 @@ }, "through2": { "version": "2.0.3", - "from": "through2@>=2.0.0 <3.0.0", + "from": "through2@>=2.0.3 <3.0.0", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "dependencies": { "readable-stream": { - "version": "2.2.9", + "version": "2.2.6", "from": "readable-stream@>=2.1.5 <3.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.6.tgz", "dependencies": { "isarray": { "version": "1.0.0", "from": "isarray@>=1.0.0 <1.1.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "string_decoder": { - "version": "1.0.0", - "from": "string_decoder@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.0.tgz" } } } @@ -2275,9 +2117,9 @@ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" }, "form-data": { - "version": "2.1.4", + "version": "2.1.2", "from": "form-data@>=2.1.1 <2.2.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz", "dependencies": { "asynckit": { "version": "0.4.0", @@ -2292,9 +2134,9 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", "dependencies": { "ajv": { - "version": "4.11.6", + "version": "4.11.5", "from": "ajv@>=4.9.1 <5.0.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.6.tgz", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.5.tgz", "dependencies": { "co": { "version": "4.6.0", @@ -2557,6 +2399,11 @@ "from": "unassertify@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/unassertify/-/unassertify-2.0.4.tgz", "dependencies": { + "acorn": { + "version": "4.0.11", + "from": "acorn@>=4.0.3 <5.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz" + }, "convert-source-map": { "version": "1.5.0", "from": "convert-source-map@>=1.1.1 <2.0.0", @@ -2618,11 +2465,6 @@ "from": "espurify@>=1.3.0 <2.0.0", "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz" }, - "acorn": { - "version": "4.0.11", - "from": "acorn@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz" - }, "estraverse": { "version": "4.2.0", "from": "estraverse@>=4.1.0 <5.0.0", @@ -2630,16 +2472,11 @@ }, "esutils": { "version": "2.0.2", - "from": "esutils@>=2.0.2 <3.0.0", + "from": "esutils@^2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" } } }, - "acorn": { - "version": "4.0.11", - "from": "acorn@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz" - }, "escodegen": { "version": "1.8.1", "from": "escodegen@>=1.6.1 <2.0.0", @@ -2735,7 +2572,7 @@ }, "matrix-camera-controller": { "version": "2.1.3", - "from": "matrix-camera-controller@>=2.1.3 <3.0.0", + "from": "matrix-camera-controller@latest", "resolved": "https://registry.npmjs.org/matrix-camera-controller/-/matrix-camera-controller-2.1.3.tgz", "dependencies": { "gl-vec3": { @@ -2845,9 +2682,9 @@ } }, "uglify-js": { - "version": "2.8.22", + "version": "2.8.20", "from": "uglify-js@>=2.6.0 <3.0.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.22.tgz", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.20.tgz", "dependencies": { "source-map": { "version": "0.5.6", diff --git a/dist/plotly-with-meta.js b/dist/plotly-with-meta.js index 6e3139eb44a..5cc296dbb06 100644 --- a/dist/plotly-with-meta.js +++ b/dist/plotly-with-meta.js @@ -1,5 +1,5 @@ /** -* plotly.js v1.25.2 +* plotly.js v1.26.1 * Copyright 2012-2017, Plotly, Inc. * All rights reserved. * Licensed under the MIT license @@ -69,7 +69,7 @@ for(var selector in rules) { Lib.addStyleRule(fullSelector, rules[selector]); } -},{"../src/lib":690}],2:[function(require,module,exports){ +},{"../src/lib":685}],2:[function(require,module,exports){ 'use strict'; module.exports = { @@ -186,6 +186,12 @@ module.exports = { 'path': 'm0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z', 'ascent': 850, 'descent': -150 + }, + 'spikeline': { + 'width': 1000, + 'path': 'M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z', + 'ascent': 850, + 'descent': -150 } }; @@ -202,7 +208,7 @@ module.exports = { module.exports = require('../src/traces/bar'); -},{"../src/traces/bar":821}],4:[function(require,module,exports){ +},{"../src/traces/bar":816}],4:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -215,7 +221,7 @@ module.exports = require('../src/traces/bar'); module.exports = require('../src/traces/box'); -},{"../src/traces/box":833}],5:[function(require,module,exports){ +},{"../src/traces/box":828}],5:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -228,7 +234,7 @@ module.exports = require('../src/traces/box'); module.exports = require('../src/components/calendars'); -},{"../src/components/calendars":583}],6:[function(require,module,exports){ +},{"../src/components/calendars":576}],6:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -241,7 +247,20 @@ module.exports = require('../src/components/calendars'); module.exports = require('../src/traces/candlestick'); -},{"../src/traces/candlestick":841}],7:[function(require,module,exports){ +},{"../src/traces/candlestick":836}],7:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = require('../src/traces/carpet'); + +},{"../src/traces/carpet":857}],8:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -254,7 +273,7 @@ module.exports = require('../src/traces/candlestick'); module.exports = require('../src/traces/choropleth'); -},{"../src/traces/choropleth":848}],8:[function(require,module,exports){ +},{"../src/traces/choropleth":872}],9:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -267,7 +286,20 @@ module.exports = require('../src/traces/choropleth'); module.exports = require('../src/traces/contour'); -},{"../src/traces/contour":859}],9:[function(require,module,exports){ +},{"../src/traces/contour":883}],10:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = require('../src/traces/contourcarpet'); + +},{"../src/traces/contourcarpet":898}],11:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -280,7 +312,7 @@ module.exports = require('../src/traces/contour'); module.exports = require('../src/core'); -},{"../src/core":675}],10:[function(require,module,exports){ +},{"../src/core":669}],12:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -293,7 +325,7 @@ module.exports = require('../src/core'); module.exports = require('../src/transforms/filter'); -},{"../src/transforms/filter":1008}],11:[function(require,module,exports){ +},{"../src/transforms/filter":1045}],13:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -306,7 +338,7 @@ module.exports = require('../src/transforms/filter'); module.exports = require('../src/transforms/groupby'); -},{"../src/transforms/groupby":1009}],12:[function(require,module,exports){ +},{"../src/transforms/groupby":1046}],14:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -319,7 +351,7 @@ module.exports = require('../src/transforms/groupby'); module.exports = require('../src/traces/heatmap'); -},{"../src/traces/heatmap":874}],13:[function(require,module,exports){ +},{"../src/traces/heatmap":912}],15:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -332,7 +364,7 @@ module.exports = require('../src/traces/heatmap'); module.exports = require('../src/traces/heatmapgl'); -},{"../src/traces/heatmapgl":883}],14:[function(require,module,exports){ +},{"../src/traces/heatmapgl":921}],16:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -345,7 +377,7 @@ module.exports = require('../src/traces/heatmapgl'); module.exports = require('../src/traces/histogram'); -},{"../src/traces/histogram":891}],15:[function(require,module,exports){ +},{"../src/traces/histogram":929}],17:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -358,7 +390,7 @@ module.exports = require('../src/traces/histogram'); module.exports = require('../src/traces/histogram2d'); -},{"../src/traces/histogram2d":896}],16:[function(require,module,exports){ +},{"../src/traces/histogram2d":934}],18:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -371,7 +403,7 @@ module.exports = require('../src/traces/histogram2d'); module.exports = require('../src/traces/histogram2dcontour'); -},{"../src/traces/histogram2dcontour":900}],17:[function(require,module,exports){ +},{"../src/traces/histogram2dcontour":938}],19:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -395,7 +427,6 @@ Plotly.register([ require('./pie'), require('./contour'), require('./scatterternary'), - require('./sankey'), require('./scatter3d'), require('./surface'), @@ -411,6 +442,10 @@ Plotly.register([ require('./scattermapbox'), + require('./carpet'), + require('./scattercarpet'), + require('./contourcarpet'), + require('./ohlc'), require('./candlestick') ]); @@ -437,7 +472,7 @@ Plotly.register([ module.exports = Plotly; -},{"./bar":3,"./box":4,"./calendars":5,"./candlestick":6,"./choropleth":7,"./contour":8,"./core":9,"./filter":10,"./groupby":11,"./heatmap":12,"./heatmapgl":13,"./histogram":14,"./histogram2d":15,"./histogram2dcontour":16,"./mesh3d":18,"./ohlc":19,"./parcoords":20,"./pie":21,"./pointcloud":22,"./sankey":23,"./scatter3d":24,"./scattergeo":25,"./scattergl":26,"./scattermapbox":27,"./scatterternary":28,"./surface":29}],18:[function(require,module,exports){ +},{"./bar":3,"./box":4,"./calendars":5,"./candlestick":6,"./carpet":7,"./choropleth":8,"./contour":9,"./contourcarpet":10,"./core":11,"./filter":12,"./groupby":13,"./heatmap":14,"./heatmapgl":15,"./histogram":16,"./histogram2d":17,"./histogram2dcontour":18,"./mesh3d":20,"./ohlc":21,"./parcoords":22,"./pie":23,"./pointcloud":24,"./scatter3d":25,"./scattercarpet":26,"./scattergeo":27,"./scattergl":28,"./scattermapbox":29,"./scatterternary":30,"./surface":31}],20:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -450,7 +485,7 @@ module.exports = Plotly; module.exports = require('../src/traces/mesh3d'); -},{"../src/traces/mesh3d":904}],19:[function(require,module,exports){ +},{"../src/traces/mesh3d":942}],21:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -463,7 +498,7 @@ module.exports = require('../src/traces/mesh3d'); module.exports = require('../src/traces/ohlc'); -},{"../src/traces/ohlc":909}],20:[function(require,module,exports){ +},{"../src/traces/ohlc":947}],22:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -476,7 +511,7 @@ module.exports = require('../src/traces/ohlc'); module.exports = require('../src/traces/parcoords'); -},{"../src/traces/parcoords":918}],21:[function(require,module,exports){ +},{"../src/traces/parcoords":956}],23:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -489,7 +524,7 @@ module.exports = require('../src/traces/parcoords'); module.exports = require('../src/traces/pie'); -},{"../src/traces/pie":927}],22:[function(require,module,exports){ +},{"../src/traces/pie":965}],24:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -502,7 +537,7 @@ module.exports = require('../src/traces/pie'); module.exports = require('../src/traces/pointcloud'); -},{"../src/traces/pointcloud":936}],23:[function(require,module,exports){ +},{"../src/traces/pointcloud":974}],25:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -513,9 +548,9 @@ module.exports = require('../src/traces/pointcloud'); 'use strict'; -module.exports = require('../src/traces/sankey'); +module.exports = require('../src/traces/scatter3d'); -},{"../src/traces/sankey":943}],24:[function(require,module,exports){ +},{"../src/traces/scatter3d":1004}],26:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -526,9 +561,9 @@ module.exports = require('../src/traces/sankey'); 'use strict'; -module.exports = require('../src/traces/scatter3d'); +module.exports = require('../src/traces/scattercarpet'); -},{"../src/traces/scatter3d":975}],25:[function(require,module,exports){ +},{"../src/traces/scattercarpet":1009}],27:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -541,7 +576,7 @@ module.exports = require('../src/traces/scatter3d'); module.exports = require('../src/traces/scattergeo'); -},{"../src/traces/scattergeo":981}],26:[function(require,module,exports){ +},{"../src/traces/scattergeo":1018}],28:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -554,7 +589,7 @@ module.exports = require('../src/traces/scattergeo'); module.exports = require('../src/traces/scattergl'); -},{"../src/traces/scattergl":986}],27:[function(require,module,exports){ +},{"../src/traces/scattergl":1023}],29:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -567,7 +602,7 @@ module.exports = require('../src/traces/scattergl'); module.exports = require('../src/traces/scattermapbox'); -},{"../src/traces/scattermapbox":992}],28:[function(require,module,exports){ +},{"../src/traces/scattermapbox":1029}],30:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -580,7 +615,7 @@ module.exports = require('../src/traces/scattermapbox'); module.exports = require('../src/traces/scatterternary'); -},{"../src/traces/scatterternary":998}],29:[function(require,module,exports){ +},{"../src/traces/scatterternary":1035}],31:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -593,7 +628,7 @@ module.exports = require('../src/traces/scatterternary'); module.exports = require('../src/traces/surface'); -},{"../src/traces/surface":1007}],30:[function(require,module,exports){ +},{"../src/traces/surface":1044}],32:[function(require,module,exports){ 'use strict' module.exports = createCamera @@ -822,7 +857,7 @@ function createCamera(element, options) { return camera } -},{"3d-view":31,"mouse-change":441,"mouse-event-offset":442,"mouse-wheel":444,"right-now":490}],31:[function(require,module,exports){ +},{"3d-view":33,"mouse-change":434,"mouse-event-offset":435,"mouse-wheel":437,"right-now":483}],33:[function(require,module,exports){ 'use strict' module.exports = createViewController @@ -945,317 +980,7 @@ function createViewController(options) { matrix: matrix }, mode) } -},{"matrix-camera-controller":439,"orbit-camera-controller":461,"turntable-camera-controller":525}],32:[function(require,module,exports){ -// https://github.com/d3/d3-sankey Version 0.4.2. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-array'), require('d3-collection'), require('d3-interpolate')) : - typeof define === 'function' && define.amd ? define(['exports', 'd3-array', 'd3-collection', 'd3-interpolate'], factory) : - (factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3)); -}(this, (function (exports,d3Array,d3Collection,d3Interpolate) { 'use strict'; - -var sankey = function() { - var sankey = {}, - nodeWidth = 24, - nodePadding = 8, - size = [1, 1], - nodes = [], - links = []; - - sankey.nodeWidth = function(_) { - if (!arguments.length) return nodeWidth; - nodeWidth = +_; - return sankey; - }; - - sankey.nodePadding = function(_) { - if (!arguments.length) return nodePadding; - nodePadding = +_; - return sankey; - }; - - sankey.nodes = function(_) { - if (!arguments.length) return nodes; - nodes = _; - return sankey; - }; - - sankey.links = function(_) { - if (!arguments.length) return links; - links = _; - return sankey; - }; - - sankey.size = function(_) { - if (!arguments.length) return size; - size = _; - return sankey; - }; - - sankey.layout = function(iterations) { - computeNodeLinks(); - computeNodeValues(); - computeNodeBreadths(); - computeNodeDepths(iterations); - computeLinkDepths(); - return sankey; - }; - - sankey.relayout = function() { - computeLinkDepths(); - return sankey; - }; - - sankey.link = function() { - var curvature = .5; - - function link(d) { - var x0 = d.source.x + d.source.dx, - x1 = d.target.x, - xi = d3Interpolate.interpolateNumber(x0, x1), - x2 = xi(curvature), - x3 = xi(1 - curvature), - y0 = d.source.y + d.sy + d.dy / 2, - y1 = d.target.y + d.ty + d.dy / 2; - return "M" + x0 + "," + y0 - + "C" + x2 + "," + y0 - + " " + x3 + "," + y1 - + " " + x1 + "," + y1; - } - - link.curvature = function(_) { - if (!arguments.length) return curvature; - curvature = +_; - return link; - }; - - return link; - }; - - // Populate the sourceLinks and targetLinks for each node. - // Also, if the source and target are not objects, assume they are indices. - function computeNodeLinks() { - nodes.forEach(function(node) { - node.sourceLinks = []; - node.targetLinks = []; - }); - links.forEach(function(link, i) { - var source = link.source, - target = link.target; - if (typeof source === "number") source = link.source = nodes[link.source]; - if (typeof target === "number") target = link.target = nodes[link.target]; - link.originalIndex = i; - source.sourceLinks.push(link); - target.targetLinks.push(link); - }); - } - - // Compute the value (size) of each node by summing the associated links. - function computeNodeValues() { - nodes.forEach(function(node) { - node.value = Math.max( - d3Array.sum(node.sourceLinks, value), - d3Array.sum(node.targetLinks, value) - ); - }); - } - - // Iteratively assign the breadth (x-position) for each node. - // Nodes are assigned the maximum breadth of incoming neighbors plus one; - // nodes with no incoming links are assigned breadth zero, while - // nodes with no outgoing links are assigned the maximum breadth. - function computeNodeBreadths() { - var remainingNodes = nodes, - nextNodes, - x = 0; - - while (remainingNodes.length) { - nextNodes = []; - remainingNodes.forEach(function(node) { - node.x = x; - node.dx = nodeWidth; - node.sourceLinks.forEach(function(link) { - if (nextNodes.indexOf(link.target) < 0) { - nextNodes.push(link.target); - } - }); - }); - remainingNodes = nextNodes; - ++x; - } - - // - moveSinksRight(x); - scaleNodeBreadths((size[0] - nodeWidth) / (x - 1)); - } - - // function moveSourcesRight() { - // nodes.forEach(function(node) { - // if (!node.targetLinks.length) { - // node.x = min(node.sourceLinks, function(d) { return d.target.x; }) - 1; - // } - // }); - // } - - function moveSinksRight(x) { - nodes.forEach(function(node) { - if (!node.sourceLinks.length) { - node.x = x - 1; - } - }); - } - - function scaleNodeBreadths(kx) { - nodes.forEach(function(node) { - node.x *= kx; - }); - } - - function computeNodeDepths(iterations) { - var nodesByBreadth = d3Collection.nest() - .key(function(d) { return d.x; }) - .sortKeys(d3Array.ascending) - .entries(nodes) - .map(function(d) { return d.values; }); - - // - initializeNodeDepth(); - resolveCollisions(); - for (var alpha = 1; iterations > 0; --iterations) { - relaxRightToLeft(alpha *= .99); - resolveCollisions(); - relaxLeftToRight(alpha); - resolveCollisions(); - } - - function initializeNodeDepth() { - var ky = d3Array.min(nodesByBreadth, function(nodes) { - return (size[1] - (nodes.length - 1) * nodePadding) / d3Array.sum(nodes, value); - }); - - nodesByBreadth.forEach(function(nodes) { - nodes.forEach(function(node, i) { - node.y = i; - node.dy = node.value * ky; - }); - }); - - links.forEach(function(link) { - link.dy = link.value * ky; - }); - } - - function relaxLeftToRight(alpha) { - nodesByBreadth.forEach(function(nodes) { - nodes.forEach(function(node) { - if (node.targetLinks.length) { - var y = d3Array.sum(node.targetLinks, weightedSource) / d3Array.sum(node.targetLinks, value); - node.y += (y - center(node)) * alpha; - } - }); - }); - - function weightedSource(link) { - return center(link.source) * link.value; - } - } - - function relaxRightToLeft(alpha) { - nodesByBreadth.slice().reverse().forEach(function(nodes) { - nodes.forEach(function(node) { - if (node.sourceLinks.length) { - var y = d3Array.sum(node.sourceLinks, weightedTarget) / d3Array.sum(node.sourceLinks, value); - node.y += (y - center(node)) * alpha; - } - }); - }); - - function weightedTarget(link) { - return center(link.target) * link.value; - } - } - - function resolveCollisions() { - nodesByBreadth.forEach(function(nodes) { - var node, - dy, - y0 = 0, - n = nodes.length, - i; - - // Push any overlapping nodes down. - nodes.sort(ascendingDepth); - for (i = 0; i < n; ++i) { - node = nodes[i]; - dy = y0 - node.y; - if (dy > 0) node.y += dy; - y0 = node.y + node.dy + nodePadding; - } - - // If the bottommost node goes outside the bounds, push it back up. - dy = y0 - nodePadding - size[1]; - if (dy > 0) { - y0 = node.y -= dy; - - // Push any overlapping nodes back up. - for (i = n - 2; i >= 0; --i) { - node = nodes[i]; - dy = node.y + node.dy + nodePadding - y0; - if (dy > 0) node.y -= dy; - y0 = node.y; - } - } - }); - } - - function ascendingDepth(a, b) { - return a.y - b.y; - } - } - - function computeLinkDepths() { - nodes.forEach(function(node) { - node.sourceLinks.sort(ascendingTargetDepth); - node.targetLinks.sort(ascendingSourceDepth); - }); - nodes.forEach(function(node) { - var sy = 0, ty = 0; - node.sourceLinks.forEach(function(link) { - link.sy = sy; - sy += link.dy; - }); - node.targetLinks.forEach(function(link) { - link.ty = ty; - ty += link.dy; - }); - }); - - function ascendingSourceDepth(a, b) { - return (a.source.y - b.source.y) || (a.originalIndex - b.originalIndex); - } - - function ascendingTargetDepth(a, b) { - return (a.target.y - b.target.y) || (a.originalIndex - b.originalIndex); - } - } - - function center(node) { - return node.y + node.dy / 2; - } - - function value(link) { - return link.value; - } - - return sankey; -}; - -exports.sankey = sankey; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{"d3-array":106,"d3-collection":107,"d3-interpolate":111}],33:[function(require,module,exports){ +},{"matrix-camera-controller":432,"orbit-camera-controller":454,"turntable-camera-controller":518}],34:[function(require,module,exports){ 'use strict' var weakMap = typeof WeakMap === 'undefined' ? require('weak-map') : WeakMap @@ -1286,7 +1011,7 @@ function createABigTriangle(gl) { module.exports = createABigTriangle -},{"gl-buffer":148,"gl-vao":262,"weak-map":546}],34:[function(require,module,exports){ +},{"gl-buffer":141,"gl-vao":255,"weak-map":539}],35:[function(require,module,exports){ var padLeft = require('pad-left') module.exports = addLineNumbers @@ -1304,7 +1029,7 @@ function addLineNumbers (string, start, delim) { }).join('\n') } -},{"pad-left":462}],35:[function(require,module,exports){ +},{"pad-left":455}],36:[function(require,module,exports){ 'use strict' module.exports = affineHull @@ -1356,7 +1081,7 @@ function affineHull(points) { } return index } -},{"robust-orientation":496}],36:[function(require,module,exports){ +},{"robust-orientation":489}],37:[function(require,module,exports){ 'use strict' module.exports = alphaComplex @@ -1373,7 +1098,7 @@ function alphaComplex(alpha, points) { return circumradius(simplex) * alpha < 1 }) } -},{"circumradius":79,"delaunay-triangulate":115}],37:[function(require,module,exports){ +},{"circumradius":80,"delaunay-triangulate":108}],38:[function(require,module,exports){ module.exports = alphaShape var ac = require('alpha-complex') @@ -1382,7 +1107,7 @@ var bnd = require('simplicial-complex-boundary') function alphaShape(alpha, points) { return bnd(ac(alpha, points)) } -},{"alpha-complex":36,"simplicial-complex-boundary":504}],38:[function(require,module,exports){ +},{"alpha-complex":37,"simplicial-complex-boundary":497}],39:[function(require,module,exports){ 'use strict'; var arraytools = function () { @@ -1571,7 +1296,7 @@ var arraytools = function () { module.exports = arraytools(); -},{}],39:[function(require,module,exports){ +},{}],40:[function(require,module,exports){ (function (global){ 'use strict'; @@ -2065,12 +1790,12 @@ var objectKeys = Object.keys || function (obj) { }; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"util/":536}],40:[function(require,module,exports){ +},{"util/":529}],41:[function(require,module,exports){ module.exports = function _atob(str) { return atob(str) } -},{}],41:[function(require,module,exports){ +},{}],42:[function(require,module,exports){ 'use strict' module.exports = barycentric @@ -2118,7 +1843,7 @@ function barycentric(simplex, point) { } return y } -},{"robust-linear-solve":495}],42:[function(require,module,exports){ +},{"robust-linear-solve":488}],43:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2131,7 +1856,7 @@ function add(a, b) { a[1].mul(b[1])) } -},{"./lib/rationalize":52}],43:[function(require,module,exports){ +},{"./lib/rationalize":53}],44:[function(require,module,exports){ 'use strict' module.exports = cmp @@ -2140,7 +1865,7 @@ function cmp(a, b) { return a[0].mul(b[1]).cmp(b[0].mul(a[1])) } -},{}],44:[function(require,module,exports){ +},{}],45:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2151,7 +1876,7 @@ function div(a, b) { return rationalize(a[0].mul(b[1]), a[1].mul(b[0])) } -},{"./lib/rationalize":52}],45:[function(require,module,exports){ +},{"./lib/rationalize":53}],46:[function(require,module,exports){ 'use strict' var isRat = require('./is-rat') @@ -2213,7 +1938,7 @@ function makeRational(numer, denom) { return rationalize(a, b) } -},{"./div":44,"./is-rat":46,"./lib/is-bn":50,"./lib/num-to-bn":51,"./lib/rationalize":52,"./lib/str-to-bn":53}],46:[function(require,module,exports){ +},{"./div":45,"./is-rat":47,"./lib/is-bn":51,"./lib/num-to-bn":52,"./lib/rationalize":53,"./lib/str-to-bn":54}],47:[function(require,module,exports){ 'use strict' var isBN = require('./lib/is-bn') @@ -2224,7 +1949,7 @@ function isRat(x) { return Array.isArray(x) && x.length === 2 && isBN(x[0]) && isBN(x[1]) } -},{"./lib/is-bn":50}],47:[function(require,module,exports){ +},{"./lib/is-bn":51}],48:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2235,7 +1960,7 @@ function sign (x) { return x.cmp(new BN(0)) } -},{"bn.js":60}],48:[function(require,module,exports){ +},{"bn.js":61}],49:[function(require,module,exports){ 'use strict' var sign = require('./bn-sign') @@ -2260,7 +1985,7 @@ function bn2num(b) { return sign(b) * out } -},{"./bn-sign":47}],49:[function(require,module,exports){ +},{"./bn-sign":48}],50:[function(require,module,exports){ 'use strict' var db = require('double-bits') @@ -2281,7 +2006,7 @@ function ctzNumber(x) { return h + 32 } -},{"bit-twiddle":59,"double-bits":116}],50:[function(require,module,exports){ +},{"bit-twiddle":60,"double-bits":109}],51:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2294,7 +2019,7 @@ function isBN(x) { return x && typeof x === 'object' && Boolean(x.words) } -},{"bn.js":60}],51:[function(require,module,exports){ +},{"bn.js":61}],52:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2311,7 +2036,7 @@ function num2bn(x) { } } -},{"bn.js":60,"double-bits":116}],52:[function(require,module,exports){ +},{"bn.js":61,"double-bits":109}],53:[function(require,module,exports){ 'use strict' var num2bn = require('./num-to-bn') @@ -2339,7 +2064,7 @@ function rationalize(numer, denom) { return [ numer, denom ] } -},{"./bn-sign":47,"./num-to-bn":51}],53:[function(require,module,exports){ +},{"./bn-sign":48,"./num-to-bn":52}],54:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2350,7 +2075,7 @@ function str2BN(x) { return new BN(x) } -},{"bn.js":60}],54:[function(require,module,exports){ +},{"bn.js":61}],55:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2361,7 +2086,7 @@ function mul(a, b) { return rationalize(a[0].mul(b[0]), a[1].mul(b[1])) } -},{"./lib/rationalize":52}],55:[function(require,module,exports){ +},{"./lib/rationalize":53}],56:[function(require,module,exports){ 'use strict' var bnsign = require('./lib/bn-sign') @@ -2372,7 +2097,7 @@ function sign(x) { return bnsign(x[0]) * bnsign(x[1]) } -},{"./lib/bn-sign":47}],56:[function(require,module,exports){ +},{"./lib/bn-sign":48}],57:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2383,7 +2108,7 @@ function sub(a, b) { return rationalize(a[0].mul(b[1]).sub(a[1].mul(b[0])), a[1].mul(b[1])) } -},{"./lib/rationalize":52}],57:[function(require,module,exports){ +},{"./lib/rationalize":53}],58:[function(require,module,exports){ 'use strict' var bn2num = require('./lib/bn-to-num') @@ -2421,7 +2146,7 @@ function roundRat (f) { } } -},{"./lib/bn-to-num":48,"./lib/ctz":49}],58:[function(require,module,exports){ +},{"./lib/bn-to-num":49,"./lib/ctz":50}],59:[function(require,module,exports){ "use strict" function compileSearch(funcName, predicate, reversed, extraArgs, useNdarray, earlyOut) { @@ -2483,7 +2208,7 @@ module.exports = { eq: compileBoundsSearch("-", true, "EQ", true) } -},{}],59:[function(require,module,exports){ +},{}],60:[function(require,module,exports){ /** * Bit twiddling hacks for JavaScript. * @@ -2689,7 +2414,7 @@ exports.nextCombination = function(v) { } -},{}],60:[function(require,module,exports){ +},{}],61:[function(require,module,exports){ (function (module, exports) { 'use strict'; @@ -6118,7 +5843,7 @@ exports.nextCombination = function(v) { }; })(typeof module === 'undefined' || module, this); -},{}],61:[function(require,module,exports){ +},{}],62:[function(require,module,exports){ 'use strict' module.exports = boundary @@ -6154,7 +5879,7 @@ function boundary (cells) { return result } -},{}],62:[function(require,module,exports){ +},{}],63:[function(require,module,exports){ 'use strict' module.exports = boxIntersectWrapper @@ -6293,7 +6018,7 @@ function boxIntersectWrapper(arg0, arg1, arg2) { throw new Error('box-intersect: Invalid arguments') } } -},{"./lib/intersect":64,"./lib/sweep":68,"typedarray-pool":528}],63:[function(require,module,exports){ +},{"./lib/intersect":65,"./lib/sweep":69,"typedarray-pool":521}],64:[function(require,module,exports){ 'use strict' var DIMENSION = 'd' @@ -6438,7 +6163,7 @@ function bruteForcePlanner(full) { exports.partial = bruteForcePlanner(false) exports.full = bruteForcePlanner(true) -},{}],64:[function(require,module,exports){ +},{}],65:[function(require,module,exports){ 'use strict' module.exports = boxIntersectIter @@ -6933,7 +6658,7 @@ function boxIntersectIter( } } } -},{"./brute":63,"./median":65,"./partition":66,"./sweep":68,"bit-twiddle":59,"typedarray-pool":528}],65:[function(require,module,exports){ +},{"./brute":64,"./median":66,"./partition":67,"./sweep":69,"bit-twiddle":60,"typedarray-pool":521}],66:[function(require,module,exports){ 'use strict' module.exports = findMedian @@ -7076,7 +6801,7 @@ function findMedian(d, axis, start, end, boxes, ids) { start, mid, boxes, ids, boxes[elemSize*mid+axis]) } -},{"./partition":66}],66:[function(require,module,exports){ +},{"./partition":67}],67:[function(require,module,exports){ 'use strict' module.exports = genPartition @@ -7097,7 +6822,7 @@ function genPartition(predicate, args) { .replace('$', predicate)) return Function.apply(void 0, fargs) } -},{}],67:[function(require,module,exports){ +},{}],68:[function(require,module,exports){ 'use strict'; //This code is extracted from ndarray-sort @@ -7334,7 +7059,7 @@ function quickSort(left, right, data) { quickSort(less, great, data); } } -},{}],68:[function(require,module,exports){ +},{}],69:[function(require,module,exports){ 'use strict' module.exports = { @@ -7769,7 +7494,7 @@ red_loop: } } } -},{"./sort":67,"bit-twiddle":59,"typedarray-pool":528}],69:[function(require,module,exports){ +},{"./sort":68,"bit-twiddle":60,"typedarray-pool":521}],70:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -9477,7 +9202,7 @@ function numberIsNaN (obj) { return obj !== obj // eslint-disable-line no-self-compare } -},{"base64-js":70,"ieee754":279}],70:[function(require,module,exports){ +},{"base64-js":71,"ieee754":272}],71:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -9593,7 +9318,7 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],71:[function(require,module,exports){ +},{}],72:[function(require,module,exports){ 'use strict' var monotoneTriangulate = require('./lib/monotone') @@ -9677,7 +9402,7 @@ function cdt2d(points, edges, options) { } } -},{"./lib/delaunay":72,"./lib/filter":73,"./lib/monotone":74,"./lib/triangulation":75}],72:[function(require,module,exports){ +},{"./lib/delaunay":73,"./lib/filter":74,"./lib/monotone":75,"./lib/triangulation":76}],73:[function(require,module,exports){ 'use strict' var inCircle = require('robust-in-sphere')[4] @@ -9794,7 +9519,7 @@ function delaunayRefine(points, triangulation) { } } -},{"binary-search-bounds":76,"robust-in-sphere":494}],73:[function(require,module,exports){ +},{"binary-search-bounds":77,"robust-in-sphere":487}],74:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9976,7 +9701,7 @@ function classifyFaces(triangulation, target, infinity) { return result } -},{"binary-search-bounds":76}],74:[function(require,module,exports){ +},{"binary-search-bounds":77}],75:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -10165,7 +9890,7 @@ function monotoneTriangulate(points, edges) { return cells } -},{"binary-search-bounds":76,"robust-orientation":496}],75:[function(require,module,exports){ +},{"binary-search-bounds":77,"robust-orientation":489}],76:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -10271,7 +9996,7 @@ function createTriangulation(numVerts, edges) { return new Triangulation(stars, edges) } -},{"binary-search-bounds":76}],76:[function(require,module,exports){ +},{"binary-search-bounds":77}],77:[function(require,module,exports){ "use strict" function compileSearch(funcName, predicate, reversed, extraArgs, earlyOut) { @@ -10325,7 +10050,7 @@ module.exports = { eq: compileBoundsSearch("-", true, "EQ", true) } -},{}],77:[function(require,module,exports){ +},{}],78:[function(require,module,exports){ 'use strict' module.exports = orientation @@ -10344,7 +10069,7 @@ function orientation(s) { return p } -},{}],78:[function(require,module,exports){ +},{}],79:[function(require,module,exports){ "use strict" var dup = require("dup") @@ -10413,7 +10138,7 @@ function circumcenter(points) { circumcenter.barycenetric = barycentricCircumcenter module.exports = circumcenter -},{"dup":117,"robust-linear-solve":495}],79:[function(require,module,exports){ +},{"dup":110,"robust-linear-solve":488}],80:[function(require,module,exports){ module.exports = circumradius var circumcenter = require('circumcenter') @@ -10429,7 +10154,7 @@ function circumradius(points) { } return Math.sqrt(avgDist / points.length) } -},{"circumcenter":78}],80:[function(require,module,exports){ +},{"circumcenter":79}],81:[function(require,module,exports){ module.exports = clamp function clamp(value, min, max) { @@ -10438,7 +10163,7 @@ function clamp(value, min, max) { : (value < max ? max : value > min ? min : value) } -},{}],81:[function(require,module,exports){ +},{}],82:[function(require,module,exports){ 'use strict' module.exports = cleanPSLG @@ -10821,7 +10546,7 @@ function cleanPSLG (points, edges, colors) { return modified } -},{"./lib/rat-seg-intersect":82,"big-rat":45,"big-rat/cmp":43,"big-rat/to-float":57,"box-intersect":62,"nextafter":457,"rat-vec":483,"robust-segment-intersect":499,"union-find":529}],82:[function(require,module,exports){ +},{"./lib/rat-seg-intersect":83,"big-rat":46,"big-rat/cmp":44,"big-rat/to-float":58,"box-intersect":63,"nextafter":450,"rat-vec":476,"robust-segment-intersect":492,"union-find":522}],83:[function(require,module,exports){ 'use strict' module.exports = solveIntersection @@ -10865,7 +10590,7 @@ function solveIntersection (a, b, c, d) { return r } -},{"big-rat/div":44,"big-rat/mul":54,"big-rat/sign":55,"big-rat/sub":56,"rat-vec/add":482,"rat-vec/muls":484,"rat-vec/sub":485}],83:[function(require,module,exports){ +},{"big-rat/div":45,"big-rat/mul":55,"big-rat/sign":56,"big-rat/sub":57,"rat-vec/add":475,"rat-vec/muls":477,"rat-vec/sub":478}],84:[function(require,module,exports){ (function (Buffer){ var clone = (function() { 'use strict'; @@ -11029,7 +10754,7 @@ if (typeof module === 'object' && module.exports) { } }).call(this,require("buffer").Buffer) -},{"buffer":69}],84:[function(require,module,exports){ +},{"buffer":70}],85:[function(require,module,exports){ /** @module color-number */ 'use strict' @@ -11063,7 +10788,7 @@ function toNumber (rgba, normalized) { return n } -},{"clamp":80}],85:[function(require,module,exports){ +},{"clamp":81}],86:[function(require,module,exports){ module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], @@ -11214,7 +10939,7 @@ module.exports = { "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; -},{}],86:[function(require,module,exports){ +},{}],87:[function(require,module,exports){ /** * @module color-parse */ @@ -11391,7 +11116,7 @@ function parse (cstr) { }; } -},{"color-name":85,"is-plain-obj":286}],87:[function(require,module,exports){ +},{"color-name":86,"is-plain-obj":279}],88:[function(require,module,exports){ /** @module color-rgba */ 'use strict' @@ -11430,7 +11155,7 @@ module.exports = function rgba (color, normalize) { } -},{"clamp":80,"color-parse":86,"color-space/hsl":88}],88:[function(require,module,exports){ +},{"clamp":81,"color-parse":87,"color-space/hsl":89}],89:[function(require,module,exports){ /** * @module color-space/hsl */ @@ -11539,7 +11264,7 @@ rgb.hsl = function(rgb) { return [h, s * 100, l * 100]; }; -},{"./rgb":89}],89:[function(require,module,exports){ +},{"./rgb":90}],90:[function(require,module,exports){ /** * RGB space. * @@ -11555,7 +11280,7 @@ module.exports = { alias: ['RGB'] }; -},{}],90:[function(require,module,exports){ +},{}],91:[function(require,module,exports){ module.exports={ "jet":[{"index":0,"rgb":[0,0,131]},{"index":0.125,"rgb":[0,60,170]},{"index":0.375,"rgb":[5,255,255]},{"index":0.625,"rgb":[255,255,0]},{"index":0.875,"rgb":[250,0,0]},{"index":1,"rgb":[128,0,0]}], @@ -11648,7 +11373,7 @@ module.exports={ "cubehelix": [{"index":0,"rgb":[0,0,0]},{"index":0.07,"rgb":[22,5,59]},{"index":0.13,"rgb":[60,4,105]},{"index":0.2,"rgb":[109,1,135]},{"index":0.27,"rgb":[161,0,147]},{"index":0.33,"rgb":[210,2,142]},{"index":0.4,"rgb":[251,11,123]},{"index":0.47,"rgb":[255,29,97]},{"index":0.53,"rgb":[255,54,69]},{"index":0.6,"rgb":[255,85,46]},{"index":0.67,"rgb":[255,120,34]},{"index":0.73,"rgb":[255,157,37]},{"index":0.8,"rgb":[241,191,57]},{"index":0.87,"rgb":[224,220,93]},{"index":0.93,"rgb":[218,241,142]},{"index":1,"rgb":[227,253,198]}] }; -},{}],91:[function(require,module,exports){ +},{}],92:[function(require,module,exports){ /* * Ben Postlethwaite * January 2013 @@ -11785,7 +11510,7 @@ function rgbaStr (rgba) { return 'rgba(' + rgba.join(',') + ')'; } -},{"./colorScales":90,"arraytools":38,"clone":83}],92:[function(require,module,exports){ +},{"./colorScales":91,"arraytools":39,"clone":84}],93:[function(require,module,exports){ "use strict" module.exports = compareAngle @@ -11871,7 +11596,7 @@ function compareAngle(a, b, c, d) { } } } -},{"robust-orientation":496,"robust-product":497,"robust-sum":501,"signum":503,"two-sum":527}],93:[function(require,module,exports){ +},{"robust-orientation":489,"robust-product":490,"robust-sum":494,"signum":496,"two-sum":520}],94:[function(require,module,exports){ module.exports = compareCells var min = Math.min @@ -11927,7 +11652,7 @@ function compareCells(a, b) { } } -},{}],94:[function(require,module,exports){ +},{}],95:[function(require,module,exports){ 'use strict' var compareCells = require('compare-cell') @@ -11939,7 +11664,7 @@ function compareOrientedCells(a, b) { return compareCells(a, b) || parity(a) - parity(b) } -},{"cell-orientation":77,"compare-cell":93}],95:[function(require,module,exports){ +},{"cell-orientation":78,"compare-cell":94}],96:[function(require,module,exports){ "use strict" var convexHull1d = require('./lib/ch1d') @@ -11965,7 +11690,7 @@ function convexHull(points) { } return convexHullnd(points, d) } -},{"./lib/ch1d":96,"./lib/ch2d":97,"./lib/chnd":98}],96:[function(require,module,exports){ +},{"./lib/ch1d":97,"./lib/ch2d":98,"./lib/chnd":99}],97:[function(require,module,exports){ "use strict" module.exports = convexHull1d @@ -11989,7 +11714,7 @@ function convexHull1d(points) { return [[lo]] } } -},{}],97:[function(require,module,exports){ +},{}],98:[function(require,module,exports){ 'use strict' module.exports = convexHull2D @@ -12012,7 +11737,7 @@ function convexHull2D(points) { return edges } -},{"monotone-convex-hull-2d":440}],98:[function(require,module,exports){ +},{"monotone-convex-hull-2d":433}],99:[function(require,module,exports){ 'use strict' module.exports = convexHullnD @@ -12073,7 +11798,7 @@ function convexHullnD(points, d) { return invPermute(nhull, ah) } } -},{"affine-hull":35,"incremental-convex-hull":280}],99:[function(require,module,exports){ +},{"affine-hull":36,"incremental-convex-hull":273}],100:[function(require,module,exports){ module.exports = { AFG: 'afghan', ALA: '\\b\\wland', @@ -12332,7 +12057,7 @@ module.exports = { ZWE: 'zimbabwe|^(?!.*northern).*rhodesia' } -},{}],100:[function(require,module,exports){ +},{}],101:[function(require,module,exports){ // (c) Dean McNamee , 2012. // // https://github.com/deanm/css-color-parser-js @@ -12535,7 +12260,7 @@ function parseCSSColor(css_str) { try { exports.parseCSSColor = parseCSSColor } catch(e) { } -},{}],101:[function(require,module,exports){ +},{}],102:[function(require,module,exports){ "use strict" function dcubicHermite(p0, v0, p1, v1, t, f) { @@ -12575,7 +12300,7 @@ function cubicHermite(p0, v0, p1, v1, t, f) { module.exports = cubicHermite module.exports.derivative = dcubicHermite -},{}],102:[function(require,module,exports){ +},{}],103:[function(require,module,exports){ "use strict" var createThunk = require("./lib/thunk.js") @@ -12686,7 +12411,7 @@ function compileCwise(user_args) { module.exports = compileCwise -},{"./lib/thunk.js":104}],103:[function(require,module,exports){ +},{"./lib/thunk.js":105}],104:[function(require,module,exports){ "use strict" var uniq = require("uniq") @@ -13042,7 +12767,7 @@ function generateCWiseOp(proc, typesig) { } module.exports = generateCWiseOp -},{"uniq":530}],104:[function(require,module,exports){ +},{"uniq":523}],105:[function(require,module,exports){ "use strict" // The function below is called when constructing a cwise function object, and does the following: @@ -13130,3438 +12855,377 @@ function createThunk(proc) { module.exports = createThunk -},{"./compile.js":103}],105:[function(require,module,exports){ +},{"./compile.js":104}],106:[function(require,module,exports){ module.exports = require("cwise-compiler") -},{"cwise-compiler":102}],106:[function(require,module,exports){ -// https://d3js.org/d3-array/ Version 1.1.1. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); -}(this, (function (exports) { 'use strict'; - -var ascending = function(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; -}; - -var bisector = function(compare) { - if (compare.length === 1) compare = ascendingComparator(compare); - return { - left: function(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (compare(a[mid], x) < 0) lo = mid + 1; - else hi = mid; - } - return lo; - }, - right: function(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (compare(a[mid], x) > 0) hi = mid; - else lo = mid + 1; - } - return lo; - } +},{"cwise-compiler":103}],107:[function(require,module,exports){ +!function() { + var d3 = { + version: "3.5.17" }; -}; - -function ascendingComparator(f) { - return function(d, x) { - return ascending(f(d), x); + var d3_arraySlice = [].slice, d3_array = function(list) { + return d3_arraySlice.call(list); }; -} - -var ascendingBisect = bisector(ascending); -var bisectRight = ascendingBisect.right; -var bisectLeft = ascendingBisect.left; - -var pairs = function(array, f) { - if (f == null) f = pair; - var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n); - while (i < n) pairs[i] = f(p, p = array[++i]); - return pairs; -}; - -function pair(a, b) { - return [a, b]; -} - -var cross = function(a, b, f) { - var na = a.length, nb = b.length, c = new Array(na * nb), ia, ib, ic, va; - if (f == null) f = pair; - for (ia = ic = 0; ia < na; ++ia) for (va = a[ia], ib = 0; ib < nb; ++ib, ++ic) c[ic] = f(va, b[ib]); - return c; -}; - -var descending = function(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; -}; - -var number = function(x) { - return x === null ? NaN : +x; -}; - -var variance = function(array, f) { - var n = array.length, - m = 0, - a, - d, - s = 0, - i = -1, - j = 0; - - if (f == null) { - while (++i < n) { - if (!isNaN(a = number(array[i]))) { - d = a - m; - m += d / ++j; - s += d * (a - m); - } - } + var d3_document = this.document; + function d3_documentElement(node) { + return node && (node.ownerDocument || node.document || node).documentElement; } - - else { - while (++i < n) { - if (!isNaN(a = number(f(array[i], i, array)))) { - d = a - m; - m += d / ++j; - s += d * (a - m); - } - } + function d3_window(node) { + return node && (node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView); } - - if (j > 1) return s / (j - 1); -}; - -var deviation = function(array, f) { - var v = variance(array, f); - return v ? Math.sqrt(v) : v; -}; - -var extent = function(array, f) { - var i = -1, - n = array.length, - a, - b, - c; - - if (f == null) { - while (++i < n) if ((b = array[i]) != null && b >= b) { a = c = b; break; } - while (++i < n) if ((b = array[i]) != null) { - if (a > b) a = b; - if (c < b) c = b; + if (d3_document) { + try { + d3_array(d3_document.documentElement.childNodes)[0].nodeType; + } catch (e) { + d3_array = function(list) { + var i = list.length, array = new Array(i); + while (i--) array[i] = list[i]; + return array; + }; } } - - else { - while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = c = b; break; } - while (++i < n) if ((b = f(array[i], i, array)) != null) { - if (a > b) a = b; - if (c < b) c = b; + if (!Date.now) Date.now = function() { + return +new Date(); + }; + if (d3_document) { + try { + d3_document.createElement("DIV").style.setProperty("opacity", 0, ""); + } catch (error) { + var d3_element_prototype = this.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = this.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty; + d3_element_prototype.setAttribute = function(name, value) { + d3_element_setAttribute.call(this, name, value + ""); + }; + d3_element_prototype.setAttributeNS = function(space, local, value) { + d3_element_setAttributeNS.call(this, space, local, value + ""); + }; + d3_style_prototype.setProperty = function(name, value, priority) { + d3_style_setProperty.call(this, name, value + "", priority); + }; } } - - return [a, c]; -}; - -var array = Array.prototype; - -var slice = array.slice; -var map = array.map; - -var constant = function(x) { - return function() { - return x; - }; -}; - -var identity = function(x) { - return x; -}; - -var range = function(start, stop, step) { - start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; - - var i = -1, - n = Math.max(0, Math.ceil((stop - start) / step)) | 0, - range = new Array(n); - - while (++i < n) { - range[i] = start + i * step; + d3.ascending = d3_ascending; + function d3_ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; } - - return range; -}; - -var e10 = Math.sqrt(50); -var e5 = Math.sqrt(10); -var e2 = Math.sqrt(2); - -var ticks = function(start, stop, count) { - var step = tickStep(start, stop, count); - return range( - Math.ceil(start / step) * step, - Math.floor(stop / step) * step + step / 2, // inclusive - step - ); -}; - -function tickStep(start, stop, count) { - var step0 = Math.abs(stop - start) / Math.max(0, count), - step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), - error = step0 / step1; - if (error >= e10) step1 *= 10; - else if (error >= e5) step1 *= 5; - else if (error >= e2) step1 *= 2; - return stop < start ? -step1 : step1; -} - -var sturges = function(values) { - return Math.ceil(Math.log(values.length) / Math.LN2) + 1; -}; - -var histogram = function() { - var value = identity, - domain = extent, - threshold = sturges; - - function histogram(data) { - var i, - n = data.length, - x, - values = new Array(n); - - for (i = 0; i < n; ++i) { - values[i] = value(data[i], i, data); - } - - var xz = domain(values), - x0 = xz[0], - x1 = xz[1], - tz = threshold(values, x0, x1); - - // Convert number of thresholds into uniform thresholds. - if (!Array.isArray(tz)) tz = ticks(x0, x1, tz); - - // Remove any thresholds outside the domain. - var m = tz.length; - while (tz[0] <= x0) tz.shift(), --m; - while (tz[m - 1] >= x1) tz.pop(), --m; - - var bins = new Array(m + 1), - bin; - - // Initialize bins. - for (i = 0; i <= m; ++i) { - bin = bins[i] = []; - bin.x0 = i > 0 ? tz[i - 1] : x0; - bin.x1 = i < m ? tz[i] : x1; - } - - // Assign data to bins by value, ignoring any outside the domain. - for (i = 0; i < n; ++i) { - x = values[i]; - if (x0 <= x && x <= x1) { - bins[bisectRight(tz, x, 0, m)].push(data[i]); + d3.descending = function(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; + }; + d3.min = function(array, f) { + var i = -1, n = array.length, a, b; + if (arguments.length === 1) { + while (++i < n) if ((b = array[i]) != null && b >= b) { + a = b; + break; + } + while (++i < n) if ((b = array[i]) != null && a > b) a = b; + } else { + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { + a = b; + break; } + while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b; } - - return bins; - } - - histogram.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : constant(_), histogram) : value; - }; - - histogram.domain = function(_) { - return arguments.length ? (domain = typeof _ === "function" ? _ : constant([_[0], _[1]]), histogram) : domain; - }; - - histogram.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold; + return a; }; - - return histogram; -}; - -var quantile = function(array, p, f) { - if (f == null) f = number; - if (!(n = array.length)) return; - if ((p = +p) <= 0 || n < 2) return +f(array[0], 0, array); - if (p >= 1) return +f(array[n - 1], n - 1, array); - var n, - h = (n - 1) * p, - i = Math.floor(h), - a = +f(array[i], i, array), - b = +f(array[i + 1], i + 1, array); - return a + (b - a) * (h - i); -}; - -var freedmanDiaconis = function(values, min, max) { - values = map.call(values, number).sort(ascending); - return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(values.length, -1 / 3))); -}; - -var scott = function(values, min, max) { - return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(values.length, -1 / 3))); -}; - -var max = function(array, f) { - var i = -1, - n = array.length, - a, - b; - - if (f == null) { - while (++i < n) if ((b = array[i]) != null && b >= b) { a = b; break; } - while (++i < n) if ((b = array[i]) != null && b > a) a = b; - } - - else { - while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = b; break; } - while (++i < n) if ((b = f(array[i], i, array)) != null && b > a) a = b; - } - - return a; -}; - -var mean = function(array, f) { - var s = 0, - n = array.length, - a, - i = -1, - j = n; - - if (f == null) { - while (++i < n) if (!isNaN(a = number(array[i]))) s += a; else --j; - } - - else { - while (++i < n) if (!isNaN(a = number(f(array[i], i, array)))) s += a; else --j; - } - - if (j) return s / j; -}; - -var median = function(array, f) { - var numbers = [], - n = array.length, - a, - i = -1; - - if (f == null) { - while (++i < n) if (!isNaN(a = number(array[i]))) numbers.push(a); - } - - else { - while (++i < n) if (!isNaN(a = number(f(array[i], i, array)))) numbers.push(a); - } - - return quantile(numbers.sort(ascending), 0.5); -}; - -var merge = function(arrays) { - var n = arrays.length, - m, - i = -1, - j = 0, - merged, - array; - - while (++i < n) j += arrays[i].length; - merged = new Array(j); - - while (--n >= 0) { - array = arrays[n]; - m = array.length; - while (--m >= 0) { - merged[--j] = array[m]; - } - } - - return merged; -}; - -var min = function(array, f) { - var i = -1, - n = array.length, - a, - b; - - if (f == null) { - while (++i < n) if ((b = array[i]) != null && b >= b) { a = b; break; } - while (++i < n) if ((b = array[i]) != null && a > b) a = b; - } - - else { - while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = b; break; } - while (++i < n) if ((b = f(array[i], i, array)) != null && a > b) a = b; - } - - return a; -}; - -var permute = function(array, indexes) { - var i = indexes.length, permutes = new Array(i); - while (i--) permutes[i] = array[indexes[i]]; - return permutes; -}; - -var scan = function(array, compare) { - if (!(n = array.length)) return; - var i = 0, - n, - j = 0, - xi, - xj = array[j]; - - if (!compare) compare = ascending; - - while (++i < n) if (compare(xi = array[i], xj) < 0 || compare(xj, xj) !== 0) xj = xi, j = i; - - if (compare(xj, xj) === 0) return j; -}; - -var shuffle = function(array, i0, i1) { - var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0), - t, - i; - - while (m) { - i = Math.random() * m-- | 0; - t = array[m + i0]; - array[m + i0] = array[i + i0]; - array[i + i0] = t; - } - - return array; -}; - -var sum = function(array, f) { - var s = 0, - n = array.length, - a, - i = -1; - - if (f == null) { - while (++i < n) if (a = +array[i]) s += a; // Note: zero and null are equivalent. - } - - else { - while (++i < n) if (a = +f(array[i], i, array)) s += a; - } - - return s; -}; - -var transpose = function(matrix) { - if (!(n = matrix.length)) return []; - for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) { - for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { - row[j] = matrix[j][i]; - } - } - return transpose; -}; - -function length(d) { - return d.length; -} - -var zip = function() { - return transpose(arguments); -}; - -exports.bisect = bisectRight; -exports.bisectRight = bisectRight; -exports.bisectLeft = bisectLeft; -exports.ascending = ascending; -exports.bisector = bisector; -exports.cross = cross; -exports.descending = descending; -exports.deviation = deviation; -exports.extent = extent; -exports.histogram = histogram; -exports.thresholdFreedmanDiaconis = freedmanDiaconis; -exports.thresholdScott = scott; -exports.thresholdSturges = sturges; -exports.max = max; -exports.mean = mean; -exports.median = median; -exports.merge = merge; -exports.min = min; -exports.pairs = pairs; -exports.permute = permute; -exports.quantile = quantile; -exports.range = range; -exports.scan = scan; -exports.shuffle = shuffle; -exports.sum = sum; -exports.ticks = ticks; -exports.tickStep = tickStep; -exports.transpose = transpose; -exports.variance = variance; -exports.zip = zip; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{}],107:[function(require,module,exports){ -// https://d3js.org/d3-collection/ Version 1.0.3. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); -}(this, (function (exports) { 'use strict'; - -var prefix = "$"; - -function Map() {} - -Map.prototype = map.prototype = { - constructor: Map, - has: function(key) { - return (prefix + key) in this; - }, - get: function(key) { - return this[prefix + key]; - }, - set: function(key, value) { - this[prefix + key] = value; - return this; - }, - remove: function(key) { - var property = prefix + key; - return property in this && delete this[property]; - }, - clear: function() { - for (var property in this) if (property[0] === prefix) delete this[property]; - }, - keys: function() { - var keys = []; - for (var property in this) if (property[0] === prefix) keys.push(property.slice(1)); - return keys; - }, - values: function() { - var values = []; - for (var property in this) if (property[0] === prefix) values.push(this[property]); - return values; - }, - entries: function() { - var entries = []; - for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]}); - return entries; - }, - size: function() { - var size = 0; - for (var property in this) if (property[0] === prefix) ++size; - return size; - }, - empty: function() { - for (var property in this) if (property[0] === prefix) return false; - return true; - }, - each: function(f) { - for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this); - } -}; - -function map(object, f) { - var map = new Map; - - // Copy constructor. - if (object instanceof Map) object.each(function(value, key) { map.set(key, value); }); - - // Index array by numeric index or specified key function. - else if (Array.isArray(object)) { - var i = -1, - n = object.length, - o; - - if (f == null) while (++i < n) map.set(i, object[i]); - else while (++i < n) map.set(f(o = object[i], i, object), o); - } - - // Convert object to map. - else if (object) for (var key in object) map.set(key, object[key]); - - return map; -} - -var nest = function() { - var keys = [], - sortKeys = [], - sortValues, - rollup, - nest; - - function apply(array, depth, createResult, setResult) { - if (depth >= keys.length) return rollup != null - ? rollup(array) : (sortValues != null - ? array.sort(sortValues) - : array); - - var i = -1, - n = array.length, - key = keys[depth++], - keyValue, - value, - valuesByKey = map(), - values, - result = createResult(); - - while (++i < n) { - if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) { - values.push(value); - } else { - valuesByKey.set(keyValue, [value]); + d3.max = function(array, f) { + var i = -1, n = array.length, a, b; + if (arguments.length === 1) { + while (++i < n) if ((b = array[i]) != null && b >= b) { + a = b; + break; + } + while (++i < n) if ((b = array[i]) != null && b > a) a = b; + } else { + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { + a = b; + break; } + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b; } - - valuesByKey.each(function(values, key) { - setResult(result, key, apply(values, depth, createResult, setResult)); - }); - - return result; - } - - function entries(map$$1, depth) { - if (++depth > keys.length) return map$$1; - var array, sortKey = sortKeys[depth - 1]; - if (rollup != null && depth >= keys.length) array = map$$1.entries(); - else array = [], map$$1.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); }); - return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array; - } - - return nest = { - object: function(array) { return apply(array, 0, createObject, setObject); }, - map: function(array) { return apply(array, 0, createMap, setMap); }, - entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); }, - key: function(d) { keys.push(d); return nest; }, - sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; }, - sortValues: function(order) { sortValues = order; return nest; }, - rollup: function(f) { rollup = f; return nest; } + return a; }; -}; - -function createObject() { - return {}; -} - -function setObject(object, key, value) { - object[key] = value; -} - -function createMap() { - return map(); -} - -function setMap(map$$1, key, value) { - map$$1.set(key, value); -} - -function Set() {} - -var proto = map.prototype; - -Set.prototype = set.prototype = { - constructor: Set, - has: proto.has, - add: function(value) { - value += ""; - this[prefix + value] = value; - return this; - }, - remove: proto.remove, - clear: proto.clear, - values: proto.keys, - size: proto.size, - empty: proto.empty, - each: proto.each -}; - -function set(object, f) { - var set = new Set; - - // Copy constructor. - if (object instanceof Set) object.each(function(value) { set.add(value); }); - - // Otherwise, assume it’s an array. - else if (object) { - var i = -1, n = object.length; - if (f == null) while (++i < n) set.add(object[i]); - else while (++i < n) set.add(f(object[i], i, object)); - } - - return set; -} - -var keys = function(map) { - var keys = []; - for (var key in map) keys.push(key); - return keys; -}; - -var values = function(map) { - var values = []; - for (var key in map) values.push(map[key]); - return values; -}; - -var entries = function(map) { - var entries = []; - for (var key in map) entries.push({key: key, value: map[key]}); - return entries; -}; - -exports.nest = nest; -exports.set = set; -exports.map = map; -exports.keys = keys; -exports.values = values; -exports.entries = entries; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{}],108:[function(require,module,exports){ -// https://d3js.org/d3-color/ Version 1.0.3. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); -}(this, (function (exports) { 'use strict'; - -var define = function(constructor, factory, prototype) { - constructor.prototype = factory.prototype = prototype; - prototype.constructor = constructor; -}; - -function extend(parent, definition) { - var prototype = Object.create(parent.prototype); - for (var key in definition) prototype[key] = definition[key]; - return prototype; -} - -function Color() {} - -var darker = 0.7; -var brighter = 1 / darker; - -var reI = "\\s*([+-]?\\d+)\\s*"; -var reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*"; -var reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*"; -var reHex3 = /^#([0-9a-f]{3})$/; -var reHex6 = /^#([0-9a-f]{6})$/; -var reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"); -var reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"); -var reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"); -var reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"); -var reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"); -var reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); - -var named = { - aliceblue: 0xf0f8ff, - antiquewhite: 0xfaebd7, - aqua: 0x00ffff, - aquamarine: 0x7fffd4, - azure: 0xf0ffff, - beige: 0xf5f5dc, - bisque: 0xffe4c4, - black: 0x000000, - blanchedalmond: 0xffebcd, - blue: 0x0000ff, - blueviolet: 0x8a2be2, - brown: 0xa52a2a, - burlywood: 0xdeb887, - cadetblue: 0x5f9ea0, - chartreuse: 0x7fff00, - chocolate: 0xd2691e, - coral: 0xff7f50, - cornflowerblue: 0x6495ed, - cornsilk: 0xfff8dc, - crimson: 0xdc143c, - cyan: 0x00ffff, - darkblue: 0x00008b, - darkcyan: 0x008b8b, - darkgoldenrod: 0xb8860b, - darkgray: 0xa9a9a9, - darkgreen: 0x006400, - darkgrey: 0xa9a9a9, - darkkhaki: 0xbdb76b, - darkmagenta: 0x8b008b, - darkolivegreen: 0x556b2f, - darkorange: 0xff8c00, - darkorchid: 0x9932cc, - darkred: 0x8b0000, - darksalmon: 0xe9967a, - darkseagreen: 0x8fbc8f, - darkslateblue: 0x483d8b, - darkslategray: 0x2f4f4f, - darkslategrey: 0x2f4f4f, - darkturquoise: 0x00ced1, - darkviolet: 0x9400d3, - deeppink: 0xff1493, - deepskyblue: 0x00bfff, - dimgray: 0x696969, - dimgrey: 0x696969, - dodgerblue: 0x1e90ff, - firebrick: 0xb22222, - floralwhite: 0xfffaf0, - forestgreen: 0x228b22, - fuchsia: 0xff00ff, - gainsboro: 0xdcdcdc, - ghostwhite: 0xf8f8ff, - gold: 0xffd700, - goldenrod: 0xdaa520, - gray: 0x808080, - green: 0x008000, - greenyellow: 0xadff2f, - grey: 0x808080, - honeydew: 0xf0fff0, - hotpink: 0xff69b4, - indianred: 0xcd5c5c, - indigo: 0x4b0082, - ivory: 0xfffff0, - khaki: 0xf0e68c, - lavender: 0xe6e6fa, - lavenderblush: 0xfff0f5, - lawngreen: 0x7cfc00, - lemonchiffon: 0xfffacd, - lightblue: 0xadd8e6, - lightcoral: 0xf08080, - lightcyan: 0xe0ffff, - lightgoldenrodyellow: 0xfafad2, - lightgray: 0xd3d3d3, - lightgreen: 0x90ee90, - lightgrey: 0xd3d3d3, - lightpink: 0xffb6c1, - lightsalmon: 0xffa07a, - lightseagreen: 0x20b2aa, - lightskyblue: 0x87cefa, - lightslategray: 0x778899, - lightslategrey: 0x778899, - lightsteelblue: 0xb0c4de, - lightyellow: 0xffffe0, - lime: 0x00ff00, - limegreen: 0x32cd32, - linen: 0xfaf0e6, - magenta: 0xff00ff, - maroon: 0x800000, - mediumaquamarine: 0x66cdaa, - mediumblue: 0x0000cd, - mediumorchid: 0xba55d3, - mediumpurple: 0x9370db, - mediumseagreen: 0x3cb371, - mediumslateblue: 0x7b68ee, - mediumspringgreen: 0x00fa9a, - mediumturquoise: 0x48d1cc, - mediumvioletred: 0xc71585, - midnightblue: 0x191970, - mintcream: 0xf5fffa, - mistyrose: 0xffe4e1, - moccasin: 0xffe4b5, - navajowhite: 0xffdead, - navy: 0x000080, - oldlace: 0xfdf5e6, - olive: 0x808000, - olivedrab: 0x6b8e23, - orange: 0xffa500, - orangered: 0xff4500, - orchid: 0xda70d6, - palegoldenrod: 0xeee8aa, - palegreen: 0x98fb98, - paleturquoise: 0xafeeee, - palevioletred: 0xdb7093, - papayawhip: 0xffefd5, - peachpuff: 0xffdab9, - peru: 0xcd853f, - pink: 0xffc0cb, - plum: 0xdda0dd, - powderblue: 0xb0e0e6, - purple: 0x800080, - rebeccapurple: 0x663399, - red: 0xff0000, - rosybrown: 0xbc8f8f, - royalblue: 0x4169e1, - saddlebrown: 0x8b4513, - salmon: 0xfa8072, - sandybrown: 0xf4a460, - seagreen: 0x2e8b57, - seashell: 0xfff5ee, - sienna: 0xa0522d, - silver: 0xc0c0c0, - skyblue: 0x87ceeb, - slateblue: 0x6a5acd, - slategray: 0x708090, - slategrey: 0x708090, - snow: 0xfffafa, - springgreen: 0x00ff7f, - steelblue: 0x4682b4, - tan: 0xd2b48c, - teal: 0x008080, - thistle: 0xd8bfd8, - tomato: 0xff6347, - turquoise: 0x40e0d0, - violet: 0xee82ee, - wheat: 0xf5deb3, - white: 0xffffff, - whitesmoke: 0xf5f5f5, - yellow: 0xffff00, - yellowgreen: 0x9acd32 -}; - -define(Color, color, { - displayable: function() { - return this.rgb().displayable(); - }, - toString: function() { - return this.rgb() + ""; - } -}); - -function color(format) { - var m; - format = (format + "").trim().toLowerCase(); - return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00 - : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000 - : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) - : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) - : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) - : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) - : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) - : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) - : named.hasOwnProperty(format) ? rgbn(named[format]) - : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) - : null; -} - -function rgbn(n) { - return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); -} - -function rgba(r, g, b, a) { - if (a <= 0) r = g = b = NaN; - return new Rgb(r, g, b, a); -} - -function rgbConvert(o) { - if (!(o instanceof Color)) o = color(o); - if (!o) return new Rgb; - o = o.rgb(); - return new Rgb(o.r, o.g, o.b, o.opacity); -} - -function rgb(r, g, b, opacity) { - return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); -} - -function Rgb(r, g, b, opacity) { - this.r = +r; - this.g = +g; - this.b = +b; - this.opacity = +opacity; -} - -define(Rgb, rgb, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - rgb: function() { - return this; - }, - displayable: function() { - return (0 <= this.r && this.r <= 255) - && (0 <= this.g && this.g <= 255) - && (0 <= this.b && this.b <= 255) - && (0 <= this.opacity && this.opacity <= 1); - }, - toString: function() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "rgb(" : "rgba(") - + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.b) || 0)) - + (a === 1 ? ")" : ", " + a + ")"); - } -})); - -function hsla(h, s, l, a) { - if (a <= 0) h = s = l = NaN; - else if (l <= 0 || l >= 1) h = s = NaN; - else if (s <= 0) h = NaN; - return new Hsl(h, s, l, a); -} - -function hslConvert(o) { - if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Color)) o = color(o); - if (!o) return new Hsl; - if (o instanceof Hsl) return o; - o = o.rgb(); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - min = Math.min(r, g, b), - max = Math.max(r, g, b), - h = NaN, - s = max - min, - l = (max + min) / 2; - if (s) { - if (r === max) h = (g - b) / s + (g < b) * 6; - else if (g === max) h = (b - r) / s + 2; - else h = (r - g) / s + 4; - s /= l < 0.5 ? max + min : 2 - max - min; - h *= 60; - } else { - s = l > 0 && l < 1 ? 0 : h; - } - return new Hsl(h, s, l, o.opacity); -} - -function hsl(h, s, l, opacity) { - return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); -} - -function Hsl(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Hsl, hsl, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = this.h % 360 + (this.h < 0) * 360, - s = isNaN(h) || isNaN(this.s) ? 0 : this.s, - l = this.l, - m2 = l + (l < 0.5 ? l : 1 - l) * s, - m1 = 2 * l - m2; - return new Rgb( - hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), - hsl2rgb(h, m1, m2), - hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), - this.opacity - ); - }, - displayable: function() { - return (0 <= this.s && this.s <= 1 || isNaN(this.s)) - && (0 <= this.l && this.l <= 1) - && (0 <= this.opacity && this.opacity <= 1); - } -})); - -/* From FvD 13.37, CSS Color Module Level 3 */ -function hsl2rgb(h, m1, m2) { - return (h < 60 ? m1 + (m2 - m1) * h / 60 - : h < 180 ? m2 - : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 - : m1) * 255; -} - -var deg2rad = Math.PI / 180; -var rad2deg = 180 / Math.PI; - -var Kn = 18; -var Xn = 0.950470; -var Yn = 1; -var Zn = 1.088830; -var t0 = 4 / 29; -var t1 = 6 / 29; -var t2 = 3 * t1 * t1; -var t3 = t1 * t1 * t1; - -function labConvert(o) { - if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); - if (o instanceof Hcl) { - var h = o.h * deg2rad; - return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); - } - if (!(o instanceof Rgb)) o = rgbConvert(o); - var b = rgb2xyz(o.r), - a = rgb2xyz(o.g), - l = rgb2xyz(o.b), - x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn), - y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn), - z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn); - return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); -} - -function lab(l, a, b, opacity) { - return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); -} - -function Lab(l, a, b, opacity) { - this.l = +l; - this.a = +a; - this.b = +b; - this.opacity = +opacity; -} - -define(Lab, lab, extend(Color, { - brighter: function(k) { - return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - darker: function(k) { - return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - rgb: function() { - var y = (this.l + 16) / 116, - x = isNaN(this.a) ? y : y + this.a / 500, - z = isNaN(this.b) ? y : y - this.b / 200; - y = Yn * lab2xyz(y); - x = Xn * lab2xyz(x); - z = Zn * lab2xyz(z); - return new Rgb( - xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB - xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z), - xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z), - this.opacity - ); - } -})); - -function xyz2lab(t) { - return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; -} - -function lab2xyz(t) { - return t > t1 ? t * t * t : t2 * (t - t0); -} - -function xyz2rgb(x) { - return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); -} - -function rgb2xyz(x) { - return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); -} - -function hclConvert(o) { - if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); - if (!(o instanceof Lab)) o = labConvert(o); - var h = Math.atan2(o.b, o.a) * rad2deg; - return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); -} - -function hcl(h, c, l, opacity) { - return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); -} - -function Hcl(h, c, l, opacity) { - this.h = +h; - this.c = +c; - this.l = +l; - this.opacity = +opacity; -} - -define(Hcl, hcl, extend(Color, { - brighter: function(k) { - return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k), this.opacity); - }, - darker: function(k) { - return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k), this.opacity); - }, - rgb: function() { - return labConvert(this).rgb(); - } -})); - -var A = -0.14861; -var B = +1.78277; -var C = -0.29227; -var D = -0.90649; -var E = +1.97294; -var ED = E * D; -var EB = E * B; -var BC_DA = B * C - D * A; - -function cubehelixConvert(o) { - if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Rgb)) o = rgbConvert(o); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), - bl = b - l, - k = (E * (g - l) - C * bl) / D, - s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 - h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN; - return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); -} - -function cubehelix(h, s, l, opacity) { - return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); -} - -function Cubehelix(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Cubehelix, cubehelix, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad, - l = +this.l, - a = isNaN(this.s) ? 0 : this.s * l * (1 - l), - cosh = Math.cos(h), - sinh = Math.sin(h); - return new Rgb( - 255 * (l + a * (A * cosh + B * sinh)), - 255 * (l + a * (C * cosh + D * sinh)), - 255 * (l + a * (E * cosh)), - this.opacity - ); - } -})); - -exports.color = color; -exports.rgb = rgb; -exports.hsl = hsl; -exports.lab = lab; -exports.hcl = hcl; -exports.cubehelix = cubehelix; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{}],109:[function(require,module,exports){ -// https://d3js.org/d3-dispatch/ Version 1.0.3. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); -}(this, (function (exports) { 'use strict'; - -var noop = {value: function() {}}; - -function dispatch() { - for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { - if (!(t = arguments[i] + "") || (t in _)) throw new Error("illegal type: " + t); - _[t] = []; - } - return new Dispatch(_); -} - -function Dispatch(_) { - this._ = _; -} - -function parseTypenames(typenames, types) { - return typenames.trim().split(/^|\s+/).map(function(t) { - var name = "", i = t.indexOf("."); - if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); - if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); - return {type: t, name: name}; - }); -} - -Dispatch.prototype = dispatch.prototype = { - constructor: Dispatch, - on: function(typename, callback) { - var _ = this._, - T = parseTypenames(typename + "", _), - t, - i = -1, - n = T.length; - - // If no callback was specified, return the callback of the given type and name. - if (arguments.length < 2) { - while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; - return; - } - - // If a type was specified, set the callback for the given type and name. - // Otherwise, if a null callback was specified, remove callbacks of the given name. - if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); - while (++i < n) { - if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); - else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); - } - - return this; - }, - copy: function() { - var copy = {}, _ = this._; - for (var t in _) copy[t] = _[t].slice(); - return new Dispatch(copy); - }, - call: function(type, that) { - if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - }, - apply: function(type, that, args) { - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - } -}; - -function get(type, name) { - for (var i = 0, n = type.length, c; i < n; ++i) { - if ((c = type[i]).name === name) { - return c.value; + d3.extent = function(array, f) { + var i = -1, n = array.length, a, b, c; + if (arguments.length === 1) { + while (++i < n) if ((b = array[i]) != null && b >= b) { + a = c = b; + break; + } + while (++i < n) if ((b = array[i]) != null) { + if (a > b) a = b; + if (c < b) c = b; + } + } else { + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { + a = c = b; + break; + } + while (++i < n) if ((b = f.call(array, array[i], i)) != null) { + if (a > b) a = b; + if (c < b) c = b; + } } + return [ a, c ]; + }; + function d3_number(x) { + return x === null ? NaN : +x; } -} - -function set(type, name, callback) { - for (var i = 0, n = type.length; i < n; ++i) { - if (type[i].name === name) { - type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); - break; - } + function d3_numeric(x) { + return !isNaN(x); } - if (callback != null) type.push({name: name, value: callback}); - return type; -} - -exports.dispatch = dispatch; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{}],110:[function(require,module,exports){ -// https://d3js.org/d3-force/ Version 1.0.6. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-quadtree'), require('d3-collection'), require('d3-dispatch'), require('d3-timer')) : - typeof define === 'function' && define.amd ? define(['exports', 'd3-quadtree', 'd3-collection', 'd3-dispatch', 'd3-timer'], factory) : - (factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3,global.d3)); -}(this, (function (exports,d3Quadtree,d3Collection,d3Dispatch,d3Timer) { 'use strict'; - -var center = function(x, y) { - var nodes; - - if (x == null) x = 0; - if (y == null) y = 0; - - function force() { - var i, - n = nodes.length, - node, - sx = 0, - sy = 0; - - for (i = 0; i < n; ++i) { - node = nodes[i], sx += node.x, sy += node.y; - } - - for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) { - node = nodes[i], node.x -= sx, node.y -= sy; + d3.sum = function(array, f) { + var s = 0, n = array.length, a, i = -1; + if (arguments.length === 1) { + while (++i < n) if (d3_numeric(a = +array[i])) s += a; + } else { + while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a; } - } - - force.initialize = function(_) { - nodes = _; + return s; }; - - force.x = function(_) { - return arguments.length ? (x = +_, force) : x; + d3.mean = function(array, f) { + var s = 0, n = array.length, a, i = -1, j = n; + if (arguments.length === 1) { + while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j; + } else { + while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j; + } + if (j) return s / j; }; - - force.y = function(_) { - return arguments.length ? (y = +_, force) : y; + d3.quantile = function(values, p) { + var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h; + return e ? v + e * (values[h] - v) : v; }; - - return force; -}; - -var constant = function(x) { - return function() { - return x; + d3.median = function(array, f) { + var numbers = [], n = array.length, a, i = -1; + if (arguments.length === 1) { + while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a); + } else { + while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a); + } + if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), .5); }; -}; - -var jiggle = function() { - return (Math.random() - 0.5) * 1e-6; -}; - -function x(d) { - return d.x + d.vx; -} - -function y(d) { - return d.y + d.vy; -} - -var collide = function(radius) { - var nodes, - radii, - strength = 1, - iterations = 1; - - if (typeof radius !== "function") radius = constant(radius == null ? 1 : +radius); - - function force() { - var i, n = nodes.length, - tree, - node, - xi, - yi, - ri, - ri2; - - for (var k = 0; k < iterations; ++k) { - tree = d3Quadtree.quadtree(nodes, x, y).visitAfter(prepare); - for (i = 0; i < n; ++i) { - node = nodes[i]; - ri = radii[node.index], ri2 = ri * ri; - xi = node.x + node.vx; - yi = node.y + node.vy; - tree.visit(apply); - } - } - - function apply(quad, x0, y0, x1, y1) { - var data = quad.data, rj = quad.r, r = ri + rj; - if (data) { - if (data.index > node.index) { - var x = xi - data.x - data.vx, - y = yi - data.y - data.vy, - l = x * x + y * y; - if (l < r * r) { - if (x === 0) x = jiggle(), l += x * x; - if (y === 0) y = jiggle(), l += y * y; - l = (r - (l = Math.sqrt(l))) / l * strength; - node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj)); - node.vy += (y *= l) * r; - data.vx -= x * (r = 1 - r); - data.vy -= y * r; - } + d3.variance = function(array, f) { + var n = array.length, m = 0, a, d, s = 0, i = -1, j = 0; + if (arguments.length === 1) { + while (++i < n) { + if (d3_numeric(a = d3_number(array[i]))) { + d = a - m; + m += d / ++j; + s += d * (a - m); } - return; } - return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r; - } - } - - function prepare(quad) { - if (quad.data) return quad.r = radii[quad.data.index]; - for (var i = quad.r = 0; i < 4; ++i) { - if (quad[i] && quad[i].r > quad.r) { - quad.r = quad[i].r; + } else { + while (++i < n) { + if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) { + d = a - m; + m += d / ++j; + s += d * (a - m); + } } } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length, node; - radii = new Array(n); - for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes); - } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.iterations = function(_) { - return arguments.length ? (iterations = +_, force) : iterations; - }; - - force.strength = function(_) { - return arguments.length ? (strength = +_, force) : strength; + if (j > 1) return s / (j - 1); }; - - force.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), initialize(), force) : radius; + d3.deviation = function() { + var v = d3.variance.apply(this, arguments); + return v ? Math.sqrt(v) : v; }; - - return force; -}; - -function index(d) { - return d.index; -} - -function find(nodeById, nodeId) { - var node = nodeById.get(nodeId); - if (!node) throw new Error("missing: " + nodeId); - return node; -} - -var link = function(links) { - var id = index, - strength = defaultStrength, - strengths, - distance = constant(30), - distances, - nodes, - count, - bias, - iterations = 1; - - if (links == null) links = []; - - function defaultStrength(link) { - return 1 / Math.min(count[link.source.index], count[link.target.index]); - } - - function force(alpha) { - for (var k = 0, n = links.length; k < iterations; ++k) { - for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) { - link = links[i], source = link.source, target = link.target; - x = target.x + target.vx - source.x - source.vx || jiggle(); - y = target.y + target.vy - source.y - source.vy || jiggle(); - l = Math.sqrt(x * x + y * y); - l = (l - distances[i]) / l * alpha * strengths[i]; - x *= l, y *= l; - target.vx -= x * (b = bias[i]); - target.vy -= y * b; - source.vx += x * (b = 1 - b); - source.vy += y * b; + function d3_bisector(compare) { + return { + left: function(a, x, lo, hi) { + if (arguments.length < 3) lo = 0; + if (arguments.length < 4) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid; + } + return lo; + }, + right: function(a, x, lo, hi) { + if (arguments.length < 3) lo = 0; + if (arguments.length < 4) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1; + } + return lo; } - } + }; } - - function initialize() { - if (!nodes) return; - - var i, - n = nodes.length, - m = links.length, - nodeById = d3Collection.map(nodes, id), - link; - - for (i = 0, count = new Array(n); i < m; ++i) { - link = links[i], link.index = i; - if (typeof link.source !== "object") link.source = find(nodeById, link.source); - if (typeof link.target !== "object") link.target = find(nodeById, link.target); - count[link.source.index] = (count[link.source.index] || 0) + 1; - count[link.target.index] = (count[link.target.index] || 0) + 1; - } - - for (i = 0, bias = new Array(m); i < m; ++i) { - link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); + var d3_bisect = d3_bisector(d3_ascending); + d3.bisectLeft = d3_bisect.left; + d3.bisect = d3.bisectRight = d3_bisect.right; + d3.bisector = function(f) { + return d3_bisector(f.length === 1 ? function(d, x) { + return d3_ascending(f(d), x); + } : f); + }; + d3.shuffle = function(array, i0, i1) { + if ((m = arguments.length) < 3) { + i1 = array.length; + if (m < 2) i0 = 0; } - - strengths = new Array(m), initializeStrength(); - distances = new Array(m), initializeDistance(); - } - - function initializeStrength() { - if (!nodes) return; - - for (var i = 0, n = links.length; i < n; ++i) { - strengths[i] = +strength(links[i], i, links); + var m = i1 - i0, t, i; + while (m) { + i = Math.random() * m-- | 0; + t = array[m + i0], array[m + i0] = array[i + i0], array[i + i0] = t; } - } - - function initializeDistance() { - if (!nodes) return; - - for (var i = 0, n = links.length; i < n; ++i) { - distances[i] = +distance(links[i], i, links); + return array; + }; + d3.permute = function(array, indexes) { + var i = indexes.length, permutes = new Array(i); + while (i--) permutes[i] = array[indexes[i]]; + return permutes; + }; + d3.pairs = function(array) { + var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n); + while (i < n) pairs[i] = [ p0 = p1, p1 = array[++i] ]; + return pairs; + }; + d3.transpose = function(matrix) { + if (!(n = matrix.length)) return []; + for (var i = -1, m = d3.min(matrix, d3_transposeLength), transpose = new Array(m); ++i < m; ) { + for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n; ) { + row[j] = matrix[j][i]; + } } - } - - force.initialize = function(_) { - nodes = _; - initialize(); + return transpose; }; - - force.links = function(_) { - return arguments.length ? (links = _, initialize(), force) : links; + function d3_transposeLength(d) { + return d.length; + } + d3.zip = function() { + return d3.transpose(arguments); }; - - force.id = function(_) { - return arguments.length ? (id = _, force) : id; + d3.keys = function(map) { + var keys = []; + for (var key in map) keys.push(key); + return keys; }; - - force.iterations = function(_) { - return arguments.length ? (iterations = +_, force) : iterations; + d3.values = function(map) { + var values = []; + for (var key in map) values.push(map[key]); + return values; }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initializeStrength(), force) : strength; + d3.entries = function(map) { + var entries = []; + for (var key in map) entries.push({ + key: key, + value: map[key] + }); + return entries; }; - - force.distance = function(_) { - return arguments.length ? (distance = typeof _ === "function" ? _ : constant(+_), initializeDistance(), force) : distance; + d3.merge = function(arrays) { + var n = arrays.length, m, i = -1, j = 0, merged, array; + while (++i < n) j += arrays[i].length; + merged = new Array(j); + while (--n >= 0) { + array = arrays[n]; + m = array.length; + while (--m >= 0) { + merged[--j] = array[m]; + } + } + return merged; }; - - return force; -}; - -function x$1(d) { - return d.x; -} - -function y$1(d) { - return d.y; -} - -var initialRadius = 10; -var initialAngle = Math.PI * (3 - Math.sqrt(5)); - -var simulation = function(nodes) { - var simulation, - alpha = 1, - alphaMin = 0.001, - alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), - alphaTarget = 0, - velocityDecay = 0.6, - forces = d3Collection.map(), - stepper = d3Timer.timer(step), - event = d3Dispatch.dispatch("tick", "end"); - - if (nodes == null) nodes = []; - - function step() { - tick(); - event.call("tick", simulation); - if (alpha < alphaMin) { - stepper.stop(); - event.call("end", simulation); + var abs = Math.abs; + d3.range = function(start, stop, step) { + if (arguments.length < 3) { + step = 1; + if (arguments.length < 2) { + stop = start; + start = 0; + } } + if ((stop - start) / step === Infinity) throw new Error("infinite range"); + var range = [], k = d3_range_integerScale(abs(step)), i = -1, j; + start *= k, stop *= k, step *= k; + if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k); + return range; + }; + function d3_range_integerScale(x) { + var k = 1; + while (x * k % 1) k *= 10; + return k; } - - function tick() { - var i, n = nodes.length, node; - - alpha += (alphaTarget - alpha) * alphaDecay; - - forces.each(function(force) { - force(alpha); - }); - - for (i = 0; i < n; ++i) { - node = nodes[i]; - if (node.fx == null) node.x += node.vx *= velocityDecay; - else node.x = node.fx, node.vx = 0; - if (node.fy == null) node.y += node.vy *= velocityDecay; - else node.y = node.fy, node.vy = 0; + function d3_class(ctor, properties) { + for (var key in properties) { + Object.defineProperty(ctor.prototype, key, { + value: properties[key], + enumerable: false + }); } } - - function initializeNodes() { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.index = i; - if (isNaN(node.x) || isNaN(node.y)) { - var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle; - node.x = radius * Math.cos(angle); - node.y = radius * Math.sin(angle); - } - if (isNaN(node.vx) || isNaN(node.vy)) { - node.vx = node.vy = 0; - } + d3.map = function(object, f) { + var map = new d3_Map(); + if (object instanceof d3_Map) { + object.forEach(function(key, value) { + map.set(key, value); + }); + } else if (Array.isArray(object)) { + var i = -1, n = object.length, o; + if (arguments.length === 1) while (++i < n) map.set(i, object[i]); else while (++i < n) map.set(f.call(object, o = object[i], i), o); + } else { + for (var key in object) map.set(key, object[key]); } + return map; + }; + function d3_Map() { + this._ = Object.create(null); } - - function initializeForce(force) { - if (force.initialize) force.initialize(nodes); - return force; - } - - initializeNodes(); - - return simulation = { - tick: tick, - - restart: function() { - return stepper.restart(step), simulation; - }, - - stop: function() { - return stepper.stop(), simulation; - }, - - nodes: function(_) { - return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes; - }, - - alpha: function(_) { - return arguments.length ? (alpha = +_, simulation) : alpha; - }, - - alphaMin: function(_) { - return arguments.length ? (alphaMin = +_, simulation) : alphaMin; - }, - - alphaDecay: function(_) { - return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay; - }, - - alphaTarget: function(_) { - return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget; + var d3_map_proto = "__proto__", d3_map_zero = "\x00"; + d3_class(d3_Map, { + has: d3_map_has, + get: function(key) { + return this._[d3_map_escape(key)]; }, - - velocityDecay: function(_) { - return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay; + set: function(key, value) { + return this._[d3_map_escape(key)] = value; }, - - force: function(name, _) { - return arguments.length > 1 ? ((_ == null ? forces.remove(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); + remove: d3_map_remove, + keys: d3_map_keys, + values: function() { + var values = []; + for (var key in this._) values.push(this._[key]); + return values; }, - - find: function(x, y, radius) { - var i = 0, - n = nodes.length, - dx, - dy, - d2, - node, - closest; - - if (radius == null) radius = Infinity; - else radius *= radius; - - for (i = 0; i < n; ++i) { - node = nodes[i]; - dx = x - node.x; - dy = y - node.y; - d2 = dx * dx + dy * dy; - if (d2 < radius) closest = node, radius = d2; - } - - return closest; + entries: function() { + var entries = []; + for (var key in this._) entries.push({ + key: d3_map_unescape(key), + value: this._[key] + }); + return entries; }, - - on: function(name, _) { - return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name); + size: d3_map_size, + empty: d3_map_empty, + forEach: function(f) { + for (var key in this._) f.call(this, d3_map_unescape(key), this._[key]); } - }; -}; - -var manyBody = function() { - var nodes, - node, - alpha, - strength = constant(-30), - strengths, - distanceMin2 = 1, - distanceMax2 = Infinity, - theta2 = 0.81; - - function force(_) { - var i, n = nodes.length, tree = d3Quadtree.quadtree(nodes, x$1, y$1).visitAfter(accumulate); - for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply); - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length, node; - strengths = new Array(n); - for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); + }); + function d3_map_escape(key) { + return (key += "") === d3_map_proto || key[0] === d3_map_zero ? d3_map_zero + key : key; } - - function accumulate(quad) { - var strength = 0, q, c, x$$1, y$$1, i; - - // For internal nodes, accumulate forces from child quadrants. - if (quad.length) { - for (x$$1 = y$$1 = i = 0; i < 4; ++i) { - if ((q = quad[i]) && (c = q.value)) { - strength += c, x$$1 += c * q.x, y$$1 += c * q.y; - } - } - quad.x = x$$1 / strength; - quad.y = y$$1 / strength; - } - - // For leaf nodes, accumulate forces from coincident quadrants. - else { - q = quad; - q.x = q.data.x; - q.y = q.data.y; - do strength += strengths[q.data.index]; - while (q = q.next); - } - - quad.value = strength; + function d3_map_unescape(key) { + return (key += "")[0] === d3_map_zero ? key.slice(1) : key; } - - function apply(quad, x1, _, x2) { - if (!quad.value) return true; - - var x$$1 = quad.x - node.x, - y$$1 = quad.y - node.y, - w = x2 - x1, - l = x$$1 * x$$1 + y$$1 * y$$1; - - // Apply the Barnes-Hut approximation if possible. - // Limit forces for very close nodes; randomize direction if coincident. - if (w * w / theta2 < l) { - if (l < distanceMax2) { - if (x$$1 === 0) x$$1 = jiggle(), l += x$$1 * x$$1; - if (y$$1 === 0) y$$1 = jiggle(), l += y$$1 * y$$1; - if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); - node.vx += x$$1 * quad.value * alpha / l; - node.vy += y$$1 * quad.value * alpha / l; - } - return true; - } - - // Otherwise, process points directly. - else if (quad.length || l >= distanceMax2) return; - - // Limit forces for very close nodes; randomize direction if coincident. - if (quad.data !== node || quad.next) { - if (x$$1 === 0) x$$1 = jiggle(), l += x$$1 * x$$1; - if (y$$1 === 0) y$$1 = jiggle(), l += y$$1 * y$$1; - if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); - } - - do if (quad.data !== node) { - w = strengths[quad.data.index] * alpha / l; - node.vx += x$$1 * w; - node.vy += y$$1 * w; - } while (quad = quad.next); + function d3_map_has(key) { + return d3_map_escape(key) in this._; } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.distanceMin = function(_) { - return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2); - }; - - force.distanceMax = function(_) { - return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2); - }; - - force.theta = function(_) { - return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2); - }; - - return force; -}; - -var x$2 = function(x) { - var strength = constant(0.1), - nodes, - strengths, - xz; - - if (typeof x !== "function") x = constant(x == null ? 0 : +x); - - function force(alpha) { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha; - } + function d3_map_remove(key) { + return (key = d3_map_escape(key)) in this._ && delete this._[key]; } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - xz = new Array(n); - for (i = 0; i < n; ++i) { - strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); - } + function d3_map_keys() { + var keys = []; + for (var key in this._) keys.push(d3_map_unescape(key)); + return keys; } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), initialize(), force) : x; - }; - - return force; -}; - -var y$2 = function(y) { - var strength = constant(0.1), - nodes, - strengths, - yz; - - if (typeof y !== "function") y = constant(y == null ? 0 : +y); - - function force(alpha) { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha; - } + function d3_map_size() { + var size = 0; + for (var key in this._) ++size; + return size; } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - yz = new Array(n); - for (i = 0; i < n; ++i) { - strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); - } - } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), initialize(), force) : y; - }; - - return force; -}; - -exports.forceCenter = center; -exports.forceCollide = collide; -exports.forceLink = link; -exports.forceManyBody = manyBody; -exports.forceSimulation = simulation; -exports.forceX = x$2; -exports.forceY = y$2; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{"d3-collection":107,"d3-dispatch":109,"d3-quadtree":112,"d3-timer":113}],111:[function(require,module,exports){ -// https://d3js.org/d3-interpolate/ Version 1.1.4. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-color')) : - typeof define === 'function' && define.amd ? define(['exports', 'd3-color'], factory) : - (factory((global.d3 = global.d3 || {}),global.d3)); -}(this, (function (exports,d3Color) { 'use strict'; - -function basis(t1, v0, v1, v2, v3) { - var t2 = t1 * t1, t3 = t2 * t1; - return ((1 - 3 * t1 + 3 * t2 - t3) * v0 - + (4 - 6 * t2 + 3 * t3) * v1 - + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 - + t3 * v3) / 6; -} - -var basis$1 = function(values) { - var n = values.length - 1; - return function(t) { - var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), - v1 = values[i], - v2 = values[i + 1], - v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, - v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -}; - -var basisClosed = function(values) { - var n = values.length; - return function(t) { - var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), - v0 = values[(i + n - 1) % n], - v1 = values[i % n], - v2 = values[(i + 1) % n], - v3 = values[(i + 2) % n]; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -}; - -var constant = function(x) { - return function() { - return x; - }; -}; - -function linear(a, d) { - return function(t) { - return a + t * d; - }; -} - -function exponential(a, b, y) { - return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { - return Math.pow(a + t * b, y); - }; -} - -function hue(a, b) { - var d = b - a; - return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a); -} - -function gamma(y) { - return (y = +y) === 1 ? nogamma : function(a, b) { - return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); - }; -} - -function nogamma(a, b) { - var d = b - a; - return d ? linear(a, d) : constant(isNaN(a) ? b : a); -} - -var rgb$1 = ((function rgbGamma(y) { - var color$$1 = gamma(y); - - function rgb$$1(start, end) { - var r = color$$1((start = d3Color.rgb(start)).r, (end = d3Color.rgb(end)).r), - g = color$$1(start.g, end.g), - b = color$$1(start.b, end.b), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.r = r(t); - start.g = g(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; - } - - rgb$$1.gamma = rgbGamma; - - return rgb$$1; -}))(1); - -function rgbSpline(spline) { - return function(colors) { - var n = colors.length, - r = new Array(n), - g = new Array(n), - b = new Array(n), - i, color$$1; - for (i = 0; i < n; ++i) { - color$$1 = d3Color.rgb(colors[i]); - r[i] = color$$1.r || 0; - g[i] = color$$1.g || 0; - b[i] = color$$1.b || 0; - } - r = spline(r); - g = spline(g); - b = spline(b); - color$$1.opacity = 1; - return function(t) { - color$$1.r = r(t); - color$$1.g = g(t); - color$$1.b = b(t); - return color$$1 + ""; - }; - }; -} - -var rgbBasis = rgbSpline(basis$1); -var rgbBasisClosed = rgbSpline(basisClosed); - -var array = function(a, b) { - var nb = b ? b.length : 0, - na = a ? Math.min(nb, a.length) : 0, - x = new Array(nb), - c = new Array(nb), - i; - - for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]); - for (; i < nb; ++i) c[i] = b[i]; - - return function(t) { - for (i = 0; i < na; ++i) c[i] = x[i](t); - return c; - }; -}; - -var date = function(a, b) { - var d = new Date; - return a = +a, b -= a, function(t) { - return d.setTime(a + b * t), d; - }; -}; - -var number = function(a, b) { - return a = +a, b -= a, function(t) { - return a + b * t; - }; -}; - -var object = function(a, b) { - var i = {}, - c = {}, - k; - - if (a === null || typeof a !== "object") a = {}; - if (b === null || typeof b !== "object") b = {}; - - for (k in b) { - if (k in a) { - i[k] = value(a[k], b[k]); - } else { - c[k] = b[k]; - } - } - - return function(t) { - for (k in i) c[k] = i[k](t); - return c; - }; -}; - -var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g; -var reB = new RegExp(reA.source, "g"); - -function zero(b) { - return function() { - return b; - }; -} - -function one(b) { - return function(t) { - return b(t) + ""; - }; -} - -var string = function(a, b) { - var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b - am, // current match in a - bm, // current match in b - bs, // string preceding current number in b, if any - i = -1, // index in s - s = [], // string constants and placeholders - q = []; // number interpolators - - // Coerce inputs to strings. - a = a + "", b = b + ""; - - // Interpolate pairs of numbers in a & b. - while ((am = reA.exec(a)) - && (bm = reB.exec(b))) { - if ((bs = bm.index) > bi) { // a string precedes the next number in b - bs = b.slice(bi, bs); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match - if (s[i]) s[i] += bm; // coalesce with previous string - else s[++i] = bm; - } else { // interpolate non-matching numbers - s[++i] = null; - q.push({i: i, x: number(am, bm)}); - } - bi = reB.lastIndex; - } - - // Add remains of b. - if (bi < b.length) { - bs = b.slice(bi); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - - // Special optimization for only a single match. - // Otherwise, interpolate each of the numbers and rejoin the string. - return s.length < 2 ? (q[0] - ? one(q[0].x) - : zero(b)) - : (b = q.length, function(t) { - for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }); -}; - -var value = function(a, b) { - var t = typeof b, c; - return b == null || t === "boolean" ? constant(b) - : (t === "number" ? number - : t === "string" ? ((c = d3Color.color(b)) ? (b = c, rgb$1) : string) - : b instanceof d3Color.color ? rgb$1 - : b instanceof Date ? date - : Array.isArray(b) ? array - : isNaN(b) ? object - : number)(a, b); -}; - -var round = function(a, b) { - return a = +a, b -= a, function(t) { - return Math.round(a + b * t); - }; -}; - -var degrees = 180 / Math.PI; - -var identity = { - translateX: 0, - translateY: 0, - rotate: 0, - skewX: 0, - scaleX: 1, - scaleY: 1 -}; - -var decompose = function(a, b, c, d, e, f) { - var scaleX, scaleY, skewX; - if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; - if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; - if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; - if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; - return { - translateX: e, - translateY: f, - rotate: Math.atan2(b, a) * degrees, - skewX: Math.atan(skewX) * degrees, - scaleX: scaleX, - scaleY: scaleY - }; -}; - -var cssNode; -var cssRoot; -var cssView; -var svgNode; - -function parseCss(value) { - if (value === "none") return identity; - if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView; - cssNode.style.transform = value; - value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform"); - cssRoot.removeChild(cssNode); - value = value.slice(7, -1).split(","); - return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]); -} - -function parseSvg(value) { - if (value == null) return identity; - if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); - svgNode.setAttribute("transform", value); - if (!(value = svgNode.transform.baseVal.consolidate())) return identity; - value = value.matrix; - return decompose(value.a, value.b, value.c, value.d, value.e, value.f); -} - -function interpolateTransform(parse, pxComma, pxParen, degParen) { - - function pop(s) { - return s.length ? s.pop() + " " : ""; - } - - function translate(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push("translate(", null, pxComma, null, pxParen); - q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); - } else if (xb || yb) { - s.push("translate(" + xb + pxComma + yb + pxParen); - } - } - - function rotate(a, b, s, q) { - if (a !== b) { - if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path - q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b)}); - } else if (b) { - s.push(pop(s) + "rotate(" + b + degParen); - } - } - - function skewX(a, b, s, q) { - if (a !== b) { - q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number(a, b)}); - } else if (b) { - s.push(pop(s) + "skewX(" + b + degParen); - } - } - - function scale(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push(pop(s) + "scale(", null, ",", null, ")"); - q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); - } else if (xb !== 1 || yb !== 1) { - s.push(pop(s) + "scale(" + xb + "," + yb + ")"); - } - } - - return function(a, b) { - var s = [], // string constants and placeholders - q = []; // number interpolators - a = parse(a), b = parse(b); - translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); - rotate(a.rotate, b.rotate, s, q); - skewX(a.skewX, b.skewX, s, q); - scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); - a = b = null; // gc - return function(t) { - var i = -1, n = q.length, o; - while (++i < n) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }; - }; -} - -var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"); -var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"); - -var rho = Math.SQRT2; -var rho2 = 2; -var rho4 = 4; -var epsilon2 = 1e-12; - -function cosh(x) { - return ((x = Math.exp(x)) + 1 / x) / 2; -} - -function sinh(x) { - return ((x = Math.exp(x)) - 1 / x) / 2; -} - -function tanh(x) { - return ((x = Math.exp(2 * x)) - 1) / (x + 1); -} - -// p0 = [ux0, uy0, w0] -// p1 = [ux1, uy1, w1] -var zoom = function(p0, p1) { - var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], - ux1 = p1[0], uy1 = p1[1], w1 = p1[2], - dx = ux1 - ux0, - dy = uy1 - uy0, - d2 = dx * dx + dy * dy, - i, - S; - - // Special case for u0 ≅ u1. - if (d2 < epsilon2) { - S = Math.log(w1 / w0) / rho; - i = function(t) { - return [ - ux0 + t * dx, - uy0 + t * dy, - w0 * Math.exp(rho * t * S) - ]; - }; - } - - // General case. - else { - var d1 = Math.sqrt(d2), - b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), - b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), - r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), - r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); - S = (r1 - r0) / rho; - i = function(t) { - var s = t * S, - coshr0 = cosh(r0), - u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); - return [ - ux0 + u * dx, - uy0 + u * dy, - w0 * coshr0 / cosh(rho * s + r0) - ]; - }; - } - - i.duration = S * 1000; - - return i; -}; - -function hsl$1(hue$$1) { - return function(start, end) { - var h = hue$$1((start = d3Color.hsl(start)).h, (end = d3Color.hsl(end)).h), - s = nogamma(start.s, end.s), - l = nogamma(start.l, end.l), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} - -var hsl$2 = hsl$1(hue); -var hslLong = hsl$1(nogamma); - -function lab$1(start, end) { - var l = nogamma((start = d3Color.lab(start)).l, (end = d3Color.lab(end)).l), - a = nogamma(start.a, end.a), - b = nogamma(start.b, end.b), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.l = l(t); - start.a = a(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; -} - -function hcl$1(hue$$1) { - return function(start, end) { - var h = hue$$1((start = d3Color.hcl(start)).h, (end = d3Color.hcl(end)).h), - c = nogamma(start.c, end.c), - l = nogamma(start.l, end.l), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.c = c(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} - -var hcl$2 = hcl$1(hue); -var hclLong = hcl$1(nogamma); - -function cubehelix$1(hue$$1) { - return (function cubehelixGamma(y) { - y = +y; - - function cubehelix$$1(start, end) { - var h = hue$$1((start = d3Color.cubehelix(start)).h, (end = d3Color.cubehelix(end)).h), - s = nogamma(start.s, end.s), - l = nogamma(start.l, end.l), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(Math.pow(t, y)); - start.opacity = opacity(t); - return start + ""; - }; - } - - cubehelix$$1.gamma = cubehelixGamma; - - return cubehelix$$1; - })(1); -} - -var cubehelix$2 = cubehelix$1(hue); -var cubehelixLong = cubehelix$1(nogamma); - -var quantize = function(interpolator, n) { - var samples = new Array(n); - for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); - return samples; -}; - -exports.interpolate = value; -exports.interpolateArray = array; -exports.interpolateBasis = basis$1; -exports.interpolateBasisClosed = basisClosed; -exports.interpolateDate = date; -exports.interpolateNumber = number; -exports.interpolateObject = object; -exports.interpolateRound = round; -exports.interpolateString = string; -exports.interpolateTransformCss = interpolateTransformCss; -exports.interpolateTransformSvg = interpolateTransformSvg; -exports.interpolateZoom = zoom; -exports.interpolateRgb = rgb$1; -exports.interpolateRgbBasis = rgbBasis; -exports.interpolateRgbBasisClosed = rgbBasisClosed; -exports.interpolateHsl = hsl$2; -exports.interpolateHslLong = hslLong; -exports.interpolateLab = lab$1; -exports.interpolateHcl = hcl$2; -exports.interpolateHclLong = hclLong; -exports.interpolateCubehelix = cubehelix$2; -exports.interpolateCubehelixLong = cubehelixLong; -exports.quantize = quantize; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{"d3-color":108}],112:[function(require,module,exports){ -// https://d3js.org/d3-quadtree/ Version 1.0.3. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); -}(this, (function (exports) { 'use strict'; - -var tree_add = function(d) { - var x = +this._x.call(null, d), - y = +this._y.call(null, d); - return add(this.cover(x, y), x, y, d); -}; - -function add(tree, x, y, d) { - if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points - - var parent, - node = tree._root, - leaf = {data: d}, - x0 = tree._x0, - y0 = tree._y0, - x1 = tree._x1, - y1 = tree._y1, - xm, - ym, - xp, - yp, - right, - bottom, - i, - j; - - // If the tree is empty, initialize the root as a leaf. - if (!node) return tree._root = leaf, tree; - - // Find the existing leaf for the new point, or add it. - while (node.length) { - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; - } - - // Is the new point is exactly coincident with the existing point? - xp = +tree._x.call(null, node.data); - yp = +tree._y.call(null, node.data); - if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; - - // Otherwise, split the leaf node until the old and new point are separated. - do { - parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm))); - return parent[j] = node, parent[i] = leaf, tree; -} - -function addAll(data) { - var d, i, n = data.length, - x, - y, - xz = new Array(n), - yz = new Array(n), - x0 = Infinity, - y0 = Infinity, - x1 = -Infinity, - y1 = -Infinity; - - // Compute the points and their extent. - for (i = 0; i < n; ++i) { - if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; - xz[i] = x; - yz[i] = y; - if (x < x0) x0 = x; - if (x > x1) x1 = x; - if (y < y0) y0 = y; - if (y > y1) y1 = y; - } - - // If there were no (valid) points, inherit the existing extent. - if (x1 < x0) x0 = this._x0, x1 = this._x1; - if (y1 < y0) y0 = this._y0, y1 = this._y1; - - // Expand the tree to cover the new points. - this.cover(x0, y0).cover(x1, y1); - - // Add the new points. - for (i = 0; i < n; ++i) { - add(this, xz[i], yz[i], data[i]); - } - - return this; -} - -var tree_cover = function(x, y) { - if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points - - var x0 = this._x0, - y0 = this._y0, - x1 = this._x1, - y1 = this._y1; - - // If the quadtree has no extent, initialize them. - // Integer extent are necessary so that if we later double the extent, - // the existing quadrant boundaries don’t change due to floating point error! - if (isNaN(x0)) { - x1 = (x0 = Math.floor(x)) + 1; - y1 = (y0 = Math.floor(y)) + 1; - } - - // Otherwise, double repeatedly to cover. - else if (x0 > x || x > x1 || y0 > y || y > y1) { - var z = x1 - x0, - node = this._root, - parent, - i; - - switch (i = (y < (y0 + y1) / 2) << 1 | (x < (x0 + x1) / 2)) { - case 0: { - do parent = new Array(4), parent[i] = node, node = parent; - while (z *= 2, x1 = x0 + z, y1 = y0 + z, x > x1 || y > y1); - break; - } - case 1: { - do parent = new Array(4), parent[i] = node, node = parent; - while (z *= 2, x0 = x1 - z, y1 = y0 + z, x0 > x || y > y1); - break; - } - case 2: { - do parent = new Array(4), parent[i] = node, node = parent; - while (z *= 2, x1 = x0 + z, y0 = y1 - z, x > x1 || y0 > y); - break; - } - case 3: { - do parent = new Array(4), parent[i] = node, node = parent; - while (z *= 2, x0 = x1 - z, y0 = y1 - z, x0 > x || y0 > y); - break; - } - } - - if (this._root && this._root.length) this._root = node; - } - - // If the quadtree covers the point already, just return. - else return this; - - this._x0 = x0; - this._y0 = y0; - this._x1 = x1; - this._y1 = y1; - return this; -}; - -var tree_data = function() { - var data = []; - this.visit(function(node) { - if (!node.length) do data.push(node.data); while (node = node.next) - }); - return data; -}; - -var tree_extent = function(_) { - return arguments.length - ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) - : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; -}; - -var Quad = function(node, x0, y0, x1, y1) { - this.node = node; - this.x0 = x0; - this.y0 = y0; - this.x1 = x1; - this.y1 = y1; -}; - -var tree_find = function(x, y, radius) { - var data, - x0 = this._x0, - y0 = this._y0, - x1, - y1, - x2, - y2, - x3 = this._x1, - y3 = this._y1, - quads = [], - node = this._root, - q, - i; - - if (node) quads.push(new Quad(node, x0, y0, x3, y3)); - if (radius == null) radius = Infinity; - else { - x0 = x - radius, y0 = y - radius; - x3 = x + radius, y3 = y + radius; - radius *= radius; - } - - while (q = quads.pop()) { - - // Stop searching if this quadrant can’t contain a closer node. - if (!(node = q.node) - || (x1 = q.x0) > x3 - || (y1 = q.y0) > y3 - || (x2 = q.x1) < x0 - || (y2 = q.y1) < y0) continue; - - // Bisect the current quadrant. - if (node.length) { - var xm = (x1 + x2) / 2, - ym = (y1 + y2) / 2; - - quads.push( - new Quad(node[3], xm, ym, x2, y2), - new Quad(node[2], x1, ym, xm, y2), - new Quad(node[1], xm, y1, x2, ym), - new Quad(node[0], x1, y1, xm, ym) - ); - - // Visit the closest quadrant first. - if (i = (y >= ym) << 1 | (x >= xm)) { - q = quads[quads.length - 1]; - quads[quads.length - 1] = quads[quads.length - 1 - i]; - quads[quads.length - 1 - i] = q; - } - } - - // Visit this point. (Visiting coincident points isn’t necessary!) - else { - var dx = x - +this._x.call(null, node.data), - dy = y - +this._y.call(null, node.data), - d2 = dx * dx + dy * dy; - if (d2 < radius) { - var d = Math.sqrt(radius = d2); - x0 = x - d, y0 = y - d; - x3 = x + d, y3 = y + d; - data = node.data; - } - } - } - - return data; -}; - -var tree_remove = function(d) { - if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points - - var parent, - node = this._root, - retainer, - previous, - next, - x0 = this._x0, - y0 = this._y0, - x1 = this._x1, - y1 = this._y1, - x, - y, - xm, - ym, - right, - bottom, - i, - j; - - // If the tree is empty, initialize the root as a leaf. - if (!node) return this; - - // Find the leaf node for the point. - // While descending, also retain the deepest parent with a non-removed sibling. - if (node.length) while (true) { - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - if (!(parent = node, node = node[i = bottom << 1 | right])) return this; - if (!node.length) break; - if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i; - } - - // Find the point to remove. - while (node.data !== d) if (!(previous = node, node = node.next)) return this; - if (next = node.next) delete node.next; - - // If there are multiple coincident points, remove just the point. - if (previous) return (next ? previous.next = next : delete previous.next), this; - - // If this is the root point, remove it. - if (!parent) return this._root = next, this; - - // Remove this leaf. - next ? parent[i] = next : delete parent[i]; - - // If the parent now contains exactly one leaf, collapse superfluous parents. - if ((node = parent[0] || parent[1] || parent[2] || parent[3]) - && node === (parent[3] || parent[2] || parent[1] || parent[0]) - && !node.length) { - if (retainer) retainer[j] = node; - else this._root = node; - } - - return this; -}; - -function removeAll(data) { - for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]); - return this; -} - -var tree_root = function() { - return this._root; -}; - -var tree_size = function() { - var size = 0; - this.visit(function(node) { - if (!node.length) do ++size; while (node = node.next) - }); - return size; -}; - -var tree_visit = function(callback) { - var quads = [], q, node = this._root, child, x0, y0, x1, y1; - if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1)); - while (q = quads.pop()) { - if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) { - var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; - if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); - if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); - if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); - if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); - } - } - return this; -}; - -var tree_visitAfter = function(callback) { - var quads = [], next = [], q; - if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1)); - while (q = quads.pop()) { - var node = q.node; - if (node.length) { - var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; - if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); - if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); - if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); - if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); - } - next.push(q); - } - while (q = next.pop()) { - callback(q.node, q.x0, q.y0, q.x1, q.y1); - } - return this; -}; - -function defaultX(d) { - return d[0]; -} - -var tree_x = function(_) { - return arguments.length ? (this._x = _, this) : this._x; -}; - -function defaultY(d) { - return d[1]; -} - -var tree_y = function(_) { - return arguments.length ? (this._y = _, this) : this._y; -}; - -function quadtree(nodes, x, y) { - var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN); - return nodes == null ? tree : tree.addAll(nodes); -} - -function Quadtree(x, y, x0, y0, x1, y1) { - this._x = x; - this._y = y; - this._x0 = x0; - this._y0 = y0; - this._x1 = x1; - this._y1 = y1; - this._root = undefined; -} - -function leaf_copy(leaf) { - var copy = {data: leaf.data}, next = copy; - while (leaf = leaf.next) next = next.next = {data: leaf.data}; - return copy; -} - -var treeProto = quadtree.prototype = Quadtree.prototype; - -treeProto.copy = function() { - var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), - node = this._root, - nodes, - child; - - if (!node) return copy; - - if (!node.length) return copy._root = leaf_copy(node), copy; - - nodes = [{source: node, target: copy._root = new Array(4)}]; - while (node = nodes.pop()) { - for (var i = 0; i < 4; ++i) { - if (child = node.source[i]) { - if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)}); - else node.target[i] = leaf_copy(child); - } - } - } - - return copy; -}; - -treeProto.add = tree_add; -treeProto.addAll = addAll; -treeProto.cover = tree_cover; -treeProto.data = tree_data; -treeProto.extent = tree_extent; -treeProto.find = tree_find; -treeProto.remove = tree_remove; -treeProto.removeAll = removeAll; -treeProto.root = tree_root; -treeProto.size = tree_size; -treeProto.visit = tree_visit; -treeProto.visitAfter = tree_visitAfter; -treeProto.x = tree_x; -treeProto.y = tree_y; - -exports.quadtree = quadtree; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{}],113:[function(require,module,exports){ -// https://d3js.org/d3-timer/ Version 1.0.5. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); -}(this, (function (exports) { 'use strict'; - -var frame = 0; -var timeout = 0; -var interval = 0; -var pokeDelay = 1000; -var taskHead; -var taskTail; -var clockLast = 0; -var clockNow = 0; -var clockSkew = 0; -var clock = typeof performance === "object" && performance.now ? performance : Date; -var setFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : function(f) { setTimeout(f, 17); }; - -function now() { - return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); -} - -function clearNow() { - clockNow = 0; -} - -function Timer() { - this._call = - this._time = - this._next = null; -} - -Timer.prototype = timer.prototype = { - constructor: Timer, - restart: function(callback, delay, time) { - if (typeof callback !== "function") throw new TypeError("callback is not a function"); - time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); - if (!this._next && taskTail !== this) { - if (taskTail) taskTail._next = this; - else taskHead = this; - taskTail = this; - } - this._call = callback; - this._time = time; - sleep(); - }, - stop: function() { - if (this._call) { - this._call = null; - this._time = Infinity; - sleep(); - } - } -}; - -function timer(callback, delay, time) { - var t = new Timer; - t.restart(callback, delay, time); - return t; -} - -function timerFlush() { - now(); // Get the current time, if not already set. - ++frame; // Pretend we’ve set an alarm, if we haven’t already. - var t = taskHead, e; - while (t) { - if ((e = clockNow - t._time) >= 0) t._call.call(null, e); - t = t._next; - } - --frame; -} - -function wake() { - clockNow = (clockLast = clock.now()) + clockSkew; - frame = timeout = 0; - try { - timerFlush(); - } finally { - frame = 0; - nap(); - clockNow = 0; - } -} - -function poke() { - var now = clock.now(), delay = now - clockLast; - if (delay > pokeDelay) clockSkew -= delay, clockLast = now; -} - -function nap() { - var t0, t1 = taskHead, t2, time = Infinity; - while (t1) { - if (t1._call) { - if (time > t1._time) time = t1._time; - t0 = t1, t1 = t1._next; - } else { - t2 = t1._next, t1._next = null; - t1 = t0 ? t0._next = t2 : taskHead = t2; - } - } - taskTail = t0; - sleep(time); -} - -function sleep(time) { - if (frame) return; // Soonest alarm already set, or will be. - if (timeout) timeout = clearTimeout(timeout); - var delay = time - clockNow; - if (delay > 24) { - if (time < Infinity) timeout = setTimeout(wake, delay); - if (interval) interval = clearInterval(interval); - } else { - if (!interval) clockLast = clockNow, interval = setInterval(poke, pokeDelay); - frame = 1, setFrame(wake); - } -} - -var timeout$1 = function(callback, delay, time) { - var t = new Timer; - delay = delay == null ? 0 : +delay; - t.restart(function(elapsed) { - t.stop(); - callback(elapsed + delay); - }, delay, time); - return t; -}; - -var interval$1 = function(callback, delay, time) { - var t = new Timer, total = delay; - if (delay == null) return t.restart(callback, delay, time), t; - delay = +delay, time = time == null ? now() : +time; - t.restart(function tick(elapsed) { - elapsed += total; - t.restart(tick, total += delay, time); - callback(elapsed); - }, delay, time); - return t; -}; - -exports.now = now; -exports.timer = timer; -exports.timerFlush = timerFlush; -exports.timeout = timeout$1; -exports.interval = interval$1; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{}],114:[function(require,module,exports){ -!function() { - var d3 = { - version: "3.5.17" - }; - var d3_arraySlice = [].slice, d3_array = function(list) { - return d3_arraySlice.call(list); - }; - var d3_document = this.document; - function d3_documentElement(node) { - return node && (node.ownerDocument || node.document || node).documentElement; - } - function d3_window(node) { - return node && (node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView); - } - if (d3_document) { - try { - d3_array(d3_document.documentElement.childNodes)[0].nodeType; - } catch (e) { - d3_array = function(list) { - var i = list.length, array = new Array(i); - while (i--) array[i] = list[i]; - return array; - }; - } - } - if (!Date.now) Date.now = function() { - return +new Date(); - }; - if (d3_document) { - try { - d3_document.createElement("DIV").style.setProperty("opacity", 0, ""); - } catch (error) { - var d3_element_prototype = this.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = this.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty; - d3_element_prototype.setAttribute = function(name, value) { - d3_element_setAttribute.call(this, name, value + ""); - }; - d3_element_prototype.setAttributeNS = function(space, local, value) { - d3_element_setAttributeNS.call(this, space, local, value + ""); - }; - d3_style_prototype.setProperty = function(name, value, priority) { - d3_style_setProperty.call(this, name, value + "", priority); - }; - } - } - d3.ascending = d3_ascending; - function d3_ascending(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; - } - d3.descending = function(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; - }; - d3.min = function(array, f) { - var i = -1, n = array.length, a, b; - if (arguments.length === 1) { - while (++i < n) if ((b = array[i]) != null && b >= b) { - a = b; - break; - } - while (++i < n) if ((b = array[i]) != null && a > b) a = b; - } else { - while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { - a = b; - break; - } - while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b; - } - return a; - }; - d3.max = function(array, f) { - var i = -1, n = array.length, a, b; - if (arguments.length === 1) { - while (++i < n) if ((b = array[i]) != null && b >= b) { - a = b; - break; - } - while (++i < n) if ((b = array[i]) != null && b > a) a = b; - } else { - while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { - a = b; - break; - } - while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b; - } - return a; - }; - d3.extent = function(array, f) { - var i = -1, n = array.length, a, b, c; - if (arguments.length === 1) { - while (++i < n) if ((b = array[i]) != null && b >= b) { - a = c = b; - break; - } - while (++i < n) if ((b = array[i]) != null) { - if (a > b) a = b; - if (c < b) c = b; - } - } else { - while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { - a = c = b; - break; - } - while (++i < n) if ((b = f.call(array, array[i], i)) != null) { - if (a > b) a = b; - if (c < b) c = b; - } - } - return [ a, c ]; - }; - function d3_number(x) { - return x === null ? NaN : +x; - } - function d3_numeric(x) { - return !isNaN(x); - } - d3.sum = function(array, f) { - var s = 0, n = array.length, a, i = -1; - if (arguments.length === 1) { - while (++i < n) if (d3_numeric(a = +array[i])) s += a; - } else { - while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a; - } - return s; - }; - d3.mean = function(array, f) { - var s = 0, n = array.length, a, i = -1, j = n; - if (arguments.length === 1) { - while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j; - } else { - while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j; - } - if (j) return s / j; - }; - d3.quantile = function(values, p) { - var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h; - return e ? v + e * (values[h] - v) : v; - }; - d3.median = function(array, f) { - var numbers = [], n = array.length, a, i = -1; - if (arguments.length === 1) { - while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a); - } else { - while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a); - } - if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), .5); - }; - d3.variance = function(array, f) { - var n = array.length, m = 0, a, d, s = 0, i = -1, j = 0; - if (arguments.length === 1) { - while (++i < n) { - if (d3_numeric(a = d3_number(array[i]))) { - d = a - m; - m += d / ++j; - s += d * (a - m); - } - } - } else { - while (++i < n) { - if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) { - d = a - m; - m += d / ++j; - s += d * (a - m); - } - } - } - if (j > 1) return s / (j - 1); - }; - d3.deviation = function() { - var v = d3.variance.apply(this, arguments); - return v ? Math.sqrt(v) : v; - }; - function d3_bisector(compare) { - return { - left: function(a, x, lo, hi) { - if (arguments.length < 3) lo = 0; - if (arguments.length < 4) hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid; - } - return lo; - }, - right: function(a, x, lo, hi) { - if (arguments.length < 3) lo = 0; - if (arguments.length < 4) hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1; - } - return lo; - } - }; - } - var d3_bisect = d3_bisector(d3_ascending); - d3.bisectLeft = d3_bisect.left; - d3.bisect = d3.bisectRight = d3_bisect.right; - d3.bisector = function(f) { - return d3_bisector(f.length === 1 ? function(d, x) { - return d3_ascending(f(d), x); - } : f); - }; - d3.shuffle = function(array, i0, i1) { - if ((m = arguments.length) < 3) { - i1 = array.length; - if (m < 2) i0 = 0; - } - var m = i1 - i0, t, i; - while (m) { - i = Math.random() * m-- | 0; - t = array[m + i0], array[m + i0] = array[i + i0], array[i + i0] = t; - } - return array; - }; - d3.permute = function(array, indexes) { - var i = indexes.length, permutes = new Array(i); - while (i--) permutes[i] = array[indexes[i]]; - return permutes; - }; - d3.pairs = function(array) { - var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n); - while (i < n) pairs[i] = [ p0 = p1, p1 = array[++i] ]; - return pairs; - }; - d3.transpose = function(matrix) { - if (!(n = matrix.length)) return []; - for (var i = -1, m = d3.min(matrix, d3_transposeLength), transpose = new Array(m); ++i < m; ) { - for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n; ) { - row[j] = matrix[j][i]; - } - } - return transpose; - }; - function d3_transposeLength(d) { - return d.length; - } - d3.zip = function() { - return d3.transpose(arguments); - }; - d3.keys = function(map) { - var keys = []; - for (var key in map) keys.push(key); - return keys; - }; - d3.values = function(map) { - var values = []; - for (var key in map) values.push(map[key]); - return values; - }; - d3.entries = function(map) { - var entries = []; - for (var key in map) entries.push({ - key: key, - value: map[key] - }); - return entries; - }; - d3.merge = function(arrays) { - var n = arrays.length, m, i = -1, j = 0, merged, array; - while (++i < n) j += arrays[i].length; - merged = new Array(j); - while (--n >= 0) { - array = arrays[n]; - m = array.length; - while (--m >= 0) { - merged[--j] = array[m]; - } - } - return merged; - }; - var abs = Math.abs; - d3.range = function(start, stop, step) { - if (arguments.length < 3) { - step = 1; - if (arguments.length < 2) { - stop = start; - start = 0; - } - } - if ((stop - start) / step === Infinity) throw new Error("infinite range"); - var range = [], k = d3_range_integerScale(abs(step)), i = -1, j; - start *= k, stop *= k, step *= k; - if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k); - return range; - }; - function d3_range_integerScale(x) { - var k = 1; - while (x * k % 1) k *= 10; - return k; - } - function d3_class(ctor, properties) { - for (var key in properties) { - Object.defineProperty(ctor.prototype, key, { - value: properties[key], - enumerable: false - }); - } - } - d3.map = function(object, f) { - var map = new d3_Map(); - if (object instanceof d3_Map) { - object.forEach(function(key, value) { - map.set(key, value); - }); - } else if (Array.isArray(object)) { - var i = -1, n = object.length, o; - if (arguments.length === 1) while (++i < n) map.set(i, object[i]); else while (++i < n) map.set(f.call(object, o = object[i], i), o); - } else { - for (var key in object) map.set(key, object[key]); - } - return map; - }; - function d3_Map() { - this._ = Object.create(null); - } - var d3_map_proto = "__proto__", d3_map_zero = "\x00"; - d3_class(d3_Map, { - has: d3_map_has, - get: function(key) { - return this._[d3_map_escape(key)]; - }, - set: function(key, value) { - return this._[d3_map_escape(key)] = value; - }, - remove: d3_map_remove, - keys: d3_map_keys, - values: function() { - var values = []; - for (var key in this._) values.push(this._[key]); - return values; - }, - entries: function() { - var entries = []; - for (var key in this._) entries.push({ - key: d3_map_unescape(key), - value: this._[key] - }); - return entries; - }, - size: d3_map_size, - empty: d3_map_empty, - forEach: function(f) { - for (var key in this._) f.call(this, d3_map_unescape(key), this._[key]); - } - }); - function d3_map_escape(key) { - return (key += "") === d3_map_proto || key[0] === d3_map_zero ? d3_map_zero + key : key; - } - function d3_map_unescape(key) { - return (key += "")[0] === d3_map_zero ? key.slice(1) : key; - } - function d3_map_has(key) { - return d3_map_escape(key) in this._; - } - function d3_map_remove(key) { - return (key = d3_map_escape(key)) in this._ && delete this._[key]; - } - function d3_map_keys() { - var keys = []; - for (var key in this._) keys.push(d3_map_unescape(key)); - return keys; - } - function d3_map_size() { - var size = 0; - for (var key in this._) ++size; - return size; - } - function d3_map_empty() { - for (var key in this._) return false; - return true; + function d3_map_empty() { + for (var key in this._) return false; + return true; } d3.nest = function() { var nest = {}, keys = [], sortKeys = [], sortValues, rollup; @@ -25748,7 +22412,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); }); if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3; }(); -},{}],115:[function(require,module,exports){ +},{}],108:[function(require,module,exports){ "use strict" var ch = require("incremental-convex-hull") @@ -25908,7 +22572,7 @@ function triangulate(points, includePointAtInfinity) { return hull } -},{"incremental-convex-hull":280,"uniq":530}],116:[function(require,module,exports){ +},{"incremental-convex-hull":273,"uniq":523}],109:[function(require,module,exports){ (function (Buffer){ var hasTypedArrays = false if(typeof Float64Array !== "undefined") { @@ -26012,7 +22676,7 @@ module.exports.denormalized = function(n) { return !(hi & 0x7ff00000) } }).call(this,require("buffer").Buffer) -},{"buffer":69}],117:[function(require,module,exports){ +},{"buffer":70}],110:[function(require,module,exports){ "use strict" function dupe_array(count, value, i) { @@ -26062,7 +22726,7 @@ function dupe(count, value) { } module.exports = dupe -},{}],118:[function(require,module,exports){ +},{}],111:[function(require,module,exports){ 'use strict'; module.exports = earcut; @@ -26708,7 +23372,7 @@ earcut.flatten = function (data) { return result; }; -},{}],119:[function(require,module,exports){ +},{}],112:[function(require,module,exports){ "use strict" module.exports = edgeToAdjacency @@ -26742,7 +23406,7 @@ function edgeToAdjacency(edges, numVertices) { } return adj } -},{"uniq":530}],120:[function(require,module,exports){ +},{"uniq":523}],113:[function(require,module,exports){ (function (process,global){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. @@ -27899,7 +24563,7 @@ return Promise; }))); }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":475}],121:[function(require,module,exports){ +},{"_process":468}],114:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -28203,7 +24867,7 @@ function isUndefined(arg) { return arg === void 0; } -},{}],122:[function(require,module,exports){ +},{}],115:[function(require,module,exports){ "use strict" module.exports = extractPlanes @@ -28220,7 +24884,7 @@ function extractPlanes(M, zNear, zFar) { [ zf*M[12] - M[8], zf*M[13] - M[9], zf*M[14] - M[10], zf*M[15] - M[11] ] ] } -},{}],123:[function(require,module,exports){ +},{}],116:[function(require,module,exports){ /** * inspired by is-number * but significantly simplified and sped up by ignoring number and string constructors @@ -28277,7 +24941,7 @@ module.exports = function(n) { return n - n < 1; }; -},{}],124:[function(require,module,exports){ +},{}],117:[function(require,module,exports){ 'use strict'; module.exports = createFilter; @@ -28361,7 +25025,7 @@ function compare(a, b) { return a < b ? -1 : a > b ? 1 : 0; } -},{}],125:[function(require,module,exports){ +},{}],118:[function(require,module,exports){ 'use strict' module.exports = createFilteredVector @@ -28654,7 +25318,7 @@ function createFilteredVector(initState, initVelocity, initTime) { } } -},{"binary-search-bounds":58,"cubic-hermite":101}],126:[function(require,module,exports){ +},{"binary-search-bounds":59,"cubic-hermite":102}],119:[function(require,module,exports){ 'use strict' var SDF = require('tiny-sdf') @@ -28738,7 +25402,7 @@ function atlas(options) { return canvas } -},{"tiny-sdf":520}],127:[function(require,module,exports){ +},{"tiny-sdf":513}],120:[function(require,module,exports){ "use strict" module.exports = createRBTree @@ -29735,7 +26399,7 @@ function defaultCompare(a, b) { function createRBTree(compare) { return new RedBlackTree(compare || defaultCompare, null) } -},{}],128:[function(require,module,exports){ +},{}],121:[function(require,module,exports){ // transliterated from the python snippet here: // http://en.wikipedia.org/wiki/Lanczos_approximation @@ -29804,7 +26468,7 @@ module.exports = function gamma (z) { module.exports.log = lngamma; -},{}],129:[function(require,module,exports){ +},{}],122:[function(require,module,exports){ var wgs84 = require('wgs84'); module.exports.geometry = geometry; @@ -29870,7 +26534,7 @@ function rad(_) { return _ * Math.PI / 180; } -},{"wgs84":552}],130:[function(require,module,exports){ +},{"wgs84":545}],123:[function(require,module,exports){ var geojsonArea = require('geojson-area'); module.exports = rewind; @@ -29921,7 +26585,7 @@ function cw(_) { return geojsonArea.ring(_) >= 0; } -},{"geojson-area":129}],131:[function(require,module,exports){ +},{"geojson-area":122}],124:[function(require,module,exports){ 'use strict'; module.exports = clip; @@ -30072,7 +26736,7 @@ function newSlice(slices, slice, area, dist, outer) { return []; } -},{"./feature":133}],132:[function(require,module,exports){ +},{"./feature":126}],125:[function(require,module,exports){ 'use strict'; module.exports = convert; @@ -30195,7 +26859,7 @@ function calcSize(points) { points.dist = dist; } -},{"./feature":133,"./simplify":135}],133:[function(require,module,exports){ +},{"./feature":126,"./simplify":128}],126:[function(require,module,exports){ 'use strict'; module.exports = createFeature; @@ -30240,7 +26904,7 @@ function calcRingBBox(min, max, points) { } } -},{}],134:[function(require,module,exports){ +},{}],127:[function(require,module,exports){ 'use strict'; module.exports = geojsonvt; @@ -30484,7 +27148,7 @@ function isClippedSquare(tile, extent, buffer) { return true; } -},{"./clip":131,"./convert":132,"./tile":136,"./transform":137,"./wrap":138}],135:[function(require,module,exports){ +},{"./clip":124,"./convert":125,"./tile":129,"./transform":130,"./wrap":131}],128:[function(require,module,exports){ 'use strict'; module.exports = simplify; @@ -30560,7 +27224,7 @@ function getSqSegDist(p, a, b) { return dx * dx + dy * dy; } -},{}],136:[function(require,module,exports){ +},{}],129:[function(require,module,exports){ 'use strict'; module.exports = createTile; @@ -30668,7 +27332,7 @@ function signedArea(ring) { return sum; } -},{}],137:[function(require,module,exports){ +},{}],130:[function(require,module,exports){ 'use strict'; exports.tile = transformTile; @@ -30711,7 +27375,7 @@ function transformPoint(p, extent, z2, tx, ty) { return [x, y]; } -},{}],138:[function(require,module,exports){ +},{}],131:[function(require,module,exports){ 'use strict'; var clip = require('./clip'); @@ -30769,7 +27433,7 @@ function shiftCoords(points, offset) { return newPoints; } -},{"./clip":131,"./feature":133}],139:[function(require,module,exports){ +},{"./clip":124,"./feature":126}],132:[function(require,module,exports){ module.exports = getCanvasContext function getCanvasContext (type, opts) { if (typeof type !== 'string') { @@ -30809,7 +27473,7 @@ function getCanvasContext (type, opts) { return (gl || null) // ensure null on fail } -},{}],140:[function(require,module,exports){ +},{}],133:[function(require,module,exports){ 'use strict' module.exports = createAxes @@ -31332,7 +27996,7 @@ function createAxes(gl, options) { return axes } -},{"./lib/background.js":141,"./lib/cube.js":142,"./lib/lines.js":143,"./lib/text.js":145,"./lib/ticks.js":146}],141:[function(require,module,exports){ +},{"./lib/background.js":134,"./lib/cube.js":135,"./lib/lines.js":136,"./lib/text.js":138,"./lib/ticks.js":139}],134:[function(require,module,exports){ 'use strict' module.exports = createBackgroundCube @@ -31444,7 +28108,7 @@ function createBackgroundCube(gl) { return new BackgroundCube(gl, buffer, vao, shader) } -},{"./shaders":144,"gl-buffer":148,"gl-vao":262}],142:[function(require,module,exports){ +},{"./shaders":137,"gl-buffer":141,"gl-vao":255}],135:[function(require,module,exports){ "use strict" module.exports = getCubeEdges @@ -31685,7 +28349,7 @@ function getCubeEdges(model, view, projection, bounds) { //Return result return CUBE_RESULT } -},{"bit-twiddle":59,"gl-mat4/invert":172,"gl-mat4/multiply":174,"robust-orientation":496,"split-polygon":514}],143:[function(require,module,exports){ +},{"bit-twiddle":60,"gl-mat4/invert":165,"gl-mat4/multiply":167,"robust-orientation":489,"split-polygon":507}],136:[function(require,module,exports){ 'use strict' module.exports = createLines @@ -31891,7 +28555,7 @@ function createLines(gl, bounds, ticks) { return new Lines(gl, vertBuf, vao, shader, tickCount, tickOffset, gridCount, gridOffset) } -},{"./shaders":144,"gl-buffer":148,"gl-vao":262}],144:[function(require,module,exports){ +},{"./shaders":137,"gl-buffer":141,"gl-vao":255}],137:[function(require,module,exports){ 'use strict' @@ -31922,7 +28586,7 @@ exports.bg = function(gl) { ]) } -},{"gl-shader":246}],145:[function(require,module,exports){ +},{"gl-shader":239}],138:[function(require,module,exports){ (function (process){ "use strict" @@ -32124,7 +28788,7 @@ function createTextSprites( } }).call(this,require('_process')) -},{"./shaders":144,"_process":475,"gl-buffer":148,"gl-vao":262,"vectorize-text":541}],146:[function(require,module,exports){ +},{"./shaders":137,"_process":468,"gl-buffer":141,"gl-vao":255,"vectorize-text":534}],139:[function(require,module,exports){ 'use strict' exports.create = defaultTicks @@ -32205,7 +28869,7 @@ function ticksEqual(ticksA, ticksB) { } return true } -},{}],147:[function(require,module,exports){ +},{}],140:[function(require,module,exports){ "use strict" module.exports = axesProperties @@ -32347,7 +29011,7 @@ i_loop: return ranges } -},{"./lib/cube.js":142,"extract-frustum-planes":122,"gl-mat4/multiply":174,"gl-mat4/transpose":182,"gl-vec4/transformMat4":268,"split-polygon":514}],148:[function(require,module,exports){ +},{"./lib/cube.js":135,"extract-frustum-planes":115,"gl-mat4/multiply":167,"gl-mat4/transpose":175,"gl-vec4/transformMat4":261,"split-polygon":507}],141:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -32501,7 +29165,7 @@ function createBuffer(gl, data, type, usage) { module.exports = createBuffer -},{"ndarray":456,"ndarray-ops":450,"typedarray-pool":528}],149:[function(require,module,exports){ +},{"ndarray":449,"ndarray-ops":443,"typedarray-pool":521}],142:[function(require,module,exports){ module.exports = { 0: 'NONE', 1: 'ONE', @@ -32801,14 +29465,14 @@ module.exports = { 37444: 'BROWSER_DEFAULT_WEBGL' } -},{}],150:[function(require,module,exports){ +},{}],143:[function(require,module,exports){ var gl10 = require('./1.0/numbers') module.exports = function lookupConstant (number) { return gl10[number] } -},{"./1.0/numbers":149}],151:[function(require,module,exports){ +},{"./1.0/numbers":142}],144:[function(require,module,exports){ 'use strict' var createShader = require('gl-shader') @@ -33073,7 +29737,7 @@ function createError2D (plot, options) { return errorBars } -},{"./lib/shaders":152,"gl-buffer":148,"gl-shader":246,"typedarray-pool":528}],152:[function(require,module,exports){ +},{"./lib/shaders":145,"gl-buffer":141,"gl-shader":239,"typedarray-pool":521}],145:[function(require,module,exports){ module.exports = { @@ -33081,7 +29745,7 @@ module.exports = { fragment: "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n" } -},{}],153:[function(require,module,exports){ +},{}],146:[function(require,module,exports){ 'use strict' module.exports = createErrorBars @@ -33318,7 +29982,7 @@ function createErrorBars(options) { return result } -},{"./shaders/index":154,"gl-buffer":148,"gl-vao":262}],154:[function(require,module,exports){ +},{"./shaders/index":147,"gl-buffer":141,"gl-vao":255}],147:[function(require,module,exports){ 'use strict' @@ -33335,7 +29999,7 @@ module.exports = function(gl) { ]) } -},{"gl-shader":246}],155:[function(require,module,exports){ +},{"gl-shader":239}],148:[function(require,module,exports){ 'use strict' var createTexture = require('gl-texture2d') @@ -33802,7 +30466,7 @@ function createFBO(gl, width, height, options) { WEBGL_draw_buffers) } -},{"gl-texture2d":258}],156:[function(require,module,exports){ +},{"gl-texture2d":251}],149:[function(require,module,exports){ var sprintf = require('sprintf-js').sprintf; var glConstants = require('gl-constants/lookup'); @@ -33857,7 +30521,7 @@ function formatCompilerError(errLog, src, type) { } -},{"add-line-numbers":34,"gl-constants/lookup":150,"glsl-shader-name":270,"sprintf-js":515}],157:[function(require,module,exports){ +},{"add-line-numbers":35,"gl-constants/lookup":143,"glsl-shader-name":263,"sprintf-js":508}],150:[function(require,module,exports){ 'use strict' module.exports = createHeatmap2D @@ -34175,7 +30839,7 @@ function createHeatmap2D (plot, options) { return heatmap } -},{"./lib/shaders":158,"binary-search-bounds":159,"gl-buffer":148,"gl-shader":246,"iota-array":283,"typedarray-pool":528}],158:[function(require,module,exports){ +},{"./lib/shaders":151,"binary-search-bounds":152,"gl-buffer":141,"gl-shader":239,"iota-array":276,"typedarray-pool":521}],151:[function(require,module,exports){ 'use strict' @@ -34187,9 +30851,9 @@ module.exports = { pickVertex: "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nvoid main() {\n vWeight = weight;\n\n fragId = pickId;\n\n vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n" } -},{}],159:[function(require,module,exports){ -arguments[4][76][0].apply(exports,arguments) -},{"dup":76}],160:[function(require,module,exports){ +},{}],152:[function(require,module,exports){ +arguments[4][77][0].apply(exports,arguments) +},{"dup":77}],153:[function(require,module,exports){ exports.lineVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aHi, aLo, dHi, dLo;\n\nuniform vec2 scaleHi, translateHi, scaleLo, translateLo, screenShape;\nuniform float width;\n\nvarying vec2 direction;\n\n\nvec2 project_1_0(vec2 scHi, vec2 trHi, vec2 scLo, vec2 trLo, vec2 posHi, vec2 posLo) {\n return (posHi + trHi) * scHi\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo;\n}\n\n\nvec2 project_2_1(vec2 scHi, vec2 scLo, vec2 posHi, vec2 posLo) {\n return scHi * posHi\n + scLo * posHi\n + scHi * posLo\n + scLo * posLo;\n}\n\nvoid main() {\n vec2 p = project_1_0(scaleHi, translateHi, scaleLo, translateLo, aHi, aLo);\n vec2 dir = project_2_1(scaleHi, scaleLo, dHi, dLo);\n vec2 n = 0.5 * width * normalize(screenShape.yx * vec2(dir.y, -dir.x)) / screenShape.xy;\n vec2 tangent = normalize(screenShape.xy * dir);\n if(dir.x < 0.0 || (dir.x == 0.0 && dir.y < 0.0)) {\n direction = -tangent;\n } else {\n direction = tangent;\n }\n gl_Position = vec4(p + n, 0.0, 1.0);\n}" @@ -34200,7 +30864,7 @@ exports.pickVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute exports.pickFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 pickOffset;\n\nvarying vec4 pickA, pickB;\n\nvoid main() {\n vec4 fragId = vec4(pickA.xyz, 0.0);\n if(pickB.w > pickA.w) {\n fragId.xyz = pickB.xyz;\n }\n\n fragId += pickOffset;\n\n fragId.y += floor(fragId.x / 256.0);\n fragId.x -= floor(fragId.x / 256.0) * 256.0;\n\n fragId.z += floor(fragId.y / 256.0);\n fragId.y -= floor(fragId.y / 256.0) * 256.0;\n\n fragId.w += floor(fragId.z / 256.0);\n fragId.z -= floor(fragId.z / 256.0) * 256.0;\n\n gl_FragColor = fragId / 255.0;\n}" exports.fillVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aHi, aLo, dHi;\n\nuniform vec2 scaleHi, translateHi, scaleLo, translateLo, projectAxis;\nuniform float projectValue, depth;\n\n\nvec2 project_1_0(vec2 scHi, vec2 trHi, vec2 scLo, vec2 trLo, vec2 posHi, vec2 posLo) {\n return (posHi + trHi) * scHi\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo;\n}\n\n\nvoid main() {\n vec2 p = project_1_0(scaleHi, translateHi, scaleLo, translateLo, aHi, aLo);\n if(dHi.y < 0.0 || (dHi.y == 0.0 && dHi.x < 0.0)) {\n if(dot(p, projectAxis) < projectValue) {\n p = p * (1.0 - abs(projectAxis)) + projectAxis * projectValue;\n }\n }\n gl_Position = vec4(p, depth, 1);\n}" exports.fillFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}" -},{}],161:[function(require,module,exports){ +},{}],154:[function(require,module,exports){ 'use strict' module.exports = createLinePlot @@ -34713,7 +31377,7 @@ function createLinePlot(plot, options) { linePlot.update(options) return linePlot } -},{"./lib/shaders":160,"gl-buffer":148,"gl-shader":246,"gl-texture2d":258,"ndarray":456,"typedarray-pool":528}],162:[function(require,module,exports){ +},{"./lib/shaders":153,"gl-buffer":141,"gl-shader":239,"gl-texture2d":251,"ndarray":449,"typedarray-pool":521}],155:[function(require,module,exports){ var createShader = require('gl-shader') @@ -34737,7 +31401,7 @@ exports.createPickShader = function(gl) { return createShader(gl, vertSrc, pickFrag, null, ATTRIBUTES) } -},{"gl-shader":246}],163:[function(require,module,exports){ +},{"gl-shader":239}],156:[function(require,module,exports){ 'use strict' module.exports = createLinePlot @@ -35107,7 +31771,7 @@ function createLinePlot (options) { return linePlot } -},{"./lib/shaders":162,"binary-search-bounds":58,"gl-buffer":148,"gl-texture2d":258,"gl-vao":262,"glsl-read-float":269,"ndarray":456}],164:[function(require,module,exports){ +},{"./lib/shaders":155,"binary-search-bounds":59,"gl-buffer":141,"gl-texture2d":251,"gl-vao":255,"glsl-read-float":262,"ndarray":449}],157:[function(require,module,exports){ module.exports = invert /** @@ -35136,7 +31800,7 @@ function invert(out, a) { return out } -},{}],165:[function(require,module,exports){ +},{}],158:[function(require,module,exports){ module.exports = invert /** @@ -35175,7 +31839,7 @@ function invert(out, a) { return out } -},{}],166:[function(require,module,exports){ +},{}],159:[function(require,module,exports){ module.exports = clone; /** @@ -35204,7 +31868,7 @@ function clone(a) { out[15] = a[15]; return out; }; -},{}],167:[function(require,module,exports){ +},{}],160:[function(require,module,exports){ module.exports = create; /** @@ -35232,7 +31896,7 @@ function create() { out[15] = 1; return out; }; -},{}],168:[function(require,module,exports){ +},{}],161:[function(require,module,exports){ module.exports = determinant; /** @@ -35263,7 +31927,7 @@ function determinant(a) { // Calculate the determinant return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; }; -},{}],169:[function(require,module,exports){ +},{}],162:[function(require,module,exports){ module.exports = fromQuat; /** @@ -35311,7 +31975,7 @@ function fromQuat(out, q) { return out; }; -},{}],170:[function(require,module,exports){ +},{}],163:[function(require,module,exports){ module.exports = fromRotationTranslation; /** @@ -35365,7 +32029,7 @@ function fromRotationTranslation(out, q, v) { return out; }; -},{}],171:[function(require,module,exports){ +},{}],164:[function(require,module,exports){ module.exports = identity; /** @@ -35393,7 +32057,7 @@ function identity(out) { out[15] = 1; return out; }; -},{}],172:[function(require,module,exports){ +},{}],165:[function(require,module,exports){ module.exports = invert; /** @@ -35449,7 +32113,7 @@ function invert(out, a) { return out; }; -},{}],173:[function(require,module,exports){ +},{}],166:[function(require,module,exports){ var identity = require('./identity'); module.exports = lookAt; @@ -35540,7 +32204,7 @@ function lookAt(out, eye, center, up) { return out; }; -},{"./identity":171}],174:[function(require,module,exports){ +},{"./identity":164}],167:[function(require,module,exports){ module.exports = multiply; /** @@ -35583,7 +32247,7 @@ function multiply(out, a, b) { out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33; return out; }; -},{}],175:[function(require,module,exports){ +},{}],168:[function(require,module,exports){ module.exports = perspective; /** @@ -35617,7 +32281,7 @@ function perspective(out, fovy, aspect, near, far) { out[15] = 0; return out; }; -},{}],176:[function(require,module,exports){ +},{}],169:[function(require,module,exports){ module.exports = rotate; /** @@ -35682,7 +32346,7 @@ function rotate(out, a, rad, axis) { } return out; }; -},{}],177:[function(require,module,exports){ +},{}],170:[function(require,module,exports){ module.exports = rotateX; /** @@ -35727,7 +32391,7 @@ function rotateX(out, a, rad) { out[11] = a23 * c - a13 * s; return out; }; -},{}],178:[function(require,module,exports){ +},{}],171:[function(require,module,exports){ module.exports = rotateY; /** @@ -35772,7 +32436,7 @@ function rotateY(out, a, rad) { out[11] = a03 * s + a23 * c; return out; }; -},{}],179:[function(require,module,exports){ +},{}],172:[function(require,module,exports){ module.exports = rotateZ; /** @@ -35817,7 +32481,7 @@ function rotateZ(out, a, rad) { out[7] = a13 * c - a03 * s; return out; }; -},{}],180:[function(require,module,exports){ +},{}],173:[function(require,module,exports){ module.exports = scale; /** @@ -35849,7 +32513,7 @@ function scale(out, a, v) { out[15] = a[15]; return out; }; -},{}],181:[function(require,module,exports){ +},{}],174:[function(require,module,exports){ module.exports = translate; /** @@ -35888,7 +32552,7 @@ function translate(out, a, v) { return out; }; -},{}],182:[function(require,module,exports){ +},{}],175:[function(require,module,exports){ module.exports = transpose; /** @@ -35938,7 +32602,7 @@ function transpose(out, a) { return out; }; -},{}],183:[function(require,module,exports){ +},{}],176:[function(require,module,exports){ 'use strict' module.exports = invert @@ -35969,7 +32633,7 @@ function invert(out, M) { } return out } -},{"gl-mat2/invert":164,"gl-mat3/invert":165,"gl-mat4/invert":172}],184:[function(require,module,exports){ +},{"gl-mat2/invert":157,"gl-mat3/invert":158,"gl-mat4/invert":165}],177:[function(require,module,exports){ /** * @fileoverview gl-matrix - High performance matrix and vector operations * @author Brandon Jones @@ -36007,7 +32671,7 @@ exports.quat = require("./gl-matrix/quat.js"); exports.vec2 = require("./gl-matrix/vec2.js"); exports.vec3 = require("./gl-matrix/vec3.js"); exports.vec4 = require("./gl-matrix/vec4.js"); -},{"./gl-matrix/common.js":185,"./gl-matrix/mat2.js":186,"./gl-matrix/mat2d.js":187,"./gl-matrix/mat3.js":188,"./gl-matrix/mat4.js":189,"./gl-matrix/quat.js":190,"./gl-matrix/vec2.js":191,"./gl-matrix/vec3.js":192,"./gl-matrix/vec4.js":193}],185:[function(require,module,exports){ +},{"./gl-matrix/common.js":178,"./gl-matrix/mat2.js":179,"./gl-matrix/mat2d.js":180,"./gl-matrix/mat3.js":181,"./gl-matrix/mat4.js":182,"./gl-matrix/quat.js":183,"./gl-matrix/vec2.js":184,"./gl-matrix/vec3.js":185,"./gl-matrix/vec4.js":186}],178:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36079,7 +32743,7 @@ glMatrix.equals = function(a, b) { module.exports = glMatrix; -},{}],186:[function(require,module,exports){ +},{}],179:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36517,7 +33181,7 @@ mat2.multiplyScalarAndAdd = function(out, a, b, scale) { module.exports = mat2; -},{"./common.js":185}],187:[function(require,module,exports){ +},{"./common.js":178}],180:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36988,7 +33652,7 @@ mat2d.equals = function (a, b) { module.exports = mat2d; -},{"./common.js":185}],188:[function(require,module,exports){ +},{"./common.js":178}],181:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -37736,7 +34400,7 @@ mat3.equals = function (a, b) { module.exports = mat3; -},{"./common.js":185}],189:[function(require,module,exports){ +},{"./common.js":178}],182:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -39874,7 +36538,7 @@ mat4.equals = function (a, b) { module.exports = mat4; -},{"./common.js":185}],190:[function(require,module,exports){ +},{"./common.js":178}],183:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -40476,7 +37140,7 @@ quat.equals = vec4.equals; module.exports = quat; -},{"./common.js":185,"./mat3.js":188,"./vec3.js":192,"./vec4.js":193}],191:[function(require,module,exports){ +},{"./common.js":178,"./mat3.js":181,"./vec3.js":185,"./vec4.js":186}],184:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -41065,7 +37729,7 @@ vec2.equals = function (a, b) { module.exports = vec2; -},{"./common.js":185}],192:[function(require,module,exports){ +},{"./common.js":178}],185:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -41844,7 +38508,7 @@ vec3.equals = function (a, b) { module.exports = vec3; -},{"./common.js":185}],193:[function(require,module,exports){ +},{"./common.js":178}],186:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -42455,7 +39119,7 @@ vec4.equals = function (a, b) { module.exports = vec4; -},{"./common.js":185}],194:[function(require,module,exports){ +},{"./common.js":178}],187:[function(require,module,exports){ 'use strict' var barycentric = require('barycentric') @@ -42553,7 +39217,7 @@ function closestPointToPickLocation(simplex, pixelCoord, model, view, projection } return [closestIndex, interpolate(simplex, weights), weights] } -},{"barycentric":41,"polytope-closest-point/lib/closest_point_2d.js":474}],195:[function(require,module,exports){ +},{"barycentric":42,"polytope-closest-point/lib/closest_point_2d.js":467}],188:[function(require,module,exports){ var triVertSrc = "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec4 m_position = model * vec4(position, 1.0);\n vec4 t_position = view * m_position;\n gl_Position = projection * t_position;\n f_color = color;\n f_normal = normal;\n f_data = position;\n f_eyeDirection = eyePosition - position;\n f_lightDirection = lightPosition - position;\n f_uv = uv;\n}" @@ -42622,7 +39286,7 @@ exports.contourShader = { ] } -},{}],196:[function(require,module,exports){ +},{}],189:[function(require,module,exports){ 'use strict' var DEFAULT_VERTEX_NORMALS_EPSILON = 1e-6; // may be too large if triangles are very small @@ -43637,7 +40301,7 @@ function createSimplicialMesh(params) { module.exports = createSimplicialMesh -},{"./lib/closest-point":194,"./lib/shaders":195,"colormap":91,"gl-buffer":148,"gl-mat4/invert":172,"gl-mat4/multiply":174,"gl-shader":246,"gl-texture2d":258,"gl-vao":262,"ndarray":456,"normals":458,"simplicial-complex-contour":505,"typedarray-pool":528}],197:[function(require,module,exports){ +},{"./lib/closest-point":187,"./lib/shaders":188,"colormap":92,"gl-buffer":141,"gl-mat4/invert":165,"gl-mat4/multiply":167,"gl-shader":239,"gl-texture2d":251,"gl-vao":255,"ndarray":449,"normals":451,"simplicial-complex-contour":498,"typedarray-pool":521}],190:[function(require,module,exports){ 'use strict' module.exports = createBoxes @@ -43700,7 +40364,7 @@ function createBoxes(plot) { return new Boxes(plot, vbo, shader) } -},{"./shaders":200,"gl-buffer":148,"gl-shader":203}],198:[function(require,module,exports){ +},{"./shaders":193,"gl-buffer":141,"gl-shader":196}],191:[function(require,module,exports){ 'use strict' module.exports = createGrid @@ -43947,7 +40611,7 @@ function createGrid(plot) { return grid } -},{"./shaders":200,"binary-search-bounds":202,"gl-buffer":148,"gl-shader":203}],199:[function(require,module,exports){ +},{"./shaders":193,"binary-search-bounds":195,"gl-buffer":141,"gl-shader":196}],192:[function(require,module,exports){ 'use strict' module.exports = createLines @@ -44012,7 +40676,7 @@ function createLines(plot) { return lines } -},{"./shaders":200,"gl-buffer":148,"gl-shader":203}],200:[function(require,module,exports){ +},{"./shaders":193,"gl-buffer":141,"gl-shader":196}],193:[function(require,module,exports){ 'use strict' @@ -44030,7 +40694,7 @@ module.exports = { tickVert: "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\n\nvoid main() {\n vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\n}\n" } -},{}],201:[function(require,module,exports){ +},{}],194:[function(require,module,exports){ 'use strict' module.exports = createTextElements @@ -44308,9 +40972,9 @@ function createTextElements(plot) { return text } -},{"./shaders":200,"binary-search-bounds":202,"gl-buffer":148,"gl-shader":203,"text-cache":519}],202:[function(require,module,exports){ -arguments[4][76][0].apply(exports,arguments) -},{"dup":76}],203:[function(require,module,exports){ +},{"./shaders":193,"binary-search-bounds":195,"gl-buffer":141,"gl-shader":196,"text-cache":512}],195:[function(require,module,exports){ +arguments[4][77][0].apply(exports,arguments) +},{"dup":77}],196:[function(require,module,exports){ 'use strict' var createUniformWrapper = require('./lib/create-uniforms') @@ -44576,7 +41240,7 @@ function createShader( module.exports = createShader -},{"./lib/GLError":204,"./lib/create-attributes":205,"./lib/create-uniforms":206,"./lib/reflect":207,"./lib/runtime-reflect":208,"./lib/shader-cache":209}],204:[function(require,module,exports){ +},{"./lib/GLError":197,"./lib/create-attributes":198,"./lib/create-uniforms":199,"./lib/reflect":200,"./lib/runtime-reflect":201,"./lib/shader-cache":202}],197:[function(require,module,exports){ function GLError (rawError, shortMessage, longMessage) { this.shortMessage = shortMessage || '' this.longMessage = longMessage || '' @@ -44591,7 +41255,7 @@ GLError.prototype.name = 'GLError' GLError.prototype.constructor = GLError module.exports = GLError -},{}],205:[function(require,module,exports){ +},{}],198:[function(require,module,exports){ 'use strict' module.exports = createAttributeWrapper @@ -44856,7 +41520,7 @@ function createAttributeWrapper( return obj } -},{"./GLError":204}],206:[function(require,module,exports){ +},{"./GLError":197}],199:[function(require,module,exports){ 'use strict' var coallesceUniforms = require('./reflect') @@ -45049,7 +41713,7 @@ function createUniformWrapper(gl, wrapper, uniforms, locations) { } } -},{"./GLError":204,"./reflect":207}],207:[function(require,module,exports){ +},{"./GLError":197,"./reflect":200}],200:[function(require,module,exports){ 'use strict' module.exports = makeReflectTypes @@ -45107,7 +41771,7 @@ function makeReflectTypes(uniforms, useIndex) { } return obj } -},{}],208:[function(require,module,exports){ +},{}],201:[function(require,module,exports){ 'use strict' exports.uniforms = runtimeUniforms @@ -45187,7 +41851,7 @@ function runtimeAttributes(gl, program) { return result } -},{}],209:[function(require,module,exports){ +},{}],202:[function(require,module,exports){ 'use strict' exports.shader = getShaderReference @@ -45325,7 +41989,7 @@ function createProgram(gl, vref, fref, attribs, locations) { return getCache(gl).getProgram(vref, fref, attribs, locations) } -},{"./GLError":204,"gl-format-compiler-error":156,"weakmap-shim":549}],210:[function(require,module,exports){ +},{"./GLError":197,"gl-format-compiler-error":149,"weakmap-shim":542}],203:[function(require,module,exports){ 'use strict' module.exports = createGLPlot2D @@ -45906,7 +42570,7 @@ function createGLPlot2D(options) { return plot } -},{"./lib/box":197,"./lib/grid":198,"./lib/line":199,"./lib/text":201,"gl-select-static":245}],211:[function(require,module,exports){ +},{"./lib/box":190,"./lib/grid":191,"./lib/line":192,"./lib/text":194,"gl-select-static":238}],204:[function(require,module,exports){ var createShader = require('gl-shader') @@ -45917,7 +42581,7 @@ module.exports = function(gl) { return createShader(gl, vertSrc, fragSrc, null, [ { name: 'position', type: 'vec2'}]) } -},{"gl-shader":246}],212:[function(require,module,exports){ +},{"gl-shader":239}],205:[function(require,module,exports){ 'use strict' module.exports = createScene @@ -46682,7 +43346,7 @@ function createScene(options) { return scene } -},{"./lib/shader":211,"3d-view-controls":30,"a-big-triangle":33,"gl-axes3d":140,"gl-axes3d/properties":147,"gl-fbo":155,"gl-mat4/perspective":175,"gl-select-static":245,"gl-spikes3d":255,"is-mobile":285,"mouse-change":441}],213:[function(require,module,exports){ +},{"./lib/shader":204,"3d-view-controls":32,"a-big-triangle":34,"gl-axes3d":133,"gl-axes3d/properties":140,"gl-fbo":148,"gl-mat4/perspective":168,"gl-select-static":238,"gl-spikes3d":248,"is-mobile":278,"mouse-change":434}],206:[function(require,module,exports){ exports.pointVertex = "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform float pointCloud;\n\nhighp float rand(vec2 co) {\n highp float a = 12.9898;\n highp float b = 78.233;\n highp float c = 43758.5453;\n highp float d = dot(co.xy, vec2(a, b));\n highp float e = mod(d, 3.14);\n return fract(sin(e) * c);\n}\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n // if we don't jitter the point size a bit, overall point cloud\n // saturation 'jumps' on zooming, which is disturbing and confusing\n gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);\n if(pointCloud != 0.0) { // pointCloud is truthy\n // get the same square surface as circle would be\n gl_PointSize *= 0.886;\n }\n}" @@ -46690,21 +43354,21 @@ exports.pointFragment = "precision mediump float;\n#define GLSLIFY 1\n\nunif exports.pickVertex = "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n" exports.pickFragment = "precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n" -},{}],214:[function(require,module,exports){ -arguments[4][203][0].apply(exports,arguments) -},{"./lib/GLError":215,"./lib/create-attributes":216,"./lib/create-uniforms":217,"./lib/reflect":218,"./lib/runtime-reflect":219,"./lib/shader-cache":220,"dup":203}],215:[function(require,module,exports){ -arguments[4][204][0].apply(exports,arguments) -},{"dup":204}],216:[function(require,module,exports){ -arguments[4][205][0].apply(exports,arguments) -},{"./GLError":215,"dup":205}],217:[function(require,module,exports){ -arguments[4][206][0].apply(exports,arguments) -},{"./GLError":215,"./reflect":218,"dup":206}],218:[function(require,module,exports){ -arguments[4][207][0].apply(exports,arguments) -},{"dup":207}],219:[function(require,module,exports){ -arguments[4][208][0].apply(exports,arguments) -},{"dup":208}],220:[function(require,module,exports){ -arguments[4][209][0].apply(exports,arguments) -},{"./GLError":215,"dup":209,"gl-format-compiler-error":156,"weakmap-shim":549}],221:[function(require,module,exports){ +},{}],207:[function(require,module,exports){ +arguments[4][196][0].apply(exports,arguments) +},{"./lib/GLError":208,"./lib/create-attributes":209,"./lib/create-uniforms":210,"./lib/reflect":211,"./lib/runtime-reflect":212,"./lib/shader-cache":213,"dup":196}],208:[function(require,module,exports){ +arguments[4][197][0].apply(exports,arguments) +},{"dup":197}],209:[function(require,module,exports){ +arguments[4][198][0].apply(exports,arguments) +},{"./GLError":208,"dup":198}],210:[function(require,module,exports){ +arguments[4][199][0].apply(exports,arguments) +},{"./GLError":208,"./reflect":211,"dup":199}],211:[function(require,module,exports){ +arguments[4][200][0].apply(exports,arguments) +},{"dup":200}],212:[function(require,module,exports){ +arguments[4][201][0].apply(exports,arguments) +},{"dup":201}],213:[function(require,module,exports){ +arguments[4][202][0].apply(exports,arguments) +},{"./GLError":208,"dup":202,"gl-format-compiler-error":149,"weakmap-shim":542}],214:[function(require,module,exports){ 'use strict' var createShader = require('gl-shader') @@ -46924,7 +43588,7 @@ function createPointcloud2D(plot, options) { return result } -},{"./lib/shader":213,"gl-buffer":148,"gl-shader":214,"typedarray-pool":528}],222:[function(require,module,exports){ +},{"./lib/shader":206,"gl-buffer":141,"gl-shader":207,"typedarray-pool":521}],215:[function(require,module,exports){ module.exports = slerp /** @@ -46977,7 +43641,7 @@ function slerp (out, a, b, t) { return out } -},{}],223:[function(require,module,exports){ +},{}],216:[function(require,module,exports){ 'use strict' @@ -46989,23 +43653,23 @@ module.exports = { pickFragment: "precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n gl_FragColor = fragColor;\n}\n" } -},{}],224:[function(require,module,exports){ -arguments[4][76][0].apply(exports,arguments) -},{"dup":76}],225:[function(require,module,exports){ -arguments[4][203][0].apply(exports,arguments) -},{"./lib/GLError":226,"./lib/create-attributes":227,"./lib/create-uniforms":228,"./lib/reflect":229,"./lib/runtime-reflect":230,"./lib/shader-cache":231,"dup":203}],226:[function(require,module,exports){ -arguments[4][204][0].apply(exports,arguments) -},{"dup":204}],227:[function(require,module,exports){ -arguments[4][205][0].apply(exports,arguments) -},{"./GLError":226,"dup":205}],228:[function(require,module,exports){ -arguments[4][206][0].apply(exports,arguments) -},{"./GLError":226,"./reflect":229,"dup":206}],229:[function(require,module,exports){ -arguments[4][207][0].apply(exports,arguments) -},{"dup":207}],230:[function(require,module,exports){ -arguments[4][208][0].apply(exports,arguments) -},{"dup":208}],231:[function(require,module,exports){ -arguments[4][209][0].apply(exports,arguments) -},{"./GLError":226,"dup":209,"gl-format-compiler-error":156,"weakmap-shim":549}],232:[function(require,module,exports){ +},{}],217:[function(require,module,exports){ +arguments[4][77][0].apply(exports,arguments) +},{"dup":77}],218:[function(require,module,exports){ +arguments[4][196][0].apply(exports,arguments) +},{"./lib/GLError":219,"./lib/create-attributes":220,"./lib/create-uniforms":221,"./lib/reflect":222,"./lib/runtime-reflect":223,"./lib/shader-cache":224,"dup":196}],219:[function(require,module,exports){ +arguments[4][197][0].apply(exports,arguments) +},{"dup":197}],220:[function(require,module,exports){ +arguments[4][198][0].apply(exports,arguments) +},{"./GLError":219,"dup":198}],221:[function(require,module,exports){ +arguments[4][199][0].apply(exports,arguments) +},{"./GLError":219,"./reflect":222,"dup":199}],222:[function(require,module,exports){ +arguments[4][200][0].apply(exports,arguments) +},{"dup":200}],223:[function(require,module,exports){ +arguments[4][201][0].apply(exports,arguments) +},{"dup":201}],224:[function(require,module,exports){ +arguments[4][202][0].apply(exports,arguments) +},{"./GLError":219,"dup":202,"gl-format-compiler-error":149,"weakmap-shim":542}],225:[function(require,module,exports){ 'use strict' module.exports = sortLevels @@ -47303,7 +43967,7 @@ function quickSort(left, right, data_levels, data_points, data_ids, data_weights } } -},{}],233:[function(require,module,exports){ +},{}],226:[function(require,module,exports){ 'use strict' var pool = require('typedarray-pool') @@ -47443,7 +44107,7 @@ function snapPoints(points, ids, weights, bounds) { return lod } -},{"./lib/sort":232,"typedarray-pool":528}],234:[function(require,module,exports){ +},{"./lib/sort":225,"typedarray-pool":521}],227:[function(require,module,exports){ 'use strict' module.exports = createFancyScatter2D @@ -47881,20 +44545,20 @@ function createFancyScatter2D(plot, options) { return scatter } -},{"./lib/shaders":223,"binary-search-bounds":224,"clamp":80,"color-id":84,"font-atlas-sdf":126,"gl-buffer":148,"gl-shader":225,"gl-texture2d":258,"ndarray":456,"snap-points-2d":233,"typedarray-pool":528}],235:[function(require,module,exports){ +},{"./lib/shaders":216,"binary-search-bounds":217,"clamp":81,"color-id":85,"font-atlas-sdf":119,"gl-buffer":141,"gl-shader":218,"gl-texture2d":251,"ndarray":449,"snap-points-2d":226,"typedarray-pool":521}],228:[function(require,module,exports){ exports.pointVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 positionHi, positionLo;\nattribute float weight;\n\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform float pointSize, useWeight;\n\nvarying float fragWeight;\n\n\nvec4 pfx_1_0(vec2 scaleHi, vec2 scaleLo, vec2 translateHi, vec2 translateLo, vec2 positionHi, vec2 positionLo) {\n return vec4((positionHi + translateHi) * scaleHi\n + (positionLo + translateLo) * scaleHi\n + (positionHi + translateHi) * scaleLo\n + (positionLo + translateLo) * scaleLo, 0.0, 1.0);\n}\n\nvoid main() {\n gl_Position = pfx_1_0(scaleHi, scaleLo, translateHi, translateLo, positionHi, positionLo);\n gl_PointSize = pointSize;\n fragWeight = mix(1.0, weight, useWeight);\n}" exports.pointFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color, borderColor;\nuniform float centerFraction;\n\nvarying float fragWeight;\n\nfloat smoothStep(float x, float y) {\n return 1.0 / (1.0 + exp(50.0*(x - y)));\n}\n\nvoid main() {\n float radius = length(2.0*gl_PointCoord.xy-1.0);\n if(radius > 1.0) {\n discard;\n }\n vec4 baseColor = mix(borderColor, color, smoothStep(radius, centerFraction));\n float alpha = 1.0 - pow(1.0 - baseColor.a, fragWeight);\n gl_FragColor = vec4(baseColor.rgb * alpha, alpha);\n}" exports.pickVertex = "precision highp float;\n#define GLSLIFY 1\n\nvec4 pfx_1_0(vec2 scaleHi, vec2 scaleLo, vec2 translateHi, vec2 translateLo, vec2 positionHi, vec2 positionLo) {\n return vec4((positionHi + translateHi) * scaleHi\n + (positionLo + translateLo) * scaleHi\n + (positionHi + translateHi) * scaleLo\n + (positionLo + translateLo) * scaleLo, 0.0, 1.0);\n}\n\nattribute vec2 positionHi, positionLo;\nattribute vec4 pickId;\n\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n gl_Position = pfx_1_0(scaleHi, scaleLo, translateHi, translateLo, positionHi, positionLo);\n gl_PointSize = pointSize;\n fragId = id;\n}" exports.pickFragment = "precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}" -},{}],236:[function(require,module,exports){ -arguments[4][76][0].apply(exports,arguments) -},{"dup":76}],237:[function(require,module,exports){ -arguments[4][232][0].apply(exports,arguments) -},{"dup":232}],238:[function(require,module,exports){ -arguments[4][233][0].apply(exports,arguments) -},{"./lib/sort":237,"dup":233,"typedarray-pool":528}],239:[function(require,module,exports){ +},{}],229:[function(require,module,exports){ +arguments[4][77][0].apply(exports,arguments) +},{"dup":77}],230:[function(require,module,exports){ +arguments[4][225][0].apply(exports,arguments) +},{"dup":225}],231:[function(require,module,exports){ +arguments[4][226][0].apply(exports,arguments) +},{"./lib/sort":230,"dup":226,"typedarray-pool":521}],232:[function(require,module,exports){ 'use strict' var createShader = require('gl-shader') @@ -48131,7 +44795,7 @@ function createScatter2D(plot, options) { return result } -},{"./lib/shader":235,"binary-search-bounds":236,"gl-buffer":148,"gl-shader":246,"snap-points-2d":238,"typedarray-pool":528}],240:[function(require,module,exports){ +},{"./lib/shader":228,"binary-search-bounds":229,"gl-buffer":141,"gl-shader":239,"snap-points-2d":231,"typedarray-pool":521}],233:[function(require,module,exports){ "use strict" var vectorizeText = require("vectorize-text") @@ -48177,7 +44841,7 @@ function getGlyph(symbol, font) { //Save cached symbol return fontCache[symbol] = [triSymbol, lineSymbol, bounds] } -},{"vectorize-text":541}],241:[function(require,module,exports){ +},{"vectorize-text":534}],234:[function(require,module,exports){ var createShaderWrapper = require('gl-shader') @@ -48254,7 +44918,7 @@ exports.createPickProject = function(gl) { return createShader(gl, pickProject) } -},{"gl-shader":246}],242:[function(require,module,exports){ +},{"gl-shader":239}],235:[function(require,module,exports){ 'use strict' var createBuffer = require('gl-buffer') @@ -49014,7 +45678,7 @@ function createPointCloud(options) { return pointCloud } -},{"./lib/glyphs":240,"./lib/shaders":241,"gl-buffer":148,"gl-mat4/multiply":174,"gl-vao":262,"typedarray-pool":528}],243:[function(require,module,exports){ +},{"./lib/glyphs":233,"./lib/shaders":234,"gl-buffer":141,"gl-mat4/multiply":167,"gl-vao":255,"typedarray-pool":521}],236:[function(require,module,exports){ 'use strict' @@ -49022,7 +45686,7 @@ function createPointCloud(options) { exports.boxVertex = "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 vertex;\n\nuniform vec2 cornerA, cornerB;\n\nvoid main() {\n gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);\n}\n" exports.boxFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = color;\n}\n" -},{}],244:[function(require,module,exports){ +},{}],237:[function(require,module,exports){ 'use strict' var createShader = require('gl-shader') @@ -49148,7 +45812,7 @@ function createSelectBox(plot, options) { return selectBox } -},{"./lib/shaders":243,"gl-buffer":148,"gl-shader":246}],245:[function(require,module,exports){ +},{"./lib/shaders":236,"gl-buffer":141,"gl-shader":239}],238:[function(require,module,exports){ 'use strict' module.exports = createSelectBuffer @@ -49159,7 +45823,7 @@ var ndarray = require('ndarray') var nextPow2 = require('bit-twiddle').nextPow2 -var selectRange = require('cwise/lib/wrapper')({"args":["array",{"offset":[0,0,1],"array":0},{"offset":[0,0,2],"array":0},{"offset":[0,0,3],"array":0},"scalar","scalar","index"],"pre":{"body":"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}","args":[],"thisVars":["this_closestD2","this_closestX","this_closestY"],"localVars":[]},"body":{"body":"{if(_inline_34_arg0_<255||_inline_34_arg1_<255||_inline_34_arg2_<255||_inline_34_arg3_<255){var _inline_34_l=_inline_34_arg4_-_inline_34_arg6_[0],_inline_34_a=_inline_34_arg5_-_inline_34_arg6_[1],_inline_34_f=_inline_34_l*_inline_34_l+_inline_34_a*_inline_34_a;_inline_34_f>=' @@ -52975,7 +49639,7 @@ module.exports = [ , '}' ] -},{}],277:[function(require,module,exports){ +},{}],270:[function(require,module,exports){ var tokenize = require('./index') module.exports = tokenizeString @@ -52990,7 +49654,7 @@ function tokenizeString(str, opt) { return tokens } -},{"./index":271}],278:[function(require,module,exports){ +},{"./index":264}],271:[function(require,module,exports){ 'use strict'; module.exports = GridIndex; @@ -53152,7 +49816,7 @@ GridIndex.prototype.toArrayBuffer = function() { return array.buffer; }; -},{}],279:[function(require,module,exports){ +},{}],272:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -53238,7 +49902,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],280:[function(require,module,exports){ +},{}],273:[function(require,module,exports){ "use strict" //High level idea: @@ -53685,7 +50349,7 @@ function incrementalConvexHull(points, randomSearch) { //Extract boundary cells return triangles.boundary() } -},{"robust-orientation":496,"simplicial-complex":507}],281:[function(require,module,exports){ +},{"robust-orientation":489,"simplicial-complex":500}],274:[function(require,module,exports){ "use strict" var bounds = require("binary-search-bounds") @@ -54052,7 +50716,7 @@ function createWrapper(intervals) { return new IntervalTree(createIntervalTree(intervals)) } -},{"binary-search-bounds":58}],282:[function(require,module,exports){ +},{"binary-search-bounds":59}],275:[function(require,module,exports){ "use strict" function invertPermutation(pi, result) { @@ -54064,7 +50728,7 @@ function invertPermutation(pi, result) { } module.exports = invertPermutation -},{}],283:[function(require,module,exports){ +},{}],276:[function(require,module,exports){ "use strict" function iota(n) { @@ -54076,7 +50740,7 @@ function iota(n) { } module.exports = iota -},{}],284:[function(require,module,exports){ +},{}],277:[function(require,module,exports){ /*! * Determine if an object is a Buffer * @@ -54099,7 +50763,7 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],285:[function(require,module,exports){ +},{}],278:[function(require,module,exports){ module.exports = isMobile; function isMobile (ua) { @@ -54113,7 +50777,7 @@ function isMobile (ua) { } -},{}],286:[function(require,module,exports){ +},{}],279:[function(require,module,exports){ 'use strict'; var toString = Object.prototype.toString; @@ -54122,7 +50786,7 @@ module.exports = function (x) { return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({})); }; -},{}],287:[function(require,module,exports){ +},{}],280:[function(require,module,exports){ 'use strict'; var sort = require('./sort'); @@ -54168,7 +50832,7 @@ KDBush.prototype = { function defaultGetX(p) { return p[0]; } function defaultGetY(p) { return p[1]; } -},{"./range":288,"./sort":289,"./within":290}],288:[function(require,module,exports){ +},{"./range":281,"./sort":282,"./within":283}],281:[function(require,module,exports){ 'use strict'; module.exports = range; @@ -54216,7 +50880,7 @@ function range(ids, coords, minX, minY, maxX, maxY, nodeSize) { return result; } -},{}],289:[function(require,module,exports){ +},{}],282:[function(require,module,exports){ 'use strict'; module.exports = sortKD; @@ -54284,7 +50948,7 @@ function swap(arr, i, j) { arr[j] = tmp; } -},{}],290:[function(require,module,exports){ +},{}],283:[function(require,module,exports){ 'use strict'; module.exports = within; @@ -54336,7 +51000,7 @@ function sqDist(ax, ay, bx, by) { return dx * dx + dy * dy; } -},{}],291:[function(require,module,exports){ +},{}],284:[function(require,module,exports){ 'use strict'; function createFunction(parameters, defaultType) { @@ -54509,7 +51173,7 @@ module.exports['piecewise-constant'] = function(parameters) { return createFunction(parameters, 'interval'); }; -},{}],292:[function(require,module,exports){ +},{}],285:[function(require,module,exports){ var path = require('path'); @@ -54571,7 +51235,7 @@ module.exports = { module.exports.util = "float evaluate_zoom_function_1(const vec4 values, const float t) {\n if (t < 1.0) {\n return mix(values[0], values[1], t);\n } else if (t < 2.0) {\n return mix(values[1], values[2], t - 1.0);\n } else {\n return mix(values[2], values[3], t - 2.0);\n }\n}\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\n if (t < 1.0) {\n return mix(value0, value1, t);\n } else if (t < 2.0) {\n return mix(value1, value2, t - 1.0);\n } else {\n return mix(value2, value3, t - 2.0);\n }\n}\n"; -},{"path":464}],293:[function(require,module,exports){ +},{"path":457}],286:[function(require,module,exports){ 'use strict'; var format = require('util').format; @@ -54589,7 +51253,7 @@ function ValidationError(key, value /*, message, ...*/) { module.exports = ValidationError; -},{"util":536}],294:[function(require,module,exports){ +},{"util":529}],287:[function(require,module,exports){ 'use strict'; module.exports = function (output) { @@ -54602,7 +51266,7 @@ module.exports = function (output) { return output; }; -},{}],295:[function(require,module,exports){ +},{}],288:[function(require,module,exports){ 'use strict'; module.exports = function getType(val) { @@ -54621,7 +51285,7 @@ module.exports = function getType(val) { } }; -},{}],296:[function(require,module,exports){ +},{}],289:[function(require,module,exports){ 'use strict'; // Turn jsonlint-lines-primitives objects into primitive objects @@ -54633,7 +51297,7 @@ module.exports = function unbundle(value) { } }; -},{}],297:[function(require,module,exports){ +},{}],290:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -54700,7 +51364,7 @@ module.exports = function validate(options) { } }; -},{"../error/validation_error":293,"../util/extend":294,"../util/get_type":295,"./validate_array":298,"./validate_boolean":299,"./validate_color":300,"./validate_constants":301,"./validate_enum":302,"./validate_filter":303,"./validate_function":304,"./validate_layer":306,"./validate_number":308,"./validate_object":309,"./validate_source":311,"./validate_string":312}],298:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/extend":287,"../util/get_type":288,"./validate_array":291,"./validate_boolean":292,"./validate_color":293,"./validate_constants":294,"./validate_enum":295,"./validate_filter":296,"./validate_function":297,"./validate_layer":299,"./validate_number":301,"./validate_object":302,"./validate_source":304,"./validate_string":305}],291:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -54754,7 +51418,7 @@ module.exports = function validateArray(options) { return errors; }; -},{"../error/validation_error":293,"../util/get_type":295,"./validate":297}],299:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288,"./validate":290}],292:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -54772,7 +51436,7 @@ module.exports = function validateBoolean(options) { return []; }; -},{"../error/validation_error":293,"../util/get_type":295}],300:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288}],293:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -54795,7 +51459,7 @@ module.exports = function validateColor(options) { return []; }; -},{"../error/validation_error":293,"../util/get_type":295,"csscolorparser":100}],301:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288,"csscolorparser":101}],294:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -54829,7 +51493,7 @@ module.exports = function validateConstants(options) { }; -},{"../error/validation_error":293,"../util/get_type":295}],302:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288}],295:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -54847,7 +51511,7 @@ module.exports = function validateEnum(options) { return errors; }; -},{"../error/validation_error":293,"../util/unbundle_jsonlint":296}],303:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/unbundle_jsonlint":289}],296:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -54952,7 +51616,7 @@ module.exports = function validateFilter(options) { return errors; }; -},{"../error/validation_error":293,"../util/get_type":295,"../util/unbundle_jsonlint":296,"./validate_enum":302}],304:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288,"../util/unbundle_jsonlint":289,"./validate_enum":295}],297:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -55086,7 +51750,7 @@ module.exports = function validateFunction(options) { }; -},{"../error/validation_error":293,"../util/get_type":295,"./validate":297,"./validate_array":298,"./validate_number":308,"./validate_object":309}],305:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288,"./validate":290,"./validate_array":291,"./validate_number":301,"./validate_object":302}],298:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -55110,7 +51774,7 @@ module.exports = function(options) { return errors; }; -},{"../error/validation_error":293,"./validate_string":312}],306:[function(require,module,exports){ +},{"../error/validation_error":286,"./validate_string":305}],299:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -55223,7 +51887,7 @@ module.exports = function validateLayer(options) { return errors; }; -},{"../error/validation_error":293,"../util/extend":294,"../util/unbundle_jsonlint":296,"./validate_filter":303,"./validate_layout_property":307,"./validate_object":309,"./validate_paint_property":310}],307:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/extend":287,"../util/unbundle_jsonlint":289,"./validate_filter":296,"./validate_layout_property":300,"./validate_object":302,"./validate_paint_property":303}],300:[function(require,module,exports){ 'use strict'; var validate = require('./validate'); @@ -55262,7 +51926,7 @@ module.exports = function validateLayoutProperty(options) { }; -},{"../error/validation_error":293,"./validate":297}],308:[function(require,module,exports){ +},{"../error/validation_error":286,"./validate":290}],301:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -55289,7 +51953,7 @@ module.exports = function validateNumber(options) { return []; }; -},{"../error/validation_error":293,"../util/get_type":295}],309:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288}],302:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -55342,7 +52006,7 @@ module.exports = function validateObject(options) { return errors; }; -},{"../error/validation_error":293,"../util/get_type":295,"./validate":297}],310:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288,"./validate":290}],303:[function(require,module,exports){ 'use strict'; var validate = require('./validate'); @@ -55382,7 +52046,7 @@ module.exports = function validatePaintProperty(options) { }; -},{"../error/validation_error":293,"./validate":297}],311:[function(require,module,exports){ +},{"../error/validation_error":286,"./validate":290}],304:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -55459,7 +52123,7 @@ module.exports = function validateSource(options) { } }; -},{"../error/validation_error":293,"../util/unbundle_jsonlint":296,"./validate_enum":302,"./validate_object":309}],312:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/unbundle_jsonlint":289,"./validate_enum":295,"./validate_object":302}],305:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -55477,7 +52141,7 @@ module.exports = function validateString(options) { return []; }; -},{"../error/validation_error":293,"../util/get_type":295}],313:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288}],306:[function(require,module,exports){ 'use strict'; var validateConstants = require('./validate/validate_constants'); @@ -55547,12 +52211,12 @@ function wrapCleanErrors(inner) { module.exports = validateStyleMin; -},{"../reference/latest.min":314,"./validate/validate":297,"./validate/validate_constants":301,"./validate/validate_filter":303,"./validate/validate_glyphs_url":305,"./validate/validate_layer":306,"./validate/validate_layout_property":307,"./validate/validate_paint_property":310,"./validate/validate_source":311}],314:[function(require,module,exports){ +},{"../reference/latest.min":307,"./validate/validate":290,"./validate/validate_constants":294,"./validate/validate_filter":296,"./validate/validate_glyphs_url":298,"./validate/validate_layer":299,"./validate/validate_layout_property":300,"./validate/validate_paint_property":303,"./validate/validate_source":304}],307:[function(require,module,exports){ module.exports = require('./v8.min.json'); -},{"./v8.min.json":315}],315:[function(require,module,exports){ +},{"./v8.min.json":308}],308:[function(require,module,exports){ module.exports={"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_tile","source_geojson","source_video","source_image"],"source_tile":{"type":{"required":true,"type":"enum","values":["vector","raster"]},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":["geojson"]},"data":{"type":"*"},"maxzoom":{"type":"number","default":14},"buffer":{"type":"number","default":64},"tolerance":{"type":"number","default":3},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":400},"clusterMaxZoom":{"type":"number"}},"source_video":{"type":{"required":true,"type":"enum","values":["video"]},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":["image"]},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":["fill","line","symbol","circle","raster","background"]},"metadata":{"type":"*"},"ref":{"type":"string"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":22},"maxzoom":{"type":"number","minimum":0,"maximum":22},"interactive":{"type":"boolean","default":false},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"},"paint.*":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],"layout_background":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_fill":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_circle":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_line":{"line-cap":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["butt","round","square"],"default":"butt"},"line-join":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["bevel","round","miter"],"default":"miter"},"line-miter-limit":{"type":"number","default":2,"function":"interpolated","zoom-function":true,"property-function":true,"requires":[{"line-join":"miter"}]},"line-round-limit":{"type":"number","default":1.05,"function":"interpolated","zoom-function":true,"property-function":true,"requires":[{"line-join":"round"}]},"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_symbol":{"symbol-placement":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["point","line"],"default":"point"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"function":"interpolated","zoom-function":true,"property-function":true,"units":"pixels","requires":[{"symbol-placement":"line"}]},"symbol-avoid-edges":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false},"icon-allow-overlap":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image"]},"icon-ignore-placement":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image"]},"icon-optional":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image","text-field"]},"icon-rotation-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"viewport","requires":["icon-image"]},"icon-size":{"type":"number","default":1,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image"]},"icon-text-fit":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":false,"values":["none","both","width","height"],"default":"none","requires":["icon-image","text-field"]},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image","icon-text-fit","text-field"]},"icon-image":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"tokens":true},"icon-rotate":{"type":"number","default":0,"period":360,"function":"interpolated","zoom-function":true,"property-function":true,"units":"degrees","requires":["icon-image"]},"icon-padding":{"type":"number","default":2,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"units":"pixels","requires":["icon-image"]},"icon-keep-upright":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image"]},"text-pitch-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"requires":["text-field"]},"text-rotation-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"viewport","requires":["text-field"]},"text-field":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":"","tokens":true},"text-font":{"type":"array","value":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"]},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-line-height":{"type":"number","default":1.2,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-letter-spacing":{"type":"number","default":0,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-justify":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["left","center","right"],"default":"center","requires":["text-field"]},"text-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],"default":"center","requires":["text-field"]},"text-max-angle":{"type":"number","default":45,"units":"degrees","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field",{"symbol-placement":"line"}]},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-keep-upright":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["none","uppercase","lowercase"],"default":"none","requires":["text-field"]},"text-offset":{"type":"array","value":"number","units":"ems","function":"interpolated","zoom-function":true,"property-function":true,"length":2,"default":[0,0],"requires":["text-field"]},"text-allow-overlap":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field"]},"text-ignore-placement":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field"]},"text-optional":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field","icon-image"]},"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_raster":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"filter":{"type":"array","value":"*"},"filter_operator":{"type":"enum","values":["==","!=",">",">=","<","<=","in","!in","all","any","none","has","!has"]},"geometry_type":{"type":"enum","values":["Point","LineString","Polygon"]},"color_operation":{"type":"enum","values":["lighten","saturate","spin","fade","mix"]},"function":{"stops":{"type":"array","required":true,"value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":["exponential","interval","categorical"],"default":"exponential"}},"function_stop":{"type":"array","minimum":0,"maximum":22,"value":["number","color"],"length":2},"paint":["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],"paint_fill":{"fill-antialias":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":true},"fill-opacity":{"type":"number","function":"interpolated","zoom-function":true,"property-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"fill-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"fill-pattern"}]},"fill-outline-color":{"type":"color","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}]},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"fill-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["fill-translate"]},"fill-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"transition":true}},"paint_line":{"line-opacity":{"type":"number","function":"interpolated","zoom-function":true,"property-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"line-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"line-pattern"}]},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["line-translate"]},"line-width":{"type":"number","default":1,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-gap-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-offset":{"type":"number","default":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-dasharray":{"type":"array","value":"number","function":"piecewise-constant","zoom-function":true,"property-function":true,"minimum":0,"transition":true,"units":"line widths","requires":[{"!":"line-pattern"}]},"line-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"transition":true}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"circle-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-blur":{"type":"number","default":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"circle-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["circle-translate"]},"circle-pitch-scale":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-halo-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["icon-image","icon-translate"]},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-halo-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-halo-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["text-field","text-translate"]}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-hue-rotate":{"type":"number","default":0,"period":360,"function":"interpolated","zoom-function":true,"transition":true,"units":"degrees"},"raster-brightness-min":{"type":"number","function":"interpolated","zoom-function":true,"default":0,"minimum":0,"maximum":1,"transition":true},"raster-brightness-max":{"type":"number","function":"interpolated","zoom-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"function":"interpolated","zoom-function":true,"transition":true,"units":"milliseconds"}},"paint_background":{"background-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"transition":true,"requires":[{"!":"background-pattern"}]},"background-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"transition":true},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}}} -},{}],316:[function(require,module,exports){ +},{}],309:[function(require,module,exports){ 'use strict'; if (typeof module !== 'undefined' && module.exports) { @@ -55683,7 +52347,7 @@ function isWebGLSupported(failIfMajorPerformanceCaveat) { } } -},{}],317:[function(require,module,exports){ +},{}],310:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -55779,7 +52443,7 @@ ArrayGroup.prototype.getTransferables = function(transferables) { } }; -},{"../util/util":431}],318:[function(require,module,exports){ +},{"../util/util":424}],311:[function(require,module,exports){ 'use strict'; var featureFilter = require('feature-filter'); @@ -56297,7 +52961,7 @@ function createGetUniform(attribute, stopOffset) { }; } -},{"../util/struct_array":429,"../util/util":431,"./array_group":317,"./bucket/circle_bucket":319,"./bucket/fill_bucket":320,"./bucket/line_bucket":321,"./bucket/symbol_bucket":322,"./buffer_group":324,"assert":39,"feature-filter":124}],319:[function(require,module,exports){ +},{"../util/struct_array":422,"../util/util":424,"./array_group":310,"./bucket/circle_bucket":312,"./bucket/fill_bucket":313,"./bucket/line_bucket":314,"./bucket/symbol_bucket":315,"./buffer_group":317,"assert":40,"feature-filter":117}],312:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -56419,7 +53083,7 @@ CircleBucket.prototype.addFeature = function(feature) { this.populatePaintArrays('circle', globalProperties, feature.properties, startGroup, startIndex); }; -},{"../../util/util":431,"../bucket":318,"../load_geometry":326}],320:[function(require,module,exports){ +},{"../../util/util":424,"../bucket":311,"../load_geometry":319}],313:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -56530,7 +53194,7 @@ FillBucket.prototype.addPolygon = function(polygon) { } }; -},{"../../util/classify_rings":419,"../../util/util":431,"../bucket":318,"../load_geometry":326,"earcut":118}],321:[function(require,module,exports){ +},{"../../util/classify_rings":412,"../../util/util":424,"../bucket":311,"../load_geometry":319,"earcut":111}],314:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -56957,7 +53621,7 @@ LineBucket.prototype.addPieSliceVertex = function(currentVertex, distance, extru } }; -},{"../../util/util":431,"../bucket":318,"../load_geometry":326}],322:[function(require,module,exports){ +},{"../../util/util":424,"../bucket":311,"../load_geometry":319}],315:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -57603,7 +54267,7 @@ SymbolBucket.prototype.addSymbolQuad = function(symbolQuad) { symbolQuad.minScale); }; -},{"../../symbol/anchor":380,"../../symbol/clip_line":382,"../../symbol/collision_feature":384,"../../symbol/get_anchors":386,"../../symbol/mergelines":389,"../../symbol/quads":390,"../../symbol/resolve_text":391,"../../symbol/shaping":392,"../../util/token":430,"../../util/util":431,"../bucket":318,"../load_geometry":326,"point-geometry":472}],323:[function(require,module,exports){ +},{"../../symbol/anchor":373,"../../symbol/clip_line":375,"../../symbol/collision_feature":377,"../../symbol/get_anchors":379,"../../symbol/mergelines":382,"../../symbol/quads":383,"../../symbol/resolve_text":384,"../../symbol/shaping":385,"../../util/token":423,"../../util/util":424,"../bucket":311,"../load_geometry":319,"point-geometry":465}],316:[function(require,module,exports){ 'use strict'; module.exports = Buffer; @@ -57704,7 +54368,7 @@ Buffer.BufferType = { ELEMENT: 'ELEMENT_ARRAY_BUFFER' }; -},{}],324:[function(require,module,exports){ +},{}],317:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -57759,7 +54423,7 @@ BufferGroup.prototype.destroy = function(gl) { } }; -},{"../render/vertex_array_object":346,"../util/util":431,"./buffer":323}],325:[function(require,module,exports){ +},{"../render/vertex_array_object":339,"../util/util":424,"./buffer":316}],318:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -58058,7 +54722,7 @@ function offsetLine(rings, offset) { return newRings; } -},{"../util/dictionary_coder":421,"../util/intersection_tests":426,"../util/struct_array":429,"../util/util":431,"../util/vectortile_to_geojson":432,"./bucket":318,"./load_geometry":326,"feature-filter":124,"grid-index":278,"pbf":466,"point-geometry":472,"vector-tile":537}],326:[function(require,module,exports){ +},{"../util/dictionary_coder":414,"../util/intersection_tests":419,"../util/struct_array":422,"../util/util":424,"../util/vectortile_to_geojson":425,"./bucket":311,"./load_geometry":319,"feature-filter":117,"grid-index":271,"pbf":459,"point-geometry":465,"vector-tile":530}],319:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58114,7 +54778,7 @@ module.exports = function loadGeometry(feature, bits) { return geometry; }; -},{"../util/util":431,"./bucket":318,"assert":39}],327:[function(require,module,exports){ +},{"../util/util":424,"./bucket":311,"assert":40}],320:[function(require,module,exports){ 'use strict'; module.exports = Coordinate; @@ -58193,7 +54857,7 @@ Coordinate.prototype = { } }; -},{}],328:[function(require,module,exports){ +},{}],321:[function(require,module,exports){ 'use strict'; module.exports = LngLat; @@ -58285,7 +54949,7 @@ LngLat.convert = function (input) { return input; }; -},{"../util/util":431}],329:[function(require,module,exports){ +},{"../util/util":424}],322:[function(require,module,exports){ 'use strict'; module.exports = LngLatBounds; @@ -58477,7 +55141,7 @@ LngLatBounds.convert = function (input) { return new LngLatBounds(input); }; -},{"./lng_lat":328}],330:[function(require,module,exports){ +},{"./lng_lat":321}],323:[function(require,module,exports){ 'use strict'; var LngLat = require('./lng_lat'), @@ -58951,7 +55615,7 @@ Transform.prototype = { } }; -},{"../data/bucket":318,"../source/tile_coord":358,"../util/interpolate":425,"../util/util":431,"./coordinate":327,"./lng_lat":328,"gl-matrix":184,"point-geometry":472}],331:[function(require,module,exports){ +},{"../data/bucket":311,"../source/tile_coord":351,"../util/interpolate":418,"../util/util":424,"./coordinate":320,"./lng_lat":321,"gl-matrix":177,"point-geometry":465}],324:[function(require,module,exports){ 'use strict'; // Font data From Hershey Simplex Font @@ -59084,7 +55748,7 @@ module.exports = function textVertices(text, left, baseline, scale) { return strokes; }; -},{}],332:[function(require,module,exports){ +},{}],325:[function(require,module,exports){ 'use strict'; // jshint -W079 @@ -59151,7 +55815,7 @@ Object.defineProperty(mapboxgl, 'accessToken', { * mapboxgl.supported() // = true */ -},{"../package.json":433,"./geo/lng_lat":328,"./geo/lng_lat_bounds":329,"./style/style":367,"./ui/control/attribution":398,"./ui/control/control":399,"./ui/control/geolocate":400,"./ui/control/navigation":401,"./ui/map":410,"./ui/marker":411,"./ui/popup":412,"./util/ajax":414,"./util/browser":415,"./util/config":420,"./util/evented":423,"./util/util":431,"point-geometry":472}],333:[function(require,module,exports){ +},{"../package.json":426,"./geo/lng_lat":321,"./geo/lng_lat_bounds":322,"./style/style":360,"./ui/control/attribution":391,"./ui/control/control":392,"./ui/control/geolocate":393,"./ui/control/navigation":394,"./ui/map":403,"./ui/marker":404,"./ui/popup":405,"./util/ajax":407,"./util/browser":408,"./util/config":413,"./util/evented":416,"./util/util":424,"point-geometry":465}],326:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -59171,7 +55835,7 @@ module.exports = function(uniforms) { return pragmas; }; -},{"assert":39}],334:[function(require,module,exports){ +},{"assert":40}],327:[function(require,module,exports){ 'use strict'; var pixelsToTileUnits = require('../source/pixels_to_tile_units'); @@ -59264,7 +55928,7 @@ function drawBackground(painter, source, layer) { gl.stencilFunc(gl.EQUAL, 0x80, 0x80); } -},{"../source/pixels_to_tile_units":352,"./create_uniform_pragmas":333}],335:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":345,"./create_uniform_pragmas":326}],328:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -59329,7 +55993,7 @@ function drawCircles(painter, source, layer, coords) { } } -},{"../util/browser":415}],336:[function(require,module,exports){ +},{"../util/browser":408}],329:[function(require,module,exports){ 'use strict'; module.exports = drawCollisionDebug; @@ -59364,7 +56028,7 @@ function drawCollisionDebug(painter, source, layer, coords) { } } -},{}],337:[function(require,module,exports){ +},{}],330:[function(require,module,exports){ 'use strict'; var textVertices = require('../lib/debugtext'); @@ -59425,7 +56089,7 @@ function drawDebugTile(painter, source, coord) { gl.drawArrays(gl.LINES, 0, debugTextBuffer.length); } -},{"../data/bucket":318,"../data/buffer":323,"../lib/debugtext":331,"../util/browser":415,"./vertex_array_object":346,"gl-matrix":184}],338:[function(require,module,exports){ +},{"../data/bucket":311,"../data/buffer":316,"../lib/debugtext":324,"../util/browser":408,"./vertex_array_object":339,"gl-matrix":177}],331:[function(require,module,exports){ 'use strict'; var pixelsToTileUnits = require('../source/pixels_to_tile_units'); @@ -59622,7 +56286,7 @@ function setPattern(image, opacity, tile, coord, painter, program) { painter.spriteAtlas.bind(gl, true); } -},{"../source/pixels_to_tile_units":352}],339:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":345}],332:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -59787,7 +56451,7 @@ module.exports = function drawLine(painter, source, layer, coords) { }; -},{"../source/pixels_to_tile_units":352,"../util/browser":415,"gl-matrix":184}],340:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":345,"../util/browser":408,"gl-matrix":177}],333:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -59933,7 +56597,7 @@ function getOpacities(tile, parentTile, layer, transform) { return opacity; } -},{"../util/struct_array":429,"../util/util":431}],341:[function(require,module,exports){ +},{"../util/struct_array":422,"../util/util":424}],334:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -60149,7 +56813,7 @@ function drawSymbol(painter, layer, posMatrix, tile, bucket, bufferGroups, isTex } } -},{"../source/pixels_to_tile_units":352,"../util/browser":415,"./draw_collision_debug":336}],342:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":345,"../util/browser":408,"./draw_collision_debug":329}],335:[function(require,module,exports){ 'use strict'; module.exports = FrameHistory; @@ -60221,7 +56885,7 @@ FrameHistory.prototype.bind = function(gl) { } }; -},{}],343:[function(require,module,exports){ +},{}],336:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -60368,7 +57032,7 @@ LineAtlas.prototype.bind = function(gl) { } }; -},{"../util/util":431}],344:[function(require,module,exports){ +},{"../util/util":424}],337:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -60712,7 +57376,7 @@ Painter.prototype.showOverdrawInspector = function(enabled) { } }; -},{"../data/bucket":318,"../data/buffer":323,"../source/pixels_to_tile_units":352,"../source/source_cache":356,"../util/browser":415,"../util/struct_array":429,"../util/util":431,"./create_uniform_pragmas":333,"./draw_background":334,"./draw_circle":335,"./draw_debug":337,"./draw_fill":338,"./draw_line":339,"./draw_raster":340,"./draw_symbol":341,"./frame_history":342,"./painter/use_program":345,"./vertex_array_object":346,"gl-matrix":184}],345:[function(require,module,exports){ +},{"../data/bucket":311,"../data/buffer":316,"../source/pixels_to_tile_units":345,"../source/source_cache":349,"../util/browser":408,"../util/struct_array":422,"../util/util":424,"./create_uniform_pragmas":326,"./draw_background":327,"./draw_circle":328,"./draw_debug":330,"./draw_fill":331,"./draw_line":332,"./draw_raster":333,"./draw_symbol":334,"./frame_history":335,"./painter/use_program":338,"./vertex_array_object":339,"gl-matrix":177}],338:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -60809,7 +57473,7 @@ function applyPragmas(source, pragmas) { }); } -},{"../../util/util":431,"assert":39,"mapbox-gl-shaders":292}],346:[function(require,module,exports){ +},{"../../util/util":424,"assert":40,"mapbox-gl-shaders":285}],339:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -60907,7 +57571,7 @@ VertexArrayObject.prototype.destroy = function(gl) { } }; -},{"assert":39}],347:[function(require,module,exports){ +},{"assert":40}],340:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -61131,7 +57795,7 @@ GeoJSONSource.prototype = util.inherit(Evented, /** @lends GeoJSONSource.prototy } }); -},{"../data/bucket":318,"../util/evented":423,"../util/util":431,"resolve-url":489}],348:[function(require,module,exports){ +},{"../data/bucket":311,"../util/evented":416,"../util/util":424,"resolve-url":482}],341:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -61269,7 +57933,7 @@ GeoJSONWorkerSource.prototype = util.inherit(VectorTileWorkerSource, /** @lends } }); -},{"../util/ajax":414,"../util/util":431,"./geojson_wrapper":349,"./vector_tile_worker_source":360,"geojson-rewind":130,"geojson-vt":134,"supercluster":516,"vt-pbf":543}],349:[function(require,module,exports){ +},{"../util/ajax":407,"../util/util":424,"./geojson_wrapper":342,"./vector_tile_worker_source":353,"geojson-rewind":123,"geojson-vt":127,"supercluster":509,"vt-pbf":536}],342:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -61345,7 +58009,7 @@ FeatureWrapper.prototype.bbox = function() { FeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON; -},{"../data/bucket":318,"point-geometry":472,"vector-tile":537}],350:[function(require,module,exports){ +},{"../data/bucket":311,"point-geometry":465,"vector-tile":530}],343:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -61524,7 +58188,7 @@ ImageSource.prototype = util.inherit(Evented, /** @lends ImageSource.prototype * } }); -},{"../data/bucket":318,"../data/buffer":323,"../geo/lng_lat":328,"../render/draw_raster":340,"../render/vertex_array_object":346,"../util/ajax":414,"../util/evented":423,"../util/util":431,"./tile_coord":358,"point-geometry":472}],351:[function(require,module,exports){ +},{"../data/bucket":311,"../data/buffer":316,"../geo/lng_lat":321,"../render/draw_raster":333,"../render/vertex_array_object":339,"../util/ajax":407,"../util/evented":416,"../util/util":424,"./tile_coord":351,"point-geometry":465}],344:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); var ajax = require('../util/ajax'); @@ -61555,7 +58219,7 @@ module.exports = function(options, callback) { }; -},{"../util/ajax":414,"../util/browser":415,"../util/mapbox":428,"../util/util":431}],352:[function(require,module,exports){ +},{"../util/ajax":407,"../util/browser":408,"../util/mapbox":421,"../util/util":424}],345:[function(require,module,exports){ 'use strict'; var Bucket = require('../data/bucket'); @@ -61580,7 +58244,7 @@ module.exports = function(tile, pixelValue, z) { }; -},{"../data/bucket":318}],353:[function(require,module,exports){ +},{"../data/bucket":311}],346:[function(require,module,exports){ 'use strict'; var TileCoord = require('./tile_coord'); @@ -61651,7 +58315,7 @@ function mergeRenderedFeatureLayers(tiles) { } -},{"./tile_coord":358}],354:[function(require,module,exports){ +},{"./tile_coord":351}],347:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -61748,7 +58412,7 @@ RasterTileSource.prototype = util.inherit(Evented, { } }); -},{"../util/ajax":414,"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./load_tilejson":351}],355:[function(require,module,exports){ +},{"../util/ajax":407,"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./load_tilejson":344}],348:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -61919,7 +58583,7 @@ exports.setType = function (name, type) { * @instance */ -},{"../source/geojson_source":347,"../source/image_source":350,"../source/raster_tile_source":354,"../source/vector_tile_source":359,"../source/video_source":361,"../util/util":431}],356:[function(require,module,exports){ +},{"../source/geojson_source":340,"../source/image_source":343,"../source/raster_tile_source":347,"../source/vector_tile_source":352,"../source/video_source":354,"../util/util":424}],349:[function(require,module,exports){ 'use strict'; var Source = require('./source'); @@ -62457,7 +59121,7 @@ function compareKeyZoom(a, b) { return (a % 32) - (b % 32); } -},{"../data/bucket":318,"../geo/coordinate":327,"../util/evented":423,"../util/lru_cache":427,"../util/util":431,"./source":355,"./tile":357,"./tile_coord":358}],357:[function(require,module,exports){ +},{"../data/bucket":311,"../geo/coordinate":320,"../util/evented":416,"../util/lru_cache":420,"../util/util":424,"./source":348,"./tile":350,"./tile_coord":351}],350:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -62659,7 +59323,7 @@ function unserializeBuckets(input, style) { return output; } -},{"../data/bucket":318,"../data/feature_index":325,"../symbol/collision_box":383,"../symbol/collision_tile":385,"../symbol/symbol_instances":394,"../symbol/symbol_quads":395,"../util/util":431,"../util/vectortile_to_geojson":432,"feature-filter":124,"pbf":466,"vector-tile":537}],358:[function(require,module,exports){ +},{"../data/bucket":311,"../data/feature_index":318,"../symbol/collision_box":376,"../symbol/collision_tile":378,"../symbol/symbol_instances":387,"../symbol/symbol_quads":388,"../util/util":424,"../util/vectortile_to_geojson":425,"feature-filter":117,"pbf":459,"vector-tile":530}],351:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -62853,7 +59517,7 @@ TileCoord.cover = function(z, bounds, actualZ) { }); }; -},{"../geo/coordinate":327,"assert":39,"whoots-js":553}],359:[function(require,module,exports){ +},{"../geo/coordinate":320,"assert":40,"whoots-js":546}],352:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -62960,7 +59624,7 @@ VectorTileSource.prototype = util.inherit(Evented, { } }); -},{"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./load_tilejson":351}],360:[function(require,module,exports){ +},{"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./load_tilejson":344}],353:[function(require,module,exports){ 'use strict'; var ajax = require('../util/ajax'); var vt = require('vector-tile'); @@ -63108,7 +59772,7 @@ VectorTileWorkerSource.prototype = { } }; -},{"../util/ajax":414,"./worker_tile":363,"pbf":466,"vector-tile":537}],361:[function(require,module,exports){ +},{"../util/ajax":407,"./worker_tile":356,"pbf":459,"vector-tile":530}],354:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -63312,7 +59976,7 @@ VideoSource.prototype = util.inherit(Evented, /** @lends VideoSource.prototype * } }); -},{"../data/bucket":318,"../data/buffer":323,"../geo/lng_lat":328,"../render/draw_raster":340,"../render/vertex_array_object":346,"../util/ajax":414,"../util/evented":423,"../util/util":431,"./tile_coord":358,"point-geometry":472}],362:[function(require,module,exports){ +},{"../data/bucket":311,"../data/buffer":316,"../geo/lng_lat":321,"../render/draw_raster":333,"../render/vertex_array_object":339,"../util/ajax":407,"../util/evented":416,"../util/util":424,"./tile_coord":351,"point-geometry":465}],355:[function(require,module,exports){ 'use strict'; var Actor = require('../util/actor'); @@ -63476,7 +60140,7 @@ function createLayerFamilies(layers) { return families; } -},{"../style/style_layer":370,"../util/actor":413,"../util/util":431,"./geojson_worker_source":348,"./vector_tile_worker_source":360}],363:[function(require,module,exports){ +},{"../style/style_layer":363,"../util/actor":406,"../util/util":424,"./geojson_worker_source":341,"./vector_tile_worker_source":353}],356:[function(require,module,exports){ 'use strict'; var FeatureIndex = require('../data/feature_index'); @@ -63749,7 +60413,7 @@ function getLayerId(layer) { return layer.id; } -},{"../data/bucket":318,"../data/feature_index":325,"../symbol/collision_box":383,"../symbol/collision_tile":385,"../symbol/symbol_instances":394,"../symbol/symbol_quads":395,"../util/dictionary_coder":421,"../util/util":431}],364:[function(require,module,exports){ +},{"../data/bucket":311,"../data/feature_index":318,"../symbol/collision_box":376,"../symbol/collision_tile":378,"../symbol/symbol_instances":387,"../symbol/symbol_quads":388,"../util/dictionary_coder":414,"../util/util":424}],357:[function(require,module,exports){ 'use strict'; module.exports = AnimationLoop; @@ -63781,7 +60445,7 @@ AnimationLoop.prototype.cancel = function(n) { }); }; -},{}],365:[function(require,module,exports){ +},{}],358:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -63862,7 +60526,7 @@ ImageSprite.prototype.getSpritePosition = function(name) { return new SpritePosition(); }; -},{"../util/ajax":414,"../util/browser":415,"../util/evented":423,"../util/mapbox":428}],366:[function(require,module,exports){ +},{"../util/ajax":407,"../util/browser":408,"../util/evented":416,"../util/mapbox":421}],359:[function(require,module,exports){ 'use strict'; var parseColorString = require('csscolorparser').parseCSSColor; @@ -63904,7 +60568,7 @@ module.exports = function parseColor(input) { } }; -},{"../util/util":431,"./style_function":369,"csscolorparser":100}],367:[function(require,module,exports){ +},{"../util/util":424,"./style_function":362,"csscolorparser":101}],360:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -64685,7 +61349,7 @@ Style.prototype = util.inherit(Evented, { }); -},{"../render/line_atlas":343,"../source/query_features":353,"../source/source":355,"../source/source_cache":356,"../symbol/glyph_source":388,"../symbol/sprite_atlas":393,"../util/ajax":414,"../util/browser":415,"../util/dispatcher":422,"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./animation_loop":364,"./image_sprite":365,"./style_function":369,"./style_layer":370,"./style_spec":377,"./validate_style":379}],368:[function(require,module,exports){ +},{"../render/line_atlas":336,"../source/query_features":346,"../source/source":348,"../source/source_cache":349,"../symbol/glyph_source":381,"../symbol/sprite_atlas":386,"../util/ajax":407,"../util/browser":408,"../util/dispatcher":415,"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./animation_loop":357,"./image_sprite":358,"./style_function":362,"./style_layer":363,"./style_spec":370,"./validate_style":372}],361:[function(require,module,exports){ 'use strict'; var MapboxGLFunction = require('./style_function'); @@ -64769,7 +61433,7 @@ function transitioned(calculate) { }; } -},{"../util/util":431,"./parse_color":366,"./style_function":369}],369:[function(require,module,exports){ +},{"../util/util":424,"./parse_color":359,"./style_function":362}],362:[function(require,module,exports){ 'use strict'; var MapboxGLFunction = require('mapbox-gl-function'); @@ -64796,7 +61460,7 @@ exports['piecewise-constant'] = function(parameters) { exports.isFunctionDefinition = MapboxGLFunction.isFunctionDefinition; -},{"mapbox-gl-function":291}],370:[function(require,module,exports){ +},{"mapbox-gl-function":284}],363:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -65143,7 +61807,7 @@ function getDeclarationValue(declaration) { return declaration.value; } -},{"../util/evented":423,"../util/util":431,"./parse_color":366,"./style_declaration":368,"./style_layer/background_style_layer":371,"./style_layer/circle_style_layer":372,"./style_layer/fill_style_layer":373,"./style_layer/line_style_layer":374,"./style_layer/raster_style_layer":375,"./style_layer/symbol_style_layer":376,"./style_spec":377,"./style_transition":378,"./validate_style":379}],371:[function(require,module,exports){ +},{"../util/evented":416,"../util/util":424,"./parse_color":359,"./style_declaration":361,"./style_layer/background_style_layer":364,"./style_layer/circle_style_layer":365,"./style_layer/fill_style_layer":366,"./style_layer/line_style_layer":367,"./style_layer/raster_style_layer":368,"./style_layer/symbol_style_layer":369,"./style_spec":370,"./style_transition":371,"./validate_style":372}],364:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65157,7 +61821,7 @@ module.exports = BackgroundStyleLayer; BackgroundStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":431,"../style_layer":370}],372:[function(require,module,exports){ +},{"../../util/util":424,"../style_layer":363}],365:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65171,7 +61835,7 @@ module.exports = CircleStyleLayer; CircleStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":431,"../style_layer":370}],373:[function(require,module,exports){ +},{"../../util/util":424,"../style_layer":363}],366:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65227,7 +61891,7 @@ FillStyleLayer.prototype = util.inherit(StyleLayer, { module.exports = FillStyleLayer; -},{"../../util/util":431,"../style_layer":370}],374:[function(require,module,exports){ +},{"../../util/util":424,"../style_layer":363}],367:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65261,7 +61925,7 @@ LineStyleLayer.prototype = util.inherit(StyleLayer, { } }); -},{"../../util/util":431,"../style_layer":370}],375:[function(require,module,exports){ +},{"../../util/util":424,"../style_layer":363}],368:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65275,7 +61939,7 @@ module.exports = RasterStyleLayer; RasterStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":431,"../style_layer":370}],376:[function(require,module,exports){ +},{"../../util/util":424,"../style_layer":363}],369:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65318,12 +61982,12 @@ SymbolStyleLayer.prototype = util.inherit(StyleLayer, { }); -},{"../../util/util":431,"../style_layer":370}],377:[function(require,module,exports){ +},{"../../util/util":424,"../style_layer":363}],370:[function(require,module,exports){ 'use strict'; module.exports = require('mapbox-gl-style-spec/reference/latest.min'); -},{"mapbox-gl-style-spec/reference/latest.min":314}],378:[function(require,module,exports){ +},{"mapbox-gl-style-spec/reference/latest.min":307}],371:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -65408,7 +62072,7 @@ function interpZoomTransitioned(from, to, t) { } } -},{"../util/interpolate":425,"../util/util":431}],379:[function(require,module,exports){ +},{"../util/interpolate":418,"../util/util":424}],372:[function(require,module,exports){ 'use strict'; module.exports = require('mapbox-gl-style-spec/lib/validate_style.min'); @@ -65432,7 +62096,7 @@ module.exports.throwErrors = function throwErrors(emitter, errors) { } }; -},{"mapbox-gl-style-spec/lib/validate_style.min":313}],380:[function(require,module,exports){ +},{"mapbox-gl-style-spec/lib/validate_style.min":306}],373:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -65455,7 +62119,7 @@ Anchor.prototype.clone = function() { return new Anchor(this.x, this.y, this.angle, this.segment); }; -},{"point-geometry":472}],381:[function(require,module,exports){ +},{"point-geometry":465}],374:[function(require,module,exports){ 'use strict'; module.exports = checkMaxAngle; @@ -65535,7 +62199,7 @@ function checkMaxAngle(line, anchor, labelLength, windowSize, maxAngle) { return true; } -},{}],382:[function(require,module,exports){ +},{}],375:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -65609,7 +62273,7 @@ function clipLine(lines, x1, y1, x2, y2) { return clippedLines; } -},{"point-geometry":472}],383:[function(require,module,exports){ +},{"point-geometry":465}],376:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -65690,7 +62354,7 @@ util.extendAll(CollisionBoxArray.prototype.StructType.prototype, { } }); -},{"../util/struct_array":429,"../util/util":431,"point-geometry":472}],384:[function(require,module,exports){ +},{"../util/struct_array":422,"../util/util":424,"point-geometry":465}],377:[function(require,module,exports){ 'use strict'; module.exports = CollisionFeature; @@ -65824,7 +62488,7 @@ CollisionFeature.prototype._addLineCollisionBoxes = function(collisionBoxArray, return bboxes; }; -},{}],385:[function(require,module,exports){ +},{}],378:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -66125,7 +62789,7 @@ CollisionTile.prototype.insertCollisionFeature = function(collisionFeature, minP } }; -},{"../data/bucket":318,"grid-index":278,"point-geometry":472}],386:[function(require,module,exports){ +},{"../data/bucket":311,"grid-index":271,"point-geometry":465}],379:[function(require,module,exports){ 'use strict'; var interpolate = require('../util/interpolate'); @@ -66229,7 +62893,7 @@ function resample(line, offset, spacing, angleWindowSize, maxAngle, labelLength, return anchors; } -},{"../symbol/anchor":380,"../util/interpolate":425,"./check_max_angle":381}],387:[function(require,module,exports){ +},{"../symbol/anchor":373,"../util/interpolate":418,"./check_max_angle":374}],380:[function(require,module,exports){ 'use strict'; var ShelfPack = require('shelf-pack'); @@ -66398,7 +63062,7 @@ GlyphAtlas.prototype.updateTexture = function(gl) { } }; -},{"../util/util":431,"shelf-pack":502}],388:[function(require,module,exports){ +},{"../util/util":424,"shelf-pack":495}],381:[function(require,module,exports){ 'use strict'; var normalizeURL = require('../util/mapbox').normalizeGlyphsURL; @@ -66539,7 +63203,7 @@ function glyphUrl(fontstack, range, url, subdomains) { .replace('{range}', range); } -},{"../symbol/glyph_atlas":387,"../util/ajax":414,"../util/glyphs":424,"../util/mapbox":428,"pbf":466}],389:[function(require,module,exports){ +},{"../symbol/glyph_atlas":380,"../util/ajax":407,"../util/glyphs":417,"../util/mapbox":421,"pbf":459}],382:[function(require,module,exports){ 'use strict'; module.exports = function (features, textFeatures, geometries) { @@ -66630,7 +63294,7 @@ module.exports = function (features, textFeatures, geometries) { }; }; -},{}],390:[function(require,module,exports){ +},{}],383:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -66913,7 +63577,7 @@ function getSegmentGlyphs(glyphs, anchor, offset, line, segment, forward) { return placementScale; } -},{"point-geometry":472}],391:[function(require,module,exports){ +},{"point-geometry":465}],384:[function(require,module,exports){ 'use strict'; var resolveTokens = require('../util/token'); @@ -66956,7 +63620,7 @@ function resolveText(features, layoutProperties, codepoints) { return textFeatures; } -},{"../util/token":430}],392:[function(require,module,exports){ +},{"../util/token":423}],385:[function(require,module,exports){ 'use strict'; module.exports = { @@ -67137,7 +63801,7 @@ function PositionedIcon(image, top, bottom, left, right) { this.right = right; } -},{}],393:[function(require,module,exports){ +},{}],386:[function(require,module,exports){ 'use strict'; var ShelfPack = require('shelf-pack'); @@ -67370,7 +64034,7 @@ function AtlasImage(rect, width, height, sdf, pixelRatio) { this.pixelRatio = pixelRatio; } -},{"../util/browser":415,"../util/util":431,"shelf-pack":502}],394:[function(require,module,exports){ +},{"../util/browser":408,"../util/util":424,"shelf-pack":495}],387:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -67415,7 +64079,7 @@ util.extendAll(SymbolInstancesArray.prototype.StructType.prototype, { -},{"../util/struct_array":429,"../util/util":431,"point-geometry":472}],395:[function(require,module,exports){ +},{"../util/struct_array":422,"../util/util":424,"point-geometry":465}],388:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -67489,7 +64153,7 @@ util.extendAll(SymbolQuadsArray.prototype.StructType.prototype, { }); -},{"../util/struct_array":429,"../util/util":431,"./quads":390,"point-geometry":472}],396:[function(require,module,exports){ +},{"../util/struct_array":422,"../util/util":424,"./quads":383,"point-geometry":465}],389:[function(require,module,exports){ 'use strict'; var DOM = require('../util/dom'); @@ -67664,7 +64328,7 @@ module.exports = function bindHandlers(map, options) { * property. */ -},{"../util/dom":417,"./handler/box_zoom":402,"./handler/dblclick_zoom":403,"./handler/drag_pan":404,"./handler/drag_rotate":405,"./handler/keyboard":406,"./handler/scroll_zoom":407,"./handler/touch_zoom_rotate":408,"point-geometry":472}],397:[function(require,module,exports){ +},{"../util/dom":410,"./handler/box_zoom":395,"./handler/dblclick_zoom":396,"./handler/drag_pan":397,"./handler/drag_rotate":398,"./handler/keyboard":399,"./handler/scroll_zoom":400,"./handler/touch_zoom_rotate":401,"point-geometry":465}],390:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -68451,7 +65115,7 @@ util.extend(Camera.prototype, /** @lends Map.prototype */{ * @property {MapEventData} data */ -},{"../geo/lng_lat":328,"../geo/lng_lat_bounds":329,"../util/browser":415,"../util/interpolate":425,"../util/util":431,"point-geometry":472}],398:[function(require,module,exports){ +},{"../geo/lng_lat":321,"../geo/lng_lat_bounds":322,"../util/browser":408,"../util/interpolate":418,"../util/util":424,"point-geometry":465}],391:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -68534,7 +65198,7 @@ Attribution.prototype = util.inherit(Control, { } }); -},{"../../util/dom":417,"../../util/util":431,"./control":399}],399:[function(require,module,exports){ +},{"../../util/dom":410,"../../util/util":424,"./control":392}],392:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -68589,7 +65253,7 @@ Control.prototype = { util.extend(Control.prototype, Evented); -},{"../../util/evented":423,"../../util/util":431}],400:[function(require,module,exports){ +},{"../../util/evented":416,"../../util/util":424}],393:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -68691,7 +65355,7 @@ Geolocate.prototype = util.inherit(Control, { * */ -},{"../../util/browser":415,"../../util/dom":417,"../../util/util":431,"./control":399}],401:[function(require,module,exports){ +},{"../../util/browser":408,"../../util/dom":410,"../../util/util":424,"./control":392}],394:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -68812,7 +65476,7 @@ function copyMouseEvent(e) { }); } -},{"../../util/dom":417,"../../util/util":431,"./control":399}],402:[function(require,module,exports){ +},{"../../util/dom":410,"../../util/util":424,"./control":392}],395:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -68999,7 +65663,7 @@ BoxZoomHandler.prototype = { * @property {MapBoxZoomEvent} data */ -},{"../../geo/lng_lat_bounds":329,"../../util/dom":417,"../../util/util":431}],403:[function(require,module,exports){ +},{"../../geo/lng_lat_bounds":322,"../../util/dom":410,"../../util/util":424}],396:[function(require,module,exports){ 'use strict'; module.exports = DoubleClickZoomHandler; @@ -69062,7 +65726,7 @@ DoubleClickZoomHandler.prototype = { } }; -},{}],404:[function(require,module,exports){ +},{}],397:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -69298,7 +65962,7 @@ DragPanHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/dom":417,"../../util/util":431}],405:[function(require,module,exports){ +},{"../../util/dom":410,"../../util/util":424}],398:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -69552,7 +66216,7 @@ DragRotateHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/dom":417,"../../util/util":431,"point-geometry":472}],406:[function(require,module,exports){ +},{"../../util/dom":410,"../../util/util":424,"point-geometry":465}],399:[function(require,module,exports){ 'use strict'; module.exports = KeyboardHandler; @@ -69684,7 +66348,7 @@ KeyboardHandler.prototype = { } }; -},{}],407:[function(require,module,exports){ +},{}],400:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -69867,7 +66531,7 @@ ScrollZoomHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/browser":415,"../../util/dom":417,"../../util/util":431}],408:[function(require,module,exports){ +},{"../../util/browser":408,"../../util/dom":410,"../../util/util":424}],401:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -70082,7 +66746,7 @@ TouchZoomRotateHandler.prototype = { } }; -},{"../../util/dom":417,"../../util/util":431}],409:[function(require,module,exports){ +},{"../../util/dom":410,"../../util/util":424}],402:[function(require,module,exports){ 'use strict'; /* @@ -70157,7 +66821,7 @@ Hash.prototype = { } }; -},{"../util/util":431}],410:[function(require,module,exports){ +},{"../util/util":424}],403:[function(require,module,exports){ 'use strict'; var Canvas = require('../util/canvas'); @@ -71597,7 +68261,7 @@ function removeNode(node) { * @property {{error: {message: string}}} data */ -},{"../geo/lng_lat":328,"../geo/lng_lat_bounds":329,"../geo/transform":330,"../render/painter":344,"../style/animation_loop":364,"../style/style":367,"../util/browser":415,"../util/canvas":416,"../util/dom":417,"../util/evented":423,"../util/util":431,"./bind_handlers":396,"./camera":397,"./control/attribution":398,"./hash":409,"point-geometry":472}],411:[function(require,module,exports){ +},{"../geo/lng_lat":321,"../geo/lng_lat_bounds":322,"../geo/transform":323,"../render/painter":337,"../style/animation_loop":357,"../style/style":360,"../util/browser":408,"../util/canvas":409,"../util/dom":410,"../util/evented":416,"../util/util":424,"./bind_handlers":389,"./camera":390,"./control/attribution":391,"./hash":402,"point-geometry":465}],404:[function(require,module,exports){ /* eslint-disable */ 'use strict'; @@ -71692,7 +68356,7 @@ Marker.prototype = { } }; -},{"../geo/lng_lat":328,"../util/dom":417,"point-geometry":472}],412:[function(require,module,exports){ +},{"../geo/lng_lat":321,"../util/dom":410,"point-geometry":465}],405:[function(require,module,exports){ 'use strict'; module.exports = Popup; @@ -71946,7 +68610,7 @@ Popup.prototype = util.inherit(Evented, /** @lends Popup.prototype */{ } }); -},{"../geo/lng_lat":328,"../util/dom":417,"../util/evented":423,"../util/util":431}],413:[function(require,module,exports){ +},{"../geo/lng_lat":321,"../util/dom":410,"../util/evented":416,"../util/util":424}],406:[function(require,module,exports){ 'use strict'; module.exports = Actor; @@ -72018,7 +68682,7 @@ Actor.prototype.postMessage = function(message, transferList) { this.target.postMessage(message, transferList); }; -},{}],414:[function(require,module,exports){ +},{}],407:[function(require,module,exports){ 'use strict'; exports.getJSON = function(url, callback) { @@ -72108,7 +68772,7 @@ exports.getVideo = function(urls, callback) { return video; }; -},{}],415:[function(require,module,exports){ +},{}],408:[function(require,module,exports){ 'use strict'; /** @@ -72203,7 +68867,7 @@ webpImgTest.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ// exports.supportsGeolocation = !!navigator.geolocation; -},{"mapbox-gl-supported":316}],416:[function(require,module,exports){ +},{"mapbox-gl-supported":309}],409:[function(require,module,exports){ 'use strict'; var util = require('../util'); @@ -72247,7 +68911,7 @@ Canvas.prototype.getElement = function() { return this.canvas; }; -},{"../util":431,"mapbox-gl-supported":316}],417:[function(require,module,exports){ +},{"../util":424,"mapbox-gl-supported":309}],410:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -72322,7 +68986,7 @@ exports.touchPos = function (el, e) { return points; }; -},{"point-geometry":472}],418:[function(require,module,exports){ +},{"point-geometry":465}],411:[function(require,module,exports){ 'use strict'; var WebWorkify = require('webworkify'); @@ -72330,7 +68994,7 @@ module.exports = function () { return new WebWorkify(require('../../source/worker')); }; -},{"../../source/worker":362,"webworkify":551}],419:[function(require,module,exports){ +},{"../../source/worker":355,"webworkify":544}],412:[function(require,module,exports){ 'use strict'; var quickselect = require('quickselect'); @@ -72390,7 +69054,7 @@ function calculateSignedArea(ring) { return sum; } -},{"quickselect":481}],420:[function(require,module,exports){ +},{"quickselect":474}],413:[function(require,module,exports){ 'use strict'; module.exports = { @@ -72398,7 +69062,7 @@ module.exports = { REQUIRE_ACCESS_TOKEN: true }; -},{}],421:[function(require,module,exports){ +},{}],414:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -72425,7 +69089,7 @@ DictionaryCoder.prototype.decode = function(n) { return this._numberToString[n]; }; -},{"assert":39}],422:[function(require,module,exports){ +},{"assert":40}],415:[function(require,module,exports){ 'use strict'; var util = require('./util'); @@ -72500,7 +69164,7 @@ Dispatcher.prototype = { } }; -},{"./actor":413,"./util":431,"./web_worker":418}],423:[function(require,module,exports){ +},{"./actor":406,"./util":424,"./web_worker":411}],416:[function(require,module,exports){ 'use strict'; var util = require('./util'); @@ -72623,7 +69287,7 @@ var Evented = { module.exports = Evented; -},{"./util":431}],424:[function(require,module,exports){ +},{"./util":424}],417:[function(require,module,exports){ 'use strict'; module.exports = Glyphs; @@ -72658,7 +69322,7 @@ function readGlyph(tag, glyph, pbf) { else if (tag === 7) glyph.advance = pbf.readVarint(); } -},{}],425:[function(require,module,exports){ +},{}],418:[function(require,module,exports){ 'use strict'; module.exports = interpolate; @@ -72699,7 +69363,7 @@ interpolate.array = function(from, to, t) { }); }; -},{}],426:[function(require,module,exports){ +},{}],419:[function(require,module,exports){ 'use strict'; module.exports = { @@ -72865,7 +69529,7 @@ function polygonContainsPoint(ring, p) { return c; } -},{}],427:[function(require,module,exports){ +},{}],420:[function(require,module,exports){ 'use strict'; module.exports = LRUCache; @@ -72990,7 +69654,7 @@ LRUCache.prototype.setMaxSize = function(max) { return this; }; -},{}],428:[function(require,module,exports){ +},{}],421:[function(require,module,exports){ 'use strict'; var config = require('./config'); @@ -73118,7 +69782,7 @@ function replaceTempAccessToken(query) { } } -},{"./browser":415,"./config":420,"./util":431,"url":532}],429:[function(require,module,exports){ +},{"./browser":408,"./config":413,"./util":424,"url":525}],422:[function(require,module,exports){ 'use strict'; // Note: all "sizes" are measured in bytes @@ -73466,7 +70130,7 @@ StructArray.prototype.toArray = function(startIndex, endIndex) { return array; }; -},{"assert":39}],430:[function(require,module,exports){ +},{"assert":40}],423:[function(require,module,exports){ 'use strict'; module.exports = resolveTokens; @@ -73485,7 +70149,7 @@ function resolveTokens(properties, text) { }); } -},{}],431:[function(require,module,exports){ +},{}],424:[function(require,module,exports){ 'use strict'; var UnitBezier = require('unitbezier'); @@ -73944,7 +70608,7 @@ exports.warnOnce = function(message) { } }; -},{"../geo/coordinate":327,"unitbezier":531}],432:[function(require,module,exports){ +},{"../geo/coordinate":320,"unitbezier":524}],425:[function(require,module,exports){ 'use strict'; module.exports = Feature; @@ -73989,7 +70653,7 @@ Feature.prototype = { } }; -},{}],433:[function(require,module,exports){ +},{}],426:[function(require,module,exports){ module.exports={ "_args": [ [ @@ -74002,7 +70666,7 @@ module.exports={ "spec": ">=0.22.0 <0.23.0", "type": "range" }, - "/Users/robert/repos/plotly/plotly.js" + "/home/etienne/Documents/plotly/plotly.js" ] ], "_from": "mapbox-gl@>=0.22.0 <0.23.0", @@ -74030,13 +70694,14 @@ module.exports={ "type": "range" }, "_requiredBy": [ + "#USER", "/" ], "_resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz", "_shasum": "92a965547d4c2f24c22cbc487eeda48694cb627a", "_shrinkwrap": null, "_spec": "mapbox-gl@^0.22.0", - "_where": "/Users/robert/repos/plotly/plotly.js", + "_where": "/home/etienne/Documents/plotly/plotly.js", "browser": { "./js/util/ajax.js": "./js/util/browser/ajax.js", "./js/util/browser.js": "./js/util/browser/browser.js", @@ -74329,7 +70994,7 @@ module.exports={ "version": "0.22.1" } -},{}],434:[function(require,module,exports){ +},{}],427:[function(require,module,exports){ 'use strict' module.exports = createTable @@ -74395,7 +71060,7 @@ function createTable(dimension) { } return result } -},{"convex-hull":95}],435:[function(require,module,exports){ +},{"convex-hull":96}],428:[function(require,module,exports){ /*jshint unused:true*/ /* Input: matrix ; a 4x4 matrix @@ -74575,7 +71240,7 @@ function combine(out, a, b, scale1, scale2) { out[1] = a[1] * scale1 + b[1] * scale2 out[2] = a[2] * scale1 + b[2] * scale2 } -},{"./normalize":436,"gl-mat4/clone":166,"gl-mat4/create":167,"gl-mat4/determinant":168,"gl-mat4/invert":172,"gl-mat4/transpose":182,"gl-vec3/cross":263,"gl-vec3/dot":264,"gl-vec3/length":265,"gl-vec3/normalize":267}],436:[function(require,module,exports){ +},{"./normalize":429,"gl-mat4/clone":159,"gl-mat4/create":160,"gl-mat4/determinant":161,"gl-mat4/invert":165,"gl-mat4/transpose":175,"gl-vec3/cross":256,"gl-vec3/dot":257,"gl-vec3/length":258,"gl-vec3/normalize":260}],429:[function(require,module,exports){ module.exports = function normalize(out, mat) { var m44 = mat[15] // Cannot normalize. @@ -74586,7 +71251,7 @@ module.exports = function normalize(out, mat) { out[i] = mat[i] * scale return true } -},{}],437:[function(require,module,exports){ +},{}],430:[function(require,module,exports){ var lerp = require('gl-vec3/lerp') var recompose = require('mat4-recompose') @@ -74639,7 +71304,7 @@ function vec3(n) { function vec4() { return [0,0,0,1] } -},{"gl-mat4/determinant":168,"gl-vec3/lerp":266,"mat4-decompose":435,"mat4-recompose":438,"quat-slerp":477}],438:[function(require,module,exports){ +},{"gl-mat4/determinant":161,"gl-vec3/lerp":259,"mat4-decompose":428,"mat4-recompose":431,"quat-slerp":470}],431:[function(require,module,exports){ /* Input: translation ; a 3 component vector scale ; a 3 component vector @@ -74700,7 +71365,7 @@ module.exports = function recomposeMat4(matrix, translation, scale, skew, perspe mat4.scale(matrix, matrix, scale) return matrix } -},{"gl-mat4/create":167,"gl-mat4/fromRotationTranslation":170,"gl-mat4/identity":171,"gl-mat4/multiply":174,"gl-mat4/scale":180,"gl-mat4/translate":181}],439:[function(require,module,exports){ +},{"gl-mat4/create":160,"gl-mat4/fromRotationTranslation":163,"gl-mat4/identity":164,"gl-mat4/multiply":167,"gl-mat4/scale":173,"gl-mat4/translate":174}],432:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -74900,7 +71565,7 @@ function createMatrixCameraController(options) { return new MatrixCameraController(matrix) } -},{"binary-search-bounds":58,"gl-mat4/invert":172,"gl-mat4/lookAt":173,"gl-mat4/rotateX":177,"gl-mat4/rotateY":178,"gl-mat4/rotateZ":179,"gl-mat4/scale":180,"gl-mat4/translate":181,"gl-vec3/normalize":267,"mat4-interpolate":437}],440:[function(require,module,exports){ +},{"binary-search-bounds":59,"gl-mat4/invert":165,"gl-mat4/lookAt":166,"gl-mat4/rotateX":170,"gl-mat4/rotateY":171,"gl-mat4/rotateZ":172,"gl-mat4/scale":173,"gl-mat4/translate":174,"gl-vec3/normalize":260,"mat4-interpolate":430}],433:[function(require,module,exports){ 'use strict' module.exports = monotoneConvexHull2D @@ -74982,7 +71647,7 @@ function monotoneConvexHull2D(points) { //Return result return result } -},{"robust-orientation":496}],441:[function(require,module,exports){ +},{"robust-orientation":489}],434:[function(require,module,exports){ 'use strict' module.exports = mouseListen @@ -75189,7 +71854,7 @@ function mouseListen (element, callback) { return result } -},{"mouse-event":443}],442:[function(require,module,exports){ +},{"mouse-event":436}],435:[function(require,module,exports){ var rootPosition = { left: 0, top: 0 } module.exports = mouseEventOffset @@ -75216,7 +71881,7 @@ function getBoundingClientOffset (element) { } } -},{}],443:[function(require,module,exports){ +},{}],436:[function(require,module,exports){ 'use strict' function mouseButtons(ev) { @@ -75278,7 +71943,7 @@ function mouseRelativeY(ev) { } exports.y = mouseRelativeY -},{}],444:[function(require,module,exports){ +},{}],437:[function(require,module,exports){ 'use strict' var toPX = require('to-px') @@ -75320,7 +71985,7 @@ function mouseWheelListen(element, callback, noScroll) { return listener } -},{"to-px":522}],445:[function(require,module,exports){ +},{"to-px":515}],438:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -75736,7 +72401,7 @@ function createSurfaceExtractor(args) { order, typesig) } -},{"typedarray-pool":528}],446:[function(require,module,exports){ +},{"typedarray-pool":521}],439:[function(require,module,exports){ "use strict" @@ -75748,7 +72413,7 @@ module.exports = function(array, f) { return array } -},{"cwise/lib/wrapper":105}],447:[function(require,module,exports){ +},{"cwise/lib/wrapper":106}],440:[function(require,module,exports){ 'use strict' module.exports = gradient @@ -76046,7 +72711,7 @@ function gradient(out, inp, bc) { var cached = generateGradient(bc) return cached(out, inp) } -},{"cwise-compiler":102,"dup":117}],448:[function(require,module,exports){ +},{"cwise-compiler":103,"dup":110}],441:[function(require,module,exports){ 'use strict' var warp = require('ndarray-warp') @@ -76076,7 +72741,7 @@ function applyHomography(dest, src, Xi) { }) return dest } -},{"gl-matrix-invert":183,"ndarray-warp":455}],449:[function(require,module,exports){ +},{"gl-matrix-invert":176,"ndarray-warp":448}],442:[function(require,module,exports){ "use strict" function interp1d(arr, x) { @@ -76187,7 +72852,7 @@ module.exports.d1 = interp1d module.exports.d2 = interp2d module.exports.d3 = interp3d -},{}],450:[function(require,module,exports){ +},{}],443:[function(require,module,exports){ "use strict" var compile = require("cwise-compiler") @@ -76650,7 +73315,7 @@ exports.equals = compile({ -},{"cwise-compiler":102}],451:[function(require,module,exports){ +},{"cwise-compiler":103}],444:[function(require,module,exports){ "use strict" var ndarray = require("ndarray") @@ -76673,10 +73338,10 @@ module.exports = function convert(arr, result) { return result } -},{"./doConvert.js":452,"ndarray":456}],452:[function(require,module,exports){ +},{"./doConvert.js":445,"ndarray":449}],445:[function(require,module,exports){ module.exports=require('cwise-compiler')({"args":["array","scalar","index"],"pre":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"body":{"body":"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}","args":[{"name":"_inline_1_arg0_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_1_arg1_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_1_arg2_","lvalue":false,"rvalue":true,"count":4}],"thisVars":[],"localVars":["_inline_1_i","_inline_1_v"]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"funcName":"convert","blockSize":64}) -},{"cwise-compiler":102}],453:[function(require,module,exports){ +},{"cwise-compiler":103}],446:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -77405,7 +74070,7 @@ function compileSort(order, dtype) { } module.exports = compileSort -},{"typedarray-pool":528}],454:[function(require,module,exports){ +},{"typedarray-pool":521}],447:[function(require,module,exports){ "use strict" var compile = require("./lib/compile_sort.js") @@ -77425,19 +74090,19 @@ function sort(array) { } module.exports = sort -},{"./lib/compile_sort.js":453}],455:[function(require,module,exports){ +},{"./lib/compile_sort.js":446}],448:[function(require,module,exports){ 'use strict' var interp = require('ndarray-linear-interpolate') -var do_warp = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=new Array(_inline_18_arg4_)}","args":[{"name":"_inline_18_arg0_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_18_arg1_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_18_arg2_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_18_arg3_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_18_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_19_arg2_(this_warped,_inline_19_arg0_),_inline_19_arg1_=_inline_19_arg3_.apply(void 0,this_warped)}","args":[{"name":"_inline_19_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_19_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_19_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_19_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_19_arg4_","lvalue":false,"rvalue":false,"count":0}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warpND","blockSize":64}) +var do_warp = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=new Array(_inline_21_arg4_)}","args":[{"name":"_inline_21_arg0_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_21_arg1_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_21_arg2_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_21_arg3_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_21_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_22_arg2_(this_warped,_inline_22_arg0_),_inline_22_arg1_=_inline_22_arg3_.apply(void 0,this_warped)}","args":[{"name":"_inline_22_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_22_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_22_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_22_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_22_arg4_","lvalue":false,"rvalue":false,"count":0}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warpND","blockSize":64}) -var do_warp_1 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_22_arg2_(this_warped,_inline_22_arg0_),_inline_22_arg1_=_inline_22_arg3_(_inline_22_arg4_,this_warped[0])}","args":[{"name":"_inline_22_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_22_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_22_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_22_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_22_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp1D","blockSize":64}) +var do_warp_1 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_25_arg2_(this_warped,_inline_25_arg0_),_inline_25_arg1_=_inline_25_arg3_(_inline_25_arg4_,this_warped[0])}","args":[{"name":"_inline_25_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_25_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_25_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_25_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_25_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp1D","blockSize":64}) -var do_warp_2 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_25_arg2_(this_warped,_inline_25_arg0_),_inline_25_arg1_=_inline_25_arg3_(_inline_25_arg4_,this_warped[0],this_warped[1])}","args":[{"name":"_inline_25_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_25_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_25_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_25_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_25_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp2D","blockSize":64}) +var do_warp_2 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_28_arg2_(this_warped,_inline_28_arg0_),_inline_28_arg1_=_inline_28_arg3_(_inline_28_arg4_,this_warped[0],this_warped[1])}","args":[{"name":"_inline_28_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_28_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_28_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_28_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_28_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp2D","blockSize":64}) -var do_warp_3 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_28_arg2_(this_warped,_inline_28_arg0_),_inline_28_arg1_=_inline_28_arg3_(_inline_28_arg4_,this_warped[0],this_warped[1],this_warped[2])}","args":[{"name":"_inline_28_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_28_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_28_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_28_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_28_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp3D","blockSize":64}) +var do_warp_3 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_31_arg2_(this_warped,_inline_31_arg0_),_inline_31_arg1_=_inline_31_arg3_(_inline_31_arg4_,this_warped[0],this_warped[1],this_warped[2])}","args":[{"name":"_inline_31_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_31_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_31_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_31_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_31_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp3D","blockSize":64}) module.exports = function warp(dest, src, func) { switch(src.shape.length) { @@ -77457,7 +74122,7 @@ module.exports = function warp(dest, src, func) { return dest } -},{"cwise/lib/wrapper":105,"ndarray-linear-interpolate":449}],456:[function(require,module,exports){ +},{"cwise/lib/wrapper":106,"ndarray-linear-interpolate":442}],449:[function(require,module,exports){ var iota = require("iota-array") var isBuffer = require("is-buffer") @@ -77802,7 +74467,7 @@ function wrappedNDArrayCtor(data, shape, stride, offset) { module.exports = wrappedNDArrayCtor -},{"iota-array":283,"is-buffer":284}],457:[function(require,module,exports){ +},{"iota-array":276,"is-buffer":277}],450:[function(require,module,exports){ "use strict" var doubleBits = require("double-bits") @@ -77845,7 +74510,7 @@ function nextafter(x, y) { } return doubleBits.pack(lo, hi) } -},{"double-bits":116}],458:[function(require,module,exports){ +},{"double-bits":109}],451:[function(require,module,exports){ var DEFAULT_NORMALS_EPSILON = 1e-6; var DEFAULT_FACE_EPSILON = 1e-6; @@ -77970,7 +74635,7 @@ exports.faceNormals = function(faces, positions, specifiedEpsilon) { -},{}],459:[function(require,module,exports){ +},{}],452:[function(require,module,exports){ /* object-assign (c) Sindre Sorhus @@ -78062,7 +74727,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { return to; }; -},{}],460:[function(require,module,exports){ +},{}],453:[function(require,module,exports){ 'use strict' module.exports = quatFromFrame @@ -78104,7 +74769,7 @@ function quatFromFrame( } return out } -},{}],461:[function(require,module,exports){ +},{}],454:[function(require,module,exports){ 'use strict' module.exports = createOrbitController @@ -78498,7 +75163,7 @@ function createOrbitController(options) { return result } -},{"./lib/quatFromFrame":460,"filtered-vector":125,"gl-mat4/fromQuat":169,"gl-mat4/invert":172,"gl-mat4/lookAt":173}],462:[function(require,module,exports){ +},{"./lib/quatFromFrame":453,"filtered-vector":118,"gl-mat4/fromQuat":162,"gl-mat4/invert":165,"gl-mat4/lookAt":166}],455:[function(require,module,exports){ /*! * pad-left * @@ -78514,7 +75179,7 @@ module.exports = function padLeft(str, num, ch) { ch = typeof ch !== 'undefined' ? (ch + '') : ' '; return repeat(ch, num) + str; }; -},{"repeat-string":488}],463:[function(require,module,exports){ +},{"repeat-string":481}],456:[function(require,module,exports){ module.exports = function parseUnit(str, out) { if (!out) out = [ 0, '' ] @@ -78525,7 +75190,7 @@ module.exports = function parseUnit(str, out) { out[1] = str.match(/[\d.\-\+]*\s*(.*)/)[1] || '' return out } -},{}],464:[function(require,module,exports){ +},{}],457:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -78753,7 +75418,7 @@ var substr = 'ab'.substr(-1) === 'b' ; }).call(this,require('_process')) -},{"_process":475}],465:[function(require,module,exports){ +},{"_process":468}],458:[function(require,module,exports){ 'use strict'; // lightweight Buffer shim for pbf browser build @@ -78914,7 +75579,7 @@ function encodeString(str) { return bytes; } -},{"ieee754":279}],466:[function(require,module,exports){ +},{"ieee754":272}],459:[function(require,module,exports){ (function (global){ 'use strict'; @@ -79340,7 +76005,7 @@ function writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pb function writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./buffer":465}],467:[function(require,module,exports){ +},{"./buffer":458}],460:[function(require,module,exports){ "use strict" module.exports = permutationSign @@ -79392,7 +76057,7 @@ function permutationSign(p) { return sgn } } -},{"typedarray-pool":528}],468:[function(require,module,exports){ +},{"typedarray-pool":521}],461:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -79479,7 +76144,7 @@ function unrank(n, r, p) { exports.rank = rank exports.unrank = unrank -},{"invert-permutation":282,"typedarray-pool":528}],469:[function(require,module,exports){ +},{"invert-permutation":275,"typedarray-pool":521}],462:[function(require,module,exports){ "use strict" module.exports = planarDual @@ -79610,7 +76275,7 @@ function planarDual(cells, positions) { //Combine paths and loops together return cycles } -},{"compare-angle":92}],470:[function(require,module,exports){ +},{"compare-angle":93}],463:[function(require,module,exports){ 'use strict' module.exports = trimLeaves @@ -79666,7 +76331,7 @@ function trimLeaves(edges, positions) { return [ nedges, npositions ] } -},{"edges-to-adjacency-list":119}],471:[function(require,module,exports){ +},{"edges-to-adjacency-list":112}],464:[function(require,module,exports){ 'use strict' module.exports = planarGraphToPolyline @@ -79871,7 +76536,7 @@ function planarGraphToPolyline(edges, positions) { return result } -},{"./lib/trim-leaves":470,"edges-to-adjacency-list":119,"planar-dual":469,"point-in-big-polygon":473,"robust-sum":501,"two-product":526,"uniq":530}],472:[function(require,module,exports){ +},{"./lib/trim-leaves":463,"edges-to-adjacency-list":112,"planar-dual":462,"point-in-big-polygon":466,"robust-sum":494,"two-product":519,"uniq":523}],465:[function(require,module,exports){ 'use strict'; module.exports = Point; @@ -80004,7 +76669,7 @@ Point.convert = function (a) { return a; }; -},{}],473:[function(require,module,exports){ +},{}],466:[function(require,module,exports){ module.exports = preprocessPolygon var orient = require('robust-orientation')[3] @@ -80156,7 +76821,7 @@ function preprocessPolygon(loops) { testSlab) } } -},{"binary-search-bounds":58,"interval-tree-1d":281,"robust-orientation":496,"slab-decomposition":513}],474:[function(require,module,exports){ +},{"binary-search-bounds":59,"interval-tree-1d":274,"robust-orientation":489,"slab-decomposition":506}],467:[function(require,module,exports){ //Optimized version for triangle closest point // Based on Eberly's WildMagick codes // http://www.geometrictools.com/LibMathematics/Distance/Distance.html @@ -80354,7 +77019,7 @@ function closestPoint2d(V0, V1, V2, point, result) { module.exports = closestPoint2d; -},{}],475:[function(require,module,exports){ +},{}],468:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -80536,7 +77201,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],476:[function(require,module,exports){ +},{}],469:[function(require,module,exports){ (function (global){ /*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { @@ -81073,9 +77738,9 @@ process.umask = function() { return 0; }; }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],477:[function(require,module,exports){ +},{}],470:[function(require,module,exports){ module.exports = require('gl-quat/slerp') -},{"gl-quat/slerp":222}],478:[function(require,module,exports){ +},{"gl-quat/slerp":215}],471:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -81161,7 +77826,7 @@ var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; -},{}],479:[function(require,module,exports){ +},{}],472:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -81248,13 +77913,13 @@ var objectKeys = Object.keys || function (obj) { return res; }; -},{}],480:[function(require,module,exports){ +},{}],473:[function(require,module,exports){ 'use strict'; exports.decode = exports.parse = require('./decode'); exports.encode = exports.stringify = require('./encode'); -},{"./decode":478,"./encode":479}],481:[function(require,module,exports){ +},{"./decode":471,"./encode":472}],474:[function(require,module,exports){ 'use strict'; module.exports = partialSort; @@ -81316,7 +77981,7 @@ function defaultCompare(a, b) { return a < b ? -1 : a > b ? 1 : 0; } -},{}],482:[function(require,module,exports){ +},{}],475:[function(require,module,exports){ 'use strict' var bnadd = require('big-rat/add') @@ -81332,7 +77997,7 @@ function add (a, b) { return r } -},{"big-rat/add":42}],483:[function(require,module,exports){ +},{"big-rat/add":43}],476:[function(require,module,exports){ 'use strict' module.exports = float2rat @@ -81347,7 +78012,7 @@ function float2rat(v) { return result } -},{"big-rat":45}],484:[function(require,module,exports){ +},{"big-rat":46}],477:[function(require,module,exports){ 'use strict' var rat = require('big-rat') @@ -81365,7 +78030,7 @@ function muls(a, x) { return r } -},{"big-rat":45,"big-rat/mul":54}],485:[function(require,module,exports){ +},{"big-rat":46,"big-rat/mul":55}],478:[function(require,module,exports){ 'use strict' var bnsub = require('big-rat/sub') @@ -81381,7 +78046,7 @@ function sub(a, b) { return r } -},{"big-rat/sub":56}],486:[function(require,module,exports){ +},{"big-rat/sub":57}],479:[function(require,module,exports){ 'use strict' var compareCell = require('compare-cell') @@ -81414,7 +78079,7 @@ function reduceCellComplex(cells) { return cells } -},{"cell-orientation":77,"compare-cell":93,"compare-oriented-cell":94}],487:[function(require,module,exports){ +},{"cell-orientation":78,"compare-cell":94,"compare-oriented-cell":95}],480:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -90919,7 +87584,7 @@ return wrapREGL; }))); -},{}],488:[function(require,module,exports){ +},{}],481:[function(require,module,exports){ /*! * repeat-string * @@ -90991,7 +87656,7 @@ function repeat(str, num) { return res; } -},{}],489:[function(require,module,exports){ +},{}],482:[function(require,module,exports){ // Copyright 2014 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) @@ -91040,7 +87705,7 @@ void (function(root, factory) { })); -},{}],490:[function(require,module,exports){ +},{}],483:[function(require,module,exports){ (function (global){ module.exports = global.performance && @@ -91051,7 +87716,7 @@ module.exports = } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],491:[function(require,module,exports){ +},{}],484:[function(require,module,exports){ "use strict" module.exports = compressExpansion @@ -91086,7 +87751,7 @@ function compressExpansion(e) { e.length = top return e } -},{}],492:[function(require,module,exports){ +},{}],485:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -91190,7 +87855,7 @@ return robustDeterminant") } generateDispatch() -},{"robust-compress":491,"robust-scale":498,"robust-sum":501,"two-product":526}],493:[function(require,module,exports){ +},{"robust-compress":484,"robust-scale":491,"robust-sum":494,"two-product":519}],486:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -91205,7 +87870,7 @@ function robustDotProduct(a, b) { } return r } -},{"robust-sum":501,"two-product":526}],494:[function(require,module,exports){ +},{"robust-sum":494,"two-product":519}],487:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -91373,7 +88038,7 @@ function generateInSphereTest() { } generateInSphereTest() -},{"robust-scale":498,"robust-subtract":500,"robust-sum":501,"two-product":526}],495:[function(require,module,exports){ +},{"robust-scale":491,"robust-subtract":493,"robust-sum":494,"two-product":519}],488:[function(require,module,exports){ "use strict" var determinant = require("robust-determinant") @@ -91445,7 +88110,7 @@ function generateDispatch() { } generateDispatch() -},{"robust-determinant":492}],496:[function(require,module,exports){ +},{"robust-determinant":485}],489:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -91636,7 +88301,7 @@ function generateOrientationProc() { } generateOrientationProc() -},{"robust-scale":498,"robust-subtract":500,"robust-sum":501,"two-product":526}],497:[function(require,module,exports){ +},{"robust-scale":491,"robust-subtract":493,"robust-sum":494,"two-product":519}],490:[function(require,module,exports){ "use strict" var robustSum = require("robust-sum") @@ -91666,7 +88331,7 @@ function robustProduct(a, b) { } return r } -},{"robust-scale":498,"robust-sum":501}],498:[function(require,module,exports){ +},{"robust-scale":491,"robust-sum":494}],491:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -91717,7 +88382,7 @@ function scaleLinearExpansion(e, scale) { g.length = count return g } -},{"two-product":526,"two-sum":527}],499:[function(require,module,exports){ +},{"two-product":519,"two-sum":520}],492:[function(require,module,exports){ "use strict" module.exports = segmentsIntersect @@ -91765,7 +88430,7 @@ function segmentsIntersect(a0, a1, b0, b1) { return true } -},{"robust-orientation":496}],500:[function(require,module,exports){ +},{"robust-orientation":489}],493:[function(require,module,exports){ "use strict" module.exports = robustSubtract @@ -91922,7 +88587,7 @@ function robustSubtract(e, f) { g.length = count return g } -},{}],501:[function(require,module,exports){ +},{}],494:[function(require,module,exports){ "use strict" module.exports = linearExpansionSum @@ -92079,7 +88744,7 @@ function linearExpansionSum(e, f) { g.length = count return g } -},{}],502:[function(require,module,exports){ +},{}],495:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -92334,7 +88999,7 @@ Shelf.prototype.resize = function(w) { return ShelfPack; })); -},{}],503:[function(require,module,exports){ +},{}],496:[function(require,module,exports){ "use strict" module.exports = function signum(x) { @@ -92342,7 +89007,7 @@ module.exports = function signum(x) { if(x > 0) { return 1 } return 0.0 } -},{}],504:[function(require,module,exports){ +},{}],497:[function(require,module,exports){ 'use strict' module.exports = boundary @@ -92354,7 +89019,7 @@ function boundary(cells) { return reduce(bnd(cells)) } -},{"boundary-cells":61,"reduce-simplicial-complex":486}],505:[function(require,module,exports){ +},{"boundary-cells":62,"reduce-simplicial-complex":479}],498:[function(require,module,exports){ 'use strict' module.exports = extractContour @@ -92517,7 +89182,7 @@ function extractContour(cells, values, level, d) { vertexWeights: uweights } } -},{"./lib/codegen":506,"ndarray":456,"ndarray-sort":454,"typedarray-pool":528}],506:[function(require,module,exports){ +},{"./lib/codegen":499,"ndarray":449,"ndarray-sort":447,"typedarray-pool":521}],499:[function(require,module,exports){ 'use strict' module.exports = getPolygonizer @@ -92614,7 +89279,7 @@ function getPolygonizer(d) { } return alg } -},{"marching-simplex-table":434,"typedarray-pool":528}],507:[function(require,module,exports){ +},{"marching-simplex-table":427,"typedarray-pool":521}],500:[function(require,module,exports){ "use strict"; "use restrict"; var bits = require("bit-twiddle") @@ -92958,11 +89623,11 @@ function connectedComponents(cells, vertex_count) { } exports.connectedComponents = connectedComponents -},{"bit-twiddle":59,"union-find":529}],508:[function(require,module,exports){ -arguments[4][59][0].apply(exports,arguments) -},{"dup":59}],509:[function(require,module,exports){ -arguments[4][507][0].apply(exports,arguments) -},{"bit-twiddle":508,"dup":507,"union-find":510}],510:[function(require,module,exports){ +},{"bit-twiddle":60,"union-find":522}],501:[function(require,module,exports){ +arguments[4][60][0].apply(exports,arguments) +},{"dup":60}],502:[function(require,module,exports){ +arguments[4][500][0].apply(exports,arguments) +},{"bit-twiddle":501,"dup":500,"union-find":503}],503:[function(require,module,exports){ "use strict"; "use restrict"; module.exports = UnionFind; @@ -93019,7 +89684,7 @@ UnionFind.prototype.link = function(x, y) { } -},{}],511:[function(require,module,exports){ +},{}],504:[function(require,module,exports){ "use strict" module.exports = simplifyPolygon @@ -93291,7 +89956,7 @@ function simplifyPolygon(cells, positions, minArea) { edges: ncells } } -},{"robust-orientation":496,"simplicial-complex":509}],512:[function(require,module,exports){ +},{"robust-orientation":489,"simplicial-complex":502}],505:[function(require,module,exports){ "use strict" module.exports = orderSegments @@ -93387,7 +90052,7 @@ function orderSegments(b, a) { } return ar[0] - br[0] } -},{"robust-orientation":496}],513:[function(require,module,exports){ +},{"robust-orientation":489}],506:[function(require,module,exports){ "use strict" module.exports = createSlabDecomposition @@ -93618,7 +90283,7 @@ function createSlabDecomposition(segments) { } return new SlabDecomposition(slabs, lines, horizontal) } -},{"./lib/order-segments":512,"binary-search-bounds":58,"functional-red-black-tree":127,"robust-orientation":496}],514:[function(require,module,exports){ +},{"./lib/order-segments":505,"binary-search-bounds":59,"functional-red-black-tree":120,"robust-orientation":489}],507:[function(require,module,exports){ "use strict" var robustDot = require("robust-dot-product") @@ -93710,7 +90375,7 @@ function negative(points, plane) { } return neg } -},{"robust-dot-product":493,"robust-sum":501}],515:[function(require,module,exports){ +},{"robust-dot-product":486,"robust-sum":494}],508:[function(require,module,exports){ (function(window) { var re = { not_string: /[^s]/, @@ -93920,7 +90585,7 @@ function negative(points, plane) { } })(typeof window === "undefined" ? this : window); -},{}],516:[function(require,module,exports){ +},{}],509:[function(require,module,exports){ 'use strict'; var kdbush = require('kdbush'); @@ -94254,7 +90919,7 @@ function getY(p) { return p.y; } -},{"kdbush":287}],517:[function(require,module,exports){ +},{"kdbush":280}],510:[function(require,module,exports){ 'use strict' module.exports = toSuperScript @@ -94309,7 +90974,7 @@ function toSuperScript(x) { }).join('') } -},{}],518:[function(require,module,exports){ +},{}],511:[function(require,module,exports){ "use strict" module.exports = surfaceNets @@ -94517,7 +91182,7 @@ function surfaceNets(array,level) { } return proc(array,level) } -},{"ndarray-extract-contour":445,"triangulate-hypercube":524,"zero-crossings":571}],519:[function(require,module,exports){ +},{"ndarray-extract-contour":438,"triangulate-hypercube":517,"zero-crossings":564}],512:[function(require,module,exports){ (function (process){ 'use strict' @@ -94607,7 +91272,7 @@ function textGet(font, text, opts) { } }).call(this,require('_process')) -},{"_process":475,"vectorize-text":541}],520:[function(require,module,exports){ +},{"_process":468,"vectorize-text":534}],513:[function(require,module,exports){ 'use strict'; module.exports = TinySDF; @@ -94716,7 +91381,7 @@ function edt1d(f, d, v, z, n) { } } -},{}],521:[function(require,module,exports){ +},{}],514:[function(require,module,exports){ // TinyColor v1.4.1 // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License @@ -95913,7 +92578,7 @@ else { })(Math); -},{}],522:[function(require,module,exports){ +},{}],515:[function(require,module,exports){ 'use strict' var parseUnit = require('parse-unit') @@ -95974,7 +92639,7 @@ function toPX(str, element) { } return 1 } -},{"parse-unit":463}],523:[function(require,module,exports){ +},{"parse-unit":456}],516:[function(require,module,exports){ // https://github.com/topojson/topojson-client Version 2.1.0. Copyright 2016 Mike Bostock. (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : @@ -96494,7 +93159,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); }))); -},{}],524:[function(require,module,exports){ +},{}],517:[function(require,module,exports){ "use strict" module.exports = triangulateCube @@ -96528,7 +93193,7 @@ function triangulateCube(dimension) { } return result } -},{"gamma":128,"permutation-parity":467,"permutation-rank":468}],525:[function(require,module,exports){ +},{"gamma":121,"permutation-parity":460,"permutation-rank":461}],518:[function(require,module,exports){ 'use strict' module.exports = createTurntableController @@ -97101,7 +93766,7 @@ function createTurntableController(options) { theta, phi) } -},{"filtered-vector":125,"gl-mat4/invert":172,"gl-mat4/rotate":176,"gl-vec3/cross":263,"gl-vec3/dot":264,"gl-vec3/normalize":267}],526:[function(require,module,exports){ +},{"filtered-vector":118,"gl-mat4/invert":165,"gl-mat4/rotate":169,"gl-vec3/cross":256,"gl-vec3/dot":257,"gl-vec3/normalize":260}],519:[function(require,module,exports){ "use strict" module.exports = twoProduct @@ -97135,7 +93800,7 @@ function twoProduct(a, b, result) { return [ y, x ] } -},{}],527:[function(require,module,exports){ +},{}],520:[function(require,module,exports){ "use strict" module.exports = fastTwoSum @@ -97153,7 +93818,7 @@ function fastTwoSum(a, b, result) { } return [ar+br, x] } -},{}],528:[function(require,module,exports){ +},{}],521:[function(require,module,exports){ (function (global,Buffer){ 'use strict' @@ -97370,7 +94035,7 @@ exports.clearCache = function clearCache() { } } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"bit-twiddle":59,"buffer":69,"dup":117}],529:[function(require,module,exports){ +},{"bit-twiddle":60,"buffer":70,"dup":110}],522:[function(require,module,exports){ "use strict"; "use restrict"; module.exports = UnionFind; @@ -97433,7 +94098,7 @@ proto.link = function(x, y) { ++ranks[xr]; } } -},{}],530:[function(require,module,exports){ +},{}],523:[function(require,module,exports){ "use strict" function unique_pred(list, compare) { @@ -97492,7 +94157,7 @@ function unique(list, compare, sorted) { module.exports = unique -},{}],531:[function(require,module,exports){ +},{}],524:[function(require,module,exports){ /* * Copyright (C) 2008 Apple Inc. All Rights Reserved. * @@ -97599,7 +94264,7 @@ UnitBezier.prototype.solve = function(x, epsilon) { return this.sampleCurveY(this.solveCurveX(x, epsilon)); }; -},{}],532:[function(require,module,exports){ +},{}],525:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -98333,7 +94998,7 @@ Url.prototype.parseHost = function() { if (host) this.hostname = host; }; -},{"./util":533,"punycode":476,"querystring":480}],533:[function(require,module,exports){ +},{"./util":526,"punycode":469,"querystring":473}],526:[function(require,module,exports){ 'use strict'; module.exports = { @@ -98351,7 +95016,7 @@ module.exports = { } }; -},{}],534:[function(require,module,exports){ +},{}],527:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -98376,14 +95041,14 @@ if (typeof Object.create === 'function') { } } -},{}],535:[function(require,module,exports){ +},{}],528:[function(require,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } -},{}],536:[function(require,module,exports){ +},{}],529:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -98973,12 +95638,12 @@ function hasOwnProperty(obj, prop) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":535,"_process":475,"inherits":534}],537:[function(require,module,exports){ +},{"./support/isBuffer":528,"_process":468,"inherits":527}],530:[function(require,module,exports){ module.exports.VectorTile = require('./lib/vectortile.js'); module.exports.VectorTileFeature = require('./lib/vectortilefeature.js'); module.exports.VectorTileLayer = require('./lib/vectortilelayer.js'); -},{"./lib/vectortile.js":538,"./lib/vectortilefeature.js":539,"./lib/vectortilelayer.js":540}],538:[function(require,module,exports){ +},{"./lib/vectortile.js":531,"./lib/vectortilefeature.js":532,"./lib/vectortilelayer.js":533}],531:[function(require,module,exports){ 'use strict'; var VectorTileLayer = require('./vectortilelayer'); @@ -98997,7 +95662,7 @@ function readTile(tag, layers, pbf) { } -},{"./vectortilelayer":540}],539:[function(require,module,exports){ +},{"./vectortilelayer":533}],532:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -99232,7 +95897,7 @@ function signedArea(ring) { return sum; } -},{"point-geometry":472}],540:[function(require,module,exports){ +},{"point-geometry":465}],533:[function(require,module,exports){ 'use strict'; var VectorTileFeature = require('./vectortilefeature.js'); @@ -99295,7 +95960,7 @@ VectorTileLayer.prototype.feature = function(i) { return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values); }; -},{"./vectortilefeature.js":539}],541:[function(require,module,exports){ +},{"./vectortilefeature.js":532}],534:[function(require,module,exports){ "use strict" module.exports = createText @@ -99322,7 +95987,7 @@ function createText(str, options) { options) } -},{"./lib/vtext":542}],542:[function(require,module,exports){ +},{"./lib/vtext":535}],535:[function(require,module,exports){ "use strict" module.exports = vectorizeText @@ -99528,7 +96193,7 @@ function vectorizeText(str, canvas, context, options) { return processPixels(pixels, options, size) } -},{"cdt2d":71,"clean-pslg":81,"ndarray":456,"planar-graph-to-polyline":471,"simplify-planar-graph":511,"surface-nets":518}],543:[function(require,module,exports){ +},{"cdt2d":72,"clean-pslg":82,"ndarray":449,"planar-graph-to-polyline":464,"simplify-planar-graph":504,"surface-nets":511}],536:[function(require,module,exports){ var Pbf = require('pbf') var vtpb = require('./vector-tile-pb') var GeoJSONWrapper = require('./lib/geojson_wrapper') @@ -99684,7 +96349,7 @@ function wrapValue (value) { return result } -},{"./lib/geojson_wrapper":544,"./vector-tile-pb":545,"pbf":466}],544:[function(require,module,exports){ +},{"./lib/geojson_wrapper":537,"./vector-tile-pb":538,"pbf":459}],537:[function(require,module,exports){ 'use strict' var Point = require('point-geometry') @@ -99752,7 +96417,7 @@ FeatureWrapper.prototype.bbox = function () { FeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON -},{"point-geometry":472,"vector-tile":537}],545:[function(require,module,exports){ +},{"point-geometry":465,"vector-tile":530}],538:[function(require,module,exports){ 'use strict'; // tile ======================================== @@ -99858,7 +96523,7 @@ function writeLayer(layer, pbf) { if (layer.extent !== undefined) pbf.writeVarintField(5, layer.extent); } -},{}],546:[function(require,module,exports){ +},{}],539:[function(require,module,exports){ // Copyright (C) 2011 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -100545,7 +97210,7 @@ function writeLayer(layer, pbf) { } })(); -},{}],547:[function(require,module,exports){ +},{}],540:[function(require,module,exports){ var hiddenStore = require('./hidden-store.js'); module.exports = createStore; @@ -100566,7 +97231,7 @@ function createStore() { }; } -},{"./hidden-store.js":548}],548:[function(require,module,exports){ +},{"./hidden-store.js":541}],541:[function(require,module,exports){ module.exports = hiddenStore; function hiddenStore(obj, key) { @@ -100584,7 +97249,7 @@ function hiddenStore(obj, key) { return store; } -},{}],549:[function(require,module,exports){ +},{}],542:[function(require,module,exports){ // Original - @Gozola. // https://gist.github.com/Gozala/1269991 // This is a reimplemented version (with a few bug fixes). @@ -100615,14 +97280,14 @@ function weakMap() { } } -},{"./create-store.js":547}],550:[function(require,module,exports){ +},{"./create-store.js":540}],543:[function(require,module,exports){ var getContext = require('get-canvas-context') module.exports = function getWebGLContext (opt) { return getContext('webgl', opt) } -},{"get-canvas-context":139}],551:[function(require,module,exports){ +},{"get-canvas-context":132}],544:[function(require,module,exports){ var bundleFn = arguments[3]; var sources = arguments[4]; var cache = arguments[5]; @@ -100705,12 +97370,12 @@ module.exports = function (fn, options) { return worker; }; -},{}],552:[function(require,module,exports){ +},{}],545:[function(require,module,exports){ module.exports.RADIUS = 6378137; module.exports.FLATTENING = 1/298.257223563; module.exports.POLAR_RADIUS = 6356752.3142; -},{}],553:[function(require,module,exports){ +},{}],546:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : @@ -100800,7 +97465,7 @@ exports.getMercCoords = getMercCoords; Object.defineProperty(exports, '__esModule', { value: true }); })); -},{}],554:[function(require,module,exports){ +},{}],547:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -101533,7 +98198,7 @@ function toSolar(yearOrDate, monthOrResult, day, isIntercalaryOrResult, result) } -},{"../main":568,"object-assign":459}],555:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],548:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -101717,7 +98382,7 @@ assign(CopticCalendar.prototype, { main.calendars.coptic = CopticCalendar; -},{"../main":568,"object-assign":459}],556:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],549:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -101945,7 +98610,7 @@ var centuries = { main.calendars.discworld = DiscworldCalendar; -},{"../main":568,"object-assign":459}],557:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],550:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102129,7 +98794,7 @@ assign(EthiopianCalendar.prototype, { main.calendars.ethiopian = EthiopianCalendar; -},{"../main":568,"object-assign":459}],558:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],551:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102403,7 +99068,7 @@ function mod(a, b) { main.calendars.hebrew = HebrewCalendar; -},{"../main":568,"object-assign":459}],559:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],552:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102584,7 +99249,7 @@ assign(IslamicCalendar.prototype, { main.calendars.islamic = IslamicCalendar; -},{"../main":568,"object-assign":459}],560:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],553:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102767,7 +99432,7 @@ assign(JulianCalendar.prototype, { main.calendars.julian = JulianCalendar; -},{"../main":568,"object-assign":459}],561:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],554:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -103062,7 +99727,7 @@ function amod(a, b) { main.calendars.mayan = MayanCalendar; -},{"../main":568,"object-assign":459}],562:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],555:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -103242,7 +99907,7 @@ assign(NanakshahiCalendar.prototype, { main.calendars.nanakshahi = NanakshahiCalendar; -},{"../main":568,"object-assign":459}],563:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],556:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -103665,7 +100330,7 @@ assign(NepaliCalendar.prototype, { main.calendars.nepali = NepaliCalendar; -},{"../main":568,"object-assign":459}],564:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],557:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -103855,7 +100520,7 @@ main.calendars.persian = PersianCalendar; main.calendars.jalali = PersianCalendar; -},{"../main":568,"object-assign":459}],565:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],558:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -104041,7 +100706,7 @@ assign(TaiwanCalendar.prototype, { main.calendars.taiwan = TaiwanCalendar; -},{"../main":568,"object-assign":459}],566:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],559:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -104227,7 +100892,7 @@ assign(ThaiCalendar.prototype, { main.calendars.thai = ThaiCalendar; -},{"../main":568,"object-assign":459}],567:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],560:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -104592,7 +101257,7 @@ var ummalqura_dat = [ 79990]; -},{"../main":568,"object-assign":459}],568:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],561:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -105497,7 +102162,7 @@ _exports.baseCalendar = BaseCalendar; _exports.calendars.gregorian = GregorianCalendar; -},{"object-assign":459}],569:[function(require,module,exports){ +},{"object-assign":452}],562:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -105999,7 +102664,7 @@ assign(main.baseCalendar.prototype, { }); -},{"./main":568,"object-assign":459}],570:[function(require,module,exports){ +},{"./main":561,"object-assign":452}],563:[function(require,module,exports){ module.exports = require('cwise-compiler')({ args: ['array', { offset: [1], @@ -106051,7 +102716,7 @@ module.exports = require('cwise-compiler')({ funcName: 'zeroCrossings' }) -},{"cwise-compiler":102}],571:[function(require,module,exports){ +},{"cwise-compiler":103}],564:[function(require,module,exports){ "use strict" module.exports = findZeroCrossings @@ -106064,7 +102729,7 @@ function findZeroCrossings(array, level) { core(array.hi(array.shape[0]-1), cross, level) return cross } -},{"./lib/zc-core":570}],572:[function(require,module,exports){ +},{"./lib/zc-core":563}],565:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106150,6 +102815,9 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op // xanchor, yanchor coerce(axLetter + 'anchor'); + + // xshift, yshift + coerce(axLetter + 'shift'); } // if you have one coordinate you should have both @@ -106192,7 +102860,7 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op return annOut; }; -},{"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/constants":734,"../color":585,"./attributes":574}],573:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/constants":729,"../color":578,"./attributes":567}],566:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106257,7 +102925,7 @@ module.exports = [ } ]; -},{}],574:[function(require,module,exports){ +},{}],567:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106440,7 +103108,9 @@ module.exports = { description: [ 'Sets a distance, in pixels, to move the arrowhead away from the', 'position it is pointing at, for example to point at the edge of', - 'a marker independent of zoom.' + 'a marker independent of zoom. Note that this shortens the arrow', + 'from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`', + 'which moves everything by this amount.' ].join(' ') }, ax: { @@ -106552,6 +103222,15 @@ module.exports = { 'corresponds to the closest side.' ].join(' ') }, + xshift: { + valType: 'number', + dflt: 0, + role: 'style', + description: [ + 'Shifts the position of the whole annotation and arrow to the', + 'right (positive) or left (negative) by this many pixels.' + ].join(' ') + }, yref: { valType: 'enumerated', values: [ @@ -106602,6 +103281,15 @@ module.exports = { 'corresponds to the closest side.' ].join(' ') }, + yshift: { + valType: 'number', + dflt: 0, + role: 'style', + description: [ + 'Shifts the position of the whole annotation and arrow up', + '(positive) or down (negative) by this many pixels.' + ].join(' ') + }, clicktoshow: { valType: 'enumerated', values: [false, 'onoff', 'onout'], @@ -106697,7 +103385,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../../plots/cartesian/constants":734,"../../plots/font_attributes":753,"./arrow_paths":573}],575:[function(require,module,exports){ +},{"../../lib/extend":677,"../../plots/cartesian/constants":729,"../../plots/font_attributes":748,"./arrow_paths":566}],568:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106750,12 +103438,17 @@ function annAutorange(gd) { ya = Axes.getFromId(gd, ann.yref), headSize = 3 * ann.arrowsize * ann.arrowwidth || 0; + var headPlus, headMinus; + if(xa && xa.autorange) { + headPlus = headSize + ann.xshift; + headMinus = headSize - ann.xshift; + if(ann.axref === ann.xref) { // expand for the arrowhead (padded by arrowhead) Axes.expand(xa, [xa.r2c(ann.x)], { - ppadplus: headSize, - ppadminus: headSize + ppadplus: headPlus, + ppadminus: headMinus }); // again for the textbox (padded by textbox) Axes.expand(xa, [xa.r2c(ann.ax)], { @@ -106765,17 +103458,20 @@ function annAutorange(gd) { } else { Axes.expand(xa, [xa.r2c(ann.x)], { - ppadplus: Math.max(ann._xpadplus, headSize), - ppadminus: Math.max(ann._xpadminus, headSize) + ppadplus: Math.max(ann._xpadplus, headPlus), + ppadminus: Math.max(ann._xpadminus, headMinus) }); } } if(ya && ya.autorange) { + headPlus = headSize - ann.yshift; + headMinus = headSize + ann.yshift; + if(ann.ayref === ann.yref) { Axes.expand(ya, [ya.r2c(ann.y)], { - ppadplus: headSize, - ppadminus: headSize + ppadplus: headPlus, + ppadminus: headMinus }); Axes.expand(ya, [ya.r2c(ann.ay)], { ppadplus: ann._ypadplus, @@ -106784,15 +103480,15 @@ function annAutorange(gd) { } else { Axes.expand(ya, [ya.r2c(ann.y)], { - ppadplus: Math.max(ann._ypadplus, headSize), - ppadminus: Math.max(ann._ypadminus, headSize) + ppadplus: Math.max(ann._ypadplus, headPlus), + ppadminus: Math.max(ann._ypadminus, headMinus) }); } } }); } -},{"../../lib":690,"../../plots/cartesian/axes":729,"./draw":579}],576:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"./draw":572}],569:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106917,7 +103613,7 @@ function getToggleSets(gd, hoverData) { return {on: onSet, off: offSet, explicitOff: explicitOffSet}; } -},{"../../plotly":724}],577:[function(require,module,exports){ +},{"../../plotly":719}],570:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106980,7 +103676,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":710,"fast-isnumeric":123}],578:[function(require,module,exports){ +},{"../../lib/to_log_range":705,"fast-isnumeric":116}],571:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107005,7 +103701,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { handleArrayContainerDefaults(layoutIn, layoutOut, opts); }; -},{"../../plots/array_container_defaults":726,"./annotation_defaults":572}],579:[function(require,module,exports){ +},{"../../plots/array_container_defaults":721,"./annotation_defaults":565}],572:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107244,6 +103940,7 @@ function drawOne(gd, index) { // but this one is the positive total size annSize = Math.abs(annSizeFromWidth) + Math.abs(annSizeFromHeight), anchor = options[axLetter + 'anchor'], + overallShift = options[axLetter + 'shift'] * (axLetter === 'x' ? 1 : -1), posPx = annPosPx[axLetter], basePx, textPadShift, @@ -107334,6 +104031,9 @@ function drawOne(gd, index) { posPx.text -= shiftMinus; } } + + posPx.tail += overallShift; + posPx.head += overallShift; } else { // with no arrow, the text rotates and *then* we put the anchor @@ -107343,6 +104043,10 @@ function drawOne(gd, index) { posPx.text = basePx + textShift; } + posPx.text += overallShift; + textShift += overallShift; + textPadShift += overallShift; + // padplus/minus are used by autorange options['_' + axLetter + 'padplus'] = (annSize / 2) + textPadShift; options['_' + axLetter + 'padminus'] = (annSize / 2) - textPadShift; @@ -107532,21 +104236,17 @@ function drawOne(gd, index) { update[annbase + '.x'] = xa ? xa.p2r(xa.r2p(options.x) + dx) : - ((headX + dx - gs.l) / gs.w); + (options.x + (dx / gs.w)); update[annbase + '.y'] = ya ? ya.p2r(ya.r2p(options.y) + dy) : - (1 - ((headY + dy - gs.t) / gs.h)); + (options.y - (dy / gs.h)); if(options.axref === options.xref) { - update[annbase + '.ax'] = xa ? - xa.p2r(xa.r2p(options.ax) + dx) : - ((headX + dx - gs.l) / gs.w); + update[annbase + '.ax'] = xa.p2r(xa.r2p(options.ax) + dx); } if(options.ayref === options.yref) { - update[annbase + '.ay'] = ya ? - ya.p2r(ya.r2p(options.ay) + dy) : - (1 - ((headY + dy - gs.t) / gs.h)); + update[annbase + '.ay'] = ya.p2r(ya.r2p(options.ay) + dy); } arrowGroup.attr('transform', 'translate(' + dx + ',' + dy + ')'); @@ -107602,7 +104302,8 @@ function drawOne(gd, index) { if(xa) update[annbase + '.x'] = options.x + dx / xa._m; else { var widthFraction = options._xsize / gs.w, - xLeft = options.x + options._xshift / gs.w - widthFraction / 2; + xLeft = options.x + (options._xshift - options.xshift) / gs.w - + widthFraction / 2; update[annbase + '.x'] = dragElement.align(xLeft + dx / gs.w, widthFraction, 0, 1, options.xanchor); @@ -107611,7 +104312,8 @@ function drawOne(gd, index) { if(ya) update[annbase + '.y'] = options.y + dy / ya._m; else { var heightFraction = options._ysize / gs.h, - yBottom = options.y - options._yshift / gs.h - heightFraction / 2; + yBottom = options.y - (options._yshift + options.yshift) / gs.h - + heightFraction / 2; update[annbase + '.y'] = dragElement.align(yBottom - dy / gs.h, heightFraction, 0, 1, options.yanchor); @@ -107685,7 +104387,7 @@ function lineIntersect(x1, y1, x2, y2, x3, y3, x4, y4) { return {x: x1 + a * t, y: y1 + d * t}; } -},{"../../lib":690,"../../lib/setcursor":705,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"../../plots/plots":792,"../color":585,"../dragelement":606,"../drawing":608,"./draw_arrow_head":580,"d3":114}],580:[function(require,module,exports){ +},{"../../lib":685,"../../lib/setcursor":700,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"../../plots/plots":787,"../color":578,"../dragelement":599,"../drawing":602,"./draw_arrow_head":573,"d3":107}],573:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107819,7 +104521,7 @@ module.exports = function drawArrowHead(el3, style, ends, mag, standoff) { if(doEnd) drawhead(end, endRot); }; -},{"../color":585,"../drawing":608,"./arrow_paths":573,"d3":114,"fast-isnumeric":123}],581:[function(require,module,exports){ +},{"../color":578,"../drawing":602,"./arrow_paths":566,"d3":107,"fast-isnumeric":116}],574:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107851,7 +104553,7 @@ module.exports = { convertCoords: require('./convert_coords') }; -},{"./attributes":574,"./calc_autorange":575,"./click":576,"./convert_coords":577,"./defaults":578,"./draw":579}],582:[function(require,module,exports){ +},{"./attributes":567,"./calc_autorange":568,"./click":569,"./convert_coords":570,"./defaults":571,"./draw":572}],575:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107884,7 +104586,7 @@ require('world-calendars/dist/calendars/taiwan'); require('world-calendars/dist/calendars/thai'); require('world-calendars/dist/calendars/ummalqura'); -},{"world-calendars/dist/calendars/chinese":554,"world-calendars/dist/calendars/coptic":555,"world-calendars/dist/calendars/discworld":556,"world-calendars/dist/calendars/ethiopian":557,"world-calendars/dist/calendars/hebrew":558,"world-calendars/dist/calendars/islamic":559,"world-calendars/dist/calendars/julian":560,"world-calendars/dist/calendars/mayan":561,"world-calendars/dist/calendars/nanakshahi":562,"world-calendars/dist/calendars/nepali":563,"world-calendars/dist/calendars/persian":564,"world-calendars/dist/calendars/taiwan":565,"world-calendars/dist/calendars/thai":566,"world-calendars/dist/calendars/ummalqura":567,"world-calendars/dist/main":568,"world-calendars/dist/plus":569}],583:[function(require,module,exports){ +},{"world-calendars/dist/calendars/chinese":547,"world-calendars/dist/calendars/coptic":548,"world-calendars/dist/calendars/discworld":549,"world-calendars/dist/calendars/ethiopian":550,"world-calendars/dist/calendars/hebrew":551,"world-calendars/dist/calendars/islamic":552,"world-calendars/dist/calendars/julian":553,"world-calendars/dist/calendars/mayan":554,"world-calendars/dist/calendars/nanakshahi":555,"world-calendars/dist/calendars/nepali":556,"world-calendars/dist/calendars/persian":557,"world-calendars/dist/calendars/taiwan":558,"world-calendars/dist/calendars/thai":559,"world-calendars/dist/calendars/ummalqura":560,"world-calendars/dist/main":561,"world-calendars/dist/plus":562}],576:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108143,7 +104845,7 @@ module.exports = { worldCalFmt: worldCalFmt }; -},{"../../constants/numerical":672,"../../lib":690,"./calendars":582}],584:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685,"./calendars":575}],577:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108183,7 +104885,7 @@ exports.borderLine = '#BEC8D9'; // gives back exactly lightLine if the other colors are defaults. exports.lightFraction = 100 * (0xe - 0x4) / (0xf - 0x4); -},{}],585:[function(require,module,exports){ +},{}],578:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108354,7 +105056,7 @@ function cleanOne(val) { return 'rgb(' + rgbStr + ')'; } -},{"./attributes":584,"fast-isnumeric":123,"tinycolor2":521}],586:[function(require,module,exports){ +},{"./attributes":577,"fast-isnumeric":116,"tinycolor2":514}],579:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108550,7 +105252,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../../plots/cartesian/layout_attributes":740,"../../plots/font_attributes":753}],587:[function(require,module,exports){ +},{"../../lib/extend":677,"../../plots/cartesian/layout_attributes":735,"../../plots/font_attributes":748}],580:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108617,7 +105319,7 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) { coerce('titleside'); }; -},{"../../lib":690,"../../plots/cartesian/tick_label_defaults":747,"../../plots/cartesian/tick_mark_defaults":748,"../../plots/cartesian/tick_value_defaults":749,"./attributes":586}],588:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/tick_label_defaults":742,"../../plots/cartesian/tick_mark_defaults":743,"../../plots/cartesian/tick_value_defaults":744,"./attributes":579}],581:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109250,7 +105952,7 @@ module.exports = function draw(gd, id) { return component; }; -},{"../../lib":690,"../../lib/extend":682,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_defaults":731,"../../plots/cartesian/layout_attributes":740,"../../plots/cartesian/position_defaults":743,"../../plots/plots":792,"../../registry":807,"../color":585,"../dragelement":606,"../drawing":608,"../titles":661,"./attributes":586,"d3":114,"tinycolor2":521}],589:[function(require,module,exports){ +},{"../../lib":685,"../../lib/extend":677,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_defaults":726,"../../plots/cartesian/layout_attributes":735,"../../plots/cartesian/position_defaults":738,"../../plots/plots":787,"../../registry":802,"../color":578,"../dragelement":599,"../drawing":602,"../titles":655,"./attributes":579,"d3":107,"tinycolor2":514}],582:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109269,7 +105971,7 @@ module.exports = function hasColorbar(container) { return Lib.isPlainObject(container.colorbar); }; -},{"../../lib":690}],590:[function(require,module,exports){ +},{"../../lib":685}],583:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109342,7 +106044,7 @@ module.exports = { } }; -},{}],591:[function(require,module,exports){ +},{}],584:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109421,7 +106123,7 @@ module.exports = function calc(trace, vals, containerStr, cLetter) { } }; -},{"../../lib":690,"./flip_scale":596,"./scales":603}],592:[function(require,module,exports){ +},{"../../lib":685,"./flip_scale":589,"./scales":596}],585:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109511,7 +106213,7 @@ module.exports = function makeColorScaleAttributes(context) { }; }; -},{"../../lib/extend":682,"./attributes":590,"./scales.js":603}],593:[function(require,module,exports){ +},{"../../lib/extend":677,"./attributes":583,"./scales.js":596}],586:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109527,7 +106229,7 @@ var scales = require('./scales'); module.exports = scales.RdBu; -},{"./scales":603}],594:[function(require,module,exports){ +},{"./scales":596}],587:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109591,7 +106293,7 @@ module.exports = function colorScaleDefaults(traceIn, traceOut, layout, coerce, if(showScale) colorbarDefaults(containerIn, containerOut, layout); }; -},{"../../lib":690,"../colorbar/defaults":587,"../colorbar/has_colorbar":589,"./flip_scale":596,"./is_valid_scale":600,"fast-isnumeric":123}],595:[function(require,module,exports){ +},{"../../lib":685,"../colorbar/defaults":580,"../colorbar/has_colorbar":582,"./flip_scale":589,"./is_valid_scale":593,"fast-isnumeric":116}],588:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109628,7 +106330,7 @@ module.exports = function extractScale(scl, cmin, cmax) { }; }; -},{}],596:[function(require,module,exports){ +},{}],589:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109653,7 +106355,7 @@ module.exports = function flipScale(scl) { return sclNew; }; -},{}],597:[function(require,module,exports){ +},{}],590:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109693,7 +106395,7 @@ module.exports = function getScale(scl, dflt) { return scl; }; -},{"./default_scale":593,"./is_valid_scale_array":601,"./scales":603}],598:[function(require,module,exports){ +},{"./default_scale":586,"./is_valid_scale_array":594,"./scales":596}],591:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109739,7 +106441,7 @@ module.exports = function hasColorscale(trace, containerStr) { ); }; -},{"../../lib":690,"./is_valid_scale":600,"fast-isnumeric":123}],599:[function(require,module,exports){ +},{"../../lib":685,"./is_valid_scale":593,"fast-isnumeric":116}],592:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109773,7 +106475,7 @@ exports.extractScale = require('./extract_scale'); exports.makeColorScaleFunc = require('./make_color_scale_func'); -},{"./attributes":590,"./calc":591,"./default_scale":593,"./defaults":594,"./extract_scale":595,"./flip_scale":596,"./get_scale":597,"./has_colorscale":598,"./is_valid_scale":600,"./make_color_scale_func":602,"./scales":603}],600:[function(require,module,exports){ +},{"./attributes":583,"./calc":584,"./default_scale":586,"./defaults":587,"./extract_scale":588,"./flip_scale":589,"./get_scale":590,"./has_colorscale":591,"./is_valid_scale":593,"./make_color_scale_func":595,"./scales":596}],593:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109794,7 +106496,7 @@ module.exports = function isValidScale(scl) { else return isValidScaleArray(scl); }; -},{"./is_valid_scale_array":601,"./scales":603}],601:[function(require,module,exports){ +},{"./is_valid_scale_array":594,"./scales":596}],594:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109831,7 +106533,7 @@ module.exports = function isValidScaleArray(scl) { return true; }; -},{"tinycolor2":521}],602:[function(require,module,exports){ +},{"tinycolor2":514}],595:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109927,7 +106629,7 @@ function colorArray2rbga(colorArray) { return tinycolor(colorObj).toRgbString(); } -},{"../color":585,"d3":114,"fast-isnumeric":123,"tinycolor2":521}],603:[function(require,module,exports){ +},{"../color":578,"d3":107,"fast-isnumeric":116,"tinycolor2":514}],596:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110058,7 +106760,7 @@ module.exports = { ] }; -},{}],604:[function(require,module,exports){ +},{}],597:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110091,7 +106793,7 @@ module.exports = function align(v, dv, v0, v1, anchor) { return vc; }; -},{}],605:[function(require,module,exports){ +},{}],598:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110129,7 +106831,7 @@ module.exports = function getCursor(x, y, xanchor, yanchor) { return cursorset[y][x]; }; -},{"../../lib":690}],606:[function(require,module,exports){ +},{"../../lib":685}],599:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110331,7 +107033,7 @@ function finishDrag(gd) { if(gd._replotPending) Plotly.plot(gd); } -},{"../../constants/interactions":671,"../../lib":690,"../../plotly":724,"../../plots/cartesian/constants":734,"./align":604,"./cursor":605,"./unhover":607}],607:[function(require,module,exports){ +},{"../../constants/interactions":665,"../../lib":685,"../../plotly":719,"../../plots/cartesian/constants":729,"./align":597,"./cursor":598,"./unhover":600}],600:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110375,6 +107077,8 @@ unhover.raw = function unhoverRaw(gd, evt) { } fullLayout._hoverlayer.selectAll('g').remove(); + fullLayout._hoverlayer.selectAll('line').remove(); + fullLayout._hoverlayer.selectAll('circle').remove(); gd._hoverdata = undefined; if(evt.target && oldhoverdata) { @@ -110385,7 +107089,35 @@ unhover.raw = function unhoverRaw(gd, evt) { } }; -},{"../../lib/events":681}],608:[function(require,module,exports){ +},{"../../lib/events":676}],601:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +exports.dash = { + valType: 'string', + // string type usually doesn't take values... this one should really be + // a special type or at least a special coercion function, from the GUI + // you only get these values but elsewhere the user can supply a list of + // dash lengths in px, and it will be honored + values: ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'], + dflt: 'solid', + role: 'style', + description: [ + 'Sets the dash style of lines. Set to a dash type string', + '(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)', + 'or a dash length list in px (eg *5px,10px,2px,2px*).' + ].join(' ') +}; + +},{}],602:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110501,6 +107233,17 @@ drawing.lineGroupStyle = function(s, lw, lc, ld) { drawing.dashLine = function(s, dash, lineWidth) { lineWidth = +lineWidth || 0; + + dash = drawing.dashStyle(dash, lineWidth); + + s.style({ + 'stroke-dasharray': dash, + 'stroke-width': lineWidth + 'px' + }); +}; + +drawing.dashStyle = function(dash, lineWidth) { + lineWidth = +lineWidth || 1; var dlw = Math.max(lineWidth, 3); if(dash === 'solid') dash = ''; @@ -110515,10 +107258,7 @@ drawing.dashLine = function(s, dash, lineWidth) { } // otherwise user wrote the dasharray themselves - leave it be - s.style({ - 'stroke-dasharray': dash, - 'stroke-width': lineWidth + 'px' - }); + return dash; }; drawing.fillGroupStyle = function(s) { @@ -111067,7 +107807,17 @@ drawing.setPointGroupScale = function(selection, x, y) { return scale; }; -},{"../../constants/xmlns_namespaces":674,"../../lib":690,"../../lib/svg_text_utils":709,"../../registry":807,"../../traces/scatter/make_bubble_size_func":962,"../../traces/scatter/subtypes":967,"../color":585,"../colorscale":599,"./symbol_defs":609,"d3":114,"fast-isnumeric":123}],609:[function(require,module,exports){ +drawing.measureText = function(tester, text, font) { + var dummyText = tester.append('text') + .text(text) + .call(drawing.font, font); + + var bbox = drawing.bBox(dummyText.node()); + dummyText.remove(); + return bbox; +}; + +},{"../../constants/xmlns_namespaces":668,"../../lib":685,"../../lib/svg_text_utils":704,"../../registry":802,"../../traces/scatter/make_bubble_size_func":991,"../../traces/scatter/subtypes":996,"../color":578,"../colorscale":592,"./symbol_defs":603,"d3":107,"fast-isnumeric":116}],603:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111543,7 +108293,7 @@ module.exports = { } }; -},{"d3":114}],610:[function(require,module,exports){ +},{"d3":107}],604:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111685,7 +108435,7 @@ module.exports = { } }; -},{}],611:[function(require,module,exports){ +},{}],605:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111748,7 +108498,7 @@ function calcOneAxis(calcTrace, trace, axis, coord) { Axes.expand(axis, vals, {padded: true}); } -},{"../../plots/cartesian/axes":729,"../../registry":807,"./compute_error":612,"fast-isnumeric":123}],612:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"../../registry":802,"./compute_error":606,"fast-isnumeric":116}],606:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111844,7 +108594,7 @@ function makeComputeErrorValue(type, value) { } } -},{}],613:[function(require,module,exports){ +},{}],607:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111921,7 +108671,7 @@ module.exports = function(traceIn, traceOut, defaultColor, opts) { } }; -},{"../../lib":690,"../../registry":807,"./attributes":610,"fast-isnumeric":123}],614:[function(require,module,exports){ +},{"../../lib":685,"../../registry":802,"./attributes":604,"fast-isnumeric":116}],608:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111980,7 +108730,7 @@ errorBars.hoverInfo = function(calcPoint, trace, hoverPoint) { } }; -},{"./attributes":610,"./calc":611,"./defaults":613,"./plot":615,"./style":616}],615:[function(require,module,exports){ +},{"./attributes":604,"./calc":605,"./defaults":607,"./plot":609,"./style":610}],609:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112144,7 +108894,7 @@ function errorCoords(d, xa, ya) { return out; } -},{"../../traces/scatter/subtypes":967,"d3":114,"fast-isnumeric":123}],616:[function(require,module,exports){ +},{"../../traces/scatter/subtypes":996,"d3":107,"fast-isnumeric":116}],610:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112181,7 +108931,7 @@ module.exports = function style(traces) { }); }; -},{"../color":585,"d3":114}],617:[function(require,module,exports){ +},{"../color":578,"d3":107}],611:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112350,7 +109100,7 @@ module.exports = { } }; -},{"../../plots/cartesian/constants":734}],618:[function(require,module,exports){ +},{"../../plots/cartesian/constants":729}],612:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112433,7 +109183,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":710,"fast-isnumeric":123}],619:[function(require,module,exports){ +},{"../../lib/to_log_range":705,"fast-isnumeric":116}],613:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112494,7 +109244,7 @@ function imageDefaults(imageIn, imageOut, fullLayout) { return imageOut; } -},{"../../lib":690,"../../plots/array_container_defaults":726,"../../plots/cartesian/axes":729,"./attributes":617}],620:[function(require,module,exports){ +},{"../../lib":685,"../../plots/array_container_defaults":721,"../../plots/cartesian/axes":724,"./attributes":611}],614:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112711,7 +109461,7 @@ module.exports = function draw(gd) { } }; -},{"../../constants/xmlns_namespaces":674,"../../plots/cartesian/axes":729,"../drawing":608,"d3":114}],621:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":668,"../../plots/cartesian/axes":724,"../drawing":602,"d3":107}],615:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112734,7 +109484,7 @@ module.exports = { convertCoords: require('./convert_coords') }; -},{"./attributes":617,"./convert_coords":618,"./defaults":619,"./draw":620}],622:[function(require,module,exports){ +},{"./attributes":611,"./convert_coords":612,"./defaults":613,"./draw":614}],616:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112783,7 +109533,7 @@ exports.isMiddleAnchor = function isMiddleAnchor(opts) { ); }; -},{}],623:[function(require,module,exports){ +},{}],617:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112898,7 +109648,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../../plots/font_attributes":753,"../color/attributes":584}],624:[function(require,module,exports){ +},{"../../lib/extend":677,"../../plots/font_attributes":748,"../color/attributes":577}],618:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112916,7 +109666,7 @@ module.exports = { scrollBarMargin: 4 }; -},{}],625:[function(require,module,exports){ +},{}],619:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113009,7 +109759,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) { Lib.noneOrAll(containerIn, containerOut, ['x', 'y']); }; -},{"../../lib":690,"../../plots/layout_attributes":783,"../../registry":807,"./attributes":623,"./helpers":628}],626:[function(require,module,exports){ +},{"../../lib":685,"../../plots/layout_attributes":778,"../../registry":802,"./attributes":617,"./helpers":622}],620:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113281,7 +110031,9 @@ module.exports = function draw(gd) { scrollBarY = constants.scrollBarMargin - scrollBoxY / scrollBoxYMax * scrollBarYMax; scrollHandler(scrollBarY, scrollBoxY); - d3.event.preventDefault(); + if(scrollBoxY !== 0 && scrollBoxY !== -scrollBoxYMax) { + d3.event.preventDefault(); + } }); // to be safe, remove previous listeners @@ -113522,6 +110274,8 @@ function handleClick(g, gd, numClicks) { for(i = 0; i < fullData.length; i++) { allTraces.push(i); + // Allow the legendonly state through for *all* trace types (including + // carpet for which it's overridden with true/false in supplyDefaults) traceVisibility.push('legendonly'); } @@ -113552,7 +110306,11 @@ function handleClick(g, gd, numClicks) { if(sameAsLast) { traceVisibility = true; } - Plotly.restyle(gd, 'visible', traceVisibility, allTraces); + var visibilityUpdates = []; + for(i = 0; i < fullData.length; i++) { + visibilityUpdates.push(allTraces[i]); + } + Plotly.restyle(gd, 'visible', traceVisibility, visibilityUpdates); } } } @@ -113825,7 +110583,7 @@ function expandHorizontalMargin(gd) { }); } -},{"../../constants/interactions":671,"../../lib":690,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/plots":792,"../../registry":807,"../color":585,"../dragelement":606,"../drawing":608,"./anchor_utils":622,"./constants":624,"./get_legend_data":627,"./helpers":628,"./style":630,"d3":114}],627:[function(require,module,exports){ +},{"../../constants/interactions":665,"../../lib":685,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/plots":787,"../../registry":802,"../color":578,"../dragelement":599,"../drawing":602,"./anchor_utils":616,"./constants":618,"./get_legend_data":621,"./helpers":622,"./style":624,"d3":107}],621:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113930,7 +110688,7 @@ module.exports = function getLegendData(calcdata, opts) { return legendData; }; -},{"../../registry":807,"./helpers":628}],628:[function(require,module,exports){ +},{"../../registry":802,"./helpers":622}],622:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113961,7 +110719,7 @@ exports.isReversed = function isReversed(legendLayout) { return (legendLayout.traceorder || '').indexOf('reversed') !== -1; }; -},{"../../registry":807}],629:[function(require,module,exports){ +},{"../../registry":802}],623:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113985,7 +110743,7 @@ module.exports = { style: require('./style') }; -},{"./attributes":623,"./defaults":625,"./draw":626,"./style":630}],630:[function(require,module,exports){ +},{"./attributes":617,"./defaults":619,"./draw":620,"./style":624}],624:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114053,6 +110811,11 @@ function styleLines(d) { showFill = trace.visible && trace.fill && trace.fill !== 'none', showLine = subTypes.hasLines(trace); + if(trace && trace._module && trace._module.name === 'contourcarpet') { + showLine = trace.contours.showlines; + showFill = trace.contours.coloring === 'fill'; + } + var fill = d3.select(this).select('.legendfill').selectAll('path') .data(showFill ? [d] : []); fill.enter().append('path').classed('js-fill', true); @@ -114213,7 +110976,7 @@ function stylePies(d) { if(pts.size()) pts.call(stylePie, d[0], trace); } -},{"../../lib":690,"../../registry":807,"../../traces/pie/style_one":932,"../../traces/scatter/subtypes":967,"../color":585,"../drawing":608,"d3":114}],631:[function(require,module,exports){ +},{"../../lib":685,"../../registry":802,"../../traces/pie/style_one":970,"../../traces/scatter/subtypes":996,"../color":578,"../drawing":602,"d3":107}],625:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114393,17 +111156,20 @@ function handleCartesian(gd, ev) { astr = button.getAttribute('data-attr'), val = button.getAttribute('data-val') || true, fullLayout = gd._fullLayout, - aobj = {}; + aobj = {}, + axList = Axes.list(gd, null, true), + ax, + allEnabled = 'on', + i; if(astr === 'zoom') { var mag = (val === 'in') ? 0.5 : 2, r0 = (1 + mag) / 2, - r1 = (1 - mag) / 2, - axList = Axes.list(gd, null, true); + r1 = (1 - mag) / 2; - var ax, axName; + var axName; - for(var i = 0; i < axList.length; i++) { + for(i = 0; i < axList.length; i++) { ax = axList[i]; if(!ax.fixedrange) { @@ -114418,6 +111184,12 @@ function handleCartesian(gd, ev) { aobj[axName + '.range[0]'] = rangeInitial[0]; aobj[axName + '.range[1]'] = rangeInitial[1]; } + if(ax._showSpikeInitial !== undefined) { + aobj[axName + '.showspikes'] = ax._showSpikeInitial; + if(allEnabled === 'on' && !ax._showSpikeInitial) { + allEnabled = 'off'; + } + } } else { var rangeNow = [ @@ -114435,12 +111207,24 @@ function handleCartesian(gd, ev) { } } } + fullLayout._cartesianSpikesEnabled = allEnabled; } else { // if ALL traces have orientation 'h', 'hovermode': 'x' otherwise: 'y' if(astr === 'hovermode' && (val === 'x' || val === 'y')) { val = fullLayout._isHoriz ? 'y' : 'x'; button.setAttribute('data-val', val); + if(val !== 'closest') { + fullLayout._cartesianSpikesEnabled = 'off'; + } + } else if(astr === 'hovermode' && val === 'closest') { + for(i = 0; i < axList.length; i++) { + ax = axList[i]; + if(allEnabled === 'on' && !ax.showspikes) { + allEnabled = 'off'; + } + } + fullLayout._cartesianSpikesEnabled = allEnabled; } aobj[astr] = val; @@ -114735,7 +111519,42 @@ modeBarButtons.resetViews = { } }; -},{"../../../build/ploticon":2,"../../lib":690,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/plots":792,"../../snapshot/download":809}],632:[function(require,module,exports){ +modeBarButtons.toggleSpikelines = { + name: 'toggleSpikelines', + title: 'Toggle Spike Lines', + icon: Icons.spikeline, + attr: '_cartesianSpikesEnabled', + val: 'on', + click: function(gd) { + var fullLayout = gd._fullLayout; + + fullLayout._cartesianSpikesEnabled = fullLayout.hovermode === 'closest' ? + (fullLayout._cartesianSpikesEnabled === 'on' ? 'off' : 'on') : 'on'; + + var aobj = setSpikelineVisibility(gd); + + aobj.hovermode = 'closest'; + Plotly.relayout(gd, aobj); + } +}; + +function setSpikelineVisibility(gd) { + var fullLayout = gd._fullLayout, + axList = Axes.list(gd, null, true), + ax, + axName, + aobj = {}; + + for(var i = 0; i < axList.length; i++) { + ax = axList[i]; + axName = ax._name; + aobj[axName + '.showspikes'] = fullLayout._cartesianSpikesEnabled === 'on' ? true : false; + } + + return aobj; +} + +},{"../../../build/ploticon":2,"../../lib":685,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/plots":787,"../../snapshot/download":804}],626:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114749,7 +111568,7 @@ modeBarButtons.resetViews = { exports.manage = require('./manage'); -},{"./manage":633}],633:[function(require,module,exports){ +},{"./manage":627}],627:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114890,7 +111709,7 @@ function getButtonGroups(gd, buttonsToRemove, buttonsToAdd) { addGroup(['hoverClosestGl2d']); } else if(hasCartesian) { - addGroup(['hoverClosestCartesian', 'hoverCompareCartesian']); + addGroup(['toggleSpikelines', 'hoverClosestCartesian', 'hoverCompareCartesian']); } else if(hasPie) { addGroup(['hoverClosestPie']); @@ -114977,7 +111796,7 @@ function fillCustomButton(customButtons) { return customButtons; } -},{"../../plots/cartesian/axes":729,"../../traces/scatter/subtypes":967,"./buttons":631,"./modebar":634}],634:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"../../traces/scatter/subtypes":996,"./buttons":625,"./modebar":628}],628:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115129,7 +111948,7 @@ proto.createButton = function(config) { button.setAttribute('data-toggle', config.toggle || false); if(config.toggle) d3.select(button).classed('active', true); - button.appendChild(this.createIcon(config.icon || Icons.question)); + button.appendChild(this.createIcon(config.icon || Icons.question, config.name)); button.setAttribute('data-gravity', config.gravity || 'n'); return button; @@ -115142,7 +111961,7 @@ proto.createButton = function(config) { * @Param {string} thisIcon.path * @Return {HTMLelement} */ -proto.createIcon = function(thisIcon) { +proto.createIcon = function(thisIcon, name) { var iconHeight = thisIcon.ascent - thisIcon.descent, svgNS = 'http://www.w3.org/2000/svg', icon = document.createElementNS(svgNS, 'svg'), @@ -115152,8 +111971,12 @@ proto.createIcon = function(thisIcon) { icon.setAttribute('width', (thisIcon.width / iconHeight) + 'em'); icon.setAttribute('viewBox', [0, 0, thisIcon.width, iconHeight].join(' ')); + var transform = name === 'toggleSpikelines' ? + 'matrix(1.5 0 0 -1.5 0 ' + thisIcon.ascent + ')' : + 'matrix(1 0 0 -1 0 ' + thisIcon.ascent + ')'; + path.setAttribute('d', thisIcon.path); - path.setAttribute('transform', 'matrix(1 0 0 -1 0 ' + thisIcon.ascent + ')'); + path.setAttribute('transform', transform); icon.appendChild(path); return icon; @@ -115267,7 +112090,7 @@ function createModeBar(gd, buttons) { module.exports = createModeBar; -},{"../../../build/ploticon":2,"../../lib":690,"d3":114}],635:[function(require,module,exports){ +},{"../../../build/ploticon":2,"../../lib":685,"d3":107}],629:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115372,7 +112195,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../../plots/font_attributes":753,"../color/attributes":584,"./button_attributes":636}],636:[function(require,module,exports){ +},{"../../lib/extend":677,"../../plots/font_attributes":748,"../color/attributes":577,"./button_attributes":630}],630:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115430,7 +112253,7 @@ module.exports = { } }; -},{}],637:[function(require,module,exports){ +},{}],631:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115459,7 +112282,7 @@ module.exports = { darkAmount: 10 }; -},{}],638:[function(require,module,exports){ +},{}],632:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115558,7 +112381,7 @@ function getPosDflt(containerOut, layout, counterAxes) { return [containerOut.domain[0], posY + constants.yPad]; } -},{"../../lib":690,"../color":585,"./attributes":635,"./button_attributes":636,"./constants":637}],639:[function(require,module,exports){ +},{"../../lib":685,"../color":578,"./attributes":629,"./button_attributes":630,"./constants":631}],633:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115833,7 +112656,7 @@ function reposition(gd, buttons, opts, axName) { }); } -},{"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/cartesian/axis_ids":732,"../../plots/plots":792,"../color":585,"../drawing":608,"../legend/anchor_utils":622,"./constants":637,"./get_update_object":640,"d3":114}],640:[function(require,module,exports){ +},{"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/cartesian/axis_ids":727,"../../plots/plots":787,"../color":578,"../drawing":602,"../legend/anchor_utils":616,"./constants":631,"./get_update_object":634,"d3":107}],634:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115890,7 +112713,7 @@ function getXRange(axisLayout, buttonLayout) { return [range0, range1]; } -},{"d3":114}],641:[function(require,module,exports){ +},{"d3":107}],635:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115917,7 +112740,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":635,"./defaults":638,"./draw":639}],642:[function(require,module,exports){ +},{"./attributes":629,"./defaults":632,"./draw":633}],636:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116002,7 +112825,7 @@ module.exports = { } }; -},{"../color/attributes":584}],643:[function(require,module,exports){ +},{"../color/attributes":577}],637:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116038,7 +112861,7 @@ module.exports = function calcAutorange(gd) { } }; -},{"../../plots/cartesian/axes":729,"./constants":644}],644:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"./constants":638}],638:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116090,7 +112913,7 @@ module.exports = { extraPad: 15 }; -},{}],645:[function(require,module,exports){ +},{}],639:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116147,7 +112970,7 @@ module.exports = function handleDefaults(layoutIn, layoutOut, axName) { containerOut._input = containerIn; }; -},{"../../lib":690,"./attributes":642}],646:[function(require,module,exports){ +},{"../../lib":685,"./attributes":636}],640:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116698,7 +113521,7 @@ function clearPushMargins(gd) { } } -},{"../../lib":690,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian":739,"../../plots/cartesian/axes":729,"../../plots/plots":792,"../color":585,"../dragelement":606,"../drawing":608,"./constants":644,"d3":114}],647:[function(require,module,exports){ +},{"../../lib":685,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian":734,"../../plots/cartesian/axes":724,"../../plots/plots":787,"../color":578,"../dragelement":599,"../drawing":602,"./constants":638,"d3":107}],641:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116725,7 +113548,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":642,"./calc_autorange":643,"./defaults":645,"./draw":646}],648:[function(require,module,exports){ +},{"./attributes":636,"./calc_autorange":637,"./defaults":639,"./draw":640}],642:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116737,11 +113560,10 @@ module.exports = { 'use strict'; var annAttrs = require('../annotations/attributes'); -var scatterAttrs = require('../../traces/scatter/attributes'); +var scatterLineAttrs = require('../../traces/scatter/attributes').line; +var dash = require('../drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; -var scatterLineAttrs = scatterAttrs.line; - module.exports = { _isLinkedToArray: 'shape', @@ -116879,7 +113701,7 @@ module.exports = { line: { color: scatterLineAttrs.color, width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash, + dash: dash, role: 'info' }, fillcolor: { @@ -116892,7 +113714,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../../traces/scatter/attributes":947,"../annotations/attributes":574}],649:[function(require,module,exports){ +},{"../../lib/extend":677,"../../traces/scatter/attributes":976,"../annotations/attributes":567,"../drawing/attributes":601}],643:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116969,7 +113791,7 @@ function shapeBounds(ax, v0, v1, path, paramsToUse) { if(max >= min) return [min, max]; } -},{"../../lib":690,"../../plots/cartesian/axes":729,"./constants":650,"./helpers":653}],650:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"./constants":644,"./helpers":647}],644:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117033,7 +113855,7 @@ module.exports = { } }; -},{}],651:[function(require,module,exports){ +},{}],645:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117058,7 +113880,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { handleArrayContainerDefaults(layoutIn, layoutOut, opts); }; -},{"../../plots/array_container_defaults":726,"./shape_defaults":655}],652:[function(require,module,exports){ +},{"../../plots/array_container_defaults":721,"./shape_defaults":649}],646:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117433,7 +114255,7 @@ function movePath(pathIn, moveX, moveY) { }); } -},{"../../lib":690,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian/axes":729,"../color":585,"../dragelement":606,"../drawing":608,"./constants":650,"./helpers":653}],653:[function(require,module,exports){ +},{"../../lib":685,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian/axes":724,"../color":578,"../dragelement":599,"../drawing":602,"./constants":644,"./helpers":647}],647:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117514,7 +114336,7 @@ exports.getPixelToData = function(gd, axis, isVertical) { return pixelToData; }; -},{}],654:[function(require,module,exports){ +},{}],648:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117540,7 +114362,7 @@ module.exports = { drawOne: drawModule.drawOne }; -},{"./attributes":648,"./calc_autorange":649,"./defaults":651,"./draw":652}],655:[function(require,module,exports){ +},{"./attributes":642,"./calc_autorange":643,"./defaults":645,"./draw":646}],649:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117639,7 +114461,7 @@ module.exports = function handleShapeDefaults(shapeIn, shapeOut, fullLayout, opt return shapeOut; }; -},{"../../lib":690,"../../plots/cartesian/axes":729,"./attributes":648,"./helpers":653}],656:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"./attributes":642,"./helpers":647}],650:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117913,7 +114735,7 @@ module.exports = { }, }; -},{"../../lib/extend":682,"../../plots/animation_attributes":725,"../../plots/font_attributes":753,"../../plots/pad_attributes":791,"./constants":657}],657:[function(require,module,exports){ +},{"../../lib/extend":677,"../../plots/animation_attributes":720,"../../plots/font_attributes":748,"../../plots/pad_attributes":786,"./constants":651}],651:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118010,7 +114832,7 @@ module.exports = { currentValueInset: 0, }; -},{}],658:[function(require,module,exports){ +},{}],652:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118123,7 +114945,7 @@ function stepsDefaults(sliderIn, sliderOut) { return valuesOut; } -},{"../../lib":690,"../../plots/array_container_defaults":726,"./attributes":656,"./constants":657}],659:[function(require,module,exports){ +},{"../../lib":685,"../../plots/array_container_defaults":721,"./attributes":650,"./constants":651}],653:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118725,7 +115547,7 @@ function clearPushMargins(gd) { } } -},{"../../lib/svg_text_utils":709,"../../plots/plots":792,"../color":585,"../drawing":608,"../legend/anchor_utils":622,"./constants":657,"d3":114}],660:[function(require,module,exports){ +},{"../../lib/svg_text_utils":704,"../../plots/plots":787,"../color":578,"../drawing":602,"../legend/anchor_utils":616,"./constants":651,"d3":107}],654:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118748,7 +115570,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":656,"./constants":657,"./defaults":658,"./draw":659}],661:[function(require,module,exports){ +},{"./attributes":650,"./constants":651,"./defaults":652,"./draw":653}],655:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118981,7 +115803,7 @@ Titles.draw = function(gd, titleClass, options) { el.classed('js-placeholder', isplaceholder); }; -},{"../../constants/interactions":671,"../../lib":690,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/plots":792,"../color":585,"../drawing":608,"d3":114,"fast-isnumeric":123}],662:[function(require,module,exports){ +},{"../../constants/interactions":665,"../../lib":685,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/plots":787,"../color":578,"../drawing":602,"d3":107,"fast-isnumeric":116}],656:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119154,7 +115976,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../../plots/font_attributes":753,"../../plots/pad_attributes":791,"../color/attributes":584}],663:[function(require,module,exports){ +},{"../../lib/extend":677,"../../plots/font_attributes":748,"../../plots/pad_attributes":786,"../color/attributes":577}],657:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119230,7 +116052,7 @@ module.exports = { hoverColor: '#F4FAFF' }; -},{}],664:[function(require,module,exports){ +},{}],658:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119324,7 +116146,7 @@ function buttonsDefaults(menuIn, menuOut) { return buttonsOut; } -},{"../../lib":690,"../../plots/array_container_defaults":726,"./attributes":662,"./constants":663}],665:[function(require,module,exports){ +},{"../../lib":685,"../../plots/array_container_defaults":721,"./attributes":656,"./constants":657}],659:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120004,9 +116826,9 @@ function clearPushMargins(gd) { } } -},{"../../lib/svg_text_utils":709,"../../plots/plots":792,"../color":585,"../drawing":608,"../legend/anchor_utils":622,"./constants":663,"./scrollbox":667,"d3":114}],666:[function(require,module,exports){ -arguments[4][660][0].apply(exports,arguments) -},{"./attributes":662,"./constants":663,"./defaults":664,"./draw":665,"dup":660}],667:[function(require,module,exports){ +},{"../../lib/svg_text_utils":704,"../../plots/plots":787,"../color":578,"../drawing":602,"../legend/anchor_utils":616,"./constants":657,"./scrollbox":661,"d3":107}],660:[function(require,module,exports){ +arguments[4][654][0].apply(exports,arguments) +},{"./attributes":656,"./constants":657,"./defaults":658,"./draw":659,"dup":654}],661:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120477,7 +117299,7 @@ ScrollBox.prototype.setTranslate = function setTranslate(translateX, translateY) } }; -},{"../../lib":690,"../color":585,"../drawing":608,"d3":114}],668:[function(require,module,exports){ +},{"../../lib":685,"../color":578,"../drawing":602,"d3":107}],662:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120498,7 +117320,7 @@ module.exports = { longdashdot: [8, 1, 1, 1] }; -},{}],669:[function(require,module,exports){ +},{}],663:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120519,7 +117341,7 @@ module.exports = { longdashdot: [[0.5, 0.7, 0.8, 1], 10] }; -},{}],670:[function(require,module,exports){ +},{}],664:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120542,7 +117364,7 @@ module.exports = { x: '❌' }; -},{}],671:[function(require,module,exports){ +},{}],665:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120566,7 +117388,7 @@ module.exports = { DBLCLICKDELAY: 300 }; -},{}],672:[function(require,module,exports){ +},{}],666:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120619,7 +117441,7 @@ module.exports = { ALMOST_EQUAL: 1 - 1e-6 }; -},{}],673:[function(require,module,exports){ +},{}],667:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120657,7 +117479,7 @@ module.exports = { }; -},{}],674:[function(require,module,exports){ +},{}],668:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120681,7 +117503,7 @@ exports.svgAttrs = { 'xmlns:xlink': exports.xlink }; -},{}],675:[function(require,module,exports){ +},{}],669:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120699,7 +117521,7 @@ exports.svgAttrs = { var Plotly = require('./plotly'); // package version injected by `npm run preprocess` -exports.version = '1.25.2'; +exports.version = '1.26.1'; // inject promise polyfill require('es6-promise').polyfill(); @@ -120760,7 +117582,7 @@ exports.Queue = require('./lib/queue'); // export d3 used in the bundle exports.d3 = require('d3'); -},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":581,"./components/images":621,"./components/legend":629,"./components/rangeselector":641,"./components/rangeslider":647,"./components/shapes":654,"./components/sliders":660,"./components/updatemenus":666,"./fonts/mathjax_config":676,"./lib/queue":702,"./plot_api/plot_schema":718,"./plot_api/register":719,"./plot_api/set_plot_config":720,"./plot_api/to_image":722,"./plot_api/validate":723,"./plotly":724,"./snapshot":812,"./snapshot/download":809,"./traces/scatter":957,"d3":114,"es6-promise":120}],676:[function(require,module,exports){ +},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":574,"./components/images":615,"./components/legend":623,"./components/rangeselector":635,"./components/rangeslider":641,"./components/shapes":648,"./components/sliders":654,"./components/updatemenus":660,"./fonts/mathjax_config":670,"./lib/queue":697,"./plot_api/plot_schema":713,"./plot_api/register":714,"./plot_api/set_plot_config":715,"./plot_api/to_image":717,"./plot_api/validate":718,"./plotly":719,"./snapshot":807,"./snapshot/download":804,"./traces/scatter":986,"d3":107,"es6-promise":113}],670:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120793,7 +117615,7 @@ if(typeof MathJax !== 'undefined') { exports.MathJax = false; } -},{}],677:[function(require,module,exports){ +},{}],671:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120810,7 +117632,7 @@ module.exports = function arrayToCalcItem(traceAttr, calcItem, calcAttr, i) { if(Array.isArray(traceAttr)) calcItem[calcAttr] = traceAttr[i]; }; -},{}],678:[function(require,module,exports){ +},{}],672:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120843,7 +117665,7 @@ module.exports = function cleanNumber(v) { return BADNUM; }; -},{"../constants/numerical":672,"fast-isnumeric":123}],679:[function(require,module,exports){ +},{"../constants/numerical":666,"fast-isnumeric":116}],673:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121203,7 +118025,7 @@ exports.validate = function(value, opts) { return out !== failed; }; -},{"../components/colorscale/get_scale":597,"../components/colorscale/scales":603,"./nested_property":696,"fast-isnumeric":123,"tinycolor2":521}],680:[function(require,module,exports){ +},{"../components/colorscale/get_scale":590,"../components/colorscale/scales":596,"./nested_property":691,"fast-isnumeric":116,"tinycolor2":514}],674:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121831,7 +118653,36 @@ exports.findExactDates = function(data, calendar) { }; }; -},{"../constants/numerical":672,"../registry":807,"./loggers":693,"./mod":695,"d3":114,"fast-isnumeric":123}],681:[function(require,module,exports){ +},{"../constants/numerical":666,"../registry":802,"./loggers":688,"./mod":690,"d3":107,"fast-isnumeric":116}],675:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Ensures an array has the right amount of storage space. If it doesn't + * exist, it creates an array. If it does exist, it returns it if too + * short or truncates it in-place. + * + * The goal is to just reuse memory to avoid a bit of excessive garbage + * collection. + */ +module.exports = function ensureArray(out, n) { + if(!Array.isArray(out)) out = []; + + // If too long, truncate. (If too short, it will grow + // automatically so we don't care about that case) + out.length = n; + + return out; +}; + +},{}],676:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121997,7 +118848,7 @@ var Events = { module.exports = Events; -},{"events":121}],682:[function(require,module,exports){ +},{"events":114}],677:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122111,7 +118962,7 @@ function _extend(inputs, isDeep, keepAllKeys, noArrayCopies) { return target; } -},{"./is_plain_object.js":692}],683:[function(require,module,exports){ +},{"./is_plain_object.js":687}],678:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122162,7 +119013,7 @@ module.exports = function filterUnique(array) { return out; }; -},{}],684:[function(require,module,exports){ +},{}],679:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122193,7 +119044,7 @@ module.exports = function filterVisible(container) { return out; }; -},{}],685:[function(require,module,exports){ +},{}],680:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122255,7 +119106,7 @@ function countryNameToISO3(countryName) { return false; } -},{"../lib":690,"country-regex":99}],686:[function(require,module,exports){ +},{"../lib":685,"country-regex":100}],681:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122392,7 +119243,7 @@ exports.makeBlank = function() { }; }; -},{"../constants/numerical":672}],687:[function(require,module,exports){ +},{"../constants/numerical":666}],682:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122480,7 +119331,7 @@ function formatColor(containerIn, opacityIn, len) { module.exports = formatColor; -},{"../components/color/attributes":584,"../components/colorscale":599,"color-rgba":87,"fast-isnumeric":123}],688:[function(require,module,exports){ +},{"../components/color/attributes":577,"../components/colorscale":592,"color-rgba":88,"fast-isnumeric":116}],683:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122549,7 +119400,7 @@ function convertHTMLToUnicode(html) { module.exports = convertHTMLToUnicode; -},{"../constants/string_mappings":673,"superscript-text":517}],689:[function(require,module,exports){ +},{"../constants/string_mappings":667,"superscript-text":510}],684:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122565,7 +119416,7 @@ module.exports = convertHTMLToUnicode; module.exports = function identity(d) { return d; }; -},{}],690:[function(require,module,exports){ +},{}],685:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122587,6 +119438,7 @@ lib.isArray = require('./is_array'); lib.mod = require('./mod'); lib.toLogRange = require('./to_log_range'); lib.relinkPrivateKeys = require('./relink_private'); +lib.ensureArray = require('./ensure_array'); var coerceModule = require('./coerce'); lib.valObjects = coerceModule.valObjects; @@ -123205,7 +120057,7 @@ lib.numSeparate = function(value, separators, separatethousands) { return x1 + x2; }; -},{"./clean_number":678,"./coerce":679,"./dates":680,"./extend":682,"./filter_unique":683,"./filter_visible":684,"./identity":689,"./is_array":691,"./is_plain_object":692,"./loggers":693,"./matrix":694,"./mod":695,"./nested_property":696,"./noop":697,"./notifier":698,"./push_unique":701,"./relink_private":703,"./search":704,"./stats":707,"./to_log_range":710,"d3":114}],691:[function(require,module,exports){ +},{"./clean_number":672,"./coerce":673,"./dates":674,"./ensure_array":675,"./extend":677,"./filter_unique":678,"./filter_visible":679,"./identity":684,"./is_array":686,"./is_plain_object":687,"./loggers":688,"./matrix":689,"./mod":690,"./nested_property":691,"./noop":692,"./notifier":693,"./push_unique":696,"./relink_private":698,"./search":699,"./stats":702,"./to_log_range":705,"d3":107}],686:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123229,7 +120081,7 @@ module.exports = function isArray(a) { return Array.isArray(a) || ab.isView(a); }; -},{}],692:[function(require,module,exports){ +},{}],687:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123258,7 +120110,7 @@ module.exports = function isPlainObject(obj) { ); }; -},{}],693:[function(require,module,exports){ +},{}],688:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123332,7 +120184,7 @@ function apply(f, args) { } } -},{"../plot_api/plot_config":717}],694:[function(require,module,exports){ +},{"../plot_api/plot_config":712}],689:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123442,7 +120294,7 @@ exports.apply2DTransform2 = function(transform) { }; }; -},{}],695:[function(require,module,exports){ +},{}],690:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123462,7 +120314,7 @@ module.exports = function mod(v, d) { return out < 0 ? out + d : out; }; -},{}],696:[function(require,module,exports){ +},{}],691:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123766,7 +120618,7 @@ function badContainer(container, propStr, propParts) { }; } -},{"../plot_api/container_array_match":713,"./is_array":691,"./is_plain_object":692,"fast-isnumeric":123}],697:[function(require,module,exports){ +},{"../plot_api/container_array_match":708,"./is_array":686,"./is_plain_object":687,"fast-isnumeric":116}],692:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123782,7 +120634,7 @@ function badContainer(container, propStr, propParts) { module.exports = function noop() {}; -},{}],698:[function(require,module,exports){ +},{}],693:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123864,7 +120716,7 @@ module.exports = function(text, displayLength) { }); }; -},{"d3":114,"fast-isnumeric":123}],699:[function(require,module,exports){ +},{"d3":107,"fast-isnumeric":116}],694:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123913,7 +120765,7 @@ module.exports = function overrideCursor(el3, csr) { } }; -},{"./setcursor":705}],700:[function(require,module,exports){ +},{"./setcursor":700}],695:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124153,7 +121005,7 @@ polygon.filter = function filter(pts, tolerance) { }; }; -},{"./matrix":694}],701:[function(require,module,exports){ +},{"./matrix":689}],696:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124191,7 +121043,7 @@ module.exports = function pushUnique(array, item) { return array; }; -},{}],702:[function(require,module,exports){ +},{}],697:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124402,7 +121254,7 @@ queue.plotDo = function(gd, func, args) { module.exports = queue; -},{"../lib":690,"../plot_api/plot_config":717}],703:[function(require,module,exports){ +},{"../lib":685,"../plot_api/plot_config":712}],698:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124459,7 +121311,7 @@ module.exports = function relinkPrivateKeys(toContainer, fromContainer) { } }; -},{"./is_array":691,"./is_plain_object":692}],704:[function(require,module,exports){ +},{"./is_array":686,"./is_plain_object":687}],699:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124570,7 +121422,7 @@ exports.roundUp = function(val, arrayIn, reverse) { return arrayIn[low]; }; -},{"./loggers":693,"fast-isnumeric":123}],705:[function(require,module,exports){ +},{"./loggers":688,"fast-isnumeric":116}],700:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124593,7 +121445,7 @@ module.exports = function setCursor(el3, csr) { if(csr) el3.classed('cursor-' + csr, true); }; -},{}],706:[function(require,module,exports){ +},{}],701:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124642,7 +121494,7 @@ module.exports = function showWebGlMsg(scene) { return false; }; -},{"../components/color":585}],707:[function(require,module,exports){ +},{"../components/color":578}],702:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124738,7 +121590,7 @@ exports.interp = function(arr, n) { return frac * arr[Math.ceil(n)] + (1 - frac) * arr[Math.floor(n)]; }; -},{"fast-isnumeric":123}],708:[function(require,module,exports){ +},{"fast-isnumeric":116}],703:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124759,7 +121611,7 @@ function str2RgbaArray(color) { module.exports = str2RgbaArray; -},{"color-rgba":87}],709:[function(require,module,exports){ +},{"color-rgba":88}],704:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125300,7 +122152,7 @@ exports.makeEditable = function(context, _delegate, options) { return d3.rebind(this, dispatch, 'on'); }; -},{"../constants/string_mappings":673,"../constants/xmlns_namespaces":674,"../lib":690,"d3":114}],710:[function(require,module,exports){ +},{"../constants/string_mappings":667,"../constants/xmlns_namespaces":668,"../lib":685,"d3":107}],705:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125328,7 +122180,7 @@ module.exports = function toLogRange(val, range) { return newVal; }; -},{"fast-isnumeric":123}],711:[function(require,module,exports){ +},{"fast-isnumeric":116}],706:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125364,7 +122216,7 @@ topojsonUtils.getTopojsonFeatures = function(trace, topojson) { return topojsonFeature(topojson, obj).features; }; -},{"../plots/geo/constants":755,"topojson-client":523}],712:[function(require,module,exports){ +},{"../plots/geo/constants":750,"topojson-client":516}],707:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125398,7 +122250,7 @@ module.exports = function truncate(arrayIn, len) { throw new Error('This array type is not yet supported by `truncate`.'); }; -},{}],713:[function(require,module,exports){ +},{}],708:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125456,7 +122308,7 @@ module.exports = function containerArrayMatch(astr) { return {array: arrayStr, index: Number(match[1]), property: match[3] || ''}; }; -},{"../registry":807}],714:[function(require,module,exports){ +},{"../registry":802}],709:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125977,7 +122829,7 @@ exports.hasParent = function(aobj, attr) { return false; }; -},{"../components/color":585,"../lib":690,"../plots/cartesian/axes":729,"../plots/plots":792,"../registry":807,"fast-isnumeric":123,"gl-mat4/fromQuat":169}],715:[function(require,module,exports){ +},{"../components/color":578,"../lib":685,"../plots/cartesian/axes":724,"../plots/plots":787,"../registry":802,"fast-isnumeric":116,"gl-mat4/fromQuat":162}],710:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126190,7 +123042,7 @@ exports.applyContainerArrayChanges = function applyContainerArrayChanges(gd, np, return true; }; -},{"../lib/is_plain_object":692,"../lib/loggers":693,"../lib/nested_property":696,"../lib/noop":697,"../registry":807,"./container_array_match":713}],716:[function(require,module,exports){ +},{"../lib/is_plain_object":687,"../lib/loggers":688,"../lib/nested_property":691,"../lib/noop":692,"../registry":802,"./container_array_match":708}],711:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126346,6 +123198,9 @@ Plotly.plot = function(gd, data, layout, config) { makePlotFramework(gd); } + // save initial show spikes once per graph + if(graphWasEmpty) Plotly.Axes.saveShowSpikeInitial(gd); + // prepare the data and find the autorange // generate calcdata, if we need to @@ -127487,6 +124342,7 @@ function _restyle(gd, aobj, _traces) { 'autobinx', 'nbinsx', 'xbins', 'xbins.start', 'xbins.end', 'xbins.size', 'autobiny', 'nbinsy', 'ybins', 'ybins.start', 'ybins.end', 'ybins.size', 'autocontour', 'ncontours', 'contours', 'contours.coloring', + 'contours.operation', 'contours.value', 'contours.type', 'contours.value[0]', 'contours.value[1]', 'error_y', 'error_y.visible', 'error_y.value', 'error_y.type', 'error_y.traceref', 'error_y.array', 'error_y.symmetric', 'error_y.arrayminus', 'error_y.valueminus', 'error_y.tracerefminus', @@ -127504,9 +124360,31 @@ function _restyle(gd, aobj, _traces) { 'line.showscale', 'line.cauto', 'line.autocolorscale', 'line.reversescale', 'marker.line.showscale', 'marker.line.cauto', 'marker.line.autocolorscale', 'marker.line.reversescale', 'xcalendar', 'ycalendar', - 'cumulative', 'cumulative.enabled', 'cumulative.direction', 'cumulative.currentbin' + 'cumulative', 'cumulative.enabled', 'cumulative.direction', 'cumulative.currentbin', + 'a0', 'da', 'b0', 'db', 'atype', 'btype', + 'cheaterslope', 'carpet', 'sum', + ]; + + var carpetAxisAttributes = [ + 'color', 'smoothing', 'title', 'titlefont', 'titlefont.size', 'titlefont.family', + 'titlefont.color', 'titleoffset', 'type', 'autorange', 'rangemode', 'range', + 'fixedrange', 'cheatertype', 'tickmode', 'nticks', 'tickvals', 'ticktext', + 'ticks', 'mirror', 'ticklen', 'tickwidth', 'tickcolor', 'showticklabels', + 'tickfont', 'tickfont.size', 'tickfont.family', 'tickfont.color', 'tickprefix', + 'showtickprefix', 'ticksuffix', 'showticksuffix', 'showexponent', 'exponentformat', + 'separatethousands', 'tickformat', 'categoryorder', 'categoryarray', 'labelpadding', + 'labelprefix', 'labelsuffix', 'labelfont', 'labelfont.family', 'labelfont.size', + 'labelfont.color', 'showline', 'linecolor', 'linewidth', 'gridcolor', 'gridwidth', + 'showgrid', 'minorgridcount', 'minorgridwidth', 'minorgridcolor', 'startline', + 'startlinecolor', 'startlinewidth', 'endline', 'endlinewidth', 'endlinecolor', + 'tick0', 'dtick', 'arraytick0', 'arraydtick', 'hoverformat', 'tickangle' ]; + for(i = 0; i < carpetAxisAttributes.length; i++) { + recalcAttrs.push('aaxis.' + carpetAxisAttributes[i]); + recalcAttrs.push('baxis.' + carpetAxisAttributes[i]); + } + for(i = 0; i < traces.length; i++) { if(Registry.traceIs(fullData[traces[i]], 'box')) { recalcAttrs.push('name'); @@ -127850,9 +124728,14 @@ function _restyle(gd, aobj, _traces) { doextra(axlist.map(rangeAttr), [0, 1], 0); } flags.docalc = true; + + } else if(replotAttrs.indexOf(aiAboveArray) !== -1) { + flags.doplot = true; + } else if(aiAboveArray.indexOf('aaxis') === 0 || aiAboveArray.indexOf('baxis') === 0) { + flags.doplot = true; + } else if(autorangeAttrs.indexOf(aiAboveArray) !== -1) { + flags.docalcAutorange = true; } - else if(replotAttrs.indexOf(aiAboveArray) !== -1) flags.doplot = true; - else if(autorangeAttrs.indexOf(aiAboveArray) !== -1) flags.docalcAutorange = true; } // do we need to force a recalc? @@ -128314,14 +125197,16 @@ function _relayout(gd, aobj) { flags.doticks = flags.dolayoutstyle = true; } /* - * hovermode and dragmode don't need any redrawing, since they just - * affect reaction to user input, everything else, assume full replot. + * hovermode, dragmode, and spikes don't need any redrawing, since they just + * affect reaction to user input. Everything else, assume full replot. * height, width, autosize get dealt with below. Except for the case of * of subplots - scenes - which require scene.updateFx to be called. */ - else if(['hovermode', 'dragmode'].indexOf(ai) !== -1) flags.domodebar = true; - else if(['hovermode', 'dragmode', 'height', - 'width', 'autosize'].indexOf(ai) === -1) { + else if(['hovermode', 'dragmode'].indexOf(ai) !== -1 || + ai.indexOf('spike') !== -1) { + flags.domodebar = true; + } + else if(['height', 'width', 'autosize'].indexOf(ai) === -1) { flags.doplot = true; } @@ -129172,7 +126057,7 @@ function makePlotFramework(gd) { gd.emit('plotly_framework'); } -},{"../components/drawing":608,"../components/errorbars":614,"../constants/xmlns_namespaces":674,"../lib":690,"../lib/events":681,"../lib/queue":702,"../lib/svg_text_utils":709,"../plotly":724,"../plots/cartesian/axis_ids":732,"../plots/cartesian/constants":734,"../plots/cartesian/constraints":736,"../plots/cartesian/graph_interact":738,"../plots/plots":792,"../plots/polar":795,"../registry":807,"./helpers":714,"./manage_arrays":715,"./subroutines":721,"d3":114,"fast-isnumeric":123}],717:[function(require,module,exports){ +},{"../components/drawing":602,"../components/errorbars":608,"../constants/xmlns_namespaces":668,"../lib":685,"../lib/events":676,"../lib/queue":697,"../lib/svg_text_utils":704,"../plotly":719,"../plots/cartesian/axis_ids":727,"../plots/cartesian/constants":729,"../plots/cartesian/constraints":731,"../plots/cartesian/graph_interact":733,"../plots/plots":787,"../plots/polar":790,"../registry":802,"./helpers":709,"./manage_arrays":710,"./subroutines":716,"d3":107,"fast-isnumeric":116}],712:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129298,7 +126183,7 @@ function defaultSetBackground(gd, bgColor) { } } -},{}],718:[function(require,module,exports){ +},{}],713:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129707,7 +126592,7 @@ function insertAttrs(baseAttrs, newAttrs, astr) { np.set(extendDeep(np.get() || {}, newAttrs)); } -},{"../lib":690,"../plots/animation_attributes":725,"../plots/attributes":727,"../plots/frame_attributes":754,"../plots/layout_attributes":783,"../plots/polar/area_attributes":793,"../plots/polar/axis_attributes":794,"../registry":807}],719:[function(require,module,exports){ +},{"../lib":685,"../plots/animation_attributes":720,"../plots/attributes":722,"../plots/frame_attributes":749,"../plots/layout_attributes":778,"../plots/polar/area_attributes":788,"../plots/polar/axis_attributes":789,"../registry":802}],714:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129806,7 +126691,7 @@ function registerComponentModule(newModule) { Registry.registerComponent(newModule); } -},{"../lib":690,"../registry":807}],720:[function(require,module,exports){ +},{"../lib":685,"../registry":802}],715:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129832,7 +126717,7 @@ module.exports = function setPlotConfig(configObj) { return Lib.extendFlat(Plotly.defaultConfig, configObj); }; -},{"../lib":690,"../plotly":724}],721:[function(require,module,exports){ +},{"../lib":685,"../plotly":719}],716:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130239,7 +127124,7 @@ exports.doCamera = function(gd) { } }; -},{"../components/color":585,"../components/drawing":608,"../components/modebar":632,"../components/titles":661,"../lib":690,"../plotly":724,"../plots/plots":792,"../registry":807,"d3":114}],722:[function(require,module,exports){ +},{"../components/color":578,"../components/drawing":602,"../components/modebar":626,"../components/titles":655,"../lib":685,"../plotly":719,"../plots/plots":787,"../registry":802,"d3":107}],717:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130349,7 +127234,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":690,"../plotly":724,"../snapshot/cloneplot":808,"../snapshot/helpers":811,"../snapshot/svgtoimg":813,"../snapshot/tosvg":815,"fast-isnumeric":123}],723:[function(require,module,exports){ +},{"../lib":685,"../plotly":719,"../snapshot/cloneplot":803,"../snapshot/helpers":806,"../snapshot/svgtoimg":808,"../snapshot/tosvg":810,"fast-isnumeric":116}],718:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130720,7 +127605,7 @@ function convertPathToAttributeString(path) { return astr; } -},{"../lib":690,"../plots/plots":792,"./plot_schema":718}],724:[function(require,module,exports){ +},{"../lib":685,"../plots/plots":787,"./plot_schema":713}],719:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130753,7 +127638,7 @@ exports.ModeBar = require('./components/modebar'); // plot api require('./plot_api/plot_api'); -},{"./components/modebar":632,"./plot_api/plot_api":716,"./plot_api/plot_config":717,"./plots/cartesian/axes":729,"./plots/cartesian/graph_interact":738,"./plots/plots":792}],725:[function(require,module,exports){ +},{"./components/modebar":626,"./plot_api/plot_api":711,"./plot_api/plot_config":712,"./plots/cartesian/axes":724,"./plots/cartesian/graph_interact":733,"./plots/plots":787}],720:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130877,7 +127762,7 @@ module.exports = { } }; -},{}],726:[function(require,module,exports){ +},{}],721:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130958,7 +127843,7 @@ module.exports = function handleArrayContainerDefaults(parentObjIn, parentObjOut } }; -},{"../lib":690}],727:[function(require,module,exports){ +},{"../lib":685}],722:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -131068,7 +127953,7 @@ module.exports = { } }; -},{}],728:[function(require,module,exports){ +},{}],723:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -131107,7 +127992,7 @@ module.exports = { } }; -},{}],729:[function(require,module,exports){ +},{}],724:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -131471,6 +128356,35 @@ axes.saveRangeInitial = function(gd, overwrite) { return hasOneAxisChanged; }; +// save a copy of the initial spike visibility +axes.saveShowSpikeInitial = function(gd, overwrite) { + var axList = axes.list(gd, '', true), + hasOneAxisChanged = false, + allEnabled = 'on'; + + for(var i = 0; i < axList.length; i++) { + var ax = axList[i]; + + var isNew = (ax._showSpikeInitial === undefined); + var hasChanged = ( + isNew || !( + ax.showspikes === ax._showspikes + ) + ); + + if((isNew) || (overwrite && hasChanged)) { + ax._showSpikeInitial = ax.showspikes; + hasOneAxisChanged = true; + } + + if(allEnabled === 'on' && !ax.showspikes) { + allEnabled = 'off'; + } + } + gd._fullLayout._cartesianSpikesEnabled = allEnabled; + return hasOneAxisChanged; +}; + // axes.expand: if autoranging, include new data in the outer limits // for this axis // data is an array of numbers (ie already run through ax.d2c) @@ -132713,7 +129627,7 @@ axes.doTicks = function(gd, axid, skipTitle) { // set scaling to pixels ax.setScale(); - var axletter = axid.charAt(0), + var axLetter = axid.charAt(0), counterLetter = axes.counterLetter(axid), vals = axes.calcTicks(ax), datafn = function(d) { return [d.text, d.x, ax.mirror].join('_'); }, @@ -132727,7 +129641,7 @@ axes.doTicks = function(gd, axid, skipTitle) { gridWidth = Drawing.crispRound(gd, ax.gridwidth, 1), zeroLineWidth = Drawing.crispRound(gd, ax.zerolinewidth, gridWidth), tickWidth = Drawing.crispRound(gd, ax.tickwidth, 1), - sides, transfn, tickpathfn, + sides, transfn, tickpathfn, subplots, i; if(ax._counterangle && ax.ticks === 'outside') { @@ -132737,7 +129651,7 @@ axes.doTicks = function(gd, axid, skipTitle) { } // positioning arguments for x vs y axes - if(axletter === 'x') { + if(axLetter === 'x') { sides = ['bottom', 'top']; transfn = function(d) { return 'translate(' + ax.l2p(d.x) + ',0)'; @@ -132750,7 +129664,7 @@ axes.doTicks = function(gd, axid, skipTitle) { else return 'M0,' + shift + 'v' + len; }; } - else if(axletter === 'y') { + else if(axLetter === 'y') { sides = ['left', 'right']; transfn = function(d) { return 'translate(0,' + ax.l2p(d.x) + ')'; @@ -132771,10 +129685,12 @@ axes.doTicks = function(gd, axid, skipTitle) { // which direction do the side[0], side[1], and free ticks go? // then we flip if outside XOR y axis ticksign = [-1, 1, axside === sides[1] ? 1 : -1]; - if((ax.ticks !== 'inside') === (axletter === 'x')) { + if((ax.ticks !== 'inside') === (axLetter === 'x')) { ticksign = ticksign.map(function(v) { return -v; }); } + if(!ax.visible) return; + // remove zero lines, grid lines, and inside ticks if they're within // 1 pixel of the end // The key case here is removing zero lines when the axis bound is zero. @@ -132805,12 +129721,12 @@ axes.doTicks = function(gd, axid, skipTitle) { var tickLabels = container.selectAll('g.' + tcls).data(vals, datafn); if(!ax.showticklabels || !isNumeric(position)) { tickLabels.remove(); - drawAxTitle(axid); + drawAxTitle(); return; } var labelx, labely, labelanchor, labelpos0, flipit; - if(axletter === 'x') { + if(axLetter === 'x') { flipit = (axside === 'bottom') ? 1 : -1; labelx = function(d) { return d.dx + labelShift * flipit; }; labelpos0 = position + (labelStandoff + pad) * flipit; @@ -132926,7 +129842,7 @@ axes.doTicks = function(gd, axid, skipTitle) { // check for auto-angling if x labels overlap // don't auto-angle at all for log axes with // base and digit format - if(axletter === 'x' && !isNumeric(ax.tickangle) && + if(axLetter === 'x' && !isNumeric(ax.tickangle) && (ax.type !== 'log' || String(ax.dtick).charAt(0) !== 'D')) { var lbbArray = []; tickLabels.each(function(d) { @@ -132971,12 +129887,59 @@ axes.doTicks = function(gd, axid, skipTitle) { // (so it can move out of the way if needed) // TODO: separate out scoot so we don't need to do // a full redraw of the title (mostly relevant for MathJax) - drawAxTitle(axid); + drawAxTitle(); return axid + ' done'; } function calcBoundingBox() { - ax._boundingBox = container.node().getBoundingClientRect(); + var bBox = container.node().getBoundingClientRect(); + var gdBB = gd.getBoundingClientRect(); + + /* + * the way we're going to use this, the positioning that matters + * is relative to the origin of gd. This is important particularly + * if gd is scrollable, and may have been scrolled between the time + * we calculate this and the time we use it + */ + ax._boundingBox = { + width: bBox.width, + height: bBox.height, + left: bBox.left - gdBB.left, + right: bBox.right - gdBB.left, + top: bBox.top - gdBB.top, + bottom: bBox.bottom - gdBB.top + }; + + /* + * for spikelines: what's the full domain of positions in the + * opposite direction that are associated with this axis? + * This means any axes that we make a subplot with, plus the + * position of the axis itself if it's free. + */ + if(subplots) { + var fullRange = ax._counterSpan = [Infinity, -Infinity]; + + for(i = 0; i < subplots.length; i++) { + var subplot = fullLayout._plots[subplots[i]]; + var counterAxis = subplot[(axLetter === 'x') ? 'yaxis' : 'xaxis']; + + extendRange(fullRange, [ + counterAxis._offset, + counterAxis._offset + counterAxis._length + ]); + } + + if(ax.anchor === 'free') { + extendRange(fullRange, (axLetter === 'x') ? + [ax._boundingBox.bottom, ax._boundingBox.top] : + [ax._boundingBox.right, ax._boundingBox.left]); + } + } + + function extendRange(range, newRange) { + range[0] = Math.min(range[0], newRange[0]); + range[1] = Math.max(range[1], newRange[1]); + } } var done = Lib.syncOrAsync([ @@ -132988,7 +129951,7 @@ axes.doTicks = function(gd, axid, skipTitle) { return done; } - function drawAxTitle(axid) { + function drawAxTitle() { if(skipTitle) return; // now this only applies to regular cartesian axes; colorbars and @@ -133059,16 +130022,16 @@ axes.doTicks = function(gd, axid, skipTitle) { function traceHasBarsOrFill(trace, subplot) { if(trace.visible !== true || trace.xaxis + trace.yaxis !== subplot) return false; - if(Registry.traceIs(trace, 'bar') && trace.orientation === {x: 'h', y: 'v'}[axletter]) return true; - return trace.fill && trace.fill.charAt(trace.fill.length - 1) === axletter; + if(Registry.traceIs(trace, 'bar') && trace.orientation === {x: 'h', y: 'v'}[axLetter]) return true; + return trace.fill && trace.fill.charAt(trace.fill.length - 1) === axLetter; } function drawGrid(plotinfo, counteraxis, subplot) { var gridcontainer = plotinfo.gridlayer, zlcontainer = plotinfo.zerolinelayer, - gridvals = plotinfo['hidegrid' + axletter] ? [] : valsClipped, + gridvals = plotinfo['hidegrid' + axLetter] ? [] : valsClipped, gridpath = ax._gridpath || - 'M0,0' + ((axletter === 'x') ? 'v' : 'h') + counteraxis._length, + 'M0,0' + ((axLetter === 'x') ? 'v' : 'h') + counteraxis._length, grid = gridcontainer.selectAll('path.' + gcls) .data((ax.showgrid === false) ? [] : gridvals, datafn); grid.enter().append('path').classed(gcls, 1) @@ -133122,12 +130085,13 @@ axes.doTicks = function(gd, axid, skipTitle) { return drawLabels(ax._axislayer, ax._pos); } else { - var alldone = axes.getSubplots(gd, ax).map(function(subplot) { + subplots = axes.getSubplots(gd, ax); + var alldone = subplots.map(function(subplot) { var plotinfo = fullLayout._plots[subplot]; if(!fullLayout._has('cartesian')) return; - var container = plotinfo[axletter + 'axislayer'], + var container = plotinfo[axLetter + 'axislayer'], // [bottom or left, top or right, free, main] linepositions = ax._linepositions[subplot] || [], @@ -133315,7 +130279,7 @@ function swapAxisAttrs(layout, key, xFullAxes, yFullAxes) { } } -},{"../../components/color":585,"../../components/drawing":608,"../../components/titles":661,"../../constants/numerical":672,"../../lib":690,"../../lib/svg_text_utils":709,"../../registry":807,"./axis_ids":732,"./layout_attributes":740,"./layout_defaults":741,"./set_convert":746,"d3":114,"fast-isnumeric":123}],730:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"../../components/titles":655,"../../constants/numerical":666,"../../lib":685,"../../lib/svg_text_utils":704,"../../registry":802,"./axis_ids":727,"./layout_attributes":735,"./layout_defaults":736,"./set_convert":741,"d3":107,"fast-isnumeric":116}],725:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133390,7 +130354,7 @@ function category(a) { return curvecats > curvenums * 2; } -},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],731:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],726:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133440,6 +130404,8 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, return Lib.coerce2(containerIn, containerOut, layoutAttributes, attr, dflt); } + var visible = coerce('visible', !options.cheateronly); + var axType = containerOut.type; if(axType === 'date') { @@ -133449,6 +130415,20 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, setConvert(containerOut, layoutOut); + var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range)); + + if(autoRange) coerce('rangemode'); + + coerce('range'); + containerOut.cleanRange(); + + handleCategoryOrderDefaults(containerIn, containerOut, coerce); + containerOut._initialCategories = axType === 'category' ? + orderedCategories(letter, containerOut.categoryorder, containerOut.categoryarray, options.data) : + []; + + if(!visible) return containerOut; + var dfltColor = coerce('color'); // if axis.color was provided, use it for fonts too; otherwise, // inherit from global font color in case that was provided. @@ -133461,17 +130441,9 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, color: dfltFontColor }); - var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range)); - - if(autoRange) coerce('rangemode'); - - coerce('range'); - containerOut.cleanRange(); - handleTickValueDefaults(containerIn, containerOut, coerce, axType); handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options); handleTickMarkDefaults(containerIn, containerOut, coerce, options); - handleCategoryOrderDefaults(containerIn, containerOut, coerce); var lineColor = coerce2('linecolor', dfltColor), lineWidth = coerce2('linewidth'), @@ -133502,15 +130474,10 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, delete containerOut.zerolinewidth; } - // fill in categories - containerOut._initialCategories = axType === 'category' ? - orderedCategories(letter, containerOut.categoryorder, containerOut.categoryarray, options.data) : - []; - return containerOut; }; -},{"../../components/color/attributes":584,"../../lib":690,"../../registry":807,"./category_order_defaults":733,"./layout_attributes":740,"./ordered_categories":742,"./set_convert":746,"./tick_label_defaults":747,"./tick_mark_defaults":748,"./tick_value_defaults":749,"tinycolor2":521}],732:[function(require,module,exports){ +},{"../../components/color/attributes":577,"../../lib":685,"../../registry":802,"./category_order_defaults":728,"./layout_attributes":735,"./ordered_categories":737,"./set_convert":741,"./tick_label_defaults":742,"./tick_mark_defaults":743,"./tick_value_defaults":744,"tinycolor2":514}],727:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133632,7 +130599,7 @@ exports.getFromTrace = function(gd, fullTrace, type) { return ax; }; -},{"../../lib":690,"../../registry":807,"../plots":792,"./constants":734}],733:[function(require,module,exports){ +},{"../../lib":685,"../../registry":802,"../plots":787,"./constants":729}],728:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133666,7 +130633,7 @@ module.exports = function handleCategoryOrderDefaults(containerIn, containerOut, } }; -},{}],734:[function(require,module,exports){ +},{}],729:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133736,7 +130703,7 @@ module.exports = { DFLTRANGEY: [-1, 4] }; -},{}],735:[function(require,module,exports){ +},{}],730:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133875,7 +130842,7 @@ function updateConstraintGroups(constraintGroups, thisGroup, thisID, scaleanchor thisGroup[scaleanchor] = 1; } -},{"../../lib":690,"./axis_ids":732}],736:[function(require,module,exports){ +},{"../../lib":685,"./axis_ids":727}],731:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133951,7 +130918,7 @@ module.exports = function enforceAxisConstraints(gd) { } }; -},{"../../constants/numerical":672,"./axis_ids":732,"./scale_zoom":744}],737:[function(require,module,exports){ +},{"../../constants/numerical":666,"./axis_ids":727,"./scale_zoom":739}],732:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134949,7 +131916,7 @@ function calcLinks(constraintGroups, xIDs, yIDs) { }; } -},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../lib":690,"../../lib/setcursor":705,"../../lib/svg_text_utils":709,"../../plotly":724,"../../registry":807,"./axes":729,"./axis_ids":732,"./constants":734,"./scale_zoom":744,"./select":745,"d3":114,"tinycolor2":521}],738:[function(require,module,exports){ +},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../lib":685,"../../lib/setcursor":700,"../../lib/svg_text_utils":704,"../../plotly":719,"../../registry":802,"./axes":724,"./axis_ids":727,"./constants":729,"./scale_zoom":739,"./select":740,"d3":107,"tinycolor2":514}],733:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134963,6 +131930,7 @@ function calcLinks(constraintGroups, xIDs, yIDs) { var d3 = require('d3'); var isNumeric = require('fast-isnumeric'); +var tinycolor = require('tinycolor2'); var Lib = require('../../lib'); var Events = require('../../lib/events'); @@ -135252,7 +132220,7 @@ fx.hover = function(gd, evt, subplot) { // The actual implementation is here: function hover(gd, evt, subplot) { - if(['pie', 'sankey'].indexOf(subplot) !== -1) { + if(subplot === 'pie') { gd.emit('plotly_hover', { event: evt.originalEvent, points: [evt] @@ -135419,6 +132387,11 @@ function hover(gd, evt, subplot) { if(!cd || !cd[0] || !cd[0].trace || cd[0].trace.visible !== true) continue; trace = cd[0].trace; + + // Explicitly bail out for these two. I don't know how to otherwise prevent + // the rest of this function from running and failing + if(['carpet', 'contourcarpet'].indexOf(trace._module.name) !== -1) continue; + subplotId = getSubplot(trace); subploti = subplots.indexOf(subplotId); @@ -135507,30 +132480,8 @@ function hover(gd, evt, subplot) { // nothing left: remove all labels and quit if(hoverData.length === 0) return dragElement.unhoverRaw(gd, evt); - // if there's more than one horz bar trace, - // rotate the labels so they don't overlap - var rotateLabels = hovermode === 'y' && searchData.length > 1; - hoverData.sort(function(d1, d2) { return d1.distance - d2.distance; }); - var bgColor = Color.combine( - fullLayout.plot_bgcolor || Color.background, - fullLayout.paper_bgcolor - ); - - var labelOpts = { - hovermode: hovermode, - rotateLabels: rotateLabels, - bgColor: bgColor, - container: fullLayout._hoverlayer, - outerContainer: fullLayout._paperdiv - }; - var hoverLabels = createHoverText(hoverData, labelOpts); - - hoverAvoidOverlaps(hoverData, rotateLabels ? 'xa' : 'ya'); - - alignHoverText(hoverLabels, rotateLabels); - // lastly, emit custom hover/unhover events var oldhoverdata = gd._hoverdata, newhoverdata = []; @@ -135562,6 +132513,39 @@ function hover(gd, evt, subplot) { gd._hoverdata = newhoverdata; + if(hoverChanged(gd, evt, oldhoverdata) && fullLayout._hasCartesian) { + var spikelineOpts = { + hovermode: hovermode, + fullLayout: fullLayout, + container: fullLayout._hoverlayer, + outerContainer: fullLayout._paperdiv + }; + createSpikelines(hoverData, spikelineOpts); + } + + // if there's more than one horz bar trace, + // rotate the labels so they don't overlap + var rotateLabels = hovermode === 'y' && searchData.length > 1; + + var bgColor = Color.combine( + fullLayout.plot_bgcolor || Color.background, + fullLayout.paper_bgcolor + ); + + var labelOpts = { + hovermode: hovermode, + rotateLabels: rotateLabels, + bgColor: bgColor, + container: fullLayout._hoverlayer, + outerContainer: fullLayout._paperdiv + }; + + var hoverLabels = createHoverText(hoverData, labelOpts); + + hoverAvoidOverlaps(hoverData, rotateLabels ? 'xa' : 'ya'); + + alignHoverText(hoverLabels, rotateLabels); + // TODO: tagName hack is needed to appease geo.js's hack of using evt.target=true // we should improve the "fx" API so other plots can use it without these hack. if(evt.target && evt.target.tagName) { @@ -135569,7 +132553,8 @@ function hover(gd, evt, subplot) { overrideCursor(d3.select(evt.target), hasClickToShow ? 'pointer' : ''); } - if(!hoverChanged(gd, evt, oldhoverdata)) return; + // don't emit events if called manually + if(!evt.target || !hoverChanged(gd, evt, oldhoverdata)) return; if(oldhoverdata) { gd.emit('plotly_unhover', { @@ -135789,8 +132774,142 @@ fx.loneUnhover = function(containerOrSelection) { d3.select(containerOrSelection); selection.selectAll('g.hovertext').remove(); + selection.selectAll('.spikeline').remove(); }; +function createSpikelines(hoverData, opts) { + var hovermode = opts.hovermode; + var container = opts.container; + var c0 = hoverData[0]; + var xa = c0.xa; + var ya = c0.ya; + var showX = xa.showspikes; + var showY = ya.showspikes; + + // Remove old spikeline items + container.selectAll('.spikeline').remove(); + + if(hovermode !== 'closest' || !(showX || showY)) return; + + var fullLayout = opts.fullLayout; + var xPoint = xa._offset + (c0.x0 + c0.x1) / 2; + var yPoint = ya._offset + (c0.y0 + c0.y1) / 2; + var contrastColor = Color.combine(fullLayout.plot_bgcolor, fullLayout.paper_bgcolor); + var dfltDashColor = tinycolor.readability(c0.color, contrastColor) < 1.5 ? + Color.contrast(contrastColor) : c0.color; + + if(showY) { + var yMode = ya.spikemode; + var yThickness = ya.spikethickness; + var yColor = ya.spikecolor || dfltDashColor; + var yBB = ya._boundingBox; + var xEdge = ((yBB.left + yBB.right) / 2) < xPoint ? yBB.right : yBB.left; + + if(yMode.indexOf('toaxis') !== -1 || yMode.indexOf('across') !== -1) { + var xBase = xEdge; + var xEndSpike = xPoint; + if(yMode.indexOf('across') !== -1) { + xBase = ya._counterSpan[0]; + xEndSpike = ya._counterSpan[1]; + } + + // Background horizontal Line (to y-axis) + container.append('line') + .attr({ + 'x1': xBase, + 'x2': xEndSpike, + 'y1': yPoint, + 'y2': yPoint, + 'stroke-width': yThickness + 2, + 'stroke': contrastColor + }) + .classed('spikeline', true) + .classed('crisp', true); + + // Foreground horizontal line (to y-axis) + container.append('line') + .attr({ + 'x1': xBase, + 'x2': xEndSpike, + 'y1': yPoint, + 'y2': yPoint, + 'stroke-width': yThickness, + 'stroke': yColor, + 'stroke-dasharray': Drawing.dashStyle(ya.spikedash, yThickness) + }) + .classed('spikeline', true) + .classed('crisp', true); + } + // Y axis marker + if(yMode.indexOf('marker') !== -1) { + container.append('circle') + .attr({ + 'cx': xEdge + (ya.side !== 'right' ? yThickness : -yThickness), + 'cy': yPoint, + 'r': yThickness, + 'fill': yColor + }) + .classed('spikeline', true); + } + } + + if(showX) { + var xMode = xa.spikemode; + var xThickness = xa.spikethickness; + var xColor = xa.spikecolor || dfltDashColor; + var xBB = xa._boundingBox; + var yEdge = ((xBB.top + xBB.bottom) / 2) < yPoint ? xBB.bottom : xBB.top; + + if(xMode.indexOf('toaxis') !== -1 || xMode.indexOf('across') !== -1) { + var yBase = yEdge; + var yEndSpike = yPoint; + if(xMode.indexOf('across') !== -1) { + yBase = xa._counterSpan[0]; + yEndSpike = xa._counterSpan[1]; + } + + // Background vertical line (to x-axis) + container.append('line') + .attr({ + 'x1': xPoint, + 'x2': xPoint, + 'y1': yBase, + 'y2': yEndSpike, + 'stroke-width': xThickness + 2, + 'stroke': contrastColor + }) + .classed('spikeline', true) + .classed('crisp', true); + + // Foreground vertical line (to x-axis) + container.append('line') + .attr({ + 'x1': xPoint, + 'x2': xPoint, + 'y1': yBase, + 'y2': yEndSpike, + 'stroke-width': xThickness, + 'stroke': xColor, + 'stroke-dasharray': Drawing.dashStyle(xa.spikedash, xThickness) + }) + .classed('spikeline', true) + .classed('crisp', true); + } + + // X axis marker + if(xMode.indexOf('marker') !== -1) { + container.append('circle') + .attr({ + 'cx': xPoint, + 'cy': yEdge - (xa.side !== 'top' ? xThickness : -xThickness), + 'r': xThickness, + 'fill': xColor + }) + .classed('spikeline', true); + } + } +} + function createHoverText(hoverData, opts) { var hovermode = opts.hovermode, rotateLabels = opts.rotateLabels, @@ -136311,9 +133430,7 @@ function alignHoverText(hoverLabels, rotateLabels) { } function hoverChanged(gd, evt, oldhoverdata) { - // don't emit any events if nothing changed or - // if fx.hover was called manually - if(!evt.target) return false; + // don't emit any events if nothing changed if(!oldhoverdata || oldhoverdata.length !== gd._hoverdata.length) return true; for(var i = oldhoverdata.length - 1; i >= 0; i--) { @@ -136360,7 +133477,7 @@ fx.inbox = function(v0, v1) { return Infinity; }; -},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../lib":690,"../../lib/events":681,"../../lib/override_cursor":699,"../../lib/svg_text_utils":709,"../../registry":807,"../layout_attributes":783,"./axes":729,"./constants":734,"./dragbox":737,"d3":114,"fast-isnumeric":123}],739:[function(require,module,exports){ +},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../lib":685,"../../lib/events":676,"../../lib/override_cursor":694,"../../lib/svg_text_utils":704,"../../registry":802,"../layout_attributes":778,"./axes":724,"./constants":729,"./dragbox":732,"d3":107,"fast-isnumeric":116,"tinycolor2":514}],734:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136426,8 +133543,11 @@ exports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) { // Skip trace if whitelist provided and it's not whitelisted: // if (Array.isArray(traces) && traces.indexOf(i) === -1) continue; if(trace.xaxis + trace.yaxis === subplot) { + // XXX: Should trace carpet dependencies. Only replot all carpet plots if the carpet + // axis has actually changed: + // // If this trace is specifically requested, add it to the list: - if(traces.indexOf(trace.index) !== -1) { + if(traces.indexOf(trace.index) !== -1 || trace.carpet) { // Okay, so example: traces 0, 1, and 2 have fill = tonext. You animate // traces 0 and 2. Trace 1 also needs to be updated, otherwise its fill // is outdated. So this retroactively adds the previous trace if the @@ -136663,6 +133783,7 @@ function makeSubplotLayer(plotinfo) { joinLayer(parent, 'g', 'imagelayer'); joinLayer(parent, 'g', 'maplayer'); joinLayer(parent, 'g', 'barlayer'); + joinLayer(parent, 'g', 'carpetlayer'); joinLayer(parent, 'g', 'boxlayer'); joinLayer(parent, 'g', 'scatterlayer'); } @@ -136745,7 +133866,7 @@ function joinLayer(parent, nodeType, className) { return layer; } -},{"../../lib":690,"../plots":792,"./attributes":728,"./axis_ids":732,"./constants":734,"./layout_attributes":740,"./transition_axes":750,"d3":114}],740:[function(require,module,exports){ +},{"../../lib":685,"../plots":787,"./attributes":723,"./axis_ids":727,"./constants":729,"./layout_attributes":735,"./transition_axes":745,"d3":107}],735:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136758,12 +133879,22 @@ function joinLayer(parent, nodeType, className) { var fontAttrs = require('../font_attributes'); var colorAttrs = require('../../components/color/attributes'); +var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; var constants = require('./constants'); module.exports = { + visible: { + valType: 'boolean', + role: 'info', + description: [ + 'A single toggle to hide the axis while preserving interaction like dragging.', + 'Default is true when a cheater plot is present on the axis, otherwise', + 'false' + ].join(' ') + }, color: { valType: 'color', dflt: colorAttrs.defaultLine, @@ -137027,6 +134158,45 @@ module.exports = { role: 'style', description: 'Determines whether or not the tick labels are drawn.' }, + showspikes: { + valType: 'boolean', + dflt: false, + role: 'style', + description: [ + 'Determines whether or not spikes (aka droplines) are drawn for this axis.', + 'Note: This only takes affect when hovermode = closest' + ].join(' ') + }, + spikecolor: { + valType: 'color', + dflt: null, + role: 'style', + description: 'Sets the spike color. If undefined, will use the series color' + }, + spikethickness: { + valType: 'number', + dflt: 3, + role: 'style', + description: 'Sets the width (in px) of the zero line.' + }, + spikedash: extendFlat({}, dash, {dflt: 'dash'}), + spikemode: { + valType: 'flaglist', + flags: ['toaxis', 'across', 'marker'], + role: 'style', + dflt: 'toaxis', + description: [ + 'Determines the drawing mode for the spike line', + 'If *toaxis*, the line is drawn from the data point to the axis the ', + 'series is plotted on.', + + 'If *across*, the line is drawn across the entire plot area, and', + 'supercedes *toaxis*.', + + 'If *marker*, then a marker dot is drawn on the axis the series is', + 'plotted on' + ].join(' ') + }, tickfont: extendFlat({}, fontAttrs, { description: 'Sets the tick font.' }), @@ -137314,7 +134484,7 @@ module.exports = { } }; -},{"../../components/color/attributes":584,"../../lib/extend":682,"../font_attributes":753,"./constants":734}],741:[function(require,module,exports){ +},{"../../components/color/attributes":577,"../../components/drawing/attributes":601,"../../lib/extend":677,"../font_attributes":748,"./constants":729}],736:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137346,6 +134516,8 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { yaListCartesian = [], xaListGl2d = [], yaListGl2d = [], + xaListCheater = [], + xaListNonCheater = [], outerTicks = {}, noGrids = {}, i; @@ -137368,6 +134540,21 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { var xaName = axisIds.id2name(trace.xaxis), yaName = axisIds.id2name(trace.yaxis); + // Two things trigger axis visibility: + // 1. is not carpet + // 2. carpet that's not cheater + if(!Registry.traceIs(trace, 'carpet') || (trace.type === 'carpet' && !trace._cheater)) { + if(xaName) Lib.pushUnique(xaListNonCheater, xaName); + } + + // The above check for definitely-not-cheater is not adequate. This + // second list tracks which axes *could* be a cheater so that the + // full condition triggering hiding is: + // *could* be a cheater and *is not definitely visible* + if(trace.type === 'carpet' && trace._cheater) { + if(xaName) Lib.pushUnique(xaListCheater, xaName); + } + // add axes implied by traces if(xaName && listX.indexOf(xaName) === -1) listX.push(xaName); if(yaName && listY.indexOf(yaName) === -1) listY.push(yaName); @@ -137485,11 +134672,20 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { showGrid: !noGrids[axName], data: fullData, bgColor: bgColor, - calendar: layoutOut.calendar + calendar: layoutOut.calendar, + cheateronly: axLetter === 'x' && (xaListCheater.indexOf(axName) !== -1 && xaListNonCheater.indexOf(axName) === -1) }; handleAxisDefaults(axLayoutIn, axLayoutOut, coerce, defaultOptions, layoutOut); + var showSpikes = coerce('showspikes'); + if(showSpikes) { + coerce('spikecolor'); + coerce('spikethickness'); + coerce('spikedash'); + coerce('spikemode'); + } + var positioningOptions = { letter: axLetter, counterAxes: counterAxes[axLetter], @@ -137561,7 +134757,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { } }; -},{"../../components/color":585,"../../lib":690,"../../registry":807,"../layout_attributes":783,"./axis_defaults":731,"./axis_ids":732,"./constants":734,"./constraint_defaults":735,"./layout_attributes":740,"./position_defaults":743,"./type_defaults":751}],742:[function(require,module,exports){ +},{"../../components/color":578,"../../lib":685,"../../registry":802,"../layout_attributes":778,"./axis_defaults":726,"./axis_ids":727,"./constants":729,"./constraint_defaults":730,"./layout_attributes":735,"./position_defaults":738,"./type_defaults":746}],737:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137640,7 +134836,7 @@ module.exports = function orderedCategories(axisLetter, categoryorder, categorya } }; -},{"d3":114}],743:[function(require,module,exports){ +},{"d3":107}],738:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137705,7 +134901,7 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer return containerOut; }; -},{"../../lib":690,"fast-isnumeric":123}],744:[function(require,module,exports){ +},{"../../lib":685,"fast-isnumeric":116}],739:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137730,7 +134926,7 @@ module.exports = function scaleZoom(ax, factor, centerFraction) { ]; }; -},{}],745:[function(require,module,exports){ +},{}],740:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137930,7 +135126,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) { }; }; -},{"../../components/color":585,"../../lib/polygon":700,"./axes":729,"./constants":734}],746:[function(require,module,exports){ +},{"../../components/color":578,"../../lib/polygon":695,"./axes":724,"./constants":729}],741:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138373,7 +135569,7 @@ module.exports = function setConvert(ax, fullLayout) { delete ax._forceTick0; }; -},{"../../constants/numerical":672,"../../lib":690,"./axis_ids":732,"./constants":734,"d3":114,"fast-isnumeric":123}],747:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685,"./axis_ids":727,"./constants":729,"d3":107,"fast-isnumeric":116}],742:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138457,7 +135653,7 @@ function getShowAttrDflt(containerIn) { } } -},{"../../lib":690}],748:[function(require,module,exports){ +},{"../../lib":685}],743:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138490,7 +135686,7 @@ module.exports = function handleTickDefaults(containerIn, containerOut, coerce, } }; -},{"../../lib":690,"./layout_attributes":740}],749:[function(require,module,exports){ +},{"../../lib":685,"./layout_attributes":735}],744:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138574,7 +135770,7 @@ module.exports = function handleTickValueDefaults(containerIn, containerOut, coe } }; -},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],750:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],745:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138886,7 +136082,7 @@ module.exports = function transitionAxes(gd, newLayout, transitionOpts, makeOnCo return Promise.resolve(); }; -},{"../../components/drawing":608,"../../plotly":724,"../../registry":807,"./axes":729,"d3":114}],751:[function(require,module,exports){ +},{"../../components/drawing":602,"../../plotly":719,"../../registry":802,"./axes":724,"d3":107}],746:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139014,7 +136210,7 @@ function isBoxWithoutPositionCoords(trace, axLetter) { ); } -},{"../../registry":807,"./axis_autotype":730,"./axis_ids":732}],752:[function(require,module,exports){ +},{"../../registry":802,"./axis_autotype":725,"./axis_ids":727}],747:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139439,7 +136635,7 @@ function crawl(attrs, callback, path, depth) { }); } -},{"../lib":690,"../plotly":724}],753:[function(require,module,exports){ +},{"../lib":685,"../plotly":719}],748:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139481,7 +136677,7 @@ module.exports = { } }; -},{}],754:[function(require,module,exports){ +},{}],749:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139543,7 +136739,7 @@ module.exports = { } }; -},{}],755:[function(require,module,exports){ +},{}],750:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139703,7 +136899,7 @@ params.layerNameToAdjective = { // base layers drawn over choropleth params.baseLayersOverChoropleth = ['rivers', 'lakes']; -},{}],756:[function(require,module,exports){ +},{}],751:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140176,7 +137372,7 @@ function createMockAxis(fullLayout) { return mockAxis; } -},{"../../components/color":585,"../../components/drawing":608,"../../lib/topojson_utils":711,"../cartesian/axes":729,"../cartesian/graph_interact":738,"../plots":792,"./constants":755,"./projections":763,"./set_scale":764,"./zoom":765,"./zoom_reset":766,"d3":114,"topojson-client":523}],757:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"../../lib/topojson_utils":706,"../cartesian/axes":724,"../cartesian/graph_interact":733,"../plots":787,"./constants":750,"./projections":758,"./set_scale":759,"./zoom":760,"./zoom_reset":761,"d3":107,"topojson-client":516}],752:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140256,7 +137452,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) } }; -},{"../../plots/plots":792,"./geo":756,"./layout/attributes":758,"./layout/defaults":761,"./layout/layout_attributes":762}],758:[function(require,module,exports){ +},{"../../plots/plots":787,"./geo":751,"./layout/attributes":753,"./layout/defaults":756,"./layout/layout_attributes":757}],753:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140284,7 +137480,7 @@ module.exports = { } }; -},{}],759:[function(require,module,exports){ +},{}],754:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140347,7 +137543,7 @@ module.exports = { } }; -},{"../../../components/color/attributes":584}],760:[function(require,module,exports){ +},{"../../../components/color/attributes":577}],755:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140421,7 +137617,7 @@ module.exports = function supplyGeoAxisLayoutDefaults(geoLayoutIn, geoLayoutOut) } }; -},{"../../../lib":690,"../constants":755,"./axis_attributes":759}],761:[function(require,module,exports){ +},{"../../../lib":685,"../constants":750,"./axis_attributes":754}],756:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140540,7 +137736,7 @@ function handleGeoDefaults(geoLayoutIn, geoLayoutOut, coerce) { ]; } -},{"../../subplot_defaults":799,"../constants":755,"./axis_defaults":760,"./layout_attributes":762}],762:[function(require,module,exports){ +},{"../../subplot_defaults":794,"../constants":750,"./axis_defaults":755,"./layout_attributes":757}],757:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140799,7 +137995,7 @@ module.exports = { lataxis: geoAxesAttrs }; -},{"../../../components/color/attributes":584,"../constants":755,"./axis_attributes":759}],763:[function(require,module,exports){ +},{"../../../components/color/attributes":577,"../constants":750,"./axis_attributes":754}],758:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141245,7 +138441,7 @@ function addProjectionsToD3(d3) { module.exports = addProjectionsToD3; -},{}],764:[function(require,module,exports){ +},{}],759:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141396,7 +138592,7 @@ function getBounds(projection, rangeBox) { return d3.geo.path().projection(projection).bounds(rangeBox); } -},{"./constants":755,"d3":114}],765:[function(require,module,exports){ +},{"./constants":750,"d3":107}],760:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141823,7 +139019,7 @@ function d3_eventDispatch(target) { return dispatch; } -},{"d3":114}],766:[function(require,module,exports){ +},{"d3":107}],761:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141852,7 +139048,7 @@ module.exports = function createGeoZoomReset(geo, geoLayout) { return zoomReset; }; -},{}],767:[function(require,module,exports){ +},{}],762:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142130,7 +139326,7 @@ function createCamera(scene) { return result; } -},{"../cartesian/constants":734,"mouse-change":441,"mouse-wheel":444}],768:[function(require,module,exports){ +},{"../cartesian/constants":729,"mouse-change":434,"mouse-wheel":437}],763:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142376,7 +139572,7 @@ function createAxes2D(scene) { module.exports = createAxes2D; -},{"../../lib/html2unicode":688,"../../lib/str2rgbarray":708,"../cartesian/axes":729,"../plots":792}],769:[function(require,module,exports){ +},{"../../lib/html2unicode":683,"../../lib/str2rgbarray":703,"../cartesian/axes":724,"../plots":787}],764:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142488,7 +139684,7 @@ exports.toSVG = function(gd) { } }; -},{"../../constants/xmlns_namespaces":674,"../cartesian/attributes":728,"../plots":792,"./scene2d":770}],770:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":668,"../cartesian/attributes":723,"../plots":787,"./scene2d":765}],765:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143159,7 +140355,7 @@ proto.hoverFormatter = function(axisName, val) { return Axes.tickText(axis, axis.c2l(val), 'hover').text; }; -},{"../../lib/html2unicode":688,"../../lib/show_no_webgl_msg":706,"../../plots/cartesian/axes":729,"../../plots/cartesian/constraints":736,"../../plots/cartesian/graph_interact":738,"../../registry":807,"./camera":767,"./convert":768,"gl-plot2d":210,"gl-select-box":244,"gl-spikes2d":253,"webgl-context":550}],771:[function(require,module,exports){ +},{"../../lib/html2unicode":683,"../../lib/show_no_webgl_msg":701,"../../plots/cartesian/axes":724,"../../plots/cartesian/constraints":731,"../../plots/cartesian/graph_interact":733,"../../registry":802,"./camera":762,"./convert":763,"gl-plot2d":203,"gl-select-box":237,"gl-spikes2d":246,"webgl-context":543}],766:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143408,7 +140604,7 @@ function createCamera(element, options) { return camera; } -},{"3d-view":31,"mouse-change":441,"mouse-wheel":444,"right-now":490}],772:[function(require,module,exports){ +},{"3d-view":33,"mouse-change":434,"mouse-wheel":437,"right-now":483}],767:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143525,7 +140721,7 @@ exports.cleanId = function cleanId(id) { return 'scene' + sceneNum; }; -},{"../../constants/xmlns_namespaces":674,"../../lib":690,"../plots":792,"./layout/attributes":773,"./layout/defaults":777,"./layout/layout_attributes":778,"./scene":782}],773:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":668,"../../lib":685,"../plots":787,"./layout/attributes":768,"./layout/defaults":772,"./layout/layout_attributes":773,"./scene":777}],768:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143553,7 +140749,7 @@ module.exports = { } }; -},{}],774:[function(require,module,exports){ +},{}],769:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143570,6 +140766,7 @@ var extendFlat = require('../../../lib/extend').extendFlat; module.exports = { + visible: axesAttrs.visible, showspikes: { valType: 'boolean', role: 'info', @@ -143669,7 +140866,7 @@ module.exports = { zerolinewidth: axesAttrs.zerolinewidth }; -},{"../../../components/color":585,"../../../lib/extend":682,"../../cartesian/layout_attributes":740}],775:[function(require,module,exports){ +},{"../../../components/color":578,"../../../lib/extend":677,"../../cartesian/layout_attributes":735}],770:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143741,7 +140938,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { } }; -},{"../../../lib":690,"../../cartesian/axis_defaults":731,"../../cartesian/type_defaults":751,"./axis_attributes":774,"tinycolor2":521}],776:[function(require,module,exports){ +},{"../../../lib":685,"../../cartesian/axis_defaults":726,"../../cartesian/type_defaults":746,"./axis_attributes":769,"tinycolor2":514}],771:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143753,12 +140950,9 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { 'use strict'; -var arrtools = require('arraytools'); var convertHTMLToUnicode = require('../../../lib/html2unicode'); var str2RgbaArray = require('../../../lib/str2rgbarray'); -var arrayCopy1D = arrtools.copy1D; - var AXES_NAMES = ['xaxis', 'yaxis', 'zaxis']; function AxesOptions() { @@ -143808,9 +141002,9 @@ function AxesOptions() { [0.8, 0.8, 0.8, 0.5] ]; // some default values are stored for applying model transforms - this._defaultTickPad = arrayCopy1D(this.tickPad); - this._defaultLabelPad = arrayCopy1D(this.labelPad); - this._defaultLineTickLength = arrayCopy1D(this.lineTickLength); + this._defaultTickPad = this.tickPad.slice(); + this._defaultLabelPad = this.labelPad.slice(); + this._defaultLineTickLength = this.lineTickLength.slice(); } var proto = AxesOptions.prototype; @@ -143820,6 +141014,17 @@ proto.merge = function(sceneLayout) { for(var i = 0; i < 3; ++i) { var axes = sceneLayout[AXES_NAMES[i]]; + if(!axes.visible) { + opts.tickEnable[i] = false; + opts.labelEnable[i] = false; + opts.lineEnable[i] = false; + opts.lineTickEnable[i] = false; + opts.gridEnable[i] = false; + opts.zeroEnable[i] = false; + opts.backgroundEnable[i] = false; + continue; + } + // Axes labels opts.labels[i] = convertHTMLToUnicode(axes.title); if('titlefont' in axes) { @@ -143896,7 +141101,7 @@ function createAxesOptions(plotlyOptions) { module.exports = createAxesOptions; -},{"../../../lib/html2unicode":688,"../../../lib/str2rgbarray":708,"arraytools":38}],777:[function(require,module,exports){ +},{"../../../lib/html2unicode":683,"../../../lib/str2rgbarray":703}],772:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144000,7 +141205,7 @@ function handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) { coerce('hovermode', opts.getDfltFromLayout('hovermode')); } -},{"../../../components/color":585,"../../../lib":690,"../../subplot_defaults":799,"./axis_defaults":775,"./layout_attributes":778}],778:[function(require,module,exports){ +},{"../../../components/color":578,"../../../lib":685,"../../subplot_defaults":794,"./axis_defaults":770,"./layout_attributes":773}],773:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144170,7 +141375,7 @@ module.exports = { } }; -},{"../../../lib/extend":682,"./axis_attributes":774}],779:[function(require,module,exports){ +},{"../../../lib/extend":677,"./axis_attributes":769}],774:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144201,6 +141406,12 @@ proto.merge = function(sceneLayout) { for(var i = 0; i < 3; ++i) { var axes = sceneLayout[AXES_NAMES[i]]; + if(!axes.visible) { + this.enabled[i] = false; + this.drawSides[i] = false; + continue; + } + this.enabled[i] = axes.showspikes; this.colors[i] = str2RGBArray(axes.spikecolor); this.drawSides[i] = axes.spikesides; @@ -144216,7 +141427,7 @@ function createSpikeOptions(layout) { module.exports = createSpikeOptions; -},{"../../../lib/str2rgbarray":708}],780:[function(require,module,exports){ +},{"../../../lib/str2rgbarray":703}],775:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144312,7 +141523,7 @@ function computeTickMarks(scene) { scene.contourLevels = contourLevelsFromTicks(ticks); } -},{"../../../lib":690,"../../../lib/html2unicode":688,"../../cartesian/axes":729}],781:[function(require,module,exports){ +},{"../../../lib":685,"../../../lib/html2unicode":683,"../../cartesian/axes":724}],776:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144346,7 +141557,7 @@ function project(camera, v) { module.exports = project; -},{}],782:[function(require,module,exports){ +},{}],777:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145069,7 +142280,7 @@ proto.setConvert = function() { module.exports = Scene; -},{"../../lib":690,"../../lib/show_no_webgl_msg":706,"../../lib/str2rgbarray":708,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"./camera":771,"./layout/convert":776,"./layout/spikes":779,"./layout/tick_marks":780,"./project":781,"gl-plot3d":212,"webgl-context":550}],783:[function(require,module,exports){ +},{"../../lib":685,"../../lib/show_no_webgl_msg":701,"../../lib/str2rgbarray":703,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"./camera":766,"./layout/convert":771,"./layout/spikes":774,"./layout/tick_marks":775,"./project":776,"gl-plot3d":205,"webgl-context":543}],778:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145262,7 +142473,7 @@ module.exports = { } }; -},{"../components/color/attributes":584,"../lib":690,"./font_attributes":753}],784:[function(require,module,exports){ +},{"../components/color/attributes":577,"../lib":685,"./font_attributes":748}],779:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145292,7 +142503,7 @@ module.exports = { mapOnErrorMsg: 'Mapbox error.' }; -},{}],785:[function(require,module,exports){ +},{}],780:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145366,7 +142577,7 @@ module.exports = function convertTextOpts(textposition, iconSize) { return { anchor: anchor, offset: offset }; }; -},{"../../lib":690}],786:[function(require,module,exports){ +},{"../../lib":685}],781:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145514,7 +142725,7 @@ function findAccessToken(gd, mapboxIds) { return accessToken; } -},{"../../constants/xmlns_namespaces":674,"../plots":792,"./constants":784,"./layout_attributes":788,"./layout_defaults":789,"./mapbox":790,"mapbox-gl":332}],787:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":668,"../plots":787,"./constants":779,"./layout_attributes":783,"./layout_defaults":784,"./mapbox":785,"mapbox-gl":325}],782:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145739,7 +142950,7 @@ module.exports = function createMapboxLayer(mapbox, index, opts) { return mapboxLayer; }; -},{"../../lib":690,"./convert_text_opts":785}],788:[function(require,module,exports){ +},{"../../lib":685,"./convert_text_opts":780}],783:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146007,7 +143218,7 @@ module.exports = { }; -},{"../../components/color":585,"../../lib":690,"../../traces/scatter/attributes":947,"../font_attributes":753}],789:[function(require,module,exports){ +},{"../../components/color":578,"../../lib":685,"../../traces/scatter/attributes":976,"../font_attributes":748}],784:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146103,7 +143314,7 @@ function handleLayerDefaults(containerIn, containerOut) { } } -},{"../../lib":690,"../subplot_defaults":799,"./layout_attributes":788}],790:[function(require,module,exports){ +},{"../../lib":685,"../subplot_defaults":794,"./layout_attributes":783}],785:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146567,7 +143778,7 @@ function convertCenter(center) { return [center.lon, center.lat]; } -},{"../../lib":690,"../cartesian/graph_interact":738,"./constants":784,"./layers":787,"./layout_attributes":788,"mapbox-gl":332}],791:[function(require,module,exports){ +},{"../../lib":685,"../cartesian/graph_interact":733,"./constants":779,"./layers":782,"./layout_attributes":783,"mapbox-gl":325}],786:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146605,7 +143816,7 @@ module.exports = { } }; -},{}],792:[function(require,module,exports){ +},{}],787:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147186,6 +144397,7 @@ plots.cleanPlot = function(newFullData, newFullLayout, oldFullData, oldFullLayou var query = ( '.hm' + oldUid + ',.contour' + oldUid + + ',.carpet' + oldUid + ',#clip' + oldUid + ',.trace' + oldUid ); @@ -147240,6 +144452,7 @@ plots.linkSubplots = function(newFullData, newFullLayout, oldFullData, oldFullLa }; plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) { + var i, fullTrace, trace; var modules = fullLayout._modules = [], basePlotModules = fullLayout._basePlotModules = [], cnt = 0; @@ -147258,9 +144471,12 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) { cnt++; } - for(var i = 0; i < dataIn.length; i++) { - var trace = dataIn[i], - fullTrace = plots.supplyTraceDefaults(trace, cnt, fullLayout, i); + var carpetIndex = {}; + var carpetDependents = []; + + for(i = 0; i < dataIn.length; i++) { + trace = dataIn[i]; + fullTrace = plots.supplyTraceDefaults(trace, cnt, fullLayout, i); fullTrace.index = i; fullTrace._input = trace; @@ -147297,6 +144513,31 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) { pushModule(fullTrace); } + + if(Registry.traceIs(fullTrace, 'carpetAxis')) { + carpetIndex[fullTrace.carpet] = fullTrace; + } + + if(Registry.traceIs(fullTrace, 'carpetDependent')) { + carpetDependents.push(i); + } + } + + for(i = 0; i < carpetDependents.length; i++) { + fullTrace = dataOut[carpetDependents[i]]; + + if(!fullTrace.visible) continue; + + var carpetAxis = carpetIndex[fullTrace.carpet]; + fullTrace._carpet = carpetAxis; + + if(!carpetAxis || !carpetAxis.visible) { + fullTrace.visible = false; + continue; + } + + fullTrace.xaxis = carpetAxis.xaxis; + fullTrace.yaxis = carpetAxis.yaxis; } }; @@ -147419,6 +144660,11 @@ plots.supplyTraceDefaults = function(traceIn, traceOutIndex, layout, traceInInde // gets overwritten in pie, geo and ternary modules coerce('hoverinfo', (layout._dataLength === 1) ? 'x+y+z+text' : undefined); + if(plots.traceIs(traceOut, 'showLegend')) { + coerce('showlegend'); + coerce('legendgroup'); + } + // TODO add per-base-plot-module trace defaults step if(_module) _module.supplyDefaults(traceIn, traceOut, defaultColor, layout); @@ -147431,9 +144677,10 @@ plots.supplyTraceDefaults = function(traceIn, traceOutIndex, layout, traceInInde coerceSubplotAttr('gl2d', 'xaxis'); coerceSubplotAttr('gl2d', 'yaxis'); - if(plots.traceIs(traceOut, 'showLegend')) { - coerce('showlegend'); - coerce('legendgroup'); + if(plots.traceIs(traceOut, 'notLegendIsolatable')) { + // This clears out the legendonly state for traces like carpet that + // cannot be isolated in the legend + traceOut.visible = !!traceOut.visible; } plots.supplyTransformDefaults(traceIn, traceOut, layout); @@ -148730,7 +145977,7 @@ plots.generalUpdatePerTraceModule = function(subplot, subplotCalcData, subplotLa subplot.traceHash = traceHash; }; -},{"../components/color":585,"../components/errorbars":614,"../constants/numerical":672,"../lib":690,"../plotly":724,"../registry":807,"./animation_attributes":725,"./attributes":727,"./command":752,"./font_attributes":753,"./frame_attributes":754,"./layout_attributes":783,"d3":114,"fast-isnumeric":123}],793:[function(require,module,exports){ +},{"../components/color":578,"../components/errorbars":608,"../constants/numerical":666,"../lib":685,"../plotly":719,"../registry":802,"./animation_attributes":720,"./attributes":722,"./command":747,"./font_attributes":748,"./frame_attributes":749,"./layout_attributes":778,"d3":107,"fast-isnumeric":116}],788:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148755,7 +146002,7 @@ module.exports = { } }; -},{"../../traces/scatter/attributes":947}],794:[function(require,module,exports){ +},{"../../traces/scatter/attributes":976}],789:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148905,7 +146152,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../cartesian/layout_attributes":740}],795:[function(require,module,exports){ +},{"../../lib/extend":677,"../cartesian/layout_attributes":735}],790:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148920,7 +146167,7 @@ var Polar = module.exports = require('./micropolar'); Polar.manager = require('./micropolar_manager'); -},{"./micropolar":796,"./micropolar_manager":797}],796:[function(require,module,exports){ +},{"./micropolar":791,"./micropolar_manager":792}],791:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150339,7 +147586,7 @@ var µ = module.exports = { version: '0.2.2' }; return exports; }; -},{"../../lib":690,"d3":114}],797:[function(require,module,exports){ +},{"../../lib":685,"d3":107}],792:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150425,7 +147672,7 @@ manager.fillLayout = function(_gd) { _gd._fullLayout = extendDeepAll(dflts, _gd.layout); }; -},{"../../components/color":585,"../../lib":690,"./micropolar":796,"./undo_manager":798,"d3":114}],798:[function(require,module,exports){ +},{"../../components/color":578,"../../lib":685,"./micropolar":791,"./undo_manager":793,"d3":107}],793:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150491,7 +147738,7 @@ module.exports = function UndoManager() { }; }; -},{}],799:[function(require,module,exports){ +},{}],794:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150566,7 +147813,7 @@ module.exports = function handleSubplotDefaults(layoutIn, layoutOut, fullData, o } }; -},{"../lib":690,"./plots":792}],800:[function(require,module,exports){ +},{"../lib":685,"./plots":787}],795:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150640,7 +147887,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) } }; -},{"../../plots/plots":792,"./layout/attributes":801,"./layout/defaults":804,"./layout/layout_attributes":805,"./ternary":806}],801:[function(require,module,exports){ +},{"../../plots/plots":787,"./layout/attributes":796,"./layout/defaults":799,"./layout/layout_attributes":800,"./ternary":801}],796:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150666,7 +147913,7 @@ module.exports = { } }; -},{}],802:[function(require,module,exports){ +},{}],797:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150731,7 +147978,7 @@ module.exports = { } }; -},{"../../../lib/extend":682,"../../cartesian/layout_attributes":740}],803:[function(require,module,exports){ +},{"../../../lib/extend":677,"../../cartesian/layout_attributes":735}],798:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150815,7 +148062,7 @@ module.exports = function supplyLayoutDefaults(containerIn, containerOut, option } }; -},{"../../../lib":690,"../../cartesian/tick_label_defaults":747,"../../cartesian/tick_mark_defaults":748,"../../cartesian/tick_value_defaults":749,"./axis_attributes":802,"tinycolor2":521}],804:[function(require,module,exports){ +},{"../../../lib":685,"../../cartesian/tick_label_defaults":742,"../../cartesian/tick_mark_defaults":743,"../../cartesian/tick_value_defaults":744,"./axis_attributes":797,"tinycolor2":514}],799:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150878,7 +148125,7 @@ function handleTernaryDefaults(ternaryLayoutIn, ternaryLayoutOut, coerce, option } } -},{"../../../components/color":585,"../../subplot_defaults":799,"./axis_defaults":803,"./layout_attributes":805}],805:[function(require,module,exports){ +},{"../../../components/color":578,"../../subplot_defaults":794,"./axis_defaults":798,"./layout_attributes":800}],800:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150943,7 +148190,7 @@ module.exports = { caxis: ternaryAxesAttrs }; -},{"../../../components/color/attributes":584,"./axis_attributes":802}],806:[function(require,module,exports){ +},{"../../../components/color/attributes":577,"./axis_attributes":797}],801:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151146,6 +148393,7 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { // fictitious angles and domain, but then rotate and translate // it into place at the end var aaxis = _this.aaxis = extendFlat({}, ternaryLayout.aaxis, { + visible: true, range: [amin, sum - bmin - cmin], side: 'left', _counterangle: 30, @@ -151166,6 +148414,7 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { // baxis goes across the bottom (backward). We can set it up as an x axis // without any enclosing transformation. var baxis = _this.baxis = extendFlat({}, ternaryLayout.baxis, { + visible: true, range: [sum - amin - cmin, bmin], side: 'bottom', _counterangle: 30, @@ -151185,6 +148434,7 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { // caxis goes down the right side. Set it up as a y axis, with // post-transformation similar to aaxis var caxis = _this.caxis = extendFlat({}, ternaryLayout.caxis, { + visible: true, range: [sum - amin - bmin, cmin], side: 'right', _counterangle: 30, @@ -151586,7 +148836,7 @@ function removeZoombox(gd) { .remove(); } -},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../components/titles":661,"../../lib":690,"../../lib/extend":682,"../../plotly":724,"../cartesian/axes":729,"../cartesian/constants":734,"../cartesian/graph_interact":738,"../cartesian/select":745,"../cartesian/set_convert":746,"../plots":792,"d3":114,"tinycolor2":521}],807:[function(require,module,exports){ +},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../components/titles":655,"../../lib":685,"../../lib/extend":677,"../../plotly":719,"../cartesian/axes":724,"../cartesian/constants":729,"../cartesian/graph_interact":733,"../cartesian/select":740,"../cartesian/set_convert":741,"../plots":787,"d3":107,"tinycolor2":514}],802:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151777,7 +149027,7 @@ function getTraceType(traceType) { return traceType; } -},{"./lib/loggers":693,"./lib/noop":697,"./lib/push_unique":701,"./plots/attributes":727}],808:[function(require,module,exports){ +},{"./lib/loggers":688,"./lib/noop":692,"./lib/push_unique":696,"./plots/attributes":722}],803:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151850,6 +149100,7 @@ module.exports = function clonePlot(graphObj, options) { var oldLayout = graphObj.layout; var newData = extendDeep([], oldData); var newLayout = extendDeep({}, oldLayout, cloneLayoutOverride(options.tileClass)); + var context = graphObj._context || {}; if(options.width) newLayout.width = options.width; if(options.height) newLayout.height = options.height; @@ -151933,7 +149184,8 @@ module.exports = function clonePlot(graphObj, options) { options.plotGlPixelRatio, displaylogo: options.displaylogo || false, showLink: options.showLink || false, - showTips: options.showTips || false + showTips: options.showTips || false, + mapboxAccessToken: context.mapboxAccessToken } }; @@ -151947,7 +149199,7 @@ module.exports = function clonePlot(graphObj, options) { return plotTile; }; -},{"../lib":690,"../plots/plots":792}],809:[function(require,module,exports){ +},{"../lib":685,"../plots/plots":787}],804:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152013,7 +149265,7 @@ function downloadImage(gd, opts) { module.exports = downloadImage; -},{"../lib":690,"../plot_api/to_image":722,"./filesaver":810}],810:[function(require,module,exports){ +},{"../lib":685,"../plot_api/to_image":717,"./filesaver":805}],805:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152081,7 +149333,7 @@ var fileSaver = function(url, name) { module.exports = fileSaver; -},{}],811:[function(require,module,exports){ +},{}],806:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152114,7 +149366,7 @@ exports.getRedrawFunc = function(gd) { }; }; -},{}],812:[function(require,module,exports){ +},{}],807:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152140,7 +149392,7 @@ var Snapshot = { module.exports = Snapshot; -},{"./cloneplot":808,"./download":809,"./helpers":811,"./svgtoimg":813,"./toimage":814,"./tosvg":815}],813:[function(require,module,exports){ +},{"./cloneplot":803,"./download":804,"./helpers":806,"./svgtoimg":808,"./toimage":809,"./tosvg":810}],808:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152271,7 +149523,7 @@ function svgToImg(opts) { module.exports = svgToImg; -},{"../lib":690,"events":121}],814:[function(require,module,exports){ +},{"../lib":685,"events":114}],809:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152351,7 +149603,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":690,"../plotly":724,"./cloneplot":808,"./helpers":811,"./svgtoimg":813,"./tosvg":815,"events":121}],815:[function(require,module,exports){ +},{"../lib":685,"../plotly":719,"./cloneplot":803,"./helpers":806,"./svgtoimg":808,"./tosvg":810,"events":114}],810:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152470,7 +149722,7 @@ module.exports = function toSVG(gd, format) { return s; }; -},{"../components/color":585,"../components/drawing":608,"../constants/xmlns_namespaces":674,"../lib/svg_text_utils":709,"d3":114}],816:[function(require,module,exports){ +},{"../components/color":578,"../components/drawing":602,"../constants/xmlns_namespaces":668,"../lib/svg_text_utils":704,"d3":107}],811:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152503,7 +149755,7 @@ module.exports = function arraysToCalcdata(cd, trace) { } }; -},{"../../lib":690}],817:[function(require,module,exports){ +},{"../../lib":685}],812:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152653,7 +149905,7 @@ module.exports = { } }; -},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/errorbars/attributes":610,"../../lib/extend":682,"../../plots/font_attributes":753,"../scatter/attributes":947}],818:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/errorbars/attributes":604,"../../lib/extend":677,"../../plots/font_attributes":748,"../scatter/attributes":976}],813:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152746,7 +149998,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"../../plots/cartesian/axes":729,"./arrays_to_calcdata":816,"fast-isnumeric":123}],819:[function(require,module,exports){ +},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"../../plots/cartesian/axes":724,"./arrays_to_calcdata":811,"fast-isnumeric":116}],814:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152806,7 +150058,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, Color.defaultLine, {axis: 'x', inherit: 'y'}); }; -},{"../../components/color":585,"../../components/errorbars/defaults":613,"../../lib":690,"../bar/style_defaults":828,"../scatter/xy_defaults":969,"./attributes":817}],820:[function(require,module,exports){ +},{"../../components/color":578,"../../components/errorbars/defaults":607,"../../lib":685,"../bar/style_defaults":823,"../scatter/xy_defaults":998,"./attributes":812}],815:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152918,7 +150170,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return [pointData]; }; -},{"../../components/color":585,"../../components/errorbars":614,"../../plots/cartesian/graph_interact":738}],821:[function(require,module,exports){ +},{"../../components/color":578,"../../components/errorbars":608,"../../plots/cartesian/graph_interact":733}],816:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152959,7 +150211,7 @@ Bar.meta = { module.exports = Bar; -},{"../../plots/cartesian":739,"../scatter/colorbar":950,"./arrays_to_calcdata":816,"./attributes":817,"./calc":818,"./defaults":819,"./hover":820,"./layout_attributes":822,"./layout_defaults":823,"./plot":824,"./set_positions":825,"./style":827}],822:[function(require,module,exports){ +},{"../../plots/cartesian":734,"../scatter/colorbar":979,"./arrays_to_calcdata":811,"./attributes":812,"./calc":813,"./defaults":814,"./hover":815,"./layout_attributes":817,"./layout_defaults":818,"./plot":819,"./set_positions":820,"./style":822}],817:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153024,7 +150276,7 @@ module.exports = { } }; -},{}],823:[function(require,module,exports){ +},{}],818:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153082,7 +150334,7 @@ module.exports = function(layoutIn, layoutOut, fullData) { coerce('bargroupgap'); }; -},{"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807,"./layout_attributes":822}],824:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"./layout_attributes":817}],819:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153602,7 +150854,7 @@ function coerceColor(attributeDefinition, value, defaultValue) { attributeDefinition.dflt; } -},{"../../components/color":585,"../../components/drawing":608,"../../components/errorbars":614,"../../lib":690,"../../lib/svg_text_utils":709,"./attributes":817,"d3":114,"fast-isnumeric":123,"tinycolor2":521}],825:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"../../components/errorbars":608,"../../lib":685,"../../lib/svg_text_utils":704,"./attributes":812,"d3":107,"fast-isnumeric":116,"tinycolor2":514}],820:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154202,7 +151454,7 @@ function getAxisLetter(ax) { return ax._id.charAt(0); } -},{"../../constants/numerical":672,"../../plots/cartesian/axes":729,"../../registry":807,"./sieve.js":826,"fast-isnumeric":123}],826:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../plots/cartesian/axes":724,"../../registry":802,"./sieve.js":821,"fast-isnumeric":116}],821:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154304,7 +151556,7 @@ Sieve.prototype.getLabel = function getLabel(position, value) { return prefix + label; }; -},{"../../constants/numerical":672,"../../lib":690}],827:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685}],822:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154382,7 +151634,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/color":585,"../../components/drawing":608,"../../components/errorbars":614,"d3":114}],828:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"../../components/errorbars":608,"d3":107}],823:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154419,7 +151671,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, default coerce('marker.line.width'); }; -},{"../../components/color":585,"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598}],829:[function(require,module,exports){ +},{"../../components/color":578,"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591}],824:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154599,7 +151851,7 @@ module.exports = { fillcolor: scatterAttrs.fillcolor }; -},{"../../components/color/attributes":584,"../../lib/extend":682,"../scatter/attributes":947}],830:[function(require,module,exports){ +},{"../../components/color/attributes":577,"../../lib/extend":677,"../scatter/attributes":976}],825:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154748,7 +152000,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../lib":690,"../../plots/cartesian/axes":729,"fast-isnumeric":123}],831:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"fast-isnumeric":116}],826:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154821,7 +152073,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/color":585,"../../lib":690,"../../registry":807,"./attributes":829}],832:[function(require,module,exports){ +},{"../../components/color":578,"../../lib":685,"../../registry":802,"./attributes":824}],827:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154930,7 +152182,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return closeData; }; -},{"../../components/color":585,"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738}],833:[function(require,module,exports){ +},{"../../components/color":578,"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733}],828:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154976,7 +152228,7 @@ Box.meta = { module.exports = Box; -},{"../../plots/cartesian":739,"./attributes":829,"./calc":830,"./defaults":831,"./hover":832,"./layout_attributes":834,"./layout_defaults":835,"./plot":836,"./set_positions":837,"./style":838}],834:[function(require,module,exports){ +},{"../../plots/cartesian":734,"./attributes":824,"./calc":825,"./defaults":826,"./hover":827,"./layout_attributes":829,"./layout_defaults":830,"./plot":831,"./set_positions":832,"./style":833}],829:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155027,7 +152279,7 @@ module.exports = { } }; -},{}],835:[function(require,module,exports){ +},{}],830:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155061,7 +152313,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { coerce('boxgroupgap'); }; -},{"../../lib":690,"../../registry":807,"./layout_attributes":834}],836:[function(require,module,exports){ +},{"../../lib":685,"../../registry":802,"./layout_attributes":829}],831:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155301,7 +152553,7 @@ module.exports = function plot(gd, plotinfo, cdbox) { }); }; -},{"../../components/drawing":608,"../../lib":690,"d3":114}],837:[function(require,module,exports){ +},{"../../components/drawing":602,"../../lib":685,"d3":107}],832:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155395,7 +152647,7 @@ module.exports = function setPositions(gd, plotinfo) { } }; -},{"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807}],838:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802}],833:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155434,7 +152686,7 @@ module.exports = function style(gd) { }); }; -},{"../../components/color":585,"../../components/drawing":608,"d3":114}],839:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"d3":107}],834:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155492,7 +152744,7 @@ module.exports = { whiskerwidth: Lib.extendFlat({}, boxAttrs.whiskerwidth, { dflt: 0 }) }; -},{"../../lib":690,"../box/attributes":829,"../ohlc/attributes":905}],840:[function(require,module,exports){ +},{"../../lib":685,"../box/attributes":824,"../ohlc/attributes":943}],835:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155540,7 +152792,7 @@ function handleDirection(traceIn, traceOut, coerce, direction) { coerce(direction + '.fillcolor'); } -},{"../../lib":690,"../ohlc/direction_defaults":907,"../ohlc/helpers":908,"../ohlc/ohlc_defaults":910,"./attributes":839}],841:[function(require,module,exports){ +},{"../../lib":685,"../ohlc/direction_defaults":945,"../ohlc/helpers":946,"../ohlc/ohlc_defaults":948,"./attributes":834}],836:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155582,7 +152834,7 @@ module.exports = { register(require('../box')); register(require('./transform')); -},{"../../plot_api/register":719,"../../plots/cartesian":739,"../box":833,"./attributes":839,"./defaults":840,"./transform":842}],842:[function(require,module,exports){ +},{"../../plot_api/register":714,"../../plots/cartesian":734,"../box":828,"./attributes":834,"./defaults":835,"./transform":837}],837:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155710,7 +152962,3577 @@ exports.calcTransform = function calcTransform(gd, trace, opts) { trace.y = y; }; -},{"../../lib":690,"../ohlc/helpers":908}],843:[function(require,module,exports){ +},{"../../lib":685,"../ohlc/helpers":946}],838:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var handleAxisDefaults = require('./axis_defaults'); + +module.exports = function handleABDefaults(traceIn, traceOut, fullLayout, coerce, dfltColor) { + var a = coerce('a'); + + if(!a) { + coerce('da'); + coerce('a0'); + } + + var b = coerce('b'); + + if(!b) { + coerce('db'); + coerce('b0'); + } + + mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor); + + return; +}; + +function mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor) { + var axesList = ['aaxis', 'baxis']; + + axesList.forEach(function(axName) { + var axLetter = axName.charAt(0); + var axIn = traceIn[axName] || {}; + var axOut = {}; + + var defaultOptions = { + tickfont: 'x', + id: axLetter + 'axis', + letter: axLetter, + font: traceOut.font, + name: axName, + data: traceIn[axLetter], + calendar: traceOut.calendar, + dfltColor: dfltColor, + bgColor: fullLayout.paper_bgcolor, + fullLayout: fullLayout + }; + + handleAxisDefaults(axIn, axOut, defaultOptions); + + axOut._categories = axOut._categories || []; + + traceOut[axName] = axOut; + + // so we don't have to repeat autotype unnecessarily, + // copy an autotype back to traceIn + if(!traceIn[axName] && axIn.type !== '-') { + traceIn[axName] = {type: axIn.type}; + } + }); +} + +},{"./axis_defaults":843}],839:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = function(a) { + return minMax(a, 0); +}; + +function minMax(a, depth) { + // Limit to ten dimensional datasets. This seems *exceedingly* unlikely to + // ever cause problems or even be a concern. It's include strictly so that + // circular arrays could never cause this to loop. + if(!Array.isArray(a) || depth >= 10) { + return null; + } + + var min = Infinity; + var max = -Infinity; + var n = a.length; + for(var i = 0; i < n; i++) { + var datum = a[i]; + + if(Array.isArray(datum)) { + var result = minMax(datum, depth + 1); + + if(result) { + min = Math.min(result[0], min); + max = Math.max(result[1], max); + } + } else { + min = Math.min(datum, min); + max = Math.max(datum, max); + } + } + + return [min, max]; +} + +},{}],840:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var extendFlat = require('../../lib/extend').extendFlat; +var fontAttrs = require('../../plots/font_attributes'); +var axisAttrs = require('./axis_attributes'); +var colorAttrs = require('../../components/color/attributes'); + +module.exports = { + carpet: { + valType: 'string', + role: 'info', + description: [ + 'An identifier for this carpet, so that `scattercarpet` and', + '`scattercontour` traces can specify a carpet plot on which', + 'they lie' + ].join(' ') + }, + x: { + valType: 'data_array', + description: [ + 'A two dimensional array of x coordinates at each carpet point.', + 'If ommitted, the plot is a cheater plot and the xaxis is hidden', + 'by default.' + ].join(' ') + }, + y: { + valType: 'data_array', + description: 'A two dimensional array of y coordinates at each carpet point.' + }, + a: { + valType: 'data_array', + description: [ + 'An array containing values of the first parameter value' + ].join(' ') + }, + a0: { + valType: 'number', + dflt: 0, + role: 'info', + description: [ + 'Alternate to `a`.', + 'Builds a linear space of a coordinates.', + 'Use with `da`', + 'where `a0` is the starting coordinate and `da` the step.' + ].join(' ') + }, + da: { + valType: 'number', + dflt: 1, + role: 'info', + description: [ + 'Sets the a coordinate step.', + 'See `a0` for more info.' + ].join(' ') + }, + b: { + valType: 'data_array', + description: 'A two dimensional array of y coordinates at each carpet point.' + }, + b0: { + valType: 'number', + dflt: 0, + role: 'info', + description: [ + 'Alternate to `b`.', + 'Builds a linear space of a coordinates.', + 'Use with `db`', + 'where `b0` is the starting coordinate and `db` the step.' + ].join(' ') + }, + db: { + valType: 'number', + dflt: 1, + role: 'info', + description: [ + 'Sets the b coordinate step.', + 'See `b0` for more info.' + ].join(' ') + }, + cheaterslope: { + valType: 'number', + role: 'info', + dflt: 1, + description: [ + 'The shift applied to each successive row of data in creating a cheater plot.', + 'Only used if `x` is been ommitted.' + ].join(' ') + }, + aaxis: extendFlat({}, axisAttrs), + baxis: extendFlat({}, axisAttrs), + font: { + family: extendFlat({}, fontAttrs.family, { + dflt: '"Open Sans", verdana, arial, sans-serif' + }), + size: extendFlat({}, fontAttrs.size, { + dflt: 12 + }), + color: extendFlat({}, fontAttrs.color, { + dflt: colorAttrs.defaultLine + }), + }, + color: { + valType: 'color', + dflt: colorAttrs.defaultLine, + role: 'style', + description: [ + 'Sets default for all colors associated with this axis', + 'all at once: line, font, tick, and grid colors.', + 'Grid color is lightened by blending this with the plot background', + 'Individual pieces can override this.' + ].join(' ') + }, +}; + +},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/font_attributes":748,"./axis_attributes":842}],841:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* This function retrns a set of control points that define a curve aligned along + * either the a or b axis. Exactly one of a or b must be an array defining the range + * spanned. + * + * Honestly this is the most complicated function I've implemente here so far because + * of the way it handles knot insertion and direction/axis-agnostic slices. + */ +module.exports = function(carpet, carpetcd, a, b) { + var idx, tangent, tanIsoIdx, tanIsoPar, segment, refidx; + var p0, p1, v0, v1, start, end, range; + + var axis = Array.isArray(a) ? 'a' : 'b'; + var ax = axis === 'a' ? carpet.aaxis : carpet.baxis; + var smoothing = ax.smoothing; + var toIdx = axis === 'a' ? carpet.a2i : carpet.b2j; + var pt = axis === 'a' ? a : b; + var iso = axis === 'a' ? b : a; + var n = axis === 'a' ? carpetcd.a.length : carpetcd.b.length; + var m = axis === 'a' ? carpetcd.b.length : carpetcd.a.length; + var isoIdx = Math.floor(axis === 'a' ? carpet.b2j(iso) : carpet.a2i(iso)); + + var xy = axis === 'a' ? function(value) { + return carpet.evalxy([], value, isoIdx); + } : function(value) { + return carpet.evalxy([], isoIdx, value); + }; + + if(smoothing) { + tanIsoIdx = Math.max(0, Math.min(m - 2, isoIdx)); + tanIsoPar = isoIdx - tanIsoIdx; + tangent = axis === 'a' ? function(i, ti) { + return carpet.dxydi([], i, tanIsoIdx, ti, tanIsoPar); + } : function(j, tj) { + return carpet.dxydj([], tanIsoIdx, j, tanIsoPar, tj); + }; + } + + var vstart = toIdx(pt[0]); + var vend = toIdx(pt[1]); + + // So that we can make this work in two directions, flip all of the + // math functions if the direction is from higher to lower indices: + // + // Note that the tolerance is directional! + var dir = vstart < vend ? 1 : -1; + var tol = (vend - vstart) * 1e-8; + var dirfloor = dir > 0 ? Math.floor : Math.ceil; + var dirceil = dir > 0 ? Math.ceil : Math.floor; + var dirmin = dir > 0 ? Math.min : Math.max; + var dirmax = dir > 0 ? Math.max : Math.min; + + var idx0 = dirfloor(vstart + tol); + var idx1 = dirceil(vend - tol); + + p0 = xy(vstart); + var segments = [[p0]]; + + for(idx = idx0; idx * dir < idx1 * dir; idx += dir) { + segment = []; + start = dirmax(vstart, idx); + end = dirmin(vend, idx + dir); + range = end - start; + + // In order to figure out which cell we're in for the derivative (remember, + // the derivatives are *not* constant across grid lines), let's just average + // the start and end points. This cuts out just a tiny bit of logic and + // there's really no computational difference: + refidx = Math.max(0, Math.min(n - 2, Math.floor(0.5 * (start + end)))); + + p1 = xy(end); + if(smoothing) { + v0 = tangent(refidx, start - refidx); + v1 = tangent(refidx, end - refidx); + + segment.push([ + p0[0] + v0[0] / 3 * range, + p0[1] + v0[1] / 3 * range + ]); + + segment.push([ + p1[0] - v1[0] / 3 * range, + p1[1] - v1[1] / 3 * range + ]); + } + + segment.push(p1); + + segments.push(segment); + p0 = p1; + } + + return segments; +}; + +},{}],842:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var extendFlat = require('../../lib/extend').extendFlat; +var fontAttrs = require('../../plots/font_attributes'); +var colorAttrs = require('../../components/color/attributes'); + +module.exports = { + color: { + valType: 'color', + role: 'style', + description: [ + 'Sets default for all colors associated with this axis', + 'all at once: line, font, tick, and grid colors.', + 'Grid color is lightened by blending this with the plot background', + 'Individual pieces can override this.' + ].join(' ') + }, + smoothing: { + valType: 'number', + dflt: 1, + min: 0, + max: 1.3, + role: 'info' + }, + title: { + valType: 'string', + role: 'info', + description: 'Sets the title of this axis.' + }, + titlefont: extendFlat({}, fontAttrs, { + description: [ + 'Sets this axis\' title font.' + ].join(' ') + }), + titleoffset: { + valType: 'number', + role: 'info', + dflt: 10, + description: [ + 'An additional amount by which to offset the title from the tick', + 'labels, given in pixels' + ].join(' '), + }, + type: { + valType: 'enumerated', + // '-' means we haven't yet run autotype or couldn't find any data + // it gets turned into linear in gd._fullLayout but not copied back + // to gd.data like the others are. + values: ['-', 'linear', 'date', 'category'], + dflt: '-', + role: 'info', + description: [ + 'Sets the axis type.', + 'By default, plotly attempts to determined the axis type', + 'by looking into the data of the traces that referenced', + 'the axis in question.' + ].join(' ') + }, + autorange: { + valType: 'enumerated', + values: [true, false, 'reversed'], + dflt: true, + role: 'style', + description: [ + 'Determines whether or not the range of this axis is', + 'computed in relation to the input data.', + 'See `rangemode` for more info.', + 'If `range` is provided, then `autorange` is set to *false*.' + ].join(' ') + }, + rangemode: { + valType: 'enumerated', + values: ['normal', 'tozero', 'nonnegative'], + dflt: 'normal', + role: 'style', + description: [ + 'If *normal*, the range is computed in relation to the extrema', + 'of the input data.', + 'If *tozero*`, the range extends to 0,', + 'regardless of the input data', + 'If *nonnegative*, the range is non-negative,', + 'regardless of the input data.' + ].join(' ') + }, + range: { + valType: 'info_array', + role: 'info', + items: [ + {valType: 'any'}, + {valType: 'any'} + ], + description: [ + 'Sets the range of this axis.', + 'If the axis `type` is *log*, then you must take the log of your', + 'desired range (e.g. to set the range from 1 to 100,', + 'set the range from 0 to 2).', + 'If the axis `type` is *date*, it should be date strings,', + 'like date data, though Date objects and unix milliseconds', + 'will be accepted and converted to strings.', + 'If the axis `type` is *category*, it should be numbers,', + 'using the scale where each category is assigned a serial', + 'number from zero in the order it appears.' + ].join(' ') + }, + + fixedrange: { + valType: 'boolean', + dflt: false, + role: 'info', + description: [ + 'Determines whether or not this axis is zoom-able.', + 'If true, then zoom is disabled.' + ].join(' ') + }, + cheatertype: { + valType: 'enumerated', + values: ['index', 'value'], + dflt: 'value', + role: 'info' + }, + tickmode: { + valType: 'enumerated', + values: ['linear', 'array'], + dflt: 'array', + role: 'info', + }, + nticks: { + valType: 'integer', + min: 0, + dflt: 0, + role: 'style', + description: [ + 'Specifies the maximum number of ticks for the particular axis.', + 'The actual number of ticks will be chosen automatically to be', + 'less than or equal to `nticks`.', + 'Has an effect only if `tickmode` is set to *auto*.' + ].join(' ') + }, + tickvals: { + valType: 'data_array', + description: [ + 'Sets the values at which ticks on this axis appear.', + 'Only has an effect if `tickmode` is set to *array*.', + 'Used with `ticktext`.' + ].join(' ') + }, + ticktext: { + valType: 'data_array', + description: [ + 'Sets the text displayed at the ticks position via `tickvals`.', + 'Only has an effect if `tickmode` is set to *array*.', + 'Used with `tickvals`.' + ].join(' ') + }, + showticklabels: { + valType: 'enumerated', + values: ['start', 'end', 'both', 'none'], + dflt: 'start', + role: 'style', + description: [ + 'Determines whether axis labels are drawn on the low side,', + 'the high side, both, or neither side of the axis.' + ].join(' ') + }, + tickfont: extendFlat({}, fontAttrs, { + description: 'Sets the tick font.' + }), + tickangle: { + valType: 'angle', + dflt: 'auto', + role: 'style', + description: [ + 'Sets the angle of the tick labels with respect to the horizontal.', + 'For example, a `tickangle` of -90 draws the tick labels', + 'vertically.' + ].join(' ') + }, + tickprefix: { + valType: 'string', + dflt: '', + role: 'style', + description: 'Sets a tick label prefix.' + }, + showtickprefix: { + valType: 'enumerated', + values: ['all', 'first', 'last', 'none'], + dflt: 'all', + role: 'style', + description: [ + 'If *all*, all tick labels are displayed with a prefix.', + 'If *first*, only the first tick is displayed with a prefix.', + 'If *last*, only the last tick is displayed with a suffix.', + 'If *none*, tick prefixes are hidden.' + ].join(' ') + }, + ticksuffix: { + valType: 'string', + dflt: '', + role: 'style', + description: 'Sets a tick label suffix.' + }, + showticksuffix: { + valType: 'enumerated', + values: ['all', 'first', 'last', 'none'], + dflt: 'all', + role: 'style', + description: 'Same as `showtickprefix` but for tick suffixes.' + }, + showexponent: { + valType: 'enumerated', + values: ['all', 'first', 'last', 'none'], + dflt: 'all', + role: 'style', + description: [ + 'If *all*, all exponents are shown besides their significands.', + 'If *first*, only the exponent of the first tick is shown.', + 'If *last*, only the exponent of the last tick is shown.', + 'If *none*, no exponents appear.' + ].join(' ') + }, + exponentformat: { + valType: 'enumerated', + values: ['none', 'e', 'E', 'power', 'SI', 'B'], + dflt: 'B', + role: 'style', + description: [ + 'Determines a formatting rule for the tick exponents.', + 'For example, consider the number 1,000,000,000.', + 'If *none*, it appears as 1,000,000,000.', + 'If *e*, 1e+9.', + 'If *E*, 1E+9.', + 'If *power*, 1x10^9 (with 9 in a super script).', + 'If *SI*, 1G.', + 'If *B*, 1B.' + ].join(' ') + }, + separatethousands: { + valType: 'boolean', + dflt: false, + role: 'style', + description: [ + 'If "true", even 4-digit integers are separated' + ].join(' ') + }, + tickformat: { + valType: 'string', + dflt: '', + role: 'style', + description: [ + 'Sets the tick label formatting rule using d3 formatting mini-languages', + 'which are very similar to those in Python. For numbers, see:', + 'https://github.com/d3/d3-format/blob/master/README.md#locale_format', + 'And for dates see:', + 'https://github.com/d3/d3-time-format/blob/master/README.md#locale_format', + 'We add one item to d3\'s date formatter: *%{n}f* for fractional seconds', + 'with n digits. For example, *2016-10-13 09:15:23.456* with tickformat', + '*%H~%M~%S.%2f* would display *09~15~23.46*' + ].join(' ') + }, + categoryorder: { + valType: 'enumerated', + values: [ + 'trace', 'category ascending', 'category descending', 'array' + /* , 'value ascending', 'value descending'*/ // value ascending / descending to be implemented later + ], + dflt: 'trace', + role: 'info', + description: [ + 'Specifies the ordering logic for the case of categorical variables.', + 'By default, plotly uses *trace*, which specifies the order that is present in the data supplied.', + 'Set `categoryorder` to *category ascending* or *category descending* if order should be determined by', + 'the alphanumerical order of the category names.', + /* 'Set `categoryorder` to *value ascending* or *value descending* if order should be determined by the', + 'numerical order of the values.',*/ // // value ascending / descending to be implemented later + 'Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category', + 'is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to', + 'the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.' + ].join(' ') + }, + categoryarray: { + valType: 'data_array', + role: 'info', + description: [ + 'Sets the order in which categories on this axis appear.', + 'Only has an effect if `categoryorder` is set to *array*.', + 'Used with `categoryorder`.' + ].join(' ') + }, + labelpadding: { + valType: 'integer', + role: 'style', + dflt: 10, + description: 'Extra padding between label and the axis' + }, + labelprefix: { + valType: 'string', + role: 'style', + description: 'Sets a axis label prefix.' + }, + labelsuffix: { + valType: 'string', + dflt: '', + role: 'style', + description: 'Sets a axis label suffix.' + }, + // lines and grids + showline: { + valType: 'boolean', + dflt: false, + role: 'style', + description: [ + 'Determines whether or not a line bounding this axis is drawn.' + ].join(' ') + }, + linecolor: { + valType: 'color', + dflt: colorAttrs.defaultLine, + role: 'style', + description: 'Sets the axis line color.' + }, + linewidth: { + valType: 'number', + min: 0, + dflt: 1, + role: 'style', + description: 'Sets the width (in px) of the axis line.' + }, + gridcolor: { + valType: 'color', + role: 'style', + description: 'Sets the axis line color.' + }, + gridwidth: { + valType: 'number', + min: 0, + dflt: 1, + role: 'style', + description: 'Sets the width (in px) of the axis line.' + }, + showgrid: { + valType: 'boolean', + role: 'style', + dflt: true, + description: [ + 'Determines whether or not grid lines are drawn.', + 'If *true*, the grid lines are drawn at every tick mark.' + ].join(' ') + }, + minorgridcount: { + valType: 'integer', + min: 0, + dflt: 0, + role: 'info', + description: 'Sets the number of minor grid ticks per major grid tick' + }, + minorgridwidth: { + valType: 'number', + min: 0, + dflt: 1, + role: 'style', + description: 'Sets the width (in px) of the grid lines.' + }, + minorgridcolor: { + valType: 'color', + dflt: colorAttrs.lightLine, + role: 'style', + description: 'Sets the color of the grid lines.' + }, + startline: { + valType: 'boolean', + role: 'style', + description: [ + 'Determines whether or not a line is drawn at along the starting value', + 'of this axis.', + 'If *true*, the start line is drawn on top of the grid lines.' + ].join(' ') + }, + startlinecolor: { + valType: 'color', + role: 'style', + description: 'Sets the line color of the start line.' + }, + startlinewidth: { + valType: 'number', + dflt: 1, + role: 'style', + description: 'Sets the width (in px) of the start line.' + }, + endline: { + valType: 'boolean', + role: 'style', + description: [ + 'Determines whether or not a line is drawn at along the final value', + 'of this axis.', + 'If *true*, the end line is drawn on top of the grid lines.' + ].join(' ') + }, + endlinewidth: { + valType: 'number', + dflt: 1, + role: 'style', + description: 'Sets the width (in px) of the end line.' + }, + endlinecolor: { + valType: 'color', + role: 'style', + description: 'Sets the line color of the end line.' + }, + tick0: { + valType: 'number', + min: 0, + dflt: 0, + role: 'info', + description: 'The starting index of grid lines along the axis' + }, + dtick: { + valType: 'number', + min: 0, + dflt: 1, + role: 'info', + description: 'The stride between grid lines along the axis' + }, + arraytick0: { + valType: 'integer', + min: 0, + dflt: 0, + role: 'info', + description: 'The starting index of grid lines along the axis' + }, + arraydtick: { + valType: 'integer', + min: 1, + dflt: 1, + role: 'info', + description: 'The stride between grid lines along the axis' + }, +}; + +},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/font_attributes":748}],843:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var carpetAttrs = require('./attributes'); + +var addOpacity = require('../../components/color').addOpacity; +var Registry = require('../../registry'); +var Lib = require('../../lib'); +var handleTickValueDefaults = require('../../plots/cartesian/tick_value_defaults'); +var handleTickLabelDefaults = require('../../plots/cartesian/tick_label_defaults'); +var handleCategoryOrderDefaults = require('../../plots/cartesian/category_order_defaults'); +var setConvert = require('../../plots/cartesian/set_convert'); +var orderedCategories = require('../../plots/cartesian/ordered_categories'); +var autoType = require('../../plots/cartesian/axis_autotype'); + +/** + * options: object containing: + * + * letter: 'x' or 'y' + * title: name of the axis (ie 'Colorbar') to go in default title + * name: axis object name (ie 'xaxis') if one should be stored + * font: the default font to inherit + * outerTicks: boolean, should ticks default to outside? + * showGrid: boolean, should gridlines be shown by default? + * noHover: boolean, this axis doesn't support hover effects? + * data: the plot data to use in choosing auto type + * bgColor: the plot background color, to calculate default gridline colors + */ +module.exports = function handleAxisDefaults(containerIn, containerOut, options) { + var letter = options.letter, + font = options.font || {}, + attributes = carpetAttrs[letter + 'axis']; + + options.noHover = true; + + function coerce(attr, dflt) { + return Lib.coerce(containerIn, containerOut, attributes, attr, dflt); + } + + function coerce2(attr, dflt) { + return Lib.coerce2(containerIn, containerOut, attributes, attr, dflt); + } + + // set up some private properties + if(options.name) { + containerOut._name = options.name; + containerOut._id = options.name; + } + + // now figure out type and do some more initialization + var axType = coerce('type'); + if(axType === '-') { + if(options.data) setAutoType(containerOut, options.data); + + if(containerOut.type === '-') { + containerOut.type = 'linear'; + } + else { + // copy autoType back to input axis + // note that if this object didn't exist + // in the input layout, we have to put it in + // this happens in the main supplyDefaults function + axType = containerIn.type = containerOut.type; + } + } + + coerce('smoothing'); + coerce('cheatertype'); + + coerce('showticklabels'); + coerce('labelprefix', letter + ' = '); + coerce('labelsuffix'); + coerce('showtickprefix'); + coerce('showticksuffix'); + + coerce('separatethousands'); + coerce('tickformat'); + coerce('exponentformat'); + coerce('showexponent'); + coerce('categoryorder'); + + coerce('tickmode'); + coerce('tickvals'); + coerce('ticktext'); + coerce('tick0'); + coerce('dtick'); + + if(containerOut.tickmode === 'array') { + coerce('arraytick0'); + coerce('arraydtick'); + } + + coerce('labelpadding'); + + containerOut._hovertitle = letter; + + + if(axType === 'date') { + var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleDefaults'); + handleCalendarDefaults(containerIn, containerOut, 'calendar', options.calendar); + } + + setConvert(containerOut, options.fullLayout); + + var dfltColor = coerce('color', options.dfltColor); + // if axis.color was provided, use it for fonts too; otherwise, + // inherit from global font color in case that was provided. + var dfltFontColor = (dfltColor === containerIn.color) ? dfltColor : font.color; + + coerce('title'); + Lib.coerceFont(coerce, 'titlefont', { + family: font.family, + size: Math.round(font.size * 1.2), + color: dfltFontColor + }); + + coerce('titleoffset'); + + coerce('tickangle'); + + var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range)); + + if(autoRange) coerce('rangemode'); + + coerce('range'); + containerOut.cleanRange(); + + coerce('fixedrange'); + + handleTickValueDefaults(containerIn, containerOut, coerce, axType); + handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options); + handleCategoryOrderDefaults(containerIn, containerOut, coerce); + + var gridColor = coerce2('gridcolor', addOpacity(dfltColor, 0.3)); + var gridWidth = coerce2('gridwidth'); + var showGrid = coerce('showgrid'); + + if(!showGrid) { + delete containerOut.gridcolor; + delete containerOut.gridwidth; + } + + var startLineColor = coerce2('startlinecolor', dfltColor); + var startLineWidth = coerce2('startlinewidth', gridWidth); + var showStartLine = coerce('startline', containerOut.showgrid || !!startLineColor || !!startLineWidth); + + if(!showStartLine) { + delete containerOut.startlinecolor; + delete containerOut.startlinewidth; + } + + var endLineColor = coerce2('endlinecolor', dfltColor); + var endLineWidth = coerce2('endlinewidth', gridWidth); + var showEndLine = coerce('endline', containerOut.showgrid || !!endLineColor || !!endLineWidth); + + if(!showEndLine) { + delete containerOut.endlinecolor; + delete containerOut.endlinewidth; + } + + if(!showGrid) { + delete containerOut.gridcolor; + delete containerOut.gridWidth; + } else { + coerce('minorgridcount'); + coerce('minorgridwidth', gridWidth); + coerce('minorgridcolor', addOpacity(gridColor, 0.06)); + + if(!containerOut.minorgridcount) { + delete containerOut.minorgridwidth; + delete containerOut.minorgridcolor; + } + } + + containerOut._separators = options.fullLayout.separators; + + // fill in categories + containerOut._initialCategories = axType === 'category' ? + orderedCategories(letter, containerOut.categoryorder, containerOut.categoryarray, options.data) : + []; + + if(containerOut.showticklabels === 'none') { + delete containerOut.tickfont; + delete containerOut.tickangle; + delete containerOut.showexponent; + delete containerOut.exponentformat; + delete containerOut.tickformat; + delete containerOut.showticksuffix; + delete containerOut.showtickprefix; + } + + if(!containerOut.showticksuffix) { + delete containerOut.ticksuffix; + } + + if(!containerOut.showtickprefix) { + delete containerOut.tickprefix; + } + + // It needs to be coerced, then something above overrides this deep in the axis code, + // but no, we *actually* want to coerce this. + coerce('tickmode'); + + if(!containerOut.title || (containerOut.title && containerOut.title.length === 0)) { + delete containerOut.titlefont; + delete containerOut.titleoffset; + } + + return containerOut; +}; + +function setAutoType(ax, data) { + // new logic: let people specify any type they want, + // only autotype if type is '-' + if(ax.type !== '-') return; + + var id = ax._id, + axLetter = id.charAt(0); + + var calAttr = axLetter + 'calendar', + calendar = ax[calAttr]; + + ax.type = autoType(data, calendar); +} + +},{"../../components/color":578,"../../lib":685,"../../plots/cartesian/axis_autotype":725,"../../plots/cartesian/category_order_defaults":728,"../../plots/cartesian/ordered_categories":737,"../../plots/cartesian/set_convert":741,"../../plots/cartesian/tick_label_defaults":742,"../../plots/cartesian/tick_value_defaults":744,"../../registry":802,"./attributes":840}],844:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Axes = require('../../plots/cartesian/axes'); +var cheaterBasis = require('./cheater_basis'); +var arrayMinmax = require('./array_minmax'); +var map2dArray = require('./map_2d_array'); +var calcGridlines = require('./calc_gridlines'); +var calcLabels = require('./calc_labels'); +var calcClipPath = require('./calc_clippath'); +var clean2dArray = require('../heatmap/clean_2d_array'); +var smoothFill2dArray = require('./smooth_fill_2d_array'); + +module.exports = function calc(gd, trace) { + var xa = Axes.getFromId(gd, trace.xaxis || 'x'); + var ya = Axes.getFromId(gd, trace.yaxis || 'y'); + var aax = trace.aaxis; + var bax = trace.baxis; + var a = trace._a = trace.a; + var b = trace._b = trace.b; + + var t = {}; + var x; + var y = trace.y; + + if(trace._cheater) { + var avals = aax.cheatertype === 'index' ? a.length : a; + var bvals = bax.cheatertype === 'index' ? b.length : b; + trace.x = x = cheaterBasis(avals, bvals, trace.cheaterslope); + } else { + x = trace.x; + } + + trace._x = trace.x = x = clean2dArray(x); + trace._y = trace.y = y = clean2dArray(y); + + // Fill in any undefined values with elliptic smoothing. This doesn't take + // into account the spacing of the values. That is, the derivatives should + // be modified to use a and b values. It's not that hard, but this is already + // moderate overkill for just filling in missing values. + smoothFill2dArray(x, a, b); + smoothFill2dArray(y, a, b); + + // create conversion functions that depend on the data + trace.setScale(); + + // Convert cartesian-space x/y coordinates to screen space pixel coordinates: + t.xp = trace.xp = map2dArray(trace.xp, x, xa.c2p); + t.yp = trace.yp = map2dArray(trace.yp, y, ya.c2p); + + // This is a rather expensive scan. Nothing guarantees monotonicity, + // so we need to scan through all data to get proper ranges: + var xrange = arrayMinmax(x); + var yrange = arrayMinmax(y); + + var dx = 0.5 * (xrange[1] - xrange[0]); + var xc = 0.5 * (xrange[1] + xrange[0]); + + var dy = 0.5 * (yrange[1] - yrange[0]); + var yc = 0.5 * (yrange[1] + yrange[0]); + + // Expand the axes to fit the plot, except just grow it by a factor of 1.3 + // because the labels should be taken into account except that's difficult + // hence 1.3. + var grow = 1.3; + xrange = [xc - dx * grow, xc + dx * grow]; + yrange = [yc - dy * grow, yc + dy * grow]; + + Axes.expand(xa, xrange, {padded: true}); + Axes.expand(ya, yrange, {padded: true}); + + // Enumerate the gridlines, both major and minor, and store them on the trace + // object: + calcGridlines(trace, t, 'a', 'b'); + calcGridlines(trace, t, 'b', 'a'); + + // Calculate the text labels for each major gridline and store them on the + // trace object: + calcLabels(trace, aax); + calcLabels(trace, bax); + + // Tabulate points for the four segments that bound the axes so that we can + // map to pixel coordinates in the plot function and create a clip rect: + t.clipsegments = calcClipPath(trace.xctrl, trace.yctrl, aax, bax); + + t.x = x; + t.y = y; + t.a = a; + t.b = b; + + return [t]; +}; + +},{"../../plots/cartesian/axes":724,"../heatmap/clean_2d_array":905,"./array_minmax":839,"./calc_clippath":845,"./calc_gridlines":846,"./calc_labels":847,"./cheater_basis":849,"./map_2d_array":861,"./smooth_fill_2d_array":865}],845:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +module.exports = function makeClipPath(xctrl, yctrl, aax, bax) { + var i, x, y; + var segments = []; + + var asmoothing = !!aax.smoothing; + var bsmoothing = !!bax.smoothing; + var nea1 = xctrl[0].length - 1; + var neb1 = xctrl.length - 1; + + // Along the lower a axis: + for(i = 0, x = [], y = []; i <= nea1; i++) { + x[i] = xctrl[0][i]; + y[i] = yctrl[0][i]; + } + segments.push({x: x, y: y, bicubic: asmoothing}); + + // Along the upper b axis: + for(i = 0, x = [], y = []; i <= neb1; i++) { + x[i] = xctrl[i][nea1]; + y[i] = yctrl[i][nea1]; + } + segments.push({x: x, y: y, bicubic: bsmoothing}); + + // Backwards along the upper a axis: + for(i = nea1, x = [], y = []; i >= 0; i--) { + x[nea1 - i] = xctrl[neb1][i]; + y[nea1 - i] = yctrl[neb1][i]; + } + segments.push({x: x, y: y, bicubic: asmoothing}); + + // Backwards along the lower b axis: + for(i = neb1, x = [], y = []; i >= 0; i--) { + x[neb1 - i] = xctrl[i][0]; + y[neb1 - i] = yctrl[i][0]; + } + segments.push({x: x, y: y, bicubic: bsmoothing}); + + return segments; +}; + +},{}],846:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Axes = require('../../plots/cartesian/axes'); +var extendFlat = require('../../lib/extend').extendFlat; + +module.exports = function calcGridlines(trace, cd, axisLetter, crossAxisLetter) { + var i, j, j0; + var eps, bounds, n1, n2, n, value, v; + var j1, v0, v1, d; + + var data = trace[axisLetter]; + var axis = trace[axisLetter + 'axis']; + + var gridlines = axis._gridlines = []; + var minorgridlines = axis._minorgridlines = []; + var boundarylines = axis._boundarylines = []; + + var crossData = trace[crossAxisLetter]; + var crossAxis = trace[crossAxisLetter + 'axis']; + + if(axis.tickmode === 'array') { + axis.tickvals = []; + for(i = 0; i < data.length; i++) { + axis.tickvals.push(data[i]); + } + } + + var xcp = trace.xctrl; + var ycp = trace.yctrl; + var nea = xcp[0].length; + var neb = xcp.length; + var na = trace.a.length; + var nb = trace.b.length; + + Axes.calcTicks(axis); + + // The default is an empty array that will cause the join to remove the gridline if + // it's just disappeared: + // axis._startline = axis._endline = []; + + // If the cross axis uses bicubic interpolation, then the grid + // lines fall once every three expanded grid row/cols: + var stride = axis.smoothing ? 3 : 1; + + function constructValueGridline(value) { + var i, j, j0, tj, pxy, i0, ti, xy, dxydi0, dxydi1, dxydj0, dxydj1; + var xpoints = []; + var ypoints = []; + var ret = {}; + // Search for the fractional grid index giving this line: + if(axisLetter === 'b') { + // For the position we use just the i-j coordinates: + j = trace.b2j(value); + + // The derivatives for catmull-rom splines are discontinuous across cell + // boundaries though, so we need to provide both the cell and the position + // within the cell separately: + j0 = Math.floor(Math.max(0, Math.min(nb - 2, j))); + tj = j - j0; + + ret.length = nb; + ret.crossLength = na; + + ret.xy = function(i) { + return trace.evalxy([], i, j); + }; + + ret.dxy = function(i0, ti) { + return trace.dxydi([], i0, j0, ti, tj); + }; + + for(i = 0; i < na; i++) { + i0 = Math.min(na - 2, i); + ti = i - i0; + xy = trace.evalxy([], i, j); + + if(crossAxis.smoothing && i > 0) { + // First control point: + dxydi0 = trace.dxydi([], i - 1, j0, 0, tj); + xpoints.push(pxy[0] + dxydi0[0] / 3); + ypoints.push(pxy[1] + dxydi0[1] / 3); + + // Second control point: + dxydi1 = trace.dxydi([], i - 1, j0, 1, tj); + xpoints.push(xy[0] - dxydi1[0] / 3); + ypoints.push(xy[1] - dxydi1[1] / 3); + } + + xpoints.push(xy[0]); + ypoints.push(xy[1]); + + pxy = xy; + } + } else { + i = trace.a2i(value); + i0 = Math.floor(Math.max(0, Math.min(na - 2, i))); + ti = i - i0; + + ret.length = na; + ret.crossLength = nb; + + ret.xy = function(j) { + return trace.evalxy([], i, j); + }; + + ret.dxy = function(j0, tj) { + return trace.dxydj([], i0, j0, ti, tj); + }; + + for(j = 0; j < nb; j++) { + j0 = Math.min(nb - 2, j); + tj = j - j0; + xy = trace.evalxy([], i, j); + + if(crossAxis.smoothing && j > 0) { + // First control point: + dxydj0 = trace.dxydj([], i0, j - 1, ti, 0); + xpoints.push(pxy[0] + dxydj0[0] / 3); + ypoints.push(pxy[1] + dxydj0[1] / 3); + + // Second control point: + dxydj1 = trace.dxydj([], i0, j - 1, ti, 1); + xpoints.push(xy[0] - dxydj1[0] / 3); + ypoints.push(xy[1] - dxydj1[1] / 3); + } + + xpoints.push(xy[0]); + ypoints.push(xy[1]); + + pxy = xy; + } + } + + ret.axisLetter = axisLetter; + ret.axis = axis; + ret.crossAxis = crossAxis; + ret.value = value; + ret.constvar = crossAxisLetter; + ret.index = n; + ret.x = xpoints; + ret.y = ypoints; + ret.smoothing = crossAxis.smoothing; + + return ret; + } + + function constructArrayGridline(idx) { + var j, i0, j0, ti, tj; + var xpoints = []; + var ypoints = []; + var ret = {}; + ret.length = data.length; + ret.crossLength = crossData.length; + + if(axisLetter === 'b') { + j0 = Math.max(0, Math.min(nb - 2, idx)); + tj = Math.min(1, Math.max(0, idx - j0)); + + ret.xy = function(i) { + return trace.evalxy([], i, idx); + }; + + ret.dxy = function(i0, ti) { + return trace.dxydi([], i0, j0, ti, tj); + }; + + // In the tickmode: array case, this operation is a simple + // transfer of data: + for(j = 0; j < nea; j++) { + xpoints[j] = xcp[idx * stride][j]; + ypoints[j] = ycp[idx * stride][j]; + } + } else { + i0 = Math.max(0, Math.min(na - 2, idx)); + ti = Math.min(1, Math.max(0, idx - i0)); + + ret.xy = function(j) { + return trace.evalxy([], idx, j); + }; + + ret.dxy = function(j0, tj) { + return trace.dxydj([], i0, j0, ti, tj); + }; + + // In the tickmode: array case, this operation is a simple + // transfer of data: + for(j = 0; j < neb; j++) { + xpoints[j] = xcp[j][idx * stride]; + ypoints[j] = ycp[j][idx * stride]; + } + } + + ret.axisLetter = axisLetter; + ret.axis = axis; + ret.crossAxis = crossAxis; + ret.value = data[idx]; + ret.constvar = crossAxisLetter; + ret.index = idx; + ret.x = xpoints; + ret.y = ypoints; + ret.smoothing = crossAxis.smoothing; + + return ret; + } + + if(axis.tickmode === 'array') { + // var j0 = axis.startline ? 1 : 0; + // var j1 = data.length - (axis.endline ? 1 : 0); + + eps = 5e-15; + bounds = [ + Math.floor(((data.length - 1) - axis.arraytick0) / axis.arraydtick * (1 + eps)), + Math.ceil((- axis.arraytick0) / axis.arraydtick / (1 + eps)) + ].sort(function(a, b) {return a - b;}); + + // Unpack sorted values so we can be sure to avoid infinite loops if something + // is backwards: + n1 = bounds[0] - 1; + n2 = bounds[1] + 1; + + // If the axes fall along array lines, then this is a much simpler process since + // we already have all the control points we need + for(n = n1; n < n2; n++) { + j = axis.arraytick0 + axis.arraydtick * n; + if(j < 0 || j > data.length - 1) continue; + gridlines.push(extendFlat(constructArrayGridline(j), { + color: axis.gridcolor, + width: axis.gridwidth + })); + } + + for(n = n1; n < n2; n++) { + j0 = axis.arraytick0 + axis.arraydtick * n; + j1 = Math.min(j0 + axis.arraydtick, data.length - 1); + + // TODO: fix the bounds computation so we don't have to do a large range and then throw + // out unneeded numbers + if(j0 < 0 || j0 > data.length - 1) continue; + if(j1 < 0 || j1 > data.length - 1) continue; + + v0 = data[j0]; + v1 = data[j1]; + + for(i = 0; i < axis.minorgridcount; i++) { + d = j1 - j0; + + // TODO: fix the bounds computation so we don't have to do a large range and then throw + // out unneeded numbers + if(d <= 0) continue; + + // XXX: This calculation isn't quite right. Off by one somewhere? + v = v0 + (v1 - v0) * (i + 1) / (axis.minorgridcount + 1) * (axis.arraydtick / d); + + // TODO: fix the bounds computation so we don't have to do a large range and then throw + // out unneeded numbers + if(v < data[0] || v > data[data.length - 1]) continue; + minorgridlines.push(extendFlat(constructValueGridline(v), { + color: axis.minorgridcolor, + width: axis.minorgridwidth + })); + } + } + + if(axis.startline) { + boundarylines.push(extendFlat(constructArrayGridline(0), { + color: axis.startlinecolor, + width: axis.startlinewidth + })); + } + + if(axis.endline) { + boundarylines.push(extendFlat(constructArrayGridline(data.length - 1), { + color: axis.endlinecolor, + width: axis.endlinewidth + })); + } + } else { + // If the lines do not fall along the axes, then we have to interpolate + // the contro points and so some math to figure out where the lines are + // in the first place. + + // Compute the integer boudns of tick0 + n * dtick that fall within the range + // (roughly speaking): + // Give this a nice generous epsilon. We use at as * (1 + eps) in order to make + // inequalities a little tolerant in a more or less correct manner: + eps = 5e-15; + bounds = [ + Math.floor((data[data.length - 1] - axis.tick0) / axis.dtick * (1 + eps)), + Math.ceil((data[0] - axis.tick0) / axis.dtick / (1 + eps)) + ].sort(function(a, b) {return a - b;}); + + // Unpack sorted values so we can be sure to avoid infinite loops if something + // is backwards: + n1 = bounds[0]; + n2 = bounds[1]; + + for(n = n1; n <= n2; n++) { + value = axis.tick0 + axis.dtick * n; + + gridlines.push(extendFlat(constructValueGridline(value), { + color: axis.gridcolor, + width: axis.gridwidth + })); + } + + for(n = n1 - 1; n < n2 + 1; n++) { + value = axis.tick0 + axis.dtick * n; + + for(i = 0; i < axis.minorgridcount; i++) { + v = value + axis.dtick * (i + 1) / (axis.minorgridcount + 1); + if(v < data[0] || v > data[data.length - 1]) continue; + minorgridlines.push(extendFlat(constructValueGridline(v), { + color: axis.minorgridcolor, + width: axis.minorgridwidth + })); + } + } + + if(axis.startline) { + boundarylines.push(extendFlat(constructValueGridline(data[0]), { + color: axis.startlinecolor, + width: axis.startlinewidth + })); + } + + if(axis.endline) { + boundarylines.push(extendFlat(constructValueGridline(data[data.length - 1]), { + color: axis.endlinecolor, + width: axis.endlinewidth + })); + } + } +}; + +},{"../../lib/extend":677,"../../plots/cartesian/axes":724}],847:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Axes = require('../../plots/cartesian/axes'); +var extendFlat = require('../../lib/extend').extendFlat; + +module.exports = function calcLabels(trace, axis) { + var i, tobj, prefix, suffix, gridline; + + var labels = axis._labels = []; + var gridlines = axis._gridlines; + + for(i = 0; i < gridlines.length; i++) { + gridline = gridlines[i]; + + if(['start', 'both'].indexOf(axis.showticklabels) !== -1) { + tobj = Axes.tickText(axis, gridline.value); + + extendFlat(tobj, { + prefix: prefix, + suffix: suffix, + endAnchor: true, + xy: gridline.xy(0), + dxy: gridline.dxy(0, 0), + axis: gridline.axis, + length: gridline.crossAxis.length, + font: gridline.axis.tickfont, + isFirst: i === 0, + isLast: i === gridlines.length - 1 + }); + + labels.push(tobj); + } + + if(['end', 'both'].indexOf(axis.showticklabels) !== -1) { + tobj = Axes.tickText(axis, gridline.value); + + extendFlat(tobj, { + endAnchor: false, + xy: gridline.xy(gridline.crossLength - 1), + dxy: gridline.dxy(gridline.crossLength - 2, 1), + axis: gridline.axis, + length: gridline.crossAxis.length, + font: gridline.axis.tickfont, + isFirst: i === 0, + isLast: i === gridlines.length - 1 + }); + + labels.push(tobj); + } + } +}; + +},{"../../lib/extend":677,"../../plots/cartesian/axes":724}],848:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Compute the tangent vector according to catmull-rom cubic splines (centripetal, + * I think). That differs from the control point in two ways: + * 1. It is a vector, not a position relative to the point + * 2. the vector is longer than the position relative to p1 by a factor of 3 + * + * Close to the boundaries, we'll use these as *quadratic control points, so that + * to make a nice grid, we'll need to divide the tangent by 2 instead of 3. (The + * math works out this way if you work through the bezier derivatives) + */ +var CatmullRomExp = 0.5; +module.exports = function makeControlPoints(p0, p1, p2, smoothness) { + var d1x = p0[0] - p1[0], + d1y = p0[1] - p1[1], + d2x = p2[0] - p1[0], + d2y = p2[1] - p1[1], + d1a = Math.pow(d1x * d1x + d1y * d1y, CatmullRomExp / 2), + d2a = Math.pow(d2x * d2x + d2y * d2y, CatmullRomExp / 2), + numx = (d2a * d2a * d1x - d1a * d1a * d2x) * smoothness, + numy = (d2a * d2a * d1y - d1a * d1a * d2y) * smoothness, + denom1 = d2a * (d1a + d2a) * 3, + denom2 = d1a * (d1a + d2a) * 3; + return [[ + p1[0] + (denom1 && numx / denom1), + p1[1] + (denom1 && numy / denom1) + ], [ + p1[0] - (denom2 && numx / denom2), + p1[1] - (denom2 && numy / denom2) + ]]; +}; + +},{}],849:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var isArray = require('../../lib').isArray; + +/* + * Construct a 2D array of cheater values given a, b, and a slope. + * If + */ +module.exports = function(a, b, cheaterslope) { + var i, j, ascal, bscal, aval, bval; + var data = []; + + var na = isArray(a) ? a.length : a; + var nb = isArray(b) ? b.length : b; + var adata = isArray(a) ? a : null; + var bdata = isArray(b) ? b : null; + + // If we're using data, scale it so that for data that's just barely + // not evenly spaced, the switch to value-based indexing is continuous. + // This means evenly spaced data should look the same whether value + // or index cheatertype. + if(adata) { + ascal = (adata.length - 1) / (adata[adata.length - 1] - adata[0]) / (na - 1); + } + + if(bdata) { + bscal = (bdata.length - 1) / (bdata[bdata.length - 1] - bdata[0]) / (nb - 1); + } + + var xval; + var xmin = Infinity; + var xmax = -Infinity; + for(j = 0; j < nb; j++) { + data[j] = []; + bval = bdata ? (bdata[j] - bdata[0]) * bscal : j / (nb - 1); + for(i = 0; i < na; i++) { + aval = adata ? (adata[i] - adata[0]) * ascal : i / (na - 1); + xval = aval - bval * cheaterslope; + xmin = Math.min(xval, xmin); + xmax = Math.max(xval, xmax); + data[j][i] = xval; + } + } + + // Normalize cheater values to the 0-1 range. This comes into play when you have + // multiple cheater plots. After careful consideration, it seems better if cheater + // values are normalized to a consistent range. Otherwise one cheater affects the + // layout of other cheaters on the same axis. + var slope = 1.0 / (xmax - xmin); + var offset = -xmin * slope; + for(j = 0; j < nb; j++) { + for(i = 0; i < na; i++) { + data[j][i] = slope * data[j][i] + offset; + } + } + + return data; +}; + +},{"../../lib":685}],850:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var makeControlPoints = require('./catmull_rom'); +var ensureArray = require('../../lib').ensureArray; + +/* + * Turns a coarse grid into a fine grid with control points. + * + * Here's an ASCII representation: + * + * o ----- o ----- o ----- o + * | | | | + * | | | | + * | | | | + * o ----- o ----- o ----- o + * | | | | + * | | | | + * ^ | | | | + * | o ----- o ----- o ----- o + * b | | | | | + * | | | | | + * | | | | | + * o ----- o ----- o ----- o + * ------> + * a + * + * First of all, note that we want to do this in *cartesian* space. This means + * we might run into problems when there are extreme differences in x/y scaling, + * but the alternative is that the topology of the contours might actually be + * view-dependent, which seems worse. As a fallback, the only parameter that + * actually affects the result is the *aspect ratio*, so that we can at least + * improve the situation a bit without going all the way to screen coordinates. + * + * This function flattens the points + tangents into a slightly denser grid of + * *control points*. The resulting grid looks like this: + * + * 9 +--o-o--+ -o-o--+--o-o--+ + * 8 o o o o o o o o o o + * | | | | + * 7 o o o o o o o o o o + * 6 +--o-o--+ -o-o--+--o-o--+ + * 5 o o o o o o o o o o + * | | | | + * ^ 4 o o o o o o o o o o + * | 3 +--o-o--+ -o-o--+--o-o--+ + * b | 2 o o o o o o o o o o + * | | | | | + * | 1 o o o o o o o o o o + * 0 +--o-o--+ -o-o--+--o-o--+ + * 0 1 2 3 4 5 6 7 8 9 + * ------> + * a + * + * where `o`s represent newly-computed control points. the resulting dimension is + * + * (m - 1) * 3 + 1 + * = 3 * m - 2 + * + * We could simply store the tangents separately, but that's a nightmare to organize + * in two dimensions since we'll be slicing grid lines in both directions and since + * that basically requires very nearly just as much storage as just storing the dense + * grid. + * + * Wow! + */ + + +/* + * Catmull-rom is biased at the boundaries toward the interior and we actually + * can't use catmull-rom to compute the control point closest to (but inside) + * the boundary. + * + * A note on plotly's spline interpolation. It uses the catmull rom control point + * closest to the boundary *as* a quadratic control point. This seems incorrect, + * so I've elected not to follow that. Given control points 0 and 1, regular plotly + * splines give *equivalent* cubic control points: + * + * Input: + * + * boundary + * | | + * p0 p2 p3 --> interior + * 0.0 0.667 1.0 + * | | + * + * Cubic-equivalent of what plotly splines draw:: + * + * boundary + * | | + * p0 p1 p2 p3 --> interior + * 0.0 0.4444 0.8888 1.0 + * | | + * + * What this function fills in: + * + * boundary + * | | + * p0 p1 p2 p3 --> interior + * 0.0 0.333 0.667 1.0 + * | | + * + * Parameters: + * p0: boundary point + * p2: catmull rom point based on computation at p3 + * p3: first grid point + * + * Of course it works whichever way it's oriented; you just need to interpret the + * input/output accordingly. + */ +function inferCubicControlPoint(p0, p2, p3) { + // Extend p1 away from p0 by 50%. This is the equivalent quadratic point that + // would give the same slope as catmull rom at p0. + var p2e0 = -0.5 * p3[0] + 1.5 * p2[0]; + var p2e1 = -0.5 * p3[1] + 1.5 * p2[1]; + + return [ + (2 * p2e0 + p0[0]) / 3, + (2 * p2e1 + p0[1]) / 3, + ]; +} + +module.exports = function computeControlPoints(xe, ye, x, y, asmoothing, bsmoothing) { + var i, j, ie, je, xej, yej, xj, yj, cp, p1; + // At this point, we know these dimensions are correct and representative of + // the whole 2D arrays: + var na = x[0].length; + var nb = x.length; + + // (n)umber of (e)xpanded points: + var nea = asmoothing ? 3 * na - 2 : na; + var neb = bsmoothing ? 3 * nb - 2 : nb; + + xe = ensureArray(xe, neb); + ye = ensureArray(ye, neb); + + for(ie = 0; ie < neb; ie++) { + xe[ie] = ensureArray(xe[ie], nea); + ye[ie] = ensureArray(ye[ie], nea); + } + + // This loop fills in the X'd points: + // + // . . . . + // . . . . + // | | | | + // | | | | + // X ----- X ----- X ----- X + // | | | | + // | | | | + // | | | | + // X ----- X ----- X ----- X + // + // + // ie = (i) (e)xpanded: + for(j = 0, je = 0; j < nb; j++, je += bsmoothing ? 3 : 1) { + xej = xe[je]; + yej = ye[je]; + xj = x[j]; + yj = y[j]; + + // je = (j) (e)xpanded: + for(i = 0, ie = 0; i < na; i++, ie += asmoothing ? 3 : 1) { + xej[ie] = xj[i]; + yej[ie] = yj[i]; + } + } + + if(asmoothing) { + // If there's a-smoothing, this loop fills in the X'd points with catmull-rom + // control points computed along the a-axis: + // . . . . + // . . . . + // | | | | + // | | | | + // o -Y-X- o -X-X- o -X-Y- o + // | | | | + // | | | | + // | | | | + // o -Y-X- o -X-X- o -X-Y- o + // + // i: 0 1 2 3 + // ie: 0 1 3 3 4 5 6 7 8 9 + // + // ------> + // a + // + for(j = 0, je = 0; j < nb; j++, je += bsmoothing ? 3 : 1) { + // Fill in the points marked X for this a-row: + for(i = 1, ie = 3; i < na - 1; i++, ie += 3) { + cp = makeControlPoints( + [x[j][i - 1], y[j][i - 1]], + [x[j][i ], y[j][i]], + [x[j][i + 1], y[j][i + 1]], + asmoothing + ); + + xe[je][ie - 1] = cp[0][0]; + ye[je][ie - 1] = cp[0][1]; + xe[je][ie + 1] = cp[1][0]; + ye[je][ie + 1] = cp[1][1]; + } + + // The very first cubic interpolation point (to the left for i = 1 above) is + // used as a *quadratic* interpolation point by the spline drawing function + // which isn't really correct. But for the sake of consistency, we'll use it + // as such. Since we're using cubic splines, that means we need to shorten the + // tangent by 1/3 and also construct a new cubic spline control point 1/3 from + // the original to the i = 0 point. + p1 = inferCubicControlPoint( + [xe[je][0], ye[je][0]], + [xe[je][2], ye[je][2]], + [xe[je][3], ye[je][3]] + ); + xe[je][1] = p1[0]; + ye[je][1] = p1[1]; + + // Ditto last points, sans explanation: + p1 = inferCubicControlPoint( + [xe[je][nea - 1], ye[je][nea - 1]], + [xe[je][nea - 3], ye[je][nea - 3]], + [xe[je][nea - 4], ye[je][nea - 4]] + ); + xe[je][nea - 2] = p1[0]; + ye[je][nea - 2] = p1[1]; + } + } + + if(bsmoothing) { + // If there's a-smoothing, this loop fills in the X'd points with catmull-rom + // control points computed along the b-axis: + // . . . . + // X X X X X X X X X X + // | | | | + // X X X X X X X X X X + // o -o-o- o -o-o- o -o-o- o + // X X X X X X X X X X + // | | | | + // Y Y Y Y Y Y Y Y Y Y + // o -o-o- o -o-o- o -o-o- o + // + // i: 0 1 2 3 + // ie: 0 1 3 3 4 5 6 7 8 9 + // + // ------> + // a + // + for(ie = 0; ie < nea; ie++) { + for(je = 3; je < neb - 3; je += 3) { + cp = makeControlPoints( + [xe[je - 3][ie], ye[je - 3][ie]], + [xe[je][ie], ye[je][ie]], + [xe[je + 3][ie], ye[je + 3][ie]], + bsmoothing + ); + + xe[je - 1][ie] = cp[0][0]; + ye[je - 1][ie] = cp[0][1]; + xe[je + 1][ie] = cp[1][0]; + ye[je + 1][ie] = cp[1][1]; + } + // Do the same boundary condition magic for these control points marked Y above: + p1 = inferCubicControlPoint( + [xe[0][ie], ye[0][ie]], + [xe[2][ie], ye[2][ie]], + [xe[3][ie], ye[3][ie]] + ); + xe[1][ie] = p1[0]; + ye[1][ie] = p1[1]; + + p1 = inferCubicControlPoint( + [xe[neb - 1][ie], ye[neb - 1][ie]], + [xe[neb - 3][ie], ye[neb - 3][ie]], + [xe[neb - 4][ie], ye[neb - 4][ie]] + ); + xe[neb - 2][ie] = p1[0]; + ye[neb - 2][ie] = p1[1]; + } + } + + if(asmoothing && bsmoothing) { + // Do one more pass, this time recomputing exactly what we just computed. + // It's overdetermined since we're peforming catmull-rom in two directions, + // so we'll just average the overdetermined. These points don't lie along the + // grid lines, so note that only grid lines will follow normal plotly spline + // interpolation. + // + // Unless of course there was no b smoothing. Then these intermediate points + // don't actually exist and this section is bypassed. + // . . . . + // o X X o X X o X X o + // | | | | + // o X X o X X o X X o + // o -o-o- o -o-o- o -o-o- o + // o X X o X X o X X o + // | | | | + // o Y Y o Y Y o Y Y o + // o -o-o- o -o-o- o -o-o- o + // + // i: 0 1 2 3 + // ie: 0 1 3 3 4 5 6 7 8 9 + // + // ------> + // a + // + for(je = 1; je < neb; je += (je + 1) % 3 === 0 ? 2 : 1) { + // Fill in the points marked X for this a-row: + for(ie = 3; ie < nea - 3; ie += 3) { + cp = makeControlPoints( + [xe[je][ie - 3], ye[je][ie - 3]], + [xe[je][ie], ye[je][ie]], + [xe[je][ie + 3], ye[je][ie + 3]], + asmoothing + ); + + xe[je][ie - 1] = 0.5 * (xe[je][ie - 1] + cp[0][0]); + ye[je][ie - 1] = 0.5 * (ye[je][ie - 1] + cp[0][1]); + xe[je][ie + 1] = 0.5 * (xe[je][ie + 1] + cp[1][0]); + ye[je][ie + 1] = 0.5 * (ye[je][ie + 1] + cp[1][1]); + } + + // This case is just slightly different. The computation is the same, + // but having computed this, we'll average with the existing result. + p1 = inferCubicControlPoint( + [xe[je][0], ye[je][0]], + [xe[je][2], ye[je][2]], + [xe[je][3], ye[je][3]] + ); + xe[je][1] = 0.5 * (xe[je][1] + p1[0]); + ye[je][1] = 0.5 * (ye[je][1] + p1[1]); + + p1 = inferCubicControlPoint( + [xe[je][nea - 1], ye[je][nea - 1]], + [xe[je][nea - 3], ye[je][nea - 3]], + [xe[je][nea - 4], ye[je][nea - 4]] + ); + xe[je][nea - 2] = 0.5 * (xe[je][nea - 2] + p1[0]); + ye[je][nea - 2] = 0.5 * (ye[je][nea - 2] + p1[1]); + } + } + + return [xe, ye]; +}; + +},{"../../lib":685,"./catmull_rom":848}],851:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +module.exports = { + RELATIVE_CULL_TOLERANCE: 1e-6 +}; + +},{}],852:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Evaluates the derivative of a list of control point arrays. That is, it expects an array or arrays + * that are expanded relative to the raw data to include the bicubic control points, if applicable. If + * only linear interpolation is desired, then the data points correspond 1-1 along that axis to the + * data itself. Since it's catmull-rom splines in either direction note in particular that the + * derivatives are discontinuous across cell boundaries. That's the reason you need both the *cell* + * and the *point within the cell*. + * + * Also note that the discontinuity of the derivative is in magnitude only. The direction *is* + * continuous across cell boundaries. + * + * For example, to compute the derivative of the xcoordinate halfway betwen the 7 and 8th i-gridpoints + * and the 10th and 11th j-gridpoints given bicubic smoothing in both dimensions, you'd write: + * + * var deriv = createIDerivativeEvaluator([x], 1, 1); + * + * var dxdi = deriv([], 7, 10, 0.5, 0.5); + * // => [0.12345] + * + * Since there'd be a bunch of duplicate computation to compute multiple derivatives, you can double + * this up by providing more arrays: + * + * var deriv = createIDerivativeEvaluator([x, y], 1, 1); + * + * var dxdi = deriv([], 7, 10, 0.5, 0.5); + * // => [0.12345, 0.78910] + * + * NB: It's presumed that at this point all data has been sanitized and is valid numerical data arrays + * of the correct dimension. + */ +module.exports = function(arrays, asmoothing, bsmoothing) { + if(asmoothing && bsmoothing) { + return function(out, i0, j0, u, v) { + if(!out) out = []; + var f0, f1, f2, f3, ak, k; + + // Since it's a grid of control points, the actual indices are * 3: + i0 *= 3; + j0 *= 3; + + // Precompute some numbers: + var u2 = u * u; + var ou = 1 - u; + var ou2 = ou * ou; + var ouu2 = ou * u * 2; + var a = -3 * ou2; + var b = 3 * (ou2 - ouu2); + var c = 3 * (ouu2 - u2); + var d = 3 * u2; + + var v2 = v * v; + var v3 = v2 * v; + var ov = 1 - v; + var ov2 = ov * ov; + var ov3 = ov2 * ov; + + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + // Compute the derivatives in the u-direction: + f0 = a * ak[j0 ][i0] + b * ak[j0 ][i0 + 1] + c * ak[j0 ][i0 + 2] + d * ak[j0 ][i0 + 3]; + f1 = a * ak[j0 + 1][i0] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 1][i0 + 2] + d * ak[j0 + 1][i0 + 3]; + f2 = a * ak[j0 + 2][i0] + b * ak[j0 + 2][i0 + 1] + c * ak[j0 + 2][i0 + 2] + d * ak[j0 + 2][i0 + 3]; + f3 = a * ak[j0 + 3][i0] + b * ak[j0 + 3][i0 + 1] + c * ak[j0 + 3][i0 + 2] + d * ak[j0 + 3][i0 + 3]; + + // Now just interpolate in the v-direction since it's all separable: + out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; + } + + return out; + }; + } else if(asmoothing) { + // Handle smooth in the a-direction but linear in the b-direction by performing four + // linear interpolations followed by one cubic interpolation of the result + return function(out, i0, j0, u, v) { + if(!out) out = []; + var f0, f1, k, ak; + i0 *= 3; + var u2 = u * u; + var ou = 1 - u; + var ou2 = ou * ou; + var ouu2 = ou * u * 2; + var a = -3 * ou2; + var b = 3 * (ou2 - ouu2); + var c = 3 * (ouu2 - u2); + var d = 3 * u2; + var ov = 1 - v; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = a * ak[j0 ][i0] + b * ak[j0 ][i0 + 1] + c * ak[j0 ][i0 + 2] + d * ak[j0 ][i0 + 3]; + f1 = a * ak[j0 + 1][i0] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 1][i0 + 2] + d * ak[j0 + 1][i0 + 3]; + + out[k] = ov * f0 + v * f1; + } + return out; + }; + } else if(bsmoothing) { + // Same as the above case, except reversed. I've disabled the no-unused vars rule + // so that this function is fully interpolation-agnostic. Otherwise it would need + // to be called differently in different cases. Which wouldn't be the worst, but + /* eslint-disable no-unused-vars */ + return function(out, i0, j0, u, v) { + /* eslint-enable no-unused-vars */ + if(!out) out = []; + var f0, f1, f2, f3, k, ak; + j0 *= 3; + var v2 = v * v; + var v3 = v2 * v; + var ov = 1 - v; + var ov2 = ov * ov; + var ov3 = ov2 * ov; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ak[j0][i0 + 1] - ak[j0][i0]; + f1 = ak[j0 + 1][i0 + 1] - ak[j0 + 1][i0]; + f2 = ak[j0 + 2][i0 + 1] - ak[j0 + 2][i0]; + f3 = ak[j0 + 3][i0 + 1] - ak[j0 + 3][i0]; + + out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; + } + return out; + }; + } else { + // Finally, both directions are linear: + /* eslint-disable no-unused-vars */ + return function(out, i0, j0, u, v) { + /* eslint-enable no-unused-vars */ + if(!out) out = []; + var f0, f1, k, ak; + var ov = 1 - v; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ak[j0][i0 + 1] - ak[j0][i0]; + f1 = ak[j0 + 1][i0 + 1] - ak[j0 + 1][i0]; + + out[k] = ov * f0 + v * f1; + } + return out; + }; + } +}; + +},{}],853:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = function(arrays, asmoothing, bsmoothing) { + if(asmoothing && bsmoothing) { + return function(out, i0, j0, u, v) { + if(!out) out = []; + var f0, f1, f2, f3, ak, k; + + // Since it's a grid of control points, the actual indices are * 3: + i0 *= 3; + j0 *= 3; + + // Precompute some numbers: + var u2 = u * u; + var u3 = u2 * u; + var ou = 1 - u; + var ou2 = ou * ou; + var ou3 = ou2 * ou; + + var v2 = v * v; + var ov = 1 - v; + var ov2 = ov * ov; + var ovv2 = ov * v * 2; + var a = -3 * ov2; + var b = 3 * (ov2 - ovv2); + var c = 3 * (ovv2 - v2); + var d = 3 * v2; + + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + + // Compute the derivatives in the v-direction: + f0 = a * ak[j0][i0] + b * ak[j0 + 1][i0] + c * ak[j0 + 2][i0] + d * ak[j0 + 3][i0]; + f1 = a * ak[j0][i0 + 1] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 2][i0 + 1] + d * ak[j0 + 3][i0 + 1]; + f2 = a * ak[j0][i0 + 2] + b * ak[j0 + 1][i0 + 2] + c * ak[j0 + 2][i0 + 2] + d * ak[j0 + 3][i0 + 2]; + f3 = a * ak[j0][i0 + 3] + b * ak[j0 + 1][i0 + 3] + c * ak[j0 + 2][i0 + 3] + d * ak[j0 + 3][i0 + 3]; + + // Now just interpolate in the v-direction since it's all separable: + out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3; + } + + return out; + }; + } else if(asmoothing) { + // Handle smooth in the a-direction but linear in the b-direction by performing four + // linear interpolations followed by one cubic interpolation of the result + return function(out, i0, j0, v, u) { + if(!out) out = []; + var f0, f1, f2, f3, k, ak; + i0 *= 3; + var u2 = u * u; + var u3 = u2 * u; + var ou = 1 - u; + var ou2 = ou * ou; + var ou3 = ou2 * ou; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + + f0 = ak[j0 + 1][i0] - ak[j0][i0]; + f1 = ak[j0 + 1][i0 + 1] - ak[j0][i0 + 1]; + f2 = ak[j0 + 1][i0 + 2] - ak[j0][i0 + 2]; + f3 = ak[j0 + 1][i0 + 3] - ak[j0][i0 + 3]; + + out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3; + + // mathematically equivalent: + // f0 = ou3 * ak[j0 ][i0] + 3 * (ou2 * u * ak[j0 ][i0 + 1] + ou * u2 * ak[j0 ][i0 + 2]) + u3 * ak[j0 ][i0 + 3]; + // f1 = ou3 * ak[j0 + 1][i0] + 3 * (ou2 * u * ak[j0 + 1][i0 + 1] + ou * u2 * ak[j0 + 1][i0 + 2]) + u3 * ak[j0 + 1][i0 + 3]; + // out[k] = f1 - f0; + } + return out; + }; + } else if(bsmoothing) { + // Same as the above case, except reversed: + /* eslint-disable no-unused-vars */ + return function(out, i0, j0, u, v) { + /* eslint-enable no-unused-vars */ + if(!out) out = []; + var f0, f1, k, ak; + j0 *= 3; + var ou = 1 - u; + var v2 = v * v; + var ov = 1 - v; + var ov2 = ov * ov; + var ovv2 = ov * v * 2; + var a = -3 * ov2; + var b = 3 * (ov2 - ovv2); + var c = 3 * (ovv2 - v2); + var d = 3 * v2; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = a * ak[j0][i0] + b * ak[j0 + 1][i0] + c * ak[j0 + 2][i0] + d * ak[j0 + 3][i0]; + f1 = a * ak[j0][i0 + 1] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 2][i0 + 1] + d * ak[j0 + 3][i0 + 1]; + + out[k] = ou * f0 + u * f1; + } + return out; + }; + } else { + // Finally, both directions are linear: + /* eslint-disable no-unused-vars */ + return function(out, i0, j0, v, u) { + /* eslint-enable no-unused-vars */ + if(!out) out = []; + var f0, f1, k, ak; + var ov = 1 - v; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ak[j0 + 1][i0] - ak[j0][i0]; + f1 = ak[j0 + 1][i0 + 1] - ak[j0][i0 + 1]; + + out[k] = ov * f0 + v * f1; + } + return out; + }; + } + +}; + +},{}],854:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Return a function that evaluates a set of linear or bicubic control points. + * This will get evaluated a lot, so we'll at least do a bit of extra work to + * flatten some of the choices. In particular, we'll unroll the linear/bicubic + * combinations and we'll allow computing results in parallel to cut down + * on repeated arithmetic. + * + * Take note that we don't search for the correct range in this function. The + * reason is for consistency due to the corrresponding derivative function. In + * particular, the derivatives aren't continuous across cells, so it's important + * to be able control whether the derivative at a cell boundary is approached + * from one side or the other. + */ +module.exports = function(arrays, na, nb, asmoothing, bsmoothing) { + var imax = na - 2; + var jmax = nb - 2; + + if(asmoothing && bsmoothing) { + return function(out, i, j) { + if(!out) out = []; + var f0, f1, f2, f3, ak, k; + + var i0 = Math.max(0, Math.min(Math.floor(i), imax)); + var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); + var u = Math.max(0, Math.min(1, i - i0)); + var v = Math.max(0, Math.min(1, j - j0)); + + // Since it's a grid of control points, the actual indices are * 3: + i0 *= 3; + j0 *= 3; + + // Precompute some numbers: + var u2 = u * u; + var u3 = u2 * u; + var ou = 1 - u; + var ou2 = ou * ou; + var ou3 = ou2 * ou; + + var v2 = v * v; + var v3 = v2 * v; + var ov = 1 - v; + var ov2 = ov * ov; + var ov3 = ov2 * ov; + + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ou3 * ak[j0][i0] + 3 * (ou2 * u * ak[j0][i0 + 1] + ou * u2 * ak[j0][i0 + 2]) + u3 * ak[j0][i0 + 3]; + f1 = ou3 * ak[j0 + 1][i0] + 3 * (ou2 * u * ak[j0 + 1][i0 + 1] + ou * u2 * ak[j0 + 1][i0 + 2]) + u3 * ak[j0 + 1][i0 + 3]; + f2 = ou3 * ak[j0 + 2][i0] + 3 * (ou2 * u * ak[j0 + 2][i0 + 1] + ou * u2 * ak[j0 + 2][i0 + 2]) + u3 * ak[j0 + 2][i0 + 3]; + f3 = ou3 * ak[j0 + 3][i0] + 3 * (ou2 * u * ak[j0 + 3][i0 + 1] + ou * u2 * ak[j0 + 3][i0 + 2]) + u3 * ak[j0 + 3][i0 + 3]; + out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; + } + + return out; + }; + } else if(asmoothing) { + // Handle smooth in the a-direction but linear in the b-direction by performing four + // linear interpolations followed by one cubic interpolation of the result + return function(out, i, j) { + if(!out) out = []; + + var i0 = Math.max(0, Math.min(Math.floor(i), imax)); + var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); + var u = Math.max(0, Math.min(1, i - i0)); + var v = Math.max(0, Math.min(1, j - j0)); + + var f0, f1, f2, f3, k, ak; + i0 *= 3; + var u2 = u * u; + var u3 = u2 * u; + var ou = 1 - u; + var ou2 = ou * ou; + var ou3 = ou2 * ou; + var ov = 1 - v; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ov * ak[j0][i0] + v * ak[j0 + 1][i0]; + f1 = ov * ak[j0][i0 + 1] + v * ak[j0 + 1][i0 + 1]; + f2 = ov * ak[j0][i0 + 2] + v * ak[j0 + 1][i0 + 1]; + f3 = ov * ak[j0][i0 + 3] + v * ak[j0 + 1][i0 + 1]; + + out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3; + } + return out; + }; + } else if(bsmoothing) { + // Same as the above case, except reversed: + return function(out, i, j) { + if(!out) out = []; + + var i0 = Math.max(0, Math.min(Math.floor(i), imax)); + var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); + var u = Math.max(0, Math.min(1, i - i0)); + var v = Math.max(0, Math.min(1, j - j0)); + + var f0, f1, f2, f3, k, ak; + j0 *= 3; + var v2 = v * v; + var v3 = v2 * v; + var ov = 1 - v; + var ov2 = ov * ov; + var ov3 = ov2 * ov; + var ou = 1 - u; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ou * ak[j0][i0] + u * ak[j0][i0 + 1]; + f1 = ou * ak[j0 + 1][i0] + u * ak[j0 + 1][i0 + 1]; + f2 = ou * ak[j0 + 2][i0] + u * ak[j0 + 2][i0 + 1]; + f3 = ou * ak[j0 + 3][i0] + u * ak[j0 + 3][i0 + 1]; + + out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; + } + return out; + }; + } else { + // Finally, both directions are linear: + return function(out, i, j) { + if(!out) out = []; + + var i0 = Math.max(0, Math.min(Math.floor(i), imax)); + var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); + var u = Math.max(0, Math.min(1, i - i0)); + var v = Math.max(0, Math.min(1, j - j0)); + + var f0, f1, k, ak; + var ov = 1 - v; + var ou = 1 - u; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ou * ak[j0][i0] + u * ak[j0][i0 + 1]; + f1 = ou * ak[j0 + 1][i0] + u * ak[j0 + 1][i0 + 1]; + + out[k] = ov * f0 + v * f1; + } + return out; + }; + } + +}; + +},{}],855:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Lib = require('../../lib'); +var handleXYDefaults = require('./xy_defaults'); +var handleABDefaults = require('./ab_defaults'); +var setConvert = require('./set_convert'); +var attributes = require('./attributes'); +var colorAttrs = require('../../components/color/attributes'); + +module.exports = function supplyDefaults(traceIn, traceOut, dfltColor, fullLayout) { + function coerce(attr, dflt) { + return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); + } + + var defaultColor = coerce('color', colorAttrs.defaultLine); + Lib.coerceFont(coerce, 'font'); + + coerce('carpet'); + + handleABDefaults(traceIn, traceOut, fullLayout, coerce, defaultColor); + + if(!traceOut.a || !traceOut.b) { + traceOut.visible = false; + return; + } + + if(traceOut.a.length < 3) { + traceOut.aaxis.smoothing = 0; + } + + if(traceOut.b.length < 3) { + traceOut.baxis.smoothing = 0; + } + + // NB: the input is x/y arrays. You should know that the *first* dimension of x and y + // corresponds to b and the second to a. This sounds backwards but ends up making sense + // the important part to know is that when you write y[j][i], j goes from 0 to b.length - 1 + // and i goes from 0 to a.length - 1. + var len = handleXYDefaults(traceIn, traceOut, coerce); + + setConvert(traceOut); + + if(traceOut._cheater) { + coerce('cheaterslope'); + } + + if(!len) { + traceOut.visible = false; + return; + } +}; + +},{"../../components/color/attributes":577,"../../lib":685,"./ab_defaults":838,"./attributes":840,"./set_convert":864,"./xy_defaults":866}],856:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +module.exports = function(data) { + return Array.isArray(data[0]); +}; + +},{}],857:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Carpet = {}; + +Carpet.attributes = require('./attributes'); +Carpet.supplyDefaults = require('./defaults'); +Carpet.plot = require('./plot'); +Carpet.calc = require('./calc'); +Carpet.animatable = true; + +Carpet.moduleType = 'trace'; +Carpet.name = 'carpet'; +Carpet.basePlotModule = require('../../plots/cartesian'); +Carpet.categories = ['cartesian', 'carpet', 'carpetAxis', 'notLegendIsolatable']; +Carpet.meta = { + description: [ + 'The data describing carpet axis layout is set in `y` and (optionally)', + 'also `x`. If only `y` is present, `x` the plot is interpreted as a', + 'cheater plot and is filled in using the `y` values.', + + '`x` and `y` may either be 2D arrays matching with each dimension matching', + 'that of `a` and `b`, or they may be 1D arrays with total length equal to', + 'that of `a` and `b`.' + ].join(' ') +}; + +module.exports = Carpet; + +},{"../../plots/cartesian":734,"./attributes":840,"./calc":844,"./defaults":855,"./plot":863}],858:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Given a trace, look up the carpet axis by carpet. + */ +module.exports = function(gd, trace) { + var n = gd._fullData.length; + var firstAxis; + for(var i = 0; i < n; i++) { + var maybeCarpet = gd._fullData[i]; + + if(maybeCarpet.index === trace.index) continue; + + if(maybeCarpet.type === 'carpet') { + if(!firstAxis) { + firstAxis = maybeCarpet; + } + + if(maybeCarpet.carpet === trace.carpet) { + return maybeCarpet; + } + } + } + + return firstAxis; +}; + +},{}],859:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = function makePath(xp, yp, isBicubic) { + // Prevent d3 errors that would result otherwise: + if(xp.length === 0) return ''; + + var i, path = []; + var stride = isBicubic ? 3 : 1; + for(i = 0; i < xp.length; i += stride) { + path.push(xp[i] + ',' + yp[i]); + + if(isBicubic && i < xp.length - stride) { + path.push('C'); + path.push([ + xp[i + 1] + ',' + yp[i + 1], + xp[i + 2] + ',' + yp[i + 2] + ' ', + ].join(' ')); + } + } + return path.join(isBicubic ? '' : 'L'); +}; + +},{}],860:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Map an array of x or y coordinates (c) to screen-space pixel coordinates (p). + * The output array is optional, but if provided, it will be reused without + * reallocation to the extent possible. + */ +module.exports = function mapArray(out, data, func) { + var i; + + if(!Array.isArray(out)) { + // If not an array, make it an array: + out = []; + } else if(out.length > data.length) { + // If too long, truncate. (If too short, it will grow + // automatically so we don't care about that case) + out = out.slice(0, data.length); + } + + for(i = 0; i < data.length; i++) { + out[i] = func(data[i]); + } + + return out; +}; + +},{}],861:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Map an array of x or y coordinates (c) to screen-space pixel coordinates (p). + * The output array is optional, but if provided, it will be reused without + * reallocation to the extent possible. + */ +module.exports = function mapArray(out, data, func) { + var i, j; + + if(!Array.isArray(out)) { + // If not an array, make it an array: + out = []; + } else if(out.length > data.length) { + // If too long, truncate. (If too short, it will grow + // automatically so we don't care about that case) + out = out.slice(0, data.length); + } + + for(i = 0; i < data.length; i++) { + if(!Array.isArray(out[i])) { + // If not an array, make it an array: + out[i] = []; + } else if(out[i].length > data.length) { + // If too long, truncate. (If too short, it will grow + // automatically so we don't care about[i] that case) + out[i] = out[i].slice(0, data.length); + } + + for(j = 0; j < data[0].length; j++) { + out[i][j] = func(data[i][j]); + } + } + return out; +}; + +},{}],862:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +module.exports = function orientText(trace, xaxis, yaxis, xy, dxy, refDxy) { + var dx = dxy[0] * trace.dpdx(xaxis); + var dy = dxy[1] * trace.dpdy(yaxis); + var flip = 1; + + var offsetMultiplier = 1.0; + if(refDxy) { + var l1 = Math.sqrt(dxy[0] * dxy[0] + dxy[1] * dxy[1]); + var l2 = Math.sqrt(refDxy[0] * refDxy[0] + refDxy[1] * refDxy[1]); + var dot = (dxy[0] * refDxy[0] + dxy[1] * refDxy[1]) / l1 / l2; + offsetMultiplier = Math.max(0.0, dot); + } + + var angle = Math.atan2(dy, dx) * 180 / Math.PI; + if(angle < -90) { + angle += 180; + flip = -flip; + } else if(angle > 90) { + angle -= 180; + flip = -flip; + } + + return { + angle: angle, + flip: flip, + p: trace.c2p(xy, xaxis, yaxis), + offsetMultplier: offsetMultiplier + }; +}; + +},{}],863:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var d3 = require('d3'); +var Drawing = require('../../components/drawing'); +var map1dArray = require('./map_1d_array'); +var makepath = require('./makepath'); +var orientText = require('./orient_text'); + +module.exports = function plot(gd, plotinfo, cdcarpet) { + for(var i = 0; i < cdcarpet.length; i++) { + plotOne(gd, plotinfo, cdcarpet[i]); + } +}; + +function makeg(el, type, klass) { + var join = el.selectAll(type + '.' + klass).data([0]); + join.enter().append(type).classed(klass, true); + return join; +} + +function plotOne(gd, plotinfo, cd) { + var t = cd[0]; + var trace = cd[0].trace, + xa = plotinfo.xaxis, + ya = plotinfo.yaxis, + aax = trace.aaxis, + bax = trace.baxis, + fullLayout = gd._fullLayout; + // uid = trace.uid, + // id = 'carpet' + uid; + + var gridLayer = plotinfo.plot.selectAll('.carpetlayer'); + var clipLayer = makeg(fullLayout._defs, 'g', 'clips'); + + var axisLayer = makeg(gridLayer, 'g', 'carpet' + trace.uid).classed('trace', true); + var minorLayer = makeg(axisLayer, 'g', 'minorlayer'); + var majorLayer = makeg(axisLayer, 'g', 'majorlayer'); + var boundaryLayer = makeg(axisLayer, 'g', 'boundarylayer'); + var labelLayer = makeg(axisLayer, 'g', 'labellayer'); + + axisLayer.style('opacity', trace.opacity); + + drawGridLines(xa, ya, majorLayer, aax, 'a', aax._gridlines, true); + drawGridLines(xa, ya, majorLayer, bax, 'b', bax._gridlines, true); + drawGridLines(xa, ya, minorLayer, aax, 'a', aax._minorgridlines, true); + drawGridLines(xa, ya, minorLayer, bax, 'b', bax._minorgridlines, true); + + // NB: These are not ommitted if the lines are not active. The joins must be executed + // in order for them to get cleaned up without a full redraw + drawGridLines(xa, ya, boundaryLayer, aax, 'a-boundary', aax._boundarylines); + drawGridLines(xa, ya, boundaryLayer, bax, 'b-boundary', bax._boundarylines); + + var maxAExtent = drawAxisLabels(gd._tester, xa, ya, trace, t, labelLayer, aax._labels, 'a-label'); + var maxBExtent = drawAxisLabels(gd._tester, xa, ya, trace, t, labelLayer, bax._labels, 'b-label'); + + drawAxisTitles(labelLayer, trace, t, xa, ya, maxAExtent, maxBExtent); + + // Swap for debugging in order to draw directly: + // drawClipPath(trace, axisLayer, xa, ya); + drawClipPath(trace, t, clipLayer, xa, ya); +} + +function drawClipPath(trace, t, layer, xaxis, yaxis) { + var seg, xp, yp, i; + // var clip = makeg(layer, 'g', 'carpetclip'); + trace.clipPathId = 'clip' + trace.uid + 'carpet'; + + var clip = layer.select('#' + trace.clipPathId); + + if(!clip.size()) { + clip = layer.append('clipPath') + .classed('carpetclip', true); + } + + var path = makeg(clip, 'path', 'carpetboundary'); + var segments = t.clipsegments; + var segs = []; + + for(i = 0; i < segments.length; i++) { + seg = segments[i]; + xp = map1dArray([], seg.x, xaxis.c2p); + yp = map1dArray([], seg.y, yaxis.c2p); + segs.push(makepath(xp, yp, seg.bicubic)); + } + + // This could be optimized ever so slightly to avoid no-op L segments + // at the corners, but it's so negligible that I don't think it's worth + // the extra complexity + trace.clipPathData = 'M' + segs.join('L') + 'Z'; + clip.attr('id', trace.clipPathId); + path.attr('d', trace.clipPathData); + // .style('stroke-width', 20) + // .style('vector-effect', 'non-scaling-stroke') + // .style('stroke', 'black') + // .style('fill', 'rgba(0, 0, 0, 0.1)'); +} + +function drawGridLines(xaxis, yaxis, layer, axis, axisLetter, gridlines) { + var lineClass = 'const-' + axisLetter + '-lines'; + var gridJoin = layer.selectAll('.' + lineClass).data(gridlines); + + gridJoin.enter().append('path') + .classed(lineClass, true) + .style('vector-effect', 'non-scaling-stroke'); + + gridJoin.each(function(d) { + var gridline = d; + var x = gridline.x; + var y = gridline.y; + + var xp = map1dArray([], x, xaxis.c2p); + var yp = map1dArray([], y, yaxis.c2p); + + var path = 'M' + makepath(xp, yp, gridline.smoothing); + + var el = d3.select(this); + + el.attr('d', path) + .style('stroke-width', gridline.width) + .style('stroke', gridline.color) + .style('fill', 'none'); + }); + + gridJoin.exit().remove(); +} + +function drawAxisLabels(tester, xaxis, yaxis, trace, t, layer, labels, labelClass) { + var labelJoin = layer.selectAll('text.' + labelClass).data(labels); + + labelJoin.enter().append('text') + .classed(labelClass, true); + + var maxExtent = 0; + + labelJoin.each(function(label) { + // Most of the positioning is done in calc_labels. Only the parts that depend upon + // the screen space representation of the x and y axes are here: + var orientation; + if(label.axis.tickangle === 'auto') { + orientation = orientText(trace, xaxis, yaxis, label.xy, label.dxy); + } else { + var angle = (label.axis.tickangle + 180.0) * Math.PI / 180.0; + orientation = orientText(trace, xaxis, yaxis, label.xy, [Math.cos(angle), Math.sin(angle)]); + } + var direction = (label.endAnchor ? -1 : 1) * orientation.flip; + var bbox = Drawing.measureText(tester, label.text, label.font); + + d3.select(this) + .attr('text-anchor', direction > 0 ? 'start' : 'end') + .text(label.text) + .attr('transform', + // Translate to the correct point: + 'translate(' + orientation.p[0] + ',' + orientation.p[1] + ') ' + + // Rotate to line up with grid line tangent: + 'rotate(' + orientation.angle + ')' + + // Adjust the baseline and indentation: + 'translate(' + label.axis.labelpadding * direction + ',' + bbox.height * 0.3 + ')' + ) + .call(Drawing.font, label.font.family, label.font.size, label.font.color); + + maxExtent = Math.max(maxExtent, bbox.width + label.axis.labelpadding); + }); + + labelJoin.exit().remove(); + + return maxExtent; +} + +function drawAxisTitles(layer, trace, t, xa, ya, maxAExtent, maxBExtent) { + var a, b, xy, dxy; + + a = 0.5 * (trace.a[0] + trace.a[trace.a.length - 1]); + b = trace.b[0]; + xy = trace.ab2xy(a, b, true); + dxy = trace.dxyda_rough(a, b); + drawAxisTitle(layer, trace, t, xy, dxy, trace.aaxis, xa, ya, maxAExtent, 'a-title'); + + a = trace.a[0]; + b = 0.5 * (trace.b[0] + trace.b[trace.b.length - 1]); + xy = trace.ab2xy(a, b, true); + dxy = trace.dxydb_rough(a, b); + drawAxisTitle(layer, trace, t, xy, dxy, trace.baxis, xa, ya, maxBExtent, 'b-title'); +} + +function drawAxisTitle(layer, trace, t, xy, dxy, axis, xa, ya, offset, labelClass) { + var data = []; + if(axis.title) data.push(axis.title); + var titleJoin = layer.selectAll('text.' + labelClass).data(data); + + titleJoin.enter().append('text') + .classed(labelClass, true); + + // There's only one, but we'll do it as a join so it's updated nicely: + titleJoin.each(function() { + var orientation = orientText(trace, xa, ya, xy, dxy); + + if(['start', 'both'].indexOf(axis.showticklabels) === -1) { + offset = 0; + } + + // In addition to the size of the labels, add on some extra padding: + offset += axis.titlefont.size + axis.titleoffset; + + + var el = d3.select(this); + + el.text(axis.title || '') + .attr('transform', + 'translate(' + orientation.p[0] + ',' + orientation.p[1] + ') ' + + 'rotate(' + orientation.angle + ') ' + + 'translate(0,' + offset + ')' + ) + .classed('user-select-none', true) + .attr('text-anchor', 'middle') + .call(Drawing.font, axis.titlefont); + }); + + titleJoin.exit().remove(); +} + +},{"../../components/drawing":602,"./makepath":859,"./map_1d_array":860,"./orient_text":862,"d3":107}],864:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var constants = require('./constants'); +var search = require('../../lib/search').findBin; +var computeControlPoints = require('./compute_control_points'); +var createSplineEvaluator = require('./create_spline_evaluator'); +var createIDerivativeEvaluator = require('./create_i_derivative_evaluator'); +var createJDerivativeEvaluator = require('./create_j_derivative_evaluator'); + +/* + * Create conversion functions to go from one basis to another. In particular the letter + * abbreviations are: + * + * i: i/j coordinates along the grid. Integer values correspond to data points + * a: real-valued coordinates along the a/b axes + * c: cartesian x-y coordinates + * p: screen-space pixel coordinates + */ +module.exports = function setConvert(trace) { + var a = trace.a; + var b = trace.b; + var na = trace.a.length; + var nb = trace.b.length; + var aax = trace.aaxis; + var bax = trace.baxis; + + // Grab the limits once rather than recomputing the bounds for every point + // independently: + var amin = a[0]; + var amax = a[na - 1]; + var bmin = b[0]; + var bmax = b[nb - 1]; + var arange = a[a.length - 1] - a[0]; + var brange = b[b.length - 1] - b[0]; + + // Compute the tolerance so that points are visible slightly outside the + // defined carpet axis: + var atol = arange * constants.RELATIVE_CULL_TOLERANCE; + var btol = brange * constants.RELATIVE_CULL_TOLERANCE; + + // Expand the limits to include the relative tolerance: + amin -= atol; + amax += atol; + bmin -= btol; + bmax += btol; + + trace.isVisible = function(a, b) { + return a > amin && a < amax && b > bmin && b < bmax; + }; + + trace.isOccluded = function(a, b) { + return a < amin || a > amax || b < bmin || b > bmax; + }; + + // XXX: ONLY PASSTHRU. ONLY. No, ONLY. + aax.c2p = function(v) { return v; }; + bax.c2p = function(v) { return v; }; + + trace.setScale = function() { + var x = trace.x; + var y = trace.y; + + // This is potentially a very expensive step! It does the bulk of the work of constructing + // an expanded basis of control points. Note in particular that it overwrites the existing + // basis without creating a new array since that would potentially thrash the garbage + // collector. + var result = computeControlPoints(trace.xctrl, trace.yctrl, x, y, aax.smoothing, bax.smoothing); + trace.xctrl = result[0]; + trace.yctrl = result[1]; + + // This step is the second step in the process, but it's somewhat simpler. It just unrolls + // some logic since it would be unnecessarily expensive to compute both interpolations + // nearly identically but separately and to include a bunch of linear vs. bicubic logic in + // every single call. + trace.evalxy = createSplineEvaluator([trace.xctrl, trace.yctrl], na, nb, aax.smoothing, bax.smoothing); + + trace.dxydi = createIDerivativeEvaluator([trace.xctrl, trace.yctrl], aax.smoothing, bax.smoothing); + trace.dxydj = createJDerivativeEvaluator([trace.xctrl, trace.yctrl], aax.smoothing, bax.smoothing); + }; + + /* + * Convert from i/j data grid coordinates to a/b values. Note in particular that this + * is *linear* interpolation, even if the data is interpolated bicubically. + */ + trace.i2a = function(i) { + var i0 = Math.max(0, Math.floor(i[0]), na - 2); + var ti = i[0] - i0; + return (1 - ti) * a[i0] + ti * a[i0 + 1]; + }; + + trace.j2b = function(j) { + var j0 = Math.max(0, Math.floor(j[1]), na - 2); + var tj = j[1] - j0; + return (1 - tj) * b[j0] + tj * b[j0 + 1]; + }; + + trace.ij2ab = function(ij) { + return [trace.i2a(ij[0]), trace.j2b(ij[1])]; + }; + + /* + * Convert from a/b coordinates to i/j grid-numbered coordinates. This requires searching + * through the a/b data arrays and assumes they are monotonic, which is presumed to have + * been enforced already. + */ + trace.a2i = function(aval) { + var i0 = Math.max(0, Math.min(search(aval, a), na - 2)); + var a0 = a[i0]; + var a1 = a[i0 + 1]; + return Math.max(0, Math.min(na - 1, i0 + (aval - a0) / (a1 - a0))); + }; + + trace.b2j = function(bval) { + var j0 = Math.max(0, Math.min(search(bval, b), nb - 2)); + var b0 = b[j0]; + var b1 = b[j0 + 1]; + return Math.max(0, Math.min(nb - 1, j0 + (bval - b0) / (b1 - b0))); + }; + + trace.ab2ij = function(ab) { + return [trace.a2i(ab[0]), trace.b2j(ab[1])]; + }; + + /* + * Convert from i/j coordinates to x/y caretesian coordinates. This means either bilinear + * or bicubic spline evaluation, but the hard part is already done at this point. + */ + trace.i2c = function(i, j) { + return trace.evalxy([], i, j); + }; + + trace.ab2xy = function(aval, bval, extrapolate) { + if(!extrapolate && (aval < a[0] || aval > a[na - 1] | bval < b[0] || bval > b[nb - 1])) { + return [false, false]; + } + var i = trace.a2i(aval); + var j = trace.b2j(bval); + + var pt = trace.evalxy([], i, j); + + if(extrapolate) { + // This section uses the boundary derivatives to extrapolate linearly outside + // the defined range. Consider a scatter line with one point inside the carpet + // axis and one point outside. If we don't extrapolate, we can't draw the line + // at all. + var iex = 0; + var jex = 0; + var der = []; + + var i0, ti, j0, tj; + if(aval < a[0]) { + i0 = 0; + ti = 0; + iex = (aval - a[0]) / (a[1] - a[0]); + } else if(aval > a[na - 1]) { + i0 = na - 2; + ti = 1; + iex = (aval - a[na - 1]) / (a[na - 1] - a[na - 2]); + } else { + i0 = Math.max(0, Math.min(na - 2, Math.floor(i))); + ti = i - i0; + } + + if(bval < b[0]) { + j0 = 0; + tj = 0; + jex = (bval - b[0]) / (b[1] - b[0]); + } else if(bval > b[nb - 1]) { + j0 = nb - 2; + tj = 1; + jex = (bval - b[nb - 1]) / (b[nb - 1] - b[nb - 2]); + } else { + j0 = Math.max(0, Math.min(nb - 2, Math.floor(j))); + tj = j - j0; + } + + if(iex) { + trace.dxydi(der, i0, j0, ti, tj); + pt[0] += der[0] * iex; + pt[1] += der[1] * iex; + } + + if(jex) { + trace.dxydj(der, i0, j0, ti, tj); + pt[0] += der[0] * jex; + pt[1] += der[1] * jex; + } + } + + return pt; + }; + + + trace.c2p = function(xy, xa, ya) { + return [xa.c2p(xy[0]), ya.c2p(xy[1])]; + }; + + trace.p2x = function(p, xa, ya) { + return [xa.p2c(p[0]), ya.p2c(p[1])]; + }; + + trace.dadi = function(i /* , u*/) { + // Right now only a piecewise linear a or b basis is permitted since smoother interpolation + // would cause monotonicity problems. As a retult, u is entirely disregarded in this + // computation, though we'll specify it as a parameter for the sake of completeness and + // future-proofing. It would be possible to use monotonic cubic interpolation, for example. + // + // See: https://en.wikipedia.org/wiki/Monotone_cubic_interpolation + + // u = u || 0; + + var i0 = Math.max(0, Math.min(a.length - 2, i)); + + // The step (demoninator) is implicitly 1 since that's the grid spacing. + return a[i0 + 1] - a[i0]; + }; + + trace.dbdj = function(j /* , v*/) { + // See above caveats for dadi which also apply here + var j0 = Math.max(0, Math.min(b.length - 2, j)); + + // The step (demoninator) is implicitly 1 since that's the grid spacing. + return b[j0 + 1] - b[j0]; + }; + + // Takes: grid cell coordinate (i, j) and fractional grid cell coordinates (u, v) + // Returns: (dx/da, dy/db) + // + // NB: separate grid cell + fractional grid cell coordinate format is due to the discontinuous + // derivative, as described better in create_i_derivative_evaluator.js + trace.dxyda = function(i0, j0, u, v) { + var dxydi = trace.dxydi(null, i0, j0, u, v); + var dadi = trace.dadi(i0, u); + + return [dxydi[0] / dadi, dxydi[1] / dadi]; + }; + + trace.dxydb = function(i0, j0, u, v) { + var dxydj = trace.dxydj(null, i0, j0, u, v); + var dbdj = trace.dbdj(j0, v); + + return [dxydj[0] / dbdj, dxydj[1] / dbdj]; + }; + + // Sometimes we don't care about precision and all we really want is decent rough + // directions (as is the case with labels). In that case, we can do a very rough finite + // difference and spare having to worry about precise grid coordinates: + trace.dxyda_rough = function(a, b, reldiff) { + var h = arange * (reldiff || 0.1); + var plus = trace.ab2xy(a + h, b, true); + var minus = trace.ab2xy(a - h, b, true); + + return [ + (plus[0] - minus[0]) * 0.5 / h, + (plus[1] - minus[1]) * 0.5 / h + ]; + }; + + trace.dxydb_rough = function(a, b, reldiff) { + var h = brange * (reldiff || 0.1); + var plus = trace.ab2xy(a, b + h, true); + var minus = trace.ab2xy(a, b - h, true); + + return [ + (plus[0] - minus[0]) * 0.5 / h, + (plus[1] - minus[1]) * 0.5 / h + ]; + }; + + trace.dpdx = function(xa) { + return xa._m; + }; + + trace.dpdy = function(ya) { + return ya._m; + }; +}; + +},{"../../lib/search":699,"./compute_control_points":850,"./constants":851,"./create_i_derivative_evaluator":852,"./create_j_derivative_evaluator":853,"./create_spline_evaluator":854}],865:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Lib = require('../../lib'); + +/* + * Given a 2D array as well as a basis in either direction, this function fills in the + * 2D array using a combination of smoothing and extrapolation. This is rather important + * for carpet plots since it's used for layout so that we can't simply omit or blank out + * points. We need a reasonable guess so that the interpolation puts points somewhere + * even if we were to somehow represent that the data was missing later on. + * + * input: + * - data: 2D array of arrays + * - a: array such that a.length === data[0].length + * - b: array such that b.length === data.length + */ +module.exports = function smoothFill2dArray(data, a, b) { + var i, j, k; + var ip = []; + var jp = []; + // var neighborCnts = []; + + var ni = data[0].length; + var nj = data.length; + + function avgSurrounding(i, j) { + // As a low-quality start, we can simply average surrounding points (in a not + // non-uniform grid aware manner): + var sum = 0.0; + var val; + var cnt = 0; + if(i > 0 && (val = data[j][i - 1]) !== undefined) { + cnt++; + sum += val; + } + if(i < ni - 1 && (val = data[j][i + 1]) !== undefined) { + cnt++; + sum += val; + } + if(j > 0 && (val = data[j - 1][i]) !== undefined) { + cnt++; + sum += val; + } + if(j < nj - 1 && (val = data[j + 1][i]) !== undefined) { + cnt++; + sum += val; + } + return sum / Math.max(1, cnt); + + } + + // This loop iterates over all cells. Any cells that are null will be noted and those + // are the only points we will loop over and update via laplace's equation. Points with + // any neighbors will receive the average. If there are no neighboring points, then they + // will be set to zero. Also as we go, track the maximum magnitude so that we can scale + // our tolerance accordingly. + var dmax = 0.0; + for(i = 0; i < ni; i++) { + for(j = 0; j < nj; j++) { + if(data[j][i] === undefined) { + ip.push(i); + jp.push(j); + + data[j][i] = avgSurrounding(i, j); + // neighborCnts.push(result.neighbors); + } + dmax = Math.max(dmax, Math.abs(data[j][i])); + } + } + + if(!ip.length) return data; + + // The tolerance doesn't need to be excessive. It's just for display positioning + var dxp, dxm, dap, dam, dbp, dbm, c, d, diff, reldiff, overrelaxation; + var tol = 1e-5; + var resid = 0; + var itermax = 100; + var iter = 0; + var n = ip.length; + do { + resid = 0; + // Normally we'd loop in two dimensions, but not all points are blank and need + // an update, so we instead loop only over the points that were tabulated above + for(k = 0; k < n; k++) { + i = ip[k]; + j = jp[k]; + // neighborCnt = neighborCnts[k]; + + // Track a counter for how many contributions there are. We'll use this counter + // to average at the end, which reduces to laplace's equation with neumann boundary + // conditions on the first derivative (second derivative is zero so that we get + // a nice linear extrapolation at the boundaries). + var boundaryCnt = 0; + var newVal = 0; + + var d0, d1, x0, x1, i0, j0; + if(i === 0) { + // If this lies along the i = 0 boundary, extrapolate from the two points + // to the right of this point. Note that the finite differences take into + // account non-uniform grid spacing: + i0 = Math.min(ni - 1, 2); + x0 = a[i0]; + x1 = a[1]; + d0 = data[j][i0]; + d1 = data[j][1]; + newVal += d1 + (d1 - d0) * (a[0] - x1) / (x1 - x0); + boundaryCnt++; + } else if(i === ni - 1) { + // If along the high i boundary, extrapolate from the two points to the + // left of this point + i0 = Math.max(0, ni - 3); + x0 = a[i0]; + x1 = a[ni - 2]; + d0 = data[j][i0]; + d1 = data[j][ni - 2]; + newVal += d1 + (d1 - d0) * (a[ni - 1] - x1) / (x1 - x0); + boundaryCnt++; + } + + if((i === 0 || i === ni - 1) && (j > 0 && j < nj - 1)) { + // If along the min(i) or max(i) boundaries, also smooth vertically as long + // as we're not in a corner. Note that the finite differences used here + // are also aware of nonuniform grid spacing: + dxp = b[j + 1] - b[j]; + dxm = b[j] - b[j - 1]; + newVal += (dxm * data[j + 1][i] + dxp * data[j - 1][i]) / (dxm + dxp); + boundaryCnt++; + } + + if(j === 0) { + // If along the j = 0 boundary, extrpolate this point from the two points + // above it + j0 = Math.min(nj - 1, 2); + x0 = b[j0]; + x1 = b[1]; + d0 = data[j0][i]; + d1 = data[1][i]; + newVal += d1 + (d1 - d0) * (b[0] - x1) / (x1 - x0); + boundaryCnt++; + } else if(j === nj - 1) { + // Same for the max j boundary from the cells below it: + j0 = Math.max(0, nj - 3); + x0 = b[j0]; + x1 = b[nj - 2]; + d0 = data[j0][i]; + d1 = data[nj - 2][i]; + newVal += d1 + (d1 - d0) * (b[nj - 1] - x1) / (x1 - x0); + boundaryCnt++; + } + + if((j === 0 || j === nj - 1) && (i > 0 && i < ni - 1)) { + // Now average points to the left/right as long as not in a corner: + dxp = a[i + 1] - a[i]; + dxm = a[i] - a[i - 1]; + newVal += (dxm * data[j][i + 1] + dxp * data[j][i - 1]) / (dxm + dxp); + boundaryCnt++; + } + + if(!boundaryCnt) { + // If none of the above conditions were triggered, then this is an interior + // point and we can just do a laplace equation update. As above, these differences + // are aware of nonuniform grid spacing: + dap = a[i + 1] - a[i]; + dam = a[i] - a[i - 1]; + dbp = b[j + 1] - b[j]; + dbm = b[j] - b[j - 1]; + + // These are just some useful constants for the iteration, which is perfectly + // straightforward but a little long to derive from f_xx + f_yy = 0. + c = dap * dam * (dap + dam); + d = dbp * dbm * (dbp + dbm); + + newVal = (c * (dbm * data[j + 1][i] + dbp * data[j - 1][i]) + + d * (dam * data[j][i + 1] + dap * data[j][i - 1])) / + (d * (dam + dap) + c * (dbm + dbp)); + } else { + // If we did have contributions from the boundary conditions, then average + // the result from the various contributions: + newVal /= boundaryCnt; + } + + // Jacobi updates are ridiculously slow to converge, so this approach uses a + // Gauss-seidel iteration which is dramatically faster. + diff = newVal - data[j][i]; + reldiff = diff / dmax; + resid += reldiff * reldiff; + + // Gauss-Seidel-ish iteration, omega chosen based on heuristics and some + // quick tests. + // + // NB: Don't overrelax the boundarie. Otherwise set an overrelaxation factor + // which is a little low but safely optimal-ish: + overrelaxation = boundaryCnt ? 0 : 0.85; + + // If there are four non-null neighbors, then we want a simple average without + // overrelaxation. If all the surrouding points are null, then we want the full + // overrelaxation + // + // Based on experiments, this actually seems to slow down convergence just a bit. + // I'll leave it here for reference in case this needs to be revisited, but + // it seems to work just fine without this. + // if (overrelaxation) overrelaxation *= (4 - neighborCnt) / 4; + + data[j][i] += diff * (1 + overrelaxation); + } + + resid = Math.sqrt(resid); + } while(iter++ < itermax && resid > tol); + + Lib.log('Smoother converged to', resid, 'after', iter, 'iterations'); + + return data; +}; + +},{"../../lib":685}],866:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var hasColumns = require('./has_columns'); +var convertColumnData = require('../heatmap/convert_column_xyz'); + +module.exports = function handleXYDefaults(traceIn, traceOut, coerce) { + var cols = []; + var x = coerce('x'); + + var needsXTransform = x && !hasColumns(x); + if(needsXTransform) cols.push('x'); + + traceOut._cheater = !x; + + var y = coerce('y'); + + var needsYTransform = y && !hasColumns(y); + if(needsYTransform) cols.push('y'); + + if(!x && !y) return; + + if(cols.length) { + convertColumnData(traceOut, traceOut.aaxis, traceOut.baxis, 'a', 'b', cols); + } + + return true; +}; + +},{"../heatmap/convert_column_xyz":907,"./has_columns":856}],867:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155761,7 +156583,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../../plots/attributes":727,"../scattergeo/attributes":976}],844:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../../plots/attributes":722,"../scattergeo/attributes":1013}],868:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155780,7 +156602,7 @@ module.exports = function calc(gd, trace) { colorscaleCalc(trace, trace.z, '', 'z'); }; -},{"../../components/colorscale/calc":591}],845:[function(require,module,exports){ +},{"../../components/colorscale/calc":584}],869:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155835,7 +156657,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('hoverinfo', (layout._dataLength === 1) ? 'location+z+text' : undefined); }; -},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":843}],846:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":867}],870:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155854,7 +156676,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],847:[function(require,module,exports){ +},{}],871:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155924,7 +156746,7 @@ function makeHoverInfo(pointData, trace, pt, axis) { pointData.extraText = text.join('
'); } -},{"../../plots/cartesian/axes":729,"./attributes":843}],848:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"./attributes":867}],872:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155961,7 +156783,7 @@ Choropleth.meta = { module.exports = Choropleth; -},{"../../plots/geo":757,"../heatmap/colorbar":868,"./attributes":843,"./calc":844,"./defaults":845,"./event_data":846,"./hover":847,"./plot":849}],849:[function(require,module,exports){ +},{"../../plots/geo":752,"../heatmap/colorbar":906,"./attributes":867,"./calc":868,"./defaults":869,"./event_data":870,"./hover":871,"./plot":873}],873:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156095,7 +156917,7 @@ function style(geo) { }); } -},{"../../components/color":585,"../../components/colorscale":599,"../../components/drawing":608,"../../lib/array_to_calc_item":677,"../../lib/geo_location_utils":685,"../../lib/topojson_utils":711,"../../plots/geo/constants":755,"d3":114}],850:[function(require,module,exports){ +},{"../../components/color":578,"../../components/colorscale":592,"../../components/drawing":602,"../../lib/array_to_calc_item":671,"../../lib/geo_location_utils":680,"../../lib/topojson_utils":706,"../../plots/geo/constants":750,"d3":107}],874:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156110,6 +156932,7 @@ var heatmapAttrs = require('../heatmap/attributes'); var scatterAttrs = require('../scatter/attributes'); var colorscaleAttrs = require('../../components/colorscale/attributes'); var colorbarAttrs = require('../../components/colorbar/attributes'); +var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; var scatterLineAttrs = scatterAttrs.line; @@ -156216,7 +157039,7 @@ module.exports = extendFlat({}, { ].join(' ') }), width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash, + dash: dash, smoothing: extendFlat({}, scatterLineAttrs.smoothing, { description: [ 'Sets the amount of smoothing for the contour lines,', @@ -156230,7 +157053,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../heatmap/attributes":865,"../scatter/attributes":947}],851:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../components/drawing/attributes":601,"../../lib/extend":677,"../heatmap/attributes":903,"../scatter/attributes":976}],875:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156334,7 +157157,7 @@ function autoContours(start, end, ncontours) { return dummyAx; } -},{"../../lib":690,"../../plots/cartesian/axes":729,"../heatmap/calc":866}],852:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../heatmap/calc":904}],876:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156359,7 +157182,7 @@ module.exports = function colorbar(gd, cd) { gd._fullLayout._infolayer.selectAll('.' + cbId).remove(); - if(trace.showscale === false) { + if(!trace.showscale) { Plots.autoMargin(gd, cbId); return; } @@ -156396,7 +157219,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":588,"../../plots/plots":792,"./end_plus":856,"./make_color_map":860}],853:[function(require,module,exports){ +},{"../../components/colorbar/draw":581,"../../plots/plots":787,"./end_plus":880,"./make_color_map":884}],877:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156436,7 +157259,7 @@ module.exports.CHOOSESADDLE = { // substitute to be used up later? module.exports.SADDLEREMAINDER = {1: 4, 2: 8, 4: 1, 7: 13, 8: 2, 11: 14, 13: 7, 14: 11}; -},{}],854:[function(require,module,exports){ +},{}],878:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156468,7 +157291,7 @@ module.exports = function handleContourDefaults(traceIn, traceOut, coerce) { if(autoContour || !contourSize) coerce('ncontours'); }; -},{"../../lib":690,"./attributes":850}],855:[function(require,module,exports){ +},{"../../lib":685,"./attributes":874}],879:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156507,7 +157330,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout handleStyleDefaults(traceIn, traceOut, coerce, layout); }; -},{"../../lib":690,"../heatmap/has_columns":872,"../heatmap/xyz_defaults":880,"./attributes":850,"./contours_defaults":854,"./style_defaults":864}],856:[function(require,module,exports){ +},{"../../lib":685,"../heatmap/has_columns":910,"../heatmap/xyz_defaults":918,"./attributes":874,"./contours_defaults":878,"./style_defaults":888}],880:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156527,7 +157350,7 @@ module.exports = function endPlus(contours) { return contours.end + contours.size / 1e6; }; -},{}],857:[function(require,module,exports){ +},{}],881:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156541,34 +157364,38 @@ module.exports = function endPlus(contours) { var Lib = require('../../lib'); var constants = require('./constants'); -module.exports = function findAllPaths(pathinfo) { +module.exports = function findAllPaths(pathinfo, xtol, ytol) { var cnt, startLoc, i, pi, j; + // Default just passes these values through as they were before: + xtol = xtol || 0.01; + ytol = ytol || 0.01; + for(i = 0; i < pathinfo.length; i++) { pi = pathinfo[i]; for(j = 0; j < pi.starts.length; j++) { startLoc = pi.starts[j]; - makePath(pi, startLoc, 'edge'); + makePath(pi, startLoc, 'edge', xtol, ytol); } cnt = 0; while(Object.keys(pi.crossings).length && cnt < 10000) { cnt++; startLoc = Object.keys(pi.crossings)[0].split(',').map(Number); - makePath(pi, startLoc); + makePath(pi, startLoc, undefined, xtol, ytol); } if(cnt === 10000) Lib.log('Infinite loop in contour?'); } }; -function equalPts(pt1, pt2) { - return Math.abs(pt1[0] - pt2[0]) < 0.01 && - Math.abs(pt1[1] - pt2[1]) < 0.01; +function equalPts(pt1, pt2, xtol, ytol) { + return Math.abs(pt1[0] - pt2[0]) < xtol && + Math.abs(pt1[1] - pt2[1]) < ytol; } function ptDist(pt1, pt2) { @@ -156577,17 +157404,17 @@ function ptDist(pt1, pt2) { return Math.sqrt(dx * dx + dy * dy); } -function makePath(pi, loc, edgeflag) { - var startLocStr = loc.join(','), - locStr = startLocStr, - mi = pi.crossings[locStr], - marchStep = startStep(mi, edgeflag, loc), - // start by going backward a half step and finding the crossing point - pts = [getInterpPx(pi, loc, [-marchStep[0], -marchStep[1]])], - startStepStr = marchStep.join(','), - m = pi.z.length, - n = pi.z[0].length, - cnt; +function makePath(pi, loc, edgeflag, xtol, ytol) { + var startLocStr = loc.join(','); + var locStr = startLocStr; + var mi = pi.crossings[locStr]; + var marchStep = startStep(mi, edgeflag, loc); + // start by going backward a half step and finding the crossing point + var pts = [getInterpPx(pi, loc, [-marchStep[0], -marchStep[1]])]; + var startStepStr = marchStep.join(','); + var m = pi.z.length; + var n = pi.z[0].length; + var cnt; // now follow the path for(cnt = 0; cnt < 10000; cnt++) { // just to avoid infinite loops @@ -156611,7 +157438,7 @@ function makePath(pi, loc, edgeflag) { loc[1] += marchStep[1]; // don't include the same point multiple times - if(equalPts(pts[pts.length - 1], pts[pts.length - 2])) pts.pop(); + if(equalPts(pts[pts.length - 1], pts[pts.length - 2], xtol, ytol)) pts.pop(); locStr = loc.join(','); var atEdge = (marchStep[0] && (loc[0] < 0 || loc[0] > n - 2)) || @@ -156627,7 +157454,7 @@ function makePath(pi, loc, edgeflag) { if(cnt === 10000) { Lib.log('Infinite loop in contour?'); } - var closedpath = equalPts(pts[0], pts[pts.length - 1]), + var closedpath = equalPts(pts[0], pts[pts.length - 1], xtol, ytol), totaldist = 0, distThresholdFactor = 0.2 * pi.smoothing, alldists = [], @@ -156716,7 +157543,7 @@ function makePath(pi, loc, edgeflag) { // edge path - does it start where an existing edge path ends, or vice versa? var merged = false; pi.edgepaths.forEach(function(edgepath, edgei) { - if(!merged && equalPts(edgepath[0], pts[pts.length - 1])) { + if(!merged && equalPts(edgepath[0], pts[pts.length - 1], xtol, ytol)) { pts.pop(); merged = true; @@ -156724,7 +157551,7 @@ function makePath(pi, loc, edgeflag) { var doublemerged = false; pi.edgepaths.forEach(function(edgepath2, edgei2) { if(!doublemerged && equalPts( - edgepath2[edgepath2.length - 1], pts[0])) { + edgepath2[edgepath2.length - 1], pts[0], xtol, ytol)) { doublemerged = true; pts.splice(0, 1); pi.edgepaths.splice(edgei, 1); @@ -156744,7 +157571,7 @@ function makePath(pi, loc, edgeflag) { } }); pi.edgepaths.forEach(function(edgepath, edgei) { - if(!merged && equalPts(edgepath[edgepath.length - 1], pts[0])) { + if(!merged && equalPts(edgepath[edgepath.length - 1], pts[0], xtol, ytol)) { pts.splice(0, 1); pi.edgepaths[edgei] = edgepath.concat(pts); merged = true; @@ -156787,6 +157614,7 @@ function getInterpPx(pi, loc, step) { if(step[1]) { var dx = (pi.level - zxy) / (pi.z[locy][locx + 1] - zxy); + return [xa.c2p((1 - dx) * pi.x[locx] + dx * pi.x[locx + 1], true), ya.c2p(pi.y[locy], true)]; } @@ -156797,7 +157625,7 @@ function getInterpPx(pi, loc, step) { } } -},{"../../lib":690,"./constants":853}],858:[function(require,module,exports){ +},{"../../lib":685,"./constants":877}],882:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156816,7 +157644,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return heatmapHoverPoints(pointData, xval, yval, hovermode, true); }; -},{"../heatmap/hover":873}],859:[function(require,module,exports){ +},{"../heatmap/hover":911}],883:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156857,7 +157685,7 @@ Contour.meta = { module.exports = Contour; -},{"../../plots/cartesian":739,"./attributes":850,"./calc":851,"./colorbar":852,"./defaults":855,"./hover":858,"./plot":862,"./style":863}],860:[function(require,module,exports){ +},{"../../plots/cartesian":734,"./attributes":874,"./calc":875,"./colorbar":876,"./defaults":879,"./hover":882,"./plot":886,"./style":887}],884:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156881,6 +157709,11 @@ module.exports = function makeColorMap(trace) { nc = Math.floor((end - start) / cs) + 1, extra = contours.coloring === 'lines' ? 0 : 1; + if(!isFinite(cs)) { + cs = 1; + nc = 1; + } + var scl = trace.colorscale, len = scl.length; @@ -156936,7 +157769,7 @@ module.exports = function makeColorMap(trace) { }); }; -},{"../../components/colorscale":599,"./end_plus":856,"d3":114}],861:[function(require,module,exports){ +},{"../../components/colorscale":592,"./end_plus":880,"d3":107}],885:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157028,7 +157861,7 @@ function getMarchingIndex(val, corners) { return (mi === 15) ? 0 : mi; } -},{"./constants":853}],862:[function(require,module,exports){ +},{"./constants":877}],886:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157308,7 +158141,8 @@ function makeLines(plotgroup, pathinfo, contours) { .attr('d', function(d) { return Drawing.smoothopen(d, smoothing); }) - .style('stroke-miterlimit', 1); + .style('stroke-miterlimit', 1) + .style('vector-effect', 'non-scaling-stroke'); var closedcontourlines = linegroup.selectAll('path.closedline') .data(function(d) { return d.paths; }); @@ -157319,7 +158153,8 @@ function makeLines(plotgroup, pathinfo, contours) { .attr('d', function(d) { return Drawing.smoothclosed(d, smoothing); }) - .style('stroke-miterlimit', 1); + .style('stroke-miterlimit', 1) + .style('vector-effect', 'non-scaling-stroke'); } function clipGaps(plotGroup, plotinfo, cd0, perimeter) { @@ -157390,7 +158225,7 @@ function makeClipMask(cd0) { return z; } -},{"../../components/drawing":608,"../../lib":690,"../heatmap/plot":878,"./end_plus":856,"./find_all_paths":857,"./make_crossings":861,"d3":114}],863:[function(require,module,exports){ +},{"../../components/drawing":602,"../../lib":685,"../heatmap/plot":916,"./end_plus":880,"./find_all_paths":881,"./make_crossings":885,"d3":107}],887:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157452,7 +158287,7 @@ module.exports = function style(gd) { heatmapStyle(gd); }; -},{"../../components/drawing":608,"../heatmap/style":879,"./make_color_map":860,"d3":114}],864:[function(require,module,exports){ +},{"../../components/drawing":602,"../heatmap/style":917,"./make_color_map":884,"d3":107}],888:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157467,15 +158302,15 @@ module.exports = function style(gd) { var colorscaleDefaults = require('../../components/colorscale/defaults'); -module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout) { +module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout, defaultColor, defaultWidth) { var coloring = coerce('contours.coloring'); var showLines; if(coloring === 'fill') showLines = coerce('contours.showlines'); if(showLines !== false) { - if(coloring !== 'lines') coerce('line.color', '#000'); - coerce('line.width', 0.5); + if(coloring !== 'lines') coerce('line.color', defaultColor || '#000'); + coerce('line.width', defaultWidth === undefined ? 0.5 : defaultWidth); coerce('line.dash'); } @@ -157488,7 +158323,1485 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout) } }; -},{"../../components/colorscale/defaults":594}],865:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587}],889:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var heatmapAttrs = require('../heatmap/attributes'); +var scatterAttrs = require('../scatter/attributes'); +var colorscaleAttrs = require('../../components/colorscale/attributes'); +var colorbarAttrs = require('../../components/colorbar/attributes'); + +var extendFlat = require('../../lib/extend').extendFlat; + +var scatterLineAttrs = scatterAttrs.line; +var constants = require('./constants'); + +module.exports = extendFlat({}, { + carpet: { + valType: 'string', + role: 'info', + description: [ + 'The `carpet` of the carpet axes on which this contour trace lies' + ].join(' ') + }, + z: heatmapAttrs.z, + a: heatmapAttrs.x, + a0: heatmapAttrs.x0, + da: heatmapAttrs.dx, + b: heatmapAttrs.y, + b0: heatmapAttrs.y0, + db: heatmapAttrs.dy, + text: heatmapAttrs.text, + transpose: heatmapAttrs.transpose, + atype: heatmapAttrs.xtype, + btype: heatmapAttrs.ytype, + + mode: { + valType: 'flaglist', + flags: ['lines', 'fill'], + extras: ['none'], + role: 'info', + description: ['The mode.'].join(' ') + }, + + connectgaps: heatmapAttrs.connectgaps, + + fillcolor: { + valType: 'color', + role: 'style', + description: [ + 'Sets the fill color.', + 'Defaults to a half-transparent variant of the line color,', + 'marker color, or marker line color, whichever is available.' + ].join(' ') + }, + + autocontour: { + valType: 'boolean', + dflt: true, + role: 'style', + description: [ + 'Determines whether or not the contour level attributes are', + 'picked by an algorithm.', + 'If *true*, the number of contour levels can be set in `ncontours`.', + 'If *false*, set the contour level attributes in `contours`.' + ].join(' ') + }, + ncontours: { + valType: 'integer', + dflt: 15, + min: 1, + role: 'style', + description: [ + 'Sets the maximum number of contour levels. The actual number', + 'of contours will be chosen automatically to be less than or', + 'equal to the value of `ncontours`.', + 'Has an effect only if `autocontour` is *true* or if', + '`contours.size` is missing.' + ].join(' ') + }, + + contours: { + type: { + valType: 'enumerated', + values: ['levels', 'constraint'], + dflt: 'levels', + role: 'info', + description: [ + 'If `levels`, the data is represented as a contour plot with multiple', + 'levels displayed. If `constraint`, the data is represented as constraints', + 'with the invalid region shaded as specified by the `operation` and', + '`value` parameters.' + ].join(' ') + }, + start: { + valType: 'number', + dflt: null, + role: 'style', + description: [ + 'Sets the starting contour level value.', + 'Must be less than `contours.end`' + ].join(' ') + }, + end: { + valType: 'number', + dflt: null, + role: 'style', + description: [ + 'Sets the end contour level value.', + 'Must be more than `contours.start`' + ].join(' ') + }, + size: { + valType: 'number', + dflt: null, + min: 0, + role: 'style', + description: [ + 'Sets the step between each contour level.', + 'Must be positive.' + ].join(' ') + }, + coloring: { + valType: 'enumerated', + values: ['fill', 'lines', 'none'], + dflt: 'fill', + role: 'style', + description: [ + 'Determines the coloring method showing the contour values.', + 'If *fill*, coloring is done evenly between each contour level', + 'If *lines*, coloring is done on the contour lines.', + 'If *none*, no coloring is applied on this trace.' + ].join(' ') + }, + showlines: { + valType: 'boolean', + dflt: true, + role: 'style', + description: [ + 'Determines whether or not the contour lines are drawn.', + 'Has only an effect if `contours.coloring` is set to *fill*.' + ].join(' ') + }, + operation: { + valType: 'enumerated', + values: [].concat(constants.INEQUALITY_OPS).concat(constants.INTERVAL_OPS).concat(constants.SET_OPS), + role: 'info', + dflt: '=', + description: [ + 'Sets the filter operation.', + + '*=* keeps items equal to `value`', + + '*<* keeps items less than `value`', + '*<=* keeps items less than or equal to `value`', + + '*>* keeps items greater than `value`', + '*>=* keeps items greater than or equal to `value`', + + '*[]* keeps items inside `value[0]` to value[1]` including both bounds`', + '*()* keeps items inside `value[0]` to value[1]` excluding both bounds`', + '*[)* keeps items inside `value[0]` to value[1]` including `value[0]` but excluding `value[1]', + '*(]* keeps items inside `value[0]` to value[1]` excluding `value[0]` but including `value[1]', + + '*][* keeps items outside `value[0]` to value[1]` and equal to both bounds`', + '*)(* keeps items outside `value[0]` to value[1]`', + '*](* keeps items outside `value[0]` to value[1]` and equal to `value[0]`', + '*)[* keeps items outside `value[0]` to value[1]` and equal to `value[1]`' + ].join(' ') + }, + value: { + valType: 'any', + dflt: 0, + role: 'info', + description: [ + 'Sets the value or values by which to filter by.', + + 'Values are expected to be in the same type as the data linked', + 'to *target*.', + + 'When `operation` is set to one of the inequality values', + '(' + constants.INEQUALITY_OPS + ')', + '*value* is expected to be a number or a string.', + + 'When `operation` is set to one of the interval value', + '(' + constants.INTERVAL_OPS + ')', + '*value* is expected to be 2-item array where the first item', + 'is the lower bound and the second item is the upper bound.', + + 'When `operation`, is set to one of the set value', + '(' + constants.SET_OPS + ')', + '*value* is expected to be an array with as many items as', + 'the desired set elements.' + ].join(' ') + } + }, + + line: { + color: extendFlat({}, scatterLineAttrs.color, { + description: [ + 'Sets the color of the contour level.', + 'Has no if `contours.coloring` is set to *lines*.' + ].join(' ') + }), + width: scatterLineAttrs.width, + dash: scatterLineAttrs.dash, + smoothing: extendFlat({}, scatterLineAttrs.smoothing, { + description: [ + 'Sets the amount of smoothing for the contour lines,', + 'where *0* corresponds to no smoothing.' + ].join(' ') + }) + } +}, + colorscaleAttrs, + { autocolorscale: extendFlat({}, colorscaleAttrs.autocolorscale, {dflt: false}) }, + { colorbar: colorbarAttrs } +); + +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../heatmap/attributes":903,"../scatter/attributes":976,"./constants":892}],890:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Lib = require('../../lib'); +var Axes = require('../../plots/cartesian/axes'); +var extendFlat = require('../../lib').extendFlat; +var Registry = require('../../registry'); +var colorscaleCalc = require('../../components/colorscale/calc'); +var hasColumns = require('../heatmap/has_columns'); +var convertColumnData = require('../heatmap/convert_column_xyz'); +var clean2dArray = require('../heatmap/clean_2d_array'); +var maxRowLength = require('../heatmap/max_row_length'); +var interp2d = require('../heatmap/interp2d'); +var findEmpties = require('../heatmap/find_empties'); +var makeBoundArray = require('../heatmap/make_bound_array'); +var supplyDefaults = require('./defaults'); +var lookupCarpet = require('../carpet/lookup_carpetid'); + +// most is the same as heatmap calc, then adjust it +// though a few things inside heatmap calc still look for +// contour maps, because the makeBoundArray calls are too entangled +module.exports = function calc(gd, trace) { + var carpet = trace.carpetTrace = lookupCarpet(gd, trace); + if(!carpet || !carpet.visible || carpet.visible === 'legendonly') return; + + if(!trace.a || !trace.b) { + // Look up the original incoming carpet data: + var carpetdata = gd.data[carpet.index]; + + // Look up the incoming trace data, *except* perform a shallow + // copy so that we're not actually modifying it when we use it + // to supply defaults: + var tracedata = gd.data[trace.index]; + // var tracedata = extendFlat({}, gd.data[trace.index]); + + // If the data is not specified + if(!tracedata.a) tracedata.a = carpetdata.a; + if(!tracedata.b) tracedata.b = carpetdata.b; + + supplyDefaults(tracedata, trace, trace._defaultColor, gd._fullLayout); + } + + var cd = heatmappishCalc(gd, trace), + contours = trace.contours; + + // Autocontour is unset for constraint plots so also autocontour if undefind: + if(trace.autocontour === true) { + var dummyAx = autoContours(trace.zmin, trace.zmax, trace.ncontours); + + contours.size = dummyAx.dtick; + + contours.start = Axes.tickFirst(dummyAx); + dummyAx.range.reverse(); + contours.end = Axes.tickFirst(dummyAx); + + if(contours.start === trace.zmin) contours.start += contours.size; + if(contours.end === trace.zmax) contours.end -= contours.size; + + // if you set a small ncontours, *and* the ends are exactly on zmin/zmax + // there's an edge case where start > end now. Make sure there's at least + // one meaningful contour, put it midway between the crossed values + if(contours.start > contours.end) { + contours.start = contours.end = (contours.start + contours.end) / 2; + } + + // copy auto-contour info back to the source data. + trace._input.contours = extendFlat({}, contours); + } + else { + // sanity checks on manually-supplied start/end/size + var start = contours.start, + end = contours.end, + inputContours = trace._input.contours; + + if(start > end) { + contours.start = inputContours.start = end; + end = contours.end = inputContours.end = start; + start = contours.start; + } + + if(!(contours.size > 0)) { + var sizeOut; + if(start === end) sizeOut = 1; + else sizeOut = autoContours(start, end, trace.ncontours).dtick; + + inputContours.size = contours.size = sizeOut; + } + } + + return cd; +}; + +/* + * autoContours: make a dummy axis object with dtick we can use + * as contours.size, and if needed we can use Axes.tickFirst + * with this axis object to calculate the start and end too + * + * start: the value to start the contours at + * end: the value to end at (must be > start) + * ncontours: max number of contours to make, like roughDTick + * + * returns: an axis object + */ +function autoContours(start, end, ncontours) { + var dummyAx = { + type: 'linear', + range: [start, end] + }; + + Axes.autoTicks( + dummyAx, + (end - start) / (ncontours || 15) + ); + + return dummyAx; +} + +function heatmappishCalc(gd, trace) { + // prepare the raw data + // run makeCalcdata on x and y even for heatmaps, in case of category mappings + var carpet = trace.carpetTrace; + var aax = carpet.aaxis, + bax = carpet.baxis, + isContour = Registry.traceIs(trace, 'contour'), + zsmooth = isContour ? 'best' : trace.zsmooth, + a, + a0, + da, + b, + b0, + db, + z, + i; + + // cancel minimum tick spacings (only applies to bars and boxes) + aax._minDtick = 0; + bax._minDtick = 0; + + if(hasColumns(trace)) convertColumnData(trace, aax, bax, 'a', 'b', ['z']); + + a = trace.a ? aax.makeCalcdata(trace, 'a') : []; + b = trace.b ? bax.makeCalcdata(trace, 'b') : []; + a0 = trace.a0 || 0; + da = trace.da || 1; + b0 = trace.b0 || 0; + db = trace.db || 1; + + z = clean2dArray(trace.z, trace.transpose); + + trace._emptypoints = findEmpties(z); + trace._interpz = interp2d(z, trace._emptypoints, trace._interpz); + + function noZsmooth(msg) { + zsmooth = trace._input.zsmooth = trace.zsmooth = false; + Lib.notifier('cannot fast-zsmooth: ' + msg); + } + + // check whether we really can smooth (ie all boxes are about the same size) + if(zsmooth === 'fast') { + if(aax.type === 'log' || bax.type === 'log') { + noZsmooth('log axis found'); + } + else { + if(a.length) { + var avgda = (a[a.length - 1] - a[0]) / (a.length - 1), + maxErrX = Math.abs(avgda / 100); + for(i = 0; i < a.length - 1; i++) { + if(Math.abs(a[i + 1] - a[i] - avgda) > maxErrX) { + noZsmooth('a scale is not linear'); + break; + } + } + } + if(b.length && zsmooth === 'fast') { + var avgdy = (b[b.length - 1] - b[0]) / (b.length - 1), + maxErrY = Math.abs(avgdy / 100); + for(i = 0; i < b.length - 1; i++) { + if(Math.abs(b[i + 1] - b[i] - avgdy) > maxErrY) { + noZsmooth('b scale is not linear'); + break; + } + } + } + } + } + + // create arrays of brick boundaries, to be used by autorange and heatmap.plot + var xlen = maxRowLength(z), + xIn = trace.xtype === 'scaled' ? '' : a, + xArray = makeBoundArray(trace, xIn, a0, da, xlen, aax), + yIn = trace.ytype === 'scaled' ? '' : b, + yArray = makeBoundArray(trace, yIn, b0, db, z.length, bax); + + var cd0 = { + a: xArray, + b: yArray, + z: z, + //mappedZ: mappedZ + }; + + if(trace.contours.type === 'levels') { + // auto-z and autocolorscale if applicable + colorscaleCalc(trace, z, '', 'z'); + } + + return [cd0]; +} + +},{"../../components/colorscale/calc":584,"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"../carpet/lookup_carpetid":858,"../heatmap/clean_2d_array":905,"../heatmap/convert_column_xyz":907,"../heatmap/find_empties":909,"../heatmap/has_columns":910,"../heatmap/interp2d":913,"../heatmap/make_bound_array":914,"../heatmap/max_row_length":915,"./defaults":896}],891:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = function(pathinfo, operation, perimeter, trace) { + // Abandon all hope, ye who enter here. + var i, v1, v2; + var na = trace.a.length; + var nb = trace.b.length; + var z = trace.z; + + var boundaryMax = -Infinity; + var boundaryMin = Infinity; + + for(i = 0; i < nb; i++) { + boundaryMin = Math.min(boundaryMin, z[i][0]); + boundaryMin = Math.min(boundaryMin, z[i][na - 1]); + boundaryMax = Math.max(boundaryMax, z[i][0]); + boundaryMax = Math.max(boundaryMax, z[i][na - 1]); + } + + for(i = 1; i < na - 1; i++) { + boundaryMin = Math.min(boundaryMin, z[0][i]); + boundaryMin = Math.min(boundaryMin, z[nb - 1][i]); + boundaryMax = Math.max(boundaryMax, z[0][i]); + boundaryMax = Math.max(boundaryMax, z[nb - 1][i]); + } + + switch(operation) { + case '>': + case '>=': + if(trace.contours.value > boundaryMax) { + pathinfo[0].prefixBoundary = true; + } + break; + case '<': + case '<=': + if(trace.contours.value < boundaryMin) { + pathinfo[0].prefixBoundary = true; + } + break; + case '[]': + case '()': + v1 = Math.min.apply(null, trace.contours.value); + v2 = Math.max.apply(null, trace.contours.value); + if(v2 < boundaryMin) { + pathinfo[0].prefixBoundary = true; + } + if(v1 > boundaryMax) { + pathinfo[0].prefixBoundary = true; + } + break; + case '][': + case ')(': + v1 = Math.min.apply(null, trace.contours.value); + v2 = Math.max.apply(null, trace.contours.value); + if(v1 < boundaryMin && v2 > boundaryMax) { + pathinfo[0].prefixBoundary = true; + } + break; + } +}; + +},{}],892:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = { + INEQUALITY_OPS: ['=', '<', '>=', '>', '<='], + INTERVAL_OPS: ['[]', '()', '[)', '(]', '][', ')(', '](', ')['], + SET_OPS: ['{}', '}{'] +}; + +},{}],893:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var constants = require('./constants'); +var isNumeric = require('fast-isnumeric'); + +// This syntax conforms to the existing filter transform syntax, but we don't care +// about open vs. closed intervals for simply drawing contours constraints: +module.exports['[]'] = makeRangeSettings('[]'); +module.exports['()'] = makeRangeSettings('()'); +module.exports['[)'] = makeRangeSettings('[)'); +module.exports['(]'] = makeRangeSettings('(]'); + +// Inverted intervals simply flip the sign: +module.exports[']['] = makeRangeSettings(']['); +module.exports[')('] = makeRangeSettings(')('); +module.exports[')['] = makeRangeSettings(')['); +module.exports[']('] = makeRangeSettings(']('); + +module.exports['>'] = makeInequalitySettings('>'); +module.exports['>='] = makeInequalitySettings('>='); +module.exports['<'] = makeInequalitySettings('<'); +module.exports['<='] = makeInequalitySettings('<='); +module.exports['='] = makeInequalitySettings('='); + +// This does not in any way shape or form support calendars. It's adapted from +// transforms/filter.js. +function coerceValue(operation, value) { + var hasArrayValue = Array.isArray(value); + + var coercedValue; + + function coerce(value) { + return isNumeric(value) ? (+value) : null; + } + + if(constants.INEQUALITY_OPS.indexOf(operation) !== -1) { + coercedValue = hasArrayValue ? coerce(value[0]) : coerce(value); + } else if(constants.INTERVAL_OPS.indexOf(operation) !== -1) { + coercedValue = hasArrayValue ? + [coerce(value[0]), coerce(value[1])] : + [coerce(value), coerce(value)]; + } else if(constants.SET_OPS.indexOf(operation) !== -1) { + coercedValue = hasArrayValue ? value.map(coerce) : [coerce(value)]; + } + + return coercedValue; +} + +// Returns a parabola scaled so that the min/max is either +/- 1 and zero at the two values +// provided. The data is mapped by this function when constructing intervals so that it's +// very easy to construct contours as normal. +function makeRangeSettings(operation) { + return function(value) { + value = coerceValue(operation, value); + + // Ensure proper ordering: + var min = Math.min(value[0], value[1]); + var max = Math.max(value[0], value[1]); + + return { + start: min, + end: max, + size: max - min + }; + }; +} + +function makeInequalitySettings(operation) { + return function(value) { + value = coerceValue(operation, value); + + return { + start: value, + end: Infinity, + size: Infinity + }; + }; +} + +},{"./constants":892,"fast-isnumeric":116}],894:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var constraintMapping = require('./constraint_mapping'); +var isNumeric = require('fast-isnumeric'); + +module.exports = function(coerce, contours) { + var zvalue; + var scalarValuedOps = ['=', '<', '<=', '>', '>=']; + + if(scalarValuedOps.indexOf(contours.operation) === -1) { + // Requires an array of two numbers: + coerce('contours.value', [0, 1]); + + if(!Array.isArray(contours.value)) { + if(isNumeric(contours.value)) { + zvalue = parseFloat(contours.value); + contours.value = [zvalue, zvalue + 1]; + } + } else if(contours.value.length > 2) { + contours.value = contours.value.slice(2); + } else if(contours.length === 0) { + contours.value = [0, 1]; + } else if(contours.length < 2) { + zvalue = parseFloat(contours.value[0]); + contours.value = [zvalue, zvalue + 1]; + } else { + contours.value = [ + parseFloat(contours.value[0]), + parseFloat(contours.value[1]) + ]; + } + } else { + // Requires a single scalar: + coerce('contours.value', 0); + + if(!isNumeric(contours.value)) { + if(Array.isArray(contours.value)) { + contours.value = parseFloat(contours.value[0]); + } else { + contours.value = 0; + } + } + } + + var map = constraintMapping[contours.operation](contours.value); + + contours.start = map.start; + contours.end = map.end; + contours.size = map.size; +}; + +},{"./constraint_mapping":893,"fast-isnumeric":116}],895:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Lib = require('../../lib'); + +// The contour extraction is great, except it totally fails for constraints because we +// need weird range loops and flipped contours instead of the usual format. This function +// does some weird manipulation of the extracted pathinfo data such that it magically +// draws contours correctly *as* constraints. +module.exports = function(pathinfo, operation) { + var i, pi0, pi1; + + var op0 = function(arr) { return arr.reverse(); }; + var op1 = function(arr) { return arr; }; + + switch(operation) { + case '][': + case ')[': + case '](': + case ')(': + var tmp = op0; + op0 = op1; + op1 = tmp; + // It's a nice rule, except this definitely *is* what's intended here. + /* eslint-disable: no-fallthrough */ + case '[]': + case '[)': + case '(]': + case '()': + /* eslint-enable: no-fallthrough */ + if(pathinfo.length !== 2) { + Lib.warn('Contour data invalid for the specified inequality range operation.'); + return; + } + + // In this case there should be exactly two contour levels in pathinfo. We + // simply concatenate the info into one pathinfo and flip all of the data + // in one. This will draw the contour as closed. + pi0 = pathinfo[0]; + pi1 = pathinfo[1]; + + for(i = 0; i < pi0.edgepaths.length; i++) { + pi0.edgepaths[i] = op0(pi0.edgepaths[i]); + } + + for(i = 0; i < pi0.paths.length; i++) { + pi0.paths[i] = op0(pi0.paths[i]); + } + + while(pi1.edgepaths.length) { + pi0.edgepaths.push(op1(pi1.edgepaths.shift())); + } + while(pi1.paths.length) { + pi0.paths.push(op1(pi1.paths.shift())); + } + pathinfo.pop(); + + break; + case '>=': + case '>': + if(pathinfo.length !== 1) { + Lib.warn('Contour data invalid for the specified inequality operation.'); + return; + } + + // In this case there should be exactly two contour levels in pathinfo. We + // simply concatenate the info into one pathinfo and flip all of the data + // in one. This will draw the contour as closed. + pi0 = pathinfo[0]; + + for(i = 0; i < pi0.edgepaths.length; i++) { + pi0.edgepaths[i] = op0(pi0.edgepaths[i]); + } + + for(i = 0; i < pi0.paths.length; i++) { + pi0.paths[i] = op0(pi0.paths[i]); + } + break; + } +}; + +},{"../../lib":685}],896:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Lib = require('../../lib'); + +var handleXYZDefaults = require('../heatmap/xyz_defaults'); +var attributes = require('./attributes'); +var handleStyleDefaults = require('../contour/style_defaults'); +var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); +var plotAttributes = require('../../plots/attributes'); +var supplyConstraintDefaults = require('./constraint_value_defaults'); +var addOpacity = require('../../components/color').addOpacity; + +module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { + function coerce(attr, dflt) { + return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); + } + + coerce('carpet'); + + // If either a or b is not present, then it's not a valid trace *unless* the carpet + // axis has the a or b values we're looking for. So if these are not found, just defer + // that decision until the calc step. + // + // NB: the calc step will modify the original data input by assigning whichever of + // a or b are missing. This is necessary because panning goes right from supplyDefaults + // to plot (skipping calc). That means on subsequent updates, this *will* need to be + // able to find a and b. + // + // The long-term proper fix is that this should perhaps use underscored attributes to + // at least modify the user input to a slightly lesser extent. Fully removing the + // input mutation is challenging. The underscore approach is not currently taken since + // it requires modification to all of the functions below that expect the coerced + // attribute name to match the property name -- except '_a' !== 'a' so that is not + // straightforward. + if(traceIn.a && traceIn.b) { + var contourSize, contourStart, contourEnd, missingEnd, autoContour; + + var len = handleXYZDefaults(traceIn, traceOut, coerce, layout, 'a', 'b'); + + if(!len) { + traceOut.visible = false; + return; + } + + coerce('text'); + coerce('contours.type'); + + var contours = traceOut.contours; + + // Unimplemented: + // coerce('connectgaps', hasColumns(traceOut)); + + if(contours.type === 'constraint') { + coerce('contours.operation'); + + supplyConstraintDefaults(coerce, contours); + + // Override the trace-level showlegend default with a default that takes + // into account whether this is a constraint or level contours: + Lib.coerce(traceIn, traceOut, plotAttributes, 'showlegend', true); + + // Override the above defaults with constraint-aware tweaks: + coerce('contours.coloring', contours.operation === '=' ? 'lines' : 'fill'); + coerce('contours.showlines', true); + + if(contours.operation === '=') { + contours.coloring = 'lines'; + } + handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce); + + // If there's a fill color, use it at full opacity for the line color + var lineDfltColor = traceOut.fillcolor ? addOpacity(traceOut.fillcolor, 1) : defaultColor; + + handleStyleDefaults(traceIn, traceOut, coerce, layout, lineDfltColor, 2); + + if(contours.operation === '=') { + coerce('line.color', defaultColor); + + if(contours.coloring === 'fill') { + contours.coloring = 'lines'; + } + + if(contours.coloring === 'lines') { + delete traceOut.fillcolor; + } + } + + delete traceOut.showscale; + delete traceOut.autocontour; + delete traceOut.autocolorscale; + delete traceOut.colorscale; + delete traceOut.ncontours; + delete traceOut.colorbar; + + if(traceOut.line) { + delete traceOut.line.autocolorscale; + delete traceOut.line.colorscale; + delete traceOut.line.mincolor; + delete traceOut.line.maxcolor; + } + + // TODO: These shouldb e deleted in accordance with toolpanel convention, but + // we can't becuase we require them so that it magically makes the contour + // parts of the code happy: + // delete traceOut.contours.start; + // delete traceOut.contours.end; + // delete traceOut.contours.size; + } else { + // Override the trace-level showlegend default with a default that takes + // into account whether this is a constraint or level contours: + Lib.coerce(traceIn, traceOut, plotAttributes, 'showlegend', false); + + contourStart = Lib.coerce2(traceIn, traceOut, attributes, 'contours.start'); + contourEnd = Lib.coerce2(traceIn, traceOut, attributes, 'contours.end'); + + // normally we only need size if autocontour is off. But contour.calc + // pushes its calculated contour size back to the input trace, so for + // things like restyle that can call supplyDefaults without calc + // after the initial draw, we can just reuse the previous calculation + contourSize = coerce('contours.size'); + coerce('contours.coloring'); + + missingEnd = (contourStart === false) || (contourEnd === false); + + if(missingEnd) { + autoContour = traceOut.autocontour = true; + } else { + autoContour = coerce('autocontour', false); + } + + if(autoContour || !contourSize) { + coerce('ncontours'); + } + + handleStyleDefaults(traceIn, traceOut, coerce, layout); + + delete traceOut.value; + delete traceOut.operation; + } + } else { + traceOut._defaultColor = defaultColor; + } +}; + +},{"../../components/color":578,"../../lib":685,"../../plots/attributes":722,"../contour/style_defaults":888,"../heatmap/xyz_defaults":918,"../scatter/fillcolor_defaults":983,"./attributes":889,"./constraint_value_defaults":894}],897:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Lib = require('../../lib'); + +module.exports = function emptyPathinfo(contours, plotinfo, cd0) { + var cs = contours.size; + var pathinfo = []; + + var carpet = cd0.trace.carpetTrace; + + for(var ci = contours.start; ci < contours.end + cs / 10; ci += cs) { + pathinfo.push({ + level: ci, + // all the cells with nontrivial marching index + crossings: {}, + // starting points on the edges of the lattice for each contour + starts: [], + // all unclosed paths (may have less items than starts, + // if a path is closed by rounding) + edgepaths: [], + // all closed paths + paths: [], + // store axes so we can convert to px + xaxis: carpet.aaxis, + yaxis: carpet.baxis, + // full data arrays to use for interpolation + x: cd0.a, + y: cd0.b, + z: cd0.z, + smoothing: cd0.trace.line.smoothing + }); + + if(pathinfo.length > 1000) { + Lib.warn('Too many contours, clipping at 1000', contours); + break; + } + } + return pathinfo; +}; + +},{"../../lib":685}],898:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var ContourCarpet = {}; + +ContourCarpet.attributes = require('./attributes'); +ContourCarpet.supplyDefaults = require('./defaults'); +ContourCarpet.colorbar = require('../contour/colorbar'); +ContourCarpet.calc = require('./calc'); +ContourCarpet.plot = require('./plot'); +ContourCarpet.style = require('./style'); + +ContourCarpet.moduleType = 'trace'; +ContourCarpet.name = 'contourcarpet'; +ContourCarpet.basePlotModule = require('../../plots/cartesian'); +ContourCarpet.categories = ['cartesian', 'carpet', 'contour', 'symbols', 'showLegend', 'hasLines', 'carpetDependent']; +ContourCarpet.meta = { + hrName: 'contour_carpet', + description: [ + 'Plots contours on either the first carpet axis or the', + 'carpet axis with a matching `carpet` attribute. Data `z`', + 'is interpreted as matching that of the corresponding carpet', + 'axis.' + ].join(' ') +}; + +module.exports = ContourCarpet; + +},{"../../plots/cartesian":734,"../contour/colorbar":876,"./attributes":889,"./calc":890,"./defaults":896,"./plot":901,"./style":902}],899:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Drawing = require('../../components/drawing'); +var axisAlignedLine = require('../carpet/axis_aligned_line'); +var Lib = require('../../lib'); +// var map1dArray = require('../carpet/map_1d_array'); +// var makepath = require('../carpet/makepath'); + +module.exports = function joinAllPaths(trace, pi, perimeter, ab2p, carpet, carpetcd, xa, ya) { + var i; + var fullpath = ''; + + var startsleft = pi.edgepaths.map(function(v, i) { return i; }); + var newloop = true; + var endpt, newendpt, cnt, nexti, possiblei, addpath; + + var atol = Math.abs(perimeter[0][0] - perimeter[2][0]) * 1e-4; + var btol = Math.abs(perimeter[0][1] - perimeter[2][1]) * 1e-4; + + function istop(pt) { return Math.abs(pt[1] - perimeter[0][1]) < btol; } + function isbottom(pt) { return Math.abs(pt[1] - perimeter[2][1]) < btol; } + function isleft(pt) { return Math.abs(pt[0] - perimeter[0][0]) < atol; } + function isright(pt) { return Math.abs(pt[0] - perimeter[2][0]) < atol; } + + function pathto(pt0, pt1) { + var i, j, segments, axis; + var path = ''; + + if((istop(pt0) && !isright(pt0)) || (isbottom(pt0) && !isleft(pt0))) { + axis = carpet.aaxis; + segments = axisAlignedLine(carpet, carpetcd, [pt0[0], pt1[0]], 0.5 * (pt0[1] + pt1[1])); + } else { + axis = carpet.baxis; + segments = axisAlignedLine(carpet, carpetcd, 0.5 * (pt0[0] + pt1[0]), [pt0[1], pt1[1]]); + } + + for(i = 1; i < segments.length; i++) { + path += axis.smoothing ? 'C' : 'L'; + for(j = 0; j < segments[i].length; j++) { + var pt = segments[i][j]; + path += [xa.c2p(pt[0]), ya.c2p(pt[1])] + ' '; + } + } + + return path; + } + + i = 0; + endpt = null; + while(startsleft.length) { + var startpt = pi.edgepaths[i][0]; + + if(endpt) { + fullpath += pathto(endpt, startpt); + } + + addpath = Drawing.smoothopen(pi.edgepaths[i].map(ab2p), pi.smoothing); + fullpath += newloop ? addpath : addpath.replace(/^M/, 'L'); + startsleft.splice(startsleft.indexOf(i), 1); + endpt = pi.edgepaths[i][pi.edgepaths[i].length - 1]; + nexti = -1; + + // now loop through sides, moving our endpoint until we find a new start + for(cnt = 0; cnt < 4; cnt++) { // just to prevent infinite loops + if(!endpt) { + Lib.log('Missing end?', i, pi); + break; + } + + if(istop(endpt) && !isright(endpt)) { + newendpt = perimeter[1]; // left top ---> right top + } else if(isleft(endpt)) { + newendpt = perimeter[0]; // left bottom ---> left top + } else if(isbottom(endpt)) { + newendpt = perimeter[3]; // right bottom + } else if(isright(endpt)) { + newendpt = perimeter[2]; // left bottom + } + + for(possiblei = 0; possiblei < pi.edgepaths.length; possiblei++) { + var ptNew = pi.edgepaths[possiblei][0]; + // is ptNew on the (horz. or vert.) segment from endpt to newendpt? + if(Math.abs(endpt[0] - newendpt[0]) < atol) { + if(Math.abs(endpt[0] - ptNew[0]) < atol && (ptNew[1] - endpt[1]) * (newendpt[1] - ptNew[1]) >= 0) { + newendpt = ptNew; + nexti = possiblei; + } + } else if(Math.abs(endpt[1] - newendpt[1]) < btol) { + if(Math.abs(endpt[1] - ptNew[1]) < btol && (ptNew[0] - endpt[0]) * (newendpt[0] - ptNew[0]) >= 0) { + newendpt = ptNew; + nexti = possiblei; + } + } else { + Lib.log('endpt to newendpt is not vert. or horz.', endpt, newendpt, ptNew); + } + } + + if(nexti >= 0) break; + fullpath += pathto(endpt, newendpt); + endpt = newendpt; + } + + if(nexti === pi.edgepaths.length) { + Lib.log('unclosed perimeter path'); + break; + } + + i = nexti; + + // if we closed back on a loop we already included, + // close it and start a new loop + newloop = (startsleft.indexOf(i) === -1); + if(newloop) { + i = startsleft[0]; + fullpath += pathto(endpt, newendpt) + 'Z'; + endpt = null; + } + } + + // finally add the interior paths + for(i = 0; i < pi.paths.length; i++) { + fullpath += Drawing.smoothclosed(pi.paths[i].map(ab2p), pi.smoothing); + } + + return fullpath; +}; + +},{"../../components/drawing":602,"../../lib":685,"../carpet/axis_aligned_line":841}],900:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = function mapPathinfo(pathinfo, map) { + var i, j, k, pi, pedgepaths, ppaths, pedgepath, ppath, path; + + for(i = 0; i < pathinfo.length; i++) { + pi = pathinfo[i]; + pedgepaths = pi.pedgepaths = []; + ppaths = pi.ppaths = []; + for(j = 0; j < pi.edgepaths.length; j++) { + path = pi.edgepaths[j]; + pedgepath = []; + for(k = 0; k < path.length; k++) { + pedgepath[k] = map(path[k]); + } + pedgepaths.push(pedgepath); + } + for(j = 0; j < pi.paths.length; j++) { + path = pi.paths[j]; + ppath = []; + for(k = 0; k < path.length; k++) { + ppath[k] = map(path[k]); + } + ppaths.push(ppath); + } + } +}; + +},{}],901:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var d3 = require('d3'); +var map1dArray = require('../carpet/map_1d_array'); +var makepath = require('../carpet/makepath'); +var Drawing = require('../../components/drawing'); + +var makeCrossings = require('../contour/make_crossings'); +var findAllPaths = require('../contour/find_all_paths'); +var convertToConstraints = require('./convert_to_constraints'); +var joinAllPaths = require('./join_all_paths'); +var emptyPathinfo = require('./empty_pathinfo'); +var mapPathinfo = require('./map_pathinfo'); +var lookupCarpet = require('../carpet/lookup_carpetid'); +var closeBoundaries = require('./close_boundaries'); + +function makeg(el, type, klass) { + var join = el.selectAll(type + '.' + klass).data([0]); + join.enter().append(type).classed(klass, true); + return join; +} + +module.exports = function plot(gd, plotinfo, cdcontours) { + for(var i = 0; i < cdcontours.length; i++) { + plotOne(gd, plotinfo, cdcontours[i]); + } +}; + +function plotOne(gd, plotinfo, cd) { + var trace = cd[0].trace; + + var carpet = trace.carpetTrace = lookupCarpet(gd, trace); + var carpetcd = gd.calcdata[carpet.index][0]; + + if(!carpet.visible || carpet.visible === 'legendonly') return; + + var a = cd[0].a; + var b = cd[0].b; + var contours = trace.contours; + var uid = trace.uid; + var xa = plotinfo.xaxis; + var ya = plotinfo.yaxis; + var fullLayout = gd._fullLayout; + var id = 'contour' + uid; + var pathinfo = emptyPathinfo(contours, plotinfo, cd[0]); + var isConstraint = trace.contours.type === 'constraint'; + + // Map [a, b] (data) --> [i, j] (pixels) + function ab2p(ab) { + var pt = carpet.ab2xy(ab[0], ab[1], true); + return [xa.c2p(pt[0]), ya.c2p(pt[1])]; + } + + if(trace.visible !== true) { + fullLayout._infolayer.selectAll('.cb' + uid).remove(); + return; + } + + // Define the perimeter in a/b coordinates: + var perimeter = [ + [a[0], b[b.length - 1]], + [a[a.length - 1], b[b.length - 1]], + [a[a.length - 1], b[0]], + [a[0], b[0]] + ]; + + // Extract the contour levels: + makeCrossings(pathinfo); + var atol = (a[a.length - 1] - a[0]) * 1e-8; + var btol = (b[b.length - 1] - b[0]) * 1e-8; + findAllPaths(pathinfo, atol, btol); + + // Constraints might need to be draw inverted, which is not something contours + // handle by default since they're assumed fully opaque so that they can be + // drawn overlapping. This function flips the paths as necessary so that they're + // drawn correctly. + // + // TODO: Perhaps this should be generalized and *all* paths should be drawn as + // closed regions so that translucent contour levels would be valid. + // See: https://github.com/plotly/plotly.js/issues/1356 + if(trace.contours.type === 'constraint') { + convertToConstraints(pathinfo, trace.contours.operation); + closeBoundaries(pathinfo, trace.contours.operation, perimeter, trace); + } + + // Map the paths in a/b coordinates to pixel coordinates: + mapPathinfo(pathinfo, ab2p); + + // draw everything + var plotGroup = makeContourGroup(plotinfo, cd, id); + + // Compute the boundary path + var seg, xp, yp, i; + var segs = []; + for(i = carpetcd.clipsegments.length - 1; i >= 0; i--) { + seg = carpetcd.clipsegments[i]; + xp = map1dArray([], seg.x, xa.c2p); + yp = map1dArray([], seg.y, ya.c2p); + xp.reverse(); + yp.reverse(); + segs.push(makepath(xp, yp, seg.bicubic)); + } + + var boundaryPath = 'M' + segs.join('L') + 'Z'; + + // Draw the baseline background fill that fills in the space behind any other + // contour levels: + makeBackground(plotGroup, carpetcd.clipsegments, xa, ya, isConstraint, contours.coloring); + + // Draw the specific contour fills. As a simplification, they're assumed to be + // fully opaque so that it's easy to draw them simply overlapping. The alternative + // would be to flip adjacent paths and draw closed paths for each level instead. + makeFills(trace, plotGroup, xa, ya, pathinfo, perimeter, ab2p, carpet, carpetcd, contours.coloring, boundaryPath); + + // Draw contour lines: + makeLines(plotGroup, pathinfo, contours); + + // Clip the boundary of the plot: + clipBoundary(plotGroup, carpet); +} + +function clipBoundary(plotGroup, carpet) { + plotGroup.attr('clip-path', 'url(#' + carpet.clipPathId + ')'); +} + +function makeContourGroup(plotinfo, cd, id) { + var plotgroup = plotinfo.plot.select('.maplayer') + .selectAll('g.contour.' + id) + .classed('trace', true) + .data(cd); + + plotgroup.enter().append('g') + .classed('contour', true) + .classed(id, true); + + plotgroup.exit().remove(); + + return plotgroup; +} + +function makeLines(plotgroup, pathinfo, contours) { + var smoothing = pathinfo[0].smoothing; + + var linegroup = plotgroup.selectAll('g.contourlevel') + .data(contours.showlines === false ? [] : pathinfo); + linegroup.enter().append('g') + .classed('contourlevel', true); + linegroup.exit().remove(); + + var opencontourlines = linegroup.selectAll('path.openline') + .data(function(d) { return d.pedgepaths; }); + opencontourlines.enter().append('path') + .classed('openline', true); + opencontourlines.exit().remove(); + opencontourlines + .attr('d', function(d) { + return Drawing.smoothopen(d, smoothing); + }) + .style('vector-effect', 'non-scaling-stroke'); + + var closedcontourlines = linegroup.selectAll('path.closedline') + .data(function(d) { return d.ppaths; }); + closedcontourlines.enter().append('path') + .classed('closedline', true); + closedcontourlines.exit().remove(); + closedcontourlines + .attr('d', function(d) { + return Drawing.smoothclosed(d, smoothing); + }) + .style('vector-effect', 'non-scaling-stroke') + .style('stroke-miterlimit', 1); +} + +function makeBackground(plotgroup, clipsegments, xaxis, yaxis, isConstraint, coloring) { + var seg, xp, yp, i; + var bggroup = makeg(plotgroup, 'g', 'contourbg'); + + var bgfill = bggroup.selectAll('path') + .data((coloring === 'fill' && !isConstraint) ? [0] : []); + bgfill.enter().append('path'); + bgfill.exit().remove(); + + var segs = []; + for(i = 0; i < clipsegments.length; i++) { + seg = clipsegments[i]; + xp = map1dArray([], seg.x, xaxis.c2p); + yp = map1dArray([], seg.y, yaxis.c2p); + segs.push(makepath(xp, yp, seg.bicubic)); + } + + bgfill + .attr('d', 'M' + segs.join('L') + 'Z') + .style('stroke', 'none'); +} + +function makeFills(trace, plotgroup, xa, ya, pathinfo, perimeter, ab2p, carpet, carpetcd, coloring, boundaryPath) { + var fillgroup = plotgroup.selectAll('g.contourfill') + .data([0]); + fillgroup.enter().append('g') + .classed('contourfill', true); + + var fillitems = fillgroup.selectAll('path') + .data(coloring === 'fill' ? pathinfo : []); + fillitems.enter().append('path'); + fillitems.exit().remove(); + fillitems.each(function(pi) { + // join all paths for this level together into a single path + // first follow clockwise around the perimeter to close any open paths + // if the whole perimeter is above this level, start with a path + // enclosing the whole thing. With all that, the parity should mean + // that we always fill everything above the contour, nothing below + var fullpath = joinAllPaths(trace, pi, perimeter, ab2p, carpet, carpetcd, xa, ya); + + if(pi.prefixBoundary) { + fullpath = boundaryPath + fullpath; + } + + if(!fullpath) { + d3.select(this).remove(); + } else { + d3.select(this) + .attr('d', fullpath) + .style('stroke', 'none'); + } + }); +} + +},{"../../components/drawing":602,"../carpet/lookup_carpetid":858,"../carpet/makepath":859,"../carpet/map_1d_array":860,"../contour/find_all_paths":881,"../contour/make_crossings":885,"./close_boundaries":891,"./convert_to_constraints":895,"./empty_pathinfo":897,"./join_all_paths":899,"./map_pathinfo":900,"d3":107}],902:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var d3 = require('d3'); + +var Drawing = require('../../components/drawing'); +var heatmapStyle = require('../heatmap/style'); + +var makeColorMap = require('../contour/make_color_map'); + +module.exports = function style(gd) { + var contours = d3.select(gd).selectAll('g.contour'); + + contours.style('opacity', function(d) { + return d.trace.opacity; + }); + + contours.each(function(d) { + var c = d3.select(this); + var trace = d.trace; + var contours = trace.contours; + var line = trace.line; + var cs = contours.size || 1; + var start = contours.start; + + if(!isFinite(cs)) { + cs = 0; + } + + c.selectAll('g.contourlevel').each(function() { + d3.select(this).selectAll('path') + .call(Drawing.lineGroupStyle, + line.width, + line.color, + line.dash); + }); + + if(trace.contours.type === 'levels' && trace.contours.coloring !== 'none') { + var colorMap = makeColorMap(trace); + + c.selectAll('g.contourbg path') + .style('fill', colorMap(start - cs / 2)); + + c.selectAll('g.contourfill path') + .style('fill', function(d, i) { + return colorMap(start + (i + 0.5) * cs); + }); + } else { + c.selectAll('g.contourfill path') + .style('fill', trace.fillcolor); + } + }); + + heatmapStyle(gd); +}; + +},{"../../components/drawing":602,"../contour/make_color_map":884,"../heatmap/style":917,"d3":107}],903:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157588,7 +159901,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../scatter/attributes":947}],866:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../scatter/attributes":976}],904:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157607,7 +159920,7 @@ var Axes = require('../../plots/cartesian/axes'); var histogram2dCalc = require('../histogram2d/calc'); var colorscaleCalc = require('../../components/colorscale/calc'); var hasColumns = require('./has_columns'); -var convertColumnXYZ = require('./convert_column_xyz'); +var convertColumnData = require('./convert_column_xyz'); var maxRowLength = require('./max_row_length'); var clean2dArray = require('./clean_2d_array'); var interp2d = require('./interp2d'); @@ -157648,7 +159961,7 @@ module.exports = function calc(gd, trace) { z = binned.z; } else { - if(hasColumns(trace)) convertColumnXYZ(trace, xa, ya); + if(hasColumns(trace)) convertColumnData(trace, xa, ya, 'x', 'y', ['z']); x = trace.x ? xa.makeCalcdata(trace, 'x') : []; y = trace.y ? ya.makeCalcdata(trace, 'y') : []; @@ -157730,7 +160043,7 @@ module.exports = function calc(gd, trace) { return [cd0]; }; -},{"../../components/colorscale/calc":591,"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807,"../histogram2d/calc":894,"./clean_2d_array":867,"./convert_column_xyz":869,"./find_empties":871,"./has_columns":872,"./interp2d":875,"./make_bound_array":876,"./max_row_length":877}],867:[function(require,module,exports){ +},{"../../components/colorscale/calc":584,"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"../histogram2d/calc":932,"./clean_2d_array":905,"./convert_column_xyz":907,"./find_empties":909,"./has_columns":910,"./interp2d":913,"./make_bound_array":914,"./max_row_length":915}],905:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157775,7 +160088,7 @@ module.exports = function clean2dArray(zOld, transpose) { return zNew; }; -},{"fast-isnumeric":123}],868:[function(require,module,exports){ +},{"fast-isnumeric":116}],906:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157826,7 +160139,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],869:[function(require,module,exports){ +},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],907:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157841,54 +160154,73 @@ module.exports = function colorbar(gd, cd) { var Lib = require('../../lib'); var BADNUM = require('../../constants/numerical').BADNUM; +module.exports = function convertColumnData(trace, ax1, ax2, var1Name, var2Name, arrayVarNames) { + var1Name = var1Name || 'x'; + var2Name = var2Name || 'y'; + arrayVarNames = arrayVarNames || ['z']; -module.exports = function convertColumnXYZ(trace, xa, ya) { - var xCol = trace.x.slice(), - yCol = trace.y.slice(), - zCol = trace.z, + var col1 = trace[var1Name].slice(), + col2 = trace[var2Name].slice(), textCol = trace.text, - colLen = Math.min(xCol.length, yCol.length, zCol.length), + colLen = Math.min(col1.length, col2.length), hasColumnText = (textCol !== undefined && !Array.isArray(textCol[0])), - xcalendar = trace.xcalendar, - ycalendar = trace.ycalendar; + col1Calendar = trace[var1Name + 'calendar'], + col2Calendar = trace[var2Name + 'calendar']; - var i; + var i, j, arrayVar, newArray, arrayVarName; - if(colLen < xCol.length) xCol = xCol.slice(0, colLen); - if(colLen < yCol.length) yCol = yCol.slice(0, colLen); + for(i = 0; i < arrayVarNames.length; i++) { + arrayVar = trace[arrayVarNames[i]]; + if(arrayVar) colLen = Math.min(colLen, arrayVar.length); + } + + if(colLen < col1.length) col1 = col1.slice(0, colLen); + if(colLen < col2.length) col2 = col2.slice(0, colLen); for(i = 0; i < colLen; i++) { - xCol[i] = xa.d2c(xCol[i], 0, xcalendar); - yCol[i] = ya.d2c(yCol[i], 0, ycalendar); + col1[i] = ax1.d2c(col1[i], 0, col1Calendar); + col2[i] = ax2.d2c(col2[i], 0, col2Calendar); } - var xColdv = Lib.distinctVals(xCol), - x = xColdv.vals, - yColdv = Lib.distinctVals(yCol), - y = yColdv.vals, - z = Lib.init2dArray(y.length, x.length); + var col1dv = Lib.distinctVals(col1), + col1vals = col1dv.vals, + col2dv = Lib.distinctVals(col2), + col2vals = col2dv.vals, + newArrays = []; - var text; + for(i = 0; i < arrayVarNames.length; i++) { + newArrays[i] = Lib.init2dArray(col2vals.length, col1vals.length); + } - if(hasColumnText) text = Lib.init2dArray(y.length, x.length); + var i1, i2, text; + + if(hasColumnText) text = Lib.init2dArray(col2vals.length, col1vals.length); for(i = 0; i < colLen; i++) { - if(xCol[i] !== BADNUM && yCol[i] !== BADNUM) { - var ix = Lib.findBin(xCol[i] + xColdv.minDiff / 2, x); - var iy = Lib.findBin(yCol[i] + yColdv.minDiff / 2, y); + if(col1[i] !== BADNUM && col2[i] !== BADNUM) { + i1 = Lib.findBin(col1[i] + col1dv.minDiff / 2, col1vals); + i2 = Lib.findBin(col2[i] + col2dv.minDiff / 2, col2vals); + + for(j = 0; j < arrayVarNames.length; j++) { + arrayVarName = arrayVarNames[j]; + arrayVar = trace[arrayVarName]; + newArray = newArrays[j]; + newArray[i2][i1] = arrayVar[i]; + } - z[iy][ix] = zCol[i]; - if(hasColumnText) text[iy][ix] = textCol[i]; + if(hasColumnText) text[i2][i1] = textCol[i]; } } - trace.x = x; - trace.y = y; - trace.z = z; + trace[var1Name] = col1vals; + trace[var2Name] = col2vals; + for(j = 0; j < arrayVarNames.length; j++) { + trace[arrayVarNames[j]] = newArrays[j]; + } if(hasColumnText) trace.text = text; }; -},{"../../constants/numerical":672,"../../lib":690}],870:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685}],908:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157933,7 +160265,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'}); }; -},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":865,"./has_columns":872,"./xyz_defaults":880}],871:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":903,"./has_columns":910,"./xyz_defaults":918}],909:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158039,7 +160371,7 @@ module.exports = function findEmpties(z) { return empties.sort(function(a, b) { return b[2] - a[2]; }); }; -},{"./max_row_length":877}],872:[function(require,module,exports){ +},{"./max_row_length":915}],910:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158055,7 +160387,7 @@ module.exports = function(trace) { return !Array.isArray(trace.z[0]); }; -},{}],873:[function(require,module,exports){ +},{}],911:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158173,7 +160505,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, contour) })]; }; -},{"../../lib":690,"../../plots/cartesian/constants":734,"../../plots/cartesian/graph_interact":738}],874:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/constants":729,"../../plots/cartesian/graph_interact":733}],912:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158228,7 +160560,7 @@ Heatmap.meta = { module.exports = Heatmap; -},{"../../plots/cartesian":739,"./attributes":865,"./calc":866,"./colorbar":868,"./defaults":870,"./hover":873,"./plot":878,"./style":879}],875:[function(require,module,exports){ +},{"../../plots/cartesian":734,"./attributes":903,"./calc":904,"./colorbar":906,"./defaults":908,"./hover":911,"./plot":916,"./style":917}],913:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158360,7 +160692,7 @@ function iterateInterp2d(z, emptyPoints, overshoot) { return maxFractionalChange; } -},{"../../lib":690}],876:[function(require,module,exports){ +},{"../../lib":685}],914:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158442,7 +160774,7 @@ module.exports = function makeBoundArray(trace, arrayIn, v0In, dvIn, numbricks, return arrayOut; }; -},{"../../registry":807}],877:[function(require,module,exports){ +},{"../../registry":802}],915:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158464,7 +160796,7 @@ module.exports = function maxRowLength(z) { return len; }; -},{}],878:[function(require,module,exports){ +},{}],916:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158933,7 +161265,7 @@ function plotOne(gd, plotinfo, cd) { image3.exit().remove(); } -},{"../../components/colorscale":599,"../../constants/xmlns_namespaces":674,"../../lib":690,"../../registry":807,"./max_row_length":877,"tinycolor2":521}],879:[function(require,module,exports){ +},{"../../components/colorscale":592,"../../constants/xmlns_namespaces":668,"../../lib":685,"../../registry":802,"./max_row_length":915,"tinycolor2":514}],917:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158954,7 +161286,7 @@ module.exports = function style(gd) { }); }; -},{"d3":114}],880:[function(require,module,exports){ +},{"d3":107}],918:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158972,22 +161304,24 @@ var Registry = require('../../registry'); var hasColumns = require('./has_columns'); -module.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout) { +module.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout, xName, yName) { var z = coerce('z'); + xName = xName || 'x'; + yName = yName || 'y'; var x, y; if(z === undefined || !z.length) return 0; if(hasColumns(traceIn)) { - x = coerce('x'); - y = coerce('y'); + x = coerce(xName); + y = coerce(yName); - // column z must be accompanied by 'x' and 'y' arrays + // column z must be accompanied by xName and yName arrays if(!x || !y) return 0; } else { - x = coordDefaults('x', coerce); - y = coordDefaults('y', coerce); + x = coordDefaults(xName, coerce); + y = coordDefaults(yName, coerce); // TODO put z validation elsewhere if(!isValidZ(z)) return 0; @@ -158996,7 +161330,7 @@ module.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout) { } var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults'); - handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout); + handleCalendarDefaults(traceIn, traceOut, [xName, yName], layout); return traceOut.z.length; }; @@ -159047,7 +161381,7 @@ function isValidZ(z) { return (allRowsAreArrays && oneRowIsFilled && hasOneNumber); } -},{"../../registry":807,"./has_columns":872,"fast-isnumeric":123}],881:[function(require,module,exports){ +},{"../../registry":802,"./has_columns":910,"fast-isnumeric":116}],919:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159089,7 +161423,7 @@ extendFlat( module.exports = attrs; -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../heatmap/attributes":865}],882:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../heatmap/attributes":903}],920:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159228,7 +161562,7 @@ function createHeatmap(scene, fullTrace, calcTrace) { module.exports = createHeatmap; -},{"../../lib/str2rgbarray":708,"../../plots/cartesian/axes":729,"gl-heatmap2d":157}],883:[function(require,module,exports){ +},{"../../lib/str2rgbarray":703,"../../plots/cartesian/axes":724,"gl-heatmap2d":150}],921:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159261,7 +161595,7 @@ HeatmapGl.meta = { module.exports = HeatmapGl; -},{"../../plots/gl2d":769,"../heatmap/calc":866,"../heatmap/colorbar":868,"../heatmap/defaults":870,"./attributes":881,"./convert":882}],884:[function(require,module,exports){ +},{"../../plots/gl2d":764,"../heatmap/calc":904,"../heatmap/colorbar":906,"../heatmap/defaults":908,"./attributes":919,"./convert":920}],922:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159473,7 +161807,7 @@ function makeBinsAttr(axLetter) { }; } -},{"../bar/attributes":817}],885:[function(require,module,exports){ +},{"../bar/attributes":812}],923:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159499,7 +161833,7 @@ module.exports = function doAvg(size, counts) { return total; }; -},{}],886:[function(require,module,exports){ +},{}],924:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159532,7 +161866,7 @@ module.exports = function handleBinDefaults(traceIn, traceOut, coerce, binDirect return traceOut; }; -},{}],887:[function(require,module,exports){ +},{}],925:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159608,7 +161942,7 @@ module.exports = { } }; -},{"fast-isnumeric":123}],888:[function(require,module,exports){ +},{"fast-isnumeric":116}],926:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159839,7 +162173,7 @@ function cdf(size, direction, currentbin) { } } -},{"../../lib":690,"../../plots/cartesian/axes":729,"../bar/arrays_to_calcdata":816,"./average":885,"./bin_functions":887,"./clean_bins":889,"./norm_functions":892,"fast-isnumeric":123}],889:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../bar/arrays_to_calcdata":811,"./average":923,"./bin_functions":925,"./clean_bins":927,"./norm_functions":930,"fast-isnumeric":116}],927:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159916,7 +162250,7 @@ module.exports = function cleanBins(trace, ax, binDirection) { if(!trace[autoBinAttr]) delete trace['nbins' + binDirection]; }; -},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],890:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],928:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159978,7 +162312,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, Color.defaultLine, {axis: 'x', inherit: 'y'}); }; -},{"../../components/color":585,"../../components/errorbars/defaults":613,"../../lib":690,"../../registry":807,"../bar/style_defaults":828,"./attributes":884,"./bin_defaults":886}],891:[function(require,module,exports){ +},{"../../components/color":578,"../../components/errorbars/defaults":607,"../../lib":685,"../../registry":802,"../bar/style_defaults":823,"./attributes":922,"./bin_defaults":924}],929:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160033,7 +162367,7 @@ Histogram.meta = { module.exports = Histogram; -},{"../../plots/cartesian":739,"../bar/hover":820,"../bar/layout_attributes":822,"../bar/layout_defaults":823,"../bar/plot":824,"../bar/set_positions":825,"../bar/style":827,"../scatter/colorbar":950,"./attributes":884,"./calc":888,"./defaults":890}],892:[function(require,module,exports){ +},{"../../plots/cartesian":734,"../bar/hover":815,"../bar/layout_attributes":817,"../bar/layout_defaults":818,"../bar/plot":819,"../bar/set_positions":820,"../bar/style":822,"../scatter/colorbar":979,"./attributes":922,"./calc":926,"./defaults":928}],930:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160068,7 +162402,7 @@ module.exports = { } }; -},{}],893:[function(require,module,exports){ +},{}],931:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160120,7 +162454,7 @@ module.exports = extendFlat({}, { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../heatmap/attributes":865,"../histogram/attributes":884}],894:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../heatmap/attributes":903,"../histogram/attributes":922}],932:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160323,7 +162657,7 @@ module.exports = function calc(gd, trace) { }; }; -},{"../../lib":690,"../../plots/cartesian/axes":729,"../histogram/average":885,"../histogram/bin_functions":887,"../histogram/clean_bins":889,"../histogram/norm_functions":892}],895:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../histogram/average":923,"../histogram/bin_functions":925,"../histogram/clean_bins":927,"../histogram/norm_functions":930}],933:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160361,7 +162695,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout ); }; -},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":893,"./sample_defaults":897}],896:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":931,"./sample_defaults":935}],934:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160401,7 +162735,7 @@ Histogram2D.meta = { module.exports = Histogram2D; -},{"../../plots/cartesian":739,"../heatmap/calc":866,"../heatmap/colorbar":868,"../heatmap/hover":873,"../heatmap/plot":878,"../heatmap/style":879,"./attributes":893,"./defaults":895}],897:[function(require,module,exports){ +},{"../../plots/cartesian":734,"../heatmap/calc":904,"../heatmap/colorbar":906,"../heatmap/hover":911,"../heatmap/plot":916,"../heatmap/style":917,"./attributes":931,"./defaults":933}],935:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160441,7 +162775,7 @@ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout handleBinDefaults(traceIn, traceOut, coerce, binDirections); }; -},{"../../registry":807,"../histogram/bin_defaults":886}],898:[function(require,module,exports){ +},{"../../registry":802,"../histogram/bin_defaults":924}],936:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160483,7 +162817,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../contour/attributes":850,"../histogram2d/attributes":893}],899:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../contour/attributes":874,"../histogram2d/attributes":931}],937:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160513,7 +162847,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout handleStyleDefaults(traceIn, traceOut, coerce, layout); }; -},{"../../lib":690,"../contour/contours_defaults":854,"../contour/style_defaults":864,"../histogram2d/sample_defaults":897,"./attributes":898}],900:[function(require,module,exports){ +},{"../../lib":685,"../contour/contours_defaults":878,"../contour/style_defaults":888,"../histogram2d/sample_defaults":935,"./attributes":936}],938:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160553,7 +162887,7 @@ Histogram2dContour.meta = { module.exports = Histogram2dContour; -},{"../../plots/cartesian":739,"../contour/calc":851,"../contour/colorbar":852,"../contour/hover":858,"../contour/plot":862,"../contour/style":863,"./attributes":898,"./defaults":899}],901:[function(require,module,exports){ +},{"../../plots/cartesian":734,"../contour/calc":875,"../contour/colorbar":876,"../contour/hover":882,"../contour/plot":886,"../contour/style":887,"./attributes":936,"./defaults":937}],939:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160751,7 +163085,7 @@ module.exports = { }, surfaceAtts.lighting) }; -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../surface/attributes":1002}],902:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../surface/attributes":1039}],940:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160914,7 +163248,7 @@ function createMesh3DTrace(scene, data) { module.exports = createMesh3DTrace; -},{"../../lib/str2rgbarray":708,"alpha-shape":37,"convex-hull":95,"delaunay-triangulate":115,"gl-mesh3d":196,"tinycolor2":521}],903:[function(require,module,exports){ +},{"../../lib/str2rgbarray":703,"alpha-shape":38,"convex-hull":96,"delaunay-triangulate":108,"gl-mesh3d":189,"tinycolor2":514}],941:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161015,7 +163349,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/colorbar/defaults":587,"../../lib":690,"../../registry":807,"./attributes":901}],904:[function(require,module,exports){ +},{"../../components/colorbar/defaults":580,"../../lib":685,"../../registry":802,"./attributes":939}],942:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161051,7 +163385,7 @@ Mesh3D.meta = { module.exports = Mesh3D; -},{"../../plots/gl3d":772,"../heatmap/colorbar":868,"./attributes":901,"./convert":902,"./defaults":903}],905:[function(require,module,exports){ +},{"../../plots/gl3d":767,"../heatmap/colorbar":906,"./attributes":939,"./convert":940,"./defaults":941}],943:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161065,6 +163399,7 @@ module.exports = Mesh3D; var Lib = require('../../lib'); var scatterAttrs = require('../scatter/attributes'); +var dash = require('../../components/drawing/attributes').dash; var INCREASING_COLOR = '#3D9970'; var DECREASING_COLOR = '#FF4136'; @@ -161092,9 +163427,9 @@ var directionAttrs = { }, line: { - color: Lib.extendFlat({}, lineAttrs.color), - width: Lib.extendFlat({}, lineAttrs.width), - dash: Lib.extendFlat({}, lineAttrs.dash), + color: lineAttrs.color, + width: lineAttrs.width, + dash: dash, } }; @@ -161141,9 +163476,9 @@ module.exports = { '`decreasing.line.width`.' ].join(' ') }), - dash: Lib.extendFlat({}, lineAttrs.dash, { + dash: Lib.extendFlat({}, dash, { description: [ - lineAttrs.dash, + dash.description, 'Note that this style setting can also be set per', 'direction via `increasing.line.dash` and', '`decreasing.line.dash`.' @@ -161186,7 +163521,7 @@ module.exports = { } }; -},{"../../lib":690,"../scatter/attributes":947}],906:[function(require,module,exports){ +},{"../../components/drawing/attributes":601,"../../lib":685,"../scatter/attributes":976}],944:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161235,7 +163570,7 @@ function handleDirection(traceIn, traceOut, coerce, direction) { coerce(direction + '.line.dash', traceOut.line.dash); } -},{"../../lib":690,"./attributes":905,"./direction_defaults":907,"./helpers":908,"./ohlc_defaults":910}],907:[function(require,module,exports){ +},{"../../lib":685,"./attributes":943,"./direction_defaults":945,"./helpers":946,"./ohlc_defaults":948}],945:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161261,7 +163596,7 @@ module.exports = function handleDirectionDefaults(traceIn, traceOut, coerce, dir coerce(direction + '.name', nameDflt); }; -},{}],908:[function(require,module,exports){ +},{}],946:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161384,7 +163719,7 @@ exports.addRangeSlider = function(data, layout) { } }; -},{"../../lib":690}],909:[function(require,module,exports){ +},{"../../lib":685}],947:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161426,7 +163761,7 @@ module.exports = { register(require('../scatter')); register(require('./transform')); -},{"../../plot_api/register":719,"../../plots/cartesian":739,"../scatter":957,"./attributes":905,"./defaults":906,"./transform":911}],910:[function(require,module,exports){ +},{"../../plot_api/register":714,"../../plots/cartesian":734,"../scatter":986,"./attributes":943,"./defaults":944,"./transform":949}],948:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161468,7 +163803,7 @@ module.exports = function handleOHLC(traceIn, traceOut, coerce, layout) { return len; }; -},{"../../registry":807}],911:[function(require,module,exports){ +},{"../../registry":802}],949:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161727,7 +164062,7 @@ function convertTickWidth(gd, xa, trace) { return minDiff * tickWidth; } -},{"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_ids":732,"./helpers":908}],912:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_ids":727,"./helpers":946}],950:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161887,7 +164222,7 @@ module.exports = { ) }; -},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/colorscale/scales":603,"../../lib/extend":682,"../../plots/cartesian/layout_attributes":740}],913:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/colorscale/scales":596,"../../lib/extend":677,"../../plots/cartesian/layout_attributes":735}],951:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161963,7 +164298,7 @@ exports.toSVG = function(gd) { }, 60); }; -},{"../../constants/xmlns_namespaces":674,"../../plots/plots":792,"./constants":916,"./plot":921,"d3":114}],914:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":668,"../../plots/plots":787,"./constants":954,"./plot":959,"d3":107}],952:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161994,7 +164329,7 @@ module.exports = function calc(gd, trace) { }]; }; -},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"../../lib":690}],915:[function(require,module,exports){ +},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"../../lib":685}],953:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162048,7 +164383,7 @@ module.exports = function colorbar(gd, cd) { .options(line.colorbar)(); }; -},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],916:[function(require,module,exports){ +},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],954:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162085,7 +164420,7 @@ module.exports = { } }; -},{}],917:[function(require,module,exports){ +},{}],955:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162187,7 +164522,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598,"../../lib":690,"./attributes":912,"./constants":916}],918:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591,"../../lib":685,"./attributes":950,"./constants":954}],956:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162220,7 +164555,7 @@ Parcoords.meta = { module.exports = Parcoords; -},{"./attributes":912,"./base_plot":913,"./calc":914,"./colorbar":915,"./defaults":917,"./plot":921}],919:[function(require,module,exports){ +},{"./attributes":950,"./base_plot":951,"./calc":952,"./colorbar":953,"./defaults":955,"./plot":959}],957:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162645,7 +164980,7 @@ module.exports = function(canvasGL, lines, canvasWidth, canvasHeight, initialDim }; }; -},{"./constants":916,"regl":487}],920:[function(require,module,exports){ +},{"./constants":954,"regl":480}],958:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163419,7 +165754,7 @@ module.exports = function(root, svg, styledData, layout, callbacks) { return tweakables; }; -},{"../../lib":690,"./constants":916,"./lines":919,"d3":114}],921:[function(require,module,exports){ +},{"../../lib":685,"./constants":954,"./lines":957,"d3":107}],959:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163539,7 +165874,7 @@ module.exports = function plot(gd, cdparcoords) { }); }; -},{"./parcoords":920}],922:[function(require,module,exports){ +},{"./parcoords":958}],960:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163789,7 +166124,7 @@ module.exports = { } }; -},{"../../components/color/attributes":584,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/font_attributes":753}],923:[function(require,module,exports){ +},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/attributes":722,"../../plots/font_attributes":748}],961:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163836,7 +166171,7 @@ function getCdModule(calcdata, _module) { return cdModule; } -},{"../../registry":807}],924:[function(require,module,exports){ +},{"../../registry":802}],962:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163988,7 +166323,7 @@ function nextDefaultColor(index) { return pieDefaultColors[index % pieDefaultColors.length]; } -},{"../../components/color":585,"./helpers":926,"fast-isnumeric":123,"tinycolor2":521}],925:[function(require,module,exports){ +},{"../../components/color":578,"./helpers":964,"fast-isnumeric":116,"tinycolor2":514}],963:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164073,7 +166408,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('pull'); }; -},{"../../lib":690,"./attributes":922}],926:[function(require,module,exports){ +},{"../../lib":685,"./attributes":960}],964:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164102,7 +166437,7 @@ exports.formatPieValue = function formatPieValue(v, separators) { return Lib.numSeparate(vRounded, separators); }; -},{"../../lib":690}],927:[function(require,module,exports){ +},{"../../lib":685}],965:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164138,7 +166473,7 @@ Pie.meta = { module.exports = Pie; -},{"./attributes":922,"./base_plot":923,"./calc":924,"./defaults":925,"./layout_attributes":928,"./layout_defaults":929,"./plot":930,"./style":931,"./style_one":932}],928:[function(require,module,exports){ +},{"./attributes":960,"./base_plot":961,"./calc":962,"./defaults":963,"./layout_attributes":966,"./layout_defaults":967,"./plot":968,"./style":969,"./style_one":970}],966:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164158,7 +166493,7 @@ module.exports = { hiddenlabels: {valType: 'data_array'} }; -},{}],929:[function(require,module,exports){ +},{}],967:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164180,7 +166515,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { coerce('hiddenlabels'); }; -},{"../../lib":690,"./layout_attributes":928}],930:[function(require,module,exports){ +},{"../../lib":685,"./layout_attributes":966}],968:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164888,7 +167223,7 @@ function maxExtent(tilt, tiltAxisFraction, depth) { 2 * Math.sqrt(1 - sinTilt * sinTilt * tiltAxisFraction * tiltAxisFraction)); } -},{"../../components/color":585,"../../components/drawing":608,"../../lib/svg_text_utils":709,"../../plots/cartesian/graph_interact":738,"./helpers":926,"d3":114}],931:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"../../lib/svg_text_utils":704,"../../plots/cartesian/graph_interact":733,"./helpers":964,"d3":107}],969:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164917,7 +167252,7 @@ module.exports = function style(gd) { }); }; -},{"./style_one":932,"d3":114}],932:[function(require,module,exports){ +},{"./style_one":970,"d3":107}],970:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164937,14 +167272,12 @@ module.exports = function styleOne(s, pt, trace) { var lineWidth = trace.marker.line.width || 0; if(Array.isArray(lineWidth)) lineWidth = lineWidth[pt.i] || 0; - s.style({ - 'stroke-width': lineWidth, - fill: pt.color - }) + s.style({'stroke-width': lineWidth}) + .call(Color.fill, pt.color) .call(Color.stroke, lineColor); }; -},{"../../components/color":585}],933:[function(require,module,exports){ +},{"../../components/color":578}],971:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165078,7 +167411,7 @@ module.exports = { } }; -},{"../scattergl/attributes":983}],934:[function(require,module,exports){ +},{"../scattergl/attributes":1020}],972:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165310,7 +167643,7 @@ function createPointcloud(scene, data) { module.exports = createPointcloud; -},{"../../lib/str2rgbarray":708,"../scatter/get_trace_color":955,"gl-pointcloud2d":221}],935:[function(require,module,exports){ +},{"../../lib/str2rgbarray":703,"../scatter/get_trace_color":984,"gl-pointcloud2d":214}],973:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165355,7 +167688,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor) { coerce('marker.border.arearatio'); }; -},{"../../lib":690,"./attributes":933}],936:[function(require,module,exports){ +},{"../../lib":685,"./attributes":971}],974:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165388,1208 +167721,7 @@ pointcloud.meta = { module.exports = pointcloud; -},{"../../plots/gl2d":769,"../scatter3d/calc":971,"./attributes":933,"./convert":934,"./defaults":935}],937:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var shapeAttrs = require('../../components/shapes/attributes'); -var fontAttrs = require('../../plots/font_attributes'); -var plotAttrs = require('../../plots/attributes'); - -var extendFlat = require('../../lib/extend').extendFlat; - - -module.exports = { - hoverinfo: extendFlat({}, plotAttrs.hoverinfo, { - flags: ['label', 'text', 'value', 'percent', 'name'] - }), - domain: { - x: { - valType: 'info_array', - role: 'info', - items: [ - {valType: 'number', min: 0, max: 1}, - {valType: 'number', min: 0, max: 1} - ], - dflt: [0, 1], - description: [ - 'Sets the horizontal domain of this `sankey` trace', - '(in plot fraction).' - ].join(' ') - }, - y: { - valType: 'info_array', - role: 'info', - items: [ - {valType: 'number', min: 0, max: 1}, - {valType: 'number', min: 0, max: 1} - ], - dflt: [0, 1], - description: [ - 'Sets the vertical domain of this `sankey` trace', - '(in plot fraction).' - ].join(' ') - } - }, - - orientation: { - valType: 'enumerated', - values: ['v', 'h'], - dflt: 'h', - role: 'style', - description: 'Sets the orientation of the Sankey diagram.' - }, - - nodepad: { - valType: 'number', - min: 0, - dflt: 20, - role: 'style', - description: 'Sets the padding (in px) between the `nodes`.' - }, - - nodethickness: { - valType: 'number', - min: 1, - dflt: 20, - role: 'style', - description: 'Sets the thickness of the `nodes`.' - }, - - valueformat: { - valType: 'string', - dflt: '.3s', - role: 'style', - description: [ - 'Sets the value formatting rule using d3 formatting mini-language', - 'which is similar to those of Python. See', - 'https://github.com/d3/d3-format/blob/master/README.md#locale_format' - ].join(' ') - }, - - valueunit: { - valType: 'string', - dflt: '', - role: 'style', - description: [ - 'Adds a unit to follow the value in the hover tooltip. Add a space if a separation', - 'is necessary from the value.' - ].join(' ') - }, - - // followmouse for UX testing - followmouse: { - valType: 'boolean', - dflt: true, - role: 'style', - description: 'Sets whether the hover tooltip follows the mouse.' - }, - - textfont: fontAttrs, - - nodes: { - _isLinkedToArray: 'node', - label: { - valType: 'string', - dflt: '', - role: 'info', - description: 'The shown name of the node.' - }, - visible: shapeAttrs.visible, - color: extendFlat({}, shapeAttrs.fillcolor, { - dflt: 'rgb(0,255,0,0.5)' - }), - description: 'The nodes of the Sankey plot.' - }, - - links: { - _isLinkedToArray: 'link', - label: { - valType: 'string', - dflt: '', - role: 'info', - description: 'The shown name of the link.' - }, - visible: shapeAttrs.visible, - color: extendFlat({}, shapeAttrs.fillcolor, {dflt: 'rgba(0,0,0,0.2)'}), - source: { - valType: 'number', - role: 'info', - description: 'An integer number `[0..nodes.length - 1]` that represents the source node.' - }, - target: { - valType: 'number', - role: 'info', - description: 'An integer number `[0..nodes.length - 1]` that represents the target node.' - }, - value: { - valType: 'number', - dflt: 1, - role: 'info', - description: 'A numeric value representing the flow volume value.' - }, - description: 'The links of the Sankey plot.' - } -}; - -},{"../../components/shapes/attributes":648,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/font_attributes":753}],938:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Plots = require('../../plots/plots'); -var plot = require('./plot'); - -exports.name = 'sankey'; - -exports.attr = 'type'; - -exports.plot = function(gd) { - var calcData = Plots.getSubplotCalcData(gd.calcdata, 'sankey', 'sankey'); - if(calcData.length) plot(gd, calcData); -}; - -exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) { - var hadPlot = (oldFullLayout._has && oldFullLayout._has('sankey')); - var hasPlot = (newFullLayout._has && newFullLayout._has('sankey')); - - if(hadPlot && !hasPlot) { - oldFullLayout._paperdiv.selectAll('.sankey').remove(); - oldFullLayout._paperdiv.selectAll('.sankey').remove(); - } -}; - -exports.toSVG = function() {}; - -},{"../../plots/plots":792,"./plot":944}],939:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - - -module.exports = function calc() { - return [{}]; -}; - -},{}],940:[function(require,module,exports){ -arguments[4][915][0].apply(exports,arguments) -},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"dup":915,"fast-isnumeric":123}],941:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - - -module.exports = { - nodeTextOffsetHorizontal: 4, - nodeTextOffsetVertical: 3, - nodePadAcross: 10, - sankeyIterations: 50, - movable: true, - sideways: true, - useForceSnap: true, - forceIterations: 5, - forceTicksPerFrame: 10, - duration: 500, - ease: 'linear' -}; - -},{}],942:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Lib = require('../../lib'); -var attributes = require('./attributes'); -var d3 = require('d3'); - - -function linksDefaults(traceIn, traceOut) { - var linksIn = traceIn.links || [], - linksOut = traceOut.links = []; - - var linkIn, linkOut, i; - - function coerce(attr, dflt) { - return Lib.coerce(linkIn, linkOut, attributes.links, attr, dflt); - } - - for(i = 0; i < linksIn.length; i++) { - linkIn = linksIn[i]; - linkOut = {}; - - if(!Lib.isPlainObject(linkIn)) { - continue; - } - - var visible = coerce('visible'); - - if(visible) { - coerce('label'); - coerce('value'); - coerce('source'); - coerce('target'); - coerce('color'); - } - - linkOut._index = i; - linksOut.push(linkOut); - } -} - -function nodesDefaults(traceIn, traceOut) { - var nodesIn = traceIn.nodes || [], - nodesOut = traceOut.nodes = []; - - var nodeIn, nodeOut, i, j, link, foundUse, visible, - usedNodeCount = 0, - indexMap = []; - - var defaultPalette = d3.scale.category20(); - - function coerce(attr, dflt) { - return Lib.coerce(nodeIn, nodeOut, attributes.nodes, attr, dflt); - } - - for(i = 0; i < nodesIn.length; i++) { - nodeIn = nodesIn[i]; - - - - foundUse = false; - for(j = 0; j < traceOut.links.length && !foundUse; j++) { - link = traceOut.links[j]; - foundUse = link.source === i || link.target === i; - } - - indexMap.push(foundUse ? usedNodeCount : null); - - if(!foundUse) - continue; - - if(!Lib.isPlainObject(nodeIn)) { - continue; - } - - nodeOut = {}; - - visible = coerce('visible'); - - if(visible) { - coerce('label'); - if(nodeIn.color) { - coerce('color'); - } else { - coerce('color', defaultPalette(i)); - } - } - - nodeOut._index = usedNodeCount; - nodesOut.push(nodeOut); - usedNodeCount++; - } - - // since nodes were removed, update indices to nodes in links to reflect new reality - for(j = 0; j < traceOut.links.length; j++) { - link = traceOut.links[j]; - link.source = indexMap[link.source]; - link.target = indexMap[link.target]; - } - - return nodesOut; -} - - - - -module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { - function coerce(attr, dflt) { - return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); - } - - linksDefaults(traceIn, traceOut); - nodesDefaults(traceIn, traceOut); - - coerce('hoverinfo', layout._dataLength === 1 ? 'label+text+value+percent' : undefined); - - coerce('domain.x'); - coerce('domain.y'); - coerce('orientation'); - coerce('nodepad'); - coerce('nodethickness'); - coerce('valueformat'); - coerce('valueunit'); - coerce('followmouse'); - - // Prefer Sankey-specific font spec e.g. with smaller default size - var sankeyFontSpec = Lib.coerceFont(coerce, 'textfont'); - Lib.coerceFont(coerce, 'textfont', Lib.extendFlat({}, layout.font, sankeyFontSpec)); -}; - -},{"../../lib":690,"./attributes":937,"d3":114}],943:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Plot = {}; - -Plot.attributes = require('./attributes'); -Plot.supplyDefaults = require('./defaults'); -Plot.calc = require('./calc'); -Plot.plot = require('./plot'); -Plot.colorbar = require('./colorbar'); - -Plot.moduleType = 'trace'; -Plot.name = 'sankey'; -Plot.basePlotModule = require('./base_plot'); -Plot.categories = ['gl']; -Plot.meta = { - description: [ - 'Sankey plots for network flow data analysis.', - 'The nodes are specified in `nodes` and the links between sources and targets in `links`.', - 'The colors are set in `line.color`.' - ].join(' ') -}; - -module.exports = Plot; - -},{"./attributes":937,"./base_plot":938,"./calc":939,"./colorbar":940,"./defaults":942,"./plot":944}],944:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var render = require('./render'); -var Fx = require('../../plots/cartesian/graph_interact'); -var d3 = require('d3'); -var Color = require('../../components/color'); - -function renderableValuePresent(d) {return d !== '';} - -function ownTrace(selection, d) { - return selection.filter(function(s) {return s.key === d.traceId;}); -} - -function makeTranslucent(element, alpha) { - d3.select(element) - .select('path') - .style('fill-opacity', alpha); -} - -function makeTextContrasty(element, hue) { - d3.select(element) - .select('text.name') - .style('fill', Color.contrast(hue, 0, 40)); -} - -function relatedLinks(d) { - return function(l) { - return d.node.sourceLinks.indexOf(l.link) !== -1 || d.node.targetLinks.indexOf(l.link) !== -1; - }; -} - -function relatedNodes(l) { - return function(d) { - return d.node.sourceLinks.indexOf(l.link) !== -1 || d.node.targetLinks.indexOf(l.link) !== -1; - }; -} - -function nodeHoveredStyle(sankeyNode, d, sankey) { - - sankeyNode.select('.nodeRect').style('stroke-width', 1); - - if(d && sankey) { - ownTrace(sankey, d) - .selectAll('.sankeyLink') - .filter(relatedLinks(d)) - .call(linkHoveredStyle); - } -} - -function nodeNonHoveredStyle(sankeyNode, d, sankey) { - - sankeyNode.select('.nodeRect').style('stroke-width', 0.5); - - if(d && sankey) { - ownTrace(sankey, d) - .selectAll('.sankeyLink') - .filter(relatedLinks(d)) - .call(linkNonHoveredStyle); - } -} - -function linkHoveredStyle(sankeyLink, d, sankey) { - - sankeyLink.style('stroke-opacity', 0.4); - - if(d && sankey) { - ownTrace(sankey, d) - .selectAll('.sankeyNode') - .filter(relatedNodes(d)) - .call(nodeHoveredStyle); - } -} - -function linkNonHoveredStyle(sankeyLink, d, sankey) { - - sankeyLink.style('stroke-opacity', function(d) {return d.tinyColorAlpha;}); - - if(d && sankey) { - ownTrace(sankey, d) - .selectAll('.sankeyNode') - .filter(relatedNodes(d)) - .call(nodeNonHoveredStyle); - } -} - -var log = false - -module.exports = function plot(gd, calcData) { - - var fullLayout = gd._fullLayout; - var svg = fullLayout._paper; - var hasHoverData = false; - - var size = fullLayout._size; - - var linkSelect = function(element, d) { - if(log) console.log('select link', d.link); - gd._hoverdata = [d.link]; - gd._hoverdata.trace = calcData.trace; - Fx.click(gd, { target: true }); - }; - - var linkHover = function(element, d, sankey) { - - d3.select(element).call(linkHoveredStyle, d, sankey); - if(log) console.log('hover link', d.link); - - Fx.hover(gd, d.link, 'sankey'); - - hasHoverData = true; - }; - - var linkHoverFollow = function(element, d) { - - - var followMouse = gd.data[0].followmouse; - - var boundingBox = !followMouse && element.getBoundingClientRect(); - var hoverCenterX = followMouse ? d3.event.x : boundingBox.left + boundingBox.width / 2; - var hoverCenterY = followMouse ? d3.event.y : boundingBox.top + boundingBox.height / 2; - - var tooltip = Fx.loneHover({ - x: hoverCenterX, - y: hoverCenterY, - name: d3.format(d.valueFormat)(d.link.value) + d.valueUnit, - text: [ - d.link.label, - ['Source:', d.link.source.label].join(' '), - ['Target:', d.link.target.label].join(' ') - ].filter(renderableValuePresent).join('
'), - color: Color.addOpacity(d.tinyColorHue, 1), - idealAlign: d3.event.x < hoverCenterX ? 'right' : 'left' - }, { - container: fullLayout._hoverlayer.node(), - outerContainer: fullLayout._paper.node() - }); - - makeTranslucent(tooltip, 0.67); - }; - - var linkUnhover = function(element, d, sankey) { - d3.select(element).call(linkNonHoveredStyle, d, sankey); - if(log) console.log('unhover link', d.link); - gd.emit('plotly_unhover', { - points: [d.link] - }); - - if(hasHoverData) { - Fx.loneUnhover(fullLayout._hoverlayer.node()); - hasHoverData = false; - } - }; - - var nodeSelect = function(element, d, sankey) { - if(log) console.log('select node', d.node); - gd._hoverdata = [d.node]; - gd._hoverdata.trace = calcData.trace; - d3.select(element).call(linkNonHoveredStyle, d, sankey); - d3.select(element).call(nodeNonHoveredStyle, d, sankey); - Fx.click(gd, { target: true }); - }; - - var nodeHover = function(element, d, sankey) { - - if(log) console.log('hover node', d.node); - - d3.select(element).call(nodeHoveredStyle, d, sankey); - - Fx.hover(gd, d.node, 'sankey'); - - hasHoverData = true; - - }; - - - var nodeHoverFollow = function(element, d) { - - var nodeRect = d3.select(element).select('.nodeRect'); - - var followMouse = gd.data[0].followmouse; - - var boundingBox = nodeRect.node().getBoundingClientRect(); - var hoverCenterX0 = boundingBox.left - 2; - var hoverCenterX1 = boundingBox.right + 2; - var hoverCenterY = followMouse ? d3.event.y : boundingBox.top + boundingBox.height / 4; - - var tooltip = Fx.loneHover({ - x0: hoverCenterX0, - x1: hoverCenterX1, - y: hoverCenterY, - name: d3.format(d.valueFormat)(d.node.value) + d.valueUnit, - text: [ - d.node.label, - ['Incoming flow count:', d.node.targetLinks.length].join(' '), - ['Outgoing flow count:', d.node.sourceLinks.length].join(' ') - ].filter(renderableValuePresent).join('
'), - color: d.tinyColorHue, - idealAlign: 'left' - }, { - container: fullLayout._hoverlayer.node(), - outerContainer: fullLayout._paper.node() - }); - - makeTranslucent(tooltip, 0.85); - makeTextContrasty(tooltip, d.tinyColorHue); - }; - - var nodeUnhover = function(element, d, sankey) { - - d3.select(element).call(nodeNonHoveredStyle, d, sankey); - if(log) console.log('unhover node', d.node); - gd.emit('plotly_unhover', { - points: [d.node] - }); - - if(hasHoverData) { - Fx.loneUnhover(fullLayout._hoverlayer.node()); - hasHoverData = false; - } - }; - - render( - svg, - calcData, - { - width: size.w, - height: size.h, - margin: { - t: size.t, - r: size.r, - b: size.b, - l: size.l - } - }, - { - linkEvents: { - hover: linkHover, - follow: linkHoverFollow, - unhover: linkUnhover, - select: linkSelect - }, - nodeEvents: { - hover: nodeHover, - follow: nodeHoverFollow, - unhover: nodeUnhover, - select: nodeSelect - } - } - ); -}; - -},{"../../components/color":585,"../../plots/cartesian/graph_interact":738,"./render":945,"d3":114}],945:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var c = require('./constants'); -var d3 = require('d3'); -var tinycolor = require('tinycolor2'); -var Color = require('../../components/color'); -var Drawing = require('../../components/drawing'); -var d3sankey = require('@monfera/d3-sankey').sankey; -var d3Force = require('d3-force'); - - -// basic data utilities - -function keyFun(d) {return d.key;} -function repeat(d) {return [d];} // d3 data binding convention -function unwrap(d) {return d[0];} // plotly data structure convention -function visible(nodeOrLink) {return !('visible' in nodeOrLink) || nodeOrLink.visible;} - -function persistOriginalPlace(nodes) { - for (var i = 0; i < nodes.length; i++) { - nodes[i].originalX = nodes[i].x; - nodes[i].originalY = nodes[i].y; - } -} - -function saveCurrentDragPosition(d) { - d.lastDraggedX = d.x - d.lastDraggedY = d.y -} - -function sameLayer(d) { - return function(n) {return n.node.originalX === d.node.originalX;}; -} - -function switchToForceFormat(nodes) { - // force uses x, y as centers - for (var i = 0; i < nodes.length; i++) { - nodes[i].y = nodes[i].y + nodes[i].dy / 2; - } -} - -function switchToSankeyFormat(nodes) { - // sankey uses x, y as top left - for (var i = 0; i < nodes.length; i++) { - nodes[i].y = nodes[i].y - nodes[i].dy / 2; - } -} - - -// view models - -function sankeyModel(layout, d, i) { - - var trace = unwrap(d).trace, - domain = trace.domain, - nodes = trace.nodes, - links = trace.links, - horizontal = trace.orientation === 'h', - nodePad = trace.nodepad, - nodeThickness = trace.nodethickness, - valueFormat = trace.valueformat, - valueUnit = trace.valueunit, - textFont = trace.textfont; - - var width = layout.width * (domain.x[1] - domain.x[0]), - height = layout.height * (domain.y[1] - domain.y[0]); - - var sankey = d3sankey() - .size(horizontal ? [width, height] : [height, width]) - .nodeWidth(nodeThickness) - .nodePadding(nodePad) - .nodes(nodes) - .links(links) - .layout(c.sankeyIterations); - - switchToForceFormat(nodes); - - return { - key: i, - guid: Math.floor(1e12 * (1 + Math.random())), - horizontal: horizontal, - width: width, - height: height, - nodePad: nodePad, - valueFormat: valueFormat, - valueUnit: valueUnit, - textFont: textFont, - translateX: domain.x[0] * width + layout.margin.l, - translateY: layout.height - domain.y[1] * layout.height + layout.margin.t, - dragParallel: horizontal ? height : width, - dragPerpendicular: horizontal ? width : height, - nodes: nodes, - links: links, - sankey: sankey, - forceLayouts: {}, - interactionState: { - dragInProgress: false, - hovered: false - } - }; -} - -function linkModel(d, l) { - - var tc = tinycolor(l.color); - - return { - key: l.source.label + '|' + l.target.label, - traceId: d.key, - link: l, - tinyColorHue: Color.tinyRGB(tc), - tinyColorAlpha: tc.getAlpha(), - valueFormat: d.valueFormat, - valueUnit: d.valueUnit, - sankey: d.sankey, - interactionState: d.interactionState - }; -} - -function nodeModel(uniqueKeys, d, n) { - - var tc = tinycolor(n.color), - zoneThicknessPad = c.nodePadAcross, - zoneLengthPad = d.nodePad / 2, - visibleThickness = n.dx + 0.5, - visibleLength = n.dy - 0.5, - zoneThickness = visibleThickness + 2 * zoneThicknessPad, - zoneLength = visibleLength + 2 * zoneLengthPad; - - var foundKey = uniqueKeys[n.label]; - uniqueKeys[n.label] = (foundKey === void(0) ? foundKey : 0) + 1; - var key = n.label + (foundKey === void(0) ? '' : '__' + foundKey); - - return { - key: key, - traceId: d.key, - node: n, - nodePad: d.nodePad, - textFont: d.textFont, - size: d.horizontal ? d.height : d.width, - visibleWidth: Math.ceil(d.horizontal ? visibleThickness : visibleLength), - visibleHeight: Math.ceil(d.horizontal ? visibleLength : visibleThickness), - zoneX: d.horizontal ? -zoneThicknessPad : -zoneLengthPad, - zoneY: d.horizontal ? -zoneLengthPad : -zoneThicknessPad, - zoneWidth: d.horizontal ? zoneThickness : zoneLength, - zoneHeight: d.horizontal ? zoneLength : zoneThickness, - labelY: d.horizontal ? n.dy / 2 + 1 : n.dx / 2 + 1, - sizeAcross: d.horizontal ? d.width : d.height, - forceLayouts: d.forceLayouts, - horizontal: d.horizontal, - darkBackground: tc.getBrightness() <= 128, - tinyColorHue: Color.tinyRGB(tc), - tinyColorAlpha: tc.getAlpha(), - valueFormat: d.valueFormat, - valueUnit: d.valueUnit, - sankey: d.sankey, - uniqueNodeLabelPathId: JSON.stringify({sankeyGuid: d.guid, traceId: d.key, nodeKey: n.label}), - interactionState: d.interactionState - }; -} - - -// rendering snippets - -function crispLinesOnEnd(sankeyNode) { - d3.select(sankeyNode.node().parentElement).style('shape-rendering', 'crispEdges'); -} - -function updateNodePositions(sankeyNode) { - sankeyNode - .attr('transform', function(d) { - return d.horizontal - ? 'translate(' + (d.node.x - 0.5) + ', ' + (d.node.y - d.node.dy / 2 + 0.5) + ')' - : 'translate(' + (d.node.y - d.node.dy / 2 - 0.5) + ', ' + (d.node.x + 0.5) + ')' - }) -} - -function linkPath(d) { - var nodes = d.sankey.nodes(); - switchToSankeyFormat(nodes); - var result = d.sankey.link()(d.link); - switchToForceFormat(nodes); - return result; -} - -function updateNodeShapes(sankeyNode) { - d3.select(sankeyNode.node().parentElement).style('shape-rendering', 'optimizeSpeed'); - sankeyNode.call(updateNodePositions); -} - -function updateShapes(sankeyNode, sankeyLink) { - sankeyNode.call(updateNodeShapes); - sankeyLink.attr('d', linkPath); -} - -function sizeNode(rect) { - rect.attr('width', function(d) {return d.visibleWidth;}) - .attr('height', function(d) {return d.visibleHeight;}); -} - - -// event handling - -function attachPointerEvents(selection, sankey, eventSet) { - selection - .on('.basic', null) // remove any preexisting handlers - .on('mouseover.basic', function (d) { - if (!d.interactionState.dragInProgress) { - eventSet.hover(this, d, sankey); - d.interactionState.hovered = [this, d]; - } - }) - .on('mousemove.basic', function (d) { - if (!d.interactionState.dragInProgress) { - eventSet.follow(this, d); - d.interactionState.hovered = [this, d]; - } - }) - .on('mouseout.basic', function (d) { - if (!d.interactionState.dragInProgress) { - eventSet.unhover(this, d, sankey); - d.interactionState.hovered = false; - } - }) - .on('click.basic', function (d) { - if (d.interactionState.hovered) { - eventSet.unhover(this, d, sankey); - d.interactionState.hovered = false; - } - if (!d.interactionState.dragInProgress) { - eventSet.select(this, d, sankey); - } - }); -} - -function attachDragHandler(sankeyNode, sankeyLink, callbacks) { - - var dragBehavior = d3.behavior.drag() - - .origin(function(d) {return d.horizontal ? d.node : {x: d.node['y'], y: d.node['x']};}) - - .on('dragstart', function(d) { - if(!c.movable) return; - this.parentNode.appendChild(this); // bring element to top (painter's algo) - d.interactionState.dragInProgress = d.node; - saveCurrentDragPosition(d.node); - if(d.interactionState.hovered) { - callbacks.nodeEvents.unhover.apply(0, d.interactionState.hovered); - d.interactionState.hovered = false; - } - if(c.useForceSnap) { - var forceKey = d.traceId + '|' + Math.floor(d.node.originalX); - if (d.forceLayouts[forceKey]) { - d.forceLayouts[forceKey].alpha(1); - } else { // make a forceLayout iff needed - attachForce(sankeyNode, forceKey, d); - } - window.requestAnimationFrame(function faster() { - for(var i = 0; i < c.forceTicksPerFrame; i++) d.forceLayouts[forceKey].tick(); - updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink); - if(d.forceLayouts[forceKey].alpha() > 0) { - window.requestAnimationFrame(faster); - } - }) - } - }) - - .on('drag', function(d) { - if(!c.movable) return; - var x = d.horizontal ? d3.event.x : d3.event.y; - var y = d.horizontal ? d3.event.y : d3.event.x; - if(c.useForceSnap) { - d.node.x = x; - d.node.y = y; - } else { - if(c.sideways) { - d.node.x = x; - } - d.node.y = Math.max(d.node.dy / 2, Math.min(d.size - d.node.dy / 2, y)); - } - saveCurrentDragPosition(d.node); - d.sankey.relayout(); - if(!c.useForceSnap) { - updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink); - sankeyNode.call(crispLinesOnEnd); - } - }) - - .on('dragend', function(d) {d.interactionState.dragInProgress = false;}); - - - sankeyNode - .on('.drag', null) // remove possible previous handlers - .call(dragBehavior); -} - -function attachForce(sankeyNode, forceKey, d) { - var nodes = d.sankey.nodes().filter(function(n) {return n.originalX === d.node.originalX;}); - d.forceLayouts[forceKey] = d3Force.forceSimulation(nodes) - .alphaDecay(0) - .force('collide', d3Force.forceCollide() - .radius(function (n) {return n.dy / 2 + d.nodePad / 2;}) - .strength(1) - .iterations(c.forceIterations)) - .force('constrain', snappingForce(sankeyNode, forceKey, nodes, d)) - .stop(); -} - -function snappingForce(sankeyNode, forceKey, nodes, d) { - return function _snappingForce() { - var maxVelocity = 0; - for (var i = 0; i < nodes.length; i++) { - var n = nodes[i]; - if (n === d.interactionState.dragInProgress) { // constrain node position to the dragging pointer - n.x = n.lastDraggedX; - n.y = n.lastDraggedY; - } else { - n.vx = (n.originalX - n.x) / c.forceTicksPerFrame; // snap to layer - n.y = Math.min(d.size - n.dy / 2, Math.max(n.dy / 2, n.y)); // constrain to extent - } - maxVelocity = Math.max(maxVelocity, Math.abs(n.vx), Math.abs(n.vy)); - } - if (!d.interactionState.dragInProgress && maxVelocity < 0.1) { - d.forceLayouts[forceKey].alpha(0); - window.setTimeout(function () { - sankeyNode.call(crispLinesOnEnd); - }, 30); // geome on move, crisp when static - } - } -} - - -// scene graph - -module.exports = function(svg, styledData, layout, callbacks) { - - svg.style('overflow', 'visible'); - - var sankey = svg.selectAll('.sankey') - .data(styledData - .filter(function(d) {return unwrap(d).trace.visible;}) - .map(sankeyModel.bind(null, layout)), - keyFun); - - sankey.exit() - .remove(); - - sankey.enter() - .append('g') - .classed('sankey', true) - .attr('overflow', 'visible') - .style('box-sizing', 'content-box') - .style('position', 'absolute') - .style('left', 0) - .style('overflow', 'visible') - .style('shape-rendering', 'geometricPrecision') - .style('pointer-events', 'auto') - .style('box-sizing', 'content-box'); - - sankey - .attr('transform', function(d) {return 'translate(' + d.translateX + ',' + d.translateY + ')';}); - - - var sankeyLinks = sankey.selectAll('.sankeyLinks') - .data(repeat, keyFun); - - sankeyLinks.enter() - .append('g') - .classed('sankeyLinks', true) - .style('fill', 'none'); - - sankeyLinks.transition() - .ease(c.ease).duration(c.duration) - .style('transform', function(d) {return d.horizontal ? 'matrix(1,0,0,1,0,0)' : 'matrix(0,1,1,0,0,0)'}); - - - var sankeyLink = sankeyLinks.selectAll('.sankeyLink') - .data(function(d) { - return d.sankey.links() - .filter(function(l) {return l.visible && l.value;}) - .map(linkModel.bind(null, d)); - }, keyFun); - - sankeyLink.enter() - .append('path') - .classed('sankeyLink', true) - .style('stroke-width', function(d) {return Math.max(1, d.link.dy);}) - .style('opacity', 0) - .call(attachPointerEvents, sankey, callbacks.linkEvents); - - sankeyLink - .style('stroke', function(d) {return d.tinyColorHue;}) - .style('stroke-opacity', function(d) {return d.tinyColorAlpha;}); - - sankeyLink.transition() - .ease(c.ease).duration(c.duration) - .style('opacity', 1) - .attr('d', linkPath) - .style('stroke-width', function(d) {return Math.max(1, d.link.dy);}); - - sankeyLink.exit().transition() - .ease(c.ease).duration(c.duration) - .style('opacity', 0) - .remove(); - - - var sankeyNodeSet = sankey.selectAll('.sankeyNodeSet') - .data(repeat, keyFun); - - sankeyNodeSet.enter() - .append('g') - .style('shape-rendering', 'geometricPrecision') - .classed('sankeyNodeSet', true); - - sankeyNodeSet - .each(function(d) {Drawing.font(sankeyNodeSet, d.textFont);}); // fixme causes scerenshot trouble - - - var sankeyNode = sankeyNodeSet.selectAll('.sankeyNode') - .data(function(d) { - var nodes = d.sankey.nodes(); - var uniqueKeys = {}; - persistOriginalPlace(nodes); - return nodes - .filter(function(n) {return n.visible && n.value;}) - .map(nodeModel.bind(null, uniqueKeys, d)); - }, keyFun); - - sankeyNode.enter() - .append('g') - .classed('sankeyNode', true) - .style('opacity', 0) - .style('cursor', 'move') - .call(updateNodePositions) - .call(attachPointerEvents, sankey, callbacks.nodeEvents); - - sankeyNode - .call(attachDragHandler, sankeyLink, callbacks); // has to be here as it binds sankeyLink - - sankeyNode.transition() - .ease(c.ease).duration(c.duration) - .style('opacity', 1) - .call(updateNodePositions); - - sankeyNode.exit().transition() - .ease(c.ease).duration(c.duration) - .style('opacity', 0) - .remove(); - - - var nodeRect = sankeyNode.selectAll('.nodeRect') - .data(repeat); - - nodeRect.enter() - .append('rect') - .classed('nodeRect', true) - .style('stroke-width', 0.5) - .call(Color.stroke, 'rgba(0, 0, 0, 1)') - .call(sizeNode); - - nodeRect - .style('fill', function(d) {return d.tinyColorHue;}) - .style('fill-opacity', function(d) {return d.tinyColorAlpha;}); - - nodeRect.transition() - .ease(c.ease).duration(c.duration) - .call(sizeNode); - - - var nodeCapture = sankeyNode.selectAll('.nodeCapture') - .data(repeat); - - nodeCapture.enter() - .append('rect') - .classed('nodeCapture', true) - .style('fill-opacity', 0); - - nodeCapture - .attr('x', function(d) {return d.zoneX;}) - .attr('y', function(d) {return d.zoneY;}) - .attr('width', function(d) {return d.zoneWidth;}) - .attr('height', function(d) {return d.zoneHeight;}); - - - var nodeLabelGuide = sankeyNode.selectAll('.nodeLabelGuide') - .data(repeat); - - nodeLabelGuide.enter() - .append('path') - .classed('nodeLabelGuide', true) - .attr('id', function(d) {return d.uniqueNodeLabelPathId;}); // fixme causes scerenshot trouble - - nodeLabelGuide - .transition() - .ease(c.ease).duration(c.duration) - .attr('d', function(d) { - return d3.svg.line()([ - [d.horizontal ? d.visibleWidth + c.nodeTextOffsetHorizontal : c.nodeTextOffsetHorizontal, d.labelY], - [d.horizontal ? d.sizeAcross : d.visibleWidth - c.nodeTextOffsetHorizontal, d.labelY] - ]);}); - - - var nodeLabel = sankeyNode.selectAll('.nodeLabel') - .data(repeat); - - nodeLabel.enter() - .append('text') - .classed('nodeLabel', true) - .style('user-select', 'none') - .style('cursor', 'default') - .style('fill', 'black'); - - nodeLabel - .style('text-shadow', function(d) { - return d.horizontal ? '0 1px 1px #fff' : 'none'; - }); - - var nodeLabelTextPath = nodeLabel.selectAll('.nodeLabelTextPath') - .data(repeat); - - nodeLabelTextPath.enter() - .append('textPath') - .classed('nodeLabelTextPath', true) - .attr('alignment-baseline', 'middle') - .attr('xlink:href', function(d) {return '#' + d.uniqueNodeLabelPathId;}); - - nodeLabelTextPath - .text(function(d) {return d.horizontal || d.node.dy > 5 ? d.node.label : '';}) - .style('fill', function(d) {return d.darkBackground && !d.horizontal ? 'white' : 'black';}); -}; - -},{"../../components/color":585,"../../components/drawing":608,"./constants":941,"@monfera/d3-sankey":32,"d3":114,"d3-force":110,"tinycolor2":521}],946:[function(require,module,exports){ +},{"../../plots/gl2d":764,"../scatter3d/calc":1000,"./attributes":971,"./convert":972,"./defaults":973}],975:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166632,7 +167764,7 @@ module.exports = function arraysToCalcdata(cd, trace) { } }; -},{"../../lib":690}],947:[function(require,module,exports){ +},{"../../lib":685}],976:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166646,6 +167778,7 @@ module.exports = function arraysToCalcdata(cd, trace) { var colorAttributes = require('../../components/colorscale/color_attributes'); var errorBarAttrs = require('../../components/errorbars/attributes'); var colorbarAttrs = require('../../components/colorbar/attributes'); +var dash = require('../../components/drawing/attributes').dash; var Drawing = require('../../components/drawing'); var constants = require('./constants'); @@ -166798,20 +167931,7 @@ module.exports = { '*0* corresponds to no smoothing (equivalent to a *linear* shape).' ].join(' ') }, - dash: { - valType: 'string', - // string type usually doesn't take values... this one should really be - // a special type or at least a special coercion function, from the GUI - // you only get these values but elsewhere the user can supply a list of - // dash lengths in px, and it will be honored - values: ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'], - dflt: 'solid', - role: 'style', - description: [ - 'Sets the style of the lines. Set to a dash string type', - 'or a dash length in px.' - ].join(' ') - }, + dash: dash, simplify: { valType: 'boolean', dflt: true, @@ -167018,7 +168138,7 @@ module.exports = { error_x: errorBarAttrs }; -},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/drawing":608,"../../components/errorbars/attributes":610,"../../lib/extend":682,"./constants":952}],948:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/drawing":602,"../../components/drawing/attributes":601,"../../components/errorbars/attributes":604,"../../lib/extend":677,"./constants":981}],977:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167148,7 +168268,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../plots/cartesian/axes":729,"./arrays_to_calcdata":946,"./colorscale_calc":951,"./subtypes":967,"fast-isnumeric":123}],949:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"./arrays_to_calcdata":975,"./colorscale_calc":980,"./subtypes":996,"fast-isnumeric":116}],978:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167187,7 +168307,7 @@ module.exports = function cleanData(fullData) { } }; -},{}],950:[function(require,module,exports){ +},{}],979:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167243,7 +168363,7 @@ module.exports = function colorbar(gd, cd) { .options(marker.colorbar)(); }; -},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],951:[function(require,module,exports){ +},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],980:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167276,7 +168396,7 @@ module.exports = function calcMarkerColorscale(trace) { } }; -},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"./subtypes":967}],952:[function(require,module,exports){ +},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"./subtypes":996}],981:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167292,7 +168412,7 @@ module.exports = { PTS_LINESONLY: 20 }; -},{}],953:[function(require,module,exports){ +},{}],982:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167374,7 +168494,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, defaultColor, {axis: 'x', inherit: 'y'}); }; -},{"../../components/errorbars/defaults":613,"../../lib":690,"./attributes":947,"./constants":952,"./fillcolor_defaults":954,"./line_defaults":958,"./line_shape_defaults":960,"./marker_defaults":963,"./subtypes":967,"./text_defaults":968,"./xy_defaults":969}],954:[function(require,module,exports){ +},{"../../components/errorbars/defaults":607,"../../lib":685,"./attributes":976,"./constants":981,"./fillcolor_defaults":983,"./line_defaults":987,"./line_shape_defaults":989,"./marker_defaults":992,"./subtypes":996,"./text_defaults":997,"./xy_defaults":998}],983:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167412,7 +168532,7 @@ module.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coe )); }; -},{"../../components/color":585}],955:[function(require,module,exports){ +},{"../../components/color":578}],984:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167465,7 +168585,7 @@ module.exports = function getTraceColor(trace, di) { } }; -},{"../../components/color":585,"./subtypes":967}],956:[function(require,module,exports){ +},{"../../components/color":578,"./subtypes":996}],985:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167636,7 +168756,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { } }; -},{"../../components/color":585,"../../components/errorbars":614,"../../lib":690,"../../plots/cartesian/constants":734,"../../plots/cartesian/graph_interact":738,"./get_trace_color":955}],957:[function(require,module,exports){ +},{"../../components/color":578,"../../components/errorbars":608,"../../lib":685,"../../plots/cartesian/constants":729,"../../plots/cartesian/graph_interact":733,"./get_trace_color":984}],986:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167686,7 +168806,7 @@ Scatter.meta = { module.exports = Scatter; -},{"../../plots/cartesian":739,"./arrays_to_calcdata":946,"./attributes":947,"./calc":948,"./clean_data":949,"./colorbar":950,"./defaults":953,"./hover":956,"./plot":964,"./select":965,"./style":966,"./subtypes":967}],958:[function(require,module,exports){ +},{"../../plots/cartesian":734,"./arrays_to_calcdata":975,"./attributes":976,"./calc":977,"./clean_data":978,"./colorbar":979,"./defaults":982,"./hover":985,"./plot":993,"./select":994,"./style":995,"./subtypes":996}],987:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167702,7 +168822,7 @@ var hasColorscale = require('../../components/colorscale/has_colorscale'); var colorscaleDefaults = require('../../components/colorscale/defaults'); -module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, coerce) { +module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, coerce, opts) { var markerColor = (traceIn.marker || {}).color; coerce('line.color', defaultColor); @@ -167716,10 +168836,10 @@ module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, } coerce('line.width'); - coerce('line.dash'); + if(!(opts || {}).noDash) coerce('line.dash'); }; -},{"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598}],959:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591}],988:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167892,7 +169012,7 @@ module.exports = function linePoints(d, opts) { return segments; }; -},{"../../constants/numerical":672}],960:[function(require,module,exports){ +},{"../../constants/numerical":666}],989:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167911,7 +169031,7 @@ module.exports = function handleLineShapeDefaults(traceIn, traceOut, coerce) { if(shape === 'spline') coerce('line.smoothing'); }; -},{}],961:[function(require,module,exports){ +},{}],990:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167952,7 +169072,7 @@ module.exports = function linkTraces(gd, plotinfo, cdscatter) { } }; -},{}],962:[function(require,module,exports){ +},{}],991:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167994,7 +169114,7 @@ module.exports = function makeBubbleSizeFn(trace) { }; }; -},{"fast-isnumeric":123}],963:[function(require,module,exports){ +},{"fast-isnumeric":116}],992:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168013,7 +169133,7 @@ var colorscaleDefaults = require('../../components/colorscale/defaults'); var subTypes = require('./subtypes'); -module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout, coerce) { +module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout, coerce, opts) { var isBubble = subTypes.isBubble(traceIn), lineColor = (traceIn.line || {}).color, defaultMLC; @@ -168030,22 +169150,24 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.', cLetter: 'c'}); } - // if there's a line with a different color than the marker, use - // that line color as the default marker line color - // (except when it's an array) - // mostly this is for transparent markers to behave nicely - if(lineColor && !Array.isArray(lineColor) && (traceOut.marker.color !== lineColor)) { - defaultMLC = lineColor; - } - else if(isBubble) defaultMLC = Color.background; - else defaultMLC = Color.defaultLine; + if(!(opts || {}).noLine) { + // if there's a line with a different color than the marker, use + // that line color as the default marker line color + // (except when it's an array) + // mostly this is for transparent markers to behave nicely + if(lineColor && !Array.isArray(lineColor) && (traceOut.marker.color !== lineColor)) { + defaultMLC = lineColor; + } + else if(isBubble) defaultMLC = Color.background; + else defaultMLC = Color.defaultLine; - coerce('marker.line.color', defaultMLC); - if(hasColorscale(traceIn, 'marker.line')) { - colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.line.', cLetter: 'c'}); - } + coerce('marker.line.color', defaultMLC); + if(hasColorscale(traceIn, 'marker.line')) { + colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.line.', cLetter: 'c'}); + } - coerce('marker.line.width', isBubble ? 1 : 0); + coerce('marker.line.width', isBubble ? 1 : 0); + } if(isBubble) { coerce('marker.sizeref'); @@ -168054,7 +169176,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/color":585,"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598,"./subtypes":967}],964:[function(require,module,exports){ +},{"../../components/color":578,"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591,"./subtypes":996}],993:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168460,11 +169582,11 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition textFilter = hideFilter; if(showMarkers) { - markerFilter = trace.marker.maxdisplayed ? visFilter : Lib.identity; + markerFilter = (trace.marker.maxdisplayed || trace._needsCull) ? visFilter : Lib.identity; } if(showText) { - textFilter = trace.marker.maxdisplayed ? visFilter : Lib.identity; + textFilter = (trace.marker.maxdisplayed || trace._needsCull) ? visFilter : Lib.identity; } // marker points @@ -168527,7 +169649,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition var x = d.xp || xa.c2p(d.x), y = d.yp || ya.c2p(d.y); - d3.select(this).selectAll('tspan').each(function() { + d3.select(this).selectAll('tspan.line').each(function() { transition(d3.select(this)).attr({x: x, y: y}); }); }); @@ -168594,7 +169716,7 @@ function selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll) { }); } -},{"../../components/drawing":608,"../../components/errorbars":614,"../../lib":690,"../../lib/polygon":700,"./line_points":959,"./link_traces":961,"./subtypes":967,"d3":114}],965:[function(require,module,exports){ +},{"../../components/drawing":602,"../../components/errorbars":608,"../../lib":685,"../../lib/polygon":695,"./line_points":988,"./link_traces":990,"./subtypes":996,"d3":107}],994:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168666,7 +169788,7 @@ module.exports = function selectPoints(searchInfo, polygon) { return selection; }; -},{"./subtypes":967}],966:[function(require,module,exports){ +},{"./subtypes":996}],995:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168712,7 +169834,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/drawing":608,"../../components/errorbars":614,"d3":114}],967:[function(require,module,exports){ +},{"../../components/drawing":602,"../../components/errorbars":608,"d3":107}],996:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168748,7 +169870,7 @@ module.exports = { } }; -},{"../../lib":690}],968:[function(require,module,exports){ +},{"../../lib":685}],997:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168769,7 +169891,7 @@ module.exports = function(traceIn, traceOut, layout, coerce) { Lib.coerceFont(coerce, 'textfont', layout.font); }; -},{"../../lib":690}],969:[function(require,module,exports){ +},{"../../lib":685}],998:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168819,7 +169941,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) { return len; }; -},{"../../registry":807}],970:[function(require,module,exports){ +},{"../../registry":802}],999:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168833,6 +169955,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) { var scatterAttrs = require('../scatter/attributes'); var colorAttributes = require('../../components/colorscale/color_attributes'); var errorBarAttrs = require('../../components/errorbars/attributes'); +var DASHES = require('../../constants/gl3d_dashes'); var MARKER_SYMBOLS = require('../../constants/gl_markers'); var extendFlat = require('../../lib/extend').extendFlat; @@ -168936,7 +170059,13 @@ module.exports = { connectgaps: scatterAttrs.connectgaps, line: extendFlat({}, { width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash, + dash: { + valType: 'enumerated', + values: Object.keys(DASHES), + dflt: 'solid', + role: 'style', + description: 'Sets the dash style of the lines.' + }, showscale: { valType: 'boolean', role: 'info', @@ -168992,7 +170121,7 @@ module.exports = { error_z: errorBarAttrs, }; -},{"../../components/colorscale/color_attributes":592,"../../components/errorbars/attributes":610,"../../constants/gl_markers":670,"../../lib/extend":682,"../scatter/attributes":947}],971:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":585,"../../components/errorbars/attributes":604,"../../constants/gl3d_dashes":663,"../../constants/gl_markers":664,"../../lib/extend":677,"../scatter/attributes":976}],1000:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169021,7 +170150,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951}],972:[function(require,module,exports){ +},{"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980}],1001:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169092,7 +170221,7 @@ function calculateErrors(data, scaleFactor) { module.exports = calculateErrors; -},{"../../components/errorbars/compute_error":612}],973:[function(require,module,exports){ +},{"../../components/errorbars/compute_error":606}],1002:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169563,7 +170692,7 @@ function createLineWithMarkers(scene, data) { module.exports = createLineWithMarkers; -},{"../../constants/gl3d_dashes":669,"../../constants/gl_markers":670,"../../lib":690,"../../lib/gl_format_color":687,"../../lib/str2rgbarray":708,"../scatter/make_bubble_size_func":962,"./calc_errors":972,"delaunay-triangulate":115,"gl-error3d":153,"gl-line3d":163,"gl-mesh3d":196,"gl-scatter3d":242}],974:[function(require,module,exports){ +},{"../../constants/gl3d_dashes":663,"../../constants/gl_markers":664,"../../lib":685,"../../lib/gl_format_color":682,"../../lib/str2rgbarray":703,"../scatter/make_bubble_size_func":991,"./calc_errors":1001,"delaunay-triangulate":108,"gl-error3d":146,"gl-line3d":156,"gl-mesh3d":189,"gl-scatter3d":235}],1003:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169653,7 +170782,7 @@ function handleXYZDefaults(traceIn, traceOut, coerce, layout) { return len; } -},{"../../components/errorbars/defaults":613,"../../lib":690,"../../registry":807,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":970}],975:[function(require,module,exports){ +},{"../../components/errorbars/defaults":607,"../../lib":685,"../../registry":802,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":999}],1004:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169691,7 +170820,7 @@ Scatter3D.meta = { module.exports = Scatter3D; -},{"../../constants/gl_markers":670,"../../plots/gl3d":772,"../scatter/colorbar":950,"./attributes":970,"./calc":971,"./convert":973,"./defaults":974}],976:[function(require,module,exports){ +},{"../../constants/gl_markers":664,"../../plots/gl3d":767,"../scatter/colorbar":979,"./attributes":999,"./calc":1000,"./convert":1002,"./defaults":1003}],1005:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169705,6 +170834,522 @@ module.exports = Scatter3D; var scatterAttrs = require('../scatter/attributes'); var plotAttrs = require('../../plots/attributes'); var colorAttributes = require('../../components/colorscale/color_attributes'); +var colorbarAttrs = require('../../components/colorbar/attributes'); + +var extendFlat = require('../../lib/extend').extendFlat; + +var scatterMarkerAttrs = scatterAttrs.marker, + scatterLineAttrs = scatterAttrs.line, + scatterMarkerLineAttrs = scatterMarkerAttrs.line; + +module.exports = { + carpet: { + valType: 'string', + role: 'info', + description: [ + 'An identifier for this carpet, so that `scattercarpet` and', + '`scattercontour` traces can specify a carpet plot on which', + 'they lie' + ].join(' ') + }, + a: { + valType: 'data_array', + description: [ + 'Sets the quantity of component `a` in each data point.', + 'If `a`, `b`, and `c` are all provided, they need not be', + 'normalized, only the relative values matter. If only two', + 'arrays are provided they must be normalized to match', + '`ternary.sum`.' + ].join(' ') + }, + b: { + valType: 'data_array', + description: [ + 'Sets the quantity of component `a` in each data point.', + 'If `a`, `b`, and `c` are all provided, they need not be', + 'normalized, only the relative values matter. If only two', + 'arrays are provided they must be normalized to match', + '`ternary.sum`.' + ].join(' ') + }, + sum: { + valType: 'number', + role: 'info', + dflt: 0, + min: 0, + description: [ + 'The number each triplet should sum to,', + 'if only two of `a`, `b`, and `c` are provided.', + 'This overrides `ternary.sum` to normalize this specific', + 'trace, but does not affect the values displayed on the axes.', + '0 (or missing) means to use ternary.sum' + ].join(' ') + }, + mode: extendFlat({}, scatterAttrs.mode, {dflt: 'markers'}), + text: extendFlat({}, scatterAttrs.text, { + description: [ + 'Sets text elements associated with each (a,b,c) point.', + 'If a single string, the same string appears over', + 'all the data points.', + 'If an array of strings, the items are mapped in order to the', + 'the data points in (a,b,c).' + ].join(' ') + }), + line: { + color: scatterLineAttrs.color, + width: scatterLineAttrs.width, + dash: scatterLineAttrs.dash, + shape: extendFlat({}, scatterLineAttrs.shape, + {values: ['linear', 'spline']}), + smoothing: scatterLineAttrs.smoothing + }, + connectgaps: scatterAttrs.connectgaps, + fill: extendFlat({}, scatterAttrs.fill, { + values: ['none', 'toself', 'tonext'], + description: [ + 'Sets the area to fill with a solid color.', + 'Use with `fillcolor` if not *none*.', + 'scatterternary has a subset of the options available to scatter.', + '*toself* connects the endpoints of the trace (or each segment', + 'of the trace if it has gaps) into a closed shape.', + '*tonext* fills the space between two traces if one completely', + 'encloses the other (eg consecutive contour lines), and behaves like', + '*toself* if there is no trace before it. *tonext* should not be', + 'used if one trace does not enclose the other.' + ].join(' ') + }), + fillcolor: scatterAttrs.fillcolor, + marker: extendFlat({}, { + symbol: scatterMarkerAttrs.symbol, + opacity: scatterMarkerAttrs.opacity, + maxdisplayed: scatterMarkerAttrs.maxdisplayed, + size: scatterMarkerAttrs.size, + sizeref: scatterMarkerAttrs.sizeref, + sizemin: scatterMarkerAttrs.sizemin, + sizemode: scatterMarkerAttrs.sizemode, + line: extendFlat({}, + {width: scatterMarkerLineAttrs.width}, + colorAttributes('marker'.line) + ) + }, colorAttributes('marker'), { + showscale: scatterMarkerAttrs.showscale, + colorbar: colorbarAttrs + }), + + textfont: scatterAttrs.textfont, + textposition: scatterAttrs.textposition, + hoverinfo: extendFlat({}, plotAttrs.hoverinfo, { + flags: ['a', 'b', 'c', 'text', 'name'] + }), + hoveron: scatterAttrs.hoveron, +}; + +},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1006:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var isNumeric = require('fast-isnumeric'); + +var Axes = require('../../plots/cartesian/axes'); +var Lib = require('../../lib'); + +var subTypes = require('../scatter/subtypes'); +var calcColorscale = require('../scatter/colorscale_calc'); +var lookupCarpet = require('../carpet/lookup_carpetid'); + +module.exports = function calc(gd, trace) { + var carpet = trace.carpetTrace = lookupCarpet(gd, trace); + if(!carpet || !carpet.visible || carpet.visible === 'legendonly') return; + var i; + + // Transfer this over from carpet before plotting since this is a necessary + // condition in order for cartesian to actually plot this trace: + trace.xaxis = carpet.xaxis; + trace.yaxis = carpet.yaxis; + + // make the calcdata array + var serieslen = trace.a.length; + var cd = new Array(serieslen); + var a, b; + var needsCull = false; + for(i = 0; i < serieslen; i++) { + a = trace.a[i]; + b = trace.b[i]; + if(isNumeric(a) && isNumeric(b)) { + var xy = carpet.ab2xy(+a, +b, true); + var visible = carpet.isVisible(+a, +b); + if(!visible) needsCull = true; + cd[i] = {x: xy[0], y: xy[1], a: a, b: b, vis: visible}; + } + else cd[i] = {x: false, y: false}; + } + + trace._needsCull = needsCull; + + cd[0].carpet = carpet; + cd[0].trace = trace; + + // fill in some extras + var marker, s; + if(subTypes.hasMarkers(trace)) { + // Treat size like x or y arrays --- Run d2c + // this needs to go before ppad computation + marker = trace.marker; + s = marker.size; + + if(Array.isArray(s)) { + var ax = {type: 'linear'}; + Axes.setConvert(ax); + s = ax.makeCalcdata(trace.marker, 'size'); + if(s.length > serieslen) s.splice(serieslen, s.length - serieslen); + } + } + + calcColorscale(trace); + + // this has migrated up from arraysToCalcdata as we have a reference to 's' here + if(typeof s !== 'undefined') Lib.mergeArray(s, cd, 'ms'); + + return cd; +}; + +},{"../../lib":685,"../../plots/cartesian/axes":724,"../carpet/lookup_carpetid":858,"../scatter/colorscale_calc":980,"../scatter/subtypes":996,"fast-isnumeric":116}],1007:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Lib = require('../../lib'); + +var constants = require('../scatter/constants'); +var subTypes = require('../scatter/subtypes'); +var handleMarkerDefaults = require('../scatter/marker_defaults'); +var handleLineDefaults = require('../scatter/line_defaults'); +var handleLineShapeDefaults = require('../scatter/line_shape_defaults'); +var handleTextDefaults = require('../scatter/text_defaults'); +var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); + +var attributes = require('./attributes'); + + +module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { + function coerce(attr, dflt) { + return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); + } + + coerce('carpet'); + + // XXX: Don't hard code this + traceOut.xaxis = 'x'; + traceOut.yaxis = 'y'; + + var a = coerce('a'), + b = coerce('b'), + len; + + len = Math.min(a.length, b.length); + + if(!len) { + traceOut.visible = false; + return; + } + + // cut all data arrays down to same length + if(a && len < a.length) traceOut.a = a.slice(0, len); + if(b && len < b.length) traceOut.b = b.slice(0, len); + + coerce('sum'); + + coerce('text'); + + var defaultMode = len < constants.PTS_LINESONLY ? 'lines+markers' : 'lines'; + coerce('mode', defaultMode); + + if(subTypes.hasLines(traceOut)) { + handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce); + handleLineShapeDefaults(traceIn, traceOut, coerce); + coerce('connectgaps'); + } + + if(subTypes.hasMarkers(traceOut)) { + handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce); + } + + if(subTypes.hasText(traceOut)) { + handleTextDefaults(traceIn, traceOut, layout, coerce); + } + + var dfltHoverOn = []; + + if(subTypes.hasMarkers(traceOut) || subTypes.hasText(traceOut)) { + coerce('marker.maxdisplayed'); + dfltHoverOn.push('points'); + } + + coerce('fill'); + if(traceOut.fill !== 'none') { + handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce); + if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce); + } + + coerce('hoverinfo', (layout._dataLength === 1) ? 'a+b+text' : undefined); + + if(traceOut.fill === 'tonext' || traceOut.fill === 'toself') { + dfltHoverOn.push('fills'); + } + coerce('hoveron', dfltHoverOn.join('+') || 'points'); +}; + +},{"../../lib":685,"../scatter/constants":981,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/line_shape_defaults":989,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1005}],1008:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var scatterHover = require('../scatter/hover'); + +module.exports = function hoverPoints(pointData, xval, yval, hovermode) { + var scatterPointData = scatterHover(pointData, xval, yval, hovermode); + if(!scatterPointData || scatterPointData[0].index === false) return; + + var newPointData = scatterPointData[0]; + + // if hovering on a fill, we don't show any point data so the label is + // unchanged from what scatter gives us - except that it needs to + // be constrained to the trianglular plot area, not just the rectangular + // area defined by the synthetic x and y axes + // TODO: in some cases the vertical middle of the shape is not within + // the triangular viewport at all, so the label can become disconnected + // from the shape entirely. But calculating what portion of the shape + // is actually visible, as constrained by the diagonal axis lines, is not + // so easy and anyway we lost the information we would have needed to do + // this inside scatterHover. + if(newPointData.index === undefined) { + var yFracUp = 1 - (newPointData.y0 / pointData.ya._length), + xLen = pointData.xa._length, + xMin = xLen * yFracUp / 2, + xMax = xLen - xMin; + newPointData.x0 = Math.max(Math.min(newPointData.x0, xMax), xMin); + newPointData.x1 = Math.max(Math.min(newPointData.x1, xMax), xMin); + return scatterPointData; + } + + var cdi = newPointData.cd[newPointData.index]; + + newPointData.a = cdi.a; + newPointData.b = cdi.b; + + newPointData.xLabelVal = undefined; + newPointData.yLabelVal = undefined; + // TODO: nice formatting, and label by axis title, for a, b, and c? + + var trace = newPointData.trace, + carpet = trace._carpet, + hoverinfo = trace.hoverinfo.split('+'), + text = []; + + function textPart(ax, val) { + text.push(((ax.labelprefix && ax.labelprefix.length > 0) ? ax.labelprefix : (ax._hovertitle + ': ')) + val.toFixed(3) + ax.labelsuffix); + } + + if(hoverinfo.indexOf('all') !== -1) hoverinfo = ['a', 'b']; + if(hoverinfo.indexOf('a') !== -1) textPart(carpet.aaxis, cdi.a); + if(hoverinfo.indexOf('b') !== -1) textPart(carpet.baxis, cdi.b); + + var ij = carpet.ab2ij([cdi.a, cdi.b]); + var i0 = Math.floor(ij[0]); + var ti = ij[0] - i0; + + var j0 = Math.floor(ij[1]); + var tj = ij[1] - j0; + + var xy = carpet.evalxy([], i0, j0, ti, tj); + text.push('y: ' + xy[1].toFixed(3)); + + newPointData.extraText = text.join('
'); + + return scatterPointData; +}; + +},{"../scatter/hover":985}],1009:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var ScatterCarpet = {}; + +ScatterCarpet.attributes = require('./attributes'); +ScatterCarpet.supplyDefaults = require('./defaults'); +ScatterCarpet.colorbar = require('../scatter/colorbar'); +ScatterCarpet.calc = require('./calc'); +ScatterCarpet.plot = require('./plot'); +ScatterCarpet.style = require('./style'); +ScatterCarpet.hoverPoints = require('./hover'); +ScatterCarpet.selectPoints = require('./select'); + +ScatterCarpet.moduleType = 'trace'; +ScatterCarpet.name = 'scattercarpet'; +ScatterCarpet.basePlotModule = require('../../plots/cartesian'); +ScatterCarpet.categories = ['carpet', 'symbols', 'markerColorscale', 'showLegend', 'carpetDependent']; +ScatterCarpet.meta = { + hrName: 'scatter_carpet', + description: [ + 'Plots a scatter trace on either the first carpet axis or the', + 'carpet axis with a matching `carpet` attribute.' + ].join(' ') +}; + +module.exports = ScatterCarpet; + +},{"../../plots/cartesian":734,"../scatter/colorbar":979,"./attributes":1005,"./calc":1006,"./defaults":1007,"./hover":1008,"./plot":1010,"./select":1011,"./style":1012}],1010:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var scatterPlot = require('../scatter/plot'); +var Axes = require('../../plots/cartesian/axes'); + +module.exports = function plot(gd, plotinfoproxy, data) { + var i, trace, node; + + var carpet = data[0][0].carpet; + + // mimic cartesian plotinfo + var plotinfo = { + xaxis: Axes.getFromId(gd, carpet.xaxis || 'x'), + yaxis: Axes.getFromId(gd, carpet.yaxis || 'y'), + plot: plotinfoproxy.plot + }; + + scatterPlot(plotinfo.graphDiv, plotinfo, data); + + for(i = 0; i < data.length; i++) { + trace = data[i][0].trace; + + // Note: .select is adequate but seems to mutate the node data, + // which is at least a bit suprising and causes problems elsewhere + node = plotinfo.plot.selectAll('g.trace' + trace.uid + ' .js-line'); + + // Note: it would be more efficient if this didn't need to be applied + // separately to all scattercarpet traces, but that would require + // lots of reorganization of scatter traces that is otherwise not + // necessary. That makes this a potential optimization. + node.attr('clip-path', 'url(#clip' + carpet.uid + 'carpet)'); + } +}; + +},{"../../plots/cartesian/axes":724,"../scatter/plot":993}],1011:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var scatterSelect = require('../scatter/select'); + + +module.exports = function selectPoints(searchInfo, polygon) { + var selection = scatterSelect(searchInfo, polygon); + if(!selection) return; + + var cd = searchInfo.cd, + pt, cdi, i; + + for(i = 0; i < selection.length; i++) { + pt = selection[i]; + cdi = cd[pt.pointNumber]; + pt.a = cdi.a; + pt.b = cdi.b; + pt.c = cdi.c; + delete pt.x; + delete pt.y; + } + + return selection; +}; + +},{"../scatter/select":994}],1012:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var scatterStyle = require('../scatter/style'); + + +module.exports = function style(gd) { + var modules = gd._fullLayout._modules; + + // we're just going to call scatter style... if we already + // called it, don't need to redo. + // Later though we may want differences, or we may make style + // more specific in its scope, then we can remove this. + for(var i = 0; i < modules.length; i++) { + if(modules[i].name === 'scatter') return; + } + + scatterStyle(gd); +}; + +},{"../scatter/style":995}],1013:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var scatterAttrs = require('../scatter/attributes'); +var plotAttrs = require('../../plots/attributes'); +var colorAttributes = require('../../components/colorscale/color_attributes'); +var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; @@ -169773,7 +171418,7 @@ module.exports = { line: { color: scatterLineAttrs.color, width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash + dash: dash }, connectgaps: scatterAttrs.connectgaps, @@ -169813,7 +171458,7 @@ module.exports = { }) }; -},{"../../components/colorscale/color_attributes":592,"../../lib/extend":682,"../../plots/attributes":727,"../scatter/attributes":947}],977:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":585,"../../components/drawing/attributes":601,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1014:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169857,7 +171502,7 @@ module.exports = function calc(gd, trace) { return calcTrace; }; -},{"../../constants/numerical":672,"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951,"fast-isnumeric":123}],978:[function(require,module,exports){ +},{"../../constants/numerical":666,"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980,"fast-isnumeric":116}],1015:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169938,7 +171583,7 @@ function handleLonLatLocDefaults(traceIn, traceOut, coerce) { return len; } -},{"../../lib":690,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":976}],979:[function(require,module,exports){ +},{"../../lib":685,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1013}],1016:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169959,7 +171604,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],980:[function(require,module,exports){ +},{}],1017:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170076,7 +171721,7 @@ function getExtraText(trace, pt, axis) { return text.join('
'); } -},{"../../constants/numerical":672,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"../scatter/get_trace_color":955,"./attributes":976}],981:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"../scatter/get_trace_color":984,"./attributes":1013}],1018:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170113,7 +171758,7 @@ ScatterGeo.meta = { module.exports = ScatterGeo; -},{"../../plots/geo":757,"../scatter/colorbar":950,"./attributes":976,"./calc":977,"./defaults":978,"./event_data":979,"./hover":980,"./plot":982}],982:[function(require,module,exports){ +},{"../../plots/geo":752,"../scatter/colorbar":979,"./attributes":1013,"./calc":1014,"./defaults":1015,"./event_data":1016,"./hover":1017,"./plot":1019}],1019:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170252,7 +171897,7 @@ function style(geo) { }); } -},{"../../components/color":585,"../../components/drawing":608,"../../constants/numerical":672,"../../lib":690,"../../lib/geo_location_utils":685,"../../lib/geojson_utils":686,"../../lib/topojson_utils":711,"../scatter/subtypes":967,"d3":114}],983:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"../../constants/numerical":666,"../../lib":685,"../../lib/geo_location_utils":680,"../../lib/geojson_utils":681,"../../lib/topojson_utils":706,"../scatter/subtypes":996,"d3":107}],1020:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170342,7 +171987,7 @@ module.exports = { error_x: scatterAttrs.error_x }; -},{"../../components/colorscale/color_attributes":592,"../../constants/gl2d_dashes":668,"../../constants/gl_markers":670,"../../lib/extend":682,"../scatter/attributes":947}],984:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":585,"../../constants/gl2d_dashes":662,"../../constants/gl_markers":664,"../../lib/extend":677,"../scatter/attributes":976}],1021:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170991,7 +172636,7 @@ function createLineWithMarkers(scene, data) { module.exports = createLineWithMarkers; -},{"../../components/errorbars":614,"../../constants/gl2d_dashes":668,"../../constants/gl_markers":670,"../../lib":690,"../../lib/gl_format_color":687,"../../lib/str2rgbarray":708,"../../lib/typed_array_truncate":712,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_autotype":730,"../scatter/get_trace_color":955,"../scatter/make_bubble_size_func":962,"../scatter/subtypes":967,"fast-isnumeric":123,"gl-error2d":151,"gl-line2d":161,"gl-scatter2d":239,"gl-scatter2d-sdf":234}],985:[function(require,module,exports){ +},{"../../components/errorbars":608,"../../constants/gl2d_dashes":662,"../../constants/gl_markers":664,"../../lib":685,"../../lib/gl_format_color":682,"../../lib/str2rgbarray":703,"../../lib/typed_array_truncate":707,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_autotype":725,"../scatter/get_trace_color":984,"../scatter/make_bubble_size_func":991,"../scatter/subtypes":996,"fast-isnumeric":116,"gl-error2d":144,"gl-line2d":154,"gl-scatter2d":232,"gl-scatter2d-sdf":227}],1022:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171048,7 +172693,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, defaultColor, {axis: 'x', inherit: 'y'}); }; -},{"../../components/errorbars/defaults":613,"../../lib":690,"../scatter/constants":952,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/xy_defaults":969,"./attributes":983}],986:[function(require,module,exports){ +},{"../../components/errorbars/defaults":607,"../../lib":685,"../scatter/constants":981,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/xy_defaults":998,"./attributes":1020}],1023:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171084,7 +172729,7 @@ ScatterGl.meta = { module.exports = ScatterGl; -},{"../../plots/gl2d":769,"../scatter/colorbar":950,"../scatter3d/calc":971,"./attributes":983,"./convert":984,"./defaults":985}],987:[function(require,module,exports){ +},{"../../plots/gl2d":764,"../scatter/colorbar":979,"../scatter3d/calc":1000,"./attributes":1020,"./convert":1021,"./defaults":1022}],1024:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171148,10 +172793,10 @@ module.exports = { line: { color: lineAttrs.color, - width: lineAttrs.width, + width: lineAttrs.width // TODO - dash: lineAttrs.dash + // dash: dash }, connectgaps: scatterAttrs.connectgaps, @@ -171200,7 +172845,7 @@ module.exports = { }), }; -},{"../../components/colorbar/attributes":586,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/mapbox/layout_attributes":788,"../scatter/attributes":947,"../scattergeo/attributes":976}],988:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../lib/extend":677,"../../plots/attributes":722,"../../plots/mapbox/layout_attributes":783,"../scatter/attributes":976,"../scattergeo/attributes":1013}],1025:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171540,7 +173185,7 @@ function isBADNUM(lonlat) { return lonlat[0] === BADNUM; } -},{"../../components/colorscale":599,"../../constants/numerical":672,"../../lib":690,"../../lib/geojson_utils":686,"../../plots/mapbox/convert_text_opts":785,"../scatter/make_bubble_size_func":962,"../scatter/subtypes":967}],989:[function(require,module,exports){ +},{"../../components/colorscale":592,"../../constants/numerical":666,"../../lib":685,"../../lib/geojson_utils":681,"../../plots/mapbox/convert_text_opts":780,"../scatter/make_bubble_size_func":991,"../scatter/subtypes":996}],1026:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171561,7 +173206,6 @@ var handleTextDefaults = require('../scatter/text_defaults'); var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); var attributes = require('./attributes'); -var scatterAttrs = require('../scatter/attributes'); module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { @@ -171569,15 +173213,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); } - function coerceMarker(attr, dflt) { - var attrs = (attr.indexOf('.line') === -1) ? attributes : scatterAttrs; - - // use 'scatter' attributes for 'marker.line.' attr, - // so that we can reuse the scatter marker defaults - - return Lib.coerce(traceIn, traceOut, attrs, attr, dflt); - } - var len = handleLonLatDefaults(traceIn, traceOut, coerce); if(!len) { traceOut.visible = false; @@ -171589,16 +173224,18 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('mode'); if(subTypes.hasLines(traceOut)) { - handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce); + handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noDash: true}); coerce('connectgaps'); } if(subTypes.hasMarkers(traceOut)) { - handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerceMarker); + handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noLine: true}); // array marker.size and marker.color are only supported with circles var marker = traceOut.marker; + // we need mock marker.line object to make legends happy + marker.line = {width: 0}; if(marker.symbol !== 'circle') { if(Array.isArray(marker.size)) marker.size = marker.size[0]; @@ -171629,7 +173266,7 @@ function handleLonLatDefaults(traceIn, traceOut, coerce) { return len; } -},{"../../lib":690,"../scatter/attributes":947,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":987}],990:[function(require,module,exports){ +},{"../../lib":685,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1024}],1027:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171649,7 +173286,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],991:[function(require,module,exports){ +},{}],1028:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171752,7 +173389,7 @@ function getExtraText(trace, di) { return text.join('
'); } -},{"../../constants/numerical":672,"../../plots/cartesian/graph_interact":738,"../scatter/get_trace_color":955}],992:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../plots/cartesian/graph_interact":733,"../scatter/get_trace_color":984}],1029:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171789,7 +173426,7 @@ ScatterMapbox.meta = { module.exports = ScatterMapbox; -},{"../../plots/mapbox":786,"../scatter/colorbar":950,"../scattergeo/calc":977,"./attributes":987,"./defaults":989,"./event_data":990,"./hover":991,"./plot":993}],993:[function(require,module,exports){ +},{"../../plots/mapbox":781,"../scatter/colorbar":979,"../scattergeo/calc":1014,"./attributes":1024,"./defaults":1026,"./event_data":1027,"./hover":1028,"./plot":1030}],1030:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171913,7 +173550,7 @@ module.exports = function createScatterMapbox(mapbox, calcTrace) { return scatterMapbox; }; -},{"./convert":988}],994:[function(require,module,exports){ +},{"./convert":1025}],1031:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171928,6 +173565,7 @@ var scatterAttrs = require('../scatter/attributes'); var plotAttrs = require('../../plots/attributes'); var colorAttributes = require('../../components/colorscale/color_attributes'); var colorbarAttrs = require('../../components/colorbar/attributes'); +var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; @@ -172004,7 +173642,7 @@ module.exports = { line: { color: scatterLineAttrs.color, width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash, + dash: dash, shape: extendFlat({}, scatterLineAttrs.shape, {values: ['linear', 'spline']}), smoothing: scatterLineAttrs.smoothing @@ -172050,7 +173688,7 @@ module.exports = { hoveron: scatterAttrs.hoveron, }; -},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../lib/extend":682,"../../plots/attributes":727,"../scatter/attributes":947}],995:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/drawing/attributes":601,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1032:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172147,7 +173785,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../plots/cartesian/axes":729,"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951,"../scatter/subtypes":967,"fast-isnumeric":123}],996:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980,"../scatter/subtypes":996,"fast-isnumeric":116}],1033:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172253,7 +173891,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('hoveron', dfltHoverOn.join('+') || 'points'); }; -},{"../../lib":690,"../scatter/constants":952,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/line_shape_defaults":960,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":994}],997:[function(require,module,exports){ +},{"../../lib":685,"../scatter/constants":981,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/line_shape_defaults":989,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1031}],1034:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172324,7 +173962,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return scatterPointData; }; -},{"../../plots/cartesian/axes":729,"../scatter/hover":956}],998:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"../scatter/hover":985}],1035:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172360,7 +173998,7 @@ ScatterTernary.meta = { module.exports = ScatterTernary; -},{"../../plots/ternary":800,"../scatter/colorbar":950,"./attributes":994,"./calc":995,"./defaults":996,"./hover":997,"./plot":999,"./select":1000,"./style":1001}],999:[function(require,module,exports){ +},{"../../plots/ternary":795,"../scatter/colorbar":979,"./attributes":1031,"./calc":1032,"./defaults":1033,"./hover":1034,"./plot":1036,"./select":1037,"./style":1038}],1036:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172396,71 +174034,11 @@ module.exports = function plot(ternary, moduleCalcData) { scatterPlot(ternary.graphDiv, plotinfo, moduleCalcData); }; -},{"../scatter/plot":964}],1000:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var scatterSelect = require('../scatter/select'); - - -module.exports = function selectPoints(searchInfo, polygon) { - var selection = scatterSelect(searchInfo, polygon); - if(!selection) return; - - var cd = searchInfo.cd, - pt, cdi, i; - - for(i = 0; i < selection.length; i++) { - pt = selection[i]; - cdi = cd[pt.pointNumber]; - pt.a = cdi.a; - pt.b = cdi.b; - pt.c = cdi.c; - delete pt.x; - delete pt.y; - } - - return selection; -}; - -},{"../scatter/select":965}],1001:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var scatterStyle = require('../scatter/style'); - - -module.exports = function style(gd) { - var modules = gd._fullLayout._modules; - - // we're just going to call scatter style... if we already - // called it, don't need to redo. - // Later though we may want differences, or we may make style - // more specific in its scope, then we can remove this. - for(var i = 0; i < modules.length; i++) { - if(modules[i].name === 'scatter') return; - } - - scatterStyle(gd); -}; - -},{"../scatter/style":966}],1002:[function(require,module,exports){ +},{"../scatter/plot":993}],1037:[function(require,module,exports){ +arguments[4][1011][0].apply(exports,arguments) +},{"../scatter/select":994,"dup":1011}],1038:[function(require,module,exports){ +arguments[4][1012][0].apply(exports,arguments) +},{"../scatter/style":995,"dup":1012}],1039:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172708,7 +174286,7 @@ module.exports = { } }; -},{"../../components/color":585,"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682}],1003:[function(require,module,exports){ +},{"../../components/color":578,"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677}],1040:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172732,7 +174310,7 @@ module.exports = function calc(gd, trace) { } }; -},{"../../components/colorscale/calc":591}],1004:[function(require,module,exports){ +},{"../../components/colorscale/calc":584}],1041:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172784,7 +174362,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],1005:[function(require,module,exports){ +},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],1042:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173163,7 +174741,7 @@ function createSurfaceTrace(scene, data) { module.exports = createSurfaceTrace; -},{"../../lib/str2rgbarray":708,"gl-surface3d":257,"ndarray":456,"ndarray-fill":446,"ndarray-homography":448,"ndarray-ops":450,"tinycolor2":521}],1006:[function(require,module,exports){ +},{"../../lib/str2rgbarray":703,"gl-surface3d":250,"ndarray":449,"ndarray-fill":439,"ndarray-homography":441,"ndarray-ops":443,"tinycolor2":514}],1043:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173284,7 +174862,7 @@ function mapLegacy(traceIn, oldAttr, newAttr) { } } -},{"../../components/colorscale/defaults":594,"../../lib":690,"../../registry":807,"./attributes":1002}],1007:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587,"../../lib":685,"../../registry":802,"./attributes":1039}],1044:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173327,7 +174905,7 @@ Surface.meta = { module.exports = Surface; -},{"../../plots/gl3d":772,"./attributes":1002,"./calc":1003,"./colorbar":1004,"./convert":1005,"./defaults":1006}],1008:[function(require,module,exports){ +},{"../../plots/gl3d":767,"./attributes":1039,"./calc":1040,"./colorbar":1041,"./convert":1042,"./defaults":1043}],1045:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173664,7 +175242,7 @@ function getFilterFunc(opts, d2c, targetCalendar) { } } -},{"../lib":690,"../plot_api/plot_schema":718,"../plots/cartesian/axis_autotype":730,"../plots/cartesian/axis_ids":732,"../plots/cartesian/set_convert":746,"../registry":807}],1009:[function(require,module,exports){ +},{"../lib":685,"../plot_api/plot_schema":713,"../plots/cartesian/axis_autotype":725,"../plots/cartesian/axis_ids":727,"../plots/cartesian/set_convert":741,"../registry":802}],1046:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173820,5 +175398,5 @@ function transformOne(trace, state) { return newData; } -},{"../lib":690,"../plot_api/plot_schema":718}]},{},[17])(17) +},{"../lib":685,"../plot_api/plot_schema":713}]},{},[19])(19) }); \ No newline at end of file diff --git a/dist/plotly.js b/dist/plotly.js index 50a975dd4e4..ef22025d293 100644 --- a/dist/plotly.js +++ b/dist/plotly.js @@ -1,5 +1,5 @@ /** -* plotly.js v1.25.2 +* plotly.js v1.26.1 * Copyright 2012-2017, Plotly, Inc. * All rights reserved. * Licensed under the MIT license @@ -69,7 +69,7 @@ for(var selector in rules) { Lib.addStyleRule(fullSelector, rules[selector]); } -},{"../src/lib":690}],2:[function(require,module,exports){ +},{"../src/lib":685}],2:[function(require,module,exports){ 'use strict'; module.exports = { @@ -186,6 +186,12 @@ module.exports = { 'path': 'm0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z', 'ascent': 850, 'descent': -150 + }, + 'spikeline': { + 'width': 1000, + 'path': 'M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z', + 'ascent': 850, + 'descent': -150 } }; @@ -202,7 +208,7 @@ module.exports = { module.exports = require('../src/traces/bar'); -},{"../src/traces/bar":821}],4:[function(require,module,exports){ +},{"../src/traces/bar":816}],4:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -215,7 +221,7 @@ module.exports = require('../src/traces/bar'); module.exports = require('../src/traces/box'); -},{"../src/traces/box":833}],5:[function(require,module,exports){ +},{"../src/traces/box":828}],5:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -228,7 +234,7 @@ module.exports = require('../src/traces/box'); module.exports = require('../src/components/calendars'); -},{"../src/components/calendars":583}],6:[function(require,module,exports){ +},{"../src/components/calendars":576}],6:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -241,7 +247,20 @@ module.exports = require('../src/components/calendars'); module.exports = require('../src/traces/candlestick'); -},{"../src/traces/candlestick":841}],7:[function(require,module,exports){ +},{"../src/traces/candlestick":836}],7:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = require('../src/traces/carpet'); + +},{"../src/traces/carpet":857}],8:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -254,7 +273,7 @@ module.exports = require('../src/traces/candlestick'); module.exports = require('../src/traces/choropleth'); -},{"../src/traces/choropleth":848}],8:[function(require,module,exports){ +},{"../src/traces/choropleth":872}],9:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -267,7 +286,20 @@ module.exports = require('../src/traces/choropleth'); module.exports = require('../src/traces/contour'); -},{"../src/traces/contour":859}],9:[function(require,module,exports){ +},{"../src/traces/contour":883}],10:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = require('../src/traces/contourcarpet'); + +},{"../src/traces/contourcarpet":898}],11:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -280,7 +312,7 @@ module.exports = require('../src/traces/contour'); module.exports = require('../src/core'); -},{"../src/core":675}],10:[function(require,module,exports){ +},{"../src/core":669}],12:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -293,7 +325,7 @@ module.exports = require('../src/core'); module.exports = require('../src/transforms/filter'); -},{"../src/transforms/filter":1008}],11:[function(require,module,exports){ +},{"../src/transforms/filter":1045}],13:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -306,7 +338,7 @@ module.exports = require('../src/transforms/filter'); module.exports = require('../src/transforms/groupby'); -},{"../src/transforms/groupby":1009}],12:[function(require,module,exports){ +},{"../src/transforms/groupby":1046}],14:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -319,7 +351,7 @@ module.exports = require('../src/transforms/groupby'); module.exports = require('../src/traces/heatmap'); -},{"../src/traces/heatmap":874}],13:[function(require,module,exports){ +},{"../src/traces/heatmap":912}],15:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -332,7 +364,7 @@ module.exports = require('../src/traces/heatmap'); module.exports = require('../src/traces/heatmapgl'); -},{"../src/traces/heatmapgl":883}],14:[function(require,module,exports){ +},{"../src/traces/heatmapgl":921}],16:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -345,7 +377,7 @@ module.exports = require('../src/traces/heatmapgl'); module.exports = require('../src/traces/histogram'); -},{"../src/traces/histogram":891}],15:[function(require,module,exports){ +},{"../src/traces/histogram":929}],17:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -358,7 +390,7 @@ module.exports = require('../src/traces/histogram'); module.exports = require('../src/traces/histogram2d'); -},{"../src/traces/histogram2d":896}],16:[function(require,module,exports){ +},{"../src/traces/histogram2d":934}],18:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -371,7 +403,7 @@ module.exports = require('../src/traces/histogram2d'); module.exports = require('../src/traces/histogram2dcontour'); -},{"../src/traces/histogram2dcontour":900}],17:[function(require,module,exports){ +},{"../src/traces/histogram2dcontour":938}],19:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -395,7 +427,6 @@ Plotly.register([ require('./pie'), require('./contour'), require('./scatterternary'), - require('./sankey'), require('./scatter3d'), require('./surface'), @@ -411,6 +442,10 @@ Plotly.register([ require('./scattermapbox'), + require('./carpet'), + require('./scattercarpet'), + require('./contourcarpet'), + require('./ohlc'), require('./candlestick') ]); @@ -437,7 +472,7 @@ Plotly.register([ module.exports = Plotly; -},{"./bar":3,"./box":4,"./calendars":5,"./candlestick":6,"./choropleth":7,"./contour":8,"./core":9,"./filter":10,"./groupby":11,"./heatmap":12,"./heatmapgl":13,"./histogram":14,"./histogram2d":15,"./histogram2dcontour":16,"./mesh3d":18,"./ohlc":19,"./parcoords":20,"./pie":21,"./pointcloud":22,"./sankey":23,"./scatter3d":24,"./scattergeo":25,"./scattergl":26,"./scattermapbox":27,"./scatterternary":28,"./surface":29}],18:[function(require,module,exports){ +},{"./bar":3,"./box":4,"./calendars":5,"./candlestick":6,"./carpet":7,"./choropleth":8,"./contour":9,"./contourcarpet":10,"./core":11,"./filter":12,"./groupby":13,"./heatmap":14,"./heatmapgl":15,"./histogram":16,"./histogram2d":17,"./histogram2dcontour":18,"./mesh3d":20,"./ohlc":21,"./parcoords":22,"./pie":23,"./pointcloud":24,"./scatter3d":25,"./scattercarpet":26,"./scattergeo":27,"./scattergl":28,"./scattermapbox":29,"./scatterternary":30,"./surface":31}],20:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -450,7 +485,7 @@ module.exports = Plotly; module.exports = require('../src/traces/mesh3d'); -},{"../src/traces/mesh3d":904}],19:[function(require,module,exports){ +},{"../src/traces/mesh3d":942}],21:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -463,7 +498,7 @@ module.exports = require('../src/traces/mesh3d'); module.exports = require('../src/traces/ohlc'); -},{"../src/traces/ohlc":909}],20:[function(require,module,exports){ +},{"../src/traces/ohlc":947}],22:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -476,7 +511,7 @@ module.exports = require('../src/traces/ohlc'); module.exports = require('../src/traces/parcoords'); -},{"../src/traces/parcoords":918}],21:[function(require,module,exports){ +},{"../src/traces/parcoords":956}],23:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -489,7 +524,7 @@ module.exports = require('../src/traces/parcoords'); module.exports = require('../src/traces/pie'); -},{"../src/traces/pie":927}],22:[function(require,module,exports){ +},{"../src/traces/pie":965}],24:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -502,7 +537,7 @@ module.exports = require('../src/traces/pie'); module.exports = require('../src/traces/pointcloud'); -},{"../src/traces/pointcloud":936}],23:[function(require,module,exports){ +},{"../src/traces/pointcloud":974}],25:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -513,9 +548,9 @@ module.exports = require('../src/traces/pointcloud'); 'use strict'; -module.exports = require('../src/traces/sankey'); +module.exports = require('../src/traces/scatter3d'); -},{"../src/traces/sankey":943}],24:[function(require,module,exports){ +},{"../src/traces/scatter3d":1004}],26:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -526,9 +561,9 @@ module.exports = require('../src/traces/sankey'); 'use strict'; -module.exports = require('../src/traces/scatter3d'); +module.exports = require('../src/traces/scattercarpet'); -},{"../src/traces/scatter3d":975}],25:[function(require,module,exports){ +},{"../src/traces/scattercarpet":1009}],27:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -541,7 +576,7 @@ module.exports = require('../src/traces/scatter3d'); module.exports = require('../src/traces/scattergeo'); -},{"../src/traces/scattergeo":981}],26:[function(require,module,exports){ +},{"../src/traces/scattergeo":1018}],28:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -554,7 +589,7 @@ module.exports = require('../src/traces/scattergeo'); module.exports = require('../src/traces/scattergl'); -},{"../src/traces/scattergl":986}],27:[function(require,module,exports){ +},{"../src/traces/scattergl":1023}],29:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -567,7 +602,7 @@ module.exports = require('../src/traces/scattergl'); module.exports = require('../src/traces/scattermapbox'); -},{"../src/traces/scattermapbox":992}],28:[function(require,module,exports){ +},{"../src/traces/scattermapbox":1029}],30:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -580,7 +615,7 @@ module.exports = require('../src/traces/scattermapbox'); module.exports = require('../src/traces/scatterternary'); -},{"../src/traces/scatterternary":998}],29:[function(require,module,exports){ +},{"../src/traces/scatterternary":1035}],31:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -593,7 +628,7 @@ module.exports = require('../src/traces/scatterternary'); module.exports = require('../src/traces/surface'); -},{"../src/traces/surface":1007}],30:[function(require,module,exports){ +},{"../src/traces/surface":1044}],32:[function(require,module,exports){ 'use strict' module.exports = createCamera @@ -822,7 +857,7 @@ function createCamera(element, options) { return camera } -},{"3d-view":31,"mouse-change":441,"mouse-event-offset":442,"mouse-wheel":444,"right-now":490}],31:[function(require,module,exports){ +},{"3d-view":33,"mouse-change":434,"mouse-event-offset":435,"mouse-wheel":437,"right-now":483}],33:[function(require,module,exports){ 'use strict' module.exports = createViewController @@ -945,317 +980,7 @@ function createViewController(options) { matrix: matrix }, mode) } -},{"matrix-camera-controller":439,"orbit-camera-controller":461,"turntable-camera-controller":525}],32:[function(require,module,exports){ -// https://github.com/d3/d3-sankey Version 0.4.2. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-array'), require('d3-collection'), require('d3-interpolate')) : - typeof define === 'function' && define.amd ? define(['exports', 'd3-array', 'd3-collection', 'd3-interpolate'], factory) : - (factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3)); -}(this, (function (exports,d3Array,d3Collection,d3Interpolate) { 'use strict'; - -var sankey = function() { - var sankey = {}, - nodeWidth = 24, - nodePadding = 8, - size = [1, 1], - nodes = [], - links = []; - - sankey.nodeWidth = function(_) { - if (!arguments.length) return nodeWidth; - nodeWidth = +_; - return sankey; - }; - - sankey.nodePadding = function(_) { - if (!arguments.length) return nodePadding; - nodePadding = +_; - return sankey; - }; - - sankey.nodes = function(_) { - if (!arguments.length) return nodes; - nodes = _; - return sankey; - }; - - sankey.links = function(_) { - if (!arguments.length) return links; - links = _; - return sankey; - }; - - sankey.size = function(_) { - if (!arguments.length) return size; - size = _; - return sankey; - }; - - sankey.layout = function(iterations) { - computeNodeLinks(); - computeNodeValues(); - computeNodeBreadths(); - computeNodeDepths(iterations); - computeLinkDepths(); - return sankey; - }; - - sankey.relayout = function() { - computeLinkDepths(); - return sankey; - }; - - sankey.link = function() { - var curvature = .5; - - function link(d) { - var x0 = d.source.x + d.source.dx, - x1 = d.target.x, - xi = d3Interpolate.interpolateNumber(x0, x1), - x2 = xi(curvature), - x3 = xi(1 - curvature), - y0 = d.source.y + d.sy + d.dy / 2, - y1 = d.target.y + d.ty + d.dy / 2; - return "M" + x0 + "," + y0 - + "C" + x2 + "," + y0 - + " " + x3 + "," + y1 - + " " + x1 + "," + y1; - } - - link.curvature = function(_) { - if (!arguments.length) return curvature; - curvature = +_; - return link; - }; - - return link; - }; - - // Populate the sourceLinks and targetLinks for each node. - // Also, if the source and target are not objects, assume they are indices. - function computeNodeLinks() { - nodes.forEach(function(node) { - node.sourceLinks = []; - node.targetLinks = []; - }); - links.forEach(function(link, i) { - var source = link.source, - target = link.target; - if (typeof source === "number") source = link.source = nodes[link.source]; - if (typeof target === "number") target = link.target = nodes[link.target]; - link.originalIndex = i; - source.sourceLinks.push(link); - target.targetLinks.push(link); - }); - } - - // Compute the value (size) of each node by summing the associated links. - function computeNodeValues() { - nodes.forEach(function(node) { - node.value = Math.max( - d3Array.sum(node.sourceLinks, value), - d3Array.sum(node.targetLinks, value) - ); - }); - } - - // Iteratively assign the breadth (x-position) for each node. - // Nodes are assigned the maximum breadth of incoming neighbors plus one; - // nodes with no incoming links are assigned breadth zero, while - // nodes with no outgoing links are assigned the maximum breadth. - function computeNodeBreadths() { - var remainingNodes = nodes, - nextNodes, - x = 0; - - while (remainingNodes.length) { - nextNodes = []; - remainingNodes.forEach(function(node) { - node.x = x; - node.dx = nodeWidth; - node.sourceLinks.forEach(function(link) { - if (nextNodes.indexOf(link.target) < 0) { - nextNodes.push(link.target); - } - }); - }); - remainingNodes = nextNodes; - ++x; - } - - // - moveSinksRight(x); - scaleNodeBreadths((size[0] - nodeWidth) / (x - 1)); - } - - // function moveSourcesRight() { - // nodes.forEach(function(node) { - // if (!node.targetLinks.length) { - // node.x = min(node.sourceLinks, function(d) { return d.target.x; }) - 1; - // } - // }); - // } - - function moveSinksRight(x) { - nodes.forEach(function(node) { - if (!node.sourceLinks.length) { - node.x = x - 1; - } - }); - } - - function scaleNodeBreadths(kx) { - nodes.forEach(function(node) { - node.x *= kx; - }); - } - - function computeNodeDepths(iterations) { - var nodesByBreadth = d3Collection.nest() - .key(function(d) { return d.x; }) - .sortKeys(d3Array.ascending) - .entries(nodes) - .map(function(d) { return d.values; }); - - // - initializeNodeDepth(); - resolveCollisions(); - for (var alpha = 1; iterations > 0; --iterations) { - relaxRightToLeft(alpha *= .99); - resolveCollisions(); - relaxLeftToRight(alpha); - resolveCollisions(); - } - - function initializeNodeDepth() { - var ky = d3Array.min(nodesByBreadth, function(nodes) { - return (size[1] - (nodes.length - 1) * nodePadding) / d3Array.sum(nodes, value); - }); - - nodesByBreadth.forEach(function(nodes) { - nodes.forEach(function(node, i) { - node.y = i; - node.dy = node.value * ky; - }); - }); - - links.forEach(function(link) { - link.dy = link.value * ky; - }); - } - - function relaxLeftToRight(alpha) { - nodesByBreadth.forEach(function(nodes) { - nodes.forEach(function(node) { - if (node.targetLinks.length) { - var y = d3Array.sum(node.targetLinks, weightedSource) / d3Array.sum(node.targetLinks, value); - node.y += (y - center(node)) * alpha; - } - }); - }); - - function weightedSource(link) { - return center(link.source) * link.value; - } - } - - function relaxRightToLeft(alpha) { - nodesByBreadth.slice().reverse().forEach(function(nodes) { - nodes.forEach(function(node) { - if (node.sourceLinks.length) { - var y = d3Array.sum(node.sourceLinks, weightedTarget) / d3Array.sum(node.sourceLinks, value); - node.y += (y - center(node)) * alpha; - } - }); - }); - - function weightedTarget(link) { - return center(link.target) * link.value; - } - } - - function resolveCollisions() { - nodesByBreadth.forEach(function(nodes) { - var node, - dy, - y0 = 0, - n = nodes.length, - i; - - // Push any overlapping nodes down. - nodes.sort(ascendingDepth); - for (i = 0; i < n; ++i) { - node = nodes[i]; - dy = y0 - node.y; - if (dy > 0) node.y += dy; - y0 = node.y + node.dy + nodePadding; - } - - // If the bottommost node goes outside the bounds, push it back up. - dy = y0 - nodePadding - size[1]; - if (dy > 0) { - y0 = node.y -= dy; - - // Push any overlapping nodes back up. - for (i = n - 2; i >= 0; --i) { - node = nodes[i]; - dy = node.y + node.dy + nodePadding - y0; - if (dy > 0) node.y -= dy; - y0 = node.y; - } - } - }); - } - - function ascendingDepth(a, b) { - return a.y - b.y; - } - } - - function computeLinkDepths() { - nodes.forEach(function(node) { - node.sourceLinks.sort(ascendingTargetDepth); - node.targetLinks.sort(ascendingSourceDepth); - }); - nodes.forEach(function(node) { - var sy = 0, ty = 0; - node.sourceLinks.forEach(function(link) { - link.sy = sy; - sy += link.dy; - }); - node.targetLinks.forEach(function(link) { - link.ty = ty; - ty += link.dy; - }); - }); - - function ascendingSourceDepth(a, b) { - return (a.source.y - b.source.y) || (a.originalIndex - b.originalIndex); - } - - function ascendingTargetDepth(a, b) { - return (a.target.y - b.target.y) || (a.originalIndex - b.originalIndex); - } - } - - function center(node) { - return node.y + node.dy / 2; - } - - function value(link) { - return link.value; - } - - return sankey; -}; - -exports.sankey = sankey; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{"d3-array":106,"d3-collection":107,"d3-interpolate":111}],33:[function(require,module,exports){ +},{"matrix-camera-controller":432,"orbit-camera-controller":454,"turntable-camera-controller":518}],34:[function(require,module,exports){ 'use strict' var weakMap = typeof WeakMap === 'undefined' ? require('weak-map') : WeakMap @@ -1286,7 +1011,7 @@ function createABigTriangle(gl) { module.exports = createABigTriangle -},{"gl-buffer":148,"gl-vao":262,"weak-map":546}],34:[function(require,module,exports){ +},{"gl-buffer":141,"gl-vao":255,"weak-map":539}],35:[function(require,module,exports){ var padLeft = require('pad-left') module.exports = addLineNumbers @@ -1304,7 +1029,7 @@ function addLineNumbers (string, start, delim) { }).join('\n') } -},{"pad-left":462}],35:[function(require,module,exports){ +},{"pad-left":455}],36:[function(require,module,exports){ 'use strict' module.exports = affineHull @@ -1356,7 +1081,7 @@ function affineHull(points) { } return index } -},{"robust-orientation":496}],36:[function(require,module,exports){ +},{"robust-orientation":489}],37:[function(require,module,exports){ 'use strict' module.exports = alphaComplex @@ -1373,7 +1098,7 @@ function alphaComplex(alpha, points) { return circumradius(simplex) * alpha < 1 }) } -},{"circumradius":79,"delaunay-triangulate":115}],37:[function(require,module,exports){ +},{"circumradius":80,"delaunay-triangulate":108}],38:[function(require,module,exports){ module.exports = alphaShape var ac = require('alpha-complex') @@ -1382,7 +1107,7 @@ var bnd = require('simplicial-complex-boundary') function alphaShape(alpha, points) { return bnd(ac(alpha, points)) } -},{"alpha-complex":36,"simplicial-complex-boundary":504}],38:[function(require,module,exports){ +},{"alpha-complex":37,"simplicial-complex-boundary":497}],39:[function(require,module,exports){ 'use strict'; var arraytools = function () { @@ -1571,7 +1296,7 @@ var arraytools = function () { module.exports = arraytools(); -},{}],39:[function(require,module,exports){ +},{}],40:[function(require,module,exports){ (function (global){ 'use strict'; @@ -2065,12 +1790,12 @@ var objectKeys = Object.keys || function (obj) { }; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"util/":536}],40:[function(require,module,exports){ +},{"util/":529}],41:[function(require,module,exports){ module.exports = function _atob(str) { return atob(str) } -},{}],41:[function(require,module,exports){ +},{}],42:[function(require,module,exports){ 'use strict' module.exports = barycentric @@ -2118,7 +1843,7 @@ function barycentric(simplex, point) { } return y } -},{"robust-linear-solve":495}],42:[function(require,module,exports){ +},{"robust-linear-solve":488}],43:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2131,7 +1856,7 @@ function add(a, b) { a[1].mul(b[1])) } -},{"./lib/rationalize":52}],43:[function(require,module,exports){ +},{"./lib/rationalize":53}],44:[function(require,module,exports){ 'use strict' module.exports = cmp @@ -2140,7 +1865,7 @@ function cmp(a, b) { return a[0].mul(b[1]).cmp(b[0].mul(a[1])) } -},{}],44:[function(require,module,exports){ +},{}],45:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2151,7 +1876,7 @@ function div(a, b) { return rationalize(a[0].mul(b[1]), a[1].mul(b[0])) } -},{"./lib/rationalize":52}],45:[function(require,module,exports){ +},{"./lib/rationalize":53}],46:[function(require,module,exports){ 'use strict' var isRat = require('./is-rat') @@ -2213,7 +1938,7 @@ function makeRational(numer, denom) { return rationalize(a, b) } -},{"./div":44,"./is-rat":46,"./lib/is-bn":50,"./lib/num-to-bn":51,"./lib/rationalize":52,"./lib/str-to-bn":53}],46:[function(require,module,exports){ +},{"./div":45,"./is-rat":47,"./lib/is-bn":51,"./lib/num-to-bn":52,"./lib/rationalize":53,"./lib/str-to-bn":54}],47:[function(require,module,exports){ 'use strict' var isBN = require('./lib/is-bn') @@ -2224,7 +1949,7 @@ function isRat(x) { return Array.isArray(x) && x.length === 2 && isBN(x[0]) && isBN(x[1]) } -},{"./lib/is-bn":50}],47:[function(require,module,exports){ +},{"./lib/is-bn":51}],48:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2235,7 +1960,7 @@ function sign (x) { return x.cmp(new BN(0)) } -},{"bn.js":60}],48:[function(require,module,exports){ +},{"bn.js":61}],49:[function(require,module,exports){ 'use strict' var sign = require('./bn-sign') @@ -2260,7 +1985,7 @@ function bn2num(b) { return sign(b) * out } -},{"./bn-sign":47}],49:[function(require,module,exports){ +},{"./bn-sign":48}],50:[function(require,module,exports){ 'use strict' var db = require('double-bits') @@ -2281,7 +2006,7 @@ function ctzNumber(x) { return h + 32 } -},{"bit-twiddle":59,"double-bits":116}],50:[function(require,module,exports){ +},{"bit-twiddle":60,"double-bits":109}],51:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2294,7 +2019,7 @@ function isBN(x) { return x && typeof x === 'object' && Boolean(x.words) } -},{"bn.js":60}],51:[function(require,module,exports){ +},{"bn.js":61}],52:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2311,7 +2036,7 @@ function num2bn(x) { } } -},{"bn.js":60,"double-bits":116}],52:[function(require,module,exports){ +},{"bn.js":61,"double-bits":109}],53:[function(require,module,exports){ 'use strict' var num2bn = require('./num-to-bn') @@ -2339,7 +2064,7 @@ function rationalize(numer, denom) { return [ numer, denom ] } -},{"./bn-sign":47,"./num-to-bn":51}],53:[function(require,module,exports){ +},{"./bn-sign":48,"./num-to-bn":52}],54:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2350,7 +2075,7 @@ function str2BN(x) { return new BN(x) } -},{"bn.js":60}],54:[function(require,module,exports){ +},{"bn.js":61}],55:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2361,7 +2086,7 @@ function mul(a, b) { return rationalize(a[0].mul(b[0]), a[1].mul(b[1])) } -},{"./lib/rationalize":52}],55:[function(require,module,exports){ +},{"./lib/rationalize":53}],56:[function(require,module,exports){ 'use strict' var bnsign = require('./lib/bn-sign') @@ -2372,7 +2097,7 @@ function sign(x) { return bnsign(x[0]) * bnsign(x[1]) } -},{"./lib/bn-sign":47}],56:[function(require,module,exports){ +},{"./lib/bn-sign":48}],57:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2383,7 +2108,7 @@ function sub(a, b) { return rationalize(a[0].mul(b[1]).sub(a[1].mul(b[0])), a[1].mul(b[1])) } -},{"./lib/rationalize":52}],57:[function(require,module,exports){ +},{"./lib/rationalize":53}],58:[function(require,module,exports){ 'use strict' var bn2num = require('./lib/bn-to-num') @@ -2421,7 +2146,7 @@ function roundRat (f) { } } -},{"./lib/bn-to-num":48,"./lib/ctz":49}],58:[function(require,module,exports){ +},{"./lib/bn-to-num":49,"./lib/ctz":50}],59:[function(require,module,exports){ "use strict" function compileSearch(funcName, predicate, reversed, extraArgs, useNdarray, earlyOut) { @@ -2483,7 +2208,7 @@ module.exports = { eq: compileBoundsSearch("-", true, "EQ", true) } -},{}],59:[function(require,module,exports){ +},{}],60:[function(require,module,exports){ /** * Bit twiddling hacks for JavaScript. * @@ -2689,7 +2414,7 @@ exports.nextCombination = function(v) { } -},{}],60:[function(require,module,exports){ +},{}],61:[function(require,module,exports){ (function (module, exports) { 'use strict'; @@ -6118,7 +5843,7 @@ exports.nextCombination = function(v) { }; })(typeof module === 'undefined' || module, this); -},{}],61:[function(require,module,exports){ +},{}],62:[function(require,module,exports){ 'use strict' module.exports = boundary @@ -6154,7 +5879,7 @@ function boundary (cells) { return result } -},{}],62:[function(require,module,exports){ +},{}],63:[function(require,module,exports){ 'use strict' module.exports = boxIntersectWrapper @@ -6293,7 +6018,7 @@ function boxIntersectWrapper(arg0, arg1, arg2) { throw new Error('box-intersect: Invalid arguments') } } -},{"./lib/intersect":64,"./lib/sweep":68,"typedarray-pool":528}],63:[function(require,module,exports){ +},{"./lib/intersect":65,"./lib/sweep":69,"typedarray-pool":521}],64:[function(require,module,exports){ 'use strict' var DIMENSION = 'd' @@ -6438,7 +6163,7 @@ function bruteForcePlanner(full) { exports.partial = bruteForcePlanner(false) exports.full = bruteForcePlanner(true) -},{}],64:[function(require,module,exports){ +},{}],65:[function(require,module,exports){ 'use strict' module.exports = boxIntersectIter @@ -6933,7 +6658,7 @@ function boxIntersectIter( } } } -},{"./brute":63,"./median":65,"./partition":66,"./sweep":68,"bit-twiddle":59,"typedarray-pool":528}],65:[function(require,module,exports){ +},{"./brute":64,"./median":66,"./partition":67,"./sweep":69,"bit-twiddle":60,"typedarray-pool":521}],66:[function(require,module,exports){ 'use strict' module.exports = findMedian @@ -7076,7 +6801,7 @@ function findMedian(d, axis, start, end, boxes, ids) { start, mid, boxes, ids, boxes[elemSize*mid+axis]) } -},{"./partition":66}],66:[function(require,module,exports){ +},{"./partition":67}],67:[function(require,module,exports){ 'use strict' module.exports = genPartition @@ -7097,7 +6822,7 @@ function genPartition(predicate, args) { .replace('$', predicate)) return Function.apply(void 0, fargs) } -},{}],67:[function(require,module,exports){ +},{}],68:[function(require,module,exports){ 'use strict'; //This code is extracted from ndarray-sort @@ -7334,7 +7059,7 @@ function quickSort(left, right, data) { quickSort(less, great, data); } } -},{}],68:[function(require,module,exports){ +},{}],69:[function(require,module,exports){ 'use strict' module.exports = { @@ -7769,7 +7494,7 @@ red_loop: } } } -},{"./sort":67,"bit-twiddle":59,"typedarray-pool":528}],69:[function(require,module,exports){ +},{"./sort":68,"bit-twiddle":60,"typedarray-pool":521}],70:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -9477,7 +9202,7 @@ function numberIsNaN (obj) { return obj !== obj // eslint-disable-line no-self-compare } -},{"base64-js":70,"ieee754":279}],70:[function(require,module,exports){ +},{"base64-js":71,"ieee754":272}],71:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -9593,7 +9318,7 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],71:[function(require,module,exports){ +},{}],72:[function(require,module,exports){ 'use strict' var monotoneTriangulate = require('./lib/monotone') @@ -9677,7 +9402,7 @@ function cdt2d(points, edges, options) { } } -},{"./lib/delaunay":72,"./lib/filter":73,"./lib/monotone":74,"./lib/triangulation":75}],72:[function(require,module,exports){ +},{"./lib/delaunay":73,"./lib/filter":74,"./lib/monotone":75,"./lib/triangulation":76}],73:[function(require,module,exports){ 'use strict' var inCircle = require('robust-in-sphere')[4] @@ -9794,7 +9519,7 @@ function delaunayRefine(points, triangulation) { } } -},{"binary-search-bounds":76,"robust-in-sphere":494}],73:[function(require,module,exports){ +},{"binary-search-bounds":77,"robust-in-sphere":487}],74:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9976,7 +9701,7 @@ function classifyFaces(triangulation, target, infinity) { return result } -},{"binary-search-bounds":76}],74:[function(require,module,exports){ +},{"binary-search-bounds":77}],75:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -10165,7 +9890,7 @@ function monotoneTriangulate(points, edges) { return cells } -},{"binary-search-bounds":76,"robust-orientation":496}],75:[function(require,module,exports){ +},{"binary-search-bounds":77,"robust-orientation":489}],76:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -10271,7 +9996,7 @@ function createTriangulation(numVerts, edges) { return new Triangulation(stars, edges) } -},{"binary-search-bounds":76}],76:[function(require,module,exports){ +},{"binary-search-bounds":77}],77:[function(require,module,exports){ "use strict" function compileSearch(funcName, predicate, reversed, extraArgs, earlyOut) { @@ -10325,7 +10050,7 @@ module.exports = { eq: compileBoundsSearch("-", true, "EQ", true) } -},{}],77:[function(require,module,exports){ +},{}],78:[function(require,module,exports){ 'use strict' module.exports = orientation @@ -10344,7 +10069,7 @@ function orientation(s) { return p } -},{}],78:[function(require,module,exports){ +},{}],79:[function(require,module,exports){ "use strict" var dup = require("dup") @@ -10413,7 +10138,7 @@ function circumcenter(points) { circumcenter.barycenetric = barycentricCircumcenter module.exports = circumcenter -},{"dup":117,"robust-linear-solve":495}],79:[function(require,module,exports){ +},{"dup":110,"robust-linear-solve":488}],80:[function(require,module,exports){ module.exports = circumradius var circumcenter = require('circumcenter') @@ -10429,7 +10154,7 @@ function circumradius(points) { } return Math.sqrt(avgDist / points.length) } -},{"circumcenter":78}],80:[function(require,module,exports){ +},{"circumcenter":79}],81:[function(require,module,exports){ module.exports = clamp function clamp(value, min, max) { @@ -10438,7 +10163,7 @@ function clamp(value, min, max) { : (value < max ? max : value > min ? min : value) } -},{}],81:[function(require,module,exports){ +},{}],82:[function(require,module,exports){ 'use strict' module.exports = cleanPSLG @@ -10821,7 +10546,7 @@ function cleanPSLG (points, edges, colors) { return modified } -},{"./lib/rat-seg-intersect":82,"big-rat":45,"big-rat/cmp":43,"big-rat/to-float":57,"box-intersect":62,"nextafter":457,"rat-vec":483,"robust-segment-intersect":499,"union-find":529}],82:[function(require,module,exports){ +},{"./lib/rat-seg-intersect":83,"big-rat":46,"big-rat/cmp":44,"big-rat/to-float":58,"box-intersect":63,"nextafter":450,"rat-vec":476,"robust-segment-intersect":492,"union-find":522}],83:[function(require,module,exports){ 'use strict' module.exports = solveIntersection @@ -10865,7 +10590,7 @@ function solveIntersection (a, b, c, d) { return r } -},{"big-rat/div":44,"big-rat/mul":54,"big-rat/sign":55,"big-rat/sub":56,"rat-vec/add":482,"rat-vec/muls":484,"rat-vec/sub":485}],83:[function(require,module,exports){ +},{"big-rat/div":45,"big-rat/mul":55,"big-rat/sign":56,"big-rat/sub":57,"rat-vec/add":475,"rat-vec/muls":477,"rat-vec/sub":478}],84:[function(require,module,exports){ (function (Buffer){ var clone = (function() { 'use strict'; @@ -11029,7 +10754,7 @@ if (typeof module === 'object' && module.exports) { } }).call(this,require("buffer").Buffer) -},{"buffer":69}],84:[function(require,module,exports){ +},{"buffer":70}],85:[function(require,module,exports){ /** @module color-number */ 'use strict' @@ -11063,7 +10788,7 @@ function toNumber (rgba, normalized) { return n } -},{"clamp":80}],85:[function(require,module,exports){ +},{"clamp":81}],86:[function(require,module,exports){ module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], @@ -11214,7 +10939,7 @@ module.exports = { "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; -},{}],86:[function(require,module,exports){ +},{}],87:[function(require,module,exports){ /** * @module color-parse */ @@ -11391,7 +11116,7 @@ function parse (cstr) { }; } -},{"color-name":85,"is-plain-obj":286}],87:[function(require,module,exports){ +},{"color-name":86,"is-plain-obj":279}],88:[function(require,module,exports){ /** @module color-rgba */ 'use strict' @@ -11430,7 +11155,7 @@ module.exports = function rgba (color, normalize) { } -},{"clamp":80,"color-parse":86,"color-space/hsl":88}],88:[function(require,module,exports){ +},{"clamp":81,"color-parse":87,"color-space/hsl":89}],89:[function(require,module,exports){ /** * @module color-space/hsl */ @@ -11539,7 +11264,7 @@ rgb.hsl = function(rgb) { return [h, s * 100, l * 100]; }; -},{"./rgb":89}],89:[function(require,module,exports){ +},{"./rgb":90}],90:[function(require,module,exports){ /** * RGB space. * @@ -11555,7 +11280,7 @@ module.exports = { alias: ['RGB'] }; -},{}],90:[function(require,module,exports){ +},{}],91:[function(require,module,exports){ module.exports={ "jet":[{"index":0,"rgb":[0,0,131]},{"index":0.125,"rgb":[0,60,170]},{"index":0.375,"rgb":[5,255,255]},{"index":0.625,"rgb":[255,255,0]},{"index":0.875,"rgb":[250,0,0]},{"index":1,"rgb":[128,0,0]}], @@ -11648,7 +11373,7 @@ module.exports={ "cubehelix": [{"index":0,"rgb":[0,0,0]},{"index":0.07,"rgb":[22,5,59]},{"index":0.13,"rgb":[60,4,105]},{"index":0.2,"rgb":[109,1,135]},{"index":0.27,"rgb":[161,0,147]},{"index":0.33,"rgb":[210,2,142]},{"index":0.4,"rgb":[251,11,123]},{"index":0.47,"rgb":[255,29,97]},{"index":0.53,"rgb":[255,54,69]},{"index":0.6,"rgb":[255,85,46]},{"index":0.67,"rgb":[255,120,34]},{"index":0.73,"rgb":[255,157,37]},{"index":0.8,"rgb":[241,191,57]},{"index":0.87,"rgb":[224,220,93]},{"index":0.93,"rgb":[218,241,142]},{"index":1,"rgb":[227,253,198]}] }; -},{}],91:[function(require,module,exports){ +},{}],92:[function(require,module,exports){ /* * Ben Postlethwaite * January 2013 @@ -11785,7 +11510,7 @@ function rgbaStr (rgba) { return 'rgba(' + rgba.join(',') + ')'; } -},{"./colorScales":90,"arraytools":38,"clone":83}],92:[function(require,module,exports){ +},{"./colorScales":91,"arraytools":39,"clone":84}],93:[function(require,module,exports){ "use strict" module.exports = compareAngle @@ -11871,7 +11596,7 @@ function compareAngle(a, b, c, d) { } } } -},{"robust-orientation":496,"robust-product":497,"robust-sum":501,"signum":503,"two-sum":527}],93:[function(require,module,exports){ +},{"robust-orientation":489,"robust-product":490,"robust-sum":494,"signum":496,"two-sum":520}],94:[function(require,module,exports){ module.exports = compareCells var min = Math.min @@ -11927,7 +11652,7 @@ function compareCells(a, b) { } } -},{}],94:[function(require,module,exports){ +},{}],95:[function(require,module,exports){ 'use strict' var compareCells = require('compare-cell') @@ -11939,7 +11664,7 @@ function compareOrientedCells(a, b) { return compareCells(a, b) || parity(a) - parity(b) } -},{"cell-orientation":77,"compare-cell":93}],95:[function(require,module,exports){ +},{"cell-orientation":78,"compare-cell":94}],96:[function(require,module,exports){ "use strict" var convexHull1d = require('./lib/ch1d') @@ -11965,7 +11690,7 @@ function convexHull(points) { } return convexHullnd(points, d) } -},{"./lib/ch1d":96,"./lib/ch2d":97,"./lib/chnd":98}],96:[function(require,module,exports){ +},{"./lib/ch1d":97,"./lib/ch2d":98,"./lib/chnd":99}],97:[function(require,module,exports){ "use strict" module.exports = convexHull1d @@ -11989,7 +11714,7 @@ function convexHull1d(points) { return [[lo]] } } -},{}],97:[function(require,module,exports){ +},{}],98:[function(require,module,exports){ 'use strict' module.exports = convexHull2D @@ -12012,7 +11737,7 @@ function convexHull2D(points) { return edges } -},{"monotone-convex-hull-2d":440}],98:[function(require,module,exports){ +},{"monotone-convex-hull-2d":433}],99:[function(require,module,exports){ 'use strict' module.exports = convexHullnD @@ -12073,7 +11798,7 @@ function convexHullnD(points, d) { return invPermute(nhull, ah) } } -},{"affine-hull":35,"incremental-convex-hull":280}],99:[function(require,module,exports){ +},{"affine-hull":36,"incremental-convex-hull":273}],100:[function(require,module,exports){ module.exports = { AFG: 'afghan', ALA: '\\b\\wland', @@ -12332,7 +12057,7 @@ module.exports = { ZWE: 'zimbabwe|^(?!.*northern).*rhodesia' } -},{}],100:[function(require,module,exports){ +},{}],101:[function(require,module,exports){ // (c) Dean McNamee , 2012. // // https://github.com/deanm/css-color-parser-js @@ -12535,7 +12260,7 @@ function parseCSSColor(css_str) { try { exports.parseCSSColor = parseCSSColor } catch(e) { } -},{}],101:[function(require,module,exports){ +},{}],102:[function(require,module,exports){ "use strict" function dcubicHermite(p0, v0, p1, v1, t, f) { @@ -12575,7 +12300,7 @@ function cubicHermite(p0, v0, p1, v1, t, f) { module.exports = cubicHermite module.exports.derivative = dcubicHermite -},{}],102:[function(require,module,exports){ +},{}],103:[function(require,module,exports){ "use strict" var createThunk = require("./lib/thunk.js") @@ -12686,7 +12411,7 @@ function compileCwise(user_args) { module.exports = compileCwise -},{"./lib/thunk.js":104}],103:[function(require,module,exports){ +},{"./lib/thunk.js":105}],104:[function(require,module,exports){ "use strict" var uniq = require("uniq") @@ -13042,7 +12767,7 @@ function generateCWiseOp(proc, typesig) { } module.exports = generateCWiseOp -},{"uniq":530}],104:[function(require,module,exports){ +},{"uniq":523}],105:[function(require,module,exports){ "use strict" // The function below is called when constructing a cwise function object, and does the following: @@ -13130,3438 +12855,377 @@ function createThunk(proc) { module.exports = createThunk -},{"./compile.js":103}],105:[function(require,module,exports){ +},{"./compile.js":104}],106:[function(require,module,exports){ module.exports = require("cwise-compiler") -},{"cwise-compiler":102}],106:[function(require,module,exports){ -// https://d3js.org/d3-array/ Version 1.1.1. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); -}(this, (function (exports) { 'use strict'; - -var ascending = function(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; -}; - -var bisector = function(compare) { - if (compare.length === 1) compare = ascendingComparator(compare); - return { - left: function(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (compare(a[mid], x) < 0) lo = mid + 1; - else hi = mid; - } - return lo; - }, - right: function(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (compare(a[mid], x) > 0) hi = mid; - else lo = mid + 1; - } - return lo; - } +},{"cwise-compiler":103}],107:[function(require,module,exports){ +!function() { + var d3 = { + version: "3.5.17" }; -}; - -function ascendingComparator(f) { - return function(d, x) { - return ascending(f(d), x); + var d3_arraySlice = [].slice, d3_array = function(list) { + return d3_arraySlice.call(list); }; -} - -var ascendingBisect = bisector(ascending); -var bisectRight = ascendingBisect.right; -var bisectLeft = ascendingBisect.left; - -var pairs = function(array, f) { - if (f == null) f = pair; - var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n); - while (i < n) pairs[i] = f(p, p = array[++i]); - return pairs; -}; - -function pair(a, b) { - return [a, b]; -} - -var cross = function(a, b, f) { - var na = a.length, nb = b.length, c = new Array(na * nb), ia, ib, ic, va; - if (f == null) f = pair; - for (ia = ic = 0; ia < na; ++ia) for (va = a[ia], ib = 0; ib < nb; ++ib, ++ic) c[ic] = f(va, b[ib]); - return c; -}; - -var descending = function(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; -}; - -var number = function(x) { - return x === null ? NaN : +x; -}; - -var variance = function(array, f) { - var n = array.length, - m = 0, - a, - d, - s = 0, - i = -1, - j = 0; - - if (f == null) { - while (++i < n) { - if (!isNaN(a = number(array[i]))) { - d = a - m; - m += d / ++j; - s += d * (a - m); - } - } + var d3_document = this.document; + function d3_documentElement(node) { + return node && (node.ownerDocument || node.document || node).documentElement; } - - else { - while (++i < n) { - if (!isNaN(a = number(f(array[i], i, array)))) { - d = a - m; - m += d / ++j; - s += d * (a - m); - } - } + function d3_window(node) { + return node && (node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView); } - - if (j > 1) return s / (j - 1); -}; - -var deviation = function(array, f) { - var v = variance(array, f); - return v ? Math.sqrt(v) : v; -}; - -var extent = function(array, f) { - var i = -1, - n = array.length, - a, - b, - c; - - if (f == null) { - while (++i < n) if ((b = array[i]) != null && b >= b) { a = c = b; break; } - while (++i < n) if ((b = array[i]) != null) { - if (a > b) a = b; - if (c < b) c = b; + if (d3_document) { + try { + d3_array(d3_document.documentElement.childNodes)[0].nodeType; + } catch (e) { + d3_array = function(list) { + var i = list.length, array = new Array(i); + while (i--) array[i] = list[i]; + return array; + }; } } - - else { - while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = c = b; break; } - while (++i < n) if ((b = f(array[i], i, array)) != null) { - if (a > b) a = b; - if (c < b) c = b; + if (!Date.now) Date.now = function() { + return +new Date(); + }; + if (d3_document) { + try { + d3_document.createElement("DIV").style.setProperty("opacity", 0, ""); + } catch (error) { + var d3_element_prototype = this.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = this.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty; + d3_element_prototype.setAttribute = function(name, value) { + d3_element_setAttribute.call(this, name, value + ""); + }; + d3_element_prototype.setAttributeNS = function(space, local, value) { + d3_element_setAttributeNS.call(this, space, local, value + ""); + }; + d3_style_prototype.setProperty = function(name, value, priority) { + d3_style_setProperty.call(this, name, value + "", priority); + }; } } - - return [a, c]; -}; - -var array = Array.prototype; - -var slice = array.slice; -var map = array.map; - -var constant = function(x) { - return function() { - return x; - }; -}; - -var identity = function(x) { - return x; -}; - -var range = function(start, stop, step) { - start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; - - var i = -1, - n = Math.max(0, Math.ceil((stop - start) / step)) | 0, - range = new Array(n); - - while (++i < n) { - range[i] = start + i * step; + d3.ascending = d3_ascending; + function d3_ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; } - - return range; -}; - -var e10 = Math.sqrt(50); -var e5 = Math.sqrt(10); -var e2 = Math.sqrt(2); - -var ticks = function(start, stop, count) { - var step = tickStep(start, stop, count); - return range( - Math.ceil(start / step) * step, - Math.floor(stop / step) * step + step / 2, // inclusive - step - ); -}; - -function tickStep(start, stop, count) { - var step0 = Math.abs(stop - start) / Math.max(0, count), - step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), - error = step0 / step1; - if (error >= e10) step1 *= 10; - else if (error >= e5) step1 *= 5; - else if (error >= e2) step1 *= 2; - return stop < start ? -step1 : step1; -} - -var sturges = function(values) { - return Math.ceil(Math.log(values.length) / Math.LN2) + 1; -}; - -var histogram = function() { - var value = identity, - domain = extent, - threshold = sturges; - - function histogram(data) { - var i, - n = data.length, - x, - values = new Array(n); - - for (i = 0; i < n; ++i) { - values[i] = value(data[i], i, data); - } - - var xz = domain(values), - x0 = xz[0], - x1 = xz[1], - tz = threshold(values, x0, x1); - - // Convert number of thresholds into uniform thresholds. - if (!Array.isArray(tz)) tz = ticks(x0, x1, tz); - - // Remove any thresholds outside the domain. - var m = tz.length; - while (tz[0] <= x0) tz.shift(), --m; - while (tz[m - 1] >= x1) tz.pop(), --m; - - var bins = new Array(m + 1), - bin; - - // Initialize bins. - for (i = 0; i <= m; ++i) { - bin = bins[i] = []; - bin.x0 = i > 0 ? tz[i - 1] : x0; - bin.x1 = i < m ? tz[i] : x1; - } - - // Assign data to bins by value, ignoring any outside the domain. - for (i = 0; i < n; ++i) { - x = values[i]; - if (x0 <= x && x <= x1) { - bins[bisectRight(tz, x, 0, m)].push(data[i]); + d3.descending = function(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; + }; + d3.min = function(array, f) { + var i = -1, n = array.length, a, b; + if (arguments.length === 1) { + while (++i < n) if ((b = array[i]) != null && b >= b) { + a = b; + break; + } + while (++i < n) if ((b = array[i]) != null && a > b) a = b; + } else { + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { + a = b; + break; } + while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b; } - - return bins; - } - - histogram.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : constant(_), histogram) : value; - }; - - histogram.domain = function(_) { - return arguments.length ? (domain = typeof _ === "function" ? _ : constant([_[0], _[1]]), histogram) : domain; - }; - - histogram.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold; + return a; }; - - return histogram; -}; - -var quantile = function(array, p, f) { - if (f == null) f = number; - if (!(n = array.length)) return; - if ((p = +p) <= 0 || n < 2) return +f(array[0], 0, array); - if (p >= 1) return +f(array[n - 1], n - 1, array); - var n, - h = (n - 1) * p, - i = Math.floor(h), - a = +f(array[i], i, array), - b = +f(array[i + 1], i + 1, array); - return a + (b - a) * (h - i); -}; - -var freedmanDiaconis = function(values, min, max) { - values = map.call(values, number).sort(ascending); - return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(values.length, -1 / 3))); -}; - -var scott = function(values, min, max) { - return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(values.length, -1 / 3))); -}; - -var max = function(array, f) { - var i = -1, - n = array.length, - a, - b; - - if (f == null) { - while (++i < n) if ((b = array[i]) != null && b >= b) { a = b; break; } - while (++i < n) if ((b = array[i]) != null && b > a) a = b; - } - - else { - while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = b; break; } - while (++i < n) if ((b = f(array[i], i, array)) != null && b > a) a = b; - } - - return a; -}; - -var mean = function(array, f) { - var s = 0, - n = array.length, - a, - i = -1, - j = n; - - if (f == null) { - while (++i < n) if (!isNaN(a = number(array[i]))) s += a; else --j; - } - - else { - while (++i < n) if (!isNaN(a = number(f(array[i], i, array)))) s += a; else --j; - } - - if (j) return s / j; -}; - -var median = function(array, f) { - var numbers = [], - n = array.length, - a, - i = -1; - - if (f == null) { - while (++i < n) if (!isNaN(a = number(array[i]))) numbers.push(a); - } - - else { - while (++i < n) if (!isNaN(a = number(f(array[i], i, array)))) numbers.push(a); - } - - return quantile(numbers.sort(ascending), 0.5); -}; - -var merge = function(arrays) { - var n = arrays.length, - m, - i = -1, - j = 0, - merged, - array; - - while (++i < n) j += arrays[i].length; - merged = new Array(j); - - while (--n >= 0) { - array = arrays[n]; - m = array.length; - while (--m >= 0) { - merged[--j] = array[m]; - } - } - - return merged; -}; - -var min = function(array, f) { - var i = -1, - n = array.length, - a, - b; - - if (f == null) { - while (++i < n) if ((b = array[i]) != null && b >= b) { a = b; break; } - while (++i < n) if ((b = array[i]) != null && a > b) a = b; - } - - else { - while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = b; break; } - while (++i < n) if ((b = f(array[i], i, array)) != null && a > b) a = b; - } - - return a; -}; - -var permute = function(array, indexes) { - var i = indexes.length, permutes = new Array(i); - while (i--) permutes[i] = array[indexes[i]]; - return permutes; -}; - -var scan = function(array, compare) { - if (!(n = array.length)) return; - var i = 0, - n, - j = 0, - xi, - xj = array[j]; - - if (!compare) compare = ascending; - - while (++i < n) if (compare(xi = array[i], xj) < 0 || compare(xj, xj) !== 0) xj = xi, j = i; - - if (compare(xj, xj) === 0) return j; -}; - -var shuffle = function(array, i0, i1) { - var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0), - t, - i; - - while (m) { - i = Math.random() * m-- | 0; - t = array[m + i0]; - array[m + i0] = array[i + i0]; - array[i + i0] = t; - } - - return array; -}; - -var sum = function(array, f) { - var s = 0, - n = array.length, - a, - i = -1; - - if (f == null) { - while (++i < n) if (a = +array[i]) s += a; // Note: zero and null are equivalent. - } - - else { - while (++i < n) if (a = +f(array[i], i, array)) s += a; - } - - return s; -}; - -var transpose = function(matrix) { - if (!(n = matrix.length)) return []; - for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) { - for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { - row[j] = matrix[j][i]; - } - } - return transpose; -}; - -function length(d) { - return d.length; -} - -var zip = function() { - return transpose(arguments); -}; - -exports.bisect = bisectRight; -exports.bisectRight = bisectRight; -exports.bisectLeft = bisectLeft; -exports.ascending = ascending; -exports.bisector = bisector; -exports.cross = cross; -exports.descending = descending; -exports.deviation = deviation; -exports.extent = extent; -exports.histogram = histogram; -exports.thresholdFreedmanDiaconis = freedmanDiaconis; -exports.thresholdScott = scott; -exports.thresholdSturges = sturges; -exports.max = max; -exports.mean = mean; -exports.median = median; -exports.merge = merge; -exports.min = min; -exports.pairs = pairs; -exports.permute = permute; -exports.quantile = quantile; -exports.range = range; -exports.scan = scan; -exports.shuffle = shuffle; -exports.sum = sum; -exports.ticks = ticks; -exports.tickStep = tickStep; -exports.transpose = transpose; -exports.variance = variance; -exports.zip = zip; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{}],107:[function(require,module,exports){ -// https://d3js.org/d3-collection/ Version 1.0.3. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); -}(this, (function (exports) { 'use strict'; - -var prefix = "$"; - -function Map() {} - -Map.prototype = map.prototype = { - constructor: Map, - has: function(key) { - return (prefix + key) in this; - }, - get: function(key) { - return this[prefix + key]; - }, - set: function(key, value) { - this[prefix + key] = value; - return this; - }, - remove: function(key) { - var property = prefix + key; - return property in this && delete this[property]; - }, - clear: function() { - for (var property in this) if (property[0] === prefix) delete this[property]; - }, - keys: function() { - var keys = []; - for (var property in this) if (property[0] === prefix) keys.push(property.slice(1)); - return keys; - }, - values: function() { - var values = []; - for (var property in this) if (property[0] === prefix) values.push(this[property]); - return values; - }, - entries: function() { - var entries = []; - for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]}); - return entries; - }, - size: function() { - var size = 0; - for (var property in this) if (property[0] === prefix) ++size; - return size; - }, - empty: function() { - for (var property in this) if (property[0] === prefix) return false; - return true; - }, - each: function(f) { - for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this); - } -}; - -function map(object, f) { - var map = new Map; - - // Copy constructor. - if (object instanceof Map) object.each(function(value, key) { map.set(key, value); }); - - // Index array by numeric index or specified key function. - else if (Array.isArray(object)) { - var i = -1, - n = object.length, - o; - - if (f == null) while (++i < n) map.set(i, object[i]); - else while (++i < n) map.set(f(o = object[i], i, object), o); - } - - // Convert object to map. - else if (object) for (var key in object) map.set(key, object[key]); - - return map; -} - -var nest = function() { - var keys = [], - sortKeys = [], - sortValues, - rollup, - nest; - - function apply(array, depth, createResult, setResult) { - if (depth >= keys.length) return rollup != null - ? rollup(array) : (sortValues != null - ? array.sort(sortValues) - : array); - - var i = -1, - n = array.length, - key = keys[depth++], - keyValue, - value, - valuesByKey = map(), - values, - result = createResult(); - - while (++i < n) { - if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) { - values.push(value); - } else { - valuesByKey.set(keyValue, [value]); + d3.max = function(array, f) { + var i = -1, n = array.length, a, b; + if (arguments.length === 1) { + while (++i < n) if ((b = array[i]) != null && b >= b) { + a = b; + break; + } + while (++i < n) if ((b = array[i]) != null && b > a) a = b; + } else { + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { + a = b; + break; } + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b; } - - valuesByKey.each(function(values, key) { - setResult(result, key, apply(values, depth, createResult, setResult)); - }); - - return result; - } - - function entries(map$$1, depth) { - if (++depth > keys.length) return map$$1; - var array, sortKey = sortKeys[depth - 1]; - if (rollup != null && depth >= keys.length) array = map$$1.entries(); - else array = [], map$$1.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); }); - return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array; - } - - return nest = { - object: function(array) { return apply(array, 0, createObject, setObject); }, - map: function(array) { return apply(array, 0, createMap, setMap); }, - entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); }, - key: function(d) { keys.push(d); return nest; }, - sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; }, - sortValues: function(order) { sortValues = order; return nest; }, - rollup: function(f) { rollup = f; return nest; } + return a; }; -}; - -function createObject() { - return {}; -} - -function setObject(object, key, value) { - object[key] = value; -} - -function createMap() { - return map(); -} - -function setMap(map$$1, key, value) { - map$$1.set(key, value); -} - -function Set() {} - -var proto = map.prototype; - -Set.prototype = set.prototype = { - constructor: Set, - has: proto.has, - add: function(value) { - value += ""; - this[prefix + value] = value; - return this; - }, - remove: proto.remove, - clear: proto.clear, - values: proto.keys, - size: proto.size, - empty: proto.empty, - each: proto.each -}; - -function set(object, f) { - var set = new Set; - - // Copy constructor. - if (object instanceof Set) object.each(function(value) { set.add(value); }); - - // Otherwise, assume it’s an array. - else if (object) { - var i = -1, n = object.length; - if (f == null) while (++i < n) set.add(object[i]); - else while (++i < n) set.add(f(object[i], i, object)); - } - - return set; -} - -var keys = function(map) { - var keys = []; - for (var key in map) keys.push(key); - return keys; -}; - -var values = function(map) { - var values = []; - for (var key in map) values.push(map[key]); - return values; -}; - -var entries = function(map) { - var entries = []; - for (var key in map) entries.push({key: key, value: map[key]}); - return entries; -}; - -exports.nest = nest; -exports.set = set; -exports.map = map; -exports.keys = keys; -exports.values = values; -exports.entries = entries; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{}],108:[function(require,module,exports){ -// https://d3js.org/d3-color/ Version 1.0.3. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); -}(this, (function (exports) { 'use strict'; - -var define = function(constructor, factory, prototype) { - constructor.prototype = factory.prototype = prototype; - prototype.constructor = constructor; -}; - -function extend(parent, definition) { - var prototype = Object.create(parent.prototype); - for (var key in definition) prototype[key] = definition[key]; - return prototype; -} - -function Color() {} - -var darker = 0.7; -var brighter = 1 / darker; - -var reI = "\\s*([+-]?\\d+)\\s*"; -var reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*"; -var reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*"; -var reHex3 = /^#([0-9a-f]{3})$/; -var reHex6 = /^#([0-9a-f]{6})$/; -var reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"); -var reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"); -var reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"); -var reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"); -var reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"); -var reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); - -var named = { - aliceblue: 0xf0f8ff, - antiquewhite: 0xfaebd7, - aqua: 0x00ffff, - aquamarine: 0x7fffd4, - azure: 0xf0ffff, - beige: 0xf5f5dc, - bisque: 0xffe4c4, - black: 0x000000, - blanchedalmond: 0xffebcd, - blue: 0x0000ff, - blueviolet: 0x8a2be2, - brown: 0xa52a2a, - burlywood: 0xdeb887, - cadetblue: 0x5f9ea0, - chartreuse: 0x7fff00, - chocolate: 0xd2691e, - coral: 0xff7f50, - cornflowerblue: 0x6495ed, - cornsilk: 0xfff8dc, - crimson: 0xdc143c, - cyan: 0x00ffff, - darkblue: 0x00008b, - darkcyan: 0x008b8b, - darkgoldenrod: 0xb8860b, - darkgray: 0xa9a9a9, - darkgreen: 0x006400, - darkgrey: 0xa9a9a9, - darkkhaki: 0xbdb76b, - darkmagenta: 0x8b008b, - darkolivegreen: 0x556b2f, - darkorange: 0xff8c00, - darkorchid: 0x9932cc, - darkred: 0x8b0000, - darksalmon: 0xe9967a, - darkseagreen: 0x8fbc8f, - darkslateblue: 0x483d8b, - darkslategray: 0x2f4f4f, - darkslategrey: 0x2f4f4f, - darkturquoise: 0x00ced1, - darkviolet: 0x9400d3, - deeppink: 0xff1493, - deepskyblue: 0x00bfff, - dimgray: 0x696969, - dimgrey: 0x696969, - dodgerblue: 0x1e90ff, - firebrick: 0xb22222, - floralwhite: 0xfffaf0, - forestgreen: 0x228b22, - fuchsia: 0xff00ff, - gainsboro: 0xdcdcdc, - ghostwhite: 0xf8f8ff, - gold: 0xffd700, - goldenrod: 0xdaa520, - gray: 0x808080, - green: 0x008000, - greenyellow: 0xadff2f, - grey: 0x808080, - honeydew: 0xf0fff0, - hotpink: 0xff69b4, - indianred: 0xcd5c5c, - indigo: 0x4b0082, - ivory: 0xfffff0, - khaki: 0xf0e68c, - lavender: 0xe6e6fa, - lavenderblush: 0xfff0f5, - lawngreen: 0x7cfc00, - lemonchiffon: 0xfffacd, - lightblue: 0xadd8e6, - lightcoral: 0xf08080, - lightcyan: 0xe0ffff, - lightgoldenrodyellow: 0xfafad2, - lightgray: 0xd3d3d3, - lightgreen: 0x90ee90, - lightgrey: 0xd3d3d3, - lightpink: 0xffb6c1, - lightsalmon: 0xffa07a, - lightseagreen: 0x20b2aa, - lightskyblue: 0x87cefa, - lightslategray: 0x778899, - lightslategrey: 0x778899, - lightsteelblue: 0xb0c4de, - lightyellow: 0xffffe0, - lime: 0x00ff00, - limegreen: 0x32cd32, - linen: 0xfaf0e6, - magenta: 0xff00ff, - maroon: 0x800000, - mediumaquamarine: 0x66cdaa, - mediumblue: 0x0000cd, - mediumorchid: 0xba55d3, - mediumpurple: 0x9370db, - mediumseagreen: 0x3cb371, - mediumslateblue: 0x7b68ee, - mediumspringgreen: 0x00fa9a, - mediumturquoise: 0x48d1cc, - mediumvioletred: 0xc71585, - midnightblue: 0x191970, - mintcream: 0xf5fffa, - mistyrose: 0xffe4e1, - moccasin: 0xffe4b5, - navajowhite: 0xffdead, - navy: 0x000080, - oldlace: 0xfdf5e6, - olive: 0x808000, - olivedrab: 0x6b8e23, - orange: 0xffa500, - orangered: 0xff4500, - orchid: 0xda70d6, - palegoldenrod: 0xeee8aa, - palegreen: 0x98fb98, - paleturquoise: 0xafeeee, - palevioletred: 0xdb7093, - papayawhip: 0xffefd5, - peachpuff: 0xffdab9, - peru: 0xcd853f, - pink: 0xffc0cb, - plum: 0xdda0dd, - powderblue: 0xb0e0e6, - purple: 0x800080, - rebeccapurple: 0x663399, - red: 0xff0000, - rosybrown: 0xbc8f8f, - royalblue: 0x4169e1, - saddlebrown: 0x8b4513, - salmon: 0xfa8072, - sandybrown: 0xf4a460, - seagreen: 0x2e8b57, - seashell: 0xfff5ee, - sienna: 0xa0522d, - silver: 0xc0c0c0, - skyblue: 0x87ceeb, - slateblue: 0x6a5acd, - slategray: 0x708090, - slategrey: 0x708090, - snow: 0xfffafa, - springgreen: 0x00ff7f, - steelblue: 0x4682b4, - tan: 0xd2b48c, - teal: 0x008080, - thistle: 0xd8bfd8, - tomato: 0xff6347, - turquoise: 0x40e0d0, - violet: 0xee82ee, - wheat: 0xf5deb3, - white: 0xffffff, - whitesmoke: 0xf5f5f5, - yellow: 0xffff00, - yellowgreen: 0x9acd32 -}; - -define(Color, color, { - displayable: function() { - return this.rgb().displayable(); - }, - toString: function() { - return this.rgb() + ""; - } -}); - -function color(format) { - var m; - format = (format + "").trim().toLowerCase(); - return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00 - : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000 - : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) - : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) - : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) - : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) - : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) - : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) - : named.hasOwnProperty(format) ? rgbn(named[format]) - : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) - : null; -} - -function rgbn(n) { - return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); -} - -function rgba(r, g, b, a) { - if (a <= 0) r = g = b = NaN; - return new Rgb(r, g, b, a); -} - -function rgbConvert(o) { - if (!(o instanceof Color)) o = color(o); - if (!o) return new Rgb; - o = o.rgb(); - return new Rgb(o.r, o.g, o.b, o.opacity); -} - -function rgb(r, g, b, opacity) { - return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); -} - -function Rgb(r, g, b, opacity) { - this.r = +r; - this.g = +g; - this.b = +b; - this.opacity = +opacity; -} - -define(Rgb, rgb, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - rgb: function() { - return this; - }, - displayable: function() { - return (0 <= this.r && this.r <= 255) - && (0 <= this.g && this.g <= 255) - && (0 <= this.b && this.b <= 255) - && (0 <= this.opacity && this.opacity <= 1); - }, - toString: function() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "rgb(" : "rgba(") - + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.b) || 0)) - + (a === 1 ? ")" : ", " + a + ")"); - } -})); - -function hsla(h, s, l, a) { - if (a <= 0) h = s = l = NaN; - else if (l <= 0 || l >= 1) h = s = NaN; - else if (s <= 0) h = NaN; - return new Hsl(h, s, l, a); -} - -function hslConvert(o) { - if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Color)) o = color(o); - if (!o) return new Hsl; - if (o instanceof Hsl) return o; - o = o.rgb(); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - min = Math.min(r, g, b), - max = Math.max(r, g, b), - h = NaN, - s = max - min, - l = (max + min) / 2; - if (s) { - if (r === max) h = (g - b) / s + (g < b) * 6; - else if (g === max) h = (b - r) / s + 2; - else h = (r - g) / s + 4; - s /= l < 0.5 ? max + min : 2 - max - min; - h *= 60; - } else { - s = l > 0 && l < 1 ? 0 : h; - } - return new Hsl(h, s, l, o.opacity); -} - -function hsl(h, s, l, opacity) { - return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); -} - -function Hsl(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Hsl, hsl, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = this.h % 360 + (this.h < 0) * 360, - s = isNaN(h) || isNaN(this.s) ? 0 : this.s, - l = this.l, - m2 = l + (l < 0.5 ? l : 1 - l) * s, - m1 = 2 * l - m2; - return new Rgb( - hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), - hsl2rgb(h, m1, m2), - hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), - this.opacity - ); - }, - displayable: function() { - return (0 <= this.s && this.s <= 1 || isNaN(this.s)) - && (0 <= this.l && this.l <= 1) - && (0 <= this.opacity && this.opacity <= 1); - } -})); - -/* From FvD 13.37, CSS Color Module Level 3 */ -function hsl2rgb(h, m1, m2) { - return (h < 60 ? m1 + (m2 - m1) * h / 60 - : h < 180 ? m2 - : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 - : m1) * 255; -} - -var deg2rad = Math.PI / 180; -var rad2deg = 180 / Math.PI; - -var Kn = 18; -var Xn = 0.950470; -var Yn = 1; -var Zn = 1.088830; -var t0 = 4 / 29; -var t1 = 6 / 29; -var t2 = 3 * t1 * t1; -var t3 = t1 * t1 * t1; - -function labConvert(o) { - if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); - if (o instanceof Hcl) { - var h = o.h * deg2rad; - return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); - } - if (!(o instanceof Rgb)) o = rgbConvert(o); - var b = rgb2xyz(o.r), - a = rgb2xyz(o.g), - l = rgb2xyz(o.b), - x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn), - y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn), - z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn); - return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); -} - -function lab(l, a, b, opacity) { - return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); -} - -function Lab(l, a, b, opacity) { - this.l = +l; - this.a = +a; - this.b = +b; - this.opacity = +opacity; -} - -define(Lab, lab, extend(Color, { - brighter: function(k) { - return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - darker: function(k) { - return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - rgb: function() { - var y = (this.l + 16) / 116, - x = isNaN(this.a) ? y : y + this.a / 500, - z = isNaN(this.b) ? y : y - this.b / 200; - y = Yn * lab2xyz(y); - x = Xn * lab2xyz(x); - z = Zn * lab2xyz(z); - return new Rgb( - xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB - xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z), - xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z), - this.opacity - ); - } -})); - -function xyz2lab(t) { - return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; -} - -function lab2xyz(t) { - return t > t1 ? t * t * t : t2 * (t - t0); -} - -function xyz2rgb(x) { - return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); -} - -function rgb2xyz(x) { - return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); -} - -function hclConvert(o) { - if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); - if (!(o instanceof Lab)) o = labConvert(o); - var h = Math.atan2(o.b, o.a) * rad2deg; - return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); -} - -function hcl(h, c, l, opacity) { - return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); -} - -function Hcl(h, c, l, opacity) { - this.h = +h; - this.c = +c; - this.l = +l; - this.opacity = +opacity; -} - -define(Hcl, hcl, extend(Color, { - brighter: function(k) { - return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k), this.opacity); - }, - darker: function(k) { - return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k), this.opacity); - }, - rgb: function() { - return labConvert(this).rgb(); - } -})); - -var A = -0.14861; -var B = +1.78277; -var C = -0.29227; -var D = -0.90649; -var E = +1.97294; -var ED = E * D; -var EB = E * B; -var BC_DA = B * C - D * A; - -function cubehelixConvert(o) { - if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Rgb)) o = rgbConvert(o); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), - bl = b - l, - k = (E * (g - l) - C * bl) / D, - s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 - h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN; - return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); -} - -function cubehelix(h, s, l, opacity) { - return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); -} - -function Cubehelix(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Cubehelix, cubehelix, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad, - l = +this.l, - a = isNaN(this.s) ? 0 : this.s * l * (1 - l), - cosh = Math.cos(h), - sinh = Math.sin(h); - return new Rgb( - 255 * (l + a * (A * cosh + B * sinh)), - 255 * (l + a * (C * cosh + D * sinh)), - 255 * (l + a * (E * cosh)), - this.opacity - ); - } -})); - -exports.color = color; -exports.rgb = rgb; -exports.hsl = hsl; -exports.lab = lab; -exports.hcl = hcl; -exports.cubehelix = cubehelix; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{}],109:[function(require,module,exports){ -// https://d3js.org/d3-dispatch/ Version 1.0.3. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); -}(this, (function (exports) { 'use strict'; - -var noop = {value: function() {}}; - -function dispatch() { - for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { - if (!(t = arguments[i] + "") || (t in _)) throw new Error("illegal type: " + t); - _[t] = []; - } - return new Dispatch(_); -} - -function Dispatch(_) { - this._ = _; -} - -function parseTypenames(typenames, types) { - return typenames.trim().split(/^|\s+/).map(function(t) { - var name = "", i = t.indexOf("."); - if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); - if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); - return {type: t, name: name}; - }); -} - -Dispatch.prototype = dispatch.prototype = { - constructor: Dispatch, - on: function(typename, callback) { - var _ = this._, - T = parseTypenames(typename + "", _), - t, - i = -1, - n = T.length; - - // If no callback was specified, return the callback of the given type and name. - if (arguments.length < 2) { - while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; - return; - } - - // If a type was specified, set the callback for the given type and name. - // Otherwise, if a null callback was specified, remove callbacks of the given name. - if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); - while (++i < n) { - if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); - else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); - } - - return this; - }, - copy: function() { - var copy = {}, _ = this._; - for (var t in _) copy[t] = _[t].slice(); - return new Dispatch(copy); - }, - call: function(type, that) { - if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - }, - apply: function(type, that, args) { - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - } -}; - -function get(type, name) { - for (var i = 0, n = type.length, c; i < n; ++i) { - if ((c = type[i]).name === name) { - return c.value; + d3.extent = function(array, f) { + var i = -1, n = array.length, a, b, c; + if (arguments.length === 1) { + while (++i < n) if ((b = array[i]) != null && b >= b) { + a = c = b; + break; + } + while (++i < n) if ((b = array[i]) != null) { + if (a > b) a = b; + if (c < b) c = b; + } + } else { + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { + a = c = b; + break; + } + while (++i < n) if ((b = f.call(array, array[i], i)) != null) { + if (a > b) a = b; + if (c < b) c = b; + } } + return [ a, c ]; + }; + function d3_number(x) { + return x === null ? NaN : +x; } -} - -function set(type, name, callback) { - for (var i = 0, n = type.length; i < n; ++i) { - if (type[i].name === name) { - type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); - break; - } + function d3_numeric(x) { + return !isNaN(x); } - if (callback != null) type.push({name: name, value: callback}); - return type; -} - -exports.dispatch = dispatch; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{}],110:[function(require,module,exports){ -// https://d3js.org/d3-force/ Version 1.0.6. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-quadtree'), require('d3-collection'), require('d3-dispatch'), require('d3-timer')) : - typeof define === 'function' && define.amd ? define(['exports', 'd3-quadtree', 'd3-collection', 'd3-dispatch', 'd3-timer'], factory) : - (factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3,global.d3)); -}(this, (function (exports,d3Quadtree,d3Collection,d3Dispatch,d3Timer) { 'use strict'; - -var center = function(x, y) { - var nodes; - - if (x == null) x = 0; - if (y == null) y = 0; - - function force() { - var i, - n = nodes.length, - node, - sx = 0, - sy = 0; - - for (i = 0; i < n; ++i) { - node = nodes[i], sx += node.x, sy += node.y; - } - - for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) { - node = nodes[i], node.x -= sx, node.y -= sy; + d3.sum = function(array, f) { + var s = 0, n = array.length, a, i = -1; + if (arguments.length === 1) { + while (++i < n) if (d3_numeric(a = +array[i])) s += a; + } else { + while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a; } - } - - force.initialize = function(_) { - nodes = _; + return s; }; - - force.x = function(_) { - return arguments.length ? (x = +_, force) : x; + d3.mean = function(array, f) { + var s = 0, n = array.length, a, i = -1, j = n; + if (arguments.length === 1) { + while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j; + } else { + while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j; + } + if (j) return s / j; }; - - force.y = function(_) { - return arguments.length ? (y = +_, force) : y; + d3.quantile = function(values, p) { + var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h; + return e ? v + e * (values[h] - v) : v; }; - - return force; -}; - -var constant = function(x) { - return function() { - return x; + d3.median = function(array, f) { + var numbers = [], n = array.length, a, i = -1; + if (arguments.length === 1) { + while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a); + } else { + while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a); + } + if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), .5); }; -}; - -var jiggle = function() { - return (Math.random() - 0.5) * 1e-6; -}; - -function x(d) { - return d.x + d.vx; -} - -function y(d) { - return d.y + d.vy; -} - -var collide = function(radius) { - var nodes, - radii, - strength = 1, - iterations = 1; - - if (typeof radius !== "function") radius = constant(radius == null ? 1 : +radius); - - function force() { - var i, n = nodes.length, - tree, - node, - xi, - yi, - ri, - ri2; - - for (var k = 0; k < iterations; ++k) { - tree = d3Quadtree.quadtree(nodes, x, y).visitAfter(prepare); - for (i = 0; i < n; ++i) { - node = nodes[i]; - ri = radii[node.index], ri2 = ri * ri; - xi = node.x + node.vx; - yi = node.y + node.vy; - tree.visit(apply); - } - } - - function apply(quad, x0, y0, x1, y1) { - var data = quad.data, rj = quad.r, r = ri + rj; - if (data) { - if (data.index > node.index) { - var x = xi - data.x - data.vx, - y = yi - data.y - data.vy, - l = x * x + y * y; - if (l < r * r) { - if (x === 0) x = jiggle(), l += x * x; - if (y === 0) y = jiggle(), l += y * y; - l = (r - (l = Math.sqrt(l))) / l * strength; - node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj)); - node.vy += (y *= l) * r; - data.vx -= x * (r = 1 - r); - data.vy -= y * r; - } + d3.variance = function(array, f) { + var n = array.length, m = 0, a, d, s = 0, i = -1, j = 0; + if (arguments.length === 1) { + while (++i < n) { + if (d3_numeric(a = d3_number(array[i]))) { + d = a - m; + m += d / ++j; + s += d * (a - m); } - return; } - return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r; - } - } - - function prepare(quad) { - if (quad.data) return quad.r = radii[quad.data.index]; - for (var i = quad.r = 0; i < 4; ++i) { - if (quad[i] && quad[i].r > quad.r) { - quad.r = quad[i].r; + } else { + while (++i < n) { + if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) { + d = a - m; + m += d / ++j; + s += d * (a - m); + } } } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length, node; - radii = new Array(n); - for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes); - } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.iterations = function(_) { - return arguments.length ? (iterations = +_, force) : iterations; - }; - - force.strength = function(_) { - return arguments.length ? (strength = +_, force) : strength; + if (j > 1) return s / (j - 1); }; - - force.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), initialize(), force) : radius; + d3.deviation = function() { + var v = d3.variance.apply(this, arguments); + return v ? Math.sqrt(v) : v; }; - - return force; -}; - -function index(d) { - return d.index; -} - -function find(nodeById, nodeId) { - var node = nodeById.get(nodeId); - if (!node) throw new Error("missing: " + nodeId); - return node; -} - -var link = function(links) { - var id = index, - strength = defaultStrength, - strengths, - distance = constant(30), - distances, - nodes, - count, - bias, - iterations = 1; - - if (links == null) links = []; - - function defaultStrength(link) { - return 1 / Math.min(count[link.source.index], count[link.target.index]); - } - - function force(alpha) { - for (var k = 0, n = links.length; k < iterations; ++k) { - for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) { - link = links[i], source = link.source, target = link.target; - x = target.x + target.vx - source.x - source.vx || jiggle(); - y = target.y + target.vy - source.y - source.vy || jiggle(); - l = Math.sqrt(x * x + y * y); - l = (l - distances[i]) / l * alpha * strengths[i]; - x *= l, y *= l; - target.vx -= x * (b = bias[i]); - target.vy -= y * b; - source.vx += x * (b = 1 - b); - source.vy += y * b; + function d3_bisector(compare) { + return { + left: function(a, x, lo, hi) { + if (arguments.length < 3) lo = 0; + if (arguments.length < 4) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid; + } + return lo; + }, + right: function(a, x, lo, hi) { + if (arguments.length < 3) lo = 0; + if (arguments.length < 4) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1; + } + return lo; } - } + }; } - - function initialize() { - if (!nodes) return; - - var i, - n = nodes.length, - m = links.length, - nodeById = d3Collection.map(nodes, id), - link; - - for (i = 0, count = new Array(n); i < m; ++i) { - link = links[i], link.index = i; - if (typeof link.source !== "object") link.source = find(nodeById, link.source); - if (typeof link.target !== "object") link.target = find(nodeById, link.target); - count[link.source.index] = (count[link.source.index] || 0) + 1; - count[link.target.index] = (count[link.target.index] || 0) + 1; - } - - for (i = 0, bias = new Array(m); i < m; ++i) { - link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); + var d3_bisect = d3_bisector(d3_ascending); + d3.bisectLeft = d3_bisect.left; + d3.bisect = d3.bisectRight = d3_bisect.right; + d3.bisector = function(f) { + return d3_bisector(f.length === 1 ? function(d, x) { + return d3_ascending(f(d), x); + } : f); + }; + d3.shuffle = function(array, i0, i1) { + if ((m = arguments.length) < 3) { + i1 = array.length; + if (m < 2) i0 = 0; } - - strengths = new Array(m), initializeStrength(); - distances = new Array(m), initializeDistance(); - } - - function initializeStrength() { - if (!nodes) return; - - for (var i = 0, n = links.length; i < n; ++i) { - strengths[i] = +strength(links[i], i, links); + var m = i1 - i0, t, i; + while (m) { + i = Math.random() * m-- | 0; + t = array[m + i0], array[m + i0] = array[i + i0], array[i + i0] = t; } - } - - function initializeDistance() { - if (!nodes) return; - - for (var i = 0, n = links.length; i < n; ++i) { - distances[i] = +distance(links[i], i, links); + return array; + }; + d3.permute = function(array, indexes) { + var i = indexes.length, permutes = new Array(i); + while (i--) permutes[i] = array[indexes[i]]; + return permutes; + }; + d3.pairs = function(array) { + var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n); + while (i < n) pairs[i] = [ p0 = p1, p1 = array[++i] ]; + return pairs; + }; + d3.transpose = function(matrix) { + if (!(n = matrix.length)) return []; + for (var i = -1, m = d3.min(matrix, d3_transposeLength), transpose = new Array(m); ++i < m; ) { + for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n; ) { + row[j] = matrix[j][i]; + } } - } - - force.initialize = function(_) { - nodes = _; - initialize(); + return transpose; }; - - force.links = function(_) { - return arguments.length ? (links = _, initialize(), force) : links; + function d3_transposeLength(d) { + return d.length; + } + d3.zip = function() { + return d3.transpose(arguments); }; - - force.id = function(_) { - return arguments.length ? (id = _, force) : id; + d3.keys = function(map) { + var keys = []; + for (var key in map) keys.push(key); + return keys; }; - - force.iterations = function(_) { - return arguments.length ? (iterations = +_, force) : iterations; + d3.values = function(map) { + var values = []; + for (var key in map) values.push(map[key]); + return values; }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initializeStrength(), force) : strength; + d3.entries = function(map) { + var entries = []; + for (var key in map) entries.push({ + key: key, + value: map[key] + }); + return entries; }; - - force.distance = function(_) { - return arguments.length ? (distance = typeof _ === "function" ? _ : constant(+_), initializeDistance(), force) : distance; + d3.merge = function(arrays) { + var n = arrays.length, m, i = -1, j = 0, merged, array; + while (++i < n) j += arrays[i].length; + merged = new Array(j); + while (--n >= 0) { + array = arrays[n]; + m = array.length; + while (--m >= 0) { + merged[--j] = array[m]; + } + } + return merged; }; - - return force; -}; - -function x$1(d) { - return d.x; -} - -function y$1(d) { - return d.y; -} - -var initialRadius = 10; -var initialAngle = Math.PI * (3 - Math.sqrt(5)); - -var simulation = function(nodes) { - var simulation, - alpha = 1, - alphaMin = 0.001, - alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), - alphaTarget = 0, - velocityDecay = 0.6, - forces = d3Collection.map(), - stepper = d3Timer.timer(step), - event = d3Dispatch.dispatch("tick", "end"); - - if (nodes == null) nodes = []; - - function step() { - tick(); - event.call("tick", simulation); - if (alpha < alphaMin) { - stepper.stop(); - event.call("end", simulation); + var abs = Math.abs; + d3.range = function(start, stop, step) { + if (arguments.length < 3) { + step = 1; + if (arguments.length < 2) { + stop = start; + start = 0; + } } + if ((stop - start) / step === Infinity) throw new Error("infinite range"); + var range = [], k = d3_range_integerScale(abs(step)), i = -1, j; + start *= k, stop *= k, step *= k; + if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k); + return range; + }; + function d3_range_integerScale(x) { + var k = 1; + while (x * k % 1) k *= 10; + return k; } - - function tick() { - var i, n = nodes.length, node; - - alpha += (alphaTarget - alpha) * alphaDecay; - - forces.each(function(force) { - force(alpha); - }); - - for (i = 0; i < n; ++i) { - node = nodes[i]; - if (node.fx == null) node.x += node.vx *= velocityDecay; - else node.x = node.fx, node.vx = 0; - if (node.fy == null) node.y += node.vy *= velocityDecay; - else node.y = node.fy, node.vy = 0; + function d3_class(ctor, properties) { + for (var key in properties) { + Object.defineProperty(ctor.prototype, key, { + value: properties[key], + enumerable: false + }); } } - - function initializeNodes() { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.index = i; - if (isNaN(node.x) || isNaN(node.y)) { - var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle; - node.x = radius * Math.cos(angle); - node.y = radius * Math.sin(angle); - } - if (isNaN(node.vx) || isNaN(node.vy)) { - node.vx = node.vy = 0; - } + d3.map = function(object, f) { + var map = new d3_Map(); + if (object instanceof d3_Map) { + object.forEach(function(key, value) { + map.set(key, value); + }); + } else if (Array.isArray(object)) { + var i = -1, n = object.length, o; + if (arguments.length === 1) while (++i < n) map.set(i, object[i]); else while (++i < n) map.set(f.call(object, o = object[i], i), o); + } else { + for (var key in object) map.set(key, object[key]); } + return map; + }; + function d3_Map() { + this._ = Object.create(null); } - - function initializeForce(force) { - if (force.initialize) force.initialize(nodes); - return force; - } - - initializeNodes(); - - return simulation = { - tick: tick, - - restart: function() { - return stepper.restart(step), simulation; - }, - - stop: function() { - return stepper.stop(), simulation; - }, - - nodes: function(_) { - return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes; - }, - - alpha: function(_) { - return arguments.length ? (alpha = +_, simulation) : alpha; - }, - - alphaMin: function(_) { - return arguments.length ? (alphaMin = +_, simulation) : alphaMin; - }, - - alphaDecay: function(_) { - return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay; - }, - - alphaTarget: function(_) { - return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget; + var d3_map_proto = "__proto__", d3_map_zero = "\x00"; + d3_class(d3_Map, { + has: d3_map_has, + get: function(key) { + return this._[d3_map_escape(key)]; }, - - velocityDecay: function(_) { - return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay; + set: function(key, value) { + return this._[d3_map_escape(key)] = value; }, - - force: function(name, _) { - return arguments.length > 1 ? ((_ == null ? forces.remove(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); + remove: d3_map_remove, + keys: d3_map_keys, + values: function() { + var values = []; + for (var key in this._) values.push(this._[key]); + return values; }, - - find: function(x, y, radius) { - var i = 0, - n = nodes.length, - dx, - dy, - d2, - node, - closest; - - if (radius == null) radius = Infinity; - else radius *= radius; - - for (i = 0; i < n; ++i) { - node = nodes[i]; - dx = x - node.x; - dy = y - node.y; - d2 = dx * dx + dy * dy; - if (d2 < radius) closest = node, radius = d2; - } - - return closest; + entries: function() { + var entries = []; + for (var key in this._) entries.push({ + key: d3_map_unescape(key), + value: this._[key] + }); + return entries; }, - - on: function(name, _) { - return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name); + size: d3_map_size, + empty: d3_map_empty, + forEach: function(f) { + for (var key in this._) f.call(this, d3_map_unescape(key), this._[key]); } - }; -}; - -var manyBody = function() { - var nodes, - node, - alpha, - strength = constant(-30), - strengths, - distanceMin2 = 1, - distanceMax2 = Infinity, - theta2 = 0.81; - - function force(_) { - var i, n = nodes.length, tree = d3Quadtree.quadtree(nodes, x$1, y$1).visitAfter(accumulate); - for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply); - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length, node; - strengths = new Array(n); - for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); + }); + function d3_map_escape(key) { + return (key += "") === d3_map_proto || key[0] === d3_map_zero ? d3_map_zero + key : key; } - - function accumulate(quad) { - var strength = 0, q, c, x$$1, y$$1, i; - - // For internal nodes, accumulate forces from child quadrants. - if (quad.length) { - for (x$$1 = y$$1 = i = 0; i < 4; ++i) { - if ((q = quad[i]) && (c = q.value)) { - strength += c, x$$1 += c * q.x, y$$1 += c * q.y; - } - } - quad.x = x$$1 / strength; - quad.y = y$$1 / strength; - } - - // For leaf nodes, accumulate forces from coincident quadrants. - else { - q = quad; - q.x = q.data.x; - q.y = q.data.y; - do strength += strengths[q.data.index]; - while (q = q.next); - } - - quad.value = strength; + function d3_map_unescape(key) { + return (key += "")[0] === d3_map_zero ? key.slice(1) : key; } - - function apply(quad, x1, _, x2) { - if (!quad.value) return true; - - var x$$1 = quad.x - node.x, - y$$1 = quad.y - node.y, - w = x2 - x1, - l = x$$1 * x$$1 + y$$1 * y$$1; - - // Apply the Barnes-Hut approximation if possible. - // Limit forces for very close nodes; randomize direction if coincident. - if (w * w / theta2 < l) { - if (l < distanceMax2) { - if (x$$1 === 0) x$$1 = jiggle(), l += x$$1 * x$$1; - if (y$$1 === 0) y$$1 = jiggle(), l += y$$1 * y$$1; - if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); - node.vx += x$$1 * quad.value * alpha / l; - node.vy += y$$1 * quad.value * alpha / l; - } - return true; - } - - // Otherwise, process points directly. - else if (quad.length || l >= distanceMax2) return; - - // Limit forces for very close nodes; randomize direction if coincident. - if (quad.data !== node || quad.next) { - if (x$$1 === 0) x$$1 = jiggle(), l += x$$1 * x$$1; - if (y$$1 === 0) y$$1 = jiggle(), l += y$$1 * y$$1; - if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); - } - - do if (quad.data !== node) { - w = strengths[quad.data.index] * alpha / l; - node.vx += x$$1 * w; - node.vy += y$$1 * w; - } while (quad = quad.next); + function d3_map_has(key) { + return d3_map_escape(key) in this._; } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.distanceMin = function(_) { - return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2); - }; - - force.distanceMax = function(_) { - return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2); - }; - - force.theta = function(_) { - return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2); - }; - - return force; -}; - -var x$2 = function(x) { - var strength = constant(0.1), - nodes, - strengths, - xz; - - if (typeof x !== "function") x = constant(x == null ? 0 : +x); - - function force(alpha) { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha; - } + function d3_map_remove(key) { + return (key = d3_map_escape(key)) in this._ && delete this._[key]; } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - xz = new Array(n); - for (i = 0; i < n; ++i) { - strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); - } + function d3_map_keys() { + var keys = []; + for (var key in this._) keys.push(d3_map_unescape(key)); + return keys; } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), initialize(), force) : x; - }; - - return force; -}; - -var y$2 = function(y) { - var strength = constant(0.1), - nodes, - strengths, - yz; - - if (typeof y !== "function") y = constant(y == null ? 0 : +y); - - function force(alpha) { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha; - } + function d3_map_size() { + var size = 0; + for (var key in this._) ++size; + return size; } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - yz = new Array(n); - for (i = 0; i < n; ++i) { - strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); - } - } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), initialize(), force) : y; - }; - - return force; -}; - -exports.forceCenter = center; -exports.forceCollide = collide; -exports.forceLink = link; -exports.forceManyBody = manyBody; -exports.forceSimulation = simulation; -exports.forceX = x$2; -exports.forceY = y$2; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{"d3-collection":107,"d3-dispatch":109,"d3-quadtree":112,"d3-timer":113}],111:[function(require,module,exports){ -// https://d3js.org/d3-interpolate/ Version 1.1.4. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-color')) : - typeof define === 'function' && define.amd ? define(['exports', 'd3-color'], factory) : - (factory((global.d3 = global.d3 || {}),global.d3)); -}(this, (function (exports,d3Color) { 'use strict'; - -function basis(t1, v0, v1, v2, v3) { - var t2 = t1 * t1, t3 = t2 * t1; - return ((1 - 3 * t1 + 3 * t2 - t3) * v0 - + (4 - 6 * t2 + 3 * t3) * v1 - + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 - + t3 * v3) / 6; -} - -var basis$1 = function(values) { - var n = values.length - 1; - return function(t) { - var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), - v1 = values[i], - v2 = values[i + 1], - v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, - v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -}; - -var basisClosed = function(values) { - var n = values.length; - return function(t) { - var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), - v0 = values[(i + n - 1) % n], - v1 = values[i % n], - v2 = values[(i + 1) % n], - v3 = values[(i + 2) % n]; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -}; - -var constant = function(x) { - return function() { - return x; - }; -}; - -function linear(a, d) { - return function(t) { - return a + t * d; - }; -} - -function exponential(a, b, y) { - return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { - return Math.pow(a + t * b, y); - }; -} - -function hue(a, b) { - var d = b - a; - return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a); -} - -function gamma(y) { - return (y = +y) === 1 ? nogamma : function(a, b) { - return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); - }; -} - -function nogamma(a, b) { - var d = b - a; - return d ? linear(a, d) : constant(isNaN(a) ? b : a); -} - -var rgb$1 = ((function rgbGamma(y) { - var color$$1 = gamma(y); - - function rgb$$1(start, end) { - var r = color$$1((start = d3Color.rgb(start)).r, (end = d3Color.rgb(end)).r), - g = color$$1(start.g, end.g), - b = color$$1(start.b, end.b), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.r = r(t); - start.g = g(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; - } - - rgb$$1.gamma = rgbGamma; - - return rgb$$1; -}))(1); - -function rgbSpline(spline) { - return function(colors) { - var n = colors.length, - r = new Array(n), - g = new Array(n), - b = new Array(n), - i, color$$1; - for (i = 0; i < n; ++i) { - color$$1 = d3Color.rgb(colors[i]); - r[i] = color$$1.r || 0; - g[i] = color$$1.g || 0; - b[i] = color$$1.b || 0; - } - r = spline(r); - g = spline(g); - b = spline(b); - color$$1.opacity = 1; - return function(t) { - color$$1.r = r(t); - color$$1.g = g(t); - color$$1.b = b(t); - return color$$1 + ""; - }; - }; -} - -var rgbBasis = rgbSpline(basis$1); -var rgbBasisClosed = rgbSpline(basisClosed); - -var array = function(a, b) { - var nb = b ? b.length : 0, - na = a ? Math.min(nb, a.length) : 0, - x = new Array(nb), - c = new Array(nb), - i; - - for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]); - for (; i < nb; ++i) c[i] = b[i]; - - return function(t) { - for (i = 0; i < na; ++i) c[i] = x[i](t); - return c; - }; -}; - -var date = function(a, b) { - var d = new Date; - return a = +a, b -= a, function(t) { - return d.setTime(a + b * t), d; - }; -}; - -var number = function(a, b) { - return a = +a, b -= a, function(t) { - return a + b * t; - }; -}; - -var object = function(a, b) { - var i = {}, - c = {}, - k; - - if (a === null || typeof a !== "object") a = {}; - if (b === null || typeof b !== "object") b = {}; - - for (k in b) { - if (k in a) { - i[k] = value(a[k], b[k]); - } else { - c[k] = b[k]; - } - } - - return function(t) { - for (k in i) c[k] = i[k](t); - return c; - }; -}; - -var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g; -var reB = new RegExp(reA.source, "g"); - -function zero(b) { - return function() { - return b; - }; -} - -function one(b) { - return function(t) { - return b(t) + ""; - }; -} - -var string = function(a, b) { - var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b - am, // current match in a - bm, // current match in b - bs, // string preceding current number in b, if any - i = -1, // index in s - s = [], // string constants and placeholders - q = []; // number interpolators - - // Coerce inputs to strings. - a = a + "", b = b + ""; - - // Interpolate pairs of numbers in a & b. - while ((am = reA.exec(a)) - && (bm = reB.exec(b))) { - if ((bs = bm.index) > bi) { // a string precedes the next number in b - bs = b.slice(bi, bs); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match - if (s[i]) s[i] += bm; // coalesce with previous string - else s[++i] = bm; - } else { // interpolate non-matching numbers - s[++i] = null; - q.push({i: i, x: number(am, bm)}); - } - bi = reB.lastIndex; - } - - // Add remains of b. - if (bi < b.length) { - bs = b.slice(bi); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - - // Special optimization for only a single match. - // Otherwise, interpolate each of the numbers and rejoin the string. - return s.length < 2 ? (q[0] - ? one(q[0].x) - : zero(b)) - : (b = q.length, function(t) { - for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }); -}; - -var value = function(a, b) { - var t = typeof b, c; - return b == null || t === "boolean" ? constant(b) - : (t === "number" ? number - : t === "string" ? ((c = d3Color.color(b)) ? (b = c, rgb$1) : string) - : b instanceof d3Color.color ? rgb$1 - : b instanceof Date ? date - : Array.isArray(b) ? array - : isNaN(b) ? object - : number)(a, b); -}; - -var round = function(a, b) { - return a = +a, b -= a, function(t) { - return Math.round(a + b * t); - }; -}; - -var degrees = 180 / Math.PI; - -var identity = { - translateX: 0, - translateY: 0, - rotate: 0, - skewX: 0, - scaleX: 1, - scaleY: 1 -}; - -var decompose = function(a, b, c, d, e, f) { - var scaleX, scaleY, skewX; - if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; - if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; - if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; - if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; - return { - translateX: e, - translateY: f, - rotate: Math.atan2(b, a) * degrees, - skewX: Math.atan(skewX) * degrees, - scaleX: scaleX, - scaleY: scaleY - }; -}; - -var cssNode; -var cssRoot; -var cssView; -var svgNode; - -function parseCss(value) { - if (value === "none") return identity; - if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView; - cssNode.style.transform = value; - value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform"); - cssRoot.removeChild(cssNode); - value = value.slice(7, -1).split(","); - return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]); -} - -function parseSvg(value) { - if (value == null) return identity; - if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); - svgNode.setAttribute("transform", value); - if (!(value = svgNode.transform.baseVal.consolidate())) return identity; - value = value.matrix; - return decompose(value.a, value.b, value.c, value.d, value.e, value.f); -} - -function interpolateTransform(parse, pxComma, pxParen, degParen) { - - function pop(s) { - return s.length ? s.pop() + " " : ""; - } - - function translate(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push("translate(", null, pxComma, null, pxParen); - q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); - } else if (xb || yb) { - s.push("translate(" + xb + pxComma + yb + pxParen); - } - } - - function rotate(a, b, s, q) { - if (a !== b) { - if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path - q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b)}); - } else if (b) { - s.push(pop(s) + "rotate(" + b + degParen); - } - } - - function skewX(a, b, s, q) { - if (a !== b) { - q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number(a, b)}); - } else if (b) { - s.push(pop(s) + "skewX(" + b + degParen); - } - } - - function scale(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push(pop(s) + "scale(", null, ",", null, ")"); - q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); - } else if (xb !== 1 || yb !== 1) { - s.push(pop(s) + "scale(" + xb + "," + yb + ")"); - } - } - - return function(a, b) { - var s = [], // string constants and placeholders - q = []; // number interpolators - a = parse(a), b = parse(b); - translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); - rotate(a.rotate, b.rotate, s, q); - skewX(a.skewX, b.skewX, s, q); - scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); - a = b = null; // gc - return function(t) { - var i = -1, n = q.length, o; - while (++i < n) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }; - }; -} - -var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"); -var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"); - -var rho = Math.SQRT2; -var rho2 = 2; -var rho4 = 4; -var epsilon2 = 1e-12; - -function cosh(x) { - return ((x = Math.exp(x)) + 1 / x) / 2; -} - -function sinh(x) { - return ((x = Math.exp(x)) - 1 / x) / 2; -} - -function tanh(x) { - return ((x = Math.exp(2 * x)) - 1) / (x + 1); -} - -// p0 = [ux0, uy0, w0] -// p1 = [ux1, uy1, w1] -var zoom = function(p0, p1) { - var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], - ux1 = p1[0], uy1 = p1[1], w1 = p1[2], - dx = ux1 - ux0, - dy = uy1 - uy0, - d2 = dx * dx + dy * dy, - i, - S; - - // Special case for u0 ≅ u1. - if (d2 < epsilon2) { - S = Math.log(w1 / w0) / rho; - i = function(t) { - return [ - ux0 + t * dx, - uy0 + t * dy, - w0 * Math.exp(rho * t * S) - ]; - }; - } - - // General case. - else { - var d1 = Math.sqrt(d2), - b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), - b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), - r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), - r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); - S = (r1 - r0) / rho; - i = function(t) { - var s = t * S, - coshr0 = cosh(r0), - u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); - return [ - ux0 + u * dx, - uy0 + u * dy, - w0 * coshr0 / cosh(rho * s + r0) - ]; - }; - } - - i.duration = S * 1000; - - return i; -}; - -function hsl$1(hue$$1) { - return function(start, end) { - var h = hue$$1((start = d3Color.hsl(start)).h, (end = d3Color.hsl(end)).h), - s = nogamma(start.s, end.s), - l = nogamma(start.l, end.l), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} - -var hsl$2 = hsl$1(hue); -var hslLong = hsl$1(nogamma); - -function lab$1(start, end) { - var l = nogamma((start = d3Color.lab(start)).l, (end = d3Color.lab(end)).l), - a = nogamma(start.a, end.a), - b = nogamma(start.b, end.b), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.l = l(t); - start.a = a(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; -} - -function hcl$1(hue$$1) { - return function(start, end) { - var h = hue$$1((start = d3Color.hcl(start)).h, (end = d3Color.hcl(end)).h), - c = nogamma(start.c, end.c), - l = nogamma(start.l, end.l), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.c = c(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} - -var hcl$2 = hcl$1(hue); -var hclLong = hcl$1(nogamma); - -function cubehelix$1(hue$$1) { - return (function cubehelixGamma(y) { - y = +y; - - function cubehelix$$1(start, end) { - var h = hue$$1((start = d3Color.cubehelix(start)).h, (end = d3Color.cubehelix(end)).h), - s = nogamma(start.s, end.s), - l = nogamma(start.l, end.l), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(Math.pow(t, y)); - start.opacity = opacity(t); - return start + ""; - }; - } - - cubehelix$$1.gamma = cubehelixGamma; - - return cubehelix$$1; - })(1); -} - -var cubehelix$2 = cubehelix$1(hue); -var cubehelixLong = cubehelix$1(nogamma); - -var quantize = function(interpolator, n) { - var samples = new Array(n); - for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); - return samples; -}; - -exports.interpolate = value; -exports.interpolateArray = array; -exports.interpolateBasis = basis$1; -exports.interpolateBasisClosed = basisClosed; -exports.interpolateDate = date; -exports.interpolateNumber = number; -exports.interpolateObject = object; -exports.interpolateRound = round; -exports.interpolateString = string; -exports.interpolateTransformCss = interpolateTransformCss; -exports.interpolateTransformSvg = interpolateTransformSvg; -exports.interpolateZoom = zoom; -exports.interpolateRgb = rgb$1; -exports.interpolateRgbBasis = rgbBasis; -exports.interpolateRgbBasisClosed = rgbBasisClosed; -exports.interpolateHsl = hsl$2; -exports.interpolateHslLong = hslLong; -exports.interpolateLab = lab$1; -exports.interpolateHcl = hcl$2; -exports.interpolateHclLong = hclLong; -exports.interpolateCubehelix = cubehelix$2; -exports.interpolateCubehelixLong = cubehelixLong; -exports.quantize = quantize; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{"d3-color":108}],112:[function(require,module,exports){ -// https://d3js.org/d3-quadtree/ Version 1.0.3. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); -}(this, (function (exports) { 'use strict'; - -var tree_add = function(d) { - var x = +this._x.call(null, d), - y = +this._y.call(null, d); - return add(this.cover(x, y), x, y, d); -}; - -function add(tree, x, y, d) { - if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points - - var parent, - node = tree._root, - leaf = {data: d}, - x0 = tree._x0, - y0 = tree._y0, - x1 = tree._x1, - y1 = tree._y1, - xm, - ym, - xp, - yp, - right, - bottom, - i, - j; - - // If the tree is empty, initialize the root as a leaf. - if (!node) return tree._root = leaf, tree; - - // Find the existing leaf for the new point, or add it. - while (node.length) { - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; - } - - // Is the new point is exactly coincident with the existing point? - xp = +tree._x.call(null, node.data); - yp = +tree._y.call(null, node.data); - if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; - - // Otherwise, split the leaf node until the old and new point are separated. - do { - parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm))); - return parent[j] = node, parent[i] = leaf, tree; -} - -function addAll(data) { - var d, i, n = data.length, - x, - y, - xz = new Array(n), - yz = new Array(n), - x0 = Infinity, - y0 = Infinity, - x1 = -Infinity, - y1 = -Infinity; - - // Compute the points and their extent. - for (i = 0; i < n; ++i) { - if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; - xz[i] = x; - yz[i] = y; - if (x < x0) x0 = x; - if (x > x1) x1 = x; - if (y < y0) y0 = y; - if (y > y1) y1 = y; - } - - // If there were no (valid) points, inherit the existing extent. - if (x1 < x0) x0 = this._x0, x1 = this._x1; - if (y1 < y0) y0 = this._y0, y1 = this._y1; - - // Expand the tree to cover the new points. - this.cover(x0, y0).cover(x1, y1); - - // Add the new points. - for (i = 0; i < n; ++i) { - add(this, xz[i], yz[i], data[i]); - } - - return this; -} - -var tree_cover = function(x, y) { - if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points - - var x0 = this._x0, - y0 = this._y0, - x1 = this._x1, - y1 = this._y1; - - // If the quadtree has no extent, initialize them. - // Integer extent are necessary so that if we later double the extent, - // the existing quadrant boundaries don’t change due to floating point error! - if (isNaN(x0)) { - x1 = (x0 = Math.floor(x)) + 1; - y1 = (y0 = Math.floor(y)) + 1; - } - - // Otherwise, double repeatedly to cover. - else if (x0 > x || x > x1 || y0 > y || y > y1) { - var z = x1 - x0, - node = this._root, - parent, - i; - - switch (i = (y < (y0 + y1) / 2) << 1 | (x < (x0 + x1) / 2)) { - case 0: { - do parent = new Array(4), parent[i] = node, node = parent; - while (z *= 2, x1 = x0 + z, y1 = y0 + z, x > x1 || y > y1); - break; - } - case 1: { - do parent = new Array(4), parent[i] = node, node = parent; - while (z *= 2, x0 = x1 - z, y1 = y0 + z, x0 > x || y > y1); - break; - } - case 2: { - do parent = new Array(4), parent[i] = node, node = parent; - while (z *= 2, x1 = x0 + z, y0 = y1 - z, x > x1 || y0 > y); - break; - } - case 3: { - do parent = new Array(4), parent[i] = node, node = parent; - while (z *= 2, x0 = x1 - z, y0 = y1 - z, x0 > x || y0 > y); - break; - } - } - - if (this._root && this._root.length) this._root = node; - } - - // If the quadtree covers the point already, just return. - else return this; - - this._x0 = x0; - this._y0 = y0; - this._x1 = x1; - this._y1 = y1; - return this; -}; - -var tree_data = function() { - var data = []; - this.visit(function(node) { - if (!node.length) do data.push(node.data); while (node = node.next) - }); - return data; -}; - -var tree_extent = function(_) { - return arguments.length - ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) - : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; -}; - -var Quad = function(node, x0, y0, x1, y1) { - this.node = node; - this.x0 = x0; - this.y0 = y0; - this.x1 = x1; - this.y1 = y1; -}; - -var tree_find = function(x, y, radius) { - var data, - x0 = this._x0, - y0 = this._y0, - x1, - y1, - x2, - y2, - x3 = this._x1, - y3 = this._y1, - quads = [], - node = this._root, - q, - i; - - if (node) quads.push(new Quad(node, x0, y0, x3, y3)); - if (radius == null) radius = Infinity; - else { - x0 = x - radius, y0 = y - radius; - x3 = x + radius, y3 = y + radius; - radius *= radius; - } - - while (q = quads.pop()) { - - // Stop searching if this quadrant can’t contain a closer node. - if (!(node = q.node) - || (x1 = q.x0) > x3 - || (y1 = q.y0) > y3 - || (x2 = q.x1) < x0 - || (y2 = q.y1) < y0) continue; - - // Bisect the current quadrant. - if (node.length) { - var xm = (x1 + x2) / 2, - ym = (y1 + y2) / 2; - - quads.push( - new Quad(node[3], xm, ym, x2, y2), - new Quad(node[2], x1, ym, xm, y2), - new Quad(node[1], xm, y1, x2, ym), - new Quad(node[0], x1, y1, xm, ym) - ); - - // Visit the closest quadrant first. - if (i = (y >= ym) << 1 | (x >= xm)) { - q = quads[quads.length - 1]; - quads[quads.length - 1] = quads[quads.length - 1 - i]; - quads[quads.length - 1 - i] = q; - } - } - - // Visit this point. (Visiting coincident points isn’t necessary!) - else { - var dx = x - +this._x.call(null, node.data), - dy = y - +this._y.call(null, node.data), - d2 = dx * dx + dy * dy; - if (d2 < radius) { - var d = Math.sqrt(radius = d2); - x0 = x - d, y0 = y - d; - x3 = x + d, y3 = y + d; - data = node.data; - } - } - } - - return data; -}; - -var tree_remove = function(d) { - if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points - - var parent, - node = this._root, - retainer, - previous, - next, - x0 = this._x0, - y0 = this._y0, - x1 = this._x1, - y1 = this._y1, - x, - y, - xm, - ym, - right, - bottom, - i, - j; - - // If the tree is empty, initialize the root as a leaf. - if (!node) return this; - - // Find the leaf node for the point. - // While descending, also retain the deepest parent with a non-removed sibling. - if (node.length) while (true) { - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - if (!(parent = node, node = node[i = bottom << 1 | right])) return this; - if (!node.length) break; - if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i; - } - - // Find the point to remove. - while (node.data !== d) if (!(previous = node, node = node.next)) return this; - if (next = node.next) delete node.next; - - // If there are multiple coincident points, remove just the point. - if (previous) return (next ? previous.next = next : delete previous.next), this; - - // If this is the root point, remove it. - if (!parent) return this._root = next, this; - - // Remove this leaf. - next ? parent[i] = next : delete parent[i]; - - // If the parent now contains exactly one leaf, collapse superfluous parents. - if ((node = parent[0] || parent[1] || parent[2] || parent[3]) - && node === (parent[3] || parent[2] || parent[1] || parent[0]) - && !node.length) { - if (retainer) retainer[j] = node; - else this._root = node; - } - - return this; -}; - -function removeAll(data) { - for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]); - return this; -} - -var tree_root = function() { - return this._root; -}; - -var tree_size = function() { - var size = 0; - this.visit(function(node) { - if (!node.length) do ++size; while (node = node.next) - }); - return size; -}; - -var tree_visit = function(callback) { - var quads = [], q, node = this._root, child, x0, y0, x1, y1; - if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1)); - while (q = quads.pop()) { - if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) { - var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; - if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); - if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); - if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); - if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); - } - } - return this; -}; - -var tree_visitAfter = function(callback) { - var quads = [], next = [], q; - if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1)); - while (q = quads.pop()) { - var node = q.node; - if (node.length) { - var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; - if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); - if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); - if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); - if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); - } - next.push(q); - } - while (q = next.pop()) { - callback(q.node, q.x0, q.y0, q.x1, q.y1); - } - return this; -}; - -function defaultX(d) { - return d[0]; -} - -var tree_x = function(_) { - return arguments.length ? (this._x = _, this) : this._x; -}; - -function defaultY(d) { - return d[1]; -} - -var tree_y = function(_) { - return arguments.length ? (this._y = _, this) : this._y; -}; - -function quadtree(nodes, x, y) { - var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN); - return nodes == null ? tree : tree.addAll(nodes); -} - -function Quadtree(x, y, x0, y0, x1, y1) { - this._x = x; - this._y = y; - this._x0 = x0; - this._y0 = y0; - this._x1 = x1; - this._y1 = y1; - this._root = undefined; -} - -function leaf_copy(leaf) { - var copy = {data: leaf.data}, next = copy; - while (leaf = leaf.next) next = next.next = {data: leaf.data}; - return copy; -} - -var treeProto = quadtree.prototype = Quadtree.prototype; - -treeProto.copy = function() { - var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), - node = this._root, - nodes, - child; - - if (!node) return copy; - - if (!node.length) return copy._root = leaf_copy(node), copy; - - nodes = [{source: node, target: copy._root = new Array(4)}]; - while (node = nodes.pop()) { - for (var i = 0; i < 4; ++i) { - if (child = node.source[i]) { - if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)}); - else node.target[i] = leaf_copy(child); - } - } - } - - return copy; -}; - -treeProto.add = tree_add; -treeProto.addAll = addAll; -treeProto.cover = tree_cover; -treeProto.data = tree_data; -treeProto.extent = tree_extent; -treeProto.find = tree_find; -treeProto.remove = tree_remove; -treeProto.removeAll = removeAll; -treeProto.root = tree_root; -treeProto.size = tree_size; -treeProto.visit = tree_visit; -treeProto.visitAfter = tree_visitAfter; -treeProto.x = tree_x; -treeProto.y = tree_y; - -exports.quadtree = quadtree; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{}],113:[function(require,module,exports){ -// https://d3js.org/d3-timer/ Version 1.0.5. Copyright 2017 Mike Bostock. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); -}(this, (function (exports) { 'use strict'; - -var frame = 0; -var timeout = 0; -var interval = 0; -var pokeDelay = 1000; -var taskHead; -var taskTail; -var clockLast = 0; -var clockNow = 0; -var clockSkew = 0; -var clock = typeof performance === "object" && performance.now ? performance : Date; -var setFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : function(f) { setTimeout(f, 17); }; - -function now() { - return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); -} - -function clearNow() { - clockNow = 0; -} - -function Timer() { - this._call = - this._time = - this._next = null; -} - -Timer.prototype = timer.prototype = { - constructor: Timer, - restart: function(callback, delay, time) { - if (typeof callback !== "function") throw new TypeError("callback is not a function"); - time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); - if (!this._next && taskTail !== this) { - if (taskTail) taskTail._next = this; - else taskHead = this; - taskTail = this; - } - this._call = callback; - this._time = time; - sleep(); - }, - stop: function() { - if (this._call) { - this._call = null; - this._time = Infinity; - sleep(); - } - } -}; - -function timer(callback, delay, time) { - var t = new Timer; - t.restart(callback, delay, time); - return t; -} - -function timerFlush() { - now(); // Get the current time, if not already set. - ++frame; // Pretend we’ve set an alarm, if we haven’t already. - var t = taskHead, e; - while (t) { - if ((e = clockNow - t._time) >= 0) t._call.call(null, e); - t = t._next; - } - --frame; -} - -function wake() { - clockNow = (clockLast = clock.now()) + clockSkew; - frame = timeout = 0; - try { - timerFlush(); - } finally { - frame = 0; - nap(); - clockNow = 0; - } -} - -function poke() { - var now = clock.now(), delay = now - clockLast; - if (delay > pokeDelay) clockSkew -= delay, clockLast = now; -} - -function nap() { - var t0, t1 = taskHead, t2, time = Infinity; - while (t1) { - if (t1._call) { - if (time > t1._time) time = t1._time; - t0 = t1, t1 = t1._next; - } else { - t2 = t1._next, t1._next = null; - t1 = t0 ? t0._next = t2 : taskHead = t2; - } - } - taskTail = t0; - sleep(time); -} - -function sleep(time) { - if (frame) return; // Soonest alarm already set, or will be. - if (timeout) timeout = clearTimeout(timeout); - var delay = time - clockNow; - if (delay > 24) { - if (time < Infinity) timeout = setTimeout(wake, delay); - if (interval) interval = clearInterval(interval); - } else { - if (!interval) clockLast = clockNow, interval = setInterval(poke, pokeDelay); - frame = 1, setFrame(wake); - } -} - -var timeout$1 = function(callback, delay, time) { - var t = new Timer; - delay = delay == null ? 0 : +delay; - t.restart(function(elapsed) { - t.stop(); - callback(elapsed + delay); - }, delay, time); - return t; -}; - -var interval$1 = function(callback, delay, time) { - var t = new Timer, total = delay; - if (delay == null) return t.restart(callback, delay, time), t; - delay = +delay, time = time == null ? now() : +time; - t.restart(function tick(elapsed) { - elapsed += total; - t.restart(tick, total += delay, time); - callback(elapsed); - }, delay, time); - return t; -}; - -exports.now = now; -exports.timer = timer; -exports.timerFlush = timerFlush; -exports.timeout = timeout$1; -exports.interval = interval$1; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -},{}],114:[function(require,module,exports){ -!function() { - var d3 = { - version: "3.5.17" - }; - var d3_arraySlice = [].slice, d3_array = function(list) { - return d3_arraySlice.call(list); - }; - var d3_document = this.document; - function d3_documentElement(node) { - return node && (node.ownerDocument || node.document || node).documentElement; - } - function d3_window(node) { - return node && (node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView); - } - if (d3_document) { - try { - d3_array(d3_document.documentElement.childNodes)[0].nodeType; - } catch (e) { - d3_array = function(list) { - var i = list.length, array = new Array(i); - while (i--) array[i] = list[i]; - return array; - }; - } - } - if (!Date.now) Date.now = function() { - return +new Date(); - }; - if (d3_document) { - try { - d3_document.createElement("DIV").style.setProperty("opacity", 0, ""); - } catch (error) { - var d3_element_prototype = this.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = this.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty; - d3_element_prototype.setAttribute = function(name, value) { - d3_element_setAttribute.call(this, name, value + ""); - }; - d3_element_prototype.setAttributeNS = function(space, local, value) { - d3_element_setAttributeNS.call(this, space, local, value + ""); - }; - d3_style_prototype.setProperty = function(name, value, priority) { - d3_style_setProperty.call(this, name, value + "", priority); - }; - } - } - d3.ascending = d3_ascending; - function d3_ascending(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; - } - d3.descending = function(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; - }; - d3.min = function(array, f) { - var i = -1, n = array.length, a, b; - if (arguments.length === 1) { - while (++i < n) if ((b = array[i]) != null && b >= b) { - a = b; - break; - } - while (++i < n) if ((b = array[i]) != null && a > b) a = b; - } else { - while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { - a = b; - break; - } - while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b; - } - return a; - }; - d3.max = function(array, f) { - var i = -1, n = array.length, a, b; - if (arguments.length === 1) { - while (++i < n) if ((b = array[i]) != null && b >= b) { - a = b; - break; - } - while (++i < n) if ((b = array[i]) != null && b > a) a = b; - } else { - while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { - a = b; - break; - } - while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b; - } - return a; - }; - d3.extent = function(array, f) { - var i = -1, n = array.length, a, b, c; - if (arguments.length === 1) { - while (++i < n) if ((b = array[i]) != null && b >= b) { - a = c = b; - break; - } - while (++i < n) if ((b = array[i]) != null) { - if (a > b) a = b; - if (c < b) c = b; - } - } else { - while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { - a = c = b; - break; - } - while (++i < n) if ((b = f.call(array, array[i], i)) != null) { - if (a > b) a = b; - if (c < b) c = b; - } - } - return [ a, c ]; - }; - function d3_number(x) { - return x === null ? NaN : +x; - } - function d3_numeric(x) { - return !isNaN(x); - } - d3.sum = function(array, f) { - var s = 0, n = array.length, a, i = -1; - if (arguments.length === 1) { - while (++i < n) if (d3_numeric(a = +array[i])) s += a; - } else { - while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a; - } - return s; - }; - d3.mean = function(array, f) { - var s = 0, n = array.length, a, i = -1, j = n; - if (arguments.length === 1) { - while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j; - } else { - while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j; - } - if (j) return s / j; - }; - d3.quantile = function(values, p) { - var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h; - return e ? v + e * (values[h] - v) : v; - }; - d3.median = function(array, f) { - var numbers = [], n = array.length, a, i = -1; - if (arguments.length === 1) { - while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a); - } else { - while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a); - } - if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), .5); - }; - d3.variance = function(array, f) { - var n = array.length, m = 0, a, d, s = 0, i = -1, j = 0; - if (arguments.length === 1) { - while (++i < n) { - if (d3_numeric(a = d3_number(array[i]))) { - d = a - m; - m += d / ++j; - s += d * (a - m); - } - } - } else { - while (++i < n) { - if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) { - d = a - m; - m += d / ++j; - s += d * (a - m); - } - } - } - if (j > 1) return s / (j - 1); - }; - d3.deviation = function() { - var v = d3.variance.apply(this, arguments); - return v ? Math.sqrt(v) : v; - }; - function d3_bisector(compare) { - return { - left: function(a, x, lo, hi) { - if (arguments.length < 3) lo = 0; - if (arguments.length < 4) hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid; - } - return lo; - }, - right: function(a, x, lo, hi) { - if (arguments.length < 3) lo = 0; - if (arguments.length < 4) hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1; - } - return lo; - } - }; - } - var d3_bisect = d3_bisector(d3_ascending); - d3.bisectLeft = d3_bisect.left; - d3.bisect = d3.bisectRight = d3_bisect.right; - d3.bisector = function(f) { - return d3_bisector(f.length === 1 ? function(d, x) { - return d3_ascending(f(d), x); - } : f); - }; - d3.shuffle = function(array, i0, i1) { - if ((m = arguments.length) < 3) { - i1 = array.length; - if (m < 2) i0 = 0; - } - var m = i1 - i0, t, i; - while (m) { - i = Math.random() * m-- | 0; - t = array[m + i0], array[m + i0] = array[i + i0], array[i + i0] = t; - } - return array; - }; - d3.permute = function(array, indexes) { - var i = indexes.length, permutes = new Array(i); - while (i--) permutes[i] = array[indexes[i]]; - return permutes; - }; - d3.pairs = function(array) { - var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n); - while (i < n) pairs[i] = [ p0 = p1, p1 = array[++i] ]; - return pairs; - }; - d3.transpose = function(matrix) { - if (!(n = matrix.length)) return []; - for (var i = -1, m = d3.min(matrix, d3_transposeLength), transpose = new Array(m); ++i < m; ) { - for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n; ) { - row[j] = matrix[j][i]; - } - } - return transpose; - }; - function d3_transposeLength(d) { - return d.length; - } - d3.zip = function() { - return d3.transpose(arguments); - }; - d3.keys = function(map) { - var keys = []; - for (var key in map) keys.push(key); - return keys; - }; - d3.values = function(map) { - var values = []; - for (var key in map) values.push(map[key]); - return values; - }; - d3.entries = function(map) { - var entries = []; - for (var key in map) entries.push({ - key: key, - value: map[key] - }); - return entries; - }; - d3.merge = function(arrays) { - var n = arrays.length, m, i = -1, j = 0, merged, array; - while (++i < n) j += arrays[i].length; - merged = new Array(j); - while (--n >= 0) { - array = arrays[n]; - m = array.length; - while (--m >= 0) { - merged[--j] = array[m]; - } - } - return merged; - }; - var abs = Math.abs; - d3.range = function(start, stop, step) { - if (arguments.length < 3) { - step = 1; - if (arguments.length < 2) { - stop = start; - start = 0; - } - } - if ((stop - start) / step === Infinity) throw new Error("infinite range"); - var range = [], k = d3_range_integerScale(abs(step)), i = -1, j; - start *= k, stop *= k, step *= k; - if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k); - return range; - }; - function d3_range_integerScale(x) { - var k = 1; - while (x * k % 1) k *= 10; - return k; - } - function d3_class(ctor, properties) { - for (var key in properties) { - Object.defineProperty(ctor.prototype, key, { - value: properties[key], - enumerable: false - }); - } - } - d3.map = function(object, f) { - var map = new d3_Map(); - if (object instanceof d3_Map) { - object.forEach(function(key, value) { - map.set(key, value); - }); - } else if (Array.isArray(object)) { - var i = -1, n = object.length, o; - if (arguments.length === 1) while (++i < n) map.set(i, object[i]); else while (++i < n) map.set(f.call(object, o = object[i], i), o); - } else { - for (var key in object) map.set(key, object[key]); - } - return map; - }; - function d3_Map() { - this._ = Object.create(null); - } - var d3_map_proto = "__proto__", d3_map_zero = "\x00"; - d3_class(d3_Map, { - has: d3_map_has, - get: function(key) { - return this._[d3_map_escape(key)]; - }, - set: function(key, value) { - return this._[d3_map_escape(key)] = value; - }, - remove: d3_map_remove, - keys: d3_map_keys, - values: function() { - var values = []; - for (var key in this._) values.push(this._[key]); - return values; - }, - entries: function() { - var entries = []; - for (var key in this._) entries.push({ - key: d3_map_unescape(key), - value: this._[key] - }); - return entries; - }, - size: d3_map_size, - empty: d3_map_empty, - forEach: function(f) { - for (var key in this._) f.call(this, d3_map_unescape(key), this._[key]); - } - }); - function d3_map_escape(key) { - return (key += "") === d3_map_proto || key[0] === d3_map_zero ? d3_map_zero + key : key; - } - function d3_map_unescape(key) { - return (key += "")[0] === d3_map_zero ? key.slice(1) : key; - } - function d3_map_has(key) { - return d3_map_escape(key) in this._; - } - function d3_map_remove(key) { - return (key = d3_map_escape(key)) in this._ && delete this._[key]; - } - function d3_map_keys() { - var keys = []; - for (var key in this._) keys.push(d3_map_unescape(key)); - return keys; - } - function d3_map_size() { - var size = 0; - for (var key in this._) ++size; - return size; - } - function d3_map_empty() { - for (var key in this._) return false; - return true; + function d3_map_empty() { + for (var key in this._) return false; + return true; } d3.nest = function() { var nest = {}, keys = [], sortKeys = [], sortValues, rollup; @@ -25748,7 +22412,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); }); if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3; }(); -},{}],115:[function(require,module,exports){ +},{}],108:[function(require,module,exports){ "use strict" var ch = require("incremental-convex-hull") @@ -25908,7 +22572,7 @@ function triangulate(points, includePointAtInfinity) { return hull } -},{"incremental-convex-hull":280,"uniq":530}],116:[function(require,module,exports){ +},{"incremental-convex-hull":273,"uniq":523}],109:[function(require,module,exports){ (function (Buffer){ var hasTypedArrays = false if(typeof Float64Array !== "undefined") { @@ -26012,7 +22676,7 @@ module.exports.denormalized = function(n) { return !(hi & 0x7ff00000) } }).call(this,require("buffer").Buffer) -},{"buffer":69}],117:[function(require,module,exports){ +},{"buffer":70}],110:[function(require,module,exports){ "use strict" function dupe_array(count, value, i) { @@ -26062,7 +22726,7 @@ function dupe(count, value) { } module.exports = dupe -},{}],118:[function(require,module,exports){ +},{}],111:[function(require,module,exports){ 'use strict'; module.exports = earcut; @@ -26708,7 +23372,7 @@ earcut.flatten = function (data) { return result; }; -},{}],119:[function(require,module,exports){ +},{}],112:[function(require,module,exports){ "use strict" module.exports = edgeToAdjacency @@ -26742,7 +23406,7 @@ function edgeToAdjacency(edges, numVertices) { } return adj } -},{"uniq":530}],120:[function(require,module,exports){ +},{"uniq":523}],113:[function(require,module,exports){ (function (process,global){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. @@ -27899,7 +24563,7 @@ return Promise; }))); }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":475}],121:[function(require,module,exports){ +},{"_process":468}],114:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -28203,7 +24867,7 @@ function isUndefined(arg) { return arg === void 0; } -},{}],122:[function(require,module,exports){ +},{}],115:[function(require,module,exports){ "use strict" module.exports = extractPlanes @@ -28220,7 +24884,7 @@ function extractPlanes(M, zNear, zFar) { [ zf*M[12] - M[8], zf*M[13] - M[9], zf*M[14] - M[10], zf*M[15] - M[11] ] ] } -},{}],123:[function(require,module,exports){ +},{}],116:[function(require,module,exports){ /** * inspired by is-number * but significantly simplified and sped up by ignoring number and string constructors @@ -28277,7 +24941,7 @@ module.exports = function(n) { return n - n < 1; }; -},{}],124:[function(require,module,exports){ +},{}],117:[function(require,module,exports){ 'use strict'; module.exports = createFilter; @@ -28361,7 +25025,7 @@ function compare(a, b) { return a < b ? -1 : a > b ? 1 : 0; } -},{}],125:[function(require,module,exports){ +},{}],118:[function(require,module,exports){ 'use strict' module.exports = createFilteredVector @@ -28654,7 +25318,7 @@ function createFilteredVector(initState, initVelocity, initTime) { } } -},{"binary-search-bounds":58,"cubic-hermite":101}],126:[function(require,module,exports){ +},{"binary-search-bounds":59,"cubic-hermite":102}],119:[function(require,module,exports){ 'use strict' var SDF = require('tiny-sdf') @@ -28738,7 +25402,7 @@ function atlas(options) { return canvas } -},{"tiny-sdf":520}],127:[function(require,module,exports){ +},{"tiny-sdf":513}],120:[function(require,module,exports){ "use strict" module.exports = createRBTree @@ -29735,7 +26399,7 @@ function defaultCompare(a, b) { function createRBTree(compare) { return new RedBlackTree(compare || defaultCompare, null) } -},{}],128:[function(require,module,exports){ +},{}],121:[function(require,module,exports){ // transliterated from the python snippet here: // http://en.wikipedia.org/wiki/Lanczos_approximation @@ -29804,7 +26468,7 @@ module.exports = function gamma (z) { module.exports.log = lngamma; -},{}],129:[function(require,module,exports){ +},{}],122:[function(require,module,exports){ var wgs84 = require('wgs84'); module.exports.geometry = geometry; @@ -29870,7 +26534,7 @@ function rad(_) { return _ * Math.PI / 180; } -},{"wgs84":552}],130:[function(require,module,exports){ +},{"wgs84":545}],123:[function(require,module,exports){ var geojsonArea = require('geojson-area'); module.exports = rewind; @@ -29921,7 +26585,7 @@ function cw(_) { return geojsonArea.ring(_) >= 0; } -},{"geojson-area":129}],131:[function(require,module,exports){ +},{"geojson-area":122}],124:[function(require,module,exports){ 'use strict'; module.exports = clip; @@ -30072,7 +26736,7 @@ function newSlice(slices, slice, area, dist, outer) { return []; } -},{"./feature":133}],132:[function(require,module,exports){ +},{"./feature":126}],125:[function(require,module,exports){ 'use strict'; module.exports = convert; @@ -30195,7 +26859,7 @@ function calcSize(points) { points.dist = dist; } -},{"./feature":133,"./simplify":135}],133:[function(require,module,exports){ +},{"./feature":126,"./simplify":128}],126:[function(require,module,exports){ 'use strict'; module.exports = createFeature; @@ -30240,7 +26904,7 @@ function calcRingBBox(min, max, points) { } } -},{}],134:[function(require,module,exports){ +},{}],127:[function(require,module,exports){ 'use strict'; module.exports = geojsonvt; @@ -30484,7 +27148,7 @@ function isClippedSquare(tile, extent, buffer) { return true; } -},{"./clip":131,"./convert":132,"./tile":136,"./transform":137,"./wrap":138}],135:[function(require,module,exports){ +},{"./clip":124,"./convert":125,"./tile":129,"./transform":130,"./wrap":131}],128:[function(require,module,exports){ 'use strict'; module.exports = simplify; @@ -30560,7 +27224,7 @@ function getSqSegDist(p, a, b) { return dx * dx + dy * dy; } -},{}],136:[function(require,module,exports){ +},{}],129:[function(require,module,exports){ 'use strict'; module.exports = createTile; @@ -30668,7 +27332,7 @@ function signedArea(ring) { return sum; } -},{}],137:[function(require,module,exports){ +},{}],130:[function(require,module,exports){ 'use strict'; exports.tile = transformTile; @@ -30711,7 +27375,7 @@ function transformPoint(p, extent, z2, tx, ty) { return [x, y]; } -},{}],138:[function(require,module,exports){ +},{}],131:[function(require,module,exports){ 'use strict'; var clip = require('./clip'); @@ -30769,7 +27433,7 @@ function shiftCoords(points, offset) { return newPoints; } -},{"./clip":131,"./feature":133}],139:[function(require,module,exports){ +},{"./clip":124,"./feature":126}],132:[function(require,module,exports){ module.exports = getCanvasContext function getCanvasContext (type, opts) { if (typeof type !== 'string') { @@ -30809,7 +27473,7 @@ function getCanvasContext (type, opts) { return (gl || null) // ensure null on fail } -},{}],140:[function(require,module,exports){ +},{}],133:[function(require,module,exports){ 'use strict' module.exports = createAxes @@ -31332,7 +27996,7 @@ function createAxes(gl, options) { return axes } -},{"./lib/background.js":141,"./lib/cube.js":142,"./lib/lines.js":143,"./lib/text.js":145,"./lib/ticks.js":146}],141:[function(require,module,exports){ +},{"./lib/background.js":134,"./lib/cube.js":135,"./lib/lines.js":136,"./lib/text.js":138,"./lib/ticks.js":139}],134:[function(require,module,exports){ 'use strict' module.exports = createBackgroundCube @@ -31444,7 +28108,7 @@ function createBackgroundCube(gl) { return new BackgroundCube(gl, buffer, vao, shader) } -},{"./shaders":144,"gl-buffer":148,"gl-vao":262}],142:[function(require,module,exports){ +},{"./shaders":137,"gl-buffer":141,"gl-vao":255}],135:[function(require,module,exports){ "use strict" module.exports = getCubeEdges @@ -31685,7 +28349,7 @@ function getCubeEdges(model, view, projection, bounds) { //Return result return CUBE_RESULT } -},{"bit-twiddle":59,"gl-mat4/invert":172,"gl-mat4/multiply":174,"robust-orientation":496,"split-polygon":514}],143:[function(require,module,exports){ +},{"bit-twiddle":60,"gl-mat4/invert":165,"gl-mat4/multiply":167,"robust-orientation":489,"split-polygon":507}],136:[function(require,module,exports){ 'use strict' module.exports = createLines @@ -31891,7 +28555,7 @@ function createLines(gl, bounds, ticks) { return new Lines(gl, vertBuf, vao, shader, tickCount, tickOffset, gridCount, gridOffset) } -},{"./shaders":144,"gl-buffer":148,"gl-vao":262}],144:[function(require,module,exports){ +},{"./shaders":137,"gl-buffer":141,"gl-vao":255}],137:[function(require,module,exports){ 'use strict' @@ -31922,7 +28586,7 @@ exports.bg = function(gl) { ]) } -},{"gl-shader":246}],145:[function(require,module,exports){ +},{"gl-shader":239}],138:[function(require,module,exports){ (function (process){ "use strict" @@ -32124,7 +28788,7 @@ function createTextSprites( } }).call(this,require('_process')) -},{"./shaders":144,"_process":475,"gl-buffer":148,"gl-vao":262,"vectorize-text":541}],146:[function(require,module,exports){ +},{"./shaders":137,"_process":468,"gl-buffer":141,"gl-vao":255,"vectorize-text":534}],139:[function(require,module,exports){ 'use strict' exports.create = defaultTicks @@ -32205,7 +28869,7 @@ function ticksEqual(ticksA, ticksB) { } return true } -},{}],147:[function(require,module,exports){ +},{}],140:[function(require,module,exports){ "use strict" module.exports = axesProperties @@ -32347,7 +29011,7 @@ i_loop: return ranges } -},{"./lib/cube.js":142,"extract-frustum-planes":122,"gl-mat4/multiply":174,"gl-mat4/transpose":182,"gl-vec4/transformMat4":268,"split-polygon":514}],148:[function(require,module,exports){ +},{"./lib/cube.js":135,"extract-frustum-planes":115,"gl-mat4/multiply":167,"gl-mat4/transpose":175,"gl-vec4/transformMat4":261,"split-polygon":507}],141:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -32501,7 +29165,7 @@ function createBuffer(gl, data, type, usage) { module.exports = createBuffer -},{"ndarray":456,"ndarray-ops":450,"typedarray-pool":528}],149:[function(require,module,exports){ +},{"ndarray":449,"ndarray-ops":443,"typedarray-pool":521}],142:[function(require,module,exports){ module.exports = { 0: 'NONE', 1: 'ONE', @@ -32801,14 +29465,14 @@ module.exports = { 37444: 'BROWSER_DEFAULT_WEBGL' } -},{}],150:[function(require,module,exports){ +},{}],143:[function(require,module,exports){ var gl10 = require('./1.0/numbers') module.exports = function lookupConstant (number) { return gl10[number] } -},{"./1.0/numbers":149}],151:[function(require,module,exports){ +},{"./1.0/numbers":142}],144:[function(require,module,exports){ 'use strict' var createShader = require('gl-shader') @@ -33073,7 +29737,7 @@ function createError2D (plot, options) { return errorBars } -},{"./lib/shaders":152,"gl-buffer":148,"gl-shader":246,"typedarray-pool":528}],152:[function(require,module,exports){ +},{"./lib/shaders":145,"gl-buffer":141,"gl-shader":239,"typedarray-pool":521}],145:[function(require,module,exports){ module.exports = { @@ -33081,7 +29745,7 @@ module.exports = { fragment: "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n" } -},{}],153:[function(require,module,exports){ +},{}],146:[function(require,module,exports){ 'use strict' module.exports = createErrorBars @@ -33318,7 +29982,7 @@ function createErrorBars(options) { return result } -},{"./shaders/index":154,"gl-buffer":148,"gl-vao":262}],154:[function(require,module,exports){ +},{"./shaders/index":147,"gl-buffer":141,"gl-vao":255}],147:[function(require,module,exports){ 'use strict' @@ -33335,7 +29999,7 @@ module.exports = function(gl) { ]) } -},{"gl-shader":246}],155:[function(require,module,exports){ +},{"gl-shader":239}],148:[function(require,module,exports){ 'use strict' var createTexture = require('gl-texture2d') @@ -33802,7 +30466,7 @@ function createFBO(gl, width, height, options) { WEBGL_draw_buffers) } -},{"gl-texture2d":258}],156:[function(require,module,exports){ +},{"gl-texture2d":251}],149:[function(require,module,exports){ var sprintf = require('sprintf-js').sprintf; var glConstants = require('gl-constants/lookup'); @@ -33857,7 +30521,7 @@ function formatCompilerError(errLog, src, type) { } -},{"add-line-numbers":34,"gl-constants/lookup":150,"glsl-shader-name":270,"sprintf-js":515}],157:[function(require,module,exports){ +},{"add-line-numbers":35,"gl-constants/lookup":143,"glsl-shader-name":263,"sprintf-js":508}],150:[function(require,module,exports){ 'use strict' module.exports = createHeatmap2D @@ -34175,7 +30839,7 @@ function createHeatmap2D (plot, options) { return heatmap } -},{"./lib/shaders":158,"binary-search-bounds":159,"gl-buffer":148,"gl-shader":246,"iota-array":283,"typedarray-pool":528}],158:[function(require,module,exports){ +},{"./lib/shaders":151,"binary-search-bounds":152,"gl-buffer":141,"gl-shader":239,"iota-array":276,"typedarray-pool":521}],151:[function(require,module,exports){ 'use strict' @@ -34187,9 +30851,9 @@ module.exports = { pickVertex: "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nvoid main() {\n vWeight = weight;\n\n fragId = pickId;\n\n vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n" } -},{}],159:[function(require,module,exports){ -arguments[4][76][0].apply(exports,arguments) -},{"dup":76}],160:[function(require,module,exports){ +},{}],152:[function(require,module,exports){ +arguments[4][77][0].apply(exports,arguments) +},{"dup":77}],153:[function(require,module,exports){ exports.lineVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aHi, aLo, dHi, dLo;\n\nuniform vec2 scaleHi, translateHi, scaleLo, translateLo, screenShape;\nuniform float width;\n\nvarying vec2 direction;\n\n\nvec2 project_1_0(vec2 scHi, vec2 trHi, vec2 scLo, vec2 trLo, vec2 posHi, vec2 posLo) {\n return (posHi + trHi) * scHi\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo;\n}\n\n\nvec2 project_2_1(vec2 scHi, vec2 scLo, vec2 posHi, vec2 posLo) {\n return scHi * posHi\n + scLo * posHi\n + scHi * posLo\n + scLo * posLo;\n}\n\nvoid main() {\n vec2 p = project_1_0(scaleHi, translateHi, scaleLo, translateLo, aHi, aLo);\n vec2 dir = project_2_1(scaleHi, scaleLo, dHi, dLo);\n vec2 n = 0.5 * width * normalize(screenShape.yx * vec2(dir.y, -dir.x)) / screenShape.xy;\n vec2 tangent = normalize(screenShape.xy * dir);\n if(dir.x < 0.0 || (dir.x == 0.0 && dir.y < 0.0)) {\n direction = -tangent;\n } else {\n direction = tangent;\n }\n gl_Position = vec4(p + n, 0.0, 1.0);\n}" @@ -34200,7 +30864,7 @@ exports.pickVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute exports.pickFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 pickOffset;\n\nvarying vec4 pickA, pickB;\n\nvoid main() {\n vec4 fragId = vec4(pickA.xyz, 0.0);\n if(pickB.w > pickA.w) {\n fragId.xyz = pickB.xyz;\n }\n\n fragId += pickOffset;\n\n fragId.y += floor(fragId.x / 256.0);\n fragId.x -= floor(fragId.x / 256.0) * 256.0;\n\n fragId.z += floor(fragId.y / 256.0);\n fragId.y -= floor(fragId.y / 256.0) * 256.0;\n\n fragId.w += floor(fragId.z / 256.0);\n fragId.z -= floor(fragId.z / 256.0) * 256.0;\n\n gl_FragColor = fragId / 255.0;\n}" exports.fillVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aHi, aLo, dHi;\n\nuniform vec2 scaleHi, translateHi, scaleLo, translateLo, projectAxis;\nuniform float projectValue, depth;\n\n\nvec2 project_1_0(vec2 scHi, vec2 trHi, vec2 scLo, vec2 trLo, vec2 posHi, vec2 posLo) {\n return (posHi + trHi) * scHi\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo;\n}\n\n\nvoid main() {\n vec2 p = project_1_0(scaleHi, translateHi, scaleLo, translateLo, aHi, aLo);\n if(dHi.y < 0.0 || (dHi.y == 0.0 && dHi.x < 0.0)) {\n if(dot(p, projectAxis) < projectValue) {\n p = p * (1.0 - abs(projectAxis)) + projectAxis * projectValue;\n }\n }\n gl_Position = vec4(p, depth, 1);\n}" exports.fillFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}" -},{}],161:[function(require,module,exports){ +},{}],154:[function(require,module,exports){ 'use strict' module.exports = createLinePlot @@ -34713,7 +31377,7 @@ function createLinePlot(plot, options) { linePlot.update(options) return linePlot } -},{"./lib/shaders":160,"gl-buffer":148,"gl-shader":246,"gl-texture2d":258,"ndarray":456,"typedarray-pool":528}],162:[function(require,module,exports){ +},{"./lib/shaders":153,"gl-buffer":141,"gl-shader":239,"gl-texture2d":251,"ndarray":449,"typedarray-pool":521}],155:[function(require,module,exports){ var createShader = require('gl-shader') @@ -34737,7 +31401,7 @@ exports.createPickShader = function(gl) { return createShader(gl, vertSrc, pickFrag, null, ATTRIBUTES) } -},{"gl-shader":246}],163:[function(require,module,exports){ +},{"gl-shader":239}],156:[function(require,module,exports){ 'use strict' module.exports = createLinePlot @@ -35107,7 +31771,7 @@ function createLinePlot (options) { return linePlot } -},{"./lib/shaders":162,"binary-search-bounds":58,"gl-buffer":148,"gl-texture2d":258,"gl-vao":262,"glsl-read-float":269,"ndarray":456}],164:[function(require,module,exports){ +},{"./lib/shaders":155,"binary-search-bounds":59,"gl-buffer":141,"gl-texture2d":251,"gl-vao":255,"glsl-read-float":262,"ndarray":449}],157:[function(require,module,exports){ module.exports = invert /** @@ -35136,7 +31800,7 @@ function invert(out, a) { return out } -},{}],165:[function(require,module,exports){ +},{}],158:[function(require,module,exports){ module.exports = invert /** @@ -35175,7 +31839,7 @@ function invert(out, a) { return out } -},{}],166:[function(require,module,exports){ +},{}],159:[function(require,module,exports){ module.exports = clone; /** @@ -35204,7 +31868,7 @@ function clone(a) { out[15] = a[15]; return out; }; -},{}],167:[function(require,module,exports){ +},{}],160:[function(require,module,exports){ module.exports = create; /** @@ -35232,7 +31896,7 @@ function create() { out[15] = 1; return out; }; -},{}],168:[function(require,module,exports){ +},{}],161:[function(require,module,exports){ module.exports = determinant; /** @@ -35263,7 +31927,7 @@ function determinant(a) { // Calculate the determinant return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; }; -},{}],169:[function(require,module,exports){ +},{}],162:[function(require,module,exports){ module.exports = fromQuat; /** @@ -35311,7 +31975,7 @@ function fromQuat(out, q) { return out; }; -},{}],170:[function(require,module,exports){ +},{}],163:[function(require,module,exports){ module.exports = fromRotationTranslation; /** @@ -35365,7 +32029,7 @@ function fromRotationTranslation(out, q, v) { return out; }; -},{}],171:[function(require,module,exports){ +},{}],164:[function(require,module,exports){ module.exports = identity; /** @@ -35393,7 +32057,7 @@ function identity(out) { out[15] = 1; return out; }; -},{}],172:[function(require,module,exports){ +},{}],165:[function(require,module,exports){ module.exports = invert; /** @@ -35449,7 +32113,7 @@ function invert(out, a) { return out; }; -},{}],173:[function(require,module,exports){ +},{}],166:[function(require,module,exports){ var identity = require('./identity'); module.exports = lookAt; @@ -35540,7 +32204,7 @@ function lookAt(out, eye, center, up) { return out; }; -},{"./identity":171}],174:[function(require,module,exports){ +},{"./identity":164}],167:[function(require,module,exports){ module.exports = multiply; /** @@ -35583,7 +32247,7 @@ function multiply(out, a, b) { out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33; return out; }; -},{}],175:[function(require,module,exports){ +},{}],168:[function(require,module,exports){ module.exports = perspective; /** @@ -35617,7 +32281,7 @@ function perspective(out, fovy, aspect, near, far) { out[15] = 0; return out; }; -},{}],176:[function(require,module,exports){ +},{}],169:[function(require,module,exports){ module.exports = rotate; /** @@ -35682,7 +32346,7 @@ function rotate(out, a, rad, axis) { } return out; }; -},{}],177:[function(require,module,exports){ +},{}],170:[function(require,module,exports){ module.exports = rotateX; /** @@ -35727,7 +32391,7 @@ function rotateX(out, a, rad) { out[11] = a23 * c - a13 * s; return out; }; -},{}],178:[function(require,module,exports){ +},{}],171:[function(require,module,exports){ module.exports = rotateY; /** @@ -35772,7 +32436,7 @@ function rotateY(out, a, rad) { out[11] = a03 * s + a23 * c; return out; }; -},{}],179:[function(require,module,exports){ +},{}],172:[function(require,module,exports){ module.exports = rotateZ; /** @@ -35817,7 +32481,7 @@ function rotateZ(out, a, rad) { out[7] = a13 * c - a03 * s; return out; }; -},{}],180:[function(require,module,exports){ +},{}],173:[function(require,module,exports){ module.exports = scale; /** @@ -35849,7 +32513,7 @@ function scale(out, a, v) { out[15] = a[15]; return out; }; -},{}],181:[function(require,module,exports){ +},{}],174:[function(require,module,exports){ module.exports = translate; /** @@ -35888,7 +32552,7 @@ function translate(out, a, v) { return out; }; -},{}],182:[function(require,module,exports){ +},{}],175:[function(require,module,exports){ module.exports = transpose; /** @@ -35938,7 +32602,7 @@ function transpose(out, a) { return out; }; -},{}],183:[function(require,module,exports){ +},{}],176:[function(require,module,exports){ 'use strict' module.exports = invert @@ -35969,7 +32633,7 @@ function invert(out, M) { } return out } -},{"gl-mat2/invert":164,"gl-mat3/invert":165,"gl-mat4/invert":172}],184:[function(require,module,exports){ +},{"gl-mat2/invert":157,"gl-mat3/invert":158,"gl-mat4/invert":165}],177:[function(require,module,exports){ /** * @fileoverview gl-matrix - High performance matrix and vector operations * @author Brandon Jones @@ -36007,7 +32671,7 @@ exports.quat = require("./gl-matrix/quat.js"); exports.vec2 = require("./gl-matrix/vec2.js"); exports.vec3 = require("./gl-matrix/vec3.js"); exports.vec4 = require("./gl-matrix/vec4.js"); -},{"./gl-matrix/common.js":185,"./gl-matrix/mat2.js":186,"./gl-matrix/mat2d.js":187,"./gl-matrix/mat3.js":188,"./gl-matrix/mat4.js":189,"./gl-matrix/quat.js":190,"./gl-matrix/vec2.js":191,"./gl-matrix/vec3.js":192,"./gl-matrix/vec4.js":193}],185:[function(require,module,exports){ +},{"./gl-matrix/common.js":178,"./gl-matrix/mat2.js":179,"./gl-matrix/mat2d.js":180,"./gl-matrix/mat3.js":181,"./gl-matrix/mat4.js":182,"./gl-matrix/quat.js":183,"./gl-matrix/vec2.js":184,"./gl-matrix/vec3.js":185,"./gl-matrix/vec4.js":186}],178:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36079,7 +32743,7 @@ glMatrix.equals = function(a, b) { module.exports = glMatrix; -},{}],186:[function(require,module,exports){ +},{}],179:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36517,7 +33181,7 @@ mat2.multiplyScalarAndAdd = function(out, a, b, scale) { module.exports = mat2; -},{"./common.js":185}],187:[function(require,module,exports){ +},{"./common.js":178}],180:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36988,7 +33652,7 @@ mat2d.equals = function (a, b) { module.exports = mat2d; -},{"./common.js":185}],188:[function(require,module,exports){ +},{"./common.js":178}],181:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -37736,7 +34400,7 @@ mat3.equals = function (a, b) { module.exports = mat3; -},{"./common.js":185}],189:[function(require,module,exports){ +},{"./common.js":178}],182:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -39874,7 +36538,7 @@ mat4.equals = function (a, b) { module.exports = mat4; -},{"./common.js":185}],190:[function(require,module,exports){ +},{"./common.js":178}],183:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -40476,7 +37140,7 @@ quat.equals = vec4.equals; module.exports = quat; -},{"./common.js":185,"./mat3.js":188,"./vec3.js":192,"./vec4.js":193}],191:[function(require,module,exports){ +},{"./common.js":178,"./mat3.js":181,"./vec3.js":185,"./vec4.js":186}],184:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -41065,7 +37729,7 @@ vec2.equals = function (a, b) { module.exports = vec2; -},{"./common.js":185}],192:[function(require,module,exports){ +},{"./common.js":178}],185:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -41844,7 +38508,7 @@ vec3.equals = function (a, b) { module.exports = vec3; -},{"./common.js":185}],193:[function(require,module,exports){ +},{"./common.js":178}],186:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -42455,7 +39119,7 @@ vec4.equals = function (a, b) { module.exports = vec4; -},{"./common.js":185}],194:[function(require,module,exports){ +},{"./common.js":178}],187:[function(require,module,exports){ 'use strict' var barycentric = require('barycentric') @@ -42553,7 +39217,7 @@ function closestPointToPickLocation(simplex, pixelCoord, model, view, projection } return [closestIndex, interpolate(simplex, weights), weights] } -},{"barycentric":41,"polytope-closest-point/lib/closest_point_2d.js":474}],195:[function(require,module,exports){ +},{"barycentric":42,"polytope-closest-point/lib/closest_point_2d.js":467}],188:[function(require,module,exports){ var triVertSrc = "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec4 m_position = model * vec4(position, 1.0);\n vec4 t_position = view * m_position;\n gl_Position = projection * t_position;\n f_color = color;\n f_normal = normal;\n f_data = position;\n f_eyeDirection = eyePosition - position;\n f_lightDirection = lightPosition - position;\n f_uv = uv;\n}" @@ -42622,7 +39286,7 @@ exports.contourShader = { ] } -},{}],196:[function(require,module,exports){ +},{}],189:[function(require,module,exports){ 'use strict' var DEFAULT_VERTEX_NORMALS_EPSILON = 1e-6; // may be too large if triangles are very small @@ -43637,7 +40301,7 @@ function createSimplicialMesh(params) { module.exports = createSimplicialMesh -},{"./lib/closest-point":194,"./lib/shaders":195,"colormap":91,"gl-buffer":148,"gl-mat4/invert":172,"gl-mat4/multiply":174,"gl-shader":246,"gl-texture2d":258,"gl-vao":262,"ndarray":456,"normals":458,"simplicial-complex-contour":505,"typedarray-pool":528}],197:[function(require,module,exports){ +},{"./lib/closest-point":187,"./lib/shaders":188,"colormap":92,"gl-buffer":141,"gl-mat4/invert":165,"gl-mat4/multiply":167,"gl-shader":239,"gl-texture2d":251,"gl-vao":255,"ndarray":449,"normals":451,"simplicial-complex-contour":498,"typedarray-pool":521}],190:[function(require,module,exports){ 'use strict' module.exports = createBoxes @@ -43700,7 +40364,7 @@ function createBoxes(plot) { return new Boxes(plot, vbo, shader) } -},{"./shaders":200,"gl-buffer":148,"gl-shader":203}],198:[function(require,module,exports){ +},{"./shaders":193,"gl-buffer":141,"gl-shader":196}],191:[function(require,module,exports){ 'use strict' module.exports = createGrid @@ -43947,7 +40611,7 @@ function createGrid(plot) { return grid } -},{"./shaders":200,"binary-search-bounds":202,"gl-buffer":148,"gl-shader":203}],199:[function(require,module,exports){ +},{"./shaders":193,"binary-search-bounds":195,"gl-buffer":141,"gl-shader":196}],192:[function(require,module,exports){ 'use strict' module.exports = createLines @@ -44012,7 +40676,7 @@ function createLines(plot) { return lines } -},{"./shaders":200,"gl-buffer":148,"gl-shader":203}],200:[function(require,module,exports){ +},{"./shaders":193,"gl-buffer":141,"gl-shader":196}],193:[function(require,module,exports){ 'use strict' @@ -44030,7 +40694,7 @@ module.exports = { tickVert: "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\n\nvoid main() {\n vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\n}\n" } -},{}],201:[function(require,module,exports){ +},{}],194:[function(require,module,exports){ 'use strict' module.exports = createTextElements @@ -44308,9 +40972,9 @@ function createTextElements(plot) { return text } -},{"./shaders":200,"binary-search-bounds":202,"gl-buffer":148,"gl-shader":203,"text-cache":519}],202:[function(require,module,exports){ -arguments[4][76][0].apply(exports,arguments) -},{"dup":76}],203:[function(require,module,exports){ +},{"./shaders":193,"binary-search-bounds":195,"gl-buffer":141,"gl-shader":196,"text-cache":512}],195:[function(require,module,exports){ +arguments[4][77][0].apply(exports,arguments) +},{"dup":77}],196:[function(require,module,exports){ 'use strict' var createUniformWrapper = require('./lib/create-uniforms') @@ -44576,7 +41240,7 @@ function createShader( module.exports = createShader -},{"./lib/GLError":204,"./lib/create-attributes":205,"./lib/create-uniforms":206,"./lib/reflect":207,"./lib/runtime-reflect":208,"./lib/shader-cache":209}],204:[function(require,module,exports){ +},{"./lib/GLError":197,"./lib/create-attributes":198,"./lib/create-uniforms":199,"./lib/reflect":200,"./lib/runtime-reflect":201,"./lib/shader-cache":202}],197:[function(require,module,exports){ function GLError (rawError, shortMessage, longMessage) { this.shortMessage = shortMessage || '' this.longMessage = longMessage || '' @@ -44591,7 +41255,7 @@ GLError.prototype.name = 'GLError' GLError.prototype.constructor = GLError module.exports = GLError -},{}],205:[function(require,module,exports){ +},{}],198:[function(require,module,exports){ 'use strict' module.exports = createAttributeWrapper @@ -44856,7 +41520,7 @@ function createAttributeWrapper( return obj } -},{"./GLError":204}],206:[function(require,module,exports){ +},{"./GLError":197}],199:[function(require,module,exports){ 'use strict' var coallesceUniforms = require('./reflect') @@ -45049,7 +41713,7 @@ function createUniformWrapper(gl, wrapper, uniforms, locations) { } } -},{"./GLError":204,"./reflect":207}],207:[function(require,module,exports){ +},{"./GLError":197,"./reflect":200}],200:[function(require,module,exports){ 'use strict' module.exports = makeReflectTypes @@ -45107,7 +41771,7 @@ function makeReflectTypes(uniforms, useIndex) { } return obj } -},{}],208:[function(require,module,exports){ +},{}],201:[function(require,module,exports){ 'use strict' exports.uniforms = runtimeUniforms @@ -45187,7 +41851,7 @@ function runtimeAttributes(gl, program) { return result } -},{}],209:[function(require,module,exports){ +},{}],202:[function(require,module,exports){ 'use strict' exports.shader = getShaderReference @@ -45325,7 +41989,7 @@ function createProgram(gl, vref, fref, attribs, locations) { return getCache(gl).getProgram(vref, fref, attribs, locations) } -},{"./GLError":204,"gl-format-compiler-error":156,"weakmap-shim":549}],210:[function(require,module,exports){ +},{"./GLError":197,"gl-format-compiler-error":149,"weakmap-shim":542}],203:[function(require,module,exports){ 'use strict' module.exports = createGLPlot2D @@ -45906,7 +42570,7 @@ function createGLPlot2D(options) { return plot } -},{"./lib/box":197,"./lib/grid":198,"./lib/line":199,"./lib/text":201,"gl-select-static":245}],211:[function(require,module,exports){ +},{"./lib/box":190,"./lib/grid":191,"./lib/line":192,"./lib/text":194,"gl-select-static":238}],204:[function(require,module,exports){ var createShader = require('gl-shader') @@ -45917,7 +42581,7 @@ module.exports = function(gl) { return createShader(gl, vertSrc, fragSrc, null, [ { name: 'position', type: 'vec2'}]) } -},{"gl-shader":246}],212:[function(require,module,exports){ +},{"gl-shader":239}],205:[function(require,module,exports){ 'use strict' module.exports = createScene @@ -46682,7 +43346,7 @@ function createScene(options) { return scene } -},{"./lib/shader":211,"3d-view-controls":30,"a-big-triangle":33,"gl-axes3d":140,"gl-axes3d/properties":147,"gl-fbo":155,"gl-mat4/perspective":175,"gl-select-static":245,"gl-spikes3d":255,"is-mobile":285,"mouse-change":441}],213:[function(require,module,exports){ +},{"./lib/shader":204,"3d-view-controls":32,"a-big-triangle":34,"gl-axes3d":133,"gl-axes3d/properties":140,"gl-fbo":148,"gl-mat4/perspective":168,"gl-select-static":238,"gl-spikes3d":248,"is-mobile":278,"mouse-change":434}],206:[function(require,module,exports){ exports.pointVertex = "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform float pointCloud;\n\nhighp float rand(vec2 co) {\n highp float a = 12.9898;\n highp float b = 78.233;\n highp float c = 43758.5453;\n highp float d = dot(co.xy, vec2(a, b));\n highp float e = mod(d, 3.14);\n return fract(sin(e) * c);\n}\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n // if we don't jitter the point size a bit, overall point cloud\n // saturation 'jumps' on zooming, which is disturbing and confusing\n gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);\n if(pointCloud != 0.0) { // pointCloud is truthy\n // get the same square surface as circle would be\n gl_PointSize *= 0.886;\n }\n}" @@ -46690,21 +43354,21 @@ exports.pointFragment = "precision mediump float;\n#define GLSLIFY 1\n\nunif exports.pickVertex = "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n" exports.pickFragment = "precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n" -},{}],214:[function(require,module,exports){ -arguments[4][203][0].apply(exports,arguments) -},{"./lib/GLError":215,"./lib/create-attributes":216,"./lib/create-uniforms":217,"./lib/reflect":218,"./lib/runtime-reflect":219,"./lib/shader-cache":220,"dup":203}],215:[function(require,module,exports){ -arguments[4][204][0].apply(exports,arguments) -},{"dup":204}],216:[function(require,module,exports){ -arguments[4][205][0].apply(exports,arguments) -},{"./GLError":215,"dup":205}],217:[function(require,module,exports){ -arguments[4][206][0].apply(exports,arguments) -},{"./GLError":215,"./reflect":218,"dup":206}],218:[function(require,module,exports){ -arguments[4][207][0].apply(exports,arguments) -},{"dup":207}],219:[function(require,module,exports){ -arguments[4][208][0].apply(exports,arguments) -},{"dup":208}],220:[function(require,module,exports){ -arguments[4][209][0].apply(exports,arguments) -},{"./GLError":215,"dup":209,"gl-format-compiler-error":156,"weakmap-shim":549}],221:[function(require,module,exports){ +},{}],207:[function(require,module,exports){ +arguments[4][196][0].apply(exports,arguments) +},{"./lib/GLError":208,"./lib/create-attributes":209,"./lib/create-uniforms":210,"./lib/reflect":211,"./lib/runtime-reflect":212,"./lib/shader-cache":213,"dup":196}],208:[function(require,module,exports){ +arguments[4][197][0].apply(exports,arguments) +},{"dup":197}],209:[function(require,module,exports){ +arguments[4][198][0].apply(exports,arguments) +},{"./GLError":208,"dup":198}],210:[function(require,module,exports){ +arguments[4][199][0].apply(exports,arguments) +},{"./GLError":208,"./reflect":211,"dup":199}],211:[function(require,module,exports){ +arguments[4][200][0].apply(exports,arguments) +},{"dup":200}],212:[function(require,module,exports){ +arguments[4][201][0].apply(exports,arguments) +},{"dup":201}],213:[function(require,module,exports){ +arguments[4][202][0].apply(exports,arguments) +},{"./GLError":208,"dup":202,"gl-format-compiler-error":149,"weakmap-shim":542}],214:[function(require,module,exports){ 'use strict' var createShader = require('gl-shader') @@ -46924,7 +43588,7 @@ function createPointcloud2D(plot, options) { return result } -},{"./lib/shader":213,"gl-buffer":148,"gl-shader":214,"typedarray-pool":528}],222:[function(require,module,exports){ +},{"./lib/shader":206,"gl-buffer":141,"gl-shader":207,"typedarray-pool":521}],215:[function(require,module,exports){ module.exports = slerp /** @@ -46977,7 +43641,7 @@ function slerp (out, a, b, t) { return out } -},{}],223:[function(require,module,exports){ +},{}],216:[function(require,module,exports){ 'use strict' @@ -46989,23 +43653,23 @@ module.exports = { pickFragment: "precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n gl_FragColor = fragColor;\n}\n" } -},{}],224:[function(require,module,exports){ -arguments[4][76][0].apply(exports,arguments) -},{"dup":76}],225:[function(require,module,exports){ -arguments[4][203][0].apply(exports,arguments) -},{"./lib/GLError":226,"./lib/create-attributes":227,"./lib/create-uniforms":228,"./lib/reflect":229,"./lib/runtime-reflect":230,"./lib/shader-cache":231,"dup":203}],226:[function(require,module,exports){ -arguments[4][204][0].apply(exports,arguments) -},{"dup":204}],227:[function(require,module,exports){ -arguments[4][205][0].apply(exports,arguments) -},{"./GLError":226,"dup":205}],228:[function(require,module,exports){ -arguments[4][206][0].apply(exports,arguments) -},{"./GLError":226,"./reflect":229,"dup":206}],229:[function(require,module,exports){ -arguments[4][207][0].apply(exports,arguments) -},{"dup":207}],230:[function(require,module,exports){ -arguments[4][208][0].apply(exports,arguments) -},{"dup":208}],231:[function(require,module,exports){ -arguments[4][209][0].apply(exports,arguments) -},{"./GLError":226,"dup":209,"gl-format-compiler-error":156,"weakmap-shim":549}],232:[function(require,module,exports){ +},{}],217:[function(require,module,exports){ +arguments[4][77][0].apply(exports,arguments) +},{"dup":77}],218:[function(require,module,exports){ +arguments[4][196][0].apply(exports,arguments) +},{"./lib/GLError":219,"./lib/create-attributes":220,"./lib/create-uniforms":221,"./lib/reflect":222,"./lib/runtime-reflect":223,"./lib/shader-cache":224,"dup":196}],219:[function(require,module,exports){ +arguments[4][197][0].apply(exports,arguments) +},{"dup":197}],220:[function(require,module,exports){ +arguments[4][198][0].apply(exports,arguments) +},{"./GLError":219,"dup":198}],221:[function(require,module,exports){ +arguments[4][199][0].apply(exports,arguments) +},{"./GLError":219,"./reflect":222,"dup":199}],222:[function(require,module,exports){ +arguments[4][200][0].apply(exports,arguments) +},{"dup":200}],223:[function(require,module,exports){ +arguments[4][201][0].apply(exports,arguments) +},{"dup":201}],224:[function(require,module,exports){ +arguments[4][202][0].apply(exports,arguments) +},{"./GLError":219,"dup":202,"gl-format-compiler-error":149,"weakmap-shim":542}],225:[function(require,module,exports){ 'use strict' module.exports = sortLevels @@ -47303,7 +43967,7 @@ function quickSort(left, right, data_levels, data_points, data_ids, data_weights } } -},{}],233:[function(require,module,exports){ +},{}],226:[function(require,module,exports){ 'use strict' var pool = require('typedarray-pool') @@ -47443,7 +44107,7 @@ function snapPoints(points, ids, weights, bounds) { return lod } -},{"./lib/sort":232,"typedarray-pool":528}],234:[function(require,module,exports){ +},{"./lib/sort":225,"typedarray-pool":521}],227:[function(require,module,exports){ 'use strict' module.exports = createFancyScatter2D @@ -47881,20 +44545,20 @@ function createFancyScatter2D(plot, options) { return scatter } -},{"./lib/shaders":223,"binary-search-bounds":224,"clamp":80,"color-id":84,"font-atlas-sdf":126,"gl-buffer":148,"gl-shader":225,"gl-texture2d":258,"ndarray":456,"snap-points-2d":233,"typedarray-pool":528}],235:[function(require,module,exports){ +},{"./lib/shaders":216,"binary-search-bounds":217,"clamp":81,"color-id":85,"font-atlas-sdf":119,"gl-buffer":141,"gl-shader":218,"gl-texture2d":251,"ndarray":449,"snap-points-2d":226,"typedarray-pool":521}],228:[function(require,module,exports){ exports.pointVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 positionHi, positionLo;\nattribute float weight;\n\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform float pointSize, useWeight;\n\nvarying float fragWeight;\n\n\nvec4 pfx_1_0(vec2 scaleHi, vec2 scaleLo, vec2 translateHi, vec2 translateLo, vec2 positionHi, vec2 positionLo) {\n return vec4((positionHi + translateHi) * scaleHi\n + (positionLo + translateLo) * scaleHi\n + (positionHi + translateHi) * scaleLo\n + (positionLo + translateLo) * scaleLo, 0.0, 1.0);\n}\n\nvoid main() {\n gl_Position = pfx_1_0(scaleHi, scaleLo, translateHi, translateLo, positionHi, positionLo);\n gl_PointSize = pointSize;\n fragWeight = mix(1.0, weight, useWeight);\n}" exports.pointFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color, borderColor;\nuniform float centerFraction;\n\nvarying float fragWeight;\n\nfloat smoothStep(float x, float y) {\n return 1.0 / (1.0 + exp(50.0*(x - y)));\n}\n\nvoid main() {\n float radius = length(2.0*gl_PointCoord.xy-1.0);\n if(radius > 1.0) {\n discard;\n }\n vec4 baseColor = mix(borderColor, color, smoothStep(radius, centerFraction));\n float alpha = 1.0 - pow(1.0 - baseColor.a, fragWeight);\n gl_FragColor = vec4(baseColor.rgb * alpha, alpha);\n}" exports.pickVertex = "precision highp float;\n#define GLSLIFY 1\n\nvec4 pfx_1_0(vec2 scaleHi, vec2 scaleLo, vec2 translateHi, vec2 translateLo, vec2 positionHi, vec2 positionLo) {\n return vec4((positionHi + translateHi) * scaleHi\n + (positionLo + translateLo) * scaleHi\n + (positionHi + translateHi) * scaleLo\n + (positionLo + translateLo) * scaleLo, 0.0, 1.0);\n}\n\nattribute vec2 positionHi, positionLo;\nattribute vec4 pickId;\n\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n gl_Position = pfx_1_0(scaleHi, scaleLo, translateHi, translateLo, positionHi, positionLo);\n gl_PointSize = pointSize;\n fragId = id;\n}" exports.pickFragment = "precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}" -},{}],236:[function(require,module,exports){ -arguments[4][76][0].apply(exports,arguments) -},{"dup":76}],237:[function(require,module,exports){ -arguments[4][232][0].apply(exports,arguments) -},{"dup":232}],238:[function(require,module,exports){ -arguments[4][233][0].apply(exports,arguments) -},{"./lib/sort":237,"dup":233,"typedarray-pool":528}],239:[function(require,module,exports){ +},{}],229:[function(require,module,exports){ +arguments[4][77][0].apply(exports,arguments) +},{"dup":77}],230:[function(require,module,exports){ +arguments[4][225][0].apply(exports,arguments) +},{"dup":225}],231:[function(require,module,exports){ +arguments[4][226][0].apply(exports,arguments) +},{"./lib/sort":230,"dup":226,"typedarray-pool":521}],232:[function(require,module,exports){ 'use strict' var createShader = require('gl-shader') @@ -48131,7 +44795,7 @@ function createScatter2D(plot, options) { return result } -},{"./lib/shader":235,"binary-search-bounds":236,"gl-buffer":148,"gl-shader":246,"snap-points-2d":238,"typedarray-pool":528}],240:[function(require,module,exports){ +},{"./lib/shader":228,"binary-search-bounds":229,"gl-buffer":141,"gl-shader":239,"snap-points-2d":231,"typedarray-pool":521}],233:[function(require,module,exports){ "use strict" var vectorizeText = require("vectorize-text") @@ -48177,7 +44841,7 @@ function getGlyph(symbol, font) { //Save cached symbol return fontCache[symbol] = [triSymbol, lineSymbol, bounds] } -},{"vectorize-text":541}],241:[function(require,module,exports){ +},{"vectorize-text":534}],234:[function(require,module,exports){ var createShaderWrapper = require('gl-shader') @@ -48254,7 +44918,7 @@ exports.createPickProject = function(gl) { return createShader(gl, pickProject) } -},{"gl-shader":246}],242:[function(require,module,exports){ +},{"gl-shader":239}],235:[function(require,module,exports){ 'use strict' var createBuffer = require('gl-buffer') @@ -49014,7 +45678,7 @@ function createPointCloud(options) { return pointCloud } -},{"./lib/glyphs":240,"./lib/shaders":241,"gl-buffer":148,"gl-mat4/multiply":174,"gl-vao":262,"typedarray-pool":528}],243:[function(require,module,exports){ +},{"./lib/glyphs":233,"./lib/shaders":234,"gl-buffer":141,"gl-mat4/multiply":167,"gl-vao":255,"typedarray-pool":521}],236:[function(require,module,exports){ 'use strict' @@ -49022,7 +45686,7 @@ function createPointCloud(options) { exports.boxVertex = "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 vertex;\n\nuniform vec2 cornerA, cornerB;\n\nvoid main() {\n gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);\n}\n" exports.boxFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = color;\n}\n" -},{}],244:[function(require,module,exports){ +},{}],237:[function(require,module,exports){ 'use strict' var createShader = require('gl-shader') @@ -49148,7 +45812,7 @@ function createSelectBox(plot, options) { return selectBox } -},{"./lib/shaders":243,"gl-buffer":148,"gl-shader":246}],245:[function(require,module,exports){ +},{"./lib/shaders":236,"gl-buffer":141,"gl-shader":239}],238:[function(require,module,exports){ 'use strict' module.exports = createSelectBuffer @@ -49159,7 +45823,7 @@ var ndarray = require('ndarray') var nextPow2 = require('bit-twiddle').nextPow2 -var selectRange = require('cwise/lib/wrapper')({"args":["array",{"offset":[0,0,1],"array":0},{"offset":[0,0,2],"array":0},{"offset":[0,0,3],"array":0},"scalar","scalar","index"],"pre":{"body":"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}","args":[],"thisVars":["this_closestD2","this_closestX","this_closestY"],"localVars":[]},"body":{"body":"{if(_inline_31_arg0_<255||_inline_31_arg1_<255||_inline_31_arg2_<255||_inline_31_arg3_<255){var _inline_31_l=_inline_31_arg4_-_inline_31_arg6_[0],_inline_31_a=_inline_31_arg5_-_inline_31_arg6_[1],_inline_31_f=_inline_31_l*_inline_31_l+_inline_31_a*_inline_31_a;_inline_31_f>=' @@ -52975,7 +49639,7 @@ module.exports = [ , '}' ] -},{}],277:[function(require,module,exports){ +},{}],270:[function(require,module,exports){ var tokenize = require('./index') module.exports = tokenizeString @@ -52990,7 +49654,7 @@ function tokenizeString(str, opt) { return tokens } -},{"./index":271}],278:[function(require,module,exports){ +},{"./index":264}],271:[function(require,module,exports){ 'use strict'; module.exports = GridIndex; @@ -53152,7 +49816,7 @@ GridIndex.prototype.toArrayBuffer = function() { return array.buffer; }; -},{}],279:[function(require,module,exports){ +},{}],272:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -53238,7 +49902,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],280:[function(require,module,exports){ +},{}],273:[function(require,module,exports){ "use strict" //High level idea: @@ -53685,7 +50349,7 @@ function incrementalConvexHull(points, randomSearch) { //Extract boundary cells return triangles.boundary() } -},{"robust-orientation":496,"simplicial-complex":507}],281:[function(require,module,exports){ +},{"robust-orientation":489,"simplicial-complex":500}],274:[function(require,module,exports){ "use strict" var bounds = require("binary-search-bounds") @@ -54052,7 +50716,7 @@ function createWrapper(intervals) { return new IntervalTree(createIntervalTree(intervals)) } -},{"binary-search-bounds":58}],282:[function(require,module,exports){ +},{"binary-search-bounds":59}],275:[function(require,module,exports){ "use strict" function invertPermutation(pi, result) { @@ -54064,7 +50728,7 @@ function invertPermutation(pi, result) { } module.exports = invertPermutation -},{}],283:[function(require,module,exports){ +},{}],276:[function(require,module,exports){ "use strict" function iota(n) { @@ -54076,7 +50740,7 @@ function iota(n) { } module.exports = iota -},{}],284:[function(require,module,exports){ +},{}],277:[function(require,module,exports){ /*! * Determine if an object is a Buffer * @@ -54099,7 +50763,7 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],285:[function(require,module,exports){ +},{}],278:[function(require,module,exports){ module.exports = isMobile; function isMobile (ua) { @@ -54113,7 +50777,7 @@ function isMobile (ua) { } -},{}],286:[function(require,module,exports){ +},{}],279:[function(require,module,exports){ 'use strict'; var toString = Object.prototype.toString; @@ -54122,7 +50786,7 @@ module.exports = function (x) { return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({})); }; -},{}],287:[function(require,module,exports){ +},{}],280:[function(require,module,exports){ 'use strict'; var sort = require('./sort'); @@ -54168,7 +50832,7 @@ KDBush.prototype = { function defaultGetX(p) { return p[0]; } function defaultGetY(p) { return p[1]; } -},{"./range":288,"./sort":289,"./within":290}],288:[function(require,module,exports){ +},{"./range":281,"./sort":282,"./within":283}],281:[function(require,module,exports){ 'use strict'; module.exports = range; @@ -54216,7 +50880,7 @@ function range(ids, coords, minX, minY, maxX, maxY, nodeSize) { return result; } -},{}],289:[function(require,module,exports){ +},{}],282:[function(require,module,exports){ 'use strict'; module.exports = sortKD; @@ -54284,7 +50948,7 @@ function swap(arr, i, j) { arr[j] = tmp; } -},{}],290:[function(require,module,exports){ +},{}],283:[function(require,module,exports){ 'use strict'; module.exports = within; @@ -54336,7 +51000,7 @@ function sqDist(ax, ay, bx, by) { return dx * dx + dy * dy; } -},{}],291:[function(require,module,exports){ +},{}],284:[function(require,module,exports){ 'use strict'; function createFunction(parameters, defaultType) { @@ -54509,7 +51173,7 @@ module.exports['piecewise-constant'] = function(parameters) { return createFunction(parameters, 'interval'); }; -},{}],292:[function(require,module,exports){ +},{}],285:[function(require,module,exports){ var path = require('path'); @@ -54571,7 +51235,7 @@ module.exports = { module.exports.util = "float evaluate_zoom_function_1(const vec4 values, const float t) {\n if (t < 1.0) {\n return mix(values[0], values[1], t);\n } else if (t < 2.0) {\n return mix(values[1], values[2], t - 1.0);\n } else {\n return mix(values[2], values[3], t - 2.0);\n }\n}\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\n if (t < 1.0) {\n return mix(value0, value1, t);\n } else if (t < 2.0) {\n return mix(value1, value2, t - 1.0);\n } else {\n return mix(value2, value3, t - 2.0);\n }\n}\n"; -},{"path":464}],293:[function(require,module,exports){ +},{"path":457}],286:[function(require,module,exports){ 'use strict'; var format = require('util').format; @@ -54589,7 +51253,7 @@ function ValidationError(key, value /*, message, ...*/) { module.exports = ValidationError; -},{"util":536}],294:[function(require,module,exports){ +},{"util":529}],287:[function(require,module,exports){ 'use strict'; module.exports = function (output) { @@ -54602,7 +51266,7 @@ module.exports = function (output) { return output; }; -},{}],295:[function(require,module,exports){ +},{}],288:[function(require,module,exports){ 'use strict'; module.exports = function getType(val) { @@ -54621,7 +51285,7 @@ module.exports = function getType(val) { } }; -},{}],296:[function(require,module,exports){ +},{}],289:[function(require,module,exports){ 'use strict'; // Turn jsonlint-lines-primitives objects into primitive objects @@ -54633,7 +51297,7 @@ module.exports = function unbundle(value) { } }; -},{}],297:[function(require,module,exports){ +},{}],290:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -54700,7 +51364,7 @@ module.exports = function validate(options) { } }; -},{"../error/validation_error":293,"../util/extend":294,"../util/get_type":295,"./validate_array":298,"./validate_boolean":299,"./validate_color":300,"./validate_constants":301,"./validate_enum":302,"./validate_filter":303,"./validate_function":304,"./validate_layer":306,"./validate_number":308,"./validate_object":309,"./validate_source":311,"./validate_string":312}],298:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/extend":287,"../util/get_type":288,"./validate_array":291,"./validate_boolean":292,"./validate_color":293,"./validate_constants":294,"./validate_enum":295,"./validate_filter":296,"./validate_function":297,"./validate_layer":299,"./validate_number":301,"./validate_object":302,"./validate_source":304,"./validate_string":305}],291:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -54754,7 +51418,7 @@ module.exports = function validateArray(options) { return errors; }; -},{"../error/validation_error":293,"../util/get_type":295,"./validate":297}],299:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288,"./validate":290}],292:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -54772,7 +51436,7 @@ module.exports = function validateBoolean(options) { return []; }; -},{"../error/validation_error":293,"../util/get_type":295}],300:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288}],293:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -54795,7 +51459,7 @@ module.exports = function validateColor(options) { return []; }; -},{"../error/validation_error":293,"../util/get_type":295,"csscolorparser":100}],301:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288,"csscolorparser":101}],294:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -54829,7 +51493,7 @@ module.exports = function validateConstants(options) { }; -},{"../error/validation_error":293,"../util/get_type":295}],302:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288}],295:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -54847,7 +51511,7 @@ module.exports = function validateEnum(options) { return errors; }; -},{"../error/validation_error":293,"../util/unbundle_jsonlint":296}],303:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/unbundle_jsonlint":289}],296:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -54952,7 +51616,7 @@ module.exports = function validateFilter(options) { return errors; }; -},{"../error/validation_error":293,"../util/get_type":295,"../util/unbundle_jsonlint":296,"./validate_enum":302}],304:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288,"../util/unbundle_jsonlint":289,"./validate_enum":295}],297:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -55086,7 +51750,7 @@ module.exports = function validateFunction(options) { }; -},{"../error/validation_error":293,"../util/get_type":295,"./validate":297,"./validate_array":298,"./validate_number":308,"./validate_object":309}],305:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288,"./validate":290,"./validate_array":291,"./validate_number":301,"./validate_object":302}],298:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -55110,7 +51774,7 @@ module.exports = function(options) { return errors; }; -},{"../error/validation_error":293,"./validate_string":312}],306:[function(require,module,exports){ +},{"../error/validation_error":286,"./validate_string":305}],299:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -55223,7 +51887,7 @@ module.exports = function validateLayer(options) { return errors; }; -},{"../error/validation_error":293,"../util/extend":294,"../util/unbundle_jsonlint":296,"./validate_filter":303,"./validate_layout_property":307,"./validate_object":309,"./validate_paint_property":310}],307:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/extend":287,"../util/unbundle_jsonlint":289,"./validate_filter":296,"./validate_layout_property":300,"./validate_object":302,"./validate_paint_property":303}],300:[function(require,module,exports){ 'use strict'; var validate = require('./validate'); @@ -55262,7 +51926,7 @@ module.exports = function validateLayoutProperty(options) { }; -},{"../error/validation_error":293,"./validate":297}],308:[function(require,module,exports){ +},{"../error/validation_error":286,"./validate":290}],301:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -55289,7 +51953,7 @@ module.exports = function validateNumber(options) { return []; }; -},{"../error/validation_error":293,"../util/get_type":295}],309:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288}],302:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -55342,7 +52006,7 @@ module.exports = function validateObject(options) { return errors; }; -},{"../error/validation_error":293,"../util/get_type":295,"./validate":297}],310:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288,"./validate":290}],303:[function(require,module,exports){ 'use strict'; var validate = require('./validate'); @@ -55382,7 +52046,7 @@ module.exports = function validatePaintProperty(options) { }; -},{"../error/validation_error":293,"./validate":297}],311:[function(require,module,exports){ +},{"../error/validation_error":286,"./validate":290}],304:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -55459,7 +52123,7 @@ module.exports = function validateSource(options) { } }; -},{"../error/validation_error":293,"../util/unbundle_jsonlint":296,"./validate_enum":302,"./validate_object":309}],312:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/unbundle_jsonlint":289,"./validate_enum":295,"./validate_object":302}],305:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -55477,7 +52141,7 @@ module.exports = function validateString(options) { return []; }; -},{"../error/validation_error":293,"../util/get_type":295}],313:[function(require,module,exports){ +},{"../error/validation_error":286,"../util/get_type":288}],306:[function(require,module,exports){ 'use strict'; var validateConstants = require('./validate/validate_constants'); @@ -55547,12 +52211,12 @@ function wrapCleanErrors(inner) { module.exports = validateStyleMin; -},{"../reference/latest.min":314,"./validate/validate":297,"./validate/validate_constants":301,"./validate/validate_filter":303,"./validate/validate_glyphs_url":305,"./validate/validate_layer":306,"./validate/validate_layout_property":307,"./validate/validate_paint_property":310,"./validate/validate_source":311}],314:[function(require,module,exports){ +},{"../reference/latest.min":307,"./validate/validate":290,"./validate/validate_constants":294,"./validate/validate_filter":296,"./validate/validate_glyphs_url":298,"./validate/validate_layer":299,"./validate/validate_layout_property":300,"./validate/validate_paint_property":303,"./validate/validate_source":304}],307:[function(require,module,exports){ module.exports = require('./v8.min.json'); -},{"./v8.min.json":315}],315:[function(require,module,exports){ +},{"./v8.min.json":308}],308:[function(require,module,exports){ module.exports={"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_tile","source_geojson","source_video","source_image"],"source_tile":{"type":{"required":true,"type":"enum","values":["vector","raster"]},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":["geojson"]},"data":{"type":"*"},"maxzoom":{"type":"number","default":14},"buffer":{"type":"number","default":64},"tolerance":{"type":"number","default":3},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":400},"clusterMaxZoom":{"type":"number"}},"source_video":{"type":{"required":true,"type":"enum","values":["video"]},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":["image"]},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":["fill","line","symbol","circle","raster","background"]},"metadata":{"type":"*"},"ref":{"type":"string"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":22},"maxzoom":{"type":"number","minimum":0,"maximum":22},"interactive":{"type":"boolean","default":false},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"},"paint.*":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],"layout_background":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_fill":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_circle":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_line":{"line-cap":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["butt","round","square"],"default":"butt"},"line-join":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["bevel","round","miter"],"default":"miter"},"line-miter-limit":{"type":"number","default":2,"function":"interpolated","zoom-function":true,"property-function":true,"requires":[{"line-join":"miter"}]},"line-round-limit":{"type":"number","default":1.05,"function":"interpolated","zoom-function":true,"property-function":true,"requires":[{"line-join":"round"}]},"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_symbol":{"symbol-placement":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["point","line"],"default":"point"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"function":"interpolated","zoom-function":true,"property-function":true,"units":"pixels","requires":[{"symbol-placement":"line"}]},"symbol-avoid-edges":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false},"icon-allow-overlap":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image"]},"icon-ignore-placement":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image"]},"icon-optional":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image","text-field"]},"icon-rotation-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"viewport","requires":["icon-image"]},"icon-size":{"type":"number","default":1,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image"]},"icon-text-fit":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":false,"values":["none","both","width","height"],"default":"none","requires":["icon-image","text-field"]},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image","icon-text-fit","text-field"]},"icon-image":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"tokens":true},"icon-rotate":{"type":"number","default":0,"period":360,"function":"interpolated","zoom-function":true,"property-function":true,"units":"degrees","requires":["icon-image"]},"icon-padding":{"type":"number","default":2,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"units":"pixels","requires":["icon-image"]},"icon-keep-upright":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image"]},"text-pitch-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"requires":["text-field"]},"text-rotation-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"viewport","requires":["text-field"]},"text-field":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":"","tokens":true},"text-font":{"type":"array","value":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"]},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-line-height":{"type":"number","default":1.2,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-letter-spacing":{"type":"number","default":0,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-justify":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["left","center","right"],"default":"center","requires":["text-field"]},"text-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],"default":"center","requires":["text-field"]},"text-max-angle":{"type":"number","default":45,"units":"degrees","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field",{"symbol-placement":"line"}]},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-keep-upright":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["none","uppercase","lowercase"],"default":"none","requires":["text-field"]},"text-offset":{"type":"array","value":"number","units":"ems","function":"interpolated","zoom-function":true,"property-function":true,"length":2,"default":[0,0],"requires":["text-field"]},"text-allow-overlap":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field"]},"text-ignore-placement":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field"]},"text-optional":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field","icon-image"]},"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_raster":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"filter":{"type":"array","value":"*"},"filter_operator":{"type":"enum","values":["==","!=",">",">=","<","<=","in","!in","all","any","none","has","!has"]},"geometry_type":{"type":"enum","values":["Point","LineString","Polygon"]},"color_operation":{"type":"enum","values":["lighten","saturate","spin","fade","mix"]},"function":{"stops":{"type":"array","required":true,"value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":["exponential","interval","categorical"],"default":"exponential"}},"function_stop":{"type":"array","minimum":0,"maximum":22,"value":["number","color"],"length":2},"paint":["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],"paint_fill":{"fill-antialias":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":true},"fill-opacity":{"type":"number","function":"interpolated","zoom-function":true,"property-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"fill-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"fill-pattern"}]},"fill-outline-color":{"type":"color","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}]},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"fill-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["fill-translate"]},"fill-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"transition":true}},"paint_line":{"line-opacity":{"type":"number","function":"interpolated","zoom-function":true,"property-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"line-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"line-pattern"}]},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["line-translate"]},"line-width":{"type":"number","default":1,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-gap-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-offset":{"type":"number","default":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-dasharray":{"type":"array","value":"number","function":"piecewise-constant","zoom-function":true,"property-function":true,"minimum":0,"transition":true,"units":"line widths","requires":[{"!":"line-pattern"}]},"line-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"transition":true}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"circle-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-blur":{"type":"number","default":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"circle-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["circle-translate"]},"circle-pitch-scale":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-halo-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["icon-image","icon-translate"]},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-halo-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-halo-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["text-field","text-translate"]}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-hue-rotate":{"type":"number","default":0,"period":360,"function":"interpolated","zoom-function":true,"transition":true,"units":"degrees"},"raster-brightness-min":{"type":"number","function":"interpolated","zoom-function":true,"default":0,"minimum":0,"maximum":1,"transition":true},"raster-brightness-max":{"type":"number","function":"interpolated","zoom-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"function":"interpolated","zoom-function":true,"transition":true,"units":"milliseconds"}},"paint_background":{"background-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"transition":true,"requires":[{"!":"background-pattern"}]},"background-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"transition":true},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}}} -},{}],316:[function(require,module,exports){ +},{}],309:[function(require,module,exports){ 'use strict'; if (typeof module !== 'undefined' && module.exports) { @@ -55683,7 +52347,7 @@ function isWebGLSupported(failIfMajorPerformanceCaveat) { } } -},{}],317:[function(require,module,exports){ +},{}],310:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -55779,7 +52443,7 @@ ArrayGroup.prototype.getTransferables = function(transferables) { } }; -},{"../util/util":431}],318:[function(require,module,exports){ +},{"../util/util":424}],311:[function(require,module,exports){ 'use strict'; var featureFilter = require('feature-filter'); @@ -56297,7 +52961,7 @@ function createGetUniform(attribute, stopOffset) { }; } -},{"../util/struct_array":429,"../util/util":431,"./array_group":317,"./bucket/circle_bucket":319,"./bucket/fill_bucket":320,"./bucket/line_bucket":321,"./bucket/symbol_bucket":322,"./buffer_group":324,"assert":39,"feature-filter":124}],319:[function(require,module,exports){ +},{"../util/struct_array":422,"../util/util":424,"./array_group":310,"./bucket/circle_bucket":312,"./bucket/fill_bucket":313,"./bucket/line_bucket":314,"./bucket/symbol_bucket":315,"./buffer_group":317,"assert":40,"feature-filter":117}],312:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -56419,7 +53083,7 @@ CircleBucket.prototype.addFeature = function(feature) { this.populatePaintArrays('circle', globalProperties, feature.properties, startGroup, startIndex); }; -},{"../../util/util":431,"../bucket":318,"../load_geometry":326}],320:[function(require,module,exports){ +},{"../../util/util":424,"../bucket":311,"../load_geometry":319}],313:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -56530,7 +53194,7 @@ FillBucket.prototype.addPolygon = function(polygon) { } }; -},{"../../util/classify_rings":419,"../../util/util":431,"../bucket":318,"../load_geometry":326,"earcut":118}],321:[function(require,module,exports){ +},{"../../util/classify_rings":412,"../../util/util":424,"../bucket":311,"../load_geometry":319,"earcut":111}],314:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -56957,7 +53621,7 @@ LineBucket.prototype.addPieSliceVertex = function(currentVertex, distance, extru } }; -},{"../../util/util":431,"../bucket":318,"../load_geometry":326}],322:[function(require,module,exports){ +},{"../../util/util":424,"../bucket":311,"../load_geometry":319}],315:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -57603,7 +54267,7 @@ SymbolBucket.prototype.addSymbolQuad = function(symbolQuad) { symbolQuad.minScale); }; -},{"../../symbol/anchor":380,"../../symbol/clip_line":382,"../../symbol/collision_feature":384,"../../symbol/get_anchors":386,"../../symbol/mergelines":389,"../../symbol/quads":390,"../../symbol/resolve_text":391,"../../symbol/shaping":392,"../../util/token":430,"../../util/util":431,"../bucket":318,"../load_geometry":326,"point-geometry":472}],323:[function(require,module,exports){ +},{"../../symbol/anchor":373,"../../symbol/clip_line":375,"../../symbol/collision_feature":377,"../../symbol/get_anchors":379,"../../symbol/mergelines":382,"../../symbol/quads":383,"../../symbol/resolve_text":384,"../../symbol/shaping":385,"../../util/token":423,"../../util/util":424,"../bucket":311,"../load_geometry":319,"point-geometry":465}],316:[function(require,module,exports){ 'use strict'; module.exports = Buffer; @@ -57704,7 +54368,7 @@ Buffer.BufferType = { ELEMENT: 'ELEMENT_ARRAY_BUFFER' }; -},{}],324:[function(require,module,exports){ +},{}],317:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -57759,7 +54423,7 @@ BufferGroup.prototype.destroy = function(gl) { } }; -},{"../render/vertex_array_object":346,"../util/util":431,"./buffer":323}],325:[function(require,module,exports){ +},{"../render/vertex_array_object":339,"../util/util":424,"./buffer":316}],318:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -58058,7 +54722,7 @@ function offsetLine(rings, offset) { return newRings; } -},{"../util/dictionary_coder":421,"../util/intersection_tests":426,"../util/struct_array":429,"../util/util":431,"../util/vectortile_to_geojson":432,"./bucket":318,"./load_geometry":326,"feature-filter":124,"grid-index":278,"pbf":466,"point-geometry":472,"vector-tile":537}],326:[function(require,module,exports){ +},{"../util/dictionary_coder":414,"../util/intersection_tests":419,"../util/struct_array":422,"../util/util":424,"../util/vectortile_to_geojson":425,"./bucket":311,"./load_geometry":319,"feature-filter":117,"grid-index":271,"pbf":459,"point-geometry":465,"vector-tile":530}],319:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58114,7 +54778,7 @@ module.exports = function loadGeometry(feature, bits) { return geometry; }; -},{"../util/util":431,"./bucket":318,"assert":39}],327:[function(require,module,exports){ +},{"../util/util":424,"./bucket":311,"assert":40}],320:[function(require,module,exports){ 'use strict'; module.exports = Coordinate; @@ -58193,7 +54857,7 @@ Coordinate.prototype = { } }; -},{}],328:[function(require,module,exports){ +},{}],321:[function(require,module,exports){ 'use strict'; module.exports = LngLat; @@ -58285,7 +54949,7 @@ LngLat.convert = function (input) { return input; }; -},{"../util/util":431}],329:[function(require,module,exports){ +},{"../util/util":424}],322:[function(require,module,exports){ 'use strict'; module.exports = LngLatBounds; @@ -58477,7 +55141,7 @@ LngLatBounds.convert = function (input) { return new LngLatBounds(input); }; -},{"./lng_lat":328}],330:[function(require,module,exports){ +},{"./lng_lat":321}],323:[function(require,module,exports){ 'use strict'; var LngLat = require('./lng_lat'), @@ -58951,7 +55615,7 @@ Transform.prototype = { } }; -},{"../data/bucket":318,"../source/tile_coord":358,"../util/interpolate":425,"../util/util":431,"./coordinate":327,"./lng_lat":328,"gl-matrix":184,"point-geometry":472}],331:[function(require,module,exports){ +},{"../data/bucket":311,"../source/tile_coord":351,"../util/interpolate":418,"../util/util":424,"./coordinate":320,"./lng_lat":321,"gl-matrix":177,"point-geometry":465}],324:[function(require,module,exports){ 'use strict'; // Font data From Hershey Simplex Font @@ -59084,7 +55748,7 @@ module.exports = function textVertices(text, left, baseline, scale) { return strokes; }; -},{}],332:[function(require,module,exports){ +},{}],325:[function(require,module,exports){ 'use strict'; // jshint -W079 @@ -59151,7 +55815,7 @@ Object.defineProperty(mapboxgl, 'accessToken', { * mapboxgl.supported() // = true */ -},{"../package.json":433,"./geo/lng_lat":328,"./geo/lng_lat_bounds":329,"./style/style":367,"./ui/control/attribution":398,"./ui/control/control":399,"./ui/control/geolocate":400,"./ui/control/navigation":401,"./ui/map":410,"./ui/marker":411,"./ui/popup":412,"./util/ajax":414,"./util/browser":415,"./util/config":420,"./util/evented":423,"./util/util":431,"point-geometry":472}],333:[function(require,module,exports){ +},{"../package.json":426,"./geo/lng_lat":321,"./geo/lng_lat_bounds":322,"./style/style":360,"./ui/control/attribution":391,"./ui/control/control":392,"./ui/control/geolocate":393,"./ui/control/navigation":394,"./ui/map":403,"./ui/marker":404,"./ui/popup":405,"./util/ajax":407,"./util/browser":408,"./util/config":413,"./util/evented":416,"./util/util":424,"point-geometry":465}],326:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -59171,7 +55835,7 @@ module.exports = function(uniforms) { return pragmas; }; -},{"assert":39}],334:[function(require,module,exports){ +},{"assert":40}],327:[function(require,module,exports){ 'use strict'; var pixelsToTileUnits = require('../source/pixels_to_tile_units'); @@ -59264,7 +55928,7 @@ function drawBackground(painter, source, layer) { gl.stencilFunc(gl.EQUAL, 0x80, 0x80); } -},{"../source/pixels_to_tile_units":352,"./create_uniform_pragmas":333}],335:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":345,"./create_uniform_pragmas":326}],328:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -59329,7 +55993,7 @@ function drawCircles(painter, source, layer, coords) { } } -},{"../util/browser":415}],336:[function(require,module,exports){ +},{"../util/browser":408}],329:[function(require,module,exports){ 'use strict'; module.exports = drawCollisionDebug; @@ -59364,7 +56028,7 @@ function drawCollisionDebug(painter, source, layer, coords) { } } -},{}],337:[function(require,module,exports){ +},{}],330:[function(require,module,exports){ 'use strict'; var textVertices = require('../lib/debugtext'); @@ -59425,7 +56089,7 @@ function drawDebugTile(painter, source, coord) { gl.drawArrays(gl.LINES, 0, debugTextBuffer.length); } -},{"../data/bucket":318,"../data/buffer":323,"../lib/debugtext":331,"../util/browser":415,"./vertex_array_object":346,"gl-matrix":184}],338:[function(require,module,exports){ +},{"../data/bucket":311,"../data/buffer":316,"../lib/debugtext":324,"../util/browser":408,"./vertex_array_object":339,"gl-matrix":177}],331:[function(require,module,exports){ 'use strict'; var pixelsToTileUnits = require('../source/pixels_to_tile_units'); @@ -59622,7 +56286,7 @@ function setPattern(image, opacity, tile, coord, painter, program) { painter.spriteAtlas.bind(gl, true); } -},{"../source/pixels_to_tile_units":352}],339:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":345}],332:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -59787,7 +56451,7 @@ module.exports = function drawLine(painter, source, layer, coords) { }; -},{"../source/pixels_to_tile_units":352,"../util/browser":415,"gl-matrix":184}],340:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":345,"../util/browser":408,"gl-matrix":177}],333:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -59933,7 +56597,7 @@ function getOpacities(tile, parentTile, layer, transform) { return opacity; } -},{"../util/struct_array":429,"../util/util":431}],341:[function(require,module,exports){ +},{"../util/struct_array":422,"../util/util":424}],334:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -60149,7 +56813,7 @@ function drawSymbol(painter, layer, posMatrix, tile, bucket, bufferGroups, isTex } } -},{"../source/pixels_to_tile_units":352,"../util/browser":415,"./draw_collision_debug":336}],342:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":345,"../util/browser":408,"./draw_collision_debug":329}],335:[function(require,module,exports){ 'use strict'; module.exports = FrameHistory; @@ -60221,7 +56885,7 @@ FrameHistory.prototype.bind = function(gl) { } }; -},{}],343:[function(require,module,exports){ +},{}],336:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -60368,7 +57032,7 @@ LineAtlas.prototype.bind = function(gl) { } }; -},{"../util/util":431}],344:[function(require,module,exports){ +},{"../util/util":424}],337:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -60712,7 +57376,7 @@ Painter.prototype.showOverdrawInspector = function(enabled) { } }; -},{"../data/bucket":318,"../data/buffer":323,"../source/pixels_to_tile_units":352,"../source/source_cache":356,"../util/browser":415,"../util/struct_array":429,"../util/util":431,"./create_uniform_pragmas":333,"./draw_background":334,"./draw_circle":335,"./draw_debug":337,"./draw_fill":338,"./draw_line":339,"./draw_raster":340,"./draw_symbol":341,"./frame_history":342,"./painter/use_program":345,"./vertex_array_object":346,"gl-matrix":184}],345:[function(require,module,exports){ +},{"../data/bucket":311,"../data/buffer":316,"../source/pixels_to_tile_units":345,"../source/source_cache":349,"../util/browser":408,"../util/struct_array":422,"../util/util":424,"./create_uniform_pragmas":326,"./draw_background":327,"./draw_circle":328,"./draw_debug":330,"./draw_fill":331,"./draw_line":332,"./draw_raster":333,"./draw_symbol":334,"./frame_history":335,"./painter/use_program":338,"./vertex_array_object":339,"gl-matrix":177}],338:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -60809,7 +57473,7 @@ function applyPragmas(source, pragmas) { }); } -},{"../../util/util":431,"assert":39,"mapbox-gl-shaders":292}],346:[function(require,module,exports){ +},{"../../util/util":424,"assert":40,"mapbox-gl-shaders":285}],339:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -60907,7 +57571,7 @@ VertexArrayObject.prototype.destroy = function(gl) { } }; -},{"assert":39}],347:[function(require,module,exports){ +},{"assert":40}],340:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -61131,7 +57795,7 @@ GeoJSONSource.prototype = util.inherit(Evented, /** @lends GeoJSONSource.prototy } }); -},{"../data/bucket":318,"../util/evented":423,"../util/util":431,"resolve-url":489}],348:[function(require,module,exports){ +},{"../data/bucket":311,"../util/evented":416,"../util/util":424,"resolve-url":482}],341:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -61269,7 +57933,7 @@ GeoJSONWorkerSource.prototype = util.inherit(VectorTileWorkerSource, /** @lends } }); -},{"../util/ajax":414,"../util/util":431,"./geojson_wrapper":349,"./vector_tile_worker_source":360,"geojson-rewind":130,"geojson-vt":134,"supercluster":516,"vt-pbf":543}],349:[function(require,module,exports){ +},{"../util/ajax":407,"../util/util":424,"./geojson_wrapper":342,"./vector_tile_worker_source":353,"geojson-rewind":123,"geojson-vt":127,"supercluster":509,"vt-pbf":536}],342:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -61345,7 +58009,7 @@ FeatureWrapper.prototype.bbox = function() { FeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON; -},{"../data/bucket":318,"point-geometry":472,"vector-tile":537}],350:[function(require,module,exports){ +},{"../data/bucket":311,"point-geometry":465,"vector-tile":530}],343:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -61524,7 +58188,7 @@ ImageSource.prototype = util.inherit(Evented, /** @lends ImageSource.prototype * } }); -},{"../data/bucket":318,"../data/buffer":323,"../geo/lng_lat":328,"../render/draw_raster":340,"../render/vertex_array_object":346,"../util/ajax":414,"../util/evented":423,"../util/util":431,"./tile_coord":358,"point-geometry":472}],351:[function(require,module,exports){ +},{"../data/bucket":311,"../data/buffer":316,"../geo/lng_lat":321,"../render/draw_raster":333,"../render/vertex_array_object":339,"../util/ajax":407,"../util/evented":416,"../util/util":424,"./tile_coord":351,"point-geometry":465}],344:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); var ajax = require('../util/ajax'); @@ -61555,7 +58219,7 @@ module.exports = function(options, callback) { }; -},{"../util/ajax":414,"../util/browser":415,"../util/mapbox":428,"../util/util":431}],352:[function(require,module,exports){ +},{"../util/ajax":407,"../util/browser":408,"../util/mapbox":421,"../util/util":424}],345:[function(require,module,exports){ 'use strict'; var Bucket = require('../data/bucket'); @@ -61580,7 +58244,7 @@ module.exports = function(tile, pixelValue, z) { }; -},{"../data/bucket":318}],353:[function(require,module,exports){ +},{"../data/bucket":311}],346:[function(require,module,exports){ 'use strict'; var TileCoord = require('./tile_coord'); @@ -61651,7 +58315,7 @@ function mergeRenderedFeatureLayers(tiles) { } -},{"./tile_coord":358}],354:[function(require,module,exports){ +},{"./tile_coord":351}],347:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -61748,7 +58412,7 @@ RasterTileSource.prototype = util.inherit(Evented, { } }); -},{"../util/ajax":414,"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./load_tilejson":351}],355:[function(require,module,exports){ +},{"../util/ajax":407,"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./load_tilejson":344}],348:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -61919,7 +58583,7 @@ exports.setType = function (name, type) { * @instance */ -},{"../source/geojson_source":347,"../source/image_source":350,"../source/raster_tile_source":354,"../source/vector_tile_source":359,"../source/video_source":361,"../util/util":431}],356:[function(require,module,exports){ +},{"../source/geojson_source":340,"../source/image_source":343,"../source/raster_tile_source":347,"../source/vector_tile_source":352,"../source/video_source":354,"../util/util":424}],349:[function(require,module,exports){ 'use strict'; var Source = require('./source'); @@ -62457,7 +59121,7 @@ function compareKeyZoom(a, b) { return (a % 32) - (b % 32); } -},{"../data/bucket":318,"../geo/coordinate":327,"../util/evented":423,"../util/lru_cache":427,"../util/util":431,"./source":355,"./tile":357,"./tile_coord":358}],357:[function(require,module,exports){ +},{"../data/bucket":311,"../geo/coordinate":320,"../util/evented":416,"../util/lru_cache":420,"../util/util":424,"./source":348,"./tile":350,"./tile_coord":351}],350:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -62659,7 +59323,7 @@ function unserializeBuckets(input, style) { return output; } -},{"../data/bucket":318,"../data/feature_index":325,"../symbol/collision_box":383,"../symbol/collision_tile":385,"../symbol/symbol_instances":394,"../symbol/symbol_quads":395,"../util/util":431,"../util/vectortile_to_geojson":432,"feature-filter":124,"pbf":466,"vector-tile":537}],358:[function(require,module,exports){ +},{"../data/bucket":311,"../data/feature_index":318,"../symbol/collision_box":376,"../symbol/collision_tile":378,"../symbol/symbol_instances":387,"../symbol/symbol_quads":388,"../util/util":424,"../util/vectortile_to_geojson":425,"feature-filter":117,"pbf":459,"vector-tile":530}],351:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -62853,7 +59517,7 @@ TileCoord.cover = function(z, bounds, actualZ) { }); }; -},{"../geo/coordinate":327,"assert":39,"whoots-js":553}],359:[function(require,module,exports){ +},{"../geo/coordinate":320,"assert":40,"whoots-js":546}],352:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -62960,7 +59624,7 @@ VectorTileSource.prototype = util.inherit(Evented, { } }); -},{"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./load_tilejson":351}],360:[function(require,module,exports){ +},{"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./load_tilejson":344}],353:[function(require,module,exports){ 'use strict'; var ajax = require('../util/ajax'); var vt = require('vector-tile'); @@ -63108,7 +59772,7 @@ VectorTileWorkerSource.prototype = { } }; -},{"../util/ajax":414,"./worker_tile":363,"pbf":466,"vector-tile":537}],361:[function(require,module,exports){ +},{"../util/ajax":407,"./worker_tile":356,"pbf":459,"vector-tile":530}],354:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -63312,7 +59976,7 @@ VideoSource.prototype = util.inherit(Evented, /** @lends VideoSource.prototype * } }); -},{"../data/bucket":318,"../data/buffer":323,"../geo/lng_lat":328,"../render/draw_raster":340,"../render/vertex_array_object":346,"../util/ajax":414,"../util/evented":423,"../util/util":431,"./tile_coord":358,"point-geometry":472}],362:[function(require,module,exports){ +},{"../data/bucket":311,"../data/buffer":316,"../geo/lng_lat":321,"../render/draw_raster":333,"../render/vertex_array_object":339,"../util/ajax":407,"../util/evented":416,"../util/util":424,"./tile_coord":351,"point-geometry":465}],355:[function(require,module,exports){ 'use strict'; var Actor = require('../util/actor'); @@ -63476,7 +60140,7 @@ function createLayerFamilies(layers) { return families; } -},{"../style/style_layer":370,"../util/actor":413,"../util/util":431,"./geojson_worker_source":348,"./vector_tile_worker_source":360}],363:[function(require,module,exports){ +},{"../style/style_layer":363,"../util/actor":406,"../util/util":424,"./geojson_worker_source":341,"./vector_tile_worker_source":353}],356:[function(require,module,exports){ 'use strict'; var FeatureIndex = require('../data/feature_index'); @@ -63749,7 +60413,7 @@ function getLayerId(layer) { return layer.id; } -},{"../data/bucket":318,"../data/feature_index":325,"../symbol/collision_box":383,"../symbol/collision_tile":385,"../symbol/symbol_instances":394,"../symbol/symbol_quads":395,"../util/dictionary_coder":421,"../util/util":431}],364:[function(require,module,exports){ +},{"../data/bucket":311,"../data/feature_index":318,"../symbol/collision_box":376,"../symbol/collision_tile":378,"../symbol/symbol_instances":387,"../symbol/symbol_quads":388,"../util/dictionary_coder":414,"../util/util":424}],357:[function(require,module,exports){ 'use strict'; module.exports = AnimationLoop; @@ -63781,7 +60445,7 @@ AnimationLoop.prototype.cancel = function(n) { }); }; -},{}],365:[function(require,module,exports){ +},{}],358:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -63862,7 +60526,7 @@ ImageSprite.prototype.getSpritePosition = function(name) { return new SpritePosition(); }; -},{"../util/ajax":414,"../util/browser":415,"../util/evented":423,"../util/mapbox":428}],366:[function(require,module,exports){ +},{"../util/ajax":407,"../util/browser":408,"../util/evented":416,"../util/mapbox":421}],359:[function(require,module,exports){ 'use strict'; var parseColorString = require('csscolorparser').parseCSSColor; @@ -63904,7 +60568,7 @@ module.exports = function parseColor(input) { } }; -},{"../util/util":431,"./style_function":369,"csscolorparser":100}],367:[function(require,module,exports){ +},{"../util/util":424,"./style_function":362,"csscolorparser":101}],360:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -64685,7 +61349,7 @@ Style.prototype = util.inherit(Evented, { }); -},{"../render/line_atlas":343,"../source/query_features":353,"../source/source":355,"../source/source_cache":356,"../symbol/glyph_source":388,"../symbol/sprite_atlas":393,"../util/ajax":414,"../util/browser":415,"../util/dispatcher":422,"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./animation_loop":364,"./image_sprite":365,"./style_function":369,"./style_layer":370,"./style_spec":377,"./validate_style":379}],368:[function(require,module,exports){ +},{"../render/line_atlas":336,"../source/query_features":346,"../source/source":348,"../source/source_cache":349,"../symbol/glyph_source":381,"../symbol/sprite_atlas":386,"../util/ajax":407,"../util/browser":408,"../util/dispatcher":415,"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./animation_loop":357,"./image_sprite":358,"./style_function":362,"./style_layer":363,"./style_spec":370,"./validate_style":372}],361:[function(require,module,exports){ 'use strict'; var MapboxGLFunction = require('./style_function'); @@ -64769,7 +61433,7 @@ function transitioned(calculate) { }; } -},{"../util/util":431,"./parse_color":366,"./style_function":369}],369:[function(require,module,exports){ +},{"../util/util":424,"./parse_color":359,"./style_function":362}],362:[function(require,module,exports){ 'use strict'; var MapboxGLFunction = require('mapbox-gl-function'); @@ -64796,7 +61460,7 @@ exports['piecewise-constant'] = function(parameters) { exports.isFunctionDefinition = MapboxGLFunction.isFunctionDefinition; -},{"mapbox-gl-function":291}],370:[function(require,module,exports){ +},{"mapbox-gl-function":284}],363:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -65143,7 +61807,7 @@ function getDeclarationValue(declaration) { return declaration.value; } -},{"../util/evented":423,"../util/util":431,"./parse_color":366,"./style_declaration":368,"./style_layer/background_style_layer":371,"./style_layer/circle_style_layer":372,"./style_layer/fill_style_layer":373,"./style_layer/line_style_layer":374,"./style_layer/raster_style_layer":375,"./style_layer/symbol_style_layer":376,"./style_spec":377,"./style_transition":378,"./validate_style":379}],371:[function(require,module,exports){ +},{"../util/evented":416,"../util/util":424,"./parse_color":359,"./style_declaration":361,"./style_layer/background_style_layer":364,"./style_layer/circle_style_layer":365,"./style_layer/fill_style_layer":366,"./style_layer/line_style_layer":367,"./style_layer/raster_style_layer":368,"./style_layer/symbol_style_layer":369,"./style_spec":370,"./style_transition":371,"./validate_style":372}],364:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65157,7 +61821,7 @@ module.exports = BackgroundStyleLayer; BackgroundStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":431,"../style_layer":370}],372:[function(require,module,exports){ +},{"../../util/util":424,"../style_layer":363}],365:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65171,7 +61835,7 @@ module.exports = CircleStyleLayer; CircleStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":431,"../style_layer":370}],373:[function(require,module,exports){ +},{"../../util/util":424,"../style_layer":363}],366:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65227,7 +61891,7 @@ FillStyleLayer.prototype = util.inherit(StyleLayer, { module.exports = FillStyleLayer; -},{"../../util/util":431,"../style_layer":370}],374:[function(require,module,exports){ +},{"../../util/util":424,"../style_layer":363}],367:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65261,7 +61925,7 @@ LineStyleLayer.prototype = util.inherit(StyleLayer, { } }); -},{"../../util/util":431,"../style_layer":370}],375:[function(require,module,exports){ +},{"../../util/util":424,"../style_layer":363}],368:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65275,7 +61939,7 @@ module.exports = RasterStyleLayer; RasterStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":431,"../style_layer":370}],376:[function(require,module,exports){ +},{"../../util/util":424,"../style_layer":363}],369:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65318,12 +61982,12 @@ SymbolStyleLayer.prototype = util.inherit(StyleLayer, { }); -},{"../../util/util":431,"../style_layer":370}],377:[function(require,module,exports){ +},{"../../util/util":424,"../style_layer":363}],370:[function(require,module,exports){ 'use strict'; module.exports = require('mapbox-gl-style-spec/reference/latest.min'); -},{"mapbox-gl-style-spec/reference/latest.min":314}],378:[function(require,module,exports){ +},{"mapbox-gl-style-spec/reference/latest.min":307}],371:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -65408,7 +62072,7 @@ function interpZoomTransitioned(from, to, t) { } } -},{"../util/interpolate":425,"../util/util":431}],379:[function(require,module,exports){ +},{"../util/interpolate":418,"../util/util":424}],372:[function(require,module,exports){ 'use strict'; module.exports = require('mapbox-gl-style-spec/lib/validate_style.min'); @@ -65432,7 +62096,7 @@ module.exports.throwErrors = function throwErrors(emitter, errors) { } }; -},{"mapbox-gl-style-spec/lib/validate_style.min":313}],380:[function(require,module,exports){ +},{"mapbox-gl-style-spec/lib/validate_style.min":306}],373:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -65455,7 +62119,7 @@ Anchor.prototype.clone = function() { return new Anchor(this.x, this.y, this.angle, this.segment); }; -},{"point-geometry":472}],381:[function(require,module,exports){ +},{"point-geometry":465}],374:[function(require,module,exports){ 'use strict'; module.exports = checkMaxAngle; @@ -65535,7 +62199,7 @@ function checkMaxAngle(line, anchor, labelLength, windowSize, maxAngle) { return true; } -},{}],382:[function(require,module,exports){ +},{}],375:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -65609,7 +62273,7 @@ function clipLine(lines, x1, y1, x2, y2) { return clippedLines; } -},{"point-geometry":472}],383:[function(require,module,exports){ +},{"point-geometry":465}],376:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -65690,7 +62354,7 @@ util.extendAll(CollisionBoxArray.prototype.StructType.prototype, { } }); -},{"../util/struct_array":429,"../util/util":431,"point-geometry":472}],384:[function(require,module,exports){ +},{"../util/struct_array":422,"../util/util":424,"point-geometry":465}],377:[function(require,module,exports){ 'use strict'; module.exports = CollisionFeature; @@ -65824,7 +62488,7 @@ CollisionFeature.prototype._addLineCollisionBoxes = function(collisionBoxArray, return bboxes; }; -},{}],385:[function(require,module,exports){ +},{}],378:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -66125,7 +62789,7 @@ CollisionTile.prototype.insertCollisionFeature = function(collisionFeature, minP } }; -},{"../data/bucket":318,"grid-index":278,"point-geometry":472}],386:[function(require,module,exports){ +},{"../data/bucket":311,"grid-index":271,"point-geometry":465}],379:[function(require,module,exports){ 'use strict'; var interpolate = require('../util/interpolate'); @@ -66229,7 +62893,7 @@ function resample(line, offset, spacing, angleWindowSize, maxAngle, labelLength, return anchors; } -},{"../symbol/anchor":380,"../util/interpolate":425,"./check_max_angle":381}],387:[function(require,module,exports){ +},{"../symbol/anchor":373,"../util/interpolate":418,"./check_max_angle":374}],380:[function(require,module,exports){ 'use strict'; var ShelfPack = require('shelf-pack'); @@ -66398,7 +63062,7 @@ GlyphAtlas.prototype.updateTexture = function(gl) { } }; -},{"../util/util":431,"shelf-pack":502}],388:[function(require,module,exports){ +},{"../util/util":424,"shelf-pack":495}],381:[function(require,module,exports){ 'use strict'; var normalizeURL = require('../util/mapbox').normalizeGlyphsURL; @@ -66539,7 +63203,7 @@ function glyphUrl(fontstack, range, url, subdomains) { .replace('{range}', range); } -},{"../symbol/glyph_atlas":387,"../util/ajax":414,"../util/glyphs":424,"../util/mapbox":428,"pbf":466}],389:[function(require,module,exports){ +},{"../symbol/glyph_atlas":380,"../util/ajax":407,"../util/glyphs":417,"../util/mapbox":421,"pbf":459}],382:[function(require,module,exports){ 'use strict'; module.exports = function (features, textFeatures, geometries) { @@ -66630,7 +63294,7 @@ module.exports = function (features, textFeatures, geometries) { }; }; -},{}],390:[function(require,module,exports){ +},{}],383:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -66913,7 +63577,7 @@ function getSegmentGlyphs(glyphs, anchor, offset, line, segment, forward) { return placementScale; } -},{"point-geometry":472}],391:[function(require,module,exports){ +},{"point-geometry":465}],384:[function(require,module,exports){ 'use strict'; var resolveTokens = require('../util/token'); @@ -66956,7 +63620,7 @@ function resolveText(features, layoutProperties, codepoints) { return textFeatures; } -},{"../util/token":430}],392:[function(require,module,exports){ +},{"../util/token":423}],385:[function(require,module,exports){ 'use strict'; module.exports = { @@ -67137,7 +63801,7 @@ function PositionedIcon(image, top, bottom, left, right) { this.right = right; } -},{}],393:[function(require,module,exports){ +},{}],386:[function(require,module,exports){ 'use strict'; var ShelfPack = require('shelf-pack'); @@ -67370,7 +64034,7 @@ function AtlasImage(rect, width, height, sdf, pixelRatio) { this.pixelRatio = pixelRatio; } -},{"../util/browser":415,"../util/util":431,"shelf-pack":502}],394:[function(require,module,exports){ +},{"../util/browser":408,"../util/util":424,"shelf-pack":495}],387:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -67415,7 +64079,7 @@ util.extendAll(SymbolInstancesArray.prototype.StructType.prototype, { -},{"../util/struct_array":429,"../util/util":431,"point-geometry":472}],395:[function(require,module,exports){ +},{"../util/struct_array":422,"../util/util":424,"point-geometry":465}],388:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -67489,7 +64153,7 @@ util.extendAll(SymbolQuadsArray.prototype.StructType.prototype, { }); -},{"../util/struct_array":429,"../util/util":431,"./quads":390,"point-geometry":472}],396:[function(require,module,exports){ +},{"../util/struct_array":422,"../util/util":424,"./quads":383,"point-geometry":465}],389:[function(require,module,exports){ 'use strict'; var DOM = require('../util/dom'); @@ -67664,7 +64328,7 @@ module.exports = function bindHandlers(map, options) { * property. */ -},{"../util/dom":417,"./handler/box_zoom":402,"./handler/dblclick_zoom":403,"./handler/drag_pan":404,"./handler/drag_rotate":405,"./handler/keyboard":406,"./handler/scroll_zoom":407,"./handler/touch_zoom_rotate":408,"point-geometry":472}],397:[function(require,module,exports){ +},{"../util/dom":410,"./handler/box_zoom":395,"./handler/dblclick_zoom":396,"./handler/drag_pan":397,"./handler/drag_rotate":398,"./handler/keyboard":399,"./handler/scroll_zoom":400,"./handler/touch_zoom_rotate":401,"point-geometry":465}],390:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -68451,7 +65115,7 @@ util.extend(Camera.prototype, /** @lends Map.prototype */{ * @property {MapEventData} data */ -},{"../geo/lng_lat":328,"../geo/lng_lat_bounds":329,"../util/browser":415,"../util/interpolate":425,"../util/util":431,"point-geometry":472}],398:[function(require,module,exports){ +},{"../geo/lng_lat":321,"../geo/lng_lat_bounds":322,"../util/browser":408,"../util/interpolate":418,"../util/util":424,"point-geometry":465}],391:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -68534,7 +65198,7 @@ Attribution.prototype = util.inherit(Control, { } }); -},{"../../util/dom":417,"../../util/util":431,"./control":399}],399:[function(require,module,exports){ +},{"../../util/dom":410,"../../util/util":424,"./control":392}],392:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -68589,7 +65253,7 @@ Control.prototype = { util.extend(Control.prototype, Evented); -},{"../../util/evented":423,"../../util/util":431}],400:[function(require,module,exports){ +},{"../../util/evented":416,"../../util/util":424}],393:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -68691,7 +65355,7 @@ Geolocate.prototype = util.inherit(Control, { * */ -},{"../../util/browser":415,"../../util/dom":417,"../../util/util":431,"./control":399}],401:[function(require,module,exports){ +},{"../../util/browser":408,"../../util/dom":410,"../../util/util":424,"./control":392}],394:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -68812,7 +65476,7 @@ function copyMouseEvent(e) { }); } -},{"../../util/dom":417,"../../util/util":431,"./control":399}],402:[function(require,module,exports){ +},{"../../util/dom":410,"../../util/util":424,"./control":392}],395:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -68999,7 +65663,7 @@ BoxZoomHandler.prototype = { * @property {MapBoxZoomEvent} data */ -},{"../../geo/lng_lat_bounds":329,"../../util/dom":417,"../../util/util":431}],403:[function(require,module,exports){ +},{"../../geo/lng_lat_bounds":322,"../../util/dom":410,"../../util/util":424}],396:[function(require,module,exports){ 'use strict'; module.exports = DoubleClickZoomHandler; @@ -69062,7 +65726,7 @@ DoubleClickZoomHandler.prototype = { } }; -},{}],404:[function(require,module,exports){ +},{}],397:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -69298,7 +65962,7 @@ DragPanHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/dom":417,"../../util/util":431}],405:[function(require,module,exports){ +},{"../../util/dom":410,"../../util/util":424}],398:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -69552,7 +66216,7 @@ DragRotateHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/dom":417,"../../util/util":431,"point-geometry":472}],406:[function(require,module,exports){ +},{"../../util/dom":410,"../../util/util":424,"point-geometry":465}],399:[function(require,module,exports){ 'use strict'; module.exports = KeyboardHandler; @@ -69684,7 +66348,7 @@ KeyboardHandler.prototype = { } }; -},{}],407:[function(require,module,exports){ +},{}],400:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -69867,7 +66531,7 @@ ScrollZoomHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/browser":415,"../../util/dom":417,"../../util/util":431}],408:[function(require,module,exports){ +},{"../../util/browser":408,"../../util/dom":410,"../../util/util":424}],401:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -70082,7 +66746,7 @@ TouchZoomRotateHandler.prototype = { } }; -},{"../../util/dom":417,"../../util/util":431}],409:[function(require,module,exports){ +},{"../../util/dom":410,"../../util/util":424}],402:[function(require,module,exports){ 'use strict'; /* @@ -70157,7 +66821,7 @@ Hash.prototype = { } }; -},{"../util/util":431}],410:[function(require,module,exports){ +},{"../util/util":424}],403:[function(require,module,exports){ 'use strict'; var Canvas = require('../util/canvas'); @@ -71597,7 +68261,7 @@ function removeNode(node) { * @property {{error: {message: string}}} data */ -},{"../geo/lng_lat":328,"../geo/lng_lat_bounds":329,"../geo/transform":330,"../render/painter":344,"../style/animation_loop":364,"../style/style":367,"../util/browser":415,"../util/canvas":416,"../util/dom":417,"../util/evented":423,"../util/util":431,"./bind_handlers":396,"./camera":397,"./control/attribution":398,"./hash":409,"point-geometry":472}],411:[function(require,module,exports){ +},{"../geo/lng_lat":321,"../geo/lng_lat_bounds":322,"../geo/transform":323,"../render/painter":337,"../style/animation_loop":357,"../style/style":360,"../util/browser":408,"../util/canvas":409,"../util/dom":410,"../util/evented":416,"../util/util":424,"./bind_handlers":389,"./camera":390,"./control/attribution":391,"./hash":402,"point-geometry":465}],404:[function(require,module,exports){ /* eslint-disable */ 'use strict'; @@ -71692,7 +68356,7 @@ Marker.prototype = { } }; -},{"../geo/lng_lat":328,"../util/dom":417,"point-geometry":472}],412:[function(require,module,exports){ +},{"../geo/lng_lat":321,"../util/dom":410,"point-geometry":465}],405:[function(require,module,exports){ 'use strict'; module.exports = Popup; @@ -71946,7 +68610,7 @@ Popup.prototype = util.inherit(Evented, /** @lends Popup.prototype */{ } }); -},{"../geo/lng_lat":328,"../util/dom":417,"../util/evented":423,"../util/util":431}],413:[function(require,module,exports){ +},{"../geo/lng_lat":321,"../util/dom":410,"../util/evented":416,"../util/util":424}],406:[function(require,module,exports){ 'use strict'; module.exports = Actor; @@ -72018,7 +68682,7 @@ Actor.prototype.postMessage = function(message, transferList) { this.target.postMessage(message, transferList); }; -},{}],414:[function(require,module,exports){ +},{}],407:[function(require,module,exports){ 'use strict'; exports.getJSON = function(url, callback) { @@ -72108,7 +68772,7 @@ exports.getVideo = function(urls, callback) { return video; }; -},{}],415:[function(require,module,exports){ +},{}],408:[function(require,module,exports){ 'use strict'; /** @@ -72203,7 +68867,7 @@ webpImgTest.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ// exports.supportsGeolocation = !!navigator.geolocation; -},{"mapbox-gl-supported":316}],416:[function(require,module,exports){ +},{"mapbox-gl-supported":309}],409:[function(require,module,exports){ 'use strict'; var util = require('../util'); @@ -72247,7 +68911,7 @@ Canvas.prototype.getElement = function() { return this.canvas; }; -},{"../util":431,"mapbox-gl-supported":316}],417:[function(require,module,exports){ +},{"../util":424,"mapbox-gl-supported":309}],410:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -72322,7 +68986,7 @@ exports.touchPos = function (el, e) { return points; }; -},{"point-geometry":472}],418:[function(require,module,exports){ +},{"point-geometry":465}],411:[function(require,module,exports){ 'use strict'; var WebWorkify = require('webworkify'); @@ -72330,7 +68994,7 @@ module.exports = function () { return new WebWorkify(require('../../source/worker')); }; -},{"../../source/worker":362,"webworkify":551}],419:[function(require,module,exports){ +},{"../../source/worker":355,"webworkify":544}],412:[function(require,module,exports){ 'use strict'; var quickselect = require('quickselect'); @@ -72390,7 +69054,7 @@ function calculateSignedArea(ring) { return sum; } -},{"quickselect":481}],420:[function(require,module,exports){ +},{"quickselect":474}],413:[function(require,module,exports){ 'use strict'; module.exports = { @@ -72398,7 +69062,7 @@ module.exports = { REQUIRE_ACCESS_TOKEN: true }; -},{}],421:[function(require,module,exports){ +},{}],414:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -72425,7 +69089,7 @@ DictionaryCoder.prototype.decode = function(n) { return this._numberToString[n]; }; -},{"assert":39}],422:[function(require,module,exports){ +},{"assert":40}],415:[function(require,module,exports){ 'use strict'; var util = require('./util'); @@ -72500,7 +69164,7 @@ Dispatcher.prototype = { } }; -},{"./actor":413,"./util":431,"./web_worker":418}],423:[function(require,module,exports){ +},{"./actor":406,"./util":424,"./web_worker":411}],416:[function(require,module,exports){ 'use strict'; var util = require('./util'); @@ -72623,7 +69287,7 @@ var Evented = { module.exports = Evented; -},{"./util":431}],424:[function(require,module,exports){ +},{"./util":424}],417:[function(require,module,exports){ 'use strict'; module.exports = Glyphs; @@ -72658,7 +69322,7 @@ function readGlyph(tag, glyph, pbf) { else if (tag === 7) glyph.advance = pbf.readVarint(); } -},{}],425:[function(require,module,exports){ +},{}],418:[function(require,module,exports){ 'use strict'; module.exports = interpolate; @@ -72699,7 +69363,7 @@ interpolate.array = function(from, to, t) { }); }; -},{}],426:[function(require,module,exports){ +},{}],419:[function(require,module,exports){ 'use strict'; module.exports = { @@ -72865,7 +69529,7 @@ function polygonContainsPoint(ring, p) { return c; } -},{}],427:[function(require,module,exports){ +},{}],420:[function(require,module,exports){ 'use strict'; module.exports = LRUCache; @@ -72990,7 +69654,7 @@ LRUCache.prototype.setMaxSize = function(max) { return this; }; -},{}],428:[function(require,module,exports){ +},{}],421:[function(require,module,exports){ 'use strict'; var config = require('./config'); @@ -73118,7 +69782,7 @@ function replaceTempAccessToken(query) { } } -},{"./browser":415,"./config":420,"./util":431,"url":532}],429:[function(require,module,exports){ +},{"./browser":408,"./config":413,"./util":424,"url":525}],422:[function(require,module,exports){ 'use strict'; // Note: all "sizes" are measured in bytes @@ -73466,7 +70130,7 @@ StructArray.prototype.toArray = function(startIndex, endIndex) { return array; }; -},{"assert":39}],430:[function(require,module,exports){ +},{"assert":40}],423:[function(require,module,exports){ 'use strict'; module.exports = resolveTokens; @@ -73485,7 +70149,7 @@ function resolveTokens(properties, text) { }); } -},{}],431:[function(require,module,exports){ +},{}],424:[function(require,module,exports){ 'use strict'; var UnitBezier = require('unitbezier'); @@ -73944,7 +70608,7 @@ exports.warnOnce = function(message) { } }; -},{"../geo/coordinate":327,"unitbezier":531}],432:[function(require,module,exports){ +},{"../geo/coordinate":320,"unitbezier":524}],425:[function(require,module,exports){ 'use strict'; module.exports = Feature; @@ -73989,7 +70653,7 @@ Feature.prototype = { } }; -},{}],433:[function(require,module,exports){ +},{}],426:[function(require,module,exports){ module.exports={ "_args": [ [ @@ -74002,7 +70666,7 @@ module.exports={ "spec": ">=0.22.0 <0.23.0", "type": "range" }, - "/Users/robert/repos/plotly/plotly.js" + "/home/etienne/Documents/plotly/plotly.js" ] ], "_from": "mapbox-gl@>=0.22.0 <0.23.0", @@ -74030,13 +70694,14 @@ module.exports={ "type": "range" }, "_requiredBy": [ + "#USER", "/" ], "_resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz", "_shasum": "92a965547d4c2f24c22cbc487eeda48694cb627a", "_shrinkwrap": null, "_spec": "mapbox-gl@^0.22.0", - "_where": "/Users/robert/repos/plotly/plotly.js", + "_where": "/home/etienne/Documents/plotly/plotly.js", "browser": { "./js/util/ajax.js": "./js/util/browser/ajax.js", "./js/util/browser.js": "./js/util/browser/browser.js", @@ -74329,7 +70994,7 @@ module.exports={ "version": "0.22.1" } -},{}],434:[function(require,module,exports){ +},{}],427:[function(require,module,exports){ 'use strict' module.exports = createTable @@ -74395,7 +71060,7 @@ function createTable(dimension) { } return result } -},{"convex-hull":95}],435:[function(require,module,exports){ +},{"convex-hull":96}],428:[function(require,module,exports){ /*jshint unused:true*/ /* Input: matrix ; a 4x4 matrix @@ -74575,7 +71240,7 @@ function combine(out, a, b, scale1, scale2) { out[1] = a[1] * scale1 + b[1] * scale2 out[2] = a[2] * scale1 + b[2] * scale2 } -},{"./normalize":436,"gl-mat4/clone":166,"gl-mat4/create":167,"gl-mat4/determinant":168,"gl-mat4/invert":172,"gl-mat4/transpose":182,"gl-vec3/cross":263,"gl-vec3/dot":264,"gl-vec3/length":265,"gl-vec3/normalize":267}],436:[function(require,module,exports){ +},{"./normalize":429,"gl-mat4/clone":159,"gl-mat4/create":160,"gl-mat4/determinant":161,"gl-mat4/invert":165,"gl-mat4/transpose":175,"gl-vec3/cross":256,"gl-vec3/dot":257,"gl-vec3/length":258,"gl-vec3/normalize":260}],429:[function(require,module,exports){ module.exports = function normalize(out, mat) { var m44 = mat[15] // Cannot normalize. @@ -74586,7 +71251,7 @@ module.exports = function normalize(out, mat) { out[i] = mat[i] * scale return true } -},{}],437:[function(require,module,exports){ +},{}],430:[function(require,module,exports){ var lerp = require('gl-vec3/lerp') var recompose = require('mat4-recompose') @@ -74639,7 +71304,7 @@ function vec3(n) { function vec4() { return [0,0,0,1] } -},{"gl-mat4/determinant":168,"gl-vec3/lerp":266,"mat4-decompose":435,"mat4-recompose":438,"quat-slerp":477}],438:[function(require,module,exports){ +},{"gl-mat4/determinant":161,"gl-vec3/lerp":259,"mat4-decompose":428,"mat4-recompose":431,"quat-slerp":470}],431:[function(require,module,exports){ /* Input: translation ; a 3 component vector scale ; a 3 component vector @@ -74700,7 +71365,7 @@ module.exports = function recomposeMat4(matrix, translation, scale, skew, perspe mat4.scale(matrix, matrix, scale) return matrix } -},{"gl-mat4/create":167,"gl-mat4/fromRotationTranslation":170,"gl-mat4/identity":171,"gl-mat4/multiply":174,"gl-mat4/scale":180,"gl-mat4/translate":181}],439:[function(require,module,exports){ +},{"gl-mat4/create":160,"gl-mat4/fromRotationTranslation":163,"gl-mat4/identity":164,"gl-mat4/multiply":167,"gl-mat4/scale":173,"gl-mat4/translate":174}],432:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -74900,7 +71565,7 @@ function createMatrixCameraController(options) { return new MatrixCameraController(matrix) } -},{"binary-search-bounds":58,"gl-mat4/invert":172,"gl-mat4/lookAt":173,"gl-mat4/rotateX":177,"gl-mat4/rotateY":178,"gl-mat4/rotateZ":179,"gl-mat4/scale":180,"gl-mat4/translate":181,"gl-vec3/normalize":267,"mat4-interpolate":437}],440:[function(require,module,exports){ +},{"binary-search-bounds":59,"gl-mat4/invert":165,"gl-mat4/lookAt":166,"gl-mat4/rotateX":170,"gl-mat4/rotateY":171,"gl-mat4/rotateZ":172,"gl-mat4/scale":173,"gl-mat4/translate":174,"gl-vec3/normalize":260,"mat4-interpolate":430}],433:[function(require,module,exports){ 'use strict' module.exports = monotoneConvexHull2D @@ -74982,7 +71647,7 @@ function monotoneConvexHull2D(points) { //Return result return result } -},{"robust-orientation":496}],441:[function(require,module,exports){ +},{"robust-orientation":489}],434:[function(require,module,exports){ 'use strict' module.exports = mouseListen @@ -75189,7 +71854,7 @@ function mouseListen (element, callback) { return result } -},{"mouse-event":443}],442:[function(require,module,exports){ +},{"mouse-event":436}],435:[function(require,module,exports){ var rootPosition = { left: 0, top: 0 } module.exports = mouseEventOffset @@ -75216,7 +71881,7 @@ function getBoundingClientOffset (element) { } } -},{}],443:[function(require,module,exports){ +},{}],436:[function(require,module,exports){ 'use strict' function mouseButtons(ev) { @@ -75278,7 +71943,7 @@ function mouseRelativeY(ev) { } exports.y = mouseRelativeY -},{}],444:[function(require,module,exports){ +},{}],437:[function(require,module,exports){ 'use strict' var toPX = require('to-px') @@ -75320,7 +71985,7 @@ function mouseWheelListen(element, callback, noScroll) { return listener } -},{"to-px":522}],445:[function(require,module,exports){ +},{"to-px":515}],438:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -75736,7 +72401,7 @@ function createSurfaceExtractor(args) { order, typesig) } -},{"typedarray-pool":528}],446:[function(require,module,exports){ +},{"typedarray-pool":521}],439:[function(require,module,exports){ "use strict" @@ -75748,7 +72413,7 @@ module.exports = function(array, f) { return array } -},{"cwise/lib/wrapper":105}],447:[function(require,module,exports){ +},{"cwise/lib/wrapper":106}],440:[function(require,module,exports){ 'use strict' module.exports = gradient @@ -76046,7 +72711,7 @@ function gradient(out, inp, bc) { var cached = generateGradient(bc) return cached(out, inp) } -},{"cwise-compiler":102,"dup":117}],448:[function(require,module,exports){ +},{"cwise-compiler":103,"dup":110}],441:[function(require,module,exports){ 'use strict' var warp = require('ndarray-warp') @@ -76076,7 +72741,7 @@ function applyHomography(dest, src, Xi) { }) return dest } -},{"gl-matrix-invert":183,"ndarray-warp":455}],449:[function(require,module,exports){ +},{"gl-matrix-invert":176,"ndarray-warp":448}],442:[function(require,module,exports){ "use strict" function interp1d(arr, x) { @@ -76187,7 +72852,7 @@ module.exports.d1 = interp1d module.exports.d2 = interp2d module.exports.d3 = interp3d -},{}],450:[function(require,module,exports){ +},{}],443:[function(require,module,exports){ "use strict" var compile = require("cwise-compiler") @@ -76650,7 +73315,7 @@ exports.equals = compile({ -},{"cwise-compiler":102}],451:[function(require,module,exports){ +},{"cwise-compiler":103}],444:[function(require,module,exports){ "use strict" var ndarray = require("ndarray") @@ -76673,10 +73338,10 @@ module.exports = function convert(arr, result) { return result } -},{"./doConvert.js":452,"ndarray":456}],452:[function(require,module,exports){ +},{"./doConvert.js":445,"ndarray":449}],445:[function(require,module,exports){ module.exports=require('cwise-compiler')({"args":["array","scalar","index"],"pre":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"body":{"body":"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}","args":[{"name":"_inline_1_arg0_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_1_arg1_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_1_arg2_","lvalue":false,"rvalue":true,"count":4}],"thisVars":[],"localVars":["_inline_1_i","_inline_1_v"]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"funcName":"convert","blockSize":64}) -},{"cwise-compiler":102}],453:[function(require,module,exports){ +},{"cwise-compiler":103}],446:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -77405,7 +74070,7 @@ function compileSort(order, dtype) { } module.exports = compileSort -},{"typedarray-pool":528}],454:[function(require,module,exports){ +},{"typedarray-pool":521}],447:[function(require,module,exports){ "use strict" var compile = require("./lib/compile_sort.js") @@ -77425,19 +74090,19 @@ function sort(array) { } module.exports = sort -},{"./lib/compile_sort.js":453}],455:[function(require,module,exports){ +},{"./lib/compile_sort.js":446}],448:[function(require,module,exports){ 'use strict' var interp = require('ndarray-linear-interpolate') -var do_warp = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=new Array(_inline_6_arg4_)}","args":[{"name":"_inline_6_arg0_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_6_arg1_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_6_arg2_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_6_arg3_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_6_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_.apply(void 0,this_warped)}","args":[{"name":"_inline_7_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_7_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_7_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_7_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_7_arg4_","lvalue":false,"rvalue":false,"count":0}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warpND","blockSize":64}) +var do_warp = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=new Array(_inline_9_arg4_)}","args":[{"name":"_inline_9_arg0_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_9_arg1_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_9_arg2_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_9_arg3_","lvalue":false,"rvalue":false,"count":0},{"name":"_inline_9_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_.apply(void 0,this_warped)}","args":[{"name":"_inline_10_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_10_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_10_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_10_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_10_arg4_","lvalue":false,"rvalue":false,"count":0}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warpND","blockSize":64}) -var do_warp_1 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0])}","args":[{"name":"_inline_10_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_10_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_10_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_10_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_10_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp1D","blockSize":64}) +var do_warp_1 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0])}","args":[{"name":"_inline_13_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_13_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_13_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_13_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_13_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp1D","blockSize":64}) -var do_warp_2 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1])}","args":[{"name":"_inline_13_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_13_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_13_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_13_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_13_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp2D","blockSize":64}) +var do_warp_2 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_16_arg2_(this_warped,_inline_16_arg0_),_inline_16_arg1_=_inline_16_arg3_(_inline_16_arg4_,this_warped[0],this_warped[1])}","args":[{"name":"_inline_16_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_16_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_16_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_16_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_16_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp2D","blockSize":64}) -var do_warp_3 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_16_arg2_(this_warped,_inline_16_arg0_),_inline_16_arg1_=_inline_16_arg3_(_inline_16_arg4_,this_warped[0],this_warped[1],this_warped[2])}","args":[{"name":"_inline_16_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_16_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_16_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_16_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_16_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp3D","blockSize":64}) +var do_warp_3 = require('cwise/lib/wrapper')({"args":["index","array","scalar","scalar","scalar"],"pre":{"body":"{this_warped=[0,0,0]}","args":[],"thisVars":["this_warped"],"localVars":[]},"body":{"body":"{_inline_19_arg2_(this_warped,_inline_19_arg0_),_inline_19_arg1_=_inline_19_arg3_(_inline_19_arg4_,this_warped[0],this_warped[1],this_warped[2])}","args":[{"name":"_inline_19_arg0_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_19_arg1_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_19_arg2_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_19_arg3_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_19_arg4_","lvalue":false,"rvalue":true,"count":1}],"thisVars":["this_warped"],"localVars":[]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"debug":false,"funcName":"warp3D","blockSize":64}) module.exports = function warp(dest, src, func) { switch(src.shape.length) { @@ -77457,7 +74122,7 @@ module.exports = function warp(dest, src, func) { return dest } -},{"cwise/lib/wrapper":105,"ndarray-linear-interpolate":449}],456:[function(require,module,exports){ +},{"cwise/lib/wrapper":106,"ndarray-linear-interpolate":442}],449:[function(require,module,exports){ var iota = require("iota-array") var isBuffer = require("is-buffer") @@ -77802,7 +74467,7 @@ function wrappedNDArrayCtor(data, shape, stride, offset) { module.exports = wrappedNDArrayCtor -},{"iota-array":283,"is-buffer":284}],457:[function(require,module,exports){ +},{"iota-array":276,"is-buffer":277}],450:[function(require,module,exports){ "use strict" var doubleBits = require("double-bits") @@ -77845,7 +74510,7 @@ function nextafter(x, y) { } return doubleBits.pack(lo, hi) } -},{"double-bits":116}],458:[function(require,module,exports){ +},{"double-bits":109}],451:[function(require,module,exports){ var DEFAULT_NORMALS_EPSILON = 1e-6; var DEFAULT_FACE_EPSILON = 1e-6; @@ -77970,7 +74635,7 @@ exports.faceNormals = function(faces, positions, specifiedEpsilon) { -},{}],459:[function(require,module,exports){ +},{}],452:[function(require,module,exports){ /* object-assign (c) Sindre Sorhus @@ -78062,7 +74727,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { return to; }; -},{}],460:[function(require,module,exports){ +},{}],453:[function(require,module,exports){ 'use strict' module.exports = quatFromFrame @@ -78104,7 +74769,7 @@ function quatFromFrame( } return out } -},{}],461:[function(require,module,exports){ +},{}],454:[function(require,module,exports){ 'use strict' module.exports = createOrbitController @@ -78498,7 +75163,7 @@ function createOrbitController(options) { return result } -},{"./lib/quatFromFrame":460,"filtered-vector":125,"gl-mat4/fromQuat":169,"gl-mat4/invert":172,"gl-mat4/lookAt":173}],462:[function(require,module,exports){ +},{"./lib/quatFromFrame":453,"filtered-vector":118,"gl-mat4/fromQuat":162,"gl-mat4/invert":165,"gl-mat4/lookAt":166}],455:[function(require,module,exports){ /*! * pad-left * @@ -78514,7 +75179,7 @@ module.exports = function padLeft(str, num, ch) { ch = typeof ch !== 'undefined' ? (ch + '') : ' '; return repeat(ch, num) + str; }; -},{"repeat-string":488}],463:[function(require,module,exports){ +},{"repeat-string":481}],456:[function(require,module,exports){ module.exports = function parseUnit(str, out) { if (!out) out = [ 0, '' ] @@ -78525,7 +75190,7 @@ module.exports = function parseUnit(str, out) { out[1] = str.match(/[\d.\-\+]*\s*(.*)/)[1] || '' return out } -},{}],464:[function(require,module,exports){ +},{}],457:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -78753,7 +75418,7 @@ var substr = 'ab'.substr(-1) === 'b' ; }).call(this,require('_process')) -},{"_process":475}],465:[function(require,module,exports){ +},{"_process":468}],458:[function(require,module,exports){ 'use strict'; // lightweight Buffer shim for pbf browser build @@ -78914,7 +75579,7 @@ function encodeString(str) { return bytes; } -},{"ieee754":279}],466:[function(require,module,exports){ +},{"ieee754":272}],459:[function(require,module,exports){ (function (global){ 'use strict'; @@ -79340,7 +76005,7 @@ function writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pb function writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./buffer":465}],467:[function(require,module,exports){ +},{"./buffer":458}],460:[function(require,module,exports){ "use strict" module.exports = permutationSign @@ -79392,7 +76057,7 @@ function permutationSign(p) { return sgn } } -},{"typedarray-pool":528}],468:[function(require,module,exports){ +},{"typedarray-pool":521}],461:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -79479,7 +76144,7 @@ function unrank(n, r, p) { exports.rank = rank exports.unrank = unrank -},{"invert-permutation":282,"typedarray-pool":528}],469:[function(require,module,exports){ +},{"invert-permutation":275,"typedarray-pool":521}],462:[function(require,module,exports){ "use strict" module.exports = planarDual @@ -79610,7 +76275,7 @@ function planarDual(cells, positions) { //Combine paths and loops together return cycles } -},{"compare-angle":92}],470:[function(require,module,exports){ +},{"compare-angle":93}],463:[function(require,module,exports){ 'use strict' module.exports = trimLeaves @@ -79666,7 +76331,7 @@ function trimLeaves(edges, positions) { return [ nedges, npositions ] } -},{"edges-to-adjacency-list":119}],471:[function(require,module,exports){ +},{"edges-to-adjacency-list":112}],464:[function(require,module,exports){ 'use strict' module.exports = planarGraphToPolyline @@ -79871,7 +76536,7 @@ function planarGraphToPolyline(edges, positions) { return result } -},{"./lib/trim-leaves":470,"edges-to-adjacency-list":119,"planar-dual":469,"point-in-big-polygon":473,"robust-sum":501,"two-product":526,"uniq":530}],472:[function(require,module,exports){ +},{"./lib/trim-leaves":463,"edges-to-adjacency-list":112,"planar-dual":462,"point-in-big-polygon":466,"robust-sum":494,"two-product":519,"uniq":523}],465:[function(require,module,exports){ 'use strict'; module.exports = Point; @@ -80004,7 +76669,7 @@ Point.convert = function (a) { return a; }; -},{}],473:[function(require,module,exports){ +},{}],466:[function(require,module,exports){ module.exports = preprocessPolygon var orient = require('robust-orientation')[3] @@ -80156,7 +76821,7 @@ function preprocessPolygon(loops) { testSlab) } } -},{"binary-search-bounds":58,"interval-tree-1d":281,"robust-orientation":496,"slab-decomposition":513}],474:[function(require,module,exports){ +},{"binary-search-bounds":59,"interval-tree-1d":274,"robust-orientation":489,"slab-decomposition":506}],467:[function(require,module,exports){ //Optimized version for triangle closest point // Based on Eberly's WildMagick codes // http://www.geometrictools.com/LibMathematics/Distance/Distance.html @@ -80354,7 +77019,7 @@ function closestPoint2d(V0, V1, V2, point, result) { module.exports = closestPoint2d; -},{}],475:[function(require,module,exports){ +},{}],468:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -80536,7 +77201,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],476:[function(require,module,exports){ +},{}],469:[function(require,module,exports){ (function (global){ /*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { @@ -81073,9 +77738,9 @@ process.umask = function() { return 0; }; }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],477:[function(require,module,exports){ +},{}],470:[function(require,module,exports){ module.exports = require('gl-quat/slerp') -},{"gl-quat/slerp":222}],478:[function(require,module,exports){ +},{"gl-quat/slerp":215}],471:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -81161,7 +77826,7 @@ var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; -},{}],479:[function(require,module,exports){ +},{}],472:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -81248,13 +77913,13 @@ var objectKeys = Object.keys || function (obj) { return res; }; -},{}],480:[function(require,module,exports){ +},{}],473:[function(require,module,exports){ 'use strict'; exports.decode = exports.parse = require('./decode'); exports.encode = exports.stringify = require('./encode'); -},{"./decode":478,"./encode":479}],481:[function(require,module,exports){ +},{"./decode":471,"./encode":472}],474:[function(require,module,exports){ 'use strict'; module.exports = partialSort; @@ -81316,7 +77981,7 @@ function defaultCompare(a, b) { return a < b ? -1 : a > b ? 1 : 0; } -},{}],482:[function(require,module,exports){ +},{}],475:[function(require,module,exports){ 'use strict' var bnadd = require('big-rat/add') @@ -81332,7 +77997,7 @@ function add (a, b) { return r } -},{"big-rat/add":42}],483:[function(require,module,exports){ +},{"big-rat/add":43}],476:[function(require,module,exports){ 'use strict' module.exports = float2rat @@ -81347,7 +78012,7 @@ function float2rat(v) { return result } -},{"big-rat":45}],484:[function(require,module,exports){ +},{"big-rat":46}],477:[function(require,module,exports){ 'use strict' var rat = require('big-rat') @@ -81365,7 +78030,7 @@ function muls(a, x) { return r } -},{"big-rat":45,"big-rat/mul":54}],485:[function(require,module,exports){ +},{"big-rat":46,"big-rat/mul":55}],478:[function(require,module,exports){ 'use strict' var bnsub = require('big-rat/sub') @@ -81381,7 +78046,7 @@ function sub(a, b) { return r } -},{"big-rat/sub":56}],486:[function(require,module,exports){ +},{"big-rat/sub":57}],479:[function(require,module,exports){ 'use strict' var compareCell = require('compare-cell') @@ -81414,7 +78079,7 @@ function reduceCellComplex(cells) { return cells } -},{"cell-orientation":77,"compare-cell":93,"compare-oriented-cell":94}],487:[function(require,module,exports){ +},{"cell-orientation":78,"compare-cell":94,"compare-oriented-cell":95}],480:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -90919,7 +87584,7 @@ return wrapREGL; }))); -},{}],488:[function(require,module,exports){ +},{}],481:[function(require,module,exports){ /*! * repeat-string * @@ -90991,7 +87656,7 @@ function repeat(str, num) { return res; } -},{}],489:[function(require,module,exports){ +},{}],482:[function(require,module,exports){ // Copyright 2014 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) @@ -91040,7 +87705,7 @@ void (function(root, factory) { })); -},{}],490:[function(require,module,exports){ +},{}],483:[function(require,module,exports){ (function (global){ module.exports = global.performance && @@ -91051,7 +87716,7 @@ module.exports = } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],491:[function(require,module,exports){ +},{}],484:[function(require,module,exports){ "use strict" module.exports = compressExpansion @@ -91086,7 +87751,7 @@ function compressExpansion(e) { e.length = top return e } -},{}],492:[function(require,module,exports){ +},{}],485:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -91190,7 +87855,7 @@ return robustDeterminant") } generateDispatch() -},{"robust-compress":491,"robust-scale":498,"robust-sum":501,"two-product":526}],493:[function(require,module,exports){ +},{"robust-compress":484,"robust-scale":491,"robust-sum":494,"two-product":519}],486:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -91205,7 +87870,7 @@ function robustDotProduct(a, b) { } return r } -},{"robust-sum":501,"two-product":526}],494:[function(require,module,exports){ +},{"robust-sum":494,"two-product":519}],487:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -91373,7 +88038,7 @@ function generateInSphereTest() { } generateInSphereTest() -},{"robust-scale":498,"robust-subtract":500,"robust-sum":501,"two-product":526}],495:[function(require,module,exports){ +},{"robust-scale":491,"robust-subtract":493,"robust-sum":494,"two-product":519}],488:[function(require,module,exports){ "use strict" var determinant = require("robust-determinant") @@ -91445,7 +88110,7 @@ function generateDispatch() { } generateDispatch() -},{"robust-determinant":492}],496:[function(require,module,exports){ +},{"robust-determinant":485}],489:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -91636,7 +88301,7 @@ function generateOrientationProc() { } generateOrientationProc() -},{"robust-scale":498,"robust-subtract":500,"robust-sum":501,"two-product":526}],497:[function(require,module,exports){ +},{"robust-scale":491,"robust-subtract":493,"robust-sum":494,"two-product":519}],490:[function(require,module,exports){ "use strict" var robustSum = require("robust-sum") @@ -91666,7 +88331,7 @@ function robustProduct(a, b) { } return r } -},{"robust-scale":498,"robust-sum":501}],498:[function(require,module,exports){ +},{"robust-scale":491,"robust-sum":494}],491:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -91717,7 +88382,7 @@ function scaleLinearExpansion(e, scale) { g.length = count return g } -},{"two-product":526,"two-sum":527}],499:[function(require,module,exports){ +},{"two-product":519,"two-sum":520}],492:[function(require,module,exports){ "use strict" module.exports = segmentsIntersect @@ -91765,7 +88430,7 @@ function segmentsIntersect(a0, a1, b0, b1) { return true } -},{"robust-orientation":496}],500:[function(require,module,exports){ +},{"robust-orientation":489}],493:[function(require,module,exports){ "use strict" module.exports = robustSubtract @@ -91922,7 +88587,7 @@ function robustSubtract(e, f) { g.length = count return g } -},{}],501:[function(require,module,exports){ +},{}],494:[function(require,module,exports){ "use strict" module.exports = linearExpansionSum @@ -92079,7 +88744,7 @@ function linearExpansionSum(e, f) { g.length = count return g } -},{}],502:[function(require,module,exports){ +},{}],495:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -92334,7 +88999,7 @@ Shelf.prototype.resize = function(w) { return ShelfPack; })); -},{}],503:[function(require,module,exports){ +},{}],496:[function(require,module,exports){ "use strict" module.exports = function signum(x) { @@ -92342,7 +89007,7 @@ module.exports = function signum(x) { if(x > 0) { return 1 } return 0.0 } -},{}],504:[function(require,module,exports){ +},{}],497:[function(require,module,exports){ 'use strict' module.exports = boundary @@ -92354,7 +89019,7 @@ function boundary(cells) { return reduce(bnd(cells)) } -},{"boundary-cells":61,"reduce-simplicial-complex":486}],505:[function(require,module,exports){ +},{"boundary-cells":62,"reduce-simplicial-complex":479}],498:[function(require,module,exports){ 'use strict' module.exports = extractContour @@ -92517,7 +89182,7 @@ function extractContour(cells, values, level, d) { vertexWeights: uweights } } -},{"./lib/codegen":506,"ndarray":456,"ndarray-sort":454,"typedarray-pool":528}],506:[function(require,module,exports){ +},{"./lib/codegen":499,"ndarray":449,"ndarray-sort":447,"typedarray-pool":521}],499:[function(require,module,exports){ 'use strict' module.exports = getPolygonizer @@ -92614,7 +89279,7 @@ function getPolygonizer(d) { } return alg } -},{"marching-simplex-table":434,"typedarray-pool":528}],507:[function(require,module,exports){ +},{"marching-simplex-table":427,"typedarray-pool":521}],500:[function(require,module,exports){ "use strict"; "use restrict"; var bits = require("bit-twiddle") @@ -92958,11 +89623,11 @@ function connectedComponents(cells, vertex_count) { } exports.connectedComponents = connectedComponents -},{"bit-twiddle":59,"union-find":529}],508:[function(require,module,exports){ -arguments[4][59][0].apply(exports,arguments) -},{"dup":59}],509:[function(require,module,exports){ -arguments[4][507][0].apply(exports,arguments) -},{"bit-twiddle":508,"dup":507,"union-find":510}],510:[function(require,module,exports){ +},{"bit-twiddle":60,"union-find":522}],501:[function(require,module,exports){ +arguments[4][60][0].apply(exports,arguments) +},{"dup":60}],502:[function(require,module,exports){ +arguments[4][500][0].apply(exports,arguments) +},{"bit-twiddle":501,"dup":500,"union-find":503}],503:[function(require,module,exports){ "use strict"; "use restrict"; module.exports = UnionFind; @@ -93019,7 +89684,7 @@ UnionFind.prototype.link = function(x, y) { } -},{}],511:[function(require,module,exports){ +},{}],504:[function(require,module,exports){ "use strict" module.exports = simplifyPolygon @@ -93291,7 +89956,7 @@ function simplifyPolygon(cells, positions, minArea) { edges: ncells } } -},{"robust-orientation":496,"simplicial-complex":509}],512:[function(require,module,exports){ +},{"robust-orientation":489,"simplicial-complex":502}],505:[function(require,module,exports){ "use strict" module.exports = orderSegments @@ -93387,7 +90052,7 @@ function orderSegments(b, a) { } return ar[0] - br[0] } -},{"robust-orientation":496}],513:[function(require,module,exports){ +},{"robust-orientation":489}],506:[function(require,module,exports){ "use strict" module.exports = createSlabDecomposition @@ -93618,7 +90283,7 @@ function createSlabDecomposition(segments) { } return new SlabDecomposition(slabs, lines, horizontal) } -},{"./lib/order-segments":512,"binary-search-bounds":58,"functional-red-black-tree":127,"robust-orientation":496}],514:[function(require,module,exports){ +},{"./lib/order-segments":505,"binary-search-bounds":59,"functional-red-black-tree":120,"robust-orientation":489}],507:[function(require,module,exports){ "use strict" var robustDot = require("robust-dot-product") @@ -93710,7 +90375,7 @@ function negative(points, plane) { } return neg } -},{"robust-dot-product":493,"robust-sum":501}],515:[function(require,module,exports){ +},{"robust-dot-product":486,"robust-sum":494}],508:[function(require,module,exports){ (function(window) { var re = { not_string: /[^s]/, @@ -93920,7 +90585,7 @@ function negative(points, plane) { } })(typeof window === "undefined" ? this : window); -},{}],516:[function(require,module,exports){ +},{}],509:[function(require,module,exports){ 'use strict'; var kdbush = require('kdbush'); @@ -94254,7 +90919,7 @@ function getY(p) { return p.y; } -},{"kdbush":287}],517:[function(require,module,exports){ +},{"kdbush":280}],510:[function(require,module,exports){ 'use strict' module.exports = toSuperScript @@ -94309,7 +90974,7 @@ function toSuperScript(x) { }).join('') } -},{}],518:[function(require,module,exports){ +},{}],511:[function(require,module,exports){ "use strict" module.exports = surfaceNets @@ -94517,7 +91182,7 @@ function surfaceNets(array,level) { } return proc(array,level) } -},{"ndarray-extract-contour":445,"triangulate-hypercube":524,"zero-crossings":571}],519:[function(require,module,exports){ +},{"ndarray-extract-contour":438,"triangulate-hypercube":517,"zero-crossings":564}],512:[function(require,module,exports){ (function (process){ 'use strict' @@ -94607,7 +91272,7 @@ function textGet(font, text, opts) { } }).call(this,require('_process')) -},{"_process":475,"vectorize-text":541}],520:[function(require,module,exports){ +},{"_process":468,"vectorize-text":534}],513:[function(require,module,exports){ 'use strict'; module.exports = TinySDF; @@ -94716,7 +91381,7 @@ function edt1d(f, d, v, z, n) { } } -},{}],521:[function(require,module,exports){ +},{}],514:[function(require,module,exports){ // TinyColor v1.4.1 // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License @@ -95913,7 +92578,7 @@ else { })(Math); -},{}],522:[function(require,module,exports){ +},{}],515:[function(require,module,exports){ 'use strict' var parseUnit = require('parse-unit') @@ -95974,7 +92639,7 @@ function toPX(str, element) { } return 1 } -},{"parse-unit":463}],523:[function(require,module,exports){ +},{"parse-unit":456}],516:[function(require,module,exports){ // https://github.com/topojson/topojson-client Version 2.1.0. Copyright 2016 Mike Bostock. (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : @@ -96494,7 +93159,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); }))); -},{}],524:[function(require,module,exports){ +},{}],517:[function(require,module,exports){ "use strict" module.exports = triangulateCube @@ -96528,7 +93193,7 @@ function triangulateCube(dimension) { } return result } -},{"gamma":128,"permutation-parity":467,"permutation-rank":468}],525:[function(require,module,exports){ +},{"gamma":121,"permutation-parity":460,"permutation-rank":461}],518:[function(require,module,exports){ 'use strict' module.exports = createTurntableController @@ -97101,7 +93766,7 @@ function createTurntableController(options) { theta, phi) } -},{"filtered-vector":125,"gl-mat4/invert":172,"gl-mat4/rotate":176,"gl-vec3/cross":263,"gl-vec3/dot":264,"gl-vec3/normalize":267}],526:[function(require,module,exports){ +},{"filtered-vector":118,"gl-mat4/invert":165,"gl-mat4/rotate":169,"gl-vec3/cross":256,"gl-vec3/dot":257,"gl-vec3/normalize":260}],519:[function(require,module,exports){ "use strict" module.exports = twoProduct @@ -97135,7 +93800,7 @@ function twoProduct(a, b, result) { return [ y, x ] } -},{}],527:[function(require,module,exports){ +},{}],520:[function(require,module,exports){ "use strict" module.exports = fastTwoSum @@ -97153,7 +93818,7 @@ function fastTwoSum(a, b, result) { } return [ar+br, x] } -},{}],528:[function(require,module,exports){ +},{}],521:[function(require,module,exports){ (function (global,Buffer){ 'use strict' @@ -97370,7 +94035,7 @@ exports.clearCache = function clearCache() { } } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"bit-twiddle":59,"buffer":69,"dup":117}],529:[function(require,module,exports){ +},{"bit-twiddle":60,"buffer":70,"dup":110}],522:[function(require,module,exports){ "use strict"; "use restrict"; module.exports = UnionFind; @@ -97433,7 +94098,7 @@ proto.link = function(x, y) { ++ranks[xr]; } } -},{}],530:[function(require,module,exports){ +},{}],523:[function(require,module,exports){ "use strict" function unique_pred(list, compare) { @@ -97492,7 +94157,7 @@ function unique(list, compare, sorted) { module.exports = unique -},{}],531:[function(require,module,exports){ +},{}],524:[function(require,module,exports){ /* * Copyright (C) 2008 Apple Inc. All Rights Reserved. * @@ -97599,7 +94264,7 @@ UnitBezier.prototype.solve = function(x, epsilon) { return this.sampleCurveY(this.solveCurveX(x, epsilon)); }; -},{}],532:[function(require,module,exports){ +},{}],525:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -98333,7 +94998,7 @@ Url.prototype.parseHost = function() { if (host) this.hostname = host; }; -},{"./util":533,"punycode":476,"querystring":480}],533:[function(require,module,exports){ +},{"./util":526,"punycode":469,"querystring":473}],526:[function(require,module,exports){ 'use strict'; module.exports = { @@ -98351,7 +95016,7 @@ module.exports = { } }; -},{}],534:[function(require,module,exports){ +},{}],527:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -98376,14 +95041,14 @@ if (typeof Object.create === 'function') { } } -},{}],535:[function(require,module,exports){ +},{}],528:[function(require,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } -},{}],536:[function(require,module,exports){ +},{}],529:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -98973,12 +95638,12 @@ function hasOwnProperty(obj, prop) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":535,"_process":475,"inherits":534}],537:[function(require,module,exports){ +},{"./support/isBuffer":528,"_process":468,"inherits":527}],530:[function(require,module,exports){ module.exports.VectorTile = require('./lib/vectortile.js'); module.exports.VectorTileFeature = require('./lib/vectortilefeature.js'); module.exports.VectorTileLayer = require('./lib/vectortilelayer.js'); -},{"./lib/vectortile.js":538,"./lib/vectortilefeature.js":539,"./lib/vectortilelayer.js":540}],538:[function(require,module,exports){ +},{"./lib/vectortile.js":531,"./lib/vectortilefeature.js":532,"./lib/vectortilelayer.js":533}],531:[function(require,module,exports){ 'use strict'; var VectorTileLayer = require('./vectortilelayer'); @@ -98997,7 +95662,7 @@ function readTile(tag, layers, pbf) { } -},{"./vectortilelayer":540}],539:[function(require,module,exports){ +},{"./vectortilelayer":533}],532:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -99232,7 +95897,7 @@ function signedArea(ring) { return sum; } -},{"point-geometry":472}],540:[function(require,module,exports){ +},{"point-geometry":465}],533:[function(require,module,exports){ 'use strict'; var VectorTileFeature = require('./vectortilefeature.js'); @@ -99295,7 +95960,7 @@ VectorTileLayer.prototype.feature = function(i) { return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values); }; -},{"./vectortilefeature.js":539}],541:[function(require,module,exports){ +},{"./vectortilefeature.js":532}],534:[function(require,module,exports){ "use strict" module.exports = createText @@ -99322,7 +95987,7 @@ function createText(str, options) { options) } -},{"./lib/vtext":542}],542:[function(require,module,exports){ +},{"./lib/vtext":535}],535:[function(require,module,exports){ "use strict" module.exports = vectorizeText @@ -99528,7 +96193,7 @@ function vectorizeText(str, canvas, context, options) { return processPixels(pixels, options, size) } -},{"cdt2d":71,"clean-pslg":81,"ndarray":456,"planar-graph-to-polyline":471,"simplify-planar-graph":511,"surface-nets":518}],543:[function(require,module,exports){ +},{"cdt2d":72,"clean-pslg":82,"ndarray":449,"planar-graph-to-polyline":464,"simplify-planar-graph":504,"surface-nets":511}],536:[function(require,module,exports){ var Pbf = require('pbf') var vtpb = require('./vector-tile-pb') var GeoJSONWrapper = require('./lib/geojson_wrapper') @@ -99684,7 +96349,7 @@ function wrapValue (value) { return result } -},{"./lib/geojson_wrapper":544,"./vector-tile-pb":545,"pbf":466}],544:[function(require,module,exports){ +},{"./lib/geojson_wrapper":537,"./vector-tile-pb":538,"pbf":459}],537:[function(require,module,exports){ 'use strict' var Point = require('point-geometry') @@ -99752,7 +96417,7 @@ FeatureWrapper.prototype.bbox = function () { FeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON -},{"point-geometry":472,"vector-tile":537}],545:[function(require,module,exports){ +},{"point-geometry":465,"vector-tile":530}],538:[function(require,module,exports){ 'use strict'; // tile ======================================== @@ -99858,7 +96523,7 @@ function writeLayer(layer, pbf) { if (layer.extent !== undefined) pbf.writeVarintField(5, layer.extent); } -},{}],546:[function(require,module,exports){ +},{}],539:[function(require,module,exports){ // Copyright (C) 2011 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -100545,7 +97210,7 @@ function writeLayer(layer, pbf) { } })(); -},{}],547:[function(require,module,exports){ +},{}],540:[function(require,module,exports){ var hiddenStore = require('./hidden-store.js'); module.exports = createStore; @@ -100566,7 +97231,7 @@ function createStore() { }; } -},{"./hidden-store.js":548}],548:[function(require,module,exports){ +},{"./hidden-store.js":541}],541:[function(require,module,exports){ module.exports = hiddenStore; function hiddenStore(obj, key) { @@ -100584,7 +97249,7 @@ function hiddenStore(obj, key) { return store; } -},{}],549:[function(require,module,exports){ +},{}],542:[function(require,module,exports){ // Original - @Gozola. // https://gist.github.com/Gozala/1269991 // This is a reimplemented version (with a few bug fixes). @@ -100615,14 +97280,14 @@ function weakMap() { } } -},{"./create-store.js":547}],550:[function(require,module,exports){ +},{"./create-store.js":540}],543:[function(require,module,exports){ var getContext = require('get-canvas-context') module.exports = function getWebGLContext (opt) { return getContext('webgl', opt) } -},{"get-canvas-context":139}],551:[function(require,module,exports){ +},{"get-canvas-context":132}],544:[function(require,module,exports){ var bundleFn = arguments[3]; var sources = arguments[4]; var cache = arguments[5]; @@ -100705,12 +97370,12 @@ module.exports = function (fn, options) { return worker; }; -},{}],552:[function(require,module,exports){ +},{}],545:[function(require,module,exports){ module.exports.RADIUS = 6378137; module.exports.FLATTENING = 1/298.257223563; module.exports.POLAR_RADIUS = 6356752.3142; -},{}],553:[function(require,module,exports){ +},{}],546:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : @@ -100800,7 +97465,7 @@ exports.getMercCoords = getMercCoords; Object.defineProperty(exports, '__esModule', { value: true }); })); -},{}],554:[function(require,module,exports){ +},{}],547:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -101533,7 +98198,7 @@ function toSolar(yearOrDate, monthOrResult, day, isIntercalaryOrResult, result) } -},{"../main":568,"object-assign":459}],555:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],548:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -101717,7 +98382,7 @@ assign(CopticCalendar.prototype, { main.calendars.coptic = CopticCalendar; -},{"../main":568,"object-assign":459}],556:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],549:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -101945,7 +98610,7 @@ var centuries = { main.calendars.discworld = DiscworldCalendar; -},{"../main":568,"object-assign":459}],557:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],550:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102129,7 +98794,7 @@ assign(EthiopianCalendar.prototype, { main.calendars.ethiopian = EthiopianCalendar; -},{"../main":568,"object-assign":459}],558:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],551:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102403,7 +99068,7 @@ function mod(a, b) { main.calendars.hebrew = HebrewCalendar; -},{"../main":568,"object-assign":459}],559:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],552:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102584,7 +99249,7 @@ assign(IslamicCalendar.prototype, { main.calendars.islamic = IslamicCalendar; -},{"../main":568,"object-assign":459}],560:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],553:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102767,7 +99432,7 @@ assign(JulianCalendar.prototype, { main.calendars.julian = JulianCalendar; -},{"../main":568,"object-assign":459}],561:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],554:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -103062,7 +99727,7 @@ function amod(a, b) { main.calendars.mayan = MayanCalendar; -},{"../main":568,"object-assign":459}],562:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],555:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -103242,7 +99907,7 @@ assign(NanakshahiCalendar.prototype, { main.calendars.nanakshahi = NanakshahiCalendar; -},{"../main":568,"object-assign":459}],563:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],556:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -103665,7 +100330,7 @@ assign(NepaliCalendar.prototype, { main.calendars.nepali = NepaliCalendar; -},{"../main":568,"object-assign":459}],564:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],557:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -103855,7 +100520,7 @@ main.calendars.persian = PersianCalendar; main.calendars.jalali = PersianCalendar; -},{"../main":568,"object-assign":459}],565:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],558:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -104041,7 +100706,7 @@ assign(TaiwanCalendar.prototype, { main.calendars.taiwan = TaiwanCalendar; -},{"../main":568,"object-assign":459}],566:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],559:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -104227,7 +100892,7 @@ assign(ThaiCalendar.prototype, { main.calendars.thai = ThaiCalendar; -},{"../main":568,"object-assign":459}],567:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],560:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -104592,7 +101257,7 @@ var ummalqura_dat = [ 79990]; -},{"../main":568,"object-assign":459}],568:[function(require,module,exports){ +},{"../main":561,"object-assign":452}],561:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -105497,7 +102162,7 @@ _exports.baseCalendar = BaseCalendar; _exports.calendars.gregorian = GregorianCalendar; -},{"object-assign":459}],569:[function(require,module,exports){ +},{"object-assign":452}],562:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -105999,7 +102664,7 @@ assign(main.baseCalendar.prototype, { }); -},{"./main":568,"object-assign":459}],570:[function(require,module,exports){ +},{"./main":561,"object-assign":452}],563:[function(require,module,exports){ module.exports = require('cwise-compiler')({ args: ['array', { offset: [1], @@ -106051,7 +102716,7 @@ module.exports = require('cwise-compiler')({ funcName: 'zeroCrossings' }) -},{"cwise-compiler":102}],571:[function(require,module,exports){ +},{"cwise-compiler":103}],564:[function(require,module,exports){ "use strict" module.exports = findZeroCrossings @@ -106064,7 +102729,7 @@ function findZeroCrossings(array, level) { core(array.hi(array.shape[0]-1), cross, level) return cross } -},{"./lib/zc-core":570}],572:[function(require,module,exports){ +},{"./lib/zc-core":563}],565:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106150,6 +102815,9 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op // xanchor, yanchor coerce(axLetter + 'anchor'); + + // xshift, yshift + coerce(axLetter + 'shift'); } // if you have one coordinate you should have both @@ -106192,7 +102860,7 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op return annOut; }; -},{"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/constants":734,"../color":585,"./attributes":574}],573:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/constants":729,"../color":578,"./attributes":567}],566:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106257,7 +102925,7 @@ module.exports = [ } ]; -},{}],574:[function(require,module,exports){ +},{}],567:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106451,6 +103119,12 @@ module.exports = { dflt: 'auto', + }, + xshift: { + valType: 'number', + dflt: 0, + + }, yref: { valType: 'enumerated', @@ -106472,6 +103146,12 @@ module.exports = { dflt: 'auto', + }, + yshift: { + valType: 'number', + dflt: 0, + + }, clicktoshow: { valType: 'enumerated', @@ -106525,7 +103205,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../../plots/cartesian/constants":734,"../../plots/font_attributes":753,"./arrow_paths":573}],575:[function(require,module,exports){ +},{"../../lib/extend":677,"../../plots/cartesian/constants":729,"../../plots/font_attributes":748,"./arrow_paths":566}],568:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106578,12 +103258,17 @@ function annAutorange(gd) { ya = Axes.getFromId(gd, ann.yref), headSize = 3 * ann.arrowsize * ann.arrowwidth || 0; + var headPlus, headMinus; + if(xa && xa.autorange) { + headPlus = headSize + ann.xshift; + headMinus = headSize - ann.xshift; + if(ann.axref === ann.xref) { // expand for the arrowhead (padded by arrowhead) Axes.expand(xa, [xa.r2c(ann.x)], { - ppadplus: headSize, - ppadminus: headSize + ppadplus: headPlus, + ppadminus: headMinus }); // again for the textbox (padded by textbox) Axes.expand(xa, [xa.r2c(ann.ax)], { @@ -106593,17 +103278,20 @@ function annAutorange(gd) { } else { Axes.expand(xa, [xa.r2c(ann.x)], { - ppadplus: Math.max(ann._xpadplus, headSize), - ppadminus: Math.max(ann._xpadminus, headSize) + ppadplus: Math.max(ann._xpadplus, headPlus), + ppadminus: Math.max(ann._xpadminus, headMinus) }); } } if(ya && ya.autorange) { + headPlus = headSize - ann.yshift; + headMinus = headSize + ann.yshift; + if(ann.ayref === ann.yref) { Axes.expand(ya, [ya.r2c(ann.y)], { - ppadplus: headSize, - ppadminus: headSize + ppadplus: headPlus, + ppadminus: headMinus }); Axes.expand(ya, [ya.r2c(ann.ay)], { ppadplus: ann._ypadplus, @@ -106612,15 +103300,15 @@ function annAutorange(gd) { } else { Axes.expand(ya, [ya.r2c(ann.y)], { - ppadplus: Math.max(ann._ypadplus, headSize), - ppadminus: Math.max(ann._ypadminus, headSize) + ppadplus: Math.max(ann._ypadplus, headPlus), + ppadminus: Math.max(ann._ypadminus, headMinus) }); } } }); } -},{"../../lib":690,"../../plots/cartesian/axes":729,"./draw":579}],576:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"./draw":572}],569:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106745,7 +103433,7 @@ function getToggleSets(gd, hoverData) { return {on: onSet, off: offSet, explicitOff: explicitOffSet}; } -},{"../../plotly":724}],577:[function(require,module,exports){ +},{"../../plotly":719}],570:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106808,7 +103496,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":710,"fast-isnumeric":123}],578:[function(require,module,exports){ +},{"../../lib/to_log_range":705,"fast-isnumeric":116}],571:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106833,7 +103521,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { handleArrayContainerDefaults(layoutIn, layoutOut, opts); }; -},{"../../plots/array_container_defaults":726,"./annotation_defaults":572}],579:[function(require,module,exports){ +},{"../../plots/array_container_defaults":721,"./annotation_defaults":565}],572:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107072,6 +103760,7 @@ function drawOne(gd, index) { // but this one is the positive total size annSize = Math.abs(annSizeFromWidth) + Math.abs(annSizeFromHeight), anchor = options[axLetter + 'anchor'], + overallShift = options[axLetter + 'shift'] * (axLetter === 'x' ? 1 : -1), posPx = annPosPx[axLetter], basePx, textPadShift, @@ -107162,6 +103851,9 @@ function drawOne(gd, index) { posPx.text -= shiftMinus; } } + + posPx.tail += overallShift; + posPx.head += overallShift; } else { // with no arrow, the text rotates and *then* we put the anchor @@ -107171,6 +103863,10 @@ function drawOne(gd, index) { posPx.text = basePx + textShift; } + posPx.text += overallShift; + textShift += overallShift; + textPadShift += overallShift; + // padplus/minus are used by autorange options['_' + axLetter + 'padplus'] = (annSize / 2) + textPadShift; options['_' + axLetter + 'padminus'] = (annSize / 2) - textPadShift; @@ -107360,21 +104056,17 @@ function drawOne(gd, index) { update[annbase + '.x'] = xa ? xa.p2r(xa.r2p(options.x) + dx) : - ((headX + dx - gs.l) / gs.w); + (options.x + (dx / gs.w)); update[annbase + '.y'] = ya ? ya.p2r(ya.r2p(options.y) + dy) : - (1 - ((headY + dy - gs.t) / gs.h)); + (options.y - (dy / gs.h)); if(options.axref === options.xref) { - update[annbase + '.ax'] = xa ? - xa.p2r(xa.r2p(options.ax) + dx) : - ((headX + dx - gs.l) / gs.w); + update[annbase + '.ax'] = xa.p2r(xa.r2p(options.ax) + dx); } if(options.ayref === options.yref) { - update[annbase + '.ay'] = ya ? - ya.p2r(ya.r2p(options.ay) + dy) : - (1 - ((headY + dy - gs.t) / gs.h)); + update[annbase + '.ay'] = ya.p2r(ya.r2p(options.ay) + dy); } arrowGroup.attr('transform', 'translate(' + dx + ',' + dy + ')'); @@ -107430,7 +104122,8 @@ function drawOne(gd, index) { if(xa) update[annbase + '.x'] = options.x + dx / xa._m; else { var widthFraction = options._xsize / gs.w, - xLeft = options.x + options._xshift / gs.w - widthFraction / 2; + xLeft = options.x + (options._xshift - options.xshift) / gs.w - + widthFraction / 2; update[annbase + '.x'] = dragElement.align(xLeft + dx / gs.w, widthFraction, 0, 1, options.xanchor); @@ -107439,7 +104132,8 @@ function drawOne(gd, index) { if(ya) update[annbase + '.y'] = options.y + dy / ya._m; else { var heightFraction = options._ysize / gs.h, - yBottom = options.y - options._yshift / gs.h - heightFraction / 2; + yBottom = options.y - (options._yshift + options.yshift) / gs.h - + heightFraction / 2; update[annbase + '.y'] = dragElement.align(yBottom - dy / gs.h, heightFraction, 0, 1, options.yanchor); @@ -107513,7 +104207,7 @@ function lineIntersect(x1, y1, x2, y2, x3, y3, x4, y4) { return {x: x1 + a * t, y: y1 + d * t}; } -},{"../../lib":690,"../../lib/setcursor":705,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"../../plots/plots":792,"../color":585,"../dragelement":606,"../drawing":608,"./draw_arrow_head":580,"d3":114}],580:[function(require,module,exports){ +},{"../../lib":685,"../../lib/setcursor":700,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"../../plots/plots":787,"../color":578,"../dragelement":599,"../drawing":602,"./draw_arrow_head":573,"d3":107}],573:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107647,7 +104341,7 @@ module.exports = function drawArrowHead(el3, style, ends, mag, standoff) { if(doEnd) drawhead(end, endRot); }; -},{"../color":585,"../drawing":608,"./arrow_paths":573,"d3":114,"fast-isnumeric":123}],581:[function(require,module,exports){ +},{"../color":578,"../drawing":602,"./arrow_paths":566,"d3":107,"fast-isnumeric":116}],574:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107679,7 +104373,7 @@ module.exports = { convertCoords: require('./convert_coords') }; -},{"./attributes":574,"./calc_autorange":575,"./click":576,"./convert_coords":577,"./defaults":578,"./draw":579}],582:[function(require,module,exports){ +},{"./attributes":567,"./calc_autorange":568,"./click":569,"./convert_coords":570,"./defaults":571,"./draw":572}],575:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107712,7 +104406,7 @@ require('world-calendars/dist/calendars/taiwan'); require('world-calendars/dist/calendars/thai'); require('world-calendars/dist/calendars/ummalqura'); -},{"world-calendars/dist/calendars/chinese":554,"world-calendars/dist/calendars/coptic":555,"world-calendars/dist/calendars/discworld":556,"world-calendars/dist/calendars/ethiopian":557,"world-calendars/dist/calendars/hebrew":558,"world-calendars/dist/calendars/islamic":559,"world-calendars/dist/calendars/julian":560,"world-calendars/dist/calendars/mayan":561,"world-calendars/dist/calendars/nanakshahi":562,"world-calendars/dist/calendars/nepali":563,"world-calendars/dist/calendars/persian":564,"world-calendars/dist/calendars/taiwan":565,"world-calendars/dist/calendars/thai":566,"world-calendars/dist/calendars/ummalqura":567,"world-calendars/dist/main":568,"world-calendars/dist/plus":569}],583:[function(require,module,exports){ +},{"world-calendars/dist/calendars/chinese":547,"world-calendars/dist/calendars/coptic":548,"world-calendars/dist/calendars/discworld":549,"world-calendars/dist/calendars/ethiopian":550,"world-calendars/dist/calendars/hebrew":551,"world-calendars/dist/calendars/islamic":552,"world-calendars/dist/calendars/julian":553,"world-calendars/dist/calendars/mayan":554,"world-calendars/dist/calendars/nanakshahi":555,"world-calendars/dist/calendars/nepali":556,"world-calendars/dist/calendars/persian":557,"world-calendars/dist/calendars/taiwan":558,"world-calendars/dist/calendars/thai":559,"world-calendars/dist/calendars/ummalqura":560,"world-calendars/dist/main":561,"world-calendars/dist/plus":562}],576:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107971,7 +104665,7 @@ module.exports = { worldCalFmt: worldCalFmt }; -},{"../../constants/numerical":672,"../../lib":690,"./calendars":582}],584:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685,"./calendars":575}],577:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108011,7 +104705,7 @@ exports.borderLine = '#BEC8D9'; // gives back exactly lightLine if the other colors are defaults. exports.lightFraction = 100 * (0xe - 0x4) / (0xf - 0x4); -},{}],585:[function(require,module,exports){ +},{}],578:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108182,7 +104876,7 @@ function cleanOne(val) { return 'rgb(' + rgbStr + ')'; } -},{"./attributes":584,"fast-isnumeric":123,"tinycolor2":521}],586:[function(require,module,exports){ +},{"./attributes":577,"fast-isnumeric":116,"tinycolor2":514}],579:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108338,7 +105032,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../../plots/cartesian/layout_attributes":740,"../../plots/font_attributes":753}],587:[function(require,module,exports){ +},{"../../lib/extend":677,"../../plots/cartesian/layout_attributes":735,"../../plots/font_attributes":748}],580:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108405,7 +105099,7 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) { coerce('titleside'); }; -},{"../../lib":690,"../../plots/cartesian/tick_label_defaults":747,"../../plots/cartesian/tick_mark_defaults":748,"../../plots/cartesian/tick_value_defaults":749,"./attributes":586}],588:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/tick_label_defaults":742,"../../plots/cartesian/tick_mark_defaults":743,"../../plots/cartesian/tick_value_defaults":744,"./attributes":579}],581:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109038,7 +105732,7 @@ module.exports = function draw(gd, id) { return component; }; -},{"../../lib":690,"../../lib/extend":682,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_defaults":731,"../../plots/cartesian/layout_attributes":740,"../../plots/cartesian/position_defaults":743,"../../plots/plots":792,"../../registry":807,"../color":585,"../dragelement":606,"../drawing":608,"../titles":661,"./attributes":586,"d3":114,"tinycolor2":521}],589:[function(require,module,exports){ +},{"../../lib":685,"../../lib/extend":677,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_defaults":726,"../../plots/cartesian/layout_attributes":735,"../../plots/cartesian/position_defaults":738,"../../plots/plots":787,"../../registry":802,"../color":578,"../dragelement":599,"../drawing":602,"../titles":655,"./attributes":579,"d3":107,"tinycolor2":514}],582:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109057,7 +105751,7 @@ module.exports = function hasColorbar(container) { return Lib.isPlainObject(container.colorbar); }; -},{"../../lib":690}],590:[function(require,module,exports){ +},{"../../lib":685}],583:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109112,7 +105806,7 @@ module.exports = { } }; -},{}],591:[function(require,module,exports){ +},{}],584:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109191,7 +105885,7 @@ module.exports = function calc(trace, vals, containerStr, cLetter) { } }; -},{"../../lib":690,"./flip_scale":596,"./scales":603}],592:[function(require,module,exports){ +},{"../../lib":685,"./flip_scale":589,"./scales":596}],585:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109235,7 +105929,7 @@ module.exports = function makeColorScaleAttributes(context) { }; }; -},{"../../lib/extend":682,"./attributes":590,"./scales.js":603}],593:[function(require,module,exports){ +},{"../../lib/extend":677,"./attributes":583,"./scales.js":596}],586:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109251,7 +105945,7 @@ var scales = require('./scales'); module.exports = scales.RdBu; -},{"./scales":603}],594:[function(require,module,exports){ +},{"./scales":596}],587:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109315,7 +106009,7 @@ module.exports = function colorScaleDefaults(traceIn, traceOut, layout, coerce, if(showScale) colorbarDefaults(containerIn, containerOut, layout); }; -},{"../../lib":690,"../colorbar/defaults":587,"../colorbar/has_colorbar":589,"./flip_scale":596,"./is_valid_scale":600,"fast-isnumeric":123}],595:[function(require,module,exports){ +},{"../../lib":685,"../colorbar/defaults":580,"../colorbar/has_colorbar":582,"./flip_scale":589,"./is_valid_scale":593,"fast-isnumeric":116}],588:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109352,7 +106046,7 @@ module.exports = function extractScale(scl, cmin, cmax) { }; }; -},{}],596:[function(require,module,exports){ +},{}],589:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109377,7 +106071,7 @@ module.exports = function flipScale(scl) { return sclNew; }; -},{}],597:[function(require,module,exports){ +},{}],590:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109417,7 +106111,7 @@ module.exports = function getScale(scl, dflt) { return scl; }; -},{"./default_scale":593,"./is_valid_scale_array":601,"./scales":603}],598:[function(require,module,exports){ +},{"./default_scale":586,"./is_valid_scale_array":594,"./scales":596}],591:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109463,7 +106157,7 @@ module.exports = function hasColorscale(trace, containerStr) { ); }; -},{"../../lib":690,"./is_valid_scale":600,"fast-isnumeric":123}],599:[function(require,module,exports){ +},{"../../lib":685,"./is_valid_scale":593,"fast-isnumeric":116}],592:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109497,7 +106191,7 @@ exports.extractScale = require('./extract_scale'); exports.makeColorScaleFunc = require('./make_color_scale_func'); -},{"./attributes":590,"./calc":591,"./default_scale":593,"./defaults":594,"./extract_scale":595,"./flip_scale":596,"./get_scale":597,"./has_colorscale":598,"./is_valid_scale":600,"./make_color_scale_func":602,"./scales":603}],600:[function(require,module,exports){ +},{"./attributes":583,"./calc":584,"./default_scale":586,"./defaults":587,"./extract_scale":588,"./flip_scale":589,"./get_scale":590,"./has_colorscale":591,"./is_valid_scale":593,"./make_color_scale_func":595,"./scales":596}],593:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109518,7 +106212,7 @@ module.exports = function isValidScale(scl) { else return isValidScaleArray(scl); }; -},{"./is_valid_scale_array":601,"./scales":603}],601:[function(require,module,exports){ +},{"./is_valid_scale_array":594,"./scales":596}],594:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109555,7 +106249,7 @@ module.exports = function isValidScaleArray(scl) { return true; }; -},{"tinycolor2":521}],602:[function(require,module,exports){ +},{"tinycolor2":514}],595:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109651,7 +106345,7 @@ function colorArray2rbga(colorArray) { return tinycolor(colorObj).toRgbString(); } -},{"../color":585,"d3":114,"fast-isnumeric":123,"tinycolor2":521}],603:[function(require,module,exports){ +},{"../color":578,"d3":107,"fast-isnumeric":116,"tinycolor2":514}],596:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109782,7 +106476,7 @@ module.exports = { ] }; -},{}],604:[function(require,module,exports){ +},{}],597:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109815,7 +106509,7 @@ module.exports = function align(v, dv, v0, v1, anchor) { return vc; }; -},{}],605:[function(require,module,exports){ +},{}],598:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109853,7 +106547,7 @@ module.exports = function getCursor(x, y, xanchor, yanchor) { return cursorset[y][x]; }; -},{"../../lib":690}],606:[function(require,module,exports){ +},{"../../lib":685}],599:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110055,7 +106749,7 @@ function finishDrag(gd) { if(gd._replotPending) Plotly.plot(gd); } -},{"../../constants/interactions":671,"../../lib":690,"../../plotly":724,"../../plots/cartesian/constants":734,"./align":604,"./cursor":605,"./unhover":607}],607:[function(require,module,exports){ +},{"../../constants/interactions":665,"../../lib":685,"../../plotly":719,"../../plots/cartesian/constants":729,"./align":597,"./cursor":598,"./unhover":600}],600:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110099,6 +106793,8 @@ unhover.raw = function unhoverRaw(gd, evt) { } fullLayout._hoverlayer.selectAll('g').remove(); + fullLayout._hoverlayer.selectAll('line').remove(); + fullLayout._hoverlayer.selectAll('circle').remove(); gd._hoverdata = undefined; if(evt.target && oldhoverdata) { @@ -110109,7 +106805,31 @@ unhover.raw = function unhoverRaw(gd, evt) { } }; -},{"../../lib/events":681}],608:[function(require,module,exports){ +},{"../../lib/events":676}],601:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +exports.dash = { + valType: 'string', + // string type usually doesn't take values... this one should really be + // a special type or at least a special coercion function, from the GUI + // you only get these values but elsewhere the user can supply a list of + // dash lengths in px, and it will be honored + values: ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'], + dflt: 'solid', + + +}; + +},{}],602:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110225,6 +106945,17 @@ drawing.lineGroupStyle = function(s, lw, lc, ld) { drawing.dashLine = function(s, dash, lineWidth) { lineWidth = +lineWidth || 0; + + dash = drawing.dashStyle(dash, lineWidth); + + s.style({ + 'stroke-dasharray': dash, + 'stroke-width': lineWidth + 'px' + }); +}; + +drawing.dashStyle = function(dash, lineWidth) { + lineWidth = +lineWidth || 1; var dlw = Math.max(lineWidth, 3); if(dash === 'solid') dash = ''; @@ -110239,10 +106970,7 @@ drawing.dashLine = function(s, dash, lineWidth) { } // otherwise user wrote the dasharray themselves - leave it be - s.style({ - 'stroke-dasharray': dash, - 'stroke-width': lineWidth + 'px' - }); + return dash; }; drawing.fillGroupStyle = function(s) { @@ -110791,7 +107519,17 @@ drawing.setPointGroupScale = function(selection, x, y) { return scale; }; -},{"../../constants/xmlns_namespaces":674,"../../lib":690,"../../lib/svg_text_utils":709,"../../registry":807,"../../traces/scatter/make_bubble_size_func":962,"../../traces/scatter/subtypes":967,"../color":585,"../colorscale":599,"./symbol_defs":609,"d3":114,"fast-isnumeric":123}],609:[function(require,module,exports){ +drawing.measureText = function(tester, text, font) { + var dummyText = tester.append('text') + .text(text) + .call(drawing.font, font); + + var bbox = drawing.bBox(dummyText.node()); + dummyText.remove(); + return bbox; +}; + +},{"../../constants/xmlns_namespaces":668,"../../lib":685,"../../lib/svg_text_utils":704,"../../registry":802,"../../traces/scatter/make_bubble_size_func":991,"../../traces/scatter/subtypes":996,"../color":578,"../colorscale":592,"./symbol_defs":603,"d3":107,"fast-isnumeric":116}],603:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111267,7 +108005,7 @@ module.exports = { } }; -},{"d3":114}],610:[function(require,module,exports){ +},{"d3":107}],604:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111366,7 +108104,7 @@ module.exports = { } }; -},{}],611:[function(require,module,exports){ +},{}],605:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111429,7 +108167,7 @@ function calcOneAxis(calcTrace, trace, axis, coord) { Axes.expand(axis, vals, {padded: true}); } -},{"../../plots/cartesian/axes":729,"../../registry":807,"./compute_error":612,"fast-isnumeric":123}],612:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"../../registry":802,"./compute_error":606,"fast-isnumeric":116}],606:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111525,7 +108263,7 @@ function makeComputeErrorValue(type, value) { } } -},{}],613:[function(require,module,exports){ +},{}],607:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111602,7 +108340,7 @@ module.exports = function(traceIn, traceOut, defaultColor, opts) { } }; -},{"../../lib":690,"../../registry":807,"./attributes":610,"fast-isnumeric":123}],614:[function(require,module,exports){ +},{"../../lib":685,"../../registry":802,"./attributes":604,"fast-isnumeric":116}],608:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111661,7 +108399,7 @@ errorBars.hoverInfo = function(calcPoint, trace, hoverPoint) { } }; -},{"./attributes":610,"./calc":611,"./defaults":613,"./plot":615,"./style":616}],615:[function(require,module,exports){ +},{"./attributes":604,"./calc":605,"./defaults":607,"./plot":609,"./style":610}],609:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111825,7 +108563,7 @@ function errorCoords(d, xa, ya) { return out; } -},{"../../traces/scatter/subtypes":967,"d3":114,"fast-isnumeric":123}],616:[function(require,module,exports){ +},{"../../traces/scatter/subtypes":996,"d3":107,"fast-isnumeric":116}],610:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111862,7 +108600,7 @@ module.exports = function style(traces) { }); }; -},{"../color":585,"d3":114}],617:[function(require,module,exports){ +},{"../color":578,"d3":107}],611:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111984,7 +108722,7 @@ module.exports = { } }; -},{"../../plots/cartesian/constants":734}],618:[function(require,module,exports){ +},{"../../plots/cartesian/constants":729}],612:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112067,7 +108805,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":710,"fast-isnumeric":123}],619:[function(require,module,exports){ +},{"../../lib/to_log_range":705,"fast-isnumeric":116}],613:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112128,7 +108866,7 @@ function imageDefaults(imageIn, imageOut, fullLayout) { return imageOut; } -},{"../../lib":690,"../../plots/array_container_defaults":726,"../../plots/cartesian/axes":729,"./attributes":617}],620:[function(require,module,exports){ +},{"../../lib":685,"../../plots/array_container_defaults":721,"../../plots/cartesian/axes":724,"./attributes":611}],614:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112345,7 +109083,7 @@ module.exports = function draw(gd) { } }; -},{"../../constants/xmlns_namespaces":674,"../../plots/cartesian/axes":729,"../drawing":608,"d3":114}],621:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":668,"../../plots/cartesian/axes":724,"../drawing":602,"d3":107}],615:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112368,7 +109106,7 @@ module.exports = { convertCoords: require('./convert_coords') }; -},{"./attributes":617,"./convert_coords":618,"./defaults":619,"./draw":620}],622:[function(require,module,exports){ +},{"./attributes":611,"./convert_coords":612,"./defaults":613,"./draw":614}],616:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112417,7 +109155,7 @@ exports.isMiddleAnchor = function isMiddleAnchor(opts) { ); }; -},{}],623:[function(require,module,exports){ +},{}],617:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112508,7 +109246,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../../plots/font_attributes":753,"../color/attributes":584}],624:[function(require,module,exports){ +},{"../../lib/extend":677,"../../plots/font_attributes":748,"../color/attributes":577}],618:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112526,7 +109264,7 @@ module.exports = { scrollBarMargin: 4 }; -},{}],625:[function(require,module,exports){ +},{}],619:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112619,7 +109357,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) { Lib.noneOrAll(containerIn, containerOut, ['x', 'y']); }; -},{"../../lib":690,"../../plots/layout_attributes":783,"../../registry":807,"./attributes":623,"./helpers":628}],626:[function(require,module,exports){ +},{"../../lib":685,"../../plots/layout_attributes":778,"../../registry":802,"./attributes":617,"./helpers":622}],620:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112891,7 +109629,9 @@ module.exports = function draw(gd) { scrollBarY = constants.scrollBarMargin - scrollBoxY / scrollBoxYMax * scrollBarYMax; scrollHandler(scrollBarY, scrollBoxY); - d3.event.preventDefault(); + if(scrollBoxY !== 0 && scrollBoxY !== -scrollBoxYMax) { + d3.event.preventDefault(); + } }); // to be safe, remove previous listeners @@ -113132,6 +109872,8 @@ function handleClick(g, gd, numClicks) { for(i = 0; i < fullData.length; i++) { allTraces.push(i); + // Allow the legendonly state through for *all* trace types (including + // carpet for which it's overridden with true/false in supplyDefaults) traceVisibility.push('legendonly'); } @@ -113162,7 +109904,11 @@ function handleClick(g, gd, numClicks) { if(sameAsLast) { traceVisibility = true; } - Plotly.restyle(gd, 'visible', traceVisibility, allTraces); + var visibilityUpdates = []; + for(i = 0; i < fullData.length; i++) { + visibilityUpdates.push(allTraces[i]); + } + Plotly.restyle(gd, 'visible', traceVisibility, visibilityUpdates); } } } @@ -113435,7 +110181,7 @@ function expandHorizontalMargin(gd) { }); } -},{"../../constants/interactions":671,"../../lib":690,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/plots":792,"../../registry":807,"../color":585,"../dragelement":606,"../drawing":608,"./anchor_utils":622,"./constants":624,"./get_legend_data":627,"./helpers":628,"./style":630,"d3":114}],627:[function(require,module,exports){ +},{"../../constants/interactions":665,"../../lib":685,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/plots":787,"../../registry":802,"../color":578,"../dragelement":599,"../drawing":602,"./anchor_utils":616,"./constants":618,"./get_legend_data":621,"./helpers":622,"./style":624,"d3":107}],621:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113540,7 +110286,7 @@ module.exports = function getLegendData(calcdata, opts) { return legendData; }; -},{"../../registry":807,"./helpers":628}],628:[function(require,module,exports){ +},{"../../registry":802,"./helpers":622}],622:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113571,7 +110317,7 @@ exports.isReversed = function isReversed(legendLayout) { return (legendLayout.traceorder || '').indexOf('reversed') !== -1; }; -},{"../../registry":807}],629:[function(require,module,exports){ +},{"../../registry":802}],623:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113595,7 +110341,7 @@ module.exports = { style: require('./style') }; -},{"./attributes":623,"./defaults":625,"./draw":626,"./style":630}],630:[function(require,module,exports){ +},{"./attributes":617,"./defaults":619,"./draw":620,"./style":624}],624:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113663,6 +110409,11 @@ function styleLines(d) { showFill = trace.visible && trace.fill && trace.fill !== 'none', showLine = subTypes.hasLines(trace); + if(trace && trace._module && trace._module.name === 'contourcarpet') { + showLine = trace.contours.showlines; + showFill = trace.contours.coloring === 'fill'; + } + var fill = d3.select(this).select('.legendfill').selectAll('path') .data(showFill ? [d] : []); fill.enter().append('path').classed('js-fill', true); @@ -113823,7 +110574,7 @@ function stylePies(d) { if(pts.size()) pts.call(stylePie, d[0], trace); } -},{"../../lib":690,"../../registry":807,"../../traces/pie/style_one":932,"../../traces/scatter/subtypes":967,"../color":585,"../drawing":608,"d3":114}],631:[function(require,module,exports){ +},{"../../lib":685,"../../registry":802,"../../traces/pie/style_one":970,"../../traces/scatter/subtypes":996,"../color":578,"../drawing":602,"d3":107}],625:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114003,17 +110754,20 @@ function handleCartesian(gd, ev) { astr = button.getAttribute('data-attr'), val = button.getAttribute('data-val') || true, fullLayout = gd._fullLayout, - aobj = {}; + aobj = {}, + axList = Axes.list(gd, null, true), + ax, + allEnabled = 'on', + i; if(astr === 'zoom') { var mag = (val === 'in') ? 0.5 : 2, r0 = (1 + mag) / 2, - r1 = (1 - mag) / 2, - axList = Axes.list(gd, null, true); + r1 = (1 - mag) / 2; - var ax, axName; + var axName; - for(var i = 0; i < axList.length; i++) { + for(i = 0; i < axList.length; i++) { ax = axList[i]; if(!ax.fixedrange) { @@ -114028,6 +110782,12 @@ function handleCartesian(gd, ev) { aobj[axName + '.range[0]'] = rangeInitial[0]; aobj[axName + '.range[1]'] = rangeInitial[1]; } + if(ax._showSpikeInitial !== undefined) { + aobj[axName + '.showspikes'] = ax._showSpikeInitial; + if(allEnabled === 'on' && !ax._showSpikeInitial) { + allEnabled = 'off'; + } + } } else { var rangeNow = [ @@ -114045,12 +110805,24 @@ function handleCartesian(gd, ev) { } } } + fullLayout._cartesianSpikesEnabled = allEnabled; } else { // if ALL traces have orientation 'h', 'hovermode': 'x' otherwise: 'y' if(astr === 'hovermode' && (val === 'x' || val === 'y')) { val = fullLayout._isHoriz ? 'y' : 'x'; button.setAttribute('data-val', val); + if(val !== 'closest') { + fullLayout._cartesianSpikesEnabled = 'off'; + } + } else if(astr === 'hovermode' && val === 'closest') { + for(i = 0; i < axList.length; i++) { + ax = axList[i]; + if(allEnabled === 'on' && !ax.showspikes) { + allEnabled = 'off'; + } + } + fullLayout._cartesianSpikesEnabled = allEnabled; } aobj[astr] = val; @@ -114345,7 +111117,42 @@ modeBarButtons.resetViews = { } }; -},{"../../../build/ploticon":2,"../../lib":690,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/plots":792,"../../snapshot/download":809}],632:[function(require,module,exports){ +modeBarButtons.toggleSpikelines = { + name: 'toggleSpikelines', + title: 'Toggle Spike Lines', + icon: Icons.spikeline, + attr: '_cartesianSpikesEnabled', + val: 'on', + click: function(gd) { + var fullLayout = gd._fullLayout; + + fullLayout._cartesianSpikesEnabled = fullLayout.hovermode === 'closest' ? + (fullLayout._cartesianSpikesEnabled === 'on' ? 'off' : 'on') : 'on'; + + var aobj = setSpikelineVisibility(gd); + + aobj.hovermode = 'closest'; + Plotly.relayout(gd, aobj); + } +}; + +function setSpikelineVisibility(gd) { + var fullLayout = gd._fullLayout, + axList = Axes.list(gd, null, true), + ax, + axName, + aobj = {}; + + for(var i = 0; i < axList.length; i++) { + ax = axList[i]; + axName = ax._name; + aobj[axName + '.showspikes'] = fullLayout._cartesianSpikesEnabled === 'on' ? true : false; + } + + return aobj; +} + +},{"../../../build/ploticon":2,"../../lib":685,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/plots":787,"../../snapshot/download":804}],626:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114359,7 +111166,7 @@ modeBarButtons.resetViews = { exports.manage = require('./manage'); -},{"./manage":633}],633:[function(require,module,exports){ +},{"./manage":627}],627:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114500,7 +111307,7 @@ function getButtonGroups(gd, buttonsToRemove, buttonsToAdd) { addGroup(['hoverClosestGl2d']); } else if(hasCartesian) { - addGroup(['hoverClosestCartesian', 'hoverCompareCartesian']); + addGroup(['toggleSpikelines', 'hoverClosestCartesian', 'hoverCompareCartesian']); } else if(hasPie) { addGroup(['hoverClosestPie']); @@ -114587,7 +111394,7 @@ function fillCustomButton(customButtons) { return customButtons; } -},{"../../plots/cartesian/axes":729,"../../traces/scatter/subtypes":967,"./buttons":631,"./modebar":634}],634:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"../../traces/scatter/subtypes":996,"./buttons":625,"./modebar":628}],628:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114739,7 +111546,7 @@ proto.createButton = function(config) { button.setAttribute('data-toggle', config.toggle || false); if(config.toggle) d3.select(button).classed('active', true); - button.appendChild(this.createIcon(config.icon || Icons.question)); + button.appendChild(this.createIcon(config.icon || Icons.question, config.name)); button.setAttribute('data-gravity', config.gravity || 'n'); return button; @@ -114752,7 +111559,7 @@ proto.createButton = function(config) { * @Param {string} thisIcon.path * @Return {HTMLelement} */ -proto.createIcon = function(thisIcon) { +proto.createIcon = function(thisIcon, name) { var iconHeight = thisIcon.ascent - thisIcon.descent, svgNS = 'http://www.w3.org/2000/svg', icon = document.createElementNS(svgNS, 'svg'), @@ -114762,8 +111569,12 @@ proto.createIcon = function(thisIcon) { icon.setAttribute('width', (thisIcon.width / iconHeight) + 'em'); icon.setAttribute('viewBox', [0, 0, thisIcon.width, iconHeight].join(' ')); + var transform = name === 'toggleSpikelines' ? + 'matrix(1.5 0 0 -1.5 0 ' + thisIcon.ascent + ')' : + 'matrix(1 0 0 -1 0 ' + thisIcon.ascent + ')'; + path.setAttribute('d', thisIcon.path); - path.setAttribute('transform', 'matrix(1 0 0 -1 0 ' + thisIcon.ascent + ')'); + path.setAttribute('transform', transform); icon.appendChild(path); return icon; @@ -114877,7 +111688,7 @@ function createModeBar(gd, buttons) { module.exports = createModeBar; -},{"../../../build/ploticon":2,"../../lib":690,"d3":114}],635:[function(require,module,exports){ +},{"../../../build/ploticon":2,"../../lib":685,"d3":107}],629:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114967,7 +111778,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../../plots/font_attributes":753,"../color/attributes":584,"./button_attributes":636}],636:[function(require,module,exports){ +},{"../../lib/extend":677,"../../plots/font_attributes":748,"../color/attributes":577,"./button_attributes":630}],630:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115008,7 +111819,7 @@ module.exports = { } }; -},{}],637:[function(require,module,exports){ +},{}],631:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115037,7 +111848,7 @@ module.exports = { darkAmount: 10 }; -},{}],638:[function(require,module,exports){ +},{}],632:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115136,7 +111947,7 @@ function getPosDflt(containerOut, layout, counterAxes) { return [containerOut.domain[0], posY + constants.yPad]; } -},{"../../lib":690,"../color":585,"./attributes":635,"./button_attributes":636,"./constants":637}],639:[function(require,module,exports){ +},{"../../lib":685,"../color":578,"./attributes":629,"./button_attributes":630,"./constants":631}],633:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115411,7 +112222,7 @@ function reposition(gd, buttons, opts, axName) { }); } -},{"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/cartesian/axis_ids":732,"../../plots/plots":792,"../color":585,"../drawing":608,"../legend/anchor_utils":622,"./constants":637,"./get_update_object":640,"d3":114}],640:[function(require,module,exports){ +},{"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/cartesian/axis_ids":727,"../../plots/plots":787,"../color":578,"../drawing":602,"../legend/anchor_utils":616,"./constants":631,"./get_update_object":634,"d3":107}],634:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115468,7 +112279,7 @@ function getXRange(axisLayout, buttonLayout) { return [range0, range1]; } -},{"d3":114}],641:[function(require,module,exports){ +},{"d3":107}],635:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115495,7 +112306,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":635,"./defaults":638,"./draw":639}],642:[function(require,module,exports){ +},{"./attributes":629,"./defaults":632,"./draw":633}],636:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115559,7 +112370,7 @@ module.exports = { } }; -},{"../color/attributes":584}],643:[function(require,module,exports){ +},{"../color/attributes":577}],637:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115595,7 +112406,7 @@ module.exports = function calcAutorange(gd) { } }; -},{"../../plots/cartesian/axes":729,"./constants":644}],644:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"./constants":638}],638:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115647,7 +112458,7 @@ module.exports = { extraPad: 15 }; -},{}],645:[function(require,module,exports){ +},{}],639:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115704,7 +112515,7 @@ module.exports = function handleDefaults(layoutIn, layoutOut, axName) { containerOut._input = containerIn; }; -},{"../../lib":690,"./attributes":642}],646:[function(require,module,exports){ +},{"../../lib":685,"./attributes":636}],640:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116255,7 +113066,7 @@ function clearPushMargins(gd) { } } -},{"../../lib":690,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian":739,"../../plots/cartesian/axes":729,"../../plots/plots":792,"../color":585,"../dragelement":606,"../drawing":608,"./constants":644,"d3":114}],647:[function(require,module,exports){ +},{"../../lib":685,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian":734,"../../plots/cartesian/axes":724,"../../plots/plots":787,"../color":578,"../dragelement":599,"../drawing":602,"./constants":638,"d3":107}],641:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116282,7 +113093,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":642,"./calc_autorange":643,"./defaults":645,"./draw":646}],648:[function(require,module,exports){ +},{"./attributes":636,"./calc_autorange":637,"./defaults":639,"./draw":640}],642:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116294,11 +113105,10 @@ module.exports = { 'use strict'; var annAttrs = require('../annotations/attributes'); -var scatterAttrs = require('../../traces/scatter/attributes'); +var scatterLineAttrs = require('../../traces/scatter/attributes').line; +var dash = require('../drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; -var scatterLineAttrs = scatterAttrs.line; - module.exports = { _isLinkedToArray: 'shape', @@ -116369,7 +113179,7 @@ module.exports = { line: { color: scatterLineAttrs.color, width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash, + dash: dash, }, fillcolor: { @@ -116380,7 +113190,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../../traces/scatter/attributes":947,"../annotations/attributes":574}],649:[function(require,module,exports){ +},{"../../lib/extend":677,"../../traces/scatter/attributes":976,"../annotations/attributes":567,"../drawing/attributes":601}],643:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116457,7 +113267,7 @@ function shapeBounds(ax, v0, v1, path, paramsToUse) { if(max >= min) return [min, max]; } -},{"../../lib":690,"../../plots/cartesian/axes":729,"./constants":650,"./helpers":653}],650:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"./constants":644,"./helpers":647}],644:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116521,7 +113331,7 @@ module.exports = { } }; -},{}],651:[function(require,module,exports){ +},{}],645:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116546,7 +113356,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { handleArrayContainerDefaults(layoutIn, layoutOut, opts); }; -},{"../../plots/array_container_defaults":726,"./shape_defaults":655}],652:[function(require,module,exports){ +},{"../../plots/array_container_defaults":721,"./shape_defaults":649}],646:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116921,7 +113731,7 @@ function movePath(pathIn, moveX, moveY) { }); } -},{"../../lib":690,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian/axes":729,"../color":585,"../dragelement":606,"../drawing":608,"./constants":650,"./helpers":653}],653:[function(require,module,exports){ +},{"../../lib":685,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian/axes":724,"../color":578,"../dragelement":599,"../drawing":602,"./constants":644,"./helpers":647}],647:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117002,7 +113812,7 @@ exports.getPixelToData = function(gd, axis, isVertical) { return pixelToData; }; -},{}],654:[function(require,module,exports){ +},{}],648:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117028,7 +113838,7 @@ module.exports = { drawOne: drawModule.drawOne }; -},{"./attributes":648,"./calc_autorange":649,"./defaults":651,"./draw":652}],655:[function(require,module,exports){ +},{"./attributes":642,"./calc_autorange":643,"./defaults":645,"./draw":646}],649:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117127,7 +113937,7 @@ module.exports = function handleShapeDefaults(shapeIn, shapeOut, fullLayout, opt return shapeOut; }; -},{"../../lib":690,"../../plots/cartesian/axes":729,"./attributes":648,"./helpers":653}],656:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"./attributes":642,"./helpers":647}],650:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117361,7 +114171,7 @@ module.exports = { }, }; -},{"../../lib/extend":682,"../../plots/animation_attributes":725,"../../plots/font_attributes":753,"../../plots/pad_attributes":791,"./constants":657}],657:[function(require,module,exports){ +},{"../../lib/extend":677,"../../plots/animation_attributes":720,"../../plots/font_attributes":748,"../../plots/pad_attributes":786,"./constants":651}],651:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117458,7 +114268,7 @@ module.exports = { currentValueInset: 0, }; -},{}],658:[function(require,module,exports){ +},{}],652:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117571,7 +114381,7 @@ function stepsDefaults(sliderIn, sliderOut) { return valuesOut; } -},{"../../lib":690,"../../plots/array_container_defaults":726,"./attributes":656,"./constants":657}],659:[function(require,module,exports){ +},{"../../lib":685,"../../plots/array_container_defaults":721,"./attributes":650,"./constants":651}],653:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118173,7 +114983,7 @@ function clearPushMargins(gd) { } } -},{"../../lib/svg_text_utils":709,"../../plots/plots":792,"../color":585,"../drawing":608,"../legend/anchor_utils":622,"./constants":657,"d3":114}],660:[function(require,module,exports){ +},{"../../lib/svg_text_utils":704,"../../plots/plots":787,"../color":578,"../drawing":602,"../legend/anchor_utils":616,"./constants":651,"d3":107}],654:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118196,7 +115006,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":656,"./constants":657,"./defaults":658,"./draw":659}],661:[function(require,module,exports){ +},{"./attributes":650,"./constants":651,"./defaults":652,"./draw":653}],655:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118429,7 +115239,7 @@ Titles.draw = function(gd, titleClass, options) { el.classed('js-placeholder', isplaceholder); }; -},{"../../constants/interactions":671,"../../lib":690,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/plots":792,"../color":585,"../drawing":608,"d3":114,"fast-isnumeric":123}],662:[function(require,module,exports){ +},{"../../constants/interactions":665,"../../lib":685,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/plots":787,"../color":578,"../drawing":602,"d3":107,"fast-isnumeric":116}],656:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118576,7 +115386,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../../plots/font_attributes":753,"../../plots/pad_attributes":791,"../color/attributes":584}],663:[function(require,module,exports){ +},{"../../lib/extend":677,"../../plots/font_attributes":748,"../../plots/pad_attributes":786,"../color/attributes":577}],657:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118652,7 +115462,7 @@ module.exports = { hoverColor: '#F4FAFF' }; -},{}],664:[function(require,module,exports){ +},{}],658:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118746,7 +115556,7 @@ function buttonsDefaults(menuIn, menuOut) { return buttonsOut; } -},{"../../lib":690,"../../plots/array_container_defaults":726,"./attributes":662,"./constants":663}],665:[function(require,module,exports){ +},{"../../lib":685,"../../plots/array_container_defaults":721,"./attributes":656,"./constants":657}],659:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119426,9 +116236,9 @@ function clearPushMargins(gd) { } } -},{"../../lib/svg_text_utils":709,"../../plots/plots":792,"../color":585,"../drawing":608,"../legend/anchor_utils":622,"./constants":663,"./scrollbox":667,"d3":114}],666:[function(require,module,exports){ -arguments[4][660][0].apply(exports,arguments) -},{"./attributes":662,"./constants":663,"./defaults":664,"./draw":665,"dup":660}],667:[function(require,module,exports){ +},{"../../lib/svg_text_utils":704,"../../plots/plots":787,"../color":578,"../drawing":602,"../legend/anchor_utils":616,"./constants":657,"./scrollbox":661,"d3":107}],660:[function(require,module,exports){ +arguments[4][654][0].apply(exports,arguments) +},{"./attributes":656,"./constants":657,"./defaults":658,"./draw":659,"dup":654}],661:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119899,7 +116709,7 @@ ScrollBox.prototype.setTranslate = function setTranslate(translateX, translateY) } }; -},{"../../lib":690,"../color":585,"../drawing":608,"d3":114}],668:[function(require,module,exports){ +},{"../../lib":685,"../color":578,"../drawing":602,"d3":107}],662:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119920,7 +116730,7 @@ module.exports = { longdashdot: [8, 1, 1, 1] }; -},{}],669:[function(require,module,exports){ +},{}],663:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119941,7 +116751,7 @@ module.exports = { longdashdot: [[0.5, 0.7, 0.8, 1], 10] }; -},{}],670:[function(require,module,exports){ +},{}],664:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119964,7 +116774,7 @@ module.exports = { x: '❌' }; -},{}],671:[function(require,module,exports){ +},{}],665:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119988,7 +116798,7 @@ module.exports = { DBLCLICKDELAY: 300 }; -},{}],672:[function(require,module,exports){ +},{}],666:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120041,7 +116851,7 @@ module.exports = { ALMOST_EQUAL: 1 - 1e-6 }; -},{}],673:[function(require,module,exports){ +},{}],667:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120079,7 +116889,7 @@ module.exports = { }; -},{}],674:[function(require,module,exports){ +},{}],668:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120103,7 +116913,7 @@ exports.svgAttrs = { 'xmlns:xlink': exports.xlink }; -},{}],675:[function(require,module,exports){ +},{}],669:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120121,7 +116931,7 @@ exports.svgAttrs = { var Plotly = require('./plotly'); // package version injected by `npm run preprocess` -exports.version = '1.25.2'; +exports.version = '1.26.1'; // inject promise polyfill require('es6-promise').polyfill(); @@ -120182,7 +116992,7 @@ exports.Queue = require('./lib/queue'); // export d3 used in the bundle exports.d3 = require('d3'); -},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":581,"./components/images":621,"./components/legend":629,"./components/rangeselector":641,"./components/rangeslider":647,"./components/shapes":654,"./components/sliders":660,"./components/updatemenus":666,"./fonts/mathjax_config":676,"./lib/queue":702,"./plot_api/plot_schema":718,"./plot_api/register":719,"./plot_api/set_plot_config":720,"./plot_api/to_image":722,"./plot_api/validate":723,"./plotly":724,"./snapshot":812,"./snapshot/download":809,"./traces/scatter":957,"d3":114,"es6-promise":120}],676:[function(require,module,exports){ +},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":574,"./components/images":615,"./components/legend":623,"./components/rangeselector":635,"./components/rangeslider":641,"./components/shapes":648,"./components/sliders":654,"./components/updatemenus":660,"./fonts/mathjax_config":670,"./lib/queue":697,"./plot_api/plot_schema":713,"./plot_api/register":714,"./plot_api/set_plot_config":715,"./plot_api/to_image":717,"./plot_api/validate":718,"./plotly":719,"./snapshot":807,"./snapshot/download":804,"./traces/scatter":986,"d3":107,"es6-promise":113}],670:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120215,7 +117025,7 @@ if(typeof MathJax !== 'undefined') { exports.MathJax = false; } -},{}],677:[function(require,module,exports){ +},{}],671:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120232,7 +117042,7 @@ module.exports = function arrayToCalcItem(traceAttr, calcItem, calcAttr, i) { if(Array.isArray(traceAttr)) calcItem[calcAttr] = traceAttr[i]; }; -},{}],678:[function(require,module,exports){ +},{}],672:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120265,7 +117075,7 @@ module.exports = function cleanNumber(v) { return BADNUM; }; -},{"../constants/numerical":672,"fast-isnumeric":123}],679:[function(require,module,exports){ +},{"../constants/numerical":666,"fast-isnumeric":116}],673:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120576,7 +117386,7 @@ exports.validate = function(value, opts) { return out !== failed; }; -},{"../components/colorscale/get_scale":597,"../components/colorscale/scales":603,"./nested_property":696,"fast-isnumeric":123,"tinycolor2":521}],680:[function(require,module,exports){ +},{"../components/colorscale/get_scale":590,"../components/colorscale/scales":596,"./nested_property":691,"fast-isnumeric":116,"tinycolor2":514}],674:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121204,7 +118014,36 @@ exports.findExactDates = function(data, calendar) { }; }; -},{"../constants/numerical":672,"../registry":807,"./loggers":693,"./mod":695,"d3":114,"fast-isnumeric":123}],681:[function(require,module,exports){ +},{"../constants/numerical":666,"../registry":802,"./loggers":688,"./mod":690,"d3":107,"fast-isnumeric":116}],675:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Ensures an array has the right amount of storage space. If it doesn't + * exist, it creates an array. If it does exist, it returns it if too + * short or truncates it in-place. + * + * The goal is to just reuse memory to avoid a bit of excessive garbage + * collection. + */ +module.exports = function ensureArray(out, n) { + if(!Array.isArray(out)) out = []; + + // If too long, truncate. (If too short, it will grow + // automatically so we don't care about that case) + out.length = n; + + return out; +}; + +},{}],676:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121370,7 +118209,7 @@ var Events = { module.exports = Events; -},{"events":121}],682:[function(require,module,exports){ +},{"events":114}],677:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121484,7 +118323,7 @@ function _extend(inputs, isDeep, keepAllKeys, noArrayCopies) { return target; } -},{"./is_plain_object.js":692}],683:[function(require,module,exports){ +},{"./is_plain_object.js":687}],678:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121535,7 +118374,7 @@ module.exports = function filterUnique(array) { return out; }; -},{}],684:[function(require,module,exports){ +},{}],679:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121566,7 +118405,7 @@ module.exports = function filterVisible(container) { return out; }; -},{}],685:[function(require,module,exports){ +},{}],680:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121628,7 +118467,7 @@ function countryNameToISO3(countryName) { return false; } -},{"../lib":690,"country-regex":99}],686:[function(require,module,exports){ +},{"../lib":685,"country-regex":100}],681:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121765,7 +118604,7 @@ exports.makeBlank = function() { }; }; -},{"../constants/numerical":672}],687:[function(require,module,exports){ +},{"../constants/numerical":666}],682:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121853,7 +118692,7 @@ function formatColor(containerIn, opacityIn, len) { module.exports = formatColor; -},{"../components/color/attributes":584,"../components/colorscale":599,"color-rgba":87,"fast-isnumeric":123}],688:[function(require,module,exports){ +},{"../components/color/attributes":577,"../components/colorscale":592,"color-rgba":88,"fast-isnumeric":116}],683:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121922,7 +118761,7 @@ function convertHTMLToUnicode(html) { module.exports = convertHTMLToUnicode; -},{"../constants/string_mappings":673,"superscript-text":517}],689:[function(require,module,exports){ +},{"../constants/string_mappings":667,"superscript-text":510}],684:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121938,7 +118777,7 @@ module.exports = convertHTMLToUnicode; module.exports = function identity(d) { return d; }; -},{}],690:[function(require,module,exports){ +},{}],685:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121960,6 +118799,7 @@ lib.isArray = require('./is_array'); lib.mod = require('./mod'); lib.toLogRange = require('./to_log_range'); lib.relinkPrivateKeys = require('./relink_private'); +lib.ensureArray = require('./ensure_array'); var coerceModule = require('./coerce'); lib.valObjects = coerceModule.valObjects; @@ -122578,7 +119418,7 @@ lib.numSeparate = function(value, separators, separatethousands) { return x1 + x2; }; -},{"./clean_number":678,"./coerce":679,"./dates":680,"./extend":682,"./filter_unique":683,"./filter_visible":684,"./identity":689,"./is_array":691,"./is_plain_object":692,"./loggers":693,"./matrix":694,"./mod":695,"./nested_property":696,"./noop":697,"./notifier":698,"./push_unique":701,"./relink_private":703,"./search":704,"./stats":707,"./to_log_range":710,"d3":114}],691:[function(require,module,exports){ +},{"./clean_number":672,"./coerce":673,"./dates":674,"./ensure_array":675,"./extend":677,"./filter_unique":678,"./filter_visible":679,"./identity":684,"./is_array":686,"./is_plain_object":687,"./loggers":688,"./matrix":689,"./mod":690,"./nested_property":691,"./noop":692,"./notifier":693,"./push_unique":696,"./relink_private":698,"./search":699,"./stats":702,"./to_log_range":705,"d3":107}],686:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122602,7 +119442,7 @@ module.exports = function isArray(a) { return Array.isArray(a) || ab.isView(a); }; -},{}],692:[function(require,module,exports){ +},{}],687:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122631,7 +119471,7 @@ module.exports = function isPlainObject(obj) { ); }; -},{}],693:[function(require,module,exports){ +},{}],688:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122705,7 +119545,7 @@ function apply(f, args) { } } -},{"../plot_api/plot_config":717}],694:[function(require,module,exports){ +},{"../plot_api/plot_config":712}],689:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122815,7 +119655,7 @@ exports.apply2DTransform2 = function(transform) { }; }; -},{}],695:[function(require,module,exports){ +},{}],690:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122835,7 +119675,7 @@ module.exports = function mod(v, d) { return out < 0 ? out + d : out; }; -},{}],696:[function(require,module,exports){ +},{}],691:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123139,7 +119979,7 @@ function badContainer(container, propStr, propParts) { }; } -},{"../plot_api/container_array_match":713,"./is_array":691,"./is_plain_object":692,"fast-isnumeric":123}],697:[function(require,module,exports){ +},{"../plot_api/container_array_match":708,"./is_array":686,"./is_plain_object":687,"fast-isnumeric":116}],692:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123155,7 +119995,7 @@ function badContainer(container, propStr, propParts) { module.exports = function noop() {}; -},{}],698:[function(require,module,exports){ +},{}],693:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123237,7 +120077,7 @@ module.exports = function(text, displayLength) { }); }; -},{"d3":114,"fast-isnumeric":123}],699:[function(require,module,exports){ +},{"d3":107,"fast-isnumeric":116}],694:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123286,7 +120126,7 @@ module.exports = function overrideCursor(el3, csr) { } }; -},{"./setcursor":705}],700:[function(require,module,exports){ +},{"./setcursor":700}],695:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123526,7 +120366,7 @@ polygon.filter = function filter(pts, tolerance) { }; }; -},{"./matrix":694}],701:[function(require,module,exports){ +},{"./matrix":689}],696:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123564,7 +120404,7 @@ module.exports = function pushUnique(array, item) { return array; }; -},{}],702:[function(require,module,exports){ +},{}],697:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123775,7 +120615,7 @@ queue.plotDo = function(gd, func, args) { module.exports = queue; -},{"../lib":690,"../plot_api/plot_config":717}],703:[function(require,module,exports){ +},{"../lib":685,"../plot_api/plot_config":712}],698:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123832,7 +120672,7 @@ module.exports = function relinkPrivateKeys(toContainer, fromContainer) { } }; -},{"./is_array":691,"./is_plain_object":692}],704:[function(require,module,exports){ +},{"./is_array":686,"./is_plain_object":687}],699:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123943,7 +120783,7 @@ exports.roundUp = function(val, arrayIn, reverse) { return arrayIn[low]; }; -},{"./loggers":693,"fast-isnumeric":123}],705:[function(require,module,exports){ +},{"./loggers":688,"fast-isnumeric":116}],700:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123966,7 +120806,7 @@ module.exports = function setCursor(el3, csr) { if(csr) el3.classed('cursor-' + csr, true); }; -},{}],706:[function(require,module,exports){ +},{}],701:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124015,7 +120855,7 @@ module.exports = function showWebGlMsg(scene) { return false; }; -},{"../components/color":585}],707:[function(require,module,exports){ +},{"../components/color":578}],702:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124111,7 +120951,7 @@ exports.interp = function(arr, n) { return frac * arr[Math.ceil(n)] + (1 - frac) * arr[Math.floor(n)]; }; -},{"fast-isnumeric":123}],708:[function(require,module,exports){ +},{"fast-isnumeric":116}],703:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124132,7 +120972,7 @@ function str2RgbaArray(color) { module.exports = str2RgbaArray; -},{"color-rgba":87}],709:[function(require,module,exports){ +},{"color-rgba":88}],704:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124673,7 +121513,7 @@ exports.makeEditable = function(context, _delegate, options) { return d3.rebind(this, dispatch, 'on'); }; -},{"../constants/string_mappings":673,"../constants/xmlns_namespaces":674,"../lib":690,"d3":114}],710:[function(require,module,exports){ +},{"../constants/string_mappings":667,"../constants/xmlns_namespaces":668,"../lib":685,"d3":107}],705:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124701,7 +121541,7 @@ module.exports = function toLogRange(val, range) { return newVal; }; -},{"fast-isnumeric":123}],711:[function(require,module,exports){ +},{"fast-isnumeric":116}],706:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124737,7 +121577,7 @@ topojsonUtils.getTopojsonFeatures = function(trace, topojson) { return topojsonFeature(topojson, obj).features; }; -},{"../plots/geo/constants":755,"topojson-client":523}],712:[function(require,module,exports){ +},{"../plots/geo/constants":750,"topojson-client":516}],707:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124771,7 +121611,7 @@ module.exports = function truncate(arrayIn, len) { throw new Error('This array type is not yet supported by `truncate`.'); }; -},{}],713:[function(require,module,exports){ +},{}],708:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -124829,7 +121669,7 @@ module.exports = function containerArrayMatch(astr) { return {array: arrayStr, index: Number(match[1]), property: match[3] || ''}; }; -},{"../registry":807}],714:[function(require,module,exports){ +},{"../registry":802}],709:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125350,7 +122190,7 @@ exports.hasParent = function(aobj, attr) { return false; }; -},{"../components/color":585,"../lib":690,"../plots/cartesian/axes":729,"../plots/plots":792,"../registry":807,"fast-isnumeric":123,"gl-mat4/fromQuat":169}],715:[function(require,module,exports){ +},{"../components/color":578,"../lib":685,"../plots/cartesian/axes":724,"../plots/plots":787,"../registry":802,"fast-isnumeric":116,"gl-mat4/fromQuat":162}],710:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125563,7 +122403,7 @@ exports.applyContainerArrayChanges = function applyContainerArrayChanges(gd, np, return true; }; -},{"../lib/is_plain_object":692,"../lib/loggers":693,"../lib/nested_property":696,"../lib/noop":697,"../registry":807,"./container_array_match":713}],716:[function(require,module,exports){ +},{"../lib/is_plain_object":687,"../lib/loggers":688,"../lib/nested_property":691,"../lib/noop":692,"../registry":802,"./container_array_match":708}],711:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125719,6 +122559,9 @@ Plotly.plot = function(gd, data, layout, config) { makePlotFramework(gd); } + // save initial show spikes once per graph + if(graphWasEmpty) Plotly.Axes.saveShowSpikeInitial(gd); + // prepare the data and find the autorange // generate calcdata, if we need to @@ -126860,6 +123703,7 @@ function _restyle(gd, aobj, _traces) { 'autobinx', 'nbinsx', 'xbins', 'xbins.start', 'xbins.end', 'xbins.size', 'autobiny', 'nbinsy', 'ybins', 'ybins.start', 'ybins.end', 'ybins.size', 'autocontour', 'ncontours', 'contours', 'contours.coloring', + 'contours.operation', 'contours.value', 'contours.type', 'contours.value[0]', 'contours.value[1]', 'error_y', 'error_y.visible', 'error_y.value', 'error_y.type', 'error_y.traceref', 'error_y.array', 'error_y.symmetric', 'error_y.arrayminus', 'error_y.valueminus', 'error_y.tracerefminus', @@ -126877,9 +123721,31 @@ function _restyle(gd, aobj, _traces) { 'line.showscale', 'line.cauto', 'line.autocolorscale', 'line.reversescale', 'marker.line.showscale', 'marker.line.cauto', 'marker.line.autocolorscale', 'marker.line.reversescale', 'xcalendar', 'ycalendar', - 'cumulative', 'cumulative.enabled', 'cumulative.direction', 'cumulative.currentbin' + 'cumulative', 'cumulative.enabled', 'cumulative.direction', 'cumulative.currentbin', + 'a0', 'da', 'b0', 'db', 'atype', 'btype', + 'cheaterslope', 'carpet', 'sum', + ]; + + var carpetAxisAttributes = [ + 'color', 'smoothing', 'title', 'titlefont', 'titlefont.size', 'titlefont.family', + 'titlefont.color', 'titleoffset', 'type', 'autorange', 'rangemode', 'range', + 'fixedrange', 'cheatertype', 'tickmode', 'nticks', 'tickvals', 'ticktext', + 'ticks', 'mirror', 'ticklen', 'tickwidth', 'tickcolor', 'showticklabels', + 'tickfont', 'tickfont.size', 'tickfont.family', 'tickfont.color', 'tickprefix', + 'showtickprefix', 'ticksuffix', 'showticksuffix', 'showexponent', 'exponentformat', + 'separatethousands', 'tickformat', 'categoryorder', 'categoryarray', 'labelpadding', + 'labelprefix', 'labelsuffix', 'labelfont', 'labelfont.family', 'labelfont.size', + 'labelfont.color', 'showline', 'linecolor', 'linewidth', 'gridcolor', 'gridwidth', + 'showgrid', 'minorgridcount', 'minorgridwidth', 'minorgridcolor', 'startline', + 'startlinecolor', 'startlinewidth', 'endline', 'endlinewidth', 'endlinecolor', + 'tick0', 'dtick', 'arraytick0', 'arraydtick', 'hoverformat', 'tickangle' ]; + for(i = 0; i < carpetAxisAttributes.length; i++) { + recalcAttrs.push('aaxis.' + carpetAxisAttributes[i]); + recalcAttrs.push('baxis.' + carpetAxisAttributes[i]); + } + for(i = 0; i < traces.length; i++) { if(Registry.traceIs(fullData[traces[i]], 'box')) { recalcAttrs.push('name'); @@ -127223,9 +124089,14 @@ function _restyle(gd, aobj, _traces) { doextra(axlist.map(rangeAttr), [0, 1], 0); } flags.docalc = true; + + } else if(replotAttrs.indexOf(aiAboveArray) !== -1) { + flags.doplot = true; + } else if(aiAboveArray.indexOf('aaxis') === 0 || aiAboveArray.indexOf('baxis') === 0) { + flags.doplot = true; + } else if(autorangeAttrs.indexOf(aiAboveArray) !== -1) { + flags.docalcAutorange = true; } - else if(replotAttrs.indexOf(aiAboveArray) !== -1) flags.doplot = true; - else if(autorangeAttrs.indexOf(aiAboveArray) !== -1) flags.docalcAutorange = true; } // do we need to force a recalc? @@ -127687,14 +124558,16 @@ function _relayout(gd, aobj) { flags.doticks = flags.dolayoutstyle = true; } /* - * hovermode and dragmode don't need any redrawing, since they just - * affect reaction to user input, everything else, assume full replot. + * hovermode, dragmode, and spikes don't need any redrawing, since they just + * affect reaction to user input. Everything else, assume full replot. * height, width, autosize get dealt with below. Except for the case of * of subplots - scenes - which require scene.updateFx to be called. */ - else if(['hovermode', 'dragmode'].indexOf(ai) !== -1) flags.domodebar = true; - else if(['hovermode', 'dragmode', 'height', - 'width', 'autosize'].indexOf(ai) === -1) { + else if(['hovermode', 'dragmode'].indexOf(ai) !== -1 || + ai.indexOf('spike') !== -1) { + flags.domodebar = true; + } + else if(['height', 'width', 'autosize'].indexOf(ai) === -1) { flags.doplot = true; } @@ -128545,7 +125418,7 @@ function makePlotFramework(gd) { gd.emit('plotly_framework'); } -},{"../components/drawing":608,"../components/errorbars":614,"../constants/xmlns_namespaces":674,"../lib":690,"../lib/events":681,"../lib/queue":702,"../lib/svg_text_utils":709,"../plotly":724,"../plots/cartesian/axis_ids":732,"../plots/cartesian/constants":734,"../plots/cartesian/constraints":736,"../plots/cartesian/graph_interact":738,"../plots/plots":792,"../plots/polar":795,"../registry":807,"./helpers":714,"./manage_arrays":715,"./subroutines":721,"d3":114,"fast-isnumeric":123}],717:[function(require,module,exports){ +},{"../components/drawing":602,"../components/errorbars":608,"../constants/xmlns_namespaces":668,"../lib":685,"../lib/events":676,"../lib/queue":697,"../lib/svg_text_utils":704,"../plotly":719,"../plots/cartesian/axis_ids":727,"../plots/cartesian/constants":729,"../plots/cartesian/constraints":731,"../plots/cartesian/graph_interact":733,"../plots/plots":787,"../plots/polar":790,"../registry":802,"./helpers":709,"./manage_arrays":710,"./subroutines":716,"d3":107,"fast-isnumeric":116}],712:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -128671,7 +125544,7 @@ function defaultSetBackground(gd, bgColor) { } } -},{}],718:[function(require,module,exports){ +},{}],713:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129077,7 +125950,7 @@ function insertAttrs(baseAttrs, newAttrs, astr) { np.set(extendDeep(np.get() || {}, newAttrs)); } -},{"../lib":690,"../plots/animation_attributes":725,"../plots/attributes":727,"../plots/frame_attributes":754,"../plots/layout_attributes":783,"../plots/polar/area_attributes":793,"../plots/polar/axis_attributes":794,"../registry":807}],719:[function(require,module,exports){ +},{"../lib":685,"../plots/animation_attributes":720,"../plots/attributes":722,"../plots/frame_attributes":749,"../plots/layout_attributes":778,"../plots/polar/area_attributes":788,"../plots/polar/axis_attributes":789,"../registry":802}],714:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129176,7 +126049,7 @@ function registerComponentModule(newModule) { Registry.registerComponent(newModule); } -},{"../lib":690,"../registry":807}],720:[function(require,module,exports){ +},{"../lib":685,"../registry":802}],715:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129202,7 +126075,7 @@ module.exports = function setPlotConfig(configObj) { return Lib.extendFlat(Plotly.defaultConfig, configObj); }; -},{"../lib":690,"../plotly":724}],721:[function(require,module,exports){ +},{"../lib":685,"../plotly":719}],716:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129609,7 +126482,7 @@ exports.doCamera = function(gd) { } }; -},{"../components/color":585,"../components/drawing":608,"../components/modebar":632,"../components/titles":661,"../lib":690,"../plotly":724,"../plots/plots":792,"../registry":807,"d3":114}],722:[function(require,module,exports){ +},{"../components/color":578,"../components/drawing":602,"../components/modebar":626,"../components/titles":655,"../lib":685,"../plotly":719,"../plots/plots":787,"../registry":802,"d3":107}],717:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129719,7 +126592,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":690,"../plotly":724,"../snapshot/cloneplot":808,"../snapshot/helpers":811,"../snapshot/svgtoimg":813,"../snapshot/tosvg":815,"fast-isnumeric":123}],723:[function(require,module,exports){ +},{"../lib":685,"../plotly":719,"../snapshot/cloneplot":803,"../snapshot/helpers":806,"../snapshot/svgtoimg":808,"../snapshot/tosvg":810,"fast-isnumeric":116}],718:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130090,7 +126963,7 @@ function convertPathToAttributeString(path) { return astr; } -},{"../lib":690,"../plots/plots":792,"./plot_schema":718}],724:[function(require,module,exports){ +},{"../lib":685,"../plots/plots":787,"./plot_schema":713}],719:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130123,7 +126996,7 @@ exports.ModeBar = require('./components/modebar'); // plot api require('./plot_api/plot_api'); -},{"./components/modebar":632,"./plot_api/plot_api":716,"./plot_api/plot_config":717,"./plots/cartesian/axes":729,"./plots/cartesian/graph_interact":738,"./plots/plots":792}],725:[function(require,module,exports){ +},{"./components/modebar":626,"./plot_api/plot_api":711,"./plot_api/plot_config":712,"./plots/cartesian/axes":724,"./plots/cartesian/graph_interact":733,"./plots/plots":787}],720:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130225,7 +127098,7 @@ module.exports = { } }; -},{}],726:[function(require,module,exports){ +},{}],721:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130306,7 +127179,7 @@ module.exports = function handleArrayContainerDefaults(parentObjIn, parentObjOut } }; -},{"../lib":690}],727:[function(require,module,exports){ +},{"../lib":685}],722:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130389,7 +127262,7 @@ module.exports = { } }; -},{}],728:[function(require,module,exports){ +},{}],723:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130416,7 +127289,7 @@ module.exports = { } }; -},{}],729:[function(require,module,exports){ +},{}],724:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130780,6 +127653,35 @@ axes.saveRangeInitial = function(gd, overwrite) { return hasOneAxisChanged; }; +// save a copy of the initial spike visibility +axes.saveShowSpikeInitial = function(gd, overwrite) { + var axList = axes.list(gd, '', true), + hasOneAxisChanged = false, + allEnabled = 'on'; + + for(var i = 0; i < axList.length; i++) { + var ax = axList[i]; + + var isNew = (ax._showSpikeInitial === undefined); + var hasChanged = ( + isNew || !( + ax.showspikes === ax._showspikes + ) + ); + + if((isNew) || (overwrite && hasChanged)) { + ax._showSpikeInitial = ax.showspikes; + hasOneAxisChanged = true; + } + + if(allEnabled === 'on' && !ax.showspikes) { + allEnabled = 'off'; + } + } + gd._fullLayout._cartesianSpikesEnabled = allEnabled; + return hasOneAxisChanged; +}; + // axes.expand: if autoranging, include new data in the outer limits // for this axis // data is an array of numbers (ie already run through ax.d2c) @@ -132022,7 +128924,7 @@ axes.doTicks = function(gd, axid, skipTitle) { // set scaling to pixels ax.setScale(); - var axletter = axid.charAt(0), + var axLetter = axid.charAt(0), counterLetter = axes.counterLetter(axid), vals = axes.calcTicks(ax), datafn = function(d) { return [d.text, d.x, ax.mirror].join('_'); }, @@ -132036,7 +128938,7 @@ axes.doTicks = function(gd, axid, skipTitle) { gridWidth = Drawing.crispRound(gd, ax.gridwidth, 1), zeroLineWidth = Drawing.crispRound(gd, ax.zerolinewidth, gridWidth), tickWidth = Drawing.crispRound(gd, ax.tickwidth, 1), - sides, transfn, tickpathfn, + sides, transfn, tickpathfn, subplots, i; if(ax._counterangle && ax.ticks === 'outside') { @@ -132046,7 +128948,7 @@ axes.doTicks = function(gd, axid, skipTitle) { } // positioning arguments for x vs y axes - if(axletter === 'x') { + if(axLetter === 'x') { sides = ['bottom', 'top']; transfn = function(d) { return 'translate(' + ax.l2p(d.x) + ',0)'; @@ -132059,7 +128961,7 @@ axes.doTicks = function(gd, axid, skipTitle) { else return 'M0,' + shift + 'v' + len; }; } - else if(axletter === 'y') { + else if(axLetter === 'y') { sides = ['left', 'right']; transfn = function(d) { return 'translate(0,' + ax.l2p(d.x) + ')'; @@ -132080,10 +128982,12 @@ axes.doTicks = function(gd, axid, skipTitle) { // which direction do the side[0], side[1], and free ticks go? // then we flip if outside XOR y axis ticksign = [-1, 1, axside === sides[1] ? 1 : -1]; - if((ax.ticks !== 'inside') === (axletter === 'x')) { + if((ax.ticks !== 'inside') === (axLetter === 'x')) { ticksign = ticksign.map(function(v) { return -v; }); } + if(!ax.visible) return; + // remove zero lines, grid lines, and inside ticks if they're within // 1 pixel of the end // The key case here is removing zero lines when the axis bound is zero. @@ -132114,12 +129018,12 @@ axes.doTicks = function(gd, axid, skipTitle) { var tickLabels = container.selectAll('g.' + tcls).data(vals, datafn); if(!ax.showticklabels || !isNumeric(position)) { tickLabels.remove(); - drawAxTitle(axid); + drawAxTitle(); return; } var labelx, labely, labelanchor, labelpos0, flipit; - if(axletter === 'x') { + if(axLetter === 'x') { flipit = (axside === 'bottom') ? 1 : -1; labelx = function(d) { return d.dx + labelShift * flipit; }; labelpos0 = position + (labelStandoff + pad) * flipit; @@ -132235,7 +129139,7 @@ axes.doTicks = function(gd, axid, skipTitle) { // check for auto-angling if x labels overlap // don't auto-angle at all for log axes with // base and digit format - if(axletter === 'x' && !isNumeric(ax.tickangle) && + if(axLetter === 'x' && !isNumeric(ax.tickangle) && (ax.type !== 'log' || String(ax.dtick).charAt(0) !== 'D')) { var lbbArray = []; tickLabels.each(function(d) { @@ -132280,12 +129184,59 @@ axes.doTicks = function(gd, axid, skipTitle) { // (so it can move out of the way if needed) // TODO: separate out scoot so we don't need to do // a full redraw of the title (mostly relevant for MathJax) - drawAxTitle(axid); + drawAxTitle(); return axid + ' done'; } function calcBoundingBox() { - ax._boundingBox = container.node().getBoundingClientRect(); + var bBox = container.node().getBoundingClientRect(); + var gdBB = gd.getBoundingClientRect(); + + /* + * the way we're going to use this, the positioning that matters + * is relative to the origin of gd. This is important particularly + * if gd is scrollable, and may have been scrolled between the time + * we calculate this and the time we use it + */ + ax._boundingBox = { + width: bBox.width, + height: bBox.height, + left: bBox.left - gdBB.left, + right: bBox.right - gdBB.left, + top: bBox.top - gdBB.top, + bottom: bBox.bottom - gdBB.top + }; + + /* + * for spikelines: what's the full domain of positions in the + * opposite direction that are associated with this axis? + * This means any axes that we make a subplot with, plus the + * position of the axis itself if it's free. + */ + if(subplots) { + var fullRange = ax._counterSpan = [Infinity, -Infinity]; + + for(i = 0; i < subplots.length; i++) { + var subplot = fullLayout._plots[subplots[i]]; + var counterAxis = subplot[(axLetter === 'x') ? 'yaxis' : 'xaxis']; + + extendRange(fullRange, [ + counterAxis._offset, + counterAxis._offset + counterAxis._length + ]); + } + + if(ax.anchor === 'free') { + extendRange(fullRange, (axLetter === 'x') ? + [ax._boundingBox.bottom, ax._boundingBox.top] : + [ax._boundingBox.right, ax._boundingBox.left]); + } + } + + function extendRange(range, newRange) { + range[0] = Math.min(range[0], newRange[0]); + range[1] = Math.max(range[1], newRange[1]); + } } var done = Lib.syncOrAsync([ @@ -132297,7 +129248,7 @@ axes.doTicks = function(gd, axid, skipTitle) { return done; } - function drawAxTitle(axid) { + function drawAxTitle() { if(skipTitle) return; // now this only applies to regular cartesian axes; colorbars and @@ -132368,16 +129319,16 @@ axes.doTicks = function(gd, axid, skipTitle) { function traceHasBarsOrFill(trace, subplot) { if(trace.visible !== true || trace.xaxis + trace.yaxis !== subplot) return false; - if(Registry.traceIs(trace, 'bar') && trace.orientation === {x: 'h', y: 'v'}[axletter]) return true; - return trace.fill && trace.fill.charAt(trace.fill.length - 1) === axletter; + if(Registry.traceIs(trace, 'bar') && trace.orientation === {x: 'h', y: 'v'}[axLetter]) return true; + return trace.fill && trace.fill.charAt(trace.fill.length - 1) === axLetter; } function drawGrid(plotinfo, counteraxis, subplot) { var gridcontainer = plotinfo.gridlayer, zlcontainer = plotinfo.zerolinelayer, - gridvals = plotinfo['hidegrid' + axletter] ? [] : valsClipped, + gridvals = plotinfo['hidegrid' + axLetter] ? [] : valsClipped, gridpath = ax._gridpath || - 'M0,0' + ((axletter === 'x') ? 'v' : 'h') + counteraxis._length, + 'M0,0' + ((axLetter === 'x') ? 'v' : 'h') + counteraxis._length, grid = gridcontainer.selectAll('path.' + gcls) .data((ax.showgrid === false) ? [] : gridvals, datafn); grid.enter().append('path').classed(gcls, 1) @@ -132431,12 +129382,13 @@ axes.doTicks = function(gd, axid, skipTitle) { return drawLabels(ax._axislayer, ax._pos); } else { - var alldone = axes.getSubplots(gd, ax).map(function(subplot) { + subplots = axes.getSubplots(gd, ax); + var alldone = subplots.map(function(subplot) { var plotinfo = fullLayout._plots[subplot]; if(!fullLayout._has('cartesian')) return; - var container = plotinfo[axletter + 'axislayer'], + var container = plotinfo[axLetter + 'axislayer'], // [bottom or left, top or right, free, main] linepositions = ax._linepositions[subplot] || [], @@ -132624,7 +129576,7 @@ function swapAxisAttrs(layout, key, xFullAxes, yFullAxes) { } } -},{"../../components/color":585,"../../components/drawing":608,"../../components/titles":661,"../../constants/numerical":672,"../../lib":690,"../../lib/svg_text_utils":709,"../../registry":807,"./axis_ids":732,"./layout_attributes":740,"./layout_defaults":741,"./set_convert":746,"d3":114,"fast-isnumeric":123}],730:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"../../components/titles":655,"../../constants/numerical":666,"../../lib":685,"../../lib/svg_text_utils":704,"../../registry":802,"./axis_ids":727,"./layout_attributes":735,"./layout_defaults":736,"./set_convert":741,"d3":107,"fast-isnumeric":116}],725:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132699,7 +129651,7 @@ function category(a) { return curvecats > curvenums * 2; } -},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],731:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],726:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132749,6 +129701,8 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, return Lib.coerce2(containerIn, containerOut, layoutAttributes, attr, dflt); } + var visible = coerce('visible', !options.cheateronly); + var axType = containerOut.type; if(axType === 'date') { @@ -132758,6 +129712,20 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, setConvert(containerOut, layoutOut); + var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range)); + + if(autoRange) coerce('rangemode'); + + coerce('range'); + containerOut.cleanRange(); + + handleCategoryOrderDefaults(containerIn, containerOut, coerce); + containerOut._initialCategories = axType === 'category' ? + orderedCategories(letter, containerOut.categoryorder, containerOut.categoryarray, options.data) : + []; + + if(!visible) return containerOut; + var dfltColor = coerce('color'); // if axis.color was provided, use it for fonts too; otherwise, // inherit from global font color in case that was provided. @@ -132770,17 +129738,9 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, color: dfltFontColor }); - var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range)); - - if(autoRange) coerce('rangemode'); - - coerce('range'); - containerOut.cleanRange(); - handleTickValueDefaults(containerIn, containerOut, coerce, axType); handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options); handleTickMarkDefaults(containerIn, containerOut, coerce, options); - handleCategoryOrderDefaults(containerIn, containerOut, coerce); var lineColor = coerce2('linecolor', dfltColor), lineWidth = coerce2('linewidth'), @@ -132811,15 +129771,10 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, delete containerOut.zerolinewidth; } - // fill in categories - containerOut._initialCategories = axType === 'category' ? - orderedCategories(letter, containerOut.categoryorder, containerOut.categoryarray, options.data) : - []; - return containerOut; }; -},{"../../components/color/attributes":584,"../../lib":690,"../../registry":807,"./category_order_defaults":733,"./layout_attributes":740,"./ordered_categories":742,"./set_convert":746,"./tick_label_defaults":747,"./tick_mark_defaults":748,"./tick_value_defaults":749,"tinycolor2":521}],732:[function(require,module,exports){ +},{"../../components/color/attributes":577,"../../lib":685,"../../registry":802,"./category_order_defaults":728,"./layout_attributes":735,"./ordered_categories":737,"./set_convert":741,"./tick_label_defaults":742,"./tick_mark_defaults":743,"./tick_value_defaults":744,"tinycolor2":514}],727:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132941,7 +129896,7 @@ exports.getFromTrace = function(gd, fullTrace, type) { return ax; }; -},{"../../lib":690,"../../registry":807,"../plots":792,"./constants":734}],733:[function(require,module,exports){ +},{"../../lib":685,"../../registry":802,"../plots":787,"./constants":729}],728:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132975,7 +129930,7 @@ module.exports = function handleCategoryOrderDefaults(containerIn, containerOut, } }; -},{}],734:[function(require,module,exports){ +},{}],729:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133045,7 +130000,7 @@ module.exports = { DFLTRANGEY: [-1, 4] }; -},{}],735:[function(require,module,exports){ +},{}],730:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133184,7 +130139,7 @@ function updateConstraintGroups(constraintGroups, thisGroup, thisID, scaleanchor thisGroup[scaleanchor] = 1; } -},{"../../lib":690,"./axis_ids":732}],736:[function(require,module,exports){ +},{"../../lib":685,"./axis_ids":727}],731:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133260,7 +130215,7 @@ module.exports = function enforceAxisConstraints(gd) { } }; -},{"../../constants/numerical":672,"./axis_ids":732,"./scale_zoom":744}],737:[function(require,module,exports){ +},{"../../constants/numerical":666,"./axis_ids":727,"./scale_zoom":739}],732:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134258,7 +131213,7 @@ function calcLinks(constraintGroups, xIDs, yIDs) { }; } -},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../lib":690,"../../lib/setcursor":705,"../../lib/svg_text_utils":709,"../../plotly":724,"../../registry":807,"./axes":729,"./axis_ids":732,"./constants":734,"./scale_zoom":744,"./select":745,"d3":114,"tinycolor2":521}],738:[function(require,module,exports){ +},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../lib":685,"../../lib/setcursor":700,"../../lib/svg_text_utils":704,"../../plotly":719,"../../registry":802,"./axes":724,"./axis_ids":727,"./constants":729,"./scale_zoom":739,"./select":740,"d3":107,"tinycolor2":514}],733:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134272,6 +131227,7 @@ function calcLinks(constraintGroups, xIDs, yIDs) { var d3 = require('d3'); var isNumeric = require('fast-isnumeric'); +var tinycolor = require('tinycolor2'); var Lib = require('../../lib'); var Events = require('../../lib/events'); @@ -134561,7 +131517,7 @@ fx.hover = function(gd, evt, subplot) { // The actual implementation is here: function hover(gd, evt, subplot) { - if(['pie', 'sankey'].indexOf(subplot) !== -1) { + if(subplot === 'pie') { gd.emit('plotly_hover', { event: evt.originalEvent, points: [evt] @@ -134728,6 +131684,11 @@ function hover(gd, evt, subplot) { if(!cd || !cd[0] || !cd[0].trace || cd[0].trace.visible !== true) continue; trace = cd[0].trace; + + // Explicitly bail out for these two. I don't know how to otherwise prevent + // the rest of this function from running and failing + if(['carpet', 'contourcarpet'].indexOf(trace._module.name) !== -1) continue; + subplotId = getSubplot(trace); subploti = subplots.indexOf(subplotId); @@ -134816,30 +131777,8 @@ function hover(gd, evt, subplot) { // nothing left: remove all labels and quit if(hoverData.length === 0) return dragElement.unhoverRaw(gd, evt); - // if there's more than one horz bar trace, - // rotate the labels so they don't overlap - var rotateLabels = hovermode === 'y' && searchData.length > 1; - hoverData.sort(function(d1, d2) { return d1.distance - d2.distance; }); - var bgColor = Color.combine( - fullLayout.plot_bgcolor || Color.background, - fullLayout.paper_bgcolor - ); - - var labelOpts = { - hovermode: hovermode, - rotateLabels: rotateLabels, - bgColor: bgColor, - container: fullLayout._hoverlayer, - outerContainer: fullLayout._paperdiv - }; - var hoverLabels = createHoverText(hoverData, labelOpts); - - hoverAvoidOverlaps(hoverData, rotateLabels ? 'xa' : 'ya'); - - alignHoverText(hoverLabels, rotateLabels); - // lastly, emit custom hover/unhover events var oldhoverdata = gd._hoverdata, newhoverdata = []; @@ -134871,6 +131810,39 @@ function hover(gd, evt, subplot) { gd._hoverdata = newhoverdata; + if(hoverChanged(gd, evt, oldhoverdata) && fullLayout._hasCartesian) { + var spikelineOpts = { + hovermode: hovermode, + fullLayout: fullLayout, + container: fullLayout._hoverlayer, + outerContainer: fullLayout._paperdiv + }; + createSpikelines(hoverData, spikelineOpts); + } + + // if there's more than one horz bar trace, + // rotate the labels so they don't overlap + var rotateLabels = hovermode === 'y' && searchData.length > 1; + + var bgColor = Color.combine( + fullLayout.plot_bgcolor || Color.background, + fullLayout.paper_bgcolor + ); + + var labelOpts = { + hovermode: hovermode, + rotateLabels: rotateLabels, + bgColor: bgColor, + container: fullLayout._hoverlayer, + outerContainer: fullLayout._paperdiv + }; + + var hoverLabels = createHoverText(hoverData, labelOpts); + + hoverAvoidOverlaps(hoverData, rotateLabels ? 'xa' : 'ya'); + + alignHoverText(hoverLabels, rotateLabels); + // TODO: tagName hack is needed to appease geo.js's hack of using evt.target=true // we should improve the "fx" API so other plots can use it without these hack. if(evt.target && evt.target.tagName) { @@ -134878,7 +131850,8 @@ function hover(gd, evt, subplot) { overrideCursor(d3.select(evt.target), hasClickToShow ? 'pointer' : ''); } - if(!hoverChanged(gd, evt, oldhoverdata)) return; + // don't emit events if called manually + if(!evt.target || !hoverChanged(gd, evt, oldhoverdata)) return; if(oldhoverdata) { gd.emit('plotly_unhover', { @@ -135098,8 +132071,142 @@ fx.loneUnhover = function(containerOrSelection) { d3.select(containerOrSelection); selection.selectAll('g.hovertext').remove(); + selection.selectAll('.spikeline').remove(); }; +function createSpikelines(hoverData, opts) { + var hovermode = opts.hovermode; + var container = opts.container; + var c0 = hoverData[0]; + var xa = c0.xa; + var ya = c0.ya; + var showX = xa.showspikes; + var showY = ya.showspikes; + + // Remove old spikeline items + container.selectAll('.spikeline').remove(); + + if(hovermode !== 'closest' || !(showX || showY)) return; + + var fullLayout = opts.fullLayout; + var xPoint = xa._offset + (c0.x0 + c0.x1) / 2; + var yPoint = ya._offset + (c0.y0 + c0.y1) / 2; + var contrastColor = Color.combine(fullLayout.plot_bgcolor, fullLayout.paper_bgcolor); + var dfltDashColor = tinycolor.readability(c0.color, contrastColor) < 1.5 ? + Color.contrast(contrastColor) : c0.color; + + if(showY) { + var yMode = ya.spikemode; + var yThickness = ya.spikethickness; + var yColor = ya.spikecolor || dfltDashColor; + var yBB = ya._boundingBox; + var xEdge = ((yBB.left + yBB.right) / 2) < xPoint ? yBB.right : yBB.left; + + if(yMode.indexOf('toaxis') !== -1 || yMode.indexOf('across') !== -1) { + var xBase = xEdge; + var xEndSpike = xPoint; + if(yMode.indexOf('across') !== -1) { + xBase = ya._counterSpan[0]; + xEndSpike = ya._counterSpan[1]; + } + + // Background horizontal Line (to y-axis) + container.append('line') + .attr({ + 'x1': xBase, + 'x2': xEndSpike, + 'y1': yPoint, + 'y2': yPoint, + 'stroke-width': yThickness + 2, + 'stroke': contrastColor + }) + .classed('spikeline', true) + .classed('crisp', true); + + // Foreground horizontal line (to y-axis) + container.append('line') + .attr({ + 'x1': xBase, + 'x2': xEndSpike, + 'y1': yPoint, + 'y2': yPoint, + 'stroke-width': yThickness, + 'stroke': yColor, + 'stroke-dasharray': Drawing.dashStyle(ya.spikedash, yThickness) + }) + .classed('spikeline', true) + .classed('crisp', true); + } + // Y axis marker + if(yMode.indexOf('marker') !== -1) { + container.append('circle') + .attr({ + 'cx': xEdge + (ya.side !== 'right' ? yThickness : -yThickness), + 'cy': yPoint, + 'r': yThickness, + 'fill': yColor + }) + .classed('spikeline', true); + } + } + + if(showX) { + var xMode = xa.spikemode; + var xThickness = xa.spikethickness; + var xColor = xa.spikecolor || dfltDashColor; + var xBB = xa._boundingBox; + var yEdge = ((xBB.top + xBB.bottom) / 2) < yPoint ? xBB.bottom : xBB.top; + + if(xMode.indexOf('toaxis') !== -1 || xMode.indexOf('across') !== -1) { + var yBase = yEdge; + var yEndSpike = yPoint; + if(xMode.indexOf('across') !== -1) { + yBase = xa._counterSpan[0]; + yEndSpike = xa._counterSpan[1]; + } + + // Background vertical line (to x-axis) + container.append('line') + .attr({ + 'x1': xPoint, + 'x2': xPoint, + 'y1': yBase, + 'y2': yEndSpike, + 'stroke-width': xThickness + 2, + 'stroke': contrastColor + }) + .classed('spikeline', true) + .classed('crisp', true); + + // Foreground vertical line (to x-axis) + container.append('line') + .attr({ + 'x1': xPoint, + 'x2': xPoint, + 'y1': yBase, + 'y2': yEndSpike, + 'stroke-width': xThickness, + 'stroke': xColor, + 'stroke-dasharray': Drawing.dashStyle(xa.spikedash, xThickness) + }) + .classed('spikeline', true) + .classed('crisp', true); + } + + // X axis marker + if(xMode.indexOf('marker') !== -1) { + container.append('circle') + .attr({ + 'cx': xPoint, + 'cy': yEdge - (xa.side !== 'top' ? xThickness : -xThickness), + 'r': xThickness, + 'fill': xColor + }) + .classed('spikeline', true); + } + } +} + function createHoverText(hoverData, opts) { var hovermode = opts.hovermode, rotateLabels = opts.rotateLabels, @@ -135620,9 +132727,7 @@ function alignHoverText(hoverLabels, rotateLabels) { } function hoverChanged(gd, evt, oldhoverdata) { - // don't emit any events if nothing changed or - // if fx.hover was called manually - if(!evt.target) return false; + // don't emit any events if nothing changed if(!oldhoverdata || oldhoverdata.length !== gd._hoverdata.length) return true; for(var i = oldhoverdata.length - 1; i >= 0; i--) { @@ -135669,7 +132774,7 @@ fx.inbox = function(v0, v1) { return Infinity; }; -},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../lib":690,"../../lib/events":681,"../../lib/override_cursor":699,"../../lib/svg_text_utils":709,"../../registry":807,"../layout_attributes":783,"./axes":729,"./constants":734,"./dragbox":737,"d3":114,"fast-isnumeric":123}],739:[function(require,module,exports){ +},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../lib":685,"../../lib/events":676,"../../lib/override_cursor":694,"../../lib/svg_text_utils":704,"../../registry":802,"../layout_attributes":778,"./axes":724,"./constants":729,"./dragbox":732,"d3":107,"fast-isnumeric":116,"tinycolor2":514}],734:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135735,8 +132840,11 @@ exports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) { // Skip trace if whitelist provided and it's not whitelisted: // if (Array.isArray(traces) && traces.indexOf(i) === -1) continue; if(trace.xaxis + trace.yaxis === subplot) { + // XXX: Should trace carpet dependencies. Only replot all carpet plots if the carpet + // axis has actually changed: + // // If this trace is specifically requested, add it to the list: - if(traces.indexOf(trace.index) !== -1) { + if(traces.indexOf(trace.index) !== -1 || trace.carpet) { // Okay, so example: traces 0, 1, and 2 have fill = tonext. You animate // traces 0 and 2. Trace 1 also needs to be updated, otherwise its fill // is outdated. So this retroactively adds the previous trace if the @@ -135972,6 +133080,7 @@ function makeSubplotLayer(plotinfo) { joinLayer(parent, 'g', 'imagelayer'); joinLayer(parent, 'g', 'maplayer'); joinLayer(parent, 'g', 'barlayer'); + joinLayer(parent, 'g', 'carpetlayer'); joinLayer(parent, 'g', 'boxlayer'); joinLayer(parent, 'g', 'scatterlayer'); } @@ -136054,7 +133163,7 @@ function joinLayer(parent, nodeType, className) { return layer; } -},{"../../lib":690,"../plots":792,"./attributes":728,"./axis_ids":732,"./constants":734,"./layout_attributes":740,"./transition_axes":750,"d3":114}],740:[function(require,module,exports){ +},{"../../lib":685,"../plots":787,"./attributes":723,"./axis_ids":727,"./constants":729,"./layout_attributes":735,"./transition_axes":745,"d3":107}],735:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136067,12 +133176,18 @@ function joinLayer(parent, nodeType, className) { var fontAttrs = require('../font_attributes'); var colorAttrs = require('../../components/color/attributes'); +var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; var constants = require('./constants'); module.exports = { + visible: { + valType: 'boolean', + + + }, color: { valType: 'color', dflt: colorAttrs.defaultLine, @@ -136214,6 +133329,32 @@ module.exports = { dflt: true, + }, + showspikes: { + valType: 'boolean', + dflt: false, + + + }, + spikecolor: { + valType: 'color', + dflt: null, + + + }, + spikethickness: { + valType: 'number', + dflt: 3, + + + }, + spikedash: extendFlat({}, dash, {dflt: 'dash'}), + spikemode: { + valType: 'flaglist', + flags: ['toaxis', 'across', 'marker'], + + dflt: 'toaxis', + }, tickfont: extendFlat({}, fontAttrs, { @@ -136414,7 +133555,7 @@ module.exports = { } }; -},{"../../components/color/attributes":584,"../../lib/extend":682,"../font_attributes":753,"./constants":734}],741:[function(require,module,exports){ +},{"../../components/color/attributes":577,"../../components/drawing/attributes":601,"../../lib/extend":677,"../font_attributes":748,"./constants":729}],736:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136446,6 +133587,8 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { yaListCartesian = [], xaListGl2d = [], yaListGl2d = [], + xaListCheater = [], + xaListNonCheater = [], outerTicks = {}, noGrids = {}, i; @@ -136468,6 +133611,21 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { var xaName = axisIds.id2name(trace.xaxis), yaName = axisIds.id2name(trace.yaxis); + // Two things trigger axis visibility: + // 1. is not carpet + // 2. carpet that's not cheater + if(!Registry.traceIs(trace, 'carpet') || (trace.type === 'carpet' && !trace._cheater)) { + if(xaName) Lib.pushUnique(xaListNonCheater, xaName); + } + + // The above check for definitely-not-cheater is not adequate. This + // second list tracks which axes *could* be a cheater so that the + // full condition triggering hiding is: + // *could* be a cheater and *is not definitely visible* + if(trace.type === 'carpet' && trace._cheater) { + if(xaName) Lib.pushUnique(xaListCheater, xaName); + } + // add axes implied by traces if(xaName && listX.indexOf(xaName) === -1) listX.push(xaName); if(yaName && listY.indexOf(yaName) === -1) listY.push(yaName); @@ -136585,11 +133743,20 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { showGrid: !noGrids[axName], data: fullData, bgColor: bgColor, - calendar: layoutOut.calendar + calendar: layoutOut.calendar, + cheateronly: axLetter === 'x' && (xaListCheater.indexOf(axName) !== -1 && xaListNonCheater.indexOf(axName) === -1) }; handleAxisDefaults(axLayoutIn, axLayoutOut, coerce, defaultOptions, layoutOut); + var showSpikes = coerce('showspikes'); + if(showSpikes) { + coerce('spikecolor'); + coerce('spikethickness'); + coerce('spikedash'); + coerce('spikemode'); + } + var positioningOptions = { letter: axLetter, counterAxes: counterAxes[axLetter], @@ -136661,7 +133828,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { } }; -},{"../../components/color":585,"../../lib":690,"../../registry":807,"../layout_attributes":783,"./axis_defaults":731,"./axis_ids":732,"./constants":734,"./constraint_defaults":735,"./layout_attributes":740,"./position_defaults":743,"./type_defaults":751}],742:[function(require,module,exports){ +},{"../../components/color":578,"../../lib":685,"../../registry":802,"../layout_attributes":778,"./axis_defaults":726,"./axis_ids":727,"./constants":729,"./constraint_defaults":730,"./layout_attributes":735,"./position_defaults":738,"./type_defaults":746}],737:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136740,7 +133907,7 @@ module.exports = function orderedCategories(axisLetter, categoryorder, categorya } }; -},{"d3":114}],743:[function(require,module,exports){ +},{"d3":107}],738:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136805,7 +133972,7 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer return containerOut; }; -},{"../../lib":690,"fast-isnumeric":123}],744:[function(require,module,exports){ +},{"../../lib":685,"fast-isnumeric":116}],739:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136830,7 +133997,7 @@ module.exports = function scaleZoom(ax, factor, centerFraction) { ]; }; -},{}],745:[function(require,module,exports){ +},{}],740:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137030,7 +134197,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) { }; }; -},{"../../components/color":585,"../../lib/polygon":700,"./axes":729,"./constants":734}],746:[function(require,module,exports){ +},{"../../components/color":578,"../../lib/polygon":695,"./axes":724,"./constants":729}],741:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137473,7 +134640,7 @@ module.exports = function setConvert(ax, fullLayout) { delete ax._forceTick0; }; -},{"../../constants/numerical":672,"../../lib":690,"./axis_ids":732,"./constants":734,"d3":114,"fast-isnumeric":123}],747:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685,"./axis_ids":727,"./constants":729,"d3":107,"fast-isnumeric":116}],742:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137557,7 +134724,7 @@ function getShowAttrDflt(containerIn) { } } -},{"../../lib":690}],748:[function(require,module,exports){ +},{"../../lib":685}],743:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137590,7 +134757,7 @@ module.exports = function handleTickDefaults(containerIn, containerOut, coerce, } }; -},{"../../lib":690,"./layout_attributes":740}],749:[function(require,module,exports){ +},{"../../lib":685,"./layout_attributes":735}],744:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137674,7 +134841,7 @@ module.exports = function handleTickValueDefaults(containerIn, containerOut, coe } }; -},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],750:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],745:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137986,7 +135153,7 @@ module.exports = function transitionAxes(gd, newLayout, transitionOpts, makeOnCo return Promise.resolve(); }; -},{"../../components/drawing":608,"../../plotly":724,"../../registry":807,"./axes":729,"d3":114}],751:[function(require,module,exports){ +},{"../../components/drawing":602,"../../plotly":719,"../../registry":802,"./axes":724,"d3":107}],746:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138114,7 +135281,7 @@ function isBoxWithoutPositionCoords(trace, axLetter) { ); } -},{"../../registry":807,"./axis_autotype":730,"./axis_ids":732}],752:[function(require,module,exports){ +},{"../../registry":802,"./axis_autotype":725,"./axis_ids":727}],747:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138539,7 +135706,7 @@ function crawl(attrs, callback, path, depth) { }); } -},{"../lib":690,"../plotly":724}],753:[function(require,module,exports){ +},{"../lib":685,"../plotly":719}],748:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138570,7 +135737,7 @@ module.exports = { } }; -},{}],754:[function(require,module,exports){ +},{}],749:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138616,7 +135783,7 @@ module.exports = { } }; -},{}],755:[function(require,module,exports){ +},{}],750:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138776,7 +135943,7 @@ params.layerNameToAdjective = { // base layers drawn over choropleth params.baseLayersOverChoropleth = ['rivers', 'lakes']; -},{}],756:[function(require,module,exports){ +},{}],751:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139249,7 +136416,7 @@ function createMockAxis(fullLayout) { return mockAxis; } -},{"../../components/color":585,"../../components/drawing":608,"../../lib/topojson_utils":711,"../cartesian/axes":729,"../cartesian/graph_interact":738,"../plots":792,"./constants":755,"./projections":763,"./set_scale":764,"./zoom":765,"./zoom_reset":766,"d3":114,"topojson-client":523}],757:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"../../lib/topojson_utils":706,"../cartesian/axes":724,"../cartesian/graph_interact":733,"../plots":787,"./constants":750,"./projections":758,"./set_scale":759,"./zoom":760,"./zoom_reset":761,"d3":107,"topojson-client":516}],752:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139329,7 +136496,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) } }; -},{"../../plots/plots":792,"./geo":756,"./layout/attributes":758,"./layout/defaults":761,"./layout/layout_attributes":762}],758:[function(require,module,exports){ +},{"../../plots/plots":787,"./geo":751,"./layout/attributes":753,"./layout/defaults":756,"./layout/layout_attributes":757}],753:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139350,7 +136517,7 @@ module.exports = { } }; -},{}],759:[function(require,module,exports){ +},{}],754:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139405,7 +136572,7 @@ module.exports = { } }; -},{"../../../components/color/attributes":584}],760:[function(require,module,exports){ +},{"../../../components/color/attributes":577}],755:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139479,7 +136646,7 @@ module.exports = function supplyGeoAxisLayoutDefaults(geoLayoutIn, geoLayoutOut) } }; -},{"../../../lib":690,"../constants":755,"./axis_attributes":759}],761:[function(require,module,exports){ +},{"../../../lib":685,"../constants":750,"./axis_attributes":754}],756:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139598,7 +136765,7 @@ function handleGeoDefaults(geoLayoutIn, geoLayoutOut, coerce) { ]; } -},{"../../subplot_defaults":799,"../constants":755,"./axis_defaults":760,"./layout_attributes":762}],762:[function(require,module,exports){ +},{"../../subplot_defaults":794,"../constants":750,"./axis_defaults":755,"./layout_attributes":757}],757:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139831,7 +136998,7 @@ module.exports = { lataxis: geoAxesAttrs }; -},{"../../../components/color/attributes":584,"../constants":755,"./axis_attributes":759}],763:[function(require,module,exports){ +},{"../../../components/color/attributes":577,"../constants":750,"./axis_attributes":754}],758:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140277,7 +137444,7 @@ function addProjectionsToD3(d3) { module.exports = addProjectionsToD3; -},{}],764:[function(require,module,exports){ +},{}],759:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140428,7 +137595,7 @@ function getBounds(projection, rangeBox) { return d3.geo.path().projection(projection).bounds(rangeBox); } -},{"./constants":755,"d3":114}],765:[function(require,module,exports){ +},{"./constants":750,"d3":107}],760:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140855,7 +138022,7 @@ function d3_eventDispatch(target) { return dispatch; } -},{"d3":114}],766:[function(require,module,exports){ +},{"d3":107}],761:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140884,7 +138051,7 @@ module.exports = function createGeoZoomReset(geo, geoLayout) { return zoomReset; }; -},{}],767:[function(require,module,exports){ +},{}],762:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141162,7 +138329,7 @@ function createCamera(scene) { return result; } -},{"../cartesian/constants":734,"mouse-change":441,"mouse-wheel":444}],768:[function(require,module,exports){ +},{"../cartesian/constants":729,"mouse-change":434,"mouse-wheel":437}],763:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141408,7 +138575,7 @@ function createAxes2D(scene) { module.exports = createAxes2D; -},{"../../lib/html2unicode":688,"../../lib/str2rgbarray":708,"../cartesian/axes":729,"../plots":792}],769:[function(require,module,exports){ +},{"../../lib/html2unicode":683,"../../lib/str2rgbarray":703,"../cartesian/axes":724,"../plots":787}],764:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141520,7 +138687,7 @@ exports.toSVG = function(gd) { } }; -},{"../../constants/xmlns_namespaces":674,"../cartesian/attributes":728,"../plots":792,"./scene2d":770}],770:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":668,"../cartesian/attributes":723,"../plots":787,"./scene2d":765}],765:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142191,7 +139358,7 @@ proto.hoverFormatter = function(axisName, val) { return Axes.tickText(axis, axis.c2l(val), 'hover').text; }; -},{"../../lib/html2unicode":688,"../../lib/show_no_webgl_msg":706,"../../plots/cartesian/axes":729,"../../plots/cartesian/constraints":736,"../../plots/cartesian/graph_interact":738,"../../registry":807,"./camera":767,"./convert":768,"gl-plot2d":210,"gl-select-box":244,"gl-spikes2d":253,"webgl-context":550}],771:[function(require,module,exports){ +},{"../../lib/html2unicode":683,"../../lib/show_no_webgl_msg":701,"../../plots/cartesian/axes":724,"../../plots/cartesian/constraints":731,"../../plots/cartesian/graph_interact":733,"../../registry":802,"./camera":762,"./convert":763,"gl-plot2d":203,"gl-select-box":237,"gl-spikes2d":246,"webgl-context":543}],766:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142440,7 +139607,7 @@ function createCamera(element, options) { return camera; } -},{"3d-view":31,"mouse-change":441,"mouse-wheel":444,"right-now":490}],772:[function(require,module,exports){ +},{"3d-view":33,"mouse-change":434,"mouse-wheel":437,"right-now":483}],767:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142557,7 +139724,7 @@ exports.cleanId = function cleanId(id) { return 'scene' + sceneNum; }; -},{"../../constants/xmlns_namespaces":674,"../../lib":690,"../plots":792,"./layout/attributes":773,"./layout/defaults":777,"./layout/layout_attributes":778,"./scene":782}],773:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":668,"../../lib":685,"../plots":787,"./layout/attributes":768,"./layout/defaults":772,"./layout/layout_attributes":773,"./scene":777}],768:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142578,7 +139745,7 @@ module.exports = { } }; -},{}],774:[function(require,module,exports){ +},{}],769:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142595,6 +139762,7 @@ var extendFlat = require('../../../lib/extend').extendFlat; module.exports = { + visible: axesAttrs.visible, showspikes: { valType: 'boolean', @@ -142684,7 +139852,7 @@ module.exports = { zerolinewidth: axesAttrs.zerolinewidth }; -},{"../../../components/color":585,"../../../lib/extend":682,"../../cartesian/layout_attributes":740}],775:[function(require,module,exports){ +},{"../../../components/color":578,"../../../lib/extend":677,"../../cartesian/layout_attributes":735}],770:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142756,7 +139924,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { } }; -},{"../../../lib":690,"../../cartesian/axis_defaults":731,"../../cartesian/type_defaults":751,"./axis_attributes":774,"tinycolor2":521}],776:[function(require,module,exports){ +},{"../../../lib":685,"../../cartesian/axis_defaults":726,"../../cartesian/type_defaults":746,"./axis_attributes":769,"tinycolor2":514}],771:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142768,12 +139936,9 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { 'use strict'; -var arrtools = require('arraytools'); var convertHTMLToUnicode = require('../../../lib/html2unicode'); var str2RgbaArray = require('../../../lib/str2rgbarray'); -var arrayCopy1D = arrtools.copy1D; - var AXES_NAMES = ['xaxis', 'yaxis', 'zaxis']; function AxesOptions() { @@ -142823,9 +139988,9 @@ function AxesOptions() { [0.8, 0.8, 0.8, 0.5] ]; // some default values are stored for applying model transforms - this._defaultTickPad = arrayCopy1D(this.tickPad); - this._defaultLabelPad = arrayCopy1D(this.labelPad); - this._defaultLineTickLength = arrayCopy1D(this.lineTickLength); + this._defaultTickPad = this.tickPad.slice(); + this._defaultLabelPad = this.labelPad.slice(); + this._defaultLineTickLength = this.lineTickLength.slice(); } var proto = AxesOptions.prototype; @@ -142835,6 +140000,17 @@ proto.merge = function(sceneLayout) { for(var i = 0; i < 3; ++i) { var axes = sceneLayout[AXES_NAMES[i]]; + if(!axes.visible) { + opts.tickEnable[i] = false; + opts.labelEnable[i] = false; + opts.lineEnable[i] = false; + opts.lineTickEnable[i] = false; + opts.gridEnable[i] = false; + opts.zeroEnable[i] = false; + opts.backgroundEnable[i] = false; + continue; + } + // Axes labels opts.labels[i] = convertHTMLToUnicode(axes.title); if('titlefont' in axes) { @@ -142911,7 +140087,7 @@ function createAxesOptions(plotlyOptions) { module.exports = createAxesOptions; -},{"../../../lib/html2unicode":688,"../../../lib/str2rgbarray":708,"arraytools":38}],777:[function(require,module,exports){ +},{"../../../lib/html2unicode":683,"../../../lib/str2rgbarray":703}],772:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143015,7 +140191,7 @@ function handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) { coerce('hovermode', opts.getDfltFromLayout('hovermode')); } -},{"../../../components/color":585,"../../../lib":690,"../../subplot_defaults":799,"./axis_defaults":775,"./layout_attributes":778}],778:[function(require,module,exports){ +},{"../../../components/color":578,"../../../lib":685,"../../subplot_defaults":794,"./axis_defaults":770,"./layout_attributes":773}],773:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143143,7 +140319,7 @@ module.exports = { } }; -},{"../../../lib/extend":682,"./axis_attributes":774}],779:[function(require,module,exports){ +},{"../../../lib/extend":677,"./axis_attributes":769}],774:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143174,6 +140350,12 @@ proto.merge = function(sceneLayout) { for(var i = 0; i < 3; ++i) { var axes = sceneLayout[AXES_NAMES[i]]; + if(!axes.visible) { + this.enabled[i] = false; + this.drawSides[i] = false; + continue; + } + this.enabled[i] = axes.showspikes; this.colors[i] = str2RGBArray(axes.spikecolor); this.drawSides[i] = axes.spikesides; @@ -143189,7 +140371,7 @@ function createSpikeOptions(layout) { module.exports = createSpikeOptions; -},{"../../../lib/str2rgbarray":708}],780:[function(require,module,exports){ +},{"../../../lib/str2rgbarray":703}],775:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143285,7 +140467,7 @@ function computeTickMarks(scene) { scene.contourLevels = contourLevelsFromTicks(ticks); } -},{"../../../lib":690,"../../../lib/html2unicode":688,"../../cartesian/axes":729}],781:[function(require,module,exports){ +},{"../../../lib":685,"../../../lib/html2unicode":683,"../../cartesian/axes":724}],776:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143319,7 +140501,7 @@ function project(camera, v) { module.exports = project; -},{}],782:[function(require,module,exports){ +},{}],777:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144042,7 +141224,7 @@ proto.setConvert = function() { module.exports = Scene; -},{"../../lib":690,"../../lib/show_no_webgl_msg":706,"../../lib/str2rgbarray":708,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"./camera":771,"./layout/convert":776,"./layout/spikes":779,"./layout/tick_marks":780,"./project":781,"gl-plot3d":212,"webgl-context":550}],783:[function(require,module,exports){ +},{"../../lib":685,"../../lib/show_no_webgl_msg":701,"../../lib/str2rgbarray":703,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"./camera":766,"./layout/convert":771,"./layout/spikes":774,"./layout/tick_marks":775,"./project":776,"gl-plot3d":205,"webgl-context":543}],778:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144198,7 +141380,7 @@ module.exports = { } }; -},{"../components/color/attributes":584,"../lib":690,"./font_attributes":753}],784:[function(require,module,exports){ +},{"../components/color/attributes":577,"../lib":685,"./font_attributes":748}],779:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144228,7 +141410,7 @@ module.exports = { mapOnErrorMsg: 'Mapbox error.' }; -},{}],785:[function(require,module,exports){ +},{}],780:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144302,7 +141484,7 @@ module.exports = function convertTextOpts(textposition, iconSize) { return { anchor: anchor, offset: offset }; }; -},{"../../lib":690}],786:[function(require,module,exports){ +},{"../../lib":685}],781:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144445,7 +141627,7 @@ function findAccessToken(gd, mapboxIds) { return accessToken; } -},{"../../constants/xmlns_namespaces":674,"../plots":792,"./constants":784,"./layout_attributes":788,"./layout_defaults":789,"./mapbox":790,"mapbox-gl":332}],787:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":668,"../plots":787,"./constants":779,"./layout_attributes":783,"./layout_defaults":784,"./mapbox":785,"mapbox-gl":325}],782:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144670,7 +141852,7 @@ module.exports = function createMapboxLayer(mapbox, index, opts) { return mapboxLayer; }; -},{"../../lib":690,"./convert_text_opts":785}],788:[function(require,module,exports){ +},{"../../lib":685,"./convert_text_opts":780}],783:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144874,7 +142056,7 @@ module.exports = { }; -},{"../../components/color":585,"../../lib":690,"../../traces/scatter/attributes":947,"../font_attributes":753}],789:[function(require,module,exports){ +},{"../../components/color":578,"../../lib":685,"../../traces/scatter/attributes":976,"../font_attributes":748}],784:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144970,7 +142152,7 @@ function handleLayerDefaults(containerIn, containerOut) { } } -},{"../../lib":690,"../subplot_defaults":799,"./layout_attributes":788}],790:[function(require,module,exports){ +},{"../../lib":685,"../subplot_defaults":794,"./layout_attributes":783}],785:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145434,7 +142616,7 @@ function convertCenter(center) { return [center.lon, center.lat]; } -},{"../../lib":690,"../cartesian/graph_interact":738,"./constants":784,"./layers":787,"./layout_attributes":788,"mapbox-gl":332}],791:[function(require,module,exports){ +},{"../../lib":685,"../cartesian/graph_interact":733,"./constants":779,"./layers":782,"./layout_attributes":783,"mapbox-gl":325}],786:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -145472,7 +142654,7 @@ module.exports = { } }; -},{}],792:[function(require,module,exports){ +},{}],787:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146053,6 +143235,7 @@ plots.cleanPlot = function(newFullData, newFullLayout, oldFullData, oldFullLayou var query = ( '.hm' + oldUid + ',.contour' + oldUid + + ',.carpet' + oldUid + ',#clip' + oldUid + ',.trace' + oldUid ); @@ -146107,6 +143290,7 @@ plots.linkSubplots = function(newFullData, newFullLayout, oldFullData, oldFullLa }; plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) { + var i, fullTrace, trace; var modules = fullLayout._modules = [], basePlotModules = fullLayout._basePlotModules = [], cnt = 0; @@ -146125,9 +143309,12 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) { cnt++; } - for(var i = 0; i < dataIn.length; i++) { - var trace = dataIn[i], - fullTrace = plots.supplyTraceDefaults(trace, cnt, fullLayout, i); + var carpetIndex = {}; + var carpetDependents = []; + + for(i = 0; i < dataIn.length; i++) { + trace = dataIn[i]; + fullTrace = plots.supplyTraceDefaults(trace, cnt, fullLayout, i); fullTrace.index = i; fullTrace._input = trace; @@ -146164,6 +143351,31 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) { pushModule(fullTrace); } + + if(Registry.traceIs(fullTrace, 'carpetAxis')) { + carpetIndex[fullTrace.carpet] = fullTrace; + } + + if(Registry.traceIs(fullTrace, 'carpetDependent')) { + carpetDependents.push(i); + } + } + + for(i = 0; i < carpetDependents.length; i++) { + fullTrace = dataOut[carpetDependents[i]]; + + if(!fullTrace.visible) continue; + + var carpetAxis = carpetIndex[fullTrace.carpet]; + fullTrace._carpet = carpetAxis; + + if(!carpetAxis || !carpetAxis.visible) { + fullTrace.visible = false; + continue; + } + + fullTrace.xaxis = carpetAxis.xaxis; + fullTrace.yaxis = carpetAxis.yaxis; } }; @@ -146286,6 +143498,11 @@ plots.supplyTraceDefaults = function(traceIn, traceOutIndex, layout, traceInInde // gets overwritten in pie, geo and ternary modules coerce('hoverinfo', (layout._dataLength === 1) ? 'x+y+z+text' : undefined); + if(plots.traceIs(traceOut, 'showLegend')) { + coerce('showlegend'); + coerce('legendgroup'); + } + // TODO add per-base-plot-module trace defaults step if(_module) _module.supplyDefaults(traceIn, traceOut, defaultColor, layout); @@ -146298,9 +143515,10 @@ plots.supplyTraceDefaults = function(traceIn, traceOutIndex, layout, traceInInde coerceSubplotAttr('gl2d', 'xaxis'); coerceSubplotAttr('gl2d', 'yaxis'); - if(plots.traceIs(traceOut, 'showLegend')) { - coerce('showlegend'); - coerce('legendgroup'); + if(plots.traceIs(traceOut, 'notLegendIsolatable')) { + // This clears out the legendonly state for traces like carpet that + // cannot be isolated in the legend + traceOut.visible = !!traceOut.visible; } plots.supplyTransformDefaults(traceIn, traceOut, layout); @@ -147597,7 +144815,7 @@ plots.generalUpdatePerTraceModule = function(subplot, subplotCalcData, subplotLa subplot.traceHash = traceHash; }; -},{"../components/color":585,"../components/errorbars":614,"../constants/numerical":672,"../lib":690,"../plotly":724,"../registry":807,"./animation_attributes":725,"./attributes":727,"./command":752,"./font_attributes":753,"./frame_attributes":754,"./layout_attributes":783,"d3":114,"fast-isnumeric":123}],793:[function(require,module,exports){ +},{"../components/color":578,"../components/errorbars":608,"../constants/numerical":666,"../lib":685,"../plotly":719,"../registry":802,"./animation_attributes":720,"./attributes":722,"./command":747,"./font_attributes":748,"./frame_attributes":749,"./layout_attributes":778,"d3":107,"fast-isnumeric":116}],788:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147622,7 +144840,7 @@ module.exports = { } }; -},{"../../traces/scatter/attributes":947}],794:[function(require,module,exports){ +},{"../../traces/scatter/attributes":976}],789:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147737,7 +144955,7 @@ module.exports = { } }; -},{"../../lib/extend":682,"../cartesian/layout_attributes":740}],795:[function(require,module,exports){ +},{"../../lib/extend":677,"../cartesian/layout_attributes":735}],790:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147752,7 +144970,7 @@ var Polar = module.exports = require('./micropolar'); Polar.manager = require('./micropolar_manager'); -},{"./micropolar":796,"./micropolar_manager":797}],796:[function(require,module,exports){ +},{"./micropolar":791,"./micropolar_manager":792}],791:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149171,7 +146389,7 @@ var µ = module.exports = { version: '0.2.2' }; return exports; }; -},{"../../lib":690,"d3":114}],797:[function(require,module,exports){ +},{"../../lib":685,"d3":107}],792:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149257,7 +146475,7 @@ manager.fillLayout = function(_gd) { _gd._fullLayout = extendDeepAll(dflts, _gd.layout); }; -},{"../../components/color":585,"../../lib":690,"./micropolar":796,"./undo_manager":798,"d3":114}],798:[function(require,module,exports){ +},{"../../components/color":578,"../../lib":685,"./micropolar":791,"./undo_manager":793,"d3":107}],793:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149323,7 +146541,7 @@ module.exports = function UndoManager() { }; }; -},{}],799:[function(require,module,exports){ +},{}],794:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149398,7 +146616,7 @@ module.exports = function handleSubplotDefaults(layoutIn, layoutOut, fullData, o } }; -},{"../lib":690,"./plots":792}],800:[function(require,module,exports){ +},{"../lib":685,"./plots":787}],795:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149472,7 +146690,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) } }; -},{"../../plots/plots":792,"./layout/attributes":801,"./layout/defaults":804,"./layout/layout_attributes":805,"./ternary":806}],801:[function(require,module,exports){ +},{"../../plots/plots":787,"./layout/attributes":796,"./layout/defaults":799,"./layout/layout_attributes":800,"./ternary":801}],796:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149493,7 +146711,7 @@ module.exports = { } }; -},{}],802:[function(require,module,exports){ +},{}],797:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149553,7 +146771,7 @@ module.exports = { } }; -},{"../../../lib/extend":682,"../../cartesian/layout_attributes":740}],803:[function(require,module,exports){ +},{"../../../lib/extend":677,"../../cartesian/layout_attributes":735}],798:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149637,7 +146855,7 @@ module.exports = function supplyLayoutDefaults(containerIn, containerOut, option } }; -},{"../../../lib":690,"../../cartesian/tick_label_defaults":747,"../../cartesian/tick_mark_defaults":748,"../../cartesian/tick_value_defaults":749,"./axis_attributes":802,"tinycolor2":521}],804:[function(require,module,exports){ +},{"../../../lib":685,"../../cartesian/tick_label_defaults":742,"../../cartesian/tick_mark_defaults":743,"../../cartesian/tick_value_defaults":744,"./axis_attributes":797,"tinycolor2":514}],799:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149700,7 +146918,7 @@ function handleTernaryDefaults(ternaryLayoutIn, ternaryLayoutOut, coerce, option } } -},{"../../../components/color":585,"../../subplot_defaults":799,"./axis_defaults":803,"./layout_attributes":805}],805:[function(require,module,exports){ +},{"../../../components/color":578,"../../subplot_defaults":794,"./axis_defaults":798,"./layout_attributes":800}],800:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149756,7 +146974,7 @@ module.exports = { caxis: ternaryAxesAttrs }; -},{"../../../components/color/attributes":584,"./axis_attributes":802}],806:[function(require,module,exports){ +},{"../../../components/color/attributes":577,"./axis_attributes":797}],801:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149959,6 +147177,7 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { // fictitious angles and domain, but then rotate and translate // it into place at the end var aaxis = _this.aaxis = extendFlat({}, ternaryLayout.aaxis, { + visible: true, range: [amin, sum - bmin - cmin], side: 'left', _counterangle: 30, @@ -149979,6 +147198,7 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { // baxis goes across the bottom (backward). We can set it up as an x axis // without any enclosing transformation. var baxis = _this.baxis = extendFlat({}, ternaryLayout.baxis, { + visible: true, range: [sum - amin - cmin, bmin], side: 'bottom', _counterangle: 30, @@ -149998,6 +147218,7 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { // caxis goes down the right side. Set it up as a y axis, with // post-transformation similar to aaxis var caxis = _this.caxis = extendFlat({}, ternaryLayout.caxis, { + visible: true, range: [sum - amin - bmin, cmin], side: 'right', _counterangle: 30, @@ -150399,7 +147620,7 @@ function removeZoombox(gd) { .remove(); } -},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../components/titles":661,"../../lib":690,"../../lib/extend":682,"../../plotly":724,"../cartesian/axes":729,"../cartesian/constants":734,"../cartesian/graph_interact":738,"../cartesian/select":745,"../cartesian/set_convert":746,"../plots":792,"d3":114,"tinycolor2":521}],807:[function(require,module,exports){ +},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../components/titles":655,"../../lib":685,"../../lib/extend":677,"../../plotly":719,"../cartesian/axes":724,"../cartesian/constants":729,"../cartesian/graph_interact":733,"../cartesian/select":740,"../cartesian/set_convert":741,"../plots":787,"d3":107,"tinycolor2":514}],802:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150590,7 +147811,7 @@ function getTraceType(traceType) { return traceType; } -},{"./lib/loggers":693,"./lib/noop":697,"./lib/push_unique":701,"./plots/attributes":727}],808:[function(require,module,exports){ +},{"./lib/loggers":688,"./lib/noop":692,"./lib/push_unique":696,"./plots/attributes":722}],803:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150663,6 +147884,7 @@ module.exports = function clonePlot(graphObj, options) { var oldLayout = graphObj.layout; var newData = extendDeep([], oldData); var newLayout = extendDeep({}, oldLayout, cloneLayoutOverride(options.tileClass)); + var context = graphObj._context || {}; if(options.width) newLayout.width = options.width; if(options.height) newLayout.height = options.height; @@ -150746,7 +147968,8 @@ module.exports = function clonePlot(graphObj, options) { options.plotGlPixelRatio, displaylogo: options.displaylogo || false, showLink: options.showLink || false, - showTips: options.showTips || false + showTips: options.showTips || false, + mapboxAccessToken: context.mapboxAccessToken } }; @@ -150760,7 +147983,7 @@ module.exports = function clonePlot(graphObj, options) { return plotTile; }; -},{"../lib":690,"../plots/plots":792}],809:[function(require,module,exports){ +},{"../lib":685,"../plots/plots":787}],804:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150826,7 +148049,7 @@ function downloadImage(gd, opts) { module.exports = downloadImage; -},{"../lib":690,"../plot_api/to_image":722,"./filesaver":810}],810:[function(require,module,exports){ +},{"../lib":685,"../plot_api/to_image":717,"./filesaver":805}],805:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150894,7 +148117,7 @@ var fileSaver = function(url, name) { module.exports = fileSaver; -},{}],811:[function(require,module,exports){ +},{}],806:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150927,7 +148150,7 @@ exports.getRedrawFunc = function(gd) { }; }; -},{}],812:[function(require,module,exports){ +},{}],807:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150953,7 +148176,7 @@ var Snapshot = { module.exports = Snapshot; -},{"./cloneplot":808,"./download":809,"./helpers":811,"./svgtoimg":813,"./toimage":814,"./tosvg":815}],813:[function(require,module,exports){ +},{"./cloneplot":803,"./download":804,"./helpers":806,"./svgtoimg":808,"./toimage":809,"./tosvg":810}],808:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151084,7 +148307,7 @@ function svgToImg(opts) { module.exports = svgToImg; -},{"../lib":690,"events":121}],814:[function(require,module,exports){ +},{"../lib":685,"events":114}],809:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151164,7 +148387,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":690,"../plotly":724,"./cloneplot":808,"./helpers":811,"./svgtoimg":813,"./tosvg":815,"events":121}],815:[function(require,module,exports){ +},{"../lib":685,"../plotly":719,"./cloneplot":803,"./helpers":806,"./svgtoimg":808,"./tosvg":810,"events":114}],810:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151283,7 +148506,7 @@ module.exports = function toSVG(gd, format) { return s; }; -},{"../components/color":585,"../components/drawing":608,"../constants/xmlns_namespaces":674,"../lib/svg_text_utils":709,"d3":114}],816:[function(require,module,exports){ +},{"../components/color":578,"../components/drawing":602,"../constants/xmlns_namespaces":668,"../lib/svg_text_utils":704,"d3":107}],811:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151316,7 +148539,7 @@ module.exports = function arraysToCalcdata(cd, trace) { } }; -},{"../../lib":690}],817:[function(require,module,exports){ +},{"../../lib":685}],812:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151441,7 +148664,7 @@ module.exports = { } }; -},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/errorbars/attributes":610,"../../lib/extend":682,"../../plots/font_attributes":753,"../scatter/attributes":947}],818:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/errorbars/attributes":604,"../../lib/extend":677,"../../plots/font_attributes":748,"../scatter/attributes":976}],813:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151534,7 +148757,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"../../plots/cartesian/axes":729,"./arrays_to_calcdata":816,"fast-isnumeric":123}],819:[function(require,module,exports){ +},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"../../plots/cartesian/axes":724,"./arrays_to_calcdata":811,"fast-isnumeric":116}],814:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151594,7 +148817,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, Color.defaultLine, {axis: 'x', inherit: 'y'}); }; -},{"../../components/color":585,"../../components/errorbars/defaults":613,"../../lib":690,"../bar/style_defaults":828,"../scatter/xy_defaults":969,"./attributes":817}],820:[function(require,module,exports){ +},{"../../components/color":578,"../../components/errorbars/defaults":607,"../../lib":685,"../bar/style_defaults":823,"../scatter/xy_defaults":998,"./attributes":812}],815:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151706,7 +148929,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return [pointData]; }; -},{"../../components/color":585,"../../components/errorbars":614,"../../plots/cartesian/graph_interact":738}],821:[function(require,module,exports){ +},{"../../components/color":578,"../../components/errorbars":608,"../../plots/cartesian/graph_interact":733}],816:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151742,7 +148965,7 @@ Bar.meta = { module.exports = Bar; -},{"../../plots/cartesian":739,"../scatter/colorbar":950,"./arrays_to_calcdata":816,"./attributes":817,"./calc":818,"./defaults":819,"./hover":820,"./layout_attributes":822,"./layout_defaults":823,"./plot":824,"./set_positions":825,"./style":827}],822:[function(require,module,exports){ +},{"../../plots/cartesian":734,"../scatter/colorbar":979,"./arrays_to_calcdata":811,"./attributes":812,"./calc":813,"./defaults":814,"./hover":815,"./layout_attributes":817,"./layout_defaults":818,"./plot":819,"./set_positions":820,"./style":822}],817:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151786,7 +149009,7 @@ module.exports = { } }; -},{}],823:[function(require,module,exports){ +},{}],818:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151844,7 +149067,7 @@ module.exports = function(layoutIn, layoutOut, fullData) { coerce('bargroupgap'); }; -},{"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807,"./layout_attributes":822}],824:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"./layout_attributes":817}],819:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152364,7 +149587,7 @@ function coerceColor(attributeDefinition, value, defaultValue) { attributeDefinition.dflt; } -},{"../../components/color":585,"../../components/drawing":608,"../../components/errorbars":614,"../../lib":690,"../../lib/svg_text_utils":709,"./attributes":817,"d3":114,"fast-isnumeric":123,"tinycolor2":521}],825:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"../../components/errorbars":608,"../../lib":685,"../../lib/svg_text_utils":704,"./attributes":812,"d3":107,"fast-isnumeric":116,"tinycolor2":514}],820:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152964,7 +150187,7 @@ function getAxisLetter(ax) { return ax._id.charAt(0); } -},{"../../constants/numerical":672,"../../plots/cartesian/axes":729,"../../registry":807,"./sieve.js":826,"fast-isnumeric":123}],826:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../plots/cartesian/axes":724,"../../registry":802,"./sieve.js":821,"fast-isnumeric":116}],821:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153066,7 +150289,7 @@ Sieve.prototype.getLabel = function getLabel(position, value) { return prefix + label; }; -},{"../../constants/numerical":672,"../../lib":690}],827:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685}],822:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153144,7 +150367,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/color":585,"../../components/drawing":608,"../../components/errorbars":614,"d3":114}],828:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"../../components/errorbars":608,"d3":107}],823:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153181,7 +150404,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, default coerce('marker.line.width'); }; -},{"../../components/color":585,"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598}],829:[function(require,module,exports){ +},{"../../components/color":578,"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591}],824:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153314,7 +150537,7 @@ module.exports = { fillcolor: scatterAttrs.fillcolor }; -},{"../../components/color/attributes":584,"../../lib/extend":682,"../scatter/attributes":947}],830:[function(require,module,exports){ +},{"../../components/color/attributes":577,"../../lib/extend":677,"../scatter/attributes":976}],825:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153463,7 +150686,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../lib":690,"../../plots/cartesian/axes":729,"fast-isnumeric":123}],831:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"fast-isnumeric":116}],826:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153536,7 +150759,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/color":585,"../../lib":690,"../../registry":807,"./attributes":829}],832:[function(require,module,exports){ +},{"../../components/color":578,"../../lib":685,"../../registry":802,"./attributes":824}],827:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153645,7 +150868,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return closeData; }; -},{"../../components/color":585,"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738}],833:[function(require,module,exports){ +},{"../../components/color":578,"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733}],828:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153678,7 +150901,7 @@ Box.meta = { module.exports = Box; -},{"../../plots/cartesian":739,"./attributes":829,"./calc":830,"./defaults":831,"./hover":832,"./layout_attributes":834,"./layout_defaults":835,"./plot":836,"./set_positions":837,"./style":838}],834:[function(require,module,exports){ +},{"../../plots/cartesian":734,"./attributes":824,"./calc":825,"./defaults":826,"./hover":827,"./layout_attributes":829,"./layout_defaults":830,"./plot":831,"./set_positions":832,"./style":833}],829:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153716,7 +150939,7 @@ module.exports = { } }; -},{}],835:[function(require,module,exports){ +},{}],830:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153750,7 +150973,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { coerce('boxgroupgap'); }; -},{"../../lib":690,"../../registry":807,"./layout_attributes":834}],836:[function(require,module,exports){ +},{"../../lib":685,"../../registry":802,"./layout_attributes":829}],831:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -153990,7 +151213,7 @@ module.exports = function plot(gd, plotinfo, cdbox) { }); }; -},{"../../components/drawing":608,"../../lib":690,"d3":114}],837:[function(require,module,exports){ +},{"../../components/drawing":602,"../../lib":685,"d3":107}],832:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154084,7 +151307,7 @@ module.exports = function setPositions(gd, plotinfo) { } }; -},{"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807}],838:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802}],833:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154123,7 +151346,7 @@ module.exports = function style(gd) { }); }; -},{"../../components/color":585,"../../components/drawing":608,"d3":114}],839:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"d3":107}],834:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154176,7 +151399,7 @@ module.exports = { whiskerwidth: Lib.extendFlat({}, boxAttrs.whiskerwidth, { dflt: 0 }) }; -},{"../../lib":690,"../box/attributes":829,"../ohlc/attributes":905}],840:[function(require,module,exports){ +},{"../../lib":685,"../box/attributes":824,"../ohlc/attributes":943}],835:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154224,7 +151447,7 @@ function handleDirection(traceIn, traceOut, coerce, direction) { coerce(direction + '.fillcolor'); } -},{"../../lib":690,"../ohlc/direction_defaults":907,"../ohlc/helpers":908,"../ohlc/ohlc_defaults":910,"./attributes":839}],841:[function(require,module,exports){ +},{"../../lib":685,"../ohlc/direction_defaults":945,"../ohlc/helpers":946,"../ohlc/ohlc_defaults":948,"./attributes":834}],836:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154254,7 +151477,7 @@ module.exports = { register(require('../box')); register(require('./transform')); -},{"../../plot_api/register":719,"../../plots/cartesian":739,"../box":833,"./attributes":839,"./defaults":840,"./transform":842}],842:[function(require,module,exports){ +},{"../../plot_api/register":714,"../../plots/cartesian":734,"../box":828,"./attributes":834,"./defaults":835,"./transform":837}],837:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154382,7 +151605,3417 @@ exports.calcTransform = function calcTransform(gd, trace, opts) { trace.y = y; }; -},{"../../lib":690,"../ohlc/helpers":908}],843:[function(require,module,exports){ +},{"../../lib":685,"../ohlc/helpers":946}],838:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var handleAxisDefaults = require('./axis_defaults'); + +module.exports = function handleABDefaults(traceIn, traceOut, fullLayout, coerce, dfltColor) { + var a = coerce('a'); + + if(!a) { + coerce('da'); + coerce('a0'); + } + + var b = coerce('b'); + + if(!b) { + coerce('db'); + coerce('b0'); + } + + mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor); + + return; +}; + +function mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor) { + var axesList = ['aaxis', 'baxis']; + + axesList.forEach(function(axName) { + var axLetter = axName.charAt(0); + var axIn = traceIn[axName] || {}; + var axOut = {}; + + var defaultOptions = { + tickfont: 'x', + id: axLetter + 'axis', + letter: axLetter, + font: traceOut.font, + name: axName, + data: traceIn[axLetter], + calendar: traceOut.calendar, + dfltColor: dfltColor, + bgColor: fullLayout.paper_bgcolor, + fullLayout: fullLayout + }; + + handleAxisDefaults(axIn, axOut, defaultOptions); + + axOut._categories = axOut._categories || []; + + traceOut[axName] = axOut; + + // so we don't have to repeat autotype unnecessarily, + // copy an autotype back to traceIn + if(!traceIn[axName] && axIn.type !== '-') { + traceIn[axName] = {type: axIn.type}; + } + }); +} + +},{"./axis_defaults":843}],839:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = function(a) { + return minMax(a, 0); +}; + +function minMax(a, depth) { + // Limit to ten dimensional datasets. This seems *exceedingly* unlikely to + // ever cause problems or even be a concern. It's include strictly so that + // circular arrays could never cause this to loop. + if(!Array.isArray(a) || depth >= 10) { + return null; + } + + var min = Infinity; + var max = -Infinity; + var n = a.length; + for(var i = 0; i < n; i++) { + var datum = a[i]; + + if(Array.isArray(datum)) { + var result = minMax(datum, depth + 1); + + if(result) { + min = Math.min(result[0], min); + max = Math.max(result[1], max); + } + } else { + min = Math.min(datum, min); + max = Math.max(datum, max); + } + } + + return [min, max]; +} + +},{}],840:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var extendFlat = require('../../lib/extend').extendFlat; +var fontAttrs = require('../../plots/font_attributes'); +var axisAttrs = require('./axis_attributes'); +var colorAttrs = require('../../components/color/attributes'); + +module.exports = { + carpet: { + valType: 'string', + + + }, + x: { + valType: 'data_array', + + }, + y: { + valType: 'data_array', + + }, + a: { + valType: 'data_array', + + }, + a0: { + valType: 'number', + dflt: 0, + + + }, + da: { + valType: 'number', + dflt: 1, + + + }, + b: { + valType: 'data_array', + + }, + b0: { + valType: 'number', + dflt: 0, + + + }, + db: { + valType: 'number', + dflt: 1, + + + }, + cheaterslope: { + valType: 'number', + + dflt: 1, + + }, + aaxis: extendFlat({}, axisAttrs), + baxis: extendFlat({}, axisAttrs), + font: { + family: extendFlat({}, fontAttrs.family, { + dflt: '"Open Sans", verdana, arial, sans-serif' + }), + size: extendFlat({}, fontAttrs.size, { + dflt: 12 + }), + color: extendFlat({}, fontAttrs.color, { + dflt: colorAttrs.defaultLine + }), + }, + color: { + valType: 'color', + dflt: colorAttrs.defaultLine, + + + }, +}; + +},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/font_attributes":748,"./axis_attributes":842}],841:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* This function retrns a set of control points that define a curve aligned along + * either the a or b axis. Exactly one of a or b must be an array defining the range + * spanned. + * + * Honestly this is the most complicated function I've implemente here so far because + * of the way it handles knot insertion and direction/axis-agnostic slices. + */ +module.exports = function(carpet, carpetcd, a, b) { + var idx, tangent, tanIsoIdx, tanIsoPar, segment, refidx; + var p0, p1, v0, v1, start, end, range; + + var axis = Array.isArray(a) ? 'a' : 'b'; + var ax = axis === 'a' ? carpet.aaxis : carpet.baxis; + var smoothing = ax.smoothing; + var toIdx = axis === 'a' ? carpet.a2i : carpet.b2j; + var pt = axis === 'a' ? a : b; + var iso = axis === 'a' ? b : a; + var n = axis === 'a' ? carpetcd.a.length : carpetcd.b.length; + var m = axis === 'a' ? carpetcd.b.length : carpetcd.a.length; + var isoIdx = Math.floor(axis === 'a' ? carpet.b2j(iso) : carpet.a2i(iso)); + + var xy = axis === 'a' ? function(value) { + return carpet.evalxy([], value, isoIdx); + } : function(value) { + return carpet.evalxy([], isoIdx, value); + }; + + if(smoothing) { + tanIsoIdx = Math.max(0, Math.min(m - 2, isoIdx)); + tanIsoPar = isoIdx - tanIsoIdx; + tangent = axis === 'a' ? function(i, ti) { + return carpet.dxydi([], i, tanIsoIdx, ti, tanIsoPar); + } : function(j, tj) { + return carpet.dxydj([], tanIsoIdx, j, tanIsoPar, tj); + }; + } + + var vstart = toIdx(pt[0]); + var vend = toIdx(pt[1]); + + // So that we can make this work in two directions, flip all of the + // math functions if the direction is from higher to lower indices: + // + // Note that the tolerance is directional! + var dir = vstart < vend ? 1 : -1; + var tol = (vend - vstart) * 1e-8; + var dirfloor = dir > 0 ? Math.floor : Math.ceil; + var dirceil = dir > 0 ? Math.ceil : Math.floor; + var dirmin = dir > 0 ? Math.min : Math.max; + var dirmax = dir > 0 ? Math.max : Math.min; + + var idx0 = dirfloor(vstart + tol); + var idx1 = dirceil(vend - tol); + + p0 = xy(vstart); + var segments = [[p0]]; + + for(idx = idx0; idx * dir < idx1 * dir; idx += dir) { + segment = []; + start = dirmax(vstart, idx); + end = dirmin(vend, idx + dir); + range = end - start; + + // In order to figure out which cell we're in for the derivative (remember, + // the derivatives are *not* constant across grid lines), let's just average + // the start and end points. This cuts out just a tiny bit of logic and + // there's really no computational difference: + refidx = Math.max(0, Math.min(n - 2, Math.floor(0.5 * (start + end)))); + + p1 = xy(end); + if(smoothing) { + v0 = tangent(refidx, start - refidx); + v1 = tangent(refidx, end - refidx); + + segment.push([ + p0[0] + v0[0] / 3 * range, + p0[1] + v0[1] / 3 * range + ]); + + segment.push([ + p1[0] - v1[0] / 3 * range, + p1[1] - v1[1] / 3 * range + ]); + } + + segment.push(p1); + + segments.push(segment); + p0 = p1; + } + + return segments; +}; + +},{}],842:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var extendFlat = require('../../lib/extend').extendFlat; +var fontAttrs = require('../../plots/font_attributes'); +var colorAttrs = require('../../components/color/attributes'); + +module.exports = { + color: { + valType: 'color', + + + }, + smoothing: { + valType: 'number', + dflt: 1, + min: 0, + max: 1.3, + + }, + title: { + valType: 'string', + + + }, + titlefont: extendFlat({}, fontAttrs, { + + }), + titleoffset: { + valType: 'number', + + dflt: 10, + + }, + type: { + valType: 'enumerated', + // '-' means we haven't yet run autotype or couldn't find any data + // it gets turned into linear in gd._fullLayout but not copied back + // to gd.data like the others are. + values: ['-', 'linear', 'date', 'category'], + dflt: '-', + + + }, + autorange: { + valType: 'enumerated', + values: [true, false, 'reversed'], + dflt: true, + + + }, + rangemode: { + valType: 'enumerated', + values: ['normal', 'tozero', 'nonnegative'], + dflt: 'normal', + + + }, + range: { + valType: 'info_array', + + items: [ + {valType: 'any'}, + {valType: 'any'} + ], + + }, + + fixedrange: { + valType: 'boolean', + dflt: false, + + + }, + cheatertype: { + valType: 'enumerated', + values: ['index', 'value'], + dflt: 'value', + + }, + tickmode: { + valType: 'enumerated', + values: ['linear', 'array'], + dflt: 'array', + + }, + nticks: { + valType: 'integer', + min: 0, + dflt: 0, + + + }, + tickvals: { + valType: 'data_array', + + }, + ticktext: { + valType: 'data_array', + + }, + showticklabels: { + valType: 'enumerated', + values: ['start', 'end', 'both', 'none'], + dflt: 'start', + + + }, + tickfont: extendFlat({}, fontAttrs, { + + }), + tickangle: { + valType: 'angle', + dflt: 'auto', + + + }, + tickprefix: { + valType: 'string', + dflt: '', + + + }, + showtickprefix: { + valType: 'enumerated', + values: ['all', 'first', 'last', 'none'], + dflt: 'all', + + + }, + ticksuffix: { + valType: 'string', + dflt: '', + + + }, + showticksuffix: { + valType: 'enumerated', + values: ['all', 'first', 'last', 'none'], + dflt: 'all', + + + }, + showexponent: { + valType: 'enumerated', + values: ['all', 'first', 'last', 'none'], + dflt: 'all', + + + }, + exponentformat: { + valType: 'enumerated', + values: ['none', 'e', 'E', 'power', 'SI', 'B'], + dflt: 'B', + + + }, + separatethousands: { + valType: 'boolean', + dflt: false, + + + }, + tickformat: { + valType: 'string', + dflt: '', + + + }, + categoryorder: { + valType: 'enumerated', + values: [ + 'trace', 'category ascending', 'category descending', 'array' + /* , 'value ascending', 'value descending'*/ // value ascending / descending to be implemented later + ], + dflt: 'trace', + + + }, + categoryarray: { + valType: 'data_array', + + + }, + labelpadding: { + valType: 'integer', + + dflt: 10, + + }, + labelprefix: { + valType: 'string', + + + }, + labelsuffix: { + valType: 'string', + dflt: '', + + + }, + // lines and grids + showline: { + valType: 'boolean', + dflt: false, + + + }, + linecolor: { + valType: 'color', + dflt: colorAttrs.defaultLine, + + + }, + linewidth: { + valType: 'number', + min: 0, + dflt: 1, + + + }, + gridcolor: { + valType: 'color', + + + }, + gridwidth: { + valType: 'number', + min: 0, + dflt: 1, + + + }, + showgrid: { + valType: 'boolean', + + dflt: true, + + }, + minorgridcount: { + valType: 'integer', + min: 0, + dflt: 0, + + + }, + minorgridwidth: { + valType: 'number', + min: 0, + dflt: 1, + + + }, + minorgridcolor: { + valType: 'color', + dflt: colorAttrs.lightLine, + + + }, + startline: { + valType: 'boolean', + + + }, + startlinecolor: { + valType: 'color', + + + }, + startlinewidth: { + valType: 'number', + dflt: 1, + + + }, + endline: { + valType: 'boolean', + + + }, + endlinewidth: { + valType: 'number', + dflt: 1, + + + }, + endlinecolor: { + valType: 'color', + + + }, + tick0: { + valType: 'number', + min: 0, + dflt: 0, + + + }, + dtick: { + valType: 'number', + min: 0, + dflt: 1, + + + }, + arraytick0: { + valType: 'integer', + min: 0, + dflt: 0, + + + }, + arraydtick: { + valType: 'integer', + min: 1, + dflt: 1, + + + }, +}; + +},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/font_attributes":748}],843:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var carpetAttrs = require('./attributes'); + +var addOpacity = require('../../components/color').addOpacity; +var Registry = require('../../registry'); +var Lib = require('../../lib'); +var handleTickValueDefaults = require('../../plots/cartesian/tick_value_defaults'); +var handleTickLabelDefaults = require('../../plots/cartesian/tick_label_defaults'); +var handleCategoryOrderDefaults = require('../../plots/cartesian/category_order_defaults'); +var setConvert = require('../../plots/cartesian/set_convert'); +var orderedCategories = require('../../plots/cartesian/ordered_categories'); +var autoType = require('../../plots/cartesian/axis_autotype'); + +/** + * options: object containing: + * + * letter: 'x' or 'y' + * title: name of the axis (ie 'Colorbar') to go in default title + * name: axis object name (ie 'xaxis') if one should be stored + * font: the default font to inherit + * outerTicks: boolean, should ticks default to outside? + * showGrid: boolean, should gridlines be shown by default? + * noHover: boolean, this axis doesn't support hover effects? + * data: the plot data to use in choosing auto type + * bgColor: the plot background color, to calculate default gridline colors + */ +module.exports = function handleAxisDefaults(containerIn, containerOut, options) { + var letter = options.letter, + font = options.font || {}, + attributes = carpetAttrs[letter + 'axis']; + + options.noHover = true; + + function coerce(attr, dflt) { + return Lib.coerce(containerIn, containerOut, attributes, attr, dflt); + } + + function coerce2(attr, dflt) { + return Lib.coerce2(containerIn, containerOut, attributes, attr, dflt); + } + + // set up some private properties + if(options.name) { + containerOut._name = options.name; + containerOut._id = options.name; + } + + // now figure out type and do some more initialization + var axType = coerce('type'); + if(axType === '-') { + if(options.data) setAutoType(containerOut, options.data); + + if(containerOut.type === '-') { + containerOut.type = 'linear'; + } + else { + // copy autoType back to input axis + // note that if this object didn't exist + // in the input layout, we have to put it in + // this happens in the main supplyDefaults function + axType = containerIn.type = containerOut.type; + } + } + + coerce('smoothing'); + coerce('cheatertype'); + + coerce('showticklabels'); + coerce('labelprefix', letter + ' = '); + coerce('labelsuffix'); + coerce('showtickprefix'); + coerce('showticksuffix'); + + coerce('separatethousands'); + coerce('tickformat'); + coerce('exponentformat'); + coerce('showexponent'); + coerce('categoryorder'); + + coerce('tickmode'); + coerce('tickvals'); + coerce('ticktext'); + coerce('tick0'); + coerce('dtick'); + + if(containerOut.tickmode === 'array') { + coerce('arraytick0'); + coerce('arraydtick'); + } + + coerce('labelpadding'); + + containerOut._hovertitle = letter; + + + if(axType === 'date') { + var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleDefaults'); + handleCalendarDefaults(containerIn, containerOut, 'calendar', options.calendar); + } + + setConvert(containerOut, options.fullLayout); + + var dfltColor = coerce('color', options.dfltColor); + // if axis.color was provided, use it for fonts too; otherwise, + // inherit from global font color in case that was provided. + var dfltFontColor = (dfltColor === containerIn.color) ? dfltColor : font.color; + + coerce('title'); + Lib.coerceFont(coerce, 'titlefont', { + family: font.family, + size: Math.round(font.size * 1.2), + color: dfltFontColor + }); + + coerce('titleoffset'); + + coerce('tickangle'); + + var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range)); + + if(autoRange) coerce('rangemode'); + + coerce('range'); + containerOut.cleanRange(); + + coerce('fixedrange'); + + handleTickValueDefaults(containerIn, containerOut, coerce, axType); + handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options); + handleCategoryOrderDefaults(containerIn, containerOut, coerce); + + var gridColor = coerce2('gridcolor', addOpacity(dfltColor, 0.3)); + var gridWidth = coerce2('gridwidth'); + var showGrid = coerce('showgrid'); + + if(!showGrid) { + delete containerOut.gridcolor; + delete containerOut.gridwidth; + } + + var startLineColor = coerce2('startlinecolor', dfltColor); + var startLineWidth = coerce2('startlinewidth', gridWidth); + var showStartLine = coerce('startline', containerOut.showgrid || !!startLineColor || !!startLineWidth); + + if(!showStartLine) { + delete containerOut.startlinecolor; + delete containerOut.startlinewidth; + } + + var endLineColor = coerce2('endlinecolor', dfltColor); + var endLineWidth = coerce2('endlinewidth', gridWidth); + var showEndLine = coerce('endline', containerOut.showgrid || !!endLineColor || !!endLineWidth); + + if(!showEndLine) { + delete containerOut.endlinecolor; + delete containerOut.endlinewidth; + } + + if(!showGrid) { + delete containerOut.gridcolor; + delete containerOut.gridWidth; + } else { + coerce('minorgridcount'); + coerce('minorgridwidth', gridWidth); + coerce('minorgridcolor', addOpacity(gridColor, 0.06)); + + if(!containerOut.minorgridcount) { + delete containerOut.minorgridwidth; + delete containerOut.minorgridcolor; + } + } + + containerOut._separators = options.fullLayout.separators; + + // fill in categories + containerOut._initialCategories = axType === 'category' ? + orderedCategories(letter, containerOut.categoryorder, containerOut.categoryarray, options.data) : + []; + + if(containerOut.showticklabels === 'none') { + delete containerOut.tickfont; + delete containerOut.tickangle; + delete containerOut.showexponent; + delete containerOut.exponentformat; + delete containerOut.tickformat; + delete containerOut.showticksuffix; + delete containerOut.showtickprefix; + } + + if(!containerOut.showticksuffix) { + delete containerOut.ticksuffix; + } + + if(!containerOut.showtickprefix) { + delete containerOut.tickprefix; + } + + // It needs to be coerced, then something above overrides this deep in the axis code, + // but no, we *actually* want to coerce this. + coerce('tickmode'); + + if(!containerOut.title || (containerOut.title && containerOut.title.length === 0)) { + delete containerOut.titlefont; + delete containerOut.titleoffset; + } + + return containerOut; +}; + +function setAutoType(ax, data) { + // new logic: let people specify any type they want, + // only autotype if type is '-' + if(ax.type !== '-') return; + + var id = ax._id, + axLetter = id.charAt(0); + + var calAttr = axLetter + 'calendar', + calendar = ax[calAttr]; + + ax.type = autoType(data, calendar); +} + +},{"../../components/color":578,"../../lib":685,"../../plots/cartesian/axis_autotype":725,"../../plots/cartesian/category_order_defaults":728,"../../plots/cartesian/ordered_categories":737,"../../plots/cartesian/set_convert":741,"../../plots/cartesian/tick_label_defaults":742,"../../plots/cartesian/tick_value_defaults":744,"../../registry":802,"./attributes":840}],844:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Axes = require('../../plots/cartesian/axes'); +var cheaterBasis = require('./cheater_basis'); +var arrayMinmax = require('./array_minmax'); +var map2dArray = require('./map_2d_array'); +var calcGridlines = require('./calc_gridlines'); +var calcLabels = require('./calc_labels'); +var calcClipPath = require('./calc_clippath'); +var clean2dArray = require('../heatmap/clean_2d_array'); +var smoothFill2dArray = require('./smooth_fill_2d_array'); + +module.exports = function calc(gd, trace) { + var xa = Axes.getFromId(gd, trace.xaxis || 'x'); + var ya = Axes.getFromId(gd, trace.yaxis || 'y'); + var aax = trace.aaxis; + var bax = trace.baxis; + var a = trace._a = trace.a; + var b = trace._b = trace.b; + + var t = {}; + var x; + var y = trace.y; + + if(trace._cheater) { + var avals = aax.cheatertype === 'index' ? a.length : a; + var bvals = bax.cheatertype === 'index' ? b.length : b; + trace.x = x = cheaterBasis(avals, bvals, trace.cheaterslope); + } else { + x = trace.x; + } + + trace._x = trace.x = x = clean2dArray(x); + trace._y = trace.y = y = clean2dArray(y); + + // Fill in any undefined values with elliptic smoothing. This doesn't take + // into account the spacing of the values. That is, the derivatives should + // be modified to use a and b values. It's not that hard, but this is already + // moderate overkill for just filling in missing values. + smoothFill2dArray(x, a, b); + smoothFill2dArray(y, a, b); + + // create conversion functions that depend on the data + trace.setScale(); + + // Convert cartesian-space x/y coordinates to screen space pixel coordinates: + t.xp = trace.xp = map2dArray(trace.xp, x, xa.c2p); + t.yp = trace.yp = map2dArray(trace.yp, y, ya.c2p); + + // This is a rather expensive scan. Nothing guarantees monotonicity, + // so we need to scan through all data to get proper ranges: + var xrange = arrayMinmax(x); + var yrange = arrayMinmax(y); + + var dx = 0.5 * (xrange[1] - xrange[0]); + var xc = 0.5 * (xrange[1] + xrange[0]); + + var dy = 0.5 * (yrange[1] - yrange[0]); + var yc = 0.5 * (yrange[1] + yrange[0]); + + // Expand the axes to fit the plot, except just grow it by a factor of 1.3 + // because the labels should be taken into account except that's difficult + // hence 1.3. + var grow = 1.3; + xrange = [xc - dx * grow, xc + dx * grow]; + yrange = [yc - dy * grow, yc + dy * grow]; + + Axes.expand(xa, xrange, {padded: true}); + Axes.expand(ya, yrange, {padded: true}); + + // Enumerate the gridlines, both major and minor, and store them on the trace + // object: + calcGridlines(trace, t, 'a', 'b'); + calcGridlines(trace, t, 'b', 'a'); + + // Calculate the text labels for each major gridline and store them on the + // trace object: + calcLabels(trace, aax); + calcLabels(trace, bax); + + // Tabulate points for the four segments that bound the axes so that we can + // map to pixel coordinates in the plot function and create a clip rect: + t.clipsegments = calcClipPath(trace.xctrl, trace.yctrl, aax, bax); + + t.x = x; + t.y = y; + t.a = a; + t.b = b; + + return [t]; +}; + +},{"../../plots/cartesian/axes":724,"../heatmap/clean_2d_array":905,"./array_minmax":839,"./calc_clippath":845,"./calc_gridlines":846,"./calc_labels":847,"./cheater_basis":849,"./map_2d_array":861,"./smooth_fill_2d_array":865}],845:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +module.exports = function makeClipPath(xctrl, yctrl, aax, bax) { + var i, x, y; + var segments = []; + + var asmoothing = !!aax.smoothing; + var bsmoothing = !!bax.smoothing; + var nea1 = xctrl[0].length - 1; + var neb1 = xctrl.length - 1; + + // Along the lower a axis: + for(i = 0, x = [], y = []; i <= nea1; i++) { + x[i] = xctrl[0][i]; + y[i] = yctrl[0][i]; + } + segments.push({x: x, y: y, bicubic: asmoothing}); + + // Along the upper b axis: + for(i = 0, x = [], y = []; i <= neb1; i++) { + x[i] = xctrl[i][nea1]; + y[i] = yctrl[i][nea1]; + } + segments.push({x: x, y: y, bicubic: bsmoothing}); + + // Backwards along the upper a axis: + for(i = nea1, x = [], y = []; i >= 0; i--) { + x[nea1 - i] = xctrl[neb1][i]; + y[nea1 - i] = yctrl[neb1][i]; + } + segments.push({x: x, y: y, bicubic: asmoothing}); + + // Backwards along the lower b axis: + for(i = neb1, x = [], y = []; i >= 0; i--) { + x[neb1 - i] = xctrl[i][0]; + y[neb1 - i] = yctrl[i][0]; + } + segments.push({x: x, y: y, bicubic: bsmoothing}); + + return segments; +}; + +},{}],846:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Axes = require('../../plots/cartesian/axes'); +var extendFlat = require('../../lib/extend').extendFlat; + +module.exports = function calcGridlines(trace, cd, axisLetter, crossAxisLetter) { + var i, j, j0; + var eps, bounds, n1, n2, n, value, v; + var j1, v0, v1, d; + + var data = trace[axisLetter]; + var axis = trace[axisLetter + 'axis']; + + var gridlines = axis._gridlines = []; + var minorgridlines = axis._minorgridlines = []; + var boundarylines = axis._boundarylines = []; + + var crossData = trace[crossAxisLetter]; + var crossAxis = trace[crossAxisLetter + 'axis']; + + if(axis.tickmode === 'array') { + axis.tickvals = []; + for(i = 0; i < data.length; i++) { + axis.tickvals.push(data[i]); + } + } + + var xcp = trace.xctrl; + var ycp = trace.yctrl; + var nea = xcp[0].length; + var neb = xcp.length; + var na = trace.a.length; + var nb = trace.b.length; + + Axes.calcTicks(axis); + + // The default is an empty array that will cause the join to remove the gridline if + // it's just disappeared: + // axis._startline = axis._endline = []; + + // If the cross axis uses bicubic interpolation, then the grid + // lines fall once every three expanded grid row/cols: + var stride = axis.smoothing ? 3 : 1; + + function constructValueGridline(value) { + var i, j, j0, tj, pxy, i0, ti, xy, dxydi0, dxydi1, dxydj0, dxydj1; + var xpoints = []; + var ypoints = []; + var ret = {}; + // Search for the fractional grid index giving this line: + if(axisLetter === 'b') { + // For the position we use just the i-j coordinates: + j = trace.b2j(value); + + // The derivatives for catmull-rom splines are discontinuous across cell + // boundaries though, so we need to provide both the cell and the position + // within the cell separately: + j0 = Math.floor(Math.max(0, Math.min(nb - 2, j))); + tj = j - j0; + + ret.length = nb; + ret.crossLength = na; + + ret.xy = function(i) { + return trace.evalxy([], i, j); + }; + + ret.dxy = function(i0, ti) { + return trace.dxydi([], i0, j0, ti, tj); + }; + + for(i = 0; i < na; i++) { + i0 = Math.min(na - 2, i); + ti = i - i0; + xy = trace.evalxy([], i, j); + + if(crossAxis.smoothing && i > 0) { + // First control point: + dxydi0 = trace.dxydi([], i - 1, j0, 0, tj); + xpoints.push(pxy[0] + dxydi0[0] / 3); + ypoints.push(pxy[1] + dxydi0[1] / 3); + + // Second control point: + dxydi1 = trace.dxydi([], i - 1, j0, 1, tj); + xpoints.push(xy[0] - dxydi1[0] / 3); + ypoints.push(xy[1] - dxydi1[1] / 3); + } + + xpoints.push(xy[0]); + ypoints.push(xy[1]); + + pxy = xy; + } + } else { + i = trace.a2i(value); + i0 = Math.floor(Math.max(0, Math.min(na - 2, i))); + ti = i - i0; + + ret.length = na; + ret.crossLength = nb; + + ret.xy = function(j) { + return trace.evalxy([], i, j); + }; + + ret.dxy = function(j0, tj) { + return trace.dxydj([], i0, j0, ti, tj); + }; + + for(j = 0; j < nb; j++) { + j0 = Math.min(nb - 2, j); + tj = j - j0; + xy = trace.evalxy([], i, j); + + if(crossAxis.smoothing && j > 0) { + // First control point: + dxydj0 = trace.dxydj([], i0, j - 1, ti, 0); + xpoints.push(pxy[0] + dxydj0[0] / 3); + ypoints.push(pxy[1] + dxydj0[1] / 3); + + // Second control point: + dxydj1 = trace.dxydj([], i0, j - 1, ti, 1); + xpoints.push(xy[0] - dxydj1[0] / 3); + ypoints.push(xy[1] - dxydj1[1] / 3); + } + + xpoints.push(xy[0]); + ypoints.push(xy[1]); + + pxy = xy; + } + } + + ret.axisLetter = axisLetter; + ret.axis = axis; + ret.crossAxis = crossAxis; + ret.value = value; + ret.constvar = crossAxisLetter; + ret.index = n; + ret.x = xpoints; + ret.y = ypoints; + ret.smoothing = crossAxis.smoothing; + + return ret; + } + + function constructArrayGridline(idx) { + var j, i0, j0, ti, tj; + var xpoints = []; + var ypoints = []; + var ret = {}; + ret.length = data.length; + ret.crossLength = crossData.length; + + if(axisLetter === 'b') { + j0 = Math.max(0, Math.min(nb - 2, idx)); + tj = Math.min(1, Math.max(0, idx - j0)); + + ret.xy = function(i) { + return trace.evalxy([], i, idx); + }; + + ret.dxy = function(i0, ti) { + return trace.dxydi([], i0, j0, ti, tj); + }; + + // In the tickmode: array case, this operation is a simple + // transfer of data: + for(j = 0; j < nea; j++) { + xpoints[j] = xcp[idx * stride][j]; + ypoints[j] = ycp[idx * stride][j]; + } + } else { + i0 = Math.max(0, Math.min(na - 2, idx)); + ti = Math.min(1, Math.max(0, idx - i0)); + + ret.xy = function(j) { + return trace.evalxy([], idx, j); + }; + + ret.dxy = function(j0, tj) { + return trace.dxydj([], i0, j0, ti, tj); + }; + + // In the tickmode: array case, this operation is a simple + // transfer of data: + for(j = 0; j < neb; j++) { + xpoints[j] = xcp[j][idx * stride]; + ypoints[j] = ycp[j][idx * stride]; + } + } + + ret.axisLetter = axisLetter; + ret.axis = axis; + ret.crossAxis = crossAxis; + ret.value = data[idx]; + ret.constvar = crossAxisLetter; + ret.index = idx; + ret.x = xpoints; + ret.y = ypoints; + ret.smoothing = crossAxis.smoothing; + + return ret; + } + + if(axis.tickmode === 'array') { + // var j0 = axis.startline ? 1 : 0; + // var j1 = data.length - (axis.endline ? 1 : 0); + + eps = 5e-15; + bounds = [ + Math.floor(((data.length - 1) - axis.arraytick0) / axis.arraydtick * (1 + eps)), + Math.ceil((- axis.arraytick0) / axis.arraydtick / (1 + eps)) + ].sort(function(a, b) {return a - b;}); + + // Unpack sorted values so we can be sure to avoid infinite loops if something + // is backwards: + n1 = bounds[0] - 1; + n2 = bounds[1] + 1; + + // If the axes fall along array lines, then this is a much simpler process since + // we already have all the control points we need + for(n = n1; n < n2; n++) { + j = axis.arraytick0 + axis.arraydtick * n; + if(j < 0 || j > data.length - 1) continue; + gridlines.push(extendFlat(constructArrayGridline(j), { + color: axis.gridcolor, + width: axis.gridwidth + })); + } + + for(n = n1; n < n2; n++) { + j0 = axis.arraytick0 + axis.arraydtick * n; + j1 = Math.min(j0 + axis.arraydtick, data.length - 1); + + // TODO: fix the bounds computation so we don't have to do a large range and then throw + // out unneeded numbers + if(j0 < 0 || j0 > data.length - 1) continue; + if(j1 < 0 || j1 > data.length - 1) continue; + + v0 = data[j0]; + v1 = data[j1]; + + for(i = 0; i < axis.minorgridcount; i++) { + d = j1 - j0; + + // TODO: fix the bounds computation so we don't have to do a large range and then throw + // out unneeded numbers + if(d <= 0) continue; + + // XXX: This calculation isn't quite right. Off by one somewhere? + v = v0 + (v1 - v0) * (i + 1) / (axis.minorgridcount + 1) * (axis.arraydtick / d); + + // TODO: fix the bounds computation so we don't have to do a large range and then throw + // out unneeded numbers + if(v < data[0] || v > data[data.length - 1]) continue; + minorgridlines.push(extendFlat(constructValueGridline(v), { + color: axis.minorgridcolor, + width: axis.minorgridwidth + })); + } + } + + if(axis.startline) { + boundarylines.push(extendFlat(constructArrayGridline(0), { + color: axis.startlinecolor, + width: axis.startlinewidth + })); + } + + if(axis.endline) { + boundarylines.push(extendFlat(constructArrayGridline(data.length - 1), { + color: axis.endlinecolor, + width: axis.endlinewidth + })); + } + } else { + // If the lines do not fall along the axes, then we have to interpolate + // the contro points and so some math to figure out where the lines are + // in the first place. + + // Compute the integer boudns of tick0 + n * dtick that fall within the range + // (roughly speaking): + // Give this a nice generous epsilon. We use at as * (1 + eps) in order to make + // inequalities a little tolerant in a more or less correct manner: + eps = 5e-15; + bounds = [ + Math.floor((data[data.length - 1] - axis.tick0) / axis.dtick * (1 + eps)), + Math.ceil((data[0] - axis.tick0) / axis.dtick / (1 + eps)) + ].sort(function(a, b) {return a - b;}); + + // Unpack sorted values so we can be sure to avoid infinite loops if something + // is backwards: + n1 = bounds[0]; + n2 = bounds[1]; + + for(n = n1; n <= n2; n++) { + value = axis.tick0 + axis.dtick * n; + + gridlines.push(extendFlat(constructValueGridline(value), { + color: axis.gridcolor, + width: axis.gridwidth + })); + } + + for(n = n1 - 1; n < n2 + 1; n++) { + value = axis.tick0 + axis.dtick * n; + + for(i = 0; i < axis.minorgridcount; i++) { + v = value + axis.dtick * (i + 1) / (axis.minorgridcount + 1); + if(v < data[0] || v > data[data.length - 1]) continue; + minorgridlines.push(extendFlat(constructValueGridline(v), { + color: axis.minorgridcolor, + width: axis.minorgridwidth + })); + } + } + + if(axis.startline) { + boundarylines.push(extendFlat(constructValueGridline(data[0]), { + color: axis.startlinecolor, + width: axis.startlinewidth + })); + } + + if(axis.endline) { + boundarylines.push(extendFlat(constructValueGridline(data[data.length - 1]), { + color: axis.endlinecolor, + width: axis.endlinewidth + })); + } + } +}; + +},{"../../lib/extend":677,"../../plots/cartesian/axes":724}],847:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Axes = require('../../plots/cartesian/axes'); +var extendFlat = require('../../lib/extend').extendFlat; + +module.exports = function calcLabels(trace, axis) { + var i, tobj, prefix, suffix, gridline; + + var labels = axis._labels = []; + var gridlines = axis._gridlines; + + for(i = 0; i < gridlines.length; i++) { + gridline = gridlines[i]; + + if(['start', 'both'].indexOf(axis.showticklabels) !== -1) { + tobj = Axes.tickText(axis, gridline.value); + + extendFlat(tobj, { + prefix: prefix, + suffix: suffix, + endAnchor: true, + xy: gridline.xy(0), + dxy: gridline.dxy(0, 0), + axis: gridline.axis, + length: gridline.crossAxis.length, + font: gridline.axis.tickfont, + isFirst: i === 0, + isLast: i === gridlines.length - 1 + }); + + labels.push(tobj); + } + + if(['end', 'both'].indexOf(axis.showticklabels) !== -1) { + tobj = Axes.tickText(axis, gridline.value); + + extendFlat(tobj, { + endAnchor: false, + xy: gridline.xy(gridline.crossLength - 1), + dxy: gridline.dxy(gridline.crossLength - 2, 1), + axis: gridline.axis, + length: gridline.crossAxis.length, + font: gridline.axis.tickfont, + isFirst: i === 0, + isLast: i === gridlines.length - 1 + }); + + labels.push(tobj); + } + } +}; + +},{"../../lib/extend":677,"../../plots/cartesian/axes":724}],848:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Compute the tangent vector according to catmull-rom cubic splines (centripetal, + * I think). That differs from the control point in two ways: + * 1. It is a vector, not a position relative to the point + * 2. the vector is longer than the position relative to p1 by a factor of 3 + * + * Close to the boundaries, we'll use these as *quadratic control points, so that + * to make a nice grid, we'll need to divide the tangent by 2 instead of 3. (The + * math works out this way if you work through the bezier derivatives) + */ +var CatmullRomExp = 0.5; +module.exports = function makeControlPoints(p0, p1, p2, smoothness) { + var d1x = p0[0] - p1[0], + d1y = p0[1] - p1[1], + d2x = p2[0] - p1[0], + d2y = p2[1] - p1[1], + d1a = Math.pow(d1x * d1x + d1y * d1y, CatmullRomExp / 2), + d2a = Math.pow(d2x * d2x + d2y * d2y, CatmullRomExp / 2), + numx = (d2a * d2a * d1x - d1a * d1a * d2x) * smoothness, + numy = (d2a * d2a * d1y - d1a * d1a * d2y) * smoothness, + denom1 = d2a * (d1a + d2a) * 3, + denom2 = d1a * (d1a + d2a) * 3; + return [[ + p1[0] + (denom1 && numx / denom1), + p1[1] + (denom1 && numy / denom1) + ], [ + p1[0] - (denom2 && numx / denom2), + p1[1] - (denom2 && numy / denom2) + ]]; +}; + +},{}],849:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var isArray = require('../../lib').isArray; + +/* + * Construct a 2D array of cheater values given a, b, and a slope. + * If + */ +module.exports = function(a, b, cheaterslope) { + var i, j, ascal, bscal, aval, bval; + var data = []; + + var na = isArray(a) ? a.length : a; + var nb = isArray(b) ? b.length : b; + var adata = isArray(a) ? a : null; + var bdata = isArray(b) ? b : null; + + // If we're using data, scale it so that for data that's just barely + // not evenly spaced, the switch to value-based indexing is continuous. + // This means evenly spaced data should look the same whether value + // or index cheatertype. + if(adata) { + ascal = (adata.length - 1) / (adata[adata.length - 1] - adata[0]) / (na - 1); + } + + if(bdata) { + bscal = (bdata.length - 1) / (bdata[bdata.length - 1] - bdata[0]) / (nb - 1); + } + + var xval; + var xmin = Infinity; + var xmax = -Infinity; + for(j = 0; j < nb; j++) { + data[j] = []; + bval = bdata ? (bdata[j] - bdata[0]) * bscal : j / (nb - 1); + for(i = 0; i < na; i++) { + aval = adata ? (adata[i] - adata[0]) * ascal : i / (na - 1); + xval = aval - bval * cheaterslope; + xmin = Math.min(xval, xmin); + xmax = Math.max(xval, xmax); + data[j][i] = xval; + } + } + + // Normalize cheater values to the 0-1 range. This comes into play when you have + // multiple cheater plots. After careful consideration, it seems better if cheater + // values are normalized to a consistent range. Otherwise one cheater affects the + // layout of other cheaters on the same axis. + var slope = 1.0 / (xmax - xmin); + var offset = -xmin * slope; + for(j = 0; j < nb; j++) { + for(i = 0; i < na; i++) { + data[j][i] = slope * data[j][i] + offset; + } + } + + return data; +}; + +},{"../../lib":685}],850:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var makeControlPoints = require('./catmull_rom'); +var ensureArray = require('../../lib').ensureArray; + +/* + * Turns a coarse grid into a fine grid with control points. + * + * Here's an ASCII representation: + * + * o ----- o ----- o ----- o + * | | | | + * | | | | + * | | | | + * o ----- o ----- o ----- o + * | | | | + * | | | | + * ^ | | | | + * | o ----- o ----- o ----- o + * b | | | | | + * | | | | | + * | | | | | + * o ----- o ----- o ----- o + * ------> + * a + * + * First of all, note that we want to do this in *cartesian* space. This means + * we might run into problems when there are extreme differences in x/y scaling, + * but the alternative is that the topology of the contours might actually be + * view-dependent, which seems worse. As a fallback, the only parameter that + * actually affects the result is the *aspect ratio*, so that we can at least + * improve the situation a bit without going all the way to screen coordinates. + * + * This function flattens the points + tangents into a slightly denser grid of + * *control points*. The resulting grid looks like this: + * + * 9 +--o-o--+ -o-o--+--o-o--+ + * 8 o o o o o o o o o o + * | | | | + * 7 o o o o o o o o o o + * 6 +--o-o--+ -o-o--+--o-o--+ + * 5 o o o o o o o o o o + * | | | | + * ^ 4 o o o o o o o o o o + * | 3 +--o-o--+ -o-o--+--o-o--+ + * b | 2 o o o o o o o o o o + * | | | | | + * | 1 o o o o o o o o o o + * 0 +--o-o--+ -o-o--+--o-o--+ + * 0 1 2 3 4 5 6 7 8 9 + * ------> + * a + * + * where `o`s represent newly-computed control points. the resulting dimension is + * + * (m - 1) * 3 + 1 + * = 3 * m - 2 + * + * We could simply store the tangents separately, but that's a nightmare to organize + * in two dimensions since we'll be slicing grid lines in both directions and since + * that basically requires very nearly just as much storage as just storing the dense + * grid. + * + * Wow! + */ + + +/* + * Catmull-rom is biased at the boundaries toward the interior and we actually + * can't use catmull-rom to compute the control point closest to (but inside) + * the boundary. + * + * A note on plotly's spline interpolation. It uses the catmull rom control point + * closest to the boundary *as* a quadratic control point. This seems incorrect, + * so I've elected not to follow that. Given control points 0 and 1, regular plotly + * splines give *equivalent* cubic control points: + * + * Input: + * + * boundary + * | | + * p0 p2 p3 --> interior + * 0.0 0.667 1.0 + * | | + * + * Cubic-equivalent of what plotly splines draw:: + * + * boundary + * | | + * p0 p1 p2 p3 --> interior + * 0.0 0.4444 0.8888 1.0 + * | | + * + * What this function fills in: + * + * boundary + * | | + * p0 p1 p2 p3 --> interior + * 0.0 0.333 0.667 1.0 + * | | + * + * Parameters: + * p0: boundary point + * p2: catmull rom point based on computation at p3 + * p3: first grid point + * + * Of course it works whichever way it's oriented; you just need to interpret the + * input/output accordingly. + */ +function inferCubicControlPoint(p0, p2, p3) { + // Extend p1 away from p0 by 50%. This is the equivalent quadratic point that + // would give the same slope as catmull rom at p0. + var p2e0 = -0.5 * p3[0] + 1.5 * p2[0]; + var p2e1 = -0.5 * p3[1] + 1.5 * p2[1]; + + return [ + (2 * p2e0 + p0[0]) / 3, + (2 * p2e1 + p0[1]) / 3, + ]; +} + +module.exports = function computeControlPoints(xe, ye, x, y, asmoothing, bsmoothing) { + var i, j, ie, je, xej, yej, xj, yj, cp, p1; + // At this point, we know these dimensions are correct and representative of + // the whole 2D arrays: + var na = x[0].length; + var nb = x.length; + + // (n)umber of (e)xpanded points: + var nea = asmoothing ? 3 * na - 2 : na; + var neb = bsmoothing ? 3 * nb - 2 : nb; + + xe = ensureArray(xe, neb); + ye = ensureArray(ye, neb); + + for(ie = 0; ie < neb; ie++) { + xe[ie] = ensureArray(xe[ie], nea); + ye[ie] = ensureArray(ye[ie], nea); + } + + // This loop fills in the X'd points: + // + // . . . . + // . . . . + // | | | | + // | | | | + // X ----- X ----- X ----- X + // | | | | + // | | | | + // | | | | + // X ----- X ----- X ----- X + // + // + // ie = (i) (e)xpanded: + for(j = 0, je = 0; j < nb; j++, je += bsmoothing ? 3 : 1) { + xej = xe[je]; + yej = ye[je]; + xj = x[j]; + yj = y[j]; + + // je = (j) (e)xpanded: + for(i = 0, ie = 0; i < na; i++, ie += asmoothing ? 3 : 1) { + xej[ie] = xj[i]; + yej[ie] = yj[i]; + } + } + + if(asmoothing) { + // If there's a-smoothing, this loop fills in the X'd points with catmull-rom + // control points computed along the a-axis: + // . . . . + // . . . . + // | | | | + // | | | | + // o -Y-X- o -X-X- o -X-Y- o + // | | | | + // | | | | + // | | | | + // o -Y-X- o -X-X- o -X-Y- o + // + // i: 0 1 2 3 + // ie: 0 1 3 3 4 5 6 7 8 9 + // + // ------> + // a + // + for(j = 0, je = 0; j < nb; j++, je += bsmoothing ? 3 : 1) { + // Fill in the points marked X for this a-row: + for(i = 1, ie = 3; i < na - 1; i++, ie += 3) { + cp = makeControlPoints( + [x[j][i - 1], y[j][i - 1]], + [x[j][i ], y[j][i]], + [x[j][i + 1], y[j][i + 1]], + asmoothing + ); + + xe[je][ie - 1] = cp[0][0]; + ye[je][ie - 1] = cp[0][1]; + xe[je][ie + 1] = cp[1][0]; + ye[je][ie + 1] = cp[1][1]; + } + + // The very first cubic interpolation point (to the left for i = 1 above) is + // used as a *quadratic* interpolation point by the spline drawing function + // which isn't really correct. But for the sake of consistency, we'll use it + // as such. Since we're using cubic splines, that means we need to shorten the + // tangent by 1/3 and also construct a new cubic spline control point 1/3 from + // the original to the i = 0 point. + p1 = inferCubicControlPoint( + [xe[je][0], ye[je][0]], + [xe[je][2], ye[je][2]], + [xe[je][3], ye[je][3]] + ); + xe[je][1] = p1[0]; + ye[je][1] = p1[1]; + + // Ditto last points, sans explanation: + p1 = inferCubicControlPoint( + [xe[je][nea - 1], ye[je][nea - 1]], + [xe[je][nea - 3], ye[je][nea - 3]], + [xe[je][nea - 4], ye[je][nea - 4]] + ); + xe[je][nea - 2] = p1[0]; + ye[je][nea - 2] = p1[1]; + } + } + + if(bsmoothing) { + // If there's a-smoothing, this loop fills in the X'd points with catmull-rom + // control points computed along the b-axis: + // . . . . + // X X X X X X X X X X + // | | | | + // X X X X X X X X X X + // o -o-o- o -o-o- o -o-o- o + // X X X X X X X X X X + // | | | | + // Y Y Y Y Y Y Y Y Y Y + // o -o-o- o -o-o- o -o-o- o + // + // i: 0 1 2 3 + // ie: 0 1 3 3 4 5 6 7 8 9 + // + // ------> + // a + // + for(ie = 0; ie < nea; ie++) { + for(je = 3; je < neb - 3; je += 3) { + cp = makeControlPoints( + [xe[je - 3][ie], ye[je - 3][ie]], + [xe[je][ie], ye[je][ie]], + [xe[je + 3][ie], ye[je + 3][ie]], + bsmoothing + ); + + xe[je - 1][ie] = cp[0][0]; + ye[je - 1][ie] = cp[0][1]; + xe[je + 1][ie] = cp[1][0]; + ye[je + 1][ie] = cp[1][1]; + } + // Do the same boundary condition magic for these control points marked Y above: + p1 = inferCubicControlPoint( + [xe[0][ie], ye[0][ie]], + [xe[2][ie], ye[2][ie]], + [xe[3][ie], ye[3][ie]] + ); + xe[1][ie] = p1[0]; + ye[1][ie] = p1[1]; + + p1 = inferCubicControlPoint( + [xe[neb - 1][ie], ye[neb - 1][ie]], + [xe[neb - 3][ie], ye[neb - 3][ie]], + [xe[neb - 4][ie], ye[neb - 4][ie]] + ); + xe[neb - 2][ie] = p1[0]; + ye[neb - 2][ie] = p1[1]; + } + } + + if(asmoothing && bsmoothing) { + // Do one more pass, this time recomputing exactly what we just computed. + // It's overdetermined since we're peforming catmull-rom in two directions, + // so we'll just average the overdetermined. These points don't lie along the + // grid lines, so note that only grid lines will follow normal plotly spline + // interpolation. + // + // Unless of course there was no b smoothing. Then these intermediate points + // don't actually exist and this section is bypassed. + // . . . . + // o X X o X X o X X o + // | | | | + // o X X o X X o X X o + // o -o-o- o -o-o- o -o-o- o + // o X X o X X o X X o + // | | | | + // o Y Y o Y Y o Y Y o + // o -o-o- o -o-o- o -o-o- o + // + // i: 0 1 2 3 + // ie: 0 1 3 3 4 5 6 7 8 9 + // + // ------> + // a + // + for(je = 1; je < neb; je += (je + 1) % 3 === 0 ? 2 : 1) { + // Fill in the points marked X for this a-row: + for(ie = 3; ie < nea - 3; ie += 3) { + cp = makeControlPoints( + [xe[je][ie - 3], ye[je][ie - 3]], + [xe[je][ie], ye[je][ie]], + [xe[je][ie + 3], ye[je][ie + 3]], + asmoothing + ); + + xe[je][ie - 1] = 0.5 * (xe[je][ie - 1] + cp[0][0]); + ye[je][ie - 1] = 0.5 * (ye[je][ie - 1] + cp[0][1]); + xe[je][ie + 1] = 0.5 * (xe[je][ie + 1] + cp[1][0]); + ye[je][ie + 1] = 0.5 * (ye[je][ie + 1] + cp[1][1]); + } + + // This case is just slightly different. The computation is the same, + // but having computed this, we'll average with the existing result. + p1 = inferCubicControlPoint( + [xe[je][0], ye[je][0]], + [xe[je][2], ye[je][2]], + [xe[je][3], ye[je][3]] + ); + xe[je][1] = 0.5 * (xe[je][1] + p1[0]); + ye[je][1] = 0.5 * (ye[je][1] + p1[1]); + + p1 = inferCubicControlPoint( + [xe[je][nea - 1], ye[je][nea - 1]], + [xe[je][nea - 3], ye[je][nea - 3]], + [xe[je][nea - 4], ye[je][nea - 4]] + ); + xe[je][nea - 2] = 0.5 * (xe[je][nea - 2] + p1[0]); + ye[je][nea - 2] = 0.5 * (ye[je][nea - 2] + p1[1]); + } + } + + return [xe, ye]; +}; + +},{"../../lib":685,"./catmull_rom":848}],851:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +module.exports = { + RELATIVE_CULL_TOLERANCE: 1e-6 +}; + +},{}],852:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Evaluates the derivative of a list of control point arrays. That is, it expects an array or arrays + * that are expanded relative to the raw data to include the bicubic control points, if applicable. If + * only linear interpolation is desired, then the data points correspond 1-1 along that axis to the + * data itself. Since it's catmull-rom splines in either direction note in particular that the + * derivatives are discontinuous across cell boundaries. That's the reason you need both the *cell* + * and the *point within the cell*. + * + * Also note that the discontinuity of the derivative is in magnitude only. The direction *is* + * continuous across cell boundaries. + * + * For example, to compute the derivative of the xcoordinate halfway betwen the 7 and 8th i-gridpoints + * and the 10th and 11th j-gridpoints given bicubic smoothing in both dimensions, you'd write: + * + * var deriv = createIDerivativeEvaluator([x], 1, 1); + * + * var dxdi = deriv([], 7, 10, 0.5, 0.5); + * // => [0.12345] + * + * Since there'd be a bunch of duplicate computation to compute multiple derivatives, you can double + * this up by providing more arrays: + * + * var deriv = createIDerivativeEvaluator([x, y], 1, 1); + * + * var dxdi = deriv([], 7, 10, 0.5, 0.5); + * // => [0.12345, 0.78910] + * + * NB: It's presumed that at this point all data has been sanitized and is valid numerical data arrays + * of the correct dimension. + */ +module.exports = function(arrays, asmoothing, bsmoothing) { + if(asmoothing && bsmoothing) { + return function(out, i0, j0, u, v) { + if(!out) out = []; + var f0, f1, f2, f3, ak, k; + + // Since it's a grid of control points, the actual indices are * 3: + i0 *= 3; + j0 *= 3; + + // Precompute some numbers: + var u2 = u * u; + var ou = 1 - u; + var ou2 = ou * ou; + var ouu2 = ou * u * 2; + var a = -3 * ou2; + var b = 3 * (ou2 - ouu2); + var c = 3 * (ouu2 - u2); + var d = 3 * u2; + + var v2 = v * v; + var v3 = v2 * v; + var ov = 1 - v; + var ov2 = ov * ov; + var ov3 = ov2 * ov; + + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + // Compute the derivatives in the u-direction: + f0 = a * ak[j0 ][i0] + b * ak[j0 ][i0 + 1] + c * ak[j0 ][i0 + 2] + d * ak[j0 ][i0 + 3]; + f1 = a * ak[j0 + 1][i0] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 1][i0 + 2] + d * ak[j0 + 1][i0 + 3]; + f2 = a * ak[j0 + 2][i0] + b * ak[j0 + 2][i0 + 1] + c * ak[j0 + 2][i0 + 2] + d * ak[j0 + 2][i0 + 3]; + f3 = a * ak[j0 + 3][i0] + b * ak[j0 + 3][i0 + 1] + c * ak[j0 + 3][i0 + 2] + d * ak[j0 + 3][i0 + 3]; + + // Now just interpolate in the v-direction since it's all separable: + out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; + } + + return out; + }; + } else if(asmoothing) { + // Handle smooth in the a-direction but linear in the b-direction by performing four + // linear interpolations followed by one cubic interpolation of the result + return function(out, i0, j0, u, v) { + if(!out) out = []; + var f0, f1, k, ak; + i0 *= 3; + var u2 = u * u; + var ou = 1 - u; + var ou2 = ou * ou; + var ouu2 = ou * u * 2; + var a = -3 * ou2; + var b = 3 * (ou2 - ouu2); + var c = 3 * (ouu2 - u2); + var d = 3 * u2; + var ov = 1 - v; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = a * ak[j0 ][i0] + b * ak[j0 ][i0 + 1] + c * ak[j0 ][i0 + 2] + d * ak[j0 ][i0 + 3]; + f1 = a * ak[j0 + 1][i0] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 1][i0 + 2] + d * ak[j0 + 1][i0 + 3]; + + out[k] = ov * f0 + v * f1; + } + return out; + }; + } else if(bsmoothing) { + // Same as the above case, except reversed. I've disabled the no-unused vars rule + // so that this function is fully interpolation-agnostic. Otherwise it would need + // to be called differently in different cases. Which wouldn't be the worst, but + /* eslint-disable no-unused-vars */ + return function(out, i0, j0, u, v) { + /* eslint-enable no-unused-vars */ + if(!out) out = []; + var f0, f1, f2, f3, k, ak; + j0 *= 3; + var v2 = v * v; + var v3 = v2 * v; + var ov = 1 - v; + var ov2 = ov * ov; + var ov3 = ov2 * ov; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ak[j0][i0 + 1] - ak[j0][i0]; + f1 = ak[j0 + 1][i0 + 1] - ak[j0 + 1][i0]; + f2 = ak[j0 + 2][i0 + 1] - ak[j0 + 2][i0]; + f3 = ak[j0 + 3][i0 + 1] - ak[j0 + 3][i0]; + + out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; + } + return out; + }; + } else { + // Finally, both directions are linear: + /* eslint-disable no-unused-vars */ + return function(out, i0, j0, u, v) { + /* eslint-enable no-unused-vars */ + if(!out) out = []; + var f0, f1, k, ak; + var ov = 1 - v; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ak[j0][i0 + 1] - ak[j0][i0]; + f1 = ak[j0 + 1][i0 + 1] - ak[j0 + 1][i0]; + + out[k] = ov * f0 + v * f1; + } + return out; + }; + } +}; + +},{}],853:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = function(arrays, asmoothing, bsmoothing) { + if(asmoothing && bsmoothing) { + return function(out, i0, j0, u, v) { + if(!out) out = []; + var f0, f1, f2, f3, ak, k; + + // Since it's a grid of control points, the actual indices are * 3: + i0 *= 3; + j0 *= 3; + + // Precompute some numbers: + var u2 = u * u; + var u3 = u2 * u; + var ou = 1 - u; + var ou2 = ou * ou; + var ou3 = ou2 * ou; + + var v2 = v * v; + var ov = 1 - v; + var ov2 = ov * ov; + var ovv2 = ov * v * 2; + var a = -3 * ov2; + var b = 3 * (ov2 - ovv2); + var c = 3 * (ovv2 - v2); + var d = 3 * v2; + + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + + // Compute the derivatives in the v-direction: + f0 = a * ak[j0][i0] + b * ak[j0 + 1][i0] + c * ak[j0 + 2][i0] + d * ak[j0 + 3][i0]; + f1 = a * ak[j0][i0 + 1] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 2][i0 + 1] + d * ak[j0 + 3][i0 + 1]; + f2 = a * ak[j0][i0 + 2] + b * ak[j0 + 1][i0 + 2] + c * ak[j0 + 2][i0 + 2] + d * ak[j0 + 3][i0 + 2]; + f3 = a * ak[j0][i0 + 3] + b * ak[j0 + 1][i0 + 3] + c * ak[j0 + 2][i0 + 3] + d * ak[j0 + 3][i0 + 3]; + + // Now just interpolate in the v-direction since it's all separable: + out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3; + } + + return out; + }; + } else if(asmoothing) { + // Handle smooth in the a-direction but linear in the b-direction by performing four + // linear interpolations followed by one cubic interpolation of the result + return function(out, i0, j0, v, u) { + if(!out) out = []; + var f0, f1, f2, f3, k, ak; + i0 *= 3; + var u2 = u * u; + var u3 = u2 * u; + var ou = 1 - u; + var ou2 = ou * ou; + var ou3 = ou2 * ou; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + + f0 = ak[j0 + 1][i0] - ak[j0][i0]; + f1 = ak[j0 + 1][i0 + 1] - ak[j0][i0 + 1]; + f2 = ak[j0 + 1][i0 + 2] - ak[j0][i0 + 2]; + f3 = ak[j0 + 1][i0 + 3] - ak[j0][i0 + 3]; + + out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3; + + // mathematically equivalent: + // f0 = ou3 * ak[j0 ][i0] + 3 * (ou2 * u * ak[j0 ][i0 + 1] + ou * u2 * ak[j0 ][i0 + 2]) + u3 * ak[j0 ][i0 + 3]; + // f1 = ou3 * ak[j0 + 1][i0] + 3 * (ou2 * u * ak[j0 + 1][i0 + 1] + ou * u2 * ak[j0 + 1][i0 + 2]) + u3 * ak[j0 + 1][i0 + 3]; + // out[k] = f1 - f0; + } + return out; + }; + } else if(bsmoothing) { + // Same as the above case, except reversed: + /* eslint-disable no-unused-vars */ + return function(out, i0, j0, u, v) { + /* eslint-enable no-unused-vars */ + if(!out) out = []; + var f0, f1, k, ak; + j0 *= 3; + var ou = 1 - u; + var v2 = v * v; + var ov = 1 - v; + var ov2 = ov * ov; + var ovv2 = ov * v * 2; + var a = -3 * ov2; + var b = 3 * (ov2 - ovv2); + var c = 3 * (ovv2 - v2); + var d = 3 * v2; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = a * ak[j0][i0] + b * ak[j0 + 1][i0] + c * ak[j0 + 2][i0] + d * ak[j0 + 3][i0]; + f1 = a * ak[j0][i0 + 1] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 2][i0 + 1] + d * ak[j0 + 3][i0 + 1]; + + out[k] = ou * f0 + u * f1; + } + return out; + }; + } else { + // Finally, both directions are linear: + /* eslint-disable no-unused-vars */ + return function(out, i0, j0, v, u) { + /* eslint-enable no-unused-vars */ + if(!out) out = []; + var f0, f1, k, ak; + var ov = 1 - v; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ak[j0 + 1][i0] - ak[j0][i0]; + f1 = ak[j0 + 1][i0 + 1] - ak[j0][i0 + 1]; + + out[k] = ov * f0 + v * f1; + } + return out; + }; + } + +}; + +},{}],854:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Return a function that evaluates a set of linear or bicubic control points. + * This will get evaluated a lot, so we'll at least do a bit of extra work to + * flatten some of the choices. In particular, we'll unroll the linear/bicubic + * combinations and we'll allow computing results in parallel to cut down + * on repeated arithmetic. + * + * Take note that we don't search for the correct range in this function. The + * reason is for consistency due to the corrresponding derivative function. In + * particular, the derivatives aren't continuous across cells, so it's important + * to be able control whether the derivative at a cell boundary is approached + * from one side or the other. + */ +module.exports = function(arrays, na, nb, asmoothing, bsmoothing) { + var imax = na - 2; + var jmax = nb - 2; + + if(asmoothing && bsmoothing) { + return function(out, i, j) { + if(!out) out = []; + var f0, f1, f2, f3, ak, k; + + var i0 = Math.max(0, Math.min(Math.floor(i), imax)); + var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); + var u = Math.max(0, Math.min(1, i - i0)); + var v = Math.max(0, Math.min(1, j - j0)); + + // Since it's a grid of control points, the actual indices are * 3: + i0 *= 3; + j0 *= 3; + + // Precompute some numbers: + var u2 = u * u; + var u3 = u2 * u; + var ou = 1 - u; + var ou2 = ou * ou; + var ou3 = ou2 * ou; + + var v2 = v * v; + var v3 = v2 * v; + var ov = 1 - v; + var ov2 = ov * ov; + var ov3 = ov2 * ov; + + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ou3 * ak[j0][i0] + 3 * (ou2 * u * ak[j0][i0 + 1] + ou * u2 * ak[j0][i0 + 2]) + u3 * ak[j0][i0 + 3]; + f1 = ou3 * ak[j0 + 1][i0] + 3 * (ou2 * u * ak[j0 + 1][i0 + 1] + ou * u2 * ak[j0 + 1][i0 + 2]) + u3 * ak[j0 + 1][i0 + 3]; + f2 = ou3 * ak[j0 + 2][i0] + 3 * (ou2 * u * ak[j0 + 2][i0 + 1] + ou * u2 * ak[j0 + 2][i0 + 2]) + u3 * ak[j0 + 2][i0 + 3]; + f3 = ou3 * ak[j0 + 3][i0] + 3 * (ou2 * u * ak[j0 + 3][i0 + 1] + ou * u2 * ak[j0 + 3][i0 + 2]) + u3 * ak[j0 + 3][i0 + 3]; + out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; + } + + return out; + }; + } else if(asmoothing) { + // Handle smooth in the a-direction but linear in the b-direction by performing four + // linear interpolations followed by one cubic interpolation of the result + return function(out, i, j) { + if(!out) out = []; + + var i0 = Math.max(0, Math.min(Math.floor(i), imax)); + var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); + var u = Math.max(0, Math.min(1, i - i0)); + var v = Math.max(0, Math.min(1, j - j0)); + + var f0, f1, f2, f3, k, ak; + i0 *= 3; + var u2 = u * u; + var u3 = u2 * u; + var ou = 1 - u; + var ou2 = ou * ou; + var ou3 = ou2 * ou; + var ov = 1 - v; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ov * ak[j0][i0] + v * ak[j0 + 1][i0]; + f1 = ov * ak[j0][i0 + 1] + v * ak[j0 + 1][i0 + 1]; + f2 = ov * ak[j0][i0 + 2] + v * ak[j0 + 1][i0 + 1]; + f3 = ov * ak[j0][i0 + 3] + v * ak[j0 + 1][i0 + 1]; + + out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3; + } + return out; + }; + } else if(bsmoothing) { + // Same as the above case, except reversed: + return function(out, i, j) { + if(!out) out = []; + + var i0 = Math.max(0, Math.min(Math.floor(i), imax)); + var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); + var u = Math.max(0, Math.min(1, i - i0)); + var v = Math.max(0, Math.min(1, j - j0)); + + var f0, f1, f2, f3, k, ak; + j0 *= 3; + var v2 = v * v; + var v3 = v2 * v; + var ov = 1 - v; + var ov2 = ov * ov; + var ov3 = ov2 * ov; + var ou = 1 - u; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ou * ak[j0][i0] + u * ak[j0][i0 + 1]; + f1 = ou * ak[j0 + 1][i0] + u * ak[j0 + 1][i0 + 1]; + f2 = ou * ak[j0 + 2][i0] + u * ak[j0 + 2][i0 + 1]; + f3 = ou * ak[j0 + 3][i0] + u * ak[j0 + 3][i0 + 1]; + + out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; + } + return out; + }; + } else { + // Finally, both directions are linear: + return function(out, i, j) { + if(!out) out = []; + + var i0 = Math.max(0, Math.min(Math.floor(i), imax)); + var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); + var u = Math.max(0, Math.min(1, i - i0)); + var v = Math.max(0, Math.min(1, j - j0)); + + var f0, f1, k, ak; + var ov = 1 - v; + var ou = 1 - u; + for(k = 0; k < arrays.length; k++) { + ak = arrays[k]; + f0 = ou * ak[j0][i0] + u * ak[j0][i0 + 1]; + f1 = ou * ak[j0 + 1][i0] + u * ak[j0 + 1][i0 + 1]; + + out[k] = ov * f0 + v * f1; + } + return out; + }; + } + +}; + +},{}],855:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Lib = require('../../lib'); +var handleXYDefaults = require('./xy_defaults'); +var handleABDefaults = require('./ab_defaults'); +var setConvert = require('./set_convert'); +var attributes = require('./attributes'); +var colorAttrs = require('../../components/color/attributes'); + +module.exports = function supplyDefaults(traceIn, traceOut, dfltColor, fullLayout) { + function coerce(attr, dflt) { + return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); + } + + var defaultColor = coerce('color', colorAttrs.defaultLine); + Lib.coerceFont(coerce, 'font'); + + coerce('carpet'); + + handleABDefaults(traceIn, traceOut, fullLayout, coerce, defaultColor); + + if(!traceOut.a || !traceOut.b) { + traceOut.visible = false; + return; + } + + if(traceOut.a.length < 3) { + traceOut.aaxis.smoothing = 0; + } + + if(traceOut.b.length < 3) { + traceOut.baxis.smoothing = 0; + } + + // NB: the input is x/y arrays. You should know that the *first* dimension of x and y + // corresponds to b and the second to a. This sounds backwards but ends up making sense + // the important part to know is that when you write y[j][i], j goes from 0 to b.length - 1 + // and i goes from 0 to a.length - 1. + var len = handleXYDefaults(traceIn, traceOut, coerce); + + setConvert(traceOut); + + if(traceOut._cheater) { + coerce('cheaterslope'); + } + + if(!len) { + traceOut.visible = false; + return; + } +}; + +},{"../../components/color/attributes":577,"../../lib":685,"./ab_defaults":838,"./attributes":840,"./set_convert":864,"./xy_defaults":866}],856:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +module.exports = function(data) { + return Array.isArray(data[0]); +}; + +},{}],857:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Carpet = {}; + +Carpet.attributes = require('./attributes'); +Carpet.supplyDefaults = require('./defaults'); +Carpet.plot = require('./plot'); +Carpet.calc = require('./calc'); +Carpet.animatable = true; + +Carpet.moduleType = 'trace'; +Carpet.name = 'carpet'; +Carpet.basePlotModule = require('../../plots/cartesian'); +Carpet.categories = ['cartesian', 'carpet', 'carpetAxis', 'notLegendIsolatable']; +Carpet.meta = { + +}; + +module.exports = Carpet; + +},{"../../plots/cartesian":734,"./attributes":840,"./calc":844,"./defaults":855,"./plot":863}],858:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Given a trace, look up the carpet axis by carpet. + */ +module.exports = function(gd, trace) { + var n = gd._fullData.length; + var firstAxis; + for(var i = 0; i < n; i++) { + var maybeCarpet = gd._fullData[i]; + + if(maybeCarpet.index === trace.index) continue; + + if(maybeCarpet.type === 'carpet') { + if(!firstAxis) { + firstAxis = maybeCarpet; + } + + if(maybeCarpet.carpet === trace.carpet) { + return maybeCarpet; + } + } + } + + return firstAxis; +}; + +},{}],859:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = function makePath(xp, yp, isBicubic) { + // Prevent d3 errors that would result otherwise: + if(xp.length === 0) return ''; + + var i, path = []; + var stride = isBicubic ? 3 : 1; + for(i = 0; i < xp.length; i += stride) { + path.push(xp[i] + ',' + yp[i]); + + if(isBicubic && i < xp.length - stride) { + path.push('C'); + path.push([ + xp[i + 1] + ',' + yp[i + 1], + xp[i + 2] + ',' + yp[i + 2] + ' ', + ].join(' ')); + } + } + return path.join(isBicubic ? '' : 'L'); +}; + +},{}],860:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Map an array of x or y coordinates (c) to screen-space pixel coordinates (p). + * The output array is optional, but if provided, it will be reused without + * reallocation to the extent possible. + */ +module.exports = function mapArray(out, data, func) { + var i; + + if(!Array.isArray(out)) { + // If not an array, make it an array: + out = []; + } else if(out.length > data.length) { + // If too long, truncate. (If too short, it will grow + // automatically so we don't care about that case) + out = out.slice(0, data.length); + } + + for(i = 0; i < data.length; i++) { + out[i] = func(data[i]); + } + + return out; +}; + +},{}],861:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +/* + * Map an array of x or y coordinates (c) to screen-space pixel coordinates (p). + * The output array is optional, but if provided, it will be reused without + * reallocation to the extent possible. + */ +module.exports = function mapArray(out, data, func) { + var i, j; + + if(!Array.isArray(out)) { + // If not an array, make it an array: + out = []; + } else if(out.length > data.length) { + // If too long, truncate. (If too short, it will grow + // automatically so we don't care about that case) + out = out.slice(0, data.length); + } + + for(i = 0; i < data.length; i++) { + if(!Array.isArray(out[i])) { + // If not an array, make it an array: + out[i] = []; + } else if(out[i].length > data.length) { + // If too long, truncate. (If too short, it will grow + // automatically so we don't care about[i] that case) + out[i] = out[i].slice(0, data.length); + } + + for(j = 0; j < data[0].length; j++) { + out[i][j] = func(data[i][j]); + } + } + return out; +}; + +},{}],862:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +module.exports = function orientText(trace, xaxis, yaxis, xy, dxy, refDxy) { + var dx = dxy[0] * trace.dpdx(xaxis); + var dy = dxy[1] * trace.dpdy(yaxis); + var flip = 1; + + var offsetMultiplier = 1.0; + if(refDxy) { + var l1 = Math.sqrt(dxy[0] * dxy[0] + dxy[1] * dxy[1]); + var l2 = Math.sqrt(refDxy[0] * refDxy[0] + refDxy[1] * refDxy[1]); + var dot = (dxy[0] * refDxy[0] + dxy[1] * refDxy[1]) / l1 / l2; + offsetMultiplier = Math.max(0.0, dot); + } + + var angle = Math.atan2(dy, dx) * 180 / Math.PI; + if(angle < -90) { + angle += 180; + flip = -flip; + } else if(angle > 90) { + angle -= 180; + flip = -flip; + } + + return { + angle: angle, + flip: flip, + p: trace.c2p(xy, xaxis, yaxis), + offsetMultplier: offsetMultiplier + }; +}; + +},{}],863:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var d3 = require('d3'); +var Drawing = require('../../components/drawing'); +var map1dArray = require('./map_1d_array'); +var makepath = require('./makepath'); +var orientText = require('./orient_text'); + +module.exports = function plot(gd, plotinfo, cdcarpet) { + for(var i = 0; i < cdcarpet.length; i++) { + plotOne(gd, plotinfo, cdcarpet[i]); + } +}; + +function makeg(el, type, klass) { + var join = el.selectAll(type + '.' + klass).data([0]); + join.enter().append(type).classed(klass, true); + return join; +} + +function plotOne(gd, plotinfo, cd) { + var t = cd[0]; + var trace = cd[0].trace, + xa = plotinfo.xaxis, + ya = plotinfo.yaxis, + aax = trace.aaxis, + bax = trace.baxis, + fullLayout = gd._fullLayout; + // uid = trace.uid, + // id = 'carpet' + uid; + + var gridLayer = plotinfo.plot.selectAll('.carpetlayer'); + var clipLayer = makeg(fullLayout._defs, 'g', 'clips'); + + var axisLayer = makeg(gridLayer, 'g', 'carpet' + trace.uid).classed('trace', true); + var minorLayer = makeg(axisLayer, 'g', 'minorlayer'); + var majorLayer = makeg(axisLayer, 'g', 'majorlayer'); + var boundaryLayer = makeg(axisLayer, 'g', 'boundarylayer'); + var labelLayer = makeg(axisLayer, 'g', 'labellayer'); + + axisLayer.style('opacity', trace.opacity); + + drawGridLines(xa, ya, majorLayer, aax, 'a', aax._gridlines, true); + drawGridLines(xa, ya, majorLayer, bax, 'b', bax._gridlines, true); + drawGridLines(xa, ya, minorLayer, aax, 'a', aax._minorgridlines, true); + drawGridLines(xa, ya, minorLayer, bax, 'b', bax._minorgridlines, true); + + // NB: These are not ommitted if the lines are not active. The joins must be executed + // in order for them to get cleaned up without a full redraw + drawGridLines(xa, ya, boundaryLayer, aax, 'a-boundary', aax._boundarylines); + drawGridLines(xa, ya, boundaryLayer, bax, 'b-boundary', bax._boundarylines); + + var maxAExtent = drawAxisLabels(gd._tester, xa, ya, trace, t, labelLayer, aax._labels, 'a-label'); + var maxBExtent = drawAxisLabels(gd._tester, xa, ya, trace, t, labelLayer, bax._labels, 'b-label'); + + drawAxisTitles(labelLayer, trace, t, xa, ya, maxAExtent, maxBExtent); + + // Swap for debugging in order to draw directly: + // drawClipPath(trace, axisLayer, xa, ya); + drawClipPath(trace, t, clipLayer, xa, ya); +} + +function drawClipPath(trace, t, layer, xaxis, yaxis) { + var seg, xp, yp, i; + // var clip = makeg(layer, 'g', 'carpetclip'); + trace.clipPathId = 'clip' + trace.uid + 'carpet'; + + var clip = layer.select('#' + trace.clipPathId); + + if(!clip.size()) { + clip = layer.append('clipPath') + .classed('carpetclip', true); + } + + var path = makeg(clip, 'path', 'carpetboundary'); + var segments = t.clipsegments; + var segs = []; + + for(i = 0; i < segments.length; i++) { + seg = segments[i]; + xp = map1dArray([], seg.x, xaxis.c2p); + yp = map1dArray([], seg.y, yaxis.c2p); + segs.push(makepath(xp, yp, seg.bicubic)); + } + + // This could be optimized ever so slightly to avoid no-op L segments + // at the corners, but it's so negligible that I don't think it's worth + // the extra complexity + trace.clipPathData = 'M' + segs.join('L') + 'Z'; + clip.attr('id', trace.clipPathId); + path.attr('d', trace.clipPathData); + // .style('stroke-width', 20) + // .style('vector-effect', 'non-scaling-stroke') + // .style('stroke', 'black') + // .style('fill', 'rgba(0, 0, 0, 0.1)'); +} + +function drawGridLines(xaxis, yaxis, layer, axis, axisLetter, gridlines) { + var lineClass = 'const-' + axisLetter + '-lines'; + var gridJoin = layer.selectAll('.' + lineClass).data(gridlines); + + gridJoin.enter().append('path') + .classed(lineClass, true) + .style('vector-effect', 'non-scaling-stroke'); + + gridJoin.each(function(d) { + var gridline = d; + var x = gridline.x; + var y = gridline.y; + + var xp = map1dArray([], x, xaxis.c2p); + var yp = map1dArray([], y, yaxis.c2p); + + var path = 'M' + makepath(xp, yp, gridline.smoothing); + + var el = d3.select(this); + + el.attr('d', path) + .style('stroke-width', gridline.width) + .style('stroke', gridline.color) + .style('fill', 'none'); + }); + + gridJoin.exit().remove(); +} + +function drawAxisLabels(tester, xaxis, yaxis, trace, t, layer, labels, labelClass) { + var labelJoin = layer.selectAll('text.' + labelClass).data(labels); + + labelJoin.enter().append('text') + .classed(labelClass, true); + + var maxExtent = 0; + + labelJoin.each(function(label) { + // Most of the positioning is done in calc_labels. Only the parts that depend upon + // the screen space representation of the x and y axes are here: + var orientation; + if(label.axis.tickangle === 'auto') { + orientation = orientText(trace, xaxis, yaxis, label.xy, label.dxy); + } else { + var angle = (label.axis.tickangle + 180.0) * Math.PI / 180.0; + orientation = orientText(trace, xaxis, yaxis, label.xy, [Math.cos(angle), Math.sin(angle)]); + } + var direction = (label.endAnchor ? -1 : 1) * orientation.flip; + var bbox = Drawing.measureText(tester, label.text, label.font); + + d3.select(this) + .attr('text-anchor', direction > 0 ? 'start' : 'end') + .text(label.text) + .attr('transform', + // Translate to the correct point: + 'translate(' + orientation.p[0] + ',' + orientation.p[1] + ') ' + + // Rotate to line up with grid line tangent: + 'rotate(' + orientation.angle + ')' + + // Adjust the baseline and indentation: + 'translate(' + label.axis.labelpadding * direction + ',' + bbox.height * 0.3 + ')' + ) + .call(Drawing.font, label.font.family, label.font.size, label.font.color); + + maxExtent = Math.max(maxExtent, bbox.width + label.axis.labelpadding); + }); + + labelJoin.exit().remove(); + + return maxExtent; +} + +function drawAxisTitles(layer, trace, t, xa, ya, maxAExtent, maxBExtent) { + var a, b, xy, dxy; + + a = 0.5 * (trace.a[0] + trace.a[trace.a.length - 1]); + b = trace.b[0]; + xy = trace.ab2xy(a, b, true); + dxy = trace.dxyda_rough(a, b); + drawAxisTitle(layer, trace, t, xy, dxy, trace.aaxis, xa, ya, maxAExtent, 'a-title'); + + a = trace.a[0]; + b = 0.5 * (trace.b[0] + trace.b[trace.b.length - 1]); + xy = trace.ab2xy(a, b, true); + dxy = trace.dxydb_rough(a, b); + drawAxisTitle(layer, trace, t, xy, dxy, trace.baxis, xa, ya, maxBExtent, 'b-title'); +} + +function drawAxisTitle(layer, trace, t, xy, dxy, axis, xa, ya, offset, labelClass) { + var data = []; + if(axis.title) data.push(axis.title); + var titleJoin = layer.selectAll('text.' + labelClass).data(data); + + titleJoin.enter().append('text') + .classed(labelClass, true); + + // There's only one, but we'll do it as a join so it's updated nicely: + titleJoin.each(function() { + var orientation = orientText(trace, xa, ya, xy, dxy); + + if(['start', 'both'].indexOf(axis.showticklabels) === -1) { + offset = 0; + } + + // In addition to the size of the labels, add on some extra padding: + offset += axis.titlefont.size + axis.titleoffset; + + + var el = d3.select(this); + + el.text(axis.title || '') + .attr('transform', + 'translate(' + orientation.p[0] + ',' + orientation.p[1] + ') ' + + 'rotate(' + orientation.angle + ') ' + + 'translate(0,' + offset + ')' + ) + .classed('user-select-none', true) + .attr('text-anchor', 'middle') + .call(Drawing.font, axis.titlefont); + }); + + titleJoin.exit().remove(); +} + +},{"../../components/drawing":602,"./makepath":859,"./map_1d_array":860,"./orient_text":862,"d3":107}],864:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var constants = require('./constants'); +var search = require('../../lib/search').findBin; +var computeControlPoints = require('./compute_control_points'); +var createSplineEvaluator = require('./create_spline_evaluator'); +var createIDerivativeEvaluator = require('./create_i_derivative_evaluator'); +var createJDerivativeEvaluator = require('./create_j_derivative_evaluator'); + +/* + * Create conversion functions to go from one basis to another. In particular the letter + * abbreviations are: + * + * i: i/j coordinates along the grid. Integer values correspond to data points + * a: real-valued coordinates along the a/b axes + * c: cartesian x-y coordinates + * p: screen-space pixel coordinates + */ +module.exports = function setConvert(trace) { + var a = trace.a; + var b = trace.b; + var na = trace.a.length; + var nb = trace.b.length; + var aax = trace.aaxis; + var bax = trace.baxis; + + // Grab the limits once rather than recomputing the bounds for every point + // independently: + var amin = a[0]; + var amax = a[na - 1]; + var bmin = b[0]; + var bmax = b[nb - 1]; + var arange = a[a.length - 1] - a[0]; + var brange = b[b.length - 1] - b[0]; + + // Compute the tolerance so that points are visible slightly outside the + // defined carpet axis: + var atol = arange * constants.RELATIVE_CULL_TOLERANCE; + var btol = brange * constants.RELATIVE_CULL_TOLERANCE; + + // Expand the limits to include the relative tolerance: + amin -= atol; + amax += atol; + bmin -= btol; + bmax += btol; + + trace.isVisible = function(a, b) { + return a > amin && a < amax && b > bmin && b < bmax; + }; + + trace.isOccluded = function(a, b) { + return a < amin || a > amax || b < bmin || b > bmax; + }; + + // XXX: ONLY PASSTHRU. ONLY. No, ONLY. + aax.c2p = function(v) { return v; }; + bax.c2p = function(v) { return v; }; + + trace.setScale = function() { + var x = trace.x; + var y = trace.y; + + // This is potentially a very expensive step! It does the bulk of the work of constructing + // an expanded basis of control points. Note in particular that it overwrites the existing + // basis without creating a new array since that would potentially thrash the garbage + // collector. + var result = computeControlPoints(trace.xctrl, trace.yctrl, x, y, aax.smoothing, bax.smoothing); + trace.xctrl = result[0]; + trace.yctrl = result[1]; + + // This step is the second step in the process, but it's somewhat simpler. It just unrolls + // some logic since it would be unnecessarily expensive to compute both interpolations + // nearly identically but separately and to include a bunch of linear vs. bicubic logic in + // every single call. + trace.evalxy = createSplineEvaluator([trace.xctrl, trace.yctrl], na, nb, aax.smoothing, bax.smoothing); + + trace.dxydi = createIDerivativeEvaluator([trace.xctrl, trace.yctrl], aax.smoothing, bax.smoothing); + trace.dxydj = createJDerivativeEvaluator([trace.xctrl, trace.yctrl], aax.smoothing, bax.smoothing); + }; + + /* + * Convert from i/j data grid coordinates to a/b values. Note in particular that this + * is *linear* interpolation, even if the data is interpolated bicubically. + */ + trace.i2a = function(i) { + var i0 = Math.max(0, Math.floor(i[0]), na - 2); + var ti = i[0] - i0; + return (1 - ti) * a[i0] + ti * a[i0 + 1]; + }; + + trace.j2b = function(j) { + var j0 = Math.max(0, Math.floor(j[1]), na - 2); + var tj = j[1] - j0; + return (1 - tj) * b[j0] + tj * b[j0 + 1]; + }; + + trace.ij2ab = function(ij) { + return [trace.i2a(ij[0]), trace.j2b(ij[1])]; + }; + + /* + * Convert from a/b coordinates to i/j grid-numbered coordinates. This requires searching + * through the a/b data arrays and assumes they are monotonic, which is presumed to have + * been enforced already. + */ + trace.a2i = function(aval) { + var i0 = Math.max(0, Math.min(search(aval, a), na - 2)); + var a0 = a[i0]; + var a1 = a[i0 + 1]; + return Math.max(0, Math.min(na - 1, i0 + (aval - a0) / (a1 - a0))); + }; + + trace.b2j = function(bval) { + var j0 = Math.max(0, Math.min(search(bval, b), nb - 2)); + var b0 = b[j0]; + var b1 = b[j0 + 1]; + return Math.max(0, Math.min(nb - 1, j0 + (bval - b0) / (b1 - b0))); + }; + + trace.ab2ij = function(ab) { + return [trace.a2i(ab[0]), trace.b2j(ab[1])]; + }; + + /* + * Convert from i/j coordinates to x/y caretesian coordinates. This means either bilinear + * or bicubic spline evaluation, but the hard part is already done at this point. + */ + trace.i2c = function(i, j) { + return trace.evalxy([], i, j); + }; + + trace.ab2xy = function(aval, bval, extrapolate) { + if(!extrapolate && (aval < a[0] || aval > a[na - 1] | bval < b[0] || bval > b[nb - 1])) { + return [false, false]; + } + var i = trace.a2i(aval); + var j = trace.b2j(bval); + + var pt = trace.evalxy([], i, j); + + if(extrapolate) { + // This section uses the boundary derivatives to extrapolate linearly outside + // the defined range. Consider a scatter line with one point inside the carpet + // axis and one point outside. If we don't extrapolate, we can't draw the line + // at all. + var iex = 0; + var jex = 0; + var der = []; + + var i0, ti, j0, tj; + if(aval < a[0]) { + i0 = 0; + ti = 0; + iex = (aval - a[0]) / (a[1] - a[0]); + } else if(aval > a[na - 1]) { + i0 = na - 2; + ti = 1; + iex = (aval - a[na - 1]) / (a[na - 1] - a[na - 2]); + } else { + i0 = Math.max(0, Math.min(na - 2, Math.floor(i))); + ti = i - i0; + } + + if(bval < b[0]) { + j0 = 0; + tj = 0; + jex = (bval - b[0]) / (b[1] - b[0]); + } else if(bval > b[nb - 1]) { + j0 = nb - 2; + tj = 1; + jex = (bval - b[nb - 1]) / (b[nb - 1] - b[nb - 2]); + } else { + j0 = Math.max(0, Math.min(nb - 2, Math.floor(j))); + tj = j - j0; + } + + if(iex) { + trace.dxydi(der, i0, j0, ti, tj); + pt[0] += der[0] * iex; + pt[1] += der[1] * iex; + } + + if(jex) { + trace.dxydj(der, i0, j0, ti, tj); + pt[0] += der[0] * jex; + pt[1] += der[1] * jex; + } + } + + return pt; + }; + + + trace.c2p = function(xy, xa, ya) { + return [xa.c2p(xy[0]), ya.c2p(xy[1])]; + }; + + trace.p2x = function(p, xa, ya) { + return [xa.p2c(p[0]), ya.p2c(p[1])]; + }; + + trace.dadi = function(i /* , u*/) { + // Right now only a piecewise linear a or b basis is permitted since smoother interpolation + // would cause monotonicity problems. As a retult, u is entirely disregarded in this + // computation, though we'll specify it as a parameter for the sake of completeness and + // future-proofing. It would be possible to use monotonic cubic interpolation, for example. + // + // See: https://en.wikipedia.org/wiki/Monotone_cubic_interpolation + + // u = u || 0; + + var i0 = Math.max(0, Math.min(a.length - 2, i)); + + // The step (demoninator) is implicitly 1 since that's the grid spacing. + return a[i0 + 1] - a[i0]; + }; + + trace.dbdj = function(j /* , v*/) { + // See above caveats for dadi which also apply here + var j0 = Math.max(0, Math.min(b.length - 2, j)); + + // The step (demoninator) is implicitly 1 since that's the grid spacing. + return b[j0 + 1] - b[j0]; + }; + + // Takes: grid cell coordinate (i, j) and fractional grid cell coordinates (u, v) + // Returns: (dx/da, dy/db) + // + // NB: separate grid cell + fractional grid cell coordinate format is due to the discontinuous + // derivative, as described better in create_i_derivative_evaluator.js + trace.dxyda = function(i0, j0, u, v) { + var dxydi = trace.dxydi(null, i0, j0, u, v); + var dadi = trace.dadi(i0, u); + + return [dxydi[0] / dadi, dxydi[1] / dadi]; + }; + + trace.dxydb = function(i0, j0, u, v) { + var dxydj = trace.dxydj(null, i0, j0, u, v); + var dbdj = trace.dbdj(j0, v); + + return [dxydj[0] / dbdj, dxydj[1] / dbdj]; + }; + + // Sometimes we don't care about precision and all we really want is decent rough + // directions (as is the case with labels). In that case, we can do a very rough finite + // difference and spare having to worry about precise grid coordinates: + trace.dxyda_rough = function(a, b, reldiff) { + var h = arange * (reldiff || 0.1); + var plus = trace.ab2xy(a + h, b, true); + var minus = trace.ab2xy(a - h, b, true); + + return [ + (plus[0] - minus[0]) * 0.5 / h, + (plus[1] - minus[1]) * 0.5 / h + ]; + }; + + trace.dxydb_rough = function(a, b, reldiff) { + var h = brange * (reldiff || 0.1); + var plus = trace.ab2xy(a, b + h, true); + var minus = trace.ab2xy(a, b - h, true); + + return [ + (plus[0] - minus[0]) * 0.5 / h, + (plus[1] - minus[1]) * 0.5 / h + ]; + }; + + trace.dpdx = function(xa) { + return xa._m; + }; + + trace.dpdy = function(ya) { + return ya._m; + }; +}; + +},{"../../lib/search":699,"./compute_control_points":850,"./constants":851,"./create_i_derivative_evaluator":852,"./create_j_derivative_evaluator":853,"./create_spline_evaluator":854}],865:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Lib = require('../../lib'); + +/* + * Given a 2D array as well as a basis in either direction, this function fills in the + * 2D array using a combination of smoothing and extrapolation. This is rather important + * for carpet plots since it's used for layout so that we can't simply omit or blank out + * points. We need a reasonable guess so that the interpolation puts points somewhere + * even if we were to somehow represent that the data was missing later on. + * + * input: + * - data: 2D array of arrays + * - a: array such that a.length === data[0].length + * - b: array such that b.length === data.length + */ +module.exports = function smoothFill2dArray(data, a, b) { + var i, j, k; + var ip = []; + var jp = []; + // var neighborCnts = []; + + var ni = data[0].length; + var nj = data.length; + + function avgSurrounding(i, j) { + // As a low-quality start, we can simply average surrounding points (in a not + // non-uniform grid aware manner): + var sum = 0.0; + var val; + var cnt = 0; + if(i > 0 && (val = data[j][i - 1]) !== undefined) { + cnt++; + sum += val; + } + if(i < ni - 1 && (val = data[j][i + 1]) !== undefined) { + cnt++; + sum += val; + } + if(j > 0 && (val = data[j - 1][i]) !== undefined) { + cnt++; + sum += val; + } + if(j < nj - 1 && (val = data[j + 1][i]) !== undefined) { + cnt++; + sum += val; + } + return sum / Math.max(1, cnt); + + } + + // This loop iterates over all cells. Any cells that are null will be noted and those + // are the only points we will loop over and update via laplace's equation. Points with + // any neighbors will receive the average. If there are no neighboring points, then they + // will be set to zero. Also as we go, track the maximum magnitude so that we can scale + // our tolerance accordingly. + var dmax = 0.0; + for(i = 0; i < ni; i++) { + for(j = 0; j < nj; j++) { + if(data[j][i] === undefined) { + ip.push(i); + jp.push(j); + + data[j][i] = avgSurrounding(i, j); + // neighborCnts.push(result.neighbors); + } + dmax = Math.max(dmax, Math.abs(data[j][i])); + } + } + + if(!ip.length) return data; + + // The tolerance doesn't need to be excessive. It's just for display positioning + var dxp, dxm, dap, dam, dbp, dbm, c, d, diff, reldiff, overrelaxation; + var tol = 1e-5; + var resid = 0; + var itermax = 100; + var iter = 0; + var n = ip.length; + do { + resid = 0; + // Normally we'd loop in two dimensions, but not all points are blank and need + // an update, so we instead loop only over the points that were tabulated above + for(k = 0; k < n; k++) { + i = ip[k]; + j = jp[k]; + // neighborCnt = neighborCnts[k]; + + // Track a counter for how many contributions there are. We'll use this counter + // to average at the end, which reduces to laplace's equation with neumann boundary + // conditions on the first derivative (second derivative is zero so that we get + // a nice linear extrapolation at the boundaries). + var boundaryCnt = 0; + var newVal = 0; + + var d0, d1, x0, x1, i0, j0; + if(i === 0) { + // If this lies along the i = 0 boundary, extrapolate from the two points + // to the right of this point. Note that the finite differences take into + // account non-uniform grid spacing: + i0 = Math.min(ni - 1, 2); + x0 = a[i0]; + x1 = a[1]; + d0 = data[j][i0]; + d1 = data[j][1]; + newVal += d1 + (d1 - d0) * (a[0] - x1) / (x1 - x0); + boundaryCnt++; + } else if(i === ni - 1) { + // If along the high i boundary, extrapolate from the two points to the + // left of this point + i0 = Math.max(0, ni - 3); + x0 = a[i0]; + x1 = a[ni - 2]; + d0 = data[j][i0]; + d1 = data[j][ni - 2]; + newVal += d1 + (d1 - d0) * (a[ni - 1] - x1) / (x1 - x0); + boundaryCnt++; + } + + if((i === 0 || i === ni - 1) && (j > 0 && j < nj - 1)) { + // If along the min(i) or max(i) boundaries, also smooth vertically as long + // as we're not in a corner. Note that the finite differences used here + // are also aware of nonuniform grid spacing: + dxp = b[j + 1] - b[j]; + dxm = b[j] - b[j - 1]; + newVal += (dxm * data[j + 1][i] + dxp * data[j - 1][i]) / (dxm + dxp); + boundaryCnt++; + } + + if(j === 0) { + // If along the j = 0 boundary, extrpolate this point from the two points + // above it + j0 = Math.min(nj - 1, 2); + x0 = b[j0]; + x1 = b[1]; + d0 = data[j0][i]; + d1 = data[1][i]; + newVal += d1 + (d1 - d0) * (b[0] - x1) / (x1 - x0); + boundaryCnt++; + } else if(j === nj - 1) { + // Same for the max j boundary from the cells below it: + j0 = Math.max(0, nj - 3); + x0 = b[j0]; + x1 = b[nj - 2]; + d0 = data[j0][i]; + d1 = data[nj - 2][i]; + newVal += d1 + (d1 - d0) * (b[nj - 1] - x1) / (x1 - x0); + boundaryCnt++; + } + + if((j === 0 || j === nj - 1) && (i > 0 && i < ni - 1)) { + // Now average points to the left/right as long as not in a corner: + dxp = a[i + 1] - a[i]; + dxm = a[i] - a[i - 1]; + newVal += (dxm * data[j][i + 1] + dxp * data[j][i - 1]) / (dxm + dxp); + boundaryCnt++; + } + + if(!boundaryCnt) { + // If none of the above conditions were triggered, then this is an interior + // point and we can just do a laplace equation update. As above, these differences + // are aware of nonuniform grid spacing: + dap = a[i + 1] - a[i]; + dam = a[i] - a[i - 1]; + dbp = b[j + 1] - b[j]; + dbm = b[j] - b[j - 1]; + + // These are just some useful constants for the iteration, which is perfectly + // straightforward but a little long to derive from f_xx + f_yy = 0. + c = dap * dam * (dap + dam); + d = dbp * dbm * (dbp + dbm); + + newVal = (c * (dbm * data[j + 1][i] + dbp * data[j - 1][i]) + + d * (dam * data[j][i + 1] + dap * data[j][i - 1])) / + (d * (dam + dap) + c * (dbm + dbp)); + } else { + // If we did have contributions from the boundary conditions, then average + // the result from the various contributions: + newVal /= boundaryCnt; + } + + // Jacobi updates are ridiculously slow to converge, so this approach uses a + // Gauss-seidel iteration which is dramatically faster. + diff = newVal - data[j][i]; + reldiff = diff / dmax; + resid += reldiff * reldiff; + + // Gauss-Seidel-ish iteration, omega chosen based on heuristics and some + // quick tests. + // + // NB: Don't overrelax the boundarie. Otherwise set an overrelaxation factor + // which is a little low but safely optimal-ish: + overrelaxation = boundaryCnt ? 0 : 0.85; + + // If there are four non-null neighbors, then we want a simple average without + // overrelaxation. If all the surrouding points are null, then we want the full + // overrelaxation + // + // Based on experiments, this actually seems to slow down convergence just a bit. + // I'll leave it here for reference in case this needs to be revisited, but + // it seems to work just fine without this. + // if (overrelaxation) overrelaxation *= (4 - neighborCnt) / 4; + + data[j][i] += diff * (1 + overrelaxation); + } + + resid = Math.sqrt(resid); + } while(iter++ < itermax && resid > tol); + + Lib.log('Smoother converged to', resid, 'after', iter, 'iterations'); + + return data; +}; + +},{"../../lib":685}],866:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var hasColumns = require('./has_columns'); +var convertColumnData = require('../heatmap/convert_column_xyz'); + +module.exports = function handleXYDefaults(traceIn, traceOut, coerce) { + var cols = []; + var x = coerce('x'); + + var needsXTransform = x && !hasColumns(x); + if(needsXTransform) cols.push('x'); + + traceOut._cheater = !x; + + var y = coerce('y'); + + var needsYTransform = y && !hasColumns(y); + if(needsYTransform) cols.push('y'); + + if(!x && !y) return; + + if(cols.length) { + convertColumnData(traceOut, traceOut.aaxis, traceOut.baxis, 'a', 'b', cols); + } + + return true; +}; + +},{"../heatmap/convert_column_xyz":907,"./has_columns":856}],867:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154430,7 +155063,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../../plots/attributes":727,"../scattergeo/attributes":976}],844:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../../plots/attributes":722,"../scattergeo/attributes":1013}],868:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154449,7 +155082,7 @@ module.exports = function calc(gd, trace) { colorscaleCalc(trace, trace.z, '', 'z'); }; -},{"../../components/colorscale/calc":591}],845:[function(require,module,exports){ +},{"../../components/colorscale/calc":584}],869:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154504,7 +155137,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('hoverinfo', (layout._dataLength === 1) ? 'location+z+text' : undefined); }; -},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":843}],846:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":867}],870:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154523,7 +155156,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],847:[function(require,module,exports){ +},{}],871:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154593,7 +155226,7 @@ function makeHoverInfo(pointData, trace, pt, axis) { pointData.extraText = text.join('
'); } -},{"../../plots/cartesian/axes":729,"./attributes":843}],848:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"./attributes":867}],872:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154625,7 +155258,7 @@ Choropleth.meta = { module.exports = Choropleth; -},{"../../plots/geo":757,"../heatmap/colorbar":868,"./attributes":843,"./calc":844,"./defaults":845,"./event_data":846,"./hover":847,"./plot":849}],849:[function(require,module,exports){ +},{"../../plots/geo":752,"../heatmap/colorbar":906,"./attributes":867,"./calc":868,"./defaults":869,"./event_data":870,"./hover":871,"./plot":873}],873:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154759,7 +155392,7 @@ function style(geo) { }); } -},{"../../components/color":585,"../../components/colorscale":599,"../../components/drawing":608,"../../lib/array_to_calc_item":677,"../../lib/geo_location_utils":685,"../../lib/topojson_utils":711,"../../plots/geo/constants":755,"d3":114}],850:[function(require,module,exports){ +},{"../../components/color":578,"../../components/colorscale":592,"../../components/drawing":602,"../../lib/array_to_calc_item":671,"../../lib/geo_location_utils":680,"../../lib/topojson_utils":706,"../../plots/geo/constants":750,"d3":107}],874:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154774,6 +155407,7 @@ var heatmapAttrs = require('../heatmap/attributes'); var scatterAttrs = require('../scatter/attributes'); var colorscaleAttrs = require('../../components/colorscale/attributes'); var colorbarAttrs = require('../../components/colorbar/attributes'); +var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; var scatterLineAttrs = scatterAttrs.line; @@ -154847,7 +155481,7 @@ module.exports = extendFlat({}, { }), width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash, + dash: dash, smoothing: extendFlat({}, scatterLineAttrs.smoothing, { }) @@ -154858,7 +155492,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../heatmap/attributes":865,"../scatter/attributes":947}],851:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../components/drawing/attributes":601,"../../lib/extend":677,"../heatmap/attributes":903,"../scatter/attributes":976}],875:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154962,7 +155596,7 @@ function autoContours(start, end, ncontours) { return dummyAx; } -},{"../../lib":690,"../../plots/cartesian/axes":729,"../heatmap/calc":866}],852:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../heatmap/calc":904}],876:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -154987,7 +155621,7 @@ module.exports = function colorbar(gd, cd) { gd._fullLayout._infolayer.selectAll('.' + cbId).remove(); - if(trace.showscale === false) { + if(!trace.showscale) { Plots.autoMargin(gd, cbId); return; } @@ -155024,7 +155658,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":588,"../../plots/plots":792,"./end_plus":856,"./make_color_map":860}],853:[function(require,module,exports){ +},{"../../components/colorbar/draw":581,"../../plots/plots":787,"./end_plus":880,"./make_color_map":884}],877:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155064,7 +155698,7 @@ module.exports.CHOOSESADDLE = { // substitute to be used up later? module.exports.SADDLEREMAINDER = {1: 4, 2: 8, 4: 1, 7: 13, 8: 2, 11: 14, 13: 7, 14: 11}; -},{}],854:[function(require,module,exports){ +},{}],878:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155096,7 +155730,7 @@ module.exports = function handleContourDefaults(traceIn, traceOut, coerce) { if(autoContour || !contourSize) coerce('ncontours'); }; -},{"../../lib":690,"./attributes":850}],855:[function(require,module,exports){ +},{"../../lib":685,"./attributes":874}],879:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155135,7 +155769,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout handleStyleDefaults(traceIn, traceOut, coerce, layout); }; -},{"../../lib":690,"../heatmap/has_columns":872,"../heatmap/xyz_defaults":880,"./attributes":850,"./contours_defaults":854,"./style_defaults":864}],856:[function(require,module,exports){ +},{"../../lib":685,"../heatmap/has_columns":910,"../heatmap/xyz_defaults":918,"./attributes":874,"./contours_defaults":878,"./style_defaults":888}],880:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155155,7 +155789,7 @@ module.exports = function endPlus(contours) { return contours.end + contours.size / 1e6; }; -},{}],857:[function(require,module,exports){ +},{}],881:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155169,34 +155803,38 @@ module.exports = function endPlus(contours) { var Lib = require('../../lib'); var constants = require('./constants'); -module.exports = function findAllPaths(pathinfo) { +module.exports = function findAllPaths(pathinfo, xtol, ytol) { var cnt, startLoc, i, pi, j; + // Default just passes these values through as they were before: + xtol = xtol || 0.01; + ytol = ytol || 0.01; + for(i = 0; i < pathinfo.length; i++) { pi = pathinfo[i]; for(j = 0; j < pi.starts.length; j++) { startLoc = pi.starts[j]; - makePath(pi, startLoc, 'edge'); + makePath(pi, startLoc, 'edge', xtol, ytol); } cnt = 0; while(Object.keys(pi.crossings).length && cnt < 10000) { cnt++; startLoc = Object.keys(pi.crossings)[0].split(',').map(Number); - makePath(pi, startLoc); + makePath(pi, startLoc, undefined, xtol, ytol); } if(cnt === 10000) Lib.log('Infinite loop in contour?'); } }; -function equalPts(pt1, pt2) { - return Math.abs(pt1[0] - pt2[0]) < 0.01 && - Math.abs(pt1[1] - pt2[1]) < 0.01; +function equalPts(pt1, pt2, xtol, ytol) { + return Math.abs(pt1[0] - pt2[0]) < xtol && + Math.abs(pt1[1] - pt2[1]) < ytol; } function ptDist(pt1, pt2) { @@ -155205,17 +155843,17 @@ function ptDist(pt1, pt2) { return Math.sqrt(dx * dx + dy * dy); } -function makePath(pi, loc, edgeflag) { - var startLocStr = loc.join(','), - locStr = startLocStr, - mi = pi.crossings[locStr], - marchStep = startStep(mi, edgeflag, loc), - // start by going backward a half step and finding the crossing point - pts = [getInterpPx(pi, loc, [-marchStep[0], -marchStep[1]])], - startStepStr = marchStep.join(','), - m = pi.z.length, - n = pi.z[0].length, - cnt; +function makePath(pi, loc, edgeflag, xtol, ytol) { + var startLocStr = loc.join(','); + var locStr = startLocStr; + var mi = pi.crossings[locStr]; + var marchStep = startStep(mi, edgeflag, loc); + // start by going backward a half step and finding the crossing point + var pts = [getInterpPx(pi, loc, [-marchStep[0], -marchStep[1]])]; + var startStepStr = marchStep.join(','); + var m = pi.z.length; + var n = pi.z[0].length; + var cnt; // now follow the path for(cnt = 0; cnt < 10000; cnt++) { // just to avoid infinite loops @@ -155239,7 +155877,7 @@ function makePath(pi, loc, edgeflag) { loc[1] += marchStep[1]; // don't include the same point multiple times - if(equalPts(pts[pts.length - 1], pts[pts.length - 2])) pts.pop(); + if(equalPts(pts[pts.length - 1], pts[pts.length - 2], xtol, ytol)) pts.pop(); locStr = loc.join(','); var atEdge = (marchStep[0] && (loc[0] < 0 || loc[0] > n - 2)) || @@ -155255,7 +155893,7 @@ function makePath(pi, loc, edgeflag) { if(cnt === 10000) { Lib.log('Infinite loop in contour?'); } - var closedpath = equalPts(pts[0], pts[pts.length - 1]), + var closedpath = equalPts(pts[0], pts[pts.length - 1], xtol, ytol), totaldist = 0, distThresholdFactor = 0.2 * pi.smoothing, alldists = [], @@ -155344,7 +155982,7 @@ function makePath(pi, loc, edgeflag) { // edge path - does it start where an existing edge path ends, or vice versa? var merged = false; pi.edgepaths.forEach(function(edgepath, edgei) { - if(!merged && equalPts(edgepath[0], pts[pts.length - 1])) { + if(!merged && equalPts(edgepath[0], pts[pts.length - 1], xtol, ytol)) { pts.pop(); merged = true; @@ -155352,7 +155990,7 @@ function makePath(pi, loc, edgeflag) { var doublemerged = false; pi.edgepaths.forEach(function(edgepath2, edgei2) { if(!doublemerged && equalPts( - edgepath2[edgepath2.length - 1], pts[0])) { + edgepath2[edgepath2.length - 1], pts[0], xtol, ytol)) { doublemerged = true; pts.splice(0, 1); pi.edgepaths.splice(edgei, 1); @@ -155372,7 +156010,7 @@ function makePath(pi, loc, edgeflag) { } }); pi.edgepaths.forEach(function(edgepath, edgei) { - if(!merged && equalPts(edgepath[edgepath.length - 1], pts[0])) { + if(!merged && equalPts(edgepath[edgepath.length - 1], pts[0], xtol, ytol)) { pts.splice(0, 1); pi.edgepaths[edgei] = edgepath.concat(pts); merged = true; @@ -155415,6 +156053,7 @@ function getInterpPx(pi, loc, step) { if(step[1]) { var dx = (pi.level - zxy) / (pi.z[locy][locx + 1] - zxy); + return [xa.c2p((1 - dx) * pi.x[locx] + dx * pi.x[locx + 1], true), ya.c2p(pi.y[locy], true)]; } @@ -155425,7 +156064,7 @@ function getInterpPx(pi, loc, step) { } } -},{"../../lib":690,"./constants":853}],858:[function(require,module,exports){ +},{"../../lib":685,"./constants":877}],882:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155444,7 +156083,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return heatmapHoverPoints(pointData, xval, yval, hovermode, true); }; -},{"../heatmap/hover":873}],859:[function(require,module,exports){ +},{"../heatmap/hover":911}],883:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155476,7 +156115,7 @@ Contour.meta = { module.exports = Contour; -},{"../../plots/cartesian":739,"./attributes":850,"./calc":851,"./colorbar":852,"./defaults":855,"./hover":858,"./plot":862,"./style":863}],860:[function(require,module,exports){ +},{"../../plots/cartesian":734,"./attributes":874,"./calc":875,"./colorbar":876,"./defaults":879,"./hover":882,"./plot":886,"./style":887}],884:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155500,6 +156139,11 @@ module.exports = function makeColorMap(trace) { nc = Math.floor((end - start) / cs) + 1, extra = contours.coloring === 'lines' ? 0 : 1; + if(!isFinite(cs)) { + cs = 1; + nc = 1; + } + var scl = trace.colorscale, len = scl.length; @@ -155555,7 +156199,7 @@ module.exports = function makeColorMap(trace) { }); }; -},{"../../components/colorscale":599,"./end_plus":856,"d3":114}],861:[function(require,module,exports){ +},{"../../components/colorscale":592,"./end_plus":880,"d3":107}],885:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155647,7 +156291,7 @@ function getMarchingIndex(val, corners) { return (mi === 15) ? 0 : mi; } -},{"./constants":853}],862:[function(require,module,exports){ +},{"./constants":877}],886:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155927,7 +156571,8 @@ function makeLines(plotgroup, pathinfo, contours) { .attr('d', function(d) { return Drawing.smoothopen(d, smoothing); }) - .style('stroke-miterlimit', 1); + .style('stroke-miterlimit', 1) + .style('vector-effect', 'non-scaling-stroke'); var closedcontourlines = linegroup.selectAll('path.closedline') .data(function(d) { return d.paths; }); @@ -155938,7 +156583,8 @@ function makeLines(plotgroup, pathinfo, contours) { .attr('d', function(d) { return Drawing.smoothclosed(d, smoothing); }) - .style('stroke-miterlimit', 1); + .style('stroke-miterlimit', 1) + .style('vector-effect', 'non-scaling-stroke'); } function clipGaps(plotGroup, plotinfo, cd0, perimeter) { @@ -156009,7 +156655,7 @@ function makeClipMask(cd0) { return z; } -},{"../../components/drawing":608,"../../lib":690,"../heatmap/plot":878,"./end_plus":856,"./find_all_paths":857,"./make_crossings":861,"d3":114}],863:[function(require,module,exports){ +},{"../../components/drawing":602,"../../lib":685,"../heatmap/plot":916,"./end_plus":880,"./find_all_paths":881,"./make_crossings":885,"d3":107}],887:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156071,7 +156717,7 @@ module.exports = function style(gd) { heatmapStyle(gd); }; -},{"../../components/drawing":608,"../heatmap/style":879,"./make_color_map":860,"d3":114}],864:[function(require,module,exports){ +},{"../../components/drawing":602,"../heatmap/style":917,"./make_color_map":884,"d3":107}],888:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156086,15 +156732,15 @@ module.exports = function style(gd) { var colorscaleDefaults = require('../../components/colorscale/defaults'); -module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout) { +module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout, defaultColor, defaultWidth) { var coloring = coerce('contours.coloring'); var showLines; if(coloring === 'fill') showLines = coerce('contours.showlines'); if(showLines !== false) { - if(coloring !== 'lines') coerce('line.color', '#000'); - coerce('line.width', 0.5); + if(coloring !== 'lines') coerce('line.color', defaultColor || '#000'); + coerce('line.width', defaultWidth === undefined ? 0.5 : defaultWidth); coerce('line.dash'); } @@ -156107,7 +156753,1396 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout) } }; -},{"../../components/colorscale/defaults":594}],865:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587}],889:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var heatmapAttrs = require('../heatmap/attributes'); +var scatterAttrs = require('../scatter/attributes'); +var colorscaleAttrs = require('../../components/colorscale/attributes'); +var colorbarAttrs = require('../../components/colorbar/attributes'); + +var extendFlat = require('../../lib/extend').extendFlat; + +var scatterLineAttrs = scatterAttrs.line; +var constants = require('./constants'); + +module.exports = extendFlat({}, { + carpet: { + valType: 'string', + + + }, + z: heatmapAttrs.z, + a: heatmapAttrs.x, + a0: heatmapAttrs.x0, + da: heatmapAttrs.dx, + b: heatmapAttrs.y, + b0: heatmapAttrs.y0, + db: heatmapAttrs.dy, + text: heatmapAttrs.text, + transpose: heatmapAttrs.transpose, + atype: heatmapAttrs.xtype, + btype: heatmapAttrs.ytype, + + mode: { + valType: 'flaglist', + flags: ['lines', 'fill'], + extras: ['none'], + + + }, + + connectgaps: heatmapAttrs.connectgaps, + + fillcolor: { + valType: 'color', + + + }, + + autocontour: { + valType: 'boolean', + dflt: true, + + + }, + ncontours: { + valType: 'integer', + dflt: 15, + min: 1, + + + }, + + contours: { + type: { + valType: 'enumerated', + values: ['levels', 'constraint'], + dflt: 'levels', + + + }, + start: { + valType: 'number', + dflt: null, + + + }, + end: { + valType: 'number', + dflt: null, + + + }, + size: { + valType: 'number', + dflt: null, + min: 0, + + + }, + coloring: { + valType: 'enumerated', + values: ['fill', 'lines', 'none'], + dflt: 'fill', + + + }, + showlines: { + valType: 'boolean', + dflt: true, + + + }, + operation: { + valType: 'enumerated', + values: [].concat(constants.INEQUALITY_OPS).concat(constants.INTERVAL_OPS).concat(constants.SET_OPS), + + dflt: '=', + + }, + value: { + valType: 'any', + dflt: 0, + + + } + }, + + line: { + color: extendFlat({}, scatterLineAttrs.color, { + + }), + width: scatterLineAttrs.width, + dash: scatterLineAttrs.dash, + smoothing: extendFlat({}, scatterLineAttrs.smoothing, { + + }) + } +}, + colorscaleAttrs, + { autocolorscale: extendFlat({}, colorscaleAttrs.autocolorscale, {dflt: false}) }, + { colorbar: colorbarAttrs } +); + +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../heatmap/attributes":903,"../scatter/attributes":976,"./constants":892}],890:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Lib = require('../../lib'); +var Axes = require('../../plots/cartesian/axes'); +var extendFlat = require('../../lib').extendFlat; +var Registry = require('../../registry'); +var colorscaleCalc = require('../../components/colorscale/calc'); +var hasColumns = require('../heatmap/has_columns'); +var convertColumnData = require('../heatmap/convert_column_xyz'); +var clean2dArray = require('../heatmap/clean_2d_array'); +var maxRowLength = require('../heatmap/max_row_length'); +var interp2d = require('../heatmap/interp2d'); +var findEmpties = require('../heatmap/find_empties'); +var makeBoundArray = require('../heatmap/make_bound_array'); +var supplyDefaults = require('./defaults'); +var lookupCarpet = require('../carpet/lookup_carpetid'); + +// most is the same as heatmap calc, then adjust it +// though a few things inside heatmap calc still look for +// contour maps, because the makeBoundArray calls are too entangled +module.exports = function calc(gd, trace) { + var carpet = trace.carpetTrace = lookupCarpet(gd, trace); + if(!carpet || !carpet.visible || carpet.visible === 'legendonly') return; + + if(!trace.a || !trace.b) { + // Look up the original incoming carpet data: + var carpetdata = gd.data[carpet.index]; + + // Look up the incoming trace data, *except* perform a shallow + // copy so that we're not actually modifying it when we use it + // to supply defaults: + var tracedata = gd.data[trace.index]; + // var tracedata = extendFlat({}, gd.data[trace.index]); + + // If the data is not specified + if(!tracedata.a) tracedata.a = carpetdata.a; + if(!tracedata.b) tracedata.b = carpetdata.b; + + supplyDefaults(tracedata, trace, trace._defaultColor, gd._fullLayout); + } + + var cd = heatmappishCalc(gd, trace), + contours = trace.contours; + + // Autocontour is unset for constraint plots so also autocontour if undefind: + if(trace.autocontour === true) { + var dummyAx = autoContours(trace.zmin, trace.zmax, trace.ncontours); + + contours.size = dummyAx.dtick; + + contours.start = Axes.tickFirst(dummyAx); + dummyAx.range.reverse(); + contours.end = Axes.tickFirst(dummyAx); + + if(contours.start === trace.zmin) contours.start += contours.size; + if(contours.end === trace.zmax) contours.end -= contours.size; + + // if you set a small ncontours, *and* the ends are exactly on zmin/zmax + // there's an edge case where start > end now. Make sure there's at least + // one meaningful contour, put it midway between the crossed values + if(contours.start > contours.end) { + contours.start = contours.end = (contours.start + contours.end) / 2; + } + + // copy auto-contour info back to the source data. + trace._input.contours = extendFlat({}, contours); + } + else { + // sanity checks on manually-supplied start/end/size + var start = contours.start, + end = contours.end, + inputContours = trace._input.contours; + + if(start > end) { + contours.start = inputContours.start = end; + end = contours.end = inputContours.end = start; + start = contours.start; + } + + if(!(contours.size > 0)) { + var sizeOut; + if(start === end) sizeOut = 1; + else sizeOut = autoContours(start, end, trace.ncontours).dtick; + + inputContours.size = contours.size = sizeOut; + } + } + + return cd; +}; + +/* + * autoContours: make a dummy axis object with dtick we can use + * as contours.size, and if needed we can use Axes.tickFirst + * with this axis object to calculate the start and end too + * + * start: the value to start the contours at + * end: the value to end at (must be > start) + * ncontours: max number of contours to make, like roughDTick + * + * returns: an axis object + */ +function autoContours(start, end, ncontours) { + var dummyAx = { + type: 'linear', + range: [start, end] + }; + + Axes.autoTicks( + dummyAx, + (end - start) / (ncontours || 15) + ); + + return dummyAx; +} + +function heatmappishCalc(gd, trace) { + // prepare the raw data + // run makeCalcdata on x and y even for heatmaps, in case of category mappings + var carpet = trace.carpetTrace; + var aax = carpet.aaxis, + bax = carpet.baxis, + isContour = Registry.traceIs(trace, 'contour'), + zsmooth = isContour ? 'best' : trace.zsmooth, + a, + a0, + da, + b, + b0, + db, + z, + i; + + // cancel minimum tick spacings (only applies to bars and boxes) + aax._minDtick = 0; + bax._minDtick = 0; + + if(hasColumns(trace)) convertColumnData(trace, aax, bax, 'a', 'b', ['z']); + + a = trace.a ? aax.makeCalcdata(trace, 'a') : []; + b = trace.b ? bax.makeCalcdata(trace, 'b') : []; + a0 = trace.a0 || 0; + da = trace.da || 1; + b0 = trace.b0 || 0; + db = trace.db || 1; + + z = clean2dArray(trace.z, trace.transpose); + + trace._emptypoints = findEmpties(z); + trace._interpz = interp2d(z, trace._emptypoints, trace._interpz); + + function noZsmooth(msg) { + zsmooth = trace._input.zsmooth = trace.zsmooth = false; + Lib.notifier('cannot fast-zsmooth: ' + msg); + } + + // check whether we really can smooth (ie all boxes are about the same size) + if(zsmooth === 'fast') { + if(aax.type === 'log' || bax.type === 'log') { + noZsmooth('log axis found'); + } + else { + if(a.length) { + var avgda = (a[a.length - 1] - a[0]) / (a.length - 1), + maxErrX = Math.abs(avgda / 100); + for(i = 0; i < a.length - 1; i++) { + if(Math.abs(a[i + 1] - a[i] - avgda) > maxErrX) { + noZsmooth('a scale is not linear'); + break; + } + } + } + if(b.length && zsmooth === 'fast') { + var avgdy = (b[b.length - 1] - b[0]) / (b.length - 1), + maxErrY = Math.abs(avgdy / 100); + for(i = 0; i < b.length - 1; i++) { + if(Math.abs(b[i + 1] - b[i] - avgdy) > maxErrY) { + noZsmooth('b scale is not linear'); + break; + } + } + } + } + } + + // create arrays of brick boundaries, to be used by autorange and heatmap.plot + var xlen = maxRowLength(z), + xIn = trace.xtype === 'scaled' ? '' : a, + xArray = makeBoundArray(trace, xIn, a0, da, xlen, aax), + yIn = trace.ytype === 'scaled' ? '' : b, + yArray = makeBoundArray(trace, yIn, b0, db, z.length, bax); + + var cd0 = { + a: xArray, + b: yArray, + z: z, + //mappedZ: mappedZ + }; + + if(trace.contours.type === 'levels') { + // auto-z and autocolorscale if applicable + colorscaleCalc(trace, z, '', 'z'); + } + + return [cd0]; +} + +},{"../../components/colorscale/calc":584,"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"../carpet/lookup_carpetid":858,"../heatmap/clean_2d_array":905,"../heatmap/convert_column_xyz":907,"../heatmap/find_empties":909,"../heatmap/has_columns":910,"../heatmap/interp2d":913,"../heatmap/make_bound_array":914,"../heatmap/max_row_length":915,"./defaults":896}],891:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = function(pathinfo, operation, perimeter, trace) { + // Abandon all hope, ye who enter here. + var i, v1, v2; + var na = trace.a.length; + var nb = trace.b.length; + var z = trace.z; + + var boundaryMax = -Infinity; + var boundaryMin = Infinity; + + for(i = 0; i < nb; i++) { + boundaryMin = Math.min(boundaryMin, z[i][0]); + boundaryMin = Math.min(boundaryMin, z[i][na - 1]); + boundaryMax = Math.max(boundaryMax, z[i][0]); + boundaryMax = Math.max(boundaryMax, z[i][na - 1]); + } + + for(i = 1; i < na - 1; i++) { + boundaryMin = Math.min(boundaryMin, z[0][i]); + boundaryMin = Math.min(boundaryMin, z[nb - 1][i]); + boundaryMax = Math.max(boundaryMax, z[0][i]); + boundaryMax = Math.max(boundaryMax, z[nb - 1][i]); + } + + switch(operation) { + case '>': + case '>=': + if(trace.contours.value > boundaryMax) { + pathinfo[0].prefixBoundary = true; + } + break; + case '<': + case '<=': + if(trace.contours.value < boundaryMin) { + pathinfo[0].prefixBoundary = true; + } + break; + case '[]': + case '()': + v1 = Math.min.apply(null, trace.contours.value); + v2 = Math.max.apply(null, trace.contours.value); + if(v2 < boundaryMin) { + pathinfo[0].prefixBoundary = true; + } + if(v1 > boundaryMax) { + pathinfo[0].prefixBoundary = true; + } + break; + case '][': + case ')(': + v1 = Math.min.apply(null, trace.contours.value); + v2 = Math.max.apply(null, trace.contours.value); + if(v1 < boundaryMin && v2 > boundaryMax) { + pathinfo[0].prefixBoundary = true; + } + break; + } +}; + +},{}],892:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = { + INEQUALITY_OPS: ['=', '<', '>=', '>', '<='], + INTERVAL_OPS: ['[]', '()', '[)', '(]', '][', ')(', '](', ')['], + SET_OPS: ['{}', '}{'] +}; + +},{}],893:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var constants = require('./constants'); +var isNumeric = require('fast-isnumeric'); + +// This syntax conforms to the existing filter transform syntax, but we don't care +// about open vs. closed intervals for simply drawing contours constraints: +module.exports['[]'] = makeRangeSettings('[]'); +module.exports['()'] = makeRangeSettings('()'); +module.exports['[)'] = makeRangeSettings('[)'); +module.exports['(]'] = makeRangeSettings('(]'); + +// Inverted intervals simply flip the sign: +module.exports[']['] = makeRangeSettings(']['); +module.exports[')('] = makeRangeSettings(')('); +module.exports[')['] = makeRangeSettings(')['); +module.exports[']('] = makeRangeSettings(']('); + +module.exports['>'] = makeInequalitySettings('>'); +module.exports['>='] = makeInequalitySettings('>='); +module.exports['<'] = makeInequalitySettings('<'); +module.exports['<='] = makeInequalitySettings('<='); +module.exports['='] = makeInequalitySettings('='); + +// This does not in any way shape or form support calendars. It's adapted from +// transforms/filter.js. +function coerceValue(operation, value) { + var hasArrayValue = Array.isArray(value); + + var coercedValue; + + function coerce(value) { + return isNumeric(value) ? (+value) : null; + } + + if(constants.INEQUALITY_OPS.indexOf(operation) !== -1) { + coercedValue = hasArrayValue ? coerce(value[0]) : coerce(value); + } else if(constants.INTERVAL_OPS.indexOf(operation) !== -1) { + coercedValue = hasArrayValue ? + [coerce(value[0]), coerce(value[1])] : + [coerce(value), coerce(value)]; + } else if(constants.SET_OPS.indexOf(operation) !== -1) { + coercedValue = hasArrayValue ? value.map(coerce) : [coerce(value)]; + } + + return coercedValue; +} + +// Returns a parabola scaled so that the min/max is either +/- 1 and zero at the two values +// provided. The data is mapped by this function when constructing intervals so that it's +// very easy to construct contours as normal. +function makeRangeSettings(operation) { + return function(value) { + value = coerceValue(operation, value); + + // Ensure proper ordering: + var min = Math.min(value[0], value[1]); + var max = Math.max(value[0], value[1]); + + return { + start: min, + end: max, + size: max - min + }; + }; +} + +function makeInequalitySettings(operation) { + return function(value) { + value = coerceValue(operation, value); + + return { + start: value, + end: Infinity, + size: Infinity + }; + }; +} + +},{"./constants":892,"fast-isnumeric":116}],894:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var constraintMapping = require('./constraint_mapping'); +var isNumeric = require('fast-isnumeric'); + +module.exports = function(coerce, contours) { + var zvalue; + var scalarValuedOps = ['=', '<', '<=', '>', '>=']; + + if(scalarValuedOps.indexOf(contours.operation) === -1) { + // Requires an array of two numbers: + coerce('contours.value', [0, 1]); + + if(!Array.isArray(contours.value)) { + if(isNumeric(contours.value)) { + zvalue = parseFloat(contours.value); + contours.value = [zvalue, zvalue + 1]; + } + } else if(contours.value.length > 2) { + contours.value = contours.value.slice(2); + } else if(contours.length === 0) { + contours.value = [0, 1]; + } else if(contours.length < 2) { + zvalue = parseFloat(contours.value[0]); + contours.value = [zvalue, zvalue + 1]; + } else { + contours.value = [ + parseFloat(contours.value[0]), + parseFloat(contours.value[1]) + ]; + } + } else { + // Requires a single scalar: + coerce('contours.value', 0); + + if(!isNumeric(contours.value)) { + if(Array.isArray(contours.value)) { + contours.value = parseFloat(contours.value[0]); + } else { + contours.value = 0; + } + } + } + + var map = constraintMapping[contours.operation](contours.value); + + contours.start = map.start; + contours.end = map.end; + contours.size = map.size; +}; + +},{"./constraint_mapping":893,"fast-isnumeric":116}],895:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Lib = require('../../lib'); + +// The contour extraction is great, except it totally fails for constraints because we +// need weird range loops and flipped contours instead of the usual format. This function +// does some weird manipulation of the extracted pathinfo data such that it magically +// draws contours correctly *as* constraints. +module.exports = function(pathinfo, operation) { + var i, pi0, pi1; + + var op0 = function(arr) { return arr.reverse(); }; + var op1 = function(arr) { return arr; }; + + switch(operation) { + case '][': + case ')[': + case '](': + case ')(': + var tmp = op0; + op0 = op1; + op1 = tmp; + // It's a nice rule, except this definitely *is* what's intended here. + /* eslint-disable: no-fallthrough */ + case '[]': + case '[)': + case '(]': + case '()': + /* eslint-enable: no-fallthrough */ + if(pathinfo.length !== 2) { + Lib.warn('Contour data invalid for the specified inequality range operation.'); + return; + } + + // In this case there should be exactly two contour levels in pathinfo. We + // simply concatenate the info into one pathinfo and flip all of the data + // in one. This will draw the contour as closed. + pi0 = pathinfo[0]; + pi1 = pathinfo[1]; + + for(i = 0; i < pi0.edgepaths.length; i++) { + pi0.edgepaths[i] = op0(pi0.edgepaths[i]); + } + + for(i = 0; i < pi0.paths.length; i++) { + pi0.paths[i] = op0(pi0.paths[i]); + } + + while(pi1.edgepaths.length) { + pi0.edgepaths.push(op1(pi1.edgepaths.shift())); + } + while(pi1.paths.length) { + pi0.paths.push(op1(pi1.paths.shift())); + } + pathinfo.pop(); + + break; + case '>=': + case '>': + if(pathinfo.length !== 1) { + Lib.warn('Contour data invalid for the specified inequality operation.'); + return; + } + + // In this case there should be exactly two contour levels in pathinfo. We + // simply concatenate the info into one pathinfo and flip all of the data + // in one. This will draw the contour as closed. + pi0 = pathinfo[0]; + + for(i = 0; i < pi0.edgepaths.length; i++) { + pi0.edgepaths[i] = op0(pi0.edgepaths[i]); + } + + for(i = 0; i < pi0.paths.length; i++) { + pi0.paths[i] = op0(pi0.paths[i]); + } + break; + } +}; + +},{"../../lib":685}],896:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Lib = require('../../lib'); + +var handleXYZDefaults = require('../heatmap/xyz_defaults'); +var attributes = require('./attributes'); +var handleStyleDefaults = require('../contour/style_defaults'); +var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); +var plotAttributes = require('../../plots/attributes'); +var supplyConstraintDefaults = require('./constraint_value_defaults'); +var addOpacity = require('../../components/color').addOpacity; + +module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { + function coerce(attr, dflt) { + return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); + } + + coerce('carpet'); + + // If either a or b is not present, then it's not a valid trace *unless* the carpet + // axis has the a or b values we're looking for. So if these are not found, just defer + // that decision until the calc step. + // + // NB: the calc step will modify the original data input by assigning whichever of + // a or b are missing. This is necessary because panning goes right from supplyDefaults + // to plot (skipping calc). That means on subsequent updates, this *will* need to be + // able to find a and b. + // + // The long-term proper fix is that this should perhaps use underscored attributes to + // at least modify the user input to a slightly lesser extent. Fully removing the + // input mutation is challenging. The underscore approach is not currently taken since + // it requires modification to all of the functions below that expect the coerced + // attribute name to match the property name -- except '_a' !== 'a' so that is not + // straightforward. + if(traceIn.a && traceIn.b) { + var contourSize, contourStart, contourEnd, missingEnd, autoContour; + + var len = handleXYZDefaults(traceIn, traceOut, coerce, layout, 'a', 'b'); + + if(!len) { + traceOut.visible = false; + return; + } + + coerce('text'); + coerce('contours.type'); + + var contours = traceOut.contours; + + // Unimplemented: + // coerce('connectgaps', hasColumns(traceOut)); + + if(contours.type === 'constraint') { + coerce('contours.operation'); + + supplyConstraintDefaults(coerce, contours); + + // Override the trace-level showlegend default with a default that takes + // into account whether this is a constraint or level contours: + Lib.coerce(traceIn, traceOut, plotAttributes, 'showlegend', true); + + // Override the above defaults with constraint-aware tweaks: + coerce('contours.coloring', contours.operation === '=' ? 'lines' : 'fill'); + coerce('contours.showlines', true); + + if(contours.operation === '=') { + contours.coloring = 'lines'; + } + handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce); + + // If there's a fill color, use it at full opacity for the line color + var lineDfltColor = traceOut.fillcolor ? addOpacity(traceOut.fillcolor, 1) : defaultColor; + + handleStyleDefaults(traceIn, traceOut, coerce, layout, lineDfltColor, 2); + + if(contours.operation === '=') { + coerce('line.color', defaultColor); + + if(contours.coloring === 'fill') { + contours.coloring = 'lines'; + } + + if(contours.coloring === 'lines') { + delete traceOut.fillcolor; + } + } + + delete traceOut.showscale; + delete traceOut.autocontour; + delete traceOut.autocolorscale; + delete traceOut.colorscale; + delete traceOut.ncontours; + delete traceOut.colorbar; + + if(traceOut.line) { + delete traceOut.line.autocolorscale; + delete traceOut.line.colorscale; + delete traceOut.line.mincolor; + delete traceOut.line.maxcolor; + } + + // TODO: These shouldb e deleted in accordance with toolpanel convention, but + // we can't becuase we require them so that it magically makes the contour + // parts of the code happy: + // delete traceOut.contours.start; + // delete traceOut.contours.end; + // delete traceOut.contours.size; + } else { + // Override the trace-level showlegend default with a default that takes + // into account whether this is a constraint or level contours: + Lib.coerce(traceIn, traceOut, plotAttributes, 'showlegend', false); + + contourStart = Lib.coerce2(traceIn, traceOut, attributes, 'contours.start'); + contourEnd = Lib.coerce2(traceIn, traceOut, attributes, 'contours.end'); + + // normally we only need size if autocontour is off. But contour.calc + // pushes its calculated contour size back to the input trace, so for + // things like restyle that can call supplyDefaults without calc + // after the initial draw, we can just reuse the previous calculation + contourSize = coerce('contours.size'); + coerce('contours.coloring'); + + missingEnd = (contourStart === false) || (contourEnd === false); + + if(missingEnd) { + autoContour = traceOut.autocontour = true; + } else { + autoContour = coerce('autocontour', false); + } + + if(autoContour || !contourSize) { + coerce('ncontours'); + } + + handleStyleDefaults(traceIn, traceOut, coerce, layout); + + delete traceOut.value; + delete traceOut.operation; + } + } else { + traceOut._defaultColor = defaultColor; + } +}; + +},{"../../components/color":578,"../../lib":685,"../../plots/attributes":722,"../contour/style_defaults":888,"../heatmap/xyz_defaults":918,"../scatter/fillcolor_defaults":983,"./attributes":889,"./constraint_value_defaults":894}],897:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Lib = require('../../lib'); + +module.exports = function emptyPathinfo(contours, plotinfo, cd0) { + var cs = contours.size; + var pathinfo = []; + + var carpet = cd0.trace.carpetTrace; + + for(var ci = contours.start; ci < contours.end + cs / 10; ci += cs) { + pathinfo.push({ + level: ci, + // all the cells with nontrivial marching index + crossings: {}, + // starting points on the edges of the lattice for each contour + starts: [], + // all unclosed paths (may have less items than starts, + // if a path is closed by rounding) + edgepaths: [], + // all closed paths + paths: [], + // store axes so we can convert to px + xaxis: carpet.aaxis, + yaxis: carpet.baxis, + // full data arrays to use for interpolation + x: cd0.a, + y: cd0.b, + z: cd0.z, + smoothing: cd0.trace.line.smoothing + }); + + if(pathinfo.length > 1000) { + Lib.warn('Too many contours, clipping at 1000', contours); + break; + } + } + return pathinfo; +}; + +},{"../../lib":685}],898:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var ContourCarpet = {}; + +ContourCarpet.attributes = require('./attributes'); +ContourCarpet.supplyDefaults = require('./defaults'); +ContourCarpet.colorbar = require('../contour/colorbar'); +ContourCarpet.calc = require('./calc'); +ContourCarpet.plot = require('./plot'); +ContourCarpet.style = require('./style'); + +ContourCarpet.moduleType = 'trace'; +ContourCarpet.name = 'contourcarpet'; +ContourCarpet.basePlotModule = require('../../plots/cartesian'); +ContourCarpet.categories = ['cartesian', 'carpet', 'contour', 'symbols', 'showLegend', 'hasLines', 'carpetDependent']; +ContourCarpet.meta = { + + +}; + +module.exports = ContourCarpet; + +},{"../../plots/cartesian":734,"../contour/colorbar":876,"./attributes":889,"./calc":890,"./defaults":896,"./plot":901,"./style":902}],899:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var Drawing = require('../../components/drawing'); +var axisAlignedLine = require('../carpet/axis_aligned_line'); +var Lib = require('../../lib'); +// var map1dArray = require('../carpet/map_1d_array'); +// var makepath = require('../carpet/makepath'); + +module.exports = function joinAllPaths(trace, pi, perimeter, ab2p, carpet, carpetcd, xa, ya) { + var i; + var fullpath = ''; + + var startsleft = pi.edgepaths.map(function(v, i) { return i; }); + var newloop = true; + var endpt, newendpt, cnt, nexti, possiblei, addpath; + + var atol = Math.abs(perimeter[0][0] - perimeter[2][0]) * 1e-4; + var btol = Math.abs(perimeter[0][1] - perimeter[2][1]) * 1e-4; + + function istop(pt) { return Math.abs(pt[1] - perimeter[0][1]) < btol; } + function isbottom(pt) { return Math.abs(pt[1] - perimeter[2][1]) < btol; } + function isleft(pt) { return Math.abs(pt[0] - perimeter[0][0]) < atol; } + function isright(pt) { return Math.abs(pt[0] - perimeter[2][0]) < atol; } + + function pathto(pt0, pt1) { + var i, j, segments, axis; + var path = ''; + + if((istop(pt0) && !isright(pt0)) || (isbottom(pt0) && !isleft(pt0))) { + axis = carpet.aaxis; + segments = axisAlignedLine(carpet, carpetcd, [pt0[0], pt1[0]], 0.5 * (pt0[1] + pt1[1])); + } else { + axis = carpet.baxis; + segments = axisAlignedLine(carpet, carpetcd, 0.5 * (pt0[0] + pt1[0]), [pt0[1], pt1[1]]); + } + + for(i = 1; i < segments.length; i++) { + path += axis.smoothing ? 'C' : 'L'; + for(j = 0; j < segments[i].length; j++) { + var pt = segments[i][j]; + path += [xa.c2p(pt[0]), ya.c2p(pt[1])] + ' '; + } + } + + return path; + } + + i = 0; + endpt = null; + while(startsleft.length) { + var startpt = pi.edgepaths[i][0]; + + if(endpt) { + fullpath += pathto(endpt, startpt); + } + + addpath = Drawing.smoothopen(pi.edgepaths[i].map(ab2p), pi.smoothing); + fullpath += newloop ? addpath : addpath.replace(/^M/, 'L'); + startsleft.splice(startsleft.indexOf(i), 1); + endpt = pi.edgepaths[i][pi.edgepaths[i].length - 1]; + nexti = -1; + + // now loop through sides, moving our endpoint until we find a new start + for(cnt = 0; cnt < 4; cnt++) { // just to prevent infinite loops + if(!endpt) { + Lib.log('Missing end?', i, pi); + break; + } + + if(istop(endpt) && !isright(endpt)) { + newendpt = perimeter[1]; // left top ---> right top + } else if(isleft(endpt)) { + newendpt = perimeter[0]; // left bottom ---> left top + } else if(isbottom(endpt)) { + newendpt = perimeter[3]; // right bottom + } else if(isright(endpt)) { + newendpt = perimeter[2]; // left bottom + } + + for(possiblei = 0; possiblei < pi.edgepaths.length; possiblei++) { + var ptNew = pi.edgepaths[possiblei][0]; + // is ptNew on the (horz. or vert.) segment from endpt to newendpt? + if(Math.abs(endpt[0] - newendpt[0]) < atol) { + if(Math.abs(endpt[0] - ptNew[0]) < atol && (ptNew[1] - endpt[1]) * (newendpt[1] - ptNew[1]) >= 0) { + newendpt = ptNew; + nexti = possiblei; + } + } else if(Math.abs(endpt[1] - newendpt[1]) < btol) { + if(Math.abs(endpt[1] - ptNew[1]) < btol && (ptNew[0] - endpt[0]) * (newendpt[0] - ptNew[0]) >= 0) { + newendpt = ptNew; + nexti = possiblei; + } + } else { + Lib.log('endpt to newendpt is not vert. or horz.', endpt, newendpt, ptNew); + } + } + + if(nexti >= 0) break; + fullpath += pathto(endpt, newendpt); + endpt = newendpt; + } + + if(nexti === pi.edgepaths.length) { + Lib.log('unclosed perimeter path'); + break; + } + + i = nexti; + + // if we closed back on a loop we already included, + // close it and start a new loop + newloop = (startsleft.indexOf(i) === -1); + if(newloop) { + i = startsleft[0]; + fullpath += pathto(endpt, newendpt) + 'Z'; + endpt = null; + } + } + + // finally add the interior paths + for(i = 0; i < pi.paths.length; i++) { + fullpath += Drawing.smoothclosed(pi.paths[i].map(ab2p), pi.smoothing); + } + + return fullpath; +}; + +},{"../../components/drawing":602,"../../lib":685,"../carpet/axis_aligned_line":841}],900:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +module.exports = function mapPathinfo(pathinfo, map) { + var i, j, k, pi, pedgepaths, ppaths, pedgepath, ppath, path; + + for(i = 0; i < pathinfo.length; i++) { + pi = pathinfo[i]; + pedgepaths = pi.pedgepaths = []; + ppaths = pi.ppaths = []; + for(j = 0; j < pi.edgepaths.length; j++) { + path = pi.edgepaths[j]; + pedgepath = []; + for(k = 0; k < path.length; k++) { + pedgepath[k] = map(path[k]); + } + pedgepaths.push(pedgepath); + } + for(j = 0; j < pi.paths.length; j++) { + path = pi.paths[j]; + ppath = []; + for(k = 0; k < path.length; k++) { + ppath[k] = map(path[k]); + } + ppaths.push(ppath); + } + } +}; + +},{}],901:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var d3 = require('d3'); +var map1dArray = require('../carpet/map_1d_array'); +var makepath = require('../carpet/makepath'); +var Drawing = require('../../components/drawing'); + +var makeCrossings = require('../contour/make_crossings'); +var findAllPaths = require('../contour/find_all_paths'); +var convertToConstraints = require('./convert_to_constraints'); +var joinAllPaths = require('./join_all_paths'); +var emptyPathinfo = require('./empty_pathinfo'); +var mapPathinfo = require('./map_pathinfo'); +var lookupCarpet = require('../carpet/lookup_carpetid'); +var closeBoundaries = require('./close_boundaries'); + +function makeg(el, type, klass) { + var join = el.selectAll(type + '.' + klass).data([0]); + join.enter().append(type).classed(klass, true); + return join; +} + +module.exports = function plot(gd, plotinfo, cdcontours) { + for(var i = 0; i < cdcontours.length; i++) { + plotOne(gd, plotinfo, cdcontours[i]); + } +}; + +function plotOne(gd, plotinfo, cd) { + var trace = cd[0].trace; + + var carpet = trace.carpetTrace = lookupCarpet(gd, trace); + var carpetcd = gd.calcdata[carpet.index][0]; + + if(!carpet.visible || carpet.visible === 'legendonly') return; + + var a = cd[0].a; + var b = cd[0].b; + var contours = trace.contours; + var uid = trace.uid; + var xa = plotinfo.xaxis; + var ya = plotinfo.yaxis; + var fullLayout = gd._fullLayout; + var id = 'contour' + uid; + var pathinfo = emptyPathinfo(contours, plotinfo, cd[0]); + var isConstraint = trace.contours.type === 'constraint'; + + // Map [a, b] (data) --> [i, j] (pixels) + function ab2p(ab) { + var pt = carpet.ab2xy(ab[0], ab[1], true); + return [xa.c2p(pt[0]), ya.c2p(pt[1])]; + } + + if(trace.visible !== true) { + fullLayout._infolayer.selectAll('.cb' + uid).remove(); + return; + } + + // Define the perimeter in a/b coordinates: + var perimeter = [ + [a[0], b[b.length - 1]], + [a[a.length - 1], b[b.length - 1]], + [a[a.length - 1], b[0]], + [a[0], b[0]] + ]; + + // Extract the contour levels: + makeCrossings(pathinfo); + var atol = (a[a.length - 1] - a[0]) * 1e-8; + var btol = (b[b.length - 1] - b[0]) * 1e-8; + findAllPaths(pathinfo, atol, btol); + + // Constraints might need to be draw inverted, which is not something contours + // handle by default since they're assumed fully opaque so that they can be + // drawn overlapping. This function flips the paths as necessary so that they're + // drawn correctly. + // + // TODO: Perhaps this should be generalized and *all* paths should be drawn as + // closed regions so that translucent contour levels would be valid. + // See: https://github.com/plotly/plotly.js/issues/1356 + if(trace.contours.type === 'constraint') { + convertToConstraints(pathinfo, trace.contours.operation); + closeBoundaries(pathinfo, trace.contours.operation, perimeter, trace); + } + + // Map the paths in a/b coordinates to pixel coordinates: + mapPathinfo(pathinfo, ab2p); + + // draw everything + var plotGroup = makeContourGroup(plotinfo, cd, id); + + // Compute the boundary path + var seg, xp, yp, i; + var segs = []; + for(i = carpetcd.clipsegments.length - 1; i >= 0; i--) { + seg = carpetcd.clipsegments[i]; + xp = map1dArray([], seg.x, xa.c2p); + yp = map1dArray([], seg.y, ya.c2p); + xp.reverse(); + yp.reverse(); + segs.push(makepath(xp, yp, seg.bicubic)); + } + + var boundaryPath = 'M' + segs.join('L') + 'Z'; + + // Draw the baseline background fill that fills in the space behind any other + // contour levels: + makeBackground(plotGroup, carpetcd.clipsegments, xa, ya, isConstraint, contours.coloring); + + // Draw the specific contour fills. As a simplification, they're assumed to be + // fully opaque so that it's easy to draw them simply overlapping. The alternative + // would be to flip adjacent paths and draw closed paths for each level instead. + makeFills(trace, plotGroup, xa, ya, pathinfo, perimeter, ab2p, carpet, carpetcd, contours.coloring, boundaryPath); + + // Draw contour lines: + makeLines(plotGroup, pathinfo, contours); + + // Clip the boundary of the plot: + clipBoundary(plotGroup, carpet); +} + +function clipBoundary(plotGroup, carpet) { + plotGroup.attr('clip-path', 'url(#' + carpet.clipPathId + ')'); +} + +function makeContourGroup(plotinfo, cd, id) { + var plotgroup = plotinfo.plot.select('.maplayer') + .selectAll('g.contour.' + id) + .classed('trace', true) + .data(cd); + + plotgroup.enter().append('g') + .classed('contour', true) + .classed(id, true); + + plotgroup.exit().remove(); + + return plotgroup; +} + +function makeLines(plotgroup, pathinfo, contours) { + var smoothing = pathinfo[0].smoothing; + + var linegroup = plotgroup.selectAll('g.contourlevel') + .data(contours.showlines === false ? [] : pathinfo); + linegroup.enter().append('g') + .classed('contourlevel', true); + linegroup.exit().remove(); + + var opencontourlines = linegroup.selectAll('path.openline') + .data(function(d) { return d.pedgepaths; }); + opencontourlines.enter().append('path') + .classed('openline', true); + opencontourlines.exit().remove(); + opencontourlines + .attr('d', function(d) { + return Drawing.smoothopen(d, smoothing); + }) + .style('vector-effect', 'non-scaling-stroke'); + + var closedcontourlines = linegroup.selectAll('path.closedline') + .data(function(d) { return d.ppaths; }); + closedcontourlines.enter().append('path') + .classed('closedline', true); + closedcontourlines.exit().remove(); + closedcontourlines + .attr('d', function(d) { + return Drawing.smoothclosed(d, smoothing); + }) + .style('vector-effect', 'non-scaling-stroke') + .style('stroke-miterlimit', 1); +} + +function makeBackground(plotgroup, clipsegments, xaxis, yaxis, isConstraint, coloring) { + var seg, xp, yp, i; + var bggroup = makeg(plotgroup, 'g', 'contourbg'); + + var bgfill = bggroup.selectAll('path') + .data((coloring === 'fill' && !isConstraint) ? [0] : []); + bgfill.enter().append('path'); + bgfill.exit().remove(); + + var segs = []; + for(i = 0; i < clipsegments.length; i++) { + seg = clipsegments[i]; + xp = map1dArray([], seg.x, xaxis.c2p); + yp = map1dArray([], seg.y, yaxis.c2p); + segs.push(makepath(xp, yp, seg.bicubic)); + } + + bgfill + .attr('d', 'M' + segs.join('L') + 'Z') + .style('stroke', 'none'); +} + +function makeFills(trace, plotgroup, xa, ya, pathinfo, perimeter, ab2p, carpet, carpetcd, coloring, boundaryPath) { + var fillgroup = plotgroup.selectAll('g.contourfill') + .data([0]); + fillgroup.enter().append('g') + .classed('contourfill', true); + + var fillitems = fillgroup.selectAll('path') + .data(coloring === 'fill' ? pathinfo : []); + fillitems.enter().append('path'); + fillitems.exit().remove(); + fillitems.each(function(pi) { + // join all paths for this level together into a single path + // first follow clockwise around the perimeter to close any open paths + // if the whole perimeter is above this level, start with a path + // enclosing the whole thing. With all that, the parity should mean + // that we always fill everything above the contour, nothing below + var fullpath = joinAllPaths(trace, pi, perimeter, ab2p, carpet, carpetcd, xa, ya); + + if(pi.prefixBoundary) { + fullpath = boundaryPath + fullpath; + } + + if(!fullpath) { + d3.select(this).remove(); + } else { + d3.select(this) + .attr('d', fullpath) + .style('stroke', 'none'); + } + }); +} + +},{"../../components/drawing":602,"../carpet/lookup_carpetid":858,"../carpet/makepath":859,"../carpet/map_1d_array":860,"../contour/find_all_paths":881,"../contour/make_crossings":885,"./close_boundaries":891,"./convert_to_constraints":895,"./empty_pathinfo":897,"./join_all_paths":899,"./map_pathinfo":900,"d3":107}],902:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var d3 = require('d3'); + +var Drawing = require('../../components/drawing'); +var heatmapStyle = require('../heatmap/style'); + +var makeColorMap = require('../contour/make_color_map'); + +module.exports = function style(gd) { + var contours = d3.select(gd).selectAll('g.contour'); + + contours.style('opacity', function(d) { + return d.trace.opacity; + }); + + contours.each(function(d) { + var c = d3.select(this); + var trace = d.trace; + var contours = trace.contours; + var line = trace.line; + var cs = contours.size || 1; + var start = contours.start; + + if(!isFinite(cs)) { + cs = 0; + } + + c.selectAll('g.contourlevel').each(function() { + d3.select(this).selectAll('path') + .call(Drawing.lineGroupStyle, + line.width, + line.color, + line.dash); + }); + + if(trace.contours.type === 'levels' && trace.contours.coloring !== 'none') { + var colorMap = makeColorMap(trace); + + c.selectAll('g.contourbg path') + .style('fill', colorMap(start - cs / 2)); + + c.selectAll('g.contourfill path') + .style('fill', function(d, i) { + return colorMap(start + (i + 0.5) * cs); + }); + } else { + c.selectAll('g.contourfill path') + .style('fill', trace.fillcolor); + } + }); + + heatmapStyle(gd); +}; + +},{"../../components/drawing":602,"../contour/make_color_map":884,"../heatmap/style":917,"d3":107}],903:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156191,7 +158226,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../scatter/attributes":947}],866:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../scatter/attributes":976}],904:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156210,7 +158245,7 @@ var Axes = require('../../plots/cartesian/axes'); var histogram2dCalc = require('../histogram2d/calc'); var colorscaleCalc = require('../../components/colorscale/calc'); var hasColumns = require('./has_columns'); -var convertColumnXYZ = require('./convert_column_xyz'); +var convertColumnData = require('./convert_column_xyz'); var maxRowLength = require('./max_row_length'); var clean2dArray = require('./clean_2d_array'); var interp2d = require('./interp2d'); @@ -156251,7 +158286,7 @@ module.exports = function calc(gd, trace) { z = binned.z; } else { - if(hasColumns(trace)) convertColumnXYZ(trace, xa, ya); + if(hasColumns(trace)) convertColumnData(trace, xa, ya, 'x', 'y', ['z']); x = trace.x ? xa.makeCalcdata(trace, 'x') : []; y = trace.y ? ya.makeCalcdata(trace, 'y') : []; @@ -156333,7 +158368,7 @@ module.exports = function calc(gd, trace) { return [cd0]; }; -},{"../../components/colorscale/calc":591,"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807,"../histogram2d/calc":894,"./clean_2d_array":867,"./convert_column_xyz":869,"./find_empties":871,"./has_columns":872,"./interp2d":875,"./make_bound_array":876,"./max_row_length":877}],867:[function(require,module,exports){ +},{"../../components/colorscale/calc":584,"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"../histogram2d/calc":932,"./clean_2d_array":905,"./convert_column_xyz":907,"./find_empties":909,"./has_columns":910,"./interp2d":913,"./make_bound_array":914,"./max_row_length":915}],905:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156378,7 +158413,7 @@ module.exports = function clean2dArray(zOld, transpose) { return zNew; }; -},{"fast-isnumeric":123}],868:[function(require,module,exports){ +},{"fast-isnumeric":116}],906:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156429,7 +158464,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],869:[function(require,module,exports){ +},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],907:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156444,54 +158479,73 @@ module.exports = function colorbar(gd, cd) { var Lib = require('../../lib'); var BADNUM = require('../../constants/numerical').BADNUM; +module.exports = function convertColumnData(trace, ax1, ax2, var1Name, var2Name, arrayVarNames) { + var1Name = var1Name || 'x'; + var2Name = var2Name || 'y'; + arrayVarNames = arrayVarNames || ['z']; -module.exports = function convertColumnXYZ(trace, xa, ya) { - var xCol = trace.x.slice(), - yCol = trace.y.slice(), - zCol = trace.z, + var col1 = trace[var1Name].slice(), + col2 = trace[var2Name].slice(), textCol = trace.text, - colLen = Math.min(xCol.length, yCol.length, zCol.length), + colLen = Math.min(col1.length, col2.length), hasColumnText = (textCol !== undefined && !Array.isArray(textCol[0])), - xcalendar = trace.xcalendar, - ycalendar = trace.ycalendar; + col1Calendar = trace[var1Name + 'calendar'], + col2Calendar = trace[var2Name + 'calendar']; - var i; + var i, j, arrayVar, newArray, arrayVarName; + + for(i = 0; i < arrayVarNames.length; i++) { + arrayVar = trace[arrayVarNames[i]]; + if(arrayVar) colLen = Math.min(colLen, arrayVar.length); + } - if(colLen < xCol.length) xCol = xCol.slice(0, colLen); - if(colLen < yCol.length) yCol = yCol.slice(0, colLen); + if(colLen < col1.length) col1 = col1.slice(0, colLen); + if(colLen < col2.length) col2 = col2.slice(0, colLen); for(i = 0; i < colLen; i++) { - xCol[i] = xa.d2c(xCol[i], 0, xcalendar); - yCol[i] = ya.d2c(yCol[i], 0, ycalendar); + col1[i] = ax1.d2c(col1[i], 0, col1Calendar); + col2[i] = ax2.d2c(col2[i], 0, col2Calendar); } - var xColdv = Lib.distinctVals(xCol), - x = xColdv.vals, - yColdv = Lib.distinctVals(yCol), - y = yColdv.vals, - z = Lib.init2dArray(y.length, x.length); + var col1dv = Lib.distinctVals(col1), + col1vals = col1dv.vals, + col2dv = Lib.distinctVals(col2), + col2vals = col2dv.vals, + newArrays = []; - var text; + for(i = 0; i < arrayVarNames.length; i++) { + newArrays[i] = Lib.init2dArray(col2vals.length, col1vals.length); + } + + var i1, i2, text; - if(hasColumnText) text = Lib.init2dArray(y.length, x.length); + if(hasColumnText) text = Lib.init2dArray(col2vals.length, col1vals.length); for(i = 0; i < colLen; i++) { - if(xCol[i] !== BADNUM && yCol[i] !== BADNUM) { - var ix = Lib.findBin(xCol[i] + xColdv.minDiff / 2, x); - var iy = Lib.findBin(yCol[i] + yColdv.minDiff / 2, y); + if(col1[i] !== BADNUM && col2[i] !== BADNUM) { + i1 = Lib.findBin(col1[i] + col1dv.minDiff / 2, col1vals); + i2 = Lib.findBin(col2[i] + col2dv.minDiff / 2, col2vals); - z[iy][ix] = zCol[i]; - if(hasColumnText) text[iy][ix] = textCol[i]; + for(j = 0; j < arrayVarNames.length; j++) { + arrayVarName = arrayVarNames[j]; + arrayVar = trace[arrayVarName]; + newArray = newArrays[j]; + newArray[i2][i1] = arrayVar[i]; + } + + if(hasColumnText) text[i2][i1] = textCol[i]; } } - trace.x = x; - trace.y = y; - trace.z = z; + trace[var1Name] = col1vals; + trace[var2Name] = col2vals; + for(j = 0; j < arrayVarNames.length; j++) { + trace[arrayVarNames[j]] = newArrays[j]; + } if(hasColumnText) trace.text = text; }; -},{"../../constants/numerical":672,"../../lib":690}],870:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685}],908:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156536,7 +158590,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'}); }; -},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":865,"./has_columns":872,"./xyz_defaults":880}],871:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":903,"./has_columns":910,"./xyz_defaults":918}],909:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156642,7 +158696,7 @@ module.exports = function findEmpties(z) { return empties.sort(function(a, b) { return b[2] - a[2]; }); }; -},{"./max_row_length":877}],872:[function(require,module,exports){ +},{"./max_row_length":915}],910:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156658,7 +158712,7 @@ module.exports = function(trace) { return !Array.isArray(trace.z[0]); }; -},{}],873:[function(require,module,exports){ +},{}],911:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156776,7 +158830,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, contour) })]; }; -},{"../../lib":690,"../../plots/cartesian/constants":734,"../../plots/cartesian/graph_interact":738}],874:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/constants":729,"../../plots/cartesian/graph_interact":733}],912:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156808,7 +158862,7 @@ Heatmap.meta = { module.exports = Heatmap; -},{"../../plots/cartesian":739,"./attributes":865,"./calc":866,"./colorbar":868,"./defaults":870,"./hover":873,"./plot":878,"./style":879}],875:[function(require,module,exports){ +},{"../../plots/cartesian":734,"./attributes":903,"./calc":904,"./colorbar":906,"./defaults":908,"./hover":911,"./plot":916,"./style":917}],913:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156940,7 +158994,7 @@ function iterateInterp2d(z, emptyPoints, overshoot) { return maxFractionalChange; } -},{"../../lib":690}],876:[function(require,module,exports){ +},{"../../lib":685}],914:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157022,7 +159076,7 @@ module.exports = function makeBoundArray(trace, arrayIn, v0In, dvIn, numbricks, return arrayOut; }; -},{"../../registry":807}],877:[function(require,module,exports){ +},{"../../registry":802}],915:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157044,7 +159098,7 @@ module.exports = function maxRowLength(z) { return len; }; -},{}],878:[function(require,module,exports){ +},{}],916:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157513,7 +159567,7 @@ function plotOne(gd, plotinfo, cd) { image3.exit().remove(); } -},{"../../components/colorscale":599,"../../constants/xmlns_namespaces":674,"../../lib":690,"../../registry":807,"./max_row_length":877,"tinycolor2":521}],879:[function(require,module,exports){ +},{"../../components/colorscale":592,"../../constants/xmlns_namespaces":668,"../../lib":685,"../../registry":802,"./max_row_length":915,"tinycolor2":514}],917:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157534,7 +159588,7 @@ module.exports = function style(gd) { }); }; -},{"d3":114}],880:[function(require,module,exports){ +},{"d3":107}],918:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157552,22 +159606,24 @@ var Registry = require('../../registry'); var hasColumns = require('./has_columns'); -module.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout) { +module.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout, xName, yName) { var z = coerce('z'); + xName = xName || 'x'; + yName = yName || 'y'; var x, y; if(z === undefined || !z.length) return 0; if(hasColumns(traceIn)) { - x = coerce('x'); - y = coerce('y'); + x = coerce(xName); + y = coerce(yName); - // column z must be accompanied by 'x' and 'y' arrays + // column z must be accompanied by xName and yName arrays if(!x || !y) return 0; } else { - x = coordDefaults('x', coerce); - y = coordDefaults('y', coerce); + x = coordDefaults(xName, coerce); + y = coordDefaults(yName, coerce); // TODO put z validation elsewhere if(!isValidZ(z)) return 0; @@ -157576,7 +159632,7 @@ module.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout) { } var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults'); - handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout); + handleCalendarDefaults(traceIn, traceOut, [xName, yName], layout); return traceOut.z.length; }; @@ -157627,7 +159683,7 @@ function isValidZ(z) { return (allRowsAreArrays && oneRowIsFilled && hasOneNumber); } -},{"../../registry":807,"./has_columns":872,"fast-isnumeric":123}],881:[function(require,module,exports){ +},{"../../registry":802,"./has_columns":910,"fast-isnumeric":116}],919:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157669,7 +159725,7 @@ extendFlat( module.exports = attrs; -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../heatmap/attributes":865}],882:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../heatmap/attributes":903}],920:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157808,7 +159864,7 @@ function createHeatmap(scene, fullTrace, calcTrace) { module.exports = createHeatmap; -},{"../../lib/str2rgbarray":708,"../../plots/cartesian/axes":729,"gl-heatmap2d":157}],883:[function(require,module,exports){ +},{"../../lib/str2rgbarray":703,"../../plots/cartesian/axes":724,"gl-heatmap2d":150}],921:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157839,7 +159895,7 @@ HeatmapGl.meta = { module.exports = HeatmapGl; -},{"../../plots/gl2d":769,"../heatmap/calc":866,"../heatmap/colorbar":868,"../heatmap/defaults":870,"./attributes":881,"./convert":882}],884:[function(require,module,exports){ +},{"../../plots/gl2d":764,"../heatmap/calc":904,"../heatmap/colorbar":906,"../heatmap/defaults":908,"./attributes":919,"./convert":920}],922:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157969,7 +160025,7 @@ function makeBinsAttr(axLetter) { }; } -},{"../bar/attributes":817}],885:[function(require,module,exports){ +},{"../bar/attributes":812}],923:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157995,7 +160051,7 @@ module.exports = function doAvg(size, counts) { return total; }; -},{}],886:[function(require,module,exports){ +},{}],924:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158028,7 +160084,7 @@ module.exports = function handleBinDefaults(traceIn, traceOut, coerce, binDirect return traceOut; }; -},{}],887:[function(require,module,exports){ +},{}],925:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158104,7 +160160,7 @@ module.exports = { } }; -},{"fast-isnumeric":123}],888:[function(require,module,exports){ +},{"fast-isnumeric":116}],926:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158335,7 +160391,7 @@ function cdf(size, direction, currentbin) { } } -},{"../../lib":690,"../../plots/cartesian/axes":729,"../bar/arrays_to_calcdata":816,"./average":885,"./bin_functions":887,"./clean_bins":889,"./norm_functions":892,"fast-isnumeric":123}],889:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../bar/arrays_to_calcdata":811,"./average":923,"./bin_functions":925,"./clean_bins":927,"./norm_functions":930,"fast-isnumeric":116}],927:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158412,7 +160468,7 @@ module.exports = function cleanBins(trace, ax, binDirection) { if(!trace[autoBinAttr]) delete trace['nbins' + binDirection]; }; -},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],890:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],928:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158474,7 +160530,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, Color.defaultLine, {axis: 'x', inherit: 'y'}); }; -},{"../../components/color":585,"../../components/errorbars/defaults":613,"../../lib":690,"../../registry":807,"../bar/style_defaults":828,"./attributes":884,"./bin_defaults":886}],891:[function(require,module,exports){ +},{"../../components/color":578,"../../components/errorbars/defaults":607,"../../lib":685,"../../registry":802,"../bar/style_defaults":823,"./attributes":922,"./bin_defaults":924}],929:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158523,7 +160579,7 @@ Histogram.meta = { module.exports = Histogram; -},{"../../plots/cartesian":739,"../bar/hover":820,"../bar/layout_attributes":822,"../bar/layout_defaults":823,"../bar/plot":824,"../bar/set_positions":825,"../bar/style":827,"../scatter/colorbar":950,"./attributes":884,"./calc":888,"./defaults":890}],892:[function(require,module,exports){ +},{"../../plots/cartesian":734,"../bar/hover":815,"../bar/layout_attributes":817,"../bar/layout_defaults":818,"../bar/plot":819,"../bar/set_positions":820,"../bar/style":822,"../scatter/colorbar":979,"./attributes":922,"./calc":926,"./defaults":928}],930:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158558,7 +160614,7 @@ module.exports = { } }; -},{}],893:[function(require,module,exports){ +},{}],931:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158610,7 +160666,7 @@ module.exports = extendFlat({}, { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../heatmap/attributes":865,"../histogram/attributes":884}],894:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../heatmap/attributes":903,"../histogram/attributes":922}],932:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158813,7 +160869,7 @@ module.exports = function calc(gd, trace) { }; }; -},{"../../lib":690,"../../plots/cartesian/axes":729,"../histogram/average":885,"../histogram/bin_functions":887,"../histogram/clean_bins":889,"../histogram/norm_functions":892}],895:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../histogram/average":923,"../histogram/bin_functions":925,"../histogram/clean_bins":927,"../histogram/norm_functions":930}],933:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158851,7 +160907,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout ); }; -},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":893,"./sample_defaults":897}],896:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":931,"./sample_defaults":935}],934:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158884,7 +160940,7 @@ Histogram2D.meta = { module.exports = Histogram2D; -},{"../../plots/cartesian":739,"../heatmap/calc":866,"../heatmap/colorbar":868,"../heatmap/hover":873,"../heatmap/plot":878,"../heatmap/style":879,"./attributes":893,"./defaults":895}],897:[function(require,module,exports){ +},{"../../plots/cartesian":734,"../heatmap/calc":904,"../heatmap/colorbar":906,"../heatmap/hover":911,"../heatmap/plot":916,"../heatmap/style":917,"./attributes":931,"./defaults":933}],935:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158924,7 +160980,7 @@ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout handleBinDefaults(traceIn, traceOut, coerce, binDirections); }; -},{"../../registry":807,"../histogram/bin_defaults":886}],898:[function(require,module,exports){ +},{"../../registry":802,"../histogram/bin_defaults":924}],936:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158966,7 +161022,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../contour/attributes":850,"../histogram2d/attributes":893}],899:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../contour/attributes":874,"../histogram2d/attributes":931}],937:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158996,7 +161052,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout handleStyleDefaults(traceIn, traceOut, coerce, layout); }; -},{"../../lib":690,"../contour/contours_defaults":854,"../contour/style_defaults":864,"../histogram2d/sample_defaults":897,"./attributes":898}],900:[function(require,module,exports){ +},{"../../lib":685,"../contour/contours_defaults":878,"../contour/style_defaults":888,"../histogram2d/sample_defaults":935,"./attributes":936}],938:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159029,7 +161085,7 @@ Histogram2dContour.meta = { module.exports = Histogram2dContour; -},{"../../plots/cartesian":739,"../contour/calc":851,"../contour/colorbar":852,"../contour/hover":858,"../contour/plot":862,"../contour/style":863,"./attributes":898,"./defaults":899}],901:[function(require,module,exports){ +},{"../../plots/cartesian":734,"../contour/calc":875,"../contour/colorbar":876,"../contour/hover":882,"../contour/plot":886,"../contour/style":887,"./attributes":936,"./defaults":937}],939:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159162,7 +161218,7 @@ module.exports = { }, surfaceAtts.lighting) }; -},{"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682,"../surface/attributes":1002}],902:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../surface/attributes":1039}],940:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159325,7 +161381,7 @@ function createMesh3DTrace(scene, data) { module.exports = createMesh3DTrace; -},{"../../lib/str2rgbarray":708,"alpha-shape":37,"convex-hull":95,"delaunay-triangulate":115,"gl-mesh3d":196,"tinycolor2":521}],903:[function(require,module,exports){ +},{"../../lib/str2rgbarray":703,"alpha-shape":38,"convex-hull":96,"delaunay-triangulate":108,"gl-mesh3d":189,"tinycolor2":514}],941:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159426,7 +161482,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/colorbar/defaults":587,"../../lib":690,"../../registry":807,"./attributes":901}],904:[function(require,module,exports){ +},{"../../components/colorbar/defaults":580,"../../lib":685,"../../registry":802,"./attributes":939}],942:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159455,7 +161511,7 @@ Mesh3D.meta = { module.exports = Mesh3D; -},{"../../plots/gl3d":772,"../heatmap/colorbar":868,"./attributes":901,"./convert":902,"./defaults":903}],905:[function(require,module,exports){ +},{"../../plots/gl3d":767,"../heatmap/colorbar":906,"./attributes":939,"./convert":940,"./defaults":941}],943:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159469,6 +161525,7 @@ module.exports = Mesh3D; var Lib = require('../../lib'); var scatterAttrs = require('../scatter/attributes'); +var dash = require('../../components/drawing/attributes').dash; var INCREASING_COLOR = '#3D9970'; var DECREASING_COLOR = '#FF4136'; @@ -159490,9 +161547,9 @@ var directionAttrs = { }, line: { - color: Lib.extendFlat({}, lineAttrs.color), - width: Lib.extendFlat({}, lineAttrs.width), - dash: Lib.extendFlat({}, lineAttrs.dash), + color: lineAttrs.color, + width: lineAttrs.width, + dash: dash, } }; @@ -159531,7 +161588,7 @@ module.exports = { width: Lib.extendFlat({}, lineAttrs.width, { }), - dash: Lib.extendFlat({}, lineAttrs.dash, { + dash: Lib.extendFlat({}, dash, { }), }, @@ -159562,7 +161619,7 @@ module.exports = { } }; -},{"../../lib":690,"../scatter/attributes":947}],906:[function(require,module,exports){ +},{"../../components/drawing/attributes":601,"../../lib":685,"../scatter/attributes":976}],944:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159611,7 +161668,7 @@ function handleDirection(traceIn, traceOut, coerce, direction) { coerce(direction + '.line.dash', traceOut.line.dash); } -},{"../../lib":690,"./attributes":905,"./direction_defaults":907,"./helpers":908,"./ohlc_defaults":910}],907:[function(require,module,exports){ +},{"../../lib":685,"./attributes":943,"./direction_defaults":945,"./helpers":946,"./ohlc_defaults":948}],945:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159637,7 +161694,7 @@ module.exports = function handleDirectionDefaults(traceIn, traceOut, coerce, dir coerce(direction + '.name', nameDflt); }; -},{}],908:[function(require,module,exports){ +},{}],946:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159760,7 +161817,7 @@ exports.addRangeSlider = function(data, layout) { } }; -},{"../../lib":690}],909:[function(require,module,exports){ +},{"../../lib":685}],947:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159790,7 +161847,7 @@ module.exports = { register(require('../scatter')); register(require('./transform')); -},{"../../plot_api/register":719,"../../plots/cartesian":739,"../scatter":957,"./attributes":905,"./defaults":906,"./transform":911}],910:[function(require,module,exports){ +},{"../../plot_api/register":714,"../../plots/cartesian":734,"../scatter":986,"./attributes":943,"./defaults":944,"./transform":949}],948:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159832,7 +161889,7 @@ module.exports = function handleOHLC(traceIn, traceOut, coerce, layout) { return len; }; -},{"../../registry":807}],911:[function(require,module,exports){ +},{"../../registry":802}],949:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160091,7 +162148,7 @@ function convertTickWidth(gd, xa, trace) { return minDiff * tickWidth; } -},{"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_ids":732,"./helpers":908}],912:[function(require,module,exports){ +},{"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_ids":727,"./helpers":946}],950:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160220,7 +162277,7 @@ module.exports = { ) }; -},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/colorscale/scales":603,"../../lib/extend":682,"../../plots/cartesian/layout_attributes":740}],913:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/colorscale/scales":596,"../../lib/extend":677,"../../plots/cartesian/layout_attributes":735}],951:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160296,7 +162353,7 @@ exports.toSVG = function(gd) { }, 60); }; -},{"../../constants/xmlns_namespaces":674,"../../plots/plots":792,"./constants":916,"./plot":921,"d3":114}],914:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":668,"../../plots/plots":787,"./constants":954,"./plot":959,"d3":107}],952:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160327,7 +162384,7 @@ module.exports = function calc(gd, trace) { }]; }; -},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"../../lib":690}],915:[function(require,module,exports){ +},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"../../lib":685}],953:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160381,7 +162438,7 @@ module.exports = function colorbar(gd, cd) { .options(line.colorbar)(); }; -},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],916:[function(require,module,exports){ +},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],954:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160418,7 +162475,7 @@ module.exports = { } }; -},{}],917:[function(require,module,exports){ +},{}],955:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160520,7 +162577,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598,"../../lib":690,"./attributes":912,"./constants":916}],918:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591,"../../lib":685,"./attributes":950,"./constants":954}],956:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160549,7 +162606,7 @@ Parcoords.meta = { module.exports = Parcoords; -},{"./attributes":912,"./base_plot":913,"./calc":914,"./colorbar":915,"./defaults":917,"./plot":921}],919:[function(require,module,exports){ +},{"./attributes":950,"./base_plot":951,"./calc":952,"./colorbar":953,"./defaults":955,"./plot":959}],957:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160974,7 +163031,7 @@ module.exports = function(canvasGL, lines, canvasWidth, canvasHeight, initialDim }; }; -},{"./constants":916,"regl":487}],920:[function(require,module,exports){ +},{"./constants":954,"regl":480}],958:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161748,7 +163805,7 @@ module.exports = function(root, svg, styledData, layout, callbacks) { return tweakables; }; -},{"../../lib":690,"./constants":916,"./lines":919,"d3":114}],921:[function(require,module,exports){ +},{"../../lib":685,"./constants":954,"./lines":957,"d3":107}],959:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161868,7 +163925,7 @@ module.exports = function plot(gd, cdparcoords) { }); }; -},{"./parcoords":920}],922:[function(require,module,exports){ +},{"./parcoords":958}],960:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162061,7 +164118,7 @@ module.exports = { } }; -},{"../../components/color/attributes":584,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/font_attributes":753}],923:[function(require,module,exports){ +},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/attributes":722,"../../plots/font_attributes":748}],961:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162108,7 +164165,7 @@ function getCdModule(calcdata, _module) { return cdModule; } -},{"../../registry":807}],924:[function(require,module,exports){ +},{"../../registry":802}],962:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162260,7 +164317,7 @@ function nextDefaultColor(index) { return pieDefaultColors[index % pieDefaultColors.length]; } -},{"../../components/color":585,"./helpers":926,"fast-isnumeric":123,"tinycolor2":521}],925:[function(require,module,exports){ +},{"../../components/color":578,"./helpers":964,"fast-isnumeric":116,"tinycolor2":514}],963:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162345,7 +164402,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('pull'); }; -},{"../../lib":690,"./attributes":922}],926:[function(require,module,exports){ +},{"../../lib":685,"./attributes":960}],964:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162374,7 +164431,7 @@ exports.formatPieValue = function formatPieValue(v, separators) { return Lib.numSeparate(vRounded, separators); }; -},{"../../lib":690}],927:[function(require,module,exports){ +},{"../../lib":685}],965:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162406,7 +164463,7 @@ Pie.meta = { module.exports = Pie; -},{"./attributes":922,"./base_plot":923,"./calc":924,"./defaults":925,"./layout_attributes":928,"./layout_defaults":929,"./plot":930,"./style":931,"./style_one":932}],928:[function(require,module,exports){ +},{"./attributes":960,"./base_plot":961,"./calc":962,"./defaults":963,"./layout_attributes":966,"./layout_defaults":967,"./plot":968,"./style":969,"./style_one":970}],966:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162426,7 +164483,7 @@ module.exports = { hiddenlabels: {valType: 'data_array'} }; -},{}],929:[function(require,module,exports){ +},{}],967:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162448,7 +164505,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { coerce('hiddenlabels'); }; -},{"../../lib":690,"./layout_attributes":928}],930:[function(require,module,exports){ +},{"../../lib":685,"./layout_attributes":966}],968:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163156,7 +165213,7 @@ function maxExtent(tilt, tiltAxisFraction, depth) { 2 * Math.sqrt(1 - sinTilt * sinTilt * tiltAxisFraction * tiltAxisFraction)); } -},{"../../components/color":585,"../../components/drawing":608,"../../lib/svg_text_utils":709,"../../plots/cartesian/graph_interact":738,"./helpers":926,"d3":114}],931:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"../../lib/svg_text_utils":704,"../../plots/cartesian/graph_interact":733,"./helpers":964,"d3":107}],969:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163185,7 +165242,7 @@ module.exports = function style(gd) { }); }; -},{"./style_one":932,"d3":114}],932:[function(require,module,exports){ +},{"./style_one":970,"d3":107}],970:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163205,14 +165262,12 @@ module.exports = function styleOne(s, pt, trace) { var lineWidth = trace.marker.line.width || 0; if(Array.isArray(lineWidth)) lineWidth = lineWidth[pt.i] || 0; - s.style({ - 'stroke-width': lineWidth, - fill: pt.color - }) + s.style({'stroke-width': lineWidth}) + .call(Color.fill, pt.color) .call(Color.stroke, lineColor); }; -},{"../../components/color":585}],933:[function(require,module,exports){ +},{"../../components/color":578}],971:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163301,7 +165356,7 @@ module.exports = { } }; -},{"../scattergl/attributes":983}],934:[function(require,module,exports){ +},{"../scattergl/attributes":1020}],972:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163533,7 +165588,7 @@ function createPointcloud(scene, data) { module.exports = createPointcloud; -},{"../../lib/str2rgbarray":708,"../scatter/get_trace_color":955,"gl-pointcloud2d":221}],935:[function(require,module,exports){ +},{"../../lib/str2rgbarray":703,"../scatter/get_trace_color":984,"gl-pointcloud2d":214}],973:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163578,7 +165633,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor) { coerce('marker.border.arearatio'); }; -},{"../../lib":690,"./attributes":933}],936:[function(require,module,exports){ +},{"../../lib":685,"./attributes":971}],974:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163608,1191 +165663,7 @@ pointcloud.meta = { module.exports = pointcloud; -},{"../../plots/gl2d":769,"../scatter3d/calc":971,"./attributes":933,"./convert":934,"./defaults":935}],937:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var shapeAttrs = require('../../components/shapes/attributes'); -var fontAttrs = require('../../plots/font_attributes'); -var plotAttrs = require('../../plots/attributes'); - -var extendFlat = require('../../lib/extend').extendFlat; - - -module.exports = { - hoverinfo: extendFlat({}, plotAttrs.hoverinfo, { - flags: ['label', 'text', 'value', 'percent', 'name'] - }), - domain: { - x: { - valType: 'info_array', - - items: [ - {valType: 'number', min: 0, max: 1}, - {valType: 'number', min: 0, max: 1} - ], - dflt: [0, 1], - - }, - y: { - valType: 'info_array', - - items: [ - {valType: 'number', min: 0, max: 1}, - {valType: 'number', min: 0, max: 1} - ], - dflt: [0, 1], - - } - }, - - orientation: { - valType: 'enumerated', - values: ['v', 'h'], - dflt: 'h', - - - }, - - nodepad: { - valType: 'number', - min: 0, - dflt: 20, - - - }, - - nodethickness: { - valType: 'number', - min: 1, - dflt: 20, - - - }, - - valueformat: { - valType: 'string', - dflt: '.3s', - - - }, - - valueunit: { - valType: 'string', - dflt: '', - - - }, - - // followmouse for UX testing - followmouse: { - valType: 'boolean', - dflt: true, - - - }, - - textfont: fontAttrs, - - nodes: { - _isLinkedToArray: 'node', - label: { - valType: 'string', - dflt: '', - - - }, - visible: shapeAttrs.visible, - color: extendFlat({}, shapeAttrs.fillcolor, { - dflt: 'rgb(0,255,0,0.5)' - }), - - }, - - links: { - _isLinkedToArray: 'link', - label: { - valType: 'string', - dflt: '', - - - }, - visible: shapeAttrs.visible, - color: extendFlat({}, shapeAttrs.fillcolor, {dflt: 'rgba(0,0,0,0.2)'}), - source: { - valType: 'number', - - - }, - target: { - valType: 'number', - - - }, - value: { - valType: 'number', - dflt: 1, - - - }, - - } -}; - -},{"../../components/shapes/attributes":648,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/font_attributes":753}],938:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Plots = require('../../plots/plots'); -var plot = require('./plot'); - -exports.name = 'sankey'; - -exports.attr = 'type'; - -exports.plot = function(gd) { - var calcData = Plots.getSubplotCalcData(gd.calcdata, 'sankey', 'sankey'); - if(calcData.length) plot(gd, calcData); -}; - -exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) { - var hadPlot = (oldFullLayout._has && oldFullLayout._has('sankey')); - var hasPlot = (newFullLayout._has && newFullLayout._has('sankey')); - - if(hadPlot && !hasPlot) { - oldFullLayout._paperdiv.selectAll('.sankey').remove(); - oldFullLayout._paperdiv.selectAll('.sankey').remove(); - } -}; - -exports.toSVG = function() {}; - -},{"../../plots/plots":792,"./plot":944}],939:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - - -module.exports = function calc() { - return [{}]; -}; - -},{}],940:[function(require,module,exports){ -arguments[4][915][0].apply(exports,arguments) -},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"dup":915,"fast-isnumeric":123}],941:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - - -module.exports = { - nodeTextOffsetHorizontal: 4, - nodeTextOffsetVertical: 3, - nodePadAcross: 10, - sankeyIterations: 50, - movable: true, - sideways: true, - useForceSnap: true, - forceIterations: 5, - forceTicksPerFrame: 10, - duration: 500, - ease: 'linear' -}; - -},{}],942:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Lib = require('../../lib'); -var attributes = require('./attributes'); -var d3 = require('d3'); - - -function linksDefaults(traceIn, traceOut) { - var linksIn = traceIn.links || [], - linksOut = traceOut.links = []; - - var linkIn, linkOut, i; - - function coerce(attr, dflt) { - return Lib.coerce(linkIn, linkOut, attributes.links, attr, dflt); - } - - for(i = 0; i < linksIn.length; i++) { - linkIn = linksIn[i]; - linkOut = {}; - - if(!Lib.isPlainObject(linkIn)) { - continue; - } - - var visible = coerce('visible'); - - if(visible) { - coerce('label'); - coerce('value'); - coerce('source'); - coerce('target'); - coerce('color'); - } - - linkOut._index = i; - linksOut.push(linkOut); - } -} - -function nodesDefaults(traceIn, traceOut) { - var nodesIn = traceIn.nodes || [], - nodesOut = traceOut.nodes = []; - - var nodeIn, nodeOut, i, j, link, foundUse, visible, - usedNodeCount = 0, - indexMap = []; - - var defaultPalette = d3.scale.category20(); - - function coerce(attr, dflt) { - return Lib.coerce(nodeIn, nodeOut, attributes.nodes, attr, dflt); - } - - for(i = 0; i < nodesIn.length; i++) { - nodeIn = nodesIn[i]; - - - - foundUse = false; - for(j = 0; j < traceOut.links.length && !foundUse; j++) { - link = traceOut.links[j]; - foundUse = link.source === i || link.target === i; - } - - indexMap.push(foundUse ? usedNodeCount : null); - - if(!foundUse) - continue; - - if(!Lib.isPlainObject(nodeIn)) { - continue; - } - - nodeOut = {}; - - visible = coerce('visible'); - - if(visible) { - coerce('label'); - if(nodeIn.color) { - coerce('color'); - } else { - coerce('color', defaultPalette(i)); - } - } - - nodeOut._index = usedNodeCount; - nodesOut.push(nodeOut); - usedNodeCount++; - } - - // since nodes were removed, update indices to nodes in links to reflect new reality - for(j = 0; j < traceOut.links.length; j++) { - link = traceOut.links[j]; - link.source = indexMap[link.source]; - link.target = indexMap[link.target]; - } - - return nodesOut; -} - - - - -module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { - function coerce(attr, dflt) { - return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); - } - - linksDefaults(traceIn, traceOut); - nodesDefaults(traceIn, traceOut); - - coerce('hoverinfo', layout._dataLength === 1 ? 'label+text+value+percent' : undefined); - - coerce('domain.x'); - coerce('domain.y'); - coerce('orientation'); - coerce('nodepad'); - coerce('nodethickness'); - coerce('valueformat'); - coerce('valueunit'); - coerce('followmouse'); - - // Prefer Sankey-specific font spec e.g. with smaller default size - var sankeyFontSpec = Lib.coerceFont(coerce, 'textfont'); - Lib.coerceFont(coerce, 'textfont', Lib.extendFlat({}, layout.font, sankeyFontSpec)); -}; - -},{"../../lib":690,"./attributes":937,"d3":114}],943:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Plot = {}; - -Plot.attributes = require('./attributes'); -Plot.supplyDefaults = require('./defaults'); -Plot.calc = require('./calc'); -Plot.plot = require('./plot'); -Plot.colorbar = require('./colorbar'); - -Plot.moduleType = 'trace'; -Plot.name = 'sankey'; -Plot.basePlotModule = require('./base_plot'); -Plot.categories = ['gl']; -Plot.meta = { - -}; - -module.exports = Plot; - -},{"./attributes":937,"./base_plot":938,"./calc":939,"./colorbar":940,"./defaults":942,"./plot":944}],944:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var render = require('./render'); -var Fx = require('../../plots/cartesian/graph_interact'); -var d3 = require('d3'); -var Color = require('../../components/color'); - -function renderableValuePresent(d) {return d !== '';} - -function ownTrace(selection, d) { - return selection.filter(function(s) {return s.key === d.traceId;}); -} - -function makeTranslucent(element, alpha) { - d3.select(element) - .select('path') - .style('fill-opacity', alpha); -} - -function makeTextContrasty(element, hue) { - d3.select(element) - .select('text.name') - .style('fill', Color.contrast(hue, 0, 40)); -} - -function relatedLinks(d) { - return function(l) { - return d.node.sourceLinks.indexOf(l.link) !== -1 || d.node.targetLinks.indexOf(l.link) !== -1; - }; -} - -function relatedNodes(l) { - return function(d) { - return d.node.sourceLinks.indexOf(l.link) !== -1 || d.node.targetLinks.indexOf(l.link) !== -1; - }; -} - -function nodeHoveredStyle(sankeyNode, d, sankey) { - - sankeyNode.select('.nodeRect').style('stroke-width', 1); - - if(d && sankey) { - ownTrace(sankey, d) - .selectAll('.sankeyLink') - .filter(relatedLinks(d)) - .call(linkHoveredStyle); - } -} - -function nodeNonHoveredStyle(sankeyNode, d, sankey) { - - sankeyNode.select('.nodeRect').style('stroke-width', 0.5); - - if(d && sankey) { - ownTrace(sankey, d) - .selectAll('.sankeyLink') - .filter(relatedLinks(d)) - .call(linkNonHoveredStyle); - } -} - -function linkHoveredStyle(sankeyLink, d, sankey) { - - sankeyLink.style('stroke-opacity', 0.4); - - if(d && sankey) { - ownTrace(sankey, d) - .selectAll('.sankeyNode') - .filter(relatedNodes(d)) - .call(nodeHoveredStyle); - } -} - -function linkNonHoveredStyle(sankeyLink, d, sankey) { - - sankeyLink.style('stroke-opacity', function(d) {return d.tinyColorAlpha;}); - - if(d && sankey) { - ownTrace(sankey, d) - .selectAll('.sankeyNode') - .filter(relatedNodes(d)) - .call(nodeNonHoveredStyle); - } -} - -var log = false - -module.exports = function plot(gd, calcData) { - - var fullLayout = gd._fullLayout; - var svg = fullLayout._paper; - var hasHoverData = false; - - var size = fullLayout._size; - - var linkSelect = function(element, d) { - if(log) console.log('select link', d.link); - gd._hoverdata = [d.link]; - gd._hoverdata.trace = calcData.trace; - Fx.click(gd, { target: true }); - }; - - var linkHover = function(element, d, sankey) { - - d3.select(element).call(linkHoveredStyle, d, sankey); - if(log) console.log('hover link', d.link); - - Fx.hover(gd, d.link, 'sankey'); - - hasHoverData = true; - }; - - var linkHoverFollow = function(element, d) { - - - var followMouse = gd.data[0].followmouse; - - var boundingBox = !followMouse && element.getBoundingClientRect(); - var hoverCenterX = followMouse ? d3.event.x : boundingBox.left + boundingBox.width / 2; - var hoverCenterY = followMouse ? d3.event.y : boundingBox.top + boundingBox.height / 2; - - var tooltip = Fx.loneHover({ - x: hoverCenterX, - y: hoverCenterY, - name: d3.format(d.valueFormat)(d.link.value) + d.valueUnit, - text: [ - d.link.label, - ['Source:', d.link.source.label].join(' '), - ['Target:', d.link.target.label].join(' ') - ].filter(renderableValuePresent).join('
'), - color: Color.addOpacity(d.tinyColorHue, 1), - idealAlign: d3.event.x < hoverCenterX ? 'right' : 'left' - }, { - container: fullLayout._hoverlayer.node(), - outerContainer: fullLayout._paper.node() - }); - - makeTranslucent(tooltip, 0.67); - }; - - var linkUnhover = function(element, d, sankey) { - d3.select(element).call(linkNonHoveredStyle, d, sankey); - if(log) console.log('unhover link', d.link); - gd.emit('plotly_unhover', { - points: [d.link] - }); - - if(hasHoverData) { - Fx.loneUnhover(fullLayout._hoverlayer.node()); - hasHoverData = false; - } - }; - - var nodeSelect = function(element, d, sankey) { - if(log) console.log('select node', d.node); - gd._hoverdata = [d.node]; - gd._hoverdata.trace = calcData.trace; - d3.select(element).call(linkNonHoveredStyle, d, sankey); - d3.select(element).call(nodeNonHoveredStyle, d, sankey); - Fx.click(gd, { target: true }); - }; - - var nodeHover = function(element, d, sankey) { - - if(log) console.log('hover node', d.node); - - d3.select(element).call(nodeHoveredStyle, d, sankey); - - Fx.hover(gd, d.node, 'sankey'); - - hasHoverData = true; - - }; - - - var nodeHoverFollow = function(element, d) { - - var nodeRect = d3.select(element).select('.nodeRect'); - - var followMouse = gd.data[0].followmouse; - - var boundingBox = nodeRect.node().getBoundingClientRect(); - var hoverCenterX0 = boundingBox.left - 2; - var hoverCenterX1 = boundingBox.right + 2; - var hoverCenterY = followMouse ? d3.event.y : boundingBox.top + boundingBox.height / 4; - - var tooltip = Fx.loneHover({ - x0: hoverCenterX0, - x1: hoverCenterX1, - y: hoverCenterY, - name: d3.format(d.valueFormat)(d.node.value) + d.valueUnit, - text: [ - d.node.label, - ['Incoming flow count:', d.node.targetLinks.length].join(' '), - ['Outgoing flow count:', d.node.sourceLinks.length].join(' ') - ].filter(renderableValuePresent).join('
'), - color: d.tinyColorHue, - idealAlign: 'left' - }, { - container: fullLayout._hoverlayer.node(), - outerContainer: fullLayout._paper.node() - }); - - makeTranslucent(tooltip, 0.85); - makeTextContrasty(tooltip, d.tinyColorHue); - }; - - var nodeUnhover = function(element, d, sankey) { - - d3.select(element).call(nodeNonHoveredStyle, d, sankey); - if(log) console.log('unhover node', d.node); - gd.emit('plotly_unhover', { - points: [d.node] - }); - - if(hasHoverData) { - Fx.loneUnhover(fullLayout._hoverlayer.node()); - hasHoverData = false; - } - }; - - render( - svg, - calcData, - { - width: size.w, - height: size.h, - margin: { - t: size.t, - r: size.r, - b: size.b, - l: size.l - } - }, - { - linkEvents: { - hover: linkHover, - follow: linkHoverFollow, - unhover: linkUnhover, - select: linkSelect - }, - nodeEvents: { - hover: nodeHover, - follow: nodeHoverFollow, - unhover: nodeUnhover, - select: nodeSelect - } - } - ); -}; - -},{"../../components/color":585,"../../plots/cartesian/graph_interact":738,"./render":945,"d3":114}],945:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var c = require('./constants'); -var d3 = require('d3'); -var tinycolor = require('tinycolor2'); -var Color = require('../../components/color'); -var Drawing = require('../../components/drawing'); -var d3sankey = require('@monfera/d3-sankey').sankey; -var d3Force = require('d3-force'); - - -// basic data utilities - -function keyFun(d) {return d.key;} -function repeat(d) {return [d];} // d3 data binding convention -function unwrap(d) {return d[0];} // plotly data structure convention -function visible(nodeOrLink) {return !('visible' in nodeOrLink) || nodeOrLink.visible;} - -function persistOriginalPlace(nodes) { - for (var i = 0; i < nodes.length; i++) { - nodes[i].originalX = nodes[i].x; - nodes[i].originalY = nodes[i].y; - } -} - -function saveCurrentDragPosition(d) { - d.lastDraggedX = d.x - d.lastDraggedY = d.y -} - -function sameLayer(d) { - return function(n) {return n.node.originalX === d.node.originalX;}; -} - -function switchToForceFormat(nodes) { - // force uses x, y as centers - for (var i = 0; i < nodes.length; i++) { - nodes[i].y = nodes[i].y + nodes[i].dy / 2; - } -} - -function switchToSankeyFormat(nodes) { - // sankey uses x, y as top left - for (var i = 0; i < nodes.length; i++) { - nodes[i].y = nodes[i].y - nodes[i].dy / 2; - } -} - - -// view models - -function sankeyModel(layout, d, i) { - - var trace = unwrap(d).trace, - domain = trace.domain, - nodes = trace.nodes, - links = trace.links, - horizontal = trace.orientation === 'h', - nodePad = trace.nodepad, - nodeThickness = trace.nodethickness, - valueFormat = trace.valueformat, - valueUnit = trace.valueunit, - textFont = trace.textfont; - - var width = layout.width * (domain.x[1] - domain.x[0]), - height = layout.height * (domain.y[1] - domain.y[0]); - - var sankey = d3sankey() - .size(horizontal ? [width, height] : [height, width]) - .nodeWidth(nodeThickness) - .nodePadding(nodePad) - .nodes(nodes) - .links(links) - .layout(c.sankeyIterations); - - switchToForceFormat(nodes); - - return { - key: i, - guid: Math.floor(1e12 * (1 + Math.random())), - horizontal: horizontal, - width: width, - height: height, - nodePad: nodePad, - valueFormat: valueFormat, - valueUnit: valueUnit, - textFont: textFont, - translateX: domain.x[0] * width + layout.margin.l, - translateY: layout.height - domain.y[1] * layout.height + layout.margin.t, - dragParallel: horizontal ? height : width, - dragPerpendicular: horizontal ? width : height, - nodes: nodes, - links: links, - sankey: sankey, - forceLayouts: {}, - interactionState: { - dragInProgress: false, - hovered: false - } - }; -} - -function linkModel(d, l) { - - var tc = tinycolor(l.color); - - return { - key: l.source.label + '|' + l.target.label, - traceId: d.key, - link: l, - tinyColorHue: Color.tinyRGB(tc), - tinyColorAlpha: tc.getAlpha(), - valueFormat: d.valueFormat, - valueUnit: d.valueUnit, - sankey: d.sankey, - interactionState: d.interactionState - }; -} - -function nodeModel(uniqueKeys, d, n) { - - var tc = tinycolor(n.color), - zoneThicknessPad = c.nodePadAcross, - zoneLengthPad = d.nodePad / 2, - visibleThickness = n.dx + 0.5, - visibleLength = n.dy - 0.5, - zoneThickness = visibleThickness + 2 * zoneThicknessPad, - zoneLength = visibleLength + 2 * zoneLengthPad; - - var foundKey = uniqueKeys[n.label]; - uniqueKeys[n.label] = (foundKey === void(0) ? foundKey : 0) + 1; - var key = n.label + (foundKey === void(0) ? '' : '__' + foundKey); - - return { - key: key, - traceId: d.key, - node: n, - nodePad: d.nodePad, - textFont: d.textFont, - size: d.horizontal ? d.height : d.width, - visibleWidth: Math.ceil(d.horizontal ? visibleThickness : visibleLength), - visibleHeight: Math.ceil(d.horizontal ? visibleLength : visibleThickness), - zoneX: d.horizontal ? -zoneThicknessPad : -zoneLengthPad, - zoneY: d.horizontal ? -zoneLengthPad : -zoneThicknessPad, - zoneWidth: d.horizontal ? zoneThickness : zoneLength, - zoneHeight: d.horizontal ? zoneLength : zoneThickness, - labelY: d.horizontal ? n.dy / 2 + 1 : n.dx / 2 + 1, - sizeAcross: d.horizontal ? d.width : d.height, - forceLayouts: d.forceLayouts, - horizontal: d.horizontal, - darkBackground: tc.getBrightness() <= 128, - tinyColorHue: Color.tinyRGB(tc), - tinyColorAlpha: tc.getAlpha(), - valueFormat: d.valueFormat, - valueUnit: d.valueUnit, - sankey: d.sankey, - uniqueNodeLabelPathId: JSON.stringify({sankeyGuid: d.guid, traceId: d.key, nodeKey: n.label}), - interactionState: d.interactionState - }; -} - - -// rendering snippets - -function crispLinesOnEnd(sankeyNode) { - d3.select(sankeyNode.node().parentElement).style('shape-rendering', 'crispEdges'); -} - -function updateNodePositions(sankeyNode) { - sankeyNode - .attr('transform', function(d) { - return d.horizontal - ? 'translate(' + (d.node.x - 0.5) + ', ' + (d.node.y - d.node.dy / 2 + 0.5) + ')' - : 'translate(' + (d.node.y - d.node.dy / 2 - 0.5) + ', ' + (d.node.x + 0.5) + ')' - }) -} - -function linkPath(d) { - var nodes = d.sankey.nodes(); - switchToSankeyFormat(nodes); - var result = d.sankey.link()(d.link); - switchToForceFormat(nodes); - return result; -} - -function updateNodeShapes(sankeyNode) { - d3.select(sankeyNode.node().parentElement).style('shape-rendering', 'optimizeSpeed'); - sankeyNode.call(updateNodePositions); -} - -function updateShapes(sankeyNode, sankeyLink) { - sankeyNode.call(updateNodeShapes); - sankeyLink.attr('d', linkPath); -} - -function sizeNode(rect) { - rect.attr('width', function(d) {return d.visibleWidth;}) - .attr('height', function(d) {return d.visibleHeight;}); -} - - -// event handling - -function attachPointerEvents(selection, sankey, eventSet) { - selection - .on('.basic', null) // remove any preexisting handlers - .on('mouseover.basic', function (d) { - if (!d.interactionState.dragInProgress) { - eventSet.hover(this, d, sankey); - d.interactionState.hovered = [this, d]; - } - }) - .on('mousemove.basic', function (d) { - if (!d.interactionState.dragInProgress) { - eventSet.follow(this, d); - d.interactionState.hovered = [this, d]; - } - }) - .on('mouseout.basic', function (d) { - if (!d.interactionState.dragInProgress) { - eventSet.unhover(this, d, sankey); - d.interactionState.hovered = false; - } - }) - .on('click.basic', function (d) { - if (d.interactionState.hovered) { - eventSet.unhover(this, d, sankey); - d.interactionState.hovered = false; - } - if (!d.interactionState.dragInProgress) { - eventSet.select(this, d, sankey); - } - }); -} - -function attachDragHandler(sankeyNode, sankeyLink, callbacks) { - - var dragBehavior = d3.behavior.drag() - - .origin(function(d) {return d.horizontal ? d.node : {x: d.node['y'], y: d.node['x']};}) - - .on('dragstart', function(d) { - if(!c.movable) return; - this.parentNode.appendChild(this); // bring element to top (painter's algo) - d.interactionState.dragInProgress = d.node; - saveCurrentDragPosition(d.node); - if(d.interactionState.hovered) { - callbacks.nodeEvents.unhover.apply(0, d.interactionState.hovered); - d.interactionState.hovered = false; - } - if(c.useForceSnap) { - var forceKey = d.traceId + '|' + Math.floor(d.node.originalX); - if (d.forceLayouts[forceKey]) { - d.forceLayouts[forceKey].alpha(1); - } else { // make a forceLayout iff needed - attachForce(sankeyNode, forceKey, d); - } - window.requestAnimationFrame(function faster() { - for(var i = 0; i < c.forceTicksPerFrame; i++) d.forceLayouts[forceKey].tick(); - updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink); - if(d.forceLayouts[forceKey].alpha() > 0) { - window.requestAnimationFrame(faster); - } - }) - } - }) - - .on('drag', function(d) { - if(!c.movable) return; - var x = d.horizontal ? d3.event.x : d3.event.y; - var y = d.horizontal ? d3.event.y : d3.event.x; - if(c.useForceSnap) { - d.node.x = x; - d.node.y = y; - } else { - if(c.sideways) { - d.node.x = x; - } - d.node.y = Math.max(d.node.dy / 2, Math.min(d.size - d.node.dy / 2, y)); - } - saveCurrentDragPosition(d.node); - d.sankey.relayout(); - if(!c.useForceSnap) { - updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink); - sankeyNode.call(crispLinesOnEnd); - } - }) - - .on('dragend', function(d) {d.interactionState.dragInProgress = false;}); - - - sankeyNode - .on('.drag', null) // remove possible previous handlers - .call(dragBehavior); -} - -function attachForce(sankeyNode, forceKey, d) { - var nodes = d.sankey.nodes().filter(function(n) {return n.originalX === d.node.originalX;}); - d.forceLayouts[forceKey] = d3Force.forceSimulation(nodes) - .alphaDecay(0) - .force('collide', d3Force.forceCollide() - .radius(function (n) {return n.dy / 2 + d.nodePad / 2;}) - .strength(1) - .iterations(c.forceIterations)) - .force('constrain', snappingForce(sankeyNode, forceKey, nodes, d)) - .stop(); -} - -function snappingForce(sankeyNode, forceKey, nodes, d) { - return function _snappingForce() { - var maxVelocity = 0; - for (var i = 0; i < nodes.length; i++) { - var n = nodes[i]; - if (n === d.interactionState.dragInProgress) { // constrain node position to the dragging pointer - n.x = n.lastDraggedX; - n.y = n.lastDraggedY; - } else { - n.vx = (n.originalX - n.x) / c.forceTicksPerFrame; // snap to layer - n.y = Math.min(d.size - n.dy / 2, Math.max(n.dy / 2, n.y)); // constrain to extent - } - maxVelocity = Math.max(maxVelocity, Math.abs(n.vx), Math.abs(n.vy)); - } - if (!d.interactionState.dragInProgress && maxVelocity < 0.1) { - d.forceLayouts[forceKey].alpha(0); - window.setTimeout(function () { - sankeyNode.call(crispLinesOnEnd); - }, 30); // geome on move, crisp when static - } - } -} - - -// scene graph - -module.exports = function(svg, styledData, layout, callbacks) { - - svg.style('overflow', 'visible'); - - var sankey = svg.selectAll('.sankey') - .data(styledData - .filter(function(d) {return unwrap(d).trace.visible;}) - .map(sankeyModel.bind(null, layout)), - keyFun); - - sankey.exit() - .remove(); - - sankey.enter() - .append('g') - .classed('sankey', true) - .attr('overflow', 'visible') - .style('box-sizing', 'content-box') - .style('position', 'absolute') - .style('left', 0) - .style('overflow', 'visible') - .style('shape-rendering', 'geometricPrecision') - .style('pointer-events', 'auto') - .style('box-sizing', 'content-box'); - - sankey - .attr('transform', function(d) {return 'translate(' + d.translateX + ',' + d.translateY + ')';}); - - - var sankeyLinks = sankey.selectAll('.sankeyLinks') - .data(repeat, keyFun); - - sankeyLinks.enter() - .append('g') - .classed('sankeyLinks', true) - .style('fill', 'none'); - - sankeyLinks.transition() - .ease(c.ease).duration(c.duration) - .style('transform', function(d) {return d.horizontal ? 'matrix(1,0,0,1,0,0)' : 'matrix(0,1,1,0,0,0)'}); - - - var sankeyLink = sankeyLinks.selectAll('.sankeyLink') - .data(function(d) { - return d.sankey.links() - .filter(function(l) {return l.visible && l.value;}) - .map(linkModel.bind(null, d)); - }, keyFun); - - sankeyLink.enter() - .append('path') - .classed('sankeyLink', true) - .style('stroke-width', function(d) {return Math.max(1, d.link.dy);}) - .style('opacity', 0) - .call(attachPointerEvents, sankey, callbacks.linkEvents); - - sankeyLink - .style('stroke', function(d) {return d.tinyColorHue;}) - .style('stroke-opacity', function(d) {return d.tinyColorAlpha;}); - - sankeyLink.transition() - .ease(c.ease).duration(c.duration) - .style('opacity', 1) - .attr('d', linkPath) - .style('stroke-width', function(d) {return Math.max(1, d.link.dy);}); - - sankeyLink.exit().transition() - .ease(c.ease).duration(c.duration) - .style('opacity', 0) - .remove(); - - - var sankeyNodeSet = sankey.selectAll('.sankeyNodeSet') - .data(repeat, keyFun); - - sankeyNodeSet.enter() - .append('g') - .style('shape-rendering', 'geometricPrecision') - .classed('sankeyNodeSet', true); - - sankeyNodeSet - .each(function(d) {Drawing.font(sankeyNodeSet, d.textFont);}); // fixme causes scerenshot trouble - - - var sankeyNode = sankeyNodeSet.selectAll('.sankeyNode') - .data(function(d) { - var nodes = d.sankey.nodes(); - var uniqueKeys = {}; - persistOriginalPlace(nodes); - return nodes - .filter(function(n) {return n.visible && n.value;}) - .map(nodeModel.bind(null, uniqueKeys, d)); - }, keyFun); - - sankeyNode.enter() - .append('g') - .classed('sankeyNode', true) - .style('opacity', 0) - .style('cursor', 'move') - .call(updateNodePositions) - .call(attachPointerEvents, sankey, callbacks.nodeEvents); - - sankeyNode - .call(attachDragHandler, sankeyLink, callbacks); // has to be here as it binds sankeyLink - - sankeyNode.transition() - .ease(c.ease).duration(c.duration) - .style('opacity', 1) - .call(updateNodePositions); - - sankeyNode.exit().transition() - .ease(c.ease).duration(c.duration) - .style('opacity', 0) - .remove(); - - - var nodeRect = sankeyNode.selectAll('.nodeRect') - .data(repeat); - - nodeRect.enter() - .append('rect') - .classed('nodeRect', true) - .style('stroke-width', 0.5) - .call(Color.stroke, 'rgba(0, 0, 0, 1)') - .call(sizeNode); - - nodeRect - .style('fill', function(d) {return d.tinyColorHue;}) - .style('fill-opacity', function(d) {return d.tinyColorAlpha;}); - - nodeRect.transition() - .ease(c.ease).duration(c.duration) - .call(sizeNode); - - - var nodeCapture = sankeyNode.selectAll('.nodeCapture') - .data(repeat); - - nodeCapture.enter() - .append('rect') - .classed('nodeCapture', true) - .style('fill-opacity', 0); - - nodeCapture - .attr('x', function(d) {return d.zoneX;}) - .attr('y', function(d) {return d.zoneY;}) - .attr('width', function(d) {return d.zoneWidth;}) - .attr('height', function(d) {return d.zoneHeight;}); - - - var nodeLabelGuide = sankeyNode.selectAll('.nodeLabelGuide') - .data(repeat); - - nodeLabelGuide.enter() - .append('path') - .classed('nodeLabelGuide', true) - .attr('id', function(d) {return d.uniqueNodeLabelPathId;}); // fixme causes scerenshot trouble - - nodeLabelGuide - .transition() - .ease(c.ease).duration(c.duration) - .attr('d', function(d) { - return d3.svg.line()([ - [d.horizontal ? d.visibleWidth + c.nodeTextOffsetHorizontal : c.nodeTextOffsetHorizontal, d.labelY], - [d.horizontal ? d.sizeAcross : d.visibleWidth - c.nodeTextOffsetHorizontal, d.labelY] - ]);}); - - - var nodeLabel = sankeyNode.selectAll('.nodeLabel') - .data(repeat); - - nodeLabel.enter() - .append('text') - .classed('nodeLabel', true) - .style('user-select', 'none') - .style('cursor', 'default') - .style('fill', 'black'); - - nodeLabel - .style('text-shadow', function(d) { - return d.horizontal ? '0 1px 1px #fff' : 'none'; - }); - - var nodeLabelTextPath = nodeLabel.selectAll('.nodeLabelTextPath') - .data(repeat); - - nodeLabelTextPath.enter() - .append('textPath') - .classed('nodeLabelTextPath', true) - .attr('alignment-baseline', 'middle') - .attr('xlink:href', function(d) {return '#' + d.uniqueNodeLabelPathId;}); - - nodeLabelTextPath - .text(function(d) {return d.horizontal || d.node.dy > 5 ? d.node.label : '';}) - .style('fill', function(d) {return d.darkBackground && !d.horizontal ? 'white' : 'black';}); -}; - -},{"../../components/color":585,"../../components/drawing":608,"./constants":941,"@monfera/d3-sankey":32,"d3":114,"d3-force":110,"tinycolor2":521}],946:[function(require,module,exports){ +},{"../../plots/gl2d":764,"../scatter3d/calc":1000,"./attributes":971,"./convert":972,"./defaults":973}],975:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164835,7 +165706,7 @@ module.exports = function arraysToCalcdata(cd, trace) { } }; -},{"../../lib":690}],947:[function(require,module,exports){ +},{"../../lib":685}],976:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164849,6 +165720,7 @@ module.exports = function arraysToCalcdata(cd, trace) { var colorAttributes = require('../../components/colorscale/color_attributes'); var errorBarAttrs = require('../../components/errorbars/attributes'); var colorbarAttrs = require('../../components/colorbar/attributes'); +var dash = require('../../components/drawing/attributes').dash; var Drawing = require('../../components/drawing'); var constants = require('./constants'); @@ -164950,17 +165822,7 @@ module.exports = { }, - dash: { - valType: 'string', - // string type usually doesn't take values... this one should really be - // a special type or at least a special coercion function, from the GUI - // you only get these values but elsewhere the user can supply a list of - // dash lengths in px, and it will be honored - values: ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'], - dflt: 'solid', - - - }, + dash: dash, simplify: { valType: 'boolean', dflt: true, @@ -165108,7 +165970,7 @@ module.exports = { error_x: errorBarAttrs }; -},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/drawing":608,"../../components/errorbars/attributes":610,"../../lib/extend":682,"./constants":952}],948:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/drawing":602,"../../components/drawing/attributes":601,"../../components/errorbars/attributes":604,"../../lib/extend":677,"./constants":981}],977:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165238,7 +166100,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../plots/cartesian/axes":729,"./arrays_to_calcdata":946,"./colorscale_calc":951,"./subtypes":967,"fast-isnumeric":123}],949:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"./arrays_to_calcdata":975,"./colorscale_calc":980,"./subtypes":996,"fast-isnumeric":116}],978:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165277,7 +166139,7 @@ module.exports = function cleanData(fullData) { } }; -},{}],950:[function(require,module,exports){ +},{}],979:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165333,7 +166195,7 @@ module.exports = function colorbar(gd, cd) { .options(marker.colorbar)(); }; -},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],951:[function(require,module,exports){ +},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],980:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165366,7 +166228,7 @@ module.exports = function calcMarkerColorscale(trace) { } }; -},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"./subtypes":967}],952:[function(require,module,exports){ +},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"./subtypes":996}],981:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165382,7 +166244,7 @@ module.exports = { PTS_LINESONLY: 20 }; -},{}],953:[function(require,module,exports){ +},{}],982:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165464,7 +166326,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, defaultColor, {axis: 'x', inherit: 'y'}); }; -},{"../../components/errorbars/defaults":613,"../../lib":690,"./attributes":947,"./constants":952,"./fillcolor_defaults":954,"./line_defaults":958,"./line_shape_defaults":960,"./marker_defaults":963,"./subtypes":967,"./text_defaults":968,"./xy_defaults":969}],954:[function(require,module,exports){ +},{"../../components/errorbars/defaults":607,"../../lib":685,"./attributes":976,"./constants":981,"./fillcolor_defaults":983,"./line_defaults":987,"./line_shape_defaults":989,"./marker_defaults":992,"./subtypes":996,"./text_defaults":997,"./xy_defaults":998}],983:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165502,7 +166364,7 @@ module.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coe )); }; -},{"../../components/color":585}],955:[function(require,module,exports){ +},{"../../components/color":578}],984:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165555,7 +166417,7 @@ module.exports = function getTraceColor(trace, di) { } }; -},{"../../components/color":585,"./subtypes":967}],956:[function(require,module,exports){ +},{"../../components/color":578,"./subtypes":996}],985:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165726,7 +166588,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { } }; -},{"../../components/color":585,"../../components/errorbars":614,"../../lib":690,"../../plots/cartesian/constants":734,"../../plots/cartesian/graph_interact":738,"./get_trace_color":955}],957:[function(require,module,exports){ +},{"../../components/color":578,"../../components/errorbars":608,"../../lib":685,"../../plots/cartesian/constants":729,"../../plots/cartesian/graph_interact":733,"./get_trace_color":984}],986:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165770,7 +166632,7 @@ Scatter.meta = { module.exports = Scatter; -},{"../../plots/cartesian":739,"./arrays_to_calcdata":946,"./attributes":947,"./calc":948,"./clean_data":949,"./colorbar":950,"./defaults":953,"./hover":956,"./plot":964,"./select":965,"./style":966,"./subtypes":967}],958:[function(require,module,exports){ +},{"../../plots/cartesian":734,"./arrays_to_calcdata":975,"./attributes":976,"./calc":977,"./clean_data":978,"./colorbar":979,"./defaults":982,"./hover":985,"./plot":993,"./select":994,"./style":995,"./subtypes":996}],987:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165786,7 +166648,7 @@ var hasColorscale = require('../../components/colorscale/has_colorscale'); var colorscaleDefaults = require('../../components/colorscale/defaults'); -module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, coerce) { +module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, coerce, opts) { var markerColor = (traceIn.marker || {}).color; coerce('line.color', defaultColor); @@ -165800,10 +166662,10 @@ module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, } coerce('line.width'); - coerce('line.dash'); + if(!(opts || {}).noDash) coerce('line.dash'); }; -},{"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598}],959:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591}],988:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165976,7 +166838,7 @@ module.exports = function linePoints(d, opts) { return segments; }; -},{"../../constants/numerical":672}],960:[function(require,module,exports){ +},{"../../constants/numerical":666}],989:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165995,7 +166857,7 @@ module.exports = function handleLineShapeDefaults(traceIn, traceOut, coerce) { if(shape === 'spline') coerce('line.smoothing'); }; -},{}],961:[function(require,module,exports){ +},{}],990:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166036,7 +166898,7 @@ module.exports = function linkTraces(gd, plotinfo, cdscatter) { } }; -},{}],962:[function(require,module,exports){ +},{}],991:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166078,7 +166940,7 @@ module.exports = function makeBubbleSizeFn(trace) { }; }; -},{"fast-isnumeric":123}],963:[function(require,module,exports){ +},{"fast-isnumeric":116}],992:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166097,7 +166959,7 @@ var colorscaleDefaults = require('../../components/colorscale/defaults'); var subTypes = require('./subtypes'); -module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout, coerce) { +module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout, coerce, opts) { var isBubble = subTypes.isBubble(traceIn), lineColor = (traceIn.line || {}).color, defaultMLC; @@ -166114,22 +166976,24 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.', cLetter: 'c'}); } - // if there's a line with a different color than the marker, use - // that line color as the default marker line color - // (except when it's an array) - // mostly this is for transparent markers to behave nicely - if(lineColor && !Array.isArray(lineColor) && (traceOut.marker.color !== lineColor)) { - defaultMLC = lineColor; - } - else if(isBubble) defaultMLC = Color.background; - else defaultMLC = Color.defaultLine; + if(!(opts || {}).noLine) { + // if there's a line with a different color than the marker, use + // that line color as the default marker line color + // (except when it's an array) + // mostly this is for transparent markers to behave nicely + if(lineColor && !Array.isArray(lineColor) && (traceOut.marker.color !== lineColor)) { + defaultMLC = lineColor; + } + else if(isBubble) defaultMLC = Color.background; + else defaultMLC = Color.defaultLine; - coerce('marker.line.color', defaultMLC); - if(hasColorscale(traceIn, 'marker.line')) { - colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.line.', cLetter: 'c'}); - } + coerce('marker.line.color', defaultMLC); + if(hasColorscale(traceIn, 'marker.line')) { + colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.line.', cLetter: 'c'}); + } - coerce('marker.line.width', isBubble ? 1 : 0); + coerce('marker.line.width', isBubble ? 1 : 0); + } if(isBubble) { coerce('marker.sizeref'); @@ -166138,7 +167002,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/color":585,"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598,"./subtypes":967}],964:[function(require,module,exports){ +},{"../../components/color":578,"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591,"./subtypes":996}],993:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166544,11 +167408,11 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition textFilter = hideFilter; if(showMarkers) { - markerFilter = trace.marker.maxdisplayed ? visFilter : Lib.identity; + markerFilter = (trace.marker.maxdisplayed || trace._needsCull) ? visFilter : Lib.identity; } if(showText) { - textFilter = trace.marker.maxdisplayed ? visFilter : Lib.identity; + textFilter = (trace.marker.maxdisplayed || trace._needsCull) ? visFilter : Lib.identity; } // marker points @@ -166611,7 +167475,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition var x = d.xp || xa.c2p(d.x), y = d.yp || ya.c2p(d.y); - d3.select(this).selectAll('tspan').each(function() { + d3.select(this).selectAll('tspan.line').each(function() { transition(d3.select(this)).attr({x: x, y: y}); }); }); @@ -166678,7 +167542,7 @@ function selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll) { }); } -},{"../../components/drawing":608,"../../components/errorbars":614,"../../lib":690,"../../lib/polygon":700,"./line_points":959,"./link_traces":961,"./subtypes":967,"d3":114}],965:[function(require,module,exports){ +},{"../../components/drawing":602,"../../components/errorbars":608,"../../lib":685,"../../lib/polygon":695,"./line_points":988,"./link_traces":990,"./subtypes":996,"d3":107}],994:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166750,7 +167614,7 @@ module.exports = function selectPoints(searchInfo, polygon) { return selection; }; -},{"./subtypes":967}],966:[function(require,module,exports){ +},{"./subtypes":996}],995:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166796,7 +167660,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/drawing":608,"../../components/errorbars":614,"d3":114}],967:[function(require,module,exports){ +},{"../../components/drawing":602,"../../components/errorbars":608,"d3":107}],996:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166832,7 +167696,7 @@ module.exports = { } }; -},{"../../lib":690}],968:[function(require,module,exports){ +},{"../../lib":685}],997:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166853,7 +167717,7 @@ module.exports = function(traceIn, traceOut, layout, coerce) { Lib.coerceFont(coerce, 'textfont', layout.font); }; -},{"../../lib":690}],969:[function(require,module,exports){ +},{"../../lib":685}],998:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166903,7 +167767,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) { return len; }; -},{"../../registry":807}],970:[function(require,module,exports){ +},{"../../registry":802}],999:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166917,6 +167781,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) { var scatterAttrs = require('../scatter/attributes'); var colorAttributes = require('../../components/colorscale/color_attributes'); var errorBarAttrs = require('../../components/errorbars/attributes'); +var DASHES = require('../../constants/gl3d_dashes'); var MARKER_SYMBOLS = require('../../constants/gl_markers'); var extendFlat = require('../../lib/extend').extendFlat; @@ -166995,7 +167860,13 @@ module.exports = { connectgaps: scatterAttrs.connectgaps, line: extendFlat({}, { width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash, + dash: { + valType: 'enumerated', + values: Object.keys(DASHES), + dflt: 'solid', + + + }, showscale: { valType: 'boolean', @@ -167041,7 +167912,7 @@ module.exports = { error_z: errorBarAttrs, }; -},{"../../components/colorscale/color_attributes":592,"../../components/errorbars/attributes":610,"../../constants/gl_markers":670,"../../lib/extend":682,"../scatter/attributes":947}],971:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":585,"../../components/errorbars/attributes":604,"../../constants/gl3d_dashes":663,"../../constants/gl_markers":664,"../../lib/extend":677,"../scatter/attributes":976}],1000:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167070,7 +167941,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951}],972:[function(require,module,exports){ +},{"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980}],1001:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167141,7 +168012,7 @@ function calculateErrors(data, scaleFactor) { module.exports = calculateErrors; -},{"../../components/errorbars/compute_error":612}],973:[function(require,module,exports){ +},{"../../components/errorbars/compute_error":606}],1002:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167612,7 +168483,7 @@ function createLineWithMarkers(scene, data) { module.exports = createLineWithMarkers; -},{"../../constants/gl3d_dashes":669,"../../constants/gl_markers":670,"../../lib":690,"../../lib/gl_format_color":687,"../../lib/str2rgbarray":708,"../scatter/make_bubble_size_func":962,"./calc_errors":972,"delaunay-triangulate":115,"gl-error3d":153,"gl-line3d":163,"gl-mesh3d":196,"gl-scatter3d":242}],974:[function(require,module,exports){ +},{"../../constants/gl3d_dashes":663,"../../constants/gl_markers":664,"../../lib":685,"../../lib/gl_format_color":682,"../../lib/str2rgbarray":703,"../scatter/make_bubble_size_func":991,"./calc_errors":1001,"delaunay-triangulate":108,"gl-error3d":146,"gl-line3d":156,"gl-mesh3d":189,"gl-scatter3d":235}],1003:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167702,7 +168573,7 @@ function handleXYZDefaults(traceIn, traceOut, coerce, layout) { return len; } -},{"../../components/errorbars/defaults":613,"../../lib":690,"../../registry":807,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":970}],975:[function(require,module,exports){ +},{"../../components/errorbars/defaults":607,"../../lib":685,"../../registry":802,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":999}],1004:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167733,7 +168604,7 @@ Scatter3D.meta = { module.exports = Scatter3D; -},{"../../constants/gl_markers":670,"../../plots/gl3d":772,"../scatter/colorbar":950,"./attributes":970,"./calc":971,"./convert":973,"./defaults":974}],976:[function(require,module,exports){ +},{"../../constants/gl_markers":664,"../../plots/gl3d":767,"../scatter/colorbar":979,"./attributes":999,"./calc":1000,"./convert":1002,"./defaults":1003}],1005:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167747,6 +168618,481 @@ module.exports = Scatter3D; var scatterAttrs = require('../scatter/attributes'); var plotAttrs = require('../../plots/attributes'); var colorAttributes = require('../../components/colorscale/color_attributes'); +var colorbarAttrs = require('../../components/colorbar/attributes'); + +var extendFlat = require('../../lib/extend').extendFlat; + +var scatterMarkerAttrs = scatterAttrs.marker, + scatterLineAttrs = scatterAttrs.line, + scatterMarkerLineAttrs = scatterMarkerAttrs.line; + +module.exports = { + carpet: { + valType: 'string', + + + }, + a: { + valType: 'data_array', + + }, + b: { + valType: 'data_array', + + }, + sum: { + valType: 'number', + + dflt: 0, + min: 0, + + }, + mode: extendFlat({}, scatterAttrs.mode, {dflt: 'markers'}), + text: extendFlat({}, scatterAttrs.text, { + + }), + line: { + color: scatterLineAttrs.color, + width: scatterLineAttrs.width, + dash: scatterLineAttrs.dash, + shape: extendFlat({}, scatterLineAttrs.shape, + {values: ['linear', 'spline']}), + smoothing: scatterLineAttrs.smoothing + }, + connectgaps: scatterAttrs.connectgaps, + fill: extendFlat({}, scatterAttrs.fill, { + values: ['none', 'toself', 'tonext'], + + }), + fillcolor: scatterAttrs.fillcolor, + marker: extendFlat({}, { + symbol: scatterMarkerAttrs.symbol, + opacity: scatterMarkerAttrs.opacity, + maxdisplayed: scatterMarkerAttrs.maxdisplayed, + size: scatterMarkerAttrs.size, + sizeref: scatterMarkerAttrs.sizeref, + sizemin: scatterMarkerAttrs.sizemin, + sizemode: scatterMarkerAttrs.sizemode, + line: extendFlat({}, + {width: scatterMarkerLineAttrs.width}, + colorAttributes('marker'.line) + ) + }, colorAttributes('marker'), { + showscale: scatterMarkerAttrs.showscale, + colorbar: colorbarAttrs + }), + + textfont: scatterAttrs.textfont, + textposition: scatterAttrs.textposition, + hoverinfo: extendFlat({}, plotAttrs.hoverinfo, { + flags: ['a', 'b', 'c', 'text', 'name'] + }), + hoveron: scatterAttrs.hoveron, +}; + +},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1006:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var isNumeric = require('fast-isnumeric'); + +var Axes = require('../../plots/cartesian/axes'); +var Lib = require('../../lib'); + +var subTypes = require('../scatter/subtypes'); +var calcColorscale = require('../scatter/colorscale_calc'); +var lookupCarpet = require('../carpet/lookup_carpetid'); + +module.exports = function calc(gd, trace) { + var carpet = trace.carpetTrace = lookupCarpet(gd, trace); + if(!carpet || !carpet.visible || carpet.visible === 'legendonly') return; + var i; + + // Transfer this over from carpet before plotting since this is a necessary + // condition in order for cartesian to actually plot this trace: + trace.xaxis = carpet.xaxis; + trace.yaxis = carpet.yaxis; + + // make the calcdata array + var serieslen = trace.a.length; + var cd = new Array(serieslen); + var a, b; + var needsCull = false; + for(i = 0; i < serieslen; i++) { + a = trace.a[i]; + b = trace.b[i]; + if(isNumeric(a) && isNumeric(b)) { + var xy = carpet.ab2xy(+a, +b, true); + var visible = carpet.isVisible(+a, +b); + if(!visible) needsCull = true; + cd[i] = {x: xy[0], y: xy[1], a: a, b: b, vis: visible}; + } + else cd[i] = {x: false, y: false}; + } + + trace._needsCull = needsCull; + + cd[0].carpet = carpet; + cd[0].trace = trace; + + // fill in some extras + var marker, s; + if(subTypes.hasMarkers(trace)) { + // Treat size like x or y arrays --- Run d2c + // this needs to go before ppad computation + marker = trace.marker; + s = marker.size; + + if(Array.isArray(s)) { + var ax = {type: 'linear'}; + Axes.setConvert(ax); + s = ax.makeCalcdata(trace.marker, 'size'); + if(s.length > serieslen) s.splice(serieslen, s.length - serieslen); + } + } + + calcColorscale(trace); + + // this has migrated up from arraysToCalcdata as we have a reference to 's' here + if(typeof s !== 'undefined') Lib.mergeArray(s, cd, 'ms'); + + return cd; +}; + +},{"../../lib":685,"../../plots/cartesian/axes":724,"../carpet/lookup_carpetid":858,"../scatter/colorscale_calc":980,"../scatter/subtypes":996,"fast-isnumeric":116}],1007:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Lib = require('../../lib'); + +var constants = require('../scatter/constants'); +var subTypes = require('../scatter/subtypes'); +var handleMarkerDefaults = require('../scatter/marker_defaults'); +var handleLineDefaults = require('../scatter/line_defaults'); +var handleLineShapeDefaults = require('../scatter/line_shape_defaults'); +var handleTextDefaults = require('../scatter/text_defaults'); +var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); + +var attributes = require('./attributes'); + + +module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { + function coerce(attr, dflt) { + return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); + } + + coerce('carpet'); + + // XXX: Don't hard code this + traceOut.xaxis = 'x'; + traceOut.yaxis = 'y'; + + var a = coerce('a'), + b = coerce('b'), + len; + + len = Math.min(a.length, b.length); + + if(!len) { + traceOut.visible = false; + return; + } + + // cut all data arrays down to same length + if(a && len < a.length) traceOut.a = a.slice(0, len); + if(b && len < b.length) traceOut.b = b.slice(0, len); + + coerce('sum'); + + coerce('text'); + + var defaultMode = len < constants.PTS_LINESONLY ? 'lines+markers' : 'lines'; + coerce('mode', defaultMode); + + if(subTypes.hasLines(traceOut)) { + handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce); + handleLineShapeDefaults(traceIn, traceOut, coerce); + coerce('connectgaps'); + } + + if(subTypes.hasMarkers(traceOut)) { + handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce); + } + + if(subTypes.hasText(traceOut)) { + handleTextDefaults(traceIn, traceOut, layout, coerce); + } + + var dfltHoverOn = []; + + if(subTypes.hasMarkers(traceOut) || subTypes.hasText(traceOut)) { + coerce('marker.maxdisplayed'); + dfltHoverOn.push('points'); + } + + coerce('fill'); + if(traceOut.fill !== 'none') { + handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce); + if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce); + } + + coerce('hoverinfo', (layout._dataLength === 1) ? 'a+b+text' : undefined); + + if(traceOut.fill === 'tonext' || traceOut.fill === 'toself') { + dfltHoverOn.push('fills'); + } + coerce('hoveron', dfltHoverOn.join('+') || 'points'); +}; + +},{"../../lib":685,"../scatter/constants":981,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/line_shape_defaults":989,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1005}],1008:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var scatterHover = require('../scatter/hover'); + +module.exports = function hoverPoints(pointData, xval, yval, hovermode) { + var scatterPointData = scatterHover(pointData, xval, yval, hovermode); + if(!scatterPointData || scatterPointData[0].index === false) return; + + var newPointData = scatterPointData[0]; + + // if hovering on a fill, we don't show any point data so the label is + // unchanged from what scatter gives us - except that it needs to + // be constrained to the trianglular plot area, not just the rectangular + // area defined by the synthetic x and y axes + // TODO: in some cases the vertical middle of the shape is not within + // the triangular viewport at all, so the label can become disconnected + // from the shape entirely. But calculating what portion of the shape + // is actually visible, as constrained by the diagonal axis lines, is not + // so easy and anyway we lost the information we would have needed to do + // this inside scatterHover. + if(newPointData.index === undefined) { + var yFracUp = 1 - (newPointData.y0 / pointData.ya._length), + xLen = pointData.xa._length, + xMin = xLen * yFracUp / 2, + xMax = xLen - xMin; + newPointData.x0 = Math.max(Math.min(newPointData.x0, xMax), xMin); + newPointData.x1 = Math.max(Math.min(newPointData.x1, xMax), xMin); + return scatterPointData; + } + + var cdi = newPointData.cd[newPointData.index]; + + newPointData.a = cdi.a; + newPointData.b = cdi.b; + + newPointData.xLabelVal = undefined; + newPointData.yLabelVal = undefined; + // TODO: nice formatting, and label by axis title, for a, b, and c? + + var trace = newPointData.trace, + carpet = trace._carpet, + hoverinfo = trace.hoverinfo.split('+'), + text = []; + + function textPart(ax, val) { + text.push(((ax.labelprefix && ax.labelprefix.length > 0) ? ax.labelprefix : (ax._hovertitle + ': ')) + val.toFixed(3) + ax.labelsuffix); + } + + if(hoverinfo.indexOf('all') !== -1) hoverinfo = ['a', 'b']; + if(hoverinfo.indexOf('a') !== -1) textPart(carpet.aaxis, cdi.a); + if(hoverinfo.indexOf('b') !== -1) textPart(carpet.baxis, cdi.b); + + var ij = carpet.ab2ij([cdi.a, cdi.b]); + var i0 = Math.floor(ij[0]); + var ti = ij[0] - i0; + + var j0 = Math.floor(ij[1]); + var tj = ij[1] - j0; + + var xy = carpet.evalxy([], i0, j0, ti, tj); + text.push('y: ' + xy[1].toFixed(3)); + + newPointData.extraText = text.join('
'); + + return scatterPointData; +}; + +},{"../scatter/hover":985}],1009:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var ScatterCarpet = {}; + +ScatterCarpet.attributes = require('./attributes'); +ScatterCarpet.supplyDefaults = require('./defaults'); +ScatterCarpet.colorbar = require('../scatter/colorbar'); +ScatterCarpet.calc = require('./calc'); +ScatterCarpet.plot = require('./plot'); +ScatterCarpet.style = require('./style'); +ScatterCarpet.hoverPoints = require('./hover'); +ScatterCarpet.selectPoints = require('./select'); + +ScatterCarpet.moduleType = 'trace'; +ScatterCarpet.name = 'scattercarpet'; +ScatterCarpet.basePlotModule = require('../../plots/cartesian'); +ScatterCarpet.categories = ['carpet', 'symbols', 'markerColorscale', 'showLegend', 'carpetDependent']; +ScatterCarpet.meta = { + + +}; + +module.exports = ScatterCarpet; + +},{"../../plots/cartesian":734,"../scatter/colorbar":979,"./attributes":1005,"./calc":1006,"./defaults":1007,"./hover":1008,"./plot":1010,"./select":1011,"./style":1012}],1010:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var scatterPlot = require('../scatter/plot'); +var Axes = require('../../plots/cartesian/axes'); + +module.exports = function plot(gd, plotinfoproxy, data) { + var i, trace, node; + + var carpet = data[0][0].carpet; + + // mimic cartesian plotinfo + var plotinfo = { + xaxis: Axes.getFromId(gd, carpet.xaxis || 'x'), + yaxis: Axes.getFromId(gd, carpet.yaxis || 'y'), + plot: plotinfoproxy.plot + }; + + scatterPlot(plotinfo.graphDiv, plotinfo, data); + + for(i = 0; i < data.length; i++) { + trace = data[i][0].trace; + + // Note: .select is adequate but seems to mutate the node data, + // which is at least a bit suprising and causes problems elsewhere + node = plotinfo.plot.selectAll('g.trace' + trace.uid + ' .js-line'); + + // Note: it would be more efficient if this didn't need to be applied + // separately to all scattercarpet traces, but that would require + // lots of reorganization of scatter traces that is otherwise not + // necessary. That makes this a potential optimization. + node.attr('clip-path', 'url(#clip' + carpet.uid + 'carpet)'); + } +}; + +},{"../../plots/cartesian/axes":724,"../scatter/plot":993}],1011:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var scatterSelect = require('../scatter/select'); + + +module.exports = function selectPoints(searchInfo, polygon) { + var selection = scatterSelect(searchInfo, polygon); + if(!selection) return; + + var cd = searchInfo.cd, + pt, cdi, i; + + for(i = 0; i < selection.length; i++) { + pt = selection[i]; + cdi = cd[pt.pointNumber]; + pt.a = cdi.a; + pt.b = cdi.b; + pt.c = cdi.c; + delete pt.x; + delete pt.y; + } + + return selection; +}; + +},{"../scatter/select":994}],1012:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var scatterStyle = require('../scatter/style'); + + +module.exports = function style(gd) { + var modules = gd._fullLayout._modules; + + // we're just going to call scatter style... if we already + // called it, don't need to redo. + // Later though we may want differences, or we may make style + // more specific in its scope, then we can remove this. + for(var i = 0; i < modules.length; i++) { + if(modules[i].name === 'scatter') return; + } + + scatterStyle(gd); +}; + +},{"../scatter/style":995}],1013:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + +'use strict'; + +var scatterAttrs = require('../scatter/attributes'); +var plotAttrs = require('../../plots/attributes'); +var colorAttributes = require('../../components/colorscale/color_attributes'); +var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; @@ -167791,7 +169137,7 @@ module.exports = { line: { color: scatterLineAttrs.color, width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash + dash: dash }, connectgaps: scatterAttrs.connectgaps, @@ -167826,7 +169172,7 @@ module.exports = { }) }; -},{"../../components/colorscale/color_attributes":592,"../../lib/extend":682,"../../plots/attributes":727,"../scatter/attributes":947}],977:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":585,"../../components/drawing/attributes":601,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1014:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167870,7 +169216,7 @@ module.exports = function calc(gd, trace) { return calcTrace; }; -},{"../../constants/numerical":672,"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951,"fast-isnumeric":123}],978:[function(require,module,exports){ +},{"../../constants/numerical":666,"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980,"fast-isnumeric":116}],1015:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167951,7 +169297,7 @@ function handleLonLatLocDefaults(traceIn, traceOut, coerce) { return len; } -},{"../../lib":690,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":976}],979:[function(require,module,exports){ +},{"../../lib":685,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1013}],1016:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167972,7 +169318,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],980:[function(require,module,exports){ +},{}],1017:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168089,7 +169435,7 @@ function getExtraText(trace, pt, axis) { return text.join('
'); } -},{"../../constants/numerical":672,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"../scatter/get_trace_color":955,"./attributes":976}],981:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"../scatter/get_trace_color":984,"./attributes":1013}],1018:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168122,7 +169468,7 @@ ScatterGeo.meta = { module.exports = ScatterGeo; -},{"../../plots/geo":757,"../scatter/colorbar":950,"./attributes":976,"./calc":977,"./defaults":978,"./event_data":979,"./hover":980,"./plot":982}],982:[function(require,module,exports){ +},{"../../plots/geo":752,"../scatter/colorbar":979,"./attributes":1013,"./calc":1014,"./defaults":1015,"./event_data":1016,"./hover":1017,"./plot":1019}],1019:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168261,7 +169607,7 @@ function style(geo) { }); } -},{"../../components/color":585,"../../components/drawing":608,"../../constants/numerical":672,"../../lib":690,"../../lib/geo_location_utils":685,"../../lib/geojson_utils":686,"../../lib/topojson_utils":711,"../scatter/subtypes":967,"d3":114}],983:[function(require,module,exports){ +},{"../../components/color":578,"../../components/drawing":602,"../../constants/numerical":666,"../../lib":685,"../../lib/geo_location_utils":680,"../../lib/geojson_utils":681,"../../lib/topojson_utils":706,"../scatter/subtypes":996,"d3":107}],1020:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168343,7 +169689,7 @@ module.exports = { error_x: scatterAttrs.error_x }; -},{"../../components/colorscale/color_attributes":592,"../../constants/gl2d_dashes":668,"../../constants/gl_markers":670,"../../lib/extend":682,"../scatter/attributes":947}],984:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":585,"../../constants/gl2d_dashes":662,"../../constants/gl_markers":664,"../../lib/extend":677,"../scatter/attributes":976}],1021:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168992,7 +170338,7 @@ function createLineWithMarkers(scene, data) { module.exports = createLineWithMarkers; -},{"../../components/errorbars":614,"../../constants/gl2d_dashes":668,"../../constants/gl_markers":670,"../../lib":690,"../../lib/gl_format_color":687,"../../lib/str2rgbarray":708,"../../lib/typed_array_truncate":712,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_autotype":730,"../scatter/get_trace_color":955,"../scatter/make_bubble_size_func":962,"../scatter/subtypes":967,"fast-isnumeric":123,"gl-error2d":151,"gl-line2d":161,"gl-scatter2d":239,"gl-scatter2d-sdf":234}],985:[function(require,module,exports){ +},{"../../components/errorbars":608,"../../constants/gl2d_dashes":662,"../../constants/gl_markers":664,"../../lib":685,"../../lib/gl_format_color":682,"../../lib/str2rgbarray":703,"../../lib/typed_array_truncate":707,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_autotype":725,"../scatter/get_trace_color":984,"../scatter/make_bubble_size_func":991,"../scatter/subtypes":996,"fast-isnumeric":116,"gl-error2d":144,"gl-line2d":154,"gl-scatter2d":232,"gl-scatter2d-sdf":227}],1022:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169049,7 +170395,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, defaultColor, {axis: 'x', inherit: 'y'}); }; -},{"../../components/errorbars/defaults":613,"../../lib":690,"../scatter/constants":952,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/xy_defaults":969,"./attributes":983}],986:[function(require,module,exports){ +},{"../../components/errorbars/defaults":607,"../../lib":685,"../scatter/constants":981,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/xy_defaults":998,"./attributes":1020}],1023:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169080,7 +170426,7 @@ ScatterGl.meta = { module.exports = ScatterGl; -},{"../../plots/gl2d":769,"../scatter/colorbar":950,"../scatter3d/calc":971,"./attributes":983,"./convert":984,"./defaults":985}],987:[function(require,module,exports){ +},{"../../plots/gl2d":764,"../scatter/colorbar":979,"../scatter3d/calc":1000,"./attributes":1020,"./convert":1021,"./defaults":1022}],1024:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169124,10 +170470,10 @@ module.exports = { line: { color: lineAttrs.color, - width: lineAttrs.width, + width: lineAttrs.width // TODO - dash: lineAttrs.dash + // dash: dash }, connectgaps: scatterAttrs.connectgaps, @@ -169171,7 +170517,7 @@ module.exports = { }), }; -},{"../../components/colorbar/attributes":586,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/mapbox/layout_attributes":788,"../scatter/attributes":947,"../scattergeo/attributes":976}],988:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../lib/extend":677,"../../plots/attributes":722,"../../plots/mapbox/layout_attributes":783,"../scatter/attributes":976,"../scattergeo/attributes":1013}],1025:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169511,7 +170857,7 @@ function isBADNUM(lonlat) { return lonlat[0] === BADNUM; } -},{"../../components/colorscale":599,"../../constants/numerical":672,"../../lib":690,"../../lib/geojson_utils":686,"../../plots/mapbox/convert_text_opts":785,"../scatter/make_bubble_size_func":962,"../scatter/subtypes":967}],989:[function(require,module,exports){ +},{"../../components/colorscale":592,"../../constants/numerical":666,"../../lib":685,"../../lib/geojson_utils":681,"../../plots/mapbox/convert_text_opts":780,"../scatter/make_bubble_size_func":991,"../scatter/subtypes":996}],1026:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169532,7 +170878,6 @@ var handleTextDefaults = require('../scatter/text_defaults'); var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); var attributes = require('./attributes'); -var scatterAttrs = require('../scatter/attributes'); module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { @@ -169540,15 +170885,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); } - function coerceMarker(attr, dflt) { - var attrs = (attr.indexOf('.line') === -1) ? attributes : scatterAttrs; - - // use 'scatter' attributes for 'marker.line.' attr, - // so that we can reuse the scatter marker defaults - - return Lib.coerce(traceIn, traceOut, attrs, attr, dflt); - } - var len = handleLonLatDefaults(traceIn, traceOut, coerce); if(!len) { traceOut.visible = false; @@ -169560,16 +170896,18 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('mode'); if(subTypes.hasLines(traceOut)) { - handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce); + handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noDash: true}); coerce('connectgaps'); } if(subTypes.hasMarkers(traceOut)) { - handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerceMarker); + handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noLine: true}); // array marker.size and marker.color are only supported with circles var marker = traceOut.marker; + // we need mock marker.line object to make legends happy + marker.line = {width: 0}; if(marker.symbol !== 'circle') { if(Array.isArray(marker.size)) marker.size = marker.size[0]; @@ -169600,7 +170938,7 @@ function handleLonLatDefaults(traceIn, traceOut, coerce) { return len; } -},{"../../lib":690,"../scatter/attributes":947,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":987}],990:[function(require,module,exports){ +},{"../../lib":685,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1024}],1027:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169620,7 +170958,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],991:[function(require,module,exports){ +},{}],1028:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169723,7 +171061,7 @@ function getExtraText(trace, di) { return text.join('
'); } -},{"../../constants/numerical":672,"../../plots/cartesian/graph_interact":738,"../scatter/get_trace_color":955}],992:[function(require,module,exports){ +},{"../../constants/numerical":666,"../../plots/cartesian/graph_interact":733,"../scatter/get_trace_color":984}],1029:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169756,7 +171094,7 @@ ScatterMapbox.meta = { module.exports = ScatterMapbox; -},{"../../plots/mapbox":786,"../scatter/colorbar":950,"../scattergeo/calc":977,"./attributes":987,"./defaults":989,"./event_data":990,"./hover":991,"./plot":993}],993:[function(require,module,exports){ +},{"../../plots/mapbox":781,"../scatter/colorbar":979,"../scattergeo/calc":1014,"./attributes":1024,"./defaults":1026,"./event_data":1027,"./hover":1028,"./plot":1030}],1030:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169880,7 +171218,7 @@ module.exports = function createScatterMapbox(mapbox, calcTrace) { return scatterMapbox; }; -},{"./convert":988}],994:[function(require,module,exports){ +},{"./convert":1025}],1031:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169895,6 +171233,7 @@ var scatterAttrs = require('../scatter/attributes'); var plotAttrs = require('../../plots/attributes'); var colorAttributes = require('../../components/colorscale/color_attributes'); var colorbarAttrs = require('../../components/colorbar/attributes'); +var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; @@ -169932,7 +171271,7 @@ module.exports = { line: { color: scatterLineAttrs.color, width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash, + dash: dash, shape: extendFlat({}, scatterLineAttrs.shape, {values: ['linear', 'spline']}), smoothing: scatterLineAttrs.smoothing @@ -169968,7 +171307,7 @@ module.exports = { hoveron: scatterAttrs.hoveron, }; -},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../lib/extend":682,"../../plots/attributes":727,"../scatter/attributes":947}],995:[function(require,module,exports){ +},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/drawing/attributes":601,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1032:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170065,7 +171404,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../plots/cartesian/axes":729,"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951,"../scatter/subtypes":967,"fast-isnumeric":123}],996:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980,"../scatter/subtypes":996,"fast-isnumeric":116}],1033:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170171,7 +171510,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('hoveron', dfltHoverOn.join('+') || 'points'); }; -},{"../../lib":690,"../scatter/constants":952,"../scatter/fillcolor_defaults":954,"../scatter/line_defaults":958,"../scatter/line_shape_defaults":960,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":994}],997:[function(require,module,exports){ +},{"../../lib":685,"../scatter/constants":981,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/line_shape_defaults":989,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1031}],1034:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170242,7 +171581,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return scatterPointData; }; -},{"../../plots/cartesian/axes":729,"../scatter/hover":956}],998:[function(require,module,exports){ +},{"../../plots/cartesian/axes":724,"../scatter/hover":985}],1035:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170275,7 +171614,7 @@ ScatterTernary.meta = { module.exports = ScatterTernary; -},{"../../plots/ternary":800,"../scatter/colorbar":950,"./attributes":994,"./calc":995,"./defaults":996,"./hover":997,"./plot":999,"./select":1000,"./style":1001}],999:[function(require,module,exports){ +},{"../../plots/ternary":795,"../scatter/colorbar":979,"./attributes":1031,"./calc":1032,"./defaults":1033,"./hover":1034,"./plot":1036,"./select":1037,"./style":1038}],1036:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170311,71 +171650,11 @@ module.exports = function plot(ternary, moduleCalcData) { scatterPlot(ternary.graphDiv, plotinfo, moduleCalcData); }; -},{"../scatter/plot":964}],1000:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var scatterSelect = require('../scatter/select'); - - -module.exports = function selectPoints(searchInfo, polygon) { - var selection = scatterSelect(searchInfo, polygon); - if(!selection) return; - - var cd = searchInfo.cd, - pt, cdi, i; - - for(i = 0; i < selection.length; i++) { - pt = selection[i]; - cdi = cd[pt.pointNumber]; - pt.a = cdi.a; - pt.b = cdi.b; - pt.c = cdi.c; - delete pt.x; - delete pt.y; - } - - return selection; -}; - -},{"../scatter/select":965}],1001:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var scatterStyle = require('../scatter/style'); - - -module.exports = function style(gd) { - var modules = gd._fullLayout._modules; - - // we're just going to call scatter style... if we already - // called it, don't need to redo. - // Later though we may want differences, or we may make style - // more specific in its scope, then we can remove this. - for(var i = 0; i < modules.length; i++) { - if(modules[i].name === 'scatter') return; - } - - scatterStyle(gd); -}; - -},{"../scatter/style":966}],1002:[function(require,module,exports){ +},{"../scatter/plot":993}],1037:[function(require,module,exports){ +arguments[4][1011][0].apply(exports,arguments) +},{"../scatter/select":994,"dup":1011}],1038:[function(require,module,exports){ +arguments[4][1012][0].apply(exports,arguments) +},{"../scatter/style":995,"dup":1012}],1039:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170595,7 +171874,7 @@ module.exports = { } }; -},{"../../components/color":585,"../../components/colorbar/attributes":586,"../../components/colorscale/attributes":590,"../../lib/extend":682}],1003:[function(require,module,exports){ +},{"../../components/color":578,"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677}],1040:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170619,7 +171898,7 @@ module.exports = function calc(gd, trace) { } }; -},{"../../components/colorscale/calc":591}],1004:[function(require,module,exports){ +},{"../../components/colorscale/calc":584}],1041:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170671,7 +171950,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],1005:[function(require,module,exports){ +},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],1042:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171050,7 +172329,7 @@ function createSurfaceTrace(scene, data) { module.exports = createSurfaceTrace; -},{"../../lib/str2rgbarray":708,"gl-surface3d":257,"ndarray":456,"ndarray-fill":446,"ndarray-homography":448,"ndarray-ops":450,"tinycolor2":521}],1006:[function(require,module,exports){ +},{"../../lib/str2rgbarray":703,"gl-surface3d":250,"ndarray":449,"ndarray-fill":439,"ndarray-homography":441,"ndarray-ops":443,"tinycolor2":514}],1043:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171171,7 +172450,7 @@ function mapLegacy(traceIn, oldAttr, newAttr) { } } -},{"../../components/colorscale/defaults":594,"../../lib":690,"../../registry":807,"./attributes":1002}],1007:[function(require,module,exports){ +},{"../../components/colorscale/defaults":587,"../../lib":685,"../../registry":802,"./attributes":1039}],1044:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171201,7 +172480,7 @@ Surface.meta = { module.exports = Surface; -},{"../../plots/gl3d":772,"./attributes":1002,"./calc":1003,"./colorbar":1004,"./convert":1005,"./defaults":1006}],1008:[function(require,module,exports){ +},{"../../plots/gl3d":767,"./attributes":1039,"./calc":1040,"./colorbar":1041,"./convert":1042,"./defaults":1043}],1045:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171484,7 +172763,7 @@ function getFilterFunc(opts, d2c, targetCalendar) { } } -},{"../lib":690,"../plot_api/plot_schema":718,"../plots/cartesian/axis_autotype":730,"../plots/cartesian/axis_ids":732,"../plots/cartesian/set_convert":746,"../registry":807}],1009:[function(require,module,exports){ +},{"../lib":685,"../plot_api/plot_schema":713,"../plots/cartesian/axis_autotype":725,"../plots/cartesian/axis_ids":727,"../plots/cartesian/set_convert":741,"../registry":802}],1046:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171627,5 +172906,5 @@ function transformOne(trace, state) { return newData; } -},{"../lib":690,"../plot_api/plot_schema":718}]},{},[17])(17) +},{"../lib":685,"../plot_api/plot_schema":713}]},{},[19])(19) }); \ No newline at end of file diff --git a/dist/plotly.min.js b/dist/plotly.min.js index eb493a13e5b..607908629cd 100644 --- a/dist/plotly.min.js +++ b/dist/plotly.min.js @@ -1,74 +1,75 @@ /** -* plotly.js v1.25.2 +* plotly.js v1.26.1 * Copyright 2012-2017, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Plotly=t()}}(function(){var t;return function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[o]={exports:{}};e[o][0].call(c.exports,function(t){var r=e[o][1][t];return i(r||t)},c,c.exports,t,e,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;oMath.abs(e))u.rotate(o,0,0,-t*n*Math.PI*p.rotateSpeed/window.innerWidth);else{var s=p.zoomSpeed*a*e/window.innerHeight*(o-u.lastT())/100;u.pan(o,0,0,h*(Math.exp(s)-1))}},!0),p}e.exports=n;var i=t("right-now"),a=t("3d-view"),o=t("mouse-change"),s=t("mouse-wheel"),l=t("mouse-event-offset")},{"3d-view":31,"mouse-change":441,"mouse-event-offset":442,"mouse-wheel":444,"right-now":490}],31:[function(t,e,r){"use strict";function n(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}function i(t){t=t||{};var e=t.eye||[0,0,1],r=t.center||[0,0,0],i=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],u=t.mode||"turntable",c=a(),h=o(),f=s();return c.setDistanceLimits(l[0],l[1]),c.lookAt(0,e,r,i),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,i),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,i),new n({turntable:c,orbit:h,matrix:f},u)}e.exports=i;var a=t("turntable-camera-controller"),o=t("orbit-camera-controller"),s=t("matrix-camera-controller"),l=n.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n0&&(e.y+=r),a=e.y+e.dy+p;if((r=a-p-m[1])>0)for(a=e.y-=r,n=o-2;n>=0;--n)e=t[n],r=e.y+e.dy+p-a,r>0&&(e.y-=r),a=e.y})}function i(t,e){return t.y-e.y}var a=r.nest().key(function(t){return t.x}).sortKeys(e.ascending).entries(g).map(function(t){return t.values});!function(){var t=e.min(a,function(t){return(m[1]-(t.length-1)*p)/e.sum(t,h)});a.forEach(function(e){e.forEach(function(e,r){e.y=r,e.dy=e.value*t})}),v.forEach(function(e){e.dy=e.value*t})}(),n();for(var o=1;t>0;--t)!function(t){function r(t){return c(t.target)*t.value}a.slice().reverse().forEach(function(n){n.forEach(function(n){if(n.sourceLinks.length){var i=e.sum(n.sourceLinks,r)/e.sum(n.sourceLinks,h);n.y+=(i-c(n))*t}})})}(o*=.99),n(),function(t){function r(t){return c(t.source)*t.value}a.forEach(function(n){n.forEach(function(n){if(n.targetLinks.length){var i=e.sum(n.targetLinks,r)/e.sum(n.targetLinks,h);n.y+=(i-c(n))*t}})})}(o),n()}function u(){function t(t,e){return t.source.y-e.source.y||t.originalIndex-e.originalIndex}function e(t,e){return t.target.y-e.target.y||t.originalIndex-e.originalIndex}g.forEach(function(r){r.sourceLinks.sort(e),r.targetLinks.sort(t)}),g.forEach(function(t){var e=0,r=0;t.sourceLinks.forEach(function(t){t.sy=e,e+=t.dy}),t.targetLinks.forEach(function(t){t.ty=r,r+=t.dy})})}function c(t){return t.y+t.dy/2}function h(t){return t.value}var f={},d=24,p=8,m=[1,1],g=[],v=[];return f.nodeWidth=function(t){return arguments.length?(d=+t,f):d},f.nodePadding=function(t){return arguments.length?(p=+t,f):p},f.nodes=function(t){return arguments.length?(g=t,f):g},f.links=function(t){return arguments.length?(v=t,f):v},f.size=function(t){return arguments.length?(m=t,f):m},f.layout=function(e){return t(),i(),a(),l(e),u(),f},f.relayout=function(){return u(),f},f.link=function(){function t(t){var r=t.source.x+t.source.dx,i=t.target.x,a=n.interpolateNumber(r,i),o=a(e),s=a(1-e),l=t.source.y+t.sy+t.dy/2,u=t.target.y+t.ty+t.dy/2;return"M"+r+","+l+"C"+o+","+l+" "+s+","+u+" "+i+","+u}var e=.5;return t.curvature=function(r){return arguments.length?(e=+r,t):e},t},f};t.sankey=i,Object.defineProperty(t,"__esModule",{value:!0})})},{"d3-array":106,"d3-collection":107,"d3-interpolate":111}],33:[function(t,e,r){"use strict";function n(t){var e=s.get(t),r=e&&(e._triangleBuffer.handle||e._triangleBuffer.buffer);if(!r||!t.isBuffer(r)){var n=a(t,new Float32Array([-1,-1,-1,4,4,-1]));e=o(t,[{buffer:n,type:t.FLOAT,size:2}]),e._triangleBuffer=n,s.set(t,e)}e.bind(),t.drawArrays(t.TRIANGLES,0,3),e.unbind()}var i="undefined"==typeof WeakMap?t("weak-map"):WeakMap,a=t("gl-buffer"),o=t("gl-vao"),s=new i;e.exports=n},{"gl-buffer":148,"gl-vao":262,"weak-map":546}],34:[function(t,e,r){function n(t,e,r){e="number"==typeof e?e:1,r=r||": ";var n=t.split(/\r?\n/),a=String(n.length+e-1).length;return n.map(function(t,n){var o=n+e,s=String(o).length;return i(o,a-s)+r+t}).join("\n")}var i=t("pad-left");e.exports=n},{"pad-left":462}],35:[function(t,e,r){"use strict";function n(t,e){for(var r=new Array(e+1),n=0;n>16&255,r[1]=n>>8&255,r[2]=255&n):h.test(t)&&(n=t.match(f),r[0]=parseInt(n[1]),r[1]=parseInt(n[2]),r[2]=parseInt(n[3])),!e)for(var i=0;i<3;++i)r[i]=r[i]/255;return r}function u(t,e){var r,n;if("string"!=typeof t)return t;if(r=[],"#"===t[0]?(t=t.substr(1),3===t.length&&(t+=t),n=parseInt(t,16),r[0]=n>>16&255,r[1]=n>>8&255,r[2]=255&n):h.test(t)&&(n=t.match(f),r[0]=parseInt(n[1]),r[1]=parseInt(n[2]),r[2]=parseInt(n[3]),n[4]?r[3]=parseFloat(n[4]):r[3]=1),!e)for(var i=0;i<3;++i)r[i]=r[i]/255;return r}var c={},h=/^rgba?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*(,.*)?\)$/,f=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(.*)?\)$/;return c.isPlainObject=t,c.linspace=e,c.zip3=n,c.sum=i,c.zip=r,c.isEqual=s,c.copy2D=a,c.copy1D=o,c.str2RgbArray=l,c.str2RgbaArray=u,c}()},{}],39:[function(t,e,r){(function(r){"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i=0;s--)if(l[s]!==u[s])return!1;for(s=l.length-1;s>=0;s--)if(o=l[s],!d(t[o],e[o],r,n))return!1;return!0}function g(t,e,r){d(t,e,!0)&&h(t,e,r,"notDeepStrictEqual",g)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function y(t){var e;try{t()}catch(t){e=t}return e}function b(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=y(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&h(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!t&&x.isError(i),s=!t&&i&&!r;if((o&&a&&v(i,r)||s)&&h(i,r,"Got unwanted exception"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}var x=t("util/"),_=Object.prototype.hasOwnProperty,w=Array.prototype.slice,M=function(){return"foo"===function(){}.name}(),k=e.exports=f,A=/\s*function\s+([^\(\s]*)\s*/;k.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var e=t.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=s(e),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},x.inherits(k.AssertionError,Error),k.fail=h,k.ok=f,k.equal=function(t,e,r){t!=e&&h(t,e,r,"==",k.equal)},k.notEqual=function(t,e,r){t==e&&h(t,e,r,"!=",k.notEqual)},k.deepEqual=function(t,e,r){d(t,e,!1)||h(t,e,r,"deepEqual",k.deepEqual)},k.deepStrictEqual=function(t,e,r){d(t,e,!0)||h(t,e,r,"deepStrictEqual",k.deepStrictEqual)},k.notDeepEqual=function(t,e,r){d(t,e,!1)&&h(t,e,r,"notDeepEqual",k.notDeepEqual)},k.notDeepStrictEqual=g,k.strictEqual=function(t,e,r){t!==e&&h(t,e,r,"===",k.strictEqual)},k.notStrictEqual=function(t,e,r){t===e&&h(t,e,r,"!==",k.notStrictEqual)},k.throws=function(t,e,r){ -b(!0,t,e,r)},k.doesNotThrow=function(t,e,r){b(!1,t,e,r)},k.ifError=function(t){if(t)throw t};var T=Object.keys||function(t){var e=[];for(var r in t)_.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":536}],40:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],41:[function(t,e,r){"use strict";function n(t){for(var e=0,r=0;r0?r=r.ushln(h):h<0&&(c=c.ushln(-h)),l(r,c)}var i=t("./is-rat"),a=t("./lib/is-bn"),o=t("./lib/num-to-bn"),s=t("./lib/str-to-bn"),l=t("./lib/rationalize"),u=t("./div");e.exports=n},{"./div":44,"./is-rat":46,"./lib/is-bn":50,"./lib/num-to-bn":51,"./lib/rationalize":52,"./lib/str-to-bn":53}],46:[function(t,e,r){"use strict";function n(t){return Array.isArray(t)&&2===t.length&&i(t[0])&&i(t[1])}var i=t("./lib/is-bn");e.exports=n},{"./lib/is-bn":50}],47:[function(t,e,r){"use strict";function n(t){return t.cmp(new i(0))}var i=t("bn.js");e.exports=n},{"bn.js":60}],48:[function(t,e,r){"use strict";function n(t){var e=t.length,r=t.words,n=0;if(1===e)n=r[0];else if(2===e)n=r[0]+67108864*r[1];else for(var a=0;a20?52:r+32}var i=t("double-bits"),a=t("bit-twiddle").countTrailingZeros;e.exports=n},{"bit-twiddle":59,"double-bits":116}],50:[function(t,e,r){"use strict";function n(t){return t&&"object"==typeof t&&Boolean(t.words)}t("bn.js");e.exports=n},{"bn.js":60}],51:[function(t,e,r){"use strict";function n(t){var e=a.exponent(t);return e<52?new i(t):new i(t*Math.pow(2,52-e)).ushln(e-52)}var i=t("bn.js"),a=t("double-bits");e.exports=n},{"bn.js":60,"double-bits":116}],52:[function(t,e,r){"use strict";function n(t,e){var r=a(t),n=a(e);if(0===r)return[i(0),i(1)];if(0===n)return[i(0),i(0)];n<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]}var i=t("./num-to-bn"),a=t("./bn-sign");e.exports=n},{"./bn-sign":47,"./num-to-bn":51}],53:[function(t,e,r){"use strict";function n(t){return new i(t)}var i=t("bn.js");e.exports=n},{"bn.js":60}],54:[function(t,e,r){"use strict";function n(t,e){return i(t[0].mul(e[0]),t[1].mul(e[1]))}var i=t("./lib/rationalize");e.exports=n},{"./lib/rationalize":52}],55:[function(t,e,r){"use strict";function n(t){return i(t[0])*i(t[1])}var i=t("./lib/bn-sign");e.exports=n},{"./lib/bn-sign":47}],56:[function(t,e,r){"use strict";function n(t,e){return i(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}var i=t("./lib/rationalize");e.exports=n},{"./lib/rationalize":52}],57:[function(t,e,r){"use strict";function n(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var n=e.abs().divmod(r.abs()),o=n.div,s=i(o),l=n.mod,u=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return u*s;if(s){var c=a(s)+4,h=i(l.ushln(c).divRound(r));return u*(s+h*Math.pow(2,-c))}var f=r.bitLength()-l.bitLength()+53,h=i(l.ushln(f).divRound(r));return f<1023?u*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),u*h*Math.pow(2,1023-f))}var i=t("./lib/bn-to-num"),a=t("./lib/ctz");e.exports=n},{"./lib/bn-to-num":48,"./lib/ctz":49}],58:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=["function ",t,"(a,l,h,",n.join(","),"){",a?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return a?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),a?o.push("return -1};"):o.push("return i};"),o.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],!1,i),n("B","x"+t+"y",e,["y"],!0,i),n("P","c(x,y)"+t+"0",e,["y","c"],!1,i),n("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],59:[function(t,e,r){"use strict";"use restrict";function n(t){var e=32;return t&=-t,t&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return t-=t>>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},r.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),(t=65535&(t|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),t|r<<2},r.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),(t=1023&(t|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],60:[function(t,e,r){!function(e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}function o(t,e,r){for(var n=0,i=Math.min(t.length,r),a=e;a=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function s(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}function l(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}function u(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,h=67108863&l,f=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=f;d++){var p=u-d|0;i=0|t.words[p],a=0|e.words[d],o=i*a+h,c+=o/67108864|0,h=67108863&o}r.words[u]=0|h,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}function c(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function h(t,e,r){return(new f).mulp(t,e,r)}function f(t,e){this.x=t,this.y=e}function d(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function b(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var x;try{x=t("buffer").Buffer}catch(t){}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=o(t,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=o(t,e,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,l=Math.min(a,a-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var i=0,a=0,o=0;o>>24-i&16777215,r=0!==a||o!==this.length-1?_[6-l.length]+l+r:l+r,i+=2,i>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=w[t],c=M[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var f=h.modn(c).toString(t);h=h.idivn(c),r=h.isZero()?f+r:_[u-f.length]+f+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==x),this.toArrayLike(x,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,u=new t(a),c=this.clone();if(l){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],x=8191&b,_=b>>>13,w=0|o[4],M=8191&w,k=w>>>13,A=0|o[5],T=8191&A,S=A>>>13,E=0|o[6],L=8191&E,C=E>>>13,z=0|o[7],D=8191&z,I=z>>>13,P=0|o[8],O=8191&P,R=P>>>13,j=0|o[9],F=8191&j,N=j>>>13,B=0|s[0],U=8191&B,V=B>>>13,q=0|s[1],H=8191&q,Y=q>>>13,G=0|s[2],X=8191&G,W=G>>>13,Z=0|s[3],J=8191&Z,K=Z>>>13,Q=0|s[4],$=8191&Q,tt=Q>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ut=st>>>13,ct=0|s[8],ht=8191&ct,ft=ct>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,V),i=i+Math.imul(f,U)|0,a=Math.imul(f,V);var gt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=Math.imul(p,V),i=i+Math.imul(m,U)|0,a=Math.imul(m,V),n=n+Math.imul(h,H)|0,i=i+Math.imul(h,Y)|0,i=i+Math.imul(f,H)|0,a=a+Math.imul(f,Y)|0;var vt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=Math.imul(v,V),i=i+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(p,H)|0,i=i+Math.imul(p,Y)|0,i=i+Math.imul(m,H)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(h,X)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(f,X)|0,a=a+Math.imul(f,W)|0;var yt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(x,U),i=Math.imul(x,V),i=i+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(v,H)|0,i=i+Math.imul(v,Y)|0,i=i+Math.imul(y,H)|0,a=a+Math.imul(y,Y)|0,n=n+Math.imul(p,X)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(m,X)|0,a=a+Math.imul(m,W)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,K)|0,i=i+Math.imul(f,J)|0,a=a+Math.imul(f,K)|0;var bt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,U),i=Math.imul(M,V),i=i+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(x,H)|0,i=i+Math.imul(x,Y)|0,i=i+Math.imul(_,H)|0,a=a+Math.imul(_,Y)|0,n=n+Math.imul(v,X)|0,i=i+Math.imul(v,W)|0,i=i+Math.imul(y,X)|0,a=a+Math.imul(y,W)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,K)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,K)|0,n=n+Math.imul(h,$)|0,i=i+Math.imul(h,tt)|0,i=i+Math.imul(f,$)|0,a=a+Math.imul(f,tt)|0;var xt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(T,U),i=Math.imul(T,V),i=i+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(M,H)|0,i=i+Math.imul(M,Y)|0,i=i+Math.imul(k,H)|0,a=a+Math.imul(k,Y)|0,n=n+Math.imul(x,X)|0,i=i+Math.imul(x,W)|0,i=i+Math.imul(_,X)|0,a=a+Math.imul(_,W)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,K)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,K)|0,n=n+Math.imul(p,$)|0,i=i+Math.imul(p,tt)|0,i=i+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0,n=n+Math.imul(h,rt)|0,i=i+Math.imul(h,nt)|0,i=i+Math.imul(f,rt)|0,a=a+Math.imul(f,nt)|0;var _t=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,U),i=Math.imul(L,V),i=i+Math.imul(C,U)|0,a=Math.imul(C,V),n=n+Math.imul(T,H)|0,i=i+Math.imul(T,Y)|0,i=i+Math.imul(S,H)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(M,X)|0,i=i+Math.imul(M,W)|0,i=i+Math.imul(k,X)|0,a=a+Math.imul(k,W)|0,n=n+Math.imul(x,J)|0,i=i+Math.imul(x,K)|0,i=i+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(v,$)|0,i=i+Math.imul(v,tt)|0,i=i+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=i+Math.imul(p,nt)|0,i=i+Math.imul(m,rt)|0,a=a+Math.imul(m,nt)|0,n=n+Math.imul(h,at)|0,i=i+Math.imul(h,ot)|0,i=i+Math.imul(f,at)|0,a=a+Math.imul(f,ot)|0;var wt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,U),i=Math.imul(D,V),i=i+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(L,H)|0,i=i+Math.imul(L,Y)|0,i=i+Math.imul(C,H)|0,a=a+Math.imul(C,Y)|0,n=n+Math.imul(T,X)|0,i=i+Math.imul(T,W)|0,i=i+Math.imul(S,X)|0,a=a+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,i=i+Math.imul(M,K)|0,i=i+Math.imul(k,J)|0,a=a+Math.imul(k,K)|0,n=n+Math.imul(x,$)|0,i=i+Math.imul(x,tt)|0,i=i+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=i+Math.imul(v,nt)|0,i=i+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(p,at)|0,i=i+Math.imul(p,ot)|0,i=i+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0,n=n+Math.imul(h,lt)|0,i=i+Math.imul(h,ut)|0,i=i+Math.imul(f,lt)|0,a=a+Math.imul(f,ut)|0;var Mt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,U),i=Math.imul(O,V),i=i+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(D,H)|0,i=i+Math.imul(D,Y)|0,i=i+Math.imul(I,H)|0,a=a+Math.imul(I,Y)|0,n=n+Math.imul(L,X)|0,i=i+Math.imul(L,W)|0,i=i+Math.imul(C,X)|0,a=a+Math.imul(C,W)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,K)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(M,$)|0,i=i+Math.imul(M,tt)|0,i=i+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=i+Math.imul(x,nt)|0,i=i+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=i+Math.imul(v,ot)|0,i=i+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(p,lt)|0,i=i+Math.imul(p,ut)|0,i=i+Math.imul(m,lt)|0,a=a+Math.imul(m,ut)|0,n=n+Math.imul(h,ht)|0,i=i+Math.imul(h,ft)|0,i=i+Math.imul(f,ht)|0,a=a+Math.imul(f,ft)|0;var kt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,U),i=Math.imul(F,V),i=i+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(O,H)|0,i=i+Math.imul(O,Y)|0,i=i+Math.imul(R,H)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(D,X)|0,i=i+Math.imul(D,W)|0,i=i+Math.imul(I,X)|0,a=a+Math.imul(I,W)|0,n=n+Math.imul(L,J)|0,i=i+Math.imul(L,K)|0,i=i+Math.imul(C,J)|0,a=a+Math.imul(C,K)|0,n=n+Math.imul(T,$)|0,i=i+Math.imul(T,tt)|0,i=i+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(M,rt)|0,i=i+Math.imul(M,nt)|0,i=i+Math.imul(k,rt)|0,a=a+Math.imul(k,nt)|0,n=n+Math.imul(x,at)|0,i=i+Math.imul(x,ot)|0,i=i+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=i+Math.imul(v,ut)|0,i=i+Math.imul(y,lt)|0,a=a+Math.imul(y,ut)|0,n=n+Math.imul(p,ht)|0,i=i+Math.imul(p,ft)|0,i=i+Math.imul(m,ht)|0,a=a+Math.imul(m,ft)|0,n=n+Math.imul(h,pt)|0,i=i+Math.imul(h,mt)|0,i=i+Math.imul(f,pt)|0,a=a+Math.imul(f,mt)|0;var At=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,H),i=Math.imul(F,Y),i=i+Math.imul(N,H)|0,a=Math.imul(N,Y),n=n+Math.imul(O,X)|0,i=i+Math.imul(O,W)|0,i=i+Math.imul(R,X)|0,a=a+Math.imul(R,W)|0,n=n+Math.imul(D,J)|0,i=i+Math.imul(D,K)|0,i=i+Math.imul(I,J)|0,a=a+Math.imul(I,K)|0,n=n+Math.imul(L,$)|0,i=i+Math.imul(L,tt)|0,i=i+Math.imul(C,$)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=i+Math.imul(T,nt)|0,i=i+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(M,at)|0,i=i+Math.imul(M,ot)|0,i=i+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,n=n+Math.imul(x,lt)|0,i=i+Math.imul(x,ut)|0,i=i+Math.imul(_,lt)|0,a=a+Math.imul(_,ut)|0,n=n+Math.imul(v,ht)|0,i=i+Math.imul(v,ft)|0,i=i+Math.imul(y,ht)|0,a=a+Math.imul(y,ft)|0,n=n+Math.imul(p,pt)|0,i=i+Math.imul(p,mt)|0,i=i+Math.imul(m,pt)|0,a=a+Math.imul(m,mt)|0;var Tt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,X),i=Math.imul(F,W),i=i+Math.imul(N,X)|0,a=Math.imul(N,W),n=n+Math.imul(O,J)|0,i=i+Math.imul(O,K)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(D,$)|0,i=i+Math.imul(D,tt)|0,i=i+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(L,rt)|0,i=i+Math.imul(L,nt)|0,i=i+Math.imul(C,rt)|0,a=a+Math.imul(C,nt)|0,n=n+Math.imul(T,at)|0,i=i+Math.imul(T,ot)|0,i=i+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(M,lt)|0,i=i+Math.imul(M,ut)|0,i=i+Math.imul(k,lt)|0,a=a+Math.imul(k,ut)|0,n=n+Math.imul(x,ht)|0,i=i+Math.imul(x,ft)|0,i=i+Math.imul(_,ht)|0,a=a+Math.imul(_,ft)|0,n=n+Math.imul(v,pt)|0,i=i+Math.imul(v,mt)|0,i=i+Math.imul(y,pt)|0,a=a+Math.imul(y,mt)|0;var St=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,J),i=Math.imul(F,K),i=i+Math.imul(N,J)|0,a=Math.imul(N,K),n=n+Math.imul(O,$)|0,i=i+Math.imul(O,tt)|0,i=i+Math.imul(R,$)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(D,rt)|0,i=i+Math.imul(D,nt)|0,i=i+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(L,at)|0,i=i+Math.imul(L,ot)|0,i=i+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,n=n+Math.imul(T,lt)|0,i=i+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,a=a+Math.imul(S,ut)|0,n=n+Math.imul(M,ht)|0,i=i+Math.imul(M,ft)|0,i=i+Math.imul(k,ht)|0,a=a+Math.imul(k,ft)|0,n=n+Math.imul(x,pt)|0,i=i+Math.imul(x,mt)|0,i=i+Math.imul(_,pt)|0,a=a+Math.imul(_,mt)|0;var Et=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,$),i=Math.imul(F,tt),i=i+Math.imul(N,$)|0,a=Math.imul(N,tt),n=n+Math.imul(O,rt)|0,i=i+Math.imul(O,nt)|0,i=i+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(D,at)|0,i=i+Math.imul(D,ot)|0,i=i+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(L,lt)|0,i=i+Math.imul(L,ut)|0,i=i+Math.imul(C,lt)|0,a=a+Math.imul(C,ut)|0,n=n+Math.imul(T,ht)|0,i=i+Math.imul(T,ft)|0,i=i+Math.imul(S,ht)|0,a=a+Math.imul(S,ft)|0,n=n+Math.imul(M,pt)|0,i=i+Math.imul(M,mt)|0,i=i+Math.imul(k,pt)|0,a=a+Math.imul(k,mt)|0;var Lt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(F,rt),i=Math.imul(F,nt),i=i+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(O,at)|0,i=i+Math.imul(O,ot)|0,i=i+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(D,lt)|0,i=i+Math.imul(D,ut)|0,i=i+Math.imul(I,lt)|0,a=a+Math.imul(I,ut)|0,n=n+Math.imul(L,ht)|0,i=i+Math.imul(L,ft)|0,i=i+Math.imul(C,ht)|0,a=a+Math.imul(C,ft)|0,n=n+Math.imul(T,pt)|0,i=i+Math.imul(T,mt)|0,i=i+Math.imul(S,pt)|0,a=a+Math.imul(S,mt)|0;var Ct=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,at),i=Math.imul(F,ot),i=i+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(O,lt)|0,i=i+Math.imul(O,ut)|0,i=i+Math.imul(R,lt)|0,a=a+Math.imul(R,ut)|0,n=n+Math.imul(D,ht)|0,i=i+Math.imul(D,ft)|0,i=i+Math.imul(I,ht)|0,a=a+Math.imul(I,ft)|0,n=n+Math.imul(L,pt)|0,i=i+Math.imul(L,mt)|0,i=i+Math.imul(C,pt)|0,a=a+Math.imul(C,mt)|0;var zt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(F,lt),i=Math.imul(F,ut),i=i+Math.imul(N,lt)|0,a=Math.imul(N,ut),n=n+Math.imul(O,ht)|0,i=i+Math.imul(O,ft)|0,i=i+Math.imul(R,ht)|0,a=a+Math.imul(R,ft)|0,n=n+Math.imul(D,pt)|0,i=i+Math.imul(D,mt)|0,i=i+Math.imul(I,pt)|0,a=a+Math.imul(I,mt)|0;var Dt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(F,ht),i=Math.imul(F,ft),i=i+Math.imul(N,ht)|0,a=Math.imul(N,ft),n=n+Math.imul(O,pt)|0,i=i+Math.imul(O,mt)|0,i=i+Math.imul(R,pt)|0,a=a+Math.imul(R,mt)|0;var It=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,pt),i=Math.imul(F,mt),i=i+Math.imul(N,pt)|0,a=Math.imul(N,mt);var Pt=(u+n|0)+((8191&i)<<13)|0;return u=(a+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,l[0]=gt,l[1]=vt,l[2]=yt,l[3]=bt,l[4]=xt,l[5]=_t,l[6]=wt,l[7]=Mt,l[8]=kt,l[9]=At,l[10]=Tt,l[11]=St,l[12]=Et,l[13]=Lt,l[14]=Ct,l[15]=zt,l[16]=Dt,l[17]=It,l[18]=Pt,0!==u&&(l[19]=u,r.length++),r};Math.imul||(k=u),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?k(this,t,e):r<63?u(this,t,e):r<1024?c(this,t,e):h(this,t,e)},f.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},f.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=l(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0);var i;i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-a|h>>>a,c=h&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){s=new a(null),s.length=l+1,s.words=new Array(s.length);for(var u=0;u=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=f)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){if(n(!t.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var i,o,s;return 0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0==(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(c),l.isub(h)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(u)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0==(e.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(e.iushrn(l);l-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var c=0,h=1;0==(r.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o)):(r.isub(e),o.isub(i))}var f;return f=0===e.cmpn(1)?i:o,f.cmpn(0)<0&&f.iadd(t),f},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];r=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new y(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};d.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},d.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},d.prototype.split=function(t,e){t.iushrn(this.n,0,e)},d.prototype.imulK=function(t){return t.imul(this.k)},i(p,d),p.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},p.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new m;else if("p192"===t)e=new g;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new v}return A[t]=e,e},y.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},y.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},y.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},y.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},y.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},y.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},y.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=o;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var u=e.words[n],c=l-1;c>=0;c--){var h=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},y.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},y.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new b(t)},i(b,y),b.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},b.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},b.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},b.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},b.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{}],61:[function(t,e,r){"use strict";function n(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(s<=0)){var l,u=h.mallocDouble(2*s*a),c=h.mallocInt32(a);if((a=i(t,s,u,c))>0){if(1===s&&n)f.init(a),l=f.sweepComplete(s,r,0,a,u,c,0,a,u,c);else{var p=h.mallocDouble(2*s*o),m=h.mallocInt32(o);o=i(e,s,p,m),o>0&&(f.init(a+o),l=1===s?f.sweepBipartite(s,r,0,a,u,c,0,o,p,m):d(s,r,n,a,u,c,o,p,m),h.free(p),h.free(m))}h.free(u),h.free(c)}return l}}}function o(t,e){c.push([t,e])}function s(t){return c=[],a(t,t,o,!0),c}function l(t,e){return c=[],a(t,e,o,!1),c}function u(t,e,r){switch(arguments.length){case 1:return s(t);case 2:return"function"==typeof e?a(t,t,e,!0):l(t,e);case 3:return a(t,e,r,!1);default:throw new Error("box-intersect: Invalid arguments")}}e.exports=u;var c,h=t("typedarray-pool"),f=t("./lib/sweep"),d=t("./lib/intersect")},{"./lib/intersect":64,"./lib/sweep":68,"typedarray-pool":528}],63:[function(t,e,r){"use strict";function n(t,e,r){var n="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(r?"Full":""),i=["function ",n,"(",w.join(),"){","var ",u,"=2*",a,";"],l="for(var i="+c+","+p+"="+u+"*"+c+";i<"+h+";++i,"+p+"+="+u+"){var x0="+f+"["+o+"+"+p+"],x1="+f+"["+o+"+"+p+"+"+a+"],xi="+d+"[i];",M="for(var j="+m+","+b+"="+u+"*"+m+";j<"+g+";++j,"+b+"+="+u+"){var y0="+v+"["+o+"+"+b+"],"+(r?"y1="+v+"["+o+"+"+b+"+"+a+"],":"")+"yi="+y+"[j];";return t?i.push(l,_,":",M):i.push(M,_,":",l),r?i.push("if(y1"+g+"-"+m+"){"),t?(e(!0,!1),o.push("}else{"),e(!1,!1)):(o.push("if("+l+"){"),e(!0,!0),o.push("}else{"),e(!0,!1),o.push("}}else{if("+l+"){"),e(!1,!0),o.push("}else{"),e(!1,!1),o.push("}")),o.push("}}return "+r);var s=i.join("")+o.join("");return new Function(s)()}var a="d",o="ax",s="vv",l="fp",u="es",c="rs",h="re",f="rb",d="ri",p="rp",m="bs",g="be",v="bb",y="bi",b="bp",x="rv",_="Q",w=[a,o,s,c,h,f,d,m,g,v,y];r.partial=i(!1),r.full=i(!0)},{}],64:[function(t,e,r){"use strict";function n(t,e){var r=8*u.log2(e+1)*(t+1)|0,n=u.nextPow2(A*r);S.length0;){z-=1;var I=z*A,P=S[I],O=S[I+1],R=S[I+2],j=S[I+3],F=S[I+4],N=S[I+5],B=z*T,U=E[B],V=E[B+1],q=1&N,H=!!(16&N),Y=l,G=u,X=m,W=L;if(q&&(Y=m,G=L,X=l,W=u),!(2&N&&(R=_(t,P,O,R,Y,G,V),O>=R)||4&N&&(O=w(t,P,O,R,Y,G,U))>=R)){var Z=R-O,J=F-j;if(H){if(t*Z*(Z+J)=p0)&&!(p1>=hi)",["p0","p1"]),x=m("lo===p0",["p0"]),_=m("lor&&i[h+e]>u;--c,h-=o){for(var f=h,d=h+o,p=0;p>>1,f=2*t,d=h,p=a[f*h+e];u=b?(d=y,p=b):v>=_?(d=g,p=v):(d=x,p=_):b>=_?(d=y,p=b):_>=v?(d=g,p=v):(d=x,p=_);for(var w=f*(c-1),M=f*d,k=0;k=0&&n.push("lo=e[k+n]"),t.indexOf("hi")>=0&&n.push("hi=e[k+o]"),r.push(i.replace("_",n.join()).replace("$",t)),Function.apply(void 0,r)}e.exports=n;var i="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],67:[function(t,e,r){"use strict";function n(t,e){e<=4*f?i(0,e-1,t):h(0,e-1,t)}function i(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var u=r[l-2],c=r[l-1];if(ur[e+1])}function c(t,e,r,n){t*=2;var i=n[t];return i>1,g=m-n,v=m+n,y=d,b=g,x=m,_=v,w=p,M=t+1,k=e-1,A=0;u(y,b,r)&&(A=y,y=b,b=A),u(_,w,r)&&(A=_,_=w,w=A),u(y,x,r)&&(A=y,y=x,x=A),u(b,x,r)&&(A=b,b=x,x=A),u(y,_,r)&&(A=y,y=_,_=A),u(x,_,r)&&(A=x,x=_,_=A),u(b,w,r)&&(A=b,b=w,w=A),u(b,x,r)&&(A=b,b=x,x=A),u(_,w,r)&&(A=_,_=w,w=A);for(var T=r[2*b],S=r[2*b+1],E=r[2*_],L=r[2*_+1],C=2*y,z=2*x,D=2*w,I=2*d,P=2*m,O=2*p,R=0;R<2;++R){var j=r[C+R],F=r[z+R],N=r[D+R];r[I+R]=j,r[P+R]=F,r[O+R]=N}o(g,t,r),o(v,e,r);for(var B=M;B<=k;++B)if(c(B,T,S,r))B!==M&&a(B,M,r),++M;else if(!c(B,E,L,r))for(;;){if(c(k,E,L,r)){c(k,T,S,r)?(s(B,M,k,r),++M,--k):(a(B,k,r),--k);break}if(--k>>1;f(x,S);for(var E=0,L=0,M=0;M=d)C=C-d|0,i(g,v,L--,C);else if(C>=0)i(p,m,E--,C);else if(C<=-d){C=-C-d|0;for(var z=0;z>>1;f(x,E);for(var L=0,C=0,z=0,k=0;k>1==x[2*k+3]>>1&&(I=2,k+=1),D<0){for(var P=-(D>>1)-1,O=0;O>1)-1;0===I?i(p,m,L--,P):1===I?i(g,v,C--,P):2===I&&i(y,b,z--,P)}}}function l(t,e,r,n,o,s,l,u,c,h,g,v){var y=0,b=2*t,_=e,w=e+t,M=1,k=1;n?k=d:M=d;for(var A=o;A>>1;f(x,L);for(var C=0,A=0;A=d?(D=!n,T-=d):(D=!!n,T-=1),D)a(p,m,C++,T);else{var I=v[T],P=b*T,O=g[P+e+1],R=g[P+e+1+t];t:for(var j=0;j>>1;f(x,M);for(var k=0,y=0;y=d)p[k++]=b-d;else{b-=1;var T=c[b],S=m*b,E=u[S+e+1],L=u[S+e+1+t];t:for(var C=0;C=0;--C)if(p[C]===b){for(var P=C+1;PZ)throw new RangeError("Invalid typed array length");var e=new Uint8Array(t);return e.__proto__=i.prototype,e}function i(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(t)}return a(t,e,r)}function a(t,e,r){ -if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return t instanceof ArrayBuffer?h(t,e,r):"string"==typeof t?u(t,e):f(t)}function o(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function s(t,e,r){return o(t),t<=0?n(t):void 0!==e?"string"==typeof r?n(t).fill(e,r):n(t).fill(e):n(t)}function l(t){return o(t),n(t<0?0:0|d(t))}function u(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!i.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(t,e),a=n(r),o=a.write(t,e);return o!==r&&(a=a.slice(0,o)),a}function c(t){for(var e=t.length<0?0:0|d(t.length),r=n(e),i=0;i=Z)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z.toString(16)+" bytes");return 0|t}function p(t){return+t!=t&&(t=0),i.alloc(+t)}function m(t,e){if(i.isBuffer(t))return t.length;if(Y(t)||t instanceof ArrayBuffer)return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(t).length;default:if(n)return B(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return z(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,a){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,G(r)&&(r=a?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(a)return-1;r=t.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof e&&(e=i.from(e,n)),i.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,a);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,a);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){function a(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}var u;if(i){var c=-1;for(u=r;us&&(r=s-l),u=r;u>=0;u--){for(var h=!0,f=0;fi&&(n=i):n=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=r){var l,u,c,h;switch(s){case 1:a<128&&(o=a);break;case 2:l=t[i+1],128==(192&l)&&(h=(31&a)<<6|63&l)>127&&(o=h);break;case 3:l=t[i+1],u=t[i+2],128==(192&l)&&128==(192&u)&&(h=(15&a)<<12|(63&l)<<6|63&u)>2047&&(h<55296||h>57343)&&(o=h);break;case 4:l=t[i+1],u=t[i+2],c=t[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(h=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&h<1114112&&(o=h)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return E(n)}function E(t){var e=t.length;if(e<=J)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,r,n,a,o){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||et.length)throw new RangeError("Index out of range")}function O(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(t,e,r,n,52,8),r+8}function F(t){if(t=t.trim().replace(K,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function U(t){for(var e=[],r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function q(t){return X.toByteArray(F(t))}function H(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Y(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function G(t){return t!==t}var X=t("base64-js"),W=t("ieee754");r.Buffer=i,r.SlowBuffer=p,r.INSPECT_MAX_BYTES=50;var Z=2147483647;r.kMaxLength=Z,i.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(t,e,r){return a(t,e,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(t,e,r){return s(t,e,r)},i.allocUnsafe=function(t){return l(t)},i.allocUnsafeSlow=function(t){return l(t)},i.isBuffer=function(t){return null!=t&&!0===t._isBuffer},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,a=0,o=Math.min(r,n);a0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},i.prototype.compare=function(t,e,r,n,a){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),e<0||r>t.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&e>=r)return 0;if(n>=a)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,a>>>=0,this===t)return 0;for(var o=a-n,s=r-e,l=Math.min(o,s),u=this.slice(n,a),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return M(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;i.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},i.prototype.readUInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a=i&&(n-=Math.pow(2,8*e)),n},i.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*e)),a},i.prototype.readInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return t>>>=0,e||I(t,4,this.length),W.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return t>>>=0,e||I(t,4,this.length),W.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return t>>>=0,e||I(t,8,this.length),W.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return t>>>=0,e||I(t,8,this.length),W.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},i.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},i.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},i.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},i.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},i.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeFloatLE=function(t,e,r){return R(this,t,e,!0,r)},i.prototype.writeFloatBE=function(t,e,r){return R(this,t,e,!1,r)},i.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},i.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},i.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return 3*t.length/4-n(t)}function a(t){var e,r,i,a,o,s,l=t.length;o=n(t),s=new h(3*l/4-o),i=o>0?l-4:l;var u=0;for(e=0,r=0;e>16&255,s[u++]=a>>8&255,s[u++]=255&a;return 2===o?(a=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,s[u++]=255&a):1===o&&(a=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,s[u++]=a>>8&255,s[u++]=255&a),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function s(t,e,r){for(var n,i=[],a=e;al?l:o+16383));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),a.push(i),a.join("")}r.byteLength=i,r.toByteArray=a,r.fromByteArray=l;for(var u=[],c=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=f.length;d0;){for(var c=r.pop(),s=r.pop(),h=-1,f=-1,l=o[s],p=1;p=0||(e.flip(s,c),n(t,e,r,h,s,f),n(t,e,r,s,f,h),n(t,e,r,f,c,h),n(t,e,r,c,h,f)))}}var a=t("robust-in-sphere")[4];t("binary-search-bounds");e.exports=i},{"binary-search-bounds":76,"robust-in-sphere":494}],73:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function i(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}function a(t,e){for(var r=t.cells(),a=r.length,o=0;o0||l.length>0;){for(;s.length>0;){var d=s.pop();if(u[d]!==-i){u[d]=i;for(var p=(c[d],0);p<3;++p){var m=f[3*d+p];m>=0&&0===u[m]&&(h[3*d+p]?l.push(m):(s.push(m),u[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var v=o(c,u,e);return r?v.concat(n.boundary):v}var l=t("binary-search-bounds");e.exports=s,n.prototype.locate=function(){var t=[0,0,0];return function(e,r,n){var a=e,o=r,s=n;return r1&&d(r[c[h-2]],r[c[h-1]],n)>0;)t.push([c[h-1],c[h-2],i]),h-=1;c.length=h,c.push(i);for(var p=u.upperIds,h=p.length;h>1&&d(r[p[h-2]],r[p[h-1]],n)<0;)t.push([p[h-2],p[h-1],i]),h-=1;p.length=h,p.push(i)}}function l(t,e){var r;return(r=t.a[0]v[0]&&l.push(new i(v,d,g,h),new i(d,v,m,h))}l.sort(a);for(var y=l[0].a[0]-(1+Math.abs(l[0].a[0]))*Math.pow(2,-52),b=[new n([y,1],[y,0],-1,[],[],[],[])],x=[],h=0,_=l.length;h<_;++h){var w=l[h],M=w.type;M===p?s(x,b,t,w.a,w.idx):M===g?u(b,t,w):c(b,t,w)}return x}var f=t("binary-search-bounds"),d=t("robust-orientation")[3],p=0,m=1,g=2;e.exports=h},{"binary-search-bounds":76,"robust-orientation":496}],75:[function(t,e,r){"use strict";function n(t,e){this.stars=t,this.edges=e}function i(t,e,r){for(var n=1,i=t.length;n=0}}(),s.removeTriangle=function(t,e,r){var n=this.stars;i(n[t],e,r),i(n[e],r,t),i(n[r],t,e)},s.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},s.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n>>1,x=a[m]"];return i?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),r?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),i?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],i),n("P","c(x,y)"+t+"0",e,["y","c"],i),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],77:[function(t,e,r){"use strict";function n(t){for(var e=1,r=1;rr?r:t:te?e:t}e.exports=n},{}],81:[function(t,e,r){"use strict";function n(t){var e=_(t);return[M(e,-1/0),M(e,1/0)]}function i(t,e){for(var r=new Array(e.length),n=0;n=0;--a){var p=n[a];o=p[0];var m=e[o],g=m[0],v=m[1],y=t[g],M=t[v];if((y[0]-M[0]||y[1]-M[1])<0){var A=g;g=v,v=A}m[0]=g;var T,S=m[1]=p[1];for(i&&(T=m[2]);a>0&&n[a-1][0]===o;){var p=n[--a],E=p[1];i?e.push([S,E,T]):e.push([S,E]),S=E}i?e.push([S,v,T]):e.push([S,v])}return s}function u(t,e,r){for(var i=e.length,a=new g(i),o=[],s=0;se[2]?1:0)}function f(t,e,r){if(0!==t.length){if(e)for(var n=0;n0||d.length>0)}function m(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a10&&/[0-9](?:\s|\/)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),r=t.match(/([a-z])/gi).join("").toLowerCase());else"number"==typeof t?(r="rgb",n=[t>>>16,(65280&t)>>>8,255&t]):a(t)?(null!=t.r?(n=[t.r,t.g,t.b],r="rgb"):null!=t.red?(n=[t.red,t.green,t.blue],r="rgb"):null!=t.h?(n=[t.h,t.s,t.l],r="hsl"):null!=t.hue&&(n=[t.hue,t.saturation,t.lightness],r="hsl"),null!=t.a?s=t.a:null!=t.alpha?s=t.alpha:null!=t.opacity&&(s=t.opacity/100)):(Array.isArray(t)||ArrayBuffer.isView(t))&&(n=[t[0],t[1],t[2]],r="rgb",s=4===t.length?t[3]:1);return{space:r,values:n,alpha:s}}e.exports=n;var i=t("color-name"),a=t("is-plain-obj"),o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},{"color-name":85,"is-plain-obj":286}],87:[function(t,e,r){"use strict";var n=t("color-parse"),i=t("color-space/hsl"),a=t("clamp");e.exports=function(t,e){null==e&&(e=!0);var r=n(t);if(!r.space)return[];if(Array.isArray(t))return t;var o,s=r.values,l=s.length;for(o=0;o1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[u]=255*a;return i}},n.hsl=function(t){var e,r,n,i=t[0]/255,a=t[1]/255,o=t[2]/255,s=Math.min(i,a,o),l=Math.max(i,a,o),u=l-s;return l===s?e=0:i===l?e=(a-o)/u:a===l?e=2+(o-i)/u:o===l&&(e=4+(i-a)/u),e=Math.min(60*e,360),e<0&&(e+=360),n=(s+l)/2,r=l===s?0:n<=.5?u/(l+s):u/(2-l-s),[e,100*r,100*n]}},{"./rgb":89}],89:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],90:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:0,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],91:[function(t,e,r){"use strict";function n(t){var e,r,n,u,c,h,f,d,p,m,g,v,y,b=[],x=[],_=[],w=[];if(o.isPlainObject(t)||(t={}),p=t.nshades||72,d=t.format||"hex",f=t.colormap,f||(f="jet"),"string"==typeof f){if(f=f.toLowerCase(),!l[f])throw Error(f+" not a supported colorscale");h=s(l[f])}else{if(!Array.isArray(f))throw Error("unsupported colormap option",f);h=s(f)}if(h.length>p)throw new Error(f+" map requires nshades to be at least size "+h.length);for(g=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:s(t.alpha):"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=h.map(function(t){return Math.round(t.index*p)}),g[0]<0&&(g[0]=0),g[1]<0&&(g[0]=0),g[0]>1&&(g[0]=1),g[1]>1&&(g[0]=1),y=0;y=0&&r[3]<=1||(r[3]=g[0]+(g[1]-g[0])*v);for(y=0;y=0}function i(t,e,r,i){var s=a(e,r,i);if(0===s){var l=o(a(t,e,r)),u=o(a(t,e,i));if(l===u){if(0===l){var c=n(t,e,r);return c===n(t,e,i)?0:c?1:-1}return 0}return 0===u?l>0?-1:n(t,e,i)?-1:1:0===l?u>0?1:n(t,e,r)?1:-1:o(u-l)}var h=a(t,e,r);return h>0?s>0&&a(t,e,i)>0?1:-1:h<0?s>0||a(t,e,i)>0?1:-1:a(t,e,i)>0?1:n(t,e,r)?1:-1}e.exports=i;var a=t("robust-orientation"),o=t("signum"),s=t("two-sum"),l=t("robust-product"),u=t("robust-sum")},{"robust-orientation":496,"robust-product":497,"robust-sum":501,signum:503,"two-sum":527}],93:[function(t,e,r){function n(t,e){return t-e}function i(t,e){var r=t.length,i=t.length-e.length;if(i)return i;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||a(t[0],t[1])-a(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(i=o+t[2]-(s+e[2]))return i;var l=a(t[0],t[1]),u=a(e[0],e[1]);return a(l,t[2])-a(u,e[2])||a(l+t[2],o)-a(u+e[2],s);case 4:var c=t[0],h=t[1],f=t[2],d=t[3],p=e[0],m=e[1],g=e[2],v=e[3];return c+h+f+d-(p+m+g+v)||a(c,h,f,d)-a(p,m,g,v,p)||a(c+h,c+f,c+d,h+f,h+d,f+d)-a(p+m,p+g,p+v,m+g,m+v,g+v)||a(c+h+f,c+h+d,c+f+d,h+f+d)-a(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var y=t.slice().sort(n),b=e.slice().sort(n),x=0;xt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}e.exports=n},{}],97:[function(t,e,r){"use strict";function n(t){var e=i(t),r=e.length;if(r<=2)return[];for(var n=new Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}function a(t,e){try{return o(t,!0)}catch(u){var r=s(t);if(r.length<=e)return[];var a=n(t,r),l=o(a,!0);return i(l,r)}}e.exports=a;var o=t("incremental-convex-hull"),s=t("affine-hull")},{"affine-hull":35,"incremental-convex-hull":280}],99:[function(t,e,r){e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],100:[function(t,e,r){function n(t){return t=Math.round(t),t<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return n("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return i("%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function l(t){var e=t.replace(/ /g,"").toLowerCase();if(e in u)return u[e].slice();if("#"===e[0]){if(4===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=4095?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null}if(7===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=16777215?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null}return null}var i=e.indexOf("("),l=e.indexOf(")");if(-1!==i&&l+1===e.length){var c=e.substr(0,i),h=e.substr(i+1,l-(i+1)).split(","),f=1;switch(c){case"rgba":if(4!==h.length)return null;f=o(h.pop());case"rgb":return 3!==h.length?null:[a(h[0]),a(h[1]),a(h[2]),f];case"hsla":if(4!==h.length)return null;f=o(h.pop());case"hsl":if(3!==h.length)return null;var d=(parseFloat(h[0])%360+360)%360/360,p=o(h[1]),m=o(h[2]),g=m<=.5?m*(p+1):m+p-m*p,v=2*m-g;return[n(255*s(v,g,d+1/3)),n(255*s(v,g,d)),n(255*s(v,g,d-1/3)),f];default:return null}}return null}var u={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1], -olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{r.parseCSSColor=l}catch(t){}},{}],101:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,u=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var c=t.length-1;c>=0;--c)a[c]=o*t[c]+s*e[c]+l*r[c]+u*n[c];return a}return o*t+s*e+l*r[c]+u*n}function i(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,u=(1+2*i)*l,c=i*l,h=s*(3-2*i),f=s*o;if(t.length){a||(a=new Array(t.length));for(var d=t.length-1;d>=0;--d)a[d]=u*t[d]+c*e[d]+h*r[d]+f*n[d];return a}return u*t+c*e+h*r+f*n}e.exports=i,e.exports.derivative=n},{}],102:[function(t,e,r){"use strict";function n(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function i(t){var e=new n;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var i=0;i0)throw new Error("cwise: pre() block may not reference array args");if(i0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)e.scalarArgs.push(i),e.shimArgs.push("scalar"+i);else if("index"===o){if(e.indexArgs.push(i),i0)throw new Error("cwise: pre() block may not reference array index");if(i0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(e.shapeArgs.push(i),ir.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,a(e)}var a=t("./lib/thunk.js");e.exports=i},{"./lib/thunk.js":104}],103:[function(t,e,r){"use strict";function n(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],u=[],c=0,h=0;for(n=0;n=0;--n)c=t[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",h,"]-=s",h].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function i(t,e,r,i){for(var a=e.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,u=[],c=0;c0;){"].join("")),u.push(["if(j",c,"<",s,"){"].join("")),u.push(["s",e[c],"=j",c].join("")),u.push(["j",c,"=0"].join("")),u.push(["}else{s",e[c],"=",s].join("")),u.push(["j",c,"-=",s,"}"].join("")),l&&u.push(["index[",e[c],"]=j",c].join(""));for(var c=0;c0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}function l(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,l=new Array(t.arrayArgs.length),c=new Array(t.arrayArgs.length),h=0;h0&&_.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var w=new Array(r),h=0;h3&&x.push(o(t.pre,t,c));var T=o(t.body,t,c),S=a(g);S3&&x.push(o(t.post,t,c)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+x.join("\n")+"\n----------");var E=[t.funcName||"unnamed","_cwise_loop_",l[0].join("s"),"m",S,s(c)].join("");return new Function(["function ",E,"(",b.join(","),"){",x.join("\n"),"} return ",E].join(""))()}var u=t("uniq");e.exports=l},{uniq:530}],104:[function(t,e,r){"use strict";function n(t){var e=["'use strict'","var CACHED={}"],r=[],n=t.funcName+"_cwise_thunk";e.push(["return function ",n,"(",t.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],l=[],u=[],c=0;c0&&(l.push("array"+t.arrayArgs[0]+".shape.length===array"+h+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[c]))),u.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+h+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[c])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),e.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}"));for(var c=0;c=M?i*=10:a>=k?i*=5:a>=A&&(i*=2),ee?1:t>=e?0:NaN},o=function(t){return 1===t.length&&(t=e(t)),{left:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}},s=o(a),l=s.right,u=s.left,c=function(t,e){null==e&&(e=r);for(var n=0,i=t.length-1,a=t[0],o=new Array(i<0?0:i);nt?1:e>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,e){var r,n,i=t.length,a=0,o=0,s=-1,l=0;if(null==e)for(;++s1)return o/(l-1)},m=function(t,e){var r=p(t,e);return r?Math.sqrt(r):r},g=function(t,e){var r,n,i,a=-1,o=t.length;if(null==e){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i=h;)f.pop(),--d;var p,m=new Array(d+1);for(i=0;i<=d;++i)p=m[i]=[],p.x0=i>0?f[i-1]:c,p.x1=i=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t);return o+(+r(t[a+1],a+1,t)-o)*(i-a)}},C=function(t,e,r){return t=b.call(t,d).sort(a),Math.ceil((r-e)/(2*(L(t,.75)-L(t,.25))*Math.pow(t.length,-1/3)))},z=function(t,e,r){return Math.ceil((r-e)/(3.5*m(t)*Math.pow(t.length,-1/3)))},D=function(t,e){var r,n,i=-1,a=t.length;if(null==e){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},I=function(t,e){var r,n=0,i=t.length,a=-1,o=i;if(null==e)for(;++a=0;)for(n=t[i],e=n.length;--e>=0;)r[--o]=n[e];return r},R=function(t,e){var r,n,i=-1,a=t.length;if(null==e){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},j=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},F=function(t,e){if(r=t.length){var r,n,i=0,o=0,s=t[o];for(e||(e=a);++i=c.length)return null!=l?l(e):null!=s?e.sort(s):e;for(var o,u,h,f=-1,d=e.length,p=c[n++],m=r(),g=i();++fc.length)return t;var n,i=h[r-1];return null!=l&&r>=c.length?n=t.entries():(n=[],t.each(function(t,i){n.push({key:i,values:e(t,r)})})),null!=i?n.sort(function(t,e){return i(t.key,e.key)}):n}var s,l,u,c=[],h=[];return u={object:function(e){return t(e,0,n,i)},map:function(e){return t(e,0,a,o)},entries:function(r){return e(t(r,0,a,o),0)},key:function(t){return c.push(t),u},sortKeys:function(t){return h[c.length-1]=t,u},sortValues:function(t){return s=t,u},rollup:function(t){return l=t,u}}},c=r.prototype;s.prototype=l.prototype={constructor:s,has:c.has,add:function(t){return t+="",this["$"+t]=t,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};var h=function(t){var e=[];for(var r in t)e.push(r);return e},f=function(t){var e=[];for(var r in t)e.push(t[r]);return e},d=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e};t.nest=u,t.set=l,t.map=r,t.keys=h,t.values=f,t.entries=d,Object.defineProperty(t,"__esModule",{value:!0})})},{}],108:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.d3=e.d3||{})}(this,function(t){"use strict";function e(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function r(){}function n(t){var e;return t=(t+"").trim().toLowerCase(),(e=z.exec(t))?(e=parseInt(e[1],16),new l(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=D.exec(t))?i(parseInt(e[1],16)):(e=I.exec(t))?new l(e[1],e[2],e[3],1):(e=P.exec(t))?new l(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=O.exec(t))?a(e[1],e[2],e[3],e[4]):(e=R.exec(t))?a(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=j.exec(t))?u(e[1],e[2]/100,e[3]/100,1):(e=F.exec(t))?u(e[1],e[2]/100,e[3]/100,e[4]):N.hasOwnProperty(t)?i(N[t]):"transparent"===t?new l(NaN,NaN,NaN,0):null}function i(t){return new l(t>>16&255,t>>8&255,255&t,1)}function a(t,e,r,n){return n<=0&&(t=e=r=NaN),new l(t,e,r,n)}function o(t){return t instanceof r||(t=n(t)),t?(t=t.rgb(),new l(t.r,t.g,t.b,t.opacity)):new l}function s(t,e,r,n){return 1===arguments.length?o(t):new l(t,e,r,null==n?1:n)}function l(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function u(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new f(t,e,r,n)}function c(t){if(t instanceof f)return new f(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=n(t)),!t)return new f;if(t instanceof f)return t;t=t.rgb();var e=t.r/255,i=t.g/255,a=t.b/255,o=Math.min(e,i,a),s=Math.max(e,i,a),l=NaN,u=s-o,c=(s+o)/2;return u?(l=e===s?(i-a)/u+6*(i0&&c<1?0:l,new f(l,u,c,t.opacity)}function h(t,e,r,n){return 1===arguments.length?c(t):new f(t,e,r,null==n?1:n)}function f(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function d(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function p(t){if(t instanceof g)return new g(t.l,t.a,t.b,t.opacity);if(t instanceof M){var e=t.h*B;return new g(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof l||(t=o(t));var r=x(t.r),n=x(t.g),i=x(t.b),a=v((.4124564*r+.3575761*n+.1804375*i)/V),s=v((.2126729*r+.7151522*n+.072175*i)/q);return new g(116*s-16,500*(a-s),200*(s-v((.0193339*r+.119192*n+.9503041*i)/H)),t.opacity)}function m(t,e,r,n){return 1===arguments.length?p(t):new g(t,e,r,null==n?1:n)}function g(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function v(t){return t>W?Math.pow(t,1/3):t/X+Y}function y(t){return t>G?t*t*t:X*(t-Y)}function b(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function x(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function _(t){if(t instanceof M)return new M(t.h,t.c,t.l,t.opacity);t instanceof g||(t=p(t));var e=Math.atan2(t.b,t.a)*U;return new M(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function w(t,e,r,n){return 1===arguments.length?_(t):new M(t,e,r,null==n?1:n)}function M(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function k(t){if(t instanceof T)return new T(t.h,t.s,t.l,t.opacity);t instanceof l||(t=o(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(rt*n+tt*e-et*r)/(rt+tt-et),a=n-i,s=($*(r-i)-K*a)/Q,u=Math.sqrt(s*s+a*a)/($*i*(1-i)),c=u?Math.atan2(s,a)*U-120:NaN;return new T(c<0?c+360:c,u,i,t.opacity)}function A(t,e,r,n){return 1===arguments.length?k(t):new T(t,e,r,null==n?1:n)}function T(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}var S=function(t,e,r){t.prototype=e.prototype=r,r.constructor=t},E="\\s*([+-]?\\d+)\\s*",L="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",C="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z=/^#([0-9a-f]{3})$/,D=/^#([0-9a-f]{6})$/,I=new RegExp("^rgb\\("+[E,E,E]+"\\)$"),P=new RegExp("^rgb\\("+[C,C,C]+"\\)$"),O=new RegExp("^rgba\\("+[E,E,E,L]+"\\)$"),R=new RegExp("^rgba\\("+[C,C,C,L]+"\\)$"),j=new RegExp("^hsl\\("+[L,C,C]+"\\)$"),F=new RegExp("^hsla\\("+[L,C,C,L]+"\\)$"),N={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};S(r,n,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),S(l,s,e(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new l(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new l(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),S(f,h,e(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new f(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new f(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new l(d(t>=240?t-240:t+120,i,n),d(t,i,n),d(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var B=Math.PI/180,U=180/Math.PI,V=.95047,q=1,H=1.08883,Y=4/29,G=6/29,X=3*G*G,W=G*G*G;S(g,m,e(r,{brighter:function(t){return new g(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new g(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return t=q*y(t),e=V*y(e),r=H*y(r),new l(b(3.2404542*e-1.5371385*t-.4985314*r),b(-.969266*e+1.8760108*t+.041556*r),b(.0556434*e-.2040259*t+1.0572252*r),this.opacity)}})),S(M,w,e(r,{brighter:function(t){return new M(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new M(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return p(this).rgb()}}));var Z=-.14861,J=1.78277,K=-.29227,Q=-.90649,$=1.97294,tt=$*Q,et=$*J,rt=J*K-Q*Z;S(T,A,e(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new T(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new T(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*B,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new l(255*(e+r*(Z*n+J*i)),255*(e+r*(K*n+Q*i)),255*(e+r*($*n)),this.opacity)}})),t.color=n,t.rgb=s,t.hsl=h,t.lab=m,t.hcl=w,t.cubehelix=A,Object.defineProperty(t,"__esModule",{value:!0})})},{}],109:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.d3=e.d3||{})}(this,function(t){"use strict";function e(){for(var t,e=0,n=arguments.length,i={};e=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}function i(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),a=0;af+s||np+s||ih.index){var l=f-a.x-a.vx,c=p-a.y-a.vy,v=l*l+c*c;vt.r&&(t.r=t[e].r)}function i(){if(s){var e,r,n=s.length;for(l=new Array(n),e=0;e1?(null==e?p.remove(t):p.set(t,s(e)),l):p.get(t)},find:function(e,r,n){var i,a,o,s,l,u=0,c=t.length;for(null==n?n=1/0:n*=n,u=0;u1?(y.on(t,e),l):y.on(t)}}},b=function(){function t(t){var r,l=a.length,h=e.quadtree(a,u,c).visitAfter(n);for(s=t,r=0;r=m)){(t.data!==o||t.next)&&(0===i&&(i=d(),c+=i*i),0===a&&(a=d(),c+=a*a),c180||r<-180?r-360*Math.round(r/360):r):S(isNaN(t)?e:t)}function o(t){return 1==(t=+t)?s:function(e,r){return r-e?i(e,r,t):S(isNaN(e)?r:e)}}function s(t,e){var r=e-t;return r?n(t,r):S(isNaN(t)?e:t)}function l(t){return function(r){var n,i,a=r.length,o=new Array(a),s=new Array(a),l=new Array(a);for(n=0;n180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:I(t,e)})):e&&r.push(i(r)+"rotate("+e+n)}function s(t,e,r,a){t!==e?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:I(t,e)}):e&&r.push(i(r)+"skewX("+e+n)}function l(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:I(t,r)},{i:s-2,x:I(e,n)})}else 1===r&&1===n||a.push(i(a)+"scale("+r+","+n+")")}return function(e,r){var n=[],i=[];return e=t(e),r=t(r),a(e.translateX,e.translateY,r.translateX,r.translateY,n,i),o(e.rotate,r.rotate,n,i),s(e.skewX,r.skewX,n,i),l(e.scaleX,e.scaleY,r.scaleX,r.scaleY,n,i),e=r=null,function(t){for(var e,r=-1,a=i.length;++r=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,l=ia&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:I(r,n)})),a=R.lastIndex;return a=(a=(m+v)/2))?m=a:v=a,(c=r>=(o=(g+y)/2))?g=o:y=o,i=d,!(d=d[h=c<<1|u]))return i[h]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&r===l)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(u=e>=(a=(m+v)/2))?m=a:v=a,(c=r>=(o=(g+y)/2))?g=o:y=o}while((h=c<<1|u)==(f=(l>=o)<<1|s>=a));return i[f]=d,i[h]=p,t}function r(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),u=1/0,c=1/0,h=-1/0,f=-1/0;for(n=0;nh&&(h=i),af&&(f=a));for(ht||t>i||n>e||e>a))return this;var o,s,l=i-r,u=this._root;switch(s=(e<(n+a)/2)<<1|t<(r+i)/2){case 0:do{o=new Array(4),o[s]=u,u=o}while(l*=2,i=r+l,a=n+l,t>i||e>a);break;case 1:do{o=new Array(4),o[s]=u,u=o}while(l*=2,r=i-l,a=n+l,r>t||e>a);break;case 2:do{o=new Array(4),o[s]=u,u=o}while(l*=2,i=r+l,n=a-l,t>i||n>e);break;case 3:do{o=new Array(4),o[s]=u,u=o}while(l*=2,r=i-l,n=a-l,r>t||n>e)}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},h=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},f=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},d=function(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i},p=function(t,e,r){var n,i,a,o,s,l,u,c=this._x0,h=this._y0,f=this._x1,p=this._y1,m=[],g=this._root;for(g&&m.push(new d(g,c,h,f,p)),null==r?r=1/0:(c=t-r,h=e-r,f=t+r,p=e+r,r*=r);l=m.pop();)if(!(!(g=l.node)||(i=l.x0)>f||(a=l.y0)>p||(o=l.x1)=y)<<1|t>=v)&&(l=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=l)}else{var b=t-+this._x.call(null,g.data),x=e-+this._y.call(null,g.data),_=b*b+x*x;if(_=(s=(p+g)/2))?p=s:g=s,(c=o>=(l=(m+v)/2))?m=l:v=l,e=d,!(d=d[h=c<<1|u]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(r=e,f=h)}for(;d.data!==t;)if(n=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,n?(i?n.next=i:delete n.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(r?r[f]=d:this._root=d),this):(this._root=i,this)},g=function(){return this._root},v=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},y=function(t){var e,r,n,i,a,o,s=[],l=this._root;for(l&&s.push(new d(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,n=e.x0,i=e.y0,a=e.x1,o=e.y1)&&l.length){var u=(n+a)/2,c=(i+o)/2;(r=l[3])&&s.push(new d(r,u,c,a,o)),(r=l[2])&&s.push(new d(r,n,c,u,o)),(r=l[1])&&s.push(new d(r,u,i,a,c)),(r=l[0])&&s.push(new d(r,n,i,u,c))}return this},b=function(t){var e,r=[],n=[];for(this._root&&r.push(new d(this._root,this._x0,this._y0,this._x1,this._y1));e=r.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,l=e.x1,u=e.y1,c=(o+l)/2,h=(s+u)/2;(a=i[0])&&r.push(new d(a,o,s,c,h)),(a=i[1])&&r.push(new d(a,c,s,l,h)),(a=i[2])&&r.push(new d(a,o,h,c,u)),(a=i[3])&&r.push(new d(a,c,h,l,u))}n.push(e)}for(;e=n.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},x=function(t){return arguments.length?(this._x=t,this):this._x},_=function(t){return arguments.length?(this._y=t,this):this._y},w=o.prototype=s.prototype;w.copy=function(){var t,e,r=new s(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=l(n),r;for(t=[{source:n,target:r._root=new Array(4)}];n=t.pop();)for(var i=0;i<4;++i)(e=n.source[i])&&(e.length?t.push({source:e,target:n.target[i]=new Array(4)}):n.target[i]=l(e));return r},w.add=u,w.addAll=r,w.cover=c,w.data=h,w.extent=f,w.find=p,w.remove=m,w.removeAll=n,w.root=g,w.size=v,w.visit=y,w.visitAfter=b,w.x=x,w.y=_,t.quadtree=o,Object.defineProperty(t,"__esModule",{value:!0})})},{}],113:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.d3=e.d3||{})}(this,function(t){"use strict";function e(){return v||(x(r),v=b.now()+y)}function r(){v=0}function n(){this._call=this._time=this._next=null}function i(t,e,r){var i=new n;return i.restart(t,e,r),i}function a(){e(),++f;for(var t,r=c;r;)(t=v-r._time)>=0&&r._call.call(null,t),r=r._next;--f}function o(){v=(g=b.now())+y,f=d=0;try{a()}finally{f=0,l(),v=0}}function s(){var t=b.now(),e=t-g;e>m&&(y-=e,g=t)}function l(){for(var t,e,r=c,n=1/0;r;)r._call?(n>r._time&&(n=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:c=e);h=t,u(n)}function u(t){if(!f){d&&(d=clearTimeout(d));var e=t-v;e>24?(t<1/0&&(d=setTimeout(o,e)),p&&(p=clearInterval(p))):(p||(g=v,p=setInterval(s,m)),f=1,x(o))}}var c,h,f=0,d=0,p=0,m=1e3,g=0,v=0,y=0,b="object"==typeof performance&&performance.now?performance:Date,x="function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){setTimeout(t,17)};n.prototype=i.prototype={constructor:n,restart:function(t,r,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?e():+n)+(null==r?0:+r),this._next||h===this||(h?h._next=this:c=this,h=this),this._call=t,this._time=n,u()},stop:function(){this._call&&(this._call=null,this._time=1/0,u())}};var _=function(t,e,r){var i=new n;return e=null==e?0:+e,i.restart(function(r){i.stop(),t(r+e)},e,r),i},w=function(t,r,i){var a=new n,o=r;return null==r?(a.restart(t,r,i),a):(r=+r,i=null==i?e():+i,a.restart(function e(n){n+=o,a.restart(e,o+=r,i),t(n)},r,i),a)};t.now=e,t.timer=i,t.timerFlush=a,t.timeout=_,t.interval=w,Object.defineProperty(t,"__esModule",{value:!0})})},{}],114:[function(e,r,n){!function(){function e(t){return t&&(t.ownerDocument||t.document||t).documentElement}function n(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function i(t,e){return te?1:t>=e?0:NaN}function a(t){return null===t?NaN:+t}function o(t){return!isNaN(t)}function s(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}function l(t){return t.length}function u(t){for(var e=1;t*e%1;)e*=10;return e}function c(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function h(){this._=Object.create(null)}function f(t){return(t+="")===_o||t[0]===wo?wo+t:t}function d(t){return(t+="")[0]===wo?t.slice(1):t}function p(t){return f(t)in this._}function m(t){return(t=f(t))in this._&&delete this._[t]}function g(){var t=[];for(var e in this._)t.push(d(e));return t}function v(){var t=0;for(var e in this._)++t;return t}function y(){for(var t in this._)return!1;return!0}function b(){this._=Object.create(null)}function x(t){return t}function _(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function w(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=Mo.length;r=e&&(e=i+1);!(o=s[e])&&++e0&&(t=t.slice(0,s));var u=Io.get(t);return u&&(t=u,l=J),s?e?i:n:e?M:a}function Z(t,e){return function(r){var n=uo.event;uo.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{uo.event=n}}}function J(t,e){var r=Z(t,e);return function(t){var e=this,n=t.relatedTarget;n&&(n===e||8&n.compareDocumentPosition(e))||r.call(e,t)}}function K(t){var r=".dragsuppress-"+ ++Oo,i="click"+r,a=uo.select(n(t)).on("touchmove"+r,T).on("dragstart"+r,T).on("selectstart"+r,T);if(null==Po&&(Po=!("onselectstart"in t)&&w(t.style,"userSelect")),Po){var o=e(t).style,s=o[Po];o[Po]="none"}return function(t){if(a.on(r,null),Po&&(o[Po]=s),t){var e=function(){a.on(i,null)};a.on(i,function(){T(),e()},!0),setTimeout(e,0)}}}function Q(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(Ro<0){var a=n(t);if(a.scrollX||a.scrollY){r=uo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Ro=!(o.f||o.e),r.remove()}}return Ro?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function $(){return uo.event.changedTouches[0].identifier}function tt(t){return t>0?1:t<0?-1:0}function et(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function rt(t){return t>1?0:t<-1?No:Math.acos(t)}function nt(t){return t>1?Vo:t<-1?-Vo:Math.asin(t)}function it(t){return((t=Math.exp(t))-1/t)/2}function at(t){return((t=Math.exp(t))+1/t)/2}function ot(t){return((t=Math.exp(2*t))-1)/(t+1)}function st(t){return(t=Math.sin(t/2))*t}function lt(){}function ut(t,e,r){return this instanceof ut?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof ut?new ut(t.h,t.s,t.l):Mt(""+t,kt,ut):new ut(t,e,r)}function ct(t,e,r){function n(t){return t>360?t-=360:t<0&&(t+=360),t<60?a+(o-a)*t/60:t<180?o:t<240?a+(o-a)*(240-t)/60:a}function i(t){return Math.round(255*n(t))}var a,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,r=r<0?0:r>1?1:r,o=r<=.5?r*(1+e):r+e-r*e,a=2*r-o,new bt(i(t+120),i(t),i(t-120))}function ht(t,e,r){return this instanceof ht?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof ht?new ht(t.h,t.c,t.l):t instanceof dt?mt(t.l,t.a,t.b):mt((t=At((t=uo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ht(t,e,r)}function ft(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new dt(r,Math.cos(t*=qo)*e,Math.sin(t)*e)}function dt(t,e,r){return this instanceof dt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof dt?new dt(t.l,t.a,t.b):t instanceof ht?ft(t.h,t.c,t.l):At((t=bt(t)).r,t.g,t.b):new dt(t,e,r)}function pt(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return i=gt(i)*Qo,n=gt(n)*$o,a=gt(a)*ts,new bt(yt(3.2404542*i-1.5371385*n-.4985314*a),yt(-.969266*i+1.8760108*n+.041556*a),yt(.0556434*i-.2040259*n+1.0572252*a))}function mt(t,e,r){return t>0?new ht(Math.atan2(r,e)*Ho,Math.sqrt(e*e+r*r),t):new ht(NaN,NaN,t)}function gt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function vt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function yt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function bt(t,e,r){return this instanceof bt?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof bt?new bt(t.r,t.g,t.b):Mt(""+t,bt,ct):new bt(t,e,r)}function xt(t){return new bt(t>>16,t>>8&255,255&t)}function _t(t){return xt(t)+""}function wt(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function Mt(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(St(i[0]),St(i[1]),St(i[2]))}return(a=ns.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function kt(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e0&&l<1?0:n),new ut(n,i,l)}function At(t,e,r){t=Tt(t),e=Tt(e),r=Tt(r);var n=vt((.4124564*t+.3575761*e+.1804375*r)/Qo),i=vt((.2126729*t+.7151522*e+.072175*r)/$o);return dt(116*i-16,500*(n-i),200*(i-vt((.0193339*t+.119192*e+.9503041*r)/ts)))}function Tt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function St(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Et(t){return"function"==typeof t?t:function(){return t}}function Lt(t){return function(e,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),Ct(e,r,t,n)}}function Ct(t,e,r,n){function i(){var t,e=l.status;if(!e&&Dt(l)||e>=200&&e<300||304===e){try{t=r.call(a,l)}catch(t){return void o.error.call(a,t)}o.load.call(a,t)}else o.error.call(a,l)}var a={},o=uo.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(t){var e=uo.event;uo.event=t;try{o.progress.call(a,l)}finally{uo.event=e}},a.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==e?delete s[t]:s[t]=e+"",a)},a.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",a):e},a.responseType=function(t){return arguments.length?(u=t,a):u},a.response=function(t){return r=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(ho(arguments)))}}),a.send=function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),l.open(r,t,!0),null==e||"accept"in s||(s.accept=e+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=u&&(l.responseType=u),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),o.beforesend.call(a,l),l.send(null==n?null:n),a},a.abort=function(){return l.abort(),a},uo.rebind(a,o,"on"),null==n?a:a.get(zt(n))}function zt(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}function Dt(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function It(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i=r+e,a={c:t,t:i,n:null};return as?as.n=a:is=a,as=a,os||(ss=clearTimeout(ss),os=1,ls(Pt)),a}function Pt(){var t=Ot(),e=Rt()-t;e>24?(isFinite(e)&&(clearTimeout(ss),ss=setTimeout(Pt,e)),os=0):(os=1,ls(Pt))}function Ot(){for(var t=Date.now(),e=is;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Rt(){for(var t,e=is,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}}function Nt(t){var e=t.decimal,r=t.thousands,n=t.grouping,i=t.currency,a=n&&r?function(t,e){for(var i=t.length,a=[],o=0,s=n[0],l=0;i>0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>e));)s=n[o=(o+1)%n.length];return a.reverse().join(r)}:x;return function(t){ -var r=cs.exec(t),n=r[1]||" ",o=r[2]||">",s=r[3]||"-",l=r[4]||"",u=r[5],c=+r[6],h=r[7],f=r[8],d=r[9],p=1,m="",g="",v=!1,y=!0;switch(f&&(f=+f.substring(1)),(u||"0"===n&&"="===o)&&(u=n="0",o="="),d){case"n":h=!0,d="g";break;case"%":p=100,g="%",d="f";break;case"p":p=100,g="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(m="0"+d.toLowerCase());case"c":y=!1;case"d":v=!0,f=0;break;case"s":p=-1,d="r"}"$"===l&&(m=i[0],g=i[1]),"r"!=d||f||(d="g"),null!=f&&("g"==d?f=Math.max(1,Math.min(21,f)):"e"!=d&&"f"!=d||(f=Math.max(0,Math.min(20,f)))),d=hs.get(d)||Bt;var b=u&&h;return function(t){var r=g;if(v&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===s?"":s;if(p<0){var l=uo.formatPrefix(t,f);t=l.scale(t),r=l.symbol+g}else t*=p;t=d(t,f);var x,_,w=t.lastIndexOf(".");if(w<0){var M=y?t.lastIndexOf("e"):-1;M<0?(x=t,_=""):(x=t.substring(0,M),_=t.substring(M))}else x=t.substring(0,w),_=e+t.substring(w+1);!u&&h&&(x=a(x,1/0));var k=m.length+x.length+_.length+(b?0:i.length),A=k"===o?A+i+t:"^"===o?A.substring(0,k>>=1)+i+t+A.substring(k):i+(b?t:A+t))+r}}}function Bt(t){return t+""}function Ut(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Vt(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r1)for(;o=u)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=L[o in ms?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}function n(t,e,r){w.lastIndex=0;var n=w.exec(e.slice(r));return n?(t.w=M.get(n[0].toLowerCase()),r+n[0].length):-1}function i(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.w=_.get(n[0].toLowerCase()),r+n[0].length):-1}function a(t,e,r){T.lastIndex=0;var n=T.exec(e.slice(r));return n?(t.m=S.get(n[0].toLowerCase()),r+n[0].length):-1}function o(t,e,r){k.lastIndex=0;var n=k.exec(e.slice(r));return n?(t.m=A.get(n[0].toLowerCase()),r+n[0].length):-1}function s(t,e,n){return r(t,E.c.toString(),e,n)}function l(t,e,n){return r(t,E.x.toString(),e,n)}function u(t,e,n){return r(t,E.X.toString(),e,n)}function c(t,e,r){var n=b.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)}var h=t.dateTime,f=t.date,d=t.time,p=t.periods,m=t.days,g=t.shortDays,v=t.months,y=t.shortMonths;e.utc=function(t){function r(t){try{ds=Ut;var e=new ds;return e._=t,n(e)}finally{ds=Date}}var n=e(t);return r.parse=function(t){try{ds=Ut;var e=n.parse(t);return e&&e._}finally{ds=Date}},r.toString=n.toString,r},e.multi=e.utc.multi=ce;var b=uo.map(),x=Gt(m),_=Xt(m),w=Gt(g),M=Xt(g),k=Gt(v),A=Xt(v),T=Gt(y),S=Xt(y);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var E={a:function(t){return g[t.getDay()]},A:function(t){return m[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return v[t.getMonth()]},c:e(h),d:function(t,e){return Yt(t.getDate(),e,2)},e:function(t,e){return Yt(t.getDate(),e,2)},H:function(t,e){return Yt(t.getHours(),e,2)},I:function(t,e){return Yt(t.getHours()%12||12,e,2)},j:function(t,e){return Yt(1+fs.dayOfYear(t),e,3)},L:function(t,e){return Yt(t.getMilliseconds(),e,3)},m:function(t,e){return Yt(t.getMonth()+1,e,2)},M:function(t,e){return Yt(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Yt(t.getSeconds(),e,2)},U:function(t,e){return Yt(fs.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Yt(fs.mondayOfYear(t),e,2)},x:e(f),X:e(d),y:function(t,e){return Yt(t.getFullYear()%100,e,2)},Y:function(t,e){return Yt(t.getFullYear()%1e4,e,4)},Z:le,"%":function(){return"%"}},L={a:n,A:i,b:a,B:o,c:s,d:re,e:re,H:ie,I:ie,j:ne,L:se,m:ee,M:ae,p:c,S:oe,U:Zt,w:Wt,W:Jt,x:l,X:u,y:Qt,Y:Kt,Z:$t,"%":ue};return e}function Yt(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a68?1900:2e3)}function ee(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function re(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function ne(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function ie(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function ae(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function oe(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function se(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function le(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=xo(e)/60|0,i=xo(e)%60;return r+Yt(n,"0",2)+Yt(i,"0",2)}function ue(t,e,r){vs.lastIndex=0;var n=vs.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function ce(t){for(var e=t.length,r=-1;++r=0?1:-1,s=o*r,l=Math.cos(e),u=Math.sin(e),c=a*u,h=i*l+c*Math.cos(s),f=c*o*Math.sin(s);Ms.add(Math.atan2(f,h)),n=t,i=l,a=u}var e,r,n,i,a;ks.point=function(o,s){ks.point=t,n=(e=o)*qo,i=Math.cos(s=(r=s)*qo/2+No/4),a=Math.sin(s)},ks.lineEnd=function(){t(e,r)}}function ve(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function ye(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function be(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function xe(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _e(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function we(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Me(t){return[Math.atan2(t[1],t[0]),nt(t[2])]}function ke(t,e){return xo(t[0]-e[0])=0;--s)i.point((h=c[s])[0],h[1])}else n(d.x,d.p.x,-1,i);d=d.p}d=d.o,c=d.z,p=!p}while(!d.v);i.lineEnd()}}}function Ie(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n0){for(_||(a.polygonStart(),_=!0),a.lineStart();++o1&&2&e&&r.push(r.pop().concat(r.shift())),d.push(r.filter(Re))}var d,p,m,g=e(a),v=i.invert(n[0],n[1]),y={point:o,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=h,y.lineEnd=f,d=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=l,y.lineEnd=u,d=uo.merge(d);var t=Ve(v,p);d.length?(_||(a.polygonStart(),_=!0),De(d,Fe,t,r,a)):t&&(_||(a.polygonStart(),_=!0),a.lineStart(),r(null,null,1,a),a.lineEnd()),_&&(a.polygonEnd(),_=!1),d=p=null},sphere:function(){a.polygonStart(),a.lineStart(),r(null,null,1,a),a.lineEnd(),a.polygonEnd()}},b=je(),x=e(b),_=!1;return y}}function Re(t){return t.length>1}function je(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:M,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Fe(t,e){return((t=t.x)[0]<0?t[1]-Vo-jo:Vo-t[1])-((e=e.x)[0]<0?e[1]-Vo-jo:Vo-e[1])}function Ne(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?No:-No,l=xo(a-r);xo(l-No)0?Vo:-Vo),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=No&&(xo(r-i)jo?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}function Ue(t,e,r,n){var i;if(null==t)i=r*Vo,n.point(-No,i),n.point(0,i),n.point(No,i),n.point(No,0),n.point(No,-i),n.point(0,-i),n.point(-No,-i),n.point(-No,0),n.point(-No,i);else if(xo(t[0]-e[0])>jo){var a=t[0]=0?1:-1,M=w*_,k=M>No,A=p*b;if(Ms.add(Math.atan2(A*w*Math.sin(M),m*x+A*Math.cos(M))),a+=k?_+w*Bo:_,k^f>=r^v>=r){var T=be(ve(h),ve(t));we(T);var S=be(i,T);we(S);var E=(k^_>=0?-1:1)*nt(S[2]);(n>E||n===E&&(T[0]||T[1]))&&(o+=k^_>=0?1:-1)}if(!g++)break;f=v,p=b,m=x,h=t}}return(a<-jo||aa}function r(t){var r,a,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(h,f){var d,p=[h,f],m=e(h,f),g=o?m?0:i(h,f):m?i(h+(h<0?No:-No),f):0;if(!r&&(u=l=m)&&t.lineStart(),m!==l&&(d=n(r,p),(ke(r,d)||ke(p,d))&&(p[0]+=jo,p[1]+=jo,m=e(p[0],p[1]))),m!==l)c=0,m?(t.lineStart(),d=n(p,r),t.point(d[0],d[1])):(d=n(r,p),t.point(d[0],d[1]),t.lineEnd()),r=d;else if(s&&r&&o^m){var v;g&a||!(v=n(p,r,!0))||(c=0,o?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||r&&ke(r,p)||t.point(p[0],p[1]),r=p,l=m,a=g},lineEnd:function(){l&&t.lineEnd(),r=null},clean:function(){return c|(u&&l)<<1}}}function n(t,e,r){var n=ve(t),i=ve(e),o=[1,0,0],s=be(n,i),l=ye(s,s),u=s[0],c=l-u*u;if(!c)return!r&&t;var h=a*l/c,f=-a*u/c,d=be(o,s),p=_e(o,h);xe(p,_e(s,f));var m=d,g=ye(p,m),v=ye(m,m),y=g*g-v*(ye(p,p)-1);if(!(y<0)){var b=Math.sqrt(y),x=_e(m,(-g-b)/v);if(xe(x,p),x=Me(x),!r)return x;var _,w=t[0],M=e[0],k=t[1],A=e[1];M0^x[1]<(xo(x[0]-w)No^(w<=x[0]&&x[0]<=M)){var L=_e(m,(-g+b)/v);return xe(L,p),[x,Me(L)]}}}function i(e,r){var n=o?t:No-t,i=0;return e<-n?i|=1:e>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}var a=Math.cos(t),o=a>0,s=xo(a)>jo;return Oe(e,r,gr(t,6*qo),o?[0,-t]:[-No,t-No])}function He(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,u=o.y,c=s.x,h=s.y,f=0,d=1,p=c-l,m=h-u;if(a=t-l,p||!(a>0)){if(a/=p,p<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>d)return;a>f&&(f=a)}else if(p>0){if(a0)){if(a/=m,m<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=n-u,m||!(a<0)){if(a/=m,m<0){if(a>d)return;a>f&&(f=a)}else if(m>0){if(a0&&(i.a={x:l+f*p,y:u+f*m}),d<1&&(i.b={x:l+d*p,y:u+d*m}),i}}}}}}function Ye(t,e,r,n){function i(n,i){return xo(n[0]-t)0?0:3:xo(n[0]-r)0?2:1:xo(n[1]-e)0?1:0:i>0?3:2}function a(t,e){return o(t.x,e.x)}function o(t,e){var r=i(t,1),n=i(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(s){function l(t){for(var e=0,r=g.length,n=t[1],i=0;in&&et(u,a,t)>0&&++e:a[1]<=n&&et(u,a,t)<0&&--e,u=a;return 0!==e}function u(a,s,l,u){var c=0,h=0;if(null==a||(c=i(a,l))!==(h=i(s,l))||o(a,s)<0^l>0)do{u.point(0===c||3===c?t:r,c>1?n:e)}while((c=(c+l+4)%4)!==h);else u.point(s[0],s[1])}function c(i,a){return t<=i&&i<=r&&e<=a&&a<=n}function h(t,e){c(t,e)&&s.point(t,e)}function f(){L.point=p,g&&g.push(v=[]),k=!0,M=!1,_=w=NaN}function d(){m&&(p(y,b),x&&M&&S.rejoin(),m.push(S.buffer())),L.point=h,M&&s.lineEnd()}function p(t,e){t=Math.max(-Fs,Math.min(Fs,t)),e=Math.max(-Fs,Math.min(Fs,e));var r=c(t,e);if(g&&v.push([t,e]),k)y=t,b=e,x=r,k=!1,r&&(s.lineStart(),s.point(t,e));else if(r&&M)s.point(t,e);else{var n={a:{x:_,y:w},b:{x:t,y:e}};E(n)?(M||(s.lineStart(),s.point(n.a.x,n.a.y)),s.point(n.b.x,n.b.y),r||s.lineEnd(),A=!1):r&&(s.lineStart(),s.point(t,e),A=!1)}_=t,w=e,M=r}var m,g,v,y,b,x,_,w,M,k,A,T=s,S=je(),E=He(t,e,r,n),L={point:h,lineStart:f,lineEnd:d,polygonStart:function(){s=S,m=[],g=[],A=!0},polygonEnd:function(){s=T,m=uo.merge(m);var e=l([t,n]),r=A&&e,i=m.length;(r||i)&&(s.polygonStart(),r&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),i&&De(m,a,e,u,s),s.polygonEnd()),m=g=v=null}};return L}}function Ge(t){var e=0,r=No/3,n=lr(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*No/180,r=t[1]*No/180):[e/No*180,r/No*180]},i}function Xe(t,e){function r(t,e){var r=Math.sqrt(a-2*i*Math.sin(e))/i;return[r*Math.sin(t*=i),o-r*Math.cos(t)]}var n=Math.sin(t),i=(n+Math.sin(e))/2,a=1+n*(2*i-n),o=Math.sqrt(a)/i;return r.invert=function(t,e){var r=o-e;return[Math.atan2(t,r)/i,nt((a-(t*t+r*r)*i*i)/(2*i))]},r}function We(){function t(t,e){Bs+=i*t-n*e,n=t,i=e}var e,r,n,i;Ys.point=function(a,o){Ys.point=t,e=n=a,r=i=o},Ys.lineEnd=function(){t(e,r)}}function Ze(t,e){tqs&&(qs=t),eHs&&(Hs=e)}function Je(){function t(t,e){o.push("M",t,",",e,a)}function e(t,e){o.push("M",t,",",e),s.point=r}function r(t,e){o.push("L",t,",",e)}function n(){s.point=t}function i(){o.push("Z")}var a=Ke(4.5),o=[],s={point:t,lineStart:function(){s.point=e},lineEnd:n,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=n,s.point=t},pointRadius:function(t){return a=Ke(t),s},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return s}function Ke(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Qe(t,e){Ss+=t,Es+=e,++Ls}function $e(){function t(t,n){var i=t-e,a=n-r,o=Math.sqrt(i*i+a*a);Cs+=o*(e+t)/2,zs+=o*(r+n)/2,Ds+=o,Qe(e=t,r=n)}var e,r;Xs.point=function(n,i){Xs.point=t,Qe(e=n,r=i)}}function tr(){Xs.point=Qe}function er(){function t(t,e){var r=t-n,a=e-i,o=Math.sqrt(r*r+a*a);Cs+=o*(n+t)/2,zs+=o*(i+e)/2,Ds+=o,o=i*t-n*e,Is+=o*(n+t),Ps+=o*(i+e),Os+=3*o,Qe(n=t,i=e)}var e,r,n,i;Xs.point=function(a,o){Xs.point=t,Qe(e=n=a,r=i=o)},Xs.lineEnd=function(){t(e,r)}}function rr(t){function e(e,r){t.moveTo(e+o,r),t.arc(e,r,o,0,Bo)}function r(e,r){t.moveTo(e,r),s.point=n}function n(e,r){t.lineTo(e,r)}function i(){s.point=e}function a(){t.closePath()}var o=4.5,s={point:e,lineStart:function(){s.point=r},lineEnd:i,polygonStart:function(){s.lineEnd=a},polygonEnd:function(){s.lineEnd=i,s.point=e},pointRadius:function(t){return o=t,s},result:M};return s}function nr(t){function e(t){return(s?n:r)(t)}function r(e){return or(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})}function n(e){function r(r,n){r=t(r,n),e.point(r[0],r[1])}function n(){b=NaN,k.point=a,e.lineStart()}function a(r,n){var a=ve([r,n]),o=t(r,n);i(b,x,y,_,w,M,b=o[0],x=o[1],y=r,_=a[0],w=a[1],M=a[2],s,e),e.point(b,x)}function o(){k.point=r,e.lineEnd()}function l(){n(),k.point=u,k.lineEnd=c}function u(t,e){a(h=t,f=e),d=b,p=x,m=_,g=w,v=M,k.point=a}function c(){i(b,x,y,_,w,M,d,p,h,m,g,v,s,e),k.lineEnd=o,o()}var h,f,d,p,m,g,v,y,b,x,_,w,M,k={point:r,lineStart:n,lineEnd:o,polygonStart:function(){e.polygonStart(),k.lineStart=l},polygonEnd:function(){e.polygonEnd(),k.lineStart=n}};return k}function i(e,r,n,s,l,u,c,h,f,d,p,m,g,v){var y=c-e,b=h-r,x=y*y+b*b;if(x>4*a&&g--){var _=s+d,w=l+p,M=u+m,k=Math.sqrt(_*_+w*w+M*M),A=Math.asin(M/=k),T=xo(xo(M)-1)a||xo((y*C+b*z)/x-.5)>.3||s*d+l*p+u*m0&&16,e):Math.sqrt(a)},e}function ir(t){var e=nr(function(e,r){return t([e*Ho,r*Ho])});return function(t){return ur(e(t))}}function ar(t){this.stream=t}function or(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function sr(t){return lr(function(){return t})()}function lr(t){function e(t){return t=s(t[0]*qo,t[1]*qo),[t[0]*f+l,u-t[1]*f]}function r(t){return(t=s.invert((t[0]-l)/f,(u-t[1])/f))&&[t[0]*Ho,t[1]*Ho]}function n(){s=Ce(o=fr(v,y,b),a);var t=a(m,g);return l=d-t[0]*f,u=p+t[1]*f,i()}function i(){return c&&(c.valid=!1,c=null),e}var a,o,s,l,u,c,h=nr(function(t,e){return t=a(t,e),[t[0]*f+l,u-t[1]*f]}),f=150,d=480,p=250,m=0,g=0,v=0,y=0,b=0,_=js,w=x,M=null,k=null;return e.stream=function(t){return c&&(c.valid=!1),c=ur(_(o,h(w(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(_=null==t?(M=t,js):qe((M=+t)*qo),i()):M},e.clipExtent=function(t){return arguments.length?(k=t,w=t?Ye(t[0][0],t[0][1],t[1][0],t[1][1]):x,i()):k},e.scale=function(t){return arguments.length?(f=+t,n()):f},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],n()):[d,p]},e.center=function(t){return arguments.length?(m=t[0]%360*qo,g=t[1]%360*qo,n()):[m*Ho,g*Ho]},e.rotate=function(t){return arguments.length?(v=t[0]%360*qo,y=t[1]%360*qo,b=t.length>2?t[2]%360*qo:0,n()):[v*Ho,y*Ho,b*Ho]},uo.rebind(e,h,"precision"),function(){return a=t.apply(this,arguments),e.invert=a.invert&&r,n()}}function ur(t){return or(t,function(e,r){t.point(e*qo,r*qo)})}function cr(t,e){return[t,e]}function hr(t,e){return[t>No?t-Bo:t<-No?t+Bo:t,e]}function fr(t,e,r){return t?e||r?Ce(pr(t),mr(e,r)):pr(t):e||r?mr(e,r):hr}function dr(t){return function(e,r){return e+=t,[e>No?e-Bo:e<-No?e+Bo:e,r]}}function pr(t){var e=dr(t);return e.invert=dr(-t),e}function mr(t,e){function r(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,u=Math.sin(e),c=u*n+s*i;return[Math.atan2(l*a-c*o,s*n-u*i),nt(c*a+l*o)]}var n=Math.cos(t),i=Math.sin(t),a=Math.cos(e),o=Math.sin(e);return r.invert=function(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,u=Math.sin(e),c=u*a-l*o;return[Math.atan2(l*a+u*o,s*n+c*i),nt(c*n-s*i)]},r}function gr(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=vr(r,i),a=vr(r,a),(o>0?ia)&&(i+=o*Bo)):(i=t+o*Bo,a=t-.5*l);for(var u,c=i;o>0?c>a:c0?e<-Vo+jo&&(e=-Vo+jo):e>Vo-jo&&(e=Vo-jo);var r=o/Math.pow(i(e),a);return[r*Math.sin(a*t),o-r*Math.cos(a*t)]}var n=Math.cos(t),i=function(t){return Math.tan(No/4+t/2)},a=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(i(e)/i(t)),o=n*Math.pow(i(t),a)/a;return a?(r.invert=function(t,e){var r=o-e,n=tt(a)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/a,2*Math.atan(Math.pow(o/n,1/a))-Vo]},r):Sr}function Tr(t,e){function r(t,e){var r=a-e;return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}var n=Math.cos(t),i=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),a=n/i+t;return xo(i)1&&et(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function Ir(t,e){return t[0]-e[0]||t[1]-e[1]}function Pr(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function Or(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],u=r[1],c=e[1]-l,h=n[1]-u,f=(s*(l-u)-h*(i-a))/(h*o-s*c);return[i+f*o,l+f*c]}function Rr(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}function jr(){an(this),this.edge=this.site=this.circle=null}function Fr(t){var e=sl.pop()||new jr;return e.site=t,e}function Nr(t){Zr(t),il.remove(t),sl.push(t),an(t)}function Br(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];Nr(t);for(var l=a;l.circle&&xo(r-l.circle.x)jo)s=s.L;else{if(!((i=a-qr(s,o))>jo)){n>-jo?(e=s.P,r=s):i>-jo?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=Fr(t);if(il.insert(e,l),e||r){if(e===r)return Zr(e),r=Fr(e.site),il.insert(l,r),l.edge=r.edge=$r(e.site,l.site),Wr(e),void Wr(r);if(!r)return void(l.edge=$r(e.site,l.site));Zr(e),Zr(r);var u=e.site,c=u.x,h=u.y,f=t.x-c,d=t.y-h,p=r.site,m=p.x-c,g=p.y-h,v=2*(f*g-d*m),y=f*f+d*d,b=m*m+g*g,x={x:(g*y-d*b)/v+c,y:(f*b-m*y)/v+h};en(r.edge,u,p,x),l.edge=$r(u,t,null,x),r.edge=$r(t,p,null,x),Wr(e),Wr(r)}}function Vr(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;r=o.site;var s=r.x,l=r.y,u=l-e;if(!u)return s;var c=s-n,h=1/a-1/u,f=c/u;return h?(-f+Math.sqrt(f*f-2*h*(c*c/(-2*u)-l+u/2+i-a/2)))/h+n:(n+s)/2}function qr(t,e){var r=t.N;if(r)return Vr(r,e);var n=t.site;return n.y===e?n.x:1/0}function Hr(t){this.site=t,this.edges=[]}function Yr(t){for(var e,r,n,i,a,o,s,l,u,c,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],m=nl,g=m.length;g--;)if((a=m[g])&&a.prepare())for(s=a.edges,l=s.length,o=0;ojo||xo(i-r)>jo)&&(s.splice(o,0,new rn(tn(a.site,c,xo(n-h)jo?{x:h,y:xo(e-h)jo?{x:xo(r-p)jo?{x:f,y:xo(e-f)jo?{x:xo(r-d)=-Fo)){var d=l*l+u*u,p=c*c+h*h,m=(h*d-u*p)/f,g=(l*p-c*d)/f,h=g+s,v=ll.pop()||new Xr;v.arc=t,v.site=i,v.x=m+o,v.y=h+Math.sqrt(m*m+g*g),v.cy=h,t.circle=v;for(var y=null,b=ol._;b;)if(v.y=s)return;if(f>p){if(a){if(a.y>=u)return}else a={x:g,y:l};r={x:g,y:u}}else{if(a){if(a.y1)if(f>p){if(a){if(a.y>=u)return}else a={x:(l-i)/n,y:l};r={x:(u-i)/n,y:u}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.xa||h>o||f=x,M=r>=_,k=M<<1|w,A=k+4;ka&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o, -x:bn(r,n)})),a=hl.lastIndex;return a=0&&!(r=uo.interpolators[n](t,e)););return r}function wn(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1?1:t(e)}}function kn(t){return function(e){return 1-t(1-e)}}function An(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Tn(t){return t*t}function Sn(t){return t*t*t}function En(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Ln(t){return function(e){return Math.pow(e,t)}}function Cn(t){return 1-Math.cos(t*Vo)}function zn(t){return Math.pow(2,10*(t-1))}function Dn(t){return 1-Math.sqrt(1-t*t)}function In(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/Bo*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Bo/e)}}function Pn(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function On(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Rn(t,e){t=uo.hcl(t),e=uo.hcl(e);var r=t.h,n=t.c,i=t.l,a=e.h-r,o=e.c-n,s=e.l-i;return isNaN(o)&&(o=0,n=isNaN(n)?e.c:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return ft(r+a*t,n+o*t,i+s*t)+""}}function jn(t,e){t=uo.hsl(t),e=uo.hsl(e);var r=t.h,n=t.s,i=t.l,a=e.h-r,o=e.s-n,s=e.l-i;return isNaN(o)&&(o=0,n=isNaN(n)?e.s:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return ct(r+a*t,n+o*t,i+s*t)+""}}function Fn(t,e){t=uo.lab(t),e=uo.lab(e);var r=t.l,n=t.a,i=t.b,a=e.l-r,o=e.a-n,s=e.b-i;return function(t){return pt(r+a*t,n+o*t,i+s*t)+""}}function Nn(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Bn(t){var e=[t.a,t.b],r=[t.c,t.d],n=Vn(e),i=Un(e,r),a=Vn(qn(r,e,-i))||0;e[0]*r[1]180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Hn(r)+"rotate(",null,")")-2,x:bn(t,e)})):e&&r.push(Hn(r)+"rotate("+e+")")}function Xn(t,e,r,n){t!==e?n.push({i:r.push(Hn(r)+"skewX(",null,")")-2,x:bn(t,e)}):e&&r.push(Hn(r)+"skewX("+e+")")}function Wn(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(Hn(r)+"scale(",null,",",null,")");n.push({i:i-4,x:bn(t[0],e[0])},{i:i-2,x:bn(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Hn(r)+"scale("+e+")")}function Zn(t,e){var r=[],n=[];return t=uo.transform(t),e=uo.transform(e),Yn(t.translate,e.translate,r,n),Gn(t.rotate,e.rotate,r,n),Xn(t.skew,e.skew,r,n),Wn(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,a=n.length;++i=0;)r.push(i[n])}function li(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++oi&&(n=r,i=e);return n}function bi(t){return t.reduce(xi,0)}function xi(t,e){return t+e[1]}function _i(t,e){return wi(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wi(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Mi(t){return[uo.min(t),uo.max(t)]}function ki(t,e){return t.value-e.value}function Ai(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Ti(t,e){t._pack_next=e,e._pack_prev=t}function Si(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Ei(t){function e(t){c=Math.min(t.x-t.r,c),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}if((r=t.children)&&(u=r.length)){var r,n,i,a,o,s,l,u,c=1/0,h=-1/0,f=1/0,d=-1/0;if(r.forEach(Li),n=r[0],n.x=-n.r,n.y=0,e(n),u>1&&(i=r[1],i.x=i.r,i.y=0,e(i),u>2))for(a=r[2],Di(n,i,a),e(a),Ai(n,a),n._pack_prev=a,Ai(a,i),i=n._pack_next,o=3;o=0;)e=i[a],e.z+=r,e.m+=r,r+=e.s+(n+=e.c)}function Fi(t,e,r){return t.a.parent===e.parent?t.a:r}function Ni(t){return 1+uo.max(t,function(t){return t.y})}function Bi(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Ui(t){var e=t.children;return e&&e.length?Ui(e[0]):t}function Vi(t){var e,r=t.children;return r&&(e=r.length)?Vi(r[e-1]):t}function qi(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Hi(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i<0&&(r+=i/2,i=0),a<0&&(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function Yi(t){var e=t[0],r=t[t.length-1];return e2?Ji:Xi,l=n?Kn:Jn;return o=i(t,e,l,r),s=i(e,t,l,_n),a}function a(t){return o(t)}var o,s;return a.invert=function(t){return s(t)},a.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},a.range=function(t){return arguments.length?(e=t,i()):e},a.rangeRound=function(t){return a.range(t).interpolate(Nn)},a.clamp=function(t){return arguments.length?(n=t,i()):n},a.interpolate=function(t){return arguments.length?(r=t,i()):r},a.ticks=function(e){return ea(t,e)},a.tickFormat=function(e,r){return ra(t,e,r)},a.nice=function(e){return $i(t,e),i()},a.copy=function(){return Ki(t,e,r,n)},i()}function Qi(t,e){return uo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function $i(t,e){return Wi(t,Zi(ta(t,e)[2])),Wi(t,Zi(ta(t,e)[2])),t}function ta(t,e){null==e&&(e=10);var r=Yi(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function ea(t,e){return uo.range.apply(uo,ta(t,e))}function ra(t,e,r){var n=ta(t,e);if(r){var i=cs.exec(r);if(i.shift(),"s"===i[8]){var a=uo.formatPrefix(Math.max(xo(n[0]),xo(n[1])));return i[7]||(i[7]="."+na(a.scale(n[2]))),i[8]="f",r=uo.format(i.join("")),function(t){return r(a.scale(t))+a.symbol}}i[7]||(i[7]="."+ia(i[8],n)),r=i.join("")}else r=",."+na(n[2])+"f";return uo.format(r)}function na(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ia(t,e){var r=na(e[2]);return t in Ml?Math.abs(r-na(Math.max(xo(e[0]),xo(e[1]))))+ +("e"!==t):r-2*("%"===t)}function aa(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),o):e},o.nice=function(){var e=Wi(n.map(i),r?Math:Al);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Yi(n),o=[],s=t[0],l=t[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),h=e%1?2:e;if(isFinite(c-u)){if(r){for(;u0;f--)o.push(a(u)*f);for(u=0;o[u]l;c--);o=o.slice(u,c)}return o},o.tickFormat=function(t,r){if(!arguments.length)return kl;arguments.length<2?r=kl:"function"!=typeof r&&(r=uo.format(r));var n=Math.max(1,e*t/o.ticks().length);return function(t){var o=t/a(Math.round(i(t)));return o*e0?s[r-1]:t[0],r0?0:1}function xa(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,u=-s*a,c=t[0]+l,h=t[1]+u,f=e[0]+l,d=e[1]+u,p=(c+f)/2,m=(h+d)/2,g=f-c,v=d-h,y=g*g+v*v,b=r-n,x=c*d-f*h,_=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),w=(x*v-g*_)/y,M=(-x*g-v*_)/y,k=(x*v+g*_)/y,A=(-x*g+v*_)/y,T=w-p,S=M-m,E=k-p,L=A-m;return T*T+S*S>E*E+L*L&&(w=k,M=A),[[w-l,M-u],[w*r/b,M*r/b]]}function _a(t){function e(e){function o(){u.push("M",a(t(c),s))}for(var l,u=[],c=[],h=-1,f=e.length,d=Et(r),p=Et(n);++h1?t.join("L"):t+"Z"}function Ma(t){return t.join("L")+"Z"}function ka(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1&&i.push("H",n[0]),i.join("")}function Aa(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var u=2;u9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}function Ua(t){return t.length<3?wa(t):t[0]+Ca(t,Ba(t))}function Va(t){for(var e,r,n,i=-1,a=t.length;++i0;)d[--s].call(t,o);if(a>=1)return m.event&&m.event.end.call(t,t.__data__,e),--p.count?delete p[n]:delete t[r],1}var l,u,c,f,d,p=t[r]||(t[r]={active:0,count:0}),m=p[n];m||(l=i.time,u=It(a,0,l),m=p[n]={tween:new h,time:l,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++p.count)}function ro(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate("+(isFinite(n)?n:r(t))+",0)"})}function no(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate(0,"+(isFinite(n)?n:r(t))+")"})}function io(t){return t.toISOString()}function ao(t,e,r){function n(e){return t(e)}function i(t,r){var n=t[1]-t[0],i=n/r,a=uo.bisect(Jl,i);return a==Jl.length?[e.year,ta(t.map(function(t){return t/31536e6}),r)[2]]:a?e[i/Jl[a-1]1?{floor:function(e){for(;r(e=t.floor(e));)e=oo(e-1);return e},ceil:function(e){for(;r(e=t.ceil(e));)e=oo(+e+1);return e}}:t))},n.ticks=function(t,e){var r=Yi(n.domain()),a=null==t?i(r,10):"number"==typeof t?i(r,t):!t.range&&[{range:t},e];return a&&(t=a[0],e=a[1]),t.range(r[0],oo(+r[1]+1),e<1?1:e)},n.tickFormat=function(){return r},n.copy=function(){return ao(t.copy(),e,r)},Qi(n,t)}function oo(t){return new Date(t)}function so(t){return JSON.parse(t.responseText)}function lo(t){var e=fo.createRange();return e.selectNode(fo.body),e.createContextualFragment(t.responseText)}var uo={version:"3.5.17"},co=[].slice,ho=function(t){return co.call(t)},fo=this.document;if(fo)try{ho(fo.documentElement.childNodes)[0].nodeType}catch(t){ho=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),fo)try{fo.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var po=this.Element.prototype,mo=po.setAttribute,go=po.setAttributeNS,vo=this.CSSStyleDeclaration.prototype,yo=vo.setProperty;po.setAttribute=function(t,e){mo.call(this,t,e+"")},po.setAttributeNS=function(t,e,r){go.call(this,t,e,r+"")},vo.setProperty=function(t,e,r){yo.call(this,t,e+"",r)}}uo.ascending=i,uo.descending=function(t,e){return et?1:e>=t?0:NaN},uo.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},uo.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},uo.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return l/(c-1)},uo.deviation=function(){var t=uo.variance.apply(this,arguments);return t?Math.sqrt(t):t};var bo=s(i);uo.bisectLeft=bo.left,uo.bisect=uo.bisectRight=bo.right,uo.bisector=function(t){return s(1===t.length?function(e,r){return i(t(e),r)}:t)},uo.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},uo.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},uo.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(n=t[i],e=n.length;--e>=0;)r[--o]=n[e];return r};var xo=Math.abs;uo.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,i=[],a=u(xo(r)),o=-1;if(t*=a,e*=a,r*=a,r<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)=a.length)return n?n.call(i,o):r?o.sort(r):o;for(var l,u,c,f,d=-1,p=o.length,m=a[s++],g=new h;++d=a.length)return t;var n=[],i=o[r++];return t.forEach(function(t,i){n.push({key:t,values:e(i,r)})}),i?n.sort(function(t,e){return i(t.key,e.key)}):n}var r,n,i={},a=[],o=[];return i.map=function(e,r){return t(r,e,0)},i.entries=function(r){return e(t(uo.map,r,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return r=t,i},i.rollup=function(t){return n=t,i},i},uo.set=function(t){var e=new b;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},uo.event=null,uo.requote=function(t){return t.replace(ko,"\\$&")};var ko=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ao={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]},To=function(t,e){return e.querySelector(t)},So=function(t,e){return e.querySelectorAll(t)},Eo=function(t,e){var r=t.matches||t[w(t,"matchesSelector")];return(Eo=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(To=function(t,e){return Sizzle(t,e)[0]||null},So=Sizzle,Eo=Sizzle.matchesSelector),uo.selection=function(){return uo.select(fo.documentElement)};var Lo=uo.selection.prototype=[];Lo.select=function(t){var e,r,n,i,a=[];t=C(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),zo.hasOwnProperty(r)?{space:zo[r],local:t}:t}},Lo.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return t=uo.ns.qualify(t),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(D(e,t[e]));return this}return this.each(D(t,e))},Lo.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=O(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},Lo.sort=function(t){t=H.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(e=e.transition().duration(L)),e.call(t.event)}function s(){_&&_.domain(x.range().map(function(t){return(t-k.x)/k.k}).map(x.invert)),M&&M.domain(w.range().map(function(t){return(t-k.y)/k.k}).map(w.invert))}function l(t){C++||t({type:"zoomstart"})}function u(t){s(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function c(t){--C||(t({type:"zoomend"}),g=null)}function h(){function t(){s=1,a(uo.mouse(i),f),u(o)}function r(){h.on(D,null).on(I,null),d(s),c(o)}var i=this,o=O.of(i,arguments),s=0,h=uo.select(n(i)).on(D,t).on(I,r),f=e(uo.mouse(i)),d=K(i);Bl.call(i),l(o)}function f(){function t(){var t=uo.touches(p);return d=k.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function r(){var e=uo.event.target;uo.select(e).on(x,n).on(_,s),w.push(e);for(var r=uo.event.changedTouches,i=0,a=r.length;i1){var c=l[0],h=l[1],f=c[0]-h[0],d=c[1]-h[1];v=f*f+d*d}}function n(){var t,e,r,n,o=uo.touches(p);Bl.call(p);for(var s=0,l=o.length;s=u)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,hs=uo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=uo.round(t,jt(t,e))).toFixed(Math.max(0,Math.min(20,jt(t*(1+1e-15),e))))}}),fs=uo.time={},ds=Date;Ut.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ps.setUTCDate.apply(this._,arguments)},setDay:function(){ps.setUTCDay.apply(this._,arguments)},setFullYear:function(){ps.setUTCFullYear.apply(this._,arguments)},setHours:function(){ps.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ps.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ps.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ps.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ps.setUTCSeconds.apply(this._,arguments)},setTime:function(){ps.setTime.apply(this._,arguments)}};var ps=Date.prototype;fs.year=Vt(function(t){return t=fs.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),fs.years=fs.year.range,fs.years.utc=fs.year.utc.range,fs.day=Vt(function(t){var e=new ds(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),fs.days=fs.day.range,fs.days.utc=fs.day.utc.range,fs.dayOfYear=function(t){var e=fs.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var r=fs[t]=Vt(function(t){return(t=fs.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=fs.year(t).getDay();return Math.floor((fs.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});fs[t+"s"]=r.range,fs[t+"s"].utc=r.utc.range,fs[t+"OfYear"]=function(t){var r=fs.year(t).getDay();return Math.floor((fs.dayOfYear(t)+(r+e)%7)/7)}}),fs.week=fs.sunday,fs.weeks=fs.sunday.range,fs.weeks.utc=fs.sunday.utc.range,fs.weekOfYear=fs.sundayOfYear;var ms={"-":"",_:" ",0:"0"},gs=/^\s*\d+/,vs=/^%/;uo.locale=function(t){return{numberFormat:Nt(t),timeFormat:Ht(t)}};var ys=uo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});uo.format=ys.numberFormat,uo.geo={},he.prototype={s:0,t:0,add:function(t){fe(t,this.t,bs),fe(bs.s,this.s,this),this.s?this.t+=bs.t:this.s=bs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bs=new he;uo.geo.stream=function(t,e){t&&xs.hasOwnProperty(t.type)?xs[t.type](t,e):de(t,e)};var xs={Feature:function(t,e){de(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++nd&&(d=e)}function e(e,r){var n=ve([e*qo,r*qo]);if(v){var i=be(v,n),a=[i[1],-i[0],0],o=be(a,i);we(o),o=Me(o);var l=e-p,u=l>0?1:-1,m=o[0]*Ho*u,g=xo(l)>180;if(g^(u*pd&&(d=y)}else if(m=(m+360)%360-180,g^(u*pd&&(d=r);g?es(c,f)&&(f=e):s(e,f)>s(c,f)&&(c=e):f>=c?(ef&&(f=e)):e>p?s(c,e)>s(c,f)&&(f=e):s(e,f)>s(c,f)&&(c=e)}else t(e,r);v=n,p=e}function r(){_.point=e}function n(){x[0]=c,x[1]=f,_.point=t,v=null}function i(t,r){if(v){var n=t-p;y+=xo(n)>180?n+(n>0?360:-360):n}else m=t,g=r;ks.point(t,r),e(t,r)}function a(){ks.lineStart()}function o(){i(m,g),ks.lineEnd(),xo(y)>jo&&(c=-(f=180)),x[0]=c,x[1]=f,v=null}function s(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function u(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tjo?d=90:y<-jo&&(h=-90),x[0]=c,x[1]=f}};return function(t){d=f=-(c=h=1/0),b=[],uo.geo.stream(t,_);var e=b.length;if(e){b.sort(l);for(var r,n=1,i=b[0],a=[i];ns(i[0],i[1])&&(i[1]=r[1]),s(r[0],i[1])>s(i[0],i[1])&&(i[0]=r[0])):a.push(i=r);for(var o,r,p=-1/0,e=a.length-1,n=0,i=a[e];n<=e;i=r,++n)r=a[n],(o=s(i[1],r[0]))>p&&(p=o,c=r[0],f=i[1])}return b=x=null,c===1/0||h===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,h],[f,d]]}}(),uo.geo.centroid=function(t){As=Ts=Ss=Es=Ls=Cs=zs=Ds=Is=Ps=Os=0,uo.geo.stream(t,Rs);var e=Is,r=Ps,n=Os,i=e*e+r*r+n*n;return i=.12&&i<.234&&n>=-.425&&n<-.214?o:i>=.166&&i<.234&&n>=-.214&&n<-.115?s:a).invert(t)},t.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},t.precision=function(e){return arguments.length?(a.precision(e),o.precision(e),s.precision(e),t):a.precision()},t.scale=function(e){return arguments.length?(a.scale(e),o.scale(.35*e),s.scale(e),t.translate(a.translate())):a.scale()},t.translate=function(e){if(!arguments.length)return a.translate();var u=a.scale(),c=+e[0],h=+e[1];return r=a.translate(e).clipExtent([[c-.455*u,h-.238*u],[c+.455*u,h+.238*u]]).stream(l).point,n=o.translate([c-.307*u,h+.201*u]).clipExtent([[c-.425*u+jo,h+.12*u+jo],[c-.214*u-jo,h+.234*u-jo]]).stream(l).point,i=s.translate([c-.205*u,h+.212*u]).clipExtent([[c-.214*u+jo,h+.166*u+jo],[c-.115*u-jo,h+.234*u-jo]]).stream(l).point,t},t.scale(1070)};var Ns,Bs,Us,Vs,qs,Hs,Ys={point:M,lineStart:M,lineEnd:M,polygonStart:function(){Bs=0,Ys.lineStart=We},polygonEnd:function(){Ys.lineStart=Ys.lineEnd=Ys.point=M,Ns+=xo(Bs/2)}},Gs={point:Ze,lineStart:M,lineEnd:M,polygonStart:M,polygonEnd:M},Xs={point:Qe,lineStart:$e,lineEnd:tr,polygonStart:function(){Xs.lineStart=er},polygonEnd:function(){Xs.point=Qe,Xs.lineStart=$e,Xs.lineEnd=tr}};uo.geo.path=function(){function t(t){return t&&("function"==typeof s&&a.pointRadius(+s.apply(this,arguments)),o&&o.valid||(o=i(a)),uo.geo.stream(t,o)),a.result()}function e(){return o=null,t}var r,n,i,a,o,s=4.5;return t.area=function(t){return Ns=0,uo.geo.stream(t,i(Ys)),Ns},t.centroid=function(t){return Ss=Es=Ls=Cs=zs=Ds=Is=Ps=Os=0,uo.geo.stream(t,i(Xs)),Os?[Is/Os,Ps/Os]:Ds?[Cs/Ds,zs/Ds]:Ls?[Ss/Ls,Es/Ls]:[NaN,NaN]},t.bounds=function(t){return qs=Hs=-(Us=Vs=1/0),uo.geo.stream(t,i(Gs)),[[Us,Vs],[qs,Hs]]},t.projection=function(t){return arguments.length?(i=(r=t)?t.stream||ir(t):x,e()):r},t.context=function(t){return arguments.length?(a=null==(n=t)?new Je:new rr(t),"function"!=typeof s&&a.pointRadius(s),e()):n},t.pointRadius=function(e){return arguments.length?(s="function"==typeof e?e:(a.pointRadius(+e),+e),t):s},t.projection(uo.geo.albersUsa()).context(null)},uo.geo.transform=function(t){return{stream:function(e){var r=new ar(e);for(var n in t)r[n]=t[n];return r}}},ar.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},uo.geo.projection=sr,uo.geo.projectionMutator=lr,(uo.geo.equirectangular=function(){return sr(cr)}).raw=cr.invert=cr,uo.geo.rotation=function(t){function e(e){return e=t(e[0]*qo,e[1]*qo),e[0]*=Ho,e[1]*=Ho,e}return t=fr(t[0]%360*qo,t[1]*qo,t.length>2?t[2]*qo:0),e.invert=function(e){return e=t.invert(e[0]*qo,e[1]*qo),e[0]*=Ho,e[1]*=Ho,e},e},hr.invert=cr,uo.geo.circle=function(){function t(){var t="function"==typeof n?n.apply(this,arguments):n,e=fr(-t[0]*qo,-t[1]*qo,0).invert,i=[];return r(null,null,1,{point:function(t,r){i.push(t=e(t,r)),t[0]*=Ho,t[1]*=Ho}}),{type:"Polygon",coordinates:[i]}}var e,r,n=[0,0],i=6;return t.origin=function(e){return arguments.length?(n=e,t):n},t.angle=function(n){return arguments.length?(r=gr((e=+n)*qo,i*qo),t):e},t.precision=function(n){return arguments.length?(r=gr(e*qo,(i=+n)*qo),t):i},t.angle(90)},uo.geo.distance=function(t,e){var r,n=(e[0]-t[0])*qo,i=t[1]*qo,a=e[1]*qo,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),u=Math.cos(i),c=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((r=h*o)*r+(r=u*c-l*h*s)*r),l*c+u*h*s)},uo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return uo.range(Math.ceil(a/g)*g,i,g).map(f).concat(uo.range(Math.ceil(u/v)*v,l,v).map(d)).concat(uo.range(Math.ceil(n/p)*p,r,p).filter(function(t){return xo(t%g)>jo}).map(c)).concat(uo.range(Math.ceil(s/m)*m,o,m).filter(function(t){return xo(t%v)>jo}).map(h))}var r,n,i,a,o,s,l,u,c,h,f,d,p=10,m=p,g=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(l).slice(1),f(i).reverse().slice(1),d(u).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(a=+e[0][0],i=+e[1][0],u=+e[0][1],l=+e[1][1],a>i&&(e=a,a=i,i=e),u>l&&(e=u,u=l,l=e),t.precision(y)):[[a,u],[i,l]]},t.minorExtent=function(e){return arguments.length?(n=+e[0][0],r=+e[1][0],s=+e[0][1],o=+e[1][1],n>r&&(e=n,n=r,r=e),s>o&&(e=s,s=o,o=e),t.precision(y)):[[n,s],[r,o]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(g=+e[0],v=+e[1],t):[g,v]},t.minorStep=function(e){return arguments.length?(p=+e[0],m=+e[1],t):[p,m]},t.precision=function(e){return arguments.length?(y=+e,c=yr(s,o,90),h=br(n,r,y),f=yr(u,l,90),d=br(a,i,y),t):y},t.majorExtent([[-180,-90+jo],[180,90-jo]]).minorExtent([[-180,-80-jo],[180,80+jo]])},uo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}var e,r,n=xr,i=_r;return t.distance=function(){return uo.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},t.source=function(r){return arguments.length?(n=r,e="function"==typeof r?null:r,t):n},t.target=function(e){return arguments.length?(i=e,r="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},uo.geo.interpolate=function(t,e){return wr(t[0]*qo,t[1]*qo,e[0]*qo,e[1]*qo)},uo.geo.length=function(t){return Ws=0,uo.geo.stream(t,Zs),Ws};var Ws,Zs={sphere:M,point:M,lineStart:Mr,lineEnd:M,polygonStart:M,polygonEnd:M},Js=kr(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(uo.geo.azimuthalEqualArea=function(){return sr(Js)}).raw=Js;var Ks=kr(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},x);(uo.geo.azimuthalEquidistant=function(){return sr(Ks)}).raw=Ks,(uo.geo.conicConformal=function(){return Ge(Ar)}).raw=Ar,(uo.geo.conicEquidistant=function(){return Ge(Tr)}).raw=Tr;var Qs=kr(function(t){return 1/t},Math.atan);(uo.geo.gnomonic=function(){return sr(Qs)}).raw=Qs,Sr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Vo]},(uo.geo.mercator=function(){return Er(Sr)}).raw=Sr;var $s=kr(function(){return 1},Math.asin);(uo.geo.orthographic=function(){return sr($s)}).raw=$s;var tl=kr(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(uo.geo.stereographic=function(){return sr(tl)}).raw=tl,Lr.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Vo]},(uo.geo.transverseMercator=function(){var t=Er(Lr),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):(t=r(),[t[0],t[1],t[2]-90])},r([0,0,90])}).raw=Lr,uo.geom={},uo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=Et(r),a=Et(n),o=t.length,s=[],l=[];for(e=0;e=0;--e)d.push(t[s[u[e]][2]]);for(e=+h;e=n&&u.x<=a&&u.y>=i&&u.y<=o?[[n,o],[a,o],[a,i],[n,i]]:[]).point=t[s]}),e}function r(t){return t.map(function(t,e){return{x:Math.round(a(t,e)/jo)*jo,y:Math.round(o(t,e)/jo)*jo,i:e}})}var n=Cr,i=zr,a=n,o=i,s=ul;return t?e(t):(e.links=function(t){return un(r(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return un(r(t)).cells.forEach(function(r,n){for(var i,a=r.site,o=r.edges.sort(Gr),s=-1,l=o.length,u=o[l-1].edge,c=u.l===a?u.r:u.l;++s=u,f=n>=c,d=f<<1|h;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=pn()),h?i=u:s=u,f?o=c:l=c,a(t,e,r,n,i,o,s,l)}var c,h,f,d,p,m,g,v,y,b=Et(s),x=Et(l);if(null!=e)m=e,g=r,v=n,y=i;else if(v=y=-(m=g=1/0),h=[],f=[],p=t.length,o)for(d=0;dv&&(v=c.x),c.y>y&&(y=c.y),h.push(c.x),f.push(c.y);else for(d=0;dv&&(v=_),w>y&&(y=w),h.push(_),f.push(w)}var M=v-m,k=y-g;M>k?y=g+M:v=m+k;var A=pn();if(A.add=function(t){a(A,t,+b(t,++d),+x(t,d),m,g,v,y)},A.visit=function(t){mn(t,A,m,g,v,y)},A.find=function(t){return gn(A,t[0],t[1],m,g,v,y)},d=-1,null==e){for(;++d=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return r=dl.get(r)||fl,n=pl.get(n)||x,Mn(n(r.apply(null,co.call(arguments,1))))},uo.interpolateHcl=Rn,uo.interpolateHsl=jn,uo.interpolateLab=Fn,uo.interpolateRound=Nn,uo.transform=function(t){var e=fo.createElementNS(uo.ns.prefix.svg,"g");return(uo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Bn(r?r.matrix:ml)})(t)},Bn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};uo.interpolateTransform=Zn,uo.layout={},uo.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r0?i=t:(r.c=null,r.t=NaN,r=null,u.end({type:"end",alpha:i=0})):t>0&&(u.start({type:"start",alpha:i=t}),r=It(l.tick)),l):i},l.start=function(){function t(t,n){if(!r){for(r=new Array(i),l=0;l=0;)o.push(c=u[l]),c.parent=a,c.depth=a.depth+1;n&&(a.value=0),a.children=u}else n&&(a.value=+n.call(t,a,a.depth)||0),delete a.children;return li(i,function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)}),s}var e=hi,r=ui,n=ci;return t.sort=function(r){return arguments.length?(e=r,t):e},t.children=function(e){return arguments.length?(r=e,t):r},t.value=function(e){return arguments.length?(n=e,t):n},t.revalue=function(e){return n&&(si(e,function(t){t.children&&(t.value=0)}),li(e,function(e){var r;e.children||(e.value=+n.call(t,e,e.depth)||0),(r=e.parent)&&(r.value+=e.value)})),e},t},uo.layout.partition=function(){function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(n=e.value?n/e.value:0;++us&&(s=n),o.push(n)}for(r=0;r0)for(a=-1;++a=c[0]&&s<=c[1]&&(o=l[uo.bisect(h,s,1,d)-1],o.y+=p,o.push(t[a]));return l}var e=!0,r=Number,n=Mi,i=_i;return t.value=function(e){return arguments.length?(r=e,t):r},t.range=function(e){return arguments.length?(n=Et(e),t):n},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return wi(t,e)}:Et(e),t):i},t.frequency=function(r){return arguments.length?(e=!!r,t):e},t},uo.layout.pack=function(){function t(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],u=i[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,li(s,function(t){t.r=+c(t.value)}),li(s,Ei),n){var h=n*(e?1:Math.max(2*s.r/l,2*s.r/u))/2;li(s,function(t){t.r+=h}),li(s,Ei),li(s,function(t){t.r-=h})}return zi(s,l/2,u/2,e?1:1/Math.max(2*s.r/l,2*s.r/u)),o}var e,r=uo.layout.hierarchy().sort(ki),n=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(r){return arguments.length?(e=null==r||"function"==typeof r?r:+r,t):e},t.padding=function(e){return arguments.length?(n=+e,t):n},oi(t,r)},uo.layout.tree=function(){function t(t,i){var c=o.call(this,t,i),h=c[0],f=e(h);if(li(f,r),f.parent.m=-f.z,si(f,n),u)si(h,a);else{var d=h,p=h,m=h;si(h,function(t){t.xp.x&&(p=t),t.depth>m.depth&&(m=t)});var g=s(d,p)/2-d.x,v=l[0]/(p.x+s(p,d)/2+g),y=l[1]/(m.depth||1);si(h,function(t){t.x=(t.x+g)*v,t.y=t.depth*y})}return c}function e(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o0&&(Ri(Fi(o,t,r),t,n),u+=n,c+=n),h+=o.m,u+=i.m,f+=l.m,c+=a.m;o&&!Oi(a)&&(a.t=o,a.m+=h-c),i&&!Pi(l)&&(l.t=i,l.m+=u-f,r=t)}return r}function a(t){t.x*=l[0],t.y=t.depth*l[1]}var o=uo.layout.hierarchy().sort(null).value(null),s=Ii,l=[1,1],u=null;return t.separation=function(e){return arguments.length?(s=e,t):s},t.size=function(e){return arguments.length?(u=null==(l=e)?a:null,t):u?null:l},t.nodeSize=function(e){return arguments.length?(u=null==(l=e)?null:a,t):u?l:null},oi(t,o)},uo.layout.cluster=function(){function t(t,a){var o,s=e.call(this,t,a),l=s[0],u=0;li(l,function(t){var e=t.children;e&&e.length?(t.x=Bi(e),t.y=Ni(e)):(t.x=o?u+=r(t,o):0,t.y=0,o=t)});var c=Ui(l),h=Vi(l),f=c.x-r(c,h)/2,d=h.x+r(h,c)/2;return li(l,i?function(t){t.x=(t.x-l.x)*n[0],t.y=(l.y-t.y)*n[1]}:function(t){t.x=(t.x-f)/(d-f)*n[0],t.y=(1-(l.y?t.y/l.y:1))*n[1]}),s}var e=uo.layout.hierarchy().sort(null).value(null),r=Ii,n=[1,1],i=!1;return t.separation=function(e){return arguments.length?(r=e,t):r},t.size=function(e){return arguments.length?(i=null==(n=e),t):i?null:n},t.nodeSize=function(e){return arguments.length?(i=null!=(n=e),t):i?n:null},oi(t,e)},uo.layout.treemap=function(){function t(t,e){for(var r,n,i=-1,a=t.length;++i0;)c.push(o=f[l-1]),c.area+=o.area,"squarify"!==d||(s=n(c,m))<=p?(f.pop(),p=s):(c.area-=c.pop().area,i(c,m,u,!1),m=Math.min(u.dx,u.dy),c.length=c.area=0,p=1/0);c.length&&(i(c,m,u,!0),c.length=c.area=0),a.forEach(e)}}function r(e){var n=e.children;if(n&&n.length){var a,o=h(e),s=n.slice(),l=[];for(t(s,o.dx*o.dy/e.value),l.area=0;a=s.pop();)l.push(a),l.area+=a.area,null!=a.z&&(i(l,a.z?o.dx:o.dy,o,!s.length),l.length=l.area=0);n.forEach(r)}}function n(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++oi&&(i=r));return n*=n,e*=e,n?Math.max(e*i*p/n,n/(e*a*p)):1/0}function i(t,e,r,n){var i,a=-1,o=t.length,s=r.x,u=r.y,c=e?l(t.area/e):0;if(e==r.dx){for((n||c>r.dy)&&(c=r.dy);++ar.dx)&&(c=r.dx);++a1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=uo.random.normal.apply(uo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=uo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;rh?0:1;if(u=Uo)return e(u,d)+(t?e(t,1-d):"")+"Z";var p,m,g,v,y,b,x,_,w,M,k,A,T=0,S=0,E=[];if((v=(+l.apply(this,arguments)||0)/2)&&(g=a===Cl?Math.sqrt(t*t+u*u):+a.apply(this,arguments),d||(S*=-1),u&&(S=nt(g/u*Math.sin(v))),t&&(T=nt(g/t*Math.sin(v)))),u){y=u*Math.cos(c+S),b=u*Math.sin(c+S),x=u*Math.cos(h-S),_=u*Math.sin(h-S);var L=Math.abs(h-c-2*S)<=No?0:1;if(S&&ba(y,b,x,_)===d^L){var C=(c+h)/2;y=u*Math.cos(C),b=u*Math.sin(C),x=_=null}}else y=b=0;if(t){w=t*Math.cos(h-T),M=t*Math.sin(h-T),k=t*Math.cos(c+T),A=t*Math.sin(c+T);var z=Math.abs(c-h+2*T)<=No?0:1;if(T&&ba(w,M,k,A)===1-d^z){var D=(c+h)/2;w=t*Math.cos(D),M=t*Math.sin(D),k=A=null}}else w=M=0;if(f>jo&&(p=Math.min(Math.abs(u-t)/2,+i.apply(this,arguments)))>.001){m=tNo)+",1 "+e}function i(t,e,r,n){return"Q 0,0 "+n}var a=xr,o=_r,s=Ha,l=ga,u=va;return t.radius=function(e){return arguments.length?(s=Et(e),t):s},t.source=function(e){return arguments.length?(a=Et(e),t):a},t.target=function(e){return arguments.length?(o=Et(e),t):o},t.startAngle=function(e){return arguments.length?(l=Et(e),t):l},t.endAngle=function(e){return arguments.length?(u=Et(e),t):u},t},uo.svg.diagonal=function(){function t(t,i){var a=e.call(this,t,i),o=r.call(this,t,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return l=l.map(n),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=xr,r=_r,n=Ya;return t.source=function(r){return arguments.length?(e=Et(r),t):e},t.target=function(e){return arguments.length?(r=Et(e),t):r},t.projection=function(e){return arguments.length?(n=e,t):n},t},uo.svg.diagonal.radial=function(){var t=uo.svg.diagonal(),e=Ya,r=t.projection;return t.projection=function(t){return arguments.length?r(Ga(e=t)):e},t},uo.svg.symbol=function(){function t(t,n){return(Ol.get(e.call(this,t,n))||Za)(r.call(this,t,n))}var e=Wa,r=Xa;return t.type=function(r){return arguments.length?(e=Et(r),t):e},t.size=function(e){return arguments.length?(r=Et(e),t):r},t};var Ol=uo.map({circle:Za,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*jl)),r=e*jl;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Rl),r=e*Rl/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Rl),r=e*Rl/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});uo.svg.symbolTypes=Ol.keys();var Rl=Math.sqrt(3),jl=Math.tan(30*qo);Lo.transition=function(t){for(var e,r,n=Fl||++Vl,i=to(t),a=[],o=Nl||{time:Date.now(),ease:En,delay:0,duration:250},s=-1,l=this.length;++srect,.s>rect").attr("width",h[1]-h[0])}function i(t){t.select(".extent").attr("y",f[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function a(){function a(){32==uo.event.keyCode&&(L||(b=null,z[0]-=h[1],z[1]-=f[1],L=2),T())}function m(){32==uo.event.keyCode&&2==L&&(z[0]+=h[1],z[1]+=f[1],L=0,T())}function g(){var t=uo.mouse(_),n=!1;x&&(t[0]+=x[0],t[1]+=x[1]),L||(uo.event.altKey?(b||(b=[(h[0]+h[1])/2,(f[0]+f[1])/2]),z[0]=h[+(t[0]=2)return!1;t[r]=n}return!0}):w.filter(function(t){for(var e=0;e<=o;++e){var r=y[t[e]];if(r<0)return!1;t[e]=r}return!0}),1&o)for(var h=0;h>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t("buffer").Buffer)},{buffer:69}],117:[function(t,e,r){"use strict";function n(t,e,r){var i=0|t[r];if(i<=0)return[];var a,o=new Array(i);if(r===t.length-1)for(a=0;a0)return i(0|t,e);break;case"object":if("number"==typeof t.length)return n(t,e,0)}return[]}e.exports=a},{}],118:[function(t,e,r){"use strict";function n(t,e,r){r=r||2;var n=e&&e.length,a=n?e[0]*r:t.length,s=i(t,0,a,r,!0),l=[];if(!s)return l;var u,c,f,d,p,m,g;if(n&&(s=h(t,e,s,r)),t.length>80*r){u=f=t[0],c=d=t[1];for(var v=r;vf&&(f=p),m>d&&(d=m);g=Math.max(f-u,d-c)}return o(s,l,r,u,c,g),l}function i(t,e,r,n,i){var a,o;if(i===z(t,e,r,n)>0)for(a=e;a=e;a-=n)o=E(a,t[a],t[a+1],o);return o&&w(o,o.next)&&(L(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!w(n,n.next)&&0!==_(n.prev,n,n.next))n=n.next;else{if(L(n),(n=e=n.prev)===n.next)return null;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,h,f){if(t){!f&&h&&m(t,n,i,h);for(var d,p,g=t;t.prev!==t.next;)if(d=t.prev,p=t.next,h?l(t,n,i,h):s(t))e.push(d.i/r),e.push(t.i/r),e.push(p.i/r),L(t),t=p.next,g=p.next;else if((t=p)===g){f?1===f?(t=u(t,e,r),o(t,e,r,n,i,h,2)):2===f&&c(t,e,r,n,i,h):o(a(t),e,r,n,i,h,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(_(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(b(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&_(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(_(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,h=v(s,l,e,r,n),f=v(u,c,e,r,n),d=t.nextZ;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&b(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&b(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function u(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!w(i,a)&&M(i,n,n.next,a)&&A(i,a)&&A(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),L(n),L(n.next),n=t=a),n=n.next}while(n!==t);return n}function c(t,e,r,n,i,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&x(l,u)){var c=S(l,u);return l=a(l,l.next),c=a(c,c.next),o(l,e,r,n,i,s),void o(c,e,r,n,i,s)}u=u.next}l=l.next}while(l!==t)}function h(t,e,r,n){var o,s,l,u,c,h=[];for(o=0,s=e.length;o=n.next.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&b(ar.x)&&A(n,t)&&(r=n,f=l),n=n.next;return r}function m(t,e,r,n){var i=t;do{null===i.z&&(i.z=v(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(t){var e,r,n,i,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0===s?(i=n,n=n.nextZ,l--):0!==l&&n?r.z<=n.z?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,s--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return t}function v(t,e,r,n,i){return t=32767*(t-r)/i,e=32767*(e-n)/i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function y(t){var e=t,r=t;do{e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function x(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!k(t,e)&&A(t,e)&&A(e,t)&&T(t,e)}function _(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function M(t,e,r,n){return!!(w(t,e)&&w(r,n)||w(t,n)&&w(r,e))||_(t,e,r)>0!=_(t,e,n)>0&&_(r,n,t)>0!=_(r,n,e)>0}function k(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&M(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function A(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function T(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}function S(t,e){var r=new C(t.i,t.x,t.y),n=new C(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function E(t,e,r,n){var i=new C(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function L(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function C(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function z(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],119:[function(t,e,r){"use strict";function n(t,e){var r=t.length;if("number"!=typeof e){e=0;for(var n=0;n0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,a,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],a=r.length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},{}],122:[function(t,e,r){"use strict";function n(t,e,r){var n=e||0,i=r||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[i*t[12]-t[8],i*t[13]-t[9],i*t[14]-t[10],i*t[15]-t[11]]]}e.exports=n},{}],123:[function(t,e,r){"use strict";function n(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}e.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0===(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},{}],124:[function(t,e,r){"use strict";function n(t){return new Function("f","var p = (f && f.properties || {}); return "+i(t))}function i(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?o(t[1],t[2],"===",!1):"!="===e?o(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?o(t[1],t[2],e,!0):"any"===e?s(t.slice(1),"||"):"all"===e?s(t.slice(1),"&&"):"none"===e?c(s(t.slice(1),"||")):"in"===e?l(t[1],t.slice(2)):"!in"===e?c(l(t[1],t.slice(2))):"has"===e?u(t[1]):"!has"===e?c(u([t[1]])):"true")+")"}function a(t){return"$type"===t?"f.type":"$id"===t?"f.id":"p["+JSON.stringify(t)+"]"}function o(t,e,r,n){var i=a(t),o="$type"===t?f.indexOf(e):JSON.stringify(e);return(n?"typeof "+i+"=== typeof "+o+"&&":"")+i+r+o}function s(t,e){return t.map(i).join(e)} -function l(t,e){"$type"===t&&(e=e.map(function(t){return f.indexOf(t)}));var r=JSON.stringify(e.sort(h)),n=a(t);return e.length<=200?r+".indexOf("+n+") !== -1":"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }("+n+", "+r+",0,"+(e.length-1)+")"}function u(t){return JSON.stringify(t)+" in p"}function c(t){return"!("+t+")"}function h(t,e){return te?1:0}e.exports=n;var f=["Unknown","Point","LineString","Polygon"]},{}],125:[function(t,e,r){"use strict";function n(t,e,r){return Math.min(e,Math.max(t,r))}function i(t,e,r){this.dimension=t.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n=r-1)for(var f=o.length-1,p=t-e[r-1],d=0;d=r-1)for(var c=a.length-1,h=(e[r-1],0);h=0;--r)if(t[--e])return!1;return!0},u.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--h)i.push(n(l[h-1],u[h-1],arguments[h])),a.push(0)}},u.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var f=r;f>0;--f){var d=n(u[f-1],c[f-1],arguments[f]);i.push(d),a.push((d-i[o++])*h)}}},u.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(n(o[l-1],s[l-1],arguments[l])),i.push(0)}},u.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var i=this._state,a=this._velocity,o=i.length-this.dimension,s=this.bounds,l=s[0],u=s[1],c=t-e,h=c>1e-6?1/c:0;this._time.push(t);for(var f=r;f>0;--f){var d=arguments[f];i.push(n(l[f-1],u[f-1],i[o++]+d)),a.push(d*h)}}},u.idle=function(t){var e=this.lastT();if(!(t=0;--h)i.push(n(l[h],u[h],i[o]+c*a[o])),a.push(0),o+=1}}},{"binary-search-bounds":58,"cubic-hermite":101}],126:[function(t,e,r){"use strict";function n(t){t=t||{};var e,r,n=t.canvas||document.createElement("canvas"),a=t.family||"monospace",o=t.shape||[512,512],s=t.step||[32,32],l=t.size||16,u=t.chars||[32,126],c=Math.floor((s[0]-l)/2),h=t.radius||1.5*c,f=new i(l,c,h,0,a);if("number"==typeof l&&(l+="px"),Array.isArray(u)){if(2===u.length&&"number"==typeof u[0]&&"number"==typeof u[1]){var d=[];for(e=u[0],r=0;e<=u[1];e++)d[r++]=String.fromCharCode(e);u=d}}else u=String(u).split("");o=o.slice(),n.width=o[0],n.height=o[1];var p=n.getContext("2d");p.fillStyle="#000",p.fillRect(0,0,n.width,n.height),p.font=l+" "+a,p.textBaseline="middle";var m=0,g=0,v=Math.min(u.length,Math.floor(o[0]/s[0])*Math.ceil(o[1]/s[1])),y=f.ctx.textAlign,b=f.buffer;for(f.ctx.textAlign="center",f.buffer=f.size/2,e=0;eo[0]-s[0]&&(m=0,g+=s[1])}return f.ctx.textAlign=y,f.buffer=b,n}var i=t("tiny-sdf");e.exports=n},{"tiny-sdf":520}],127:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function i(t){return new n(t._color,t.key,t.value,t.left,t.right,t._count)}function a(t,e){return new n(t,e.key,e.value,e.left,e.right,e._count)}function o(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function s(t,e){this._compare=t,this.root=e}function l(t,e){if(e.left){var r=l(t,e.left);if(r)return r}var r=t(e.key,e.value);return r||(e.right?l(t,e.right):void 0)}function u(t,e,r,n){if(e(t,n.key)<=0){if(n.left){var i=u(t,e,r,n.left);if(i)return i}var i=r(n.key,n.value);if(i)return i}if(n.right)return u(t,e,r,n.right)}function c(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=c(t,e,r,n,i.left)))return a;if(s>0&&(a=n(i.key,i.value)))return a}if(s>0&&i.right)return c(t,e,r,n,i.right)}function h(t,e){this.tree=t,this._stack=e}function f(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t){for(var e,r,n,s,l=t.length-1;l>=0;--l){if(e=t[l],0===l)return void(e._color=v);if(r=t[l-1],r.left===e){if(n=r.right,n.right&&n.right._color===g){if(n=r.right=i(n),s=n.right=i(n.right),r.right=n.left,n.left=r,n.right=s,n._color=r._color,e._color=v,r._color=v,s._color=v,o(r),o(n),l>1){var u=t[l-2];u.left===r?u.left=n:u.right=n}return void(t[l-1]=n)}if(n.left&&n.left._color===g){if(n=r.right=i(n),s=n.left=i(n.left),r.right=s.left,n.left=s.right,s.left=r,s.right=n,s._color=r._color,r._color=v,n._color=v,e._color=v,o(r),o(n),o(s),l>1){var u=t[l-2];u.left===r?u.left=s:u.right=s}return void(t[l-1]=s)}if(n._color===v){if(r._color===g)return r._color=v,void(r.right=a(g,n));r.right=a(g,n);continue}if(n=i(n),r.right=n.left,n.left=r,n._color=r._color,r._color=g,o(r),o(n),l>1){var u=t[l-2];u.left===r?u.left=n:u.right=n}t[l-1]=n,t[l]=r,l+11){var u=t[l-2];u.right===r?u.right=n:u.left=n}return void(t[l-1]=n)}if(n.right&&n.right._color===g){if(n=r.left=i(n),s=n.right=i(n.right),r.left=s.right,n.right=s.left,s.right=r,s.left=n,s._color=r._color,r._color=v,n._color=v,e._color=v,o(r),o(n),o(s),l>1){var u=t[l-2];u.right===r?u.right=s:u.left=s}return void(t[l-1]=s)}if(n._color===v){if(r._color===g)return r._color=v,void(r.left=a(g,n));r.left=a(g,n);continue}if(n=i(n),r.left=n.right,n.right=r,n._color=r._color,r._color=g,o(r),o(n),l>1){var u=t[l-2];u.right===r?u.right=n:u.left=n}t[l-1]=n,t[l]=r,l+1e?1:0}function m(t){return new s(t||p,null)}e.exports=m;var g=0,v=1,y=s.prototype;Object.defineProperty(y,"keys",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(y,"values",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(y,"length",{get:function(){return this.root?this.root._count:0}}),y.insert=function(t,e){for(var r=this._compare,i=this.root,l=[],u=[];i;){var c=r(t,i.key);l.push(i),u.push(c),i=c<=0?i.left:i.right}l.push(new n(g,t,e,null,null,1));for(var h=l.length-2;h>=0;--h){var i=l[h];u[h]<=0?l[h]=new n(i._color,i.key,i.value,l[h+1],i.right,i._count+1):l[h]=new n(i._color,i.key,i.value,i.left,l[h+1],i._count+1)}for(var h=l.length-1;h>1;--h){var f=l[h-1],i=l[h];if(f._color===v||i._color===v)break;var d=l[h-2];if(d.left===f)if(f.left===i){var p=d.right;if(!p||p._color!==g){if(d._color=g,d.left=f.right,f._color=v,f.right=d,l[h-2]=f,l[h-1]=i,o(d),o(f),h>=3){var m=l[h-3];m.left===d?m.left=f:m.right=f}break}f._color=v,d.right=a(v,p),d._color=g,h-=1}else{var p=d.right;if(!p||p._color!==g){if(f.right=i.left,d._color=g,d.left=i.right,i._color=v,i.left=f,i.right=d,l[h-2]=i,l[h-1]=f,o(d),o(f),o(i),h>=3){var m=l[h-3];m.left===d?m.left=i:m.right=i}break}f._color=v,d.right=a(v,p),d._color=g,h-=1}else if(f.right===i){var p=d.left;if(!p||p._color!==g){if(d._color=g,d.right=f.left,f._color=v,f.left=d,l[h-2]=f,l[h-1]=i,o(d),o(f),h>=3){var m=l[h-3];m.right===d?m.right=f:m.left=f}break}f._color=v,d.left=a(v,p),d._color=g,h-=1}else{var p=d.left;if(!p||p._color!==g){if(f.left=i.right,d._color=g,d.right=i.left,i._color=v,i.right=f,i.left=d,l[h-2]=i,l[h-1]=f,o(d),o(f),o(i),h>=3){var m=l[h-3];m.right===d?m.right=i:m.left=i}break}f._color=v,d.left=a(v,p),d._color=g,h-=1}}return l[0]._color=v,new s(r,l[0])},y.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return l(t,this.root);case 2:return u(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return c(e,r,this._compare,t,this.root)}},Object.defineProperty(y,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(y,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),y.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new h(this,[])},y.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},y.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},y.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},y.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},y.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new h(this,n);r=i<=0?r.left:r.right}return new h(this,[])},y.remove=function(t){var e=this.find(t);return e?e.remove():this},y.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var b=h.prototype;Object.defineProperty(b,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(b,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),b.clone=function(){return new h(this.tree,this._stack.slice())},b.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new n(r._color,r.key,r.value,r.left,r.right,r._count);for(var i=t.length-2;i>=0;--i){var r=t[i];r.left===t[i+1]?e[i]=new n(r._color,r.key,r.value,e[i+1],r.right,r._count):e[i]=new n(r._color,r.key,r.value,r.left,e[i+1],r._count)}if(r=e[e.length-1],r.left&&r.right){var a=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var o=e[a-1];e.push(new n(r._color,o.key,o.value,r.left,r.right,r._count)),e[a-1].key=r.key,e[a-1].value=r.value;for(var i=e.length-2;i>=a;--i)r=e[i],e[i]=new n(r._color,r.key,r.value,r.left,e[i+1],r._count);e[a-1].left=e[a]}if(r=e[e.length-1],r._color===g){var l=e[e.length-2];l.left===r?l.left=null:l.right===r&&(l.right=null),e.pop();for(var i=0;i0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(b,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(b,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),b.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(b,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),b.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var r=new Array(e.length),i=e[e.length-1];r[r.length-1]=new n(i._color,i.key,t,i.left,i.right,i._count);for(var a=e.length-2;a>=0;--a)i=e[a],i.left===e[a+1]?r[a]=new n(i._color,i.key,i.value,r[a+1],i.right,i._count):r[a]=new n(i._color,i.key,i.value,i.left,r[a+1],i._count);return new s(this.tree._compare,r[0])},b.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(b,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],128:[function(t,e,r){function n(t){if(t<0)return Number("0/0");for(var e=o[0],r=o.length-1;r>0;--r)e+=o[r]/(t+r);var n=t+a+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}var i=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],a=607/128,o=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(n(e));e-=1;for(var r=i[0],a=1;a<9;a++)r+=i[a]/(e+a);var o=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(o,e+.5)*Math.exp(-o)*r},e.exports.log=n},{}],129:[function(t,e,r){function n(t){if("Polygon"===t.type)return i(t.coordinates);if("MultiPolygon"===t.type){for(var e=0,r=0;r0){e+=Math.abs(a(t[0]));for(var r=1;r2){for(var r,n,i=0;i=0}var u=t("geojson-area");e.exports=n},{"geojson-area":129}],131:[function(t,e,r){"use strict";function n(t,e,r,n,o,l,u,c){if(r/=e,n/=e,u>=r&&c<=n)return t;if(u>n||c=r&&p<=n)h.push(m);else if(!(d>n||p=e&&s<=r&&i.push(o)}return i}function a(t,e,r,n,i,a){for(var s=[],l=0;lr?(x.push(i(u,p,e),i(u,p,r)),a||(x=o(s,x,g,v,y))):d>=e&&x.push(i(u,p,e)):f>r?dr&&(x.push(i(u,p,r)),a||(x=o(s,x,g,v,y))));u=m[b-1],f=u[n],f>=e&&f<=r&&x.push(u),h=x[x.length-1],a&&h&&(x[0][0]!==h[0]||x[0][1]!==h[1])&&x.push(x[0]),o(s,x,g,v,y)}return s}function o(t,e,r,n,i){return e.length&&(e.area=r,e.dist=n,void 0!==i&&(e.outer=i),t.push(e)),[]}e.exports=n;var s=t("./feature")},{"./feature":133}],132:[function(t,e,r){"use strict";function n(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n1?1:n,[r,n,0]}function s(t){for(var e,r,n=0,i=0,a=0;a1)return!1;var a=i.geometry[0].length;if(5!==a)return!1;for(var o=0;o1&&console.time("creation"),b=this.tiles[y]=p(t,v,r,n,x,e===d.maxZoom),this.tileCoords.push({z:e,x:r,y:n}),m)){m>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,n,b.numFeatures,b.numPoints,b.numSimplified),console.timeEnd("creation"));var _="z"+e;this.stats[_]=(this.stats[_]||0)+1,this.total++}if(b.source=t,i){if(e===d.maxZoom||e===i)continue;var w=1<1&&console.time("clipping");var M,k,A,T,S,E,L=.5*d.buffer/d.extent,C=.5-L,z=.5+L,D=1+L;M=k=A=T=null,S=f(t,v,r-L,r+z,0,o,b.min[0],b.max[0]),E=f(t,v,r+C,r+D,0,o,b.min[0],b.max[0]),S&&(M=f(S,v,n-L,n+z,1,s,b.min[1],b.max[1]),k=f(S,v,n+C,n+D,1,s,b.min[1],b.max[1])),E&&(A=f(E,v,n-L,n+z,1,s,b.min[1],b.max[1]),T=f(E,v,n+C,n+D,1,s,b.min[1],b.max[1])),m>1&&console.timeEnd("clipping"),t.length&&(h.push(M||[],e+1,2*r,2*n),h.push(k||[],e+1,2*r,2*n+1),h.push(A||[],e+1,2*r+1,2*n),h.push(T||[],e+1,2*r+1,2*n+1))}else i&&(g=e)}return g},i.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,o=n.debug,s=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var c,f=t,d=e,p=r;!c&&f>0;)f--,d=Math.floor(d/2),p=Math.floor(p/2),c=this.tiles[a(f,d,p)];if(!c||!c.source)return null;if(o>1&&console.log("found parent tile z%d-%d-%d",f,d,p),u(c,i,n.buffer))return h.tile(c,i);o>1&&console.time("drilling down");var m=this.splitTile(c.source,f,d,p,t,e,r);if(o>1&&console.timeEnd("drilling down"),null!==m){var g=1<n&&(o=r,n=a);n>s?(t[o][2]=n,h.push(u),h.push(o),u=o):(c=h.pop(),u=h.pop())}}function i(t,e,r){var n=e[0],i=e[1],a=r[0],o=r[1],s=t[0],l=t[1],u=a-n,c=o-i;if(0!==u||0!==c){var h=((s-n)*u+(l-i)*c)/(u*u+c*c);h>1?(n=a,i=o):h>0&&(n+=u*h,i+=c*h)}return u=s-n,c=l-i,u*u+c*c}e.exports=n},{}],136:[function(t,e,r){"use strict";function n(t,e,r,n,a,o){for(var s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z2:e,transformed:!1,min:[2,1],max:[-1,0]},l=0;ls.max[0]&&(s.max[0]=c[0]),c[1]>s.max[1]&&(s.max[1]=c[1])}return s}function i(t,e,r,n){var i,o,s,l,u=e.geometry,c=e.type,h=[],f=r*r;if(1===c)for(i=0;if)&&(d.push(l),t.numSimplified++),t.numPoints++;3===c&&a(d,s.outer),h.push(d)}else t.numPoints+=s.length;if(h.length){var p={geometry:h,type:c,tags:e.tags||null};null!==e.id&&(p.id=e.id),t.features.push(p)}}function a(t,e){o(t)<0===e&&t.reverse()}function o(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i0?(d[c]=-1,p[c]=0):(d[c]=0,p[c]=1)}}function s(t,e){var r=new i(t);return r.update(e),r}e.exports=s;var l=t("./lib/text.js"),u=t("./lib/lines.js"),c=t("./lib/background.js"),h=t("./lib/cube.js"),f=t("./lib/ticks.js"),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=i.prototype;p.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,n=e.bind(this,!1,Number),i=e.bind(this,!1,Boolean),a=e.bind(this,!1,String),o=e.bind(this,!0,function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]}),s=!1,c=!1;if("bounds"in t)for(var h=t.bounds,d=0;d<2;++d)for(var p=0;p<3;++p)h[d][p]!==this.bounds[d][p]&&(c=!0),this.bounds[d][p]=h[d][p];if("ticks"in t){r=t.ticks,s=!0,this.autoTicks=!1;for(var d=0;d<3;++d)this.tickSpacing[d]=0}else n("tickSpacing")&&(this.autoTicks=!0,c=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),c=!0,s=!0,this._firstInit=!1),c&&this.autoTicks&&(r=f.create(this.bounds,this.tickSpacing),s=!0),s){for(var d=0;d<3;++d)r[d].sort(function(t,e){return t.x-e.x});f.equal(r,this.ticks)?s=!1:this.ticks=r}i("tickEnable"),a("tickFont")&&(s=!0),n("tickSize"),n("tickAngle"),n("tickPad"),o("tickColor");var m=a("labels");a("labelFont")&&(m=!0),i("labelEnable"),n("labelSize"),n("labelPad"),o("labelColor"),i("lineEnable"),i("lineMirror"),n("lineWidth"),o("lineColor"),i("lineTickEnable"),i("lineTickMirror"),n("lineTickLength"),n("lineTickWidth"),o("lineTickColor"),i("gridEnable"),n("gridWidth"),o("gridColor"),i("zeroEnable"),o("zeroLineColor"),n("zeroLineWidth"),i("backgroundEnable"),o("backgroundColor"),this._text?this._text&&(m||s)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=l(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&s&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};var m=[new a,new a,new a],g=[0,0,0],v={model:d,view:d,projection:d};p.isOpaque=function(){return!0},p.isTransparent=function(){return!1},p.drawTransparent=function(t){};var y=[0,0,0],b=[0,0,0],x=[0,0,0];p.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||d,i=t.view||d,a=t.projection||d,s=this.bounds,l=h(r,i,a,s),u=l.cubeEdges,c=l.axis,f=i[12],p=i[13],_=i[14],w=i[15],M=this.pixelRatio*(a[3]*f+a[7]*p+a[11]*_+a[15]*w)/e.drawingBufferHeight,k=0;k<3;++k)this.lastCubeProps.cubeEdges[k]=u[k],this.lastCubeProps.axis[k]=c[k];for(var A=m,k=0;k<3;++k)o(m[k],k,this.bounds,u,c);for(var e=this.gl,T=g,k=0;k<3;++k)this.backgroundEnable[k]?T[k]=c[k]:T[k]=0;this._background.draw(r,i,a,s,T,this.backgroundColor),this._lines.bind(r,i,a,this);for(var k=0;k<3;++k){var S=[0,0,0];c[k]>0?S[k]=s[1][k]:S[k]=s[0][k];for(var E=0;E<2;++E){var L=(k+1+E)%3,C=(k+1+(1^E))%3;this.gridEnable[L]&&this._lines.drawGrid(L,C,this.bounds,S,this.gridColor[L],this.gridWidth[L]*this.pixelRatio)}for(var E=0;E<2;++E){var L=(k+1+E)%3,C=(k+1+(1^E))%3;this.zeroEnable[C]&&s[0][C]<=0&&s[1][C]>=0&&this._lines.drawZero(L,C,this.bounds,S,this.zeroLineColor[C],this.zeroLineWidth[C]*this.pixelRatio)}}for(var k=0;k<3;++k){this.lineEnable[k]&&this._lines.drawAxisLine(k,this.bounds,A[k].primalOffset,this.lineColor[k],this.lineWidth[k]*this.pixelRatio), -this.lineMirror[k]&&this._lines.drawAxisLine(k,this.bounds,A[k].mirrorOffset,this.lineColor[k],this.lineWidth[k]*this.pixelRatio);for(var z=n(y,A[k].primalMinor),D=n(b,A[k].mirrorMinor),I=this.lineTickLength,E=0;E<3;++E){var P=M/r[5*E];z[E]*=I[E]*P,D[E]*=I[E]*P}this.lineTickEnable[k]&&this._lines.drawAxisTicks(k,A[k].primalOffset,z,this.lineTickColor[k],this.lineTickWidth[k]*this.pixelRatio),this.lineTickMirror[k]&&this._lines.drawAxisTicks(k,A[k].mirrorOffset,D,this.lineTickColor[k],this.lineTickWidth[k]*this.pixelRatio)}this._text.bind(r,i,a,this.pixelRatio);for(var k=0;k<3;++k){for(var O=A[k].primalMinor,R=n(x,A[k].primalOffset),E=0;E<3;++E)this.lineTickEnable[k]&&(R[E]+=M*O[E]*Math.max(this.lineTickLength[E],0)/r[5*E]);if(this.tickEnable[k]){for(var E=0;E<3;++E)R[E]+=M*O[E]*this.tickPad[E]/r[5*E];this._text.drawTicks(k,this.tickSize[k],this.tickAngle[k],R,this.tickColor[k])}if(this.labelEnable[k]){for(var E=0;E<3;++E)R[E]+=M*O[E]*this.labelPad[E]/r[5*E];R[k]+=.5*(s[0][k]+s[1][k]),this._text.drawLabel(k,this.labelSize[k],this.labelAngle[k],R,this.labelColor[k])}}},p.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":141,"./lib/cube.js":142,"./lib/lines.js":143,"./lib/text.js":145,"./lib/ticks.js":146}],141:[function(t,e,r){"use strict";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}function i(t){for(var e=[],r=[],i=0,l=0;l<3;++l)for(var u=(l+1)%3,c=(l+2)%3,h=[0,0,0],f=[0,0,0],d=-1;d<=1;d+=2){r.push(i,i+2,i+1,i+1,i+2,i+3),h[l]=d,f[l]=d;for(var p=-1;p<=1;p+=2){h[u]=p;for(var m=-1;m<=1;m+=2)h[c]=m,e.push(h[0],h[1],h[2],f[0],f[1],f[2]),i+=1}var g=u;u=c,c=g}var v=a(t,new Float32Array(e)),y=a(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),b=o(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],y),x=s(t);return x.attributes.position.location=0,x.attributes.normal.location=1,new n(t,v,b,x)}e.exports=i;var a=t("gl-buffer"),o=t("gl-vao"),s=t("./shaders").bg,l=n.prototype;l.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),l.disable(l.POLYGON_OFFSET_FILL)}},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":144,"gl-buffer":148,"gl-vao":262}],142:[function(t,e,r){"use strict";function n(t,e,r){for(var n=0;n<4;++n){t[n]=r[12+n];for(var i=0;i<3;++i)t[n]+=e[i]*r[4*i+n]}}function i(t){for(var e=0;eS&&(_|=1<S&&(_|=1<f[m][1]&&(O=m));for(var R=-1,m=0;m<3;++m){var j=O^1<f[F][0]&&(F=j)}}var N=g;N[0]=N[1]=N[2]=0,N[o.log2(R^O)]=O&R,N[o.log2(O^F)]=O&F;var B=7^F;B===_||B===P?(B=7^R,N[o.log2(F^B)]=B&F):N[o.log2(R^B)]=B&R;for(var U=v,V=_,k=0;k<3;++k)U[k]=V&1< 0.0) {\n vec3 nPosition = mix(bounds[0], bounds[1], 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n colorChannel = abs(normal);\n}","precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] + \n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}",null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":246}],145:[function(t,e,r){(function(r){"use strict";function n(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}function i(t,e){try{return l(t,e)}catch(t){return console.warn("error vectorizing text:",t),{cells:[],positions:[]}}}function a(t,e,r,i,a,l){var c=o(t),h=s(t,[{buffer:c,size:3}]),f=u(t);f.attributes.position.location=0;var d=new n(t,f,c,h);return d.update(e,r,i,a,l),d}e.exports=a;var o=t("gl-buffer"),s=t("gl-vao"),l=t("vectorize-text"),u=t("./shaders").text,c=window||r.global||{},h=c.__TEXT_CACHE||{};c.__TEXT_CACHE={};var f=n.prototype,d=[0,0];f.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},f.update=function(t,e,r,n,a){function o(t,e,r,n){var a=h[r];a||(a=h[r]={});var o=a[e];o||(o=a[e]=i(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle"}));for(var l=(n||12)/12,u=o.positions,c=o.cells,f=0,d=c.length;f=0;--m){var g=u[p[m]];s.push(l*g[0],-l*g[1],t)}}for(var s=(this.gl,[]),l=[0,0,0],u=[0,0,0],c=[0,0,0],f=[0,0,0],d=0;d<3;++d){c[d]=s.length/3|0,o(.5*(t[0][d]+t[1][d]),e[d],r),f[d]=(s.length/3|0)-c[d],l[d]=s.length/3|0;for(var p=0;p=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,u=o%a;o<0?(l=0|-Math.ceil(l),u=0|-u):(l=0|Math.floor(l),u|=0);var c=""+l;if(o<0&&(c="-"+c),i){for(var h=""+u;h.length=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r}function a(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function a(t,e){for(var r=l.malloc(t.length,e),n=t.length,i=0;i=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}function s(t,e,r,i){if(r=r||t.ARRAY_BUFFER,i=i||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(i!==t.DYNAMIC_DRAW&&i!==t.STATIC_DRAW&&i!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var a=t.createBuffer(),o=new n(t,r,a,0,i);return o.update(e),o}var l=t("typedarray-pool"),u=t("ndarray-ops"),c=t("ndarray"),h=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"],f=n.prototype;f.bind=function(){this.gl.bindBuffer(this.type,this.handle)},f.unbind=function(){this.gl.bindBuffer(this.type,null)},f.dispose=function(){this.gl.deleteBuffer(this.handle)},f.update=function(t,e){if("number"!=typeof e&&(e=-1),this.bind(),"object"==typeof t&&void 0!==t.shape){var r=t.dtype;if(h.indexOf(r)<0&&(r="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){r=gl.getExtension("OES_element_index_uint")&&"uint16"!==r?"uint32":"uint16"}if(r===t.dtype&&o(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=i(this.gl,this.type,this.length,this.usage,t.data,e):this.length=i(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var n=l.malloc(t.size,r),s=c(n,t.shape);u.assign(s,t),this.length=e<0?i(this.gl,this.type,this.length,this.usage,n,e):i(this.gl,this.type,this.length,this.usage,n.subarray(0,t.size),e),l.free(n)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?a(t,"uint16"):a(t,"float32"),this.length=e<0?i(this.gl,this.type,this.length,this.usage,f,e):i(this.gl,this.type,this.length,this.usage,f.subarray(0,t.length),e),l.free(f)}else if("object"==typeof t&&"number"==typeof t.length)this.length=i(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");t|=0,t<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=s},{ndarray:456,"ndarray-ops":450,"typedarray-pool":528}],149:[function(t,e,r){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],150:[function(t,e,r){var n=t("./1.0/numbers");e.exports=function(t){return n[t]}},{"./1.0/numbers":149}],151:[function(t,e,r){"use strict";function n(t,e,r,n){this.plot=t,this.shader=e,this.bufferHi=r,this.bufferLo=n,this.bounds=[1/0,1/0,-1/0,-1/0],this.numPoints=0,this.color=[0,0,0,1]}function i(t,e){var r=a(t.gl,l.vertex,l.fragment),i=o(t.gl),s=o(t.gl),u=new n(t,r,i,s);return u.update(e),t.addObject(u),u}var a=t("gl-shader"),o=t("gl-buffer"),s=t("typedarray-pool"),l=t("./lib/shaders");e.exports=i;var u=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]],c=n.prototype;c.draw=function(){var t=new Float32Array([0,0]),e=new Float32Array([0,0]),r=new Float32Array([0,0]),n=new Float32Array([0,0]),i=[1,1];return function(){var a=this.plot,o=this.shader,s=this.bounds,l=this.numPoints;if(l){var c=a.gl,h=a.dataBox,f=a.viewBox,d=a.pixelRatio,p=s[2]-s[0],m=s[3]-s[1],g=h[2]-h[0],v=h[3]-h[1],y=2*p/g,b=2*m/v,x=(s[0]-h[0]-.5*g)/p,_=(s[1]-h[1]-.5*v)/m;t[0]=y,t[1]=b,e[0]=y-t[0],e[1]=b-t[1],r[0]=x,r[1]=_,n[0]=x-r[0],n[1]=_-r[1];var w=f[2]-f[0],M=f[3]-f[1];i[0]=2*d/w,i[1]=2*d/M,o.bind(),o.uniforms.scaleHi=t,o.uniforms.scaleLo=e,o.uniforms.translateHi=r,o.uniforms.translateLo=n,o.uniforms.pixelScale=i,o.uniforms.color=this.color,this.bufferLo.bind(),o.attributes.positionLo.pointer(c.FLOAT,!1,16,0),this.bufferHi.bind(),o.attributes.positionHi.pointer(c.FLOAT,!1,16,0),o.attributes.pixelOffset.pointer(c.FLOAT,!1,16,8),c.drawArrays(c.TRIANGLES,0,l*u.length)}}}(),c.drawPick=function(t){return t},c.pick=function(){return null},c.update=function(t){t=t||{};var e,r,n,i=t.positions||[],a=t.errors||[],o=1;"lineWidth"in t&&(o=+t.lineWidth);var l=5;"capSize"in t&&(l=+t.capSize),this.color=(t.color||[0,0,0,1]).slice();var c=this.bounds=[1/0,1/0,-1/0,-1/0],h=this.numPoints=i.length>>1;for(e=0;e0&&(T*=_),S<0?S*=w:S>0&&(S*=M),g[b++]=f*(r-p+T),g[b++]=d*(n-m+S),g[b++]=o*A[2]+(l+o)*A[4],g[b++]=o*A[3]+(l+o)*A[5]}}for(e=0;e=1},h.isTransparent=function(){return this.opacity<1},h.drawTransparent=h.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||c,i=r.projection=t.projection||c;r.model=t.model||c,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],o=n[13],s=n[14],l=n[15],u=this.pixelRatio*(i[3]*a+i[7]*o+i[11]*s+i[15]*l)/e.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)e.lineWidth(this.lineWidth[h]),r.capSize=this.capSize[h]*u,e.drawArrays(e.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var f=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=(n+e)%3,o=[0,0,0];o[a]=i,r.push(o)}t[e]=r}return t}();h.update=function(t){t=t||{},"lineWidth"in t&&(this.lineWidth=t.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in t&&(this.capSize=t.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),"opacity"in t&&(this.opacity=t.opacity);var e=t.color||[[0,0,0],[0,0,0],[0,0,0]],r=t.position,n=t.error;if(Array.isArray(e[0])||(e=[e,e,e]),r&&n){var o=[],s=r.length,l=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var u=0;u<3;++u){this.lineOffset[u]=l;t:for(var c=0;c0){var m=h.slice();m[u]+=d[1][u],o.push(h[0],h[1],h[2],p[0],p[1],p[2],p[3],0,0,0,m[0],m[1],m[2],p[0],p[1],p[2],p[3],0,0,0),i(this.bounds,m),l+=2+a(o,m,p,u)}}}this.lineCount[u]=l-this.lineOffset[u]}this.buffer.update(o)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":154,"gl-buffer":148,"gl-vao":262}], -154:[function(t,e,r){"use strict";var n=t("gl-shader");e.exports=function(t){return n(t,"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}","precision mediump float;\n#define GLSLIFY 1\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if(any(lessThan(fragPosition, clipBounds[0])) || any(greaterThan(fragPosition, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = opacity * fragColor;\n}",null,[{name:"position",type:"vec3"},{name:"offset",type:"vec3"},{name:"color",type:"vec4"}])}},{"gl-shader":246}],155:[function(t,e,r){"use strict";function n(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function i(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function a(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);y=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;a1&&f.drawBuffersWEBGL(y[h]);var v=r.getExtension("WEBGL_depth_texture");v?d?t.depth=s(r,u,c,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p&&(t.depth=s(r,u,c,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):p&&d?t._depth_rb=l(r,u,c,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p?t._depth_rb=l(r,u,c,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=l(r,u,c,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var b=r.checkFramebufferStatus(r.FRAMEBUFFER);if(b!==r.FRAMEBUFFER_COMPLETE){t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null);for(var g=0;gs||r<0||r>s)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var l=n(a),u=0;uo||r<0||r>o)throw new Error("gl-fbo: Parameters are too large for FBO");n=n||{};var s=1;if("color"in n){if((s=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(s>1){if(!i)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(s>t.getParameter(i.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+s+" draw buffers")}}var l=t.UNSIGNED_BYTE,u=t.getExtension("OES_texture_float");if(n.float&&s>0){if(!u)throw new Error("gl-fbo: Context does not support floating point textures");l=t.FLOAT}else n.preferFloat&&s>0&&u&&(l=t.FLOAT);var h=!0;"depth"in n&&(h=!!n.depth);var f=!1;return"stencil"in n&&(f=!!n.stencil),new c(t,e,r,l,s,h,f,i)}var d=t("gl-texture2d");e.exports=f;var p,m,g,v,y=null,b=c.prototype;Object.defineProperties(b,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(t){if(Array.isArray(t)||(t=[0|t,0|t]),2!==t.length)throw new Error("gl-fbo: Shape vector must be length 2");var e=0|t[0],r=0|t[1];return h(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return t|=0,h(this,t,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t},enumerable:!1}}),b.bind=function(){if(!this._destroyed){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.handle),t.viewport(0,0,this._shape[0],this._shape[1])}},b.dispose=function(){if(!this._destroyed){this._destroyed=!0;var t=this.gl;t.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(t.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var e=0;e>8*d&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=t,p.pickOffset=e,p.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),h.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},h.update=function(t){t=t||{};var e=t.shape||[0,0],r=t.x||o(e[0]),n=t.y||o(e[1]),i=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=n;var l=t.colorLevels||[0],u=t.colorValues||[0,0,0,1],c=l.length,h=this.bounds,d=h[0]=r[0],p=h[1]=n[0],m=h[2]=r[r.length-1],g=h[3]=n[n.length-1],v=1/(m-d),y=1/(g-p),b=e[0],x=e[1];this.shape=[b,x];var _=(b-1)*(x-1)*(f.length>>>1);this.numVertices=_;for(var w=s.mallocUint8(4*_),M=s.mallocFloat32(2*_),k=s.mallocUint8(2*_),A=s.mallocUint32(_),T=0,S=0;S2&&!this.usingDashes){var b=this.mitreShader;this.lineBufferLo.bind(),b.attributes.aLo.pointer(l.FLOAT,!1,48,0),this.lineBufferHi.bind(),b.bind();var x=b.uniforms;this.setProjectionUniforms(x,a),x.color=c,x.radius=s*u,b.attributes.aHi.pointer(l.FLOAT,!1,48,0),l.drawArrays(l.POINTS,0,i/3|0)}}}}(),f.drawPick=function(){var t=[0,0,0,0];return function(e){var r=this.vertCount,n=this.numPoints;if(this.pickOffset=e,!r)return e+n;var i=this.setProjectionModel(),a=this.plot,o=this.width,s=a.gl,l=a.pickPixelRatio,u=this.pickShader,c=this.pickBuffer;t[0]=255&e,t[1]=e>>>8&255,t[2]=e>>>16&255,t[3]=e>>>24,u.bind();var h=u.uniforms;this.setProjectionUniforms(h,i),h.width=o*l,h.pickOffset=t;var f=u.attributes;return this.lineBufferHi.bind(),f.aHi.pointer(s.FLOAT,!1,16,0),f.dHi.pointer(s.FLOAT,!1,16,8),this.lineBufferLo.bind(),f.aLo.pointer(s.FLOAT,!1,16,0),c.bind(),f.pick0.pointer(s.UNSIGNED_BYTE,!1,8,0),f.pick1.pointer(s.UNSIGNED_BYTE,!1,8,4),s.drawArrays(s.TRIANGLES,0,r),e+n}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.numPoints;if(r=n+i)return null;var a=r-n,o=this.data;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}},f.update=function(t){t=t||{};var e,r,n,a,o,s=this.plot.gl;this.color=(t.color||[0,0,1,1]).slice(),this.width=+(t.width||1),this.fill=(t.fill||[!1,!1,!1,!1]).slice(),this.fillColor=i(t.fillColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var h=t.dashes||[1],f=0;for(e=0;e1,this.dashPattern=l(s,u(d,[f,1,4],[1,0,0])),this.dashPattern.minFilter=s.NEAREST,this.dashPattern.magFilter=s.NEAREST,this.dashLength=f,c.free(d);var m=t.positions;this.data=m;var g=this.bounds;g[0]=g[1]=1/0,g[2]=g[3]=-1/0;var v=this.numPoints=m.length>>>1;if(0!==v){for(e=0;e1;){var A=--n;a=m[2*n],o=m[2*n+1];var T=A-1,S=m[2*T],E=m[2*T+1];if(!(isNaN(a)||isNaN(o)||isNaN(S)||isNaN(E))){k+=1,a=(a-g[0])/(g[2]-g[0]),o=(o-g[1])/(g[3]-g[1]),S=(S-g[0])/(g[2]-g[0]),E=(E-g[1])/(g[3]-g[1]);var L=S-a,C=E-o,z=A|1<<24,D=A-1,I=A,P=A-1|1<<24;y[--w]=-C,y[--w]=-L,y[--w]=o,y[--w]=a,_[--M]=z,_[--M]=D,y[--w]=C,y[--w]=L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=-C,y[--w]=-L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=C,y[--w]=L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=-C,y[--w]=-L,y[--w]=o,y[--w]=a,_[--M]=z,_[--M]=D,y[--w]=C,y[--w]=L,y[--w]=o,y[--w]=a,_[--M]=z,_[--M]=D}}for(e=0;e FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n highp float e = floor(log2(av));\n highp float m = av * pow(2.0, -e) - 1.0;\n \n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n \n //Unpack exponent\n highp float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0; \n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\n\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if(any(lessThan(worldPosition, clipBounds[0])) || any(greaterThan(worldPosition, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = vec4(pickId/255.0, encode_float_1_0(pixelArcLength).xyz);\n}",null,a)}},{"gl-shader":246}],163:[function(t,e,r){"use strict";function n(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function i(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function a(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function o(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.dirty=!0,this.pixelRatio=1}function s(t){var e=t.gl||t.scene&&t.scene.gl,r=m(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var n=g(e);n.attributes.position.location=0,n.attributes.nextPosition.location=1,n.attributes.arcLength.location=2,n.attributes.lineWidth.location=3,n.attributes.color.location=4;for(var i=l(e),a=u(e,[{buffer:i,size:3,offset:0,stride:48},{buffer:i,size:3,offset:12,stride:48},{buffer:i,size:1,offset:24,stride:48},{buffer:i,size:1,offset:28,stride:48},{buffer:i,size:4,offset:32,stride:48}]),s=d(new Array(1024),[256,1,4]),h=0;h<1024;++h)s.data[h]=255;var f=c(e,s);f.wrap=e.REPEAT;var p=new o(e,r,n,i,a,f);return p.update(t),p}e.exports=s;var l=t("gl-buffer"),u=t("gl-vao"),c=t("gl-texture2d"),h=t("glsl-read-float"),f=t("binary-search-bounds"),d=t("ndarray"),p=t("./lib/shaders"),m=p.createShader,g=p.createPickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],y=o.prototype;y.isTransparent=function(){return this.opacity<1},y.isOpaque=function(){return this.opacity>=1},y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.drawTransparent=y.draw=function(t){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||v,view:t.view||v,projection:t.projection||v,clipBounds:i(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},y.drawPick=function(t){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||v,view:t.view||v,projection:t.projection||v,pickId:this.pickId,clipBounds:i(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},y.update=function(t){var e,r;this.dirty=!0;var i=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),"opacity"in t&&(this.opacity=+t.opacity);var a=t.position||t.positions;if(a){var o=t.color||t.colors||[0,0,0,1],s=t.lineWidth||1,l=[],u=[],c=[],h=0,p=0,m=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],g=!1;t:for(e=1;e0){for(var b=0;b<24;++b)l.push(l[l.length-12]);p+=2,g=!0}continue t}m[0][r]=Math.min(m[0][r],v[r],y[r]),m[1][r]=Math.max(m[1][r],v[r],y[r])}var x,_;Array.isArray(o[0])?(x=o[e-1],_=o[e]):x=_=o,3===x.length&&(x=[x[0],x[1],x[2],1]),3===_.length&&(_=[_[0],_[1],_[2],1]);var w;w=Array.isArray(s)?s[e-1]:s;var M=h;if(h+=n(v,y),g){for(r=0;r<2;++r)l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,x[0],x[1],x[2],x[3]);p+=2,g=!1}l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,x[0],x[1],x[2],x[3],v[0],v[1],v[2],y[0],y[1],y[2],M,-w,x[0],x[1],x[2],x[3],y[0],y[1],y[2],v[0],v[1],v[2],h,-w,_[0],_[1],_[2],_[3],y[0],y[1],y[2],v[0],v[1],v[2],h,w,_[0],_[1],_[2],_[3]),p+=4}if(this.buffer.update(l),u.push(h),c.push(a[a.length-1].slice()),this.bounds=m,this.vertexCount=p,this.points=c,this.arcLength=u,"dashes"in t){var k=t.dashes,A=k.slice();for(A.unshift(0),e=1;e0?(n=2*Math.sqrt(r+1),t[3]=.25*n,t[0]=(e[6]-e[9])/n,t[1]=(e[8]-e[2])/n,t[2]=(e[1]-e[4])/n):e[0]>e[5]&e[0]>e[10]?(n=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/n,t[0]=.25*n,t[1]=(e[1]+e[4])/n,t[2]=(e[8]+e[2])/n):e[5]>e[10]?(n=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/n,t[0]=(e[1]+e[4])/n,t[1]=.25*n,t[2]=(e[6]+e[9])/n):(n=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/n,t[0]=(e[8]+e[2])/n,t[1]=(e[6]+e[9])/n,t[2]=.25*n),t},i.fromRotationTranslationScale=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3],l=i+i,u=a+a,c=o+o,h=i*l,f=i*u,d=i*c,p=a*u,m=a*c,g=o*c,v=s*l,y=s*u,b=s*c,x=n[0],_=n[1],w=n[2];return t[0]=(1-(p+g))*x,t[1]=(f+b)*x,t[2]=(d-y)*x,t[3]=0,t[4]=(f-b)*_,t[5]=(1-(h+g))*_,t[6]=(m+v)*_,t[7]=0,t[8]=(d+y)*w,t[9]=(m-v)*w,t[10]=(1-(h+p))*w,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},i.fromRotationTranslationScaleOrigin=function(t,e,r,n,i){var a=e[0],o=e[1],s=e[2],l=e[3],u=a+a,c=o+o,h=s+s,f=a*u,d=a*c,p=a*h,m=o*c,g=o*h,v=s*h,y=l*u,b=l*c,x=l*h,_=n[0],w=n[1],M=n[2],k=i[0],A=i[1],T=i[2];return t[0]=(1-(m+v))*_,t[1]=(d+x)*_,t[2]=(p-b)*_,t[3]=0,t[4]=(d-x)*w,t[5]=(1-(f+v))*w,t[6]=(g+y)*w,t[7]=0,t[8]=(p+b)*M,t[9]=(g-y)*M,t[10]=(1-(f+m))*M,t[11]=0,t[12]=r[0]+k-(t[0]*k+t[4]*A+t[8]*T),t[13]=r[1]+A-(t[1]*k+t[5]*A+t[9]*T),t[14]=r[2]+T-(t[2]*k+t[6]*A+t[10]*T),t[15]=1,t},i.fromQuat=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,h=n*s,f=i*o,d=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return t[0]=1-h-p,t[1]=c+v,t[2]=f-g,t[3]=0,t[4]=c-v,t[5]=1-u-p,t[6]=d+m,t[7]=0,t[8]=f+g,t[9]=d-m,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.frustum=function(t,e,r,n,i,a,o){var s=1/(r-e),l=1/(i-n),u=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(o+a)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*u,t[15]=0,t},i.perspective=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t},i.perspectiveFromFieldOfView=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(o-s)*l*.5,t[9]=(i-a)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t},i.ortho=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t},i.lookAt=function(t,e,r,a){var o,s,l,u,c,h,f,d,p,m,g=e[0],v=e[1],y=e[2],b=a[0],x=a[1],_=a[2],w=r[0],M=r[1],k=r[2];return Math.abs(g-w).999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(a.cross(t,i,o),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=1+l,s.normalize(n,n))}}(),s.setAxes=function(){var t=i.create();return function(e,r,n,i){return t[0]=n[0],t[3]=n[1],t[6]=n[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],s.normalize(e,s.fromMat3(e,t))}}(),s.clone=o.clone,s.fromValues=o.fromValues,s.copy=o.copy,s.set=o.set,s.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},s.setAxisAngle=function(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t},s.getAxisAngle=function(t,e){var r=2*Math.acos(e[3]),n=Math.sin(r/2);return 0!=n?(t[0]=e[0]/n,t[1]=e[1]/n,t[2]=e[2]/n):(t[0]=1,t[1]=0,t[2]=0),r},s.add=o.add,s.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1],u=r[2],c=r[3];return t[0]=n*c+o*s+i*u-a*l,t[1]=i*c+o*l+a*s-n*u,t[2]=a*c+o*u+n*l-i*s,t[3]=o*c-n*s-i*l-a*u,t},s.mul=s.multiply,s.scale=o.scale,s.rotateX=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+o*s,t[1]=i*l+a*s,t[2]=a*l-i*s,t[3]=o*l-n*s,t},s.rotateY=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l-a*s,t[1]=i*l+o*s,t[2]=a*l+n*s,t[3]=o*l-i*s,t},s.rotateZ=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+i*s,t[1]=i*l-n*s,t[2]=a*l+o*s,t[3]=o*l-a*s,t},s.calculateW=function(t,e){var r=e[0],n=e[1],i=e[2];return t[0]=r,t[1]=n,t[2]=i,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),t},s.dot=o.dot,s.lerp=o.lerp,s.slerp=function(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=u*d+c*p+h*m+f*g,a<0&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*h+l*m,t[3]=s*f+l*g,t},s.sqlerp=function(){var t=s.create(),e=s.create();return function(r,n,i,a,o,l){return s.slerp(t,n,o,l),s.slerp(e,i,a,l),s.slerp(r,t,e,2*l*(1-l)),r}}(),s.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a,s=o?1/o:0;return t[0]=-r*s,t[1]=-n*s,t[2]=-i*s,t[3]=a*s,t},s.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},s.length=o.length,s.len=s.length,s.squaredLength=o.squaredLength,s.sqrLen=s.squaredLength,s.normalize=o.normalize,s.fromMat3=function(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(e[3*i+i]-e[3*a+a]-e[3*o+o]+1),t[i]=.5*r,r=.5/r,t[3]=(e[3*a+o]-e[3*o+a])*r,t[a]=(e[3*a+i]+e[3*i+a])*r,t[o]=(e[3*o+i]+e[3*i+o])*r}return t},s.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},s.exactEquals=o.exactEquals,s.equals=o.equals,e.exports=s},{"./common.js":185,"./mat3.js":188,"./vec3.js":192,"./vec4.js":193}],191:[function(t,e,r){var n=t("./common.js"),i={};i.create=function(){var t=new n.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},i.fromValues=function(t,e){var r=new n.ARRAY_TYPE(2);return r[0]=t,r[1]=e,r},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},i.set=function(t,e,r){return t[0]=e,t[1]=r,t},i.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t},i.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t},i.sub=i.subtract,i.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},i.mul=i.multiply,i.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},i.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},i.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t},i.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)},i.dist=i.distance,i.squaredDistance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1];return Math.sqrt(e*e+r*r)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1];return e*e+r*r},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},i.cross=function(t,e,r){var n=e[0]*r[1]-e[1]*r[0];return t[0]=t[1]=0,t[2]=n,t},i.lerp=function(t,e,r,n){var i=e[0],a=e[1];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t},i.random=function(t,e){e=e||1;var r=2*n.RANDOM()*Math.PI;return t[0]=Math.cos(r)*e,t[1]=Math.sin(r)*e,t},i.transformMat2=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t},i.transformMat2d=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t},i.transformMat3=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[3]*i+r[6],t[1]=r[1]*n+r[4]*i+r[7],t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=2),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},i.cross=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t},i.lerp=function(t,e,r,n){var i=e[0],a=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t},i.hermite=function(t,e,r,n,i,a){var o=a*a,s=o*(2*a-3)+1,l=o*(a-2)+a,u=o*(a-1),c=o*(3-2*a);return t[0]=e[0]*s+r[0]*l+n[0]*u+i[0]*c,t[1]=e[1]*s+r[1]*l+n[1]*u+i[1]*c,t[2]=e[2]*s+r[2]*l+n[2]*u+i[2]*c,t},i.bezier=function(t,e,r,n,i,a){var o=1-a,s=o*o,l=a*a,u=s*o,c=3*a*s,h=3*l*o,f=l*a;return t[0]=e[0]*u+r[0]*c+n[0]*h+i[0]*f,t[1]=e[1]*u+r[1]*c+n[1]*h+i[1]*f,t[2]=e[2]*u+r[2]*c+n[2]*h+i[2]*f,t},i.random=function(t,e){e=e||1;var r=2*n.RANDOM()*Math.PI,i=2*n.RANDOM()-1,a=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*e,t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t},i.transformMat3=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t},i.transformQuat=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,h=u*i+l*n-o*a,f=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+h*-l-f*-s,t[1]=h*u+d*-s+f*-o-c*-l,t[2]=f*u+d*-l+c*-s-h*-o,t},i.rotateX=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.rotateY=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.rotateZ=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=3),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s1?0:Math.acos(a)},i.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(l))},e.exports=i},{"./common.js":185}],193:[function(t,e,r){var n=t("./common.js"),i={};i.create=function(){var t=new n.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},i.fromValues=function(t,e,r,i){var a=new n.ARRAY_TYPE(4);return a[0]=t,a[1]=e,a[2]=r,a[3]=i,a},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},i.set=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t},i.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t},i.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t},i.sub=i.subtract,i.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t},i.mul=i.multiply,i.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},i.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t},i.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},i.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)},i.dist=i.distance,i.squaredDistance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},i.lerp=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t},i.random=function(t,e){return e=e||1,t[0]=n.RANDOM(),t[1]=n.RANDOM(),t[2]=n.RANDOM(),t[3]=n.RANDOM(),i.normalize(t,t),i.scale(t,t,e),t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t},i.transformQuat=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,h=u*i+l*n-o*a,f=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+h*-l-f*-s,t[1]=h*u+d*-s+f*-o-c*-l,t[2]=f*u+d*-l+c*-s-h*-o,t[3]=e[3],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=4),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s1.0001)return null;g+=m[c]}return Math.abs(g-1)>.001?null:[h,o(t,m),m]}var l=t("barycentric"),u=t("polytope-closest-point/lib/closest_point_2d.js");e.exports=s},{barycentric:41,"polytope-closest-point/lib/closest_point_2d.js":474}],195:[function(t,e,r){var n="precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if(any(lessThan(f_position, clipBounds[0])) || \n any(greaterThan(f_position, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = vec4(pickId, f_id.xyz);\n}";r.meshShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec4 m_position = model * vec4(position, 1.0);\n vec4 t_position = view * m_position;\n gl_Position = projection * t_position;\n f_color = color;\n f_normal = normal;\n f_data = position;\n f_eyeDirection = eyePosition - position;\n f_lightDirection = lightPosition - position;\n f_uv = uv;\n}", -fragment:"precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution_2_0(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\n\n\nfloat cookTorranceSpecular_1_1(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution_2_0(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(f_data, clipBounds[0])) || \n any(greaterThan(f_data, clipBounds[1]))) {\n discard;\n }\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n \n if(!gl_FrontFacing) {\n N = -N;\n }\n\n float specular = cookTorranceSpecular_1_1(L, V, N, roughness, fresnel);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(f_data, clipBounds[0])) || \n any(greaterThan(f_data, clipBounds[1]))) {\n discard;\n }\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(position, clipBounds[0])) || \n any(greaterThan(position, clipBounds[1]))) {\n gl_Position = vec4(0,0,0,0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5,0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}",fragment:n,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if(any(lessThan(position, clipBounds[0])) || \n any(greaterThan(position, clipBounds[1]))) {\n gl_Position = vec4(0,0,0,0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}",fragment:n,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor,1);\n}\n",attributes:[{name:"position",type:"vec3"}]}},{}],196:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l,u,c,h,f,d,p,m,g,v,y,b,x,_,w,M,k,A,T){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=c,this.triangleNormals=f,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=b,this.pointColors=_,this.pointUVs=w,this.pointSizes=M,this.pointIds=x,this.pointVAO=k,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=A,this.contourVAO=T,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this._model=I,this._view=I,this._projection=I,this._resolution=[1,1]}function i(t){for(var e=w({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return _(r,[256,256,4],[4,0,1])}function a(t,e,r){for(var n=new Array(e),i=0;i=1},P.isTransparent=function(){return this.opacity<1},P.pickSlots=1,P.setPickBase=function(t){this.pickId=t},P.highlight=function(t){if(!t||!this.contourEnable)return void(this.contourCount=0);for(var e=M(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=k.mallocFloat32(6*a),s=0,l=0;l0){var f=this.triShader;f.bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var f=this.lineShader;f.bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){var f=this.pointShader;f.bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var f=this.contourShader;f.bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind()}},P.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||I,n=t.view||I,i=t.projection||I,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255},l=this.pickShader;if(l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0){var l=this.pointPickShader;l.bind(),l.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}},P.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;as[k]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n],a.uniforms.angle=v[n],u.drawArrays(u.TRIANGLES,s[k],s[A]-s[k]))),y[n]&&M&&(e[1^n]-=T*d*b[n],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=x[n],a.uniforms.angle=_[n],u.drawArrays(u.TRIANGLES,w,M)),e[1^n]=T*c[2+(1^n)]-1,p[n+2]&&(e[1^n]+=T*d*m[n+2],ks[k]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n+2],a.uniforms.angle=v[n+2],u.drawArrays(u.TRIANGLES,s[k],s[A]-s[k]))),y[n+2]&&M&&(e[1^n]+=T*d*b[n+2],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=x[n+2],a.uniforms.angle=_[n+2],u.drawArrays(u.TRIANGLES,w,M))}}(),c.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,u=r.pixelRatio;if(this.titleCount){for(var c=0;c<2;++c)e[c]=2*(o[c]*u-a[c])/(a[2+c]-a[c])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),c.bind=function(){var t=[0,0],e=[0,0],r=[0,0];return function(){var n=this.plot,i=this.shader,a=n._tickBounds,o=n.dataBox,s=n.screenBox,l=n.viewBox;i.bind();for(var u=0;u<2;++u){var c=a[u],h=a[u+2],f=h-c,d=.5*(o[u+2]+o[u]),p=o[u+2]-o[u],m=l[u],g=l[u+2],v=g-m,y=s[u],b=s[u+2],x=b-y;e[u]=2*f/p*v/x,t[u]=2*(c-d)/p*v/x}r[1]=2*n.pixelRatio/(s[3]-s[1]),r[0]=r[1]*(s[3]-s[1])/(s[2]-s[0]),i.uniforms.dataScale=e,i.uniforms.dataShift=t,i.uniforms.textScale=r,this.vbo.bind(),i.attributes.textCoordinate.pointer()}}(),c.update=function(t){var e,r,n,i,a,o=[],l=t.ticks,u=t.bounds;for(a=0;a<2;++a){var c=[Math.floor(o.length/3)],h=[-1/0],f=l[a];for(e=0;er)for(t=r;te)for(t=e;t=0){for(var k=0|M.type.charAt(M.type.length-1),A=new Array(k),T=0;T=0;)S+=1;w[b]=S}var E=new Array(r.length);a(),d._relink=a,d.types={uniforms:l(r),attributes:l(n)},d.attributes=s(p,d,x,w),Object.defineProperty(d,"uniforms",o(p,d,r,E))},e.exports=a},{"./lib/GLError":204,"./lib/create-attributes":205,"./lib/create-uniforms":206,"./lib/reflect":207,"./lib/runtime-reflect":208,"./lib/shader-cache":209}],204:[function(t,e,r){function n(t,e,r){this.shortMessage=e||"",this.longMessage=r||"",this.rawError=t||"",this.message="gl-shader: "+(e||t||"")+(r?"\n"+r:""),this.stack=(new Error).stack}n.prototype=new Error,n.prototype.name="GLError",n.prototype.constructor=n,e.exports=n},{}],205:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}function i(t,e,r,i,a,o,s){for(var l=["gl","v"],u=[],c=0;c=0){var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+h+": "+f);i(t,e,d[0],n,p,o,h)}else{if(!(f.indexOf("mat")>=0))throw new s("","Unknown data type for attribute "+h+": "+f);var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+h+": "+f);a(t,e,d,n,p,o,h)}}}return o}e.exports=o;var s=t("./GLError"),l=n.prototype;l.pointer=function(t,e,r,n){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,t||a.FLOAT,!!e,r||0,n||0),a.enableVertexAttribArray(o)},l.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(l,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}})},{"./GLError":204}],206:[function(t,e,r){"use strict";function n(t){return new Function("y","return function(){return y}")(t)}function i(t,e){for(var r=new Array(t),n=0;n4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+i+"fv(locations["+e+"],false,obj"+t+")"}throw new s("","Unknown uniform data type for "+name+": "+r)}var i=r.charCodeAt(r.length-1)-48;if(i<2||i>4)throw new s("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+i+"iv(locations["+e+"],obj"+t+")";case"v":return"gl.uniform"+i+"fv(locations["+e+"],obj"+t+")";default:throw new s("","Unrecognized data type for vector "+name+": "+r)}}}function c(t,e){if("object"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],a=t;parseInt(n)+""===n?a+="["+n+"]":a+="."+n,"object"==typeof i?r.push.apply(r,c(a,i)):r.push([a,i])}return r}function h(e){for(var n=["return function updateProperty(obj){"],i=c("",e),o=0;o4)throw new s("","Invalid data type");return"b"===t.charAt(0)?i(r,!1):i(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+t);return i(r*r,0)}throw new s("","Unknown uniform data type for "+name+": "+t)}}function d(t,e,i){if("object"==typeof i){var o=p(i);Object.defineProperty(t,e,{get:n(o),set:h(i),enumerable:!0,configurable:!1})}else a[i]?Object.defineProperty(t,e,{get:l(i),set:h(i),enumerable:!0,configurable:!1}):t[e]=f(r[i].type)}function p(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var u=1;u1)for(var l=0;l=0){var m=e[p]-n[p]*(e[p+2]-e[p])/(n[p+2]-n[p]);0===p?o.drawLine(m,e[1],m,e[3],d[p],f[p]):o.drawLine(e[0],m,e[2],m,d[p],f[p])}}for(var p=0;p=0;--t)this.objects[t].dispose();this.objects.length=0;for(var t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},f.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},f.removeObject=function(t){for(var e=this.objects,r=0;r0){var r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function o(t){return"boolean"!=typeof t||t}function s(t){function e(){if(!w&&Y.autoResize){var t=M.parentNode,e=1,r=1;t&&t!==document.body?(e=t.clientWidth,r=t.clientHeight):(e=window.innerWidth,r=window.innerHeight);var n=0|Math.ceil(e*Y.pixelRatio),i=0|Math.ceil(r*Y.pixelRatio);if(n!==M.width||i!==M.height){M.width=n,M.height=i;var a=M.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=e+"px",a.height=r+"px",N=!0}}}function r(){for(var t=O.length,e=F.length,r=0;r0&&0===j[e-1];)j.pop(),F.pop().dispose()}function s(){if(Y.contextLost)return!0;A.isContextLost()&&(Y.contextLost=!0,Y.mouseListener.enabled=!1,Y.selection.object=null,Y.oncontextloss&&Y.oncontextloss())}function b(){if(!s()){A.colorMask(!0,!0,!0,!0),A.depthMask(!0),A.disable(A.BLEND),A.enable(A.DEPTH_TEST);for(var t=O.length,e=F.length,r=0;rS.distance)continue;for(var u=0;u>>1;for(r=0;r=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}function a(t,e){var r=t.gl,i=s(r),a=s(r),l=o(r,u.pointVertex,u.pointFragment),c=o(r,u.pickVertex,u.pickFragment),h=new n(t,i,a,l,c);return h.update(e),t.addObject(h),h}var o=t("gl-shader"),s=t("gl-buffer"),l=t("typedarray-pool"),u=t("./lib/shader");e.exports=a;var c=n.prototype;c.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},c.update=function(t){function e(e,r){return e in t?t[e]:r}var r;t=t||{},this.sizeMin=e("sizeMin",.5),this.sizeMax=e("sizeMax",20),this.color=e("color",[1,0,0,1]).slice(),this.areaRatio=e("areaRatio",1),this.borderColor=e("borderColor",[0,0,0,1]).slice(),this.blend=e("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,a=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,o=t.positions,s=i?o:l.mallocFloat32(o.length),u=a?t.idToIndex:l.mallocInt32(n);if(i||s.set(o),!a)for(s.set(o),r=0;r>8&255,e[2]=r>>16&255,e[3]=r>>24&255,this.pickBuffer.bind(),a.attributes.pickId.pointer(o.UNSIGNED_BYTE),a.uniforms.pickOffset=e,this.pickOffset=r);var f=o.getParameter(o.BLEND),d=o.getParameter(o.DITHER);return f&&!this.blend&&o.disable(o.BLEND),d&&o.disable(o.DITHER),o.drawArrays(o.POINTS,0,this.pointCount),f&&!this.blend&&o.enable(o.BLEND),d&&o.enable(o.DITHER),r+this.pointCount}}(),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{"./lib/shader":213,"gl-buffer":148,"gl-shader":214,"typedarray-pool":528}],222:[function(t,e,r){function n(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=u*d+c*p+h*m+f*g,a<0&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*h+l*m,t[3]=s*f+l*g,t}e.exports=n},{}],223:[function(t,e,r){"use strict";e.exports={ -vertex:"precision highp float;\n#define GLSLIFY 1\n\n\nvec4 computePosition_1_0(vec2 posHi, vec2 posLo, vec2 scHi, vec2 scLo, vec2 trHi, vec2 trLo) {\n return vec4((posHi + trHi) * scHi\n \t\t\t//FIXME: this thingy does not give noticeable precision gain, need test\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo\n , 0, 1);\n}\n\n\nattribute vec2 positionHi, positionLo;\nattribute float size, border;\nattribute vec2 char, color;\n\n//this is 64-bit form of scale and translate\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform float pixelRatio;\nuniform vec4 viewBox;\nuniform sampler2D palette;\n\nvarying vec4 charColor, borderColor;\nvarying vec2 charId;\nvarying vec2 pointCoord;\nvarying float pointSize;\nvarying float borderWidth;\n\n\nvoid main() {\n charColor = texture2D(palette, vec2(color.x / 255., 0));\n borderColor = texture2D(palette, vec2(color.y / 255., 0));\n\n gl_PointSize = size * pixelRatio;\n pointSize = size * pixelRatio;\n\n charId = char;\n borderWidth = border;\n\n gl_Position = computePosition_1_0(\n positionHi, positionLo,\n scaleHi, scaleLo,\n translateHi, translateLo);\n\n pointCoord = viewBox.xy + (viewBox.zw - viewBox.xy) * (gl_Position.xy * .5 + .5);\n}\n",fragment:"precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D chars;\nuniform vec2 charsShape;\nuniform float charsStep, pixelRatio, charOffset;\n\nvarying vec4 borderColor;\nvarying vec4 charColor;\nvarying vec2 charId;\nvarying vec2 pointCoord;\nvarying float pointSize;\nvarying float borderWidth;\n\nvoid main() {\n\tvec2 pointUV = (pointCoord - gl_FragCoord.xy + pointSize * .5) / pointSize;\n\tpointUV.x = 1. - pointUV.x;\n\tpointUV.y += charOffset;\n\tvec2 texCoord = ((charId + pointUV) * charsStep) / charsShape;\n\tfloat dist = texture2D(chars, texCoord).r;\n\n\t//max-distance alpha\n\tif (dist < 1e-2)\n\t\tdiscard;\n\n\tfloat dif = 5. * pixelRatio * borderWidth / pointSize;\n\tfloat borderLevel = .748 - dif * .5;\n\tfloat charLevel = .748 + dif * .5;\n\tfloat gamma = .005 * charsStep / pointSize;\n\n\tfloat borderAmt = smoothstep(borderLevel - gamma, borderLevel + gamma, dist);\n\tfloat charAmt = smoothstep(charLevel - gamma, charLevel + gamma, dist);\n\n\tvec4 color = borderColor;\n\tcolor.a *= borderAmt;\n\n\tgl_FragColor = mix(color, charColor, charAmt);\n}\n",pickVertex:"precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 positionHi, positionLo;\nattribute vec4 id;\nattribute float size;\n\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform vec4 pickOffset;\nuniform float pixelRatio;\n\nvarying vec4 fragColor;\n\n\nvec4 computePosition_1_0(vec2 posHi, vec2 posLo, vec2 scHi, vec2 scLo, vec2 trHi, vec2 trLo) {\n return vec4((posHi + trHi) * scHi\n \t\t\t//FIXME: this thingy does not give noticeable precision gain, need test\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo\n , 0, 1);\n}\n\n\nvoid main() {\n vec4 fragId = id + pickOffset;\n\n fragId.y += floor(fragId.x / 256.0);\n fragId.x -= floor(fragId.x / 256.0) * 256.0;\n\n fragId.z += floor(fragId.y / 256.0);\n fragId.y -= floor(fragId.y / 256.0) * 256.0;\n\n fragId.w += floor(fragId.z / 256.0);\n fragId.z -= floor(fragId.z / 256.0) * 256.0;\n\n fragColor = fragId / 255.0;\n\n gl_PointSize = size * .25 * pixelRatio;\n\n gl_Position = computePosition_1_0(\n positionHi, positionLo,\n scaleHi, scaleLo,\n translateHi, translateLo);\n}\n",pickFragment:"precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n gl_FragColor = fragColor;\n}\n"}},{}],224:[function(t,e,r){arguments[4][76][0].apply(r,arguments)},{dup:76}],225:[function(t,e,r){arguments[4][203][0].apply(r,arguments)},{"./lib/GLError":226,"./lib/create-attributes":227,"./lib/create-uniforms":228,"./lib/reflect":229,"./lib/runtime-reflect":230,"./lib/shader-cache":231,dup:203}],226:[function(t,e,r){arguments[4][204][0].apply(r,arguments)},{dup:204}],227:[function(t,e,r){arguments[4][205][0].apply(r,arguments)},{"./GLError":226,dup:205}],228:[function(t,e,r){arguments[4][206][0].apply(r,arguments)},{"./GLError":226,"./reflect":229,dup:206}],229:[function(t,e,r){arguments[4][207][0].apply(r,arguments)},{dup:207}],230:[function(t,e,r){arguments[4][208][0].apply(r,arguments)},{dup:208}],231:[function(t,e,r){arguments[4][209][0].apply(r,arguments)},{"./GLError":226,dup:209,"gl-format-compiler-error":156,"weakmap-shim":549}],232:[function(t,e,r){"use strict";function n(t,e,r,n,a){a<=4*f?i(0,a-1,t,e,r,n):h(0,a-1,t,e,r,n)}function i(t,e,r,n,i,a){for(var o=t+1;o<=e;++o){for(var s=r[o],l=n[2*o],u=n[2*o+1],c=i[o],h=a[o],f=o;f>t;){var d=r[f-1],p=n[2*(f-1)];if((d-s||l-p)>=0)break;r[f]=d,n[2*f]=p,n[2*f+1]=n[2*f-1],i[f]=i[f-1],a[f]=a[f-1],f-=1}r[f]=s,n[2*f]=l,n[2*f+1]=u,i[f]=c,a[f]=h}}function a(t,e,r,n,i,a){var o=r[t],s=n[2*t],l=n[2*t+1],u=i[t],c=a[t];r[t]=r[e],n[2*t]=n[2*e],n[2*t+1]=n[2*e+1],i[t]=i[e],a[t]=a[e],r[e]=o,n[2*e]=s,n[2*e+1]=l,i[e]=u,a[e]=c}function o(t,e,r,n,i,a){r[t]=r[e],n[2*t]=n[2*e],n[2*t+1]=n[2*e+1],i[t]=i[e],a[t]=a[e]}function s(t,e,r,n,i,a,o){var s=n[t],l=i[2*t],u=i[2*t+1],c=a[t],h=o[t];n[t]=n[e],i[2*t]=i[2*e],i[2*t+1]=i[2*e+1],a[t]=a[e],o[t]=o[e],n[e]=n[r],i[2*e]=i[2*r],i[2*e+1]=i[2*r+1],a[e]=a[r],o[e]=o[r],n[r]=s,i[2*r]=l,i[2*r+1]=u,a[r]=c,o[r]=h}function l(t,e,r,n,i,a,o,s,l,u,c){s[t]=s[e],l[2*t]=l[2*e],l[2*t+1]=l[2*e+1],u[t]=u[e],c[t]=c[e],s[e]=r,l[2*e]=n,l[2*e+1]=i,u[e]=a,c[e]=o}function u(t,e,r,n,i){return(r[t]-r[e]||n[2*e]-n[2*t]||i[t]-i[e])<0}function c(t,e,r,n,i,a,o,s){return(e-a[t]||o[2*t]-r||i-s[t])<0}function h(t,e,r,n,d,p){var m=(e-t+1)/6|0,g=t+m,v=e-m,y=t+e>>1,b=y-m,x=y+m,_=g,w=b,M=y,k=x,A=v,T=t+1,S=e-1,E=0;u(_,w,r,n,d,p)&&(E=_,_=w,w=E),u(k,A,r,n,d,p)&&(E=k,k=A,A=E),u(_,M,r,n,d,p)&&(E=_,_=M,M=E),u(w,M,r,n,d,p)&&(E=w,w=M,M=E),u(_,k,r,n,d,p)&&(E=_,_=k,k=E),u(M,k,r,n,d,p)&&(E=M,M=k,k=E),u(w,A,r,n,d,p)&&(E=w,w=A,A=E),u(w,M,r,n,d,p)&&(E=w,w=M,M=E),u(k,A,r,n,d,p)&&(E=k,k=A,A=E);var L=r[w],C=n[2*w],z=n[2*w+1],D=d[w],I=p[w],P=r[k],O=n[2*k],R=n[2*k+1],j=d[k],F=p[k],N=_,B=M,U=A,V=g,q=y,H=v,Y=r[N],G=r[B],X=r[U];r[V]=Y,r[q]=G,r[H]=X;for(var W=0;W<2;++W){var Z=n[2*N+W],J=n[2*B+W],K=n[2*U+W];n[2*V+W]=Z,n[2*q+W]=J,n[2*H+W]=K}var Q=d[N],$=d[B],tt=d[U];d[V]=Q,d[q]=$,d[H]=tt;var et=p[N],rt=p[B],nt=p[U];p[V]=et,p[q]=rt,p[H]=nt,o(b,t,r,n,d,p),o(x,e,r,n,d,p);for(var it=T;it<=S;++it)if(c(it,L,C,z,D,r,n,d))it!==T&&a(it,T,r,n,d,p),++T;else if(!c(it,P,O,R,j,r,n,d))for(;;){if(c(S,P,O,R,j,r,n,d)){c(S,L,C,z,D,r,n,d)?(s(it,T,S,r,n,d,p),++T,--S):(a(it,S,r,n,d,p),--S);break}if(--S=Math.max(.9*d,32)){var b=u+s>>>1;l(g,v,h,f,b,c+1),f=b}l(g,v,h,f,y,c+1),f=y}}}var u=t.length>>>1;if(u<1)return[];for(var c=1/0,h=1/0,f=-1/0,d=-1/0,p=0;p=0;--_){t[2*_]=(t[2*_]-c)*v,t[2*_+1]=(t[2*_+1]-h)*y;var A=x[_];A!==M&&(w.push(new i(b*Math.pow(.5,A),_+1,k-(_+1))),k=_+1,M=A)}return w.push(new i(b*Math.pow(.5,A+1),0,k)),o.free(x),w}var o=t("typedarray-pool"),s=t("./lib/sort");e.exports=a},{"./lib/sort":232,"typedarray-pool":528}],234:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.sizeBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.charBuffer=s,this.pointCount=0,this.pickOffset=0,this.points=null,this.scales=[],this.xCoords=[],this.charCanvas=document.createElement("canvas"),this.charTexture=h(this.plot.gl,this.charCanvas),this.charStep=400,this.charOffset=.032,this.snapThreshold=1e4,this.paletteTexture=h(this.plot.gl,[256,1])}function i(t,e){var r=t.gl,i=a(r,l.vertex,l.fragment),s=a(r,l.pickVertex,l.pickFragment),u=o(r),c=o(r),h=o(r),f=o(r),d=o(r),p=new n(t,i,s,u,c,h,f,d);return p.update(e),t.addObject(p),p}e.exports=i;var a=t("gl-shader"),o=t("gl-buffer"),s=t("typedarray-pool"),l=t("./lib/shaders"),u=t("snap-points-2d"),c=t("font-atlas-sdf"),h=t("gl-texture2d"),f=t("color-id"),d=t("ndarray"),p=t("clamp"),m=t("binary-search-bounds"),g=n.prototype;!function(){function t(){var t=this.plot,u=t.viewBox,c=t.dataBox,h=t.pixelRatio,f=c[2]-c[0],d=c[3]-c[1],p=2/f,m=2/d,g=-c[0]-.5*f,v=-c[1]-.5*d;i[0]=p,a[0]=p-i[0],i[1]=m,a[1]=m-i[1],o[0]=g,s[0]=g-o[0],o[1]=v,s[1]=v-o[1];var y=u[2]-u[0],b=u[3]-u[1];e=Math.min(f/y,d/b),l[0]=2*h/y,l[1]=2*h/b,r=c[0],n=c[2]}var e,r,n,i=new Float32Array([0,0]),a=new Float32Array([0,0]),o=new Float32Array([0,0]),s=new Float32Array([0,0]),l=[0,0],u=[0,0,0,0];g.drawPick=function(l){var c=void 0!==l,h=this.plot,f=this.pointCount,d=f>this.snapThreshold;if(!f)return l;t.call(this);var p=h.gl,g=c?this.pickShader:this.shader,v=p.isEnabled(p.BLEND);if(g.bind(),c){this.pickOffset=l;for(var y=0;y<4;++y)u[y]=l>>8*y&255;g.uniforms.pickOffset=u,this.idBuffer.bind(),g.attributes.id.pointer(p.UNSIGNED_BYTE,!1)}else p.blendFuncSeparate(p.SRC_ALPHA,p.ONE_MINUS_SRC_ALPHA,p.ONE,p.ONE_MINUS_SRC_ALPHA),p.blendColor(0,0,0,1),v||p.enable(p.BLEND),this.colorBuffer.bind(),g.attributes.color.pointer(p.UNSIGNED_BYTE,!1),this.charBuffer.bind(),g.attributes.char.pointer(p.UNSIGNED_BYTE,!1),g.uniforms.chars=this.charTexture.bind(0),g.uniforms.charsShape=[this.charCanvas.width,this.charCanvas.height],g.uniforms.charsStep=this.charStep,g.uniforms.palette=this.paletteTexture.bind(1),g.uniforms.charOffset=this.charOffset;this.sizeBuffer.bind(),g.attributes.size.pointer(p.FLOAT,!1,8,0),c||g.attributes.border.pointer(p.FLOAT,!1,8,4),this.positionBuffer.bind(),g.attributes.positionHi.pointer(p.FLOAT,!1,16,0),g.attributes.positionLo.pointer(p.FLOAT,!1,16,8),g.uniforms.pixelRatio=h.pixelRatio,g.uniforms.scaleHi=i,g.uniforms.scaleLo=a,g.uniforms.translateHi=o,g.uniforms.translateLo=s,g.uniforms.viewBox=h.viewBox;var b=this.scales;if(d)for(var x=b.length-1;x>=0;x--){var _=b[x];if(!(_.pixelSize&&_.pixelSize<1.25*e&&x>1)){var w=_.offset,M=_.count+w,k=m.ge(this.xCoords,r,w,M-1),A=m.lt(this.xCoords,n,k,M-1)+1;A>k&&p.drawArrays(p.POINTS,k,A-k)}}else p.drawArrays(p.POINTS,0,f);if(c)return l+f;v?p.blendFunc(p.ONE,p.ONE_MINUS_SRC_ALPHA):p.disable(p.BLEND)}}(),g.draw=g.drawPick,g.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}},g.update=function(t){t=t||{};var e=t.positions||[],r=t.colors||[],n=t.glyphs||[],i=t.sizes||[],a=t.borderWidths||[],o=t.borderColors||[],l=this.plot.gl;null!=t.charOffset&&(this.charOffset=t.charOffset),this.points=e;var h=this.points.length/2,m=s.mallocInt32(h),g=s.mallocFloat32(2*h),v=s.mallocFloat64(2*h);v.set(this.points),this.pointCount=h;var y=h>this.snapThreshold;y&&(this.scales=u(v,m,g));for(var b=s.mallocFloat32(4*h),x=s.mallocFloat32(2*h),_=s.mallocUint8(2*h),w=s.mallocUint32(h),M=s.mallocUint8(2*h),k={},A=[],T=[],S=[],E=0,L=h,C=0;EO&&(O=i[E]);var R=this.charStep;this.charStep=p(Math.ceil(4*O),128,768);var j=Object.keys(I),F=this.charStep,N=Math.floor(F/2),B=l.getParameter(l.MAX_TEXTURE_SIZE),U=B/F*(B/F),V=Math.min(B,F*j.length),q=Math.min(B,F*Math.ceil(F*j.length/B)),H=Math.floor(V/F);j.length>U&&console.warn("gl-scatter2d-fancy: number of characters is more than maximum texture size. Try reducing it."),this.chars&&this.chars+""==j+""&&this.charStep==R||(this.charCanvas=c({canvas:this.charCanvas,family:"sans-serif",size:N,shape:[V,q],step:[F,F],chars:j}),this.chars=j);for(var E=0;E>>1,n=u.mallocInt32(r),i=u.mallocFloat32(2*r),a=u.mallocFloat64(2*r);a.set(this.points),this.scales=l(a,n,i,this.bounds);var o=u.mallocFloat64(r),s=u.mallocFloat32(2*r),c=u.mallocFloat32(2*r);s.set(a);for(var h=0,f=0;h>8&255,g[2]=t>>16&255,g[3]=t>>24&255,n.uniforms.pickOffset=g,l.bind(),n.attributes.pickId.pointer(v.UNSIGNED_BYTE)):(n.uniforms.useWeight=1,this.weightBuffer.bind(),n.attributes.weight.pointer());for(var D=this.xCoords,I=(x[0]-u[0]-S*c*y)/_,P=(x[2]-u[0]+S*c*y)/_,O=!0,R=i.length-1;R>=0;R--){var j=i[R];if(!(j.pixelSize1)){var F=j.offset,N=j.count+F,B=s.ge(D,I,F,N-1),U=s.lt(D,P,B,N-1)+1;U>B&&v.drawArrays(v.POINTS,B,U-B),!e&&O&&(O=!1,n.uniforms.useWeight=0)}}return t+this.pointCount},h.drawPick=h.draw,h.pick=function(t,e,r){var n=r-this.pickOffset;return n<0||n>=this.pointCount?null:{object:this,pointId:n,dataCoord:[this.points[2*n],this.points[2*n+1]]}}},{"./lib/shader":235,"binary-search-bounds":236,"gl-buffer":148,"gl-shader":246,"snap-points-2d":238,"typedarray-pool":528}],240:[function(t,e,r){"use strict";function n(t,e){var r=a[e];if(r||(r=a[e]={}),t in r)return r[t];for(var n=i(t,{textAlign:"center",textBaseline:"middle",lineHeight:1,font:e}),o=i(t,{triangles:!0,textAlign:"center",textBaseline:"middle",lineHeight:1,font:e}),s=[[1/0,1/0],[-1/0,-1/0]],l=0;lMath.abs(R[1])){var j=O;O=R,R=j,j=I,I=P,P=j;var F=z;z=D,D=F}O[0]<0&&(I[z]=-1),R[1]>0&&(P[D]=-1);for(var N=0,B=0,C=0;C<4;++C)N+=Math.pow(p[4*z+C],2),B+=Math.pow(p[4*D+C],2);I[z]/=Math.sqrt(N),P[D]/=Math.sqrt(B),d.axes[0]=I,d.axes[1]=P,d.fragClipBounds[0]=u(E,b[0],_,-1e8),d.fragClipBounds[1]=u(E,b[1],_,1e8),e.vao.draw(f.TRIANGLES,e.vertexCount),e.lineWidth>0&&(f.lineWidth(e.lineWidth),e.vao.draw(f.LINES,e.lineVertexCount,e.vertexCount))}}function f(t,e,r,n,i,a){var o=r.gl;if(r.vao.bind(),i===r.opacity<1||a){t.bind();var s=t.uniforms;s.model=n.model||x,s.view=n.view||x,s.projection=n.projection||x,w[0]=2/o.drawingBufferWidth,w[1]=2/o.drawingBufferHeight,s.screenSize=w,s.highlightId=r.highlightId,s.highlightScale=r.highlightScale,s.fragClipBounds=D,s.clipBounds=r.axes.bounds,s.opacity=r.opacity,s.pickGroup=r.pickId/255,s.pixelRatio=r.pixelRatio,r.vao.draw(o.TRIANGLES,r.vertexCount),r.lineWidth>0&&(o.lineWidth(r.lineWidth),r.vao.draw(o.LINES,r.lineVertexCount,r.vertexCount))}h(e,r,n,i,a),r.vao.unbind()}function d(t){var e=t.gl,r=y.createPerspective(e),n=y.createOrtho(e),i=y.createProject(e),a=y.createPickPerspective(e),s=y.createPickOrtho(e),l=y.createPickProject(e),u=p(e),c=p(e),h=p(e),f=p(e),d=m(e,[{buffer:u,size:3,type:e.FLOAT},{buffer:c,size:4,type:e.FLOAT},{buffer:h,size:2,type:e.FLOAT},{buffer:f,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),g=new o(e,r,n,i,u,c,h,f,d,a,s,l);return g.update(t),g}var p=t("gl-buffer"),m=t("gl-vao"),g=t("typedarray-pool"),v=t("gl-mat4/multiply"),y=t("./lib/shaders"),b=t("./lib/glyphs"),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];e.exports=d;var _=o.prototype;_.pickSlots=1,_.setPickBase=function(t){this.pickId=t},_.isTransparent=function(){if(this.opacity<1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]<1)return!0;return!1},_.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]>=1)return!0;return!1};var w=[0,0],M=[0,0,0],k=[0,0,0],A=[0,0,0,1],T=[0,0,0,1],S=x.slice(),E=[0,0,0],L=[[0,0,0],[0,0,0]],C=[-1e8,-1e8,-1e8],z=[1e8,1e8,1e8],D=[C,z];_.draw=function(t){f(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!1,!1)},_.drawTransparent=function(t){f(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!0,!1)},_.drawPick=function(t){f(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,!1,!0)},_.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[2]+(t.value[1]<<8)+(t.value[0]<<16);if(e>=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},_.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},_.update=function(t){if(t=t||{},"perspective"in t&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if("projectOpacity"in t)if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{var r=+t.projectOpacity;this.projectOpacity=[r,r,r]}"opacity"in t&&(this.opacity=t.opacity),this.dirty=!0;var n=t.position;if(n){var i=t.font||"normal",a=t.alignment||[0,0],o=[1/0,1/0,1/0],s=[-1/0,-1/0,-1/0],l=t.glyph,u=t.color,c=t.size,h=t.angle,f=t.lineColor,d=0,p=0,m=0,v=n.length;t:for(var y=0;y0&&(z[0]=-a[0]*(1+A[0][0]));for(var q=M.cells,H=M.positions,_=0;_0){var v=r*c;o.drawBox(h-v,f-v,d+v,f+v,a),o.drawBox(h-v,p-v,d+v,p+v,a),o.drawBox(h-v,f-v,h+v,p+v,a),o.drawBox(d-v,f-v,d+v,p+v,a)}}}},l.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},l.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":243,"gl-buffer":148,"gl-shader":246}],245:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function i(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}function a(t,e){return new i(t,o(t,e),s.mallocUint8(e[0]*e[1]*4))}e.exports=a;var o=t("gl-fbo"),s=t("typedarray-pool"),l=t("ndarray"),u=t("bit-twiddle").nextPow2,c=t("cwise/lib/wrapper")({args:["array",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},"scalar","scalar","index"],pre:{body:"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},body:{body:"{if(_inline_31_arg0_<255||_inline_31_arg1_<255||_inline_31_arg2_<255||_inline_31_arg3_<255){var _inline_31_l=_inline_31_arg4_-_inline_31_arg6_[0],_inline_31_a=_inline_31_arg5_-_inline_31_arg6_[1],_inline_31_f=_inline_31_l*_inline_31_l+_inline_31_a*_inline_31_a;_inline_31_fthis.buffer.length){s.free(this.buffer);for(var n=this.buffer=s.mallocUint8(u(r*e*4)),i=0;i=0){for(var k=0|M.type.charAt(M.type.length-1),A=new Array(k),T=0;T=0;)S+=1;_[w]=S}var E=new Array(r.length);a(),d._relink=a,d.types={uniforms:l(r),attributes:l(n)},d.attributes=s(p,d,b,_),Object.defineProperty(d,"uniforms",o(p,d,r,E))},e.exports=a},{"./lib/GLError":247,"./lib/create-attributes":248,"./lib/create-uniforms":249,"./lib/reflect":250,"./lib/runtime-reflect":251,"./lib/shader-cache":252}],247:[function(t,e,r){arguments[4][204][0].apply(r,arguments)},{dup:204}],248:[function(t,e,r){arguments[4][205][0].apply(r,arguments)},{"./GLError":247,dup:205}],249:[function(t,e,r){arguments[4][206][0].apply(r,arguments)},{"./GLError":247,"./reflect":250,dup:206}],250:[function(t,e,r){arguments[4][207][0].apply(r,arguments)},{dup:207}],251:[function(t,e,r){arguments[4][208][0].apply(r,arguments)},{dup:208}],252:[function(t,e,r){arguments[4][209][0].apply(r,arguments)},{"./GLError":247,dup:209,"gl-format-compiler-error":156,"weakmap-shim":549}],253:[function(t,e,r){"use strict";function n(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}function i(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r}e.exports=i;var a=n.prototype;a.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(t){return t.slice()}),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},a.draw=function(){var t=this.enable,e=this.width,r=this.color,n=this.center,i=this.plot,a=i.line,o=i.dataBox,s=i.viewBox;if(a.bind(),o[0]<=n[0]&&n[0]<=o[2]&&o[1]<=n[1]&&n[1]<=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),u=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&&a.drawLine(l,u,s[0],u,e[0],r[0]),t[1]&&a.drawLine(l,u,l,s[1],e[1],r[1]),t[2]&&a.drawLine(l,u,s[2],u,e[2],r[2]),t[3]&&a.drawLine(l,u,l,s[3],e[3],r[3])}},a.dispose=function(){this.plot.removeOverlay(this)}},{}],254:[function(t,e,r){"use strict";var n=t("gl-shader");e.exports=function(t){return n(t,"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, color;\nattribute float weight;\n\nuniform mat4 model, view, projection;\nuniform vec3 coordinates[3];\nuniform vec4 colors[3];\nuniform vec2 screenShape;\nuniform float lineWidth;\n\nvarying vec4 fragColor;\n\nvoid main() {\n vec3 vertexPosition = mix(coordinates[0],\n mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\n\n vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\n vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\n vec2 delta = weight * clipOffset * screenShape;\n vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\n\n gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\n fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\n}\n","precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}",null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},{"gl-shader":246}],255:[function(t,e,r){"use strict";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}function i(t,e){function r(t,e,r,n,a,o){var s=[t,e,r,0,0,0,1];s[n+3]=1,s[n]=a,i.push.apply(i,s),s[6]=-1,i.push.apply(i,s),s[n]=o,i.push.apply(i,s),i.push.apply(i,s),s[6]=1,i.push.apply(i,s),s[n]=a,i.push.apply(i,s)}var i=[];r(0,0,0,0,0,1),r(0,0,0,1,0,1),r(0,0,0,2,0,1),r(1,0,0,1,-1,1),r(1,0,0,2,-1,1),r(0,1,0,0,-1,1),r(0,1,0,2,-1,1),r(0,0,1,0,-1,1),r(0,0,1,1,-1,1);var l=a(t,i),u=o(t,[{type:t.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:t.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:t.FLOAT,buffer:l,size:1,offset:24,stride:28}]),c=s(t);c.attributes.position.location=0,c.attributes.color.location=1,c.attributes.weight.location=2;var h=new n(t,l,u,c);return h.update(e),h}var a=t("gl-buffer"),o=t("gl-vao"),s=t("./shaders/index");e.exports=i;var l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],u=n.prototype,c=[0,0,0],h=[0,0,0],f=[0,0];u.isTransparent=function(){return!1},u.drawTransparent=function(t){},u.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||l,o=t.view||l,s=t.projection||l;this.axes&&(i=this.axes.lastCubeProps.axis);for(var u=c,d=h,p=0;p<3;++p)i&&i[p]<0?(u[p]=this.bounds[0][p],d[p]=this.bounds[1][p]):(u[p]=this.bounds[1][p],d[p]=this.bounds[0][p]);f[0]=e.drawingBufferWidth,f[1]=e.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=o,n.uniforms.projection=s,n.uniforms.coordinates=[this.position,u,d],n.uniforms.colors=this.colors,n.uniforms.screenShape=f;for(var p=0;p<3;++p)n.uniforms.lineWidth=this.lineWidth[p]*this.pixelRatio,this.enabled[p]&&(r.draw(e.TRIANGLES,6,6*p),this.drawSides[p]&&r.draw(e.TRIANGLES,12,18+12*p));r.unbind()},u.update=function(t){t&&("bounds"in t&&(this.bounds=t.bounds),"position"in t&&(this.position=t.position),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"colors"in t&&(this.colors=t.colors),"enabled"in t&&(this.enabled=t.enabled),"drawSides"in t&&(this.drawSides=t.drawSides))},u.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders/index":254,"gl-buffer":148,"gl-vao":262}],256:[function(t,e,r){var n=t("gl-shader"),i="precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n worldCoordinate = vec3(uv.zw, f.x);\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n",a="precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution_2_0(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\n\n\nfloat beckmannSpecular_1_1(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution_2_0(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\n\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (kill > 0.0 ||\n any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n discard;\n }\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = beckmannSpecular_1_1(L, V, N, roughness);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n",o="precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n vec4 worldPosition = model * vec4(dataCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z = clipPosition.z + zOffset;\n\n gl_Position = clipPosition;\n value = f;\n kill = -1.0;\n worldCoordinate = dataCoordinate;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n",s="precision mediump float;\n#define GLSLIFY 1\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if(kill > 0.0 ||\n any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n discard;\n }\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n";r.createShader=function(t){var e=n(t,i,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,i,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,o,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{"gl-shader":246}],257:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}function i(t){var e=x([y({colormap:t,nshades:R,format:"rgba"}).map(function(t){return[t[0],t[1],t[2],255*t[3]]})]);return b.divseq(e,255),e}function a(t,e,r,i,a,o,s,l,u,c,h,f,d,p){this.gl=t,this.shape=e,this.bounds=r,this.intensityBounds=[],this._shader=i,this._pickShader=a,this._coordinateBuffer=o,this._vao=s,this._colorMap=l,this._contourShader=u,this._contourPickShader=c,this._contourBuffer=h,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new n([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=p,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[_(v.mallocFloat(1024),[0,0]),_(v.mallocFloat(1024),[0,0]),_(v.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}function o(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||F,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=N.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],M(l,t.model,l);var u=N.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)u[i][n]=t.clipBounds[i][n];u[0][r]=-1e8,u[1][r]=1e8}return N.showSurface=o,N.showContour=s,N}function s(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=B;n.model=t.model||I,n.view=t.view||I,n.projection=t.projection||I,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.contourColor=this.contourColor[0],n.inverseModel=k(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],s=0;s<3;++s)a[s]=Math.min(Math.max(this.clipBounds[i][s],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=V,n.vertexColor=this.vertexColor;var l=U;for(M(l,n.view,n.model),M(l,n.projection,l),k(l,l),i=0;i<3;++i)n.eyePosition[i]=l[12+i]/l[15];var u=l[15];for(i=0;i<3;++i)u+=this.lightPosition[i]*l[4*i+3];for(i=0;i<3;++i){var c=l[12+i];for(s=0;s<3;++s)c+=l[4*s+i]*this.lightPosition[s];n.lightPosition[i]=c/u}var h=o(n,this);if(h.showSurface&&e===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=h.projections[i],this._shader.uniforms.clipBounds=h.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(h.showContour&&!e){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var d=this._contourVAO;for(d.bind(),i=0;i<3;++i)for(f.uniforms.permutation=O[i],r.lineWidth(this.contourWidth[i]),s=0;s=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},j.pickSlots=1,j.setPickBase=function(t){this.pickId=t};var F=[0,0,0],N={showSurface:!1,showContour:!1,projections:[I.slice(),I.slice(),I.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]},B={model:I,view:I,projection:I,inverseModel:I.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},U=I.slice(),V=[1,0,0,0,1,0,0,0,1];j.draw=function(t){return s.call(this,t,!1)},j.drawTransparent=function(t){return s.call(this,t,!0)};var q={model:I,view:I,projection:I,inverseModel:I,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};j.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=q;r.model=t.model||I,r.view=t.view||I,r.projection=t.projection||I,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.permutation=V;for(var n=0;n<2;++n)for(var i=r.clipBounds[n],a=0;a<3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);var s=o(r,this);if(s.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(e.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&(this._pickShader.uniforms.model=s.projections[n],this._pickShader.uniforms.clipBounds=s.clipBounds[n],this._vao.draw(e.TRIANGLES,this._vertexCount));this._vao.unbind()}if(s.showContour){var l=this._contourPickShader;l.bind(),l.uniforms=r;var u=this._contourVAO;for(u.bind(),a=0;a<3;++a)for(e.lineWidth(this.contourWidth[a]),l.uniforms.permutation=O[a],n=0;n>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var u=r.position;u[0]=u[1]=u[2]=0;for(var c=0;c<2;++c)for(var h=c?a:1-a,f=0;f<2;++f)for(var d=f?l:1-l,p=i+c,m=s+f,g=h*d,v=0;v<3;++v)u[v]+=this._field[v].get(p,m)*g;for(var y=this._pickResult.level,b=0;b<3;++b)if(y[b]=A.le(this.contourLevels[b],u[b]),y[b]<0)this.contourLevels[b].length>0&&(y[b]=0);else if(y[b]Math.abs(_-u[b])&&(y[b]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},j.update=function(t){t=t||{},this.dirty=!0,"contourWidth"in t&&(this.contourWidth=u(t.contourWidth,Number)),"showContour"in t&&(this.showContour=u(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=u(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=h(t.contourColor)),"contourProject"in t&&(this.contourProject=u(t.contourProject,function(t){return u(t,Boolean)})),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=h(t.dynamicColor)), -"dynamicTint"in t&&(this.dynamicTint=u(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=u(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var n=(e.shape[0]+2)*(e.shape[1]+2);n>this._field[2].data.length&&(v.freeFloat(this._field[2].data),this._field[2].data=v.mallocFloat(d.nextPow2(n))),this._field[2]=_(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),l(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(v.freeFloat(this._field[o].data),this._field[o].data=v.mallocFloat(this._field[2].size)),this._field[o]=_(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var s=t.coords;if(!Array.isArray(s)||3!==s.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=s[o];for(y=0;y<2;++y)if(c.shape[y]!==a[y])throw new Error("gl-surface: coords have incorrect shape");l(this._field[o],c)}}else if(t.ticks){var f=t.ticks;if(!Array.isArray(f)||2!==f.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=f[o];if((Array.isArray(p)||p.length)&&(p=_(p)),p.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var m=_(p.data,a);m.stride[o]=p.stride[0],m.stride[1^o]=0,l(this._field[o],m)}}else{for(o=0;o<2;++o){var g=[0,0];g[o]=1,this._field[o]=_(this._field[o].data,[a[0]+2,a[1]+2],g,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var xt=0;xt<5;++xt)tt.pop();q-=1}continue t}tt.push(it[0],it[1],st[0],st[1],it[2]),q+=1}}nt.push(q)}this._contourOffsets[et]=rt,this._contourCounts[et]=nt}var _t=v.mallocFloat(tt.length);for(o=0;oi||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function o(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}function s(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function l(t,e,r,n,i,a,o,l){var u=l.dtype,c=l.shape.slice();if(c.length<2||c.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var h=0,f=0,d=s(c,l.stride.slice());"float32"===u?h=t.FLOAT:"float64"===u?(h=t.FLOAT,d=!1,u="float32"):"uint8"===u?h=t.UNSIGNED_BYTE:(h=t.UNSIGNED_BYTE,d=!1,u="uint8");if(2===c.length)f=t.LUMINANCE,c=[c[0],c[1],1],l=p(l.data,c,[l.stride[0],l.stride[1],1],l.offset);else{if(3!==c.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===c[2])f=t.ALPHA;else if(2===c[2])f=t.LUMINANCE_ALPHA;else if(3===c[2])f=t.RGB;else{if(4!==c[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");f=t.RGBA}c[2]}if(f!==t.LUMINANCE&&f!==t.ALPHA||i!==t.LUMINANCE&&i!==t.ALPHA||(f=i),f!==i)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var v=l.size,y=o.indexOf(n)<0;if(y&&o.push(n),h===a&&d)0===l.offset&&l.data.length===v?y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,l.data):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,l.data):y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,l.data.subarray(l.offset,l.offset+v)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,l.data.subarray(l.offset,l.offset+v));else{var b;b=a===t.FLOAT?g.mallocFloat32(v):g.mallocUint8(v);var _=p(b,c,[c[2],c[2]*c[0],1]);h===t.FLOAT&&a===t.UNSIGNED_BYTE?x(_,l):m.assign(_,l),y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,b.subarray(0,v)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,b.subarray(0,v)),a===t.FLOAT?g.freeFloat32(b):g.freeUint8(b)}}function u(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function c(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var s=u(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new o(t,s,e,r,n,i)}function h(t,e,r,n,i,a){var s=u(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new o(t,s,r,n,i,a)}function f(t,e){var r=e.dtype,n=e.shape.slice(),i=t.getParameter(t.MAX_TEXTURE_SIZE);if(n[0]<0||n[0]>i||n[1]<0||n[1]>i)throw new Error("gl-texture2d: Invalid texture size");var a=s(n,e.stride.slice()),l=0;"float32"===r?l=t.FLOAT:"float64"===r?(l=t.FLOAT,a=!1,r="float32"):"uint8"===r?l=t.UNSIGNED_BYTE:(l=t.UNSIGNED_BYTE,a=!1,r="uint8");var c=0;if(2===n.length)c=t.LUMINANCE,n=[n[0],n[1],1],e=p(e.data,n,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==n.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===n[2])c=t.ALPHA;else if(2===n[2])c=t.LUMINANCE_ALPHA;else if(3===n[2])c=t.RGB;else{if(4!==n[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");c=t.RGBA}}l!==t.FLOAT||t.getExtension("OES_texture_float")||(l=t.UNSIGNED_BYTE,a=!1);var h,f,d=e.size;if(a)h=0===e.offset&&e.data.length===d?e.data:e.data.subarray(e.offset,e.offset+d);else{var v=[n[2],n[2]*n[0],1];f=g.malloc(d,r);var y=p(f,n,v,0);"float32"!==r&&"float64"!==r||l!==t.UNSIGNED_BYTE?m.assign(y,e):x(y,e),h=f.subarray(0,d)}var b=u(t);return t.texImage2D(t.TEXTURE_2D,0,c,n[0],n[1],0,c,l,h),a||g.free(f),new o(t,b,n[0],n[1],c,l)}function d(t){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(v||n(t),"number"==typeof arguments[1])return c(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return c(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var e=arguments[1],r=i(e)?e:e.raw;if(r)return h(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return f(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}var p=t("ndarray"),m=t("ndarray-ops"),g=t("typedarray-pool");e.exports=d;var v=null,y=null,b=null,x=function(t,e){m.muls(t,e,255)},_=o.prototype;Object.defineProperties(_,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&v.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),y.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&v.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),y.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),b.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),b.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(b.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return a(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return t|=0,a(this,t,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,a(this,this._shape[0],t),t}}}),_.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},_.dispose=function(){this.gl.deleteTexture(this.handle)},_.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},_.setPixels=function(t,e,r,n){var a=this.gl;this.bind(),Array.isArray(e)?(n=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),n=n||0;var o=i(t)?t:t.raw;if(o){this._mipLevels.indexOf(n)<0?(a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,this.type,o),this._mipLevels.push(n)):a.texSubImage2D(a.TEXTURE_2D,n,e,r,this.format,this.type,o)}else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>n||r+t.shape[0]>this._shape[0]>>>n||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");l(a,e,r,n,this.format,this.type,this._mipLevels,t)}}},{ndarray:456,"ndarray-ops":450,"typedarray-pool":528}],259:[function(t,e,r){"use strict";function n(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}e.exports=n},{}],268:[function(t,e,r){function n(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}e.exports=n},{}],269:[function(t,e,r){function n(t,e,r,n){return i[0]=n,i[1]=r,i[2]=e,i[3]=t,a[0]}e.exports=n;var i=new Uint8Array(4),a=new Float32Array(i.buffer)},{}],270:[function(t,e,r){function n(t){for(var e=Array.isArray(t)?t:i(t),r=0;r0)continue;n=t.slice(0,1).join("")}return e(n),Y+=n.length,U=U.slice(n.length),U.length}}function z(){return/[^a-fA-F0-9]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),R=O,F+1)}function D(){return"."===O?(U.push(O),B=g,R=O,F+1):/[eE]/.test(O)?(U.push(O),B=g,R=O,F+1):"x"===O&&1===U.length&&"0"===U[0]?(B=w,U.push(O),R=O,F+1):/[^\d]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),R=O,F+1)}function I(){return"f"===O&&(U.push(O),R=O,F+=1),/[eE]/.test(O)?(U.push(O),R=O,F+1):"-"===O&&/[eE]/.test(R)?(U.push(O),R=O,F+1):/[^\d]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),R=O,F+1)}function P(){if(/[^\d\w_]/.test(O)){var t=U.join("");return B=J.indexOf(t)>-1?b:Z.indexOf(t)>-1?y:v,e(U.join("")),B=u,F}return U.push(O),R=O,F+1}var O,R,j,F=0,N=0,B=u,U=[],V=[],q=1,H=0,Y=0,G=!1,X=!1,W="";t=t||{};var Z=o,J=i;return"300 es"===t.version&&(Z=l,J=s),function(t){return V=[],null!==t?r(t.replace?t.replace(/\r\n/g,"\n"):t):n()}}e.exports=n;var i=t("./lib/literals"),a=t("./lib/operators"),o=t("./lib/builtins"),s=t("./lib/literals-300es"),l=t("./lib/builtins-300es"),u=999,c=9999,h=0,f=1,d=2,p=3,m=4,g=5,v=6,y=7,b=8,x=9,_=10,w=11,M=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":273,"./lib/builtins-300es":272,"./lib/literals":275,"./lib/literals-300es":274,"./lib/operators":276}],272:[function(t,e,r){var n=t("./builtins");n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":273}],273:[function(t,e,r){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],274:[function(t,e,r){var n=t("./literals");e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":275}],275:[function(t,e,r){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],276:[function(t,e,r){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],277:[function(t,e,r){function n(t,e){var r=i(e),n=[];return n=n.concat(r(t)),n=n.concat(r(null))}var i=t("./index");e.exports=n},{"./index":271}],278:[function(t,e,r){"use strict";function n(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var a=new Int32Array(this.arrayBuffer);t=a[0],e=a[1],r=a[2],this.d=e+2*r;for(var o=0;o=u[f+0]&&n>=u[f+1]?(o[h]=!0,a.push(l[h])):o[h]=!1}}},n.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),u=this._convertToCellCoord(r),c=this._convertToCellCoord(n),h=s;h<=u;h++)for(var f=l;f<=c;f++){var d=this.d*f+h;if(i.call(this,t,e,r,n,d,a,o))return}},n.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}, -n.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=i+this.cells.length+1+1,r=0,n=0;n>1,c=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+t[e+h],h+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+h],h+=f,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),e+=o+h>=1?f/l:f*Math.pow(2,1-h),e*l>=2&&(o++,l/=2),o+h>=c?(s=0,o=c):o+h>=1?(s=(e*l-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;t[r+d]=255&o,d+=p,o/=256,u-=8);t[r+d-p]|=128*m}},{}],280:[function(t,e,r){"use strict";function n(t,e,r){this.vertices=t,this.adjacent=e,this.boundary=r,this.lastVisited=-1}function i(t,e,r){this.vertices=t,this.cell=e,this.index=r}function a(t,e){return c(t.vertices,e.vertices)}function o(t){for(var e=["function orient(){var tuple=this.tuple;return test("],r=0;r<=t;++r)r>0&&e.push(","),e.push("tuple[",r,"]");e.push(")}return orient");var n=new Function("test",e.join("")),i=u[t+1];return i||(i=u),n(i)}function s(t,e,r){this.dimension=t,this.vertices=e,this.simplices=r,this.interior=r.filter(function(t){return!t.boundary}),this.tuple=new Array(t+1);for(var n=0;n<=t;++n)this.tuple[n]=this.vertices[n];var i=h[t];i||(i=h[t]=o(t)),this.orient=i}function l(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var a=t.slice(0,i+1),o=u.apply(void 0,a);if(0===o)throw new Error("Input not in general position");for(var l=new Array(i+1),c=0;c<=i;++c)l[c]=c;o<0&&(l[0]=1,l[1]=0);for(var h=new n(l,new Array(i+1),!1),f=h.adjacent,d=new Array(i+2),c=0;c<=i;++c){for(var p=l.slice(),m=0;m<=i;++m)m===c&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var v=new n(p,new Array(i+1),!0);f[c]=v,d[c]=v}d[i+1]=h;for(var c=0;c<=i;++c)for(var p=f[c].vertices,y=f[c].adjacent,m=0;m<=i;++m){var b=p[m];if(b<0)y[m]=h;else for(var x=0;x<=i;++x)f[x].vertices.indexOf(b)<0&&(y[m]=f[x])}for(var _=new s(i,a,d),w=!!e,c=i+1;c0;){t=o.pop();for(var s=(t.vertices,t.adjacent),l=0;l<=r;++l){var u=s[l];if(u.boundary&&!(u.lastVisited<=-n)){for(var c=u.vertices,h=0;h<=r;++h){var f=c[h];i[h]=f<0?e:a[f]}var d=this.orient();if(d>0)return u;u.lastVisited=-n,0===d&&o.push(u)}}}return null},f.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,u=s.adjacent,c=0;c<=n;++c)a[c]=i[l[c]];s.lastVisited=r;for(var c=0;c<=n;++c){var h=u[c];if(!(h.lastVisited>=r)){var f=a[c];a[c]=t;var d=this.orient();if(a[c]=f,d<0){s=h;continue t}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},f.addPeaks=function(t,e){var r=this.vertices.length-1,o=this.dimension,s=this.vertices,l=this.tuple,u=this.interior,c=this.simplices,h=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,u.push(e);for(var f=[];h.length>0;){var e=h.pop(),d=e.vertices,p=e.adjacent,m=d.indexOf(r);if(!(m<0))for(var g=0;g<=o;++g)if(g!==m){var v=p[g];if(v.boundary&&!(v.lastVisited>=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var b=0,x=0;x<=o;++x)y[x]<0?(b=x,l[x]=t):l[x]=s[y[x]];var _=this.orient();if(_>0){y[b]=r,v.boundary=!1,u.push(v),h.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var w=v.adjacent,M=d.slice(),k=p.slice(),A=new n(M,k,!0);c.push(A);var T=w.indexOf(e);if(!(T<0)){w[T]=A,k[m]=v,M[g]=-1,k[g]=e,p[g]=A,A.flip();for(var x=0;x<=o;++x){var S=M[x];if(!(S<0||S===r)){for(var E=new Array(o-1),L=0,C=0;C<=o;++C){var z=M[C];z<0||C===x||(E[L++]=z)}f.push(new i(E,A,x))}}}}}}f.sort(a);for(var g=0;g+1=0?o[l++]=s[c]:u=1&c;if(u===(1&t)){var h=o[0];o[0]=o[1],o[1]=h}e.push(o)}}return e}},{"robust-orientation":496,"simplicial-complex":507}],281:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}function i(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function a(t,e){var r=p(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function o(t,e){var r=t.intervals([]);r.push(e),a(t,r)}function s(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?y:(r.splice(n,1),a(t,r),b)}function l(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function c(t,e){for(var r=0;r>1],a=[],o=[],s=[],r=0;r3*(e+1)?o(this,t):this.left.insert(t):this.left=p([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?o(this,t):this.right.insert(t):this.right=p([t]);else{var r=v.ge(this.leftPoints,t,f),n=v.ge(this.rightPoints,t,d);this.leftPoints.splice(r,0,t),this.rightPoints.splice(n,0,t)}},x.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1))return s(this,t);var r=this.left.remove(t);return 2===r?(this.left=null,this.count-=1,b):(r===b&&(this.count-=1),r)}if(t[0]>this.mid){if(!this.right)return y;if(4*(this.left?this.left.count:0)>3*(e-1))return s(this,t);var r=this.right.remove(t);return 2===r?(this.right=null,this.count-=1,b):(r===b&&(this.count-=1),r)}if(1===this.count)return this.leftPoints[0]===t?2:y;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var o=this.left,r=this.right;n.count-=a.count,n.right=a.left,a.left=o,a.right=r}i(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?i(this,this.left):i(this,this.right);return b}for(var o=v.ge(this.leftPoints,t,f);othis.mid){if(this.right){var r=this.right.queryPoint(t,e);if(r)return r}return u(this.rightPoints,t,e)}return c(this.leftPoints,e)},x.queryInterval=function(t,e,r){if(tthis.mid&&this.right){var n=this.right.queryInterval(t,e,r);if(n)return n}return ethis.mid?u(this.rightPoints,t,r):c(this.leftPoints,r)};var _=m.prototype;_.insert=function(t){this.root?this.root.insert(t):this.root=new n(t[0],null,null,[t],[t])},_.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==y}return!1},_.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},_.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(_,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(_,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":58}],282:[function(t,e,r){"use strict";function n(t,e){e=e||new Array(t.length);for(var r=0;r=r&&s<=i&&l>=n&&l<=a&&c.push(t[p]);else{var m=Math.floor((d+f)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[m]);var g=(h+1)%2;(0===h?r<=s:n<=l)&&(u.push(d),u.push(m-1),u.push(g)),(0===h?i>=s:a>=l)&&(u.push(m+1),u.push(f),u.push(g))}}return c}e.exports=n},{}],289:[function(t,e,r){"use strict";function n(t,e,r,a,o,s){if(!(o-a<=r)){var l=Math.floor((a+o)/2);i(t,e,l,a,o,s%2),n(t,e,r,a,l-1,s+1),n(t,e,r,l+1,o,s+1)}}function i(t,e,r,n,o,s){for(;o>n;){if(o-n>600){var l=o-n+1,u=r-n+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1);i(t,e,r,Math.max(n,Math.floor(r-u*h/l+f)),Math.min(o,Math.floor(r+(l-u)*h/l+f)),s)}var d=e[2*r+s],p=n,m=o;for(a(t,e,n,r),e[2*o+s]>d&&a(t,e,n,o);pd;)m--}e[2*n+s]===d?a(t,e,n,m):(m++,a(t,e,m,o)),m<=r&&(n=m+1),r<=m&&(o=m-1)}}function a(t,e,r,n){o(t,r,n),o(e,2*r,2*n),o(e,2*r+1,2*n+1)}function o(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}e.exports=n},{}],290:[function(t,e,r){"use strict";function n(t,e,r,n,a,o){for(var s=[0,t.length-1,0],l=[],u=a*a;s.length;){var c=s.pop(),h=s.pop(),f=s.pop();if(h-f<=o)for(var d=f;d<=h;d++)i(e[2*d],e[2*d+1],r,n)<=u&&l.push(t[d]);else{var p=Math.floor((f+h)/2),m=e[2*p],g=e[2*p+1];i(m,g,r,n)<=u&&l.push(t[p]);var v=(c+1)%2;(0===c?r-a<=m:n-a<=g)&&(s.push(f),s.push(p-1),s.push(v)),(0===c?r+a>=m:n+a>=g)&&(s.push(p+1),s.push(h),s.push(v))}}return l}function i(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}e.exports=n},{}],291:[function(t,e,r){"use strict";function n(t,e){var r;if(h(t)){var l,u=t.stops&&"object"==typeof t.stops[0][0],c=u||void 0!==t.property,f=u||!c,d=t.type||e||"exponential";if("exponential"===d)l=o;else if("interval"===d)l=a;else if("categorical"===d)l=i;else{if("identity"!==d)throw new Error('Unknown function type "'+d+'"');l=s}if(u){for(var p={},m=[],g=0;g=t.stops.length)break;if(e<=t.stops[n][0])break;n++}return 0===n?t.stops[n][1]:n===t.stops.length?t.stops[n-1][1]:l(e,r,t.stops[n-1][0],t.stops[n][0],t.stops[n-1][1],t.stops[n][1])}function s(t,e){return e}function l(t,e,r,n,i,a){return"function"==typeof i?function(){var o=i.apply(void 0,arguments),s=a.apply(void 0,arguments);return l(t,e,r,n,o,s)}:i.length?c(t,e,r,n,i,a):u(t,e,r,n,i,a)}function u(t,e,r,n,i,a){var o,s=n-r,l=t-r;return o=1===e?l/s:(Math.pow(e,l)-1)/(Math.pow(e,s)-1),i*(1-o)+a*o}function c(t,e,r,n,i,a){for(var o=[],s=0;s -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},linepattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_blur;\n\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_fade;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\nvoid main() {\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_linewidth.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_linewidth.t) or when fading out\n // (v_linewidth.s)\n float blur = u_blur * v_gamma_scale;\n float alpha = clamp(min(dist - (v_linewidth.t - blur), v_linewidth.s - dist) / blur, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n float y_a = 0.5 + (v_normal.y * v_linewidth.s / u_pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * v_linewidth.s / u_pattern_size_b.y);\n vec2 pos_a = mix(u_pattern_tl_a, u_pattern_br_a, vec2(x_a, y_a));\n vec2 pos_b = mix(u_pattern_tl_b, u_pattern_br_b, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n alpha *= u_opacity;\n\n gl_FragColor = color * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_linewidth;\nuniform mediump float u_gapwidth;\nuniform mediump float u_antialiasing;\nuniform mediump float u_extra;\nuniform mat2 u_antialiasingmatrix;\nuniform mediump float u_offset;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n v_linesofar = a_linesofar;\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},linesdfpattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform lowp vec4 u_color;\nuniform lowp float u_opacity;\n\nuniform float u_blur;\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\nvoid main() {\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_linewidth.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_linewidth.t) or when fading out\n // (v_linewidth.s)\n float blur = u_blur * v_gamma_scale;\n float alpha = clamp(min(dist - (v_linewidth.t - blur), v_linewidth.s - dist) / blur, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma, 0.5 + u_sdfgamma, sdfdist);\n\n gl_FragColor = u_color * (alpha * u_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n", -vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_linewidth;\nuniform mediump float u_gapwidth;\nuniform mediump float u_antialiasing;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform float u_extra;\nuniform mat2 u_antialiasingmatrix;\nuniform mediump float u_offset;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},outline:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n#pragma mapbox: define lowp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = smoothstep(1.0, 0.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},outlinepattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\nvoid main() {\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = smoothstep(1.0, 0.0, dist);\n \n\n gl_FragColor = mix(color1, color2, u_mix) * alpha * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n vec2 scaled_size_a = u_scale_a * u_pattern_size_a;\n vec2 scaled_size_b = u_scale_b * u_pattern_size_b;\n\n // the correct offset needs to be calculated.\n //\n // The offset depends on how many pixels are between the world origin and\n // the edge of the tile:\n // vec2 offset = mod(pixel_coord, size)\n //\n // At high zoom levels there are a ton of pixels between the world origin\n // and the edge of the tile. The glsl spec only guarantees 16 bits of\n // precision for highp floats. We need more than that.\n //\n // The pixel_coord is passed in as two 16 bit values:\n // pixel_coord_upper = floor(pixel_coord / 2^16)\n // pixel_coord_lower = mod(pixel_coord, 2^16)\n //\n // The offset is calculated in a series of steps that should preserve this precision:\n vec2 offset_a = mod(mod(mod(u_pixel_coord_upper, scaled_size_a) * 256.0, scaled_size_a) * 256.0 + u_pixel_coord_lower, scaled_size_a);\n vec2 offset_b = mod(mod(mod(u_pixel_coord_upper, scaled_size_b) * 256.0, scaled_size_b) * 256.0 + u_pixel_coord_lower, scaled_size_b);\n\n v_pos_a = (u_tile_units_to_pixels * a_pos + offset_a) / scaled_size_a;\n v_pos_b = (u_tile_units_to_pixels * a_pos + offset_b) / scaled_size_b;\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},pattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n vec2 scaled_size_a = u_scale_a * u_pattern_size_a;\n vec2 scaled_size_b = u_scale_b * u_pattern_size_b;\n\n // the correct offset needs to be calculated.\n //\n // The offset depends on how many pixels are between the world origin and\n // the edge of the tile:\n // vec2 offset = mod(pixel_coord, size)\n //\n // At high zoom levels there are a ton of pixels between the world origin\n // and the edge of the tile. The glsl spec only guarantees 16 bits of\n // precision for highp floats. We need more than that.\n //\n // The pixel_coord is passed in as two 16 bit values:\n // pixel_coord_upper = floor(pixel_coord / 2^16)\n // pixel_coord_lower = mod(pixel_coord, 2^16)\n //\n // The offset is calculated in a series of steps that should preserve this precision:\n vec2 offset_a = mod(mod(mod(u_pixel_coord_upper, scaled_size_a) * 256.0, scaled_size_a) * 256.0 + u_pixel_coord_lower, scaled_size_a);\n vec2 offset_b = mod(mod(mod(u_pixel_coord_upper, scaled_size_b) * 256.0, scaled_size_b) * 256.0 + u_pixel_coord_lower, scaled_size_b);\n\n v_pos_a = (u_tile_units_to_pixels * a_pos + offset_a) / scaled_size_a;\n v_pos_b = (u_tile_units_to_pixels * a_pos + offset_b) / scaled_size_b;\n}\n"},raster:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity0;\nuniform float u_opacity1;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n vec4 color = color0 * u_opacity0 + color1 * u_opacity1;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb), color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos0 = (((a_texture_pos / 32767.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},icon:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform lowp float u_opacity;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * u_opacity;\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_texture_pos;\nattribute vec4 a_data;\n\n\n// matrix is for the vertex position.\nuniform mat4 u_matrix;\n\nuniform mediump float u_zoom;\nuniform bool u_rotate_with_map;\nuniform vec2 u_extrude_scale;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n vec2 a_tex = a_texture_pos.xy;\n mediump float a_labelminzoom = a_data[0];\n mediump vec2 a_zoom = a_data.pq;\n mediump float a_minzoom = a_zoom[0];\n mediump float a_maxzoom = a_zoom[1];\n\n // u_zoom is the current zoom level adjusted for the change in font size\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\n\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\n if (u_rotate_with_map) {\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\n gl_Position.z += z * gl_Position.w;\n } else {\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n }\n\n v_tex = a_tex / u_texsize;\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\n}\n"},sdf:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform lowp vec4 u_color;\nuniform lowp float u_opacity;\nuniform lowp float u_buffer;\nuniform lowp float u_gamma;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\nvarying float v_gamma_scale;\n\nvoid main() {\n lowp float dist = texture2D(u_texture, v_tex).a;\n lowp float fade_alpha = texture2D(u_fadetexture, v_fade_tex).a;\n lowp float gamma = u_gamma * v_gamma_scale;\n lowp float alpha = smoothstep(u_buffer - gamma, u_buffer + gamma, dist) * fade_alpha;\n\n gl_FragColor = u_color * (alpha * u_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nconst float PI = 3.141592653589793;\n\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_texture_pos;\nattribute vec4 a_data;\n\n\n// matrix is for the vertex position.\nuniform mat4 u_matrix;\n\nuniform mediump float u_zoom;\nuniform bool u_rotate_with_map;\nuniform bool u_pitch_with_map;\nuniform mediump float u_pitch;\nuniform mediump float u_bearing;\nuniform mediump float u_aspect_ratio;\nuniform vec2 u_extrude_scale;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_tex = a_texture_pos.xy;\n mediump float a_labelminzoom = a_data[0];\n mediump vec2 a_zoom = a_data.pq;\n mediump float a_minzoom = a_zoom[0];\n mediump float a_maxzoom = a_zoom[1];\n\n // u_zoom is the current zoom level adjusted for the change in font size\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\n\n // pitch-alignment: map\n // rotation-alignment: map | viewport\n if (u_pitch_with_map) {\n lowp float angle = u_rotate_with_map ? (a_data[1] / 256.0 * 2.0 * PI) : u_bearing;\n lowp float asin = sin(angle);\n lowp float acos = cos(angle);\n mat2 RotationMatrix = mat2(acos, asin, -1.0 * asin, acos);\n vec2 offset = RotationMatrix * a_offset;\n vec2 extrude = u_extrude_scale * (offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\n gl_Position.z += z * gl_Position.w;\n // pitch-alignment: viewport\n // rotation-alignment: map\n } else if (u_rotate_with_map) {\n // foreshortening factor to apply on pitched maps\n // as a label goes from horizontal <=> vertical in angle\n // it goes from 0% foreshortening to up to around 70% foreshortening\n lowp float pitchfactor = 1.0 - cos(u_pitch * sin(u_pitch * 0.75));\n\n lowp float lineangle = a_data[1] / 256.0 * 2.0 * PI;\n\n // use the lineangle to position points a,b along the line\n // project the points and calculate the label angle in projected space\n // this calculation allows labels to be rendered unskewed on pitched maps\n vec4 a = u_matrix * vec4(a_pos, 0, 1);\n vec4 b = u_matrix * vec4(a_pos + vec2(cos(lineangle),sin(lineangle)), 0, 1);\n lowp float angle = atan((b[1]/b[3] - a[1]/a[3])/u_aspect_ratio, b[0]/b[3] - a[0]/a[3]);\n lowp float asin = sin(angle);\n lowp float acos = cos(angle);\n mat2 RotationMatrix = mat2(acos, -1.0 * asin, asin, acos);\n\n vec2 offset = RotationMatrix * (vec2((1.0-pitchfactor)+(pitchfactor*cos(angle*2.0)), 1.0) * a_offset);\n vec2 extrude = u_extrude_scale * (offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n gl_Position.z += z * gl_Position.w;\n // pitch-alignment: viewport\n // rotation-alignment: viewport\n } else {\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n }\n\n v_gamma_scale = (gl_Position.w - 0.5);\n\n v_tex = a_tex / u_texsize;\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\n}\n"},collisionbox:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_zoom;\nuniform float u_maxzoom;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\n\nvoid main() {\n\n float alpha = 0.5;\n\n gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0) * alpha;\n\n if (v_placement_zoom > u_zoom) {\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n }\n\n if (u_zoom >= v_max_zoom) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0) * alpha * 0.25;\n }\n\n if (v_placement_zoom >= u_maxzoom) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0) * alpha * 0.2;\n }\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_data;\n\nuniform mat4 u_matrix;\nuniform float u_scale;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos + a_extrude / u_scale, 0.0, 1.0);\n\n v_max_zoom = a_data.x;\n v_placement_zoom = a_data.y;\n}\n"}},e.exports.util="float evaluate_zoom_function_1(const vec4 values, const float t) {\n if (t < 1.0) {\n return mix(values[0], values[1], t);\n } else if (t < 2.0) {\n return mix(values[1], values[2], t - 1.0);\n } else {\n return mix(values[2], values[3], t - 2.0);\n }\n}\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\n if (t < 1.0) {\n return mix(value0, value1, t);\n } else if (t < 2.0) {\n return mix(value1, value2, t - 1.0);\n } else {\n return mix(value2, value3, t - 2.0);\n }\n}\n"},{path:464}],293:[function(t,e,r){"use strict";function n(t,e){this.message=(t?t+": ":"")+i.apply(i,Array.prototype.slice.call(arguments,2)),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)}var i=t("util").format;e.exports=n},{util:536}],294:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1;e7)return[new n(c,l,"constants have been deprecated as of v8")];if(!(l in f.constants))return[new n(c,l,'constant "%s" not found',l)];e=a({},e,{value:f.constants[l]})}return u.function&&"object"===i(l)?r(e):u.type&&s[u.type]?s[u.type](e):o(a({},e,{valueSpec:u.type?h[u.type]:u}))}},{"../error/validation_error":293,"../util/extend":294,"../util/get_type":295,"./validate_array":298,"./validate_boolean":299,"./validate_color":300,"./validate_constants":301,"./validate_enum":302,"./validate_filter":303,"./validate_function":304,"./validate_layer":306,"./validate_number":308,"./validate_object":309,"./validate_source":311,"./validate_string":312}],298:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("./validate"),a=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.valueSpec,o=t.style,s=t.styleSpec,l=t.key,u=t.arrayElementValidator||i;if("array"!==n(e))return[new a(l,e,"array expected, %s found",n(e))];if(r.length&&e.length!==r.length)return[new a(l,e,"array length %d expected, length %d found",r.length,e.length)];if(r["min-length"]&&e.length7)return r?[new n(e,r,"constants have been deprecated as of v8")]:[];var a=i(r);if("object"!==a)return[new n(e,r,"object expected, %s found",a)];var o=[];for(var s in r)"@"!==s[0]&&o.push(new n(e+"."+s,r[s],'constants must start with "@"'));return o}},{"../error/validation_error":293,"../util/get_type":295}],302:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint");e.exports=function(t){var e=t.key,r=t.value,a=t.valueSpec,o=[];return-1===a.values.indexOf(i(r))&&o.push(new n(e,r,"expected one of [%s], %s found",a.values.join(", "),r)),o}},{"../error/validation_error":293,"../util/unbundle_jsonlint":296}],303:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_enum"),a=t("../util/get_type"),o=t("../util/unbundle_jsonlint");e.exports=function t(e){var r,s=e.value,l=e.key,u=e.styleSpec,c=[];if("array"!==a(s))return[new n(l,s,"array expected, %s found",a(s))];if(s.length<1)return[new n(l,s,"filter array must have at least 1 element")];switch(c=c.concat(i({key:l+"[0]",value:s[0],valueSpec:u.filter_operator,style:e.style,styleSpec:e.styleSpec})),o(s[0])){case"<":case"<=":case">":case">=":s.length>=2&&"$type"==s[1]&&c.push(new n(l,s,'"$type" cannot be use with operator "%s"',s[0]));case"==":case"!=":3!=s.length&&c.push(new n(l,s,'filter array for operator "%s" must have 3 elements',s[0]));case"in":case"!in":s.length>=2&&(r=a(s[1]),"string"!==r?c.push(new n(l+"[1]",s[1],"string expected, %s found",r)):"@"===s[1][0]&&c.push(new n(l+"[1]",s[1],"filter key cannot be a constant")));for(var h=2;h=8&&(f&&!t.valueSpec["property-function"]?p.push(new n(t.key,t.value,"property functions not supported")):d&&!t.valueSpec["zoom-function"]&&p.push(new n(t.key,t.value,"zoom functions not supported"))),p}},{"../error/validation_error":293,"../util/get_type":295,"./validate":297,"./validate_array":298,"./validate_number":308,"./validate_object":309}],305:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_string");e.exports=function(t){var e=t.value,r=t.key,a=i(t);return a.length?a:(-1===e.indexOf("{fontstack}")&&a.push(new n(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&a.push(new n(r,e,'"glyphs" url must include a "{range}" token')),a)}},{"../error/validation_error":293,"./validate_string":312}],306:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),a=t("./validate_object"),o=t("./validate_filter"),s=t("./validate_paint_property"),l=t("./validate_layout_property"),u=t("../util/extend");e.exports=function(t){var e=[],r=t.value,c=t.key,h=t.style,f=t.styleSpec;r.type||r.ref||e.push(new n(c,r,'either "type" or "ref" is required'));var d=i(r.type),p=i(r.ref);if(r.id)for(var m=0;ma.maximum?[new i(e,r,"%s is greater than the maximum value %s",r,a.maximum)]:[]}},{"../error/validation_error":293,"../util/get_type":295}],309:[function(t,e,r){"use strict" -;var n=t("../error/validation_error"),i=t("../util/get_type"),a=t("./validate");e.exports=function(t){var e=t.key,r=t.value,o=t.valueSpec,s=t.objectElementValidators||{},l=t.style,u=t.styleSpec,c=[],h=i(r);if("object"!==h)return[new n(e,r,"object expected, %s found",h)];for(var f in r){var d=f.split(".")[0],p=o&&(o[d]||o["*"]),m=s[d]||s["*"];p||m?c=c.concat((m||a)({key:(e?e+".":e)+f,value:r[f],valueSpec:p,style:l,styleSpec:u,object:r,objectKey:f})):""!==e&&1!==e.split(".").length&&c.push(new n(e,r[f],'unknown property "%s"',f))}for(d in o)o[d].required&&void 0===o[d].default&&void 0===r[d]&&c.push(new n(e,r,'missing required property "%s"',d));return c}},{"../error/validation_error":293,"../util/get_type":295,"./validate":297}],310:[function(t,e,r){"use strict";var n=t("./validate"),i=t("../error/validation_error");e.exports=function(t){var e=t.key,r=t.style,a=t.styleSpec,o=t.value,s=t.objectKey,l=a["paint_"+t.layerType],u=s.match(/^(.*)-transition$/);return u&&l[u[1]]&&l[u[1]].transition?n({key:e,value:o,valueSpec:a.transition,style:r,styleSpec:a}):t.valueSpec||l[s]?n({key:t.key,value:o,valueSpec:t.valueSpec||l[s],style:r,styleSpec:a}):[new i(e,o,'unknown property "%s"',s)]}},{"../error/validation_error":293,"./validate":297}],311:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),a=t("./validate_object"),o=t("./validate_enum");e.exports=function(t){var e=t.value,r=t.key,s=t.styleSpec,l=t.style;if(!e.type)return[new n(r,e,'"type" is required')];switch(i(e.type)){case"vector":case"raster":var u=[];if(u=u.concat(a({key:r,value:e,valueSpec:s.source_tile,style:t.style,styleSpec:s})),"url"in e)for(var c in e)["type","url","tileSize"].indexOf(c)<0&&u.push(new n(r+"."+c,e[c],'a source with a "url" property may not include a "%s" property',c));return u;case"geojson":return a({key:r,value:e,valueSpec:s.source_geojson,style:l,styleSpec:s});case"video":return a({key:r,value:e,valueSpec:s.source_video,style:l,styleSpec:s});case"image":return a({key:r,value:e,valueSpec:s.source_image,style:l,styleSpec:s});default:return o({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","geojson","video","image"]},style:l,styleSpec:s})}}},{"../error/validation_error":293,"../util/unbundle_jsonlint":296,"./validate_enum":302,"./validate_object":309}],312:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.key,a=n(e);return"string"!==a?[new i(r,e,"string expected, %s found",a)]:[]}},{"../error/validation_error":293,"../util/get_type":295}],313:[function(t,e,r){"use strict";function n(t,e){e=e||l;var r=[];return r=r.concat(s({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:u}})),e.$version>7&&t.constants&&(r=r.concat(o({key:"constants",value:t.constants,style:t,styleSpec:e}))),i(r)}function i(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function a(t){return function(){return i(t.apply(this,arguments))}}var o=t("./validate/validate_constants"),s=t("./validate/validate"),l=t("../reference/latest.min"),u=t("./validate/validate_glyphs_url");n.source=a(t("./validate/validate_source")),n.layer=a(t("./validate/validate_layer")),n.filter=a(t("./validate/validate_filter")),n.paintProperty=a(t("./validate/validate_paint_property")),n.layoutProperty=a(t("./validate/validate_layout_property")),e.exports=n},{"../reference/latest.min":314,"./validate/validate":297,"./validate/validate_constants":301,"./validate/validate_filter":303,"./validate/validate_glyphs_url":305,"./validate/validate_layer":306,"./validate/validate_layout_property":307,"./validate/validate_paint_property":310,"./validate/validate_source":311}],314:[function(t,e,r){e.exports=t("./v8.min.json")},{"./v8.min.json":315}],315:[function(t,e,r){e.exports={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_tile","source_geojson","source_video","source_image"],source_tile:{type:{required:!0,type:"enum",values:["vector","raster"]},url:{type:"string"},tiles:{type:"array",value:"string"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:["geojson"]},data:{type:"*"},maxzoom:{type:"number",default:14},buffer:{type:"number",default:64},tolerance:{type:"number",default:3},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:400},clusterMaxZoom:{type:"number"}},source_video:{type:{required:!0,type:"enum",values:["video"]},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:["image"]},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:["fill","line","symbol","circle","raster","background"]},metadata:{type:"*"},ref:{type:"string"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:22},maxzoom:{type:"number",minimum:0,maximum:22},interactive:{type:"boolean",default:!1},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"},"paint.*":{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],layout_background:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_fill:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_circle:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["butt","round","square"],default:"butt"},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["bevel","round","miter"],default:"miter"},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,"property-function":!0,requires:[{"line-join":"miter"}]},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,"property-function":!0,requires:[{"line-join":"round"}]},visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["point","line"],default:"point"},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,"property-function":!0,units:"pixels",requires:[{"symbol-placement":"line"}]},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image"]},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image"]},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image","text-field"]},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"viewport",requires:["icon-image"]},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!1,values:["none","both","width","height"],default:"none",requires:["icon-image","text-field"]},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image","icon-text-fit","text-field"]},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,tokens:!0},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",requires:["icon-image"]},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"pixels",requires:["icon-image"]},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],requires:["text-field"]},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"viewport",requires:["text-field"]},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"]},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-max-width":{type:"number",default:10,minimum:0,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-line-height":{type:"number",default:1.2,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-letter-spacing":{type:"number",default:0,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["left","center","right"],default:"center",requires:["text-field"]},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:"center",requires:["text-field"]},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field",{"symbol-placement":"line"}]},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["none","uppercase","lowercase"],default:"none",requires:["text-field"]},"text-offset":{type:"array",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"]},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field"]},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field"]},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field","icon-image"]},visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_raster:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:["==","!=",">",">=","<","<=","in","!in","all","any","none","has","!has"]},geometry_type:{type:"enum",values:["Point","LineString","Polygon"]},color_operation:{type:"enum",values:["lighten","saturate","spin","fade","mix"]},function:{stops:{type:"array",required:!0,value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:["exponential","interval","categorical"],default:"exponential"}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},paint:["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!0},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"fill-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}]},"fill-outline-color":{type:"color",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}]},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["fill-translate"]},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,transition:!0}},paint_line:{"line-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"line-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}]},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["line-translate"]},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-gap-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-offset":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,"property-function":!0,minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}]},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,transition:!0}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-blur":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["circle-translate"]},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["icon-image","icon-translate"]},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["text-field","text-translate"]}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees"},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,default:0,minimum:0,maximum:1,transition:!0},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,default:1,minimum:0,maximum:1,transition:!0},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!0,units:"milliseconds"}},paint_background:{"background-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}]},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}}}},{}],316:[function(t,e,r){"use strict";function n(t){return!!(i()&&a()&&o()&&s()&&l()&&u()&&c()&&h(t&&t.failIfMajorPerformanceCaveat))}function i(){return"undefined"!=typeof window&&"undefined"!=typeof document}function a(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function o(){return Function.prototype&&Function.prototype.bind}function s(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function l(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function u(){return"Worker"in window}function c(){return"Uint8ClampedArray"in window}function h(t){return void 0===d[t]&&(d[t]=f(t)),d[t]}function f(t){var e=document.createElement("canvas"),r=Object.create(n.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,e.probablySupportsContext?e.probablySupportsContext("webgl",r)||e.probablySupportsContext("experimental-webgl",r):e.supportsContext?e.supportsContext("webgl",r)||e.supportsContext("experimental-webgl",r):e.getContext("webgl",r)||e.getContext("experimental-webgl",r)}void 0!==e&&e.exports?e.exports=n:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=n);var d={};n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},{}],317:[function(t,e,r){"use strict";function n(t){var e=t.layoutVertexArrayType;this.layoutVertexArray=new e;var r=t.elementArrayType;r&&(this.elementArray=new r);var n=t.elementArrayType2;n&&(this.elementArray2=new n),this.paintVertexArrays=i.mapObject(t.paintVertexArrayTypes,function(t){return new t})}var i=t("../util/util");e.exports=n,n.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,n.prototype.hasCapacityFor=function(t){return this.layoutVertexArray.length+t<=n.MAX_VERTEX_ARRAY_LENGTH},n.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},n.prototype.trim=function(){this.layoutVertexArray.trim(),this.elementArray&&this.elementArray.trim(),this.elementArray2&&this.elementArray2.trim();for(var t in this.paintVertexArrays)this.paintVertexArrays[t].trim()},n.prototype.serialize=function(){return{layoutVertexArray:this.layoutVertexArray.serialize(),elementArray:this.elementArray&&this.elementArray.serialize(),elementArray2:this.elementArray2&&this.elementArray2.serialize(),paintVertexArrays:i.mapObject(this.paintVertexArrays,function(t){return t.serialize()})}},n.prototype.getTransferables=function(t){t.push(this.layoutVertexArray.arrayBuffer),this.elementArray&&t.push(this.elementArray.arrayBuffer),this.elementArray2&&t.push(this.elementArray2.arrayBuffer);for(var e in this.paintVertexArrays)t.push(this.paintVertexArrays[e].arrayBuffer)}},{"../util/util":431}],318:[function(t,e,r){"use strict";function n(t){if(this.zoom=t.zoom,this.overscaling=t.overscaling,this.layer=t.layer,this.childLayers=t.childLayers,this.type=this.layer.type,this.features=[],this.id=this.layer.id,this.index=t.index,this.sourceLayer=this.layer.sourceLayer,this.sourceLayerIndex=t.sourceLayerIndex,this.minZoom=this.layer.minzoom,this.maxZoom=this.layer.maxzoom,this.paintAttributes=i(this),t.arrays){var e=this.programInterfaces;this.bufferGroups=c.mapObject(t.arrays,function(r,n){var i=e[n],a=t.paintVertexArrayTypes[n];return r.map(function(t){return new u(t,{layoutVertexArrayType:i.layoutVertexArrayType.serialize(),elementArrayType:i.elementArrayType&&i.elementArrayType.serialize(),elementArrayType2:i.elementArrayType2&&i.elementArrayType2.serialize(),paintVertexArrayTypes:a})})})}}function i(t){var e={};for(var r in t.programInterfaces){for(var n=e[r]={},i=0;i1?p.name+_:p.name;x[w]=m[_]*g}}},n.VertexArrayType=function(t){return new h({members:t,alignment:4})},n.ElementArrayType=function(t){return new h({members:[{type:"Uint16",name:"vertices",components:t||3}]})}},{"../util/struct_array":429,"../util/util":431,"./array_group":317,"./bucket/circle_bucket":319,"./bucket/fill_bucket":320,"./bucket/line_bucket":321,"./bucket/symbol_bucket":322,"./buffer_group":324,assert:39,"feature-filter":124}],319:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var i=t("../bucket"),a=t("../../util/util"),o=t("../load_geometry"),s=i.EXTENT;e.exports=n,n.prototype=a.inherit(i,{}),n.prototype.addCircleVertex=function(t,e,r,n,i){return t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)},n.prototype.programInterfaces={circle:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"}]),elementArrayType:new i.ElementArrayType,paintAttributes:[{name:"a_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("circle-color",e,r)},multiplier:255,paintProperty:"circle-color"},{name:"a_radius",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-radius",e,r)]},multiplier:10,paintProperty:"circle-radius"},{name:"a_blur",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){ -return[t.getPaintValue("circle-blur",e,r)]},multiplier:10,paintProperty:"circle-blur"},{name:"a_opacity",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-opacity",e,r)]},multiplier:255,paintProperty:"circle-opacity"}]}},n.prototype.addFeature=function(t){for(var e={zoom:this.zoom},r=o(t),n=this.prepareArrayGroup("circle",0),i=n.layoutVertexArray.length,a=0;a=s||c<0||c>=s)){var h=this.prepareArrayGroup("circle",4),f=h.layoutVertexArray,d=this.addCircleVertex(f,u,c,-1,-1);this.addCircleVertex(f,u,c,1,-1),this.addCircleVertex(f,u,c,1,1),this.addCircleVertex(f,u,c,-1,1),h.elementArray.emplaceBack(d,d+1,d+2),h.elementArray.emplaceBack(d,d+3,d+2)}}this.populatePaintArrays("circle",e,t.properties,n,i)}},{"../../util/util":431,"../bucket":318,"../load_geometry":326}],320:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var i=t("../bucket"),a=t("../../util/util"),o=t("../load_geometry"),s=t("earcut"),l=t("../../util/classify_rings");e.exports=n,n.prototype=a.inherit(i,{}),n.prototype.programInterfaces={fill:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"}]),elementArrayType:new i.ElementArrayType(1),elementArrayType2:new i.ElementArrayType(2),paintAttributes:[{name:"a_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("fill-color",e,r)},multiplier:255,paintProperty:"fill-color"},{name:"a_outline_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("fill-outline-color",e,r)},multiplier:255,paintProperty:"fill-outline-color"},{name:"a_opacity",components:1,type:"Uint8",getValue:function(t,e,r){return[t.getPaintValue("fill-opacity",e,r)]},multiplier:255,paintProperty:"fill-opacity"}]}},n.prototype.addFeature=function(t){for(var e=o(t),r=l(e,500),n=this.prepareArrayGroup("fill",0),i=n.layoutVertexArray.length,a=0;a0&&a.push(i.length/2);for(var c=0;c=1&&n.elementArray2.emplaceBack(f-1,f),i.push(h.x),i.push(h.y)}}for(var d=s(i,a),p=0;p>6)},n.prototype.programInterfaces={line:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}]),elementArrayType:new i.ElementArrayType}},n.prototype.addFeature=function(t){for(var e=o(t,15),r=0;r2&&t[a-1].equals(t[a-2]);)a--;if(!(t.length<2)){"bevel"===e&&(n=1.05);var o=s/(512*this.overscaling)*15,u=t[0],c=t[a-1],h=u.equals(c);if(this.prepareArrayGroup("line",10*a),2!==a||!h){this.distance=0;var f,d,p,m,g,v,y,b=r,x=h?"butt":r,_=!0;this.e1=this.e2=this.e3=-1,h&&(f=t[a-2],g=u.sub(f)._unit()._perp());for(var w=0;w0){var S=f.dist(d);if(S>2*o){var E=f.sub(f.sub(d)._mult(o/S)._round());this.distance+=E.dist(d),this.addCurrentVertex(E,this.distance,m.mult(1),0,0,!1),d=E}}var L=d&&p,C=L?e:p?b:x;if(L&&"round"===C&&(An&&(C="bevel"),"bevel"===C&&(A>2&&(C="flipbevel"),A100)M=g.clone();else{var z=m.x*g.y-m.y*g.x>0?-1:1,D=A*m.add(g).mag()/m.sub(g).mag();M._perp()._mult(D*z)}this.addCurrentVertex(f,this.distance,M,0,0,!1),this.addCurrentVertex(f,this.distance,M.mult(-1),0,0,!1)}else if("bevel"===C||"fakeround"===C){var I=m.x*g.y-m.y*g.x>0,P=-Math.sqrt(A*A-1);if(I?(y=0,v=P):(v=0,y=P),_||this.addCurrentVertex(f,this.distance,m,v,y,!1),"fakeround"===C){for(var O,R=Math.floor(8*(.5-(k-.5))),j=0;j=0;F--)O=m.mult((F+1)/(R+1))._add(g)._unit(),this.addPieSliceVertex(f,this.distance,O,I)}p&&this.addCurrentVertex(f,this.distance,g,-v,-y,!1)}else"butt"===C?(_||this.addCurrentVertex(f,this.distance,m,0,0,!1),p&&this.addCurrentVertex(f,this.distance,g,0,0,!1)):"square"===C?(_||(this.addCurrentVertex(f,this.distance,m,1,1,!1),this.e1=this.e2=-1),p&&this.addCurrentVertex(f,this.distance,g,-1,-1,!1)):"round"===C&&(_||(this.addCurrentVertex(f,this.distance,m,0,0,!1),this.addCurrentVertex(f,this.distance,m,1,1,!0),this.e1=this.e2=-1),p&&(this.addCurrentVertex(f,this.distance,g,-1,-1,!0),this.addCurrentVertex(f,this.distance,g,0,0,!1)));if(T&&w2*o){var B=f.add(p.sub(f)._mult(o/N)._round());this.distance+=B.dist(f),this.addCurrentVertex(B,this.distance,g.mult(1),0,0,!1),f=B}}_=!1}}}},n.prototype.addCurrentVertex=function(t,e,r,n,i,a){var o,s=a?1:0,l=this.arrayGroups.line[this.arrayGroups.line.length-1],c=l.layoutVertexArray,h=l.elementArray;o=r.clone(),n&&o._sub(r.perp()._mult(n)),this.e3=this.addLineVertex(c,t,o,s,0,n,e),this.e1>=0&&this.e2>=0&&h.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,o=r.mult(-1),i&&o._sub(r.perp()._mult(i)),this.e3=this.addLineVertex(c,t,o,s,1,-i,e),this.e1>=0&&this.e2>=0&&h.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,e>u/2&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,a))},n.prototype.addPieSliceVertex=function(t,e,r,n){var i=n?1:0;r=r.mult(n?-1:1);var a=this.arrayGroups.line[this.arrayGroups.line.length-1],o=a.layoutVertexArray,s=a.elementArray;this.e3=this.addLineVertex(o,t,r,0,i,0,e),this.e1>=0&&this.e2>=0&&s.emplaceBack(this.e1,this.e2,this.e3),n?this.e2=this.e3:this.e1=this.e3}},{"../../util/util":431,"../bucket":318,"../load_geometry":326}],322:[function(t,e,r){"use strict";function n(t){o.apply(this,arguments),this.showCollisionBoxes=t.showCollisionBoxes,this.overscaling=t.overscaling,this.collisionBoxArray=t.collisionBoxArray,this.symbolQuadsArray=t.symbolQuadsArray,this.symbolInstancesArray=t.symbolInstancesArray,this.sdfIcons=t.sdfIcons,this.iconsNeedLinear=t.iconsNeedLinear,this.adjustedTextSize=t.adjustedTextSize,this.adjustedIconSize=t.adjustedIconSize,this.fontstack=t.fontstack}function i(t,e,r,n,i,a,o,s,l,u,c){return t.emplaceBack(e,r,Math.round(64*n),Math.round(64*i),a/4,o/4,10*(u||0),c,10*(s||0),10*Math.min(l||25,25))}var a=t("point-geometry"),o=t("../bucket"),s=t("../../symbol/anchor"),l=t("../../symbol/get_anchors"),u=t("../../util/token"),c=t("../../symbol/quads"),h=t("../../symbol/shaping"),f=t("../../symbol/resolve_text"),d=t("../../symbol/mergelines"),p=t("../../symbol/clip_line"),m=t("../../util/util"),g=t("../load_geometry"),v=t("../../symbol/collision_feature"),y=h.shapeText,b=h.shapeIcon,x=c.getGlyphQuads,_=c.getIconQuads,w=o.EXTENT;e.exports=n,n.MAX_QUADS=65535,n.prototype=m.inherit(o,{}),n.prototype.serialize=function(){var t=o.prototype.serialize.apply(this);return t.sdfIcons=this.sdfIcons,t.iconsNeedLinear=this.iconsNeedLinear,t.adjustedTextSize=this.adjustedTextSize,t.adjustedIconSize=this.adjustedIconSize,t.fontstack=this.fontstack,t};var M=new o.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_offset",components:2,type:"Int16"},{name:"a_texture_pos",components:2,type:"Uint16"},{name:"a_data",components:4,type:"Uint8"}]),k=new o.ElementArrayType;n.prototype.addCollisionBoxVertex=function(t,e,r,n,i){return t.emplaceBack(e.x,e.y,Math.round(r.x),Math.round(r.y),10*n,10*i)},n.prototype.programInterfaces={glyph:{layoutVertexArrayType:M,elementArrayType:k},icon:{layoutVertexArrayType:M,elementArrayType:k},collisionBox:{layoutVertexArrayType:new o.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"},{name:"a_data",components:2,type:"Uint8"}])}},n.prototype.populateArrays=function(t,e,r){var n={lastIntegerZoom:1/0,lastIntegerZoomTime:0,lastZoom:0};this.adjustedTextMaxSize=this.layer.getLayoutValue("text-size",{zoom:18,zoomHistory:n}),this.adjustedTextSize=this.layer.getLayoutValue("text-size",{zoom:this.zoom+1,zoomHistory:n}),this.adjustedIconMaxSize=this.layer.getLayoutValue("icon-size",{zoom:18,zoomHistory:n}),this.adjustedIconSize=this.layer.getLayoutValue("icon-size",{zoom:this.zoom+1,zoomHistory:n});var i=512*this.overscaling;this.tilePixelRatio=w/i,this.compareText={},this.iconsNeedLinear=!1,this.symbolInstancesStartIndex=this.symbolInstancesArray.length;var a=this.layer.layout,o=this.features,s=this.textFeatures,l=.5,c=.5;switch(a["text-anchor"]){case"right":case"top-right":case"bottom-right":l=1;break;case"left":case"top-left":case"bottom-left":l=0}switch(a["text-anchor"]){case"bottom":case"bottom-right":case"bottom-left":c=1;break;case"top":case"top-right":case"top-left":c=0}for(var h="right"===a["text-justify"]?1:"left"===a["text-justify"]?0:.5,f=24*a["text-line-height"],p="line"!==a["symbol-placement"]?24*a["text-max-width"]:0,v=24*a["text-letter-spacing"],x=[24*a["text-offset"][0],24*a["text-offset"][1]],_=this.fontstack=a["text-font"].join(","),M=[],k=0;kw||L.y<0||L.y>w);if(!d||C){var z=C||x;this.addSymbolInstance(L,T,e,r,this.layer,z,this.symbolInstancesArray.length,this.collisionBoxArray,n.index,this.sourceLayerIndex,this.index,u,m,y,h,g,b,{zoom:this.zoom},n.properties)}}}}},n.prototype.anchorIsTooClose=function(t,e,r){var n=this.compareText;if(t in n){for(var i=n[t],a=i.length-1;a>=0;a--)if(r.dist(i[a])3*Math.PI/2))){var g=p.tl,v=p.tr,y=p.bl,b=p.br,x=p.tex,_=p.anchorPoint,w=Math.max(h+Math.log(p.minScale)/Math.LN2,f),M=Math.min(h+Math.log(p.maxScale)/Math.LN2,25);if(!(M<=w)){w===f&&(w=0);var k=Math.round(p.glyphAngle/(2*Math.PI)*256),A=i(c,_.x,_.y,g.x,g.y,x.x,x.y,w,M,f,k);i(c,_.x,_.y,v.x,v.y,x.x+x.w,x.y,w,M,f,k),i(c,_.x,_.y,y.x,y.y,x.x,x.y+x.h,w,M,f,k),i(c,_.x,_.y,b.x,b.y,x.x+x.w,x.y+x.h,w,M,f,k),u.emplaceBack(A,A+1,A+2),u.emplaceBack(A+1,A+2,A+3)}}}},n.prototype.updateIcons=function(t){this.recalculateStyleLayers();var e=this.layer.layout["icon-image"];if(e)for(var r=0;rn.MAX_QUADS&&m.warnOnce("Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),A>n.MAX_QUADS&&m.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),this.symbolInstancesArray.emplaceBack(I,P,O,R,k,A,T,S,t.x,t.y,s)},n.prototype.addSymbolQuad=function(t){return this.symbolQuadsArray.emplaceBack(t.anchorPoint.x,t.anchorPoint.y,t.tl.x,t.tl.y,t.tr.x,t.tr.y,t.bl.x,t.bl.y,t.br.x,t.br.y,t.tex.h,t.tex.w,t.tex.x,t.tex.y,t.anchorAngle,t.glyphAngle,t.maxScale,t.minScale)}},{"../../symbol/anchor":380,"../../symbol/clip_line":382,"../../symbol/collision_feature":384,"../../symbol/get_anchors":386,"../../symbol/mergelines":389,"../../symbol/quads":390,"../../symbol/resolve_text":391,"../../symbol/shaping":392,"../../util/token":430,"../../util/util":431,"../bucket":318,"../load_geometry":326,"point-geometry":472}],323:[function(t,e,r){"use strict";function n(t,e,r){this.arrayBuffer=t.arrayBuffer,this.length=t.length,this.attributes=e.members,this.itemSize=e.bytesPerElement,this.type=r,this.arrayType=e}e.exports=n,n.prototype.bind=function(t){var e=t[this.type];this.buffer?t.bindBuffer(e,this.buffer):(this.buffer=t.createBuffer(),t.bindBuffer(e,this.buffer),t.bufferData(e,this.arrayBuffer,t.STATIC_DRAW),this.arrayBuffer=null)};var i={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT"};n.prototype.setVertexAttribPointers=function(t,e){for(var r=0;r0?t["line-gap-width"]+2*t["line-width"]:t["line-width"]}function s(t,e,r,n,i){if(!e[0]&&!e[1])return t;e=u.convert(e),"viewport"===r&&e._rotate(-n);for(var a=[],o=0;or.max||f.yr.max)&&i.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return l}},{"../util/util":431,"./bucket":318,assert:39}],327:[function(t,e,r){"use strict";function n(t,e,r){this.column=t,this.row=e,this.zoom=r}e.exports=n,n.prototype={clone:function(){return new n(this.column,this.row,this.zoom)},zoomTo:function(t){return this.clone()._zoomTo(t)},sub:function(t){return this.clone()._sub(t)},_zoomTo:function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},_sub:function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this}}},{}],328:[function(t,e,r){"use strict";function n(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}e.exports=n;var i=t("../util/util").wrap;n.prototype.wrap=function(){return new n(i(this.lng,-180,180),this.lat)},n.prototype.toArray=function(){return[this.lng,this.lat]},n.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{"../util/util":431}],329:[function(t,e,r){"use strict";function n(t,e){t&&(e?this.extend(t).extend(e):4===t.length?this.extend([t[0],t[1]]).extend([t[2],t[3]]):this.extend(t[0]).extend(t[1]))}e.exports=n;var i=t("./lng_lat");n.prototype={extend:function(t){var e,r,a=this._sw,o=this._ne;if(t instanceof i)e=t,r=t;else{if(!(t instanceof n))return t?this.extend(i.convert(t)||n.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return a||o?(a.lng=Math.min(e.lng,a.lng),a.lat=Math.min(e.lat,a.lat),o.lng=Math.max(r.lng,o.lng),o.lat=Math.max(r.lat,o.lat)):(this._sw=new i(e.lng,e.lat),this._ne=new i(r.lng,r.lat)),this},getCenter:function(){return new i((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},getSouthWest:function(){return this._sw},getNorthEast:function(){return this._ne},getNorthWest:function(){return new i(this.getWest(),this.getNorth())},getSouthEast:function(){return new i(this.getEast(),this.getSouth())},getWest:function(){return this._sw.lng},getSouth:function(){return this._sw.lat},getEast:function(){return this._ne.lng},getNorth:function(){return this._ne.lat},toArray:function(){return[this._sw.toArray(),this._ne.toArray()]},toString:function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"}},n.convert=function(t){return!t||t instanceof n?t:new n(t)}},{"./lng_lat":328}],330:[function(t,e,r){"use strict";function n(t,e){this.tileSize=512,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new i(0,0),this.zoom=0,this.angle=0,this._altitude=1.5,this._pitch=0,this._unmodified=!0}var i=t("./lng_lat"),a=t("point-geometry"),o=t("./coordinate"),s=t("../util/util").wrap,l=t("../util/interpolate"),u=t("../source/tile_coord"),c=t("../data/bucket").EXTENT,h=t("gl-matrix"),f=h.vec4,d=h.mat4,p=h.mat2;e.exports=n,n.prototype={get minZoom(){return this._minZoom},set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},get maxZoom(){return this._maxZoom},set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},get worldSize(){return this.tileSize*this.scale},get centerPoint(){return this.size._div(2)},get size(){return new a(this.width,this.height)},get bearing(){return-this.angle/Math.PI*180},set bearing(t){var e=-s(t,-180,180)*Math.PI/180;this.angle!==e&&(this._unmodified=!1,this.angle=e,this._calcMatrices(),this.rotationMatrix=p.create(),p.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},get pitch(){return this._pitch/Math.PI*180},set pitch(t){var e=Math.min(60,t)/180*Math.PI;this._pitch!==e&&(this._unmodified=!1,this._pitch=e,this._calcMatrices())},get altitude(){return this._altitude},set altitude(t){var e=Math.max(.75,t);this._altitude!==e&&(this._unmodified=!1,this._altitude=e,this._calcMatrices())},get zoom(){return this._zoom},set zoom(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._calcMatrices(),this._constrain())},get center(){return this._center},set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._calcMatrices(),this._constrain())},coveringZoomLevel:function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},coveringTiles:function(t){var e=this.coveringZoomLevel(t),r=e;if(et.maxzoom&&(e=t.maxzoom);var n=this,i=n.locationCoordinate(n.center)._zoomTo(e),o=new a(i.column-.5,i.row-.5);return u.cover(e,[n.pointCoordinate(new a(0,0))._zoomTo(e),n.pointCoordinate(new a(n.width,0))._zoomTo(e),n.pointCoordinate(new a(n.width,n.height))._zoomTo(e),n.pointCoordinate(new a(0,n.height))._zoomTo(e)],t.reparseOverscaled?r:e).sort(function(t,e){return o.dist(t)-o.dist(e)})},resize:function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._calcMatrices(),this._constrain()},get unmodified(){return this._unmodified},zoomScale:function(t){return Math.pow(2,t)},scaleZoom:function(t){return Math.log(t)/Math.LN2},project:function(t,e){return new a(this.lngX(t.lng,e),this.latY(t.lat,e))},unproject:function(t,e){return new i(this.xLng(t.x,e),this.yLat(t.y,e))},get x(){return this.lngX(this.center.lng)},get y(){return this.latY(this.center.lat)},get point(){return new a(this.x,this.y)},lngX:function(t,e){return(180+t)*(e||this.worldSize)/360},latY:function(t,e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*(e||this.worldSize)/360},xLng:function(t,e){return 360*t/(e||this.worldSize)-180},yLat:function(t,e){var r=180-360*t/(e||this.worldSize);return 360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90},panBy:function(t){var e=this.centerPoint._add(t);this.center=this.pointLocation(e)},setLocationAtPoint:function(t,e){var r=this.locationCoordinate(t),n=this.pointCoordinate(e),i=this.pointCoordinate(this.centerPoint),a=n._sub(r);this._unmodified=!1,this.center=this.coordinateLocation(i._sub(a))},locationPoint:function(t){return this.coordinatePoint(this.locationCoordinate(t))},pointLocation:function(t){return this.coordinateLocation(this.pointCoordinate(t))},locationCoordinate:function(t){var e=this.zoomScale(this.tileZoom)/this.worldSize,r=i.convert(t);return new o(this.lngX(r.lng)*e,this.latY(r.lat)*e,this.tileZoom)},coordinateLocation:function(t){var e=this.zoomScale(t.zoom);return new i(this.xLng(t.column,e),this.yLat(t.row,e))},pointCoordinate:function(t){var e=[t.x,t.y,0,1],r=[t.x,t.y,1,1];f.transformMat4(e,e,this.pixelMatrixInverse),f.transformMat4(r,r,this.pixelMatrixInverse) -;var n=e[3],i=r[3],a=e[0]/n,s=r[0]/i,u=e[1]/n,c=r[1]/i,h=e[2]/n,d=r[2]/i,p=h===d?0:(0-h)/(d-h),m=this.worldSize/this.zoomScale(this.tileZoom);return new o(l(a,s,p)/m,l(u,c,p)/m,this.tileZoom)},coordinatePoint:function(t){var e=this.worldSize/this.zoomScale(t.zoom),r=[t.column*e,t.row*e,0,1];return f.transformMat4(r,r,this.pixelMatrix),new a(r[0]/r[3],r[1]/r[3])},calculatePosMatrix:function(t,e){void 0===e&&(e=1/0),t instanceof u&&(t=t.toCoordinate(e));var r=Math.min(t.zoom,e),n=this.worldSize/Math.pow(2,r),i=new Float64Array(16);return d.identity(i),d.translate(i,i,[t.column*n,t.row*n,0]),d.scale(i,i,[n/c,n/c,1]),d.multiply(i,this.projMatrix,i),new Float32Array(i)},_constrain:function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,e,r,n,i,o,s,l,u=this.size,c=this._unmodified;this.latRange&&(t=this.latY(this.latRange[1]),e=this.latY(this.latRange[0]),i=e-te&&(l=e-d)}if(this.lngRange){var p=this.x,m=u.x/2;p-mn&&(s=n-m)}void 0===s&&void 0===l||(this.center=this.unproject(new a(void 0!==s?s:this.x,void 0!==l?l:this.y))),this._unmodified=c,this._constraining=!1}},_calcMatrices:function(){if(this.height){var t=Math.atan(.5/this.altitude),e=Math.sin(t)*this.altitude/Math.sin(Math.PI/2-this._pitch-t),r=Math.cos(Math.PI/2-this._pitch)*e+this.altitude,n=new Float64Array(16);if(d.perspective(n,2*Math.atan(this.height/2/this.altitude),this.width/this.height,.1,r),d.translate(n,n,[0,0,-this.altitude]),d.scale(n,n,[1,-1,1/this.height]),d.rotateX(n,n,this._pitch),d.rotateZ(n,n,this.angle),d.translate(n,n,[-this.x,-this.y,0]),this.projMatrix=n,n=d.create(),d.scale(n,n,[this.width/2,-this.height/2,1]),d.translate(n,n,[1,-1,0]),this.pixelMatrix=d.multiply(new Float64Array(16),n,this.projMatrix),!(n=d.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=n}}}},{"../data/bucket":318,"../source/tile_coord":358,"../util/interpolate":425,"../util/util":431,"./coordinate":327,"./lng_lat":328,"gl-matrix":184,"point-geometry":472}],331:[function(t,e,r){"use strict";var n={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]};e.exports=function(t,e,r,i){i=i||1;var a,o,s,l,u,c,h,f,d=[];for(a=0,o=t.length;a>16,_>>16),s.uniform2f(n.u_pixel_coord_lower,65535&x,65535&_)}s.uniformMatrix4fv(n.u_matrix,!1,t.transform.calculatePosMatrix(v)),s.drawArrays(s.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}s.stencilMask(0),s.stencilFunc(s.EQUAL,128,128)}var i=t("../source/pixels_to_tile_units"),a=t("./create_uniform_pragmas"),o=512;e.exports=n},{"../source/pixels_to_tile_units":352,"./create_uniform_pragmas":333}],335:[function(t,e,r){"use strict";function n(t,e,r,n){if(!t.isOpaquePass){var a=t.gl;t.setDepthSublayer(0),t.depthMask(!1),a.disable(a.STENCIL_TEST);for(var o=0;o>16,f>>16),o.uniform2f(a.u_pixel_coord_lower,65535&h,65535&f),o.activeTexture(o.TEXTURE0),i.spriteAtlas.bind(o,!0)}}var s=t("../source/pixels_to_tile_units");e.exports=n},{"../source/pixels_to_tile_units":352}],339:[function(t,e,r){"use strict";var n=t("../util/browser"),i=t("gl-matrix").mat2,a=t("../source/pixels_to_tile_units");e.exports=function(t,e,r,o){if(!t.isOpaquePass){t.setDepthSublayer(0),t.depthMask(!1);var s=t.gl;if(s.enable(s.STENCIL_TEST),!(r.paint["line-width"]<=0)){var l=1/n.devicePixelRatio,u=r.paint["line-blur"]+l,c=r.paint["line-color"],h=t.transform,f=i.create();i.scale(f,f,[1,Math.cos(h._pitch)]),i.rotate(f,f,t.transform.angle);var d,p,m,g,v,y=Math.sqrt(h.height*h.height/4*(1+h.altitude*h.altitude)),b=h.height/2*Math.tan(h._pitch),x=(y+b)/y-1,_=r.paint["line-dasharray"],w=r.paint["line-pattern"];if(_)d=t.useProgram("linesdfpattern"),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform4fv(d.u_color,c),s.uniform1f(d.u_opacity,r.paint["line-opacity"]),p=t.lineAtlas.getDash(_.from,"round"===r.layout["line-cap"]),m=t.lineAtlas.getDash(_.to,"round"===r.layout["line-cap"]),s.uniform1i(d.u_image,0),s.activeTexture(s.TEXTURE0),t.lineAtlas.bind(s),s.uniform1f(d.u_tex_y_a,p.y),s.uniform1f(d.u_tex_y_b,m.y),s.uniform1f(d.u_mix,_.t),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f);else if(w){if(g=t.spriteAtlas.getPosition(w.from,!0),v=t.spriteAtlas.getPosition(w.to,!0),!g||!v)return;d=t.useProgram("linepattern"),s.uniform1i(d.u_image,0),s.activeTexture(s.TEXTURE0),t.spriteAtlas.bind(s,!0),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform2fv(d.u_pattern_tl_a,g.tl),s.uniform2fv(d.u_pattern_br_a,g.br),s.uniform2fv(d.u_pattern_tl_b,v.tl),s.uniform2fv(d.u_pattern_br_b,v.br),s.uniform1f(d.u_fade,w.t),s.uniform1f(d.u_opacity,r.paint["line-opacity"]),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f)}else d=t.useProgram("line"),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f),s.uniform4fv(d.u_color,c),s.uniform1f(d.u_opacity,r.paint["line-opacity"]);for(var M=0;M0?1/(1-t):1+t}function s(t){return t>0?1-1/(1.001-t):-t}function l(t,e,r,n){var i=[1,0],a=r.paint["raster-fade-duration"];if(t.source&&a>0){var o=(new Date).getTime(),s=(o-t.timeAdded)/a,l=e?(o-e.timeAdded)/a:-1,c=n.coveringZoomLevel(t.source),h=!!e&&Math.abs(e.coord.z-c)>Math.abs(t.coord.z-c);!e||h?(i[0]=u.clamp(s,0,1),i[1]=1-i[0]):(i[0]=u.clamp(1-l,0,1),i[1]=1-i[0])}var f=r.paint["raster-opacity"];return i[0]*=f,i[1]*=f,i}var u=t("../util/util"),c=t("../util/struct_array");e.exports=n,n.RasterBoundsArray=new c({members:[{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]})},{"../util/struct_array":429,"../util/util":431}],341:[function(t,e,r){"use strict";function n(t,e,r,n){if(!t.isOpaquePass){var a=!(r.layout["text-allow-overlap"]||r.layout["icon-allow-overlap"]||r.layout["text-ignore-placement"]||r.layout["icon-ignore-placement"]),o=t.gl;a?o.disable(o.STENCIL_TEST):o.enable(o.STENCIL_TEST),t.setDepthSublayer(0),t.depthMask(!1),o.disable(o.DEPTH_TEST),i(t,e,r,n,!1,r.paint["icon-translate"],r.paint["icon-translate-anchor"],r.layout["icon-rotation-alignment"],r.layout["icon-rotation-alignment"],r.layout["icon-size"],r.paint["icon-halo-width"],r.paint["icon-halo-color"],r.paint["icon-halo-blur"],r.paint["icon-opacity"],r.paint["icon-color"]),i(t,e,r,n,!0,r.paint["text-translate"],r.paint["text-translate-anchor"],r.layout["text-rotation-alignment"],r.layout["text-pitch-alignment"],r.layout["text-size"],r.paint["text-halo-width"],r.paint["text-halo-color"],r.paint["text-halo-blur"],r.paint["text-opacity"],r.paint["text-color"]),o.enable(o.DEPTH_TEST),e.map.showCollisionBoxes&&s(t,e,r,n)}}function i(t,e,r,n,i,o,s,l,u,c,h,f,d,p,m){for(var g=0;gthis.previousZoom;r--)this.changeTimes[r]=e,this.changeOpacities[r]=this.opacities[r];for(r=0;r<256;r++){var n=e-this.changeTimes[r],i=n/this.fadeDuration*255;this.opacities[r]=r<=t?this.changeOpacities[r]+i:this.changeOpacities[r]-i}this.changed=!0,this.previousZoom=t},n.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.changed&&(t.texSubImage2D(t.TEXTURE_2D,0,0,0,256,1,t.ALPHA,t.UNSIGNED_BYTE,this.array),this.changed=!1)):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,256,1,0,t.ALPHA,t.UNSIGNED_BYTE,this.array))}},{}],343:[function(t,e,r){"use strict";function n(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}}var i=t("../util/util");e.exports=n,n.prototype.setSprite=function(t){this.sprite=t},n.prototype.getDash=function(t,e){var r=t.join(",")+e;return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},n.prototype.addDash=function(t,e){var r=e?7:0,n=2*r+1;if(this.nextRow+n>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o0?e.pop():null},n.prototype.lineWidth=function(t){this.gl.lineWidth(c.clamp(t,this.lineWidthRange[0],this.lineWidthRange[1]))},n.prototype.showOverdrawInspector=function(t){if(t||this._showOverdrawInspector){this._showOverdrawInspector=t;var e=this.gl;if(t){e.blendFunc(e.CONSTANT_COLOR,e.ONE);e.blendColor(1/8,1/8,1/8,0),e.clearColor(0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)}else e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)}}},{"../data/bucket":318,"../data/buffer":323,"../source/pixels_to_tile_units":352,"../source/source_cache":356,"../util/browser":415,"../util/struct_array":429,"../util/util":431,"./create_uniform_pragmas":333,"./draw_background":334,"./draw_circle":335,"./draw_debug":337,"./draw_fill":338,"./draw_line":339,"./draw_raster":340,"./draw_symbol":341,"./frame_history":342,"./painter/use_program":345,"./vertex_array_object":346,"gl-matrix":184}],345:[function(t,e,r){"use strict";function n(t,e){return t.replace(/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,function(t,r,n,i,a){return e[r][a].replace(/{type}/g,i).replace(/{precision}/g,n)})}var i=t("assert"),a=t("../../util/util"),o=t("mapbox-gl-shaders"),s=o.util;e.exports._createProgram=function(t,e,r,l){for(var u=this.gl,c=u.createProgram(),h=o[t],f="#define MAPBOX_GL_JS;\n",d=0;dthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,n={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,overscaling:r,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send("load tile",n,function(r,n){if(t.unloadVectorData(this.map.painter),!t.aborted)return r?e(r):(t.loadVectorData(n,this.map.style),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(this)),e(null))}.bind(this),this.workerID)},abortTile:function(t){t.aborted=!0},unloadTile:function(t){t.unloadVectorData(this.map.painter),this.dispatcher.send("remove tile",{uid:t.uid,source:this.id},function(){},t.workerID)},serialize:function(){return{type:this.type,data:this._data}}})},{"../data/bucket":318,"../util/evented":423,"../util/util":431,"resolve-url":489}],348:[function(t,e,r){"use strict";function n(t,e,r){r&&(this.loadGeoJSON=r),h.call(this,t,e)}var i=t("../util/util"),a=t("../util/ajax"),o=t("geojson-rewind"),s=t("./geojson_wrapper"),l=t("vt-pbf"),u=t("supercluster"),c=t("geojson-vt"),h=t("./vector_tile_worker_source");e.exports=n,n.prototype=i.inherit(h,{_geoJSONIndexes:{},loadVectorData:function(t,e){var r=t.source,n=t.coord;if(!this._geoJSONIndexes[r])return e(null,null);var i=this._geoJSONIndexes[r].getTile(Math.min(n.z,t.maxZoom),n.x,n.y);if(!i)return e(null,null);var a=new s(i.features);a.name="_geojsonTileLayer";var o=l({layers:{_geojsonTileLayer:a}});0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{tile:a,rawTileData:o.buffer})},loadData:function(t,e){var r=function(r,n){return r?e(r):"object"!=typeof n?e(new Error("Input data is not a valid GeoJSON object.")):(o(n,!0),void this._indexData(n,t,function(r,n){if(r)return e(r);this._geoJSONIndexes[t.source]=n,e(null)}.bind(this)))}.bind(this);this.loadGeoJSON(t,r)},loadGeoJSON:function(t,e){if(t.url)a.getJSON(t.url,e);else{if("string"!=typeof t.data)return e(new Error("Input data is not a valid GeoJSON object."));try{return e(null,JSON.parse(t.data))}catch(t){return e(new Error("Input data is not a valid GeoJSON object."))}}},_indexData:function(t,e,r){try{e.cluster?r(null,u(e.superclusterOptions).load(t.features)):r(null,c(t,e.geojsonVtOptions))}catch(t){return r(t)}}})},{"../util/ajax":414,"../util/util":431,"./geojson_wrapper":349,"./vector_tile_worker_source":360,"geojson-rewind":130,"geojson-vt":134,supercluster:516,"vt-pbf":543}],349:[function(t,e,r){"use strict";function n(t){this.features=t,this.length=t.length,this.extent=s}function i(t){if(this.type=t.type,1===t.type){this.rawGeometry=[];for(var e=0;ee)){var o=Math.pow(2,Math.min(a.coord.z,this.maxzoom)-Math.min(t.z,this.maxzoom));if(Math.floor(a.coord.x/o)===t.x&&Math.floor(a.coord.y/o)===t.y)for(r[i]=!0,n=!0;a&&a.coord.z-1>t.z;){var s=a.coord.parent(this.maxzoom).id;a=this._tiles[s],a&&a.isRenderable()&&(delete r[i],r[s]=!0)}}}return n},findLoadedParent:function(t,e,r){for(var n=t.z-1;n>=e;n--){t=t.parent(this.maxzoom);var i=this._tiles[t.id];if(i&&i.isRenderable())return r[t.id]=!0,i;if(this._cache.has(t.id))return this.addTile(t),r[t.id]=!0,this._tiles[t.id]}},updateCacheSize:function(t){var e=Math.ceil(t.width/t.tileSize)+1,r=Math.ceil(t.height/t.tileSize)+1,n=e*r;this._cache.setMaxSize(Math.floor(5*n))},update:function(t,e){if(this._sourceLoaded){var r,i,a;this.updateCacheSize(t);var o=(this.roundZoom?Math.round:Math.floor)(this.getZoom(t)),s=Math.max(o-n.maxOverzooming,this.minzoom),l=Math.max(o+n.maxUnderzooming,this.minzoom),c={},h=(new Date).getTime();this._coveredTiles={};var d=this.used?t.coveringTiles(this._source):[];for(r=0;rh-(e||0)&&(this.findLoadedChildren(i,l,c)&&(c[v]=!0),this.findLoadedParent(i,s,p))}var y;for(y in p)c[y]||(this._coveredTiles[y]=!0);for(y in p)c[y]=!0;var b=f.keysDifference(this._tiles,c);for(r=0;rthis.maxzoom?Math.pow(2,n-this.maxzoom):1;e=new s(r,this.tileSize*i,this.maxzoom),this.loadTile(e,this._tileLoaded.bind(this,e))}return e.uses++,this._tiles[t.id]=e,this.fire("tile.add",{tile:e}),this._source.fire("tile.add",{tile:e}),e},removeTile:function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this.fire("tile.remove",{tile:e}),this._source.fire("tile.remove",{tile:e}),e.uses>0||(e.isRenderable()?this._cache.add(e.coord.wrapped().id,e):(e.aborted=!0,this.abortTile(e),this.unloadTile(e))))},clearTiles:function(){for(var t in this._tiles)this.removeTile(t);this._cache.reset()},tilesIn:function(t){for(var e={},r=this.getIds(),n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0].zoom,c=0;c=0&&v[1].y>=0){for(var y=[],b=0;b=0&&t%1==0),l(!isNaN(e)&&e>=0&&e%1==0),l(!isNaN(r)&&r>=0&&r%1==0),isNaN(n)&&(n=0),this.z=+t,this.x=+e,this.y=+r,this.w=+n,(n*=2)<0&&(n=-1*n-1);var i=1<0;a--)n=1<e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function o(t,e,r,n,i){var a=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx0,h=e.dx<0,f=a;fc.dy&&(l=u,u=c,c=l),u.dy>h.dy&&(l=u,u=h,h=l),c.dy>h.dy&&(l=c,c=h,h=l),u.dy&&o(h,u,n,i,s),c.dy&&o(h,c,n,i,s)}var l=t("assert"),u=t("whoots-js"),c=t("../geo/coordinate");e.exports=n,n.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y},n.prototype.toCoordinate=function(t){var e=Math.min(this.z,t),r=Math.pow(2,e),n=this.y,i=this.x+r*this.w -;return new c(i,n,e)},n.fromID=function(t){var e=t%32,r=1<t?new n(this.z-1,this.x,this.y,this.w):new n(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},n.prototype.wrapped=function(){return new n(this.z,this.x,this.y,0)},n.prototype.children=function(t){if(this.z>=t)return[new n(this.z+1,this.x,this.y,this.w)];var e=this.z+1,r=2*this.x,i=2*this.y;return[new n(e,r,i,this.w),new n(e,r+1,i,this.w),new n(e,r,i+1,this.w),new n(e,r+1,i+1,this.w)]},n.cover=function(t,e,r){function i(t,e,i){var s,l,u;if(i>=0&&i<=a)for(s=t;sthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,i={url:s(t.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),uid:t.uid,coord:t.coord,zoom:t.coord.z,tileSize:this.tileSize*n,source:this.id,overscaling:n,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID?"loading"===t.state?t.reloadCallback=e:(i.rawTileData=t.rawTileData,this.dispatcher.send("reload tile",i,r.bind(this),t.workerID)):t.workerID=this.dispatcher.send("load tile",i,r.bind(this))},abortTile:function(t){this.dispatcher.send("abort tile",{uid:t.uid,source:this.id},null,t.workerID)},unloadTile:function(t){t.unloadVectorData(this.map.painter),this.dispatcher.send("remove tile",{uid:t.uid,source:this.id},null,t.workerID)}})},{"../util/evented":423,"../util/mapbox":428,"../util/util":431,"./load_tilejson":351}],360:[function(t,e,r){"use strict";function n(t,e,r){this.actor=t,this.styleLayers=e,r&&(this.loadVectorData=r),this.loading={},this.loaded={}}var i=t("../util/ajax"),a=t("vector-tile"),o=t("pbf"),s=t("./worker_tile");e.exports=n,n.prototype={loadTile:function(t,e){function r(t,r){return delete this.loading[n][i],t?e(t):r?(a.data=r.tile,a.parse(a.data,this.styleLayers.getLayerFamilies(),this.actor,r.rawTileData,e),this.loaded[n]=this.loaded[n]||{},void(this.loaded[n][i]=a)):e(null,null)}var n=t.source,i=t.uid;this.loading[n]||(this.loading[n]={});var a=this.loading[n][i]=new s(t);a.abort=this.loadVectorData(t,r.bind(this))},reloadTile:function(t,e){var r=this.loaded[t.source],n=t.uid;if(r&&r[n]){var i=r[n];i.parse(i.data,this.styleLayers.getLayerFamilies(),this.actor,t.rawTileData,e)}},abortTile:function(t){var e=this.loading[t.source],r=t.uid;e&&e[r]&&e[r].abort&&(e[r].abort(),delete e[r])},removeTile:function(t){var e=this.loaded[t.source],r=t.uid;e&&e[r]&&delete e[r]},loadVectorData:function(t,e){function r(t,r){if(t)return e(t);var n=new a.VectorTile(new o(new Uint8Array(r)));e(t,{tile:n,rawTileData:r})}var n=i.getArrayBuffer(t.url,r.bind(this));return function(){n.abort()}},redoPlacement:function(t,e){var r=this.loaded[t.source],n=this.loading[t.source],i=t.uid;if(r&&r[i]){var a=r[i],o=a.redoPlacement(t.angle,t.pitch,t.showCollisionBoxes);o.result&&e(null,o.result,o.transferables)}else n&&n[i]&&(n[i].angle=t.angle)}}},{"../util/ajax":414,"./worker_tile":363,pbf:466,"vector-tile":537}],361:[function(t,e,r){"use strict";function n(t,e){this.id=t,this.urls=e.urls,this.coordinates=e.coordinates,u.getVideo(e.urls,function(t,r){if(t)return this.fire("error",{error:t});this.video=r,this.video.loop=!0;var n;this.video.addEventListener("playing",function(){n=this.map.style.animationLoop.set(1/0),this.map._rerender()}.bind(this)),this.video.addEventListener("pause",function(){this.map.style.animationLoop.cancel(n)}.bind(this)),this.map&&(this.video.play(),this.setCoordinates(e.coordinates)),this.fire("load")}.bind(this))}var i=t("../util/util"),a=t("./tile_coord"),o=t("../geo/lng_lat"),s=t("point-geometry"),l=t("../util/evented"),u=t("../util/ajax"),c=t("../data/bucket").EXTENT,h=t("../render/draw_raster").RasterBoundsArray,f=t("../data/buffer"),d=t("../render/vertex_array_object");e.exports=n,n.prototype=i.inherit(l,{minzoom:0,maxzoom:22,tileSize:512,roundZoom:!0,getVideo:function(){return this.video},onAdd:function(t){this.map||(this.map=t,this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},setCoordinates:function(t){this.coordinates=t;var e=this.map,r=t.map(function(t){return e.transform.locationCoordinate(o.convert(t)).zoomTo(0)}),n=this.centerCoord=i.getCoordinatesCenter(r);return n.column=Math.round(n.column),n.row=Math.round(n.row),this.minzoom=this.maxzoom=n.zoom,this._coord=new a(n.zoom,n.column,n.row),this._tileCoords=r.map(function(t){var e=t.zoomTo(n.zoom);return new s(Math.round((e.column-n.column)*c),Math.round((e.row-n.row)*c))}),this.fire("change"),this},_setTile:function(t){this._prepared=!1,this.tile=t;var e=new h;e.emplaceBack(this._tileCoords[0].x,this._tileCoords[0].y,0,0),e.emplaceBack(this._tileCoords[1].x,this._tileCoords[1].y,32767,0),e.emplaceBack(this._tileCoords[3].x,this._tileCoords[3].y,0,32767),e.emplaceBack(this._tileCoords[2].x,this._tileCoords[2].y,32767,32767),this.tile.buckets={},this.tile.boundsBuffer=new f(e.serialize(),h.serialize(),f.BufferType.VERTEX),this.tile.boundsVAO=new d,this.tile.state="loaded"},prepare:function(){if(!(this.video.readyState<2)&&this.tile){var t=this.map.painter.gl;this._prepared?(t.bindTexture(t.TEXTURE_2D,this.tile.texture),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,this.video)):(this._prepared=!0,this.tile.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.tile.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.video)),this._currentTime=this.video.currentTime}},loadTile:function(t,e){this._coord&&this._coord.toString()===t.coord.toString()?(this._setTile(t),e(null)):(t.state="errored",e(null))},serialize:function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}})},{"../data/bucket":318,"../data/buffer":323,"../geo/lng_lat":328,"../render/draw_raster":340,"../render/vertex_array_object":346,"../util/ajax":414,"../util/evented":423,"../util/util":431,"./tile_coord":358,"point-geometry":472}],362:[function(t,e,r){"use strict";function n(t){this.self=t,this.actor=new a(t,this);var e={getLayers:function(){return this.layers}.bind(this),getLayerFamilies:function(){return this.layerFamilies}.bind(this)};this.workerSources={vector:new l(this.actor,e),geojson:new u(this.actor,e)},this.self.registerWorkerSource=function(t,r){if(this.workerSources[t])throw new Error('Worker source with name "'+t+'" already registered.');this.workerSources[t]=new r(this.actor,e)}.bind(this)}function i(t){var e={};for(var r in t){var n=t[r],i=n.ref||n.id,a=t[i];a.layout&&"none"===a.layout.visibility||(e[i]=e[i]||[],r===i?e[i].unshift(n):e[i].push(n))}return e}var a=t("../util/actor"),o=t("../style/style_layer"),s=t("../util/util"),l=t("./vector_tile_worker_source"),u=t("./geojson_worker_source");e.exports=function(t){return new n(t)},s.extend(n.prototype,{"set layers":function(t){function e(t){var e=o.create(t,t.ref&&r.layers[t.ref]);e.updatePaintTransitions({},{transition:!1}),r.layers[e.id]=e}this.layers={};for(var r=this,n=[],a=0;a=0;e--)b(E,P[e]);x()}}function b(t,e){if(e.populateArrays(A,F,j),"symbol"!==e.type)for(var r=0;r=w.maxzoom||w.layout&&"none"===w.layout.visibility||t.layers&&!t.layers[w.sourceLayer]||(k=c.create({layer:w,index:z++,childLayers:e[D],zoom:this.zoom,overscaling:this.overscaling,showCollisionBoxes:this.showCollisionBoxes,collisionBoxArray:this.collisionBoxArray,symbolQuadsArray:this.symbolQuadsArray,symbolInstancesArray:this.symbolInstancesArray,sourceLayerIndex:S.encode(w.sourceLayer||"_geojsonTileLayer")}),k.createFilter(),L[w.id]=k,t.layers&&(M=w.sourceLayer,C[M]=C[M]||{},C[M][w.id]=k)));if(t.layers)for(M in C)1===w.version&&d.warnOnce('Vector tile source "'+this.source+'" layer "'+M+'" does not use vector tile spec v2 and therefore may have some rendering errors.'),(w=t.layers[M])&&v(w,C[M]);else v(t,L);var I=[],P=this.symbolBuckets=[],O=[];T.bucketLayerIDs={};for(var R in L)k=L[R],0!==k.features.length&&(T.bucketLayerIDs[k.index]=k.childLayers.map(s),I.push(k),"symbol"===k.type?P.push(k):O.push(k));var j={},F={},N=0;if(P.length>0){for(_=P.length-1;_>=0;_--)P[_].updateIcons(j),P[_].updateFont(F);for(var B in F)F[B]=Object.keys(F[B]).map(Number);j=Object.keys(j),r.send("get glyphs",{uid:this.uid,stacks:F},function(t,e){F=e,y(t)}),j.length?r.send("get icons",{icons:j},function(t,e){j=e,y(t)}):y()}for(_=O.length-1;_>=0;_--)b(this,O[_]);if(0===P.length)return x()},n.prototype.redoPlacement=function(t,e,r){if("done"!==this.status)return this.redoPlacementAfterDone=!0,this.angle=t,{};for(var n=new u(t,e,this.collisionBoxArray),s=this.symbolBuckets,l=s.length-1;l>=0;l--)s[l].placeFeatures(n,r);var c=n.serialize(),h=s.filter(i);return{result:{buckets:h.map(a),collisionTile:c.data},transferables:o(h).concat(c.transferables)}}},{"../data/bucket":318,"../data/feature_index":325,"../symbol/collision_box":383,"../symbol/collision_tile":385,"../symbol/symbol_instances":394,"../symbol/symbol_quads":395,"../util/dictionary_coder":421,"../util/util":431}],364:[function(t,e,r){"use strict";function n(){this.n=0,this.times=[]}e.exports=n,n.prototype.stopped=function(){return this.times=this.times.filter(function(t){return t.time>=(new Date).getTime()}),!this.times.length},n.prototype.set=function(t){return this.times.push({id:this.n,time:t+(new Date).getTime()}),this.n++},n.prototype.cancel=function(t){this.times=this.times.filter(function(e){return e.id!==t})}},{}],365:[function(t,e,r){"use strict";function n(t){this.base=t,this.retina=s.devicePixelRatio>1;var e=this.retina?"@2x":"";o.getJSON(l(t,e,".json"),function(t,e){if(t)return void this.fire("error",{error:t});this.data=e,this.img&&this.fire("load")}.bind(this)),o.getImage(l(t,e,".png"),function(t,e){if(t)return void this.fire("error",{error:t});for(var r=e.getData(),n=e.data=new Uint8Array(r.length),i=0;i1!==this.retina){var t=new n(this.base);t.on("load",function(){this.img=t.img,this.data=t.data,this.retina=t.retina}.bind(this))}},i.prototype={x:0,y:0,width:0,height:0,pixelRatio:1,sdf:!1},n.prototype.getSpritePosition=function(t){if(!this.loaded())return new i;var e=this.data&&this.data[t];return e&&this.img?e:new i}},{"../util/ajax":414,"../util/browser":415,"../util/evented":423,"../util/mapbox":428}],366:[function(t,e,r){"use strict";var n=t("csscolorparser").parseCSSColor,i=t("../util/util"),a=t("./style_function"),o={};e.exports=function t(e){if(a.isFunctionDefinition(e))return i.extend({},e,{stops:e.stops.map(function(e){return[e[0],t(e[1])]})});if("string"==typeof e){if(!o[e]){var r=n(e);if(!r)throw new Error("Invalid color "+e);o[e]=[r[0]/255*r[3],r[1]/255*r[3],r[2]/255*r[3],r[3]]}return o[e]}throw new Error("Invalid color "+e)}},{"../util/util":431,"./style_function":369,csscolorparser:100}],367:[function(t,e,r){"use strict";function n(t,e,r){this.animationLoop=e||new m,this.dispatcher=new p(r||1,this),this.spriteAtlas=new l(1024,1024),this.lineAtlas=new u(256,512),this._layers={},this._order=[],this._groups=[],this.sources={},this.zoomHistory={},c.bindAll(["_forwardSourceEvent","_forwardTileEvent","_forwardLayerEvent","_redoPlacement"],this),this._resetUpdates();var n=function(t,e){if(t)return void this.fire("error",{error:t});if(!g.emitErrors(this,g(e))){this._loaded=!0,this.stylesheet=e,this.updateClasses();var r=e.sources;for(var n in r)this.addSource(n,r[n]);e.sprite&&(this.sprite=new o(e.sprite),this.sprite.on("load",this.fire.bind(this,"change"))),this.glyphSource=new s(e.glyphs),this._resolve(),this.fire("load")}}.bind(this);"string"==typeof t?h.getJSON(f(t),n):d.frame(n.bind(this,null,t)),this.on("source.load",function(t){var e=t.source;if(e&&e.vectorLayerIds)for(var r in this._layers){var n=this._layers[r];n.source===e.id&&this._validateLayer(n)}})}var i=t("../util/evented"),a=t("./style_layer"),o=t("./image_sprite"),s=t("../symbol/glyph_source"),l=t("../symbol/sprite_atlas"),u=t("../render/line_atlas"),c=t("../util/util"),h=t("../util/ajax"),f=t("../util/mapbox").normalizeStyleURL,d=t("../util/browser"),p=t("../util/dispatcher"),m=t("./animation_loop"),g=t("./validate_style"),v=t("../source/source"),y=t("../source/query_features"),b=t("../source/source_cache"),x=t("./style_spec"),_=t("./style_function");e.exports=n,n.prototype=c.inherit(i,{_loaded:!1,_validateLayer:function(t){var e=this.sources[t.source];t.sourceLayer&&e&&e.vectorLayerIds&&-1===e.vectorLayerIds.indexOf(t.sourceLayer)&&this.fire("error",{error:new Error('Source layer "'+t.sourceLayer+'" does not exist on source "'+e.id+'" as specified by style layer "'+t.id+'"')})},loaded:function(){if(!this._loaded)return!1;if(Object.keys(this._updates.sources).length)return!1;for(var t in this.sources)if(!this.sources[t].loaded())return!1;return!(this.sprite&&!this.sprite.loaded())},_resolve:function(){var t,e;this._layers={},this._order=this.stylesheet.layers.map(function(t){return t.id});for(var r=0;rMath.floor(t)&&(e.lastIntegerZoom=Math.floor(t+1),e.lastIntegerZoomTime=Date.now()),e.lastZoom=t},_checkLoaded:function(){if(!this._loaded)throw new Error("Style is not done loading")},update:function(t,e){if(!this._updates.changed)return this;if(this._updates.allLayers)this._groupLayers(),this._updateWorkerLayers();else{var r=Object.keys(this._updates.layers);r.length&&this._updateWorkerLayers(r)}var n,i=Object.keys(this._updates.sources);for(n=0;n=0&&this._handleErrors(g.source,"sources."+t,e)?this:(e=new b(t,e,this.dispatcher),this.sources[t]=e,e.style=this,e.on("load",this._forwardSourceEvent).on("error",this._forwardSourceEvent).on("change",this._forwardSourceEvent).on("tile.add",this._forwardTileEvent).on("tile.load",this._forwardTileEvent).on("tile.error",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this._updates.events.push(["source.add",{source:e}]),this._updates.changed=!0,this)},removeSource:function(t){if(this._checkLoaded(),void 0===this.sources[t])throw new Error("There is no source with this ID");var e=this.sources[t];return delete this.sources[t],delete this._updates.sources[t],e.off("load",this._forwardSourceEvent).off("error",this._forwardSourceEvent).off("change",this._forwardSourceEvent).off("tile.add",this._forwardTileEvent).off("tile.load",this._forwardTileEvent).off("tile.error",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent),this._updates.events.push(["source.remove",{source:e}]),this._updates.changed=!0,this},getSource:function(t){return this.sources[t]&&this.sources[t].getSource()},addLayer:function(t,e){if(this._checkLoaded(),!(t instanceof a)){if(this._handleErrors(g.layer,"layers."+t.id,t,!1,{arrayIndex:-1}))return this;var r=t.ref&&this.getLayer(t.ref);t=a.create(t,r)}return this._validateLayer(t),t.on("error",this._forwardLayerEvent),this._layers[t.id]=t,this._order.splice(e?this._order.indexOf(e):1/0,0,t.id),this._updates.allLayers=!0,t.source&&(this._updates.sources[t.source]=!0),this._updates.events.push(["layer.add",{layer:t}]),this.updateClasses(t.id)},removeLayer:function(t){this._checkLoaded();var e=this._layers[t];if(void 0===e)throw new Error("There is no layer with this ID");for(var r in this._layers)this._layers[r].ref===t&&this.removeLayer(r);return e.off("error",this._forwardLayerEvent),delete this._layers[t],delete this._updates.layers[t],delete this._updates.paintProps[t],this._order.splice(this._order.indexOf(t),1),this._updates.allLayers=!0,this._updates.events.push(["layer.remove",{layer:e}]),this._updates.changed=!0,this},getLayer:function(t){return this._layers[t]},getReferentLayer:function(t){var e=this.getLayer(t);return e.ref&&(e=this.getLayer(e.ref)),e},setLayerZoomRange:function(t,e,r){this._checkLoaded();var n=this.getReferentLayer(t);return n.minzoom===e&&n.maxzoom===r?this:(null!=e&&(n.minzoom=e),null!=r&&(n.maxzoom=r),this._updateLayer(n))},setFilter:function(t,e){this._checkLoaded();var r=this.getReferentLayer(t);return null!==e&&this._handleErrors(g.filter,"layers."+r.id+".filter",e)?this:c.deepEqual(r.filter,e)?this:(r.filter=c.clone(e),this._updateLayer(r))},getFilter:function(t){return this.getReferentLayer(t).filter},setLayoutProperty:function(t,e,r){this._checkLoaded();var n=this.getReferentLayer(t);return c.deepEqual(n.getLayoutProperty(e),r)?this:(n.setLayoutProperty(e,r),this._updateLayer(n))},getLayoutProperty:function(t,e){return this.getReferentLayer(t).getLayoutProperty(e)},setPaintProperty:function(t,e,r,n){this._checkLoaded();var i=this.getLayer(t);if(c.deepEqual(i.getPaintProperty(e,n),r))return this;var a=i.isPaintValueFeatureConstant(e);return i.setPaintProperty(e,r,n),!(r&&_.isFunctionDefinition(r)&&"$zoom"!==r.property&&void 0!==r.property)&&a||(this._updates.layers[t]=!0,i.source&&(this._updates.sources[i.source]=!0)),this.updateClasses(t,e)},getPaintProperty:function(t,e,r){return this.getLayer(t).getPaintProperty(e,r)},updateClasses:function(t,e){if(this._updates.changed=!0,t){var r=this._updates.paintProps;r[t]||(r[t]={}),r[t][e||"all"]=!0}else this._updates.allPaintProps=!0;return this},serialize:function(){return c.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:c.mapObject(this.sources,function(t){return t.serialize()}),layers:this._order.map(function(t){return this._layers[t].serialize()},this)},function(t){return void 0!==t})},_updateLayer:function(t){return this._updates.layers[t.id]=!0,t.source&&(this._updates.sources[t.source]=!0),this._updates.changed=!0,this},_flattenRenderedFeatures:function(t){for(var e=[],r=this._order.length-1;r>=0;r--)for(var n=this._order[r],i=0;is.lastIntegerZoom?(n=u+(1-u)*c,h*=2,i=t({zoom:o-1},r),a=t({zoom:o},r)):(n=1-(1-c)*u,a=t({zoom:o},r),i=t({zoom:o+1},r),h/=2),void 0===i||void 0===a?void 0:{from:i,fromScale:h,to:a,toScale:1,t:n}}}var a=t("./style_function"),o=t("./parse_color"),s=t("../util/util");e.exports=n},{"../util/util":431,"./parse_color":366,"./style_function":369}],369:[function(t,e,r){"use strict";var n=t("mapbox-gl-function");r.interpolated=function(t){var e=n.interpolated(t),r=function(t,r){return e(t&&t.zoom,r||{})};return r.isFeatureConstant=e.isFeatureConstant,r.isZoomConstant=e.isZoomConstant,r},r["piecewise-constant"]=function(t){var e=n["piecewise-constant"](t),r=function(t,r){return e(t&&t.zoom,r||{})};return r.isFeatureConstant=e.isFeatureConstant,r.isZoomConstant=e.isZoomConstant,r},r.isFunctionDefinition=n.isFunctionDefinition},{"mapbox-gl-function":291}],370:[function(t,e,r){"use strict";function n(t,e){this.set(t,e)}function i(t){return t.value}var a=t("../util/util"),o=t("./style_transition"),s=t("./style_declaration"),l=t("./style_spec"),u=t("./validate_style"),c=t("./parse_color"),h=t("../util/evented");e.exports=n;n.create=function(e,r){return new({background:t("./style_layer/background_style_layer"),circle:t("./style_layer/circle_style_layer"),fill:t("./style_layer/fill_style_layer"),line:t("./style_layer/line_style_layer"),raster:t("./style_layer/raster_style_layer"),symbol:t("./style_layer/symbol_style_layer")}[(r||e).type])(e,r)},n.prototype=a.inherit(h,{set:function(t,e){this.id=t.id,this.ref=t.ref,this.metadata=t.metadata,this.type=(e||t).type,this.source=(e||t).source,this.sourceLayer=(e||t)["source-layer"],this.minzoom=(e||t).minzoom,this.maxzoom=(e||t).maxzoom,this.filter=(e||t).filter,this.paint={},this.layout={},this._paintSpecifications=l["paint_"+this.type],this._layoutSpecifications=l["layout_"+this.type],this._paintTransitions={},this._paintTransitionOptions={},this._paintDeclarations={},this._layoutDeclarations={},this._layoutFunctions={};var r,n;for(var i in t){var a=i.match(/^paint(?:\.(.*))?$/);if(a){var o=a[1]||"";for(r in t[i])this.setPaintProperty(r,t[i][r],o)}}if(this.ref)this._layoutDeclarations=e._layoutDeclarations;else for(n in t.layout)this.setLayoutProperty(n,t.layout[n]);for(r in this._paintSpecifications)this.paint[r]=this.getPaintValue(r);for(n in this._layoutSpecifications)this._updateLayoutValue(n)},setLayoutProperty:function(t,e){if(null==e)delete this._layoutDeclarations[t];else{var r="layers."+this.id+".layout."+t;if(this._handleErrors(u.layoutProperty,r,t,e))return;this._layoutDeclarations[t]=new s(this._layoutSpecifications[t],e)}this._updateLayoutValue(t)},getLayoutProperty:function(t){return this._layoutDeclarations[t]&&this._layoutDeclarations[t].value}, -getLayoutValue:function(t,e,r){var n=this._layoutSpecifications[t],i=this._layoutDeclarations[t];return i?i.calculate(e,r):n.default},setPaintProperty:function(t,e,r){var n="layers."+this.id+(r?'["paint.'+r+'"].':".paint.")+t;if(a.endsWith(t,"-transition"))if(this._paintTransitionOptions[r||""]||(this._paintTransitionOptions[r||""]={}),null===e||void 0===e)delete this._paintTransitionOptions[r||""][t];else{if(this._handleErrors(u.paintProperty,n,t,e))return;this._paintTransitionOptions[r||""][t]=e}else if(this._paintDeclarations[r||""]||(this._paintDeclarations[r||""]={}),null===e||void 0===e)delete this._paintDeclarations[r||""][t];else{if(this._handleErrors(u.paintProperty,n,t,e))return;this._paintDeclarations[r||""][t]=new s(this._paintSpecifications[t],e)}},getPaintProperty:function(t,e){return e=e||"",a.endsWith(t,"-transition")?this._paintTransitionOptions[e]&&this._paintTransitionOptions[e][t]:this._paintDeclarations[e]&&this._paintDeclarations[e][t]&&this._paintDeclarations[e][t].value},getPaintValue:function(t,e,r){var n=this._paintSpecifications[t],i=this._paintTransitions[t];return i?i.calculate(e,r):"color"===n.type&&n.default?c(n.default):n.default},getPaintValueStopZoomLevels:function(t){var e=this._paintTransitions[t];return e?e.declaration.stopZoomLevels:[]},getPaintInterpolationT:function(t,e){return this._paintTransitions[t].declaration.calculateInterpolationT({zoom:e})},isPaintValueFeatureConstant:function(t){var e=this._paintTransitions[t];return!e||e.declaration.isFeatureConstant},isLayoutValueFeatureConstant:function(t){var e=this._layoutDeclarations[t];return!e||e.isFeatureConstant},isPaintValueZoomConstant:function(t){var e=this._paintTransitions[t];return!e||e.declaration.isZoomConstant},isHidden:function(t){return!!(this.minzoom&&t=this.maxzoom)||("none"===this.layout.visibility||0===this.paint[this.type+"-opacity"]))},updatePaintTransitions:function(t,e,r,n){for(var i=a.extend({},this._paintDeclarations[""]),o=0;o-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],u=0;sn;)u-=l.shift().angleDelta;if(u>i)return!1;o++,s+=h.dist(f)}return!0}e.exports=n},{}],382:[function(t,e,r){"use strict";function n(t,e,r,n,a){for(var o=[],s=0;s=n&&f.x>=n||(h.x>=n?h=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round():f.x>=n&&(f=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round()),h.y>=a&&f.y>=a||(h.y>=a?h=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round():f.y>=a&&(f=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round()),l&&h.equals(l[l.length-1])||(l=[h],o.push(l)),l.push(f)))))}return o}var i=t("point-geometry");e.exports=n},{"point-geometry":472}],383:[function(t,e,r){"use strict";var n=t("../util/struct_array"),i=t("../util/util"),a=t("point-geometry"),o=e.exports=new n({members:[{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Float32",name:"maxScale"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"bbox0"},{type:"Int16",name:"bbox1"},{type:"Int16",name:"bbox2"},{type:"Int16",name:"bbox3"},{type:"Float32",name:"placementScale"}]});i.extendAll(o.prototype.StructType.prototype,{get anchorPoint(){return new a(this.anchorPointX,this.anchorPointY)}})},{"../util/struct_array":429,"../util/util":431,"point-geometry":472}],384:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l,u,c){var h=o.top*s-l,f=o.bottom*s+l,d=o.left*s-l,p=o.right*s+l;if(this.boxStartIndex=t.length,u){var m=f-h,g=p-d;if(m>0)if(m=Math.max(10*s,m),c){var v=e[r.segment+1].sub(e[r.segment])._unit()._mult(g),y=[r.sub(v),r.add(v)];this._addLineCollisionBoxes(t,y,r,0,g,m,n,i,a)}else this._addLineCollisionBoxes(t,e,r,r.segment,g,m,n,i,a)}else t.emplaceBack(r.x,r.y,d,h,p,f,1/0,n,i,a,0,0,0,0,0);this.boxEndIndex=t.length}e.exports=n,n.prototype._addLineCollisionBoxes=function(t,e,r,n,i,a,o,s,l){var u=a/2,c=Math.floor(i/u),h=-a/2,f=this.boxes,d=r,p=n+1,m=h;do{if(--p<0)return f;m-=e[p].dist(d),d=e[p]}while(m>-i/2);for(var g=e[p].dist(e[p+1]),v=0;v=e.length)return f;g=e[p].dist(e[p+1])}var b=y-m,x=e[p],_=e[p+1],w=_.sub(x)._unit()._mult(b)._add(x)._round(),M=Math.max(Math.abs(y-h)-u/2,0),k=i/2/M;t.emplaceBack(w.x,w.y,-a/2,-a/2,a/2,a/2,k,o,s,l,0,0,0,0,0)}return f}},{}],385:[function(t,e,r){"use strict";function n(t,e,r){if("object"==typeof t){var n=t;r=e,t=n.angle,e=n.pitch,this.grid=new o(n.grid),this.ignoredGrid=new o(n.ignoredGrid)}else this.grid=new o(a,12,6),this.ignoredGrid=new o(a,12,0);this.angle=t,this.pitch=e;var i=Math.sin(t),s=Math.cos(t);if(this.rotationMatrix=[s,-i,i,s],this.reverseRotationMatrix=[s,i,-i,s],this.yStretch=1/Math.cos(e/180*Math.PI),this.yStretch=Math.pow(this.yStretch,1.3),this.collisionBoxArray=r,0===r.length){r.emplaceBack();r.emplaceBack(0,0,0,-32767,0,32767,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(a,0,0,-32767,0,32767,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(0,0,-32767,0,32767,0,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(0,a,-32767,0,32767,0,32767,0,0,0,0,0,0,0,0,0)}this.tempCollisionBox=r.get(0),this.edges=[r.get(1),r.get(2),r.get(3),r.get(4)]}var i=t("point-geometry"),a=t("../data/bucket").EXTENT,o=t("grid-index");e.exports=n,n.prototype.serialize=function(){var t={angle:this.angle,pitch:this.pitch,grid:this.grid.toArrayBuffer(),ignoredGrid:this.ignoredGrid.toArrayBuffer()};return{data:t,transferables:[t.grid,t.ignoredGrid]}},n.prototype.minScale=.25,n.prototype.maxScale=2,n.prototype.placeCollisionFeature=function(t,e,r){for(var n=this.collisionBoxArray,a=this.minScale,o=this.rotationMatrix,s=this.yStretch,l=t.boxStartIndex;l=this.maxScale)return a}if(r){var _;if(this.angle){var w=this.reverseRotationMatrix,M=new i(u.x1,u.y1).matMult(w),k=new i(u.x2,u.y1).matMult(w),A=new i(u.x1,u.y2).matMult(w),T=new i(u.x2,u.y2).matMult(w);_=this.tempCollisionBox,_.anchorPointX=u.anchorPoint.x,_.anchorPointY=u.anchorPoint.y,_.x1=Math.min(M.x,k.x,A.x,T.x),_.y1=Math.min(M.y,k.x,A.x,T.x),_.x2=Math.max(M.x,k.x,A.x,T.x),_.y2=Math.max(M.y,k.x,A.x,T.x),_.maxScale=u.maxScale}else _=u;for(var S=0;S=this.maxScale)return a}}}return a},n.prototype.queryRenderedSymbols=function(t,e,r,n,a){var o={},s=[],l=this.collisionBoxArray,u=this.rotationMatrix,c=new i(t,e)._matMult(u),h=this.tempCollisionBox;h.anchorX=c.x,h.anchorY=c.y,h.x1=0,h.y1=0,h.x2=r-t,h.y2=n-e,h.maxScale=a,a=h.maxScale;for(var f=[c.x+h.x1/a,c.y+h.y1/a*this.yStretch,c.x+h.x2/a,c.y+h.y2/a*this.yStretch],d=this.grid.query(f[0],f[1],f[2],f[3]),p=this.ignoredGrid.query(f[0],f[1],f[2],f[3]),m=0;m=a&&(o[y][b]=!0,s.push(d[g]))}}return s},n.prototype.getPlacementScale=function(t,e,r,n,i){var a=e.x-n.x,o=e.y-n.y,s=(i.x1-r.x2)/a,l=(i.x2-r.x1)/a,u=(i.y1-r.y2)*this.yStretch/o,c=(i.y2-r.y1)*this.yStretch/o;(isNaN(s)||isNaN(l))&&(s=l=1),(isNaN(u)||isNaN(c))&&(u=c=1);var h=Math.min(Math.max(s,l),Math.max(u,c)),f=i.maxScale,d=r.maxScale;return h>f&&(h=f),h>d&&(h=d),h>t&&h>=i.placementScale&&(t=h),t},n.prototype.insertCollisionFeature=function(t,e,r){for(var n=r?this.ignoredGrid:this.grid,i=this.collisionBoxArray,a=t.boxStartIndex;a=0&&A=0&&T=0&&v+d<=p){var S=new o(A,T,M,b)._round();n&&!s(t,S,u,n,l)||y.push(S)}}g+=w}return h||y.length||c||(y=i(t,g/2,r,n,l,u,c,!0,f)),y}var a=t("../util/interpolate"),o=t("../symbol/anchor"),s=t("./check_max_angle");e.exports=n},{"../symbol/anchor":380,"../util/interpolate":425,"./check_max_angle":381}],387:[function(t,e,r){"use strict";function n(){this.width=o,this.height=o,this.bin=new i(this.width,this.height),this.index={},this.ids={},this.data=new Uint8Array(this.width*this.height)}var i=t("shelf-pack"),a=t("../util/util"),o=128;e.exports=n,n.prototype.getGlyphs=function(){var t,e,r,n={};for(var i in this.ids)t=i.split("#"),e=t[0],r=t[1],n[e]||(n[e]=[]),n[e].push(r);return n},n.prototype.getRects=function(){var t,e,r,n={};for(var i in this.ids)t=i.split("#"),e=t[0],r=t[1],n[e]||(n[e]={}),n[e][r]=this.index[i];return n},n.prototype.addGlyph=function(t,e,r,n){if(!r)return null;var i=e+"#"+r.id;if(this.index[i])return this.ids[i].indexOf(t)<0&&this.ids[i].push(t),this.index[i];if(!r.bitmap)return null;var o=r.width+2*n,s=r.height+2*n,l=o+2,u=s+2;l+=4-l%4,u+=4-u%4;var c=this.bin.packOne(l,u);if(c||(this.resize(),c=this.bin.packOne(l,u)),!c)return a.warnOnce("glyph bitmap overflow"),null;this.index[i]=c,this.ids[i]=[t];for(var h=this.data,f=r.bitmap,d=0;d=2048||e>=2048)){this.texture&&(this.gl&&this.gl.deleteTexture(this.texture),this.texture=null),this.width*=4,this.height*=4,this.bin.resize(this.width,this.height);for(var r=new ArrayBuffer(this.width*this.height),n=0;n65535)return r("glyphs > 65535 not supported");void 0===this.loading[t]&&(this.loading[t]={});var n=this.loading[t];if(n[e])n[e].push(r);else{n[e]=[r];var i=256*e+"-"+(256*e+255),o=a(t,i,this.url);s(o,function(t,r){for(var i=!t&&new l(new c(new Uint8Array(r))),a=0;an&&null!==c){var x=v[c+1].x;g=Math.max(x,g);for(var _=c+1;_<=y;_++)v[_].y+=r,v[_].x-=x;if(o){var w=c;h[v[c].codePoint]&&w--,s(v,e,p,w,o)}p=c+1,c=null,d+=x,m++}f[b.codePoint]&&(c=y)}var M=v[v.length-1],k=M.x+e[M.codePoint].advance;g=Math.max(g,k);var A=(m+1)*r;s(v,e,p,v.length-1,o),l(v,o,i,a,g,r,m,u),t.top+=-a*A,t.bottom=t.top+A,t.left+=-i*g,t.right=t.left+g}function s(t,e,r,n,i){for(var a=e[t[n].codePoint].advance,o=(t[n].x+a)*i,s=r;s<=n;s++)t[s].x-=o}function l(t,e,r,n,i,a,o,s){for(var l=(e-r)*i+s[0],u=(-n*(o+1)+.5)*a+s[1],c=0;c1?2:1,this.canvas&&(this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio)),this.sprite=t},n.prototype.addIcons=function(t,e){for(var r=0;r1||(w?(clearTimeout(w),w=null,v("dblclick",e)):w=setTimeout(d,300))}function c(t){y("touchmove",t)}function h(t){y("touchend",t)}function f(t){y("touchcancel",t)}function d(){w=null}function p(t){n.mousePos(b,t).equals(_)&&v("click",t)}function m(t){v("dblclick",t),t.preventDefault()}function g(t){x=t,t.preventDefault()}function v(e,r){var i=n.mousePos(b,r);return t.fire(e,{lngLat:t.unproject(i),point:i,originalEvent:r})}function y(e,r){var a=n.touchPos(b,r),o=a.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new i(0,0));return t.fire(e,{lngLat:t.unproject(o),point:o,lngLats:a.map(function(e){return t.unproject(e)},this),points:a,originalEvent:r})}var b=t.getCanvasContainer(),x=null,_=null,w=null;for(var M in a)t[M]=new a[M](t,e),e.interactive&&e[M]&&t[M].enable();b.addEventListener("mouseout",r,!1),b.addEventListener("mousedown",o,!1),b.addEventListener("mouseup",s,!1),b.addEventListener("mousemove",l,!1),b.addEventListener("touchstart",u,!1),b.addEventListener("touchend",h,!1),b.addEventListener("touchmove",c,!1),b.addEventListener("touchcancel",f,!1),b.addEventListener("click",p,!1),b.addEventListener("dblclick",m,!1),b.addEventListener("contextmenu",g,!1)}},{"../util/dom":417,"./handler/box_zoom":402,"./handler/dblclick_zoom":403,"./handler/drag_pan":404,"./handler/drag_rotate":405,"./handler/keyboard":406,"./handler/scroll_zoom":407,"./handler/touch_zoom_rotate":408,"point-geometry":472}],397:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("../util/interpolate"),a=t("../util/browser"),o=t("../geo/lng_lat"),s=t("../geo/lng_lat_bounds"),l=t("point-geometry"),u=e.exports=function(){};n.extend(u.prototype,{getCenter:function(){return this.transform.center},setCenter:function(t,e){return this.jumpTo({center:t},e),this},panBy:function(t,e,r){return this.panTo(this.transform.center,n.extend({offset:l.convert(t).mult(-1)},e),r),this},panTo:function(t,e,r){return this.easeTo(n.extend({center:t},e),r)},getZoom:function(){return this.transform.zoom},setZoom:function(t,e){return this.jumpTo({zoom:t},e),this},zoomTo:function(t,e,r){return this.easeTo(n.extend({zoom:t},e),r)},zoomIn:function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},zoomOut:function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},getBearing:function(){return this.transform.bearing},setBearing:function(t,e){return this.jumpTo({bearing:t},e),this},rotateTo:function(t,e,r){return this.easeTo(n.extend({bearing:t},e),r)},resetNorth:function(t,e){return this.rotateTo(0,n.extend({duration:1e3},t),e),this},snapToNorth:function(t,e){return Math.abs(this.getBearing())180&&(c.center.lng>0&&m.lng<0?m.lng+=360:c.center.lng<0&&m.lng>0&&(m.lng-=360));var b=c.zoomScale(g-f),x=c.point,_="center"in t?c.project(m).sub(h.div(b)):x,w=c.worldSize,M=t.curve,k=Math.max(c.width,c.height),A=k/b,T=_.sub(x).mag();if("minZoom"in t){var S=n.clamp(Math.min(t.minZoom,f,g),c.minZoom,c.maxZoom),E=k/c.zoomScale(S-f);M=Math.sqrt(E/T*2)}var L=M*M,C=r(0),z=function(t){return s(C)/s(C+M*t)},D=function(t){return k*((s(C)*u(C+M*t)-a(C))/L)/T},I=(r(1)-C)/M;if(Math.abs(T)<1e-6){if(Math.abs(k-A)<1e-6)return this.easeTo(t);var P=A=0)return!1;return!0}),e.join(" | ")},n.prototype=o.inherit(i,{options:{position:"bottom-right"},onAdd:function(t){var e=this._container=a.create("div","mapboxgl-ctrl-attrib",t.getContainer());return this._update(),t.on("source.load",this._update.bind(this)),t.on("source.change",this._update.bind(this)),t.on("source.remove",this._update.bind(this)),t.on("moveend",this._updateEditLink.bind(this)),e},_update:function(){this._map.style&&(this._container.innerHTML=n.createAttributionString(this._map.style.sources)),this._editLink=this._container.getElementsByClassName("mapbox-improve-map")[0],this._updateEditLink()},_updateEditLink:function(){if(this._editLink){var t=this._map.getCenter();this._editLink.href="https://www.mapbox.com/map-feedback/#/"+t.lng+"/"+t.lat+"/"+Math.round(this._map.getZoom()+1)}}})},{"../../util/dom":417,"../../util/util":431,"./control":399}],399:[function(t,e,r){"use strict";function n(){}var i=t("../../util/util"),a=t("../../util/evented");e.exports=n,n.prototype={addTo:function(t){this._map=t;var e=this._container=this.onAdd(t);if(this.options&&this.options.position){var r=this.options.position,n=t._controlCorners[r];e.className+=" mapboxgl-ctrl",-1!==r.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e)}return this},remove:function(){return this._container.parentNode.removeChild(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this}},i.extend(n.prototype,a)},{"../../util/evented":423,"../../util/util":431}],400:[function(t,e,r){"use strict";function n(t){s.setOptions(this,t)}var i=t("./control"),a=t("../../util/browser"),o=t("../../util/dom"),s=t("../../util/util");e.exports=n;var l={enableHighAccuracy:!1,timeout:6e3};n.prototype=s.inherit(i,{options:{position:"top-right"},onAdd:function(t){var e=this._container=o.create("div","mapboxgl-ctrl-group",t.getContainer());return a.supportsGeolocation?(this._container.addEventListener("contextmenu",this._onContextMenu.bind(this)),this._geolocateButton=o.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.addEventListener("click",this._onClickGeolocate.bind(this)),e):e},_onContextMenu:function(t){t.preventDefault()},_onClickGeolocate:function(){navigator.geolocation.getCurrentPosition(this._success.bind(this),this._error.bind(this),l),this._timeoutId=setTimeout(this._finish.bind(this),1e4)},_success:function(t){this._map.jumpTo({center:[t.coords.longitude,t.coords.latitude],zoom:17,bearing:0,pitch:0}),this.fire("geolocate",t),this._finish()},_error:function(t){this.fire("error",t),this._finish()},_finish:function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}})},{"../../util/browser":415,"../../util/dom":417,"../../util/util":431,"./control":399}],401:[function(t,e,r){"use strict";function n(t){s.setOptions(this,t)}function i(t){return new MouseEvent(t.type,{button:2,buttons:2,bubbles:!0,cancelable:!0,detail:t.detail,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,movementX:t.movementX,movementY:t.movementY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey})}var a=t("./control"),o=t("../../util/dom"),s=t("../../util/util");e.exports=n,n.prototype=s.inherit(a,{options:{position:"top-right"},onAdd:function(t){var e="mapboxgl-ctrl",r=this._container=o.create("div",e+"-group",t.getContainer());return this._container.addEventListener("contextmenu",this._onContextMenu.bind(this)),this._zoomInButton=this._createButton(e+"-icon "+e+"-zoom-in",t.zoomIn.bind(t)),this._zoomOutButton=this._createButton(e+"-icon "+e+"-zoom-out",t.zoomOut.bind(t)),this._compass=this._createButton(e+"-icon "+e+"-compass",t.resetNorth.bind(t)),this._compassArrow=o.create("div","arrow",this._compass),this._compass.addEventListener("mousedown",this._onCompassDown.bind(this)),this._onCompassMove=this._onCompassMove.bind(this),this._onCompassUp=this._onCompassUp.bind(this),t.on("rotate",this._rotateCompassArrow.bind(this)),this._rotateCompassArrow(),this._el=t.getCanvasContainer(),r},_onContextMenu:function(t){t.preventDefault()},_onCompassDown:function(t){0===t.button&&(o.disableDrag(),document.addEventListener("mousemove",this._onCompassMove),document.addEventListener("mouseup",this._onCompassUp),this._el.dispatchEvent(i(t)),t.stopPropagation())},_onCompassMove:function(t){0===t.button&&(this._el.dispatchEvent(i(t)),t.stopPropagation())},_onCompassUp:function(t){0===t.button&&(document.removeEventListener("mousemove",this._onCompassMove),document.removeEventListener("mouseup",this._onCompassUp),o.enableDrag(),this._el.dispatchEvent(i(t)),t.stopPropagation())},_createButton:function(t,e){var r=o.create("button",t,this._container);return r.type="button",r.addEventListener("click",function(){e()}),r},_rotateCompassArrow:function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t}})},{"../../util/dom":417,"../../util/util":431,"./control":399}],402:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),o.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../geo/lng_lat_bounds"),o=t("../../util/util");e.exports=n,n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onMouseDown,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onMouseDown),this._enabled=!1)},_onMouseDown:function(t){t.shiftKey&&0===t.button&&(document.addEventListener("mousemove",this._onMouseMove,!1),document.addEventListener("keydown",this._onKeyDown,!1),document.addEventListener("mouseup",this._onMouseUp,!1),i.disableDrag(),this._startPos=i.mousePos(this._el,t),this._active=!0)},_onMouseMove:function(t){var e=this._startPos,r=i.mousePos(this._el,t);this._box||(this._box=i.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var n=Math.min(e.x,r.x),a=Math.max(e.x,r.x),o=Math.min(e.y,r.y),s=Math.max(e.y,r.y);i.setTransform(this._box,"translate("+n+"px,"+o+"px)"),this._box.style.width=a-n+"px",this._box.style.height=s-o+"px"},_onMouseUp:function(t){if(0===t.button){var e=this._startPos,r=i.mousePos(this._el,t),n=new a(this._map.unproject(e),this._map.unproject(r));this._finish(),e.x===r.x&&e.y===r.y?this._fireEvent("boxzoomcancel",t):this._map.fitBounds(n,{linear:!0}).fire("boxzoomend",{originalEvent:t,boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},_finish:function(){this._active=!1,document.removeEventListener("mousemove",this._onMouseMove,!1),document.removeEventListener("keydown",this._onKeyDown,!1),document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.parentNode.removeChild(this._box),this._box=null),i.enableDrag()},_fireEvent:function(t,e){return this._map.fire(t,{originalEvent:e})}}},{"../../geo/lng_lat_bounds":329,"../../util/dom":417,"../../util/util":431}],403:[function(t,e,r){"use strict";function n(t){this._map=t,this._onDblClick=this._onDblClick.bind(this)}e.exports=n,n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._map.on("dblclick",this._onDblClick),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._map.off("dblclick",this._onDblClick),this._enabled=!1)},_onDblClick:function(t){this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)}}},{}],404:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),a.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/util");e.exports=n;var o=a.bezier(0,0,.3,1);n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._el.addEventListener("touchstart",this._onDown),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._el.removeEventListener("touchstart",this._onDown),this._enabled=!1)},_onDown:function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(document.addEventListener("touchmove",this._onMove),document.addEventListener("touchend",this._onTouchEnd)):(document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onMouseUp)),this._active=!1,this._startPos=this._pos=i.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},_onMove:function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._fireEvent("dragstart",t),this._fireEvent("movestart",t));var e=i.mousePos(this._el,t),r=this._map;r.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),r.transform.setLocationAtPoint(r.transform.pointLocation(this._pos),e),this._fireEvent("drag",t),this._fireEvent("move",t),this._pos=e,t.preventDefault()}},_onUp:function(t){if(this.isActive()){this._active=!1,this._fireEvent("dragend",t),this._drainInertiaBuffer();var e=function(){this._fireEvent("moveend",t)}.bind(this),r=this._inertia;if(r.length<2)return void e();var n=r[r.length-1],i=r[0],a=n[1].sub(i[1]),s=(n[0]-i[0])/1e3;if(0===s||n[1].equals(i[1]))return void e();var l=a.mult(.3/s),u=l.mag();u>1400&&(u=1400,l._unit()._mult(u));var c=u/750,h=l.mult(-c/2);this._map.panBy(h,{duration:1e3*c,easing:o,noMoveStart:!0},{originalEvent:t})}},_onMouseUp:function(t){this._ignoreEvent(t)||(this._onUp(t),document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onMouseUp))},_onTouchEnd:function(t){this._ignoreEvent(t)||(this._onUp(t),document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onTouchEnd))},_fireEvent:function(t,e){return this._map.fire(t,{originalEvent:e})},_ignoreEvent:function(t){var e=this._map;if(e.boxZoom&&e.boxZoom.isActive())return!0;if(e.dragRotate&&e.dragRotate.isActive())return!0;if(t.touches)return t.touches.length>1;if(t.ctrlKey)return!0;return"mousemove"===t.type?!1&t.buttons:0!==t.button},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":417,"../../util/util":431}],405:[function(t,e,r){"use strict";function n(t,e){this._map=t,this._el=t.getCanvasContainer(),this._bearingSnap=e.bearingSnap,o.bindHandlers(this)}var i=t("../../util/dom"),a=t("point-geometry"),o=t("../../util/util");e.exports=n;var s=o.bezier(0,0,.25,1);n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._enabled=!1)},_onDown:function(t){if(!this._ignoreEvent(t)&&!this.isActive()){document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=i.mousePos(this._el,t),this._center=this._map.transform.centerPoint;var e=this._startPos.sub(this._center);e.mag()<200&&(this._center=this._startPos.add(new a(-200,0)._rotate(e.angle()))),t.preventDefault()}},_onMove:function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._fireEvent("rotatestart",t),this._fireEvent("movestart",t));var e=this._map;e.stop();var r=this._pos,n=i.mousePos(this._el,t),a=this._center,o=r.sub(a).angleWith(n.sub(a))/Math.PI*180,s=e.getBearing()-o,l=this._inertia,u=l[l.length-1];this._drainInertiaBuffer(),l.push([Date.now(),e._normalizeBearing(s,u[1])]),e.transform.bearing=s,this._fireEvent("rotate",t),this._fireEvent("move",t),this._pos=n}},_onUp:function(t){if(!this._ignoreEvent(t)&&(document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onUp),this.isActive())){this._active=!1,this._fireEvent("rotateend",t),this._drainInertiaBuffer();var e=this._map,r=e.getBearing(),n=this._inertia,i=function(){Math.abs(r)180&&(d=180);var p=d/180;u+=h*d*(p/2),Math.abs(e._normalizeBearing(u,0))1;var r=t.ctrlKey?1:2,n=t.ctrlKey?0:2;return"mousemove"===t.type?t.buttons&0===r:t.button!==n},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":417,"../../util/util":431,"point-geometry":472}],406:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),this._onKeyDown=this._onKeyDown.bind(this)}e.exports=n;n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=this._map,r={originalEvent:t};if(!e.isEasing())switch(t.keyCode){case 61:case 107:case 171:case 187:e.zoomTo(Math.round(e.getZoom())+(t.shiftKey?2:1),r);break;case 189:case 109:case 173:e.zoomTo(Math.round(e.getZoom())-(t.shiftKey?2:1),r);break;case 37:t.shiftKey?e.easeTo({bearing:e.getBearing()-2},r):(t.preventDefault(),e.panBy([-80,0],r));break;case 39:t.shiftKey?e.easeTo({bearing:e.getBearing()+2},r):(t.preventDefault(),e.panBy([80,0],r));break;case 38:t.shiftKey?e.easeTo({pitch:e.getPitch()+5},r):(t.preventDefault(),e.panBy([0,-80],r));break;case 40:t.shiftKey?e.easeTo({pitch:Math.max(e.getPitch()-5,0)},r):(t.preventDefault(),e.panBy([0,80],r))}}}}},{}],407:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),o.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/browser"),o=t("../../util/util");e.exports=n;var s="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",l=-1!==s.indexOf("firefox"),u=-1!==s.indexOf("safari")&&-1===s.indexOf("chrom");n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("wheel",this._onWheel,!1),this._el.addEventListener("mousewheel",this._onWheel,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("wheel",this._onWheel),this._el.removeEventListener("mousewheel",this._onWheel),this._enabled=!1)},_onWheel:function(t){var e;"wheel"===t.type?(e=t.deltaY,l&&t.deltaMode===window.WheelEvent.DOM_DELTA_PIXEL&&(e/=a.devicePixelRatio),t.deltaMode===window.WheelEvent.DOM_DELTA_LINE&&(e*=40)):"mousewheel"===t.type&&(e=-t.wheelDeltaY,u&&(e/=3));var r=a.now(),n=r-(this._time||0);this._pos=i.mousePos(this._el,t),this._time=r,0!==e&&e%4.000244140625==0?(this._type="wheel",e=Math.floor(e/4)):0!==e&&Math.abs(e)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=e,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(n*e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,e+=this._lastValue)),t.shiftKey&&e&&(e/=4),this._type&&this._zoom(-e,t),t.preventDefault()},_onTimeout:function(){this._type="wheel",this._zoom(-this._lastValue)},_zoom:function(t,e){if(0!==t){var r=this._map,n=2/(1+Math.exp(-Math.abs(t/100)));t<0&&0!==n&&(n=1/n);var i=r.ease?r.ease.to:r.transform.scale,a=r.transform.scaleZoom(i*n);r.zoomTo(a,{duration:0,around:r.unproject(this._pos),delayEndEvents:200},{originalEvent:e})}}}},{"../../util/browser":415,"../../util/dom":417,"../../util/util":431}],408:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),a.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/util");e.exports=n;var o=a.bezier(0,0,.15,1);n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("touchstart",this._onStart,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("touchstart",this._onStart),this._enabled=!1)},disableRotation:function(){this._rotationDisabled=!0},enableRotation:function(){this._rotationDisabled=!1},_onStart:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]);this._startVec=e.sub(r),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],document.addEventListener("touchmove",this._onMove,!1),document.addEventListener("touchend",this._onEnd,!1)}},_onMove:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]),n=e.add(r).div(2),a=e.sub(r),o=a.mag()/this._startVec.mag(),s=this._rotationDisabled?0:180*a.angleWith(this._startVec)/Math.PI,l=this._map;if(this._gestureIntent){var u={duration:0,around:l.unproject(n)};"rotate"===this._gestureIntent&&(u.bearing=this._startBearing+s),"zoom"!==this._gestureIntent&&"rotate"!==this._gestureIntent||(u.zoom=l.transform.scaleZoom(this._startScale*o)),l.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),o,n]),l.easeTo(u,{originalEvent:t})}else{var c=Math.abs(1-o)>.15;Math.abs(s)>4?this._gestureIntent="rotate":c&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._startVec=a,this._startScale=l.transform.scale,this._startBearing=l.transform.bearing)}t.preventDefault()}},_onEnd:function(t){document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,r=this._map;if(e.length<2)return void r.snapToNorth({},{originalEvent:t});var n=e[e.length-1],i=e[0],a=r.transform.scaleZoom(this._startScale*n[1]),s=r.transform.scaleZoom(this._startScale*i[1]),l=a-s,u=(n[0]-i[0])/1e3,c=n[2];if(0===u||a===s)return void r.snapToNorth({},{originalEvent:t});var h=.15*l/u;Math.abs(h)>2.5&&(h=h>0?2.5:-2.5);var f=1e3*Math.abs(h/(12*.15)),d=a+h*f/2e3;d<0&&(d=0),r.easeTo({zoom:d,duration:f,easing:o,around:r.unproject(c)},{originalEvent:t})},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>2&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":417,"../../util/util":431}],409:[function(t,e,r){"use strict";function n(){i.bindAll(["_onHashChange","_updateHash"],this)}e.exports=n;var i=t("../util/util");n.prototype={addTo:function(t){return this._map=t,window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},remove:function(){return window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),delete this._map,this},_onHashChange:function(){var t=location.hash.replace("#","").split("/");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0)}),!0)},_updateHash:function(){var t=this._map.getCenter(),e=this._map.getZoom(),r=this._map.getBearing(),n=Math.max(0,Math.ceil(Math.log(e)/Math.LN2)),i="#"+Math.round(100*e)/100+"/"+t.lat.toFixed(n)+"/"+t.lng.toFixed(n)+(r?"/"+Math.round(10*r)/10:"");window.history.replaceState("","",i)}}},{"../util/util":431}],410:[function(t,e,r){"use strict";function n(t){t.parentNode&&t.parentNode.removeChild(t)}var i=t("../util/canvas"),a=t("../util/util"),o=t("../util/browser"),s=t("../util/browser").window,l=t("../util/evented"),u=t("../util/dom"),c=t("../style/style"),h=t("../style/animation_loop"),f=t("../render/painter"),d=t("../geo/transform"),p=t("./hash"),m=t("./bind_handlers"),g=t("./camera"),v=t("../geo/lng_lat"),y=t("../geo/lng_lat_bounds"),b=t("point-geometry"),x=t("./control/attribution"),_={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:20,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,workerCount:Math.max(o.hardwareConcurrency-1,1)},w=e.exports=function(t){if(t=a.extend({},_,t),t.workerCount<1)throw new Error("workerCount must an integer greater than or equal to 1.");this._interactive=t.interactive,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._trackResize=t.trackResize,this._workerCount=t.workerCount,this._bearingSnap=t.bearingSnap,"string"==typeof t.container?this._container=document.getElementById(t.container):this._container=t.container,this.animationLoop=new h,this.transform=new d(t.minZoom,t.maxZoom),t.maxBounds&&this.setMaxBounds(t.maxBounds),a.bindAll(["_forwardStyleEvent","_forwardSourceEvent","_forwardLayerEvent","_forwardTileEvent","_onStyleLoad","_onStyleChange","_onSourceAdd","_onSourceRemove","_onSourceUpdate","_onWindowOnline","_onWindowResize","_update","_render"],this),this._setupContainer(),this._setupPainter(),this.on("move",this._update.bind(this,!1)),this.on("zoom",this._update.bind(this,!0)),this.on("moveend",function(){this.animationLoop.set(300),this._rerender()}.bind(this)),void 0!==s&&(s.addEventListener("online",this._onWindowOnline,!1),s.addEventListener("resize",this._onWindowResize,!1)),m(this,t),this._hash=t.hash&&(new p).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),this.stacks={},this._classes=[],this.resize(),t.classes&&this.setClasses(t.classes),t.style&&this.setStyle(t.style),t.attributionControl&&this.addControl(new x(t.attributionControl));var e=this.fire.bind(this,"error");this.on("style.error",e),this.on("source.error",e),this.on("tile.error",e),this.on("layer.error",e)};a.extend(w.prototype,l),a.extend(w.prototype,g.prototype),a.extend(w.prototype,{addControl:function(t){return t.addTo(this),this},addClass:function(t,e){return this._classes.indexOf(t)>=0||""===t?this:(this._classes.push(t),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},removeClass:function(t,e){var r=this._classes.indexOf(t);return r<0||""===t?this:(this._classes.splice(r,1),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},setClasses:function(t,e){for(var r={},n=0;n=0},getClasses:function(){return this._classes},resize:function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),this._canvas.resize(t,e),this.transform.resize(t,e),this.painter.resize(t,e), -this.fire("movestart").fire("move").fire("resize").fire("moveend")},getBounds:function(){var t=new y(this.transform.pointLocation(new b(0,0)),this.transform.pointLocation(this.transform.size));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new b(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new b(0,this.transform.size.y)))),t},setMaxBounds:function(t){if(t){var e=y.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=[],this.transform.latRange=[],this._update());return this},setMinZoom:function(t){if((t=null===t||void 0===t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom&&t<=20)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be between the current minZoom and 20, inclusive")},project:function(t){return this.transform.locationPoint(v.convert(t))},unproject:function(t){return this.transform.pointLocation(b.convert(t))},queryRenderedFeatures:function(){var t,e={};return 2===arguments.length?(t=arguments[0],e=arguments[1]):1===arguments.length&&function(t){return t instanceof b||Array.isArray(t)}(arguments[0])?t=arguments[0]:1===arguments.length&&(e=arguments[0]),this.style.queryRenderedFeatures(this._makeQueryGeometry(t),e,this.transform.zoom,this.transform.angle)},_makeQueryGeometry:function(t){void 0===t&&(t=[b.convert([0,0]),b.convert([this.transform.width,this.transform.height])]);var e;if(t instanceof b||"number"==typeof t[0])e=[b.convert(t)];else{var r=[b.convert(t[0]),b.convert(t[1])];e=[r[0],new b(r[1].x,r[0].y),r[1],new b(r[0].x,r[1].y),r[0]]}return e=e.map(function(t){return this.transform.pointCoordinate(t)}.bind(this))},querySourceFeatures:function(t,e){return this.style.querySourceFeatures(t,e)},setStyle:function(t){return this.style&&(this.style.off("load",this._onStyleLoad).off("error",this._forwardStyleEvent).off("change",this._onStyleChange).off("source.add",this._onSourceAdd).off("source.remove",this._onSourceRemove).off("source.load",this._onSourceUpdate).off("source.error",this._forwardSourceEvent).off("source.change",this._onSourceUpdate).off("layer.add",this._forwardLayerEvent).off("layer.remove",this._forwardLayerEvent).off("layer.error",this._forwardLayerEvent).off("tile.add",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.load",this._update).off("tile.error",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent)._remove(),this.off("rotate",this.style._redoPlacement),this.off("pitch",this.style._redoPlacement)),t?(this.style=t instanceof c?t:new c(t,this.animationLoop,this._workerCount),this.style.on("load",this._onStyleLoad).on("error",this._forwardStyleEvent).on("change",this._onStyleChange).on("source.add",this._onSourceAdd).on("source.remove",this._onSourceRemove).on("source.load",this._onSourceUpdate).on("source.error",this._forwardSourceEvent).on("source.change",this._onSourceUpdate).on("layer.add",this._forwardLayerEvent).on("layer.remove",this._forwardLayerEvent).on("layer.error",this._forwardLayerEvent).on("tile.add",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.load",this._update).on("tile.error",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this.on("rotate",this.style._redoPlacement),this.on("pitch",this.style._redoPlacement),this):(this.style=null,this)},getStyle:function(){if(this.style)return this.style.serialize()},addSource:function(t,e){return this.style.addSource(t,e),this._update(!0),this},addSourceType:function(t,e,r){return this.style.addSourceType(t,e,r)},removeSource:function(t){return this.style.removeSource(t),this._update(!0),this},getSource:function(t){return this.style.getSource(t)},addLayer:function(t,e){return this.style.addLayer(t,e),this._update(!0),this},removeLayer:function(t){return this.style.removeLayer(t),this._update(!0),this},getLayer:function(t){return this.style.getLayer(t)},setFilter:function(t,e){return this.style.setFilter(t,e),this._update(!0),this},setLayerZoomRange:function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},getFilter:function(t){return this.style.getFilter(t)},setPaintProperty:function(t,e,r,n){return this.style.setPaintProperty(t,e,r,n),this._update(!0),this},getPaintProperty:function(t,e,r){return this.style.getPaintProperty(t,e,r)},setLayoutProperty:function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},getLayoutProperty:function(t,e){return this.style.getLayoutProperty(t,e)},getContainer:function(){return this._container},getCanvasContainer:function(){return this._canvasContainer},getCanvas:function(){return this._canvas.getElement()},_setupContainer:function(){var t=this._container;t.classList.add("mapboxgl-map");var e=this._canvasContainer=u.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=new i(this,e);var r=this._controlContainer=u.create("div","mapboxgl-control-container",t),n=this._controlCorners={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){n[t]=u.create("div","mapboxgl-ctrl-"+t,r)})},_setupPainter:function(){var t=this._canvas.getWebGLContext({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer});if(!t)return void this.fire("error",{error:new Error("Failed to initialize WebGL")});this.painter=new f(t,this.transform)},_contextLost:function(t){t.preventDefault(),this._frameId&&o.cancelFrame(this._frameId),this.fire("webglcontextlost",{originalEvent:t})},_contextRestored:function(t){this._setupPainter(),this.resize(),this._update(),this.fire("webglcontextrestored",{originalEvent:t})},loaded:function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},_update:function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},_render:function(){try{this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(this._classes,this._classOptions),this._classOptions=null,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.painter.render(this.style,{debug:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,vertices:this.vertices,rotating:this.rotating,zooming:this.zooming}),this.fire("render"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire("load")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty)&&this._rerender()}catch(t){this.fire("error",{error:t})}return this},remove:function(){this._hash&&this._hash.remove(),o.cancelFrame(this._frameId),this.setStyle(null),void 0!==s&&s.removeEventListener("resize",this._onWindowResize,!1);var t=this.painter.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),n(this._canvasContainer),n(this._controlContainer),this._container.classList.remove("mapboxgl-map")},_rerender:function(){this.style&&!this._frameId&&(this._frameId=o.frame(this._render))},_forwardStyleEvent:function(t){this.fire("style."+t.type,a.extend({style:t.target},t))},_forwardSourceEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_forwardLayerEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_forwardTileEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_onStyleLoad:function(t){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update(this._classes,{transition:!1}),this._forwardStyleEvent(t)},_onStyleChange:function(t){this._update(!0),this._forwardStyleEvent(t)},_onSourceAdd:function(t){var e=t.source;e.onAdd&&e.onAdd(this),this._forwardSourceEvent(t)},_onSourceRemove:function(t){var e=t.source;e.onRemove&&e.onRemove(this),this._forwardSourceEvent(t)},_onSourceUpdate:function(t){this._update(),this._forwardSourceEvent(t)},_onWindowOnline:function(){this._update()},_onWindowResize:function(){this._trackResize&&this.stop().resize()._update()}}),a.extendAll(w.prototype,{_showTileBoundaries:!1,get showTileBoundaries(){return this._showTileBoundaries},set showTileBoundaries(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},_showCollisionBoxes:!1,get showCollisionBoxes(){return this._showCollisionBoxes},set showCollisionBoxes(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,this.style._redoPlacement())},_showOverdrawInspector:!1,get showOverdrawInspector(){return this._showOverdrawInspector},set showOverdrawInspector(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},_repaint:!1,get repaint(){return this._repaint},set repaint(t){this._repaint=t,this._update()},_vertices:!1,get vertices(){return this._vertices},set vertices(t){this._vertices=t,this._update()}})},{"../geo/lng_lat":328,"../geo/lng_lat_bounds":329,"../geo/transform":330,"../render/painter":344,"../style/animation_loop":364,"../style/style":367,"../util/browser":415,"../util/canvas":416,"../util/dom":417,"../util/evented":423,"../util/util":431,"./bind_handlers":396,"./camera":397,"./control/attribution":398,"./hash":409,"point-geometry":472}],411:[function(t,e,r){"use strict";function n(t,e){t||(t=i.create("div")),t.classList.add("mapboxgl-marker"),this._el=t,this._offset=o.convert(e&&e.offset||[0,0]),this._update=this._update.bind(this)}e.exports=n;var i=t("../util/dom"),a=t("../geo/lng_lat"),o=t("point-geometry");n.prototype={addTo:function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._el),t.on("move",this._update),this._update(),this},remove:function(){this._map&&(this._map.off("move",this._update),this._map=null);var t=this._el.parentNode;return t&&t.removeChild(this._el),this},getLngLat:function(){return this._lngLat},setLngLat:function(t){return this._lngLat=a.convert(t),this._update(),this},getElement:function(){return this._el},_update:function(){if(this._map){var t=this._map.project(this._lngLat)._add(this._offset);i.setTransform(this._el,"translate("+t.x+"px,"+t.y+"px)")}}}},{"../geo/lng_lat":328,"../util/dom":417,"point-geometry":472}],412:[function(t,e,r){"use strict";function n(t){i.setOptions(this,t),i.bindAll(["_update","_onClickClose"],this)}e.exports=n;var i=t("../util/util"),a=t("../util/evented"),o=t("../util/dom"),s=t("../geo/lng_lat");n.prototype=i.inherit(a,{options:{closeButton:!0,closeOnClick:!0},addTo:function(t){return this._map=t,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this},remove:function(){return this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._container&&(this._container.parentNode.removeChild(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire("close"),this},getLngLat:function(){return this._lngLat},setLngLat:function(t){return this._lngLat=s.convert(t),this._update(),this},setText:function(t){return this.setDOMContent(document.createTextNode(t))},setHTML:function(t){var e,r=document.createDocumentFragment(),n=document.createElement("body");for(n.innerHTML=t;;){if(!(e=n.firstChild))break;r.appendChild(e)}return this.setDOMContent(r)},setDOMContent:function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},_createContent:function(){this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._content=o.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=o.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClickClose))},_update:function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content));var t=this._map.project(this._lngLat).round(),e=this.options.anchor;if(!e){var r=this._container.offsetWidth,n=this._container.offsetHeight;e=t.ythis._map.transform.height-n?["bottom"]:[],t.xthis._map.transform.width-r/2&&e.push("right"),e=0===e.length?"bottom":e.join("-")}var i={top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"},a=this._container.classList;for(var s in i)a.remove("mapboxgl-popup-anchor-"+s);a.add("mapboxgl-popup-anchor-"+e),o.setTransform(this._container,i[e]+" translate("+t.x+"px,"+t.y+"px)")}},_onClickClose:function(){this.remove()}})},{"../geo/lng_lat":328,"../util/dom":417,"../util/evented":423,"../util/util":431}],413:[function(t,e,r){"use strict";function n(t,e){this.target=t,this.parent=e,this.callbacks={},this.callbackID=0,this.receive=this.receive.bind(this),this.target.addEventListener("message",this.receive,!1)}e.exports=n,n.prototype.receive=function(t){function e(t,e,r){this.postMessage({type:"",id:String(i),error:t?String(t):null,data:e},r)}var r,n=t.data,i=n.id;if(""===n.type)r=this.callbacks[n.id],delete this.callbacks[n.id],r&&r(n.error||null,n.data);else if(void 0!==n.id&&this.parent[n.type])this.parent[n.type](n.data,e.bind(this));else if(void 0!==n.id&&this.parent.workerSources){var a=n.type.split(".");this.parent.workerSources[a[0]][a[1]](n.data,e.bind(this))}else this.parent[n.type](n.data)},n.prototype.send=function(t,e,r,n){var i=null;r&&(this.callbacks[i=this.callbackID++]=r),this.postMessage({type:t,id:String(i),data:e},n)},n.prototype.postMessage=function(t,e){this.target.postMessage(t,e)}},{}],414:[function(t,e,r){"use strict";function n(t){var e=document.createElement("a");return e.href=t,e.protocol===document.location.protocol&&e.host===document.location.host}r.getJSON=function(t,e){var r=new XMLHttpRequest;return r.open("GET",t,!0),r.setRequestHeader("Accept","application/json"),r.onerror=function(t){e(t)},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var t;try{t=JSON.parse(r.response)}catch(t){return e(t)}e(null,t)}else e(new Error(r.statusText))},r.send(),r},r.getArrayBuffer=function(t,e){var r=new XMLHttpRequest;return r.open("GET",t,!0),r.responseType="arraybuffer",r.onerror=function(t){e(t)},r.onload=function(){r.status>=200&&r.status<300&&r.response?e(null,r.response):e(new Error(r.statusText))},r.send(),r},r.getImage=function(t,e){return r.getArrayBuffer(t,function(t,r){if(t)return e(t);var n=new Image;n.onload=function(){e(null,n),(window.URL||window.webkitURL).revokeObjectURL(n.src)};var i=new Blob([new Uint8Array(r)],{type:"image/png"});return n.src=(window.URL||window.webkitURL).createObjectURL(i),n.getData=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return t.width=n.width,t.height=n.height,e.drawImage(n,0,0),e.getImageData(0,0,n.width,n.height).data},n})},r.getVideo=function(t,e){var r=document.createElement("video");r.onloadstart=function(){e(null,r)};for(var i=0;i=s+n?t.call(i,1):(t.call(i,(l-s)/n),r.frame(a)))}if(!n)return t.call(i,1),null;var o=!1,s=e.exports.now();return r.frame(a),function(){o=!0}},r.supported=t("mapbox-gl-supported"),r.hardwareConcurrency=navigator.hardwareConcurrency||4,Object.defineProperty(r,"devicePixelRatio",{get:function(){return window.devicePixelRatio}}),r.supportsWebp=!1;var a=document.createElement("img");a.onload=function(){r.supportsWebp=!0},a.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=",r.supportsGeolocation=!!navigator.geolocation},{"mapbox-gl-supported":316}],416:[function(t,e,r){"use strict";function n(t,e){this.canvas=document.createElement("canvas"),t&&e&&(this.canvas.style.position="absolute",this.canvas.classList.add("mapboxgl-canvas"),this.canvas.addEventListener("webglcontextlost",t._contextLost.bind(t),!1),this.canvas.addEventListener("webglcontextrestored",t._contextRestored.bind(t),!1),this.canvas.setAttribute("tabindex",0),e.appendChild(this.canvas))}var i=t("../util"),a=t("mapbox-gl-supported");e.exports=n,n.prototype.resize=function(t,e){var r=window.devicePixelRatio||1;this.canvas.width=r*t,this.canvas.height=r*e,this.canvas.style.width=t+"px",this.canvas.style.height=e+"px"},n.prototype.getWebGLContext=function(t){return t=i.extend({},t,a.webGLContextAttributes),this.canvas.getContext("webgl",t)||this.canvas.getContext("experimental-webgl",t)},n.prototype.getElement=function(){return this.canvas}},{"../util":431,"mapbox-gl-supported":316}],417:[function(t,e,r){"use strict";function n(t){for(var e=0;e1)for(var h=0;h=0&&this._events[t].splice(r,1),this._events[t].length||delete this._events[t]}else delete this._events[t];return this},once:function(t,e){var r=function(n){this.off(t,r),e.call(this,n)}.bind(this);return this.on(t,r),this},fire:function(t,e){if(!this.listens(t))return n.endsWith(t,"error")&&console.error(e&&e.error||e||"Empty error event"),this;e=n.extend({},e),n.extend(e,{type:t,target:this});for(var r=this._events[t].slice(),i=0;i=3)for(var l=0;l1){if(s(t,e))return!0;for(var n=0;n(e.y-t.y)*(r.x-t.x)}function u(t,e,r,n){return l(t,r,n)!==l(e,r,n)&&l(t,e,r)!==l(t,e,n)}function c(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function f(t,e){for(var r,n,i,a=!1,o=0;oe.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a)}return a}function d(t,e){for(var r=!1,n=0,i=t.length-1;ne.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}e.exports={multiPolygonIntersectsBufferedMultiPoint:n,multiPolygonIntersectsMultiPolygon:i,multiPolygonIntersectsBufferedMultiLine:a}},{}],427:[function(t,e,r){"use strict";function n(t,e){this.max=t,this.onRemove=e,this.reset()}e.exports=n,n.prototype.reset=function(){for(var t in this.data)this.onRemove(this.data[t]);return this.data={},this.order=[],this},n.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.get(this.order[0]);r&&this.onRemove(r)}return this},n.prototype.has=function(t){return t in this.data},n.prototype.keys=function(){return this.order},n.prototype.get=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},n.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this.get(this.order[0]);e&&this.onRemove(e)}return this}},{}],428:[function(t,e,r){"use strict";function n(t,e,r){if(!(r=r||o.ACCESS_TOKEN)&&o.REQUIRE_ACCESS_TOKEN)throw new Error("An API access token is required to use Mapbox GL. See https://www.mapbox.com/developers/api/#access-tokens");if(t=t.replace(/^mapbox:\/\//,o.API_URL+e),t+=-1!==t.indexOf("?")?"&access_token=":"?access_token=",o.REQUIRE_ACCESS_TOKEN){if("s"===r[0])throw new Error("Use a public access token (pk.*) with Mapbox GL JS, not a secret access token (sk.*). See https://www.mapbox.com/developers/api/#access-tokens");t+=r}return t}function i(t){return t?"?"+t:""}function a(t){return t.access_token&&"tk."===t.access_token.slice(0,3)?u.extend({},t,{access_token:o.ACCESS_TOKEN}):t}var o=t("./config"),s=t("./browser"),l=t("url"),u=t("./util");e.exports.normalizeStyleURL=function(t,e){var r=l.parse(t);return"mapbox:"!==r.protocol?t:n("mapbox:/"+r.pathname+i(r.query),"/styles/v1/",e)},e.exports.normalizeSourceURL=function(t,e){return"mapbox:"!==l.parse(t).protocol?t:n(t+".json","/v4/",e)+"&secure"},e.exports.normalizeGlyphsURL=function(t,e){var r=l.parse(t);return"mapbox:"!==r.protocol?t:n("mapbox://"+r.pathname.split("/")[1]+"/{fontstack}/{range}.pbf"+i(r.query),"/fonts/v1/",e)},e.exports.normalizeSpriteURL=function(t,e,r,a){var o=l.parse(t);return"mapbox:"!==o.protocol?(o.pathname+=e+r,l.format(o)):n("mapbox:/"+o.pathname+"/sprite"+e+r+i(o.query),"/styles/v1/",a)},e.exports.normalizeTileURL=function(t,e,r){var n=l.parse(t,!0);if(!e)return t;if("mapbox:"!==l.parse(e).protocol)return t;var i=s.supportsWebp?".webp":"$1",o=s.devicePixelRatio>=2||512===r?"@2x":"";return l.format({protocol:n.protocol,hostname:n.hostname,pathname:n.pathname.replace(/(\.(?:png|jpg)\d*)/,o+i),query:a(n.query)})}},{"./browser":415,"./config":420,"./util":431,url:532}],429:[function(t,e,r){"use strict";function n(t){function e(){f.apply(this,arguments)}function r(){d.apply(this,arguments),this.members=e.prototype.members}var n=JSON.stringify(t);if(g[n])return g[n];void 0===t.alignment&&(t.alignment=1),e.prototype=Object.create(f.prototype);var s=0,u=0,v=["Uint8"];return e.prototype.members=t.members.map(function(r){r={name:r.name,type:r.type,components:r.components||1},p(r.name.length),p(r.type in m),v.indexOf(r.type)<0&&v.push(r.type);var n=o(r.type);u=Math.max(u,n),r.offset=s=a(s,Math.max(t.alignment,n));for(var i=0;ithis.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*this.RESIZE_MULTIPLIER),this.DEFAULT_CAPACITY),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},d.prototype._refreshViews=function(){for(var t=0;t=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)},r.bezier=function(t,e,r,i){var a=new n(t,e,r,i);return function(t){return a.solve(t)}},r.ease=r.bezier(.25,.1,.25,1),r.clamp=function(t,e,r){return Math.min(r,Math.max(e,t))},r.wrap=function(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i},r.coalesce=function(){for(var t=0;t=0)return!0;return!1};var o={};r.warnOnce=function(t){o[t]||("undefined"!=typeof console&&console.warn(t),o[t]=!0)}},{"../geo/coordinate":327,unitbezier:531}],432:[function(t,e,r){"use strict";function n(t,e,r,n){this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&&(this.id=t.id)}e.exports=n,n.prototype={type:"Feature",get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},set geometry(t){this._geometry=t},toJSON:function(){var t={};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&"toJSON"!==e&&(t[e]=this[e]);return t}}},{}],433:[function(t,e,r){e.exports={_args:[[{raw:"mapbox-gl@^0.22.0",scope:null,escapedName:"mapbox-gl",name:"mapbox-gl",rawSpec:"^0.22.0",spec:">=0.22.0 <0.23.0",type:"range"},"/Users/robert/repos/plotly/plotly.js"]],_from:"mapbox-gl@>=0.22.0 <0.23.0",_id:"mapbox-gl@0.22.1",_inCache:!0,_location:"/mapbox-gl",_nodeVersion:"4.4.5",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/mapbox-gl-0.22.1.tgz_1471549891670_0.8762630566488951"},_npmUser:{name:"lucaswoj",email:"lucas@lucaswoj.com"},_npmVersion:"2.15.5",_phantomChildren:{},_requested:{raw:"mapbox-gl@^0.22.0",scope:null,escapedName:"mapbox-gl",name:"mapbox-gl",rawSpec:"^0.22.0",spec:">=0.22.0 <0.23.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz",_shasum:"92a965547d4c2f24c22cbc487eeda48694cb627a",_shrinkwrap:null,_spec:"mapbox-gl@^0.22.0",_where:"/Users/robert/repos/plotly/plotly.js",browser:{"./js/util/ajax.js":"./js/util/browser/ajax.js","./js/util/browser.js":"./js/util/browser/browser.js","./js/util/canvas.js":"./js/util/browser/canvas.js","./js/util/dom.js":"./js/util/browser/dom.js","./js/util/web_worker.js":"./js/util/browser/web_worker.js"},bugs:{url:"https://github.com/mapbox/mapbox-gl-js/issues"},dependencies:{csscolorparser:"^1.0.2",earcut:"^2.0.3","feature-filter":"^2.2.0","geojson-rewind":"^0.1.0","geojson-vt":"^2.4.0","gl-matrix":"^2.3.1","grid-index":"^1.0.0","mapbox-gl-function":"^1.2.1","mapbox-gl-shaders":"github:mapbox/mapbox-gl-shaders#de2ab007455aa2587c552694c68583f94c9f2747","mapbox-gl-style-spec":"github:mapbox/mapbox-gl-style-spec#83b1a3e5837d785af582efd5ed1a212f2df6a4ae","mapbox-gl-supported":"^1.2.0",pbf:"^1.3.2",pngjs:"^2.2.0","point-geometry":"^0.0.0",quickselect:"^1.0.0",request:"^2.39.0","resolve-url":"^0.2.1","shelf-pack":"^1.0.0",supercluster:"^2.0.1",unassertify:"^2.0.0",unitbezier:"^0.0.0","vector-tile":"^1.3.0","vt-pbf":"^2.0.2",webworkify:"^1.3.0","whoots-js":"^2.0.0"},description:"A WebGL interactive maps library",devDependencies:{"babel-preset-react":"^6.11.1",babelify:"^7.3.0",benchmark:"~2.1.0",browserify:"^13.0.0",clipboard:"^1.5.12","concat-stream":"1.5.1",coveralls:"^2.11.8",doctrine:"^1.2.1",documentation:"https://github.com/documentationjs/documentation/archive/bb41619c734e59ef3fbc3648610032efcfdaaace.tar.gz","documentation-theme-utils":"3.0.0",envify:"^3.4.0",eslint:"^2.5.3","eslint-config-mourner":"^2.0.0","eslint-plugin-html":"^1.5.1",gl:"^4.0.1",handlebars:"4.0.5","highlight.js":"9.3.0",istanbul:"^0.4.2","json-loader":"^0.5.4",lodash:"^4.13.1","mapbox-gl-test-suite":"github:mapbox/mapbox-gl-test-suite#7babab52fb02788ebbc38384139bf350e8e38552","memory-fs":"^0.3.0",minifyify:"^7.0.1","npm-run-all":"^3.0.0",nyc:"6.4.0",proxyquire:"^1.7.9",remark:"4.2.2","remark-html":"3.0.0",sinon:"^1.15.4",st:"^1.2.0",tap:"^5.7.0","transform-loader":"^0.2.3","unist-util-visit":"1.1.0",vinyl:"1.1.1","vinyl-fs":"2.4.3",watchify:"^3.7.0",webpack:"^1.13.1","webworkify-webpack":"^1.1.3"},directories:{},dist:{shasum:"92a965547d4c2f24c22cbc487eeda48694cb627a",tarball:"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz"},engines:{node:">=4.0.0"},gitHead:"13a9015341f0602ccb55c98c53079838ad4b70b5",homepage:"https://github.com/mapbox/mapbox-gl-js#readme",license:"BSD-3-Clause",main:"js/mapbox-gl.js",maintainers:[{name:"aaronlidman",email:"aaronlidman@gmail.com"},{name:"ajashton",email:"aj.ashton@gmail.com"},{name:"ansis",email:"ansis.brammanis@gmail.com"},{name:"bergwerkgis",email:"wb@bergwerk-gis.at"},{name:"bhousel",email:"bryan@mapbox.com"},{name:"bsudekum",email:"bobby@mapbox.com"},{name:"camilleanne",email:"camille@mapbox.com"},{name:"dnomadb",email:"damon@mapbox.com"},{name:"dthompson",email:"dthompson@gmail.com"},{name:"emilymcafee",email:"emily@mapbox.com"},{name:"flippmoke",email:"flippmoke@gmail.com"},{name:"freenerd",email:"spam@freenerd.de"},{name:"gretacb",email:"carol@mapbox.com"},{name:"ian29",email:"ian.villeda@gmail.com"},{name:"ianshward",email:"ian@mapbox.com"},{name:"ingalls",email:"nicholas.ingalls@gmail.com"},{name:"jfirebaugh",email:"john.firebaugh@gmail.com"},{name:"jrpruit1",email:"jake@jakepruitt.com"},{name:"karenzshea",email:"karen@mapbox.com"},{name:"kkaefer",email:"kkaefer@gmail.com"},{name:"lbud",email:"lauren@mapbox.com"},{name:"lucaswoj",email:"lucas@lucaswoj.com"},{name:"lxbarth",email:"alex@mapbox.com"},{name:"lyzidiamond",email:"lyzi@mapbox.com"},{name:"mapbox-admin",email:"accounts@mapbox.com"},{name:"mateov",email:"matt@mapbox.com"},{name:"mcwhittemore",email:"mcwhittemore@gmail.com"},{name:"miccolis",email:"jeff@miccolis.net"},{name:"mikemorris",email:"michael.patrick.morris@gmail.com"},{name:"morganherlocker",email:"morgan.herlocker@gmail.com"},{name:"mourner",email:"agafonkin@gmail.com"},{name:"nickidlugash",email:"nicki@mapbox.com"},{name:"rclark",email:"ryan.clark.j@gmail.com"},{name:"samanbb",email:"saman@mapbox.com"},{name:"sbma44",email:"tlee@mapbox.com"},{name:"scothis",email:"scothis@gmail.com"},{name:"sgillies",email:"sean@mapbox.com"},{name:"springmeyer",email:"dane@mapbox.com"},{name:"themarex",email:"patrick@mapbox.com"},{name:"tmcw",email:"tom@macwright.org"},{name:"tristen",email:"tristen.brown@gmail.com"},{name:"willwhite",email:"will@mapbox.com"},{name:"yhahn",email:"young@mapbox.com"}],name:"mapbox-gl",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/mapbox/mapbox-gl-js.git"},scripts:{build:"npm run build-docs # invoked by publisher when publishing docs on the mb-pages branch","build-dev":"browserify js/mapbox-gl.js --debug --standalone mapboxgl > dist/mapbox-gl-dev.js && tap --no-coverage test/build/dev.test.js","build-docs":"documentation build --github --format html -c documentation.yml --theme ./docs/_theme --output docs/api/","build-min":"browserify js/mapbox-gl.js --debug -t unassertify --plugin [minifyify --map mapbox-gl.js.map --output dist/mapbox-gl.js.map] --standalone mapboxgl > dist/mapbox-gl.js && tap --no-coverage test/build/min.test.js","build-token":"browserify debug/access-token-src.js --debug -t envify > debug/access-token.js",lint:"eslint --ignore-path .gitignore js test bench docs/_posts/examples/*.html","open-changed-examples":"git diff --name-only mb-pages HEAD -- docs/_posts/examples/*.html | awk '{print \"http://127.0.0.1:4000/mapbox-gl-js/example/\" substr($0,33,length($0)-37)}' | xargs open",start:"run-p build-token watch-dev watch-bench start-server","start-bench":"run-p build-token watch-bench start-server","start-debug":"run-p build-token watch-dev start-server","start-docs":"npm run build-min && npm run build-docs && jekyll serve -w","start-server":"st --no-cache --localhost --port 9966 --index index.html .",test:"npm run lint && tap --reporter dot test/js/*/*.js test/build/webpack.test.js","test-suite":"node test/render.test.js && node test/query.test.js","watch-bench":"node bench/download-data.js && watchify bench/index.js --plugin [minifyify --no-map] -t [babelify --presets react] -t unassertify -t envify -o bench/bench.js -v","watch-dev":"watchify js/mapbox-gl.js --debug --standalone mapboxgl -o dist/mapbox-gl-dev.js -v"},version:"0.22.1"}},{}],434:[function(t,e,r){"use strict";function n(t,e,r){for(var n=new Array(t),i=0;ig[1][2]&&(b[0]=-b[0]),g[0][2]>g[2][0]&&(b[1]=-b[1]),g[1][0]>g[0][1]&&(b[2]=-b[2]),!0}},{"./normalize":436,"gl-mat4/clone":166,"gl-mat4/create":167,"gl-mat4/determinant":168,"gl-mat4/invert":172,"gl-mat4/transpose":182,"gl-vec3/cross":263,"gl-vec3/dot":264,"gl-vec3/length":265,"gl-vec3/normalize":267}],436:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],437:[function(t,e,r){function n(t,e,r,n){if(0===c(e)||0===c(r))return!1;var i=u(e,f.translate,f.scale,f.skew,f.perspective,f.quaternion),a=u(r,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!(!i||!a)&&(s(p.translate,f.translate,d.translate,n),s(p.skew,f.skew,d.skew,n),s(p.scale,f.scale,d.scale,n),s(p.perspective,f.perspective,d.perspective,n),h(p.quaternion,f.quaternion,d.quaternion,n),l(t,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function i(){return{translate:a(),scale:a(1),skew:a(),perspective:o(),quaternion:o()}}function a(t){return[t||0,t||0,t||0]}function o(){return[0,0,0,1]}var s=t("gl-vec3/lerp"),l=t("mat4-recompose"),u=t("mat4-decompose"),c=t("gl-mat4/determinant"),h=t("quat-slerp"),f=i(),d=i(),p=i();e.exports=n},{"gl-mat4/determinant":168,"gl-vec3/lerp":266,"mat4-decompose":435,"mat4-recompose":438,"quat-slerp":477}],438:[function(t,e,r){var n={identity:t("gl-mat4/identity"),translate:t("gl-mat4/translate"),multiply:t("gl-mat4/multiply"),create:t("gl-mat4/create"),scale:t("gl-mat4/scale"),fromRotationTranslation:t("gl-mat4/fromRotationTranslation")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{"gl-mat4/create":167,"gl-mat4/fromRotationTranslation":170,"gl-mat4/identity":171,"gl-mat4/multiply":174,"gl-mat4/scale":180,"gl-mat4/translate":181}],439:[function(t,e,r){"use strict";function n(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}function i(t){return t=t||{},new n(t.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}var a=t("binary-search-bounds"),o=t("mat4-interpolate"),s=t("gl-mat4/invert"),l=t("gl-mat4/rotateX"),u=t("gl-mat4/rotateY"),c=t("gl-mat4/rotateZ"),h=t("gl-mat4/lookAt"),f=t("gl-mat4/translate"),d=(t("gl-mat4/scale"),t("gl-vec3/normalize")),p=[0,0,0];e.exports=i;var m=n.prototype;m.recalcMatrix=function(t){var e=this._time,r=a.le(e,t),n=this.computedMatrix;if(!(r<0)){var i=this._components;if(r===e.length-1)for(var l=16*r,u=0;u<16;++u)n[u]=i[l++];else{for(var c=e[r+1]-e[r],l=16*r,h=this.prevMatrix,f=!0,u=0;u<16;++u)h[u]=i[l++];for(var p=this.nextMatrix,u=0;u<16;++u)p[u]=i[l++],f=f&&h[u]===p[u];if(c<1e-6||f)for(var u=0;u<16;++u)n[u]=h[u];else o(n,h,p,(t-e[r])/c)}var m=this.computedUp;m[0]=n[1],m[1]=n[5],m[2]=n[9],d(m,m);var g=this.computedInverse;s(g,n);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;for(var b=this.computedCenter,x=Math.exp(this.computedRadius[0]),u=0;u<3;++u)b[u]=v[u]-n[2+4*u]*x}},m.idle=function(t){if(!(t1&&i(t[o[c-2]],t[o[c-1]],u)<=0;)c-=1,o.pop();for(o.push(l),c=s.length;c>1&&i(t[s[c-2]],t[s[c-1]],u)>=0;)c-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),h=0,n=0,f=o.length;n0;--d)r[h++]=s[d];return r}e.exports=n;var i=t("robust-orientation")[3]},{"robust-orientation":496}],441:[function(t,e,r){"use strict";function n(t,e){function r(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==g.alt,g.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==g.shift,g.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==g.control,g.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==g.meta,g.meta=!!t.metaKey),e}function n(t,n){var a=i.x(n),o=i.y(n);"buttons"in n&&(t=0|n.buttons),(t!==d||a!==p||o!==m||r(n))&&(d=0|t,p=a||0,m=o||0,e&&e(d,p,m,g))}function a(t){n(0,t)}function o(){(d||p||m||g.shift||g.alt||g.meta||g.control)&&(p=m=0,d=0,g.shift=g.alt=g.control=g.meta=!1,e&&e(0,0,0,g))}function s(t){r(t)&&e&&e(d,p,m,g)}function l(t){0===i.buttons(t)?n(0,t):n(d,t)}function u(t){n(d|i.buttons(t),t)}function c(t){n(d&~i.buttons(t),t)}function h(){v||(v=!0,t.addEventListener("mousemove",l),t.addEventListener("mousedown",u),t.addEventListener("mouseup",c),t.addEventListener("mouseleave",a),t.addEventListener("mouseenter",a),t.addEventListener("mouseout",a),t.addEventListener("mouseover",a),t.addEventListener("blur",o),t.addEventListener("keyup",s),t.addEventListener("keydown",s),t.addEventListener("keypress",s),t!==window&&(window.addEventListener("blur",o),window.addEventListener("keyup",s),window.addEventListener("keydown",s),window.addEventListener("keypress",s)))}function f(){v&&(v=!1,t.removeEventListener("mousemove",l),t.removeEventListener("mousedown",u),t.removeEventListener("mouseup",c),t.removeEventListener("mouseleave",a),t.removeEventListener("mouseenter",a),t.removeEventListener("mouseout",a),t.removeEventListener("mouseover",a),t.removeEventListener("blur",o),t.removeEventListener("keyup",s),t.removeEventListener("keydown",s),t.removeEventListener("keypress",s),t!==window&&(window.removeEventListener("blur",o),window.removeEventListener("keyup",s),window.removeEventListener("keydown",s),window.removeEventListener("keypress",s)))}e||(e=t,t=window);var d=0,p=0,m=0,g={shift:!1,alt:!1,control:!1,meta:!1},v=!1;h();var y={element:t};return Object.defineProperties(y,{enabled:{get:function(){return v},set:function(t){t?h():f()},enumerable:!0},buttons:{get:function(){return d},enumerable:!0},x:{get:function(){return p},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return g},enumerable:!0}}),y}e.exports=n;var i=t("mouse-event")},{"mouse-event":443}],442:[function(t,e,r){function n(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var n=t.clientX||0,a=t.clientY||0,o=i(e);return r[0]=n-o.left,r[1]=a-o.top,r}function i(t){return t===window||t===document||t===document.body?a:t.getBoundingClientRect()}var a={left:0,top:0};e.exports=n},{}],443:[function(t,e,r){"use strict";function n(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){var e=t.which;if(2===e)return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<=0;--e)L(e,0);for(var r=[],e=0;e0;_=_-1&m)x.push(w+"["+T+"+"+g(_)+"]");x.push(v(0));for(var _=0;_0){",f(x[t]),"=1;"),P(t-1,e|1<0&&Y.push(s(U,x[V-1])+"*"+o(x[V-1])),N.push(d(U,x[V])+"=("+Y.join("-")+")|0")}for(var U=0;U=0;--U)G.push(o(x[U]));N.push(A+"=("+G.join("*")+")|0",M+"=mallocUint32("+A+")",w+"=mallocUint32("+A+")",T+"=0"),N.push(p(0)+"=0");for(var V=1;V<1< 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var a=t.getters||[],o=new Array(n),s=0;s=0?o[s]=!0:o[s]=!1;return b(t.vertex,t.cell,t.phase,i,r,o)}var _=t("typedarray-pool");e.exports=x;var w="V",M="P",k="N",A="Q",T="X",S="T"},{"typedarray-pool":528}],446:[function(t,e,r){"use strict";var n=t("cwise/lib/wrapper")({args:["index","array","scalar"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_1_arg1_=_inline_1_arg2_.apply(void 0,_inline_1_arg0_)}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"cwise",blockSize:64});e.exports=function(t,e){return n(t,e),t}},{"cwise/lib/wrapper":105}],447:[function(t,e,r){"use strict";function n(t){if(t in l)return l[t];for(var e=[],r=0;r=0?s.push("0"):e.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),n.push("1"),o.push("s["+l+"]-2"));var u=".lo("+n.join()+").hi("+o.join()+")";if(0===n.length&&(u=""),r>0){a.push("if(1");for(var l=0;l=0||e.indexOf(-(l+1))>=0||a.push("&&s[",l,"]>2");a.push("){grad",r,"(src.pick(",s.join(),")",u);for(var l=0;l=0||e.indexOf(-(l+1))>=0||a.push(",dst.pick(",s.join(),",",l,")",u);a.push(");")}for(var l=0;l1){dst.set(",s.join(),",",c,",0.5*(src.get(",f.join(),")-src.get(",d.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):a.push("if(s[",c,"]>1){diff(",h,",src.pick(",f.join(),")",u,",src.pick(",d.join(),")",u,");}else{zero(",h,");};");break;case"mirror":0===r?a.push("dst.set(",s.join(),",",c,",0);"):a.push("zero(",h,");");break;case"wrap":var p=s.slice(),m=s.slice();e[l]<0?(p[c]="s["+c+"]-2",m[c]="0"):(p[c]="s["+c+"]-1",m[c]="1"),0===r?a.push("if(s[",c,"]>2){dst.set(",s.join(),",",c,",0.5*(src.get(",p.join(),")-src.get(",m.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):a.push("if(s[",c,"]>2){diff(",h,",src.pick(",p.join(),")",u,",src.pick(",m.join(),")",u,");}else{zero(",h,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}r>0&&a.push("};")}(p)}}a.push("return dst;};return gradient");for(var m=["diff","zero"],g=[h,f],o=1;o<=i;++o)m.push("grad"+o),g.push(n(o));m.push(a.join(""));var v=Function.apply(void 0,m),r=v.apply(void 0,g);return l[e]=r,r}function a(t,e,r){if(Array.isArray(r)){if(r.length!==e.dimension)throw new Error("ndarray-gradient: invalid boundary conditions")}else r="string"==typeof r?o(e.dimension,r):o(e.dimension,"clamp");if(t.dimension!==e.dimension+1)throw new Error("ndarray-gradient: output dimension must be +1 input dimension");if(t.shape[e.dimension]!==e.dimension)throw new Error("ndarray-gradient: output shape must match input shape");for(var n=0;n>",rrshift:">>>"};!function(){for(var t in l){var e=l[t];r[t]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a"+e+"=b"},rvalue:!0,funcName:t+"eq"}),r[t+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a"+e+"=s"},rvalue:!0,funcName:t+"seq"})}}();var u={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in u){var e=u[t];r[t]=a({args:["array","array"],body:{args:["a","b"],body:"a="+e+"b"},funcName:t}),r[t+"eq"]=a({args:["array"],body:{args:["a"],body:"a="+e+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in c){var e=c[t];r[t]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a=a"+e+"b"},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+e+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var h=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=o({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=o({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=a({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=a({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=a({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=o({args:["array","array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":102}],451:[function(t,e,r){"use strict";var n=t("ndarray"),i=t("./doConvert.js");e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{"./doConvert.js":452,ndarray:456}],452:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":102}],453:[function(t,e,r){"use strict";function n(t){switch(t){case"uint8":return[l.mallocUint8,l.freeUint8];case"uint16":return[l.mallocUint16,l.freeUint16];case"uint32":return[l.mallocUint32,l.freeUint32];case"int8":return[l.mallocInt8,l.freeInt8];case"int16":return[l.mallocInt16,l.freeInt16];case"int32":return[l.mallocInt32,l.freeInt32];case"float32":return[l.mallocFloat,l.freeFloat];case"float64":return[l.mallocDouble,l.freeDouble];default:return null}}function i(t){for(var e=[],r=0;r1){for(var h=[],f=1;f1){o.push("dptr=0;sptr=ptr");for(var f=t.length-1;f>=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"b){break __l}"].join(""));for(var f=t.length-1;f>=1;--f)o.push("sptr+=e"+f,"dptr+=f"+f,"}");o.push("dptr=cptr;sptr=cptr-s0");for(var f=t.length-1;f>=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"scratch)){",a("cptr",r("cptr-s0")),"cptr-=s0","}",a("cptr","scratch"));if(o.push("}"),t.length>1&&u&&o.push("free(scratch)"),o.push("} return "+s),u){var p=new Function("malloc","free",o.join("\n"));return p(u[0],u[1])}var p=new Function(o.join("\n"));return p()}function o(t,e,r){function a(t){return["(offset+",t,"*s0)"].join("")}function o(t){return"generic"===e?["data.get(",t,")"].join(""):["data[",t,"]"].join("")}function s(t,r){return"generic"===e?["data.set(",t,",",r,")"].join(""):["data[",t,"]=",r].join("")}function l(e,r,n){if(1===e.length)_.push("ptr0="+a(e[0]));else for(var i=0;i=0;--i){var o=t[i];0!==o&&_.push(["for(i",o,"=0;i",o,"1)for(var i=0;i1?_.push("ptr_shift+=d"+o):_.push("ptr0+=d"+o),_.push("}"))}}function c(e,r,n,i){if(1===r.length)_.push("ptr0="+a(r[0]));else{for(var o=0;o1)for(var o=0;o=1;--o)n&&_.push("pivot_ptr+=f"+o),r.length>1?_.push("ptr_shift+=e"+o):_.push("ptr0+=e"+o),_.push("}")}function h(){t.length>1&&k&&_.push("free(pivot1)","free(pivot2)")}function f(e,r){var n="el"+e,i="el"+r;if(t.length>1){var s="__l"+ ++A;c(s,[n,i],!1,["comp=",o("ptr0"),"-",o("ptr1"),"\n","if(comp>0){tmp0=",n,";",n,"=",i,";",i,"=tmp0;break ",s,"}\n","if(comp<0){break ",s,"}"].join(""))}else _.push(["if(",o(a(n)),">",o(a(i)),"){tmp0=",n,";",n,"=",i,";",i,"=tmp0}"].join(""))}function d(e,r){t.length>1?l([e,r],!1,s("ptr0",o("ptr1"))):_.push(s(a(e),o(a(r))))}function p(e,r,n){if(t.length>1){var i="__l"+ ++A;c(i,[r],!0,[e,"=",o("ptr0"),"-pivot",n,"[pivot_ptr]\n","if(",e,"!==0){break ",i,"}"].join(""))}else _.push([e,"=",o(a(r)),"-pivot",n].join(""))}function m(e,r){t.length>1?l([e,r],!1,["tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1","tmp")].join("")):_.push(["ptr0=",a(e),"\n","ptr1=",a(r),"\n","tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1","tmp")].join(""))}function g(e,r,n){t.length>1?(l([e,r,n],!1,["tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1",o("ptr2")),"\n",s("ptr2","tmp")].join("")),_.push("++"+r,"--"+n)):_.push(["ptr0=",a(e),"\n","ptr1=",a(r),"\n","ptr2=",a(n),"\n","++",r,"\n","--",n,"\n","tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1",o("ptr2")),"\n",s("ptr2","tmp")].join(""))}function v(t,e){m(t,e),_.push("--"+e)}function y(e,r,n){t.length>1?l([e,r],!0,[s("ptr0",o("ptr1")),"\n",s("ptr1",["pivot",n,"[pivot_ptr]"].join(""))].join("")):_.push(s(a(e),o(a(r))),s(a(r),"pivot"+n))}function b(e,r){_.push(["if((",r,"-",e,")<=",u,"){\n","insertionSort(",e,",",r,",data,offset,",i(t.length).join(","),")\n","}else{\n",w,"(",e,",",r,",data,offset,",i(t.length).join(","),")\n","}"].join(""))}function x(e,r,n){t.length>1?(_.push(["__l",++A,":while(true){"].join("")),l([e],!0,["if(",o("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",A,"}"].join("")),_.push(n,"}")):_.push(["while(",o(a(e)),"===pivot",r,"){",n,"}"].join(""))}var _=["'use strict'"],w=["ndarrayQuickSort",t.join("d"),e].join(""),M=["left","right","data","offset"].concat(i(t.length)),k=n(e),A=0;_.push(["function ",w,"(",M.join(","),"){"].join(""));var T=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(t.length>1){for(var S=[],E=1;E1?l(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",o("ptr1"),"\n","pivot2[pivot_ptr]=",o("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",o("ptr0"),"\n","y=",o("ptr2"),"\n","z=",o("ptr4"),"\n",s("ptr5","x"),"\n",s("ptr6","y"),"\n",s("ptr7","z")].join("")):_.push(["pivot1=",o(a("el2")),"\n","pivot2=",o(a("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",o(a("el1")),"\n","y=",o(a("el3")),"\n","z=",o(a("el5")),"\n",s(a("index1"),"x"),"\n",s(a("index3"),"y"),"\n",s(a("index5"),"z")].join("")),d("index2","left"),d("index4","right"),_.push("if(pivots_are_equal){"),_.push("for(k=less;k<=great;++k){"),p("comp","k",1),_.push("if(comp===0){continue}"),_.push("if(comp<0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),_.push("while(true){"),p("comp","great",1),_.push("if(comp>0){"),_.push("great--"),_.push("}else if(comp<0){"),g("k","less","great"),_.push("break"),_.push("}else{"),v("k","great"),_.push("break"),_.push("}"),_.push("}"),_.push("}"),_.push("}"),_.push("}else{"),_.push("for(k=less;k<=great;++k){"),p("comp_pivot1","k",1),_.push("if(comp_pivot1<0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),p("comp_pivot2","k",2),_.push("if(comp_pivot2>0){"),_.push("while(true){"),p("comp","great",2),_.push("if(comp>0){"),_.push("if(--greatindex5){"),x("less",1,"++less"),x("great",2,"--great"),_.push("for(k=less;k<=great;++k){"),p("comp_pivot1","k",1),_.push("if(comp_pivot1===0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),p("comp_pivot2","k",2),_.push("if(comp_pivot2===0){"),_.push("while(true){"),p("comp","great",2),_.push("if(comp===0){"),_.push("if(--great1&&k){var L=new Function("insertionSort","malloc","free",_.join("\n"));return L(r,k[0],k[1])}var L=new Function("insertionSort",_.join("\n"));return L(r)}function s(t,e){var r=["'use strict'"],n=["ndarraySortWrapper",t.join("d"),e].join(""),s=["array"];r.push(["function ",n,"(",s.join(","),"){"].join(""));for(var l=["data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride"],c=0;c0?l.push(["d",g,"=s",g,"-d",p,"*n",p].join("")):l.push(["d",g,"=s",g].join("")),p=g);var d=t.length-1-c;0!==d&&(m>0?l.push(["e",d,"=s",d,"-e",m,"*n",m,",f",d,"=",h[d],"-f",m,"*n",m].join("")):l.push(["e",d,"=s",d,",f",d,"=",h[d]].join("")),m=d)}r.push("var "+l.join(","));var v=["0","n0-1","data","offset"].concat(i(t.length));r.push(["if(n0<=",u,"){","insertionSort(",v.join(","),")}else{","quickSort(",v.join(","),")}"].join("")),r.push("}return "+n);var y=new Function("insertionSort","quickSort",r.join("\n")),b=a(t,e);return y(b,o(t,e,b))}var l=t("typedarray-pool"),u=32;e.exports=s},{"typedarray-pool":528}],454:[function(t,e,r){"use strict";function n(t){var e=t.order,r=t.dtype,n=[e,r],o=n.join(":"),s=a[o];return s||(a[o]=s=i(e,r)),s(t),t}var i=t("./lib/compile_sort.js"),a={};e.exports=n},{"./lib/compile_sort.js":453}],455:[function(t,e,r){"use strict";var n=t("ndarray-linear-interpolate"),i=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=new Array(_inline_6_arg4_)}",args:[{name:"_inline_6_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_6_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_6_arg2_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_6_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_6_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_.apply(void 0,this_warped)}",args:[{name:"_inline_7_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_7_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg4_",lvalue:!1,rvalue:!1,count:0}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warpND",blockSize:64}),a=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0])}",args:[{name:"_inline_10_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_10_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp1D",blockSize:64}),o=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1])}",args:[{name:"_inline_13_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_13_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp2D",blockSize:64}),s=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_16_arg2_(this_warped,_inline_16_arg0_),_inline_16_arg1_=_inline_16_arg3_(_inline_16_arg4_,this_warped[0],this_warped[1],this_warped[2])}",args:[{name:"_inline_16_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_16_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp3D",blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:a(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:i(t,r,n.bind(void 0,e),e.shape.length)}return t}},{"cwise/lib/wrapper":105,"ndarray-linear-interpolate":449}],456:[function(t,e,r){function n(t,e){return t[0]-e[0]}function i(){var t,e=this.stride,r=new Array(e.length);for(t=0;tMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&a.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):a.push("ORDER})")),a.push("proto.set=function "+r+"_set("+u.join(",")+",v){"),n?a.push("return this.data.set("+c+",v)}"):a.push("return this.data["+c+"]=v}"),a.push("proto.get=function "+r+"_get("+u.join(",")+"){"),n?a.push("return this.data.get("+c+")}"):a.push("return this.data["+c+"]}"),a.push("proto.index=function "+r+"_index(",u.join(),"){return "+c+"}"),a.push("proto.hi=function "+r+"_hi("+u.join(",")+"){return new "+r+"(this.data,"+s.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+s.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var p=s.map(function(t){return"a"+t+"=this.shape["+t+"]"}),m=s.map(function(t){return"c"+t+"=this.stride["+t+"]"});a.push("proto.lo=function "+r+"_lo("+u.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+m.join(","));for(var g=0;g=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");a.push("return new "+r+"(this.data,"+s.map(function(t){return"a"+t}).join(",")+","+s.map(function(t){return"c"+t}).join(",")+",b)}"),a.push("proto.step=function "+r+"_step("+u.join(",")+"){var "+s.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+s.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var g=0;g=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+s.map(function(t){return"shape["+t+"]"}).join(",")+","+s.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}");var o=new Function("CTOR_LIST","ORDER",a.join("\n"));return o(h[t],i)}function o(t){if(u(t))return"buffer";if(c)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(t)?"array":"generic"}function s(t,e,r,n){if(void 0===t){var i=h.array[0];return i([])}"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var s=e.length;if(void 0===r){r=new Array(s);for(var l=s-1,u=1;l>=0;--l)r[l]=u,u*=e[l]}if(void 0===n){n=0;for(var l=0;lt==t>0?n===o?(r+=1,n=0):n+=1:0===n?(n=o,r-=1):n-=1,i.pack(n,r)}var i=t("double-bits"),a=Math.pow(2,-1074),o=-1>>>0;e.exports=n},{"double-bits":116}],458:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa)for(var x=i[u],_=1/Math.sqrt(g*y),b=0;b<3;++b){var w=(b+1)%3,M=(b+2)%3;x[b]+=_*(v[w]*m[M]-v[M]*m[w])}}for(var o=0;oa)for(var _=1/Math.sqrt(k),b=0;b<3;++b)x[b]*=_;else for(var b=0;b<3;++b)x[b]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(d):0;for(var u=0;u<3;++u)f[u]*=d;i[o]=f}return i}},{}],459:[function(t,e,r){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,l=n(t),u=1;u0){var h=Math.sqrt(c+1);t[0]=.5*(o-l)/h,t[1]=.5*(s-n)/h,t[2]=.5*(r-a)/h,t[3]=.5*h}else{var f=Math.max(e,a,u),h=Math.sqrt(2*f-c+1);e>=f?(t[0]=.5*h,t[1]=.5*(i+r)/h,t[2]=.5*(s+n)/h,t[3]=.5*(o-l)/h):a>=f?(t[0]=.5*(r+i)/h,t[1]=.5*h,t[2]=.5*(l+o)/h,t[3]=.5*(s-n)/h):(t[0]=.5*(n+s)/h,t[1]=.5*(o+l)/h,t[2]=.5*h,t[3]=.5*(r-i)/h)}return t}e.exports=n},{}],461:[function(t,e,r){"use strict";function n(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function i(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function a(t,e){var r=e[0],n=e[1],a=e[2],o=e[3],s=i(r,n,a,o);s>1e-6?(t[0]=r/s,t[1]=n/s,t[2]=a/s,t[3]=o/s):(t[0]=t[1]=t[2]=0,t[3]=1)}function o(t,e,r){this.radius=l([r]),this.center=l(e),this.rotation=l(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}function s(t){t=t||{};var e=t.center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),r=[].slice.call(r,0,4),a(r,r);var i=new o(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i}e.exports=s;var l=t("filtered-vector"),u=t("gl-mat4/lookAt"),c=t("gl-mat4/fromQuat"),h=t("gl-mat4/invert"),f=t("./lib/quatFromFrame"),d=o.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;a(e,e);var r=this.computedMatrix;c(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var u=0,h=0;h<3;++h)u+=r[l+4*h]*i[h];r[12+l]=-u}},d.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},d.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},d.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},d.pan=function(t,e,r,i){e=e||0,r=r||0,i=i||0,this.recalcMatrix(t);var a=this.computedMatrix,o=a[1],s=a[5],l=a[9],u=n(o,s,l);o/=u,s/=u,l/=u;var c=a[0],h=a[4],f=a[8],d=c*o+h*s+f*l;c-=o*d,h-=s*d,f-=l*d;var p=n(c,h,f);c/=p,h/=p,f/=p;var m=a[2],g=a[6],v=a[10],y=m*o+g*s+v*l,b=m*c+g*h+v*f;m-=y*o+b*c,g-=y*s+b*h,v-=y*l+b*f;var x=n(m,g,v);m/=x,g/=x,v/=x;var _=c*e+o*r,w=h*e+s*r,M=f*e+l*r;this.center.move(t,_,w,M);var k=Math.exp(this.computedRadius[0]);k=Math.max(1e-4,k+i),this.radius.set(t,Math.log(k))},d.rotate=function(t,e,r,a){this.recalcMatrix(t),e=e||0,r=r||0;var o=this.computedMatrix,s=o[0],l=o[4],u=o[8],c=o[1],h=o[5],f=o[9],d=o[2],p=o[6],m=o[10],g=e*s+r*c,v=e*l+r*h,y=e*u+r*f,b=-(p*y-m*v),x=-(m*g-d*y),_=-(d*v-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(b,2)-Math.pow(x,2)-Math.pow(_,2))),M=i(b,x,_,w);M>1e-6?(b/=M,x/=M,_/=M,w/=M):(b=x=_=0,w=1);var k=this.computedRotation,A=k[0],T=k[1],S=k[2],E=k[3],L=A*w+E*b+T*_-S*x,C=T*w+E*x+S*b-A*_,z=S*w+E*_+A*x-T*b,D=E*w-A*b-T*x-S*_;if(a){b=d,x=p,_=m;var I=Math.sin(a)/n(b,x,_);b*=I,x*=I,_*=I,w=Math.cos(e),L=L*w+D*b+C*_-z*x,C=C*w+D*x+z*b-L*_,z=z*w+D*_+L*x-C*b,D=D*w-L*b-C*x-z*_}var P=i(L,C,z,D);P>1e-6?(L/=P,C/=P,z/=P,D/=P):(L=C=z=0,D=1),this.rotation.set(t,L,C,z,D)},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var i=this.computedMatrix;u(i,e,r,n);var o=this.computedRotation;f(o,i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10]),a(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var s=0,l=0;l<3;++l)s+=Math.pow(r[l]-e[l],2);this.radius.set(t,.5*Math.log(Math.max(s,1e-6))),this.center.set(t,r[0],r[1],r[2])},d.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},d.setMatrix=function(t,e){var r=this.computedRotation;f(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),a(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;h(n,e);var i=n[15];if(Math.abs(i)>1e-6){var o=n[12]/i,s=n[13]/i,l=n[14]/i;this.recalcMatrix(t);var u=Math.exp(this.computedRadius[0]);this.center.set(t,o-n[2]*u,s-n[6]*u,l-n[10]*u),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},d.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},d.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},d.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},d.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},d.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{"./lib/quatFromFrame":460,"filtered-vector":125,"gl-mat4/fromQuat":169,"gl-mat4/invert":172,"gl-mat4/lookAt":173}],462:[function(t,e,r){"use strict";var n=t("repeat-string");e.exports=function(t,e,r){return r=void 0!==r?r+"":" ",n(r,e)+t}},{"repeat-string":488}],463:[function(t,e,r){e.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},{}],464:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,i="/"===o.charAt(0))}return r=e(n(r.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(t){var i=r.isAbsolute(t),a="/"===o(t,-1);return t=e(n(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),a=n(e.split("/")),o=Math.min(i.length,a.length),s=o,l=0;l55295&&e<57344){if(!r){e>56319||a+1===n?i.push(239,191,189):r=e;continue}if(e<56320){i.push(239,191,189),r=e;continue}e=r-55296<<10|e-56320|65536,r=null}else r&&(i.push(239,191,189),r=null);e<128?i.push(e):e<2048?i.push(e>>6|192,63&e|128):e<65536?i.push(e>>12|224,e>>6&63|128,63&e|128):i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}return i}e.exports=n;var a,o,s,l=t("ieee754");a={readUInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},writeUInt32LE:function(t,e){this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24},readInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+(this[t+3]<<24)},readFloatLE:function(t){return l.read(this,t,!0,23,4)},readDoubleLE:function(t){return l.read(this,t,!0,52,8)},writeFloatLE:function(t,e){return l.write(this,t,e,!0,23,4)},writeDoubleLE:function(t,e){return l.write(this,t,e,!0,52,8)},toString:function(t,e,r){var n="",i="";e=e||0,r=Math.min(this.length,r||this.length);for(var a=e;a=1;){if(e.pos>=r)throw new Error("Given varint doesn't fit into 10 bytes");var n=255&t;e.buf[e.pos++]=n|(t>=128?128:0),t/=128}}function o(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function s(t,e){for(var r=0;r>3,a=this.pos;t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=this.buf.readUInt32LE(this.pos);return this.pos+=4,t},readSFixed32:function(){var t=this.buf.readInt32LE(this.pos);return this.pos+=4,t},readFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+4294967296*this.buf.readUInt32LE(this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+4294967296*this.buf.readInt32LE(this.pos+4);return this.pos+=8,t},readFloat:function(){var t=this.buf.readFloatLE(this.pos);return this.pos+=4,t},readDouble:function(){var t=this.buf.readDoubleLE(this.pos);return this.pos+=8,t},readVarint:function(){var t,e,r=this.buf;return e=r[this.pos++],t=127&e,e<128?t:(e=r[this.pos++],t|=(127&e)<<7,e<128?t:(e=r[this.pos++],t|=(127&e)<<14,e<128?t:(e=r[this.pos++],t|=(127&e)<<21,e<128?t:i(t,this))))},readVarint64:function(){var t=this.pos,e=this.readVarint();if(e127;);else if(e===n.Bytes)this.pos=this.readVarint()+this.pos;else if(e===n.Fixed32)this.pos+=4;else{if(e!==n.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455)return void a(t,this);this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127)))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t);var e=g.byteLength(t);this.writeVarint(e),this.realloc(e),this.buf.write(t,this.pos),this.pos+=e},writeFloat:function(t){this.realloc(4),this.buf.writeFloatLE(t,this.pos),this.pos+=4},writeDouble:function(t){this.realloc(8),this.buf.writeDoubleLE(t,this.pos),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&o(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,n.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,s,e)},writePackedSVarint:function(t,e){this.writeMessage(t,l,e)},writePackedBoolean:function(t,e){this.writeMessage(t,h,e)},writePackedFloat:function(t,e){this.writeMessage(t,u,e)},writePackedDouble:function(t,e){this.writeMessage(t,c,e)},writePackedFixed32:function(t,e){this.writeMessage(t,f,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,d,e)},writePackedFixed64:function(t,e){this.writeMessage(t,p,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,n.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,n.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,n.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,n.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./buffer":465}],467:[function(t,e,r){"use strict";function n(t){var e=t.length;if(e0;--i)n=l[i],r=s[i],s[i]=s[n],s[n]=r,l[i]=l[r],l[r]=n,u=(u+r)*i;return a.freeUint32(l),a.freeUint32(s),u}function i(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}r=r||new Array(t);var n,i,a,o=1;for(r[0]=0,a=1;a0;--a)n=e/o|0,e=e-n*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}var a=t("typedarray-pool"),o=t("invert-permutation");r.rank=n,r.unrank=i},{"invert-permutation":282,"typedarray-pool":528}],469:[function(t,e,r){"use strict";function n(t,e){function r(t,e){var r=s[e][t[e]];r.splice(r.indexOf(t),1)}function n(t,n,a){for(var o,l,u,c=0;c<2;++c)if(s[c][n].length>0){o=s[c][n][0],u=c;break}l=o[1^u];for(var h=0;h<2;++h)for(var f=s[h][n],d=0;d0&&(o=p,l=m,u=h)}return a?l:(o&&r(o,u),l)}for(var a=0|e.length,o=t.length,s=[new Array(a),new Array(a)],l=0;l0;){var d=(s[0][l].length,function(t,a){var o=s[a][t][0],l=[t];r(o,a);for(var u=o[1^a];;){for(;u!==t;)l.push(u),u=n(l[l.length-2],u,!1);if(s[0][t].length+s[1][t].length===0)break;var c=l[l.length-1],h=t,f=l[1],d=n(c,h,!0);if(i(e[c],e[h],e[f],e[d])<0)break;l.push(t),u=n(c,h)}return l}(l,h));!function(t,e){return e[1]===e[e.length-1]}(f,d)?(f.length>0&&c.push(f),f=d):f.push.apply(f,d)}f.length>0&&c.push(f)}return c}e.exports=n;var i=t("compare-angle")},{"compare-angle":92}],470:[function(t,e,r){"use strict";function n(t,e){for(var r=i(t,e.length),n=new Array(e.length),a=new Array(e.length),o=[],s=0;s0;){var u=o.pop();n[u]=!1;for(var c=r[u],s=0;s0}function a(t){for(var e=t.length,r=0;r0;){var U=N.pop(),V=D[U];h(V,function(t,e){return t-e});var q,H=V.length,Y=B[U];if(0===Y){var T=v[U];q=[T]}for(var g=0;g=0)&&(B[G]=1^Y,N.push(G),0===Y)){var T=v[G];a(T)||(T.reverse(),q.push(T))}}0===Y&&d.push(q)}return d}e.exports=a;var o=t("edges-to-adjacency-list"),s=t("planar-dual"),l=t("point-in-big-polygon"),u=t("two-product"),c=t("robust-sum"),h=t("uniq"),f=t("./lib/trim-leaves")},{"./lib/trim-leaves":470,"edges-to-adjacency-list":119,"planar-dual":469,"point-in-big-polygon":473,"robust-sum":501,"two-product":526,uniq:530}],472:[function(t,e,r){"use strict";function n(t,e){this.x=t,this.y=e}e.exports=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{}],473:[function(t,e,r){function n(){return!0}function i(t){return function(e,r){var i=t[e];return!!i&&!!i.queryPoint(r,n)}}function a(t){for(var e={},r=0;r0&&e[n]===r[0]))return 1;i=t[n-1]}for(var a=1;i;){var o=i.key,s=h(r,o[0],o[1]);if(o[0][0]0))return 0;a=-1,i=i.right}else if(s>0)i=i.left;else{if(!(s<0))return 0;a=1,i=i.right}}return a}}function s(t){return 1}function l(t){return function(e){return t(e[0],e[1])?0:1}}function u(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}function c(t){for(var e=t.length,r=[],n=[],i=0;i=u?(x=1,y=u+2*f+p):(x=-f/u,y=f*x+p)):(x=0,d>=0?(_=0,y=p):-d>=h?(_=1,y=h+2*d+p):(_=-d/h,y=d*_+p));else if(_<0)_=0,f>=0?(x=0,y=p):-f>=u?(x=1,y=u+2*f+p):(x=-f/u,y=f*x+p);else{var w=1/b;x*=w,_*=w,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p}else{var M,k,A,T;x<0?(M=c+f,k=h+d,k>M?(A=k-M,T=u-2*c+h,A>=T?(x=1,_=0,y=u+2*f+p):(x=A/T,_=1-x,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)):(x=0,k<=0?(_=1,y=h+2*d+p):d>=0?(_=0,y=p):(_=-d/h,y=d*_+p))):_<0?(M=c+d,k=u+f,k>M?(A=k-M,T=u-2*c+h,A>=T?(_=1,x=0,y=h+2*d+p):(_=A/T,x=1-_,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)):(_=0,k<=0?(x=1,y=u+2*f+p):f>=0?(x=0,y=p):(x=-f/u,y=f*x+p))):(A=h+d-c-f,A<=0?(x=0,_=1,y=h+2*d+p):(T=u-2*c+h,A>=T?(x=1,_=0,y=u+2*f+p):(x=A/T,_=1-x,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)))}for(var S=1-x-_,l=0;l1)for(var r=1;r1&&(n=r[0]+"@",t=r[1]),t=t.replace(I,"."),n+o(t.split("."),e).join(".")}function l(t){for(var e,r,n=[],i=0,a=t.length;i=55296&&e<=56319&&i65535&&(t-=65536,e+=j(t>>>10&1023|55296),t=56320|1023&t),e+=j(t)}).join("")}function c(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:M}function h(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,r){var n=0;for(t=r?R(t/S):t>>1,t+=R(t/e);t>O*A>>1;n+=M)t=R(t/O);return R(n+(O+1)*t/(t+T))}function d(t){var e,r,n,i,o,s,l,h,d,p,m=[],g=t.length,v=0,y=L,b=E;for(r=t.lastIndexOf(C),r<0&&(r=0),n=0;n=128&&a("not-basic"),m.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=g&&a("invalid-input"),h=c(t.charCodeAt(i++)),(h>=M||h>R((w-v)/s))&&a("overflow"),v+=h*s,d=l<=b?k:l>=b+A?A:l-b,!(hR(w/p)&&a("overflow"),s*=p;e=m.length+1,b=f(v-o,e,0==o),R(v/e)>w-y&&a("overflow"),y+=R(v/e),v%=e,m.splice(v++,0,y)}return u(m)}function p(t){var e,r,n,i,o,s,u,c,d,p,m,g,v,y,b,x=[];for(t=l(t),g=t.length,e=L,r=0,o=E,s=0;s=e&&mR((w-r)/v)&&a("overflow"),r+=(u-e)*v,e=u,s=0;sw&&a("overflow"),m==e){for(c=r,d=M;p=d<=o?k:d>=o+A?A:d-o,!(c= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=M-k,R=Math.floor,j=String.fromCharCode;if(x={version:"1.4.1",ucs2:{decode:l,encode:u},decode:d,encode:p,toASCII:g,toUnicode:m},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return x});else if(v&&y)if(r.exports==v)y.exports=x;else for(_ in x)x.hasOwnProperty(_)&&(v[_]=x[_]);else i.punycode=x}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],477:[function(t,e,r){e.exports=t("gl-quat/slerp")},{"gl-quat/slerp":222}],478:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,a){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;t=t.split(e);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var l=t.length;s>0&&l>s&&(l=s);for(var u=0;u=0?(c=p.substr(0,m),h=p.substr(m+1)):(c=p,h=""),f=decodeURIComponent(c),d=decodeURIComponent(h),n(o,f)?i(o[f])?o[f].push(d):o[f]=[o[f],d]:o[f]=d}return o};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],479:[function(t,e,r){"use strict";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;nr;){if(o-r>600){var l=o-r+1,u=e-r+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1);n(t,e,Math.max(r,Math.floor(e-u*h/l+f)),Math.min(o,Math.floor(e+(l-u)*h/l+f)),s)}var d=t[e],p=r,m=o;for(i(t,r,e),s(t[o],d)>0&&i(t,r,o);p0;)m--}0===s(t[r],d)?i(t,r,m):(m++,i(t,m,o)),m<=e&&(r=m+1),e<=m&&(o=m-1)}}function i(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function a(t,e){return te?1:0}e.exports=n},{}],482:[function(t,e,r){"use strict";function n(t,e){for(var r=t.length,n=new Array(r),a=0;a0){var u=t[r-1];if(0===i(s,u)&&o(u)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}var i=t("compare-cell"),a=t("compare-oriented-cell"),o=t("cell-orientation");e.exports=n},{"cell-orientation":77,"compare-cell":93,"compare-oriented-cell":94}],487:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.createREGL=i()}(this,function(){"use strict";function t(t){return"undefined"!=typeof btoa?btoa(t):"base64:"+t}function e(t){var e=new Error("(regl) "+t);throw console.error(e),e}function r(t,r){t||e(r)}function n(t){return t?": "+t:""}function i(t,r,i){t in r||e("unknown parameter ("+t+")"+n(i)+". possible values: "+Object.keys(r).join())}function a(t,r){Qt(t)||e("invalid parameter type"+n(r)+". must be a typed array")}function o(t,r,i){typeof t!==r&&e("invalid parameter type"+n(i)+". expected "+r+", got "+typeof t)}function s(t,r){t>=0&&(0|t)===t||e("invalid parameter type, ("+t+")"+n(r)+". must be a nonnegative integer")}function l(t,r,i){r.indexOf(t)<0&&e("invalid value"+n(i)+". must be one of: "+r)}function u(t){Object.keys(t).forEach(function(t){te.indexOf(t)<0&&e('invalid regl constructor argument "'+t+'". must be one of '+te)})}function c(t,e){for(t+="";t.length0&&e.push(new d("unknown",0,t))}}),e}function y(t,e){e.forEach(function(e){var r=t[e.file];if(r){var n=r.index[e.line];if(n)return n.errors.push(e),void(r.hasErrors=!0)}t.unknown.hasErrors=!0,t.unknown.lines[0].errors.push(e)})}function b(t,e,n,i,a){if(!t.getShaderParameter(e,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(e),s=i===t.FRAGMENT_SHADER?"fragment":"vertex";T(n,"string",s+" shader source must be a string",a);var l=g(n,a),u=v(o);y(l,u),Object.keys(l).forEach(function(t){function e(t,e){n.push(t),i.push(e||"")}var r=l[t];if(r.hasErrors){var n=[""],i=[""];e("file number "+t+": "+r.name+"\n","color:red;text-decoration:underline;font-weight:bold"),r.lines.forEach(function(t){if(t.errors.length>0){e(c(t.number,4)+"| ","background-color:yellow; font-weight:bold"),e(t.line+"\n","color:red; background-color:yellow; font-weight:bold");var r=0;t.errors.forEach(function(n){var i=n.message,a=/^\s*\'(.*)\'\s*\:\s*(.*)$/.exec(i);if(a){var o=a[1];switch(i=a[2],o){case"assign":o="="}r=Math.max(t.line.indexOf(o,r),0)}else r=0;e(c("| ",6)),e(c("^^^",r+3)+"\n","font-weight:bold"),e(c("| ",6)),e(i+"\n","font-weight:bold")}),e(c("| ",6)+"\n")}else e(c(t.number,4)+"| "),e(t.line+"\n","color:red")}),"undefined"!=typeof document?(i[0]=n.join("%c"),console.log.apply(console,i)):console.log(n.join(""))}}),r.raise("Error compiling "+s+" shader, "+l[0].name)}}function x(t,e,n,i,a){if(!t.getProgramParameter(e,t.LINK_STATUS)){var o=t.getProgramInfoLog(e),s=g(n,a),l=g(i,a),u='Error linking program with vertex shader, "'+l[0].name+'", and fragment shader "'+s[0].name+'"';"undefined"!=typeof document?console.log("%c"+u+"\n%c"+o,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(u+"\n"+o),r.raise(u)}}function _(t){t._commandRef=p()}function w(t,e,r,n){function i(t){return t?n.id(t):0}function a(t,e){Object.keys(e).forEach(function(e){t[n.id(e)]=!0})}_(t),t._fragId=i(t.static.frag),t._vertId=i(t.static.vert);var o=t._uniformSet={};a(o,e.static),a(o,e.dynamic);var s=t._attributeSet={};a(s,r.static),a(s,r.dynamic),t._hasCount="count"in t.static||"count"in t.dynamic||"elements"in t.static||"elements"in t.dynamic}function M(t,r){var n=m();e(t+" in command "+(r||p())+("unknown"===n?"":" called from "+n))}function k(t,e,r){t||M(e,r||p())}function A(t,e,r,i){t in e||M("unknown parameter ("+t+")"+n(r)+". possible values: "+Object.keys(e).join(),i||p())}function T(t,e,r,i){typeof t!==e&&M("invalid parameter type"+n(r)+". expected "+e+", got "+typeof t,i||p())}function S(t){t()}function E(t,e,r){t.texture?l(t.texture._texture.internalformat,e,"unsupported texture format for attachment"):l(t.renderbuffer._renderbuffer.format,r,"unsupported renderbuffer format for attachment")}function L(t,e){return t===ue||t===le||t===ce?2:t===he?4:fe[t]*e}function C(t){return!(t&t-1||!t)}function z(t,e,n){var i,a=e.width,o=e.height,s=e.channels;r(a>0&&a<=n.maxTextureSize&&o>0&&o<=n.maxTextureSize,"invalid texture shape"),t.wrapS===ee&&t.wrapT===ee||r(C(a)&&C(o),"incompatible wrap mode for texture, both width and height must be power of 2"),1===e.mipmask?1!==a&&1!==o&&r(t.minFilter!==ne&&t.minFilter!==ae&&t.minFilter!==ie&&t.minFilter!==oe,"min filter requires mipmap"):(r(C(a)&&C(o),"texture must be a square power of 2 to support mipmapping"),r(e.mipmask===(a<<1)-1,"missing or incomplete mipmap data")),e.type===se&&(n.extensions.indexOf("oes_texture_float_linear")<0&&r(t.minFilter===re&&t.magFilter===re,"filter not supported, must enable oes_texture_float_linear"),r(!t.genMipmaps,"mipmap generation not supported with float textures"));var l=e.images;for(i=0;i<16;++i)if(l[i]){var u=a>>i,c=o>>i;r(e.mipmask&1<0&&a<=i.maxTextureSize&&o>0&&o<=i.maxTextureSize,"invalid texture shape"),r(a===o,"cube map must be square"),r(e.wrapS===ee&&e.wrapT===ee,"wrap mode not supported by cube map");for(var l=0;l>h,p=o>>h;r(u.mipmask&1<1&&e===r&&('"'===e||"'"===e))return['"'+P(t.substr(1,t.length-2))+'"'];var n=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t);if(n)return O(t.substr(0,n.index)).concat(O(n[1])).concat(O(t.substr(n.index+n[0].length)));var i=t.split(".");if(1===i.length)return['"'+P(t)+'"'];for(var a=[],o=0;o0,"invalid pixel ratio"))):de.raise("invalid arguments to regl"),e&&("canvas"===e.nodeName.toLowerCase()?n=e:r=e),!i){if(!n){de("undefined"!=typeof document,"must manually specify webgl context outside of DOM environments");var d=U(r||document.body,h,u);if(!d)return null;n=d.canvas,f=d.onDestroy}i=V(n,o)}return i?{gl:i,canvas:n,container:r,extensions:s,optionalExtensions:l,pixelRatio:u,profile:c,onDone:h,onDestroy:f}:(f(),h("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function W(t,e){function r(e){de.type(e,"string","extension name must be string");var r,i=e.toLowerCase();try{r=n[i]=t.getExtension(i)}catch(t){}return!!r}for(var n={},i=0;i65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1}function $(t){var e=K(t),r=Ee[Q(e)>>2];return r.length>0?r.pop():new ArrayBuffer(e)}function tt(t){Ee[Q(t.byteLength)>>2].push(t)}function et(t,e){var r=null;switch(t){case _e:r=new Int8Array($(e),0,e);break;case we:r=new Uint8Array($(e),0,e);break;case Me:r=new Int16Array($(2*e),0,e);break;case ke:r=new Uint16Array($(2*e),0,e);break;case Ae:r=new Int32Array($(4*e),0,e);break;case Te:r=new Uint32Array($(4*e),0,e);break;case Se:r=new Float32Array($(4*e),0,e);break;default:return null}return r.length!==e?r.subarray(0,e):r}function rt(t){tt(t.buffer)}function nt(t,e,r){for(var n=0;n0){var l;if(Array.isArray(e[0])){s=Pe(e);for(var u=1,c=1;c0)if("number"==typeof t[0]){var i=Le.allocType(p.dtype,t.length);ct(i,t),h(i,n),Le.freeType(i)}else if(Array.isArray(t[0])||Qt(t[0])){r=Pe(t);var a=Ie(t,r,p.dtype);h(a,n),Le.freeType(a)}else de.raise("invalid buffer data")}else if(Qt(t))h(t,n);else if(Z(t)){r=t.shape;var o=t.stride,s=0,l=0,u=0,f=0;1===r.length?(s=r[0],l=1,u=o[0],f=0):2===r.length?(s=r[0],l=r[1],u=o[0],f=o[1]):de.raise("invalid shape");var d=Array.isArray(t.data)?p.dtype:ut(t.data),m=Le.allocType(d,s*l);ht(m,t.data,s,l,u,f,t.offset),h(m,n),Le.freeType(m)}else de.raise("invalid data for buffer subdata");return c}e.bufferCount++;var p=new n(a);return f[p.id]=p,o||c(i),c._reglType="buffer",c._buffer=p,c.subdata=d,r.profile&&(c.stats=p.stats),c.destroy=function(){l(p)},c}function c(){xe(f).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})}var h=0,f={};n.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},n.prototype.destroy=function(){l(this)};var d=[];return r.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:u,createStream:i,destroyStream:a,clear:function(){xe(f).forEach(l),d.forEach(l)},getBuffer:function(t){return t&&t._buffer instanceof n?t._buffer:null},restore:c,_initBuffer:s}}function dt(t,e,r,n){function i(t){this.id=h++,c[this.id]=this,this.buffer=t,this.primType=qe,this.vertCount=0,this.type=0}function a(t){var e=d.pop();return e||(e=new i(r.create(null,Je,!0,!1)._buffer)),s(e,t,Ke,-1,-1,0,0),e}function o(t){d.push(t)}function s(n,i,a,o,s,l,u){if(n.buffer.bind(),i){var c=u;u||Qt(i)&&(!Z(i)||Qt(i.data))||(c=e.oes_element_index_uint?Ze:Xe),r._initBuffer(n.buffer,i,a,c,3)}else t.bufferData(Je,l,a),n.buffer.dtype=h||Ye,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l;var h=u;if(!u){switch(n.buffer.dtype){case Ye:case He:h=Ye;break;case Xe:case Ge:h=Xe;break;case Ze:case We:h=Ze;break;default:de.raise("unsupported type for element array")}n.buffer.dtype=h}n.type=h,de(h!==Ze||!!e.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var f=s;f<0&&(f=n.buffer.byteLength,h===Xe?f>>=1:h===Ze&&(f>>=2)),n.vertCount=f;var d=o;if(o<0){d=qe;var p=n.buffer.dimension;1===p&&(d=Ue),2===p&&(d=Ve),3===p&&(d=qe)}n.primType=d}function l(t){n.elementsCount--,de(null!==t.buffer,"must not double destroy elements"),delete c[t.id],t.buffer.destroy(),t.buffer=null}function u(t,e){function a(t){if(t)if("number"==typeof t)o(t),u.primType=qe,u.vertCount=0|t,u.type=Ye;else{var e=null,r=Qe,n=-1,i=-1,l=0,c=0;Array.isArray(t)||Qt(t)||Z(t)?e=t:(de.type(t,"object","invalid arguments for elements"),"data"in t&&(e=t.data,de(Array.isArray(e)||Qt(e)||Z(e),"invalid data for element buffer")),"usage"in t&&(de.parameter(t.usage,De,"invalid element buffer usage"),r=De[t.usage]),"primitive"in t&&(de.parameter(t.primitive,Be,"invalid element buffer primitive"),n=Be[t.primitive]),"count"in t&&(de("number"==typeof t.count&&t.count>=0,"invalid vertex count for elements"),i=0|t.count),"type"in t&&(de.parameter(t.type,f,"invalid buffer type"),c=f[t.type]),"length"in t?l=0|t.length:(l=i,c===Xe||c===Ge?l*=2:c!==Ze&&c!==We||(l*=4))),s(u,e,r,n,i,l,c)}else o(),u.primType=qe,u.vertCount=0,u.type=Ye;return a}var o=r.create(null,Je,!0),u=new i(o._buffer);return n.elementsCount++,a(t),a._reglType="elements",a._elements=u,a.subdata=function(t,e){return o.subdata(t,e),a},a.destroy=function(){l(u)},a}var c={},h=0,f={uint8:Ye,uint16:Xe};e.oes_element_index_uint&&(f.uint32=Ze),i.prototype.bind=function(){this.buffer.bind()};var d=[];return{create:u,createStream:a,destroyStream:o,getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){xe(c).forEach(l)}}}function pt(t){for(var e=Le.allocType(er,t.length),r=0;r>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)e[r]=i;else if(a<-14){var s=-14-a;e[r]=i+(o+1024>>s)}else e[r]=a>15?i+31744:i+(a+15<<10)+o}return e}function mt(t){return Array.isArray(t)||Qt(t)}function gt(t){return"[object "+t+"]"}function vt(t){return Array.isArray(t)&&(0===t.length||"number"==typeof t[0])}function yt(t){return!!Array.isArray(t)&&!(0===t.length||!mt(t[0]))}function bt(t){return Object.prototype.toString.call(t)}function xt(t){return bt(t)===dn}function _t(t){return bt(t)===pn}function wt(t){return bt(t)===mn}function Mt(t){return bt(t)===gn}function kt(t){if(!t)return!1;var e=bt(t);return vn.indexOf(e)>=0||(vt(t)||yt(t)||Z(t))}function At(t){return 0|Kt[Object.prototype.toString.call(t)]}function Tt(t,e){var r=e.length;switch(t.type){case Or:case Rr:case jr:case Fr:var n=Le.allocType(t.type,r);n.set(e),t.data=n;break;case wr:t.data=pt(e);break;default:de.raise("unsupported texture type, must specify a typed array")}}function St(t,e){return Le.allocType(t.type===wr?Fr:t.type,e)}function Et(t,e){t.type===wr?(t.data=pt(e),Le.freeType(e)):t.data=e}function Lt(t,e,r,n,i,a){for(var o=t.width,s=t.height,l=t.channels,u=o*s*l,c=St(t,u),h=0,f=0;f=1;)s+=o*l*l,l/=2;return s}return o*r*n}function zt(t,e,r,n,i,a,o){function s(){this.internalformat=or,this.format=or,this.type=Or,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=0,this.width=0,this.height=0,this.channels=0}function l(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function u(t,n){if("object"==typeof n&&n){if("premultiplyAlpha"in n&&(de.type(n.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),t.premultiplyAlpha=n.premultiplyAlpha),"flipY"in n&&(de.type(n.flipY,"boolean","invalid texture flip"),t.flipY=n.flipY),"alignment"in n&&(de.oneOf(n.alignment,[1,2,4,8],"invalid texture unpack alignment"),t.unpackAlignment=n.alignment),"colorSpace"in n&&(de.parameter(n.colorSpace,F,"invalid colorSpace"),t.colorSpace=F[n.colorSpace]),"type"in n){var i=n.type;de(e.oes_texture_float||!("float"===i||"float32"===i),"you must enable the OES_texture_float extension in order to use floating point textures."),de(e.oes_texture_half_float||!("half float"===i||"float16"===i),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),de(e.webgl_depth_texture||!("uint16"===i||"uint32"===i||"depth stencil"===i),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),de.parameter(i,N,"invalid texture type"),t.type=N[i]}var a=t.width,o=t.height,s=t.channels,l=!1;"shape"in n?(de(Array.isArray(n.shape)&&n.shape.length>=2,"shape must be an array"),a=n.shape[0],o=n.shape[1],3===n.shape.length&&(s=n.shape[2],de(s>0&&s<=4,"invalid number of channels"),l=!0),de(a>=0&&a<=r.maxTextureSize,"invalid width"),de(o>=0&&o<=r.maxTextureSize,"invalid height")):("radius"in n&&(a=o=n.radius,de(a>=0&&a<=r.maxTextureSize,"invalid radius")),"width"in n&&(a=n.width,de(a>=0&&a<=r.maxTextureSize,"invalid width")),"height"in n&&(o=n.height,de(o>=0&&o<=r.maxTextureSize,"invalid height")),"channels"in n&&(s=n.channels,de(s>0&&s<=4,"invalid number of channels"),l=!0)),t.width=0|a,t.height=0|o,t.channels=0|s;var u=!1;if("format"in n){var c=n.format;de(e.webgl_depth_texture||!("depth"===c||"depth stencil"===c),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),de.parameter(c,B,"invalid texture format");var h=t.internalformat=B[c];t.format=J[h],c in N&&("type"in n||(t.type=N[c])),c in U&&(t.compressed=!0),u=!0}!l&&u?t.channels=fn[t.format]:l&&!u?t.channels!==hn[t.format]&&(t.format=t.internalformat=hn[t.channels]):u&&l&&de(t.channels===fn[t.format],"number of channels inconsistent with specified format")}}function c(e){t.pixelStorei(an,e.flipY),t.pixelStorei(on,e.premultiplyAlpha),t.pixelStorei(sn,e.colorSpace),t.pixelStorei(nn,e.unpackAlignment)}function h(){s.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function f(t,e){var n=null;if(kt(e)?n=e:e&&(de.type(e,"object","invalid pixel data type"),u(t,e),"x"in e&&(t.xOffset=0|e.x),"y"in e&&(t.yOffset=0|e.y),kt(e.data)&&(n=e.data)),de(!t.compressed||n instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),e.copy){de(!n,"can not specify copy and data field for the same texture");var a=i.viewportWidth,o=i.viewportHeight;t.width=t.width||a-t.xOffset,t.height=t.height||o-t.yOffset,t.needsCopy=!0,de(t.xOffset>=0&&t.xOffset=0&&t.yOffset0&&t.width<=a&&t.height>0&&t.height<=o,"copy texture read out of bounds")}else if(n){if(Qt(n))t.channels=t.channels||4,t.data=n,"type"in e||t.type!==Or||(t.type=At(n));else if(vt(n))t.channels=t.channels||4,Tt(t,n),t.alignment=1,t.needsFree=!0;else if(Z(n)){var s=n.data;Array.isArray(s)||t.type!==Or||(t.type=At(s));var l,c,h,f,d,p,m=n.shape,g=n.stride;3===m.length?(h=m[2],p=g[2]):(de(2===m.length,"invalid ndarray pixel data, must be 2 or 3D"),h=1,p=1),l=m[0],c=m[1],f=g[0],d=g[1],t.alignment=1,t.width=l,t.height=c,t.channels=h,t.format=t.internalformat=hn[h],t.needsFree=!0,Lt(t,s,f,d,p,n.offset)}else if(xt(n)||_t(n))xt(n)?t.element=n:t.element=n.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(wt(n))t.element=n,t.width=n.naturalWidth,t.height=n.naturalHeight,t.channels=4;else if(Mt(n))t.element=n,t.width=n.videoWidth,t.height=n.videoHeight,t.channels=4;else if(yt(n)){var v=t.width||n[0].length,y=t.height||n.length,b=t.channels;b=mt(n[0][0])?b||n[0][0].length:b||1;for(var x=Ce.shape(n),_=1,w=0;w=0,"oes_texture_float extension not enabled"):t.type===wr&&de(r.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function d(e,r,i){var a=e.element,o=e.data,s=e.internalformat,l=e.format,u=e.type,h=e.width,f=e.height;c(e),a?t.texImage2D(r,i,l,l,u,a):e.compressed?t.compressedTexImage2D(r,i,s,h,f,0,o):e.needsCopy?(n(),t.copyTexImage2D(r,i,l,e.xOffset,e.yOffset,h,f,0)):t.texImage2D(r,i,l,h,f,0,l,u,o)}function p(e,r,i,a,o){var s=e.element,l=e.data,u=e.internalformat,h=e.format,f=e.type,d=e.width,p=e.height;c(e),s?t.texSubImage2D(r,o,i,a,h,f,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,u,d,p,l):e.needsCopy?(n(),t.copyTexSubImage2D(r,o,i,a,e.xOffset,e.yOffset,d,p)):t.texSubImage2D(r,o,i,a,d,p,h,f,l)}function m(){return K.pop()||new h}function g(t){t.needsFree&&Le.freeType(t.data),h.call(t),K.push(t)}function v(){s.call(this),this.genMipmaps=!1,this.mipmapHint=$r,this.mipmask=0,this.images=Array(16)}function y(t,e,r){var n=t.images[0]=m();t.mipmask=1, -n.width=t.width=e,n.height=t.height=r,n.channels=t.channels=4}function b(t,e){var r=null;if(kt(e))r=t.images[0]=m(),l(r,t),f(r,e),t.mipmask=1;else if(u(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i>=i,r.height>>=i,f(r,n[i]),t.mipmask|=1<=0&&(t.genMipmaps=!0)}if("mag"in e){var i=e.mag;de.parameter(i,R),t.magFilter=R[i]}var a=t.wrapS,o=t.wrapT;if("wrap"in e){var s=e.wrap;"string"==typeof s?(de.parameter(s,O),a=o=O[s]):Array.isArray(s)&&(de.parameter(s[0],O),de.parameter(s[1],O),a=O[s[0]],o=O[s[1]])}else{if("wrapS"in e){var l=e.wrapS;de.parameter(l,O),a=O[l]}if("wrapT"in e){var u=e.wrapT;de.parameter(u,O),o=O[u]}}if(t.wrapS=a,t.wrapT=o,"anisotropic"in e){var c=e.anisotropic;de("number"==typeof c&&c>=1&&c<=r.maxAnisotropic,"aniso samples must be between 1 and "),t.anisotropic=e.anisotropic}if("mipmap"in e){var h=!1;switch(typeof e.mipmap){case"string":de.parameter(e.mipmap,P,"invalid mipmap hint"),t.mipmapHint=P[e.mipmap],t.genMipmaps=!0,h=!0;break;case"boolean":h=t.genMipmaps=e.mipmap;break;case"object":de(Array.isArray(e.mipmap),"invalid mipmap type"),t.genMipmaps=!1,h=!0;break;default:de.raise("invalid mipmap type")}!h||"min"in e||(t.minFilter=Wr)}}function A(r,n){t.texParameteri(n,Yr,r.minFilter),t.texParameteri(n,Hr,r.magFilter),t.texParameteri(n,Nr,r.wrapS),t.texParameteri(n,Br,r.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(n,rn,r.anisotropic),r.genMipmaps&&(t.hint(Qr,r.mipmapHint),t.generateMipmap(n))}function T(e){s.call(this),this.mipmask=0,this.internalformat=or,this.id=$++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new M,o.profile&&(this.stats={size:0})}function S(e){t.activeTexture(un),t.bindTexture(e.target,e.texture)}function E(){var e=rt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(nr,null)}function L(e){var r=e.texture;de(r,"must not double destroy texture");var n=e.unit,i=e.target;n>=0&&(t.activeTexture(un+n),t.bindTexture(i,null),rt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete tt[e.id],a.textureCount--}function C(e,n){function i(t,e){var n=c.texInfo;M.call(n);var a=_();return"number"==typeof t?"number"==typeof e?y(a,0|t,0|e):y(a,0|t,0|t):t?(de.type(t,"object","invalid arguments to regl.texture"),k(n,t),b(a,t)):y(a,1,1),n.genMipmaps&&(a.mipmask=(a.width<<1)-1),c.mipmask=a.mipmask,l(c,a),de.texture2D(n,a,r),c.internalformat=a.internalformat,i.width=a.width,i.height=a.height,S(c),x(a,nr),A(n,nr),E(),w(a),o.profile&&(c.stats.size=Ct(c.internalformat,c.type,a.width,a.height,n.genMipmaps,!1)),i.format=H[c.internalformat],i.type=Y[c.type],i.mag=G[n.magFilter],i.min=X[n.minFilter],i.wrapS=W[n.wrapS],i.wrapT=W[n.wrapT],i}function s(t,e,r,n){de(!!t,"must specify image data");var a=0|e,o=0|r,s=0|n,u=m();return l(u,c),u.width=0,u.height=0,f(u,t),u.width=u.width||(c.width>>s)-a,u.height=u.height||(c.height>>s)-o,de(c.type===u.type&&c.format===u.format&&c.internalformat===u.internalformat,"incompatible format for texture.subimage"),de(a>=0&&o>=0&&a+u.width<=c.width&&o+u.height<=c.height,"texture.subimage write out of bounds"),de(c.mipmask&1<>s;++s)t.texImage2D(nr,s,c.format,n>>s,a>>s,0,c.format,c.type,null);return E(),o.profile&&(c.stats.size=Ct(c.internalformat,c.type,n,a,!1,!1)),i}var c=new T(nr);return tt[c.id]=c,a.textureCount++,i(e,n),i.subimage=s,i.resize=u,i._reglType="texture2d",i._texture=c,o.profile&&(i.stats=c.stats),i.destroy=function(){c.decRef()},i}function z(e,n,i,s,c,h){function d(t,e,n,i,a,s){var c,h=C.texInfo;for(M.call(h),c=0;c<6;++c)z[c]=_();if("number"!=typeof t&&t)if("object"==typeof t)if(e)b(z[0],t),b(z[1],e),b(z[2],n),b(z[3],i),b(z[4],a),b(z[5],s);else if(k(h,t),u(C,t),"faces"in t){var f=t.faces;for(de(Array.isArray(f)&&6===f.length,"cube faces must be a length 6 array"),c=0;c<6;++c)de("object"==typeof f[c]&&!!f[c],"invalid input for cube map face"),l(z[c],C),b(z[c],f[c])}else for(c=0;c<6;++c)b(z[c],t);else de.raise("invalid arguments to cube map");else{var p=0|t||1;for(c=0;c<6;++c)y(z[c],p,p)}for(l(C,z[0]),h.genMipmaps?C.mipmask=(z[0].width<<1)-1:C.mipmask=z[0].mipmask,de.textureCube(C,h,z,r),C.internalformat=z[0].internalformat,d.width=z[0].width,d.height=z[0].height,S(C),c=0;c<6;++c)x(z[c],ar+c);for(A(h,ir),E(),o.profile&&(C.stats.size=Ct(C.internalformat,C.type,d.width,d.height,h.genMipmaps,!0)),d.format=H[C.internalformat],d.type=Y[C.type],d.mag=G[h.magFilter],d.min=X[h.minFilter],d.wrapS=W[h.wrapS],d.wrapT=W[h.wrapT],c=0;c<6;++c)w(z[c]);return d}function v(t,e,r,n,i){de(!!e,"must specify image data"),de("number"==typeof t&&t===(0|t)&&t>=0&&t<6,"invalid face");var a=0|r,o=0|n,s=0|i,u=m();return l(u,C),u.width=0,u.height=0,f(u,e),u.width=u.width||(C.width>>s)-a,u.height=u.height||(C.height>>s)-o,de(C.type===u.type&&C.format===u.format&&C.internalformat===u.internalformat,"incompatible format for texture.subimage"),de(a>=0&&o>=0&&a+u.width<=C.width&&o+u.height<=C.height,"texture.subimage write out of bounds"),de(C.mipmask&1<>i;++i)t.texImage2D(ar+n,i,C.format,r>>i,r>>i,0,C.format,C.type,null);return E(),o.profile&&(C.stats.size=Ct(C.internalformat,C.type,d.width,d.height,!1,!0)),d}}var C=new T(ir);tt[C.id]=C,a.cubeCount++;var z=new Array(6);return d(e,n,i,s,c,h),d.subimage=v,d.resize=L,d._reglType="textureCube",d._texture=C,o.profile&&(d.stats=C.stats),d.destroy=function(){C.decRef()},d}function D(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)t.texImage2D(ar+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);A(e.texInfo,e.target)})}var P={"don't care":$r,"dont care":$r,nice:en,fast:tn},O={repeat:Ur,clamp:Vr,mirror:qr},R={nearest:Gr,linear:Xr},j=$t({mipmap:Kr,"nearest mipmap nearest":Wr,"linear mipmap nearest":Zr,"nearest mipmap linear":Jr,"linear mipmap linear":Kr},R),F={none:0,browser:ln},N={uint8:Or,rgba4:pr,rgb565:gr,"rgb5 a1":mr},B={alpha:sr,luminance:ur,"luminance alpha":cr,rgb:lr,rgba:or,rgba4:hr,"rgb5 a1":fr,rgb565:dr},U={};e.ext_srgb&&(B.srgb=xr,B.srgba=_r),e.oes_texture_float&&(N.float32=N.float=Fr),e.oes_texture_half_float&&(N.float16=N["half float"]=wr),e.webgl_depth_texture&&($t(B,{depth:yr,"depth stencil":br}),$t(N,{uint16:Rr,uint32:jr,"depth stencil":vr})),e.webgl_compressed_texture_s3tc&&$t(U,{"rgb s3tc dxt1":Mr,"rgba s3tc dxt1":kr,"rgba s3tc dxt3":Ar,"rgba s3tc dxt5":Tr}),e.webgl_compressed_texture_atc&&$t(U,{"rgb atc":Sr,"rgba atc explicit alpha":Er,"rgba atc interpolated alpha":Lr}),e.webgl_compressed_texture_pvrtc&&$t(U,{"rgb pvrtc 4bppv1":Cr,"rgb pvrtc 2bppv1":zr,"rgba pvrtc 4bppv1":Dr,"rgba pvrtc 2bppv1":Ir}),e.webgl_compressed_texture_etc1&&(U["rgb etc1"]=Pr);var V=Array.prototype.slice.call(t.getParameter(rr));Object.keys(U).forEach(function(t){var e=U[t];V.indexOf(e)>=0&&(B[t]=e)});var q=Object.keys(B);r.textureFormats=q;var H=[];Object.keys(B).forEach(function(t){var e=B[t];H[e]=t});var Y=[];Object.keys(N).forEach(function(t){var e=N[t];Y[e]=t});var G=[];Object.keys(R).forEach(function(t){var e=R[t];G[e]=t});var X=[];Object.keys(j).forEach(function(t){var e=j[t];X[e]=t});var W=[];Object.keys(O).forEach(function(t){var e=O[t];W[e]=t});var J=q.reduce(function(t,e){var r=B[e];return r===ur||r===sr||r===ur||r===cr||r===yr||r===br?t[r]=r:r===fr||e.indexOf("rgba")>=0?t[r]=or:t[r]=lr,t},{}),K=[],Q=[],$=0,tt={},et=r.maxTextureUnits,rt=Array(et).map(function(){return null});return $t(T.prototype,{bind:function(){var e=this;e.bindCount+=1;var r=e.unit;if(r<0){for(var n=0;n0)continue;i.unit=-1}rt[n]=e,r=n;break}r>=et&&de.raise("insufficient number of texture units"),o.profile&&a.maxTextureUnits=Sn&&e=2,"invalid shape for framebuffer"),u=D[0],d=D[1]}else"radius"in z&&(u=d=z.radius),"width"in z&&(u=z.width),"height"in z&&(d=z.height);("color"in z||"colors"in z)&&(y=z.color||z.colors,Array.isArray(y)&&de(1===y.length||o,"multiple render targets not supported")),y||("colorCount"in z&&(T=0|z.colorCount,de(T>0,"invalid color buffer count")),"colorTexture"in z&&(b=!!z.colorTexture,x="rgba4"),"colorType"in z&&(A=z.colorType,b?(de(e.oes_texture_float||!("float"===A||"float32"===A),"you must enable OES_texture_float in order to use floating point framebuffer objects"),de(e.oes_texture_half_float||!("half float"===A||"float16"===A),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):"half float"===A||"float16"===A?(de(e.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),x="rgba16f"):"float"!==A&&"float32"!==A||(de(e.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),x="rgba32f"),de.oneOf(A,k,"invalid color type")),"colorFormat"in z&&(x=z.colorFormat,w.indexOf(x)>=0?b=!0:M.indexOf(x)>=0?b=!1:b?de.oneOf(z.colorFormat,w,"invalid color format for texture"):de.oneOf(z.colorFormat,M,"invalid color format for renderbuffer"))),("depthTexture"in z||"depthStencilTexture"in z)&&(C=!(!z.depthTexture&&!z.depthStencilTexture),de(!C||e.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in z&&("boolean"==typeof z.depth?p=z.depth:(S=z.depth,g=!1)),"stencil"in z&&("boolean"==typeof z.stencil?g=z.stencil:(E=z.stencil,p=!1)),"depthStencil"in z&&("boolean"==typeof z.depthStencil?p=g=z.depthStencil:(L=z.depthStencil,p=!1,g=!1))}else u=d=1;var I=null,P=null,O=null,R=null;if(Array.isArray(y))I=y.map(c);else if(y)I=[c(y)];else for(I=new Array(T),a=0;a=0||I[a].renderbuffer&&Bn.indexOf(I[a].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+a+" is invalid"),I[a]&&I[a].texture){var F=On[I[a].texture._texture.format]*Rn[I[a].texture._texture.type];null===j?j=F:de(j===F,"all color attachments much have the same number of bits per pixel.")}return l(P,u,d),de(!P||P.texture&&P.texture._texture.format===In||P.renderbuffer&&P.renderbuffer._renderbuffer.format===jn,"invalid depth attachment for framebuffer object"),l(O,u,d),de(!O||O.renderbuffer&&O.renderbuffer._renderbuffer.format===Fn,"invalid stencil attachment for framebuffer object"),l(R,u,d),de(!R||R.texture&&R.texture._texture.format===Nn||R.renderbuffer&&R.renderbuffer._renderbuffer.format===Nn,"invalid depth-stencil attachment for framebuffer object"),m(s),s.width=u,s.height=d,s.colorAttachments=I,s.depthAttachment=P,s.stencilAttachment=O,s.depthStencilAttachment=R,i.color=I.map(f),i.depth=f(P),i.stencil=f(O),i.depthStencil=f(R),i.width=s.width,i.height=s.height,v(s),i}function o(t,e){de(_.next!==s,"can not resize a framebuffer which is currently in use");var r=0|t,n=0|e||r;if(r===s.width&&n===s.height)return i;for(var a=s.colorAttachments,o=0;o=2,"invalid shape for framebuffer"),de(p[0]===p[1],"cube framebuffer must be square"),l=p[0]}else"radius"in d&&(l=0|d.radius),"width"in d?(l=0|d.width,"height"in d&&de(d.height===l,"must be square")):"height"in d&&(l=0|d.height);("color"in d||"colors"in d)&&(u=d.color||d.colors,Array.isArray(u)&&de(1===u.length||a,"multiple render targets not supported")),u||("colorCount"in d&&(f=0|d.colorCount,de(f>0,"invalid color buffer count")),"colorType"in d&&(de.oneOf(d.colorType,k,"invalid color type"),h=d.colorType),"colorFormat"in d&&(c=d.colorFormat,de.oneOf(d.colorFormat,w,"invalid color format for texture"))),"depth"in d&&(s.depth=d.depth),"stencil"in d&&(s.stencil=d.stencil),"depthStencil"in d&&(s.depthStencil=d.depthStencil)}else l=1;var m;if(u)if(Array.isArray(u))for(m=[],r=0;r0&&(s.depth=o[0].depth,s.stencil=o[0].stencil,s.depthStencil=o[0].depthStencil),o[r]?o[r](s):o[r]=y(s)}return $t(i,{width:l,height:l,color:m})}function a(t){var e,n=0|t;if(de(n>0&&n<=r.maxCubeMapSize,"invalid radius for cube fbo"),n===i.width)return i;var a=i.color;for(e=0;e1)for(var m=0;mt&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return d.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);xe(c).forEach(e),c={},xe(h).forEach(e),h={},d.forEach(function(e){t.deleteProgram(e.program)}),d.length=0,f={},r.shaderCount=0},program:function(t,e,n){de.command(t>=0,"missing vertex shader",n),de.command(e>=0,"missing fragment shader",n);var i=f[e];i||(i=f[e]={});var a=i[t];return a||(a=new s(e,t),r.shaderCount++,l(a,n),i[t]=a,d.push(a)),a},restore:u,shader:o,frag:-1,vert:-1}}function jt(t,e,r,n,i,a){function o(o){var s;null===e.next?(de(i.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),s=Wn):(de(null!==e.next.colorAttachments[0].texture,"You cannot read from a renderbuffer"),s=e.next.colorAttachments[0].texture._texture.type,a.oes_texture_float?de(s===Wn||s===Jn,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"):de(s===Wn,"Reading from a framebuffer is only allowed for the type 'uint8'"));var l=0,u=0,c=n.framebufferWidth,h=n.framebufferHeight,f=null;Qt(o)?f=o:o&&(de.type(o,"object","invalid arguments to regl.read()"),l=0|o.x,u=0|o.y,de(l>=0&&l=0&&u0&&c+l<=n.framebufferWidth,"invalid width for read pixels"),de(h>0&&h+u<=n.framebufferHeight,"invalid height for read pixels"),r();var d=c*h*4;return f||(s===Wn?f=new Uint8Array(d):s===Jn&&(f=f||new Float32Array(d))),de.isTypedArray(f,"data buffer for regl.read() must be a typedarray"),de(f.byteLength>=d,"data buffer for regl.read() too small"),t.pixelStorei(Zn,4),t.readPixels(l,u,c,h,Xn,s,f),f}function s(t){var r;return e.setFBO({framebuffer:t.framebuffer},function(){r=o(t)}),r}function l(t){return t&&"framebuffer"in t?s(t):o(t)}return l}function Ft(t){return Array.prototype.slice.call(t)}function Nt(t){return Ft(t).join("")}function Bt(){function t(t){for(var e=0;e0&&(r.push(t,"="),r.push.apply(r,Ft(arguments)),r.push(";")),t}var r=[],n=[];return $t(t,{def:e,toString:function(){return Nt([n.length>0?"var "+n+";":"",Nt(r)])}})}function r(){function t(t,e){n(t,e,"=",r.def(t,e),";")}var r=e(),n=e(),i=r.toString,a=n.toString;return $t(function(){r.apply(r,Ft(arguments))},{def:r.def,entry:r,exit:n,save:t,set:function(e,n,i){t(e,n),r(e,n,"=",i,";")},toString:function(){return i()+a()}})}function n(){var t=Nt(arguments),e=r(),n=r(),i=e.toString,a=n.toString;return $t(e,{then:function(){return e.apply(e,Ft(arguments)),this},else:function(){return n.apply(n,Ft(arguments)),this},toString:function(){var e=a();return e&&(e="else{"+e+"}"),Nt(["if(",t,"){",i(),"}",e])}})}function i(t,e){function n(){var t="a"+i.length;return i.push(t),t}var i=[];e=e||0;for(var a=0;a=1,n>=2,e)}if(r===ai){var i=t.data;return new qt(i.thisDep,i.contextDep,i.propDep,e)}return new qt(r===ii,r===ni,r===ri,e)}function Xt(t,e,r,n,i,a,o,s,l,u,c,h,f,d,p){function m(t){return t.replace(".","_")}function g(t,e,r){var n=m(t);et.push(t),tt[n]=$[n]=!!r,rt[n]=e}function v(t,e,r){var n=m(t);et.push(t),Array.isArray(r)?($[n]=r.slice(),tt[n]=r.slice()):$[n]=tt[n]=r,nt[n]=e}function y(){var t=Bt(),r=t.link,n=t.global;t.id=ot++,t.batchId="0";var i=r(it),a=t.shared={props:"a0"};Object.keys(it).forEach(function(t){a[t]=n.def(i,".",t)}),de.optional(function(){t.CHECK=r(de),t.commandStr=de.guessCommand(),t.command=r(t.commandStr),t.assert=function(t,e,n){t("if(!(",e,"))",this.CHECK,".commandRaise(",r(n),",",this.command,");")},at.invalidBlendCombinations=Ua});var o=t.next={},s=t.current={};Object.keys(nt).forEach(function(t){Array.isArray($[t])&&(o[t]=n.def(a.next,".",t),s[t]=n.def(a.current,".",t))});var l=t.constants={};Object.keys(at).forEach(function(t){l[t]=n.def(JSON.stringify(at[t]))}),t.invoke=function(e,n){switch(n.type){case ei:var i=["this",a.context,a.props,t.batchId];return e.def(r(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case ri:return e.def(a.props,n.data);case ni:return e.def(a.context,n.data);case ii:return e.def("this",n.data);case ai:return n.data.append(t,e),n.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){var n=e.id(t);if(n in c)return c[n];var i=u.scope[n];return i||(i=u.scope[n]=new W),c[n]=r(i)},t}function b(t){var e,r=t.static,n=t.dynamic;if(Ii in r){var i=!!r[Ii];e=Yt(function(t,e){return i}),e.enable=i}else if(Ii in n){var a=n[Ii];e=Gt(a,function(t,e){return t.invoke(e,a)})}return e}function x(t,e){var r=t.static,n=t.dynamic;if(Pi in r){var i=r[Pi];return i?(i=s.getFramebuffer(i),de.command(i,"invalid framebuffer object"),Yt(function(t,e){var r=t.link(i),n=t.shared;e.set(n.framebuffer,".next",r);var a=n.context;return e.set(a,"."+Vi,r+".width"),e.set(a,"."+qi,r+".height"),r})):Yt(function(t,e){var r=t.shared;e.set(r.framebuffer,".next","null");var n=r.context;return e.set(n,"."+Vi,n+"."+Gi),e.set(n,"."+qi,n+"."+Xi),"null"})}if(Pi in n){var a=n[Pi];return Gt(a,function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer,o=e.def(i,".getFramebuffer(",r,")");de.optional(function(){t.assert(e,"!"+r+"||"+o,"invalid framebuffer object")}),e.set(i,".next",o);var s=n.context;return e.set(s,"."+Vi,o+"?"+o+".width:"+s+"."+Gi),e.set(s,"."+qi,o+"?"+o+".height:"+s+"."+Xi),o})}return null}function _(t,e,r){function n(t){if(t in i){var n=i[t];de.commandType(n,"object","invalid "+t,r.commandStr);var o,s,l=!0,u=0|n.x,c=0|n.y;return"width"in n?(o=0|n.width,de.command(o>=0,"invalid "+t,r.commandStr)):l=!1,"height"in n?(s=0|n.height,de.command(s>=0,"invalid "+t,r.commandStr)):l=!1,new qt(!l&&e&&e.thisDep,!l&&e&&e.contextDep,!l&&e&&e.propDep,function(t,e){var r=t.shared.context,i=o;"width"in n||(i=e.def(r,".",Vi,"-",u));var a=s;return"height"in n||(a=e.def(r,".",qi,"-",c)),[u,c,i,a]})}if(t in a){var h=a[t],f=Gt(h,function(e,r){var n=e.invoke(r,h);de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)});var i=e.shared.context,a=r.def(n,".x|0"),o=r.def(n,".y|0"),s=r.def('"width" in ',n,"?",n,".width|0:","(",i,".",Vi,"-",a,")"),l=r.def('"height" in ',n,"?",n,".height|0:","(",i,".",qi,"-",o,")");return de.optional(function(){e.assert(r,s+">=0&&"+l+">=0","invalid "+t)}),[a,o,s,l]});return e&&(f.thisDep=f.thisDep||e.thisDep,f.contextDep=f.contextDep||e.contextDep,f.propDep=f.propDep||e.propDep),f}return e?new qt(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,".",Vi),e.def(r,".",qi)]}):null}var i=t.static,a=t.dynamic,o=n(Di);if(o){var s=o;o=new qt(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=s.append(t,e),n=t.shared.context;return e.set(n,"."+Hi,r[2]),e.set(n,"."+Yi,r[3]),r})}return{viewport:o,scissor_box:n(zi)}}function w(t){function r(t){if(t in i){var r=e.id(i[t]);de.optional(function(){c.shader(Ha[t],r,de.guessCommand())});var n=Yt(function(){return r});return n.id=r,n}if(t in a){var o=a[t];return Gt(o,function(e,r){var n=e.invoke(r,o),i=r.def(e.shared.strings,".id(",n,")");return de.optional(function(){r(e.shared.shader,".shader(",Ha[t],",",i,",",e.command,");")}),i})}return null}var n,i=t.static,a=t.dynamic,o=r(Ri),s=r(Oi),l=null;return Ht(o)&&Ht(s)?(l=c.program(s.id,o.id),n=Yt(function(t,e){return t.link(l)})):n=new qt(o&&o.thisDep||s&&s.thisDep,o&&o.contextDep||s&&s.contextDep,o&&o.propDep||s&&s.propDep,function(t,e){var r,n=t.shared.shader;r=o?o.append(t,e):e.def(n,".",Ri);var i;i=s?s.append(t,e):e.def(n,".",Oi);var a=n+".program("+i+","+r;return de.optional(function(){a+=","+t.command}),e.def(a+")")}),{frag:o,vert:s,progVar:n,program:l}}function M(t,e){function r(t,r){if(t in n){var a=0|n[t];return de.command(!r||a>=0,"invalid "+t,e.commandStr),Yt(function(t,e){return r&&(t.OFFSET=a),a})}if(t in i){var s=i[t];return Gt(s,function(e,n){var i=e.invoke(n,s);return r&&(e.OFFSET=i,de.optional(function(){e.assert(n,i+">=0","invalid "+t)})),i})}return r&&o?Yt(function(t,e){return t.OFFSET="0",0}):null}var n=t.static,i=t.dynamic,o=function(){if(ji in n){var t=n[ji];Ut(t)?t=a.getElements(a.create(t,!0)):t&&(t=a.getElements(t),de.command(t,"invalid elements",e.commandStr));var r=Yt(function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n,n}return e.ELEMENTS=null,null});return r.value=t,r}if(ji in i){var o=i[ji];return Gt(o,function(t,e){var r=t.shared,n=r.isBufferArgs,i=r.elements,a=t.invoke(e,o),s=e.def("null"),l=e.def(n,"(",a,")"),u=t.cond(l).then(s,"=",i,".createStream(",a,");").else(s,"=",i,".getElements(",a,");");return de.optional(function(){t.assert(u.else,"!"+a+"||"+s,"invalid elements")}),e.entry(u),e.exit(t.cond(l).then(i,".destroyStream(",s,");")),t.ELEMENTS=s,s})}return null}(),s=r(Bi,!0);return{elements:o,primitive:function(){if(Fi in n){var t=n[Fi];return de.commandParameter(t,Be,"invalid primitve",e.commandStr),Yt(function(e,r){return Be[t]})}if(Fi in i){var r=i[Fi];return Gt(r,function(t,e){var n=t.constants.primTypes,i=t.invoke(e,r);return de.optional(function(){t.assert(e,i+" in "+n,"invalid primitive, must be one of "+Object.keys(Be))}),e.def(n,"[",i,"]")})}return o?Ht(o)?Yt(o.value?function(t,e){return e.def(t.ELEMENTS,".primType")}:function(){return Aa}):new qt(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=t.ELEMENTS;return e.def(r,"?",r,".primType:",Aa)}):null}(),count:function(){if(Ni in n){var t=0|n[Ni] -;return de.command("number"==typeof t&&t>=0,"invalid vertex count",e.commandStr),Yt(function(){return t})}if(Ni in i){var r=i[Ni];return Gt(r,function(t,e){var n=t.invoke(e,r);return de.optional(function(){t.assert(e,"typeof "+n+'==="number"&&'+n+">=0&&"+n+"===("+n+"|0)","invalid vertex count")}),n})}if(o){if(Ht(o)){if(o)return s?new qt(s.thisDep,s.contextDep,s.propDep,function(t,e){var r=e.def(t.ELEMENTS,".vertCount-",t.OFFSET);return de.optional(function(){t.assert(e,r+">=0","invalid vertex offset/element buffer too small")}),r}):Yt(function(t,e){return e.def(t.ELEMENTS,".vertCount")});var a=Yt(function(){return-1});return de.optional(function(){a.MISSING=!0}),a}var l=new qt(o.thisDep||s.thisDep,o.contextDep||s.contextDep,o.propDep||s.propDep,function(t,e){var r=t.ELEMENTS;return t.OFFSET?e.def(r,"?",r,".vertCount-",t.OFFSET,":-1"):e.def(r,"?",r,".vertCount:-1")});return de.optional(function(){l.DYNAMIC=!0}),l}return null}(),instances:r(Ui,!1),offset:s}}function k(t,e){var r=t.static,i=t.dynamic,a={};return et.forEach(function(t){function o(e,n){if(t in r){var o=e(r[t]);a[s]=Yt(function(){return o})}else if(t in i){var l=i[t];a[s]=Gt(l,function(t,e){return n(t,e,t.invoke(e,l))})}}var s=m(t);switch(t){case gi:case si:case oi:case Ai:case hi:case Ci:case xi:case wi:case Mi:case pi:return o(function(r){return de.commandType(r,"boolean",t,e.commandStr),r},function(e,r,n){return de.optional(function(){e.assert(r,"typeof "+n+'==="boolean"',"invalid flag "+t,e.commandStr)}),n});case fi:return o(function(r){return de.commandParameter(r,Va,"invalid "+t,e.commandStr),Va[r]},function(e,r,n){var i=e.constants.compareFuncs;return de.optional(function(){e.assert(r,n+" in "+i,"invalid "+t+", must be one of "+Object.keys(Va))}),r.def(i,"[",n,"]")});case di:return o(function(t){return de.command(mt(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]&&t[0]<=t[1],"depth range is 2d array",e.commandStr),t},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===2&&typeof "+r+'[0]==="number"&&typeof '+r+'[1]==="number"&&'+r+"[0]<="+r+"[1]","depth range must be a 2d array")}),[e.def("+",r,"[0]"),e.def("+",r,"[1]")]});case ci:return o(function(t){de.commandType(t,"object","blend.func",e.commandStr);var r="srcRGB"in t?t.srcRGB:t.src,n="srcAlpha"in t?t.srcAlpha:t.src,i="dstRGB"in t?t.dstRGB:t.dst,a="dstAlpha"in t?t.dstAlpha:t.dst;return de.commandParameter(r,Ba,s+".srcRGB",e.commandStr),de.commandParameter(n,Ba,s+".srcAlpha",e.commandStr),de.commandParameter(i,Ba,s+".dstRGB",e.commandStr),de.commandParameter(a,Ba,s+".dstAlpha",e.commandStr),de.command(-1===Ua.indexOf(r+", "+i),"unallowed blending combination (srcRGB, dstRGB) = ("+r+", "+i+")",e.commandStr),[Ba[r],Ba[i],Ba[n],Ba[a]]},function(e,r,n){function i(i,o){var s=r.def('"',i,o,'" in ',n,"?",n,".",i,o,":",n,".",i);return de.optional(function(){e.assert(r,s+" in "+a,"invalid "+t+"."+i+o+", must be one of "+Object.keys(Ba))}),s}var a=e.constants.blendFuncs;de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid blend func, must be an object")});var o=i("src","RGB"),s=i("dst","RGB");de.optional(function(){var t=e.constants.invalidBlendCombinations;e.assert(r,t+".indexOf("+o+'+", "+'+s+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var l=r.def(a,"[",o,"]"),u=r.def(a,"[",i("src","Alpha"),"]");return[l,r.def(a,"[",s,"]"),u,r.def(a,"[",i("dst","Alpha"),"]")]});case ui:return o(function(r){return"string"==typeof r?(de.commandParameter(r,Z,"invalid "+t,e.commandStr),[Z[r],Z[r]]):"object"==typeof r?(de.commandParameter(r.rgb,Z,t+".rgb",e.commandStr),de.commandParameter(r.alpha,Z,t+".alpha",e.commandStr),[Z[r.rgb],Z[r.alpha]]):void de.commandRaise("invalid blend.equation",e.commandStr)},function(e,r,n){var i=e.constants.blendEquations,a=r.def(),o=r.def(),s=e.cond("typeof ",n,'==="string"');return de.optional(function(){function r(t,r,n){e.assert(t,n+" in "+i,"invalid "+r+", must be one of "+Object.keys(Z))}r(s.then,t,n),e.assert(s.else,n+"&&typeof "+n+'==="object"',"invalid "+t),r(s.else,t+".rgb",n+".rgb"),r(s.else,t+".alpha",n+".alpha")}),s.then(a,"=",o,"=",i,"[",n,"];"),s.else(a,"=",i,"[",n,".rgb];",o,"=",i,"[",n,".alpha];"),r(s),[a,o]});case li:return o(function(t){return de.command(mt(t)&&4===t.length,"blend.color must be a 4d array",e.commandStr),J(4,function(e){return+t[e]})},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===4","blend.color must be a 4d array")}),J(4,function(t){return e.def("+",r,"[",t,"]")})});case Ti:return o(function(t){return de.commandType(t,"number",s,e.commandStr),0|t},function(t,e,r){return de.optional(function(){t.assert(e,"typeof "+r+'==="number"',"invalid stencil.mask")}),e.def(r,"|0")});case Si:return o(function(r){de.commandType(r,"object",s,e.commandStr);var n=r.cmp||"keep",i=r.ref||0,a="mask"in r?r.mask:-1;return de.commandParameter(n,Va,t+".cmp",e.commandStr),de.commandType(i,"number",t+".ref",e.commandStr),de.commandType(a,"number",t+".mask",e.commandStr),[Va[n],i,a]},function(t,e,r){var n=t.constants.compareFuncs;return de.optional(function(){function i(){t.assert(e,Array.prototype.join.call(arguments,""),"invalid stencil.func")}i(r+"&&typeof ",r,'==="object"'),i('!("cmp" in ',r,")||(",r,".cmp in ",n,")")}),[e.def('"cmp" in ',r,"?",n,"[",r,".cmp]",":",Ia),e.def(r,".ref|0"),e.def('"mask" in ',r,"?",r,".mask|0:-1")]});case Ei:case Li:return o(function(r){de.commandType(r,"object",s,e.commandStr);var n=r.fail||"keep",i=r.zfail||"keep",a=r.zpass||"keep";return de.commandParameter(n,qa,t+".fail",e.commandStr),de.commandParameter(i,qa,t+".zfail",e.commandStr),de.commandParameter(a,qa,t+".zpass",e.commandStr),[t===Li?Sa:Ta,qa[n],qa[i],qa[a]]},function(e,r,n){function i(i){return de.optional(function(){e.assert(r,'!("'+i+'" in '+n+")||("+n+"."+i+" in "+a+")","invalid "+t+"."+i+", must be one of "+Object.keys(qa))}),r.def('"',i,'" in ',n,"?",a,"[",n,".",i,"]:",Ia)}var a=e.constants.stencilOps;return de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)}),[t===Li?Sa:Ta,i("fail"),i("zfail"),i("zpass")]});case _i:return o(function(t){de.commandType(t,"object",s,e.commandStr);var r=0|t.factor,n=0|t.units;return de.commandType(r,"number",s+".factor",e.commandStr),de.commandType(n,"number",s+".units",e.commandStr),[r,n]},function(e,r,n){return de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)}),[r.def(n,".factor|0"),r.def(n,".units|0")]});case vi:return o(function(t){var r=0;return"front"===t?r=Ta:"back"===t&&(r=Sa),de.command(!!r,s,e.commandStr),r},function(t,e,r){return de.optional(function(){t.assert(e,r+'==="front"||'+r+'==="back"',"invalid cull.face")}),e.def(r,'==="front"?',Ta,":",Sa)});case bi:return o(function(t){return de.command("number"==typeof t&&t>=n.lineWidthDims[0]&&t<=n.lineWidthDims[1],"invalid line width, must positive number between "+n.lineWidthDims[0]+" and "+n.lineWidthDims[1],e.commandStr),t},function(t,e,r){return de.optional(function(){t.assert(e,"typeof "+r+'==="number"&&'+r+">="+n.lineWidthDims[0]+"&&"+r+"<="+n.lineWidthDims[1],"invalid line width")}),r});case yi:return o(function(t){return de.commandParameter(t,Ya,s,e.commandStr),Ya[t]},function(t,e,r){return de.optional(function(){t.assert(e,r+'==="cw"||'+r+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),e.def(r+'==="cw"?'+Ea+":"+La)});case mi:return o(function(t){return de.command(mt(t)&&4===t.length,"color.mask must be length 4 array",e.commandStr),t.map(function(t){return!!t})},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===4","invalid color.mask")}),J(4,function(t){return"!!"+r+"["+t+"]"})});case ki:return o(function(t){de.command("object"==typeof t&&t,s,e.commandStr);var r="value"in t?t.value:1,n=!!t.invert;return de.command("number"==typeof r&&r>=0&&r<=1,"sample.coverage.value must be a number between 0 and 1",e.commandStr),[r,n]},function(t,e,r){return de.optional(function(){t.assert(e,r+"&&typeof "+r+'==="object"',"invalid sample.coverage")}),[e.def('"value" in ',r,"?+",r,".value:1"),e.def("!!",r,".invert")]})}}),a}function A(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach(function(t){var n,a=r[t];if("number"==typeof a||"boolean"==typeof a)n=Yt(function(){return a});else if("function"==typeof a){var o=a._reglType;"texture2d"===o||"textureCube"===o?n=Yt(function(t){return t.link(a)}):"framebuffer"===o||"framebufferCube"===o?(de.command(a.color.length>0,'missing color attachment for framebuffer sent to uniform "'+t+'"',e.commandStr),n=Yt(function(t){return t.link(a.color[0])})):de.commandRaise('invalid data for uniform "'+t+'"',e.commandStr)}else mt(a)?n=Yt(function(e){return e.global.def("[",J(a.length,function(r){return de.command("number"==typeof a[r]||"boolean"==typeof a[r],"invalid uniform "+t,e.commandStr),a[r]}),"]")}):de.commandRaise('invalid or missing data for uniform "'+t+'"',e.commandStr);n.value=a,i[t]=n}),Object.keys(n).forEach(function(t){var e=n[t];i[t]=Gt(e,function(t,r){return t.invoke(r,e)})}),i}function T(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach(function(t){var a=n[t],s=e.id(t),l=new W;if(Ut(a))l.state=$n,l.buffer=i.getBuffer(i.create(a,Zi,!1,!0)),l.type=0;else{var u=i.getBuffer(a);if(u)l.state=$n,l.buffer=u,l.type=0;else if(de.command("object"==typeof a&&a,"invalid data for attribute "+t,r.commandStr),a.constant){var c=a.constant;l.buffer="null",l.state=ti,"number"==typeof c?l.x=c:(de.command(mt(c)&&c.length>0&&c.length<=4,"invalid constant for attribute "+t,r.commandStr),Kn.forEach(function(t,e){e=0,'invalid offset for attribute "'+t+'"',r.commandStr);var f=0|a.stride;de.command(f>=0&&f<256,'invalid stride for attribute "'+t+'", must be integer betweeen [0, 255]',r.commandStr);var d=0|a.size;de.command(!("size"in a)||d>0&&d<=4,'invalid size for attribute "'+t+'", must be 1,2,3,4',r.commandStr);var p=!!a.normalized,m=0;"type"in a&&(de.commandParameter(a.type,ze,"invalid type for attribute "+t,r.commandStr),m=ze[a.type]);var g=0|a.divisor;"divisor"in a&&(de.command(0===g||K,'cannot specify divisor for attribute "'+t+'", instancing not supported',r.commandStr),de.command(g>=0,'invalid divisor for attribute "'+t+'"',r.commandStr)),de.optional(function(){var e=r.commandStr,n=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(a).forEach(function(r){de.command(n.indexOf(r)>=0,'unknown parameter "'+r+'" for attribute pointer "'+t+'" (valid parameters are '+n+")",e)})}),l.buffer=u,l.state=$n,l.size=d,l.normalized=p,l.type=m||u.dtype,l.offset=h,l.stride=f,l.divisor=g}}o[t]=Yt(function(t,e){var r=t.attribCache;if(s in r)return r[s];var n={isStream:!1};return Object.keys(l).forEach(function(t){n[t]=l[t]}),l.buffer&&(n.buffer=t.link(l.buffer),n.type=n.type||n.buffer+".dtype"),r[s]=n,n})}),Object.keys(a).forEach(function(t){function e(e,n){function i(t){n(u[t],"=",a,".",t,"|0;")}var a=e.invoke(n,r),o=e.shared,s=o.isBufferArgs,l=o.buffer;de.optional(function(){e.assert(n,a+"&&(typeof "+a+'==="object"||typeof '+a+'==="function")&&('+s+"("+a+")||"+l+".getBuffer("+a+")||"+l+".getBuffer("+a+".buffer)||"+s+"("+a+'.buffer)||("constant" in '+a+"&&(typeof "+a+'.constant==="number"||'+o.isArrayLike+"("+a+".constant))))",'invalid dynamic attribute "'+t+'"')});var u={isStream:n.def(!1)},c=new W;c.state=$n,Object.keys(c).forEach(function(t){u[t]=n.def(""+c[t])});var h=u.buffer,f=u.type;return n("if(",s,"(",a,")){",u.isStream,"=true;",h,"=",l,".createStream(",Zi,",",a,");",f,"=",h,".dtype;","}else{",h,"=",l,".getBuffer(",a,");","if(",h,"){",f,"=",h,".dtype;",'}else if("constant" in ',a,"){",u.state,"=",ti,";","if(typeof "+a+'.constant === "number"){',u[Kn[0]],"=",a,".constant;",Kn.slice(1).map(function(t){return u[t]}).join("="),"=0;","}else{",Kn.map(function(t,e){return u[t]+"="+a+".constant.length>="+e+"?"+a+".constant["+e+"]:0;"}).join(""),"}}else{","if(",s,"(",a,".buffer)){",h,"=",l,".createStream(",Zi,",",a,".buffer);","}else{",h,"=",l,".getBuffer(",a,".buffer);","}",f,'="type" in ',a,"?",o.glTypes,"[",a,".type]:",h,".dtype;",u.normalized,"=!!",a,".normalized;"),i("size"),i("offset"),i("stride"),i("divisor"),n("}}"),n.exit("if(",u.isStream,"){",l,".destroyStream(",h,");","}"),u}var r=a[t];o[t]=Gt(r,e)}),o}function S(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=Yt(function(t,e){return"number"==typeof r||"boolean"==typeof r?""+r:t.link(r)})}),Object.keys(r).forEach(function(t){var e=r[t];n[t]=Gt(e,function(t,r){return t.invoke(r,e)})}),n}function E(t,e,r,n,i){function a(t){var e=u[t];e&&(h[t]=e)}var o=t.static,s=t.dynamic;de.optional(function(){function t(t){Object.keys(t).forEach(function(t){de.command(e.indexOf(t)>=0,'unknown parameter "'+t+'"',i.commandStr)})}var e=[Pi,Oi,Ri,ji,Fi,Bi,Ni,Ui,Ii].concat(et);t(o),t(s)});var l=x(t,i),u=_(t,l,i),c=M(t,i),h=k(t,i),f=w(t,i);a(Di),a(m(zi));var d=Object.keys(h).length>0,p={framebuffer:l,draw:c,shader:f,state:h,dirty:d};return p.profile=b(t,i),p.uniforms=A(r,i),p.attributes=T(e,i),p.context=S(n,i),p}function L(t,e,r){var n=t.shared,i=n.context,a=t.scope();Object.keys(r).forEach(function(n){e.save(i,"."+n);var o=r[n];a(i,".",n,"=",o.append(t,e),";")}),e(a)}function C(t,e,r,n){var i,a=t.shared,o=a.gl,s=a.framebuffer;Q&&(i=e.def(a.extensions,".webgl_draw_buffers"));var l,u=t.constants,c=u.drawBuffer,h=u.backBuffer;l=r?r.append(t,e):e.def(s,".next"),n||e("if(",l,"!==",s,".cur){"),e("if(",l,"){",o,".bindFramebuffer(",Fa,",",l,".framebuffer);"),Q&&e(i,".drawBuffersWEBGL(",c,"[",l,".colorAttachments.length]);"),e("}else{",o,".bindFramebuffer(",Fa,",null);"),Q&&e(i,".drawBuffersWEBGL(",h,");"),e("}",s,".cur=",l,";"),n||e("}")}function z(t,e,r){var n=t.shared,i=n.gl,a=t.current,o=t.next,s=n.current,l=n.next,u=t.cond(s,".dirty");et.forEach(function(e){var n=m(e);if(!(n in r.state)){var c,h;if(n in o){c=o[n],h=a[n];var f=J($[n].length,function(t){return u.def(c,"[",t,"]")});u(t.cond(f.map(function(t,e){return t+"!=="+h+"["+e+"]"}).join("||")).then(i,".",nt[n],"(",f,");",f.map(function(t,e){return h+"["+e+"]="+t}).join(";"),";"))}else{c=u.def(l,".",n);var d=t.cond(c,"!==",s,".",n);u(d),n in rt?d(t.cond(c).then(i,".enable(",rt[n],");").else(i,".disable(",rt[n],");"),s,".",n,"=",c,";"):d(i,".",nt[n],"(",c,");",s,".",n,"=",c,";")}}}),0===Object.keys(r.state).length&&u(s,".dirty=false;"),e(u)}function D(t,e,r,n){var i=t.shared,a=t.current,o=i.current,s=i.gl;Vt(Object.keys(r)).forEach(function(i){var l=r[i];if(!n||n(l)){var u=l.append(t,e);if(rt[i]){var c=rt[i];Ht(l)?u?e(s,".enable(",c,");"):e(s,".disable(",c,");"):e(t.cond(u).then(s,".enable(",c,");").else(s,".disable(",c,");")),e(o,".",i,"=",u,";")}else if(mt(u)){var h=a[i];e(s,".",nt[i],"(",u,");",u.map(function(t,e){return h+"["+e+"]="+t}).join(";"),";")}else e(s,".",nt[i],"(",u,");",o,".",i,"=",u,";")}})}function I(t,e){K&&(t.instancing=e.def(t.shared.extensions,".angle_instanced_arrays"))}function P(t,e,r,n,i){function a(){return"undefined"==typeof performance?"Date.now()":"performance.now()"}function o(t){u=e.def(),t(u,"=",a(),";"),"string"==typeof i?t(p,".count+=",i,";"):t(p,".count++;"),d&&(n?(c=e.def(),t(c,"=",g,".getNumPendingQueries();")):t(g,".beginQuery(",p,");"))}function s(t){t(p,".cpuTime+=",a(),"-",u,";"),d&&(n?t(g,".pushScopeStats(",c,",",g,".getNumPendingQueries(),",p,");"):t(g,".endQuery();"))}function l(t){var r=e.def(m,".profile");e(m,".profile=",t,";"),e.exit(m,".profile=",r,";")}var u,c,h,f=t.shared,p=t.stats,m=f.current,g=f.timer,v=r.profile;if(v){if(Ht(v))return void(v.enable?(o(e),s(e.exit),l("true")):l("false"));h=v.append(t,e),l(h)}else h=e.def(m,".profile");var y=t.block();o(y),e("if(",h,"){",y,"}");var b=t.block();s(b),e.exit("if(",h,"){",b,"}")}function O(t,e,r,n,i){function a(t){switch(t){case ua:case da:case va:return 2;case ca:case pa:case ya:return 3;case ha:case ma:case ba:return 4;default:return 1}}function o(r,n,i){function a(){e("if(!",c,".buffer){",l,".enableVertexAttribArray(",u,");}");var r,a=i.type;if(r=i.size?e.def(i.size,"||",n):n,e("if(",c,".type!==",a,"||",c,".size!==",r,"||",p.map(function(t){return c+"."+t+"!=="+i[t]}).join("||"),"){",l,".bindBuffer(",Zi,",",f,".buffer);",l,".vertexAttribPointer(",[u,r,a,i.normalized,i.stride,i.offset],");",c,".type=",a,";",c,".size=",r,";",p.map(function(t){return c+"."+t+"="+i[t]+";"}).join(""),"}"),K){var o=i.divisor;e("if(",c,".divisor!==",o,"){",t.instancing,".vertexAttribDivisorANGLE(",[u,o],");",c,".divisor=",o,";}")}}function o(){e("if(",c,".buffer){",l,".disableVertexAttribArray(",u,");","}if(",Kn.map(function(t,e){return c+"."+t+"!=="+d[e]}).join("||"),"){",l,".vertexAttrib4f(",u,",",d,");",Kn.map(function(t,e){return c+"."+t+"="+d[e]+";"}).join(""),"}")}var l=s.gl,u=e.def(r,".location"),c=e.def(s.attributes,"[",u,"]"),h=i.state,f=i.buffer,d=[i.x,i.y,i.z,i.w],p=["buffer","normalized","offset","stride"];h===$n?a():h===ti?o():(e("if(",h,"===",$n,"){"),a(),e("}else{"),o(),e("}"))}var s=t.shared;n.forEach(function(n){var s,l=n.name,u=r.attributes[l];if(u){if(!i(u))return;s=u.append(t,e)}else{if(!i(Ga))return;var c=t.scopeAttrib(l);de.optional(function(){t.assert(e,c+".state","missing attribute "+l)}),s={},Object.keys(new W).forEach(function(t){s[t]=e.def(c,".",t)})}o(t.link(n),a(n.info.type),s)})}function R(t,r,n,i,a){for(var o,s=t.shared,l=s.gl,u=0;u1?J(_,function(t){return c+"["+t+"]"}):c);r(");")}}function j(t,e,r,n){function i(i){var a=c[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(u,".",i)}function a(){function t(){r(g,".drawElementsInstancedANGLE(",[f,p,v,d+"<<(("+v+"-"+Qn+")>>1)",m],");")}function e(){r(g,".drawArraysInstancedANGLE(",[f,d,p,m],");")}h?y?t():(r("if(",h,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(l+".drawElements("+[f,p,v,d+"<<(("+v+"-"+Qn+")>>1)"]+");")}function e(){r(l+".drawArrays("+[f,d,p]+");")}h?y?t():(r("if(",h,"){"),t(),r("}else{"),e(),r("}")):e()}var s=t.shared,l=s.gl,u=s.draw,c=n.draw,h=function(){var i,a=c.elements,o=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(o=r),i=a.append(t,o)):i=o.def(u,".",ji),i&&o("if("+i+")"+l+".bindBuffer("+Ji+","+i+".buffer.buffer);"),i}(),f=i(Fi),d=i(Bi),p=function(){var i,a=c.count,o=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(o=r),i=a.append(t,o),de.optional(function(){a.MISSING&&t.assert(e,"false","missing vertex count"),a.DYNAMIC&&t.assert(o,i+">=0","missing vertex count")})):(i=o.def(u,".",Ni),de.optional(function(){t.assert(o,i+">=0","missing vertex count")})),i}();if("number"==typeof p){if(0===p)return}else r("if(",p,"){"),r.exit("}");var m,g;K&&(m=i(Ui),g=t.instancing);var v=h+".type",y=c.elements&&Ht(c.elements);K&&("number"!=typeof m||m>=0)?"string"==typeof m?(r("if(",m,">0){"),a(),r("}else if(",m,"<0){"),o(),r("}")):a():o()}function F(t,e,r,n,i){var a=y(),o=a.proc("body",i);return de.optional(function(){a.commandStr=e.commandStr,a.command=a.link(e.commandStr)}),K&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),t(a,o,r,n),a.compile().body}function N(t,e,r,n){I(t,e),O(t,e,r,n.attributes,function(){return!0}),R(t,e,r,n.uniforms,function(){return!0}),j(t,e,e,r)}function B(t,e){var r=t.proc("draw",1);I(t,r),L(t,r,e.context),C(t,r,e.framebuffer),z(t,r,e),D(t,r,e.state),P(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,".useProgram(",n,".program);"),e.shader.program)N(t,r,e,e.shader.program);else{var i=t.global.def("{}"),a=r.def(n,".id"),o=r.def(i,"[",a,"]");r(t.cond(o).then(o,".call(this,a0);").else(o,"=",i,"[",a,"]=",t.link(function(r){return F(N,t,e,r,1)}),"(",n,");",o,".call(this,a0);"))}Object.keys(e.state).length>0&&r(t.shared.current,".dirty=true;")}function U(t,e,r,n){function i(){return!0}t.batchId="a1",I(t,e),O(t,e,r,n.attributes,i),R(t,e,r,n.uniforms,i),j(t,e,e,r)}function V(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}I(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var u=t.scope(),c=t.scope();if(e(u.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",c,"}",u.exit),r.needsContext&&L(t,c,r.context),r.needsFramebuffer&&C(t,c,r.framebuffer),D(t,c,r.state,i),r.profile&&i(r.profile)&&P(t,c,r,!1,!0),n)O(t,u,r,n.attributes,a),O(t,c,r,n.attributes,i),R(t,u,r,n.uniforms,a),R(t,c,r,n.uniforms,i),j(t,u,c,r);else{var h=t.global.def("{}"),f=r.shader.progVar.append(t,c),d=c.def(f,".id"),p=c.def(h,"[",d,"]");c(t.shared.gl,".useProgram(",f,".program);","if(!",p,"){",p,"=",h,"[",d,"]=",t.link(function(e){return F(U,t,r,e,2)}),"(",f,");}",p,".call(this,a0[",s,"],",s,");")}}function q(t,e){function r(t){return t.contextDep&&i||t.propDep}var n=t.proc("batch",2);t.batchId="0",I(t,n);var i=!1,a=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(L(t,n,e.context),a=!1);var o=e.framebuffer,s=!1;o?(o.propDep?i=s=!0:o.contextDep&&i&&(s=!0),s||C(t,n,o)):C(t,n,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),z(t,n,e),D(t,n,e.state,function(t){return!r(t)}),e.profile&&r(e.profile)||P(t,n,e,!1,"a1"),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=s;var l=e.shader.progVar;if(l.contextDep&&i||l.propDep)V(t,n,e,null);else{var u=l.append(t,n);if(n(t.shared.gl,".useProgram(",u,".program);"),e.shader.program)V(t,n,e,e.shader.program);else{var c=t.global.def("{}"),h=n.def(u,".id"),f=n.def(c,"[",h,"]");n(t.cond(f).then(f,".call(this,a0,a1);").else(f,"=",c,"[",h,"]=",t.link(function(r){return F(V,t,e,r,2)}),"(",u,");",f,".call(this,a0,a1);"))}}Object.keys(e.state).length>0&&n(t.shared.current,".dirty=true;")}function H(t,r){function n(e){var n=r.shader[e];n&&i.set(a.shader,"."+e,n.append(t,i))}var i=t.proc("scope",3);t.batchId="a2";var a=t.shared,o=a.current;L(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),Vt(Object.keys(r.state)).forEach(function(e){var n=r.state[e],o=n.append(t,i);mt(o)?o.forEach(function(r,n){i.set(t.next[e],"["+n+"]",r)}):i.set(a.next,"."+e,o)}),P(t,i,r,!0,!0),[ji,Bi,Ni,Ui,Fi].forEach(function(e){var n=r.draw[e];n&&i.set(a.draw,"."+e,""+n.append(t,i))}),Object.keys(r.uniforms).forEach(function(n){i.set(a.uniforms,"["+e.id(n)+"]",r.uniforms[n].append(t,i))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new W).forEach(function(t){i.set(a,"."+t,n[t])})}),n(Oi),n(Ri),Object.keys(r.state).length>0&&(i(o,".dirty=true;"),i.exit(o,".dirty=true;")),i("a1(",t.shared.context,",a0,",t.batchId,");")}function Y(t){if("object"==typeof t&&!mt(t)){for(var e=Object.keys(t),r=0;r=0;--t){var r=H[t];r&&r(E,null,0)}v.flush(),k&&k.update()}function r(){!J&&H.length>0&&(J=ve.next(e))}function n(){J&&(ve.cancel(e),J=null)}function i(t){t.preventDefault(),b=!0,n(),Y.forEach(function(t){t()})}function a(t){v.getError(),b=!1,x.restore(),O.restore(),D.restore(),R.restore(),j.restore(),F.restore(),k&&k.restore(),N.procs.refresh(),r(),G.forEach(function(t){t()})}function o(){H.length=0,n(),q&&(q.removeEventListener(eo,i),q.removeEventListener(ro,a)),O.clear(),F.clear(),j.clear(),R.clear(),I.clear(),D.clear(),k&&k.clear(),Z.forEach(function(t){t()})}function s(t){function e(t){var e={},r={};return Object.keys(t).forEach(function(n){var i=t[n];ge.isDynamic(i)?r[n]=ge.unbox(i,n):e[n]=i}),{dynamic:r,static:e}}function r(t){for(;d.length0)return h.call(this,r(0|t),0|t)}else{if(!Array.isArray(t))return c.call(this,t);if(t.length)return h.call(this,t,t.length)}}de(!!t,"invalid args to regl({...})"),de.type(t,"object","invalid args to regl({...})");var i=e(t.context||{}),a=e(t.uniforms||{}),o=e(t.attributes||{}),s=e(function(t){function e(t){if(t in r){var e=r[t];delete r[t],Object.keys(e).forEach(function(n){r[t+"."+n]=e[n]})}}var r=$t({},t);return delete r.uniforms,delete r.attributes,delete r.context,"stencil"in r&&r.stencil.op&&(r.stencil.opBack=r.stencil.opFront=r.stencil.op, -delete r.stencil.op),e("blend"),e("depth"),e("cull"),e("stencil"),e("polygonOffset"),e("scissor"),e("sample"),r}(t)),l={gpuTime:0,cpuTime:0,count:0},u=N.compile(s,o,a,i,l),c=u.draw,h=u.batch,f=u.scope,d=[];return $t(n,{stats:l})}function l(t,e){var r=0;N.procs.poll();var n=e.color;n&&(v.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=Ka),"depth"in e&&(v.clearDepth(+e.depth),r|=Qa),"stencil"in e&&(v.clearStencil(0|e.stencil),r|=$a),de(!!r,"called regl.clear with no buffer specified"),v.clear(r)}function u(t){if(de("object"==typeof t&&t,"regl.clear() takes an object as input"),"framebuffer"in t)if(t.framebuffer&&"framebufferCube"===t.framebuffer_reglType)for(var e=0;e<6;++e)K($t({framebuffer:t.framebuffer.faces[e]},t),l);else K(t,l);else l(null,t)}function c(t){function e(){function e(){var t=Zt(H,e);H[t]=H[H.length-1],H.length-=1,H.length<=0&&n()}var r=Zt(H,t);de(r>=0,"cannot cancel a frame twice"),H[r]=e}return de.type(t,"function","regl.frame() callback must be a function"),H.push(t),r(),{cancel:e}}function h(){var t=V.viewport,e=V.scissor_box;t[0]=t[1]=e[0]=e[1]=0,E.viewportWidth=E.framebufferWidth=E.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,E.viewportHeight=E.framebufferHeight=E.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function f(){E.tick+=1,E.time=p(),h(),N.procs.poll()}function d(){h(),N.procs.refresh(),k&&k.update()}function p(){return(ye()-A)/1e3}function m(t,e){de.type(e,"function","listener callback must be a function");var r;switch(t){case"frame":return c(e);case"lost":r=Y;break;case"restore":r=G;break;case"destroy":r=Z;break;default:de.raise("invalid event, must be one of frame,lost,restore,destroy")}return r.push(e),{cancel:function(){for(var t=0;t=0},read:U,destroy:o,_gl:v,_refresh:d,poll:function(){f(),k&&k.update()},now:p,stats:w});return g.onDone(null,Q),Q}var Kt={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Qt=function(t){return Object.prototype.toString.call(t)in Kt},$t=function(t,e){for(var r=Object.keys(e),n=0;n=2,"invalid renderbuffer shape"),a=0|d[0],o=0|d[1]}else"radius"in f&&(a=o=0|f.radius),"width"in f&&(a=0|f.width),"height"in f&&(o=0|f.height);"format"in f&&(de.parameter(f.format,u,"invalid renderbuffer format"),l=u[f.format])}else"number"==typeof e?(a=0|e,o="number"==typeof n?0|n:a):e?de.raise("invalid arguments to renderbuffer constructor"):a=o=1;if(de(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),a!==h.width||o!==h.height||l!==h.format)return s.width=h.width=a,s.height=h.height=o,h.format=l,t.bindRenderbuffer(xn,h.renderbuffer),t.renderbufferStorage(xn,l,a,o),i.profile&&(h.stats.size=Dt(h.format,h.width,h.height)),s.format=c[h.format],s}function l(e,n){var a=0|e,o=0|n||a;return a===h.width&&o===h.height?s:(de(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),s.width=h.width=a,s.height=h.height=o,t.bindRenderbuffer(xn,h.renderbuffer),t.renderbufferStorage(xn,h.format,a,o),i.profile&&(h.stats.size=Dt(h.format,h.width,h.height)),s)}var h=new a(t.createRenderbuffer());return f[h.id]=h,n.renderbufferCount++,s(e,o),s.resize=l,s._reglType="renderbuffer",s._renderbuffer=h,i.profile&&(s.stats=h.stats),s.destroy=function(){h.decRef()},s}function l(){xe(f).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(xn,e.renderbuffer),t.renderbufferStorage(xn,e.format,e.width,e.height)}),t.bindRenderbuffer(xn,null)}var u={rgba4:_n,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};e.ext_srgb&&(u.srgba=35907),e.ext_color_buffer_half_float&&(u.rgba16f=34842,u.rgb16f=34843),e.webgl_color_buffer_float&&(u.rgba32f=34836);var c=[];Object.keys(u).forEach(function(t){var e=u[t];c[e]=t});var h=0,f={};return a.prototype.decRef=function(){--this.refCount<=0&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:s,clear:function(){xe(f).forEach(o)},restore:l}},kn=36160,An=36161,Tn=3553,Sn=34069,En=36064,Ln=36096,Cn=36128,zn=33306,Dn=36053,In=6402,Pn=[6408],On=[];On[6408]=4;var Rn=[];Rn[5121]=1,Rn[5126]=4,Rn[36193]=2;var jn=33189,Fn=36168,Nn=34041,Bn=[32854,32855,36194,35907,34842,34843,34836],Un={};Un[Dn]="complete",Un[36054]="incomplete attachment",Un[36057]="incomplete dimensions",Un[36055]="incomplete, missing attachment",Un[36061]="unsupported";var Vn=5126,qn=35632,Hn=35633,Yn=35718,Gn=35721,Xn=6408,Wn=5121,Zn=3333,Jn=5126,Kn="xyzw".split(""),Qn=5121,$n=1,ti=2,ei=0,ri=1,ni=2,ii=3,ai=4,oi="dither",si="blend.enable",li="blend.color",ui="blend.equation",ci="blend.func",hi="depth.enable",fi="depth.func",di="depth.range",pi="depth.mask",mi="colorMask",gi="cull.enable",vi="cull.face",yi="frontFace",bi="lineWidth",xi="polygonOffset.enable",_i="polygonOffset.offset",wi="sample.alpha",Mi="sample.enable",ki="sample.coverage",Ai="stencil.enable",Ti="stencil.mask",Si="stencil.func",Ei="stencil.opFront",Li="stencil.opBack",Ci="scissor.enable",zi="scissor.box",Di="viewport",Ii="profile",Pi="framebuffer",Oi="vert",Ri="frag",ji="elements",Fi="primitive",Ni="count",Bi="offset",Ui="instances",Vi=Pi+"Width",qi=Pi+"Height",Hi=Di+"Width",Yi=Di+"Height",Gi="drawingBufferWidth",Xi="drawingBufferHeight",Wi=[ci,ui,Si,Ei,Li,ki,Di,zi,_i],Zi=34962,Ji=34963,Ki=3553,Qi=34067,$i=2884,ta=3042,ea=3024,ra=2960,na=2929,ia=3089,aa=32823,oa=32926,sa=32928,la=5126,ua=35664,ca=35665,ha=35666,fa=5124,da=35667,pa=35668,ma=35669,ga=35670,va=35671,ya=35672,ba=35673,xa=35674,_a=35675,wa=35676,Ma=35678,ka=35680,Aa=4,Ta=1028,Sa=1029,Ea=2304,La=2305,Ca=32775,za=32776,Da=519,Ia=7680,Pa=0,Oa=1,Ra=32774,ja=513,Fa=36160,Na=36064,Ba={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Ua=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],Va={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},qa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ha={frag:35632,vert:35633},Ya={cw:Ea,ccw:La},Ga=new qt(!1,!1,!1,function(){}),Xa=34918,Wa=34919,Za=35007,Ja=function(t,e){function r(){return f.pop()||h.createQueryEXT()}function n(t){f.push(t)}function i(t){var e=r();h.beginQueryEXT(Za,e),d.push(e),u(d.length-1,d.length,t)}function a(){h.endQueryEXT(Za)}function o(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}function s(){return p.pop()||new o}function l(t){p.push(t)}function u(t,e,r){var n=s();n.startQueryIndex=t,n.endQueryIndex=e,n.sum=0,n.stats=r,m.push(n)}function c(){var t,e,r=d.length;if(0!==r){v.length=Math.max(v.length,r+1),g.length=Math.max(g.length,r+1),g[0]=0,v[0]=0;var i=0;for(t=0,e=0;e=r)return a.substr(0,r);for(;r>a.length&&e>1;)1&e&&(a+=t),e>>=1,t+=t;return a+=t,a=a.substr(0,r)}var i,a="";e.exports=n},{}],489:[function(e,r,n){!function(e,i){"function"==typeof t&&t.amd?t(i):"object"==typeof n?r.exports=i():e.resolveUrl=i()}(this,function(){function t(){var t=arguments.length;if(0===t)throw new Error("resolveUrl requires at least one argument; got none.");var e=document.createElement("base");if(e.href=arguments[0],1===t)return e.href;var r=document.getElementsByTagName("head")[0];r.insertBefore(e,r.firstChild);for(var n,i=document.createElement("a"),a=1;a=0;--i){var a=r,o=t[i];r=a+o;var s=r-a,l=o-s;l&&(t[--n]=r,r=l)}for(var u=0,i=n;i>1;return["sum(",o(t.slice(0,e)),",",o(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("");for(var e=[],r=0;r>1;return["sum(",a(t.slice(0,e)),",",a(t.slice(e)),")"].join("")}function o(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return o(e,t)}function s(t){return!0&t?"-":""}function l(t){if(2===t.length)return[["diff(",o(t[0][0],t[1][1]),",",o(t[1][0],t[0][1]),")"].join("")];for(var e=[],r=0;r0&&r.push(","),r.push("[");for(var a=0;a0&&r.push(","),a===n?r.push("+b[",i,"]"):r.push("+A[",i,"][",a,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",e);var s=new Function("det",r.join(""));return s(t<6?o[t]:o)}function i(){return[0]}function a(t,e){return[[e[0]],[t[0][0]]]}var o=t("robust-determinant"),s=6,l=[i,a];!function(){for(;l.length>1;return["sum(",o(t.slice(0,e)),",",o(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],r=0;r0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=3.3306690738754716e-16*n;return o>=s||o<=-s?o:m(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],u=r[1]-n[1],c=t[2]-n[2],h=e[2]-n[2],f=r[2]-n[2],d=a*u,p=o*l,m=o*s,v=i*u,y=i*l,b=a*s,x=c*(d-p)+h*(m-v)+f*(y-b),_=(Math.abs(d)+Math.abs(p))*Math.abs(c)+(Math.abs(m)+Math.abs(v))*Math.abs(h)+(Math.abs(y)+Math.abs(b))*Math.abs(f),w=7.771561172376103e-16*_;return x>w||-x>w?x:g(t,e,r,n)}];!function(){for(;v.length<=p;)v.push(l(v.length));for(var t=[],r=["slow"],n=0;n<=p;++n)t.push("a"+n),r.push("o"+n);for(var i=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"],n=2;n<=p;++n)i.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i0&&s>0||o<0&&s<0)return!1;var l=a(r,t,e),u=a(i,t,e);return!(l>0&&u>0||l<0&&u<0)&&(0!==o||0!==s||0!==l||0!==u||n(t,e,r,i))}e.exports=i;var a=t("robust-orientation")[3]},{"robust-orientation":496}],500:[function(t,e,r){"use strict";function n(t,e){var r=t+e,n=r-t,i=r-n,a=e-n,o=t-i,s=o+a;return s?[s,r]:[r]}function i(t,e){var r=0|t.length,i=0|e.length;if(1===r&&1===i)return n(t[0],-e[0]);var a,o,s=r+i,l=new Array(s),u=0,c=0,h=0,f=Math.abs,d=t[c],p=f(d),m=-e[h],g=f(m);p=i?(a=d,(c+=1)=i?(a=d,(c+=1)0){for(var s=0,l=0,u=0;un.h||t>n.free||rc)&&(h=2*Math.max(t,c)),(ll)&&(u=2*Math.max(r,l)),this.resize(h,u),this.packOne(t,r)}return null},t.prototype.clear=function(){this.shelves=[],this.stats={}},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;rthis.free||e>this.h)return null;var r=this.x;return this.x+=t,this.free-=t,{x:r,y:this.y,w:t,h:e,width:t,height:e}},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t})},{}],503:[function(t,e,r){"use strict";e.exports=function(t){return t<0?-1:t>0?1:0}},{}],504:[function(t,e,r){"use strict";function n(t){return a(i(t))}e.exports=n;var i=t("boundary-cells"),a=t("reduce-simplicial-complex")},{"boundary-cells":61,"reduce-simplicial-complex":486}],505:[function(t,e,r){"use strict";function n(t){for(var e=t.length,r=0,n=0;n>1,v=E[2*m+1];","if(v===b){return m}","if(b1;--n){n0&&l.push(","),l.push("[");for(var n=0;n0&&l.push(","),l.push("B(C,E,c[",i[0],"],c[",i[1],"])")}l.push("]")}l.push(");")}}(i[s]),l.push("break;");l.push("}}")}return l.push("}return R;};return getContour",t,"d"),new Function("pool",l.join(""))(a)}function i(t){var e=s[t];return e||(e=s[t]=n(t)),e}e.exports=i;var a=t("typedarray-pool"),o=t("marching-simplex-table"),s={}},{"marching-simplex-table":434,"typedarray-pool":528}],507:[function(t,e,r){"use strict";"use restrict";function n(t){for(var e=0,r=Math.max,n=0,i=t.length;n>1,s=o(t[a],e);s<=0?(0===s&&(i=a),r=a+1):s>0&&(n=a-1)}return i}function h(t,e){for(var r=new Array(t.length),n=0,i=r.length;n=t.length||0!==o(t[m],a))break}return r}function f(t,e){if(!e)return h(u(p(t,0)),t,0);for(var r=new Array(e),n=0;n>>c&1&&u.push(i[c]);e.push(u)}return l(e)}function p(t,e){if(e<0)return[];for(var r=[],n=(1<>1:(t>>1)-1}function u(t){for(var e=s(t);;){var r=e,n=2*t+1,i=2*(t+1),o=t;if(n0;){var r=l(t);if(r>=0){if(e0){var t=k[0];return a(0,T-1),T-=1,u(0),t}return-1}function f(t,e){var r=k[t];return y[r]===e?t:(y[r]=-1/0,c(t),h(),y[r]=e,T+=1,c(T-1))}function d(t,e){if(t[e]<0)return e;var r=e,n=e;do{var i=t[n];if(!b[n]||i<0||i===n)break;if(n=i,i=t[n],!b[n]||i<0||i===n)break;n=i,r=t[r]}while(r!==n);for(var a=e;a!==n;a=t[a])t[a]=n;return n}for(var p=e.length,m=t.length,g=new Array(p),v=new Array(p),y=new Array(p),b=new Array(p),x=0;x>1;x>=0;--x)u(x);for(;;){var S=h();if(S<0||y[S]>r)break;!function(t){if(!b[t]){b[t]=!0;var e=g[t],r=v[t];g[r]>=0&&(g[r]=e),v[e]>=0&&(v[e]=r),A[e]>=0&&f(A[e],i(e)),A[r]>=0&&f(A[r],i(r))}}(S)}for(var E=[],x=0;x=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&L.push([n,i])}}),o.unique(o.normalize(L)),{positions:E,edges:L}}e.exports=i;var a=t("robust-orientation"),o=t("simplicial-complex")},{"robust-orientation":496,"simplicial-complex":509}],512:[function(t,e,r){"use strict";function n(t,e){var r,n;if(e[0][0]e[1][0])){var i=Math.min(t[0][1],t[1][1]),o=Math.max(t[0][1],t[1][1]),s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]);return ol?i-l:o-l}r=e[1],n=e[0]}var u,c;t[0][1]e[1][0]))return n(e,t);r=e[1],i=e[0]}var o,s;if(t[0][0]t[1][0]))return-n(t,e);o=t[1],s=t[0]}var l=a(r,i,s),u=a(r,i,o);if(l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;if(l=a(s,o,i),u=a(s,o,r),l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;return i[0]-s[0]}e.exports=i;var a=t("robust-orientation")},{"robust-orientation":496}],513:[function(t,e,r){"use strict";function n(t,e,r){this.slabs=t,this.coordinates=e,this.horizontal=r}function i(t,e){return t.y-e}function a(t,e){for(var r=null;t;){var n,i,o=t.key;o[0][0]0)if(e[0]!==o[1][0])r=t,t=t.right;else{var l=a(t.right,e);if(l)return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l=a(t.right,e);if(l)return l;t=t.left}}return r}function o(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function s(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}function l(t){for(var e=t.length,r=2*e,i=new Array(r),a=0;a0){var s=a(this.slabs[e-1],t);s&&(o?f(s.key,o)>0&&(o=s.key,n=s.value):(n=s.value,o=s.key))}var l=this.horizontal[e];if(l.length>0){var c=u.ge(l,t[1],i);if(c=l.length)return n;d=l[c]}}if(d.start)if(o){var p=h(o[0],o[1],[t[0],d.y]);o[0][0]>o[1][0]&&(p=-p),p>0&&(n=d.index)}else n=d.index;else d.y!==t[1]&&(n=d.index)}}}return n}},{"./lib/order-segments":512,"binary-search-bounds":58,"functional-red-black-tree":127,"robust-orientation":496}],514:[function(t,e,r){"use strict";function n(t,e){var r=u(l(t,e),[e[e.length-1]]);return r[r.length-1]}function i(t,e,r,n){var i=n-e,a=-e/i;a<0?a=0:a>1&&(a=1);for(var o=1-a,s=t.length,l=new Array(s),u=0;u0||o>0&&c<0){var h=i(s,c,l,o);r.push(h),a.push(h.slice())}c<0?a.push(l.slice()):c>0?r.push(l.slice()):(r.push(l.slice()),a.push(l.slice())),o=c}return{positive:r,negative:a}}function o(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l0||a>0&&u<0)&&r.push(i(o,u,s,a)),u>=0&&r.push(s.slice()),a=u}return r}function s(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l0||a>0&&u<0)&&r.push(i(o,u,s,a)),u<=0&&r.push(s.slice()),a=u}return r}var l=t("robust-dot-product"),u=t("robust-sum");e.exports=a,e.exports.positive=o,e.exports.negative=s},{"robust-dot-product":493,"robust-sum":501}],515:[function(e,r,n){!function(e){function r(){var t=arguments[0],e=r.cache;return e[t]&&e.hasOwnProperty(t)||(e[t]=r.parse(t)),r.format.call(null,e[t],arguments)}function i(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function a(t,e){return Array(e+1).join(t)}var o={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};r.format=function(t,e){var n,s,l,u,c,h,f,d=1,p=t.length,m="",g=[],v=!0,y="";for(s=0;s=0),u[8]){case"b":n=n.toString(2);break;case"c":n=String.fromCharCode(n);break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,u[6]?parseInt(u[6]):0);break;case"e":n=u[7]?n.toExponential(u[7]):n.toExponential();break;case"f":n=u[7]?parseFloat(n).toFixed(u[7]):parseFloat(n);break;case"g":n=u[7]?parseFloat(n).toPrecision(u[7]):parseFloat(n);break;case"o":n=n.toString(8);break;case"s":n=(n=String(n))&&u[7]?n.substring(0,u[7]):n;break;case"u":n>>>=0;break;case"x":n=n.toString(16);break;case"X":n=n.toString(16).toUpperCase()}o.json.test(u[8])?g[g.length]=n:(!o.number.test(u[8])||v&&!u[3]?y="":(y=v?"+":"-",n=n.toString().replace(o.sign,"")),h=u[4]?"0"===u[4]?"0":u[4].charAt(1):" ",f=u[6]-(y+n).length,c=u[6]&&f>0?a(h,f):"",g[g.length]=u[5]?y+n+c:"0"===h?y+c+n:c+y+n)}return g.join("")},r.cache={},r.parse=function(t){for(var e=t,r=[],n=[],i=0;e;){if(null!==(r=o.text.exec(e)))n[n.length]=r[0];else if(null!==(r=o.modulo.exec(e)))n[n.length]="%";else{if(null===(r=o.placeholder.exec(e)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){i|=1;var a=[],s=r[2],l=[];if(null===(l=o.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a[a.length]=l[1];""!==(s=s.substring(l[0].length));)if(null!==(l=o.key_access.exec(s)))a[a.length]=l[1];else{if(null===(l=o.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a[a.length]=l[1]}r[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n[n.length]=r}e=e.substring(r[0].length)}return n};var s=function(t,e,n){return n=(e||[]).slice(0),n.splice(0,0,t),r.apply(null,n)};void 0!==n?(n.sprintf=r,n.vsprintf=s):(e.sprintf=r,e.vsprintf=s,"function"==typeof t&&t.amd&&t(function(){return{sprintf:r,vsprintf:s}}))}("undefined"==typeof window?this:window)},{}],516:[function(t,e,r){"use strict";function n(t){return new i(t)}function i(t){this.options=d(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function a(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}function o(t,e){var r=t.geometry.coordinates;return{x:u(r[0]),y:c(r[1]),zoom:1/0,id:e,parentId:-1}}function s(t){return{type:"Feature",properties:l(t),geometry:{type:"Point",coordinates:[h(t.x),f(t.y)]}}}function l(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return d(d({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function u(t){return t/360+.5}function c(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function h(t){return 360*(t-.5)}function f(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function d(t,e){for(var r in e)t[r]=e[r];return t}function p(t){return t.x}function m(t){return t.y}var g=t("kdbush");e.exports=n,i.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var r="prepare "+t.length+" points";e&&console.time(r),this.points=t;var n=t.map(o);e&&console.timeEnd(r);for(var i=this.options.maxZoom;i>=this.options.minZoom;i--){var a=+Date.now();this.trees[i+1]=g(n,p,m,this.options.nodeSize,Float32Array),n=this._cluster(n,i),e&&console.log("z%d: %d clusters in %dms",i,n.length,+Date.now()-a)}return this.trees[this.options.minZoom]=g(n,p,m,this.options.nodeSize,Float32Array),e&&console.timeEnd("total time"),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],n=r.range(u(t[0]),c(t[3]),u(t[2]),c(t[1])),i=[],a=0;a c)|0 },"),"generic"===e&&n.push("getters:[0],");for(var a=[],l=[],u=0;u>>7){");for(var u=0;u<1<<(1<128&&u%128==0){h.length>0&&f.push("}}");var d="vExtra"+h.length;n.push("case ",u>>>7,":",d,"(m&0x7f,",l.join(),");break;"),f=["function ",d,"(m,",l.join(),"){switch(m){"],h.push(f)}f.push("case ",127&u,":");for(var p=new Array(r),m=new Array(r),g=new Array(r),v=new Array(r),y=0,b=0;bb)&&!(u&1<<_)!=!(u&1<0&&(A="+"+g[x]+"*c");var T=p[x].length/y*.5,S=.5+v[x]/y*.5;k.push("d"+x+"-"+S+"-"+T+"*("+p[x].join("+")+A+")/("+m[x].join("+")+")")}f.push("a.push([",k.join(),"]);","break;")}n.push("}},"),h.length>0&&f.push("}}");for(var E=[],u=0;u<1<0&&(f+=.02);for(var p=new Float32Array(h),m=0,g=-.5*f,d=0;d=0?1.2:1))}function i(t,e,r,n,i,o,s){for(var l=0;l.5?l/(2-a-o):l/(a+o),a){case t:n=(e-r)/l+(e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}var i,a,o;if(t=S(t,360),e=S(e,100),r=S(r,100),0===e)i=a=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;i=n(l,s,t+1/3),a=n(l,s,t),o=n(l,s,t-1/3)}return{r:255*i,g:255*a,b:255*o}}function l(t,e,r){t=S(t,255),e=S(e,255),r=S(r,255);var n,i,a=H(t,e,r),o=q(t,e,r),s=a,l=a-o;if(i=0===a?0:l/a,a==o)n=0;else{switch(a){case t:n=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+a)%360,o.push(n(i));return o}function A(t,e){e=e||6;for(var r=n(t).toHsv(),i=r.h,a=r.s,o=r.v,s=[],l=1/e;e--;)s.push(n({h:i,s:a,v:o})),o=(o+l)%1;return s}function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function S(t,r){C(t)&&(t="100%");var n=z(t);return t=q(r,H(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function E(t){return q(1,H(0,t))}function L(t){return parseInt(t,16)}function C(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function z(t){return"string"==typeof t&&-1!=t.indexOf("%")}function D(t){return 1==t.length?"0"+t:""+t}function I(t){return t<=1&&(t=100*t+"%"),t}function P(t){return e.round(255*parseFloat(t)).toString(16)}function O(t){return L(t)/255}function R(t){return!!W.CSS_UNIT.exec(t)}function j(t){t=t.replace(N,"").replace(B,"").toLowerCase();var e=!1;if(G[t])t=G[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=W.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=W.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=W.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=W.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=W.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=W.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=W.hex8.exec(t))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),a:O(r[4]),format:e?"name":"hex8"}:(r=W.hex6.exec(t))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),format:e?"name":"hex"}:(r=W.hex4.exec(t))?{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),a:O(r[4]+""+r[4]),format:e?"name":"hex8"}:!!(r=W.hex3.exec(t))&&{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),format:e?"name":"hex"}}function F(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:e,size:r}}var N=/^\s+/,B=/\s+$/,U=0,V=e.round,q=e.min,H=e.max,Y=e.random;n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,n,i,a,o,s=this.toRgb();return t=s.r/255,r=s.g/255,n=s.b/255,i=t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4),a=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),o=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*o},setAlpha:function(t){return this._a=T(t),this._roundA=V(100*this._a)/100,this},toHsv:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=l(this._r,this._g,this._b),e=V(360*t.h),r=V(100*t.s),n=V(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=o(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=o(this._r,this._g,this._b),e=V(360*t.h),r=V(100*t.s),n=V(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return c(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return h(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:V(this._r),g:V(this._g),b:V(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+V(this._r)+", "+V(this._g)+", "+V(this._b)+")":"rgba("+V(this._r)+", "+V(this._g)+", "+V(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:V(100*S(this._r,255))+"%",g:V(100*S(this._g,255))+"%",b:V(100*S(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+V(100*S(this._r,255))+"%, "+V(100*S(this._g,255))+"%, "+V(100*S(this._b,255))+"%)":"rgba("+V(100*S(this._r,255))+"%, "+V(100*S(this._g,255))+"%, "+V(100*S(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(X[c(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+f(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=n(t);r="#"+f(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()), -"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(k,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]="a"===i?t[i]:I(t[i]));t=r}return n(t,e)},n.equals=function(t,e){return!(!t||!e)&&n(t).toRgbString()==n(e).toRgbString()},n.random=function(){return n.fromRatio({r:Y(),g:Y(),b:Y()})},n.mix=function(t,e,r){r=0===r?0:r||50;var i=n(t).toRgb(),a=n(e).toRgb(),o=r/100;return n({r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a})},n.readability=function(t,r){var i=n(t),a=n(r);return(e.max(i.getLuminance(),a.getLuminance())+.05)/(e.min(i.getLuminance(),a.getLuminance())+.05)},n.isReadable=function(t,e,r){var i,a,o=n.readability(t,e);switch(a=!1,i=F(r),i.level+i.size){case"AAsmall":case"AAAlarge":a=o>=4.5;break;case"AAlarge":a=o>=3;break;case"AAAsmall":a=o>=7}return a},n.mostReadable=function(t,e,r){var i,a,o,s,l=null,u=0;r=r||{},a=r.includeFallbackColors,o=r.level,s=r.size;for(var c=0;cu&&(u=i,l=n(e[c]));return n.isReadable(t,l,{level:o,size:s})||!a?l:(r.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],r))};var G=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},X=n.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(G),W=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();void 0!==r&&r.exports?r.exports=n:"function"==typeof t&&t.amd?t(function(){return n}):window.tinycolor=n}(Math)},{}],522:[function(t,e,r){"use strict";function n(t,e){var r=o(getComputedStyle(t).getPropertyValue(e));return r[0]*a(r[1],t)}function i(t,e){var r=document.createElement("div");r.style["font-size"]="128"+t,e.appendChild(r);var i=n(r,"font-size")/128;return e.removeChild(r),i}function a(t,e){switch(e=e||document.body,t=(t||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case"%":return e.clientHeight/100;case"ch":case"ex":return i(t,e);case"em":return n(e,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return s;case"cm":return s/2.54;case"mm":return s/25.4;case"pt":return s/72;case"pc":return s/6}return 1}var o=t("parse-unit");e.exports=a;var s=96},{"parse-unit":463}],523:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.topojson=e.topojson||{})}(this,function(t){"use strict";function e(t,e){var n=e.id,i=e.bbox,a=null==e.properties?{}:e.properties,o=r(t,e);return null==n&&null==i?{type:"Feature",properties:a,geometry:o}:null==i?{type:"Feature",id:n,properties:a,geometry:o}:{type:"Feature",id:n,bbox:i,properties:a,geometry:o}}function r(t,e){function r(t,e){e.length&&e.pop();for(var r=h[t<0?~t:t],n=0,i=r.length;n1)n=i(t,e,r);else for(a=0,n=new Array(o=t.arcs.length);a1)for(var i,a,l=1,u=o(n[0]);lu&&(a=n[0],n[0]=n[l],n[l]=a,u=i);return n})}}var s=function(t){return t},l=function(t){if(null==(e=t.transform))return s;var e,r,n,i=e.scale[0],a=e.scale[1],o=e.translate[0],l=e.translate[1];return function(t,e){return e||(r=n=0),t[0]=(r+=t[0])*i+o,t[1]=(n+=t[1])*a+l,t}},u=function(t){function e(t){s[0]=t[0],s[1]=t[1],o(s),s[0]h&&(h=s[0]),s[1]f&&(f=s[1])}function r(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(r);break;case"Point":e(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(e)}}var n=t.bbox;if(!n){var i,a,o=l(t),s=new Array(2),u=1/0,c=u,h=-u,f=-u;t.arcs.forEach(function(t){for(var e=-1,r=t.length;++eh&&(h=s[0]),s[1]f&&(f=s[1])});for(a in t.objects)r(t.objects[a]);n=t.bbox=[u,c,h,f]}return n},c=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r},h=function(t,r){return"GeometryCollection"===r.type?{type:"FeatureCollection",features:r.geometries.map(function(r){return e(t,r)})}:e(t,r)},f=function(t,e){function r(e){var r,n=t.arcs[e<0?~e:e],i=n[0];return t.transform?(r=[0,0],n.forEach(function(t){r[0]+=t[0],r[1]+=t[1]})):r=n[n.length-1],e<0?[r,i]:[i,r]}function n(t,e){for(var r in t){var n=t[r];delete e[n.start],delete n.start,delete n.end,n.forEach(function(t){i[t<0?~t:t]=1}),s.push(n)}}var i={},a={},o={},s=[],l=-1;return e.forEach(function(r,n){var i,a=t.arcs[r<0?~r:r];a.length<3&&!a[1][0]&&!a[1][1]&&(i=e[++l],e[l]=r,e[n]=i)}),e.forEach(function(t){var e,n,i=r(t),s=i[0],l=i[1];if(e=o[s])if(delete o[e.end],e.push(t),e.end=l,n=a[l]){delete a[n.start];var u=n===e?e:e.concat(n);a[u.start=e.start]=o[u.end=n.end]=u}else a[e.start]=o[e.end]=e;else if(e=a[l])if(delete a[e.start],e.unshift(t),e.start=s,n=o[s]){delete o[n.end];var c=n===e?e:n.concat(e);a[c.start=n.start]=o[c.end=e.end]=c}else a[e.start]=o[e.end]=e;else e=[t],a[e.start=s]=o[e.end=l]=e}),n(o,a),n(a,o),e.forEach(function(t){i[t<0?~t:t]||s.push([t])}),s},d=function(t){return r(t,n.apply(this,arguments))},p=function(t){return r(t,o.apply(this,arguments))},m=function(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error("n must be \u22652");if(t.transform)throw new Error("already quantized");var i,a=u(t),o=a[0],s=(a[2]-o)/(e-1)||1,l=a[1],c=(a[3]-l)/(e-1)||1;t.arcs.forEach(function(t){for(var e,r,n,i=1,a=1,u=t.length,h=t[0],f=h[0]=Math.round((h[0]-o)/s),d=h[1]=Math.round((h[1]-l)/c);iMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,s=0;s<3;++s)a+=t[s]*t[s],o+=i[s]*t[s];for(var s=0;s<3;++s)i[s]-=o/a*t[s];return f(i,i),i}function o(t,e,r,n,i,a,o,s){this.center=l(r),this.up=l(n),this.right=l(i),this.radius=l([a]),this.angle=l([o,s]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var u=0;u<16;++u)this.computedMatrix[u]=.5;this.recalcMatrix(0)}function s(t){t=t||{};var e=t.center||[0,0,0],r=t.up||[0,1,0],i=t.right||a(r),s=t.radius||1,l=t.theta||0,u=t.phi||0;if(e=[].slice.call(e,0,3),r=[].slice.call(r,0,3),f(r,r),i=[].slice.call(i,0,3),f(i,i),"eye"in t){var c=t.eye,p=[c[0]-e[0],c[1]-e[1],c[2]-e[2]];h(i,p,r),n(i[0],i[1],i[2])<1e-6?i=a(r):f(i,i),s=n(p[0],p[1],p[2]);var m=d(r,p)/s,g=d(i,p)/s;u=Math.acos(m),l=Math.acos(g)}return s=Math.log(s),new o(t.zoomMin,t.zoomMax,e,r,i,s,l,u)}e.exports=s;var l=t("filtered-vector"),u=t("gl-mat4/invert"),c=t("gl-mat4/rotate"),h=t("gl-vec3/cross"),f=t("gl-vec3/normalize"),d=t("gl-vec3/dot"),p=o.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,i=0,a=0,o=0;o<3;++o)a+=e[o]*r[o],i+=e[o]*e[o];for(var s=Math.sqrt(i),l=0,o=0;o<3;++o)r[o]-=e[o]*a/i,l+=r[o]*r[o],e[o]/=s;for(var u=Math.sqrt(l),o=0;o<3;++o)r[o]/=u;var c=this.computedToward;h(c,e,r),f(c,c);for(var d=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),v=Math.sin(p),y=Math.cos(m),b=Math.sin(m),x=this.computedCenter,_=g*y,w=v*y,M=b,k=-g*b,A=-v*b,T=y,S=this.computedEye,E=this.computedMatrix,o=0;o<3;++o){var L=_*r[o]+w*c[o]+M*e[o];E[4*o+1]=k*r[o]+A*c[o]+T*e[o],E[4*o+2]=L,E[4*o+3]=0}var C=E[1],z=E[5],D=E[9],I=E[2],P=E[6],O=E[10],R=z*O-D*P,j=D*I-C*O,F=C*P-z*I,N=n(R,j,F);R/=N,j/=N,F/=N,E[0]=R,E[4]=j,E[8]=F;for(var o=0;o<3;++o)S[o]=x[o]+E[2+4*o]*d;for(var o=0;o<3;++o){for(var l=0,B=0;B<3;++B)l+=E[o+4*B]*S[B];E[12+o]=-l}E[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var m=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;m[0]=i[2],m[1]=i[6],m[2]=i[10];for(var a=this.computedUp,o=this.computedRight,s=this.computedToward,l=0;l<3;++l)i[4*l]=a[l],i[4*l+1]=o[l],i[4*l+2]=s[l];c(i,i,n,m);for(var l=0;l<3;++l)a[l]=i[4*l],o[l]=i[4*l+1];this.up.set(t,a[0],a[1],a[2]),this.right.set(t,o[0],o[1],o[2])}},p.pan=function(t,e,r,i){e=e||0,r=r||0,i=i||0,this.recalcMatrix(t);var a=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),a[1]),s=a[5],l=a[9],u=n(o,s,l);o/=u,s/=u,l/=u;var c=a[0],h=a[4],f=a[8],d=c*o+h*s+f*l;c-=o*d,h-=s*d,f-=l*d;var p=n(c,h,f);c/=p,h/=p,f/=p;var m=c*e+o*r,g=h*e+s*r,v=f*e+l*r;this.center.move(t,m,g,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+i),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,a){var o=1;"number"==typeof r&&(o=0|r),(o<0||o>3)&&(o=1);var s=(o+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var l=e[o],c=e[o+4],h=e[o+8];if(a){var f=Math.abs(l),d=Math.abs(c),p=Math.abs(h),m=Math.max(f,d,p);f===m?(l=l<0?-1:1,c=h=0):p===m?(h=h<0?-1:1,l=c=0):(c=c<0?-1:1,l=h=0)}else{var g=n(l,c,h);l/=g,c/=g,h/=g}var v=e[s],y=e[s+4],b=e[s+8],x=v*l+y*c+b*h;v-=l*x,y-=c*x,b-=h*x;var _=n(v,y,b);v/=_,y/=_,b/=_;var w=c*b-h*y,M=h*v-l*b,k=l*y-c*v,A=n(w,M,k);w/=A,M/=A,k/=A,this.center.jump(t,H,Y,G),this.radius.idle(t),this.up.jump(t,l,c,h),this.right.jump(t,v,y,b);var T,S;if(2===o){var E=e[1],L=e[5],C=e[9],z=E*v+L*y+C*b,D=E*w+L*M+C*k;T=R<0?-Math.PI/2:Math.PI/2,S=Math.atan2(D,z)}else{var I=e[2],P=e[6],O=e[10],R=I*l+P*c+O*h,j=I*v+P*y+O*b,F=I*w+P*M+O*k;T=Math.asin(i(R)),S=Math.atan2(F,j)}this.angle.jump(t,S,T),this.recalcMatrix(t);var N=e[2],B=e[6],U=e[10],V=this.computedMatrix;u(V,e);var q=V[15],H=V[12]/q,Y=V[13]/q,G=V[14]/q,X=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*X,Y-B*X,G-U*X)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,a){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter,a=a||this.computedUp;var o=a[0],s=a[1],l=a[2],u=n(o,s,l);if(!(u<1e-6)){o/=u,s/=u,l/=u;var c=e[0]-r[0],h=e[1]-r[1],f=e[2]-r[2],d=n(c,h,f);if(!(d<1e-6)){c/=d,h/=d,f/=d;var p=this.computedRight,m=p[0],g=p[1],v=p[2],y=o*m+s*g+l*v;m-=y*o,g-=y*s,v-=y*l;var b=n(m,g,v);if(!(b<.01&&(m=s*f-l*h,g=l*c-o*f,v=o*h-s*c,(b=n(m,g,v))<1e-6))){m/=b,g/=b,v/=b,this.up.set(t,o,s,l),this.right.set(t,m,g,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(d));var x=s*v-l*g,_=l*m-o*v,w=o*g-s*m,M=n(x,_,w);x/=M,_/=M,w/=M;var k=o*c+s*h+l*f,A=m*c+g*h+v*f,T=x*c+_*h+w*f,S=Math.asin(i(k)),E=Math.atan2(T,A),L=this.angle._state,C=L[L.length-1],z=L[L.length-2];C%=2*Math.PI;var D=Math.abs(C+2*Math.PI-E),I=Math.abs(C-E),P=Math.abs(C-2*Math.PI-E);D0?r.pop():new ArrayBuffer(t)}function s(t){return new Uint8Array(o(t),0,t)}function l(t){return new Uint16Array(o(2*t),0,t)}function u(t){return new Uint32Array(o(4*t),0,t)}function c(t){return new Int8Array(o(t),0,t)}function h(t){return new Int16Array(o(2*t),0,t)}function f(t){return new Int32Array(o(4*t),0,t)}function d(t){return new Float32Array(o(4*t),0,t)}function p(t){return new Float64Array(o(8*t),0,t)}function m(t){return x?new Uint8ClampedArray(o(t),0,t):s(t)}function g(t){return new DataView(o(t),0,t)}function v(t){t=y.nextPow2(t);var e=y.log2(t),r=M[e];return r.length>0?r.pop():new n(t)}var y=t("bit-twiddle"),b=t("dup");e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:b([32,0]),UINT16:b([32,0]),UINT32:b([32,0]),INT8:b([32,0]),INT16:b([32,0]),INT32:b([32,0]),FLOAT:b([32,0]),DOUBLE:b([32,0]),DATA:b([32,0]),UINT8C:b([32,0]),BUFFER:b([32,0])});var x="undefined"!=typeof Uint8ClampedArray,_=e.__TYPEDARRAY_POOL;_.UINT8C||(_.UINT8C=b([32,0])),_.BUFFER||(_.BUFFER=b([32,0]));var w=_.DATA,M=_.BUFFER;r.free=function(t){if(n.isBuffer(t))M[y.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|y.log2(e);w[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=a,r.freeArrayBuffer=i,r.freeBuffer=function(t){M[y.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return o(t);switch(e){case"uint8":return s(t);case"uint16":return l(t);case"uint32":return u(t);case"int8":return c(t);case"int16":return h(t);case"int32":return f(t);case"float":case"float32":return d(t);case"double":case"float64":return p(t);case"uint8_clamped":return m(t);case"buffer":return v(t);case"data":case"dataview":return g(t);default:return null}return null},r.mallocArrayBuffer=o,r.mallocUint8=s,r.mallocUint16=l,r.mallocUint32=u,r.mallocInt8=c,r.mallocInt16=h,r.mallocInt32=f,r.mallocFloat32=r.mallocFloat=d,r.mallocFloat64=r.mallocDouble=p,r.mallocUint8Clamped=m,r.mallocDataView=g,r.mallocBuffer=v,r.clearCache=function(){for(var t=0;t<32;++t)_.UINT8[t].length=0,_.UINT16[t].length=0,_.UINT32[t].length=0,_.INT8[t].length=0,_.INT16[t].length=0,_.INT32[t].length=0,_.FLOAT[t].length=0,_.DOUBLE[t].length=0,_.UINT8C[t].length=0,w[t].length=0,M[t].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":59,buffer:69,dup:117}],529:[function(t,e,r){"use strict";"use restrict";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;en)return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},{}],532:[function(t,e,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,r){if(t&&u.isObject(t)&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}function a(t){return u.isString(t)&&(t=i(t)),t instanceof n?t.format():n.prototype.format.call(t)}function o(t,e){return i(t,!1,!0).resolve(e)}function s(t,e){return t?i(t,!1,!0).resolveObject(e):e}var l=t("punycode"),u=t("./util");r.parse=i,r.resolve=o,r.resolveObject=s,r.format=a,r.Url=n;var c=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),m=["'"].concat(p),g=["%","/","?",";","#"].concat(m),v=["/","?","#"],y={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=t("querystring");n.prototype.parse=function(t,e,r){if(!u.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=-1!==n&&n127?z+="x":z+=C[D];if(!z.match(/^[+a-z0-9A-Z_-]{0,63}$/)){var P=E.slice(0,M),O=E.slice(M+1),R=C.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);R&&(P.push(R[1]),O.unshift(R[2])),O.length&&(o="/"+O.join(".")+o),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=l.toASCII(this.hostname));var j=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+j,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!y[d])for(var M=0,L=m.length;M0)&&r.host.split("@");A&&(r.auth=A.shift(),r.host=r.hostname=A.shift())}return r.search=t.search,r.query=t.query,u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!M.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=M.slice(-1)[0],S=(r.host||t.host||M.length>1)&&("."===T||".."===T)||""===T,E=0,L=M.length;L>=0;L--)T=M[L],"."===T?M.splice(L,1):".."===T?(M.splice(L,1),E++):E&&(M.splice(L,1),E--);if(!_&&!w)for(;E--;E)M.unshift("..");!_||""===M[0]||M[0]&&"/"===M[0].charAt(0)||M.unshift(""),S&&"/"!==M.join("/").substr(-1)&&M.push("");var C=""===M[0]||M[0]&&"/"===M[0].charAt(0);if(k){r.hostname=r.host=C?"":M.length?M.shift():"";var A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");A&&(r.auth=A.shift(),r.host=r.hostname=A.shift())}return _=_||r.host&&M.length,_&&!C&&M.unshift(""),M.length?r.pathname=M.join("/"):(r.pathname=null,r.path=null),u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=h.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":533,punycode:476,querystring:480}],533:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],534:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],535:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],536:[function(t,e,r){(function(e,n){function i(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(e)?n.showHidden=e:e&&r._extend(n,e),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),l(n,t,n.depth)}function a(t,e){var r=i.styles[e];return r?"\x1b["+i.colors[r][0]+"m"+t+"\x1b["+i.colors[r][1]+"m":t}function o(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function l(t,e,n){if(t.customInspect&&e&&T(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return b(i)||(i=l(t,i,n)),i}var a=u(t,e);if(a)return a;var o=Object.keys(e),m=s(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),A(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(e);if(0===o.length){if(T(e)){var g=e.name?": "+e.name:"";return t.stylize("[Function"+g+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(k(e))return t.stylize(Date.prototype.toString.call(e),"date");if(A(e))return c(e)}var v="",y=!1,x=["{","}"];if(p(e)&&(y=!0,x=["[","]"]),T(e)){v=" [Function"+(e.name?": "+e.name:"")+"]"}if(w(e)&&(v=" "+RegExp.prototype.toString.call(e)),k(e)&&(v=" "+Date.prototype.toUTCString.call(e)),A(e)&&(v=" "+c(e)),0===o.length&&(!y||0==e.length))return x[0]+v+x[1];if(n<0)return w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var _;return _=y?h(t,e,n,m,o):o.map(function(r){return f(t,e,n,m,r,y)}),t.seen.pop(),d(_,v,x)}function u(t,e){if(_(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var a=[],o=0,s=e.length;o-1&&(s=a?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),_(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function d(t,e,r){var n=0;return t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function p(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function g(t){return null===t}function v(t){return null==t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function x(t){return"symbol"==typeof t}function _(t){return void 0===t}function w(t){return M(t)&&"[object RegExp]"===E(t)}function M(t){return"object"==typeof t&&null!==t}function k(t){return M(t)&&"[object Date]"===E(t)}function A(t){return M(t)&&("[object Error]"===E(t)||t instanceof Error)}function T(t){return"function"==typeof t}function S(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function E(t){return Object.prototype.toString.call(t)}function L(t){return t<10?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[L(t.getHours()),L(t.getMinutes()),L(t.getSeconds())].join(":");return[t.getDate(),P[t.getMonth()],e].join(" ")}function z(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.format=function(t){if(!b(t)){for(var e=[],r=0;r=a)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),s=n[r];r>3}if(i--,1===n||2===n)a+=t.readSVarint(),o+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new l(a,o));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&s.push(e),s},n.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;t.pos>3}if(n--,1===r||2===r)i+=t.readSVarint(),a+=t.readSVarint(),is&&(s=i),au&&(u=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,u]},n.prototype.toGeoJSON=function(t,e,r){function i(t){for(var e=0;e>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}var o=t("./vectortilefeature.js");e.exports=n,n.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new o(this._pbf,e,this.extent,this._keys,this._values)}},{"./vectortilefeature.js":539}],541:[function(t,e,r){"use strict";function n(t,e){return"object"==typeof e&&null!==e||(e={}),i(t,e.canvas||a,e.context||o,e)}e.exports=n;var i=t("./lib/vtext"),a=null,o=null;"undefined"!=typeof document&&(a=document.createElement("canvas"),a.width=8192,a.height=1024,o=a.getContext("2d"))},{"./lib/vtext":542}],542:[function(t,e,r){"use strict";function n(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l8192)throw new Error("vectorize-text: String too long (sorry, this will get fixed later)");var a=3*n;t.height>31}function l(t){for(var e=[],r=0,n=0,i=t.length,a=0;a=0?l[r]:e)}function e(t){var e=n(t);return e?u in e:s.indexOf(t)>=0}function r(t,e){var r,i=n(t);return i?i[u]=e:(r=s.indexOf(t),r>=0?l[r]=e:(r=s.length,l[r]=e,s[r]=t)),this}function o(t){var e,r,i=n(t);return i?u in i&&delete i[u]:!((e=s.indexOf(t))<0)&&(r=s.length-1,s[e]=void 0,l[e]=l[r],s[e]=s[r],s.length=r,l.length=r,!0)}this instanceof x||a();var s=[],l=[],u=b++;return Object.create(x.prototype,{get___:{value:i(t)},has___:{value:i(e)},set___:{value:i(r)},delete___:{value:i(o)}})};x.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof s?function(){function r(){function e(t,e){return c?u.has(t)?u.get(t):c.get___(t,e):u.get(t,e)}function r(t){return u.has(t)||!!c&&c.has___(t)}function n(t){var e=!!u.delete(t);return c?c.delete___(t)||e:e}this instanceof x||a();var l,u=new s,c=void 0,h=!1;return l=o?function(t,e){return u.set(t,e),u.has(t)||(c||(c=new x),c.set(t,e)),this}:function(t,e){if(h)try{u.set(t,e)}catch(r){c||(c=new x),c.set___(t,e)}else u.set(t,e);return this},Object.create(x.prototype,{get___:{value:i(e)},has___:{value:i(r)},set___:{value:i(l)},delete___:{value:i(n)},permitHostObjects___:{value:i(function(e){if(e!==t)throw new Error("bogus call to permitHostObjects___");h=!0})}})}o&&"undefined"!=typeof Proxy&&(Proxy=void 0),r.prototype=x.prototype,e.exports=r,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=x)}}()},{}],547:[function(t,e,r){function n(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:i(e,t)}}var i=t("./hidden-store.js");e.exports=n},{"./hidden-store.js":548}],548:[function(t,e,r){function n(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}e.exports=n},{}],549:[function(t,e,r){function n(){var t=i();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}var i=t("./create-store.js");e.exports=n},{"./create-store.js":547}],550:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":139}],551:[function(t,e,r){var n=arguments[3],i=arguments[4],a=arguments[5],o=JSON.stringify;e.exports=function(t,e){function r(t){g[t]=!0;for(var e in i[t][1]){var n=i[t][1][e];g[n]||r(n)}}for(var s,l=Object.keys(a),u=0,c=l.length;u=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a=n||{}}var o=p[i.year-p[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=p[a.year-p[0]];var l,u=o>>9&4095,c=o>>5&15,h=31&o,f=new Date(u,c-1,h),m=new Date(i.year,i.month-1,i.day);l=Math.round((m-f)/864e5);var g,v=d[a.year-d[0]];for(g=0;g<13;g++){var y=v&1<<12-g?30:29;if(l>13;return!b||g=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");var s;"object"==typeof n?(s=!1,a=n):(s=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:s}}var l;l=o.day-1;var u,c=d[o.year-d[0]],h=c>>13;u=h?o.month>h?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var f=0;f>9&4095,v=m>>5&15,y=31&m,b=new Date(g,v-1,y+l);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}var o=t("../main"),s=t("object-assign"),l=o.instance();n.prototype=new o.baseCalendar,s(n.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(c);return r?r[0]:""}var n=this._validateYear(t),i=t.month(),a=""+this.toChineseMonth(n,i);return e&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(t){if("string"==typeof t){var e=t.match(h);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=this.toChineseMonth(r,n),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(f);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=this.toChineseMonth(r,n),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"\u95f0"===e[0]&&(r=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var i=e[e.length-1];r="i"===i||"I"===i}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var n=this.intercalaryMonth(t);if(r&&e!==n||e<1||e>12)throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?!r&&e<=n?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(t=t.year(),e=t.month());var r=this.intercalaryMonth(t),n=r?12:11;if(e<0||e>n)throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>13},isIntercalaryMonth:function(t,e){t.year&&(t=t.year(),e=t.month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var n,i=this._validateYear(t,o.local.invalidyear),a=p[i-p[0]],s=a>>9&4095,u=a>>5&15,c=31&a;n=l.newDate(s,u,c),n.add(4-(n.dayOfWeek()||7),"d");var h=this.toJD(t,e,r)-n.toJD();return 1+Math.floor(h/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=d[t-d[0]];if(e>(r>>13?12:11))throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,s,r,o.local.invalidDate);t=this._validateYear(n.year()),e=n.month(),r=n.day();var i=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),u=a(t,s,r,i);return l.toJD(u.year,u.month,u.day)},fromJD:function(t){var e=l.fromJD(t),r=i(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(u),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var i=t.year(),a=t.month(),o=this.isIntercalaryMonth(i,a),s=this.toChineseMonth(i,a),l=Object.getPrototypeOf(n.prototype).add.call(this,t,e,r);if("y"===r){ -var u=l.year(),c=l.month(),h=this.isIntercalaryMonth(u,s),f=o&&h?this.toMonthIndex(u,s,!0):this.toMonthIndex(u,s,!1);f!==c&&l.month(f)}return l}});var u=/^\s*(-?\d\d\d\d|\d\d)[-\/](\d?\d)([iI]?)[-\/](\d?\d)/m,c=/^\d?\d[iI]?/m,h=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?\u6708/m,f=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;o.calendars.chinese=n;var d=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],p=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{"../main":568,"object-assign":459}],555:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Coptic",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()+(e.year()<0?1:0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),t<0&&t++,n.day()+30*(n.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),i.calendars.coptic=n},{"../main":568,"object-assign":459}],556:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,i.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n>=2&&n<=6},extraInfo:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return{century:o[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year()+(n.year()<0?1:0),e=n.month(),(r=n.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};i.calendars.discworld=n},{"../main":568,"object-assign":459}],557:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()+(e.year()<0?1:0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),t<0&&t++,n.day()+30*(n.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),i.calendars.ethiopian=n},{"../main":568,"object-assign":459}],558:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function i(t,e){return t-e*Math.floor(t/e)}var a=t("../main"),o=t("object-assign");n.prototype=new a.baseCalendar,o(n.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return t=t<0?t+1:t,i(7*t+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,a.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,a.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===i(this.daysInYear(t),10)?30:9===e&&3===i(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var i=t<=0?t+1:t,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(var s=1;s=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),a.calendars.hebrew=n},{"../main":568,"object-assign":459}],559:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,i.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),e=n.month(),r=n.day(),t=t<=0?t+1:t,r+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),i.calendars.islamic=n},{"../main":568,"object-assign":459}],560:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()<0?e.year()+1:e.year();return t%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=e+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}}),i.calendars.julian=n},{"../main":568,"object-assign":459}],561:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function i(t,e){return t-e*Math.floor(t/e)}function a(t,e){return i(t-1,e)+1}var o=t("../main"),s=t("object-assign");n.prototype=new o.baseCalendar,s(n.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,o.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if(t=t.split("."),t.length<3)throw"Invalid Mayan year";for(var e=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,o.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate),!0},extraInfo:function(t,e,r){var n=this._validate(t,e,r,o.local.invalidDate),i=n.toJD(),a=this._toHaab(i),s=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[s[0]-1],tzolkinDay:s[0],tzolkinTrecena:s[1]}},_toHaab:function(t){t-=this.jdEpoch;var e=i(t+8+340,365);return[Math.floor(e/20)+1,i(e,20)]},_toTzolkin:function(t){return t-=this.jdEpoch,[a(t+20,20),a(t+4,13)]},toJD:function(t,e,r){var n=this._validate(t,e,r,o.local.invalidDate);return n.day()+20*n.month()+360*n.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),o.calendars.mayan=n},{"../main":568,"object-assign":459}],562:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar;var o=i.instance("gregorian");a(n.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidMonth),t=n.year();t<0&&t++;for(var a=n.day(),s=1;s=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),i.calendars.nanakshahi=n},{"../main":568,"object-assign":459}],563:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,i.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var a=i.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var u=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(t){var e=i.instance(),r=e.fromJD(t),n=r.year(),a=r.dayOfYear(),o=n+56;this._createMissingCalendarData(o);for(var s=9,l=this.NEPALI_CALENDAR_DATA[o][0],u=this.NEPALI_CALENDAR_DATA[o][s]-l+1;a>u;)s++,s>12&&(s=1,o++),u+=this.NEPALI_CALENDAR_DATA[o][s];var c=this.NEPALI_CALENDAR_DATA[o][s]-(u-a);return this.newDate(o,s,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,a.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var o=t-(t>=0?474:473),s=474+i(o,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(o/2820)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=t-this.toJD(475,1,1),r=Math.floor(e/1029983),n=i(e,1029983),a=2820;if(1029982!==n){var o=Math.floor(n/366),s=i(n,366);a=Math.floor((2134*o+2816*s+2815)/1028522)+o+1}var l=a+2820*r+474;l=l<=0?l-1:l;var u=t-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),h=t-this.toJD(l,c,1)+1;return this.newDate(l,c,h)}}),a.calendars.persian=n,a.calendars.jalali=n},{"../main":568,"object-assign":459}],565:[function(t,e,r){function n(t){ -this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign"),o=i.instance();n.prototype=new i.baseCalendar,a(n.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(e.year());return o.leapYear(t)},weekOfYear:function(t,e,r){var n=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(n.year());return o.weekOfYear(t,n.month(),n.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),t=this._t2gYear(n.year());return o.toJD(t,n.month(),n.day())},fromJD:function(t){var e=o.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),i.calendars.taiwan=n},{"../main":568,"object-assign":459}],566:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign"),o=i.instance();n.prototype=new i.baseCalendar,a(n.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(e.year());return o.leapYear(t)},weekOfYear:function(t,e,r){var n=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(n.year());return o.weekOfYear(t,n.month(),n.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),t=this._t2gYear(n.year());return o.toJD(t,n.month(),n.day())},fromJD:function(t){var e=o.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),i.calendars.thai=n},{"../main":568,"object-assign":459}],567:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,i.local.invalidMonth),n=r.toJD()-24e5+.5,a=0,s=0;sn)return o[a]-o[a-1];a++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),a=12*(n.year()-1)+n.month()-15292;return n.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,u=e-o[r-1]+1;return this.newDate(s,l,u)},isValid:function(t,e,r){var n=i.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(t=null!=t.year?t.year:t,n=t>=1276&&t<=1500),n},_validate:function(t,e,r,n){var a=i.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}}),i.calendars.ummalqura=n;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":568,"object-assign":459}],568:[function(t,e,r){function n(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(t,e){return t=""+t,"000000".substring(0,e-t.length)+t}function o(){this.shortYearCutoff="+10"}function s(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}var l=t("object-assign");l(n.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,i){return n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance(),n.newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,function(e){return t[e]})}},substituteChineseDigits:function(t,e){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),l(i.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),l(o.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new i(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+a(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0),i=t.day();"y"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(!function(t){for(;oe-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),i="m"===r?e:t.month(),a="d"===r?e:t.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var u=e.exports=new n;u.cdate=i,u.baseCalendar=o,u.calendars.gregorian=s},{"object-assign":459}],569:[function(t,e,r){ -var n=t("object-assign"),i=t("./main");n(i.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),i.local=i.regionalOptions[""],n(i.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.monthNumbers||this.local.monthNumbers,s=r.monthNamesShort||this.local.monthNamesShort,l=r.monthNames||this.local.monthNames,u=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;g+n1}),c=function(t,e,r,n){var i=""+e;if(u(t,n))for(;i.length1},b=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=e.substring(M).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=s[0].length,parseInt(s[0],10)},x=this,_=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s-1){d=1,p=m;for(var T=this.daysInMonth(f,d);p>T;T=this.daysInMonth(f,d))d++,p-=T}return h>-1?this.fromJD(h):this.newDate(f,d,p)},determineDate:function(t,e,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return e=e?e.newDate():null,t=null==t?e:"string"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}t=t.toLowerCase();for(var e=(t.match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?e:a.today().add(t,"d"):a.newDate(t)}})},{"./main":568,"object-assign":459}],570:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":102}],571:[function(t,e,r){"use strict";function n(t,e){var r=[];return e=+e||0,i(t.hi(t.shape[0]-1),r,e),r}e.exports=n;var i=t("./lib/zc-core")},{"./lib/zc-core":570}],572:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../color"),a=t("../../plots/cartesian/axes"),o=t("../../plots/cartesian/constants"),s=t("./attributes");e.exports=function(t,e,r,l,u){function c(r,i){return n.coerce(t,e,s,r,i)}l=l||{},u=u||{};var h=c("visible",!u.itemIsNotPlainObject),f=c("clicktoshow");if(!h&&!f)return e;c("opacity");var d=c("bgcolor"),p=c("bordercolor"),m=i.opacity(p);c("borderpad");var g=c("borderwidth"),v=c("showarrow");c("text",v?" ":"new text"),c("textangle"),n.coerceFont(c,"font",r.font),c("width"),c("align"),c("height")&&c("valign");for(var y=["x","y"],b=[-10,-30],x={_fullLayout:r},_=0;_<2;_++){var w=y[_],M=a.coerceRef(t,e,x,w,"","paper");if(a.coercePosition(e,x,c,M,w,.5),v){var k="a"+w,A=a.coerceRef(t,e,x,k,"pixel");"pixel"!==A&&A!==M&&(A=e[k]="pixel");var T="pixel"===A?b[_]:.4;a.coercePosition(e,x,c,A,k,T)}c(w+"anchor")}if(n.noneOrAll(t,e,["x","y"]),v&&(c("arrowcolor",m?e.bordercolor:i.defaultLine),c("arrowhead"),c("arrowsize"),c("arrowwidth",2*(m&&g||1)),c("standoff"),n.noneOrAll(t,e,["ax","ay"])),f){var S=c("xclick"),E=c("yclick");e._xclick=void 0===S?e.x:S,e._yclick=void 0===E?e.y:E}var L=c("hovertext");if(L){var C=c("hoverlabel.bgcolor",i.opacity(d)?i.rgb(d):i.defaultLine),z=c("hoverlabel.bordercolor",i.contrast(C));n.coerceFont(c,"hoverlabel.font",{family:o.HOVERFONT,size:o.HOVERFONTSIZE,color:z})}return c("captureevents",!!L),e}},{"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/constants":734,"../color":585,"./attributes":574}],573:[function(t,e,r){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0},{path:"M2,2V-2H-2V2Z",backoff:0}]},{}],574:[function(t,e,r){"use strict";var n=t("./arrow_paths"),i=t("../../plots/font_attributes"),a=t("../../plots/cartesian/constants"),o=t("../../lib/extend").extendFlat;e.exports={_isLinkedToArray:"annotation",visible:{valType:"boolean",dflt:!0},text:{valType:"string"},textangle:{valType:"angle",dflt:0},font:o({},i,{}),width:{valType:"number",min:1,dflt:null},height:{valType:"number",min:1,dflt:null},opacity:{valType:"number",min:0,max:1,dflt:1},align:{valType:"enumerated",values:["left","center","right"],dflt:"center"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)"},borderpad:{valType:"number",min:0,dflt:1},borderwidth:{valType:"number",min:0,dflt:1},showarrow:{valType:"boolean",dflt:!0},arrowcolor:{valType:"color"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1},arrowsize:{valType:"number",min:.3,dflt:1},arrowwidth:{valType:"number",min:.1},standoff:{valType:"number",min:0,dflt:0},ax:{valType:"any"},ay:{valType:"any"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()]},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()]},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()]},x:{valType:"any"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()]},y:{valType:"any"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1},xclick:{valType:"any"},yclick:{valType:"any"},hovertext:{valType:"string"},hoverlabel:{bgcolor:{valType:"color"},bordercolor:{valType:"color"},font:o({},i,{})},captureevents:{valType:"boolean"},_deprecated:{ref:{valType:"string"}}}},{"../../lib/extend":682,"../../plots/cartesian/constants":734,"../../plots/font_attributes":753,"./arrow_paths":573}],575:[function(t,e,r){"use strict";function n(t){var e=t._fullLayout;i.filterVisible(e.annotations).forEach(function(e){var r=a.getFromId(t,e.xref),n=a.getFromId(t,e.yref),i=3*e.arrowsize*e.arrowwidth||0;r&&r.autorange&&(e.axref===e.xref?(a.expand(r,[r.r2c(e.x)],{ppadplus:i,ppadminus:i}),a.expand(r,[r.r2c(e.ax)],{ppadplus:e._xpadplus,ppadminus:e._xpadminus})):a.expand(r,[r.r2c(e.x)],{ppadplus:Math.max(e._xpadplus,i),ppadminus:Math.max(e._xpadminus,i)})),n&&n.autorange&&(e.ayref===e.yref?(a.expand(n,[n.r2c(e.y)],{ppadplus:i,ppadminus:i}),a.expand(n,[n.r2c(e.ay)],{ppadplus:e._ypadplus,ppadminus:e._ypadminus})):a.expand(n,[n.r2c(e.y)],{ppadplus:Math.max(e._ypadplus,i),ppadminus:Math.max(e._ypadminus,i)}))})}var i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./draw").draw;e.exports=function(t){var e=t._fullLayout,r=i.filterVisible(e.annotations);if(r.length&&t._fullData.length){var s={};r.forEach(function(t){s[t.xref]=!0,s[t.yref]=!0});if(a.list(t).filter(function(t){return t.autorange&&s[t._id]}).length)return i.syncOrAsync([o,n],t)}}},{"../../lib":690,"../../plots/cartesian/axes":729,"./draw":579}],576:[function(t,e,r){"use strict";function n(t,e){var r=a(t,e);return r.on.length>0||r.explicitOff.length>0}function i(t,e){var r,n=a(t,e),i=n.on,s=n.off.concat(n.explicitOff),l={};if(i.length||s.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}R.selectAll("tspan.line").attr({y:0,x:0});var n=E.select(".annotation-math-group"),i=!n.empty(),h=d.bBox((i?n:R).node()),p=h.width,b=h.height,C=x.width||p,O=x.height||b,j=Math.round(C+2*z),F=Math.round(O+2*z);x._w=C,x._h=O;var N=!1;if(["x","y"].forEach(function(e){var n,i,a,o,s,h=x[e+"ref"]||e,f=x["a"+e+"ref"],d=c.getFromId(t,h),p=(A+("x"===e?0:-90))*Math.PI/180,m=j*Math.cos(p),g=F*Math.sin(p),v=Math.abs(m)+Math.abs(g),b=x[e+"anchor"],_=k[e];if(d){var w=d.r2fraction(x[e]);if((t._dragging||!d.autorange)&&(w<0||w>1)&&(f===h?((w=d.r2fraction(x["a"+e]))<0||w>1)&&(N=!0):N=!0,N))return;n=d._offset+d.r2p(x[e]),o=.5}else"x"===e?(a=x[e],n=y.l+y.w*a):(a=1-x[e],n=y.t+y.h*a),o=x.showarrow?.5:a;if(x.showarrow){_.head=n;var M=x["a"+e];s=m*r(.5,x.xanchor)-g*r(.5,x.yanchor),f===h?(_.tail=d._offset+d.r2p(M),i=s):(_.tail=n+M,i=s+M),_.text=_.tail+s;var T=l["x"===e?"width":"height"];if("paper"===h&&(_.head=u.constrain(_.head,1,T-1)),"pixel"===f){var S=-Math.max(_.tail-3,_.text),E=Math.min(_.tail+3,_.text)-T;S>0?(_.tail+=S,_.text+=S):E>0&&(_.tail-=E,_.text-=E)}}else s=v*r(o,b),i=s,_.text=n+s;x["_"+e+"padplus"]=v/2+i,x["_"+e+"padminus"]=v/2-i,x["_"+e+"size"]=v,x["_"+e+"shift"]=s}),N)return void E.remove();var B=0,U=0;if("left"!==x.align&&(B=(C-p)*("center"===x.align?.5:1)),"top"!==x.valign&&(U=(O-b)*("middle"===x.valign?.5:1)),i)n.select("svg").attr({x:z+B-1,y:z+U}).call(d.setClipUrl,I?_:null);else{var V=z+U-h.top,q=z+B-h.left;R.attr({x:q,y:V}).call(d.setClipUrl,I?_:null),R.selectAll("tspan.line").attr({y:V,x:q})}P.select("rect").call(d.setRect,z,z,C,O),D.call(d.setRect,L/2,L/2,j-L,F-L),E.call(d.setTranslate,Math.round(k.x.text-j/2),Math.round(k.y.text-F/2)),S.attr({transform:"rotate("+A+","+k.x.text+","+k.y.text+")"});var H="annotations["+e+"]",Y=function(r,n){o.select(t).selectAll('.annotation-arrow-g[data-index="'+e+'"]').remove();var i=k.x.head,l=k.y.head,c=k.x.tail+r,h=k.y.tail+n,p=k.x.text+r,m=k.y.text+n,b=u.rotationXYMatrix(A,p,m),_=u.apply2DTransform(b),L=u.apply2DTransform2(b),C=+D.attr("width"),z=+D.attr("height"),I=p-.5*C,P=I+C,O=m-.5*z,R=O+z,j=[[I,O,I,R],[I,R,P,R],[P,R,P,O],[P,O,I,O]].map(L);if(!j.reduce(function(t,e){return t^!!a(i,l,i+1e6,l+1e6,e[0],e[1],e[2],e[3])},!1)){j.forEach(function(t){var e=a(c,h,i,l,t[0],t[1],t[2],t[3]);e&&(c=e.x,h=e.y)});var F=x.arrowwidth,N=x.arrowcolor,B=T.append("g").style({opacity:f.opacity(N)}).classed("annotation-arrow-g",!0).attr("data-index",String(e)),U=B.append("path").attr("d","M"+c+","+h+"L"+i+","+l).style("stroke-width",F+"px").call(f.stroke,f.rgb(N));if(v(U,x.arrowhead,"end",x.arrowsize,x.standoff),t._context.editable&&U.node().parentNode){var V=i,q=l;if(x.standoff){var Y=Math.sqrt(Math.pow(i-c,2)+Math.pow(l-h,2));V+=x.standoff*(c-i)/Y,q+=x.standoff*(h-l)/Y}var G,X,W,Z=B.append("path").classed("annotation",!0).classed("anndrag",!0).attr({"data-index":String(e),d:"M3,3H-3V-3H3ZM0,0L"+(c-V)+","+(h-q),transform:"translate("+V+","+q+")"}).style("stroke-width",F+6+"px").call(f.stroke,"rgba(0,0,0,0)").call(f.fill,"rgba(0,0,0,0)");g.init({element:Z.node(),prepFn:function(){var t=d.getTranslate(E);X=t.x,W=t.y,G={},w&&w.autorange&&(G[w._name+".autorange"]=!0),M&&M.autorange&&(G[M._name+".autorange"]=!0)},moveFn:function(t,e){var r=_(X,W),n=r[0]+t,a=r[1]+e;E.call(d.setTranslate,n,a),G[H+".x"]=w?w.p2r(w.r2p(x.x)+t):(i+t-y.l)/y.w,G[H+".y"]=M?M.p2r(M.r2p(x.y)+e):1-(l+e-y.t)/y.h,x.axref===x.xref&&(G[H+".ax"]=w?w.p2r(w.r2p(x.ax)+t):(i+t-y.l)/y.w),x.ayref===x.yref&&(G[H+".ay"]=M?M.p2r(M.r2p(x.ay)+e):1-(l+e-y.t)/y.h),B.attr("transform","translate("+t+","+e+")"),S.attr({transform:"rotate("+A+","+n+","+a+")"})},doneFn:function(e){if(e){s.relayout(t,G);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}};if(x.showarrow&&Y(0,0),t._context.editable){var G,X;g.init({element:E.node(),prepFn:function(){X=S.attr("transform"),G={}},moveFn:function(t,e){var r="pointer";if(x.showarrow)x.axref===x.xref?G[H+".ax"]=w.p2r(w.r2p(x.ax)+t):G[H+".ax"]=x.ax+t,x.ayref===x.yref?G[H+".ay"]=M.p2r(M.r2p(x.ay)+e):G[H+".ay"]=x.ay+e,Y(t,e);else{if(w)G[H+".x"]=x.x+t/w._m;else{var n=x._xsize/y.w,i=x.x+x._xshift/y.w-n/2;G[H+".x"]=g.align(i+t/y.w,n,0,1,x.xanchor)}if(M)G[H+".y"]=x.y+e/M._m;else{var a=x._ysize/y.h,o=x.y-x._yshift/y.h-a/2;G[H+".y"]=g.align(o-e/y.h,a,0,1,x.yanchor)}w&&M||(r=g.getCursor(w?.5:G[H+".x"],M?.5:G[H+".y"],x.xanchor,x.yanchor))}S.attr({transform:"translate("+t+","+e+")"+X}),m(E,r)},doneFn:function(e){if(m(E),e){s.relayout(t,G);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}var i=t.layout,l=t._fullLayout,y=t._fullLayout._size;l._infolayer.selectAll('.annotation[data-index="'+e+'"]').remove();var b=(i.annotations||[])[e],x=l.annotations[e],_="clip"+l._uid+"_ann"+e;if(!b||!1===x.visible)return void o.selectAll("#"+_).remove();var w=c.getFromId(t,x.xref),M=c.getFromId(t,x.yref),k={x:{},y:{}},A=+x.textangle||0,T=l._infolayer.append("g").classed("annotation",!0).attr("data-index",String(e)).style("opacity",x.opacity),S=T.append("g").classed("annotation-text-g",!0).attr("data-index",String(e)),E=S.append("g").style("pointer-events",x.captureevents?"all":null).call(m,"default").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",{index:e,annotation:b,fullAnnotation:x})});x.hovertext&&E.on("mouseover",function(){var e=x.hoverlabel,r=e.font,n=this.getBoundingClientRect(),i=t.getBoundingClientRect();h.loneHover({x0:n.left-i.left,x1:n.right-i.left,y:(n.top+n.bottom)/2-i.top,text:x.hovertext,color:e.bgcolor,borderColor:e.bordercolor,fontFamily:r.family,fontSize:r.size,fontColor:r.color},{container:l._hoverlayer.node(),outerContainer:l._paper.node()})}).on("mouseout",function(){h.loneUnhover(l._hoverlayer.node())});var L=x.borderwidth,C=x.borderpad,z=L+C,D=E.append("rect").attr("class","bg").style("stroke-width",L+"px").call(f.stroke,x.bordercolor).call(f.fill,x.bgcolor),I=x.width||x.height,P=l._defs.select(".clips").selectAll("#"+_).data(I?[0]:[]);P.enter().append("clipPath").classed("annclip",!0).attr("id",_).append("rect"),P.exit().remove();var O=x.font,R=E.append("text").classed("annotation",!0).attr("data-unformatted",x.text).text(x.text);t._context.editable?R.call(p.makeEditable,E).call(r).on("edit",function(n){x.text=n,this.attr({"data-unformatted":x.text}),this.call(r);var i={};i["annotations["+e+"].text"]=x.text,w&&w.autorange&&(i[w._name+".autorange"]=!0),M&&M.autorange&&(i[M._name+".autorange"]=!0),s.relayout(t,i)}):R.call(r)}function a(t,e,r,n,i,a,o,s){var l=r-t,u=i-t,c=o-i,h=n-e,f=a-e,d=s-a,p=l*d-c*h;if(0===p)return null;var m=(u*d-c*f)/p,g=(u*h-l*f)/p;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+h*m}}var o=t("d3"),s=t("../../plotly"),l=t("../../plots/plots"),u=t("../../lib"),c=t("../../plots/cartesian/axes"),h=t("../../plots/cartesian/graph_interact"),f=t("../color"),d=t("../drawing"),p=t("../../lib/svg_text_utils"),m=t("../../lib/setcursor"),g=t("../dragelement"),v=t("./draw_arrow_head");e.exports={draw:n,drawOne:i}},{"../../lib":690,"../../lib/setcursor":705,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"../../plots/plots":792,"../color":585,"../dragelement":606,"../drawing":608,"./draw_arrow_head":580,d3:114}],580:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("../color"),o=t("../drawing"),s=t("./arrow_paths");e.exports=function(t,e,r,l,u){function c(){t.style("stroke-dasharray","0px,100px")}function h(r,i){d.path&&(e>5&&(i=0),n.select(f.parentElement).append("path").attr({class:t.attr("class"),d:d.path,transform:"translate("+r.x+","+r.y+")rotate("+180*i/Math.PI+")scale("+y+")"}).style({fill:b,opacity:x,"stroke-width":0}))}i(l)||(l=1);var f=t.node(),d=s[e||0];"string"==typeof r&&r||(r="end");var p,m,g,v,y=(o.getPx(t,"stroke-width")||1)*l,b=t.style("stroke")||a.defaultLine,x=t.style("stroke-opacity")||1,_=r.indexOf("start")>=0,w=r.indexOf("end")>=0,M=d.backoff*y+u;if("line"===f.nodeName){p={x:+t.attr("x1"),y:+t.attr("y1")},m={x:+t.attr("x2"),y:+t.attr("y2")};var k=p.x-m.x,A=p.y-m.y;if(g=Math.atan2(A,k),v=g+Math.PI,M){if(M*M>k*k+A*A)return void c();var T=M*Math.cos(g),S=M*Math.sin(g);_&&(p.x-=T,p.y-=S,t.attr({x1:p.x,y1:p.y})),w&&(m.x+=T,m.y+=S,t.attr({x2:m.x,y2:m.y}))}}else if("path"===f.nodeName){var E=f.getTotalLength(),L="";if(E=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}var i=t("tinycolor2"),a=t("fast-isnumeric"),o=e.exports={},s=t("./attributes");o.defaults=s.defaults;var l=o.defaultLine=s.defaultLine;o.lightLine=s.lightLine;var u=o.background=s.background;o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(i(t))},o.opacity=function(t){return t?i(t).getAlpha():0},o.addOpacity=function(t,e){var r=i(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=i(t).toRgb();if(1===r.a)return i(t).toRgbString();var n=i(e||u).toRgb(),a=1===n.a?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return i(o).toRgbString()},o.contrast=function(t,e,r){var n=i(t);return 1!==n.getAlpha()&&(n=i(o.combine(t,u))),(n.isDark()?e?n.lighten(e):u:r?n.darken(r):l).toString()},o.stroke=function(t,e){var r=i(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=i(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,i,a,s=Object.keys(t);for(e=0;es&&(a[1]-=(st-s)/2):r.node()&&!r.classed("js-placeholder")&&(st=d.bBox(e.node()).height),st){if(st+=5,"top"===_.titleside)$.domain[1]-=st/T.h,a[1]*=-1;else{$.domain[0]+=st/T.h;var u=Math.max(1,r.selectAll("tspan.line").size());a[1]+=(1-u)*s}e.attr("transform","translate("+a+")"),$.setScale()}}at.selectAll(".cbfills,.cblines,.cbaxis").attr("transform","translate(0,"+Math.round(T.h*(1-$.domain[1]))+")");var h=at.select(".cbfills").selectAll("rect.cbfill").data(C);h.enter().append("rect").classed("cbfill",!0).style("stroke","none"),h.exit().remove(),h.each(function(t,e){var r=[0===e?E[0]:(C[e]+C[e-1])/2,e===C.length-1?E[1]:(C[e]+C[e+1])/2].map($.c2p).map(Math.round);e!==C.length-1&&(r[1]+=r[1]>r[0]?1:-1);var a=D(t).replace("e-",""),o=i(a).toHexString();n.select(this).attr({x:X,width:Math.max(B,2),y:n.min(r),height:Math.max(n.max(r)-n.min(r),2),fill:o})});var f=at.select(".cblines").selectAll("path.cbline").data(_.line.color&&_.line.width?L:[]);return f.enter().append("path").classed("cbline",!0),f.exit().remove(),f.each(function(t){n.select(this).attr("d","M"+X+","+(Math.round($.c2p(t))+_.line.width/2%1)+"h"+B).call(d.lineGroupStyle,_.line.width,z(t),_.line.dash)}),$._axislayer.selectAll("g."+$._id+"tick,path").remove(),$._pos=X+B+(_.outlinewidth||0)/2-("outside"===_.ticks?1:0),$.side="right",c.syncOrAsync([function(){return l.doTicks(t,$,!0)},function(){if(-1===["top","bottom"].indexOf(_.titleside)){var e=$.titlefont.size,r=$._offset+$._length/2,i=T.l+($.position||0)*T.w+("right"===$.side?10+e*($.showticklabels?1:.5):-10-e*($.showticklabels?.5:0));M("h"+$._id+"title",{avoid:{selection:n.select(t).selectAll("g."+$._id+"tick"),side:_.titleside,offsetLeft:T.l,offsetTop:T.t,maxShift:A.width},attributes:{x:i,y:r,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}}])}function M(e,r){var n,i=x();n=s.traceIs(i,"markerColorscale")?"marker.colorbar.title":"colorbar.title";var a={propContainer:$,propName:n,traceIndex:i.index,dfltName:"colorscale",containerGroup:at.select(".cbtitle")},o="h"===e.charAt(0)?e.substr(1):"h"+e;at.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(t,e,h(a,r||{}))}function k(){var r=B+_.outlinewidth/2+d.bBox($._axislayer.node()).width;if(j=ot.select("text"),j.node()&&!j.classed("js-placeholder")){var n,i=ot.select(".h"+$._id+"title-math-group").node();n=i&&-1!==["top","bottom"].indexOf(_.titleside)?d.bBox(i).width:d.bBox(ot.node()).right-X-T.l,r=Math.max(r,n)}var a=2*_.xpad+r+_.borderwidth+_.outlinewidth/2,s=J-K;at.select(".cbbg").attr({x:X-_.xpad-(_.borderwidth+_.outlinewidth)/2,y:K-Y,width:Math.max(a,2),height:Math.max(s+2*Y,2)}).call(p.fill,_.bgcolor).call(p.stroke,_.bordercolor).style({"stroke-width":_.borderwidth}),at.selectAll(".cboutline").attr({x:X,y:K+_.ypad+("top"===_.titleside?st:0),width:Math.max(B,2),height:Math.max(s-2*_.ypad-st,2)}).call(p.stroke,_.outlinecolor).style({fill:"None","stroke-width":_.outlinewidth});var l=({center:.5,right:1}[_.xanchor]||0)*a;at.attr("transform","translate("+(T.l-l)+","+T.t+")"),o.autoMargin(t,e,{x:_.x,y:_.y,l:a*({right:1,center:.5}[_.xanchor]||0),r:a*({left:1,center:.5}[_.xanchor]||0),t:s*({bottom:1,middle:.5}[_.yanchor]||0),b:s*({top:1,middle:.5}[_.yanchor]||0)})}var A=t._fullLayout,T=A._size;if("function"!=typeof _.fillcolor&&"function"!=typeof _.line.color)return void A._infolayer.selectAll("g."+e).remove();var S,E=n.extent(("function"==typeof _.fillcolor?_.fillcolor:_.line.color).domain()),L=[],C=[],z="function"==typeof _.line.color?_.line.color:function(){return _.line.color},D="function"==typeof _.fillcolor?_.fillcolor:function(){return _.fillcolor},I=_.levels.end+_.levels.size/100,P=_.levels.size,O=1.001*E[0]-.001*E[1],R=1.001*E[1]-.001*E[0];for(S=_.levels.start;(S-I)*P<0;S+=P)S>O&&SE[0]&&S1){var it=Math.pow(10,Math.floor(Math.log(nt)/Math.LN10));et*=it*c.roundUp(nt/it,[2,5,10]),(Math.abs(_.levels.start)/_.levels.size+1e-6)%1<2e-6&&($.tick0=0)}$.dtick=et}$.domain=[Z+G,Z+q-G],$.setScale();var at=A._infolayer.selectAll("g."+e).data([0]);at.enter().append("g").classed(e,!0).each(function(){var t=n.select(this);t.append("rect").classed("cbbg",!0),t.append("g").classed("cbfills",!0),t.append("g").classed("cblines",!0),t.append("g").classed("cbaxis",!0).classed("crisp",!0),t.append("g").classed("cbtitleunshift",!0).append("g").classed("cbtitle",!0),t.append("rect").classed("cboutline",!0),t.select(".cbtitle").datum(0)}),at.attr("transform","translate("+Math.round(T.l)+","+Math.round(T.t)+")");var ot=at.select(".cbtitleunshift").attr("transform","translate(-"+Math.round(T.l)+",-"+Math.round(T.t)+")");$._axislayer=at.select(".cbaxis");var st=0;if(-1!==["top","bottom"].indexOf(_.titleside)){var lt,ut=T.l+(_.x+H)*T.w,ct=$.titlefont.size;lt="top"===_.titleside?(1-(Z+q-G))*T.h+T.t+3+.75*ct:(1-(Z+G))*T.h+T.t-3-.25*ct,M($._id+"title",{attributes:{x:ut,y:lt,"text-anchor":"start"}})}var ht=c.syncOrAsync([o.previousPromises,w,o.previousPromises,k],t);if(ht&&ht.then&&(t._promises||[]).push(ht),t._context.editable){var ft,dt,pt;u.init({element:at.node(),prepFn:function(){ft=at.attr("transform"),f(at)},moveFn:function(t,e){at.attr("transform",ft+" translate("+t+","+e+")"),dt=u.align(W+t/T.w,U,0,1,_.xanchor),pt=u.align(Z-e/T.h,q,0,1,_.yanchor);var r=u.getCursor(dt,pt,_.xanchor,_.yanchor);f(at,r)},doneFn:function(e){f(at),e&&void 0!==dt&&void 0!==pt&&a.restyle(t,{"colorbar.x":dt,"colorbar.y":pt},x().index)}})}return ht}function x(){var r,n,i=e.substr(2);for(r=0;r=0?i.Reds:i.Blues,l.colorscale=m,s.reversescale&&(m=a(m)),s.colorscale=m)}},{"../../lib":690,"./flip_scale":596,"./scales":603}],592:[function(t,e,r){"use strict";var n=t("./attributes"),i=t("../../lib/extend").extendDeep;t("./scales.js");e.exports=function(t){return{color:{valType:"color",arrayOk:!0},colorscale:i({},n.colorscale,{}),cauto:i({},n.zauto,{}),cmax:i({},n.zmax,{}),cmin:i({},n.zmin,{}),autocolorscale:i({},n.autocolorscale,{}),reversescale:i({},n.reversescale,{})}}},{"../../lib/extend":682,"./attributes":590,"./scales.js":603}],593:[function(t,e,r){"use strict";var n=t("./scales");e.exports=n.RdBu},{"./scales":603}],594:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../colorbar/has_colorbar"),o=t("../colorbar/defaults"),s=t("./is_valid_scale"),l=t("./flip_scale");e.exports=function(t,e,r,u,c){var h=c.prefix,f=c.cLetter,d=h.slice(0,h.length-1),p=h?i.nestedProperty(t,d).get()||{}:t,m=h?i.nestedProperty(e,d).get()||{}:e,g=p[f+"min"],v=p[f+"max"],y=p.colorscale;u(h+f+"auto",!(n(g)&&n(v)&&g=0;i--,a++)e=t[i],n[a]=[1-e[0],e[1]];return n}},{}],597:[function(t,e,r){"use strict";var n=t("./scales"),i=t("./default_scale"),a=t("./is_valid_scale_array");e.exports=function(t,e){function r(){try{t=n[t]||JSON.parse(t)}catch(r){t=e}}return e||(e=i),t?("string"==typeof t&&(r(),"string"==typeof t&&r()),a(t)?t:e):e}},{"./default_scale":593,"./is_valid_scale_array":601,"./scales":603}],598:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("./is_valid_scale");e.exports=function(t,e){var r=e?i.nestedProperty(t,e).get()||{}:t,o=r.color,s=!1;if(Array.isArray(o))for(var l=0;l4/3-s?o:s}},{}],605:[function(t,e,r){"use strict";var n=t("../../lib"),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},{"../../lib":690}],606:[function(t,e,r){"use strict";function n(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function i(t){t._dragging=!1,t._replotPending&&a.plot(t)}var a=t("../../plotly"),o=t("../../lib"),s=t("../../plots/cartesian/constants"),l=t("../../constants/interactions"),u=e.exports={};u.align=t("./align"),u.getCursor=t("./cursor");var c=t("./unhover");u.unhover=c.wrapped,u.unhoverRaw=c.raw,u.init=function(t){function e(e){return t.element.onmousemove=m,g._dragged=!1,g._dragging=!0,c=e.clientX,h=e.clientY,p=e.target,f=(new Date).getTime(),f-g._mouseDownTimey&&(v=Math.max(v-1,1)),t.doneFn&&t.doneFn(g._dragged,v,e),!g._dragged){var r;try{r=new MouseEvent("click",e)}catch(t){r=document.createEvent("MouseEvents"),r.initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}p.dispatchEvent(r)}return i(g),g._dragged=!1,o.pauseEvent(e)}var c,h,f,d,p,m,g=o.getPlotDiv(t.element)||{},v=1,y=l.DBLCLICKDELAY;g._mouseDownTime||(g._mouseDownTime=0),m=t.element.onmousemove,t.setCursor&&(t.element.onmousemove=t.setCursor),t.element.onmousedown=e,t.element.style.pointerEvents="all"},u.coverSlip=n},{"../../constants/interactions":671,"../../lib":690,"../../plotly":724,"../../plots/cartesian/constants":734,"./align":604,"./cursor":605,"./unhover":607}],607:[function(t,e,r){"use strict";var n=t("../../lib/events"),i=e.exports={};i.wrapped=function(t,e,r){"string"==typeof t&&(t=document.getElementById(t)),t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),i.raw(t,e,r)},i.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},{"../../lib/events":681}],608:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){if(s.traceIs(r,"symbols")){var u=p(r);e.attr("d",function(t){var e;e="various"===t.ms||"various"===a.size?3:d.isBubble(r)?u(t.ms):(a.size||6)/2,t.mrc=e;var n=m.symbolNumber(t.mx||a.symbol)||0,i=n%100;return t.om=n%200>=100,m.symbolFuncs[i](e)+(n>=200?y:"")}).style("opacity",function(t){return(t.mo+1||a.opacity+1)-1})}var c,h,f;t.so?(f=o.outlierwidth,h=o.outliercolor,c=a.outliercolor):(f=(t.mlw+1||o.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,h="mlc"in t?t.mlcc=i(t.mlc):Array.isArray(o.color)?l.defaultLine:o.color,c="mc"in t?t.mcc=n(t.mc):Array.isArray(a.color)?l.defaultLine:a.color||"rgba(0,0,0,0)"),t.om?e.call(l.stroke,c).style({"stroke-width":(f||1)+"px",fill:"none"}):(e.style("stroke-width",f+"px").call(l.fill,c),f&&e.call(l.stroke,h))}function i(t,e,r,n){var i=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],u=Math.pow(i*i+o*o,x/2),c=Math.pow(s*s+l*l,x/2),h=(c*c*i-u*u*s)*n,f=(c*c*o-u*u*l)*n,d=3*c*(u+c),p=3*u*(u+c);return[[a.round(e[0]+(d&&h/d),2),a.round(e[1]+(d&&f/d),2)],[a.round(e[0]-(p&&h/p),2),a.round(e[1]-(p&&f/p),2)]]}var a=t("d3"),o=t("fast-isnumeric"),s=t("../../registry"),l=t("../color"),u=t("../colorscale"),c=t("../../lib"),h=t("../../lib/svg_text_utils"),f=t("../../constants/xmlns_namespaces"),d=t("../../traces/scatter/subtypes"),p=t("../../traces/scatter/make_bubble_size_func"),m=e.exports={};m.font=function(t,e,r,n){e&&e.family&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(l.fill,n)},m.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},m.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},m.setRect=function(t,e,r,n,i){t.call(m.setPosition,e,r).call(m.setSize,n,i)},m.translatePoint=function(t,e,r,n){var i=t.xp||r.c2p(t.x),a=t.yp||n.c2p(t.y);o(i)&&o(a)&&e.node()?"text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform","translate("+i+","+a+")"):e.remove()},m.translatePoints=function(t,e,r,n){t.each(function(t){var i=a.select(this);m.translatePoint(t,i,e,r,n)})},m.getPx=function(t,e){return Number(t.style(e).replace(/px$/,""))},m.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},m.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";l.stroke(e,n||a.color),m.dashLine(e,s,o)},m.lineGroupStyle=function(t,e,r,n){t.style("fill","none").each(function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},o=e||i.width||0,s=n||i.dash||"";a.select(this).call(l.stroke,r||i.color).call(m.dashLine,s,o)})},m.dashLine=function(t,e,r){r=+r||0;var n=Math.max(r,3);"solid"===e?e="":"dot"===e?e=n+"px,"+n+"px":"dash"===e?e=3*n+"px,"+3*n+"px":"longdash"===e?e=5*n+"px,"+5*n+"px":"dashdot"===e?e=3*n+"px,"+n+"px,"+n+"px,"+n+"px":"longdashdot"===e&&(e=5*n+"px,"+2*n+"px,"+n+"px,"+2*n+"px"),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},m.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(e){var r=a.select(this);try{r.call(l.fill,e[0].trace.fillcolor)}catch(e){c.error(e,t),r.remove()}})};var g=t("./symbol_defs");m.symbolNames=[],m.symbolFuncs=[],m.symbolNeedLines={},m.symbolNoDot={},m.symbolList=[],Object.keys(g).forEach(function(t){var e=g[t];m.symbolList=m.symbolList.concat([e.n,t,e.n+100,t+"-open"]),m.symbolNames[e.n]=t,m.symbolFuncs[e.n]=e.f,e.needLine&&(m.symbolNeedLines[e.n]=!0),e.noDot?m.symbolNoDot[e.n]=!0:m.symbolList=m.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"])});var v=m.symbolNames.length,y="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";m.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=m.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=v||t>=400?0:Math.floor(Math.max(t,0))},m.singlePointStyle=function(t,e,r){var i=r.marker,a=i.line;n(t,e,r,m.tryColorscale(i,""),m.tryColorscale(i,"line"),i,a)},m.pointStyle=function(t,e){if(t.size()){var r=e.marker,n=m.tryColorscale(r,""),i=m.tryColorscale(r,"line");t.each(function(t){m.singlePointStyle(t,a.select(this),e,n,i)})}},m.tryColorscale=function(t,e){var r=e?c.nestedProperty(t,e).get():t,n=r.colorscale,i=r.color;return n&&Array.isArray(i)?u.makeColorScaleFunc(u.extractScale(n,r.cmin,r.cmax)):c.identity};var b={start:1,end:-1,middle:0,bottom:1,top:-1};m.textPointStyle=function(t,e){t.each(function(t){var r=a.select(this),n=t.tx||e.text;if(!n||Array.isArray(n))return void r.remove();var i=t.tp||e.textposition,s=-1!==i.indexOf("top")?"top":-1!==i.indexOf("bottom")?"bottom":"middle",l=-1!==i.indexOf("left")?"end":-1!==i.indexOf("right")?"start":"middle",u=t.ts||e.textfont.size,c=t.mrc?t.mrc/.8+1:0;u=o(u)&&u>0?u:0,r.call(m.font,t.tf||e.textfont.family,u,t.tc||e.textfont.color).attr("text-anchor",l).text(n).call(h.convertToTspans);var f=a.select(this.parentNode),d=r.selectAll("tspan.line"),p=1.3*((d[0].length||1)-1)+1,g=b[l]*c,v=.75*u+b[s]*c+(b[s]-1)*p*u/2;f.attr("transform","translate("+g+","+v+")"),p>1&&d.attr({x:r.attr("x"),y:r.attr("y")})})};var x=.5;m.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],a=[];for(r=1;r=1e4&&(a.selectAll("[data-bb]").attr("data-bb",null),M=[]),t.setAttribute("data-bb",M.length),M.push(l),c.extendFlat({},l)},m.setClipUrl=function(t,e){if(!e)return void t.attr("clip-path",null);var r="#"+e,n=a.select("base");n.size()&&n.attr("href")&&(r=window.location.href.split("#")[0]+r),t.attr("clip-path","url("+r+")")},m.getTranslate=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}},m.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a+=" translate("+e+", "+r+")",a=a.trim(),t[i]("transform",a),a},m.getScale=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}},m.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a+=" scale("+e+", "+r+")",a=a.trim(),t[i]("transform",a),a},m.setPointGroupScale=function(t,e,r){var n,i,a;return e=e||1,r=r||1,i=1===e&&1===r?"":" scale("+e+","+r+")",a=/\s*sc.*/,t.each(function(){n=(this.getAttribute("transform")||"").replace(a,""),n+=i,n=n.trim(),this.setAttribute("transform",n)}),i}},{"../../constants/xmlns_namespaces":674,"../../lib":690,"../../lib/svg_text_utils":709,"../../registry":807,"../../traces/scatter/make_bubble_size_func":962,"../../traces/scatter/subtypes":967,"../color":585,"../colorscale":599,"./symbol_defs":609,d3:114,"fast-isnumeric":123}],609:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,i="l"+e+",-"+e,a="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+i+a+i+a+o+a+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8, -f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),i=n.round(-t,2),a=n.round(-.309*t,2);return"M"+e+","+a+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+a+"L0,"+i+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M"+i+",-"+r+"V"+r+"L0,"+e+"L-"+i+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+i+"H"+r+"L"+e+",0L"+r+",-"+i+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),i=n.round(.951*e,2),a=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(-.309*e,2),u=n.round(.118*e,2),c=n.round(.809*e,2);return"M"+r+","+l+"H"+i+"L"+a+","+u+"L"+o+","+c+"L0,"+n.round(.382*e,2)+"L-"+o+","+c+"L-"+a+","+u+"L-"+i+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),i=n.round(.76*t,2);return"M-"+i+",0l-"+r+",-"+e+"h"+i+"l"+r+",-"+e+"l"+r+","+e+"h"+i+"l-"+r+","+e+"l"+r+","+e+"h-"+i+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+i+o+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+i+o+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+i+"-"+e+","+e+i+e+","+e+i+e+",-"+e+i+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+i+"0,"+e+i+e+",0"+i+"0,-"+e+i+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+","+i+"L0,0M"+e+","+i+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+",-"+i+"L0,0M"+e+",-"+i+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M"+i+","+e+"L0,0M"+i+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+i+","+e+"L0,0M-"+i+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0}}},{d3:114}],610:[function(t,e,r){"use strict";e.exports={visible:{valType:"boolean"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"]},symmetric:{valType:"boolean"},array:{valType:"data_array"},arrayminus:{valType:"data_array"},value:{valType:"number",min:0,dflt:10},valueminus:{valType:"number",min:0,dflt:10},traceref:{valType:"integer",min:0,dflt:0},tracerefminus:{valType:"integer",min:0,dflt:0},copy_ystyle:{valType:"boolean"},copy_zstyle:{valType:"boolean"},color:{valType:"color"},thickness:{valType:"number",min:0,dflt:2},width:{valType:"number",min:0},_deprecated:{opacity:{valType:"number"}}}},{}],611:[function(t,e,r){"use strict";function n(t,e,r,n){var a=e["error_"+n]||{},l=a.visible&&-1!==["linear","log"].indexOf(r.type),u=[];if(l){for(var c=s(a),h=0;h0;t.each(function(t){var e,h=t[0].trace,f=h.error_x||{},d=h.error_y||{};h.ids&&(e=function(t){return t.id});var p=o.hasMarkers(h)&&h.marker.maxdisplayed>0;if(d.visible||f.visible){var m=i.select(this).selectAll("g.errorbar").data(t,e);m.exit().remove(),m.style("opacity",1);var g=m.enter().append("g").classed("errorbar",!0);c&&g.style("opacity",0).transition().duration(r.duration).style("opacity",1),m.each(function(t){var e=i.select(this),o=n(t,l,u);if(!p||t.vis){var h;if(d.visible&&a(o.x)&&a(o.yh)&&a(o.ys)){var m=d.width;h="M"+(o.x-m)+","+o.yh+"h"+2*m+"m-"+m+",0V"+o.ys,o.noYS||(h+="m-"+m+",0h"+2*m);var g=e.select("path.yerror");s=!g.size(),s?g=e.append("path").classed("yerror",!0):c&&(g=g.transition().duration(r.duration).ease(r.easing)),g.attr("d",h)}if(f.visible&&a(o.y)&&a(o.xh)&&a(o.xs)){var v=(f.copy_ystyle?d:f).width;h="M"+o.xh+","+(o.y-v)+"v"+2*v+"m0,-"+v+"H"+o.xs,o.noXS||(h+="m0,-"+v+"v"+2*v);var y=e.select("path.xerror");s=!y.size(),s?y=e.append("path").classed("xerror",!0):c&&(y=y.transition().duration(r.duration).ease(r.easing)),y.attr("d",h)}}})}})}},{"../../traces/scatter/subtypes":967,d3:114,"fast-isnumeric":123}],616:[function(t,e,r){"use strict";var n=t("d3"),i=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)})}},{"../color":585,d3:114}],617:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/constants");e.exports={_isLinkedToArray:"image",visible:{valType:"boolean",dflt:!0},source:{valType:"string"},layer:{valType:"enumerated",values:["below","above"],dflt:"above"},sizex:{valType:"number",dflt:0},sizey:{valType:"number",dflt:0},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain"},opacity:{valType:"number",min:0,max:1,dflt:1},x:{valType:"any",dflt:0},y:{valType:"any",dflt:0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper"}}},{"../../plots/cartesian/constants":734}],618:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib/to_log_range");e.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,u,c=t._fullLayout.images,h=e._id.charAt(0),f=0;f=2/3},r.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3},r.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],623:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.defaultLine},borderwidth:{valType:"number",min:0,dflt:0},font:a({},n,{}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"]},tracegroupgap:{valType:"number",min:0,dflt:10},x:{valType:"number",min:-2,max:3,dflt:1.02},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"}}},{"../../lib/extend":682,"../../plots/font_attributes":753,"../color/attributes":584}],624:[function(t,e,r){"use strict";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4}},{}],625:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("./attributes"),o=t("../../plots/layout_attributes"),s=t("./helpers");e.exports=function(t,e,r){function l(t,e){return i.coerce(d,p,a,t,e)}for(var u,c,h,f,d=t.legend||{},p=e.legend={},m=0,g="normal",v=0;v1)){if(l("bgcolor",e.paper_bgcolor),l("bordercolor"),l("borderwidth"),i.coerceFont(l,"font",e.font),l("orientation"),"h"===p.orientation){var b=t.xaxis;b&&b.rangeslider&&b.rangeslider.visible?(u=0,h="left",c=1.1,f="bottom"):(u=0,h="left",c=-.1,f="top")}l("traceorder",g),s.isGrouped(e.legend)&&l("tracegroupgap"),l("x",u),l("xanchor",h),l("y",c),l("yanchor",f),i.noneOrAll(d,p,["x","y"])}}},{"../../lib":690,"../../plots/layout_attributes":783,"../../registry":807,"./attributes":623,"./helpers":628}],626:[function(t,e,r){"use strict";function n(t,e){function r(r){y.convertToTspans(r,function(){r.selectAll("tspan.line").attr({x:r.attr("x")}),t.call(o,e)})}var n=t.data()[0][0],i=e._fullLayout,a=n.trace,s=p.traceIs(a,"pie"),l=a.index,u=s?n.label:a.name,c=t.selectAll("text.legendtext").data([0]);c.enter().append("text").classed("legendtext",!0),c.attr({x:40,y:0,"data-unformatted":u}).style("text-anchor","start").classed("user-select-none",!0).call(g.font,i.legend.font).text(u),e._context.editable&&!s?c.call(y.makeEditable).call(r).on("edit",function(t){this.attr({"data-unformatted":t}),this.text(t).call(r),this.text()||(t=" ");var i,a=n.trace._fullInput||{};if(-1!==["ohlc","candlestick"].indexOf(a.type)){var o=n.trace.transforms;i=o[o.length-1].direction+".name"}else i="name";h.restyle(e,i,t,l)}):c.call(r)}function i(t,e){var r,n=1,i=t.selectAll("rect").data([0]);i.enter().append("rect").classed("legendtoggle",!0).style("cursor","pointer").attr("pointer-events","all").call(v.fill,"rgba(0,0,0,0)"),i.on("mousedown",function(){r=(new Date).getTime(),r-e._legendMouseDownTimeT&&(n=Math.max(n-1,1)),1===n?r._clickTimeout=setTimeout(function(){a(t,e,n)},T):2===n&&(r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0,a(t,e,n))}})}function a(t,e,r){if(!e._dragged&&!e._editing){var n,i,a=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],o=t.data()[0][0],s=e._fullData,l=o.trace,u=l.legendgroup,c=[];if(1===r&&A&&e.data&&e._context.showTips?(f.notifier("Double click on legend to isolate individual trace","long"),A=!1):A=!1,p.traceIs(l,"pie")){var d=o.label,m=a.indexOf(d);1===r?-1===m?a.push(d):a.splice(m,1):2===r&&(a=[],e.calcdata[0].forEach(function(t){d!==t.label&&a.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===a.length&&-1===m&&(a=[])),h.relayout(e,"hiddenlabels",a)}else{var g,v=[],y=[];for(g=0;gtspan"),h=c[0].length||1;r=s*h,n=u.node()&&g.bBox(u.node()).width;var f=s*(.3+(1-h)/2);u.attr("y",f),c.attr("y",f)}r=Math.max(r,16)+3,i.height=r,i.width=n}function s(t,e,r){var n=t._fullLayout,i=n.legend,a=i.borderwidth,o=M.isGrouped(i);if(M.isVertical(i))o&&e.each(function(t,e){g.setTranslate(this,0,e*i.tracegroupgap)}),i.width=0,i.height=0,r.each(function(t){var e=t[0],r=e.height,n=e.width;g.setTranslate(this,a,5+a+i.height+r/2),i.height+=r,i.width=Math.max(i.width,n)}),i.width+=45+2*a,i.height+=10+2*a,o&&(i.height+=(i._lgroupsLength-1)*i.tracegroupgap),i.width=Math.ceil(i.width),i.height=Math.ceil(i.height),r.each(function(e){var r=e[0];c.select(this).select(".legendtoggle").call(g.setRect,0,-r.height/2,(t._context.editable?0:i.width)+40,r.height)});else if(o){i.width=0,i.height=0;for(var s=[i.width],l=e.data(),u=0,h=l.length;un.width-(n.margin.r+n.margin.l)&&(y=0,p+=m,i.height=i.height+m,m=0),g.setTranslate(this,a+y,5+a+e.height/2+p),i.width+=o+r,i.height=Math.max(i.height,e.height),y+=o+r,m=Math.max(e.height,m)}),i.width+=2*a,i.height+=10+2*a,i.width=Math.ceil(i.width),i.height=Math.ceil(i.height),r.each(function(e){var r=e[0];c.select(this).select(".legendtoggle").call(g.setRect,0,-r.height/2,t._context.editable?0:i.width,r.height)})}}function l(t){var e=t._fullLayout,r=e.legend,n="left";k.isRightAnchor(r)?n="right":k.isCenterAnchor(r)&&(n="center");var i="top";k.isBottomAnchor(r)?i="bottom":k.isMiddleAnchor(r)&&(i="middle"),d.autoMargin(t,"legend",{x:r.x,y:r.y,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:r.height*({top:1,middle:.5}[i]||0),t:r.height*({bottom:1,middle:.5}[i]||0)})}function u(t){var e=t._fullLayout,r=e.legend,n="left";k.isRightAnchor(r)?n="right":k.isCenterAnchor(r)&&(n="center"),d.autoMargin(t,"legend",{x:r.x,y:.5,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:0,t:0})}var c=t("d3"),h=t("../../plotly"),f=t("../../lib"),d=t("../../plots/plots"),p=t("../../registry"),m=t("../dragelement"),g=t("../drawing"),v=t("../color"),y=t("../../lib/svg_text_utils"),b=t("./constants"),x=t("../../constants/interactions"),_=t("./get_legend_data"),w=t("./style"),M=t("./helpers"),k=t("./anchor_utils"),A=!0,T=x.DBLCLICKDELAY;e.exports=function(t){function e(t,e){L.attr("data-scroll",e).call(g.setTranslate,0,e),C.call(g.setRect,N,t,b.scrollBarWidth,b.scrollBarHeight),S.select("rect").attr({y:y.borderwidth-e})}var r=t._fullLayout,o="legend"+r._uid;if(r._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var y=r.legend,x=r.showlegend&&_(t.calcdata,y),M=r.hiddenlabels||[];if(!r.showlegend||!x.length)return r._infolayer.selectAll(".legend").remove(),r._topdefs.select("#"+o).remove(),void d.autoMargin(t,"legend");var A=r._infolayer.selectAll("g.legend").data([0]);A.enter().append("g").attr({class:"legend","pointer-events":"all"});var S=r._topdefs.selectAll("#"+o).data([0]);S.enter().append("clipPath").attr("id",o).append("rect");var E=A.selectAll("rect.bg").data([0]);E.enter().append("rect").attr({class:"bg","shape-rendering":"crispEdges"}),E.call(v.stroke,y.bordercolor),E.call(v.fill,y.bgcolor),E.style("stroke-width",y.borderwidth+"px");var L=A.selectAll("g.scrollbox").data([0]);L.enter().append("g").attr("class","scrollbox");var C=A.selectAll("rect.scrollbar").data([0]);C.enter().append("rect").attr({class:"scrollbar",rx:20,ry:2,width:0,height:0}).call(v.fill,"#808BA4");var z=L.selectAll("g.groups").data(x);z.enter().append("g").attr("class","groups"),z.exit().remove();var D=z.selectAll("g.traces").data(f.identity);D.enter().append("g").attr("class","traces"),D.exit().remove(),D.call(w).style("opacity",function(t){var e=t[0].trace;return p.traceIs(e,"pie")?-1!==M.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1}).each(function(){c.select(this).call(n,t).call(i,t)});var I=0!==A.enter().size();I&&(s(t,z,D),l(t));var P=r.width,O=r.height;s(t,z,D),y.height>O?u(t):l(t);var R=r._size,j=R.l+R.w*y.x,F=R.t+R.h*(1-y.y);k.isRightAnchor(y)?j-=y.width:k.isCenterAnchor(y)&&(j-=y.width/2),k.isBottomAnchor(y)?F-=y.height:k.isMiddleAnchor(y)&&(F-=y.height/2);var N=y.width,B=R.w;N>B?(j=R.l,N=B):(j+N>P&&(j=P-N),j<0&&(j=0),N=Math.min(P-j,y.width));var U=y.height,V=R.h;U>V?(F=R.t,U=V):(F+U>O&&(F=O-U),F<0&&(F=0),U=Math.min(O-F,y.height)),g.setTranslate(A,j,F);var q,H,Y=U-b.scrollBarHeight-2*b.scrollBarMargin,G=y.height-U;if(y.height<=U||t._context.staticPlot)E.attr({width:N-y.borderwidth,height:U-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),g.setTranslate(L,0,0),S.select("rect").attr({width:N-2*y.borderwidth,height:U-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth}),L.call(g.setClipUrl,o);else{q=b.scrollBarMargin,H=L.attr("data-scroll")||0,E.attr({width:N-2*y.borderwidth+b.scrollBarWidth+b.scrollBarMargin,height:U-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),S.select("rect").attr({width:N-2*y.borderwidth+b.scrollBarWidth+b.scrollBarMargin,height:U-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth-H}),L.call(g.setClipUrl,o),I&&e(q,H),A.on("wheel",null),A.on("wheel",function(){H=f.constrain(L.attr("data-scroll")-c.event.deltaY/Y*G,-G,0),q=b.scrollBarMargin-H/G*Y,e(q,H),c.event.preventDefault()}),C.on(".drag",null),L.on(".drag",null);var X=c.behavior.drag().on("drag",function(){q=f.constrain(c.event.y-b.scrollBarHeight/2,b.scrollBarMargin,b.scrollBarMargin+Y),H=-(q-b.scrollBarMargin)/Y*G,e(q,H)});C.call(X),L.call(X)}if(t._context.editable){var W,Z,J,K;A.classed("cursor-move",!0),m.init({element:A.node(),prepFn:function(){var t=g.getTranslate(A);J=t.x,K=t.y},moveFn:function(t,e){var r=J+t,n=K+e;g.setTranslate(A,r,n),W=m.align(r,0,R.l,R.l+R.w,y.xanchor),Z=m.align(n,0,R.t+R.h,R.t,y.yanchor)},doneFn:function(e,n,i){if(e&&void 0!==W&&void 0!==Z)h.relayout(t,{"legend.x":W,"legend.y":Z});else{var o=r._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return i.clientX>=t.left&&i.clientX<=t.right&&i.clientY>=t.top&&i.clientY<=t.bottom});o.size()>0&&(1===n?A._clickTimeout=setTimeout(function(){a(o,t,n)},T):2===n&&(A._clickTimeout&&clearTimeout(A._clickTimeout),a(o,t,n)))}}})}}}},{"../../constants/interactions":671,"../../lib":690,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/plots":792,"../../registry":807,"../color":585,"../dragelement":606,"../drawing":608,"./anchor_utils":622,"./constants":624,"./get_legend_data":627,"./helpers":628,"./style":630,d3:114}],627:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("./helpers");e.exports=function(t,e){function r(t,r){if(""!==t&&i.isGrouped(e))-1===l.indexOf(t)?(l.push(t),u=!0,s[t]=[[r]]):s[t].push([r]);else{var n="~~i"+h;l.push(n),s[n]=[[r]],h++}}var a,o,s={},l=[],u=!1,c={},h=0;for(a=0;ar[1])return r[1]}return i}function r(t){return t[0]}var n,i,a=t[0],o=a.trace,s=d.hasMarkers(o),u=d.hasText(o),f=d.hasLines(o);if(s||u||f){var p={},m={};s&&(p.mc=e("marker.color",r),p.mo=e("marker.opacity",c.mean,[.2,1]),p.ms=e("marker.size",c.mean,[2,16]),p.mlc=e("marker.line.color",r),p.mlw=e("marker.line.width",c.mean,[0,5]),m.marker={sizeref:1,sizemin:1,sizemode:"diameter"}),f&&(m.line={width:e("line.width",r,[0,10])}),u&&(p.tx="Aa",p.tp=e("textposition",r),p.ts=10,p.tc=e("textfont.color",r),p.tf=e("textfont.family",r)),n=[c.minExtend(a,p)],i=c.minExtend(o,m)}var g=l.select(this).select("g.legendpoints"),v=g.selectAll("path.scatterpts").data(s?n:[]);v.enter().append("path").classed("scatterpts",!0).attr("transform","translate(20,0)"),v.exit().remove(),v.call(h.pointStyle,i),s&&(n[0].mrc=3);var y=g.selectAll("g.pointtext").data(u?n:[]);y.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),y.exit().remove(),y.selectAll("text").call(h.textPointStyle,i)}function a(t){var e=t[0].trace,r=e.marker||{},n=r.line||{},i=l.select(this).select("g.legendpoints").selectAll("path.legendbar").data(u.traceIs(e,"bar")?[t]:[]);i.enter().append("path").classed("legendbar",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),i.exit().remove(),i.each(function(t){var e=l.select(this),i=t[0],a=(i.mlw+1||n.width+1)-1;e.style("stroke-width",a+"px").call(f.fill,i.mc||r.color),a&&e.call(f.stroke,i.mlc||n.color)})}function o(t){ -var e=t[0].trace,r=l.select(this).select("g.legendpoints").selectAll("path.legendbox").data(u.traceIs(e,"box")&&e.visible?[t]:[]);r.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.each(function(){var t=e.line.width,r=l.select(this);r.style("stroke-width",t+"px").call(f.fill,e.fillcolor),t&&r.call(f.stroke,e.line.color)})}function s(t){var e=t[0].trace,r=l.select(this).select("g.legendpoints").selectAll("path.legendpie").data(u.traceIs(e,"pie")&&e.visible?[t]:[]);r.enter().append("path").classed("legendpie",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.size()&&r.call(p,t[0],e)}var l=t("d3"),u=t("../../registry"),c=t("../../lib"),h=t("../drawing"),f=t("../color"),d=t("../../traces/scatter/subtypes"),p=t("../../traces/pie/style_one");e.exports=function(t){t.each(function(t){var e=l.select(this),r=e.selectAll("g.layers").data([0]);r.enter().append("g").classed("layers",!0),r.style("opacity",t[0].trace.opacity),r.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),r.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var n=r.selectAll("g.legendsymbols").data([t]);n.enter().append("g").classed("legendsymbols",!0),n.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(a).each(o).each(s).each(n).each(i)}},{"../../lib":690,"../../registry":807,"../../traces/pie/style_one":932,"../../traces/scatter/subtypes":967,"../color":585,"../drawing":608,d3:114}],631:[function(t,e,r){"use strict";function n(t,e){var r=e.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=t._fullLayout,o={};if("zoom"===n){for(var s,l,c="in"===i?.5:2,f=(1+c)/2,d=(1-c)/2,p=h.list(t,null,!0),m=0;m1)return n(["resetViews","toggleHover"]),o(g,r);c&&(n(["zoom3d","pan3d","orbitRotation","tableRotation"]),n(["resetCameraDefault3d","resetCameraLastSave3d"]),n(["hoverClosest3d"])),f&&(n(["zoomInGeo","zoomOutGeo","resetGeo"]),n(["hoverClosestGeo"]));var v=i(s),y=[];return((u||p)&&!v||m)&&(y=["zoom2d","pan2d"]),(u||m)&&a(l)&&(y.push("select2d"),y.push("lasso2d")),y.length&&n(y),!u&&!p||v||m||n(["zoomIn2d","zoomOut2d","autoScale2d","resetScale2d"]),u&&d?n(["toggleHover"]):p?n(["hoverClosestGl2d"]):u?n(["hoverClosestCartesian","hoverCompareCartesian"]):d&&n(["hoverClosestPie"]),o(g,r)}function i(t){for(var e=l.list({_fullLayout:t},null,!0),r=!0,n=0;n0)){var p=i(e,r,l);h("x",p[0]),h("y",p[1]),a.noneOrAll(t,e,["x","y"]),h("xanchor"),h("yanchor"),a.coerceFont(h,"font",r.font);var m=h("bgcolor");h("activecolor",o.contrast(m,u.lightAmount,u.darkAmount)),h("bordercolor"),h("borderwidth")}}},{"../../lib":690,"../color":585,"./attributes":635,"./button_attributes":636,"./constants":637}],639:[function(t,e,r){"use strict";function n(t){for(var e=v.list(t,"x",!0),r=[],n=0;np&&(p=f)));return p>=d?[d,p]:void 0}}var i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./constants"),s=t("./helpers");e.exports=function(t){var e=t._fullLayout,r=i.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var s=0;sG&&n>X&&!t.shiftKey?p.getCursor(i/r,1-a/n):"move";m(e,o),Y=o.split("-")[0]}function a(e){N=h.getFromId(t,r.xref),B=h.getFromId(t,r.yref),U=v.getDataToPixel(t,N),V=v.getDataToPixel(t,B,!0),q=v.getPixelToData(t,N),H=v.getPixelToData(t,B,!0);var a="shapes["+n+"]";"path"===r.type?(j=r.path,F=a+".path"):(g=U(r.x0),y=V(r.y0),b=U(r.x1),x=V(r.y1),_=a+".x0",w=a+".y0",M=a+".x1",k=a+".y1"),gX&&(d[L]=r[I]=H(u),d[C]=r[P]=H(c)),f-h>G&&(d[z]=r[O]=q(h),d[D]=r[R]=q(f))}e.attr("d",o(t,r))}var d,g,y,b,x,_,w,M,k,A,T,S,E,L,C,z,D,I,P,O,R,j,F,N,B,U,V,q,H,Y,G=10,X=10,W={setCursor:i,element:e.node(),prepFn:a,doneFn:s},Z=W.element.getBoundingClientRect();p.init(W)}function o(t,e){var r,n,i,a,o=e.type,l=h.getFromId(t,e.xref),u=h.getFromId(t,e.yref),c=t._fullLayout._size;if(l?(r=v.shapePositionToRange(l),n=function(t){return l._offset+l.r2p(r(t,!0))}):n=function(t){return c.l+c.w*t},u?(i=v.shapePositionToRange(u),a=function(t){return u._offset+u.r2p(i(t,!0))}):a=function(t){return c.t+c.h*(1-t)},"path"===o)return l&&"date"===l.type&&(n=v.decodeDate(n)),u&&"date"===u.type&&(a=v.decodeDate(a)),s(e.path,n,a);var f=n(e.x0),d=n(e.x1),p=a(e.y0),m=a(e.y1);if("line"===o)return"M"+f+","+p+"L"+d+","+m;if("rect"===o)return"M"+f+","+p+"H"+d+"V"+m+"H"+f+"Z";var g=(f+d)/2,y=(p+m)/2,b=Math.abs(g-f),x=Math.abs(y-p),_="A"+b+","+x,w=g+b+","+y;return"M"+w+_+" 0 1,1 "+g+","+(y-x)+_+" 0 0,1 "+w+"Z"}function s(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i],l=t.substr(1).replace(g.paramRE,function(t){return a[n]?t=e(t):o[n]&&(t=r(t)),n++,n>s&&(t="X"),t});return n>s&&(l=l.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+t)),i+l})}function l(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,function(t){return n>=s?t:(a[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}var u=t("../../plotly"),c=t("../../lib"),h=t("../../plots/cartesian/axes"),f=t("../color"),d=t("../drawing"),p=t("../dragelement"),m=t("../../lib/setcursor"),g=t("./constants"),v=t("./helpers");e.exports={draw:n,drawOne:i}},{"../../lib":690,"../../lib/setcursor":705,"../../plotly":724,"../../plots/cartesian/axes":729,"../color":585,"../dragelement":606,"../drawing":608,"./constants":650,"./helpers":653}],653:[function(t,e,r){"use strict";r.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},r.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},r.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},r.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},r.getDataToPixel=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.shapePositionToRange(e);i=function(t){return e._offset+e.r2p(o(t,!0))},"date"===e.type&&(i=r.decodeDate(i))}else i=n?function(t){return a.t+a.h*(1-t)}:function(t){return a.l+a.w*t};return i},r.getPixelToData=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.rangeToShapePosition(e);i=function(t){return o(e.p2r(t-e._offset))}}else i=n?function(t){return 1-(t-a.t)/a.h}:function(t){return(t-a.l)/a.w};return i}},{}],654:[function(t,e,r){"use strict";var n=t("./draw");e.exports={moduleType:"component",name:"shapes",layoutAttributes:t("./attributes"),supplyLayoutDefaults:t("./defaults"),calcAutorange:t("./calc_autorange"),draw:n.draw,drawOne:n.drawOne}},{"./attributes":648,"./calc_autorange":649,"./defaults":651,"./draw":652}],655:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("./attributes"),o=t("./helpers");e.exports=function(t,e,r,s,l){function u(r,i){return n.coerce(t,e,a,r,i)}if(s=s||{},l=l||{},!u("visible",!l.itemIsNotPlainObject))return e;u("layer"),u("opacity"),u("fillcolor"),u("line.color"),u("line.width"),u("line.dash");for(var c=t.path?"path":"rect",h=u("type",c),f=["x","y"],d=0;d<2;d++){var p=f[d],m={_fullLayout:r},g=i.coerceRef(t,e,m,p,"","paper");if("path"!==h){var v,y,b;"paper"!==g?(v=i.getFromId(m,g),b=o.rangeToShapePosition(v),y=o.shapePositionToRange(v)):y=b=n.identity;var x=p+"0",_=p+"1",w=t[x],M=t[_];t[x]=y(t[x],!0),t[_]=y(t[_],!0),i.coercePosition(e,m,u,g,x,.25),i.coercePosition(e,m,u,g,_,.75),e[x]=b(e[x]),e[_]=b(e[_]),t[x]=w,t[_]=M}}return"path"===h?u("path"):n.noneOrAll(t,e,["x0","x1","y0","y1"]),e}},{"../../lib":690,"../../plots/cartesian/axes":729,"./attributes":648,"./helpers":653}],656:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../../plots/pad_attributes"),a=t("../../lib/extend").extendFlat,o=t("../../lib/extend").extendDeep,s=t("../../plots/animation_attributes"),l=t("./constants"),u={_isLinkedToArray:"step",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"}};e.exports={_isLinkedToArray:"slider",visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:o({},i,{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:a({},n,{})},font:a({},n,{}),activebgcolor:{valType:"color",dflt:l.gripBgActiveColor},bgcolor:{valType:"color",dflt:l.railBgColor},bordercolor:{valType:"color",dflt:l.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l.tickLength},tickcolor:{valType:"color",dflt:l.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l.minorTickLength}}},{"../../lib/extend":682,"../../plots/animation_attributes":725,"../../plots/font_attributes":753,"../../plots/pad_attributes":791,"./constants":657}],657:[function(t,e,r){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,fontSizeToHeight:1.3,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],658:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return a.coerce(t,e,s,r,n)}n("visible",i(t,e).length>0)&&(n("active"),n("x"),n("y"),a.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("len"),n("lenmode"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),a.coerceFont(n,"font",r.font),n("currentvalue.visible")&&(n("currentvalue.xanchor"),n("currentvalue.prefix"),n("currentvalue.suffix"),n("currentvalue.offset"),a.coerceFont(n,"currentvalue.font",e.font)),n("transition.duration"),n("transition.easing"),n("bgcolor"),n("activebgcolor"),n("bordercolor"),n("borderwidth"),n("ticklen"),n("tickwidth"),n("tickcolor"),n("minorticklen"))}function i(t,e){function r(t,e){return a.coerce(n,i,c,t,e)}for(var n,i,o=t.steps||[],s=e.steps=[],l=0;l=r.steps.length&&(r.active=0),e.call(s,r).call(x,r).call(c,r).call(p,r).call(b,t,r).call(l,t,r),A.setTranslate(e,r.lx+r.pad.l,r.ly+r.pad.t),e.call(g,r,r.active/(r.steps.length-1),!1),e.call(s,r)}function s(t,e,r){if(e.currentvalue.visible){var n,i,a=t.selectAll("text").data([0]);switch(e.currentvalue.xanchor){case"right":n=e.inputAreaLength-E.currentValueInset-e.currentValueMaxWidth,i="left";break;case"center":n=.5*e.inputAreaLength,i="middle";break;default:n=E.currentValueInset,i="left"}a.enter().append("text").classed(E.labelClass,!0).classed("user-select-none",!0).attr("text-anchor",i);var o=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)o+=r;else{o+=e.steps[e.active].label}return e.currentvalue.suffix&&(o+=e.currentvalue.suffix),a.call(A.font,e.currentvalue.font).text(o).call(T.convertToTspans),A.setTranslate(a,n,e.currentValueHeight),a}}function l(t,e,r){var n=t.selectAll("rect."+E.gripRectClass).data([0]);n.enter().append("rect").classed(E.gripRectClass,!0).call(d,e,t,r).style("pointer-events","all"),n.attr({width:E.gripWidth,height:E.gripHeight,rx:E.gripRadius,ry:E.gripRadius}).call(k.stroke,r.bordercolor).call(k.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function u(t,e,r){var n=t.selectAll("text").data([0]);return n.enter().append("text").classed(E.labelClass,!0).classed("user-select-none",!0).attr("text-anchor","middle"),n.call(A.font,r.font).text(e.step.label).call(T.convertToTspans),n}function c(t,e){var r=t.selectAll("g."+E.labelsClass).data([0]);r.enter().append("g").classed(E.labelsClass,!0);var n=r.selectAll("g."+E.labelGroupClass).data(e.labelSteps);n.enter().append("g").classed(E.labelGroupClass,!0),n.exit().remove(),n.each(function(t){var r=w.select(this);r.call(u,t,e),A.setTranslate(r,v(e,t.fraction),E.tickOffset+e.ticklen+e.labelHeight+E.labelOffset+e.currentValueTotalHeight)})}function h(t,e,r,n,i){var a=Math.round(n*(r.steps.length-1));a!==r.active&&f(t,e,r,a,!0,i)}function f(t,e,r,n,i,a){var o=r.active;r._input.active=r.active=n;var l=r.steps[r.active];e.call(g,r,r.active/(r.steps.length-1),a),e.call(s,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),l&&l.method&&i&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=i,e._nextMethod.doTransition=a):(e._nextMethod={step:l,doCallback:i,doTransition:a},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&&(M.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function d(t,e,r){function n(){return r.data()[0]}var i=r.node(),a=w.select(e);t.on("mousedown",function(){var t=n();e.emit("plotly_sliderstart",{slider:t});var o=r.select("."+E.gripRectClass);w.event.stopPropagation(),w.event.preventDefault(),o.call(k.fill,t.activebgcolor);var s=y(t,w.mouse(i)[0]);h(e,r,t,s,!0),t._dragging=!0,a.on("mousemove",function(){var t=n(),a=y(t,w.mouse(i)[0]);h(e,r,t,a,!1)}),a.on("mouseup",function(){var t=n();t._dragging=!1,o.call(k.fill,t.bgcolor),a.on("mouseup",null),a.on("mousemove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})})})}function p(t,e){var r=t.selectAll("rect."+E.tickRectClass).data(e.steps);r.enter().append("rect").classed(E.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(t,r){var n=r%e.labelStride==0,i=w.select(this);i.attr({height:n?e.ticklen:e.minorticklen}).call(k.fill,e.tickcolor),A.setTranslate(i,v(e,r/(e.steps.length-1))-.5*e.tickwidth,(n?E.tickOffset:E.minorTickOffset)+e.currentValueTotalHeight)})}function m(t){t.labelSteps=[];for(var e=t.steps.length,r=0;r0&&(o=o.transition().duration(e.transition.duration).ease(e.transition.easing)),o.attr("transform","translate("+(a-.5*E.gripWidth)+","+e.currentValueTotalHeight+")")}}function v(t,e){return t.inputAreaStart+E.stepInset+(t.inputAreaLength-2*E.stepInset)*Math.min(1,Math.max(0,e))}function y(t,e){return Math.min(1,Math.max(0,(e-E.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*E.stepInset-2*t.inputAreaStart)))}function b(t,e,r){var n=t.selectAll("rect."+E.railTouchRectClass).data([0]);n.enter().append("rect").classed(E.railTouchRectClass,!0).call(d,e,t,r).style("pointer-events","all"),n.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,E.tickOffset+r.ticklen+r.labelHeight)}).call(k.fill,r.bgcolor).attr("opacity",0),A.setTranslate(n,0,r.currentValueTotalHeight)}function x(t,e){var r=t.selectAll("rect."+E.railRectClass).data([0]);r.enter().append("rect").classed(E.railRectClass,!0);var n=e.inputAreaLength-2*E.railInset;r.attr({width:n,height:E.railWidth,rx:E.railRadius,ry:E.railRadius,"shape-rendering":"crispEdges"}).call(k.stroke,e.bordercolor).call(k.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),A.setTranslate(r,E.railInset,.5*(e.inputAreaWidth-E.railWidth)+e.currentValueTotalHeight)}function _(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n0?[0]:[]);if(s.enter().append("g").classed(E.containerClassName,!0).style("cursor","ew-resize"),s.exit().remove(),s.exit().size()&&_(t),0!==r.length){var l=s.selectAll("g."+E.groupClassName).data(r,i);l.enter().append("g").classed(E.groupClassName,!0),l.exit().each(function(e){w.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,M.autoMargin(t,E.autoMarginIdRoot+e._index)});for(var u=0;u0||f<0){var m={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[b.side];e.attr("transform","translate("+m+")")}}}var m=r.propContainer,g=r.propName,v=r.traceIndex,y=r.dfltName,b=r.avoid||{},x=r.attributes,_=r.transform,w=r.containerGroup,M=t._fullLayout,k=m.titlefont.family,A=m.titlefont.size,T=m.titlefont.color,S=1,E=!1,L=m.title.trim();""===L&&(S=0),L.match(/Click to enter .+ title/)&&(S=.2,E=!0),w||(w=M._infolayer.selectAll(".g-"+e).data([0]),w.enter().append("g").classed("g-"+e,!0));var C=w.selectAll("text").data([0]);C.enter().append("text"),C.text(L).attr("class",e),C.attr({"data-unformatted":L}).call(f);var z="Click to enter "+y+" title";t._context.editable?(L?C.on(".opacity",null):function(){S=0,E=!0,L=z,C.attr({"data-unformatted":L}).text(L).on("mouseover.opacity",function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)})}(),C.call(c.makeEditable).on("edit",function(e){void 0!==v?a.restyle(t,g,e,v):a.relayout(t,g,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(f)}).on("input",function(t){this.text(t||" ").attr(x).selectAll("tspan.line").attr(x)})):L&&!L.match(/Click to enter .+ title/)||C.remove(),C.classed("js-placeholder",E)}},{"../../constants/interactions":671,"../../lib":690,"../../lib/svg_text_utils":709,"../../plotly":724,"../../plots/plots":792,"../color":585,"../drawing":608,d3:114,"fast-isnumeric":123}],662:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat,o=t("../../plots/pad_attributes"),s={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""}};e.exports={_isLinkedToArray:"updatemenu",_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:s,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a({},o,{}),font:a({},n,{}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1}}},{"../../lib/extend":682,"../../plots/font_attributes":753,"../../plots/pad_attributes":791,"../color/attributes":584}],663:[function(t,e,r){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,fontSizeToHeight:1.3,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF"}},{}],664:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return a.coerce(t,e,s,r,n)}n("visible",i(t,e).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),a.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),a.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function i(t,e){function r(t,e){return a.coerce(n,i,c,t,e)}for(var n,i,o=t.buttons||[],s=e.buttons=[],l=0;l0?[0]:[]);if(a.enter().append("g").classed(E.containerClassName,!0).style("cursor","pointer"),a.exit().remove(),a.exit().size()&&_(t),0!==r.length){var c=a.selectAll("g."+E.headerGroupClassName).data(r,i);c.enter().append("g").classed(E.headerGroupClassName,!0);var h=a.selectAll("g."+E.dropdownButtonGroupClassName).data([0]);h.enter().append("g").classed(E.dropdownButtonGroupClassName,!0).style("pointer-events","all");for(var f=0;fM,T=n.barLength+2*n.barPad,S=n.barWidth+2*n.barPad,E=p,L=g+v;L+S>u&&(L=u-S);var C=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,n.barColor),A?(this.hbar=C.attr({rx:n.barRadius,ry:n.barRadius,x:E,y:L,width:T,height:S}),this._hbarXMin=E+T/2,this._hbarTranslateMax=M-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var z=v>k,D=n.barWidth+2*n.barPad,I=n.barLength+2*n.barPad,P=p+m,O=g;P+D>l&&(P=l-D);var R=this.container.selectAll("rect.scrollbar-vertical").data(z?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,n.barColor),z?(this.vbar=R.attr({rx:n.barRadius,ry:n.barRadius,x:P,y:O,width:D,height:I}),this._vbarYMin=O+I/2,this._vbarTranslateMax=k-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var j=this.id,F=c-.5,N=z?h+D+.5:h+.5,B=f-.5,U=A?d+S+.5:d+.5,V=s._topdefs.selectAll("#"+j).data(A||z?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",j).append("rect"),A||z?(this._clipRect=V.select("rect").attr({x:Math.floor(F),y:Math.floor(B),width:Math.ceil(N)-Math.floor(F),height:Math.ceil(U)-Math.floor(B)}),this.container.call(o.setClipUrl,j),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),A||z){var q=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(q);var H=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault(),i.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(H),z&&this.vbar.on(".drag",null).call(H)}this.setTranslate(e,r)},n.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},n.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=i.event.dx),this.vbar&&(e-=i.event.dy),this.setTranslate(t,e)},n.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=i.event.deltaY),this.vbar&&(e+=i.event.deltaY),this.setTranslate(t,e)},n.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,n=r+this._hbarTranslateMax;t=(s.constrain(i.event.x,r,n)-r)/(n-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,o=a+this._vbarTranslateMax;e=(s.constrain(i.event.y,a,o)-a)/(o-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},n.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=s.constrain(t||0,0,r),e=s.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(o.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(o.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var a=e/n;this.vbar.call(o.setTranslate,t,e+a*this._vbarTranslateMax)}}},{"../../lib":690,"../color":585,"../drawing":608,d3:114}],668:[function(t,e,r){"use strict";e.exports={solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}},{}],669:[function(t,e,r){"use strict";e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],670:[function(t,e,r){"use strict";e.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},{}],671:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300}},{}],672:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6}},{}],673:[function(t,e,r){"use strict";e.exports={entityToUnicode:{mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},unicodeToEntity:{"&":"amp","<":"lt",">":"gt",'"':"quot","'":"#x27","/":"#x2F"}}},{}],674:[function(t,e,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],675:[function(t,e,r){"use strict";var n=t("./plotly");r.version="1.25.2",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config"),r.plot=n.plot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.setPlotConfig=t("./plot_api/set_plot_config"),r.register=t("./plot_api/register"),r.toImage=t("./plot_api/to_image"),r.downloadImage=t("./snapshot/download"),r.validate=t("./plot_api/validate"),r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.register(t("./traces/scatter")),r.register([t("./components/legend"),t("./components/annotations"),t("./components/shapes"),t("./components/images"),t("./components/updatemenus"),t("./components/sliders"),t("./components/rangeslider"),t("./components/rangeselector")]),r.Icons=t("../build/ploticon"),r.Plots=n.Plots,r.Fx=n.Fx,r.Snapshot=t("./snapshot"),r.PlotSchema=t("./plot_api/plot_schema"),r.Queue=t("./lib/queue"),r.d3=t("d3")},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":581,"./components/images":621,"./components/legend":629,"./components/rangeselector":641,"./components/rangeslider":647,"./components/shapes":654,"./components/sliders":660,"./components/updatemenus":666,"./fonts/mathjax_config":676,"./lib/queue":702,"./plot_api/plot_schema":718,"./plot_api/register":719,"./plot_api/set_plot_config":720,"./plot_api/to_image":722,"./plot_api/validate":723,"./plotly":724,"./snapshot":812,"./snapshot/download":809,"./traces/scatter":957,d3:114,"es6-promise":120}],676:[function(t,e,r){"use strict";"undefined"!=typeof MathJax?(r.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):r.MathJax=!1},{}],677:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){Array.isArray(t)&&(e[r]=t[n])}},{}],678:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../constants/numerical").BADNUM;e.exports=function(t){return"string"==typeof t&&(t=t.replace(/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,"")),n(t)?Number(t):i}},{"../constants/numerical":672,"fast-isnumeric":123}],679:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("tinycolor2"),a=t("../components/colorscale/get_scale"),o=(Object.keys(t("../components/colorscale/scales")),t("./nested_property")),s=/^([2-9]|[1-9][0-9]+)$/;r.valObjects={data_array:{coerceFunction:function(t,e,r){Array.isArray(t)?e.set(t):void 0!==r&&e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)}},boolean:{coerceFunction:function(t,e,r){!0===t||!1===t?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(a(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?(Math.abs(t)>180&&(t-=360*Math.round(t/360)),e.set(+t)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r){var n=r.length;if("string"==typeof t&&t.substr(0,n)===r&&s.test(t.substr(n)))return void e.set(t);e.set(r)},validateFunction:function(t,e){var r=e.dflt,n=r.length;return t===r||"string"==typeof t&&!(t.substr(0,n)!==r||!s.test(t.substr(n)))}},flaglist:{coerceFunction:function(t,e,r,n){if("string"!=typeof t)return void e.set(r);if(-1!==(n.extras||[]).indexOf(t))return void e.set(t);for(var i=t.split("+"),a=0;a0&&(o=o.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+o}return n}function l(t){return t.formatDate("yyyy")}function u(t){return t.formatDate("M yyyy")}function c(t){return t.formatDate("M d")}function h(t){return t.formatDate("M d, yyyy")}var f=t("d3"),d=t("fast-isnumeric"),p=t("./loggers").error,m=t("./mod"),g=t("../constants/numerical"),v=g.BADNUM,y=g.ONEDAY,b=g.ONEHOUR,x=g.ONEMIN,_=g.ONESEC,w=g.EPOCHJD,M=t("../registry"),k=f.time.format.utc,A=(new Date).getFullYear()-70;r.dateTick0=function(t,e){return n(t)?e?M.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:M.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"},r.dfltRange=function(t){return n(t)?M.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},r.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime};var T,S;r.dateTime2ms=function(t,e){if(r.isJSDate(t))return t=Number(t)-t.getTimezoneOffset()*x,t>=T&&t<=S?t:v;if("string"!=typeof t&&"number"!=typeof t)return v;t=String(t);var i=n(e),a=t.charAt(0);!i||"G"!==a&&"g"!==a||(t=t.substr(1),e="");var o=i&&"chinese"===e.substr(0,7),s=t.match(o?/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m:/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m);if(!s)return v;var l=s[1],u=s[3]||"1",c=Number(s[5]||1),h=Number(s[7]||0),f=Number(s[9]||0),d=Number(s[11]||0);if(i){if(2===l.length)return v;l=Number(l);var p;try{var m=M.getComponentMethod("calendars","getCal")(e);if(o){var g="i"===u.charAt(u.length-1);u=parseInt(u,10),p=m.newDate(l,m.toMonthIndex(l,u,g),c)}else p=m.newDate(l,Number(u),c)}catch(t){return v}return p?(p.toJD()-w)*y+h*b+f*x+d*_:v}l=2===l.length?(Number(l)+2e3-A)%100+A:Number(l),u-=1;var k=new Date(Date.UTC(2e3,u,c,h,f));return k.setUTCFullYear(l),k.getUTCMonth()!==u?v:k.getUTCDate()!==c?v:k.getTime()+d*_},T=r.MIN_MS=r.dateTime2ms("-9999"),S=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==v};var E=90*y,L=3*b,C=5*x;r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=T&&t<=S))return v;e||(e=0);var i,o,s,l,u,c,h=Math.floor(10*m(t+.05,1)),f=Math.round(t-h/10);if(n(r)){var d=Math.floor(f/y)+w,p=Math.floor(m(t,y));try{i=M.getComponentMethod("calendars","getCal")(r).fromJD(d).formatDate("yyyy-mm-dd")}catch(t){i=k("G%Y-%m-%d")(new Date(f))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=e=T+y&&t<=S-y))return v;var e=Math.floor(10*m(t+.05,1)),r=new Date(Math.round(t-e/10));return a(f.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,i){if(r.isJSDate(t)||"number"==typeof t){if(n(i))return p("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,i))return p("unrecognized date",t),e;return t};var z=/%\d?f/g,D=[59,59.9,59.99,59.999,59.9999],I=k("%Y"),P=k("%b %Y"),O=k("%b %-d"),R=k("%b %-d, %Y");r.formatDate=function(t,e,r,i){var a,f;if(i=n(i)&&i,e)return o(e,t,i);if(i)try{var d=Math.floor((t+.05)/y)+w,p=M.getComponentMethod("calendars","getCal")(i).fromJD(d);"y"===r?f=l(p):"m"===r?f=u(p):"d"===r?(a=l(p),f=c(p)):(a=h(p),f=s(t,r))}catch(t){return"Invalid"}else{var m=new Date(Math.floor(t+.05));"y"===r?f=I(m):"m"===r?f=P(m):"d"===r?(a=I(m),f=O(m)):(a=R(m),f=s(t,r))}return f+(a?"\n"+a:"")};var j=3*y;r.incrementMonth=function(t,e,r){r=n(r)&&r;var i=m(t,y);if(t=Math.round(t-i),r)try{var a=Math.round(t/y)+w,o=M.getComponentMethod("calendars","getCal")(r),s=o.fromJD(a);return e%12?o.add(s,e,"m"):o.add(s,e/12,"y"),(s.toJD()-w)*y+i}catch(e){p("invalid ms "+t+" in calendar "+r)}var l=new Date(t+j);return l.setUTCMonth(l.getUTCMonth()+e)+i-j},r.findExactDates=function(t,e){for(var r,i,a=0,o=0,s=0,l=0,u=n(e)&&M.getComponentMethod("calendars","getCal")(e),c=0;c0&&(i.push(a),a=[])}return a.length>0&&i.push(a),i},r.makeLine=function(t,e){var r={};return r=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t},e&&(r.trace=e),r},r.makePolygon=function(t,e){var r={};if(1===t.length)r={type:"Polygon",coordinates:t};else{for(var n=new Array(t.length),i=0;i",e))>=0;){var r=t.indexOf("",e);if(r/g,"\n")}function a(t){return t.replace(/\<.*\>/g,"")}function o(t){for(var e=u.entityToUnicode,r=0;(r=t.indexOf("&",r))>=0;){var n=t.indexOf(";",r);if(nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},i.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},i.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o-1||c!==1/0&&c>=Math.pow(2,r)?t(e,r,n):l},i.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)},r["_"+e]=t,r},i.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,u=new Array(l),c=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*u[n];c[r]=a}return c},i.syncOrAsync=function(t,e,r){function n(){return i.syncOrAsync(t,e,r)}for(var a,o;t.length;)if(o=t.splice(0,1)[0],(a=o(e))&&a.then)return a.then(n).then(void 0,i.promiseError);return r&&r(e)},i.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},i.noneOrAll=function(t,e,r){if(t){var n,i,a=!1,o=!0;for(n=0;n1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l}},{"./clean_number":678,"./coerce":679,"./dates":680,"./extend":682,"./filter_unique":683,"./filter_visible":684,"./identity":689,"./is_array":691,"./is_plain_object":692,"./loggers":693,"./matrix":694,"./mod":695,"./nested_property":696,"./noop":697,"./notifier":698,"./push_unique":701,"./relink_private":703,"./search":704,"./stats":707,"./to_log_range":710,d3:114}],691:[function(t,e,r){"use strict";var n="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}};e.exports=function(t){return Array.isArray(t)||n.isView(t)}},{}],692:[function(t,e,r){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],693:[function(t,e,r){"use strict";function n(t,e){if(t.apply)t.apply(t,e);else for(var r=0;r1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;e=0;e--){if(n=t[e][0],a=t[e][1],l=!1,d(n))for(r=n.length-1;r>=0;r--)i(n[r],o(a,r))?l?n[r]=void 0:n.pop():l=!0;else if("object"==typeof n&&null!==n)for(s=Object.keys(n),l=!1,r=s.length-1;r>=0;r--)i(n[s[r]],o(a,s[r]))?delete n[s[r]]:l=!0;if(l)return}}function c(t){return void 0===t||null===t||"object"==typeof t&&(d(t)?!t.length:!Object.keys(t).length)}function h(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var f=t("fast-isnumeric"),d=t("./is_array"),p=t("./is_plain_object"),m=t("../plot_api/container_array_match");e.exports=function(t,e){if(f(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var r,i,o,s=0,l=e.split(".");s/g),s=0;sa||ns)&&(!e||!u(t))}function r(t,e){var r=t[0],l=t[1];if(ra||ls)return!1;var u,c,h,f,d,p=n.length,m=n[0][0],g=n[0][1],v=0;for(u=1;uMath.max(c,m)||l>Math.max(h,g)))if(lc||Math.abs(n(o,f))>i)return!0;return!1};i.filter=function(t,e){function r(r){t.push(r);var s=n.length,l=i;n.splice(o+1);for(var u=l+1;u1){r(t.pop())}return{addPt:r,raw:t,filtered:n}}},{"./matrix":694}],701:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;ra.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},o.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},o.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},o.undo=function(t){var e,r;if(t.framework&&t.framework.isPolar)return void t.framework.undo();if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function o(t,e){return t>=e}var s=t("fast-isnumeric"),l=t("./loggers");r.findBin=function(t,e,r){if(s(e.start))return r?Math.ceil((t-e.start)/e.size)-1:Math.floor((t-e.start)/e.size);var u,c,h=0,f=e.length,d=0;for(c=e[e.length-1]>=e[0]?r?n:i:r?o:a;h90&&l.log("Long binary search..."),h-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,i=e[n]-e[0]||1,a=i/(n||1)/1e4,o=[e[0]],s=0;se[s]+a&&(i=Math.min(i,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:i}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;it.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{"fast-isnumeric":123}],708:[function(t,e,r){"use strict";function n(t){var e=i(t);return e.length?e:[0,0,0,1]}var i=t("color-rgba");e.exports=n},{"color-rgba":87}],709:[function(t,e,r){"use strict";function n(t,e){return t.node().getBoundingClientRect()[e]}function i(t){return t.replace(/(<|<|<)/g,"\\lt ").replace(/(>|>|>)/g,"\\gt ")}function a(t,e,r){var n="math-output-"+f.randstr([],64),a=h.select("body").append("div").attr({id:n}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(i(t));MathJax.Hub.Queue(["Typeset",MathJax.Hub,a.node()],function(){var e=h.select("body").select("#MathJax_SVG_glyphs");if(a.select(".MathJax_SVG").empty()||!a.select("svg").node())f.log("There was an error in the tex syntax.",t),r();else{var n=a.select("svg").node().getBoundingClientRect();r(a.select(".MathJax_SVG"),e,n)}a.remove()})}function o(t,e){for(var r=t||"",n=0;n]*>)/).map(function(t){var e=t.match(/<(\/?)([^ >]*)\s*(.*)>/i),n=e&&e[2].toLowerCase(),i=m[n];if(void 0!==i){var a=e[1],o=e[3],s=o.match(/^style\s*=\s*"([^"]+)"\s*/i);if("a"===n){if(a)return"";if("href"!==o.substr(0,4).toLowerCase())return"";var u=o.substr(4).replace(/["']/g,"").replace(/=/,""),c=document.createElement("a");return c.href=u,-1===g.indexOf(c.protocol)?"":''}if("br"===n)return"
";if(a)return"sup"===n?'':"sub"===n?'':"";var h=""}return r.xml_entity_encode(t).replace(/");i>0;i=e.indexOf("
",i+1))n.push(i);var a=0;n.forEach(function(t){for(var r=t+a,n=e.slice(0,r),i="",o=n.length-1;o>=0;o--){var s=n[o].match(/<(\/?).*>/i);if(s&&"
"!==n[o]){s[1]||(i=n[o]);break}}i&&(e.splice(r+1,0,i),e.splice(r,0,""),a+=2)});var o=e.join(""),u=o.split(/
/gi);return u.length>1&&(e=u.map(function(t,e){return''+t+""})),e.join("")}function c(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||"top",l=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return i="bottom"===s?function(){return l.bottom-n.height}:"middle"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},a="right"===o?function(){return l.right-n.width}:"center"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:i()-u.top+"px",left:a()-u.left+"px","z-index":1e3}),this}}var h=t("d3"),f=t("../lib"),d=t("../constants/xmlns_namespaces"),p=t("../constants/string_mappings");h.selection.prototype.appendSVG=function(t){for(var e=['',t,""].join(""),r=(new DOMParser).parseFromString(e,"application/xml"),n=r.documentElement.firstChild;n;)this.node().appendChild(this.node().ownerDocument.importNode(n,!0)),n=n.nextSibling;return r.querySelector("parsererror")?(f.log(r.querySelector("parsererror div").textContent),null):h.select(this.node().lastChild)},r.html_entity_decode=function(t){var e=h.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":-1!==t.indexOf("<")||-1!==t.indexOf(">")?"":e.html(t).text()});return e.remove(),r},r.xml_entity_encode=function(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")},r.convertToTspans=function(t,e){function r(){d.empty()||(p=s.attr("class")+"-math",d.select("svg."+p).remove()),t.text("").style({visibility:"inherit","white-space":"pre"}),c=t.appendSVG(o),c||t.text(i),t.select("a").size()&&t.style("pointer-events","all"),e&&e.call(s)}var i=t.text(),o=u(i),s=t,l=!s.attr("data-notex")&&o.match(/([^$]*)([$]+[^$]*[$]+)([^$]*)/),c=i,d=h.select(s.node().parentNode);if(!d.empty()){var p=s.attr("class")?s.attr("class").split(" ")[0]:"text";p+="-math",d.selectAll("svg."+p).remove(),d.selectAll("g."+p+"-group").remove(),t.style({visibility:null});for(var m=t.node();m&&m.removeAttribute;m=m.parentNode)m.removeAttribute("data-bb");if(l){var g=f.getPlotDiv(s.node());(g&&g._promises||[]).push(new Promise(function(t){s.style({visibility:"hidden"});var i={fontSize:parseInt(s.style("font-size"),10)};a(l[2],i,function(i,a,o){d.selectAll("svg."+p).remove(),d.selectAll("g."+p+"-group").remove();var l=i&&i.select("svg");if(!l||!l.node())return r(),void t();var u=d.append("g").classed(p+"-group",!0).attr({"pointer-events":"none"});u.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild),l.attr({class:p,height:o.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=s.style("fill")||"black";l.select("g").attr({fill:c,stroke:c});var h=n(l,"width"),f=n(l,"height"),m=+s.attr("x")-h*{start:0,middle:.5,end:1}[s.attr("text-anchor")||"start"],g=parseInt(s.style("font-size"),10)||n(s,"height"),v=-g/4;"y"===p[0]?(u.attr({transform:"rotate("+[-90,+s.attr("x"),+s.attr("y")]+") translate("+[-h/2,v-f/2]+")"}),l.attr({x:+s.attr("x"),y:+s.attr("y")})):"l"===p[0]?l.attr({x:s.attr("x"),y:v-f/2}):"a"===p[0]?l.attr({x:0,y:v}):l.attr({x:m,y:+s.attr("y")+v-f/2}),e&&e.call(s,u),t(u)})}))}else r();return t}};var m={sup:'font-size:70%" dy="-0.6em',sub:'font-size:70%" dy="0.3em',b:"font-weight:bold",i:"font-style:italic",a:"",span:"",br:"",em:"font-style:italic;font-weight:bold"},g=["http:","https:","mailto:"],v=new RegExp("]*)?/?>","g"),y=Object.keys(p.entityToUnicode).map(function(t){return{regExp:new RegExp("&"+t+";","g"),sub:p.entityToUnicode[t]}}),b=Object.keys(p.unicodeToEntity).map(function(t){return{regExp:new RegExp(t,"g"),sub:"&"+p.unicodeToEntity[t]+";"}}),x=/(\r\n?|\n)/g;r.plainText=function(t){return(t||"").replace(v," ")},r.makeEditable=function(t,e,r){function n(){a(),o.style({opacity:0});var t,e=u.attr("class");(t=e?"."+e.split(" ")[0]+"-math-group":"[class*=-math-group]")&&h.select(o.node().parentNode).select(t).style({opacity:0})}function i(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}function a(){var t=f.getPlotDiv(o.node()),e=h.select(t),n=e.select(".svg-container"),a=n.append("div");a.classed("plugin-editable editable",!0).style({position:"absolute","font-family":o.style("font-family")||"Arial","font-size":o.style("font-size")||12,color:r.fill||o.style("fill")||"black",opacity:1,"background-color":r.background||"transparent",outline:"#ffffff33 1px solid",margin:[-parseFloat(o.style("font-size"))/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(r.text||o.attr("data-unformatted")).call(c(o,n,r)).on("blur",function(){t._editing=!1,o.text(this.textContent).style({opacity:1});var e,r=h.select(this).attr("class");(e=r?"."+r.split(" ")[0]+"-math-group":"[class*=-math-group]")&&h.select(o.node().parentNode).select(e).style({opacity:0});var n=this.textContent;h.select(this).transition().duration(0).remove(),h.select(document).on("mouseup",null),s.edit.call(o,n)}).on("focus",function(){var e=this;t._editing=!0,h.select(document).on("mouseup",function(){if(h.event.target===e)return!1;document.activeElement===a.node()&&a.node().blur()})}).on("keyup",function(){27===h.event.which?(t._editing=!1,o.style({opacity:1}),h.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),s.cancel.call(o,this.textContent)):(s.input.call(o,this.textContent),h.select(this).call(c(o,n,r)))}).on("keydown",function(){13===h.event.which&&this.blur()}).call(i)}r||(r={});var o=this,s=h.dispatch("edit","input","cancel"),l=h.select(this.node()).style({"pointer-events":"all"}),u=e||l;return e&&l.style({"pointer-events":"none"}),r.immediate?n():u.on("click",n),h.rebind(this,s,"on")}},{"../constants/string_mappings":673,"../constants/xmlns_namespaces":674,"../lib":690,d3:114}],710:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{"fast-isnumeric":123}],711:[function(t,e,r){"use strict";var n=e.exports={},i=t("../plots/geo/constants").locationmodeToLayer,a=t("topojson-client").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{"../plots/geo/constants":755,"topojson-client":523}],712:[function(t,e,r){"use strict";function n(t,e){for(var r=new Float32Array(e),n=0;n0)return t.substr(0,e)}var s=t("fast-isnumeric"),l=t("gl-mat4/fromQuat"),u=t("../registry"),c=t("../lib"),h=t("../plots/plots"),f=t("../plots/cartesian/axes"),d=t("../components/color");r.getGraphDiv=function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null===t||void 0===t)throw new Error("DOM element provided is null or undefined");return t},r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&c.log("Clearing previous rejected promises from queue."),t._promises=[]},r.cleanLayout=function(t){var e,r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1);var i=f.list({_fullLayout:t});for(e=0;e3?(g.x=1.02,g.xanchor="left"):g.x<-2&&(g.x=-.02,g.xanchor="right"),g.y>3?(g.y=1.02,g.yanchor="bottom"):g.y<-2&&(g.y=-.02,g.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var v=h.getSubplotIds(t,"gl3d");for(e=0;e1&&o.warn("Full array edits are incompatible with other edits",c);var v=r[""][""];if(u(v))e.set(null);else{if(!Array.isArray(v))return o.warn("Unrecognized full array edit value",c,v),!0;e.set(v)}return!p&&(h(m,g),f(t),!0)}var y,b,x,_,w,M,k,A=Object.keys(r).map(Number).sort(),T=e.get(),S=T||[],E=n(g,c).get(),L=[],C=-1,z=S.length;for(y=0;yS.length-(k?0:1))o.warn("index out of range",c,x);else if(void 0!==M)w.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",c,x),u(M)?L.push(x):k?("add"===M&&(M={}),S.splice(x,0,M),E&&E.splice(x,0,{})):o.warn("Unrecognized full object edit value",c,x,M),-1===C&&(C=x);else for(b=0;b=0;y--)S.splice(L[y],1),E&&E.splice(L[y],1);if(S.length?T||e.set(S):e.set(null),p)return!1;if(h(m,g),d!==a){var D;if(-1===C)D=A;else{for(z=Math.max(S.length,z),D=[],y=0;y=C);y++)D.push(x);for(y=C;y=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function l(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),s(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&s(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function u(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&lN.range[0]?[1,2]:[2,1]);else{var V=N.range[0],q=N.range[1];B?(V<=0&&q<=0&&r(R+".autorange",!0),V<=0?V=q/1e6:q<=0&&(q=V/1e6),r(R+".range[0]",Math.log(V)/Math.LN10),r(R+".range[1]",Math.log(q)/Math.LN10)):(r(R+".range[0]",Math.pow(10,V)),r(R+".range[1]",Math.pow(10,q)))}else r(R+".autorange",!0);w.getComponentMethod("annotations","convertCoords")(t,F,T,r),w.getComponentMethod("images","convertCoords")(t,F,T,r)}else r(R+".autorange",!0)}else if(D.match(I.AX_NAME_PATTERN)){var H=b.nestedProperty(u,k).get(),Y=(T||{}).type;Y&&"-"!==Y||(Y="linear"),w.getComponentMethod("annotations","convertCoords")(t,H,Y,r),w.getComponentMethod("images","convertCoords")(t,H,Y,r)}var G=C.containerArrayMatch(k);if(G){a=G.array,o=G.index;var X=G.property,W=b.nestedProperty(l,a),Z=(W||[])[o]||{};if(""===o)-1===k.indexOf("updatemenus")&&(g.docalc=!0);else if(""===X){var J=T;C.isAddVal(T)?x[k]=null:C.isRemoveVal(T)?(x[k]=Z,J=Z):b.warn("unrecognized full object value",e),(n(J,"x")||n(J,"y")&&-1===k.indexOf("updatemenus"))&&(g.docalc=!0)}else!n(Z,"x")&&!n(Z,"y")||b.containsAny(k,["color","opacity","align","dash","updatemenus"])||(g.docalc=!0);f[a]||(f[a]={});var K=f[a][o];K||(K=f[a][o]={}),K[X]=T,delete e[k]}else if("reverse"===D)j.range?j.range.reverse():(r(R+".autorange",!0),j.range=[1,0]),F.autorange?g.docalc=!0:g.doplot=!0;else{var Q=String(A.parts[1]||"");0===L.indexOf("scene")?"camera"===A.parts[1]?g.docamera=!0:g.doplot=!0:0===L.indexOf("geo")?g.doplot=!0:0===L.indexOf("ternary")?g.doplot=!0:"paper_bgcolor"===k?g.doplot=!0:"margin"===L||"autorange"===Q||"rangemode"===Q||"type"===Q||"domain"===Q||"fixedrange"===Q||"scaleanchor"===Q||"scaleratio"===Q||-1!==k.indexOf("calendar")||k.match(/^(bar|box|font)/)?g.docalc=!0:!u._has("gl2d")||-1===k.indexOf("axis")&&"plot_bgcolor"!==k?"hiddenlabels"===k?g.docalc=!0:-1!==L.indexOf("legend")?g.dolegend=!0:-1!==k.indexOf("title")?g.doticks=!0:-1!==L.indexOf("bgcolor")?g.dolayoutstyle=!0:S>1&&b.containsAny(Q,["tick","exponent","grid","zeroline"])?g.doticks=!0:-1!==k.indexOf(".linewidth")&&-1!==k.indexOf("axis")?g.doticks=g.dolayoutstyle=!0:S>1&&-1!==Q.indexOf("line")?g.dolayoutstyle=!0:S>1&&"mirror"===Q?g.doticks=g.dolayoutstyle=!0:"margin.pad"===k?g.doticks=g.dolayoutstyle=!0:-1!==["hovermode","dragmode"].indexOf(k)?g.domodebar=!0:-1===["hovermode","dragmode","height","width","autosize"].indexOf(k)&&(g.doplot=!0):g.doplot=!0,A.set(T)}}}for(a in f){C.applyContainerArrayChanges(t,b.nestedProperty(l,a),f[a],g)||(g.doplot=!0)}var $=u._axisConstraintGroups;for(var tt in _)for(o=0;o<$.length;o++){var et=$[o];if(et[tt]){g.docalc=!0;for(var rt in et)_[rt]||(O.getFromId(t,rt)._constraintShrinkable=!0)}}var nt=u.width,it=u.height;return t.layout.autosize&&M.plotAutoSize(t,t.layout,u),(e.height||e.width||u.width!==nt||u.height!==it)&&(g.docalc=!0),(g.doplot||g.docalc)&&(g.layoutReplot=!0),{flags:g,undoit:x,redoit:v,eventData:b.extendDeep({},v)}}function m(t){var e=g.select(t),r=t._fullLayout;if(r._container=e.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([0]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n=[];g.selectAll("defs").each(function(){this.id&&n.push(this.id.split("-")[1])}),r._uid=b.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(E.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0);var a=r._paper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._toppaper.append("g").classed("hoverlayer",!0),t.emit("plotly_framework")}var g=t("d3"),v=t("fast-isnumeric"),y=t("../plotly"),b=t("../lib"),x=t("../lib/events"),_=t("../lib/queue"),w=t("../registry"),M=t("../plots/plots"),k=t("../plots/cartesian/graph_interact"),A=t("../plots/polar"),T=t("../components/drawing"),S=t("../components/errorbars"),E=t("../constants/xmlns_namespaces"),L=t("../lib/svg_text_utils"),C=t("./manage_arrays"),z=t("./helpers"),D=t("./subroutines"),I=t("../plots/cartesian/constants"),P=t("../plots/cartesian/constraints"),O=t("../plots/cartesian/axis_ids");y.plot=function(t,e,r,n){function o(){if(v)return y.addFrames(t,v)}function s(){for(var e=E._basePlotModules,r=0;r=s.length?s[0]:s[t]:s}function i(t){return Array.isArray(l)?t>=l.length?l[0]:l[t]:l}function a(t,e){var r=0;return function(){if(t&&++r===e)return t()}}if(t=z.getGraphDiv(t),!b.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var o=t._transitionData;o._frameQueue||(o._frameQueue=[]),r=M.supplyAnimationDefaults(r);var s=r.transition,l=r.frame;return void 0===o._frameWaitingCnt&&(o._frameWaitingCnt=0),new Promise(function(l,u){function c(){t.emit("plotly_animated"),window.cancelAnimationFrame(o._animationRaf),o._animationRaf=null}function h(){o._currentFrame&&o._currentFrame.onComplete&&o._currentFrame.onComplete();var e=o._currentFrame=o._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,o._lastFrameAt=Date.now(),o._timeToNext=e.frameOpts.duration,M.transition(t,e.frame.data,e.frame.layout,z.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else c()}function f(){t.emit("plotly_animating"),o._lastFrameAt=-1/0,o._timeToNext=0,o._runningTransitions=0,o._currentFrame=null;var e=function(){o._animationRaf=window.requestAnimationFrame(e),Date.now()-o._lastFrameAt>o._timeToNext&&h()};e()}function d(t){return Array.isArray(s)?g>=s.length?t.transitionOpts=s[g]:t.transitionOpts=s[0]:t.transitionOpts=s,g++,t}var p,m,g=0,v=[],y=void 0===e||null===e,x=Array.isArray(e);if(y||x||!b.isPlainObject(e)){if(y||-1!==["string","number"].indexOf(typeof e))for(p=0;p0&&kk)&&A.push(m);v=A}}v.length>0?function(e){if(0!==e.length){for(var s=0;s=0;i--)if(b.isPlainObject(e[i])){var f=(u[e[i].name]||{}).name,d=e[i].name;f&&d&&"number"==typeof d&&u[f]&&(n++,b.warn('addFrames: overwriting frame "'+u[f].name+'" with a frame whose name of type "number" also equates to "'+f+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),n>5&&b.warn("addFrames: This API call has yielded too many warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),h.push({frame:M.supplyFrameDefaults(e[i]),index:r&&void 0!==r[i]&&null!==r[i]?r[i]:c+i})}h.sort(function(t,e){return t.index>e.index?-1:t.index=0;i--){if(a=h[i].frame,"number"==typeof a.name&&b.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+t._transitionData._counter++];);if(u[a.name]){for(o=0;o=0;r--)n=e[r],a.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:i[n]});var s=M.modifyFrames,l=M.modifyFrames,u=[t,o],c=[t,a];return _&&_.add(t,s,u,l,c),M.modifyFrames(t,a)},y.purge=function(t){t=z.getGraphDiv(t);var e=t._fullLayout||{},r=t._fullData||[];return M.cleanPlot([],{},r,e),M.purge(t),x.purge(t),e._container&&e._container.remove(),delete t._context,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,delete t._hmpixcount,delete t._hmlumcount,t}},{"../components/drawing":608, -"../components/errorbars":614,"../constants/xmlns_namespaces":674,"../lib":690,"../lib/events":681,"../lib/queue":702,"../lib/svg_text_utils":709,"../plotly":724,"../plots/cartesian/axis_ids":732,"../plots/cartesian/constants":734,"../plots/cartesian/constraints":736,"../plots/cartesian/graph_interact":738,"../plots/plots":792,"../plots/polar":795,"../registry":807,"./helpers":714,"./manage_arrays":715,"./subroutines":721,d3:114,"fast-isnumeric":123}],717:[function(t,e,r){"use strict";function n(t,r){try{t._fullLayout._paper.style("background",r)}catch(t){e.exports.logging>0&&console.error(t)}}e.exports={staticPlot:!1,editable:!1,autosizable:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:"reset+autosize",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:"Edit chart",showSources:!1,displayModeBar:"hover",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,displaylogo:!0,plotGlPixelRatio:2,setBackground:n,topojsonURL:"https://cdn.plot.ly/",mapboxAccessToken:null,logging:!1,globalTransforms:[]}},{}],718:[function(t,e,r){"use strict";function n(t){var e,r;"area"===t?(e={attributes:b},r={}):(e=d.modules[t]._module,r=e.basePlotModule);var n={};n.type=null,w(n,m),w(n,e.attributes),r.attributes&&w(n,r.attributes),Object.keys(d.componentsRegistry).forEach(function(e){var r=d.componentsRegistry[e];r.schema&&r.schema.traces&&r.schema.traces[t]&&Object.keys(r.schema.traces[t]).forEach(function(e){f(n,r.schema.traces[t][e],e)})}),n.type=t;var i={meta:e.meta||{},attributes:s(n)};if(e.layoutAttributes){var a={};w(a,e.layoutAttributes),i.layoutAttributes=s(a)}return i}function i(){var t={};return w(t,g),Object.keys(d.subplotsRegistry).forEach(function(e){var r=d.subplotsRegistry[e];if(r.layoutAttributes)if("cartesian"===r.name)h(t,r,"xaxis"),h(t,r,"yaxis");else{var n="subplot"===r.attr?r.name:r.attr;h(t,r,n)}}),t=c(t),Object.keys(d.componentsRegistry).forEach(function(e){var r=d.componentsRegistry[e];r.layoutAttributes&&(r.schema&&r.schema.layout?Object.keys(r.schema.layout).forEach(function(e){f(t,r.schema.layout[e],e)}):f(t,r.layoutAttributes,r.name))}),{layoutAttributes:s(t)}}function a(t){var e=d.transformsRegistry[t],r=w({},e.attributes);return Object.keys(d.componentsRegistry).forEach(function(e){var n=d.componentsRegistry[e];n.schema&&n.schema.transforms&&n.schema.transforms[t]&&Object.keys(n.schema.transforms[t]).forEach(function(e){f(r,n.schema.transforms[t][e],e)})}),{attributes:s(r)}}function o(){var t={frames:p.extendDeep({},v)};return s(t),t.frames}function s(t){return l(t),u(t),t}function l(t){function e(t){return{valType:"string"}}function n(t,n,i){r.isValObject(t)?"data_array"===t.valType?(t.role="data",i[n+"src"]=e(n)):!0===t.arrayOk&&(i[n+"src"]=e(n)):p.isPlainObject(t)&&(t.role="object")}r.crawl(t,n)}function u(t){function e(t,e,r){if(t){var n=t[k];n&&(delete t[k],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}r.crawl(t,e)}function c(t){return _(t,{radialaxis:x.radialaxis,angularaxis:x.angularaxis}),_(t,x.layout),t}function h(t,e,r){var n=p.nestedProperty(t,r),i=w({},e.layoutAttributes);i[M]=!0,n.set(i)}function f(t,e,r){var n=p.nestedProperty(t,r);n.set(w(n.get()||{},e))}var d=t("../registry"),p=t("../lib"),m=t("../plots/attributes"),g=t("../plots/layout_attributes"),v=t("../plots/frame_attributes"),y=t("../plots/animation_attributes"),b=t("../plots/polar/area_attributes"),x=t("../plots/polar/axis_attributes"),_=p.extendFlat,w=p.extendDeep,M="_isSubplotObj",k="_isLinkedToArray",A=[M,k,"_arrayAttrRegexps","_deprecated"];r.IS_SUBPLOT_OBJ=M,r.IS_LINKED_TO_ARRAY=k,r.DEPRECATED="_deprecated",r.UNDERSCORE_ATTRS=A,r.get=function(){var t={};d.allTypes.concat("area").forEach(function(e){t[e]=n(e)});var e={};return Object.keys(d.transformsRegistry).forEach(function(t){e[t]=a(t)}),{defs:{valObjects:p.valObjects,metaKeys:A.concat(["description","role"])},traces:t,layout:i(),transforms:e,frames:o(),animation:s(y)}},r.crawl=function(t,e,n){var i=n||0;Object.keys(t).forEach(function(n){var a=t[n];-1===A.indexOf(n)&&(e(a,n,t,i),r.isValObject(a)||p.isPlainObject(a)&&r.crawl(a,e,i+1))})},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){function e(e,r,o,s){if(a=a.slice(0,s).concat([r]),e&&("data_array"===e.valType||!0===e.arrayOk)){var l=n(a),u=p.nestedProperty(t,l).get();Array.isArray(u)&&i.push(l)}}function n(t){return t.join(".")}var i=[],a=[];if(r.crawl(t._module.attributes,e),t.transforms)for(var o=t.transforms,s=0;s=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}var i=t("d3"),a=t("../plotly"),o=t("../registry"),s=t("../plots/plots"),l=t("../lib"),u=t("../components/color"),c=t("../components/drawing"),h=t("../components/titles"),f=t("../components/modebar");r.layoutStyles=function(t){return l.syncOrAsync([s.doAutoMargin,r.lsInner],t)},r.lsInner=function(t){var e,o=t._fullLayout,s=o._size,l=a.Axes.list(t);for(e=0;e1)};f(e.width)&&f(e.height)||n(new Error("Height and width should be pixel values."));var d=l(t,{format:"png",height:e.height,width:e.width}),p=d.gd;p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var m=s.getRedrawFunc(p);a.plot(p,d.data,d.layout,d.config).then(m).then(h).then(function(t){r(t)}).catch(function(t){n(t)})})}var i=t("fast-isnumeric"),a=t("../plotly"),o=t("../lib"),s=t("../snapshot/helpers"),l=t("../snapshot/cloneplot"),u=t("../snapshot/tosvg"),c=t("../snapshot/svgtoimg");e.exports=n},{"../lib":690,"../plotly":724,"../snapshot/cloneplot":808,"../snapshot/helpers":811,"../snapshot/svgtoimg":813,"../snapshot/tosvg":815,"fast-isnumeric":123}],723:[function(t,e,r){"use strict";function n(t,e,r,i,a,u){u=u||[];for(var c=Object.keys(t),f=0;f1&&l.push(o("object","layout"))),f.supplyDefaults(u);for(var c=u._fullData,g=r.length,v=0;v.3*h||a(n)||a(i))){var f=r.dtick/2;t+=t+f.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=O.tickIncrement(t,"M6","reverse")+1.5*C:a.exactMonths>.8?t=O.tickIncrement(t,"M1","reverse")+15.5*C:t-=C/2;var s=O.tickIncrement(t,r);if(s<=n)return s}return t}function a(t){var e,r,n=t.tickvals,i=t.ticktext,a=new Array(n.length),o=_.simpleMap(t.range,t.r2l),s=1.0001*o[0]-1e-4*o[1],u=1.0001*o[1]-1e-4*o[0],c=Math.min(s,u),h=Math.max(s,u),f=0;Array.isArray(i)||(i=[]);var d="category"===t.type?t.d2l_noadd:t.d2l;for("log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1)),r=0;rc&&e10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=C&&i<=10||e>=15*C)t._tickround="d";else if(e>=D&&i<=16||e>=z)t._tickround="M";else if(e>=I&&i<=19||e>=D)t._tickround="S";else{var a=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,a)-20}}else if(b(e)||"L"===e.charAt(0)){var o=t.range.map(t.r2d||Number);b(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01);Math.abs(l)>3&&("SI"===t.exponentformat||"B"===t.exponentformat?t._tickexponent=3*Math.round((l-1)/3):t._tickexponent=l)}else t._tickround=null}function l(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}function u(t,e,r,n){var i=t._tickround,a=r&&t.hoverformat||t.tickformat;n&&(i=b(i)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o,s=_.formatDate(e.x,a,i,t.calendar),l=s.indexOf("\n");-1!==l&&(o=s.substr(l+1),s=s.substr(0,l)),n&&("00:00:00"===s||"00:00"===s?(s=o,o=""):8===s.length&&(s=s.replace(/:00$/,""))),o&&(r?"d"===i?s+=", "+o:s=o+(s?", "+s:""):t._inCalcTicks&&o===t._prevDateHead||(s+="
"+o,t._prevDateHead=o)),e.text=s}function c(t,e,r,n,i){var a=t.dtick,o=e.x;if(!n||"string"==typeof a&&"L"===a.charAt(0)||(a="L3"),t.tickformat||"string"==typeof a&&"L"===a.charAt(0))e.text=d(Math.pow(10,o),t,i,n);else if(b(a)||"D"===a.charAt(0)&&_.mod(o+.01,1)<.1)if(-1!==["e","E","power"].indexOf(t.exponentformat)){var s=Math.round(o);e.text=0===s?1:1===s?"10":s>1?"10"+s+"":"10\u2212"+-s+"",e.fontSize*=1.25}else e.text=d(Math.pow(10,o),t,"","fakehover"),"D1"===a&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6);else{if("D"!==a.charAt(0))throw"unrecognized dtick "+String(a);e.text=String(Math.round(Math.pow(10,_.mod(o,1)))),e.fontSize*=.75}if("D1"===t.dtick){var l=String(e.text).charAt(0);"0"!==l&&"1"!==l||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(o<0?.5:.25)))}}function h(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}function f(t,e,r,n,i){"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=d(e.x,t,i,n)}function d(t,e,r,n){var i=t<0,a=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,u=e.tickformat,c=e.separatethousands;if(n){var h={exponentformat:e.exponentformat,dtick:"none"===e.showexponent?e.dtick:b(t)?Math.abs(t)||1:1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};s(h),a=(Number(h._tickround)||0)+4,l=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return y.format(u)(t).replace(/-/g,"\u2212");var f=Math.pow(10,-a)/2;if("none"===o&&(l=0),(t=Math.abs(t))12||l<-15)?t+="e"+m:"E"===o?t+="E"+m:"power"===o?t+="\xd710"+m+"":"B"===o&&9===l?t+="B":"SI"!==o&&"B"!==o||(t+=q[l/3+5])}return i?"\u2212"+t:t}function p(t,e){var r,n,i=[];for(r=0;r1)for(n=1;n2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},O.getAutoRange=function(t){var e,r=[],n=t._min[0].val,i=t._max[0].val;for(e=1;e0&&c>0&&h/c>f&&(l=o,u=s,f=h/c);if(n===i){var m=n-1,g=n+1;r="tozero"===t.rangemode?n<0?[m,0]:[0,g]:"nonnegative"===t.rangemode?[Math.max(0,m),Math.max(0,g)]:[m,g]}else f&&("linear"!==t.type&&"-"!==t.type||("tozero"===t.rangemode?(l.val>=0&&(l={val:0,pad:0}),u.val<=0&&(u={val:0,pad:0})):"nonnegative"===t.rangemode&&(l.val-f*l.pad<0&&(l={val:0,pad:0}),u.val<0&&(u={val:1,pad:0})),f=(u.val-l.val)/(t._length-l.pad-u.pad)),r=[l.val-f*l.pad,u.val+f*u.pad]);return r[0]===r[1]&&("tozero"===t.rangemode?r=r[0]<0?[r[0],0]:r[0]>0?[0,r[0]]:[0,1]:(r=[r[0]-1,r[0]+1],"nonnegative"===t.rangemode&&(r[0]=Math.max(0,r[0])))),d&&r.reverse(),_.simpleMap(r,t.l2r||Number)},O.doAutoRange=function(t){t._length||t.setScale();var e=t._min&&t._max&&t._min.length&&t._max.length;if(t.autorange&&e){t.range=O.getAutoRange(t);var r=t._input;r.range=t.range.slice(),r.autorange=t.autorange}},O.saveRangeInitial=function(t,e){for(var r=O.list(t,"",!0),n=!1,i=0;i=f?d=!1:s.val>=u&&s.pad<=f&&(t._min.splice(o,1),o--);d&&t._min.push({val:u,pad:y&&0===u?0:f})}if(n(c)){for(d=!0,o=0;o=c&&s.pad>=h?d=!1:s.val<=c&&s.pad<=h&&(t._max.splice(o,1),o--);d&&t._max.push({val:c,pad:y&&0===c?0:h})}}}if((t.autorange||!!_.nestedProperty(t,"rangeslider.autorange").get())&&e){t._min||(t._min=[]),t._max||(t._max=[]),r||(r={}),t._m||t.setScale();var a,o,s,l,u,c,h,f,d,p,m,g=e.length,v=r.padded?.05*t._length:0,y=r.tozero&&("linear"===t.type||"-"===t.type),x=n((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),w=n((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),M=n(r.vpadplus||r.vpad),k=n(r.vpadminus||r.vpad);for(a=0;a<6;a++)i(a);for(a=g-1;a>5;a--)i(a)}},O.autoBin=function(t,e,r,a,o){var s=_.aggNums(Math.min,null,t),l=_.aggNums(Math.max,null,t);if(o||(o=e.calendar),"category"===e.type)return{start:s-.5,end:l+.5,size:1};var u;if(r)u=(l-s)/r;else{var c=_.distinctVals(t),h=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),f=h*_.roundUp(c.minDiff/h,[.9,1.9,4.9,9.9],!0);u=Math.max(f,2*_.stdev(t)/Math.pow(t.length,a?.25:.4)),b(u)||(u=1)}var d;d="log"===e.type?{type:"linear",range:[s,l]}:{type:e.type,range:_.simpleMap([s,l],e.c2r,0,o),calendar:o},O.setConvert(d),O.autoTicks(d,u);var p,m=O.tickIncrement(O.tickFirst(d),d.dtick,"reverse",o);if("number"==typeof d.dtick){m=n(m,t,d,s,l);p=m+(1+Math.floor((l-m)/d.dtick))*d.dtick}else for("M"===d.dtick.charAt(0)&&(m=i(m,t,d.dtick,s,o)),p=m;p<=l;)p=O.tickIncrement(p,d.dtick,!1,o);return{start:e.c2r(m,0,o),end:e.c2r(p,0,o),size:d.dtick}},O.calcTicks=function(t){var e=_.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=_.constrain(t._length/r,4,9)+1)),"array"===t.tickmode&&(n*=100),O.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}if(t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),s(t),"array"===t.tickmode)return a(t);t._tmin=O.tickFirst(t);var i=e[1]=l:u<=l)&&(o.push(u),!(o.length>1e3));u=O.tickIncrement(u,t.dtick,i,t.calendar));t._tmax=o[o.length-1],t._prevDateHead="",t._inCalcTicks=!0;for(var c=new Array(o.length),h=0;hE?(e/=E,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="M"+12*o(e,r,j)):n>L?(e/=L,t.dtick="M"+o(e,1,F)):n>C?(t.dtick=o(e,C,B),t.tick0=_.dateTick0(t.calendar,!0)):n>z?t.dtick=o(e,z,F):n>D?t.dtick=o(e,D,N):n>I?t.dtick=o(e,I,N):(r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=o(e,r,j))}else if("log"===t.type){t.tick0=0;var i=_.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(i[1]-i[0])<1){var a=1.5*Math.abs((i[1]-i[0])/e);e=Math.abs(Math.pow(10,i[1])-Math.pow(10,i[0]))/a,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="L"+o(e,r,j)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):(t.tick0=0,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=o(e,r,j));if(0===t.dtick&&(t.dtick=1),!b(t.dtick)&&"string"!=typeof t.dtick){var s=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(s)}},O.tickIncrement=function(t,e,r,n){var i=r?-1:1;if(b(e))return t+i*e;var a=e.charAt(0),o=i*Number(e.substr(1));if("M"===a)return _.incrementMonth(t,o,n);if("L"===a)return Math.log(Math.pow(10,t)+o)/Math.LN10;if("D"===a){var s="D2"===e?V:U,l=t+.01*i,u=_.roundUp(_.mod(l,1),s,r);return Math.floor(l)+Math.log(y.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(e)},O.tickFirst=function(t){var e=t.r2l||Number,r=_.simpleMap(t.range,e),n=r[1]1&&e2*i}function a(t){for(var e,r=Math.max(1,(t.length-1)/1e3),n=0,i=0,a=0;a2*n}var o=t("fast-isnumeric"),s=t("../../lib"),l=t("../../constants/numerical").BADNUM;e.exports=function(t,e){return i(t,e)?"date":a(t)?"category":n(t)?"linear":"-"}},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],731:[function(t,e,r){"use strict";var n=t("tinycolor2").mix,i=t("../../registry"),a=t("../../lib"),o=t("../../components/color/attributes").lightFraction,s=t("./layout_attributes"),l=t("./tick_value_defaults"),u=t("./tick_mark_defaults"),c=t("./tick_label_defaults"),h=t("./category_order_defaults"),f=t("./set_convert"),d=t("./ordered_categories");e.exports=function(t,e,r,p,m){function g(r,n){return a.coerce2(t,e,s,r,n)}var v=p.letter,y=p.font||{},b="Click to enter "+(p.title||v.toUpperCase()+" axis")+" title",x=e.type;if("date"===x){i.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",p.calendar)}f(e,m);var _=r("color"),w=_===t.color?_:y.color;r("title",b),a.coerceFont(r,"titlefont",{family:y.family,size:Math.round(1.2*y.size),color:w}),r("autorange",!e.isValidRange(t.range))&&r("rangemode"),r("range"),e.cleanRange(),l(t,e,r,x),c(t,e,r,x,p),u(t,e,r,p),h(t,e,r);var M=g("linecolor",_),k=g("linewidth"),A=r("showline",!!M||!!k);A||(delete e.linecolor,delete e.linewidth),(A||e.ticks)&&r("mirror");var T=g("gridcolor",n(_,p.bgColor,o).toRgbString()),S=g("gridwidth");r("showgrid",p.showGrid||!!T||!!S)||(delete e.gridcolor,delete e.gridwidth);var E=g("zerolinecolor",_),L=g("zerolinewidth");return r("zeroline",p.showGrid||!!E||!!L)||(delete e.zerolinecolor,delete e.zerolinewidth),e._initialCategories="category"===x?d(v,e.categoryorder,e.categoryarray,p.data):[],e}},{"../../components/color/attributes":584,"../../lib":690,"../../registry":807,"./category_order_defaults":733,"./layout_attributes":740,"./ordered_categories":742,"./set_convert":746,"./tick_label_defaults":747,"./tick_mark_defaults":748,"./tick_value_defaults":749,tinycolor2:521}],732:[function(t,e,r){"use strict";function n(t,e,r){function n(t,r){for(var n=Object.keys(t),i=/^[xyz]axis[0-9]*/,a=[],o=0;o0;a&&(n="array");var o=r("categoryorder",n);"array"===o&&r("categoryarray"),a||"array"!==o||(e.categoryorder="trace")}}},{}],734:[function(t,e,r){"use strict";e.exports={idRegex:{x:/^x([2-9]|[1-9][0-9]+)?$/,y:/^y([2-9]|[1-9][0-9]+)?$/},attrRegex:{x:/^xaxis([2-9]|[1-9][0-9]+)?$/,y:/^yaxis([2-9]|[1-9][0-9]+)?$/},xAxisMatch:/^xaxis[0-9]*$/,yAxisMatch:/^yaxis[0-9]*$/,AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,MAXDIST:20,YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,BENDPX:1.5,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4]}},{}],735:[function(t,e,r){"use strict";function n(t,e,r,n){var i,a,s,l,u=n[o(e)].type,c=[];for(a=0;aa*p))for(r=0;r=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function u(t,e){return t?"nsew"===t?"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function c(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",i+"Z")}function h(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:T.background,stroke:T.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+r+")").attr("d","M0,0Z")}function f(t){t.selectAll(".select-outline").remove()}function d(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),i||(t.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function p(t){x.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function m(t){return-1!==["lasso","select"].indexOf(t)}function g(t,e){return"M"+(t.l-.5)+","+(e-R-.5)+"h-3v"+(2*R+1)+"h3ZM"+(t.r+.5)+","+(e-R-.5)+"h3v"+(2*R+1)+"h-3Z"}function v(t,e){return"M"+(e-R-.5)+","+(t.t-.5)+"v-3h"+(2*R+1)+"v3ZM"+(e-R-.5)+","+(t.b+.5)+"v3h"+(2*R+1)+"v-3Z"}function y(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,R)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function b(t,e,r){var n,i,a,o,s,l,u=!1,c={},h={};for(n=0;nR||s>R?(wt="xy",o/nt>s/it?(s=o*it/nt,vt>a?yt.t=vt-s:yt.b=vt+s):(o=s*nt/it,gt>i?yt.l=gt-o:yt.r=gt+o),kt.attr("d",y(yt))):n():!ot||szoom back out","long"),j=!1)}function Y(e,r){var n=1===(N+B).length;if(e)J();else if(2!==r||n){if(1===r&&n){var i=N?tt[0]:$[0],o="s"===N||"w"===B?0:1,s=i._name+".range["+o+"]",l=a(i,o),u="left",c="middle";if(i.fixedrange)return;N?(c="n"===N?"top":"bottom","right"===i.side&&(u="right")):"e"===B&&(u="right"),t._context.showAxisRangeEntryBoxes&&x.select(pt).call(A.makeEditable,null,{immediate:!0,background:ht.paper_bgcolor,text:String(l),fill:i.tickfont?i.tickfont.color:"#444",horizontalAlign:u,verticalAlign:c}).on("edit",function(e){var r=i.d2r(e);void 0!==r&&w.relayout(t,s,r)})}}else Z()}function G(e){function r(t,e,r){function n(e){return t.l2r(a+(e-a)*r)}if(!t.fixedrange){var i=k.simpleMap(t.range,t.r2l),a=i[0]+(i[1]-i[0])*e;t.range=i.map(n)}}if(t._context.scrollZoom||ht._enablescrollzoom){if(t._transitioningWithDuration)return k.pauseEvent(e);var n=t.querySelector(".plotly");if(U(),!(n.scrollHeight-n.clientHeight>10||n.scrollWidth-n.clientWidth>10)){clearTimeout(Tt);var i=-e.deltaY;if(isFinite(i)||(i=e.wheelDelta/10),!isFinite(i))return void k.log("Did not find wheel motion attributes: ",e);var a,o=Math.exp(-Math.min(Math.max(i,-20),20)/100),s=Et.draglayer.select(".nsewdrag").node().getBoundingClientRect(),l=(e.clientX-s.left)/s.width,u=(s.bottom-e.clientY)/s.height;if(B||lt){for(B||(l=.5),a=0;a<$.length;a++)r($[a],l,o);At[2]*=o,At[0]+=At[2]*l*(1/o-1)}if(N||lt){for(N||(u=.5),a=0;a0;n--)r.push(e);return r}function i(t,e){for(var r=[],n=0;nQ.width||J<0||J>Q.height)return x.unhoverRaw(t,e)}if(P="xval"in e?n(a,e.xval):i(S,Z),O="yval"in e?n(a,e.yval):i(E,J),!p(P[0])||!p(O[0]))return m.warn("Fx.hover failed",e,t),x.unhoverRaw(t,e)}var $=1/0;for(j=0;j1||-1!==N.hoverinfo.indexOf("name")?N.name:void 0,index:!1,distance:Math.min($,k.MAXDIST),color:y.defaultLine,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},o[B]&&(Y.subplot=o[B]._subplot),G=X.length,"array"===V){var tt=e[j] -;"pointNumber"in tt?(Y.index=tt.pointNumber,V="closest"):(V="","xval"in tt&&(q=tt.xval,V="x"),"yval"in tt&&(H=tt.yval,V=V?"closest":"y"))}else q=P[U],H=O[U];if(N._module&&N._module.hoverPoints){var et=N._module.hoverPoints(Y,q,H,V);if(et)for(var rt,nt=0;ntG&&(X.splice(0,G),$=X[0].distance)}if(0===X.length)return x.unhoverRaw(t,e);var it="y"===I&&W.length>1;X.sort(function(t,e){return t.distance-e.distance});var at=y.combine(o.plot_bgcolor||y.background,o.paper_bgcolor),ot={hovermode:I,rotateLabels:it,bgColor:at,container:o._hoverlayer,outerContainer:o._paperdiv},st=u(X,ot);c(X,it?"xa":"ya"),h(st,it);var lt=t._hoverdata,ut=[];for(R=0;R15&&(r=r.substr(0,12)+"...")),void 0!==t.extraText&&(n+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(n+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(n+="y: "+t.yLabel+"
"),n+=(n?"z: ":"")+t.zLabel):T&&t[i+"Label"]===g?n=t[("x"===i?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&(n=t.yLabel):n=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",t.text&&!Array.isArray(t.text)&&(n+=(n?"
":"")+t.text),""===n&&(""===r&&e.remove(),n=r);var f=e.select("text.nums").call(b.font,t.fontFamily||u,t.fontSize||c,t.fontColor||h).call(b.setPosition,0,0).text(n).attr("data-notex",1).call(v.convertToTspans);f.selectAll("tspan.line").call(b.setPosition,0,0);var p=e.select("text.name"),m=0;r&&r!==n?(p.call(b.font,t.fontFamily||u,t.fontSize||c,l).text(r).call(b.setPosition,0,0).attr("data-notex",1).call(v.convertToTspans),p.selectAll("tspan.line").call(b.setPosition,0,0),m=p.node().getBoundingClientRect().width+2*P):(p.remove(),e.select("rect").remove()),e.select("path").style({fill:l,stroke:h});var x,_,k=f.node().getBoundingClientRect(),S=t.xa._offset+(t.x0+t.x1)/2,L=t.ya._offset+(t.y0+t.y1)/2,C=Math.abs(t.x1-t.x0),z=Math.abs(t.y1-t.y0),D=k.width+I+P+m;t.ty0=w-k.top,t.bx=k.width+2*P,t.by=k.height+2*P,t.anchor="start",t.txwidth=k.width,t.tx2width=m,t.offset=0,a?(t.pos=S,x=L+z/2+D<=A,_=L-z/2-D>=0,"top"!==t.idealAlign&&x||!_?x?(L+=z/2,t.anchor="start"):t.anchor="middle":(L-=z/2,t.anchor="end")):(t.pos=L,x=S+C/2+D<=M,_=S-C/2-D>=0,"left"!==t.idealAlign&&x||!_?x?(S+=C/2,t.anchor="start"):t.anchor="middle":(S-=C/2,t.anchor="end")),f.attr("text-anchor",t.anchor),m&&p.attr("text-anchor",t.anchor),e.attr("transform","translate("+S+","+L+")"+(a?"rotate("+E+")":""))}),C}function c(t,e){function r(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var u=0;for(o=0;oe.pmax&&u++;for(o=t.length-1;o>=0&&!(u<=0);o--)l=t[o],l.pos>e.pmax-1&&(l.del=!0,u--);for(o=0;o=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(u<=0);o--)l=t[o],l.pos+l.dp+l.size>e.pmax&&(l.del=!0,u--)}}}for(var n,i,a,o,s,l,u,c=0,h=t.map(function(t,r){var n=t[e];return[{i:r,dp:0,pos:t.pos,posref:t.posref,size:t.by*("x"===n._id.charAt(0)?C:1)/2,pmin:n._offset,pmax:n._offset+n._length}]}).sort(function(t,e){return t[0].posref-e[0].posref});!n&&c<=t.length;){for(c++,n=!0,o=0;o.01&&p.pmin===m.pmin&&p.pmax===m.pmax){for(s=d.length-1;s>=0;s--)d[s].dp+=i;for(f.push.apply(f,d),h.splice(o+1,1),u=0,s=f.length-1;s>=0;s--)u+=f[s].dp;for(a=u/f.length,s=f.length-1;s>=0;s--)f[s].dp-=a;n=!1}else o++}h.forEach(r)}for(o=h.length-1;o>=0;o--){var g=h[o];for(s=g.length-1;s>=0;s--){var v=g[s],y=t[v.i];y.offset=v.dp,y.del=v.del}}}function h(t,e){t.each(function(t){var r=d.select(this);if(t.del)return void r.remove();var n="end"===t.anchor?-1:1,i=r.select("text.nums"),a={start:1,end:-1,middle:0}[t.anchor],o=a*(I+P),s=o+a*(t.txwidth+P),l=0,u=t.offset;"middle"===t.anchor&&(o-=t.tx2width/2,s-=t.tx2width/2),e&&(u*=-D,l=t.offset*z),r.select("path").attr("d","middle"===t.anchor?"M-"+t.bx/2+",-"+t.by/2+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(n*I+l)+","+(I+u)+"v"+(t.by/2-I)+"h"+n*t.bx+"v-"+t.by+"H"+(n*I+l)+"V"+(u-I)+"Z"),i.call(b.setPosition,o+l,u+t.ty0-t.by/2+P).selectAll("tspan.line").attr({x:i.attr("x"),y:i.attr("y")}),t.tx2width&&(r.select("text.name, text.name tspan.line").call(b.setPosition,s+a*P+l,u+t.ty0-t.by/2+P),r.select("rect").call(b.setRect,s+(a-1)*t.tx2width/2+l,u-t.by/2-1,t.tx2width,t.by+2))})}function f(t,e,r){if(!e.target)return!1;if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber))return!0}return!1}var d=t("d3"),p=t("fast-isnumeric"),m=t("../../lib"),g=t("../../lib/events"),v=t("../../lib/svg_text_utils"),y=t("../../components/color"),b=t("../../components/drawing"),x=t("../../components/dragelement"),_=t("../../lib/override_cursor"),w=t("../../registry"),M=t("./axes"),k=t("./constants"),A=t("./dragbox"),T=t("../layout_attributes"),S=e.exports={};S.unhover=x.unhover,S.supplyLayoutDefaults=function(t,e,r){function n(r,n){return m.coerce(t,e,T,r,n)}n("dragmode");var i;if(e._has("cartesian")){i=(e._isHoriz=S.isHoriz(r))?"y":"x"}else i="closest";n("hovermode",i)},S.isHoriz=function(t){for(var e=!0,r=0;rt._lastHoverTime+k.HOVERMINTIME)return o(t,e,r),void(t._lastHoverTime=Date.now());t._hoverTimer=setTimeout(function(){o(t,e,r),t._lastHoverTime=Date.now(),t._hoverTimer=void 0},k.HOVERMINTIME)},S.getDistanceFunction=function(t,e,r,n){return"closest"===t?n||a(e,r):"x"===t?e:r},S.getClosest=function(t,e,r){if(!1!==r.index)r.index>=0&&r.indexc[1]-.01&&(e.domain=[0,1]),i.noneOrAll(t.domain,e.domain,[0,1])}return e}},{"../../lib":690,"fast-isnumeric":123}],744:[function(t,e,r){"use strict";e.exports=function(t,e,r){void 0===r&&(r=.5);var n=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=n[0]+(n[1]-n[0])*r,a=(i-n[0])*e;t.range=t._input.range=[t.l2r(i-a),t.l2r(i+a)]}},{}],745:[function(t,e,r){"use strict";function n(t){return t._id}var i=t("../../lib/polygon"),a=t("../../components/color"),o=t("./axes"),s=t("./constants"),l=i.filter,u=i.tester,c=s.MINSELECT;e.exports=function(t,e,r,i,h){function f(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return t.p2d(r[e])}}function d(t,e){return t-e}var p,m=i.gd._fullLayout._zoomlayer,g=i.element.getBoundingClientRect(),v=i.plotinfo.xaxis._offset,y=i.plotinfo.yaxis._offset,b=e-g.left,x=r-g.top,_=b,w=x,M="M"+b+","+x,k=i.xaxes[0]._length,A=i.yaxes[0]._length,T=i.xaxes.map(n),S=i.yaxes.map(n),E=i.xaxes.concat(i.yaxes);"lasso"===h&&(p=l([[b,x]],s.BENDPX));var L=m.selectAll("path.select-outline").data([1,2]);L.enter().append("path").attr("class",function(t){return"select-outline select-outline-"+t}).attr("transform","translate("+v+", "+y+")").attr("d",M+"Z");var C,z,D,I,P,O=m.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1}).attr("transform","translate("+v+", "+y+")").attr("d","M0,0Z"),R=[],j=i.gd,F=[];for(C=0;Cf?d:o(t)?Number(t):d):d}var a=t("d3"),o=t("fast-isnumeric"),s=t("../../lib"),l=s.cleanNumber,u=s.ms2DateTime,c=s.dateTime2ms,h=t("../../constants/numerical"),f=h.FP_SAFE,d=h.BADNUM,p=t("./constants"),m=t("./axis_ids");e.exports=function(t,e){function r(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-3*w*Math.abs(n-i))}return d}function h(e,r,n){var i=c(e,n||t.calendar);if(i===d){if(!o(e))return d;i=c(new Date(+e))}return i}function g(e,r,n){return u(e,r,n||t.calendar)}function v(e){return t._categories[Math.round(e)]}function y(e){if(null!==e&&void 0!==e){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return d}function b(e){if(t._categoriesMap){var r=t._categoriesMap[e];if(void 0!==r)return r}if("number"==typeof e)return e}function x(e){return o(e)?a.round(t._b+t._m*e,2):d}function _(e){return(e-t._b)/t._m}e=e||{};var w=10;t.c2l="log"===t.type?r:i,t.l2c="log"===t.type?n:i,t.l2p=x,t.p2l=_,t.c2p="log"===t.type?function(t,e){return x(r(t,e))}:x,t.p2c="log"===t.type?function(t){return n(_(t))}:_,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=i,t.d2p=t.r2p=function(t){return x(l(t))},t.p2d=t.p2r=_):"log"===t.type?(t.d2r=t.d2l=function(t,e){return r(l(t),e)},t.r2d=t.r2c=function(t){return n(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=i,t.c2r=r,t.l2d=n,t.d2p=function(e,r){return x(t.d2r(e,r))},t.p2d=function(t){return n(_(t))},t.r2p=function(t){return x(l(t))},t.p2r=_):"date"===t.type?(t.d2r=t.r2d=s.identity,t.d2c=t.r2c=t.d2l=t.r2l=h,t.c2d=t.c2r=t.l2d=t.l2r=g,t.d2p=t.r2p=function(t,e,r){return x(h(t,0,r))},t.p2d=t.p2r=function(t,e,r){return g(_(t),e,r)}):"category"===t.type&&(t.d2r=t.d2c=t.d2l=y,t.r2d=t.c2d=t.l2d=v,t.d2l_noadd=b,t.r2l=t.l2r=t.r2c=t.c2r=i,t.d2p=function(t){return x(b(t))},t.p2d=function(t){return v(_(t))},t.r2p=x,t.p2r=_),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e){e||(e="range");var r,n,i=s.nestedProperty(t,e).get(),a=(t._id||"x").charAt(0);if(n="date"===t.type?s.dfltRange(t.calendar):"y"===a?p.DFLTRANGEY:p.DFLTRANGEX,n=n.slice(),!i||2!==i.length)return void s.nestedProperty(t,e).set(n);for("date"===t.type&&(i[0]=s.cleanDate(i[0],d,t.calendar),i[1]=s.cleanDate(i[1],d,t.calendar)),r=0;r<2;r++)if("date"===t.type){if(!s.isDateTime(i[r],t.calendar)){t[e]=n;break}if(t.r2l(i[0])===t.r2l(i[1])){var l=s.constrain(t.r2l(i[0]),s.MIN_MS+1e3,s.MAX_MS-1e3);i[0]=t.l2r(l-1e3),i[1]=t.l2r(l+1e3);break}}else{if(!o(i[r])){if(!o(i[1-r])){t[e]=n;break}i[r]=i[1-r]*(r?10:.1)}if(i[r]<-f?i[r]=-f:i[r]>f&&(i[r]=f),i[0]===i[1]){var u=Math.max(1,Math.abs(1e-6*i[0]));i[0]-=u,i[1]+=u}}},t.setScale=function(r){var n=e._size,i=t._id.charAt(0);if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var a=m.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var o=r&&t._r?"_r":"range",l=t.calendar;t.cleanRange(o);var u=t.r2l(t[o][0],l),c=t.r2l(t[o][1],l);if("y"===i?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),!isFinite(t._m)||!isFinite(t._b))throw s.notifier("Something went wrong with axis scaling","long"),e._replotting=!1,new Error("axis scaling")},t.makeCalcdata=function(e,r){var n,i,a,o="date"===t.type&&e[r+"calendar"];if(r in e)for(n=e[r],i=new Array(n.length),a=0;a0?Number(c):u;else if("string"!=typeof c)e.dtick=u;else{var h=c.charAt(0),f=c.substr(1);f=n(f)?Number(f):0,(f<=0||!("date"===o&&"M"===h&&f===Math.round(f)||"log"===o&&"L"===h||"log"===o&&"D"===h&&(1===f||2===f)))&&(e.dtick=u)}var d="date"===o?i.dateTick0(e.calendar):0,p=r("tick0",d);"date"===o?e.tick0=i.cleanDate(p,d):n(p)&&"D1"!==c&&"D2"!==c?e.tick0=Number(p):e.tick0=d}else{var m=r("tickvals");void 0===m?e.tickmode="auto":r("ticktext")}}},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],750:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plotly"),a=t("../../registry"),o=t("../../components/drawing"),s=t("./axes"),l=/((x|y)([2-9]|[1-9][0-9]+)?)axis$/;e.exports=function(t,e,r,u){function c(e,r){function n(e,r){for(i=0;ir.duration?(d(),k=window.cancelAnimationFrame(m)):k=window.requestAnimationFrame(m)}var g=t._fullLayout,v=[],y=function(t){var e,r,n,i,a,o={};for(e in t)if(r=e.split("."),n=r[0].match(l)){var s=n[1],u=s+"axis";if(i=g[u],a={},Array.isArray(t[e])?a.to=t[e].slice(0):Array.isArray(t[e].range)&&(a.to=t[e].range.slice(0)),!a.to)continue;a.axisName=u,a.length=i._length,v.push(s),o[s]=a}return o}(e),b=Object.keys(y),x=function(t,e,r){var n,i,a,o=t._plots,s=[];for(n in o){var l=o[n];if(-1===s.indexOf(l)){var u=l.xaxis._id,c=l.yaxis._id,h=l.xaxis.range,f=l.yaxis.range;l.xaxis._r=l.xaxis.range.slice(),l.yaxis._r=l.yaxis.range.slice(),i=r[u]?r[u].to:h,a=r[c]?r[c].to:f,h[0]===i[0]&&h[1]===i[1]&&f[0]===a[0]&&f[1]===a[1]||-1===e.indexOf(u)&&-1===e.indexOf(c)||s.push(l)}}return s}(g,b,y);if(!x.length)return!1;var _;u&&(_=u());var w,M,k,A=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(k),k=null,p()}),w=Date.now(),k=window.requestAnimationFrame(m),Promise.resolve()}},{"../../components/drawing":608,"../../plotly":724,"../../registry":807,"./axes":729,d3:114}],751:[function(t,e,r){"use strict";function n(t,e){if("-"===t.type){var r=t._id,n=r.charAt(0);-1!==r.indexOf("scene")&&(r=n);var u=i(e,r,n);if(u){if("histogram"===u.type&&n==={v:"y",h:"x"}[u.orientation||"v"])return void(t.type="linear");var c=n+"calendar",h=u[c];if(o(u,n)){for(var f,d=a(u),p=[],m=0;m0?".":"")+i;u.isPlainObject(a)?s(a,e,o,n+1):e(o,i,a)}})}var l=t("../plotly"),u=t("../lib");r.manageCommandObserver=function(t,e,i,a){var o={},s=!0;e&&e._commandObserver&&(o=e._commandObserver),o.cache||(o.cache={}),o.lookupTable={};var l=r.hasSimpleAPICommandBindings(t,i,o.lookupTable);if(e&&e._commandObserver){if(l)return o;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,o}if(l){n(t,l,o.cache),o.check=function(){if(s){var e=n(t,l,o.cache);return e.changed&&a&&void 0!==o.lookupTable[e.value]&&(o.disable(),Promise.resolve(a({value:e.value,type:l.type,prop:l.prop,traces:l.traces,index:o.lookupTable[e.value]})).then(o.enable,o.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;he*Math.PI/180},w.render=function(){function t(t){var e=r.projection(t.lonlat);return e?"translate("+e[0]+","+e[1]+")":null}function e(t){return r.isLonLatOverEdges(t.lonlat)?"0":"1.0"}var r=this,n=r.framework,i=n.select("g.choroplethlayer"),a=n.select("g.scattergeolayer"),o=r.path;n.selectAll("path.basepath").attr("d",o),n.selectAll("path.graticulepath").attr("d",o),i.selectAll("path.choroplethlocation").attr("d",o),i.selectAll("path.basepath").attr("d",o),a.selectAll("path.js-line").attr("d",o),null!==r.clipAngle?(a.selectAll("path.point").style("opacity",e).attr("transform",t),a.selectAll("text").style("opacity",e).attr("transform",t)):(a.selectAll("path.point").attr("transform",t),a.selectAll("text").attr("transform",t))}},{"../../components/color":585,"../../components/drawing":608,"../../lib/topojson_utils":711,"../cartesian/axes":729,"../cartesian/graph_interact":738,"../plots":792,"./constants":755,"./projections":763,"./set_scale":764,"./zoom":765,"./zoom_reset":766,d3:114,"topojson-client":523}],757:[function(t,e,r){"use strict";var n=t("./geo"),i=t("../../plots/plots");r.name="geo",r.attr="geo",r.idRoot="geo",r.idRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=i.getSubplotIds(e,"geo");void 0===window.PlotlyGeoAssets&&(window.PlotlyGeoAssets={topojson:{}});for(var o=0;on^d>n&&r<(f-u)*(n-c)/(d-c)+u&&(i=!i)}return i}function o(t){return t?t/Math.sin(t):1}function s(t){return t>1?z:t<-1?-z:Math.asin(t)}function l(t){return t>1?0:t<-1?C:Math.acos(t)}function u(t,e){var r=(2+z)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>E;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(C*(4+C))*t*(1+Math.cos(e)),2*Math.sqrt(C/(4+C))*Math.sin(e)]}function c(t,e){function r(r,n){var i=R(r/e,n);return i[0]*=t,i}return arguments.length<2&&(e=t),1===e?R:e===1/0?f:(r.invert=function(r,n){var i=R.invert(r/t,n);return i[0]*=e,i},r)}function h(){var t=2,e=O(c),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}function f(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function d(t,e){return[3*t/(2*C)*Math.sqrt(C*C/3-e*e),e]}function p(t,e){return[t,1.25*Math.log(Math.tan(C/4+.4*e))]}function m(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>E&&--i>0);return e/2}}function g(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function v(t,e){var r,n=Math.min(18,36*Math.abs(e)/C),i=Math.floor(n),a=n-i,o=(r=F[i])[0],s=r[1],l=(r=F[++i])[0],u=r[1],c=(r=F[Math.min(19,++i)])[0],h=r[1];return[t*(l+a*(c-o)/2+a*a*(c-2*l+o)/2),(e>0?z:-z)*(u+a*(h-s)/2+a*a*(h-2*u+s)/2)]}function y(t,e){return[t*Math.cos(e),e]}function b(t,e){var r=Math.cos(e),n=o(l(r*Math.cos(t/=2)));return[2*r*Math.sin(t)*n,Math.sin(e)*n]}function x(t,e){var r=b(t,e);return[(r[0]+t/z)/2,(r[1]+e)/2]}t.geo.project=function(t,e){var n=e.stream;if(!n)throw new Error("not yet supported");return(t&&_.hasOwnProperty(t.type)?_[t.type]:r)(t,n)};var _={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,r)})}}},w=[],M=[],k={point:function(t,e){w.push([t,e])},result:function(){var t=w.length?w.length<2?{type:"Point",coordinates:w[0]}:{type:"MultiPoint",coordinates:w}:null;return w=[],t}},A={lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){w.length&&(M.push(w),w=[])},result:function(){var t=M.length?M.length<2?{type:"LineString",coordinates:M[0]}:{type:"MultiLineString",coordinates:M}:null;return M=[],t}},T={polygonStart:n,lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){var t=w.length;if(t){do{w.push(w[0].slice())}while(++t<4);M.push(w),w=[]}},polygonEnd:n,result:function(){if(!M.length)return null;var t=[],e=[];return M.forEach(function(r){i(r)?t.push([r]):e.push(r)}),e.forEach(function(e){var r=e[0];t.some(function(t){if(a(t[0],r))return t.push(e),!0})||t.push([e])}),M=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},S={Point:k,MultiPoint:k,LineString:A,MultiLineString:A,Polygon:T,MultiPolygon:T,Sphere:T},E=1e-6,L=E*E,C=Math.PI,z=C/2,D=(Math.sqrt(C),C/180),I=180/C,P=t.geo.projection,O=t.geo.projectionMutator;t.geo.interrupt=function(e){function r(t,r){for(var n=r<0?-1:1,i=l[+(r<0)],a=0,o=i.length-1;ai[a][2][0];++a);var s=e(t-i[a][1][0],r);return s[0]+=e(i[a][1][0],n*r>n*i[a][0][1]?i[a][0][1]:r)[0],s}function n(){s=l.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]})})}function i(){for(var e=1e-6,r=[],n=0,i=l[0].length;n=0;--n){var o=l[1][n],s=180*o[0][0]/C,u=180*o[0][1]/C,c=180*o[1][1]/C,h=180*o[2][0]/C,f=180*o[2][1]/C;r.push(a([[h-e,f-e],[h-e,c+e],[s+e,c+e],[s+e,u-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}function a(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++aE&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return P(g)}).raw=g;var F=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];F.forEach(function(t){t[1]*=1.0144}),v.invert=function(t,e){var r=e/z,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=F[a][1],s=F[a+1][1],l=F[Math.min(19,a+2)][1],u=l-o,c=l-2*s+o,h=2*(Math.abs(r)-s)/u,f=c/u,d=h*(1-f*h*(1-2*f*h));if(d>=0||1===a){n=(e>=0?5:-5)*(d+i);var p,m=50;do{i=Math.min(18,Math.abs(n)/5),a=Math.floor(i),d=i-a,o=F[a][1],s=F[a+1][1],l=F[Math.min(19,a+2)][1],n-=(p=(e>=0?z:-z)*(s+d*(l-o)/2+d*d*(l-2*s+o)/2)-e)*I}while(Math.abs(p)>L&&--m>0);break}}while(--a>=0);var g=F[a][0],v=F[a+1][0],y=F[Math.min(19,a+2)][0];return[t/(v+d*(y-g)/2+d*d*(y-2*v+g)/2),n*D]},(t.geo.robinson=function(){return P(v)}).raw=v,y.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return P(y)}).raw=y,b.invert=function(t,e){if(!(t*t+4*e*e>C*C+E)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),u=Math.cos(r/2),c=Math.sin(n),h=Math.cos(n),f=Math.sin(2*n),d=c*c,p=h*h,m=s*s,g=1-p*u*u,v=g?l(h*u)*Math.sqrt(a=1/g):a=0,y=2*v*h*s-t,b=v*c-e,x=a*(p*m+v*h*u*d),_=a*(.5*o*f-2*v*c*s),w=.25*a*(f*s-v*c*p*o),M=a*(d*u+v*m*h),k=_*w-M*x;if(!k)break;var A=(b*_-y*M)/k,T=(y*w-b*x)/k;r-=A,n-=T}while((Math.abs(A)>E||Math.abs(T)>E)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return P(b)}).raw=b,x.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),u=Math.sin(2*n),c=s*s,h=o*o,f=Math.sin(r),d=Math.cos(r/2),p=Math.sin(r/2),m=p*p,g=1-h*d*d,v=g?l(o*d)*Math.sqrt(a=1/g):a=0,y=.5*(2*v*o*p+r/z)-t,b=.5*(v*s+n)-e,x=.5*a*(h*m+v*o*d*c)+.5/z,_=a*(f*u/4-v*s*p),w=.125*a*(u*p-v*s*h*f),M=.5*a*(c*d+v*m*o)+.5,k=_*w-M*x,A=(b*_-y*M)/k,T=(y*w-b*x)/k;r-=A,n-=T}while((Math.abs(A)>E||Math.abs(T)>E)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return P(x)}).raw=x}e.exports=n},{}],764:[function(t,e,r){"use strict";function n(t,e){var r=t.projection,n=t.lonaxis,o=t.lataxis,l=t.domain,u=t.framewidth||0,c=e.w*(l.x[1]-l.x[0]),h=e.h*(l.y[1]-l.y[0]),f=n.range[0]+s,d=n.range[1]-s,p=o.range[0]+s,m=o.range[1]-s,g=n._fullRange[0]+s,v=n._fullRange[1]-s,y=o._fullRange[0]+s,b=o._fullRange[1]-s;r._translate0=[e.l+c/2,e.t+h/2];var x=d-f,_=m-p,w=[f+x/2,p+_/2],M=r._rotate;return r._center=[w[0]+M[0],w[1]+M[1]],function(e){function n(t){return Math.min(_*c/(t[1][0]-t[0][0]),_*h/(t[1][1]-t[0][1]))}var o,s,l,x,_=e.scale(),w=r._translate0,M=i(f,p,d,m),k=i(g,y,v,b);l=a(e,M),o=n(l),x=a(e,k),r._fullScale=n(x),e.scale(o),l=a(e,M),s=[w[0]-l[0][0]+u,w[1]-l[0][1]+u],r._translate=s,e.translate(s),l=a(e,M),t._isAlbersUsa||e.clipExtent(l),o=r.scale*o,r._scale=o,t._width=Math.round(l[1][0])+u,t._height=Math.round(l[1][1])+u,t._marginX=(c-Math.round(l[1][0]))/2,t._marginY=(h-Math.round(l[1][1]))/2}}function i(t,e,r,n){var i=(r-t)/4;return{type:"Polygon",coordinates:[[[t,e],[t,n],[t+i,n],[t+2*i,n],[t+3*i,n],[r,n],[r,e],[r-i,e],[r-2*i,e],[r-3*i,e],[t,e]]]}}function a(t,e){return o.geo.path().projection(t).bounds(e)}var o=t("d3"),s=t("./constants").clipPad;e.exports=n},{"./constants":755,d3:114}],765:[function(t,e,r){"use strict";function n(t,e){return(e._isScoped?a:e._clipAngle?s:o)(t,e.projection)}function i(t,e){var r=e._fullScale;return _.behavior.zoom().translate(t.translate()).scale(t.scale()).scaleExtent([.5*r,100*r])}function a(t,e){function r(){_.select(this).style(k)}function n(){o.scale(_.event.scale).translate(_.event.translate),t.render()}function a(){_.select(this).style(A)}var o=t.projection,s=i(o,e);return s.on("zoomstart",r).on("zoom",n).on("zoomend",a),s}function o(t,e){function r(t){return g.invert(t)}function n(t){var e=g(r(t));return Math.abs(e[0]-t[0])>y||Math.abs(e[1]-t[1])>y}function a(){_.select(this).style(k),l=_.mouse(this),u=g.rotate(),c=g.translate(),h=u,f=r(l)}function o(){if(d=_.mouse(this),n(l))return v.scale(g.scale()),void v.translate(g.translate());g.scale(_.event.scale),g.translate([c[0],_.event.translate[1]]),f?r(d)&&(m=r(d),p=[h[0]+(m[0]-f[0]),u[1],u[2]],g.rotate(p),h=p):(l=d,f=r(l)),t.render()}function s(){_.select(this).style(A)}var l,u,c,h,f,d,p,m,g=t.projection,v=i(g,e),y=2;return v.on("zoomstart",a).on("zoom",o).on("zoomend",s),v}function s(t,e){function r(t){v++||t({type:"zoomstart"})}function n(t){t({type:"zoom"})}function a(t){--v||t({type:"zoomend"})}var o,s=t.projection,d={r:s.rotate(),k:s.scale()},p=i(s,e),m=x(p,"zoomstart","zoom","zoomend"),v=0,y=p.on;return p.on("zoomstart",function(){_.select(this).style(k);var t=_.mouse(this),e=s.rotate(),i=e,a=s.translate(),v=u(e);o=l(s,t),y.call(p,"zoom",function(){var r=_.mouse(this);if(s.scale(d.k=_.event.scale),o){if(l(s,r)){s.rotate(e).translate(a);var u=l(s,r),p=h(o,u),y=g(c(v,p)),b=d.r=f(y,o,i);isFinite(b[0])&&isFinite(b[1])&&isFinite(b[2])||(b=i),s.rotate(b),i=b}}else t=r,o=l(s,t);n(m.of(this,arguments))}),r(m.of(this,arguments))}).on("zoomend",function(){_.select(this).style(A),y.call(p,"zoom",null),a(m.of(this,arguments))}).on("zoom.redraw",function(){t.render()}),_.rebind(p,m,"on")}function l(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&v(r)}function u(t){var e=.5*t[0]*w,r=.5*t[1]*w,n=.5*t[2]*w,i=Math.sin(e),a=Math.cos(e),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function c(t,e){var r=t[0],n=t[1],i=t[2],a=t[3],o=e[0],s=e[1],l=e[2],u=e[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function h(t,e){if(t&&e){var r=b(t,e),n=Math.sqrt(y(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,y(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function f(t,e,r){var n=m(e,2,t[0]);n=m(n,1,t[1]),n=m(n,0,t[2]-r[2]);var i,a,o=e[0],s=e[1],l=e[2],u=n[0],c=n[1],h=n[2],f=Math.atan2(s,o)*M,p=Math.sqrt(o*o+s*s);Math.abs(c)>p?(a=(c>0?90:-90)-f,i=0):(a=Math.asin(c/p)*M-f,i=Math.sqrt(p*p-c*c));var g=180-a-2*f,v=(Math.atan2(h,u)-Math.atan2(l,i))*M,y=(Math.atan2(h,u)-Math.atan2(l,-i))*M;return d(r[0],r[1],a,v)<=d(r[0],r[1],g,y)?[a,v,r[2]]:[g,y,r[2]]}function d(t,e,r,n){var i=p(r-t),a=p(n-e);return Math.sqrt(i*i+a*a)}function p(t){return(t%360+540)%360-180}function m(t,e,r){var n=r*w,i=t.slice(),a=0===e?1:0,o=2===e?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=t[a]*s-t[o]*l,i[o]=t[o]*s+t[a]*l,i}function g(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*M,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*M,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*M]}function v(t){var e=t[0]*w,r=t[1]*w,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function y(t,e){for(var r=0,n=0,i=t.length;nMath.abs(h)?(u.boxEnd[1]=u.boxStart[1]+Math.abs(c)*w*(Math.sign(h)||1),u.boxEnd[1]f[3]&&(u.boxEnd[1]=f[3],u.boxEnd[0]=u.boxStart[0]+(f[3]-u.boxStart[1])/Math.abs(w))):(u.boxEnd[0]=u.boxStart[0]+Math.abs(h)/w*(Math.sign(c)||1),u.boxEnd[0]f[2]&&(u.boxEnd[0]=f[2],u.boxEnd[1]=u.boxStart[1]+(f[2]-u.boxStart[0])*Math.abs(w)))}}else u.boxEnabled&&(c=u.boxStart[0]!==u.boxEnd[0],h=u.boxStart[1]!==u.boxEnd[1],c||h?(c&&(o(0,u.boxStart[0],u.boxEnd[0]),t.xaxis.autorange=!1),h&&(o(1,u.boxStart[1],u.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),u.boxEnabled=!1,u.boxInited=!1);break;case"pan":u.boxEnabled=!1,u.boxInited=!1,n?(u.panning||(u.dragStart[0]=i,u.dragStart[1]=a),Math.abs(u.dragStart[0]-i)h[d+2]&&(h[d]=-1,h[d+2]=1),f=this[b[d]],f._length=o.viewBox[d+2]-o.viewBox[d],l.doAutoRange(f),f.setScale();var v={_axisConstraintGroups:this.graphDiv._fullLayout._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis};y({_fullLayout:v}),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},x.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},x.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},x.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;rMath.abs(e))n.rotate(o,0,0,-t*r*Math.PI*f.rotateSpeed/window.innerWidth);else{var s=-f.zoomSpeed*a*e/window.innerHeight*(o-n.lastT())/100;n.pan(o,0,0,u*(Math.exp(s)-1))}}},!0),f}e.exports=n;var i=t("right-now"),a=t("3d-view"),o=t("mouse-change"),s=t("mouse-wheel")},{"3d-view":31,"mouse-change":441,"mouse-wheel":444,"right-now":490}],772:[function(t,e,r){"use strict";var n=t("./scene"),i=t("../plots"),a=t("../../lib"),o=t("../../constants/xmlns_namespaces");r.name="gl3d",r.attr="scene",r.idRoot="scene",r.idRegex=/^scene([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^scene([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,o=i.getSubplotIds(e,"gl3d"),s=0;s1;o(t,e,r,{type:"gl3d",attributes:s,handleDefaults:n,font:e.font,fullData:r,getDfltFromLayout:a,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":585,"../../../lib":690,"../../subplot_defaults":799,"./axis_defaults":775,"./layout_attributes":778}],778:[function(t,e,r){"use strict";function n(t,e,r){return{x:{valType:"number",dflt:t},y:{valType:"number",dflt:e},z:{valType:"number",dflt:r}}}var i=t("./axis_attributes"),a=t("../../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},camera:{up:a(n(0,0,1),{}),center:a(n(0,0,0),{}),eye:a(n(1.25,1.25,1.25),{})},domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto"},aspectratio:{x:{valType:"number",min:0},y:{valType:"number",min:0},z:{valType:"number",min:0}},xaxis:i,yaxis:i,zaxis:i,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],dflt:"turntable"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest"},_deprecated:{cameraposition:{valType:"info_array"}}}},{"../../../lib/extend":682,"./axis_attributes":774}],779:[function(t,e,r){"use strict";function n(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}function i(t){var e=new n;return e.merge(t),e}var a=t("../../../lib/str2rgbarray"),o=["xaxis","yaxis","zaxis"];n.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[o[e]];this.enabled[e]=r.showspikes,this.colors[e]=a(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness}},e.exports=i},{"../../../lib/str2rgbarray":708}],780:[function(t,e,r){"use strict";function n(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;af[1][o]?d[o]=1:f[1][o]===f[0][o]?d[o]=1:d[o]=1/(f[1][o]-f[0][o]);for(this.dataScale=d,a=0;am[1][a])m[0][a]=-1,m[1][a]=1;else{var x=m[1][a]-m[0][a];m[0][a]-=x/32,m[1][a]+=x/32}}else{var _=c[A[a]].range;m[0][a]=_[0],m[1][a]=_[1]}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),g[a]=m[1][a]-m[0][a],this.glplot.bounds[0][a]=m[0][a]*d[a],this.glplot.bounds[1][a]=m[1][a]*d[a]}var w=[1,1,1];for(a=0;a<3;++a){l=c[A[a]],u=l.type;var M=y[u];w[a]=Math.pow(M.acc,1/M.count)/d[a]}var k;if("auto"===c.aspectmode)k=Math.max.apply(null,w)/Math.min.apply(null,w)<=4?w:[1,1,1];else if("cube"===c.aspectmode)k=[1,1,1];else if("data"===c.aspectmode)k=w;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var T=c.aspectratio;k=[T.x,T.y,T.z]}c.aspectratio.x=h.aspectratio.x=k[0],c.aspectratio.y=h.aspectratio.y=k[1],c.aspectratio.z=h.aspectratio.z=k[2],this.glplot.aspect=k;var S=c.domain||null,E=e._size||null;if(S&&E){var L=this.container.style;L.position="absolute",L.left=E.l+S.x[0]*E.w+"px",L.top=E.t+(1-S.y[1])*E.h+"px",L.width=E.w*(S.x[1]-S.x[0])+"px",L.height=E.h*(S.y[1]-S.y[0])+"px"}this.glplot.redraw()}},k.destroy=function(){this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null},k.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),u(this.glplot.camera)},k.setCamera=function(t){this.glplot.camera.lookAt.apply(this,l(t))},k.saveCamera=function(t){var e=this.getCamera(),r=p.nestedProperty(t,this.id+".camera"),n=r.get(),i=!1;if(void 0===n)i=!0;else for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!function(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}(e,n,a,o)){i=!0;break}return i&&r.set(e),i},k.updateFx=function(t,e){var r=this.camera;r&&("orbit"===t?(r.mode="orbit",r.keyBindingMode="rotate"):"turntable"===t?(r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate"):r.keyBindingMode=t),this.fullSceneLayout.hovermode=e},k.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(c),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,n=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var i=new Uint8Array(r*n*4);e.readPixels(0,0,r,n,e.RGBA,e.UNSIGNED_BYTE,i);for(var a=0,o=n-1;a0}function a(t){var e={},r={};switch(t.type){case"circle":s.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":s.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity});break;case"fill":s.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var n=t.symbol,i=l(n.textposition,n.iconsize);s.extendFlat(e,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset}),s.extendFlat(r,{"icon-color":t.color,"text-color":n.textfont.color,"text-opacity":t.opacity})}return{layout:e,paint:r}}function o(t){var e,r=t.sourcetype,n=t.source,i={type:r},a="string"==typeof n;return"geojson"===r?e="data":"vector"===r&&(e=a?"url":"tiles"),i[e]=n,i}var s=t("../../lib"),l=t("./convert_text_opts"),u=n.prototype;u.update=function(t){this.visible?this.needsNewSource(t)?(this.updateLayer(t),this.updateSource(t)):this.needsNewLayer(t)&&this.updateLayer(t):(this.updateSource(t),this.updateLayer(t)),this.updateStyle(t),this.visible=i(t)},u.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},u.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==t.below},u.updateSource=function(t){var e=this.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,i(t)){var r=o(t);e.addSource(this.idSource,r)}},u.updateLayer=function(t){var e=this.map;if(e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),this.layerType=t.type,i(t)){e.addLayer({id:this.idLayer,source:this.idSource,"source-layer":t.sourcelayer||"",type:t.type},t.below);var r={visibility:"visible"};this.mapbox.setOptions(this.idLayer,"setLayoutProperty",r)}},u.updateStyle=function(t){var e=a(t);i(t)&&(this.mapbox.setOptions(this.idLayer,"setLayoutProperty",e.layout),this.mapbox.setOptions(this.idLayer,"setPaintProperty",e.paint))},u.dispose=function(){var t=this.map;t.removeLayer(this.idLayer),t.removeSource(this.idSource)},e.exports=function(t,e,r){var i=new n(t,e);return i.update(r),i}},{"../../lib":690,"./convert_text_opts":785}],788:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../components/color").defaultLine,a=t("../font_attributes"),o=t("../../traces/scatter/attributes").textposition;e.exports={_arrayAttrRegexps:[/^mapbox([2-9]|[1-9][0-9]+)?\.layers/],domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],dflt:"basic"},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},layers:{_isLinkedToArray:"layer",sourcetype:{valType:"enumerated",values:["geojson","vector"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},type:{valType:"enumerated",values:["circle","line","fill","symbol"],dflt:"circle"},below:{valType:"string",dflt:""},color:{valType:"color",dflt:i},opacity:{valType:"number",min:0,max:1,dflt:1},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2}},fill:{outlinecolor:{valType:"color",dflt:i}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},textfont:n.extendDeep({},a,{family:{dflt:"Open Sans Regular, Arial Unicode MS Regular"}}),textposition:n.extendFlat({},o,{arrayOk:!1})}}}},{"../../components/color":585,"../../lib":690,"../../traces/scatter/attributes":947,"../font_attributes":753}],789:[function(t,e,r){"use strict";function n(t,e,r){r("accesstoken"),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch"),i(t,e),e._input=t}function i(t,e){function r(t,e){return a.coerce(n,i,s.layers,t,e)}for(var n,i,o=t.layers||[],l=e.layers=[],u=0;u=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var s=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),u=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&n(t,s),l.text(s.text()&&u.text()?" - ":"")}},d.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||"https://plot.ly",r=o.select(t).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return n.append("input").attr({type:"text",name:"data"}).node().value=d.graphJson(t,!1,"keepdata"),n.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1},d.supplyDefaults=function(t){var e,r=t._fullLayout||{},n=t._fullLayout={},i=t.layout||{},a=t._fullData||[],o=t._fullData=[],s=t.data||[];if(t._transitionData||d.createTransitionData(t),r._initialAutoSizeIsDone){var u=r.width,c=r.height;d.supplyLayoutGlobalDefaults(i,n),i.width||(n.width=u),i.height||(n.height=c)}else{d.supplyLayoutGlobalDefaults(i,n);var h=!i.width||!i.height,f=n.autosize,p=t._context&&t._context.autosizable;h&&(f||p)?d.plotAutoSize(t,i,n):h&&d.sanitizeMargins(t),!f&&h&&(i.width=n.width,i.height=n.height)}n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._globalTransforms=(t._context||{}).globalTransforms,d.supplyDataDefaults(s,o,i,n),n._has=d._hasPlotType.bind(n);var m=n._modules;for(e=0;e0){var h=a(t._boundingBoxMargins),f=h.left+h.right,p=h.bottom+h.top,m=1-2*l,g=r._container&&r._container.node?r._container.node().getBoundingClientRect():{width:r.width,height:r.height};n=Math.round(m*(g.width-f)),i=Math.round(m*(g.height-p))}else{var v=u?window.getComputedStyle(t):{};n=parseFloat(v.width)||r.width,i=parseFloat(v.height)||r.height}var y=d.layoutAttributes.width.min,b=d.layoutAttributes.height.min;n1,_=!e.height&&Math.abs(r.height-i)>1;(_||x)&&(x&&(r.width=n),_&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),d.sanitizeMargins(r)},d.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a;l.Axes.supplyLayoutDefaults(t,e,r);var o=e._basePlotModules;for(i=0;i.5*n.width&&(r.l=r.r=0),r.b+r.t>.5*n.height&&(r.b=r.t=0),n._pushmargin[e]={l:{val:r.x,size:r.l+i},r:{val:r.x,size:r.r+i},b:{val:r.y,size:r.b+i},t:{val:r.y,size:r.t+i}}}else delete n._pushmargin[e];n._replotting||d.doAutoMargin(t)}},d.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),e._pushmargin||(e._pushmargin={});var r=e._size,n=JSON.stringify(r),i=Math.max(e.margin.l||0,0),a=Math.max(e.margin.r||0,0),o=Math.max(e.margin.t||0,0),u=Math.max(e.margin.b||0,0),c=e._pushmargin;if(!1!==e.margin.autoexpand){c.base={l:{val:0,size:i},r:{val:1,size:a},t:{val:1,size:o},b:{val:0,size:u}};for(var h=Object.keys(c),f=0;fg){var k=(v*w+(M-e.width)*g)/(w-g),A=(M*(1-g)+(v-e.width)*(1-w))/(w-g);k>=0&&A>=0&&k+A>i+a&&(i=k,a=A)}}if(s(b)&&c[_].t){var T=c[_].t.val,S=c[_].t.size;if(T>y){var E=(b*T+(S-e.height)*y)/(T-y),L=(S*(1-y)+(b-e.height)*(1-T))/(T-y);E>=0&&L>=0&&E+L>u+o&&(u=E,o=L)}}}}if(r.l=Math.round(i),r.r=Math.round(a),r.t=Math.round(o),r.b=Math.round(u),r.p=Math.round(e.margin.pad),r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b,!e._replotting&&"{}"!==n&&n!==JSON.stringify(e._size))return l.plot(t)},d.graphJson=function(t,e,r,n,i){function a(t){if("function"==typeof t)return null;if(c.isPlainObject(t)){var e,n,i={};for(e in t)if("function"!=typeof t[e]&&-1===["_","["].indexOf(e.charAt(0))){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!c.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;i[e]=a(t[e])}return i}return Array.isArray(t)?t.map(a):c.isJSDate(t)?c.ms2DateTimeLocal(+t):t}(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&d.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames,u={data:(o||[]).map(function(t){var r=a(t);return e&&delete r.fit,r})};return e||(u.layout=a(s)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),l&&(u.frames=a(l)),"object"===n?u:JSON.stringify(u)},d.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){_=!0}),i.redraw&&t._transitionData._interruptCallbacks.push(function(){return l.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var o,s,u=0,h=0,d=t._fullLayout._basePlotModules,p=!1;if(r)for(s=0;s=0,E=S?h.angularAxis.domain:n.extent(M),L=Math.abs(M[1]-M[0]);A&&!k&&(L=0);var C=E.slice();T&&k&&(C[1]+=L);var z=h.angularAxis.ticksCount||4;z>8&&(z=z/(z/8)+z%8),h.angularAxis.ticksStep&&(z=(C[1]-C[0])/z);var D=h.angularAxis.ticksStep||(C[1]-C[0])/(z*(h.minorTicks+1));w&&(D=Math.max(Math.round(D),1)),C[2]||(C[2]=D);var I=n.range.apply(this,C);if(I=I.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===h.direction?[0,360]:[360,0]),c.layout.angularAxis.domain=s.domain(),c.layout.angularAxis.endPadding=T?L:0,void 0===(e=n.select(this).select("svg.chart-root"))||e.empty()){var P=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),O=this.appendChild(this.ownerDocument.importNode(P.documentElement,!0));e=n.select(O)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var R,j=e.select(".chart-group"),F={fill:"none",stroke:h.tickColor},N={"font-size":h.font.size,"font-family":h.font.family,fill:h.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+h.font.outlineColor}).join(",")};if(h.showLegend){R=e.select(".legend-group").attr({transform:"translate("+[b,h.margin.top]+")"}).style({display:"block"});var B=d.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend=void 0===t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:d.map(function(t,e){return t.name||"Element"+e}),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:R,elements:B,reverseOrder:h.legend.reverseOrder})})();var U=R.node().getBBox();b=Math.min(h.width-U.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,b=Math.max(10,b),_=[h.margin.left+b,h.margin.top+b],i.range([0,b]),c.layout.radialAxis.domain=i.domain(),R.attr("transform","translate("+[_[0]+b,_[1]-b]+")")}else R=e.select(".legend-group").style({display:"none"});e.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),j.attr("transform","translate("+_+")").style({cursor:"crosshair"});var V=[(h.width-(h.margin.left+h.margin.right+2*b+(U?U.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*b))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),e.select(".outer-group").attr("transform","translate("+V+")"),h.title){var q=e.select("g.title-group text").style(N).text(h.title),H=q.node().getBBox();q.attr({x:_[0]-H.width/2,y:_[1]-b-20})}var Y=e.select(".radial.axis-group");if(h.radialAxis.gridLinesVisible){var G=Y.selectAll("circle.grid-circle").data(i.ticks(5));G.enter().append("circle").attr({class:"grid-circle"}).style(F),G.attr("r",i),G.exit().remove()}Y.select("circle.outside-circle").attr({r:b}).style(F);var X=e.select("circle.background-circle").attr({r:b}).style({fill:h.backgroundColor,stroke:h.stroke});if(h.radialAxis.visible){var W=n.svg.axis().scale(i).ticks(5).tickSize(5);Y.call(W).attr({transform:"rotate("+h.radialAxis.orientation+")"}),Y.selectAll(".domain").style(F),Y.selectAll("g>text").text(function(t,e){return this.textContent+h.radialAxis.ticksSuffix}).style(N).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===h.radialAxis.tickOrientation?"rotate("+-h.radialAxis.orientation+") translate("+[0,N["font-size"]]+")":"translate("+[0,N["font-size"]]+")"}}),Y.selectAll("g>line").style({stroke:"black"})}var Z=e.select(".angular.axis-group").selectAll("g.angular-tick").data(I),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+l(t,e)+")"}}).style({display:h.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(h.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(h.minorTicks+1)==0)}).style(F),J.selectAll(".minor").style({stroke:h.minorTickColor}),Z.select("line.grid-line").attr({x1:h.tickLength?b-h.tickLength:0,x2:b}).style({display:h.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(N);var K=Z.select("text.axis-text").attr({x:b+h.labelOffset,dy:".35em",transform:function(t,e){var r=l(t,e),n=b+h.labelOffset,i=h.angularAxis.tickOrientation;return"horizontal"==i?"rotate("+-r+" "+n+" 0)":"radial"==i?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:h.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(h.minorTicks+1)!=0?"":w?w[t]+h.angularAxis.ticksSuffix:t+h.angularAxis.ticksSuffix}).style(N);h.angularAxis.rewriteTicks&&K.text(function(t,e){return e%(h.minorTicks+1)!=0?"":h.angularAxis.rewriteTicks(this.textContent,e)});var Q=n.max(j.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));R.attr({transform:"translate("+[b+Q,h.margin.top]+")"});var $=e.select("g.geometry-group").selectAll("g").size()>0,tt=e.select("g.geometry-group").selectAll("g.geometry").data(d);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),d[0]||$){var et=[];d.forEach(function(t,e){var r={};r.radialScale=i, -r.angularScale=s,r.container=tt.filter(function(t,r){return r==e}),r.geometry=t.geometry,r.orientation=h.orientation,r.direction=h.direction,r.index=e,et.push({data:t,geometryConfig:r})});var rt=n.nest().key(function(t,e){return void 0!==t.data.groupId||"unstacked"}).entries(et),nt=[];rt.forEach(function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return a(o[r].defaultConfig(),t)});o[r]().config(n)()})}var it,at,ot=e.select(".guides-group"),st=e.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,hasTick:!0})();if(!k){var ht=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});j.on("mousemove.angular-guide",function(t,e){var r=o.util.getMousePos(X).angle;ht.attr({x2:-b,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(b+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){ot.select("line").style({opacity:0})})}var ft=ot.select("circle").style({stroke:"grey",fill:"none"});j.on("mousemove.radial-guide",function(t,e){var r=o.util.getMousePos(X).radius;ft.attr({r:r}).style({opacity:.5}),at=i.invert(o.util.getMousePos(X).radius);var n=o.util.convertToCartesian(r,h.radialAxis.orientation);ut.text(o.util.round(at)).move([n[0]+_[0],n[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){ft.style({opacity:0}),ct.hide(),lt.hide(),ut.hide()}),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(t,r){var i=n.select(this),a=i.style("fill"),s="black",l=i.style("opacity")||1;if(i.attr({"data-opacity":l}),"none"!=a){i.attr({"data-fill":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var u={t:o.util.round(t[0]),r:o.util.round(t[1])};k&&(u.t=w[t[0]]);var c="t: "+u.t+", r: "+u.r,h=this.getBoundingClientRect(),f=e.node().getBoundingClientRect(),d=[h.left+h.width/2-V[0]-f.left,h.top+h.height/2-V[1]-f.top];ct.config({color:s}).text(c),ct.move(d)}else a=i.style("stroke"),i.attr({"data-stroke":a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ct.show()}).on("mouseout.tooltip",function(t,e){ct.hide();var r=n.select(this),i=r.attr("data-fill");i?r.style({fill:i,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})})}),f}var e,r,i,s,l={data:[],layout:{}},u={},c={},h=n.dispatch("hover"),f={};return f.render=function(e){return t(e),this},f.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),a(l.data[e],o.Axis.defaultConfig().data[0]),a(l.data[e],t)}),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,e.layout),this},f.getLiveConfig=function(){return c},f.getinputConfig=function(){return u},f.radialScale=function(t){return i},f.angularScale=function(t){return s},f.svg=function(){return e},n.rebind(f,h,"on"),f},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach(function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)});var s={t:a,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if(void 0===t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i0)){var s=n.select(this.parentNode).selectAll("path.line").data([0]);s.enter().insert("path"),s.attr({class:"line",d:f(o),transform:function(e,r){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return g.fill(r,i,a)},"fill-opacity":0,stroke:function(t,e){return g.stroke(r,i,a)},"stroke-width":function(t,e){return g["stroke-width"](r,i,a)},"stroke-dasharray":function(t,e){return g["stroke-dasharray"](r,i,a)},opacity:function(t,e){return g.opacity(r,i,a)},display:function(t,e){return g.display(r,i,a)}})}};var d=t.angularScale.range(),p=Math.abs(d[1]-d[0])/l[0].length*Math.PI/180,m=n.svg.arc().startAngle(function(t){return-p/2}).endAngle(function(t){return p/2}).innerRadius(function(e){return t.radialScale(c+(e[2]||0))}).outerRadius(function(e){return t.radialScale(c+(e[2]||0))+t.radialScale(e[1])});h.arc=function(e,r,i){n.select(this).attr({class:"mark arc",d:m,transform:function(e,r){return"rotate("+(t.orientation+u(e[0])+90)+")"}})};var g={fill:function(t,r,n){return e[n].data.color},stroke:function(t,r,n){return e[n].data.strokeColor},"stroke-width":function(t,r,n){return e[n].data.strokeSize+"px"},"stroke-dasharray":function(t,r,n){return i[e[n].data.strokeDash]},opacity:function(t,r,n){return e[n].data.opacity},display:function(t,r,n){return void 0===e[n].data.visible||e[n].data.visible?"block":"none"}},v=n.select(this).selectAll("g.layer").data(l);v.enter().append("g").attr({class:"layer"});var y=v.selectAll("path.mark").data(function(t,e){return t});y.enter().append("path").attr({class:"mark"}),y.style(g).each(h[t.geometryType]),y.exit().remove(),v.exit().remove()})}var e=[o.PolyChart.defaultConfig()],r=n.dispatch("hover"),i={solid:"none",dash:[5,2],dot:[2,5]};return t.config=function(t){return arguments.length?(t.forEach(function(t,r){e[r]||(e[r]={}),a(e[r],o.PolyChart.defaultConfig()),a(e[r],t)}),this):e},t.getColorScale=function(){},n.rebind(t,r,"on"),t},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){function t(){var r=e.legendConfig,i=e.data.map(function(t,e){return[].concat(t).map(function(t,n){var i=a({},r.elements[e]);return i.name=t,i.color=[].concat(r.elements[e].color)[n],i})}),o=n.merge(i);o=o.filter(function(t,e){return r.elements[e]&&(r.elements[e].visibleInLegend||void 0===r.elements[e].visibleInLegend)}),r.reverseOrder&&(o=o.reverse());var s=r.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map(function(t,e){return t.color}),u=r.fontSize,c=null==r.isContinuous?"number"==typeof o[0]:r.isContinuous,h=c?r.height:u*o.length,f=s.classed("legend-group",!0),d=f.selectAll("svg").data([0]),p=d.enter().append("svg").attr({width:300,height:h+u,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var m=n.range(o.length),g=n.scale[c?"linear":"ordinal"]().domain(m).range(l),v=n.scale[c?"linear":"ordinal"]().domain(m)[c?"range":"rangePoints"]([0,h]),y=function(t,e){var r=3*e;return"line"===t?"M"+[[-e/2,-e/12],[e/2,-e/12],[e/2,e/12],[-e/2,e/12]]+"Z":-1!=n.svg.symbolTypes.indexOf(t)?n.svg.symbol().type(t).size(r)():n.svg.symbol().type("square").size(r)()};if(c){var b=d.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);b.enter().append("stop"),b.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),d.append("rect").classed("legend-mark",!0).attr({height:r.height,width:r.colorBandWidth,fill:"url(#grad1)"})}else{var x=d.select(".legend-marks").selectAll("path.legend-mark").data(o);x.enter().append("path").classed("legend-mark",!0),x.attr({transform:function(t,e){return"translate("+[u/2,v(e)+u/2]+")"},d:function(t,e){var r=t.symbol;return y(r,u)},fill:function(t,e){return g(e)}}),x.exit().remove()}var _=n.svg.axis().scale(v).orient("right"),w=d.select("g.legend-axis").attr({transform:"translate("+[c?r.colorBandWidth:u,u/2]+")"}).call(_);return w.selectAll(".domain").style({fill:"none",stroke:"none"}),w.selectAll("line").style({fill:"none",stroke:c?r.textColor:"none"}),w.selectAll("text").style({fill:r.textColor,"font-size":r.fontSize}).text(function(t,e){return o[e].name}),t}var e=o.Legend.defaultConfig(),r=n.dispatch("hover");return t.config=function(t){return arguments.length?(a(e,t),this):e},n.rebind(t,r,"on"),t},o.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=function(){t=i.container.selectAll("g."+s).data([0]);var n=t.enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:i.padding+10,dy:.3*+i.fontSize}),l};return l.text=function(a){var o=n.hsl(i.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",c=a||"";e.style({fill:u,"font-size":i.fontSize+"px"}).text(c);var h=i.padding,f=e.node().getBBox(),d={fill:i.color,stroke:s,"stroke-width":"2px"},p=f.width+2*h+10,m=f.height+2*h;return r.attr({d:"M"+[[10,-m/2],[10,-m/4],[i.hasTick?0:10,0],[10,m/4],[10,m/2],[p,m/2],[p,-m/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[10,-m/2+2*h]+")"}),t.style({display:"block"}),l},l.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),l},l.hide=function(){if(t)return t.style({display:"none"}),l},l.show=function(){if(t)return t.style({display:"block"}),l},l.config=function(t){return a(i,t),l},l},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={};return t.convert=function(t,e){var r={};if(t.data&&(r.data=t.data.map(function(t,r){var n=a({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",!0===n.dotVisible?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n}),!e&&t.layout&&"stack"===t.layout.barmode)){var i=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=i.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)})}if(t.layout){var s=a({},t.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?(void 0!==s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&void 0!==s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&void 0!==s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&void 0!==s.margin.t){var l=["t","r","b","l","pad"],u=["top","right","bottom","left","pad"],c={};n.entries(s.margin).forEach(function(t,e){c[u[l.indexOf(t.key)]]=t.value}),s.margin=c}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r},t}},{"../../lib":690,d3:114}],797:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=i.extendDeepAll,u=e.exports={};u.framework=function(t){function e(e,i){return i&&(h=i),n.select(n.select(h).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),r=r?l(r,e):e,a||(a=o.Axis()),c=o.adapter.plotly().convert(r),a.config(c).render(h),t.data=r.data,t.layout=r.layout,u.fillLayout(t),r}var r,i,a,c,h,f=new s;return e.isPolar=!0,e.svg=function(){return a.svg()},e.getConfig=function(){return r},e.getLiveConfig=function(){return o.adapter.plotly().convert(a.getLiveConfig(),!0)},e.getLiveScales=function(){return{t:a.angularScale(),r:a.radialScale()}},e.setUndoPoint=function(){var t=this,e=o.util.cloneJson(r);!function(e,r){f.add({undo:function(){r&&t(r)},redo:function(){t(e)}})}(e,i),i=o.util.cloneJson(e)},e.undo=function(){f.undo()},e.redo=function(){f.redo()},e},u.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),i=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{"../../components/color":585,"../../lib":690,"./micropolar":796,"./undo_manager":798,d3:114}],798:[function(t,e,r){"use strict";e.exports=function(){function t(t,e){return t?(i=!0,t[e](),i=!1,this):this}var e,r=[],n=-1,i=!1;return{add:function(t){return i?this:(r.splice(n+1,r.length-n),r.push(t),n=r.length-1,this)},setCallback:function(t){e=t},undo:function(){var i=r[n];return i?(t(i,"undo"),n-=1,e&&e(i.undo),this):this},redo:function(){var i=r[n+1];return i?(t(i,"redo"),n+=1,e&&e(i.redo),this):this},clear:function(){r=[],n=-1},hasUndo:function(){return-1!==n},hasRedo:function(){return n=o&&(d.min=0,p.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}var i=t("../../../components/color"),a=t("../../subplot_defaults"),o=t("./layout_attributes"),s=t("./axis_defaults"),l=["aaxis","baxis","caxis"];e.exports=function(t,e,r){a(t,e,r,{type:"ternary",attributes:o,handleDefaults:n,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../../components/color":585,"../../subplot_defaults":799,"./axis_defaults":803,"./layout_attributes":805}],805:[function(t,e,r){"use strict";var n=t("../../../components/color/attributes"),i=t("./axis_attributes");e.exports={domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},bgcolor:{valType:"color",dflt:n.background},sum:{valType:"number",dflt:1,min:0},aaxis:i,baxis:i,caxis:i}},{"../../../components/color/attributes":584,"./axis_attributes":802}],806:[function(t,e,r){"use strict";function n(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework()}function i(t){a.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}var a=t("d3"),o=t("tinycolor2"),s=t("../../plotly"),l=t("../../lib"),u=t("../../components/color"),c=t("../../components/drawing"),h=t("../cartesian/set_convert"),f=t("../../lib/extend").extendFlat,d=t("../plots"),p=t("../cartesian/axes"),m=t("../../components/dragelement"),g=t("../../components/titles"),v=t("../cartesian/select"),y=t("../cartesian/constants"),b=t("../cartesian/graph_interact");e.exports=n;var x=n.prototype;x.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={}},x.plot=function(t,e){var r=this,n=e[r.id],i=e._size;r.adjustLayout(n,i),d.generalUpdatePerTraceModule(r,t,n),r.layers.plotbg.select("path").call(u.fill,n.bgcolor)},x.makeFramework=function(){var t=this,e=t.defs.selectAll("g.clips").data([0]);e.enter().append("g").classed("clips",!0);var r="clip"+t.layoutId+t.id;t.clipDef=e.selectAll("#"+r).data([0]),t.clipDef.enter().append("clipPath").attr("id",r).append("path").attr("d","M0,0Z"),t.plotContainer=t.container.selectAll("g."+t.id).data([0]),t.plotContainer.enter().append("g").classed(t.id,!0),t.layers={};var n=["draglayer","plotbg","backplot","grids","frontplot","zoom","aaxis","baxis","caxis","axlines"];t.plotContainer.selectAll("g.toplevel").data(n).enter().append("g").attr("class",function(t){return"toplevel "+t}).each(function(e){var r=a.select(this);t.layers[e]=r,"frontplot"===e?r.append("g").classed("scatterlayer",!0):"backplot"===e?r.append("g").classed("maplayer",!0):"plotbg"===e?r.append("path").attr("d","M0,0Z"):"axlines"===e&&r.selectAll("path").data(["aline","bline","cline"]).enter().append("path").each(function(t){a.select(this).classed(t,!0)})}),t.plotContainer.select(".grids").selectAll("g.grid").data(["agrid","bgrid","cgrid"]).enter().append("g").attr("class",function(t){return"grid "+t}).each(function(e){t.layers[e]=a.select(this)}),t.plotContainer.selectAll(".backplot,.frontplot,.grids").call(c.setClipUrl,r),t.graphDiv._context.staticPlot||t.initInteractions()};var _=Math.sqrt(4/3);x.adjustLayout=function(t,e){var r,n,i,a,o,s,l=this,c=t.domain,d=(c.x[0]+c.x[1])/2,p=(c.y[0]+c.y[1])/2,m=c.x[1]-c.x[0],g=c.y[1]-c.y[0],v=m*e.w,y=g*e.h,b=t.sum,x=t.aaxis.min,w=t.baxis.min,M=t.caxis.min;v>_*y?(a=y,i=a*_):(i=v,a=i/_),o=m*i/v,s=g*a/y,r=e.l+e.w*d-i/2,n=e.t+e.h*(1-p)-a/2,l.x0=r,l.y0=n,l.w=i,l.h=a,l.sum=b,l.xaxis={type:"linear",range:[x+2*M-b,b-x-2*w],domain:[d-o/2,d+o/2],_id:"x"},h(l.xaxis,l.graphDiv._fullLayout),l.xaxis.setScale(),l.yaxis={type:"linear",range:[x,b-w-M],domain:[p-s/2,p+s/2],_id:"y"},h(l.yaxis,l.graphDiv._fullLayout),l.yaxis.setScale();var k=l.yaxis.domain[0],A=l.aaxis=f({},t.aaxis,{range:[x,b-w-M],side:"left",_counterangle:30,tickangle:(+t.aaxis.tickangle||0)-30,domain:[k,k+s*_],_axislayer:l.layers.aaxis,_gridlayer:l.layers.agrid,_pos:0,_id:"y",_length:i,_gridpath:"M0,0l"+a+",-"+i/2});h(A,l.graphDiv._fullLayout),A.setScale();var T=l.baxis=f({},t.baxis,{range:[b-x-M,w],side:"bottom",_counterangle:30,domain:l.xaxis.domain,_axislayer:l.layers.baxis,_gridlayer:l.layers.bgrid,_counteraxis:l.aaxis,_pos:0,_id:"x",_length:i,_gridpath:"M0,0l-"+i/2+",-"+a});h(T,l.graphDiv._fullLayout),T.setScale(),A._counteraxis=T;var S=l.caxis=f({},t.caxis,{range:[b-x-w,M],side:"right",_counterangle:30,tickangle:(+t.caxis.tickangle||0)+30,domain:[k,k+s*_],_axislayer:l.layers.caxis,_gridlayer:l.layers.cgrid,_counteraxis:l.baxis,_pos:0,_id:"y",_length:i,_gridpath:"M0,0l-"+a+","+i/2});h(S,l.graphDiv._fullLayout),S.setScale();var E="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";l.clipDef.select("path").attr("d",E),l.layers.plotbg.select("path").attr("d",E);var L="translate("+r+","+n+")";l.plotContainer.selectAll(".scatterlayer,.maplayer,.zoom").attr("transform",L);var C="translate("+r+","+(n+a)+")";l.layers.baxis.attr("transform",C),l.layers.bgrid.attr("transform",C);var z="translate("+(r+i/2)+","+n+")rotate(30)";l.layers.aaxis.attr("transform",z),l.layers.agrid.attr("transform",z);var D="translate("+(r+i/2)+","+n+")rotate(-30)";l.layers.caxis.attr("transform",D),l.layers.cgrid.attr("transform",D),l.drawAxes(!0),l.plotContainer.selectAll(".crisp").classed("crisp",!1);var I=l.layers.axlines;I.select(".aline").attr("d",A.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(u.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),I.select(".bline").attr("d",T.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(u.stroke,T.linecolor||"#000").style("stroke-width",(T.linewidth||0)+"px"),I.select(".cline").attr("d",S.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(u.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px")},x.drawAxes=function(t){var e=this,r=e.graphDiv,n=e.id.substr(7)+"title",i=e.aaxis,a=e.baxis,o=e.caxis;if(p.doTicks(r,i,!0),p.doTicks(r,a,!0),p.doTicks(r,o,!0),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0));g.draw(r,"a"+n,{propContainer:i,propName:e.id+".aaxis.title",dfltName:"Component A",attributes:{x:e.x0+e.w/2,y:e.y0-i.titlefont.size/3-s,"text-anchor":"middle"}});var l=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;g.draw(r,"b"+n,{propContainer:a,propName:e.id+".baxis.title",dfltName:"Component B",attributes:{x:e.x0-l,y:e.y0+e.h+.83*a.titlefont.size+l,"text-anchor":"middle"}}),g.draw(r,"c"+n,{propContainer:o,propName:e.id+".caxis.title",dfltName:"Component C",attributes:{x:e.x0+e.w+l,y:e.y0+e.h+.83*o.titlefont.size+l,"text-anchor":"middle"}})}};var w=y.MINZOOM/2+.87,M="m-0.87,.5h"+w+"v3h-"+(w+5.2)+"l"+(w/2+2.6)+",-"+(.87*w+4.5)+"l2.6,1.5l-"+w/2+","+.87*w+"Z",k="m0.87,.5h-"+w+"v3h"+(w+5.2)+"l-"+(w/2+2.6)+",-"+(.87*w+4.5)+"l-2.6,1.5l"+w/2+","+.87*w+"Z",A="m0,1l"+w/2+","+.87*w+"l2.6,-1.5l-"+(w/2+2.6)+",-"+(.87*w+4.5)+"l-"+(w/2+2.6)+","+(.87*w+4.5)+"l2.6,1.5l"+w/2+",-"+.87*w+"Z",T=!0;x.initInteractions=function(){function t(t,e,r){var n=R.getBoundingClientRect();x=e-n.left,w=r-n.top,S={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=S,E=O.aaxis.range[1]-S.a,C=o(O.graphDiv._fullLayout[O.id].bgcolor).getLuminance(), -z="M0,"+O.h+"L"+O.w/2+", 0L"+O.w+","+O.h+"Z",D=!1,I=F.append("path").attr("class","zoombox").style({fill:C>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",z),P=F.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),p()}function e(t,e){return 1-e/O.h}function r(t,e){return 1-(t+(O.h-e)/Math.sqrt(3))/O.w}function n(t,e){return(t-(O.h-e)/Math.sqrt(3))/O.w}function a(t,i){var a=x+t,o=w+i,s=Math.max(0,Math.min(1,e(x,w),e(a,o))),l=Math.max(0,Math.min(1,r(x,w),r(a,o))),u=Math.max(0,Math.min(1,n(x,w),n(a,o))),c=(s/2+u)*O.w,h=(1-s/2-l)*O.w,f=(c+h)/2,d=h-c,p=(1-s)*O.h,m=p-d/_;d.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),P.transition().style("opacity",1).duration(200),D=!0)}function c(t,e){if(L===S)return 2===e&&g(),i(j);i(j);var r={};r[O.id+".aaxis.min"]=L.a,r[O.id+".baxis.min"]=L.b,r[O.id+".caxis.min"]=L.c,s.relayout(j,r),T&&j.data&&j._context.showTips&&(l.notifier("Double-click to
zoom back out","long"),T=!1)}function h(){S={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=S}function f(t,e){var r=t/O.xaxis._m,n=e/O.yaxis._m;L={a:S.a-n,b:S.b+(r+n)/2,c:S.c-(r-n)/2};var i=[L.a,L.b,L.c].sort(),a={a:i.indexOf(L.a),b:i.indexOf(L.b),c:i.indexOf(L.c)};i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),L={a:i[a.a],b:i[a.b],c:i[a.c]},e=(S.a-L.a)*O.yaxis._m,t=(S.c-L.c-S.b+L.b)*O.xaxis._m);var o="translate("+(O.x0+t)+","+(O.y0+e)+")";O.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",o),O.aaxis.range=[L.a,O.sum-L.b-L.c],O.baxis.range=[O.sum-L.a-L.c,L.b],O.caxis.range=[O.sum-L.a-L.b,L.c],O.drawAxes(!1),O.plotContainer.selectAll(".crisp").classed("crisp",!1)}function d(t,e){if(t){var r={};r[O.id+".aaxis.min"]=L.a,r[O.id+".baxis.min"]=L.b,r[O.id+".caxis.min"]=L.c,s.relayout(j,r)}else 2===e&&g()}function p(){O.plotContainer.selectAll(".select-outline").remove()}function g(){var t={};t[O.id+".aaxis.min"]=0,t[O.id+".baxis.min"]=0,t[O.id+".caxis.min"]=0,j.emit("plotly_doubleclick",null),s.relayout(j,t)}var x,w,S,E,L,C,z,D,I,P,O=this,R=O.layers.plotbg.select("path").node(),j=O.graphDiv,F=O.layers.zoom,N={element:R,gd:j,plotinfo:{plot:F},doubleclick:g,subplot:O.id,prepFn:function(e,r,n){N.xaxes=[O.xaxis],N.yaxes=[O.yaxis];var i=j._fullLayout.dragmode;e.shiftKey&&(i="pan"===i?"zoom":"pan"),N.minDrag="lasso"===i?1:void 0,"zoom"===i?(N.moveFn=a,N.doneFn=c,t(e,r,n)):"pan"===i?(N.moveFn=f,N.doneFn=d,h(),p()):"select"!==i&&"lasso"!==i||v(e,r,n,N,i)}};R.onmousemove=function(t){b.hover(j,t,O.id),j._fullLayout._lasthover=R,j._fullLayout._hoversubplot=O.id},R.onmouseout=function(t){j._dragging||m.unhover(j,t)},R.onclick=function(t){b.click(j,t)},m.init(N)}},{"../../components/color":585,"../../components/dragelement":606,"../../components/drawing":608,"../../components/titles":661,"../../lib":690,"../../lib/extend":682,"../../plotly":724,"../cartesian/axes":729,"../cartesian/constants":734,"../cartesian/graph_interact":738,"../cartesian/select":745,"../cartesian/set_convert":746,"../plots":792,d3:114,tinycolor2:521}],807:[function(t,e,r){"use strict";function n(t){if(t.layoutAttributes){var e=t.layoutAttributes._arrayAttrRegexps;if(e)for(var n=0;n-1}var a=t("../lib"),o=t("../plots/plots"),s=a.extendFlat,l=a.extendDeep;e.exports=function(t,e){t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var r,a=t.data,u=t.layout,c=l([],a),h=l({},u,n(e.tileClass));if(e.width&&(h.width=e.width),e.height&&(h.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){h.annotations=[];var f=Object.keys(h);for(r=0;r0&&A>0,N=M<=R&&A<=j,B=M<=j&&A<=R,U="h"===v?R>=M*(j/A):j>=A*(R/M);F&&(N||B||U)?b="inside":(b="outside",x.remove(),x=null)}else b="inside";if(!x&&(x=m(e,y,"outside"===b?E:S),_=k.bBox(x.node()),M=_.width,A=_.height,M<=0||A<=0))return void x.remove();var V;V="outside"===b?a(o,f,d,p,_,v):i(o,f,d,p,_,v),x.attr("transform",V)}}}function i(t,e,r,n,i,a){var s,l,u,c,h,f=i.width,d=i.height,p=(i.left+i.right)/2,m=(i.top+i.bottom)/2,g=Math.abs(e-t),v=Math.abs(n-r);g>2*D&&v>2*D?(h=D,g-=2*h,v-=2*h):h=0;var y,b;return f<=g&&d<=v?(y=!1,b=1):f<=v&&d<=g?(y=!0,b=1):fr?(u=(t+e)/2,c=n-h-l/2):(u=(t+e)/2,c=n+h+l/2),o(p,m,u,c,b,y)}function a(t,e,r,n,i,a){var s,l="h"===a?Math.abs(n-r):Math.abs(e-t);l>2*D&&(s=D,l-=2*s);var u,c,h,f,d="h"===a?Math.min(1,l/i.height):Math.min(1,l/i.width),p=(i.left+i.right)/2,m=(i.top+i.bottom)/2;return u=d*i.width,c=d*i.height,"h"===a?er?(h=(t+e)/2,f=n+s+c/2):(h=(t+e)/2,f=n-s-c/2),o(p,m,h,f,d,!1)}function o(t,e,r,n,i,a){var o,s;return i<1?o="scale("+i+") ":(i=1,o=""),s=a?"rotate("+a+" "+t+" "+e+") ":"","translate("+(r-i*t)+" "+(n-i*e)+")"+o+s}function s(t,e){var r=d(t.text,e);return p(S,r)}function l(t,e){var r=d(t.textposition,e);return m(E,r)}function u(t,e,r){return f(L,t.textfont,e,r)}function c(t,e,r){return f(C,t.insidetextfont,e,r)}function h(t,e,r){return f(z,t.outsidetextfont,e,r)}function f(t,e,r,n){e=e||{};var i=d(e.family,r),a=d(e.size,r),o=d(e.color,r);return{family:p(t.family,i,n.family),size:g(t.size,a,n.size),color:v(t.color,o,n.color)}}function d(t,e){var r;return Array.isArray(t)?ei))return e}return void 0!==r?r:t.dflt}function v(t,e,r){return x(e).isValid()?e:void 0!==r?r:t.dflt}var y=t("d3"),b=t("fast-isnumeric"),x=t("tinycolor2"),_=t("../../lib"),w=t("../../lib/svg_text_utils"),M=t("../../components/color"),k=t("../../components/drawing"),A=t("../../components/errorbars"),T=t("./attributes"),S=T.text,E=T.textposition,L=T.textfont,C=T.insidetextfont,z=T.outsidetextfont,D=3;e.exports=function(t,e,r){var i=e.xaxis,a=e.yaxis,o=t._fullLayout,s=e.plot.select(".barlayer").selectAll("g.trace.bars").data(r);s.enter().append("g").attr("class","trace bars"),s.append("g").attr("class","points").each(function(e){var r=e[0].t,s=e[0].trace,l=r.poffset,u=Array.isArray(l);y.select(this).selectAll("g.point").data(_.identity).enter().append("g").classed("point",!0).each(function(r,c){function h(t){return 0===o.bargap&&0===o.bargroupgap?y.round(Math.round(t)-A,2):t}function f(t,e){return Math.abs(t-e)>=2?h(t):t>e?Math.ceil(t):Math.floor(t)}var d,p,m,g,v=r.p+(u?l[c]:l),x=v+r.w,_=r.b,w=_+r.s;if("h"===s.orientation?(m=a.c2p(v,!0),g=a.c2p(x,!0),d=i.c2p(_,!0),p=i.c2p(w,!0)):(d=i.c2p(v,!0),p=i.c2p(x,!0),m=a.c2p(_,!0),g=a.c2p(w,!0)),!(b(d)&&b(p)&&b(m)&&b(g)&&d!==p&&m!==g))return void y.select(this).remove();var k=(r.mlw+1||s.marker.line.width+1||(r.trace?r.trace.marker.line.width:0)+1)-1,A=y.round(k/2%1,2);if(!t._context.staticPlot){var T=M.opacity(r.mc||s.marker.color),S=T<1||k>.01?h:f;d=S(d,p),p=S(p,d),m=S(m,g),g=S(g,m)}var E=y.select(this);E.append("path").attr("d","M"+d+","+m+"V"+g+"H"+p+"V"+m+"Z"),n(t,E,e,c,d,p,m,g)})}),s.call(A.plot,e)}},{"../../components/color":585,"../../components/drawing":608,"../../components/errorbars":614,"../../lib":690,"../../lib/svg_text_utils":709,"./attributes":817,d3:114,"fast-isnumeric":123,tinycolor2:521}],825:[function(t,e,r){"use strict";function n(t,e,r,n){if(n.length){var s,l,u,c,h,f=t._fullLayout.barmode,d="overlay"===f,p="group"===f;if(d)i(t,e,r,n);else if(p){for(s=[],l=[],u=0;uu+s||!y(l))&&(h=!0,f(c,t))}for(var i=r.traces,a=v(e),o="fraction"===t._fullLayout.barnorm?1:100,s=o/1e9,l=e.l2c(e.c2l(0)),u="stack"===t._fullLayout.barmode?o:l,c=[l,u],h=!1,d=0;d1||0===s.bargap&&0===s.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(t){var e=t[0].trace,r=e.marker,o=r.line,s=a.tryColorscale(r,""),l=a.tryColorscale(r,"line");n.select(this).selectAll("path").each(function(t){var e,a,u=(t.mlw+1||o.width+1)-1,c=n.select(this);e="mc"in t?t.mcc=s(t.mc):Array.isArray(r.color)?i.defaultLine:r.color,c.style("stroke-width",u+"px").call(i.fill,e),u&&(a="mlc"in t?t.mlcc=l(t.mlc):Array.isArray(o.color)?i.defaultLine:o.color,c.call(i.stroke,a))})}),e.call(o.style)}},{"../../components/color":585,"../../components/drawing":608,"../../components/errorbars":614,d3:114}],828:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),i(t,"marker")&&a(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width")}},{"../../components/color":585,"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598}],829:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../components/color/attributes"),a=t("../../lib/extend").extendFlat,o=n.marker,s=o.line;e.exports={y:{valType:"data_array"},x:{valType:"data_array"},x0:{valType:"any"},y0:{valType:"any"},xcalendar:n.xcalendar,ycalendar:n.ycalendar,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1},jitter:{valType:"number",min:0,max:1},pointpos:{valType:"number",min:-2,max:2},orientation:{valType:"enumerated",values:["v","h"]},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)"},symbol:a({},o.symbol,{arrayOk:!1}),opacity:a({},o.opacity,{arrayOk:!1,dflt:1}),size:a({},o.size,{arrayOk:!1}),color:a({},o.color,{arrayOk:!1}),line:{color:a({},s.color,{arrayOk:!1,dflt:i.defaultLine}),width:a({},s.width,{arrayOk:!1,dflt:0}),outliercolor:{valType:"color"},outlierwidth:{valType:"number",min:0,dflt:1}}},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2}},fillcolor:n.fillcolor}},{"../../components/color/attributes":584,"../../lib/extend":682,"../scatter/attributes":947}],830:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/cartesian/axes");e.exports=function(t,e){ -var r,o,s,l,u,c,h,f,d,p=a.getFromId(t,e.xaxis||"x"),m=a.getFromId(t,e.yaxis||"y"),g=e.orientation,v=[];"h"===g?(r=p,o="x",u=m,c="y"):(r=m,o="y",u=p,c="x"),s=r.makeCalcdata(e,o),a.expand(r,s,{padded:!0}),h=function(t,e,r,a,o){var s;return r in e?h=a.makeCalcdata(e,r):(s=r+"0"in e?e[r+"0"]:"name"in e&&("category"===a.type||n(e.name)&&-1!==["linear","log"].indexOf(a.type)||i.isDateTime(e.name)&&"date"===a.type)?e.name:t.numboxes,s=a.d2c(s,0,e[r+"calendar"]),h=o.map(function(){return s})),h}(t,e,c,u,s);var y=i.distinctVals(h);return f=y.vals,d=y.minDiff/2,l=function(t,e,r,a,o){var s,l,u,c,h=a.length,f=e.length,d=[],p=[];for(s=0;s=0&&u1,m=r.dPos*(1-c.boxgap)*(1-c.boxgroupgap)/(p?t.numboxes:1),g=p?2*r.dPos*((r.boxnum+.5)/t.numboxes-.5)*(1-c.boxgap):0,v=m*d.whiskerwidth;if(!0!==d.visible||r.emptybox)return void a.select(this).remove();"h"===d.orientation?(l=f,u=h):(l=h,u=f),r.bPos=g,r.bdPos=m,n(),a.select(this).selectAll("path.box").data(o.identity).enter().append("path").attr("class","box").each(function(t){var e=l.c2p(t.pos+g,!0),r=l.c2p(t.pos+g-m,!0),n=l.c2p(t.pos+g+m,!0),i=l.c2p(t.pos+g-v,!0),s=l.c2p(t.pos+g+v,!0),c=u.c2p(t.q1,!0),h=u.c2p(t.q3,!0),f=o.constrain(u.c2p(t.med,!0),Math.min(c,h)+1,Math.max(c,h)-1),p=u.c2p(!1===d.boxpoints?t.min:t.lf,!0),y=u.c2p(!1===d.boxpoints?t.max:t.uf,!0);"h"===d.orientation?a.select(this).attr("d","M"+f+","+r+"V"+n+"M"+c+","+r+"V"+n+"H"+h+"V"+r+"ZM"+c+","+e+"H"+p+"M"+h+","+e+"H"+y+(0===d.whiskerwidth?"":"M"+p+","+i+"V"+s+"M"+y+","+i+"V"+s)):a.select(this).attr("d","M"+r+","+f+"H"+n+"M"+r+","+c+"H"+n+"V"+h+"H"+r+"ZM"+e+","+c+"V"+p+"M"+e+","+h+"V"+y+(0===d.whiskerwidth?"":"M"+i+","+p+"H"+s+"M"+i+","+y+"H"+s))}),d.boxpoints&&a.select(this).selectAll("g.points").data(function(t){return t.forEach(function(t){t.t=r,t.trace=d}),t}).enter().append("g").attr("class","points").selectAll("path").data(function(t){var e,r,n,a,s,l,u,c="all"===d.boxpoints?t.val:t.val.filter(function(e){return et.uf}),h=Math.max((t.max-t.min)/10,t.q3-t.q1),f=1e-9*h,p=.01*h,v=[],y=0;if(d.jitter){if(0===h)for(y=1,v=new Array(c.length),e=0;et.lo&&(n.so=!0),n})}).enter().append("path").call(s.translatePoints,h,f),d.boxmean&&a.select(this).selectAll("path.mean").data(o.identity).enter().append("path").attr("class","mean").style("fill","none").each(function(t){var e=l.c2p(t.pos+g,!0),r=l.c2p(t.pos+g-m,!0),n=l.c2p(t.pos+g+m,!0),i=u.c2p(t.mean,!0),o=u.c2p(t.mean-t.sd,!0),s=u.c2p(t.mean+t.sd,!0);"h"===d.orientation?a.select(this).attr("d","M"+i+","+r+"V"+n+("sd"!==d.boxmean?"":"m0,0L"+o+","+e+"L"+i+","+r+"L"+s+","+e+"Z")):a.select(this).attr("d","M"+r+","+i+"H"+n+("sd"!==d.boxmean?"":"m0,0L"+e+","+o+"L"+r+","+i+"L"+e+","+s+"Z"))})})}},{"../../components/drawing":608,"../../lib":690,d3:114}],837:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/cartesian/axes"),a=t("../../lib");e.exports=function(t,e){var r,o,s,l,u=t._fullLayout,c=e.xaxis,h=e.yaxis,f=["v","h"];for(o=0;ol&&(e.z=c.slice(0,l)),s("locationmode"),s("text"),s("marker.line.color"),s("marker.line.width"),i(t,e,o,s,{prefix:"",cLetter:"z"}),s("hoverinfo",1===o._dataLength?"location+z+text":void 0)}},{"../../components/colorscale/defaults":594,"../../lib":690,"./attributes":843}],846:[function(t,e,r){"use strict";e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],847:[function(t,e,r){"use strict";function n(t,e,r,n){var o=e.hoverinfo,s="all"===o?a.hoverinfo.flags:o.split("+"),l=-1!==s.indexOf("name"),u=-1!==s.indexOf("location"),c=-1!==s.indexOf("z"),h=-1!==s.indexOf("text"),f=!l&&u,d=[];f?t.nameOverride=r.id:(l&&(t.nameOverride=e.name),u&&d.push(r.id)),c&&d.push(function(t){return i.tickText(n,n.c2l(t),"hover").text}(r.z)),h&&d.push(r.tx),t.extraText=d.join("
")}var i=t("../../plots/cartesian/axes"),a=t("./attributes");e.exports=function(t){var e=t.cd,r=e[0].trace,i=t.subplot,a=i.choroplethHoverPt;if(a){var o=i.projection(a.properties.ct);return t.x0=t.x1=o[0],t.y0=t.y1=o[1],t.index=a.index,t.location=a.id,t.z=a.z,n(t,r,a,i.mockAxis),[t]}}},{"../../plots/cartesian/axes":729,"./attributes":843}],848:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../heatmap/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="choropleth",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","noOpacity"],n.meta={},e.exports=n},{"../../plots/geo":757,"../heatmap/colorbar":868,"./attributes":843,"./calc":844,"./defaults":845,"./event_data":846,"./hover":847,"./plot":849}],849:[function(t,e,r){"use strict";function n(t,e){for(var r,n=[],i=t.locations,a=i.length,o=u(t,e),s=(t.marker||{}).line||{},l=0;l0&&(n[0].trace=t),n}function i(t){t.framework.selectAll("g.trace.choropleth").each(function(t){var e=t[0].trace,r=a.select(this),n=e.marker||{},i=n.line||{},u=l.makeColorScaleFunc(l.extractScale(e.colorscale,e.zmin,e.zmax));r.selectAll("path.choroplethlocation").each(function(t){a.select(this).attr("fill",function(t){return u(t.z)}).call(o.stroke,t.mlc||i.color).call(s.dashLine,"",t.mlw||i.width||0)})})}var a=t("d3"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("../../components/colorscale"),u=t("../../lib/topojson_utils").getTopojsonFeatures,c=t("../../lib/geo_location_utils").locationToFeature,h=t("../../lib/array_to_calc_item"),f=t("../../plots/geo/constants");e.exports=function(t,e,r){function o(t){return t[0].trace.uid}var s,l=t.framework,u=l.select("g.choroplethlayer"),c=l.select("g.baselayer"),h=l.select("g.baselayeroverchoropleth"),d=f.baseLayersOverChoropleth,p=u.selectAll("g.trace.choropleth").data(e,o);p.enter().append("g").attr("class","trace choropleth"),p.exit().remove(),p.each(function(e){var r=e[0].trace,i=n(r,t.topojson),o=a.select(this).selectAll("path.choroplethlocation").data(i);o.enter().append("path").classed("choroplethlocation",!0).on("mouseover",function(e){t.choroplethHoverPt=e}).on("mouseout",function(){t.choroplethHoverPt=null}),o.exit().remove()}),h.selectAll("*").remove();for(var m=0;ms.end&&(s.start=s.end=(s.start+s.end)/2),e._input.contours||(e._input.contours={}),a(e._input.contours,{start:s.start,end:s.end,size:s.size}),e._input.autocontour=!0}else{var u=s.start,c=s.end,h=e._input.contours;if(u>c&&(s.start=h.start=c,c=s.end=h.end=u,u=s.start),!(s.size>0)){var f;f=u===c?1:n(u,c,e.ncontours).dtick,h.size=s.size=f}}return r}},{"../../lib":690,"../../plots/cartesian/axes":729,"../heatmap/calc":866}],852:[function(t,e,r){"use strict";var n=t("../../plots/plots"),i=t("../../components/colorbar/draw"),a=t("./make_color_map"),o=t("./end_plus");e.exports=function(t,e){var r=e[0].trace,s="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+s).remove(),!1===r.showscale)return void n.autoMargin(t,s);var l=i(t,s);e[0].t.cb=l;var u=r.contours,c=r.line,h=u.size||1,f=u.coloring,d=a(r,{isColorbar:!0});"heatmap"===f&&l.filllevels({start:r.zmin,end:r.zmax,size:(r.zmax-r.zmin)/254}),l.fillcolor("fill"===f||"heatmap"===f?d:"").line({color:"lines"===f?d:c.color,width:!1!==u.showlines?c.width:0,dash:c.dash}).levels({start:u.start,end:o(u),size:h}).options(r.colorbar)()}},{"../../components/colorbar/draw":588,"../../plots/plots":792,"./end_plus":856,"./make_color_map":860}],853:[function(t,e,r){"use strict";e.exports.BOTTOMSTART=[1,9,13,104,713],e.exports.TOPSTART=[4,6,7,104,713],e.exports.LEFTSTART=[8,12,14,208,1114],e.exports.RIGHTSTART=[2,3,11,208,1114],e.exports.NEWDELTA=[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],e.exports.CHOOSESADDLE={104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},e.exports.SADDLEREMAINDER={1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11}},{}],854:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){var a,o=n.coerce2(t,e,i,"contours.start"),s=n.coerce2(t,e,i,"contours.end"),l=!1===o||!1===s,u=r("contours.size");!(a=l?e.autocontour=!0:r("autocontour",!1))&&u||r("ncontours")}},{"../../lib":690,"./attributes":850}],855:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../heatmap/has_columns"),a=t("../heatmap/xyz_defaults"),o=t("./contours_defaults"),s=t("./style_defaults"),l=t("./attributes");e.exports=function(t,e,r,u){function c(r,i){return n.coerce(t,e,l,r,i)}if(!a(t,e,c,u))return void(e.visible=!1);c("text"),c("connectgaps",i(e)),o(t,e,c),s(t,e,c,u)}},{"../../lib":690,"../heatmap/has_columns":872,"../heatmap/xyz_defaults":880,"./attributes":850,"./contours_defaults":854,"./style_defaults":864}],856:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],857:[function(t,e,r){"use strict";function n(t,e){return Math.abs(t[0]-e[0])<.01&&Math.abs(t[1]-e[1])<.01}function i(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}function a(t,e,r){function a(t){return m[t%m.length]}var c,h=e.join(","),f=h,d=t.crossings[f],p=o(d,r,e),m=[s(t,e,[-p[0],-p[1]])],g=p.join(","),v=t.z.length,y=t.z[0].length;for(c=0;c<1e4;c++){if(d>20?(d=u.CHOOSESADDLE[d][(p[0]||p[1])<0?0:1],t.crossings[f]=u.SADDLEREMAINDER[d]):delete t.crossings[f],!(p=u.NEWDELTA[d])){l.log("Found bad marching index:",d,e,t.level);break}m.push(s(t,e,p)),e[0]+=p[0],e[1]+=p[1],n(m[m.length-1],m[m.length-2])&&m.pop(),f=e.join(",");var b=p[0]&&(e[0]<0||e[0]>y-2)||p[1]&&(e[1]<0||e[1]>v-2);if(f===h&&p.join(",")===g||r&&b)break;d=t.crossings[f]}1e4===c&&l.log("Infinite loop in contour?");var x,_,w,M,k,A,T,S=n(m[0],m[m.length-1]),E=0,L=.2*t.smoothing,C=[],z=0;for(c=1;c=z;c--)if((x=C[c])=z&&x+C[_]20&&e?208===t||1114===t?n=0===r[0]?1:-1:i=0===r[1]?1:-1:-1!==u.BOTTOMSTART.indexOf(t)?i=1:-1!==u.LEFTSTART.indexOf(t)?n=1:-1!==u.TOPSTART.indexOf(t)?i=-1:n=-1,[n,i]}function s(t,e,r){var n=e[0]+Math.max(r[0],0),i=e[1]+Math.max(r[1],0),a=t.z[i][n],o=t.xaxis,s=t.yaxis;if(r[1]){var l=(t.level-a)/(t.z[i][n+1]-a);return[o.c2p((1-l)*t.x[n]+l*t.x[n+1],!0),s.c2p(t.y[i],!0)]}var u=(t.level-a)/(t.z[i+1][n]-a);return[o.c2p(t.x[n],!0),s.c2p((1-u)*t.y[i]+u*t.y[i+1],!0)]}var l=t("../../lib"),u=t("./constants");e.exports=function(t){var e,r,n,i,o;for(n=0;nt?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);if(5===r||10===r){return t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208}return 15===r?0:r}var i=t("./constants");e.exports=function(t){var e,r,a,o,s,l,u,c,h,f=t[0].z,d=f.length,p=f[0].length,m=2===d||2===p;for(r=0;r1e3){d.warn("Too many contours, clipping at 1000",t);break}return i}function a(t,e,r){var n=t.plot.select(".maplayer").selectAll("g.contour."+r).data(e);return n.enter().append("g").classed("contour",!0).classed(r,!0),n.exit().remove(),n}function o(t,e,r){var n=t.selectAll("g.contourbg").data([0]);n.enter().append("g").classed("contourbg",!0);var i=n.selectAll("path").data("fill"===r.coloring?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+e.join("L")+"Z").style("stroke","none")}function s(t,e,r,n){var i=t.selectAll("g.contourfill").data([0]);i.enter().append("g").classed("contourfill",!0);var a=i.selectAll("path").data("fill"===n.coloring?e:[]);a.enter().append("path"),a.exit().remove(),a.each(function(t){var e=l(t,r);e?f.select(this).attr("d",e).style("stroke","none"):f.select(this).remove()})}function l(t,e){function r(t){return Math.abs(t[0]-e[2][0])<.01}for(var n,i,a,o,s,l,u=Math.min(t.z[0][0],t.z[0][1]),c=t.edgepaths.length||u<=t.level?"":"M"+e.join("L")+"Z",h=0,f=t.edgepaths.map(function(t,e){return e}),m=!0;f.length;){for(l=p.smoothopen(t.edgepaths[h],t.smoothing),c+=m?l:l.replace(/^M/,"L"),f.splice(f.indexOf(h),1),n=t.edgepaths[h][t.edgepaths[h].length-1],o=-1,a=0;a<4;a++){if(!n){d.log("Missing end?",h,t);break}for(!function(t){return Math.abs(t[1]-e[0][1])<.01}(n)||r(n)?!function(t){return Math.abs(t[0]-e[0][0])<.01}(n)?!function(t){return Math.abs(t[1]-e[2][1])<.01}(n)?r(n)&&(i=e[2]):i=e[3]:i=e[0]:i=e[1],s=0;s=0&&(i=g,o=s):Math.abs(n[1]-i[1])<.01?Math.abs(n[1]-g[1])<.01&&(g[0]-n[0])*(i[0]-g[0])>=0&&(i=g,o=s):d.log("endpt to newendpt is not vert. or horz.",n,i,g)}if(n=i,o>=0)break;c+="L"+i}if(o===t.edgepaths.length){d.log("unclosed perimeter path");break}h=o,m=-1===f.indexOf(h),m&&(h=f[0],c+="Z")}for(h=0;hz){r("x scale is not linear");break}}if(y.length&&"fast"===E){var D=(y[y.length-1]-y[0])/(y.length-1),I=Math.abs(D/100);for(w=0;wI){r("y scale is not linear");break}}}var P=c(_),O="scaled"===e.xtype?"":m,R=p(e,O,g,v,P,M),j="scaled"===e.ytype?"":y,F=p(e,j,b,x,_.length,k);S||(a.expand(M,R),a.expand(k,F));var N={x:R,y:F,z:_,text:e.text};if(s(e,_,"","z"),A&&e.contours&&"heatmap"===e.contours.coloring){var B={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};N.xfill=p(B,O,g,v,P,M),N.yfill=p(B,j,b,x,_.length,k)}return[N]}},{"../../components/colorscale/calc":591,"../../lib":690,"../../plots/cartesian/axes":729,"../../registry":807,"../histogram2d/calc":894,"./clean_2d_array":867,"./convert_column_xyz":869,"./find_empties":871,"./has_columns":872,"./interp2d":875,"./make_bound_array":876,"./max_row_length":877}],867:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){var r,i,a,o,s,l;if(e){for(r=0,s=0;s=0;o--)a=f[o],r=a[0],i=a[1],(s=((h[[r-1,i]]||m)[2]+(h[[r+1,i]]||m)[2]+(h[[r,i-1]]||m)[2]+(h[[r,i+1]]||m)[2])/20)&&(l[a]=[r,i,s],f.splice(o,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(a in l)h[a]=l[a],c.push(l[a])}return c.sort(function(t,e){return e[2]-t[2]})}},{"./max_row_length":877}],872:[function(t,e,r){"use strict";e.exports=function(t){return!Array.isArray(t.z[0])}},{}],873:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/graph_interact"),i=t("../../lib"),a=t("../../plots/cartesian/constants").MAXDIST;e.exports=function(t,e,r,o,s){if(!(t.distance=y[0].length||h<0||h>y.length)return}else{if(n.inbox(e-g[0],e-g[g.length-1])>a||n.inbox(r-v[0],r-v[v.length-1])>a)return;if(s){var w;for(x=[2*g[0]-g[1]],w=1;wm&&(v=Math.max(v,Math.abs(t[i][a]-p)/(g-m))))}return v}var a=t("../../lib"),o=[[-1,0],[1,0],[0,-1],[0,1]];e.exports=function(t,e,r){var o,s,l=1;if(Array.isArray(r))for(o=0;o.01;o++)l=i(t,e,n(l));return l>.01&&a.log("interp2d didn't converge quickly",l),t}},{"../../lib":690}],876:[function(t,e,r){"use strict";var n=t("../../registry");e.exports=function(t,e,r,i,a,o){var s,l,u,c=[],h=n.traceIs(t,"contour"),f=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(Array.isArray(e)&&e.length>1&&!f&&"category"!==o.type){var p=e.length;if(!(p<=a))return h?e.slice(0,a):e.slice(0,a+1);if(h||d)c=e.slice(0,a);else if(1===a)c=[e[0]-.5,e[0]+.5];else{for(c=[1.5*e[0]-.5*e[1]],u=1;u0;)b=p.c2p(A[M]),M--;for(b0;)w=m.c2p(T[M]),M--;if(w<_&&(x=_,_=w,w=x,D=!0),S&&(A=r[0].xfill,T=r[0].yfill),"fast"!==E){var I="best"===E?0:.5;y=Math.max(-I*p._length,y),b=Math.min((1+I)*p._length,b),_=Math.max(-I*m._length,_),w=Math.min((1+I)*m._length,w)}var P=Math.round(b-y),O=Math.round(w-_),R=P<=0||O<=0,j=e.plot.select(".imagelayer").selectAll("g.hm."+v).data(R?[]:[0]);if(j.enter().append("g").classed("hm",!0).classed(v,!0),j.exit().remove(),!R){var F,N;"fast"===E?(F=C,N=L):(F=P,N=O);var B=document.createElement("canvas");B.width=F,B.height=N;var U,V,q=B.getContext("2d"),H=s.makeColorScaleFunc(s.extractScale(f.colorscale,f.zmin,f.zmax),{noNumericCheck:!0,returnArray:!0});"fast"===E?(U=z?function(t){return C-1-t}:o.identity,V=D?function(t){return L-1-t}:o.identity):(U=function(t){return o.constrain(Math.round(p.c2p(A[t])-y),0,P)},V=function(t){return o.constrain(Math.round(m.c2p(T[t])-_),0,O)});var Y,G,X,W,Z,J,K,Q=V(0),$=[Q,Q],tt=z?0:1,et=D?0:1,rt=0,nt=0,it=0,at=0;if(E){var ot,st=0;try{ot=new Uint8Array(P*O*4)}catch(t){ot=new Array(P*O*4)}if("best"===E){var lt,ut,ct,ht=new Array(A.length),ft=new Array(T.length),dt=new Array(P);for(M=0;M0&&a0&&s0&&(n=!0);for(var s=0;sa){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]=0;a--)i(a);else if("increasing"===e){for(a=1;a=0;a--)t[a]+=t[a+1];"exclude"===r&&(t.push(0),t.shift())}}var i=t("fast-isnumeric"),a=t("../../lib"),o=t("../../plots/cartesian/axes"),s=t("../bar/arrays_to_calcdata"),l=t("./bin_functions"),u=t("./norm_functions"),c=t("./average"),h=t("./clean_bins");e.exports=function(t,e){if(!0===e.visible){var r,f=[],d=[],p=o.getFromId(t,"h"===e.orientation?e.yaxis||"y":e.xaxis||"x"),m="h"===e.orientation?"y":"x",g={x:"y",y:"x"}[m],v=e[m+"calendar"],y=e.cumulative;h(e,p,m);var b,x=p.makeCalcdata(e,m),_=m+"bins";!1===e["autobin"+m]&&_ in e?b=e[_]:(b=o.autoBin(x,p,e["nbins"+m],!1,v),y.enabled&&"include"!==y.currentbin&&("decreasing"===y.direction?b.start=p.c2r(p.r2c(b.start)-b.size):b.end=p.c2r(p.r2c(b.end)+b.size)),e._input[_]=e[_]=b);var w,M,k,A="string"==typeof b.size,T=A?[]:b,S=[],E=[],L=0,C=e.histnorm,z=e.histfunc,D=-1!==C.indexOf("density");y.enabled&&D&&(C=C.replace(/ ?density$/,""),D=!1);var I,P="max"===z||"min"===z,O=P?null:0,R=l.count,j=u[C],F=!1,N=function(t){return p.r2c(t,0,v)};for(Array.isArray(e[g])&&"count"!==z&&(I=e[g],F="avg"===z,R=l[z]),r=N(b.start),M=N(b.end)+(r-o.tickIncrement(r,b.size,!1,v))/1e6;r=0&&kq;r--)if(d[r]){H=r;break}for(r=q;r<=H;r++)i(f[r])&&i(d[r])&&V.push({p:f[r],s:d[r],b:0});return s(V,e),V}}},{"../../lib":690,"../../plots/cartesian/axes":729,"../bar/arrays_to_calcdata":816,"./average":885,"./bin_functions":887,"./clean_bins":889,"./norm_functions":892,"fast-isnumeric":123}],889:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib").cleanDate,a=t("../../constants/numerical"),o=a.ONEDAY,s=a.BADNUM;e.exports=function(t,e,r){var a=e.type,l=r+"bins",u=t[l];u||(u=t[l]={});var c="date"===a?function(t){return t||0===t?i(t,s,u.calendar):null}:function(t){return n(t)?Number(t):null};u.start=c(u.start),u.end=c(u.end);var h="date"===a?o:1,f=u.size;if(n(f))u.size=f>0?Number(f):h;else if("string"!=typeof f)u.size=h;else{var d=f.charAt(0),p=f.substr(1);p=n(p)?Number(p):0,(p<=0||"date"!==a||"M"!==d||p!==Math.round(p))&&(u.size=h)}var m="autobin"+r;"boolean"!=typeof t[m]&&(t[m]=!((u.start||0===u.start)&&(u.end||0===u.end))),t[m]||delete t["nbins"+r]}},{"../../constants/numerical":672,"../../lib":690,"fast-isnumeric":123}],890:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../components/color"),o=t("./bin_defaults"),s=t("../bar/style_defaults"),l=t("../../components/errorbars/defaults"),u=t("./attributes");e.exports=function(t,e,r,c){function h(r,n){return i.coerce(t,e,u,r,n)}var f=h("x"),d=h("y");h("cumulative.enabled")&&(h("cumulative.direction"),h("cumulative.currentbin")),h("text");var p=h("orientation",d&&!f?"h":"v"),m=e["v"===p?"x":"y"];if(!m||!m.length)return void(e.visible=!1);n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],c),e["h"===p?"x":"y"]&&h("histfunc"),o(t,e,h,"h"===p?["y"]:["x"]),s(t,e,h,r,c),l(t,e,a.defaultLine,{axis:"y"}),l(t,e,a.defaultLine,{axis:"x",inherit:"y"})}},{"../../components/color":585,"../../components/errorbars/defaults":613,"../../lib":690,"../../registry":807,"../bar/style_defaults":828,"./attributes":884,"./bin_defaults":886}],891:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.layoutAttributes=t("../bar/layout_attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("../bar/layout_defaults"),n.calc=t("./calc"),n.setPositions=t("../bar/set_positions"),n.plot=t("../bar/plot"),n.style=t("../bar/style"),n.colorbar=t("../scatter/colorbar"),n.hoverPoints=t("../bar/hover"),n.moduleType="trace",n.name="histogram",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","bar","histogram","oriented","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":739,"../bar/hover":820,"../bar/layout_attributes":822,"../bar/layout_defaults":823,"../bar/plot":824,"../bar/set_positions":825,"../bar/style":827,"../scatter/colorbar":950,"./attributes":884,"./calc":888,"./defaults":890}],892:[function(t,e,r){"use strict";e.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;ik&&m.splice(k,m.length-k),v.length>k&&v.splice(k,v.length-k),!e.autobinx&&"xbins"in e||(e.xbins=i.autoBin(m,p,e.nbinsx,"2d",y),"histogram2dcontour"===e.type&&(e.xbins.start=w(i.tickIncrement(x(e.xbins.start),e.xbins.size,!0,y)),e.xbins.end=w(i.tickIncrement(x(e.xbins.end),e.xbins.size,!1,y))),e._input.xbins=e.xbins),!e.autobiny&&"ybins"in e||(e.ybins=i.autoBin(v,g,e.nbinsy,"2d",b),"histogram2dcontour"===e.type&&(e.ybins.start=M(i.tickIncrement(_(e.ybins.start),e.ybins.size,!0,b)),e.ybins.end=M(i.tickIncrement(_(e.ybins.end),e.ybins.size,!1,b))),e._input.ybins=e.ybins),f=[];var A,T,S=[],E=[],L="string"==typeof e.xbins.size,C="string"==typeof e.ybins.size,z=L?[]:e.xbins,D=C?[]:e.ybins,I=0,P=[],O=e.histnorm,R=e.histfunc,j=-1!==O.indexOf("density"),F="max"===R||"min"===R,N=F?null:0,B=a.count,U=o[O],V=!1,q=[],H=[],Y="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";Y&&"count"!==R&&(V="avg"===R,B=a[R]);var G=e.xbins,X=x(G.start),W=x(G.end)+(X-i.tickIncrement(X,G.size,!1,y))/1e6;for(d=X;d=0&&A=0&&T0)s=h(t.alphahull,l);else{var u=["x","y","z"].indexOf(t.delaunayaxis);s=c(l.map(function(t){return[t[(u+1)%3],t[(u+2)%3]]}))}var p={positions:l,cells:s,lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:d(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};t.intensity?(this.color="#fff",p.vertexIntensity=t.intensity,p.colormap=i(t.colorscale)):t.vertexcolor?(this.color=t.vertexcolors[0],p.vertexColors=a(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],p.cellColors=a(t.facecolor)):(this.color=t.color,p.meshColor=d(t.color)),this.mesh.update(p)},p.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=s},{"../../lib/str2rgbarray":708,"alpha-shape":37,"convex-hull":95,"delaunay-triangulate":115,"gl-mesh3d":196,tinycolor2:521}],903:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../components/colorbar/defaults"),o=t("./attributes");e.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function u(t){var e=t.map(function(t){var e=l(t);return e&&Array.isArray(e)?e:null});return e.every(function(t){return t&&t.length===e[0].length})&&e}var c=u(["x","y","z"]),h=u(["i","j","k"]);if(!c)return void(e.visible=!1);h&&h.forEach(function(t){for(var e=0;ee}}},r.addRangeSlider=function(t,e){for(var r=!1,n=0;n1)){var h=o.simpleMap(c.x,e.d2c,0,r.xcalendar),f=o.distinctVals(h).minDiff;a=Math.min(a,f)}}for(a===1/0&&(a=1),u=0;u");_.push(o,o,o,o,o,o,null)}(L,d[L],p[L],m[L],g[L]));e.x=b,e.y=x,e.text=_}},{"../../lib":690,"../../plots/cartesian/axes":729,"../../plots/cartesian/axis_ids":732,"./helpers":908}],912:[function(t,e,r){"use strict";var n=t("../../components/colorscale/color_attributes"),i=t("../../components/colorbar/attributes"),a=t("../../components/colorscale/scales"),o=t("../../plots/cartesian/layout_attributes"),s=t("../../lib/extend").extendDeep,l=t("../../lib/extend").extendFlat;e.exports={domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},dimensions:{_isLinkedToArray:"dimension",label:{valType:"string"},tickvals:o.tickvals,ticktext:o.ticktext,tickformat:{valType:"string",dflt:"3s"},visible:{valType:"boolean",dflt:!0},range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},constraintrange:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},values:{valType:"data_array",dflt:[]}},line:l({},s({},n("line"),{colorscale:s({},n("line").colorscale,{dflt:a.Viridis}),autocolorscale:s({},n("line").autocolorscale,{dflt:!1})}),{showscale:{valType:"boolean",dflt:!1},colorbar:i})}},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/colorscale/scales":603,"../../lib/extend":682,"../../plots/cartesian/layout_attributes":740}],913:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plots/plots"),a=t("./plot"),o=t("../../constants/xmlns_namespaces"),s=t("./constants");r.name="parcoords",r.attr="type",r.plot=function(t){var e=i.getSubplotCalcData(t.calcdata,"parcoords","parcoords");e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords-line-layers").remove(),n._paperdiv.selectAll(".parcoords-line-layers").remove(),n._paperdiv.selectAll(".parcoords").remove(),n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){function e(e){var n=this,i=n.toDataURL("image/png"),a=r.append("svg:image"),l=t._fullLayout._size,u=t._fullData[e.model.key].domain;a.attr({xmlns:o.svg,"xlink:href":i,x:l.l+l.w*u.x[0]-s.overdrag,y:l.t+l.h*(1-u.y[1]),width:(u.x[1]-u.x[0])*l.w+2*s.overdrag,height:(u.y[1]-u.y[0])*l.h,preserveAspectRatio:"none"})}var r=t._fullLayout._glimages,i=n.selectAll(".svg-container");i.filter(function(t,e){return e===i.size()-1}).selectAll(".parcoords-lines.context, .parcoords-lines.focus").each(e),window.setTimeout(function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":674,"../../plots/plots":792,"./constants":916,"./plot":921,d3:114}],914:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/calc"),a=t("../../lib");e.exports=function(t,e){var r=!!e.line.colorscale&&a.isArray(e.line.color),o=r?e.line.color:Array.apply(0,Array(e.dimensions.reduce(function(t,e){return Math.max(t,e.values.length)},0))).map(function(){return.5}),s=r?e.line.colorscale:[[0,e.line.color],[1,e.line.color]];return n(e,"line")&&i(e,e.line.color,"line","c"),[{lineColor:o,cscale:s}]}},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"../../lib":690}],915:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../components/colorscale"),s=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,l=r.line,u="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===l||!l.showscale)return void a.autoMargin(t,u);var c=l.color,h=l.cmin,f=l.cmax;n(h)||(h=i.aggNums(Math.min,null,c)),n(f)||(f=i.aggNums(Math.max,null,c));var d=e[0].t.cb=s(t,u),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,h,f),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:h,end:f,size:(f-h)/254}).options(l.colorbar)()}},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],916:[function(t,e,r){"use strict";e.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,scatter:!1,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,capturewidth:10,fillcolor:"magenta",fillopacity:1,strokecolor:"white",strokeopacity:1,strokewidth:1,handleheight:16,handleopacity:1,handleoverlap:0}}},{}],917:[function(t,e,r){"use strict";function n(t,e,r,n,i){i("line.color",r),s(t,"line")&&a.isArray(t.line.color)?(i("line.colorscale"),l(t,e,n,i,{prefix:"line.",cLetter:"c"})):i("line.color",r)}function i(t,e){function r(t,e){return a.coerce(n,i,o.dimensions,t,e)}var n,i,s,l=t.dimensions||[],c=e.dimensions=[],h=1/0;for(l.length>u&&(a.log("parcoords traces support up to "+u+" dimensions at the moment"),l.splice(u)),s=0;s0);d&&(r("label"),r("tickvals"),r("ticktext"),r("tickformat"),r("range"),r("constraintrange"),h=Math.min(h,i.values.length)),i._index=s,c.push(i)}if(isFinite(h))for(s=0;sh&&(i.values=i.values.slice(0,h));return c}var a=t("../../lib"),o=t("./attributes"),s=t("../../components/colorscale/has_colorscale"),l=t("../../components/colorscale/defaults"),u=t("./constants").maxDimensionCount;e.exports=function(t,e,r,s){function l(r,n){return a.coerce(t,e,o,r,n)}var u=i(t,e);n(t,e,r,s,l),l("domain.x"),l("domain.y"),Array.isArray(u)&&u.length||(e.visible=!1)}},{"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598,"../../lib":690,"./attributes":912,"./constants":916}],918:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.calc=t("./calc"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.moduleType="trace",n.name="parcoords",n.basePlotModule=t("./base_plot"),n.categories=["gl","noOpacity"],n.meta={},e.exports=n},{"./attributes":912,"./base_plot":913,"./calc":914,"./colorbar":915,"./defaults":917,"./plot":921}],919:[function(t,e,r){"use strict";function n(t){t.read({x:0,y:0,width:1,height:1,data:x})}function i(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function a(t,e,r,a,o,s){function l(n){var c;c=Math.min(a,o-n*a),s.offset=v*n*a,s.count=v*c,0===n&&(window.cancelAnimationFrame(r.currentRafs[u]),delete r.currentRafs[u],i(t,s.scissorX,s.scissorY,s.scissorWidth,s.viewBoxSize[1])),r.clearOnly||(e(s),n*a+c>>8*e)%256/255}function u(t,e,r,n){for(var i=[],a=0;a=g-4?l(a,g-2-s):.5);return i}function c(t,e,r){var n,i,a,o=[];for(i=0;if&&(f=t[l].dim2.canvasX,c=l),t[l].dim1.canvasXi)return a;i=o,a=n[r]}return n[n.length-1]}function l(t,e,r){var n=o(r);return r.tickvals?_.scale.ordinal().domain(r.tickvals).range(r.tickvals.map(function(t){return(t-n[0])/(n[1]-n[0])}).map(function(r){return t-e+r*(e-(t-e))})):_.scale.linear().domain(n).range([t-e,e])}function u(t,e){return _.scale.linear().range([t-e,e])}function c(t){return _.scale.linear().domain(o(t))}function h(t){var e=o(t);return t.tickvals&&_.scale.ordinal().domain(t.tickvals).range(t.tickvals.map(function(t){return(t-e[0])/(e[1]-e[0])}))}function f(t){var e=t.map(function(t){return t[0]}),r=t.map(function(t){return t[1]}),n=r.map(function(t){return _.rgb(t)}),i=function(t){return function(e){return e[t]}},a="rgb".split("").map(function(t){return _.scale.linear().clamp(!0).domain(e).range(n.map(i(t)))});return function(t){return a.map(function(e){return e(t)})}}function d(t){return t[0]}function p(t,e,r){var n=d(e),i=n.trace,o=n.lineColor,s=n.cscale,l=i.line,u=i.domain,h=i.dimensions,p=t.width,m=x.extendDeep({},l,{color:o.map(c({values:o,range:[l.cmin,l.cmax]})),blockLineCount:b.blockLineCount,canvasOverdrag:b.overdrag*b.canvasPixelRatio}),g=Math.floor(p*(u.x[1]-u.x[0])),v=Math.floor(t.height*(u.y[1]-u.y[0])),y=t.margin||{l:80,r:80,t:100,b:80},_=g,w=v;return{key:r,colCount:h.filter(a).length,dimensions:h,tickDistance:b.tickDistance,unitToColor:f(s),lines:m,translateX:u.x[0]*p,translateY:t.height-u.y[1]*t.height,pad:y,canvasWidth:_*b.canvasPixelRatio+2*m.canvasOverdrag,canvasHeight:w*b.canvasPixelRatio,width:_,height:w,canvasPixelRatio:b.canvasPixelRatio}}function m(t){var e=t.width,r=t.height,n=t.dimensions,i=t.canvasPixelRatio,o=function(r){return e*r/Math.max(1,t.colCount-1)},s=b.verticalPadding/(r*i),f=1-2*s,d=function(t){return s+f*t},p={key:t.key,xScale:o,model:t},m={};return p.dimensions=n.filter(a).map(function(e,n){var a=c(e),s=m[e.label];return m[e.label]=(s||0)+1,{key:e.label+(s?"__"+s:""),label:e.label,tickFormat:e.tickformat,tickvals:e.tickvals,ticktext:e.ticktext,ordinal:!!e.tickvals,scatter:b.scatter||e.scatter,xIndex:n,crossfilterDimensionIndex:n,visibleIndex:e._index,height:r,values:e.values,paddedUnitValues:e.values.map(a).map(d),xScale:o,x:o(n),canvasX:o(n)*i,unitScale:u(r,b.verticalPadding),domainScale:l(r,b.verticalPadding,e),ordinalScale:h(e),domainToUnitScale:a,filter:e.constraintrange?e.constraintrange.map(a):[0,1],parent:p,model:t}}),p}function g(t){return b.layers.map(function(e){return{key:e,context:"contextLineLayer"===e,pick:"pickLineLayer"===e,viewModel:t,model:t.model}})}function v(t){t.classed("axisExtentText",!0).attr("text-anchor","middle").style("font-weight",100).style("font-size","10px").style("cursor","default").style("user-select","none")}var y=t("./lines"),b=t("./constants"),x=t("../../lib"),_=t("d3");e.exports=function(t,e,r,a,o){function l(t){var e=t.selectAll("defs").data(i,n);e.enter().append("defs");var r=e.selectAll("#filterBarPattern").data(i,n);r.enter().append("pattern").attr("id","filterBarPattern").attr("patternUnits","userSpaceOnUse"),r.attr("x",-b.bar.width).attr("width",b.bar.capturewidth).attr("height",function(t){return t.model.height});var a=r.selectAll("rect").data(i,n);a.enter().append("rect").attr("shape-rendering","crispEdges"),a.attr("height",function(t){return t.model.height}).attr("width",b.bar.width).attr("x",b.bar.width/2).attr("fill",b.bar.fillcolor).attr("fill-opacity",b.bar.fillopacity).attr("stroke",b.bar.strokecolor).attr("stroke-opacity",b.bar.strokeopacity).attr("stroke-width",b.bar.strokewidth)}function u(t){return t.dimensions.some(function(t){return 0!==t.filter[0]||1!==t.filter[1]})}function c(t,e){for(var r=e.panels||(e.panels=[]),n=t.each(function(t){return t})[e.key].map(function(t){return t.__data__}),i=n.length-1,a=0;a<1;a++)for(var o=0;o=r||s>=n)return;var l=t.lineLayer.readPixel(a,n-1-s),u=0!==l[3],c=u?l[2]+256*(l[1]+256*l[0]):null,h={x:a,y:s,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:c};c!==z&&(u?o.hover(h):o.unhover&&o.unhover(h),z=c)}}),L.style("margin",function(t){var e=t.model.pad;return e.t+"px "+e.r+"px "+e.b+"px "+e.l+"px"}).attr("width",function(t){return t.model.canvasWidth}).attr("height",function(t){return t.model.canvasHeight}).style("width",function(t){return t.model.width+2*b.overdrag+"px"}).style("height",function(t){return t.model.height+"px"}).style("opacity",function(t){return t.pick?.01:1}),e.style("background","rgba(255, 255, 255, 0)");var D=e.selectAll(".parcoords").data(S,n);D.exit().remove(),D.enter().append("g").classed("parcoords",!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","none").call(l),D.attr("width",function(t){return t.model.width+t.model.pad.l+t.model.pad.r}).attr("height",function(t){return t.model.height+t.model.pad.t+t.model.pad.b}).attr("transform",function(t){return"translate("+t.model.translateX+","+t.model.translateY+")"});var I=D.selectAll(".parcoordsControlView").data(i,n);I.enter().append("g").classed("parcoordsControlView",!0).style("box-sizing","content-box"),I.attr("transform",function(t){return"translate("+t.model.pad.l+","+t.model.pad.t+")"});var P=I.selectAll(".yAxis").data(function(t){return t.dimensions},n);P.enter().append("g").classed("yAxis",!0).each(function(t){C.dimensions.push(t)}),I.each(function(t){f(P,t)}),L.each(function(t){t.lineLayer=y(this,t.model.lines,t.model.canvasWidth,t.model.canvasHeight,t.viewModel.dimensions,t.viewModel.panels,t.model.unitToColor,t.context,t.pick,b.scatter),t.viewModel[t.key]=t.lineLayer,C.renderers.push(function(){t.lineLayer.render(t.viewModel.panels,!0)}),t.lineLayer.render(t.viewModel.panels,!t.context)}),P.attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),P.call(_.behavior.drag().origin(function(t){return t}).on("drag",function(t){var e=t.parent;T=!1,A||(t.x=Math.max(-b.overdrag,Math.min(t.model.width+b.overdrag,_.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,P.sort(function(t,e){return t.x-e.x}).each(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio}),f(P,e),P.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),_.select(this).attr("transform","translate("+t.x+", 0)"),P.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLineLayer&&e.contextLineLayer.render(e.panels,!1,!u(e)),e.focusLineLayer.render&&e.focusLineLayer.render(e.panels))}).on("dragend",function(t){var e=t.parent;if(A)return void("ending"===A&&(A=!1));t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,f(P,e),_.select(this).attr("transform",function(t){return"translate("+t.x+", 0)"}),e.contextLineLayer&&e.contextLineLayer.render(e.panels,!1,!u(e)),e.focusLineLayer&&e.focusLineLayer.render(e.panels),e.pickLineLayer&&e.pickLineLayer.render(e.panels,!0),T=!0,o&&o.axesMoved&&o.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),P.exit().remove();var O=P.selectAll(".axisOverlays").data(i,n);O.enter().append("g").classed("axisOverlays",!0),O.selectAll(".axis").remove();var R=O.selectAll(".axis").data(i,n);R.enter().append("g").classed("axis",!0),R.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,n=r.domain(),i=t.ticktext;_.select(this).call(_.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?n.map(function(t,e){return i&&i[e]||t}):null).tickFormat(t.ordinal?function(t){return t}:null).scale(r))}),R.selectAll(".domain, .tick").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),R.selectAll("text").style("font-weight",100).style("font-size","10px").style("fill","black").style("fill-opacity",1).style("stroke","none").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default").style("user-select","none");var j=O.selectAll(".axisHeading").data(i,n);j.enter().append("g").classed("axisHeading",!0);var F=j.selectAll(".axisTitle").data(i,n);F.enter().append("text").classed("axisTitle",!0).attr("text-anchor","middle").style("font-family","sans-serif").style("font-size","10px").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),F.attr("transform","translate(0,"+-b.axisTitleOffset+")").text(function(t){return t.label});var N=O.selectAll(".axisExtent").data(i,n);N.enter().append("g").classed("axisExtent",!0);var B=N.selectAll(".axisExtentTop").data(i,n);B.enter().append("g").classed("axisExtentTop",!0),B.attr("transform","translate(0,"+-b.axisExtentOffset+")");var U=B.selectAll(".axisExtentTopText").data(i,n);U.enter().append("text").classed("axisExtentTopText",!0).attr("alignment-baseline","after-edge").call(v),U.text(function(t){return x(t)(t.domainScale.domain().slice(-1)[0])});var V=N.selectAll(".axisExtentBottom").data(i,n);V.enter().append("g").classed("axisExtentBottom",!0),V.attr("transform",function(t){return"translate(0,"+(t.model.height+b.axisExtentOffset)+")"});var q=V.selectAll(".axisExtentBottomText").data(i,n);q.enter().append("text").classed("axisExtentBottomText",!0).attr("alignment-baseline","before-edge").call(v),q.text(function(t){return x(t)(t.domainScale.domain()[0])});var H=O.selectAll(".axisBrush").data(i,n),Y=H.enter().append("g").classed("axisBrush",!0);H.each(function(t){t.brush||(t.brush=_.svg.brush().y(t.unitScale).on("brushstart",w).on("brush",M).on("brushend",k),0===t.filter[0]&&1===t.filter[1]||t.brush.extent(t.filter),_.select(this).call(t.brush))}),Y.selectAll("rect").attr("x",-b.bar.capturewidth/2).attr("width",b.bar.capturewidth),Y.selectAll("rect.extent").attr("fill","url(#filterBarPattern)").style("cursor","ns-resize").filter(function(t){return 0===t.filter[0]&&1===t.filter[1]}).attr("y",-100),Y.selectAll(".resize rect").attr("height",b.bar.handleheight).attr("opacity",0).style("visibility","visible"),Y.selectAll(".resize.n rect").style("cursor","n-resize").attr("y",b.bar.handleoverlap-b.bar.handleheight),Y.selectAll(".resize.s rect").style("cursor","s-resize").attr("y",b.bar.handleoverlap);var G=!1,X=!1;return C}},{"../../lib":690,"./constants":916,"./lines":919,d3:114}],921:[function(t,e,r){"use strict";var n=t("./parcoords");e.exports=function(t,e){var r=t._fullLayout,i=r._paper,a=r._paperdiv,o={},s={},l=r._size;e.forEach(function(e,r){o[r]=t.data[r].dimensions,s[r]=t.data[r].dimensions.slice()});var u=function(e,r,n){var i=s[e][r],a=i.constraintrange;a&&2===a.length||(a=i.constraintrange=[]),a[0]=n[0],a[1]=n[1],t.emit("plotly_restyle")},c=function(e){t.emit("plotly_hover",e)},h=function(e){t.emit("plotly_unhover",e)},f=function(e,r){function n(t){return!("visible"in t)||t.visible}function i(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}var a=function(t){return function(e,n){return i(r,t,e)-i(r,t,n)}}(s[e].filter(n));o[e].sort(a),s[e].filter(function(t){return!n(t)}).sort(function(t){return s[e].indexOf(t)}).forEach(function(t){o[e].splice(o[e].indexOf(t),1),o[e].splice(s[e].indexOf(t),0,t)}),t.emit("plotly_restyle")};n(a,i,e,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:h,axesMoved:f})}},{"./parcoords":920}],922:[function(t,e,r){"use strict";var n=t("../../components/color/attributes"),i=t("../../plots/font_attributes"),a=t("../../plots/attributes"),o=t("../../lib/extend").extendFlat;e.exports={labels:{valType:"data_array"},label0:{valType:"number",dflt:0},dlabel:{valType:"number",dflt:1},values:{valType:"data_array"},marker:{colors:{valType:"data_array"},line:{color:{valType:"color",dflt:n.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}}},text:{valType:"data_array"},hovertext:{valType:"string",dflt:"",arrayOk:!0},scalegroup:{valType:"string",dflt:""},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"]},hoverinfo:o({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0},textfont:o({},i,{}),insidetextfont:o({},i,{}),outsidetextfont:o({},i,{}),domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},hole:{valType:"number",min:0,max:1,dflt:0},sort:{valType:"boolean",dflt:!0},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise"},rotation:{valType:"number",min:-360,max:360,dflt:0},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0}}},{"../../components/color/attributes":584,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/font_attributes":753}],923:[function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n")}return m};var l},{"../../components/color":585,"./helpers":926,"fast-isnumeric":123,tinycolor2:521}],925:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r,a){function o(r,a){return n.coerce(t,e,i,r,a)}var s=n.coerceFont,l=o("values");if(!Array.isArray(l)||!l.length)return void(e.visible=!1);var u=o("labels");Array.isArray(u)||(o("label0"),o("dlabel")),o("marker.line.width")&&o("marker.line.color");var c=o("marker.colors");Array.isArray(c)||(e.marker.colors=[]),o("scalegroup");var h=o("text"),f=o("textinfo",Array.isArray(h)?"text+percent":"percent");if(o("hovertext"),o("hoverinfo",1===a._dataLength?"label+text+value+percent":void 0),f&&"none"!==f){var d=o("textposition"),p=Array.isArray(d)||"auto"===d,m=p||"inside"===d,g=p||"outside"===d;if(m||g){var v=s(o,"textfont",a.font);m&&s(o,"insidetextfont",v),g&&s(o,"outsidetextfont",v)}}o("domain.x"),o("domain.y"),o("hole"),o("sort"),o("direction"),o("rotation"),o("pull")}},{"../../lib":690,"./attributes":922}],926:[function(t,e,r){"use strict";var n=t("../../lib");r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)+"%"},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)}},{"../../lib":690}],927:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("./layout_defaults"),n.layoutAttributes=t("./layout_attributes"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.styleOne=t("./style_one"),n.moduleType="trace",n.name="pie",n.basePlotModule=t("./base_plot"),n.categories=["pie","showLegend"],n.meta={},e.exports=n},{"./attributes":922,"./base_plot":923,"./calc":924,"./defaults":925,"./layout_attributes":928,"./layout_defaults":929,"./plot":930,"./style":931,"./style_one":932}],928:[function(t,e,r){"use strict";e.exports={hiddenlabels:{valType:"data_array"}}},{}],929:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){!function(r,a){n.coerce(t,e,i,r,a)}("hiddenlabels")}},{"../../lib":690,"./layout_attributes":928}],930:[function(t,e,r){"use strict";function n(t,e,r){var n=Math.sqrt(t.width*t.width+t.height*t.height),a=t.width/t.height,o=Math.PI*Math.min(e.v/r.vTotal,.5),s=1-r.trace.hole,l=i(e,r),u={scale:l*r.r*2/n,rCenter:1-l,rotate:0};if(u.scale>=1)return u;var c=a+1/(2*Math.tan(o)),h=r.r*Math.min(1/(Math.sqrt(c*c+.5)+c),s/(Math.sqrt(a*a+s/2)+a)),f={scale:2*h/t.height,rCenter:Math.cos(h/r.r)-h*a/r.r,rotate:(180/Math.PI*e.midangle+720)%180-90},d=1/a,p=d+1/(2*Math.tan(o)),m=r.r*Math.min(1/(Math.sqrt(p*p+.5)+p),s/(Math.sqrt(d*d+s/2)+d)),g={scale:2*m/t.width,rCenter:Math.cos(m/r.r)-m/a/r.r,rotate:(180/Math.PI*e.midangle+810)%180-90},v=g.scale>f.scale?g:f;return u.scale<1&&v.scale>u.scale?v:u}function i(t,e){if(t.v===e.vTotal&&!e.trace.hole)return 1;var r=Math.PI*Math.min(t.v/e.vTotal,.5);return Math.min(1/(1+1/Math.sin(r)),(1-e.trace.hole)/2)}function a(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function o(t,e){function r(t,e){return t.pxmid[1]-e.pxmid[1]}function n(t,e){return e.pxmid[1]-t.pxmid[1]}var i,a,o,s,l,u,c,h,f,d,p,m,g;for(a=0;a<2;a++)for(o=a?r:n,l=a?Math.max:Math.min,c=a?1:-1,i=0;i<2;i++){for(s=i?Math.max:Math.min,u=i?1:-1,h=t[a][i],h.sort(o),f=t[1-a][i],d=f.concat(h),m=[],p=0;p0&&(t.labelExtraY=b),Array.isArray(e.pull))for(i=0;i=e.pull[o.i]||((t.pxmid[1]-o.pxmid[1])*c>0?(h=o.cyFinal+l(o.px0[1],o.px1[1]),(b=h-g-t.labelExtraY)*c>0&&(t.labelExtraY+=b)):(v+t.labelExtraY-y)*c>0&&(n=3*u*Math.abs(i-d.indexOf(t)),f=o.cxFinal+s(o.px0[0],o.px1[0]),(p=f+n-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*u>0&&(t.labelExtraX+=p)))}(m[p],v)}}}function s(t,e){var r,n,i,a,o,s,l,c,h,f,d=[];for(i=0;ic&&(c=s.pull[a]);o.r=Math.min(r/u(s.tilt,Math.sin(l),s.depth),n/u(s.tilt,Math.cos(l),s.depth))/(2+2*c),o.cx=e.l+e.w*(s.domain.x[1]+s.domain.x[0])/2,o.cy=e.t+e.h*(2-s.domain.y[1]-s.domain.y[0])/2,s.scalegroup&&-1===d.indexOf(s.scalegroup)&&d.push(s.scalegroup)}for(a=0;ah.vTotal/2?1:0)}function u(t,e,r){if(!t)return 1;var n=Math.sin(t*Math.PI/180);return Math.max(.01,r*n*Math.abs(e)+2*Math.sqrt(1-n*n*e*e))}var c=t("d3"),h=t("../../plots/cartesian/graph_interact"),f=t("../../components/color"),d=t("../../components/drawing"),p=t("../../lib/svg_text_utils"),m=t("./helpers");e.exports=function(t,e){var r=t._fullLayout;s(e,r._size);var u=r._pielayer.selectAll("g.trace").data(e);u.enter().append("g").attr({"stroke-linejoin":"round",class:"trace"}),u.exit().remove(),u.order(),u.each(function(e){var s=c.select(this),u=e[0],g=u.trace,v=(g.depth||0)*u.r*Math.sin(0)/2,y=g.tiltaxis||0,b=y*Math.PI/180,x=[v*Math.sin(b),v*Math.cos(b)],_=u.r*Math.cos(0),w=s.selectAll("g.part").data(g.tilt?["top","sides"]:["top"]);w.enter().append("g").attr("class",function(t){return t+" part"}),w.exit().remove(),w.order(),l(e),s.selectAll(".top").each(function(){var s=c.select(this).selectAll("g.slice").data(e);s.enter().append("g").classed("slice",!0),s.exit().remove();var l=[[[],[]],[[],[]]],v=!1;s.each(function(e){function o(n){n.originalEvent=c.event;var a=t._fullLayout,o=t._fullData[g.index],s=o.hoverinfo;if("all"===s&&(s="label+text+value+percent+name"),t._dragging||!1===a.hovermode||"none"===s||"skip"===s||!s)return void h.hover(t,n,"pie");var l=i(e,u),f=w+e.pxmid[0]*(1-l),d=M+e.pxmid[1]*(1-l),p=r.separators,v=[];-1!==s.indexOf("label")&&v.push(e.label),-1!==s.indexOf("text")&&(o.hovertext?v.push(Array.isArray(o.hovertext)?o.hovertext[e.i]:o.hovertext):o.text&&o.text[e.i]&&v.push(o.text[e.i])),-1!==s.indexOf("value")&&v.push(m.formatPieValue(e.v,p)),-1!==s.indexOf("percent")&&v.push(m.formatPiePercent(e.v/u.vTotal,p)),h.loneHover({x0:f-l*u.r,x1:f+l*u.r,y:d,text:v.join("
"),name:-1!==s.indexOf("name")?o.name:void 0,color:e.color,idealAlign:e.pxmid[0]<0?"left":"right"},{container:a._hoverlayer.node(),outerContainer:a._paper.node()}),h.hover(t,n,"pie"),T=!0}function s(e){e.originalEvent=c.event,t.emit("plotly_unhover",{event:c.event,points:[e]}),T&&(h.loneUnhover(r._hoverlayer.node()),T=!1)}function f(){t._hoverdata=[e],t._hoverdata.trace=u.trace,h.click(t,c.event)}function b(t,r,n,i){return"a"+i*u.r+","+i*_+" "+y+" "+e.largeArc+(n?" 1 ":" 0 ")+i*(r[0]-t[0])+","+i*(r[1]-t[1])}if(e.hidden)return void c.select(this).selectAll("path,g").remove();l[e.pxmid[1]<0?0:1][e.pxmid[0]<0?0:1].push(e);var w=u.cx+x[0],M=u.cy+x[1],k=c.select(this),A=k.selectAll("path.surface").data([e]),T=!1;if(A.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),k.select("path.textline").remove(),k.on("mouseover",o).on("mouseout",s).on("click",f),g.pull){var S=+(Array.isArray(g.pull)?g.pull[e.i]:g.pull)||0;S>0&&(w+=S*e.pxmid[0],M+=S*e.pxmid[1])}e.cxFinal=w,e.cyFinal=M;var E=g.hole;if(e.v===u.vTotal){var L="M"+(w+e.px0[0])+","+(M+e.px0[1])+b(e.px0,e.pxmid,!0,1)+b(e.pxmid,e.px0,!0,1)+"Z";E?A.attr("d","M"+(w+E*e.px0[0])+","+(M+E*e.px0[1])+b(e.px0,e.pxmid,!1,E)+b(e.pxmid,e.px0,!1,E)+"Z"+L):A.attr("d",L)}else{var C=b(e.px0,e.px1,!0,1);if(E){var z=1-E;A.attr("d","M"+(w+E*e.px1[0])+","+(M+E*e.px1[1])+b(e.px1,e.px0,!1,E)+"l"+z*e.px0[0]+","+z*e.px0[1]+C+"Z")}else A.attr("d","M"+w+","+M+"l"+e.px0[0]+","+e.px0[1]+C+"Z")}var D=Array.isArray(g.textposition)?g.textposition[e.i]:g.textposition,I=k.selectAll("g.slicetext").data(e.text&&"none"!==D?[0]:[]);I.enter().append("g").classed("slicetext",!0),I.exit().remove(),I.each(function(){var t=c.select(this).selectAll("text").data([0]);t.enter().append("text").attr("data-notex",1),t.exit().remove(),t.text(e.text).attr({class:"slicetext",transform:"","data-bb":"","text-anchor":"middle",x:0,y:0}).call(d.font,"outside"===D?g.outsidetextfont:g.insidetextfont).call(p.convertToTspans),t.selectAll("tspan.line").attr({x:0,y:0});var r,i=d.bBox(t.node());"outside"===D?r=a(i,e):(r=n(i,e,u),"auto"===D&&r.scale<1&&(t.call(d.font,g.outsidetextfont),g.outsidetextfont.family===g.insidetextfont.family&&g.outsidetextfont.size===g.insidetextfont.size||(t.attr({"data-bb":""}),i=d.bBox(t.node())),r=a(i,e)));var o=w+e.pxmid[0]*r.rCenter+(r.x||0),s=M+e.pxmid[1]*r.rCenter+(r.y||0);r.outside&&(e.yLabelMin=s-i.height/2,e.yLabelMid=s,e.yLabelMax=s+i.height/2,e.labelExtraX=0,e.labelExtraY=0,v=!0),t.attr("transform","translate("+o+","+s+")"+(r.scale<1?"scale("+r.scale+")":"")+(r.rotate?"rotate("+r.rotate+")":"")+"translate("+-(i.left+i.right)/2+","+-(i.top+i.bottom)/2+")")})}),v&&o(l,g),s.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=c.select(this),r=e.select("g.slicetext text");r.attr("transform","translate("+t.labelExtraX+","+t.labelExtraY+")"+r.attr("transform"));var n=t.cxFinal+t.pxmid[0],i=t.cyFinal+t.pxmid[1],a="M"+n+","+i,o=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var s=t.labelExtraX*t.pxmid[1]/t.pxmid[0],l=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(s)>Math.abs(l)?a+="l"+l*t.pxmid[0]/t.pxmid[1]+","+l+"H"+(n+t.labelExtraX+o):a+="l"+t.labelExtraX+","+s+"v"+(l-s)+"h"+o}else a+="V"+(t.yLabelMid+t.labelExtraY)+"h"+o;e.append("path").classed("textline",!0).call(f.stroke,g.outsidetextfont.color).attr({"stroke-width":Math.min(2,g.outsidetextfont.size/8),d:a,fill:"none"})}})})}),setTimeout(function(){u.selectAll("tspan").each(function(){var t=c.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)}},{"../../components/color":585,"../../components/drawing":608,"../../lib/svg_text_utils":709,"../../plots/cartesian/graph_interact":738,"./helpers":926,d3:114}],931:[function(t,e,r){"use strict";var n=t("d3"),i=t("./style_one");e.exports=function(t){t._fullLayout._pielayer.selectAll(".trace").each(function(t){var e=t[0],r=e.trace,a=n.select(this);a.style({opacity:r.opacity}),a.selectAll(".top path.surface").each(function(t){n.select(this).call(i,t,r)})})}},{"./style_one":932,d3:114}],932:[function(t,e,r){"use strict";var n=t("../../components/color");e.exports=function(t,e,r){var i=r.marker.line.color;Array.isArray(i)&&(i=i[e.i]||n.defaultLine);var a=r.marker.line.width||0;Array.isArray(a)&&(a=a[e.i]||0),t.style({"stroke-width":a,fill:e.color}).call(n.stroke,i)}},{"../../components/color":585}],933:[function(t,e,r){"use strict";var n=t("../scattergl/attributes");e.exports={x:n.x,y:n.y,xy:{valType:"data_array"},indices:{valType:"data_array"},xbounds:{valType:"data_array"},ybounds:{valType:"data_array"},text:n.text,marker:{color:{valType:"color",arrayOk:!1},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1},blend:{valType:"boolean",dflt:null},sizemin:{valType:"number",min:.1,max:2,dflt:.5},sizemax:{valType:"number",min:.1,dflt:20},border:{color:{valType:"color",arrayOk:!1},arearatio:{valType:"number",min:0,max:1,dflt:0}}}}},{"../scattergl/attributes":983}],934:[function(t,e,r){"use strict";function n(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=a(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}function i(t,e){var r=new n(t,e.uid);return r.update(e),r}var a=t("gl-pointcloud2d"),o=t("../../lib/str2rgbarray"),s=t("../scatter/get_trace_color"),l=["xaxis","yaxis"],u=n.prototype;u.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},u.update=function(t){this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=s(t,{})},u.updateFast=function(t){var e,r,n,i,a,s,l=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,c=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,f=t.indices,d=this.bounds;if(c){if(n=c,e=c.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(s=0;sd[2]&&(d[2]=i),ad[3]&&(d[3]=a);if(f)r=f;else for(r=new Int32Array(e),s=0;sd[2]&&(d[2]=i),ad[3]&&(d[3]=a);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var p=o(t.marker.color),m=o(t.marker.border.color),g=t.opacity*t.marker.opacity;p[3]*=g,this.pointcloudOptions.color=p;var v=t.marker.blend;if(null===v){v=l.length<100||u.length<100}this.pointcloudOptions.blend=v,m[3]*=g,this.pointcloudOptions.borderColor=m;var y=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=y,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions),this.expandAxesFast(d,b/2)},u.expandAxesFast=function(t,e){for(var r,n,i,a=e||.5,o=0;o<2;o++)r=this.scene[l[o]],n=r._min,n||(n=[]),n.push({val:t[o],pad:a}),i=r._max,i||(i=[]),i.push({val:t[o+2],pad:a})},u.dispose=function(){this.pointcloud.dispose()},e.exports=i},{"../../lib/str2rgbarray":708,"../scatter/get_trace_color":955,"gl-pointcloud2d":221}],935:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a("text"),a("marker.color",r),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",r),a("marker.border.arearatio")}},{"../../lib":690,"./attributes":933}],936:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.calc=t("../scatter3d/calc"),n.plot=t("./convert"),n.moduleType="trace",n.name="pointcloud",n.basePlotModule=t("../../plots/gl2d"),n.categories=["gl2d","showLegend"],n.meta={},e.exports=n},{"../../plots/gl2d":769,"../scatter3d/calc":971,"./attributes":933,"./convert":934,"./defaults":935}],937:[function(t,e,r){"use strict";var n=t("../../components/shapes/attributes"),i=t("../../plots/font_attributes"),a=t("../../plots/attributes"),o=t("../../lib/extend").extendFlat;e.exports={hoverinfo:o({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},nodepad:{valType:"number",min:0,dflt:20},nodethickness:{valType:"number",min:1,dflt:20},valueformat:{valType:"string",dflt:".3s"},valueunit:{valType:"string",dflt:""},followmouse:{valType:"boolean",dflt:!0},textfont:i,nodes:{_isLinkedToArray:"node",label:{valType:"string",dflt:""},visible:n.visible,color:o({},n.fillcolor,{dflt:"rgb(0,255,0,0.5)"})},links:{_isLinkedToArray:"link",label:{valType:"string",dflt:""},visible:n.visible,color:o({},n.fillcolor,{dflt:"rgba(0,0,0,0.2)"}),source:{valType:"number"},target:{valType:"number"},value:{valType:"number",dflt:1}}}},{"../../components/shapes/attributes":648,"../../lib/extend":682,"../../plots/attributes":727,"../../plots/font_attributes":753}],938:[function(t,e,r){"use strict";var n=t("../../plots/plots"),i=t("./plot");r.name="sankey",r.attr="type",r.plot=function(t){var e=n.getSubplotCalcData(t.calcdata,"sankey","sankey");e.length&&i(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has("sankey"),a=e._has&&e._has("sankey");i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".sankey").remove())},r.toSVG=function(){}},{"../../plots/plots":792,"./plot":944}],939:[function(t,e,r){"use strict";e.exports=function(){return[{}]}},{}],940:[function(t,e,r){arguments[4][915][0].apply(r,arguments)},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,dup:915,"fast-isnumeric":123}],941:[function(t,e,r){"use strict";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,movable:!0,sideways:!0,useForceSnap:!0,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear"}},{}],942:[function(t,e,r){"use strict";function n(t,e){function r(t,e){return a.coerce(n,i,o.links,t,e)}var n,i,s,l=t.links||[],u=e.links=[];for(s=0;s"),color:g.addOpacity(i.tinyColorHue,1),idealAlign:m.event.x"),color:i.tinyColorHue,idealAlign:"left"},{container:r._hoverlayer.node(),outerContainer:r._paper.node()});a(d,.85),o(d,i.tinyColorHue)},k=function(e,n,i){m.select(e).call(c,n,i),t.emit("plotly_unhover",{points:[n.node]}),s&&(p.loneUnhover(r._hoverlayer.node()),s=!1)};d(i,e,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{linkEvents:{hover:y,follow:b,unhover:x,select:v},nodeEvents:{hover:w,follow:M,unhover:k,select:_}})}},{"../../components/color":585,"../../plots/cartesian/graph_interact":738,"./render":945,d3:114}],945:[function(t,e,r){"use strict";function n(t){return t.key}function i(t){return[t]}function a(t){return t[0]}function o(t){for(var e=0;e0&&window.requestAnimationFrame(r)})}}).on("drag",function(r){if(k.movable){var n=r.horizontal?A.event.x:A.event.y,i=r.horizontal?A.event.y:A.event.x;k.useForceSnap?(r.node.x=n,r.node.y=i):(k.sideways&&(r.node.x=n),r.node.y=Math.max(r.node.dy/2,Math.min(r.size-r.node.dy/2,i))),s(r.node),r.sankey.relayout(),k.useForceSnap||(y(t.filter(l(r)),e),t.call(p))}}).on("dragend",function(t){t.interactionState.dragInProgress=!1});t.on(".drag",null).call(n)}function w(t,e,r){var n=r.sankey.nodes().filter(function(t){return t.originalX===r.node.originalX});r.forceLayouts[e]=C.forceSimulation(n).alphaDecay(0).force("collide",C.forceCollide().radius(function(t){return t.dy/2+r.nodePad/2}).strength(1).iterations(k.forceIterations)).force("constrain",M(t,e,n,r)).stop()}function M(t,e,r,n){return function(){for(var i=0,a=0;a5?t.node.label:""}).style("fill",function(t){return t.darkBackground&&!t.horizontal?"white":"black"})}},{"../../components/color":585,"../../components/drawing":608,"./constants":941,"@monfera/d3-sankey":32,d3:114,"d3-force":110,tinycolor2:521}],946:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){n.mergeArray(e.text,t,"tx"),n.mergeArray(e.hovertext,t,"htx"),n.mergeArray(e.customdata,t,"data"),n.mergeArray(e.textposition,t,"tp"),e.textfont&&(n.mergeArray(e.textfont.size,t,"ts"),n.mergeArray(e.textfont.color,t,"tc"),n.mergeArray(e.textfont.family,t,"tf"));var r=e.marker;if(r){n.mergeArray(r.size,t,"ms"),n.mergeArray(r.opacity,t,"mo"),n.mergeArray(r.symbol,t,"mx"),n.mergeArray(r.color,t,"mc");var i=r.line;r.line&&(n.mergeArray(i.color,t,"mlc"),n.mergeArray(i.width,t,"mlw"))}}},{"../../lib":690}],947:[function(t,e,r){"use strict";var n=t("../../components/colorscale/color_attributes"),i=t("../../components/errorbars/attributes"),a=t("../../components/colorbar/attributes"),o=t("../../components/drawing"),s=(t("./constants"),t("../../lib/extend").extendFlat);e.exports={x:{valType:"data_array"},x0:{valType:"any",dflt:0},dx:{valType:"number",dflt:1},y:{valType:"data_array"},y0:{valType:"any",dflt:0},customdata:{valType:"data_array"},dy:{valType:"number",dflt:1},ids:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},hoveron:{valType:"flaglist",flags:["points","fills"]},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear"},smoothing:{valType:"number",min:0,max:1.3,dflt:1},dash:{valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid"},simplify:{valType:"boolean",dflt:!0}},connectgaps:{valType:"boolean",dflt:!1},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],dflt:"none"},fillcolor:{valType:"color"},marker:s({},{symbol:{valType:"enumerated",values:o.symbolList,dflt:"circle",arrayOk:!0},opacity:{valType:"number",min:0,max:1,arrayOk:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0},maxdisplayed:{valType:"number",min:0,dflt:0},sizeref:{valType:"number",dflt:1},sizemin:{valType:"number",min:0,dflt:0},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter"},showscale:{valType:"boolean",dflt:!1},colorbar:a,line:s({},{width:{valType:"number",min:0,arrayOk:!0}},n("marker.line"))},n("marker")),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0},textfont:{family:{valType:"string",noBlank:!0,strict:!0,arrayOk:!0},size:{valType:"number",min:1,arrayOk:!0},color:{valType:"color",arrayOk:!0}},r:{valType:"data_array"},t:{valType:"data_array"},error_y:i,error_x:i}},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../components/drawing":608,"../../components/errorbars/attributes":610,"../../lib/extend":682,"./constants":952}],948:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("./subtypes"),o=t("./colorscale_calc"),s=t("./arrays_to_calcdata");e.exports=function(t,e){var r,l,u,c=i.getFromId(t,e.xaxis||"x"),h=i.getFromId(t,e.yaxis||"y"),f=c.makeCalcdata(e,"x"),d=h.makeCalcdata(e,"y"),p=Math.min(f.length,d.length);c._minDtick=0,h._minDtick=0,f.length>p&&f.splice(p,f.length-p),d.length>p&&d.splice(p,d.length-p);var m={padded:!0},g={padded:!0};if(a.hasMarkers(e)){if(r=e.marker,l=r.size,Array.isArray(l)){var v={type:"linear"};i.setConvert(v),l=v.makeCalcdata(e.marker,"size"),l.length>p&&l.splice(p,l.length-p)}var y,b=1.6*(e.marker.sizeref||1);y="area"===e.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/b),3)}:function(t){return Math.max((t||0)/b,3)},m.ppad=g.ppad=Array.isArray(l)?l.map(y):y(l)}o(e),!("tozerox"===e.fill||"tonextx"===e.fill&&t.firstscatter)||f[0]===f[p-1]&&d[0]===d[p-1]?e.error_y.visible||-1===["tonexty","tozeroy"].indexOf(e.fill)&&(a.hasMarkers(e)||a.hasText(e))||(m.padded=!1,m.ppad=0):m.tozero=!0,!("tozeroy"===e.fill||"tonexty"===e.fill&&t.firstscatter)||f[0]===f[p-1]&&d[0]===d[p-1]?-1!==["tonextx","tozerox"].indexOf(e.fill)&&(g.padded=!1):g.tozero=!0,i.expand(c,f,m),i.expand(h,d,g);var x=new Array(p);for(u=0;u=0;i--){var a=t[i];if("scatter"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],950:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../components/colorscale"),s=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,l=r.marker,u="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===l||!l.showscale)return void a.autoMargin(t,u);var c=l.color,h=l.cmin,f=l.cmax;n(h)||(h=i.aggNums(Math.min,null,c)),n(f)||(f=i.aggNums(Math.max,null,c));var d=e[0].t.cb=s(t,u),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,h,f),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:h,end:f,size:(f-h)/254}).options(l.colorbar)()}},{"../../components/colorbar/draw":588,"../../components/colorscale":599,"../../lib":690,"../../plots/plots":792,"fast-isnumeric":123}],951:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/calc"),a=t("./subtypes");e.exports=function(t){a.hasLines(t)&&n(t,"line")&&i(t,t.line.color,"line","c"),a.hasMarkers(t)&&(n(t,"marker")&&i(t,t.marker.color,"marker","c"),n(t,"marker.line")&&i(t,t.marker.line.color,"marker.line","c"))}},{"../../components/colorscale/calc":591,"../../components/colorscale/has_colorscale":598,"./subtypes":967}],952:[function(t,e,r){"use strict";e.exports={PTS_LINESONLY:20}},{}],953:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("./constants"),o=t("./subtypes"),s=t("./xy_defaults"),l=t("./marker_defaults"),u=t("./line_defaults"),c=t("./line_shape_defaults"),h=t("./text_defaults"),f=t("./fillcolor_defaults"),d=t("../../components/errorbars/defaults");e.exports=function(t,e,r,p){function m(r,a){return n.coerce(t,e,i,r,a)}var g=s(t,e,p,m),v=gU!=I>=U&&(C=E[T-1][0],z=E[T][0],L=C+(z-C)*(U-D)/(I-D),j=Math.min(j,L),F=Math.max(F,L));j=Math.max(j,0),F=Math.min(F,f._length);var V=l.defaultLine;return l.opacity(h.fillcolor)?V=h.fillcolor:l.opacity((h.line||{}).color)&&(V=h.line.color),n.extendFlat(t,{distance:a.MAXDIST+10,x0:j,x1:F,y0:U,y1:U,color:V}),delete t.index,h.text&&!Array.isArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}}},{"../../components/color":585,"../../components/errorbars":614,"../../lib":690,"../../plots/cartesian/constants":734,"../../plots/cartesian/graph_interact":738,"./get_trace_color":955}],957:[function(t,e,r){"use strict";var n={},i=t("./subtypes");n.hasLines=i.hasLines,n.hasMarkers=i.hasMarkers,n.hasText=i.hasText,n.isBubble=i.isBubble,n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.cleanData=t("./clean_data"),n.calc=t("./calc"),n.arraysToCalcdata=t("./arrays_to_calcdata"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.animatable=!0,n.moduleType="trace",n.name="scatter",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","symbols","markerColorscale","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":739,"./arrays_to_calcdata":946,"./attributes":947,"./calc":948,"./clean_data":949,"./colorbar":950,"./defaults":953,"./hover":956,"./plot":964,"./select":965,"./style":966,"./subtypes":967}],958:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,a,o){var s=(t.marker||{}).color;if(o("line.color",r),n(t,"line"))i(t,e,a,o,{prefix:"line.",cLetter:"c"});else{o("line.color",!Array.isArray(s)&&s||r)}o("line.width"),o("line.dash")}},{"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598}],959:[function(t,e,r){"use strict";var n=t("../../constants/numerical").BADNUM;e.exports=function(t,e){function r(e){var r=_.c2p(t[e].x),i=w.c2p(t[e].y);return r!==n&&i!==n&&[r,i]}function i(t){var e=t[0]/_._length,r=t[1]/w._length;return(1+10*Math.max(0,-e,e-1,-r,r-1))*A}var a,o,s,l,u,c,h,f,d,p,m,g,v,y,b,x,_=e.xaxis,w=e.yaxis,M=e.simplify,k=e.connectGaps,A=e.baseTolerance,T=e.linear,S=[],E=.2,L=new Array(t.length),C=0;for(M||(A=E=-1),a=0;ai(c))break;s=c,v=p[0]*d[0]+p[1]*d[1],v>m?(m=v,l=c,f=!1):v=t.length||!c)break;L[C++]=c,o=c}}else L[C++]=l}S.push(L.slice(0,C))}return S}},{"../../constants/numerical":672}],960:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],961:[function(t,e,r){"use strict";e.exports=function(t,e,r){for(var n,i,a=null,o=0;o0?Math.max(e,i):0}}},{"fast-isnumeric":123}],963:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults"),o=t("./subtypes");e.exports=function(t,e,r,s,l){var u,c=o.isBubble(t),h=(t.line||{}).color;h&&(r=h),l("marker.symbol"),l("marker.opacity",c?.7:1),l("marker.size"),l("marker.color",r),i(t,"marker")&&a(t,e,s,l,{prefix:"marker.",cLetter:"c"}),u=h&&!Array.isArray(h)&&e.marker.color!==h?h:c?n.background:n.defaultLine,l("marker.line.color",u),i(t,"marker.line")&&a(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",c?1:0),c&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode"))}},{"../../components/color":585,"../../components/colorscale/defaults":594,"../../components/colorscale/has_colorscale":598,"./subtypes":967}],964:[function(t,e,r){"use strict";function n(t,e){var r;e.selectAll("g.trace").each(function(t){var e=o.select(this);if(r=t[0].trace,r._nexttrace){if(r._nextFill=e.select(".js-fill.js-tonext"),!r._nextFill.size()){var n=":first-child";e.select(".js-fill.js-tozero").size()&&(n+=" + *"),r._nextFill=e.insert("path",n).attr("class","js-fill js-tonext")}}else e.selectAll(".js-fill.js-tonext").remove(),r._nextFill=null;r.fill&&("tozero"===r.fill.substr(0,6)||"toself"===r.fill||"to"===r.fill.substr(0,2)&&!r._prevtrace)?(r._ownFill=e.select(".js-fill.js-tozero"),r._ownFill.size()||(r._ownFill=e.insert("path",":first-child").attr("class","js-fill js-tozero"))):(e.selectAll(".js-fill.js-tozero").remove(),r._ownFill=null)})}function i(t,e,r,n,i,f,p){function m(t){return M?t.transition():t}function g(t){return t.filter(function(t){return t.vis})}function v(t){return t.id}function y(t){if(t.ids)return v}function b(){return!1}function x(t){var e,r,n=t[0].trace,i=o.select(this),a=c.hasMarkers(n),u=c.hasText(n),h=y(n),f=b,d=b;a&&(f=n.marker.maxdisplayed?g:s.identity),u&&(d=n.marker.maxdisplayed?g:s.identity),r=i.selectAll("path.point"),e=r.data(f,h);var p=e.enter().append("path").classed("point",!0);p.call(l.pointStyle,n).call(l.translatePoints,k,A,n),M&&p.style("opacity",0).transition().style("opacity",1),e.each(function(t){var e=o.select(this),r=m(e);l.translatePoint(t,r,k,A),l.singlePointStyle(t,r,n),n.customdata&&e.classed("plotly-customdata",null!==t.data&&void 0!==t.data)}),M?e.exit().transition().style("opacity",0).remove():e.exit().remove(),r=i.selectAll("g"),e=r.data(d,h),e.enter().append("g").append("text"),e.each(function(t){var e=m(o.select(this).select("text"));l.translatePoint(t,e,k,A)}),e.selectAll("text").call(l.textPointStyle,n).each(function(t){var e=t.xp||k.c2p(t.x),r=t.yp||A.c2p(t.y);o.select(this).selectAll("tspan").each(function(){m(o.select(this)).attr({x:e,y:r})})}),e.exit().remove()}var _,w;a(t,e,r,n,i);var M=!!p&&p.duration>0,k=r.xaxis,A=r.yaxis,T=n[0].trace,S=T.line,E=o.select(f);if(E.call(u.plot,r,p),!0===T.visible){m(E).style("opacity",T.opacity);var L,C,z=T.fill.charAt(T.fill.length-1);"x"!==z&&"y"!==z&&(z=""),n[0].node3=E;var D="",I=[],P=T._prevtrace;P&&(D=P._prevRevpath||"",C=P._nextFill,I=P._polygons);var O,R,j,F,N,B,U,V,q,H="",Y="",G=[],X=[],W=s.noop;if(L=T._ownFill,c.hasLines(T)||"none"!==T.fill){for(C&&C.datum(n),-1!==["hv","vh","hvh","vhv"].indexOf(S.shape)?(j=l.steps(S.shape),F=l.steps(S.shape.split("").reverse().join(""))):j=F="spline"===S.shape?function(t){var e=t[t.length-1];return t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),S.smoothing):l.smoothopen(t,S.smoothing)}:function(t){return"M"+t.join("L")},N=function(t){return F(t.reverse())},G=h(n,{xaxis:k,yaxis:A,connectGaps:T.connectgaps,baseTolerance:Math.max(S.width||1,3)/4,linear:"linear"===S.shape,simplify:S.simplify}),q=T._polygons=new Array(G.length),w=0;w1}),W=function(t){return function(e){if(O=j(e),R=N(e),H?z?(H+="L"+O.substr(1),Y=R+"L"+Y.substr(1)):(H+="Z"+O,Y=R+"Z"+Y):(H=O,Y=R),c.hasLines(T)&&e.length>1){var r=o.select(this);if(r.datum(n),t)m(r.style("opacity",0).attr("d",O).call(l.lineGroupStyle)).style("opacity",1);else{var i=m(r);i.attr("d",O),l.singleLineStyle(n,i)}}}}}var Z=E.selectAll(".js-line").data(X);m(Z.exit()).style("opacity",0).remove(),Z.each(W(!1)),Z.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(W(!0)),G.length&&(L?B&&V&&(z?("y"===z?B[1]=V[1]=A.c2p(0,!0):"x"===z&&(B[0]=V[0]=k.c2p(0,!0)),m(L).attr("d","M"+V+"L"+B+"L"+H.substr(1))):m(L).attr("d",H+"Z")):"tonext"===T.fill.substr(0,6)&&H&&D&&("tonext"===T.fill?m(C).attr("d",H+"Z"+D+"Z"):m(C).attr("d",H+"L"+D.substr(1)+"Z"),T._polygons=T._polygons.concat(I)),T._prevRevpath=Y,T._prevPolygons=q);var J=E.selectAll(".points");_=J.data([n]),J.each(x),_.enter().append("g").classed("points",!0).each(x),_.exit().remove()}}function a(t,e,r,n,i){var a=r.xaxis,l=r.yaxis,u=o.extent(s.simpleMap(a.range,a.r2c)),h=o.extent(s.simpleMap(l.range,l.r2c)),f=n[0].trace;if(c.hasMarkers(f)){var d=f.marker.maxdisplayed;if(0!==d){var p=n.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=h[0]&&t.y<=h[1]}),m=Math.ceil(p.length/d),g=0;i.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;for(c=p.selectAll("g.trace"),h=c.data(r,function(t){return t[0].trace.uid}),h.enter().append("g").attr("class",function(t){return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),f(t,e,r),n(t,p),l=0, -u={};lu[e[0].trace.uid]?1:-1}),g){s&&(d=s());o.transition().duration(a.duration).ease(a.easing).each("end",function(){d&&d()}).each("interrupt",function(){d&&d()}).each(function(){p.selectAll("g.trace").each(function(n,o){i(t,o,e,n,r,this,a)})})}else p.selectAll("g.trace").each(function(n,o){i(t,o,e,n,r,this,a)});m&&h.exit().remove(),p.selectAll("path:not([d])").remove()}},{"../../components/drawing":608,"../../components/errorbars":614,"../../lib":690,"../../lib/polygon":700,"./line_points":959,"./link_traces":961,"./subtypes":967,d3:114}],965:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[],h=s[0].trace,f=h.index,d=h.marker,p=!n.hasMarkers(h)&&!n.hasText(h);if(!0===h.visible&&!p){var m=Array.isArray(d.opacity)?1:d.opacity;if(!1===e)for(r=0;r=0&&(e[1]+=1),t.indexOf("top")>=0&&(e[1]-=1),t.indexOf("left")>=0&&(e[0]-=1),t.indexOf("right")>=0&&(e[0]+=1),e)}function s(t,e){return e(4*t)}function l(t){return M[t]}function u(t,e,r,n,i){var a=null;if(Array.isArray(t)){a=[];for(var o=0;o=0){var f=i(l.position,l.delaunayColor,l.delaunayAxis);f.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(f):(f.gl=o,this.delaunayMesh=g(f),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},A.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},e.exports=f},{"../../constants/gl3d_dashes":669,"../../constants/gl_markers":670,"../../lib":690,"../../lib/gl_format_color":687,"../../lib/str2rgbarray":708,"../scatter/make_bubble_size_func":962,"./calc_errors":972,"delaunay-triangulate":115,"gl-error3d":153,"gl-line3d":163,"gl-mesh3d":196,"gl-scatter3d":242}],974:[function(t,e,r){"use strict";function n(t,e,r,n){var a=0,o=r("x"),s=r("y"),l=r("z");return i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),o&&s&&l&&(a=Math.min(o.length,s.length,l.length),a=0&&f("surfacecolor",d||p);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];f(v+".show")&&(f(v+".opacity"),f(v+".scale"))}c(t,e,r,{axis:"z"}),c(t,e,r,{axis:"y",inherit:"z"}),c(t,e,r,{axis:"x",inherit:"z"})}},{"../../components/errorbars/defaults":613,"../../lib":690,"../../registry":807,"../scatter/line_defaults":958,"../scatter/marker_defaults":963,"../scatter/subtypes":967,"../scatter/text_defaults":968,"./attributes":970}],975:[function(t,e,r){"use strict";var n={};n.plot=t("./convert"),n.attributes=t("./attributes"),n.markerSymbols=t("../../constants/gl_markers"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.moduleType="trace",n.name="scatter3d",n.basePlotModule=t("../../plots/gl3d"),n.categories=["gl3d","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../constants/gl_markers":670,"../../plots/gl3d":772,"../scatter/colorbar":950,"./attributes":970,"./calc":971,"./convert":973,"./defaults":974}],976:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/colorscale/color_attributes"),o=t("../../lib/extend").extendFlat,s=n.marker,l=n.line,u=s.line;e.exports={lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names"],dflt:"ISO-3"},mode:o({},n.mode,{dflt:"markers"}),text:o({},n.text,{}),hovertext:o({},n.hovertext,{}),textfont:n.textfont,textposition:n.textposition,line:{color:l.color,width:l.width,dash:l.dash},connectgaps:n.connectgaps,marker:o({},{symbol:s.symbol,opacity:s.opacity,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,showscale:s.showscale,colorbar:s.colorbar,line:o({},{width:u.width},a("marker.line"))},a("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:n.fillcolor,hoverinfo:o({},i.hoverinfo,{flags:["lon","lat","location","text","name"]})}},{"../../components/colorscale/color_attributes":592,"../../lib/extend":682,"../../plots/attributes":727,"../scatter/attributes":947}],977:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../constants/numerical").BADNUM,a=t("../scatter/colorscale_calc"),o=t("../scatter/arrays_to_calcdata");e.exports=function(t,e){for(var r=Array.isArray(e.locations),s=r?e.locations.length:e.lon.length,l=new Array(s),u=0;u")}var i=t("../../plots/cartesian/graph_interact"),a=t("../../plots/cartesian/axes"),o=t("../../constants/numerical").BADNUM,s=t("../scatter/get_trace_color"),l=t("./attributes");e.exports=function(t){function e(t){return h.projection(t)}function r(t){var r=t.lonlat;if(r[0]===o)return 1/0;if(h.isLonLatOverEdges(r))return 1/0;var n=e(r),i=u.c2p(),a=c.c2p(),s=Math.abs(i-n[0]),l=Math.abs(a-n[1]),f=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-f,1-3/f)}var a=t.cd,l=a[0].trace,u=t.xa,c=t.ya,h=t.subplot;if(i.getClosest(a,r,t),!1!==t.index){var f=a[t.index],d=f.lonlat,p=e(d),m=f.mrc||1;return t.x0=p[0]-m,t.x1=p[0]+m,t.y0=p[1]-m,t.y1=p[1]+m,t.loc=f.loc,t.lat=d[0],t.lon=d[1],t.color=s(l,f),t.extraText=n(l,f,h.mockAxis),[t]}}},{"../../constants/numerical":672,"../../plots/cartesian/axes":729,"../../plots/cartesian/graph_interact":738,"../scatter/get_trace_color":955,"./attributes":976}],981:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="scattergeo",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/geo":757,"../scatter/colorbar":950,"./attributes":976,"./calc":977,"./defaults":978,"./event_data":979,"./hover":980,"./plot":982}],982:[function(t,e,r){"use strict";function n(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=c(r,e),i=r.locationmode,a=0;a=e.length?i:e[a]);return n}function o(t,e,r){return l(z(t,r),C(e,r),r)}function s(t,e,r,n){var i=w(t,e,n);return i=Array.isArray(i[0])?i:a(g.identity,[i],n),l(i,C(r,n),n)}function l(t,e,r){for(var n=new Array(4*r),i=0;i")}var i=t("../../plots/cartesian/graph_interact"),a=t("../scatter/get_trace_color"),o=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r){function s(t){var e=t.lonlat;if(e[0]===o)return 1/0;var n=Math.abs(c.c2p(e)-c.c2p([p,e[1]])),i=Math.abs(h.c2p(e)-h.c2p([e[0],r])),a=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(n*n+i*i)-a,1-3/a)}var l=t.cd,u=l[0].trace,c=t.xa,h=t.ya,f=e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360),d=360*f,p=e-d;if(i.getClosest(l,s,t),!1!==t.index){var m=l[t.index],g=m.lonlat,v=[g[0]+d,g[1]],y=c.c2p(v),b=h.c2p(v),x=m.mrc||1;return t.x0=y-x,t.x1=y+x,t.y0=b-x,t.y1=b+x,t.color=a(u,m),t.extraText=n(u,m),[t]}}},{"../../constants/numerical":672,"../../plots/cartesian/graph_interact":738,"../scatter/get_trace_color":955}],992:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("../scattergeo/calc"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.plot=t("./plot"),n.moduleType="trace",n.name="scattermapbox",n.basePlotModule=t("../../plots/mapbox"),n.categories=["mapbox","gl","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/mapbox":786,"../scatter/colorbar":950,"../scattergeo/calc":977,"./attributes":987,"./defaults":989,"./event_data":990,"./hover":991,"./plot":993}],993:[function(t,e,r){"use strict";function n(t,e){this.mapbox=t,this.map=t.map,this.uid=e,this.idSourceFill=e+"-source-fill",this.idSourceLine=e+"-source-line",this.idSourceCircle=e+"-source-circle",this.idSourceSymbol=e+"-source-symbol",this.idLayerFill=e+"-layer-fill",this.idLayerLine=e+"-layer-line",this.idLayerCircle=e+"-layer-circle",this.idLayerSymbol=e+"-layer-symbol",this.mapbox.initSource(this.idSourceFill),this.mapbox.initSource(this.idSourceLine),this.mapbox.initSource(this.idSourceCircle),this.mapbox.initSource(this.idSourceSymbol),this.map.addLayer({id:this.idLayerFill,source:this.idSourceFill,type:"fill"}),this.map.addLayer({id:this.idLayerLine,source:this.idSourceLine,type:"line"}),this.map.addLayer({id:this.idLayerCircle,source:this.idSourceCircle,type:"circle"}),this.map.addLayer({id:this.idLayerSymbol,source:this.idSourceSymbol,type:"symbol"})}function i(t){return"visible"===t.layout.visibility}var a=t("./convert"),o=n.prototype;o.update=function(t){var e=this.mapbox,r=a(t);e.setOptions(this.idLayerFill,"setLayoutProperty",r.fill.layout),e.setOptions(this.idLayerLine,"setLayoutProperty",r.line.layout),e.setOptions(this.idLayerCircle,"setLayoutProperty",r.circle.layout),e.setOptions(this.idLayerSymbol,"setLayoutProperty",r.symbol.layout),i(r.fill)&&(e.setSourceData(this.idSourceFill,r.fill.geojson),e.setOptions(this.idLayerFill,"setPaintProperty",r.fill.paint)),i(r.line)&&(e.setSourceData(this.idSourceLine,r.line.geojson),e.setOptions(this.idLayerLine,"setPaintProperty",r.line.paint)),i(r.circle)&&(e.setSourceData(this.idSourceCircle,r.circle.geojson),e.setOptions(this.idLayerCircle,"setPaintProperty",r.circle.paint)),i(r.symbol)&&(e.setSourceData(this.idSourceSymbol,r.symbol.geojson),e.setOptions(this.idLayerSymbol,"setPaintProperty",r.symbol.paint))},o.dispose=function(){var t=this.map;t.removeLayer(this.idLayerFill),t.removeLayer(this.idLayerLine),t.removeLayer(this.idLayerCircle),t.removeLayer(this.idLayerSymbol),t.removeSource(this.idSourceFill),t.removeSource(this.idSourceLine),t.removeSource(this.idSourceCircle),t.removeSource(this.idSourceSymbol)},e.exports=function(t,e){var r=e[0].trace,i=new n(t,r.uid);return i.update(e),i}},{"./convert":988}],994:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/colorscale/color_attributes"),o=t("../../components/colorbar/attributes"),s=t("../../lib/extend").extendFlat,l=n.marker,u=n.line,c=l.line;e.exports={a:{valType:"data_array"},b:{valType:"data_array"},c:{valType:"data_array"},sum:{valType:"number",dflt:0,min:0},mode:s({},n.mode,{dflt:"markers"}),text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:s({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing},connectgaps:n.connectgaps,fill:s({},n.fill,{values:["none","toself","tonext"]}),fillcolor:n.fillcolor,marker:s({},{symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:s({},{width:c.width},a("marker".line))},a("marker"),{showscale:l.showscale,colorbar:o}),textfont:n.textfont,textposition:n.textposition,hoverinfo:s({},i.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:n.hoveron}},{"../../components/colorbar/attributes":586,"../../components/colorscale/color_attributes":592,"../../lib/extend":682,"../../plots/attributes":727,"../scatter/attributes":947}],995:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("../scatter/subtypes"),o=t("../scatter/colorscale_calc"),s=t("../scatter/arrays_to_calcdata"),l=["a","b","c"],u={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,c,h,f,d,p,m=t._fullLayout[e.subplot],g=m.sum,v=e.sum||g;for(r=0;rk&&S.splice(k,S.length-k)}return o(e),s(A,e),A}},{"../../plots/cartesian/axes":729,"../scatter/arrays_to_calcdata":946,"../scatter/colorscale_calc":951,"../scatter/subtypes":967,"fast-isnumeric":123}],996:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../scatter/constants"),a=t("../scatter/subtypes"),o=t("../scatter/marker_defaults"),s=t("../scatter/line_defaults"),l=t("../scatter/line_shape_defaults"),u=t("../scatter/text_defaults"),c=t("../scatter/fillcolor_defaults"),h=t("./attributes");e.exports=function(t,e,r,f){function d(r,i){return n.coerce(t,e,h,r,i)}var p,m=d("a"),g=d("b"),v=d("c");if(m?(p=m.length,g?(p=Math.min(p,g.length),v&&(p=Math.min(p,v.length))):p=v?Math.min(p,v.length):0):g&&v&&(p=Math.min(g.length,v.length)),!p)return void(e.visible=!1);m&&p"),s}}},{"../../plots/cartesian/axes":729,"../scatter/hover":956}],998:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.moduleType="trace",n.name="scatterternary",n.basePlotModule=t("../../plots/ternary"),n.categories=["ternary","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/ternary":800,"../scatter/colorbar":950,"./attributes":994,"./calc":995,"./defaults":996,"./hover":997,"./plot":999,"./select":1e3,"./style":1001}],999:[function(t,e,r){"use strict";var n=t("../scatter/plot");e.exports=function(t,e){var r=t.plotContainer;r.select(".scatterlayer").selectAll("*").remove();for(var i={xaxis:t.xaxis,yaxis:t.yaxis,plot:r},a=0;a":return function(t){return u(t)>i};case">=":return function(t){return u(t)>=i};case"[]":return function(t){var e=u(t);return e>=i[0]&&e<=i[1]};case"()":return function(t){var e=u(t);return e>i[0]&&e=i[0]&&ei[0]&&e<=i[1]};case"][":return function(t){var e=u(t);return e<=i[0]||e>=i[1]};case")(":return function(t){var e=u(t);return ei[1]};case"](":return function(t){var e=u(t);return e<=i[0]||e>i[1]};case")[":return function(t){var e=u(t);return e=i[1]};case"{}":return function(t){return-1!==i.indexOf(u(t))};case"}{":return function(t){return-1===i.indexOf(u(t))}}}var o=t("../lib"),s=t("../registry"),l=t("../plot_api/plot_schema"),u=t("../plots/cartesian/axis_ids"),c=t("../plots/cartesian/axis_autotype"),h=t("../plots/cartesian/set_convert"),f=["=","<",">=",">","<="],d=["[]","()","[)","(]","][",")(","](",")["],p=["{}","}{"];r.moduleType="transform",r.name="filter",r.attributes={enabled:{valType:"boolean",dflt:!0},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x"},operation:{valType:"enumerated",values:[].concat(f).concat(d).concat(p),dflt:"="},value:{valType:"any",dflt:0}},r.supplyDefaults=function(t){function e(e,i){return o.coerce(t,n,r.attributes,e,i)}var n={};if(e("enabled")){e("operation"),e("value"),e("target");var i=s.getComponentMethod("calendars","handleDefaults");i(t,n,"valuecalendar",null),i(t,n,"targetcalendar",null)}return n},r.calcTransform=function(t,e,r){if(r.enabled){var s=r.target,u=n(e,s),c=u.length;if(c){var h=r.targetcalendar;if("string"==typeof s){var f=o.nestedProperty(e,s+"calendar").get();f&&(h=f)}for(var d="x"===s||"y"===s||"z"===s?s:u,p=i(t,e,d),m=a(r,p,h),g=l.findArrayAttributes(e),v={},y=0;yMath.abs(e))u.rotate(o,0,0,-t*n*Math.PI*p.rotateSpeed/window.innerWidth);else{var s=p.zoomSpeed*a*e/window.innerHeight*(o-u.lastT())/100;u.pan(o,0,0,h*(Math.exp(s)-1))}},!0),p}e.exports=n;var i=t("right-now"),a=t("3d-view"),o=t("mouse-change"),s=t("mouse-wheel"),l=t("mouse-event-offset")},{"3d-view":33,"mouse-change":434,"mouse-event-offset":435,"mouse-wheel":437,"right-now":483}],33:[function(t,e,r){"use strict";function n(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}function i(t){t=t||{};var e=t.eye||[0,0,1],r=t.center||[0,0,0],i=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],u=t.mode||"turntable",c=a(),h=o(),f=s();return c.setDistanceLimits(l[0],l[1]),c.lookAt(0,e,r,i),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,i),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,i),new n({turntable:c,orbit:h,matrix:f},u)}e.exports=i;var a=t("turntable-camera-controller"),o=t("orbit-camera-controller"),s=t("matrix-camera-controller"),l=n.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n>16&255,r[1]=n>>8&255,r[2]=255&n):h.test(t)&&(n=t.match(f),r[0]=parseInt(n[1]),r[1]=parseInt(n[2]),r[2]=parseInt(n[3])),!e)for(var i=0;i<3;++i)r[i]=r[i]/255;return r}function u(t,e){var r,n;if("string"!=typeof t)return t;if(r=[],"#"===t[0]?(t=t.substr(1),3===t.length&&(t+=t),n=parseInt(t,16),r[0]=n>>16&255,r[1]=n>>8&255,r[2]=255&n):h.test(t)&&(n=t.match(f),r[0]=parseInt(n[1]),r[1]=parseInt(n[2]),r[2]=parseInt(n[3]),n[4]?r[3]=parseFloat(n[4]):r[3]=1),!e)for(var i=0;i<3;++i)r[i]=r[i]/255;return r}var c={},h=/^rgba?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*(,.*)?\)$/,f=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(.*)?\)$/;return c.isPlainObject=t,c.linspace=e,c.zip3=n,c.sum=i,c.zip=r,c.isEqual=s,c.copy2D=a,c.copy1D=o,c.str2RgbArray=l,c.str2RgbaArray=u,c}()},{}],40:[function(t,e,r){(function(r){"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i=0;s--)if(l[s]!==u[s])return!1;for(s=l.length-1;s>=0;s--)if(o=l[s],!d(t[o],e[o],r,n))return!1;return!0}function g(t,e,r){d(t,e,!0)&&h(t,e,r,"notDeepStrictEqual",g)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&e.call({},t)===!0}function y(t){var e;try{t()}catch(t){e=t}return e}function b(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=y(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&h(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!t&&x.isError(i),s=!t&&i&&!r;if((o&&a&&v(i,r)||s)&&h(i,r,"Got unwanted exception"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}var x=t("util/"),_=Object.prototype.hasOwnProperty,w=Array.prototype.slice,M=function(){return"foo"===function(){}.name}(),k=e.exports=f,A=/\s*function\s+([^\(\s]*)\s*/;k.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var e=t.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=s(e),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},x.inherits(k.AssertionError,Error),k.fail=h,k.ok=f,k.equal=function(t,e,r){t!=e&&h(t,e,r,"==",k.equal)},k.notEqual=function(t,e,r){t==e&&h(t,e,r,"!=",k.notEqual)},k.deepEqual=function(t,e,r){d(t,e,!1)||h(t,e,r,"deepEqual",k.deepEqual)},k.deepStrictEqual=function(t,e,r){d(t,e,!0)||h(t,e,r,"deepStrictEqual",k.deepStrictEqual)},k.notDeepEqual=function(t,e,r){d(t,e,!1)&&h(t,e,r,"notDeepEqual",k.notDeepEqual)},k.notDeepStrictEqual=g,k.strictEqual=function(t,e,r){t!==e&&h(t,e,r,"===",k.strictEqual)},k.notStrictEqual=function(t,e,r){t===e&&h(t,e,r,"!==",k.notStrictEqual)},k.throws=function(t,e,r){b(!0,t,e,r)},k.doesNotThrow=function(t,e,r){b(!1,t,e,r)},k.ifError=function(t){if(t)throw t};var T=Object.keys||function(t){var e=[];for(var r in t)_.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":529}],41:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],42:[function(t,e,r){"use strict";function n(t){for(var e=0,r=0;r0?r=r.ushln(h):h<0&&(c=c.ushln(-h)),l(r,c)}var i=t("./is-rat"),a=t("./lib/is-bn"),o=t("./lib/num-to-bn"),s=t("./lib/str-to-bn"),l=t("./lib/rationalize"),u=t("./div");e.exports=n},{"./div":45,"./is-rat":47,"./lib/is-bn":51,"./lib/num-to-bn":52,"./lib/rationalize":53,"./lib/str-to-bn":54}],47:[function(t,e,r){"use strict";function n(t){return Array.isArray(t)&&2===t.length&&i(t[0])&&i(t[1])}var i=t("./lib/is-bn");e.exports=n},{"./lib/is-bn":51}],48:[function(t,e,r){"use strict";function n(t){return t.cmp(new i(0))}var i=t("bn.js");e.exports=n},{"bn.js":61}],49:[function(t,e,r){"use strict";function n(t){var e=t.length,r=t.words,n=0;if(1===e)n=r[0];else if(2===e)n=r[0]+67108864*r[1];else for(var a=0;a20?52:r+32}var i=t("double-bits"),a=t("bit-twiddle").countTrailingZeros;e.exports=n},{"bit-twiddle":60,"double-bits":109}],51:[function(t,e,r){"use strict";function n(t){return t&&"object"==typeof t&&Boolean(t.words)}t("bn.js");e.exports=n},{"bn.js":61}],52:[function(t,e,r){"use strict";function n(t){var e=a.exponent(t);return e<52?new i(t):new i(t*Math.pow(2,52-e)).ushln(e-52)}var i=t("bn.js"),a=t("double-bits");e.exports=n},{"bn.js":61,"double-bits":109}],53:[function(t,e,r){"use strict";function n(t,e){var r=a(t),n=a(e);if(0===r)return[i(0),i(1)];if(0===n)return[i(0),i(0)];n<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]}var i=t("./num-to-bn"),a=t("./bn-sign");e.exports=n},{"./bn-sign":48,"./num-to-bn":52}],54:[function(t,e,r){"use strict";function n(t){return new i(t)}var i=t("bn.js");e.exports=n},{"bn.js":61}],55:[function(t,e,r){"use strict";function n(t,e){return i(t[0].mul(e[0]),t[1].mul(e[1]))}var i=t("./lib/rationalize");e.exports=n},{"./lib/rationalize":53}],56:[function(t,e,r){"use strict";function n(t){return i(t[0])*i(t[1])}var i=t("./lib/bn-sign");e.exports=n},{"./lib/bn-sign":48}],57:[function(t,e,r){"use strict";function n(t,e){return i(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}var i=t("./lib/rationalize");e.exports=n},{"./lib/rationalize":53}],58:[function(t,e,r){"use strict";function n(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var n=e.abs().divmod(r.abs()),o=n.div,s=i(o),l=n.mod,u=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return u*s;if(s){var c=a(s)+4,h=i(l.ushln(c).divRound(r));return u*(s+h*Math.pow(2,-c))}var f=r.bitLength()-l.bitLength()+53,h=i(l.ushln(f).divRound(r));return f<1023?u*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),u*h*Math.pow(2,1023-f))}var i=t("./lib/bn-to-num"),a=t("./lib/ctz");e.exports=n},{"./lib/bn-to-num":49,"./lib/ctz":50}],59:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=["function ",t,"(a,l,h,",n.join(","),"){",a?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return a?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),a?o.push("return -1};"):o.push("return i};"),o.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],!1,i),n("B","x"+t+"y",e,["y"],!0,i),n("P","c(x,y)"+t+"0",e,["y","c"],!1,i),n("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],60:[function(t,e,r){"use strict";"use restrict";function n(t){var e=32;return t&=-t,t&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return t-=t>>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},r.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),(t=65535&(t|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),t|r<<2},r.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),(t=1023&(t|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],61:[function(t,e,r){!function(e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}function o(t,e,r){for(var n=0,i=Math.min(t.length,r),a=e;a=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function s(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}function l(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}function u(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,h=67108863&l,f=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=f;d++){var p=u-d|0;i=0|t.words[p],a=0|e.words[d],o=i*a+h,c+=o/67108864|0,h=67108863&o}r.words[u]=0|h,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}function c(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function h(t,e,r){return(new f).mulp(t,e,r)}function f(t,e){this.x=t,this.y=e}function d(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function b(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var x;try{x=t("buffer").Buffer}catch(t){}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=o(t,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=o(t,e,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,l=Math.min(a,a-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var i=0,a=0,o=0;o>>24-i&16777215,r=0!==a||o!==this.length-1?_[6-l.length]+l+r:l+r,i+=2,i>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=w[t],c=M[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var f=h.modn(c).toString(t);h=h.idivn(c),r=h.isZero()?f+r:_[u-f.length]+f+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==x),this.toArrayLike(x,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,u=new t(a),c=this.clone();if(l){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],x=8191&b,_=b>>>13,w=0|o[4],M=8191&w,k=w>>>13,A=0|o[5],T=8191&A,S=A>>>13,E=0|o[6],L=8191&E,C=E>>>13,z=0|o[7],D=8191&z,I=z>>>13,P=0|o[8],O=8191&P,j=P>>>13,R=0|o[9],F=8191&R,N=R>>>13,B=0|s[0],U=8191&B,V=B>>>13,H=0|s[1],q=8191&H,G=H>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,Z=0|s[3],J=8191&Z,Q=Z>>>13,K=0|s[4],$=8191&K,tt=K>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ut=st>>>13,ct=0|s[8],ht=8191&ct,ft=ct>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,V),i=i+Math.imul(f,U)|0,a=Math.imul(f,V);var gt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=Math.imul(p,V),i=i+Math.imul(m,U)|0,a=Math.imul(m,V),n=n+Math.imul(h,q)|0,i=i+Math.imul(h,G)|0,i=i+Math.imul(f,q)|0,a=a+Math.imul(f,G)|0;var vt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=Math.imul(v,V),i=i+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(p,q)|0,i=i+Math.imul(p,G)|0,i=i+Math.imul(m,q)|0,a=a+Math.imul(m,G)|0,n=n+Math.imul(h,W)|0,i=i+Math.imul(h,X)|0,i=i+Math.imul(f,W)|0,a=a+Math.imul(f,X)|0;var yt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(x,U),i=Math.imul(x,V),i=i+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(v,q)|0,i=i+Math.imul(v,G)|0,i=i+Math.imul(y,q)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=i+Math.imul(p,X)|0,i=i+Math.imul(m,W)|0,a=a+Math.imul(m,X)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,Q)|0,i=i+Math.imul(f,J)|0,a=a+Math.imul(f,Q)|0;var bt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,U),i=Math.imul(M,V),i=i+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(x,q)|0,i=i+Math.imul(x,G)|0,i=i+Math.imul(_,q)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=i+Math.imul(v,X)|0,i=i+Math.imul(y,W)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,Q)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,Q)|0,n=n+Math.imul(h,$)|0,i=i+Math.imul(h,tt)|0,i=i+Math.imul(f,$)|0,a=a+Math.imul(f,tt)|0;var xt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(T,U),i=Math.imul(T,V),i=i+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(M,q)|0,i=i+Math.imul(M,G)|0,i=i+Math.imul(k,q)|0,a=a+Math.imul(k,G)|0,n=n+Math.imul(x,W)|0,i=i+Math.imul(x,X)|0,i=i+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,Q)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,Q)|0,n=n+Math.imul(p,$)|0,i=i+Math.imul(p,tt)|0,i=i+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0,n=n+Math.imul(h,rt)|0,i=i+Math.imul(h,nt)|0,i=i+Math.imul(f,rt)|0,a=a+Math.imul(f,nt)|0;var _t=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,U),i=Math.imul(L,V),i=i+Math.imul(C,U)|0,a=Math.imul(C,V),n=n+Math.imul(T,q)|0,i=i+Math.imul(T,G)|0,i=i+Math.imul(S,q)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(M,W)|0,i=i+Math.imul(M,X)|0,i=i+Math.imul(k,W)|0,a=a+Math.imul(k,X)|0,n=n+Math.imul(x,J)|0,i=i+Math.imul(x,Q)|0,i=i+Math.imul(_,J)|0,a=a+Math.imul(_,Q)|0,n=n+Math.imul(v,$)|0,i=i+Math.imul(v,tt)|0,i=i+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=i+Math.imul(p,nt)|0,i=i+Math.imul(m,rt)|0,a=a+Math.imul(m,nt)|0,n=n+Math.imul(h,at)|0,i=i+Math.imul(h,ot)|0,i=i+Math.imul(f,at)|0,a=a+Math.imul(f,ot)|0;var wt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,U),i=Math.imul(D,V),i=i+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(L,q)|0,i=i+Math.imul(L,G)|0,i=i+Math.imul(C,q)|0,a=a+Math.imul(C,G)|0,n=n+Math.imul(T,W)|0,i=i+Math.imul(T,X)|0,i=i+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(M,J)|0,i=i+Math.imul(M,Q)|0,i=i+Math.imul(k,J)|0,a=a+Math.imul(k,Q)|0,n=n+Math.imul(x,$)|0,i=i+Math.imul(x,tt)|0,i=i+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=i+Math.imul(v,nt)|0,i=i+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(p,at)|0,i=i+Math.imul(p,ot)|0,i=i+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0,n=n+Math.imul(h,lt)|0,i=i+Math.imul(h,ut)|0,i=i+Math.imul(f,lt)|0,a=a+Math.imul(f,ut)|0;var Mt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,U),i=Math.imul(O,V),i=i+Math.imul(j,U)|0,a=Math.imul(j,V),n=n+Math.imul(D,q)|0,i=i+Math.imul(D,G)|0,i=i+Math.imul(I,q)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(L,W)|0,i=i+Math.imul(L,X)|0,i=i+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,Q)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,Q)|0,n=n+Math.imul(M,$)|0,i=i+Math.imul(M,tt)|0,i=i+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=i+Math.imul(x,nt)|0,i=i+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=i+Math.imul(v,ot)|0,i=i+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(p,lt)|0,i=i+Math.imul(p,ut)|0,i=i+Math.imul(m,lt)|0,a=a+Math.imul(m,ut)|0,n=n+Math.imul(h,ht)|0,i=i+Math.imul(h,ft)|0,i=i+Math.imul(f,ht)|0,a=a+Math.imul(f,ft)|0;var kt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,U),i=Math.imul(F,V),i=i+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(O,q)|0,i=i+Math.imul(O,G)|0,i=i+Math.imul(j,q)|0,a=a+Math.imul(j,G)|0,n=n+Math.imul(D,W)|0,i=i+Math.imul(D,X)|0,i=i+Math.imul(I,W)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(L,J)|0,i=i+Math.imul(L,Q)|0,i=i+Math.imul(C,J)|0,a=a+Math.imul(C,Q)|0,n=n+Math.imul(T,$)|0,i=i+Math.imul(T,tt)|0,i=i+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(M,rt)|0,i=i+Math.imul(M,nt)|0,i=i+Math.imul(k,rt)|0,a=a+Math.imul(k,nt)|0,n=n+Math.imul(x,at)|0,i=i+Math.imul(x,ot)|0,i=i+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=i+Math.imul(v,ut)|0,i=i+Math.imul(y,lt)|0,a=a+Math.imul(y,ut)|0,n=n+Math.imul(p,ht)|0,i=i+Math.imul(p,ft)|0,i=i+Math.imul(m,ht)|0,a=a+Math.imul(m,ft)|0,n=n+Math.imul(h,pt)|0,i=i+Math.imul(h,mt)|0,i=i+Math.imul(f,pt)|0,a=a+Math.imul(f,mt)|0;var At=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,q),i=Math.imul(F,G),i=i+Math.imul(N,q)|0,a=Math.imul(N,G),n=n+Math.imul(O,W)|0,i=i+Math.imul(O,X)|0,i=i+Math.imul(j,W)|0,a=a+Math.imul(j,X)|0,n=n+Math.imul(D,J)|0,i=i+Math.imul(D,Q)|0,i=i+Math.imul(I,J)|0,a=a+Math.imul(I,Q)|0,n=n+Math.imul(L,$)|0,i=i+Math.imul(L,tt)|0,i=i+Math.imul(C,$)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=i+Math.imul(T,nt)|0,i=i+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(M,at)|0,i=i+Math.imul(M,ot)|0,i=i+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,n=n+Math.imul(x,lt)|0,i=i+Math.imul(x,ut)|0,i=i+Math.imul(_,lt)|0,a=a+Math.imul(_,ut)|0,n=n+Math.imul(v,ht)|0,i=i+Math.imul(v,ft)|0,i=i+Math.imul(y,ht)|0,a=a+Math.imul(y,ft)|0,n=n+Math.imul(p,pt)|0,i=i+Math.imul(p,mt)|0,i=i+Math.imul(m,pt)|0,a=a+Math.imul(m,mt)|0;var Tt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,W),i=Math.imul(F,X),i=i+Math.imul(N,W)|0,a=Math.imul(N,X),n=n+Math.imul(O,J)|0,i=i+Math.imul(O,Q)|0,i=i+Math.imul(j,J)|0,a=a+Math.imul(j,Q)|0,n=n+Math.imul(D,$)|0,i=i+Math.imul(D,tt)|0,i=i+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(L,rt)|0,i=i+Math.imul(L,nt)|0,i=i+Math.imul(C,rt)|0,a=a+Math.imul(C,nt)|0,n=n+Math.imul(T,at)|0,i=i+Math.imul(T,ot)|0,i=i+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(M,lt)|0,i=i+Math.imul(M,ut)|0,i=i+Math.imul(k,lt)|0,a=a+Math.imul(k,ut)|0,n=n+Math.imul(x,ht)|0,i=i+Math.imul(x,ft)|0,i=i+Math.imul(_,ht)|0,a=a+Math.imul(_,ft)|0,n=n+Math.imul(v,pt)|0,i=i+Math.imul(v,mt)|0,i=i+Math.imul(y,pt)|0,a=a+Math.imul(y,mt)|0;var St=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,J),i=Math.imul(F,Q),i=i+Math.imul(N,J)|0,a=Math.imul(N,Q),n=n+Math.imul(O,$)|0,i=i+Math.imul(O,tt)|0,i=i+Math.imul(j,$)|0,a=a+Math.imul(j,tt)|0,n=n+Math.imul(D,rt)|0,i=i+Math.imul(D,nt)|0,i=i+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(L,at)|0,i=i+Math.imul(L,ot)|0,i=i+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,n=n+Math.imul(T,lt)|0,i=i+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,a=a+Math.imul(S,ut)|0,n=n+Math.imul(M,ht)|0,i=i+Math.imul(M,ft)|0,i=i+Math.imul(k,ht)|0,a=a+Math.imul(k,ft)|0,n=n+Math.imul(x,pt)|0,i=i+Math.imul(x,mt)|0,i=i+Math.imul(_,pt)|0,a=a+Math.imul(_,mt)|0;var Et=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,$),i=Math.imul(F,tt),i=i+Math.imul(N,$)|0,a=Math.imul(N,tt),n=n+Math.imul(O,rt)|0,i=i+Math.imul(O,nt)|0,i=i+Math.imul(j,rt)|0,a=a+Math.imul(j,nt)|0,n=n+Math.imul(D,at)|0,i=i+Math.imul(D,ot)|0,i=i+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(L,lt)|0,i=i+Math.imul(L,ut)|0,i=i+Math.imul(C,lt)|0,a=a+Math.imul(C,ut)|0,n=n+Math.imul(T,ht)|0,i=i+Math.imul(T,ft)|0,i=i+Math.imul(S,ht)|0,a=a+Math.imul(S,ft)|0,n=n+Math.imul(M,pt)|0,i=i+Math.imul(M,mt)|0,i=i+Math.imul(k,pt)|0,a=a+Math.imul(k,mt)|0;var Lt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(F,rt),i=Math.imul(F,nt),i=i+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(O,at)|0,i=i+Math.imul(O,ot)|0,i=i+Math.imul(j,at)|0,a=a+Math.imul(j,ot)|0,n=n+Math.imul(D,lt)|0,i=i+Math.imul(D,ut)|0,i=i+Math.imul(I,lt)|0,a=a+Math.imul(I,ut)|0,n=n+Math.imul(L,ht)|0,i=i+Math.imul(L,ft)|0,i=i+Math.imul(C,ht)|0,a=a+Math.imul(C,ft)|0,n=n+Math.imul(T,pt)|0,i=i+Math.imul(T,mt)|0,i=i+Math.imul(S,pt)|0,a=a+Math.imul(S,mt)|0;var Ct=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,at),i=Math.imul(F,ot),i=i+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(O,lt)|0,i=i+Math.imul(O,ut)|0,i=i+Math.imul(j,lt)|0,a=a+Math.imul(j,ut)|0,n=n+Math.imul(D,ht)|0,i=i+Math.imul(D,ft)|0,i=i+Math.imul(I,ht)|0,a=a+Math.imul(I,ft)|0,n=n+Math.imul(L,pt)|0,i=i+Math.imul(L,mt)|0,i=i+Math.imul(C,pt)|0,a=a+Math.imul(C,mt)|0;var zt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(F,lt),i=Math.imul(F,ut),i=i+Math.imul(N,lt)|0,a=Math.imul(N,ut),n=n+Math.imul(O,ht)|0,i=i+Math.imul(O,ft)|0,i=i+Math.imul(j,ht)|0,a=a+Math.imul(j,ft)|0,n=n+Math.imul(D,pt)|0,i=i+Math.imul(D,mt)|0,i=i+Math.imul(I,pt)|0,a=a+Math.imul(I,mt)|0;var Dt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(F,ht),i=Math.imul(F,ft),i=i+Math.imul(N,ht)|0,a=Math.imul(N,ft),n=n+Math.imul(O,pt)|0,i=i+Math.imul(O,mt)|0,i=i+Math.imul(j,pt)|0,a=a+Math.imul(j,mt)|0;var It=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,pt),i=Math.imul(F,mt),i=i+Math.imul(N,pt)|0,a=Math.imul(N,mt);var Pt=(u+n|0)+((8191&i)<<13)|0;return u=(a+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,l[0]=gt,l[1]=vt,l[2]=yt,l[3]=bt,l[4]=xt,l[5]=_t,l[6]=wt,l[7]=Mt,l[8]=kt,l[9]=At,l[10]=Tt,l[11]=St,l[12]=Et,l[13]=Lt,l[14]=Ct,l[15]=zt,l[16]=Dt,l[17]=It,l[18]=Pt,0!==u&&(l[19]=u,r.length++),r};Math.imul||(k=u),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?k(this,t,e):r<63?u(this,t,e):r<1024?c(this,t,e):h(this,t,e)},f.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},f.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=l(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0);var i;i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-a|h>>>a,c=h&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(s===-1),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){s=new a(null),s.length=l+1,s.words=new Array(s.length);for(var u=0;u=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=f)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){if(n(!t.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var i,o,s;return 0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0==(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(c),l.isub(h)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(u)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0==(e.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(e.iushrn(l);l-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var c=0,h=1;0==(r.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o)):(r.isub(e),o.isub(i))}var f;return f=0===e.cmpn(1)?i:o,f.cmpn(0)<0&&f.iadd(t),f},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];r=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return this.cmpn(t)===-1},a.prototype.lt=function(t){return this.cmp(t)===-1},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new y(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};d.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},d.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},d.prototype.split=function(t,e){t.iushrn(this.n,0,e)},d.prototype.imulK=function(t){return t.imul(this.k)},i(p,d),p.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},p.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new m;else if("p192"===t)e=new g;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new v}return A[t]=e,e},y.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},y.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},y.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},y.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},y.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},y.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},y.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=o;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var u=e.words[n],c=l-1;c>=0;c--){var h=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},y.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},y.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new b(t)},i(b,y),b.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},b.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},b.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},b.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},b.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{}],62:[function(t,e,r){"use strict";function n(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(s<=0)){var l,u=h.mallocDouble(2*s*a),c=h.mallocInt32(a);if((a=i(t,s,u,c))>0){if(1===s&&n)f.init(a),l=f.sweepComplete(s,r,0,a,u,c,0,a,u,c);else{var p=h.mallocDouble(2*s*o),m=h.mallocInt32(o);o=i(e,s,p,m),o>0&&(f.init(a+o),l=1===s?f.sweepBipartite(s,r,0,a,u,c,0,o,p,m):d(s,r,n,a,u,c,o,p,m),h.free(p),h.free(m))}h.free(u),h.free(c)}return l}}}function o(t,e){c.push([t,e])}function s(t){return c=[],a(t,t,o,!0),c}function l(t,e){return c=[],a(t,e,o,!1),c}function u(t,e,r){switch(arguments.length){case 1:return s(t);case 2:return"function"==typeof e?a(t,t,e,!0):l(t,e);case 3:return a(t,e,r,!1);default:throw new Error("box-intersect: Invalid arguments")}}e.exports=u;var c,h=t("typedarray-pool"),f=t("./lib/sweep"),d=t("./lib/intersect")},{"./lib/intersect":65,"./lib/sweep":69,"typedarray-pool":521}],64:[function(t,e,r){"use strict";function n(t,e,r){var n="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(r?"Full":""),i=["function ",n,"(",w.join(),"){","var ",u,"=2*",a,";"],l="for(var i="+c+","+p+"="+u+"*"+c+";i<"+h+";++i,"+p+"+="+u+"){var x0="+f+"["+o+"+"+p+"],x1="+f+"["+o+"+"+p+"+"+a+"],xi="+d+"[i];",M="for(var j="+m+","+b+"="+u+"*"+m+";j<"+g+";++j,"+b+"+="+u+"){var y0="+v+"["+o+"+"+b+"],"+(r?"y1="+v+"["+o+"+"+b+"+"+a+"],":"")+"yi="+y+"[j];";return t?i.push(l,_,":",M):i.push(M,_,":",l),r?i.push("if(y1"+g+"-"+m+"){"),t?(e(!0,!1),o.push("}else{"),e(!1,!1)):(o.push("if("+l+"){"),e(!0,!0),o.push("}else{"),e(!0,!1),o.push("}}else{if("+l+"){"),e(!1,!0),o.push("}else{"),e(!1,!1),o.push("}")),o.push("}}return "+r);var s=i.join("")+o.join("");return new Function(s)()}var a="d",o="ax",s="vv",l="fp",u="es",c="rs",h="re",f="rb",d="ri",p="rp",m="bs",g="be",v="bb",y="bi",b="bp",x="rv",_="Q",w=[a,o,s,c,h,f,d,m,g,v,y];r.partial=i(!1),r.full=i(!0)},{}],65:[function(t,e,r){"use strict";function n(t,e){var r=8*u.log2(e+1)*(t+1)|0,n=u.nextPow2(A*r);S.length0;){z-=1;var I=z*A,P=S[I],O=S[I+1],j=S[I+2],R=S[I+3],F=S[I+4],N=S[I+5],B=z*T,U=E[B],V=E[B+1],H=1&N,q=!!(16&N),G=l,Y=u,W=m,X=L;if(H&&(G=m,Y=L,W=l,X=u),!(2&N&&(j=_(t,P,O,j,G,Y,V),O>=j)||4&N&&(O=w(t,P,O,j,G,Y,U))>=j)){var Z=j-O,J=F-R;if(q){if(t*Z*(Z+J)=p0)&&!(p1>=hi)",["p0","p1"]),x=m("lo===p0",["p0"]),_=m("lor&&i[h+e]>u;--c,h-=o){for(var f=h,d=h+o,p=0;p>>1,f=2*t,d=h,p=a[f*h+e];u=b?(d=y,p=b):v>=_?(d=g,p=v):(d=x,p=_):b>=_?(d=y,p=b):_>=v?(d=g,p=v):(d=x,p=_);for(var w=f*(c-1),M=f*d,k=0;k=0&&n.push("lo=e[k+n]"),t.indexOf("hi")>=0&&n.push("hi=e[k+o]"),r.push(i.replace("_",n.join()).replace("$",t)),Function.apply(void 0,r)}e.exports=n;var i="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],68:[function(t,e,r){"use strict";function n(t,e){e<=4*f?i(0,e-1,t):h(0,e-1,t)}function i(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var u=r[l-2],c=r[l-1];if(ur[e+1])}function c(t,e,r,n){t*=2;var i=n[t];return i>1,g=m-n,v=m+n,y=d,b=g,x=m,_=v,w=p,M=t+1,k=e-1,A=0;u(y,b,r)&&(A=y,y=b,b=A),u(_,w,r)&&(A=_,_=w,w=A),u(y,x,r)&&(A=y,y=x,x=A),u(b,x,r)&&(A=b,b=x,x=A),u(y,_,r)&&(A=y,y=_,_=A),u(x,_,r)&&(A=x,x=_,_=A),u(b,w,r)&&(A=b,b=w,w=A),u(b,x,r)&&(A=b,b=x,x=A),u(_,w,r)&&(A=_,_=w,w=A);for(var T=r[2*b],S=r[2*b+1],E=r[2*_],L=r[2*_+1],C=2*y,z=2*x,D=2*w,I=2*d,P=2*m,O=2*p,j=0;j<2;++j){var R=r[C+j],F=r[z+j],N=r[D+j];r[I+j]=R,r[P+j]=F,r[O+j]=N}o(g,t,r),o(v,e,r);for(var B=M;B<=k;++B)if(c(B,T,S,r))B!==M&&a(B,M,r),++M;else if(!c(B,E,L,r))for(;;){if(c(k,E,L,r)){c(k,T,S,r)?(s(B,M,k,r),++M,--k):(a(B,k,r),--k);break}if(--k>>1;f(x,S);for(var E=0,L=0,M=0;M=d)C=C-d|0,i(g,v,L--,C);else if(C>=0)i(p,m,E--,C);else if(C<=-d){C=-C-d|0;for(var z=0;z>>1;f(x,E);for(var L=0,C=0,z=0,k=0;k>1==x[2*k+3]>>1&&(I=2,k+=1),D<0){for(var P=-(D>>1)-1,O=0;O>1)-1;0===I?i(p,m,L--,P):1===I?i(g,v,C--,P):2===I&&i(y,b,z--,P)}}}function l(t,e,r,n,o,s,l,u,c,h,g,v){var y=0,b=2*t,_=e,w=e+t,M=1,k=1;n?k=d:M=d;for(var A=o;A>>1;f(x,L);for(var C=0,A=0;A=d?(D=!n,T-=d):(D=!!n,T-=1),D)a(p,m,C++,T);else{var I=v[T],P=b*T,O=g[P+e+1],j=g[P+e+1+t];t:for(var R=0;R>>1;f(x,M);for(var k=0,y=0;y=d)p[k++]=b-d;else{b-=1;var T=c[b],S=m*b,E=u[S+e+1],L=u[S+e+1+t];t:for(var C=0;C=0;--C)if(p[C]===b){for(var P=C+1;PZ)throw new RangeError("Invalid typed array length");var e=new Uint8Array(t);return e.__proto__=i.prototype,e}function i(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(t)}return a(t,e,r)}function a(t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return t instanceof ArrayBuffer?h(t,e,r):"string"==typeof t?u(t,e):f(t)}function o(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function s(t,e,r){return o(t),t<=0?n(t):void 0!==e?"string"==typeof r?n(t).fill(e,r):n(t).fill(e):n(t)}function l(t){return o(t),n(t<0?0:0|d(t))}function u(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!i.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(t,e),a=n(r),o=a.write(t,e);return o!==r&&(a=a.slice(0,o)),a}function c(t){for(var e=t.length<0?0:0|d(t.length),r=n(e),i=0;i=Z)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z.toString(16)+" bytes");return 0|t}function p(t){return+t!=t&&(t=0),i.alloc(+t)}function m(t,e){if(i.isBuffer(t))return t.length;if(G(t)||t instanceof ArrayBuffer)return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return B(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return z(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,a){if(0===t.length)return-1;if("string"==typeof r?(n=r, +r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Y(r)&&(r=a?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(a)return-1;r=t.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof e&&(e=i.from(e,n)),i.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,a);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,a);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){function a(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}var u;if(i){var c=-1;for(u=r;us&&(r=s-l),u=r;u>=0;u--){for(var h=!0,f=0;fi&&(n=i):n=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=r){var l,u,c,h;switch(s){case 1:a<128&&(o=a);break;case 2:l=t[i+1],128==(192&l)&&(h=(31&a)<<6|63&l)>127&&(o=h);break;case 3:l=t[i+1],u=t[i+2],128==(192&l)&&128==(192&u)&&(h=(15&a)<<12|(63&l)<<6|63&u)>2047&&(h<55296||h>57343)&&(o=h);break;case 4:l=t[i+1],u=t[i+2],c=t[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(h=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&h<1114112&&(o=h)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return E(n)}function E(t){var e=t.length;if(e<=J)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,r,n,a,o){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||et.length)throw new RangeError("Index out of range")}function O(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,r,n,23,4),r+4}function R(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,r,n,52,8),r+8}function F(t){if(t=t.trim().replace(Q,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function U(t){for(var e=[],r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function H(t){return W.toByteArray(F(t))}function q(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function G(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function Y(t){return t!==t}var W=t("base64-js"),X=t("ieee754");r.Buffer=i,r.SlowBuffer=p,r.INSPECT_MAX_BYTES=50;var Z=2147483647;r.kMaxLength=Z,i.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(t,e,r){return a(t,e,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(t,e,r){return s(t,e,r)},i.allocUnsafe=function(t){return l(t)},i.allocUnsafeSlow=function(t){return l(t)},i.isBuffer=function(t){return null!=t&&t._isBuffer===!0},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,a=0,o=Math.min(r,n);a0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},i.prototype.compare=function(t,e,r,n,a){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),e<0||r>t.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&e>=r)return 0;if(n>=a)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,a>>>=0,this===t)return 0;for(var o=a-n,s=r-e,l=Math.min(o,s),u=this.slice(n,a),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return M(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;i.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},i.prototype.readUInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a=i&&(n-=Math.pow(2,8*e)),n},i.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*e)),a},i.prototype.readInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},i.prototype.readInt16LE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return t>>>=0,e||I(t,4,this.length),X.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return t>>>=0,e||I(t,4,this.length),X.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return t>>>=0,e||I(t,8,this.length),X.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return t>>>=0,e||I(t,8,this.length),X.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},i.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},i.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},i.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},i.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},i.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeFloatLE=function(t,e,r){return j(this,t,e,!0,r)},i.prototype.writeFloatBE=function(t,e,r){return j(this,t,e,!1,r)},i.prototype.writeDoubleLE=function(t,e,r){return R(this,t,e,!0,r)},i.prototype.writeDoubleBE=function(t,e,r){return R(this,t,e,!1,r)},i.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return 3*t.length/4-n(t)}function a(t){var e,r,i,a,o,s,l=t.length;o=n(t),s=new h(3*l/4-o),i=o>0?l-4:l;var u=0;for(e=0,r=0;e>16&255,s[u++]=a>>8&255,s[u++]=255&a;return 2===o?(a=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,s[u++]=255&a):1===o&&(a=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,s[u++]=a>>8&255,s[u++]=255&a),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function s(t,e,r){for(var n,i=[],a=e;al?l:o+16383));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),a.push(i),a.join("")}r.byteLength=i,r.toByteArray=a,r.fromByteArray=l;for(var u=[],c=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=f.length;d0;){for(var c=r.pop(),s=r.pop(),h=-1,f=-1,l=o[s],p=1;p=0||(e.flip(s,c),n(t,e,r,h,s,f),n(t,e,r,s,f,h),n(t,e,r,f,c,h),n(t,e,r,c,h,f)))}}var a=t("robust-in-sphere")[4];t("binary-search-bounds");e.exports=i},{"binary-search-bounds":77,"robust-in-sphere":487}],74:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function i(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}function a(t,e){for(var r=t.cells(),a=r.length,o=0;o0||l.length>0;){for(;s.length>0;){var d=s.pop();if(u[d]!==-i){u[d]=i;for(var p=(c[d],0);p<3;++p){var m=f[3*d+p];m>=0&&0===u[m]&&(h[3*d+p]?l.push(m):(s.push(m),u[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var v=o(c,u,e);return r?v.concat(n.boundary):v}var l=t("binary-search-bounds");e.exports=s,n.prototype.locate=function(){var t=[0,0,0];return function(e,r,n){var a=e,o=r,s=n;return r1&&d(r[c[h-2]],r[c[h-1]],n)>0;)t.push([c[h-1],c[h-2],i]),h-=1;c.length=h,c.push(i);for(var p=u.upperIds,h=p.length;h>1&&d(r[p[h-2]],r[p[h-1]],n)<0;)t.push([p[h-2],p[h-1],i]),h-=1;p.length=h,p.push(i)}}function l(t,e){var r;return(r=t.a[0]v[0]&&l.push(new i(v,d,g,h),new i(d,v,m,h))}l.sort(a);for(var y=l[0].a[0]-(1+Math.abs(l[0].a[0]))*Math.pow(2,-52),b=[new n([y,1],[y,0],-1,[],[],[],[])],x=[],h=0,_=l.length;h<_;++h){var w=l[h],M=w.type;M===p?s(x,b,t,w.a,w.idx):M===g?u(b,t,w):c(b,t,w)}return x}var f=t("binary-search-bounds"),d=t("robust-orientation")[3],p=0,m=1,g=2;e.exports=h},{"binary-search-bounds":77,"robust-orientation":489}],76:[function(t,e,r){"use strict";function n(t,e){this.stars=t,this.edges=e}function i(t,e,r){for(var n=1,i=t.length;n=0}}(),s.removeTriangle=function(t,e,r){var n=this.stars;i(n[t],e,r),i(n[e],r,t),i(n[r],t,e)},s.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},s.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n>>1,x=a[m]"];return i?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),r?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),i?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],i),n("P","c(x,y)"+t+"0",e,["y","c"],i),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],78:[function(t,e,r){"use strict";function n(t){for(var e=1,r=1;rr?r:t:te?e:t}e.exports=n},{}],82:[function(t,e,r){"use strict";function n(t){var e=_(t);return[M(e,-1/0),M(e,1/0)]}function i(t,e){for(var r=new Array(e.length),n=0;n=0;--a){var p=n[a];o=p[0];var m=e[o],g=m[0],v=m[1],y=t[g],M=t[v];if((y[0]-M[0]||y[1]-M[1])<0){var A=g;g=v,v=A}m[0]=g;var T,S=m[1]=p[1];for(i&&(T=m[2]);a>0&&n[a-1][0]===o;){var p=n[--a],E=p[1];i?e.push([S,E,T]):e.push([S,E]),S=E}i?e.push([S,v,T]):e.push([S,v])}return s}function u(t,e,r){for(var i=e.length,a=new g(i),o=[],s=0;se[2]?1:0)}function f(t,e,r){if(0!==t.length){if(e)for(var n=0;n0||d.length>0)}function m(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a10&&/[0-9](?:\s|\/)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),r=t.match(/([a-z])/gi).join("").toLowerCase());else"number"==typeof t?(r="rgb",n=[t>>>16,(65280&t)>>>8,255&t]):a(t)?(null!=t.r?(n=[t.r,t.g,t.b],r="rgb"):null!=t.red?(n=[t.red,t.green,t.blue],r="rgb"):null!=t.h?(n=[t.h,t.s,t.l],r="hsl"):null!=t.hue&&(n=[t.hue,t.saturation,t.lightness],r="hsl"),null!=t.a?s=t.a:null!=t.alpha?s=t.alpha:null!=t.opacity&&(s=t.opacity/100)):(Array.isArray(t)||ArrayBuffer.isView(t))&&(n=[t[0],t[1],t[2]],r="rgb",s=4===t.length?t[3]:1);return{space:r,values:n,alpha:s}}e.exports=n;var i=t("color-name"),a=t("is-plain-obj"),o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},{"color-name":86,"is-plain-obj":279}],88:[function(t,e,r){"use strict";var n=t("color-parse"),i=t("color-space/hsl"),a=t("clamp");e.exports=function(t,e){null==e&&(e=!0);var r=n(t);if(!r.space)return[];if(Array.isArray(t))return t;var o,s=r.values,l=s.length;for(o=0;o1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[u]=255*a;return i}},n.hsl=function(t){var e,r,n,i=t[0]/255,a=t[1]/255,o=t[2]/255,s=Math.min(i,a,o),l=Math.max(i,a,o),u=l-s;return l===s?e=0:i===l?e=(a-o)/u:a===l?e=2+(o-i)/u:o===l&&(e=4+(i-a)/u),e=Math.min(60*e,360),e<0&&(e+=360),n=(s+l)/2,r=l===s?0:n<=.5?u/(l+s):u/(2-l-s),[e,100*r,100*n]}},{"./rgb":90}],90:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],91:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:0,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],92:[function(t,e,r){"use strict";function n(t){var e,r,n,u,c,h,f,d,p,m,g,v,y,b=[],x=[],_=[],w=[];if(o.isPlainObject(t)||(t={}),p=t.nshades||72,d=t.format||"hex",f=t.colormap,f||(f="jet"),"string"==typeof f){if(f=f.toLowerCase(),!l[f])throw Error(f+" not a supported colorscale");h=s(l[f])}else{if(!Array.isArray(f))throw Error("unsupported colormap option",f);h=s(f)}if(h.length>p)throw new Error(f+" map requires nshades to be at least size "+h.length);for(g=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:s(t.alpha):"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=h.map(function(t){return Math.round(t.index*p)}),g[0]<0&&(g[0]=0),g[1]<0&&(g[0]=0),g[0]>1&&(g[0]=1),g[1]>1&&(g[0]=1),y=0;y=0&&r[3]<=1||(r[3]=g[0]+(g[1]-g[0])*v);for(y=0;y=0}function i(t,e,r,i){var s=a(e,r,i);if(0===s){var l=o(a(t,e,r)),u=o(a(t,e,i));if(l===u){if(0===l){var c=n(t,e,r);return c===n(t,e,i)?0:c?1:-1}return 0}return 0===u?l>0?-1:n(t,e,i)?-1:1:0===l?u>0?1:n(t,e,r)?1:-1:o(u-l)}var h=a(t,e,r);return h>0?s>0&&a(t,e,i)>0?1:-1:h<0?s>0||a(t,e,i)>0?1:-1:a(t,e,i)>0?1:n(t,e,r)?1:-1}e.exports=i;var a=t("robust-orientation"),o=t("signum"),s=t("two-sum"),l=t("robust-product"),u=t("robust-sum")},{"robust-orientation":489,"robust-product":490,"robust-sum":494,signum:496,"two-sum":520}],94:[function(t,e,r){function n(t,e){return t-e}function i(t,e){var r=t.length,i=t.length-e.length;if(i)return i;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||a(t[0],t[1])-a(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(i=o+t[2]-(s+e[2]))return i;var l=a(t[0],t[1]),u=a(e[0],e[1]);return a(l,t[2])-a(u,e[2])||a(l+t[2],o)-a(u+e[2],s);case 4:var c=t[0],h=t[1],f=t[2],d=t[3],p=e[0],m=e[1],g=e[2],v=e[3];return c+h+f+d-(p+m+g+v)||a(c,h,f,d)-a(p,m,g,v,p)||a(c+h,c+f,c+d,h+f,h+d,f+d)-a(p+m,p+g,p+v,m+g,m+v,g+v)||a(c+h+f,c+h+d,c+f+d,h+f+d)-a(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var y=t.slice().sort(n),b=e.slice().sort(n),x=0;xt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}e.exports=n},{}],98:[function(t,e,r){"use strict";function n(t){var e=i(t),r=e.length;if(r<=2)return[];for(var n=new Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}function a(t,e){try{return o(t,!0)}catch(u){var r=s(t);if(r.length<=e)return[];var a=n(t,r),l=o(a,!0);return i(l,r)}}e.exports=a;var o=t("incremental-convex-hull"),s=t("affine-hull")},{"affine-hull":36,"incremental-convex-hull":273}],100:[function(t,e,r){e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],101:[function(t,e,r){function n(t){return t=Math.round(t),t<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return n("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return i("%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function l(t){var e=t.replace(/ /g,"").toLowerCase();if(e in u)return u[e].slice();if("#"===e[0]){if(4===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=4095?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null}if(7===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=16777215?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null}return null}var i=e.indexOf("("),l=e.indexOf(")");if(i!==-1&&l+1===e.length){var c=e.substr(0,i),h=e.substr(i+1,l-(i+1)).split(","),f=1;switch(c){case"rgba":if(4!==h.length)return null;f=o(h.pop());case"rgb":return 3!==h.length?null:[a(h[0]),a(h[1]),a(h[2]),f];case"hsla":if(4!==h.length)return null;f=o(h.pop());case"hsl":if(3!==h.length)return null;var d=(parseFloat(h[0])%360+360)%360/360,p=o(h[1]),m=o(h[2]),g=m<=.5?m*(p+1):m+p-m*p,v=2*m-g;return[n(255*s(v,g,d+1/3)),n(255*s(v,g,d)),n(255*s(v,g,d-1/3)),f];default:return null}}return null}var u={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{r.parseCSSColor=l}catch(t){}},{}],102:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,u=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var c=t.length-1;c>=0;--c)a[c]=o*t[c]+s*e[c]+l*r[c]+u*n[c];return a}return o*t+s*e+l*r[c]+u*n}function i(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,u=(1+2*i)*l,c=i*l,h=s*(3-2*i),f=s*o;if(t.length){a||(a=new Array(t.length));for(var d=t.length-1;d>=0;--d)a[d]=u*t[d]+c*e[d]+h*r[d]+f*n[d];return a}return u*t+c*e+h*r+f*n}e.exports=i,e.exports.derivative=n},{}],103:[function(t,e,r){"use strict";function n(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function i(t){var e=new n;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var i=0;i0)throw new Error("cwise: pre() block may not reference array args");if(i0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)e.scalarArgs.push(i),e.shimArgs.push("scalar"+i);else if("index"===o){if(e.indexArgs.push(i),i0)throw new Error("cwise: pre() block may not reference array index") +;if(i0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(e.shapeArgs.push(i),ir.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,a(e)}var a=t("./lib/thunk.js");e.exports=i},{"./lib/thunk.js":105}],104:[function(t,e,r){"use strict";function n(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],u=[],c=0,h=0;for(n=0;n=0;--n)c=t[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",h,"]-=s",h].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function i(t,e,r,i){for(var a=e.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,u=[],c=0;c0;){"].join("")),u.push(["if(j",c,"<",s,"){"].join("")),u.push(["s",e[c],"=j",c].join("")),u.push(["j",c,"=0"].join("")),u.push(["}else{s",e[c],"=",s].join("")),u.push(["j",c,"-=",s,"}"].join("")),l&&u.push(["index[",e[c],"]=j",c].join(""));for(var c=0;c0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}function l(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,l=new Array(t.arrayArgs.length),c=new Array(t.arrayArgs.length),h=0;h0&&_.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var w=new Array(r),h=0;h3&&x.push(o(t.pre,t,c));var T=o(t.body,t,c),S=a(g);S3&&x.push(o(t.post,t,c)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+x.join("\n")+"\n----------");var E=[t.funcName||"unnamed","_cwise_loop_",l[0].join("s"),"m",S,s(c)].join("");return new Function(["function ",E,"(",b.join(","),"){",x.join("\n"),"} return ",E].join(""))()}var u=t("uniq");e.exports=l},{uniq:523}],105:[function(t,e,r){"use strict";function n(t){var e=["'use strict'","var CACHED={}"],r=[],n=t.funcName+"_cwise_thunk";e.push(["return function ",n,"(",t.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],l=[],u=[],c=0;c0&&(l.push("array"+t.arrayArgs[0]+".shape.length===array"+h+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[c]))),u.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+h+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[c])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),e.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}"));for(var c=0;ce?1:t>=e?0:0/0}function a(t){return null===t?0/0:+t}function o(t){return!isNaN(t)}function s(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}function l(t){return t.length}function u(t){for(var e=1;t*e%1;)e*=10;return e}function c(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function h(){this._=Object.create(null)}function f(t){return(t+="")===_o||t[0]===wo?wo+t:t}function d(t){return(t+="")[0]===wo?t.slice(1):t}function p(t){return f(t)in this._}function m(t){return(t=f(t))in this._&&delete this._[t]}function g(){var t=[];for(var e in this._)t.push(d(e));return t}function v(){var t=0;for(var e in this._)++t;return t}function y(){for(var t in this._)return!1;return!0}function b(){this._=Object.create(null)}function x(t){return t}function _(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function w(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=Mo.length;r=e&&(e=i+1);!(o=s[e])&&++e0&&(t=t.slice(0,s));var u=Io.get(t);return u&&(t=u,l=J),s?e?i:n:e?M:a}function Z(t,e){return function(r){var n=uo.event;uo.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{uo.event=n}}}function J(t,e){var r=Z(t,e);return function(t){var e=this,n=t.relatedTarget;n&&(n===e||8&n.compareDocumentPosition(e))||r.call(e,t)}}function Q(t){var r=".dragsuppress-"+ ++Oo,i="click"+r,a=uo.select(n(t)).on("touchmove"+r,T).on("dragstart"+r,T).on("selectstart"+r,T);if(null==Po&&(Po=!("onselectstart"in t)&&w(t.style,"userSelect")),Po){var o=e(t).style,s=o[Po];o[Po]="none"}return function(t){if(a.on(r,null),Po&&(o[Po]=s),t){var e=function(){a.on(i,null)};a.on(i,function(){T(),e()},!0),setTimeout(e,0)}}}function K(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(jo<0){var a=n(t);if(a.scrollX||a.scrollY){r=uo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();jo=!(o.f||o.e),r.remove()}}return jo?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function $(){return uo.event.changedTouches[0].identifier}function tt(t){return t>0?1:t<0?-1:0}function et(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function rt(t){return t>1?0:t<-1?No:Math.acos(t)}function nt(t){return t>1?Vo:t<-1?-Vo:Math.asin(t)}function it(t){return((t=Math.exp(t))-1/t)/2}function at(t){return((t=Math.exp(t))+1/t)/2}function ot(t){return((t=Math.exp(2*t))-1)/(t+1)}function st(t){return(t=Math.sin(t/2))*t}function lt(){}function ut(t,e,r){return this instanceof ut?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof ut?new ut(t.h,t.s,t.l):Mt(""+t,kt,ut):new ut(t,e,r)}function ct(t,e,r){function n(t){return t>360?t-=360:t<0&&(t+=360),t<60?a+(o-a)*t/60:t<180?o:t<240?a+(o-a)*(240-t)/60:a}function i(t){return Math.round(255*n(t))}var a,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,r=r<0?0:r>1?1:r,o=r<=.5?r*(1+e):r+e-r*e,a=2*r-o,new bt(i(t+120),i(t),i(t-120))}function ht(t,e,r){return this instanceof ht?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof ht?new ht(t.h,t.c,t.l):t instanceof dt?mt(t.l,t.a,t.b):mt((t=At((t=uo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ht(t,e,r)}function ft(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new dt(r,Math.cos(t*=Ho)*e,Math.sin(t)*e)}function dt(t,e,r){return this instanceof dt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof dt?new dt(t.l,t.a,t.b):t instanceof ht?ft(t.h,t.c,t.l):At((t=bt(t)).r,t.g,t.b):new dt(t,e,r)}function pt(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return i=gt(i)*Ko,n=gt(n)*$o,a=gt(a)*ts,new bt(yt(3.2404542*i-1.5371385*n-.4985314*a),yt(-.969266*i+1.8760108*n+.041556*a),yt(.0556434*i-.2040259*n+1.0572252*a))}function mt(t,e,r){return t>0?new ht(Math.atan2(r,e)*qo,Math.sqrt(e*e+r*r),t):new ht(0/0,0/0,t)}function gt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function vt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function yt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function bt(t,e,r){return this instanceof bt?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof bt?new bt(t.r,t.g,t.b):Mt(""+t,bt,ct):new bt(t,e,r)}function xt(t){return new bt(t>>16,t>>8&255,255&t)}function _t(t){return xt(t)+""}function wt(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function Mt(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(St(i[0]),St(i[1]),St(i[2]))}return(a=ns.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function kt(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e0&&l<1?0:n),new ut(n,i,l)}function At(t,e,r){t=Tt(t),e=Tt(e),r=Tt(r);var n=vt((.4124564*t+.3575761*e+.1804375*r)/Ko),i=vt((.2126729*t+.7151522*e+.072175*r)/$o);return dt(116*i-16,500*(n-i),200*(i-vt((.0193339*t+.119192*e+.9503041*r)/ts)))}function Tt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function St(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Et(t){return"function"==typeof t?t:function(){return t}}function Lt(t){return function(e,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),Ct(e,r,t,n)}}function Ct(t,e,r,n){function i(){var t,e=l.status;if(!e&&Dt(l)||e>=200&&e<300||304===e){try{t=r.call(a,l)}catch(t){return void o.error.call(a,t)}o.load.call(a,t)}else o.error.call(a,l)}var a={},o=uo.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(t){var e=uo.event;uo.event=t;try{o.progress.call(a,l)}finally{uo.event=e}},a.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==e?delete s[t]:s[t]=e+"",a)},a.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",a):e},a.responseType=function(t){return arguments.length?(u=t,a):u},a.response=function(t){return r=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(ho(arguments)))}}),a.send=function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),l.open(r,t,!0),null==e||"accept"in s||(s.accept=e+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=u&&(l.responseType=u),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),o.beforesend.call(a,l),l.send(null==n?null:n),a},a.abort=function(){return l.abort(),a},uo.rebind(a,o,"on"),null==n?a:a.get(zt(n))}function zt(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}function Dt(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function It(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i=r+e,a={c:t,t:i,n:null};return as?as.n=a:is=a,as=a,os||(ss=clearTimeout(ss),os=1,ls(Pt)),a}function Pt(){var t=Ot(),e=jt()-t;e>24?(isFinite(e)&&(clearTimeout(ss),ss=setTimeout(Pt,e)),os=0):(os=1,ls(Pt))}function Ot(){for(var t=Date.now(),e=is;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function jt(){for(var t,e=is,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}}function Nt(t){var e=t.decimal,r=t.thousands,n=t.grouping,i=t.currency,a=n&&r?function(t,e){for(var i=t.length,a=[],o=0,s=n[0],l=0;i>0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>e));)s=n[o=(o+1)%n.length];return a.reverse().join(r)}:x;return function(t){var r=cs.exec(t),n=r[1]||" ",o=r[2]||">",s=r[3]||"-",l=r[4]||"",u=r[5],c=+r[6],h=r[7],f=r[8],d=r[9],p=1,m="",g="",v=!1,y=!0;switch(f&&(f=+f.substring(1)),(u||"0"===n&&"="===o)&&(u=n="0",o="="),d){case"n":h=!0,d="g";break;case"%":p=100,g="%",d="f";break;case"p":p=100,g="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(m="0"+d.toLowerCase());case"c":y=!1;case"d":v=!0,f=0;break;case"s":p=-1,d="r"}"$"===l&&(m=i[0],g=i[1]),"r"!=d||f||(d="g"),null!=f&&("g"==d?f=Math.max(1,Math.min(21,f)):"e"!=d&&"f"!=d||(f=Math.max(0,Math.min(20,f)))),d=hs.get(d)||Bt;var b=u&&h;return function(t){var r=g;if(v&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===s?"":s;if(p<0){var l=uo.formatPrefix(t,f);t=l.scale(t),r=l.symbol+g}else t*=p;t=d(t,f);var x,_,w=t.lastIndexOf(".");if(w<0){var M=y?t.lastIndexOf("e"):-1;M<0?(x=t,_=""):(x=t.substring(0,M),_=t.substring(M))}else x=t.substring(0,w),_=e+t.substring(w+1);!u&&h&&(x=a(x,1/0));var k=m.length+x.length+_.length+(b?0:i.length),A=k"===o?A+i+t:"^"===o?A.substring(0,k>>=1)+i+t+A.substring(k):i+(b?t:A+t))+r}}}function Bt(t){return t+""}function Ut(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Vt(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r1)for(;o=u)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=L[o in ms?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}function n(t,e,r){w.lastIndex=0;var n=w.exec(e.slice(r));return n?(t.w=M.get(n[0].toLowerCase()),r+n[0].length):-1}function i(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.w=_.get(n[0].toLowerCase()),r+n[0].length):-1}function a(t,e,r){T.lastIndex=0;var n=T.exec(e.slice(r));return n?(t.m=S.get(n[0].toLowerCase()),r+n[0].length):-1}function o(t,e,r){k.lastIndex=0;var n=k.exec(e.slice(r));return n?(t.m=A.get(n[0].toLowerCase()),r+n[0].length):-1}function s(t,e,n){return r(t,E.c.toString(),e,n)}function l(t,e,n){return r(t,E.x.toString(),e,n)}function u(t,e,n){return r(t,E.X.toString(),e,n)}function c(t,e,r){var n=b.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)}var h=t.dateTime,f=t.date,d=t.time,p=t.periods,m=t.days,g=t.shortDays,v=t.months,y=t.shortMonths;e.utc=function(t){function r(t){try{ds=Ut;var e=new ds;return e._=t,n(e)}finally{ds=Date}}var n=e(t);return r.parse=function(t){try{ds=Ut;var e=n.parse(t);return e&&e._}finally{ds=Date}},r.toString=n.toString,r},e.multi=e.utc.multi=ce;var b=uo.map(),x=Yt(m),_=Wt(m),w=Yt(g),M=Wt(g),k=Yt(v),A=Wt(v),T=Yt(y),S=Wt(y);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var E={a:function(t){return g[t.getDay()]},A:function(t){return m[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return v[t.getMonth()]},c:e(h),d:function(t,e){return Gt(t.getDate(),e,2)},e:function(t,e){return Gt(t.getDate(),e,2)},H:function(t,e){return Gt(t.getHours(),e,2)},I:function(t,e){return Gt(t.getHours()%12||12,e,2)},j:function(t,e){return Gt(1+fs.dayOfYear(t),e,3)},L:function(t,e){return Gt(t.getMilliseconds(),e,3)},m:function(t,e){return Gt(t.getMonth()+1,e,2)},M:function(t,e){return Gt(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Gt(t.getSeconds(),e,2)},U:function(t,e){return Gt(fs.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Gt(fs.mondayOfYear(t),e,2)},x:e(f),X:e(d),y:function(t,e){return Gt(t.getFullYear()%100,e,2)},Y:function(t,e){return Gt(t.getFullYear()%1e4,e,4)},Z:le,"%":function(){return"%"}},L={a:n,A:i,b:a,B:o,c:s,d:re,e:re,H:ie,I:ie,j:ne,L:se,m:ee,M:ae,p:c,S:oe,U:Zt,w:Xt,W:Jt,x:l,X:u,y:Kt,Y:Qt,Z:$t,"%":ue};return e}function Gt(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a68?1900:2e3)}function ee(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function re(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function ne(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function ie(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function ae(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function oe(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function se(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function le(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=xo(e)/60|0,i=xo(e)%60;return r+Gt(n,"0",2)+Gt(i,"0",2)}function ue(t,e,r){vs.lastIndex=0;var n=vs.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function ce(t){for(var e=t.length,r=-1;++r=0?1:-1,s=o*r,l=Math.cos(e),u=Math.sin(e),c=a*u,h=i*l+c*Math.cos(s),f=c*o*Math.sin(s);Ms.add(Math.atan2(f,h)),n=t,i=l,a=u}var e,r,n,i,a;ks.point=function(o,s){ks.point=t,n=(e=o)*Ho,i=Math.cos(s=(r=s)*Ho/2+No/4),a=Math.sin(s)},ks.lineEnd=function(){t(e,r)}}function ve(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function ye(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function be(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function xe(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _e(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function we(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Me(t){return[Math.atan2(t[1],t[0]),nt(t[2])]}function ke(t,e){return xo(t[0]-e[0])=0;--s)i.point((h=c[s])[0],h[1])}else n(d.x,d.p.x,-1,i);d=d.p}d=d.o,c=d.z,p=!p}while(!d.v);i.lineEnd()}}}function Ie(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n0){for(_||(a.polygonStart(),_=!0),a.lineStart();++o1&&2&e&&r.push(r.pop().concat(r.shift())),d.push(r.filter(je))}var d,p,m,g=e(a),v=i.invert(n[0],n[1]),y={point:o,lineStart:l,lineEnd:u,polygonStart:function(){ +y.point=c,y.lineStart=h,y.lineEnd=f,d=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=l,y.lineEnd=u,d=uo.merge(d);var t=Ve(v,p);d.length?(_||(a.polygonStart(),_=!0),De(d,Fe,t,r,a)):t&&(_||(a.polygonStart(),_=!0),a.lineStart(),r(null,null,1,a),a.lineEnd()),_&&(a.polygonEnd(),_=!1),d=p=null},sphere:function(){a.polygonStart(),a.lineStart(),r(null,null,1,a),a.lineEnd(),a.polygonEnd()}},b=Re(),x=e(b),_=!1;return y}}function je(t){return t.length>1}function Re(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:M,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Fe(t,e){return((t=t.x)[0]<0?t[1]-Vo-Ro:Vo-t[1])-((e=e.x)[0]<0?e[1]-Vo-Ro:Vo-e[1])}function Ne(t){var e,r=0/0,n=0/0,i=0/0;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?No:-No,l=xo(a-r);xo(l-No)0?Vo:-Vo),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=No&&(xo(r-i)Ro?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}function Ue(t,e,r,n){var i;if(null==t)i=r*Vo,n.point(-No,i),n.point(0,i),n.point(No,i),n.point(No,0),n.point(No,-i),n.point(0,-i),n.point(-No,-i),n.point(-No,0),n.point(-No,i);else if(xo(t[0]-e[0])>Ro){var a=t[0]=0?1:-1,M=w*_,k=M>No,A=p*b;if(Ms.add(Math.atan2(A*w*Math.sin(M),m*x+A*Math.cos(M))),a+=k?_+w*Bo:_,k^f>=r^v>=r){var T=be(ve(h),ve(t));we(T);var S=be(i,T);we(S);var E=(k^_>=0?-1:1)*nt(S[2]);(n>E||n===E&&(T[0]||T[1]))&&(o+=k^_>=0?1:-1)}if(!g++)break;f=v,p=b,m=x,h=t}}return(a<-Ro||aa}function r(t){var r,a,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(h,f){var d,p=[h,f],m=e(h,f),g=o?m?0:i(h,f):m?i(h+(h<0?No:-No),f):0;if(!r&&(u=l=m)&&t.lineStart(),m!==l&&(d=n(r,p),(ke(r,d)||ke(p,d))&&(p[0]+=Ro,p[1]+=Ro,m=e(p[0],p[1]))),m!==l)c=0,m?(t.lineStart(),d=n(p,r),t.point(d[0],d[1])):(d=n(r,p),t.point(d[0],d[1]),t.lineEnd()),r=d;else if(s&&r&&o^m){var v;g&a||!(v=n(p,r,!0))||(c=0,o?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||r&&ke(r,p)||t.point(p[0],p[1]),r=p,l=m,a=g},lineEnd:function(){l&&t.lineEnd(),r=null},clean:function(){return c|(u&&l)<<1}}}function n(t,e,r){var n=ve(t),i=ve(e),o=[1,0,0],s=be(n,i),l=ye(s,s),u=s[0],c=l-u*u;if(!c)return!r&&t;var h=a*l/c,f=-a*u/c,d=be(o,s),p=_e(o,h);xe(p,_e(s,f));var m=d,g=ye(p,m),v=ye(m,m),y=g*g-v*(ye(p,p)-1);if(!(y<0)){var b=Math.sqrt(y),x=_e(m,(-g-b)/v);if(xe(x,p),x=Me(x),!r)return x;var _,w=t[0],M=e[0],k=t[1],A=e[1];M0^x[1]<(xo(x[0]-w)No^(w<=x[0]&&x[0]<=M)){var L=_e(m,(-g+b)/v);return xe(L,p),[x,Me(L)]}}}function i(e,r){var n=o?t:No-t,i=0;return e<-n?i|=1:e>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}var a=Math.cos(t),o=a>0,s=xo(a)>Ro;return Oe(e,r,gr(t,6*Ho),o?[0,-t]:[-No,t-No])}function qe(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,u=o.y,c=s.x,h=s.y,f=0,d=1,p=c-l,m=h-u;if(a=t-l,p||!(a>0)){if(a/=p,p<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>d)return;a>f&&(f=a)}else if(p>0){if(a0)){if(a/=m,m<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=n-u,m||!(a<0)){if(a/=m,m<0){if(a>d)return;a>f&&(f=a)}else if(m>0){if(a0&&(i.a={x:l+f*p,y:u+f*m}),d<1&&(i.b={x:l+d*p,y:u+d*m}),i}}}}}}function Ge(t,e,r,n){function i(n,i){return xo(n[0]-t)0?0:3:xo(n[0]-r)0?2:1:xo(n[1]-e)0?1:0:i>0?3:2}function a(t,e){return o(t.x,e.x)}function o(t,e){var r=i(t,1),n=i(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(s){function l(t){for(var e=0,r=g.length,n=t[1],i=0;in&&et(u,a,t)>0&&++e:a[1]<=n&&et(u,a,t)<0&&--e,u=a;return 0!==e}function u(a,s,l,u){var c=0,h=0;if(null==a||(c=i(a,l))!==(h=i(s,l))||o(a,s)<0^l>0)do{u.point(0===c||3===c?t:r,c>1?n:e)}while((c=(c+l+4)%4)!==h);else u.point(s[0],s[1])}function c(i,a){return t<=i&&i<=r&&e<=a&&a<=n}function h(t,e){c(t,e)&&s.point(t,e)}function f(){L.point=p,g&&g.push(v=[]),k=!0,M=!1,_=w=0/0}function d(){m&&(p(y,b),x&&M&&S.rejoin(),m.push(S.buffer())),L.point=h,M&&s.lineEnd()}function p(t,e){t=Math.max(-Fs,Math.min(Fs,t)),e=Math.max(-Fs,Math.min(Fs,e));var r=c(t,e);if(g&&v.push([t,e]),k)y=t,b=e,x=r,k=!1,r&&(s.lineStart(),s.point(t,e));else if(r&&M)s.point(t,e);else{var n={a:{x:_,y:w},b:{x:t,y:e}};E(n)?(M||(s.lineStart(),s.point(n.a.x,n.a.y)),s.point(n.b.x,n.b.y),r||s.lineEnd(),A=!1):r&&(s.lineStart(),s.point(t,e),A=!1)}_=t,w=e,M=r}var m,g,v,y,b,x,_,w,M,k,A,T=s,S=Re(),E=qe(t,e,r,n),L={point:h,lineStart:f,lineEnd:d,polygonStart:function(){s=S,m=[],g=[],A=!0},polygonEnd:function(){s=T,m=uo.merge(m);var e=l([t,n]),r=A&&e,i=m.length;(r||i)&&(s.polygonStart(),r&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),i&&De(m,a,e,u,s),s.polygonEnd()),m=g=v=null}};return L}}function Ye(t){var e=0,r=No/3,n=lr(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*No/180,r=t[1]*No/180):[e/No*180,r/No*180]},i}function We(t,e){function r(t,e){var r=Math.sqrt(a-2*i*Math.sin(e))/i;return[r*Math.sin(t*=i),o-r*Math.cos(t)]}var n=Math.sin(t),i=(n+Math.sin(e))/2,a=1+n*(2*i-n),o=Math.sqrt(a)/i;return r.invert=function(t,e){var r=o-e;return[Math.atan2(t,r)/i,nt((a-(t*t+r*r)*i*i)/(2*i))]},r}function Xe(){function t(t,e){Bs+=i*t-n*e,n=t,i=e}var e,r,n,i;Gs.point=function(a,o){Gs.point=t,e=n=a,r=i=o},Gs.lineEnd=function(){t(e,r)}}function Ze(t,e){tHs&&(Hs=t),eqs&&(qs=e)}function Je(){function t(t,e){o.push("M",t,",",e,a)}function e(t,e){o.push("M",t,",",e),s.point=r}function r(t,e){o.push("L",t,",",e)}function n(){s.point=t}function i(){o.push("Z")}var a=Qe(4.5),o=[],s={point:t,lineStart:function(){s.point=e},lineEnd:n,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=n,s.point=t},pointRadius:function(t){return a=Qe(t),s},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return s}function Qe(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Ke(t,e){Ss+=t,Es+=e,++Ls}function $e(){function t(t,n){var i=t-e,a=n-r,o=Math.sqrt(i*i+a*a);Cs+=o*(e+t)/2,zs+=o*(r+n)/2,Ds+=o,Ke(e=t,r=n)}var e,r;Ws.point=function(n,i){Ws.point=t,Ke(e=n,r=i)}}function tr(){Ws.point=Ke}function er(){function t(t,e){var r=t-n,a=e-i,o=Math.sqrt(r*r+a*a);Cs+=o*(n+t)/2,zs+=o*(i+e)/2,Ds+=o,o=i*t-n*e,Is+=o*(n+t),Ps+=o*(i+e),Os+=3*o,Ke(n=t,i=e)}var e,r,n,i;Ws.point=function(a,o){Ws.point=t,Ke(e=n=a,r=i=o)},Ws.lineEnd=function(){t(e,r)}}function rr(t){function e(e,r){t.moveTo(e+o,r),t.arc(e,r,o,0,Bo)}function r(e,r){t.moveTo(e,r),s.point=n}function n(e,r){t.lineTo(e,r)}function i(){s.point=e}function a(){t.closePath()}var o=4.5,s={point:e,lineStart:function(){s.point=r},lineEnd:i,polygonStart:function(){s.lineEnd=a},polygonEnd:function(){s.lineEnd=i,s.point=e},pointRadius:function(t){return o=t,s},result:M};return s}function nr(t){function e(t){return(s?n:r)(t)}function r(e){return or(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})}function n(e){function r(r,n){r=t(r,n),e.point(r[0],r[1])}function n(){b=0/0,k.point=a,e.lineStart()}function a(r,n){var a=ve([r,n]),o=t(r,n);i(b,x,y,_,w,M,b=o[0],x=o[1],y=r,_=a[0],w=a[1],M=a[2],s,e),e.point(b,x)}function o(){k.point=r,e.lineEnd()}function l(){n(),k.point=u,k.lineEnd=c}function u(t,e){a(h=t,f=e),d=b,p=x,m=_,g=w,v=M,k.point=a}function c(){i(b,x,y,_,w,M,d,p,h,m,g,v,s,e),k.lineEnd=o,o()}var h,f,d,p,m,g,v,y,b,x,_,w,M,k={point:r,lineStart:n,lineEnd:o,polygonStart:function(){e.polygonStart(),k.lineStart=l},polygonEnd:function(){e.polygonEnd(),k.lineStart=n}};return k}function i(e,r,n,s,l,u,c,h,f,d,p,m,g,v){var y=c-e,b=h-r,x=y*y+b*b;if(x>4*a&&g--){var _=s+d,w=l+p,M=u+m,k=Math.sqrt(_*_+w*w+M*M),A=Math.asin(M/=k),T=xo(xo(M)-1)a||xo((y*C+b*z)/x-.5)>.3||s*d+l*p+u*m0&&16,e):Math.sqrt(a)},e}function ir(t){var e=nr(function(e,r){return t([e*qo,r*qo])});return function(t){return ur(e(t))}}function ar(t){this.stream=t}function or(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function sr(t){return lr(function(){return t})()}function lr(t){function e(t){return t=s(t[0]*Ho,t[1]*Ho),[t[0]*f+l,u-t[1]*f]}function r(t){return(t=s.invert((t[0]-l)/f,(u-t[1])/f))&&[t[0]*qo,t[1]*qo]}function n(){s=Ce(o=fr(v,y,b),a);var t=a(m,g);return l=d-t[0]*f,u=p+t[1]*f,i()}function i(){return c&&(c.valid=!1,c=null),e}var a,o,s,l,u,c,h=nr(function(t,e){return t=a(t,e),[t[0]*f+l,u-t[1]*f]}),f=150,d=480,p=250,m=0,g=0,v=0,y=0,b=0,_=Rs,w=x,M=null,k=null;return e.stream=function(t){return c&&(c.valid=!1),c=ur(_(o,h(w(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(_=null==t?(M=t,Rs):He((M=+t)*Ho),i()):M},e.clipExtent=function(t){return arguments.length?(k=t,w=t?Ge(t[0][0],t[0][1],t[1][0],t[1][1]):x,i()):k},e.scale=function(t){return arguments.length?(f=+t,n()):f},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],n()):[d,p]},e.center=function(t){return arguments.length?(m=t[0]%360*Ho,g=t[1]%360*Ho,n()):[m*qo,g*qo]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Ho,y=t[1]%360*Ho,b=t.length>2?t[2]%360*Ho:0,n()):[v*qo,y*qo,b*qo]},uo.rebind(e,h,"precision"),function(){return a=t.apply(this,arguments),e.invert=a.invert&&r,n()}}function ur(t){return or(t,function(e,r){t.point(e*Ho,r*Ho)})}function cr(t,e){return[t,e]}function hr(t,e){return[t>No?t-Bo:t<-No?t+Bo:t,e]}function fr(t,e,r){return t?e||r?Ce(pr(t),mr(e,r)):pr(t):e||r?mr(e,r):hr}function dr(t){return function(e,r){return e+=t,[e>No?e-Bo:e<-No?e+Bo:e,r]}}function pr(t){var e=dr(t);return e.invert=dr(-t),e}function mr(t,e){function r(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,u=Math.sin(e),c=u*n+s*i;return[Math.atan2(l*a-c*o,s*n-u*i),nt(c*a+l*o)]}var n=Math.cos(t),i=Math.sin(t),a=Math.cos(e),o=Math.sin(e);return r.invert=function(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,u=Math.sin(e),c=u*a-l*o;return[Math.atan2(l*a+u*o,s*n+c*i),nt(c*n-s*i)]},r}function gr(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=vr(r,i),a=vr(r,a),(o>0?ia)&&(i+=o*Bo)):(i=t+o*Bo,a=t-.5*l);for(var u,c=i;o>0?c>a:c0?e<-Vo+Ro&&(e=-Vo+Ro):e>Vo-Ro&&(e=Vo-Ro);var r=o/Math.pow(i(e),a);return[r*Math.sin(a*t),o-r*Math.cos(a*t)]}var n=Math.cos(t),i=function(t){return Math.tan(No/4+t/2)},a=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(i(e)/i(t)),o=n*Math.pow(i(t),a)/a;return a?(r.invert=function(t,e){var r=o-e,n=tt(a)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/a,2*Math.atan(Math.pow(o/n,1/a))-Vo]},r):Sr}function Tr(t,e){function r(t,e){var r=a-e;return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}var n=Math.cos(t),i=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),a=n/i+t;return xo(i)1&&et(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function Ir(t,e){return t[0]-e[0]||t[1]-e[1]}function Pr(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function Or(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],u=r[1],c=e[1]-l,h=n[1]-u,f=(s*(l-u)-h*(i-a))/(h*o-s*c);return[i+f*o,l+f*c]}function jr(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}function Rr(){an(this),this.edge=this.site=this.circle=null}function Fr(t){var e=sl.pop()||new Rr;return e.site=t,e}function Nr(t){Zr(t),il.remove(t),sl.push(t),an(t)}function Br(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];Nr(t);for(var l=a;l.circle&&xo(r-l.circle.x)Ro)s=s.L;else{if(!((i=a-Hr(s,o))>Ro)){n>-Ro?(e=s.P,r=s):i>-Ro?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=Fr(t);if(il.insert(e,l),e||r){if(e===r)return Zr(e),r=Fr(e.site),il.insert(l,r),l.edge=r.edge=$r(e.site,l.site),Xr(e),void Xr(r);if(!r)return void(l.edge=$r(e.site,l.site));Zr(e),Zr(r);var u=e.site,c=u.x,h=u.y,f=t.x-c,d=t.y-h,p=r.site,m=p.x-c,g=p.y-h,v=2*(f*g-d*m),y=f*f+d*d,b=m*m+g*g,x={x:(g*y-d*b)/v+c,y:(f*b-m*y)/v+h};en(r.edge,u,p,x),l.edge=$r(u,t,null,x),r.edge=$r(t,p,null,x),Xr(e),Xr(r)}}function Vr(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;r=o.site;var s=r.x,l=r.y,u=l-e;if(!u)return s;var c=s-n,h=1/a-1/u,f=c/u;return h?(-f+Math.sqrt(f*f-2*h*(c*c/(-2*u)-l+u/2+i-a/2)))/h+n:(n+s)/2}function Hr(t,e){var r=t.N;if(r)return Vr(r,e);var n=t.site;return n.y===e?n.x:1/0}function qr(t){this.site=t,this.edges=[]}function Gr(t){for(var e,r,n,i,a,o,s,l,u,c,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],m=nl,g=m.length;g--;)if((a=m[g])&&a.prepare())for(s=a.edges,l=s.length,o=0;oRo||xo(i-r)>Ro)&&(s.splice(o,0,new rn(tn(a.site,c,xo(n-h)Ro?{x:h,y:xo(e-h)Ro?{x:xo(r-p)Ro?{x:f,y:xo(e-f)Ro?{x:xo(r-d)=-Fo)){var d=l*l+u*u,p=c*c+h*h,m=(h*d-u*p)/f,g=(l*p-c*d)/f,h=g+s,v=ll.pop()||new Wr;v.arc=t,v.site=i,v.x=m+o,v.y=h+Math.sqrt(m*m+g*g),v.cy=h,t.circle=v;for(var y=null,b=ol._;b;)if(v.y=s)return;if(f>p){if(a){if(a.y>=u)return}else a={x:g,y:l};r={x:g,y:u}}else{if(a){if(a.y1)if(f>p){if(a){if(a.y>=u)return}else a={x:(l-i)/n,y:l};r={x:(u-i)/n,y:u}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.xa||h>o||f=x,M=r>=_,k=M<<1|w,A=k+4;ka&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:bn(r,n)})),a=hl.lastIndex;return a=0&&!(r=uo.interpolators[n](t,e)););return r}function wn(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1?1:t(e)}}function kn(t){return function(e){return 1-t(1-e)}}function An(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Tn(t){return t*t}function Sn(t){return t*t*t}function En(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Ln(t){return function(e){return Math.pow(e,t)}}function Cn(t){return 1-Math.cos(t*Vo)}function zn(t){return Math.pow(2,10*(t-1))}function Dn(t){return 1-Math.sqrt(1-t*t)}function In(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/Bo*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Bo/e)}}function Pn(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function On(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function jn(t,e){t=uo.hcl(t),e=uo.hcl(e);var r=t.h,n=t.c,i=t.l,a=e.h-r,o=e.c-n,s=e.l-i;return isNaN(o)&&(o=0,n=isNaN(n)?e.c:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return ft(r+a*t,n+o*t,i+s*t)+""}}function Rn(t,e){t=uo.hsl(t),e=uo.hsl(e);var r=t.h,n=t.s,i=t.l,a=e.h-r,o=e.s-n,s=e.l-i;return isNaN(o)&&(o=0,n=isNaN(n)?e.s:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return ct(r+a*t,n+o*t,i+s*t)+""}}function Fn(t,e){t=uo.lab(t),e=uo.lab(e);var r=t.l,n=t.a,i=t.b,a=e.l-r,o=e.a-n,s=e.b-i;return function(t){return pt(r+a*t,n+o*t,i+s*t)+""}}function Nn(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Bn(t){var e=[t.a,t.b],r=[t.c,t.d],n=Vn(e),i=Un(e,r),a=Vn(Hn(r,e,-i))||0;e[0]*r[1]180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(qn(r)+"rotate(",null,")")-2,x:bn(t,e)})):e&&r.push(qn(r)+"rotate("+e+")")}function Wn(t,e,r,n){t!==e?n.push({i:r.push(qn(r)+"skewX(",null,")")-2,x:bn(t,e)}):e&&r.push(qn(r)+"skewX("+e+")")}function Xn(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(qn(r)+"scale(",null,",",null,")");n.push({i:i-4,x:bn(t[0],e[0])},{i:i-2,x:bn(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(qn(r)+"scale("+e+")")}function Zn(t,e){var r=[],n=[];return t=uo.transform(t),e=uo.transform(e),Gn(t.translate,e.translate,r,n),Yn(t.rotate,e.rotate,r,n),Wn(t.skew,e.skew,r,n),Xn(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,a=n.length;++i=0;)r.push(i[n])}function li(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++oi&&(n=r,i=e);return n}function bi(t){return t.reduce(xi,0)}function xi(t,e){return t+e[1]}function _i(t,e){return wi(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wi(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Mi(t){return[uo.min(t),uo.max(t)]}function ki(t,e){return t.value-e.value}function Ai(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Ti(t,e){t._pack_next=e,e._pack_prev=t}function Si(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Ei(t){function e(t){c=Math.min(t.x-t.r,c),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}if((r=t.children)&&(u=r.length)){var r,n,i,a,o,s,l,u,c=1/0,h=-1/0,f=1/0,d=-1/0;if(r.forEach(Li),n=r[0],n.x=-n.r,n.y=0,e(n),u>1&&(i=r[1],i.x=i.r,i.y=0,e(i),u>2))for(a=r[2],Di(n,i,a),e(a),Ai(n,a),n._pack_prev=a,Ai(a,i),i=n._pack_next,o=3;o=0;)e=i[a],e.z+=r,e.m+=r,r+=e.s+(n+=e.c)}function Fi(t,e,r){return t.a.parent===e.parent?t.a:r}function Ni(t){return 1+uo.max(t,function(t){return t.y})}function Bi(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Ui(t){var e=t.children;return e&&e.length?Ui(e[0]):t}function Vi(t){var e,r=t.children;return r&&(e=r.length)?Vi(r[e-1]):t}function Hi(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function qi(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i<0&&(r+=i/2,i=0),a<0&&(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function Gi(t){var e=t[0],r=t[t.length-1];return e2?Ji:Wi,l=n?Qn:Jn;return o=i(t,e,l,r),s=i(e,t,l,_n),a}function a(t){return o(t)}var o,s;return a.invert=function(t){return s(t)},a.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},a.range=function(t){return arguments.length?(e=t,i()):e},a.rangeRound=function(t){return a.range(t).interpolate(Nn)},a.clamp=function(t){return arguments.length?(n=t,i()):n},a.interpolate=function(t){return arguments.length?(r=t,i()):r},a.ticks=function(e){return ea(t,e)},a.tickFormat=function(e,r){return ra(t,e,r)},a.nice=function(e){return $i(t,e),i()},a.copy=function(){return Qi(t,e,r,n)},i()}function Ki(t,e){return uo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function $i(t,e){return Xi(t,Zi(ta(t,e)[2])),Xi(t,Zi(ta(t,e)[2])),t}function ta(t,e){null==e&&(e=10);var r=Gi(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function ea(t,e){return uo.range.apply(uo,ta(t,e))}function ra(t,e,r){var n=ta(t,e);if(r){var i=cs.exec(r);if(i.shift(),"s"===i[8]){var a=uo.formatPrefix(Math.max(xo(n[0]),xo(n[1])));return i[7]||(i[7]="."+na(a.scale(n[2]))),i[8]="f",r=uo.format(i.join("")),function(t){return r(a.scale(t))+a.symbol}}i[7]||(i[7]="."+ia(i[8],n)),r=i.join("")}else r=",."+na(n[2])+"f";return uo.format(r)}function na(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ia(t,e){var r=na(e[2]);return t in Ml?Math.abs(r-na(Math.max(xo(e[0]),xo(e[1]))))+ +("e"!==t):r-2*("%"===t)}function aa(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),o):e},o.nice=function(){var e=Xi(n.map(i),r?Math:Al);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Gi(n),o=[],s=t[0],l=t[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),h=e%1?2:e;if(isFinite(c-u)){if(r){for(;u0;f--)o.push(a(u)*f);for(u=0;o[u]l;c--);o=o.slice(u,c)}return o},o.tickFormat=function(t,r){ +if(!arguments.length)return kl;arguments.length<2?r=kl:"function"!=typeof r&&(r=uo.format(r));var n=Math.max(1,e*t/o.ticks().length);return function(t){var o=t/a(Math.round(i(t)));return o*e0?s[r-1]:t[0],r0?0:1}function xa(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,u=-s*a,c=t[0]+l,h=t[1]+u,f=e[0]+l,d=e[1]+u,p=(c+f)/2,m=(h+d)/2,g=f-c,v=d-h,y=g*g+v*v,b=r-n,x=c*d-f*h,_=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),w=(x*v-g*_)/y,M=(-x*g-v*_)/y,k=(x*v+g*_)/y,A=(-x*g+v*_)/y,T=w-p,S=M-m,E=k-p,L=A-m;return T*T+S*S>E*E+L*L&&(w=k,M=A),[[w-l,M-u],[w*r/b,M*r/b]]}function _a(t){function e(e){function o(){u.push("M",a(t(c),s))}for(var l,u=[],c=[],h=-1,f=e.length,d=Et(r),p=Et(n);++h1?t.join("L"):t+"Z"}function Ma(t){return t.join("L")+"Z"}function ka(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1&&i.push("H",n[0]),i.join("")}function Aa(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var u=2;u9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}function Ua(t){return t.length<3?wa(t):t[0]+Ca(t,Ba(t))}function Va(t){for(var e,r,n,i=-1,a=t.length;++i0;)d[--s].call(t,o);if(a>=1)return m.event&&m.event.end.call(t,t.__data__,e),--p.count?delete p[n]:delete t[r],1}var l,u,c,f,d,p=t[r]||(t[r]={active:0,count:0}),m=p[n];m||(l=i.time,u=It(a,0,l),m=p[n]={tween:new h,time:l,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++p.count)}function ro(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate("+(isFinite(n)?n:r(t))+",0)"})}function no(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate(0,"+(isFinite(n)?n:r(t))+")"})}function io(t){return t.toISOString()}function ao(t,e,r){function n(e){return t(e)}function i(t,r){var n=t[1]-t[0],i=n/r,a=uo.bisect(Jl,i);return a==Jl.length?[e.year,ta(t.map(function(t){return t/31536e6}),r)[2]]:a?e[i/Jl[a-1]1?{floor:function(e){for(;r(e=t.floor(e));)e=oo(e-1);return e},ceil:function(e){for(;r(e=t.ceil(e));)e=oo(+e+1);return e}}:t))},n.ticks=function(t,e){var r=Gi(n.domain()),a=null==t?i(r,10):"number"==typeof t?i(r,t):!t.range&&[{range:t},e];return a&&(t=a[0],e=a[1]),t.range(r[0],oo(+r[1]+1),e<1?1:e)},n.tickFormat=function(){return r},n.copy=function(){return ao(t.copy(),e,r)},Ki(n,t)}function oo(t){return new Date(t)}function so(t){return JSON.parse(t.responseText)}function lo(t){var e=fo.createRange();return e.selectNode(fo.body),e.createContextualFragment(t.responseText)}var uo={version:"3.5.17"},co=[].slice,ho=function(t){return co.call(t)},fo=this.document;if(fo)try{ho(fo.documentElement.childNodes)[0].nodeType}catch(t){ho=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),fo)try{fo.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var po=this.Element.prototype,mo=po.setAttribute,go=po.setAttributeNS,vo=this.CSSStyleDeclaration.prototype,yo=vo.setProperty;po.setAttribute=function(t,e){mo.call(this,t,e+"")},po.setAttributeNS=function(t,e,r){go.call(this,t,e,r+"")},vo.setProperty=function(t,e,r){yo.call(this,t,e+"",r)}}uo.ascending=i,uo.descending=function(t,e){return et?1:e>=t?0:0/0},uo.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},uo.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},uo.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return l/(c-1)},uo.deviation=function(){var t=uo.variance.apply(this,arguments);return t?Math.sqrt(t):t};var bo=s(i);uo.bisectLeft=bo.left,uo.bisect=uo.bisectRight=bo.right,uo.bisector=function(t){return s(1===t.length?function(e,r){return i(t(e),r)}:t)},uo.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},uo.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},uo.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(n=t[i],e=n.length;--e>=0;)r[--o]=n[e];return r};var xo=Math.abs;uo.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r===1/0)throw new Error("infinite range");var n,i=[],a=u(xo(r)),o=-1;if(t*=a,e*=a,r*=a,r<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)=a.length)return n?n.call(i,o):r?o.sort(r):o;for(var l,u,c,f,d=-1,p=o.length,m=a[s++],g=new h;++d=a.length)return t;var n=[],i=o[r++];return t.forEach(function(t,i){n.push({key:t,values:e(i,r)})}),i?n.sort(function(t,e){return i(t.key,e.key)}):n}var r,n,i={},a=[],o=[];return i.map=function(e,r){return t(r,e,0)},i.entries=function(r){return e(t(uo.map,r,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return r=t,i},i.rollup=function(t){return n=t,i},i},uo.set=function(t){var e=new b;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},uo.event=null,uo.requote=function(t){return t.replace(ko,"\\$&")};var ko=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ao={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]},To=function(t,e){return e.querySelector(t)},So=function(t,e){return e.querySelectorAll(t)},Eo=function(t,e){var r=t.matches||t[w(t,"matchesSelector")];return(Eo=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(To=function(t,e){return Sizzle(t,e)[0]||null},So=Sizzle,Eo=Sizzle.matchesSelector),uo.selection=function(){return uo.select(fo.documentElement)};var Lo=uo.selection.prototype=[];Lo.select=function(t){var e,r,n,i,a=[];t=C(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),zo.hasOwnProperty(r)?{space:zo[r],local:t}:t}},Lo.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return t=uo.ns.qualify(t),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(D(e,t[e]));return this}return this.each(D(t,e))},Lo.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=O(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},Lo.sort=function(t){t=q.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(e=e.transition().duration(L)),e.call(t.event)}function s(){_&&_.domain(x.range().map(function(t){return(t-k.x)/k.k}).map(x.invert)),M&&M.domain(w.range().map(function(t){return(t-k.y)/k.k}).map(w.invert))}function l(t){C++||t({type:"zoomstart"})}function u(t){s(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function c(t){--C||(t({type:"zoomend"}),g=null)}function h(){function t(){s=1,a(uo.mouse(i),f),u(o)}function r(){h.on(D,null).on(I,null),d(s),c(o)}var i=this,o=O.of(i,arguments),s=0,h=uo.select(n(i)).on(D,t).on(I,r),f=e(uo.mouse(i)),d=Q(i);Bl.call(i),l(o)}function f(){function t(){var t=uo.touches(p);return d=k.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function r(){var e=uo.event.target;uo.select(e).on(x,n).on(_,s),w.push(e);for(var r=uo.event.changedTouches,i=0,a=r.length;i1){var c=l[0],h=l[1],f=c[0]-h[0],d=c[1]-h[1];v=f*f+d*d}}function n(){var t,e,r,n,o=uo.touches(p);Bl.call(p);for(var s=0,l=o.length;s=u)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,hs=uo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=uo.round(t,Rt(t,e))).toFixed(Math.max(0,Math.min(20,Rt(t*(1+1e-15),e))))}}),fs=uo.time={},ds=Date;Ut.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ps.setUTCDate.apply(this._,arguments)},setDay:function(){ps.setUTCDay.apply(this._,arguments)},setFullYear:function(){ps.setUTCFullYear.apply(this._,arguments)},setHours:function(){ps.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ps.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ps.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ps.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ps.setUTCSeconds.apply(this._,arguments)},setTime:function(){ps.setTime.apply(this._,arguments)}};var ps=Date.prototype;fs.year=Vt(function(t){return t=fs.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),fs.years=fs.year.range,fs.years.utc=fs.year.utc.range,fs.day=Vt(function(t){var e=new ds(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),fs.days=fs.day.range,fs.days.utc=fs.day.utc.range,fs.dayOfYear=function(t){var e=fs.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var r=fs[t]=Vt(function(t){return(t=fs.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=fs.year(t).getDay();return Math.floor((fs.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});fs[t+"s"]=r.range,fs[t+"s"].utc=r.utc.range,fs[t+"OfYear"]=function(t){var r=fs.year(t).getDay();return Math.floor((fs.dayOfYear(t)+(r+e)%7)/7)}}),fs.week=fs.sunday,fs.weeks=fs.sunday.range,fs.weeks.utc=fs.sunday.utc.range,fs.weekOfYear=fs.sundayOfYear;var ms={"-":"",_:" ",0:"0"},gs=/^\s*\d+/,vs=/^%/;uo.locale=function(t){return{numberFormat:Nt(t),timeFormat:qt(t)}};var ys=uo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});uo.format=ys.numberFormat,uo.geo={},he.prototype={s:0,t:0,add:function(t){fe(t,this.t,bs),fe(bs.s,this.s,this),this.s?this.t+=bs.t:this.s=bs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bs=new he;uo.geo.stream=function(t,e){t&&xs.hasOwnProperty(t.type)?xs[t.type](t,e):de(t,e)};var xs={Feature:function(t,e){de(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++nd&&(d=e)}function e(e,r){var n=ve([e*Ho,r*Ho]);if(v){var i=be(v,n),a=[i[1],-i[0],0],o=be(a,i);we(o),o=Me(o);var l=e-p,u=l>0?1:-1,m=o[0]*qo*u,g=xo(l)>180;if(g^(u*pd&&(d=y)}else if(m=(m+360)%360-180,g^(u*pd&&(d=r);g?es(c,f)&&(f=e):s(e,f)>s(c,f)&&(c=e):f>=c?(ef&&(f=e)):e>p?s(c,e)>s(c,f)&&(f=e):s(e,f)>s(c,f)&&(c=e)}else t(e,r);v=n,p=e}function r(){_.point=e}function n(){x[0]=c,x[1]=f,_.point=t,v=null}function i(t,r){if(v){var n=t-p;y+=xo(n)>180?n+(n>0?360:-360):n}else m=t,g=r;ks.point(t,r),e(t,r)}function a(){ks.lineStart()}function o(){i(m,g),ks.lineEnd(),xo(y)>Ro&&(c=-(f=180)),x[0]=c,x[1]=f,v=null}function s(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function u(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tRo?d=90:y<-Ro&&(h=-90),x[0]=c,x[1]=f}};return function(t){d=f=-(c=h=1/0),b=[],uo.geo.stream(t,_);var e=b.length;if(e){b.sort(l);for(var r,n=1,i=b[0],a=[i];ns(i[0],i[1])&&(i[1]=r[1]),s(r[0],i[1])>s(i[0],i[1])&&(i[0]=r[0])):a.push(i=r);for(var o,r,p=-1/0,e=a.length-1,n=0,i=a[e];n<=e;i=r,++n)r=a[n],(o=s(i[1],r[0]))>p&&(p=o,c=r[0],f=i[1])}return b=x=null,1/0===c||1/0===h?[[0/0,0/0],[0/0,0/0]]:[[c,h],[f,d]]}}(),uo.geo.centroid=function(t){As=Ts=Ss=Es=Ls=Cs=zs=Ds=Is=Ps=Os=0,uo.geo.stream(t,js);var e=Is,r=Ps,n=Os,i=e*e+r*r+n*n;return i=.12&&i<.234&&n>=-.425&&n<-.214?o:i>=.166&&i<.234&&n>=-.214&&n<-.115?s:a).invert(t)},t.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},t.precision=function(e){return arguments.length?(a.precision(e),o.precision(e),s.precision(e),t):a.precision()},t.scale=function(e){return arguments.length?(a.scale(e),o.scale(.35*e),s.scale(e),t.translate(a.translate())):a.scale()},t.translate=function(e){if(!arguments.length)return a.translate();var u=a.scale(),c=+e[0],h=+e[1];return r=a.translate(e).clipExtent([[c-.455*u,h-.238*u],[c+.455*u,h+.238*u]]).stream(l).point,n=o.translate([c-.307*u,h+.201*u]).clipExtent([[c-.425*u+Ro,h+.12*u+Ro],[c-.214*u-Ro,h+.234*u-Ro]]).stream(l).point,i=s.translate([c-.205*u,h+.212*u]).clipExtent([[c-.214*u+Ro,h+.166*u+Ro],[c-.115*u-Ro,h+.234*u-Ro]]).stream(l).point,t},t.scale(1070)};var Ns,Bs,Us,Vs,Hs,qs,Gs={point:M,lineStart:M,lineEnd:M,polygonStart:function(){Bs=0,Gs.lineStart=Xe},polygonEnd:function(){Gs.lineStart=Gs.lineEnd=Gs.point=M,Ns+=xo(Bs/2)}},Ys={point:Ze,lineStart:M,lineEnd:M,polygonStart:M,polygonEnd:M},Ws={point:Ke,lineStart:$e,lineEnd:tr,polygonStart:function(){Ws.lineStart=er},polygonEnd:function(){Ws.point=Ke,Ws.lineStart=$e,Ws.lineEnd=tr}};uo.geo.path=function(){function t(t){return t&&("function"==typeof s&&a.pointRadius(+s.apply(this,arguments)),o&&o.valid||(o=i(a)),uo.geo.stream(t,o)),a.result()}function e(){return o=null,t}var r,n,i,a,o,s=4.5;return t.area=function(t){return Ns=0,uo.geo.stream(t,i(Gs)),Ns},t.centroid=function(t){return Ss=Es=Ls=Cs=zs=Ds=Is=Ps=Os=0,uo.geo.stream(t,i(Ws)),Os?[Is/Os,Ps/Os]:Ds?[Cs/Ds,zs/Ds]:Ls?[Ss/Ls,Es/Ls]:[0/0,0/0]},t.bounds=function(t){return Hs=qs=-(Us=Vs=1/0),uo.geo.stream(t,i(Ys)),[[Us,Vs],[Hs,qs]]},t.projection=function(t){return arguments.length?(i=(r=t)?t.stream||ir(t):x,e()):r},t.context=function(t){return arguments.length?(a=null==(n=t)?new Je:new rr(t),"function"!=typeof s&&a.pointRadius(s),e()):n},t.pointRadius=function(e){return arguments.length?(s="function"==typeof e?e:(a.pointRadius(+e),+e),t):s},t.projection(uo.geo.albersUsa()).context(null)},uo.geo.transform=function(t){return{stream:function(e){var r=new ar(e);for(var n in t)r[n]=t[n];return r}}},ar.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},uo.geo.projection=sr,uo.geo.projectionMutator=lr,(uo.geo.equirectangular=function(){return sr(cr)}).raw=cr.invert=cr,uo.geo.rotation=function(t){function e(e){return e=t(e[0]*Ho,e[1]*Ho),e[0]*=qo,e[1]*=qo,e}return t=fr(t[0]%360*Ho,t[1]*Ho,t.length>2?t[2]*Ho:0),e.invert=function(e){return e=t.invert(e[0]*Ho,e[1]*Ho),e[0]*=qo,e[1]*=qo,e},e},hr.invert=cr,uo.geo.circle=function(){function t(){var t="function"==typeof n?n.apply(this,arguments):n,e=fr(-t[0]*Ho,-t[1]*Ho,0).invert,i=[];return r(null,null,1,{point:function(t,r){i.push(t=e(t,r)),t[0]*=qo,t[1]*=qo}}),{type:"Polygon",coordinates:[i]}}var e,r,n=[0,0],i=6;return t.origin=function(e){return arguments.length?(n=e,t):n},t.angle=function(n){return arguments.length?(r=gr((e=+n)*Ho,i*Ho),t):e},t.precision=function(n){return arguments.length?(r=gr(e*Ho,(i=+n)*Ho),t):i},t.angle(90)},uo.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Ho,i=t[1]*Ho,a=e[1]*Ho,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),u=Math.cos(i),c=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((r=h*o)*r+(r=u*c-l*h*s)*r),l*c+u*h*s)},uo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return uo.range(Math.ceil(a/g)*g,i,g).map(f).concat(uo.range(Math.ceil(u/v)*v,l,v).map(d)).concat(uo.range(Math.ceil(n/p)*p,r,p).filter(function(t){return xo(t%g)>Ro}).map(c)).concat(uo.range(Math.ceil(s/m)*m,o,m).filter(function(t){return xo(t%v)>Ro}).map(h))}var r,n,i,a,o,s,l,u,c,h,f,d,p=10,m=p,g=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(l).slice(1),f(i).reverse().slice(1),d(u).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(a=+e[0][0],i=+e[1][0],u=+e[0][1],l=+e[1][1],a>i&&(e=a,a=i,i=e),u>l&&(e=u,u=l,l=e),t.precision(y)):[[a,u],[i,l]]},t.minorExtent=function(e){return arguments.length?(n=+e[0][0],r=+e[1][0],s=+e[0][1],o=+e[1][1],n>r&&(e=n,n=r,r=e),s>o&&(e=s,s=o,o=e),t.precision(y)):[[n,s],[r,o]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(g=+e[0],v=+e[1],t):[g,v]},t.minorStep=function(e){return arguments.length?(p=+e[0],m=+e[1],t):[p,m]},t.precision=function(e){return arguments.length?(y=+e,c=yr(s,o,90),h=br(n,r,y),f=yr(u,l,90),d=br(a,i,y),t):y},t.majorExtent([[-180,-90+Ro],[180,90-Ro]]).minorExtent([[-180,-80-Ro],[180,80+Ro]])},uo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}var e,r,n=xr,i=_r;return t.distance=function(){return uo.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},t.source=function(r){return arguments.length?(n=r,e="function"==typeof r?null:r,t):n},t.target=function(e){return arguments.length?(i=e,r="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},uo.geo.interpolate=function(t,e){return wr(t[0]*Ho,t[1]*Ho,e[0]*Ho,e[1]*Ho)},uo.geo.length=function(t){return Xs=0,uo.geo.stream(t,Zs),Xs};var Xs,Zs={sphere:M,point:M,lineStart:Mr,lineEnd:M,polygonStart:M,polygonEnd:M},Js=kr(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(uo.geo.azimuthalEqualArea=function(){return sr(Js)}).raw=Js;var Qs=kr(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},x);(uo.geo.azimuthalEquidistant=function(){return sr(Qs)}).raw=Qs,(uo.geo.conicConformal=function(){return Ye(Ar)}).raw=Ar,(uo.geo.conicEquidistant=function(){return Ye(Tr)}).raw=Tr;var Ks=kr(function(t){return 1/t},Math.atan);(uo.geo.gnomonic=function(){return sr(Ks)}).raw=Ks,Sr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Vo]},(uo.geo.mercator=function(){return Er(Sr)}).raw=Sr;var $s=kr(function(){return 1},Math.asin);(uo.geo.orthographic=function(){return sr($s)}).raw=$s;var tl=kr(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(uo.geo.stereographic=function(){return sr(tl)}).raw=tl,Lr.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Vo]},(uo.geo.transverseMercator=function(){var t=Er(Lr),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):(t=r(),[t[0],t[1],t[2]-90])},r([0,0,90])}).raw=Lr,uo.geom={},uo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=Et(r),a=Et(n),o=t.length,s=[],l=[];for(e=0;e=0;--e)d.push(t[s[u[e]][2]]);for(e=+h;e=n&&u.x<=a&&u.y>=i&&u.y<=o?[[n,o],[a,o],[a,i],[n,i]]:[]).point=t[s]}),e}function r(t){return t.map(function(t,e){return{x:Math.round(a(t,e)/Ro)*Ro,y:Math.round(o(t,e)/Ro)*Ro,i:e}})}var n=Cr,i=zr,a=n,o=i,s=ul;return t?e(t):(e.links=function(t){return un(r(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return un(r(t)).cells.forEach(function(r,n){for(var i,a=r.site,o=r.edges.sort(Yr),s=-1,l=o.length,u=o[l-1].edge,c=u.l===a?u.r:u.l;++s=u,f=n>=c,d=f<<1|h;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=pn()),h?i=u:s=u,f?o=c:l=c,a(t,e,r,n,i,o,s,l)}var c,h,f,d,p,m,g,v,y,b=Et(s),x=Et(l);if(null!=e)m=e,g=r,v=n,y=i;else if(v=y=-(m=g=1/0),h=[],f=[],p=t.length,o)for(d=0;dv&&(v=c.x),c.y>y&&(y=c.y),h.push(c.x),f.push(c.y);else for(d=0;dv&&(v=_),w>y&&(y=w),h.push(_),f.push(w)}var M=v-m,k=y-g;M>k?y=g+M:v=m+k;var A=pn();if(A.add=function(t){a(A,t,+b(t,++d),+x(t,d),m,g,v,y)},A.visit=function(t){mn(t,A,m,g,v,y)},A.find=function(t){return gn(A,t[0],t[1],m,g,v,y)},d=-1,null==e){for(;++d=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return r=dl.get(r)||fl,n=pl.get(n)||x,Mn(n(r.apply(null,co.call(arguments,1))))},uo.interpolateHcl=jn,uo.interpolateHsl=Rn,uo.interpolateLab=Fn,uo.interpolateRound=Nn,uo.transform=function(t){var e=fo.createElementNS(uo.ns.prefix.svg,"g");return(uo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Bn(r?r.matrix:ml)})(t)},Bn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};uo.interpolateTransform=Zn,uo.layout={},uo.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r0?i=t:(r.c=null,r.t=0/0,r=null,u.end({type:"end",alpha:i=0})):t>0&&(u.start({type:"start",alpha:i=t}),r=It(l.tick)),l):i},l.start=function(){function t(t,n){if(!r){for(r=new Array(i),l=0;l=0;)o.push(c=u[l]),c.parent=a,c.depth=a.depth+1;n&&(a.value=0),a.children=u}else n&&(a.value=+n.call(t,a,a.depth)||0),delete a.children;return li(i,function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)}),s}var e=hi,r=ui,n=ci;return t.sort=function(r){return arguments.length?(e=r,t):e},t.children=function(e){return arguments.length?(r=e,t):r},t.value=function(e){return arguments.length?(n=e,t):n},t.revalue=function(e){return n&&(si(e,function(t){t.children&&(t.value=0)}),li(e,function(e){var r;e.children||(e.value=+n.call(t,e,e.depth)||0),(r=e.parent)&&(r.value+=e.value)})),e},t},uo.layout.partition=function(){function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(n=e.value?n/e.value:0;++us&&(s=n),o.push(n)}for(r=0;r0)for(a=-1;++a=c[0]&&s<=c[1]&&(o=l[uo.bisect(h,s,1,d)-1],o.y+=p,o.push(t[a]));return l}var e=!0,r=Number,n=Mi,i=_i;return t.value=function(e){return arguments.length?(r=e,t):r},t.range=function(e){return arguments.length?(n=Et(e),t):n},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return wi(t,e)}:Et(e),t):i},t.frequency=function(r){return arguments.length?(e=!!r,t):e},t},uo.layout.pack=function(){function t(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],u=i[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,li(s,function(t){t.r=+c(t.value)}),li(s,Ei),n){var h=n*(e?1:Math.max(2*s.r/l,2*s.r/u))/2;li(s,function(t){t.r+=h}),li(s,Ei),li(s,function(t){t.r-=h})}return zi(s,l/2,u/2,e?1:1/Math.max(2*s.r/l,2*s.r/u)),o}var e,r=uo.layout.hierarchy().sort(ki),n=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(r){return arguments.length?(e=null==r||"function"==typeof r?r:+r,t):e},t.padding=function(e){return arguments.length?(n=+e,t):n},oi(t,r)},uo.layout.tree=function(){function t(t,i){var c=o.call(this,t,i),h=c[0],f=e(h);if(li(f,r),f.parent.m=-f.z,si(f,n),u)si(h,a);else{var d=h,p=h,m=h;si(h,function(t){t.xp.x&&(p=t),t.depth>m.depth&&(m=t)});var g=s(d,p)/2-d.x,v=l[0]/(p.x+s(p,d)/2+g),y=l[1]/(m.depth||1);si(h,function(t){t.x=(t.x+g)*v,t.y=t.depth*y})}return c}function e(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o0&&(ji(Fi(o,t,r),t,n),u+=n,c+=n),h+=o.m,u+=i.m,f+=l.m,c+=a.m;o&&!Oi(a)&&(a.t=o,a.m+=h-c),i&&!Pi(l)&&(l.t=i,l.m+=u-f,r=t)}return r}function a(t){t.x*=l[0],t.y=t.depth*l[1]}var o=uo.layout.hierarchy().sort(null).value(null),s=Ii,l=[1,1],u=null;return t.separation=function(e){return arguments.length?(s=e,t):s},t.size=function(e){return arguments.length?(u=null==(l=e)?a:null,t):u?null:l},t.nodeSize=function(e){return arguments.length?(u=null==(l=e)?null:a,t):u?l:null},oi(t,o)},uo.layout.cluster=function(){function t(t,a){var o,s=e.call(this,t,a),l=s[0],u=0;li(l,function(t){var e=t.children;e&&e.length?(t.x=Bi(e),t.y=Ni(e)):(t.x=o?u+=r(t,o):0,t.y=0,o=t)});var c=Ui(l),h=Vi(l),f=c.x-r(c,h)/2,d=h.x+r(h,c)/2;return li(l,i?function(t){t.x=(t.x-l.x)*n[0],t.y=(l.y-t.y)*n[1]}:function(t){t.x=(t.x-f)/(d-f)*n[0],t.y=(1-(l.y?t.y/l.y:1))*n[1]}),s}var e=uo.layout.hierarchy().sort(null).value(null),r=Ii,n=[1,1],i=!1;return t.separation=function(e){return arguments.length?(r=e,t):r},t.size=function(e){return arguments.length?(i=null==(n=e),t):i?null:n},t.nodeSize=function(e){return arguments.length?(i=null!=(n=e),t):i?n:null},oi(t,e)},uo.layout.treemap=function(){function t(t,e){for(var r,n,i=-1,a=t.length;++i0;)c.push(o=f[l-1]),c.area+=o.area,"squarify"!==d||(s=n(c,m))<=p?(f.pop(),p=s):(c.area-=c.pop().area,i(c,m,u,!1),m=Math.min(u.dx,u.dy),c.length=c.area=0,p=1/0);c.length&&(i(c,m,u,!0),c.length=c.area=0),a.forEach(e)}}function r(e){var n=e.children;if(n&&n.length){var a,o=h(e),s=n.slice(),l=[];for(t(s,o.dx*o.dy/e.value),l.area=0;a=s.pop();)l.push(a),l.area+=a.area,null!=a.z&&(i(l,a.z?o.dx:o.dy,o,!s.length),l.length=l.area=0);n.forEach(r)}}function n(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++oi&&(i=r));return n*=n,e*=e,n?Math.max(e*i*p/n,n/(e*a*p)):1/0}function i(t,e,r,n){var i,a=-1,o=t.length,s=r.x,u=r.y,c=e?l(t.area/e):0;if(e==r.dx){for((n||c>r.dy)&&(c=r.dy);++ar.dx)&&(c=r.dx);++a1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=uo.random.normal.apply(uo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=uo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;rh?0:1;if(u=Uo)return e(u,d)+(t?e(t,1-d):"")+"Z";var p,m,g,v,y,b,x,_,w,M,k,A,T=0,S=0,E=[];if((v=(+l.apply(this,arguments)||0)/2)&&(g=a===Cl?Math.sqrt(t*t+u*u):+a.apply(this,arguments),d||(S*=-1),u&&(S=nt(g/u*Math.sin(v))),t&&(T=nt(g/t*Math.sin(v)))),u){y=u*Math.cos(c+S),b=u*Math.sin(c+S),x=u*Math.cos(h-S),_=u*Math.sin(h-S);var L=Math.abs(h-c-2*S)<=No?0:1;if(S&&ba(y,b,x,_)===d^L){var C=(c+h)/2;y=u*Math.cos(C),b=u*Math.sin(C),x=_=null}}else y=b=0;if(t){w=t*Math.cos(h-T),M=t*Math.sin(h-T),k=t*Math.cos(c+T),A=t*Math.sin(c+T);var z=Math.abs(c-h+2*T)<=No?0:1;if(T&&ba(w,M,k,A)===1-d^z){var D=(c+h)/2;w=t*Math.cos(D),M=t*Math.sin(D),k=A=null}}else w=M=0;if(f>Ro&&(p=Math.min(Math.abs(u-t)/2,+i.apply(this,arguments)))>.001){m=tNo)+",1 "+e}function i(t,e,r,n){return"Q 0,0 "+n}var a=xr,o=_r,s=qa,l=ga,u=va;return t.radius=function(e){return arguments.length?(s=Et(e),t):s},t.source=function(e){return arguments.length?(a=Et(e),t):a},t.target=function(e){return arguments.length?(o=Et(e),t):o},t.startAngle=function(e){return arguments.length?(l=Et(e),t):l},t.endAngle=function(e){return arguments.length?(u=Et(e),t):u},t},uo.svg.diagonal=function(){function t(t,i){var a=e.call(this,t,i),o=r.call(this,t,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return l=l.map(n),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=xr,r=_r,n=Ga;return t.source=function(r){return arguments.length?(e=Et(r),t):e},t.target=function(e){return arguments.length?(r=Et(e),t):r},t.projection=function(e){return arguments.length?(n=e,t):n},t},uo.svg.diagonal.radial=function(){var t=uo.svg.diagonal(),e=Ga,r=t.projection;return t.projection=function(t){return arguments.length?r(Ya(e=t)):e},t},uo.svg.symbol=function(){function t(t,n){return(Ol.get(e.call(this,t,n))||Za)(r.call(this,t,n))}var e=Xa,r=Wa;return t.type=function(r){return arguments.length?(e=Et(r),t):e},t.size=function(e){return arguments.length?(r=Et(e),t):r},t};var Ol=uo.map({circle:Za,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Rl)),r=e*Rl;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/jl),r=e*jl/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/jl),r=e*jl/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});uo.svg.symbolTypes=Ol.keys();var jl=Math.sqrt(3),Rl=Math.tan(30*Ho);Lo.transition=function(t){for(var e,r,n=Fl||++Vl,i=to(t),a=[],o=Nl||{time:Date.now(),ease:En,delay:0,duration:250},s=-1,l=this.length;++srect,.s>rect").attr("width",h[1]-h[0])}function i(t){t.select(".extent").attr("y",f[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function a(){function a(){32==uo.event.keyCode&&(L||(b=null,z[0]-=h[1],z[1]-=f[1],L=2),T())}function m(){32==uo.event.keyCode&&2==L&&(z[0]+=h[1],z[1]+=f[1],L=0,T())}function g(){var t=uo.mouse(_),n=!1;x&&(t[0]+=x[0],t[1]+=x[1]),L||(uo.event.altKey?(b||(b=[(h[0]+h[1])/2,(f[0]+f[1])/2]),z[0]=h[+(t[0]=2)return!1;t[r]=n}return!0}):w.filter(function(t){for(var e=0;e<=o;++e){var r=y[t[e]];if(r<0)return!1;t[e]=r}return!0}),1&o)for(var h=0;h>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t("buffer").Buffer)},{buffer:70}],110:[function(t,e,r){"use strict";function n(t,e,r){var i=0|t[r];if(i<=0)return[];var a,o=new Array(i);if(r===t.length-1)for(a=0;a0)return i(0|t,e);break;case"object":if("number"==typeof t.length)return n(t,e,0)}return[]}e.exports=a},{}],111:[function(t,e,r){"use strict";function n(t,e,r){r=r||2;var n=e&&e.length,a=n?e[0]*r:t.length,s=i(t,0,a,r,!0),l=[];if(!s)return l;var u,c,f,d,p,m,g;if(n&&(s=h(t,e,s,r)),t.length>80*r){u=f=t[0],c=d=t[1];for(var v=r;vf&&(f=p),m>d&&(d=m);g=Math.max(f-u,d-c)}return o(s,l,r,u,c,g),l}function i(t,e,r,n,i){var a,o;if(i===z(t,e,r,n)>0)for(a=e;a=e;a-=n)o=E(a,t[a],t[a+1],o);return o&&w(o,o.next)&&(L(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!w(n,n.next)&&0!==_(n.prev,n,n.next))n=n.next;else{if(L(n),(n=e=n.prev)===n.next)return null;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,h,f){if(t){!f&&h&&m(t,n,i,h);for(var d,p,g=t;t.prev!==t.next;)if(d=t.prev,p=t.next,h?l(t,n,i,h):s(t))e.push(d.i/r),e.push(t.i/r),e.push(p.i/r),L(t),t=p.next,g=p.next;else if((t=p)===g){f?1===f?(t=u(t,e,r),o(t,e,r,n,i,h,2)):2===f&&c(t,e,r,n,i,h):o(a(t),e,r,n,i,h,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(_(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(b(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&_(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(_(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,h=v(s,l,e,r,n),f=v(u,c,e,r,n),d=t.nextZ;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&b(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&b(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function u(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!w(i,a)&&M(i,n,n.next,a)&&A(i,a)&&A(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),L(n),L(n.next),n=t=a),n=n.next}while(n!==t);return n}function c(t,e,r,n,i,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&x(l,u)){var c=S(l,u);return l=a(l,l.next),c=a(c,c.next),o(l,e,r,n,i,s),void o(c,e,r,n,i,s)}u=u.next}l=l.next}while(l!==t)}function h(t,e,r,n){var o,s,l,u,c,h=[];for(o=0,s=e.length;o=n.next.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&b(ar.x)&&A(n,t)&&(r=n,f=l),n=n.next;return r}function m(t,e,r,n){var i=t;do{null===i.z&&(i.z=v(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(t){var e,r,n,i,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0===s?(i=n,n=n.nextZ,l--):0!==l&&n?r.z<=n.z?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,s--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return t}function v(t,e,r,n,i){return t=32767*(t-r)/i,e=32767*(e-n)/i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function y(t){var e=t,r=t;do{e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function x(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!k(t,e)&&A(t,e)&&A(e,t)&&T(t,e)}function _(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function M(t,e,r,n){return!!(w(t,e)&&w(r,n)||w(t,n)&&w(r,e))||_(t,e,r)>0!=_(t,e,n)>0&&_(r,n,t)>0!=_(r,n,e)>0}function k(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&M(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function A(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function T(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}function S(t,e){var r=new C(t.i,t.x,t.y),n=new C(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function E(t,e,r,n){var i=new C(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function L(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function C(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function z(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],112:[function(t,e,r){"use strict";function n(t,e){var r=t.length;if("number"!=typeof e){e=0;for(var n=0;n0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,a,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],a=r.length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},{}],115:[function(t,e,r){"use strict";function n(t,e,r){var n=e||0,i=r||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[i*t[12]-t[8],i*t[13]-t[9],i*t[14]-t[10],i*t[15]-t[11]]]}e.exports=n},{}],116:[function(t,e,r){"use strict";function n(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}e.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0===(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},{}],117:[function(t,e,r){"use strict";function n(t){return new Function("f","var p = (f && f.properties || {}); return "+i(t))}function i(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?o(t[1],t[2],"===",!1):"!="===e?o(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?o(t[1],t[2],e,!0):"any"===e?s(t.slice(1),"||"):"all"===e?s(t.slice(1),"&&"):"none"===e?c(s(t.slice(1),"||")):"in"===e?l(t[1],t.slice(2)):"!in"===e?c(l(t[1],t.slice(2))):"has"===e?u(t[1]):"!has"===e?c(u([t[1]])):"true")+")"}function a(t){return"$type"===t?"f.type":"$id"===t?"f.id":"p["+JSON.stringify(t)+"]"}function o(t,e,r,n){var i=a(t),o="$type"===t?f.indexOf(e):JSON.stringify(e);return(n?"typeof "+i+"=== typeof "+o+"&&":"")+i+r+o}function s(t,e){return t.map(i).join(e)}function l(t,e){"$type"===t&&(e=e.map(function(t){return f.indexOf(t)}));var r=JSON.stringify(e.sort(h)),n=a(t);return e.length<=200?r+".indexOf("+n+") !== -1":"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }("+n+", "+r+",0,"+(e.length-1)+")"}function u(t){return JSON.stringify(t)+" in p"}function c(t){return"!("+t+")"}function h(t,e){return te?1:0}e.exports=n;var f=["Unknown","Point","LineString","Polygon"]},{}],118:[function(t,e,r){"use strict";function n(t,e,r){return Math.min(e,Math.max(t,r))}function i(t,e,r){this.dimension=t.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n=r-1)for(var f=o.length-1,p=t-e[r-1],d=0;d=r-1)for(var c=a.length-1,h=(e[r-1],0);h=0;--r)if(t[--e])return!1;return!0},u.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--h)i.push(n(l[h-1],u[h-1],arguments[h])),a.push(0)}},u.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var f=r;f>0;--f){var d=n(u[f-1],c[f-1],arguments[f]);i.push(d),a.push((d-i[o++])*h)}}},u.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(n(o[l-1],s[l-1],arguments[l])),i.push(0)}},u.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var i=this._state,a=this._velocity,o=i.length-this.dimension,s=this.bounds,l=s[0],u=s[1],c=t-e,h=c>1e-6?1/c:0;this._time.push(t);for(var f=r;f>0;--f){var d=arguments[f];i.push(n(l[f-1],u[f-1],i[o++]+d)),a.push(d*h)}}},u.idle=function(t){var e=this.lastT();if(!(t=0;--h)i.push(n(l[h],u[h],i[o]+c*a[o])),a.push(0),o+=1}}},{"binary-search-bounds":59,"cubic-hermite":102}],119:[function(t,e,r){"use strict";function n(t){t=t||{};var e,r,n=t.canvas||document.createElement("canvas"),a=t.family||"monospace",o=t.shape||[512,512],s=t.step||[32,32],l=t.size||16,u=t.chars||[32,126],c=Math.floor((s[0]-l)/2),h=t.radius||1.5*c,f=new i(l,c,h,0,a);if("number"==typeof l&&(l+="px"),Array.isArray(u)){if(2===u.length&&"number"==typeof u[0]&&"number"==typeof u[1]){var d=[];for(e=u[0],r=0;e<=u[1];e++)d[r++]=String.fromCharCode(e);u=d}}else u=String(u).split("");o=o.slice(),n.width=o[0],n.height=o[1];var p=n.getContext("2d");p.fillStyle="#000",p.fillRect(0,0,n.width,n.height),p.font=l+" "+a,p.textBaseline="middle";var m=0,g=0,v=Math.min(u.length,Math.floor(o[0]/s[0])*Math.ceil(o[1]/s[1])),y=f.ctx.textAlign,b=f.buffer;for(f.ctx.textAlign="center",f.buffer=f.size/2,e=0;eo[0]-s[0]&&(m=0,g+=s[1])}return f.ctx.textAlign=y,f.buffer=b,n}var i=t("tiny-sdf");e.exports=n},{"tiny-sdf":513}],120:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function i(t){return new n(t._color,t.key,t.value,t.left,t.right,t._count)}function a(t,e){return new n(t,e.key,e.value,e.left,e.right,e._count)}function o(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function s(t,e){this._compare=t,this.root=e}function l(t,e){if(e.left){var r=l(t,e.left);if(r)return r}var r=t(e.key,e.value);return r||(e.right?l(t,e.right):void 0)}function u(t,e,r,n){if(e(t,n.key)<=0){if(n.left){var i=u(t,e,r,n.left);if(i)return i}var i=r(n.key,n.value);if(i)return i}if(n.right)return u(t,e,r,n.right)}function c(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=c(t,e,r,n,i.left)))return a;if(s>0&&(a=n(i.key,i.value)))return a}if(s>0&&i.right)return c(t,e,r,n,i.right)}function h(t,e){this.tree=t,this._stack=e}function f(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t){for(var e,r,n,s,l=t.length-1;l>=0;--l){if(e=t[l],0===l)return void(e._color=v);if(r=t[l-1],r.left===e){if(n=r.right,n.right&&n.right._color===g){if(n=r.right=i(n),s=n.right=i(n.right),r.right=n.left,n.left=r,n.right=s,n._color=r._color,e._color=v,r._color=v,s._color=v,o(r),o(n),l>1){var u=t[l-2];u.left===r?u.left=n:u.right=n}return void(t[l-1]=n)}if(n.left&&n.left._color===g){if(n=r.right=i(n),s=n.left=i(n.left),r.right=s.left,n.left=s.right,s.left=r,s.right=n,s._color=r._color,r._color=v,n._color=v,e._color=v,o(r),o(n),o(s),l>1){var u=t[l-2];u.left===r?u.left=s:u.right=s}return void(t[l-1]=s)}if(n._color===v){if(r._color===g)return r._color=v,void(r.right=a(g,n));r.right=a(g,n);continue}if(n=i(n),r.right=n.left,n.left=r,n._color=r._color,r._color=g,o(r),o(n),l>1){var u=t[l-2];u.left===r?u.left=n:u.right=n}t[l-1]=n,t[l]=r,l+11){var u=t[l-2];u.right===r?u.right=n:u.left=n}return void(t[l-1]=n)}if(n.right&&n.right._color===g){if(n=r.left=i(n),s=n.right=i(n.right),r.left=s.right,n.right=s.left,s.right=r,s.left=n,s._color=r._color,r._color=v,n._color=v,e._color=v,o(r),o(n),o(s),l>1){var u=t[l-2];u.right===r?u.right=s:u.left=s}return void(t[l-1]=s)}if(n._color===v){if(r._color===g)return r._color=v,void(r.left=a(g,n));r.left=a(g,n);continue}if(n=i(n),r.left=n.right,n.right=r,n._color=r._color,r._color=g,o(r),o(n),l>1){var u=t[l-2];u.right===r?u.right=n:u.left=n}t[l-1]=n,t[l]=r,l+1e?1:0}function m(t){return new s(t||p,null)}e.exports=m;var g=0,v=1,y=s.prototype;Object.defineProperty(y,"keys",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(y,"values",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(y,"length",{get:function(){return this.root?this.root._count:0}}),y.insert=function(t,e){for(var r=this._compare,i=this.root,l=[],u=[];i;){var c=r(t,i.key);l.push(i),u.push(c),i=c<=0?i.left:i.right}l.push(new n(g,t,e,null,null,1));for(var h=l.length-2;h>=0;--h){var i=l[h];u[h]<=0?l[h]=new n(i._color,i.key,i.value,l[h+1],i.right,i._count+1):l[h]=new n(i._color,i.key,i.value,i.left,l[h+1],i._count+1)}for(var h=l.length-1;h>1;--h){var f=l[h-1],i=l[h];if(f._color===v||i._color===v)break;var d=l[h-2];if(d.left===f)if(f.left===i){var p=d.right;if(!p||p._color!==g){if(d._color=g,d.left=f.right,f._color=v,f.right=d,l[h-2]=f,l[h-1]=i,o(d),o(f),h>=3){var m=l[h-3];m.left===d?m.left=f:m.right=f}break}f._color=v,d.right=a(v,p),d._color=g,h-=1}else{var p=d.right;if(!p||p._color!==g){if(f.right=i.left,d._color=g,d.left=i.right,i._color=v,i.left=f,i.right=d,l[h-2]=i,l[h-1]=f,o(d),o(f),o(i),h>=3){var m=l[h-3];m.left===d?m.left=i:m.right=i}break}f._color=v,d.right=a(v,p),d._color=g,h-=1}else if(f.right===i){var p=d.left;if(!p||p._color!==g){if(d._color=g,d.right=f.left,f._color=v,f.left=d,l[h-2]=f,l[h-1]=i,o(d),o(f),h>=3){var m=l[h-3];m.right===d?m.right=f:m.left=f}break}f._color=v,d.left=a(v,p),d._color=g,h-=1}else{var p=d.left;if(!p||p._color!==g){if(f.left=i.right,d._color=g,d.right=i.left,i._color=v,i.right=f,i.left=d,l[h-2]=i,l[h-1]=f,o(d),o(f),o(i),h>=3){var m=l[h-3];m.right===d?m.right=i:m.left=i}break}f._color=v,d.left=a(v,p),d._color=g,h-=1}}return l[0]._color=v,new s(r,l[0])},y.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return l(t,this.root);case 2:return u(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return c(e,r,this._compare,t,this.root)}},Object.defineProperty(y,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(y,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),y.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new h(this,[])},y.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},y.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},y.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},y.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key) +;n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},y.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new h(this,n);r=i<=0?r.left:r.right}return new h(this,[])},y.remove=function(t){var e=this.find(t);return e?e.remove():this},y.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var b=h.prototype;Object.defineProperty(b,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(b,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),b.clone=function(){return new h(this.tree,this._stack.slice())},b.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new n(r._color,r.key,r.value,r.left,r.right,r._count);for(var i=t.length-2;i>=0;--i){var r=t[i];r.left===t[i+1]?e[i]=new n(r._color,r.key,r.value,e[i+1],r.right,r._count):e[i]=new n(r._color,r.key,r.value,r.left,e[i+1],r._count)}if(r=e[e.length-1],r.left&&r.right){var a=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var o=e[a-1];e.push(new n(r._color,o.key,o.value,r.left,r.right,r._count)),e[a-1].key=r.key,e[a-1].value=r.value;for(var i=e.length-2;i>=a;--i)r=e[i],e[i]=new n(r._color,r.key,r.value,r.left,e[i+1],r._count);e[a-1].left=e[a]}if(r=e[e.length-1],r._color===g){var l=e[e.length-2];l.left===r?l.left=null:l.right===r&&(l.right=null),e.pop();for(var i=0;i0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(b,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(b,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),b.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(b,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),b.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var r=new Array(e.length),i=e[e.length-1];r[r.length-1]=new n(i._color,i.key,t,i.left,i.right,i._count);for(var a=e.length-2;a>=0;--a)i=e[a],i.left===e[a+1]?r[a]=new n(i._color,i.key,i.value,r[a+1],i.right,i._count):r[a]=new n(i._color,i.key,i.value,i.left,r[a+1],i._count);return new s(this.tree._compare,r[0])},b.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(b,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],121:[function(t,e,r){function n(t){if(t<0)return Number("0/0");for(var e=o[0],r=o.length-1;r>0;--r)e+=o[r]/(t+r);var n=t+a+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}var i=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],a=607/128,o=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(n(e));e-=1;for(var r=i[0],a=1;a<9;a++)r+=i[a]/(e+a);var o=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(o,e+.5)*Math.exp(-o)*r},e.exports.log=n},{}],122:[function(t,e,r){function n(t){if("Polygon"===t.type)return i(t.coordinates);if("MultiPolygon"===t.type){for(var e=0,r=0;r0){e+=Math.abs(a(t[0]));for(var r=1;r2){for(var r,n,i=0;i=0}var u=t("geojson-area");e.exports=n},{"geojson-area":122}],124:[function(t,e,r){"use strict";function n(t,e,r,n,o,l,u,c){if(r/=e,n/=e,u>=r&&c<=n)return t;if(u>n||c=r&&p<=n)h.push(m);else if(!(d>n||p=e&&s<=r&&i.push(o)}return i}function a(t,e,r,n,i,a){for(var s=[],l=0;lr?(x.push(i(u,p,e),i(u,p,r)),a||(x=o(s,x,g,v,y))):d>=e&&x.push(i(u,p,e)):f>r?dr&&(x.push(i(u,p,r)),a||(x=o(s,x,g,v,y))));u=m[b-1],f=u[n],f>=e&&f<=r&&x.push(u),h=x[x.length-1],a&&h&&(x[0][0]!==h[0]||x[0][1]!==h[1])&&x.push(x[0]),o(s,x,g,v,y)}return s}function o(t,e,r,n,i){return e.length&&(e.area=r,e.dist=n,void 0!==i&&(e.outer=i),t.push(e)),[]}e.exports=n;var s=t("./feature")},{"./feature":126}],125:[function(t,e,r){"use strict";function n(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n1?1:n,[r,n,0]}function s(t){for(var e,r,n=0,i=0,a=0;a1)return!1;var a=i.geometry[0].length;if(5!==a)return!1;for(var o=0;o1&&console.time("creation"),b=this.tiles[y]=p(t,v,r,n,x,e===d.maxZoom),this.tileCoords.push({z:e,x:r,y:n}),m)){m>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,n,b.numFeatures,b.numPoints,b.numSimplified),console.timeEnd("creation"));var _="z"+e;this.stats[_]=(this.stats[_]||0)+1,this.total++}if(b.source=t,i){if(e===d.maxZoom||e===i)continue;var w=1<1&&console.time("clipping");var M,k,A,T,S,E,L=.5*d.buffer/d.extent,C=.5-L,z=.5+L,D=1+L;M=k=A=T=null,S=f(t,v,r-L,r+z,0,o,b.min[0],b.max[0]),E=f(t,v,r+C,r+D,0,o,b.min[0],b.max[0]),S&&(M=f(S,v,n-L,n+z,1,s,b.min[1],b.max[1]),k=f(S,v,n+C,n+D,1,s,b.min[1],b.max[1])),E&&(A=f(E,v,n-L,n+z,1,s,b.min[1],b.max[1]),T=f(E,v,n+C,n+D,1,s,b.min[1],b.max[1])),m>1&&console.timeEnd("clipping"),t.length&&(h.push(M||[],e+1,2*r,2*n),h.push(k||[],e+1,2*r,2*n+1),h.push(A||[],e+1,2*r+1,2*n),h.push(T||[],e+1,2*r+1,2*n+1))}else i&&(g=e)}return g},i.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,o=n.debug,s=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var c,f=t,d=e,p=r;!c&&f>0;)f--,d=Math.floor(d/2),p=Math.floor(p/2),c=this.tiles[a(f,d,p)];if(!c||!c.source)return null;if(o>1&&console.log("found parent tile z%d-%d-%d",f,d,p),u(c,i,n.buffer))return h.tile(c,i);o>1&&console.time("drilling down");var m=this.splitTile(c.source,f,d,p,t,e,r);if(o>1&&console.timeEnd("drilling down"),null!==m){var g=1<n&&(o=r,n=a);n>s?(t[o][2]=n,h.push(u),h.push(o),u=o):(c=h.pop(),u=h.pop())}}function i(t,e,r){var n=e[0],i=e[1],a=r[0],o=r[1],s=t[0],l=t[1],u=a-n,c=o-i;if(0!==u||0!==c){var h=((s-n)*u+(l-i)*c)/(u*u+c*c);h>1?(n=a,i=o):h>0&&(n+=u*h,i+=c*h)}return u=s-n,c=l-i,u*u+c*c}e.exports=n},{}],129:[function(t,e,r){"use strict";function n(t,e,r,n,a,o){for(var s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z2:e,transformed:!1,min:[2,1],max:[-1,0]},l=0;ls.max[0]&&(s.max[0]=c[0]),c[1]>s.max[1]&&(s.max[1]=c[1])}return s}function i(t,e,r,n){var i,o,s,l,u=e.geometry,c=e.type,h=[],f=r*r;if(1===c)for(i=0;if)&&(d.push(l),t.numSimplified++),t.numPoints++;3===c&&a(d,s.outer),h.push(d)}else t.numPoints+=s.length;if(h.length){var p={geometry:h,type:c,tags:e.tags||null};null!==e.id&&(p.id=e.id),t.features.push(p)}}function a(t,e){o(t)<0===e&&t.reverse()}function o(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i0?(d[c]=-1,p[c]=0):(d[c]=0,p[c]=1)}}function s(t,e){var r=new i(t);return r.update(e),r}e.exports=s;var l=t("./lib/text.js"),u=t("./lib/lines.js"),c=t("./lib/background.js"),h=t("./lib/cube.js"),f=t("./lib/ticks.js"),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=i.prototype;p.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,n=e.bind(this,!1,Number),i=e.bind(this,!1,Boolean),a=e.bind(this,!1,String),o=e.bind(this,!0,function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]}),s=!1,c=!1;if("bounds"in t)for(var h=t.bounds,d=0;d<2;++d)for(var p=0;p<3;++p)h[d][p]!==this.bounds[d][p]&&(c=!0),this.bounds[d][p]=h[d][p];if("ticks"in t){r=t.ticks,s=!0,this.autoTicks=!1;for(var d=0;d<3;++d)this.tickSpacing[d]=0}else n("tickSpacing")&&(this.autoTicks=!0,c=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),c=!0,s=!0,this._firstInit=!1),c&&this.autoTicks&&(r=f.create(this.bounds,this.tickSpacing),s=!0),s){for(var d=0;d<3;++d)r[d].sort(function(t,e){return t.x-e.x});f.equal(r,this.ticks)?s=!1:this.ticks=r}i("tickEnable"),a("tickFont")&&(s=!0),n("tickSize"),n("tickAngle"),n("tickPad"),o("tickColor");var m=a("labels");a("labelFont")&&(m=!0),i("labelEnable"),n("labelSize"),n("labelPad"),o("labelColor"),i("lineEnable"),i("lineMirror"),n("lineWidth"),o("lineColor"),i("lineTickEnable"),i("lineTickMirror"),n("lineTickLength"),n("lineTickWidth"),o("lineTickColor"),i("gridEnable"),n("gridWidth"),o("gridColor"),i("zeroEnable"),o("zeroLineColor"),n("zeroLineWidth"),i("backgroundEnable"),o("backgroundColor"),this._text?this._text&&(m||s)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=l(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&s&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};var m=[new a,new a,new a],g=[0,0,0],v={model:d,view:d,projection:d};p.isOpaque=function(){return!0},p.isTransparent=function(){return!1},p.drawTransparent=function(t){};var y=[0,0,0],b=[0,0,0],x=[0,0,0];p.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||d,i=t.view||d,a=t.projection||d,s=this.bounds,l=h(r,i,a,s),u=l.cubeEdges,c=l.axis,f=i[12],p=i[13],_=i[14],w=i[15],M=this.pixelRatio*(a[3]*f+a[7]*p+a[11]*_+a[15]*w)/e.drawingBufferHeight,k=0;k<3;++k)this.lastCubeProps.cubeEdges[k]=u[k],this.lastCubeProps.axis[k]=c[k];for(var A=m,k=0;k<3;++k)o(m[k],k,this.bounds,u,c);for(var e=this.gl,T=g,k=0;k<3;++k)this.backgroundEnable[k]?T[k]=c[k]:T[k]=0;this._background.draw(r,i,a,s,T,this.backgroundColor),this._lines.bind(r,i,a,this);for(var k=0;k<3;++k){var S=[0,0,0];c[k]>0?S[k]=s[1][k]:S[k]=s[0][k];for(var E=0;E<2;++E){var L=(k+1+E)%3,C=(k+1+(1^E))%3;this.gridEnable[L]&&this._lines.drawGrid(L,C,this.bounds,S,this.gridColor[L],this.gridWidth[L]*this.pixelRatio)}for(var E=0;E<2;++E){var L=(k+1+E)%3,C=(k+1+(1^E))%3;this.zeroEnable[C]&&s[0][C]<=0&&s[1][C]>=0&&this._lines.drawZero(L,C,this.bounds,S,this.zeroLineColor[C],this.zeroLineWidth[C]*this.pixelRatio)}}for(var k=0;k<3;++k){this.lineEnable[k]&&this._lines.drawAxisLine(k,this.bounds,A[k].primalOffset,this.lineColor[k],this.lineWidth[k]*this.pixelRatio),this.lineMirror[k]&&this._lines.drawAxisLine(k,this.bounds,A[k].mirrorOffset,this.lineColor[k],this.lineWidth[k]*this.pixelRatio);for(var z=n(y,A[k].primalMinor),D=n(b,A[k].mirrorMinor),I=this.lineTickLength,E=0;E<3;++E){var P=M/r[5*E];z[E]*=I[E]*P,D[E]*=I[E]*P}this.lineTickEnable[k]&&this._lines.drawAxisTicks(k,A[k].primalOffset,z,this.lineTickColor[k],this.lineTickWidth[k]*this.pixelRatio),this.lineTickMirror[k]&&this._lines.drawAxisTicks(k,A[k].mirrorOffset,D,this.lineTickColor[k],this.lineTickWidth[k]*this.pixelRatio)}this._text.bind(r,i,a,this.pixelRatio);for(var k=0;k<3;++k){for(var O=A[k].primalMinor,j=n(x,A[k].primalOffset),E=0;E<3;++E)this.lineTickEnable[k]&&(j[E]+=M*O[E]*Math.max(this.lineTickLength[E],0)/r[5*E]);if(this.tickEnable[k]){for(var E=0;E<3;++E)j[E]+=M*O[E]*this.tickPad[E]/r[5*E];this._text.drawTicks(k,this.tickSize[k],this.tickAngle[k],j,this.tickColor[k])}if(this.labelEnable[k]){for(var E=0;E<3;++E)j[E]+=M*O[E]*this.labelPad[E]/r[5*E];j[k]+=.5*(s[0][k]+s[1][k]),this._text.drawLabel(k,this.labelSize[k],this.labelAngle[k],j,this.labelColor[k])}}},p.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":134,"./lib/cube.js":135,"./lib/lines.js":136,"./lib/text.js":138,"./lib/ticks.js":139}],134:[function(t,e,r){"use strict";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}function i(t){for(var e=[],r=[],i=0,l=0;l<3;++l)for(var u=(l+1)%3,c=(l+2)%3,h=[0,0,0],f=[0,0,0],d=-1;d<=1;d+=2){r.push(i,i+2,i+1,i+1,i+2,i+3),h[l]=d,f[l]=d;for(var p=-1;p<=1;p+=2){h[u]=p;for(var m=-1;m<=1;m+=2)h[c]=m,e.push(h[0],h[1],h[2],f[0],f[1],f[2]),i+=1}var g=u;u=c,c=g}var v=a(t,new Float32Array(e)),y=a(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),b=o(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],y),x=s(t);return x.attributes.position.location=0,x.attributes.normal.location=1,new n(t,v,b,x)}e.exports=i;var a=t("gl-buffer"),o=t("gl-vao"),s=t("./shaders").bg,l=n.prototype;l.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),l.disable(l.POLYGON_OFFSET_FILL)}},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":137,"gl-buffer":141,"gl-vao":255}],135:[function(t,e,r){"use strict";function n(t,e,r){for(var n=0;n<4;++n){t[n]=r[12+n];for(var i=0;i<3;++i)t[n]+=e[i]*r[4*i+n]}}function i(t){for(var e=0;eS&&(_|=1<S&&(_|=1<f[m][1]&&(O=m));for(var j=-1,m=0;m<3;++m){var R=O^1<f[F][0]&&(F=R)}}var N=g;N[0]=N[1]=N[2]=0,N[o.log2(j^O)]=O&j,N[o.log2(O^F)]=O&F;var B=7^F;B===_||B===P?(B=7^j,N[o.log2(F^B)]=B&F):N[o.log2(j^B)]=B&j;for(var U=v,V=_,k=0;k<3;++k)U[k]=V&1< 0.0) {\n vec3 nPosition = mix(bounds[0], bounds[1], 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n colorChannel = abs(normal);\n}","precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] + \n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}",null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":239}],138:[function(t,e,r){(function(r){"use strict";function n(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}function i(t,e){try{return l(t,e)}catch(t){return console.warn("error vectorizing text:",t),{cells:[],positions:[]}}}function a(t,e,r,i,a,l){var c=o(t),h=s(t,[{buffer:c,size:3}]),f=u(t);f.attributes.position.location=0;var d=new n(t,f,c,h);return d.update(e,r,i,a,l),d}e.exports=a;var o=t("gl-buffer"),s=t("gl-vao"),l=t("vectorize-text"),u=t("./shaders").text,c=window||r.global||{},h=c.__TEXT_CACHE||{};c.__TEXT_CACHE={};var f=n.prototype,d=[0,0];f.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},f.update=function(t,e,r,n,a){function o(t,e,r,n){ +var a=h[r];a||(a=h[r]={});var o=a[e];o||(o=a[e]=i(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle"}));for(var l=(n||12)/12,u=o.positions,c=o.cells,f=0,d=c.length;f=0;--m){var g=u[p[m]];s.push(l*g[0],-l*g[1],t)}}for(var s=(this.gl,[]),l=[0,0,0],u=[0,0,0],c=[0,0,0],f=[0,0,0],d=0;d<3;++d){c[d]=s.length/3|0,o(.5*(t[0][d]+t[1][d]),e[d],r),f[d]=(s.length/3|0)-c[d],l[d]=s.length/3|0;for(var p=0;p=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,u=o%a;o<0?(l=0|-Math.ceil(l),u=0|-u):(l=0|Math.floor(l),u|=0);var c=""+l;if(o<0&&(c="-"+c),i){for(var h=""+u;h.length=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r}function a(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function a(t,e){for(var r=l.malloc(t.length,e),n=t.length,i=0;i=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}function s(t,e,r,i){if(r=r||t.ARRAY_BUFFER,i=i||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(i!==t.DYNAMIC_DRAW&&i!==t.STATIC_DRAW&&i!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var a=t.createBuffer(),o=new n(t,r,a,0,i);return o.update(e),o}var l=t("typedarray-pool"),u=t("ndarray-ops"),c=t("ndarray"),h=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"],f=n.prototype;f.bind=function(){this.gl.bindBuffer(this.type,this.handle)},f.unbind=function(){this.gl.bindBuffer(this.type,null)},f.dispose=function(){this.gl.deleteBuffer(this.handle)},f.update=function(t,e){if("number"!=typeof e&&(e=-1),this.bind(),"object"==typeof t&&void 0!==t.shape){var r=t.dtype;if(h.indexOf(r)<0&&(r="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){r=gl.getExtension("OES_element_index_uint")&&"uint16"!==r?"uint32":"uint16"}if(r===t.dtype&&o(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=i(this.gl,this.type,this.length,this.usage,t.data,e):this.length=i(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var n=l.malloc(t.size,r),s=c(n,t.shape);u.assign(s,t),this.length=e<0?i(this.gl,this.type,this.length,this.usage,n,e):i(this.gl,this.type,this.length,this.usage,n.subarray(0,t.size),e),l.free(n)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?a(t,"uint16"):a(t,"float32"),this.length=e<0?i(this.gl,this.type,this.length,this.usage,f,e):i(this.gl,this.type,this.length,this.usage,f.subarray(0,t.length),e),l.free(f)}else if("object"==typeof t&&"number"==typeof t.length)this.length=i(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");t|=0,t<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=s},{ndarray:449,"ndarray-ops":443,"typedarray-pool":521}],142:[function(t,e,r){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],143:[function(t,e,r){var n=t("./1.0/numbers");e.exports=function(t){return n[t]}},{"./1.0/numbers":142}],144:[function(t,e,r){"use strict";function n(t,e,r,n){this.plot=t,this.shader=e,this.bufferHi=r,this.bufferLo=n,this.bounds=[1/0,1/0,-1/0,-1/0],this.numPoints=0,this.color=[0,0,0,1]}function i(t,e){var r=a(t.gl,l.vertex,l.fragment),i=o(t.gl),s=o(t.gl),u=new n(t,r,i,s);return u.update(e),t.addObject(u),u}var a=t("gl-shader"),o=t("gl-buffer"),s=t("typedarray-pool"),l=t("./lib/shaders");e.exports=i;var u=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]],c=n.prototype;c.draw=function(){var t=new Float32Array([0,0]),e=new Float32Array([0,0]),r=new Float32Array([0,0]),n=new Float32Array([0,0]),i=[1,1];return function(){var a=this.plot,o=this.shader,s=this.bounds,l=this.numPoints;if(l){var c=a.gl,h=a.dataBox,f=a.viewBox,d=a.pixelRatio,p=s[2]-s[0],m=s[3]-s[1],g=h[2]-h[0],v=h[3]-h[1],y=2*p/g,b=2*m/v,x=(s[0]-h[0]-.5*g)/p,_=(s[1]-h[1]-.5*v)/m;t[0]=y,t[1]=b,e[0]=y-t[0],e[1]=b-t[1],r[0]=x,r[1]=_,n[0]=x-r[0],n[1]=_-r[1];var w=f[2]-f[0],M=f[3]-f[1];i[0]=2*d/w,i[1]=2*d/M,o.bind(),o.uniforms.scaleHi=t,o.uniforms.scaleLo=e,o.uniforms.translateHi=r,o.uniforms.translateLo=n,o.uniforms.pixelScale=i,o.uniforms.color=this.color,this.bufferLo.bind(),o.attributes.positionLo.pointer(c.FLOAT,!1,16,0),this.bufferHi.bind(),o.attributes.positionHi.pointer(c.FLOAT,!1,16,0),o.attributes.pixelOffset.pointer(c.FLOAT,!1,16,8),c.drawArrays(c.TRIANGLES,0,l*u.length)}}}(),c.drawPick=function(t){return t},c.pick=function(){return null},c.update=function(t){t=t||{};var e,r,n,i=t.positions||[],a=t.errors||[],o=1;"lineWidth"in t&&(o=+t.lineWidth);var l=5;"capSize"in t&&(l=+t.capSize),this.color=(t.color||[0,0,0,1]).slice();var c=this.bounds=[1/0,1/0,-1/0,-1/0],h=this.numPoints=i.length>>1;for(e=0;e0&&(T*=_),S<0?S*=w:S>0&&(S*=M),g[b++]=f*(r-p+T),g[b++]=d*(n-m+S),g[b++]=o*A[2]+(l+o)*A[4],g[b++]=o*A[3]+(l+o)*A[5]}}for(e=0;e=1},h.isTransparent=function(){return this.opacity<1},h.drawTransparent=h.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||c,i=r.projection=t.projection||c;r.model=t.model||c,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],o=n[13],s=n[14],l=n[15],u=this.pixelRatio*(i[3]*a+i[7]*o+i[11]*s+i[15]*l)/e.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)e.lineWidth(this.lineWidth[h]),r.capSize=this.capSize[h]*u,e.drawArrays(e.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var f=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=(n+e)%3,o=[0,0,0];o[a]=i,r.push(o)}t[e]=r}return t}();h.update=function(t){t=t||{},"lineWidth"in t&&(this.lineWidth=t.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in t&&(this.capSize=t.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),"opacity"in t&&(this.opacity=t.opacity);var e=t.color||[[0,0,0],[0,0,0],[0,0,0]],r=t.position,n=t.error;if(Array.isArray(e[0])||(e=[e,e,e]),r&&n){var o=[],s=r.length,l=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var u=0;u<3;++u){this.lineOffset[u]=l;t:for(var c=0;c0){var m=h.slice();m[u]+=d[1][u],o.push(h[0],h[1],h[2],p[0],p[1],p[2],p[3],0,0,0,m[0],m[1],m[2],p[0],p[1],p[2],p[3],0,0,0),i(this.bounds,m),l+=2+a(o,m,p,u)}}}this.lineCount[u]=l-this.lineOffset[u]}this.buffer.update(o)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":147,"gl-buffer":141,"gl-vao":255}],147:[function(t,e,r){"use strict";var n=t("gl-shader");e.exports=function(t){return n(t,"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}","precision mediump float;\n#define GLSLIFY 1\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if(any(lessThan(fragPosition, clipBounds[0])) || any(greaterThan(fragPosition, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = opacity * fragColor;\n}",null,[{name:"position",type:"vec3"},{name:"offset",type:"vec3"},{name:"color",type:"vec4"}])}},{"gl-shader":239}],148:[function(t,e,r){"use strict";function n(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function i(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function a(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);y=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;a1&&f.drawBuffersWEBGL(y[h]);var v=r.getExtension("WEBGL_depth_texture");v?d?t.depth=s(r,u,c,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p&&(t.depth=s(r,u,c,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):p&&d?t._depth_rb=l(r,u,c,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p?t._depth_rb=l(r,u,c,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=l(r,u,c,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var b=r.checkFramebufferStatus(r.FRAMEBUFFER);if(b!==r.FRAMEBUFFER_COMPLETE){t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null);for(var g=0;gs||r<0||r>s)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var l=n(a),u=0;uo||r<0||r>o)throw new Error("gl-fbo: Parameters are too large for FBO");n=n||{};var s=1;if("color"in n){if((s=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(s>1){if(!i)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(s>t.getParameter(i.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+s+" draw buffers")}}var l=t.UNSIGNED_BYTE,u=t.getExtension("OES_texture_float");if(n.float&&s>0){if(!u)throw new Error("gl-fbo: Context does not support floating point textures");l=t.FLOAT}else n.preferFloat&&s>0&&u&&(l=t.FLOAT);var h=!0;"depth"in n&&(h=!!n.depth);var f=!1;return"stencil"in n&&(f=!!n.stencil),new c(t,e,r,l,s,h,f,i)}var d=t("gl-texture2d");e.exports=f;var p,m,g,v,y=null,b=c.prototype;Object.defineProperties(b,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(t){if(Array.isArray(t)||(t=[0|t,0|t]),2!==t.length)throw new Error("gl-fbo: Shape vector must be length 2");var e=0|t[0],r=0|t[1];return h(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return t|=0,h(this,t,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t},enumerable:!1}}),b.bind=function(){if(!this._destroyed){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.handle),t.viewport(0,0,this._shape[0],this._shape[1])}},b.dispose=function(){if(!this._destroyed){this._destroyed=!0;var t=this.gl;t.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(t.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var e=0;e>8*d&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=t,p.pickOffset=e,p.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),h.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},h.update=function(t){t=t||{};var e=t.shape||[0,0],r=t.x||o(e[0]),n=t.y||o(e[1]),i=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=n;var l=t.colorLevels||[0],u=t.colorValues||[0,0,0,1],c=l.length,h=this.bounds,d=h[0]=r[0],p=h[1]=n[0],m=h[2]=r[r.length-1],g=h[3]=n[n.length-1],v=1/(m-d),y=1/(g-p),b=e[0],x=e[1];this.shape=[b,x];var _=(b-1)*(x-1)*(f.length>>>1);this.numVertices=_;for(var w=s.mallocUint8(4*_),M=s.mallocFloat32(2*_),k=s.mallocUint8(2*_),A=s.mallocUint32(_),T=0,S=0;S2&&!this.usingDashes){var b=this.mitreShader;this.lineBufferLo.bind(),b.attributes.aLo.pointer(l.FLOAT,!1,48,0),this.lineBufferHi.bind(),b.bind();var x=b.uniforms;this.setProjectionUniforms(x,a),x.color=c,x.radius=s*u,b.attributes.aHi.pointer(l.FLOAT,!1,48,0),l.drawArrays(l.POINTS,0,i/3|0)}}}}(),f.drawPick=function(){var t=[0,0,0,0];return function(e){var r=this.vertCount,n=this.numPoints;if(this.pickOffset=e,!r)return e+n;var i=this.setProjectionModel(),a=this.plot,o=this.width,s=a.gl,l=a.pickPixelRatio,u=this.pickShader,c=this.pickBuffer;t[0]=255&e,t[1]=e>>>8&255,t[2]=e>>>16&255,t[3]=e>>>24,u.bind();var h=u.uniforms;this.setProjectionUniforms(h,i),h.width=o*l,h.pickOffset=t;var f=u.attributes;return this.lineBufferHi.bind(),f.aHi.pointer(s.FLOAT,!1,16,0),f.dHi.pointer(s.FLOAT,!1,16,8),this.lineBufferLo.bind(),f.aLo.pointer(s.FLOAT,!1,16,0),c.bind(),f.pick0.pointer(s.UNSIGNED_BYTE,!1,8,0),f.pick1.pointer(s.UNSIGNED_BYTE,!1,8,4),s.drawArrays(s.TRIANGLES,0,r),e+n}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.numPoints;if(r=n+i)return null;var a=r-n,o=this.data;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}},f.update=function(t){t=t||{};var e,r,n,a,o,s=this.plot.gl;this.color=(t.color||[0,0,1,1]).slice(),this.width=+(t.width||1),this.fill=(t.fill||[!1,!1,!1,!1]).slice(),this.fillColor=i(t.fillColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var h=t.dashes||[1],f=0;for(e=0;e1,this.dashPattern=l(s,u(d,[f,1,4],[1,0,0])),this.dashPattern.minFilter=s.NEAREST,this.dashPattern.magFilter=s.NEAREST,this.dashLength=f,c.free(d);var m=t.positions;this.data=m;var g=this.bounds;g[0]=g[1]=1/0,g[2]=g[3]=-1/0;var v=this.numPoints=m.length>>>1;if(0!==v){for(e=0;e1;){var A=--n;a=m[2*n],o=m[2*n+1];var T=A-1,S=m[2*T],E=m[2*T+1];if(!(isNaN(a)||isNaN(o)||isNaN(S)||isNaN(E))){k+=1,a=(a-g[0])/(g[2]-g[0]),o=(o-g[1])/(g[3]-g[1]),S=(S-g[0])/(g[2]-g[0]),E=(E-g[1])/(g[3]-g[1]);var L=S-a,C=E-o,z=A|1<<24,D=A-1,I=A,P=A-1|1<<24;y[--w]=-C,y[--w]=-L,y[--w]=o,y[--w]=a,_[--M]=z,_[--M]=D,y[--w]=C,y[--w]=L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=-C,y[--w]=-L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=C,y[--w]=L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=-C,y[--w]=-L,y[--w]=o,y[--w]=a,_[--M]=z,_[--M]=D,y[--w]=C,y[--w]=L,y[--w]=o,y[--w]=a,_[--M]=z,_[--M]=D}}for(e=0;e FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n highp float e = floor(log2(av));\n highp float m = av * pow(2.0, -e) - 1.0;\n \n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n \n //Unpack exponent\n highp float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0; \n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\n\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if(any(lessThan(worldPosition, clipBounds[0])) || any(greaterThan(worldPosition, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = vec4(pickId/255.0, encode_float_1_0(pixelArcLength).xyz);\n}",null,a)}},{"gl-shader":239}],156:[function(t,e,r){"use strict";function n(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function i(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function a(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function o(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.dirty=!0,this.pixelRatio=1}function s(t){var e=t.gl||t.scene&&t.scene.gl,r=m(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var n=g(e);n.attributes.position.location=0,n.attributes.nextPosition.location=1,n.attributes.arcLength.location=2,n.attributes.lineWidth.location=3,n.attributes.color.location=4;for(var i=l(e),a=u(e,[{buffer:i,size:3,offset:0,stride:48},{buffer:i,size:3,offset:12,stride:48},{buffer:i,size:1,offset:24,stride:48},{buffer:i,size:1,offset:28,stride:48},{buffer:i,size:4,offset:32,stride:48}]),s=d(new Array(1024),[256,1,4]),h=0;h<1024;++h)s.data[h]=255;var f=c(e,s);f.wrap=e.REPEAT;var p=new o(e,r,n,i,a,f);return p.update(t),p}e.exports=s;var l=t("gl-buffer"),u=t("gl-vao"),c=t("gl-texture2d"),h=t("glsl-read-float"),f=t("binary-search-bounds"),d=t("ndarray"),p=t("./lib/shaders"),m=p.createShader,g=p.createPickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],y=o.prototype;y.isTransparent=function(){return this.opacity<1},y.isOpaque=function(){return this.opacity>=1},y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.drawTransparent=y.draw=function(t){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||v,view:t.view||v,projection:t.projection||v,clipBounds:i(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},y.drawPick=function(t){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||v,view:t.view||v,projection:t.projection||v,pickId:this.pickId,clipBounds:i(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},y.update=function(t){var e,r;this.dirty=!0;var i=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),"opacity"in t&&(this.opacity=+t.opacity);var a=t.position||t.positions;if(a){var o=t.color||t.colors||[0,0,0,1],s=t.lineWidth||1,l=[],u=[],c=[],h=0,p=0,m=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],g=!1;t:for(e=1;e0){for(var b=0;b<24;++b)l.push(l[l.length-12]);p+=2,g=!0}continue t}m[0][r]=Math.min(m[0][r],v[r],y[r]),m[1][r]=Math.max(m[1][r],v[r],y[r])}var x,_;Array.isArray(o[0])?(x=o[e-1],_=o[e]):x=_=o,3===x.length&&(x=[x[0],x[1],x[2],1]),3===_.length&&(_=[_[0],_[1],_[2],1]);var w;w=Array.isArray(s)?s[e-1]:s;var M=h;if(h+=n(v,y),g){for(r=0;r<2;++r)l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,x[0],x[1],x[2],x[3]);p+=2,g=!1}l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,x[0],x[1],x[2],x[3],v[0],v[1],v[2],y[0],y[1],y[2],M,-w,x[0],x[1],x[2],x[3],y[0],y[1],y[2],v[0],v[1],v[2],h,-w,_[0],_[1],_[2],_[3],y[0],y[1],y[2],v[0],v[1],v[2],h,w,_[0],_[1],_[2],_[3]),p+=4}if(this.buffer.update(l),u.push(h),c.push(a[a.length-1].slice()),this.bounds=m,this.vertexCount=p,this.points=c,this.arcLength=u,"dashes"in t){var k=t.dashes,A=k.slice();for(A.unshift(0),e=1;e0?(n=2*Math.sqrt(r+1),t[3]=.25*n,t[0]=(e[6]-e[9])/n,t[1]=(e[8]-e[2])/n,t[2]=(e[1]-e[4])/n):e[0]>e[5]&e[0]>e[10]?(n=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/n,t[0]=.25*n,t[1]=(e[1]+e[4])/n,t[2]=(e[8]+e[2])/n):e[5]>e[10]?(n=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/n,t[0]=(e[1]+e[4])/n,t[1]=.25*n,t[2]=(e[6]+e[9])/n):(n=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/n,t[0]=(e[8]+e[2])/n,t[1]=(e[6]+e[9])/n,t[2]=.25*n),t},i.fromRotationTranslationScale=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3],l=i+i,u=a+a,c=o+o,h=i*l,f=i*u,d=i*c,p=a*u,m=a*c,g=o*c,v=s*l,y=s*u,b=s*c,x=n[0],_=n[1],w=n[2];return t[0]=(1-(p+g))*x,t[1]=(f+b)*x,t[2]=(d-y)*x,t[3]=0,t[4]=(f-b)*_,t[5]=(1-(h+g))*_,t[6]=(m+v)*_,t[7]=0,t[8]=(d+y)*w,t[9]=(m-v)*w,t[10]=(1-(h+p))*w,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},i.fromRotationTranslationScaleOrigin=function(t,e,r,n,i){var a=e[0],o=e[1],s=e[2],l=e[3],u=a+a,c=o+o,h=s+s,f=a*u,d=a*c,p=a*h,m=o*c,g=o*h,v=s*h,y=l*u,b=l*c,x=l*h,_=n[0],w=n[1],M=n[2],k=i[0],A=i[1],T=i[2];return t[0]=(1-(m+v))*_,t[1]=(d+x)*_,t[2]=(p-b)*_,t[3]=0,t[4]=(d-x)*w,t[5]=(1-(f+v))*w,t[6]=(g+y)*w,t[7]=0,t[8]=(p+b)*M,t[9]=(g-y)*M,t[10]=(1-(f+m))*M,t[11]=0,t[12]=r[0]+k-(t[0]*k+t[4]*A+t[8]*T),t[13]=r[1]+A-(t[1]*k+t[5]*A+t[9]*T),t[14]=r[2]+T-(t[2]*k+t[6]*A+t[10]*T),t[15]=1,t},i.fromQuat=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,h=n*s,f=i*o,d=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return t[0]=1-h-p,t[1]=c+v,t[2]=f-g,t[3]=0,t[4]=c-v,t[5]=1-u-p,t[6]=d+m,t[7]=0,t[8]=f+g,t[9]=d-m,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.frustum=function(t,e,r,n,i,a,o){var s=1/(r-e),l=1/(i-n),u=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(o+a)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*u,t[15]=0,t},i.perspective=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t},i.perspectiveFromFieldOfView=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-((o-s)*l)*.5,t[9]=(i-a)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t},i.ortho=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t},i.lookAt=function(t,e,r,a){var o,s,l,u,c,h,f,d,p,m,g=e[0],v=e[1],y=e[2],b=a[0],x=a[1],_=a[2],w=r[0],M=r[1],k=r[2];return Math.abs(g-w).999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(a.cross(t,i,o),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=1+l,s.normalize(n,n))}}(),s.setAxes=function(){var t=i.create();return function(e,r,n,i){return t[0]=n[0],t[3]=n[1],t[6]=n[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],s.normalize(e,s.fromMat3(e,t))}}(),s.clone=o.clone,s.fromValues=o.fromValues,s.copy=o.copy,s.set=o.set,s.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},s.setAxisAngle=function(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t},s.getAxisAngle=function(t,e){var r=2*Math.acos(e[3]),n=Math.sin(r/2);return 0!=n?(t[0]=e[0]/n,t[1]=e[1]/n,t[2]=e[2]/n):(t[0]=1,t[1]=0,t[2]=0),r},s.add=o.add,s.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1],u=r[2],c=r[3];return t[0]=n*c+o*s+i*u-a*l,t[1]=i*c+o*l+a*s-n*u,t[2]=a*c+o*u+n*l-i*s,t[3]=o*c-n*s-i*l-a*u,t},s.mul=s.multiply,s.scale=o.scale,s.rotateX=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+o*s,t[1]=i*l+a*s,t[2]=a*l-i*s,t[3]=o*l-n*s,t},s.rotateY=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l-a*s,t[1]=i*l+o*s,t[2]=a*l+n*s,t[3]=o*l-i*s,t},s.rotateZ=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+i*s,t[1]=i*l-n*s,t[2]=a*l+o*s,t[3]=o*l-a*s,t},s.calculateW=function(t,e){var r=e[0],n=e[1],i=e[2];return t[0]=r,t[1]=n,t[2]=i,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),t},s.dot=o.dot,s.lerp=o.lerp,s.slerp=function(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=u*d+c*p+h*m+f*g,a<0&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*h+l*m,t[3]=s*f+l*g,t},s.sqlerp=function(){var t=s.create(),e=s.create();return function(r,n,i,a,o,l){return s.slerp(t,n,o,l),s.slerp(e,i,a,l),s.slerp(r,t,e,2*l*(1-l)),r}}(),s.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a,s=o?1/o:0;return t[0]=-r*s,t[1]=-n*s,t[2]=-i*s,t[3]=a*s,t},s.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},s.length=o.length,s.len=s.length,s.squaredLength=o.squaredLength,s.sqrLen=s.squaredLength,s.normalize=o.normalize,s.fromMat3=function(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(e[3*i+i]-e[3*a+a]-e[3*o+o]+1),t[i]=.5*r,r=.5/r,t[3]=(e[3*a+o]-e[3*o+a])*r,t[a]=(e[3*a+i]+e[3*i+a])*r,t[o]=(e[3*o+i]+e[3*i+o])*r}return t},s.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},s.exactEquals=o.exactEquals,s.equals=o.equals,e.exports=s},{"./common.js":178,"./mat3.js":181,"./vec3.js":185,"./vec4.js":186}],184:[function(t,e,r){var n=t("./common.js"),i={};i.create=function(){var t=new n.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},i.fromValues=function(t,e){var r=new n.ARRAY_TYPE(2);return r[0]=t,r[1]=e,r},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},i.set=function(t,e,r){return t[0]=e,t[1]=r,t},i.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t},i.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t},i.sub=i.subtract,i.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},i.mul=i.multiply,i.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},i.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},i.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t},i.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)},i.dist=i.distance,i.squaredDistance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1];return Math.sqrt(e*e+r*r)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1];return e*e+r*r},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},i.cross=function(t,e,r){var n=e[0]*r[1]-e[1]*r[0];return t[0]=t[1]=0,t[2]=n,t},i.lerp=function(t,e,r,n){var i=e[0],a=e[1];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t},i.random=function(t,e){e=e||1;var r=2*n.RANDOM()*Math.PI;return t[0]=Math.cos(r)*e,t[1]=Math.sin(r)*e,t},i.transformMat2=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t},i.transformMat2d=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t},i.transformMat3=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[3]*i+r[6],t[1]=r[1]*n+r[4]*i+r[7],t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=2),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},i.cross=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t},i.lerp=function(t,e,r,n){var i=e[0],a=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t},i.hermite=function(t,e,r,n,i,a){var o=a*a,s=o*(2*a-3)+1,l=o*(a-2)+a,u=o*(a-1),c=o*(3-2*a);return t[0]=e[0]*s+r[0]*l+n[0]*u+i[0]*c,t[1]=e[1]*s+r[1]*l+n[1]*u+i[1]*c,t[2]=e[2]*s+r[2]*l+n[2]*u+i[2]*c,t},i.bezier=function(t,e,r,n,i,a){var o=1-a,s=o*o,l=a*a,u=s*o,c=3*a*s,h=3*l*o,f=l*a;return t[0]=e[0]*u+r[0]*c+n[0]*h+i[0]*f,t[1]=e[1]*u+r[1]*c+n[1]*h+i[1]*f,t[2]=e[2]*u+r[2]*c+n[2]*h+i[2]*f,t},i.random=function(t,e){e=e||1;var r=2*n.RANDOM()*Math.PI,i=2*n.RANDOM()-1,a=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*e,t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t},i.transformMat3=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t},i.transformQuat=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,h=u*i+l*n-o*a,f=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+h*-l-f*-s,t[1]=h*u+d*-s+f*-o-c*-l,t[2]=f*u+d*-l+c*-s-h*-o,t},i.rotateX=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.rotateY=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.rotateZ=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=3),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s1?0:Math.acos(a)},i.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(l))},e.exports=i},{"./common.js":178}],186:[function(t,e,r){var n=t("./common.js"),i={};i.create=function(){var t=new n.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},i.fromValues=function(t,e,r,i){var a=new n.ARRAY_TYPE(4);return a[0]=t,a[1]=e,a[2]=r,a[3]=i,a},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},i.set=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t},i.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t},i.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t},i.sub=i.subtract,i.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t},i.mul=i.multiply,i.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},i.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t},i.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},i.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)},i.dist=i.distance,i.squaredDistance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},i.lerp=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t},i.random=function(t,e){return e=e||1,t[0]=n.RANDOM(),t[1]=n.RANDOM(),t[2]=n.RANDOM(),t[3]=n.RANDOM(),i.normalize(t,t),i.scale(t,t,e),t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t},i.transformQuat=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,h=u*i+l*n-o*a,f=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+h*-l-f*-s,t[1]=h*u+d*-s+f*-o-c*-l,t[2]=f*u+d*-l+c*-s-h*-o,t[3]=e[3],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=4),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s1.0001)return null;g+=m[c]}return Math.abs(g-1)>.001?null:[h,o(t,m),m]}var l=t("barycentric"),u=t("polytope-closest-point/lib/closest_point_2d.js");e.exports=s},{barycentric:42,"polytope-closest-point/lib/closest_point_2d.js":467}],188:[function(t,e,r){var n="precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if(any(lessThan(f_position, clipBounds[0])) || \n any(greaterThan(f_position, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = vec4(pickId, f_id.xyz);\n}";r.meshShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec4 m_position = model * vec4(position, 1.0);\n vec4 t_position = view * m_position;\n gl_Position = projection * t_position;\n f_color = color;\n f_normal = normal;\n f_data = position;\n f_eyeDirection = eyePosition - position;\n f_lightDirection = lightPosition - position;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution_2_0(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\n\n\nfloat cookTorranceSpecular_1_1(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution_2_0(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(f_data, clipBounds[0])) || \n any(greaterThan(f_data, clipBounds[1]))) {\n discard;\n }\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n \n if(!gl_FrontFacing) {\n N = -N;\n }\n\n float specular = cookTorranceSpecular_1_1(L, V, N, roughness, fresnel);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(f_data, clipBounds[0])) || \n any(greaterThan(f_data, clipBounds[1]))) {\n discard;\n }\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(position, clipBounds[0])) || \n any(greaterThan(position, clipBounds[1]))) {\n gl_Position = vec4(0,0,0,0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5,0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}",fragment:n,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if(any(lessThan(position, clipBounds[0])) || \n any(greaterThan(position, clipBounds[1]))) {\n gl_Position = vec4(0,0,0,0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}",fragment:n,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor,1);\n}\n",attributes:[{name:"position",type:"vec3"}]}},{}],189:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l,u,c,h,f,d,p,m,g,v,y,b,x,_,w,M,k,A,T){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=c,this.triangleNormals=f,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=b,this.pointColors=_,this.pointUVs=w,this.pointSizes=M,this.pointIds=x,this.pointVAO=k,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=A,this.contourVAO=T,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this._model=I,this._view=I,this._projection=I,this._resolution=[1,1]}function i(t){for(var e=w({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return _(r,[256,256,4],[4,0,1])}function a(t,e,r){for(var n=new Array(e),i=0;i=1},P.isTransparent=function(){return this.opacity<1},P.pickSlots=1,P.setPickBase=function(t){this.pickId=t},P.highlight=function(t){if(!t||!this.contourEnable)return void(this.contourCount=0);for(var e=M(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=k.mallocFloat32(6*a),s=0,l=0;l0){var f=this.triShader;f.bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var f=this.lineShader;f.bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){var f=this.pointShader;f.bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var f=this.contourShader;f.bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind()}},P.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||I,n=t.view||I,i=t.projection||I,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255},l=this.pickShader;if(l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0){var l=this.pointPickShader;l.bind(),l.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}},P.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;as[k]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n],a.uniforms.angle=v[n],u.drawArrays(u.TRIANGLES,s[k],s[A]-s[k]))),y[n]&&M&&(e[1^n]-=T*d*b[n],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=x[n],a.uniforms.angle=_[n],u.drawArrays(u.TRIANGLES,w,M)),e[1^n]=T*c[2+(1^n)]-1,p[n+2]&&(e[1^n]+=T*d*m[n+2],ks[k]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n+2],a.uniforms.angle=v[n+2],u.drawArrays(u.TRIANGLES,s[k],s[A]-s[k]))),y[n+2]&&M&&(e[1^n]+=T*d*b[n+2],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=x[n+2],a.uniforms.angle=_[n+2],u.drawArrays(u.TRIANGLES,w,M))}}(),c.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,u=r.pixelRatio;if(this.titleCount){for(var c=0;c<2;++c)e[c]=2*(o[c]*u-a[c])/(a[2+c]-a[c])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),c.bind=function(){var t=[0,0],e=[0,0],r=[0,0];return function(){var n=this.plot,i=this.shader,a=n._tickBounds,o=n.dataBox,s=n.screenBox,l=n.viewBox;i.bind();for(var u=0;u<2;++u){var c=a[u],h=a[u+2],f=h-c,d=.5*(o[u+2]+o[u]),p=o[u+2]-o[u],m=l[u],g=l[u+2],v=g-m,y=s[u],b=s[u+2],x=b-y;e[u]=2*f/p*v/x,t[u]=2*(c-d)/p*v/x}r[1]=2*n.pixelRatio/(s[3]-s[1]),r[0]=r[1]*(s[3]-s[1])/(s[2]-s[0]),i.uniforms.dataScale=e,i.uniforms.dataShift=t,i.uniforms.textScale=r,this.vbo.bind(),i.attributes.textCoordinate.pointer()}}(),c.update=function(t){var e,r,n,i,a,o=[],l=t.ticks,u=t.bounds;for(a=0;a<2;++a){var c=[Math.floor(o.length/3)],h=[-1/0],f=l[a];for(e=0;er)for(t=r;te)for(t=e;t=0){for(var k=0|M.type.charAt(M.type.length-1),A=new Array(k),T=0;T=0;)S+=1;w[b]=S}var E=new Array(r.length);a(),d._relink=a,d.types={uniforms:l(r),attributes:l(n)},d.attributes=s(p,d,x,w),Object.defineProperty(d,"uniforms",o(p,d,r,E))},e.exports=a},{"./lib/GLError":197,"./lib/create-attributes":198,"./lib/create-uniforms":199,"./lib/reflect":200,"./lib/runtime-reflect":201,"./lib/shader-cache":202}],197:[function(t,e,r){function n(t,e,r){this.shortMessage=e||"",this.longMessage=r||"",this.rawError=t||"",this.message="gl-shader: "+(e||t||"")+(r?"\n"+r:""),this.stack=(new Error).stack}n.prototype=new Error,n.prototype.name="GLError",n.prototype.constructor=n,e.exports=n},{}],198:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}function i(t,e,r,i,a,o,s){for(var l=["gl","v"],u=[],c=0;c=0){var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+h+": "+f);i(t,e,d[0],n,p,o,h)}else{if(!(f.indexOf("mat")>=0))throw new s("","Unknown data type for attribute "+h+": "+f);var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+h+": "+f);a(t,e,d,n,p,o,h)}}}return o}e.exports=o;var s=t("./GLError"),l=n.prototype;l.pointer=function(t,e,r,n){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,t||a.FLOAT,!!e,r||0,n||0),a.enableVertexAttribArray(o)},l.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(l,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}})},{"./GLError":197}],199:[function(t,e,r){"use strict";function n(t){return new Function("y","return function(){return y}")(t)}function i(t,e){for(var r=new Array(t),n=0;n4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+i+"fv(locations["+e+"],false,obj"+t+")"}throw new s("","Unknown uniform data type for "+name+": "+r)}var i=r.charCodeAt(r.length-1)-48;if(i<2||i>4)throw new s("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+i+"iv(locations["+e+"],obj"+t+")";case"v":return"gl.uniform"+i+"fv(locations["+e+"],obj"+t+")";default:throw new s("","Unrecognized data type for vector "+name+": "+r)}}}function c(t,e){if("object"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],a=t;parseInt(n)+""===n?a+="["+n+"]":a+="."+n,"object"==typeof i?r.push.apply(r,c(a,i)):r.push([a,i])}return r}function h(e){for(var n=["return function updateProperty(obj){"],i=c("",e),o=0;o4)throw new s("","Invalid data type");return"b"===t.charAt(0)?i(r,!1):i(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+t);return i(r*r,0)}throw new s("","Unknown uniform data type for "+name+": "+t)}}function d(t,e,i){if("object"==typeof i){var o=p(i);Object.defineProperty(t,e,{get:n(o),set:h(i),enumerable:!0,configurable:!1})}else a[i]?Object.defineProperty(t,e,{get:l(i),set:h(i),enumerable:!0,configurable:!1}):t[e]=f(r[i].type)}function p(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var u=1;u1)for(var l=0;l=0){var m=e[p]-n[p]*(e[p+2]-e[p])/(n[p+2]-n[p]);0===p?o.drawLine(m,e[1],m,e[3],d[p],f[p]):o.drawLine(e[0],m,e[2],m,d[p],f[p])}}for(var p=0;p=0;--t)this.objects[t].dispose();this.objects.length=0;for(var t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},f.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},f.removeObject=function(t){for(var e=this.objects,r=0;r0){var r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function o(t){return"boolean"!=typeof t||t}function s(t){function e(){if(!w&&G.autoResize){var t=M.parentNode,e=1,r=1;t&&t!==document.body?(e=t.clientWidth,r=t.clientHeight):(e=window.innerWidth,r=window.innerHeight);var n=0|Math.ceil(e*G.pixelRatio),i=0|Math.ceil(r*G.pixelRatio);if(n!==M.width||i!==M.height){M.width=n,M.height=i;var a=M.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=e+"px",a.height=r+"px",N=!0}}}function r(){for(var t=O.length,e=F.length,r=0;r0&&0===R[e-1];)R.pop(),F.pop().dispose()}function s(){if(G.contextLost)return!0;A.isContextLost()&&(G.contextLost=!0,G.mouseListener.enabled=!1,G.selection.object=null,G.oncontextloss&&G.oncontextloss())}function b(){if(!s()){A.colorMask(!0,!0,!0,!0),A.depthMask(!0),A.disable(A.BLEND),A.enable(A.DEPTH_TEST);for(var t=O.length,e=F.length,r=0;rS.distance)continue;for(var u=0;u>>1;for(r=0;r=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}function a(t,e){var r=t.gl,i=s(r),a=s(r),l=o(r,u.pointVertex,u.pointFragment),c=o(r,u.pickVertex,u.pickFragment),h=new n(t,i,a,l,c);return h.update(e),t.addObject(h),h}var o=t("gl-shader"),s=t("gl-buffer"),l=t("typedarray-pool"),u=t("./lib/shader");e.exports=a;var c=n.prototype;c.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},c.update=function(t){function e(e,r){return e in t?t[e]:r}var r;t=t||{},this.sizeMin=e("sizeMin",.5),this.sizeMax=e("sizeMax",20),this.color=e("color",[1,0,0,1]).slice(),this.areaRatio=e("areaRatio",1),this.borderColor=e("borderColor",[0,0,0,1]).slice(),this.blend=e("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,a=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,o=t.positions,s=i?o:l.mallocFloat32(o.length),u=a?t.idToIndex:l.mallocInt32(n);if(i||s.set(o),!a)for(s.set(o),r=0;r>8&255,e[2]=r>>16&255,e[3]=r>>24&255,this.pickBuffer.bind(),a.attributes.pickId.pointer(o.UNSIGNED_BYTE),a.uniforms.pickOffset=e,this.pickOffset=r);var f=o.getParameter(o.BLEND),d=o.getParameter(o.DITHER);return f&&!this.blend&&o.disable(o.BLEND),d&&o.disable(o.DITHER),o.drawArrays(o.POINTS,0,this.pointCount),f&&!this.blend&&o.enable(o.BLEND),d&&o.enable(o.DITHER),r+this.pointCount}}(),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{"./lib/shader":206,"gl-buffer":141,"gl-shader":207,"typedarray-pool":521}],215:[function(t,e,r){function n(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=u*d+c*p+h*m+f*g,a<0&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*h+l*m,t[3]=s*f+l*g,t}e.exports=n},{}],216:[function(t,e,r){"use strict";e.exports={vertex:"precision highp float;\n#define GLSLIFY 1\n\n\nvec4 computePosition_1_0(vec2 posHi, vec2 posLo, vec2 scHi, vec2 scLo, vec2 trHi, vec2 trLo) {\n return vec4((posHi + trHi) * scHi\n \t\t\t//FIXME: this thingy does not give noticeable precision gain, need test\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo\n , 0, 1);\n}\n\n\nattribute vec2 positionHi, positionLo;\nattribute float size, border;\nattribute vec2 char, color;\n\n//this is 64-bit form of scale and translate\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform float pixelRatio;\nuniform vec4 viewBox;\nuniform sampler2D palette;\n\nvarying vec4 charColor, borderColor;\nvarying vec2 charId;\nvarying vec2 pointCoord;\nvarying float pointSize;\nvarying float borderWidth;\n\n\nvoid main() {\n charColor = texture2D(palette, vec2(color.x / 255., 0));\n borderColor = texture2D(palette, vec2(color.y / 255., 0));\n\n gl_PointSize = size * pixelRatio;\n pointSize = size * pixelRatio;\n\n charId = char;\n borderWidth = border;\n\n gl_Position = computePosition_1_0(\n positionHi, positionLo,\n scaleHi, scaleLo,\n translateHi, translateLo);\n\n pointCoord = viewBox.xy + (viewBox.zw - viewBox.xy) * (gl_Position.xy * .5 + .5);\n}\n",fragment:"precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D chars;\nuniform vec2 charsShape;\nuniform float charsStep, pixelRatio, charOffset;\n\nvarying vec4 borderColor;\nvarying vec4 charColor;\nvarying vec2 charId;\nvarying vec2 pointCoord;\nvarying float pointSize;\nvarying float borderWidth;\n\nvoid main() {\n\tvec2 pointUV = (pointCoord - gl_FragCoord.xy + pointSize * .5) / pointSize;\n\tpointUV.x = 1. - pointUV.x;\n\tpointUV.y += charOffset;\n\tvec2 texCoord = ((charId + pointUV) * charsStep) / charsShape;\n\tfloat dist = texture2D(chars, texCoord).r;\n\n\t//max-distance alpha\n\tif (dist < 1e-2)\n\t\tdiscard;\n\n\tfloat dif = 5. * pixelRatio * borderWidth / pointSize;\n\tfloat borderLevel = .748 - dif * .5;\n\tfloat charLevel = .748 + dif * .5;\n\tfloat gamma = .005 * charsStep / pointSize;\n\n\tfloat borderAmt = smoothstep(borderLevel - gamma, borderLevel + gamma, dist);\n\tfloat charAmt = smoothstep(charLevel - gamma, charLevel + gamma, dist);\n\n\tvec4 color = borderColor;\n\tcolor.a *= borderAmt;\n\n\tgl_FragColor = mix(color, charColor, charAmt);\n}\n",pickVertex:"precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 positionHi, positionLo;\nattribute vec4 id;\nattribute float size;\n\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform vec4 pickOffset;\nuniform float pixelRatio;\n\nvarying vec4 fragColor;\n\n\nvec4 computePosition_1_0(vec2 posHi, vec2 posLo, vec2 scHi, vec2 scLo, vec2 trHi, vec2 trLo) {\n return vec4((posHi + trHi) * scHi\n \t\t\t//FIXME: this thingy does not give noticeable precision gain, need test\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo\n , 0, 1);\n}\n\n\nvoid main() {\n vec4 fragId = id + pickOffset;\n\n fragId.y += floor(fragId.x / 256.0);\n fragId.x -= floor(fragId.x / 256.0) * 256.0;\n\n fragId.z += floor(fragId.y / 256.0);\n fragId.y -= floor(fragId.y / 256.0) * 256.0;\n\n fragId.w += floor(fragId.z / 256.0);\n fragId.z -= floor(fragId.z / 256.0) * 256.0;\n\n fragColor = fragId / 255.0;\n\n gl_PointSize = size * .25 * pixelRatio;\n\n gl_Position = computePosition_1_0(\n positionHi, positionLo,\n scaleHi, scaleLo,\n translateHi, translateLo);\n}\n",pickFragment:"precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n gl_FragColor = fragColor;\n}\n"}},{}],217:[function(t,e,r){arguments[4][77][0].apply(r,arguments)},{dup:77}],218:[function(t,e,r){arguments[4][196][0].apply(r,arguments)},{"./lib/GLError":219,"./lib/create-attributes":220,"./lib/create-uniforms":221,"./lib/reflect":222,"./lib/runtime-reflect":223,"./lib/shader-cache":224,dup:196}],219:[function(t,e,r){arguments[4][197][0].apply(r,arguments)},{dup:197}],220:[function(t,e,r){arguments[4][198][0].apply(r,arguments)},{"./GLError":219,dup:198}],221:[function(t,e,r){arguments[4][199][0].apply(r,arguments)},{"./GLError":219,"./reflect":222,dup:199}],222:[function(t,e,r){arguments[4][200][0].apply(r,arguments)},{dup:200}],223:[function(t,e,r){arguments[4][201][0].apply(r,arguments)},{dup:201}],224:[function(t,e,r){arguments[4][202][0].apply(r,arguments)},{"./GLError":219,dup:202,"gl-format-compiler-error":149,"weakmap-shim":542}],225:[function(t,e,r){"use strict";function n(t,e,r,n,a){a<=4*f?i(0,a-1,t,e,r,n):h(0,a-1,t,e,r,n)}function i(t,e,r,n,i,a){for(var o=t+1;o<=e;++o){for(var s=r[o],l=n[2*o],u=n[2*o+1],c=i[o],h=a[o],f=o;f>t;){var d=r[f-1],p=n[2*(f-1)];if((d-s||l-p)>=0)break;r[f]=d,n[2*f]=p,n[2*f+1]=n[2*f-1],i[f]=i[f-1],a[f]=a[f-1],f-=1}r[f]=s,n[2*f]=l,n[2*f+1]=u,i[f]=c,a[f]=h}}function a(t,e,r,n,i,a){var o=r[t],s=n[2*t],l=n[2*t+1],u=i[t],c=a[t];r[t]=r[e],n[2*t]=n[2*e],n[2*t+1]=n[2*e+1],i[t]=i[e],a[t]=a[e],r[e]=o,n[2*e]=s,n[2*e+1]=l,i[e]=u,a[e]=c}function o(t,e,r,n,i,a){r[t]=r[e],n[2*t]=n[2*e],n[2*t+1]=n[2*e+1],i[t]=i[e],a[t]=a[e]}function s(t,e,r,n,i,a,o){var s=n[t],l=i[2*t],u=i[2*t+1],c=a[t],h=o[t];n[t]=n[e],i[2*t]=i[2*e],i[2*t+1]=i[2*e+1],a[t]=a[e],o[t]=o[e],n[e]=n[r],i[2*e]=i[2*r],i[2*e+1]=i[2*r+1],a[e]=a[r],o[e]=o[r],n[r]=s,i[2*r]=l,i[2*r+1]=u,a[r]=c,o[r]=h}function l(t,e,r,n,i,a,o,s,l,u,c){s[t]=s[e],l[2*t]=l[2*e],l[2*t+1]=l[2*e+1],u[t]=u[e],c[t]=c[e],s[e]=r,l[2*e]=n,l[2*e+1]=i,u[e]=a,c[e]=o}function u(t,e,r,n,i){return(r[t]-r[e]||n[2*e]-n[2*t]||i[t]-i[e])<0}function c(t,e,r,n,i,a,o,s){return(e-a[t]||o[2*t]-r||i-s[t])<0}function h(t,e,r,n,d,p){var m=(e-t+1)/6|0,g=t+m,v=e-m,y=t+e>>1,b=y-m,x=y+m,_=g,w=b,M=y,k=x,A=v,T=t+1,S=e-1,E=0;u(_,w,r,n,d,p)&&(E=_,_=w,w=E),u(k,A,r,n,d,p)&&(E=k,k=A,A=E),u(_,M,r,n,d,p)&&(E=_,_=M,M=E),u(w,M,r,n,d,p)&&(E=w,w=M,M=E),u(_,k,r,n,d,p)&&(E=_,_=k,k=E),u(M,k,r,n,d,p)&&(E=M,M=k,k=E),u(w,A,r,n,d,p)&&(E=w,w=A,A=E),u(w,M,r,n,d,p)&&(E=w,w=M,M=E),u(k,A,r,n,d,p)&&(E=k,k=A,A=E);var L=r[w],C=n[2*w],z=n[2*w+1],D=d[w],I=p[w],P=r[k],O=n[2*k],j=n[2*k+1],R=d[k],F=p[k],N=_,B=M,U=A,V=g,H=y,q=v,G=r[N],Y=r[B],W=r[U];r[V]=G,r[H]=Y,r[q]=W;for(var X=0;X<2;++X){var Z=n[2*N+X],J=n[2*B+X],Q=n[2*U+X];n[2*V+X]=Z,n[2*H+X]=J,n[2*q+X]=Q}var K=d[N],$=d[B],tt=d[U];d[V]=K,d[H]=$,d[q]=tt;var et=p[N],rt=p[B],nt=p[U];p[V]=et,p[H]=rt,p[q]=nt,o(b,t,r,n,d,p),o(x,e,r,n,d,p);for(var it=T;it<=S;++it)if(c(it,L,C,z,D,r,n,d))it!==T&&a(it,T,r,n,d,p),++T;else if(!c(it,P,O,j,R,r,n,d))for(;;){if(c(S,P,O,j,R,r,n,d)){c(S,L,C,z,D,r,n,d)?(s(it,T,S,r,n,d,p),++T,--S):(a(it,S,r,n,d,p),--S);break}if(--S=Math.max(.9*d,32)){var b=u+s>>>1;l(g,v,h,f,b,c+1),f=b}l(g,v,h,f,y,c+1),f=y}}}var u=t.length>>>1;if(u<1)return[];for(var c=1/0,h=1/0,f=-1/0,d=-1/0,p=0;p=0;--_){t[2*_]=(t[2*_]-c)*v,t[2*_+1]=(t[2*_+1]-h)*y;var A=x[_];A!==M&&(w.push(new i(b*Math.pow(.5,A),_+1,k-(_+1))),k=_+1,M=A)}return w.push(new i(b*Math.pow(.5,A+1),0,k)),o.free(x),w}var o=t("typedarray-pool"),s=t("./lib/sort");e.exports=a},{"./lib/sort":225,"typedarray-pool":521}],227:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.sizeBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.charBuffer=s,this.pointCount=0,this.pickOffset=0,this.points=null,this.scales=[],this.xCoords=[],this.charCanvas=document.createElement("canvas"),this.charTexture=h(this.plot.gl,this.charCanvas),this.charStep=400,this.charOffset=.032,this.snapThreshold=1e4,this.paletteTexture=h(this.plot.gl,[256,1])}function i(t,e){var r=t.gl,i=a(r,l.vertex,l.fragment),s=a(r,l.pickVertex,l.pickFragment),u=o(r),c=o(r),h=o(r),f=o(r),d=o(r),p=new n(t,i,s,u,c,h,f,d);return p.update(e),t.addObject(p),p}e.exports=i;var a=t("gl-shader"),o=t("gl-buffer"),s=t("typedarray-pool"),l=t("./lib/shaders"),u=t("snap-points-2d"),c=t("font-atlas-sdf"),h=t("gl-texture2d"),f=t("color-id"),d=t("ndarray"),p=t("clamp"),m=t("binary-search-bounds"),g=n.prototype;!function(){function t(){var t=this.plot,u=t.viewBox,c=t.dataBox,h=t.pixelRatio,f=c[2]-c[0],d=c[3]-c[1],p=2/f,m=2/d,g=-c[0]-.5*f,v=-c[1]-.5*d;i[0]=p,a[0]=p-i[0],i[1]=m,a[1]=m-i[1],o[0]=g,s[0]=g-o[0],o[1]=v,s[1]=v-o[1];var y=u[2]-u[0],b=u[3]-u[1];e=Math.min(f/y,d/b),l[0]=2*h/y,l[1]=2*h/b,r=c[0],n=c[2]}var e,r,n,i=new Float32Array([0,0]),a=new Float32Array([0,0]),o=new Float32Array([0,0]),s=new Float32Array([0,0]),l=[0,0],u=[0,0,0,0];g.drawPick=function(l){var c=void 0!==l,h=this.plot,f=this.pointCount,d=f>this.snapThreshold;if(!f)return l;t.call(this);var p=h.gl,g=c?this.pickShader:this.shader,v=p.isEnabled(p.BLEND);if(g.bind(),c){this.pickOffset=l;for(var y=0;y<4;++y)u[y]=l>>8*y&255;g.uniforms.pickOffset=u,this.idBuffer.bind(),g.attributes.id.pointer(p.UNSIGNED_BYTE,!1)}else p.blendFuncSeparate(p.SRC_ALPHA,p.ONE_MINUS_SRC_ALPHA,p.ONE,p.ONE_MINUS_SRC_ALPHA),p.blendColor(0,0,0,1),v||p.enable(p.BLEND),this.colorBuffer.bind(),g.attributes.color.pointer(p.UNSIGNED_BYTE,!1),this.charBuffer.bind(),g.attributes.char.pointer(p.UNSIGNED_BYTE,!1),g.uniforms.chars=this.charTexture.bind(0),g.uniforms.charsShape=[this.charCanvas.width,this.charCanvas.height],g.uniforms.charsStep=this.charStep,g.uniforms.palette=this.paletteTexture.bind(1),g.uniforms.charOffset=this.charOffset;this.sizeBuffer.bind(),g.attributes.size.pointer(p.FLOAT,!1,8,0),c||g.attributes.border.pointer(p.FLOAT,!1,8,4),this.positionBuffer.bind(),g.attributes.positionHi.pointer(p.FLOAT,!1,16,0),g.attributes.positionLo.pointer(p.FLOAT,!1,16,8),g.uniforms.pixelRatio=h.pixelRatio,g.uniforms.scaleHi=i,g.uniforms.scaleLo=a,g.uniforms.translateHi=o,g.uniforms.translateLo=s,g.uniforms.viewBox=h.viewBox;var b=this.scales;if(d)for(var x=b.length-1;x>=0;x--){var _=b[x];if(!(_.pixelSize&&_.pixelSize<1.25*e&&x>1)){var w=_.offset,M=_.count+w,k=m.ge(this.xCoords,r,w,M-1),A=m.lt(this.xCoords,n,k,M-1)+1;A>k&&p.drawArrays(p.POINTS,k,A-k)}}else p.drawArrays(p.POINTS,0,f);if(c)return l+f;v?p.blendFunc(p.ONE,p.ONE_MINUS_SRC_ALPHA):p.disable(p.BLEND)}}(),g.draw=g.drawPick,g.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}},g.update=function(t){t=t||{};var e=t.positions||[],r=t.colors||[],n=t.glyphs||[],i=t.sizes||[],a=t.borderWidths||[],o=t.borderColors||[],l=this.plot.gl;null!=t.charOffset&&(this.charOffset=t.charOffset),this.points=e;var h=this.points.length/2,m=s.mallocInt32(h),g=s.mallocFloat32(2*h),v=s.mallocFloat64(2*h);v.set(this.points),this.pointCount=h;var y=h>this.snapThreshold;y&&(this.scales=u(v,m,g));for(var b=s.mallocFloat32(4*h),x=s.mallocFloat32(2*h),_=s.mallocUint8(2*h),w=s.mallocUint32(h),M=s.mallocUint8(2*h),k={},A=[],T=[],S=[],E=0,L=h,C=0;EO&&(O=i[E]);var j=this.charStep;this.charStep=p(Math.ceil(4*O),128,768);var R=Object.keys(I),F=this.charStep,N=Math.floor(F/2),B=l.getParameter(l.MAX_TEXTURE_SIZE),U=B/F*(B/F),V=Math.min(B,F*R.length),H=Math.min(B,F*Math.ceil(F*R.length/B)),q=Math.floor(V/F);R.length>U&&console.warn("gl-scatter2d-fancy: number of characters is more than maximum texture size. Try reducing it."),this.chars&&this.chars+""==R+""&&this.charStep==j||(this.charCanvas=c({canvas:this.charCanvas,family:"sans-serif",size:N,shape:[V,H],step:[F,F],chars:R}),this.chars=R);for(var E=0;E>>1,n=u.mallocInt32(r),i=u.mallocFloat32(2*r),a=u.mallocFloat64(2*r);a.set(this.points),this.scales=l(a,n,i,this.bounds);var o=u.mallocFloat64(r),s=u.mallocFloat32(2*r),c=u.mallocFloat32(2*r);s.set(a);for(var h=0,f=0;h>8&255,g[2]=t>>16&255,g[3]=t>>24&255,n.uniforms.pickOffset=g,l.bind(),n.attributes.pickId.pointer(v.UNSIGNED_BYTE)):(n.uniforms.useWeight=1,this.weightBuffer.bind(),n.attributes.weight.pointer());for(var D=this.xCoords,I=(x[0]-u[0]-S*c*y)/_,P=(x[2]-u[0]+S*c*y)/_,O=!0,j=i.length-1;j>=0;j--){var R=i[j];if(!(R.pixelSize1)){var F=R.offset,N=R.count+F,B=s.ge(D,I,F,N-1),U=s.lt(D,P,B,N-1)+1;U>B&&v.drawArrays(v.POINTS,B,U-B),!e&&O&&(O=!1,n.uniforms.useWeight=0)}}return t+this.pointCount},h.drawPick=h.draw,h.pick=function(t,e,r){var n=r-this.pickOffset;return n<0||n>=this.pointCount?null:{object:this,pointId:n,dataCoord:[this.points[2*n],this.points[2*n+1]]}}},{"./lib/shader":228,"binary-search-bounds":229,"gl-buffer":141,"gl-shader":239,"snap-points-2d":231,"typedarray-pool":521}],233:[function(t,e,r){"use strict";function n(t,e){var r=a[e];if(r||(r=a[e]={}),t in r)return r[t];for(var n=i(t,{textAlign:"center",textBaseline:"middle",lineHeight:1,font:e}),o=i(t,{triangles:!0,textAlign:"center",textBaseline:"middle",lineHeight:1,font:e}),s=[[1/0,1/0],[-1/0,-1/0]],l=0;lMath.abs(j[1])){var R=O;O=j,j=R,R=I,I=P,P=R;var F=z;z=D,D=F}O[0]<0&&(I[z]=-1),j[1]>0&&(P[D]=-1);for(var N=0,B=0,C=0;C<4;++C)N+=Math.pow(p[4*z+C],2),B+=Math.pow(p[4*D+C],2);I[z]/=Math.sqrt(N),P[D]/=Math.sqrt(B),d.axes[0]=I,d.axes[1]=P,d.fragClipBounds[0]=u(E,b[0],_,-1e8),d.fragClipBounds[1]=u(E,b[1],_,1e8),e.vao.draw(f.TRIANGLES,e.vertexCount),e.lineWidth>0&&(f.lineWidth(e.lineWidth),e.vao.draw(f.LINES,e.lineVertexCount,e.vertexCount))}}function f(t,e,r,n,i,a){var o=r.gl;if(r.vao.bind(),i===r.opacity<1||a){t.bind();var s=t.uniforms;s.model=n.model||x,s.view=n.view||x,s.projection=n.projection||x,w[0]=2/o.drawingBufferWidth,w[1]=2/o.drawingBufferHeight,s.screenSize=w,s.highlightId=r.highlightId,s.highlightScale=r.highlightScale,s.fragClipBounds=D,s.clipBounds=r.axes.bounds,s.opacity=r.opacity,s.pickGroup=r.pickId/255,s.pixelRatio=r.pixelRatio,r.vao.draw(o.TRIANGLES,r.vertexCount),r.lineWidth>0&&(o.lineWidth(r.lineWidth),r.vao.draw(o.LINES,r.lineVertexCount,r.vertexCount))}h(e,r,n,i,a),r.vao.unbind()}function d(t){var e=t.gl,r=y.createPerspective(e),n=y.createOrtho(e),i=y.createProject(e),a=y.createPickPerspective(e),s=y.createPickOrtho(e),l=y.createPickProject(e),u=p(e),c=p(e),h=p(e),f=p(e),d=m(e,[{buffer:u,size:3,type:e.FLOAT},{buffer:c,size:4,type:e.FLOAT},{buffer:h,size:2,type:e.FLOAT},{buffer:f,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),g=new o(e,r,n,i,u,c,h,f,d,a,s,l);return g.update(t),g}var p=t("gl-buffer"),m=t("gl-vao"),g=t("typedarray-pool"),v=t("gl-mat4/multiply"),y=t("./lib/shaders"),b=t("./lib/glyphs"),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];e.exports=d;var _=o.prototype;_.pickSlots=1,_.setPickBase=function(t){this.pickId=t},_.isTransparent=function(){if(this.opacity<1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]<1)return!0;return!1},_.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]>=1)return!0;return!1};var w=[0,0],M=[0,0,0],k=[0,0,0],A=[0,0,0,1],T=[0,0,0,1],S=x.slice(),E=[0,0,0],L=[[0,0,0],[0,0,0]],C=[-1e8,-1e8,-1e8],z=[1e8,1e8,1e8],D=[C,z];_.draw=function(t){f(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!1,!1)},_.drawTransparent=function(t){f(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!0,!1)},_.drawPick=function(t){f(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,!1,!0)},_.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[2]+(t.value[1]<<8)+(t.value[0]<<16);if(e>=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},_.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},_.update=function(t){if(t=t||{},"perspective"in t&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if("projectOpacity"in t)if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{var r=+t.projectOpacity;this.projectOpacity=[r,r,r]}"opacity"in t&&(this.opacity=t.opacity),this.dirty=!0;var n=t.position;if(n){var i=t.font||"normal",a=t.alignment||[0,0],o=[1/0,1/0,1/0],s=[-1/0,-1/0,-1/0],l=t.glyph,u=t.color,c=t.size,h=t.angle,f=t.lineColor,d=0,p=0,m=0,v=n.length;t:for(var y=0;y0&&(z[0]=-a[0]*(1+A[0][0]));for(var H=M.cells,q=M.positions,_=0;_0){var v=r*c;o.drawBox(h-v,f-v,d+v,f+v,a),o.drawBox(h-v,p-v,d+v,p+v,a),o.drawBox(h-v,f-v,h+v,p+v,a),o.drawBox(d-v,f-v,d+v,p+v,a)}}}},l.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},l.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":236,"gl-buffer":141,"gl-shader":239}],238:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function i(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}function a(t,e){return new i(t,o(t,e),s.mallocUint8(e[0]*e[1]*4))}e.exports=a;var o=t("gl-fbo"),s=t("typedarray-pool"),l=t("ndarray"),u=t("bit-twiddle").nextPow2,c=t("cwise/lib/wrapper")({args:["array",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},"scalar","scalar","index"],pre:{body:"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},body:{body:"{if(_inline_46_arg0_<255||_inline_46_arg1_<255||_inline_46_arg2_<255||_inline_46_arg3_<255){var _inline_46_l=_inline_46_arg4_-_inline_46_arg6_[0],_inline_46_a=_inline_46_arg5_-_inline_46_arg6_[1],_inline_46_f=_inline_46_l*_inline_46_l+_inline_46_a*_inline_46_a;_inline_46_fthis.buffer.length){s.free(this.buffer);for(var n=this.buffer=s.mallocUint8(u(r*e*4)),i=0;i=0){for(var k=0|M.type.charAt(M.type.length-1),A=new Array(k),T=0;T=0;)S+=1;_[w]=S}var E=new Array(r.length);a(),d._relink=a,d.types={uniforms:l(r),attributes:l(n)},d.attributes=s(p,d,b,_),Object.defineProperty(d,"uniforms",o(p,d,r,E))},e.exports=a},{"./lib/GLError":240,"./lib/create-attributes":241,"./lib/create-uniforms":242,"./lib/reflect":243,"./lib/runtime-reflect":244,"./lib/shader-cache":245}],240:[function(t,e,r){arguments[4][197][0].apply(r,arguments)},{dup:197}],241:[function(t,e,r){arguments[4][198][0].apply(r,arguments)},{"./GLError":240,dup:198}],242:[function(t,e,r){arguments[4][199][0].apply(r,arguments)},{"./GLError":240,"./reflect":243,dup:199}],243:[function(t,e,r){arguments[4][200][0].apply(r,arguments)},{dup:200}],244:[function(t,e,r){arguments[4][201][0].apply(r,arguments)},{dup:201}],245:[function(t,e,r){arguments[4][202][0].apply(r,arguments)},{"./GLError":240,dup:202,"gl-format-compiler-error":149,"weakmap-shim":542}],246:[function(t,e,r){"use strict";function n(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}function i(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r}e.exports=i;var a=n.prototype;a.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(t){return t.slice()}),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},a.draw=function(){var t=this.enable,e=this.width,r=this.color,n=this.center,i=this.plot,a=i.line,o=i.dataBox,s=i.viewBox;if(a.bind(),o[0]<=n[0]&&n[0]<=o[2]&&o[1]<=n[1]&&n[1]<=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),u=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&&a.drawLine(l,u,s[0],u,e[0],r[0]),t[1]&&a.drawLine(l,u,l,s[1],e[1],r[1]),t[2]&&a.drawLine(l,u,s[2],u,e[2],r[2]),t[3]&&a.drawLine(l,u,l,s[3],e[3],r[3])}},a.dispose=function(){this.plot.removeOverlay(this)}},{}],247:[function(t,e,r){"use strict";var n=t("gl-shader");e.exports=function(t){ +return n(t,"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, color;\nattribute float weight;\n\nuniform mat4 model, view, projection;\nuniform vec3 coordinates[3];\nuniform vec4 colors[3];\nuniform vec2 screenShape;\nuniform float lineWidth;\n\nvarying vec4 fragColor;\n\nvoid main() {\n vec3 vertexPosition = mix(coordinates[0],\n mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\n\n vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\n vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\n vec2 delta = weight * clipOffset * screenShape;\n vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\n\n gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\n fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\n}\n","precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}",null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},{"gl-shader":239}],248:[function(t,e,r){"use strict";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}function i(t,e){function r(t,e,r,n,a,o){var s=[t,e,r,0,0,0,1];s[n+3]=1,s[n]=a,i.push.apply(i,s),s[6]=-1,i.push.apply(i,s),s[n]=o,i.push.apply(i,s),i.push.apply(i,s),s[6]=1,i.push.apply(i,s),s[n]=a,i.push.apply(i,s)}var i=[];r(0,0,0,0,0,1),r(0,0,0,1,0,1),r(0,0,0,2,0,1),r(1,0,0,1,-1,1),r(1,0,0,2,-1,1),r(0,1,0,0,-1,1),r(0,1,0,2,-1,1),r(0,0,1,0,-1,1),r(0,0,1,1,-1,1);var l=a(t,i),u=o(t,[{type:t.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:t.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:t.FLOAT,buffer:l,size:1,offset:24,stride:28}]),c=s(t);c.attributes.position.location=0,c.attributes.color.location=1,c.attributes.weight.location=2;var h=new n(t,l,u,c);return h.update(e),h}var a=t("gl-buffer"),o=t("gl-vao"),s=t("./shaders/index");e.exports=i;var l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],u=n.prototype,c=[0,0,0],h=[0,0,0],f=[0,0];u.isTransparent=function(){return!1},u.drawTransparent=function(t){},u.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||l,o=t.view||l,s=t.projection||l;this.axes&&(i=this.axes.lastCubeProps.axis);for(var u=c,d=h,p=0;p<3;++p)i&&i[p]<0?(u[p]=this.bounds[0][p],d[p]=this.bounds[1][p]):(u[p]=this.bounds[1][p],d[p]=this.bounds[0][p]);f[0]=e.drawingBufferWidth,f[1]=e.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=o,n.uniforms.projection=s,n.uniforms.coordinates=[this.position,u,d],n.uniforms.colors=this.colors,n.uniforms.screenShape=f;for(var p=0;p<3;++p)n.uniforms.lineWidth=this.lineWidth[p]*this.pixelRatio,this.enabled[p]&&(r.draw(e.TRIANGLES,6,6*p),this.drawSides[p]&&r.draw(e.TRIANGLES,12,18+12*p));r.unbind()},u.update=function(t){t&&("bounds"in t&&(this.bounds=t.bounds),"position"in t&&(this.position=t.position),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"colors"in t&&(this.colors=t.colors),"enabled"in t&&(this.enabled=t.enabled),"drawSides"in t&&(this.drawSides=t.drawSides))},u.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders/index":247,"gl-buffer":141,"gl-vao":255}],249:[function(t,e,r){var n=t("gl-shader"),i="precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n worldCoordinate = vec3(uv.zw, f.x);\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n",a="precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution_2_0(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\n\n\nfloat beckmannSpecular_1_1(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution_2_0(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\n\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (kill > 0.0 ||\n any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n discard;\n }\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = beckmannSpecular_1_1(L, V, N, roughness);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n",o="precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n vec4 worldPosition = model * vec4(dataCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z = clipPosition.z + zOffset;\n\n gl_Position = clipPosition;\n value = f;\n kill = -1.0;\n worldCoordinate = dataCoordinate;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n",s="precision mediump float;\n#define GLSLIFY 1\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if(kill > 0.0 ||\n any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n discard;\n }\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n";r.createShader=function(t){var e=n(t,i,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,i,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,o,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{"gl-shader":239}],250:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}function i(t){var e=x([y({colormap:t,nshades:j,format:"rgba"}).map(function(t){return[t[0],t[1],t[2],255*t[3]]})]);return b.divseq(e,255),e}function a(t,e,r,i,a,o,s,l,u,c,h,f,d,p){this.gl=t,this.shape=e,this.bounds=r,this.intensityBounds=[],this._shader=i,this._pickShader=a,this._coordinateBuffer=o,this._vao=s,this._colorMap=l,this._contourShader=u,this._contourPickShader=c,this._contourBuffer=h,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new n([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=p,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[0/0,0/0,0/0],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[_(v.mallocFloat(1024),[0,0]),_(v.mallocFloat(1024),[0,0]),_(v.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}function o(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||F,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=N.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],M(l,t.model,l);var u=N.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)u[i][n]=t.clipBounds[i][n];u[0][r]=-1e8,u[1][r]=1e8}return N.showSurface=o,N.showContour=s,N}function s(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=B;n.model=t.model||I,n.view=t.view||I,n.projection=t.projection||I,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.contourColor=this.contourColor[0],n.inverseModel=k(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],s=0;s<3;++s)a[s]=Math.min(Math.max(this.clipBounds[i][s],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=V,n.vertexColor=this.vertexColor;var l=U;for(M(l,n.view,n.model),M(l,n.projection,l),k(l,l),i=0;i<3;++i)n.eyePosition[i]=l[12+i]/l[15];var u=l[15];for(i=0;i<3;++i)u+=this.lightPosition[i]*l[4*i+3];for(i=0;i<3;++i){var c=l[12+i];for(s=0;s<3;++s)c+=l[4*s+i]*this.lightPosition[s];n.lightPosition[i]=c/u}var h=o(n,this);if(h.showSurface&&e===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=h.projections[i],this._shader.uniforms.clipBounds=h.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(h.showContour&&!e){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var d=this._contourVAO;for(d.bind(),i=0;i<3;++i)for(f.uniforms.permutation=O[i],r.lineWidth(this.contourWidth[i]),s=0;s=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},R.pickSlots=1,R.setPickBase=function(t){this.pickId=t};var F=[0,0,0],N={showSurface:!1,showContour:!1,projections:[I.slice(),I.slice(),I.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]},B={model:I,view:I,projection:I,inverseModel:I.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},U=I.slice(),V=[1,0,0,0,1,0,0,0,1];R.draw=function(t){return s.call(this,t,!1)},R.drawTransparent=function(t){return s.call(this,t,!0)};var H={model:I,view:I,projection:I,inverseModel:I,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};R.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=H;r.model=t.model||I,r.view=t.view||I,r.projection=t.projection||I,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.permutation=V;for(var n=0;n<2;++n)for(var i=r.clipBounds[n],a=0;a<3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);var s=o(r,this);if(s.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(e.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&(this._pickShader.uniforms.model=s.projections[n],this._pickShader.uniforms.clipBounds=s.clipBounds[n],this._vao.draw(e.TRIANGLES,this._vertexCount));this._vao.unbind()}if(s.showContour){var l=this._contourPickShader;l.bind(),l.uniforms=r;var u=this._contourVAO;for(u.bind(),a=0;a<3;++a)for(e.lineWidth(this.contourWidth[a]),l.uniforms.permutation=O[a],n=0;n>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var u=r.position;u[0]=u[1]=u[2]=0;for(var c=0;c<2;++c)for(var h=c?a:1-a,f=0;f<2;++f)for(var d=f?l:1-l,p=i+c,m=s+f,g=h*d,v=0;v<3;++v)u[v]+=this._field[v].get(p,m)*g;for(var y=this._pickResult.level,b=0;b<3;++b)if(y[b]=A.le(this.contourLevels[b],u[b]),y[b]<0)this.contourLevels[b].length>0&&(y[b]=0);else if(y[b]Math.abs(_-u[b])&&(y[b]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},R.update=function(t){t=t||{},this.dirty=!0,"contourWidth"in t&&(this.contourWidth=u(t.contourWidth,Number)),"showContour"in t&&(this.showContour=u(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=u(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=h(t.contourColor)),"contourProject"in t&&(this.contourProject=u(t.contourProject,function(t){return u(t,Boolean)})),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=h(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=u(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=u(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var n=(e.shape[0]+2)*(e.shape[1]+2);n>this._field[2].data.length&&(v.freeFloat(this._field[2].data),this._field[2].data=v.mallocFloat(d.nextPow2(n))),this._field[2]=_(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),l(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(v.freeFloat(this._field[o].data),this._field[o].data=v.mallocFloat(this._field[2].size)),this._field[o]=_(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var s=t.coords;if(!Array.isArray(s)||3!==s.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=s[o];for(y=0;y<2;++y)if(c.shape[y]!==a[y])throw new Error("gl-surface: coords have incorrect shape");l(this._field[o],c)}}else if(t.ticks){var f=t.ticks;if(!Array.isArray(f)||2!==f.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=f[o];if((Array.isArray(p)||p.length)&&(p=_(p)),p.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var m=_(p.data,a);m.stride[o]=p.stride[0],m.stride[1^o]=0,l(this._field[o],m)}}else{for(o=0;o<2;++o){var g=[0,0];g[o]=1,this._field[o]=_(this._field[o].data,[a[0]+2,a[1]+2],g,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var xt=0;xt<5;++xt)tt.pop();H-=1}continue t}tt.push(it[0],it[1],st[0],st[1],it[2]),H+=1}}nt.push(H)}this._contourOffsets[et]=rt,this._contourCounts[et]=nt}var _t=v.mallocFloat(tt.length);for(o=0;oi||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function o(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}function s(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function l(t,e,r,n,i,a,o,l){var u=l.dtype,c=l.shape.slice();if(c.length<2||c.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var h=0,f=0,d=s(c,l.stride.slice());"float32"===u?h=t.FLOAT:"float64"===u?(h=t.FLOAT,d=!1,u="float32"):"uint8"===u?h=t.UNSIGNED_BYTE:(h=t.UNSIGNED_BYTE,d=!1,u="uint8");if(2===c.length)f=t.LUMINANCE,c=[c[0],c[1],1],l=p(l.data,c,[l.stride[0],l.stride[1],1],l.offset);else{if(3!==c.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===c[2])f=t.ALPHA;else if(2===c[2])f=t.LUMINANCE_ALPHA;else if(3===c[2])f=t.RGB;else{if(4!==c[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");f=t.RGBA}c[2]}if(f!==t.LUMINANCE&&f!==t.ALPHA||i!==t.LUMINANCE&&i!==t.ALPHA||(f=i),f!==i)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var v=l.size,y=o.indexOf(n)<0;if(y&&o.push(n),h===a&&d)0===l.offset&&l.data.length===v?y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,l.data):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,l.data):y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,l.data.subarray(l.offset,l.offset+v)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,l.data.subarray(l.offset,l.offset+v));else{var b;b=a===t.FLOAT?g.mallocFloat32(v):g.mallocUint8(v);var _=p(b,c,[c[2],c[2]*c[0],1]);h===t.FLOAT&&a===t.UNSIGNED_BYTE?x(_,l):m.assign(_,l),y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,b.subarray(0,v)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,b.subarray(0,v)),a===t.FLOAT?g.freeFloat32(b):g.freeUint8(b)}}function u(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function c(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var s=u(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new o(t,s,e,r,n,i)}function h(t,e,r,n,i,a){var s=u(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new o(t,s,r,n,i,a)}function f(t,e){var r=e.dtype,n=e.shape.slice(),i=t.getParameter(t.MAX_TEXTURE_SIZE);if(n[0]<0||n[0]>i||n[1]<0||n[1]>i)throw new Error("gl-texture2d: Invalid texture size");var a=s(n,e.stride.slice()),l=0;"float32"===r?l=t.FLOAT:"float64"===r?(l=t.FLOAT,a=!1,r="float32"):"uint8"===r?l=t.UNSIGNED_BYTE:(l=t.UNSIGNED_BYTE,a=!1,r="uint8");var c=0;if(2===n.length)c=t.LUMINANCE,n=[n[0],n[1],1],e=p(e.data,n,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==n.length)throw new Error("gl-texture2d: Invalid shape for texture") +;if(1===n[2])c=t.ALPHA;else if(2===n[2])c=t.LUMINANCE_ALPHA;else if(3===n[2])c=t.RGB;else{if(4!==n[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");c=t.RGBA}}l!==t.FLOAT||t.getExtension("OES_texture_float")||(l=t.UNSIGNED_BYTE,a=!1);var h,f,d=e.size;if(a)h=0===e.offset&&e.data.length===d?e.data:e.data.subarray(e.offset,e.offset+d);else{var v=[n[2],n[2]*n[0],1];f=g.malloc(d,r);var y=p(f,n,v,0);"float32"!==r&&"float64"!==r||l!==t.UNSIGNED_BYTE?m.assign(y,e):x(y,e),h=f.subarray(0,d)}var b=u(t);return t.texImage2D(t.TEXTURE_2D,0,c,n[0],n[1],0,c,l,h),a||g.free(f),new o(t,b,n[0],n[1],c,l)}function d(t){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(v||n(t),"number"==typeof arguments[1])return c(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return c(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var e=arguments[1],r=i(e)?e:e.raw;if(r)return h(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return f(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}var p=t("ndarray"),m=t("ndarray-ops"),g=t("typedarray-pool");e.exports=d;var v=null,y=null,b=null,x=function(t,e){m.muls(t,e,255)},_=o.prototype;Object.defineProperties(_,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&v.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),y.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&v.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),y.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),b.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),b.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(b.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return a(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return t|=0,a(this,t,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,a(this,this._shape[0],t),t}}}),_.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},_.dispose=function(){this.gl.deleteTexture(this.handle)},_.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},_.setPixels=function(t,e,r,n){var a=this.gl;this.bind(),Array.isArray(e)?(n=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),n=n||0;var o=i(t)?t:t.raw;if(o){this._mipLevels.indexOf(n)<0?(a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,this.type,o),this._mipLevels.push(n)):a.texSubImage2D(a.TEXTURE_2D,n,e,r,this.format,this.type,o)}else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>n||r+t.shape[0]>this._shape[0]>>>n||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");l(a,e,r,n,this.format,this.type,this._mipLevels,t)}}},{ndarray:449,"ndarray-ops":443,"typedarray-pool":521}],252:[function(t,e,r){"use strict";function n(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}e.exports=n},{}],261:[function(t,e,r){function n(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}e.exports=n},{}],262:[function(t,e,r){function n(t,e,r,n){return i[0]=n,i[1]=r,i[2]=e,i[3]=t,a[0]}e.exports=n;var i=new Uint8Array(4),a=new Float32Array(i.buffer)},{}],263:[function(t,e,r){function n(t){for(var e=Array.isArray(t)?t:i(t),r=0;r0)continue;n=t.slice(0,1).join("")}return e(n),G+=n.length,U=U.slice(n.length),U.length}}function z(){return/[^a-fA-F0-9]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),j=O,F+1)}function D(){return"."===O?(U.push(O),B=g,j=O,F+1):/[eE]/.test(O)?(U.push(O),B=g,j=O,F+1):"x"===O&&1===U.length&&"0"===U[0]?(B=w,U.push(O),j=O,F+1):/[^\d]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),j=O,F+1)}function I(){return"f"===O&&(U.push(O),j=O,F+=1),/[eE]/.test(O)?(U.push(O),j=O,F+1):"-"===O&&/[eE]/.test(j)?(U.push(O),j=O,F+1):/[^\d]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),j=O,F+1)}function P(){if(/[^\d\w_]/.test(O)){var t=U.join("");return B=J.indexOf(t)>-1?b:Z.indexOf(t)>-1?y:v,e(U.join("")),B=u,F}return U.push(O),j=O,F+1}var O,j,R,F=0,N=0,B=u,U=[],V=[],H=1,q=0,G=0,Y=!1,W=!1,X="";t=t||{};var Z=o,J=i;return"300 es"===t.version&&(Z=l,J=s),function(t){return V=[],null!==t?r(t.replace?t.replace(/\r\n/g,"\n"):t):n()}}e.exports=n;var i=t("./lib/literals"),a=t("./lib/operators"),o=t("./lib/builtins"),s=t("./lib/literals-300es"),l=t("./lib/builtins-300es"),u=999,c=9999,h=0,f=1,d=2,p=3,m=4,g=5,v=6,y=7,b=8,x=9,_=10,w=11,M=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":266,"./lib/builtins-300es":265,"./lib/literals":268,"./lib/literals-300es":267,"./lib/operators":269}],265:[function(t,e,r){var n=t("./builtins");n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":266}],266:[function(t,e,r){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],267:[function(t,e,r){var n=t("./literals");e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":268}],268:[function(t,e,r){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],269:[function(t,e,r){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],270:[function(t,e,r){function n(t,e){var r=i(e),n=[];return n=n.concat(r(t)),n=n.concat(r(null))}var i=t("./index");e.exports=n},{"./index":264}],271:[function(t,e,r){"use strict";function n(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var a=new Int32Array(this.arrayBuffer);t=a[0],e=a[1],r=a[2],this.d=e+2*r;for(var o=0;o=u[f+0]&&n>=u[f+1]?(o[h]=!0,a.push(l[h])):o[h]=!1}}},n.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),u=this._convertToCellCoord(r),c=this._convertToCellCoord(n),h=s;h<=u;h++)for(var f=l;f<=c;f++){var d=this.d*f+h;if(i.call(this,t,e,r,n,d,a,o))return}},n.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},n.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=i+this.cells.length+1+1,r=0,n=0;n>1,c=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+t[e+h],h+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+h],h+=f,c-=8);if(0===a)a=1-u;else{if(a===l)return o?0/0:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),e+=o+h>=1?f/l:f*Math.pow(2,1-h),e*l>=2&&(o++,l/=2),o+h>=c?(s=0,o=c):o+h>=1?(s=(e*l-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;t[r+d]=255&o,d+=p,o/=256,u-=8);t[r+d-p]|=128*m}},{}],273:[function(t,e,r){"use strict";function n(t,e,r){this.vertices=t,this.adjacent=e,this.boundary=r,this.lastVisited=-1}function i(t,e,r){this.vertices=t,this.cell=e,this.index=r}function a(t,e){return c(t.vertices,e.vertices)}function o(t){for(var e=["function orient(){var tuple=this.tuple;return test("],r=0;r<=t;++r)r>0&&e.push(","),e.push("tuple[",r,"]");e.push(")}return orient");var n=new Function("test",e.join("")),i=u[t+1];return i||(i=u),n(i)}function s(t,e,r){this.dimension=t,this.vertices=e,this.simplices=r,this.interior=r.filter(function(t){return!t.boundary}),this.tuple=new Array(t+1);for(var n=0;n<=t;++n)this.tuple[n]=this.vertices[n];var i=h[t];i||(i=h[t]=o(t)),this.orient=i}function l(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var a=t.slice(0,i+1),o=u.apply(void 0,a);if(0===o)throw new Error("Input not in general position");for(var l=new Array(i+1),c=0;c<=i;++c)l[c]=c;o<0&&(l[0]=1,l[1]=0);for(var h=new n(l,new Array(i+1),!1),f=h.adjacent,d=new Array(i+2),c=0;c<=i;++c){for(var p=l.slice(),m=0;m<=i;++m)m===c&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var v=new n(p,new Array(i+1),!0);f[c]=v,d[c]=v}d[i+1]=h;for(var c=0;c<=i;++c)for(var p=f[c].vertices,y=f[c].adjacent,m=0;m<=i;++m){var b=p[m];if(b<0)y[m]=h;else for(var x=0;x<=i;++x)f[x].vertices.indexOf(b)<0&&(y[m]=f[x])}for(var _=new s(i,a,d),w=!!e,c=i+1;c0;){t=o.pop();for(var s=(t.vertices,t.adjacent),l=0;l<=r;++l){var u=s[l];if(u.boundary&&!(u.lastVisited<=-n)){for(var c=u.vertices,h=0;h<=r;++h){var f=c[h];i[h]=f<0?e:a[f]}var d=this.orient();if(d>0)return u;u.lastVisited=-n,0===d&&o.push(u)}}}return null},f.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,u=s.adjacent,c=0;c<=n;++c)a[c]=i[l[c]];s.lastVisited=r;for(var c=0;c<=n;++c){var h=u[c];if(!(h.lastVisited>=r)){var f=a[c];a[c]=t;var d=this.orient();if(a[c]=f,d<0){s=h;continue t}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},f.addPeaks=function(t,e){var r=this.vertices.length-1,o=this.dimension,s=this.vertices,l=this.tuple,u=this.interior,c=this.simplices,h=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,u.push(e);for(var f=[];h.length>0;){var e=h.pop(),d=e.vertices,p=e.adjacent,m=d.indexOf(r);if(!(m<0))for(var g=0;g<=o;++g)if(g!==m){var v=p[g];if(v.boundary&&!(v.lastVisited>=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var b=0,x=0;x<=o;++x)y[x]<0?(b=x,l[x]=t):l[x]=s[y[x]];var _=this.orient();if(_>0){y[b]=r,v.boundary=!1,u.push(v),h.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var w=v.adjacent,M=d.slice(),k=p.slice(),A=new n(M,k,!0);c.push(A);var T=w.indexOf(e);if(!(T<0)){w[T]=A,k[m]=v,M[g]=-1,k[g]=e,p[g]=A,A.flip();for(var x=0;x<=o;++x){var S=M[x];if(!(S<0||S===r)){for(var E=new Array(o-1),L=0,C=0;C<=o;++C){var z=M[C];z<0||C===x||(E[L++]=z)}f.push(new i(E,A,x))}}}}}}f.sort(a);for(var g=0;g+1=0?o[l++]=s[c]:u=1&c;if(u===(1&t)){var h=o[0];o[0]=o[1],o[1]=h}e.push(o)}}return e}},{"robust-orientation":489,"simplicial-complex":500}],274:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}function i(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function a(t,e){var r=p(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function o(t,e){var r=t.intervals([]);r.push(e),a(t,r)}function s(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?y:(r.splice(n,1),a(t,r),b)}function l(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function c(t,e){for(var r=0;r>1],a=[],o=[],s=[],r=0;r3*(e+1)?o(this,t):this.left.insert(t):this.left=p([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?o(this,t):this.right.insert(t):this.right=p([t]);else{var r=v.ge(this.leftPoints,t,f),n=v.ge(this.rightPoints,t,d);this.leftPoints.splice(r,0,t),this.rightPoints.splice(n,0,t)}},x.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1))return s(this,t);var r=this.left.remove(t);return 2===r?(this.left=null,this.count-=1,b):(r===b&&(this.count-=1),r)}if(t[0]>this.mid){if(!this.right)return y;if(4*(this.left?this.left.count:0)>3*(e-1))return s(this,t);var r=this.right.remove(t);return 2===r?(this.right=null,this.count-=1,b):(r===b&&(this.count-=1),r)}if(1===this.count)return this.leftPoints[0]===t?2:y;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var o=this.left,r=this.right;n.count-=a.count,n.right=a.left,a.left=o,a.right=r}i(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?i(this,this.left):i(this,this.right);return b}for(var o=v.ge(this.leftPoints,t,f);othis.mid){if(this.right){var r=this.right.queryPoint(t,e);if(r)return r}return u(this.rightPoints,t,e)}return c(this.leftPoints,e)},x.queryInterval=function(t,e,r){if(tthis.mid&&this.right){var n=this.right.queryInterval(t,e,r);if(n)return n}return ethis.mid?u(this.rightPoints,t,r):c(this.leftPoints,r)};var _=m.prototype;_.insert=function(t){this.root?this.root.insert(t):this.root=new n(t[0],null,null,[t],[t])},_.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==y}return!1},_.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},_.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(_,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(_,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":59}],275:[function(t,e,r){"use strict";function n(t,e){e=e||new Array(t.length);for(var r=0;r=r&&s<=i&&l>=n&&l<=a&&c.push(t[p]);else{var m=Math.floor((d+f)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[m]);var g=(h+1)%2;(0===h?r<=s:n<=l)&&(u.push(d),u.push(m-1),u.push(g)),(0===h?i>=s:a>=l)&&(u.push(m+1),u.push(f),u.push(g))}}return c}e.exports=n},{}],282:[function(t,e,r){"use strict";function n(t,e,r,a,o,s){if(!(o-a<=r)){var l=Math.floor((a+o)/2);i(t,e,l,a,o,s%2),n(t,e,r,a,l-1,s+1),n(t,e,r,l+1,o,s+1)}}function i(t,e,r,n,o,s){for(;o>n;){if(o-n>600){var l=o-n+1,u=r-n+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1);i(t,e,r,Math.max(n,Math.floor(r-u*h/l+f)),Math.min(o,Math.floor(r+(l-u)*h/l+f)),s)}var d=e[2*r+s],p=n,m=o;for(a(t,e,n,r),e[2*o+s]>d&&a(t,e,n,o);pd;)m--}e[2*n+s]===d?a(t,e,n,m):(m++,a(t,e,m,o)),m<=r&&(n=m+1),r<=m&&(o=m-1)}}function a(t,e,r,n){o(t,r,n),o(e,2*r,2*n),o(e,2*r+1,2*n+1)}function o(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}e.exports=n},{}],283:[function(t,e,r){"use strict";function n(t,e,r,n,a,o){for(var s=[0,t.length-1,0],l=[],u=a*a;s.length;){var c=s.pop(),h=s.pop(),f=s.pop();if(h-f<=o)for(var d=f;d<=h;d++)i(e[2*d],e[2*d+1],r,n)<=u&&l.push(t[d]);else{var p=Math.floor((f+h)/2),m=e[2*p],g=e[2*p+1];i(m,g,r,n)<=u&&l.push(t[p]);var v=(c+1)%2;(0===c?r-a<=m:n-a<=g)&&(s.push(f),s.push(p-1),s.push(v)),(0===c?r+a>=m:n+a>=g)&&(s.push(p+1),s.push(h),s.push(v))}}return l}function i(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}e.exports=n},{}],284:[function(t,e,r){"use strict";function n(t,e){var r;if(h(t)){var l,u=t.stops&&"object"==typeof t.stops[0][0],c=u||void 0!==t.property,f=u||!c,d=t.type||e||"exponential";if("exponential"===d)l=o;else if("interval"===d)l=a;else if("categorical"===d)l=i;else{if("identity"!==d)throw new Error('Unknown function type "'+d+'"');l=s}if(u){for(var p={},m=[],g=0;g=t.stops.length)break;if(e<=t.stops[n][0])break;n++}return 0===n?t.stops[n][1]:n===t.stops.length?t.stops[n-1][1]:l(e,r,t.stops[n-1][0],t.stops[n][0],t.stops[n-1][1],t.stops[n][1])}function s(t,e){return e}function l(t,e,r,n,i,a){return"function"==typeof i?function(){var o=i.apply(void 0,arguments),s=a.apply(void 0,arguments);return l(t,e,r,n,o,s)}:i.length?c(t,e,r,n,i,a):u(t,e,r,n,i,a)}function u(t,e,r,n,i,a){var o,s=n-r,l=t-r;return o=1===e?l/s:(Math.pow(e,l)-1)/(Math.pow(e,s)-1),i*(1-o)+a*o}function c(t,e,r,n,i,a){for(var o=[],s=0;s -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},linepattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_blur;\n\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_fade;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\nvoid main() {\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_linewidth.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_linewidth.t) or when fading out\n // (v_linewidth.s)\n float blur = u_blur * v_gamma_scale;\n float alpha = clamp(min(dist - (v_linewidth.t - blur), v_linewidth.s - dist) / blur, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n float y_a = 0.5 + (v_normal.y * v_linewidth.s / u_pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * v_linewidth.s / u_pattern_size_b.y);\n vec2 pos_a = mix(u_pattern_tl_a, u_pattern_br_a, vec2(x_a, y_a));\n vec2 pos_b = mix(u_pattern_tl_b, u_pattern_br_b, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n alpha *= u_opacity;\n\n gl_FragColor = color * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_linewidth;\nuniform mediump float u_gapwidth;\nuniform mediump float u_antialiasing;\nuniform mediump float u_extra;\nuniform mat2 u_antialiasingmatrix;\nuniform mediump float u_offset;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n v_linesofar = a_linesofar;\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},linesdfpattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform lowp vec4 u_color;\nuniform lowp float u_opacity;\n\nuniform float u_blur;\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\nvoid main() {\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_linewidth.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_linewidth.t) or when fading out\n // (v_linewidth.s)\n float blur = u_blur * v_gamma_scale;\n float alpha = clamp(min(dist - (v_linewidth.t - blur), v_linewidth.s - dist) / blur, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma, 0.5 + u_sdfgamma, sdfdist);\n\n gl_FragColor = u_color * (alpha * u_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_linewidth;\nuniform mediump float u_gapwidth;\nuniform mediump float u_antialiasing;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform float u_extra;\nuniform mat2 u_antialiasingmatrix;\nuniform mediump float u_offset;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},outline:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n#pragma mapbox: define lowp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = smoothstep(1.0, 0.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},outlinepattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\nvoid main() {\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = smoothstep(1.0, 0.0, dist);\n \n\n gl_FragColor = mix(color1, color2, u_mix) * alpha * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n vec2 scaled_size_a = u_scale_a * u_pattern_size_a;\n vec2 scaled_size_b = u_scale_b * u_pattern_size_b;\n\n // the correct offset needs to be calculated.\n //\n // The offset depends on how many pixels are between the world origin and\n // the edge of the tile:\n // vec2 offset = mod(pixel_coord, size)\n //\n // At high zoom levels there are a ton of pixels between the world origin\n // and the edge of the tile. The glsl spec only guarantees 16 bits of\n // precision for highp floats. We need more than that.\n //\n // The pixel_coord is passed in as two 16 bit values:\n // pixel_coord_upper = floor(pixel_coord / 2^16)\n // pixel_coord_lower = mod(pixel_coord, 2^16)\n //\n // The offset is calculated in a series of steps that should preserve this precision:\n vec2 offset_a = mod(mod(mod(u_pixel_coord_upper, scaled_size_a) * 256.0, scaled_size_a) * 256.0 + u_pixel_coord_lower, scaled_size_a);\n vec2 offset_b = mod(mod(mod(u_pixel_coord_upper, scaled_size_b) * 256.0, scaled_size_b) * 256.0 + u_pixel_coord_lower, scaled_size_b);\n\n v_pos_a = (u_tile_units_to_pixels * a_pos + offset_a) / scaled_size_a;\n v_pos_b = (u_tile_units_to_pixels * a_pos + offset_b) / scaled_size_b;\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},pattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n vec2 scaled_size_a = u_scale_a * u_pattern_size_a;\n vec2 scaled_size_b = u_scale_b * u_pattern_size_b;\n\n // the correct offset needs to be calculated.\n //\n // The offset depends on how many pixels are between the world origin and\n // the edge of the tile:\n // vec2 offset = mod(pixel_coord, size)\n //\n // At high zoom levels there are a ton of pixels between the world origin\n // and the edge of the tile. The glsl spec only guarantees 16 bits of\n // precision for highp floats. We need more than that.\n //\n // The pixel_coord is passed in as two 16 bit values:\n // pixel_coord_upper = floor(pixel_coord / 2^16)\n // pixel_coord_lower = mod(pixel_coord, 2^16)\n //\n // The offset is calculated in a series of steps that should preserve this precision:\n vec2 offset_a = mod(mod(mod(u_pixel_coord_upper, scaled_size_a) * 256.0, scaled_size_a) * 256.0 + u_pixel_coord_lower, scaled_size_a);\n vec2 offset_b = mod(mod(mod(u_pixel_coord_upper, scaled_size_b) * 256.0, scaled_size_b) * 256.0 + u_pixel_coord_lower, scaled_size_b);\n\n v_pos_a = (u_tile_units_to_pixels * a_pos + offset_a) / scaled_size_a;\n v_pos_b = (u_tile_units_to_pixels * a_pos + offset_b) / scaled_size_b;\n}\n"},raster:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity0;\nuniform float u_opacity1;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n vec4 color = color0 * u_opacity0 + color1 * u_opacity1;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb), color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n", +vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos0 = (((a_texture_pos / 32767.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},icon:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform lowp float u_opacity;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * u_opacity;\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_texture_pos;\nattribute vec4 a_data;\n\n\n// matrix is for the vertex position.\nuniform mat4 u_matrix;\n\nuniform mediump float u_zoom;\nuniform bool u_rotate_with_map;\nuniform vec2 u_extrude_scale;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n vec2 a_tex = a_texture_pos.xy;\n mediump float a_labelminzoom = a_data[0];\n mediump vec2 a_zoom = a_data.pq;\n mediump float a_minzoom = a_zoom[0];\n mediump float a_maxzoom = a_zoom[1];\n\n // u_zoom is the current zoom level adjusted for the change in font size\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\n\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\n if (u_rotate_with_map) {\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\n gl_Position.z += z * gl_Position.w;\n } else {\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n }\n\n v_tex = a_tex / u_texsize;\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\n}\n"},sdf:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform lowp vec4 u_color;\nuniform lowp float u_opacity;\nuniform lowp float u_buffer;\nuniform lowp float u_gamma;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\nvarying float v_gamma_scale;\n\nvoid main() {\n lowp float dist = texture2D(u_texture, v_tex).a;\n lowp float fade_alpha = texture2D(u_fadetexture, v_fade_tex).a;\n lowp float gamma = u_gamma * v_gamma_scale;\n lowp float alpha = smoothstep(u_buffer - gamma, u_buffer + gamma, dist) * fade_alpha;\n\n gl_FragColor = u_color * (alpha * u_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nconst float PI = 3.141592653589793;\n\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_texture_pos;\nattribute vec4 a_data;\n\n\n// matrix is for the vertex position.\nuniform mat4 u_matrix;\n\nuniform mediump float u_zoom;\nuniform bool u_rotate_with_map;\nuniform bool u_pitch_with_map;\nuniform mediump float u_pitch;\nuniform mediump float u_bearing;\nuniform mediump float u_aspect_ratio;\nuniform vec2 u_extrude_scale;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_tex = a_texture_pos.xy;\n mediump float a_labelminzoom = a_data[0];\n mediump vec2 a_zoom = a_data.pq;\n mediump float a_minzoom = a_zoom[0];\n mediump float a_maxzoom = a_zoom[1];\n\n // u_zoom is the current zoom level adjusted for the change in font size\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\n\n // pitch-alignment: map\n // rotation-alignment: map | viewport\n if (u_pitch_with_map) {\n lowp float angle = u_rotate_with_map ? (a_data[1] / 256.0 * 2.0 * PI) : u_bearing;\n lowp float asin = sin(angle);\n lowp float acos = cos(angle);\n mat2 RotationMatrix = mat2(acos, asin, -1.0 * asin, acos);\n vec2 offset = RotationMatrix * a_offset;\n vec2 extrude = u_extrude_scale * (offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\n gl_Position.z += z * gl_Position.w;\n // pitch-alignment: viewport\n // rotation-alignment: map\n } else if (u_rotate_with_map) {\n // foreshortening factor to apply on pitched maps\n // as a label goes from horizontal <=> vertical in angle\n // it goes from 0% foreshortening to up to around 70% foreshortening\n lowp float pitchfactor = 1.0 - cos(u_pitch * sin(u_pitch * 0.75));\n\n lowp float lineangle = a_data[1] / 256.0 * 2.0 * PI;\n\n // use the lineangle to position points a,b along the line\n // project the points and calculate the label angle in projected space\n // this calculation allows labels to be rendered unskewed on pitched maps\n vec4 a = u_matrix * vec4(a_pos, 0, 1);\n vec4 b = u_matrix * vec4(a_pos + vec2(cos(lineangle),sin(lineangle)), 0, 1);\n lowp float angle = atan((b[1]/b[3] - a[1]/a[3])/u_aspect_ratio, b[0]/b[3] - a[0]/a[3]);\n lowp float asin = sin(angle);\n lowp float acos = cos(angle);\n mat2 RotationMatrix = mat2(acos, -1.0 * asin, asin, acos);\n\n vec2 offset = RotationMatrix * (vec2((1.0-pitchfactor)+(pitchfactor*cos(angle*2.0)), 1.0) * a_offset);\n vec2 extrude = u_extrude_scale * (offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n gl_Position.z += z * gl_Position.w;\n // pitch-alignment: viewport\n // rotation-alignment: viewport\n } else {\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n }\n\n v_gamma_scale = (gl_Position.w - 0.5);\n\n v_tex = a_tex / u_texsize;\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\n}\n"},collisionbox:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_zoom;\nuniform float u_maxzoom;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\n\nvoid main() {\n\n float alpha = 0.5;\n\n gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0) * alpha;\n\n if (v_placement_zoom > u_zoom) {\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n }\n\n if (u_zoom >= v_max_zoom) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0) * alpha * 0.25;\n }\n\n if (v_placement_zoom >= u_maxzoom) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0) * alpha * 0.2;\n }\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_data;\n\nuniform mat4 u_matrix;\nuniform float u_scale;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos + a_extrude / u_scale, 0.0, 1.0);\n\n v_max_zoom = a_data.x;\n v_placement_zoom = a_data.y;\n}\n"}},e.exports.util="float evaluate_zoom_function_1(const vec4 values, const float t) {\n if (t < 1.0) {\n return mix(values[0], values[1], t);\n } else if (t < 2.0) {\n return mix(values[1], values[2], t - 1.0);\n } else {\n return mix(values[2], values[3], t - 2.0);\n }\n}\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\n if (t < 1.0) {\n return mix(value0, value1, t);\n } else if (t < 2.0) {\n return mix(value1, value2, t - 1.0);\n } else {\n return mix(value2, value3, t - 2.0);\n }\n}\n"},{path:457}],286:[function(t,e,r){"use strict";function n(t,e){this.message=(t?t+": ":"")+i.apply(i,Array.prototype.slice.call(arguments,2)),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)}var i=t("util").format;e.exports=n},{util:529}],287:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1;e7)return[new n(c,l,"constants have been deprecated as of v8")];if(!(l in f.constants))return[new n(c,l,'constant "%s" not found',l)];e=a({},e,{value:f.constants[l]})}return u.function&&"object"===i(l)?r(e):u.type&&s[u.type]?s[u.type](e):o(a({},e,{valueSpec:u.type?h[u.type]:u}))}},{"../error/validation_error":286,"../util/extend":287,"../util/get_type":288,"./validate_array":291,"./validate_boolean":292,"./validate_color":293,"./validate_constants":294,"./validate_enum":295,"./validate_filter":296,"./validate_function":297,"./validate_layer":299,"./validate_number":301,"./validate_object":302,"./validate_source":304,"./validate_string":305}],291:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("./validate"),a=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.valueSpec,o=t.style,s=t.styleSpec,l=t.key,u=t.arrayElementValidator||i;if("array"!==n(e))return[new a(l,e,"array expected, %s found",n(e))];if(r.length&&e.length!==r.length)return[new a(l,e,"array length %d expected, length %d found",r.length,e.length)];if(r["min-length"]&&e.length7)return r?[new n(e,r,"constants have been deprecated as of v8")]:[];var a=i(r);if("object"!==a)return[new n(e,r,"object expected, %s found",a)];var o=[];for(var s in r)"@"!==s[0]&&o.push(new n(e+"."+s,r[s],'constants must start with "@"'));return o}},{"../error/validation_error":286,"../util/get_type":288}],295:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint");e.exports=function(t){var e=t.key,r=t.value,a=t.valueSpec,o=[];return a.values.indexOf(i(r))===-1&&o.push(new n(e,r,"expected one of [%s], %s found",a.values.join(", "),r)),o}},{"../error/validation_error":286,"../util/unbundle_jsonlint":289}],296:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_enum"),a=t("../util/get_type"),o=t("../util/unbundle_jsonlint");e.exports=function t(e){var r,s=e.value,l=e.key,u=e.styleSpec,c=[];if("array"!==a(s))return[new n(l,s,"array expected, %s found",a(s))];if(s.length<1)return[new n(l,s,"filter array must have at least 1 element")];switch(c=c.concat(i({key:l+"[0]",value:s[0],valueSpec:u.filter_operator,style:e.style,styleSpec:e.styleSpec})),o(s[0])){case"<":case"<=":case">":case">=":s.length>=2&&"$type"==s[1]&&c.push(new n(l,s,'"$type" cannot be use with operator "%s"',s[0]));case"==":case"!=":3!=s.length&&c.push(new n(l,s,'filter array for operator "%s" must have 3 elements',s[0]));case"in":case"!in":s.length>=2&&(r=a(s[1]),"string"!==r?c.push(new n(l+"[1]",s[1],"string expected, %s found",r)):"@"===s[1][0]&&c.push(new n(l+"[1]",s[1],"filter key cannot be a constant")));for(var h=2;h=8&&(f&&!t.valueSpec["property-function"]?p.push(new n(t.key,t.value,"property functions not supported")):d&&!t.valueSpec["zoom-function"]&&p.push(new n(t.key,t.value,"zoom functions not supported"))),p}},{"../error/validation_error":286,"../util/get_type":288,"./validate":290,"./validate_array":291,"./validate_number":301,"./validate_object":302}],298:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_string");e.exports=function(t){var e=t.value,r=t.key,a=i(t);return a.length?a:(e.indexOf("{fontstack}")===-1&&a.push(new n(r,e,'"glyphs" url must include a "{fontstack}" token')),e.indexOf("{range}")===-1&&a.push(new n(r,e,'"glyphs" url must include a "{range}" token')),a)}},{"../error/validation_error":286,"./validate_string":305}],299:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),a=t("./validate_object"),o=t("./validate_filter"),s=t("./validate_paint_property"),l=t("./validate_layout_property"),u=t("../util/extend");e.exports=function(t){var e=[],r=t.value,c=t.key,h=t.style,f=t.styleSpec;r.type||r.ref||e.push(new n(c,r,'either "type" or "ref" is required'));var d=i(r.type),p=i(r.ref);if(r.id)for(var m=0;ma.maximum?[new i(e,r,"%s is greater than the maximum value %s",r,a.maximum)]:[]}},{"../error/validation_error":286,"../util/get_type":288}],302:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/get_type"),a=t("./validate");e.exports=function(t){var e=t.key,r=t.value,o=t.valueSpec,s=t.objectElementValidators||{},l=t.style,u=t.styleSpec,c=[],h=i(r);if("object"!==h)return[new n(e,r,"object expected, %s found",h)];for(var f in r){var d=f.split(".")[0],p=o&&(o[d]||o["*"]),m=s[d]||s["*"];p||m?c=c.concat((m||a)({key:(e?e+".":e)+f,value:r[f],valueSpec:p,style:l,styleSpec:u,object:r,objectKey:f})):""!==e&&1!==e.split(".").length&&c.push(new n(e,r[f],'unknown property "%s"',f))}for(d in o)o[d].required&&void 0===o[d].default&&void 0===r[d]&&c.push(new n(e,r,'missing required property "%s"',d));return c}},{"../error/validation_error":286,"../util/get_type":288,"./validate":290}],303:[function(t,e,r){"use strict";var n=t("./validate"),i=t("../error/validation_error");e.exports=function(t){var e=t.key,r=t.style,a=t.styleSpec,o=t.value,s=t.objectKey,l=a["paint_"+t.layerType],u=s.match(/^(.*)-transition$/);return u&&l[u[1]]&&l[u[1]].transition?n({key:e,value:o,valueSpec:a.transition,style:r,styleSpec:a}):t.valueSpec||l[s]?n({key:t.key,value:o,valueSpec:t.valueSpec||l[s],style:r,styleSpec:a}):[new i(e,o,'unknown property "%s"',s)]}},{"../error/validation_error":286,"./validate":290}],304:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),a=t("./validate_object"),o=t("./validate_enum");e.exports=function(t){var e=t.value,r=t.key,s=t.styleSpec,l=t.style;if(!e.type)return[new n(r,e,'"type" is required')];switch(i(e.type)){case"vector":case"raster":var u=[];if(u=u.concat(a({key:r,value:e,valueSpec:s.source_tile,style:t.style,styleSpec:s})),"url"in e)for(var c in e)["type","url","tileSize"].indexOf(c)<0&&u.push(new n(r+"."+c,e[c],'a source with a "url" property may not include a "%s" property',c));return u;case"geojson":return a({key:r,value:e,valueSpec:s.source_geojson,style:l,styleSpec:s});case"video":return a({key:r,value:e,valueSpec:s.source_video,style:l,styleSpec:s});case"image":return a({key:r,value:e,valueSpec:s.source_image,style:l,styleSpec:s});default:return o({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","geojson","video","image"]},style:l,styleSpec:s})}}},{"../error/validation_error":286,"../util/unbundle_jsonlint":289,"./validate_enum":295,"./validate_object":302}],305:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.key,a=n(e);return"string"!==a?[new i(r,e,"string expected, %s found",a)]:[]}},{"../error/validation_error":286,"../util/get_type":288}],306:[function(t,e,r){"use strict";function n(t,e){e=e||l;var r=[];return r=r.concat(s({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:u}})),e.$version>7&&t.constants&&(r=r.concat(o({key:"constants",value:t.constants,style:t,styleSpec:e}))),i(r)}function i(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function a(t){return function(){return i(t.apply(this,arguments))}}var o=t("./validate/validate_constants"),s=t("./validate/validate"),l=t("../reference/latest.min"),u=t("./validate/validate_glyphs_url");n.source=a(t("./validate/validate_source")),n.layer=a(t("./validate/validate_layer")),n.filter=a(t("./validate/validate_filter")),n.paintProperty=a(t("./validate/validate_paint_property")),n.layoutProperty=a(t("./validate/validate_layout_property")),e.exports=n},{"../reference/latest.min":307,"./validate/validate":290,"./validate/validate_constants":294,"./validate/validate_filter":296,"./validate/validate_glyphs_url":298,"./validate/validate_layer":299,"./validate/validate_layout_property":300,"./validate/validate_paint_property":303,"./validate/validate_source":304}],307:[function(t,e,r){e.exports=t("./v8.min.json")},{"./v8.min.json":308}],308:[function(t,e,r){e.exports={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_tile","source_geojson","source_video","source_image"],source_tile:{type:{required:!0,type:"enum",values:["vector","raster"]},url:{type:"string"},tiles:{type:"array",value:"string"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:["geojson"]},data:{type:"*"},maxzoom:{type:"number",default:14},buffer:{type:"number",default:64},tolerance:{type:"number",default:3},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:400},clusterMaxZoom:{type:"number"}},source_video:{type:{required:!0,type:"enum",values:["video"]},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:["image"]},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:["fill","line","symbol","circle","raster","background"]},metadata:{type:"*"},ref:{type:"string"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:22},maxzoom:{type:"number",minimum:0,maximum:22},interactive:{type:"boolean",default:!1},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"},"paint.*":{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],layout_background:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_fill:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_circle:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["butt","round","square"],default:"butt"},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["bevel","round","miter"],default:"miter"},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,"property-function":!0,requires:[{"line-join":"miter"}]},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,"property-function":!0,requires:[{"line-join":"round"}]},visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["point","line"],default:"point"},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,"property-function":!0,units:"pixels",requires:[{"symbol-placement":"line"}]},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image"]},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image"]},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image","text-field"]},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"viewport",requires:["icon-image"]},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!1,values:["none","both","width","height"],default:"none",requires:["icon-image","text-field"]},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image","icon-text-fit","text-field"]},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,tokens:!0},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",requires:["icon-image"]},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"pixels",requires:["icon-image"]},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],requires:["text-field"]},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"viewport",requires:["text-field"]},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"]},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-max-width":{type:"number",default:10,minimum:0,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-line-height":{type:"number",default:1.2,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-letter-spacing":{type:"number",default:0,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["left","center","right"],default:"center",requires:["text-field"]},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:"center",requires:["text-field"]},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field",{"symbol-placement":"line"}]},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]}, +"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["none","uppercase","lowercase"],default:"none",requires:["text-field"]},"text-offset":{type:"array",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"]},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field"]},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field"]},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field","icon-image"]},visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_raster:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:["==","!=",">",">=","<","<=","in","!in","all","any","none","has","!has"]},geometry_type:{type:"enum",values:["Point","LineString","Polygon"]},color_operation:{type:"enum",values:["lighten","saturate","spin","fade","mix"]},function:{stops:{type:"array",required:!0,value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:["exponential","interval","categorical"],default:"exponential"}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},paint:["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!0},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"fill-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}]},"fill-outline-color":{type:"color",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}]},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["fill-translate"]},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,transition:!0}},paint_line:{"line-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"line-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}]},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["line-translate"]},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-gap-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-offset":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,"property-function":!0,minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}]},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,transition:!0}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-blur":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["circle-translate"]},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["icon-image","icon-translate"]},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["text-field","text-translate"]}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees"},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,default:0,minimum:0,maximum:1,transition:!0},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,default:1,minimum:0,maximum:1,transition:!0},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!0,units:"milliseconds"}},paint_background:{"background-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}]},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}}}},{}],309:[function(t,e,r){"use strict";function n(t){return!!(i()&&a()&&o()&&s()&&l()&&u()&&c()&&h(t&&t.failIfMajorPerformanceCaveat))}function i(){return"undefined"!=typeof window&&"undefined"!=typeof document}function a(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function o(){return Function.prototype&&Function.prototype.bind}function s(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function l(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function u(){return"Worker"in window}function c(){return"Uint8ClampedArray"in window}function h(t){return void 0===d[t]&&(d[t]=f(t)),d[t]}function f(t){var e=document.createElement("canvas"),r=Object.create(n.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,e.probablySupportsContext?e.probablySupportsContext("webgl",r)||e.probablySupportsContext("experimental-webgl",r):e.supportsContext?e.supportsContext("webgl",r)||e.supportsContext("experimental-webgl",r):e.getContext("webgl",r)||e.getContext("experimental-webgl",r)}void 0!==e&&e.exports?e.exports=n:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=n);var d={};n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},{}],310:[function(t,e,r){"use strict";function n(t){var e=t.layoutVertexArrayType;this.layoutVertexArray=new e;var r=t.elementArrayType;r&&(this.elementArray=new r);var n=t.elementArrayType2;n&&(this.elementArray2=new n),this.paintVertexArrays=i.mapObject(t.paintVertexArrayTypes,function(t){return new t})}var i=t("../util/util");e.exports=n,n.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,n.prototype.hasCapacityFor=function(t){return this.layoutVertexArray.length+t<=n.MAX_VERTEX_ARRAY_LENGTH},n.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},n.prototype.trim=function(){this.layoutVertexArray.trim(),this.elementArray&&this.elementArray.trim(),this.elementArray2&&this.elementArray2.trim();for(var t in this.paintVertexArrays)this.paintVertexArrays[t].trim()},n.prototype.serialize=function(){return{layoutVertexArray:this.layoutVertexArray.serialize(),elementArray:this.elementArray&&this.elementArray.serialize(),elementArray2:this.elementArray2&&this.elementArray2.serialize(),paintVertexArrays:i.mapObject(this.paintVertexArrays,function(t){return t.serialize()})}},n.prototype.getTransferables=function(t){t.push(this.layoutVertexArray.arrayBuffer),this.elementArray&&t.push(this.elementArray.arrayBuffer),this.elementArray2&&t.push(this.elementArray2.arrayBuffer);for(var e in this.paintVertexArrays)t.push(this.paintVertexArrays[e].arrayBuffer)}},{"../util/util":424}],311:[function(t,e,r){"use strict";function n(t){if(this.zoom=t.zoom,this.overscaling=t.overscaling,this.layer=t.layer,this.childLayers=t.childLayers,this.type=this.layer.type,this.features=[],this.id=this.layer.id,this.index=t.index,this.sourceLayer=this.layer.sourceLayer,this.sourceLayerIndex=t.sourceLayerIndex,this.minZoom=this.layer.minzoom,this.maxZoom=this.layer.maxzoom,this.paintAttributes=i(this),t.arrays){var e=this.programInterfaces;this.bufferGroups=c.mapObject(t.arrays,function(r,n){var i=e[n],a=t.paintVertexArrayTypes[n];return r.map(function(t){return new u(t,{layoutVertexArrayType:i.layoutVertexArrayType.serialize(),elementArrayType:i.elementArrayType&&i.elementArrayType.serialize(),elementArrayType2:i.elementArrayType2&&i.elementArrayType2.serialize(),paintVertexArrayTypes:a})})})}}function i(t){var e={};for(var r in t.programInterfaces){for(var n=e[r]={},i=0;i1?p.name+_:p.name;x[w]=m[_]*g}}},n.VertexArrayType=function(t){return new h({members:t,alignment:4})},n.ElementArrayType=function(t){return new h({members:[{type:"Uint16",name:"vertices",components:t||3}]})}},{"../util/struct_array":422,"../util/util":424,"./array_group":310,"./bucket/circle_bucket":312,"./bucket/fill_bucket":313,"./bucket/line_bucket":314,"./bucket/symbol_bucket":315,"./buffer_group":317,assert:40,"feature-filter":117}],312:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var i=t("../bucket"),a=t("../../util/util"),o=t("../load_geometry"),s=i.EXTENT;e.exports=n,n.prototype=a.inherit(i,{}),n.prototype.addCircleVertex=function(t,e,r,n,i){return t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)},n.prototype.programInterfaces={circle:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"}]),elementArrayType:new i.ElementArrayType,paintAttributes:[{name:"a_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("circle-color",e,r)},multiplier:255,paintProperty:"circle-color"},{name:"a_radius",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-radius",e,r)]},multiplier:10,paintProperty:"circle-radius"},{name:"a_blur",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-blur",e,r)]},multiplier:10,paintProperty:"circle-blur"},{name:"a_opacity",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-opacity",e,r)]},multiplier:255,paintProperty:"circle-opacity"}]}},n.prototype.addFeature=function(t){for(var e={zoom:this.zoom},r=o(t),n=this.prepareArrayGroup("circle",0),i=n.layoutVertexArray.length,a=0;a=s||c<0||c>=s)){var h=this.prepareArrayGroup("circle",4),f=h.layoutVertexArray,d=this.addCircleVertex(f,u,c,-1,-1);this.addCircleVertex(f,u,c,1,-1),this.addCircleVertex(f,u,c,1,1),this.addCircleVertex(f,u,c,-1,1),h.elementArray.emplaceBack(d,d+1,d+2),h.elementArray.emplaceBack(d,d+3,d+2)}}this.populatePaintArrays("circle",e,t.properties,n,i)}},{"../../util/util":424,"../bucket":311,"../load_geometry":319}],313:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var i=t("../bucket"),a=t("../../util/util"),o=t("../load_geometry"),s=t("earcut"),l=t("../../util/classify_rings");e.exports=n,n.prototype=a.inherit(i,{}),n.prototype.programInterfaces={fill:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"}]),elementArrayType:new i.ElementArrayType(1),elementArrayType2:new i.ElementArrayType(2),paintAttributes:[{name:"a_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("fill-color",e,r)},multiplier:255,paintProperty:"fill-color"},{name:"a_outline_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("fill-outline-color",e,r)},multiplier:255,paintProperty:"fill-outline-color"},{name:"a_opacity",components:1,type:"Uint8",getValue:function(t,e,r){return[t.getPaintValue("fill-opacity",e,r)]},multiplier:255,paintProperty:"fill-opacity"}]}},n.prototype.addFeature=function(t){for(var e=o(t),r=l(e,500),n=this.prepareArrayGroup("fill",0),i=n.layoutVertexArray.length,a=0;a0&&a.push(i.length/2);for(var c=0;c=1&&n.elementArray2.emplaceBack(f-1,f),i.push(h.x),i.push(h.y)}}for(var d=s(i,a),p=0;p>6)},n.prototype.programInterfaces={line:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}]),elementArrayType:new i.ElementArrayType}},n.prototype.addFeature=function(t){for(var e=o(t,15),r=0;r2&&t[a-1].equals(t[a-2]);)a--;if(!(t.length<2)){"bevel"===e&&(n=1.05);var o=s/(512*this.overscaling)*15,u=t[0],c=t[a-1],h=u.equals(c);if(this.prepareArrayGroup("line",10*a),2!==a||!h){this.distance=0;var f,d,p,m,g,v,y,b=r,x=h?"butt":r,_=!0;this.e1=this.e2=this.e3=-1,h&&(f=t[a-2],g=u.sub(f)._unit()._perp());for(var w=0;w0){var S=f.dist(d);if(S>2*o){var E=f.sub(f.sub(d)._mult(o/S)._round());this.distance+=E.dist(d),this.addCurrentVertex(E,this.distance,m.mult(1),0,0,!1),d=E}}var L=d&&p,C=L?e:p?b:x;if(L&&"round"===C&&(An&&(C="bevel"),"bevel"===C&&(A>2&&(C="flipbevel"),A100)M=g.clone();else{var z=m.x*g.y-m.y*g.x>0?-1:1,D=A*m.add(g).mag()/m.sub(g).mag();M._perp()._mult(D*z)}this.addCurrentVertex(f,this.distance,M,0,0,!1),this.addCurrentVertex(f,this.distance,M.mult(-1),0,0,!1)}else if("bevel"===C||"fakeround"===C){var I=m.x*g.y-m.y*g.x>0,P=-Math.sqrt(A*A-1);if(I?(y=0,v=P):(v=0,y=P),_||this.addCurrentVertex(f,this.distance,m,v,y,!1),"fakeround"===C){for(var O,j=Math.floor(8*(.5-(k-.5))),R=0;R=0;F--)O=m.mult((F+1)/(j+1))._add(g)._unit(),this.addPieSliceVertex(f,this.distance,O,I)}p&&this.addCurrentVertex(f,this.distance,g,-v,-y,!1)}else"butt"===C?(_||this.addCurrentVertex(f,this.distance,m,0,0,!1),p&&this.addCurrentVertex(f,this.distance,g,0,0,!1)):"square"===C?(_||(this.addCurrentVertex(f,this.distance,m,1,1,!1),this.e1=this.e2=-1),p&&this.addCurrentVertex(f,this.distance,g,-1,-1,!1)):"round"===C&&(_||(this.addCurrentVertex(f,this.distance,m,0,0,!1),this.addCurrentVertex(f,this.distance,m,1,1,!0),this.e1=this.e2=-1),p&&(this.addCurrentVertex(f,this.distance,g,-1,-1,!0),this.addCurrentVertex(f,this.distance,g,0,0,!1)));if(T&&w2*o){var B=f.add(p.sub(f)._mult(o/N)._round());this.distance+=B.dist(f),this.addCurrentVertex(B,this.distance,g.mult(1),0,0,!1),f=B}}_=!1}}}},n.prototype.addCurrentVertex=function(t,e,r,n,i,a){var o,s=a?1:0,l=this.arrayGroups.line[this.arrayGroups.line.length-1],c=l.layoutVertexArray,h=l.elementArray;o=r.clone(),n&&o._sub(r.perp()._mult(n)),this.e3=this.addLineVertex(c,t,o,s,0,n,e),this.e1>=0&&this.e2>=0&&h.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,o=r.mult(-1),i&&o._sub(r.perp()._mult(i)),this.e3=this.addLineVertex(c,t,o,s,1,-i,e),this.e1>=0&&this.e2>=0&&h.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,e>u/2&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,a))},n.prototype.addPieSliceVertex=function(t,e,r,n){var i=n?1:0;r=r.mult(n?-1:1);var a=this.arrayGroups.line[this.arrayGroups.line.length-1],o=a.layoutVertexArray,s=a.elementArray;this.e3=this.addLineVertex(o,t,r,0,i,0,e),this.e1>=0&&this.e2>=0&&s.emplaceBack(this.e1,this.e2,this.e3),n?this.e2=this.e3:this.e1=this.e3}},{"../../util/util":424,"../bucket":311,"../load_geometry":319}],315:[function(t,e,r){"use strict";function n(t){o.apply(this,arguments),this.showCollisionBoxes=t.showCollisionBoxes,this.overscaling=t.overscaling,this.collisionBoxArray=t.collisionBoxArray,this.symbolQuadsArray=t.symbolQuadsArray,this.symbolInstancesArray=t.symbolInstancesArray,this.sdfIcons=t.sdfIcons,this.iconsNeedLinear=t.iconsNeedLinear,this.adjustedTextSize=t.adjustedTextSize,this.adjustedIconSize=t.adjustedIconSize,this.fontstack=t.fontstack}function i(t,e,r,n,i,a,o,s,l,u,c){return t.emplaceBack(e,r,Math.round(64*n),Math.round(64*i),a/4,o/4,10*(u||0),c,10*(s||0),10*Math.min(l||25,25))}var a=t("point-geometry"),o=t("../bucket"),s=t("../../symbol/anchor"),l=t("../../symbol/get_anchors"),u=t("../../util/token"),c=t("../../symbol/quads"),h=t("../../symbol/shaping"),f=t("../../symbol/resolve_text"),d=t("../../symbol/mergelines"),p=t("../../symbol/clip_line"),m=t("../../util/util"),g=t("../load_geometry"),v=t("../../symbol/collision_feature"),y=h.shapeText,b=h.shapeIcon,x=c.getGlyphQuads,_=c.getIconQuads,w=o.EXTENT;e.exports=n,n.MAX_QUADS=65535,n.prototype=m.inherit(o,{}),n.prototype.serialize=function(){var t=o.prototype.serialize.apply(this);return t.sdfIcons=this.sdfIcons,t.iconsNeedLinear=this.iconsNeedLinear,t.adjustedTextSize=this.adjustedTextSize,t.adjustedIconSize=this.adjustedIconSize,t.fontstack=this.fontstack,t};var M=new o.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_offset",components:2,type:"Int16"},{name:"a_texture_pos",components:2,type:"Uint16"},{name:"a_data",components:4,type:"Uint8"}]),k=new o.ElementArrayType;n.prototype.addCollisionBoxVertex=function(t,e,r,n,i){return t.emplaceBack(e.x,e.y,Math.round(r.x),Math.round(r.y),10*n,10*i)},n.prototype.programInterfaces={glyph:{layoutVertexArrayType:M,elementArrayType:k},icon:{layoutVertexArrayType:M,elementArrayType:k},collisionBox:{layoutVertexArrayType:new o.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"},{name:"a_data",components:2,type:"Uint8"}])}},n.prototype.populateArrays=function(t,e,r){var n={lastIntegerZoom:1/0,lastIntegerZoomTime:0,lastZoom:0};this.adjustedTextMaxSize=this.layer.getLayoutValue("text-size",{zoom:18,zoomHistory:n}),this.adjustedTextSize=this.layer.getLayoutValue("text-size",{zoom:this.zoom+1,zoomHistory:n}),this.adjustedIconMaxSize=this.layer.getLayoutValue("icon-size",{zoom:18,zoomHistory:n}),this.adjustedIconSize=this.layer.getLayoutValue("icon-size",{zoom:this.zoom+1,zoomHistory:n});var i=512*this.overscaling;this.tilePixelRatio=w/i,this.compareText={},this.iconsNeedLinear=!1,this.symbolInstancesStartIndex=this.symbolInstancesArray.length;var a=this.layer.layout,o=this.features,s=this.textFeatures,l=.5,c=.5;switch(a["text-anchor"]){case"right":case"top-right":case"bottom-right":l=1;break;case"left":case"top-left":case"bottom-left":l=0}switch(a["text-anchor"]){case"bottom":case"bottom-right":case"bottom-left":c=1;break;case"top":case"top-right":case"top-left":c=0}for(var h="right"===a["text-justify"]?1:"left"===a["text-justify"]?0:.5,f=24*a["text-line-height"],p="line"!==a["symbol-placement"]?24*a["text-max-width"]:0,v=24*a["text-letter-spacing"],x=[24*a["text-offset"][0],24*a["text-offset"][1]],_=this.fontstack=a["text-font"].join(","),M=[],k=0;kw||L.y<0||L.y>w);if(!d||C){var z=C||x;this.addSymbolInstance(L,T,e,r,this.layer,z,this.symbolInstancesArray.length,this.collisionBoxArray,n.index,this.sourceLayerIndex,this.index,u,m,y,h,g,b,{zoom:this.zoom},n.properties)}}}}},n.prototype.anchorIsTooClose=function(t,e,r){var n=this.compareText;if(t in n){for(var i=n[t],a=i.length-1;a>=0;a--)if(r.dist(i[a])3*Math.PI/2))){var g=p.tl,v=p.tr,y=p.bl,b=p.br,x=p.tex,_=p.anchorPoint,w=Math.max(h+Math.log(p.minScale)/Math.LN2,f),M=Math.min(h+Math.log(p.maxScale)/Math.LN2,25);if(!(M<=w)){w===f&&(w=0);var k=Math.round(p.glyphAngle/(2*Math.PI)*256),A=i(c,_.x,_.y,g.x,g.y,x.x,x.y,w,M,f,k);i(c,_.x,_.y,v.x,v.y,x.x+x.w,x.y,w,M,f,k),i(c,_.x,_.y,y.x,y.y,x.x,x.y+x.h,w,M,f,k),i(c,_.x,_.y,b.x,b.y,x.x+x.w,x.y+x.h,w,M,f,k),u.emplaceBack(A,A+1,A+2),u.emplaceBack(A+1,A+2,A+3)}}}},n.prototype.updateIcons=function(t){this.recalculateStyleLayers();var e=this.layer.layout["icon-image"];if(e)for(var r=0;rn.MAX_QUADS&&m.warnOnce("Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),A>n.MAX_QUADS&&m.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),this.symbolInstancesArray.emplaceBack(I,P,O,j,k,A,T,S,t.x,t.y,s)},n.prototype.addSymbolQuad=function(t){return this.symbolQuadsArray.emplaceBack(t.anchorPoint.x,t.anchorPoint.y,t.tl.x,t.tl.y,t.tr.x,t.tr.y,t.bl.x,t.bl.y,t.br.x,t.br.y,t.tex.h,t.tex.w,t.tex.x,t.tex.y,t.anchorAngle,t.glyphAngle,t.maxScale,t.minScale)}},{"../../symbol/anchor":373,"../../symbol/clip_line":375,"../../symbol/collision_feature":377,"../../symbol/get_anchors":379,"../../symbol/mergelines":382,"../../symbol/quads":383,"../../symbol/resolve_text":384,"../../symbol/shaping":385,"../../util/token":423,"../../util/util":424,"../bucket":311,"../load_geometry":319,"point-geometry":465}],316:[function(t,e,r){"use strict";function n(t,e,r){this.arrayBuffer=t.arrayBuffer,this.length=t.length,this.attributes=e.members,this.itemSize=e.bytesPerElement,this.type=r,this.arrayType=e}e.exports=n,n.prototype.bind=function(t){var e=t[this.type];this.buffer?t.bindBuffer(e,this.buffer):(this.buffer=t.createBuffer(),t.bindBuffer(e,this.buffer),t.bufferData(e,this.arrayBuffer,t.STATIC_DRAW),this.arrayBuffer=null)};var i={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT"};n.prototype.setVertexAttribPointers=function(t,e){for(var r=0;r0?t["line-gap-width"]+2*t["line-width"]:t["line-width"]}function s(t,e,r,n,i){if(!e[0]&&!e[1])return t;e=u.convert(e),"viewport"===r&&e._rotate(-n);for(var a=[],o=0;or.max||f.yr.max)&&i.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return l}},{"../util/util":424,"./bucket":311,assert:40}],320:[function(t,e,r){"use strict";function n(t,e,r){this.column=t,this.row=e,this.zoom=r}e.exports=n,n.prototype={clone:function(){return new n(this.column,this.row,this.zoom)},zoomTo:function(t){return this.clone()._zoomTo(t)},sub:function(t){return this.clone()._sub(t)},_zoomTo:function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},_sub:function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this}}},{}],321:[function(t,e,r){"use strict";function n(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}e.exports=n;var i=t("../util/util").wrap;n.prototype.wrap=function(){return new n(i(this.lng,-180,180),this.lat)},n.prototype.toArray=function(){return[this.lng,this.lat]},n.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{"../util/util":424}],322:[function(t,e,r){"use strict";function n(t,e){t&&(e?this.extend(t).extend(e):4===t.length?this.extend([t[0],t[1]]).extend([t[2],t[3]]):this.extend(t[0]).extend(t[1]))}e.exports=n;var i=t("./lng_lat");n.prototype={extend:function(t){var e,r,a=this._sw,o=this._ne;if(t instanceof i)e=t,r=t;else{if(!(t instanceof n))return t?this.extend(i.convert(t)||n.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return a||o?(a.lng=Math.min(e.lng,a.lng),a.lat=Math.min(e.lat,a.lat),o.lng=Math.max(r.lng,o.lng),o.lat=Math.max(r.lat,o.lat)):(this._sw=new i(e.lng,e.lat),this._ne=new i(r.lng,r.lat)),this},getCenter:function(){return new i((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},getSouthWest:function(){return this._sw},getNorthEast:function(){return this._ne},getNorthWest:function(){return new i(this.getWest(),this.getNorth())},getSouthEast:function(){return new i(this.getEast(),this.getSouth())},getWest:function(){return this._sw.lng},getSouth:function(){return this._sw.lat},getEast:function(){return this._ne.lng},getNorth:function(){return this._ne.lat},toArray:function(){return[this._sw.toArray(),this._ne.toArray()]},toString:function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"}},n.convert=function(t){return!t||t instanceof n?t:new n(t)}},{"./lng_lat":321}],323:[function(t,e,r){"use strict";function n(t,e){this.tileSize=512,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new i(0,0),this.zoom=0,this.angle=0,this._altitude=1.5,this._pitch=0,this._unmodified=!0}var i=t("./lng_lat"),a=t("point-geometry"),o=t("./coordinate"),s=t("../util/util").wrap,l=t("../util/interpolate"),u=t("../source/tile_coord"),c=t("../data/bucket").EXTENT,h=t("gl-matrix"),f=h.vec4,d=h.mat4,p=h.mat2;e.exports=n,n.prototype={get minZoom(){return this._minZoom},set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},get maxZoom(){return this._maxZoom},set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},get worldSize(){return this.tileSize*this.scale},get centerPoint(){return this.size._div(2)},get size(){return new a(this.width,this.height)},get bearing(){return-this.angle/Math.PI*180},set bearing(t){var e=-s(t,-180,180)*Math.PI/180;this.angle!==e&&(this._unmodified=!1,this.angle=e,this._calcMatrices(),this.rotationMatrix=p.create(),p.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},get pitch(){return this._pitch/Math.PI*180},set pitch(t){var e=Math.min(60,t)/180*Math.PI;this._pitch!==e&&(this._unmodified=!1,this._pitch=e,this._calcMatrices())},get altitude(){return this._altitude},set altitude(t){var e=Math.max(.75,t);this._altitude!==e&&(this._unmodified=!1,this._altitude=e,this._calcMatrices())},get zoom(){return this._zoom},set zoom(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._calcMatrices(),this._constrain())},get center(){return this._center},set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._calcMatrices(),this._constrain())},coveringZoomLevel:function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},coveringTiles:function(t){var e=this.coveringZoomLevel(t),r=e;if(et.maxzoom&&(e=t.maxzoom);var n=this,i=n.locationCoordinate(n.center)._zoomTo(e),o=new a(i.column-.5,i.row-.5);return u.cover(e,[n.pointCoordinate(new a(0,0))._zoomTo(e),n.pointCoordinate(new a(n.width,0))._zoomTo(e),n.pointCoordinate(new a(n.width,n.height))._zoomTo(e),n.pointCoordinate(new a(0,n.height))._zoomTo(e)],t.reparseOverscaled?r:e).sort(function(t,e){return o.dist(t)-o.dist(e)})},resize:function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._calcMatrices(),this._constrain()},get unmodified(){return this._unmodified},zoomScale:function(t){return Math.pow(2,t)},scaleZoom:function(t){return Math.log(t)/Math.LN2},project:function(t,e){return new a(this.lngX(t.lng,e),this.latY(t.lat,e))},unproject:function(t,e){return new i(this.xLng(t.x,e),this.yLat(t.y,e))},get x(){return this.lngX(this.center.lng)},get y(){return this.latY(this.center.lat)},get point(){return new a(this.x,this.y)},lngX:function(t,e){return(180+t)*(e||this.worldSize)/360},latY:function(t,e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*(e||this.worldSize)/360},xLng:function(t,e){return 360*t/(e||this.worldSize)-180},yLat:function(t,e){var r=180-360*t/(e||this.worldSize);return 360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90},panBy:function(t){var e=this.centerPoint._add(t);this.center=this.pointLocation(e)},setLocationAtPoint:function(t,e){var r=this.locationCoordinate(t),n=this.pointCoordinate(e),i=this.pointCoordinate(this.centerPoint),a=n._sub(r);this._unmodified=!1,this.center=this.coordinateLocation(i._sub(a))},locationPoint:function(t){return this.coordinatePoint(this.locationCoordinate(t))},pointLocation:function(t){return this.coordinateLocation(this.pointCoordinate(t))},locationCoordinate:function(t){var e=this.zoomScale(this.tileZoom)/this.worldSize,r=i.convert(t);return new o(this.lngX(r.lng)*e,this.latY(r.lat)*e,this.tileZoom)},coordinateLocation:function(t){var e=this.zoomScale(t.zoom);return new i(this.xLng(t.column,e),this.yLat(t.row,e))},pointCoordinate:function(t){var e=[t.x,t.y,0,1],r=[t.x,t.y,1,1];f.transformMat4(e,e,this.pixelMatrixInverse),f.transformMat4(r,r,this.pixelMatrixInverse);var n=e[3],i=r[3],a=e[0]/n,s=r[0]/i,u=e[1]/n,c=r[1]/i,h=e[2]/n,d=r[2]/i,p=h===d?0:(0-h)/(d-h),m=this.worldSize/this.zoomScale(this.tileZoom);return new o(l(a,s,p)/m,l(u,c,p)/m,this.tileZoom)},coordinatePoint:function(t){var e=this.worldSize/this.zoomScale(t.zoom),r=[t.column*e,t.row*e,0,1];return f.transformMat4(r,r,this.pixelMatrix),new a(r[0]/r[3],r[1]/r[3])},calculatePosMatrix:function(t,e){void 0===e&&(e=1/0),t instanceof u&&(t=t.toCoordinate(e));var r=Math.min(t.zoom,e),n=this.worldSize/Math.pow(2,r),i=new Float64Array(16);return d.identity(i),d.translate(i,i,[t.column*n,t.row*n,0]),d.scale(i,i,[n/c,n/c,1]),d.multiply(i,this.projMatrix,i),new Float32Array(i)},_constrain:function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,e,r,n,i,o,s,l,u=this.size,c=this._unmodified;this.latRange&&(t=this.latY(this.latRange[1]),e=this.latY(this.latRange[0]),i=e-te&&(l=e-d)}if(this.lngRange){var p=this.x,m=u.x/2;p-mn&&(s=n-m)}void 0===s&&void 0===l||(this.center=this.unproject(new a(void 0!==s?s:this.x,void 0!==l?l:this.y))),this._unmodified=c,this._constraining=!1}},_calcMatrices:function(){if(this.height){var t=Math.atan(.5/this.altitude),e=Math.sin(t)*this.altitude/Math.sin(Math.PI/2-this._pitch-t),r=Math.cos(Math.PI/2-this._pitch)*e+this.altitude,n=new Float64Array(16);if(d.perspective(n,2*Math.atan(this.height/2/this.altitude),this.width/this.height,.1,r),d.translate(n,n,[0,0,-this.altitude]),d.scale(n,n,[1,-1,1/this.height]),d.rotateX(n,n,this._pitch),d.rotateZ(n,n,this.angle),d.translate(n,n,[-this.x,-this.y,0]),this.projMatrix=n,n=d.create(),d.scale(n,n,[this.width/2,-this.height/2,1]),d.translate(n,n,[1,-1,0]),this.pixelMatrix=d.multiply(new Float64Array(16),n,this.projMatrix),!(n=d.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=n}}}},{"../data/bucket":311,"../source/tile_coord":351,"../util/interpolate":418,"../util/util":424,"./coordinate":320,"./lng_lat":321,"gl-matrix":177,"point-geometry":465}],324:[function(t,e,r){"use strict";var n={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]};e.exports=function(t,e,r,i){i=i||1;var a,o,s,l,u,c,h,f,d=[];for(a=0,o=t.length;a>16,_>>16),s.uniform2f(n.u_pixel_coord_lower,65535&x,65535&_)}s.uniformMatrix4fv(n.u_matrix,!1,t.transform.calculatePosMatrix(v)),s.drawArrays(s.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}s.stencilMask(0),s.stencilFunc(s.EQUAL,128,128)}var i=t("../source/pixels_to_tile_units"),a=t("./create_uniform_pragmas"),o=512;e.exports=n},{"../source/pixels_to_tile_units":345,"./create_uniform_pragmas":326}],328:[function(t,e,r){"use strict";function n(t,e,r,n){if(!t.isOpaquePass){var a=t.gl;t.setDepthSublayer(0),t.depthMask(!1),a.disable(a.STENCIL_TEST);for(var o=0;o>16,f>>16),o.uniform2f(a.u_pixel_coord_lower,65535&h,65535&f),o.activeTexture(o.TEXTURE0),i.spriteAtlas.bind(o,!0)}}var s=t("../source/pixels_to_tile_units");e.exports=n},{"../source/pixels_to_tile_units":345}],332:[function(t,e,r){"use strict";var n=t("../util/browser"),i=t("gl-matrix").mat2,a=t("../source/pixels_to_tile_units");e.exports=function(t,e,r,o){if(!t.isOpaquePass){t.setDepthSublayer(0),t.depthMask(!1);var s=t.gl;if(s.enable(s.STENCIL_TEST),!(r.paint["line-width"]<=0)){var l=1/n.devicePixelRatio,u=r.paint["line-blur"]+l,c=r.paint["line-color"],h=t.transform,f=i.create();i.scale(f,f,[1,Math.cos(h._pitch)]),i.rotate(f,f,t.transform.angle);var d,p,m,g,v,y=Math.sqrt(h.height*h.height/4*(1+h.altitude*h.altitude)),b=h.height/2*Math.tan(h._pitch),x=(y+b)/y-1,_=r.paint["line-dasharray"],w=r.paint["line-pattern"];if(_)d=t.useProgram("linesdfpattern"),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform4fv(d.u_color,c),s.uniform1f(d.u_opacity,r.paint["line-opacity"]),p=t.lineAtlas.getDash(_.from,"round"===r.layout["line-cap"]),m=t.lineAtlas.getDash(_.to,"round"===r.layout["line-cap"]),s.uniform1i(d.u_image,0),s.activeTexture(s.TEXTURE0),t.lineAtlas.bind(s),s.uniform1f(d.u_tex_y_a,p.y),s.uniform1f(d.u_tex_y_b,m.y),s.uniform1f(d.u_mix,_.t),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f);else if(w){if(g=t.spriteAtlas.getPosition(w.from,!0),v=t.spriteAtlas.getPosition(w.to,!0),!g||!v)return;d=t.useProgram("linepattern"),s.uniform1i(d.u_image,0),s.activeTexture(s.TEXTURE0),t.spriteAtlas.bind(s,!0),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform2fv(d.u_pattern_tl_a,g.tl),s.uniform2fv(d.u_pattern_br_a,g.br),s.uniform2fv(d.u_pattern_tl_b,v.tl),s.uniform2fv(d.u_pattern_br_b,v.br),s.uniform1f(d.u_fade,w.t),s.uniform1f(d.u_opacity,r.paint["line-opacity"]),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f)}else d=t.useProgram("line"),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f),s.uniform4fv(d.u_color,c),s.uniform1f(d.u_opacity,r.paint["line-opacity"]);for(var M=0;M0?1/(1-t):1+t}function s(t){return t>0?1-1/(1.001-t):-t}function l(t,e,r,n){var i=[1,0],a=r.paint["raster-fade-duration"];if(t.source&&a>0){var o=(new Date).getTime(),s=(o-t.timeAdded)/a,l=e?(o-e.timeAdded)/a:-1,c=n.coveringZoomLevel(t.source),h=!!e&&Math.abs(e.coord.z-c)>Math.abs(t.coord.z-c);!e||h?(i[0]=u.clamp(s,0,1),i[1]=1-i[0]):(i[0]=u.clamp(1-l,0,1),i[1]=1-i[0])}var f=r.paint["raster-opacity"];return i[0]*=f,i[1]*=f,i}var u=t("../util/util"),c=t("../util/struct_array");e.exports=n,n.RasterBoundsArray=new c({members:[{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]})},{"../util/struct_array":422,"../util/util":424}],334:[function(t,e,r){"use strict";function n(t,e,r,n){if(!t.isOpaquePass){var a=!(r.layout["text-allow-overlap"]||r.layout["icon-allow-overlap"]||r.layout["text-ignore-placement"]||r.layout["icon-ignore-placement"]),o=t.gl;a?o.disable(o.STENCIL_TEST):o.enable(o.STENCIL_TEST),t.setDepthSublayer(0),t.depthMask(!1),o.disable(o.DEPTH_TEST),i(t,e,r,n,!1,r.paint["icon-translate"],r.paint["icon-translate-anchor"],r.layout["icon-rotation-alignment"],r.layout["icon-rotation-alignment"],r.layout["icon-size"],r.paint["icon-halo-width"],r.paint["icon-halo-color"],r.paint["icon-halo-blur"],r.paint["icon-opacity"],r.paint["icon-color"]),i(t,e,r,n,!0,r.paint["text-translate"],r.paint["text-translate-anchor"],r.layout["text-rotation-alignment"],r.layout["text-pitch-alignment"],r.layout["text-size"],r.paint["text-halo-width"],r.paint["text-halo-color"],r.paint["text-halo-blur"],r.paint["text-opacity"],r.paint["text-color"]),o.enable(o.DEPTH_TEST),e.map.showCollisionBoxes&&s(t,e,r,n)}}function i(t,e,r,n,i,o,s,l,u,c,h,f,d,p,m){for(var g=0;gthis.previousZoom;r--)this.changeTimes[r]=e,this.changeOpacities[r]=this.opacities[r];for(r=0;r<256;r++){var n=e-this.changeTimes[r],i=n/this.fadeDuration*255;this.opacities[r]=r<=t?this.changeOpacities[r]+i:this.changeOpacities[r]-i}this.changed=!0,this.previousZoom=t},n.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.changed&&(t.texSubImage2D(t.TEXTURE_2D,0,0,0,256,1,t.ALPHA,t.UNSIGNED_BYTE,this.array),this.changed=!1)):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,256,1,0,t.ALPHA,t.UNSIGNED_BYTE,this.array))}},{}],336:[function(t,e,r){"use strict";function n(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}}var i=t("../util/util");e.exports=n,n.prototype.setSprite=function(t){this.sprite=t},n.prototype.getDash=function(t,e){var r=t.join(",")+e;return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},n.prototype.addDash=function(t,e){var r=e?7:0,n=2*r+1;if(this.nextRow+n>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o0?e.pop():null},n.prototype.lineWidth=function(t){this.gl.lineWidth(c.clamp(t,this.lineWidthRange[0],this.lineWidthRange[1]))},n.prototype.showOverdrawInspector=function(t){if(t||this._showOverdrawInspector){this._showOverdrawInspector=t;var e=this.gl;if(t){e.blendFunc(e.CONSTANT_COLOR,e.ONE);e.blendColor(1/8,1/8,1/8,0),e.clearColor(0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)}else e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)}}},{"../data/bucket":311,"../data/buffer":316,"../source/pixels_to_tile_units":345,"../source/source_cache":349,"../util/browser":408,"../util/struct_array":422,"../util/util":424,"./create_uniform_pragmas":326,"./draw_background":327,"./draw_circle":328,"./draw_debug":330,"./draw_fill":331,"./draw_line":332,"./draw_raster":333,"./draw_symbol":334,"./frame_history":335,"./painter/use_program":338,"./vertex_array_object":339,"gl-matrix":177}],338:[function(t,e,r){"use strict";function n(t,e){return t.replace(/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,function(t,r,n,i,a){return e[r][a].replace(/{type}/g,i).replace(/{precision}/g,n)})}var i=t("assert"),a=t("../../util/util"),o=t("mapbox-gl-shaders"),s=o.util;e.exports._createProgram=function(t,e,r,l){for(var u=this.gl,c=u.createProgram(),h=o[t],f="#define MAPBOX_GL_JS;\n",d=0;dthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,n={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,overscaling:r,angle:this.map.transform.angle, +pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send("load tile",n,function(r,n){if(t.unloadVectorData(this.map.painter),!t.aborted)return r?e(r):(t.loadVectorData(n,this.map.style),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(this)),e(null))}.bind(this),this.workerID)},abortTile:function(t){t.aborted=!0},unloadTile:function(t){t.unloadVectorData(this.map.painter),this.dispatcher.send("remove tile",{uid:t.uid,source:this.id},function(){},t.workerID)},serialize:function(){return{type:this.type,data:this._data}}})},{"../data/bucket":311,"../util/evented":416,"../util/util":424,"resolve-url":482}],341:[function(t,e,r){"use strict";function n(t,e,r){r&&(this.loadGeoJSON=r),h.call(this,t,e)}var i=t("../util/util"),a=t("../util/ajax"),o=t("geojson-rewind"),s=t("./geojson_wrapper"),l=t("vt-pbf"),u=t("supercluster"),c=t("geojson-vt"),h=t("./vector_tile_worker_source");e.exports=n,n.prototype=i.inherit(h,{_geoJSONIndexes:{},loadVectorData:function(t,e){var r=t.source,n=t.coord;if(!this._geoJSONIndexes[r])return e(null,null);var i=this._geoJSONIndexes[r].getTile(Math.min(n.z,t.maxZoom),n.x,n.y);if(!i)return e(null,null);var a=new s(i.features);a.name="_geojsonTileLayer";var o=l({layers:{_geojsonTileLayer:a}});0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{tile:a,rawTileData:o.buffer})},loadData:function(t,e){var r=function(r,n){return r?e(r):"object"!=typeof n?e(new Error("Input data is not a valid GeoJSON object.")):(o(n,!0),void this._indexData(n,t,function(r,n){if(r)return e(r);this._geoJSONIndexes[t.source]=n,e(null)}.bind(this)))}.bind(this);this.loadGeoJSON(t,r)},loadGeoJSON:function(t,e){if(t.url)a.getJSON(t.url,e);else{if("string"!=typeof t.data)return e(new Error("Input data is not a valid GeoJSON object."));try{return e(null,JSON.parse(t.data))}catch(t){return e(new Error("Input data is not a valid GeoJSON object."))}}},_indexData:function(t,e,r){try{e.cluster?r(null,u(e.superclusterOptions).load(t.features)):r(null,c(t,e.geojsonVtOptions))}catch(t){return r(t)}}})},{"../util/ajax":407,"../util/util":424,"./geojson_wrapper":342,"./vector_tile_worker_source":353,"geojson-rewind":123,"geojson-vt":127,supercluster:509,"vt-pbf":536}],342:[function(t,e,r){"use strict";function n(t){this.features=t,this.length=t.length,this.extent=s}function i(t){if(this.type=t.type,1===t.type){this.rawGeometry=[];for(var e=0;ee)){var o=Math.pow(2,Math.min(a.coord.z,this.maxzoom)-Math.min(t.z,this.maxzoom));if(Math.floor(a.coord.x/o)===t.x&&Math.floor(a.coord.y/o)===t.y)for(r[i]=!0,n=!0;a&&a.coord.z-1>t.z;){var s=a.coord.parent(this.maxzoom).id;a=this._tiles[s],a&&a.isRenderable()&&(delete r[i],r[s]=!0)}}}return n},findLoadedParent:function(t,e,r){for(var n=t.z-1;n>=e;n--){t=t.parent(this.maxzoom);var i=this._tiles[t.id];if(i&&i.isRenderable())return r[t.id]=!0,i;if(this._cache.has(t.id))return this.addTile(t),r[t.id]=!0,this._tiles[t.id]}},updateCacheSize:function(t){var e=Math.ceil(t.width/t.tileSize)+1,r=Math.ceil(t.height/t.tileSize)+1,n=e*r;this._cache.setMaxSize(Math.floor(5*n))},update:function(t,e){if(this._sourceLoaded){var r,i,a;this.updateCacheSize(t);var o=(this.roundZoom?Math.round:Math.floor)(this.getZoom(t)),s=Math.max(o-n.maxOverzooming,this.minzoom),l=Math.max(o+n.maxUnderzooming,this.minzoom),c={},h=(new Date).getTime();this._coveredTiles={};var d=this.used?t.coveringTiles(this._source):[];for(r=0;rh-(e||0)&&(this.findLoadedChildren(i,l,c)&&(c[v]=!0),this.findLoadedParent(i,s,p))}var y;for(y in p)c[y]||(this._coveredTiles[y]=!0);for(y in p)c[y]=!0;var b=f.keysDifference(this._tiles,c);for(r=0;rthis.maxzoom?Math.pow(2,n-this.maxzoom):1;e=new s(r,this.tileSize*i,this.maxzoom),this.loadTile(e,this._tileLoaded.bind(this,e))}return e.uses++,this._tiles[t.id]=e,this.fire("tile.add",{tile:e}),this._source.fire("tile.add",{tile:e}),e},removeTile:function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this.fire("tile.remove",{tile:e}),this._source.fire("tile.remove",{tile:e}),e.uses>0||(e.isRenderable()?this._cache.add(e.coord.wrapped().id,e):(e.aborted=!0,this.abortTile(e),this.unloadTile(e))))},clearTiles:function(){for(var t in this._tiles)this.removeTile(t);this._cache.reset()},tilesIn:function(t){for(var e={},r=this.getIds(),n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0].zoom,c=0;c=0&&v[1].y>=0){for(var y=[],b=0;b=0&&t%1==0),l(!isNaN(e)&&e>=0&&e%1==0),l(!isNaN(r)&&r>=0&&r%1==0),isNaN(n)&&(n=0),this.z=+t,this.x=+e,this.y=+r,this.w=+n,(n*=2)<0&&(n=n*-1-1);var i=1<0;a--)n=1<e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function o(t,e,r,n,i){var a=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx0,h=e.dx<0,f=a;fc.dy&&(l=u,u=c,c=l),u.dy>h.dy&&(l=u,u=h,h=l),c.dy>h.dy&&(l=c,c=h,h=l),u.dy&&o(h,u,n,i,s),c.dy&&o(h,c,n,i,s)}var l=t("assert"),u=t("whoots-js"),c=t("../geo/coordinate");e.exports=n,n.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y},n.prototype.toCoordinate=function(t){var e=Math.min(this.z,t),r=Math.pow(2,e),n=this.y,i=this.x+r*this.w;return new c(i,n,e)},n.fromID=function(t){var e=t%32,r=1<t?new n(this.z-1,this.x,this.y,this.w):new n(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},n.prototype.wrapped=function(){return new n(this.z,this.x,this.y,0)},n.prototype.children=function(t){if(this.z>=t)return[new n(this.z+1,this.x,this.y,this.w)];var e=this.z+1,r=2*this.x,i=2*this.y;return[new n(e,r,i,this.w),new n(e,r+1,i,this.w),new n(e,r,i+1,this.w),new n(e,r+1,i+1,this.w)]},n.cover=function(t,e,r){function i(t,e,i){var s,l,u;if(i>=0&&i<=a)for(s=t;sthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,i={url:s(t.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),uid:t.uid,coord:t.coord,zoom:t.coord.z,tileSize:this.tileSize*n,source:this.id,overscaling:n,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID?"loading"===t.state?t.reloadCallback=e:(i.rawTileData=t.rawTileData,this.dispatcher.send("reload tile",i,r.bind(this),t.workerID)):t.workerID=this.dispatcher.send("load tile",i,r.bind(this))},abortTile:function(t){this.dispatcher.send("abort tile",{uid:t.uid,source:this.id},null,t.workerID)},unloadTile:function(t){t.unloadVectorData(this.map.painter),this.dispatcher.send("remove tile",{uid:t.uid,source:this.id},null,t.workerID)}})},{"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./load_tilejson":344}],353:[function(t,e,r){"use strict";function n(t,e,r){this.actor=t,this.styleLayers=e,r&&(this.loadVectorData=r),this.loading={},this.loaded={}}var i=t("../util/ajax"),a=t("vector-tile"),o=t("pbf"),s=t("./worker_tile");e.exports=n,n.prototype={loadTile:function(t,e){function r(t,r){return delete this.loading[n][i],t?e(t):r?(a.data=r.tile,a.parse(a.data,this.styleLayers.getLayerFamilies(),this.actor,r.rawTileData,e),this.loaded[n]=this.loaded[n]||{},void(this.loaded[n][i]=a)):e(null,null)}var n=t.source,i=t.uid;this.loading[n]||(this.loading[n]={});var a=this.loading[n][i]=new s(t);a.abort=this.loadVectorData(t,r.bind(this))},reloadTile:function(t,e){var r=this.loaded[t.source],n=t.uid;if(r&&r[n]){var i=r[n];i.parse(i.data,this.styleLayers.getLayerFamilies(),this.actor,t.rawTileData,e)}},abortTile:function(t){var e=this.loading[t.source],r=t.uid;e&&e[r]&&e[r].abort&&(e[r].abort(),delete e[r])},removeTile:function(t){var e=this.loaded[t.source],r=t.uid;e&&e[r]&&delete e[r]},loadVectorData:function(t,e){function r(t,r){if(t)return e(t);var n=new a.VectorTile(new o(new Uint8Array(r)));e(t,{tile:n,rawTileData:r})}var n=i.getArrayBuffer(t.url,r.bind(this));return function(){n.abort()}},redoPlacement:function(t,e){var r=this.loaded[t.source],n=this.loading[t.source],i=t.uid;if(r&&r[i]){var a=r[i],o=a.redoPlacement(t.angle,t.pitch,t.showCollisionBoxes);o.result&&e(null,o.result,o.transferables)}else n&&n[i]&&(n[i].angle=t.angle)}}},{"../util/ajax":407,"./worker_tile":356,pbf:459,"vector-tile":530}],354:[function(t,e,r){"use strict";function n(t,e){this.id=t,this.urls=e.urls,this.coordinates=e.coordinates,u.getVideo(e.urls,function(t,r){if(t)return this.fire("error",{error:t});this.video=r,this.video.loop=!0;var n;this.video.addEventListener("playing",function(){n=this.map.style.animationLoop.set(1/0),this.map._rerender()}.bind(this)),this.video.addEventListener("pause",function(){this.map.style.animationLoop.cancel(n)}.bind(this)),this.map&&(this.video.play(),this.setCoordinates(e.coordinates)),this.fire("load")}.bind(this))}var i=t("../util/util"),a=t("./tile_coord"),o=t("../geo/lng_lat"),s=t("point-geometry"),l=t("../util/evented"),u=t("../util/ajax"),c=t("../data/bucket").EXTENT,h=t("../render/draw_raster").RasterBoundsArray,f=t("../data/buffer"),d=t("../render/vertex_array_object");e.exports=n,n.prototype=i.inherit(l,{minzoom:0,maxzoom:22,tileSize:512,roundZoom:!0,getVideo:function(){return this.video},onAdd:function(t){this.map||(this.map=t,this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},setCoordinates:function(t){this.coordinates=t;var e=this.map,r=t.map(function(t){return e.transform.locationCoordinate(o.convert(t)).zoomTo(0)}),n=this.centerCoord=i.getCoordinatesCenter(r);return n.column=Math.round(n.column),n.row=Math.round(n.row),this.minzoom=this.maxzoom=n.zoom,this._coord=new a(n.zoom,n.column,n.row),this._tileCoords=r.map(function(t){var e=t.zoomTo(n.zoom);return new s(Math.round((e.column-n.column)*c),Math.round((e.row-n.row)*c))}),this.fire("change"),this},_setTile:function(t){this._prepared=!1,this.tile=t;var e=new h;e.emplaceBack(this._tileCoords[0].x,this._tileCoords[0].y,0,0),e.emplaceBack(this._tileCoords[1].x,this._tileCoords[1].y,32767,0),e.emplaceBack(this._tileCoords[3].x,this._tileCoords[3].y,0,32767),e.emplaceBack(this._tileCoords[2].x,this._tileCoords[2].y,32767,32767),this.tile.buckets={},this.tile.boundsBuffer=new f(e.serialize(),h.serialize(),f.BufferType.VERTEX),this.tile.boundsVAO=new d,this.tile.state="loaded"},prepare:function(){if(!(this.video.readyState<2)&&this.tile){var t=this.map.painter.gl;this._prepared?(t.bindTexture(t.TEXTURE_2D,this.tile.texture),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,this.video)):(this._prepared=!0,this.tile.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.tile.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.video)),this._currentTime=this.video.currentTime}},loadTile:function(t,e){this._coord&&this._coord.toString()===t.coord.toString()?(this._setTile(t),e(null)):(t.state="errored",e(null))},serialize:function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}})},{"../data/bucket":311,"../data/buffer":316,"../geo/lng_lat":321,"../render/draw_raster":333,"../render/vertex_array_object":339,"../util/ajax":407,"../util/evented":416,"../util/util":424,"./tile_coord":351,"point-geometry":465}],355:[function(t,e,r){"use strict";function n(t){this.self=t,this.actor=new a(t,this);var e={getLayers:function(){return this.layers}.bind(this),getLayerFamilies:function(){return this.layerFamilies}.bind(this)};this.workerSources={vector:new l(this.actor,e),geojson:new u(this.actor,e)},this.self.registerWorkerSource=function(t,r){if(this.workerSources[t])throw new Error('Worker source with name "'+t+'" already registered.');this.workerSources[t]=new r(this.actor,e)}.bind(this)}function i(t){var e={};for(var r in t){var n=t[r],i=n.ref||n.id,a=t[i];a.layout&&"none"===a.layout.visibility||(e[i]=e[i]||[],r===i?e[i].unshift(n):e[i].push(n))}return e}var a=t("../util/actor"),o=t("../style/style_layer"),s=t("../util/util"),l=t("./vector_tile_worker_source"),u=t("./geojson_worker_source");e.exports=function(t){return new n(t)},s.extend(n.prototype,{"set layers":function(t){function e(t){var e=o.create(t,t.ref&&r.layers[t.ref]);e.updatePaintTransitions({},{transition:!1}),r.layers[e.id]=e}this.layers={};for(var r=this,n=[],a=0;a=0;e--)b(E,P[e]);x()}}function b(t,e){if(e.populateArrays(A,F,R),"symbol"!==e.type)for(var r=0;r=w.maxzoom||w.layout&&"none"===w.layout.visibility||t.layers&&!t.layers[w.sourceLayer]||(k=c.create({layer:w,index:z++,childLayers:e[D],zoom:this.zoom,overscaling:this.overscaling,showCollisionBoxes:this.showCollisionBoxes,collisionBoxArray:this.collisionBoxArray,symbolQuadsArray:this.symbolQuadsArray,symbolInstancesArray:this.symbolInstancesArray,sourceLayerIndex:S.encode(w.sourceLayer||"_geojsonTileLayer")}),k.createFilter(),L[w.id]=k,t.layers&&(M=w.sourceLayer,C[M]=C[M]||{},C[M][w.id]=k)));if(t.layers)for(M in C)1===w.version&&d.warnOnce('Vector tile source "'+this.source+'" layer "'+M+'" does not use vector tile spec v2 and therefore may have some rendering errors.'),(w=t.layers[M])&&v(w,C[M]);else v(t,L);var I=[],P=this.symbolBuckets=[],O=[];T.bucketLayerIDs={};for(var j in L)k=L[j],0!==k.features.length&&(T.bucketLayerIDs[k.index]=k.childLayers.map(s),I.push(k),"symbol"===k.type?P.push(k):O.push(k));var R={},F={},N=0;if(P.length>0){for(_=P.length-1;_>=0;_--)P[_].updateIcons(R),P[_].updateFont(F);for(var B in F)F[B]=Object.keys(F[B]).map(Number);R=Object.keys(R),r.send("get glyphs",{uid:this.uid,stacks:F},function(t,e){F=e,y(t)}),R.length?r.send("get icons",{icons:R},function(t,e){R=e,y(t)}):y()}for(_=O.length-1;_>=0;_--)b(this,O[_]);if(0===P.length)return x()},n.prototype.redoPlacement=function(t,e,r){if("done"!==this.status)return this.redoPlacementAfterDone=!0,this.angle=t,{};for(var n=new u(t,e,this.collisionBoxArray),s=this.symbolBuckets,l=s.length-1;l>=0;l--)s[l].placeFeatures(n,r);var c=n.serialize(),h=s.filter(i);return{result:{buckets:h.map(a),collisionTile:c.data},transferables:o(h).concat(c.transferables)}}},{"../data/bucket":311,"../data/feature_index":318,"../symbol/collision_box":376,"../symbol/collision_tile":378,"../symbol/symbol_instances":387,"../symbol/symbol_quads":388,"../util/dictionary_coder":414,"../util/util":424}],357:[function(t,e,r){"use strict";function n(){this.n=0,this.times=[]}e.exports=n,n.prototype.stopped=function(){return this.times=this.times.filter(function(t){return t.time>=(new Date).getTime()}),!this.times.length},n.prototype.set=function(t){return this.times.push({id:this.n,time:t+(new Date).getTime()}),this.n++},n.prototype.cancel=function(t){this.times=this.times.filter(function(e){return e.id!==t})}},{}],358:[function(t,e,r){"use strict";function n(t){this.base=t,this.retina=s.devicePixelRatio>1;var e=this.retina?"@2x":"";o.getJSON(l(t,e,".json"),function(t,e){if(t)return void this.fire("error",{error:t});this.data=e,this.img&&this.fire("load")}.bind(this)),o.getImage(l(t,e,".png"),function(t,e){if(t)return void this.fire("error",{error:t});for(var r=e.getData(),n=e.data=new Uint8Array(r.length),i=0;i1!==this.retina){var t=new n(this.base);t.on("load",function(){this.img=t.img,this.data=t.data,this.retina=t.retina}.bind(this))}},i.prototype={x:0,y:0,width:0,height:0,pixelRatio:1,sdf:!1},n.prototype.getSpritePosition=function(t){if(!this.loaded())return new i;var e=this.data&&this.data[t];return e&&this.img?e:new i}},{"../util/ajax":407,"../util/browser":408,"../util/evented":416,"../util/mapbox":421}],359:[function(t,e,r){"use strict";var n=t("csscolorparser").parseCSSColor,i=t("../util/util"),a=t("./style_function"),o={};e.exports=function t(e){if(a.isFunctionDefinition(e))return i.extend({},e,{stops:e.stops.map(function(e){return[e[0],t(e[1])]})});if("string"==typeof e){if(!o[e]){var r=n(e);if(!r)throw new Error("Invalid color "+e);o[e]=[r[0]/255*r[3],r[1]/255*r[3],r[2]/255*r[3],r[3]]}return o[e]}throw new Error("Invalid color "+e)}},{"../util/util":424,"./style_function":362,csscolorparser:101}],360:[function(t,e,r){"use strict";function n(t,e,r){this.animationLoop=e||new m,this.dispatcher=new p(r||1,this),this.spriteAtlas=new l(1024,1024),this.lineAtlas=new u(256,512),this._layers={},this._order=[],this._groups=[],this.sources={},this.zoomHistory={},c.bindAll(["_forwardSourceEvent","_forwardTileEvent","_forwardLayerEvent","_redoPlacement"],this),this._resetUpdates();var n=function(t,e){if(t)return void this.fire("error",{error:t});if(!g.emitErrors(this,g(e))){this._loaded=!0,this.stylesheet=e,this.updateClasses();var r=e.sources;for(var n in r)this.addSource(n,r[n]);e.sprite&&(this.sprite=new o(e.sprite),this.sprite.on("load",this.fire.bind(this,"change"))),this.glyphSource=new s(e.glyphs),this._resolve(),this.fire("load")}}.bind(this);"string"==typeof t?h.getJSON(f(t),n):d.frame(n.bind(this,null,t)),this.on("source.load",function(t){var e=t.source;if(e&&e.vectorLayerIds)for(var r in this._layers){var n=this._layers[r];n.source===e.id&&this._validateLayer(n)}})}var i=t("../util/evented"),a=t("./style_layer"),o=t("./image_sprite"),s=t("../symbol/glyph_source"),l=t("../symbol/sprite_atlas"),u=t("../render/line_atlas"),c=t("../util/util"),h=t("../util/ajax"),f=t("../util/mapbox").normalizeStyleURL,d=t("../util/browser"),p=t("../util/dispatcher"),m=t("./animation_loop"),g=t("./validate_style"),v=t("../source/source"),y=t("../source/query_features"),b=t("../source/source_cache"),x=t("./style_spec"),_=t("./style_function");e.exports=n,n.prototype=c.inherit(i,{_loaded:!1,_validateLayer:function(t){var e=this.sources[t.source];t.sourceLayer&&e&&e.vectorLayerIds&&e.vectorLayerIds.indexOf(t.sourceLayer)===-1&&this.fire("error",{error:new Error('Source layer "'+t.sourceLayer+'" does not exist on source "'+e.id+'" as specified by style layer "'+t.id+'"')})},loaded:function(){if(!this._loaded)return!1;if(Object.keys(this._updates.sources).length)return!1;for(var t in this.sources)if(!this.sources[t].loaded())return!1;return!(this.sprite&&!this.sprite.loaded())},_resolve:function(){var t,e;this._layers={},this._order=this.stylesheet.layers.map(function(t){return t.id});for(var r=0;rMath.floor(t)&&(e.lastIntegerZoom=Math.floor(t+1),e.lastIntegerZoomTime=Date.now()),e.lastZoom=t},_checkLoaded:function(){if(!this._loaded)throw new Error("Style is not done loading")},update:function(t,e){if(!this._updates.changed)return this;if(this._updates.allLayers)this._groupLayers(),this._updateWorkerLayers();else{var r=Object.keys(this._updates.layers);r.length&&this._updateWorkerLayers(r)}var n,i=Object.keys(this._updates.sources);for(n=0;n=0&&this._handleErrors(g.source,"sources."+t,e)?this:(e=new b(t,e,this.dispatcher),this.sources[t]=e,e.style=this,e.on("load",this._forwardSourceEvent).on("error",this._forwardSourceEvent).on("change",this._forwardSourceEvent).on("tile.add",this._forwardTileEvent).on("tile.load",this._forwardTileEvent).on("tile.error",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this._updates.events.push(["source.add",{source:e}]),this._updates.changed=!0,this)},removeSource:function(t){if(this._checkLoaded(),void 0===this.sources[t])throw new Error("There is no source with this ID");var e=this.sources[t];return delete this.sources[t],delete this._updates.sources[t],e.off("load",this._forwardSourceEvent).off("error",this._forwardSourceEvent).off("change",this._forwardSourceEvent).off("tile.add",this._forwardTileEvent).off("tile.load",this._forwardTileEvent).off("tile.error",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent),this._updates.events.push(["source.remove",{source:e}]),this._updates.changed=!0,this},getSource:function(t){return this.sources[t]&&this.sources[t].getSource()},addLayer:function(t,e){if(this._checkLoaded(),!(t instanceof a)){if(this._handleErrors(g.layer,"layers."+t.id,t,!1,{arrayIndex:-1}))return this;var r=t.ref&&this.getLayer(t.ref);t=a.create(t,r)}return this._validateLayer(t),t.on("error",this._forwardLayerEvent),this._layers[t.id]=t,this._order.splice(e?this._order.indexOf(e):1/0,0,t.id),this._updates.allLayers=!0,t.source&&(this._updates.sources[t.source]=!0),this._updates.events.push(["layer.add",{layer:t}]),this.updateClasses(t.id)},removeLayer:function(t){this._checkLoaded();var e=this._layers[t];if(void 0===e)throw new Error("There is no layer with this ID");for(var r in this._layers)this._layers[r].ref===t&&this.removeLayer(r);return e.off("error",this._forwardLayerEvent),delete this._layers[t],delete this._updates.layers[t],delete this._updates.paintProps[t],this._order.splice(this._order.indexOf(t),1),this._updates.allLayers=!0,this._updates.events.push(["layer.remove",{layer:e}]),this._updates.changed=!0,this},getLayer:function(t){return this._layers[t]},getReferentLayer:function(t){var e=this.getLayer(t);return e.ref&&(e=this.getLayer(e.ref)),e},setLayerZoomRange:function(t,e,r){this._checkLoaded();var n=this.getReferentLayer(t);return n.minzoom===e&&n.maxzoom===r?this:(null!=e&&(n.minzoom=e),null!=r&&(n.maxzoom=r),this._updateLayer(n))},setFilter:function(t,e){this._checkLoaded();var r=this.getReferentLayer(t);return null!==e&&this._handleErrors(g.filter,"layers."+r.id+".filter",e)?this:c.deepEqual(r.filter,e)?this:(r.filter=c.clone(e),this._updateLayer(r))},getFilter:function(t){return this.getReferentLayer(t).filter},setLayoutProperty:function(t,e,r){this._checkLoaded();var n=this.getReferentLayer(t);return c.deepEqual(n.getLayoutProperty(e),r)?this:(n.setLayoutProperty(e,r),this._updateLayer(n))},getLayoutProperty:function(t,e){return this.getReferentLayer(t).getLayoutProperty(e)},setPaintProperty:function(t,e,r,n){this._checkLoaded();var i=this.getLayer(t);if(c.deepEqual(i.getPaintProperty(e,n),r))return this;var a=i.isPaintValueFeatureConstant(e);return i.setPaintProperty(e,r,n),!(r&&_.isFunctionDefinition(r)&&"$zoom"!==r.property&&void 0!==r.property)&&a||(this._updates.layers[t]=!0,i.source&&(this._updates.sources[i.source]=!0)),this.updateClasses(t,e)},getPaintProperty:function(t,e,r){return this.getLayer(t).getPaintProperty(e,r)},updateClasses:function(t,e){if(this._updates.changed=!0,t){var r=this._updates.paintProps;r[t]||(r[t]={}),r[t][e||"all"]=!0}else this._updates.allPaintProps=!0;return this},serialize:function(){return c.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:c.mapObject(this.sources,function(t){return t.serialize()}),layers:this._order.map(function(t){return this._layers[t].serialize()},this)},function(t){return void 0!==t})},_updateLayer:function(t){return this._updates.layers[t.id]=!0,t.source&&(this._updates.sources[t.source]=!0),this._updates.changed=!0,this},_flattenRenderedFeatures:function(t){for(var e=[],r=this._order.length-1;r>=0;r--)for(var n=this._order[r],i=0;is.lastIntegerZoom?(n=u+(1-u)*c,h*=2,i=t({zoom:o-1},r),a=t({zoom:o},r)):(n=1-(1-c)*u,a=t({zoom:o},r),i=t({zoom:o+1},r),h/=2),void 0===i||void 0===a?void 0:{from:i,fromScale:h,to:a,toScale:1,t:n}}}var a=t("./style_function"),o=t("./parse_color"),s=t("../util/util");e.exports=n},{"../util/util":424,"./parse_color":359,"./style_function":362}],362:[function(t,e,r){"use strict";var n=t("mapbox-gl-function");r.interpolated=function(t){var e=n.interpolated(t),r=function(t,r){return e(t&&t.zoom,r||{})};return r.isFeatureConstant=e.isFeatureConstant,r.isZoomConstant=e.isZoomConstant,r},r["piecewise-constant"]=function(t){var e=n["piecewise-constant"](t),r=function(t,r){return e(t&&t.zoom,r||{})};return r.isFeatureConstant=e.isFeatureConstant,r.isZoomConstant=e.isZoomConstant,r},r.isFunctionDefinition=n.isFunctionDefinition},{"mapbox-gl-function":284}],363:[function(t,e,r){"use strict";function n(t,e){this.set(t,e)}function i(t){return t.value}var a=t("../util/util"),o=t("./style_transition"),s=t("./style_declaration"),l=t("./style_spec"),u=t("./validate_style"),c=t("./parse_color"),h=t("../util/evented");e.exports=n;n.create=function(e,r){return new({background:t("./style_layer/background_style_layer"),circle:t("./style_layer/circle_style_layer"),fill:t("./style_layer/fill_style_layer"),line:t("./style_layer/line_style_layer"),raster:t("./style_layer/raster_style_layer"),symbol:t("./style_layer/symbol_style_layer")}[(r||e).type])(e,r)},n.prototype=a.inherit(h,{set:function(t,e){this.id=t.id,this.ref=t.ref,this.metadata=t.metadata,this.type=(e||t).type,this.source=(e||t).source,this.sourceLayer=(e||t)["source-layer"],this.minzoom=(e||t).minzoom,this.maxzoom=(e||t).maxzoom,this.filter=(e||t).filter,this.paint={},this.layout={},this._paintSpecifications=l["paint_"+this.type],this._layoutSpecifications=l["layout_"+this.type],this._paintTransitions={},this._paintTransitionOptions={},this._paintDeclarations={},this._layoutDeclarations={},this._layoutFunctions={};var r,n;for(var i in t){var a=i.match(/^paint(?:\.(.*))?$/);if(a){var o=a[1]||"";for(r in t[i])this.setPaintProperty(r,t[i][r],o)}}if(this.ref)this._layoutDeclarations=e._layoutDeclarations;else for(n in t.layout)this.setLayoutProperty(n,t.layout[n]);for(r in this._paintSpecifications)this.paint[r]=this.getPaintValue(r);for(n in this._layoutSpecifications)this._updateLayoutValue(n)},setLayoutProperty:function(t,e){if(null==e)delete this._layoutDeclarations[t];else{var r="layers."+this.id+".layout."+t;if(this._handleErrors(u.layoutProperty,r,t,e))return;this._layoutDeclarations[t]=new s(this._layoutSpecifications[t],e)}this._updateLayoutValue(t)},getLayoutProperty:function(t){return this._layoutDeclarations[t]&&this._layoutDeclarations[t].value},getLayoutValue:function(t,e,r){var n=this._layoutSpecifications[t],i=this._layoutDeclarations[t];return i?i.calculate(e,r):n.default},setPaintProperty:function(t,e,r){var n="layers."+this.id+(r?'["paint.'+r+'"].':".paint.")+t;if(a.endsWith(t,"-transition"))if(this._paintTransitionOptions[r||""]||(this._paintTransitionOptions[r||""]={}),null===e||void 0===e)delete this._paintTransitionOptions[r||""][t];else{if(this._handleErrors(u.paintProperty,n,t,e))return;this._paintTransitionOptions[r||""][t]=e}else if(this._paintDeclarations[r||""]||(this._paintDeclarations[r||""]={}),null===e||void 0===e)delete this._paintDeclarations[r||""][t];else{if(this._handleErrors(u.paintProperty,n,t,e))return;this._paintDeclarations[r||""][t]=new s(this._paintSpecifications[t],e)}},getPaintProperty:function(t,e){return e=e||"",a.endsWith(t,"-transition")?this._paintTransitionOptions[e]&&this._paintTransitionOptions[e][t]:this._paintDeclarations[e]&&this._paintDeclarations[e][t]&&this._paintDeclarations[e][t].value},getPaintValue:function(t,e,r){var n=this._paintSpecifications[t],i=this._paintTransitions[t];return i?i.calculate(e,r):"color"===n.type&&n.default?c(n.default):n.default},getPaintValueStopZoomLevels:function(t){var e=this._paintTransitions[t];return e?e.declaration.stopZoomLevels:[]},getPaintInterpolationT:function(t,e){return this._paintTransitions[t].declaration.calculateInterpolationT({zoom:e})},isPaintValueFeatureConstant:function(t){var e=this._paintTransitions[t];return!e||e.declaration.isFeatureConstant},isLayoutValueFeatureConstant:function(t){var e=this._layoutDeclarations[t];return!e||e.isFeatureConstant},isPaintValueZoomConstant:function(t){var e=this._paintTransitions[t];return!e||e.declaration.isZoomConstant},isHidden:function(t){return!!(this.minzoom&&t=this.maxzoom)||("none"===this.layout.visibility||0===this.paint[this.type+"-opacity"]))},updatePaintTransitions:function(t,e,r,n){for(var i=a.extend({},this._paintDeclarations[""]),o=0;o-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],u=0;sn;)u-=l.shift().angleDelta;if(u>i)return!1;o++,s+=h.dist(f)}return!0}e.exports=n},{}],375:[function(t,e,r){"use strict";function n(t,e,r,n,a){for(var o=[],s=0;s=n&&f.x>=n||(h.x>=n?h=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round():f.x>=n&&(f=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round()),h.y>=a&&f.y>=a||(h.y>=a?h=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round():f.y>=a&&(f=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round()),l&&h.equals(l[l.length-1])||(l=[h],o.push(l)),l.push(f)))))}return o}var i=t("point-geometry");e.exports=n},{"point-geometry":465}],376:[function(t,e,r){ +"use strict";var n=t("../util/struct_array"),i=t("../util/util"),a=t("point-geometry"),o=e.exports=new n({members:[{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Float32",name:"maxScale"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"bbox0"},{type:"Int16",name:"bbox1"},{type:"Int16",name:"bbox2"},{type:"Int16",name:"bbox3"},{type:"Float32",name:"placementScale"}]});i.extendAll(o.prototype.StructType.prototype,{get anchorPoint(){return new a(this.anchorPointX,this.anchorPointY)}})},{"../util/struct_array":422,"../util/util":424,"point-geometry":465}],377:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l,u,c){var h=o.top*s-l,f=o.bottom*s+l,d=o.left*s-l,p=o.right*s+l;if(this.boxStartIndex=t.length,u){var m=f-h,g=p-d;if(m>0)if(m=Math.max(10*s,m),c){var v=e[r.segment+1].sub(e[r.segment])._unit()._mult(g),y=[r.sub(v),r.add(v)];this._addLineCollisionBoxes(t,y,r,0,g,m,n,i,a)}else this._addLineCollisionBoxes(t,e,r,r.segment,g,m,n,i,a)}else t.emplaceBack(r.x,r.y,d,h,p,f,1/0,n,i,a,0,0,0,0,0);this.boxEndIndex=t.length}e.exports=n,n.prototype._addLineCollisionBoxes=function(t,e,r,n,i,a,o,s,l){var u=a/2,c=Math.floor(i/u),h=-a/2,f=this.boxes,d=r,p=n+1,m=h;do{if(--p<0)return f;m-=e[p].dist(d),d=e[p]}while(m>-i/2);for(var g=e[p].dist(e[p+1]),v=0;v=e.length)return f;g=e[p].dist(e[p+1])}var b=y-m,x=e[p],_=e[p+1],w=_.sub(x)._unit()._mult(b)._add(x)._round(),M=Math.max(Math.abs(y-h)-u/2,0),k=i/2/M;t.emplaceBack(w.x,w.y,-a/2,-a/2,a/2,a/2,k,o,s,l,0,0,0,0,0)}return f}},{}],378:[function(t,e,r){"use strict";function n(t,e,r){if("object"==typeof t){var n=t;r=e,t=n.angle,e=n.pitch,this.grid=new o(n.grid),this.ignoredGrid=new o(n.ignoredGrid)}else this.grid=new o(a,12,6),this.ignoredGrid=new o(a,12,0);this.angle=t,this.pitch=e;var i=Math.sin(t),s=Math.cos(t);if(this.rotationMatrix=[s,-i,i,s],this.reverseRotationMatrix=[s,i,-i,s],this.yStretch=1/Math.cos(e/180*Math.PI),this.yStretch=Math.pow(this.yStretch,1.3),this.collisionBoxArray=r,0===r.length){r.emplaceBack();r.emplaceBack(0,0,0,-32767,0,32767,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(a,0,0,-32767,0,32767,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(0,0,-32767,0,32767,0,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(0,a,-32767,0,32767,0,32767,0,0,0,0,0,0,0,0,0)}this.tempCollisionBox=r.get(0),this.edges=[r.get(1),r.get(2),r.get(3),r.get(4)]}var i=t("point-geometry"),a=t("../data/bucket").EXTENT,o=t("grid-index");e.exports=n,n.prototype.serialize=function(){var t={angle:this.angle,pitch:this.pitch,grid:this.grid.toArrayBuffer(),ignoredGrid:this.ignoredGrid.toArrayBuffer()};return{data:t,transferables:[t.grid,t.ignoredGrid]}},n.prototype.minScale=.25,n.prototype.maxScale=2,n.prototype.placeCollisionFeature=function(t,e,r){for(var n=this.collisionBoxArray,a=this.minScale,o=this.rotationMatrix,s=this.yStretch,l=t.boxStartIndex;l=this.maxScale)return a}if(r){var _;if(this.angle){var w=this.reverseRotationMatrix,M=new i(u.x1,u.y1).matMult(w),k=new i(u.x2,u.y1).matMult(w),A=new i(u.x1,u.y2).matMult(w),T=new i(u.x2,u.y2).matMult(w);_=this.tempCollisionBox,_.anchorPointX=u.anchorPoint.x,_.anchorPointY=u.anchorPoint.y,_.x1=Math.min(M.x,k.x,A.x,T.x),_.y1=Math.min(M.y,k.x,A.x,T.x),_.x2=Math.max(M.x,k.x,A.x,T.x),_.y2=Math.max(M.y,k.x,A.x,T.x),_.maxScale=u.maxScale}else _=u;for(var S=0;S=this.maxScale)return a}}}return a},n.prototype.queryRenderedSymbols=function(t,e,r,n,a){var o={},s=[],l=this.collisionBoxArray,u=this.rotationMatrix,c=new i(t,e)._matMult(u),h=this.tempCollisionBox;h.anchorX=c.x,h.anchorY=c.y,h.x1=0,h.y1=0,h.x2=r-t,h.y2=n-e,h.maxScale=a,a=h.maxScale;for(var f=[c.x+h.x1/a,c.y+h.y1/a*this.yStretch,c.x+h.x2/a,c.y+h.y2/a*this.yStretch],d=this.grid.query(f[0],f[1],f[2],f[3]),p=this.ignoredGrid.query(f[0],f[1],f[2],f[3]),m=0;m=a&&(o[y][b]=!0,s.push(d[g]))}}return s},n.prototype.getPlacementScale=function(t,e,r,n,i){var a=e.x-n.x,o=e.y-n.y,s=(i.x1-r.x2)/a,l=(i.x2-r.x1)/a,u=(i.y1-r.y2)*this.yStretch/o,c=(i.y2-r.y1)*this.yStretch/o;(isNaN(s)||isNaN(l))&&(s=l=1),(isNaN(u)||isNaN(c))&&(u=c=1);var h=Math.min(Math.max(s,l),Math.max(u,c)),f=i.maxScale,d=r.maxScale;return h>f&&(h=f),h>d&&(h=d),h>t&&h>=i.placementScale&&(t=h),t},n.prototype.insertCollisionFeature=function(t,e,r){for(var n=r?this.ignoredGrid:this.grid,i=this.collisionBoxArray,a=t.boxStartIndex;a=0&&A=0&&T=0&&v+d<=p){var S=new o(A,T,M,b)._round();n&&!s(t,S,u,n,l)||y.push(S)}}g+=w}return h||y.length||c||(y=i(t,g/2,r,n,l,u,c,!0,f)),y}var a=t("../util/interpolate"),o=t("../symbol/anchor"),s=t("./check_max_angle");e.exports=n},{"../symbol/anchor":373,"../util/interpolate":418,"./check_max_angle":374}],380:[function(t,e,r){"use strict";function n(){this.width=o,this.height=o,this.bin=new i(this.width,this.height),this.index={},this.ids={},this.data=new Uint8Array(this.width*this.height)}var i=t("shelf-pack"),a=t("../util/util"),o=128;e.exports=n,n.prototype.getGlyphs=function(){var t,e,r,n={};for(var i in this.ids)t=i.split("#"),e=t[0],r=t[1],n[e]||(n[e]=[]),n[e].push(r);return n},n.prototype.getRects=function(){var t,e,r,n={};for(var i in this.ids)t=i.split("#"),e=t[0],r=t[1],n[e]||(n[e]={}),n[e][r]=this.index[i];return n},n.prototype.addGlyph=function(t,e,r,n){if(!r)return null;var i=e+"#"+r.id;if(this.index[i])return this.ids[i].indexOf(t)<0&&this.ids[i].push(t),this.index[i];if(!r.bitmap)return null;var o=r.width+2*n,s=r.height+2*n,l=o+2,u=s+2;l+=4-l%4,u+=4-u%4;var c=this.bin.packOne(l,u);if(c||(this.resize(),c=this.bin.packOne(l,u)),!c)return a.warnOnce("glyph bitmap overflow"),null;this.index[i]=c,this.ids[i]=[t];for(var h=this.data,f=r.bitmap,d=0;d=2048||e>=2048)){this.texture&&(this.gl&&this.gl.deleteTexture(this.texture),this.texture=null),this.width*=4,this.height*=4,this.bin.resize(this.width,this.height);for(var r=new ArrayBuffer(this.width*this.height),n=0;n65535)return r("glyphs > 65535 not supported");void 0===this.loading[t]&&(this.loading[t]={});var n=this.loading[t];if(n[e])n[e].push(r);else{n[e]=[r];var i=256*e+"-"+(256*e+255),o=a(t,i,this.url);s(o,function(t,r){for(var i=!t&&new l(new c(new Uint8Array(r))),a=0;an&&null!==c){var x=v[c+1].x;g=Math.max(x,g);for(var _=c+1;_<=y;_++)v[_].y+=r,v[_].x-=x;if(o){var w=c;h[v[c].codePoint]&&w--,s(v,e,p,w,o)}p=c+1,c=null,d+=x,m++}f[b.codePoint]&&(c=y)}var M=v[v.length-1],k=M.x+e[M.codePoint].advance;g=Math.max(g,k);var A=(m+1)*r;s(v,e,p,v.length-1,o),l(v,o,i,a,g,r,m,u),t.top+=-a*A,t.bottom=t.top+A,t.left+=-i*g,t.right=t.left+g}function s(t,e,r,n,i){for(var a=e[t[n].codePoint].advance,o=(t[n].x+a)*i,s=r;s<=n;s++)t[s].x-=o}function l(t,e,r,n,i,a,o,s){for(var l=(e-r)*i+s[0],u=(-n*(o+1)+.5)*a+s[1],c=0;c1?2:1,this.canvas&&(this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio)),this.sprite=t},n.prototype.addIcons=function(t,e){for(var r=0;r1||(w?(clearTimeout(w),w=null,v("dblclick",e)):w=setTimeout(d,300))}function c(t){y("touchmove",t)}function h(t){y("touchend",t)}function f(t){y("touchcancel",t)}function d(){w=null}function p(t){n.mousePos(b,t).equals(_)&&v("click",t)}function m(t){v("dblclick",t),t.preventDefault()}function g(t){x=t,t.preventDefault()}function v(e,r){var i=n.mousePos(b,r);return t.fire(e,{lngLat:t.unproject(i),point:i,originalEvent:r})}function y(e,r){var a=n.touchPos(b,r),o=a.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new i(0,0));return t.fire(e,{lngLat:t.unproject(o),point:o,lngLats:a.map(function(e){return t.unproject(e)},this),points:a,originalEvent:r})}var b=t.getCanvasContainer(),x=null,_=null,w=null;for(var M in a)t[M]=new a[M](t,e),e.interactive&&e[M]&&t[M].enable();b.addEventListener("mouseout",r,!1),b.addEventListener("mousedown",o,!1),b.addEventListener("mouseup",s,!1),b.addEventListener("mousemove",l,!1),b.addEventListener("touchstart",u,!1),b.addEventListener("touchend",h,!1),b.addEventListener("touchmove",c,!1),b.addEventListener("touchcancel",f,!1),b.addEventListener("click",p,!1),b.addEventListener("dblclick",m,!1),b.addEventListener("contextmenu",g,!1)}},{"../util/dom":410,"./handler/box_zoom":395,"./handler/dblclick_zoom":396,"./handler/drag_pan":397,"./handler/drag_rotate":398,"./handler/keyboard":399,"./handler/scroll_zoom":400,"./handler/touch_zoom_rotate":401,"point-geometry":465}],390:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("../util/interpolate"),a=t("../util/browser"),o=t("../geo/lng_lat"),s=t("../geo/lng_lat_bounds"),l=t("point-geometry"),u=e.exports=function(){};n.extend(u.prototype,{getCenter:function(){return this.transform.center},setCenter:function(t,e){return this.jumpTo({center:t},e),this},panBy:function(t,e,r){return this.panTo(this.transform.center,n.extend({offset:l.convert(t).mult(-1)},e),r),this},panTo:function(t,e,r){return this.easeTo(n.extend({center:t},e),r)},getZoom:function(){return this.transform.zoom},setZoom:function(t,e){return this.jumpTo({zoom:t},e),this},zoomTo:function(t,e,r){return this.easeTo(n.extend({zoom:t},e),r)},zoomIn:function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},zoomOut:function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},getBearing:function(){return this.transform.bearing},setBearing:function(t,e){return this.jumpTo({bearing:t},e),this},rotateTo:function(t,e,r){return this.easeTo(n.extend({bearing:t},e),r)},resetNorth:function(t,e){return this.rotateTo(0,n.extend({duration:1e3},t),e),this},snapToNorth:function(t,e){return Math.abs(this.getBearing())180&&(c.center.lng>0&&m.lng<0?m.lng+=360:c.center.lng<0&&m.lng>0&&(m.lng-=360));var b=c.zoomScale(g-f),x=c.point,_="center"in t?c.project(m).sub(h.div(b)):x,w=c.worldSize,M=t.curve,k=Math.max(c.width,c.height),A=k/b,T=_.sub(x).mag();if("minZoom"in t){var S=n.clamp(Math.min(t.minZoom,f,g),c.minZoom,c.maxZoom),E=k/c.zoomScale(S-f);M=Math.sqrt(E/T*2)}var L=M*M,C=r(0),z=function(t){return s(C)/s(C+M*t)},D=function(t){return k*((s(C)*u(C+M*t)-a(C))/L)/T},I=(r(1)-C)/M;if(Math.abs(T)<1e-6){if(Math.abs(k-A)<1e-6)return this.easeTo(t);var P=A=0)return!1;return!0}),e.join(" | ")},n.prototype=o.inherit(i,{options:{position:"bottom-right"},onAdd:function(t){var e=this._container=a.create("div","mapboxgl-ctrl-attrib",t.getContainer());return this._update(),t.on("source.load",this._update.bind(this)),t.on("source.change",this._update.bind(this)),t.on("source.remove",this._update.bind(this)),t.on("moveend",this._updateEditLink.bind(this)),e},_update:function(){this._map.style&&(this._container.innerHTML=n.createAttributionString(this._map.style.sources)),this._editLink=this._container.getElementsByClassName("mapbox-improve-map")[0],this._updateEditLink()},_updateEditLink:function(){if(this._editLink){var t=this._map.getCenter();this._editLink.href="https://www.mapbox.com/map-feedback/#/"+t.lng+"/"+t.lat+"/"+Math.round(this._map.getZoom()+1)}}})},{"../../util/dom":410,"../../util/util":424,"./control":392}],392:[function(t,e,r){"use strict";function n(){}var i=t("../../util/util"),a=t("../../util/evented");e.exports=n,n.prototype={addTo:function(t){this._map=t;var e=this._container=this.onAdd(t);if(this.options&&this.options.position){var r=this.options.position,n=t._controlCorners[r];e.className+=" mapboxgl-ctrl",r.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e)}return this},remove:function(){return this._container.parentNode.removeChild(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this}},i.extend(n.prototype,a)},{"../../util/evented":416,"../../util/util":424}],393:[function(t,e,r){"use strict";function n(t){s.setOptions(this,t)}var i=t("./control"),a=t("../../util/browser"),o=t("../../util/dom"),s=t("../../util/util");e.exports=n;var l={enableHighAccuracy:!1,timeout:6e3};n.prototype=s.inherit(i,{options:{position:"top-right"},onAdd:function(t){var e=this._container=o.create("div","mapboxgl-ctrl-group",t.getContainer());return a.supportsGeolocation?(this._container.addEventListener("contextmenu",this._onContextMenu.bind(this)),this._geolocateButton=o.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.addEventListener("click",this._onClickGeolocate.bind(this)),e):e},_onContextMenu:function(t){t.preventDefault()},_onClickGeolocate:function(){navigator.geolocation.getCurrentPosition(this._success.bind(this),this._error.bind(this),l),this._timeoutId=setTimeout(this._finish.bind(this),1e4)},_success:function(t){this._map.jumpTo({center:[t.coords.longitude,t.coords.latitude],zoom:17,bearing:0,pitch:0}), +this.fire("geolocate",t),this._finish()},_error:function(t){this.fire("error",t),this._finish()},_finish:function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}})},{"../../util/browser":408,"../../util/dom":410,"../../util/util":424,"./control":392}],394:[function(t,e,r){"use strict";function n(t){s.setOptions(this,t)}function i(t){return new MouseEvent(t.type,{button:2,buttons:2,bubbles:!0,cancelable:!0,detail:t.detail,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,movementX:t.movementX,movementY:t.movementY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey})}var a=t("./control"),o=t("../../util/dom"),s=t("../../util/util");e.exports=n,n.prototype=s.inherit(a,{options:{position:"top-right"},onAdd:function(t){var e="mapboxgl-ctrl",r=this._container=o.create("div",e+"-group",t.getContainer());return this._container.addEventListener("contextmenu",this._onContextMenu.bind(this)),this._zoomInButton=this._createButton(e+"-icon "+e+"-zoom-in",t.zoomIn.bind(t)),this._zoomOutButton=this._createButton(e+"-icon "+e+"-zoom-out",t.zoomOut.bind(t)),this._compass=this._createButton(e+"-icon "+e+"-compass",t.resetNorth.bind(t)),this._compassArrow=o.create("div","arrow",this._compass),this._compass.addEventListener("mousedown",this._onCompassDown.bind(this)),this._onCompassMove=this._onCompassMove.bind(this),this._onCompassUp=this._onCompassUp.bind(this),t.on("rotate",this._rotateCompassArrow.bind(this)),this._rotateCompassArrow(),this._el=t.getCanvasContainer(),r},_onContextMenu:function(t){t.preventDefault()},_onCompassDown:function(t){0===t.button&&(o.disableDrag(),document.addEventListener("mousemove",this._onCompassMove),document.addEventListener("mouseup",this._onCompassUp),this._el.dispatchEvent(i(t)),t.stopPropagation())},_onCompassMove:function(t){0===t.button&&(this._el.dispatchEvent(i(t)),t.stopPropagation())},_onCompassUp:function(t){0===t.button&&(document.removeEventListener("mousemove",this._onCompassMove),document.removeEventListener("mouseup",this._onCompassUp),o.enableDrag(),this._el.dispatchEvent(i(t)),t.stopPropagation())},_createButton:function(t,e){var r=o.create("button",t,this._container);return r.type="button",r.addEventListener("click",function(){e()}),r},_rotateCompassArrow:function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t}})},{"../../util/dom":410,"../../util/util":424,"./control":392}],395:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),o.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../geo/lng_lat_bounds"),o=t("../../util/util");e.exports=n,n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onMouseDown,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onMouseDown),this._enabled=!1)},_onMouseDown:function(t){t.shiftKey&&0===t.button&&(document.addEventListener("mousemove",this._onMouseMove,!1),document.addEventListener("keydown",this._onKeyDown,!1),document.addEventListener("mouseup",this._onMouseUp,!1),i.disableDrag(),this._startPos=i.mousePos(this._el,t),this._active=!0)},_onMouseMove:function(t){var e=this._startPos,r=i.mousePos(this._el,t);this._box||(this._box=i.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var n=Math.min(e.x,r.x),a=Math.max(e.x,r.x),o=Math.min(e.y,r.y),s=Math.max(e.y,r.y);i.setTransform(this._box,"translate("+n+"px,"+o+"px)"),this._box.style.width=a-n+"px",this._box.style.height=s-o+"px"},_onMouseUp:function(t){if(0===t.button){var e=this._startPos,r=i.mousePos(this._el,t),n=new a(this._map.unproject(e),this._map.unproject(r));this._finish(),e.x===r.x&&e.y===r.y?this._fireEvent("boxzoomcancel",t):this._map.fitBounds(n,{linear:!0}).fire("boxzoomend",{originalEvent:t,boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},_finish:function(){this._active=!1,document.removeEventListener("mousemove",this._onMouseMove,!1),document.removeEventListener("keydown",this._onKeyDown,!1),document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.parentNode.removeChild(this._box),this._box=null),i.enableDrag()},_fireEvent:function(t,e){return this._map.fire(t,{originalEvent:e})}}},{"../../geo/lng_lat_bounds":322,"../../util/dom":410,"../../util/util":424}],396:[function(t,e,r){"use strict";function n(t){this._map=t,this._onDblClick=this._onDblClick.bind(this)}e.exports=n,n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._map.on("dblclick",this._onDblClick),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._map.off("dblclick",this._onDblClick),this._enabled=!1)},_onDblClick:function(t){this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)}}},{}],397:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),a.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/util");e.exports=n;var o=a.bezier(0,0,.3,1);n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._el.addEventListener("touchstart",this._onDown),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._el.removeEventListener("touchstart",this._onDown),this._enabled=!1)},_onDown:function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(document.addEventListener("touchmove",this._onMove),document.addEventListener("touchend",this._onTouchEnd)):(document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onMouseUp)),this._active=!1,this._startPos=this._pos=i.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},_onMove:function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._fireEvent("dragstart",t),this._fireEvent("movestart",t));var e=i.mousePos(this._el,t),r=this._map;r.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),r.transform.setLocationAtPoint(r.transform.pointLocation(this._pos),e),this._fireEvent("drag",t),this._fireEvent("move",t),this._pos=e,t.preventDefault()}},_onUp:function(t){if(this.isActive()){this._active=!1,this._fireEvent("dragend",t),this._drainInertiaBuffer();var e=function(){this._fireEvent("moveend",t)}.bind(this),r=this._inertia;if(r.length<2)return void e();var n=r[r.length-1],i=r[0],a=n[1].sub(i[1]),s=(n[0]-i[0])/1e3;if(0===s||n[1].equals(i[1]))return void e();var l=a.mult(.3/s),u=l.mag();u>1400&&(u=1400,l._unit()._mult(u));var c=u/750,h=l.mult(-c/2);this._map.panBy(h,{duration:1e3*c,easing:o,noMoveStart:!0},{originalEvent:t})}},_onMouseUp:function(t){this._ignoreEvent(t)||(this._onUp(t),document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onMouseUp))},_onTouchEnd:function(t){this._ignoreEvent(t)||(this._onUp(t),document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onTouchEnd))},_fireEvent:function(t,e){return this._map.fire(t,{originalEvent:e})},_ignoreEvent:function(t){var e=this._map;if(e.boxZoom&&e.boxZoom.isActive())return!0;if(e.dragRotate&&e.dragRotate.isActive())return!0;if(t.touches)return t.touches.length>1;if(t.ctrlKey)return!0;return"mousemove"===t.type?t.buttons&!1:0!==t.button},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":410,"../../util/util":424}],398:[function(t,e,r){"use strict";function n(t,e){this._map=t,this._el=t.getCanvasContainer(),this._bearingSnap=e.bearingSnap,o.bindHandlers(this)}var i=t("../../util/dom"),a=t("point-geometry"),o=t("../../util/util");e.exports=n;var s=o.bezier(0,0,.25,1);n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._enabled=!1)},_onDown:function(t){if(!this._ignoreEvent(t)&&!this.isActive()){document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=i.mousePos(this._el,t),this._center=this._map.transform.centerPoint;var e=this._startPos.sub(this._center);e.mag()<200&&(this._center=this._startPos.add(new a(-200,0)._rotate(e.angle()))),t.preventDefault()}},_onMove:function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._fireEvent("rotatestart",t),this._fireEvent("movestart",t));var e=this._map;e.stop();var r=this._pos,n=i.mousePos(this._el,t),a=this._center,o=r.sub(a).angleWith(n.sub(a))/Math.PI*180,s=e.getBearing()-o,l=this._inertia,u=l[l.length-1];this._drainInertiaBuffer(),l.push([Date.now(),e._normalizeBearing(s,u[1])]),e.transform.bearing=s,this._fireEvent("rotate",t),this._fireEvent("move",t),this._pos=n}},_onUp:function(t){if(!this._ignoreEvent(t)&&(document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onUp),this.isActive())){this._active=!1,this._fireEvent("rotateend",t),this._drainInertiaBuffer();var e=this._map,r=e.getBearing(),n=this._inertia,i=function(){Math.abs(r)180&&(d=180);var p=d/180;u+=h*d*(p/2),Math.abs(e._normalizeBearing(u,0))1;var r=t.ctrlKey?1:2,n=t.ctrlKey?0:2;return"mousemove"===t.type?t.buttons&0===r:t.button!==n},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":410,"../../util/util":424,"point-geometry":465}],399:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),this._onKeyDown=this._onKeyDown.bind(this)}e.exports=n;n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=this._map,r={originalEvent:t};if(!e.isEasing())switch(t.keyCode){case 61:case 107:case 171:case 187:e.zoomTo(Math.round(e.getZoom())+(t.shiftKey?2:1),r);break;case 189:case 109:case 173:e.zoomTo(Math.round(e.getZoom())-(t.shiftKey?2:1),r);break;case 37:t.shiftKey?e.easeTo({bearing:e.getBearing()-2},r):(t.preventDefault(),e.panBy([-80,0],r));break;case 39:t.shiftKey?e.easeTo({bearing:e.getBearing()+2},r):(t.preventDefault(),e.panBy([80,0],r));break;case 38:t.shiftKey?e.easeTo({pitch:e.getPitch()+5},r):(t.preventDefault(),e.panBy([0,-80],r));break;case 40:t.shiftKey?e.easeTo({pitch:Math.max(e.getPitch()-5,0)},r):(t.preventDefault(),e.panBy([0,80],r))}}}}},{}],400:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),o.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/browser"),o=t("../../util/util");e.exports=n;var s="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",l=s.indexOf("firefox")!==-1,u=s.indexOf("safari")!==-1&&s.indexOf("chrom")===-1;n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("wheel",this._onWheel,!1),this._el.addEventListener("mousewheel",this._onWheel,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("wheel",this._onWheel),this._el.removeEventListener("mousewheel",this._onWheel),this._enabled=!1)},_onWheel:function(t){var e;"wheel"===t.type?(e=t.deltaY,l&&t.deltaMode===window.WheelEvent.DOM_DELTA_PIXEL&&(e/=a.devicePixelRatio),t.deltaMode===window.WheelEvent.DOM_DELTA_LINE&&(e*=40)):"mousewheel"===t.type&&(e=-t.wheelDeltaY,u&&(e/=3));var r=a.now(),n=r-(this._time||0);this._pos=i.mousePos(this._el,t),this._time=r,0!==e&&e%4.000244140625==0?(this._type="wheel",e=Math.floor(e/4)):0!==e&&Math.abs(e)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=e,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(n*e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,e+=this._lastValue)),t.shiftKey&&e&&(e/=4),this._type&&this._zoom(-e,t),t.preventDefault()},_onTimeout:function(){this._type="wheel",this._zoom(-this._lastValue)},_zoom:function(t,e){if(0!==t){var r=this._map,n=2/(1+Math.exp(-Math.abs(t/100)));t<0&&0!==n&&(n=1/n);var i=r.ease?r.ease.to:r.transform.scale,a=r.transform.scaleZoom(i*n);r.zoomTo(a,{duration:0,around:r.unproject(this._pos),delayEndEvents:200},{originalEvent:e})}}}},{"../../util/browser":408,"../../util/dom":410,"../../util/util":424}],401:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),a.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/util");e.exports=n;var o=a.bezier(0,0,.15,1);n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("touchstart",this._onStart,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("touchstart",this._onStart),this._enabled=!1)},disableRotation:function(){this._rotationDisabled=!0},enableRotation:function(){this._rotationDisabled=!1},_onStart:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]);this._startVec=e.sub(r),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],document.addEventListener("touchmove",this._onMove,!1),document.addEventListener("touchend",this._onEnd,!1)}},_onMove:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]),n=e.add(r).div(2),a=e.sub(r),o=a.mag()/this._startVec.mag(),s=this._rotationDisabled?0:180*a.angleWith(this._startVec)/Math.PI,l=this._map;if(this._gestureIntent){var u={duration:0,around:l.unproject(n)};"rotate"===this._gestureIntent&&(u.bearing=this._startBearing+s),"zoom"!==this._gestureIntent&&"rotate"!==this._gestureIntent||(u.zoom=l.transform.scaleZoom(this._startScale*o)),l.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),o,n]),l.easeTo(u,{originalEvent:t})}else{var c=Math.abs(1-o)>.15;Math.abs(s)>4?this._gestureIntent="rotate":c&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._startVec=a,this._startScale=l.transform.scale,this._startBearing=l.transform.bearing)}t.preventDefault()}},_onEnd:function(t){document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,r=this._map;if(e.length<2)return void r.snapToNorth({},{originalEvent:t});var n=e[e.length-1],i=e[0],a=r.transform.scaleZoom(this._startScale*n[1]),s=r.transform.scaleZoom(this._startScale*i[1]),l=a-s,u=(n[0]-i[0])/1e3,c=n[2];if(0===u||a===s)return void r.snapToNorth({},{originalEvent:t});var h=.15*l/u;Math.abs(h)>2.5&&(h=h>0?2.5:-2.5);var f=1e3*Math.abs(h/(12*.15)),d=a+h*f/2e3;d<0&&(d=0),r.easeTo({zoom:d,duration:f,easing:o,around:r.unproject(c)},{originalEvent:t})},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>2&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":410,"../../util/util":424}],402:[function(t,e,r){"use strict";function n(){i.bindAll(["_onHashChange","_updateHash"],this)}e.exports=n;var i=t("../util/util");n.prototype={addTo:function(t){return this._map=t,window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},remove:function(){return window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),delete this._map,this},_onHashChange:function(){var t=location.hash.replace("#","").split("/");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0)}),!0)},_updateHash:function(){var t=this._map.getCenter(),e=this._map.getZoom(),r=this._map.getBearing(),n=Math.max(0,Math.ceil(Math.log(e)/Math.LN2)),i="#"+Math.round(100*e)/100+"/"+t.lat.toFixed(n)+"/"+t.lng.toFixed(n)+(r?"/"+Math.round(10*r)/10:"");window.history.replaceState("","",i)}}},{"../util/util":424}],403:[function(t,e,r){"use strict";function n(t){t.parentNode&&t.parentNode.removeChild(t)}var i=t("../util/canvas"),a=t("../util/util"),o=t("../util/browser"),s=t("../util/browser").window,l=t("../util/evented"),u=t("../util/dom"),c=t("../style/style"),h=t("../style/animation_loop"),f=t("../render/painter"),d=t("../geo/transform"),p=t("./hash"),m=t("./bind_handlers"),g=t("./camera"),v=t("../geo/lng_lat"),y=t("../geo/lng_lat_bounds"),b=t("point-geometry"),x=t("./control/attribution"),_={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:20,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,workerCount:Math.max(o.hardwareConcurrency-1,1)},w=e.exports=function(t){if(t=a.extend({},_,t),t.workerCount<1)throw new Error("workerCount must an integer greater than or equal to 1.");this._interactive=t.interactive,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._trackResize=t.trackResize,this._workerCount=t.workerCount,this._bearingSnap=t.bearingSnap,"string"==typeof t.container?this._container=document.getElementById(t.container):this._container=t.container,this.animationLoop=new h,this.transform=new d(t.minZoom,t.maxZoom),t.maxBounds&&this.setMaxBounds(t.maxBounds),a.bindAll(["_forwardStyleEvent","_forwardSourceEvent","_forwardLayerEvent","_forwardTileEvent","_onStyleLoad","_onStyleChange","_onSourceAdd","_onSourceRemove","_onSourceUpdate","_onWindowOnline","_onWindowResize","_update","_render"],this),this._setupContainer(),this._setupPainter(),this.on("move",this._update.bind(this,!1)),this.on("zoom",this._update.bind(this,!0)),this.on("moveend",function(){this.animationLoop.set(300),this._rerender()}.bind(this)),void 0!==s&&(s.addEventListener("online",this._onWindowOnline,!1),s.addEventListener("resize",this._onWindowResize,!1)),m(this,t),this._hash=t.hash&&(new p).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),this.stacks={},this._classes=[],this.resize(),t.classes&&this.setClasses(t.classes),t.style&&this.setStyle(t.style),t.attributionControl&&this.addControl(new x(t.attributionControl));var e=this.fire.bind(this,"error");this.on("style.error",e),this.on("source.error",e),this.on("tile.error",e),this.on("layer.error",e)};a.extend(w.prototype,l),a.extend(w.prototype,g.prototype),a.extend(w.prototype,{addControl:function(t){return t.addTo(this),this},addClass:function(t,e){return this._classes.indexOf(t)>=0||""===t?this:(this._classes.push(t),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},removeClass:function(t,e){var r=this._classes.indexOf(t);return r<0||""===t?this:(this._classes.splice(r,1),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},setClasses:function(t,e){for(var r={},n=0;n=0},getClasses:function(){return this._classes},resize:function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),this._canvas.resize(t,e),this.transform.resize(t,e),this.painter.resize(t,e),this.fire("movestart").fire("move").fire("resize").fire("moveend")},getBounds:function(){var t=new y(this.transform.pointLocation(new b(0,0)),this.transform.pointLocation(this.transform.size));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new b(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new b(0,this.transform.size.y)))),t},setMaxBounds:function(t){if(t){var e=y.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=[],this.transform.latRange=[],this._update());return this},setMinZoom:function(t){if((t=null===t||void 0===t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom&&t<=20)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be between the current minZoom and 20, inclusive")},project:function(t){return this.transform.locationPoint(v.convert(t))},unproject:function(t){return this.transform.pointLocation(b.convert(t))},queryRenderedFeatures:function(){var t,e={};return 2===arguments.length?(t=arguments[0],e=arguments[1]):1===arguments.length&&function(t){return t instanceof b||Array.isArray(t)}(arguments[0])?t=arguments[0]:1===arguments.length&&(e=arguments[0]),this.style.queryRenderedFeatures(this._makeQueryGeometry(t),e,this.transform.zoom,this.transform.angle)},_makeQueryGeometry:function(t){void 0===t&&(t=[b.convert([0,0]),b.convert([this.transform.width,this.transform.height])]);var e;if(t instanceof b||"number"==typeof t[0])e=[b.convert(t)];else{var r=[b.convert(t[0]),b.convert(t[1])];e=[r[0],new b(r[1].x,r[0].y),r[1],new b(r[0].x,r[1].y),r[0]]}return e=e.map(function(t){return this.transform.pointCoordinate(t)}.bind(this))},querySourceFeatures:function(t,e){return this.style.querySourceFeatures(t,e)},setStyle:function(t){return this.style&&(this.style.off("load",this._onStyleLoad).off("error",this._forwardStyleEvent).off("change",this._onStyleChange).off("source.add",this._onSourceAdd).off("source.remove",this._onSourceRemove).off("source.load",this._onSourceUpdate).off("source.error",this._forwardSourceEvent).off("source.change",this._onSourceUpdate).off("layer.add",this._forwardLayerEvent).off("layer.remove",this._forwardLayerEvent).off("layer.error",this._forwardLayerEvent).off("tile.add",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.load",this._update).off("tile.error",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent)._remove(),this.off("rotate",this.style._redoPlacement),this.off("pitch",this.style._redoPlacement)),t?(this.style=t instanceof c?t:new c(t,this.animationLoop,this._workerCount),this.style.on("load",this._onStyleLoad).on("error",this._forwardStyleEvent).on("change",this._onStyleChange).on("source.add",this._onSourceAdd).on("source.remove",this._onSourceRemove).on("source.load",this._onSourceUpdate).on("source.error",this._forwardSourceEvent).on("source.change",this._onSourceUpdate).on("layer.add",this._forwardLayerEvent).on("layer.remove",this._forwardLayerEvent).on("layer.error",this._forwardLayerEvent).on("tile.add",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.load",this._update).on("tile.error",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this.on("rotate",this.style._redoPlacement),this.on("pitch",this.style._redoPlacement),this):(this.style=null,this)},getStyle:function(){if(this.style)return this.style.serialize()},addSource:function(t,e){return this.style.addSource(t,e),this._update(!0),this},addSourceType:function(t,e,r){return this.style.addSourceType(t,e,r)},removeSource:function(t){return this.style.removeSource(t),this._update(!0),this},getSource:function(t){return this.style.getSource(t)},addLayer:function(t,e){return this.style.addLayer(t,e),this._update(!0),this},removeLayer:function(t){return this.style.removeLayer(t),this._update(!0),this},getLayer:function(t){return this.style.getLayer(t)},setFilter:function(t,e){return this.style.setFilter(t,e),this._update(!0),this},setLayerZoomRange:function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},getFilter:function(t){return this.style.getFilter(t)},setPaintProperty:function(t,e,r,n){return this.style.setPaintProperty(t,e,r,n),this._update(!0),this},getPaintProperty:function(t,e,r){return this.style.getPaintProperty(t,e,r)},setLayoutProperty:function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},getLayoutProperty:function(t,e){return this.style.getLayoutProperty(t,e)},getContainer:function(){return this._container},getCanvasContainer:function(){return this._canvasContainer},getCanvas:function(){return this._canvas.getElement()},_setupContainer:function(){var t=this._container;t.classList.add("mapboxgl-map");var e=this._canvasContainer=u.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=new i(this,e);var r=this._controlContainer=u.create("div","mapboxgl-control-container",t),n=this._controlCorners={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){n[t]=u.create("div","mapboxgl-ctrl-"+t,r)})},_setupPainter:function(){var t=this._canvas.getWebGLContext({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer});if(!t)return void this.fire("error",{error:new Error("Failed to initialize WebGL")});this.painter=new f(t,this.transform)},_contextLost:function(t){t.preventDefault(),this._frameId&&o.cancelFrame(this._frameId),this.fire("webglcontextlost",{originalEvent:t})},_contextRestored:function(t){this._setupPainter(),this.resize(),this._update(),this.fire("webglcontextrestored",{originalEvent:t})},loaded:function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},_update:function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},_render:function(){try{this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(this._classes,this._classOptions),this._classOptions=null,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.painter.render(this.style,{debug:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,vertices:this.vertices,rotating:this.rotating,zooming:this.zooming}),this.fire("render"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire("load")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty)&&this._rerender()}catch(t){this.fire("error",{error:t})}return this},remove:function(){this._hash&&this._hash.remove(),o.cancelFrame(this._frameId),this.setStyle(null),void 0!==s&&s.removeEventListener("resize",this._onWindowResize,!1);var t=this.painter.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),n(this._canvasContainer),n(this._controlContainer),this._container.classList.remove("mapboxgl-map")},_rerender:function(){this.style&&!this._frameId&&(this._frameId=o.frame(this._render))},_forwardStyleEvent:function(t){this.fire("style."+t.type,a.extend({style:t.target},t))},_forwardSourceEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_forwardLayerEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_forwardTileEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_onStyleLoad:function(t){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update(this._classes,{transition:!1}),this._forwardStyleEvent(t)},_onStyleChange:function(t){this._update(!0),this._forwardStyleEvent(t)},_onSourceAdd:function(t){var e=t.source;e.onAdd&&e.onAdd(this),this._forwardSourceEvent(t)},_onSourceRemove:function(t){var e=t.source;e.onRemove&&e.onRemove(this),this._forwardSourceEvent(t)},_onSourceUpdate:function(t){this._update(),this._forwardSourceEvent(t)},_onWindowOnline:function(){this._update()},_onWindowResize:function(){this._trackResize&&this.stop().resize()._update()}}),a.extendAll(w.prototype,{_showTileBoundaries:!1,get showTileBoundaries(){return this._showTileBoundaries},set showTileBoundaries(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},_showCollisionBoxes:!1,get showCollisionBoxes(){return this._showCollisionBoxes},set showCollisionBoxes(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,this.style._redoPlacement())},_showOverdrawInspector:!1,get showOverdrawInspector(){return this._showOverdrawInspector},set showOverdrawInspector(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},_repaint:!1,get repaint(){return this._repaint},set repaint(t){this._repaint=t,this._update()},_vertices:!1,get vertices(){return this._vertices},set vertices(t){this._vertices=t,this._update()}})},{"../geo/lng_lat":321,"../geo/lng_lat_bounds":322,"../geo/transform":323,"../render/painter":337,"../style/animation_loop":357,"../style/style":360,"../util/browser":408,"../util/canvas":409,"../util/dom":410,"../util/evented":416,"../util/util":424,"./bind_handlers":389,"./camera":390,"./control/attribution":391,"./hash":402,"point-geometry":465}],404:[function(t,e,r){"use strict";function n(t,e){t||(t=i.create("div")),t.classList.add("mapboxgl-marker"),this._el=t,this._offset=o.convert(e&&e.offset||[0,0]),this._update=this._update.bind(this)}e.exports=n;var i=t("../util/dom"),a=t("../geo/lng_lat"),o=t("point-geometry");n.prototype={addTo:function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._el),t.on("move",this._update),this._update(),this},remove:function(){this._map&&(this._map.off("move",this._update),this._map=null);var t=this._el.parentNode;return t&&t.removeChild(this._el),this},getLngLat:function(){return this._lngLat},setLngLat:function(t){return this._lngLat=a.convert(t),this._update(),this},getElement:function(){return this._el},_update:function(){if(this._map){var t=this._map.project(this._lngLat)._add(this._offset);i.setTransform(this._el,"translate("+t.x+"px,"+t.y+"px)")}}}},{"../geo/lng_lat":321,"../util/dom":410,"point-geometry":465}],405:[function(t,e,r){"use strict";function n(t){i.setOptions(this,t),i.bindAll(["_update","_onClickClose"],this)}e.exports=n;var i=t("../util/util"),a=t("../util/evented"),o=t("../util/dom"),s=t("../geo/lng_lat");n.prototype=i.inherit(a,{options:{closeButton:!0,closeOnClick:!0},addTo:function(t){return this._map=t,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this},remove:function(){ +return this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._container&&(this._container.parentNode.removeChild(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire("close"),this},getLngLat:function(){return this._lngLat},setLngLat:function(t){return this._lngLat=s.convert(t),this._update(),this},setText:function(t){return this.setDOMContent(document.createTextNode(t))},setHTML:function(t){var e,r=document.createDocumentFragment(),n=document.createElement("body");for(n.innerHTML=t;;){if(!(e=n.firstChild))break;r.appendChild(e)}return this.setDOMContent(r)},setDOMContent:function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},_createContent:function(){this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._content=o.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=o.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClickClose))},_update:function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content));var t=this._map.project(this._lngLat).round(),e=this.options.anchor;if(!e){var r=this._container.offsetWidth,n=this._container.offsetHeight;e=t.ythis._map.transform.height-n?["bottom"]:[],t.xthis._map.transform.width-r/2&&e.push("right"),e=0===e.length?"bottom":e.join("-")}var i={top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"},a=this._container.classList;for(var s in i)a.remove("mapboxgl-popup-anchor-"+s);a.add("mapboxgl-popup-anchor-"+e),o.setTransform(this._container,i[e]+" translate("+t.x+"px,"+t.y+"px)")}},_onClickClose:function(){this.remove()}})},{"../geo/lng_lat":321,"../util/dom":410,"../util/evented":416,"../util/util":424}],406:[function(t,e,r){"use strict";function n(t,e){this.target=t,this.parent=e,this.callbacks={},this.callbackID=0,this.receive=this.receive.bind(this),this.target.addEventListener("message",this.receive,!1)}e.exports=n,n.prototype.receive=function(t){function e(t,e,r){this.postMessage({type:"",id:String(i),error:t?String(t):null,data:e},r)}var r,n=t.data,i=n.id;if(""===n.type)r=this.callbacks[n.id],delete this.callbacks[n.id],r&&r(n.error||null,n.data);else if(void 0!==n.id&&this.parent[n.type])this.parent[n.type](n.data,e.bind(this));else if(void 0!==n.id&&this.parent.workerSources){var a=n.type.split(".");this.parent.workerSources[a[0]][a[1]](n.data,e.bind(this))}else this.parent[n.type](n.data)},n.prototype.send=function(t,e,r,n){var i=null;r&&(this.callbacks[i=this.callbackID++]=r),this.postMessage({type:t,id:String(i),data:e},n)},n.prototype.postMessage=function(t,e){this.target.postMessage(t,e)}},{}],407:[function(t,e,r){"use strict";function n(t){var e=document.createElement("a");return e.href=t,e.protocol===document.location.protocol&&e.host===document.location.host}r.getJSON=function(t,e){var r=new XMLHttpRequest;return r.open("GET",t,!0),r.setRequestHeader("Accept","application/json"),r.onerror=function(t){e(t)},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var t;try{t=JSON.parse(r.response)}catch(t){return e(t)}e(null,t)}else e(new Error(r.statusText))},r.send(),r},r.getArrayBuffer=function(t,e){var r=new XMLHttpRequest;return r.open("GET",t,!0),r.responseType="arraybuffer",r.onerror=function(t){e(t)},r.onload=function(){r.status>=200&&r.status<300&&r.response?e(null,r.response):e(new Error(r.statusText))},r.send(),r},r.getImage=function(t,e){return r.getArrayBuffer(t,function(t,r){if(t)return e(t);var n=new Image;n.onload=function(){e(null,n),(window.URL||window.webkitURL).revokeObjectURL(n.src)};var i=new Blob([new Uint8Array(r)],{type:"image/png"});return n.src=(window.URL||window.webkitURL).createObjectURL(i),n.getData=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return t.width=n.width,t.height=n.height,e.drawImage(n,0,0),e.getImageData(0,0,n.width,n.height).data},n})},r.getVideo=function(t,e){var r=document.createElement("video");r.onloadstart=function(){e(null,r)};for(var i=0;i=s+n?t.call(i,1):(t.call(i,(l-s)/n),r.frame(a)))}if(!n)return t.call(i,1),null;var o=!1,s=e.exports.now();return r.frame(a),function(){o=!0}},r.supported=t("mapbox-gl-supported"),r.hardwareConcurrency=navigator.hardwareConcurrency||4,Object.defineProperty(r,"devicePixelRatio",{get:function(){return window.devicePixelRatio}}),r.supportsWebp=!1;var a=document.createElement("img");a.onload=function(){r.supportsWebp=!0},a.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=",r.supportsGeolocation=!!navigator.geolocation},{"mapbox-gl-supported":309}],409:[function(t,e,r){"use strict";function n(t,e){this.canvas=document.createElement("canvas"),t&&e&&(this.canvas.style.position="absolute",this.canvas.classList.add("mapboxgl-canvas"),this.canvas.addEventListener("webglcontextlost",t._contextLost.bind(t),!1),this.canvas.addEventListener("webglcontextrestored",t._contextRestored.bind(t),!1),this.canvas.setAttribute("tabindex",0),e.appendChild(this.canvas))}var i=t("../util"),a=t("mapbox-gl-supported");e.exports=n,n.prototype.resize=function(t,e){var r=window.devicePixelRatio||1;this.canvas.width=r*t,this.canvas.height=r*e,this.canvas.style.width=t+"px",this.canvas.style.height=e+"px"},n.prototype.getWebGLContext=function(t){return t=i.extend({},t,a.webGLContextAttributes),this.canvas.getContext("webgl",t)||this.canvas.getContext("experimental-webgl",t)},n.prototype.getElement=function(){return this.canvas}},{"../util":424,"mapbox-gl-supported":309}],410:[function(t,e,r){"use strict";function n(t){for(var e=0;e1)for(var h=0;h=0&&this._events[t].splice(r,1),this._events[t].length||delete this._events[t]}else delete this._events[t];return this},once:function(t,e){var r=function(n){this.off(t,r),e.call(this,n)}.bind(this);return this.on(t,r),this},fire:function(t,e){if(!this.listens(t))return n.endsWith(t,"error")&&console.error(e&&e.error||e||"Empty error event"),this;e=n.extend({},e),n.extend(e,{type:t,target:this});for(var r=this._events[t].slice(),i=0;i=3)for(var l=0;l1){if(s(t,e))return!0;for(var n=0;n(e.y-t.y)*(r.x-t.x)}function u(t,e,r,n){return l(t,r,n)!==l(e,r,n)&&l(t,e,r)!==l(t,e,n)}function c(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function f(t,e){for(var r,n,i,a=!1,o=0;oe.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a)}return a}function d(t,e){for(var r=!1,n=0,i=t.length-1;ne.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}e.exports={multiPolygonIntersectsBufferedMultiPoint:n,multiPolygonIntersectsMultiPolygon:i,multiPolygonIntersectsBufferedMultiLine:a}},{}],420:[function(t,e,r){"use strict";function n(t,e){this.max=t,this.onRemove=e,this.reset()}e.exports=n,n.prototype.reset=function(){for(var t in this.data)this.onRemove(this.data[t]);return this.data={},this.order=[],this},n.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.get(this.order[0]);r&&this.onRemove(r)}return this},n.prototype.has=function(t){return t in this.data},n.prototype.keys=function(){return this.order},n.prototype.get=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},n.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this.get(this.order[0]);e&&this.onRemove(e)}return this}},{}],421:[function(t,e,r){"use strict";function n(t,e,r){if(!(r=r||o.ACCESS_TOKEN)&&o.REQUIRE_ACCESS_TOKEN)throw new Error("An API access token is required to use Mapbox GL. See https://www.mapbox.com/developers/api/#access-tokens");if(t=t.replace(/^mapbox:\/\//,o.API_URL+e),t+=t.indexOf("?")!==-1?"&access_token=":"?access_token=",o.REQUIRE_ACCESS_TOKEN){if("s"===r[0])throw new Error("Use a public access token (pk.*) with Mapbox GL JS, not a secret access token (sk.*). See https://www.mapbox.com/developers/api/#access-tokens");t+=r}return t}function i(t){return t?"?"+t:""}function a(t){return t.access_token&&"tk."===t.access_token.slice(0,3)?u.extend({},t,{access_token:o.ACCESS_TOKEN}):t}var o=t("./config"),s=t("./browser"),l=t("url"),u=t("./util");e.exports.normalizeStyleURL=function(t,e){var r=l.parse(t);return"mapbox:"!==r.protocol?t:n("mapbox:/"+r.pathname+i(r.query),"/styles/v1/",e)},e.exports.normalizeSourceURL=function(t,e){return"mapbox:"!==l.parse(t).protocol?t:n(t+".json","/v4/",e)+"&secure"},e.exports.normalizeGlyphsURL=function(t,e){var r=l.parse(t);return"mapbox:"!==r.protocol?t:n("mapbox://"+r.pathname.split("/")[1]+"/{fontstack}/{range}.pbf"+i(r.query),"/fonts/v1/",e)},e.exports.normalizeSpriteURL=function(t,e,r,a){var o=l.parse(t);return"mapbox:"!==o.protocol?(o.pathname+=e+r,l.format(o)):n("mapbox:/"+o.pathname+"/sprite"+e+r+i(o.query),"/styles/v1/",a)},e.exports.normalizeTileURL=function(t,e,r){var n=l.parse(t,!0);if(!e)return t;if("mapbox:"!==l.parse(e).protocol)return t;var i=s.supportsWebp?".webp":"$1",o=s.devicePixelRatio>=2||512===r?"@2x":"";return l.format({protocol:n.protocol,hostname:n.hostname,pathname:n.pathname.replace(/(\.(?:png|jpg)\d*)/,o+i),query:a(n.query)})}},{"./browser":408,"./config":413,"./util":424,url:525}],422:[function(t,e,r){"use strict";function n(t){function e(){f.apply(this,arguments)}function r(){d.apply(this,arguments),this.members=e.prototype.members}var n=JSON.stringify(t);if(g[n])return g[n];void 0===t.alignment&&(t.alignment=1),e.prototype=Object.create(f.prototype);var s=0,u=0,v=["Uint8"];return e.prototype.members=t.members.map(function(r){r={name:r.name,type:r.type,components:r.components||1},p(r.name.length),p(r.type in m),v.indexOf(r.type)<0&&v.push(r.type);var n=o(r.type);u=Math.max(u,n),r.offset=s=a(s,Math.max(t.alignment,n));for(var i=0;ithis.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*this.RESIZE_MULTIPLIER),this.DEFAULT_CAPACITY),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},d.prototype._refreshViews=function(){for(var t=0;t=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)},r.bezier=function(t,e,r,i){var a=new n(t,e,r,i);return function(t){return a.solve(t)}},r.ease=r.bezier(.25,.1,.25,1),r.clamp=function(t,e,r){return Math.min(r,Math.max(e,t))},r.wrap=function(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i},r.coalesce=function(){for(var t=0;t=0)return!0;return!1};var o={};r.warnOnce=function(t){o[t]||("undefined"!=typeof console&&console.warn(t),o[t]=!0)}},{"../geo/coordinate":320,unitbezier:524}],425:[function(t,e,r){"use strict";function n(t,e,r,n){this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&&(this.id=t.id)}e.exports=n,n.prototype={type:"Feature",get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},set geometry(t){this._geometry=t},toJSON:function(){var t={};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&"toJSON"!==e&&(t[e]=this[e]);return t}}},{}],426:[function(t,e,r){e.exports={_args:[[{raw:"mapbox-gl@^0.22.0",scope:null,escapedName:"mapbox-gl",name:"mapbox-gl",rawSpec:"^0.22.0",spec:">=0.22.0 <0.23.0",type:"range"},"/home/etienne/Documents/plotly/plotly.js"]],_from:"mapbox-gl@>=0.22.0 <0.23.0",_id:"mapbox-gl@0.22.1",_inCache:!0,_location:"/mapbox-gl",_nodeVersion:"4.4.5",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/mapbox-gl-0.22.1.tgz_1471549891670_0.8762630566488951"},_npmUser:{name:"lucaswoj",email:"lucas@lucaswoj.com"},_npmVersion:"2.15.5",_phantomChildren:{},_requested:{raw:"mapbox-gl@^0.22.0",scope:null,escapedName:"mapbox-gl",name:"mapbox-gl",rawSpec:"^0.22.0",spec:">=0.22.0 <0.23.0",type:"range"},_requiredBy:["#USER","/"],_resolved:"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz",_shasum:"92a965547d4c2f24c22cbc487eeda48694cb627a",_shrinkwrap:null,_spec:"mapbox-gl@^0.22.0",_where:"/home/etienne/Documents/plotly/plotly.js",browser:{"./js/util/ajax.js":"./js/util/browser/ajax.js","./js/util/browser.js":"./js/util/browser/browser.js","./js/util/canvas.js":"./js/util/browser/canvas.js","./js/util/dom.js":"./js/util/browser/dom.js","./js/util/web_worker.js":"./js/util/browser/web_worker.js"},bugs:{url:"https://github.com/mapbox/mapbox-gl-js/issues"},dependencies:{csscolorparser:"^1.0.2",earcut:"^2.0.3","feature-filter":"^2.2.0","geojson-rewind":"^0.1.0","geojson-vt":"^2.4.0","gl-matrix":"^2.3.1","grid-index":"^1.0.0","mapbox-gl-function":"^1.2.1","mapbox-gl-shaders":"github:mapbox/mapbox-gl-shaders#de2ab007455aa2587c552694c68583f94c9f2747","mapbox-gl-style-spec":"github:mapbox/mapbox-gl-style-spec#83b1a3e5837d785af582efd5ed1a212f2df6a4ae","mapbox-gl-supported":"^1.2.0",pbf:"^1.3.2",pngjs:"^2.2.0","point-geometry":"^0.0.0",quickselect:"^1.0.0",request:"^2.39.0","resolve-url":"^0.2.1","shelf-pack":"^1.0.0",supercluster:"^2.0.1",unassertify:"^2.0.0",unitbezier:"^0.0.0","vector-tile":"^1.3.0","vt-pbf":"^2.0.2",webworkify:"^1.3.0","whoots-js":"^2.0.0"},description:"A WebGL interactive maps library",devDependencies:{"babel-preset-react":"^6.11.1",babelify:"^7.3.0",benchmark:"~2.1.0",browserify:"^13.0.0",clipboard:"^1.5.12","concat-stream":"1.5.1",coveralls:"^2.11.8",doctrine:"^1.2.1",documentation:"https://github.com/documentationjs/documentation/archive/bb41619c734e59ef3fbc3648610032efcfdaaace.tar.gz","documentation-theme-utils":"3.0.0",envify:"^3.4.0",eslint:"^2.5.3","eslint-config-mourner":"^2.0.0","eslint-plugin-html":"^1.5.1",gl:"^4.0.1",handlebars:"4.0.5","highlight.js":"9.3.0",istanbul:"^0.4.2","json-loader":"^0.5.4",lodash:"^4.13.1","mapbox-gl-test-suite":"github:mapbox/mapbox-gl-test-suite#7babab52fb02788ebbc38384139bf350e8e38552","memory-fs":"^0.3.0",minifyify:"^7.0.1","npm-run-all":"^3.0.0",nyc:"6.4.0",proxyquire:"^1.7.9",remark:"4.2.2","remark-html":"3.0.0",sinon:"^1.15.4",st:"^1.2.0",tap:"^5.7.0","transform-loader":"^0.2.3","unist-util-visit":"1.1.0",vinyl:"1.1.1","vinyl-fs":"2.4.3",watchify:"^3.7.0",webpack:"^1.13.1","webworkify-webpack":"^1.1.3"},directories:{},dist:{shasum:"92a965547d4c2f24c22cbc487eeda48694cb627a",tarball:"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz"},engines:{node:">=4.0.0"},gitHead:"13a9015341f0602ccb55c98c53079838ad4b70b5",homepage:"https://github.com/mapbox/mapbox-gl-js#readme",license:"BSD-3-Clause",main:"js/mapbox-gl.js",maintainers:[{name:"aaronlidman",email:"aaronlidman@gmail.com"},{name:"ajashton",email:"aj.ashton@gmail.com"},{name:"ansis",email:"ansis.brammanis@gmail.com"},{name:"bergwerkgis",email:"wb@bergwerk-gis.at"},{name:"bhousel",email:"bryan@mapbox.com"},{name:"bsudekum",email:"bobby@mapbox.com"},{name:"camilleanne",email:"camille@mapbox.com"},{name:"dnomadb",email:"damon@mapbox.com"},{name:"dthompson",email:"dthompson@gmail.com"},{name:"emilymcafee",email:"emily@mapbox.com"},{name:"flippmoke",email:"flippmoke@gmail.com"},{name:"freenerd",email:"spam@freenerd.de"},{name:"gretacb",email:"carol@mapbox.com"},{name:"ian29",email:"ian.villeda@gmail.com"},{name:"ianshward",email:"ian@mapbox.com"},{name:"ingalls",email:"nicholas.ingalls@gmail.com"},{name:"jfirebaugh",email:"john.firebaugh@gmail.com"},{name:"jrpruit1",email:"jake@jakepruitt.com"},{name:"karenzshea",email:"karen@mapbox.com"},{name:"kkaefer",email:"kkaefer@gmail.com"},{name:"lbud",email:"lauren@mapbox.com"},{name:"lucaswoj",email:"lucas@lucaswoj.com"},{name:"lxbarth",email:"alex@mapbox.com"},{name:"lyzidiamond",email:"lyzi@mapbox.com"},{name:"mapbox-admin",email:"accounts@mapbox.com"},{name:"mateov",email:"matt@mapbox.com"},{name:"mcwhittemore",email:"mcwhittemore@gmail.com"},{name:"miccolis",email:"jeff@miccolis.net"},{name:"mikemorris",email:"michael.patrick.morris@gmail.com"},{name:"morganherlocker",email:"morgan.herlocker@gmail.com"},{name:"mourner",email:"agafonkin@gmail.com"},{name:"nickidlugash",email:"nicki@mapbox.com"},{name:"rclark",email:"ryan.clark.j@gmail.com"},{name:"samanbb",email:"saman@mapbox.com"},{name:"sbma44",email:"tlee@mapbox.com"},{name:"scothis",email:"scothis@gmail.com"},{name:"sgillies",email:"sean@mapbox.com"},{name:"springmeyer",email:"dane@mapbox.com"},{name:"themarex",email:"patrick@mapbox.com"},{name:"tmcw",email:"tom@macwright.org"},{name:"tristen",email:"tristen.brown@gmail.com"},{name:"willwhite",email:"will@mapbox.com"},{name:"yhahn",email:"young@mapbox.com"}],name:"mapbox-gl",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/mapbox/mapbox-gl-js.git"},scripts:{build:"npm run build-docs # invoked by publisher when publishing docs on the mb-pages branch","build-dev":"browserify js/mapbox-gl.js --debug --standalone mapboxgl > dist/mapbox-gl-dev.js && tap --no-coverage test/build/dev.test.js","build-docs":"documentation build --github --format html -c documentation.yml --theme ./docs/_theme --output docs/api/","build-min":"browserify js/mapbox-gl.js --debug -t unassertify --plugin [minifyify --map mapbox-gl.js.map --output dist/mapbox-gl.js.map] --standalone mapboxgl > dist/mapbox-gl.js && tap --no-coverage test/build/min.test.js","build-token":"browserify debug/access-token-src.js --debug -t envify > debug/access-token.js",lint:"eslint --ignore-path .gitignore js test bench docs/_posts/examples/*.html","open-changed-examples":"git diff --name-only mb-pages HEAD -- docs/_posts/examples/*.html | awk '{print \"http://127.0.0.1:4000/mapbox-gl-js/example/\" substr($0,33,length($0)-37)}' | xargs open",start:"run-p build-token watch-dev watch-bench start-server","start-bench":"run-p build-token watch-bench start-server","start-debug":"run-p build-token watch-dev start-server","start-docs":"npm run build-min && npm run build-docs && jekyll serve -w","start-server":"st --no-cache --localhost --port 9966 --index index.html .",test:"npm run lint && tap --reporter dot test/js/*/*.js test/build/webpack.test.js","test-suite":"node test/render.test.js && node test/query.test.js","watch-bench":"node bench/download-data.js && watchify bench/index.js --plugin [minifyify --no-map] -t [babelify --presets react] -t unassertify -t envify -o bench/bench.js -v","watch-dev":"watchify js/mapbox-gl.js --debug --standalone mapboxgl -o dist/mapbox-gl-dev.js -v"},version:"0.22.1"}},{}],427:[function(t,e,r){"use strict";function n(t,e,r){for(var n=new Array(t),i=0;ig[1][2]&&(b[0]=-b[0]),g[0][2]>g[2][0]&&(b[1]=-b[1]),g[1][0]>g[0][1]&&(b[2]=-b[2]),!0}},{"./normalize":429,"gl-mat4/clone":159,"gl-mat4/create":160,"gl-mat4/determinant":161,"gl-mat4/invert":165,"gl-mat4/transpose":175,"gl-vec3/cross":256,"gl-vec3/dot":257,"gl-vec3/length":258,"gl-vec3/normalize":260}],429:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],430:[function(t,e,r){function n(t,e,r,n){if(0===c(e)||0===c(r))return!1;var i=u(e,f.translate,f.scale,f.skew,f.perspective,f.quaternion),a=u(r,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!(!i||!a)&&(s(p.translate,f.translate,d.translate,n),s(p.skew,f.skew,d.skew,n),s(p.scale,f.scale,d.scale,n),s(p.perspective,f.perspective,d.perspective,n),h(p.quaternion,f.quaternion,d.quaternion,n),l(t,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function i(){return{translate:a(),scale:a(1),skew:a(),perspective:o(),quaternion:o()}}function a(t){return[t||0,t||0,t||0]}function o(){return[0,0,0,1]}var s=t("gl-vec3/lerp"),l=t("mat4-recompose"),u=t("mat4-decompose"),c=t("gl-mat4/determinant"),h=t("quat-slerp"),f=i(),d=i(),p=i();e.exports=n},{"gl-mat4/determinant":161,"gl-vec3/lerp":259,"mat4-decompose":428,"mat4-recompose":431,"quat-slerp":470}],431:[function(t,e,r){var n={identity:t("gl-mat4/identity"),translate:t("gl-mat4/translate"),multiply:t("gl-mat4/multiply"),create:t("gl-mat4/create"),scale:t("gl-mat4/scale"),fromRotationTranslation:t("gl-mat4/fromRotationTranslation")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{"gl-mat4/create":160,"gl-mat4/fromRotationTranslation":163,"gl-mat4/identity":164,"gl-mat4/multiply":167,"gl-mat4/scale":173,"gl-mat4/translate":174}],432:[function(t,e,r){"use strict";function n(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}function i(t){return t=t||{},new n(t.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}var a=t("binary-search-bounds"),o=t("mat4-interpolate"),s=t("gl-mat4/invert"),l=t("gl-mat4/rotateX"),u=t("gl-mat4/rotateY"),c=t("gl-mat4/rotateZ"),h=t("gl-mat4/lookAt"),f=t("gl-mat4/translate"),d=(t("gl-mat4/scale"),t("gl-vec3/normalize")),p=[0,0,0];e.exports=i;var m=n.prototype;m.recalcMatrix=function(t){var e=this._time,r=a.le(e,t),n=this.computedMatrix;if(!(r<0)){var i=this._components;if(r===e.length-1)for(var l=16*r,u=0;u<16;++u)n[u]=i[l++];else{for(var c=e[r+1]-e[r],l=16*r,h=this.prevMatrix,f=!0,u=0;u<16;++u)h[u]=i[l++];for(var p=this.nextMatrix,u=0;u<16;++u)p[u]=i[l++],f=f&&h[u]===p[u];if(c<1e-6||f)for(var u=0;u<16;++u)n[u]=h[u];else o(n,h,p,(t-e[r])/c)}var m=this.computedUp;m[0]=n[1],m[1]=n[5],m[2]=n[9],d(m,m);var g=this.computedInverse;s(g,n);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;for(var b=this.computedCenter,x=Math.exp(this.computedRadius[0]),u=0;u<3;++u)b[u]=v[u]-n[2+4*u]*x}},m.idle=function(t){if(!(t1&&i(t[o[c-2]],t[o[c-1]],u)<=0;)c-=1,o.pop();for(o.push(l),c=s.length;c>1&&i(t[s[c-2]],t[s[c-1]],u)>=0;)c-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),h=0,n=0,f=o.length;n0;--d)r[h++]=s[d];return r}e.exports=n;var i=t("robust-orientation")[3]},{"robust-orientation":489}],434:[function(t,e,r){"use strict";function n(t,e){function r(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==g.alt,g.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==g.shift,g.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==g.control,g.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==g.meta,g.meta=!!t.metaKey),e}function n(t,n){var a=i.x(n),o=i.y(n);"buttons"in n&&(t=0|n.buttons),(t!==d||a!==p||o!==m||r(n))&&(d=0|t,p=a||0,m=o||0,e&&e(d,p,m,g))}function a(t){n(0,t)}function o(){(d||p||m||g.shift||g.alt||g.meta||g.control)&&(p=m=0,d=0,g.shift=g.alt=g.control=g.meta=!1,e&&e(0,0,0,g))}function s(t){r(t)&&e&&e(d,p,m,g)}function l(t){0===i.buttons(t)?n(0,t):n(d,t)}function u(t){n(d|i.buttons(t),t)}function c(t){n(d&~i.buttons(t),t)}function h(){v||(v=!0,t.addEventListener("mousemove",l),t.addEventListener("mousedown",u),t.addEventListener("mouseup",c),t.addEventListener("mouseleave",a),t.addEventListener("mouseenter",a),t.addEventListener("mouseout",a),t.addEventListener("mouseover",a),t.addEventListener("blur",o),t.addEventListener("keyup",s),t.addEventListener("keydown",s),t.addEventListener("keypress",s),t!==window&&(window.addEventListener("blur",o),window.addEventListener("keyup",s),window.addEventListener("keydown",s),window.addEventListener("keypress",s)))}function f(){v&&(v=!1,t.removeEventListener("mousemove",l),t.removeEventListener("mousedown",u),t.removeEventListener("mouseup",c),t.removeEventListener("mouseleave",a),t.removeEventListener("mouseenter",a),t.removeEventListener("mouseout",a),t.removeEventListener("mouseover",a),t.removeEventListener("blur",o),t.removeEventListener("keyup",s),t.removeEventListener("keydown",s),t.removeEventListener("keypress",s),t!==window&&(window.removeEventListener("blur",o),window.removeEventListener("keyup",s),window.removeEventListener("keydown",s),window.removeEventListener("keypress",s)))}e||(e=t,t=window);var d=0,p=0,m=0,g={shift:!1,alt:!1,control:!1,meta:!1},v=!1;h();var y={element:t};return Object.defineProperties(y,{enabled:{get:function(){return v},set:function(t){t?h():f()},enumerable:!0},buttons:{get:function(){return d},enumerable:!0},x:{get:function(){return p},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return g},enumerable:!0}}),y}e.exports=n;var i=t("mouse-event")},{"mouse-event":436}],435:[function(t,e,r){function n(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var n=t.clientX||0,a=t.clientY||0,o=i(e);return r[0]=n-o.left,r[1]=a-o.top,r}function i(t){return t===window||t===document||t===document.body?a:t.getBoundingClientRect()}var a={left:0,top:0};e.exports=n},{}],436:[function(t,e,r){"use strict";function n(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){var e=t.which;if(2===e)return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<=0;--e)L(e,0);for(var r=[],e=0;e0;_=_-1&m)x.push(w+"["+T+"+"+g(_)+"]");x.push(v(0));for(var _=0;_0){",f(x[t]),"=1;"),P(t-1,e|1<0&&G.push(s(U,x[V-1])+"*"+o(x[V-1])),N.push(d(U,x[V])+"=("+G.join("-")+")|0")}for(var U=0;U=0;--U)Y.push(o(x[U]));N.push(A+"=("+Y.join("*")+")|0",M+"=mallocUint32("+A+")",w+"=mallocUint32("+A+")",T+"=0"),N.push(p(0)+"=0");for(var V=1;V<1< 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var a=t.getters||[],o=new Array(n),s=0;s=0?o[s]=!0:o[s]=!1;return b(t.vertex,t.cell,t.phase,i,r,o)}var _=t("typedarray-pool");e.exports=x;var w="V",M="P",k="N",A="Q",T="X",S="T"},{"typedarray-pool":521}],439:[function(t,e,r){"use strict";var n=t("cwise/lib/wrapper")({args:["index","array","scalar"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_1_arg1_=_inline_1_arg2_.apply(void 0,_inline_1_arg0_)}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"cwise",blockSize:64});e.exports=function(t,e){return n(t,e),t}},{"cwise/lib/wrapper":106}],440:[function(t,e,r){"use strict";function n(t){if(t in l)return l[t];for(var e=[],r=0;r=0?s.push("0"):e.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),n.push("1"),o.push("s["+l+"]-2"));var u=".lo("+n.join()+").hi("+o.join()+")";if(0===n.length&&(u=""),r>0){a.push("if(1");for(var l=0;l=0||e.indexOf(-(l+1))>=0||a.push("&&s[",l,"]>2");a.push("){grad",r,"(src.pick(",s.join(),")",u);for(var l=0;l=0||e.indexOf(-(l+1))>=0||a.push(",dst.pick(",s.join(),",",l,")",u);a.push(");")}for(var l=0;l1){dst.set(",s.join(),",",c,",0.5*(src.get(",f.join(),")-src.get(",d.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):a.push("if(s[",c,"]>1){diff(",h,",src.pick(",f.join(),")",u,",src.pick(",d.join(),")",u,");}else{zero(",h,");};");break;case"mirror":0===r?a.push("dst.set(",s.join(),",",c,",0);"):a.push("zero(",h,");");break;case"wrap":var p=s.slice(),m=s.slice();e[l]<0?(p[c]="s["+c+"]-2",m[c]="0"):(p[c]="s["+c+"]-1",m[c]="1"),0===r?a.push("if(s[",c,"]>2){dst.set(",s.join(),",",c,",0.5*(src.get(",p.join(),")-src.get(",m.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):a.push("if(s[",c,"]>2){diff(",h,",src.pick(",p.join(),")",u,",src.pick(",m.join(),")",u,");}else{zero(",h,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}r>0&&a.push("};")}(p)}}a.push("return dst;};return gradient");for(var m=["diff","zero"],g=[h,f],o=1;o<=i;++o)m.push("grad"+o),g.push(n(o));m.push(a.join(""));var v=Function.apply(void 0,m),r=v.apply(void 0,g);return l[e]=r,r}function a(t,e,r){if(Array.isArray(r)){if(r.length!==e.dimension)throw new Error("ndarray-gradient: invalid boundary conditions")}else r="string"==typeof r?o(e.dimension,r):o(e.dimension,"clamp");if(t.dimension!==e.dimension+1)throw new Error("ndarray-gradient: output dimension must be +1 input dimension");if(t.shape[e.dimension]!==e.dimension)throw new Error("ndarray-gradient: output shape must match input shape");for(var n=0;n>",rrshift:">>>"};!function(){for(var t in l){var e=l[t];r[t]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a"+e+"=b"},rvalue:!0,funcName:t+"eq"}),r[t+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a"+e+"=s"},rvalue:!0,funcName:t+"seq"})}}();var u={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in u){var e=u[t];r[t]=a({args:["array","array"],body:{args:["a","b"],body:"a="+e+"b"},funcName:t}),r[t+"eq"]=a({args:["array"],body:{args:["a"],body:"a="+e+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in c){var e=c[t];r[t]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a=a"+e+"b"},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+e+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var h=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=o({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=o({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=a({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=a({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=a({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=o({args:["array","array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":103}],444:[function(t,e,r){"use strict";var n=t("ndarray"),i=t("./doConvert.js");e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{"./doConvert.js":445,ndarray:449}],445:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":103}],446:[function(t,e,r){"use strict";function n(t){switch(t){case"uint8":return[l.mallocUint8,l.freeUint8];case"uint16":return[l.mallocUint16,l.freeUint16];case"uint32":return[l.mallocUint32,l.freeUint32];case"int8":return[l.mallocInt8,l.freeInt8];case"int16": +return[l.mallocInt16,l.freeInt16];case"int32":return[l.mallocInt32,l.freeInt32];case"float32":return[l.mallocFloat,l.freeFloat];case"float64":return[l.mallocDouble,l.freeDouble];default:return null}}function i(t){for(var e=[],r=0;r1){for(var h=[],f=1;f1){o.push("dptr=0;sptr=ptr");for(var f=t.length-1;f>=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"left){","dptr=0","sptr=cptr-s0");for(var f=1;fb){break __l}"].join(""));for(var f=t.length-1;f>=1;--f)o.push("sptr+=e"+f,"dptr+=f"+f,"}");o.push("dptr=cptr;sptr=cptr-s0");for(var f=t.length-1;f>=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"left)&&("+r("cptr-s0")+">scratch)){",a("cptr",r("cptr-s0")),"cptr-=s0","}",a("cptr","scratch"));if(o.push("}"),t.length>1&&u&&o.push("free(scratch)"),o.push("} return "+s),u){var p=new Function("malloc","free",o.join("\n"));return p(u[0],u[1])}var p=new Function(o.join("\n"));return p()}function o(t,e,r){function a(t){return["(offset+",t,"*s0)"].join("")}function o(t){return"generic"===e?["data.get(",t,")"].join(""):["data[",t,"]"].join("")}function s(t,r){return"generic"===e?["data.set(",t,",",r,")"].join(""):["data[",t,"]=",r].join("")}function l(e,r,n){if(1===e.length)_.push("ptr0="+a(e[0]));else for(var i=0;i=0;--i){var o=t[i];0!==o&&_.push(["for(i",o,"=0;i",o,"1)for(var i=0;i1?_.push("ptr_shift+=d"+o):_.push("ptr0+=d"+o),_.push("}"))}}function c(e,r,n,i){if(1===r.length)_.push("ptr0="+a(r[0]));else{for(var o=0;o1)for(var o=0;o=1;--o)n&&_.push("pivot_ptr+=f"+o),r.length>1?_.push("ptr_shift+=e"+o):_.push("ptr0+=e"+o),_.push("}")}function h(){t.length>1&&k&&_.push("free(pivot1)","free(pivot2)")}function f(e,r){var n="el"+e,i="el"+r;if(t.length>1){var s="__l"+ ++A;c(s,[n,i],!1,["comp=",o("ptr0"),"-",o("ptr1"),"\n","if(comp>0){tmp0=",n,";",n,"=",i,";",i,"=tmp0;break ",s,"}\n","if(comp<0){break ",s,"}"].join(""))}else _.push(["if(",o(a(n)),">",o(a(i)),"){tmp0=",n,";",n,"=",i,";",i,"=tmp0}"].join(""))}function d(e,r){t.length>1?l([e,r],!1,s("ptr0",o("ptr1"))):_.push(s(a(e),o(a(r))))}function p(e,r,n){if(t.length>1){var i="__l"+ ++A;c(i,[r],!0,[e,"=",o("ptr0"),"-pivot",n,"[pivot_ptr]\n","if(",e,"!==0){break ",i,"}"].join(""))}else _.push([e,"=",o(a(r)),"-pivot",n].join(""))}function m(e,r){t.length>1?l([e,r],!1,["tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1","tmp")].join("")):_.push(["ptr0=",a(e),"\n","ptr1=",a(r),"\n","tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1","tmp")].join(""))}function g(e,r,n){t.length>1?(l([e,r,n],!1,["tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1",o("ptr2")),"\n",s("ptr2","tmp")].join("")),_.push("++"+r,"--"+n)):_.push(["ptr0=",a(e),"\n","ptr1=",a(r),"\n","ptr2=",a(n),"\n","++",r,"\n","--",n,"\n","tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1",o("ptr2")),"\n",s("ptr2","tmp")].join(""))}function v(t,e){m(t,e),_.push("--"+e)}function y(e,r,n){t.length>1?l([e,r],!0,[s("ptr0",o("ptr1")),"\n",s("ptr1",["pivot",n,"[pivot_ptr]"].join(""))].join("")):_.push(s(a(e),o(a(r))),s(a(r),"pivot"+n))}function b(e,r){_.push(["if((",r,"-",e,")<=",u,"){\n","insertionSort(",e,",",r,",data,offset,",i(t.length).join(","),")\n","}else{\n",w,"(",e,",",r,",data,offset,",i(t.length).join(","),")\n","}"].join(""))}function x(e,r,n){t.length>1?(_.push(["__l",++A,":while(true){"].join("")),l([e],!0,["if(",o("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",A,"}"].join("")),_.push(n,"}")):_.push(["while(",o(a(e)),"===pivot",r,"){",n,"}"].join(""))}var _=["'use strict'"],w=["ndarrayQuickSort",t.join("d"),e].join(""),M=["left","right","data","offset"].concat(i(t.length)),k=n(e),A=0;_.push(["function ",w,"(",M.join(","),"){"].join(""));var T=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(t.length>1){for(var S=[],E=1;E1?l(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",o("ptr1"),"\n","pivot2[pivot_ptr]=",o("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",o("ptr0"),"\n","y=",o("ptr2"),"\n","z=",o("ptr4"),"\n",s("ptr5","x"),"\n",s("ptr6","y"),"\n",s("ptr7","z")].join("")):_.push(["pivot1=",o(a("el2")),"\n","pivot2=",o(a("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",o(a("el1")),"\n","y=",o(a("el3")),"\n","z=",o(a("el5")),"\n",s(a("index1"),"x"),"\n",s(a("index3"),"y"),"\n",s(a("index5"),"z")].join("")),d("index2","left"),d("index4","right"),_.push("if(pivots_are_equal){"),_.push("for(k=less;k<=great;++k){"),p("comp","k",1),_.push("if(comp===0){continue}"),_.push("if(comp<0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),_.push("while(true){"),p("comp","great",1),_.push("if(comp>0){"),_.push("great--"),_.push("}else if(comp<0){"),g("k","less","great"),_.push("break"),_.push("}else{"),v("k","great"),_.push("break"),_.push("}"),_.push("}"),_.push("}"),_.push("}"),_.push("}else{"),_.push("for(k=less;k<=great;++k){"),p("comp_pivot1","k",1),_.push("if(comp_pivot1<0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),p("comp_pivot2","k",2),_.push("if(comp_pivot2>0){"),_.push("while(true){"),p("comp","great",2),_.push("if(comp>0){"),_.push("if(--greatindex5){"),x("less",1,"++less"),x("great",2,"--great"),_.push("for(k=less;k<=great;++k){"),p("comp_pivot1","k",1),_.push("if(comp_pivot1===0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),p("comp_pivot2","k",2),_.push("if(comp_pivot2===0){"),_.push("while(true){"),p("comp","great",2),_.push("if(comp===0){"),_.push("if(--great1&&k){var L=new Function("insertionSort","malloc","free",_.join("\n"));return L(r,k[0],k[1])}var L=new Function("insertionSort",_.join("\n"));return L(r)}function s(t,e){var r=["'use strict'"],n=["ndarraySortWrapper",t.join("d"),e].join(""),s=["array"];r.push(["function ",n,"(",s.join(","),"){"].join(""));for(var l=["data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride"],c=0;c0?l.push(["d",g,"=s",g,"-d",p,"*n",p].join("")):l.push(["d",g,"=s",g].join("")),p=g);var d=t.length-1-c;0!==d&&(m>0?l.push(["e",d,"=s",d,"-e",m,"*n",m,",f",d,"=",h[d],"-f",m,"*n",m].join("")):l.push(["e",d,"=s",d,",f",d,"=",h[d]].join("")),m=d)}r.push("var "+l.join(","));var v=["0","n0-1","data","offset"].concat(i(t.length));r.push(["if(n0<=",u,"){","insertionSort(",v.join(","),")}else{","quickSort(",v.join(","),")}"].join("")),r.push("}return "+n);var y=new Function("insertionSort","quickSort",r.join("\n")),b=a(t,e);return y(b,o(t,e,b))}var l=t("typedarray-pool"),u=32;e.exports=s},{"typedarray-pool":521}],447:[function(t,e,r){"use strict";function n(t){var e=t.order,r=t.dtype,n=[e,r],o=n.join(":"),s=a[o];return s||(a[o]=s=i(e,r)),s(t),t}var i=t("./lib/compile_sort.js"),a={};e.exports=n},{"./lib/compile_sort.js":446}],448:[function(t,e,r){"use strict";var n=t("ndarray-linear-interpolate"),i=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=new Array(_inline_9_arg4_)}",args:[{name:"_inline_9_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg2_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_.apply(void 0,this_warped)}",args:[{name:"_inline_10_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_10_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg4_",lvalue:!1,rvalue:!1,count:0}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warpND",blockSize:64}),a=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0])}",args:[{name:"_inline_13_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_13_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp1D",blockSize:64}),o=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_16_arg2_(this_warped,_inline_16_arg0_),_inline_16_arg1_=_inline_16_arg3_(_inline_16_arg4_,this_warped[0],this_warped[1])}",args:[{name:"_inline_16_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_16_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp2D",blockSize:64}),s=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_19_arg2_(this_warped,_inline_19_arg0_),_inline_19_arg1_=_inline_19_arg3_(_inline_19_arg4_,this_warped[0],this_warped[1],this_warped[2])}",args:[{name:"_inline_19_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_19_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_19_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_19_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_19_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp3D",blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:a(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:i(t,r,n.bind(void 0,e),e.shape.length)}return t}},{"cwise/lib/wrapper":106,"ndarray-linear-interpolate":442}],449:[function(t,e,r){function n(t,e){return t[0]-e[0]}function i(){var t,e=this.stride,r=new Array(e.length);for(t=0;tMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&a.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):a.push("ORDER})")),a.push("proto.set=function "+r+"_set("+u.join(",")+",v){"),n?a.push("return this.data.set("+c+",v)}"):a.push("return this.data["+c+"]=v}"),a.push("proto.get=function "+r+"_get("+u.join(",")+"){"),n?a.push("return this.data.get("+c+")}"):a.push("return this.data["+c+"]}"),a.push("proto.index=function "+r+"_index(",u.join(),"){return "+c+"}"),a.push("proto.hi=function "+r+"_hi("+u.join(",")+"){return new "+r+"(this.data,"+s.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+s.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var p=s.map(function(t){return"a"+t+"=this.shape["+t+"]"}),m=s.map(function(t){return"c"+t+"=this.stride["+t+"]"});a.push("proto.lo=function "+r+"_lo("+u.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+m.join(","));for(var g=0;g=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");a.push("return new "+r+"(this.data,"+s.map(function(t){return"a"+t}).join(",")+","+s.map(function(t){return"c"+t}).join(",")+",b)}"),a.push("proto.step=function "+r+"_step("+u.join(",")+"){var "+s.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+s.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var g=0;g=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+s.map(function(t){return"shape["+t+"]"}).join(",")+","+s.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}");var o=new Function("CTOR_LIST","ORDER",a.join("\n"));return o(h[t],i)}function o(t){if(u(t))return"buffer";if(c)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(t)?"array":"generic"}function s(t,e,r,n){if(void 0===t){var i=h.array[0];return i([])}"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var s=e.length;if(void 0===r){r=new Array(s);for(var l=s-1,u=1;l>=0;--l)r[l]=u,u*=e[l]}if(void 0===n){n=0;for(var l=0;lt==t>0?n===o?(r+=1,n=0):n+=1:0===n?(n=o,r-=1):n-=1,i.pack(n,r)}var i=t("double-bits"),a=Math.pow(2,-1074),o=-1>>>0;e.exports=n},{"double-bits":109}],451:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa)for(var x=i[u],_=1/Math.sqrt(g*y),b=0;b<3;++b){var w=(b+1)%3,M=(b+2)%3;x[b]+=_*(v[w]*m[M]-v[M]*m[w])}}for(var o=0;oa)for(var _=1/Math.sqrt(k),b=0;b<3;++b)x[b]*=_;else for(var b=0;b<3;++b)x[b]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(d):0;for(var u=0;u<3;++u)f[u]*=d;i[o]=f}return i}},{}],452:[function(t,e,r){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,l=n(t),u=1;u0){var h=Math.sqrt(c+1);t[0]=.5*(o-l)/h,t[1]=.5*(s-n)/h,t[2]=.5*(r-a)/h,t[3]=.5*h}else{var f=Math.max(e,a,u),h=Math.sqrt(2*f-c+1);e>=f?(t[0]=.5*h,t[1]=.5*(i+r)/h,t[2]=.5*(s+n)/h,t[3]=.5*(o-l)/h):a>=f?(t[0]=.5*(r+i)/h,t[1]=.5*h,t[2]=.5*(l+o)/h,t[3]=.5*(s-n)/h):(t[0]=.5*(n+s)/h,t[1]=.5*(o+l)/h,t[2]=.5*h,t[3]=.5*(r-i)/h)}return t}e.exports=n},{}],454:[function(t,e,r){"use strict";function n(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function i(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function a(t,e){var r=e[0],n=e[1],a=e[2],o=e[3],s=i(r,n,a,o);s>1e-6?(t[0]=r/s,t[1]=n/s,t[2]=a/s,t[3]=o/s):(t[0]=t[1]=t[2]=0,t[3]=1)}function o(t,e,r){this.radius=l([r]),this.center=l(e),this.rotation=l(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}function s(t){t=t||{};var e=t.center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),r=[].slice.call(r,0,4),a(r,r);var i=new o(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i}e.exports=s;var l=t("filtered-vector"),u=t("gl-mat4/lookAt"),c=t("gl-mat4/fromQuat"),h=t("gl-mat4/invert"),f=t("./lib/quatFromFrame"),d=o.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;a(e,e);var r=this.computedMatrix;c(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var u=0,h=0;h<3;++h)u+=r[l+4*h]*i[h];r[12+l]=-u}},d.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},d.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},d.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},d.pan=function(t,e,r,i){e=e||0,r=r||0,i=i||0,this.recalcMatrix(t);var a=this.computedMatrix,o=a[1],s=a[5],l=a[9],u=n(o,s,l);o/=u,s/=u,l/=u;var c=a[0],h=a[4],f=a[8],d=c*o+h*s+f*l;c-=o*d,h-=s*d,f-=l*d;var p=n(c,h,f);c/=p,h/=p,f/=p;var m=a[2],g=a[6],v=a[10],y=m*o+g*s+v*l,b=m*c+g*h+v*f;m-=y*o+b*c,g-=y*s+b*h,v-=y*l+b*f;var x=n(m,g,v);m/=x,g/=x,v/=x;var _=c*e+o*r,w=h*e+s*r,M=f*e+l*r;this.center.move(t,_,w,M);var k=Math.exp(this.computedRadius[0]);k=Math.max(1e-4,k+i),this.radius.set(t,Math.log(k))},d.rotate=function(t,e,r,a){this.recalcMatrix(t),e=e||0,r=r||0;var o=this.computedMatrix,s=o[0],l=o[4],u=o[8],c=o[1],h=o[5],f=o[9],d=o[2],p=o[6],m=o[10],g=e*s+r*c,v=e*l+r*h,y=e*u+r*f,b=-(p*y-m*v),x=-(m*g-d*y),_=-(d*v-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(b,2)-Math.pow(x,2)-Math.pow(_,2))),M=i(b,x,_,w);M>1e-6?(b/=M,x/=M,_/=M,w/=M):(b=x=_=0,w=1);var k=this.computedRotation,A=k[0],T=k[1],S=k[2],E=k[3],L=A*w+E*b+T*_-S*x,C=T*w+E*x+S*b-A*_,z=S*w+E*_+A*x-T*b,D=E*w-A*b-T*x-S*_;if(a){b=d,x=p,_=m;var I=Math.sin(a)/n(b,x,_);b*=I,x*=I,_*=I,w=Math.cos(e),L=L*w+D*b+C*_-z*x,C=C*w+D*x+z*b-L*_,z=z*w+D*_+L*x-C*b,D=D*w-L*b-C*x-z*_}var P=i(L,C,z,D);P>1e-6?(L/=P,C/=P,z/=P,D/=P):(L=C=z=0,D=1),this.rotation.set(t,L,C,z,D)},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var i=this.computedMatrix;u(i,e,r,n);var o=this.computedRotation;f(o,i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10]),a(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var s=0,l=0;l<3;++l)s+=Math.pow(r[l]-e[l],2);this.radius.set(t,.5*Math.log(Math.max(s,1e-6))),this.center.set(t,r[0],r[1],r[2])},d.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},d.setMatrix=function(t,e){var r=this.computedRotation;f(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),a(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;h(n,e);var i=n[15];if(Math.abs(i)>1e-6){var o=n[12]/i,s=n[13]/i,l=n[14]/i;this.recalcMatrix(t);var u=Math.exp(this.computedRadius[0]);this.center.set(t,o-n[2]*u,s-n[6]*u,l-n[10]*u),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},d.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},d.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},d.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},d.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},d.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{"./lib/quatFromFrame":453,"filtered-vector":118,"gl-mat4/fromQuat":162,"gl-mat4/invert":165,"gl-mat4/lookAt":166}],455:[function(t,e,r){"use strict";var n=t("repeat-string");e.exports=function(t,e,r){return r=void 0!==r?r+"":" ",n(r,e)+t}},{"repeat-string":481}],456:[function(t,e,r){e.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},{}],457:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,i="/"===o.charAt(0))}return r=e(n(r.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(t){var i=r.isAbsolute(t),a="/"===o(t,-1);return t=e(n(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),a=n(e.split("/")),o=Math.min(i.length,a.length),s=o,l=0;l55295&&e<57344){if(!r){e>56319||a+1===n?i.push(239,191,189):r=e;continue}if(e<56320){i.push(239,191,189),r=e;continue}e=r-55296<<10|e-56320|65536,r=null}else r&&(i.push(239,191,189),r=null);e<128?i.push(e):e<2048?i.push(e>>6|192,63&e|128):e<65536?i.push(e>>12|224,e>>6&63|128,63&e|128):i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}return i}e.exports=n;var a,o,s,l=t("ieee754");a={readUInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},writeUInt32LE:function(t,e){this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24},readInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+(this[t+3]<<24)},readFloatLE:function(t){return l.read(this,t,!0,23,4)},readDoubleLE:function(t){return l.read(this,t,!0,52,8)},writeFloatLE:function(t,e){return l.write(this,t,e,!0,23,4)},writeDoubleLE:function(t,e){return l.write(this,t,e,!0,52,8)},toString:function(t,e,r){var n="",i="";e=e||0,r=Math.min(this.length,r||this.length) +;for(var a=e;a=1;){if(e.pos>=r)throw new Error("Given varint doesn't fit into 10 bytes");var n=255&t;e.buf[e.pos++]=n|(t>=128?128:0),t/=128}}function o(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function s(t,e){for(var r=0;r>3,a=this.pos;t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=this.buf.readUInt32LE(this.pos);return this.pos+=4,t},readSFixed32:function(){var t=this.buf.readInt32LE(this.pos);return this.pos+=4,t},readFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+4294967296*this.buf.readUInt32LE(this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+4294967296*this.buf.readInt32LE(this.pos+4);return this.pos+=8,t},readFloat:function(){var t=this.buf.readFloatLE(this.pos);return this.pos+=4,t},readDouble:function(){var t=this.buf.readDoubleLE(this.pos);return this.pos+=8,t},readVarint:function(){var t,e,r=this.buf;return e=r[this.pos++],t=127&e,e<128?t:(e=r[this.pos++],t|=(127&e)<<7,e<128?t:(e=r[this.pos++],t|=(127&e)<<14,e<128?t:(e=r[this.pos++],t|=(127&e)<<21,e<128?t:i(t,this))))},readVarint64:function(){var t=this.pos,e=this.readVarint();if(e127;);else if(e===n.Bytes)this.pos=this.readVarint()+this.pos;else if(e===n.Fixed32)this.pos+=4;else{if(e!==n.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455)return void a(t,this);this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127)))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t);var e=g.byteLength(t);this.writeVarint(e),this.realloc(e),this.buf.write(t,this.pos),this.pos+=e},writeFloat:function(t){this.realloc(4),this.buf.writeFloatLE(t,this.pos),this.pos+=4},writeDouble:function(t){this.realloc(8),this.buf.writeDoubleLE(t,this.pos),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&o(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,n.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,s,e)},writePackedSVarint:function(t,e){this.writeMessage(t,l,e)},writePackedBoolean:function(t,e){this.writeMessage(t,h,e)},writePackedFloat:function(t,e){this.writeMessage(t,u,e)},writePackedDouble:function(t,e){this.writeMessage(t,c,e)},writePackedFixed32:function(t,e){this.writeMessage(t,f,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,d,e)},writePackedFixed64:function(t,e){this.writeMessage(t,p,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,n.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,n.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,n.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,n.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./buffer":458}],460:[function(t,e,r){"use strict";function n(t){var e=t.length;if(e0;--i)n=l[i],r=s[i],s[i]=s[n],s[n]=r,l[i]=l[r],l[r]=n,u=(u+r)*i;return a.freeUint32(l),a.freeUint32(s),u}function i(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}r=r||new Array(t);var n,i,a,o=1;for(r[0]=0,a=1;a0;--a)n=e/o|0,e=e-n*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}var a=t("typedarray-pool"),o=t("invert-permutation");r.rank=n,r.unrank=i},{"invert-permutation":275,"typedarray-pool":521}],462:[function(t,e,r){"use strict";function n(t,e){function r(t,e){var r=s[e][t[e]];r.splice(r.indexOf(t),1)}function n(t,n,a){for(var o,l,u,c=0;c<2;++c)if(s[c][n].length>0){o=s[c][n][0],u=c;break}l=o[1^u];for(var h=0;h<2;++h)for(var f=s[h][n],d=0;d0&&(o=p,l=m,u=h)}return a?l:(o&&r(o,u),l)}for(var a=0|e.length,o=t.length,s=[new Array(a),new Array(a)],l=0;l0;){var d=(s[0][l].length,function(t,a){var o=s[a][t][0],l=[t];r(o,a);for(var u=o[1^a];;){for(;u!==t;)l.push(u),u=n(l[l.length-2],u,!1);if(s[0][t].length+s[1][t].length===0)break;var c=l[l.length-1],h=t,f=l[1],d=n(c,h,!0);if(i(e[c],e[h],e[f],e[d])<0)break;l.push(t),u=n(c,h)}return l}(l,h));!function(t,e){return e[1]===e[e.length-1]}(f,d)?(f.length>0&&c.push(f),f=d):f.push.apply(f,d)}f.length>0&&c.push(f)}return c}e.exports=n;var i=t("compare-angle")},{"compare-angle":93}],463:[function(t,e,r){"use strict";function n(t,e){for(var r=i(t,e.length),n=new Array(e.length),a=new Array(e.length),o=[],s=0;s0;){var u=o.pop();n[u]=!1;for(var c=r[u],s=0;s0}function a(t){for(var e=t.length,r=0;r0;){var U=N.pop(),V=D[U];h(V,function(t,e){return t-e});var H,q=V.length,G=B[U];if(0===G){var T=v[U];H=[T]}for(var g=0;g=0)&&(B[Y]=1^G,N.push(Y),0===G)){var T=v[Y];a(T)||(T.reverse(),H.push(T))}}0===G&&d.push(H)}return d}e.exports=a;var o=t("edges-to-adjacency-list"),s=t("planar-dual"),l=t("point-in-big-polygon"),u=t("two-product"),c=t("robust-sum"),h=t("uniq"),f=t("./lib/trim-leaves")},{"./lib/trim-leaves":463,"edges-to-adjacency-list":112,"planar-dual":462,"point-in-big-polygon":466,"robust-sum":494,"two-product":519,uniq:523}],465:[function(t,e,r){"use strict";function n(t,e){this.x=t,this.y=e}e.exports=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{}],466:[function(t,e,r){function n(){return!0}function i(t){return function(e,r){var i=t[e];return!!i&&!!i.queryPoint(r,n)}}function a(t){for(var e={},r=0;r0&&e[n]===r[0]))return 1;i=t[n-1]}for(var a=1;i;){var o=i.key,s=h(r,o[0],o[1]);if(o[0][0]0))return 0;a=-1,i=i.right}else if(s>0)i=i.left;else{if(!(s<0))return 0;a=1,i=i.right}}return a}}function s(t){return 1}function l(t){return function(e){return t(e[0],e[1])?0:1}}function u(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}function c(t){for(var e=t.length,r=[],n=[],i=0;i=u?(x=1,y=u+2*f+p):(x=-f/u,y=f*x+p)):(x=0,d>=0?(_=0,y=p):-d>=h?(_=1,y=h+2*d+p):(_=-d/h,y=d*_+p));else if(_<0)_=0,f>=0?(x=0,y=p):-f>=u?(x=1,y=u+2*f+p):(x=-f/u,y=f*x+p);else{var w=1/b;x*=w,_*=w,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p}else{var M,k,A,T;x<0?(M=c+f,k=h+d,k>M?(A=k-M,T=u-2*c+h,A>=T?(x=1,_=0,y=u+2*f+p):(x=A/T,_=1-x,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)):(x=0,k<=0?(_=1,y=h+2*d+p):d>=0?(_=0,y=p):(_=-d/h,y=d*_+p))):_<0?(M=c+d,k=u+f,k>M?(A=k-M,T=u-2*c+h,A>=T?(_=1,x=0,y=h+2*d+p):(_=A/T,x=1-_,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)):(_=0,k<=0?(x=1,y=u+2*f+p):f>=0?(x=0,y=p):(x=-f/u,y=f*x+p))):(A=h+d-c-f,A<=0?(x=0,_=1,y=h+2*d+p):(T=u-2*c+h,A>=T?(x=1,_=0,y=u+2*f+p):(x=A/T,_=1-x,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)))}for(var S=1-x-_,l=0;l1)for(var r=1;r1&&(n=r[0]+"@",t=r[1]),t=t.replace(I,"."),n+o(t.split("."),e).join(".")}function l(t){for(var e,r,n=[],i=0,a=t.length;i=55296&&e<=56319&&i65535&&(t-=65536,e+=R(t>>>10&1023|55296),t=56320|1023&t),e+=R(t)}).join("")}function c(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:M}function h(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,r){var n=0;for(t=r?j(t/S):t>>1,t+=j(t/e);t>O*A>>1;n+=M)t=j(t/O);return j(n+(O+1)*t/(t+T))}function d(t){var e,r,n,i,o,s,l,h,d,p,m=[],g=t.length,v=0,y=L,b=E;for(r=t.lastIndexOf(C),r<0&&(r=0),n=0;n=128&&a("not-basic"),m.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=g&&a("invalid-input"),h=c(t.charCodeAt(i++)),(h>=M||h>j((w-v)/s))&&a("overflow"),v+=h*s,d=l<=b?k:l>=b+A?A:l-b,!(hj(w/p)&&a("overflow"),s*=p;e=m.length+1,b=f(v-o,e,0==o),j(v/e)>w-y&&a("overflow"),y+=j(v/e),v%=e,m.splice(v++,0,y)}return u(m)}function p(t){var e,r,n,i,o,s,u,c,d,p,m,g,v,y,b,x=[];for(t=l(t),g=t.length,e=L,r=0,o=E,s=0;s=e&&mj((w-r)/v)&&a("overflow"),r+=(u-e)*v,e=u,s=0;sw&&a("overflow"),m==e){for(c=r,d=M;p=d<=o?k:d>=o+A?A:d-o,!(c= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=M-k,j=Math.floor,R=String.fromCharCode;if(x={version:"1.4.1",ucs2:{decode:l,encode:u},decode:d,encode:p,toASCII:g,toUnicode:m},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return x});else if(v&&y)if(r.exports==v)y.exports=x;else for(_ in x)x.hasOwnProperty(_)&&(v[_]=x[_]);else i.punycode=x}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],470:[function(t,e,r){e.exports=t("gl-quat/slerp")},{"gl-quat/slerp":215}],471:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,a){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;t=t.split(e);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var l=t.length;s>0&&l>s&&(l=s);for(var u=0;u=0?(c=p.substr(0,m),h=p.substr(m+1)):(c=p,h=""),f=decodeURIComponent(c),d=decodeURIComponent(h),n(o,f)?i(o[f])?o[f].push(d):o[f]=[o[f],d]:o[f]=d}return o};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],472:[function(t,e,r){"use strict";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;nr;){if(o-r>600){var l=o-r+1,u=e-r+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1);n(t,e,Math.max(r,Math.floor(e-u*h/l+f)),Math.min(o,Math.floor(e+(l-u)*h/l+f)),s)}var d=t[e],p=r,m=o;for(i(t,r,e),s(t[o],d)>0&&i(t,r,o);p0;)m--}0===s(t[r],d)?i(t,r,m):(m++,i(t,m,o)),m<=e&&(r=m+1),e<=m&&(o=m-1)}}function i(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function a(t,e){return te?1:0}e.exports=n},{}],475:[function(t,e,r){"use strict";function n(t,e){for(var r=t.length,n=new Array(r),a=0;a0){var u=t[r-1];if(0===i(s,u)&&o(u)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}var i=t("compare-cell"),a=t("compare-oriented-cell"),o=t("cell-orientation");e.exports=n},{"cell-orientation":78,"compare-cell":94,"compare-oriented-cell":95}],480:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.createREGL=i()}(this,function(){"use strict";function t(t){return"undefined"!=typeof btoa?btoa(t):"base64:"+t}function e(t){var e=new Error("(regl) "+t);throw console.error(e),e}function r(t,r){t||e(r)}function n(t){return t?": "+t:""}function i(t,r,i){t in r||e("unknown parameter ("+t+")"+n(i)+". possible values: "+Object.keys(r).join())}function a(t,r){Kt(t)||e("invalid parameter type"+n(r)+". must be a typed array")}function o(t,r,i){typeof t!==r&&e("invalid parameter type"+n(i)+". expected "+r+", got "+typeof t)}function s(t,r){t>=0&&(0|t)===t||e("invalid parameter type, ("+t+")"+n(r)+". must be a nonnegative integer")}function l(t,r,i){r.indexOf(t)<0&&e("invalid value"+n(i)+". must be one of: "+r)}function u(t){Object.keys(t).forEach(function(t){te.indexOf(t)<0&&e('invalid regl constructor argument "'+t+'". must be one of '+te)})}function c(t,e){for(t+="";t.length0&&e.push(new d("unknown",0,t))}}),e}function y(t,e){e.forEach(function(e){var r=t[e.file];if(r){var n=r.index[e.line];if(n)return n.errors.push(e),void(r.hasErrors=!0)}t.unknown.hasErrors=!0,t.unknown.lines[0].errors.push(e)})}function b(t,e,n,i,a){if(!t.getShaderParameter(e,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(e),s=i===t.FRAGMENT_SHADER?"fragment":"vertex";T(n,"string",s+" shader source must be a string",a);var l=g(n,a),u=v(o);y(l,u),Object.keys(l).forEach(function(t){function e(t,e){n.push(t),i.push(e||"")}var r=l[t];if(r.hasErrors){var n=[""],i=[""];e("file number "+t+": "+r.name+"\n","color:red;text-decoration:underline;font-weight:bold"),r.lines.forEach(function(t){if(t.errors.length>0){e(c(t.number,4)+"| ","background-color:yellow; font-weight:bold"),e(t.line+"\n","color:red; background-color:yellow; font-weight:bold");var r=0;t.errors.forEach(function(n){var i=n.message,a=/^\s*\'(.*)\'\s*\:\s*(.*)$/.exec(i);if(a){var o=a[1];switch(i=a[2],o){case"assign":o="="}r=Math.max(t.line.indexOf(o,r),0)}else r=0;e(c("| ",6)),e(c("^^^",r+3)+"\n","font-weight:bold"),e(c("| ",6)),e(i+"\n","font-weight:bold")}),e(c("| ",6)+"\n")}else e(c(t.number,4)+"| "),e(t.line+"\n","color:red")}),"undefined"!=typeof document?(i[0]=n.join("%c"),console.log.apply(console,i)):console.log(n.join(""))}}),r.raise("Error compiling "+s+" shader, "+l[0].name)}}function x(t,e,n,i,a){if(!t.getProgramParameter(e,t.LINK_STATUS)){var o=t.getProgramInfoLog(e),s=g(n,a),l=g(i,a),u='Error linking program with vertex shader, "'+l[0].name+'", and fragment shader "'+s[0].name+'"';"undefined"!=typeof document?console.log("%c"+u+"\n%c"+o,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(u+"\n"+o),r.raise(u)}}function _(t){t._commandRef=p()}function w(t,e,r,n){function i(t){return t?n.id(t):0}function a(t,e){Object.keys(e).forEach(function(e){t[n.id(e)]=!0})}_(t),t._fragId=i(t.static.frag),t._vertId=i(t.static.vert);var o=t._uniformSet={};a(o,e.static),a(o,e.dynamic);var s=t._attributeSet={};a(s,r.static),a(s,r.dynamic),t._hasCount="count"in t.static||"count"in t.dynamic||"elements"in t.static||"elements"in t.dynamic}function M(t,r){var n=m();e(t+" in command "+(r||p())+("unknown"===n?"":" called from "+n))}function k(t,e,r){t||M(e,r||p())}function A(t,e,r,i){t in e||M("unknown parameter ("+t+")"+n(r)+". possible values: "+Object.keys(e).join(),i||p())}function T(t,e,r,i){typeof t!==e&&M("invalid parameter type"+n(r)+". expected "+e+", got "+typeof t,i||p())}function S(t){t()}function E(t,e,r){t.texture?l(t.texture._texture.internalformat,e,"unsupported texture format for attachment"):l(t.renderbuffer._renderbuffer.format,r,"unsupported renderbuffer format for attachment")}function L(t,e){return t===ue||t===le||t===ce?2:t===he?4:fe[t]*e}function C(t){return!(t&t-1||!t)}function z(t,e,n){var i,a=e.width,o=e.height,s=e.channels;r(a>0&&a<=n.maxTextureSize&&o>0&&o<=n.maxTextureSize,"invalid texture shape"),t.wrapS===ee&&t.wrapT===ee||r(C(a)&&C(o),"incompatible wrap mode for texture, both width and height must be power of 2"),1===e.mipmask?1!==a&&1!==o&&r(t.minFilter!==ne&&t.minFilter!==ae&&t.minFilter!==ie&&t.minFilter!==oe,"min filter requires mipmap"):(r(C(a)&&C(o),"texture must be a square power of 2 to support mipmapping"),r(e.mipmask===(a<<1)-1,"missing or incomplete mipmap data")),e.type===se&&(n.extensions.indexOf("oes_texture_float_linear")<0&&r(t.minFilter===re&&t.magFilter===re,"filter not supported, must enable oes_texture_float_linear"),r(!t.genMipmaps,"mipmap generation not supported with float textures"));var l=e.images;for(i=0;i<16;++i)if(l[i]){var u=a>>i,c=o>>i;r(e.mipmask&1<0&&a<=i.maxTextureSize&&o>0&&o<=i.maxTextureSize,"invalid texture shape"),r(a===o,"cube map must be square"),r(e.wrapS===ee&&e.wrapT===ee,"wrap mode not supported by cube map");for(var l=0;l>h,p=o>>h;r(u.mipmask&1<1&&e===r&&('"'===e||"'"===e))return['"'+P(t.substr(1,t.length-2))+'"'];var n=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t);if(n)return O(t.substr(0,n.index)).concat(O(n[1])).concat(O(t.substr(n.index+n[0].length)));var i=t.split(".");if(1===i.length)return['"'+P(t)+'"'];for(var a=[],o=0;o0,"invalid pixel ratio"))):de.raise("invalid arguments to regl"),e&&("canvas"===e.nodeName.toLowerCase()?n=e:r=e),!i){if(!n){de("undefined"!=typeof document,"must manually specify webgl context outside of DOM environments");var d=U(r||document.body,h,u);if(!d)return null;n=d.canvas,f=d.onDestroy}i=V(n,o)}return i?{gl:i,canvas:n,container:r,extensions:s,optionalExtensions:l,pixelRatio:u,profile:c,onDone:h,onDestroy:f}:(f(),h("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function X(t,e){function r(e){de.type(e,"string","extension name must be string");var r,i=e.toLowerCase();try{r=n[i]=t.getExtension(i)}catch(t){}return!!r}for(var n={},i=0;i65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1}function $(t){var e=Q(t),r=Ee[K(e)>>2];return r.length>0?r.pop():new ArrayBuffer(e)}function tt(t){Ee[K(t.byteLength)>>2].push(t)}function et(t,e){var r=null;switch(t){case _e:r=new Int8Array($(e),0,e);break;case we:r=new Uint8Array($(e),0,e);break;case Me:r=new Int16Array($(2*e),0,e);break;case ke:r=new Uint16Array($(2*e),0,e);break;case Ae:r=new Int32Array($(4*e),0,e);break;case Te:r=new Uint32Array($(4*e),0,e);break;case Se:r=new Float32Array($(4*e),0,e);break;default:return null}return r.length!==e?r.subarray(0,e):r}function rt(t){tt(t.buffer)}function nt(t,e,r){for(var n=0;n0){var l;if(Array.isArray(e[0])){s=Pe(e);for(var u=1,c=1;c0)if("number"==typeof t[0]){var i=Le.allocType(p.dtype,t.length);ct(i,t),h(i,n),Le.freeType(i)}else if(Array.isArray(t[0])||Kt(t[0])){r=Pe(t);var a=Ie(t,r,p.dtype);h(a,n),Le.freeType(a)}else de.raise("invalid buffer data")}else if(Kt(t))h(t,n);else if(Z(t)){r=t.shape;var o=t.stride,s=0,l=0,u=0,f=0;1===r.length?(s=r[0],l=1,u=o[0],f=0):2===r.length?(s=r[0],l=r[1],u=o[0],f=o[1]):de.raise("invalid shape");var d=Array.isArray(t.data)?p.dtype:ut(t.data),m=Le.allocType(d,s*l);ht(m,t.data,s,l,u,f,t.offset),h(m,n),Le.freeType(m)}else de.raise("invalid data for buffer subdata");return c}e.bufferCount++;var p=new n(a);return f[p.id]=p,o||c(i),c._reglType="buffer",c._buffer=p,c.subdata=d,r.profile&&(c.stats=p.stats),c.destroy=function(){l(p)},c}function c(){xe(f).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})}var h=0,f={};n.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},n.prototype.destroy=function(){l(this)};var d=[];return r.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:u,createStream:i,destroyStream:a,clear:function(){xe(f).forEach(l),d.forEach(l)},getBuffer:function(t){return t&&t._buffer instanceof n?t._buffer:null},restore:c,_initBuffer:s}}function dt(t,e,r,n){function i(t){this.id=h++,c[this.id]=this,this.buffer=t,this.primType=He,this.vertCount=0,this.type=0}function a(t){var e=d.pop();return e||(e=new i(r.create(null,Je,!0,!1)._buffer)),s(e,t,Qe,-1,-1,0,0),e}function o(t){d.push(t)}function s(n,i,a,o,s,l,u){if(n.buffer.bind(),i){var c=u;u||Kt(i)&&(!Z(i)||Kt(i.data))||(c=e.oes_element_index_uint?Ze:We),r._initBuffer(n.buffer,i,a,c,3)}else t.bufferData(Je,l,a),n.buffer.dtype=h||Ge,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l;var h=u;if(!u){switch(n.buffer.dtype){case Ge:case qe:h=Ge;break;case We:case Ye:h=We;break;case Ze:case Xe:h=Ze;break;default:de.raise("unsupported type for element array")}n.buffer.dtype=h}n.type=h,de(h!==Ze||!!e.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var f=s;f<0&&(f=n.buffer.byteLength,h===We?f>>=1:h===Ze&&(f>>=2)),n.vertCount=f;var d=o;if(o<0){d=He;var p=n.buffer.dimension;1===p&&(d=Ue),2===p&&(d=Ve),3===p&&(d=He)}n.primType=d}function l(t){n.elementsCount--,de(null!==t.buffer,"must not double destroy elements"),delete c[t.id],t.buffer.destroy(),t.buffer=null}function u(t,e){function a(t){if(t)if("number"==typeof t)o(t),u.primType=He,u.vertCount=0|t,u.type=Ge;else{var e=null,r=Ke,n=-1,i=-1,l=0,c=0;Array.isArray(t)||Kt(t)||Z(t)?e=t:(de.type(t,"object","invalid arguments for elements"),"data"in t&&(e=t.data,de(Array.isArray(e)||Kt(e)||Z(e),"invalid data for element buffer")),"usage"in t&&(de.parameter(t.usage,De,"invalid element buffer usage"),r=De[t.usage]),"primitive"in t&&(de.parameter(t.primitive,Be,"invalid element buffer primitive"),n=Be[t.primitive]),"count"in t&&(de("number"==typeof t.count&&t.count>=0,"invalid vertex count for elements"),i=0|t.count),"type"in t&&(de.parameter(t.type,f,"invalid buffer type"),c=f[t.type]),"length"in t?l=0|t.length:(l=i,c===We||c===Ye?l*=2:c!==Ze&&c!==Xe||(l*=4))),s(u,e,r,n,i,l,c)}else o(),u.primType=He,u.vertCount=0,u.type=Ge;return a}var o=r.create(null,Je,!0),u=new i(o._buffer);return n.elementsCount++,a(t),a._reglType="elements",a._elements=u,a.subdata=function(t,e){return o.subdata(t,e),a},a.destroy=function(){l(u)},a}var c={},h=0,f={uint8:Ge,uint16:We};e.oes_element_index_uint&&(f.uint32=Ze),i.prototype.bind=function(){this.buffer.bind()};var d=[];return{create:u,createStream:a,destroyStream:o,getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){xe(c).forEach(l)}}}function pt(t){for(var e=Le.allocType(er,t.length),r=0;r>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)e[r]=i;else if(a<-14){var s=-14-a;e[r]=i+(o+1024>>s)}else e[r]=a>15?i+31744:i+(a+15<<10)+o}return e}function mt(t){return Array.isArray(t)||Kt(t)}function gt(t){return"[object "+t+"]"}function vt(t){return Array.isArray(t)&&(0===t.length||"number"==typeof t[0])}function yt(t){return!!Array.isArray(t)&&!(0===t.length||!mt(t[0]))}function bt(t){return Object.prototype.toString.call(t)}function xt(t){return bt(t)===dn}function _t(t){return bt(t)===pn}function wt(t){return bt(t)===mn}function Mt(t){return bt(t)===gn}function kt(t){if(!t)return!1;var e=bt(t);return vn.indexOf(e)>=0||(vt(t)||yt(t)||Z(t))}function At(t){return 0|Qt[Object.prototype.toString.call(t)]}function Tt(t,e){var r=e.length;switch(t.type){case Or:case jr:case Rr:case Fr:var n=Le.allocType(t.type,r);n.set(e),t.data=n;break;case wr:t.data=pt(e);break;default:de.raise("unsupported texture type, must specify a typed array")}}function St(t,e){return Le.allocType(t.type===wr?Fr:t.type,e)}function Et(t,e){t.type===wr?(t.data=pt(e),Le.freeType(e)):t.data=e}function Lt(t,e,r,n,i,a){for(var o=t.width,s=t.height,l=t.channels,u=o*s*l,c=St(t,u),h=0,f=0;f=1;)s+=o*l*l,l/=2;return s}return o*r*n}function zt(t,e,r,n,i,a,o){function s(){this.internalformat=or,this.format=or,this.type=Or,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=0,this.width=0,this.height=0,this.channels=0}function l(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function u(t,n){if("object"==typeof n&&n){if("premultiplyAlpha"in n&&(de.type(n.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),t.premultiplyAlpha=n.premultiplyAlpha),"flipY"in n&&(de.type(n.flipY,"boolean","invalid texture flip"),t.flipY=n.flipY),"alignment"in n&&(de.oneOf(n.alignment,[1,2,4,8],"invalid texture unpack alignment"),t.unpackAlignment=n.alignment),"colorSpace"in n&&(de.parameter(n.colorSpace,F,"invalid colorSpace"),t.colorSpace=F[n.colorSpace]),"type"in n){var i=n.type;de(e.oes_texture_float||!("float"===i||"float32"===i),"you must enable the OES_texture_float extension in order to use floating point textures."),de(e.oes_texture_half_float||!("half float"===i||"float16"===i),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),de(e.webgl_depth_texture||!("uint16"===i||"uint32"===i||"depth stencil"===i),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),de.parameter(i,N,"invalid texture type"),t.type=N[i]}var a=t.width,o=t.height,s=t.channels,l=!1;"shape"in n?(de(Array.isArray(n.shape)&&n.shape.length>=2,"shape must be an array"),a=n.shape[0],o=n.shape[1],3===n.shape.length&&(s=n.shape[2],de(s>0&&s<=4,"invalid number of channels"),l=!0),de(a>=0&&a<=r.maxTextureSize,"invalid width"),de(o>=0&&o<=r.maxTextureSize,"invalid height")):("radius"in n&&(a=o=n.radius,de(a>=0&&a<=r.maxTextureSize,"invalid radius")),"width"in n&&(a=n.width,de(a>=0&&a<=r.maxTextureSize,"invalid width")),"height"in n&&(o=n.height,de(o>=0&&o<=r.maxTextureSize,"invalid height")),"channels"in n&&(s=n.channels,de(s>0&&s<=4,"invalid number of channels"),l=!0)),t.width=0|a,t.height=0|o,t.channels=0|s;var u=!1;if("format"in n){var c=n.format;de(e.webgl_depth_texture||!("depth"===c||"depth stencil"===c),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),de.parameter(c,B,"invalid texture format");var h=t.internalformat=B[c];t.format=J[h],c in N&&("type"in n||(t.type=N[c])),c in U&&(t.compressed=!0),u=!0}!l&&u?t.channels=fn[t.format]:l&&!u?t.channels!==hn[t.format]&&(t.format=t.internalformat=hn[t.channels]):u&&l&&de(t.channels===fn[t.format],"number of channels inconsistent with specified format")}}function c(e){t.pixelStorei(an,e.flipY),t.pixelStorei(on,e.premultiplyAlpha),t.pixelStorei(sn,e.colorSpace),t.pixelStorei(nn,e.unpackAlignment)}function h(){s.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function f(t,e){var n=null;if(kt(e)?n=e:e&&(de.type(e,"object","invalid pixel data type"),u(t,e),"x"in e&&(t.xOffset=0|e.x),"y"in e&&(t.yOffset=0|e.y),kt(e.data)&&(n=e.data)),de(!t.compressed||n instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),e.copy){de(!n,"can not specify copy and data field for the same texture");var a=i.viewportWidth,o=i.viewportHeight;t.width=t.width||a-t.xOffset,t.height=t.height||o-t.yOffset,t.needsCopy=!0,de(t.xOffset>=0&&t.xOffset=0&&t.yOffset0&&t.width<=a&&t.height>0&&t.height<=o,"copy texture read out of bounds")}else if(n){if(Kt(n))t.channels=t.channels||4,t.data=n,"type"in e||t.type!==Or||(t.type=At(n));else if(vt(n))t.channels=t.channels||4,Tt(t,n),t.alignment=1,t.needsFree=!0;else if(Z(n)){var s=n.data;Array.isArray(s)||t.type!==Or||(t.type=At(s));var l,c,h,f,d,p,m=n.shape,g=n.stride;3===m.length?(h=m[2],p=g[2]):(de(2===m.length,"invalid ndarray pixel data, must be 2 or 3D"),h=1,p=1),l=m[0],c=m[1],f=g[0],d=g[1],t.alignment=1,t.width=l,t.height=c,t.channels=h,t.format=t.internalformat=hn[h],t.needsFree=!0,Lt(t,s,f,d,p,n.offset)}else if(xt(n)||_t(n))xt(n)?t.element=n:t.element=n.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(wt(n))t.element=n,t.width=n.naturalWidth,t.height=n.naturalHeight,t.channels=4;else if(Mt(n))t.element=n,t.width=n.videoWidth,t.height=n.videoHeight,t.channels=4;else if(yt(n)){var v=t.width||n[0].length,y=t.height||n.length,b=t.channels;b=mt(n[0][0])?b||n[0][0].length:b||1;for(var x=Ce.shape(n),_=1,w=0;w=0,"oes_texture_float extension not enabled"):t.type===wr&&de(r.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function d(e,r,i){var a=e.element,o=e.data,s=e.internalformat,l=e.format,u=e.type,h=e.width,f=e.height;c(e),a?t.texImage2D(r,i,l,l,u,a):e.compressed?t.compressedTexImage2D(r,i,s,h,f,0,o):e.needsCopy?(n(),t.copyTexImage2D(r,i,l,e.xOffset,e.yOffset,h,f,0)):t.texImage2D(r,i,l,h,f,0,l,u,o)}function p(e,r,i,a,o){var s=e.element,l=e.data,u=e.internalformat,h=e.format,f=e.type,d=e.width,p=e.height;c(e),s?t.texSubImage2D(r,o,i,a,h,f,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,u,d,p,l):e.needsCopy?(n(),t.copyTexSubImage2D(r,o,i,a,e.xOffset,e.yOffset,d,p)):t.texSubImage2D(r,o,i,a,d,p,h,f,l)}function m(){return Q.pop()||new h}function g(t){t.needsFree&&Le.freeType(t.data),h.call(t),Q.push(t)}function v(){s.call(this),this.genMipmaps=!1,this.mipmapHint=$r,this.mipmask=0,this.images=Array(16)}function y(t,e,r){var n=t.images[0]=m();t.mipmask=1,n.width=t.width=e,n.height=t.height=r,n.channels=t.channels=4}function b(t,e){var r=null;if(kt(e))r=t.images[0]=m(),l(r,t),f(r,e),t.mipmask=1;else if(u(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i>=i,r.height>>=i,f(r,n[i]),t.mipmask|=1<=0&&(t.genMipmaps=!0)}if("mag"in e){var i=e.mag;de.parameter(i,j),t.magFilter=j[i]}var a=t.wrapS,o=t.wrapT;if("wrap"in e){var s=e.wrap;"string"==typeof s?(de.parameter(s,O),a=o=O[s]):Array.isArray(s)&&(de.parameter(s[0],O),de.parameter(s[1],O),a=O[s[0]],o=O[s[1]])}else{if("wrapS"in e){var l=e.wrapS;de.parameter(l,O),a=O[l]}if("wrapT"in e){var u=e.wrapT;de.parameter(u,O),o=O[u]}}if(t.wrapS=a,t.wrapT=o,"anisotropic"in e){var c=e.anisotropic;de("number"==typeof c&&c>=1&&c<=r.maxAnisotropic,"aniso samples must be between 1 and "),t.anisotropic=e.anisotropic}if("mipmap"in e){var h=!1;switch(typeof e.mipmap){case"string":de.parameter(e.mipmap,P,"invalid mipmap hint"),t.mipmapHint=P[e.mipmap],t.genMipmaps=!0,h=!0;break;case"boolean":h=t.genMipmaps=e.mipmap;break;case"object":de(Array.isArray(e.mipmap),"invalid mipmap type"),t.genMipmaps=!1,h=!0;break;default:de.raise("invalid mipmap type")}!h||"min"in e||(t.minFilter=Xr)}}function A(r,n){t.texParameteri(n,Gr,r.minFilter),t.texParameteri(n,qr,r.magFilter),t.texParameteri(n,Nr,r.wrapS),t.texParameteri(n,Br,r.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(n,rn,r.anisotropic),r.genMipmaps&&(t.hint(Kr,r.mipmapHint),t.generateMipmap(n))}function T(e){s.call(this),this.mipmask=0,this.internalformat=or,this.id=$++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new M,o.profile&&(this.stats={size:0})}function S(e){t.activeTexture(un),t.bindTexture(e.target,e.texture)}function E(){var e=rt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(nr,null)}function L(e){var r=e.texture;de(r,"must not double destroy texture");var n=e.unit,i=e.target;n>=0&&(t.activeTexture(un+n),t.bindTexture(i,null),rt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete tt[e.id],a.textureCount--}function C(e,n){function i(t,e){var n=c.texInfo;M.call(n);var a=_();return"number"==typeof t?"number"==typeof e?y(a,0|t,0|e):y(a,0|t,0|t):t?(de.type(t,"object","invalid arguments to regl.texture"),k(n,t),b(a,t)):y(a,1,1),n.genMipmaps&&(a.mipmask=(a.width<<1)-1),c.mipmask=a.mipmask,l(c,a),de.texture2D(n,a,r),c.internalformat=a.internalformat,i.width=a.width,i.height=a.height,S(c),x(a,nr),A(n,nr),E(),w(a),o.profile&&(c.stats.size=Ct(c.internalformat,c.type,a.width,a.height,n.genMipmaps,!1)),i.format=q[c.internalformat],i.type=G[c.type],i.mag=Y[n.magFilter],i.min=W[n.minFilter],i.wrapS=X[n.wrapS],i.wrapT=X[n.wrapT],i}function s(t,e,r,n){de(!!t,"must specify image data");var a=0|e,o=0|r,s=0|n,u=m();return l(u,c),u.width=0,u.height=0,f(u,t),u.width=u.width||(c.width>>s)-a,u.height=u.height||(c.height>>s)-o,de(c.type===u.type&&c.format===u.format&&c.internalformat===u.internalformat,"incompatible format for texture.subimage"),de(a>=0&&o>=0&&a+u.width<=c.width&&o+u.height<=c.height,"texture.subimage write out of bounds"),de(c.mipmask&1<>s;++s)t.texImage2D(nr,s,c.format,n>>s,a>>s,0,c.format,c.type,null);return E(),o.profile&&(c.stats.size=Ct(c.internalformat,c.type,n,a,!1,!1)),i}var c=new T(nr);return tt[c.id]=c,a.textureCount++,i(e,n),i.subimage=s,i.resize=u,i._reglType="texture2d",i._texture=c,o.profile&&(i.stats=c.stats),i.destroy=function(){c.decRef()},i}function z(e,n,i,s,c,h){function d(t,e,n,i,a,s){var c,h=C.texInfo;for(M.call(h),c=0;c<6;++c)z[c]=_();if("number"!=typeof t&&t)if("object"==typeof t)if(e)b(z[0],t),b(z[1],e),b(z[2],n),b(z[3],i),b(z[4],a),b(z[5],s);else if(k(h,t),u(C,t),"faces"in t){var f=t.faces;for(de(Array.isArray(f)&&6===f.length,"cube faces must be a length 6 array"),c=0;c<6;++c)de("object"==typeof f[c]&&!!f[c],"invalid input for cube map face"),l(z[c],C),b(z[c],f[c])}else for(c=0;c<6;++c)b(z[c],t);else de.raise("invalid arguments to cube map");else{var p=0|t||1;for(c=0;c<6;++c)y(z[c],p,p)}for(l(C,z[0]),h.genMipmaps?C.mipmask=(z[0].width<<1)-1:C.mipmask=z[0].mipmask,de.textureCube(C,h,z,r),C.internalformat=z[0].internalformat,d.width=z[0].width,d.height=z[0].height,S(C),c=0;c<6;++c)x(z[c],ar+c);for(A(h,ir),E(),o.profile&&(C.stats.size=Ct(C.internalformat,C.type,d.width,d.height,h.genMipmaps,!0)),d.format=q[C.internalformat],d.type=G[C.type],d.mag=Y[h.magFilter],d.min=W[h.minFilter],d.wrapS=X[h.wrapS],d.wrapT=X[h.wrapT],c=0;c<6;++c)w(z[c]);return d}function v(t,e,r,n,i){de(!!e,"must specify image data"),de("number"==typeof t&&t===(0|t)&&t>=0&&t<6,"invalid face");var a=0|r,o=0|n,s=0|i,u=m();return l(u,C),u.width=0,u.height=0,f(u,e),u.width=u.width||(C.width>>s)-a,u.height=u.height||(C.height>>s)-o,de(C.type===u.type&&C.format===u.format&&C.internalformat===u.internalformat,"incompatible format for texture.subimage"),de(a>=0&&o>=0&&a+u.width<=C.width&&o+u.height<=C.height,"texture.subimage write out of bounds"),de(C.mipmask&1<>i;++i)t.texImage2D(ar+n,i,C.format,r>>i,r>>i,0,C.format,C.type,null);return E(),o.profile&&(C.stats.size=Ct(C.internalformat,C.type,d.width,d.height,!1,!0)),d}}var C=new T(ir);tt[C.id]=C,a.cubeCount++;var z=new Array(6);return d(e,n,i,s,c,h),d.subimage=v,d.resize=L,d._reglType="textureCube",d._texture=C,o.profile&&(d.stats=C.stats),d.destroy=function(){C.decRef()},d}function D(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)t.texImage2D(ar+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);A(e.texInfo,e.target)})}var P={"don't care":$r,"dont care":$r,nice:en,fast:tn},O={repeat:Ur,clamp:Vr,mirror:Hr},j={nearest:Yr,linear:Wr},R=$t({mipmap:Qr,"nearest mipmap nearest":Xr,"linear mipmap nearest":Zr,"nearest mipmap linear":Jr,"linear mipmap linear":Qr},j),F={none:0,browser:ln},N={uint8:Or,rgba4:pr,rgb565:gr,"rgb5 a1":mr},B={alpha:sr,luminance:ur,"luminance alpha":cr,rgb:lr,rgba:or,rgba4:hr,"rgb5 a1":fr,rgb565:dr},U={};e.ext_srgb&&(B.srgb=xr,B.srgba=_r),e.oes_texture_float&&(N.float32=N.float=Fr),e.oes_texture_half_float&&(N.float16=N["half float"]=wr),e.webgl_depth_texture&&($t(B,{depth:yr,"depth stencil":br}),$t(N,{uint16:jr,uint32:Rr,"depth stencil":vr})),e.webgl_compressed_texture_s3tc&&$t(U,{"rgb s3tc dxt1":Mr,"rgba s3tc dxt1":kr,"rgba s3tc dxt3":Ar,"rgba s3tc dxt5":Tr}),e.webgl_compressed_texture_atc&&$t(U,{"rgb atc":Sr,"rgba atc explicit alpha":Er,"rgba atc interpolated alpha":Lr}),e.webgl_compressed_texture_pvrtc&&$t(U,{"rgb pvrtc 4bppv1":Cr,"rgb pvrtc 2bppv1":zr,"rgba pvrtc 4bppv1":Dr,"rgba pvrtc 2bppv1":Ir}),e.webgl_compressed_texture_etc1&&(U["rgb etc1"]=Pr);var V=Array.prototype.slice.call(t.getParameter(rr));Object.keys(U).forEach(function(t){var e=U[t];V.indexOf(e)>=0&&(B[t]=e)});var H=Object.keys(B);r.textureFormats=H;var q=[];Object.keys(B).forEach(function(t){var e=B[t];q[e]=t});var G=[];Object.keys(N).forEach(function(t){var e=N[t];G[e]=t});var Y=[];Object.keys(j).forEach(function(t){var e=j[t];Y[e]=t});var W=[];Object.keys(R).forEach(function(t){var e=R[t];W[e]=t});var X=[];Object.keys(O).forEach(function(t){var e=O[t];X[e]=t});var J=H.reduce(function(t,e){var r=B[e];return r===ur||r===sr||r===ur||r===cr||r===yr||r===br?t[r]=r:r===fr||e.indexOf("rgba")>=0?t[r]=or:t[r]=lr,t},{}),Q=[],K=[],$=0,tt={},et=r.maxTextureUnits,rt=Array(et).map(function(){return null});return $t(T.prototype,{bind:function(){var e=this;e.bindCount+=1;var r=e.unit;if(r<0){for(var n=0;n0)continue;i.unit=-1}rt[n]=e,r=n;break}r>=et&&de.raise("insufficient number of texture units"),o.profile&&a.maxTextureUnits=Sn&&e=2,"invalid shape for framebuffer"),u=D[0],d=D[1]}else"radius"in z&&(u=d=z.radius),"width"in z&&(u=z.width),"height"in z&&(d=z.height);("color"in z||"colors"in z)&&(y=z.color||z.colors,Array.isArray(y)&&de(1===y.length||o,"multiple render targets not supported")),y||("colorCount"in z&&(T=0|z.colorCount,de(T>0,"invalid color buffer count")),"colorTexture"in z&&(b=!!z.colorTexture,x="rgba4"),"colorType"in z&&(A=z.colorType,b?(de(e.oes_texture_float||!("float"===A||"float32"===A),"you must enable OES_texture_float in order to use floating point framebuffer objects"),de(e.oes_texture_half_float||!("half float"===A||"float16"===A),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):"half float"===A||"float16"===A?(de(e.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),x="rgba16f"):"float"!==A&&"float32"!==A||(de(e.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),x="rgba32f"),de.oneOf(A,k,"invalid color type")),"colorFormat"in z&&(x=z.colorFormat,w.indexOf(x)>=0?b=!0:M.indexOf(x)>=0?b=!1:b?de.oneOf(z.colorFormat,w,"invalid color format for texture"):de.oneOf(z.colorFormat,M,"invalid color format for renderbuffer"))),("depthTexture"in z||"depthStencilTexture"in z)&&(C=!(!z.depthTexture&&!z.depthStencilTexture),de(!C||e.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in z&&("boolean"==typeof z.depth?p=z.depth:(S=z.depth,g=!1)),"stencil"in z&&("boolean"==typeof z.stencil?g=z.stencil:(E=z.stencil,p=!1)),"depthStencil"in z&&("boolean"==typeof z.depthStencil?p=g=z.depthStencil:(L=z.depthStencil,p=!1,g=!1))}else u=d=1;var I=null,P=null,O=null,j=null;if(Array.isArray(y))I=y.map(c);else if(y)I=[c(y)];else for(I=new Array(T),a=0;a=0||I[a].renderbuffer&&Bn.indexOf(I[a].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+a+" is invalid"),I[a]&&I[a].texture){var F=On[I[a].texture._texture.format]*jn[I[a].texture._texture.type];null===R?R=F:de(R===F,"all color attachments much have the same number of bits per pixel.")}return l(P,u,d),de(!P||P.texture&&P.texture._texture.format===In||P.renderbuffer&&P.renderbuffer._renderbuffer.format===Rn,"invalid depth attachment for framebuffer object"),l(O,u,d),de(!O||O.renderbuffer&&O.renderbuffer._renderbuffer.format===Fn,"invalid stencil attachment for framebuffer object"),l(j,u,d),de(!j||j.texture&&j.texture._texture.format===Nn||j.renderbuffer&&j.renderbuffer._renderbuffer.format===Nn,"invalid depth-stencil attachment for framebuffer object"),m(s),s.width=u,s.height=d,s.colorAttachments=I,s.depthAttachment=P,s.stencilAttachment=O,s.depthStencilAttachment=j,i.color=I.map(f),i.depth=f(P),i.stencil=f(O),i.depthStencil=f(j),i.width=s.width,i.height=s.height,v(s),i}function o(t,e){de(_.next!==s,"can not resize a framebuffer which is currently in use");var r=0|t,n=0|e||r;if(r===s.width&&n===s.height)return i;for(var a=s.colorAttachments,o=0;o=2,"invalid shape for framebuffer"),de(p[0]===p[1],"cube framebuffer must be square"),l=p[0]}else"radius"in d&&(l=0|d.radius),"width"in d?(l=0|d.width,"height"in d&&de(d.height===l,"must be square")):"height"in d&&(l=0|d.height);("color"in d||"colors"in d)&&(u=d.color||d.colors,Array.isArray(u)&&de(1===u.length||a,"multiple render targets not supported")),u||("colorCount"in d&&(f=0|d.colorCount,de(f>0,"invalid color buffer count")),"colorType"in d&&(de.oneOf(d.colorType,k,"invalid color type"),h=d.colorType),"colorFormat"in d&&(c=d.colorFormat,de.oneOf(d.colorFormat,w,"invalid color format for texture"))),"depth"in d&&(s.depth=d.depth),"stencil"in d&&(s.stencil=d.stencil),"depthStencil"in d&&(s.depthStencil=d.depthStencil)}else l=1;var m;if(u)if(Array.isArray(u))for(m=[],r=0;r0&&(s.depth=o[0].depth,s.stencil=o[0].stencil,s.depthStencil=o[0].depthStencil),o[r]?o[r](s):o[r]=y(s)}return $t(i,{width:l,height:l,color:m})}function a(t){var e,n=0|t;if(de(n>0&&n<=r.maxCubeMapSize,"invalid radius for cube fbo"),n===i.width)return i;var a=i.color;for(e=0;e1)for(var m=0;mt&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return d.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);xe(c).forEach(e),c={},xe(h).forEach(e),h={},d.forEach(function(e){t.deleteProgram(e.program)}),d.length=0,f={},r.shaderCount=0},program:function(t,e,n){de.command(t>=0,"missing vertex shader",n),de.command(e>=0,"missing fragment shader",n);var i=f[e];i||(i=f[e]={});var a=i[t];return a||(a=new s(e,t),r.shaderCount++,l(a,n),i[t]=a,d.push(a)),a},restore:u,shader:o,frag:-1,vert:-1}}function Rt(t,e,r,n,i,a){function o(o){var s;null===e.next?(de(i.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),s=Xn):(de(null!==e.next.colorAttachments[0].texture,"You cannot read from a renderbuffer"),s=e.next.colorAttachments[0].texture._texture.type,a.oes_texture_float?de(s===Xn||s===Jn,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"):de(s===Xn,"Reading from a framebuffer is only allowed for the type 'uint8'"));var l=0,u=0,c=n.framebufferWidth,h=n.framebufferHeight,f=null;Kt(o)?f=o:o&&(de.type(o,"object","invalid arguments to regl.read()"),l=0|o.x,u=0|o.y,de(l>=0&&l=0&&u0&&c+l<=n.framebufferWidth,"invalid width for read pixels"),de(h>0&&h+u<=n.framebufferHeight,"invalid height for read pixels"),r();var d=c*h*4;return f||(s===Xn?f=new Uint8Array(d):s===Jn&&(f=f||new Float32Array(d))),de.isTypedArray(f,"data buffer for regl.read() must be a typedarray"),de(f.byteLength>=d,"data buffer for regl.read() too small"),t.pixelStorei(Zn,4),t.readPixels(l,u,c,h,Wn,s,f),f}function s(t){var r;return e.setFBO({framebuffer:t.framebuffer},function(){r=o(t)}),r}function l(t){return t&&"framebuffer"in t?s(t):o(t)}return l}function Ft(t){return Array.prototype.slice.call(t)}function Nt(t){return Ft(t).join("")}function Bt(){function t(t){for(var e=0;e0&&(r.push(t,"="),r.push.apply(r,Ft(arguments)),r.push(";")),t}var r=[],n=[];return $t(t,{def:e,toString:function(){return Nt([n.length>0?"var "+n+";":"",Nt(r)])}})}function r(){function t(t,e){n(t,e,"=",r.def(t,e),";")}var r=e(),n=e(),i=r.toString,a=n.toString;return $t(function(){r.apply(r,Ft(arguments))},{def:r.def,entry:r,exit:n,save:t,set:function(e,n,i){t(e,n),r(e,n,"=",i,";")},toString:function(){return i()+a()}})}function n(){var t=Nt(arguments),e=r(),n=r(),i=e.toString,a=n.toString;return $t(e,{then:function(){return e.apply(e,Ft(arguments)),this},else:function(){return n.apply(n,Ft(arguments)),this},toString:function(){var e=a();return e&&(e="else{"+e+"}"),Nt(["if(",t,"){",i(),"}",e])}})}function i(t,e){function n(){var t="a"+i.length;return i.push(t),t}var i=[];e=e||0;for(var a=0;a=1,n>=2,e)}if(r===ai){var i=t.data;return new Ht(i.thisDep,i.contextDep,i.propDep,e)}return new Ht(r===ii,r===ni,r===ri,e)}function Wt(t,e,r,n,i,a,o,s,l,u,c,h,f,d,p){function m(t){return t.replace(".","_")}function g(t,e,r){var n=m(t);et.push(t),tt[n]=$[n]=!!r,rt[n]=e}function v(t,e,r){var n=m(t);et.push(t),Array.isArray(r)?($[n]=r.slice(),tt[n]=r.slice()):$[n]=tt[n]=r,nt[n]=e}function y(){var t=Bt(),r=t.link,n=t.global;t.id=ot++,t.batchId="0";var i=r(it),a=t.shared={props:"a0"};Object.keys(it).forEach(function(t){a[t]=n.def(i,".",t)}),de.optional(function(){t.CHECK=r(de),t.commandStr=de.guessCommand(),t.command=r(t.commandStr),t.assert=function(t,e,n){t("if(!(",e,"))",this.CHECK,".commandRaise(",r(n),",",this.command,");")},at.invalidBlendCombinations=Ua});var o=t.next={},s=t.current={};Object.keys(nt).forEach(function(t){Array.isArray($[t])&&(o[t]=n.def(a.next,".",t),s[t]=n.def(a.current,".",t))});var l=t.constants={};Object.keys(at).forEach(function(t){l[t]=n.def(JSON.stringify(at[t]))}),t.invoke=function(e,n){switch(n.type){case ei:var i=["this",a.context,a.props,t.batchId];return e.def(r(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case ri:return e.def(a.props,n.data);case ni:return e.def(a.context,n.data);case ii:return e.def("this",n.data);case ai:return n.data.append(t,e),n.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){var n=e.id(t);if(n in c)return c[n];var i=u.scope[n];return i||(i=u.scope[n]=new X),c[n]=r(i)},t}function b(t){var e,r=t.static,n=t.dynamic;if(Ii in r){var i=!!r[Ii];e=Gt(function(t,e){return i}),e.enable=i}else if(Ii in n){var a=n[Ii];e=Yt(a,function(t,e){return t.invoke(e,a)})}return e}function x(t,e){var r=t.static,n=t.dynamic;if(Pi in r){var i=r[Pi];return i?(i=s.getFramebuffer(i),de.command(i,"invalid framebuffer object"),Gt(function(t,e){var r=t.link(i),n=t.shared;e.set(n.framebuffer,".next",r);var a=n.context;return e.set(a,"."+Vi,r+".width"),e.set(a,"."+Hi,r+".height"),r})):Gt(function(t,e){var r=t.shared;e.set(r.framebuffer,".next","null");var n=r.context;return e.set(n,"."+Vi,n+"."+Yi),e.set(n,"."+Hi,n+"."+Wi),"null"})}if(Pi in n){var a=n[Pi];return Yt(a,function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer,o=e.def(i,".getFramebuffer(",r,")");de.optional(function(){t.assert(e,"!"+r+"||"+o,"invalid framebuffer object")}),e.set(i,".next",o);var s=n.context;return e.set(s,"."+Vi,o+"?"+o+".width:"+s+"."+Yi),e.set(s,"."+Hi,o+"?"+o+".height:"+s+"."+Wi),o})}return null}function _(t,e,r){function n(t){if(t in i){var n=i[t];de.commandType(n,"object","invalid "+t,r.commandStr);var o,s,l=!0,u=0|n.x,c=0|n.y;return"width"in n?(o=0|n.width,de.command(o>=0,"invalid "+t,r.commandStr)):l=!1,"height"in n?(s=0|n.height,de.command(s>=0,"invalid "+t,r.commandStr)):l=!1,new Ht(!l&&e&&e.thisDep,!l&&e&&e.contextDep,!l&&e&&e.propDep,function(t,e){var r=t.shared.context,i=o;"width"in n||(i=e.def(r,".",Vi,"-",u));var a=s;return"height"in n||(a=e.def(r,".",Hi,"-",c)),[u,c,i,a]})}if(t in a){var h=a[t],f=Yt(h,function(e,r){var n=e.invoke(r,h);de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)});var i=e.shared.context,a=r.def(n,".x|0"),o=r.def(n,".y|0"),s=r.def('"width" in ',n,"?",n,".width|0:","(",i,".",Vi,"-",a,")"),l=r.def('"height" in ',n,"?",n,".height|0:","(",i,".",Hi,"-",o,")");return de.optional(function(){e.assert(r,s+">=0&&"+l+">=0","invalid "+t)}),[a,o,s,l]});return e&&(f.thisDep=f.thisDep||e.thisDep,f.contextDep=f.contextDep||e.contextDep,f.propDep=f.propDep||e.propDep),f}return e?new Ht(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,".",Vi),e.def(r,".",Hi)]}):null}var i=t.static,a=t.dynamic,o=n(Di);if(o){var s=o;o=new Ht(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=s.append(t,e),n=t.shared.context;return e.set(n,"."+qi,r[2]),e.set(n,"."+Gi,r[3]),r})}return{viewport:o,scissor_box:n(zi)}}function w(t){function r(t){if(t in i){var r=e.id(i[t]);de.optional(function(){c.shader(qa[t],r,de.guessCommand())});var n=Gt(function(){return r});return n.id=r,n}if(t in a){var o=a[t];return Yt(o,function(e,r){var n=e.invoke(r,o),i=r.def(e.shared.strings,".id(",n,")");return de.optional(function(){r(e.shared.shader,".shader(",qa[t],",",i,",",e.command,");")}),i})}return null}var n,i=t.static,a=t.dynamic,o=r(ji),s=r(Oi),l=null;return qt(o)&&qt(s)?(l=c.program(s.id,o.id),n=Gt(function(t,e){return t.link(l)})):n=new Ht(o&&o.thisDep||s&&s.thisDep,o&&o.contextDep||s&&s.contextDep,o&&o.propDep||s&&s.propDep,function(t,e){var r,n=t.shared.shader;r=o?o.append(t,e):e.def(n,".",ji);var i;i=s?s.append(t,e):e.def(n,".",Oi);var a=n+".program("+i+","+r;return de.optional(function(){a+=","+t.command}),e.def(a+")")}),{frag:o,vert:s,progVar:n,program:l}}function M(t,e){function r(t,r){if(t in n){var a=0|n[t];return de.command(!r||a>=0,"invalid "+t,e.commandStr),Gt(function(t,e){return r&&(t.OFFSET=a),a})}if(t in i){var s=i[t];return Yt(s,function(e,n){var i=e.invoke(n,s);return r&&(e.OFFSET=i,de.optional(function(){e.assert(n,i+">=0","invalid "+t)})),i})}return r&&o?Gt(function(t,e){return t.OFFSET="0",0}):null}var n=t.static,i=t.dynamic,o=function(){if(Ri in n){var t=n[Ri];Ut(t)?t=a.getElements(a.create(t,!0)):t&&(t=a.getElements(t),de.command(t,"invalid elements",e.commandStr));var r=Gt(function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n,n}return e.ELEMENTS=null,null});return r.value=t,r}if(Ri in i){var o=i[Ri];return Yt(o,function(t,e){var r=t.shared,n=r.isBufferArgs,i=r.elements,a=t.invoke(e,o),s=e.def("null"),l=e.def(n,"(",a,")"),u=t.cond(l).then(s,"=",i,".createStream(",a,");").else(s,"=",i,".getElements(",a,");");return de.optional(function(){t.assert(u.else,"!"+a+"||"+s,"invalid elements")}),e.entry(u),e.exit(t.cond(l).then(i,".destroyStream(",s,");")),t.ELEMENTS=s,s})}return null}(),s=r(Bi,!0);return{elements:o,primitive:function(){if(Fi in n){var t=n[Fi];return de.commandParameter(t,Be,"invalid primitve",e.commandStr),Gt(function(e,r){return Be[t]})}if(Fi in i){var r=i[Fi];return Yt(r,function(t,e){var n=t.constants.primTypes,i=t.invoke(e,r);return de.optional(function(){t.assert(e,i+" in "+n,"invalid primitive, must be one of "+Object.keys(Be))}),e.def(n,"[",i,"]")})}return o?qt(o)?Gt(o.value?function(t,e){return e.def(t.ELEMENTS,".primType")}:function(){return Aa}):new Ht(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=t.ELEMENTS;return e.def(r,"?",r,".primType:",Aa)}):null}(),count:function(){if(Ni in n){var t=0|n[Ni];return de.command("number"==typeof t&&t>=0,"invalid vertex count",e.commandStr),Gt(function(){return t})}if(Ni in i){var r=i[Ni];return Yt(r,function(t,e){var n=t.invoke(e,r);return de.optional(function(){t.assert(e,"typeof "+n+'==="number"&&'+n+">=0&&"+n+"===("+n+"|0)","invalid vertex count")}),n})}if(o){if(qt(o)){if(o)return s?new Ht(s.thisDep,s.contextDep,s.propDep,function(t,e){var r=e.def(t.ELEMENTS,".vertCount-",t.OFFSET);return de.optional(function(){t.assert(e,r+">=0","invalid vertex offset/element buffer too small")}),r}):Gt(function(t,e){return e.def(t.ELEMENTS,".vertCount")});var a=Gt(function(){return-1});return de.optional(function(){a.MISSING=!0}),a}var l=new Ht(o.thisDep||s.thisDep,o.contextDep||s.contextDep,o.propDep||s.propDep,function(t,e){var r=t.ELEMENTS;return t.OFFSET?e.def(r,"?",r,".vertCount-",t.OFFSET,":-1"):e.def(r,"?",r,".vertCount:-1")});return de.optional(function(){l.DYNAMIC=!0}),l}return null}(),instances:r(Ui,!1),offset:s}}function k(t,e){var r=t.static,i=t.dynamic,a={};return et.forEach(function(t){function o(e,n){if(t in r){var o=e(r[t]);a[s]=Gt(function(){return o})}else if(t in i){var l=i[t];a[s]=Yt(l,function(t,e){return n(t,e,t.invoke(e,l))})}}var s=m(t);switch(t){case gi:case si:case oi:case Ai:case hi:case Ci:case xi:case wi:case Mi:case pi:return o(function(r){return de.commandType(r,"boolean",t,e.commandStr),r},function(e,r,n){return de.optional(function(){e.assert(r,"typeof "+n+'==="boolean"',"invalid flag "+t,e.commandStr)}),n});case fi:return o(function(r){return de.commandParameter(r,Va,"invalid "+t,e.commandStr),Va[r]},function(e,r,n){var i=e.constants.compareFuncs;return de.optional(function(){e.assert(r,n+" in "+i,"invalid "+t+", must be one of "+Object.keys(Va))}),r.def(i,"[",n,"]")});case di:return o(function(t){return de.command(mt(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]&&t[0]<=t[1],"depth range is 2d array",e.commandStr),t},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===2&&typeof "+r+'[0]==="number"&&typeof '+r+'[1]==="number"&&'+r+"[0]<="+r+"[1]","depth range must be a 2d array")}),[e.def("+",r,"[0]"),e.def("+",r,"[1]")]});case ci:return o(function(t){de.commandType(t,"object","blend.func",e.commandStr);var r="srcRGB"in t?t.srcRGB:t.src,n="srcAlpha"in t?t.srcAlpha:t.src,i="dstRGB"in t?t.dstRGB:t.dst,a="dstAlpha"in t?t.dstAlpha:t.dst;return de.commandParameter(r,Ba,s+".srcRGB",e.commandStr),de.commandParameter(n,Ba,s+".srcAlpha",e.commandStr),de.commandParameter(i,Ba,s+".dstRGB",e.commandStr),de.commandParameter(a,Ba,s+".dstAlpha",e.commandStr),de.command(Ua.indexOf(r+", "+i)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+r+", "+i+")",e.commandStr),[Ba[r],Ba[i],Ba[n],Ba[a]]},function(e,r,n){function i(i,o){var s=r.def('"',i,o,'" in ',n,"?",n,".",i,o,":",n,".",i);return de.optional(function(){e.assert(r,s+" in "+a,"invalid "+t+"."+i+o+", must be one of "+Object.keys(Ba))}),s}var a=e.constants.blendFuncs;de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid blend func, must be an object")});var o=i("src","RGB"),s=i("dst","RGB");de.optional(function(){var t=e.constants.invalidBlendCombinations;e.assert(r,t+".indexOf("+o+'+", "+'+s+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var l=r.def(a,"[",o,"]"),u=r.def(a,"[",i("src","Alpha"),"]");return[l,r.def(a,"[",s,"]"),u,r.def(a,"[",i("dst","Alpha"),"]")]});case ui:return o(function(r){return"string"==typeof r?(de.commandParameter(r,Z,"invalid "+t,e.commandStr),[Z[r],Z[r]]):"object"==typeof r?(de.commandParameter(r.rgb,Z,t+".rgb",e.commandStr),de.commandParameter(r.alpha,Z,t+".alpha",e.commandStr),[Z[r.rgb],Z[r.alpha]]):void de.commandRaise("invalid blend.equation",e.commandStr)},function(e,r,n){var i=e.constants.blendEquations,a=r.def(),o=r.def(),s=e.cond("typeof ",n,'==="string"');return de.optional(function(){function r(t,r,n){e.assert(t,n+" in "+i,"invalid "+r+", must be one of "+Object.keys(Z))}r(s.then,t,n),e.assert(s.else,n+"&&typeof "+n+'==="object"',"invalid "+t),r(s.else,t+".rgb",n+".rgb"),r(s.else,t+".alpha",n+".alpha")}),s.then(a,"=",o,"=",i,"[",n,"];"),s.else(a,"=",i,"[",n,".rgb];",o,"=",i,"[",n,".alpha];"),r(s),[a,o]});case li:return o(function(t){return de.command(mt(t)&&4===t.length,"blend.color must be a 4d array",e.commandStr),J(4,function(e){return+t[e]})},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===4","blend.color must be a 4d array")}),J(4,function(t){return e.def("+",r,"[",t,"]")})});case Ti:return o(function(t){return de.commandType(t,"number",s,e.commandStr),0|t},function(t,e,r){return de.optional(function(){t.assert(e,"typeof "+r+'==="number"',"invalid stencil.mask")}),e.def(r,"|0")});case Si:return o(function(r){de.commandType(r,"object",s,e.commandStr);var n=r.cmp||"keep",i=r.ref||0,a="mask"in r?r.mask:-1;return de.commandParameter(n,Va,t+".cmp",e.commandStr),de.commandType(i,"number",t+".ref",e.commandStr),de.commandType(a,"number",t+".mask",e.commandStr),[Va[n],i,a]},function(t,e,r){var n=t.constants.compareFuncs;return de.optional(function(){function i(){t.assert(e,Array.prototype.join.call(arguments,""),"invalid stencil.func")}i(r+"&&typeof ",r,'==="object"'),i('!("cmp" in ',r,")||(",r,".cmp in ",n,")")}),[e.def('"cmp" in ',r,"?",n,"[",r,".cmp]",":",Ia),e.def(r,".ref|0"),e.def('"mask" in ',r,"?",r,".mask|0:-1")]});case Ei:case Li:return o(function(r){de.commandType(r,"object",s,e.commandStr);var n=r.fail||"keep",i=r.zfail||"keep",a=r.zpass||"keep";return de.commandParameter(n,Ha,t+".fail",e.commandStr),de.commandParameter(i,Ha,t+".zfail",e.commandStr),de.commandParameter(a,Ha,t+".zpass",e.commandStr),[t===Li?Sa:Ta,Ha[n],Ha[i],Ha[a]]},function(e,r,n){function i(i){return de.optional(function(){e.assert(r,'!("'+i+'" in '+n+")||("+n+"."+i+" in "+a+")","invalid "+t+"."+i+", must be one of "+Object.keys(Ha))}),r.def('"',i,'" in ',n,"?",a,"[",n,".",i,"]:",Ia)}var a=e.constants.stencilOps;return de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)}),[t===Li?Sa:Ta,i("fail"),i("zfail"),i("zpass")]});case _i:return o(function(t){de.commandType(t,"object",s,e.commandStr);var r=0|t.factor,n=0|t.units;return de.commandType(r,"number",s+".factor",e.commandStr),de.commandType(n,"number",s+".units",e.commandStr),[r,n]},function(e,r,n){return de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)}),[r.def(n,".factor|0"),r.def(n,".units|0")]});case vi:return o(function(t){var r=0;return"front"===t?r=Ta:"back"===t&&(r=Sa),de.command(!!r,s,e.commandStr),r},function(t,e,r){return de.optional(function(){t.assert(e,r+'==="front"||'+r+'==="back"',"invalid cull.face")}),e.def(r,'==="front"?',Ta,":",Sa)});case bi:return o(function(t){return de.command("number"==typeof t&&t>=n.lineWidthDims[0]&&t<=n.lineWidthDims[1],"invalid line width, must positive number between "+n.lineWidthDims[0]+" and "+n.lineWidthDims[1],e.commandStr),t},function(t,e,r){return de.optional(function(){t.assert(e,"typeof "+r+'==="number"&&'+r+">="+n.lineWidthDims[0]+"&&"+r+"<="+n.lineWidthDims[1],"invalid line width")}),r});case yi:return o(function(t){return de.commandParameter(t,Ga,s,e.commandStr),Ga[t]},function(t,e,r){return de.optional(function(){t.assert(e,r+'==="cw"||'+r+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),e.def(r+'==="cw"?'+Ea+":"+La)});case mi:return o(function(t){return de.command(mt(t)&&4===t.length,"color.mask must be length 4 array",e.commandStr),t.map(function(t){return!!t})},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===4","invalid color.mask")}),J(4,function(t){return"!!"+r+"["+t+"]"})});case ki:return o(function(t){de.command("object"==typeof t&&t,s,e.commandStr);var r="value"in t?t.value:1,n=!!t.invert;return de.command("number"==typeof r&&r>=0&&r<=1,"sample.coverage.value must be a number between 0 and 1",e.commandStr),[r,n]},function(t,e,r){return de.optional(function(){t.assert(e,r+"&&typeof "+r+'==="object"',"invalid sample.coverage")}),[e.def('"value" in ',r,"?+",r,".value:1"),e.def("!!",r,".invert")]})}}),a}function A(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach(function(t){var n,a=r[t];if("number"==typeof a||"boolean"==typeof a)n=Gt(function(){return a});else if("function"==typeof a){var o=a._reglType;"texture2d"===o||"textureCube"===o?n=Gt(function(t){return t.link(a)}):"framebuffer"===o||"framebufferCube"===o?(de.command(a.color.length>0,'missing color attachment for framebuffer sent to uniform "'+t+'"',e.commandStr),n=Gt(function(t){return t.link(a.color[0])})):de.commandRaise('invalid data for uniform "'+t+'"',e.commandStr)}else mt(a)?n=Gt(function(e){return e.global.def("[",J(a.length,function(r){return de.command("number"==typeof a[r]||"boolean"==typeof a[r],"invalid uniform "+t,e.commandStr),a[r]}),"]")}):de.commandRaise('invalid or missing data for uniform "'+t+'"',e.commandStr);n.value=a,i[t]=n}),Object.keys(n).forEach(function(t){var e=n[t];i[t]=Yt(e,function(t,r){return t.invoke(r,e)})}),i}function T(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach(function(t){var a=n[t],s=e.id(t),l=new X;if(Ut(a))l.state=$n,l.buffer=i.getBuffer(i.create(a,Zi,!1,!0)),l.type=0;else{var u=i.getBuffer(a);if(u)l.state=$n,l.buffer=u,l.type=0;else if(de.command("object"==typeof a&&a,"invalid data for attribute "+t,r.commandStr),a.constant){var c=a.constant;l.buffer="null",l.state=ti,"number"==typeof c?l.x=c:(de.command(mt(c)&&c.length>0&&c.length<=4,"invalid constant for attribute "+t,r.commandStr),Qn.forEach(function(t,e){e=0,'invalid offset for attribute "'+t+'"',r.commandStr);var f=0|a.stride;de.command(f>=0&&f<256,'invalid stride for attribute "'+t+'", must be integer betweeen [0, 255]',r.commandStr);var d=0|a.size;de.command(!("size"in a)||d>0&&d<=4,'invalid size for attribute "'+t+'", must be 1,2,3,4',r.commandStr);var p=!!a.normalized,m=0;"type"in a&&(de.commandParameter(a.type,ze,"invalid type for attribute "+t,r.commandStr),m=ze[a.type]);var g=0|a.divisor;"divisor"in a&&(de.command(0===g||Q,'cannot specify divisor for attribute "'+t+'", instancing not supported',r.commandStr),de.command(g>=0,'invalid divisor for attribute "'+t+'"',r.commandStr)),de.optional(function(){var e=r.commandStr,n=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(a).forEach(function(r){de.command(n.indexOf(r)>=0,'unknown parameter "'+r+'" for attribute pointer "'+t+'" (valid parameters are '+n+")",e)})}),l.buffer=u,l.state=$n,l.size=d,l.normalized=p,l.type=m||u.dtype,l.offset=h,l.stride=f,l.divisor=g}}o[t]=Gt(function(t,e){var r=t.attribCache;if(s in r)return r[s];var n={isStream:!1};return Object.keys(l).forEach(function(t){n[t]=l[t]}),l.buffer&&(n.buffer=t.link(l.buffer),n.type=n.type||n.buffer+".dtype"),r[s]=n,n})}), +Object.keys(a).forEach(function(t){function e(e,n){function i(t){n(u[t],"=",a,".",t,"|0;")}var a=e.invoke(n,r),o=e.shared,s=o.isBufferArgs,l=o.buffer;de.optional(function(){e.assert(n,a+"&&(typeof "+a+'==="object"||typeof '+a+'==="function")&&('+s+"("+a+")||"+l+".getBuffer("+a+")||"+l+".getBuffer("+a+".buffer)||"+s+"("+a+'.buffer)||("constant" in '+a+"&&(typeof "+a+'.constant==="number"||'+o.isArrayLike+"("+a+".constant))))",'invalid dynamic attribute "'+t+'"')});var u={isStream:n.def(!1)},c=new X;c.state=$n,Object.keys(c).forEach(function(t){u[t]=n.def(""+c[t])});var h=u.buffer,f=u.type;return n("if(",s,"(",a,")){",u.isStream,"=true;",h,"=",l,".createStream(",Zi,",",a,");",f,"=",h,".dtype;","}else{",h,"=",l,".getBuffer(",a,");","if(",h,"){",f,"=",h,".dtype;",'}else if("constant" in ',a,"){",u.state,"=",ti,";","if(typeof "+a+'.constant === "number"){',u[Qn[0]],"=",a,".constant;",Qn.slice(1).map(function(t){return u[t]}).join("="),"=0;","}else{",Qn.map(function(t,e){return u[t]+"="+a+".constant.length>="+e+"?"+a+".constant["+e+"]:0;"}).join(""),"}}else{","if(",s,"(",a,".buffer)){",h,"=",l,".createStream(",Zi,",",a,".buffer);","}else{",h,"=",l,".getBuffer(",a,".buffer);","}",f,'="type" in ',a,"?",o.glTypes,"[",a,".type]:",h,".dtype;",u.normalized,"=!!",a,".normalized;"),i("size"),i("offset"),i("stride"),i("divisor"),n("}}"),n.exit("if(",u.isStream,"){",l,".destroyStream(",h,");","}"),u}var r=a[t];o[t]=Yt(r,e)}),o}function S(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=Gt(function(t,e){return"number"==typeof r||"boolean"==typeof r?""+r:t.link(r)})}),Object.keys(r).forEach(function(t){var e=r[t];n[t]=Yt(e,function(t,r){return t.invoke(r,e)})}),n}function E(t,e,r,n,i){function a(t){var e=u[t];e&&(h[t]=e)}var o=t.static,s=t.dynamic;de.optional(function(){function t(t){Object.keys(t).forEach(function(t){de.command(e.indexOf(t)>=0,'unknown parameter "'+t+'"',i.commandStr)})}var e=[Pi,Oi,ji,Ri,Fi,Bi,Ni,Ui,Ii].concat(et);t(o),t(s)});var l=x(t,i),u=_(t,l,i),c=M(t,i),h=k(t,i),f=w(t,i);a(Di),a(m(zi));var d=Object.keys(h).length>0,p={framebuffer:l,draw:c,shader:f,state:h,dirty:d};return p.profile=b(t,i),p.uniforms=A(r,i),p.attributes=T(e,i),p.context=S(n,i),p}function L(t,e,r){var n=t.shared,i=n.context,a=t.scope();Object.keys(r).forEach(function(n){e.save(i,"."+n);var o=r[n];a(i,".",n,"=",o.append(t,e),";")}),e(a)}function C(t,e,r,n){var i,a=t.shared,o=a.gl,s=a.framebuffer;K&&(i=e.def(a.extensions,".webgl_draw_buffers"));var l,u=t.constants,c=u.drawBuffer,h=u.backBuffer;l=r?r.append(t,e):e.def(s,".next"),n||e("if(",l,"!==",s,".cur){"),e("if(",l,"){",o,".bindFramebuffer(",Fa,",",l,".framebuffer);"),K&&e(i,".drawBuffersWEBGL(",c,"[",l,".colorAttachments.length]);"),e("}else{",o,".bindFramebuffer(",Fa,",null);"),K&&e(i,".drawBuffersWEBGL(",h,");"),e("}",s,".cur=",l,";"),n||e("}")}function z(t,e,r){var n=t.shared,i=n.gl,a=t.current,o=t.next,s=n.current,l=n.next,u=t.cond(s,".dirty");et.forEach(function(e){var n=m(e);if(!(n in r.state)){var c,h;if(n in o){c=o[n],h=a[n];var f=J($[n].length,function(t){return u.def(c,"[",t,"]")});u(t.cond(f.map(function(t,e){return t+"!=="+h+"["+e+"]"}).join("||")).then(i,".",nt[n],"(",f,");",f.map(function(t,e){return h+"["+e+"]="+t}).join(";"),";"))}else{c=u.def(l,".",n);var d=t.cond(c,"!==",s,".",n);u(d),n in rt?d(t.cond(c).then(i,".enable(",rt[n],");").else(i,".disable(",rt[n],");"),s,".",n,"=",c,";"):d(i,".",nt[n],"(",c,");",s,".",n,"=",c,";")}}}),0===Object.keys(r.state).length&&u(s,".dirty=false;"),e(u)}function D(t,e,r,n){var i=t.shared,a=t.current,o=i.current,s=i.gl;Vt(Object.keys(r)).forEach(function(i){var l=r[i];if(!n||n(l)){var u=l.append(t,e);if(rt[i]){var c=rt[i];qt(l)?u?e(s,".enable(",c,");"):e(s,".disable(",c,");"):e(t.cond(u).then(s,".enable(",c,");").else(s,".disable(",c,");")),e(o,".",i,"=",u,";")}else if(mt(u)){var h=a[i];e(s,".",nt[i],"(",u,");",u.map(function(t,e){return h+"["+e+"]="+t}).join(";"),";")}else e(s,".",nt[i],"(",u,");",o,".",i,"=",u,";")}})}function I(t,e){Q&&(t.instancing=e.def(t.shared.extensions,".angle_instanced_arrays"))}function P(t,e,r,n,i){function a(){return"undefined"==typeof performance?"Date.now()":"performance.now()"}function o(t){u=e.def(),t(u,"=",a(),";"),"string"==typeof i?t(p,".count+=",i,";"):t(p,".count++;"),d&&(n?(c=e.def(),t(c,"=",g,".getNumPendingQueries();")):t(g,".beginQuery(",p,");"))}function s(t){t(p,".cpuTime+=",a(),"-",u,";"),d&&(n?t(g,".pushScopeStats(",c,",",g,".getNumPendingQueries(),",p,");"):t(g,".endQuery();"))}function l(t){var r=e.def(m,".profile");e(m,".profile=",t,";"),e.exit(m,".profile=",r,";")}var u,c,h,f=t.shared,p=t.stats,m=f.current,g=f.timer,v=r.profile;if(v){if(qt(v))return void(v.enable?(o(e),s(e.exit),l("true")):l("false"));h=v.append(t,e),l(h)}else h=e.def(m,".profile");var y=t.block();o(y),e("if(",h,"){",y,"}");var b=t.block();s(b),e.exit("if(",h,"){",b,"}")}function O(t,e,r,n,i){function a(t){switch(t){case ua:case da:case va:return 2;case ca:case pa:case ya:return 3;case ha:case ma:case ba:return 4;default:return 1}}function o(r,n,i){function a(){e("if(!",c,".buffer){",l,".enableVertexAttribArray(",u,");}");var r,a=i.type;if(r=i.size?e.def(i.size,"||",n):n,e("if(",c,".type!==",a,"||",c,".size!==",r,"||",p.map(function(t){return c+"."+t+"!=="+i[t]}).join("||"),"){",l,".bindBuffer(",Zi,",",f,".buffer);",l,".vertexAttribPointer(",[u,r,a,i.normalized,i.stride,i.offset],");",c,".type=",a,";",c,".size=",r,";",p.map(function(t){return c+"."+t+"="+i[t]+";"}).join(""),"}"),Q){var o=i.divisor;e("if(",c,".divisor!==",o,"){",t.instancing,".vertexAttribDivisorANGLE(",[u,o],");",c,".divisor=",o,";}")}}function o(){e("if(",c,".buffer){",l,".disableVertexAttribArray(",u,");","}if(",Qn.map(function(t,e){return c+"."+t+"!=="+d[e]}).join("||"),"){",l,".vertexAttrib4f(",u,",",d,");",Qn.map(function(t,e){return c+"."+t+"="+d[e]+";"}).join(""),"}")}var l=s.gl,u=e.def(r,".location"),c=e.def(s.attributes,"[",u,"]"),h=i.state,f=i.buffer,d=[i.x,i.y,i.z,i.w],p=["buffer","normalized","offset","stride"];h===$n?a():h===ti?o():(e("if(",h,"===",$n,"){"),a(),e("}else{"),o(),e("}"))}var s=t.shared;n.forEach(function(n){var s,l=n.name,u=r.attributes[l];if(u){if(!i(u))return;s=u.append(t,e)}else{if(!i(Ya))return;var c=t.scopeAttrib(l);de.optional(function(){t.assert(e,c+".state","missing attribute "+l)}),s={},Object.keys(new X).forEach(function(t){s[t]=e.def(c,".",t)})}o(t.link(n),a(n.info.type),s)})}function j(t,r,n,i,a){for(var o,s=t.shared,l=s.gl,u=0;u1?J(_,function(t){return c+"["+t+"]"}):c);r(");")}}function R(t,e,r,n){function i(i){var a=c[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(u,".",i)}function a(){function t(){r(g,".drawElementsInstancedANGLE(",[f,p,v,d+"<<(("+v+"-"+Kn+")>>1)",m],");")}function e(){r(g,".drawArraysInstancedANGLE(",[f,d,p,m],");")}h?y?t():(r("if(",h,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(l+".drawElements("+[f,p,v,d+"<<(("+v+"-"+Kn+")>>1)"]+");")}function e(){r(l+".drawArrays("+[f,d,p]+");")}h?y?t():(r("if(",h,"){"),t(),r("}else{"),e(),r("}")):e()}var s=t.shared,l=s.gl,u=s.draw,c=n.draw,h=function(){var i,a=c.elements,o=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(o=r),i=a.append(t,o)):i=o.def(u,".",Ri),i&&o("if("+i+")"+l+".bindBuffer("+Ji+","+i+".buffer.buffer);"),i}(),f=i(Fi),d=i(Bi),p=function(){var i,a=c.count,o=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(o=r),i=a.append(t,o),de.optional(function(){a.MISSING&&t.assert(e,"false","missing vertex count"),a.DYNAMIC&&t.assert(o,i+">=0","missing vertex count")})):(i=o.def(u,".",Ni),de.optional(function(){t.assert(o,i+">=0","missing vertex count")})),i}();if("number"==typeof p){if(0===p)return}else r("if(",p,"){"),r.exit("}");var m,g;Q&&(m=i(Ui),g=t.instancing);var v=h+".type",y=c.elements&&qt(c.elements);Q&&("number"!=typeof m||m>=0)?"string"==typeof m?(r("if(",m,">0){"),a(),r("}else if(",m,"<0){"),o(),r("}")):a():o()}function F(t,e,r,n,i){var a=y(),o=a.proc("body",i);return de.optional(function(){a.commandStr=e.commandStr,a.command=a.link(e.commandStr)}),Q&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),t(a,o,r,n),a.compile().body}function N(t,e,r,n){I(t,e),O(t,e,r,n.attributes,function(){return!0}),j(t,e,r,n.uniforms,function(){return!0}),R(t,e,e,r)}function B(t,e){var r=t.proc("draw",1);I(t,r),L(t,r,e.context),C(t,r,e.framebuffer),z(t,r,e),D(t,r,e.state),P(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,".useProgram(",n,".program);"),e.shader.program)N(t,r,e,e.shader.program);else{var i=t.global.def("{}"),a=r.def(n,".id"),o=r.def(i,"[",a,"]");r(t.cond(o).then(o,".call(this,a0);").else(o,"=",i,"[",a,"]=",t.link(function(r){return F(N,t,e,r,1)}),"(",n,");",o,".call(this,a0);"))}Object.keys(e.state).length>0&&r(t.shared.current,".dirty=true;")}function U(t,e,r,n){function i(){return!0}t.batchId="a1",I(t,e),O(t,e,r,n.attributes,i),j(t,e,r,n.uniforms,i),R(t,e,e,r)}function V(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}I(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var u=t.scope(),c=t.scope();if(e(u.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",c,"}",u.exit),r.needsContext&&L(t,c,r.context),r.needsFramebuffer&&C(t,c,r.framebuffer),D(t,c,r.state,i),r.profile&&i(r.profile)&&P(t,c,r,!1,!0),n)O(t,u,r,n.attributes,a),O(t,c,r,n.attributes,i),j(t,u,r,n.uniforms,a),j(t,c,r,n.uniforms,i),R(t,u,c,r);else{var h=t.global.def("{}"),f=r.shader.progVar.append(t,c),d=c.def(f,".id"),p=c.def(h,"[",d,"]");c(t.shared.gl,".useProgram(",f,".program);","if(!",p,"){",p,"=",h,"[",d,"]=",t.link(function(e){return F(U,t,r,e,2)}),"(",f,");}",p,".call(this,a0[",s,"],",s,");")}}function H(t,e){function r(t){return t.contextDep&&i||t.propDep}var n=t.proc("batch",2);t.batchId="0",I(t,n);var i=!1,a=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(L(t,n,e.context),a=!1);var o=e.framebuffer,s=!1;o?(o.propDep?i=s=!0:o.contextDep&&i&&(s=!0),s||C(t,n,o)):C(t,n,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),z(t,n,e),D(t,n,e.state,function(t){return!r(t)}),e.profile&&r(e.profile)||P(t,n,e,!1,"a1"),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=s;var l=e.shader.progVar;if(l.contextDep&&i||l.propDep)V(t,n,e,null);else{var u=l.append(t,n);if(n(t.shared.gl,".useProgram(",u,".program);"),e.shader.program)V(t,n,e,e.shader.program);else{var c=t.global.def("{}"),h=n.def(u,".id"),f=n.def(c,"[",h,"]");n(t.cond(f).then(f,".call(this,a0,a1);").else(f,"=",c,"[",h,"]=",t.link(function(r){return F(V,t,e,r,2)}),"(",u,");",f,".call(this,a0,a1);"))}}Object.keys(e.state).length>0&&n(t.shared.current,".dirty=true;")}function q(t,r){function n(e){var n=r.shader[e];n&&i.set(a.shader,"."+e,n.append(t,i))}var i=t.proc("scope",3);t.batchId="a2";var a=t.shared,o=a.current;L(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),Vt(Object.keys(r.state)).forEach(function(e){var n=r.state[e],o=n.append(t,i);mt(o)?o.forEach(function(r,n){i.set(t.next[e],"["+n+"]",r)}):i.set(a.next,"."+e,o)}),P(t,i,r,!0,!0),[Ri,Bi,Ni,Ui,Fi].forEach(function(e){var n=r.draw[e];n&&i.set(a.draw,"."+e,""+n.append(t,i))}),Object.keys(r.uniforms).forEach(function(n){i.set(a.uniforms,"["+e.id(n)+"]",r.uniforms[n].append(t,i))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new X).forEach(function(t){i.set(a,"."+t,n[t])})}),n(Oi),n(ji),Object.keys(r.state).length>0&&(i(o,".dirty=true;"),i.exit(o,".dirty=true;")),i("a1(",t.shared.context,",a0,",t.batchId,");")}function G(t){if("object"==typeof t&&!mt(t)){for(var e=Object.keys(t),r=0;r=0;--t){var r=q[t];r&&r(E,null,0)}v.flush(),k&&k.update()}function r(){!J&&q.length>0&&(J=ve.next(e))}function n(){J&&(ve.cancel(e),J=null)}function i(t){t.preventDefault(),b=!0,n(),G.forEach(function(t){t()})}function a(t){v.getError(),b=!1,x.restore(),O.restore(),D.restore(),j.restore(),R.restore(),F.restore(),k&&k.restore(),N.procs.refresh(),r(),Y.forEach(function(t){t()})}function o(){q.length=0,n(),H&&(H.removeEventListener(eo,i),H.removeEventListener(ro,a)),O.clear(),F.clear(),R.clear(),j.clear(),I.clear(),D.clear(),k&&k.clear(),Z.forEach(function(t){t()})}function s(t){function e(t){var e={},r={};return Object.keys(t).forEach(function(n){var i=t[n];ge.isDynamic(i)?r[n]=ge.unbox(i,n):e[n]=i}),{dynamic:r,static:e}}function r(t){for(;d.length0)return h.call(this,r(0|t),0|t)}else{if(!Array.isArray(t))return c.call(this,t);if(t.length)return h.call(this,t,t.length)}}de(!!t,"invalid args to regl({...})"),de.type(t,"object","invalid args to regl({...})");var i=e(t.context||{}),a=e(t.uniforms||{}),o=e(t.attributes||{}),s=e(function(t){function e(t){if(t in r){var e=r[t];delete r[t],Object.keys(e).forEach(function(n){r[t+"."+n]=e[n]})}}var r=$t({},t);return delete r.uniforms,delete r.attributes,delete r.context,"stencil"in r&&r.stencil.op&&(r.stencil.opBack=r.stencil.opFront=r.stencil.op,delete r.stencil.op),e("blend"),e("depth"),e("cull"),e("stencil"),e("polygonOffset"),e("scissor"),e("sample"),r}(t)),l={gpuTime:0,cpuTime:0,count:0},u=N.compile(s,o,a,i,l),c=u.draw,h=u.batch,f=u.scope,d=[];return $t(n,{stats:l})}function l(t,e){var r=0;N.procs.poll();var n=e.color;n&&(v.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=Qa),"depth"in e&&(v.clearDepth(+e.depth),r|=Ka),"stencil"in e&&(v.clearStencil(0|e.stencil),r|=$a),de(!!r,"called regl.clear with no buffer specified"),v.clear(r)}function u(t){if(de("object"==typeof t&&t,"regl.clear() takes an object as input"),"framebuffer"in t)if(t.framebuffer&&"framebufferCube"===t.framebuffer_reglType)for(var e=0;e<6;++e)Q($t({framebuffer:t.framebuffer.faces[e]},t),l);else Q(t,l);else l(null,t)}function c(t){function e(){function e(){var t=Zt(q,e);q[t]=q[q.length-1],q.length-=1,q.length<=0&&n()}var r=Zt(q,t);de(r>=0,"cannot cancel a frame twice"),q[r]=e}return de.type(t,"function","regl.frame() callback must be a function"),q.push(t),r(),{cancel:e}}function h(){var t=V.viewport,e=V.scissor_box;t[0]=t[1]=e[0]=e[1]=0,E.viewportWidth=E.framebufferWidth=E.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,E.viewportHeight=E.framebufferHeight=E.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function f(){E.tick+=1,E.time=p(),h(),N.procs.poll()}function d(){h(),N.procs.refresh(),k&&k.update()}function p(){return(ye()-A)/1e3}function m(t,e){de.type(e,"function","listener callback must be a function");var r;switch(t){case"frame":return c(e);case"lost":r=G;break;case"restore":r=Y;break;case"destroy":r=Z;break;default:de.raise("invalid event, must be one of frame,lost,restore,destroy")}return r.push(e),{cancel:function(){for(var t=0;t=0},read:U,destroy:o,_gl:v,_refresh:d,poll:function(){f(),k&&k.update()},now:p,stats:w});return g.onDone(null,K),K}var Qt={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Kt=function(t){return Object.prototype.toString.call(t)in Qt},$t=function(t,e){for(var r=Object.keys(e),n=0;n=2,"invalid renderbuffer shape"),a=0|d[0],o=0|d[1]}else"radius"in f&&(a=o=0|f.radius),"width"in f&&(a=0|f.width),"height"in f&&(o=0|f.height);"format"in f&&(de.parameter(f.format,u,"invalid renderbuffer format"),l=u[f.format])}else"number"==typeof e?(a=0|e,o="number"==typeof n?0|n:a):e?de.raise("invalid arguments to renderbuffer constructor"):a=o=1;if(de(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),a!==h.width||o!==h.height||l!==h.format)return s.width=h.width=a,s.height=h.height=o,h.format=l,t.bindRenderbuffer(xn,h.renderbuffer),t.renderbufferStorage(xn,l,a,o),i.profile&&(h.stats.size=Dt(h.format,h.width,h.height)),s.format=c[h.format],s}function l(e,n){var a=0|e,o=0|n||a;return a===h.width&&o===h.height?s:(de(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),s.width=h.width=a,s.height=h.height=o,t.bindRenderbuffer(xn,h.renderbuffer),t.renderbufferStorage(xn,h.format,a,o),i.profile&&(h.stats.size=Dt(h.format,h.width,h.height)),s)}var h=new a(t.createRenderbuffer());return f[h.id]=h,n.renderbufferCount++,s(e,o),s.resize=l,s._reglType="renderbuffer",s._renderbuffer=h,i.profile&&(s.stats=h.stats),s.destroy=function(){h.decRef()},s}function l(){xe(f).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(xn,e.renderbuffer),t.renderbufferStorage(xn,e.format,e.width,e.height)}),t.bindRenderbuffer(xn,null)}var u={rgba4:_n,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};e.ext_srgb&&(u.srgba=35907),e.ext_color_buffer_half_float&&(u.rgba16f=34842,u.rgb16f=34843),e.webgl_color_buffer_float&&(u.rgba32f=34836);var c=[];Object.keys(u).forEach(function(t){var e=u[t];c[e]=t});var h=0,f={};return a.prototype.decRef=function(){--this.refCount<=0&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:s,clear:function(){xe(f).forEach(o)},restore:l}},kn=36160,An=36161,Tn=3553,Sn=34069,En=36064,Ln=36096,Cn=36128,zn=33306,Dn=36053,In=6402,Pn=[6408],On=[];On[6408]=4;var jn=[];jn[5121]=1,jn[5126]=4,jn[36193]=2;var Rn=33189,Fn=36168,Nn=34041,Bn=[32854,32855,36194,35907,34842,34843,34836],Un={};Un[Dn]="complete",Un[36054]="incomplete attachment",Un[36057]="incomplete dimensions",Un[36055]="incomplete, missing attachment",Un[36061]="unsupported" +;var Vn=5126,Hn=35632,qn=35633,Gn=35718,Yn=35721,Wn=6408,Xn=5121,Zn=3333,Jn=5126,Qn="xyzw".split(""),Kn=5121,$n=1,ti=2,ei=0,ri=1,ni=2,ii=3,ai=4,oi="dither",si="blend.enable",li="blend.color",ui="blend.equation",ci="blend.func",hi="depth.enable",fi="depth.func",di="depth.range",pi="depth.mask",mi="colorMask",gi="cull.enable",vi="cull.face",yi="frontFace",bi="lineWidth",xi="polygonOffset.enable",_i="polygonOffset.offset",wi="sample.alpha",Mi="sample.enable",ki="sample.coverage",Ai="stencil.enable",Ti="stencil.mask",Si="stencil.func",Ei="stencil.opFront",Li="stencil.opBack",Ci="scissor.enable",zi="scissor.box",Di="viewport",Ii="profile",Pi="framebuffer",Oi="vert",ji="frag",Ri="elements",Fi="primitive",Ni="count",Bi="offset",Ui="instances",Vi=Pi+"Width",Hi=Pi+"Height",qi=Di+"Width",Gi=Di+"Height",Yi="drawingBufferWidth",Wi="drawingBufferHeight",Xi=[ci,ui,Si,Ei,Li,ki,Di,zi,_i],Zi=34962,Ji=34963,Qi=3553,Ki=34067,$i=2884,ta=3042,ea=3024,ra=2960,na=2929,ia=3089,aa=32823,oa=32926,sa=32928,la=5126,ua=35664,ca=35665,ha=35666,fa=5124,da=35667,pa=35668,ma=35669,ga=35670,va=35671,ya=35672,ba=35673,xa=35674,_a=35675,wa=35676,Ma=35678,ka=35680,Aa=4,Ta=1028,Sa=1029,Ea=2304,La=2305,Ca=32775,za=32776,Da=519,Ia=7680,Pa=0,Oa=1,ja=32774,Ra=513,Fa=36160,Na=36064,Ba={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Ua=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],Va={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ha={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},qa={frag:35632,vert:35633},Ga={cw:Ea,ccw:La},Ya=new Ht(!1,!1,!1,function(){}),Wa=34918,Xa=34919,Za=35007,Ja=function(t,e){function r(){return f.pop()||h.createQueryEXT()}function n(t){f.push(t)}function i(t){var e=r();h.beginQueryEXT(Za,e),d.push(e),u(d.length-1,d.length,t)}function a(){h.endQueryEXT(Za)}function o(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}function s(){return p.pop()||new o}function l(t){p.push(t)}function u(t,e,r){var n=s();n.startQueryIndex=t,n.endQueryIndex=e,n.sum=0,n.stats=r,m.push(n)}function c(){var t,e,r=d.length;if(0!==r){v.length=Math.max(v.length,r+1),g.length=Math.max(g.length,r+1),g[0]=0,v[0]=0;var i=0;for(t=0,e=0;e=r)return a.substr(0,r);for(;r>a.length&&e>1;)1&e&&(a+=t),e>>=1,t+=t;return a+=t,a=a.substr(0,r)}var i,a="";e.exports=n},{}],482:[function(e,r,n){!function(e,i){"function"==typeof t&&t.amd?t(i):"object"==typeof n?r.exports=i():e.resolveUrl=i()}(this,function(){function t(){var t=arguments.length;if(0===t)throw new Error("resolveUrl requires at least one argument; got none.");var e=document.createElement("base");if(e.href=arguments[0],1===t)return e.href;var r=document.getElementsByTagName("head")[0];r.insertBefore(e,r.firstChild);for(var n,i=document.createElement("a"),a=1;a=0;--i){var a=r,o=t[i];r=a+o;var s=r-a,l=o-s;l&&(t[--n]=r,r=l)}for(var u=0,i=n;i>1;return["sum(",o(t.slice(0,e)),",",o(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("");for(var e=[],r=0;r>1;return["sum(",a(t.slice(0,e)),",",a(t.slice(e)),")"].join("")}function o(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return o(e,t)}function s(t){return t&!0?"-":""}function l(t){if(2===t.length)return[["diff(",o(t[0][0],t[1][1]),",",o(t[1][0],t[0][1]),")"].join("")];for(var e=[],r=0;r0&&r.push(","),r.push("[");for(var a=0;a0&&r.push(","),a===n?r.push("+b[",i,"]"):r.push("+A[",i,"][",a,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",e);var s=new Function("det",r.join(""));return s(t<6?o[t]:o)}function i(){return[0]}function a(t,e){return[[e[0]],[t[0][0]]]}var o=t("robust-determinant"),s=6,l=[i,a];!function(){for(;l.length>1;return["sum(",o(t.slice(0,e)),",",o(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],r=0;r0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=3.3306690738754716e-16*n;return o>=s||o<=-s?o:m(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],u=r[1]-n[1],c=t[2]-n[2],h=e[2]-n[2],f=r[2]-n[2],d=a*u,p=o*l,m=o*s,v=i*u,y=i*l,b=a*s,x=c*(d-p)+h*(m-v)+f*(y-b),_=(Math.abs(d)+Math.abs(p))*Math.abs(c)+(Math.abs(m)+Math.abs(v))*Math.abs(h)+(Math.abs(y)+Math.abs(b))*Math.abs(f),w=7.771561172376103e-16*_;return x>w||-x>w?x:g(t,e,r,n)}];!function(){for(;v.length<=p;)v.push(l(v.length));for(var t=[],r=["slow"],n=0;n<=p;++n)t.push("a"+n),r.push("o"+n);for(var i=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"],n=2;n<=p;++n)i.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i0&&s>0||o<0&&s<0)return!1;var l=a(r,t,e),u=a(i,t,e);return!(l>0&&u>0||l<0&&u<0)&&(0!==o||0!==s||0!==l||0!==u||n(t,e,r,i))}e.exports=i;var a=t("robust-orientation")[3]},{"robust-orientation":489}],493:[function(t,e,r){"use strict";function n(t,e){var r=t+e,n=r-t,i=r-n,a=e-n,o=t-i,s=o+a;return s?[s,r]:[r]}function i(t,e){var r=0|t.length,i=0|e.length;if(1===r&&1===i)return n(t[0],-e[0]);var a,o,s=r+i,l=new Array(s),u=0,c=0,h=0,f=Math.abs,d=t[c],p=f(d),m=-e[h],g=f(m);p=i?(a=d,(c+=1)=i?(a=d,(c+=1)0){for(var s=0,l=0,u=0;un.h||t>n.free||rc)&&(h=2*Math.max(t,c)),(ll)&&(u=2*Math.max(r,l)),this.resize(h,u),this.packOne(t,r)}return null},t.prototype.clear=function(){this.shelves=[],this.stats={}},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;rthis.free||e>this.h)return null;var r=this.x;return this.x+=t,this.free-=t,{x:r,y:this.y,w:t,h:e,width:t,height:e}},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t})},{}],496:[function(t,e,r){"use strict";e.exports=function(t){return t<0?-1:t>0?1:0}},{}],497:[function(t,e,r){"use strict";function n(t){return a(i(t))}e.exports=n;var i=t("boundary-cells"),a=t("reduce-simplicial-complex")},{"boundary-cells":62,"reduce-simplicial-complex":479}],498:[function(t,e,r){"use strict";function n(t){for(var e=t.length,r=0,n=0;n>1,v=E[2*m+1];","if(v===b){return m}","if(b1;--n){n0&&l.push(","),l.push("[");for(var n=0;n0&&l.push(","),l.push("B(C,E,c[",i[0],"],c[",i[1],"])")}l.push("]")}l.push(");")}}(i[s]),l.push("break;");l.push("}}")}return l.push("}return R;};return getContour",t,"d"),new Function("pool",l.join(""))(a)}function i(t){var e=s[t];return e||(e=s[t]=n(t)),e}e.exports=i;var a=t("typedarray-pool"),o=t("marching-simplex-table"),s={}},{"marching-simplex-table":427,"typedarray-pool":521}],500:[function(t,e,r){"use strict";"use restrict";function n(t){for(var e=0,r=Math.max,n=0,i=t.length;n>1,s=o(t[a],e);s<=0?(0===s&&(i=a),r=a+1):s>0&&(n=a-1)}return i}function h(t,e){for(var r=new Array(t.length),n=0,i=r.length;n=t.length||0!==o(t[m],a))break}return r}function f(t,e){if(!e)return h(u(p(t,0)),t,0);for(var r=new Array(e),n=0;n>>c&1&&u.push(i[c]);e.push(u)}return l(e)}function p(t,e){if(e<0)return[];for(var r=[],n=(1<>1:(t>>1)-1}function u(t){for(var e=s(t);;){var r=e,n=2*t+1,i=2*(t+1),o=t;if(n0;){var r=l(t);if(r>=0){if(e0){var t=k[0];return a(0,T-1),T-=1,u(0),t}return-1}function f(t,e){var r=k[t];return y[r]===e?t:(y[r]=-1/0,c(t),h(),y[r]=e,T+=1,c(T-1))}function d(t,e){if(t[e]<0)return e;var r=e,n=e;do{var i=t[n];if(!b[n]||i<0||i===n)break;if(n=i,i=t[n],!b[n]||i<0||i===n)break;n=i,r=t[r]}while(r!==n);for(var a=e;a!==n;a=t[a])t[a]=n;return n}for(var p=e.length,m=t.length,g=new Array(p),v=new Array(p),y=new Array(p),b=new Array(p),x=0;x>1;x>=0;--x)u(x);for(;;){var S=h();if(S<0||y[S]>r)break;!function(t){if(!b[t]){b[t]=!0;var e=g[t],r=v[t];g[r]>=0&&(g[r]=e),v[e]>=0&&(v[e]=r),A[e]>=0&&f(A[e],i(e)),A[r]>=0&&f(A[r],i(r))}}(S)}for(var E=[],x=0;x=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&L.push([n,i])}}),o.unique(o.normalize(L)),{positions:E,edges:L}}e.exports=i;var a=t("robust-orientation"),o=t("simplicial-complex")},{"robust-orientation":489,"simplicial-complex":502}],505:[function(t,e,r){"use strict";function n(t,e){var r,n;if(e[0][0]e[1][0])){var i=Math.min(t[0][1],t[1][1]),o=Math.max(t[0][1],t[1][1]),s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]);return ol?i-l:o-l}r=e[1],n=e[0]}var u,c;t[0][1]e[1][0]))return n(e,t);r=e[1],i=e[0]}var o,s;if(t[0][0]t[1][0]))return-n(t,e);o=t[1],s=t[0]}var l=a(r,i,s),u=a(r,i,o);if(l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;if(l=a(s,o,i),u=a(s,o,r),l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;return i[0]-s[0]}e.exports=i;var a=t("robust-orientation")},{"robust-orientation":489}],506:[function(t,e,r){"use strict";function n(t,e,r){this.slabs=t,this.coordinates=e,this.horizontal=r}function i(t,e){return t.y-e}function a(t,e){for(var r=null;t;){var n,i,o=t.key;o[0][0]0)if(e[0]!==o[1][0])r=t,t=t.right;else{var l=a(t.right,e);if(l)return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l=a(t.right,e);if(l)return l;t=t.left}}return r}function o(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function s(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}function l(t){for(var e=t.length,r=2*e,i=new Array(r),a=0;a0){var s=a(this.slabs[e-1],t);s&&(o?f(s.key,o)>0&&(o=s.key,n=s.value):(n=s.value,o=s.key))}var l=this.horizontal[e];if(l.length>0){var c=u.ge(l,t[1],i);if(c=l.length)return n;d=l[c]}}if(d.start)if(o){var p=h(o[0],o[1],[t[0],d.y]);o[0][0]>o[1][0]&&(p=-p),p>0&&(n=d.index)}else n=d.index;else d.y!==t[1]&&(n=d.index)}}}return n}},{"./lib/order-segments":505,"binary-search-bounds":59,"functional-red-black-tree":120,"robust-orientation":489}],507:[function(t,e,r){"use strict";function n(t,e){var r=u(l(t,e),[e[e.length-1]]);return r[r.length-1]}function i(t,e,r,n){var i=n-e,a=-e/i;a<0?a=0:a>1&&(a=1);for(var o=1-a,s=t.length,l=new Array(s),u=0;u0||o>0&&c<0){var h=i(s,c,l,o);r.push(h),a.push(h.slice())}c<0?a.push(l.slice()):c>0?r.push(l.slice()):(r.push(l.slice()),a.push(l.slice())),o=c}return{positive:r,negative:a}}function o(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l0||a>0&&u<0)&&r.push(i(o,u,s,a)),u>=0&&r.push(s.slice()),a=u}return r}function s(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l0||a>0&&u<0)&&r.push(i(o,u,s,a)),u<=0&&r.push(s.slice()),a=u}return r}var l=t("robust-dot-product"),u=t("robust-sum");e.exports=a,e.exports.positive=o,e.exports.negative=s},{"robust-dot-product":486,"robust-sum":494}],508:[function(e,r,n){!function(e){function r(){var t=arguments[0],e=r.cache;return e[t]&&e.hasOwnProperty(t)||(e[t]=r.parse(t)),r.format.call(null,e[t],arguments)}function i(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function a(t,e){return Array(e+1).join(t)}var o={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i, +key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};r.format=function(t,e){var n,s,l,u,c,h,f,d=1,p=t.length,m="",g=[],v=!0,y="";for(s=0;s=0),u[8]){case"b":n=n.toString(2);break;case"c":n=String.fromCharCode(n);break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,u[6]?parseInt(u[6]):0);break;case"e":n=u[7]?n.toExponential(u[7]):n.toExponential();break;case"f":n=u[7]?parseFloat(n).toFixed(u[7]):parseFloat(n);break;case"g":n=u[7]?parseFloat(n).toPrecision(u[7]):parseFloat(n);break;case"o":n=n.toString(8);break;case"s":n=(n=String(n))&&u[7]?n.substring(0,u[7]):n;break;case"u":n>>>=0;break;case"x":n=n.toString(16);break;case"X":n=n.toString(16).toUpperCase()}o.json.test(u[8])?g[g.length]=n:(!o.number.test(u[8])||v&&!u[3]?y="":(y=v?"+":"-",n=n.toString().replace(o.sign,"")),h=u[4]?"0"===u[4]?"0":u[4].charAt(1):" ",f=u[6]-(y+n).length,c=u[6]&&f>0?a(h,f):"",g[g.length]=u[5]?y+n+c:"0"===h?y+c+n:c+y+n)}return g.join("")},r.cache={},r.parse=function(t){for(var e=t,r=[],n=[],i=0;e;){if(null!==(r=o.text.exec(e)))n[n.length]=r[0];else if(null!==(r=o.modulo.exec(e)))n[n.length]="%";else{if(null===(r=o.placeholder.exec(e)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){i|=1;var a=[],s=r[2],l=[];if(null===(l=o.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a[a.length]=l[1];""!==(s=s.substring(l[0].length));)if(null!==(l=o.key_access.exec(s)))a[a.length]=l[1];else{if(null===(l=o.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a[a.length]=l[1]}r[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n[n.length]=r}e=e.substring(r[0].length)}return n};var s=function(t,e,n){return n=(e||[]).slice(0),n.splice(0,0,t),r.apply(null,n)};void 0!==n?(n.sprintf=r,n.vsprintf=s):(e.sprintf=r,e.vsprintf=s,"function"==typeof t&&t.amd&&t(function(){return{sprintf:r,vsprintf:s}}))}("undefined"==typeof window?this:window)},{}],509:[function(t,e,r){"use strict";function n(t){return new i(t)}function i(t){this.options=d(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function a(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}function o(t,e){var r=t.geometry.coordinates;return{x:u(r[0]),y:c(r[1]),zoom:1/0,id:e,parentId:-1}}function s(t){return{type:"Feature",properties:l(t),geometry:{type:"Point",coordinates:[h(t.x),f(t.y)]}}}function l(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return d(d({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function u(t){return t/360+.5}function c(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function h(t){return 360*(t-.5)}function f(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function d(t,e){for(var r in e)t[r]=e[r];return t}function p(t){return t.x}function m(t){return t.y}var g=t("kdbush");e.exports=n,i.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var r="prepare "+t.length+" points";e&&console.time(r),this.points=t;var n=t.map(o);e&&console.timeEnd(r);for(var i=this.options.maxZoom;i>=this.options.minZoom;i--){var a=+Date.now();this.trees[i+1]=g(n,p,m,this.options.nodeSize,Float32Array),n=this._cluster(n,i),e&&console.log("z%d: %d clusters in %dms",i,n.length,+Date.now()-a)}return this.trees[this.options.minZoom]=g(n,p,m,this.options.nodeSize,Float32Array),e&&console.timeEnd("total time"),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],n=r.range(u(t[0]),c(t[3]),u(t[2]),c(t[1])),i=[],a=0;a c)|0 },"),"generic"===e&&n.push("getters:[0],");for(var a=[],l=[],u=0;u>>7){");for(var u=0;u<1<<(1<128&&u%128==0){h.length>0&&f.push("}}");var d="vExtra"+h.length;n.push("case ",u>>>7,":",d,"(m&0x7f,",l.join(),");break;"),f=["function ",d,"(m,",l.join(),"){switch(m){"],h.push(f)}f.push("case ",127&u,":");for(var p=new Array(r),m=new Array(r),g=new Array(r),v=new Array(r),y=0,b=0;bb)&&!(u&1<<_)!=!(u&1<0&&(A="+"+g[x]+"*c");var T=p[x].length/y*.5,S=.5+v[x]/y*.5;k.push("d"+x+"-"+S+"-"+T+"*("+p[x].join("+")+A+")/("+m[x].join("+")+")")}f.push("a.push([",k.join(),"]);","break;")}n.push("}},"),h.length>0&&f.push("}}");for(var E=[],u=0;u<1<0&&(f+=.02);for(var p=new Float32Array(h),m=0,g=-.5*f,d=0;d=0?1.2:1))}function i(t,e,r,n,i,o,s){for(var l=0;l.5?l/(2-a-o):l/(a+o),a){case t:n=(e-r)/l+(e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}var i,a,o;if(t=S(t,360),e=S(e,100),r=S(r,100),0===e)i=a=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;i=n(l,s,t+1/3),a=n(l,s,t),o=n(l,s,t-1/3)}return{r:255*i,g:255*a,b:255*o}}function l(t,e,r){t=S(t,255),e=S(e,255),r=S(r,255);var n,i,a=q(t,e,r),o=H(t,e,r),s=a,l=a-o;if(i=0===a?0:l/a,a==o)n=0;else{switch(a){case t:n=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+a)%360,o.push(n(i));return o}function A(t,e){e=e||6;for(var r=n(t).toHsv(),i=r.h,a=r.s,o=r.v,s=[],l=1/e;e--;)s.push(n({h:i,s:a,v:o})),o=(o+l)%1;return s}function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function S(t,r){C(t)&&(t="100%");var n=z(t);return t=H(r,q(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function E(t){return H(1,q(0,t))}function L(t){return parseInt(t,16)}function C(t){return"string"==typeof t&&t.indexOf(".")!=-1&&1===parseFloat(t)}function z(t){return"string"==typeof t&&t.indexOf("%")!=-1}function D(t){return 1==t.length?"0"+t:""+t}function I(t){return t<=1&&(t=100*t+"%"),t}function P(t){return e.round(255*parseFloat(t)).toString(16)}function O(t){return L(t)/255}function j(t){return!!X.CSS_UNIT.exec(t)}function R(t){t=t.replace(N,"").replace(B,"").toLowerCase();var e=!1;if(Y[t])t=Y[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=X.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=X.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=X.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=X.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=X.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=X.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=X.hex8.exec(t))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),a:O(r[4]),format:e?"name":"hex8"}:(r=X.hex6.exec(t))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),format:e?"name":"hex"}:(r=X.hex4.exec(t))?{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),a:O(r[4]+""+r[4]),format:e?"name":"hex8"}:!!(r=X.hex3.exec(t))&&{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),format:e?"name":"hex"}}function F(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:e,size:r}}var N=/^\s+/,B=/\s+$/,U=0,V=e.round,H=e.min,q=e.max,G=e.random;n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,n,i,a,o,s=this.toRgb();return t=s.r/255,r=s.g/255,n=s.b/255,i=t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4),a=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),o=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*o},setAlpha:function(t){return this._a=T(t),this._roundA=V(100*this._a)/100,this},toHsv:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=l(this._r,this._g,this._b),e=V(360*t.h),r=V(100*t.s),n=V(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=o(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=o(this._r,this._g,this._b),e=V(360*t.h),r=V(100*t.s),n=V(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return c(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return h(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:V(this._r),g:V(this._g),b:V(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+V(this._r)+", "+V(this._g)+", "+V(this._b)+")":"rgba("+V(this._r)+", "+V(this._g)+", "+V(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:V(100*S(this._r,255))+"%",g:V(100*S(this._g,255))+"%",b:V(100*S(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+V(100*S(this._r,255))+"%, "+V(100*S(this._g,255))+"%, "+V(100*S(this._b,255))+"%)":"rgba("+V(100*S(this._r,255))+"%, "+V(100*S(this._g,255))+"%, "+V(100*S(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(W[c(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+f(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=n(t);r="#"+f(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(k,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]="a"===i?t[i]:I(t[i]));t=r}return n(t,e)},n.equals=function(t,e){return!(!t||!e)&&n(t).toRgbString()==n(e).toRgbString()},n.random=function(){return n.fromRatio({r:G(),g:G(),b:G()})},n.mix=function(t,e,r){r=0===r?0:r||50;var i=n(t).toRgb(),a=n(e).toRgb(),o=r/100;return n({r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a})},n.readability=function(t,r){var i=n(t),a=n(r);return(e.max(i.getLuminance(),a.getLuminance())+.05)/(e.min(i.getLuminance(),a.getLuminance())+.05)},n.isReadable=function(t,e,r){var i,a,o=n.readability(t,e);switch(a=!1,i=F(r),i.level+i.size){case"AAsmall":case"AAAlarge":a=o>=4.5;break;case"AAlarge":a=o>=3;break;case"AAAsmall":a=o>=7}return a},n.mostReadable=function(t,e,r){var i,a,o,s,l=null,u=0;r=r||{},a=r.includeFallbackColors,o=r.level,s=r.size;for(var c=0;cu&&(u=i,l=n(e[c]));return n.isReadable(t,l,{level:o,size:s})||!a?l:(r.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],r))};var Y=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},W=n.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(Y),X=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();void 0!==r&&r.exports?r.exports=n:"function"==typeof t&&t.amd?t(function(){return n}):window.tinycolor=n}(Math)},{}],515:[function(t,e,r){"use strict";function n(t,e){var r=o(getComputedStyle(t).getPropertyValue(e));return r[0]*a(r[1],t)}function i(t,e){var r=document.createElement("div");r.style["font-size"]="128"+t,e.appendChild(r);var i=n(r,"font-size")/128;return e.removeChild(r),i}function a(t,e){switch(e=e||document.body,t=(t||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case"%":return e.clientHeight/100;case"ch":case"ex":return i(t,e);case"em":return n(e,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return s;case"cm":return s/2.54;case"mm":return s/25.4;case"pt":return s/72;case"pc":return s/6}return 1}var o=t("parse-unit");e.exports=a;var s=96},{"parse-unit":456}],516:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.topojson=e.topojson||{})}(this,function(t){"use strict";function e(t,e){var n=e.id,i=e.bbox,a=null==e.properties?{}:e.properties,o=r(t,e);return null==n&&null==i?{type:"Feature",properties:a,geometry:o}:null==i?{type:"Feature",id:n,properties:a,geometry:o}:{type:"Feature",id:n,bbox:i,properties:a,geometry:o}}function r(t,e){function r(t,e){e.length&&e.pop();for(var r=h[t<0?~t:t],n=0,i=r.length;n1)n=i(t,e,r);else for(a=0,n=new Array(o=t.arcs.length);a1)for(var i,a,l=1,u=o(n[0]);lu&&(a=n[0],n[0]=n[l],n[l]=a,u=i);return n})}}var s=function(t){return t},l=function(t){if(null==(e=t.transform))return s;var e,r,n,i=e.scale[0],a=e.scale[1],o=e.translate[0],l=e.translate[1];return function(t,e){return e||(r=n=0),t[0]=(r+=t[0])*i+o,t[1]=(n+=t[1])*a+l,t}},u=function(t){function e(t){s[0]=t[0],s[1]=t[1],o(s),s[0]h&&(h=s[0]),s[1]f&&(f=s[1])}function r(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(r);break;case"Point":e(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(e)}}var n=t.bbox;if(!n){var i,a,o=l(t),s=new Array(2),u=1/0,c=u,h=-u,f=-u +;t.arcs.forEach(function(t){for(var e=-1,r=t.length;++eh&&(h=s[0]),s[1]f&&(f=s[1])});for(a in t.objects)r(t.objects[a]);n=t.bbox=[u,c,h,f]}return n},c=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r},h=function(t,r){return"GeometryCollection"===r.type?{type:"FeatureCollection",features:r.geometries.map(function(r){return e(t,r)})}:e(t,r)},f=function(t,e){function r(e){var r,n=t.arcs[e<0?~e:e],i=n[0];return t.transform?(r=[0,0],n.forEach(function(t){r[0]+=t[0],r[1]+=t[1]})):r=n[n.length-1],e<0?[r,i]:[i,r]}function n(t,e){for(var r in t){var n=t[r];delete e[n.start],delete n.start,delete n.end,n.forEach(function(t){i[t<0?~t:t]=1}),s.push(n)}}var i={},a={},o={},s=[],l=-1;return e.forEach(function(r,n){var i,a=t.arcs[r<0?~r:r];a.length<3&&!a[1][0]&&!a[1][1]&&(i=e[++l],e[l]=r,e[n]=i)}),e.forEach(function(t){var e,n,i=r(t),s=i[0],l=i[1];if(e=o[s])if(delete o[e.end],e.push(t),e.end=l,n=a[l]){delete a[n.start];var u=n===e?e:e.concat(n);a[u.start=e.start]=o[u.end=n.end]=u}else a[e.start]=o[e.end]=e;else if(e=a[l])if(delete a[e.start],e.unshift(t),e.start=s,n=o[s]){delete o[n.end];var c=n===e?e:n.concat(e);a[c.start=n.start]=o[c.end=e.end]=c}else a[e.start]=o[e.end]=e;else e=[t],a[e.start=s]=o[e.end=l]=e}),n(o,a),n(a,o),e.forEach(function(t){i[t<0?~t:t]||s.push([t])}),s},d=function(t){return r(t,n.apply(this,arguments))},p=function(t){return r(t,o.apply(this,arguments))},m=function(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error("n must be \u22652");if(t.transform)throw new Error("already quantized");var i,a=u(t),o=a[0],s=(a[2]-o)/(e-1)||1,l=a[1],c=(a[3]-l)/(e-1)||1;t.arcs.forEach(function(t){for(var e,r,n,i=1,a=1,u=t.length,h=t[0],f=h[0]=Math.round((h[0]-o)/s),d=h[1]=Math.round((h[1]-l)/c);iMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,s=0;s<3;++s)a+=t[s]*t[s],o+=i[s]*t[s];for(var s=0;s<3;++s)i[s]-=o/a*t[s];return f(i,i),i}function o(t,e,r,n,i,a,o,s){this.center=l(r),this.up=l(n),this.right=l(i),this.radius=l([a]),this.angle=l([o,s]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var u=0;u<16;++u)this.computedMatrix[u]=.5;this.recalcMatrix(0)}function s(t){t=t||{};var e=t.center||[0,0,0],r=t.up||[0,1,0],i=t.right||a(r),s=t.radius||1,l=t.theta||0,u=t.phi||0;if(e=[].slice.call(e,0,3),r=[].slice.call(r,0,3),f(r,r),i=[].slice.call(i,0,3),f(i,i),"eye"in t){var c=t.eye,p=[c[0]-e[0],c[1]-e[1],c[2]-e[2]];h(i,p,r),n(i[0],i[1],i[2])<1e-6?i=a(r):f(i,i),s=n(p[0],p[1],p[2]);var m=d(r,p)/s,g=d(i,p)/s;u=Math.acos(m),l=Math.acos(g)}return s=Math.log(s),new o(t.zoomMin,t.zoomMax,e,r,i,s,l,u)}e.exports=s;var l=t("filtered-vector"),u=t("gl-mat4/invert"),c=t("gl-mat4/rotate"),h=t("gl-vec3/cross"),f=t("gl-vec3/normalize"),d=t("gl-vec3/dot"),p=o.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,i=0,a=0,o=0;o<3;++o)a+=e[o]*r[o],i+=e[o]*e[o];for(var s=Math.sqrt(i),l=0,o=0;o<3;++o)r[o]-=e[o]*a/i,l+=r[o]*r[o],e[o]/=s;for(var u=Math.sqrt(l),o=0;o<3;++o)r[o]/=u;var c=this.computedToward;h(c,e,r),f(c,c);for(var d=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),v=Math.sin(p),y=Math.cos(m),b=Math.sin(m),x=this.computedCenter,_=g*y,w=v*y,M=b,k=-g*b,A=-v*b,T=y,S=this.computedEye,E=this.computedMatrix,o=0;o<3;++o){var L=_*r[o]+w*c[o]+M*e[o];E[4*o+1]=k*r[o]+A*c[o]+T*e[o],E[4*o+2]=L,E[4*o+3]=0}var C=E[1],z=E[5],D=E[9],I=E[2],P=E[6],O=E[10],j=z*O-D*P,R=D*I-C*O,F=C*P-z*I,N=n(j,R,F);j/=N,R/=N,F/=N,E[0]=j,E[4]=R,E[8]=F;for(var o=0;o<3;++o)S[o]=x[o]+E[2+4*o]*d;for(var o=0;o<3;++o){for(var l=0,B=0;B<3;++B)l+=E[o+4*B]*S[B];E[12+o]=-l}E[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var m=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;m[0]=i[2],m[1]=i[6],m[2]=i[10];for(var a=this.computedUp,o=this.computedRight,s=this.computedToward,l=0;l<3;++l)i[4*l]=a[l],i[4*l+1]=o[l],i[4*l+2]=s[l];c(i,i,n,m);for(var l=0;l<3;++l)a[l]=i[4*l],o[l]=i[4*l+1];this.up.set(t,a[0],a[1],a[2]),this.right.set(t,o[0],o[1],o[2])}},p.pan=function(t,e,r,i){e=e||0,r=r||0,i=i||0,this.recalcMatrix(t);var a=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),a[1]),s=a[5],l=a[9],u=n(o,s,l);o/=u,s/=u,l/=u;var c=a[0],h=a[4],f=a[8],d=c*o+h*s+f*l;c-=o*d,h-=s*d,f-=l*d;var p=n(c,h,f);c/=p,h/=p,f/=p;var m=c*e+o*r,g=h*e+s*r,v=f*e+l*r;this.center.move(t,m,g,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+i),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,a){var o=1;"number"==typeof r&&(o=0|r),(o<0||o>3)&&(o=1);var s=(o+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var l=e[o],c=e[o+4],h=e[o+8];if(a){var f=Math.abs(l),d=Math.abs(c),p=Math.abs(h),m=Math.max(f,d,p);f===m?(l=l<0?-1:1,c=h=0):p===m?(h=h<0?-1:1,l=c=0):(c=c<0?-1:1,l=h=0)}else{var g=n(l,c,h);l/=g,c/=g,h/=g}var v=e[s],y=e[s+4],b=e[s+8],x=v*l+y*c+b*h;v-=l*x,y-=c*x,b-=h*x;var _=n(v,y,b);v/=_,y/=_,b/=_;var w=c*b-h*y,M=h*v-l*b,k=l*y-c*v,A=n(w,M,k);w/=A,M/=A,k/=A,this.center.jump(t,q,G,Y),this.radius.idle(t),this.up.jump(t,l,c,h),this.right.jump(t,v,y,b);var T,S;if(2===o){var E=e[1],L=e[5],C=e[9],z=E*v+L*y+C*b,D=E*w+L*M+C*k;T=j<0?-Math.PI/2:Math.PI/2,S=Math.atan2(D,z)}else{var I=e[2],P=e[6],O=e[10],j=I*l+P*c+O*h,R=I*v+P*y+O*b,F=I*w+P*M+O*k;T=Math.asin(i(j)),S=Math.atan2(F,R)}this.angle.jump(t,S,T),this.recalcMatrix(t);var N=e[2],B=e[6],U=e[10],V=this.computedMatrix;u(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Y=V[14]/H,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-N*W,G-B*W,Y-U*W)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,a){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter,a=a||this.computedUp;var o=a[0],s=a[1],l=a[2],u=n(o,s,l);if(!(u<1e-6)){o/=u,s/=u,l/=u;var c=e[0]-r[0],h=e[1]-r[1],f=e[2]-r[2],d=n(c,h,f);if(!(d<1e-6)){c/=d,h/=d,f/=d;var p=this.computedRight,m=p[0],g=p[1],v=p[2],y=o*m+s*g+l*v;m-=y*o,g-=y*s,v-=y*l;var b=n(m,g,v);if(!(b<.01&&(m=s*f-l*h,g=l*c-o*f,v=o*h-s*c,(b=n(m,g,v))<1e-6))){m/=b,g/=b,v/=b,this.up.set(t,o,s,l),this.right.set(t,m,g,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(d));var x=s*v-l*g,_=l*m-o*v,w=o*g-s*m,M=n(x,_,w);x/=M,_/=M,w/=M;var k=o*c+s*h+l*f,A=m*c+g*h+v*f,T=x*c+_*h+w*f,S=Math.asin(i(k)),E=Math.atan2(T,A),L=this.angle._state,C=L[L.length-1],z=L[L.length-2];C%=2*Math.PI;var D=Math.abs(C+2*Math.PI-E),I=Math.abs(C-E),P=Math.abs(C-2*Math.PI-E);D0?r.pop():new ArrayBuffer(t)}function s(t){return new Uint8Array(o(t),0,t)}function l(t){return new Uint16Array(o(2*t),0,t)}function u(t){return new Uint32Array(o(4*t),0,t)}function c(t){return new Int8Array(o(t),0,t)}function h(t){return new Int16Array(o(2*t),0,t)}function f(t){return new Int32Array(o(4*t),0,t)}function d(t){return new Float32Array(o(4*t),0,t)}function p(t){return new Float64Array(o(8*t),0,t)}function m(t){return x?new Uint8ClampedArray(o(t),0,t):s(t)}function g(t){return new DataView(o(t),0,t)}function v(t){t=y.nextPow2(t);var e=y.log2(t),r=M[e];return r.length>0?r.pop():new n(t)}var y=t("bit-twiddle"),b=t("dup");e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:b([32,0]),UINT16:b([32,0]),UINT32:b([32,0]),INT8:b([32,0]),INT16:b([32,0]),INT32:b([32,0]),FLOAT:b([32,0]),DOUBLE:b([32,0]),DATA:b([32,0]),UINT8C:b([32,0]),BUFFER:b([32,0])});var x="undefined"!=typeof Uint8ClampedArray,_=e.__TYPEDARRAY_POOL;_.UINT8C||(_.UINT8C=b([32,0])),_.BUFFER||(_.BUFFER=b([32,0]));var w=_.DATA,M=_.BUFFER;r.free=function(t){if(n.isBuffer(t))M[y.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|y.log2(e);w[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=a,r.freeArrayBuffer=i,r.freeBuffer=function(t){M[y.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return o(t);switch(e){case"uint8":return s(t);case"uint16":return l(t);case"uint32":return u(t);case"int8":return c(t);case"int16":return h(t);case"int32":return f(t);case"float":case"float32":return d(t);case"double":case"float64":return p(t);case"uint8_clamped":return m(t);case"buffer":return v(t);case"data":case"dataview":return g(t);default:return null}return null},r.mallocArrayBuffer=o,r.mallocUint8=s,r.mallocUint16=l,r.mallocUint32=u,r.mallocInt8=c,r.mallocInt16=h,r.mallocInt32=f,r.mallocFloat32=r.mallocFloat=d,r.mallocFloat64=r.mallocDouble=p,r.mallocUint8Clamped=m,r.mallocDataView=g,r.mallocBuffer=v,r.clearCache=function(){for(var t=0;t<32;++t)_.UINT8[t].length=0,_.UINT16[t].length=0,_.UINT32[t].length=0,_.INT8[t].length=0,_.INT16[t].length=0,_.INT32[t].length=0,_.FLOAT[t].length=0,_.DOUBLE[t].length=0,_.UINT8C[t].length=0,w[t].length=0,M[t].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":60,buffer:70,dup:110}],522:[function(t,e,r){"use strict";"use restrict";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;en)return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},{}],525:[function(t,e,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,r){if(t&&u.isObject(t)&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}function a(t){return u.isString(t)&&(t=i(t)),t instanceof n?t.format():n.prototype.format.call(t)}function o(t,e){return i(t,!1,!0).resolve(e)}function s(t,e){return t?i(t,!1,!0).resolveObject(e):e}var l=t("punycode"),u=t("./util");r.parse=i,r.resolve=o,r.resolveObject=s,r.format=a,r.Url=n;var c=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),m=["'"].concat(p),g=["%","/","?",";","#"].concat(m),v=["/","?","#"],y={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=t("querystring");n.prototype.parse=function(t,e,r){if(!u.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=n!==-1&&n127?z+="x":z+=C[D];if(!z.match(/^[+a-z0-9A-Z_-]{0,63}$/)){var P=E.slice(0,M),O=E.slice(M+1),j=C.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);j&&(P.push(j[1]),O.unshift(j[2])),O.length&&(o="/"+O.join(".")+o),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=l.toASCII(this.hostname));var R=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+R,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!y[d])for(var M=0,L=m.length;M0)&&r.host.split("@");A&&(r.auth=A.shift(),r.host=r.hostname=A.shift())}return r.search=t.search,r.query=t.query,u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!M.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=M.slice(-1)[0],S=(r.host||t.host||M.length>1)&&("."===T||".."===T)||""===T,E=0,L=M.length;L>=0;L--)T=M[L],"."===T?M.splice(L,1):".."===T?(M.splice(L,1),E++):E&&(M.splice(L,1),E--);if(!_&&!w)for(;E--;E)M.unshift("..");!_||""===M[0]||M[0]&&"/"===M[0].charAt(0)||M.unshift(""),S&&"/"!==M.join("/").substr(-1)&&M.push("");var C=""===M[0]||M[0]&&"/"===M[0].charAt(0);if(k){r.hostname=r.host=C?"":M.length?M.shift():"";var A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");A&&(r.auth=A.shift(),r.host=r.hostname=A.shift())}return _=_||r.host&&M.length,_&&!C&&M.unshift(""),M.length?r.pathname=M.join("/"):(r.pathname=null,r.path=null),u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=h.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":526,punycode:469,querystring:473}],526:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],527:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],528:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],529:[function(t,e,r){(function(e,n){function i(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(e)?n.showHidden=e:e&&r._extend(n,e),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),l(n,t,n.depth)}function a(t,e){var r=i.styles[e];return r?"\x1b["+i.colors[r][0]+"m"+t+"\x1b["+i.colors[r][1]+"m":t}function o(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function l(t,e,n){if(t.customInspect&&e&&T(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return b(i)||(i=l(t,i,n)),i}var a=u(t,e);if(a)return a;var o=Object.keys(e),m=s(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),A(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(e);if(0===o.length){if(T(e)){var g=e.name?": "+e.name:"";return t.stylize("[Function"+g+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(k(e))return t.stylize(Date.prototype.toString.call(e),"date");if(A(e))return c(e)}var v="",y=!1,x=["{","}"];if(p(e)&&(y=!0,x=["[","]"]),T(e)){v=" [Function"+(e.name?": "+e.name:"")+"]"}if(w(e)&&(v=" "+RegExp.prototype.toString.call(e)),k(e)&&(v=" "+Date.prototype.toUTCString.call(e)),A(e)&&(v=" "+c(e)),0===o.length&&(!y||0==e.length))return x[0]+v+x[1];if(n<0)return w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var _;return _=y?h(t,e,n,m,o):o.map(function(r){return f(t,e,n,m,r,y)}),t.seen.pop(),d(_,v,x)}function u(t,e){if(_(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var a=[],o=0,s=e.length;o-1&&(s=a?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),_(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function d(t,e,r){var n=0;return t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function p(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function g(t){return null===t}function v(t){return null==t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function x(t){return"symbol"==typeof t}function _(t){return void 0===t}function w(t){return M(t)&&"[object RegExp]"===E(t)}function M(t){return"object"==typeof t&&null!==t}function k(t){return M(t)&&"[object Date]"===E(t)}function A(t){return M(t)&&("[object Error]"===E(t)||t instanceof Error)}function T(t){return"function"==typeof t}function S(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function E(t){return Object.prototype.toString.call(t)}function L(t){return t<10?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[L(t.getHours()),L(t.getMinutes()),L(t.getSeconds())].join(":");return[t.getDate(),P[t.getMonth()],e].join(" ")}function z(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.format=function(t){if(!b(t)){for(var e=[],r=0;r=a)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),s=n[r];r>3}if(i--,1===n||2===n)a+=t.readSVarint(),o+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new l(a,o));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&s.push(e),s},n.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;t.pos>3}if(n--,1===r||2===r)i+=t.readSVarint(),a+=t.readSVarint(),is&&(s=i),au&&(u=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,u]},n.prototype.toGeoJSON=function(t,e,r){function i(t){for(var e=0;e>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}var o=t("./vectortilefeature.js");e.exports=n,n.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new o(this._pbf,e,this.extent,this._keys,this._values)}},{"./vectortilefeature.js":532}],534:[function(t,e,r){"use strict";function n(t,e){return"object"==typeof e&&null!==e||(e={}),i(t,e.canvas||a,e.context||o,e)}e.exports=n;var i=t("./lib/vtext"),a=null,o=null;"undefined"!=typeof document&&(a=document.createElement("canvas"),a.width=8192,a.height=1024,o=a.getContext("2d"))},{"./lib/vtext":535}],535:[function(t,e,r){"use strict";function n(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l8192)throw new Error("vectorize-text: String too long (sorry, this will get fixed later)");var a=3*n;t.height>31}function l(t){for(var e=[],r=0,n=0,i=t.length,a=0;a=0?l[r]:e)}function e(t){var e=n(t);return e?u in e:s.indexOf(t)>=0}function r(t,e){var r,i=n(t);return i?i[u]=e:(r=s.indexOf(t),r>=0?l[r]=e:(r=s.length,l[r]=e,s[r]=t)),this}function o(t){var e,r,i=n(t);return i?u in i&&delete i[u]:!((e=s.indexOf(t))<0)&&(r=s.length-1,s[e]=void 0,l[e]=l[r],s[e]=s[r],s.length=r,l.length=r,!0)}this instanceof x||a();var s=[],l=[],u=b++;return Object.create(x.prototype,{get___:{value:i(t)},has___:{value:i(e)},set___:{value:i(r)},delete___:{value:i(o)}})};x.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof s?function(){function r(){function e(t,e){return c?u.has(t)?u.get(t):c.get___(t,e):u.get(t,e)}function r(t){return u.has(t)||!!c&&c.has___(t)}function n(t){var e=!!u.delete(t);return c?c.delete___(t)||e:e}this instanceof x||a();var l,u=new s,c=void 0,h=!1;return l=o?function(t,e){return u.set(t,e),u.has(t)||(c||(c=new x),c.set(t,e)),this}:function(t,e){if(h)try{u.set(t,e)}catch(r){c||(c=new x),c.set___(t,e)}else u.set(t,e);return this},Object.create(x.prototype,{get___:{value:i(e)},has___:{value:i(r)},set___:{value:i(l)},delete___:{value:i(n)},permitHostObjects___:{value:i(function(e){if(e!==t)throw new Error("bogus call to permitHostObjects___");h=!0})}})}o&&"undefined"!=typeof Proxy&&(Proxy=void 0),r.prototype=x.prototype,e.exports=r,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=x)}}()},{}],540:[function(t,e,r){function n(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:i(e,t)}}var i=t("./hidden-store.js");e.exports=n},{"./hidden-store.js":541}],541:[function(t,e,r){function n(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}e.exports=n},{}],542:[function(t,e,r){function n(){var t=i();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}var i=t("./create-store.js");e.exports=n},{"./create-store.js":540}],543:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":132}],544:[function(t,e,r){var n=arguments[3],i=arguments[4],a=arguments[5],o=JSON.stringify;e.exports=function(t,e){function r(t){g[t]=!0;for(var e in i[t][1]){var n=i[t][1][e];g[n]||r(n)}}for(var s,l=Object.keys(a),u=0,c=l.length;u=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a=n||{}}var o=p[i.year-p[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=p[a.year-p[0]];var l,u=o>>9&4095,c=o>>5&15,h=31&o,f=new Date(u,c-1,h),m=new Date(i.year,i.month-1,i.day);l=Math.round((m-f)/864e5);var g,v=d[a.year-d[0]];for(g=0;g<13;g++){var y=v&1<<12-g?30:29;if(l>13;return!b||g=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");var s;"object"==typeof n?(s=!1,a=n):(s=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:s}}var l;l=o.day-1;var u,c=d[o.year-d[0]],h=c>>13;u=h?o.month>h?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var f=0;f>9&4095,v=m>>5&15,y=31&m,b=new Date(g,v-1,y+l);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}var o=t("../main"),s=t("object-assign"),l=o.instance();n.prototype=new o.baseCalendar,s(n.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(c);return r?r[0]:""}var n=this._validateYear(t),i=t.month(),a=""+this.toChineseMonth(n,i);return e&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(t){if("string"==typeof t){var e=t.match(h);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=this.toChineseMonth(r,n),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(f);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=this.toChineseMonth(r,n),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"\u95f0"===e[0]&&(r=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var i=e[e.length-1];r="i"===i||"I"===i}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var n=this.intercalaryMonth(t);if(r&&e!==n||e<1||e>12)throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?!r&&e<=n?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(t=t.year(),e=t.month());var r=this.intercalaryMonth(t),n=r?12:11;if(e<0||e>n)throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>13},isIntercalaryMonth:function(t,e){t.year&&(t=t.year(),e=t.month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var n,i=this._validateYear(t,o.local.invalidyear),a=p[i-p[0]],s=a>>9&4095,u=a>>5&15,c=31&a;n=l.newDate(s,u,c),n.add(4-(n.dayOfWeek()||7),"d");var h=this.toJD(t,e,r)-n.toJD();return 1+Math.floor(h/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=d[t-d[0]];if(e>(r>>13?12:11))throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,s,r,o.local.invalidDate);t=this._validateYear(n.year()),e=n.month(),r=n.day();var i=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),u=a(t,s,r,i);return l.toJD(u.year,u.month,u.day)},fromJD:function(t){var e=l.fromJD(t),r=i(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(u),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var i=t.year(),a=t.month(),o=this.isIntercalaryMonth(i,a),s=this.toChineseMonth(i,a),l=Object.getPrototypeOf(n.prototype).add.call(this,t,e,r);if("y"===r){var u=l.year(),c=l.month(),h=this.isIntercalaryMonth(u,s),f=o&&h?this.toMonthIndex(u,s,!0):this.toMonthIndex(u,s,!1);f!==c&&l.month(f)}return l}});var u=/^\s*(-?\d\d\d\d|\d\d)[-\/](\d?\d)([iI]?)[-\/](\d?\d)/m,c=/^\d?\d[iI]?/m,h=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?\u6708/m,f=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;o.calendars.chinese=n;var d=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],p=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{"../main":561,"object-assign":452}],548:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Coptic",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()+(e.year()<0?1:0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),t<0&&t++,n.day()+30*(n.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),i.calendars.coptic=n},{"../main":561,"object-assign":452}],549:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,i.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n>=2&&n<=6},extraInfo:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return{century:o[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year()+(n.year()<0?1:0),e=n.month(),(r=n.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};i.calendars.discworld=n},{"../main":561,"object-assign":452}],550:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()+(e.year()<0?1:0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),t<0&&t++,n.day()+30*(n.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),i.calendars.ethiopian=n},{"../main":561,"object-assign":452}],551:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function i(t,e){return t-e*Math.floor(t/e)}var a=t("../main"),o=t("object-assign");n.prototype=new a.baseCalendar,o(n.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return t=t<0?t+1:t,i(7*t+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,a.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r) +;return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear).year(),this.toJD(t===-1?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,a.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===i(this.daysInYear(t),10)?30:9===e&&3===i(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var i=t<=0?t+1:t,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(var s=1;s=this.toJD(e===-1?1:e+1,7,1);)e++;for(var r=tthis.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),a.calendars.hebrew=n},{"../main":561,"object-assign":452}],552:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,i.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),e=n.month(),r=n.day(),t=t<=0?t+1:t,r+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),i.calendars.islamic=n},{"../main":561,"object-assign":452}],553:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()<0?e.year()+1:e.year();return t%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=e+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}}),i.calendars.julian=n},{"../main":561,"object-assign":452}],554:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function i(t,e){return t-e*Math.floor(t/e)}function a(t,e){return i(t-1,e)+1}var o=t("../main"),s=t("object-assign");n.prototype=new o.baseCalendar,s(n.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,o.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if(t=t.split("."),t.length<3)throw"Invalid Mayan year";for(var e=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,o.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate),!0},extraInfo:function(t,e,r){var n=this._validate(t,e,r,o.local.invalidDate),i=n.toJD(),a=this._toHaab(i),s=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[s[0]-1],tzolkinDay:s[0],tzolkinTrecena:s[1]}},_toHaab:function(t){t-=this.jdEpoch;var e=i(t+8+340,365);return[Math.floor(e/20)+1,i(e,20)]},_toTzolkin:function(t){return t-=this.jdEpoch,[a(t+20,20),a(t+4,13)]},toJD:function(t,e,r){var n=this._validate(t,e,r,o.local.invalidDate);return n.day()+20*n.month()+360*n.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),o.calendars.mayan=n},{"../main":561,"object-assign":452}],555:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar;var o=i.instance("gregorian");a(n.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidMonth),t=n.year();t<0&&t++;for(var a=n.day(),s=1;s=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),i.calendars.nanakshahi=n},{"../main":561,"object-assign":452}],556:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,i.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var a=i.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var u=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(t){var e=i.instance(),r=e.fromJD(t),n=r.year(),a=r.dayOfYear(),o=n+56;this._createMissingCalendarData(o);for(var s=9,l=this.NEPALI_CALENDAR_DATA[o][0],u=this.NEPALI_CALENDAR_DATA[o][s]-l+1;a>u;)s++,s>12&&(s=1,o++),u+=this.NEPALI_CALENDAR_DATA[o][s];var c=this.NEPALI_CALENDAR_DATA[o][s]-(u-a);return this.newDate(o,s,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,a.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var o=t-(t>=0?474:473),s=474+i(o,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(o/2820)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=t-this.toJD(475,1,1),r=Math.floor(e/1029983),n=i(e,1029983),a=2820;if(1029982!==n){var o=Math.floor(n/366),s=i(n,366);a=Math.floor((2134*o+2816*s+2815)/1028522)+o+1}var l=a+2820*r+474;l=l<=0?l-1:l;var u=t-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),h=t-this.toJD(l,c,1)+1;return this.newDate(l,c,h)}}),a.calendars.persian=n,a.calendars.jalali=n},{"../main":561,"object-assign":452}],558:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign"),o=i.instance();n.prototype=new i.baseCalendar,a(n.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(e.year());return o.leapYear(t)},weekOfYear:function(t,e,r){var n=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(n.year());return o.weekOfYear(t,n.month(),n.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),t=this._t2gYear(n.year());return o.toJD(t,n.month(),n.day())},fromJD:function(t){var e=o.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),i.calendars.taiwan=n},{"../main":561,"object-assign":452}],559:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign"),o=i.instance();n.prototype=new i.baseCalendar,a(n.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(e.year());return o.leapYear(t)},weekOfYear:function(t,e,r){var n=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(n.year());return o.weekOfYear(t,n.month(),n.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),t=this._t2gYear(n.year());return o.toJD(t,n.month(),n.day())},fromJD:function(t){var e=o.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),i.calendars.thai=n},{"../main":561,"object-assign":452}],560:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,i.local.invalidMonth),n=r.toJD()-24e5+.5,a=0,s=0;sn)return o[a]-o[a-1];a++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),a=12*(n.year()-1)+n.month()-15292;return n.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,u=e-o[r-1]+1;return this.newDate(s,l,u)},isValid:function(t,e,r){var n=i.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(t=null!=t.year?t.year:t,n=t>=1276&&t<=1500),n},_validate:function(t,e,r,n){var a=i.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}}),i.calendars.ummalqura=n +;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":561,"object-assign":452}],561:[function(t,e,r){function n(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(t,e){return t=""+t,"000000".substring(0,e-t.length)+t}function o(){this.shortYearCutoff="+10"}function s(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}var l=t("object-assign");l(n.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,i){return n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance(),n.newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,function(e){return t[e]})}},substituteChineseDigits:function(t,e){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),l(i.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),l(o.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new i(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+a(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0),i=t.day();"y"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(!function(t){for(;oe-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),i="m"===r?e:t.month(),a="d"===r?e:t.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var u=e.exports=new n;u.cdate=i,u.baseCalendar=o,u.calendars.gregorian=s},{"object-assign":452}],562:[function(t,e,r){var n=t("object-assign"),i=t("./main");n(i.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),i.local=i.regionalOptions[""],n(i.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.monthNumbers||this.local.monthNumbers,s=r.monthNamesShort||this.local.monthNamesShort,l=r.monthNames||this.local.monthNames,u=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;g+n1}),c=function(t,e,r,n){var i=""+e;if(u(t,n))for(;i.length1},b=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=e.substring(M).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=s[0].length,parseInt(s[0],10)},x=this,_=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s-1){d=1,p=m;for(var T=this.daysInMonth(f,d);p>T;T=this.daysInMonth(f,d))d++,p-=T}return h>-1?this.fromJD(h):this.newDate(f,d,p)},determineDate:function(t,e,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return e=e?e.newDate():null,t=null==t?e:"string"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}t=t.toLowerCase();for(var e=(t.match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||1/0===t||t===-1/0?e:a.today().add(t,"d"):a.newDate(t)}})},{"./main":561,"object-assign":452}],563:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}", +args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":103}],564:[function(t,e,r){"use strict";function n(t,e){var r=[];return e=+e||0,i(t.hi(t.shape[0]-1),r,e),r}e.exports=n;var i=t("./lib/zc-core")},{"./lib/zc-core":563}],565:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../color"),a=t("../../plots/cartesian/axes"),o=t("../../plots/cartesian/constants"),s=t("./attributes");e.exports=function(t,e,r,l,u){function c(r,i){return n.coerce(t,e,s,r,i)}l=l||{},u=u||{};var h=c("visible",!u.itemIsNotPlainObject),f=c("clicktoshow");if(!h&&!f)return e;c("opacity");var d=c("bgcolor"),p=c("bordercolor"),m=i.opacity(p);c("borderpad");var g=c("borderwidth"),v=c("showarrow");c("text",v?" ":"new text"),c("textangle"),n.coerceFont(c,"font",r.font),c("width"),c("align"),c("height")&&c("valign");for(var y=["x","y"],b=[-10,-30],x={_fullLayout:r},_=0;_<2;_++){var w=y[_],M=a.coerceRef(t,e,x,w,"","paper");if(a.coercePosition(e,x,c,M,w,.5),v){var k="a"+w,A=a.coerceRef(t,e,x,k,"pixel");"pixel"!==A&&A!==M&&(A=e[k]="pixel");var T="pixel"===A?b[_]:.4;a.coercePosition(e,x,c,A,k,T)}c(w+"anchor"),c(w+"shift")}if(n.noneOrAll(t,e,["x","y"]),v&&(c("arrowcolor",m?e.bordercolor:i.defaultLine),c("arrowhead"),c("arrowsize"),c("arrowwidth",2*(m&&g||1)),c("standoff"),n.noneOrAll(t,e,["ax","ay"])),f){var S=c("xclick"),E=c("yclick");e._xclick=void 0===S?e.x:S,e._yclick=void 0===E?e.y:E}var L=c("hovertext");if(L){var C=c("hoverlabel.bgcolor",i.opacity(d)?i.rgb(d):i.defaultLine),z=c("hoverlabel.bordercolor",i.contrast(C));n.coerceFont(c,"hoverlabel.font",{family:o.HOVERFONT,size:o.HOVERFONTSIZE,color:z})}return c("captureevents",!!L),e}},{"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/constants":729,"../color":578,"./attributes":567}],566:[function(t,e,r){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0},{path:"M2,2V-2H-2V2Z",backoff:0}]},{}],567:[function(t,e,r){"use strict";var n=t("./arrow_paths"),i=t("../../plots/font_attributes"),a=t("../../plots/cartesian/constants"),o=t("../../lib/extend").extendFlat;e.exports={_isLinkedToArray:"annotation",visible:{valType:"boolean",dflt:!0},text:{valType:"string"},textangle:{valType:"angle",dflt:0},font:o({},i,{}),width:{valType:"number",min:1,dflt:null},height:{valType:"number",min:1,dflt:null},opacity:{valType:"number",min:0,max:1,dflt:1},align:{valType:"enumerated",values:["left","center","right"],dflt:"center"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)"},borderpad:{valType:"number",min:0,dflt:1},borderwidth:{valType:"number",min:0,dflt:1},showarrow:{valType:"boolean",dflt:!0},arrowcolor:{valType:"color"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1},arrowsize:{valType:"number",min:.3,dflt:1},arrowwidth:{valType:"number",min:.1},standoff:{valType:"number",min:0,dflt:0},ax:{valType:"any"},ay:{valType:"any"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()]},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()]},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()]},x:{valType:"any"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},xshift:{valType:"number",dflt:0},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()]},y:{valType:"any"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"},yshift:{valType:"number",dflt:0},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1},xclick:{valType:"any"},yclick:{valType:"any"},hovertext:{valType:"string"},hoverlabel:{bgcolor:{valType:"color"},bordercolor:{valType:"color"},font:o({},i,{})},captureevents:{valType:"boolean"},_deprecated:{ref:{valType:"string"}}}},{"../../lib/extend":677,"../../plots/cartesian/constants":729,"../../plots/font_attributes":748,"./arrow_paths":566}],568:[function(t,e,r){"use strict";function n(t){var e=t._fullLayout;i.filterVisible(e.annotations).forEach(function(e){var r,n,i=a.getFromId(t,e.xref),o=a.getFromId(t,e.yref),s=3*e.arrowsize*e.arrowwidth||0;i&&i.autorange&&(r=s+e.xshift,n=s-e.xshift,e.axref===e.xref?(a.expand(i,[i.r2c(e.x)],{ppadplus:r,ppadminus:n}),a.expand(i,[i.r2c(e.ax)],{ppadplus:e._xpadplus,ppadminus:e._xpadminus})):a.expand(i,[i.r2c(e.x)],{ppadplus:Math.max(e._xpadplus,r),ppadminus:Math.max(e._xpadminus,n)})),o&&o.autorange&&(r=s-e.yshift,n=s+e.yshift,e.ayref===e.yref?(a.expand(o,[o.r2c(e.y)],{ppadplus:r,ppadminus:n}),a.expand(o,[o.r2c(e.ay)],{ppadplus:e._ypadplus,ppadminus:e._ypadminus})):a.expand(o,[o.r2c(e.y)],{ppadplus:Math.max(e._ypadplus,r),ppadminus:Math.max(e._ypadminus,n)}))})}var i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./draw").draw;e.exports=function(t){var e=t._fullLayout,r=i.filterVisible(e.annotations);if(r.length&&t._fullData.length){var s={};r.forEach(function(t){s[t.xref]=!0,s[t.yref]=!0});if(a.list(t).filter(function(t){return t.autorange&&s[t._id]}).length)return i.syncOrAsync([o,n],t)}}},{"../../lib":685,"../../plots/cartesian/axes":724,"./draw":572}],569:[function(t,e,r){"use strict";function n(t,e){var r=a(t,e);return r.on.length>0||r.explicitOff.length>0}function i(t,e){var r,n=a(t,e),i=n.on,s=n.off.concat(n.explicitOff),l={};if(i.length||s.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}j.selectAll("tspan.line").attr({y:0,x:0});var n=E.select(".annotation-math-group"),i=!n.empty(),h=d.bBox((i?n:j).node()),p=h.width,b=h.height,C=x.width||p,O=x.height||b,R=Math.round(C+2*z),F=Math.round(O+2*z);x._w=C,x._h=O;var N=!1;if(["x","y"].forEach(function(e){var n,i,a,o,s,h=x[e+"ref"]||e,f=x["a"+e+"ref"],d=c.getFromId(t,h),p=(A+("x"===e?0:-90))*Math.PI/180,m=R*Math.cos(p),g=F*Math.sin(p),v=Math.abs(m)+Math.abs(g),b=x[e+"anchor"],_=x[e+"shift"]*("x"===e?1:-1),w=k[e];if(d){var M=d.r2fraction(x[e]);if((t._dragging||!d.autorange)&&(M<0||M>1)&&(f===h?((M=d.r2fraction(x["a"+e]))<0||M>1)&&(N=!0):N=!0,N))return;n=d._offset+d.r2p(x[e]),o=.5}else"x"===e?(a=x[e],n=y.l+y.w*a):(a=1-x[e],n=y.t+y.h*a),o=x.showarrow?.5:a;if(x.showarrow){w.head=n;var T=x["a"+e];s=m*r(.5,x.xanchor)-g*r(.5,x.yanchor),f===h?(w.tail=d._offset+d.r2p(T),i=s):(w.tail=n+T,i=s+T),w.text=w.tail+s;var S=l["x"===e?"width":"height"];if("paper"===h&&(w.head=u.constrain(w.head,1,S-1)),"pixel"===f){var E=-Math.max(w.tail-3,w.text),L=Math.min(w.tail+3,w.text)-S;E>0?(w.tail+=E,w.text+=E):L>0&&(w.tail-=L,w.text-=L)}w.tail+=_,w.head+=_}else s=v*r(o,b),i=s,w.text=n+s;w.text+=_,s+=_,i+=_,x["_"+e+"padplus"]=v/2+i,x["_"+e+"padminus"]=v/2-i,x["_"+e+"size"]=v,x["_"+e+"shift"]=s}),N)return void E.remove();var B=0,U=0;if("left"!==x.align&&(B=(C-p)*("center"===x.align?.5:1)),"top"!==x.valign&&(U=(O-b)*("middle"===x.valign?.5:1)),i)n.select("svg").attr({x:z+B-1,y:z+U}).call(d.setClipUrl,I?_:null);else{var V=z+U-h.top,H=z+B-h.left;j.attr({x:H,y:V}).call(d.setClipUrl,I?_:null),j.selectAll("tspan.line").attr({y:V,x:H})}P.select("rect").call(d.setRect,z,z,C,O),D.call(d.setRect,L/2,L/2,R-L,F-L),E.call(d.setTranslate,Math.round(k.x.text-R/2),Math.round(k.y.text-F/2)),S.attr({transform:"rotate("+A+","+k.x.text+","+k.y.text+")"});var q="annotations["+e+"]",G=function(r,n){o.select(t).selectAll('.annotation-arrow-g[data-index="'+e+'"]').remove();var i=k.x.head,l=k.y.head,c=k.x.tail+r,h=k.y.tail+n,p=k.x.text+r,m=k.y.text+n,b=u.rotationXYMatrix(A,p,m),_=u.apply2DTransform(b),L=u.apply2DTransform2(b),C=+D.attr("width"),z=+D.attr("height"),I=p-.5*C,P=I+C,O=m-.5*z,j=O+z,R=[[I,O,I,j],[I,j,P,j],[P,j,P,O],[P,O,I,O]].map(L);if(!R.reduce(function(t,e){return t^!!a(i,l,i+1e6,l+1e6,e[0],e[1],e[2],e[3])},!1)){R.forEach(function(t){var e=a(c,h,i,l,t[0],t[1],t[2],t[3]);e&&(c=e.x,h=e.y)});var F=x.arrowwidth,N=x.arrowcolor,B=T.append("g").style({opacity:f.opacity(N)}).classed("annotation-arrow-g",!0).attr("data-index",String(e)),U=B.append("path").attr("d","M"+c+","+h+"L"+i+","+l).style("stroke-width",F+"px").call(f.stroke,f.rgb(N));if(v(U,x.arrowhead,"end",x.arrowsize,x.standoff),t._context.editable&&U.node().parentNode){var V=i,H=l;if(x.standoff){var G=Math.sqrt(Math.pow(i-c,2)+Math.pow(l-h,2));V+=x.standoff*(c-i)/G,H+=x.standoff*(h-l)/G}var Y,W,X,Z=B.append("path").classed("annotation",!0).classed("anndrag",!0).attr({"data-index":String(e),d:"M3,3H-3V-3H3ZM0,0L"+(c-V)+","+(h-H),transform:"translate("+V+","+H+")"}).style("stroke-width",F+6+"px").call(f.stroke,"rgba(0,0,0,0)").call(f.fill,"rgba(0,0,0,0)");g.init({element:Z.node(),prepFn:function(){var t=d.getTranslate(E);W=t.x,X=t.y,Y={},w&&w.autorange&&(Y[w._name+".autorange"]=!0),M&&M.autorange&&(Y[M._name+".autorange"]=!0)},moveFn:function(t,e){var r=_(W,X),n=r[0]+t,i=r[1]+e;E.call(d.setTranslate,n,i),Y[q+".x"]=w?w.p2r(w.r2p(x.x)+t):x.x+t/y.w,Y[q+".y"]=M?M.p2r(M.r2p(x.y)+e):x.y-e/y.h,x.axref===x.xref&&(Y[q+".ax"]=w.p2r(w.r2p(x.ax)+t)),x.ayref===x.yref&&(Y[q+".ay"]=M.p2r(M.r2p(x.ay)+e)),B.attr("transform","translate("+t+","+e+")"),S.attr({transform:"rotate("+A+","+n+","+i+")"})},doneFn:function(e){if(e){s.relayout(t,Y);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}};if(x.showarrow&&G(0,0),t._context.editable){var Y,W;g.init({element:E.node(),prepFn:function(){W=S.attr("transform"),Y={}},moveFn:function(t,e){var r="pointer";if(x.showarrow)x.axref===x.xref?Y[q+".ax"]=w.p2r(w.r2p(x.ax)+t):Y[q+".ax"]=x.ax+t,x.ayref===x.yref?Y[q+".ay"]=M.p2r(M.r2p(x.ay)+e):Y[q+".ay"]=x.ay+e,G(t,e);else{if(w)Y[q+".x"]=x.x+t/w._m;else{var n=x._xsize/y.w,i=x.x+(x._xshift-x.xshift)/y.w-n/2;Y[q+".x"]=g.align(i+t/y.w,n,0,1,x.xanchor)}if(M)Y[q+".y"]=x.y+e/M._m;else{var a=x._ysize/y.h,o=x.y-(x._yshift+x.yshift)/y.h-a/2;Y[q+".y"]=g.align(o-e/y.h,a,0,1,x.yanchor)}w&&M||(r=g.getCursor(w?.5:Y[q+".x"],M?.5:Y[q+".y"],x.xanchor,x.yanchor))}S.attr({transform:"translate("+t+","+e+")"+W}),m(E,r)},doneFn:function(e){if(m(E),e){s.relayout(t,Y);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}var i=t.layout,l=t._fullLayout,y=t._fullLayout._size;l._infolayer.selectAll('.annotation[data-index="'+e+'"]').remove();var b=(i.annotations||[])[e],x=l.annotations[e],_="clip"+l._uid+"_ann"+e;if(!b||x.visible===!1)return void o.selectAll("#"+_).remove();var w=c.getFromId(t,x.xref),M=c.getFromId(t,x.yref),k={x:{},y:{}},A=+x.textangle||0,T=l._infolayer.append("g").classed("annotation",!0).attr("data-index",String(e)).style("opacity",x.opacity),S=T.append("g").classed("annotation-text-g",!0).attr("data-index",String(e)),E=S.append("g").style("pointer-events",x.captureevents?"all":null).call(m,"default").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",{index:e,annotation:b,fullAnnotation:x})});x.hovertext&&E.on("mouseover",function(){var e=x.hoverlabel,r=e.font,n=this.getBoundingClientRect(),i=t.getBoundingClientRect();h.loneHover({x0:n.left-i.left,x1:n.right-i.left,y:(n.top+n.bottom)/2-i.top,text:x.hovertext,color:e.bgcolor,borderColor:e.bordercolor,fontFamily:r.family,fontSize:r.size,fontColor:r.color},{container:l._hoverlayer.node(),outerContainer:l._paper.node()})}).on("mouseout",function(){h.loneUnhover(l._hoverlayer.node())});var L=x.borderwidth,C=x.borderpad,z=L+C,D=E.append("rect").attr("class","bg").style("stroke-width",L+"px").call(f.stroke,x.bordercolor).call(f.fill,x.bgcolor),I=x.width||x.height,P=l._defs.select(".clips").selectAll("#"+_).data(I?[0]:[]);P.enter().append("clipPath").classed("annclip",!0).attr("id",_).append("rect"),P.exit().remove();var O=x.font,j=E.append("text").classed("annotation",!0).attr("data-unformatted",x.text).text(x.text);t._context.editable?j.call(p.makeEditable,E).call(r).on("edit",function(n){x.text=n,this.attr({"data-unformatted":x.text}),this.call(r);var i={};i["annotations["+e+"].text"]=x.text,w&&w.autorange&&(i[w._name+".autorange"]=!0),M&&M.autorange&&(i[M._name+".autorange"]=!0),s.relayout(t,i)}):j.call(r)}function a(t,e,r,n,i,a,o,s){var l=r-t,u=i-t,c=o-i,h=n-e,f=a-e,d=s-a,p=l*d-c*h;if(0===p)return null;var m=(u*d-c*f)/p,g=(u*h-l*f)/p;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+h*m}}var o=t("d3"),s=t("../../plotly"),l=t("../../plots/plots"),u=t("../../lib"),c=t("../../plots/cartesian/axes"),h=t("../../plots/cartesian/graph_interact"),f=t("../color"),d=t("../drawing"),p=t("../../lib/svg_text_utils"),m=t("../../lib/setcursor"),g=t("../dragelement"),v=t("./draw_arrow_head");e.exports={draw:n,drawOne:i}},{"../../lib":685,"../../lib/setcursor":700,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"../../plots/plots":787,"../color":578,"../dragelement":599,"../drawing":602,"./draw_arrow_head":573,d3:107}],573:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("../color"),o=t("../drawing"),s=t("./arrow_paths");e.exports=function(t,e,r,l,u){function c(){t.style("stroke-dasharray","0px,100px")}function h(r,i){d.path&&(e>5&&(i=0),n.select(f.parentElement).append("path").attr({class:t.attr("class"),d:d.path,transform:"translate("+r.x+","+r.y+")rotate("+180*i/Math.PI+")scale("+y+")"}).style({fill:b,opacity:x,"stroke-width":0}))}i(l)||(l=1);var f=t.node(),d=s[e||0];"string"==typeof r&&r||(r="end");var p,m,g,v,y=(o.getPx(t,"stroke-width")||1)*l,b=t.style("stroke")||a.defaultLine,x=t.style("stroke-opacity")||1,_=r.indexOf("start")>=0,w=r.indexOf("end")>=0,M=d.backoff*y+u;if("line"===f.nodeName){p={x:+t.attr("x1"),y:+t.attr("y1")},m={x:+t.attr("x2"),y:+t.attr("y2")};var k=p.x-m.x,A=p.y-m.y;if(g=Math.atan2(A,k),v=g+Math.PI,M){if(M*M>k*k+A*A)return void c();var T=M*Math.cos(g),S=M*Math.sin(g);_&&(p.x-=T,p.y-=S,t.attr({x1:p.x,y1:p.y})),w&&(m.x+=T,m.y+=S,t.attr({x2:m.x,y2:m.y}))}}else if("path"===f.nodeName){var E=f.getTotalLength(),L="";if(E=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}var i=t("tinycolor2"),a=t("fast-isnumeric"),o=e.exports={},s=t("./attributes");o.defaults=s.defaults;var l=o.defaultLine=s.defaultLine;o.lightLine=s.lightLine;var u=o.background=s.background;o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(i(t))},o.opacity=function(t){return t?i(t).getAlpha():0},o.addOpacity=function(t,e){var r=i(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=i(t).toRgb();if(1===r.a)return i(t).toRgbString();var n=i(e||u).toRgb(),a=1===n.a?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return i(o).toRgbString()},o.contrast=function(t,e,r){var n=i(t);return 1!==n.getAlpha()&&(n=i(o.combine(t,u))),(n.isDark()?e?n.lighten(e):u:r?n.darken(r):l).toString()},o.stroke=function(t,e){var r=i(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=i(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,i,a,s=Object.keys(t);for(e=0;es&&(a[1]-=(st-s)/2):r.node()&&!r.classed("js-placeholder")&&(st=d.bBox(e.node()).height),st){if(st+=5,"top"===_.titleside)$.domain[1]-=st/T.h,a[1]*=-1;else{$.domain[0]+=st/T.h;var u=Math.max(1,r.selectAll("tspan.line").size());a[1]+=(1-u)*s}e.attr("transform","translate("+a+")"),$.setScale()}}at.selectAll(".cbfills,.cblines,.cbaxis").attr("transform","translate(0,"+Math.round(T.h*(1-$.domain[1]))+")");var h=at.select(".cbfills").selectAll("rect.cbfill").data(C);h.enter().append("rect").classed("cbfill",!0).style("stroke","none"),h.exit().remove(),h.each(function(t,e){var r=[0===e?E[0]:(C[e]+C[e-1])/2,e===C.length-1?E[1]:(C[e]+C[e+1])/2].map($.c2p).map(Math.round);e!==C.length-1&&(r[1]+=r[1]>r[0]?1:-1);var a=D(t).replace("e-",""),o=i(a).toHexString();n.select(this).attr({x:W,width:Math.max(B,2),y:n.min(r),height:Math.max(n.max(r)-n.min(r),2),fill:o})});var f=at.select(".cblines").selectAll("path.cbline").data(_.line.color&&_.line.width?L:[]);return f.enter().append("path").classed("cbline",!0),f.exit().remove(),f.each(function(t){n.select(this).attr("d","M"+W+","+(Math.round($.c2p(t))+_.line.width/2%1)+"h"+B).call(d.lineGroupStyle,_.line.width,z(t),_.line.dash)}),$._axislayer.selectAll("g."+$._id+"tick,path").remove(),$._pos=W+B+(_.outlinewidth||0)/2-("outside"===_.ticks?1:0),$.side="right",c.syncOrAsync([function(){return l.doTicks(t,$,!0)},function(){if(["top","bottom"].indexOf(_.titleside)===-1){var e=$.titlefont.size,r=$._offset+$._length/2,i=T.l+($.position||0)*T.w+("right"===$.side?10+e*($.showticklabels?1:.5):-10-e*($.showticklabels?.5:0));M("h"+$._id+"title",{avoid:{selection:n.select(t).selectAll("g."+$._id+"tick"),side:_.titleside,offsetLeft:T.l,offsetTop:T.t,maxShift:A.width},attributes:{x:i,y:r,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}}])}function M(e,r){var n,i=x();n=s.traceIs(i,"markerColorscale")?"marker.colorbar.title":"colorbar.title";var a={propContainer:$,propName:n,traceIndex:i.index,dfltName:"colorscale",containerGroup:at.select(".cbtitle")},o="h"===e.charAt(0)?e.substr(1):"h"+e;at.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(t,e,h(a,r||{}))}function k(){var r=B+_.outlinewidth/2+d.bBox($._axislayer.node()).width;if(R=ot.select("text"),R.node()&&!R.classed("js-placeholder")){var n,i=ot.select(".h"+$._id+"title-math-group").node();n=i&&["top","bottom"].indexOf(_.titleside)!==-1?d.bBox(i).width:d.bBox(ot.node()).right-W-T.l,r=Math.max(r,n)}var a=2*_.xpad+r+_.borderwidth+_.outlinewidth/2,s=J-Q;at.select(".cbbg").attr({x:W-_.xpad-(_.borderwidth+_.outlinewidth)/2,y:Q-G,width:Math.max(a,2),height:Math.max(s+2*G,2)}).call(p.fill,_.bgcolor).call(p.stroke,_.bordercolor).style({"stroke-width":_.borderwidth}),at.selectAll(".cboutline").attr({x:W,y:Q+_.ypad+("top"===_.titleside?st:0),width:Math.max(B,2),height:Math.max(s-2*_.ypad-st,2)}).call(p.stroke,_.outlinecolor).style({fill:"None","stroke-width":_.outlinewidth});var l=({center:.5,right:1}[_.xanchor]||0)*a;at.attr("transform","translate("+(T.l-l)+","+T.t+")"),o.autoMargin(t,e,{x:_.x,y:_.y,l:a*({right:1,center:.5}[_.xanchor]||0),r:a*({left:1,center:.5}[_.xanchor]||0),t:s*({bottom:1,middle:.5}[_.yanchor]||0),b:s*({top:1,middle:.5}[_.yanchor]||0)})}var A=t._fullLayout,T=A._size +;if("function"!=typeof _.fillcolor&&"function"!=typeof _.line.color)return void A._infolayer.selectAll("g."+e).remove();var S,E=n.extent(("function"==typeof _.fillcolor?_.fillcolor:_.line.color).domain()),L=[],C=[],z="function"==typeof _.line.color?_.line.color:function(){return _.line.color},D="function"==typeof _.fillcolor?_.fillcolor:function(){return _.fillcolor},I=_.levels.end+_.levels.size/100,P=_.levels.size,O=1.001*E[0]-.001*E[1],j=1.001*E[1]-.001*E[0];for(S=_.levels.start;(S-I)*P<0;S+=P)S>O&&SE[0]&&S1){var it=Math.pow(10,Math.floor(Math.log(nt)/Math.LN10));et*=it*c.roundUp(nt/it,[2,5,10]),(Math.abs(_.levels.start)/_.levels.size+1e-6)%1<2e-6&&($.tick0=0)}$.dtick=et}$.domain=[Z+Y,Z+H-Y],$.setScale();var at=A._infolayer.selectAll("g."+e).data([0]);at.enter().append("g").classed(e,!0).each(function(){var t=n.select(this);t.append("rect").classed("cbbg",!0),t.append("g").classed("cbfills",!0),t.append("g").classed("cblines",!0),t.append("g").classed("cbaxis",!0).classed("crisp",!0),t.append("g").classed("cbtitleunshift",!0).append("g").classed("cbtitle",!0),t.append("rect").classed("cboutline",!0),t.select(".cbtitle").datum(0)}),at.attr("transform","translate("+Math.round(T.l)+","+Math.round(T.t)+")");var ot=at.select(".cbtitleunshift").attr("transform","translate(-"+Math.round(T.l)+",-"+Math.round(T.t)+")");$._axislayer=at.select(".cbaxis");var st=0;if(["top","bottom"].indexOf(_.titleside)!==-1){var lt,ut=T.l+(_.x+q)*T.w,ct=$.titlefont.size;lt="top"===_.titleside?(1-(Z+H-Y))*T.h+T.t+3+.75*ct:(1-(Z+Y))*T.h+T.t-3-.25*ct,M($._id+"title",{attributes:{x:ut,y:lt,"text-anchor":"start"}})}var ht=c.syncOrAsync([o.previousPromises,w,o.previousPromises,k],t);if(ht&&ht.then&&(t._promises||[]).push(ht),t._context.editable){var ft,dt,pt;u.init({element:at.node(),prepFn:function(){ft=at.attr("transform"),f(at)},moveFn:function(t,e){at.attr("transform",ft+" translate("+t+","+e+")"),dt=u.align(X+t/T.w,U,0,1,_.xanchor),pt=u.align(Z-e/T.h,H,0,1,_.yanchor);var r=u.getCursor(dt,pt,_.xanchor,_.yanchor);f(at,r)},doneFn:function(e){f(at),e&&void 0!==dt&&void 0!==pt&&a.restyle(t,{"colorbar.x":dt,"colorbar.y":pt},x().index)}})}return ht}function x(){var r,n,i=e.substr(2);for(r=0;r=0?i.Reds:i.Blues,l.colorscale=m,s.reversescale&&(m=a(m)),s.colorscale=m)}},{"../../lib":685,"./flip_scale":589,"./scales":596}],585:[function(t,e,r){"use strict";var n=t("./attributes"),i=t("../../lib/extend").extendDeep;t("./scales.js");e.exports=function(t){return{color:{valType:"color",arrayOk:!0},colorscale:i({},n.colorscale,{}),cauto:i({},n.zauto,{}),cmax:i({},n.zmax,{}),cmin:i({},n.zmin,{}),autocolorscale:i({},n.autocolorscale,{}),reversescale:i({},n.reversescale,{})}}},{"../../lib/extend":677,"./attributes":583,"./scales.js":596}],586:[function(t,e,r){"use strict";var n=t("./scales");e.exports=n.RdBu},{"./scales":596}],587:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../colorbar/has_colorbar"),o=t("../colorbar/defaults"),s=t("./is_valid_scale"),l=t("./flip_scale");e.exports=function(t,e,r,u,c){var h=c.prefix,f=c.cLetter,d=h.slice(0,h.length-1),p=h?i.nestedProperty(t,d).get()||{}:t,m=h?i.nestedProperty(e,d).get()||{}:e,g=p[f+"min"],v=p[f+"max"],y=p.colorscale;u(h+f+"auto",!(n(g)&&n(v)&&g=0;i--,a++)e=t[i],n[a]=[1-e[0],e[1]];return n}},{}],590:[function(t,e,r){"use strict";var n=t("./scales"),i=t("./default_scale"),a=t("./is_valid_scale_array");e.exports=function(t,e){function r(){try{t=n[t]||JSON.parse(t)}catch(r){t=e}}return e||(e=i),t?("string"==typeof t&&(r(),"string"==typeof t&&r()),a(t)?t:e):e}},{"./default_scale":586,"./is_valid_scale_array":594,"./scales":596}],591:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("./is_valid_scale");e.exports=function(t,e){var r=e?i.nestedProperty(t,e).get()||{}:t,o=r.color,s=!1;if(Array.isArray(o))for(var l=0;l4/3-s?o:s}},{}],598:[function(t,e,r){"use strict";var n=t("../../lib"),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},{"../../lib":685}],599:[function(t,e,r){"use strict";function n(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function i(t){t._dragging=!1,t._replotPending&&a.plot(t)}var a=t("../../plotly"),o=t("../../lib"),s=t("../../plots/cartesian/constants"),l=t("../../constants/interactions"),u=e.exports={};u.align=t("./align"),u.getCursor=t("./cursor");var c=t("./unhover");u.unhover=c.wrapped,u.unhoverRaw=c.raw,u.init=function(t){function e(e){return t.element.onmousemove=m,g._dragged=!1,g._dragging=!0,c=e.clientX,h=e.clientY,p=e.target,f=(new Date).getTime(),f-g._mouseDownTimey&&(v=Math.max(v-1,1)),t.doneFn&&t.doneFn(g._dragged,v,e),!g._dragged){var r;try{r=new MouseEvent("click",e)}catch(t){r=document.createEvent("MouseEvents"),r.initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}p.dispatchEvent(r)}return i(g),g._dragged=!1,o.pauseEvent(e)}var c,h,f,d,p,m,g=o.getPlotDiv(t.element)||{},v=1,y=l.DBLCLICKDELAY;g._mouseDownTime||(g._mouseDownTime=0),m=t.element.onmousemove,t.setCursor&&(t.element.onmousemove=t.setCursor),t.element.onmousedown=e,t.element.style.pointerEvents="all"},u.coverSlip=n},{"../../constants/interactions":665,"../../lib":685,"../../plotly":719,"../../plots/cartesian/constants":729,"./align":597,"./cursor":598,"./unhover":600}],600:[function(t,e,r){"use strict";var n=t("../../lib/events"),i=e.exports={};i.wrapped=function(t,e,r){"string"==typeof t&&(t=document.getElementById(t)),t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),i.raw(t,e,r)},i.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&n.triggerHandler(t,"plotly_beforehover",e)===!1||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},{"../../lib/events":676}],601:[function(t,e,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid"}},{}],602:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){if(s.traceIs(r,"symbols")){var u=p(r);e.attr("d",function(t){var e;e="various"===t.ms||"various"===a.size?3:d.isBubble(r)?u(t.ms):(a.size||6)/2,t.mrc=e;var n=m.symbolNumber(t.mx||a.symbol)||0,i=n%100;return t.om=n%200>=100,m.symbolFuncs[i](e)+(n>=200?y:"")}).style("opacity",function(t){return(t.mo+1||a.opacity+1)-1})}var c,h,f;t.so?(f=o.outlierwidth,h=o.outliercolor,c=a.outliercolor):(f=(t.mlw+1||o.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,h="mlc"in t?t.mlcc=i(t.mlc):Array.isArray(o.color)?l.defaultLine:o.color,c="mc"in t?t.mcc=n(t.mc):Array.isArray(a.color)?l.defaultLine:a.color||"rgba(0,0,0,0)"),t.om?e.call(l.stroke,c).style({"stroke-width":(f||1)+"px",fill:"none"}):(e.style("stroke-width",f+"px").call(l.fill,c),f&&e.call(l.stroke,h))}function i(t,e,r,n){var i=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],u=Math.pow(i*i+o*o,x/2),c=Math.pow(s*s+l*l,x/2),h=(c*c*i-u*u*s)*n,f=(c*c*o-u*u*l)*n,d=3*c*(u+c),p=3*u*(u+c);return[[a.round(e[0]+(d&&h/d),2),a.round(e[1]+(d&&f/d),2)],[a.round(e[0]-(p&&h/p),2),a.round(e[1]-(p&&f/p),2)]]}var a=t("d3"),o=t("fast-isnumeric"),s=t("../../registry"),l=t("../color"),u=t("../colorscale"),c=t("../../lib"),h=t("../../lib/svg_text_utils"),f=t("../../constants/xmlns_namespaces"),d=t("../../traces/scatter/subtypes"),p=t("../../traces/scatter/make_bubble_size_func"),m=e.exports={};m.font=function(t,e,r,n){e&&e.family&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(l.fill,n)},m.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},m.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},m.setRect=function(t,e,r,n,i){t.call(m.setPosition,e,r).call(m.setSize,n,i)},m.translatePoint=function(t,e,r,n){var i=t.xp||r.c2p(t.x),a=t.yp||n.c2p(t.y);o(i)&&o(a)&&e.node()?"text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform","translate("+i+","+a+")"):e.remove()},m.translatePoints=function(t,e,r,n){t.each(function(t){var i=a.select(this);m.translatePoint(t,i,e,r,n)})},m.getPx=function(t,e){return Number(t.style(e).replace(/px$/,""))},m.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},m.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";l.stroke(e,n||a.color),m.dashLine(e,s,o)},m.lineGroupStyle=function(t,e,r,n){t.style("fill","none").each(function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},o=e||i.width||0,s=n||i.dash||"";a.select(this).call(l.stroke,r||i.color).call(m.dashLine,s,o)})},m.dashLine=function(t,e,r){r=+r||0,e=m.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},m.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},m.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(e){var r=a.select(this);try{r.call(l.fill,e[0].trace.fillcolor)}catch(e){c.error(e,t),r.remove()}})};var g=t("./symbol_defs");m.symbolNames=[],m.symbolFuncs=[],m.symbolNeedLines={},m.symbolNoDot={},m.symbolList=[],Object.keys(g).forEach(function(t){var e=g[t];m.symbolList=m.symbolList.concat([e.n,t,e.n+100,t+"-open"]),m.symbolNames[e.n]=t,m.symbolFuncs[e.n]=e.f,e.needLine&&(m.symbolNeedLines[e.n]=!0),e.noDot?m.symbolNoDot[e.n]=!0:m.symbolList=m.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"])});var v=m.symbolNames.length,y="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";m.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=m.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=v||t>=400?0:Math.floor(Math.max(t,0))},m.singlePointStyle=function(t,e,r){var i=r.marker,a=i.line;n(t,e,r,m.tryColorscale(i,""),m.tryColorscale(i,"line"),i,a)},m.pointStyle=function(t,e){if(t.size()){var r=e.marker,n=m.tryColorscale(r,""),i=m.tryColorscale(r,"line");t.each(function(t){m.singlePointStyle(t,a.select(this),e,n,i)})}},m.tryColorscale=function(t,e){var r=e?c.nestedProperty(t,e).get():t,n=r.colorscale,i=r.color;return n&&Array.isArray(i)?u.makeColorScaleFunc(u.extractScale(n,r.cmin,r.cmax)):c.identity};var b={start:1,end:-1,middle:0,bottom:1,top:-1};m.textPointStyle=function(t,e){t.each(function(t){var r=a.select(this),n=t.tx||e.text;if(!n||Array.isArray(n))return void r.remove();var i=t.tp||e.textposition,s=i.indexOf("top")!==-1?"top":i.indexOf("bottom")!==-1?"bottom":"middle",l=i.indexOf("left")!==-1?"end":i.indexOf("right")!==-1?"start":"middle",u=t.ts||e.textfont.size,c=t.mrc?t.mrc/.8+1:0;u=o(u)&&u>0?u:0,r.call(m.font,t.tf||e.textfont.family,u,t.tc||e.textfont.color).attr("text-anchor",l).text(n).call(h.convertToTspans);var f=a.select(this.parentNode),d=r.selectAll("tspan.line"),p=1.3*((d[0].length||1)-1)+1,g=b[l]*c,v=.75*u+b[s]*c+(b[s]-1)*p*u/2;f.attr("transform","translate("+g+","+v+")"),p>1&&d.attr({x:r.attr("x"),y:r.attr("y")})})};var x=.5;m.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],a=[];for(r=1;r=1e4&&(a.selectAll("[data-bb]").attr("data-bb",null),M=[]),t.setAttribute("data-bb",M.length),M.push(l),c.extendFlat({},l)},m.setClipUrl=function(t,e){if(!e)return void t.attr("clip-path",null);var r="#"+e,n=a.select("base");n.size()&&n.attr("href")&&(r=window.location.href.split("#")[0]+r),t.attr("clip-path","url("+r+")")},m.getTranslate=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}},m.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a+=" translate("+e+", "+r+")",a=a.trim(),t[i]("transform",a),a},m.getScale=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}},m.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a+=" scale("+e+", "+r+")",a=a.trim(),t[i]("transform",a),a},m.setPointGroupScale=function(t,e,r){var n,i,a;return e=e||1,r=r||1,i=1===e&&1===r?"":" scale("+e+","+r+")",a=/\s*sc.*/,t.each(function(){n=(this.getAttribute("transform")||"").replace(a,""),n+=i,n=n.trim(),this.setAttribute("transform",n)}),i},m.measureText=function(t,e,r){var n=t.append("text").text(e).call(m.font,r),i=m.bBox(n.node());return n.remove(),i}},{"../../constants/xmlns_namespaces":668,"../../lib":685,"../../lib/svg_text_utils":704,"../../registry":802,"../../traces/scatter/make_bubble_size_func":991,"../../traces/scatter/subtypes":996,"../color":578,"../colorscale":592,"./symbol_defs":603,d3:107,"fast-isnumeric":116}],603:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,i="l"+e+",-"+e,a="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+i+a+i+a+o+a+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),i=n.round(-t,2),a=n.round(t*-.309,2);return"M"+e+","+a+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+a+"L0,"+i+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M"+i+",-"+r+"V"+r+"L0,"+e+"L-"+i+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+i+"H"+r+"L"+e+",0L"+r+",-"+i+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),i=n.round(.951*e,2),a=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(e*-.309,2),u=n.round(.118*e,2),c=n.round(.809*e,2);return"M"+r+","+l+"H"+i+"L"+a+","+u+"L"+o+","+c+"L0,"+n.round(.382*e,2)+"L-"+o+","+c+"L-"+a+","+u+"L-"+i+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),i=n.round(.76*t,2);return"M-"+i+",0l-"+r+",-"+e+"h"+i+"l"+r+",-"+e+"l"+r+","+e+"h"+i+"l-"+r+","+e+"l"+r+","+e+"h-"+i+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+i+o+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+i+o+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+i+"-"+e+","+e+i+e+","+e+i+e+",-"+e+i+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+i+"0,"+e+i+e+",0"+i+"0,-"+e+i+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+","+i+"L0,0M"+e+","+i+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+",-"+i+"L0,0M"+e+",-"+i+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2) +;return"M"+i+","+e+"L0,0M"+i+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+i+","+e+"L0,0M-"+i+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0}}},{d3:107}],604:[function(t,e,r){"use strict";e.exports={visible:{valType:"boolean"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"]},symmetric:{valType:"boolean"},array:{valType:"data_array"},arrayminus:{valType:"data_array"},value:{valType:"number",min:0,dflt:10},valueminus:{valType:"number",min:0,dflt:10},traceref:{valType:"integer",min:0,dflt:0},tracerefminus:{valType:"integer",min:0,dflt:0},copy_ystyle:{valType:"boolean"},copy_zstyle:{valType:"boolean"},color:{valType:"color"},thickness:{valType:"number",min:0,dflt:2},width:{valType:"number",min:0},_deprecated:{opacity:{valType:"number"}}}},{}],605:[function(t,e,r){"use strict";function n(t,e,r,n){var a=e["error_"+n]||{},l=a.visible&&["linear","log"].indexOf(r.type)!==-1,u=[];if(l){for(var c=s(a),h=0;h0;t.each(function(t){var e,h=t[0].trace,f=h.error_x||{},d=h.error_y||{};h.ids&&(e=function(t){return t.id});var p=o.hasMarkers(h)&&h.marker.maxdisplayed>0;if(d.visible||f.visible){var m=i.select(this).selectAll("g.errorbar").data(t,e);m.exit().remove(),m.style("opacity",1);var g=m.enter().append("g").classed("errorbar",!0);c&&g.style("opacity",0).transition().duration(r.duration).style("opacity",1),m.each(function(t){var e=i.select(this),o=n(t,l,u);if(!p||t.vis){var h;if(d.visible&&a(o.x)&&a(o.yh)&&a(o.ys)){var m=d.width;h="M"+(o.x-m)+","+o.yh+"h"+2*m+"m-"+m+",0V"+o.ys,o.noYS||(h+="m-"+m+",0h"+2*m);var g=e.select("path.yerror");s=!g.size(),s?g=e.append("path").classed("yerror",!0):c&&(g=g.transition().duration(r.duration).ease(r.easing)),g.attr("d",h)}if(f.visible&&a(o.y)&&a(o.xh)&&a(o.xs)){var v=(f.copy_ystyle?d:f).width;h="M"+o.xh+","+(o.y-v)+"v"+2*v+"m0,-"+v+"H"+o.xs,o.noXS||(h+="m0,-"+v+"v"+2*v);var y=e.select("path.xerror");s=!y.size(),s?y=e.append("path").classed("xerror",!0):c&&(y=y.transition().duration(r.duration).ease(r.easing)),y.attr("d",h)}}})}})}},{"../../traces/scatter/subtypes":996,d3:107,"fast-isnumeric":116}],610:[function(t,e,r){"use strict";var n=t("d3"),i=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)})}},{"../color":578,d3:107}],611:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/constants");e.exports={_isLinkedToArray:"image",visible:{valType:"boolean",dflt:!0},source:{valType:"string"},layer:{valType:"enumerated",values:["below","above"],dflt:"above"},sizex:{valType:"number",dflt:0},sizey:{valType:"number",dflt:0},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain"},opacity:{valType:"number",min:0,max:1,dflt:1},x:{valType:"any",dflt:0},y:{valType:"any",dflt:0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper"}}},{"../../plots/cartesian/constants":729}],612:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib/to_log_range");e.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,u,c=t._fullLayout.images,h=e._id.charAt(0),f=0;f=2/3},r.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3},r.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],617:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.defaultLine},borderwidth:{valType:"number",min:0,dflt:0},font:a({},n,{}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"]},tracegroupgap:{valType:"number",min:0,dflt:10},x:{valType:"number",min:-2,max:3,dflt:1.02},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"}}},{"../../lib/extend":677,"../../plots/font_attributes":748,"../color/attributes":577}],618:[function(t,e,r){"use strict";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4}},{}],619:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("./attributes"),o=t("../../plots/layout_attributes"),s=t("./helpers");e.exports=function(t,e,r){function l(t,e){return i.coerce(d,p,a,t,e)}for(var u,c,h,f,d=t.legend||{},p=e.legend={},m=0,g="normal",v=0;v1)!==!1){if(l("bgcolor",e.paper_bgcolor),l("bordercolor"),l("borderwidth"),i.coerceFont(l,"font",e.font),l("orientation"),"h"===p.orientation){var b=t.xaxis;b&&b.rangeslider&&b.rangeslider.visible?(u=0,h="left",c=1.1,f="bottom"):(u=0,h="left",c=-.1,f="top")}l("traceorder",g),s.isGrouped(e.legend)&&l("tracegroupgap"),l("x",u),l("xanchor",h),l("y",c),l("yanchor",f),i.noneOrAll(d,p,["x","y"])}}},{"../../lib":685,"../../plots/layout_attributes":778,"../../registry":802,"./attributes":617,"./helpers":622}],620:[function(t,e,r){"use strict";function n(t,e){function r(r){y.convertToTspans(r,function(){r.selectAll("tspan.line").attr({x:r.attr("x")}),t.call(o,e)})}var n=t.data()[0][0],i=e._fullLayout,a=n.trace,s=p.traceIs(a,"pie"),l=a.index,u=s?n.label:a.name,c=t.selectAll("text.legendtext").data([0]);c.enter().append("text").classed("legendtext",!0),c.attr({x:40,y:0,"data-unformatted":u}).style("text-anchor","start").classed("user-select-none",!0).call(g.font,i.legend.font).text(u),e._context.editable&&!s?c.call(y.makeEditable).call(r).on("edit",function(t){this.attr({"data-unformatted":t}),this.text(t).call(r),this.text()||(t=" ");var i,a=n.trace._fullInput||{};if(["ohlc","candlestick"].indexOf(a.type)!==-1){var o=n.trace.transforms;i=o[o.length-1].direction+".name"}else i="name";h.restyle(e,i,t,l)}):c.call(r)}function i(t,e){var r,n=1,i=t.selectAll("rect").data([0]);i.enter().append("rect").classed("legendtoggle",!0).style("cursor","pointer").attr("pointer-events","all").call(v.fill,"rgba(0,0,0,0)"),i.on("mousedown",function(){r=(new Date).getTime(),r-e._legendMouseDownTimeT&&(n=Math.max(n-1,1)),1===n?r._clickTimeout=setTimeout(function(){a(t,e,n)},T):2===n&&(r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0,a(t,e,n))}})}function a(t,e,r){if(!e._dragged&&!e._editing){var n,i,a=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],o=t.data()[0][0],s=e._fullData,l=o.trace,u=l.legendgroup,c=[];if(1===r&&A&&e.data&&e._context.showTips?(f.notifier("Double click on legend to isolate individual trace","long"),A=!1):A=!1,p.traceIs(l,"pie")){var d=o.label,m=a.indexOf(d);1===r?m===-1?a.push(d):a.splice(m,1):2===r&&(a=[],e.calcdata[0].forEach(function(t){d!==t.label&&a.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===a.length&&m===-1&&(a=[])),h.relayout(e,"hiddenlabels",a)}else{var g,v=[],y=[];for(g=0;gtspan"),h=c[0].length||1;r=s*h,n=u.node()&&g.bBox(u.node()).width;var f=s*(.3+(1-h)/2);u.attr("y",f),c.attr("y",f)}r=Math.max(r,16)+3,i.height=r,i.width=n}function s(t,e,r){var n=t._fullLayout,i=n.legend,a=i.borderwidth,o=M.isGrouped(i);if(M.isVertical(i))o&&e.each(function(t,e){g.setTranslate(this,0,e*i.tracegroupgap)}),i.width=0,i.height=0,r.each(function(t){var e=t[0],r=e.height,n=e.width;g.setTranslate(this,a,5+a+i.height+r/2),i.height+=r,i.width=Math.max(i.width,n)}),i.width+=45+2*a,i.height+=10+2*a,o&&(i.height+=(i._lgroupsLength-1)*i.tracegroupgap),i.width=Math.ceil(i.width),i.height=Math.ceil(i.height),r.each(function(e){var r=e[0];c.select(this).select(".legendtoggle").call(g.setRect,0,-r.height/2,(t._context.editable?0:i.width)+40,r.height)});else if(o){i.width=0,i.height=0;for(var s=[i.width],l=e.data(),u=0,h=l.length;un.width-(n.margin.r+n.margin.l)&&(y=0,p+=m,i.height=i.height+m,m=0),g.setTranslate(this,a+y,5+a+e.height/2+p),i.width+=o+r,i.height=Math.max(i.height,e.height),y+=o+r,m=Math.max(e.height,m)}),i.width+=2*a,i.height+=10+2*a,i.width=Math.ceil(i.width),i.height=Math.ceil(i.height),r.each(function(e){var r=e[0];c.select(this).select(".legendtoggle").call(g.setRect,0,-r.height/2,t._context.editable?0:i.width,r.height)})}}function l(t){var e=t._fullLayout,r=e.legend,n="left";k.isRightAnchor(r)?n="right":k.isCenterAnchor(r)&&(n="center");var i="top";k.isBottomAnchor(r)?i="bottom":k.isMiddleAnchor(r)&&(i="middle"),d.autoMargin(t,"legend",{x:r.x,y:r.y,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:r.height*({top:1,middle:.5}[i]||0),t:r.height*({bottom:1,middle:.5}[i]||0)})}function u(t){var e=t._fullLayout,r=e.legend,n="left";k.isRightAnchor(r)?n="right":k.isCenterAnchor(r)&&(n="center"),d.autoMargin(t,"legend",{x:r.x,y:.5,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:0,t:0})}var c=t("d3"),h=t("../../plotly"),f=t("../../lib"),d=t("../../plots/plots"),p=t("../../registry"),m=t("../dragelement"),g=t("../drawing"),v=t("../color"),y=t("../../lib/svg_text_utils"),b=t("./constants"),x=t("../../constants/interactions"),_=t("./get_legend_data"),w=t("./style"),M=t("./helpers"),k=t("./anchor_utils"),A=!0,T=x.DBLCLICKDELAY;e.exports=function(t){function e(t,e){L.attr("data-scroll",e).call(g.setTranslate,0,e),C.call(g.setRect,N,t,b.scrollBarWidth,b.scrollBarHeight),S.select("rect").attr({y:y.borderwidth-e})}var r=t._fullLayout,o="legend"+r._uid;if(r._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var y=r.legend,x=r.showlegend&&_(t.calcdata,y),M=r.hiddenlabels||[];if(!r.showlegend||!x.length)return r._infolayer.selectAll(".legend").remove(),r._topdefs.select("#"+o).remove(),void d.autoMargin(t,"legend");var A=r._infolayer.selectAll("g.legend").data([0]);A.enter().append("g").attr({class:"legend","pointer-events":"all"});var S=r._topdefs.selectAll("#"+o).data([0]);S.enter().append("clipPath").attr("id",o).append("rect");var E=A.selectAll("rect.bg").data([0]);E.enter().append("rect").attr({class:"bg","shape-rendering":"crispEdges"}),E.call(v.stroke,y.bordercolor),E.call(v.fill,y.bgcolor),E.style("stroke-width",y.borderwidth+"px");var L=A.selectAll("g.scrollbox").data([0]);L.enter().append("g").attr("class","scrollbox");var C=A.selectAll("rect.scrollbar").data([0]);C.enter().append("rect").attr({class:"scrollbar",rx:20,ry:2,width:0,height:0}).call(v.fill,"#808BA4");var z=L.selectAll("g.groups").data(x);z.enter().append("g").attr("class","groups"),z.exit().remove();var D=z.selectAll("g.traces").data(f.identity);D.enter().append("g").attr("class","traces"),D.exit().remove(),D.call(w).style("opacity",function(t){var e=t[0].trace;return p.traceIs(e,"pie")?M.indexOf(t[0].label)!==-1?.5:1:"legendonly"===e.visible?.5:1}).each(function(){c.select(this).call(n,t).call(i,t)});var I=0!==A.enter().size();I&&(s(t,z,D),l(t));var P=r.width,O=r.height;s(t,z,D),y.height>O?u(t):l(t);var j=r._size,R=j.l+j.w*y.x,F=j.t+j.h*(1-y.y);k.isRightAnchor(y)?R-=y.width:k.isCenterAnchor(y)&&(R-=y.width/2),k.isBottomAnchor(y)?F-=y.height:k.isMiddleAnchor(y)&&(F-=y.height/2);var N=y.width,B=j.w;N>B?(R=j.l,N=B):(R+N>P&&(R=P-N),R<0&&(R=0),N=Math.min(P-R,y.width));var U=y.height,V=j.h;U>V?(F=j.t,U=V):(F+U>O&&(F=O-U),F<0&&(F=0),U=Math.min(O-F,y.height)),g.setTranslate(A,R,F);var H,q,G=U-b.scrollBarHeight-2*b.scrollBarMargin,Y=y.height-U;if(y.height<=U||t._context.staticPlot)E.attr({width:N-y.borderwidth,height:U-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),g.setTranslate(L,0,0),S.select("rect").attr({width:N-2*y.borderwidth,height:U-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth}),L.call(g.setClipUrl,o);else{H=b.scrollBarMargin,q=L.attr("data-scroll")||0,E.attr({width:N-2*y.borderwidth+b.scrollBarWidth+b.scrollBarMargin,height:U-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),S.select("rect").attr({width:N-2*y.borderwidth+b.scrollBarWidth+b.scrollBarMargin,height:U-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth-q}),L.call(g.setClipUrl,o),I&&e(H,q),A.on("wheel",null),A.on("wheel",function(){q=f.constrain(L.attr("data-scroll")-c.event.deltaY/G*Y,-Y,0),H=b.scrollBarMargin-q/Y*G,e(H,q),0!==q&&q!==-Y&&c.event.preventDefault()}),C.on(".drag",null),L.on(".drag",null);var W=c.behavior.drag().on("drag",function(){H=f.constrain(c.event.y-b.scrollBarHeight/2,b.scrollBarMargin,b.scrollBarMargin+G),q=-(H-b.scrollBarMargin)/G*Y,e(H,q)});C.call(W),L.call(W)}if(t._context.editable){var X,Z,J,Q;A.classed("cursor-move",!0),m.init({element:A.node(),prepFn:function(){var t=g.getTranslate(A);J=t.x,Q=t.y},moveFn:function(t,e){var r=J+t,n=Q+e;g.setTranslate(A,r,n),X=m.align(r,0,j.l,j.l+j.w,y.xanchor),Z=m.align(n,0,j.t+j.h,j.t,y.yanchor)},doneFn:function(e,n,i){if(e&&void 0!==X&&void 0!==Z)h.relayout(t,{"legend.x":X,"legend.y":Z});else{var o=r._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return i.clientX>=t.left&&i.clientX<=t.right&&i.clientY>=t.top&&i.clientY<=t.bottom});o.size()>0&&(1===n?A._clickTimeout=setTimeout(function(){a(o,t,n)},T):2===n&&(A._clickTimeout&&clearTimeout(A._clickTimeout),a(o,t,n)))}}})}}}},{"../../constants/interactions":665,"../../lib":685,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/plots":787,"../../registry":802,"../color":578,"../dragelement":599,"../drawing":602,"./anchor_utils":616,"./constants":618,"./get_legend_data":621,"./helpers":622,"./style":624,d3:107}],621:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("./helpers");e.exports=function(t,e){function r(t,r){if(""!==t&&i.isGrouped(e))l.indexOf(t)===-1?(l.push(t),u=!0,s[t]=[[r]]):s[t].push([r]);else{var n="~~i"+h;l.push(n),s[n]=[[r]],h++}}var a,o,s={},l=[],u=!1,c={},h=0;for(a=0;ar[1])return r[1]}return i}function r(t){return t[0]}var n,i,a=t[0],o=a.trace,s=d.hasMarkers(o),u=d.hasText(o),f=d.hasLines(o);if(s||u||f){var p={},m={};s&&(p.mc=e("marker.color",r),p.mo=e("marker.opacity",c.mean,[.2,1]),p.ms=e("marker.size",c.mean,[2,16]),p.mlc=e("marker.line.color",r),p.mlw=e("marker.line.width",c.mean,[0,5]),m.marker={sizeref:1,sizemin:1,sizemode:"diameter"}),f&&(m.line={width:e("line.width",r,[0,10])}),u&&(p.tx="Aa",p.tp=e("textposition",r),p.ts=10,p.tc=e("textfont.color",r),p.tf=e("textfont.family",r)),n=[c.minExtend(a,p)],i=c.minExtend(o,m)}var g=l.select(this).select("g.legendpoints"),v=g.selectAll("path.scatterpts").data(s?n:[]);v.enter().append("path").classed("scatterpts",!0).attr("transform","translate(20,0)"),v.exit().remove(),v.call(h.pointStyle,i),s&&(n[0].mrc=3);var y=g.selectAll("g.pointtext").data(u?n:[]);y.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),y.exit().remove(),y.selectAll("text").call(h.textPointStyle,i)}function a(t){var e=t[0].trace,r=e.marker||{},n=r.line||{},i=l.select(this).select("g.legendpoints").selectAll("path.legendbar").data(u.traceIs(e,"bar")?[t]:[]);i.enter().append("path").classed("legendbar",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),i.exit().remove(),i.each(function(t){var e=l.select(this),i=t[0],a=(i.mlw+1||n.width+1)-1;e.style("stroke-width",a+"px").call(f.fill,i.mc||r.color),a&&e.call(f.stroke,i.mlc||n.color)})}function o(t){var e=t[0].trace,r=l.select(this).select("g.legendpoints").selectAll("path.legendbox").data(u.traceIs(e,"box")&&e.visible?[t]:[]);r.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.each(function(){var t=e.line.width,r=l.select(this);r.style("stroke-width",t+"px").call(f.fill,e.fillcolor),t&&r.call(f.stroke,e.line.color)})}function s(t){var e=t[0].trace,r=l.select(this).select("g.legendpoints").selectAll("path.legendpie").data(u.traceIs(e,"pie")&&e.visible?[t]:[]);r.enter().append("path").classed("legendpie",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.size()&&r.call(p,t[0],e)}var l=t("d3"),u=t("../../registry"),c=t("../../lib"),h=t("../drawing"),f=t("../color"),d=t("../../traces/scatter/subtypes"),p=t("../../traces/pie/style_one");e.exports=function(t){t.each(function(t){var e=l.select(this),r=e.selectAll("g.layers").data([0]);r.enter().append("g").classed("layers",!0),r.style("opacity",t[0].trace.opacity),r.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),r.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var n=r.selectAll("g.legendsymbols").data([t]);n.enter().append("g").classed("legendsymbols",!0),n.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(a).each(o).each(s).each(n).each(i)}},{"../../lib":685,"../../registry":802,"../../traces/pie/style_one":970,"../../traces/scatter/subtypes":996,"../color":578,"../drawing":602,d3:107}],625:[function(t,e,r){"use strict";function n(t,e){var r,n,i=e.currentTarget,a=i.getAttribute("data-attr"),o=i.getAttribute("data-val")||!0,s=t._fullLayout,l={},u=f.list(t,null,!0),h="on";if("zoom"===a){var d,p="in"===o?.5:2,m=(1+p)/2,g=(1-p)/2;for(n=0;n1)return n(["resetViews","toggleHover"]),o(g,r);c&&(n(["zoom3d","pan3d","orbitRotation","tableRotation"]),n(["resetCameraDefault3d","resetCameraLastSave3d"]),n(["hoverClosest3d"])),f&&(n(["zoomInGeo","zoomOutGeo","resetGeo"]),n(["hoverClosestGeo"]));var v=i(s),y=[];return((u||p)&&!v||m)&&(y=["zoom2d","pan2d"]),(u||m)&&a(l)&&(y.push("select2d"),y.push("lasso2d")),y.length&&n(y),!u&&!p||v||m||n(["zoomIn2d","zoomOut2d","autoScale2d","resetScale2d"]),u&&d?n(["toggleHover"]):p?n(["hoverClosestGl2d"]):u?n(["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]):d&&n(["hoverClosestPie"]),o(g,r)}function i(t){for(var e=l.list({_fullLayout:t},null,!0),r=!0,n=0;n0)){var p=i(e,r,l);h("x",p[0]),h("y",p[1]),a.noneOrAll(t,e,["x","y"]),h("xanchor"),h("yanchor"),a.coerceFont(h,"font",r.font);var m=h("bgcolor");h("activecolor",o.contrast(m,u.lightAmount,u.darkAmount)),h("bordercolor"),h("borderwidth")}}},{"../../lib":685,"../color":578,"./attributes":629,"./button_attributes":630,"./constants":631}],633:[function(t,e,r){"use strict";function n(t){for(var e=v.list(t,"x",!0),r=[],n=0;np&&(p=f)));return p>=d?[d,p]:void 0}}var i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./constants"),s=t("./helpers");e.exports=function(t){var e=t._fullLayout,r=i.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var s=0;sY&&n>W&&!t.shiftKey?p.getCursor(i/r,1-a/n):"move";m(e,o),G=o.split("-")[0]}function a(e){N=h.getFromId(t,r.xref),B=h.getFromId(t,r.yref),U=v.getDataToPixel(t,N),V=v.getDataToPixel(t,B,!0),H=v.getPixelToData(t,N),q=v.getPixelToData(t,B,!0);var a="shapes["+n+"]";"path"===r.type?(R=r.path,F=a+".path"):(g=U(r.x0),y=V(r.y0),b=U(r.x1),x=V(r.y1),_=a+".x0",w=a+".y0",M=a+".x1",k=a+".y1"),gW&&(d[L]=r[I]=q(u),d[C]=r[P]=q(c)),f-h>Y&&(d[z]=r[O]=H(h),d[D]=r[j]=H(f))}e.attr("d",o(t,r))}var d,g,y,b,x,_,w,M,k,A,T,S,E,L,C,z,D,I,P,O,j,R,F,N,B,U,V,H,q,G,Y=10,W=10,X={setCursor:i,element:e.node(),prepFn:a,doneFn:s},Z=X.element.getBoundingClientRect();p.init(X)}function o(t,e){var r,n,i,a,o=e.type,l=h.getFromId(t,e.xref),u=h.getFromId(t,e.yref),c=t._fullLayout._size;if(l?(r=v.shapePositionToRange(l),n=function(t){return l._offset+l.r2p(r(t,!0))}):n=function(t){return c.l+c.w*t},u?(i=v.shapePositionToRange(u),a=function(t){return u._offset+u.r2p(i(t,!0))}):a=function(t){return c.t+c.h*(1-t)},"path"===o)return l&&"date"===l.type&&(n=v.decodeDate(n)),u&&"date"===u.type&&(a=v.decodeDate(a)),s(e.path,n,a);var f=n(e.x0),d=n(e.x1),p=a(e.y0),m=a(e.y1);if("line"===o)return"M"+f+","+p+"L"+d+","+m;if("rect"===o)return"M"+f+","+p+"H"+d+"V"+m+"H"+f+"Z";var g=(f+d)/2,y=(p+m)/2,b=Math.abs(g-f),x=Math.abs(y-p),_="A"+b+","+x,w=g+b+","+y;return"M"+w+_+" 0 1,1 "+g+","+(y-x)+_+" 0 0,1 "+w+"Z"} +function s(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i],l=t.substr(1).replace(g.paramRE,function(t){return a[n]?t=e(t):o[n]&&(t=r(t)),n++,n>s&&(t="X"),t});return n>s&&(l=l.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+t)),i+l})}function l(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,function(t){return n>=s?t:(a[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}var u=t("../../plotly"),c=t("../../lib"),h=t("../../plots/cartesian/axes"),f=t("../color"),d=t("../drawing"),p=t("../dragelement"),m=t("../../lib/setcursor"),g=t("./constants"),v=t("./helpers");e.exports={draw:n,drawOne:i}},{"../../lib":685,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian/axes":724,"../color":578,"../dragelement":599,"../drawing":602,"./constants":644,"./helpers":647}],647:[function(t,e,r){"use strict";r.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},r.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},r.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},r.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},r.getDataToPixel=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.shapePositionToRange(e);i=function(t){return e._offset+e.r2p(o(t,!0))},"date"===e.type&&(i=r.decodeDate(i))}else i=n?function(t){return a.t+a.h*(1-t)}:function(t){return a.l+a.w*t};return i},r.getPixelToData=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.rangeToShapePosition(e);i=function(t){return o(e.p2r(t-e._offset))}}else i=n?function(t){return 1-(t-a.t)/a.h}:function(t){return(t-a.l)/a.w};return i}},{}],648:[function(t,e,r){"use strict";var n=t("./draw");e.exports={moduleType:"component",name:"shapes",layoutAttributes:t("./attributes"),supplyLayoutDefaults:t("./defaults"),calcAutorange:t("./calc_autorange"),draw:n.draw,drawOne:n.drawOne}},{"./attributes":642,"./calc_autorange":643,"./defaults":645,"./draw":646}],649:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("./attributes"),o=t("./helpers");e.exports=function(t,e,r,s,l){function u(r,i){return n.coerce(t,e,a,r,i)}if(s=s||{},l=l||{},!u("visible",!l.itemIsNotPlainObject))return e;u("layer"),u("opacity"),u("fillcolor"),u("line.color"),u("line.width"),u("line.dash");for(var c=t.path?"path":"rect",h=u("type",c),f=["x","y"],d=0;d<2;d++){var p=f[d],m={_fullLayout:r},g=i.coerceRef(t,e,m,p,"","paper");if("path"!==h){var v,y,b;"paper"!==g?(v=i.getFromId(m,g),b=o.rangeToShapePosition(v),y=o.shapePositionToRange(v)):y=b=n.identity;var x=p+"0",_=p+"1",w=t[x],M=t[_];t[x]=y(t[x],!0),t[_]=y(t[_],!0),i.coercePosition(e,m,u,g,x,.25),i.coercePosition(e,m,u,g,_,.75),e[x]=b(e[x]),e[_]=b(e[_]),t[x]=w,t[_]=M}}return"path"===h?u("path"):n.noneOrAll(t,e,["x0","x1","y0","y1"]),e}},{"../../lib":685,"../../plots/cartesian/axes":724,"./attributes":642,"./helpers":647}],650:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../../plots/pad_attributes"),a=t("../../lib/extend").extendFlat,o=t("../../lib/extend").extendDeep,s=t("../../plots/animation_attributes"),l=t("./constants"),u={_isLinkedToArray:"step",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"}};e.exports={_isLinkedToArray:"slider",visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:o({},i,{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:a({},n,{})},font:a({},n,{}),activebgcolor:{valType:"color",dflt:l.gripBgActiveColor},bgcolor:{valType:"color",dflt:l.railBgColor},bordercolor:{valType:"color",dflt:l.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l.tickLength},tickcolor:{valType:"color",dflt:l.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l.minorTickLength}}},{"../../lib/extend":677,"../../plots/animation_attributes":720,"../../plots/font_attributes":748,"../../plots/pad_attributes":786,"./constants":651}],651:[function(t,e,r){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,fontSizeToHeight:1.3,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],652:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return a.coerce(t,e,s,r,n)}n("visible",i(t,e).length>0)&&(n("active"),n("x"),n("y"),a.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("len"),n("lenmode"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),a.coerceFont(n,"font",r.font),n("currentvalue.visible")&&(n("currentvalue.xanchor"),n("currentvalue.prefix"),n("currentvalue.suffix"),n("currentvalue.offset"),a.coerceFont(n,"currentvalue.font",e.font)),n("transition.duration"),n("transition.easing"),n("bgcolor"),n("activebgcolor"),n("bordercolor"),n("borderwidth"),n("ticklen"),n("tickwidth"),n("tickcolor"),n("minorticklen"))}function i(t,e){function r(t,e){return a.coerce(n,i,c,t,e)}for(var n,i,o=t.steps||[],s=e.steps=[],l=0;l=r.steps.length&&(r.active=0),e.call(s,r).call(x,r).call(c,r).call(p,r).call(b,t,r).call(l,t,r),A.setTranslate(e,r.lx+r.pad.l,r.ly+r.pad.t),e.call(g,r,r.active/(r.steps.length-1),!1),e.call(s,r)}function s(t,e,r){if(e.currentvalue.visible){var n,i,a=t.selectAll("text").data([0]);switch(e.currentvalue.xanchor){case"right":n=e.inputAreaLength-E.currentValueInset-e.currentValueMaxWidth,i="left";break;case"center":n=.5*e.inputAreaLength,i="middle";break;default:n=E.currentValueInset,i="left"}a.enter().append("text").classed(E.labelClass,!0).classed("user-select-none",!0).attr("text-anchor",i);var o=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)o+=r;else{o+=e.steps[e.active].label}return e.currentvalue.suffix&&(o+=e.currentvalue.suffix),a.call(A.font,e.currentvalue.font).text(o).call(T.convertToTspans),A.setTranslate(a,n,e.currentValueHeight),a}}function l(t,e,r){var n=t.selectAll("rect."+E.gripRectClass).data([0]);n.enter().append("rect").classed(E.gripRectClass,!0).call(d,e,t,r).style("pointer-events","all"),n.attr({width:E.gripWidth,height:E.gripHeight,rx:E.gripRadius,ry:E.gripRadius}).call(k.stroke,r.bordercolor).call(k.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function u(t,e,r){var n=t.selectAll("text").data([0]);return n.enter().append("text").classed(E.labelClass,!0).classed("user-select-none",!0).attr("text-anchor","middle"),n.call(A.font,r.font).text(e.step.label).call(T.convertToTspans),n}function c(t,e){var r=t.selectAll("g."+E.labelsClass).data([0]);r.enter().append("g").classed(E.labelsClass,!0);var n=r.selectAll("g."+E.labelGroupClass).data(e.labelSteps);n.enter().append("g").classed(E.labelGroupClass,!0),n.exit().remove(),n.each(function(t){var r=w.select(this);r.call(u,t,e),A.setTranslate(r,v(e,t.fraction),E.tickOffset+e.ticklen+e.labelHeight+E.labelOffset+e.currentValueTotalHeight)})}function h(t,e,r,n,i){var a=Math.round(n*(r.steps.length-1));a!==r.active&&f(t,e,r,a,!0,i)}function f(t,e,r,n,i,a){var o=r.active;r._input.active=r.active=n;var l=r.steps[r.active];e.call(g,r,r.active/(r.steps.length-1),a),e.call(s,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),l&&l.method&&i&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=i,e._nextMethod.doTransition=a):(e._nextMethod={step:l,doCallback:i,doTransition:a},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&&(M.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function d(t,e,r){function n(){return r.data()[0]}var i=r.node(),a=w.select(e);t.on("mousedown",function(){var t=n();e.emit("plotly_sliderstart",{slider:t});var o=r.select("."+E.gripRectClass);w.event.stopPropagation(),w.event.preventDefault(),o.call(k.fill,t.activebgcolor);var s=y(t,w.mouse(i)[0]);h(e,r,t,s,!0),t._dragging=!0,a.on("mousemove",function(){var t=n(),a=y(t,w.mouse(i)[0]);h(e,r,t,a,!1)}),a.on("mouseup",function(){var t=n();t._dragging=!1,o.call(k.fill,t.bgcolor),a.on("mouseup",null),a.on("mousemove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})})})}function p(t,e){var r=t.selectAll("rect."+E.tickRectClass).data(e.steps);r.enter().append("rect").classed(E.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(t,r){var n=r%e.labelStride==0,i=w.select(this);i.attr({height:n?e.ticklen:e.minorticklen}).call(k.fill,e.tickcolor),A.setTranslate(i,v(e,r/(e.steps.length-1))-.5*e.tickwidth,(n?E.tickOffset:E.minorTickOffset)+e.currentValueTotalHeight)})}function m(t){t.labelSteps=[];for(var e=t.steps.length,r=0;r0&&(o=o.transition().duration(e.transition.duration).ease(e.transition.easing)),o.attr("transform","translate("+(a-.5*E.gripWidth)+","+e.currentValueTotalHeight+")")}}function v(t,e){return t.inputAreaStart+E.stepInset+(t.inputAreaLength-2*E.stepInset)*Math.min(1,Math.max(0,e))}function y(t,e){return Math.min(1,Math.max(0,(e-E.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*E.stepInset-2*t.inputAreaStart)))}function b(t,e,r){var n=t.selectAll("rect."+E.railTouchRectClass).data([0]);n.enter().append("rect").classed(E.railTouchRectClass,!0).call(d,e,t,r).style("pointer-events","all"),n.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,E.tickOffset+r.ticklen+r.labelHeight)}).call(k.fill,r.bgcolor).attr("opacity",0),A.setTranslate(n,0,r.currentValueTotalHeight)}function x(t,e){var r=t.selectAll("rect."+E.railRectClass).data([0]);r.enter().append("rect").classed(E.railRectClass,!0);var n=e.inputAreaLength-2*E.railInset;r.attr({width:n,height:E.railWidth,rx:E.railRadius,ry:E.railRadius,"shape-rendering":"crispEdges"}).call(k.stroke,e.bordercolor).call(k.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),A.setTranslate(r,E.railInset,.5*(e.inputAreaWidth-E.railWidth)+e.currentValueTotalHeight)}function _(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n0?[0]:[]);if(s.enter().append("g").classed(E.containerClassName,!0).style("cursor","ew-resize"),s.exit().remove(),s.exit().size()&&_(t),0!==r.length){var l=s.selectAll("g."+E.groupClassName).data(r,i);l.enter().append("g").classed(E.groupClassName,!0),l.exit().each(function(e){w.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,M.autoMargin(t,E.autoMarginIdRoot+e._index)});for(var u=0;u0||f<0){var m={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[b.side];e.attr("transform","translate("+m+")")}}}var m=r.propContainer,g=r.propName,v=r.traceIndex,y=r.dfltName,b=r.avoid||{},x=r.attributes,_=r.transform,w=r.containerGroup,M=t._fullLayout,k=m.titlefont.family,A=m.titlefont.size,T=m.titlefont.color,S=1,E=!1,L=m.title.trim();""===L&&(S=0),L.match(/Click to enter .+ title/)&&(S=.2,E=!0),w||(w=M._infolayer.selectAll(".g-"+e).data([0]),w.enter().append("g").classed("g-"+e,!0));var C=w.selectAll("text").data([0]);C.enter().append("text"),C.text(L).attr("class",e),C.attr({"data-unformatted":L}).call(f);var z="Click to enter "+y+" title";t._context.editable?(L?C.on(".opacity",null):function(){S=0,E=!0,L=z,C.attr({"data-unformatted":L}).text(L).on("mouseover.opacity",function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)})}(),C.call(c.makeEditable).on("edit",function(e){void 0!==v?a.restyle(t,g,e,v):a.relayout(t,g,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(f)}).on("input",function(t){this.text(t||" ").attr(x).selectAll("tspan.line").attr(x)})):L&&!L.match(/Click to enter .+ title/)||C.remove(),C.classed("js-placeholder",E)}},{"../../constants/interactions":665,"../../lib":685,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/plots":787,"../color":578,"../drawing":602,d3:107,"fast-isnumeric":116}],656:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat,o=t("../../plots/pad_attributes"),s={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""}};e.exports={_isLinkedToArray:"updatemenu",_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:s,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a({},o,{}),font:a({},n,{}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1}}},{"../../lib/extend":677,"../../plots/font_attributes":748,"../../plots/pad_attributes":786,"../color/attributes":577}],657:[function(t,e,r){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,fontSizeToHeight:1.3,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF"}},{}],658:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return a.coerce(t,e,s,r,n)}n("visible",i(t,e).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),a.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),a.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function i(t,e){function r(t,e){return a.coerce(n,i,c,t,e)}for(var n,i,o=t.buttons||[],s=e.buttons=[],l=0;l0?[0]:[]);if(a.enter().append("g").classed(E.containerClassName,!0).style("cursor","pointer"),a.exit().remove(),a.exit().size()&&_(t),0!==r.length){var c=a.selectAll("g."+E.headerGroupClassName).data(r,i);c.enter().append("g").classed(E.headerGroupClassName,!0);var h=a.selectAll("g."+E.dropdownButtonGroupClassName).data([0]);h.enter().append("g").classed(E.dropdownButtonGroupClassName,!0).style("pointer-events","all");for(var f=0;fM,T=n.barLength+2*n.barPad,S=n.barWidth+2*n.barPad,E=p,L=g+v;L+S>u&&(L=u-S);var C=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,n.barColor),A?(this.hbar=C.attr({rx:n.barRadius,ry:n.barRadius,x:E,y:L,width:T,height:S}),this._hbarXMin=E+T/2,this._hbarTranslateMax=M-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var z=v>k,D=n.barWidth+2*n.barPad,I=n.barLength+2*n.barPad,P=p+m,O=g;P+D>l&&(P=l-D);var j=this.container.selectAll("rect.scrollbar-vertical").data(z?[0]:[]);j.exit().on(".drag",null).remove(),j.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,n.barColor),z?(this.vbar=j.attr({rx:n.barRadius,ry:n.barRadius,x:P,y:O,width:D,height:I}),this._vbarYMin=O+I/2,this._vbarTranslateMax=k-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax) +;var R=this.id,F=c-.5,N=z?h+D+.5:h+.5,B=f-.5,U=A?d+S+.5:d+.5,V=s._topdefs.selectAll("#"+R).data(A||z?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",R).append("rect"),A||z?(this._clipRect=V.select("rect").attr({x:Math.floor(F),y:Math.floor(B),width:Math.ceil(N)-Math.floor(F),height:Math.ceil(U)-Math.floor(B)}),this.container.call(o.setClipUrl,R),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),A||z){var H=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(H);var q=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault(),i.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(q),z&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,r)},n.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},n.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=i.event.dx),this.vbar&&(e-=i.event.dy),this.setTranslate(t,e)},n.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=i.event.deltaY),this.vbar&&(e+=i.event.deltaY),this.setTranslate(t,e)},n.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,n=r+this._hbarTranslateMax;t=(s.constrain(i.event.x,r,n)-r)/(n-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,o=a+this._vbarTranslateMax;e=(s.constrain(i.event.y,a,o)-a)/(o-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},n.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=s.constrain(t||0,0,r),e=s.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(o.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(o.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var a=e/n;this.vbar.call(o.setTranslate,t,e+a*this._vbarTranslateMax)}}},{"../../lib":685,"../color":578,"../drawing":602,d3:107}],662:[function(t,e,r){"use strict";e.exports={solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}},{}],663:[function(t,e,r){"use strict";e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],664:[function(t,e,r){"use strict";e.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},{}],665:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300}},{}],666:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6}},{}],667:[function(t,e,r){"use strict";e.exports={entityToUnicode:{mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},unicodeToEntity:{"&":"amp","<":"lt",">":"gt",'"':"quot","'":"#x27","/":"#x2F"}}},{}],668:[function(t,e,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],669:[function(t,e,r){"use strict";var n=t("./plotly");r.version="1.26.1",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config"),r.plot=n.plot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.setPlotConfig=t("./plot_api/set_plot_config"),r.register=t("./plot_api/register"),r.toImage=t("./plot_api/to_image"),r.downloadImage=t("./snapshot/download"),r.validate=t("./plot_api/validate"),r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.register(t("./traces/scatter")),r.register([t("./components/legend"),t("./components/annotations"),t("./components/shapes"),t("./components/images"),t("./components/updatemenus"),t("./components/sliders"),t("./components/rangeslider"),t("./components/rangeselector")]),r.Icons=t("../build/ploticon"),r.Plots=n.Plots,r.Fx=n.Fx,r.Snapshot=t("./snapshot"),r.PlotSchema=t("./plot_api/plot_schema"),r.Queue=t("./lib/queue"),r.d3=t("d3")},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":574,"./components/images":615,"./components/legend":623,"./components/rangeselector":635,"./components/rangeslider":641,"./components/shapes":648,"./components/sliders":654,"./components/updatemenus":660,"./fonts/mathjax_config":670,"./lib/queue":697,"./plot_api/plot_schema":713,"./plot_api/register":714,"./plot_api/set_plot_config":715,"./plot_api/to_image":717,"./plot_api/validate":718,"./plotly":719,"./snapshot":807,"./snapshot/download":804,"./traces/scatter":986,d3:107,"es6-promise":113}],670:[function(t,e,r){"use strict";"undefined"!=typeof MathJax?(r.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):r.MathJax=!1},{}],671:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){Array.isArray(t)&&(e[r]=t[n])}},{}],672:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../constants/numerical").BADNUM;e.exports=function(t){return"string"==typeof t&&(t=t.replace(/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,"")),n(t)?Number(t):i}},{"../constants/numerical":666,"fast-isnumeric":116}],673:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("tinycolor2"),a=t("../components/colorscale/get_scale"),o=(Object.keys(t("../components/colorscale/scales")),t("./nested_property")),s=/^([2-9]|[1-9][0-9]+)$/;r.valObjects={data_array:{coerceFunction:function(t,e,r){Array.isArray(t)?e.set(t):void 0!==r&&e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),n.values.indexOf(t)===-1?e.set(r):e.set(t)}},boolean:{coerceFunction:function(t,e,r){t===!0||t===!1?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;n.strict!==!0&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(a(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?(Math.abs(t)>180&&(t-=360*Math.round(t/360)),e.set(+t)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r){var n=r.length;if("string"==typeof t&&t.substr(0,n)===r&&s.test(t.substr(n)))return void e.set(t);e.set(r)},validateFunction:function(t,e){var r=e.dflt,n=r.length;return t===r||"string"==typeof t&&!(t.substr(0,n)!==r||!s.test(t.substr(n)))}},flaglist:{coerceFunction:function(t,e,r,n){if("string"!=typeof t)return void e.set(r);if((n.extras||[]).indexOf(t)!==-1)return void e.set(t);for(var i=t.split("+"),a=0;a0&&(o=o.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+o}return n}function l(t){return t.formatDate("yyyy")}function u(t){return t.formatDate("M yyyy")}function c(t){return t.formatDate("M d")}function h(t){return t.formatDate("M d, yyyy")}var f=t("d3"),d=t("fast-isnumeric"),p=t("./loggers").error,m=t("./mod"),g=t("../constants/numerical"),v=g.BADNUM,y=g.ONEDAY,b=g.ONEHOUR,x=g.ONEMIN,_=g.ONESEC,w=g.EPOCHJD,M=t("../registry"),k=f.time.format.utc,A=(new Date).getFullYear()-70;r.dateTick0=function(t,e){return n(t)?e?M.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:M.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"},r.dfltRange=function(t){return n(t)?M.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},r.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime};var T,S;r.dateTime2ms=function(t,e){if(r.isJSDate(t))return t=Number(t)-t.getTimezoneOffset()*x,t>=T&&t<=S?t:v;if("string"!=typeof t&&"number"!=typeof t)return v;t=String(t);var i=n(e),a=t.charAt(0);!i||"G"!==a&&"g"!==a||(t=t.substr(1),e="");var o=i&&"chinese"===e.substr(0,7),s=t.match(o?/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m:/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m);if(!s)return v;var l=s[1],u=s[3]||"1",c=Number(s[5]||1),h=Number(s[7]||0),f=Number(s[9]||0),d=Number(s[11]||0);if(i){if(2===l.length)return v;l=Number(l);var p;try{var m=M.getComponentMethod("calendars","getCal")(e);if(o){var g="i"===u.charAt(u.length-1);u=parseInt(u,10),p=m.newDate(l,m.toMonthIndex(l,u,g),c)}else p=m.newDate(l,Number(u),c)}catch(t){return v}return p?(p.toJD()-w)*y+h*b+f*x+d*_:v}l=2===l.length?(Number(l)+2e3-A)%100+A:Number(l),u-=1;var k=new Date(Date.UTC(2e3,u,c,h,f));return k.setUTCFullYear(l),k.getUTCMonth()!==u?v:k.getUTCDate()!==c?v:k.getTime()+d*_},T=r.MIN_MS=r.dateTime2ms("-9999"),S=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==v};var E=90*y,L=3*b,C=5*x;r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=T&&t<=S))return v;e||(e=0);var i,o,s,l,u,c,h=Math.floor(10*m(t+.05,1)),f=Math.round(t-h/10);if(n(r)){var d=Math.floor(f/y)+w,p=Math.floor(m(t,y));try{i=M.getComponentMethod("calendars","getCal")(r).fromJD(d).formatDate("yyyy-mm-dd")}catch(t){i=k("G%Y-%m-%d")(new Date(f))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=e=T+y&&t<=S-y))return v;var e=Math.floor(10*m(t+.05,1)),r=new Date(Math.round(t-e/10));return a(f.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,i){if(r.isJSDate(t)||"number"==typeof t){if(n(i))return p("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,i))return p("unrecognized date",t),e;return t};var z=/%\d?f/g,D=[59,59.9,59.99,59.999,59.9999],I=k("%Y"),P=k("%b %Y"),O=k("%b %-d"),j=k("%b %-d, %Y");r.formatDate=function(t,e,r,i){var a,f;if(i=n(i)&&i,e)return o(e,t,i);if(i)try{var d=Math.floor((t+.05)/y)+w,p=M.getComponentMethod("calendars","getCal")(i).fromJD(d);"y"===r?f=l(p):"m"===r?f=u(p):"d"===r?(a=l(p),f=c(p)):(a=h(p),f=s(t,r))}catch(t){return"Invalid"}else{var m=new Date(Math.floor(t+.05));"y"===r?f=I(m):"m"===r?f=P(m):"d"===r?(a=I(m),f=O(m)):(a=j(m),f=s(t,r))}return f+(a?"\n"+a:"")};var R=3*y;r.incrementMonth=function(t,e,r){r=n(r)&&r;var i=m(t,y);if(t=Math.round(t-i),r)try{var a=Math.round(t/y)+w,o=M.getComponentMethod("calendars","getCal")(r),s=o.fromJD(a);return e%12?o.add(s,e,"m"):o.add(s,e/12,"y"),(s.toJD()-w)*y+i}catch(e){p("invalid ms "+t+" in calendar "+r)}var l=new Date(t+R);return l.setUTCMonth(l.getUTCMonth()+e)+i-R},r.findExactDates=function(t,e){for(var r,i,a=0,o=0,s=0,l=0,u=n(e)&&M.getComponentMethod("calendars","getCal")(e),c=0;c0&&(i.push(a),a=[])}return a.length>0&&i.push(a),i},r.makeLine=function(t,e){var r={};return r=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t},e&&(r.trace=e),r},r.makePolygon=function(t,e){var r={};if(1===t.length)r={type:"Polygon",coordinates:t};else{for(var n=new Array(t.length),i=0;i",e))>=0;){var r=t.indexOf("",e);if(r/g,"\n")}function a(t){return t.replace(/\<.*\>/g,"")}function o(t){for(var e=u.entityToUnicode,r=0;(r=t.indexOf("&",r))>=0;){var n=t.indexOf(";",r);if(nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},i.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},i.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o-1||1/0!==c&&c>=Math.pow(2,r)?t(e,r,n):l},i.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)},r["_"+e]=t,r},i.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,u=new Array(l),c=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*u[n];c[r]=a}return c},i.syncOrAsync=function(t,e,r){function n(){return i.syncOrAsync(t,e,r)}for(var a,o;t.length;)if(o=t.splice(0,1)[0],(a=o(e))&&a.then)return a.then(n).then(void 0,i.promiseError);return r&&r(e)},i.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},i.noneOrAll=function(t,e,r){if(t){var n,i,a=!1,o=!0;for(n=0;n1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l}},{"./clean_number":672,"./coerce":673,"./dates":674,"./ensure_array":675,"./extend":677,"./filter_unique":678,"./filter_visible":679,"./identity":684,"./is_array":686,"./is_plain_object":687,"./loggers":688,"./matrix":689,"./mod":690,"./nested_property":691,"./noop":692,"./notifier":693,"./push_unique":696,"./relink_private":698,"./search":699,"./stats":702,"./to_log_range":705,d3:107}],686:[function(t,e,r){"use strict";var n="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}};e.exports=function(t){return Array.isArray(t)||n.isView(t)}},{}],687:[function(t,e,r){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],688:[function(t,e,r){"use strict";function n(t,e){if(t.apply)t.apply(t,e);else for(var r=0;r1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;e=0;e--){if(n=t[e][0],a=t[e][1],l=!1,d(n))for(r=n.length-1;r>=0;r--)i(n[r],o(a,r))?l?n[r]=void 0:n.pop():l=!0;else if("object"==typeof n&&null!==n)for(s=Object.keys(n),l=!1,r=s.length-1;r>=0;r--)i(n[s[r]],o(a,s[r]))?delete n[s[r]]:l=!0;if(l)return}}function c(t){return void 0===t||null===t||"object"==typeof t&&(d(t)?!t.length:!Object.keys(t).length)}function h(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var f=t("fast-isnumeric"),d=t("./is_array"),p=t("./is_plain_object"),m=t("../plot_api/container_array_match");e.exports=function(t,e){if(f(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var r,i,o,s=0,l=e.split(".");s/g),s=0;sa||ns)&&(!e||!u(t))}function r(t,e){var r=t[0],l=t[1];if(ra||ls)return!1;var u,c,h,f,d,p=n.length,m=n[0][0],g=n[0][1],v=0;for(u=1;uMath.max(c,m)||l>Math.max(h,g)))if(lc||Math.abs(n(o,f))>i)return!0;return!1};i.filter=function(t,e){function r(r){t.push(r);var s=n.length,l=i;n.splice(o+1);for(var u=l+1;u1){r(t.pop())}return{addPt:r,raw:t,filtered:n}}},{"./matrix":689}],696:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;ra.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},o.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},o.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},o.undo=function(t){var e,r;if(t.framework&&t.framework.isPolar)return void t.framework.undo();if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function o(t,e){return t>=e}var s=t("fast-isnumeric"),l=t("./loggers");r.findBin=function(t,e,r){if(s(e.start))return r?Math.ceil((t-e.start)/e.size)-1:Math.floor((t-e.start)/e.size);var u,c,h=0,f=e.length,d=0;for(c=e[e.length-1]>=e[0]?r?n:i:r?o:a;h90&&l.log("Long binary search..."),h-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,i=e[n]-e[0]||1,a=i/(n||1)/1e4,o=[e[0]],s=0;se[s]+a&&(i=Math.min(i,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:i}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;it.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{"fast-isnumeric":116}],703:[function(t,e,r){"use strict";function n(t){var e=i(t);return e.length?e:[0,0,0,1]}var i=t("color-rgba");e.exports=n},{"color-rgba":88}],704:[function(t,e,r){"use strict";function n(t,e){return t.node().getBoundingClientRect()[e]}function i(t){return t.replace(/(<|<|<)/g,"\\lt ").replace(/(>|>|>)/g,"\\gt ")}function a(t,e,r){var n="math-output-"+f.randstr([],64),a=h.select("body").append("div").attr({id:n}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(i(t));MathJax.Hub.Queue(["Typeset",MathJax.Hub,a.node()],function(){var e=h.select("body").select("#MathJax_SVG_glyphs");if(a.select(".MathJax_SVG").empty()||!a.select("svg").node())f.log("There was an error in the tex syntax.",t),r();else{var n=a.select("svg").node().getBoundingClientRect();r(a.select(".MathJax_SVG"),e,n)}a.remove()})}function o(t,e){for(var r=t||"",n=0;n]*>)/).map(function(t){var e=t.match(/<(\/?)([^ >]*)\s*(.*)>/i),n=e&&e[2].toLowerCase(),i=m[n];if(void 0!==i){var a=e[1],o=e[3],s=o.match(/^style\s*=\s*"([^"]+)"\s*/i);if("a"===n){if(a)return"
";if("href"!==o.substr(0,4).toLowerCase())return"";var u=o.substr(4).replace(/["']/g,"").replace(/=/,""),c=document.createElement("a");return c.href=u,g.indexOf(c.protocol)===-1?"":''}if("br"===n)return"
";if(a)return"sup"===n?'':"sub"===n?'':"";var h=""}return r.xml_entity_encode(t).replace(/");i>0;i=e.indexOf("
",i+1))n.push(i);var a=0;n.forEach(function(t){for(var r=t+a,n=e.slice(0,r),i="",o=n.length-1;o>=0;o--){var s=n[o].match(/<(\/?).*>/i);if(s&&"
"!==n[o]){s[1]||(i=n[o]);break}}i&&(e.splice(r+1,0,i),e.splice(r,0,""),a+=2)});var o=e.join(""),u=o.split(/
/gi);return u.length>1&&(e=u.map(function(t,e){return''+t+""})),e.join("")}function c(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||"top",l=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return i="bottom"===s?function(){return l.bottom-n.height}:"middle"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},a="right"===o?function(){return l.right-n.width}:"center"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:i()-u.top+"px",left:a()-u.left+"px","z-index":1e3}),this}}var h=t("d3"),f=t("../lib"),d=t("../constants/xmlns_namespaces"),p=t("../constants/string_mappings");h.selection.prototype.appendSVG=function(t){for(var e=['',t,""].join(""),r=(new DOMParser).parseFromString(e,"application/xml"),n=r.documentElement.firstChild;n;)this.node().appendChild(this.node().ownerDocument.importNode(n,!0)),n=n.nextSibling;return r.querySelector("parsererror")?(f.log(r.querySelector("parsererror div").textContent),null):h.select(this.node().lastChild)},r.html_entity_decode=function(t){var e=h.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":t.indexOf("<")!==-1||t.indexOf(">")!==-1?"":e.html(t).text()});return e.remove(),r},r.xml_entity_encode=function(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")},r.convertToTspans=function(t,e){function r(){d.empty()||(p=s.attr("class")+"-math",d.select("svg."+p).remove()),t.text("").style({visibility:"inherit","white-space":"pre"}),c=t.appendSVG(o),c||t.text(i),t.select("a").size()&&t.style("pointer-events","all"),e&&e.call(s)}var i=t.text(),o=u(i),s=t,l=!s.attr("data-notex")&&o.match(/([^$]*)([$]+[^$]*[$]+)([^$]*)/),c=i,d=h.select(s.node().parentNode);if(!d.empty()){var p=s.attr("class")?s.attr("class").split(" ")[0]:"text";p+="-math",d.selectAll("svg."+p).remove(),d.selectAll("g."+p+"-group").remove(),t.style({visibility:null});for(var m=t.node();m&&m.removeAttribute;m=m.parentNode)m.removeAttribute("data-bb");if(l){var g=f.getPlotDiv(s.node());(g&&g._promises||[]).push(new Promise(function(t){s.style({visibility:"hidden"});var i={fontSize:parseInt(s.style("font-size"),10)};a(l[2],i,function(i,a,o){d.selectAll("svg."+p).remove(),d.selectAll("g."+p+"-group").remove();var l=i&&i.select("svg");if(!l||!l.node())return r(),void t();var u=d.append("g").classed(p+"-group",!0).attr({"pointer-events":"none"});u.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild),l.attr({class:p,height:o.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=s.style("fill")||"black";l.select("g").attr({fill:c,stroke:c});var h=n(l,"width"),f=n(l,"height"),m=+s.attr("x")-h*{start:0,middle:.5,end:1}[s.attr("text-anchor")||"start"],g=parseInt(s.style("font-size"),10)||n(s,"height"),v=-g/4;"y"===p[0]?(u.attr({transform:"rotate("+[-90,+s.attr("x"),+s.attr("y")]+") translate("+[-h/2,v-f/2]+")"}),l.attr({x:+s.attr("x"),y:+s.attr("y")})):"l"===p[0]?l.attr({x:s.attr("x"),y:v-f/2}):"a"===p[0]?l.attr({x:0,y:v}):l.attr({x:m,y:+s.attr("y")+v-f/2}),e&&e.call(s,u),t(u)})}))}else r();return t}};var m={sup:'font-size:70%" dy="-0.6em',sub:'font-size:70%" dy="0.3em',b:"font-weight:bold",i:"font-style:italic",a:"",span:"",br:"",em:"font-style:italic;font-weight:bold"},g=["http:","https:","mailto:"],v=new RegExp("]*)?/?>","g"),y=Object.keys(p.entityToUnicode).map(function(t){return{regExp:new RegExp("&"+t+";","g"),sub:p.entityToUnicode[t]}}),b=Object.keys(p.unicodeToEntity).map(function(t){return{regExp:new RegExp(t,"g"),sub:"&"+p.unicodeToEntity[t]+";"}}),x=/(\r\n?|\n)/g;r.plainText=function(t){return(t||"").replace(v," ")},r.makeEditable=function(t,e,r){function n(){a(),o.style({opacity:0});var t,e=u.attr("class");(t=e?"."+e.split(" ")[0]+"-math-group":"[class*=-math-group]")&&h.select(o.node().parentNode).select(t).style({opacity:0})}function i(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}function a(){var t=f.getPlotDiv(o.node()),e=h.select(t),n=e.select(".svg-container"),a=n.append("div");a.classed("plugin-editable editable",!0).style({position:"absolute","font-family":o.style("font-family")||"Arial","font-size":o.style("font-size")||12,color:r.fill||o.style("fill")||"black",opacity:1,"background-color":r.background||"transparent",outline:"#ffffff33 1px solid",margin:[-parseFloat(o.style("font-size"))/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(r.text||o.attr("data-unformatted")).call(c(o,n,r)).on("blur",function(){t._editing=!1,o.text(this.textContent).style({opacity:1});var e,r=h.select(this).attr("class");(e=r?"."+r.split(" ")[0]+"-math-group":"[class*=-math-group]")&&h.select(o.node().parentNode).select(e).style({opacity:0});var n=this.textContent;h.select(this).transition().duration(0).remove(),h.select(document).on("mouseup",null),s.edit.call(o,n)}).on("focus",function(){var e=this;t._editing=!0,h.select(document).on("mouseup",function(){if(h.event.target===e)return!1;document.activeElement===a.node()&&a.node().blur()})}).on("keyup",function(){27===h.event.which?(t._editing=!1,o.style({opacity:1}),h.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),s.cancel.call(o,this.textContent)):(s.input.call(o,this.textContent),h.select(this).call(c(o,n,r)))}).on("keydown",function(){13===h.event.which&&this.blur()}).call(i)}r||(r={});var o=this,s=h.dispatch("edit","input","cancel"),l=h.select(this.node()).style({"pointer-events":"all"}),u=e||l;return e&&l.style({"pointer-events":"none"}),r.immediate?n():u.on("click",n),h.rebind(this,s,"on")}},{"../constants/string_mappings":667,"../constants/xmlns_namespaces":668,"../lib":685,d3:107}],705:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{"fast-isnumeric":116}],706:[function(t,e,r){"use strict";var n=e.exports={},i=t("../plots/geo/constants").locationmodeToLayer,a=t("topojson-client").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{"../plots/geo/constants":750,"topojson-client":516}],707:[function(t,e,r){"use strict";function n(t,e){for(var r=new Float32Array(e),n=0;n0)return t.substr(0,e)}var s=t("fast-isnumeric"),l=t("gl-mat4/fromQuat"),u=t("../registry"),c=t("../lib"),h=t("../plots/plots"),f=t("../plots/cartesian/axes"),d=t("../components/color");r.getGraphDiv=function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null===t||void 0===t)throw new Error("DOM element provided is null or undefined");return t},r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&c.log("Clearing previous rejected promises from queue."),t._promises=[]},r.cleanLayout=function(t){var e,r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1);var i=f.list({_fullLayout:t});for(e=0;e3?(g.x=1.02,g.xanchor="left"):g.x<-2&&(g.x=-.02,g.xanchor="right"),g.y>3?(g.y=1.02,g.yanchor="bottom"):g.y<-2&&(g.y=-.02,g.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var v=h.getSubplotIds(t,"gl3d");for(e=0;e1&&o.warn("Full array edits are incompatible with other edits",c);var v=r[""][""];if(u(v))e.set(null);else{if(!Array.isArray(v))return o.warn("Unrecognized full array edit value",c,v),!0;e.set(v)}return!p&&(h(m,g),f(t),!0)}var y,b,x,_,w,M,k,A=Object.keys(r).map(Number).sort(),T=e.get(),S=T||[],E=n(g,c).get(),L=[],C=-1,z=S.length;for(y=0;yS.length-(k?0:1))o.warn("index out of range",c,x);else if(void 0!==M)w.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",c,x),u(M)?L.push(x):k?("add"===M&&(M={}),S.splice(x,0,M),E&&E.splice(x,0,{})):o.warn("Unrecognized full object edit value",c,x,M),C===-1&&(C=x);else for(b=0;b=0;y--)S.splice(L[y],1),E&&E.splice(L[y],1);if(S.length?T||e.set(S):e.set(null),p)return!1;if(h(m,g),d!==a){var D;if(C===-1)D=A;else{for(z=Math.max(S.length,z),D=[],y=0;y=C);y++)D.push(x);for(y=C;y=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function l(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),s(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&s(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function u(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&lN.range[0]?[1,2]:[2,1]);else{var V=N.range[0],H=N.range[1];B?(V<=0&&H<=0&&r(j+".autorange",!0),V<=0?V=H/1e6:H<=0&&(H=V/1e6),r(j+".range[0]",Math.log(V)/Math.LN10),r(j+".range[1]",Math.log(H)/Math.LN10)):(r(j+".range[0]",Math.pow(10,V)),r(j+".range[1]",Math.pow(10,H)))}else r(j+".autorange",!0);w.getComponentMethod("annotations","convertCoords")(t,F,T,r),w.getComponentMethod("images","convertCoords")(t,F,T,r)}else r(j+".autorange",!0)}else if(D.match(I.AX_NAME_PATTERN)){var q=b.nestedProperty(u,k).get(),G=(T||{}).type;G&&"-"!==G||(G="linear"),w.getComponentMethod("annotations","convertCoords")(t,q,G,r),w.getComponentMethod("images","convertCoords")(t,q,G,r)}var Y=C.containerArrayMatch(k);if(Y){a=Y.array,o=Y.index;var W=Y.property,X=b.nestedProperty(l,a),Z=(X||[])[o]||{};if(""===o)k.indexOf("updatemenus")===-1&&(g.docalc=!0);else if(""===W){var J=T;C.isAddVal(T)?x[k]=null:C.isRemoveVal(T)?(x[k]=Z,J=Z):b.warn("unrecognized full object value",e),(n(J,"x")||n(J,"y")&&k.indexOf("updatemenus")===-1)&&(g.docalc=!0)}else!n(Z,"x")&&!n(Z,"y")||b.containsAny(k,["color","opacity","align","dash","updatemenus"])||(g.docalc=!0);f[a]||(f[a]={});var Q=f[a][o];Q||(Q=f[a][o]={}),Q[W]=T,delete e[k]}else if("reverse"===D)R.range?R.range.reverse():(r(j+".autorange",!0),R.range=[1,0]),F.autorange?g.docalc=!0:g.doplot=!0;else{var K=String(A.parts[1]||"");0===L.indexOf("scene")?"camera"===A.parts[1]?g.docamera=!0:g.doplot=!0:0===L.indexOf("geo")?g.doplot=!0:0===L.indexOf("ternary")?g.doplot=!0:"paper_bgcolor"===k?g.doplot=!0:"margin"===L||"autorange"===K||"rangemode"===K||"type"===K||"domain"===K||"fixedrange"===K||"scaleanchor"===K||"scaleratio"===K||k.indexOf("calendar")!==-1||k.match(/^(bar|box|font)/)?g.docalc=!0:!u._has("gl2d")||k.indexOf("axis")===-1&&"plot_bgcolor"!==k?"hiddenlabels"===k?g.docalc=!0:L.indexOf("legend")!==-1?g.dolegend=!0:k.indexOf("title")!==-1?g.doticks=!0:L.indexOf("bgcolor")!==-1?g.dolayoutstyle=!0:S>1&&b.containsAny(K,["tick","exponent","grid","zeroline"])?g.doticks=!0:k.indexOf(".linewidth")!==-1&&k.indexOf("axis")!==-1?g.doticks=g.dolayoutstyle=!0:S>1&&K.indexOf("line")!==-1?g.dolayoutstyle=!0:S>1&&"mirror"===K?g.doticks=g.dolayoutstyle=!0:"margin.pad"===k?g.doticks=g.dolayoutstyle=!0:["hovermode","dragmode"].indexOf(k)!==-1||k.indexOf("spike")!==-1?g.domodebar=!0:["height","width","autosize"].indexOf(k)===-1&&(g.doplot=!0):g.doplot=!0,A.set(T)}}}for(a in f){C.applyContainerArrayChanges(t,b.nestedProperty(l,a),f[a],g)||(g.doplot=!0)}var $=u._axisConstraintGroups;for(var tt in _)for(o=0;o<$.length;o++){var et=$[o];if(et[tt]){g.docalc=!0;for(var rt in et)_[rt]||(O.getFromId(t,rt)._constraintShrinkable=!0)}}var nt=u.width,it=u.height;return t.layout.autosize&&M.plotAutoSize(t,t.layout,u),(e.height||e.width||u.width!==nt||u.height!==it)&&(g.docalc=!0),(g.doplot||g.docalc)&&(g.layoutReplot=!0),{flags:g,undoit:x,redoit:v,eventData:b.extendDeep({},v)}}function m(t){var e=g.select(t),r=t._fullLayout;if(r._container=e.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([0]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n=[];g.selectAll("defs").each(function(){this.id&&n.push(this.id.split("-")[1])}),r._uid=b.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(E.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0);var a=r._paper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._toppaper.append("g").classed("hoverlayer",!0),t.emit("plotly_framework")}var g=t("d3"),v=t("fast-isnumeric"),y=t("../plotly"),b=t("../lib"),x=t("../lib/events"),_=t("../lib/queue"),w=t("../registry"),M=t("../plots/plots"),k=t("../plots/cartesian/graph_interact"),A=t("../plots/polar"),T=t("../components/drawing"),S=t("../components/errorbars"),E=t("../constants/xmlns_namespaces"),L=t("../lib/svg_text_utils"),C=t("./manage_arrays"),z=t("./helpers"),D=t("./subroutines"),I=t("../plots/cartesian/constants"),P=t("../plots/cartesian/constraints"),O=t("../plots/cartesian/axis_ids");y.plot=function(t,e,r,n){function o(){if(v)return y.addFrames(t,v)}function s(){for(var e=E._basePlotModules,r=0;r=s.length?s[0]:s[t]:s}function i(t){return Array.isArray(l)?t>=l.length?l[0]:l[t]:l}function a(t,e){var r=0;return function(){if(t&&++r===e)return t()}}if(t=z.getGraphDiv(t),!b.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var o=t._transitionData;o._frameQueue||(o._frameQueue=[]),r=M.supplyAnimationDefaults(r);var s=r.transition,l=r.frame;return void 0===o._frameWaitingCnt&&(o._frameWaitingCnt=0),new Promise(function(l,u){function c(){t.emit("plotly_animated"),window.cancelAnimationFrame(o._animationRaf),o._animationRaf=null}function h(){o._currentFrame&&o._currentFrame.onComplete&&o._currentFrame.onComplete();var e=o._currentFrame=o._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,o._lastFrameAt=Date.now(),o._timeToNext=e.frameOpts.duration,M.transition(t,e.frame.data,e.frame.layout,z.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else c()}function f(){t.emit("plotly_animating"),o._lastFrameAt=-1/0,o._timeToNext=0,o._runningTransitions=0,o._currentFrame=null;var e=function(){o._animationRaf=window.requestAnimationFrame(e),Date.now()-o._lastFrameAt>o._timeToNext&&h()};e()}function d(t){return Array.isArray(s)?g>=s.length?t.transitionOpts=s[g]:t.transitionOpts=s[0]:t.transitionOpts=s,g++,t}var p,m,g=0,v=[],y=void 0===e||null===e,x=Array.isArray(e);if(y||x||!b.isPlainObject(e)){if(y||["string","number"].indexOf(typeof e)!==-1)for(p=0;p0&&kk)&&A.push(m);v=A}}v.length>0?function(e){if(0!==e.length){for(var s=0;s=0;i--)if(b.isPlainObject(e[i])){var f=(u[e[i].name]||{}).name,d=e[i].name;f&&d&&"number"==typeof d&&u[f]&&(n++,b.warn('addFrames: overwriting frame "'+u[f].name+'" with a frame whose name of type "number" also equates to "'+f+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),n>5&&b.warn("addFrames: This API call has yielded too many warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),h.push({frame:M.supplyFrameDefaults(e[i]),index:r&&void 0!==r[i]&&null!==r[i]?r[i]:c+i})}h.sort(function(t,e){return t.index>e.index?-1:t.index=0;i--){if(a=h[i].frame,"number"==typeof a.name&&b.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+t._transitionData._counter++];);if(u[a.name]){for(o=0;o=0;r--)n=e[r],a.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:i[n]});var s=M.modifyFrames,l=M.modifyFrames,u=[t,o],c=[t,a];return _&&_.add(t,s,u,l,c),M.modifyFrames(t,a)},y.purge=function(t){t=z.getGraphDiv(t);var e=t._fullLayout||{},r=t._fullData||[];return M.cleanPlot([],{},r,e),M.purge(t),x.purge(t),e._container&&e._container.remove(),delete t._context,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,delete t._hmpixcount,delete t._hmlumcount,t}},{"../components/drawing":602,"../components/errorbars":608,"../constants/xmlns_namespaces":668,"../lib":685,"../lib/events":676,"../lib/queue":697,"../lib/svg_text_utils":704,"../plotly":719,"../plots/cartesian/axis_ids":727,"../plots/cartesian/constants":729,"../plots/cartesian/constraints":731,"../plots/cartesian/graph_interact":733,"../plots/plots":787,"../plots/polar":790,"../registry":802,"./helpers":709,"./manage_arrays":710,"./subroutines":716,d3:107,"fast-isnumeric":116}],712:[function(t,e,r){"use strict";function n(t,r){try{t._fullLayout._paper.style("background",r)}catch(t){e.exports.logging>0&&console.error(t)}}e.exports={staticPlot:!1,editable:!1,autosizable:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:"reset+autosize",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:"Edit chart",showSources:!1,displayModeBar:"hover",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,displaylogo:!0,plotGlPixelRatio:2,setBackground:n,topojsonURL:"https://cdn.plot.ly/",mapboxAccessToken:null,logging:!1,globalTransforms:[]}},{}],713:[function(t,e,r){"use strict";function n(t){var e,r;"area"===t?(e={attributes:b},r={}):(e=d.modules[t]._module,r=e.basePlotModule);var n={};n.type=null,w(n,m),w(n,e.attributes),r.attributes&&w(n,r.attributes),Object.keys(d.componentsRegistry).forEach(function(e){var r=d.componentsRegistry[e];r.schema&&r.schema.traces&&r.schema.traces[t]&&Object.keys(r.schema.traces[t]).forEach(function(e){f(n,r.schema.traces[t][e],e)})}),n.type=t;var i={meta:e.meta||{},attributes:s(n)};if(e.layoutAttributes){var a={};w(a,e.layoutAttributes),i.layoutAttributes=s(a)}return i}function i(){var t={};return w(t,g),Object.keys(d.subplotsRegistry).forEach(function(e){var r=d.subplotsRegistry[e];if(r.layoutAttributes)if("cartesian"===r.name)h(t,r,"xaxis"),h(t,r,"yaxis");else{var n="subplot"===r.attr?r.name:r.attr;h(t,r,n)}}),t=c(t),Object.keys(d.componentsRegistry).forEach(function(e){var r=d.componentsRegistry[e];r.layoutAttributes&&(r.schema&&r.schema.layout?Object.keys(r.schema.layout).forEach(function(e){f(t,r.schema.layout[e],e)}):f(t,r.layoutAttributes,r.name))}),{layoutAttributes:s(t)}}function a(t){ +var e=d.transformsRegistry[t],r=w({},e.attributes);return Object.keys(d.componentsRegistry).forEach(function(e){var n=d.componentsRegistry[e];n.schema&&n.schema.transforms&&n.schema.transforms[t]&&Object.keys(n.schema.transforms[t]).forEach(function(e){f(r,n.schema.transforms[t][e],e)})}),{attributes:s(r)}}function o(){var t={frames:p.extendDeep({},v)};return s(t),t.frames}function s(t){return l(t),u(t),t}function l(t){function e(t){return{valType:"string"}}function n(t,n,i){r.isValObject(t)?"data_array"===t.valType?(t.role="data",i[n+"src"]=e(n)):t.arrayOk===!0&&(i[n+"src"]=e(n)):p.isPlainObject(t)&&(t.role="object")}r.crawl(t,n)}function u(t){function e(t,e,r){if(t){var n=t[k];n&&(delete t[k],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}r.crawl(t,e)}function c(t){return _(t,{radialaxis:x.radialaxis,angularaxis:x.angularaxis}),_(t,x.layout),t}function h(t,e,r){var n=p.nestedProperty(t,r),i=w({},e.layoutAttributes);i[M]=!0,n.set(i)}function f(t,e,r){var n=p.nestedProperty(t,r);n.set(w(n.get()||{},e))}var d=t("../registry"),p=t("../lib"),m=t("../plots/attributes"),g=t("../plots/layout_attributes"),v=t("../plots/frame_attributes"),y=t("../plots/animation_attributes"),b=t("../plots/polar/area_attributes"),x=t("../plots/polar/axis_attributes"),_=p.extendFlat,w=p.extendDeep,M="_isSubplotObj",k="_isLinkedToArray",A=[M,k,"_arrayAttrRegexps","_deprecated"];r.IS_SUBPLOT_OBJ=M,r.IS_LINKED_TO_ARRAY=k,r.DEPRECATED="_deprecated",r.UNDERSCORE_ATTRS=A,r.get=function(){var t={};d.allTypes.concat("area").forEach(function(e){t[e]=n(e)});var e={};return Object.keys(d.transformsRegistry).forEach(function(t){e[t]=a(t)}),{defs:{valObjects:p.valObjects,metaKeys:A.concat(["description","role"])},traces:t,layout:i(),transforms:e,frames:o(),animation:s(y)}},r.crawl=function(t,e,n){var i=n||0;Object.keys(t).forEach(function(n){var a=t[n];A.indexOf(n)===-1&&(e(a,n,t,i),r.isValObject(a)||p.isPlainObject(a)&&r.crawl(a,e,i+1))})},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){function e(e,r,o,s){if(a=a.slice(0,s).concat([r]),e&&("data_array"===e.valType||e.arrayOk===!0)){var l=n(a),u=p.nestedProperty(t,l).get();Array.isArray(u)&&i.push(l)}}function n(t){return t.join(".")}var i=[],a=[];if(r.crawl(t._module.attributes,e),t.transforms)for(var o=t.transforms,s=0;s=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}var i=t("d3"),a=t("../plotly"),o=t("../registry"),s=t("../plots/plots"),l=t("../lib"),u=t("../components/color"),c=t("../components/drawing"),h=t("../components/titles"),f=t("../components/modebar");r.layoutStyles=function(t){return l.syncOrAsync([s.doAutoMargin,r.lsInner],t)},r.lsInner=function(t){var e,o=t._fullLayout,s=o._size,l=a.Axes.list(t);for(e=0;e1)};f(e.width)&&f(e.height)||n(new Error("Height and width should be pixel values."));var d=l(t,{format:"png",height:e.height,width:e.width}),p=d.gd;p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var m=s.getRedrawFunc(p);a.plot(p,d.data,d.layout,d.config).then(m).then(h).then(function(t){r(t)}).catch(function(t){n(t)})})}var i=t("fast-isnumeric"),a=t("../plotly"),o=t("../lib"),s=t("../snapshot/helpers"),l=t("../snapshot/cloneplot"),u=t("../snapshot/tosvg"),c=t("../snapshot/svgtoimg");e.exports=n},{"../lib":685,"../plotly":719,"../snapshot/cloneplot":803,"../snapshot/helpers":806,"../snapshot/svgtoimg":808,"../snapshot/tosvg":810,"fast-isnumeric":116}],718:[function(t,e,r){"use strict";function n(t,e,r,i,a,u){u=u||[];for(var c=Object.keys(t),f=0;f1&&l.push(o("object","layout"))),f.supplyDefaults(u);for(var c=u._fullData,g=r.length,v=0;v.3*h||a(n)||a(i))){var f=r.dtick/2;t+=t+f.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=O.tickIncrement(t,"M6","reverse")+1.5*C:a.exactMonths>.8?t=O.tickIncrement(t,"M1","reverse")+15.5*C:t-=C/2;var s=O.tickIncrement(t,r);if(s<=n)return s}return t}function a(t){var e,r,n=t.tickvals,i=t.ticktext,a=new Array(n.length),o=_.simpleMap(t.range,t.r2l),s=1.0001*o[0]-1e-4*o[1],u=1.0001*o[1]-1e-4*o[0],c=Math.min(s,u),h=Math.max(s,u),f=0;Array.isArray(i)||(i=[]);var d="category"===t.type?t.d2l_noadd:t.d2l;for("log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1)),r=0;rc&&e10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=C&&i<=10||e>=15*C)t._tickround="d";else if(e>=D&&i<=16||e>=z)t._tickround="M";else if(e>=I&&i<=19||e>=D)t._tickround="S";else{var a=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,a)-20}}else if(b(e)||"L"===e.charAt(0)){var o=t.range.map(t.r2d||Number);b(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01);Math.abs(l)>3&&("SI"===t.exponentformat||"B"===t.exponentformat?t._tickexponent=3*Math.round((l-1)/3):t._tickexponent=l)}else t._tickround=null}function l(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}function u(t,e,r,n){var i=t._tickround,a=r&&t.hoverformat||t.tickformat;n&&(i=b(i)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o,s=_.formatDate(e.x,a,i,t.calendar),l=s.indexOf("\n");l!==-1&&(o=s.substr(l+1),s=s.substr(0,l)),n&&("00:00:00"===s||"00:00"===s?(s=o,o=""):8===s.length&&(s=s.replace(/:00$/,""))),o&&(r?"d"===i?s+=", "+o:s=o+(s?", "+s:""):t._inCalcTicks&&o===t._prevDateHead||(s+="
"+o,t._prevDateHead=o)),e.text=s}function c(t,e,r,n,i){var a=t.dtick,o=e.x;if(!n||"string"==typeof a&&"L"===a.charAt(0)||(a="L3"),t.tickformat||"string"==typeof a&&"L"===a.charAt(0))e.text=d(Math.pow(10,o),t,i,n);else if(b(a)||"D"===a.charAt(0)&&_.mod(o+.01,1)<.1)if(["e","E","power"].indexOf(t.exponentformat)!==-1){var s=Math.round(o);e.text=0===s?1:1===s?"10":s>1?"10"+s+"":"10\u2212"+-s+"",e.fontSize*=1.25}else e.text=d(Math.pow(10,o),t,"","fakehover"),"D1"===a&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6);else{if("D"!==a.charAt(0))throw"unrecognized dtick "+String(a);e.text=String(Math.round(Math.pow(10,_.mod(o,1)))),e.fontSize*=.75}if("D1"===t.dtick){var l=String(e.text).charAt(0);"0"!==l&&"1"!==l||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(o<0?.5:.25)))}}function h(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}function f(t,e,r,n,i){"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=d(e.x,t,i,n)}function d(t,e,r,n){var i=t<0,a=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,u=e.tickformat,c=e.separatethousands;if(n){var h={exponentformat:e.exponentformat,dtick:"none"===e.showexponent?e.dtick:b(t)?Math.abs(t)||1:1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};s(h),a=(Number(h._tickround)||0)+4,l=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return y.format(u)(t).replace(/-/g,"\u2212");var f=Math.pow(10,-a)/2;if("none"===o&&(l=0),(t=Math.abs(t))12||l<-15)?t+="e"+m:"E"===o?t+="E"+m:"power"===o?t+="\xd710"+m+"":"B"===o&&9===l?t+="B":"SI"!==o&&"B"!==o||(t+=H[l/3+5])}return i?"\u2212"+t:t}function p(t,e){var r,n,i=[];for(r=0;r1)for(n=1;n2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},O.getAutoRange=function(t){var e,r=[],n=t._min[0].val,i=t._max[0].val;for(e=1;e0&&c>0&&h/c>f&&(l=o,u=s,f=h/c);if(n===i){var m=n-1,g=n+1;r="tozero"===t.rangemode?n<0?[m,0]:[0,g]:"nonnegative"===t.rangemode?[Math.max(0,m),Math.max(0,g)]:[m,g]}else f&&("linear"!==t.type&&"-"!==t.type||("tozero"===t.rangemode?(l.val>=0&&(l={val:0,pad:0}),u.val<=0&&(u={val:0,pad:0})):"nonnegative"===t.rangemode&&(l.val-f*l.pad<0&&(l={val:0,pad:0}),u.val<0&&(u={val:1,pad:0})),f=(u.val-l.val)/(t._length-l.pad-u.pad)),r=[l.val-f*l.pad,u.val+f*u.pad]);return r[0]===r[1]&&("tozero"===t.rangemode?r=r[0]<0?[r[0],0]:r[0]>0?[0,r[0]]:[0,1]:(r=[r[0]-1,r[0]+1],"nonnegative"===t.rangemode&&(r[0]=Math.max(0,r[0])))),d&&r.reverse(),_.simpleMap(r,t.l2r||Number)},O.doAutoRange=function(t){t._length||t.setScale();var e=t._min&&t._max&&t._min.length&&t._max.length;if(t.autorange&&e){t.range=O.getAutoRange(t);var r=t._input;r.range=t.range.slice(),r.autorange=t.autorange}},O.saveRangeInitial=function(t,e){for(var r=O.list(t,"",!0),n=!1,i=0;i=f?d=!1:s.val>=u&&s.pad<=f&&(t._min.splice(o,1),o--);d&&t._min.push({val:u,pad:y&&0===u?0:f})}if(n(c)){for(d=!0,o=0;o=c&&s.pad>=h?d=!1:s.val<=c&&s.pad<=h&&(t._max.splice(o,1),o--);d&&t._max.push({val:c,pad:y&&0===c?0:h})}}}if((t.autorange||!!_.nestedProperty(t,"rangeslider.autorange").get())&&e){t._min||(t._min=[]),t._max||(t._max=[]),r||(r={}),t._m||t.setScale();var a,o,s,l,u,c,h,f,d,p,m,g=e.length,v=r.padded?.05*t._length:0,y=r.tozero&&("linear"===t.type||"-"===t.type),x=n((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),w=n((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),M=n(r.vpadplus||r.vpad),k=n(r.vpadminus||r.vpad);for(a=0;a<6;a++)i(a);for(a=g-1;a>5;a--)i(a)}},O.autoBin=function(t,e,r,a,o){var s=_.aggNums(Math.min,null,t),l=_.aggNums(Math.max,null,t);if(o||(o=e.calendar),"category"===e.type)return{start:s-.5,end:l+.5,size:1};var u;if(r)u=(l-s)/r;else{var c=_.distinctVals(t),h=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),f=h*_.roundUp(c.minDiff/h,[.9,1.9,4.9,9.9],!0);u=Math.max(f,2*_.stdev(t)/Math.pow(t.length,a?.25:.4)),b(u)||(u=1)}var d;d="log"===e.type?{type:"linear",range:[s,l]}:{type:e.type,range:_.simpleMap([s,l],e.c2r,0,o),calendar:o},O.setConvert(d),O.autoTicks(d,u);var p,m=O.tickIncrement(O.tickFirst(d),d.dtick,"reverse",o);if("number"==typeof d.dtick){m=n(m,t,d,s,l);p=m+(1+Math.floor((l-m)/d.dtick))*d.dtick}else for("M"===d.dtick.charAt(0)&&(m=i(m,t,d.dtick,s,o)),p=m;p<=l;)p=O.tickIncrement(p,d.dtick,!1,o);return{start:e.c2r(m,0,o),end:e.c2r(p,0,o),size:d.dtick}},O.calcTicks=function(t){var e=_.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=_.constrain(t._length/r,4,9)+1)),"array"===t.tickmode&&(n*=100),O.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}if(t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),s(t),"array"===t.tickmode)return a(t);t._tmin=O.tickFirst(t);var i=e[1]=l:u<=l)&&(o.push(u),!(o.length>1e3));u=O.tickIncrement(u,t.dtick,i,t.calendar));t._tmax=o[o.length-1],t._prevDateHead="",t._inCalcTicks=!0;for(var c=new Array(o.length),h=0;hE?(e/=E,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="M"+12*o(e,r,R)):n>L?(e/=L,t.dtick="M"+o(e,1,F)):n>C?(t.dtick=o(e,C,B),t.tick0=_.dateTick0(t.calendar,!0)):n>z?t.dtick=o(e,z,F):n>D?t.dtick=o(e,D,N):n>I?t.dtick=o(e,I,N):(r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=o(e,r,R))}else if("log"===t.type){t.tick0=0;var i=_.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(i[1]-i[0])<1){var a=1.5*Math.abs((i[1]-i[0])/e);e=Math.abs(Math.pow(10,i[1])-Math.pow(10,i[0]))/a,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="L"+o(e,r,R)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):(t.tick0=0,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=o(e,r,R));if(0===t.dtick&&(t.dtick=1),!b(t.dtick)&&"string"!=typeof t.dtick){var s=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(s)}},O.tickIncrement=function(t,e,r,n){var i=r?-1:1;if(b(e))return t+i*e;var a=e.charAt(0),o=i*Number(e.substr(1));if("M"===a)return _.incrementMonth(t,o,n);if("L"===a)return Math.log(Math.pow(10,t)+o)/Math.LN10;if("D"===a){var s="D2"===e?V:U,l=t+.01*i,u=_.roundUp(_.mod(l,1),s,r);return Math.floor(l)+Math.log(y.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(e)},O.tickFirst=function(t){var e=t.r2l||Number,r=_.simpleMap(t.range,e),n=r[1]1&&e2*i}function a(t){for(var e,r=Math.max(1,(t.length-1)/1e3),n=0,i=0,a=0;a2*n}var o=t("fast-isnumeric"),s=t("../../lib"),l=t("../../constants/numerical").BADNUM;e.exports=function(t,e){return i(t,e)?"date":a(t)?"category":n(t)?"linear":"-"}},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],726:[function(t,e,r){"use strict";var n=t("tinycolor2").mix,i=t("../../registry"),a=t("../../lib"),o=t("../../components/color/attributes").lightFraction,s=t("./layout_attributes"),l=t("./tick_value_defaults"),u=t("./tick_mark_defaults"),c=t("./tick_label_defaults"),h=t("./category_order_defaults"),f=t("./set_convert"),d=t("./ordered_categories");e.exports=function(t,e,r,p,m){function g(r,n){return a.coerce2(t,e,s,r,n)}var v=p.letter,y=p.font||{},b="Click to enter "+(p.title||v.toUpperCase()+" axis")+" title",x=r("visible",!p.cheateronly),_=e.type;if("date"===_){i.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",p.calendar)}if(f(e,m),r("autorange",!e.isValidRange(t.range))&&r("rangemode"),r("range"),e.cleanRange(),h(t,e,r),e._initialCategories="category"===_?d(v,e.categoryorder,e.categoryarray,p.data):[],!x)return e;var w=r("color"),M=w===t.color?w:y.color;r("title",b),a.coerceFont(r,"titlefont",{family:y.family,size:Math.round(1.2*y.size),color:M}),l(t,e,r,_),c(t,e,r,_,p),u(t,e,r,p);var k=g("linecolor",w),A=g("linewidth"),T=r("showline",!!k||!!A);T||(delete e.linecolor,delete e.linewidth),(T||e.ticks)&&r("mirror");var S=g("gridcolor",n(w,p.bgColor,o).toRgbString()),E=g("gridwidth");r("showgrid",p.showGrid||!!S||!!E)||(delete e.gridcolor,delete e.gridwidth);var L=g("zerolinecolor",w),C=g("zerolinewidth");return r("zeroline",p.showGrid||!!L||!!C)||(delete e.zerolinecolor,delete e.zerolinewidth),e}},{"../../components/color/attributes":577,"../../lib":685,"../../registry":802,"./category_order_defaults":728,"./layout_attributes":735,"./ordered_categories":737,"./set_convert":741,"./tick_label_defaults":742,"./tick_mark_defaults":743,"./tick_value_defaults":744,tinycolor2:514}],727:[function(t,e,r){"use strict";function n(t,e,r){function n(t,r){for(var n=Object.keys(t),i=/^[xyz]axis[0-9]*/,a=[],o=0;o0;a&&(n="array");var o=r("categoryorder",n);"array"===o&&r("categoryarray"),a||"array"!==o||(e.categoryorder="trace")}}},{}],729:[function(t,e,r){"use strict";e.exports={idRegex:{x:/^x([2-9]|[1-9][0-9]+)?$/,y:/^y([2-9]|[1-9][0-9]+)?$/},attrRegex:{x:/^xaxis([2-9]|[1-9][0-9]+)?$/,y:/^yaxis([2-9]|[1-9][0-9]+)?$/},xAxisMatch:/^xaxis[0-9]*$/,yAxisMatch:/^yaxis[0-9]*$/,AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,MAXDIST:20,YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,BENDPX:1.5,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4]}},{}],730:[function(t,e,r){"use strict";function n(t,e,r,n){var i,a,s,l,u=n[o(e)].type,c=[];for(a=0;aa*p))for(r=0;r=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function u(t,e){return t?"nsew"===t?"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function c(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",i+"Z")}function h(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:T.background,stroke:T.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+r+")").attr("d","M0,0Z")}function f(t){t.selectAll(".select-outline").remove()}function d(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),i||(t.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function p(t){x.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function m(t){return["lasso","select"].indexOf(t)!==-1}function g(t,e){return"M"+(t.l-.5)+","+(e-j-.5)+"h-3v"+(2*j+1)+"h3ZM"+(t.r+.5)+","+(e-j-.5)+"h3v"+(2*j+1)+"h-3Z"}function v(t,e){return"M"+(e-j-.5)+","+(t.t-.5)+"v-3h"+(2*j+1)+"v3ZM"+(e-j-.5)+","+(t.b+.5)+"v3h"+(2*j+1)+"v-3Z"}function y(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,j)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function b(t,e,r){var n,i,a,o,s,l,u=!1,c={},h={};for(n=0;nj||s>j?(wt="xy",o/nt>s/it?(s=o*it/nt,vt>a?yt.t=vt-s:yt.b=vt+s):(o=s*nt/it,gt>i?yt.l=gt-o:yt.r=gt+o),kt.attr("d",y(yt))):n():!ot||szoom back out","long"),R=!1)}function G(e,r){var n=1===(N+B).length;if(e)J();else if(2!==r||n){if(1===r&&n){var i=N?tt[0]:$[0],o="s"===N||"w"===B?0:1,s=i._name+".range["+o+"]",l=a(i,o),u="left",c="middle";if(i.fixedrange)return;N?(c="n"===N?"top":"bottom","right"===i.side&&(u="right")):"e"===B&&(u="right"),t._context.showAxisRangeEntryBoxes&&x.select(pt).call(A.makeEditable,null,{immediate:!0,background:ht.paper_bgcolor,text:String(l),fill:i.tickfont?i.tickfont.color:"#444",horizontalAlign:u,verticalAlign:c}).on("edit",function(e){var r=i.d2r(e);void 0!==r&&w.relayout(t,s,r)})}}else Z()}function Y(e){function r(t,e,r){function n(e){return t.l2r(a+(e-a)*r)}if(!t.fixedrange){var i=k.simpleMap(t.range,t.r2l),a=i[0]+(i[1]-i[0])*e;t.range=i.map(n)}}if(t._context.scrollZoom||ht._enablescrollzoom){if(t._transitioningWithDuration)return k.pauseEvent(e);var n=t.querySelector(".plotly");if(U(),!(n.scrollHeight-n.clientHeight>10||n.scrollWidth-n.clientWidth>10)){clearTimeout(Tt);var i=-e.deltaY;if(isFinite(i)||(i=e.wheelDelta/10),!isFinite(i))return void k.log("Did not find wheel motion attributes: ",e);var a,o=Math.exp(-Math.min(Math.max(i,-20),20)/100),s=Et.draglayer.select(".nsewdrag").node().getBoundingClientRect(),l=(e.clientX-s.left)/s.width,u=(s.bottom-e.clientY)/s.height;if(B||lt){for(B||(l=.5),a=0;a<$.length;a++)r($[a],l,o);At[2]*=o,At[0]+=At[2]*l*(1/o-1)}if(N||lt){for(N||(u=.5),a=0;a0;n--)r.push(e);return r}function i(t,e){for(var r=[],n=0;n$.width||Q<0||Q>$.height)return w.unhoverRaw(t,e)}if(O="xval"in e?n(a,e.xval):i(E,J),j="yval"in e?n(a,e.yval):i(L,Q),!m(O[0])||!m(j[0]))return v.warn("Fx.hover failed",e,t),w.unhoverRaw(t,e)}var tt=1/0;for(F=0;F1||B.hoverinfo.indexOf("name")!==-1?B.name:void 0,index:!1,distance:Math.min(tt,T.MAXDIST),color:x.defaultLine,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},o[U]&&(Y.subplot=o[U]._subplot),W=X.length,"array"===H){var et=e[F];"pointNumber"in et?(Y.index=et.pointNumber,H="closest"):(H="","xval"in et&&(q=et.xval,H="x"),"yval"in et&&(G=et.yval,H=H?"closest":"y"))}else q=O[V],G=j[V];if(B._module&&B._module.hoverPoints){var rt=B._module.hoverPoints(Y,q,G,H);if(rt)for(var nt,it=0;itW&&(X.splice(0,W),tt=X[0].distance)}if(0===X.length)return w.unhoverRaw(t,e);X.sort(function(t,e){return t.distance-e.distance});var at=t._hoverdata,ot=[];for(R=0;R1,ct=x.combine(o.plot_bgcolor||x.background,o.paper_bgcolor),ht={hovermode:P,rotateLabels:ut,bgColor:ct,container:o._hoverlayer,outerContainer:o._paperdiv},ft=c(X,ht);if(h(X,ut?"xa":"ya"),f(ft,ut),e.target&&e.target.tagName){var dt=k.getComponentMethod("annotations","hasClickToShow")(t,ot);M(p.select(e.target),dt?"pointer":"")}e.target&&d(t,e,at)&&(at&&t.emit("plotly_unhover",{event:e,points:at}), +t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:E,yaxes:L,xvals:O,yvals:j}))}function s(t){return t.subplot||t.xaxis+t.yaxis||t.geo}function l(t,e){t.posref="y"===e?(t.x0+t.x1)/2:(t.y0+t.y1)/2,t.x0=v.constrain(t.x0,0,t.xa._length),t.x1=v.constrain(t.x1,0,t.xa._length),t.y0=v.constrain(t.y0,0,t.ya._length),t.y1=v.constrain(t.y1,0,t.ya._length);var r;if(void 0!==t.xLabelVal){r="log"===t.xa.type&&t.xLabelVal<=0;var n=A.tickText(t.xa,t.xa.c2l(r?-t.xLabelVal:t.xLabelVal),"hover");r?0===t.xLabelVal?t.xLabel="0":t.xLabel="-"+n.text:t.xLabel=n.text,t.xVal=t.xa.c2d(t.xLabelVal)}if(void 0!==t.yLabelVal){r="log"===t.ya.type&&t.yLabelVal<=0;var i=A.tickText(t.ya,t.ya.c2l(r?-t.yLabelVal:t.yLabelVal),"hover");r?0===t.yLabelVal?t.yLabel="0":t.yLabel="-"+i.text:t.yLabel=i.text,t.yVal=t.ya.c2d(t.yLabelVal)}if(void 0!==t.zLabelVal&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var a=A.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+a+" / -"+A.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xb1 "+a,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var o=A.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+o+" / -"+A.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xb1 "+o,"y"===e&&(t.distance+=1)}var s=t.trace.hoverinfo;return"all"!==s&&(s=s.split("+"),s.indexOf("x")===-1&&(t.xLabel=void 0),s.indexOf("y")===-1&&(t.yLabel=void 0),s.indexOf("z")===-1&&(t.zLabel=void 0),s.indexOf("text")===-1&&(t.text=void 0),s.indexOf("name")===-1&&(t.name=void 0)),t}function u(t,e){var r=e.hovermode,n=e.container,i=t[0],a=i.xa,o=i.ya,s=a.showspikes,l=o.showspikes;if(n.selectAll(".spikeline").remove(),"closest"===r&&(s||l)){var u=e.fullLayout,c=a._offset+(i.x0+i.x1)/2,h=o._offset+(i.y0+i.y1)/2,f=x.combine(u.plot_bgcolor,u.paper_bgcolor),d=g.readability(i.color,f)<1.5?x.contrast(f):i.color;if(l){var p=o.spikemode,m=o.spikethickness,v=o.spikecolor||d,y=o._boundingBox,b=(y.left+y.right)/215&&(r=r.substr(0,12)+"...")),void 0!==t.extraText&&(n+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(n+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(n+="y: "+t.yLabel+"
"),n+=(n?"z: ":"")+t.zLabel):A&&t[i+"Label"]===g?n=t[("x"===i?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&(n=t.yLabel):n=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",t.text&&!Array.isArray(t.text)&&(n+=(n?"
":"")+t.text),""===n&&(""===r&&e.remove(),n=r);var f=e.select("text.nums").call(_.font,t.fontFamily||u,t.fontSize||c,t.fontColor||h).call(_.setPosition,0,0).text(n).attr("data-notex",1).call(b.convertToTspans);f.selectAll("tspan.line").call(_.setPosition,0,0);var d=e.select("text.name"),m=0;r&&r!==n?(d.call(_.font,t.fontFamily||u,t.fontSize||c,l).text(r).call(_.setPosition,0,0).attr("data-notex",1).call(b.convertToTspans),d.selectAll("tspan.line").call(_.setPosition,0,0),m=d.node().getBoundingClientRect().width+2*j):(d.remove(),e.select("rect").remove()),e.select("path").style({fill:l,stroke:h});var v,y,T=f.node().getBoundingClientRect(),S=t.xa._offset+(t.x0+t.x1)/2,E=t.ya._offset+(t.y0+t.y1)/2,L=Math.abs(t.x1-t.x0),z=Math.abs(t.y1-t.y0),D=T.width+O+j+m;t.ty0=w-T.top,t.bx=T.width+2*j,t.by=T.height+2*j,t.anchor="start",t.txwidth=T.width,t.tx2width=m,t.offset=0,a?(t.pos=S,v=E+z/2+D<=k,y=E-z/2-D>=0,"top"!==t.idealAlign&&v||!y?v?(E+=z/2,t.anchor="start"):t.anchor="middle":(E-=z/2,t.anchor="end")):(t.pos=E,v=S+L/2+D<=M,y=S-L/2-D>=0,"left"!==t.idealAlign&&v||!y?v?(S+=L/2,t.anchor="start"):t.anchor="middle":(S-=L/2,t.anchor="end")),f.attr("text-anchor",t.anchor),m&&d.attr("text-anchor",t.anchor),e.attr("transform","translate("+S+","+E+")"+(a?"rotate("+C+")":""))}),L}function h(t,e){function r(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var u=0;for(o=0;oe.pmax&&u++;for(o=t.length-1;o>=0&&!(u<=0);o--)l=t[o],l.pos>e.pmax-1&&(l.del=!0,u--);for(o=0;o=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(u<=0);o--)l=t[o],l.pos+l.dp+l.size>e.pmax&&(l.del=!0,u--)}}}for(var n,i,a,o,s,l,u,c=0,h=t.map(function(t,r){var n=t[e];return[{i:r,dp:0,pos:t.pos,posref:t.posref,size:t.by*("x"===n._id.charAt(0)?D:1)/2,pmin:n._offset,pmax:n._offset+n._length}]}).sort(function(t,e){return t[0].posref-e[0].posref});!n&&c<=t.length;){for(c++,n=!0,o=0;o.01&&p.pmin===m.pmin&&p.pmax===m.pmax){for(s=d.length-1;s>=0;s--)d[s].dp+=i;for(f.push.apply(f,d),h.splice(o+1,1),u=0,s=f.length-1;s>=0;s--)u+=f[s].dp;for(a=u/f.length,s=f.length-1;s>=0;s--)f[s].dp-=a;n=!1}else o++}h.forEach(r)}for(o=h.length-1;o>=0;o--){var g=h[o];for(s=g.length-1;s>=0;s--){var v=g[s],y=t[v.i];y.offset=v.dp,y.del=v.del}}}function f(t,e){t.each(function(t){var r=p.select(this);if(t.del)return void r.remove();var n="end"===t.anchor?-1:1,i=r.select("text.nums"),a={start:1,end:-1,middle:0}[t.anchor],o=a*(O+j),s=o+a*(t.txwidth+j),l=0,u=t.offset;"middle"===t.anchor&&(o-=t.tx2width/2,s-=t.tx2width/2),e&&(u*=-P,l=t.offset*I),r.select("path").attr("d","middle"===t.anchor?"M-"+t.bx/2+",-"+t.by/2+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(n*O+l)+","+(O+u)+"v"+(t.by/2-O)+"h"+n*t.bx+"v-"+t.by+"H"+(n*O+l)+"V"+(u-O)+"Z"),i.call(_.setPosition,o+l,u+t.ty0-t.by/2+j).selectAll("tspan.line").attr({x:i.attr("x"),y:i.attr("y")}),t.tx2width&&(r.select("text.name, text.name tspan.line").call(_.setPosition,s+a*j+l,u+t.ty0-t.by/2+j),r.select("rect").call(_.setRect,s+(a-1)*t.tx2width/2+l,u-t.by/2-1,t.tx2width,t.by+2))})}function d(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber))return!0}return!1}var p=t("d3"),m=t("fast-isnumeric"),g=t("tinycolor2"),v=t("../../lib"),y=t("../../lib/events"),b=t("../../lib/svg_text_utils"),x=t("../../components/color"),_=t("../../components/drawing"),w=t("../../components/dragelement"),M=t("../../lib/override_cursor"),k=t("../../registry"),A=t("./axes"),T=t("./constants"),S=t("./dragbox"),E=t("../layout_attributes"),L=e.exports={};L.unhover=w.unhover,L.supplyLayoutDefaults=function(t,e,r){function n(r,n){return v.coerce(t,e,E,r,n)}n("dragmode");var i;if(e._has("cartesian")){i=(e._isHoriz=L.isHoriz(r))?"y":"x"}else i="closest";n("hovermode",i)},L.isHoriz=function(t){for(var e=!0,r=0;rt._lastHoverTime+T.HOVERMINTIME)return o(t,e,r),void(t._lastHoverTime=Date.now());t._hoverTimer=setTimeout(function(){o(t,e,r),t._lastHoverTime=Date.now(),t._hoverTimer=void 0},T.HOVERMINTIME)},L.getDistanceFunction=function(t,e,r,n){return"closest"===t?n||a(e,r):"x"===t?e:r},L.getClosest=function(t,e,r){if(r.index!==!1)r.index>=0&&r.indexc[1]-.01&&(e.domain=[0,1]),i.noneOrAll(t.domain,e.domain,[0,1])}return e}},{"../../lib":685,"fast-isnumeric":116}],739:[function(t,e,r){"use strict";e.exports=function(t,e,r){void 0===r&&(r=.5);var n=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=n[0]+(n[1]-n[0])*r,a=(i-n[0])*e;t.range=t._input.range=[t.l2r(i-a),t.l2r(i+a)]}},{}],740:[function(t,e,r){"use strict";function n(t){return t._id}var i=t("../../lib/polygon"),a=t("../../components/color"),o=t("./axes"),s=t("./constants"),l=i.filter,u=i.tester,c=s.MINSELECT;e.exports=function(t,e,r,i,h){function f(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return t.p2d(r[e])}}function d(t,e){return t-e}var p,m=i.gd._fullLayout._zoomlayer,g=i.element.getBoundingClientRect(),v=i.plotinfo.xaxis._offset,y=i.plotinfo.yaxis._offset,b=e-g.left,x=r-g.top,_=b,w=x,M="M"+b+","+x,k=i.xaxes[0]._length,A=i.yaxes[0]._length,T=i.xaxes.map(n),S=i.yaxes.map(n),E=i.xaxes.concat(i.yaxes);"lasso"===h&&(p=l([[b,x]],s.BENDPX));var L=m.selectAll("path.select-outline").data([1,2]);L.enter().append("path").attr("class",function(t){return"select-outline select-outline-"+t}).attr("transform","translate("+v+", "+y+")").attr("d",M+"Z");var C,z,D,I,P,O=m.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1}).attr("transform","translate("+v+", "+y+")").attr("d","M0,0Z"),j=[],R=i.gd,F=[];for(C=0;Cf?d:o(t)?Number(t):d):d}var a=t("d3"),o=t("fast-isnumeric"),s=t("../../lib"),l=s.cleanNumber,u=s.ms2DateTime,c=s.dateTime2ms,h=t("../../constants/numerical"),f=h.FP_SAFE,d=h.BADNUM,p=t("./constants"),m=t("./axis_ids");e.exports=function(t,e){function r(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-3*w*Math.abs(n-i))}return d}function h(e,r,n){var i=c(e,n||t.calendar);if(i===d){if(!o(e))return d;i=c(new Date(+e))}return i}function g(e,r,n){return u(e,r,n||t.calendar)}function v(e){return t._categories[Math.round(e)]}function y(e){if(null!==e&&void 0!==e){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return d}function b(e){if(t._categoriesMap){var r=t._categoriesMap[e];if(void 0!==r)return r}if("number"==typeof e)return e}function x(e){return o(e)?a.round(t._b+t._m*e,2):d}function _(e){return(e-t._b)/t._m}e=e||{};var w=10;t.c2l="log"===t.type?r:i,t.l2c="log"===t.type?n:i,t.l2p=x,t.p2l=_,t.c2p="log"===t.type?function(t,e){return x(r(t,e))}:x,t.p2c="log"===t.type?function(t){return n(_(t))}:_,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=i,t.d2p=t.r2p=function(t){return x(l(t))},t.p2d=t.p2r=_):"log"===t.type?(t.d2r=t.d2l=function(t,e){return r(l(t),e)},t.r2d=t.r2c=function(t){return n(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=i,t.c2r=r,t.l2d=n,t.d2p=function(e,r){return x(t.d2r(e,r))},t.p2d=function(t){return n(_(t))},t.r2p=function(t){return x(l(t))},t.p2r=_):"date"===t.type?(t.d2r=t.r2d=s.identity,t.d2c=t.r2c=t.d2l=t.r2l=h,t.c2d=t.c2r=t.l2d=t.l2r=g,t.d2p=t.r2p=function(t,e,r){return x(h(t,0,r))},t.p2d=t.p2r=function(t,e,r){return g(_(t),e,r)}):"category"===t.type&&(t.d2r=t.d2c=t.d2l=y,t.r2d=t.c2d=t.l2d=v,t.d2l_noadd=b,t.r2l=t.l2r=t.r2c=t.c2r=i,t.d2p=function(t){return x(b(t))},t.p2d=function(t){return v(_(t))},t.r2p=x,t.p2r=_),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e){e||(e="range");var r,n,i=s.nestedProperty(t,e).get(),a=(t._id||"x").charAt(0);if(n="date"===t.type?s.dfltRange(t.calendar):"y"===a?p.DFLTRANGEY:p.DFLTRANGEX,n=n.slice(),!i||2!==i.length)return void s.nestedProperty(t,e).set(n);for("date"===t.type&&(i[0]=s.cleanDate(i[0],d,t.calendar),i[1]=s.cleanDate(i[1],d,t.calendar)),r=0;r<2;r++)if("date"===t.type){if(!s.isDateTime(i[r],t.calendar)){t[e]=n;break}if(t.r2l(i[0])===t.r2l(i[1])){var l=s.constrain(t.r2l(i[0]),s.MIN_MS+1e3,s.MAX_MS-1e3);i[0]=t.l2r(l-1e3),i[1]=t.l2r(l+1e3);break}}else{if(!o(i[r])){if(!o(i[1-r])){t[e]=n;break}i[r]=i[1-r]*(r?10:.1)} +if(i[r]<-f?i[r]=-f:i[r]>f&&(i[r]=f),i[0]===i[1]){var u=Math.max(1,Math.abs(1e-6*i[0]));i[0]-=u,i[1]+=u}}},t.setScale=function(r){var n=e._size,i=t._id.charAt(0);if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var a=m.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var o=r&&t._r?"_r":"range",l=t.calendar;t.cleanRange(o);var u=t.r2l(t[o][0],l),c=t.r2l(t[o][1],l);if("y"===i?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),!isFinite(t._m)||!isFinite(t._b))throw s.notifier("Something went wrong with axis scaling","long"),e._replotting=!1,new Error("axis scaling")},t.makeCalcdata=function(e,r){var n,i,a,o="date"===t.type&&e[r+"calendar"];if(r in e)for(n=e[r],i=new Array(n.length),a=0;a0?Number(c):u;else if("string"!=typeof c)e.dtick=u;else{var h=c.charAt(0),f=c.substr(1);f=n(f)?Number(f):0,(f<=0||!("date"===o&&"M"===h&&f===Math.round(f)||"log"===o&&"L"===h||"log"===o&&"D"===h&&(1===f||2===f)))&&(e.dtick=u)}var d="date"===o?i.dateTick0(e.calendar):0,p=r("tick0",d);"date"===o?e.tick0=i.cleanDate(p,d):n(p)&&"D1"!==c&&"D2"!==c?e.tick0=Number(p):e.tick0=d}else{var m=r("tickvals");void 0===m?e.tickmode="auto":r("ticktext")}}},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],745:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plotly"),a=t("../../registry"),o=t("../../components/drawing"),s=t("./axes"),l=/((x|y)([2-9]|[1-9][0-9]+)?)axis$/;e.exports=function(t,e,r,u){function c(e,r){function n(e,r){for(i=0;ir.duration?(d(),k=window.cancelAnimationFrame(m)):k=window.requestAnimationFrame(m)}var g=t._fullLayout,v=[],y=function(t){var e,r,n,i,a,o={};for(e in t)if(r=e.split("."),n=r[0].match(l)){var s=n[1],u=s+"axis";if(i=g[u],a={},Array.isArray(t[e])?a.to=t[e].slice(0):Array.isArray(t[e].range)&&(a.to=t[e].range.slice(0)),!a.to)continue;a.axisName=u,a.length=i._length,v.push(s),o[s]=a}return o}(e),b=Object.keys(y),x=function(t,e,r){var n,i,a,o=t._plots,s=[];for(n in o){var l=o[n];if(s.indexOf(l)===-1){var u=l.xaxis._id,c=l.yaxis._id,h=l.xaxis.range,f=l.yaxis.range;l.xaxis._r=l.xaxis.range.slice(),l.yaxis._r=l.yaxis.range.slice(),i=r[u]?r[u].to:h,a=r[c]?r[c].to:f,h[0]===i[0]&&h[1]===i[1]&&f[0]===a[0]&&f[1]===a[1]||e.indexOf(u)===-1&&e.indexOf(c)===-1||s.push(l)}}return s}(g,b,y);if(!x.length)return!1;var _;u&&(_=u());var w,M,k,A=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(k),k=null,p()}),w=Date.now(),k=window.requestAnimationFrame(m),Promise.resolve()}},{"../../components/drawing":602,"../../plotly":719,"../../registry":802,"./axes":724,d3:107}],746:[function(t,e,r){"use strict";function n(t,e){if("-"===t.type){var r=t._id,n=r.charAt(0);r.indexOf("scene")!==-1&&(r=n);var u=i(e,r,n);if(u){if("histogram"===u.type&&n==={v:"y",h:"x"}[u.orientation||"v"])return void(t.type="linear");var c=n+"calendar",h=u[c];if(o(u,n)){for(var f,d=a(u),p=[],m=0;m0?".":"")+i;u.isPlainObject(a)?s(a,e,o,n+1):e(o,i,a)}})}var l=t("../plotly"),u=t("../lib");r.manageCommandObserver=function(t,e,i,a){var o={},s=!0;e&&e._commandObserver&&(o=e._commandObserver),o.cache||(o.cache={}),o.lookupTable={};var l=r.hasSimpleAPICommandBindings(t,i,o.lookupTable);if(e&&e._commandObserver){if(l)return o;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,o}if(l){n(t,l,o.cache),o.check=function(){if(s){var e=n(t,l,o.cache);return e.changed&&a&&void 0!==o.lookupTable[e.value]&&(o.disable(),Promise.resolve(a({value:e.value,type:l.type,prop:l.prop,traces:l.traces,index:o.lookupTable[e.value]})).then(o.enable,o.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;he*Math.PI/180},w.render=function(){function t(t){var e=r.projection(t.lonlat);return e?"translate("+e[0]+","+e[1]+")":null}function e(t){return r.isLonLatOverEdges(t.lonlat)?"0":"1.0"}var r=this,n=r.framework,i=n.select("g.choroplethlayer"),a=n.select("g.scattergeolayer"),o=r.path;n.selectAll("path.basepath").attr("d",o),n.selectAll("path.graticulepath").attr("d",o),i.selectAll("path.choroplethlocation").attr("d",o),i.selectAll("path.basepath").attr("d",o),a.selectAll("path.js-line").attr("d",o),null!==r.clipAngle?(a.selectAll("path.point").style("opacity",e).attr("transform",t),a.selectAll("text").style("opacity",e).attr("transform",t)):(a.selectAll("path.point").attr("transform",t),a.selectAll("text").attr("transform",t))}},{"../../components/color":578,"../../components/drawing":602,"../../lib/topojson_utils":706,"../cartesian/axes":724,"../cartesian/graph_interact":733,"../plots":787,"./constants":750,"./projections":758,"./set_scale":759,"./zoom":760,"./zoom_reset":761,d3:107,"topojson-client":516}],752:[function(t,e,r){"use strict";var n=t("./geo"),i=t("../../plots/plots");r.name="geo",r.attr="geo",r.idRoot="geo",r.idRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=i.getSubplotIds(e,"geo");void 0===window.PlotlyGeoAssets&&(window.PlotlyGeoAssets={topojson:{}});for(var o=0;on^d>n&&r<(f-u)*(n-c)/(d-c)+u&&(i=!i)}return i}function o(t){return t?t/Math.sin(t):1}function s(t){return t>1?z:t<-1?-z:Math.asin(t)}function l(t){return t>1?0:t<-1?C:Math.acos(t)}function u(t,e){var r=(2+z)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>E;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(C*(4+C))*t*(1+Math.cos(e)),2*Math.sqrt(C/(4+C))*Math.sin(e)]}function c(t,e){function r(r,n){var i=j(r/e,n);return i[0]*=t,i}return arguments.length<2&&(e=t),1===e?j:1/0===e?f:(r.invert=function(r,n){var i=j.invert(r/t,n);return i[0]*=e,i},r)}function h(){var t=2,e=O(c),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}function f(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function d(t,e){return[3*t/(2*C)*Math.sqrt(C*C/3-e*e),e]}function p(t,e){return[t,1.25*Math.log(Math.tan(C/4+.4*e))]}function m(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>E&&--i>0);return e/2}}function g(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function v(t,e){var r,n=Math.min(18,36*Math.abs(e)/C),i=Math.floor(n),a=n-i,o=(r=F[i])[0],s=r[1],l=(r=F[++i])[0],u=r[1],c=(r=F[Math.min(19,++i)])[0],h=r[1];return[t*(l+a*(c-o)/2+a*a*(c-2*l+o)/2),(e>0?z:-z)*(u+a*(h-s)/2+a*a*(h-2*u+s)/2)]}function y(t,e){return[t*Math.cos(e),e]}function b(t,e){var r=Math.cos(e),n=o(l(r*Math.cos(t/=2)));return[2*r*Math.sin(t)*n,Math.sin(e)*n]}function x(t,e){var r=b(t,e);return[(r[0]+t/z)/2,(r[1]+e)/2]}t.geo.project=function(t,e){var n=e.stream;if(!n)throw new Error("not yet supported");return(t&&_.hasOwnProperty(t.type)?_[t.type]:r)(t,n)};var _={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,r)})}}},w=[],M=[],k={point:function(t,e){w.push([t,e])},result:function(){var t=w.length?w.length<2?{type:"Point",coordinates:w[0]}:{type:"MultiPoint",coordinates:w}:null;return w=[],t}},A={lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){w.length&&(M.push(w),w=[])},result:function(){var t=M.length?M.length<2?{type:"LineString",coordinates:M[0]}:{type:"MultiLineString",coordinates:M}:null;return M=[],t}},T={polygonStart:n,lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){var t=w.length;if(t){do{w.push(w[0].slice())}while(++t<4);M.push(w),w=[]}},polygonEnd:n,result:function(){if(!M.length)return null;var t=[],e=[];return M.forEach(function(r){i(r)?t.push([r]):e.push(r)}),e.forEach(function(e){var r=e[0];t.some(function(t){if(a(t[0],r))return t.push(e),!0})||t.push([e])}),M=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},S={Point:k,MultiPoint:k,LineString:A,MultiLineString:A,Polygon:T,MultiPolygon:T,Sphere:T},E=1e-6,L=E*E,C=Math.PI,z=C/2,D=(Math.sqrt(C),C/180),I=180/C,P=t.geo.projection,O=t.geo.projectionMutator;t.geo.interrupt=function(e){function r(t,r){for(var n=r<0?-1:1,i=l[+(r<0)],a=0,o=i.length-1;ai[a][2][0];++a);var s=e(t-i[a][1][0],r);return s[0]+=e(i[a][1][0],n*r>n*i[a][0][1]?i[a][0][1]:r)[0],s}function n(){s=l.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]})})}function i(){for(var e=1e-6,r=[],n=0,i=l[0].length;n=0;--n){var o=l[1][n],s=180*o[0][0]/C,u=180*o[0][1]/C,c=180*o[1][1]/C,h=180*o[2][0]/C,f=180*o[2][1]/C;r.push(a([[h-e,f-e],[h-e,c+e],[s+e,c+e],[s+e,u-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}function a(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++aE&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return P(g)}).raw=g;var F=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];F.forEach(function(t){t[1]*=1.0144}),v.invert=function(t,e){var r=e/z,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=F[a][1],s=F[a+1][1],l=F[Math.min(19,a+2)][1],u=l-o,c=l-2*s+o,h=2*(Math.abs(r)-s)/u,f=c/u,d=h*(1-f*h*(1-2*f*h));if(d>=0||1===a){n=(e>=0?5:-5)*(d+i);var p,m=50;do{i=Math.min(18,Math.abs(n)/5),a=Math.floor(i),d=i-a,o=F[a][1],s=F[a+1][1],l=F[Math.min(19,a+2)][1],n-=(p=(e>=0?z:-z)*(s+d*(l-o)/2+d*d*(l-2*s+o)/2)-e)*I}while(Math.abs(p)>L&&--m>0);break}}while(--a>=0);var g=F[a][0],v=F[a+1][0],y=F[Math.min(19,a+2)][0];return[t/(v+d*(y-g)/2+d*d*(y-2*v+g)/2),n*D]},(t.geo.robinson=function(){return P(v)}).raw=v,y.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return P(y)}).raw=y,b.invert=function(t,e){if(!(t*t+4*e*e>C*C+E)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),u=Math.cos(r/2),c=Math.sin(n),h=Math.cos(n),f=Math.sin(2*n),d=c*c,p=h*h,m=s*s,g=1-p*u*u,v=g?l(h*u)*Math.sqrt(a=1/g):a=0,y=2*v*h*s-t,b=v*c-e,x=a*(p*m+v*h*u*d),_=a*(.5*o*f-2*v*c*s),w=.25*a*(f*s-v*c*p*o),M=a*(d*u+v*m*h),k=_*w-M*x;if(!k)break;var A=(b*_-y*M)/k,T=(y*w-b*x)/k;r-=A,n-=T}while((Math.abs(A)>E||Math.abs(T)>E)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return P(b)}).raw=b,x.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),u=Math.sin(2*n),c=s*s,h=o*o,f=Math.sin(r),d=Math.cos(r/2),p=Math.sin(r/2),m=p*p,g=1-h*d*d,v=g?l(o*d)*Math.sqrt(a=1/g):a=0,y=.5*(2*v*o*p+r/z)-t,b=.5*(v*s+n)-e,x=.5*a*(h*m+v*o*d*c)+.5/z,_=a*(f*u/4-v*s*p),w=.125*a*(u*p-v*s*h*f),M=.5*a*(c*d+v*m*o)+.5,k=_*w-M*x,A=(b*_-y*M)/k,T=(y*w-b*x)/k;r-=A,n-=T}while((Math.abs(A)>E||Math.abs(T)>E)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return P(x)}).raw=x}e.exports=n},{}],759:[function(t,e,r){"use strict";function n(t,e){var r=t.projection,n=t.lonaxis,o=t.lataxis,l=t.domain,u=t.framewidth||0,c=e.w*(l.x[1]-l.x[0]),h=e.h*(l.y[1]-l.y[0]),f=n.range[0]+s,d=n.range[1]-s,p=o.range[0]+s,m=o.range[1]-s,g=n._fullRange[0]+s,v=n._fullRange[1]-s,y=o._fullRange[0]+s,b=o._fullRange[1]-s;r._translate0=[e.l+c/2,e.t+h/2];var x=d-f,_=m-p,w=[f+x/2,p+_/2],M=r._rotate;return r._center=[w[0]+M[0],w[1]+M[1]],function(e){function n(t){return Math.min(_*c/(t[1][0]-t[0][0]),_*h/(t[1][1]-t[0][1]))}var o,s,l,x,_=e.scale(),w=r._translate0,M=i(f,p,d,m),k=i(g,y,v,b);l=a(e,M),o=n(l),x=a(e,k),r._fullScale=n(x),e.scale(o),l=a(e,M),s=[w[0]-l[0][0]+u,w[1]-l[0][1]+u],r._translate=s,e.translate(s),l=a(e,M),t._isAlbersUsa||e.clipExtent(l),o=r.scale*o,r._scale=o,t._width=Math.round(l[1][0])+u,t._height=Math.round(l[1][1])+u,t._marginX=(c-Math.round(l[1][0]))/2,t._marginY=(h-Math.round(l[1][1]))/2}}function i(t,e,r,n){var i=(r-t)/4;return{type:"Polygon",coordinates:[[[t,e],[t,n],[t+i,n],[t+2*i,n],[t+3*i,n],[r,n],[r,e],[r-i,e],[r-2*i,e],[r-3*i,e],[t,e]]]}}function a(t,e){return o.geo.path().projection(t).bounds(e)}var o=t("d3"),s=t("./constants").clipPad;e.exports=n},{"./constants":750,d3:107}],760:[function(t,e,r){"use strict";function n(t,e){return(e._isScoped?a:e._clipAngle?s:o)(t,e.projection)}function i(t,e){var r=e._fullScale;return _.behavior.zoom().translate(t.translate()).scale(t.scale()).scaleExtent([.5*r,100*r])}function a(t,e){function r(){_.select(this).style(k)}function n(){o.scale(_.event.scale).translate(_.event.translate),t.render()}function a(){_.select(this).style(A)}var o=t.projection,s=i(o,e);return s.on("zoomstart",r).on("zoom",n).on("zoomend",a),s}function o(t,e){function r(t){return g.invert(t)}function n(t){var e=g(r(t));return Math.abs(e[0]-t[0])>y||Math.abs(e[1]-t[1])>y}function a(){_.select(this).style(k),l=_.mouse(this),u=g.rotate(),c=g.translate(),h=u,f=r(l)}function o(){if(d=_.mouse(this),n(l))return v.scale(g.scale()),void v.translate(g.translate());g.scale(_.event.scale),g.translate([c[0],_.event.translate[1]]),f?r(d)&&(m=r(d),p=[h[0]+(m[0]-f[0]),u[1],u[2]],g.rotate(p),h=p):(l=d,f=r(l)),t.render()}function s(){_.select(this).style(A)}var l,u,c,h,f,d,p,m,g=t.projection,v=i(g,e),y=2;return v.on("zoomstart",a).on("zoom",o).on("zoomend",s),v}function s(t,e){function r(t){v++||t({type:"zoomstart"})}function n(t){t({type:"zoom"})}function a(t){--v||t({type:"zoomend"})}var o,s=t.projection,d={r:s.rotate(),k:s.scale()},p=i(s,e),m=x(p,"zoomstart","zoom","zoomend"),v=0,y=p.on;return p.on("zoomstart",function(){_.select(this).style(k);var t=_.mouse(this),e=s.rotate(),i=e,a=s.translate(),v=u(e);o=l(s,t),y.call(p,"zoom",function(){var r=_.mouse(this);if(s.scale(d.k=_.event.scale),o){if(l(s,r)){s.rotate(e).translate(a);var u=l(s,r),p=h(o,u),y=g(c(v,p)),b=d.r=f(y,o,i);isFinite(b[0])&&isFinite(b[1])&&isFinite(b[2])||(b=i),s.rotate(b),i=b}}else t=r,o=l(s,t);n(m.of(this,arguments))}),r(m.of(this,arguments))}).on("zoomend",function(){_.select(this).style(A),y.call(p,"zoom",null),a(m.of(this,arguments))}).on("zoom.redraw",function(){t.render()}),_.rebind(p,m,"on")}function l(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&v(r)}function u(t){var e=.5*t[0]*w,r=.5*t[1]*w,n=.5*t[2]*w,i=Math.sin(e),a=Math.cos(e),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function c(t,e){var r=t[0],n=t[1],i=t[2],a=t[3],o=e[0],s=e[1],l=e[2],u=e[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function h(t,e){if(t&&e){var r=b(t,e),n=Math.sqrt(y(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,y(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function f(t,e,r){var n=m(e,2,t[0]);n=m(n,1,t[1]),n=m(n,0,t[2]-r[2]);var i,a,o=e[0],s=e[1],l=e[2],u=n[0],c=n[1],h=n[2],f=Math.atan2(s,o)*M,p=Math.sqrt(o*o+s*s);Math.abs(c)>p?(a=(c>0?90:-90)-f,i=0):(a=Math.asin(c/p)*M-f,i=Math.sqrt(p*p-c*c));var g=180-a-2*f,v=(Math.atan2(h,u)-Math.atan2(l,i))*M,y=(Math.atan2(h,u)-Math.atan2(l,-i))*M;return d(r[0],r[1],a,v)<=d(r[0],r[1],g,y)?[a,v,r[2]]:[g,y,r[2]]}function d(t,e,r,n){var i=p(r-t),a=p(n-e);return Math.sqrt(i*i+a*a)}function p(t){return(t%360+540)%360-180}function m(t,e,r){var n=r*w,i=t.slice(),a=0===e?1:0,o=2===e?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=t[a]*s-t[o]*l,i[o]=t[o]*s+t[a]*l,i}function g(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*M,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*M,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*M]}function v(t){var e=t[0]*w,r=t[1]*w,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function y(t,e){for(var r=0,n=0,i=t.length;nMath.abs(h)?(u.boxEnd[1]=u.boxStart[1]+Math.abs(c)*w*(Math.sign(h)||1),u.boxEnd[1]f[3]&&(u.boxEnd[1]=f[3],u.boxEnd[0]=u.boxStart[0]+(f[3]-u.boxStart[1])/Math.abs(w))):(u.boxEnd[0]=u.boxStart[0]+Math.abs(h)/w*(Math.sign(c)||1),u.boxEnd[0]f[2]&&(u.boxEnd[0]=f[2],u.boxEnd[1]=u.boxStart[1]+(f[2]-u.boxStart[0])*Math.abs(w)))}}else u.boxEnabled&&(c=u.boxStart[0]!==u.boxEnd[0],h=u.boxStart[1]!==u.boxEnd[1],c||h?(c&&(o(0,u.boxStart[0],u.boxEnd[0]),t.xaxis.autorange=!1),h&&(o(1,u.boxStart[1],u.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),u.boxEnabled=!1,u.boxInited=!1);break;case"pan":u.boxEnabled=!1,u.boxInited=!1,n?(u.panning||(u.dragStart[0]=i,u.dragStart[1]=a),Math.abs(u.dragStart[0]-i)h[d+2]&&(h[d]=-1,h[d+2]=1),f=this[b[d]],f._length=o.viewBox[d+2]-o.viewBox[d],l.doAutoRange(f),f.setScale();var v={_axisConstraintGroups:this.graphDiv._fullLayout._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis};y({_fullLayout:v}),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},x.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},x.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},x.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;rMath.abs(e))n.rotate(o,0,0,-t*r*Math.PI*f.rotateSpeed/window.innerWidth);else{var s=-f.zoomSpeed*a*e/window.innerHeight*(o-n.lastT())/100;n.pan(o,0,0,u*(Math.exp(s)-1))}}},!0),f}e.exports=n;var i=t("right-now"),a=t("3d-view"),o=t("mouse-change"),s=t("mouse-wheel")},{"3d-view":33,"mouse-change":434,"mouse-wheel":437,"right-now":483}],767:[function(t,e,r){"use strict";var n=t("./scene"),i=t("../plots"),a=t("../../lib"),o=t("../../constants/xmlns_namespaces");r.name="gl3d",r.attr="scene",r.idRoot="scene",r.idRegex=/^scene([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^scene([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,o=i.getSubplotIds(e,"gl3d"),s=0;s1;o(t,e,r,{type:"gl3d",attributes:s,handleDefaults:n,font:e.font,fullData:r,getDfltFromLayout:a,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":578,"../../../lib":685,"../../subplot_defaults":794,"./axis_defaults":770,"./layout_attributes":773}],773:[function(t,e,r){"use strict";function n(t,e,r){return{x:{valType:"number",dflt:t},y:{valType:"number",dflt:e},z:{valType:"number",dflt:r}}}var i=t("./axis_attributes"),a=t("../../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},camera:{up:a(n(0,0,1),{}),center:a(n(0,0,0),{}),eye:a(n(1.25,1.25,1.25),{})},domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto"},aspectratio:{x:{valType:"number",min:0},y:{valType:"number",min:0},z:{valType:"number",min:0}},xaxis:i,yaxis:i,zaxis:i,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],dflt:"turntable"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest"},_deprecated:{cameraposition:{valType:"info_array"}}}},{"../../../lib/extend":677,"./axis_attributes":769}],774:[function(t,e,r){"use strict";function n(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}function i(t){var e=new n;return e.merge(t),e}var a=t("../../../lib/str2rgbarray"),o=["xaxis","yaxis","zaxis"];n.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[o[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=a(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=i},{"../../../lib/str2rgbarray":703}],775:[function(t,e,r){"use strict";function n(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;af[1][o]?d[o]=1:f[1][o]===f[0][o]?d[o]=1:d[o]=1/(f[1][o]-f[0][o]);for(this.dataScale=d,a=0;am[1][a])m[0][a]=-1,m[1][a]=1;else{var x=m[1][a]-m[0][a];m[0][a]-=x/32,m[1][a]+=x/32}}else{var _=c[A[a]].range;m[0][a]=_[0],m[1][a]=_[1]}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),g[a]=m[1][a]-m[0][a],this.glplot.bounds[0][a]=m[0][a]*d[a],this.glplot.bounds[1][a]=m[1][a]*d[a]}var w=[1,1,1];for(a=0;a<3;++a){l=c[A[a]],u=l.type;var M=y[u];w[a]=Math.pow(M.acc,1/M.count)/d[a]}var k;if("auto"===c.aspectmode)k=Math.max.apply(null,w)/Math.min.apply(null,w)<=4?w:[1,1,1];else if("cube"===c.aspectmode)k=[1,1,1];else if("data"===c.aspectmode)k=w;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var T=c.aspectratio;k=[T.x,T.y,T.z]}c.aspectratio.x=h.aspectratio.x=k[0],c.aspectratio.y=h.aspectratio.y=k[1],c.aspectratio.z=h.aspectratio.z=k[2],this.glplot.aspect=k;var S=c.domain||null,E=e._size||null;if(S&&E){var L=this.container.style;L.position="absolute",L.left=E.l+S.x[0]*E.w+"px",L.top=E.t+(1-S.y[1])*E.h+"px",L.width=E.w*(S.x[1]-S.x[0])+"px",L.height=E.h*(S.y[1]-S.y[0])+"px"}this.glplot.redraw()}},k.destroy=function(){this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null},k.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),u(this.glplot.camera)},k.setCamera=function(t){this.glplot.camera.lookAt.apply(this,l(t))},k.saveCamera=function(t){var e=this.getCamera(),r=p.nestedProperty(t,this.id+".camera"),n=r.get(),i=!1;if(void 0===n)i=!0;else for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!function(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}(e,n,a,o)){i=!0;break}return i&&r.set(e),i},k.updateFx=function(t,e){var r=this.camera;r&&("orbit"===t?(r.mode="orbit",r.keyBindingMode="rotate"):"turntable"===t?(r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate"):r.keyBindingMode=t),this.fullSceneLayout.hovermode=e},k.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(c),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,n=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var i=new Uint8Array(r*n*4);e.readPixels(0,0,r,n,e.RGBA,e.UNSIGNED_BYTE,i);for(var a=0,o=n-1;a0}function a(t){var e={},r={};switch(t.type){case"circle":s.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":s.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity});break;case"fill":s.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var n=t.symbol,i=l(n.textposition,n.iconsize);s.extendFlat(e,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset}),s.extendFlat(r,{"icon-color":t.color,"text-color":n.textfont.color,"text-opacity":t.opacity})}return{layout:e,paint:r}}function o(t){var e,r=t.sourcetype,n=t.source,i={type:r},a="string"==typeof n;return"geojson"===r?e="data":"vector"===r&&(e=a?"url":"tiles"),i[e]=n,i}var s=t("../../lib"),l=t("./convert_text_opts"),u=n.prototype;u.update=function(t){this.visible?this.needsNewSource(t)?(this.updateLayer(t),this.updateSource(t)):this.needsNewLayer(t)&&this.updateLayer(t):(this.updateSource(t),this.updateLayer(t)),this.updateStyle(t),this.visible=i(t)},u.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},u.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==t.below},u.updateSource=function(t){var e=this.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,i(t)){var r=o(t);e.addSource(this.idSource,r)}},u.updateLayer=function(t){var e=this.map;if(e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),this.layerType=t.type,i(t)){e.addLayer({id:this.idLayer,source:this.idSource,"source-layer":t.sourcelayer||"",type:t.type},t.below);var r={visibility:"visible"};this.mapbox.setOptions(this.idLayer,"setLayoutProperty",r)}},u.updateStyle=function(t){var e=a(t);i(t)&&(this.mapbox.setOptions(this.idLayer,"setLayoutProperty",e.layout),this.mapbox.setOptions(this.idLayer,"setPaintProperty",e.paint))},u.dispose=function(){var t=this.map;t.removeLayer(this.idLayer),t.removeSource(this.idSource)},e.exports=function(t,e,r){var i=new n(t,e);return i.update(r),i}},{"../../lib":685,"./convert_text_opts":780}],783:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../components/color").defaultLine,a=t("../font_attributes"),o=t("../../traces/scatter/attributes").textposition;e.exports={_arrayAttrRegexps:[/^mapbox([2-9]|[1-9][0-9]+)?\.layers/],domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],dflt:"basic"},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},layers:{_isLinkedToArray:"layer",sourcetype:{valType:"enumerated",values:["geojson","vector"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},type:{valType:"enumerated",values:["circle","line","fill","symbol"],dflt:"circle"},below:{valType:"string",dflt:""},color:{valType:"color",dflt:i},opacity:{valType:"number",min:0,max:1,dflt:1},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2}},fill:{outlinecolor:{valType:"color",dflt:i}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},textfont:n.extendDeep({},a,{family:{dflt:"Open Sans Regular, Arial Unicode MS Regular"}}),textposition:n.extendFlat({},o,{arrayOk:!1})}}}},{"../../components/color":578,"../../lib":685,"../../traces/scatter/attributes":976,"../font_attributes":748}],784:[function(t,e,r){"use strict";function n(t,e,r){r("accesstoken"),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch"),i(t,e),e._input=t}function i(t,e){function r(t,e){return a.coerce(n,i,s.layers,t,e)}for(var n,i,o=t.layers||[],l=e.layers=[],u=0;u=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var s=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),u=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&n(t,s),l.text(s.text()&&u.text()?" - ":"")}},d.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||"https://plot.ly",r=o.select(t).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return n.append("input").attr({type:"text",name:"data"}).node().value=d.graphJson(t,!1,"keepdata"),n.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1},d.supplyDefaults=function(t){var e,r=t._fullLayout||{},n=t._fullLayout={},i=t.layout||{},a=t._fullData||[],o=t._fullData=[],s=t.data||[];if(t._transitionData||d.createTransitionData(t),r._initialAutoSizeIsDone){var u=r.width,c=r.height;d.supplyLayoutGlobalDefaults(i,n),i.width||(n.width=u),i.height||(n.height=c)}else{d.supplyLayoutGlobalDefaults(i,n);var h=!i.width||!i.height,f=n.autosize,p=t._context&&t._context.autosizable;h&&(f||p)?d.plotAutoSize(t,i,n):h&&d.sanitizeMargins(t),!f&&h&&(i.width=n.width,i.height=n.height)}n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._globalTransforms=(t._context||{}).globalTransforms,d.supplyDataDefaults(s,o,i,n),n._has=d._hasPlotType.bind(n);var m=n._modules;for(e=0;e0){var h=a(t._boundingBoxMargins),f=h.left+h.right,p=h.bottom+h.top,m=1-2*l,g=r._container&&r._container.node?r._container.node().getBoundingClientRect():{width:r.width,height:r.height};n=Math.round(m*(g.width-f)),i=Math.round(m*(g.height-p))}else{var v=u?window.getComputedStyle(t):{};n=parseFloat(v.width)||r.width,i=parseFloat(v.height)||r.height}var y=d.layoutAttributes.width.min,b=d.layoutAttributes.height.min;n1,_=!e.height&&Math.abs(r.height-i)>1;(_||x)&&(x&&(r.width=n),_&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),d.sanitizeMargins(r)},d.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a;l.Axes.supplyLayoutDefaults(t,e,r);var o=e._basePlotModules;for(i=0;i.5*n.width&&(r.l=r.r=0),r.b+r.t>.5*n.height&&(r.b=r.t=0),n._pushmargin[e]={l:{val:r.x,size:r.l+i},r:{val:r.x,size:r.r+i},b:{val:r.y,size:r.b+i},t:{val:r.y,size:r.t+i}}}else delete n._pushmargin[e];n._replotting||d.doAutoMargin(t)}},d.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),e._pushmargin||(e._pushmargin={});var r=e._size,n=JSON.stringify(r),i=Math.max(e.margin.l||0,0),a=Math.max(e.margin.r||0,0),o=Math.max(e.margin.t||0,0),u=Math.max(e.margin.b||0,0),c=e._pushmargin;if(e.margin.autoexpand!==!1){c.base={l:{val:0,size:i},r:{val:1,size:a},t:{val:1,size:o},b:{val:0,size:u}};for(var h=Object.keys(c),f=0;fg){var k=(v*w+(M-e.width)*g)/(w-g),A=(M*(1-g)+(v-e.width)*(1-w))/(w-g);k>=0&&A>=0&&k+A>i+a&&(i=k,a=A)}}if(s(b)&&c[_].t){var T=c[_].t.val,S=c[_].t.size;if(T>y){var E=(b*T+(S-e.height)*y)/(T-y),L=(S*(1-y)+(b-e.height)*(1-T))/(T-y);E>=0&&L>=0&&E+L>u+o&&(u=E,o=L)}}}}if(r.l=Math.round(i),r.r=Math.round(a),r.t=Math.round(o),r.b=Math.round(u),r.p=Math.round(e.margin.pad),r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b,!e._replotting&&"{}"!==n&&n!==JSON.stringify(e._size))return l.plot(t)},d.graphJson=function(t,e,r,n,i){function a(t){if("function"==typeof t)return null;if(c.isPlainObject(t)){var e,n,i={};for(e in t)if("function"!=typeof t[e]&&["_","["].indexOf(e.charAt(0))===-1){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!c.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;i[e]=a(t[e])}return i}return Array.isArray(t)?t.map(a):c.isJSDate(t)?c.ms2DateTimeLocal(+t):t}(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&d.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames,u={data:(o||[]).map(function(t){var r=a(t);return e&&delete r.fit,r})};return e||(u.layout=a(s)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),l&&(u.frames=a(l)),"object"===n?u:JSON.stringify(u)},d.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){_=!0}),i.redraw&&t._transitionData._interruptCallbacks.push(function(){return l.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var o,s,u=0,h=0,d=t._fullLayout._basePlotModules,p=!1;if(r)for(s=0;s=0,E=S?h.angularAxis.domain:n.extent(M),L=Math.abs(M[1]-M[0]);A&&!k&&(L=0);var C=E.slice();T&&k&&(C[1]+=L);var z=h.angularAxis.ticksCount||4;z>8&&(z=z/(z/8)+z%8),h.angularAxis.ticksStep&&(z=(C[1]-C[0])/z);var D=h.angularAxis.ticksStep||(C[1]-C[0])/(z*(h.minorTicks+1));w&&(D=Math.max(Math.round(D),1)),C[2]||(C[2]=D);var I=n.range.apply(this,C);if(I=I.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===h.direction?[0,360]:[360,0]),c.layout.angularAxis.domain=s.domain(),c.layout.angularAxis.endPadding=T?L:0,void 0===(e=n.select(this).select("svg.chart-root"))||e.empty()){var P=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),O=this.appendChild(this.ownerDocument.importNode(P.documentElement,!0));e=n.select(O)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var j,R=e.select(".chart-group"),F={fill:"none",stroke:h.tickColor},N={"font-size":h.font.size,"font-family":h.font.family,fill:h.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+h.font.outlineColor}).join(",")};if(h.showLegend){j=e.select(".legend-group").attr({transform:"translate("+[b,h.margin.top]+")"}).style({display:"block"});var B=d.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend=void 0===t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:d.map(function(t,e){return t.name||"Element"+e}),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:j,elements:B,reverseOrder:h.legend.reverseOrder})})();var U=j.node().getBBox();b=Math.min(h.width-U.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,b=Math.max(10,b),_=[h.margin.left+b,h.margin.top+b],i.range([0,b]),c.layout.radialAxis.domain=i.domain(),j.attr("transform","translate("+[_[0]+b,_[1]-b]+")")}else j=e.select(".legend-group").style({display:"none"});e.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),R.attr("transform","translate("+_+")").style({cursor:"crosshair"});var V=[(h.width-(h.margin.left+h.margin.right+2*b+(U?U.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*b))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),e.select(".outer-group").attr("transform","translate("+V+")"),h.title){var H=e.select("g.title-group text").style(N).text(h.title),q=H.node().getBBox();H.attr({x:_[0]-q.width/2,y:_[1]-b-20})}var G=e.select(".radial.axis-group");if(h.radialAxis.gridLinesVisible){var Y=G.selectAll("circle.grid-circle").data(i.ticks(5));Y.enter().append("circle").attr({class:"grid-circle"}).style(F),Y.attr("r",i),Y.exit().remove()}G.select("circle.outside-circle").attr({r:b}).style(F);var W=e.select("circle.background-circle").attr({r:b}).style({fill:h.backgroundColor,stroke:h.stroke});if(h.radialAxis.visible){var X=n.svg.axis().scale(i).ticks(5).tickSize(5);G.call(X).attr({transform:"rotate("+h.radialAxis.orientation+")"}),G.selectAll(".domain").style(F),G.selectAll("g>text").text(function(t,e){return this.textContent+h.radialAxis.ticksSuffix}).style(N).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===h.radialAxis.tickOrientation?"rotate("+-h.radialAxis.orientation+") translate("+[0,N["font-size"]]+")":"translate("+[0,N["font-size"]]+")"}}),G.selectAll("g>line").style({stroke:"black"})} +var Z=e.select(".angular.axis-group").selectAll("g.angular-tick").data(I),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+l(t,e)+")"}}).style({display:h.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(h.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(h.minorTicks+1)==0)}).style(F),J.selectAll(".minor").style({stroke:h.minorTickColor}),Z.select("line.grid-line").attr({x1:h.tickLength?b-h.tickLength:0,x2:b}).style({display:h.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(N);var Q=Z.select("text.axis-text").attr({x:b+h.labelOffset,dy:".35em",transform:function(t,e){var r=l(t,e),n=b+h.labelOffset,i=h.angularAxis.tickOrientation;return"horizontal"==i?"rotate("+-r+" "+n+" 0)":"radial"==i?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:h.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(h.minorTicks+1)!=0?"":w?w[t]+h.angularAxis.ticksSuffix:t+h.angularAxis.ticksSuffix}).style(N);h.angularAxis.rewriteTicks&&Q.text(function(t,e){return e%(h.minorTicks+1)!=0?"":h.angularAxis.rewriteTicks(this.textContent,e)});var K=n.max(R.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));j.attr({transform:"translate("+[b+K,h.margin.top]+")"});var $=e.select("g.geometry-group").selectAll("g").size()>0,tt=e.select("g.geometry-group").selectAll("g.geometry").data(d);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),d[0]||$){var et=[];d.forEach(function(t,e){var r={};r.radialScale=i,r.angularScale=s,r.container=tt.filter(function(t,r){return r==e}),r.geometry=t.geometry,r.orientation=h.orientation,r.direction=h.direction,r.index=e,et.push({data:t,geometryConfig:r})});var rt=n.nest().key(function(t,e){return void 0!==t.data.groupId||"unstacked"}).entries(et),nt=[];rt.forEach(function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return a(o[r].defaultConfig(),t)});o[r]().config(n)()})}var it,at,ot=e.select(".guides-group"),st=e.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,hasTick:!0})();if(!k){var ht=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});R.on("mousemove.angular-guide",function(t,e){var r=o.util.getMousePos(W).angle;ht.attr({x2:-b,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(b+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){ot.select("line").style({opacity:0})})}var ft=ot.select("circle").style({stroke:"grey",fill:"none"});R.on("mousemove.radial-guide",function(t,e){var r=o.util.getMousePos(W).radius;ft.attr({r:r}).style({opacity:.5}),at=i.invert(o.util.getMousePos(W).radius);var n=o.util.convertToCartesian(r,h.radialAxis.orientation);ut.text(o.util.round(at)).move([n[0]+_[0],n[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){ft.style({opacity:0}),ct.hide(),lt.hide(),ut.hide()}),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(t,r){var i=n.select(this),a=i.style("fill"),s="black",l=i.style("opacity")||1;if(i.attr({"data-opacity":l}),"none"!=a){i.attr({"data-fill":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var u={t:o.util.round(t[0]),r:o.util.round(t[1])};k&&(u.t=w[t[0]]);var c="t: "+u.t+", r: "+u.r,h=this.getBoundingClientRect(),f=e.node().getBoundingClientRect(),d=[h.left+h.width/2-V[0]-f.left,h.top+h.height/2-V[1]-f.top];ct.config({color:s}).text(c),ct.move(d)}else a=i.style("stroke"),i.attr({"data-stroke":a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ct.show()}).on("mouseout.tooltip",function(t,e){ct.hide();var r=n.select(this),i=r.attr("data-fill");i?r.style({fill:i,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})})}),f}var e,r,i,s,l={data:[],layout:{}},u={},c={},h=n.dispatch("hover"),f={};return f.render=function(e){return t(e),this},f.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),a(l.data[e],o.Axis.defaultConfig().data[0]),a(l.data[e],t)}),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,e.layout),this},f.getLiveConfig=function(){return c},f.getinputConfig=function(){return u},f.radialScale=function(t){return i},f.angularScale=function(t){return s},f.svg=function(){return e},n.rebind(f,h,"on"),f},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach(function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)});var s={t:a,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if(void 0===t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return r===-2},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i0)){var s=n.select(this.parentNode).selectAll("path.line").data([0]);s.enter().insert("path"),s.attr({class:"line",d:f(o),transform:function(e,r){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return g.fill(r,i,a)},"fill-opacity":0,stroke:function(t,e){return g.stroke(r,i,a)},"stroke-width":function(t,e){return g["stroke-width"](r,i,a)},"stroke-dasharray":function(t,e){return g["stroke-dasharray"](r,i,a)},opacity:function(t,e){return g.opacity(r,i,a)},display:function(t,e){return g.display(r,i,a)}})}};var d=t.angularScale.range(),p=Math.abs(d[1]-d[0])/l[0].length*Math.PI/180,m=n.svg.arc().startAngle(function(t){return-p/2}).endAngle(function(t){return p/2}).innerRadius(function(e){return t.radialScale(c+(e[2]||0))}).outerRadius(function(e){return t.radialScale(c+(e[2]||0))+t.radialScale(e[1])});h.arc=function(e,r,i){n.select(this).attr({class:"mark arc",d:m,transform:function(e,r){return"rotate("+(t.orientation+u(e[0])+90)+")"}})};var g={fill:function(t,r,n){return e[n].data.color},stroke:function(t,r,n){return e[n].data.strokeColor},"stroke-width":function(t,r,n){return e[n].data.strokeSize+"px"},"stroke-dasharray":function(t,r,n){return i[e[n].data.strokeDash]},opacity:function(t,r,n){return e[n].data.opacity},display:function(t,r,n){return void 0===e[n].data.visible||e[n].data.visible?"block":"none"}},v=n.select(this).selectAll("g.layer").data(l);v.enter().append("g").attr({class:"layer"});var y=v.selectAll("path.mark").data(function(t,e){return t});y.enter().append("path").attr({class:"mark"}),y.style(g).each(h[t.geometryType]),y.exit().remove(),v.exit().remove()})}var e=[o.PolyChart.defaultConfig()],r=n.dispatch("hover"),i={solid:"none",dash:[5,2],dot:[2,5]};return t.config=function(t){return arguments.length?(t.forEach(function(t,r){e[r]||(e[r]={}),a(e[r],o.PolyChart.defaultConfig()),a(e[r],t)}),this):e},t.getColorScale=function(){},n.rebind(t,r,"on"),t},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){function t(){var r=e.legendConfig,i=e.data.map(function(t,e){return[].concat(t).map(function(t,n){var i=a({},r.elements[e]);return i.name=t,i.color=[].concat(r.elements[e].color)[n],i})}),o=n.merge(i);o=o.filter(function(t,e){return r.elements[e]&&(r.elements[e].visibleInLegend||void 0===r.elements[e].visibleInLegend)}),r.reverseOrder&&(o=o.reverse());var s=r.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map(function(t,e){return t.color}),u=r.fontSize,c=null==r.isContinuous?"number"==typeof o[0]:r.isContinuous,h=c?r.height:u*o.length,f=s.classed("legend-group",!0),d=f.selectAll("svg").data([0]),p=d.enter().append("svg").attr({width:300,height:h+u,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var m=n.range(o.length),g=n.scale[c?"linear":"ordinal"]().domain(m).range(l),v=n.scale[c?"linear":"ordinal"]().domain(m)[c?"range":"rangePoints"]([0,h]),y=function(t,e){var r=3*e;return"line"===t?"M"+[[-e/2,-e/12],[e/2,-e/12],[e/2,e/12],[-e/2,e/12]]+"Z":n.svg.symbolTypes.indexOf(t)!=-1?n.svg.symbol().type(t).size(r)():n.svg.symbol().type("square").size(r)()};if(c){var b=d.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);b.enter().append("stop"),b.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),d.append("rect").classed("legend-mark",!0).attr({height:r.height,width:r.colorBandWidth,fill:"url(#grad1)"})}else{var x=d.select(".legend-marks").selectAll("path.legend-mark").data(o);x.enter().append("path").classed("legend-mark",!0),x.attr({transform:function(t,e){return"translate("+[u/2,v(e)+u/2]+")"},d:function(t,e){var r=t.symbol;return y(r,u)},fill:function(t,e){return g(e)}}),x.exit().remove()}var _=n.svg.axis().scale(v).orient("right"),w=d.select("g.legend-axis").attr({transform:"translate("+[c?r.colorBandWidth:u,u/2]+")"}).call(_);return w.selectAll(".domain").style({fill:"none",stroke:"none"}),w.selectAll("line").style({fill:"none",stroke:c?r.textColor:"none"}),w.selectAll("text").style({fill:r.textColor,"font-size":r.fontSize}).text(function(t,e){return o[e].name}),t}var e=o.Legend.defaultConfig(),r=n.dispatch("hover");return t.config=function(t){return arguments.length?(a(e,t),this):e},n.rebind(t,r,"on"),t},o.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=function(){t=i.container.selectAll("g."+s).data([0]);var n=t.enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:i.padding+10,dy:.3*+i.fontSize}),l};return l.text=function(a){var o=n.hsl(i.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",c=a||"";e.style({fill:u,"font-size":i.fontSize+"px"}).text(c);var h=i.padding,f=e.node().getBBox(),d={fill:i.color,stroke:s,"stroke-width":"2px"},p=f.width+2*h+10,m=f.height+2*h;return r.attr({d:"M"+[[10,-m/2],[10,-m/4],[i.hasTick?0:10,0],[10,m/4],[10,m/2],[p,m/2],[p,-m/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[10,-m/2+2*h]+")"}),t.style({display:"block"}),l},l.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),l},l.hide=function(){if(t)return t.style({display:"none"}),l},l.show=function(){if(t)return t.style({display:"block"}),l},l.config=function(t){return a(i,t),l},l},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={};return t.convert=function(t,e){var r={};if(t.data&&(r.data=t.data.map(function(t,r){var n=a({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",n.dotVisible===!0?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n}),!e&&t.layout&&"stack"===t.layout.barmode)){var i=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=i.indexOf(t.geometry);n!=-1&&(r.data[e].groupId=n)})}if(t.layout){var s=a({},t.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?(void 0!==s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&void 0!==s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&void 0!==s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&void 0!==s.margin.t){var l=["t","r","b","l","pad"],u=["top","right","bottom","left","pad"],c={};n.entries(s.margin).forEach(function(t,e){c[u[l.indexOf(t.key)]]=t.value}),s.margin=c}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r},t}},{"../../lib":685,d3:107}],792:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=i.extendDeepAll,u=e.exports={};u.framework=function(t){function e(e,i){return i&&(h=i),n.select(n.select(h).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),r=r?l(r,e):e,a||(a=o.Axis()),c=o.adapter.plotly().convert(r),a.config(c).render(h),t.data=r.data,t.layout=r.layout,u.fillLayout(t),r}var r,i,a,c,h,f=new s;return e.isPolar=!0,e.svg=function(){return a.svg()},e.getConfig=function(){return r},e.getLiveConfig=function(){return o.adapter.plotly().convert(a.getLiveConfig(),!0)},e.getLiveScales=function(){return{t:a.angularScale(),r:a.radialScale()}},e.setUndoPoint=function(){var t=this,e=o.util.cloneJson(r);!function(e,r){f.add({undo:function(){r&&t(r)},redo:function(){t(e)}})}(e,i),i=o.util.cloneJson(e)},e.undo=function(){f.undo()},e.redo=function(){f.redo()},e},u.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),i=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{"../../components/color":578,"../../lib":685,"./micropolar":791,"./undo_manager":793,d3:107}],793:[function(t,e,r){"use strict";e.exports=function(){function t(t,e){return t?(i=!0,t[e](),i=!1,this):this}var e,r=[],n=-1,i=!1;return{add:function(t){return i?this:(r.splice(n+1,r.length-n),r.push(t),n=r.length-1,this)},setCallback:function(t){e=t},undo:function(){var i=r[n];return i?(t(i,"undo"),n-=1,e&&e(i.undo),this):this},redo:function(){var i=r[n+1];return i?(t(i,"redo"),n+=1,e&&e(i.redo),this):this},clear:function(){r=[],n=-1},hasUndo:function(){return n!==-1},hasRedo:function(){return n=o&&(d.min=0,p.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}var i=t("../../../components/color"),a=t("../../subplot_defaults"),o=t("./layout_attributes"),s=t("./axis_defaults"),l=["aaxis","baxis","caxis"];e.exports=function(t,e,r){a(t,e,r,{type:"ternary",attributes:o,handleDefaults:n,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../../components/color":578,"../../subplot_defaults":794,"./axis_defaults":798,"./layout_attributes":800}],800:[function(t,e,r){"use strict";var n=t("../../../components/color/attributes"),i=t("./axis_attributes");e.exports={domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},bgcolor:{valType:"color",dflt:n.background},sum:{valType:"number",dflt:1,min:0},aaxis:i,baxis:i,caxis:i}},{"../../../components/color/attributes":577,"./axis_attributes":797}],801:[function(t,e,r){"use strict";function n(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework()}function i(t){a.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}var a=t("d3"),o=t("tinycolor2"),s=t("../../plotly"),l=t("../../lib"),u=t("../../components/color"),c=t("../../components/drawing"),h=t("../cartesian/set_convert"),f=t("../../lib/extend").extendFlat,d=t("../plots"),p=t("../cartesian/axes"),m=t("../../components/dragelement"),g=t("../../components/titles"),v=t("../cartesian/select"),y=t("../cartesian/constants"),b=t("../cartesian/graph_interact");e.exports=n;var x=n.prototype;x.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={}},x.plot=function(t,e){var r=this,n=e[r.id],i=e._size;r.adjustLayout(n,i),d.generalUpdatePerTraceModule(r,t,n),r.layers.plotbg.select("path").call(u.fill,n.bgcolor)},x.makeFramework=function(){var t=this,e=t.defs.selectAll("g.clips").data([0]);e.enter().append("g").classed("clips",!0);var r="clip"+t.layoutId+t.id;t.clipDef=e.selectAll("#"+r).data([0]),t.clipDef.enter().append("clipPath").attr("id",r).append("path").attr("d","M0,0Z"),t.plotContainer=t.container.selectAll("g."+t.id).data([0]),t.plotContainer.enter().append("g").classed(t.id,!0),t.layers={};var n=["draglayer","plotbg","backplot","grids","frontplot","zoom","aaxis","baxis","caxis","axlines"];t.plotContainer.selectAll("g.toplevel").data(n).enter().append("g").attr("class",function(t){return"toplevel "+t}).each(function(e){var r=a.select(this);t.layers[e]=r,"frontplot"===e?r.append("g").classed("scatterlayer",!0):"backplot"===e?r.append("g").classed("maplayer",!0):"plotbg"===e?r.append("path").attr("d","M0,0Z"):"axlines"===e&&r.selectAll("path").data(["aline","bline","cline"]).enter().append("path").each(function(t){a.select(this).classed(t,!0)})}),t.plotContainer.select(".grids").selectAll("g.grid").data(["agrid","bgrid","cgrid"]).enter().append("g").attr("class",function(t){return"grid "+t}).each(function(e){t.layers[e]=a.select(this)}),t.plotContainer.selectAll(".backplot,.frontplot,.grids").call(c.setClipUrl,r),t.graphDiv._context.staticPlot||t.initInteractions()};var _=Math.sqrt(4/3);x.adjustLayout=function(t,e){var r,n,i,a,o,s,l=this,c=t.domain,d=(c.x[0]+c.x[1])/2,p=(c.y[0]+c.y[1])/2,m=c.x[1]-c.x[0],g=c.y[1]-c.y[0],v=m*e.w,y=g*e.h,b=t.sum,x=t.aaxis.min,w=t.baxis.min,M=t.caxis.min;v>_*y?(a=y,i=a*_):(i=v,a=i/_),o=m*i/v,s=g*a/y,r=e.l+e.w*d-i/2,n=e.t+e.h*(1-p)-a/2,l.x0=r,l.y0=n,l.w=i,l.h=a,l.sum=b,l.xaxis={type:"linear",range:[x+2*M-b,b-x-2*w],domain:[d-o/2,d+o/2],_id:"x"},h(l.xaxis,l.graphDiv._fullLayout),l.xaxis.setScale(),l.yaxis={type:"linear",range:[x,b-w-M],domain:[p-s/2,p+s/2],_id:"y"},h(l.yaxis,l.graphDiv._fullLayout),l.yaxis.setScale();var k=l.yaxis.domain[0],A=l.aaxis=f({},t.aaxis,{visible:!0,range:[x,b-w-M],side:"left",_counterangle:30,tickangle:(+t.aaxis.tickangle||0)-30,domain:[k,k+s*_],_axislayer:l.layers.aaxis,_gridlayer:l.layers.agrid,_pos:0,_id:"y",_length:i,_gridpath:"M0,0l"+a+",-"+i/2});h(A,l.graphDiv._fullLayout),A.setScale();var T=l.baxis=f({},t.baxis,{visible:!0,range:[b-x-M,w],side:"bottom",_counterangle:30,domain:l.xaxis.domain,_axislayer:l.layers.baxis,_gridlayer:l.layers.bgrid,_counteraxis:l.aaxis,_pos:0,_id:"x",_length:i,_gridpath:"M0,0l-"+i/2+",-"+a});h(T,l.graphDiv._fullLayout),T.setScale(),A._counteraxis=T;var S=l.caxis=f({},t.caxis,{visible:!0,range:[b-x-w,M],side:"right",_counterangle:30,tickangle:(+t.caxis.tickangle||0)+30,domain:[k,k+s*_],_axislayer:l.layers.caxis,_gridlayer:l.layers.cgrid,_counteraxis:l.baxis,_pos:0,_id:"y",_length:i,_gridpath:"M0,0l-"+a+","+i/2});h(S,l.graphDiv._fullLayout),S.setScale();var E="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";l.clipDef.select("path").attr("d",E),l.layers.plotbg.select("path").attr("d",E);var L="translate("+r+","+n+")";l.plotContainer.selectAll(".scatterlayer,.maplayer,.zoom").attr("transform",L);var C="translate("+r+","+(n+a)+")";l.layers.baxis.attr("transform",C),l.layers.bgrid.attr("transform",C);var z="translate("+(r+i/2)+","+n+")rotate(30)";l.layers.aaxis.attr("transform",z),l.layers.agrid.attr("transform",z);var D="translate("+(r+i/2)+","+n+")rotate(-30)";l.layers.caxis.attr("transform",D),l.layers.cgrid.attr("transform",D),l.drawAxes(!0),l.plotContainer.selectAll(".crisp").classed("crisp",!1);var I=l.layers.axlines +;I.select(".aline").attr("d",A.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(u.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),I.select(".bline").attr("d",T.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(u.stroke,T.linecolor||"#000").style("stroke-width",(T.linewidth||0)+"px"),I.select(".cline").attr("d",S.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(u.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px")},x.drawAxes=function(t){var e=this,r=e.graphDiv,n=e.id.substr(7)+"title",i=e.aaxis,a=e.baxis,o=e.caxis;if(p.doTicks(r,i,!0),p.doTicks(r,a,!0),p.doTicks(r,o,!0),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0));g.draw(r,"a"+n,{propContainer:i,propName:e.id+".aaxis.title",dfltName:"Component A",attributes:{x:e.x0+e.w/2,y:e.y0-i.titlefont.size/3-s,"text-anchor":"middle"}});var l=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;g.draw(r,"b"+n,{propContainer:a,propName:e.id+".baxis.title",dfltName:"Component B",attributes:{x:e.x0-l,y:e.y0+e.h+.83*a.titlefont.size+l,"text-anchor":"middle"}}),g.draw(r,"c"+n,{propContainer:o,propName:e.id+".caxis.title",dfltName:"Component C",attributes:{x:e.x0+e.w+l,y:e.y0+e.h+.83*o.titlefont.size+l,"text-anchor":"middle"}})}};var w=y.MINZOOM/2+.87,M="m-0.87,.5h"+w+"v3h-"+(w+5.2)+"l"+(w/2+2.6)+",-"+(.87*w+4.5)+"l2.6,1.5l-"+w/2+","+.87*w+"Z",k="m0.87,.5h-"+w+"v3h"+(w+5.2)+"l-"+(w/2+2.6)+",-"+(.87*w+4.5)+"l-2.6,1.5l"+w/2+","+.87*w+"Z",A="m0,1l"+w/2+","+.87*w+"l2.6,-1.5l-"+(w/2+2.6)+",-"+(.87*w+4.5)+"l-"+(w/2+2.6)+","+(.87*w+4.5)+"l2.6,1.5l"+w/2+",-"+.87*w+"Z",T=!0;x.initInteractions=function(){function t(t,e,r){var n=j.getBoundingClientRect();x=e-n.left,w=r-n.top,S={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=S,E=O.aaxis.range[1]-S.a,C=o(O.graphDiv._fullLayout[O.id].bgcolor).getLuminance(),z="M0,"+O.h+"L"+O.w/2+", 0L"+O.w+","+O.h+"Z",D=!1,I=F.append("path").attr("class","zoombox").style({fill:C>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",z),P=F.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),p()}function e(t,e){return 1-e/O.h}function r(t,e){return 1-(t+(O.h-e)/Math.sqrt(3))/O.w}function n(t,e){return(t-(O.h-e)/Math.sqrt(3))/O.w}function a(t,i){var a=x+t,o=w+i,s=Math.max(0,Math.min(1,e(x,w),e(a,o))),l=Math.max(0,Math.min(1,r(x,w),r(a,o))),u=Math.max(0,Math.min(1,n(x,w),n(a,o))),c=(s/2+u)*O.w,h=(1-s/2-l)*O.w,f=(c+h)/2,d=h-c,p=(1-s)*O.h,m=p-d/_;d.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),P.transition().style("opacity",1).duration(200),D=!0)}function c(t,e){if(L===S)return 2===e&&g(),i(R);i(R);var r={};r[O.id+".aaxis.min"]=L.a,r[O.id+".baxis.min"]=L.b,r[O.id+".caxis.min"]=L.c,s.relayout(R,r),T&&R.data&&R._context.showTips&&(l.notifier("Double-click to
zoom back out","long"),T=!1)}function h(){S={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=S}function f(t,e){var r=t/O.xaxis._m,n=e/O.yaxis._m;L={a:S.a-n,b:S.b+(r+n)/2,c:S.c-(r-n)/2};var i=[L.a,L.b,L.c].sort(),a={a:i.indexOf(L.a),b:i.indexOf(L.b),c:i.indexOf(L.c)};i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),L={a:i[a.a],b:i[a.b],c:i[a.c]},e=(S.a-L.a)*O.yaxis._m,t=(S.c-L.c-S.b+L.b)*O.xaxis._m);var o="translate("+(O.x0+t)+","+(O.y0+e)+")";O.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",o),O.aaxis.range=[L.a,O.sum-L.b-L.c],O.baxis.range=[O.sum-L.a-L.c,L.b],O.caxis.range=[O.sum-L.a-L.b,L.c],O.drawAxes(!1),O.plotContainer.selectAll(".crisp").classed("crisp",!1)}function d(t,e){if(t){var r={};r[O.id+".aaxis.min"]=L.a,r[O.id+".baxis.min"]=L.b,r[O.id+".caxis.min"]=L.c,s.relayout(R,r)}else 2===e&&g()}function p(){O.plotContainer.selectAll(".select-outline").remove()}function g(){var t={};t[O.id+".aaxis.min"]=0,t[O.id+".baxis.min"]=0,t[O.id+".caxis.min"]=0,R.emit("plotly_doubleclick",null),s.relayout(R,t)}var x,w,S,E,L,C,z,D,I,P,O=this,j=O.layers.plotbg.select("path").node(),R=O.graphDiv,F=O.layers.zoom,N={element:j,gd:R,plotinfo:{plot:F},doubleclick:g,subplot:O.id,prepFn:function(e,r,n){N.xaxes=[O.xaxis],N.yaxes=[O.yaxis];var i=R._fullLayout.dragmode;e.shiftKey&&(i="pan"===i?"zoom":"pan"),N.minDrag="lasso"===i?1:void 0,"zoom"===i?(N.moveFn=a,N.doneFn=c,t(e,r,n)):"pan"===i?(N.moveFn=f,N.doneFn=d,h(),p()):"select"!==i&&"lasso"!==i||v(e,r,n,N,i)}};j.onmousemove=function(t){b.hover(R,t,O.id),R._fullLayout._lasthover=j,R._fullLayout._hoversubplot=O.id},j.onmouseout=function(t){R._dragging||m.unhover(R,t)},j.onclick=function(t){b.click(R,t)},m.init(N)}},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../components/titles":655,"../../lib":685,"../../lib/extend":677,"../../plotly":719,"../cartesian/axes":724,"../cartesian/constants":729,"../cartesian/graph_interact":733,"../cartesian/select":740,"../cartesian/set_convert":741,"../plots":787,d3:107,tinycolor2:514}],802:[function(t,e,r){"use strict";function n(t){if(t.layoutAttributes){var e=t.layoutAttributes._arrayAttrRegexps;if(e)for(var n=0;n-1}var a=t("../lib"),o=t("../plots/plots"),s=a.extendFlat,l=a.extendDeep;e.exports=function(t,e){t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var r,a=t.data,u=t.layout,c=l([],a),h=l({},u,n(e.tileClass)),f=t._context||{};if(e.width&&(h.width=e.width),e.height&&(h.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){h.annotations=[];var d=Object.keys(h);for(r=0;r0&&A>0,N=M<=j&&A<=R,B=M<=R&&A<=j,U="h"===v?j>=M*(R/A):R>=A*(j/M);F&&(N||B||U)?b="inside":(b="outside",x.remove(),x=null)}else b="inside";if(!x&&(x=m(e,y,"outside"===b?E:S),_=k.bBox(x.node()),M=_.width,A=_.height,M<=0||A<=0))return void x.remove();var V;V="outside"===b?a(o,f,d,p,_,v):i(o,f,d,p,_,v),x.attr("transform",V)}}}function i(t,e,r,n,i,a){var s,l,u,c,h,f=i.width,d=i.height,p=(i.left+i.right)/2,m=(i.top+i.bottom)/2,g=Math.abs(e-t),v=Math.abs(n-r);g>2*D&&v>2*D?(h=D,g-=2*h,v-=2*h):h=0;var y,b;return f<=g&&d<=v?(y=!1,b=1):f<=v&&d<=g?(y=!0,b=1):fr?(u=(t+e)/2,c=n-h-l/2):(u=(t+e)/2,c=n+h+l/2),o(p,m,u,c,b,y)}function a(t,e,r,n,i,a){var s,l="h"===a?Math.abs(n-r):Math.abs(e-t);l>2*D&&(s=D,l-=2*s);var u,c,h,f,d="h"===a?Math.min(1,l/i.height):Math.min(1,l/i.width),p=(i.left+i.right)/2,m=(i.top+i.bottom)/2;return u=d*i.width,c=d*i.height,"h"===a?er?(h=(t+e)/2,f=n+s+c/2):(h=(t+e)/2,f=n-s-c/2),o(p,m,h,f,d,!1)}function o(t,e,r,n,i,a){var o,s;return i<1?o="scale("+i+") ":(i=1,o=""),s=a?"rotate("+a+" "+t+" "+e+") ":"","translate("+(r-i*t)+" "+(n-i*e)+")"+o+s}function s(t,e){var r=d(t.text,e);return p(S,r)}function l(t,e){var r=d(t.textposition,e);return m(E,r)}function u(t,e,r){return f(L,t.textfont,e,r)}function c(t,e,r){return f(C,t.insidetextfont,e,r)}function h(t,e,r){return f(z,t.outsidetextfont,e,r)}function f(t,e,r,n){e=e||{};var i=d(e.family,r),a=d(e.size,r),o=d(e.color,r);return{family:p(t.family,i,n.family),size:g(t.size,a,n.size),color:v(t.color,o,n.color)}}function d(t,e){var r;return Array.isArray(t)?ei))return e}return void 0!==r?r:t.dflt}function v(t,e,r){return x(e).isValid()?e:void 0!==r?r:t.dflt}var y=t("d3"),b=t("fast-isnumeric"),x=t("tinycolor2"),_=t("../../lib"),w=t("../../lib/svg_text_utils"),M=t("../../components/color"),k=t("../../components/drawing"),A=t("../../components/errorbars"),T=t("./attributes"),S=T.text,E=T.textposition,L=T.textfont,C=T.insidetextfont,z=T.outsidetextfont,D=3;e.exports=function(t,e,r){var i=e.xaxis,a=e.yaxis,o=t._fullLayout,s=e.plot.select(".barlayer").selectAll("g.trace.bars").data(r);s.enter().append("g").attr("class","trace bars"),s.append("g").attr("class","points").each(function(e){var r=e[0].t,s=e[0].trace,l=r.poffset,u=Array.isArray(l);y.select(this).selectAll("g.point").data(_.identity).enter().append("g").classed("point",!0).each(function(r,c){function h(t){return 0===o.bargap&&0===o.bargroupgap?y.round(Math.round(t)-A,2):t}function f(t,e){return Math.abs(t-e)>=2?h(t):t>e?Math.ceil(t):Math.floor(t)}var d,p,m,g,v=r.p+(u?l[c]:l),x=v+r.w,_=r.b,w=_+r.s;if("h"===s.orientation?(m=a.c2p(v,!0),g=a.c2p(x,!0),d=i.c2p(_,!0),p=i.c2p(w,!0)):(d=i.c2p(v,!0),p=i.c2p(x,!0),m=a.c2p(_,!0),g=a.c2p(w,!0)),!(b(d)&&b(p)&&b(m)&&b(g)&&d!==p&&m!==g))return void y.select(this).remove();var k=(r.mlw+1||s.marker.line.width+1||(r.trace?r.trace.marker.line.width:0)+1)-1,A=y.round(k/2%1,2);if(!t._context.staticPlot){var T=M.opacity(r.mc||s.marker.color),S=T<1||k>.01?h:f;d=S(d,p),p=S(p,d),m=S(m,g),g=S(g,m)}var E=y.select(this);E.append("path").attr("d","M"+d+","+m+"V"+g+"H"+p+"V"+m+"Z"),n(t,E,e,c,d,p,m,g)})}),s.call(A.plot,e)}},{"../../components/color":578,"../../components/drawing":602,"../../components/errorbars":608,"../../lib":685,"../../lib/svg_text_utils":704,"./attributes":812,d3:107,"fast-isnumeric":116,tinycolor2:514}],820:[function(t,e,r){"use strict";function n(t,e,r,n){if(n.length){var s,l,u,c,h,f=t._fullLayout.barmode,d="overlay"===f,p="group"===f;if(d)i(t,e,r,n);else if(p){for(s=[],l=[],u=0;uu+s||!y(l))&&(h=!0,f(c,t))}for(var i=r.traces,a=v(e),o="fraction"===t._fullLayout.barnorm?1:100,s=o/1e9,l=e.l2c(e.c2l(0)),u="stack"===t._fullLayout.barmode?o:l,c=[l,u],h=!1,d=0;d1||0===s.bargap&&0===s.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(t){var e=t[0].trace,r=e.marker,o=r.line,s=a.tryColorscale(r,""),l=a.tryColorscale(r,"line");n.select(this).selectAll("path").each(function(t){var e,a,u=(t.mlw+1||o.width+1)-1,c=n.select(this);e="mc"in t?t.mcc=s(t.mc):Array.isArray(r.color)?i.defaultLine:r.color,c.style("stroke-width",u+"px").call(i.fill,e),u&&(a="mlc"in t?t.mlcc=l(t.mlc):Array.isArray(o.color)?i.defaultLine:o.color,c.call(i.stroke,a))})}),e.call(o.style)}},{"../../components/color":578, +"../../components/drawing":602,"../../components/errorbars":608,d3:107}],823:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),i(t,"marker")&&a(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width")}},{"../../components/color":578,"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591}],824:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../components/color/attributes"),a=t("../../lib/extend").extendFlat,o=n.marker,s=o.line;e.exports={y:{valType:"data_array"},x:{valType:"data_array"},x0:{valType:"any"},y0:{valType:"any"},xcalendar:n.xcalendar,ycalendar:n.ycalendar,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1},jitter:{valType:"number",min:0,max:1},pointpos:{valType:"number",min:-2,max:2},orientation:{valType:"enumerated",values:["v","h"]},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)"},symbol:a({},o.symbol,{arrayOk:!1}),opacity:a({},o.opacity,{arrayOk:!1,dflt:1}),size:a({},o.size,{arrayOk:!1}),color:a({},o.color,{arrayOk:!1}),line:{color:a({},s.color,{arrayOk:!1,dflt:i.defaultLine}),width:a({},s.width,{arrayOk:!1,dflt:0}),outliercolor:{valType:"color"},outlierwidth:{valType:"number",min:0,dflt:1}}},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2}},fillcolor:n.fillcolor}},{"../../components/color/attributes":577,"../../lib/extend":677,"../scatter/attributes":976}],825:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/cartesian/axes");e.exports=function(t,e){var r,o,s,l,u,c,h,f,d,p=a.getFromId(t,e.xaxis||"x"),m=a.getFromId(t,e.yaxis||"y"),g=e.orientation,v=[];"h"===g?(r=p,o="x",u=m,c="y"):(r=m,o="y",u=p,c="x"),s=r.makeCalcdata(e,o),a.expand(r,s,{padded:!0}),h=function(t,e,r,a,o){var s;return r in e?h=a.makeCalcdata(e,r):(s=r+"0"in e?e[r+"0"]:"name"in e&&("category"===a.type||n(e.name)&&["linear","log"].indexOf(a.type)!==-1||i.isDateTime(e.name)&&"date"===a.type)?e.name:t.numboxes,s=a.d2c(s,0,e[r+"calendar"]),h=o.map(function(){return s})),h}(t,e,c,u,s);var y=i.distinctVals(h);return f=y.vals,d=y.minDiff/2,l=function(t,e,r,a,o){var s,l,u,c,h=a.length,f=e.length,d=[],p=[];for(s=0;s=0&&u1,m=r.dPos*(1-c.boxgap)*(1-c.boxgroupgap)/(p?t.numboxes:1),g=p?2*r.dPos*(-.5+(r.boxnum+.5)/t.numboxes)*(1-c.boxgap):0,v=m*d.whiskerwidth;if(d.visible!==!0||r.emptybox)return void a.select(this).remove();"h"===d.orientation?(l=f,u=h):(l=h,u=f),r.bPos=g,r.bdPos=m,n(),a.select(this).selectAll("path.box").data(o.identity).enter().append("path").attr("class","box").each(function(t){var e=l.c2p(t.pos+g,!0),r=l.c2p(t.pos+g-m,!0),n=l.c2p(t.pos+g+m,!0),i=l.c2p(t.pos+g-v,!0),s=l.c2p(t.pos+g+v,!0),c=u.c2p(t.q1,!0),h=u.c2p(t.q3,!0),f=o.constrain(u.c2p(t.med,!0),Math.min(c,h)+1,Math.max(c,h)-1),p=u.c2p(d.boxpoints===!1?t.min:t.lf,!0),y=u.c2p(d.boxpoints===!1?t.max:t.uf,!0);"h"===d.orientation?a.select(this).attr("d","M"+f+","+r+"V"+n+"M"+c+","+r+"V"+n+"H"+h+"V"+r+"ZM"+c+","+e+"H"+p+"M"+h+","+e+"H"+y+(0===d.whiskerwidth?"":"M"+p+","+i+"V"+s+"M"+y+","+i+"V"+s)):a.select(this).attr("d","M"+r+","+f+"H"+n+"M"+r+","+c+"H"+n+"V"+h+"H"+r+"ZM"+e+","+c+"V"+p+"M"+e+","+h+"V"+y+(0===d.whiskerwidth?"":"M"+i+","+p+"H"+s+"M"+i+","+y+"H"+s))}),d.boxpoints&&a.select(this).selectAll("g.points").data(function(t){return t.forEach(function(t){t.t=r,t.trace=d}),t}).enter().append("g").attr("class","points").selectAll("path").data(function(t){var e,r,n,a,s,l,u,c="all"===d.boxpoints?t.val:t.val.filter(function(e){return et.uf}),h=Math.max((t.max-t.min)/10,t.q3-t.q1),f=1e-9*h,p=.01*h,v=[],y=0;if(d.jitter){if(0===h)for(y=1,v=new Array(c.length),e=0;et.lo&&(n.so=!0),n})}).enter().append("path").call(s.translatePoints,h,f),d.boxmean&&a.select(this).selectAll("path.mean").data(o.identity).enter().append("path").attr("class","mean").style("fill","none").each(function(t){var e=l.c2p(t.pos+g,!0),r=l.c2p(t.pos+g-m,!0),n=l.c2p(t.pos+g+m,!0),i=u.c2p(t.mean,!0),o=u.c2p(t.mean-t.sd,!0),s=u.c2p(t.mean+t.sd,!0);"h"===d.orientation?a.select(this).attr("d","M"+i+","+r+"V"+n+("sd"!==d.boxmean?"":"m0,0L"+o+","+e+"L"+i+","+r+"L"+s+","+e+"Z")):a.select(this).attr("d","M"+r+","+i+"H"+n+("sd"!==d.boxmean?"":"m0,0L"+e+","+o+"L"+r+","+i+"L"+e+","+s+"Z"))})})}},{"../../components/drawing":602,"../../lib":685,d3:107}],832:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/cartesian/axes"),a=t("../../lib");e.exports=function(t,e){var r,o,s,l,u=t._fullLayout,c=e.xaxis,h=e.yaxis,f=["v","h"];for(o=0;o=10)return null;for(var r=1/0,i=-1/0,a=t.length,o=0;o0?Math.floor:Math.ceil,D=L>0?Math.ceil:Math.floor,I=L>0?Math.min:Math.max,P=L>0?Math.max:Math.min,O=z(S+C),j=D(E-C);c=T(S);var R=[[c]];for(i=O;i*L=0;i--)a[c-i]=t[h][i],o[c-i]=e[h][i];for(s.push({x:a,y:o,bicubic:l}),i=h,a=[],o=[];i>=0;i--)a[h-i]=t[i][0],o[h-i]=e[i][0];return s.push({x:a,y:o,bicubic:u}),s}},{}],846:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../../lib/extend").extendFlat;e.exports=function(t,e,r,a){function o(e){var n,i,o,s,l,u,c,h,f,d,p,g,v=[],y=[],b={};if("b"===r)for(i=t.b2j(e),o=Math.floor(Math.max(0,Math.min(P-2,i))),s=i-o,b.length=P,b.crossLength=I,b.xy=function(e){return t.evalxy([],e,i)},b.dxy=function(e,r){return t.dxydi([],e,o,r,s)},n=0;n0&&(f=t.dxydi([],n-1,o,0,s),v.push(l[0]+f[0]/3),y.push(l[1]+f[1]/3),d=t.dxydi([],n-1,o,1,s),v.push(h[0]-d[0]/3),y.push(h[1]-d[1]/3)),v.push(h[0]),y.push(h[1]),l=h;else for(n=t.a2i(e),u=Math.floor(Math.max(0,Math.min(I-2,n))),c=n-u,b.length=I,b.crossLength=P,b.xy=function(e){return t.evalxy([],n,e)},b.dxy=function(e,r){return t.dxydj([],u,e,c,r)},i=0;i0&&(p=t.dxydj([],u,i-1,c,0),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),g=t.dxydj([],u,i-1,c,1),v.push(h[0]-g[0]/3),y.push(h[1]-g[1]/3)),v.push(h[0]),y.push(h[1]),l=h;return b.axisLetter=r,b.axis=M,b.crossAxis=E,b.value=e,b.constvar=a,b.index=m,b.x=v,b.y=y,b.smoothing=E.smoothing,b}function s(e){var n,i,o,s,l,u=[],c=[],h={};if(h.length=w.length,h.crossLength=S.length,"b"===r)for(o=Math.max(0,Math.min(P-2,e)),l=Math.min(1,Math.max(0,e-o)),h.xy=function(r){return t.evalxy([],r,e)},h.dxy=function(e,r){return t.dxydi([],e,o,r,l)},n=0;nw.length-1||k.push(i(s(u),{color:M.gridcolor,width:M.gridwidth}));for(m=d;mw.length-1||y<0||y>w.length-1))for(b=w[c],x=w[y],l=0;lw[w.length-1]||A.push(i(o(v),{color:M.minorgridcolor,width:M.minorgridwidth}));M.startline&&T.push(i(s(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&T.push(i(s(w.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(h=5e-15,f=[Math.floor((w[w.length-1]-M.tick0)/M.dtick*(1+h)),Math.ceil((w[0]-M.tick0)/M.dtick/(1+h))].sort(function(t,e){return t-e}),d=f[0],p=f[1],m=d;m<=p;m++)g=M.tick0+M.dtick*m,k.push(i(o(g),{color:M.gridcolor,width:M.gridwidth}));for(m=d-1;mw[w.length-1]||A.push(i(o(v),{color:M.minorgridcolor,width:M.minorgridwidth}));M.startline&&T.push(i(o(w[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&T.push(i(o(w[w.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}},{"../../lib/extend":677,"../../plots/cartesian/axes":724}],847:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../../lib/extend").extendFlat;e.exports=function(t,e){var r,a,o,s=e._labels=[],l=e._gridlines;for(r=0;re.length&&(t=t.slice(0,e.length)):t=[],n=0;ne.length&&(t=t.slice(0,e.length)):t=[],n=0;ne.length&&(t[n]=t[n].slice(0,e.length)):t[n]=[],i=0;i90&&(d-=180,l=-l),{angle:d,flip:l,p:t.c2p(n,e,r),offsetMultplier:u}}},{}],863:[function(t,e,r){"use strict";function n(t,e,r){var n=t.selectAll(e+"."+r).data([0]);return n.enter().append(e).classed(r,!0),n}function i(t,e,r){var i=r[0],u=r[0].trace,c=e.xaxis,h=e.yaxis,f=u.aaxis,d=u.baxis,p=t._fullLayout,m=e.plot.selectAll(".carpetlayer"),g=n(p._defs,"g","clips"),v=n(m,"g","carpet"+u.uid).classed("trace",!0),y=n(v,"g","minorlayer"),b=n(v,"g","majorlayer"),x=n(v,"g","boundarylayer"),_=n(v,"g","labellayer");v.style("opacity",u.opacity),o(c,h,b,f,"a",f._gridlines),o(c,h,b,d,"b",d._gridlines),o(c,h,y,f,"a",f._minorgridlines),o(c,h,y,d,"b",d._minorgridlines),o(c,h,x,f,"a-boundary",f._boundarylines),o(c,h,x,d,"b-boundary",d._boundarylines),l(_,u,i,c,h,s(t._tester,c,h,u,i,_,f._labels,"a-label"),s(t._tester,c,h,u,i,_,d._labels,"b-label")),a(u,i,g,c,h)}function a(t,e,r,i,a){var o,s,l,u;t.clipPathId="clip"+t.uid+"carpet";var c=r.select("#"+t.clipPathId);c.size()||(c=r.append("clipPath").classed("carpetclip",!0));var h=n(c,"path","carpetboundary"),p=e.clipsegments,m=[];for(u=0;u0?"start":"end").text(i.text).attr("transform","translate("+a.p[0]+","+a.p[1]+") rotate("+a.angle+")translate("+i.axis.labelpadding*s+","+.3*l.height+")").call(h.font,i.font.family,i.font.size,i.font.color),u=Math.max(u,l.width+i.axis.labelpadding)}),l.exit().remove(),u}function l(t,e,r,n,i,a,o){var s,l,c,h;s=.5*(e.a[0]+e.a[e.a.length-1]),l=e.b[0],c=e.ab2xy(s,l,!0),h=e.dxyda_rough(s,l),u(t,e,r,c,h,e.aaxis,n,i,a,"a-title"),s=e.a[0],l=.5*(e.b[0]+e.b[e.b.length-1]),c=e.ab2xy(s,l,!0),h=e.dxydb_rough(s,l),u(t,e,r,c,h,e.baxis,n,i,o,"b-title")}function u(t,e,r,n,i,a,o,s,l,u){var f=[];a.title&&f.push(a.title);var d=t.selectAll("text."+u).data(f);d.enter().append("text").classed(u,!0),d.each(function(){var t=p(e,o,s,n,i);["start","both"].indexOf(a.showticklabels)===-1&&(l=0),l+=a.titlefont.size+a.titleoffset,c.select(this).text(a.title||"").attr("transform","translate("+t.p[0]+","+t.p[1]+") rotate("+t.angle+") translate(0,"+l+")").classed("user-select-none",!0).attr("text-anchor","middle").call(h.font,a.titlefont)}),d.exit().remove()}var c=t("d3"),h=t("../../components/drawing"),f=t("./map_1d_array"),d=t("./makepath"),p=t("./orient_text");e.exports=function(t,e,r){for(var n=0;nd&&tm&&ep||eg},h.c2p=function(t){return t},f.c2p=function(t){return t},t.setScale=function(){var e=t.x,r=t.y,n=a(t.xctrl,t.yctrl,e,r,h.smoothing,f.smoothing);t.xctrl=n[0],t.yctrl=n[1],t.evalxy=o([t.xctrl,t.yctrl],u,c,h.smoothing,f.smoothing),t.dxydi=s([t.xctrl,t.yctrl],h.smoothing,f.smoothing),t.dxydj=l([t.xctrl,t.yctrl],h.smoothing,f.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),u-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),u-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(i(t,e),u-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(u-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),c-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(c-1,e+(t-n)/(a-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,i,a){if(!a&&(ne[u-1]|ir[c-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var h,f,d,p,m=0,g=0,v=[];ne[u-1]?(h=u-2,f=1,m=(n-e[u-1])/(e[u-1]-e[u-2])):(h=Math.max(0,Math.min(u-2,Math.floor(o))),f=o-h),ir[c-1]?(d=c-2,p=1,g=(i-r[c-1])/(r[c-1]-r[c-2])):(d=Math.max(0,Math.min(c-2,Math.floor(s))),p=s-d),m&&(t.dxydi(v,h,d,f,p),l[0]+=v[0]*m,l[1]+=v[1]*m),g&&(t.dxydj(v,h,d,f,p),l[0]+=v[0]*g,l[1]+=v[1]*g)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=v*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dxydb_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{"../../lib/search":699,"./compute_control_points":850,"./constants":851,"./create_i_derivative_evaluator":852,"./create_j_derivative_evaluator":853,"./create_spline_evaluator":854}],865:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,r){var i,a,o,s=[],l=[],u=t[0].length,c=t.length,h=0;for(i=0;i0&&void 0!==(n=t[r][e-1])&&(a++,i+=n),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log("Smoother converged to",M,"after",k,"iterations"),t}},{"../../lib":685}],866:[function(t,e,r){"use strict";var n=t("./has_columns"),i=t("../heatmap/convert_column_xyz");e.exports=function(t,e,r){var a=[],o=r("x");o&&!n(o)&&a.push("x"),e._cheater=!o;var s=r("y");if(s&&!n(s)&&a.push("y"),o||s)return a.length&&i(e,e.aaxis,e.baxis,"a","b",a),!0}},{"../heatmap/convert_column_xyz":907,"./has_columns":856}],867:[function(t,e,r){"use strict";var n=t("../scattergeo/attributes"),i=t("../../components/colorscale/attributes"),a=t("../../components/colorbar/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=n.marker.line;e.exports=s({},{locations:{valType:"data_array"},locationmode:n.locationmode,z:{valType:"data_array"},text:{valType:"data_array"},marker:{line:{color:l.color,width:s({},l.width,{dflt:1})}},hoverinfo:s({},o.hoverinfo,{flags:["location","z","text","name"]})},i,{colorbar:a})},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../../plots/attributes":722,"../scattergeo/attributes":1013}],868:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){n(e,e.z,"","z")}},{"../../components/colorscale/calc":584}],869:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../components/colorscale/defaults"),a=t("./attributes");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l,u=s("locations");if(u&&(l=u.length),!u||!l)return void(e.visible=!1);var c=s("z");if(!Array.isArray(c))return void(e.visible=!1);c.length>l&&(e.z=c.slice(0,l)),s("locationmode"),s("text"),s("marker.line.color"),s("marker.line.width"),i(t,e,o,s,{prefix:"",cLetter:"z"}),s("hoverinfo",1===o._dataLength?"location+z+text":void 0)}},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":867}],870:[function(t,e,r){"use strict";e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],871:[function(t,e,r){"use strict";function n(t,e,r,n){var o=e.hoverinfo,s="all"===o?a.hoverinfo.flags:o.split("+"),l=s.indexOf("name")!==-1,u=s.indexOf("location")!==-1,c=s.indexOf("z")!==-1,h=s.indexOf("text")!==-1,f=!l&&u,d=[];f?t.nameOverride=r.id:(l&&(t.nameOverride=e.name),u&&d.push(r.id)),c&&d.push(function(t){return i.tickText(n,n.c2l(t),"hover").text}(r.z)),h&&d.push(r.tx),t.extraText=d.join("
")}var i=t("../../plots/cartesian/axes"),a=t("./attributes");e.exports=function(t){var e=t.cd,r=e[0].trace,i=t.subplot,a=i.choroplethHoverPt;if(a){var o=i.projection(a.properties.ct);return t.x0=t.x1=o[0],t.y0=t.y1=o[1],t.index=a.index,t.location=a.id,t.z=a.z,n(t,r,a,i.mockAxis),[t]}}},{"../../plots/cartesian/axes":724,"./attributes":867}],872:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../heatmap/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="choropleth",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","noOpacity"],n.meta={},e.exports=n},{"../../plots/geo":752,"../heatmap/colorbar":906,"./attributes":867,"./calc":868,"./defaults":869,"./event_data":870,"./hover":871,"./plot":873}],873:[function(t,e,r){"use strict";function n(t,e){for(var r,n=[],i=t.locations,a=i.length,o=u(t,e),s=(t.marker||{}).line||{},l=0;l0&&(n[0].trace=t),n}function i(t){t.framework.selectAll("g.trace.choropleth").each(function(t){var e=t[0].trace,r=a.select(this),n=e.marker||{},i=n.line||{},u=l.makeColorScaleFunc(l.extractScale(e.colorscale,e.zmin,e.zmax));r.selectAll("path.choroplethlocation").each(function(t){a.select(this).attr("fill",function(t){return u(t.z)}).call(o.stroke,t.mlc||i.color).call(s.dashLine,"",t.mlw||i.width||0)})})}var a=t("d3"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("../../components/colorscale"),u=t("../../lib/topojson_utils").getTopojsonFeatures,c=t("../../lib/geo_location_utils").locationToFeature,h=t("../../lib/array_to_calc_item"),f=t("../../plots/geo/constants");e.exports=function(t,e,r){function o(t){return t[0].trace.uid}var s,l=t.framework,u=l.select("g.choroplethlayer"),c=l.select("g.baselayer"),h=l.select("g.baselayeroverchoropleth"),d=f.baseLayersOverChoropleth,p=u.selectAll("g.trace.choropleth").data(e,o);p.enter().append("g").attr("class","trace choropleth"),p.exit().remove(),p.each(function(e){var r=e[0].trace,i=n(r,t.topojson),o=a.select(this).selectAll("path.choroplethlocation").data(i);o.enter().append("path").classed("choroplethlocation",!0).on("mouseover",function(e){t.choroplethHoverPt=e}).on("mouseout",function(){t.choroplethHoverPt=null}),o.exit().remove()}),h.selectAll("*").remove();for(var m=0;ms.end&&(s.start=s.end=(s.start+s.end)/2),e._input.contours||(e._input.contours={}),a(e._input.contours,{start:s.start,end:s.end,size:s.size}),e._input.autocontour=!0}else{var u=s.start,c=s.end,h=e._input.contours;if(u>c&&(s.start=h.start=c,c=s.end=h.end=u,u=s.start),!(s.size>0)){var f;f=u===c?1:n(u,c,e.ncontours).dtick,h.size=s.size=f}}return r}},{"../../lib":685,"../../plots/cartesian/axes":724,"../heatmap/calc":904}],876:[function(t,e,r){"use strict";var n=t("../../plots/plots"),i=t("../../components/colorbar/draw"),a=t("./make_color_map"),o=t("./end_plus");e.exports=function(t,e){var r=e[0].trace,s="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+s).remove(),!r.showscale)return void n.autoMargin(t,s);var l=i(t,s);e[0].t.cb=l;var u=r.contours,c=r.line,h=u.size||1,f=u.coloring,d=a(r,{isColorbar:!0});"heatmap"===f&&l.filllevels({start:r.zmin,end:r.zmax,size:(r.zmax-r.zmin)/254}),l.fillcolor("fill"===f||"heatmap"===f?d:"").line({color:"lines"===f?d:c.color,width:u.showlines!==!1?c.width:0,dash:c.dash}).levels({start:u.start,end:o(u),size:h}).options(r.colorbar)()}},{"../../components/colorbar/draw":581,"../../plots/plots":787,"./end_plus":880,"./make_color_map":884}],877:[function(t,e,r){"use strict";e.exports.BOTTOMSTART=[1,9,13,104,713],e.exports.TOPSTART=[4,6,7,104,713],e.exports.LEFTSTART=[8,12,14,208,1114],e.exports.RIGHTSTART=[2,3,11,208,1114],e.exports.NEWDELTA=[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],e.exports.CHOOSESADDLE={104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},e.exports.SADDLEREMAINDER={1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11}},{}],878:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){var a,o=n.coerce2(t,e,i,"contours.start"),s=n.coerce2(t,e,i,"contours.end"),l=o===!1||s===!1,u=r("contours.size");!(a=l?e.autocontour=!0:r("autocontour",!1))&&u||r("ncontours")}},{"../../lib":685,"./attributes":874}],879:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../heatmap/has_columns"),a=t("../heatmap/xyz_defaults"),o=t("./contours_defaults"),s=t("./style_defaults"),l=t("./attributes");e.exports=function(t,e,r,u){function c(r,i){return n.coerce(t,e,l,r,i)}if(!a(t,e,c,u))return void(e.visible=!1);c("text"),c("connectgaps",i(e)),o(t,e,c),s(t,e,c,u)}},{"../../lib":685,"../heatmap/has_columns":910,"../heatmap/xyz_defaults":918,"./attributes":874,"./contours_defaults":878,"./style_defaults":888}],880:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],881:[function(t,e,r){"use strict";function n(t,e,r,n){return Math.abs(t[0]-e[0])20?(m=u.CHOOSESADDLE[m][(g[0]||g[1])<0?0:1],t.crossings[p]=u.SADDLEREMAINDER[m]):delete t.crossings[p],!(g=u.NEWDELTA[m])){l.log("Found bad marching index:",m,e,t.level);break}v.push(s(t,e,g)),e[0]+=g[0],e[1]+=g[1],n(v[v.length-1],v[v.length-2],a,c)&&v.pop(),p=e.join(",");var _=g[0]&&(e[0]<0||e[0]>x-2)||g[1]&&(e[1]<0||e[1]>b-2);if(p===d&&g.join(",")===y||r&&_)break;m=t.crossings[p]}1e4===f&&l.log("Infinite loop in contour?");var w,M,k,A,T,S,E,L=n(v[0],v[v.length-1],a,c),C=0,z=.2*t.smoothing,D=[],I=0;for(f=1;f=I;f--)if((w=D[f])=I&&w+D[M]20&&e?208===t||1114===t?n=0===r[0]?1:-1:i=0===r[1]?1:-1:u.BOTTOMSTART.indexOf(t)!==-1?i=1:u.LEFTSTART.indexOf(t)!==-1?n=1:u.TOPSTART.indexOf(t)!==-1?i=-1:n=-1,[n,i]}function s(t,e,r){var n=e[0]+Math.max(r[0],0),i=e[1]+Math.max(r[1],0),a=t.z[i][n],o=t.xaxis,s=t.yaxis;if(r[1]){var l=(t.level-a)/(t.z[i][n+1]-a);return[o.c2p((1-l)*t.x[n]+l*t.x[n+1],!0),s.c2p(t.y[i],!0)]}var u=(t.level-a)/(t.z[i+1][n]-a);return[o.c2p(t.x[n],!0),s.c2p((1-u)*t.y[i]+u*t.y[i+1],!0)]}var l=t("../../lib"),u=t("./constants");e.exports=function(t,e,r){var n,i,o,s,u;for(e=e||.01,r=r||.01,o=0;ot?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);if(5===r||10===r){return t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208}return 15===r?0:r}var i=t("./constants");e.exports=function(t){var e,r,a,o,s,l,u,c,h,f=t[0].z,d=f.length,p=f[0].length,m=2===d||2===p;for(r=0;r1e3){d.warn("Too many contours, clipping at 1000",t);break}return i}function a(t,e,r){var n=t.plot.select(".maplayer").selectAll("g.contour."+r).data(e);return n.enter().append("g").classed("contour",!0).classed(r,!0),n.exit().remove(),n}function o(t,e,r){var n=t.selectAll("g.contourbg").data([0]);n.enter().append("g").classed("contourbg",!0);var i=n.selectAll("path").data("fill"===r.coloring?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+e.join("L")+"Z").style("stroke","none")}function s(t,e,r,n){var i=t.selectAll("g.contourfill").data([0]);i.enter().append("g").classed("contourfill",!0);var a=i.selectAll("path").data("fill"===n.coloring?e:[]);a.enter().append("path"),a.exit().remove(),a.each(function(t){var e=l(t,r);e?f.select(this).attr("d",e).style("stroke","none"):f.select(this).remove()})}function l(t,e){function r(t){return Math.abs(t[0]-e[2][0])<.01}for(var n,i,a,o,s,l,u=Math.min(t.z[0][0],t.z[0][1]),c=t.edgepaths.length||u<=t.level?"":"M"+e.join("L")+"Z",h=0,f=t.edgepaths.map(function(t,e){return e}),m=!0;f.length;){for(l=p.smoothopen(t.edgepaths[h],t.smoothing),c+=m?l:l.replace(/^M/,"L"),f.splice(f.indexOf(h),1),n=t.edgepaths[h][t.edgepaths[h].length-1],o=-1,a=0;a<4;a++){if(!n){d.log("Missing end?",h,t);break}for(!function(t){return Math.abs(t[1]-e[0][1])<.01}(n)||r(n)?!function(t){return Math.abs(t[0]-e[0][0])<.01}(n)?!function(t){return Math.abs(t[1]-e[2][1])<.01}(n)?r(n)&&(i=e[2]):i=e[3]:i=e[0]:i=e[1],s=0;s=0&&(i=g,o=s):Math.abs(n[1]-i[1])<.01?Math.abs(n[1]-g[1])<.01&&(g[0]-n[0])*(i[0]-g[0])>=0&&(i=g,o=s):d.log("endpt to newendpt is not vert. or horz.",n,i,g)}if(n=i,o>=0)break;c+="L"+i}if(o===t.edgepaths.length){d.log("unclosed perimeter path");break}h=o,m=f.indexOf(h)===-1,m&&(h=f[0],c+="Z")}for(h=0;hS){r("a scale is not linear");break}}if(s.length&&"fast"===A){var E=(s[s.length-1]-s[0])/(s.length-1),L=Math.abs(E/100);for(x=0;xL){r("b scale is not linear");break}}}var C=d(b),z="scaled"===e.xtype?"":n,D=g(e,z,i,o,C,w),I="scaled"===e.ytype?"":s,P=g(e,I,v,y,b.length,M),O={a:D,b:P,z:b};return"levels"===e.contours.type&&u(e,b,"","z"),[O]}var a=t("../../lib"),o=t("../../plots/cartesian/axes"),s=t("../../lib").extendFlat,l=t("../../registry"),u=t("../../components/colorscale/calc"),c=t("../heatmap/has_columns"),h=t("../heatmap/convert_column_xyz"),f=t("../heatmap/clean_2d_array"),d=t("../heatmap/max_row_length"),p=t("../heatmap/interp2d"),m=t("../heatmap/find_empties"),g=t("../heatmap/make_bound_array"),v=t("./defaults"),y=t("../carpet/lookup_carpetid");e.exports=function(t,e){var r=e.carpetTrace=y(t,e);if(r&&r.visible&&"legendonly"!==r.visible){if(!e.a||!e.b){var a=t.data[r.index],l=t.data[e.index];l.a||(l.a=a.a),l.b||(l.b=a.b),v(l,e,e._defaultColor,t._fullLayout)}var u=i(t,e),c=e.contours;if(e.autocontour===!0){var h=n(e.zmin,e.zmax,e.ncontours);c.size=h.dtick,c.start=o.tickFirst(h),h.range.reverse(),c.end=o.tickFirst(h),c.start===e.zmin&&(c.start+=c.size),c.end===e.zmax&&(c.end-=c.size),c.start>c.end&&(c.start=c.end=(c.start+c.end)/2),e._input.contours=s({},c)}else{var f=c.start,d=c.end,p=e._input.contours;if(f>d&&(c.start=p.start=d,d=c.end=p.end=f,f=c.start),!(c.size>0)){var m;m=f===d?1:n(f,d,e.ncontours).dtick,p.size=c.size=m}}return u}}},{"../../components/colorscale/calc":584,"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"../carpet/lookup_carpetid":858,"../heatmap/clean_2d_array":905,"../heatmap/convert_column_xyz":907,"../heatmap/find_empties":909,"../heatmap/has_columns":910,"../heatmap/interp2d":913,"../heatmap/make_bound_array":914,"../heatmap/max_row_length":915,"./defaults":896}],891:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i,a,o,s=n.a.length,l=n.b.length,u=n.z,c=-1/0,h=1/0;for(i=0;i":case">=":n.contours.value>c&&(t[0].prefixBoundary=!0);break;case"<":case"<=":n.contours.valuec&&(t[0].prefixBoundary=!0);break;case"][":case")(":a=Math.min.apply(null,n.contours.value),o=Math.max.apply(null,n.contours.value),ac&&(t[0].prefixBoundary=!0)}}},{}],892:[function(t,e,r){"use strict";e.exports={INEQUALITY_OPS:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"]}},{}],893:[function(t,e,r){"use strict";function n(t,e){function r(t){return s(t)?+t:null}var n,i=Array.isArray(e);return o.INEQUALITY_OPS.indexOf(t)!==-1?n=r(i?e[0]:e):o.INTERVAL_OPS.indexOf(t)!==-1?n=i?[r(e[0]),r(e[1])]:[r(e),r(e)]:o.SET_OPS.indexOf(t)!==-1&&(n=i?e.map(r):[r(e)]),n}function i(t){return function(e){e=n(t,e);var r=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return{start:r,end:i,size:i-r}}}function a(t){return function(e){return e=n(t,e),{start:e,end:1/0,size:1/0}}}var o=t("./constants"),s=t("fast-isnumeric");e.exports["[]"]=i("[]"),e.exports["()"]=i("()"),e.exports["[)"]=i("[)"),e.exports["(]"]=i("(]"),e.exports["]["]=i("]["),e.exports[")("]=i(")("),e.exports[")["]=i(")["),e.exports["]("]=i("]("),e.exports[">"]=a(">"),e.exports[">="]=a(">="),e.exports["<"]=a("<"),e.exports["<="]=a("<="),e.exports["="]=a("=")},{"./constants":892,"fast-isnumeric":116}],894:[function(t,e,r){"use strict";var n=t("./constraint_mapping"),i=t("fast-isnumeric");e.exports=function(t,e){var r;["=","<","<=",">",">="].indexOf(e.operation)===-1?(t("contours.value",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:i(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t("contours.value",0),i(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0));var a=n[e.operation](e.value);e.start=a.start,e.end=a.end,e.size=a.size}},{"./constraint_mapping":893,"fast-isnumeric":116}],895:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){var r,i,a,o=function(t){return t.reverse()},s=function(t){return t};switch(e){case"][":case")[":case"](":case")(":var l=o;o=s,s=l;case"[]":case"[)":case"(]":case"()":if(2!==t.length)return void n.warn("Contour data invalid for the specified inequality range operation.");for(i=t[0],a=t[1],r=0;r=":case">":if(1!==t.length)return void n.warn("Contour data invalid for the specified inequality operation.");for(i=t[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",t);break}return a}},{"../../lib":685}],898:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../contour/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.moduleType="trace",n.name="contourcarpet",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","carpet","contour","symbols","showLegend","hasLines","carpetDependent"],n.meta={},e.exports=n},{"../../plots/cartesian":734,"../contour/colorbar":876,"./attributes":889,"./calc":890,"./defaults":896,"./plot":901,"./style":902}],899:[function(t,e,r){"use strict";var n=t("../../components/drawing"),i=t("../carpet/axis_aligned_line"),a=t("../../lib");e.exports=function(t,e,r,o,s,l,u,c){function h(t){return Math.abs(t[1]-r[0][1])=0&&(y=L,x=_):Math.abs(v[1]-y[1])=0&&(y=L,x=_):a.log("endpt to newendpt is not vert. or horz.",v,y,L)}if(x>=0)break;M+=m(v,y),v=y}if(x===e.edgepaths.length){a.log("unclosed perimeter path");break}g=x,A=k.indexOf(g)===-1,A&&(g=k[0],M+=m(v,y)+"Z",v=null)}for(g=0;g=0;R--)P=d.clipsegments[R],O=h([],P.x,A.c2p),j=h([],P.y,T.c2p),O.reverse(),j.reverse(),N.push(f(O,j,P.bicubic));var B="M"+N.join("L")+"Z";l(F,d.clipsegments,A,T,C,M.coloring),u(i,F,A,T,L,z,n,c,d,M.coloring,B),s(F,L,M),a(F,c)}}function a(t,e){t.attr("clip-path","url(#"+e.clipPathId+")")}function o(t,e,r){var n=t.plot.select(".maplayer").selectAll("g.contour."+r).classed("trace",!0).data(e);return n.enter().append("g").classed("contour",!0).classed(r,!0),n.exit().remove(),n}function s(t,e,r){var n=e[0].smoothing,i=t.selectAll("g.contourlevel").data(r.showlines===!1?[]:e);i.enter().append("g").classed("contourlevel",!0),i.exit().remove();var a=i.selectAll("path.openline").data(function(t){return t.pedgepaths});a.enter().append("path").classed("openline",!0),a.exit().remove(),a.attr("d",function(t){return d.smoothopen(t,n)}).style("vector-effect","non-scaling-stroke");var o=i.selectAll("path.closedline").data(function(t){return t.ppaths});o.enter().append("path").classed("closedline",!0),o.exit().remove(),o.attr("d",function(t){return d.smoothclosed(t,n)}).style("vector-effect","non-scaling-stroke").style("stroke-miterlimit",1)}function l(t,e,r,i,a,o){var s,l,u,c,d=n(t,"g","contourbg"),p=d.selectAll("path").data("fill"!==o||a?[]:[0]);p.enter().append("path"),p.exit().remove();var m=[];for(c=0;cz){r("x scale is not linear");break}}if(y.length&&"fast"===E){var D=(y[y.length-1]-y[0])/(y.length-1),I=Math.abs(D/100);for(w=0;wI){r("y scale is not linear");break}}}var P=c(_),O="scaled"===e.xtype?"":m,j=p(e,O,g,v,P,M),R="scaled"===e.ytype?"":y,F=p(e,R,b,x,_.length,k);S||(a.expand(M,j),a.expand(k,F));var N={x:j,y:F,z:_,text:e.text};if(s(e,_,"","z"),A&&e.contours&&"heatmap"===e.contours.coloring){var B={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};N.xfill=p(B,O,g,v,P,M),N.yfill=p(B,R,b,x,_.length,k)}return[N]}},{"../../components/colorscale/calc":584,"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"../histogram2d/calc":932,"./clean_2d_array":905,"./convert_column_xyz":907,"./find_empties":909,"./has_columns":910,"./interp2d":913,"./make_bound_array":914,"./max_row_length":915}],905:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){var r,i,a,o,s,l;if(e){for(r=0,s=0;s=0;o--)a=f[o],r=a[0],i=a[1],(s=((h[[r-1,i]]||m)[2]+(h[[r+1,i]]||m)[2]+(h[[r,i-1]]||m)[2]+(h[[r,i+1]]||m)[2])/20)&&(l[a]=[r,i,s],f.splice(o,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(a in l)h[a]=l[a],c.push(l[a])}return c.sort(function(t,e){return e[2]-t[2]})}},{"./max_row_length":915}],910:[function(t,e,r){"use strict";e.exports=function(t){return!Array.isArray(t.z[0])}},{}],911:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/graph_interact"),i=t("../../lib"),a=t("../../plots/cartesian/constants").MAXDIST;e.exports=function(t,e,r,o,s){if(!(t.distance=y[0].length||h<0||h>y.length)return}else{if(n.inbox(e-g[0],e-g[g.length-1])>a||n.inbox(r-v[0],r-v[v.length-1])>a)return;if(s){var w;for(x=[2*g[0]-g[1]],w=1;wm&&(v=Math.max(v,Math.abs(t[i][a]-p)/(g-m))))}return v}var a=t("../../lib"),o=[[-1,0],[1,0],[0,-1],[0,1]];e.exports=function(t,e,r){var o,s,l=1;if(Array.isArray(r))for(o=0;o.01;o++)l=i(t,e,n(l));return l>.01&&a.log("interp2d didn't converge quickly",l),t}},{"../../lib":685}],914:[function(t,e,r){"use strict";var n=t("../../registry");e.exports=function(t,e,r,i,a,o){var s,l,u,c=[],h=n.traceIs(t,"contour"),f=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(Array.isArray(e)&&e.length>1&&!f&&"category"!==o.type){var p=e.length;if(!(p<=a))return h?e.slice(0,a):e.slice(0,a+1);if(h||d)c=e.slice(0,a);else if(1===a)c=[e[0]-.5,e[0]+.5];else{for(c=[1.5*e[0]-.5*e[1]],u=1;u0;)b=p.c2p(A[M]),M--;for(b0;)w=m.c2p(T[M]),M--;if(w<_&&(x=_,_=w,w=x,D=!0),S&&(A=r[0].xfill,T=r[0].yfill),"fast"!==E){var I="best"===E?0:.5;y=Math.max(-I*p._length,y),b=Math.min((1+I)*p._length,b),_=Math.max(-I*m._length,_),w=Math.min((1+I)*m._length,w)}var P=Math.round(b-y),O=Math.round(w-_),j=P<=0||O<=0,R=e.plot.select(".imagelayer").selectAll("g.hm."+v).data(j?[]:[0]);if(R.enter().append("g").classed("hm",!0).classed(v,!0),R.exit().remove(),!j){var F,N;"fast"===E?(F=C,N=L):(F=P,N=O);var B=document.createElement("canvas");B.width=F,B.height=N;var U,V,H=B.getContext("2d"),q=s.makeColorScaleFunc(s.extractScale(f.colorscale,f.zmin,f.zmax),{noNumericCheck:!0,returnArray:!0});"fast"===E?(U=z?function(t){return C-1-t}:o.identity,V=D?function(t){return L-1-t}:o.identity):(U=function(t){return o.constrain(Math.round(p.c2p(A[t])-y),0,P)},V=function(t){return o.constrain(Math.round(m.c2p(T[t])-_),0,O)});var G,Y,W,X,Z,J,Q,K=V(0),$=[K,K],tt=z?0:1,et=D?0:1,rt=0,nt=0,it=0,at=0;if(E){var ot,st=0;try{ot=new Uint8Array(P*O*4)}catch(t){ot=new Array(P*O*4)}if("best"===E){var lt,ut,ct,ht=new Array(A.length),ft=new Array(T.length),dt=new Array(P);for(M=0;M0&&a0&&s0&&(n=!0);for(var s=0;sa){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]=0;a--)i(a);else if("increasing"===e){for(a=1;a=0;a--)t[a]+=t[a+1];"exclude"===r&&(t.push(0),t.shift())}}var i=t("fast-isnumeric"),a=t("../../lib"),o=t("../../plots/cartesian/axes"),s=t("../bar/arrays_to_calcdata"),l=t("./bin_functions"),u=t("./norm_functions"),c=t("./average"),h=t("./clean_bins");e.exports=function(t,e){if(e.visible===!0){var r,f=[],d=[],p=o.getFromId(t,"h"===e.orientation?e.yaxis||"y":e.xaxis||"x"),m="h"===e.orientation?"y":"x",g={x:"y",y:"x"}[m],v=e[m+"calendar"],y=e.cumulative;h(e,p,m);var b,x=p.makeCalcdata(e,m),_=m+"bins";e["autobin"+m]===!1&&_ in e?b=e[_]:(b=o.autoBin(x,p,e["nbins"+m],!1,v),y.enabled&&"include"!==y.currentbin&&("decreasing"===y.direction?b.start=p.c2r(p.r2c(b.start)-b.size):b.end=p.c2r(p.r2c(b.end)+b.size)),e._input[_]=e[_]=b);var w,M,k,A="string"==typeof b.size,T=A?[]:b,S=[],E=[],L=0,C=e.histnorm,z=e.histfunc,D=C.indexOf("density")!==-1;y.enabled&&D&&(C=C.replace(/ ?density$/,""),D=!1);var I,P="max"===z||"min"===z,O=P?null:0,j=l.count,R=u[C],F=!1,N=function(t){return p.r2c(t,0,v)};for(Array.isArray(e[g])&&"count"!==z&&(I=e[g],F="avg"===z,j=l[z]),r=N(b.start),M=N(b.end)+(r-o.tickIncrement(r,b.size,!1,v))/1e6;r=0&&kH;r--)if(d[r]){q=r;break}for(r=H;r<=q;r++)i(f[r])&&i(d[r])&&V.push({p:f[r],s:d[r],b:0});return s(V,e),V}}},{"../../lib":685,"../../plots/cartesian/axes":724,"../bar/arrays_to_calcdata":811,"./average":923,"./bin_functions":925,"./clean_bins":927,"./norm_functions":930,"fast-isnumeric":116}],927:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib").cleanDate,a=t("../../constants/numerical"),o=a.ONEDAY,s=a.BADNUM;e.exports=function(t,e,r){var a=e.type,l=r+"bins",u=t[l];u||(u=t[l]={});var c="date"===a?function(t){return t||0===t?i(t,s,u.calendar):null}:function(t){return n(t)?Number(t):null};u.start=c(u.start),u.end=c(u.end);var h="date"===a?o:1,f=u.size;if(n(f))u.size=f>0?Number(f):h;else if("string"!=typeof f)u.size=h;else{var d=f.charAt(0),p=f.substr(1);p=n(p)?Number(p):0,(p<=0||"date"!==a||"M"!==d||p!==Math.round(p))&&(u.size=h)}var m="autobin"+r;"boolean"!=typeof t[m]&&(t[m]=!((u.start||0===u.start)&&(u.end||0===u.end))),t[m]||delete t["nbins"+r]}},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],928:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../components/color"),o=t("./bin_defaults"),s=t("../bar/style_defaults"),l=t("../../components/errorbars/defaults"),u=t("./attributes");e.exports=function(t,e,r,c){function h(r,n){return i.coerce(t,e,u,r,n)}var f=h("x"),d=h("y");h("cumulative.enabled")&&(h("cumulative.direction"),h("cumulative.currentbin")),h("text");var p=h("orientation",d&&!f?"h":"v"),m=e["v"===p?"x":"y"];if(!m||!m.length)return void(e.visible=!1);n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],c),e["h"===p?"x":"y"]&&h("histfunc"),o(t,e,h,"h"===p?["y"]:["x"]),s(t,e,h,r,c),l(t,e,a.defaultLine,{axis:"y"}),l(t,e,a.defaultLine,{axis:"x",inherit:"y"})}},{"../../components/color":578,"../../components/errorbars/defaults":607,"../../lib":685,"../../registry":802,"../bar/style_defaults":823,"./attributes":922,"./bin_defaults":924}],929:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.layoutAttributes=t("../bar/layout_attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("../bar/layout_defaults"),n.calc=t("./calc"),n.setPositions=t("../bar/set_positions"),n.plot=t("../bar/plot"),n.style=t("../bar/style"),n.colorbar=t("../scatter/colorbar"),n.hoverPoints=t("../bar/hover"),n.moduleType="trace",n.name="histogram",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","bar","histogram","oriented","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":734,"../bar/hover":815,"../bar/layout_attributes":817,"../bar/layout_defaults":818,"../bar/plot":819,"../bar/set_positions":820,"../bar/style":822,"../scatter/colorbar":979,"./attributes":922,"./calc":926,"./defaults":928}],930:[function(t,e,r){"use strict";e.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;ik&&m.splice(k,m.length-k),v.length>k&&v.splice(k,v.length-k),!e.autobinx&&"xbins"in e||(e.xbins=i.autoBin(m,p,e.nbinsx,"2d",y),"histogram2dcontour"===e.type&&(e.xbins.start=w(i.tickIncrement(x(e.xbins.start),e.xbins.size,!0,y)),e.xbins.end=w(i.tickIncrement(x(e.xbins.end),e.xbins.size,!1,y))),e._input.xbins=e.xbins),!e.autobiny&&"ybins"in e||(e.ybins=i.autoBin(v,g,e.nbinsy,"2d",b),"histogram2dcontour"===e.type&&(e.ybins.start=M(i.tickIncrement(_(e.ybins.start),e.ybins.size,!0,b)),e.ybins.end=M(i.tickIncrement(_(e.ybins.end),e.ybins.size,!1,b))),e._input.ybins=e.ybins),f=[];var A,T,S=[],E=[],L="string"==typeof e.xbins.size,C="string"==typeof e.ybins.size,z=L?[]:e.xbins,D=C?[]:e.ybins,I=0,P=[],O=e.histnorm,j=e.histfunc,R=O.indexOf("density")!==-1,F="max"===j||"min"===j,N=F?null:0,B=a.count,U=o[O],V=!1,H=[],q=[],G="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";G&&"count"!==j&&(V="avg"===j,B=a[j]);var Y=e.xbins,W=x(Y.start),X=x(Y.end)+(W-i.tickIncrement(W,Y.size,!1,y))/1e6;for(d=W;d=0&&A=0&&T0)s=h(t.alphahull,l);else{var u=["x","y","z"].indexOf(t.delaunayaxis);s=c(l.map(function(t){return[t[(u+1)%3],t[(u+2)%3]]}))}var p={positions:l,cells:s,lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:d(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};t.intensity?(this.color="#fff",p.vertexIntensity=t.intensity,p.colormap=i(t.colorscale)):t.vertexcolor?(this.color=t.vertexcolors[0],p.vertexColors=a(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],p.cellColors=a(t.facecolor)):(this.color=t.color,p.meshColor=d(t.color)),this.mesh.update(p)},p.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=s},{"../../lib/str2rgbarray":703,"alpha-shape":38,"convex-hull":96,"delaunay-triangulate":108,"gl-mesh3d":189,tinycolor2:514}],941:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../components/colorbar/defaults"),o=t("./attributes");e.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function u(t){var e=t.map(function(t){var e=l(t);return e&&Array.isArray(e)?e:null});return e.every(function(t){return t&&t.length===e[0].length})&&e}var c=u(["x","y","z"]),h=u(["i","j","k"]);if(!c)return void(e.visible=!1);h&&h.forEach(function(t){for(var e=0;ee}}},r.addRangeSlider=function(t,e){for(var r=!1,n=0;n1)){var h=o.simpleMap(c.x,e.d2c,0,r.xcalendar),f=o.distinctVals(h).minDiff;a=Math.min(a,f)}}for(1/0===a&&(a=1),u=0;u");_.push(o,o,o,o,o,o,null)}(L,d[L],p[L],m[L],g[L]));e.x=b,e.y=x,e.text=_}},{"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_ids":727,"./helpers":946}],950:[function(t,e,r){"use strict";var n=t("../../components/colorscale/color_attributes"),i=t("../../components/colorbar/attributes"),a=t("../../components/colorscale/scales"),o=t("../../plots/cartesian/layout_attributes"),s=t("../../lib/extend").extendDeep,l=t("../../lib/extend").extendFlat;e.exports={domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},dimensions:{_isLinkedToArray:"dimension",label:{valType:"string"},tickvals:o.tickvals,ticktext:o.ticktext,tickformat:{valType:"string",dflt:"3s"},visible:{valType:"boolean",dflt:!0},range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},constraintrange:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},values:{valType:"data_array",dflt:[]}},line:l({},s({},n("line"),{colorscale:s({},n("line").colorscale,{dflt:a.Viridis}),autocolorscale:s({},n("line").autocolorscale,{dflt:!1})}),{showscale:{valType:"boolean",dflt:!1},colorbar:i})}},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/colorscale/scales":596,"../../lib/extend":677,"../../plots/cartesian/layout_attributes":735}],951:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plots/plots"),a=t("./plot"),o=t("../../constants/xmlns_namespaces"),s=t("./constants");r.name="parcoords",r.attr="type",r.plot=function(t){var e=i.getSubplotCalcData(t.calcdata,"parcoords","parcoords");e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords-line-layers").remove(),n._paperdiv.selectAll(".parcoords-line-layers").remove(),n._paperdiv.selectAll(".parcoords").remove(),n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){function e(e){var n=this,i=n.toDataURL("image/png"),a=r.append("svg:image"),l=t._fullLayout._size,u=t._fullData[e.model.key].domain;a.attr({xmlns:o.svg,"xlink:href":i,x:l.l+l.w*u.x[0]-s.overdrag,y:l.t+l.h*(1-u.y[1]),width:(u.x[1]-u.x[0])*l.w+2*s.overdrag,height:(u.y[1]-u.y[0])*l.h,preserveAspectRatio:"none"})}var r=t._fullLayout._glimages,i=n.selectAll(".svg-container");i.filter(function(t,e){return e===i.size()-1 +}).selectAll(".parcoords-lines.context, .parcoords-lines.focus").each(e),window.setTimeout(function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":668,"../../plots/plots":787,"./constants":954,"./plot":959,d3:107}],952:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/calc"),a=t("../../lib");e.exports=function(t,e){var r=!!e.line.colorscale&&a.isArray(e.line.color),o=r?e.line.color:Array.apply(0,Array(e.dimensions.reduce(function(t,e){return Math.max(t,e.values.length)},0))).map(function(){return.5}),s=r?e.line.colorscale:[[0,e.line.color],[1,e.line.color]];return n(e,"line")&&i(e,e.line.color,"line","c"),[{lineColor:o,cscale:s}]}},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"../../lib":685}],953:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../components/colorscale"),s=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,l=r.line,u="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===l||!l.showscale)return void a.autoMargin(t,u);var c=l.color,h=l.cmin,f=l.cmax;n(h)||(h=i.aggNums(Math.min,null,c)),n(f)||(f=i.aggNums(Math.max,null,c));var d=e[0].t.cb=s(t,u),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,h,f),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:h,end:f,size:(f-h)/254}).options(l.colorbar)()}},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],954:[function(t,e,r){"use strict";e.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,scatter:!1,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,capturewidth:10,fillcolor:"magenta",fillopacity:1,strokecolor:"white",strokeopacity:1,strokewidth:1,handleheight:16,handleopacity:1,handleoverlap:0}}},{}],955:[function(t,e,r){"use strict";function n(t,e,r,n,i){i("line.color",r),s(t,"line")&&a.isArray(t.line.color)?(i("line.colorscale"),l(t,e,n,i,{prefix:"line.",cLetter:"c"})):i("line.color",r)}function i(t,e){function r(t,e){return a.coerce(n,i,o.dimensions,t,e)}var n,i,s,l=t.dimensions||[],c=e.dimensions=[],h=1/0;for(l.length>u&&(a.log("parcoords traces support up to "+u+" dimensions at the moment"),l.splice(u)),s=0;s0);d&&(r("label"),r("tickvals"),r("ticktext"),r("tickformat"),r("range"),r("constraintrange"),h=Math.min(h,i.values.length)),i._index=s,c.push(i)}if(isFinite(h))for(s=0;sh&&(i.values=i.values.slice(0,h));return c}var a=t("../../lib"),o=t("./attributes"),s=t("../../components/colorscale/has_colorscale"),l=t("../../components/colorscale/defaults"),u=t("./constants").maxDimensionCount;e.exports=function(t,e,r,s){function l(r,n){return a.coerce(t,e,o,r,n)}var u=i(t,e);n(t,e,r,s,l),l("domain.x"),l("domain.y"),Array.isArray(u)&&u.length||(e.visible=!1)}},{"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591,"../../lib":685,"./attributes":950,"./constants":954}],956:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.calc=t("./calc"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.moduleType="trace",n.name="parcoords",n.basePlotModule=t("./base_plot"),n.categories=["gl","noOpacity"],n.meta={},e.exports=n},{"./attributes":950,"./base_plot":951,"./calc":952,"./colorbar":953,"./defaults":955,"./plot":959}],957:[function(t,e,r){"use strict";function n(t){t.read({x:0,y:0,width:1,height:1,data:x})}function i(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function a(t,e,r,a,o,s){function l(n){var c;c=Math.min(a,o-n*a),s.offset=v*n*a,s.count=v*c,0===n&&(window.cancelAnimationFrame(r.currentRafs[u]),delete r.currentRafs[u],i(t,s.scissorX,s.scissorY,s.scissorWidth,s.viewBoxSize[1])),r.clearOnly||(e(s),n*a+c>>8*e)%256/255}function u(t,e,r,n){for(var i=[],a=0;a=g-4?l(a,g-2-s):.5);return i}function c(t,e,r){var n,i,a,o=[];for(i=0;if&&(f=t[l].dim2.canvasX,c=l),t[l].dim1.canvasXi)return a;i=o,a=n[r]}return n[n.length-1]}function l(t,e,r){var n=o(r);return r.tickvals?_.scale.ordinal().domain(r.tickvals).range(r.tickvals.map(function(t){return(t-n[0])/(n[1]-n[0])}).map(function(r){return t-e+r*(e-(t-e))})):_.scale.linear().domain(n).range([t-e,e])}function u(t,e){return _.scale.linear().range([t-e,e])}function c(t){return _.scale.linear().domain(o(t))}function h(t){var e=o(t);return t.tickvals&&_.scale.ordinal().domain(t.tickvals).range(t.tickvals.map(function(t){return(t-e[0])/(e[1]-e[0])}))}function f(t){var e=t.map(function(t){return t[0]}),r=t.map(function(t){return t[1]}),n=r.map(function(t){return _.rgb(t)}),i=function(t){return function(e){return e[t]}},a="rgb".split("").map(function(t){return _.scale.linear().clamp(!0).domain(e).range(n.map(i(t)))});return function(t){return a.map(function(e){return e(t)})}}function d(t){return t[0]}function p(t,e,r){var n=d(e),i=n.trace,o=n.lineColor,s=n.cscale,l=i.line,u=i.domain,h=i.dimensions,p=t.width,m=x.extendDeep({},l,{color:o.map(c({values:o,range:[l.cmin,l.cmax]})),blockLineCount:b.blockLineCount,canvasOverdrag:b.overdrag*b.canvasPixelRatio}),g=Math.floor(p*(u.x[1]-u.x[0])),v=Math.floor(t.height*(u.y[1]-u.y[0])),y=t.margin||{l:80,r:80,t:100,b:80},_=g,w=v;return{key:r,colCount:h.filter(a).length,dimensions:h,tickDistance:b.tickDistance,unitToColor:f(s),lines:m,translateX:u.x[0]*p,translateY:t.height-u.y[1]*t.height,pad:y,canvasWidth:_*b.canvasPixelRatio+2*m.canvasOverdrag,canvasHeight:w*b.canvasPixelRatio,width:_,height:w,canvasPixelRatio:b.canvasPixelRatio}}function m(t){var e=t.width,r=t.height,n=t.dimensions,i=t.canvasPixelRatio,o=function(r){return e*r/Math.max(1,t.colCount-1)},s=b.verticalPadding/(r*i),f=1-2*s,d=function(t){return s+f*t},p={key:t.key,xScale:o,model:t},m={};return p.dimensions=n.filter(a).map(function(e,n){var a=c(e),s=m[e.label];return m[e.label]=(s||0)+1,{key:e.label+(s?"__"+s:""),label:e.label,tickFormat:e.tickformat,tickvals:e.tickvals,ticktext:e.ticktext,ordinal:!!e.tickvals,scatter:b.scatter||e.scatter,xIndex:n,crossfilterDimensionIndex:n,visibleIndex:e._index,height:r,values:e.values,paddedUnitValues:e.values.map(a).map(d),xScale:o,x:o(n),canvasX:o(n)*i,unitScale:u(r,b.verticalPadding),domainScale:l(r,b.verticalPadding,e),ordinalScale:h(e),domainToUnitScale:a,filter:e.constraintrange?e.constraintrange.map(a):[0,1],parent:p,model:t}}),p}function g(t){return b.layers.map(function(e){return{key:e,context:"contextLineLayer"===e,pick:"pickLineLayer"===e,viewModel:t,model:t.model}})}function v(t){t.classed("axisExtentText",!0).attr("text-anchor","middle").style("font-weight",100).style("font-size","10px").style("cursor","default").style("user-select","none")}var y=t("./lines"),b=t("./constants"),x=t("../../lib"),_=t("d3");e.exports=function(t,e,r,a,o){function l(t){var e=t.selectAll("defs").data(i,n);e.enter().append("defs");var r=e.selectAll("#filterBarPattern").data(i,n);r.enter().append("pattern").attr("id","filterBarPattern").attr("patternUnits","userSpaceOnUse"),r.attr("x",-b.bar.width).attr("width",b.bar.capturewidth).attr("height",function(t){return t.model.height});var a=r.selectAll("rect").data(i,n);a.enter().append("rect").attr("shape-rendering","crispEdges"),a.attr("height",function(t){return t.model.height}).attr("width",b.bar.width).attr("x",b.bar.width/2).attr("fill",b.bar.fillcolor).attr("fill-opacity",b.bar.fillopacity).attr("stroke",b.bar.strokecolor).attr("stroke-opacity",b.bar.strokeopacity).attr("stroke-width",b.bar.strokewidth)}function u(t){return t.dimensions.some(function(t){return 0!==t.filter[0]||1!==t.filter[1]})}function c(t,e){for(var r=e.panels||(e.panels=[]),n=t.each(function(t){return t})[e.key].map(function(t){return t.__data__}),i=n.length-1,a=0;a<1;a++)for(var o=0;o=r||s>=n)return;var l=t.lineLayer.readPixel(a,n-1-s),u=0!==l[3],c=u?l[2]+256*(l[1]+256*l[0]):null,h={x:a,y:s,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:c};c!==z&&(u?o.hover(h):o.unhover&&o.unhover(h),z=c)}}),L.style("margin",function(t){var e=t.model.pad;return e.t+"px "+e.r+"px "+e.b+"px "+e.l+"px"}).attr("width",function(t){return t.model.canvasWidth}).attr("height",function(t){return t.model.canvasHeight}).style("width",function(t){return t.model.width+2*b.overdrag+"px"}).style("height",function(t){return t.model.height+"px"}).style("opacity",function(t){return t.pick?.01:1}),e.style("background","rgba(255, 255, 255, 0)");var D=e.selectAll(".parcoords").data(S,n);D.exit().remove(),D.enter().append("g").classed("parcoords",!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","none").call(l),D.attr("width",function(t){return t.model.width+t.model.pad.l+t.model.pad.r}).attr("height",function(t){return t.model.height+t.model.pad.t+t.model.pad.b}).attr("transform",function(t){return"translate("+t.model.translateX+","+t.model.translateY+")"});var I=D.selectAll(".parcoordsControlView").data(i,n);I.enter().append("g").classed("parcoordsControlView",!0).style("box-sizing","content-box"),I.attr("transform",function(t){return"translate("+t.model.pad.l+","+t.model.pad.t+")"});var P=I.selectAll(".yAxis").data(function(t){return t.dimensions},n);P.enter().append("g").classed("yAxis",!0).each(function(t){C.dimensions.push(t)}),I.each(function(t){f(P,t)}),L.each(function(t){t.lineLayer=y(this,t.model.lines,t.model.canvasWidth,t.model.canvasHeight,t.viewModel.dimensions,t.viewModel.panels,t.model.unitToColor,t.context,t.pick,b.scatter),t.viewModel[t.key]=t.lineLayer,C.renderers.push(function(){t.lineLayer.render(t.viewModel.panels,!0)}),t.lineLayer.render(t.viewModel.panels,!t.context)}),P.attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),P.call(_.behavior.drag().origin(function(t){return t}).on("drag",function(t){var e=t.parent;T=!1,A||(t.x=Math.max(-b.overdrag,Math.min(t.model.width+b.overdrag,_.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,P.sort(function(t,e){return t.x-e.x}).each(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio}),f(P,e),P.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),_.select(this).attr("transform","translate("+t.x+", 0)"),P.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLineLayer&&e.contextLineLayer.render(e.panels,!1,!u(e)),e.focusLineLayer.render&&e.focusLineLayer.render(e.panels))}).on("dragend",function(t){var e=t.parent;if(A)return void("ending"===A&&(A=!1));t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,f(P,e),_.select(this).attr("transform",function(t){return"translate("+t.x+", 0)"}),e.contextLineLayer&&e.contextLineLayer.render(e.panels,!1,!u(e)),e.focusLineLayer&&e.focusLineLayer.render(e.panels),e.pickLineLayer&&e.pickLineLayer.render(e.panels,!0),T=!0,o&&o.axesMoved&&o.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),P.exit().remove();var O=P.selectAll(".axisOverlays").data(i,n);O.enter().append("g").classed("axisOverlays",!0),O.selectAll(".axis").remove();var j=O.selectAll(".axis").data(i,n);j.enter().append("g").classed("axis",!0),j.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,n=r.domain(),i=t.ticktext;_.select(this).call(_.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?n.map(function(t,e){return i&&i[e]||t}):null).tickFormat(t.ordinal?function(t){return t}:null).scale(r))}),j.selectAll(".domain, .tick").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),j.selectAll("text").style("font-weight",100).style("font-size","10px").style("fill","black").style("fill-opacity",1).style("stroke","none").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default").style("user-select","none");var R=O.selectAll(".axisHeading").data(i,n);R.enter().append("g").classed("axisHeading",!0);var F=R.selectAll(".axisTitle").data(i,n);F.enter().append("text").classed("axisTitle",!0).attr("text-anchor","middle").style("font-family","sans-serif").style("font-size","10px").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),F.attr("transform","translate(0,"+-b.axisTitleOffset+")").text(function(t){return t.label});var N=O.selectAll(".axisExtent").data(i,n);N.enter().append("g").classed("axisExtent",!0);var B=N.selectAll(".axisExtentTop").data(i,n);B.enter().append("g").classed("axisExtentTop",!0),B.attr("transform","translate(0,"+-b.axisExtentOffset+")");var U=B.selectAll(".axisExtentTopText").data(i,n);U.enter().append("text").classed("axisExtentTopText",!0).attr("alignment-baseline","after-edge").call(v),U.text(function(t){return x(t)(t.domainScale.domain().slice(-1)[0])});var V=N.selectAll(".axisExtentBottom").data(i,n);V.enter().append("g").classed("axisExtentBottom",!0),V.attr("transform",function(t){return"translate(0,"+(t.model.height+b.axisExtentOffset)+")"});var H=V.selectAll(".axisExtentBottomText").data(i,n);H.enter().append("text").classed("axisExtentBottomText",!0).attr("alignment-baseline","before-edge").call(v),H.text(function(t){return x(t)(t.domainScale.domain()[0])});var q=O.selectAll(".axisBrush").data(i,n),G=q.enter().append("g").classed("axisBrush",!0);q.each(function(t){t.brush||(t.brush=_.svg.brush().y(t.unitScale).on("brushstart",w).on("brush",M).on("brushend",k),0===t.filter[0]&&1===t.filter[1]||t.brush.extent(t.filter),_.select(this).call(t.brush))}),G.selectAll("rect").attr("x",-b.bar.capturewidth/2).attr("width",b.bar.capturewidth),G.selectAll("rect.extent").attr("fill","url(#filterBarPattern)").style("cursor","ns-resize").filter(function(t){return 0===t.filter[0]&&1===t.filter[1]}).attr("y",-100),G.selectAll(".resize rect").attr("height",b.bar.handleheight).attr("opacity",0).style("visibility","visible"),G.selectAll(".resize.n rect").style("cursor","n-resize").attr("y",b.bar.handleoverlap-b.bar.handleheight),G.selectAll(".resize.s rect").style("cursor","s-resize").attr("y",b.bar.handleoverlap);var Y=!1,W=!1;return C}},{"../../lib":685,"./constants":954,"./lines":957,d3:107}],959:[function(t,e,r){"use strict";var n=t("./parcoords");e.exports=function(t,e){var r=t._fullLayout,i=r._paper,a=r._paperdiv,o={},s={},l=r._size;e.forEach(function(e,r){o[r]=t.data[r].dimensions,s[r]=t.data[r].dimensions.slice()});var u=function(e,r,n){var i=s[e][r],a=i.constraintrange;a&&2===a.length||(a=i.constraintrange=[]),a[0]=n[0],a[1]=n[1],t.emit("plotly_restyle")},c=function(e){t.emit("plotly_hover",e)},h=function(e){t.emit("plotly_unhover",e)},f=function(e,r){function n(t){return!("visible"in t)||t.visible}function i(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return i===-1&&(i+=e.length),i}var a=function(t){return function(e,n){return i(r,t,e)-i(r,t,n)}}(s[e].filter(n));o[e].sort(a),s[e].filter(function(t){return!n(t)}).sort(function(t){return s[e].indexOf(t)}).forEach(function(t){o[e].splice(o[e].indexOf(t),1),o[e].splice(s[e].indexOf(t),0,t)}),t.emit("plotly_restyle")};n(a,i,e,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:h,axesMoved:f})}},{"./parcoords":958}],960:[function(t,e,r){"use strict";var n=t("../../components/color/attributes"),i=t("../../plots/font_attributes"),a=t("../../plots/attributes"),o=t("../../lib/extend").extendFlat;e.exports={labels:{valType:"data_array"},label0:{valType:"number",dflt:0},dlabel:{valType:"number",dflt:1},values:{valType:"data_array"},marker:{colors:{valType:"data_array"},line:{color:{valType:"color",dflt:n.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}}},text:{valType:"data_array"},hovertext:{valType:"string",dflt:"",arrayOk:!0},scalegroup:{valType:"string",dflt:""},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"]},hoverinfo:o({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0},textfont:o({},i,{}),insidetextfont:o({},i,{}),outsidetextfont:o({},i,{}),domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},hole:{valType:"number",min:0,max:1,dflt:0},sort:{valType:"boolean",dflt:!0},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise"},rotation:{valType:"number",min:-360,max:360,dflt:0},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0}}},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/attributes":722,"../../plots/font_attributes":748}],961:[function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n")}return m};var l},{"../../components/color":578,"./helpers":964,"fast-isnumeric":116,tinycolor2:514}],963:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r,a){function o(r,a){return n.coerce(t,e,i,r,a)}var s=n.coerceFont,l=o("values");if(!Array.isArray(l)||!l.length)return void(e.visible=!1);var u=o("labels");Array.isArray(u)||(o("label0"),o("dlabel")),o("marker.line.width")&&o("marker.line.color");var c=o("marker.colors");Array.isArray(c)||(e.marker.colors=[]),o("scalegroup");var h=o("text"),f=o("textinfo",Array.isArray(h)?"text+percent":"percent");if(o("hovertext"),o("hoverinfo",1===a._dataLength?"label+text+value+percent":void 0),f&&"none"!==f){var d=o("textposition"),p=Array.isArray(d)||"auto"===d,m=p||"inside"===d,g=p||"outside"===d;if(m||g){var v=s(o,"textfont",a.font);m&&s(o,"insidetextfont",v),g&&s(o,"outsidetextfont",v)}}o("domain.x"),o("domain.y"),o("hole"),o("sort"),o("direction"),o("rotation"),o("pull")}},{"../../lib":685, +"./attributes":960}],964:[function(t,e,r){"use strict";var n=t("../../lib");r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return r.lastIndexOf(".")!==-1&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)+"%"},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return r.lastIndexOf(".")!==-1&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)}},{"../../lib":685}],965:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("./layout_defaults"),n.layoutAttributes=t("./layout_attributes"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.styleOne=t("./style_one"),n.moduleType="trace",n.name="pie",n.basePlotModule=t("./base_plot"),n.categories=["pie","showLegend"],n.meta={},e.exports=n},{"./attributes":960,"./base_plot":961,"./calc":962,"./defaults":963,"./layout_attributes":966,"./layout_defaults":967,"./plot":968,"./style":969,"./style_one":970}],966:[function(t,e,r){"use strict";e.exports={hiddenlabels:{valType:"data_array"}}},{}],967:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){!function(r,a){n.coerce(t,e,i,r,a)}("hiddenlabels")}},{"../../lib":685,"./layout_attributes":966}],968:[function(t,e,r){"use strict";function n(t,e,r){var n=Math.sqrt(t.width*t.width+t.height*t.height),a=t.width/t.height,o=Math.PI*Math.min(e.v/r.vTotal,.5),s=1-r.trace.hole,l=i(e,r),u={scale:l*r.r*2/n,rCenter:1-l,rotate:0};if(u.scale>=1)return u;var c=a+1/(2*Math.tan(o)),h=r.r*Math.min(1/(Math.sqrt(c*c+.5)+c),s/(Math.sqrt(a*a+s/2)+a)),f={scale:2*h/t.height,rCenter:Math.cos(h/r.r)-h*a/r.r,rotate:(180/Math.PI*e.midangle+720)%180-90},d=1/a,p=d+1/(2*Math.tan(o)),m=r.r*Math.min(1/(Math.sqrt(p*p+.5)+p),s/(Math.sqrt(d*d+s/2)+d)),g={scale:2*m/t.width,rCenter:Math.cos(m/r.r)-m/a/r.r,rotate:(180/Math.PI*e.midangle+810)%180-90},v=g.scale>f.scale?g:f;return u.scale<1&&v.scale>u.scale?v:u}function i(t,e){if(t.v===e.vTotal&&!e.trace.hole)return 1;var r=Math.PI*Math.min(t.v/e.vTotal,.5);return Math.min(1/(1+1/Math.sin(r)),(1-e.trace.hole)/2)}function a(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function o(t,e){function r(t,e){return t.pxmid[1]-e.pxmid[1]}function n(t,e){return e.pxmid[1]-t.pxmid[1]}var i,a,o,s,l,u,c,h,f,d,p,m,g;for(a=0;a<2;a++)for(o=a?r:n,l=a?Math.max:Math.min,c=a?1:-1,i=0;i<2;i++){for(s=i?Math.max:Math.min,u=i?1:-1,h=t[a][i],h.sort(o),f=t[1-a][i],d=f.concat(h),m=[],p=0;p0&&(t.labelExtraY=b),Array.isArray(e.pull))for(i=0;i=e.pull[o.i]||((t.pxmid[1]-o.pxmid[1])*c>0?(h=o.cyFinal+l(o.px0[1],o.px1[1]),(b=h-g-t.labelExtraY)*c>0&&(t.labelExtraY+=b)):(v+t.labelExtraY-y)*c>0&&(n=3*u*Math.abs(i-d.indexOf(t)),f=o.cxFinal+s(o.px0[0],o.px1[0]),(p=f+n-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*u>0&&(t.labelExtraX+=p)))}(m[p],v)}}}function s(t,e){var r,n,i,a,o,s,l,c,h,f,d=[];for(i=0;ic&&(c=s.pull[a]);o.r=Math.min(r/u(s.tilt,Math.sin(l),s.depth),n/u(s.tilt,Math.cos(l),s.depth))/(2+2*c),o.cx=e.l+e.w*(s.domain.x[1]+s.domain.x[0])/2,o.cy=e.t+e.h*(2-s.domain.y[1]-s.domain.y[0])/2,s.scalegroup&&d.indexOf(s.scalegroup)===-1&&d.push(s.scalegroup)}for(a=0;ah.vTotal/2?1:0)}function u(t,e,r){if(!t)return 1;var n=Math.sin(t*Math.PI/180);return Math.max(.01,r*n*Math.abs(e)+2*Math.sqrt(1-n*n*e*e))}var c=t("d3"),h=t("../../plots/cartesian/graph_interact"),f=t("../../components/color"),d=t("../../components/drawing"),p=t("../../lib/svg_text_utils"),m=t("./helpers");e.exports=function(t,e){var r=t._fullLayout;s(e,r._size);var u=r._pielayer.selectAll("g.trace").data(e);u.enter().append("g").attr({"stroke-linejoin":"round",class:"trace"}),u.exit().remove(),u.order(),u.each(function(e){var s=c.select(this),u=e[0],g=u.trace,v=(g.depth||0)*u.r*Math.sin(0)/2,y=g.tiltaxis||0,b=y*Math.PI/180,x=[v*Math.sin(b),v*Math.cos(b)],_=u.r*Math.cos(0),w=s.selectAll("g.part").data(g.tilt?["top","sides"]:["top"]);w.enter().append("g").attr("class",function(t){return t+" part"}),w.exit().remove(),w.order(),l(e),s.selectAll(".top").each(function(){var s=c.select(this).selectAll("g.slice").data(e);s.enter().append("g").classed("slice",!0),s.exit().remove();var l=[[[],[]],[[],[]]],v=!1;s.each(function(e){function o(n){n.originalEvent=c.event;var a=t._fullLayout,o=t._fullData[g.index],s=o.hoverinfo;if("all"===s&&(s="label+text+value+percent+name"),t._dragging||a.hovermode===!1||"none"===s||"skip"===s||!s)return void h.hover(t,n,"pie");var l=i(e,u),f=w+e.pxmid[0]*(1-l),d=M+e.pxmid[1]*(1-l),p=r.separators,v=[];s.indexOf("label")!==-1&&v.push(e.label),s.indexOf("text")!==-1&&(o.hovertext?v.push(Array.isArray(o.hovertext)?o.hovertext[e.i]:o.hovertext):o.text&&o.text[e.i]&&v.push(o.text[e.i])),s.indexOf("value")!==-1&&v.push(m.formatPieValue(e.v,p)),s.indexOf("percent")!==-1&&v.push(m.formatPiePercent(e.v/u.vTotal,p)),h.loneHover({x0:f-l*u.r,x1:f+l*u.r,y:d,text:v.join("
"),name:s.indexOf("name")!==-1?o.name:void 0,color:e.color,idealAlign:e.pxmid[0]<0?"left":"right"},{container:a._hoverlayer.node(),outerContainer:a._paper.node()}),h.hover(t,n,"pie"),T=!0}function s(e){e.originalEvent=c.event,t.emit("plotly_unhover",{event:c.event,points:[e]}),T&&(h.loneUnhover(r._hoverlayer.node()),T=!1)}function f(){t._hoverdata=[e],t._hoverdata.trace=u.trace,h.click(t,c.event)}function b(t,r,n,i){return"a"+i*u.r+","+i*_+" "+y+" "+e.largeArc+(n?" 1 ":" 0 ")+i*(r[0]-t[0])+","+i*(r[1]-t[1])}if(e.hidden)return void c.select(this).selectAll("path,g").remove();l[e.pxmid[1]<0?0:1][e.pxmid[0]<0?0:1].push(e);var w=u.cx+x[0],M=u.cy+x[1],k=c.select(this),A=k.selectAll("path.surface").data([e]),T=!1;if(A.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),k.select("path.textline").remove(),k.on("mouseover",o).on("mouseout",s).on("click",f),g.pull){var S=+(Array.isArray(g.pull)?g.pull[e.i]:g.pull)||0;S>0&&(w+=S*e.pxmid[0],M+=S*e.pxmid[1])}e.cxFinal=w,e.cyFinal=M;var E=g.hole;if(e.v===u.vTotal){var L="M"+(w+e.px0[0])+","+(M+e.px0[1])+b(e.px0,e.pxmid,!0,1)+b(e.pxmid,e.px0,!0,1)+"Z";E?A.attr("d","M"+(w+E*e.px0[0])+","+(M+E*e.px0[1])+b(e.px0,e.pxmid,!1,E)+b(e.pxmid,e.px0,!1,E)+"Z"+L):A.attr("d",L)}else{var C=b(e.px0,e.px1,!0,1);if(E){var z=1-E;A.attr("d","M"+(w+E*e.px1[0])+","+(M+E*e.px1[1])+b(e.px1,e.px0,!1,E)+"l"+z*e.px0[0]+","+z*e.px0[1]+C+"Z")}else A.attr("d","M"+w+","+M+"l"+e.px0[0]+","+e.px0[1]+C+"Z")}var D=Array.isArray(g.textposition)?g.textposition[e.i]:g.textposition,I=k.selectAll("g.slicetext").data(e.text&&"none"!==D?[0]:[]);I.enter().append("g").classed("slicetext",!0),I.exit().remove(),I.each(function(){var t=c.select(this).selectAll("text").data([0]);t.enter().append("text").attr("data-notex",1),t.exit().remove(),t.text(e.text).attr({class:"slicetext",transform:"","data-bb":"","text-anchor":"middle",x:0,y:0}).call(d.font,"outside"===D?g.outsidetextfont:g.insidetextfont).call(p.convertToTspans),t.selectAll("tspan.line").attr({x:0,y:0});var r,i=d.bBox(t.node());"outside"===D?r=a(i,e):(r=n(i,e,u),"auto"===D&&r.scale<1&&(t.call(d.font,g.outsidetextfont),g.outsidetextfont.family===g.insidetextfont.family&&g.outsidetextfont.size===g.insidetextfont.size||(t.attr({"data-bb":""}),i=d.bBox(t.node())),r=a(i,e)));var o=w+e.pxmid[0]*r.rCenter+(r.x||0),s=M+e.pxmid[1]*r.rCenter+(r.y||0);r.outside&&(e.yLabelMin=s-i.height/2,e.yLabelMid=s,e.yLabelMax=s+i.height/2,e.labelExtraX=0,e.labelExtraY=0,v=!0),t.attr("transform","translate("+o+","+s+")"+(r.scale<1?"scale("+r.scale+")":"")+(r.rotate?"rotate("+r.rotate+")":"")+"translate("+-(i.left+i.right)/2+","+-(i.top+i.bottom)/2+")")})}),v&&o(l,g),s.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=c.select(this),r=e.select("g.slicetext text");r.attr("transform","translate("+t.labelExtraX+","+t.labelExtraY+")"+r.attr("transform"));var n=t.cxFinal+t.pxmid[0],i=t.cyFinal+t.pxmid[1],a="M"+n+","+i,o=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var s=t.labelExtraX*t.pxmid[1]/t.pxmid[0],l=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(s)>Math.abs(l)?a+="l"+l*t.pxmid[0]/t.pxmid[1]+","+l+"H"+(n+t.labelExtraX+o):a+="l"+t.labelExtraX+","+s+"v"+(l-s)+"h"+o}else a+="V"+(t.yLabelMid+t.labelExtraY)+"h"+o;e.append("path").classed("textline",!0).call(f.stroke,g.outsidetextfont.color).attr({"stroke-width":Math.min(2,g.outsidetextfont.size/8),d:a,fill:"none"})}})})}),setTimeout(function(){u.selectAll("tspan").each(function(){var t=c.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)}},{"../../components/color":578,"../../components/drawing":602,"../../lib/svg_text_utils":704,"../../plots/cartesian/graph_interact":733,"./helpers":964,d3:107}],969:[function(t,e,r){"use strict";var n=t("d3"),i=t("./style_one");e.exports=function(t){t._fullLayout._pielayer.selectAll(".trace").each(function(t){var e=t[0],r=e.trace,a=n.select(this);a.style({opacity:r.opacity}),a.selectAll(".top path.surface").each(function(t){n.select(this).call(i,t,r)})})}},{"./style_one":970,d3:107}],970:[function(t,e,r){"use strict";var n=t("../../components/color");e.exports=function(t,e,r){var i=r.marker.line.color;Array.isArray(i)&&(i=i[e.i]||n.defaultLine);var a=r.marker.line.width||0;Array.isArray(a)&&(a=a[e.i]||0),t.style({"stroke-width":a}).call(n.fill,e.color).call(n.stroke,i)}},{"../../components/color":578}],971:[function(t,e,r){"use strict";var n=t("../scattergl/attributes");e.exports={x:n.x,y:n.y,xy:{valType:"data_array"},indices:{valType:"data_array"},xbounds:{valType:"data_array"},ybounds:{valType:"data_array"},text:n.text,marker:{color:{valType:"color",arrayOk:!1},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1},blend:{valType:"boolean",dflt:null},sizemin:{valType:"number",min:.1,max:2,dflt:.5},sizemax:{valType:"number",min:.1,dflt:20},border:{color:{valType:"color",arrayOk:!1},arearatio:{valType:"number",min:0,max:1,dflt:0}}}}},{"../scattergl/attributes":1020}],972:[function(t,e,r){"use strict";function n(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=a(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}function i(t,e){var r=new n(t,e.uid);return r.update(e),r}var a=t("gl-pointcloud2d"),o=t("../../lib/str2rgbarray"),s=t("../scatter/get_trace_color"),l=["xaxis","yaxis"],u=n.prototype;u.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},u.update=function(t){this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=s(t,{})},u.updateFast=function(t){var e,r,n,i,a,s,l=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,c=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,f=t.indices,d=this.bounds;if(c){if(n=c,e=c.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(s=0;sd[2]&&(d[2]=i),ad[3]&&(d[3]=a);if(f)r=f;else for(r=new Int32Array(e),s=0;sd[2]&&(d[2]=i),ad[3]&&(d[3]=a);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var p=o(t.marker.color),m=o(t.marker.border.color),g=t.opacity*t.marker.opacity;p[3]*=g,this.pointcloudOptions.color=p;var v=t.marker.blend;if(null===v){v=l.length<100||u.length<100}this.pointcloudOptions.blend=v,m[3]*=g,this.pointcloudOptions.borderColor=m;var y=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=y,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions),this.expandAxesFast(d,b/2)},u.expandAxesFast=function(t,e){for(var r,n,i,a=e||.5,o=0;o<2;o++)r=this.scene[l[o]],n=r._min,n||(n=[]),n.push({val:t[o],pad:a}),i=r._max,i||(i=[]),i.push({val:t[o+2],pad:a})},u.dispose=function(){this.pointcloud.dispose()},e.exports=i},{"../../lib/str2rgbarray":703,"../scatter/get_trace_color":984,"gl-pointcloud2d":214}],973:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a("text"),a("marker.color",r),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",r),a("marker.border.arearatio")}},{"../../lib":685,"./attributes":971}],974:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.calc=t("../scatter3d/calc"),n.plot=t("./convert"),n.moduleType="trace",n.name="pointcloud",n.basePlotModule=t("../../plots/gl2d"),n.categories=["gl2d","showLegend"],n.meta={},e.exports=n},{"../../plots/gl2d":764,"../scatter3d/calc":1e3,"./attributes":971,"./convert":972,"./defaults":973}],975:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){n.mergeArray(e.text,t,"tx"),n.mergeArray(e.hovertext,t,"htx"),n.mergeArray(e.customdata,t,"data"),n.mergeArray(e.textposition,t,"tp"),e.textfont&&(n.mergeArray(e.textfont.size,t,"ts"),n.mergeArray(e.textfont.color,t,"tc"),n.mergeArray(e.textfont.family,t,"tf"));var r=e.marker;if(r){n.mergeArray(r.size,t,"ms"),n.mergeArray(r.opacity,t,"mo"),n.mergeArray(r.symbol,t,"mx"),n.mergeArray(r.color,t,"mc");var i=r.line;r.line&&(n.mergeArray(i.color,t,"mlc"),n.mergeArray(i.width,t,"mlw"))}}},{"../../lib":685}],976:[function(t,e,r){"use strict";var n=t("../../components/colorscale/color_attributes"),i=t("../../components/errorbars/attributes"),a=t("../../components/colorbar/attributes"),o=t("../../components/drawing/attributes").dash,s=t("../../components/drawing"),l=(t("./constants"),t("../../lib/extend").extendFlat);e.exports={x:{valType:"data_array"},x0:{valType:"any",dflt:0},dx:{valType:"number",dflt:1},y:{valType:"data_array"},y0:{valType:"any",dflt:0},customdata:{valType:"data_array"},dy:{valType:"number",dflt:1},ids:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},hoveron:{valType:"flaglist",flags:["points","fills"]},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear"},smoothing:{valType:"number",min:0,max:1.3,dflt:1},dash:o,simplify:{valType:"boolean",dflt:!0}},connectgaps:{valType:"boolean",dflt:!1},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],dflt:"none"},fillcolor:{valType:"color"},marker:l({},{symbol:{valType:"enumerated",values:s.symbolList,dflt:"circle",arrayOk:!0},opacity:{valType:"number",min:0,max:1,arrayOk:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0},maxdisplayed:{valType:"number",min:0,dflt:0},sizeref:{valType:"number",dflt:1},sizemin:{valType:"number",min:0,dflt:0},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter"},showscale:{valType:"boolean",dflt:!1},colorbar:a,line:l({},{width:{valType:"number",min:0,arrayOk:!0}},n("marker.line"))},n("marker")),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0},textfont:{family:{valType:"string",noBlank:!0,strict:!0,arrayOk:!0},size:{valType:"number",min:1,arrayOk:!0},color:{valType:"color",arrayOk:!0}},r:{valType:"data_array"},t:{valType:"data_array"},error_y:i,error_x:i}},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/drawing":602,"../../components/drawing/attributes":601,"../../components/errorbars/attributes":604,"../../lib/extend":677,"./constants":981}],977:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("./subtypes"),o=t("./colorscale_calc"),s=t("./arrays_to_calcdata");e.exports=function(t,e){var r,l,u,c=i.getFromId(t,e.xaxis||"x"),h=i.getFromId(t,e.yaxis||"y"),f=c.makeCalcdata(e,"x"),d=h.makeCalcdata(e,"y"),p=Math.min(f.length,d.length);c._minDtick=0,h._minDtick=0,f.length>p&&f.splice(p,f.length-p),d.length>p&&d.splice(p,d.length-p);var m={padded:!0},g={padded:!0};if(a.hasMarkers(e)){if(r=e.marker,l=r.size,Array.isArray(l)){var v={type:"linear"};i.setConvert(v),l=v.makeCalcdata(e.marker,"size"),l.length>p&&l.splice(p,l.length-p)}var y,b=1.6*(e.marker.sizeref||1);y="area"===e.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/b),3)}:function(t){return Math.max((t||0)/b,3)},m.ppad=g.ppad=Array.isArray(l)?l.map(y):y(l)}o(e),!("tozerox"===e.fill||"tonextx"===e.fill&&t.firstscatter)||f[0]===f[p-1]&&d[0]===d[p-1]?e.error_y.visible||["tonexty","tozeroy"].indexOf(e.fill)===-1&&(a.hasMarkers(e)||a.hasText(e))||(m.padded=!1,m.ppad=0):m.tozero=!0,!("tozeroy"===e.fill||"tonexty"===e.fill&&t.firstscatter)||f[0]===f[p-1]&&d[0]===d[p-1]?["tonextx","tozerox"].indexOf(e.fill)!==-1&&(g.padded=!1):g.tozero=!0,i.expand(c,f,m),i.expand(h,d,g);var x=new Array(p);for(u=0;u=0;i--){var a=t[i];if("scatter"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],979:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../components/colorscale"),s=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,l=r.marker,u="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===l||!l.showscale)return void a.autoMargin(t,u);var c=l.color,h=l.cmin,f=l.cmax;n(h)||(h=i.aggNums(Math.min,null,c)),n(f)||(f=i.aggNums(Math.max,null,c));var d=e[0].t.cb=s(t,u),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,h,f),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:h,end:f,size:(f-h)/254}).options(l.colorbar)()}},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],980:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/calc"),a=t("./subtypes");e.exports=function(t){a.hasLines(t)&&n(t,"line")&&i(t,t.line.color,"line","c"),a.hasMarkers(t)&&(n(t,"marker")&&i(t,t.marker.color,"marker","c"),n(t,"marker.line")&&i(t,t.marker.line.color,"marker.line","c"))}},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"./subtypes":996}],981:[function(t,e,r){"use strict";e.exports={PTS_LINESONLY:20}},{}],982:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("./constants"),o=t("./subtypes"),s=t("./xy_defaults"),l=t("./marker_defaults"),u=t("./line_defaults"),c=t("./line_shape_defaults"),h=t("./text_defaults"),f=t("./fillcolor_defaults"),d=t("../../components/errorbars/defaults");e.exports=function(t,e,r,p){function m(r,a){return n.coerce(t,e,i,r,a)}var g=s(t,e,p,m),v=gU!=I>=U&&(C=E[T-1][0],z=E[T][0],L=C+(z-C)*(U-D)/(I-D),R=Math.min(R,L),F=Math.max(F,L));R=Math.max(R,0),F=Math.min(F,f._length);var V=l.defaultLine;return l.opacity(h.fillcolor)?V=h.fillcolor:l.opacity((h.line||{}).color)&&(V=h.line.color),n.extendFlat(t,{distance:a.MAXDIST+10,x0:R,x1:F,y0:U,y1:U,color:V}),delete t.index,h.text&&!Array.isArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}}},{"../../components/color":578,"../../components/errorbars":608,"../../lib":685,"../../plots/cartesian/constants":729,"../../plots/cartesian/graph_interact":733,"./get_trace_color":984}],986:[function(t,e,r){"use strict";var n={},i=t("./subtypes");n.hasLines=i.hasLines,n.hasMarkers=i.hasMarkers,n.hasText=i.hasText,n.isBubble=i.isBubble,n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.cleanData=t("./clean_data"),n.calc=t("./calc"),n.arraysToCalcdata=t("./arrays_to_calcdata"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.animatable=!0,n.moduleType="trace",n.name="scatter",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","symbols","markerColorscale","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":734,"./arrays_to_calcdata":975,"./attributes":976,"./calc":977,"./clean_data":978,"./colorbar":979,"./defaults":982,"./hover":985,"./plot":993,"./select":994,"./style":995,"./subtypes":996}],987:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,a,o,s){var l=(t.marker||{}).color;if(o("line.color",r),n(t,"line"))i(t,e,a,o,{prefix:"line.",cLetter:"c"});else{o("line.color",!Array.isArray(l)&&l||r)}o("line.width"),(s||{}).noDash||o("line.dash")}},{"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591}],988:[function(t,e,r){"use strict";var n=t("../../constants/numerical").BADNUM;e.exports=function(t,e){function r(e){var r=_.c2p(t[e].x),i=w.c2p(t[e].y);return r!==n&&i!==n&&[r,i]}function i(t){var e=t[0]/_._length,r=t[1]/w._length;return(1+10*Math.max(0,-e,e-1,-r,r-1))*A}var a,o,s,l,u,c,h,f,d,p,m,g,v,y,b,x,_=e.xaxis,w=e.yaxis,M=e.simplify,k=e.connectGaps,A=e.baseTolerance,T=e.linear,S=[],E=.2,L=new Array(t.length),C=0;for(M||(A=E=-1),a=0;ai(c))break;s=c,v=p[0]*d[0]+p[1]*d[1],v>m?(m=v,l=c,f=!1):v=t.length||!c)break;L[C++]=c,o=c}}else L[C++]=l}S.push(L.slice(0,C))}return S}},{"../../constants/numerical":666}],989:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],990:[function(t,e,r){"use strict";e.exports=function(t,e,r){for(var n,i,a=null,o=0;o0?Math.max(e,i):0}}},{"fast-isnumeric":116}],992:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults"),o=t("./subtypes");e.exports=function(t,e,r,s,l,u){var c,h=o.isBubble(t),f=(t.line||{}).color;f&&(r=f),l("marker.symbol"),l("marker.opacity",h?.7:1),l("marker.size"),l("marker.color",r),i(t,"marker")&&a(t,e,s,l,{prefix:"marker.",cLetter:"c"}),(u||{}).noLine||(c=f&&!Array.isArray(f)&&e.marker.color!==f?f:h?n.background:n.defaultLine,l("marker.line.color",c),i(t,"marker.line")&&a(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",h?1:0)),h&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode"))}},{"../../components/color":578,"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591,"./subtypes":996}],993:[function(t,e,r){"use strict";function n(t,e){var r;e.selectAll("g.trace").each(function(t){var e=o.select(this);if(r=t[0].trace,r._nexttrace){if(r._nextFill=e.select(".js-fill.js-tonext"),!r._nextFill.size()){var n=":first-child";e.select(".js-fill.js-tozero").size()&&(n+=" + *"),r._nextFill=e.insert("path",n).attr("class","js-fill js-tonext")}}else e.selectAll(".js-fill.js-tonext").remove(),r._nextFill=null;r.fill&&("tozero"===r.fill.substr(0,6)||"toself"===r.fill||"to"===r.fill.substr(0,2)&&!r._prevtrace)?(r._ownFill=e.select(".js-fill.js-tozero"),r._ownFill.size()||(r._ownFill=e.insert("path",":first-child").attr("class","js-fill js-tozero"))):(e.selectAll(".js-fill.js-tozero").remove(),r._ownFill=null)})}function i(t,e,r,n,i,f,p){function m(t){return M?t.transition():t}function g(t){return t.filter(function(t){return t.vis})}function v(t){return t.id}function y(t){if(t.ids)return v}function b(){return!1}function x(t){var e,r,n=t[0].trace,i=o.select(this),a=c.hasMarkers(n),u=c.hasText(n),h=y(n),f=b,d=b;a&&(f=n.marker.maxdisplayed||n._needsCull?g:s.identity),u&&(d=n.marker.maxdisplayed||n._needsCull?g:s.identity),r=i.selectAll("path.point"),e=r.data(f,h);var p=e.enter().append("path").classed("point",!0);p.call(l.pointStyle,n).call(l.translatePoints,k,A,n),M&&p.style("opacity",0).transition().style("opacity",1),e.each(function(t){var e=o.select(this),r=m(e);l.translatePoint(t,r,k,A),l.singlePointStyle(t,r,n),n.customdata&&e.classed("plotly-customdata",null!==t.data&&void 0!==t.data)}),M?e.exit().transition().style("opacity",0).remove():e.exit().remove(),r=i.selectAll("g"),e=r.data(d,h),e.enter().append("g").append("text"),e.each(function(t){var e=m(o.select(this).select("text"));l.translatePoint(t,e,k,A)}),e.selectAll("text").call(l.textPointStyle,n).each(function(t){var e=t.xp||k.c2p(t.x),r=t.yp||A.c2p(t.y);o.select(this).selectAll("tspan.line").each(function(){m(o.select(this)).attr({x:e,y:r})})}),e.exit().remove()}var _,w;a(t,e,r,n,i);var M=!!p&&p.duration>0,k=r.xaxis,A=r.yaxis,T=n[0].trace,S=T.line,E=o.select(f);if(E.call(u.plot,r,p),T.visible===!0){m(E).style("opacity",T.opacity);var L,C,z=T.fill.charAt(T.fill.length-1);"x"!==z&&"y"!==z&&(z=""),n[0].node3=E;var D="",I=[],P=T._prevtrace;P&&(D=P._prevRevpath||"",C=P._nextFill,I=P._polygons);var O,j,R,F,N,B,U,V,H,q="",G="",Y=[],W=[],X=s.noop;if(L=T._ownFill,c.hasLines(T)||"none"!==T.fill){for(C&&C.datum(n),["hv","vh","hvh","vhv"].indexOf(S.shape)!==-1?(R=l.steps(S.shape),F=l.steps(S.shape.split("").reverse().join(""))):R=F="spline"===S.shape?function(t){var e=t[t.length-1];return t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),S.smoothing):l.smoothopen(t,S.smoothing)}:function(t){return"M"+t.join("L")},N=function(t){return F(t.reverse())},Y=h(n,{xaxis:k,yaxis:A,connectGaps:T.connectgaps, +baseTolerance:Math.max(S.width||1,3)/4,linear:"linear"===S.shape,simplify:S.simplify}),H=T._polygons=new Array(Y.length),w=0;w1}),X=function(t){return function(e){if(O=R(e),j=N(e),q?z?(q+="L"+O.substr(1),G=j+"L"+G.substr(1)):(q+="Z"+O,G=j+"Z"+G):(q=O,G=j),c.hasLines(T)&&e.length>1){var r=o.select(this);if(r.datum(n),t)m(r.style("opacity",0).attr("d",O).call(l.lineGroupStyle)).style("opacity",1);else{var i=m(r);i.attr("d",O),l.singleLineStyle(n,i)}}}}}var Z=E.selectAll(".js-line").data(W);m(Z.exit()).style("opacity",0).remove(),Z.each(X(!1)),Z.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(X(!0)),Y.length&&(L?B&&V&&(z?("y"===z?B[1]=V[1]=A.c2p(0,!0):"x"===z&&(B[0]=V[0]=k.c2p(0,!0)),m(L).attr("d","M"+V+"L"+B+"L"+q.substr(1))):m(L).attr("d",q+"Z")):"tonext"===T.fill.substr(0,6)&&q&&D&&("tonext"===T.fill?m(C).attr("d",q+"Z"+D+"Z"):m(C).attr("d",q+"L"+D.substr(1)+"Z"),T._polygons=T._polygons.concat(I)),T._prevRevpath=G,T._prevPolygons=H);var J=E.selectAll(".points");_=J.data([n]),J.each(x),_.enter().append("g").classed("points",!0).each(x),_.exit().remove()}}function a(t,e,r,n,i){var a=r.xaxis,l=r.yaxis,u=o.extent(s.simpleMap(a.range,a.r2c)),h=o.extent(s.simpleMap(l.range,l.r2c)),f=n[0].trace;if(c.hasMarkers(f)){var d=f.marker.maxdisplayed;if(0!==d){var p=n.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=h[0]&&t.y<=h[1]}),m=Math.ceil(p.length/d),g=0;i.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;for(c=p.selectAll("g.trace"),h=c.data(r,function(t){return t[0].trace.uid}),h.enter().append("g").attr("class",function(t){return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),f(t,e,r),n(t,p),l=0,u={};lu[e[0].trace.uid]?1:-1}),g){s&&(d=s());o.transition().duration(a.duration).ease(a.easing).each("end",function(){d&&d()}).each("interrupt",function(){d&&d()}).each(function(){p.selectAll("g.trace").each(function(n,o){i(t,o,e,n,r,this,a)})})}else p.selectAll("g.trace").each(function(n,o){i(t,o,e,n,r,this,a)});m&&h.exit().remove(),p.selectAll("path:not([d])").remove()}},{"../../components/drawing":602,"../../components/errorbars":608,"../../lib":685,"../../lib/polygon":695,"./line_points":988,"./link_traces":990,"./subtypes":996,d3:107}],994:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[],h=s[0].trace,f=h.index,d=h.marker,p=!n.hasMarkers(h)&&!n.hasText(h);if(h.visible===!0&&!p){var m=Array.isArray(d.opacity)?1:d.opacity;if(e===!1)for(r=0;r=0&&(e[1]+=1),t.indexOf("top")>=0&&(e[1]-=1),t.indexOf("left")>=0&&(e[0]-=1),t.indexOf("right")>=0&&(e[0]+=1),e)}function s(t,e){return e(4*t)}function l(t){return M[t]}function u(t,e,r,n,i){var a=null;if(Array.isArray(t)){a=[];for(var o=0;o=0){var f=i(l.position,l.delaunayColor,l.delaunayAxis);f.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(f):(f.gl=o,this.delaunayMesh=g(f),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},A.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},e.exports=f},{"../../constants/gl3d_dashes":663,"../../constants/gl_markers":664,"../../lib":685,"../../lib/gl_format_color":682,"../../lib/str2rgbarray":703,"../scatter/make_bubble_size_func":991,"./calc_errors":1001,"delaunay-triangulate":108,"gl-error3d":146,"gl-line3d":156,"gl-mesh3d":189,"gl-scatter3d":235}],1003:[function(t,e,r){"use strict";function n(t,e,r,n){var a=0,o=r("x"),s=r("y"),l=r("z");return i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),o&&s&&l&&(a=Math.min(o.length,s.length,l.length),a=0&&f("surfacecolor",d||p);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];f(v+".show")&&(f(v+".opacity"),f(v+".scale"))}c(t,e,r,{axis:"z"}),c(t,e,r,{axis:"y",inherit:"z"}),c(t,e,r,{axis:"x",inherit:"z"})}},{"../../components/errorbars/defaults":607,"../../lib":685,"../../registry":802,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":999}],1004:[function(t,e,r){"use strict";var n={};n.plot=t("./convert"),n.attributes=t("./attributes"),n.markerSymbols=t("../../constants/gl_markers"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.moduleType="trace",n.name="scatter3d",n.basePlotModule=t("../../plots/gl3d"),n.categories=["gl3d","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../constants/gl_markers":664,"../../plots/gl3d":767,"../scatter/colorbar":979,"./attributes":999,"./calc":1e3,"./convert":1002,"./defaults":1003}],1005:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/colorscale/color_attributes"),o=t("../../components/colorbar/attributes"),s=t("../../lib/extend").extendFlat,l=n.marker,u=n.line,c=l.line;e.exports={carpet:{valType:"string"},a:{valType:"data_array"},b:{valType:"data_array"},sum:{valType:"number",dflt:0,min:0},mode:s({},n.mode,{dflt:"markers"}),text:s({},n.text,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:s({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing},connectgaps:n.connectgaps,fill:s({},n.fill,{values:["none","toself","tonext"]}),fillcolor:n.fillcolor,marker:s({},{symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:s({},{width:c.width},a("marker".line))},a("marker"),{showscale:l.showscale,colorbar:o}),textfont:n.textfont,textposition:n.textposition,hoverinfo:s({},i.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:n.hoveron}},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1006:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("../../lib"),o=t("../scatter/subtypes"),s=t("../scatter/colorscale_calc"),l=t("../carpet/lookup_carpetid");e.exports=function(t,e){var r=e.carpetTrace=l(t,e);if(r&&r.visible&&"legendonly"!==r.visible){var u;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var c,h,f=e.a.length,d=new Array(f),p=!1;for(u=0;uf&&y.splice(f,y.length-f)}return s(e),void 0!==y&&a.mergeArray(y,d,"ms"),d}}},{"../../lib":685,"../../plots/cartesian/axes":724,"../carpet/lookup_carpetid":858,"../scatter/colorscale_calc":980,"../scatter/subtypes":996,"fast-isnumeric":116}],1007:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../scatter/constants"),a=t("../scatter/subtypes"),o=t("../scatter/marker_defaults"),s=t("../scatter/line_defaults"),l=t("../scatter/line_shape_defaults"),u=t("../scatter/text_defaults"),c=t("../scatter/fillcolor_defaults"),h=t("./attributes");e.exports=function(t,e,r,f){function d(r,i){return n.coerce(t,e,h,r,i)}d("carpet"),e.xaxis="x",e.yaxis="y";var p,m=d("a"),g=d("b");if(!(p=Math.min(m.length,g.length)))return void(e.visible=!1);m&&p0?t.labelprefix:t._hovertitle+": ")+e.toFixed(3)+t.labelsuffix)}var o=n(t,e,r,i);if(o&&o[0].index!==!1){var s=o[0];if(void 0===s.index){var l=1-s.y0/t.ya._length,u=t.xa._length,c=u*l/2,h=u-c;return s.x0=Math.max(Math.min(s.x0,h),c),s.x1=Math.max(Math.min(s.x1,h),c),o}var f=s.cd[s.index];s.a=f.a,s.b=f.b,s.xLabelVal=void 0,s.yLabelVal=void 0;var d=s.trace,p=d._carpet,m=d.hoverinfo.split("+"),g=[];m.indexOf("all")!==-1&&(m=["a","b"]),m.indexOf("a")!==-1&&a(p.aaxis,f.a),m.indexOf("b")!==-1&&a(p.baxis,f.b);var v=p.ab2ij([f.a,f.b]),y=Math.floor(v[0]),b=v[0]-y,x=Math.floor(v[1]),_=v[1]-x,w=p.evalxy([],y,x,b,_);return g.push("y: "+w[1].toFixed(3)),s.extraText=g.join("
"),o}}},{"../scatter/hover":985}],1009:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.moduleType="trace",n.name="scattercarpet",n.basePlotModule=t("../../plots/cartesian"),n.categories=["carpet","symbols","markerColorscale","showLegend","carpetDependent"],n.meta={},e.exports=n},{"../../plots/cartesian":734,"../scatter/colorbar":979,"./attributes":1005,"./calc":1006,"./defaults":1007,"./hover":1008,"./plot":1010,"./select":1011,"./style":1012}],1010:[function(t,e,r){"use strict";var n=t("../scatter/plot"),i=t("../../plots/cartesian/axes");e.exports=function(t,e,r){var a,o,s,l=r[0][0].carpet,u={xaxis:i.getFromId(t,l.xaxis||"x"),yaxis:i.getFromId(t,l.yaxis||"y"),plot:e.plot};for(n(u.graphDiv,u,r),a=0;a")}var i=t("../../plots/cartesian/graph_interact"),a=t("../../plots/cartesian/axes"),o=t("../../constants/numerical").BADNUM,s=t("../scatter/get_trace_color"),l=t("./attributes");e.exports=function(t){function e(t){return h.projection(t)}function r(t){var r=t.lonlat;if(r[0]===o)return 1/0;if(h.isLonLatOverEdges(r))return 1/0;var n=e(r),i=u.c2p(),a=c.c2p(),s=Math.abs(i-n[0]),l=Math.abs(a-n[1]),f=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-f,1-3/f)}var a=t.cd,l=a[0].trace,u=t.xa,c=t.ya,h=t.subplot;if(i.getClosest(a,r,t),t.index!==!1){var f=a[t.index],d=f.lonlat,p=e(d),m=f.mrc||1;return t.x0=p[0]-m,t.x1=p[0]+m,t.y0=p[1]-m,t.y1=p[1]+m,t.loc=f.loc,t.lat=d[0],t.lon=d[1],t.color=s(l,f),t.extraText=n(l,f,h.mockAxis),[t]}}},{"../../constants/numerical":666,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"../scatter/get_trace_color":984,"./attributes":1013}],1018:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="scattergeo",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/geo":752,"../scatter/colorbar":979,"./attributes":1013,"./calc":1014,"./defaults":1015,"./event_data":1016,"./hover":1017,"./plot":1019}],1019:[function(t,e,r){"use strict";function n(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=c(r,e),i=r.locationmode,a=0;a=e.length?i:e[a]);return n}function o(t,e,r){return l(z(t,r),C(e,r),r)}function s(t,e,r,n){var i=w(t,e,n);return i=Array.isArray(i[0])?i:a(g.identity,[i],n),l(i,C(r,n),n)}function l(t,e,r){for(var n=new Array(4*r),i=0;i")}var i=t("../../plots/cartesian/graph_interact"),a=t("../scatter/get_trace_color"),o=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r){function s(t){var e=t.lonlat;if(e[0]===o)return 1/0;var n=Math.abs(c.c2p(e)-c.c2p([p,e[1]])),i=Math.abs(h.c2p(e)-h.c2p([e[0],r])),a=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(n*n+i*i)-a,1-3/a)}var l=t.cd,u=l[0].trace,c=t.xa,h=t.ya,f=e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360),d=360*f,p=e-d;if(i.getClosest(l,s,t),t.index!==!1){var m=l[t.index],g=m.lonlat,v=[g[0]+d,g[1]],y=c.c2p(v),b=h.c2p(v),x=m.mrc||1;return t.x0=y-x,t.x1=y+x,t.y0=b-x,t.y1=b+x,t.color=a(u,m),t.extraText=n(u,m),[t]}}},{"../../constants/numerical":666,"../../plots/cartesian/graph_interact":733,"../scatter/get_trace_color":984}],1029:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("../scattergeo/calc"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.plot=t("./plot"),n.moduleType="trace",n.name="scattermapbox",n.basePlotModule=t("../../plots/mapbox"),n.categories=["mapbox","gl","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/mapbox":781,"../scatter/colorbar":979,"../scattergeo/calc":1014,"./attributes":1024,"./defaults":1026,"./event_data":1027,"./hover":1028,"./plot":1030}],1030:[function(t,e,r){"use strict";function n(t,e){this.mapbox=t,this.map=t.map,this.uid=e,this.idSourceFill=e+"-source-fill",this.idSourceLine=e+"-source-line",this.idSourceCircle=e+"-source-circle",this.idSourceSymbol=e+"-source-symbol",this.idLayerFill=e+"-layer-fill",this.idLayerLine=e+"-layer-line",this.idLayerCircle=e+"-layer-circle",this.idLayerSymbol=e+"-layer-symbol",this.mapbox.initSource(this.idSourceFill),this.mapbox.initSource(this.idSourceLine),this.mapbox.initSource(this.idSourceCircle),this.mapbox.initSource(this.idSourceSymbol),this.map.addLayer({id:this.idLayerFill,source:this.idSourceFill,type:"fill"}),this.map.addLayer({id:this.idLayerLine,source:this.idSourceLine,type:"line"}),this.map.addLayer({id:this.idLayerCircle,source:this.idSourceCircle,type:"circle"}),this.map.addLayer({id:this.idLayerSymbol,source:this.idSourceSymbol,type:"symbol"})}function i(t){return"visible"===t.layout.visibility}var a=t("./convert"),o=n.prototype;o.update=function(t){var e=this.mapbox,r=a(t);e.setOptions(this.idLayerFill,"setLayoutProperty",r.fill.layout),e.setOptions(this.idLayerLine,"setLayoutProperty",r.line.layout),e.setOptions(this.idLayerCircle,"setLayoutProperty",r.circle.layout),e.setOptions(this.idLayerSymbol,"setLayoutProperty",r.symbol.layout),i(r.fill)&&(e.setSourceData(this.idSourceFill,r.fill.geojson),e.setOptions(this.idLayerFill,"setPaintProperty",r.fill.paint)),i(r.line)&&(e.setSourceData(this.idSourceLine,r.line.geojson),e.setOptions(this.idLayerLine,"setPaintProperty",r.line.paint)),i(r.circle)&&(e.setSourceData(this.idSourceCircle,r.circle.geojson),e.setOptions(this.idLayerCircle,"setPaintProperty",r.circle.paint)),i(r.symbol)&&(e.setSourceData(this.idSourceSymbol,r.symbol.geojson),e.setOptions(this.idLayerSymbol,"setPaintProperty",r.symbol.paint))},o.dispose=function(){var t=this.map;t.removeLayer(this.idLayerFill),t.removeLayer(this.idLayerLine),t.removeLayer(this.idLayerCircle),t.removeLayer(this.idLayerSymbol),t.removeSource(this.idSourceFill),t.removeSource(this.idSourceLine),t.removeSource(this.idSourceCircle),t.removeSource(this.idSourceSymbol)},e.exports=function(t,e){var r=e[0].trace,i=new n(t,r.uid);return i.update(e),i}},{"./convert":1025}],1031:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/colorscale/color_attributes"),o=t("../../components/colorbar/attributes"),s=t("../../components/drawing/attributes").dash,l=t("../../lib/extend").extendFlat,u=n.marker,c=n.line,h=u.line;e.exports={a:{valType:"data_array"},b:{valType:"data_array"},c:{valType:"data_array"},sum:{valType:"number",dflt:0,min:0},mode:l({},n.mode,{dflt:"markers"}),text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),line:{color:c.color,width:c.width,dash:s,shape:l({},c.shape,{values:["linear","spline"]}),smoothing:c.smoothing},connectgaps:n.connectgaps,fill:l({},n.fill,{values:["none","toself","tonext"]}),fillcolor:n.fillcolor,marker:l({},{symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:l({},{width:h.width},a("marker".line))},a("marker"),{showscale:u.showscale,colorbar:o}),textfont:n.textfont,textposition:n.textposition,hoverinfo:l({},i.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:n.hoveron}},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/drawing/attributes":601,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1032:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("../scatter/subtypes"),o=t("../scatter/colorscale_calc"),s=t("../scatter/arrays_to_calcdata"),l=["a","b","c"],u={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,c,h,f,d,p,m=t._fullLayout[e.subplot],g=m.sum,v=e.sum||g;for(r=0;rk&&S.splice(k,S.length-k)}return o(e),s(A,e),A}},{"../../plots/cartesian/axes":724,"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980,"../scatter/subtypes":996,"fast-isnumeric":116}],1033:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../scatter/constants"),a=t("../scatter/subtypes"),o=t("../scatter/marker_defaults"),s=t("../scatter/line_defaults"),l=t("../scatter/line_shape_defaults"),u=t("../scatter/text_defaults"),c=t("../scatter/fillcolor_defaults"),h=t("./attributes");e.exports=function(t,e,r,f){function d(r,i){return n.coerce(t,e,h,r,i)}var p,m=d("a"),g=d("b"),v=d("c");if(m?(p=m.length,g?(p=Math.min(p,g.length),v&&(p=Math.min(p,v.length))):p=v?Math.min(p,v.length):0):g&&v&&(p=Math.min(g.length,v.length)),!p)return void(e.visible=!1);m&&p"),s}}},{"../../plots/cartesian/axes":724,"../scatter/hover":985}],1035:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.moduleType="trace",n.name="scatterternary",n.basePlotModule=t("../../plots/ternary"),n.categories=["ternary","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/ternary":795,"../scatter/colorbar":979,"./attributes":1031,"./calc":1032,"./defaults":1033,"./hover":1034,"./plot":1036,"./select":1037,"./style":1038}],1036:[function(t,e,r){"use strict";var n=t("../scatter/plot");e.exports=function(t,e){var r=t.plotContainer;r.select(".scatterlayer").selectAll("*").remove();for(var i={xaxis:t.xaxis,yaxis:t.yaxis,plot:r},a=0;a":return function(t){return u(t)>i};case">=":return function(t){return u(t)>=i};case"[]":return function(t){var e=u(t);return e>=i[0]&&e<=i[1]};case"()":return function(t){var e=u(t);return e>i[0]&&e=i[0]&&ei[0]&&e<=i[1]};case"][":return function(t){var e=u(t);return e<=i[0]||e>=i[1]};case")(":return function(t){var e=u(t);return ei[1]};case"](":return function(t){var e=u(t);return e<=i[0]||e>i[1]};case")[":return function(t){var e=u(t);return e=i[1]};case"{}":return function(t){return i.indexOf(u(t))!==-1};case"}{":return function(t){return i.indexOf(u(t))===-1}}}var o=t("../lib"),s=t("../registry"),l=t("../plot_api/plot_schema"),u=t("../plots/cartesian/axis_ids"),c=t("../plots/cartesian/axis_autotype"),h=t("../plots/cartesian/set_convert"),f=["=","<",">=",">","<="],d=["[]","()","[)","(]","][",")(","](",")["],p=["{}","}{"];r.moduleType="transform",r.name="filter",r.attributes={enabled:{valType:"boolean",dflt:!0},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x"},operation:{valType:"enumerated",values:[].concat(f).concat(d).concat(p),dflt:"="},value:{valType:"any",dflt:0}},r.supplyDefaults=function(t){function e(e,i){return o.coerce(t,n,r.attributes,e,i)}var n={};if(e("enabled")){e("operation"),e("value"),e("target");var i=s.getComponentMethod("calendars","handleDefaults");i(t,n,"valuecalendar",null),i(t,n,"targetcalendar",null)}return n},r.calcTransform=function(t,e,r){if(r.enabled){var s=r.target,u=n(e,s),c=u.length;if(c){var h=r.targetcalendar;if("string"==typeof s){var f=o.nestedProperty(e,s+"calendar").get();f&&(h=f)}for(var d="x"===s||"y"===s||"z"===s?s:u,p=i(t,e,d),m=a(r,p,h),g=l.findArrayAttributes(e),v={},y=0;y Date: Fri, 28 Apr 2017 21:05:13 +0200 Subject: [PATCH 04/26] removed colorbar leftover --- src/traces/parcoords/colorbar.js | 52 -------------------------------- src/traces/parcoords/index.js | 1 - 2 files changed, 53 deletions(-) delete mode 100644 src/traces/parcoords/colorbar.js diff --git a/src/traces/parcoords/colorbar.js b/src/traces/parcoords/colorbar.js deleted file mode 100644 index c20fcb428af..00000000000 --- a/src/traces/parcoords/colorbar.js +++ /dev/null @@ -1,52 +0,0 @@ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var isNumeric = require('fast-isnumeric'); - -var Lib = require('../../lib'); -var Plots = require('../../plots/plots'); -var Colorscale = require('../../components/colorscale'); -var drawColorbar = require('../../components/colorbar/draw'); - - -module.exports = function colorbar(gd, cd) { - var trace = cd[0].trace, - line = trace.line, - cbId = 'cb' + trace.uid; - - gd._fullLayout._infolayer.selectAll('.' + cbId).remove(); - - if((line === undefined) || !line.showscale) { - Plots.autoMargin(gd, cbId); - return; - } - - var vals = line.color, - cmin = line.cmin, - cmax = line.cmax; - - if(!isNumeric(cmin)) cmin = Lib.aggNums(Math.min, null, vals); - if(!isNumeric(cmax)) cmax = Lib.aggNums(Math.max, null, vals); - - var cb = cd[0].t.cb = drawColorbar(gd, cbId); - var sclFunc = Colorscale.makeColorScaleFunc( - Colorscale.extractScale( - line.colorscale, - cmin, - cmax - ), - { noNumericCheck: true } - ); - - cb.fillcolor(sclFunc) - .filllevels({start: cmin, end: cmax, size: (cmax - cmin) / 254}) - .options(line.colorbar)(); -}; diff --git a/src/traces/parcoords/index.js b/src/traces/parcoords/index.js index 920cec76473..72bddac33ab 100644 --- a/src/traces/parcoords/index.js +++ b/src/traces/parcoords/index.js @@ -14,7 +14,6 @@ Parcoords.attributes = require('./attributes'); Parcoords.supplyDefaults = require('./defaults'); Parcoords.calc = require('./calc'); Parcoords.plot = require('./plot'); -Parcoords.colorbar = require('./colorbar'); Parcoords.moduleType = 'trace'; Parcoords.name = 'parcoords'; From dec701a50b2a1f9161dc6551faa129066ed63426 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Fri, 28 Apr 2017 21:12:35 +0200 Subject: [PATCH 05/26] unit shown in attribute doc --- src/traces/sankey/attributes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/traces/sankey/attributes.js b/src/traces/sankey/attributes.js index 2aa588a4329..3345cabc7c8 100644 --- a/src/traces/sankey/attributes.js +++ b/src/traces/sankey/attributes.js @@ -68,7 +68,7 @@ module.exports = { min: 1, dflt: 20, role: 'style', - description: 'Sets the thickness of the `nodes`.' + description: 'Sets the thickness (in px) of the `nodes`.' }, valueformat: { From 1fb7cbd69c3ddb5703ad35e21cf7b864c0e339a3 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Mon, 1 May 2017 10:06:26 +0200 Subject: [PATCH 06/26] removed vestigial attribs --- src/traces/sankey/attributes.js | 14 -------------- src/traces/sankey/defaults.js | 2 -- 2 files changed, 16 deletions(-) diff --git a/src/traces/sankey/attributes.js b/src/traces/sankey/attributes.js index 3345cabc7c8..90fbbc54651 100644 --- a/src/traces/sankey/attributes.js +++ b/src/traces/sankey/attributes.js @@ -116,20 +116,6 @@ module.exports = { role: 'info', description: 'The shown name of the node.' }, - parallel: { - valType: 'number', - role: 'style', - min: 0, - max: 1, - description: 'Node position parallel to the flow, e.g. left/right if `orientation` is `horizontal`.' - }, - perpendicular: { - valType: 'number', - role: 'style', - min: 0, - max: 1, - description: 'Node position perpendicular to the flow, e.g. up/down if `orientation` is `horizontal`.' - }, visible: shapeAttrs.visible, color: extendFlat({}, shapeAttrs.fillcolor, { dflt: 'rgb(0,255,0,0.5)' diff --git a/src/traces/sankey/defaults.js b/src/traces/sankey/defaults.js index b31a45460ad..39feff978a1 100644 --- a/src/traces/sankey/defaults.js +++ b/src/traces/sankey/defaults.js @@ -90,8 +90,6 @@ function nodesDefaults(traceIn, traceOut) { if(visible) { coerce('label'); - coerce('parallel'); - coerce('perpendicular'); if(nodeIn.color) { coerce('color'); } else { From 426b50ddb76c55a3a28190be66e032beba5f95ee Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Mon, 1 May 2017 11:05:42 +0200 Subject: [PATCH 07/26] flipping attrib representation to columnar --- src/traces/sankey/attributes.js | 21 +- src/traces/sankey/defaults.js | 136 ++----- src/traces/sankey/plot.js | 15 +- src/traces/sankey/render.js | 41 ++- test/image/mocks/energy.json | 582 +++++++++++++++++++++++------- test/image/mocks/energy_dark.json | 548 ++++++++++++++++++++-------- 6 files changed, 940 insertions(+), 403 deletions(-) diff --git a/src/traces/sankey/attributes.js b/src/traces/sankey/attributes.js index 90fbbc54651..2f35b0445e8 100644 --- a/src/traces/sankey/attributes.js +++ b/src/traces/sankey/attributes.js @@ -108,43 +108,40 @@ module.exports = { textfont: fontAttrs, - nodes: { - _isLinkedToArray: 'node', + node: { label: { - valType: 'string', + valType: 'data_array', dflt: '', role: 'info', description: 'The shown name of the node.' }, - visible: shapeAttrs.visible, color: extendFlat({}, shapeAttrs.fillcolor, { + arrayOk: true, dflt: 'rgb(0,255,0,0.5)' }), description: 'The nodes of the Sankey plot.' }, - links: { - _isLinkedToArray: 'link', + link: { label: { - valType: 'string', + valType: 'data_array', dflt: '', role: 'info', description: 'The shown name of the link.' }, - visible: shapeAttrs.visible, - color: extendFlat({}, shapeAttrs.fillcolor, {dflt: 'rgba(0,0,0,0.2)'}), + color: extendFlat({}, shapeAttrs.fillcolor, {arrayOk: true, dflt: 'rgba(0,0,0,0.2)'}), source: { - valType: 'number', + valType: 'data_array', role: 'info', description: 'An integer number `[0..nodes.length - 1]` that represents the source node.' }, target: { - valType: 'number', + valType: 'data_array', role: 'info', description: 'An integer number `[0..nodes.length - 1]` that represents the target node.' }, value: { - valType: 'number', + valType: 'data_array', dflt: 1, role: 'info', description: 'A numeric value representing the flow volume value.' diff --git a/src/traces/sankey/defaults.js b/src/traces/sankey/defaults.js index 39feff978a1..af0732f0e86 100644 --- a/src/traces/sankey/defaults.js +++ b/src/traces/sankey/defaults.js @@ -14,111 +14,34 @@ var colors = require('../../components/color/attributes').defaults; var Color = require('../../components/color'); var tinycolor = require('tinycolor2'); -function linksDefaults(traceIn, traceOut, layout) { - var linksIn = traceIn.links || [], - linksOut = traceOut.links = []; - - var linkIn, linkOut, i; - - function coerce(attr, dflt) { - return Lib.coerce(linkIn, linkOut, attributes.links, attr, dflt); - } - - for(i = 0; i < linksIn.length; i++) { - linkIn = linksIn[i]; - linkOut = {}; - - if(!Lib.isPlainObject(linkIn)) { - continue; - } - - var visible = coerce('visible'); - - if(visible) { - coerce('label'); - coerce('value'); - coerce('source'); - coerce('target'); - if(tinycolor(layout.paper_bgcolor).getLuminance() < 0.333) { - coerce('color', 'rgba(255, 255, 255, 0.6)'); - } else { - coerce('color', 'rgba(0, 0, 0, 0.2)'); - } - } - - linkOut._index = i; - linksOut.push(linkOut); - } +function circularityPresent() { + return false; } -function nodesDefaults(traceIn, traceOut) { - var nodesIn = traceIn.nodes || [], - nodesOut = traceOut.nodes = []; - - var nodeIn, nodeOut, i, j, link, foundUse, visible, - usedNodeCount = 0, - indexMap = []; - - var defaultPalette = function(i) {return colors[i % colors.length];}; +module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { function coerce(attr, dflt) { - return Lib.coerce(nodeIn, nodeOut, attributes.nodes, attr, dflt); + return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); } - for(i = 0; i < nodesIn.length; i++) { - nodeIn = nodesIn[i]; - - foundUse = false; - for(j = 0; j < traceOut.links.length && !foundUse; j++) { - link = traceOut.links[j]; - foundUse = link.source === i || link.target === i; - } - - indexMap.push(foundUse ? usedNodeCount : null); - - if(!foundUse) { - continue; - } + coerce('node.label'); - if(!Lib.isPlainObject(nodeIn)) { - continue; - } + var defaultNodePalette = function(i) {return colors[i % colors.length];}; - nodeOut = {}; + coerce('node.color', traceIn.node.label.map(function(d, i) { + return Color.addOpacity(defaultNodePalette(i), 0.8); + })); - visible = coerce('visible'); + coerce('link.label'); + coerce('link.source'); + coerce('link.target'); + coerce('link.value'); - if(visible) { - coerce('label'); - if(nodeIn.color) { - coerce('color'); - } else { - coerce('color', Color.addOpacity(defaultPalette(i), 0.8)); - } - } - - nodeOut._index = usedNodeCount; - nodesOut.push(nodeOut); - usedNodeCount++; - } - - // since nodes were removed, update indices to nodes in links to reflect new reality - for(j = 0; j < traceOut.links.length; j++) { - link = traceOut.links[j]; - link.source = indexMap[link.source]; - link.target = indexMap[link.target]; - } - - return nodesOut; -} - -module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { - function coerce(attr, dflt) { - return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); - } - - linksDefaults(traceIn, traceOut, layout); - nodesDefaults(traceIn, traceOut); + coerce('link.color', traceIn.link.value.map(function() { + return tinycolor(layout.paper_bgcolor).getLuminance() < 0.333 ? + 'rgba(255, 255, 255, 0.6)' : + 'rgba(0, 0, 0, 0.2)'; + })); coerce('hoverinfo', layout._dataLength === 1 ? 'label+text+value+percent' : undefined); @@ -131,7 +54,24 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('valuesuffix'); coerce('arrangement'); - // Prefer Sankey-specific font spec e.g. with smaller default size - var sankeyFontSpec = Lib.coerceFont(coerce, 'textfont'); - Lib.coerceFont(coerce, 'textfont', Lib.extendFlat({}, layout.font, sankeyFontSpec)); + Lib.coerceFont(coerce, 'textfont', Lib.extendFlat({}, layout.font)); + + var missing = function(n, i) { + return traceIn.link.source.indexOf(i) === -1 && + traceIn.link.target.indexOf(i) === -1; + }; + if(traceIn.node.label.some(missing)) { + Lib.log('Some of the nodes are neither sources nor targets, please remove them.'); + } + + if(circularityPresent(traceIn.link.source, traceIn.link.target)) { + Lib.log('Circularity is present in the Sankey data. Removing all nodes and links.'); + traceOut.link.label = []; + traceOut.link.source = []; + traceOut.link.target = []; + traceOut.link.value = []; + traceOut.link.color = []; + traceOut.node.label = []; + traceOut.node.color = []; + } }; diff --git a/src/traces/sankey/plot.js b/src/traces/sankey/plot.js index be5f1c1fdda..0ab31f86936 100644 --- a/src/traces/sankey/plot.js +++ b/src/traces/sankey/plot.js @@ -171,23 +171,11 @@ module.exports = function plot(gd, calcData) { Fx.click(gd, { target: true }); }; - var repositioned = function(d, nodes) { - var n, nOrig; - var names = gd.data[0].nodes.map(function(nn) {return nn.label;}); - for(var i = 0; i < nodes.length; i++) { - n = nodes[i]; - nOrig = gd.data[d.traceId].nodes[names.indexOf(n.label)]; - nOrig.parallel = (n.x - n.dx / 2) / n.width; - nOrig.perpendicular = (n.y - n.dy / 2) / n.height; - } - }; - var nodeHover = function(element, d, sankey) { d3.select(element).call(nodeHoveredStyle, d, sankey); Fx.hover(gd, d.node, 'sankey'); }; - var nodeHoverFollow = function(element, d) { var nodeRect = d3.select(element).select('.nodeRect'); @@ -252,8 +240,7 @@ module.exports = function plot(gd, calcData) { hover: nodeHover, follow: nodeHoverFollow, unhover: nodeUnhover, - select: nodeSelect, - repositioned: repositioned + select: nodeSelect } } ); diff --git a/src/traces/sankey/render.js b/src/traces/sankey/render.js index 30b00eb60d1..8e3b5e3fb5c 100644 --- a/src/traces/sankey/render.js +++ b/src/traces/sankey/render.js @@ -15,13 +15,13 @@ var Color = require('../../components/color'); var Drawing = require('../../components/drawing'); var d3sankey = require('@monfera/d3-sankey').sankey; var d3Force = require('d3-force'); +var Lib = require('../../lib'); // basic data utilities function keyFun(d) {return d.key;} function repeat(d) {return [d];} // d3 data binding convention function unwrap(d) {return d[0];} // plotly data structure convention -// function visible(nodeOrLink) {return !('visible' in nodeOrLink) || nodeOrLink.visible;} function persistOriginalPlace(nodes) { var i, distinctLayerPositions = []; @@ -68,8 +68,8 @@ function sankeyModel(layout, d, i) { var trace = unwrap(d).trace, domain = trace.domain, - nodes = trace.nodes, - links = trace.links, + nodeSpec = trace.node, + linkSpec = trace.link, arrangement = trace.arrangement, horizontal = trace.orientation === 'h', nodePad = trace.nodepad, @@ -81,6 +81,23 @@ function sankeyModel(layout, d, i) { var width = layout.width * (domain.x[1] - domain.x[0]), height = layout.height * (domain.y[1] - domain.y[0]); + var nodes = nodeSpec.label.map(function(l, i) { + return { + label: l, + color: Lib.isArray(nodeSpec.color) ? nodeSpec.color[i] : nodeSpec.color + }; + }); + + var links = linkSpec.value.map(function(d, i) { + return { + label: linkSpec.label[i], + color: Lib.isArray(linkSpec.color) ? linkSpec.color[i] : linkSpec.color, + source: linkSpec.source[i], + target: linkSpec.target[i], + value: d + }; + }); + var sankey = d3sankey() .size(horizontal ? [width, height] : [height, width]) .nodeWidth(nodeThickness) @@ -266,8 +283,6 @@ function attachPointerEvents(selection, sankey, eventSet) { function attachDragHandler(sankeyNode, sankeyLink, callbacks) { - var repositionedCallback = callbacks.nodeEvents.repositioned; - var dragBehavior = d3.behavior.drag() .origin(function(d) {return d.horizontal ? d.node : {x: d.node.y, y: d.node.x};}) @@ -286,7 +301,7 @@ function attachDragHandler(sankeyNode, sankeyLink, callbacks) { if(d.forceLayouts[forceKey]) { d.forceLayouts[forceKey].alpha(1); } else { // make a forceLayout iff needed - attachForce(sankeyNode, forceKey, repositionedCallback, d); + attachForce(sankeyNode, forceKey, d); } startForce(sankeyNode, sankeyLink, d, forceKey); } @@ -314,9 +329,6 @@ function attachDragHandler(sankeyNode, sankeyLink, callbacks) { }) .on('dragend', function(d) { - if(d.arrangement !== 'snap') { - repositionedCallback(d, [d.node]); - } d.interactionState.dragInProgress = false; }); @@ -325,7 +337,7 @@ function attachDragHandler(sankeyNode, sankeyLink, callbacks) { .call(dragBehavior); } -function attachForce(sankeyNode, forceKey, repositionedCallback, d) { +function attachForce(sankeyNode, forceKey, d) { var nodes = d.sankey.nodes().filter(function(n) {return n.originalX === d.node.originalX;}); d.forceLayouts[forceKey] = d3Force.forceSimulation(nodes) .alphaDecay(0) @@ -333,7 +345,7 @@ function attachForce(sankeyNode, forceKey, repositionedCallback, d) { .radius(function(n) {return n.dy / 2 + d.nodePad / 2;}) .strength(1) .iterations(c.forceIterations)) - .force('constrain', snappingForce(sankeyNode, forceKey, nodes, repositionedCallback, d)) + .force('constrain', snappingForce(sankeyNode, forceKey, nodes, d)) .stop(); } @@ -350,7 +362,7 @@ function startForce(sankeyNode, sankeyLink, d, forceKey) { }); } -function snappingForce(sankeyNode, forceKey, nodes, repositionedCallback, d) { +function snappingForce(sankeyNode, forceKey, nodes, d) { return function _snappingForce() { var maxVelocity = 0; for(var i = 0; i < nodes.length; i++) { @@ -368,7 +380,6 @@ function snappingForce(sankeyNode, forceKey, nodes, repositionedCallback, d) { d.forceLayouts[forceKey].alpha(0); window.setTimeout(function() { sankeyNode.call(crispLinesOnEnd); - repositionedCallback(d, nodes); }, 30); // geome on move, crisp when static } }; @@ -416,7 +427,7 @@ module.exports = function(svg, styledData, layout, callbacks) { .data(function(d) { var uniqueKeys = {}; return d.sankey.links() - .filter(function(l) {return l.visible && l.value;}) + .filter(function(l) {return l.value;}) .map(linkModel.bind(null, uniqueKeys, d)); }, keyFun); @@ -464,7 +475,7 @@ module.exports = function(svg, styledData, layout, callbacks) { var uniqueKeys = {}; persistOriginalPlace(nodes); return nodes - .filter(function(n) {return n.visible && n.value;}) + .filter(function(n) {return n.value;}) .map(nodeModel.bind(null, uniqueKeys, d)); }, keyFun); diff --git a/test/image/mocks/energy.json b/test/image/mocks/energy.json index e707a37123c..439130d40cf 100644 --- a/test/image/mocks/energy.json +++ b/test/image/mocks/energy.json @@ -17,129 +17,465 @@ "nodethickness": 15, "valueformat": ".0f", "valuesuffix": "TWh", - "nodes": [ - {"label":"Agricultural 'waste'"}, - {"label":"Bio-conversion"}, - {"label":"Liquid"}, - {"label":"Losses"}, - {"label":"Solid"}, - {"label":"Gas"}, - {"label":"Biofuel imports"}, - {"label":"Biomass imports"}, - {"label":"Coal imports"}, - {"label":"Coal"}, - {"label":"Coal reserves"}, - {"label":"District heating"}, - {"label":"Industry"}, - {"label":"Heating and cooling - commercial"}, - {"label":"Heating and cooling - homes"}, - {"label":"Electricity grid"}, - {"label":"Over generation / exports"}, - {"label":"H2 conversion"}, - {"label":"Road transport"}, - {"label":"Agriculture"}, - {"label":"Rail transport"}, - {"label":"Lighting & appliances - commercial"}, - {"label":"Lighting & appliances - homes"}, - {"label":"Gas imports"}, - {"label":"Ngas"}, - {"label":"Gas reserves"}, - {"label":"Thermal generation"}, - {"label":"Geothermal"}, - {"label":"H2"}, - {"label":"Hydro"}, - {"label":"International shipping"}, - {"label":"Domestic aviation"}, - {"label":"International aviation"}, - {"label":"National navigation"}, - {"label":"Marine algae"}, - {"label":"Nuclear"}, - {"label":"Oil imports"}, - {"label":"Oil"}, - {"label":"Oil reserves"}, - {"label":"Other waste"}, - {"label":"Pumped heat"}, - {"label":"Solar PV"}, - {"label":"Solar Thermal"}, - {"label":"Solar"}, - {"label":"Tidal"}, - {"label":"UK land based bioenergy"}, - {"label":"Wave"}, - {"label":"Wind"} - ], - "links": [ - {"source":0,"target":1,"value":124.729, "label": "stream 1"}, - {"source":1,"target":2,"value":0.597}, - {"source":1,"target":3,"value":26.862}, - {"source":1,"target":4,"value":280.322}, - {"source":1,"target":5,"value":81.144, "label": "stream 1"}, - {"source":6,"target":2,"value":35}, - {"source":7,"target":4,"value":35}, - {"source":8,"target":9,"value":11.606}, - {"source":10,"target":9,"value":63.965}, - {"source":9,"target":4,"value":75.571}, - {"source":11,"target":12,"value":10.639}, - {"source":11,"target":13,"value":22.505}, - {"source":11,"target":14,"value":46.184}, - {"source":15,"target":16,"value":104.453}, - {"source":15,"target":14,"value":113.726}, - {"source":15,"target":17,"value":27.14}, - {"source":15,"target":12,"value":342.165}, - {"source":15,"target":18,"value":37.797}, - {"source":15,"target":19,"value":4.412}, - {"source":15,"target":13,"value":40.858}, - {"source":15,"target":3,"value":56.691}, - {"source":15,"target":20,"value":7.863}, - {"source":15,"target":21,"value":90.008}, - {"source":15,"target":22,"value":93.494}, - {"source":23,"target":24,"value":40.719}, - {"source":25,"target":24,"value":82.233}, - {"source":5,"target":13,"value":0.129}, - {"source":5,"target":3,"value":1.401}, - {"source":5,"target":26,"value":151.891}, - {"source":5,"target":19,"value":2.096}, - {"source":5,"target":12,"value":48.58, "label": "stream 1"}, - {"source":27,"target":15,"value":7.013}, - {"source":17,"target":28,"value":20.897}, - {"source":17,"target":3,"value":6.242}, - {"source":28,"target":18,"value":20.897}, - {"source":29,"target":15,"value":6.995}, - {"source":2,"target":12,"value":121.066}, - {"source":2,"target":30,"value":128.69}, - {"source":2,"target":18,"value":135.835}, - {"source":2,"target":31,"value":14.458}, - {"source":2,"target":32,"value":206.267}, - {"source":2,"target":19,"value":3.64}, - {"source":2,"target":33,"value":33.218}, - {"source":2,"target":20,"value":4.413}, - {"source":34,"target":1,"value":14.375}, - {"source":24,"target":5,"value":122.952}, - {"source":35,"target":26,"value":500,"color":"rgba(33,102,172,0.35)","label":"Old generation plant (made-up)"}, - {"source":35,"target":26,"value":339.978,"color":"rgba(178,24,43,0.35)","label":"New generation plant (made-up)"}, - {"source":36,"target":37,"value":504.287}, - {"source":38,"target":37,"value":107.703}, - {"source":37,"target":2,"value":611.99}, - {"source":39,"target":4,"value":56.587}, - {"source":39,"target":1,"value":77.81}, - {"source":40,"target":14,"value":193.026}, - {"source":40,"target":13,"value":70.672}, - {"source":41,"target":15,"value":59.901}, - {"source":42,"target":14,"value":19.263}, - {"source":43,"target":42,"value":19.263}, - {"source":43,"target":41,"value":59.901}, - {"source":4,"target":19,"value":0.882}, - {"source":4,"target":26,"value":400.12}, - {"source":4,"target":12,"value":46.477}, - {"source":26,"target":15,"value":525.531}, - {"source":26,"target":3,"value":787.129}, - {"source":26,"target":11,"value":79.329}, - {"source":44,"target":15,"value":9.452}, - {"source":45,"target":1,"value":182.01}, - {"source":46,"target":15,"value":19.013}, - {"source":47,"target":15,"value":289.366} - ] - } - ], + "node": { + "label": [ + "Agricultural 'waste'", + "Bio-conversion", + "Liquid", + "Losses", + "Solid", + "Gas", + "Biofuel imports", + "Biomass imports", + "Coal imports", + "Coal", + "Coal reserves", + "District heating", + "Industry", + "Heating and cooling - commercial", + "Heating and cooling - homes", + "Electricity grid", + "Over generation / exports", + "H2 conversion", + "Road transport", + "Agriculture", + "Rail transport", + "Lighting & appliances - commercial", + "Lighting & appliances - homes", + "Gas imports", + "Ngas", + "Gas reserves", + "Thermal generation", + "Geothermal", + "H2", + "Hydro", + "International shipping", + "Domestic aviation", + "International aviation", + "National navigation", + "Marine algae", + "Nuclear", + "Oil imports", + "Oil", + "Oil reserves", + "Other waste", + "Pumped heat", + "Solar PV", + "Solar Thermal", + "Solar", + "Tidal", + "UK land based bioenergy", + "Wave", + "Wind" + ], + "color": [ + "rgba(31, 119, 180, 0.8)", + "rgba(255, 127, 14, 0.8)", + "rgba(44, 160, 44, 0.8)", + "rgba(214, 39, 40, 0.8)", + "rgba(148, 103, 189, 0.8)", + "rgba(140, 86, 75, 0.8)", + "rgba(227, 119, 194, 0.8)", + "rgba(127, 127, 127, 0.8)", + "rgba(188, 189, 34, 0.8)", + "rgba(23, 190, 207, 0.8)", + "rgba(31, 119, 180, 0.8)", + "rgba(255, 127, 14, 0.8)", + "rgba(44, 160, 44, 0.8)", + "rgba(214, 39, 40, 0.8)", + "rgba(148, 103, 189, 0.8)", + "rgba(140, 86, 75, 0.8)", + "rgba(227, 119, 194, 0.8)", + "rgba(127, 127, 127, 0.8)", + "rgba(188, 189, 34, 0.8)", + "rgba(23, 190, 207, 0.8)", + "rgba(31, 119, 180, 0.8)", + "rgba(255, 127, 14, 0.8)", + "rgba(44, 160, 44, 0.8)", + "rgba(214, 39, 40, 0.8)", + "rgba(148, 103, 189, 0.8)", + "rgba(140, 86, 75, 0.8)", + "rgba(227, 119, 194, 0.8)", + "rgba(127, 127, 127, 0.8)", + "rgba(188, 189, 34, 0.8)", + "rgba(23, 190, 207, 0.8)", + "rgba(31, 119, 180, 0.8)", + "rgba(255, 127, 14, 0.8)", + "rgba(44, 160, 44, 0.8)", + "rgba(214, 39, 40, 0.8)", + "rgba(148, 103, 189, 0.8)", + "magenta", + "rgba(227, 119, 194, 0.8)", + "rgba(127, 127, 127, 0.8)", + "rgba(188, 189, 34, 0.8)", + "rgba(23, 190, 207, 0.8)", + "rgba(31, 119, 180, 0.8)", + "rgba(255, 127, 14, 0.8)", + "rgba(44, 160, 44, 0.8)", + "rgba(214, 39, 40, 0.8)", + "rgba(148, 103, 189, 0.8)", + "rgba(140, 86, 75, 0.8)", + "rgba(227, 119, 194, 0.8)", + "rgba(127, 127, 127, 0.8)"] + }, + "link": { + "source": [ + 0, + 1, + 1, + 1, + 1, + 6, + 7, + 8, + 10, + 9, + 11, + 11, + 11, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 23, + 25, + 5, + 5, + 5, + 5, + 5, + 27, + 17, + 17, + 28, + 29, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 34, + 24, + 35, + 35, + 36, + 38, + 37, + 39, + 39, + 40, + 40, + 41, + 42, + 43, + 43, + 4, + 4, + 4, + 26, + 26, + 26, + 44, + 45, + 46, + 47 + ], + "target": [ + 1, + 2, + 3, + 4, + 5, + 2, + 4, + 9, + 9, + 4, + 12, + 13, + 14, + 16, + 14, + 17, + 12, + 18, + 19, + 13, + 3, + 20, + 21, + 22, + 24, + 24, + 13, + 3, + 26, + 19, + 12, + 15, + 28, + 3, + 18, + 15, + 12, + 30, + 18, + 31, + 32, + 19, + 33, + 20, + 1, + 5, + 26, + 26, + 37, + 37, + 2, + 4, + 1, + 14, + 13, + 15, + 14, + 42, + 41, + 19, + 26, + 12, + 15, + 3, + 11, + 15, + 1, + 15, + 15 + ], + "value": [ + 124.729, + 0.597, + 26.862, + 280.322, + 81.144, + 35, + 35, + 11.606, + 63.965, + 75.571, + 10.639, + 22.505, + 46.184, + 104.453, + 113.726, + 27.14, + 342.165, + 37.797, + 4.412, + 40.858, + 56.691, + 7.863, + 90.008, + 93.494, + 40.719, + 82.233, + 0.129, + 1.401, + 151.891, + 2.096, + 48.58, + 7.013, + 20.897, + 6.242, + 20.897, + 6.995, + 121.066, + 128.69, + 135.835, + 14.458, + 206.267, + 3.64, + 33.218, + 4.413, + 14.375, + 122.952, + 500, + 339.978, + 504.287, + 107.703, + 611.99, + 56.587, + 77.81, + 193.026, + 70.672, + 59.901, + 19.263, + 19.263, + 59.901, + 0.882, + 400.12, + 46.477, + 525.531, + 787.129, + 79.329, + 9.452, + 182.01, + 19.013, + 289.366 + ], + "color": [ + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(33,102,172,0.35)", + "rgba(178,24,43,0.35)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)", + "rgba(0,0,96,0.2)" + ], + "label": [ + "stream 1", + "", + "", + "", + "stream 1", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "stream 1", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "Old generation plant (made-up)", + "New generation plant (made-up)", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + } + }], "layout": { "title": "Energy forecast for 2050, UK — Department of Energy & Climate Change
Imperfect copy of
Mike Bostock's example
with numerous Plotly features", "width": 1118, diff --git a/test/image/mocks/energy_dark.json b/test/image/mocks/energy_dark.json index 4a060dbb1c5..c7e3b6e1553 100644 --- a/test/image/mocks/energy_dark.json +++ b/test/image/mocks/energy_dark.json @@ -12,139 +12,404 @@ 1 ] }, - "orientation": "h", + "orientation": "v", "nodepad": 15, "nodethickness": 15, "valueformat": ".0f", "valuesuffix": "TWh", - "nodes": [ - {"label":"Agricultural 'waste'"}, - {"label":"Bio-conversion"}, - {"label":"Liquid"}, - {"label":"Losses"}, - {"label":"Solid"}, - {"label":"Gas"}, - {"label":"Biofuel imports"}, - {"label":"Biomass imports"}, - {"label":"Coal imports"}, - {"label":"Coal"}, - {"label":"Coal reserves"}, - {"label":"District heating"}, - {"label":"Industry"}, - {"label":"Heating and cooling - commercial"}, - {"label":"Heating and cooling - homes"}, - {"label":"Electricity grid"}, - {"label":"Over generation / exports"}, - {"label":"H2 conversion"}, - {"label":"Road transport"}, - {"label":"Agriculture"}, - {"label":"Rail transport"}, - {"label":"Lighting & appliances - commercial"}, - {"label":"Lighting & appliances - homes"}, - {"label":"Gas imports"}, - {"label":"Ngas"}, - {"label":"Gas reserves"}, - {"label":"Thermal generation"}, - {"label":"Geothermal"}, - {"label":"H2"}, - {"label":"Hydro"}, - {"label":"International shipping"}, - {"label":"Domestic aviation"}, - {"label":"International aviation"}, - {"label":"National navigation"}, - {"label":"Marine algae"}, - {"label":"Nuclear"}, - {"label":"Oil imports"}, - {"label":"Oil"}, - {"label":"Oil reserves"}, - {"label":"Other waste"}, - {"label":"Pumped heat"}, - {"label":"Solar PV"}, - {"label":"Solar Thermal"}, - {"label":"Solar"}, - {"label":"Tidal"}, - {"label":"UK land based bioenergy"}, - {"label":"Wave"}, - {"label":"Wind"} - ], - "links": [ - {"source":0,"target":1,"value":124.729}, - {"source":1,"target":2,"value":0.597}, - {"source":1,"target":3,"value":26.862}, - {"source":1,"target":4,"value":280.322}, - {"source":1,"target":5,"value":81.144}, - {"source":6,"target":2,"value":35}, - {"source":7,"target":4,"value":35}, - {"source":8,"target":9,"value":11.606}, - {"source":10,"target":9,"value":63.965}, - {"source":9,"target":4,"value":75.571}, - {"source":11,"target":12,"value":10.639}, - {"source":11,"target":13,"value":22.505}, - {"source":11,"target":14,"value":46.184}, - {"source":15,"target":16,"value":104.453}, - {"source":15,"target":14,"value":113.726}, - {"source":15,"target":17,"value":27.14}, - {"source":15,"target":12,"value":342.165}, - {"source":15,"target":18,"value":37.797}, - {"source":15,"target":19,"value":4.412}, - {"source":15,"target":13,"value":40.858}, - {"source":15,"target":3,"value":56.691}, - {"source":15,"target":20,"value":7.863}, - {"source":15,"target":21,"value":90.008}, - {"source":15,"target":22,"value":93.494}, - {"source":23,"target":24,"value":40.719}, - {"source":25,"target":24,"value":82.233}, - {"source":5,"target":13,"value":0.129}, - {"source":5,"target":3,"value":1.401}, - {"source":5,"target":26,"value":151.891}, - {"source":5,"target":19,"value":2.096}, - {"source":5,"target":12,"value":48.58}, - {"source":27,"target":15,"value":7.013}, - {"source":17,"target":28,"value":20.897}, - {"source":17,"target":3,"value":6.242}, - {"source":28,"target":18,"value":20.897}, - {"source":29,"target":15,"value":6.995}, - {"source":2,"target":12,"value":121.066}, - {"source":2,"target":30,"value":128.69}, - {"source":2,"target":18,"value":135.835}, - {"source":2,"target":31,"value":14.458}, - {"source":2,"target":32,"value":206.267}, - {"source":2,"target":19,"value":3.64}, - {"source":2,"target":33,"value":33.218}, - {"source":2,"target":20,"value":4.413}, - {"source":34,"target":1,"value":14.375}, - {"source":24,"target":5,"value":122.952}, - {"source":35,"target":26,"value":500,"color":"rgba(33,102,172,0.65)","label":"Old generation plant (made-up)"}, - {"source":35,"target":26,"value":339.978,"color":"rgba(178,24,43,0.65)","label":"New generation plant (made-up)"}, - {"source":36,"target":37,"value":504.287}, - {"source":38,"target":37,"value":107.703}, - {"source":37,"target":2,"value":611.99}, - {"source":39,"target":4,"value":56.587}, - {"source":39,"target":1,"value":77.81}, - {"source":40,"target":14,"value":193.026}, - {"source":40,"target":13,"value":70.672}, - {"source":41,"target":15,"value":59.901}, - {"source":42,"target":14,"value":19.263}, - {"source":43,"target":42,"value":19.263}, - {"source":43,"target":41,"value":59.901}, - {"source":4,"target":19,"value":0.882}, - {"source":4,"target":26,"value":400.12}, - {"source":4,"target":12,"value":46.477}, - {"source":26,"target":15,"value":525.531}, - {"source":26,"target":3,"value":787.129}, - {"source":26,"target":11,"value":79.329}, - {"source":44,"target":15,"value":9.452}, - {"source":45,"target":1,"value":182.01}, - {"source":46,"target":15,"value":19.013}, - {"source":47,"target":15,"value":289.366} - ] - } - ], + "node": { + "label": [ + "Agricultural 'waste'", + "Bio-conversion", + "Liquid", + "Losses", + "Solid", + "Gas", + "Biofuel imports", + "Biomass imports", + "Coal imports", + "Coal", + "Coal reserves", + "District heating", + "Industry", + "Heating and cooling - commercial", + "Heating and cooling - homes", + "Electricity grid", + "Over generation / exports", + "H2 conversion", + "Road transport", + "Agriculture", + "Rail transport", + "Lighting & appliances - commercial", + "Lighting & appliances - homes", + "Gas imports", + "Ngas", + "Gas reserves", + "Thermal generation", + "Geothermal", + "H2", + "Hydro", + "International shipping", + "Domestic aviation", + "International aviation", + "National navigation", + "Marine algae", + "Nuclear", + "Oil imports", + "Oil", + "Oil reserves", + "Other waste", + "Pumped heat", + "Solar PV", + "Solar Thermal", + "Solar", + "Tidal", + "UK land based bioenergy", + "Wave", + "Wind" + ], + "color": [ + "rgba(31, 119, 180, 0.8)", + "rgba(255, 127, 14, 0.8)", + "rgba(44, 160, 44, 0.8)", + "rgba(214, 39, 40, 0.8)", + "rgba(148, 103, 189, 0.8)", + "rgba(140, 86, 75, 0.8)", + "rgba(227, 119, 194, 0.8)", + "rgba(127, 127, 127, 0.8)", + "rgba(188, 189, 34, 0.8)", + "rgba(23, 190, 207, 0.8)", + "rgba(31, 119, 180, 0.8)", + "rgba(255, 127, 14, 0.8)", + "rgba(44, 160, 44, 0.8)", + "rgba(214, 39, 40, 0.8)", + "rgba(148, 103, 189, 0.8)", + "rgba(140, 86, 75, 0.8)", + "rgba(227, 119, 194, 0.8)", + "rgba(127, 127, 127, 0.8)", + "rgba(188, 189, 34, 0.8)", + "rgba(23, 190, 207, 0.8)", + "rgba(31, 119, 180, 0.8)", + "rgba(255, 127, 14, 0.8)", + "rgba(44, 160, 44, 0.8)", + "rgba(214, 39, 40, 0.8)", + "rgba(148, 103, 189, 0.8)", + "rgba(140, 86, 75, 0.8)", + "rgba(227, 119, 194, 0.8)", + "rgba(127, 127, 127, 0.8)", + "rgba(188, 189, 34, 0.8)", + "rgba(23, 190, 207, 0.8)", + "rgba(31, 119, 180, 0.8)", + "rgba(255, 127, 14, 0.8)", + "rgba(44, 160, 44, 0.8)", + "rgba(214, 39, 40, 0.8)", + "rgba(148, 103, 189, 0.8)", + "magenta", + "rgba(227, 119, 194, 0.8)", + "rgba(127, 127, 127, 0.8)", + "rgba(188, 189, 34, 0.8)", + "rgba(23, 190, 207, 0.8)", + "rgba(31, 119, 180, 0.8)", + "rgba(255, 127, 14, 0.8)", + "rgba(44, 160, 44, 0.8)", + "rgba(214, 39, 40, 0.8)", + "rgba(148, 103, 189, 0.8)", + "rgba(140, 86, 75, 0.8)", + "rgba(227, 119, 194, 0.8)", + "rgba(127, 127, 127, 0.8)"] + }, + "link": { + "source": [ + 0, + 1, + 1, + 1, + 1, + 6, + 7, + 8, + 10, + 9, + 11, + 11, + 11, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 23, + 25, + 5, + 5, + 5, + 5, + 5, + 27, + 17, + 17, + 28, + 29, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 34, + 24, + 35, + 35, + 36, + 38, + 37, + 39, + 39, + 40, + 40, + 41, + 42, + 43, + 43, + 4, + 4, + 4, + 26, + 26, + 26, + 44, + 45, + 46, + 47 + ], + "target": [ + 1, + 2, + 3, + 4, + 5, + 2, + 4, + 9, + 9, + 4, + 12, + 13, + 14, + 16, + 14, + 17, + 12, + 18, + 19, + 13, + 3, + 20, + 21, + 22, + 24, + 24, + 13, + 3, + 26, + 19, + 12, + 15, + 28, + 3, + 18, + 15, + 12, + 30, + 18, + 31, + 32, + 19, + 33, + 20, + 1, + 5, + 26, + 26, + 37, + 37, + 2, + 4, + 1, + 14, + 13, + 15, + 14, + 42, + 41, + 19, + 26, + 12, + 15, + 3, + 11, + 15, + 1, + 15, + 15 + ], + "value": [ + 124.729, + 0.597, + 26.862, + 280.322, + 81.144, + 35, + 35, + 11.606, + 63.965, + 75.571, + 10.639, + 22.505, + 46.184, + 104.453, + 113.726, + 27.14, + 342.165, + 37.797, + 4.412, + 40.858, + 56.691, + 7.863, + 90.008, + 93.494, + 40.719, + 82.233, + 0.129, + 1.401, + 151.891, + 2.096, + 48.58, + 7.013, + 20.897, + 6.242, + 20.897, + 6.995, + 121.066, + 128.69, + 135.835, + 14.458, + 206.267, + 3.64, + 33.218, + 4.413, + 14.375, + 122.952, + 500, + 339.978, + 504.287, + 107.703, + 611.99, + 56.587, + 77.81, + 193.026, + 70.672, + 59.901, + 19.263, + 19.263, + 59.901, + 0.882, + 400.12, + 46.477, + 525.531, + 787.129, + 79.329, + 9.452, + 182.01, + 19.013, + 289.366 + ], + "label": [ + "stream 1", + "", + "", + "", + "stream 1", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "stream 1", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "Old generation plant (made-up)", + "New generation plant (made-up)", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + } + }], "layout": { - "paper_bgcolor": "rgba(0,0,0,1)", "title": "Energy forecast for 2050, UK — Department of Energy & Climate Change
Imperfect copy of Mike Bostock's example
with numerous Plotly features", - "width": 1118, - "height": 772, + "width": 1200, + "height": 1000, + "paper_bgcolor": "rgba(0,0,0,1)", "font": { "size": 10 }, @@ -153,14 +418,14 @@ "y": 1, "buttons": [ { - "label": "Thick", - "method": "restyle", - "args": [ "nodethickness", 15 ] + "label": "Light", + "method": "relayout", + "args": [ "paper_bgcolor", "white" ] }, { - "label": "Thin", - "method": "restyle", - "args": [ "nodethickness", 8] + "label": "Dark", + "method": "relayout", + "args": [ "paper_bgcolor", "black"] } ] }, @@ -168,14 +433,14 @@ "y": 0.9, "buttons": [ { - "label": "Small gap", + "label": "Thick", "method": "restyle", - "args": [ "nodepad", 15 ] + "args": [ "nodethickness", 15 ] }, { - "label": "Large gap", + "label": "Thin", "method": "restyle", - "args": [ "nodepad", 20] + "args": [ "nodethickness", 8] } ] }, @@ -183,14 +448,14 @@ "y": 0.8, "buttons": [ { - "label": "Follow mouse", + "label": "Small gap", "method": "restyle", - "args": [ "followmouse", true ] + "args": [ "nodepad", 15 ] }, { - "label": "Stick tooltip", + "label": "Large gap", "method": "restyle", - "args": [ "followmouse", false] + "args": [ "nodepad", 20] } ] }, @@ -237,3 +502,4 @@ ] } } + From dab87ae40de166403cedea387012c63ff2a74065 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Mon, 1 May 2017 14:37:43 +0200 Subject: [PATCH 08/26] circularity detection --- package.json | 1 + src/traces/sankey/defaults.js | 20 +++++++++++++++++--- test/image/mocks/energy_dark.json | 1 - 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ec20d7c4911..334b709c48a 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,7 @@ "right-now": "^1.0.0", "robust-orientation": "^1.1.3", "sane-topojson": "^2.0.0", + "strongly-connected-components": "^1.0.1", "superscript-text": "^1.0.0", "tinycolor2": "^1.3.0", "topojson-client": "^2.1.0", diff --git a/src/traces/sankey/defaults.js b/src/traces/sankey/defaults.js index af0732f0e86..be67e806d78 100644 --- a/src/traces/sankey/defaults.js +++ b/src/traces/sankey/defaults.js @@ -13,9 +13,23 @@ var attributes = require('./attributes'); var colors = require('../../components/color/attributes').defaults; var Color = require('../../components/color'); var tinycolor = require('tinycolor2'); +var tarjan = require('strongly-connected-components'); -function circularityPresent() { - return false; +function circularityPresent(nodeList, sources, targets) { + + var nodes = nodeList.map(function() {return [];}); + + for(var i = 0; i < Math.min(sources.length, targets.length); i++) { + nodes[sources[i]].push(targets[i]); + } + + var scc = tarjan(nodes); + + // Tarján's strongly connected components algorithm coded by Mikola Lysenko + // returns at least one non-singular component if there's circularity in the graph + return scc.components.some(function(c) { + return c.length > 1; + }); } module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { @@ -64,7 +78,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout Lib.log('Some of the nodes are neither sources nor targets, please remove them.'); } - if(circularityPresent(traceIn.link.source, traceIn.link.target)) { + if(circularityPresent(traceOut.node.label, traceOut.link.source, traceOut.link.target)) { Lib.log('Circularity is present in the Sankey data. Removing all nodes and links.'); traceOut.link.label = []; traceOut.link.source = []; diff --git a/test/image/mocks/energy_dark.json b/test/image/mocks/energy_dark.json index c7e3b6e1553..f85b41f633a 100644 --- a/test/image/mocks/energy_dark.json +++ b/test/image/mocks/energy_dark.json @@ -502,4 +502,3 @@ ] } } - From fdf9849874b498ef1dc17d44ce1dd4630023c375 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Mon, 1 May 2017 17:19:36 +0200 Subject: [PATCH 09/26] Revert "removed colorbar leftover" This reverts commit aa41f281bbdffa90fe5c499e6b73e83d5769637c. --- src/traces/parcoords/colorbar.js | 52 ++++++++++++++++++++++++++++++++ src/traces/parcoords/index.js | 1 + 2 files changed, 53 insertions(+) create mode 100644 src/traces/parcoords/colorbar.js diff --git a/src/traces/parcoords/colorbar.js b/src/traces/parcoords/colorbar.js new file mode 100644 index 00000000000..c20fcb428af --- /dev/null +++ b/src/traces/parcoords/colorbar.js @@ -0,0 +1,52 @@ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var isNumeric = require('fast-isnumeric'); + +var Lib = require('../../lib'); +var Plots = require('../../plots/plots'); +var Colorscale = require('../../components/colorscale'); +var drawColorbar = require('../../components/colorbar/draw'); + + +module.exports = function colorbar(gd, cd) { + var trace = cd[0].trace, + line = trace.line, + cbId = 'cb' + trace.uid; + + gd._fullLayout._infolayer.selectAll('.' + cbId).remove(); + + if((line === undefined) || !line.showscale) { + Plots.autoMargin(gd, cbId); + return; + } + + var vals = line.color, + cmin = line.cmin, + cmax = line.cmax; + + if(!isNumeric(cmin)) cmin = Lib.aggNums(Math.min, null, vals); + if(!isNumeric(cmax)) cmax = Lib.aggNums(Math.max, null, vals); + + var cb = cd[0].t.cb = drawColorbar(gd, cbId); + var sclFunc = Colorscale.makeColorScaleFunc( + Colorscale.extractScale( + line.colorscale, + cmin, + cmax + ), + { noNumericCheck: true } + ); + + cb.fillcolor(sclFunc) + .filllevels({start: cmin, end: cmax, size: (cmax - cmin) / 254}) + .options(line.colorbar)(); +}; diff --git a/src/traces/parcoords/index.js b/src/traces/parcoords/index.js index 72bddac33ab..920cec76473 100644 --- a/src/traces/parcoords/index.js +++ b/src/traces/parcoords/index.js @@ -14,6 +14,7 @@ Parcoords.attributes = require('./attributes'); Parcoords.supplyDefaults = require('./defaults'); Parcoords.calc = require('./calc'); Parcoords.plot = require('./plot'); +Parcoords.colorbar = require('./colorbar'); Parcoords.moduleType = 'trace'; Parcoords.name = 'parcoords'; From 62257b42a1f84a9fcc7a9ef27a852a28061e615d Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Mon, 1 May 2017 17:31:27 +0200 Subject: [PATCH 10/26] restore dist to what was before --- dist/README.md | 48 +- dist/npm-ls.json | 102 +- dist/plotly-with-meta.js | 13421 +++++++++---------------------------- dist/plotly.js | 12963 +++++++++-------------------------- dist/plotly.min.js | 137 +- 5 files changed, 6372 insertions(+), 20299 deletions(-) diff --git a/dist/README.md b/dist/README.md index df324d6b0fd..c1751be6925 100644 --- a/dist/README.md +++ b/dist/README.md @@ -37,11 +37,11 @@ The main plotly.js bundle includes all the official (non-beta) trace modules. It be can imported as minified javascript - using dist file `dist/plotly.min.js` -- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.26.1.min.js +- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.25.2.min.js or as raw javascript: - using dist file `dist/plotly.js` -- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.26.1.js +- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.25.2.js - using CommonJS with `require('plotly.js')` If you would like to have access to the attribute meta information (including attribute descriptions as on the [schema reference page](https://plot.ly/javascript/reference/)), use dist file `dist/plotly-with-meta.js` @@ -50,7 +50,7 @@ The main plotly.js bundle weights in at: | plotly.js | plotly.min.js | plotly.min.js + gzip | plotly-with-meta.js | |-----------|---------------|----------------------|---------------------| -| 5.2 MB | 2.1 MB | 632.9 kB | 5.3 MB | +| 4.9 MB | 2 MB | 612.5 kB | 5.1 MB | ## Partial bundles @@ -74,13 +74,13 @@ The `basic` partial bundle contains the `scatter`, `bar` and `pie` trace modules | dist bundle (minified) | `dist/plotly-basic.min.js` | | CDN URL (latest) | https://cdn.plot.ly/plotly-basic-latest.js | | CDN URL (latest minified) | https://cdn.plot.ly/plotly-basic-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-basic-1.26.1.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-basic-1.26.1.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-basic-1.25.2.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-basic-1.25.2.min.js | | CommonJS | `require('plotly.js/lib/index-basic')` | | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 1.7 MB | 646.2 kB | 210.3 kB | +| 1.7 MB | 631.6 kB | 205.2 kB | ### plotly.js cartesian @@ -92,13 +92,13 @@ The `cartesian` partial bundle contains the `scatter`, `bar`, `box`, `heatmap`, | dist bundle (minified) | `dist/plotly-cartesian.min.js` | | CDN URL (latest) | https://cdn.plot.ly/plotly-cartesian-latest.js | | CDN URL (latest minified) | https://cdn.plot.ly/plotly-cartesian-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-cartesian-1.26.1.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-cartesian-1.26.1.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-cartesian-1.25.2.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-cartesian-1.25.2.min.js | | CommonJS | `require('plotly.js/lib/index-cartesian')` | | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 1.9 MB | 721.2 kB | 232.8 kB | +| 1.9 MB | 706 kB | 227.5 kB | ### plotly.js geo @@ -110,13 +110,13 @@ The `geo` partial bundle contains the `scatter`, `scattergeo` and `choropleth` t | dist bundle (minified) | `dist/plotly-geo.min.js` | | CDN URL (latest) | https://cdn.plot.ly/plotly-geo-latest.js | | CDN URL (latest minified) | https://cdn.plot.ly/plotly-geo-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-geo-1.26.1.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-geo-1.26.1.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-geo-1.25.2.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-geo-1.25.2.min.js | | CommonJS | `require('plotly.js/lib/index-geo')` | | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 1.7 MB | 669.1 kB | 218.8 kB | +| 1.7 MB | 654.9 kB | 213.8 kB | ### plotly.js gl3d @@ -128,13 +128,13 @@ The `gl3d` partial bundle contains the `scatter`, `scatter3d`, `surface` and `me | dist bundle (minified) | `dist/plotly-gl3d.min.js` | | CDN URL (latest) | https://cdn.plot.ly/plotly-gl3d-latest.js | | CDN URL (latest minified) | https://cdn.plot.ly/plotly-gl3d-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl3d-1.26.1.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl3d-1.26.1.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl3d-1.25.2.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl3d-1.25.2.min.js | | CommonJS | `require('plotly.js/lib/index-gl3d')` | | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 2.6 MB | 1.1 MB | 348 kB | +| 2.6 MB | 1.1 MB | 342.8 kB | ### plotly.js gl2d @@ -146,13 +146,13 @@ The `gl2d` partial bundle contains the `scatter`, `scattergl`, `pointcloud`, `he | dist bundle (minified) | `dist/plotly-gl2d.min.js` | | CDN URL (latest) | https://cdn.plot.ly/plotly-gl2d-latest.js | | CDN URL (latest minified) | https://cdn.plot.ly/plotly-gl2d-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl2d-1.26.1.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl2d-1.26.1.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl2d-1.25.2.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl2d-1.25.2.min.js | | CommonJS | `require('plotly.js/lib/index-gl2d')` | | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 2.7 MB | 1.1 MB | 354.7 kB | +| 2.7 MB | 1.1 MB | 349 kB | ### plotly.js mapbox @@ -164,13 +164,13 @@ The `mapbox` partial bundle contains the `scatter` and `scattermapbox` trace mod | dist bundle (minified) | `dist/plotly-mapbox.min.js` | | CDN URL (latest) | https://cdn.plot.ly/plotly-mapbox-latest.js | | CDN URL (latest minified) | https://cdn.plot.ly/plotly-mapbox-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-mapbox-1.26.1.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-mapbox-1.26.1.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-mapbox-1.25.2.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-mapbox-1.25.2.min.js | | CommonJS | `require('plotly.js/lib/index-mapbox')` | | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 2.8 MB | 1.1 MB | 323.1 kB | +| 2.7 MB | 1 MB | 318.1 kB | ### plotly.js finance @@ -182,13 +182,13 @@ The `finance` partial bundle contains the `scatter`, `bar`, `histogram`, `pie`, | dist bundle (minified) | `dist/plotly-finance.min.js` | | CDN URL (latest) | https://cdn.plot.ly/plotly-finance-latest.js | | CDN URL (latest minified) | https://cdn.plot.ly/plotly-finance-latest.min.js | -| CDN URL (tagged) | https://cdn.plot.ly/plotly-finance-1.26.1.js | -| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-finance-1.26.1.min.js | +| CDN URL (tagged) | https://cdn.plot.ly/plotly-finance-1.25.2.js | +| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-finance-1.25.2.min.js | | CommonJS | `require('plotly.js/lib/index-finance')` | | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 1.8 MB | 673.1 kB | 217.8 kB | +| 1.7 MB | 658.4 kB | 212.7 kB | ---------------- diff --git a/dist/npm-ls.json b/dist/npm-ls.json index bafdeddd8e9..02b52a037db 100644 --- a/dist/npm-ls.json +++ b/dist/npm-ls.json @@ -1,12 +1,53 @@ { "name": "plotly.js", - "version": "1.26.1", + "version": "1.25.2", "dependencies": { "3d-view": { "version": "2.0.0", "from": "3d-view@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/3d-view/-/3d-view-2.0.0.tgz", "dependencies": { + "matrix-camera-controller": { + "version": "2.1.1", + "from": "matrix-camera-controller@>=2.1.1 <3.0.0", + "resolved": "https://registry.npmjs.org/matrix-camera-controller/-/matrix-camera-controller-2.1.1.tgz", + "dependencies": { + "gl-vec3": { + "version": "1.0.3", + "from": "gl-vec3@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/gl-vec3/-/gl-vec3-1.0.3.tgz" + }, + "mat4-interpolate": { + "version": "1.0.4", + "from": "mat4-interpolate@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/mat4-interpolate/-/mat4-interpolate-1.0.4.tgz", + "dependencies": { + "mat4-decompose": { + "version": "1.0.4", + "from": "mat4-decompose@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/mat4-decompose/-/mat4-decompose-1.0.4.tgz" + }, + "mat4-recompose": { + "version": "1.0.4", + "from": "mat4-recompose@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/mat4-recompose/-/mat4-recompose-1.0.4.tgz" + }, + "quat-slerp": { + "version": "1.0.1", + "from": "quat-slerp@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/quat-slerp/-/quat-slerp-1.0.1.tgz", + "dependencies": { + "gl-quat": { + "version": "1.0.0", + "from": "gl-quat@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/gl-quat/-/gl-quat-1.0.0.tgz" + } + } + } + } + } + } + }, "orbit-camera-controller": { "version": "4.0.0", "from": "orbit-camera-controller@>=4.0.0 <5.0.0", @@ -238,6 +279,11 @@ } } }, + "arraytools": { + "version": "1.1.2", + "from": "arraytools@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/arraytools/-/arraytools-1.1.2.tgz" + }, "color-rgba": { "version": "1.1.0", "from": "color-rgba@>=1.0.4 <2.0.0", @@ -1082,11 +1128,6 @@ "from": "colormap@>=2.1.0 <3.0.0", "resolved": "https://registry.npmjs.org/colormap/-/colormap-2.2.0.tgz", "dependencies": { - "arraytools": { - "version": "1.1.2", - "from": "arraytools@>=1.1.2 <2.0.0", - "resolved": "https://registry.npmjs.org/arraytools/-/arraytools-1.1.2.tgz" - }, "clone": { "version": "1.0.2", "from": "clone@>=1.0.2 <2.0.0", @@ -1212,9 +1253,9 @@ } }, "gl-plot3d": { - "version": "1.5.4", - "from": "gl-plot3d@1.5.4", - "resolved": "https://registry.npmjs.org/gl-plot3d/-/gl-plot3d-1.5.4.tgz", + "version": "1.5.3", + "from": "gl-plot3d@>=1.5.2 <2.0.0", + "resolved": "https://registry.npmjs.org/gl-plot3d/-/gl-plot3d-1.5.3.tgz", "dependencies": { "3d-view-controls": { "version": "2.2.0", @@ -2472,7 +2513,7 @@ }, "esutils": { "version": "2.0.2", - "from": "esutils@^2.0.2", + "from": "esutils@>=2.0.2 <3.0.0", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" } } @@ -2570,47 +2611,6 @@ } } }, - "matrix-camera-controller": { - "version": "2.1.3", - "from": "matrix-camera-controller@latest", - "resolved": "https://registry.npmjs.org/matrix-camera-controller/-/matrix-camera-controller-2.1.3.tgz", - "dependencies": { - "gl-vec3": { - "version": "1.0.3", - "from": "gl-vec3@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/gl-vec3/-/gl-vec3-1.0.3.tgz" - }, - "mat4-interpolate": { - "version": "1.0.4", - "from": "mat4-interpolate@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/mat4-interpolate/-/mat4-interpolate-1.0.4.tgz", - "dependencies": { - "mat4-decompose": { - "version": "1.0.4", - "from": "mat4-decompose@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/mat4-decompose/-/mat4-decompose-1.0.4.tgz" - }, - "mat4-recompose": { - "version": "1.0.4", - "from": "mat4-recompose@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/mat4-recompose/-/mat4-recompose-1.0.4.tgz" - }, - "quat-slerp": { - "version": "1.0.1", - "from": "quat-slerp@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/quat-slerp/-/quat-slerp-1.0.1.tgz", - "dependencies": { - "gl-quat": { - "version": "1.0.0", - "from": "gl-quat@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/gl-quat/-/gl-quat-1.0.0.tgz" - } - } - } - } - } - } - }, "mouse-change": { "version": "1.4.0", "from": "mouse-change@>=1.4.0 <2.0.0", diff --git a/dist/plotly-with-meta.js b/dist/plotly-with-meta.js index 5cc296dbb06..eace14abc2a 100644 --- a/dist/plotly-with-meta.js +++ b/dist/plotly-with-meta.js @@ -1,5 +1,5 @@ /** -* plotly.js v1.26.1 +* plotly.js v1.25.2 * Copyright 2012-2017, Plotly, Inc. * All rights reserved. * Licensed under the MIT license @@ -21,7 +21,6 @@ var rules = { "X svg a:hover": "fill:#3c6dc5;", "X .main-svg": "position:absolute;top:0;left:0;pointer-events:none;", "X .main-svg .draglayer": "pointer-events:all;", - "X .cursor-default": "cursor:default;", "X .cursor-pointer": "cursor:pointer;", "X .cursor-crosshair": "cursor:crosshair;", "X .cursor-move": "cursor:move;", @@ -69,7 +68,7 @@ for(var selector in rules) { Lib.addStyleRule(fullSelector, rules[selector]); } -},{"../src/lib":685}],2:[function(require,module,exports){ +},{"../src/lib":680}],2:[function(require,module,exports){ 'use strict'; module.exports = { @@ -186,12 +185,6 @@ module.exports = { 'path': 'm0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z', 'ascent': 850, 'descent': -150 - }, - 'spikeline': { - 'width': 1000, - 'path': 'M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z', - 'ascent': 850, - 'descent': -150 } }; @@ -208,7 +201,7 @@ module.exports = { module.exports = require('../src/traces/bar'); -},{"../src/traces/bar":816}],4:[function(require,module,exports){ +},{"../src/traces/bar":807}],4:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -221,7 +214,7 @@ module.exports = require('../src/traces/bar'); module.exports = require('../src/traces/box'); -},{"../src/traces/box":828}],5:[function(require,module,exports){ +},{"../src/traces/box":819}],5:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -234,7 +227,7 @@ module.exports = require('../src/traces/box'); module.exports = require('../src/components/calendars'); -},{"../src/components/calendars":576}],6:[function(require,module,exports){ +},{"../src/components/calendars":573}],6:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -247,20 +240,7 @@ module.exports = require('../src/components/calendars'); module.exports = require('../src/traces/candlestick'); -},{"../src/traces/candlestick":836}],7:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = require('../src/traces/carpet'); - -},{"../src/traces/carpet":857}],8:[function(require,module,exports){ +},{"../src/traces/candlestick":827}],7:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -273,7 +253,7 @@ module.exports = require('../src/traces/carpet'); module.exports = require('../src/traces/choropleth'); -},{"../src/traces/choropleth":872}],9:[function(require,module,exports){ +},{"../src/traces/choropleth":834}],8:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -286,20 +266,7 @@ module.exports = require('../src/traces/choropleth'); module.exports = require('../src/traces/contour'); -},{"../src/traces/contour":883}],10:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = require('../src/traces/contourcarpet'); - -},{"../src/traces/contourcarpet":898}],11:[function(require,module,exports){ +},{"../src/traces/contour":845}],9:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -312,7 +279,7 @@ module.exports = require('../src/traces/contourcarpet'); module.exports = require('../src/core'); -},{"../src/core":669}],12:[function(require,module,exports){ +},{"../src/core":665}],10:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -325,7 +292,7 @@ module.exports = require('../src/core'); module.exports = require('../src/transforms/filter'); -},{"../src/transforms/filter":1045}],13:[function(require,module,exports){ +},{"../src/transforms/filter":986}],11:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -338,7 +305,7 @@ module.exports = require('../src/transforms/filter'); module.exports = require('../src/transforms/groupby'); -},{"../src/transforms/groupby":1046}],14:[function(require,module,exports){ +},{"../src/transforms/groupby":987}],12:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -351,7 +318,7 @@ module.exports = require('../src/transforms/groupby'); module.exports = require('../src/traces/heatmap'); -},{"../src/traces/heatmap":912}],15:[function(require,module,exports){ +},{"../src/traces/heatmap":860}],13:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -364,7 +331,7 @@ module.exports = require('../src/traces/heatmap'); module.exports = require('../src/traces/heatmapgl'); -},{"../src/traces/heatmapgl":921}],16:[function(require,module,exports){ +},{"../src/traces/heatmapgl":869}],14:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -377,7 +344,7 @@ module.exports = require('../src/traces/heatmapgl'); module.exports = require('../src/traces/histogram'); -},{"../src/traces/histogram":929}],17:[function(require,module,exports){ +},{"../src/traces/histogram":877}],15:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -390,7 +357,7 @@ module.exports = require('../src/traces/histogram'); module.exports = require('../src/traces/histogram2d'); -},{"../src/traces/histogram2d":934}],18:[function(require,module,exports){ +},{"../src/traces/histogram2d":882}],16:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -403,7 +370,7 @@ module.exports = require('../src/traces/histogram2d'); module.exports = require('../src/traces/histogram2dcontour'); -},{"../src/traces/histogram2dcontour":938}],19:[function(require,module,exports){ +},{"../src/traces/histogram2dcontour":886}],17:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -442,10 +409,6 @@ Plotly.register([ require('./scattermapbox'), - require('./carpet'), - require('./scattercarpet'), - require('./contourcarpet'), - require('./ohlc'), require('./candlestick') ]); @@ -472,7 +435,7 @@ Plotly.register([ module.exports = Plotly; -},{"./bar":3,"./box":4,"./calendars":5,"./candlestick":6,"./carpet":7,"./choropleth":8,"./contour":9,"./contourcarpet":10,"./core":11,"./filter":12,"./groupby":13,"./heatmap":14,"./heatmapgl":15,"./histogram":16,"./histogram2d":17,"./histogram2dcontour":18,"./mesh3d":20,"./ohlc":21,"./parcoords":22,"./pie":23,"./pointcloud":24,"./scatter3d":25,"./scattercarpet":26,"./scattergeo":27,"./scattergl":28,"./scattermapbox":29,"./scatterternary":30,"./surface":31}],20:[function(require,module,exports){ +},{"./bar":3,"./box":4,"./calendars":5,"./candlestick":6,"./choropleth":7,"./contour":8,"./core":9,"./filter":10,"./groupby":11,"./heatmap":12,"./heatmapgl":13,"./histogram":14,"./histogram2d":15,"./histogram2dcontour":16,"./mesh3d":18,"./ohlc":19,"./parcoords":20,"./pie":21,"./pointcloud":22,"./scatter3d":23,"./scattergeo":24,"./scattergl":25,"./scattermapbox":26,"./scatterternary":27,"./surface":28}],18:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -485,7 +448,7 @@ module.exports = Plotly; module.exports = require('../src/traces/mesh3d'); -},{"../src/traces/mesh3d":942}],21:[function(require,module,exports){ +},{"../src/traces/mesh3d":890}],19:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -498,7 +461,7 @@ module.exports = require('../src/traces/mesh3d'); module.exports = require('../src/traces/ohlc'); -},{"../src/traces/ohlc":947}],22:[function(require,module,exports){ +},{"../src/traces/ohlc":895}],20:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -511,7 +474,7 @@ module.exports = require('../src/traces/ohlc'); module.exports = require('../src/traces/parcoords'); -},{"../src/traces/parcoords":956}],23:[function(require,module,exports){ +},{"../src/traces/parcoords":904}],21:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -524,7 +487,7 @@ module.exports = require('../src/traces/parcoords'); module.exports = require('../src/traces/pie'); -},{"../src/traces/pie":965}],24:[function(require,module,exports){ +},{"../src/traces/pie":913}],22:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -537,7 +500,7 @@ module.exports = require('../src/traces/pie'); module.exports = require('../src/traces/pointcloud'); -},{"../src/traces/pointcloud":974}],25:[function(require,module,exports){ +},{"../src/traces/pointcloud":922}],23:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -550,20 +513,7 @@ module.exports = require('../src/traces/pointcloud'); module.exports = require('../src/traces/scatter3d'); -},{"../src/traces/scatter3d":1004}],26:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = require('../src/traces/scattercarpet'); - -},{"../src/traces/scattercarpet":1009}],27:[function(require,module,exports){ +},{"../src/traces/scatter3d":952}],24:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -576,7 +526,7 @@ module.exports = require('../src/traces/scattercarpet'); module.exports = require('../src/traces/scattergeo'); -},{"../src/traces/scattergeo":1018}],28:[function(require,module,exports){ +},{"../src/traces/scattergeo":958}],25:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -589,7 +539,7 @@ module.exports = require('../src/traces/scattergeo'); module.exports = require('../src/traces/scattergl'); -},{"../src/traces/scattergl":1023}],29:[function(require,module,exports){ +},{"../src/traces/scattergl":963}],26:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -602,7 +552,7 @@ module.exports = require('../src/traces/scattergl'); module.exports = require('../src/traces/scattermapbox'); -},{"../src/traces/scattermapbox":1029}],30:[function(require,module,exports){ +},{"../src/traces/scattermapbox":970}],27:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -615,7 +565,7 @@ module.exports = require('../src/traces/scattermapbox'); module.exports = require('../src/traces/scatterternary'); -},{"../src/traces/scatterternary":1035}],31:[function(require,module,exports){ +},{"../src/traces/scatterternary":976}],28:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -628,7 +578,7 @@ module.exports = require('../src/traces/scatterternary'); module.exports = require('../src/traces/surface'); -},{"../src/traces/surface":1044}],32:[function(require,module,exports){ +},{"../src/traces/surface":985}],29:[function(require,module,exports){ 'use strict' module.exports = createCamera @@ -857,7 +807,7 @@ function createCamera(element, options) { return camera } -},{"3d-view":33,"mouse-change":434,"mouse-event-offset":435,"mouse-wheel":437,"right-now":483}],33:[function(require,module,exports){ +},{"3d-view":30,"mouse-change":431,"mouse-event-offset":432,"mouse-wheel":434,"right-now":480}],30:[function(require,module,exports){ 'use strict' module.exports = createViewController @@ -980,7 +930,7 @@ function createViewController(options) { matrix: matrix }, mode) } -},{"matrix-camera-controller":432,"orbit-camera-controller":454,"turntable-camera-controller":518}],34:[function(require,module,exports){ +},{"matrix-camera-controller":429,"orbit-camera-controller":451,"turntable-camera-controller":515}],31:[function(require,module,exports){ 'use strict' var weakMap = typeof WeakMap === 'undefined' ? require('weak-map') : WeakMap @@ -1011,7 +961,7 @@ function createABigTriangle(gl) { module.exports = createABigTriangle -},{"gl-buffer":141,"gl-vao":255,"weak-map":539}],35:[function(require,module,exports){ +},{"gl-buffer":138,"gl-vao":252,"weak-map":536}],32:[function(require,module,exports){ var padLeft = require('pad-left') module.exports = addLineNumbers @@ -1029,7 +979,7 @@ function addLineNumbers (string, start, delim) { }).join('\n') } -},{"pad-left":455}],36:[function(require,module,exports){ +},{"pad-left":452}],33:[function(require,module,exports){ 'use strict' module.exports = affineHull @@ -1081,7 +1031,7 @@ function affineHull(points) { } return index } -},{"robust-orientation":489}],37:[function(require,module,exports){ +},{"robust-orientation":486}],34:[function(require,module,exports){ 'use strict' module.exports = alphaComplex @@ -1098,7 +1048,7 @@ function alphaComplex(alpha, points) { return circumradius(simplex) * alpha < 1 }) } -},{"circumradius":80,"delaunay-triangulate":108}],38:[function(require,module,exports){ +},{"circumradius":77,"delaunay-triangulate":105}],35:[function(require,module,exports){ module.exports = alphaShape var ac = require('alpha-complex') @@ -1107,7 +1057,7 @@ var bnd = require('simplicial-complex-boundary') function alphaShape(alpha, points) { return bnd(ac(alpha, points)) } -},{"alpha-complex":37,"simplicial-complex-boundary":497}],39:[function(require,module,exports){ +},{"alpha-complex":34,"simplicial-complex-boundary":494}],36:[function(require,module,exports){ 'use strict'; var arraytools = function () { @@ -1296,7 +1246,7 @@ var arraytools = function () { module.exports = arraytools(); -},{}],40:[function(require,module,exports){ +},{}],37:[function(require,module,exports){ (function (global){ 'use strict'; @@ -1790,12 +1740,12 @@ var objectKeys = Object.keys || function (obj) { }; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"util/":529}],41:[function(require,module,exports){ +},{"util/":526}],38:[function(require,module,exports){ module.exports = function _atob(str) { return atob(str) } -},{}],42:[function(require,module,exports){ +},{}],39:[function(require,module,exports){ 'use strict' module.exports = barycentric @@ -1843,7 +1793,7 @@ function barycentric(simplex, point) { } return y } -},{"robust-linear-solve":488}],43:[function(require,module,exports){ +},{"robust-linear-solve":485}],40:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -1856,7 +1806,7 @@ function add(a, b) { a[1].mul(b[1])) } -},{"./lib/rationalize":53}],44:[function(require,module,exports){ +},{"./lib/rationalize":50}],41:[function(require,module,exports){ 'use strict' module.exports = cmp @@ -1865,7 +1815,7 @@ function cmp(a, b) { return a[0].mul(b[1]).cmp(b[0].mul(a[1])) } -},{}],45:[function(require,module,exports){ +},{}],42:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -1876,7 +1826,7 @@ function div(a, b) { return rationalize(a[0].mul(b[1]), a[1].mul(b[0])) } -},{"./lib/rationalize":53}],46:[function(require,module,exports){ +},{"./lib/rationalize":50}],43:[function(require,module,exports){ 'use strict' var isRat = require('./is-rat') @@ -1938,7 +1888,7 @@ function makeRational(numer, denom) { return rationalize(a, b) } -},{"./div":45,"./is-rat":47,"./lib/is-bn":51,"./lib/num-to-bn":52,"./lib/rationalize":53,"./lib/str-to-bn":54}],47:[function(require,module,exports){ +},{"./div":42,"./is-rat":44,"./lib/is-bn":48,"./lib/num-to-bn":49,"./lib/rationalize":50,"./lib/str-to-bn":51}],44:[function(require,module,exports){ 'use strict' var isBN = require('./lib/is-bn') @@ -1949,7 +1899,7 @@ function isRat(x) { return Array.isArray(x) && x.length === 2 && isBN(x[0]) && isBN(x[1]) } -},{"./lib/is-bn":51}],48:[function(require,module,exports){ +},{"./lib/is-bn":48}],45:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -1960,7 +1910,7 @@ function sign (x) { return x.cmp(new BN(0)) } -},{"bn.js":61}],49:[function(require,module,exports){ +},{"bn.js":58}],46:[function(require,module,exports){ 'use strict' var sign = require('./bn-sign') @@ -1985,7 +1935,7 @@ function bn2num(b) { return sign(b) * out } -},{"./bn-sign":48}],50:[function(require,module,exports){ +},{"./bn-sign":45}],47:[function(require,module,exports){ 'use strict' var db = require('double-bits') @@ -2006,7 +1956,7 @@ function ctzNumber(x) { return h + 32 } -},{"bit-twiddle":60,"double-bits":109}],51:[function(require,module,exports){ +},{"bit-twiddle":57,"double-bits":106}],48:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2019,7 +1969,7 @@ function isBN(x) { return x && typeof x === 'object' && Boolean(x.words) } -},{"bn.js":61}],52:[function(require,module,exports){ +},{"bn.js":58}],49:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2036,7 +1986,7 @@ function num2bn(x) { } } -},{"bn.js":61,"double-bits":109}],53:[function(require,module,exports){ +},{"bn.js":58,"double-bits":106}],50:[function(require,module,exports){ 'use strict' var num2bn = require('./num-to-bn') @@ -2064,7 +2014,7 @@ function rationalize(numer, denom) { return [ numer, denom ] } -},{"./bn-sign":48,"./num-to-bn":52}],54:[function(require,module,exports){ +},{"./bn-sign":45,"./num-to-bn":49}],51:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2075,7 +2025,7 @@ function str2BN(x) { return new BN(x) } -},{"bn.js":61}],55:[function(require,module,exports){ +},{"bn.js":58}],52:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2086,7 +2036,7 @@ function mul(a, b) { return rationalize(a[0].mul(b[0]), a[1].mul(b[1])) } -},{"./lib/rationalize":53}],56:[function(require,module,exports){ +},{"./lib/rationalize":50}],53:[function(require,module,exports){ 'use strict' var bnsign = require('./lib/bn-sign') @@ -2097,7 +2047,7 @@ function sign(x) { return bnsign(x[0]) * bnsign(x[1]) } -},{"./lib/bn-sign":48}],57:[function(require,module,exports){ +},{"./lib/bn-sign":45}],54:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2108,7 +2058,7 @@ function sub(a, b) { return rationalize(a[0].mul(b[1]).sub(a[1].mul(b[0])), a[1].mul(b[1])) } -},{"./lib/rationalize":53}],58:[function(require,module,exports){ +},{"./lib/rationalize":50}],55:[function(require,module,exports){ 'use strict' var bn2num = require('./lib/bn-to-num') @@ -2146,7 +2096,7 @@ function roundRat (f) { } } -},{"./lib/bn-to-num":49,"./lib/ctz":50}],59:[function(require,module,exports){ +},{"./lib/bn-to-num":46,"./lib/ctz":47}],56:[function(require,module,exports){ "use strict" function compileSearch(funcName, predicate, reversed, extraArgs, useNdarray, earlyOut) { @@ -2208,7 +2158,7 @@ module.exports = { eq: compileBoundsSearch("-", true, "EQ", true) } -},{}],60:[function(require,module,exports){ +},{}],57:[function(require,module,exports){ /** * Bit twiddling hacks for JavaScript. * @@ -2414,7 +2364,7 @@ exports.nextCombination = function(v) { } -},{}],61:[function(require,module,exports){ +},{}],58:[function(require,module,exports){ (function (module, exports) { 'use strict'; @@ -5843,7 +5793,7 @@ exports.nextCombination = function(v) { }; })(typeof module === 'undefined' || module, this); -},{}],62:[function(require,module,exports){ +},{}],59:[function(require,module,exports){ 'use strict' module.exports = boundary @@ -5879,7 +5829,7 @@ function boundary (cells) { return result } -},{}],63:[function(require,module,exports){ +},{}],60:[function(require,module,exports){ 'use strict' module.exports = boxIntersectWrapper @@ -6018,7 +5968,7 @@ function boxIntersectWrapper(arg0, arg1, arg2) { throw new Error('box-intersect: Invalid arguments') } } -},{"./lib/intersect":65,"./lib/sweep":69,"typedarray-pool":521}],64:[function(require,module,exports){ +},{"./lib/intersect":62,"./lib/sweep":66,"typedarray-pool":518}],61:[function(require,module,exports){ 'use strict' var DIMENSION = 'd' @@ -6163,7 +6113,7 @@ function bruteForcePlanner(full) { exports.partial = bruteForcePlanner(false) exports.full = bruteForcePlanner(true) -},{}],65:[function(require,module,exports){ +},{}],62:[function(require,module,exports){ 'use strict' module.exports = boxIntersectIter @@ -6658,7 +6608,7 @@ function boxIntersectIter( } } } -},{"./brute":64,"./median":66,"./partition":67,"./sweep":69,"bit-twiddle":60,"typedarray-pool":521}],66:[function(require,module,exports){ +},{"./brute":61,"./median":63,"./partition":64,"./sweep":66,"bit-twiddle":57,"typedarray-pool":518}],63:[function(require,module,exports){ 'use strict' module.exports = findMedian @@ -6801,7 +6751,7 @@ function findMedian(d, axis, start, end, boxes, ids) { start, mid, boxes, ids, boxes[elemSize*mid+axis]) } -},{"./partition":67}],67:[function(require,module,exports){ +},{"./partition":64}],64:[function(require,module,exports){ 'use strict' module.exports = genPartition @@ -6822,7 +6772,7 @@ function genPartition(predicate, args) { .replace('$', predicate)) return Function.apply(void 0, fargs) } -},{}],68:[function(require,module,exports){ +},{}],65:[function(require,module,exports){ 'use strict'; //This code is extracted from ndarray-sort @@ -7059,7 +7009,7 @@ function quickSort(left, right, data) { quickSort(less, great, data); } } -},{}],69:[function(require,module,exports){ +},{}],66:[function(require,module,exports){ 'use strict' module.exports = { @@ -7494,7 +7444,7 @@ red_loop: } } } -},{"./sort":68,"bit-twiddle":60,"typedarray-pool":521}],70:[function(require,module,exports){ +},{"./sort":65,"bit-twiddle":57,"typedarray-pool":518}],67:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -7749,8 +7699,8 @@ function fromObject (obj) { } if (obj) { - if (isArrayBufferView(obj) || 'length' in obj) { - if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + if (ArrayBuffer.isView(obj) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { return createBuffer(0) } return fromArrayLike(obj) @@ -7861,7 +7811,7 @@ function byteLength (string, encoding) { if (Buffer.isBuffer(string)) { return string.length } - if (isArrayBufferView(string) || string instanceof ArrayBuffer) { + if (ArrayBuffer.isView(string) || string instanceof ArrayBuffer) { return string.byteLength } if (typeof string !== 'string') { @@ -8127,7 +8077,7 @@ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { byteOffset = -0x80000000 } byteOffset = +byteOffset // Coerce to Number. - if (numberIsNaN(byteOffset)) { + if (isNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : (buffer.length - 1) } @@ -8258,7 +8208,7 @@ function hexWrite (buf, string, offset, length) { } for (var i = 0; i < length; ++i) { var parsed = parseInt(string.substr(i * 2, 2), 16) - if (numberIsNaN(parsed)) return i + if (isNaN(parsed)) return i buf[offset + i] = parsed } return i @@ -9061,7 +9011,7 @@ var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g function base64clean (str) { // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = str.trim().replace(INVALID_BASE64_RE, '') + str = stringtrim(str).replace(INVALID_BASE64_RE, '') // Node converts strings with length < 2 to '' if (str.length < 2) return '' // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not @@ -9071,6 +9021,11 @@ function base64clean (str) { return str } +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + function toHex (n) { if (n < 16) return '0' + n.toString(16) return n.toString(16) @@ -9193,16 +9148,11 @@ function blitBuffer (src, dst, offset, length) { return i } -// Node 0.10 supports `ArrayBuffer` but lacks `ArrayBuffer.isView` -function isArrayBufferView (obj) { - return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj) +function isnan (val) { + return val !== val // eslint-disable-line no-self-compare } -function numberIsNaN (obj) { - return obj !== obj // eslint-disable-line no-self-compare -} - -},{"base64-js":71,"ieee754":272}],71:[function(require,module,exports){ +},{"base64-js":68,"ieee754":269}],68:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -9318,7 +9268,7 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],72:[function(require,module,exports){ +},{}],69:[function(require,module,exports){ 'use strict' var monotoneTriangulate = require('./lib/monotone') @@ -9402,7 +9352,7 @@ function cdt2d(points, edges, options) { } } -},{"./lib/delaunay":73,"./lib/filter":74,"./lib/monotone":75,"./lib/triangulation":76}],73:[function(require,module,exports){ +},{"./lib/delaunay":70,"./lib/filter":71,"./lib/monotone":72,"./lib/triangulation":73}],70:[function(require,module,exports){ 'use strict' var inCircle = require('robust-in-sphere')[4] @@ -9519,7 +9469,7 @@ function delaunayRefine(points, triangulation) { } } -},{"binary-search-bounds":77,"robust-in-sphere":487}],74:[function(require,module,exports){ +},{"binary-search-bounds":74,"robust-in-sphere":484}],71:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9701,7 +9651,7 @@ function classifyFaces(triangulation, target, infinity) { return result } -},{"binary-search-bounds":77}],75:[function(require,module,exports){ +},{"binary-search-bounds":74}],72:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9890,7 +9840,7 @@ function monotoneTriangulate(points, edges) { return cells } -},{"binary-search-bounds":77,"robust-orientation":489}],76:[function(require,module,exports){ +},{"binary-search-bounds":74,"robust-orientation":486}],73:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9996,7 +9946,7 @@ function createTriangulation(numVerts, edges) { return new Triangulation(stars, edges) } -},{"binary-search-bounds":77}],77:[function(require,module,exports){ +},{"binary-search-bounds":74}],74:[function(require,module,exports){ "use strict" function compileSearch(funcName, predicate, reversed, extraArgs, earlyOut) { @@ -10050,7 +10000,7 @@ module.exports = { eq: compileBoundsSearch("-", true, "EQ", true) } -},{}],78:[function(require,module,exports){ +},{}],75:[function(require,module,exports){ 'use strict' module.exports = orientation @@ -10069,7 +10019,7 @@ function orientation(s) { return p } -},{}],79:[function(require,module,exports){ +},{}],76:[function(require,module,exports){ "use strict" var dup = require("dup") @@ -10138,7 +10088,7 @@ function circumcenter(points) { circumcenter.barycenetric = barycentricCircumcenter module.exports = circumcenter -},{"dup":110,"robust-linear-solve":488}],80:[function(require,module,exports){ +},{"dup":107,"robust-linear-solve":485}],77:[function(require,module,exports){ module.exports = circumradius var circumcenter = require('circumcenter') @@ -10154,7 +10104,7 @@ function circumradius(points) { } return Math.sqrt(avgDist / points.length) } -},{"circumcenter":79}],81:[function(require,module,exports){ +},{"circumcenter":76}],78:[function(require,module,exports){ module.exports = clamp function clamp(value, min, max) { @@ -10163,7 +10113,7 @@ function clamp(value, min, max) { : (value < max ? max : value > min ? min : value) } -},{}],82:[function(require,module,exports){ +},{}],79:[function(require,module,exports){ 'use strict' module.exports = cleanPSLG @@ -10546,7 +10496,7 @@ function cleanPSLG (points, edges, colors) { return modified } -},{"./lib/rat-seg-intersect":83,"big-rat":46,"big-rat/cmp":44,"big-rat/to-float":58,"box-intersect":63,"nextafter":450,"rat-vec":476,"robust-segment-intersect":492,"union-find":522}],83:[function(require,module,exports){ +},{"./lib/rat-seg-intersect":80,"big-rat":43,"big-rat/cmp":41,"big-rat/to-float":55,"box-intersect":60,"nextafter":447,"rat-vec":473,"robust-segment-intersect":489,"union-find":519}],80:[function(require,module,exports){ 'use strict' module.exports = solveIntersection @@ -10590,7 +10540,7 @@ function solveIntersection (a, b, c, d) { return r } -},{"big-rat/div":45,"big-rat/mul":55,"big-rat/sign":56,"big-rat/sub":57,"rat-vec/add":475,"rat-vec/muls":477,"rat-vec/sub":478}],84:[function(require,module,exports){ +},{"big-rat/div":42,"big-rat/mul":52,"big-rat/sign":53,"big-rat/sub":54,"rat-vec/add":472,"rat-vec/muls":474,"rat-vec/sub":475}],81:[function(require,module,exports){ (function (Buffer){ var clone = (function() { 'use strict'; @@ -10754,7 +10704,7 @@ if (typeof module === 'object' && module.exports) { } }).call(this,require("buffer").Buffer) -},{"buffer":70}],85:[function(require,module,exports){ +},{"buffer":67}],82:[function(require,module,exports){ /** @module color-number */ 'use strict' @@ -10788,7 +10738,7 @@ function toNumber (rgba, normalized) { return n } -},{"clamp":81}],86:[function(require,module,exports){ +},{"clamp":78}],83:[function(require,module,exports){ module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], @@ -10939,7 +10889,7 @@ module.exports = { "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; -},{}],87:[function(require,module,exports){ +},{}],84:[function(require,module,exports){ /** * @module color-parse */ @@ -11116,7 +11066,7 @@ function parse (cstr) { }; } -},{"color-name":86,"is-plain-obj":279}],88:[function(require,module,exports){ +},{"color-name":83,"is-plain-obj":276}],85:[function(require,module,exports){ /** @module color-rgba */ 'use strict' @@ -11155,7 +11105,7 @@ module.exports = function rgba (color, normalize) { } -},{"clamp":81,"color-parse":87,"color-space/hsl":89}],89:[function(require,module,exports){ +},{"clamp":78,"color-parse":84,"color-space/hsl":86}],86:[function(require,module,exports){ /** * @module color-space/hsl */ @@ -11264,7 +11214,7 @@ rgb.hsl = function(rgb) { return [h, s * 100, l * 100]; }; -},{"./rgb":90}],90:[function(require,module,exports){ +},{"./rgb":87}],87:[function(require,module,exports){ /** * RGB space. * @@ -11280,7 +11230,7 @@ module.exports = { alias: ['RGB'] }; -},{}],91:[function(require,module,exports){ +},{}],88:[function(require,module,exports){ module.exports={ "jet":[{"index":0,"rgb":[0,0,131]},{"index":0.125,"rgb":[0,60,170]},{"index":0.375,"rgb":[5,255,255]},{"index":0.625,"rgb":[255,255,0]},{"index":0.875,"rgb":[250,0,0]},{"index":1,"rgb":[128,0,0]}], @@ -11373,7 +11323,7 @@ module.exports={ "cubehelix": [{"index":0,"rgb":[0,0,0]},{"index":0.07,"rgb":[22,5,59]},{"index":0.13,"rgb":[60,4,105]},{"index":0.2,"rgb":[109,1,135]},{"index":0.27,"rgb":[161,0,147]},{"index":0.33,"rgb":[210,2,142]},{"index":0.4,"rgb":[251,11,123]},{"index":0.47,"rgb":[255,29,97]},{"index":0.53,"rgb":[255,54,69]},{"index":0.6,"rgb":[255,85,46]},{"index":0.67,"rgb":[255,120,34]},{"index":0.73,"rgb":[255,157,37]},{"index":0.8,"rgb":[241,191,57]},{"index":0.87,"rgb":[224,220,93]},{"index":0.93,"rgb":[218,241,142]},{"index":1,"rgb":[227,253,198]}] }; -},{}],92:[function(require,module,exports){ +},{}],89:[function(require,module,exports){ /* * Ben Postlethwaite * January 2013 @@ -11510,7 +11460,7 @@ function rgbaStr (rgba) { return 'rgba(' + rgba.join(',') + ')'; } -},{"./colorScales":91,"arraytools":39,"clone":84}],93:[function(require,module,exports){ +},{"./colorScales":88,"arraytools":36,"clone":81}],90:[function(require,module,exports){ "use strict" module.exports = compareAngle @@ -11596,7 +11546,7 @@ function compareAngle(a, b, c, d) { } } } -},{"robust-orientation":489,"robust-product":490,"robust-sum":494,"signum":496,"two-sum":520}],94:[function(require,module,exports){ +},{"robust-orientation":486,"robust-product":487,"robust-sum":491,"signum":493,"two-sum":517}],91:[function(require,module,exports){ module.exports = compareCells var min = Math.min @@ -11652,7 +11602,7 @@ function compareCells(a, b) { } } -},{}],95:[function(require,module,exports){ +},{}],92:[function(require,module,exports){ 'use strict' var compareCells = require('compare-cell') @@ -11664,7 +11614,7 @@ function compareOrientedCells(a, b) { return compareCells(a, b) || parity(a) - parity(b) } -},{"cell-orientation":78,"compare-cell":94}],96:[function(require,module,exports){ +},{"cell-orientation":75,"compare-cell":91}],93:[function(require,module,exports){ "use strict" var convexHull1d = require('./lib/ch1d') @@ -11690,7 +11640,7 @@ function convexHull(points) { } return convexHullnd(points, d) } -},{"./lib/ch1d":97,"./lib/ch2d":98,"./lib/chnd":99}],97:[function(require,module,exports){ +},{"./lib/ch1d":94,"./lib/ch2d":95,"./lib/chnd":96}],94:[function(require,module,exports){ "use strict" module.exports = convexHull1d @@ -11714,7 +11664,7 @@ function convexHull1d(points) { return [[lo]] } } -},{}],98:[function(require,module,exports){ +},{}],95:[function(require,module,exports){ 'use strict' module.exports = convexHull2D @@ -11737,7 +11687,7 @@ function convexHull2D(points) { return edges } -},{"monotone-convex-hull-2d":433}],99:[function(require,module,exports){ +},{"monotone-convex-hull-2d":430}],96:[function(require,module,exports){ 'use strict' module.exports = convexHullnD @@ -11798,7 +11748,7 @@ function convexHullnD(points, d) { return invPermute(nhull, ah) } } -},{"affine-hull":36,"incremental-convex-hull":273}],100:[function(require,module,exports){ +},{"affine-hull":33,"incremental-convex-hull":270}],97:[function(require,module,exports){ module.exports = { AFG: 'afghan', ALA: '\\b\\wland', @@ -12057,7 +12007,7 @@ module.exports = { ZWE: 'zimbabwe|^(?!.*northern).*rhodesia' } -},{}],101:[function(require,module,exports){ +},{}],98:[function(require,module,exports){ // (c) Dean McNamee , 2012. // // https://github.com/deanm/css-color-parser-js @@ -12260,7 +12210,7 @@ function parseCSSColor(css_str) { try { exports.parseCSSColor = parseCSSColor } catch(e) { } -},{}],102:[function(require,module,exports){ +},{}],99:[function(require,module,exports){ "use strict" function dcubicHermite(p0, v0, p1, v1, t, f) { @@ -12300,7 +12250,7 @@ function cubicHermite(p0, v0, p1, v1, t, f) { module.exports = cubicHermite module.exports.derivative = dcubicHermite -},{}],103:[function(require,module,exports){ +},{}],100:[function(require,module,exports){ "use strict" var createThunk = require("./lib/thunk.js") @@ -12411,7 +12361,7 @@ function compileCwise(user_args) { module.exports = compileCwise -},{"./lib/thunk.js":105}],104:[function(require,module,exports){ +},{"./lib/thunk.js":102}],101:[function(require,module,exports){ "use strict" var uniq = require("uniq") @@ -12767,7 +12717,7 @@ function generateCWiseOp(proc, typesig) { } module.exports = generateCWiseOp -},{"uniq":523}],105:[function(require,module,exports){ +},{"uniq":520}],102:[function(require,module,exports){ "use strict" // The function below is called when constructing a cwise function object, and does the following: @@ -12855,9 +12805,9 @@ function createThunk(proc) { module.exports = createThunk -},{"./compile.js":104}],106:[function(require,module,exports){ +},{"./compile.js":101}],103:[function(require,module,exports){ module.exports = require("cwise-compiler") -},{"cwise-compiler":103}],107:[function(require,module,exports){ +},{"cwise-compiler":100}],104:[function(require,module,exports){ !function() { var d3 = { version: "3.5.17" @@ -22412,7 +22362,7 @@ module.exports = require("cwise-compiler") }); if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3; }(); -},{}],108:[function(require,module,exports){ +},{}],105:[function(require,module,exports){ "use strict" var ch = require("incremental-convex-hull") @@ -22572,7 +22522,7 @@ function triangulate(points, includePointAtInfinity) { return hull } -},{"incremental-convex-hull":273,"uniq":523}],109:[function(require,module,exports){ +},{"incremental-convex-hull":270,"uniq":520}],106:[function(require,module,exports){ (function (Buffer){ var hasTypedArrays = false if(typeof Float64Array !== "undefined") { @@ -22676,7 +22626,7 @@ module.exports.denormalized = function(n) { return !(hi & 0x7ff00000) } }).call(this,require("buffer").Buffer) -},{"buffer":70}],110:[function(require,module,exports){ +},{"buffer":67}],107:[function(require,module,exports){ "use strict" function dupe_array(count, value, i) { @@ -22726,7 +22676,7 @@ function dupe(count, value) { } module.exports = dupe -},{}],111:[function(require,module,exports){ +},{}],108:[function(require,module,exports){ 'use strict'; module.exports = earcut; @@ -23372,7 +23322,7 @@ earcut.flatten = function (data) { return result; }; -},{}],112:[function(require,module,exports){ +},{}],109:[function(require,module,exports){ "use strict" module.exports = edgeToAdjacency @@ -23406,7 +23356,7 @@ function edgeToAdjacency(edges, numVertices) { } return adj } -},{"uniq":523}],113:[function(require,module,exports){ +},{"uniq":520}],110:[function(require,module,exports){ (function (process,global){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. @@ -24563,7 +24513,7 @@ return Promise; }))); }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":468}],114:[function(require,module,exports){ +},{"_process":465}],111:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -24867,7 +24817,7 @@ function isUndefined(arg) { return arg === void 0; } -},{}],115:[function(require,module,exports){ +},{}],112:[function(require,module,exports){ "use strict" module.exports = extractPlanes @@ -24884,7 +24834,7 @@ function extractPlanes(M, zNear, zFar) { [ zf*M[12] - M[8], zf*M[13] - M[9], zf*M[14] - M[10], zf*M[15] - M[11] ] ] } -},{}],116:[function(require,module,exports){ +},{}],113:[function(require,module,exports){ /** * inspired by is-number * but significantly simplified and sped up by ignoring number and string constructors @@ -24941,7 +24891,7 @@ module.exports = function(n) { return n - n < 1; }; -},{}],117:[function(require,module,exports){ +},{}],114:[function(require,module,exports){ 'use strict'; module.exports = createFilter; @@ -25025,7 +24975,7 @@ function compare(a, b) { return a < b ? -1 : a > b ? 1 : 0; } -},{}],118:[function(require,module,exports){ +},{}],115:[function(require,module,exports){ 'use strict' module.exports = createFilteredVector @@ -25318,7 +25268,7 @@ function createFilteredVector(initState, initVelocity, initTime) { } } -},{"binary-search-bounds":59,"cubic-hermite":102}],119:[function(require,module,exports){ +},{"binary-search-bounds":56,"cubic-hermite":99}],116:[function(require,module,exports){ 'use strict' var SDF = require('tiny-sdf') @@ -25402,7 +25352,7 @@ function atlas(options) { return canvas } -},{"tiny-sdf":513}],120:[function(require,module,exports){ +},{"tiny-sdf":510}],117:[function(require,module,exports){ "use strict" module.exports = createRBTree @@ -26399,7 +26349,7 @@ function defaultCompare(a, b) { function createRBTree(compare) { return new RedBlackTree(compare || defaultCompare, null) } -},{}],121:[function(require,module,exports){ +},{}],118:[function(require,module,exports){ // transliterated from the python snippet here: // http://en.wikipedia.org/wiki/Lanczos_approximation @@ -26468,7 +26418,7 @@ module.exports = function gamma (z) { module.exports.log = lngamma; -},{}],122:[function(require,module,exports){ +},{}],119:[function(require,module,exports){ var wgs84 = require('wgs84'); module.exports.geometry = geometry; @@ -26534,7 +26484,7 @@ function rad(_) { return _ * Math.PI / 180; } -},{"wgs84":545}],123:[function(require,module,exports){ +},{"wgs84":542}],120:[function(require,module,exports){ var geojsonArea = require('geojson-area'); module.exports = rewind; @@ -26585,7 +26535,7 @@ function cw(_) { return geojsonArea.ring(_) >= 0; } -},{"geojson-area":122}],124:[function(require,module,exports){ +},{"geojson-area":119}],121:[function(require,module,exports){ 'use strict'; module.exports = clip; @@ -26736,7 +26686,7 @@ function newSlice(slices, slice, area, dist, outer) { return []; } -},{"./feature":126}],125:[function(require,module,exports){ +},{"./feature":123}],122:[function(require,module,exports){ 'use strict'; module.exports = convert; @@ -26859,7 +26809,7 @@ function calcSize(points) { points.dist = dist; } -},{"./feature":126,"./simplify":128}],126:[function(require,module,exports){ +},{"./feature":123,"./simplify":125}],123:[function(require,module,exports){ 'use strict'; module.exports = createFeature; @@ -26904,7 +26854,7 @@ function calcRingBBox(min, max, points) { } } -},{}],127:[function(require,module,exports){ +},{}],124:[function(require,module,exports){ 'use strict'; module.exports = geojsonvt; @@ -27148,7 +27098,7 @@ function isClippedSquare(tile, extent, buffer) { return true; } -},{"./clip":124,"./convert":125,"./tile":129,"./transform":130,"./wrap":131}],128:[function(require,module,exports){ +},{"./clip":121,"./convert":122,"./tile":126,"./transform":127,"./wrap":128}],125:[function(require,module,exports){ 'use strict'; module.exports = simplify; @@ -27224,7 +27174,7 @@ function getSqSegDist(p, a, b) { return dx * dx + dy * dy; } -},{}],129:[function(require,module,exports){ +},{}],126:[function(require,module,exports){ 'use strict'; module.exports = createTile; @@ -27332,7 +27282,7 @@ function signedArea(ring) { return sum; } -},{}],130:[function(require,module,exports){ +},{}],127:[function(require,module,exports){ 'use strict'; exports.tile = transformTile; @@ -27375,7 +27325,7 @@ function transformPoint(p, extent, z2, tx, ty) { return [x, y]; } -},{}],131:[function(require,module,exports){ +},{}],128:[function(require,module,exports){ 'use strict'; var clip = require('./clip'); @@ -27433,7 +27383,7 @@ function shiftCoords(points, offset) { return newPoints; } -},{"./clip":124,"./feature":126}],132:[function(require,module,exports){ +},{"./clip":121,"./feature":123}],129:[function(require,module,exports){ module.exports = getCanvasContext function getCanvasContext (type, opts) { if (typeof type !== 'string') { @@ -27473,7 +27423,7 @@ function getCanvasContext (type, opts) { return (gl || null) // ensure null on fail } -},{}],133:[function(require,module,exports){ +},{}],130:[function(require,module,exports){ 'use strict' module.exports = createAxes @@ -27996,7 +27946,7 @@ function createAxes(gl, options) { return axes } -},{"./lib/background.js":134,"./lib/cube.js":135,"./lib/lines.js":136,"./lib/text.js":138,"./lib/ticks.js":139}],134:[function(require,module,exports){ +},{"./lib/background.js":131,"./lib/cube.js":132,"./lib/lines.js":133,"./lib/text.js":135,"./lib/ticks.js":136}],131:[function(require,module,exports){ 'use strict' module.exports = createBackgroundCube @@ -28108,7 +28058,7 @@ function createBackgroundCube(gl) { return new BackgroundCube(gl, buffer, vao, shader) } -},{"./shaders":137,"gl-buffer":141,"gl-vao":255}],135:[function(require,module,exports){ +},{"./shaders":134,"gl-buffer":138,"gl-vao":252}],132:[function(require,module,exports){ "use strict" module.exports = getCubeEdges @@ -28349,7 +28299,7 @@ function getCubeEdges(model, view, projection, bounds) { //Return result return CUBE_RESULT } -},{"bit-twiddle":60,"gl-mat4/invert":165,"gl-mat4/multiply":167,"robust-orientation":489,"split-polygon":507}],136:[function(require,module,exports){ +},{"bit-twiddle":57,"gl-mat4/invert":162,"gl-mat4/multiply":164,"robust-orientation":486,"split-polygon":504}],133:[function(require,module,exports){ 'use strict' module.exports = createLines @@ -28555,7 +28505,7 @@ function createLines(gl, bounds, ticks) { return new Lines(gl, vertBuf, vao, shader, tickCount, tickOffset, gridCount, gridOffset) } -},{"./shaders":137,"gl-buffer":141,"gl-vao":255}],137:[function(require,module,exports){ +},{"./shaders":134,"gl-buffer":138,"gl-vao":252}],134:[function(require,module,exports){ 'use strict' @@ -28586,7 +28536,7 @@ exports.bg = function(gl) { ]) } -},{"gl-shader":239}],138:[function(require,module,exports){ +},{"gl-shader":236}],135:[function(require,module,exports){ (function (process){ "use strict" @@ -28788,7 +28738,7 @@ function createTextSprites( } }).call(this,require('_process')) -},{"./shaders":137,"_process":468,"gl-buffer":141,"gl-vao":255,"vectorize-text":534}],139:[function(require,module,exports){ +},{"./shaders":134,"_process":465,"gl-buffer":138,"gl-vao":252,"vectorize-text":531}],136:[function(require,module,exports){ 'use strict' exports.create = defaultTicks @@ -28869,7 +28819,7 @@ function ticksEqual(ticksA, ticksB) { } return true } -},{}],140:[function(require,module,exports){ +},{}],137:[function(require,module,exports){ "use strict" module.exports = axesProperties @@ -29011,7 +28961,7 @@ i_loop: return ranges } -},{"./lib/cube.js":135,"extract-frustum-planes":115,"gl-mat4/multiply":167,"gl-mat4/transpose":175,"gl-vec4/transformMat4":261,"split-polygon":507}],141:[function(require,module,exports){ +},{"./lib/cube.js":132,"extract-frustum-planes":112,"gl-mat4/multiply":164,"gl-mat4/transpose":172,"gl-vec4/transformMat4":258,"split-polygon":504}],138:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -29165,7 +29115,7 @@ function createBuffer(gl, data, type, usage) { module.exports = createBuffer -},{"ndarray":449,"ndarray-ops":443,"typedarray-pool":521}],142:[function(require,module,exports){ +},{"ndarray":446,"ndarray-ops":440,"typedarray-pool":518}],139:[function(require,module,exports){ module.exports = { 0: 'NONE', 1: 'ONE', @@ -29465,14 +29415,14 @@ module.exports = { 37444: 'BROWSER_DEFAULT_WEBGL' } -},{}],143:[function(require,module,exports){ +},{}],140:[function(require,module,exports){ var gl10 = require('./1.0/numbers') module.exports = function lookupConstant (number) { return gl10[number] } -},{"./1.0/numbers":142}],144:[function(require,module,exports){ +},{"./1.0/numbers":139}],141:[function(require,module,exports){ 'use strict' var createShader = require('gl-shader') @@ -29737,7 +29687,7 @@ function createError2D (plot, options) { return errorBars } -},{"./lib/shaders":145,"gl-buffer":141,"gl-shader":239,"typedarray-pool":521}],145:[function(require,module,exports){ +},{"./lib/shaders":142,"gl-buffer":138,"gl-shader":236,"typedarray-pool":518}],142:[function(require,module,exports){ module.exports = { @@ -29745,7 +29695,7 @@ module.exports = { fragment: "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n" } -},{}],146:[function(require,module,exports){ +},{}],143:[function(require,module,exports){ 'use strict' module.exports = createErrorBars @@ -29982,7 +29932,7 @@ function createErrorBars(options) { return result } -},{"./shaders/index":147,"gl-buffer":141,"gl-vao":255}],147:[function(require,module,exports){ +},{"./shaders/index":144,"gl-buffer":138,"gl-vao":252}],144:[function(require,module,exports){ 'use strict' @@ -29999,7 +29949,7 @@ module.exports = function(gl) { ]) } -},{"gl-shader":239}],148:[function(require,module,exports){ +},{"gl-shader":236}],145:[function(require,module,exports){ 'use strict' var createTexture = require('gl-texture2d') @@ -30466,7 +30416,7 @@ function createFBO(gl, width, height, options) { WEBGL_draw_buffers) } -},{"gl-texture2d":251}],149:[function(require,module,exports){ +},{"gl-texture2d":248}],146:[function(require,module,exports){ var sprintf = require('sprintf-js').sprintf; var glConstants = require('gl-constants/lookup'); @@ -30521,7 +30471,7 @@ function formatCompilerError(errLog, src, type) { } -},{"add-line-numbers":35,"gl-constants/lookup":143,"glsl-shader-name":263,"sprintf-js":508}],150:[function(require,module,exports){ +},{"add-line-numbers":32,"gl-constants/lookup":140,"glsl-shader-name":260,"sprintf-js":505}],147:[function(require,module,exports){ 'use strict' module.exports = createHeatmap2D @@ -30839,7 +30789,7 @@ function createHeatmap2D (plot, options) { return heatmap } -},{"./lib/shaders":151,"binary-search-bounds":152,"gl-buffer":141,"gl-shader":239,"iota-array":276,"typedarray-pool":521}],151:[function(require,module,exports){ +},{"./lib/shaders":148,"binary-search-bounds":149,"gl-buffer":138,"gl-shader":236,"iota-array":273,"typedarray-pool":518}],148:[function(require,module,exports){ 'use strict' @@ -30851,9 +30801,9 @@ module.exports = { pickVertex: "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nvoid main() {\n vWeight = weight;\n\n fragId = pickId;\n\n vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n" } -},{}],152:[function(require,module,exports){ -arguments[4][77][0].apply(exports,arguments) -},{"dup":77}],153:[function(require,module,exports){ +},{}],149:[function(require,module,exports){ +arguments[4][74][0].apply(exports,arguments) +},{"dup":74}],150:[function(require,module,exports){ exports.lineVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aHi, aLo, dHi, dLo;\n\nuniform vec2 scaleHi, translateHi, scaleLo, translateLo, screenShape;\nuniform float width;\n\nvarying vec2 direction;\n\n\nvec2 project_1_0(vec2 scHi, vec2 trHi, vec2 scLo, vec2 trLo, vec2 posHi, vec2 posLo) {\n return (posHi + trHi) * scHi\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo;\n}\n\n\nvec2 project_2_1(vec2 scHi, vec2 scLo, vec2 posHi, vec2 posLo) {\n return scHi * posHi\n + scLo * posHi\n + scHi * posLo\n + scLo * posLo;\n}\n\nvoid main() {\n vec2 p = project_1_0(scaleHi, translateHi, scaleLo, translateLo, aHi, aLo);\n vec2 dir = project_2_1(scaleHi, scaleLo, dHi, dLo);\n vec2 n = 0.5 * width * normalize(screenShape.yx * vec2(dir.y, -dir.x)) / screenShape.xy;\n vec2 tangent = normalize(screenShape.xy * dir);\n if(dir.x < 0.0 || (dir.x == 0.0 && dir.y < 0.0)) {\n direction = -tangent;\n } else {\n direction = tangent;\n }\n gl_Position = vec4(p + n, 0.0, 1.0);\n}" @@ -30864,7 +30814,7 @@ exports.pickVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute exports.pickFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 pickOffset;\n\nvarying vec4 pickA, pickB;\n\nvoid main() {\n vec4 fragId = vec4(pickA.xyz, 0.0);\n if(pickB.w > pickA.w) {\n fragId.xyz = pickB.xyz;\n }\n\n fragId += pickOffset;\n\n fragId.y += floor(fragId.x / 256.0);\n fragId.x -= floor(fragId.x / 256.0) * 256.0;\n\n fragId.z += floor(fragId.y / 256.0);\n fragId.y -= floor(fragId.y / 256.0) * 256.0;\n\n fragId.w += floor(fragId.z / 256.0);\n fragId.z -= floor(fragId.z / 256.0) * 256.0;\n\n gl_FragColor = fragId / 255.0;\n}" exports.fillVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aHi, aLo, dHi;\n\nuniform vec2 scaleHi, translateHi, scaleLo, translateLo, projectAxis;\nuniform float projectValue, depth;\n\n\nvec2 project_1_0(vec2 scHi, vec2 trHi, vec2 scLo, vec2 trLo, vec2 posHi, vec2 posLo) {\n return (posHi + trHi) * scHi\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo;\n}\n\n\nvoid main() {\n vec2 p = project_1_0(scaleHi, translateHi, scaleLo, translateLo, aHi, aLo);\n if(dHi.y < 0.0 || (dHi.y == 0.0 && dHi.x < 0.0)) {\n if(dot(p, projectAxis) < projectValue) {\n p = p * (1.0 - abs(projectAxis)) + projectAxis * projectValue;\n }\n }\n gl_Position = vec4(p, depth, 1);\n}" exports.fillFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}" -},{}],154:[function(require,module,exports){ +},{}],151:[function(require,module,exports){ 'use strict' module.exports = createLinePlot @@ -31377,7 +31327,7 @@ function createLinePlot(plot, options) { linePlot.update(options) return linePlot } -},{"./lib/shaders":153,"gl-buffer":141,"gl-shader":239,"gl-texture2d":251,"ndarray":449,"typedarray-pool":521}],155:[function(require,module,exports){ +},{"./lib/shaders":150,"gl-buffer":138,"gl-shader":236,"gl-texture2d":248,"ndarray":446,"typedarray-pool":518}],152:[function(require,module,exports){ var createShader = require('gl-shader') @@ -31401,7 +31351,7 @@ exports.createPickShader = function(gl) { return createShader(gl, vertSrc, pickFrag, null, ATTRIBUTES) } -},{"gl-shader":239}],156:[function(require,module,exports){ +},{"gl-shader":236}],153:[function(require,module,exports){ 'use strict' module.exports = createLinePlot @@ -31771,7 +31721,7 @@ function createLinePlot (options) { return linePlot } -},{"./lib/shaders":155,"binary-search-bounds":59,"gl-buffer":141,"gl-texture2d":251,"gl-vao":255,"glsl-read-float":262,"ndarray":449}],157:[function(require,module,exports){ +},{"./lib/shaders":152,"binary-search-bounds":56,"gl-buffer":138,"gl-texture2d":248,"gl-vao":252,"glsl-read-float":259,"ndarray":446}],154:[function(require,module,exports){ module.exports = invert /** @@ -31800,7 +31750,7 @@ function invert(out, a) { return out } -},{}],158:[function(require,module,exports){ +},{}],155:[function(require,module,exports){ module.exports = invert /** @@ -31839,7 +31789,7 @@ function invert(out, a) { return out } -},{}],159:[function(require,module,exports){ +},{}],156:[function(require,module,exports){ module.exports = clone; /** @@ -31868,7 +31818,7 @@ function clone(a) { out[15] = a[15]; return out; }; -},{}],160:[function(require,module,exports){ +},{}],157:[function(require,module,exports){ module.exports = create; /** @@ -31896,7 +31846,7 @@ function create() { out[15] = 1; return out; }; -},{}],161:[function(require,module,exports){ +},{}],158:[function(require,module,exports){ module.exports = determinant; /** @@ -31927,7 +31877,7 @@ function determinant(a) { // Calculate the determinant return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; }; -},{}],162:[function(require,module,exports){ +},{}],159:[function(require,module,exports){ module.exports = fromQuat; /** @@ -31975,7 +31925,7 @@ function fromQuat(out, q) { return out; }; -},{}],163:[function(require,module,exports){ +},{}],160:[function(require,module,exports){ module.exports = fromRotationTranslation; /** @@ -32029,7 +31979,7 @@ function fromRotationTranslation(out, q, v) { return out; }; -},{}],164:[function(require,module,exports){ +},{}],161:[function(require,module,exports){ module.exports = identity; /** @@ -32057,7 +32007,7 @@ function identity(out) { out[15] = 1; return out; }; -},{}],165:[function(require,module,exports){ +},{}],162:[function(require,module,exports){ module.exports = invert; /** @@ -32113,7 +32063,7 @@ function invert(out, a) { return out; }; -},{}],166:[function(require,module,exports){ +},{}],163:[function(require,module,exports){ var identity = require('./identity'); module.exports = lookAt; @@ -32204,7 +32154,7 @@ function lookAt(out, eye, center, up) { return out; }; -},{"./identity":164}],167:[function(require,module,exports){ +},{"./identity":161}],164:[function(require,module,exports){ module.exports = multiply; /** @@ -32247,7 +32197,7 @@ function multiply(out, a, b) { out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33; return out; }; -},{}],168:[function(require,module,exports){ +},{}],165:[function(require,module,exports){ module.exports = perspective; /** @@ -32281,7 +32231,7 @@ function perspective(out, fovy, aspect, near, far) { out[15] = 0; return out; }; -},{}],169:[function(require,module,exports){ +},{}],166:[function(require,module,exports){ module.exports = rotate; /** @@ -32346,7 +32296,7 @@ function rotate(out, a, rad, axis) { } return out; }; -},{}],170:[function(require,module,exports){ +},{}],167:[function(require,module,exports){ module.exports = rotateX; /** @@ -32391,7 +32341,7 @@ function rotateX(out, a, rad) { out[11] = a23 * c - a13 * s; return out; }; -},{}],171:[function(require,module,exports){ +},{}],168:[function(require,module,exports){ module.exports = rotateY; /** @@ -32436,7 +32386,7 @@ function rotateY(out, a, rad) { out[11] = a03 * s + a23 * c; return out; }; -},{}],172:[function(require,module,exports){ +},{}],169:[function(require,module,exports){ module.exports = rotateZ; /** @@ -32481,7 +32431,7 @@ function rotateZ(out, a, rad) { out[7] = a13 * c - a03 * s; return out; }; -},{}],173:[function(require,module,exports){ +},{}],170:[function(require,module,exports){ module.exports = scale; /** @@ -32513,7 +32463,7 @@ function scale(out, a, v) { out[15] = a[15]; return out; }; -},{}],174:[function(require,module,exports){ +},{}],171:[function(require,module,exports){ module.exports = translate; /** @@ -32552,7 +32502,7 @@ function translate(out, a, v) { return out; }; -},{}],175:[function(require,module,exports){ +},{}],172:[function(require,module,exports){ module.exports = transpose; /** @@ -32602,7 +32552,7 @@ function transpose(out, a) { return out; }; -},{}],176:[function(require,module,exports){ +},{}],173:[function(require,module,exports){ 'use strict' module.exports = invert @@ -32633,7 +32583,7 @@ function invert(out, M) { } return out } -},{"gl-mat2/invert":157,"gl-mat3/invert":158,"gl-mat4/invert":165}],177:[function(require,module,exports){ +},{"gl-mat2/invert":154,"gl-mat3/invert":155,"gl-mat4/invert":162}],174:[function(require,module,exports){ /** * @fileoverview gl-matrix - High performance matrix and vector operations * @author Brandon Jones @@ -32671,7 +32621,7 @@ exports.quat = require("./gl-matrix/quat.js"); exports.vec2 = require("./gl-matrix/vec2.js"); exports.vec3 = require("./gl-matrix/vec3.js"); exports.vec4 = require("./gl-matrix/vec4.js"); -},{"./gl-matrix/common.js":178,"./gl-matrix/mat2.js":179,"./gl-matrix/mat2d.js":180,"./gl-matrix/mat3.js":181,"./gl-matrix/mat4.js":182,"./gl-matrix/quat.js":183,"./gl-matrix/vec2.js":184,"./gl-matrix/vec3.js":185,"./gl-matrix/vec4.js":186}],178:[function(require,module,exports){ +},{"./gl-matrix/common.js":175,"./gl-matrix/mat2.js":176,"./gl-matrix/mat2d.js":177,"./gl-matrix/mat3.js":178,"./gl-matrix/mat4.js":179,"./gl-matrix/quat.js":180,"./gl-matrix/vec2.js":181,"./gl-matrix/vec3.js":182,"./gl-matrix/vec4.js":183}],175:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -32743,7 +32693,7 @@ glMatrix.equals = function(a, b) { module.exports = glMatrix; -},{}],179:[function(require,module,exports){ +},{}],176:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -33181,7 +33131,7 @@ mat2.multiplyScalarAndAdd = function(out, a, b, scale) { module.exports = mat2; -},{"./common.js":178}],180:[function(require,module,exports){ +},{"./common.js":175}],177:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -33652,7 +33602,7 @@ mat2d.equals = function (a, b) { module.exports = mat2d; -},{"./common.js":178}],181:[function(require,module,exports){ +},{"./common.js":175}],178:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34400,7 +34350,7 @@ mat3.equals = function (a, b) { module.exports = mat3; -},{"./common.js":178}],182:[function(require,module,exports){ +},{"./common.js":175}],179:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36538,7 +36488,7 @@ mat4.equals = function (a, b) { module.exports = mat4; -},{"./common.js":178}],183:[function(require,module,exports){ +},{"./common.js":175}],180:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -37140,7 +37090,7 @@ quat.equals = vec4.equals; module.exports = quat; -},{"./common.js":178,"./mat3.js":181,"./vec3.js":185,"./vec4.js":186}],184:[function(require,module,exports){ +},{"./common.js":175,"./mat3.js":178,"./vec3.js":182,"./vec4.js":183}],181:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -37729,7 +37679,7 @@ vec2.equals = function (a, b) { module.exports = vec2; -},{"./common.js":178}],185:[function(require,module,exports){ +},{"./common.js":175}],182:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -38508,7 +38458,7 @@ vec3.equals = function (a, b) { module.exports = vec3; -},{"./common.js":178}],186:[function(require,module,exports){ +},{"./common.js":175}],183:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -39119,7 +39069,7 @@ vec4.equals = function (a, b) { module.exports = vec4; -},{"./common.js":178}],187:[function(require,module,exports){ +},{"./common.js":175}],184:[function(require,module,exports){ 'use strict' var barycentric = require('barycentric') @@ -39217,7 +39167,7 @@ function closestPointToPickLocation(simplex, pixelCoord, model, view, projection } return [closestIndex, interpolate(simplex, weights), weights] } -},{"barycentric":42,"polytope-closest-point/lib/closest_point_2d.js":467}],188:[function(require,module,exports){ +},{"barycentric":39,"polytope-closest-point/lib/closest_point_2d.js":464}],185:[function(require,module,exports){ var triVertSrc = "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec4 m_position = model * vec4(position, 1.0);\n vec4 t_position = view * m_position;\n gl_Position = projection * t_position;\n f_color = color;\n f_normal = normal;\n f_data = position;\n f_eyeDirection = eyePosition - position;\n f_lightDirection = lightPosition - position;\n f_uv = uv;\n}" @@ -39286,7 +39236,7 @@ exports.contourShader = { ] } -},{}],189:[function(require,module,exports){ +},{}],186:[function(require,module,exports){ 'use strict' var DEFAULT_VERTEX_NORMALS_EPSILON = 1e-6; // may be too large if triangles are very small @@ -40301,7 +40251,7 @@ function createSimplicialMesh(params) { module.exports = createSimplicialMesh -},{"./lib/closest-point":187,"./lib/shaders":188,"colormap":92,"gl-buffer":141,"gl-mat4/invert":165,"gl-mat4/multiply":167,"gl-shader":239,"gl-texture2d":251,"gl-vao":255,"ndarray":449,"normals":451,"simplicial-complex-contour":498,"typedarray-pool":521}],190:[function(require,module,exports){ +},{"./lib/closest-point":184,"./lib/shaders":185,"colormap":89,"gl-buffer":138,"gl-mat4/invert":162,"gl-mat4/multiply":164,"gl-shader":236,"gl-texture2d":248,"gl-vao":252,"ndarray":446,"normals":448,"simplicial-complex-contour":495,"typedarray-pool":518}],187:[function(require,module,exports){ 'use strict' module.exports = createBoxes @@ -40364,7 +40314,7 @@ function createBoxes(plot) { return new Boxes(plot, vbo, shader) } -},{"./shaders":193,"gl-buffer":141,"gl-shader":196}],191:[function(require,module,exports){ +},{"./shaders":190,"gl-buffer":138,"gl-shader":193}],188:[function(require,module,exports){ 'use strict' module.exports = createGrid @@ -40611,7 +40561,7 @@ function createGrid(plot) { return grid } -},{"./shaders":193,"binary-search-bounds":195,"gl-buffer":141,"gl-shader":196}],192:[function(require,module,exports){ +},{"./shaders":190,"binary-search-bounds":192,"gl-buffer":138,"gl-shader":193}],189:[function(require,module,exports){ 'use strict' module.exports = createLines @@ -40676,7 +40626,7 @@ function createLines(plot) { return lines } -},{"./shaders":193,"gl-buffer":141,"gl-shader":196}],193:[function(require,module,exports){ +},{"./shaders":190,"gl-buffer":138,"gl-shader":193}],190:[function(require,module,exports){ 'use strict' @@ -40694,7 +40644,7 @@ module.exports = { tickVert: "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\n\nvoid main() {\n vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\n}\n" } -},{}],194:[function(require,module,exports){ +},{}],191:[function(require,module,exports){ 'use strict' module.exports = createTextElements @@ -40972,9 +40922,9 @@ function createTextElements(plot) { return text } -},{"./shaders":193,"binary-search-bounds":195,"gl-buffer":141,"gl-shader":196,"text-cache":512}],195:[function(require,module,exports){ -arguments[4][77][0].apply(exports,arguments) -},{"dup":77}],196:[function(require,module,exports){ +},{"./shaders":190,"binary-search-bounds":192,"gl-buffer":138,"gl-shader":193,"text-cache":509}],192:[function(require,module,exports){ +arguments[4][74][0].apply(exports,arguments) +},{"dup":74}],193:[function(require,module,exports){ 'use strict' var createUniformWrapper = require('./lib/create-uniforms') @@ -41240,7 +41190,7 @@ function createShader( module.exports = createShader -},{"./lib/GLError":197,"./lib/create-attributes":198,"./lib/create-uniforms":199,"./lib/reflect":200,"./lib/runtime-reflect":201,"./lib/shader-cache":202}],197:[function(require,module,exports){ +},{"./lib/GLError":194,"./lib/create-attributes":195,"./lib/create-uniforms":196,"./lib/reflect":197,"./lib/runtime-reflect":198,"./lib/shader-cache":199}],194:[function(require,module,exports){ function GLError (rawError, shortMessage, longMessage) { this.shortMessage = shortMessage || '' this.longMessage = longMessage || '' @@ -41255,7 +41205,7 @@ GLError.prototype.name = 'GLError' GLError.prototype.constructor = GLError module.exports = GLError -},{}],198:[function(require,module,exports){ +},{}],195:[function(require,module,exports){ 'use strict' module.exports = createAttributeWrapper @@ -41520,7 +41470,7 @@ function createAttributeWrapper( return obj } -},{"./GLError":197}],199:[function(require,module,exports){ +},{"./GLError":194}],196:[function(require,module,exports){ 'use strict' var coallesceUniforms = require('./reflect') @@ -41713,7 +41663,7 @@ function createUniformWrapper(gl, wrapper, uniforms, locations) { } } -},{"./GLError":197,"./reflect":200}],200:[function(require,module,exports){ +},{"./GLError":194,"./reflect":197}],197:[function(require,module,exports){ 'use strict' module.exports = makeReflectTypes @@ -41771,7 +41721,7 @@ function makeReflectTypes(uniforms, useIndex) { } return obj } -},{}],201:[function(require,module,exports){ +},{}],198:[function(require,module,exports){ 'use strict' exports.uniforms = runtimeUniforms @@ -41851,7 +41801,7 @@ function runtimeAttributes(gl, program) { return result } -},{}],202:[function(require,module,exports){ +},{}],199:[function(require,module,exports){ 'use strict' exports.shader = getShaderReference @@ -41989,7 +41939,7 @@ function createProgram(gl, vref, fref, attribs, locations) { return getCache(gl).getProgram(vref, fref, attribs, locations) } -},{"./GLError":197,"gl-format-compiler-error":149,"weakmap-shim":542}],203:[function(require,module,exports){ +},{"./GLError":194,"gl-format-compiler-error":146,"weakmap-shim":539}],200:[function(require,module,exports){ 'use strict' module.exports = createGLPlot2D @@ -42570,783 +42520,784 @@ function createGLPlot2D(options) { return plot } -},{"./lib/box":190,"./lib/grid":191,"./lib/line":192,"./lib/text":194,"gl-select-static":238}],204:[function(require,module,exports){ - -var createShader = require('gl-shader') - -var vertSrc = "precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}" -var fragSrc = "precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}" - -module.exports = function(gl) { - return createShader(gl, vertSrc, fragSrc, null, [ { name: 'position', type: 'vec2'}]) -} +},{"./lib/box":187,"./lib/grid":188,"./lib/line":189,"./lib/text":191,"gl-select-static":235}],201:[function(require,module,exports){ -},{"gl-shader":239}],205:[function(require,module,exports){ -'use strict' - -module.exports = createScene - -var createCamera = require('3d-view-controls') -var createAxes = require('gl-axes3d') -var axesRanges = require('gl-axes3d/properties') -var createSpikes = require('gl-spikes3d') -var createSelect = require('gl-select-static') -var createFBO = require('gl-fbo') -var drawTriangle = require('a-big-triangle') -var mouseChange = require('mouse-change') -var perspective = require('gl-mat4/perspective') -var createShader = require('./lib/shader') -var isMobile = require('is-mobile')() - -function MouseSelect() { - this.mouse = [-1,-1] - this.screen = null - this.distance = Infinity - this.index = null - this.dataCoordinate = null - this.dataPosition = null - this.object = null - this.data = null -} - -function getContext(canvas, options) { - var gl = null - try { - gl = canvas.getContext('webgl', options) - if(!gl) { - gl = canvas.getContext('experimental-webgl', options) - } - } catch(e) { - return null - } - return gl -} - -function roundUpPow10(x) { - var y = Math.round(Math.log(Math.abs(x)) / Math.log(10)) - if(y < 0) { - var base = Math.round(Math.pow(10, -y)) - return Math.ceil(x*base) / base - } else if(y > 0) { - var base = Math.round(Math.pow(10, y)) - return Math.ceil(x/base) * base - } - return Math.ceil(x) -} - -function defaultBool(x) { - if(typeof x === 'boolean') { - return x - } - return true -} - -function createScene(options) { - options = options || {} - - var stopped = false - - var pixelRatio = options.pixelRatio || parseFloat(window.devicePixelRatio) - - var canvas = options.canvas - if(!canvas) { - canvas = document.createElement('canvas') - if(options.container) { - var container = options.container - container.appendChild(canvas) - } else { - document.body.appendChild(canvas) - } - } - - var gl = options.gl - if(!gl) { - gl = getContext(canvas, - options.glOptions || { - premultipliedAlpha: true, - antialias: true - }) - } - if(!gl) { - throw new Error('webgl not supported') - } - - //Initial bounds - var bounds = options.bounds || [[-10,-10,-10], [10,10,10]] - - //Create selection - var selection = new MouseSelect() - - //Accumulation buffer - var accumBuffer = createFBO(gl, - [gl.drawingBufferWidth, gl.drawingBufferHeight], { - preferFloat: !isMobile - }) - - var accumShader = createShader(gl) - - //Create a camera - var cameraOptions = options.camera || { - eye: [2,0,0], - center: [0,0,0], - up: [0,1,0], - zoomMin: 0.1, - zoomMax: 100, - mode: 'turntable' - } - - //Create axes - var axesOptions = options.axes || {} - var axes = createAxes(gl, axesOptions) - axes.enable = !axesOptions.disable - - //Create spikes - var spikeOptions = options.spikes || {} - var spikes = createSpikes(gl, spikeOptions) - - //Object list is empty initially - var objects = [] - var pickBufferIds = [] - var pickBufferCount = [] - var pickBuffers = [] - - //Dirty flag, skip redraw if scene static - var dirty = true - var pickDirty = true - - var projection = new Array(16) - var model = new Array(16) - - var cameraParams = { - view: null, - projection: projection, - model: model - } - - var pickDirty = true - - var viewShape = [ gl.drawingBufferWidth, gl.drawingBufferHeight ] - - //Create scene object - var scene = { - gl: gl, - contextLost: false, - pixelRatio: options.pixelRatio || parseFloat(window.devicePixelRatio), - canvas: canvas, - selection: selection, - camera: createCamera(canvas, cameraOptions), - axes: axes, - axesPixels: null, - spikes: spikes, - bounds: bounds, - objects: objects, - shape: viewShape, - aspect: options.aspectRatio || [1,1,1], - pickRadius: options.pickRadius || 10, - zNear: options.zNear || 0.01, - zFar: options.zFar || 1000, - fovy: options.fovy || Math.PI/4, - clearColor: options.clearColor || [0,0,0,0], - autoResize: defaultBool(options.autoResize), - autoBounds: defaultBool(options.autoBounds), - autoScale: !!options.autoScale, - autoCenter: defaultBool(options.autoCenter), - clipToBounds: defaultBool(options.clipToBounds), - snapToData: !!options.snapToData, - onselect: options.onselect || null, - onrender: options.onrender || null, - onclick: options.onclick || null, - cameraParams: cameraParams, - oncontextloss: null, - mouseListener: null - } - - var pickShape = [ (gl.drawingBufferWidth/scene.pixelRatio)|0, (gl.drawingBufferHeight/scene.pixelRatio)|0 ] - - function resizeListener() { - if(stopped) { - return - } - if(!scene.autoResize) { - return - } - var parent = canvas.parentNode - var width = 1 - var height = 1 - if(parent && parent !== document.body) { - width = parent.clientWidth - height = parent.clientHeight - } else { - width = window.innerWidth - height = window.innerHeight - } - var nextWidth = Math.ceil(width * scene.pixelRatio)|0 - var nextHeight = Math.ceil(height * scene.pixelRatio)|0 - if(nextWidth !== canvas.width || nextHeight !== canvas.height) { - canvas.width = nextWidth - canvas.height = nextHeight - var style = canvas.style - style.position = style.position || 'absolute' - style.left = '0px' - style.top = '0px' - style.width = width + 'px' - style.height = height + 'px' - dirty = true - } - } - if(scene.autoResize) { - resizeListener() - } - window.addEventListener('resize', resizeListener) - - function reallocPickIds() { - var numObjs = objects.length - var numPick = pickBuffers.length - for(var i=0; i 0 && pickBufferCount[numPick-1] === 0) { - pickBufferCount.pop() - pickBuffers.pop().dispose() - } - } - - scene.update = function(options) { - if(stopped) { - return - } - options = options || {} - dirty = true - pickDirty = true - } - - scene.add = function(obj) { - if(stopped) { - return - } - obj.axes = axes - objects.push(obj) - pickBufferIds.push(-1) - dirty = true - pickDirty = true - reallocPickIds() - } - - scene.remove = function(obj) { - if(stopped) { - return - } - var idx = objects.indexOf(obj) - if(idx < 0) { - return - } - objects.splice(idx, 1) - pickBufferIds.pop() - dirty = true - pickDirty = true - reallocPickIds() - } - - scene.dispose = function() { - if(stopped) { - return - } - - stopped = true - - window.removeEventListener('resize', resizeListener) - canvas.removeEventListener('webglcontextlost', checkContextLoss) - scene.mouseListener.enabled = false - - if(scene.contextLost) { - return - } - - //Destroy objects - axes.dispose() - spikes.dispose() - for(var i=0; i selection.distance) { - continue - } - for(var j=0; j 0) { + var base = Math.round(Math.pow(10, y)) + return Math.ceil(x/base) * base + } + return Math.ceil(x) +} + +function defaultBool(x) { + if(typeof x === 'boolean') { + return x + } + return true +} + +function createScene(options) { + options = options || {} + + var stopped = false + + var pixelRatio = options.pixelRatio || parseFloat(window.devicePixelRatio) + + var canvas = options.canvas + if(!canvas) { + canvas = document.createElement('canvas') + if(options.container) { + var container = options.container + container.appendChild(canvas) + } else { + document.body.appendChild(canvas) + } + } + + var gl = options.gl + if(!gl) { + gl = getContext(canvas, + options.glOptions || { + premultipliedAlpha: true, + antialias: true + }) + } + if(!gl) { + throw new Error('webgl not supported') + } + + //Initial bounds + var bounds = options.bounds || [[-10,-10,-10], [10,10,10]] + + //Create selection + var selection = new MouseSelect() + + //Accumulation buffer + var accumBuffer = createFBO(gl, + [gl.drawingBufferWidth, gl.drawingBufferHeight], { + preferFloat: !isMobile + }) + + var accumShader = createShader(gl) + + //Create a camera + var cameraOptions = options.camera || { + eye: [2,0,0], + center: [0,0,0], + up: [0,1,0], + zoomMin: 0.1, + zoomMax: 100, + mode: 'turntable' + } + + //Create axes + var axesOptions = options.axes || {} + var axes = createAxes(gl, axesOptions) + axes.enable = !axesOptions.disable + + //Create spikes + var spikeOptions = options.spikes || {} + var spikes = createSpikes(gl, spikeOptions) + + //Object list is empty initially + var objects = [] + var pickBufferIds = [] + var pickBufferCount = [] + var pickBuffers = [] + + //Dirty flag, skip redraw if scene static + var dirty = true + var pickDirty = true + + var projection = new Array(16) + var model = new Array(16) + + var cameraParams = { + view: null, + projection: projection, + model: model + } + + var pickDirty = true + + var viewShape = [ gl.drawingBufferWidth, gl.drawingBufferHeight ] + + //Create scene object + var scene = { + gl: gl, + contextLost: false, + pixelRatio: options.pixelRatio || parseFloat(window.devicePixelRatio), + canvas: canvas, + selection: selection, + camera: createCamera(canvas, cameraOptions), + axes: axes, + axesPixels: null, + spikes: spikes, + bounds: bounds, + objects: objects, + shape: viewShape, + aspect: options.aspectRatio || [1,1,1], + pickRadius: options.pickRadius || 10, + zNear: options.zNear || 0.01, + zFar: options.zFar || 1000, + fovy: options.fovy || Math.PI/4, + clearColor: options.clearColor || [0,0,0,0], + autoResize: defaultBool(options.autoResize), + autoBounds: defaultBool(options.autoBounds), + autoScale: !!options.autoScale, + autoCenter: defaultBool(options.autoCenter), + clipToBounds: defaultBool(options.clipToBounds), + snapToData: !!options.snapToData, + onselect: options.onselect || null, + onrender: options.onrender || null, + onclick: options.onclick || null, + cameraParams: cameraParams, + oncontextloss: null, + mouseListener: null + } + + var pickShape = [ (gl.drawingBufferWidth/scene.pixelRatio)|0, (gl.drawingBufferHeight/scene.pixelRatio)|0 ] + + function resizeListener() { + if(stopped) { + return + } + if(!scene.autoResize) { + return + } + var parent = canvas.parentNode + var width = 1 + var height = 1 + if(parent && parent !== document.body) { + width = parent.clientWidth + height = parent.clientHeight + } else { + width = window.innerWidth + height = window.innerHeight + } + var nextWidth = Math.ceil(width * scene.pixelRatio)|0 + var nextHeight = Math.ceil(height * scene.pixelRatio)|0 + if(nextWidth !== canvas.width || nextHeight !== canvas.height) { + canvas.width = nextWidth + canvas.height = nextHeight + var style = canvas.style + style.position = style.position || 'absolute' + style.left = '0px' + style.top = '0px' + style.width = width + 'px' + style.height = height + 'px' + dirty = true + } + } + if(scene.autoResize) { + resizeListener() + } + window.addEventListener('resize', resizeListener) + + function reallocPickIds() { + var numObjs = objects.length + var numPick = pickBuffers.length + for(var i=0; i 0 && pickBufferCount[numPick-1] === 0) { + pickBufferCount.pop() + pickBuffers.pop().dispose() + } + } + + scene.update = function(options) { + if(stopped) { + return + } + options = options || {} + dirty = true + pickDirty = true + } + + scene.add = function(obj) { + if(stopped) { + return + } + obj.axes = axes + objects.push(obj) + pickBufferIds.push(-1) + dirty = true + pickDirty = true + reallocPickIds() + } + + scene.remove = function(obj) { + if(stopped) { + return + } + var idx = objects.indexOf(obj) + if(idx < 0) { + return + } + objects.splice(idx, 1) + pickBufferIds.pop() + dirty = true + pickDirty = true + reallocPickIds() + } + + scene.dispose = function() { + if(stopped) { + return + } + + stopped = true + + window.removeEventListener('resize', resizeListener) + canvas.removeEventListener('webglcontextlost', checkContextLoss) + scene.mouseListener.enabled = false + + if(scene.contextLost) { + return + } + + //Destroy objects + axes.dispose() + spikes.dispose() + for(var i=0; i selection.distance) { + continue + } + for(var j=0; j>=' @@ -49639,7 +49590,7 @@ module.exports = [ , '}' ] -},{}],270:[function(require,module,exports){ +},{}],267:[function(require,module,exports){ var tokenize = require('./index') module.exports = tokenizeString @@ -49654,7 +49605,7 @@ function tokenizeString(str, opt) { return tokens } -},{"./index":264}],271:[function(require,module,exports){ +},{"./index":261}],268:[function(require,module,exports){ 'use strict'; module.exports = GridIndex; @@ -49816,7 +49767,7 @@ GridIndex.prototype.toArrayBuffer = function() { return array.buffer; }; -},{}],272:[function(require,module,exports){ +},{}],269:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -49902,7 +49853,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],273:[function(require,module,exports){ +},{}],270:[function(require,module,exports){ "use strict" //High level idea: @@ -50349,7 +50300,7 @@ function incrementalConvexHull(points, randomSearch) { //Extract boundary cells return triangles.boundary() } -},{"robust-orientation":489,"simplicial-complex":500}],274:[function(require,module,exports){ +},{"robust-orientation":486,"simplicial-complex":497}],271:[function(require,module,exports){ "use strict" var bounds = require("binary-search-bounds") @@ -50716,7 +50667,7 @@ function createWrapper(intervals) { return new IntervalTree(createIntervalTree(intervals)) } -},{"binary-search-bounds":59}],275:[function(require,module,exports){ +},{"binary-search-bounds":56}],272:[function(require,module,exports){ "use strict" function invertPermutation(pi, result) { @@ -50728,7 +50679,7 @@ function invertPermutation(pi, result) { } module.exports = invertPermutation -},{}],276:[function(require,module,exports){ +},{}],273:[function(require,module,exports){ "use strict" function iota(n) { @@ -50740,7 +50691,7 @@ function iota(n) { } module.exports = iota -},{}],277:[function(require,module,exports){ +},{}],274:[function(require,module,exports){ /*! * Determine if an object is a Buffer * @@ -50763,7 +50714,7 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],278:[function(require,module,exports){ +},{}],275:[function(require,module,exports){ module.exports = isMobile; function isMobile (ua) { @@ -50777,7 +50728,7 @@ function isMobile (ua) { } -},{}],279:[function(require,module,exports){ +},{}],276:[function(require,module,exports){ 'use strict'; var toString = Object.prototype.toString; @@ -50786,7 +50737,7 @@ module.exports = function (x) { return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({})); }; -},{}],280:[function(require,module,exports){ +},{}],277:[function(require,module,exports){ 'use strict'; var sort = require('./sort'); @@ -50832,7 +50783,7 @@ KDBush.prototype = { function defaultGetX(p) { return p[0]; } function defaultGetY(p) { return p[1]; } -},{"./range":281,"./sort":282,"./within":283}],281:[function(require,module,exports){ +},{"./range":278,"./sort":279,"./within":280}],278:[function(require,module,exports){ 'use strict'; module.exports = range; @@ -50880,7 +50831,7 @@ function range(ids, coords, minX, minY, maxX, maxY, nodeSize) { return result; } -},{}],282:[function(require,module,exports){ +},{}],279:[function(require,module,exports){ 'use strict'; module.exports = sortKD; @@ -50948,7 +50899,7 @@ function swap(arr, i, j) { arr[j] = tmp; } -},{}],283:[function(require,module,exports){ +},{}],280:[function(require,module,exports){ 'use strict'; module.exports = within; @@ -51000,7 +50951,7 @@ function sqDist(ax, ay, bx, by) { return dx * dx + dy * dy; } -},{}],284:[function(require,module,exports){ +},{}],281:[function(require,module,exports){ 'use strict'; function createFunction(parameters, defaultType) { @@ -51173,7 +51124,7 @@ module.exports['piecewise-constant'] = function(parameters) { return createFunction(parameters, 'interval'); }; -},{}],285:[function(require,module,exports){ +},{}],282:[function(require,module,exports){ var path = require('path'); @@ -51235,7 +51186,7 @@ module.exports = { module.exports.util = "float evaluate_zoom_function_1(const vec4 values, const float t) {\n if (t < 1.0) {\n return mix(values[0], values[1], t);\n } else if (t < 2.0) {\n return mix(values[1], values[2], t - 1.0);\n } else {\n return mix(values[2], values[3], t - 2.0);\n }\n}\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\n if (t < 1.0) {\n return mix(value0, value1, t);\n } else if (t < 2.0) {\n return mix(value1, value2, t - 1.0);\n } else {\n return mix(value2, value3, t - 2.0);\n }\n}\n"; -},{"path":457}],286:[function(require,module,exports){ +},{"path":454}],283:[function(require,module,exports){ 'use strict'; var format = require('util').format; @@ -51253,7 +51204,7 @@ function ValidationError(key, value /*, message, ...*/) { module.exports = ValidationError; -},{"util":529}],287:[function(require,module,exports){ +},{"util":526}],284:[function(require,module,exports){ 'use strict'; module.exports = function (output) { @@ -51266,7 +51217,7 @@ module.exports = function (output) { return output; }; -},{}],288:[function(require,module,exports){ +},{}],285:[function(require,module,exports){ 'use strict'; module.exports = function getType(val) { @@ -51285,7 +51236,7 @@ module.exports = function getType(val) { } }; -},{}],289:[function(require,module,exports){ +},{}],286:[function(require,module,exports){ 'use strict'; // Turn jsonlint-lines-primitives objects into primitive objects @@ -51297,7 +51248,7 @@ module.exports = function unbundle(value) { } }; -},{}],290:[function(require,module,exports){ +},{}],287:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51364,7 +51315,7 @@ module.exports = function validate(options) { } }; -},{"../error/validation_error":286,"../util/extend":287,"../util/get_type":288,"./validate_array":291,"./validate_boolean":292,"./validate_color":293,"./validate_constants":294,"./validate_enum":295,"./validate_filter":296,"./validate_function":297,"./validate_layer":299,"./validate_number":301,"./validate_object":302,"./validate_source":304,"./validate_string":305}],291:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/extend":284,"../util/get_type":285,"./validate_array":288,"./validate_boolean":289,"./validate_color":290,"./validate_constants":291,"./validate_enum":292,"./validate_filter":293,"./validate_function":294,"./validate_layer":296,"./validate_number":298,"./validate_object":299,"./validate_source":301,"./validate_string":302}],288:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -51418,7 +51369,7 @@ module.exports = function validateArray(options) { return errors; }; -},{"../error/validation_error":286,"../util/get_type":288,"./validate":290}],292:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285,"./validate":287}],289:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -51436,7 +51387,7 @@ module.exports = function validateBoolean(options) { return []; }; -},{"../error/validation_error":286,"../util/get_type":288}],293:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285}],290:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51459,7 +51410,7 @@ module.exports = function validateColor(options) { return []; }; -},{"../error/validation_error":286,"../util/get_type":288,"csscolorparser":101}],294:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285,"csscolorparser":98}],291:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51493,7 +51444,7 @@ module.exports = function validateConstants(options) { }; -},{"../error/validation_error":286,"../util/get_type":288}],295:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285}],292:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51511,7 +51462,7 @@ module.exports = function validateEnum(options) { return errors; }; -},{"../error/validation_error":286,"../util/unbundle_jsonlint":289}],296:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/unbundle_jsonlint":286}],293:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51616,7 +51567,7 @@ module.exports = function validateFilter(options) { return errors; }; -},{"../error/validation_error":286,"../util/get_type":288,"../util/unbundle_jsonlint":289,"./validate_enum":295}],297:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285,"../util/unbundle_jsonlint":286,"./validate_enum":292}],294:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51750,7 +51701,7 @@ module.exports = function validateFunction(options) { }; -},{"../error/validation_error":286,"../util/get_type":288,"./validate":290,"./validate_array":291,"./validate_number":301,"./validate_object":302}],298:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285,"./validate":287,"./validate_array":288,"./validate_number":298,"./validate_object":299}],295:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51774,7 +51725,7 @@ module.exports = function(options) { return errors; }; -},{"../error/validation_error":286,"./validate_string":305}],299:[function(require,module,exports){ +},{"../error/validation_error":283,"./validate_string":302}],296:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51887,7 +51838,7 @@ module.exports = function validateLayer(options) { return errors; }; -},{"../error/validation_error":286,"../util/extend":287,"../util/unbundle_jsonlint":289,"./validate_filter":296,"./validate_layout_property":300,"./validate_object":302,"./validate_paint_property":303}],300:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/extend":284,"../util/unbundle_jsonlint":286,"./validate_filter":293,"./validate_layout_property":297,"./validate_object":299,"./validate_paint_property":300}],297:[function(require,module,exports){ 'use strict'; var validate = require('./validate'); @@ -51926,7 +51877,7 @@ module.exports = function validateLayoutProperty(options) { }; -},{"../error/validation_error":286,"./validate":290}],301:[function(require,module,exports){ +},{"../error/validation_error":283,"./validate":287}],298:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -51953,7 +51904,7 @@ module.exports = function validateNumber(options) { return []; }; -},{"../error/validation_error":286,"../util/get_type":288}],302:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285}],299:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -52006,7 +51957,7 @@ module.exports = function validateObject(options) { return errors; }; -},{"../error/validation_error":286,"../util/get_type":288,"./validate":290}],303:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285,"./validate":287}],300:[function(require,module,exports){ 'use strict'; var validate = require('./validate'); @@ -52046,7 +51997,7 @@ module.exports = function validatePaintProperty(options) { }; -},{"../error/validation_error":286,"./validate":290}],304:[function(require,module,exports){ +},{"../error/validation_error":283,"./validate":287}],301:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -52123,7 +52074,7 @@ module.exports = function validateSource(options) { } }; -},{"../error/validation_error":286,"../util/unbundle_jsonlint":289,"./validate_enum":295,"./validate_object":302}],305:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/unbundle_jsonlint":286,"./validate_enum":292,"./validate_object":299}],302:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -52141,7 +52092,7 @@ module.exports = function validateString(options) { return []; }; -},{"../error/validation_error":286,"../util/get_type":288}],306:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285}],303:[function(require,module,exports){ 'use strict'; var validateConstants = require('./validate/validate_constants'); @@ -52211,12 +52162,12 @@ function wrapCleanErrors(inner) { module.exports = validateStyleMin; -},{"../reference/latest.min":307,"./validate/validate":290,"./validate/validate_constants":294,"./validate/validate_filter":296,"./validate/validate_glyphs_url":298,"./validate/validate_layer":299,"./validate/validate_layout_property":300,"./validate/validate_paint_property":303,"./validate/validate_source":304}],307:[function(require,module,exports){ +},{"../reference/latest.min":304,"./validate/validate":287,"./validate/validate_constants":291,"./validate/validate_filter":293,"./validate/validate_glyphs_url":295,"./validate/validate_layer":296,"./validate/validate_layout_property":297,"./validate/validate_paint_property":300,"./validate/validate_source":301}],304:[function(require,module,exports){ module.exports = require('./v8.min.json'); -},{"./v8.min.json":308}],308:[function(require,module,exports){ +},{"./v8.min.json":305}],305:[function(require,module,exports){ module.exports={"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_tile","source_geojson","source_video","source_image"],"source_tile":{"type":{"required":true,"type":"enum","values":["vector","raster"]},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":["geojson"]},"data":{"type":"*"},"maxzoom":{"type":"number","default":14},"buffer":{"type":"number","default":64},"tolerance":{"type":"number","default":3},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":400},"clusterMaxZoom":{"type":"number"}},"source_video":{"type":{"required":true,"type":"enum","values":["video"]},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":["image"]},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":["fill","line","symbol","circle","raster","background"]},"metadata":{"type":"*"},"ref":{"type":"string"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":22},"maxzoom":{"type":"number","minimum":0,"maximum":22},"interactive":{"type":"boolean","default":false},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"},"paint.*":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],"layout_background":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_fill":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_circle":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_line":{"line-cap":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["butt","round","square"],"default":"butt"},"line-join":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["bevel","round","miter"],"default":"miter"},"line-miter-limit":{"type":"number","default":2,"function":"interpolated","zoom-function":true,"property-function":true,"requires":[{"line-join":"miter"}]},"line-round-limit":{"type":"number","default":1.05,"function":"interpolated","zoom-function":true,"property-function":true,"requires":[{"line-join":"round"}]},"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_symbol":{"symbol-placement":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["point","line"],"default":"point"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"function":"interpolated","zoom-function":true,"property-function":true,"units":"pixels","requires":[{"symbol-placement":"line"}]},"symbol-avoid-edges":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false},"icon-allow-overlap":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image"]},"icon-ignore-placement":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image"]},"icon-optional":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image","text-field"]},"icon-rotation-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"viewport","requires":["icon-image"]},"icon-size":{"type":"number","default":1,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image"]},"icon-text-fit":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":false,"values":["none","both","width","height"],"default":"none","requires":["icon-image","text-field"]},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image","icon-text-fit","text-field"]},"icon-image":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"tokens":true},"icon-rotate":{"type":"number","default":0,"period":360,"function":"interpolated","zoom-function":true,"property-function":true,"units":"degrees","requires":["icon-image"]},"icon-padding":{"type":"number","default":2,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"units":"pixels","requires":["icon-image"]},"icon-keep-upright":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image"]},"text-pitch-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"requires":["text-field"]},"text-rotation-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"viewport","requires":["text-field"]},"text-field":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":"","tokens":true},"text-font":{"type":"array","value":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"]},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-line-height":{"type":"number","default":1.2,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-letter-spacing":{"type":"number","default":0,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-justify":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["left","center","right"],"default":"center","requires":["text-field"]},"text-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],"default":"center","requires":["text-field"]},"text-max-angle":{"type":"number","default":45,"units":"degrees","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field",{"symbol-placement":"line"}]},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-keep-upright":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["none","uppercase","lowercase"],"default":"none","requires":["text-field"]},"text-offset":{"type":"array","value":"number","units":"ems","function":"interpolated","zoom-function":true,"property-function":true,"length":2,"default":[0,0],"requires":["text-field"]},"text-allow-overlap":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field"]},"text-ignore-placement":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field"]},"text-optional":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field","icon-image"]},"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_raster":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"filter":{"type":"array","value":"*"},"filter_operator":{"type":"enum","values":["==","!=",">",">=","<","<=","in","!in","all","any","none","has","!has"]},"geometry_type":{"type":"enum","values":["Point","LineString","Polygon"]},"color_operation":{"type":"enum","values":["lighten","saturate","spin","fade","mix"]},"function":{"stops":{"type":"array","required":true,"value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":["exponential","interval","categorical"],"default":"exponential"}},"function_stop":{"type":"array","minimum":0,"maximum":22,"value":["number","color"],"length":2},"paint":["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],"paint_fill":{"fill-antialias":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":true},"fill-opacity":{"type":"number","function":"interpolated","zoom-function":true,"property-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"fill-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"fill-pattern"}]},"fill-outline-color":{"type":"color","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}]},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"fill-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["fill-translate"]},"fill-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"transition":true}},"paint_line":{"line-opacity":{"type":"number","function":"interpolated","zoom-function":true,"property-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"line-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"line-pattern"}]},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["line-translate"]},"line-width":{"type":"number","default":1,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-gap-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-offset":{"type":"number","default":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-dasharray":{"type":"array","value":"number","function":"piecewise-constant","zoom-function":true,"property-function":true,"minimum":0,"transition":true,"units":"line widths","requires":[{"!":"line-pattern"}]},"line-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"transition":true}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"circle-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-blur":{"type":"number","default":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"circle-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["circle-translate"]},"circle-pitch-scale":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-halo-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["icon-image","icon-translate"]},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-halo-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-halo-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["text-field","text-translate"]}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-hue-rotate":{"type":"number","default":0,"period":360,"function":"interpolated","zoom-function":true,"transition":true,"units":"degrees"},"raster-brightness-min":{"type":"number","function":"interpolated","zoom-function":true,"default":0,"minimum":0,"maximum":1,"transition":true},"raster-brightness-max":{"type":"number","function":"interpolated","zoom-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"function":"interpolated","zoom-function":true,"transition":true,"units":"milliseconds"}},"paint_background":{"background-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"transition":true,"requires":[{"!":"background-pattern"}]},"background-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"transition":true},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}}} -},{}],309:[function(require,module,exports){ +},{}],306:[function(require,module,exports){ 'use strict'; if (typeof module !== 'undefined' && module.exports) { @@ -52347,7 +52298,7 @@ function isWebGLSupported(failIfMajorPerformanceCaveat) { } } -},{}],310:[function(require,module,exports){ +},{}],307:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -52443,7 +52394,7 @@ ArrayGroup.prototype.getTransferables = function(transferables) { } }; -},{"../util/util":424}],311:[function(require,module,exports){ +},{"../util/util":421}],308:[function(require,module,exports){ 'use strict'; var featureFilter = require('feature-filter'); @@ -52961,7 +52912,7 @@ function createGetUniform(attribute, stopOffset) { }; } -},{"../util/struct_array":422,"../util/util":424,"./array_group":310,"./bucket/circle_bucket":312,"./bucket/fill_bucket":313,"./bucket/line_bucket":314,"./bucket/symbol_bucket":315,"./buffer_group":317,"assert":40,"feature-filter":117}],312:[function(require,module,exports){ +},{"../util/struct_array":419,"../util/util":421,"./array_group":307,"./bucket/circle_bucket":309,"./bucket/fill_bucket":310,"./bucket/line_bucket":311,"./bucket/symbol_bucket":312,"./buffer_group":314,"assert":37,"feature-filter":114}],309:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -53083,7 +53034,7 @@ CircleBucket.prototype.addFeature = function(feature) { this.populatePaintArrays('circle', globalProperties, feature.properties, startGroup, startIndex); }; -},{"../../util/util":424,"../bucket":311,"../load_geometry":319}],313:[function(require,module,exports){ +},{"../../util/util":421,"../bucket":308,"../load_geometry":316}],310:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -53194,7 +53145,7 @@ FillBucket.prototype.addPolygon = function(polygon) { } }; -},{"../../util/classify_rings":412,"../../util/util":424,"../bucket":311,"../load_geometry":319,"earcut":111}],314:[function(require,module,exports){ +},{"../../util/classify_rings":409,"../../util/util":421,"../bucket":308,"../load_geometry":316,"earcut":108}],311:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -53621,7 +53572,7 @@ LineBucket.prototype.addPieSliceVertex = function(currentVertex, distance, extru } }; -},{"../../util/util":424,"../bucket":311,"../load_geometry":319}],315:[function(require,module,exports){ +},{"../../util/util":421,"../bucket":308,"../load_geometry":316}],312:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -54267,7 +54218,7 @@ SymbolBucket.prototype.addSymbolQuad = function(symbolQuad) { symbolQuad.minScale); }; -},{"../../symbol/anchor":373,"../../symbol/clip_line":375,"../../symbol/collision_feature":377,"../../symbol/get_anchors":379,"../../symbol/mergelines":382,"../../symbol/quads":383,"../../symbol/resolve_text":384,"../../symbol/shaping":385,"../../util/token":423,"../../util/util":424,"../bucket":311,"../load_geometry":319,"point-geometry":465}],316:[function(require,module,exports){ +},{"../../symbol/anchor":370,"../../symbol/clip_line":372,"../../symbol/collision_feature":374,"../../symbol/get_anchors":376,"../../symbol/mergelines":379,"../../symbol/quads":380,"../../symbol/resolve_text":381,"../../symbol/shaping":382,"../../util/token":420,"../../util/util":421,"../bucket":308,"../load_geometry":316,"point-geometry":462}],313:[function(require,module,exports){ 'use strict'; module.exports = Buffer; @@ -54368,7 +54319,7 @@ Buffer.BufferType = { ELEMENT: 'ELEMENT_ARRAY_BUFFER' }; -},{}],317:[function(require,module,exports){ +},{}],314:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -54423,7 +54374,7 @@ BufferGroup.prototype.destroy = function(gl) { } }; -},{"../render/vertex_array_object":339,"../util/util":424,"./buffer":316}],318:[function(require,module,exports){ +},{"../render/vertex_array_object":336,"../util/util":421,"./buffer":313}],315:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -54722,7 +54673,7 @@ function offsetLine(rings, offset) { return newRings; } -},{"../util/dictionary_coder":414,"../util/intersection_tests":419,"../util/struct_array":422,"../util/util":424,"../util/vectortile_to_geojson":425,"./bucket":311,"./load_geometry":319,"feature-filter":117,"grid-index":271,"pbf":459,"point-geometry":465,"vector-tile":530}],319:[function(require,module,exports){ +},{"../util/dictionary_coder":411,"../util/intersection_tests":416,"../util/struct_array":419,"../util/util":421,"../util/vectortile_to_geojson":422,"./bucket":308,"./load_geometry":316,"feature-filter":114,"grid-index":268,"pbf":456,"point-geometry":462,"vector-tile":527}],316:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -54778,7 +54729,7 @@ module.exports = function loadGeometry(feature, bits) { return geometry; }; -},{"../util/util":424,"./bucket":311,"assert":40}],320:[function(require,module,exports){ +},{"../util/util":421,"./bucket":308,"assert":37}],317:[function(require,module,exports){ 'use strict'; module.exports = Coordinate; @@ -54857,7 +54808,7 @@ Coordinate.prototype = { } }; -},{}],321:[function(require,module,exports){ +},{}],318:[function(require,module,exports){ 'use strict'; module.exports = LngLat; @@ -54949,7 +54900,7 @@ LngLat.convert = function (input) { return input; }; -},{"../util/util":424}],322:[function(require,module,exports){ +},{"../util/util":421}],319:[function(require,module,exports){ 'use strict'; module.exports = LngLatBounds; @@ -55141,7 +55092,7 @@ LngLatBounds.convert = function (input) { return new LngLatBounds(input); }; -},{"./lng_lat":321}],323:[function(require,module,exports){ +},{"./lng_lat":318}],320:[function(require,module,exports){ 'use strict'; var LngLat = require('./lng_lat'), @@ -55615,7 +55566,7 @@ Transform.prototype = { } }; -},{"../data/bucket":311,"../source/tile_coord":351,"../util/interpolate":418,"../util/util":424,"./coordinate":320,"./lng_lat":321,"gl-matrix":177,"point-geometry":465}],324:[function(require,module,exports){ +},{"../data/bucket":308,"../source/tile_coord":348,"../util/interpolate":415,"../util/util":421,"./coordinate":317,"./lng_lat":318,"gl-matrix":174,"point-geometry":462}],321:[function(require,module,exports){ 'use strict'; // Font data From Hershey Simplex Font @@ -55748,7 +55699,7 @@ module.exports = function textVertices(text, left, baseline, scale) { return strokes; }; -},{}],325:[function(require,module,exports){ +},{}],322:[function(require,module,exports){ 'use strict'; // jshint -W079 @@ -55815,7 +55766,7 @@ Object.defineProperty(mapboxgl, 'accessToken', { * mapboxgl.supported() // = true */ -},{"../package.json":426,"./geo/lng_lat":321,"./geo/lng_lat_bounds":322,"./style/style":360,"./ui/control/attribution":391,"./ui/control/control":392,"./ui/control/geolocate":393,"./ui/control/navigation":394,"./ui/map":403,"./ui/marker":404,"./ui/popup":405,"./util/ajax":407,"./util/browser":408,"./util/config":413,"./util/evented":416,"./util/util":424,"point-geometry":465}],326:[function(require,module,exports){ +},{"../package.json":423,"./geo/lng_lat":318,"./geo/lng_lat_bounds":319,"./style/style":357,"./ui/control/attribution":388,"./ui/control/control":389,"./ui/control/geolocate":390,"./ui/control/navigation":391,"./ui/map":400,"./ui/marker":401,"./ui/popup":402,"./util/ajax":404,"./util/browser":405,"./util/config":410,"./util/evented":413,"./util/util":421,"point-geometry":462}],323:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -55835,7 +55786,7 @@ module.exports = function(uniforms) { return pragmas; }; -},{"assert":40}],327:[function(require,module,exports){ +},{"assert":37}],324:[function(require,module,exports){ 'use strict'; var pixelsToTileUnits = require('../source/pixels_to_tile_units'); @@ -55928,7 +55879,7 @@ function drawBackground(painter, source, layer) { gl.stencilFunc(gl.EQUAL, 0x80, 0x80); } -},{"../source/pixels_to_tile_units":345,"./create_uniform_pragmas":326}],328:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":342,"./create_uniform_pragmas":323}],325:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -55993,7 +55944,7 @@ function drawCircles(painter, source, layer, coords) { } } -},{"../util/browser":408}],329:[function(require,module,exports){ +},{"../util/browser":405}],326:[function(require,module,exports){ 'use strict'; module.exports = drawCollisionDebug; @@ -56028,7 +55979,7 @@ function drawCollisionDebug(painter, source, layer, coords) { } } -},{}],330:[function(require,module,exports){ +},{}],327:[function(require,module,exports){ 'use strict'; var textVertices = require('../lib/debugtext'); @@ -56089,7 +56040,7 @@ function drawDebugTile(painter, source, coord) { gl.drawArrays(gl.LINES, 0, debugTextBuffer.length); } -},{"../data/bucket":311,"../data/buffer":316,"../lib/debugtext":324,"../util/browser":408,"./vertex_array_object":339,"gl-matrix":177}],331:[function(require,module,exports){ +},{"../data/bucket":308,"../data/buffer":313,"../lib/debugtext":321,"../util/browser":405,"./vertex_array_object":336,"gl-matrix":174}],328:[function(require,module,exports){ 'use strict'; var pixelsToTileUnits = require('../source/pixels_to_tile_units'); @@ -56286,7 +56237,7 @@ function setPattern(image, opacity, tile, coord, painter, program) { painter.spriteAtlas.bind(gl, true); } -},{"../source/pixels_to_tile_units":345}],332:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":342}],329:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -56451,7 +56402,7 @@ module.exports = function drawLine(painter, source, layer, coords) { }; -},{"../source/pixels_to_tile_units":345,"../util/browser":408,"gl-matrix":177}],333:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":342,"../util/browser":405,"gl-matrix":174}],330:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -56597,7 +56548,7 @@ function getOpacities(tile, parentTile, layer, transform) { return opacity; } -},{"../util/struct_array":422,"../util/util":424}],334:[function(require,module,exports){ +},{"../util/struct_array":419,"../util/util":421}],331:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -56813,7 +56764,7 @@ function drawSymbol(painter, layer, posMatrix, tile, bucket, bufferGroups, isTex } } -},{"../source/pixels_to_tile_units":345,"../util/browser":408,"./draw_collision_debug":329}],335:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":342,"../util/browser":405,"./draw_collision_debug":326}],332:[function(require,module,exports){ 'use strict'; module.exports = FrameHistory; @@ -56885,7 +56836,7 @@ FrameHistory.prototype.bind = function(gl) { } }; -},{}],336:[function(require,module,exports){ +},{}],333:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -57032,7 +56983,7 @@ LineAtlas.prototype.bind = function(gl) { } }; -},{"../util/util":424}],337:[function(require,module,exports){ +},{"../util/util":421}],334:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -57376,7 +57327,7 @@ Painter.prototype.showOverdrawInspector = function(enabled) { } }; -},{"../data/bucket":311,"../data/buffer":316,"../source/pixels_to_tile_units":345,"../source/source_cache":349,"../util/browser":408,"../util/struct_array":422,"../util/util":424,"./create_uniform_pragmas":326,"./draw_background":327,"./draw_circle":328,"./draw_debug":330,"./draw_fill":331,"./draw_line":332,"./draw_raster":333,"./draw_symbol":334,"./frame_history":335,"./painter/use_program":338,"./vertex_array_object":339,"gl-matrix":177}],338:[function(require,module,exports){ +},{"../data/bucket":308,"../data/buffer":313,"../source/pixels_to_tile_units":342,"../source/source_cache":346,"../util/browser":405,"../util/struct_array":419,"../util/util":421,"./create_uniform_pragmas":323,"./draw_background":324,"./draw_circle":325,"./draw_debug":327,"./draw_fill":328,"./draw_line":329,"./draw_raster":330,"./draw_symbol":331,"./frame_history":332,"./painter/use_program":335,"./vertex_array_object":336,"gl-matrix":174}],335:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -57473,7 +57424,7 @@ function applyPragmas(source, pragmas) { }); } -},{"../../util/util":424,"assert":40,"mapbox-gl-shaders":285}],339:[function(require,module,exports){ +},{"../../util/util":421,"assert":37,"mapbox-gl-shaders":282}],336:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -57571,7 +57522,7 @@ VertexArrayObject.prototype.destroy = function(gl) { } }; -},{"assert":40}],340:[function(require,module,exports){ +},{"assert":37}],337:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -57795,7 +57746,7 @@ GeoJSONSource.prototype = util.inherit(Evented, /** @lends GeoJSONSource.prototy } }); -},{"../data/bucket":311,"../util/evented":416,"../util/util":424,"resolve-url":482}],341:[function(require,module,exports){ +},{"../data/bucket":308,"../util/evented":413,"../util/util":421,"resolve-url":479}],338:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -57933,7 +57884,7 @@ GeoJSONWorkerSource.prototype = util.inherit(VectorTileWorkerSource, /** @lends } }); -},{"../util/ajax":407,"../util/util":424,"./geojson_wrapper":342,"./vector_tile_worker_source":353,"geojson-rewind":123,"geojson-vt":127,"supercluster":509,"vt-pbf":536}],342:[function(require,module,exports){ +},{"../util/ajax":404,"../util/util":421,"./geojson_wrapper":339,"./vector_tile_worker_source":350,"geojson-rewind":120,"geojson-vt":124,"supercluster":506,"vt-pbf":533}],339:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -58009,7 +57960,7 @@ FeatureWrapper.prototype.bbox = function() { FeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON; -},{"../data/bucket":311,"point-geometry":465,"vector-tile":530}],343:[function(require,module,exports){ +},{"../data/bucket":308,"point-geometry":462,"vector-tile":527}],340:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58188,7 +58139,7 @@ ImageSource.prototype = util.inherit(Evented, /** @lends ImageSource.prototype * } }); -},{"../data/bucket":311,"../data/buffer":316,"../geo/lng_lat":321,"../render/draw_raster":333,"../render/vertex_array_object":339,"../util/ajax":407,"../util/evented":416,"../util/util":424,"./tile_coord":351,"point-geometry":465}],344:[function(require,module,exports){ +},{"../data/bucket":308,"../data/buffer":313,"../geo/lng_lat":318,"../render/draw_raster":330,"../render/vertex_array_object":336,"../util/ajax":404,"../util/evented":413,"../util/util":421,"./tile_coord":348,"point-geometry":462}],341:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); var ajax = require('../util/ajax'); @@ -58219,7 +58170,7 @@ module.exports = function(options, callback) { }; -},{"../util/ajax":407,"../util/browser":408,"../util/mapbox":421,"../util/util":424}],345:[function(require,module,exports){ +},{"../util/ajax":404,"../util/browser":405,"../util/mapbox":418,"../util/util":421}],342:[function(require,module,exports){ 'use strict'; var Bucket = require('../data/bucket'); @@ -58244,7 +58195,7 @@ module.exports = function(tile, pixelValue, z) { }; -},{"../data/bucket":311}],346:[function(require,module,exports){ +},{"../data/bucket":308}],343:[function(require,module,exports){ 'use strict'; var TileCoord = require('./tile_coord'); @@ -58315,7 +58266,7 @@ function mergeRenderedFeatureLayers(tiles) { } -},{"./tile_coord":351}],347:[function(require,module,exports){ +},{"./tile_coord":348}],344:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58412,7 +58363,7 @@ RasterTileSource.prototype = util.inherit(Evented, { } }); -},{"../util/ajax":407,"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./load_tilejson":344}],348:[function(require,module,exports){ +},{"../util/ajax":404,"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./load_tilejson":341}],345:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58583,7 +58534,7 @@ exports.setType = function (name, type) { * @instance */ -},{"../source/geojson_source":340,"../source/image_source":343,"../source/raster_tile_source":347,"../source/vector_tile_source":352,"../source/video_source":354,"../util/util":424}],349:[function(require,module,exports){ +},{"../source/geojson_source":337,"../source/image_source":340,"../source/raster_tile_source":344,"../source/vector_tile_source":349,"../source/video_source":351,"../util/util":421}],346:[function(require,module,exports){ 'use strict'; var Source = require('./source'); @@ -59121,7 +59072,7 @@ function compareKeyZoom(a, b) { return (a % 32) - (b % 32); } -},{"../data/bucket":311,"../geo/coordinate":320,"../util/evented":416,"../util/lru_cache":420,"../util/util":424,"./source":348,"./tile":350,"./tile_coord":351}],350:[function(require,module,exports){ +},{"../data/bucket":308,"../geo/coordinate":317,"../util/evented":413,"../util/lru_cache":417,"../util/util":421,"./source":345,"./tile":347,"./tile_coord":348}],347:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -59323,7 +59274,7 @@ function unserializeBuckets(input, style) { return output; } -},{"../data/bucket":311,"../data/feature_index":318,"../symbol/collision_box":376,"../symbol/collision_tile":378,"../symbol/symbol_instances":387,"../symbol/symbol_quads":388,"../util/util":424,"../util/vectortile_to_geojson":425,"feature-filter":117,"pbf":459,"vector-tile":530}],351:[function(require,module,exports){ +},{"../data/bucket":308,"../data/feature_index":315,"../symbol/collision_box":373,"../symbol/collision_tile":375,"../symbol/symbol_instances":384,"../symbol/symbol_quads":385,"../util/util":421,"../util/vectortile_to_geojson":422,"feature-filter":114,"pbf":456,"vector-tile":527}],348:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -59517,7 +59468,7 @@ TileCoord.cover = function(z, bounds, actualZ) { }); }; -},{"../geo/coordinate":320,"assert":40,"whoots-js":546}],352:[function(require,module,exports){ +},{"../geo/coordinate":317,"assert":37,"whoots-js":543}],349:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -59624,7 +59575,7 @@ VectorTileSource.prototype = util.inherit(Evented, { } }); -},{"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./load_tilejson":344}],353:[function(require,module,exports){ +},{"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./load_tilejson":341}],350:[function(require,module,exports){ 'use strict'; var ajax = require('../util/ajax'); var vt = require('vector-tile'); @@ -59772,7 +59723,7 @@ VectorTileWorkerSource.prototype = { } }; -},{"../util/ajax":407,"./worker_tile":356,"pbf":459,"vector-tile":530}],354:[function(require,module,exports){ +},{"../util/ajax":404,"./worker_tile":353,"pbf":456,"vector-tile":527}],351:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -59976,7 +59927,7 @@ VideoSource.prototype = util.inherit(Evented, /** @lends VideoSource.prototype * } }); -},{"../data/bucket":311,"../data/buffer":316,"../geo/lng_lat":321,"../render/draw_raster":333,"../render/vertex_array_object":339,"../util/ajax":407,"../util/evented":416,"../util/util":424,"./tile_coord":351,"point-geometry":465}],355:[function(require,module,exports){ +},{"../data/bucket":308,"../data/buffer":313,"../geo/lng_lat":318,"../render/draw_raster":330,"../render/vertex_array_object":336,"../util/ajax":404,"../util/evented":413,"../util/util":421,"./tile_coord":348,"point-geometry":462}],352:[function(require,module,exports){ 'use strict'; var Actor = require('../util/actor'); @@ -60140,7 +60091,7 @@ function createLayerFamilies(layers) { return families; } -},{"../style/style_layer":363,"../util/actor":406,"../util/util":424,"./geojson_worker_source":341,"./vector_tile_worker_source":353}],356:[function(require,module,exports){ +},{"../style/style_layer":360,"../util/actor":403,"../util/util":421,"./geojson_worker_source":338,"./vector_tile_worker_source":350}],353:[function(require,module,exports){ 'use strict'; var FeatureIndex = require('../data/feature_index'); @@ -60413,7 +60364,7 @@ function getLayerId(layer) { return layer.id; } -},{"../data/bucket":311,"../data/feature_index":318,"../symbol/collision_box":376,"../symbol/collision_tile":378,"../symbol/symbol_instances":387,"../symbol/symbol_quads":388,"../util/dictionary_coder":414,"../util/util":424}],357:[function(require,module,exports){ +},{"../data/bucket":308,"../data/feature_index":315,"../symbol/collision_box":373,"../symbol/collision_tile":375,"../symbol/symbol_instances":384,"../symbol/symbol_quads":385,"../util/dictionary_coder":411,"../util/util":421}],354:[function(require,module,exports){ 'use strict'; module.exports = AnimationLoop; @@ -60445,7 +60396,7 @@ AnimationLoop.prototype.cancel = function(n) { }); }; -},{}],358:[function(require,module,exports){ +},{}],355:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -60526,7 +60477,7 @@ ImageSprite.prototype.getSpritePosition = function(name) { return new SpritePosition(); }; -},{"../util/ajax":407,"../util/browser":408,"../util/evented":416,"../util/mapbox":421}],359:[function(require,module,exports){ +},{"../util/ajax":404,"../util/browser":405,"../util/evented":413,"../util/mapbox":418}],356:[function(require,module,exports){ 'use strict'; var parseColorString = require('csscolorparser').parseCSSColor; @@ -60568,7 +60519,7 @@ module.exports = function parseColor(input) { } }; -},{"../util/util":424,"./style_function":362,"csscolorparser":101}],360:[function(require,module,exports){ +},{"../util/util":421,"./style_function":359,"csscolorparser":98}],357:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -61349,7 +61300,7 @@ Style.prototype = util.inherit(Evented, { }); -},{"../render/line_atlas":336,"../source/query_features":346,"../source/source":348,"../source/source_cache":349,"../symbol/glyph_source":381,"../symbol/sprite_atlas":386,"../util/ajax":407,"../util/browser":408,"../util/dispatcher":415,"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./animation_loop":357,"./image_sprite":358,"./style_function":362,"./style_layer":363,"./style_spec":370,"./validate_style":372}],361:[function(require,module,exports){ +},{"../render/line_atlas":333,"../source/query_features":343,"../source/source":345,"../source/source_cache":346,"../symbol/glyph_source":378,"../symbol/sprite_atlas":383,"../util/ajax":404,"../util/browser":405,"../util/dispatcher":412,"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./animation_loop":354,"./image_sprite":355,"./style_function":359,"./style_layer":360,"./style_spec":367,"./validate_style":369}],358:[function(require,module,exports){ 'use strict'; var MapboxGLFunction = require('./style_function'); @@ -61433,7 +61384,7 @@ function transitioned(calculate) { }; } -},{"../util/util":424,"./parse_color":359,"./style_function":362}],362:[function(require,module,exports){ +},{"../util/util":421,"./parse_color":356,"./style_function":359}],359:[function(require,module,exports){ 'use strict'; var MapboxGLFunction = require('mapbox-gl-function'); @@ -61460,7 +61411,7 @@ exports['piecewise-constant'] = function(parameters) { exports.isFunctionDefinition = MapboxGLFunction.isFunctionDefinition; -},{"mapbox-gl-function":284}],363:[function(require,module,exports){ +},{"mapbox-gl-function":281}],360:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -61807,7 +61758,7 @@ function getDeclarationValue(declaration) { return declaration.value; } -},{"../util/evented":416,"../util/util":424,"./parse_color":359,"./style_declaration":361,"./style_layer/background_style_layer":364,"./style_layer/circle_style_layer":365,"./style_layer/fill_style_layer":366,"./style_layer/line_style_layer":367,"./style_layer/raster_style_layer":368,"./style_layer/symbol_style_layer":369,"./style_spec":370,"./style_transition":371,"./validate_style":372}],364:[function(require,module,exports){ +},{"../util/evented":413,"../util/util":421,"./parse_color":356,"./style_declaration":358,"./style_layer/background_style_layer":361,"./style_layer/circle_style_layer":362,"./style_layer/fill_style_layer":363,"./style_layer/line_style_layer":364,"./style_layer/raster_style_layer":365,"./style_layer/symbol_style_layer":366,"./style_spec":367,"./style_transition":368,"./validate_style":369}],361:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61821,7 +61772,7 @@ module.exports = BackgroundStyleLayer; BackgroundStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":424,"../style_layer":363}],365:[function(require,module,exports){ +},{"../../util/util":421,"../style_layer":360}],362:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61835,7 +61786,7 @@ module.exports = CircleStyleLayer; CircleStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":424,"../style_layer":363}],366:[function(require,module,exports){ +},{"../../util/util":421,"../style_layer":360}],363:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61891,7 +61842,7 @@ FillStyleLayer.prototype = util.inherit(StyleLayer, { module.exports = FillStyleLayer; -},{"../../util/util":424,"../style_layer":363}],367:[function(require,module,exports){ +},{"../../util/util":421,"../style_layer":360}],364:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61925,7 +61876,7 @@ LineStyleLayer.prototype = util.inherit(StyleLayer, { } }); -},{"../../util/util":424,"../style_layer":363}],368:[function(require,module,exports){ +},{"../../util/util":421,"../style_layer":360}],365:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61939,7 +61890,7 @@ module.exports = RasterStyleLayer; RasterStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":424,"../style_layer":363}],369:[function(require,module,exports){ +},{"../../util/util":421,"../style_layer":360}],366:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61982,12 +61933,12 @@ SymbolStyleLayer.prototype = util.inherit(StyleLayer, { }); -},{"../../util/util":424,"../style_layer":363}],370:[function(require,module,exports){ +},{"../../util/util":421,"../style_layer":360}],367:[function(require,module,exports){ 'use strict'; module.exports = require('mapbox-gl-style-spec/reference/latest.min'); -},{"mapbox-gl-style-spec/reference/latest.min":307}],371:[function(require,module,exports){ +},{"mapbox-gl-style-spec/reference/latest.min":304}],368:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -62072,7 +62023,7 @@ function interpZoomTransitioned(from, to, t) { } } -},{"../util/interpolate":418,"../util/util":424}],372:[function(require,module,exports){ +},{"../util/interpolate":415,"../util/util":421}],369:[function(require,module,exports){ 'use strict'; module.exports = require('mapbox-gl-style-spec/lib/validate_style.min'); @@ -62096,7 +62047,7 @@ module.exports.throwErrors = function throwErrors(emitter, errors) { } }; -},{"mapbox-gl-style-spec/lib/validate_style.min":306}],373:[function(require,module,exports){ +},{"mapbox-gl-style-spec/lib/validate_style.min":303}],370:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -62119,7 +62070,7 @@ Anchor.prototype.clone = function() { return new Anchor(this.x, this.y, this.angle, this.segment); }; -},{"point-geometry":465}],374:[function(require,module,exports){ +},{"point-geometry":462}],371:[function(require,module,exports){ 'use strict'; module.exports = checkMaxAngle; @@ -62199,7 +62150,7 @@ function checkMaxAngle(line, anchor, labelLength, windowSize, maxAngle) { return true; } -},{}],375:[function(require,module,exports){ +},{}],372:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -62273,7 +62224,7 @@ function clipLine(lines, x1, y1, x2, y2) { return clippedLines; } -},{"point-geometry":465}],376:[function(require,module,exports){ +},{"point-geometry":462}],373:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -62354,7 +62305,7 @@ util.extendAll(CollisionBoxArray.prototype.StructType.prototype, { } }); -},{"../util/struct_array":422,"../util/util":424,"point-geometry":465}],377:[function(require,module,exports){ +},{"../util/struct_array":419,"../util/util":421,"point-geometry":462}],374:[function(require,module,exports){ 'use strict'; module.exports = CollisionFeature; @@ -62488,7 +62439,7 @@ CollisionFeature.prototype._addLineCollisionBoxes = function(collisionBoxArray, return bboxes; }; -},{}],378:[function(require,module,exports){ +},{}],375:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -62789,7 +62740,7 @@ CollisionTile.prototype.insertCollisionFeature = function(collisionFeature, minP } }; -},{"../data/bucket":311,"grid-index":271,"point-geometry":465}],379:[function(require,module,exports){ +},{"../data/bucket":308,"grid-index":268,"point-geometry":462}],376:[function(require,module,exports){ 'use strict'; var interpolate = require('../util/interpolate'); @@ -62893,7 +62844,7 @@ function resample(line, offset, spacing, angleWindowSize, maxAngle, labelLength, return anchors; } -},{"../symbol/anchor":373,"../util/interpolate":418,"./check_max_angle":374}],380:[function(require,module,exports){ +},{"../symbol/anchor":370,"../util/interpolate":415,"./check_max_angle":371}],377:[function(require,module,exports){ 'use strict'; var ShelfPack = require('shelf-pack'); @@ -63062,7 +63013,7 @@ GlyphAtlas.prototype.updateTexture = function(gl) { } }; -},{"../util/util":424,"shelf-pack":495}],381:[function(require,module,exports){ +},{"../util/util":421,"shelf-pack":492}],378:[function(require,module,exports){ 'use strict'; var normalizeURL = require('../util/mapbox').normalizeGlyphsURL; @@ -63203,7 +63154,7 @@ function glyphUrl(fontstack, range, url, subdomains) { .replace('{range}', range); } -},{"../symbol/glyph_atlas":380,"../util/ajax":407,"../util/glyphs":417,"../util/mapbox":421,"pbf":459}],382:[function(require,module,exports){ +},{"../symbol/glyph_atlas":377,"../util/ajax":404,"../util/glyphs":414,"../util/mapbox":418,"pbf":456}],379:[function(require,module,exports){ 'use strict'; module.exports = function (features, textFeatures, geometries) { @@ -63294,7 +63245,7 @@ module.exports = function (features, textFeatures, geometries) { }; }; -},{}],383:[function(require,module,exports){ +},{}],380:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -63577,7 +63528,7 @@ function getSegmentGlyphs(glyphs, anchor, offset, line, segment, forward) { return placementScale; } -},{"point-geometry":465}],384:[function(require,module,exports){ +},{"point-geometry":462}],381:[function(require,module,exports){ 'use strict'; var resolveTokens = require('../util/token'); @@ -63620,7 +63571,7 @@ function resolveText(features, layoutProperties, codepoints) { return textFeatures; } -},{"../util/token":423}],385:[function(require,module,exports){ +},{"../util/token":420}],382:[function(require,module,exports){ 'use strict'; module.exports = { @@ -63801,7 +63752,7 @@ function PositionedIcon(image, top, bottom, left, right) { this.right = right; } -},{}],386:[function(require,module,exports){ +},{}],383:[function(require,module,exports){ 'use strict'; var ShelfPack = require('shelf-pack'); @@ -64034,7 +63985,7 @@ function AtlasImage(rect, width, height, sdf, pixelRatio) { this.pixelRatio = pixelRatio; } -},{"../util/browser":408,"../util/util":424,"shelf-pack":495}],387:[function(require,module,exports){ +},{"../util/browser":405,"../util/util":421,"shelf-pack":492}],384:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -64079,7 +64030,7 @@ util.extendAll(SymbolInstancesArray.prototype.StructType.prototype, { -},{"../util/struct_array":422,"../util/util":424,"point-geometry":465}],388:[function(require,module,exports){ +},{"../util/struct_array":419,"../util/util":421,"point-geometry":462}],385:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -64153,7 +64104,7 @@ util.extendAll(SymbolQuadsArray.prototype.StructType.prototype, { }); -},{"../util/struct_array":422,"../util/util":424,"./quads":383,"point-geometry":465}],389:[function(require,module,exports){ +},{"../util/struct_array":419,"../util/util":421,"./quads":380,"point-geometry":462}],386:[function(require,module,exports){ 'use strict'; var DOM = require('../util/dom'); @@ -64328,7 +64279,7 @@ module.exports = function bindHandlers(map, options) { * property. */ -},{"../util/dom":410,"./handler/box_zoom":395,"./handler/dblclick_zoom":396,"./handler/drag_pan":397,"./handler/drag_rotate":398,"./handler/keyboard":399,"./handler/scroll_zoom":400,"./handler/touch_zoom_rotate":401,"point-geometry":465}],390:[function(require,module,exports){ +},{"../util/dom":407,"./handler/box_zoom":392,"./handler/dblclick_zoom":393,"./handler/drag_pan":394,"./handler/drag_rotate":395,"./handler/keyboard":396,"./handler/scroll_zoom":397,"./handler/touch_zoom_rotate":398,"point-geometry":462}],387:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -65115,7 +65066,7 @@ util.extend(Camera.prototype, /** @lends Map.prototype */{ * @property {MapEventData} data */ -},{"../geo/lng_lat":321,"../geo/lng_lat_bounds":322,"../util/browser":408,"../util/interpolate":418,"../util/util":424,"point-geometry":465}],391:[function(require,module,exports){ +},{"../geo/lng_lat":318,"../geo/lng_lat_bounds":319,"../util/browser":405,"../util/interpolate":415,"../util/util":421,"point-geometry":462}],388:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -65198,7 +65149,7 @@ Attribution.prototype = util.inherit(Control, { } }); -},{"../../util/dom":410,"../../util/util":424,"./control":392}],392:[function(require,module,exports){ +},{"../../util/dom":407,"../../util/util":421,"./control":389}],389:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65253,7 +65204,7 @@ Control.prototype = { util.extend(Control.prototype, Evented); -},{"../../util/evented":416,"../../util/util":424}],393:[function(require,module,exports){ +},{"../../util/evented":413,"../../util/util":421}],390:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -65355,7 +65306,7 @@ Geolocate.prototype = util.inherit(Control, { * */ -},{"../../util/browser":408,"../../util/dom":410,"../../util/util":424,"./control":392}],394:[function(require,module,exports){ +},{"../../util/browser":405,"../../util/dom":407,"../../util/util":421,"./control":389}],391:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -65476,7 +65427,7 @@ function copyMouseEvent(e) { }); } -},{"../../util/dom":410,"../../util/util":424,"./control":392}],395:[function(require,module,exports){ +},{"../../util/dom":407,"../../util/util":421,"./control":389}],392:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -65663,7 +65614,7 @@ BoxZoomHandler.prototype = { * @property {MapBoxZoomEvent} data */ -},{"../../geo/lng_lat_bounds":322,"../../util/dom":410,"../../util/util":424}],396:[function(require,module,exports){ +},{"../../geo/lng_lat_bounds":319,"../../util/dom":407,"../../util/util":421}],393:[function(require,module,exports){ 'use strict'; module.exports = DoubleClickZoomHandler; @@ -65726,7 +65677,7 @@ DoubleClickZoomHandler.prototype = { } }; -},{}],397:[function(require,module,exports){ +},{}],394:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -65962,7 +65913,7 @@ DragPanHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/dom":410,"../../util/util":424}],398:[function(require,module,exports){ +},{"../../util/dom":407,"../../util/util":421}],395:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -66216,7 +66167,7 @@ DragRotateHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/dom":410,"../../util/util":424,"point-geometry":465}],399:[function(require,module,exports){ +},{"../../util/dom":407,"../../util/util":421,"point-geometry":462}],396:[function(require,module,exports){ 'use strict'; module.exports = KeyboardHandler; @@ -66348,7 +66299,7 @@ KeyboardHandler.prototype = { } }; -},{}],400:[function(require,module,exports){ +},{}],397:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -66531,7 +66482,7 @@ ScrollZoomHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/browser":408,"../../util/dom":410,"../../util/util":424}],401:[function(require,module,exports){ +},{"../../util/browser":405,"../../util/dom":407,"../../util/util":421}],398:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -66746,7 +66697,7 @@ TouchZoomRotateHandler.prototype = { } }; -},{"../../util/dom":410,"../../util/util":424}],402:[function(require,module,exports){ +},{"../../util/dom":407,"../../util/util":421}],399:[function(require,module,exports){ 'use strict'; /* @@ -66821,7 +66772,7 @@ Hash.prototype = { } }; -},{"../util/util":424}],403:[function(require,module,exports){ +},{"../util/util":421}],400:[function(require,module,exports){ 'use strict'; var Canvas = require('../util/canvas'); @@ -68261,7 +68212,7 @@ function removeNode(node) { * @property {{error: {message: string}}} data */ -},{"../geo/lng_lat":321,"../geo/lng_lat_bounds":322,"../geo/transform":323,"../render/painter":337,"../style/animation_loop":357,"../style/style":360,"../util/browser":408,"../util/canvas":409,"../util/dom":410,"../util/evented":416,"../util/util":424,"./bind_handlers":389,"./camera":390,"./control/attribution":391,"./hash":402,"point-geometry":465}],404:[function(require,module,exports){ +},{"../geo/lng_lat":318,"../geo/lng_lat_bounds":319,"../geo/transform":320,"../render/painter":334,"../style/animation_loop":354,"../style/style":357,"../util/browser":405,"../util/canvas":406,"../util/dom":407,"../util/evented":413,"../util/util":421,"./bind_handlers":386,"./camera":387,"./control/attribution":388,"./hash":399,"point-geometry":462}],401:[function(require,module,exports){ /* eslint-disable */ 'use strict'; @@ -68356,7 +68307,7 @@ Marker.prototype = { } }; -},{"../geo/lng_lat":321,"../util/dom":410,"point-geometry":465}],405:[function(require,module,exports){ +},{"../geo/lng_lat":318,"../util/dom":407,"point-geometry":462}],402:[function(require,module,exports){ 'use strict'; module.exports = Popup; @@ -68610,7 +68561,7 @@ Popup.prototype = util.inherit(Evented, /** @lends Popup.prototype */{ } }); -},{"../geo/lng_lat":321,"../util/dom":410,"../util/evented":416,"../util/util":424}],406:[function(require,module,exports){ +},{"../geo/lng_lat":318,"../util/dom":407,"../util/evented":413,"../util/util":421}],403:[function(require,module,exports){ 'use strict'; module.exports = Actor; @@ -68682,7 +68633,7 @@ Actor.prototype.postMessage = function(message, transferList) { this.target.postMessage(message, transferList); }; -},{}],407:[function(require,module,exports){ +},{}],404:[function(require,module,exports){ 'use strict'; exports.getJSON = function(url, callback) { @@ -68772,7 +68723,7 @@ exports.getVideo = function(urls, callback) { return video; }; -},{}],408:[function(require,module,exports){ +},{}],405:[function(require,module,exports){ 'use strict'; /** @@ -68867,7 +68818,7 @@ webpImgTest.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ// exports.supportsGeolocation = !!navigator.geolocation; -},{"mapbox-gl-supported":309}],409:[function(require,module,exports){ +},{"mapbox-gl-supported":306}],406:[function(require,module,exports){ 'use strict'; var util = require('../util'); @@ -68911,7 +68862,7 @@ Canvas.prototype.getElement = function() { return this.canvas; }; -},{"../util":424,"mapbox-gl-supported":309}],410:[function(require,module,exports){ +},{"../util":421,"mapbox-gl-supported":306}],407:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -68986,7 +68937,7 @@ exports.touchPos = function (el, e) { return points; }; -},{"point-geometry":465}],411:[function(require,module,exports){ +},{"point-geometry":462}],408:[function(require,module,exports){ 'use strict'; var WebWorkify = require('webworkify'); @@ -68994,7 +68945,7 @@ module.exports = function () { return new WebWorkify(require('../../source/worker')); }; -},{"../../source/worker":355,"webworkify":544}],412:[function(require,module,exports){ +},{"../../source/worker":352,"webworkify":541}],409:[function(require,module,exports){ 'use strict'; var quickselect = require('quickselect'); @@ -69054,7 +69005,7 @@ function calculateSignedArea(ring) { return sum; } -},{"quickselect":474}],413:[function(require,module,exports){ +},{"quickselect":471}],410:[function(require,module,exports){ 'use strict'; module.exports = { @@ -69062,7 +69013,7 @@ module.exports = { REQUIRE_ACCESS_TOKEN: true }; -},{}],414:[function(require,module,exports){ +},{}],411:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -69089,7 +69040,7 @@ DictionaryCoder.prototype.decode = function(n) { return this._numberToString[n]; }; -},{"assert":40}],415:[function(require,module,exports){ +},{"assert":37}],412:[function(require,module,exports){ 'use strict'; var util = require('./util'); @@ -69164,7 +69115,7 @@ Dispatcher.prototype = { } }; -},{"./actor":406,"./util":424,"./web_worker":411}],416:[function(require,module,exports){ +},{"./actor":403,"./util":421,"./web_worker":408}],413:[function(require,module,exports){ 'use strict'; var util = require('./util'); @@ -69287,7 +69238,7 @@ var Evented = { module.exports = Evented; -},{"./util":424}],417:[function(require,module,exports){ +},{"./util":421}],414:[function(require,module,exports){ 'use strict'; module.exports = Glyphs; @@ -69322,7 +69273,7 @@ function readGlyph(tag, glyph, pbf) { else if (tag === 7) glyph.advance = pbf.readVarint(); } -},{}],418:[function(require,module,exports){ +},{}],415:[function(require,module,exports){ 'use strict'; module.exports = interpolate; @@ -69363,7 +69314,7 @@ interpolate.array = function(from, to, t) { }); }; -},{}],419:[function(require,module,exports){ +},{}],416:[function(require,module,exports){ 'use strict'; module.exports = { @@ -69529,7 +69480,7 @@ function polygonContainsPoint(ring, p) { return c; } -},{}],420:[function(require,module,exports){ +},{}],417:[function(require,module,exports){ 'use strict'; module.exports = LRUCache; @@ -69654,7 +69605,7 @@ LRUCache.prototype.setMaxSize = function(max) { return this; }; -},{}],421:[function(require,module,exports){ +},{}],418:[function(require,module,exports){ 'use strict'; var config = require('./config'); @@ -69782,7 +69733,7 @@ function replaceTempAccessToken(query) { } } -},{"./browser":408,"./config":413,"./util":424,"url":525}],422:[function(require,module,exports){ +},{"./browser":405,"./config":410,"./util":421,"url":522}],419:[function(require,module,exports){ 'use strict'; // Note: all "sizes" are measured in bytes @@ -70130,7 +70081,7 @@ StructArray.prototype.toArray = function(startIndex, endIndex) { return array; }; -},{"assert":40}],423:[function(require,module,exports){ +},{"assert":37}],420:[function(require,module,exports){ 'use strict'; module.exports = resolveTokens; @@ -70149,7 +70100,7 @@ function resolveTokens(properties, text) { }); } -},{}],424:[function(require,module,exports){ +},{}],421:[function(require,module,exports){ 'use strict'; var UnitBezier = require('unitbezier'); @@ -70608,7 +70559,7 @@ exports.warnOnce = function(message) { } }; -},{"../geo/coordinate":320,"unitbezier":524}],425:[function(require,module,exports){ +},{"../geo/coordinate":317,"unitbezier":521}],422:[function(require,module,exports){ 'use strict'; module.exports = Feature; @@ -70653,7 +70604,7 @@ Feature.prototype = { } }; -},{}],426:[function(require,module,exports){ +},{}],423:[function(require,module,exports){ module.exports={ "_args": [ [ @@ -70694,7 +70645,6 @@ module.exports={ "type": "range" }, "_requiredBy": [ - "#USER", "/" ], "_resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz", @@ -70994,7 +70944,7 @@ module.exports={ "version": "0.22.1" } -},{}],427:[function(require,module,exports){ +},{}],424:[function(require,module,exports){ 'use strict' module.exports = createTable @@ -71060,7 +71010,7 @@ function createTable(dimension) { } return result } -},{"convex-hull":96}],428:[function(require,module,exports){ +},{"convex-hull":93}],425:[function(require,module,exports){ /*jshint unused:true*/ /* Input: matrix ; a 4x4 matrix @@ -71240,7 +71190,7 @@ function combine(out, a, b, scale1, scale2) { out[1] = a[1] * scale1 + b[1] * scale2 out[2] = a[2] * scale1 + b[2] * scale2 } -},{"./normalize":429,"gl-mat4/clone":159,"gl-mat4/create":160,"gl-mat4/determinant":161,"gl-mat4/invert":165,"gl-mat4/transpose":175,"gl-vec3/cross":256,"gl-vec3/dot":257,"gl-vec3/length":258,"gl-vec3/normalize":260}],429:[function(require,module,exports){ +},{"./normalize":426,"gl-mat4/clone":156,"gl-mat4/create":157,"gl-mat4/determinant":158,"gl-mat4/invert":162,"gl-mat4/transpose":172,"gl-vec3/cross":253,"gl-vec3/dot":254,"gl-vec3/length":255,"gl-vec3/normalize":257}],426:[function(require,module,exports){ module.exports = function normalize(out, mat) { var m44 = mat[15] // Cannot normalize. @@ -71251,7 +71201,7 @@ module.exports = function normalize(out, mat) { out[i] = mat[i] * scale return true } -},{}],430:[function(require,module,exports){ +},{}],427:[function(require,module,exports){ var lerp = require('gl-vec3/lerp') var recompose = require('mat4-recompose') @@ -71304,7 +71254,7 @@ function vec3(n) { function vec4() { return [0,0,0,1] } -},{"gl-mat4/determinant":161,"gl-vec3/lerp":259,"mat4-decompose":428,"mat4-recompose":431,"quat-slerp":470}],431:[function(require,module,exports){ +},{"gl-mat4/determinant":158,"gl-vec3/lerp":256,"mat4-decompose":425,"mat4-recompose":428,"quat-slerp":467}],428:[function(require,module,exports){ /* Input: translation ; a 3 component vector scale ; a 3 component vector @@ -71365,207 +71315,206 @@ module.exports = function recomposeMat4(matrix, translation, scale, skew, perspe mat4.scale(matrix, matrix, scale) return matrix } -},{"gl-mat4/create":160,"gl-mat4/fromRotationTranslation":163,"gl-mat4/identity":164,"gl-mat4/multiply":167,"gl-mat4/scale":173,"gl-mat4/translate":174}],432:[function(require,module,exports){ -'use strict' - -var bsearch = require('binary-search-bounds') -var m4interp = require('mat4-interpolate') -var invert44 = require('gl-mat4/invert') -var rotateX = require('gl-mat4/rotateX') -var rotateY = require('gl-mat4/rotateY') -var rotateZ = require('gl-mat4/rotateZ') -var lookAt = require('gl-mat4/lookAt') -var translate = require('gl-mat4/translate') -var scale = require('gl-mat4/scale') -var normalize = require('gl-vec3/normalize') - -var DEFAULT_CENTER = [0,0,0] - -module.exports = createMatrixCameraController - -function MatrixCameraController(initialMatrix) { - this._components = initialMatrix.slice() - this._time = [0] - this.prevMatrix = initialMatrix.slice() - this.nextMatrix = initialMatrix.slice() - this.computedMatrix = initialMatrix.slice() - this.computedInverse = initialMatrix.slice() - this.computedEye = [0,0,0] - this.computedUp = [0,0,0] - this.computedCenter = [0,0,0] - this.computedRadius = [0] - this._limits = [-Infinity, Infinity] -} - -var proto = MatrixCameraController.prototype - -proto.recalcMatrix = function(t) { - var time = this._time - var tidx = bsearch.le(time, t) - var mat = this.computedMatrix - if(tidx < 0) { - return - } - var comps = this._components - if(tidx === time.length-1) { - var ptr = 16*tidx - for(var i=0; i<16; ++i) { - mat[i] = comps[ptr++] - } - } else { - var dt = (time[tidx+1] - time[tidx]) - var ptr = 16*tidx - var prev = this.prevMatrix - var allEqual = true - for(var i=0; i<16; ++i) { - prev[i] = comps[ptr++] - } - var next = this.nextMatrix - for(var i=0; i<16; ++i) { - next[i] = comps[ptr++] - allEqual = allEqual && (prev[i] === next[i]) - } - if(dt < 1e-6 || allEqual) { - for(var i=0; i<16; ++i) { - mat[i] = prev[i] - } - } else { - m4interp(mat, prev, next, (t - time[tidx])/dt) - } - } - - var up = this.computedUp - up[0] = mat[1] - up[1] = mat[5] - up[2] = mat[9] - normalize(up, up) - - var imat = this.computedInverse - invert44(imat, mat) - var eye = this.computedEye - var w = imat[15] - eye[0] = imat[12]/w - eye[1] = imat[13]/w - eye[2] = imat[14]/w - - var center = this.computedCenter - var radius = Math.exp(this.computedRadius[0]) - for(var i=0; i<3; ++i) { - center[i] = eye[i] - mat[2+4*i] * radius - } -} - -proto.idle = function(t) { - if(t < this.lastT()) { - return - } - var mc = this._components - var ptr = mc.length-16 - for(var i=0; i<16; ++i) { - mc.push(mc[ptr++]) - } - this._time.push(t) -} - -proto.flush = function(t) { - var idx = bsearch.gt(this._time, t) - 2 - if(idx < 0) { - return - } - this._time.splice(0, idx) - this._components.splice(0, 16*idx) -} - -proto.lastT = function() { - return this._time[this._time.length-1] -} - -proto.lookAt = function(t, eye, center, up) { - this.recalcMatrix(t) - eye = eye || this.computedEye - center = center || DEFAULT_CENTER - up = up || this.computedUp - this.setMatrix(t, lookAt(this.computedMatrix, eye, center, up)) - var d2 = 0.0 - for(var i=0; i<3; ++i) { - d2 += Math.pow(center[i] - eye[i], 2) - } - d2 = Math.log(Math.sqrt(d2)) - this.computedRadius[0] = d2 -} - -proto.rotate = function(t, yaw, pitch, roll) { - this.recalcMatrix(t) - var mat = this.computedInverse - if(yaw) rotateY(mat, mat, yaw) - if(pitch) rotateX(mat, mat, pitch) - if(roll) rotateZ(mat, mat, roll) - this.setMatrix(t, invert44(this.computedMatrix, mat)) -} - -var tvec = [0,0,0] - -proto.pan = function(t, dx, dy, dz) { - tvec[0] = -(dx || 0.0) - tvec[1] = -(dy || 0.0) - tvec[2] = -(dz || 0.0) - this.recalcMatrix(t) - var mat = this.computedInverse - translate(mat, mat, tvec) - this.setMatrix(t, invert44(mat, mat)) -} - -proto.translate = function(t, dx, dy, dz) { - tvec[0] = dx || 0.0 - tvec[1] = dy || 0.0 - tvec[2] = dz || 0.0 - this.recalcMatrix(t) - var mat = this.computedMatrix - translate(mat, mat, tvec) - this.setMatrix(t, mat) -} - -proto.setMatrix = function(t, mat) { - if(t < this.lastT()) { - return - } - this._time.push(t) - for(var i=0; i<16; ++i) { - this._components.push(mat[i]) - } -} - -proto.setDistance = function(t, d) { - this.computedRadius[0] = d -} - -proto.setDistanceLimits = function(a,b) { - var lim = this._limits - lim[0] = a - lim[1] = b -} - -proto.getDistanceLimits = function(out) { - var lim = this._limits - if(out) { - out[0] = lim[0] - out[1] = lim[1] - return out - } - return lim -} - -function createMatrixCameraController(options) { - options = options || {} - var matrix = options.matrix || - [1,0,0,0, - 0,1,0,0, - 0,0,1,0, - 0,0,0,1] - return new MatrixCameraController(matrix) -} +},{"gl-mat4/create":157,"gl-mat4/fromRotationTranslation":160,"gl-mat4/identity":161,"gl-mat4/multiply":164,"gl-mat4/scale":170,"gl-mat4/translate":171}],429:[function(require,module,exports){ +'use strict' -},{"binary-search-bounds":59,"gl-mat4/invert":165,"gl-mat4/lookAt":166,"gl-mat4/rotateX":170,"gl-mat4/rotateY":171,"gl-mat4/rotateZ":172,"gl-mat4/scale":173,"gl-mat4/translate":174,"gl-vec3/normalize":260,"mat4-interpolate":430}],433:[function(require,module,exports){ +var bsearch = require('binary-search-bounds') +var m4interp = require('mat4-interpolate') +var invert44 = require('gl-mat4/invert') +var rotateX = require('gl-mat4/rotateX') +var rotateY = require('gl-mat4/rotateY') +var rotateZ = require('gl-mat4/rotateZ') +var lookAt = require('gl-mat4/lookAt') +var translate = require('gl-mat4/translate') +var scale = require('gl-mat4/scale') +var normalize = require('gl-vec3/normalize') + +var DEFAULT_CENTER = [0,0,0] + +module.exports = createMatrixCameraController + +function MatrixCameraController(initialMatrix) { + this._components = initialMatrix.slice() + this._time = [0] + this.prevMatrix = initialMatrix.slice() + this.nextMatrix = initialMatrix.slice() + this.computedMatrix = initialMatrix.slice() + this.computedInverse = initialMatrix.slice() + this.computedEye = [0,0,0] + this.computedUp = [0,0,0] + this.computedCenter = [0,0,0] + this.computedRadius = [0] + this._limits = [-Infinity, Infinity] +} + +var proto = MatrixCameraController.prototype + +proto.recalcMatrix = function(t) { + var time = this._time + var tidx = bsearch.le(time, t) + var mat = this.computedMatrix + if(tidx < 0) { + return + } + var comps = this._components + if(tidx === time.length-1) { + var ptr = 16*tidx + for(var i=0; i<16; ++i) { + mat[i] = comps[ptr++] + } + } else { + var dt = (time[tidx+1] - time[tidx]) + var ptr = 16*tidx + var prev = this.prevMatrix + var allEqual = true + for(var i=0; i<16; ++i) { + prev[i] = comps[ptr++] + } + var next = this.nextMatrix + for(var i=0; i<16; ++i) { + next[i] = comps[ptr++] + allEqual = allEqual && (prev[i] === next[i]) + } + if(dt < 1e-6 || allEqual) { + for(var i=0; i<16; ++i) { + mat[i] = prev[i] + } + } else { + m4interp(mat, prev, next, (t - time[tidx])/dt) + } + } + + var up = this.computedUp + up[0] = mat[1] + up[1] = mat[5] + up[2] = mat[6] + normalize(up, up) + + var imat = this.computedInverse + invert44(imat, mat) + var eye = this.computedEye + var w = imat[15] + eye[0] = imat[12]/w + eye[1] = imat[13]/w + eye[2] = imat[14]/w + + var center = this.computedCenter + var radius = Math.exp(this.computedRadius[0]) + for(var i=0; i<3; ++i) { + center[i] = eye[i] - mat[2+4*i] * radius + } +} + +proto.idle = function(t) { + if(t < this.lastT()) { + return + } + var mc = this._components + var ptr = mc.length-16 + for(var i=0; i<16; ++i) { + mc.push(mc[ptr++]) + } + this._time.push(t) +} + +proto.flush = function(t) { + var idx = bsearch.gt(this._time, t) - 2 + if(idx < 0) { + return + } + this._time.slice(0, idx) + this._components.slice(0, 16*idx) +} + +proto.lastT = function() { + return this._time[this._time.length-1] +} + +proto.lookAt = function(t, eye, center, up) { + this.recalcMatrix(t) + eye = eye || this.computedEye + center = center || DEFAULT_CENTER + up = up || this.computedUp + this.setMatrix(t, lookAt(this.computedMatrix, eye, center, up)) + var d2 = 0.0 + for(var i=0; i<3; ++i) { + d2 += Math.pow(center[i] - eye[i], 2) + } + d2 = Math.log(Math.sqrt(d2)) + this.computedRadius[0] = d2 +} + +proto.rotate = function(t, yaw, pitch, roll) { + this.recalcMatrix(t) + var mat = this.computedInverse + if(yaw) rotateY(mat, mat, yaw) + if(pitch) rotateX(mat, mat, pitch) + if(roll) rotateZ(mat, mat, roll) + this.setMatrix(t, invert44(this.computedMatrix, mat)) +} + +var tvec = [0,0,0] + +proto.pan = function(t, dx, dy, dz) { + tvec[0] = -(dx || 0.0) + tvec[1] = -(dy || 0.0) + tvec[2] = -(dz || 0.0) + this.recalcMatrix(t) + var mat = this.computedInverse + translate(mat, mat, tvec) + this.setMatrix(t, invert44(mat, mat)) +} + +proto.translate = function(t, dx, dy, dz) { + tvec[0] = dx || 0.0 + tvec[1] = dy || 0.0 + tvec[2] = dz || 0.0 + this.recalcMatrix(t) + var mat = this.computedMatrix + translate(mat, mat, tvec) + this.setMatrix(t, mat) +} + +proto.setMatrix = function(t, mat) { + if(t < this.lastT()) { + return + } + this._time.push(t) + for(var i=0; i<16; ++i) { + this._components.push(mat[i]) + } +} + +proto.setDistance = function(t, d) { + this.computedRadius[0] = d +} + +proto.setDistanceLimits = function(a,b) { + var lim = this._limits + lim[0] = a + lim[1] = b +} + +proto.getDistanceLimits = function(out) { + var lim = this._limits + if(out) { + out[0] = lim[0] + out[1] = lim[1] + return out + } + return lim +} + +function createMatrixCameraController(options) { + options = options || {} + var matrix = options.matrix || + [1,0,0,0, + 0,1,0,0, + 0,0,1,0, + 0,0,0,1] + return new MatrixCameraController(matrix) +} +},{"binary-search-bounds":56,"gl-mat4/invert":162,"gl-mat4/lookAt":163,"gl-mat4/rotateX":167,"gl-mat4/rotateY":168,"gl-mat4/rotateZ":169,"gl-mat4/scale":170,"gl-mat4/translate":171,"gl-vec3/normalize":257,"mat4-interpolate":427}],430:[function(require,module,exports){ 'use strict' module.exports = monotoneConvexHull2D @@ -71647,7 +71596,7 @@ function monotoneConvexHull2D(points) { //Return result return result } -},{"robust-orientation":489}],434:[function(require,module,exports){ +},{"robust-orientation":486}],431:[function(require,module,exports){ 'use strict' module.exports = mouseListen @@ -71854,7 +71803,7 @@ function mouseListen (element, callback) { return result } -},{"mouse-event":436}],435:[function(require,module,exports){ +},{"mouse-event":433}],432:[function(require,module,exports){ var rootPosition = { left: 0, top: 0 } module.exports = mouseEventOffset @@ -71881,7 +71830,7 @@ function getBoundingClientOffset (element) { } } -},{}],436:[function(require,module,exports){ +},{}],433:[function(require,module,exports){ 'use strict' function mouseButtons(ev) { @@ -71943,7 +71892,7 @@ function mouseRelativeY(ev) { } exports.y = mouseRelativeY -},{}],437:[function(require,module,exports){ +},{}],434:[function(require,module,exports){ 'use strict' var toPX = require('to-px') @@ -71985,7 +71934,7 @@ function mouseWheelListen(element, callback, noScroll) { return listener } -},{"to-px":515}],438:[function(require,module,exports){ +},{"to-px":512}],435:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -72401,7 +72350,7 @@ function createSurfaceExtractor(args) { order, typesig) } -},{"typedarray-pool":521}],439:[function(require,module,exports){ +},{"typedarray-pool":518}],436:[function(require,module,exports){ "use strict" @@ -72413,7 +72362,7 @@ module.exports = function(array, f) { return array } -},{"cwise/lib/wrapper":106}],440:[function(require,module,exports){ +},{"cwise/lib/wrapper":103}],437:[function(require,module,exports){ 'use strict' module.exports = gradient @@ -72711,7 +72660,7 @@ function gradient(out, inp, bc) { var cached = generateGradient(bc) return cached(out, inp) } -},{"cwise-compiler":103,"dup":110}],441:[function(require,module,exports){ +},{"cwise-compiler":100,"dup":107}],438:[function(require,module,exports){ 'use strict' var warp = require('ndarray-warp') @@ -72741,7 +72690,7 @@ function applyHomography(dest, src, Xi) { }) return dest } -},{"gl-matrix-invert":176,"ndarray-warp":448}],442:[function(require,module,exports){ +},{"gl-matrix-invert":173,"ndarray-warp":445}],439:[function(require,module,exports){ "use strict" function interp1d(arr, x) { @@ -72852,7 +72801,7 @@ module.exports.d1 = interp1d module.exports.d2 = interp2d module.exports.d3 = interp3d -},{}],443:[function(require,module,exports){ +},{}],440:[function(require,module,exports){ "use strict" var compile = require("cwise-compiler") @@ -73315,7 +73264,7 @@ exports.equals = compile({ -},{"cwise-compiler":103}],444:[function(require,module,exports){ +},{"cwise-compiler":100}],441:[function(require,module,exports){ "use strict" var ndarray = require("ndarray") @@ -73338,10 +73287,10 @@ module.exports = function convert(arr, result) { return result } -},{"./doConvert.js":445,"ndarray":449}],445:[function(require,module,exports){ +},{"./doConvert.js":442,"ndarray":446}],442:[function(require,module,exports){ module.exports=require('cwise-compiler')({"args":["array","scalar","index"],"pre":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"body":{"body":"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}","args":[{"name":"_inline_1_arg0_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_1_arg1_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_1_arg2_","lvalue":false,"rvalue":true,"count":4}],"thisVars":[],"localVars":["_inline_1_i","_inline_1_v"]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"funcName":"convert","blockSize":64}) -},{"cwise-compiler":103}],446:[function(require,module,exports){ +},{"cwise-compiler":100}],443:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -74070,7 +74019,7 @@ function compileSort(order, dtype) { } module.exports = compileSort -},{"typedarray-pool":521}],447:[function(require,module,exports){ +},{"typedarray-pool":518}],444:[function(require,module,exports){ "use strict" var compile = require("./lib/compile_sort.js") @@ -74090,7 +74039,7 @@ function sort(array) { } module.exports = sort -},{"./lib/compile_sort.js":446}],448:[function(require,module,exports){ +},{"./lib/compile_sort.js":443}],445:[function(require,module,exports){ 'use strict' var interp = require('ndarray-linear-interpolate') @@ -74122,7 +74071,7 @@ module.exports = function warp(dest, src, func) { return dest } -},{"cwise/lib/wrapper":106,"ndarray-linear-interpolate":442}],449:[function(require,module,exports){ +},{"cwise/lib/wrapper":103,"ndarray-linear-interpolate":439}],446:[function(require,module,exports){ var iota = require("iota-array") var isBuffer = require("is-buffer") @@ -74467,7 +74416,7 @@ function wrappedNDArrayCtor(data, shape, stride, offset) { module.exports = wrappedNDArrayCtor -},{"iota-array":276,"is-buffer":277}],450:[function(require,module,exports){ +},{"iota-array":273,"is-buffer":274}],447:[function(require,module,exports){ "use strict" var doubleBits = require("double-bits") @@ -74510,7 +74459,7 @@ function nextafter(x, y) { } return doubleBits.pack(lo, hi) } -},{"double-bits":109}],451:[function(require,module,exports){ +},{"double-bits":106}],448:[function(require,module,exports){ var DEFAULT_NORMALS_EPSILON = 1e-6; var DEFAULT_FACE_EPSILON = 1e-6; @@ -74635,7 +74584,7 @@ exports.faceNormals = function(faces, positions, specifiedEpsilon) { -},{}],452:[function(require,module,exports){ +},{}],449:[function(require,module,exports){ /* object-assign (c) Sindre Sorhus @@ -74727,7 +74676,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { return to; }; -},{}],453:[function(require,module,exports){ +},{}],450:[function(require,module,exports){ 'use strict' module.exports = quatFromFrame @@ -74769,7 +74718,7 @@ function quatFromFrame( } return out } -},{}],454:[function(require,module,exports){ +},{}],451:[function(require,module,exports){ 'use strict' module.exports = createOrbitController @@ -75163,7 +75112,7 @@ function createOrbitController(options) { return result } -},{"./lib/quatFromFrame":453,"filtered-vector":118,"gl-mat4/fromQuat":162,"gl-mat4/invert":165,"gl-mat4/lookAt":166}],455:[function(require,module,exports){ +},{"./lib/quatFromFrame":450,"filtered-vector":115,"gl-mat4/fromQuat":159,"gl-mat4/invert":162,"gl-mat4/lookAt":163}],452:[function(require,module,exports){ /*! * pad-left * @@ -75179,7 +75128,7 @@ module.exports = function padLeft(str, num, ch) { ch = typeof ch !== 'undefined' ? (ch + '') : ' '; return repeat(ch, num) + str; }; -},{"repeat-string":481}],456:[function(require,module,exports){ +},{"repeat-string":478}],453:[function(require,module,exports){ module.exports = function parseUnit(str, out) { if (!out) out = [ 0, '' ] @@ -75190,7 +75139,7 @@ module.exports = function parseUnit(str, out) { out[1] = str.match(/[\d.\-\+]*\s*(.*)/)[1] || '' return out } -},{}],457:[function(require,module,exports){ +},{}],454:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -75418,7 +75367,7 @@ var substr = 'ab'.substr(-1) === 'b' ; }).call(this,require('_process')) -},{"_process":468}],458:[function(require,module,exports){ +},{"_process":465}],455:[function(require,module,exports){ 'use strict'; // lightweight Buffer shim for pbf browser build @@ -75579,7 +75528,7 @@ function encodeString(str) { return bytes; } -},{"ieee754":272}],459:[function(require,module,exports){ +},{"ieee754":269}],456:[function(require,module,exports){ (function (global){ 'use strict'; @@ -76005,7 +75954,7 @@ function writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pb function writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./buffer":458}],460:[function(require,module,exports){ +},{"./buffer":455}],457:[function(require,module,exports){ "use strict" module.exports = permutationSign @@ -76057,7 +76006,7 @@ function permutationSign(p) { return sgn } } -},{"typedarray-pool":521}],461:[function(require,module,exports){ +},{"typedarray-pool":518}],458:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -76144,7 +76093,7 @@ function unrank(n, r, p) { exports.rank = rank exports.unrank = unrank -},{"invert-permutation":275,"typedarray-pool":521}],462:[function(require,module,exports){ +},{"invert-permutation":272,"typedarray-pool":518}],459:[function(require,module,exports){ "use strict" module.exports = planarDual @@ -76275,7 +76224,7 @@ function planarDual(cells, positions) { //Combine paths and loops together return cycles } -},{"compare-angle":93}],463:[function(require,module,exports){ +},{"compare-angle":90}],460:[function(require,module,exports){ 'use strict' module.exports = trimLeaves @@ -76331,7 +76280,7 @@ function trimLeaves(edges, positions) { return [ nedges, npositions ] } -},{"edges-to-adjacency-list":112}],464:[function(require,module,exports){ +},{"edges-to-adjacency-list":109}],461:[function(require,module,exports){ 'use strict' module.exports = planarGraphToPolyline @@ -76536,7 +76485,7 @@ function planarGraphToPolyline(edges, positions) { return result } -},{"./lib/trim-leaves":463,"edges-to-adjacency-list":112,"planar-dual":462,"point-in-big-polygon":466,"robust-sum":494,"two-product":519,"uniq":523}],465:[function(require,module,exports){ +},{"./lib/trim-leaves":460,"edges-to-adjacency-list":109,"planar-dual":459,"point-in-big-polygon":463,"robust-sum":491,"two-product":516,"uniq":520}],462:[function(require,module,exports){ 'use strict'; module.exports = Point; @@ -76669,7 +76618,7 @@ Point.convert = function (a) { return a; }; -},{}],466:[function(require,module,exports){ +},{}],463:[function(require,module,exports){ module.exports = preprocessPolygon var orient = require('robust-orientation')[3] @@ -76821,7 +76770,7 @@ function preprocessPolygon(loops) { testSlab) } } -},{"binary-search-bounds":59,"interval-tree-1d":274,"robust-orientation":489,"slab-decomposition":506}],467:[function(require,module,exports){ +},{"binary-search-bounds":56,"interval-tree-1d":271,"robust-orientation":486,"slab-decomposition":503}],464:[function(require,module,exports){ //Optimized version for triangle closest point // Based on Eberly's WildMagick codes // http://www.geometrictools.com/LibMathematics/Distance/Distance.html @@ -77019,7 +76968,7 @@ function closestPoint2d(V0, V1, V2, point, result) { module.exports = closestPoint2d; -},{}],468:[function(require,module,exports){ +},{}],465:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -77201,7 +77150,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],469:[function(require,module,exports){ +},{}],466:[function(require,module,exports){ (function (global){ /*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { @@ -77738,9 +77687,9 @@ process.umask = function() { return 0; }; }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],470:[function(require,module,exports){ +},{}],467:[function(require,module,exports){ module.exports = require('gl-quat/slerp') -},{"gl-quat/slerp":215}],471:[function(require,module,exports){ +},{"gl-quat/slerp":212}],468:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -77826,7 +77775,7 @@ var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; -},{}],472:[function(require,module,exports){ +},{}],469:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -77913,13 +77862,13 @@ var objectKeys = Object.keys || function (obj) { return res; }; -},{}],473:[function(require,module,exports){ +},{}],470:[function(require,module,exports){ 'use strict'; exports.decode = exports.parse = require('./decode'); exports.encode = exports.stringify = require('./encode'); -},{"./decode":471,"./encode":472}],474:[function(require,module,exports){ +},{"./decode":468,"./encode":469}],471:[function(require,module,exports){ 'use strict'; module.exports = partialSort; @@ -77981,7 +77930,7 @@ function defaultCompare(a, b) { return a < b ? -1 : a > b ? 1 : 0; } -},{}],475:[function(require,module,exports){ +},{}],472:[function(require,module,exports){ 'use strict' var bnadd = require('big-rat/add') @@ -77997,7 +77946,7 @@ function add (a, b) { return r } -},{"big-rat/add":43}],476:[function(require,module,exports){ +},{"big-rat/add":40}],473:[function(require,module,exports){ 'use strict' module.exports = float2rat @@ -78012,7 +77961,7 @@ function float2rat(v) { return result } -},{"big-rat":46}],477:[function(require,module,exports){ +},{"big-rat":43}],474:[function(require,module,exports){ 'use strict' var rat = require('big-rat') @@ -78030,7 +77979,7 @@ function muls(a, x) { return r } -},{"big-rat":46,"big-rat/mul":55}],478:[function(require,module,exports){ +},{"big-rat":43,"big-rat/mul":52}],475:[function(require,module,exports){ 'use strict' var bnsub = require('big-rat/sub') @@ -78046,7 +77995,7 @@ function sub(a, b) { return r } -},{"big-rat/sub":57}],479:[function(require,module,exports){ +},{"big-rat/sub":54}],476:[function(require,module,exports){ 'use strict' var compareCell = require('compare-cell') @@ -78079,7 +78028,7 @@ function reduceCellComplex(cells) { return cells } -},{"cell-orientation":78,"compare-cell":94,"compare-oriented-cell":95}],480:[function(require,module,exports){ +},{"cell-orientation":75,"compare-cell":91,"compare-oriented-cell":92}],477:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -87584,7 +87533,7 @@ return wrapREGL; }))); -},{}],481:[function(require,module,exports){ +},{}],478:[function(require,module,exports){ /*! * repeat-string * @@ -87656,7 +87605,7 @@ function repeat(str, num) { return res; } -},{}],482:[function(require,module,exports){ +},{}],479:[function(require,module,exports){ // Copyright 2014 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) @@ -87705,7 +87654,7 @@ void (function(root, factory) { })); -},{}],483:[function(require,module,exports){ +},{}],480:[function(require,module,exports){ (function (global){ module.exports = global.performance && @@ -87716,7 +87665,7 @@ module.exports = } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],484:[function(require,module,exports){ +},{}],481:[function(require,module,exports){ "use strict" module.exports = compressExpansion @@ -87751,7 +87700,7 @@ function compressExpansion(e) { e.length = top return e } -},{}],485:[function(require,module,exports){ +},{}],482:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -87855,7 +87804,7 @@ return robustDeterminant") } generateDispatch() -},{"robust-compress":484,"robust-scale":491,"robust-sum":494,"two-product":519}],486:[function(require,module,exports){ +},{"robust-compress":481,"robust-scale":488,"robust-sum":491,"two-product":516}],483:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -87870,7 +87819,7 @@ function robustDotProduct(a, b) { } return r } -},{"robust-sum":494,"two-product":519}],487:[function(require,module,exports){ +},{"robust-sum":491,"two-product":516}],484:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -88038,7 +87987,7 @@ function generateInSphereTest() { } generateInSphereTest() -},{"robust-scale":491,"robust-subtract":493,"robust-sum":494,"two-product":519}],488:[function(require,module,exports){ +},{"robust-scale":488,"robust-subtract":490,"robust-sum":491,"two-product":516}],485:[function(require,module,exports){ "use strict" var determinant = require("robust-determinant") @@ -88110,7 +88059,7 @@ function generateDispatch() { } generateDispatch() -},{"robust-determinant":485}],489:[function(require,module,exports){ +},{"robust-determinant":482}],486:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -88301,7 +88250,7 @@ function generateOrientationProc() { } generateOrientationProc() -},{"robust-scale":491,"robust-subtract":493,"robust-sum":494,"two-product":519}],490:[function(require,module,exports){ +},{"robust-scale":488,"robust-subtract":490,"robust-sum":491,"two-product":516}],487:[function(require,module,exports){ "use strict" var robustSum = require("robust-sum") @@ -88331,7 +88280,7 @@ function robustProduct(a, b) { } return r } -},{"robust-scale":491,"robust-sum":494}],491:[function(require,module,exports){ +},{"robust-scale":488,"robust-sum":491}],488:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -88382,7 +88331,7 @@ function scaleLinearExpansion(e, scale) { g.length = count return g } -},{"two-product":519,"two-sum":520}],492:[function(require,module,exports){ +},{"two-product":516,"two-sum":517}],489:[function(require,module,exports){ "use strict" module.exports = segmentsIntersect @@ -88430,7 +88379,7 @@ function segmentsIntersect(a0, a1, b0, b1) { return true } -},{"robust-orientation":489}],493:[function(require,module,exports){ +},{"robust-orientation":486}],490:[function(require,module,exports){ "use strict" module.exports = robustSubtract @@ -88587,7 +88536,7 @@ function robustSubtract(e, f) { g.length = count return g } -},{}],494:[function(require,module,exports){ +},{}],491:[function(require,module,exports){ "use strict" module.exports = linearExpansionSum @@ -88744,7 +88693,7 @@ function linearExpansionSum(e, f) { g.length = count return g } -},{}],495:[function(require,module,exports){ +},{}],492:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -88999,7 +88948,7 @@ Shelf.prototype.resize = function(w) { return ShelfPack; })); -},{}],496:[function(require,module,exports){ +},{}],493:[function(require,module,exports){ "use strict" module.exports = function signum(x) { @@ -89007,7 +88956,7 @@ module.exports = function signum(x) { if(x > 0) { return 1 } return 0.0 } -},{}],497:[function(require,module,exports){ +},{}],494:[function(require,module,exports){ 'use strict' module.exports = boundary @@ -89019,7 +88968,7 @@ function boundary(cells) { return reduce(bnd(cells)) } -},{"boundary-cells":62,"reduce-simplicial-complex":479}],498:[function(require,module,exports){ +},{"boundary-cells":59,"reduce-simplicial-complex":476}],495:[function(require,module,exports){ 'use strict' module.exports = extractContour @@ -89182,7 +89131,7 @@ function extractContour(cells, values, level, d) { vertexWeights: uweights } } -},{"./lib/codegen":499,"ndarray":449,"ndarray-sort":447,"typedarray-pool":521}],499:[function(require,module,exports){ +},{"./lib/codegen":496,"ndarray":446,"ndarray-sort":444,"typedarray-pool":518}],496:[function(require,module,exports){ 'use strict' module.exports = getPolygonizer @@ -89279,7 +89228,7 @@ function getPolygonizer(d) { } return alg } -},{"marching-simplex-table":427,"typedarray-pool":521}],500:[function(require,module,exports){ +},{"marching-simplex-table":424,"typedarray-pool":518}],497:[function(require,module,exports){ "use strict"; "use restrict"; var bits = require("bit-twiddle") @@ -89623,11 +89572,11 @@ function connectedComponents(cells, vertex_count) { } exports.connectedComponents = connectedComponents -},{"bit-twiddle":60,"union-find":522}],501:[function(require,module,exports){ -arguments[4][60][0].apply(exports,arguments) -},{"dup":60}],502:[function(require,module,exports){ -arguments[4][500][0].apply(exports,arguments) -},{"bit-twiddle":501,"dup":500,"union-find":503}],503:[function(require,module,exports){ +},{"bit-twiddle":57,"union-find":519}],498:[function(require,module,exports){ +arguments[4][57][0].apply(exports,arguments) +},{"dup":57}],499:[function(require,module,exports){ +arguments[4][497][0].apply(exports,arguments) +},{"bit-twiddle":498,"dup":497,"union-find":500}],500:[function(require,module,exports){ "use strict"; "use restrict"; module.exports = UnionFind; @@ -89684,7 +89633,7 @@ UnionFind.prototype.link = function(x, y) { } -},{}],504:[function(require,module,exports){ +},{}],501:[function(require,module,exports){ "use strict" module.exports = simplifyPolygon @@ -89956,7 +89905,7 @@ function simplifyPolygon(cells, positions, minArea) { edges: ncells } } -},{"robust-orientation":489,"simplicial-complex":502}],505:[function(require,module,exports){ +},{"robust-orientation":486,"simplicial-complex":499}],502:[function(require,module,exports){ "use strict" module.exports = orderSegments @@ -90052,7 +90001,7 @@ function orderSegments(b, a) { } return ar[0] - br[0] } -},{"robust-orientation":489}],506:[function(require,module,exports){ +},{"robust-orientation":486}],503:[function(require,module,exports){ "use strict" module.exports = createSlabDecomposition @@ -90283,7 +90232,7 @@ function createSlabDecomposition(segments) { } return new SlabDecomposition(slabs, lines, horizontal) } -},{"./lib/order-segments":505,"binary-search-bounds":59,"functional-red-black-tree":120,"robust-orientation":489}],507:[function(require,module,exports){ +},{"./lib/order-segments":502,"binary-search-bounds":56,"functional-red-black-tree":117,"robust-orientation":486}],504:[function(require,module,exports){ "use strict" var robustDot = require("robust-dot-product") @@ -90375,7 +90324,7 @@ function negative(points, plane) { } return neg } -},{"robust-dot-product":486,"robust-sum":494}],508:[function(require,module,exports){ +},{"robust-dot-product":483,"robust-sum":491}],505:[function(require,module,exports){ (function(window) { var re = { not_string: /[^s]/, @@ -90585,7 +90534,7 @@ function negative(points, plane) { } })(typeof window === "undefined" ? this : window); -},{}],509:[function(require,module,exports){ +},{}],506:[function(require,module,exports){ 'use strict'; var kdbush = require('kdbush'); @@ -90919,7 +90868,7 @@ function getY(p) { return p.y; } -},{"kdbush":280}],510:[function(require,module,exports){ +},{"kdbush":277}],507:[function(require,module,exports){ 'use strict' module.exports = toSuperScript @@ -90974,7 +90923,7 @@ function toSuperScript(x) { }).join('') } -},{}],511:[function(require,module,exports){ +},{}],508:[function(require,module,exports){ "use strict" module.exports = surfaceNets @@ -91182,7 +91131,7 @@ function surfaceNets(array,level) { } return proc(array,level) } -},{"ndarray-extract-contour":438,"triangulate-hypercube":517,"zero-crossings":564}],512:[function(require,module,exports){ +},{"ndarray-extract-contour":435,"triangulate-hypercube":514,"zero-crossings":561}],509:[function(require,module,exports){ (function (process){ 'use strict' @@ -91272,7 +91221,7 @@ function textGet(font, text, opts) { } }).call(this,require('_process')) -},{"_process":468,"vectorize-text":534}],513:[function(require,module,exports){ +},{"_process":465,"vectorize-text":531}],510:[function(require,module,exports){ 'use strict'; module.exports = TinySDF; @@ -91381,7 +91330,7 @@ function edt1d(f, d, v, z, n) { } } -},{}],514:[function(require,module,exports){ +},{}],511:[function(require,module,exports){ // TinyColor v1.4.1 // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License @@ -92578,7 +92527,7 @@ else { })(Math); -},{}],515:[function(require,module,exports){ +},{}],512:[function(require,module,exports){ 'use strict' var parseUnit = require('parse-unit') @@ -92639,7 +92588,7 @@ function toPX(str, element) { } return 1 } -},{"parse-unit":456}],516:[function(require,module,exports){ +},{"parse-unit":453}],513:[function(require,module,exports){ // https://github.com/topojson/topojson-client Version 2.1.0. Copyright 2016 Mike Bostock. (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : @@ -93159,7 +93108,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); }))); -},{}],517:[function(require,module,exports){ +},{}],514:[function(require,module,exports){ "use strict" module.exports = triangulateCube @@ -93193,7 +93142,7 @@ function triangulateCube(dimension) { } return result } -},{"gamma":121,"permutation-parity":460,"permutation-rank":461}],518:[function(require,module,exports){ +},{"gamma":118,"permutation-parity":457,"permutation-rank":458}],515:[function(require,module,exports){ 'use strict' module.exports = createTurntableController @@ -93766,7 +93715,7 @@ function createTurntableController(options) { theta, phi) } -},{"filtered-vector":118,"gl-mat4/invert":165,"gl-mat4/rotate":169,"gl-vec3/cross":256,"gl-vec3/dot":257,"gl-vec3/normalize":260}],519:[function(require,module,exports){ +},{"filtered-vector":115,"gl-mat4/invert":162,"gl-mat4/rotate":166,"gl-vec3/cross":253,"gl-vec3/dot":254,"gl-vec3/normalize":257}],516:[function(require,module,exports){ "use strict" module.exports = twoProduct @@ -93800,7 +93749,7 @@ function twoProduct(a, b, result) { return [ y, x ] } -},{}],520:[function(require,module,exports){ +},{}],517:[function(require,module,exports){ "use strict" module.exports = fastTwoSum @@ -93818,7 +93767,7 @@ function fastTwoSum(a, b, result) { } return [ar+br, x] } -},{}],521:[function(require,module,exports){ +},{}],518:[function(require,module,exports){ (function (global,Buffer){ 'use strict' @@ -94035,7 +93984,7 @@ exports.clearCache = function clearCache() { } } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"bit-twiddle":60,"buffer":70,"dup":110}],522:[function(require,module,exports){ +},{"bit-twiddle":57,"buffer":67,"dup":107}],519:[function(require,module,exports){ "use strict"; "use restrict"; module.exports = UnionFind; @@ -94098,7 +94047,7 @@ proto.link = function(x, y) { ++ranks[xr]; } } -},{}],523:[function(require,module,exports){ +},{}],520:[function(require,module,exports){ "use strict" function unique_pred(list, compare) { @@ -94157,7 +94106,7 @@ function unique(list, compare, sorted) { module.exports = unique -},{}],524:[function(require,module,exports){ +},{}],521:[function(require,module,exports){ /* * Copyright (C) 2008 Apple Inc. All Rights Reserved. * @@ -94264,7 +94213,7 @@ UnitBezier.prototype.solve = function(x, epsilon) { return this.sampleCurveY(this.solveCurveX(x, epsilon)); }; -},{}],525:[function(require,module,exports){ +},{}],522:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -94998,7 +94947,7 @@ Url.prototype.parseHost = function() { if (host) this.hostname = host; }; -},{"./util":526,"punycode":469,"querystring":473}],526:[function(require,module,exports){ +},{"./util":523,"punycode":466,"querystring":470}],523:[function(require,module,exports){ 'use strict'; module.exports = { @@ -95016,7 +94965,7 @@ module.exports = { } }; -},{}],527:[function(require,module,exports){ +},{}],524:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -95041,14 +94990,14 @@ if (typeof Object.create === 'function') { } } -},{}],528:[function(require,module,exports){ +},{}],525:[function(require,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } -},{}],529:[function(require,module,exports){ +},{}],526:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -95638,12 +95587,12 @@ function hasOwnProperty(obj, prop) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":528,"_process":468,"inherits":527}],530:[function(require,module,exports){ +},{"./support/isBuffer":525,"_process":465,"inherits":524}],527:[function(require,module,exports){ module.exports.VectorTile = require('./lib/vectortile.js'); module.exports.VectorTileFeature = require('./lib/vectortilefeature.js'); module.exports.VectorTileLayer = require('./lib/vectortilelayer.js'); -},{"./lib/vectortile.js":531,"./lib/vectortilefeature.js":532,"./lib/vectortilelayer.js":533}],531:[function(require,module,exports){ +},{"./lib/vectortile.js":528,"./lib/vectortilefeature.js":529,"./lib/vectortilelayer.js":530}],528:[function(require,module,exports){ 'use strict'; var VectorTileLayer = require('./vectortilelayer'); @@ -95662,7 +95611,7 @@ function readTile(tag, layers, pbf) { } -},{"./vectortilelayer":533}],532:[function(require,module,exports){ +},{"./vectortilelayer":530}],529:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -95897,7 +95846,7 @@ function signedArea(ring) { return sum; } -},{"point-geometry":465}],533:[function(require,module,exports){ +},{"point-geometry":462}],530:[function(require,module,exports){ 'use strict'; var VectorTileFeature = require('./vectortilefeature.js'); @@ -95960,7 +95909,7 @@ VectorTileLayer.prototype.feature = function(i) { return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values); }; -},{"./vectortilefeature.js":532}],534:[function(require,module,exports){ +},{"./vectortilefeature.js":529}],531:[function(require,module,exports){ "use strict" module.exports = createText @@ -95987,7 +95936,7 @@ function createText(str, options) { options) } -},{"./lib/vtext":535}],535:[function(require,module,exports){ +},{"./lib/vtext":532}],532:[function(require,module,exports){ "use strict" module.exports = vectorizeText @@ -96193,7 +96142,7 @@ function vectorizeText(str, canvas, context, options) { return processPixels(pixels, options, size) } -},{"cdt2d":72,"clean-pslg":82,"ndarray":449,"planar-graph-to-polyline":464,"simplify-planar-graph":504,"surface-nets":511}],536:[function(require,module,exports){ +},{"cdt2d":69,"clean-pslg":79,"ndarray":446,"planar-graph-to-polyline":461,"simplify-planar-graph":501,"surface-nets":508}],533:[function(require,module,exports){ var Pbf = require('pbf') var vtpb = require('./vector-tile-pb') var GeoJSONWrapper = require('./lib/geojson_wrapper') @@ -96349,7 +96298,7 @@ function wrapValue (value) { return result } -},{"./lib/geojson_wrapper":537,"./vector-tile-pb":538,"pbf":459}],537:[function(require,module,exports){ +},{"./lib/geojson_wrapper":534,"./vector-tile-pb":535,"pbf":456}],534:[function(require,module,exports){ 'use strict' var Point = require('point-geometry') @@ -96417,7 +96366,7 @@ FeatureWrapper.prototype.bbox = function () { FeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON -},{"point-geometry":465,"vector-tile":530}],538:[function(require,module,exports){ +},{"point-geometry":462,"vector-tile":527}],535:[function(require,module,exports){ 'use strict'; // tile ======================================== @@ -96523,7 +96472,7 @@ function writeLayer(layer, pbf) { if (layer.extent !== undefined) pbf.writeVarintField(5, layer.extent); } -},{}],539:[function(require,module,exports){ +},{}],536:[function(require,module,exports){ // Copyright (C) 2011 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -97210,7 +97159,7 @@ function writeLayer(layer, pbf) { } })(); -},{}],540:[function(require,module,exports){ +},{}],537:[function(require,module,exports){ var hiddenStore = require('./hidden-store.js'); module.exports = createStore; @@ -97231,7 +97180,7 @@ function createStore() { }; } -},{"./hidden-store.js":541}],541:[function(require,module,exports){ +},{"./hidden-store.js":538}],538:[function(require,module,exports){ module.exports = hiddenStore; function hiddenStore(obj, key) { @@ -97249,7 +97198,7 @@ function hiddenStore(obj, key) { return store; } -},{}],542:[function(require,module,exports){ +},{}],539:[function(require,module,exports){ // Original - @Gozola. // https://gist.github.com/Gozala/1269991 // This is a reimplemented version (with a few bug fixes). @@ -97280,14 +97229,14 @@ function weakMap() { } } -},{"./create-store.js":540}],543:[function(require,module,exports){ +},{"./create-store.js":537}],540:[function(require,module,exports){ var getContext = require('get-canvas-context') module.exports = function getWebGLContext (opt) { return getContext('webgl', opt) } -},{"get-canvas-context":132}],544:[function(require,module,exports){ +},{"get-canvas-context":129}],541:[function(require,module,exports){ var bundleFn = arguments[3]; var sources = arguments[4]; var cache = arguments[5]; @@ -97370,12 +97319,12 @@ module.exports = function (fn, options) { return worker; }; -},{}],545:[function(require,module,exports){ +},{}],542:[function(require,module,exports){ module.exports.RADIUS = 6378137; module.exports.FLATTENING = 1/298.257223563; module.exports.POLAR_RADIUS = 6356752.3142; -},{}],546:[function(require,module,exports){ +},{}],543:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : @@ -97465,7 +97414,7 @@ exports.getMercCoords = getMercCoords; Object.defineProperty(exports, '__esModule', { value: true }); })); -},{}],547:[function(require,module,exports){ +},{}],544:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98198,7 +98147,7 @@ function toSolar(yearOrDate, monthOrResult, day, isIntercalaryOrResult, result) } -},{"../main":561,"object-assign":452}],548:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],545:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98382,7 +98331,7 @@ assign(CopticCalendar.prototype, { main.calendars.coptic = CopticCalendar; -},{"../main":561,"object-assign":452}],549:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],546:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98610,7 +98559,7 @@ var centuries = { main.calendars.discworld = DiscworldCalendar; -},{"../main":561,"object-assign":452}],550:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],547:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98794,7 +98743,7 @@ assign(EthiopianCalendar.prototype, { main.calendars.ethiopian = EthiopianCalendar; -},{"../main":561,"object-assign":452}],551:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],548:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99068,7 +99017,7 @@ function mod(a, b) { main.calendars.hebrew = HebrewCalendar; -},{"../main":561,"object-assign":452}],552:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],549:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99249,7 +99198,7 @@ assign(IslamicCalendar.prototype, { main.calendars.islamic = IslamicCalendar; -},{"../main":561,"object-assign":452}],553:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],550:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99432,7 +99381,7 @@ assign(JulianCalendar.prototype, { main.calendars.julian = JulianCalendar; -},{"../main":561,"object-assign":452}],554:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],551:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99727,7 +99676,7 @@ function amod(a, b) { main.calendars.mayan = MayanCalendar; -},{"../main":561,"object-assign":452}],555:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],552:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99907,7 +99856,7 @@ assign(NanakshahiCalendar.prototype, { main.calendars.nanakshahi = NanakshahiCalendar; -},{"../main":561,"object-assign":452}],556:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],553:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100330,7 +100279,7 @@ assign(NepaliCalendar.prototype, { main.calendars.nepali = NepaliCalendar; -},{"../main":561,"object-assign":452}],557:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],554:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100520,7 +100469,7 @@ main.calendars.persian = PersianCalendar; main.calendars.jalali = PersianCalendar; -},{"../main":561,"object-assign":452}],558:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],555:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100706,7 +100655,7 @@ assign(TaiwanCalendar.prototype, { main.calendars.taiwan = TaiwanCalendar; -},{"../main":561,"object-assign":452}],559:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],556:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100892,7 +100841,7 @@ assign(ThaiCalendar.prototype, { main.calendars.thai = ThaiCalendar; -},{"../main":561,"object-assign":452}],560:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],557:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -101257,7 +101206,7 @@ var ummalqura_dat = [ 79990]; -},{"../main":561,"object-assign":452}],561:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],558:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102162,7 +102111,7 @@ _exports.baseCalendar = BaseCalendar; _exports.calendars.gregorian = GregorianCalendar; -},{"object-assign":452}],562:[function(require,module,exports){ +},{"object-assign":449}],559:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102664,7 +102613,7 @@ assign(main.baseCalendar.prototype, { }); -},{"./main":561,"object-assign":452}],563:[function(require,module,exports){ +},{"./main":558,"object-assign":449}],560:[function(require,module,exports){ module.exports = require('cwise-compiler')({ args: ['array', { offset: [1], @@ -102716,7 +102665,7 @@ module.exports = require('cwise-compiler')({ funcName: 'zeroCrossings' }) -},{"cwise-compiler":103}],564:[function(require,module,exports){ +},{"cwise-compiler":100}],561:[function(require,module,exports){ "use strict" module.exports = findZeroCrossings @@ -102729,7 +102678,7 @@ function findZeroCrossings(array, level) { core(array.hi(array.shape[0]-1), cross, level) return cross } -},{"./lib/zc-core":563}],565:[function(require,module,exports){ +},{"./lib/zc-core":560}],562:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -102744,7 +102693,6 @@ function findZeroCrossings(array, level) { var Lib = require('../../lib'); var Color = require('../color'); var Axes = require('../../plots/cartesian/axes'); -var constants = require('../../plots/cartesian/constants'); var attributes = require('./attributes'); @@ -102763,7 +102711,8 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op if(!(visible || clickToShow)) return annOut; coerce('opacity'); - var bgColor = coerce('bgcolor'); + coerce('align'); + coerce('bgcolor'); var borderColor = coerce('bordercolor'), borderOpacity = Color.opacity(borderColor); @@ -102777,12 +102726,6 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op coerce('textangle'); Lib.coerceFont(coerce, 'font', fullLayout.font); - coerce('width'); - coerce('align'); - - var h = coerce('height'); - if(h) coerce('valign'); - // positioning var axLetters = ['x', 'y'], arrowPosDflt = [-10, -30], @@ -102815,9 +102758,6 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op // xanchor, yanchor coerce(axLetter + 'anchor'); - - // xshift, yshift - coerce(axLetter + 'shift'); } // if you have one coordinate you should have both @@ -102844,23 +102784,10 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op annOut._yclick = (yClick === undefined) ? annOut.y : yClick; } - var hoverText = coerce('hovertext'); - if(hoverText) { - var hoverBG = coerce('hoverlabel.bgcolor', - Color.opacity(bgColor) ? Color.rgb(bgColor) : Color.defaultLine); - var hoverBorder = coerce('hoverlabel.bordercolor', Color.contrast(hoverBG)); - Lib.coerceFont(coerce, 'hoverlabel.font', { - family: constants.HOVERFONT, - size: constants.HOVERFONTSIZE, - color: hoverBorder - }); - } - coerce('captureevents', !!hoverText); - return annOut; }; -},{"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/constants":729,"../color":578,"./attributes":567}],566:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../color":575,"./attributes":564}],563:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -102925,7 +102852,7 @@ module.exports = [ } ]; -},{}],567:[function(require,module,exports){ +},{}],564:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -102977,27 +102904,6 @@ module.exports = { font: extendFlat({}, fontAttrs, { description: 'Sets the annotation text font.' }), - width: { - valType: 'number', - min: 1, - dflt: null, - role: 'style', - description: [ - 'Sets an explicit width for the text box. null (default) lets the', - 'text set the box width. Wider text will be clipped.', - 'There is no automatic wrapping; use
to start a new line.' - ].join(' ') - }, - height: { - valType: 'number', - min: 1, - dflt: null, - role: 'style', - description: [ - 'Sets an explicit height for the text box. null (default) lets the', - 'text set the box height. Taller text will be clipped.' - ].join(' ') - }, opacity: { valType: 'number', min: 0, @@ -103012,21 +102918,10 @@ module.exports = { dflt: 'center', role: 'style', description: [ - 'Sets the horizontal alignment of the `text` within the box.', - 'Has an effect only if `text` spans more two or more lines', - '(i.e. `text` contains one or more
HTML tags) or if an', - 'explicit width is set to override the text width.' - ].join(' ') - }, - valign: { - valType: 'enumerated', - values: ['top', 'middle', 'bottom'], - dflt: 'middle', - role: 'style', - description: [ - 'Sets the vertical alignment of the `text` within the box.', - 'Has an effect only if an explicit height is set to override', - 'the text height.' + 'Sets the vertical alignment of the `text` with', + 'respect to the set `x` and `y` position.', + 'Has only an effect if `text` spans more two or more lines', + '(i.e. `text` contains one or more
HTML tags).' ].join(' ') }, bgcolor: { @@ -103108,9 +103003,7 @@ module.exports = { description: [ 'Sets a distance, in pixels, to move the arrowhead away from the', 'position it is pointing at, for example to point at the edge of', - 'a marker independent of zoom. Note that this shortens the arrow', - 'from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`', - 'which moves everything by this amount.' + 'a marker independent of zoom.' ].join(' ') }, ax: { @@ -103222,15 +103115,6 @@ module.exports = { 'corresponds to the closest side.' ].join(' ') }, - xshift: { - valType: 'number', - dflt: 0, - role: 'style', - description: [ - 'Shifts the position of the whole annotation and arrow to the', - 'right (positive) or left (negative) by this many pixels.' - ].join(' ') - }, yref: { valType: 'enumerated', values: [ @@ -103281,15 +103165,6 @@ module.exports = { 'corresponds to the closest side.' ].join(' ') }, - yshift: { - valType: 'number', - dflt: 0, - role: 'style', - description: [ - 'Shifts the position of the whole annotation and arrow up', - '(positive) or down (negative) by this many pixels.' - ].join(' ') - }, clicktoshow: { valType: 'enumerated', values: [false, 'onoff', 'onout'], @@ -103326,53 +103201,6 @@ module.exports = { 'is `yclick` rather than the annotation\'s `y` value.' ].join(' ') }, - hovertext: { - valType: 'string', - role: 'info', - description: [ - 'Sets text to appear when hovering over this annotation.', - 'If omitted or blank, no hover label will appear.' - ].join(' ') - }, - hoverlabel: { - bgcolor: { - valType: 'color', - role: 'style', - description: [ - 'Sets the background color of the hover label.', - 'By default uses the annotation\'s `bgcolor` made opaque,', - 'or white if it was transparent.' - ].join(' ') - }, - bordercolor: { - valType: 'color', - role: 'style', - description: [ - 'Sets the border color of the hover label.', - 'By default uses either dark grey or white, for maximum', - 'contrast with `hoverlabel.bgcolor`.' - ].join(' ') - }, - font: extendFlat({}, fontAttrs, { - description: [ - 'Sets the hover label text font.', - 'By default uses the global hover font and size,', - 'with color from `hoverlabel.bordercolor`.' - ].join(' ') - }) - }, - captureevents: { - valType: 'boolean', - role: 'info', - description: [ - 'Determines whether the annotation text box captures mouse move', - 'and click events, or allows those events to pass through to data', - 'points in the plot that may be behind the annotation. By default', - '`captureevents` is *false* unless `hovertext` is provided.', - 'If you use the event `plotly_clickannotation` without `hovertext`', - 'you must explicitly enable `captureevents`.' - ].join(' ') - }, _deprecated: { ref: { @@ -103385,7 +103213,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../../plots/cartesian/constants":729,"../../plots/font_attributes":748,"./arrow_paths":566}],568:[function(require,module,exports){ +},{"../../lib/extend":672,"../../plots/cartesian/constants":724,"../../plots/font_attributes":739,"./arrow_paths":563}],565:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103438,17 +103266,12 @@ function annAutorange(gd) { ya = Axes.getFromId(gd, ann.yref), headSize = 3 * ann.arrowsize * ann.arrowwidth || 0; - var headPlus, headMinus; - if(xa && xa.autorange) { - headPlus = headSize + ann.xshift; - headMinus = headSize - ann.xshift; - if(ann.axref === ann.xref) { // expand for the arrowhead (padded by arrowhead) Axes.expand(xa, [xa.r2c(ann.x)], { - ppadplus: headPlus, - ppadminus: headMinus + ppadplus: headSize, + ppadminus: headSize }); // again for the textbox (padded by textbox) Axes.expand(xa, [xa.r2c(ann.ax)], { @@ -103458,20 +103281,17 @@ function annAutorange(gd) { } else { Axes.expand(xa, [xa.r2c(ann.x)], { - ppadplus: Math.max(ann._xpadplus, headPlus), - ppadminus: Math.max(ann._xpadminus, headMinus) + ppadplus: Math.max(ann._xpadplus, headSize), + ppadminus: Math.max(ann._xpadminus, headSize) }); } } if(ya && ya.autorange) { - headPlus = headSize - ann.yshift; - headMinus = headSize + ann.yshift; - if(ann.ayref === ann.yref) { Axes.expand(ya, [ya.r2c(ann.y)], { - ppadplus: headPlus, - ppadminus: headMinus + ppadplus: headSize, + ppadminus: headSize }); Axes.expand(ya, [ya.r2c(ann.ay)], { ppadplus: ann._ypadplus, @@ -103480,15 +103300,15 @@ function annAutorange(gd) { } else { Axes.expand(ya, [ya.r2c(ann.y)], { - ppadplus: Math.max(ann._ypadplus, headPlus), - ppadminus: Math.max(ann._ypadminus, headMinus) + ppadplus: Math.max(ann._ypadplus, headSize), + ppadminus: Math.max(ann._ypadminus, headSize) }); } } }); } -},{"../../lib":685,"../../plots/cartesian/axes":724,"./draw":572}],569:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"./draw":569}],566:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103613,7 +103433,7 @@ function getToggleSets(gd, hoverData) { return {on: onSet, off: offSet, explicitOff: explicitOffSet}; } -},{"../../plotly":719}],570:[function(require,module,exports){ +},{"../../plotly":714}],567:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103676,7 +103496,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":705,"fast-isnumeric":116}],571:[function(require,module,exports){ +},{"../../lib/to_log_range":700,"fast-isnumeric":113}],568:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103701,7 +103521,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { handleArrayContainerDefaults(layoutIn, layoutOut, opts); }; -},{"../../plots/array_container_defaults":721,"./annotation_defaults":565}],572:[function(require,module,exports){ +},{"../../plots/array_container_defaults":716,"./annotation_defaults":562}],569:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103719,7 +103539,6 @@ var Plotly = require('../../plotly'); var Plots = require('../../plots/plots'); var Lib = require('../../lib'); var Axes = require('../../plots/cartesian/axes'); -var Fx = require('../../plots/cartesian/graph_interact'); var Color = require('../color'); var Drawing = require('../drawing'); var svgTextUtils = require('../../lib/svg_text_utils'); @@ -103777,14 +103596,9 @@ function drawOne(gd, index) { var optionsIn = (layout.annotations || [])[index], options = fullLayout.annotations[index]; - var annClipID = 'clip' + fullLayout._uid + '_ann' + index; - // this annotation is gone - quit now after deleting it // TODO: use d3 idioms instead of deleting and redrawing every time - if(!optionsIn || options.visible === false) { - d3.selectAll('#' + annClipID).remove(); - return; - } + if(!optionsIn || options.visible === false) return; var xa = Axes.getFromId(gd, options.xref), ya = Axes.getFromId(gd, options.yref), @@ -103801,16 +103615,7 @@ function drawOne(gd, index) { var annGroup = fullLayout._infolayer.append('g') .classed('annotation', true) .attr('data-index', String(index)) - .style('opacity', options.opacity); - - // another group for text+background so that they can rotate together - var annTextGroup = annGroup.append('g') - .classed('annotation-text-g', true) - .attr('data-index', String(index)); - - var annTextGroupInner = annTextGroup.append('g') - .style('pointer-events', options.captureevents ? 'all' : null) - .call(setCursor, 'default') + .style('opacity', options.opacity) .on('click', function() { gd._dragging = false; gd.emit('plotly_clickannotation', { @@ -103820,33 +103625,12 @@ function drawOne(gd, index) { }); }); - if(options.hovertext) { - annTextGroupInner - .on('mouseover', function() { - var hoverOptions = options.hoverlabel; - var hoverFont = hoverOptions.font; - var bBox = this.getBoundingClientRect(); - var bBoxRef = gd.getBoundingClientRect(); + // another group for text+background so that they can rotate together + var annTextGroup = annGroup.append('g') + .classed('annotation-text-g', true) + .attr('data-index', String(index)); - Fx.loneHover({ - x0: bBox.left - bBoxRef.left, - x1: bBox.right - bBoxRef.left, - y: (bBox.top + bBox.bottom) / 2 - bBoxRef.top, - text: options.hovertext, - color: hoverOptions.bgcolor, - borderColor: hoverOptions.bordercolor, - fontFamily: hoverFont.family, - fontSize: hoverFont.size, - fontColor: hoverFont.color - }, { - container: fullLayout._hoverlayer.node(), - outerContainer: fullLayout._paper.node() - }); - }) - .on('mouseout', function() { - Fx.loneUnhover(fullLayout._hoverlayer.node()); - }); - } + var annTextGroupInner = annTextGroup.append('g'); var borderwidth = options.borderwidth, borderpad = options.borderpad, @@ -103858,18 +103642,6 @@ function drawOne(gd, index) { .call(Color.stroke, options.bordercolor) .call(Color.fill, options.bgcolor); - var isSizeConstrained = options.width || options.height; - - var annTextClip = fullLayout._defs.select('.clips') - .selectAll('#' + annClipID) - .data(isSizeConstrained ? [0] : []); - - annTextClip.enter().append('clipPath') - .classed('annclip', true) - .attr('id', annClipID) - .append('rect'); - annTextClip.exit().remove(); - var font = options.font; var annText = annTextGroupInner.append('text') @@ -103896,21 +103668,19 @@ function drawOne(gd, index) { // at the end, even if their position changes annText.selectAll('tspan.line').attr({y: 0, x: 0}); - var mathjaxGroup = annTextGroupInner.select('.annotation-math-group'); - var hasMathjax = !mathjaxGroup.empty(); - var anntextBB = Drawing.bBox( - (hasMathjax ? mathjaxGroup : annText).node()); - var textWidth = anntextBB.width; - var textHeight = anntextBB.height; - var annWidth = options.width || textWidth; - var annHeight = options.height || textHeight; - var outerWidth = Math.round(annWidth + 2 * borderfull); - var outerHeight = Math.round(annHeight + 2 * borderfull); + var mathjaxGroup = annTextGroupInner.select('.annotation-math-group'), + hasMathjax = !mathjaxGroup.empty(), + anntextBB = Drawing.bBox( + (hasMathjax ? mathjaxGroup : annText).node()), + annwidth = anntextBB.width, + annheight = anntextBB.height, + outerwidth = Math.round(annwidth + 2 * borderfull), + outerheight = Math.round(annheight + 2 * borderfull); // save size in the annotation object for use by autoscale - options._w = annWidth; - options._h = annHeight; + options._w = annwidth; + options._h = annheight; function shiftFraction(v, anchor) { if(anchor === 'auto') { @@ -103935,12 +103705,11 @@ function drawOne(gd, index) { ax = Axes.getFromId(gd, axRef), dimAngle = (textangle + (axLetter === 'x' ? 0 : -90)) * Math.PI / 180, // note that these two can be either positive or negative - annSizeFromWidth = outerWidth * Math.cos(dimAngle), - annSizeFromHeight = outerHeight * Math.sin(dimAngle), + annSizeFromWidth = outerwidth * Math.cos(dimAngle), + annSizeFromHeight = outerheight * Math.sin(dimAngle), // but this one is the positive total size annSize = Math.abs(annSizeFromWidth) + Math.abs(annSizeFromHeight), anchor = options[axLetter + 'anchor'], - overallShift = options[axLetter + 'shift'] * (axLetter === 'x' ? 1 : -1), posPx = annPosPx[axLetter], basePx, textPadShift, @@ -104031,9 +103800,6 @@ function drawOne(gd, index) { posPx.text -= shiftMinus; } } - - posPx.tail += overallShift; - posPx.head += overallShift; } else { // with no arrow, the text rotates and *then* we put the anchor @@ -104043,10 +103809,6 @@ function drawOne(gd, index) { posPx.text = basePx + textShift; } - posPx.text += overallShift; - textShift += overallShift; - textPadShift += overallShift; - // padplus/minus are used by autorange options['_' + axLetter + 'padplus'] = (annSize / 2) + textPadShift; options['_' + axLetter + 'padminus'] = (annSize / 2) - textPadShift; @@ -104061,43 +103823,22 @@ function drawOne(gd, index) { return; } - var xShift = 0; - var yShift = 0; - - if(options.align !== 'left') { - xShift = (annWidth - textWidth) * (options.align === 'center' ? 0.5 : 1); - } - if(options.valign !== 'top') { - yShift = (annHeight - textHeight) * (options.valign === 'middle' ? 0.5 : 1); - } - if(hasMathjax) { - mathjaxGroup.select('svg').attr({ - x: borderfull + xShift - 1, - y: borderfull + yShift - }) - .call(Drawing.setClipUrl, isSizeConstrained ? annClipID : null); + mathjaxGroup.select('svg').attr({x: borderfull - 1, y: borderfull}); } else { - var texty = borderfull + yShift - anntextBB.top, - textx = borderfull + xShift - anntextBB.left; - annText.attr({ - x: textx, - y: texty - }) - .call(Drawing.setClipUrl, isSizeConstrained ? annClipID : null); + var texty = borderfull - anntextBB.top, + textx = borderfull - anntextBB.left; + annText.attr({x: textx, y: texty}); annText.selectAll('tspan.line').attr({y: texty, x: textx}); } - annTextClip.select('rect').call(Drawing.setRect, borderfull, borderfull, - annWidth, annHeight); - annTextBG.call(Drawing.setRect, borderwidth / 2, borderwidth / 2, - outerWidth - borderwidth, outerHeight - borderwidth); + outerwidth - borderwidth, outerheight - borderwidth); annTextGroupInner.call(Drawing.setTranslate, - Math.round(annPosPx.x.text - outerWidth / 2), - Math.round(annPosPx.y.text - outerHeight / 2)); + Math.round(annPosPx.x.text - outerwidth / 2), + Math.round(annPosPx.y.text - outerheight / 2)); /* * rotate text and background @@ -104236,17 +103977,21 @@ function drawOne(gd, index) { update[annbase + '.x'] = xa ? xa.p2r(xa.r2p(options.x) + dx) : - (options.x + (dx / gs.w)); + ((headX + dx - gs.l) / gs.w); update[annbase + '.y'] = ya ? ya.p2r(ya.r2p(options.y) + dy) : - (options.y - (dy / gs.h)); + (1 - ((headY + dy - gs.t) / gs.h)); if(options.axref === options.xref) { - update[annbase + '.ax'] = xa.p2r(xa.r2p(options.ax) + dx); + update[annbase + '.ax'] = xa ? + xa.p2r(xa.r2p(options.ax) + dx) : + ((headX + dx - gs.l) / gs.w); } if(options.ayref === options.yref) { - update[annbase + '.ay'] = ya.p2r(ya.r2p(options.ay) + dy); + update[annbase + '.ay'] = ya ? + ya.p2r(ya.r2p(options.ay) + dy) : + (1 - ((headY + dy - gs.t) / gs.h)); } arrowGroup.attr('transform', 'translate(' + dx + ',' + dy + ')'); @@ -104302,8 +104047,7 @@ function drawOne(gd, index) { if(xa) update[annbase + '.x'] = options.x + dx / xa._m; else { var widthFraction = options._xsize / gs.w, - xLeft = options.x + (options._xshift - options.xshift) / gs.w - - widthFraction / 2; + xLeft = options.x + options._xshift / gs.w - widthFraction / 2; update[annbase + '.x'] = dragElement.align(xLeft + dx / gs.w, widthFraction, 0, 1, options.xanchor); @@ -104312,8 +104056,7 @@ function drawOne(gd, index) { if(ya) update[annbase + '.y'] = options.y + dy / ya._m; else { var heightFraction = options._ysize / gs.h, - yBottom = options.y - (options._yshift + options.yshift) / gs.h - - heightFraction / 2; + yBottom = options.y - options._yshift / gs.h - heightFraction / 2; update[annbase + '.y'] = dragElement.align(yBottom - dy / gs.h, heightFraction, 0, 1, options.yanchor); @@ -104387,7 +104130,7 @@ function lineIntersect(x1, y1, x2, y2, x3, y3, x4, y4) { return {x: x1 + a * t, y: y1 + d * t}; } -},{"../../lib":685,"../../lib/setcursor":700,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"../../plots/plots":787,"../color":578,"../dragelement":599,"../drawing":602,"./draw_arrow_head":573,"d3":107}],573:[function(require,module,exports){ +},{"../../lib":680,"../../lib/setcursor":695,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../color":575,"../dragelement":596,"../drawing":598,"./draw_arrow_head":570,"d3":104}],570:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104521,7 +104264,7 @@ module.exports = function drawArrowHead(el3, style, ends, mag, standoff) { if(doEnd) drawhead(end, endRot); }; -},{"../color":578,"../drawing":602,"./arrow_paths":566,"d3":107,"fast-isnumeric":116}],574:[function(require,module,exports){ +},{"../color":575,"../drawing":598,"./arrow_paths":563,"d3":104,"fast-isnumeric":113}],571:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104553,7 +104296,7 @@ module.exports = { convertCoords: require('./convert_coords') }; -},{"./attributes":567,"./calc_autorange":568,"./click":569,"./convert_coords":570,"./defaults":571,"./draw":572}],575:[function(require,module,exports){ +},{"./attributes":564,"./calc_autorange":565,"./click":566,"./convert_coords":567,"./defaults":568,"./draw":569}],572:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104586,7 +104329,7 @@ require('world-calendars/dist/calendars/taiwan'); require('world-calendars/dist/calendars/thai'); require('world-calendars/dist/calendars/ummalqura'); -},{"world-calendars/dist/calendars/chinese":547,"world-calendars/dist/calendars/coptic":548,"world-calendars/dist/calendars/discworld":549,"world-calendars/dist/calendars/ethiopian":550,"world-calendars/dist/calendars/hebrew":551,"world-calendars/dist/calendars/islamic":552,"world-calendars/dist/calendars/julian":553,"world-calendars/dist/calendars/mayan":554,"world-calendars/dist/calendars/nanakshahi":555,"world-calendars/dist/calendars/nepali":556,"world-calendars/dist/calendars/persian":557,"world-calendars/dist/calendars/taiwan":558,"world-calendars/dist/calendars/thai":559,"world-calendars/dist/calendars/ummalqura":560,"world-calendars/dist/main":561,"world-calendars/dist/plus":562}],576:[function(require,module,exports){ +},{"world-calendars/dist/calendars/chinese":544,"world-calendars/dist/calendars/coptic":545,"world-calendars/dist/calendars/discworld":546,"world-calendars/dist/calendars/ethiopian":547,"world-calendars/dist/calendars/hebrew":548,"world-calendars/dist/calendars/islamic":549,"world-calendars/dist/calendars/julian":550,"world-calendars/dist/calendars/mayan":551,"world-calendars/dist/calendars/nanakshahi":552,"world-calendars/dist/calendars/nepali":553,"world-calendars/dist/calendars/persian":554,"world-calendars/dist/calendars/taiwan":555,"world-calendars/dist/calendars/thai":556,"world-calendars/dist/calendars/ummalqura":557,"world-calendars/dist/main":558,"world-calendars/dist/plus":559}],573:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104845,7 +104588,7 @@ module.exports = { worldCalFmt: worldCalFmt }; -},{"../../constants/numerical":666,"../../lib":685,"./calendars":575}],577:[function(require,module,exports){ +},{"../../constants/numerical":662,"../../lib":680,"./calendars":572}],574:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104885,7 +104628,7 @@ exports.borderLine = '#BEC8D9'; // gives back exactly lightLine if the other colors are defaults. exports.lightFraction = 100 * (0xe - 0x4) / (0xf - 0x4); -},{}],578:[function(require,module,exports){ +},{}],575:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104904,14 +104647,10 @@ var color = module.exports = {}; var colorAttrs = require('./attributes'); color.defaults = colorAttrs.defaults; -var defaultLine = color.defaultLine = colorAttrs.defaultLine; +color.defaultLine = colorAttrs.defaultLine; color.lightLine = colorAttrs.lightLine; -var background = color.background = colorAttrs.background; +color.background = colorAttrs.background; -/* - * tinyRGB: turn a tinycolor into an rgb string, but - * unlike the built-in tinycolor.toRgbString this never includes alpha - */ color.tinyRGB = function(tc) { var c = tc.toRgb(); return 'rgb(' + Math.round(c.r) + ', ' + @@ -104935,7 +104674,7 @@ color.combine = function(front, back) { var fc = tinycolor(front).toRgb(); if(fc.a === 1) return tinycolor(front).toRgbString(); - var bc = tinycolor(back || background).toRgb(), + var bc = tinycolor(back || color.background).toRgb(), bcflat = bc.a === 1 ? bc : { r: 255 * (1 - bc.a) + bc.r * bc.a, g: 255 * (1 - bc.a) + bc.g * bc.a, @@ -104949,22 +104688,12 @@ color.combine = function(front, back) { return tinycolor(fcflat).toRgbString(); }; -/* - * Create a color that contrasts with cstr. - * - * If cstr is a dark color, we lighten it; if it's light, we darken. - * - * If lightAmount / darkAmount are used, we adjust by these percentages, - * otherwise we go all the way to white or black. - */ color.contrast = function(cstr, lightAmount, darkAmount) { var tc = tinycolor(cstr); - if(tc.getAlpha() !== 1) tc = tinycolor(color.combine(cstr, background)); - - var newColor = tc.isDark() ? - (lightAmount ? tc.lighten(lightAmount) : background) : - (darkAmount ? tc.darken(darkAmount) : defaultLine); + var newColor = tc.isLight() ? + tc.darken(darkAmount) : + tc.lighten(lightAmount); return newColor.toString(); }; @@ -105056,7 +104785,7 @@ function cleanOne(val) { return 'rgb(' + rgbStr + ')'; } -},{"./attributes":577,"fast-isnumeric":116,"tinycolor2":514}],579:[function(require,module,exports){ +},{"./attributes":574,"fast-isnumeric":113,"tinycolor2":511}],576:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105252,7 +104981,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../../plots/cartesian/layout_attributes":735,"../../plots/font_attributes":748}],580:[function(require,module,exports){ +},{"../../lib/extend":672,"../../plots/cartesian/layout_attributes":728,"../../plots/font_attributes":739}],577:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105319,7 +105048,7 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) { coerce('titleside'); }; -},{"../../lib":685,"../../plots/cartesian/tick_label_defaults":742,"../../plots/cartesian/tick_mark_defaults":743,"../../plots/cartesian/tick_value_defaults":744,"./attributes":579}],581:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/tick_label_defaults":734,"../../plots/cartesian/tick_mark_defaults":735,"../../plots/cartesian/tick_value_defaults":736,"./attributes":576}],578:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105492,10 +105221,7 @@ module.exports = function draw(gd, id) { anchor: 'free', position: 1 }, - cbAxisOut = { - type: 'linear', - _id: 'y' + id - }, + cbAxisOut = {}, axisOptions = { letter: 'y', font: fullLayout.font, @@ -105513,6 +105239,8 @@ module.exports = function draw(gd, id) { handleAxisDefaults(cbAxisIn, cbAxisOut, coerce, axisOptions, fullLayout); handleAxisPositionDefaults(cbAxisIn, cbAxisOut, coerce, axisOptions); + cbAxisOut._id = 'y' + id; + // position can't go in through supplyDefaults // because that restricts it to [0,1] cbAxisOut.position = opts.x + xpadFrac + thickFrac; @@ -105952,7 +105680,7 @@ module.exports = function draw(gd, id) { return component; }; -},{"../../lib":685,"../../lib/extend":677,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_defaults":726,"../../plots/cartesian/layout_attributes":735,"../../plots/cartesian/position_defaults":738,"../../plots/plots":787,"../../registry":802,"../color":578,"../dragelement":599,"../drawing":602,"../titles":655,"./attributes":579,"d3":107,"tinycolor2":514}],582:[function(require,module,exports){ +},{"../../lib":680,"../../lib/extend":672,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_defaults":721,"../../plots/cartesian/layout_attributes":728,"../../plots/cartesian/position_defaults":731,"../../plots/plots":778,"../../registry":793,"../color":575,"../dragelement":596,"../drawing":598,"../titles":651,"./attributes":576,"d3":104,"tinycolor2":511}],579:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105971,7 +105699,7 @@ module.exports = function hasColorbar(container) { return Lib.isPlainObject(container.colorbar); }; -},{"../../lib":685}],583:[function(require,module,exports){ +},{"../../lib":680}],580:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106044,7 +105772,7 @@ module.exports = { } }; -},{}],584:[function(require,module,exports){ +},{}],581:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106123,7 +105851,7 @@ module.exports = function calc(trace, vals, containerStr, cLetter) { } }; -},{"../../lib":685,"./flip_scale":589,"./scales":596}],585:[function(require,module,exports){ +},{"../../lib":680,"./flip_scale":586,"./scales":593}],582:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106213,7 +105941,7 @@ module.exports = function makeColorScaleAttributes(context) { }; }; -},{"../../lib/extend":677,"./attributes":583,"./scales.js":596}],586:[function(require,module,exports){ +},{"../../lib/extend":672,"./attributes":580,"./scales.js":593}],583:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106229,7 +105957,7 @@ var scales = require('./scales'); module.exports = scales.RdBu; -},{"./scales":596}],587:[function(require,module,exports){ +},{"./scales":593}],584:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106293,7 +106021,7 @@ module.exports = function colorScaleDefaults(traceIn, traceOut, layout, coerce, if(showScale) colorbarDefaults(containerIn, containerOut, layout); }; -},{"../../lib":685,"../colorbar/defaults":580,"../colorbar/has_colorbar":582,"./flip_scale":589,"./is_valid_scale":593,"fast-isnumeric":116}],588:[function(require,module,exports){ +},{"../../lib":680,"../colorbar/defaults":577,"../colorbar/has_colorbar":579,"./flip_scale":586,"./is_valid_scale":590,"fast-isnumeric":113}],585:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106330,7 +106058,7 @@ module.exports = function extractScale(scl, cmin, cmax) { }; }; -},{}],589:[function(require,module,exports){ +},{}],586:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106355,7 +106083,7 @@ module.exports = function flipScale(scl) { return sclNew; }; -},{}],590:[function(require,module,exports){ +},{}],587:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106395,7 +106123,7 @@ module.exports = function getScale(scl, dflt) { return scl; }; -},{"./default_scale":586,"./is_valid_scale_array":594,"./scales":596}],591:[function(require,module,exports){ +},{"./default_scale":583,"./is_valid_scale_array":591,"./scales":593}],588:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106441,7 +106169,7 @@ module.exports = function hasColorscale(trace, containerStr) { ); }; -},{"../../lib":685,"./is_valid_scale":593,"fast-isnumeric":116}],592:[function(require,module,exports){ +},{"../../lib":680,"./is_valid_scale":590,"fast-isnumeric":113}],589:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106475,7 +106203,7 @@ exports.extractScale = require('./extract_scale'); exports.makeColorScaleFunc = require('./make_color_scale_func'); -},{"./attributes":583,"./calc":584,"./default_scale":586,"./defaults":587,"./extract_scale":588,"./flip_scale":589,"./get_scale":590,"./has_colorscale":591,"./is_valid_scale":593,"./make_color_scale_func":595,"./scales":596}],593:[function(require,module,exports){ +},{"./attributes":580,"./calc":581,"./default_scale":583,"./defaults":584,"./extract_scale":585,"./flip_scale":586,"./get_scale":587,"./has_colorscale":588,"./is_valid_scale":590,"./make_color_scale_func":592,"./scales":593}],590:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106496,7 +106224,7 @@ module.exports = function isValidScale(scl) { else return isValidScaleArray(scl); }; -},{"./is_valid_scale_array":594,"./scales":596}],594:[function(require,module,exports){ +},{"./is_valid_scale_array":591,"./scales":593}],591:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106533,7 +106261,7 @@ module.exports = function isValidScaleArray(scl) { return true; }; -},{"tinycolor2":514}],595:[function(require,module,exports){ +},{"tinycolor2":511}],592:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106629,7 +106357,7 @@ function colorArray2rbga(colorArray) { return tinycolor(colorObj).toRgbString(); } -},{"../color":578,"d3":107,"fast-isnumeric":116,"tinycolor2":514}],596:[function(require,module,exports){ +},{"../color":575,"d3":104,"fast-isnumeric":113,"tinycolor2":511}],593:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106760,7 +106488,7 @@ module.exports = { ] }; -},{}],597:[function(require,module,exports){ +},{}],594:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106793,7 +106521,7 @@ module.exports = function align(v, dv, v0, v1, anchor) { return vc; }; -},{}],598:[function(require,module,exports){ +},{}],595:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106831,7 +106559,7 @@ module.exports = function getCursor(x, y, xanchor, yanchor) { return cursorset[y][x]; }; -},{"../../lib":685}],599:[function(require,module,exports){ +},{"../../lib":680}],596:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106974,22 +106702,8 @@ dragElement.init = function init(options) { if(options.doneFn) options.doneFn(gd._dragged, numClicks, e); if(!gd._dragged) { - var e2; - - try { - e2 = new MouseEvent('click', e); - } - catch(err) { - e2 = document.createEvent('MouseEvents'); - e2.initMouseEvent('click', - e.bubbles, e.cancelable, - e.view, e.detail, - e.screenX, e.screenY, - e.clientX, e.clientY, - e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, - e.button, e.relatedTarget); - } - + var e2 = document.createEvent('MouseEvents'); + e2.initEvent('click', true, true); initialTarget.dispatchEvent(e2); } @@ -107033,7 +106747,7 @@ function finishDrag(gd) { if(gd._replotPending) Plotly.plot(gd); } -},{"../../constants/interactions":665,"../../lib":685,"../../plotly":719,"../../plots/cartesian/constants":729,"./align":597,"./cursor":598,"./unhover":600}],600:[function(require,module,exports){ +},{"../../constants/interactions":661,"../../lib":680,"../../plotly":714,"../../plots/cartesian/constants":724,"./align":594,"./cursor":595,"./unhover":597}],597:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107077,47 +106791,14 @@ unhover.raw = function unhoverRaw(gd, evt) { } fullLayout._hoverlayer.selectAll('g').remove(); - fullLayout._hoverlayer.selectAll('line').remove(); - fullLayout._hoverlayer.selectAll('circle').remove(); gd._hoverdata = undefined; if(evt.target && oldhoverdata) { - gd.emit('plotly_unhover', { - event: evt, - points: oldhoverdata - }); + gd.emit('plotly_unhover', {points: oldhoverdata}); } }; -},{"../../lib/events":676}],601:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -exports.dash = { - valType: 'string', - // string type usually doesn't take values... this one should really be - // a special type or at least a special coercion function, from the GUI - // you only get these values but elsewhere the user can supply a list of - // dash lengths in px, and it will be honored - values: ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'], - dflt: 'solid', - role: 'style', - description: [ - 'Sets the dash style of lines. Set to a dash type string', - '(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)', - 'or a dash length list in px (eg *5px,10px,2px,2px*).' - ].join(' ') -}; - -},{}],602:[function(require,module,exports){ +},{"../../lib/events":671}],598:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -107233,17 +106914,6 @@ drawing.lineGroupStyle = function(s, lw, lc, ld) { drawing.dashLine = function(s, dash, lineWidth) { lineWidth = +lineWidth || 0; - - dash = drawing.dashStyle(dash, lineWidth); - - s.style({ - 'stroke-dasharray': dash, - 'stroke-width': lineWidth + 'px' - }); -}; - -drawing.dashStyle = function(dash, lineWidth) { - lineWidth = +lineWidth || 1; var dlw = Math.max(lineWidth, 3); if(dash === 'solid') dash = ''; @@ -107258,7 +106928,10 @@ drawing.dashStyle = function(dash, lineWidth) { } // otherwise user wrote the dasharray themselves - leave it be - return dash; + s.style({ + 'stroke-dasharray': dash, + 'stroke-width': lineWidth + 'px' + }); }; drawing.fillGroupStyle = function(s) { @@ -107807,17 +107480,7 @@ drawing.setPointGroupScale = function(selection, x, y) { return scale; }; -drawing.measureText = function(tester, text, font) { - var dummyText = tester.append('text') - .text(text) - .call(drawing.font, font); - - var bbox = drawing.bBox(dummyText.node()); - dummyText.remove(); - return bbox; -}; - -},{"../../constants/xmlns_namespaces":668,"../../lib":685,"../../lib/svg_text_utils":704,"../../registry":802,"../../traces/scatter/make_bubble_size_func":991,"../../traces/scatter/subtypes":996,"../color":578,"../colorscale":592,"./symbol_defs":603,"d3":107,"fast-isnumeric":116}],603:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":664,"../../lib":680,"../../lib/svg_text_utils":699,"../../registry":793,"../../traces/scatter/make_bubble_size_func":939,"../../traces/scatter/subtypes":944,"../color":575,"../colorscale":589,"./symbol_defs":599,"d3":104,"fast-isnumeric":113}],599:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108293,7 +107956,7 @@ module.exports = { } }; -},{"d3":107}],604:[function(require,module,exports){ +},{"d3":104}],600:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108435,7 +108098,7 @@ module.exports = { } }; -},{}],605:[function(require,module,exports){ +},{}],601:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108498,7 +108161,7 @@ function calcOneAxis(calcTrace, trace, axis, coord) { Axes.expand(axis, vals, {padded: true}); } -},{"../../plots/cartesian/axes":724,"../../registry":802,"./compute_error":606,"fast-isnumeric":116}],606:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"../../registry":793,"./compute_error":602,"fast-isnumeric":113}],602:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108594,7 +108257,7 @@ function makeComputeErrorValue(type, value) { } } -},{}],607:[function(require,module,exports){ +},{}],603:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108671,7 +108334,7 @@ module.exports = function(traceIn, traceOut, defaultColor, opts) { } }; -},{"../../lib":685,"../../registry":802,"./attributes":604,"fast-isnumeric":116}],608:[function(require,module,exports){ +},{"../../lib":680,"../../registry":793,"./attributes":600,"fast-isnumeric":113}],604:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108693,7 +108356,7 @@ errorBars.calc = require('./calc'); errorBars.calcFromTrace = function(trace, layout) { var x = trace.x || [], - y = trace.y || [], + y = trace.y, len = x.length || y.length; var calcdataMock = new Array(len); @@ -108730,7 +108393,7 @@ errorBars.hoverInfo = function(calcPoint, trace, hoverPoint) { } }; -},{"./attributes":604,"./calc":605,"./defaults":607,"./plot":609,"./style":610}],609:[function(require,module,exports){ +},{"./attributes":600,"./calc":601,"./defaults":603,"./plot":605,"./style":606}],605:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108894,7 +108557,7 @@ function errorCoords(d, xa, ya) { return out; } -},{"../../traces/scatter/subtypes":996,"d3":107,"fast-isnumeric":116}],610:[function(require,module,exports){ +},{"../../traces/scatter/subtypes":944,"d3":104,"fast-isnumeric":113}],606:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108931,7 +108594,7 @@ module.exports = function style(traces) { }); }; -},{"../color":578,"d3":107}],611:[function(require,module,exports){ +},{"../color":575,"d3":104}],607:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109100,7 +108763,7 @@ module.exports = { } }; -},{"../../plots/cartesian/constants":729}],612:[function(require,module,exports){ +},{"../../plots/cartesian/constants":724}],608:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109183,7 +108846,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":705,"fast-isnumeric":116}],613:[function(require,module,exports){ +},{"../../lib/to_log_range":700,"fast-isnumeric":113}],609:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109244,7 +108907,7 @@ function imageDefaults(imageIn, imageOut, fullLayout) { return imageOut; } -},{"../../lib":685,"../../plots/array_container_defaults":721,"../../plots/cartesian/axes":724,"./attributes":611}],614:[function(require,module,exports){ +},{"../../lib":680,"../../plots/array_container_defaults":716,"../../plots/cartesian/axes":719,"./attributes":607}],610:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109461,7 +109124,7 @@ module.exports = function draw(gd) { } }; -},{"../../constants/xmlns_namespaces":668,"../../plots/cartesian/axes":724,"../drawing":602,"d3":107}],615:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":664,"../../plots/cartesian/axes":719,"../drawing":598,"d3":104}],611:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109484,7 +109147,7 @@ module.exports = { convertCoords: require('./convert_coords') }; -},{"./attributes":611,"./convert_coords":612,"./defaults":613,"./draw":614}],616:[function(require,module,exports){ +},{"./attributes":607,"./convert_coords":608,"./defaults":609,"./draw":610}],612:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109533,7 +109196,7 @@ exports.isMiddleAnchor = function isMiddleAnchor(opts) { ); }; -},{}],617:[function(require,module,exports){ +},{}],613:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109648,7 +109311,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../../plots/font_attributes":748,"../color/attributes":577}],618:[function(require,module,exports){ +},{"../../lib/extend":672,"../../plots/font_attributes":739,"../color/attributes":574}],614:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109666,7 +109329,7 @@ module.exports = { scrollBarMargin: 4 }; -},{}],619:[function(require,module,exports){ +},{}],615:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109759,7 +109422,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) { Lib.noneOrAll(containerIn, containerOut, ['x', 'y']); }; -},{"../../lib":685,"../../plots/layout_attributes":778,"../../registry":802,"./attributes":617,"./helpers":622}],620:[function(require,module,exports){ +},{"../../lib":680,"../../plots/layout_attributes":769,"../../registry":793,"./attributes":613,"./helpers":618}],616:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110031,9 +109694,7 @@ module.exports = function draw(gd) { scrollBarY = constants.scrollBarMargin - scrollBoxY / scrollBoxYMax * scrollBarYMax; scrollHandler(scrollBarY, scrollBoxY); - if(scrollBoxY !== 0 && scrollBoxY !== -scrollBoxYMax) { - d3.event.preventDefault(); - } + d3.event.preventDefault(); }); // to be safe, remove previous listeners @@ -110274,8 +109935,6 @@ function handleClick(g, gd, numClicks) { for(i = 0; i < fullData.length; i++) { allTraces.push(i); - // Allow the legendonly state through for *all* trace types (including - // carpet for which it's overridden with true/false in supplyDefaults) traceVisibility.push('legendonly'); } @@ -110306,11 +109965,7 @@ function handleClick(g, gd, numClicks) { if(sameAsLast) { traceVisibility = true; } - var visibilityUpdates = []; - for(i = 0; i < fullData.length; i++) { - visibilityUpdates.push(allTraces[i]); - } - Plotly.restyle(gd, 'visible', traceVisibility, visibilityUpdates); + Plotly.restyle(gd, 'visible', traceVisibility, allTraces); } } } @@ -110583,7 +110238,7 @@ function expandHorizontalMargin(gd) { }); } -},{"../../constants/interactions":665,"../../lib":685,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/plots":787,"../../registry":802,"../color":578,"../dragelement":599,"../drawing":602,"./anchor_utils":616,"./constants":618,"./get_legend_data":621,"./helpers":622,"./style":624,"d3":107}],621:[function(require,module,exports){ +},{"../../constants/interactions":661,"../../lib":680,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/plots":778,"../../registry":793,"../color":575,"../dragelement":596,"../drawing":598,"./anchor_utils":612,"./constants":614,"./get_legend_data":617,"./helpers":618,"./style":620,"d3":104}],617:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110688,7 +110343,7 @@ module.exports = function getLegendData(calcdata, opts) { return legendData; }; -},{"../../registry":802,"./helpers":622}],622:[function(require,module,exports){ +},{"../../registry":793,"./helpers":618}],618:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110719,7 +110374,7 @@ exports.isReversed = function isReversed(legendLayout) { return (legendLayout.traceorder || '').indexOf('reversed') !== -1; }; -},{"../../registry":802}],623:[function(require,module,exports){ +},{"../../registry":793}],619:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110743,7 +110398,7 @@ module.exports = { style: require('./style') }; -},{"./attributes":617,"./defaults":619,"./draw":620,"./style":624}],624:[function(require,module,exports){ +},{"./attributes":613,"./defaults":615,"./draw":616,"./style":620}],620:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110811,11 +110466,6 @@ function styleLines(d) { showFill = trace.visible && trace.fill && trace.fill !== 'none', showLine = subTypes.hasLines(trace); - if(trace && trace._module && trace._module.name === 'contourcarpet') { - showLine = trace.contours.showlines; - showFill = trace.contours.coloring === 'fill'; - } - var fill = d3.select(this).select('.legendfill').selectAll('path') .data(showFill ? [d] : []); fill.enter().append('path').classed('js-fill', true); @@ -110976,7 +110626,7 @@ function stylePies(d) { if(pts.size()) pts.call(stylePie, d[0], trace); } -},{"../../lib":685,"../../registry":802,"../../traces/pie/style_one":970,"../../traces/scatter/subtypes":996,"../color":578,"../drawing":602,"d3":107}],625:[function(require,module,exports){ +},{"../../lib":680,"../../registry":793,"../../traces/pie/style_one":918,"../../traces/scatter/subtypes":944,"../color":575,"../drawing":598,"d3":104}],621:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111156,20 +110806,17 @@ function handleCartesian(gd, ev) { astr = button.getAttribute('data-attr'), val = button.getAttribute('data-val') || true, fullLayout = gd._fullLayout, - aobj = {}, - axList = Axes.list(gd, null, true), - ax, - allEnabled = 'on', - i; + aobj = {}; if(astr === 'zoom') { var mag = (val === 'in') ? 0.5 : 2, r0 = (1 + mag) / 2, - r1 = (1 - mag) / 2; + r1 = (1 - mag) / 2, + axList = Axes.list(gd, null, true); - var axName; + var ax, axName; - for(i = 0; i < axList.length; i++) { + for(var i = 0; i < axList.length; i++) { ax = axList[i]; if(!ax.fixedrange) { @@ -111184,12 +110831,6 @@ function handleCartesian(gd, ev) { aobj[axName + '.range[0]'] = rangeInitial[0]; aobj[axName + '.range[1]'] = rangeInitial[1]; } - if(ax._showSpikeInitial !== undefined) { - aobj[axName + '.showspikes'] = ax._showSpikeInitial; - if(allEnabled === 'on' && !ax._showSpikeInitial) { - allEnabled = 'off'; - } - } } else { var rangeNow = [ @@ -111207,24 +110848,12 @@ function handleCartesian(gd, ev) { } } } - fullLayout._cartesianSpikesEnabled = allEnabled; } else { // if ALL traces have orientation 'h', 'hovermode': 'x' otherwise: 'y' if(astr === 'hovermode' && (val === 'x' || val === 'y')) { val = fullLayout._isHoriz ? 'y' : 'x'; button.setAttribute('data-val', val); - if(val !== 'closest') { - fullLayout._cartesianSpikesEnabled = 'off'; - } - } else if(astr === 'hovermode' && val === 'closest') { - for(i = 0; i < axList.length; i++) { - ax = axList[i]; - if(allEnabled === 'on' && !ax.showspikes) { - allEnabled = 'off'; - } - } - fullLayout._cartesianSpikesEnabled = allEnabled; } aobj[astr] = val; @@ -111519,42 +111148,7 @@ modeBarButtons.resetViews = { } }; -modeBarButtons.toggleSpikelines = { - name: 'toggleSpikelines', - title: 'Toggle Spike Lines', - icon: Icons.spikeline, - attr: '_cartesianSpikesEnabled', - val: 'on', - click: function(gd) { - var fullLayout = gd._fullLayout; - - fullLayout._cartesianSpikesEnabled = fullLayout.hovermode === 'closest' ? - (fullLayout._cartesianSpikesEnabled === 'on' ? 'off' : 'on') : 'on'; - - var aobj = setSpikelineVisibility(gd); - - aobj.hovermode = 'closest'; - Plotly.relayout(gd, aobj); - } -}; - -function setSpikelineVisibility(gd) { - var fullLayout = gd._fullLayout, - axList = Axes.list(gd, null, true), - ax, - axName, - aobj = {}; - - for(var i = 0; i < axList.length; i++) { - ax = axList[i]; - axName = ax._name; - aobj[axName + '.showspikes'] = fullLayout._cartesianSpikesEnabled === 'on' ? true : false; - } - - return aobj; -} - -},{"../../../build/ploticon":2,"../../lib":685,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/plots":787,"../../snapshot/download":804}],626:[function(require,module,exports){ +},{"../../../build/ploticon":2,"../../lib":680,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../../snapshot/download":795}],622:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111568,7 +111162,7 @@ function setSpikelineVisibility(gd) { exports.manage = require('./manage'); -},{"./manage":627}],627:[function(require,module,exports){ +},{"./manage":623}],623:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111709,7 +111303,7 @@ function getButtonGroups(gd, buttonsToRemove, buttonsToAdd) { addGroup(['hoverClosestGl2d']); } else if(hasCartesian) { - addGroup(['toggleSpikelines', 'hoverClosestCartesian', 'hoverCompareCartesian']); + addGroup(['hoverClosestCartesian', 'hoverCompareCartesian']); } else if(hasPie) { addGroup(['hoverClosestPie']); @@ -111796,7 +111390,7 @@ function fillCustomButton(customButtons) { return customButtons; } -},{"../../plots/cartesian/axes":724,"../../traces/scatter/subtypes":996,"./buttons":625,"./modebar":628}],628:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"../../traces/scatter/subtypes":944,"./buttons":621,"./modebar":624}],624:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111948,7 +111542,7 @@ proto.createButton = function(config) { button.setAttribute('data-toggle', config.toggle || false); if(config.toggle) d3.select(button).classed('active', true); - button.appendChild(this.createIcon(config.icon || Icons.question, config.name)); + button.appendChild(this.createIcon(config.icon || Icons.question)); button.setAttribute('data-gravity', config.gravity || 'n'); return button; @@ -111961,7 +111555,7 @@ proto.createButton = function(config) { * @Param {string} thisIcon.path * @Return {HTMLelement} */ -proto.createIcon = function(thisIcon, name) { +proto.createIcon = function(thisIcon) { var iconHeight = thisIcon.ascent - thisIcon.descent, svgNS = 'http://www.w3.org/2000/svg', icon = document.createElementNS(svgNS, 'svg'), @@ -111971,12 +111565,8 @@ proto.createIcon = function(thisIcon, name) { icon.setAttribute('width', (thisIcon.width / iconHeight) + 'em'); icon.setAttribute('viewBox', [0, 0, thisIcon.width, iconHeight].join(' ')); - var transform = name === 'toggleSpikelines' ? - 'matrix(1.5 0 0 -1.5 0 ' + thisIcon.ascent + ')' : - 'matrix(1 0 0 -1 0 ' + thisIcon.ascent + ')'; - path.setAttribute('d', thisIcon.path); - path.setAttribute('transform', transform); + path.setAttribute('transform', 'matrix(1 0 0 -1 0 ' + thisIcon.ascent + ')'); icon.appendChild(path); return icon; @@ -112090,7 +111680,7 @@ function createModeBar(gd, buttons) { module.exports = createModeBar; -},{"../../../build/ploticon":2,"../../lib":685,"d3":107}],629:[function(require,module,exports){ +},{"../../../build/ploticon":2,"../../lib":680,"d3":104}],625:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112195,7 +111785,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../../plots/font_attributes":748,"../color/attributes":577,"./button_attributes":630}],630:[function(require,module,exports){ +},{"../../lib/extend":672,"../../plots/font_attributes":739,"../color/attributes":574,"./button_attributes":626}],626:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112253,7 +111843,7 @@ module.exports = { } }; -},{}],631:[function(require,module,exports){ +},{}],627:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112282,7 +111872,7 @@ module.exports = { darkAmount: 10 }; -},{}],632:[function(require,module,exports){ +},{}],628:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112381,7 +111971,7 @@ function getPosDflt(containerOut, layout, counterAxes) { return [containerOut.domain[0], posY + constants.yPad]; } -},{"../../lib":685,"../color":578,"./attributes":629,"./button_attributes":630,"./constants":631}],633:[function(require,module,exports){ +},{"../../lib":680,"../color":575,"./attributes":625,"./button_attributes":626,"./constants":627}],629:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112656,7 +112246,7 @@ function reposition(gd, buttons, opts, axName) { }); } -},{"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/cartesian/axis_ids":727,"../../plots/plots":787,"../color":578,"../drawing":602,"../legend/anchor_utils":616,"./constants":631,"./get_update_object":634,"d3":107}],634:[function(require,module,exports){ +},{"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/cartesian/axis_ids":722,"../../plots/plots":778,"../color":575,"../drawing":598,"../legend/anchor_utils":612,"./constants":627,"./get_update_object":630,"d3":104}],630:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112713,7 +112303,7 @@ function getXRange(axisLayout, buttonLayout) { return [range0, range1]; } -},{"d3":107}],635:[function(require,module,exports){ +},{"d3":104}],631:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112740,7 +112330,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":629,"./defaults":632,"./draw":633}],636:[function(require,module,exports){ +},{"./attributes":625,"./defaults":628,"./draw":629}],632:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112825,7 +112415,7 @@ module.exports = { } }; -},{"../color/attributes":577}],637:[function(require,module,exports){ +},{"../color/attributes":574}],633:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112861,7 +112451,7 @@ module.exports = function calcAutorange(gd) { } }; -},{"../../plots/cartesian/axes":724,"./constants":638}],638:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"./constants":634}],634:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112913,7 +112503,7 @@ module.exports = { extraPad: 15 }; -},{}],639:[function(require,module,exports){ +},{}],635:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112970,7 +112560,7 @@ module.exports = function handleDefaults(layoutIn, layoutOut, axName) { containerOut._input = containerIn; }; -},{"../../lib":685,"./attributes":636}],640:[function(require,module,exports){ +},{"../../lib":680,"./attributes":632}],636:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113521,7 +113111,7 @@ function clearPushMargins(gd) { } } -},{"../../lib":685,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian":734,"../../plots/cartesian/axes":724,"../../plots/plots":787,"../color":578,"../dragelement":599,"../drawing":602,"./constants":638,"d3":107}],641:[function(require,module,exports){ +},{"../../lib":680,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian":727,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../color":575,"../dragelement":596,"../drawing":598,"./constants":634,"d3":104}],637:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113548,7 +113138,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":636,"./calc_autorange":637,"./defaults":639,"./draw":640}],642:[function(require,module,exports){ +},{"./attributes":632,"./calc_autorange":633,"./defaults":635,"./draw":636}],638:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113560,10 +113150,11 @@ module.exports = { 'use strict'; var annAttrs = require('../annotations/attributes'); -var scatterLineAttrs = require('../../traces/scatter/attributes').line; -var dash = require('../drawing/attributes').dash; +var scatterAttrs = require('../../traces/scatter/attributes'); var extendFlat = require('../../lib/extend').extendFlat; +var scatterLineAttrs = scatterAttrs.line; + module.exports = { _isLinkedToArray: 'shape', @@ -113701,7 +113292,7 @@ module.exports = { line: { color: scatterLineAttrs.color, width: scatterLineAttrs.width, - dash: dash, + dash: scatterLineAttrs.dash, role: 'info' }, fillcolor: { @@ -113714,7 +113305,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../../traces/scatter/attributes":976,"../annotations/attributes":567,"../drawing/attributes":601}],643:[function(require,module,exports){ +},{"../../lib/extend":672,"../../traces/scatter/attributes":924,"../annotations/attributes":564}],639:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113791,7 +113382,7 @@ function shapeBounds(ax, v0, v1, path, paramsToUse) { if(max >= min) return [min, max]; } -},{"../../lib":685,"../../plots/cartesian/axes":724,"./constants":644,"./helpers":647}],644:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"./constants":640,"./helpers":643}],640:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113855,7 +113446,7 @@ module.exports = { } }; -},{}],645:[function(require,module,exports){ +},{}],641:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113880,7 +113471,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { handleArrayContainerDefaults(layoutIn, layoutOut, opts); }; -},{"../../plots/array_container_defaults":721,"./shape_defaults":649}],646:[function(require,module,exports){ +},{"../../plots/array_container_defaults":716,"./shape_defaults":645}],642:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114255,7 +113846,7 @@ function movePath(pathIn, moveX, moveY) { }); } -},{"../../lib":685,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian/axes":724,"../color":578,"../dragelement":599,"../drawing":602,"./constants":644,"./helpers":647}],647:[function(require,module,exports){ +},{"../../lib":680,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian/axes":719,"../color":575,"../dragelement":596,"../drawing":598,"./constants":640,"./helpers":643}],643:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114336,7 +113927,7 @@ exports.getPixelToData = function(gd, axis, isVertical) { return pixelToData; }; -},{}],648:[function(require,module,exports){ +},{}],644:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114362,7 +113953,7 @@ module.exports = { drawOne: drawModule.drawOne }; -},{"./attributes":642,"./calc_autorange":643,"./defaults":645,"./draw":646}],649:[function(require,module,exports){ +},{"./attributes":638,"./calc_autorange":639,"./defaults":641,"./draw":642}],645:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114461,7 +114052,7 @@ module.exports = function handleShapeDefaults(shapeIn, shapeOut, fullLayout, opt return shapeOut; }; -},{"../../lib":685,"../../plots/cartesian/axes":724,"./attributes":642,"./helpers":647}],650:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"./attributes":638,"./helpers":643}],646:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114735,7 +114326,7 @@ module.exports = { }, }; -},{"../../lib/extend":677,"../../plots/animation_attributes":720,"../../plots/font_attributes":748,"../../plots/pad_attributes":786,"./constants":651}],651:[function(require,module,exports){ +},{"../../lib/extend":672,"../../plots/animation_attributes":715,"../../plots/font_attributes":739,"../../plots/pad_attributes":777,"./constants":647}],647:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114832,7 +114423,7 @@ module.exports = { currentValueInset: 0, }; -},{}],652:[function(require,module,exports){ +},{}],648:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114945,7 +114536,7 @@ function stepsDefaults(sliderIn, sliderOut) { return valuesOut; } -},{"../../lib":685,"../../plots/array_container_defaults":721,"./attributes":650,"./constants":651}],653:[function(require,module,exports){ +},{"../../lib":680,"../../plots/array_container_defaults":716,"./attributes":646,"./constants":647}],649:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115547,7 +115138,7 @@ function clearPushMargins(gd) { } } -},{"../../lib/svg_text_utils":704,"../../plots/plots":787,"../color":578,"../drawing":602,"../legend/anchor_utils":616,"./constants":651,"d3":107}],654:[function(require,module,exports){ +},{"../../lib/svg_text_utils":699,"../../plots/plots":778,"../color":575,"../drawing":598,"../legend/anchor_utils":612,"./constants":647,"d3":104}],650:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115570,7 +115161,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":650,"./constants":651,"./defaults":652,"./draw":653}],655:[function(require,module,exports){ +},{"./attributes":646,"./constants":647,"./defaults":648,"./draw":649}],651:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115803,7 +115394,7 @@ Titles.draw = function(gd, titleClass, options) { el.classed('js-placeholder', isplaceholder); }; -},{"../../constants/interactions":665,"../../lib":685,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/plots":787,"../color":578,"../drawing":602,"d3":107,"fast-isnumeric":116}],656:[function(require,module,exports){ +},{"../../constants/interactions":661,"../../lib":680,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/plots":778,"../color":575,"../drawing":598,"d3":104,"fast-isnumeric":113}],652:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115976,7 +115567,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../../plots/font_attributes":748,"../../plots/pad_attributes":786,"../color/attributes":577}],657:[function(require,module,exports){ +},{"../../lib/extend":672,"../../plots/font_attributes":739,"../../plots/pad_attributes":777,"../color/attributes":574}],653:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116052,7 +115643,7 @@ module.exports = { hoverColor: '#F4FAFF' }; -},{}],658:[function(require,module,exports){ +},{}],654:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116146,7 +115737,7 @@ function buttonsDefaults(menuIn, menuOut) { return buttonsOut; } -},{"../../lib":685,"../../plots/array_container_defaults":721,"./attributes":656,"./constants":657}],659:[function(require,module,exports){ +},{"../../lib":680,"../../plots/array_container_defaults":716,"./attributes":652,"./constants":653}],655:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116826,9 +116417,9 @@ function clearPushMargins(gd) { } } -},{"../../lib/svg_text_utils":704,"../../plots/plots":787,"../color":578,"../drawing":602,"../legend/anchor_utils":616,"./constants":657,"./scrollbox":661,"d3":107}],660:[function(require,module,exports){ -arguments[4][654][0].apply(exports,arguments) -},{"./attributes":656,"./constants":657,"./defaults":658,"./draw":659,"dup":654}],661:[function(require,module,exports){ +},{"../../lib/svg_text_utils":699,"../../plots/plots":778,"../color":575,"../drawing":598,"../legend/anchor_utils":612,"./constants":653,"./scrollbox":657,"d3":104}],656:[function(require,module,exports){ +arguments[4][650][0].apply(exports,arguments) +},{"./attributes":652,"./constants":653,"./defaults":654,"./draw":655,"dup":650}],657:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117299,7 +116890,7 @@ ScrollBox.prototype.setTranslate = function setTranslate(translateX, translateY) } }; -},{"../../lib":685,"../color":578,"../drawing":602,"d3":107}],662:[function(require,module,exports){ +},{"../../lib":680,"../color":575,"../drawing":598,"d3":104}],658:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117320,7 +116911,7 @@ module.exports = { longdashdot: [8, 1, 1, 1] }; -},{}],663:[function(require,module,exports){ +},{}],659:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117341,7 +116932,7 @@ module.exports = { longdashdot: [[0.5, 0.7, 0.8, 1], 10] }; -},{}],664:[function(require,module,exports){ +},{}],660:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117364,7 +116955,7 @@ module.exports = { x: '❌' }; -},{}],665:[function(require,module,exports){ +},{}],661:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117388,7 +116979,7 @@ module.exports = { DBLCLICKDELAY: 300 }; -},{}],666:[function(require,module,exports){ +},{}],662:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117433,15 +117024,10 @@ module.exports = { * For fast conversion btwn world calendars and epoch ms, the Julian Day Number * of the unix epoch. From calendars.instance().newDate(1970, 1, 1).toJD() */ - EPOCHJD: 2440587.5, - - /* - * Are two values nearly equal? Compare to 1PPM - */ - ALMOST_EQUAL: 1 - 1e-6 + EPOCHJD: 2440587.5 }; -},{}],667:[function(require,module,exports){ +},{}],663:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117479,7 +117065,7 @@ module.exports = { }; -},{}],668:[function(require,module,exports){ +},{}],664:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117503,7 +117089,7 @@ exports.svgAttrs = { 'xmlns:xlink': exports.xlink }; -},{}],669:[function(require,module,exports){ +},{}],665:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117521,7 +117107,7 @@ exports.svgAttrs = { var Plotly = require('./plotly'); // package version injected by `npm run preprocess` -exports.version = '1.26.1'; +exports.version = '1.25.2'; // inject promise polyfill require('es6-promise').polyfill(); @@ -117582,7 +117168,7 @@ exports.Queue = require('./lib/queue'); // export d3 used in the bundle exports.d3 = require('d3'); -},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":574,"./components/images":615,"./components/legend":623,"./components/rangeselector":635,"./components/rangeslider":641,"./components/shapes":648,"./components/sliders":654,"./components/updatemenus":660,"./fonts/mathjax_config":670,"./lib/queue":697,"./plot_api/plot_schema":713,"./plot_api/register":714,"./plot_api/set_plot_config":715,"./plot_api/to_image":717,"./plot_api/validate":718,"./plotly":719,"./snapshot":807,"./snapshot/download":804,"./traces/scatter":986,"d3":107,"es6-promise":113}],670:[function(require,module,exports){ +},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":571,"./components/images":611,"./components/legend":619,"./components/rangeselector":631,"./components/rangeslider":637,"./components/shapes":644,"./components/sliders":650,"./components/updatemenus":656,"./fonts/mathjax_config":666,"./lib/queue":692,"./plot_api/plot_schema":708,"./plot_api/register":709,"./plot_api/set_plot_config":710,"./plot_api/to_image":712,"./plot_api/validate":713,"./plotly":714,"./snapshot":798,"./snapshot/download":795,"./traces/scatter":934,"d3":104,"es6-promise":110}],666:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117615,7 +117201,7 @@ if(typeof MathJax !== 'undefined') { exports.MathJax = false; } -},{}],671:[function(require,module,exports){ +},{}],667:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117632,7 +117218,7 @@ module.exports = function arrayToCalcItem(traceAttr, calcItem, calcAttr, i) { if(Array.isArray(traceAttr)) calcItem[calcAttr] = traceAttr[i]; }; -},{}],672:[function(require,module,exports){ +},{}],668:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117665,7 +117251,7 @@ module.exports = function cleanNumber(v) { return BADNUM; }; -},{"../constants/numerical":666,"fast-isnumeric":116}],673:[function(require,module,exports){ +},{"../constants/numerical":662,"fast-isnumeric":113}],669:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118025,7 +117611,7 @@ exports.validate = function(value, opts) { return out !== failed; }; -},{"../components/colorscale/get_scale":590,"../components/colorscale/scales":596,"./nested_property":691,"fast-isnumeric":116,"tinycolor2":514}],674:[function(require,module,exports){ +},{"../components/colorscale/get_scale":587,"../components/colorscale/scales":593,"./nested_property":686,"fast-isnumeric":113,"tinycolor2":511}],670:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118653,36 +118239,7 @@ exports.findExactDates = function(data, calendar) { }; }; -},{"../constants/numerical":666,"../registry":802,"./loggers":688,"./mod":690,"d3":107,"fast-isnumeric":116}],675:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Ensures an array has the right amount of storage space. If it doesn't - * exist, it creates an array. If it does exist, it returns it if too - * short or truncates it in-place. - * - * The goal is to just reuse memory to avoid a bit of excessive garbage - * collection. - */ -module.exports = function ensureArray(out, n) { - if(!Array.isArray(out)) out = []; - - // If too long, truncate. (If too short, it will grow - // automatically so we don't care about that case) - out.length = n; - - return out; -}; - -},{}],676:[function(require,module,exports){ +},{"../constants/numerical":662,"../registry":793,"./loggers":683,"./mod":685,"d3":104,"fast-isnumeric":113}],671:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118848,7 +118405,7 @@ var Events = { module.exports = Events; -},{"events":114}],677:[function(require,module,exports){ +},{"events":111}],672:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118962,7 +118519,7 @@ function _extend(inputs, isDeep, keepAllKeys, noArrayCopies) { return target; } -},{"./is_plain_object.js":687}],678:[function(require,module,exports){ +},{"./is_plain_object.js":682}],673:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119013,7 +118570,7 @@ module.exports = function filterUnique(array) { return out; }; -},{}],679:[function(require,module,exports){ +},{}],674:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119044,7 +118601,7 @@ module.exports = function filterVisible(container) { return out; }; -},{}],680:[function(require,module,exports){ +},{}],675:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119106,7 +118663,7 @@ function countryNameToISO3(countryName) { return false; } -},{"../lib":685,"country-regex":100}],681:[function(require,module,exports){ +},{"../lib":680,"country-regex":97}],676:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119118,8 +118675,6 @@ function countryNameToISO3(countryName) { 'use strict'; -var BADNUM = require('../constants/numerical').BADNUM; - /** * Convert calcTrace to GeoJSON 'MultiLineString' coordinate arrays * @@ -119132,19 +118687,18 @@ var BADNUM = require('../constants/numerical').BADNUM; * */ exports.calcTraceToLineCoords = function(calcTrace) { - var trace = calcTrace[0].trace; - var connectgaps = trace.connectgaps; + var trace = calcTrace[0].trace, + connectgaps = trace.connectgaps; - var coords = []; - var lineString = []; + var coords = [], + lineString = []; for(var i = 0; i < calcTrace.length; i++) { var calcPt = calcTrace[i]; - var lonlat = calcPt.lonlat; - if(lonlat[0] !== BADNUM) { - lineString.push(lonlat); - } else if(!connectgaps && lineString.length > 0) { + lineString.push(calcPt.lonlat); + + if(!connectgaps && calcPt.gapAfter && lineString.length > 0) { coords.push(lineString); lineString = []; } @@ -119243,7 +118797,7 @@ exports.makeBlank = function() { }; }; -},{"../constants/numerical":666}],682:[function(require,module,exports){ +},{}],677:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119331,7 +118885,7 @@ function formatColor(containerIn, opacityIn, len) { module.exports = formatColor; -},{"../components/color/attributes":577,"../components/colorscale":592,"color-rgba":88,"fast-isnumeric":116}],683:[function(require,module,exports){ +},{"../components/color/attributes":574,"../components/colorscale":589,"color-rgba":85,"fast-isnumeric":113}],678:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119400,7 +118954,7 @@ function convertHTMLToUnicode(html) { module.exports = convertHTMLToUnicode; -},{"../constants/string_mappings":667,"superscript-text":510}],684:[function(require,module,exports){ +},{"../constants/string_mappings":663,"superscript-text":507}],679:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119416,7 +118970,7 @@ module.exports = convertHTMLToUnicode; module.exports = function identity(d) { return d; }; -},{}],685:[function(require,module,exports){ +},{}],680:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119438,7 +118992,6 @@ lib.isArray = require('./is_array'); lib.mod = require('./mod'); lib.toLogRange = require('./to_log_range'); lib.relinkPrivateKeys = require('./relink_private'); -lib.ensureArray = require('./ensure_array'); var coerceModule = require('./coerce'); lib.valObjects = coerceModule.valObjects; @@ -120057,7 +119610,7 @@ lib.numSeparate = function(value, separators, separatethousands) { return x1 + x2; }; -},{"./clean_number":672,"./coerce":673,"./dates":674,"./ensure_array":675,"./extend":677,"./filter_unique":678,"./filter_visible":679,"./identity":684,"./is_array":686,"./is_plain_object":687,"./loggers":688,"./matrix":689,"./mod":690,"./nested_property":691,"./noop":692,"./notifier":693,"./push_unique":696,"./relink_private":698,"./search":699,"./stats":702,"./to_log_range":705,"d3":107}],686:[function(require,module,exports){ +},{"./clean_number":668,"./coerce":669,"./dates":670,"./extend":672,"./filter_unique":673,"./filter_visible":674,"./identity":679,"./is_array":681,"./is_plain_object":682,"./loggers":683,"./matrix":684,"./mod":685,"./nested_property":686,"./noop":687,"./notifier":688,"./push_unique":691,"./relink_private":693,"./search":694,"./stats":697,"./to_log_range":700,"d3":104}],681:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120081,7 +119634,7 @@ module.exports = function isArray(a) { return Array.isArray(a) || ab.isView(a); }; -},{}],687:[function(require,module,exports){ +},{}],682:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120110,7 +119663,7 @@ module.exports = function isPlainObject(obj) { ); }; -},{}],688:[function(require,module,exports){ +},{}],683:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120184,7 +119737,7 @@ function apply(f, args) { } } -},{"../plot_api/plot_config":712}],689:[function(require,module,exports){ +},{"../plot_api/plot_config":707}],684:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120294,7 +119847,7 @@ exports.apply2DTransform2 = function(transform) { }; }; -},{}],690:[function(require,module,exports){ +},{}],685:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120314,7 +119867,7 @@ module.exports = function mod(v, d) { return out < 0 ? out + d : out; }; -},{}],691:[function(require,module,exports){ +},{}],686:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120618,7 +120171,7 @@ function badContainer(container, propStr, propParts) { }; } -},{"../plot_api/container_array_match":708,"./is_array":686,"./is_plain_object":687,"fast-isnumeric":116}],692:[function(require,module,exports){ +},{"../plot_api/container_array_match":703,"./is_array":681,"./is_plain_object":682,"fast-isnumeric":113}],687:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120634,7 +120187,7 @@ function badContainer(container, propStr, propParts) { module.exports = function noop() {}; -},{}],693:[function(require,module,exports){ +},{}],688:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120716,7 +120269,7 @@ module.exports = function(text, displayLength) { }); }; -},{"d3":107,"fast-isnumeric":116}],694:[function(require,module,exports){ +},{"d3":104,"fast-isnumeric":113}],689:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120765,7 +120318,7 @@ module.exports = function overrideCursor(el3, csr) { } }; -},{"./setcursor":700}],695:[function(require,module,exports){ +},{"./setcursor":695}],690:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121005,7 +120558,7 @@ polygon.filter = function filter(pts, tolerance) { }; }; -},{"./matrix":689}],696:[function(require,module,exports){ +},{"./matrix":684}],691:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121043,7 +120596,7 @@ module.exports = function pushUnique(array, item) { return array; }; -},{}],697:[function(require,module,exports){ +},{}],692:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121254,7 +120807,7 @@ queue.plotDo = function(gd, func, args) { module.exports = queue; -},{"../lib":685,"../plot_api/plot_config":712}],698:[function(require,module,exports){ +},{"../lib":680,"../plot_api/plot_config":707}],693:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121311,7 +120864,7 @@ module.exports = function relinkPrivateKeys(toContainer, fromContainer) { } }; -},{"./is_array":686,"./is_plain_object":687}],699:[function(require,module,exports){ +},{"./is_array":681,"./is_plain_object":682}],694:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121422,7 +120975,7 @@ exports.roundUp = function(val, arrayIn, reverse) { return arrayIn[low]; }; -},{"./loggers":688,"fast-isnumeric":116}],700:[function(require,module,exports){ +},{"./loggers":683,"fast-isnumeric":113}],695:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121445,7 +120998,7 @@ module.exports = function setCursor(el3, csr) { if(csr) el3.classed('cursor-' + csr, true); }; -},{}],701:[function(require,module,exports){ +},{}],696:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121494,7 +121047,7 @@ module.exports = function showWebGlMsg(scene) { return false; }; -},{"../components/color":578}],702:[function(require,module,exports){ +},{"../components/color":575}],697:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121590,7 +121143,7 @@ exports.interp = function(arr, n) { return frac * arr[Math.ceil(n)] + (1 - frac) * arr[Math.floor(n)]; }; -},{"fast-isnumeric":116}],703:[function(require,module,exports){ +},{"fast-isnumeric":113}],698:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121611,7 +121164,7 @@ function str2RgbaArray(color) { module.exports = str2RgbaArray; -},{"color-rgba":88}],704:[function(require,module,exports){ +},{"color-rgba":85}],699:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122152,7 +121705,7 @@ exports.makeEditable = function(context, _delegate, options) { return d3.rebind(this, dispatch, 'on'); }; -},{"../constants/string_mappings":667,"../constants/xmlns_namespaces":668,"../lib":685,"d3":107}],705:[function(require,module,exports){ +},{"../constants/string_mappings":663,"../constants/xmlns_namespaces":664,"../lib":680,"d3":104}],700:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122180,7 +121733,7 @@ module.exports = function toLogRange(val, range) { return newVal; }; -},{"fast-isnumeric":116}],706:[function(require,module,exports){ +},{"fast-isnumeric":113}],701:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122216,7 +121769,7 @@ topojsonUtils.getTopojsonFeatures = function(trace, topojson) { return topojsonFeature(topojson, obj).features; }; -},{"../plots/geo/constants":750,"topojson-client":516}],707:[function(require,module,exports){ +},{"../plots/geo/constants":741,"topojson-client":513}],702:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122250,7 +121803,7 @@ module.exports = function truncate(arrayIn, len) { throw new Error('This array type is not yet supported by `truncate`.'); }; -},{}],708:[function(require,module,exports){ +},{}],703:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122308,7 +121861,7 @@ module.exports = function containerArrayMatch(astr) { return {array: arrayStr, index: Number(match[1]), property: match[3] || ''}; }; -},{"../registry":802}],709:[function(require,module,exports){ +},{"../registry":793}],704:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122829,7 +122382,7 @@ exports.hasParent = function(aobj, attr) { return false; }; -},{"../components/color":578,"../lib":685,"../plots/cartesian/axes":724,"../plots/plots":787,"../registry":802,"fast-isnumeric":116,"gl-mat4/fromQuat":162}],710:[function(require,module,exports){ +},{"../components/color":575,"../lib":680,"../plots/cartesian/axes":719,"../plots/plots":778,"../registry":793,"fast-isnumeric":113,"gl-mat4/fromQuat":159}],705:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123042,7 +122595,7 @@ exports.applyContainerArrayChanges = function applyContainerArrayChanges(gd, np, return true; }; -},{"../lib/is_plain_object":687,"../lib/loggers":688,"../lib/nested_property":691,"../lib/noop":692,"../registry":802,"./container_array_match":708}],711:[function(require,module,exports){ +},{"../lib/is_plain_object":682,"../lib/loggers":683,"../lib/nested_property":686,"../lib/noop":687,"../registry":793,"./container_array_match":703}],706:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -123077,8 +122630,6 @@ var manageArrays = require('./manage_arrays'); var helpers = require('./helpers'); var subroutines = require('./subroutines'); var cartesianConstants = require('../plots/cartesian/constants'); -var enforceAxisConstraints = require('../plots/cartesian/constraints'); -var axisIds = require('../plots/cartesian/axis_ids'); /** @@ -123198,8 +122749,9 @@ Plotly.plot = function(gd, data, layout, config) { makePlotFramework(gd); } - // save initial show spikes once per graph - if(graphWasEmpty) Plotly.Axes.saveShowSpikeInitial(gd); + // save initial axis range once per graph + if(graphWasEmpty) Plotly.Axes.saveRangeInitial(gd); + // prepare the data and find the autorange @@ -123302,24 +122854,18 @@ Plotly.plot = function(gd, data, layout, config) { return Lib.syncOrAsync([ Registry.getComponentMethod('shapes', 'calcAutorange'), Registry.getComponentMethod('annotations', 'calcAutorange'), - doAutoRangeAndConstraints, + doAutoRange, Registry.getComponentMethod('rangeslider', 'calcAutorange') ], gd); } - function doAutoRangeAndConstraints() { + function doAutoRange() { if(gd._transitioning) return; var axList = Plotly.Axes.list(gd, '', true); for(var i = 0; i < axList.length; i++) { Plotly.Axes.doAutoRange(axList[i]); } - - enforceAxisConstraints(gd); - - // store initial ranges *after* enforcing constraints, otherwise - // we will never look like we're at the initial ranges - if(graphWasEmpty) Plotly.Axes.saveRangeInitial(gd); } // draw ticks, titles, and calculate axis scaling (._b, ._m) @@ -124342,7 +123888,6 @@ function _restyle(gd, aobj, _traces) { 'autobinx', 'nbinsx', 'xbins', 'xbins.start', 'xbins.end', 'xbins.size', 'autobiny', 'nbinsy', 'ybins', 'ybins.start', 'ybins.end', 'ybins.size', 'autocontour', 'ncontours', 'contours', 'contours.coloring', - 'contours.operation', 'contours.value', 'contours.type', 'contours.value[0]', 'contours.value[1]', 'error_y', 'error_y.visible', 'error_y.value', 'error_y.type', 'error_y.traceref', 'error_y.array', 'error_y.symmetric', 'error_y.arrayminus', 'error_y.valueminus', 'error_y.tracerefminus', @@ -124360,31 +123905,9 @@ function _restyle(gd, aobj, _traces) { 'line.showscale', 'line.cauto', 'line.autocolorscale', 'line.reversescale', 'marker.line.showscale', 'marker.line.cauto', 'marker.line.autocolorscale', 'marker.line.reversescale', 'xcalendar', 'ycalendar', - 'cumulative', 'cumulative.enabled', 'cumulative.direction', 'cumulative.currentbin', - 'a0', 'da', 'b0', 'db', 'atype', 'btype', - 'cheaterslope', 'carpet', 'sum', - ]; - - var carpetAxisAttributes = [ - 'color', 'smoothing', 'title', 'titlefont', 'titlefont.size', 'titlefont.family', - 'titlefont.color', 'titleoffset', 'type', 'autorange', 'rangemode', 'range', - 'fixedrange', 'cheatertype', 'tickmode', 'nticks', 'tickvals', 'ticktext', - 'ticks', 'mirror', 'ticklen', 'tickwidth', 'tickcolor', 'showticklabels', - 'tickfont', 'tickfont.size', 'tickfont.family', 'tickfont.color', 'tickprefix', - 'showtickprefix', 'ticksuffix', 'showticksuffix', 'showexponent', 'exponentformat', - 'separatethousands', 'tickformat', 'categoryorder', 'categoryarray', 'labelpadding', - 'labelprefix', 'labelsuffix', 'labelfont', 'labelfont.family', 'labelfont.size', - 'labelfont.color', 'showline', 'linecolor', 'linewidth', 'gridcolor', 'gridwidth', - 'showgrid', 'minorgridcount', 'minorgridwidth', 'minorgridcolor', 'startline', - 'startlinecolor', 'startlinewidth', 'endline', 'endlinewidth', 'endlinecolor', - 'tick0', 'dtick', 'arraytick0', 'arraydtick', 'hoverformat', 'tickangle' + 'cumulative', 'cumulative.enabled', 'cumulative.direction', 'cumulative.currentbin' ]; - for(i = 0; i < carpetAxisAttributes.length; i++) { - recalcAttrs.push('aaxis.' + carpetAxisAttributes[i]); - recalcAttrs.push('baxis.' + carpetAxisAttributes[i]); - } - for(i = 0; i < traces.length; i++) { if(Registry.traceIs(fullData[traces[i]], 'box')) { recalcAttrs.push('name'); @@ -124655,12 +124178,6 @@ function _restyle(gd, aobj, _traces) { var moduleAttrs = (contFull._module || {}).attributes || {}; var valObject = Lib.nestedProperty(moduleAttrs, ai).get() || {}; - // if restyling entire attribute container, assume worse case - if(!valObject.valType) { - flags.docalc = true; - } - - // must redo calcdata when restyling array values of arrayOk attributes if(valObject.arrayOk && (Array.isArray(newVal) || Array.isArray(oldVal))) { flags.docalc = true; } @@ -124728,14 +124245,9 @@ function _restyle(gd, aobj, _traces) { doextra(axlist.map(rangeAttr), [0, 1], 0); } flags.docalc = true; - - } else if(replotAttrs.indexOf(aiAboveArray) !== -1) { - flags.doplot = true; - } else if(aiAboveArray.indexOf('aaxis') === 0 || aiAboveArray.indexOf('baxis') === 0) { - flags.doplot = true; - } else if(autorangeAttrs.indexOf(aiAboveArray) !== -1) { - flags.docalcAutorange = true; } + else if(replotAttrs.indexOf(aiAboveArray) !== -1) flags.doplot = true; + else if(autorangeAttrs.indexOf(aiAboveArray) !== -1) flags.docalcAutorange = true; } // do we need to force a recalc? @@ -124943,16 +124455,6 @@ function _relayout(gd, aobj) { return (ax || {}).autorange; } - // for constraint enforcement: keep track of all axes (as {id: name}) - // we're editing the (auto)range of, so we can tell the others constrained - // to scale with them that it's OK for them to shrink - var rangesAltered = {}; - - function recordAlteredAxis(pleafPlus) { - var axId = axisIds.name2id(pleafPlus.split('.')[0]); - rangesAltered[axId] = 1; - } - // alter gd.layout for(var ai in aobj) { if(helpers.hasParent(aobj, ai)) { @@ -124987,17 +124489,15 @@ function _relayout(gd, aobj) { // // To do so, we must manually set them back here using the _initialAutoSize cache. if(['width', 'height'].indexOf(ai) !== -1 && vi === null) { - fullLayout[ai] = gd._initialAutoSize[ai]; + gd._fullLayout[ai] = gd._initialAutoSize[ai]; } // check autorange vs range else if(pleafPlus.match(/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/)) { doextra(ptrunk + '.autorange', false); - recordAlteredAxis(pleafPlus); } else if(pleafPlus.match(/^[xyz]axis[0-9]*\.autorange$/)) { doextra([ptrunk + '.range[0]', ptrunk + '.range[1]'], undefined); - recordAlteredAxis(pleafPlus); } else if(pleafPlus.match(/^aspectratio\.[xyz]$/)) { doextra(proot + '.aspectmode', 'manual'); @@ -125161,18 +124661,6 @@ function _relayout(gd, aobj) { else if(proot.indexOf('geo') === 0) flags.doplot = true; else if(proot.indexOf('ternary') === 0) flags.doplot = true; else if(ai === 'paper_bgcolor') flags.doplot = true; - else if(proot === 'margin' || - pp1 === 'autorange' || - pp1 === 'rangemode' || - pp1 === 'type' || - pp1 === 'domain' || - pp1 === 'fixedrange' || - pp1 === 'scaleanchor' || - pp1 === 'scaleratio' || - ai.indexOf('calendar') !== -1 || - ai.match(/^(bar|box|font)/)) { - flags.docalc = true; - } else if(fullLayout._has('gl2d') && (ai.indexOf('axis') !== -1 || ai === 'plot_bgcolor') ) flags.doplot = true; @@ -125196,17 +124684,24 @@ function _relayout(gd, aobj) { else if(ai === 'margin.pad') { flags.doticks = flags.dolayoutstyle = true; } + else if(proot === 'margin' || + pp1 === 'autorange' || + pp1 === 'rangemode' || + pp1 === 'type' || + pp1 === 'domain' || + ai.indexOf('calendar') !== -1 || + ai.match(/^(bar|box|font)/)) { + flags.docalc = true; + } /* - * hovermode, dragmode, and spikes don't need any redrawing, since they just - * affect reaction to user input. Everything else, assume full replot. + * hovermode and dragmode don't need any redrawing, since they just + * affect reaction to user input, everything else, assume full replot. * height, width, autosize get dealt with below. Except for the case of * of subplots - scenes - which require scene.updateFx to be called. */ - else if(['hovermode', 'dragmode'].indexOf(ai) !== -1 || - ai.indexOf('spike') !== -1) { - flags.domodebar = true; - } - else if(['height', 'width', 'autosize'].indexOf(ai) === -1) { + else if(['hovermode', 'dragmode'].indexOf(ai) !== -1) flags.domodebar = true; + else if(['hovermode', 'dragmode', 'height', + 'width', 'autosize'].indexOf(ai) === -1) { flags.doplot = true; } @@ -125221,37 +124716,16 @@ function _relayout(gd, aobj) { if(!finished) flags.doplot = true; } - // figure out if we need to recalculate axis constraints - var constraints = fullLayout._axisConstraintGroups; - for(var axId in rangesAltered) { - for(i = 0; i < constraints.length; i++) { - var group = constraints[i]; - if(group[axId]) { - // Always recalc if we're changing constrained ranges. - // Otherwise it's possible to violate the constraints by - // specifying arbitrary ranges for all axes in the group. - // this way some ranges may expand beyond what's specified, - // as they do at first draw, to satisfy the constraints. - flags.docalc = true; - for(var groupAxId in group) { - if(!rangesAltered[groupAxId]) { - axisIds.getFromId(gd, groupAxId)._constraintShrinkable = true; - } - } - } - } - } - - var oldWidth = fullLayout.width, - oldHeight = fullLayout.height; + var oldWidth = gd._fullLayout.width, + oldHeight = gd._fullLayout.height; // calculate autosizing - if(gd.layout.autosize) Plots.plotAutoSize(gd, gd.layout, fullLayout); + if(gd.layout.autosize) Plots.plotAutoSize(gd, gd.layout, gd._fullLayout); // avoid unnecessary redraws var hasSizechanged = aobj.height || aobj.width || - (fullLayout.width !== oldWidth) || - (fullLayout.height !== oldHeight); + (gd._fullLayout.width !== oldWidth) || + (gd._fullLayout.height !== oldHeight); if(hasSizechanged) flags.docalc = true; @@ -125888,13 +125362,6 @@ Plotly.deleteFrames = function(gd, frameList) { var ops = []; var revops = []; - if(!frameList) { - frameList = []; - for(i = 0; i < _frames.length; i++) { - frameList.push(i); - } - } - frameList = frameList.slice(0); frameList.sort(); @@ -126057,7 +125524,7 @@ function makePlotFramework(gd) { gd.emit('plotly_framework'); } -},{"../components/drawing":602,"../components/errorbars":608,"../constants/xmlns_namespaces":668,"../lib":685,"../lib/events":676,"../lib/queue":697,"../lib/svg_text_utils":704,"../plotly":719,"../plots/cartesian/axis_ids":727,"../plots/cartesian/constants":729,"../plots/cartesian/constraints":731,"../plots/cartesian/graph_interact":733,"../plots/plots":787,"../plots/polar":790,"../registry":802,"./helpers":709,"./manage_arrays":710,"./subroutines":716,"d3":107,"fast-isnumeric":116}],712:[function(require,module,exports){ +},{"../components/drawing":598,"../components/errorbars":604,"../constants/xmlns_namespaces":664,"../lib":680,"../lib/events":671,"../lib/queue":692,"../lib/svg_text_utils":699,"../plotly":714,"../plots/cartesian/constants":724,"../plots/cartesian/graph_interact":726,"../plots/plots":778,"../plots/polar":781,"../registry":793,"./helpers":704,"./manage_arrays":705,"./subroutines":711,"d3":104,"fast-isnumeric":113}],707:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126183,7 +125650,7 @@ function defaultSetBackground(gd, bgColor) { } } -},{}],713:[function(require,module,exports){ +},{}],708:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126592,7 +126059,7 @@ function insertAttrs(baseAttrs, newAttrs, astr) { np.set(extendDeep(np.get() || {}, newAttrs)); } -},{"../lib":685,"../plots/animation_attributes":720,"../plots/attributes":722,"../plots/frame_attributes":749,"../plots/layout_attributes":778,"../plots/polar/area_attributes":788,"../plots/polar/axis_attributes":789,"../registry":802}],714:[function(require,module,exports){ +},{"../lib":680,"../plots/animation_attributes":715,"../plots/attributes":717,"../plots/frame_attributes":740,"../plots/layout_attributes":769,"../plots/polar/area_attributes":779,"../plots/polar/axis_attributes":780,"../registry":793}],709:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126691,7 +126158,7 @@ function registerComponentModule(newModule) { Registry.registerComponent(newModule); } -},{"../lib":685,"../registry":802}],715:[function(require,module,exports){ +},{"../lib":680,"../registry":793}],710:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126717,7 +126184,7 @@ module.exports = function setPlotConfig(configObj) { return Lib.extendFlat(Plotly.defaultConfig, configObj); }; -},{"../lib":685,"../plotly":719}],716:[function(require,module,exports){ +},{"../lib":680,"../plotly":714}],711:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127124,7 +126591,7 @@ exports.doCamera = function(gd) { } }; -},{"../components/color":578,"../components/drawing":602,"../components/modebar":626,"../components/titles":655,"../lib":685,"../plotly":719,"../plots/plots":787,"../registry":802,"d3":107}],717:[function(require,module,exports){ +},{"../components/color":575,"../components/drawing":598,"../components/modebar":622,"../components/titles":651,"../lib":680,"../plotly":714,"../plots/plots":778,"../registry":793,"d3":104}],712:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127234,7 +126701,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":685,"../plotly":719,"../snapshot/cloneplot":803,"../snapshot/helpers":806,"../snapshot/svgtoimg":808,"../snapshot/tosvg":810,"fast-isnumeric":116}],718:[function(require,module,exports){ +},{"../lib":680,"../plotly":714,"../snapshot/cloneplot":794,"../snapshot/helpers":797,"../snapshot/svgtoimg":799,"../snapshot/tosvg":801,"fast-isnumeric":113}],713:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127605,7 +127072,7 @@ function convertPathToAttributeString(path) { return astr; } -},{"../lib":685,"../plots/plots":787,"./plot_schema":713}],719:[function(require,module,exports){ +},{"../lib":680,"../plots/plots":778,"./plot_schema":708}],714:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127638,7 +127105,7 @@ exports.ModeBar = require('./components/modebar'); // plot api require('./plot_api/plot_api'); -},{"./components/modebar":626,"./plot_api/plot_api":711,"./plot_api/plot_config":712,"./plots/cartesian/axes":724,"./plots/cartesian/graph_interact":733,"./plots/plots":787}],720:[function(require,module,exports){ +},{"./components/modebar":622,"./plot_api/plot_api":706,"./plot_api/plot_config":707,"./plots/cartesian/axes":719,"./plots/cartesian/graph_interact":726,"./plots/plots":778}],715:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127762,7 +127229,7 @@ module.exports = { } }; -},{}],721:[function(require,module,exports){ +},{}],716:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127843,7 +127310,7 @@ module.exports = function handleArrayContainerDefaults(parentObjIn, parentObjOut } }; -},{"../lib":685}],722:[function(require,module,exports){ +},{"../lib":680}],717:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127953,7 +127420,7 @@ module.exports = { } }; -},{}],723:[function(require,module,exports){ +},{}],718:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127992,7 +127459,7 @@ module.exports = { } }; -},{}],724:[function(require,module,exports){ +},{}],719:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -128356,35 +127823,6 @@ axes.saveRangeInitial = function(gd, overwrite) { return hasOneAxisChanged; }; -// save a copy of the initial spike visibility -axes.saveShowSpikeInitial = function(gd, overwrite) { - var axList = axes.list(gd, '', true), - hasOneAxisChanged = false, - allEnabled = 'on'; - - for(var i = 0; i < axList.length; i++) { - var ax = axList[i]; - - var isNew = (ax._showSpikeInitial === undefined); - var hasChanged = ( - isNew || !( - ax.showspikes === ax._showspikes - ) - ); - - if((isNew) || (overwrite && hasChanged)) { - ax._showSpikeInitial = ax.showspikes; - hasOneAxisChanged = true; - } - - if(allEnabled === 'on' && !ax.showspikes) { - allEnabled = 'off'; - } - } - gd._fullLayout._cartesianSpikesEnabled = allEnabled; - return hasOneAxisChanged; -}; - // axes.expand: if autoranging, include new data in the outer limits // for this axis // data is an array of numbers (ie already run through ax.d2c) @@ -129627,7 +129065,7 @@ axes.doTicks = function(gd, axid, skipTitle) { // set scaling to pixels ax.setScale(); - var axLetter = axid.charAt(0), + var axletter = axid.charAt(0), counterLetter = axes.counterLetter(axid), vals = axes.calcTicks(ax), datafn = function(d) { return [d.text, d.x, ax.mirror].join('_'); }, @@ -129641,7 +129079,7 @@ axes.doTicks = function(gd, axid, skipTitle) { gridWidth = Drawing.crispRound(gd, ax.gridwidth, 1), zeroLineWidth = Drawing.crispRound(gd, ax.zerolinewidth, gridWidth), tickWidth = Drawing.crispRound(gd, ax.tickwidth, 1), - sides, transfn, tickpathfn, subplots, + sides, transfn, tickpathfn, i; if(ax._counterangle && ax.ticks === 'outside') { @@ -129651,7 +129089,7 @@ axes.doTicks = function(gd, axid, skipTitle) { } // positioning arguments for x vs y axes - if(axLetter === 'x') { + if(axletter === 'x') { sides = ['bottom', 'top']; transfn = function(d) { return 'translate(' + ax.l2p(d.x) + ',0)'; @@ -129664,7 +129102,7 @@ axes.doTicks = function(gd, axid, skipTitle) { else return 'M0,' + shift + 'v' + len; }; } - else if(axLetter === 'y') { + else if(axletter === 'y') { sides = ['left', 'right']; transfn = function(d) { return 'translate(0,' + ax.l2p(d.x) + ')'; @@ -129685,12 +129123,10 @@ axes.doTicks = function(gd, axid, skipTitle) { // which direction do the side[0], side[1], and free ticks go? // then we flip if outside XOR y axis ticksign = [-1, 1, axside === sides[1] ? 1 : -1]; - if((ax.ticks !== 'inside') === (axLetter === 'x')) { + if((ax.ticks !== 'inside') === (axletter === 'x')) { ticksign = ticksign.map(function(v) { return -v; }); } - if(!ax.visible) return; - // remove zero lines, grid lines, and inside ticks if they're within // 1 pixel of the end // The key case here is removing zero lines when the axis bound is zero. @@ -129721,12 +129157,12 @@ axes.doTicks = function(gd, axid, skipTitle) { var tickLabels = container.selectAll('g.' + tcls).data(vals, datafn); if(!ax.showticklabels || !isNumeric(position)) { tickLabels.remove(); - drawAxTitle(); + drawAxTitle(axid); return; } var labelx, labely, labelanchor, labelpos0, flipit; - if(axLetter === 'x') { + if(axletter === 'x') { flipit = (axside === 'bottom') ? 1 : -1; labelx = function(d) { return d.dx + labelShift * flipit; }; labelpos0 = position + (labelStandoff + pad) * flipit; @@ -129842,7 +129278,7 @@ axes.doTicks = function(gd, axid, skipTitle) { // check for auto-angling if x labels overlap // don't auto-angle at all for log axes with // base and digit format - if(axLetter === 'x' && !isNumeric(ax.tickangle) && + if(axletter === 'x' && !isNumeric(ax.tickangle) && (ax.type !== 'log' || String(ax.dtick).charAt(0) !== 'D')) { var lbbArray = []; tickLabels.each(function(d) { @@ -129887,59 +129323,12 @@ axes.doTicks = function(gd, axid, skipTitle) { // (so it can move out of the way if needed) // TODO: separate out scoot so we don't need to do // a full redraw of the title (mostly relevant for MathJax) - drawAxTitle(); + drawAxTitle(axid); return axid + ' done'; } function calcBoundingBox() { - var bBox = container.node().getBoundingClientRect(); - var gdBB = gd.getBoundingClientRect(); - - /* - * the way we're going to use this, the positioning that matters - * is relative to the origin of gd. This is important particularly - * if gd is scrollable, and may have been scrolled between the time - * we calculate this and the time we use it - */ - ax._boundingBox = { - width: bBox.width, - height: bBox.height, - left: bBox.left - gdBB.left, - right: bBox.right - gdBB.left, - top: bBox.top - gdBB.top, - bottom: bBox.bottom - gdBB.top - }; - - /* - * for spikelines: what's the full domain of positions in the - * opposite direction that are associated with this axis? - * This means any axes that we make a subplot with, plus the - * position of the axis itself if it's free. - */ - if(subplots) { - var fullRange = ax._counterSpan = [Infinity, -Infinity]; - - for(i = 0; i < subplots.length; i++) { - var subplot = fullLayout._plots[subplots[i]]; - var counterAxis = subplot[(axLetter === 'x') ? 'yaxis' : 'xaxis']; - - extendRange(fullRange, [ - counterAxis._offset, - counterAxis._offset + counterAxis._length - ]); - } - - if(ax.anchor === 'free') { - extendRange(fullRange, (axLetter === 'x') ? - [ax._boundingBox.bottom, ax._boundingBox.top] : - [ax._boundingBox.right, ax._boundingBox.left]); - } - } - - function extendRange(range, newRange) { - range[0] = Math.min(range[0], newRange[0]); - range[1] = Math.max(range[1], newRange[1]); - } + ax._boundingBox = container.node().getBoundingClientRect(); } var done = Lib.syncOrAsync([ @@ -129951,7 +129340,7 @@ axes.doTicks = function(gd, axid, skipTitle) { return done; } - function drawAxTitle() { + function drawAxTitle(axid) { if(skipTitle) return; // now this only applies to regular cartesian axes; colorbars and @@ -130022,16 +129411,16 @@ axes.doTicks = function(gd, axid, skipTitle) { function traceHasBarsOrFill(trace, subplot) { if(trace.visible !== true || trace.xaxis + trace.yaxis !== subplot) return false; - if(Registry.traceIs(trace, 'bar') && trace.orientation === {x: 'h', y: 'v'}[axLetter]) return true; - return trace.fill && trace.fill.charAt(trace.fill.length - 1) === axLetter; + if(Registry.traceIs(trace, 'bar') && trace.orientation === {x: 'h', y: 'v'}[axletter]) return true; + return trace.fill && trace.fill.charAt(trace.fill.length - 1) === axletter; } function drawGrid(plotinfo, counteraxis, subplot) { var gridcontainer = plotinfo.gridlayer, zlcontainer = plotinfo.zerolinelayer, - gridvals = plotinfo['hidegrid' + axLetter] ? [] : valsClipped, + gridvals = plotinfo['hidegrid' + axletter] ? [] : valsClipped, gridpath = ax._gridpath || - 'M0,0' + ((axLetter === 'x') ? 'v' : 'h') + counteraxis._length, + 'M0,0' + ((axletter === 'x') ? 'v' : 'h') + counteraxis._length, grid = gridcontainer.selectAll('path.' + gcls) .data((ax.showgrid === false) ? [] : gridvals, datafn); grid.enter().append('path').classed(gcls, 1) @@ -130085,13 +129474,12 @@ axes.doTicks = function(gd, axid, skipTitle) { return drawLabels(ax._axislayer, ax._pos); } else { - subplots = axes.getSubplots(gd, ax); - var alldone = subplots.map(function(subplot) { + var alldone = axes.getSubplots(gd, ax).map(function(subplot) { var plotinfo = fullLayout._plots[subplot]; if(!fullLayout._has('cartesian')) return; - var container = plotinfo[axLetter + 'axislayer'], + var container = plotinfo[axletter + 'axislayer'], // [bottom or left, top or right, free, main] linepositions = ax._linepositions[subplot] || [], @@ -130279,7 +129667,7 @@ function swapAxisAttrs(layout, key, xFullAxes, yFullAxes) { } } -},{"../../components/color":578,"../../components/drawing":602,"../../components/titles":655,"../../constants/numerical":666,"../../lib":685,"../../lib/svg_text_utils":704,"../../registry":802,"./axis_ids":727,"./layout_attributes":735,"./layout_defaults":736,"./set_convert":741,"d3":107,"fast-isnumeric":116}],725:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"../../components/titles":651,"../../constants/numerical":662,"../../lib":680,"../../lib/svg_text_utils":699,"../../registry":793,"./axis_ids":722,"./layout_attributes":728,"./layout_defaults":729,"./set_convert":733,"d3":104,"fast-isnumeric":113}],720:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130354,7 +129742,7 @@ function category(a) { return curvecats > curvenums * 2; } -},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],726:[function(require,module,exports){ +},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],721:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130379,6 +129767,8 @@ var handleTickLabelDefaults = require('./tick_label_defaults'); var handleCategoryOrderDefaults = require('./category_order_defaults'); var setConvert = require('./set_convert'); var orderedCategories = require('./ordered_categories'); +var axisIds = require('./axis_ids'); +var autoType = require('./axis_autotype'); /** @@ -130386,11 +129776,12 @@ var orderedCategories = require('./ordered_categories'); * * letter: 'x' or 'y' * title: name of the axis (ie 'Colorbar') to go in default title + * name: axis object name (ie 'xaxis') if one should be stored * font: the default font to inherit * outerTicks: boolean, should ticks default to outside? * showGrid: boolean, should gridlines be shown by default? * noHover: boolean, this axis doesn't support hover effects? - * data: the plot data, used to manage categories + * data: the plot data to use in choosing auto type * bgColor: the plot background color, to calculate default gridline colors */ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, options, layoutOut) { @@ -130404,9 +129795,28 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, return Lib.coerce2(containerIn, containerOut, layoutAttributes, attr, dflt); } - var visible = coerce('visible', !options.cheateronly); + // set up some private properties + if(options.name) { + containerOut._name = options.name; + containerOut._id = axisIds.name2id(options.name); + } - var axType = containerOut.type; + // now figure out type and do some more initialization + var axType = coerce('type'); + if(axType === '-') { + setAutoType(containerOut, options.data); + + if(containerOut.type === '-') { + containerOut.type = 'linear'; + } + else { + // copy autoType back to input axis + // note that if this object didn't exist + // in the input layout, we have to put it in + // this happens in the main supplyDefaults function + axType = containerIn.type = containerOut.type; + } + } if(axType === 'date') { var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleDefaults'); @@ -130415,20 +129825,6 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, setConvert(containerOut, layoutOut); - var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range)); - - if(autoRange) coerce('rangemode'); - - coerce('range'); - containerOut.cleanRange(); - - handleCategoryOrderDefaults(containerIn, containerOut, coerce); - containerOut._initialCategories = axType === 'category' ? - orderedCategories(letter, containerOut.categoryorder, containerOut.categoryarray, options.data) : - []; - - if(!visible) return containerOut; - var dfltColor = coerce('color'); // if axis.color was provided, use it for fonts too; otherwise, // inherit from global font color in case that was provided. @@ -130441,9 +129837,17 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, color: dfltFontColor }); + var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range)); + + if(autoRange) coerce('rangemode'); + + coerce('range'); + containerOut.cleanRange(); + handleTickValueDefaults(containerIn, containerOut, coerce, axType); handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options); handleTickMarkDefaults(containerIn, containerOut, coerce, options); + handleCategoryOrderDefaults(containerIn, containerOut, coerce); var lineColor = coerce2('linecolor', dfltColor), lineWidth = coerce2('linewidth'), @@ -130474,10 +129878,99 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, delete containerOut.zerolinewidth; } + // fill in categories + containerOut._initialCategories = axType === 'category' ? + orderedCategories(letter, containerOut.categoryorder, containerOut.categoryarray, options.data) : + []; + return containerOut; }; -},{"../../components/color/attributes":577,"../../lib":685,"../../registry":802,"./category_order_defaults":728,"./layout_attributes":735,"./ordered_categories":737,"./set_convert":741,"./tick_label_defaults":742,"./tick_mark_defaults":743,"./tick_value_defaults":744,"tinycolor2":514}],727:[function(require,module,exports){ +function setAutoType(ax, data) { + // new logic: let people specify any type they want, + // only autotype if type is '-' + if(ax.type !== '-') return; + + var id = ax._id, + axLetter = id.charAt(0); + + // support 3d + if(id.indexOf('scene') !== -1) id = axLetter; + + var d0 = getFirstNonEmptyTrace(data, id, axLetter); + if(!d0) return; + + // first check for histograms, as the count direction + // should always default to a linear axis + if(d0.type === 'histogram' && + axLetter === {v: 'y', h: 'x'}[d0.orientation || 'v']) { + ax.type = 'linear'; + return; + } + + var calAttr = axLetter + 'calendar', + calendar = d0[calAttr]; + + // check all boxes on this x axis to see + // if they're dates, numbers, or categories + if(isBoxWithoutPositionCoords(d0, axLetter)) { + var posLetter = getBoxPosLetter(d0), + boxPositions = [], + trace; + + for(var i = 0; i < data.length; i++) { + trace = data[i]; + if(!Registry.traceIs(trace, 'box') || + (trace[axLetter + 'axis'] || axLetter) !== id) continue; + + if(trace[posLetter] !== undefined) boxPositions.push(trace[posLetter][0]); + else if(trace.name !== undefined) boxPositions.push(trace.name); + else boxPositions.push('text'); + + if(trace[calAttr] !== calendar) calendar = undefined; + } + + ax.type = autoType(boxPositions, calendar); + } + else { + ax.type = autoType(d0[axLetter] || [d0[axLetter + '0']], calendar); + } +} + +function getBoxPosLetter(trace) { + return {v: 'x', h: 'y'}[trace.orientation || 'v']; +} + +function isBoxWithoutPositionCoords(trace, axLetter) { + var posLetter = getBoxPosLetter(trace), + isBox = Registry.traceIs(trace, 'box'), + isCandlestick = Registry.traceIs(trace._fullInput || {}, 'candlestick'); + + return ( + isBox && + !isCandlestick && + axLetter === posLetter && + trace[posLetter] === undefined && + trace[posLetter + '0'] === undefined + ); +} + +function getFirstNonEmptyTrace(data, id, axLetter) { + for(var i = 0; i < data.length; i++) { + var trace = data[i]; + + if((trace[axLetter + 'axis'] || axLetter) === id) { + if(isBoxWithoutPositionCoords(trace, axLetter)) { + return trace; + } + else if((trace[axLetter] || []).length || trace[axLetter + '0']) { + return trace; + } + } + } +} + +},{"../../components/color/attributes":574,"../../lib":680,"../../registry":793,"./axis_autotype":720,"./axis_ids":722,"./category_order_defaults":723,"./layout_attributes":728,"./ordered_categories":730,"./set_convert":733,"./tick_label_defaults":734,"./tick_mark_defaults":735,"./tick_value_defaults":736,"tinycolor2":511}],722:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130599,7 +130092,7 @@ exports.getFromTrace = function(gd, fullTrace, type) { return ax; }; -},{"../../lib":685,"../../registry":802,"../plots":787,"./constants":729}],728:[function(require,module,exports){ +},{"../../lib":680,"../../registry":793,"../plots":778,"./constants":724}],723:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130633,7 +130126,7 @@ module.exports = function handleCategoryOrderDefaults(containerIn, containerOut, } }; -},{}],729:[function(require,module,exports){ +},{}],724:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130703,222 +130196,7 @@ module.exports = { DFLTRANGEY: [-1, 4] }; -},{}],730:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var Lib = require('../../lib'); -var id2name = require('./axis_ids').id2name; - - -module.exports = function handleConstraintDefaults(containerIn, containerOut, coerce, allAxisIds, layoutOut) { - var constraintGroups = layoutOut._axisConstraintGroups; - - if(containerOut.fixedrange || !containerIn.scaleanchor) return; - - var constraintOpts = getConstraintOpts(constraintGroups, containerOut._id, allAxisIds, layoutOut); - - var scaleanchor = Lib.coerce(containerIn, containerOut, { - scaleanchor: { - valType: 'enumerated', - values: constraintOpts.linkableAxes - } - }, 'scaleanchor'); - - if(scaleanchor) { - var scaleratio = coerce('scaleratio'); - // TODO: I suppose I could do attribute.min: Number.MIN_VALUE to avoid zero, - // but that seems hacky. Better way to say "must be a positive number"? - // Of course if you use several super-tiny values you could eventually - // force a product of these to zero and all hell would break loose... - // Likewise with super-huge values. - if(!scaleratio) scaleratio = containerOut.scaleratio = 1; - - updateConstraintGroups(constraintGroups, constraintOpts.thisGroup, - containerOut._id, scaleanchor, scaleratio); - } - else if(allAxisIds.indexOf(containerIn.scaleanchor) !== -1) { - Lib.warn('ignored ' + containerOut._name + '.scaleanchor: "' + - containerIn.scaleanchor + '" to avoid either an infinite loop ' + - 'and possibly inconsistent scaleratios, or because the target' + - 'axis has fixed range.'); - } -}; - -function getConstraintOpts(constraintGroups, thisID, allAxisIds, layoutOut) { - // If this axis is already part of a constraint group, we can't - // scaleanchor any other axis in that group, or we'd make a loop. - // Filter allAxisIds to enforce this, also matching axis types. - - var thisType = layoutOut[id2name(thisID)].type; - - var i, j, idj, axj; - - var linkableAxes = []; - for(j = 0; j < allAxisIds.length; j++) { - idj = allAxisIds[j]; - if(idj === thisID) continue; - - axj = layoutOut[id2name(idj)]; - if(axj.type === thisType && !axj.fixedrange) linkableAxes.push(idj); - } - - for(i = 0; i < constraintGroups.length; i++) { - if(constraintGroups[i][thisID]) { - var thisGroup = constraintGroups[i]; - - var linkableAxesNoLoops = []; - for(j = 0; j < linkableAxes.length; j++) { - idj = linkableAxes[j]; - if(!thisGroup[idj]) linkableAxesNoLoops.push(idj); - } - return {linkableAxes: linkableAxesNoLoops, thisGroup: thisGroup}; - } - } - - return {linkableAxes: linkableAxes, thisGroup: null}; -} - - -/* - * Add this axis to the axis constraint groups, which is the collection - * of axes that are all constrained together on scale. - * - * constraintGroups: a list of objects. each object is - * {axis_id: scale_within_group}, where scale_within_group is - * only important relative to the rest of the group, and defines - * the relative scales between all axes in the group - * - * thisGroup: the group the current axis is already in - * thisID: the id if the current axis - * scaleanchor: the id of the axis to scale it with - * scaleratio: the ratio of this axis to the scaleanchor axis - */ -function updateConstraintGroups(constraintGroups, thisGroup, thisID, scaleanchor, scaleratio) { - var i, j, groupi, keyj, thisGroupIndex; - - if(thisGroup === null) { - thisGroup = {}; - thisGroup[thisID] = 1; - thisGroupIndex = constraintGroups.length; - constraintGroups.push(thisGroup); - } - else { - thisGroupIndex = constraintGroups.indexOf(thisGroup); - } - - var thisGroupKeys = Object.keys(thisGroup); - - // we know that this axis isn't in any other groups, but we don't know - // about the scaleanchor axis. If it is, we need to merge the groups. - for(i = 0; i < constraintGroups.length; i++) { - groupi = constraintGroups[i]; - if(i !== thisGroupIndex && groupi[scaleanchor]) { - var baseScale = groupi[scaleanchor]; - for(j = 0; j < thisGroupKeys.length; j++) { - keyj = thisGroupKeys[j]; - groupi[keyj] = baseScale * scaleratio * thisGroup[keyj]; - } - constraintGroups.splice(thisGroupIndex, 1); - return; - } - } - - // otherwise, we insert the new scaleanchor axis as the base scale (1) - // in its group, and scale the rest of the group to it - if(scaleratio !== 1) { - for(j = 0; j < thisGroupKeys.length; j++) { - thisGroup[thisGroupKeys[j]] *= scaleratio; - } - } - thisGroup[scaleanchor] = 1; -} - -},{"../../lib":685,"./axis_ids":727}],731:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var id2name = require('./axis_ids').id2name; -var scaleZoom = require('./scale_zoom'); - -var ALMOST_EQUAL = require('../../constants/numerical').ALMOST_EQUAL; - - -module.exports = function enforceAxisConstraints(gd) { - var fullLayout = gd._fullLayout; - var constraintGroups = fullLayout._axisConstraintGroups; - - var i, j, axisID, ax, normScale; - - for(i = 0; i < constraintGroups.length; i++) { - var group = constraintGroups[i]; - var axisIDs = Object.keys(group); - - var minScale = Infinity; - var maxScale = 0; - // mostly matchScale will be the same as minScale - // ie we expand axis ranges to encompass *everything* - // that's currently in any of their ranges, but during - // autorange of a subset of axes we will ignore other - // axes for this purpose. - var matchScale = Infinity; - var normScales = {}; - var axes = {}; - - // find the (normalized) scale of each axis in the group - for(j = 0; j < axisIDs.length; j++) { - axisID = axisIDs[j]; - axes[axisID] = ax = fullLayout[id2name(axisID)]; - - // set axis scale here so we can use _m rather than - // having to calculate it from length and range - ax.setScale(); - - // abs: inverted scales still satisfy the constraint - normScales[axisID] = normScale = Math.abs(ax._m) / group[axisID]; - minScale = Math.min(minScale, normScale); - if(ax._constraintShrinkable) { - // this has served its purpose, so remove it - delete ax._constraintShrinkable; - } - else { - matchScale = Math.min(matchScale, normScale); - } - maxScale = Math.max(maxScale, normScale); - } - - // Do we have a constraint mismatch? Give a small buffer for rounding errors - if(minScale > ALMOST_EQUAL * maxScale) continue; - - // now increase any ranges we need to until all normalized scales are equal - for(j = 0; j < axisIDs.length; j++) { - axisID = axisIDs[j]; - normScale = normScales[axisID]; - - if(normScale !== matchScale) { - scaleZoom(axes[axisID], normScale / matchScale); - } - } - } -}; - -},{"../../constants/numerical":666,"./axis_ids":727,"./scale_zoom":739}],732:[function(require,module,exports){ +},{}],725:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130942,14 +130220,9 @@ var Drawing = require('../../components/drawing'); var setCursor = require('../../lib/setcursor'); var dragElement = require('../../components/dragelement'); -var doTicks = require('./axes').doTicks; -var getFromId = require('./axis_ids').getFromId; +var Axes = require('./axes'); var prepSelect = require('./select'); -var scaleZoom = require('./scale_zoom'); - var constants = require('./constants'); -var MINDRAG = constants.MINDRAG; -var MINZOOM = constants.MINZOOM; // flag for showing "doubleclick to zoom out" only at the beginning @@ -130972,71 +130245,48 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // dragged stores whether a drag has occurred, so we don't have to // redraw unnecessarily, ie if no move bigger than MINDRAG or MINZOOM px var fullLayout = gd._fullLayout, - zoomlayer = gd._fullLayout._zoomlayer, - isMainDrag = (ns + ew === 'nsew'), - subplots, - xa, - ya, - xs, - ys, - pw, - ph, - xActive, - yActive, - cursor, - isSubplotConstrained, - xaLinked, - yaLinked; - - function recomputeAxisLists() { - xa = [plotinfo.xaxis]; - ya = [plotinfo.yaxis]; - var xa0 = xa[0]; - var ya0 = ya[0]; - pw = xa0._length; - ph = ya0._length; - - var constraintGroups = fullLayout._axisConstraintGroups; - var xIDs = [xa0._id]; - var yIDs = [ya0._id]; - // if we're dragging two axes at once, also drag overlays - subplots = [plotinfo].concat((ns && ew) ? plotinfo.overlays : []); - - for(var i = 1; i < subplots.length; i++) { - var subplotXa = subplots[i].xaxis, - subplotYa = subplots[i].yaxis; - - if(xa.indexOf(subplotXa) === -1) { - xa.push(subplotXa); - xIDs.push(subplotXa._id); - } - - if(ya.indexOf(subplotYa) === -1) { - ya.push(subplotYa); - yIDs.push(subplotYa._id); - } + subplots = [plotinfo].concat((ns && ew) ? plotinfo.overlays : []), + xa = [plotinfo.xaxis], + ya = [plotinfo.yaxis], + pw = xa[0]._length, + ph = ya[0]._length, + MINDRAG = constants.MINDRAG, + MINZOOM = constants.MINZOOM, + isMainDrag = (ns + ew === 'nsew'); + + for(var i = 1; i < subplots.length; i++) { + var subplotXa = subplots[i].xaxis, + subplotYa = subplots[i].yaxis; + if(xa.indexOf(subplotXa) === -1) xa.push(subplotXa); + if(ya.indexOf(subplotYa) === -1) ya.push(subplotYa); + } + + function isDirectionActive(axList, activeVal) { + for(var i = 0; i < axList.length; i++) { + if(!axList[i].fixedrange) return activeVal; } + return ''; + } - xActive = isDirectionActive(xa, ew); - yActive = isDirectionActive(ya, ns); - cursor = getDragCursor(yActive + xActive, fullLayout.dragmode); - xs = xa0._offset; - ys = ya0._offset; + var allaxes = xa.concat(ya), + xActive = isDirectionActive(xa, ew), + yActive = isDirectionActive(ya, ns), + cursor = getDragCursor(yActive + xActive, fullLayout.dragmode), + dragClass = ns + ew + 'drag'; - var links = calcLinks(constraintGroups, xIDs, yIDs); - isSubplotConstrained = links.xy; + var dragger3 = plotinfo.draglayer.selectAll('.' + dragClass).data([0]); - // finally make the list of axis objects to link - xaLinked = []; - for(var xLinkID in links.x) { xaLinked.push(getFromId(gd, xLinkID)); } - yaLinked = []; - for(var yLinkID in links.y) { yaLinked.push(getFromId(gd, yLinkID)); } - } + dragger3.enter().append('rect') + .classed('drag', true) + .classed(dragClass, true) + .style({fill: 'transparent', 'stroke-width': 0}) + .attr('data-subplot', plotinfo.id); - recomputeAxisLists(); + dragger3.call(Drawing.setRect, x, y, w, h) + .call(setCursor, cursor); - var dragger = makeDragger(plotinfo, ns + ew + 'drag', cursor, x, y, w, h); + var dragger = dragger3.node(); // still need to make the element if the axes are disabled // but nuke its events (except for maindrag which needs them for hover) @@ -131051,6 +130301,8 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { element: dragger, gd: gd, plotinfo: plotinfo, + xaxes: xa, + yaxes: ya, doubleclick: doubleClick, prepFn: function(e, startX, startY) { var dragModeNow = gd._fullLayout.dragmode; @@ -131072,22 +130324,14 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { if(dragModeNow === 'zoom') { dragOptions.moveFn = zoomMove; dragOptions.doneFn = zoomDone; - - // zoomMove takes care of the threshold, but we need to - // minimize this so that constrained zoom boxes will flip - // orientation at the right place - dragOptions.minDrag = 1; - zoomPrep(e, startX, startY); } else if(dragModeNow === 'pan') { dragOptions.moveFn = plotDrag; dragOptions.doneFn = dragDone; - clearSelect(zoomlayer); + clearSelect(); } else if(isSelectOrLasso(dragModeNow)) { - dragOptions.xaxes = xa; - dragOptions.yaxes = ya; prepSelect(e, startX, startY, dragOptions, dragModeNow); } } @@ -131095,7 +130339,10 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { dragElement.init(dragOptions); - var x0, + var zoomlayer = gd._fullLayout._zoomlayer, + xs = plotinfo.xaxis._offset, + ys = plotinfo.yaxis._offset, + x0, y0, box, lum, @@ -131105,6 +130352,28 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { zb, corners; + function recomputeAxisLists() { + xa = [plotinfo.xaxis]; + ya = [plotinfo.yaxis]; + pw = xa[0]._length; + ph = ya[0]._length; + + for(var i = 1; i < subplots.length; i++) { + var subplotXa = subplots[i].xaxis, + subplotYa = subplots[i].yaxis; + if(xa.indexOf(subplotXa) === -1) xa.push(subplotXa); + if(ya.indexOf(subplotYa) === -1) ya.push(subplotYa); + } + allaxes = xa.concat(ya); + xActive = isDirectionActive(xa, ew); + yActive = isDirectionActive(ya, ns); + cursor = getDragCursor(yActive + xActive, fullLayout.dragmode); + xs = plotinfo.xaxis._offset; + ys = plotinfo.yaxis._offset; + dragOptions.xa = xa; + dragOptions.ya = ya; + } + function zoomPrep(e, startX, startY) { var dragBBox = dragger.getBoundingClientRect(); x0 = startX - dragBBox.left; @@ -131117,11 +130386,34 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { dimmed = false; zoomMode = 'xy'; - zb = makeZoombox(zoomlayer, lum, xs, ys, path0); + zb = zoomlayer.append('path') + .attr('class', 'zoombox') + .style({ + 'fill': lum > 0.2 ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0)', + 'stroke-width': 0 + }) + .attr('transform', 'translate(' + xs + ', ' + ys + ')') + .attr('d', path0 + 'Z'); - corners = makeCorners(zoomlayer, xs, ys); + corners = zoomlayer.append('path') + .attr('class', 'zoombox-corners') + .style({ + fill: Color.background, + stroke: Color.defaultLine, + 'stroke-width': 1, + opacity: 0 + }) + .attr('transform', 'translate(' + xs + ', ' + ys + ')') + .attr('d', 'M0,0Z'); - clearSelect(zoomlayer); + clearSelect(); + } + + function clearSelect() { + // until we get around to persistent selections, remove the outline + // here. The selection itself will be removed when the plot redraws + // at the end. + zoomlayer.selectAll('.select-outline').remove(); } function zoomMove(dx0, dy0) { @@ -131132,67 +130424,93 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { var x1 = Math.max(0, Math.min(pw, dx0 + x0)), y1 = Math.max(0, Math.min(ph, dy0 + y0)), dx = Math.abs(x1 - x0), - dy = Math.abs(y1 - y0); + dy = Math.abs(y1 - y0), + clen = Math.floor(Math.min(dy, dx, MINZOOM) / 2); box.l = Math.min(x0, x1); box.r = Math.max(x0, x1); box.t = Math.min(y0, y1); box.b = Math.max(y0, y1); - function noZoom() { - zoomMode = ''; - box.r = box.l; - box.t = box.b; - corners.attr('d', 'M0,0Z'); - } - - if(isSubplotConstrained) { - if(dx > MINZOOM || dy > MINZOOM) { - zoomMode = 'xy'; - if(dx / pw > dy / ph) { - dy = dx * ph / pw; - if(y0 > y1) box.t = y0 - dy; - else box.b = y0 + dy; - } - else { - dx = dy * pw / ph; - if(x0 > x1) box.l = x0 - dx; - else box.r = x0 + dx; - } - corners.attr('d', xyCorners(box)); - } - else { - noZoom(); - } - } // look for small drags in one direction or the other, // and only drag the other axis - else if(!yActive || dy < Math.min(Math.max(dx * 0.6, MINDRAG), MINZOOM)) { + if(!yActive || dy < Math.min(Math.max(dx * 0.6, MINDRAG), MINZOOM)) { if(dx < MINDRAG) { - noZoom(); + zoomMode = ''; + box.r = box.l; + box.t = box.b; + corners.attr('d', 'M0,0Z'); } else { box.t = 0; box.b = ph; zoomMode = 'x'; - corners.attr('d', xCorners(box, y0)); + corners.attr('d', + 'M' + (box.l - 0.5) + ',' + (y0 - MINZOOM - 0.5) + + 'h-3v' + (2 * MINZOOM + 1) + 'h3ZM' + + (box.r + 0.5) + ',' + (y0 - MINZOOM - 0.5) + + 'h3v' + (2 * MINZOOM + 1) + 'h-3Z'); } } else if(!xActive || dx < Math.min(dy * 0.6, MINZOOM)) { box.l = 0; box.r = pw; zoomMode = 'y'; - corners.attr('d', yCorners(box, x0)); + corners.attr('d', + 'M' + (x0 - MINZOOM - 0.5) + ',' + (box.t - 0.5) + + 'v-3h' + (2 * MINZOOM + 1) + 'v3ZM' + + (x0 - MINZOOM - 0.5) + ',' + (box.b + 0.5) + + 'v3h' + (2 * MINZOOM + 1) + 'v-3Z'); } else { zoomMode = 'xy'; - corners.attr('d', xyCorners(box)); + corners.attr('d', + 'M' + (box.l - 3.5) + ',' + (box.t - 0.5 + clen) + 'h3v' + (-clen) + + 'h' + clen + 'v-3h-' + (clen + 3) + 'ZM' + + (box.r + 3.5) + ',' + (box.t - 0.5 + clen) + 'h-3v' + (-clen) + + 'h' + (-clen) + 'v-3h' + (clen + 3) + 'ZM' + + (box.r + 3.5) + ',' + (box.b + 0.5 - clen) + 'h-3v' + clen + + 'h' + (-clen) + 'v3h' + (clen + 3) + 'ZM' + + (box.l - 3.5) + ',' + (box.b + 0.5 - clen) + 'h3v' + clen + + 'h' + clen + 'v3h-' + (clen + 3) + 'Z'); } box.w = box.r - box.l; box.h = box.b - box.t; - updateZoombox(zb, corners, box, path0, dimmed, lum); - dimmed = true; + // Not sure about the addition of window.scrollX/Y... + // seems to work but doesn't seem robust. + zb.attr('d', + path0 + 'M' + (box.l) + ',' + (box.t) + 'v' + (box.h) + + 'h' + (box.w) + 'v-' + (box.h) + 'h-' + (box.w) + 'Z'); + if(!dimmed) { + zb.transition() + .style('fill', lum > 0.2 ? 'rgba(0,0,0,0.4)' : + 'rgba(255,255,255,0.3)') + .duration(200); + corners.transition() + .style('opacity', 1) + .duration(200); + dimmed = true; + } + } + + function zoomAxRanges(axList, r0Fraction, r1Fraction) { + var i, + axi, + axRangeLinear0, + axRangeLinearSpan; + + for(i = 0; i < axList.length; i++) { + axi = axList[i]; + if(axi.fixedrange) continue; + + axRangeLinear0 = axi._rl[0]; + axRangeLinearSpan = axi._rl[1] - axRangeLinear0; + axi.range = [ + axi.l2r(axRangeLinear0 + axRangeLinearSpan * r0Fraction), + axi.l2r(axRangeLinear0 + axRangeLinearSpan * r1Fraction) + ]; + } } function zoomDone(dragged, numClicks) { @@ -131202,9 +130520,8 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { return removeZoombox(gd); } - // TODO: edit linked axes in zoomAxRanges and in dragTail - if(zoomMode === 'xy' || zoomMode === 'x') zoomAxRanges(xa, box.l / pw, box.r / pw, xaLinked); - if(zoomMode === 'xy' || zoomMode === 'y') zoomAxRanges(ya, (ph - box.b) / ph, (ph - box.t) / ph, yaLinked); + if(zoomMode === 'xy' || zoomMode === 'x') zoomAxRanges(xa, box.l / pw, box.r / pw); + if(zoomMode === 'xy' || zoomMode === 'y') zoomAxRanges(ya, (ph - box.b) / ph, (ph - box.t) / ph); removeZoombox(gd); dragTail(zoomMode); @@ -131236,7 +130553,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { else if(ew === 'e') hAlign = 'right'; if(gd._context.showAxisRangeEntryBoxes) { - d3.select(dragger) + dragger3 .call(svgTextUtils.makeEditable, null, { immediate: true, background: fullLayout.paper_bgcolor, @@ -131300,7 +130617,9 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { gbb = mainplot.draglayer.select('.nsewdrag') .node().getBoundingClientRect(), xfrac = (e.clientX - gbb.left) / gbb.width, + vbx0 = scrollViewBox[0] + scrollViewBox[2] * xfrac, yfrac = (gbb.bottom - e.clientY) / gbb.height, + vby0 = scrollViewBox[1] + scrollViewBox[3] * (1 - yfrac), i; function zoomWheelOneAxis(ax, centerFraction, zoom) { @@ -131312,23 +130631,15 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { ax.range = axRange.map(doZoom); } - if(ew || isSubplotConstrained) { - // if we're only zooming this axis because of constraints, - // zoom it about the center - if(!ew) xfrac = 0.5; - + if(ew) { for(i = 0; i < xa.length; i++) zoomWheelOneAxis(xa[i], xfrac, zoom); - scrollViewBox[2] *= zoom; - scrollViewBox[0] += scrollViewBox[2] * xfrac * (1 / zoom - 1); + scrollViewBox[0] = vbx0 - scrollViewBox[2] * xfrac; } - if(ns || isSubplotConstrained) { - if(!ns) yfrac = 0.5; - + if(ns) { for(i = 0; i < ya.length; i++) zoomWheelOneAxis(ya[i], yfrac, zoom); - scrollViewBox[3] *= zoom; - scrollViewBox[1] += scrollViewBox[3] * (1 - yfrac) * (1 / zoom - 1); + scrollViewBox[1] = vby0 - scrollViewBox[3] * (1 - yfrac); } // viewbox redraw at first @@ -131339,12 +130650,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // no more scrolling is coming redrawTimer = setTimeout(function() { scrollViewBox = [0, 0, pw, ph]; - - var zoomMode; - if(isSubplotConstrained) zoomMode = 'xy'; - else zoomMode = (ew ? 'x' : '') + (ns ? 'y' : ''); - - dragTail(zoomMode); + dragTail(); }, REDRAWDELAY); return Lib.pauseEvent(e); @@ -131366,6 +130672,18 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { recomputeAxisLists(); + function dragAxList(axList, pix) { + for(var i = 0; i < axList.length; i++) { + var axi = axList[i]; + if(!axi.fixedrange) { + axi.range = [ + axi.l2r(axi._rl[0] - pix / axi._m), + axi.l2r(axi._rl[1] - pix / axi._m) + ]; + } + } + } + if(xActive === 'ew' || yActive === 'ns') { if(xActive) dragAxList(xa, dx); if(yActive) dragAxList(ya, dy); @@ -131374,6 +130692,16 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { return; } + // common transform for dragging one end of an axis + // d>0 is compressing scale (cursor is over the plot, + // the axis end should move with the cursor) + // d<0 is expanding (cursor is off the plot, axis end moves + // nonlinearly so you can expand far) + function dZoom(d) { + return 1 - ((d >= 0) ? Math.min(d, 0.9) : + 1 / (1 / Math.max(d, -0.3) + 3.222)); + } + // dz: set a new value for one end (0 or 1) of an axis array axArray, // and return a pixel shift for that end for the viewbox // based on pixel drag distance d @@ -131399,15 +130727,6 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { (movedAx._rl[end] - movedAx._rl[otherEnd]); } - if(isSubplotConstrained && xActive && yActive) { - // dragging a corner of a constrained subplot: - // respect the fixed corner, but harmonize dx and dy - var dxySign = ((xActive === 'w') === (yActive === 'n')) ? 1 : -1; - var dxyFraction = (dx / pw + dxySign * dy / ph) / 2; - dx = dxyFraction * pw; - dy = dxySign * dxyFraction * ph; - } - if(xActive === 'w') dx = dz(xa, 0, dx); else if(xActive === 'e') dx = dz(xa, 1, -dx); else if(!xActive) dx = 0; @@ -131416,32 +130735,12 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { else if(yActive === 's') dy = dz(ya, 0, -dy); else if(!yActive) dy = 0; - var x0 = (xActive === 'w') ? dx : 0; - var y0 = (yActive === 'n') ? dy : 0; - - if(isSubplotConstrained) { - var i; - if(!xActive && yActive.length === 1) { - // dragging one end of the y axis of a constrained subplot - // scale the other axis the same about its middle - for(i = 0; i < xa.length; i++) { - xa[i].range = xa[i]._r.slice(); - scaleZoom(xa[i], 1 - dy / ph); - } - dx = dy * pw / ph; - x0 = dx / 2; - } - if(!yActive && xActive.length === 1) { - for(i = 0; i < ya.length; i++) { - ya[i].range = ya[i]._r.slice(); - scaleZoom(ya[i], 1 - dx / pw); - } - dy = dx * ph / pw; - y0 = dy / 2; - } - } - - updateSubplots([x0, y0, pw - dx, ph - dy]); + updateSubplots([ + (xActive === 'w') ? dx : 0, + (yActive === 'n') ? dy : 0, + pw - dx, + ph - dy + ]); ticksAndAnnotations(yActive, xActive); } @@ -131455,28 +130754,20 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { } } - if(ew || isSubplotConstrained) { - pushActiveAxIds(xa); - pushActiveAxIds(xaLinked); - } - if(ns || isSubplotConstrained) { - pushActiveAxIds(ya); - pushActiveAxIds(yaLinked); - } + if(ew) pushActiveAxIds(xa); + if(ns) pushActiveAxIds(ya); for(i = 0; i < activeAxIds.length; i++) { - doTicks(gd, activeAxIds[i], true); + Axes.doTicks(gd, activeAxIds[i], true); } - function redrawObjs(objArray, method, shortCircuit) { + function redrawObjs(objArray, method) { for(i = 0; i < objArray.length; i++) { var obji = objArray[i]; if((ew && activeAxIds.indexOf(obji.xref) !== -1) || (ns && activeAxIds.indexOf(obji.yref) !== -1)) { method(gd, i); - // once is enough for images (which doesn't use the `i` arg anyway) - if(shortCircuit) return; } } } @@ -131486,7 +130777,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { redrawObjs(fullLayout.annotations || [], Registry.getComponentMethod('annotations', 'drawOne')); redrawObjs(fullLayout.shapes || [], Registry.getComponentMethod('shapes', 'drawOne')); - redrawObjs(fullLayout.images || [], Registry.getComponentMethod('images', 'draw'), true); + redrawObjs(fullLayout.images || [], Registry.getComponentMethod('images', 'draw')); } function doubleClick() { @@ -131498,56 +130789,39 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { var ax, i, rangeInitial; - // For reset+autosize mode: - // If *any* of the main axes is not at its initial range - // (or autoranged, if we have no initial range, to match the logic in - // doubleClickConfig === 'reset' below), we reset. - // If they are *all* at their initial ranges, then we autosize. - if(doubleClickConfig === 'reset+autosize') { - - doubleClickConfig = 'autosize'; - - for(i = 0; i < axList.length; i++) { - ax = axList[i]; - if((ax._rangeInitial && ( - ax.range[0] !== ax._rangeInitial[0] || - ax.range[1] !== ax._rangeInitial[1] - )) || - (!ax._rangeInitial && !ax.autorange) - ) { - doubleClickConfig = 'reset'; - break; - } - } - } - if(doubleClickConfig === 'autosize') { - // don't set the linked axes here, so relayout marks them as shrinkable - // and we autosize just to the requested axis/axes for(i = 0; i < axList.length; i++) { ax = axList[i]; if(!ax.fixedrange) attrs[ax._name + '.autorange'] = true; } } else if(doubleClickConfig === 'reset') { - // when we're resetting, reset all linked axes too, so we get back - // to the fully-auto-with-constraints situation - if(xActive || isSubplotConstrained) axList = axList.concat(xaLinked); - if(yActive && !isSubplotConstrained) axList = axList.concat(yaLinked); + for(i = 0; i < axList.length; i++) { + ax = axList[i]; - if(isSubplotConstrained) { - if(!xActive) axList = axList.concat(xa); - else if(!yActive) axList = axList.concat(ya); + if(!ax._rangeInitial) { + attrs[ax._name + '.autorange'] = true; + } + else { + rangeInitial = ax._rangeInitial.slice(); + attrs[ax._name + '.range[0]'] = rangeInitial[0]; + attrs[ax._name + '.range[1]'] = rangeInitial[1]; + } } - + } + else if(doubleClickConfig === 'reset+autosize') { for(i = 0; i < axList.length; i++) { ax = axList[i]; - if(!ax._rangeInitial) { + if(ax.fixedrange) continue; + if(ax._rangeInitial === undefined || + ax.range[0] === ax._rangeInitial[0] && + ax.range[1] === ax._rangeInitial[1] + ) { attrs[ax._name + '.autorange'] = true; } else { - rangeInitial = ax._rangeInitial; + rangeInitial = ax._rangeInitial.slice(); attrs[ax._name + '.range[0]'] = rangeInitial[0]; attrs[ax._name + '.range[1]'] = rangeInitial[1]; } @@ -131560,22 +130834,18 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // dragTail - finish a drag event with a redraw function dragTail(zoommode) { - if(zoommode === undefined) zoommode = (ew ? 'x' : '') + (ns ? 'y' : ''); - var attrs = {}; // revert to the previous axis settings, then apply the new ones // through relayout - this lets relayout manage undo/redo - var axesToModify; - if(zoommode === 'xy') axesToModify = xa.concat(ya); - else if(zoommode === 'x') axesToModify = xa; - else if(zoommode === 'y') axesToModify = ya; - - for(var i = 0; i < axesToModify.length; i++) { - var axi = axesToModify[i]; + for(var i = 0; i < allaxes.length; i++) { + var axi = allaxes[i]; + if(zoommode && zoommode.indexOf(axi._id.charAt(0)) === -1) { + continue; + } if(axi._r[0] !== axi.range[0]) attrs[axi._name + '.range[0]'] = axi.range[0]; if(axi._r[1] !== axi.range[1]) attrs[axi._name + '.range[1]'] = axi.range[1]; - axi.range = axi._input.range = axi._r.slice(); + axi.range = axi._r.slice(); } updateSubplots([0, 0, pw, ph]); @@ -131586,116 +130856,71 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // affected by this drag, and update them. look for all plots // sharing an affected axis (including the one being dragged) function updateSubplots(viewBox) { - var plotinfos = fullLayout._plots; - var subplots = Object.keys(plotinfos); - var xScaleFactor = viewBox[2] / xa[0]._length; - var yScaleFactor = viewBox[3] / ya[0]._length; - var editX = ew || isSubplotConstrained; - var editY = ns || isSubplotConstrained; - - var i, xScaleFactor2, yScaleFactor2, clipDx, clipDy; - - // Find the appropriate scaling for this axis, if it's linked to the - // dragged axes by constraints. 0 is special, it means this axis shouldn't - // ever be scaled (will be converted to 1 if the other axis is scaled) - function getLinkedScaleFactor(ax) { - if(ax.fixedrange) return 0; - - if(editX && xaLinked.indexOf(ax) !== -1) { - return xScaleFactor; - } - if(editY && (isSubplotConstrained ? xaLinked : yaLinked).indexOf(ax) !== -1) { - return yScaleFactor; - } - return 0; - } - - function scaleAndGetShift(ax, scaleFactor) { - if(scaleFactor) { - ax.range = ax._r.slice(); - scaleZoom(ax, scaleFactor); - return ax._length * (1 - scaleFactor) / 2; - } - return 0; - } + var j; + var plotinfos = fullLayout._plots, + subplots = Object.keys(plotinfos); - for(i = 0; i < subplots.length; i++) { + for(var i = 0; i < subplots.length; i++) { var subplot = plotinfos[subplots[i]], xa2 = subplot.xaxis, ya2 = subplot.yaxis, - editX2 = editX && !xa2.fixedrange && (xa.indexOf(xa2) !== -1), - editY2 = editY && !ya2.fixedrange && (ya.indexOf(ya2) !== -1); - - if(editX2) { - xScaleFactor2 = xScaleFactor; - clipDx = viewBox[0]; - } - else { - xScaleFactor2 = getLinkedScaleFactor(xa2); - clipDx = scaleAndGetShift(xa2, xScaleFactor2); + editX = ew && !xa2.fixedrange, + editY = ns && !ya2.fixedrange; + + if(editX) { + var isInX = false; + for(j = 0; j < xa.length; j++) { + if(xa[j]._id === xa2._id) { + isInX = true; + break; + } + } + editX = editX && isInX; } - if(editY2) { - yScaleFactor2 = yScaleFactor; - clipDy = viewBox[1]; - } - else { - yScaleFactor2 = getLinkedScaleFactor(ya2); - clipDy = scaleAndGetShift(ya2, yScaleFactor2); + if(editY) { + var isInY = false; + for(j = 0; j < ya.length; j++) { + if(ya[j]._id === ya2._id) { + isInY = true; + break; + } + } + editY = editY && isInY; } - // don't scale at all if neither axis is scalable here - if(!xScaleFactor2 && !yScaleFactor2) continue; + var xScaleFactor = editX ? xa2._length / viewBox[2] : 1, + yScaleFactor = editY ? ya2._length / viewBox[3] : 1; + + var clipDx = editX ? viewBox[0] : 0, + clipDy = editY ? viewBox[1] : 0; - // but if only one is, reset the other axis scaling - if(!xScaleFactor2) xScaleFactor2 = 1; - if(!yScaleFactor2) yScaleFactor2 = 1; + var fracDx = editX ? (viewBox[0] / viewBox[2] * xa2._length) : 0, + fracDy = editY ? (viewBox[1] / viewBox[3] * ya2._length) : 0; - var plotDx = xa2._offset - clipDx / xScaleFactor2, - plotDy = ya2._offset - clipDy / yScaleFactor2; + var plotDx = xa2._offset - fracDx, + plotDy = ya2._offset - fracDy; fullLayout._defs.selectAll('#' + subplot.clipId) .call(Drawing.setTranslate, clipDx, clipDy) - .call(Drawing.setScale, xScaleFactor2, yScaleFactor2); + .call(Drawing.setScale, 1 / xScaleFactor, 1 / yScaleFactor); subplot.plot .call(Drawing.setTranslate, plotDx, plotDy) - .call(Drawing.setScale, 1 / xScaleFactor2, 1 / yScaleFactor2) + .call(Drawing.setScale, xScaleFactor, yScaleFactor) // This is specifically directed at scatter traces, applying an inverse // scale to individual points to counteract the scale of the trace // as a whole: .select('.scatterlayer').selectAll('.points').selectAll('.point') - .call(Drawing.setPointGroupScale, xScaleFactor2, yScaleFactor2); + .call(Drawing.setPointGroupScale, 1 / xScaleFactor, 1 / yScaleFactor); } } return dragger; }; -function makeDragger(plotinfo, dragClass, cursor, x, y, w, h) { - var dragger3 = plotinfo.draglayer.selectAll('.' + dragClass).data([0]); - - dragger3.enter().append('rect') - .classed('drag', true) - .classed(dragClass, true) - .style({fill: 'transparent', 'stroke-width': 0}) - .attr('data-subplot', plotinfo.id); - - dragger3.call(Drawing.setRect, x, y, w, h) - .call(setCursor, cursor); - - return dragger3.node(); -} - -function isDirectionActive(axList, activeVal) { - for(var i = 0; i < axList.length; i++) { - if(!axList[i].fixedrange) return activeVal; - } - return ''; -} - function getEndText(ax, end) { var initialVal = ax.range[end], diff = Math.abs(initialVal - ax.range[1 - end]), @@ -131717,54 +130942,6 @@ function getEndText(ax, end) { } } -function zoomAxRanges(axList, r0Fraction, r1Fraction, linkedAxes) { - var i, - axi, - axRangeLinear0, - axRangeLinearSpan; - - for(i = 0; i < axList.length; i++) { - axi = axList[i]; - if(axi.fixedrange) continue; - - axRangeLinear0 = axi._rl[0]; - axRangeLinearSpan = axi._rl[1] - axRangeLinear0; - axi.range = [ - axi.l2r(axRangeLinear0 + axRangeLinearSpan * r0Fraction), - axi.l2r(axRangeLinear0 + axRangeLinearSpan * r1Fraction) - ]; - } - - // zoom linked axes about their centers - if(linkedAxes && linkedAxes.length) { - var linkedR0Fraction = (r0Fraction + (1 - r1Fraction)) / 2; - - zoomAxRanges(linkedAxes, linkedR0Fraction, 1 - linkedR0Fraction); - } -} - -function dragAxList(axList, pix) { - for(var i = 0; i < axList.length; i++) { - var axi = axList[i]; - if(!axi.fixedrange) { - axi.range = [ - axi.l2r(axi._rl[0] - pix / axi._m), - axi.l2r(axi._rl[1] - pix / axi._m) - ]; - } - } -} - -// common transform for dragging one end of an axis -// d>0 is compressing scale (cursor is over the plot, -// the axis end should move with the cursor) -// d<0 is expanding (cursor is off the plot, axis end moves -// nonlinearly so you can expand far) -function dZoom(d) { - return 1 - ((d >= 0) ? Math.min(d, 0.9) : - 1 / (1 / Math.max(d, -0.3) + 3.222)); -} - function getDragCursor(nsew, dragmode) { if(!nsew) return 'pointer'; if(nsew === 'nsew') { @@ -131774,52 +130951,6 @@ function getDragCursor(nsew, dragmode) { return nsew.toLowerCase() + '-resize'; } -function makeZoombox(zoomlayer, lum, xs, ys, path0) { - return zoomlayer.append('path') - .attr('class', 'zoombox') - .style({ - 'fill': lum > 0.2 ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0)', - 'stroke-width': 0 - }) - .attr('transform', 'translate(' + xs + ', ' + ys + ')') - .attr('d', path0 + 'Z'); -} - -function makeCorners(zoomlayer, xs, ys) { - return zoomlayer.append('path') - .attr('class', 'zoombox-corners') - .style({ - fill: Color.background, - stroke: Color.defaultLine, - 'stroke-width': 1, - opacity: 0 - }) - .attr('transform', 'translate(' + xs + ', ' + ys + ')') - .attr('d', 'M0,0Z'); -} - -function clearSelect(zoomlayer) { - // until we get around to persistent selections, remove the outline - // here. The selection itself will be removed when the plot redraws - // at the end. - zoomlayer.selectAll('.select-outline').remove(); -} - -function updateZoombox(zb, corners, box, path0, dimmed, lum) { - zb.attr('d', - path0 + 'M' + (box.l) + ',' + (box.t) + 'v' + (box.h) + - 'h' + (box.w) + 'v-' + (box.h) + 'h-' + (box.w) + 'Z'); - if(!dimmed) { - zb.transition() - .style('fill', lum > 0.2 ? 'rgba(0,0,0,0.4)' : - 'rgba(255,255,255,0.3)') - .duration(200); - corners.transition() - .style('opacity', 1) - .duration(200); - } -} - function removeZoombox(gd) { d3.select(gd) .selectAll('.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners') @@ -131832,91 +130963,7 @@ function isSelectOrLasso(dragmode) { return modes.indexOf(dragmode) !== -1; } -function xCorners(box, y0) { - return 'M' + - (box.l - 0.5) + ',' + (y0 - MINZOOM - 0.5) + - 'h-3v' + (2 * MINZOOM + 1) + 'h3ZM' + - (box.r + 0.5) + ',' + (y0 - MINZOOM - 0.5) + - 'h3v' + (2 * MINZOOM + 1) + 'h-3Z'; -} - -function yCorners(box, x0) { - return 'M' + - (x0 - MINZOOM - 0.5) + ',' + (box.t - 0.5) + - 'v-3h' + (2 * MINZOOM + 1) + 'v3ZM' + - (x0 - MINZOOM - 0.5) + ',' + (box.b + 0.5) + - 'v3h' + (2 * MINZOOM + 1) + 'v-3Z'; -} - -function xyCorners(box) { - var clen = Math.floor(Math.min(box.b - box.t, box.r - box.l, MINZOOM) / 2); - return 'M' + - (box.l - 3.5) + ',' + (box.t - 0.5 + clen) + 'h3v' + (-clen) + - 'h' + clen + 'v-3h-' + (clen + 3) + 'ZM' + - (box.r + 3.5) + ',' + (box.t - 0.5 + clen) + 'h-3v' + (-clen) + - 'h' + (-clen) + 'v-3h' + (clen + 3) + 'ZM' + - (box.r + 3.5) + ',' + (box.b + 0.5 - clen) + 'h-3v' + clen + - 'h' + (-clen) + 'v3h' + (clen + 3) + 'ZM' + - (box.l - 3.5) + ',' + (box.b + 0.5 - clen) + 'h3v' + clen + - 'h' + clen + 'v3h-' + (clen + 3) + 'Z'; -} - -function calcLinks(constraintGroups, xIDs, yIDs) { - var isSubplotConstrained = false; - var xLinks = {}; - var yLinks = {}; - var i, j, k; - - var group, xLinkID, yLinkID; - for(i = 0; i < constraintGroups.length; i++) { - group = constraintGroups[i]; - // check if any of the x axes we're dragging is in this constraint group - for(j = 0; j < xIDs.length; j++) { - if(group[xIDs[j]]) { - // put the rest of these axes into xLinks, if we're not already - // dragging them, so we know to scale these axes automatically too - // to match the changes in the dragged x axes - for(xLinkID in group) { - if((xLinkID.charAt(0) === 'x' ? xIDs : yIDs).indexOf(xLinkID) === -1) { - xLinks[xLinkID] = 1; - } - } - - // check if the x and y axes of THIS drag are linked - for(k = 0; k < yIDs.length; k++) { - if(group[yIDs[k]]) isSubplotConstrained = true; - } - } - } - - // now check if any of the y axes we're dragging is in this constraint group - // only look for outside links, as we've already checked for links within the dragger - for(j = 0; j < yIDs.length; j++) { - if(group[yIDs[j]]) { - for(yLinkID in group) { - if((yLinkID.charAt(0) === 'x' ? xIDs : yIDs).indexOf(yLinkID) === -1) { - yLinks[yLinkID] = 1; - } - } - } - } - } - - if(isSubplotConstrained) { - // merge xLinks and yLinks if the subplot is constrained, - // since we'll always apply both anyway and the two will contain - // duplicates - Lib.extendFlat(xLinks, yLinks); - yLinks = {}; - } - return { - x: xLinks, - y: yLinks, - xy: isSubplotConstrained - }; -} - -},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../lib":685,"../../lib/setcursor":700,"../../lib/svg_text_utils":704,"../../plotly":719,"../../registry":802,"./axes":724,"./axis_ids":727,"./constants":729,"./scale_zoom":739,"./select":740,"d3":107,"tinycolor2":514}],733:[function(require,module,exports){ +},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../lib":680,"../../lib/setcursor":695,"../../lib/svg_text_utils":699,"../../plotly":714,"../../registry":793,"./axes":719,"./constants":724,"./select":732,"d3":104,"tinycolor2":511}],726:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -131929,8 +130976,8 @@ function calcLinks(constraintGroups, xIDs, yIDs) { 'use strict'; var d3 = require('d3'); -var isNumeric = require('fast-isnumeric'); var tinycolor = require('tinycolor2'); +var isNumeric = require('fast-isnumeric'); var Lib = require('../../lib'); var Events = require('../../lib/events'); @@ -132165,7 +131212,9 @@ function quadrature(dx, dy) { // size and display constants for hover text var HOVERARROWSIZE = constants.HOVERARROWSIZE, - HOVERTEXTPAD = constants.HOVERTEXTPAD; + HOVERTEXTPAD = constants.HOVERTEXTPAD, + HOVERFONTSIZE = constants.HOVERFONTSIZE, + HOVERFONT = constants.HOVERFONT; // fx.hover: highlight data on hover // evt can be a mousemove event, or an object with data about what points @@ -132222,7 +131271,6 @@ fx.hover = function(gd, evt, subplot) { function hover(gd, evt, subplot) { if(subplot === 'pie') { gd.emit('plotly_hover', { - event: evt.originalEvent, points: [evt] }); return; @@ -132331,17 +131379,12 @@ function hover(gd, evt, subplot) { // [x|y]px: the pixels (from top left) of the mouse location // on the currently selected plot area - var hasUserCalledHover = !evt.target, - xpx, ypx; + var xpx, ypx; - if(hasUserCalledHover) { - if('xpx' in evt) xpx = evt.xpx; - else xpx = xaArray[0]._length / 2; + // mouse event? ie is there a target element with + // clientX and clientY values? + if(evt.target && ('clientX' in evt) && ('clientY' in evt)) { - if('ypx' in evt) ypx = evt.ypx; - else ypx = yaArray[0]._length / 2; - } - else { // fire the beforehover event and quit if it returns false // note that we're only calling this on real mouse events, so // manual calls to fx.hover will always run. @@ -132360,6 +131403,13 @@ function hover(gd, evt, subplot) { return dragElement.unhoverRaw(gd, evt); } } + else { + if('xpx' in evt) xpx = evt.xpx; + else xpx = xaArray[0]._length / 2; + + if('ypx' in evt) ypx = evt.ypx; + else ypx = yaArray[0]._length / 2; + } if('xval' in evt) xvalArray = flat(subplots, evt.xval); else xvalArray = p2c(xaArray, xpx); @@ -132387,11 +131437,6 @@ function hover(gd, evt, subplot) { if(!cd || !cd[0] || !cd[0].trace || cd[0].trace.visible !== true) continue; trace = cd[0].trace; - - // Explicitly bail out for these two. I don't know how to otherwise prevent - // the rest of this function from running and failing - if(['carpet', 'contourcarpet'].indexOf(trace._module.name) !== -1) continue; - subplotId = getSubplot(trace); subploti = subplots.indexOf(subplotId); @@ -132480,8 +131525,30 @@ function hover(gd, evt, subplot) { // nothing left: remove all labels and quit if(hoverData.length === 0) return dragElement.unhoverRaw(gd, evt); + // if there's more than one horz bar trace, + // rotate the labels so they don't overlap + var rotateLabels = hovermode === 'y' && searchData.length > 1; + hoverData.sort(function(d1, d2) { return d1.distance - d2.distance; }); + var bgColor = Color.combine( + fullLayout.plot_bgcolor || Color.background, + fullLayout.paper_bgcolor + ); + + var labelOpts = { + hovermode: hovermode, + rotateLabels: rotateLabels, + bgColor: bgColor, + container: fullLayout._hoverlayer, + outerContainer: fullLayout._paperdiv + }; + var hoverLabels = createHoverText(hoverData, labelOpts); + + hoverAvoidOverlaps(hoverData, rotateLabels ? 'xa' : 'ya'); + + alignHoverText(hoverLabels, rotateLabels); + // lastly, emit custom hover/unhover events var oldhoverdata = gd._hoverdata, newhoverdata = []; @@ -132513,39 +131580,6 @@ function hover(gd, evt, subplot) { gd._hoverdata = newhoverdata; - if(hoverChanged(gd, evt, oldhoverdata) && fullLayout._hasCartesian) { - var spikelineOpts = { - hovermode: hovermode, - fullLayout: fullLayout, - container: fullLayout._hoverlayer, - outerContainer: fullLayout._paperdiv - }; - createSpikelines(hoverData, spikelineOpts); - } - - // if there's more than one horz bar trace, - // rotate the labels so they don't overlap - var rotateLabels = hovermode === 'y' && searchData.length > 1; - - var bgColor = Color.combine( - fullLayout.plot_bgcolor || Color.background, - fullLayout.paper_bgcolor - ); - - var labelOpts = { - hovermode: hovermode, - rotateLabels: rotateLabels, - bgColor: bgColor, - container: fullLayout._hoverlayer, - outerContainer: fullLayout._paperdiv - }; - - var hoverLabels = createHoverText(hoverData, labelOpts); - - hoverAvoidOverlaps(hoverData, rotateLabels ? 'xa' : 'ya'); - - alignHoverText(hoverLabels, rotateLabels); - // TODO: tagName hack is needed to appease geo.js's hack of using evt.target=true // we should improve the "fx" API so other plots can use it without these hack. if(evt.target && evt.target.tagName) { @@ -132553,18 +131587,13 @@ function hover(gd, evt, subplot) { overrideCursor(d3.select(evt.target), hasClickToShow ? 'pointer' : ''); } - // don't emit events if called manually - if(!evt.target || !hoverChanged(gd, evt, oldhoverdata)) return; + if(!hoverChanged(gd, evt, oldhoverdata)) return; if(oldhoverdata) { - gd.emit('plotly_unhover', { - event: evt, - points: oldhoverdata - }); + gd.emit('plotly_unhover', { points: oldhoverdata }); } gd.emit('plotly_hover', { - event: evt, points: gd._hoverdata, xaxes: xaArray, yaxes: yaArray, @@ -132689,36 +131718,23 @@ function cleanPoint(d, hovermode) { return d; } -/* - * Draw a single hover item in a pre-existing svg container somewhere - * hoverItem should have keys: - * - x and y (or x0, x1, y0, and y1): - * the pixel position to mark, relative to opts.container - * - xLabel, yLabel, zLabel, text, and name: - * info to go in the label - * - color: - * the background color for the label. - * - idealAlign (optional): - * 'left' or 'right' for which side of the x/y box to try to put this on first - * - borderColor (optional): - * color for the border, defaults to strongest contrast with color - * - fontFamily (optional): - * string, the font for this label, defaults to constants.HOVERFONT - * - fontSize (optional): - * the label font size, defaults to constants.HOVERFONTSIZE - * - fontColor (optional): - * defaults to borderColor - * opts should have keys: - * - bgColor: - * the background color this is against, used if the trace is - * non-opaque, and for the name, which goes outside the box - * - container: - * a or element to add the hover label to - * - outerContainer: - * normally a parent of `container`, sets the bounding box to use to - * constrain the hover label and determine whether to show it on the left or right - */ fx.loneHover = function(hoverItem, opts) { + // draw a single hover item in a pre-existing svg container somewhere + // hoverItem should have keys: + // - x and y (or x0, x1, y0, and y1): + // the pixel position to mark, relative to opts.container + // - xLabel, yLabel, zLabel, text, and name: + // info to go in the label + // - color: + // the background color for the label. text & outline color will + // be chosen black or white to contrast with this + // opts should have keys: + // - bgColor: + // the background color this is against, used if the trace is + // non-opaque, and for the name, which goes outside the box + // - container: + // a dom element - must be big enough to contain the whole + // hover label var pointData = { color: hoverItem.color || Color.defaultLine, x0: hoverItem.x0 || hoverItem.x || 0, @@ -132732,12 +131748,6 @@ fx.loneHover = function(hoverItem, opts) { name: hoverItem.name, idealAlign: hoverItem.idealAlign, - // optional extra bits of styling - borderColor: hoverItem.borderColor, - fontFamily: hoverItem.fontFamily, - fontSize: hoverItem.fontSize, - fontColor: hoverItem.fontColor, - // filler to make createHoverText happy trace: { index: 0, @@ -132774,142 +131784,8 @@ fx.loneUnhover = function(containerOrSelection) { d3.select(containerOrSelection); selection.selectAll('g.hovertext').remove(); - selection.selectAll('.spikeline').remove(); }; -function createSpikelines(hoverData, opts) { - var hovermode = opts.hovermode; - var container = opts.container; - var c0 = hoverData[0]; - var xa = c0.xa; - var ya = c0.ya; - var showX = xa.showspikes; - var showY = ya.showspikes; - - // Remove old spikeline items - container.selectAll('.spikeline').remove(); - - if(hovermode !== 'closest' || !(showX || showY)) return; - - var fullLayout = opts.fullLayout; - var xPoint = xa._offset + (c0.x0 + c0.x1) / 2; - var yPoint = ya._offset + (c0.y0 + c0.y1) / 2; - var contrastColor = Color.combine(fullLayout.plot_bgcolor, fullLayout.paper_bgcolor); - var dfltDashColor = tinycolor.readability(c0.color, contrastColor) < 1.5 ? - Color.contrast(contrastColor) : c0.color; - - if(showY) { - var yMode = ya.spikemode; - var yThickness = ya.spikethickness; - var yColor = ya.spikecolor || dfltDashColor; - var yBB = ya._boundingBox; - var xEdge = ((yBB.left + yBB.right) / 2) < xPoint ? yBB.right : yBB.left; - - if(yMode.indexOf('toaxis') !== -1 || yMode.indexOf('across') !== -1) { - var xBase = xEdge; - var xEndSpike = xPoint; - if(yMode.indexOf('across') !== -1) { - xBase = ya._counterSpan[0]; - xEndSpike = ya._counterSpan[1]; - } - - // Background horizontal Line (to y-axis) - container.append('line') - .attr({ - 'x1': xBase, - 'x2': xEndSpike, - 'y1': yPoint, - 'y2': yPoint, - 'stroke-width': yThickness + 2, - 'stroke': contrastColor - }) - .classed('spikeline', true) - .classed('crisp', true); - - // Foreground horizontal line (to y-axis) - container.append('line') - .attr({ - 'x1': xBase, - 'x2': xEndSpike, - 'y1': yPoint, - 'y2': yPoint, - 'stroke-width': yThickness, - 'stroke': yColor, - 'stroke-dasharray': Drawing.dashStyle(ya.spikedash, yThickness) - }) - .classed('spikeline', true) - .classed('crisp', true); - } - // Y axis marker - if(yMode.indexOf('marker') !== -1) { - container.append('circle') - .attr({ - 'cx': xEdge + (ya.side !== 'right' ? yThickness : -yThickness), - 'cy': yPoint, - 'r': yThickness, - 'fill': yColor - }) - .classed('spikeline', true); - } - } - - if(showX) { - var xMode = xa.spikemode; - var xThickness = xa.spikethickness; - var xColor = xa.spikecolor || dfltDashColor; - var xBB = xa._boundingBox; - var yEdge = ((xBB.top + xBB.bottom) / 2) < yPoint ? xBB.bottom : xBB.top; - - if(xMode.indexOf('toaxis') !== -1 || xMode.indexOf('across') !== -1) { - var yBase = yEdge; - var yEndSpike = yPoint; - if(xMode.indexOf('across') !== -1) { - yBase = xa._counterSpan[0]; - yEndSpike = xa._counterSpan[1]; - } - - // Background vertical line (to x-axis) - container.append('line') - .attr({ - 'x1': xPoint, - 'x2': xPoint, - 'y1': yBase, - 'y2': yEndSpike, - 'stroke-width': xThickness + 2, - 'stroke': contrastColor - }) - .classed('spikeline', true) - .classed('crisp', true); - - // Foreground vertical line (to x-axis) - container.append('line') - .attr({ - 'x1': xPoint, - 'x2': xPoint, - 'y1': yBase, - 'y2': yEndSpike, - 'stroke-width': xThickness, - 'stroke': xColor, - 'stroke-dasharray': Drawing.dashStyle(xa.spikedash, xThickness) - }) - .classed('spikeline', true) - .classed('crisp', true); - } - - // X axis marker - if(xMode.indexOf('marker') !== -1) { - container.append('circle') - .attr({ - 'cx': xPoint, - 'cy': yEdge - (xa.side !== 'top' ? xThickness : -xThickness), - 'r': xThickness, - 'fill': xColor - }) - .classed('spikeline', true); - } - } -} - function createHoverText(hoverData, opts) { var hovermode = opts.hovermode, rotateLabels = opts.rotateLabels, @@ -132917,12 +131793,6 @@ function createHoverText(hoverData, opts) { container = opts.container, outerContainer = opts.outerContainer, - // opts.fontFamily/Size are used for the common label - // and as defaults for each hover label, though the individual labels - // can override this. - fontFamily = opts.fontFamily || constants.HOVERFONT, - fontSize = opts.fontSize || constants.HOVERFONTSIZE, - c0 = hoverData[0], xa = c0.xa, ya = c0.ya, @@ -132967,7 +131837,7 @@ function createHoverText(hoverData, opts) { lpath.enter().append('path') .style({fill: Color.defaultLine, 'stroke-width': '1px', stroke: Color.background}); ltext.enter().append('text') - .call(Drawing.font, fontFamily, fontSize, Color.background) + .call(Drawing.font, HOVERFONT, HOVERFONTSIZE, Color.background) // prohibit tex interpretation until we can handle // tex and regular text together .attr('data-notex', 1); @@ -133048,12 +131918,13 @@ function createHoverText(hoverData, opts) { // trace name label (rect and text.name) g.append('rect') .call(Color.fill, Color.addOpacity(bgColor, 0.8)); - g.append('text').classed('name', true); + g.append('text').classed('name', true) + .call(Drawing.font, HOVERFONT, HOVERFONTSIZE); // trace data label (path and text.nums) g.append('path') .style('stroke-width', '1px'); g.append('text').classed('nums', true) - .call(Drawing.font, fontFamily, fontSize); + .call(Drawing.font, HOVERFONT, HOVERFONTSIZE); }); hoverLabels.exit().remove(); @@ -133069,7 +131940,8 @@ function createHoverText(hoverData, opts) { traceColor = Color.combine(baseColor, bgColor), // find a contrasting color for border and text - contrastColor = d.borderColor || Color.contrast(traceColor); + contrastColor = tinycolor(traceColor).getBrightness() > 128 ? + '#000' : Color.background; // to get custom 'name' labels pass cleanPoint if(d.nameOverride !== undefined) d.name = d.nameOverride; @@ -133114,10 +131986,7 @@ function createHoverText(hoverData, opts) { // main label var tx = g.select('text.nums') - .call(Drawing.font, - d.fontFamily || fontFamily, - d.fontSize || fontSize, - d.fontColor || contrastColor) + .style('fill', contrastColor) .call(Drawing.setPosition, 0, 0) .text(text) .attr('data-notex', 1) @@ -133130,10 +131999,7 @@ function createHoverText(hoverData, opts) { // secondary label for non-empty 'name' if(name && name !== text) { - tx2.call(Drawing.font, - d.fontFamily || fontFamily, - d.fontSize || fontSize, - traceColor) + tx2.style('fill', traceColor) .text(name) .call(Drawing.setPosition, 0, 0) .attr('data-notex', 1) @@ -133430,7 +132296,9 @@ function alignHoverText(hoverLabels, rotateLabels) { } function hoverChanged(gd, evt, oldhoverdata) { - // don't emit any events if nothing changed + // don't emit any events if nothing changed or + // if fx.hover was called manually + if(!evt.target) return false; if(!oldhoverdata || oldhoverdata.length !== gd._hoverdata.length) return true; for(var i = oldhoverdata.length - 1; i >= 0; i--) { @@ -133448,7 +132316,7 @@ function hoverChanged(gd, evt, oldhoverdata) { fx.click = function(gd, evt) { var annotationsDone = Registry.getComponentMethod('annotations', 'onClick')(gd, gd._hoverdata); - function emitClick() { gd.emit('plotly_click', {points: gd._hoverdata, event: evt}); } + function emitClick() { gd.emit('plotly_click', {points: gd._hoverdata}); } if(gd._hoverdata && evt && evt.target) { if(annotationsDone && annotationsDone.then) { @@ -133477,7 +132345,7 @@ fx.inbox = function(v0, v1) { return Infinity; }; -},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../lib":685,"../../lib/events":676,"../../lib/override_cursor":694,"../../lib/svg_text_utils":704,"../../registry":802,"../layout_attributes":778,"./axes":724,"./constants":729,"./dragbox":732,"d3":107,"fast-isnumeric":116,"tinycolor2":514}],734:[function(require,module,exports){ +},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../lib":680,"../../lib/events":671,"../../lib/override_cursor":689,"../../lib/svg_text_utils":699,"../../registry":793,"../layout_attributes":769,"./axes":719,"./constants":724,"./dragbox":725,"d3":104,"fast-isnumeric":113,"tinycolor2":511}],727:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133543,11 +132411,8 @@ exports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) { // Skip trace if whitelist provided and it's not whitelisted: // if (Array.isArray(traces) && traces.indexOf(i) === -1) continue; if(trace.xaxis + trace.yaxis === subplot) { - // XXX: Should trace carpet dependencies. Only replot all carpet plots if the carpet - // axis has actually changed: - // // If this trace is specifically requested, add it to the list: - if(traces.indexOf(trace.index) !== -1 || trace.carpet) { + if(traces.indexOf(trace.index) !== -1) { // Okay, so example: traces 0, 1, and 2 have fill = tonext. You animate // traces 0 and 2. Trace 1 also needs to be updated, otherwise its fill // is outdated. So this retroactively adds the previous trace if the @@ -133783,7 +132648,6 @@ function makeSubplotLayer(plotinfo) { joinLayer(parent, 'g', 'imagelayer'); joinLayer(parent, 'g', 'maplayer'); joinLayer(parent, 'g', 'barlayer'); - joinLayer(parent, 'g', 'carpetlayer'); joinLayer(parent, 'g', 'boxlayer'); joinLayer(parent, 'g', 'scatterlayer'); } @@ -133866,7 +132730,7 @@ function joinLayer(parent, nodeType, className) { return layer; } -},{"../../lib":685,"../plots":787,"./attributes":723,"./axis_ids":727,"./constants":729,"./layout_attributes":735,"./transition_axes":745,"d3":107}],735:[function(require,module,exports){ +},{"../../lib":680,"../plots":778,"./attributes":718,"./axis_ids":722,"./constants":724,"./layout_attributes":728,"./transition_axes":737,"d3":104}],728:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133879,22 +132743,12 @@ function joinLayer(parent, nodeType, className) { var fontAttrs = require('../font_attributes'); var colorAttrs = require('../../components/color/attributes'); -var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; var constants = require('./constants'); module.exports = { - visible: { - valType: 'boolean', - role: 'info', - description: [ - 'A single toggle to hide the axis while preserving interaction like dragging.', - 'Default is true when a cheater plot is present on the axis, otherwise', - 'false' - ].join(' ') - }, color: { valType: 'color', dflt: colorAttrs.defaultLine, @@ -133977,6 +132831,7 @@ module.exports = { 'number from zero in the order it appears.' ].join(' ') }, + fixedrange: { valType: 'boolean', dflt: false, @@ -133986,42 +132841,6 @@ module.exports = { 'If true, then zoom is disabled.' ].join(' ') }, - // scaleanchor: not used directly, just put here for reference - // values are any opposite-letter axis id - scaleanchor: { - valType: 'enumerated', - values: [ - constants.idRegex.x.toString(), - constants.idRegex.y.toString() - ], - role: 'info', - description: [ - 'If set to an opposite-letter axis id (e.g. `x2`, `y`), the range of this axis', - 'changes together with the range of the corresponding opposite-letter axis.', - 'such that the scale of pixels per unit is in a constant ratio.', - 'Both axes are still zoomable, but when you zoom one, the other will', - 'zoom the same amount, keeping a fixed midpoint.', - 'Autorange will also expand about the midpoints to satisfy the constraint.', - 'You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`', - 'but you can only link axes of the same `type`.', - 'Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant', - 'and the last constraint encountered will be ignored to avoid possible', - 'inconsistent constraints via `scaleratio`.' - ].join(' ') - }, - scaleratio: { - valType: 'number', - min: 0, - dflt: 1, - role: 'info', - description: [ - 'If this axis is linked to another by `scaleanchor`, this determines the pixel', - 'to unit scale ratio. For example, if this value is 10, then every unit on', - 'this axis spans 10 times the number of pixels as a unit on the linked axis.', - 'Use this for example to create an elevation profile where the vertical scale', - 'is exaggerated a fixed amount with respect to the horizontal.' - ].join(' ') - }, // ticks tickmode: { valType: 'enumerated', @@ -134158,45 +132977,6 @@ module.exports = { role: 'style', description: 'Determines whether or not the tick labels are drawn.' }, - showspikes: { - valType: 'boolean', - dflt: false, - role: 'style', - description: [ - 'Determines whether or not spikes (aka droplines) are drawn for this axis.', - 'Note: This only takes affect when hovermode = closest' - ].join(' ') - }, - spikecolor: { - valType: 'color', - dflt: null, - role: 'style', - description: 'Sets the spike color. If undefined, will use the series color' - }, - spikethickness: { - valType: 'number', - dflt: 3, - role: 'style', - description: 'Sets the width (in px) of the zero line.' - }, - spikedash: extendFlat({}, dash, {dflt: 'dash'}), - spikemode: { - valType: 'flaglist', - flags: ['toaxis', 'across', 'marker'], - role: 'style', - dflt: 'toaxis', - description: [ - 'Determines the drawing mode for the spike line', - 'If *toaxis*, the line is drawn from the data point to the axis the ', - 'series is plotted on.', - - 'If *across*, the line is drawn across the entire plot area, and', - 'supercedes *toaxis*.', - - 'If *marker*, then a marker dot is drawn on the axis the series is', - 'plotted on' - ].join(' ') - }, tickfont: extendFlat({}, fontAttrs, { description: 'Sets the tick font.' }), @@ -134383,7 +133163,7 @@ module.exports = { ], role: 'info', description: [ - 'If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to', + 'If set to an opposite-letter axis id (e.g. `xaxis2`, `yaxis`), this axis is bound to', 'the corresponding opposite-letter axis.', 'If set to *free*, this axis\' position is determined by `position`.' ].join(' ') @@ -134484,7 +133264,7 @@ module.exports = { } }; -},{"../../components/color/attributes":577,"../../components/drawing/attributes":601,"../../lib/extend":677,"../font_attributes":748,"./constants":729}],736:[function(require,module,exports){ +},{"../../components/color/attributes":574,"../../lib/extend":672,"../font_attributes":739,"./constants":724}],729:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134503,9 +133283,7 @@ var basePlotLayoutAttributes = require('../layout_attributes'); var constants = require('./constants'); var layoutAttributes = require('./layout_attributes'); -var handleTypeDefaults = require('./type_defaults'); var handleAxisDefaults = require('./axis_defaults'); -var handleConstraintDefaults = require('./constraint_defaults'); var handlePositionDefaults = require('./position_defaults'); var axisIds = require('./axis_ids'); @@ -134516,8 +133294,6 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { yaListCartesian = [], xaListGl2d = [], yaListGl2d = [], - xaListCheater = [], - xaListNonCheater = [], outerTicks = {}, noGrids = {}, i; @@ -134540,21 +133316,6 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { var xaName = axisIds.id2name(trace.xaxis), yaName = axisIds.id2name(trace.yaxis); - // Two things trigger axis visibility: - // 1. is not carpet - // 2. carpet that's not cheater - if(!Registry.traceIs(trace, 'carpet') || (trace.type === 'carpet' && !trace._cheater)) { - if(xaName) Lib.pushUnique(xaListNonCheater, xaName); - } - - // The above check for definitely-not-cheater is not adequate. This - // second list tracks which axes *could* be a cheater so that the - // full condition triggering hiding is: - // *could* be a cheater and *is not definitely visible* - if(trace.type === 'carpet' && trace._cheater) { - if(xaName) Lib.pushUnique(xaListCheater, xaName); - } - // add axes implied by traces if(xaName && listX.indexOf(xaName) === -1) listX.push(xaName); if(yaName && listY.indexOf(yaName) === -1) listY.push(yaName); @@ -134621,7 +133382,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { var bgColor = Color.combine(plot_bgcolor, layoutOut.paper_bgcolor); - var axName, axLetter, axLayoutIn, axLayoutOut; + var axName, axLayoutIn, axLayoutOut; function coerce(attr, dflt) { return Lib.coerce(axLayoutIn, axLayoutOut, layoutAttributes, attr, dflt); @@ -134632,8 +133393,6 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { return Lib.simpleMap(list, axisIds.name2id); } - var counterAxes = {x: getCounterAxes('x'), y: getCounterAxes('y')}; - function getOverlayableAxes(axLetter, axName) { var list = {x: xaList, y: yaList}[axLetter]; var out = []; @@ -134649,7 +133408,6 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { return out; } - // first pass creates the containers, determines types, and handles most of the settings for(i = 0; i < axesList.length; i++) { axName = axesList[i]; @@ -134660,36 +133418,25 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { axLayoutIn = layoutIn[axName]; axLayoutOut = layoutOut[axName] = {}; - handleTypeDefaults(axLayoutIn, axLayoutOut, coerce, fullData, axName); - - axLetter = axName.charAt(0); - var overlayableAxes = getOverlayableAxes(axLetter, axName); + var axLetter = axName.charAt(0); var defaultOptions = { letter: axLetter, font: layoutOut.font, outerTicks: outerTicks[axName], showGrid: !noGrids[axName], + name: axName, data: fullData, bgColor: bgColor, - calendar: layoutOut.calendar, - cheateronly: axLetter === 'x' && (xaListCheater.indexOf(axName) !== -1 && xaListNonCheater.indexOf(axName) === -1) + calendar: layoutOut.calendar }; handleAxisDefaults(axLayoutIn, axLayoutOut, coerce, defaultOptions, layoutOut); - var showSpikes = coerce('showspikes'); - if(showSpikes) { - coerce('spikecolor'); - coerce('spikethickness'); - coerce('spikedash'); - coerce('spikemode'); - } - var positioningOptions = { letter: axLetter, - counterAxes: counterAxes[axLetter], - overlayableAxes: overlayableAxes + counterAxes: getCounterAxes(axLetter), + overlayableAxes: getOverlayableAxes(axLetter, axName) }; handlePositionDefaults(axLayoutIn, axLayoutOut, coerce, positioningOptions); @@ -134736,28 +133483,9 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { coerce('fixedrange', fixedRangeDflt); } - - // Finally, handle scale constraints. We need to do this after all axes have - // coerced both `type` (so we link only axes of the same type) and - // `fixedrange` (so we can avoid linking from OR TO a fixed axis). - - // sets of axes linked by `scaleanchor` along with the scaleratios compounded - // together, populated in handleConstraintDefaults - layoutOut._axisConstraintGroups = []; - var allAxisIds = counterAxes.x.concat(counterAxes.y); - - for(i = 0; i < axesList.length; i++) { - axName = axesList[i]; - axLetter = axName.charAt(0); - - axLayoutIn = layoutIn[axName]; - axLayoutOut = layoutOut[axName]; - - handleConstraintDefaults(axLayoutIn, axLayoutOut, coerce, allAxisIds, layoutOut); - } }; -},{"../../components/color":578,"../../lib":685,"../../registry":802,"../layout_attributes":778,"./axis_defaults":726,"./axis_ids":727,"./constants":729,"./constraint_defaults":730,"./layout_attributes":735,"./position_defaults":738,"./type_defaults":746}],737:[function(require,module,exports){ +},{"../../components/color":575,"../../lib":680,"../../registry":793,"../layout_attributes":769,"./axis_defaults":721,"./axis_ids":722,"./constants":724,"./layout_attributes":728,"./position_defaults":731}],730:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134836,7 +133564,7 @@ module.exports = function orderedCategories(axisLetter, categoryorder, categorya } }; -},{"d3":107}],738:[function(require,module,exports){ +},{"d3":104}],731:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134901,32 +133629,7 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer return containerOut; }; -},{"../../lib":685,"fast-isnumeric":116}],739:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -module.exports = function scaleZoom(ax, factor, centerFraction) { - if(centerFraction === undefined) centerFraction = 0.5; - - var rangeLinear = [ax.r2l(ax.range[0]), ax.r2l(ax.range[1])]; - var center = rangeLinear[0] + (rangeLinear[1] - rangeLinear[0]) * centerFraction; - var newHalfSpan = (center - rangeLinear[0]) * factor; - - ax.range = ax._input.range = [ - ax.l2r(center - newHalfSpan), - ax.l2r(center + newHalfSpan) - ]; -}; - -},{}],740:[function(require,module,exports){ +},{"../../lib":680,"fast-isnumeric":113}],732:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135126,7 +133829,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) { }; }; -},{"../../components/color":578,"../../lib/polygon":695,"./axes":724,"./constants":729}],741:[function(require,module,exports){ +},{"../../components/color":575,"../../lib/polygon":690,"./axes":719,"./constants":724}],733:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135255,20 +133958,12 @@ module.exports = function setConvert(ax, fullLayout) { */ function setCategoryIndex(v) { if(v !== null && v !== undefined) { - if(ax._categoriesMap === undefined) { - ax._categoriesMap = {}; - } - - if(ax._categoriesMap[v] !== undefined) { - return ax._categoriesMap[v]; - } else { + var c = ax._categories.indexOf(v); + if(c === -1) { ax._categories.push(v); - - var curLength = ax._categories.length - 1; - ax._categoriesMap[v] = curLength; - - return curLength; + return ax._categories.length - 1; } + return c; } return BADNUM; } @@ -135276,12 +133971,9 @@ module.exports = function setConvert(ax, fullLayout) { function getCategoryIndex(v) { // d2l/d2c variant that that won't add categories but will also // allow numbers to be mapped to the linearized axis positions - if(ax._categoriesMap) { - var index = ax._categoriesMap[v]; - if(index !== undefined) return index; - } - - if(typeof v === 'number') { return v; } + var index = ax._categories.indexOf(v); + if(index !== -1) return index; + if(typeof v === 'number') return v; } function l2p(v) { @@ -135465,8 +134157,6 @@ module.exports = function setConvert(ax, fullLayout) { // TODO cleaner way to handle this case if(!ax._categories) ax._categories = []; - // Add a map to optimize the performance of category collection - if(!ax._categoriesMap) ax._categoriesMap = {}; // make sure we have a domain (pull it in from the axis // this one is overlaying if necessary) @@ -135569,7 +134259,7 @@ module.exports = function setConvert(ax, fullLayout) { delete ax._forceTick0; }; -},{"../../constants/numerical":666,"../../lib":685,"./axis_ids":727,"./constants":729,"d3":107,"fast-isnumeric":116}],742:[function(require,module,exports){ +},{"../../constants/numerical":662,"../../lib":680,"./axis_ids":722,"./constants":724,"d3":104,"fast-isnumeric":113}],734:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135653,7 +134343,7 @@ function getShowAttrDflt(containerIn) { } } -},{"../../lib":685}],743:[function(require,module,exports){ +},{"../../lib":680}],735:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135686,7 +134376,7 @@ module.exports = function handleTickDefaults(containerIn, containerOut, coerce, } }; -},{"../../lib":685,"./layout_attributes":735}],744:[function(require,module,exports){ +},{"../../lib":680,"./layout_attributes":728}],736:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135770,7 +134460,7 @@ module.exports = function handleTickValueDefaults(containerIn, containerOut, coe } }; -},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],745:[function(require,module,exports){ +},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],737:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136082,135 +134772,7 @@ module.exports = function transitionAxes(gd, newLayout, transitionOpts, makeOnCo return Promise.resolve(); }; -},{"../../components/drawing":602,"../../plotly":719,"../../registry":802,"./axes":724,"d3":107}],746:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var Registry = require('../../registry'); -var autoType = require('./axis_autotype'); -var name2id = require('./axis_ids').name2id; - -/* - * data: the plot data to use in choosing auto type - * name: axis object name (ie 'xaxis') if one should be stored - */ -module.exports = function handleTypeDefaults(containerIn, containerOut, coerce, data, name) { - // set up some private properties - if(name) { - containerOut._name = name; - containerOut._id = name2id(name); - } - - var axType = coerce('type'); - if(axType === '-') { - setAutoType(containerOut, data); - - if(containerOut.type === '-') { - containerOut.type = 'linear'; - } - else { - // copy autoType back to input axis - // note that if this object didn't exist - // in the input layout, we have to put it in - // this happens in the main supplyDefaults function - containerIn.type = containerOut.type; - } - } -}; - -function setAutoType(ax, data) { - // new logic: let people specify any type they want, - // only autotype if type is '-' - if(ax.type !== '-') return; - - var id = ax._id, - axLetter = id.charAt(0); - - // support 3d - if(id.indexOf('scene') !== -1) id = axLetter; - - var d0 = getFirstNonEmptyTrace(data, id, axLetter); - if(!d0) return; - - // first check for histograms, as the count direction - // should always default to a linear axis - if(d0.type === 'histogram' && - axLetter === {v: 'y', h: 'x'}[d0.orientation || 'v']) { - ax.type = 'linear'; - return; - } - - var calAttr = axLetter + 'calendar', - calendar = d0[calAttr]; - - // check all boxes on this x axis to see - // if they're dates, numbers, or categories - if(isBoxWithoutPositionCoords(d0, axLetter)) { - var posLetter = getBoxPosLetter(d0), - boxPositions = [], - trace; - - for(var i = 0; i < data.length; i++) { - trace = data[i]; - if(!Registry.traceIs(trace, 'box') || - (trace[axLetter + 'axis'] || axLetter) !== id) continue; - - if(trace[posLetter] !== undefined) boxPositions.push(trace[posLetter][0]); - else if(trace.name !== undefined) boxPositions.push(trace.name); - else boxPositions.push('text'); - - if(trace[calAttr] !== calendar) calendar = undefined; - } - - ax.type = autoType(boxPositions, calendar); - } - else { - ax.type = autoType(d0[axLetter] || [d0[axLetter + '0']], calendar); - } -} - -function getFirstNonEmptyTrace(data, id, axLetter) { - for(var i = 0; i < data.length; i++) { - var trace = data[i]; - - if((trace[axLetter + 'axis'] || axLetter) === id) { - if(isBoxWithoutPositionCoords(trace, axLetter)) { - return trace; - } - else if((trace[axLetter] || []).length || trace[axLetter + '0']) { - return trace; - } - } - } -} - -function getBoxPosLetter(trace) { - return {v: 'x', h: 'y'}[trace.orientation || 'v']; -} - -function isBoxWithoutPositionCoords(trace, axLetter) { - var posLetter = getBoxPosLetter(trace), - isBox = Registry.traceIs(trace, 'box'), - isCandlestick = Registry.traceIs(trace._fullInput || {}, 'candlestick'); - - return ( - isBox && - !isCandlestick && - axLetter === posLetter && - trace[posLetter] === undefined && - trace[posLetter + '0'] === undefined - ); -} - -},{"../../registry":802,"./axis_autotype":725,"./axis_ids":727}],747:[function(require,module,exports){ +},{"../../components/drawing":598,"../../plotly":714,"../../registry":793,"./axes":719,"d3":104}],738:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136635,7 +135197,7 @@ function crawl(attrs, callback, path, depth) { }); } -},{"../lib":685,"../plotly":719}],748:[function(require,module,exports){ +},{"../lib":680,"../plotly":714}],739:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136677,7 +135239,7 @@ module.exports = { } }; -},{}],749:[function(require,module,exports){ +},{}],740:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136739,7 +135301,7 @@ module.exports = { } }; -},{}],750:[function(require,module,exports){ +},{}],741:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136899,7 +135461,7 @@ params.layerNameToAdjective = { // base layers drawn over choropleth params.baseLayersOverChoropleth = ['rivers', 'lakes']; -},{}],751:[function(require,module,exports){ +},{}],742:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136993,9 +135555,11 @@ proto.plot = function(geoCalcData, fullLayout, promises) { if(!lonlat || isNaN(lonlat[0]) || isNaN(lonlat[1])) return; - var evt = d3.event; - evt.xpx = mouse[0]; - evt.ypx = mouse[1]; + var evt = { + target: true, + xpx: mouse[0], + ypx: mouse[1] + }; _this.xaxis.c2p = function() { return mouse[0]; }; _this.xaxis.p2c = function() { return lonlat[0]; }; @@ -137010,7 +135574,7 @@ proto.plot = function(geoCalcData, fullLayout, promises) { }); _this.framework.on('click', function() { - Fx.click(_this.graphDiv, d3.event); + Fx.click(_this.graphDiv, { target: true }); }); topojsonNameNew = topojsonUtils.getTopojsonName(geoLayout); @@ -137372,7 +135936,7 @@ function createMockAxis(fullLayout) { return mockAxis; } -},{"../../components/color":578,"../../components/drawing":602,"../../lib/topojson_utils":706,"../cartesian/axes":724,"../cartesian/graph_interact":733,"../plots":787,"./constants":750,"./projections":758,"./set_scale":759,"./zoom":760,"./zoom_reset":761,"d3":107,"topojson-client":516}],752:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"../../lib/topojson_utils":701,"../cartesian/axes":719,"../cartesian/graph_interact":726,"../plots":778,"./constants":741,"./projections":749,"./set_scale":750,"./zoom":751,"./zoom_reset":752,"d3":104,"topojson-client":513}],743:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137452,7 +136016,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) } }; -},{"../../plots/plots":787,"./geo":751,"./layout/attributes":753,"./layout/defaults":756,"./layout/layout_attributes":757}],753:[function(require,module,exports){ +},{"../../plots/plots":778,"./geo":742,"./layout/attributes":744,"./layout/defaults":747,"./layout/layout_attributes":748}],744:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137480,7 +136044,7 @@ module.exports = { } }; -},{}],754:[function(require,module,exports){ +},{}],745:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137543,7 +136107,7 @@ module.exports = { } }; -},{"../../../components/color/attributes":577}],755:[function(require,module,exports){ +},{"../../../components/color/attributes":574}],746:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137617,7 +136181,7 @@ module.exports = function supplyGeoAxisLayoutDefaults(geoLayoutIn, geoLayoutOut) } }; -},{"../../../lib":685,"../constants":750,"./axis_attributes":754}],756:[function(require,module,exports){ +},{"../../../lib":680,"../constants":741,"./axis_attributes":745}],747:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137736,7 +136300,7 @@ function handleGeoDefaults(geoLayoutIn, geoLayoutOut, coerce) { ]; } -},{"../../subplot_defaults":794,"../constants":750,"./axis_defaults":755,"./layout_attributes":757}],757:[function(require,module,exports){ +},{"../../subplot_defaults":785,"../constants":741,"./axis_defaults":746,"./layout_attributes":748}],748:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137995,7 +136559,7 @@ module.exports = { lataxis: geoAxesAttrs }; -},{"../../../components/color/attributes":577,"../constants":750,"./axis_attributes":754}],758:[function(require,module,exports){ +},{"../../../components/color/attributes":574,"../constants":741,"./axis_attributes":745}],749:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138441,7 +137005,7 @@ function addProjectionsToD3(d3) { module.exports = addProjectionsToD3; -},{}],759:[function(require,module,exports){ +},{}],750:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138592,7 +137156,7 @@ function getBounds(projection, rangeBox) { return d3.geo.path().projection(projection).bounds(rangeBox); } -},{"./constants":750,"d3":107}],760:[function(require,module,exports){ +},{"./constants":741,"d3":104}],751:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139019,7 +137583,7 @@ function d3_eventDispatch(target) { return dispatch; } -},{"d3":107}],761:[function(require,module,exports){ +},{"d3":104}],752:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139048,7 +137612,7 @@ module.exports = function createGeoZoomReset(geo, geoLayout) { return zoomReset; }; -},{}],762:[function(require,module,exports){ +},{}],753:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139062,7 +137626,6 @@ module.exports = function createGeoZoomReset(geo, geoLayout) { var mouseChange = require('mouse-change'); var mouseWheel = require('mouse-wheel'); -var cartesianConstants = require('../cartesian/constants'); module.exports = createCamera; @@ -139074,10 +137637,8 @@ function Camera2D(element, plot) { this.lastInputTime = Date.now(); this.lastPos = [0, 0]; this.boxEnabled = false; - this.boxInited = false; this.boxStart = [0, 0]; this.boxEnd = [0, 0]; - this.dragStart = [0, 0]; } @@ -139091,21 +137652,6 @@ function createCamera(scene) { scene.yaxis.autorange = false; } - function getSubplotConstraint() { - // note: this assumes we only have one x and one y axis on this subplot - // when this constraint is lifted this block won't make sense - var constraints = scene.graphDiv._fullLayout._axisConstraintGroups; - var xaId = scene.xaxis._id; - var yaId = scene.yaxis._id; - for(var i = 0; i < constraints.length; i++) { - if(constraints[i][xaId] !== -1) { - if(constraints[i][yaId] !== -1) return true; - break; - } - } - return false; - } - result.mouseListener = mouseChange(element, function(buttons, x, y) { var dataBox = scene.calcDataBox(), viewBox = plot.viewBox; @@ -139113,11 +137659,6 @@ function createCamera(scene) { var lastX = result.lastPos[0], lastY = result.lastPos[1]; - var MINDRAG = cartesianConstants.MINDRAG * plot.pixelRatio; - var MINZOOM = cartesianConstants.MINZOOM * plot.pixelRatio; - - var dx, dy; - x *= plot.pixelRatio; y *= plot.pixelRatio; @@ -139150,114 +137691,32 @@ function createCamera(scene) { (viewBox[3] - viewBox[1]) * (dataBox[3] - dataBox[1]) + dataBox[1]; - if(!result.boxInited) { + if(!result.boxEnabled) { result.boxStart[0] = dataX; result.boxStart[1] = dataY; - result.dragStart[0] = x; - result.dragStart[1] = y; } result.boxEnd[0] = dataX; result.boxEnd[1] = dataY; - // we need to mark the box as initialized right away - // so that we can tell the start and end pionts apart - result.boxInited = true; - - // but don't actually enable the box until the cursor moves - if(!result.boxEnabled && ( - result.boxStart[0] !== result.boxEnd[0] || - result.boxStart[1] !== result.boxEnd[1]) - ) { - result.boxEnabled = true; - } - - // constrain aspect ratio if the axes require it - var smallDx = Math.abs(result.dragStart[0] - x) < MINZOOM; - var smallDy = Math.abs(result.dragStart[1] - y) < MINZOOM; - if(getSubplotConstraint() && !(smallDx && smallDy)) { - dx = result.boxEnd[0] - result.boxStart[0]; - dy = result.boxEnd[1] - result.boxStart[1]; - var dydx = (dataBox[3] - dataBox[1]) / (dataBox[2] - dataBox[0]); - - if(Math.abs(dx * dydx) > Math.abs(dy)) { - result.boxEnd[1] = result.boxStart[1] + - Math.abs(dx) * dydx * (Math.sign(dy) || 1); - - // gl-select-box clips to the plot area bounds, - // which breaks the axis constraint, so don't allow - // this box to go out of bounds - if(result.boxEnd[1] < dataBox[1]) { - result.boxEnd[1] = dataBox[1]; - result.boxEnd[0] = result.boxStart[0] + - (dataBox[1] - result.boxStart[1]) / Math.abs(dydx); - } - else if(result.boxEnd[1] > dataBox[3]) { - result.boxEnd[1] = dataBox[3]; - result.boxEnd[0] = result.boxStart[0] + - (dataBox[3] - result.boxStart[1]) / Math.abs(dydx); - } - } - else { - result.boxEnd[0] = result.boxStart[0] + - Math.abs(dy) / dydx * (Math.sign(dx) || 1); - - if(result.boxEnd[0] < dataBox[0]) { - result.boxEnd[0] = dataBox[0]; - result.boxEnd[1] = result.boxStart[1] + - (dataBox[0] - result.boxStart[0]) * Math.abs(dydx); - } - else if(result.boxEnd[0] > dataBox[2]) { - result.boxEnd[0] = dataBox[2]; - result.boxEnd[1] = result.boxStart[1] + - (dataBox[2] - result.boxStart[0]) * Math.abs(dydx); - } - } - } - // otherwise clamp small changes to the origin so we get 1D zoom - else { - if(smallDx) result.boxEnd[0] = result.boxStart[0]; - if(smallDy) result.boxEnd[1] = result.boxStart[1]; - } + result.boxEnabled = true; } else if(result.boxEnabled) { - dx = result.boxStart[0] !== result.boxEnd[0]; - dy = result.boxStart[1] !== result.boxEnd[1]; - if(dx || dy) { - if(dx) { - updateRange(0, result.boxStart[0], result.boxEnd[0]); - scene.xaxis.autorange = false; - } - if(dy) { - updateRange(1, result.boxStart[1], result.boxEnd[1]); - scene.yaxis.autorange = false; - } - scene.relayoutCallback(); - } - else { - scene.glplot.setDirty(); - } + updateRange(0, result.boxStart[0], result.boxEnd[0]); + updateRange(1, result.boxStart[1], result.boxEnd[1]); + unSetAutoRange(); result.boxEnabled = false; - result.boxInited = false; + scene.relayoutCallback(); } break; case 'pan': result.boxEnabled = false; - result.boxInited = false; if(buttons) { - if(!result.panning) { - result.dragStart[0] = x; - result.dragStart[1] = y; - } - - if(Math.abs(result.dragStart[0] - x) < MINDRAG) x = result.dragStart[0]; - if(Math.abs(result.dragStart[1] - y) < MINDRAG) y = result.dragStart[1]; - - dx = (lastX - x) * (dataBox[2] - dataBox[0]) / + var dx = (lastX - x) * (dataBox[2] - dataBox[0]) / (plot.viewBox[2] - plot.viewBox[0]); - dy = (lastY - y) * (dataBox[3] - dataBox[1]) / + var dy = (lastY - y) * (dataBox[3] - dataBox[1]) / (plot.viewBox[3] - plot.viewBox[1]); dataBox[0] += dx; @@ -139326,7 +137785,7 @@ function createCamera(scene) { return result; } -},{"../cartesian/constants":729,"mouse-change":434,"mouse-wheel":437}],763:[function(require,module,exports){ +},{"mouse-change":431,"mouse-wheel":434}],754:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139572,7 +138031,7 @@ function createAxes2D(scene) { module.exports = createAxes2D; -},{"../../lib/html2unicode":683,"../../lib/str2rgbarray":703,"../cartesian/axes":724,"../plots":787}],764:[function(require,module,exports){ +},{"../../lib/html2unicode":678,"../../lib/str2rgbarray":698,"../cartesian/axes":719,"../plots":778}],755:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139684,7 +138143,7 @@ exports.toSVG = function(gd) { } }; -},{"../../constants/xmlns_namespaces":668,"../cartesian/attributes":723,"../plots":787,"./scene2d":765}],765:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":664,"../cartesian/attributes":718,"../plots":778,"./scene2d":756}],756:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139709,7 +138168,6 @@ var createOptions = require('./convert'); var createCamera = require('./camera'); var convertHTMLToUnicode = require('../../lib/html2unicode'); var showNoWebGlMsg = require('../../lib/show_no_webgl_msg'); -var enforceAxisConstraints = require('../../plots/cartesian/constraints'); var AXES = ['xaxis', 'yaxis']; var STATIC_CANVAS, STATIC_CONTEXT; @@ -140114,13 +138572,6 @@ proto.plot = function(fullData, calcData, fullLayout) { ax.setScale(); } - var mockLayout = { - _axisConstraintGroups: this.graphDiv._fullLayout._axisConstraintGroups, - xaxis: this.xaxis, - yaxis: this.yaxis - }; - enforceAxisConstraints({_fullLayout: mockLayout}); - options.ticks = this.computeTickMarks(); options.dataBox = this.calcDataBox(); @@ -140239,36 +138690,26 @@ proto.draw = function() { var x = mouseListener.x * glplot.pixelRatio; var y = this.canvas.height - glplot.pixelRatio * mouseListener.y; - var result; - if(camera.boxEnabled && fullLayout.dragmode === 'zoom') { this.selectBox.enabled = true; - var selectBox = this.selectBox.selectBox = [ + this.selectBox.selectBox = [ Math.min(camera.boxStart[0], camera.boxEnd[0]), Math.min(camera.boxStart[1], camera.boxEnd[1]), Math.max(camera.boxStart[0], camera.boxEnd[0]), Math.max(camera.boxStart[1], camera.boxEnd[1]) ]; - // 1D zoom - for(var i = 0; i < 2; i++) { - if(camera.boxStart[i] === camera.boxEnd[i]) { - selectBox[i] = glplot.dataBox[i]; - selectBox[i + 2] = glplot.dataBox[i + 2]; - } - } - glplot.setDirty(); } - else if(!camera.panning) { + else { this.selectBox.enabled = false; var size = fullLayout._size, domainX = this.xaxis.domain, domainY = this.yaxis.domain; - result = glplot.pick( + var result = glplot.pick( (x / glplot.pixelRatio) + size.l + domainX[0] * size.w, (y / glplot.pixelRatio) - (size.t + (1 - domainY[1]) * size.h) ); @@ -140334,15 +138775,12 @@ proto.draw = function() { }); } } - } - - // Remove hover effects if we're not over a point OR - // if we're zooming or panning (in which case result is not set) - if(!result && this.lastPickResult) { - this.spikes.update({}); - this.lastPickResult = null; - this.graphDiv.emit('plotly_unhover'); - Fx.loneUnhover(this.svgContainer); + else if(!result && this.lastPickResult) { + this.spikes.update({}); + this.lastPickResult = null; + this.graphDiv.emit('plotly_unhover'); + Fx.loneUnhover(this.svgContainer); + } } glplot.draw(); @@ -140355,7 +138793,7 @@ proto.hoverFormatter = function(axisName, val) { return Axes.tickText(axis, axis.c2l(val), 'hover').text; }; -},{"../../lib/html2unicode":683,"../../lib/show_no_webgl_msg":701,"../../plots/cartesian/axes":724,"../../plots/cartesian/constraints":731,"../../plots/cartesian/graph_interact":733,"../../registry":802,"./camera":762,"./convert":763,"gl-plot2d":203,"gl-select-box":237,"gl-spikes2d":246,"webgl-context":543}],766:[function(require,module,exports){ +},{"../../lib/html2unicode":678,"../../lib/show_no_webgl_msg":696,"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"../../registry":793,"./camera":753,"./convert":754,"gl-plot2d":200,"gl-select-box":234,"gl-spikes2d":243,"webgl-context":540}],757:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140604,7 +139042,7 @@ function createCamera(element, options) { return camera; } -},{"3d-view":33,"mouse-change":434,"mouse-wheel":437,"right-now":483}],767:[function(require,module,exports){ +},{"3d-view":30,"mouse-change":431,"mouse-wheel":434,"right-now":480}],758:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140721,7 +139159,7 @@ exports.cleanId = function cleanId(id) { return 'scene' + sceneNum; }; -},{"../../constants/xmlns_namespaces":668,"../../lib":685,"../plots":787,"./layout/attributes":768,"./layout/defaults":772,"./layout/layout_attributes":773,"./scene":777}],768:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":664,"../../lib":680,"../plots":778,"./layout/attributes":759,"./layout/defaults":763,"./layout/layout_attributes":764,"./scene":768}],759:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140749,7 +139187,7 @@ module.exports = { } }; -},{}],769:[function(require,module,exports){ +},{}],760:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140766,7 +139204,6 @@ var extendFlat = require('../../../lib/extend').extendFlat; module.exports = { - visible: axesAttrs.visible, showspikes: { valType: 'boolean', role: 'info', @@ -140866,7 +139303,7 @@ module.exports = { zerolinewidth: axesAttrs.zerolinewidth }; -},{"../../../components/color":578,"../../../lib/extend":677,"../../cartesian/layout_attributes":735}],770:[function(require,module,exports){ +},{"../../../components/color":575,"../../../lib/extend":672,"../../cartesian/layout_attributes":728}],761:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140883,7 +139320,6 @@ var colorMix = require('tinycolor2').mix; var Lib = require('../../../lib'); var layoutAttributes = require('./axis_attributes'); -var handleTypeDefaults = require('../../cartesian/type_defaults'); var handleAxisDefaults = require('../../cartesian/axis_defaults'); var axesNames = ['xaxis', 'yaxis', 'zaxis']; @@ -140903,14 +139339,12 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { var axName = axesNames[j]; containerIn = layoutIn[axName] || {}; - containerOut = layoutOut[axName] = { + containerOut = { _id: axName[0] + options.scene, _name: axName }; - handleTypeDefaults(containerIn, containerOut, coerce, options.data); - - handleAxisDefaults( + layoutOut[axName] = containerOut = handleAxisDefaults( containerIn, containerOut, coerce, { @@ -140938,7 +139372,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { } }; -},{"../../../lib":685,"../../cartesian/axis_defaults":726,"../../cartesian/type_defaults":746,"./axis_attributes":769,"tinycolor2":514}],771:[function(require,module,exports){ +},{"../../../lib":680,"../../cartesian/axis_defaults":721,"./axis_attributes":760,"tinycolor2":511}],762:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140950,9 +139384,12 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { 'use strict'; +var arrtools = require('arraytools'); var convertHTMLToUnicode = require('../../../lib/html2unicode'); var str2RgbaArray = require('../../../lib/str2rgbarray'); +var arrayCopy1D = arrtools.copy1D; + var AXES_NAMES = ['xaxis', 'yaxis', 'zaxis']; function AxesOptions() { @@ -141002,9 +139439,9 @@ function AxesOptions() { [0.8, 0.8, 0.8, 0.5] ]; // some default values are stored for applying model transforms - this._defaultTickPad = this.tickPad.slice(); - this._defaultLabelPad = this.labelPad.slice(); - this._defaultLineTickLength = this.lineTickLength.slice(); + this._defaultTickPad = arrayCopy1D(this.tickPad); + this._defaultLabelPad = arrayCopy1D(this.labelPad); + this._defaultLineTickLength = arrayCopy1D(this.lineTickLength); } var proto = AxesOptions.prototype; @@ -141014,17 +139451,6 @@ proto.merge = function(sceneLayout) { for(var i = 0; i < 3; ++i) { var axes = sceneLayout[AXES_NAMES[i]]; - if(!axes.visible) { - opts.tickEnable[i] = false; - opts.labelEnable[i] = false; - opts.lineEnable[i] = false; - opts.lineTickEnable[i] = false; - opts.gridEnable[i] = false; - opts.zeroEnable[i] = false; - opts.backgroundEnable[i] = false; - continue; - } - // Axes labels opts.labels[i] = convertHTMLToUnicode(axes.title); if('titlefont' in axes) { @@ -141101,7 +139527,7 @@ function createAxesOptions(plotlyOptions) { module.exports = createAxesOptions; -},{"../../../lib/html2unicode":683,"../../../lib/str2rgbarray":703}],772:[function(require,module,exports){ +},{"../../../lib/html2unicode":678,"../../../lib/str2rgbarray":698,"arraytools":36}],763:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141205,7 +139631,7 @@ function handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) { coerce('hovermode', opts.getDfltFromLayout('hovermode')); } -},{"../../../components/color":578,"../../../lib":685,"../../subplot_defaults":794,"./axis_defaults":770,"./layout_attributes":773}],773:[function(require,module,exports){ +},{"../../../components/color":575,"../../../lib":680,"../../subplot_defaults":785,"./axis_defaults":761,"./layout_attributes":764}],764:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141375,7 +139801,7 @@ module.exports = { } }; -},{"../../../lib/extend":677,"./axis_attributes":769}],774:[function(require,module,exports){ +},{"../../../lib/extend":672,"./axis_attributes":760}],765:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141406,12 +139832,6 @@ proto.merge = function(sceneLayout) { for(var i = 0; i < 3; ++i) { var axes = sceneLayout[AXES_NAMES[i]]; - if(!axes.visible) { - this.enabled[i] = false; - this.drawSides[i] = false; - continue; - } - this.enabled[i] = axes.showspikes; this.colors[i] = str2RGBArray(axes.spikecolor); this.drawSides[i] = axes.spikesides; @@ -141427,7 +139847,7 @@ function createSpikeOptions(layout) { module.exports = createSpikeOptions; -},{"../../../lib/str2rgbarray":703}],775:[function(require,module,exports){ +},{"../../../lib/str2rgbarray":698}],766:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141523,7 +139943,7 @@ function computeTickMarks(scene) { scene.contourLevels = contourLevelsFromTicks(ticks); } -},{"../../../lib":685,"../../../lib/html2unicode":683,"../../cartesian/axes":724}],776:[function(require,module,exports){ +},{"../../../lib":680,"../../../lib/html2unicode":678,"../../cartesian/axes":719}],767:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141557,7 +139977,7 @@ function project(camera, v) { module.exports = project; -},{}],777:[function(require,module,exports){ +},{}],768:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142280,7 +140700,7 @@ proto.setConvert = function() { module.exports = Scene; -},{"../../lib":685,"../../lib/show_no_webgl_msg":701,"../../lib/str2rgbarray":703,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"./camera":766,"./layout/convert":771,"./layout/spikes":774,"./layout/tick_marks":775,"./project":776,"gl-plot3d":205,"webgl-context":543}],778:[function(require,module,exports){ +},{"../../lib":680,"../../lib/show_no_webgl_msg":696,"../../lib/str2rgbarray":698,"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"./camera":757,"./layout/convert":762,"./layout/spikes":765,"./layout/tick_marks":766,"./project":767,"gl-plot3d":202,"webgl-context":540}],769:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142473,7 +140893,7 @@ module.exports = { } }; -},{"../components/color/attributes":577,"../lib":685,"./font_attributes":748}],779:[function(require,module,exports){ +},{"../components/color/attributes":574,"../lib":680,"./font_attributes":739}],770:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142503,7 +140923,7 @@ module.exports = { mapOnErrorMsg: 'Mapbox error.' }; -},{}],780:[function(require,module,exports){ +},{}],771:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142577,7 +140997,7 @@ module.exports = function convertTextOpts(textposition, iconSize) { return { anchor: anchor, offset: offset }; }; -},{"../../lib":685}],781:[function(require,module,exports){ +},{"../../lib":680}],772:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142725,7 +141145,7 @@ function findAccessToken(gd, mapboxIds) { return accessToken; } -},{"../../constants/xmlns_namespaces":668,"../plots":787,"./constants":779,"./layout_attributes":783,"./layout_defaults":784,"./mapbox":785,"mapbox-gl":325}],782:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":664,"../plots":778,"./constants":770,"./layout_attributes":774,"./layout_defaults":775,"./mapbox":776,"mapbox-gl":322}],773:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142950,7 +141370,7 @@ module.exports = function createMapboxLayer(mapbox, index, opts) { return mapboxLayer; }; -},{"../../lib":685,"./convert_text_opts":780}],783:[function(require,module,exports){ +},{"../../lib":680,"./convert_text_opts":771}],774:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143218,7 +141638,7 @@ module.exports = { }; -},{"../../components/color":578,"../../lib":685,"../../traces/scatter/attributes":976,"../font_attributes":748}],784:[function(require,module,exports){ +},{"../../components/color":575,"../../lib":680,"../../traces/scatter/attributes":924,"../font_attributes":739}],775:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143314,7 +141734,7 @@ function handleLayerDefaults(containerIn, containerOut) { } } -},{"../../lib":685,"../subplot_defaults":794,"./layout_attributes":783}],785:[function(require,module,exports){ +},{"../../lib":680,"../subplot_defaults":785,"./layout_attributes":774}],776:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143428,14 +141848,10 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { }); // clear navigation container - var className = constants.controlContainerClassName; - var controlContainer = self.div.getElementsByClassName(className)[0]; + var className = constants.controlContainerClassName, + controlContainer = self.div.getElementsByClassName(className)[0]; self.div.removeChild(controlContainer); - // make sure canvas does not inherit left and top css - map._canvas.canvas.style.left = '0px'; - map._canvas.canvas.style.top = '0px'; - self.rejectOnError(reject); map.once('load', function() { @@ -143487,8 +141903,8 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { Fx.hover(gd, evt, self.id); }); - map.on('click', function(evt) { - Fx.click(gd, evt.originalEvent); + map.on('click', function() { + Fx.click(gd, { target: true }); }); function unhover() { @@ -143497,6 +141913,7 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { map.on('dragstart', unhover); map.on('zoomstart', unhover); + }; proto.updateMap = function(calcData, fullLayout, resolve, reject) { @@ -143778,7 +142195,7 @@ function convertCenter(center) { return [center.lon, center.lat]; } -},{"../../lib":685,"../cartesian/graph_interact":733,"./constants":779,"./layers":782,"./layout_attributes":783,"mapbox-gl":325}],786:[function(require,module,exports){ +},{"../../lib":680,"../cartesian/graph_interact":726,"./constants":770,"./layers":773,"./layout_attributes":774,"mapbox-gl":322}],777:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143816,7 +142233,7 @@ module.exports = { } }; -},{}],787:[function(require,module,exports){ +},{}],778:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -143835,7 +142252,6 @@ var Plotly = require('../plotly'); var Registry = require('../registry'); var Lib = require('../lib'); var Color = require('../components/color'); -var BADNUM = require('../constants/numerical').BADNUM; var plots = module.exports = {}; @@ -144077,9 +142493,6 @@ plots.previousPromises = function(gd) { * Add source links to your graph inside the 'showSources' config argument. */ plots.addLinks = function(gd) { - // Do not do anything if showLink and showSources are not set to true in config - if(!gd._context.showLink && !gd._context.showSources) return; - var fullLayout = gd._fullLayout; var linkContainer = fullLayout._paper @@ -144397,7 +142810,6 @@ plots.cleanPlot = function(newFullData, newFullLayout, oldFullData, oldFullLayou var query = ( '.hm' + oldUid + ',.contour' + oldUid + - ',.carpet' + oldUid + ',#clip' + oldUid + ',.trace' + oldUid ); @@ -144452,7 +142864,6 @@ plots.linkSubplots = function(newFullData, newFullLayout, oldFullData, oldFullLa }; plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) { - var i, fullTrace, trace; var modules = fullLayout._modules = [], basePlotModules = fullLayout._basePlotModules = [], cnt = 0; @@ -144471,12 +142882,9 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) { cnt++; } - var carpetIndex = {}; - var carpetDependents = []; - - for(i = 0; i < dataIn.length; i++) { - trace = dataIn[i]; - fullTrace = plots.supplyTraceDefaults(trace, cnt, fullLayout, i); + for(var i = 0; i < dataIn.length; i++) { + var trace = dataIn[i], + fullTrace = plots.supplyTraceDefaults(trace, cnt, fullLayout, i); fullTrace.index = i; fullTrace._input = trace; @@ -144513,31 +142921,6 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) { pushModule(fullTrace); } - - if(Registry.traceIs(fullTrace, 'carpetAxis')) { - carpetIndex[fullTrace.carpet] = fullTrace; - } - - if(Registry.traceIs(fullTrace, 'carpetDependent')) { - carpetDependents.push(i); - } - } - - for(i = 0; i < carpetDependents.length; i++) { - fullTrace = dataOut[carpetDependents[i]]; - - if(!fullTrace.visible) continue; - - var carpetAxis = carpetIndex[fullTrace.carpet]; - fullTrace._carpet = carpetAxis; - - if(!carpetAxis || !carpetAxis.visible) { - fullTrace.visible = false; - continue; - } - - fullTrace.xaxis = carpetAxis.xaxis; - fullTrace.yaxis = carpetAxis.yaxis; } }; @@ -144660,11 +143043,6 @@ plots.supplyTraceDefaults = function(traceIn, traceOutIndex, layout, traceInInde // gets overwritten in pie, geo and ternary modules coerce('hoverinfo', (layout._dataLength === 1) ? 'x+y+z+text' : undefined); - if(plots.traceIs(traceOut, 'showLegend')) { - coerce('showlegend'); - coerce('legendgroup'); - } - // TODO add per-base-plot-module trace defaults step if(_module) _module.supplyDefaults(traceIn, traceOut, defaultColor, layout); @@ -144677,21 +143055,19 @@ plots.supplyTraceDefaults = function(traceIn, traceOutIndex, layout, traceInInde coerceSubplotAttr('gl2d', 'xaxis'); coerceSubplotAttr('gl2d', 'yaxis'); - if(plots.traceIs(traceOut, 'notLegendIsolatable')) { - // This clears out the legendonly state for traces like carpet that - // cannot be isolated in the legend - traceOut.visible = !!traceOut.visible; + if(plots.traceIs(traceOut, 'showLegend')) { + coerce('showlegend'); + coerce('legendgroup'); } - plots.supplyTransformDefaults(traceIn, traceOut, layout); + supplyTransformDefaults(traceIn, traceOut, layout); } return traceOut; }; -plots.supplyTransformDefaults = function(traceIn, traceOut, layout) { +function supplyTransformDefaults(traceIn, traceOut, layout) { var globalTransforms = layout._globalTransforms || []; - var transformModules = layout._transformModules || []; if(!Array.isArray(traceIn.transforms) && globalTransforms.length === 0) return; @@ -144712,7 +143088,7 @@ plots.supplyTransformDefaults = function(traceIn, traceOut, layout) { transformOut.type = type; transformOut._module = _module; - Lib.pushUnique(transformModules, _module); + Lib.pushUnique(layout._transformModules, _module); } else { transformOut = Lib.extendFlat({}, transformIn); @@ -144720,7 +143096,7 @@ plots.supplyTransformDefaults = function(traceIn, traceOut, layout) { containerOut.push(transformOut); } -}; +} function applyTransforms(fullTrace, fullData, layout, fullLayout) { var container = fullTrace.transforms, @@ -145810,13 +144186,6 @@ plots.doCalcdata = function(gd, traces) { // to be filled in later by ax.d2c for(i = 0; i < axList.length; i++) { axList[i]._categories = axList[i]._initialCategories.slice(); - - // Build the lookup map for initialized categories - axList[i]._categoriesMap = {}; - for(j = 0; j < axList[i]._categories.length; j++) { - axList[i]._categoriesMap[axList[i]._categories[j]] = j; - } - if(axList[i].type === 'category') hasCategoryAxis = true; } @@ -145861,8 +144230,6 @@ plots.doCalcdata = function(gd, traces) { axList[i]._min = []; axList[i]._max = []; axList[i]._categories = []; - // Reset the look up map - axList[i]._categoriesMap = {}; } } @@ -145881,8 +144248,11 @@ plots.doCalcdata = function(gd, traces) { // // This ensures there is a calcdata item for every trace, // even if cartesian logic doesn't handle it (for things like legends). + // + // Tag this artificial calc point with 'placeholder: true', + // to make it easier to skip over them in during the plot and hover step. if(!Array.isArray(cd) || !cd[0]) { - cd = [{x: BADNUM, y: BADNUM}]; + cd = [{x: false, y: false, placeholder: true}]; } // add the trace-wide properties to the first point, @@ -145977,7 +144347,7 @@ plots.generalUpdatePerTraceModule = function(subplot, subplotCalcData, subplotLa subplot.traceHash = traceHash; }; -},{"../components/color":578,"../components/errorbars":608,"../constants/numerical":666,"../lib":685,"../plotly":719,"../registry":802,"./animation_attributes":720,"./attributes":722,"./command":747,"./font_attributes":748,"./frame_attributes":749,"./layout_attributes":778,"d3":107,"fast-isnumeric":116}],788:[function(require,module,exports){ +},{"../components/color":575,"../components/errorbars":604,"../lib":680,"../plotly":714,"../registry":793,"./animation_attributes":715,"./attributes":717,"./command":738,"./font_attributes":739,"./frame_attributes":740,"./layout_attributes":769,"d3":104,"fast-isnumeric":113}],779:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146002,7 +144372,7 @@ module.exports = { } }; -},{"../../traces/scatter/attributes":976}],789:[function(require,module,exports){ +},{"../../traces/scatter/attributes":924}],780:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146152,7 +144522,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../cartesian/layout_attributes":735}],790:[function(require,module,exports){ +},{"../../lib/extend":672,"../cartesian/layout_attributes":728}],781:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146167,7 +144537,7 @@ var Polar = module.exports = require('./micropolar'); Polar.manager = require('./micropolar_manager'); -},{"./micropolar":791,"./micropolar_manager":792}],791:[function(require,module,exports){ +},{"./micropolar":782,"./micropolar_manager":783}],782:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147586,7 +145956,7 @@ var µ = module.exports = { version: '0.2.2' }; return exports; }; -},{"../../lib":685,"d3":107}],792:[function(require,module,exports){ +},{"../../lib":680,"d3":104}],783:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147672,7 +146042,7 @@ manager.fillLayout = function(_gd) { _gd._fullLayout = extendDeepAll(dflts, _gd.layout); }; -},{"../../components/color":578,"../../lib":685,"./micropolar":791,"./undo_manager":793,"d3":107}],793:[function(require,module,exports){ +},{"../../components/color":575,"../../lib":680,"./micropolar":782,"./undo_manager":784,"d3":104}],784:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147738,7 +146108,7 @@ module.exports = function UndoManager() { }; }; -},{}],794:[function(require,module,exports){ +},{}],785:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147813,7 +146183,7 @@ module.exports = function handleSubplotDefaults(layoutIn, layoutOut, fullData, o } }; -},{"../lib":685,"./plots":787}],795:[function(require,module,exports){ +},{"../lib":680,"./plots":778}],786:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147887,7 +146257,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) } }; -},{"../../plots/plots":787,"./layout/attributes":796,"./layout/defaults":799,"./layout/layout_attributes":800,"./ternary":801}],796:[function(require,module,exports){ +},{"../../plots/plots":778,"./layout/attributes":787,"./layout/defaults":790,"./layout/layout_attributes":791,"./ternary":792}],787:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147913,7 +146283,7 @@ module.exports = { } }; -},{}],797:[function(require,module,exports){ +},{}],788:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147978,7 +146348,7 @@ module.exports = { } }; -},{"../../../lib/extend":677,"../../cartesian/layout_attributes":735}],798:[function(require,module,exports){ +},{"../../../lib/extend":672,"../../cartesian/layout_attributes":728}],789:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148062,7 +146432,7 @@ module.exports = function supplyLayoutDefaults(containerIn, containerOut, option } }; -},{"../../../lib":685,"../../cartesian/tick_label_defaults":742,"../../cartesian/tick_mark_defaults":743,"../../cartesian/tick_value_defaults":744,"./axis_attributes":797,"tinycolor2":514}],799:[function(require,module,exports){ +},{"../../../lib":680,"../../cartesian/tick_label_defaults":734,"../../cartesian/tick_mark_defaults":735,"../../cartesian/tick_value_defaults":736,"./axis_attributes":788,"tinycolor2":511}],790:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148104,7 +146474,7 @@ function handleTernaryDefaults(ternaryLayoutIn, ternaryLayoutOut, coerce, option for(var j = 0; j < axesNames.length; j++) { axName = axesNames[j]; containerIn = ternaryLayoutIn[axName] || {}; - containerOut = ternaryLayoutOut[axName] = {_name: axName, type: 'linear'}; + containerOut = ternaryLayoutOut[axName] = {_name: axName}; handleAxisDefaults(containerIn, containerOut, options); } @@ -148125,7 +146495,7 @@ function handleTernaryDefaults(ternaryLayoutIn, ternaryLayoutOut, coerce, option } } -},{"../../../components/color":578,"../../subplot_defaults":794,"./axis_defaults":798,"./layout_attributes":800}],800:[function(require,module,exports){ +},{"../../../components/color":575,"../../subplot_defaults":785,"./axis_defaults":789,"./layout_attributes":791}],791:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148190,7 +146560,7 @@ module.exports = { caxis: ternaryAxesAttrs }; -},{"../../../components/color/attributes":577,"./axis_attributes":797}],801:[function(require,module,exports){ +},{"../../../components/color/attributes":574,"./axis_attributes":788}],792:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148393,7 +146763,6 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { // fictitious angles and domain, but then rotate and translate // it into place at the end var aaxis = _this.aaxis = extendFlat({}, ternaryLayout.aaxis, { - visible: true, range: [amin, sum - bmin - cmin], side: 'left', _counterangle: 30, @@ -148414,7 +146783,6 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { // baxis goes across the bottom (backward). We can set it up as an x axis // without any enclosing transformation. var baxis = _this.baxis = extendFlat({}, ternaryLayout.baxis, { - visible: true, range: [sum - amin - cmin, bmin], side: 'bottom', _counterangle: 30, @@ -148434,7 +146802,6 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { // caxis goes down the right side. Set it up as a y axis, with // post-transformation similar to aaxis var caxis = _this.caxis = extendFlat({}, ternaryLayout.caxis, { - visible: true, range: [sum - amin - bmin, cmin], side: 'right', _counterangle: 30, @@ -148836,7 +147203,7 @@ function removeZoombox(gd) { .remove(); } -},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../components/titles":655,"../../lib":685,"../../lib/extend":677,"../../plotly":719,"../cartesian/axes":724,"../cartesian/constants":729,"../cartesian/graph_interact":733,"../cartesian/select":740,"../cartesian/set_convert":741,"../plots":787,"d3":107,"tinycolor2":514}],802:[function(require,module,exports){ +},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../components/titles":651,"../../lib":680,"../../lib/extend":672,"../../plotly":714,"../cartesian/axes":719,"../cartesian/constants":724,"../cartesian/graph_interact":726,"../cartesian/select":732,"../cartesian/set_convert":733,"../plots":778,"d3":104,"tinycolor2":511}],793:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149027,7 +147394,7 @@ function getTraceType(traceType) { return traceType; } -},{"./lib/loggers":688,"./lib/noop":692,"./lib/push_unique":696,"./plots/attributes":722}],803:[function(require,module,exports){ +},{"./lib/loggers":683,"./lib/noop":687,"./lib/push_unique":691,"./plots/attributes":717}],794:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149100,7 +147467,6 @@ module.exports = function clonePlot(graphObj, options) { var oldLayout = graphObj.layout; var newData = extendDeep([], oldData); var newLayout = extendDeep({}, oldLayout, cloneLayoutOverride(options.tileClass)); - var context = graphObj._context || {}; if(options.width) newLayout.width = options.width; if(options.height) newLayout.height = options.height; @@ -149184,8 +147550,7 @@ module.exports = function clonePlot(graphObj, options) { options.plotGlPixelRatio, displaylogo: options.displaylogo || false, showLink: options.showLink || false, - showTips: options.showTips || false, - mapboxAccessToken: context.mapboxAccessToken + showTips: options.showTips || false } }; @@ -149199,7 +147564,7 @@ module.exports = function clonePlot(graphObj, options) { return plotTile; }; -},{"../lib":685,"../plots/plots":787}],804:[function(require,module,exports){ +},{"../lib":680,"../plots/plots":778}],795:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149265,7 +147630,7 @@ function downloadImage(gd, opts) { module.exports = downloadImage; -},{"../lib":685,"../plot_api/to_image":717,"./filesaver":805}],805:[function(require,module,exports){ +},{"../lib":680,"../plot_api/to_image":712,"./filesaver":796}],796:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149333,7 +147698,7 @@ var fileSaver = function(url, name) { module.exports = fileSaver; -},{}],806:[function(require,module,exports){ +},{}],797:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149366,7 +147731,7 @@ exports.getRedrawFunc = function(gd) { }; }; -},{}],807:[function(require,module,exports){ +},{}],798:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149392,7 +147757,7 @@ var Snapshot = { module.exports = Snapshot; -},{"./cloneplot":803,"./download":804,"./helpers":806,"./svgtoimg":808,"./toimage":809,"./tosvg":810}],808:[function(require,module,exports){ +},{"./cloneplot":794,"./download":795,"./helpers":797,"./svgtoimg":799,"./toimage":800,"./tosvg":801}],799:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149523,7 +147888,7 @@ function svgToImg(opts) { module.exports = svgToImg; -},{"../lib":685,"events":114}],809:[function(require,module,exports){ +},{"../lib":680,"events":111}],800:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149603,7 +147968,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":685,"../plotly":719,"./cloneplot":803,"./helpers":806,"./svgtoimg":808,"./tosvg":810,"events":114}],810:[function(require,module,exports){ +},{"../lib":680,"../plotly":714,"./cloneplot":794,"./helpers":797,"./svgtoimg":799,"./tosvg":801,"events":111}],801:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149722,7 +148087,7 @@ module.exports = function toSVG(gd, format) { return s; }; -},{"../components/color":578,"../components/drawing":602,"../constants/xmlns_namespaces":668,"../lib/svg_text_utils":704,"d3":107}],811:[function(require,module,exports){ +},{"../components/color":575,"../components/drawing":598,"../constants/xmlns_namespaces":664,"../lib/svg_text_utils":699,"d3":104}],802:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149740,7 +148105,6 @@ var mergeArray = require('../../lib').mergeArray; // arrayOk attributes, merge them into calcdata array module.exports = function arraysToCalcdata(cd, trace) { mergeArray(trace.text, cd, 'tx'); - mergeArray(trace.hovertext, cd, 'htx'); var marker = trace.marker; if(marker) { @@ -149755,7 +148119,7 @@ module.exports = function arraysToCalcdata(cd, trace) { } }; -},{"../../lib":685}],812:[function(require,module,exports){ +},{"../../lib":680}],803:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149807,7 +148171,6 @@ module.exports = { dy: scatterAttrs.dy, text: scatterAttrs.text, - hovertext: scatterAttrs.hovertext, textposition: { valType: 'enumerated', @@ -149905,7 +148268,7 @@ module.exports = { } }; -},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/errorbars/attributes":604,"../../lib/extend":677,"../../plots/font_attributes":748,"../scatter/attributes":976}],813:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/errorbars/attributes":600,"../../lib/extend":672,"../../plots/font_attributes":739,"../scatter/attributes":924}],804:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149957,11 +148320,18 @@ module.exports = function calc(gd, trace) { // create the "calculated data" to plot var serieslen = Math.min(pos.length, size.length), - cd = new Array(serieslen); + cd = []; - // set position and size + // set position for(i = 0; i < serieslen; i++) { - cd[i] = { p: pos[i], s: size[i] }; + + // add bars with non-numeric sizes to calcdata + // so that ensure that traces with gaps are + // plotted in the correct order + + if(isNumeric(pos[i])) { + cd.push({p: pos[i]}); + } } // set base @@ -149985,6 +148355,13 @@ module.exports = function calc(gd, trace) { } } + // set size + for(i = 0; i < cd.length; i++) { + if(isNumeric(size[i])) { + cd[i].s = size[i]; + } + } + // auto-z and autocolorscale if applicable if(hasColorscale(trace, 'marker')) { colorscaleCalc(trace, trace.marker.color, 'marker', 'c'); @@ -149998,7 +148375,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"../../plots/cartesian/axes":724,"./arrays_to_calcdata":811,"fast-isnumeric":116}],814:[function(require,module,exports){ +},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"../../plots/cartesian/axes":719,"./arrays_to_calcdata":802,"fast-isnumeric":113}],805:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150038,7 +148415,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('width'); coerce('text'); - coerce('hovertext'); var textPosition = coerce('textposition'); @@ -150058,7 +148434,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, Color.defaultLine, {axis: 'x', inherit: 'y'}); }; -},{"../../components/color":578,"../../components/errorbars/defaults":607,"../../lib":685,"../bar/style_defaults":823,"../scatter/xy_defaults":998,"./attributes":812}],815:[function(require,module,exports){ +},{"../../components/color":575,"../../components/errorbars/defaults":603,"../../lib":680,"../bar/style_defaults":814,"../scatter/xy_defaults":946,"./attributes":803}],806:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150076,56 +148452,41 @@ var Color = require('../../components/color'); module.exports = function hoverPoints(pointData, xval, yval, hovermode) { - var cd = pointData.cd; - var trace = cd[0].trace; - var t = cd[0].t; - var xa = pointData.xa; - var ya = pointData.ya; - - var posVal, thisBarMinPos, thisBarMaxPos, minPos, maxPos, dx, dy; + var cd = pointData.cd, + trace = cd[0].trace, + t = cd[0].t, + xa = pointData.xa, + ya = pointData.ya, + barDelta = (hovermode === 'closest') ? + t.barwidth / 2 : + t.bargroupwidth / 2, + barPos; - var positionFn = function(di) { - return Fx.inbox(minPos(di) - posVal, maxPos(di) - posVal); - }; + if(hovermode !== 'closest') barPos = function(di) { return di.p; }; + else if(trace.orientation === 'h') barPos = function(di) { return di.y; }; + else barPos = function(di) { return di.x; }; + var dx, dy; if(trace.orientation === 'h') { - posVal = yval; - thisBarMinPos = function(di) { return di.y - di.w / 2; }; - thisBarMaxPos = function(di) { return di.y + di.w / 2; }; dx = function(di) { // add a gradient so hovering near the end of a // bar makes it a little closer match return Fx.inbox(di.b - xval, di.x - xval) + (di.x - xval) / (di.x - di.b); }; - dy = positionFn; + dy = function(di) { + var centerPos = barPos(di) - yval; + return Fx.inbox(centerPos - barDelta, centerPos + barDelta); + }; } else { - posVal = xval; - thisBarMinPos = function(di) { return di.x - di.w / 2; }; - thisBarMaxPos = function(di) { return di.x + di.w / 2; }; dy = function(di) { return Fx.inbox(di.b - yval, di.y - yval) + (di.y - yval) / (di.y - di.b); }; - dx = positionFn; - } - - minPos = (hovermode === 'closest') ? - thisBarMinPos : - function(di) { - /* - * In compare mode, accept a bar if you're on it *or* its group. - * Nearly always it's the group that matters, but in case the bar - * was explicitly set wider than its group we'd better accept the - * whole bar. - */ - return Math.min(thisBarMinPos(di), di.p - t.bargroupwidth / 2); - }; - - maxPos = (hovermode === 'closest') ? - thisBarMaxPos : - function(di) { - return Math.max(thisBarMaxPos(di), di.p + t.bargroupwidth / 2); + dx = function(di) { + var centerPos = barPos(di) - xval; + return Fx.inbox(centerPos - barDelta, centerPos + barDelta); }; + } var distfn = Fx.getDistanceFunction(hovermode, dx, dy); Fx.getClosest(cd, distfn, pointData); @@ -150134,8 +148495,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { if(pointData.index === false) return; // the closest data point - var index = pointData.index, - di = cd[index], + var di = cd[pointData.index], mc = di.mcc || trace.marker.color, mlc = di.mlcc || trace.marker.line.color, mlw = di.mlw || trace.marker.line.width; @@ -150147,30 +148507,27 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { pointData.x0 = pointData.x1 = xa.c2p(di.x, true); pointData.xLabelVal = size; - pointData.y0 = ya.c2p(minPos(di), true); - pointData.y1 = ya.c2p(maxPos(di), true); + pointData.y0 = ya.c2p(barPos(di) - barDelta, true); + pointData.y1 = ya.c2p(barPos(di) + barDelta, true); pointData.yLabelVal = di.p; } else { pointData.y0 = pointData.y1 = ya.c2p(di.y, true); pointData.yLabelVal = size; - pointData.x0 = xa.c2p(minPos(di), true); - pointData.x1 = xa.c2p(maxPos(di), true); + pointData.x0 = xa.c2p(barPos(di) - barDelta, true); + pointData.x1 = xa.c2p(barPos(di) + barDelta, true); pointData.xLabelVal = di.p; } - if(di.htx) pointData.text = di.htx; - else if(trace.hovertext) pointData.text = trace.hovertext; - else if(di.tx) pointData.text = di.tx; - else if(trace.text) pointData.text = trace.text; + if(di.tx) pointData.text = di.tx; ErrorBars.hoverInfo(di, trace, pointData); return [pointData]; }; -},{"../../components/color":578,"../../components/errorbars":608,"../../plots/cartesian/graph_interact":733}],816:[function(require,module,exports){ +},{"../../components/color":575,"../../components/errorbars":604,"../../plots/cartesian/graph_interact":726}],807:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150211,7 +148568,7 @@ Bar.meta = { module.exports = Bar; -},{"../../plots/cartesian":734,"../scatter/colorbar":979,"./arrays_to_calcdata":811,"./attributes":812,"./calc":813,"./defaults":814,"./hover":815,"./layout_attributes":817,"./layout_defaults":818,"./plot":819,"./set_positions":820,"./style":822}],817:[function(require,module,exports){ +},{"../../plots/cartesian":727,"../scatter/colorbar":927,"./arrays_to_calcdata":802,"./attributes":803,"./calc":804,"./defaults":805,"./hover":806,"./layout_attributes":808,"./layout_defaults":809,"./plot":810,"./set_positions":811,"./style":813}],808:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150276,7 +148633,7 @@ module.exports = { } }; -},{}],818:[function(require,module,exports){ +},{}],809:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150334,7 +148691,7 @@ module.exports = function(layoutIn, layoutOut, fullData) { coerce('bargroupgap'); }; -},{"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"./layout_attributes":817}],819:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793,"./layout_attributes":808}],810:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150385,7 +148742,9 @@ module.exports = function plot(gd, plotinfo, cdbar) { var t = d[0].t, trace = d[0].trace, poffset = t.poffset, - poffsetIsArray = Array.isArray(poffset); + poffsetIsArray = Array.isArray(poffset), + barwidth = t.barwidth, + barwidthIsArray = Array.isArray(barwidth); d3.select(this).selectAll('g.point') .data(Lib.identity) @@ -150396,7 +148755,7 @@ module.exports = function plot(gd, plotinfo, cdbar) { // log values go off-screen by plotwidth // so you see them continue if you drag the plot var p0 = di.p + ((poffsetIsArray) ? poffset[i] : poffset), - p1 = p0 + di.w, + p1 = p0 + ((barwidthIsArray) ? barwidth[i] : barwidth), s0 = di.b, s1 = s0 + di.s; @@ -150854,7 +149213,7 @@ function coerceColor(attributeDefinition, value, defaultValue) { attributeDefinition.dflt; } -},{"../../components/color":578,"../../components/drawing":602,"../../components/errorbars":608,"../../lib":685,"../../lib/svg_text_utils":704,"./attributes":812,"d3":107,"fast-isnumeric":116,"tinycolor2":514}],820:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"../../components/errorbars":604,"../../lib":680,"../../lib/svg_text_utils":699,"./attributes":803,"d3":104,"fast-isnumeric":113,"tinycolor2":511}],811:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150867,7 +149226,6 @@ function coerceColor(attributeDefinition, value, defaultValue) { 'use strict'; var isNumeric = require('fast-isnumeric'); -var BADNUM = require('../../constants/numerical').BADNUM; var Registry = require('../../registry'); var Axes = require('../../plots/cartesian/axes'); @@ -150895,7 +149253,8 @@ module.exports = function setPositions(gd, plotinfo) { fullTrace.visible === true && Registry.traceIs(fullTrace, 'bar') && fullTrace.xaxis === xa._id && - fullTrace.yaxis === ya._id + fullTrace.yaxis === ya._id && + !calcTraces[i][0].placeholder ) { if(fullTrace.orientation === 'h') { calcTracesHorizontal.push(calcTraces[i]); @@ -151045,7 +149404,7 @@ function setGroupPositionsInStackOrRelativeMode(gd, pa, sa, calcTraces) { for(var j = 0; j < calcTrace.length; j++) { var bar = calcTrace[j]; - if(bar.s === BADNUM) continue; + if(!isNumeric(bar.s)) continue; var isOutmostBar = ((bar.b + bar.s) === sieve.get(bar.p, bar.s)); if(isOutmostBar) bar._outmost = true; @@ -151093,7 +149452,7 @@ function setOffsetAndWidth(gd, pa, sieve) { applyAttributes(sieve); // store the bar center in each calcdata item - setBarCenterAndWidth(gd, pa, sieve); + setBarCenter(gd, pa, sieve); // update position axes updatePositionAxis(gd, pa, sieve); @@ -151143,7 +149502,7 @@ function setOffsetAndWidthInGroupMode(gd, pa, sieve) { applyAttributes(sieve); // store the bar center in each calcdata item - setBarCenterAndWidth(gd, pa, sieve); + setBarCenter(gd, pa, sieve); // update position axes updatePositionAxis(gd, pa, sieve, overlap); @@ -151234,7 +149593,7 @@ function applyAttributes(sieve) { } -function setBarCenterAndWidth(gd, pa, sieve) { +function setBarCenter(gd, pa, sieve) { var calcTraces = sieve.traces, pLetter = getAxisLetter(pa); @@ -151249,13 +149608,9 @@ function setBarCenterAndWidth(gd, pa, sieve) { for(var j = 0; j < calcTrace.length; j++) { var calcBar = calcTrace[j]; - // store the actual bar width and position, for use by hover - var width = calcBar.w = (barwidthIsArray) ? barwidth[j] : barwidth; calcBar[pLetter] = calcBar.p + ((poffsetIsArray) ? poffset[j] : poffset) + - width / 2; - - + ((barwidthIsArray) ? barwidth[j] : barwidth) / 2; } } } @@ -151363,7 +149718,7 @@ function stackBars(gd, sa, sieve) { for(j = 0; j < trace.length; j++) { bar = trace[j]; - if(bar.s === BADNUM) continue; + if(!isNumeric(bar.s)) continue; // stack current bar and get previous sum var barBase = sieve.put(bar.p, bar.b + bar.s), @@ -151394,7 +149749,7 @@ function sieveBars(gd, sa, sieve) { for(var j = 0; j < trace.length; j++) { var bar = trace[j]; - if(bar.s !== BADNUM) sieve.put(bar.p, bar.b + bar.s); + if(isNumeric(bar.s)) sieve.put(bar.p, bar.b + bar.s); } } } @@ -151430,7 +149785,7 @@ function normalizeBars(gd, sa, sieve) { for(var j = 0; j < trace.length; j++) { var bar = trace[j]; - if(bar.s === BADNUM) continue; + if(!isNumeric(bar.s)) continue; var scale = Math.abs(sTop / sieve.get(bar.p, bar.s)); bar.b *= scale; @@ -151454,7 +149809,7 @@ function getAxisLetter(ax) { return ax._id.charAt(0); } -},{"../../constants/numerical":666,"../../plots/cartesian/axes":724,"../../registry":802,"./sieve.js":821,"fast-isnumeric":116}],821:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"../../registry":793,"./sieve.js":812,"fast-isnumeric":113}],812:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151468,7 +149823,6 @@ function getAxisLetter(ax) { module.exports = Sieve; var Lib = require('../../lib'); -var BADNUM = require('../../constants/numerical').BADNUM; /** * Helper class to sieve data from traces into bins @@ -151492,7 +149846,7 @@ function Sieve(traces, separateNegativeValues, dontMergeOverlappingData) { var trace = traces[i]; for(var j = 0; j < trace.length; j++) { var bar = trace[j]; - if(bar.p !== BADNUM) positions.push(bar.p); + positions.push(bar.p); } } this.positions = positions; @@ -151556,7 +149910,7 @@ Sieve.prototype.getLabel = function getLabel(position, value) { return prefix + label; }; -},{"../../constants/numerical":666,"../../lib":685}],822:[function(require,module,exports){ +},{"../../lib":680}],813:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151634,7 +149988,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/color":578,"../../components/drawing":602,"../../components/errorbars":608,"d3":107}],823:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"../../components/errorbars":604,"d3":104}],814:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151671,7 +150025,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, default coerce('marker.line.width'); }; -},{"../../components/color":578,"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591}],824:[function(require,module,exports){ +},{"../../components/color":575,"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588}],815:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151851,7 +150205,7 @@ module.exports = { fillcolor: scatterAttrs.fillcolor }; -},{"../../components/color/attributes":577,"../../lib/extend":677,"../scatter/attributes":976}],825:[function(require,module,exports){ +},{"../../components/color/attributes":574,"../../lib/extend":672,"../scatter/attributes":924}],816:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152000,7 +150354,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../lib":685,"../../plots/cartesian/axes":724,"fast-isnumeric":116}],826:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"fast-isnumeric":113}],817:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152073,7 +150427,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/color":578,"../../lib":685,"../../registry":802,"./attributes":824}],827:[function(require,module,exports){ +},{"../../components/color":575,"../../lib":680,"../../registry":793,"./attributes":815}],818:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152182,7 +150536,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return closeData; }; -},{"../../components/color":578,"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733}],828:[function(require,module,exports){ +},{"../../components/color":575,"../../lib":680,"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726}],819:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152228,7 +150582,7 @@ Box.meta = { module.exports = Box; -},{"../../plots/cartesian":734,"./attributes":824,"./calc":825,"./defaults":826,"./hover":827,"./layout_attributes":829,"./layout_defaults":830,"./plot":831,"./set_positions":832,"./style":833}],829:[function(require,module,exports){ +},{"../../plots/cartesian":727,"./attributes":815,"./calc":816,"./defaults":817,"./hover":818,"./layout_attributes":820,"./layout_defaults":821,"./plot":822,"./set_positions":823,"./style":824}],820:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152279,7 +150633,7 @@ module.exports = { } }; -},{}],830:[function(require,module,exports){ +},{}],821:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152313,7 +150667,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { coerce('boxgroupgap'); }; -},{"../../lib":685,"../../registry":802,"./layout_attributes":829}],831:[function(require,module,exports){ +},{"../../lib":680,"../../registry":793,"./layout_attributes":820}],822:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152553,7 +150907,7 @@ module.exports = function plot(gd, plotinfo, cdbox) { }); }; -},{"../../components/drawing":602,"../../lib":685,"d3":107}],832:[function(require,module,exports){ +},{"../../components/drawing":598,"../../lib":680,"d3":104}],823:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152647,7 +151001,7 @@ module.exports = function setPositions(gd, plotinfo) { } }; -},{"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802}],833:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793}],824:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152686,7 +151040,7 @@ module.exports = function style(gd) { }); }; -},{"../../components/color":578,"../../components/drawing":602,"d3":107}],834:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"d3":104}],825:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152744,7 +151098,7 @@ module.exports = { whiskerwidth: Lib.extendFlat({}, boxAttrs.whiskerwidth, { dflt: 0 }) }; -},{"../../lib":685,"../box/attributes":824,"../ohlc/attributes":943}],835:[function(require,module,exports){ +},{"../../lib":680,"../box/attributes":815,"../ohlc/attributes":891}],826:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152792,7 +151146,7 @@ function handleDirection(traceIn, traceOut, coerce, direction) { coerce(direction + '.fillcolor'); } -},{"../../lib":685,"../ohlc/direction_defaults":945,"../ohlc/helpers":946,"../ohlc/ohlc_defaults":948,"./attributes":834}],836:[function(require,module,exports){ +},{"../../lib":680,"../ohlc/direction_defaults":893,"../ohlc/helpers":894,"../ohlc/ohlc_defaults":896,"./attributes":825}],827:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152834,7 +151188,7 @@ module.exports = { register(require('../box')); register(require('./transform')); -},{"../../plot_api/register":714,"../../plots/cartesian":734,"../box":828,"./attributes":834,"./defaults":835,"./transform":837}],837:[function(require,module,exports){ +},{"../../plot_api/register":709,"../../plots/cartesian":727,"../box":819,"./attributes":825,"./defaults":826,"./transform":828}],828:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -152962,3577 +151316,7 @@ exports.calcTransform = function calcTransform(gd, trace, opts) { trace.y = y; }; -},{"../../lib":685,"../ohlc/helpers":946}],838:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var handleAxisDefaults = require('./axis_defaults'); - -module.exports = function handleABDefaults(traceIn, traceOut, fullLayout, coerce, dfltColor) { - var a = coerce('a'); - - if(!a) { - coerce('da'); - coerce('a0'); - } - - var b = coerce('b'); - - if(!b) { - coerce('db'); - coerce('b0'); - } - - mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor); - - return; -}; - -function mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor) { - var axesList = ['aaxis', 'baxis']; - - axesList.forEach(function(axName) { - var axLetter = axName.charAt(0); - var axIn = traceIn[axName] || {}; - var axOut = {}; - - var defaultOptions = { - tickfont: 'x', - id: axLetter + 'axis', - letter: axLetter, - font: traceOut.font, - name: axName, - data: traceIn[axLetter], - calendar: traceOut.calendar, - dfltColor: dfltColor, - bgColor: fullLayout.paper_bgcolor, - fullLayout: fullLayout - }; - - handleAxisDefaults(axIn, axOut, defaultOptions); - - axOut._categories = axOut._categories || []; - - traceOut[axName] = axOut; - - // so we don't have to repeat autotype unnecessarily, - // copy an autotype back to traceIn - if(!traceIn[axName] && axIn.type !== '-') { - traceIn[axName] = {type: axIn.type}; - } - }); -} - -},{"./axis_defaults":843}],839:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = function(a) { - return minMax(a, 0); -}; - -function minMax(a, depth) { - // Limit to ten dimensional datasets. This seems *exceedingly* unlikely to - // ever cause problems or even be a concern. It's include strictly so that - // circular arrays could never cause this to loop. - if(!Array.isArray(a) || depth >= 10) { - return null; - } - - var min = Infinity; - var max = -Infinity; - var n = a.length; - for(var i = 0; i < n; i++) { - var datum = a[i]; - - if(Array.isArray(datum)) { - var result = minMax(datum, depth + 1); - - if(result) { - min = Math.min(result[0], min); - max = Math.max(result[1], max); - } - } else { - min = Math.min(datum, min); - max = Math.max(datum, max); - } - } - - return [min, max]; -} - -},{}],840:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var extendFlat = require('../../lib/extend').extendFlat; -var fontAttrs = require('../../plots/font_attributes'); -var axisAttrs = require('./axis_attributes'); -var colorAttrs = require('../../components/color/attributes'); - -module.exports = { - carpet: { - valType: 'string', - role: 'info', - description: [ - 'An identifier for this carpet, so that `scattercarpet` and', - '`scattercontour` traces can specify a carpet plot on which', - 'they lie' - ].join(' ') - }, - x: { - valType: 'data_array', - description: [ - 'A two dimensional array of x coordinates at each carpet point.', - 'If ommitted, the plot is a cheater plot and the xaxis is hidden', - 'by default.' - ].join(' ') - }, - y: { - valType: 'data_array', - description: 'A two dimensional array of y coordinates at each carpet point.' - }, - a: { - valType: 'data_array', - description: [ - 'An array containing values of the first parameter value' - ].join(' ') - }, - a0: { - valType: 'number', - dflt: 0, - role: 'info', - description: [ - 'Alternate to `a`.', - 'Builds a linear space of a coordinates.', - 'Use with `da`', - 'where `a0` is the starting coordinate and `da` the step.' - ].join(' ') - }, - da: { - valType: 'number', - dflt: 1, - role: 'info', - description: [ - 'Sets the a coordinate step.', - 'See `a0` for more info.' - ].join(' ') - }, - b: { - valType: 'data_array', - description: 'A two dimensional array of y coordinates at each carpet point.' - }, - b0: { - valType: 'number', - dflt: 0, - role: 'info', - description: [ - 'Alternate to `b`.', - 'Builds a linear space of a coordinates.', - 'Use with `db`', - 'where `b0` is the starting coordinate and `db` the step.' - ].join(' ') - }, - db: { - valType: 'number', - dflt: 1, - role: 'info', - description: [ - 'Sets the b coordinate step.', - 'See `b0` for more info.' - ].join(' ') - }, - cheaterslope: { - valType: 'number', - role: 'info', - dflt: 1, - description: [ - 'The shift applied to each successive row of data in creating a cheater plot.', - 'Only used if `x` is been ommitted.' - ].join(' ') - }, - aaxis: extendFlat({}, axisAttrs), - baxis: extendFlat({}, axisAttrs), - font: { - family: extendFlat({}, fontAttrs.family, { - dflt: '"Open Sans", verdana, arial, sans-serif' - }), - size: extendFlat({}, fontAttrs.size, { - dflt: 12 - }), - color: extendFlat({}, fontAttrs.color, { - dflt: colorAttrs.defaultLine - }), - }, - color: { - valType: 'color', - dflt: colorAttrs.defaultLine, - role: 'style', - description: [ - 'Sets default for all colors associated with this axis', - 'all at once: line, font, tick, and grid colors.', - 'Grid color is lightened by blending this with the plot background', - 'Individual pieces can override this.' - ].join(' ') - }, -}; - -},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/font_attributes":748,"./axis_attributes":842}],841:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* This function retrns a set of control points that define a curve aligned along - * either the a or b axis. Exactly one of a or b must be an array defining the range - * spanned. - * - * Honestly this is the most complicated function I've implemente here so far because - * of the way it handles knot insertion and direction/axis-agnostic slices. - */ -module.exports = function(carpet, carpetcd, a, b) { - var idx, tangent, tanIsoIdx, tanIsoPar, segment, refidx; - var p0, p1, v0, v1, start, end, range; - - var axis = Array.isArray(a) ? 'a' : 'b'; - var ax = axis === 'a' ? carpet.aaxis : carpet.baxis; - var smoothing = ax.smoothing; - var toIdx = axis === 'a' ? carpet.a2i : carpet.b2j; - var pt = axis === 'a' ? a : b; - var iso = axis === 'a' ? b : a; - var n = axis === 'a' ? carpetcd.a.length : carpetcd.b.length; - var m = axis === 'a' ? carpetcd.b.length : carpetcd.a.length; - var isoIdx = Math.floor(axis === 'a' ? carpet.b2j(iso) : carpet.a2i(iso)); - - var xy = axis === 'a' ? function(value) { - return carpet.evalxy([], value, isoIdx); - } : function(value) { - return carpet.evalxy([], isoIdx, value); - }; - - if(smoothing) { - tanIsoIdx = Math.max(0, Math.min(m - 2, isoIdx)); - tanIsoPar = isoIdx - tanIsoIdx; - tangent = axis === 'a' ? function(i, ti) { - return carpet.dxydi([], i, tanIsoIdx, ti, tanIsoPar); - } : function(j, tj) { - return carpet.dxydj([], tanIsoIdx, j, tanIsoPar, tj); - }; - } - - var vstart = toIdx(pt[0]); - var vend = toIdx(pt[1]); - - // So that we can make this work in two directions, flip all of the - // math functions if the direction is from higher to lower indices: - // - // Note that the tolerance is directional! - var dir = vstart < vend ? 1 : -1; - var tol = (vend - vstart) * 1e-8; - var dirfloor = dir > 0 ? Math.floor : Math.ceil; - var dirceil = dir > 0 ? Math.ceil : Math.floor; - var dirmin = dir > 0 ? Math.min : Math.max; - var dirmax = dir > 0 ? Math.max : Math.min; - - var idx0 = dirfloor(vstart + tol); - var idx1 = dirceil(vend - tol); - - p0 = xy(vstart); - var segments = [[p0]]; - - for(idx = idx0; idx * dir < idx1 * dir; idx += dir) { - segment = []; - start = dirmax(vstart, idx); - end = dirmin(vend, idx + dir); - range = end - start; - - // In order to figure out which cell we're in for the derivative (remember, - // the derivatives are *not* constant across grid lines), let's just average - // the start and end points. This cuts out just a tiny bit of logic and - // there's really no computational difference: - refidx = Math.max(0, Math.min(n - 2, Math.floor(0.5 * (start + end)))); - - p1 = xy(end); - if(smoothing) { - v0 = tangent(refidx, start - refidx); - v1 = tangent(refidx, end - refidx); - - segment.push([ - p0[0] + v0[0] / 3 * range, - p0[1] + v0[1] / 3 * range - ]); - - segment.push([ - p1[0] - v1[0] / 3 * range, - p1[1] - v1[1] / 3 * range - ]); - } - - segment.push(p1); - - segments.push(segment); - p0 = p1; - } - - return segments; -}; - -},{}],842:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var extendFlat = require('../../lib/extend').extendFlat; -var fontAttrs = require('../../plots/font_attributes'); -var colorAttrs = require('../../components/color/attributes'); - -module.exports = { - color: { - valType: 'color', - role: 'style', - description: [ - 'Sets default for all colors associated with this axis', - 'all at once: line, font, tick, and grid colors.', - 'Grid color is lightened by blending this with the plot background', - 'Individual pieces can override this.' - ].join(' ') - }, - smoothing: { - valType: 'number', - dflt: 1, - min: 0, - max: 1.3, - role: 'info' - }, - title: { - valType: 'string', - role: 'info', - description: 'Sets the title of this axis.' - }, - titlefont: extendFlat({}, fontAttrs, { - description: [ - 'Sets this axis\' title font.' - ].join(' ') - }), - titleoffset: { - valType: 'number', - role: 'info', - dflt: 10, - description: [ - 'An additional amount by which to offset the title from the tick', - 'labels, given in pixels' - ].join(' '), - }, - type: { - valType: 'enumerated', - // '-' means we haven't yet run autotype or couldn't find any data - // it gets turned into linear in gd._fullLayout but not copied back - // to gd.data like the others are. - values: ['-', 'linear', 'date', 'category'], - dflt: '-', - role: 'info', - description: [ - 'Sets the axis type.', - 'By default, plotly attempts to determined the axis type', - 'by looking into the data of the traces that referenced', - 'the axis in question.' - ].join(' ') - }, - autorange: { - valType: 'enumerated', - values: [true, false, 'reversed'], - dflt: true, - role: 'style', - description: [ - 'Determines whether or not the range of this axis is', - 'computed in relation to the input data.', - 'See `rangemode` for more info.', - 'If `range` is provided, then `autorange` is set to *false*.' - ].join(' ') - }, - rangemode: { - valType: 'enumerated', - values: ['normal', 'tozero', 'nonnegative'], - dflt: 'normal', - role: 'style', - description: [ - 'If *normal*, the range is computed in relation to the extrema', - 'of the input data.', - 'If *tozero*`, the range extends to 0,', - 'regardless of the input data', - 'If *nonnegative*, the range is non-negative,', - 'regardless of the input data.' - ].join(' ') - }, - range: { - valType: 'info_array', - role: 'info', - items: [ - {valType: 'any'}, - {valType: 'any'} - ], - description: [ - 'Sets the range of this axis.', - 'If the axis `type` is *log*, then you must take the log of your', - 'desired range (e.g. to set the range from 1 to 100,', - 'set the range from 0 to 2).', - 'If the axis `type` is *date*, it should be date strings,', - 'like date data, though Date objects and unix milliseconds', - 'will be accepted and converted to strings.', - 'If the axis `type` is *category*, it should be numbers,', - 'using the scale where each category is assigned a serial', - 'number from zero in the order it appears.' - ].join(' ') - }, - - fixedrange: { - valType: 'boolean', - dflt: false, - role: 'info', - description: [ - 'Determines whether or not this axis is zoom-able.', - 'If true, then zoom is disabled.' - ].join(' ') - }, - cheatertype: { - valType: 'enumerated', - values: ['index', 'value'], - dflt: 'value', - role: 'info' - }, - tickmode: { - valType: 'enumerated', - values: ['linear', 'array'], - dflt: 'array', - role: 'info', - }, - nticks: { - valType: 'integer', - min: 0, - dflt: 0, - role: 'style', - description: [ - 'Specifies the maximum number of ticks for the particular axis.', - 'The actual number of ticks will be chosen automatically to be', - 'less than or equal to `nticks`.', - 'Has an effect only if `tickmode` is set to *auto*.' - ].join(' ') - }, - tickvals: { - valType: 'data_array', - description: [ - 'Sets the values at which ticks on this axis appear.', - 'Only has an effect if `tickmode` is set to *array*.', - 'Used with `ticktext`.' - ].join(' ') - }, - ticktext: { - valType: 'data_array', - description: [ - 'Sets the text displayed at the ticks position via `tickvals`.', - 'Only has an effect if `tickmode` is set to *array*.', - 'Used with `tickvals`.' - ].join(' ') - }, - showticklabels: { - valType: 'enumerated', - values: ['start', 'end', 'both', 'none'], - dflt: 'start', - role: 'style', - description: [ - 'Determines whether axis labels are drawn on the low side,', - 'the high side, both, or neither side of the axis.' - ].join(' ') - }, - tickfont: extendFlat({}, fontAttrs, { - description: 'Sets the tick font.' - }), - tickangle: { - valType: 'angle', - dflt: 'auto', - role: 'style', - description: [ - 'Sets the angle of the tick labels with respect to the horizontal.', - 'For example, a `tickangle` of -90 draws the tick labels', - 'vertically.' - ].join(' ') - }, - tickprefix: { - valType: 'string', - dflt: '', - role: 'style', - description: 'Sets a tick label prefix.' - }, - showtickprefix: { - valType: 'enumerated', - values: ['all', 'first', 'last', 'none'], - dflt: 'all', - role: 'style', - description: [ - 'If *all*, all tick labels are displayed with a prefix.', - 'If *first*, only the first tick is displayed with a prefix.', - 'If *last*, only the last tick is displayed with a suffix.', - 'If *none*, tick prefixes are hidden.' - ].join(' ') - }, - ticksuffix: { - valType: 'string', - dflt: '', - role: 'style', - description: 'Sets a tick label suffix.' - }, - showticksuffix: { - valType: 'enumerated', - values: ['all', 'first', 'last', 'none'], - dflt: 'all', - role: 'style', - description: 'Same as `showtickprefix` but for tick suffixes.' - }, - showexponent: { - valType: 'enumerated', - values: ['all', 'first', 'last', 'none'], - dflt: 'all', - role: 'style', - description: [ - 'If *all*, all exponents are shown besides their significands.', - 'If *first*, only the exponent of the first tick is shown.', - 'If *last*, only the exponent of the last tick is shown.', - 'If *none*, no exponents appear.' - ].join(' ') - }, - exponentformat: { - valType: 'enumerated', - values: ['none', 'e', 'E', 'power', 'SI', 'B'], - dflt: 'B', - role: 'style', - description: [ - 'Determines a formatting rule for the tick exponents.', - 'For example, consider the number 1,000,000,000.', - 'If *none*, it appears as 1,000,000,000.', - 'If *e*, 1e+9.', - 'If *E*, 1E+9.', - 'If *power*, 1x10^9 (with 9 in a super script).', - 'If *SI*, 1G.', - 'If *B*, 1B.' - ].join(' ') - }, - separatethousands: { - valType: 'boolean', - dflt: false, - role: 'style', - description: [ - 'If "true", even 4-digit integers are separated' - ].join(' ') - }, - tickformat: { - valType: 'string', - dflt: '', - role: 'style', - description: [ - 'Sets the tick label formatting rule using d3 formatting mini-languages', - 'which are very similar to those in Python. For numbers, see:', - 'https://github.com/d3/d3-format/blob/master/README.md#locale_format', - 'And for dates see:', - 'https://github.com/d3/d3-time-format/blob/master/README.md#locale_format', - 'We add one item to d3\'s date formatter: *%{n}f* for fractional seconds', - 'with n digits. For example, *2016-10-13 09:15:23.456* with tickformat', - '*%H~%M~%S.%2f* would display *09~15~23.46*' - ].join(' ') - }, - categoryorder: { - valType: 'enumerated', - values: [ - 'trace', 'category ascending', 'category descending', 'array' - /* , 'value ascending', 'value descending'*/ // value ascending / descending to be implemented later - ], - dflt: 'trace', - role: 'info', - description: [ - 'Specifies the ordering logic for the case of categorical variables.', - 'By default, plotly uses *trace*, which specifies the order that is present in the data supplied.', - 'Set `categoryorder` to *category ascending* or *category descending* if order should be determined by', - 'the alphanumerical order of the category names.', - /* 'Set `categoryorder` to *value ascending* or *value descending* if order should be determined by the', - 'numerical order of the values.',*/ // // value ascending / descending to be implemented later - 'Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category', - 'is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to', - 'the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.' - ].join(' ') - }, - categoryarray: { - valType: 'data_array', - role: 'info', - description: [ - 'Sets the order in which categories on this axis appear.', - 'Only has an effect if `categoryorder` is set to *array*.', - 'Used with `categoryorder`.' - ].join(' ') - }, - labelpadding: { - valType: 'integer', - role: 'style', - dflt: 10, - description: 'Extra padding between label and the axis' - }, - labelprefix: { - valType: 'string', - role: 'style', - description: 'Sets a axis label prefix.' - }, - labelsuffix: { - valType: 'string', - dflt: '', - role: 'style', - description: 'Sets a axis label suffix.' - }, - // lines and grids - showline: { - valType: 'boolean', - dflt: false, - role: 'style', - description: [ - 'Determines whether or not a line bounding this axis is drawn.' - ].join(' ') - }, - linecolor: { - valType: 'color', - dflt: colorAttrs.defaultLine, - role: 'style', - description: 'Sets the axis line color.' - }, - linewidth: { - valType: 'number', - min: 0, - dflt: 1, - role: 'style', - description: 'Sets the width (in px) of the axis line.' - }, - gridcolor: { - valType: 'color', - role: 'style', - description: 'Sets the axis line color.' - }, - gridwidth: { - valType: 'number', - min: 0, - dflt: 1, - role: 'style', - description: 'Sets the width (in px) of the axis line.' - }, - showgrid: { - valType: 'boolean', - role: 'style', - dflt: true, - description: [ - 'Determines whether or not grid lines are drawn.', - 'If *true*, the grid lines are drawn at every tick mark.' - ].join(' ') - }, - minorgridcount: { - valType: 'integer', - min: 0, - dflt: 0, - role: 'info', - description: 'Sets the number of minor grid ticks per major grid tick' - }, - minorgridwidth: { - valType: 'number', - min: 0, - dflt: 1, - role: 'style', - description: 'Sets the width (in px) of the grid lines.' - }, - minorgridcolor: { - valType: 'color', - dflt: colorAttrs.lightLine, - role: 'style', - description: 'Sets the color of the grid lines.' - }, - startline: { - valType: 'boolean', - role: 'style', - description: [ - 'Determines whether or not a line is drawn at along the starting value', - 'of this axis.', - 'If *true*, the start line is drawn on top of the grid lines.' - ].join(' ') - }, - startlinecolor: { - valType: 'color', - role: 'style', - description: 'Sets the line color of the start line.' - }, - startlinewidth: { - valType: 'number', - dflt: 1, - role: 'style', - description: 'Sets the width (in px) of the start line.' - }, - endline: { - valType: 'boolean', - role: 'style', - description: [ - 'Determines whether or not a line is drawn at along the final value', - 'of this axis.', - 'If *true*, the end line is drawn on top of the grid lines.' - ].join(' ') - }, - endlinewidth: { - valType: 'number', - dflt: 1, - role: 'style', - description: 'Sets the width (in px) of the end line.' - }, - endlinecolor: { - valType: 'color', - role: 'style', - description: 'Sets the line color of the end line.' - }, - tick0: { - valType: 'number', - min: 0, - dflt: 0, - role: 'info', - description: 'The starting index of grid lines along the axis' - }, - dtick: { - valType: 'number', - min: 0, - dflt: 1, - role: 'info', - description: 'The stride between grid lines along the axis' - }, - arraytick0: { - valType: 'integer', - min: 0, - dflt: 0, - role: 'info', - description: 'The starting index of grid lines along the axis' - }, - arraydtick: { - valType: 'integer', - min: 1, - dflt: 1, - role: 'info', - description: 'The stride between grid lines along the axis' - }, -}; - -},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/font_attributes":748}],843:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var carpetAttrs = require('./attributes'); - -var addOpacity = require('../../components/color').addOpacity; -var Registry = require('../../registry'); -var Lib = require('../../lib'); -var handleTickValueDefaults = require('../../plots/cartesian/tick_value_defaults'); -var handleTickLabelDefaults = require('../../plots/cartesian/tick_label_defaults'); -var handleCategoryOrderDefaults = require('../../plots/cartesian/category_order_defaults'); -var setConvert = require('../../plots/cartesian/set_convert'); -var orderedCategories = require('../../plots/cartesian/ordered_categories'); -var autoType = require('../../plots/cartesian/axis_autotype'); - -/** - * options: object containing: - * - * letter: 'x' or 'y' - * title: name of the axis (ie 'Colorbar') to go in default title - * name: axis object name (ie 'xaxis') if one should be stored - * font: the default font to inherit - * outerTicks: boolean, should ticks default to outside? - * showGrid: boolean, should gridlines be shown by default? - * noHover: boolean, this axis doesn't support hover effects? - * data: the plot data to use in choosing auto type - * bgColor: the plot background color, to calculate default gridline colors - */ -module.exports = function handleAxisDefaults(containerIn, containerOut, options) { - var letter = options.letter, - font = options.font || {}, - attributes = carpetAttrs[letter + 'axis']; - - options.noHover = true; - - function coerce(attr, dflt) { - return Lib.coerce(containerIn, containerOut, attributes, attr, dflt); - } - - function coerce2(attr, dflt) { - return Lib.coerce2(containerIn, containerOut, attributes, attr, dflt); - } - - // set up some private properties - if(options.name) { - containerOut._name = options.name; - containerOut._id = options.name; - } - - // now figure out type and do some more initialization - var axType = coerce('type'); - if(axType === '-') { - if(options.data) setAutoType(containerOut, options.data); - - if(containerOut.type === '-') { - containerOut.type = 'linear'; - } - else { - // copy autoType back to input axis - // note that if this object didn't exist - // in the input layout, we have to put it in - // this happens in the main supplyDefaults function - axType = containerIn.type = containerOut.type; - } - } - - coerce('smoothing'); - coerce('cheatertype'); - - coerce('showticklabels'); - coerce('labelprefix', letter + ' = '); - coerce('labelsuffix'); - coerce('showtickprefix'); - coerce('showticksuffix'); - - coerce('separatethousands'); - coerce('tickformat'); - coerce('exponentformat'); - coerce('showexponent'); - coerce('categoryorder'); - - coerce('tickmode'); - coerce('tickvals'); - coerce('ticktext'); - coerce('tick0'); - coerce('dtick'); - - if(containerOut.tickmode === 'array') { - coerce('arraytick0'); - coerce('arraydtick'); - } - - coerce('labelpadding'); - - containerOut._hovertitle = letter; - - - if(axType === 'date') { - var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleDefaults'); - handleCalendarDefaults(containerIn, containerOut, 'calendar', options.calendar); - } - - setConvert(containerOut, options.fullLayout); - - var dfltColor = coerce('color', options.dfltColor); - // if axis.color was provided, use it for fonts too; otherwise, - // inherit from global font color in case that was provided. - var dfltFontColor = (dfltColor === containerIn.color) ? dfltColor : font.color; - - coerce('title'); - Lib.coerceFont(coerce, 'titlefont', { - family: font.family, - size: Math.round(font.size * 1.2), - color: dfltFontColor - }); - - coerce('titleoffset'); - - coerce('tickangle'); - - var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range)); - - if(autoRange) coerce('rangemode'); - - coerce('range'); - containerOut.cleanRange(); - - coerce('fixedrange'); - - handleTickValueDefaults(containerIn, containerOut, coerce, axType); - handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options); - handleCategoryOrderDefaults(containerIn, containerOut, coerce); - - var gridColor = coerce2('gridcolor', addOpacity(dfltColor, 0.3)); - var gridWidth = coerce2('gridwidth'); - var showGrid = coerce('showgrid'); - - if(!showGrid) { - delete containerOut.gridcolor; - delete containerOut.gridwidth; - } - - var startLineColor = coerce2('startlinecolor', dfltColor); - var startLineWidth = coerce2('startlinewidth', gridWidth); - var showStartLine = coerce('startline', containerOut.showgrid || !!startLineColor || !!startLineWidth); - - if(!showStartLine) { - delete containerOut.startlinecolor; - delete containerOut.startlinewidth; - } - - var endLineColor = coerce2('endlinecolor', dfltColor); - var endLineWidth = coerce2('endlinewidth', gridWidth); - var showEndLine = coerce('endline', containerOut.showgrid || !!endLineColor || !!endLineWidth); - - if(!showEndLine) { - delete containerOut.endlinecolor; - delete containerOut.endlinewidth; - } - - if(!showGrid) { - delete containerOut.gridcolor; - delete containerOut.gridWidth; - } else { - coerce('minorgridcount'); - coerce('minorgridwidth', gridWidth); - coerce('minorgridcolor', addOpacity(gridColor, 0.06)); - - if(!containerOut.minorgridcount) { - delete containerOut.minorgridwidth; - delete containerOut.minorgridcolor; - } - } - - containerOut._separators = options.fullLayout.separators; - - // fill in categories - containerOut._initialCategories = axType === 'category' ? - orderedCategories(letter, containerOut.categoryorder, containerOut.categoryarray, options.data) : - []; - - if(containerOut.showticklabels === 'none') { - delete containerOut.tickfont; - delete containerOut.tickangle; - delete containerOut.showexponent; - delete containerOut.exponentformat; - delete containerOut.tickformat; - delete containerOut.showticksuffix; - delete containerOut.showtickprefix; - } - - if(!containerOut.showticksuffix) { - delete containerOut.ticksuffix; - } - - if(!containerOut.showtickprefix) { - delete containerOut.tickprefix; - } - - // It needs to be coerced, then something above overrides this deep in the axis code, - // but no, we *actually* want to coerce this. - coerce('tickmode'); - - if(!containerOut.title || (containerOut.title && containerOut.title.length === 0)) { - delete containerOut.titlefont; - delete containerOut.titleoffset; - } - - return containerOut; -}; - -function setAutoType(ax, data) { - // new logic: let people specify any type they want, - // only autotype if type is '-' - if(ax.type !== '-') return; - - var id = ax._id, - axLetter = id.charAt(0); - - var calAttr = axLetter + 'calendar', - calendar = ax[calAttr]; - - ax.type = autoType(data, calendar); -} - -},{"../../components/color":578,"../../lib":685,"../../plots/cartesian/axis_autotype":725,"../../plots/cartesian/category_order_defaults":728,"../../plots/cartesian/ordered_categories":737,"../../plots/cartesian/set_convert":741,"../../plots/cartesian/tick_label_defaults":742,"../../plots/cartesian/tick_value_defaults":744,"../../registry":802,"./attributes":840}],844:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Axes = require('../../plots/cartesian/axes'); -var cheaterBasis = require('./cheater_basis'); -var arrayMinmax = require('./array_minmax'); -var map2dArray = require('./map_2d_array'); -var calcGridlines = require('./calc_gridlines'); -var calcLabels = require('./calc_labels'); -var calcClipPath = require('./calc_clippath'); -var clean2dArray = require('../heatmap/clean_2d_array'); -var smoothFill2dArray = require('./smooth_fill_2d_array'); - -module.exports = function calc(gd, trace) { - var xa = Axes.getFromId(gd, trace.xaxis || 'x'); - var ya = Axes.getFromId(gd, trace.yaxis || 'y'); - var aax = trace.aaxis; - var bax = trace.baxis; - var a = trace._a = trace.a; - var b = trace._b = trace.b; - - var t = {}; - var x; - var y = trace.y; - - if(trace._cheater) { - var avals = aax.cheatertype === 'index' ? a.length : a; - var bvals = bax.cheatertype === 'index' ? b.length : b; - trace.x = x = cheaterBasis(avals, bvals, trace.cheaterslope); - } else { - x = trace.x; - } - - trace._x = trace.x = x = clean2dArray(x); - trace._y = trace.y = y = clean2dArray(y); - - // Fill in any undefined values with elliptic smoothing. This doesn't take - // into account the spacing of the values. That is, the derivatives should - // be modified to use a and b values. It's not that hard, but this is already - // moderate overkill for just filling in missing values. - smoothFill2dArray(x, a, b); - smoothFill2dArray(y, a, b); - - // create conversion functions that depend on the data - trace.setScale(); - - // Convert cartesian-space x/y coordinates to screen space pixel coordinates: - t.xp = trace.xp = map2dArray(trace.xp, x, xa.c2p); - t.yp = trace.yp = map2dArray(trace.yp, y, ya.c2p); - - // This is a rather expensive scan. Nothing guarantees monotonicity, - // so we need to scan through all data to get proper ranges: - var xrange = arrayMinmax(x); - var yrange = arrayMinmax(y); - - var dx = 0.5 * (xrange[1] - xrange[0]); - var xc = 0.5 * (xrange[1] + xrange[0]); - - var dy = 0.5 * (yrange[1] - yrange[0]); - var yc = 0.5 * (yrange[1] + yrange[0]); - - // Expand the axes to fit the plot, except just grow it by a factor of 1.3 - // because the labels should be taken into account except that's difficult - // hence 1.3. - var grow = 1.3; - xrange = [xc - dx * grow, xc + dx * grow]; - yrange = [yc - dy * grow, yc + dy * grow]; - - Axes.expand(xa, xrange, {padded: true}); - Axes.expand(ya, yrange, {padded: true}); - - // Enumerate the gridlines, both major and minor, and store them on the trace - // object: - calcGridlines(trace, t, 'a', 'b'); - calcGridlines(trace, t, 'b', 'a'); - - // Calculate the text labels for each major gridline and store them on the - // trace object: - calcLabels(trace, aax); - calcLabels(trace, bax); - - // Tabulate points for the four segments that bound the axes so that we can - // map to pixel coordinates in the plot function and create a clip rect: - t.clipsegments = calcClipPath(trace.xctrl, trace.yctrl, aax, bax); - - t.x = x; - t.y = y; - t.a = a; - t.b = b; - - return [t]; -}; - -},{"../../plots/cartesian/axes":724,"../heatmap/clean_2d_array":905,"./array_minmax":839,"./calc_clippath":845,"./calc_gridlines":846,"./calc_labels":847,"./cheater_basis":849,"./map_2d_array":861,"./smooth_fill_2d_array":865}],845:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -module.exports = function makeClipPath(xctrl, yctrl, aax, bax) { - var i, x, y; - var segments = []; - - var asmoothing = !!aax.smoothing; - var bsmoothing = !!bax.smoothing; - var nea1 = xctrl[0].length - 1; - var neb1 = xctrl.length - 1; - - // Along the lower a axis: - for(i = 0, x = [], y = []; i <= nea1; i++) { - x[i] = xctrl[0][i]; - y[i] = yctrl[0][i]; - } - segments.push({x: x, y: y, bicubic: asmoothing}); - - // Along the upper b axis: - for(i = 0, x = [], y = []; i <= neb1; i++) { - x[i] = xctrl[i][nea1]; - y[i] = yctrl[i][nea1]; - } - segments.push({x: x, y: y, bicubic: bsmoothing}); - - // Backwards along the upper a axis: - for(i = nea1, x = [], y = []; i >= 0; i--) { - x[nea1 - i] = xctrl[neb1][i]; - y[nea1 - i] = yctrl[neb1][i]; - } - segments.push({x: x, y: y, bicubic: asmoothing}); - - // Backwards along the lower b axis: - for(i = neb1, x = [], y = []; i >= 0; i--) { - x[neb1 - i] = xctrl[i][0]; - y[neb1 - i] = yctrl[i][0]; - } - segments.push({x: x, y: y, bicubic: bsmoothing}); - - return segments; -}; - -},{}],846:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Axes = require('../../plots/cartesian/axes'); -var extendFlat = require('../../lib/extend').extendFlat; - -module.exports = function calcGridlines(trace, cd, axisLetter, crossAxisLetter) { - var i, j, j0; - var eps, bounds, n1, n2, n, value, v; - var j1, v0, v1, d; - - var data = trace[axisLetter]; - var axis = trace[axisLetter + 'axis']; - - var gridlines = axis._gridlines = []; - var minorgridlines = axis._minorgridlines = []; - var boundarylines = axis._boundarylines = []; - - var crossData = trace[crossAxisLetter]; - var crossAxis = trace[crossAxisLetter + 'axis']; - - if(axis.tickmode === 'array') { - axis.tickvals = []; - for(i = 0; i < data.length; i++) { - axis.tickvals.push(data[i]); - } - } - - var xcp = trace.xctrl; - var ycp = trace.yctrl; - var nea = xcp[0].length; - var neb = xcp.length; - var na = trace.a.length; - var nb = trace.b.length; - - Axes.calcTicks(axis); - - // The default is an empty array that will cause the join to remove the gridline if - // it's just disappeared: - // axis._startline = axis._endline = []; - - // If the cross axis uses bicubic interpolation, then the grid - // lines fall once every three expanded grid row/cols: - var stride = axis.smoothing ? 3 : 1; - - function constructValueGridline(value) { - var i, j, j0, tj, pxy, i0, ti, xy, dxydi0, dxydi1, dxydj0, dxydj1; - var xpoints = []; - var ypoints = []; - var ret = {}; - // Search for the fractional grid index giving this line: - if(axisLetter === 'b') { - // For the position we use just the i-j coordinates: - j = trace.b2j(value); - - // The derivatives for catmull-rom splines are discontinuous across cell - // boundaries though, so we need to provide both the cell and the position - // within the cell separately: - j0 = Math.floor(Math.max(0, Math.min(nb - 2, j))); - tj = j - j0; - - ret.length = nb; - ret.crossLength = na; - - ret.xy = function(i) { - return trace.evalxy([], i, j); - }; - - ret.dxy = function(i0, ti) { - return trace.dxydi([], i0, j0, ti, tj); - }; - - for(i = 0; i < na; i++) { - i0 = Math.min(na - 2, i); - ti = i - i0; - xy = trace.evalxy([], i, j); - - if(crossAxis.smoothing && i > 0) { - // First control point: - dxydi0 = trace.dxydi([], i - 1, j0, 0, tj); - xpoints.push(pxy[0] + dxydi0[0] / 3); - ypoints.push(pxy[1] + dxydi0[1] / 3); - - // Second control point: - dxydi1 = trace.dxydi([], i - 1, j0, 1, tj); - xpoints.push(xy[0] - dxydi1[0] / 3); - ypoints.push(xy[1] - dxydi1[1] / 3); - } - - xpoints.push(xy[0]); - ypoints.push(xy[1]); - - pxy = xy; - } - } else { - i = trace.a2i(value); - i0 = Math.floor(Math.max(0, Math.min(na - 2, i))); - ti = i - i0; - - ret.length = na; - ret.crossLength = nb; - - ret.xy = function(j) { - return trace.evalxy([], i, j); - }; - - ret.dxy = function(j0, tj) { - return trace.dxydj([], i0, j0, ti, tj); - }; - - for(j = 0; j < nb; j++) { - j0 = Math.min(nb - 2, j); - tj = j - j0; - xy = trace.evalxy([], i, j); - - if(crossAxis.smoothing && j > 0) { - // First control point: - dxydj0 = trace.dxydj([], i0, j - 1, ti, 0); - xpoints.push(pxy[0] + dxydj0[0] / 3); - ypoints.push(pxy[1] + dxydj0[1] / 3); - - // Second control point: - dxydj1 = trace.dxydj([], i0, j - 1, ti, 1); - xpoints.push(xy[0] - dxydj1[0] / 3); - ypoints.push(xy[1] - dxydj1[1] / 3); - } - - xpoints.push(xy[0]); - ypoints.push(xy[1]); - - pxy = xy; - } - } - - ret.axisLetter = axisLetter; - ret.axis = axis; - ret.crossAxis = crossAxis; - ret.value = value; - ret.constvar = crossAxisLetter; - ret.index = n; - ret.x = xpoints; - ret.y = ypoints; - ret.smoothing = crossAxis.smoothing; - - return ret; - } - - function constructArrayGridline(idx) { - var j, i0, j0, ti, tj; - var xpoints = []; - var ypoints = []; - var ret = {}; - ret.length = data.length; - ret.crossLength = crossData.length; - - if(axisLetter === 'b') { - j0 = Math.max(0, Math.min(nb - 2, idx)); - tj = Math.min(1, Math.max(0, idx - j0)); - - ret.xy = function(i) { - return trace.evalxy([], i, idx); - }; - - ret.dxy = function(i0, ti) { - return trace.dxydi([], i0, j0, ti, tj); - }; - - // In the tickmode: array case, this operation is a simple - // transfer of data: - for(j = 0; j < nea; j++) { - xpoints[j] = xcp[idx * stride][j]; - ypoints[j] = ycp[idx * stride][j]; - } - } else { - i0 = Math.max(0, Math.min(na - 2, idx)); - ti = Math.min(1, Math.max(0, idx - i0)); - - ret.xy = function(j) { - return trace.evalxy([], idx, j); - }; - - ret.dxy = function(j0, tj) { - return trace.dxydj([], i0, j0, ti, tj); - }; - - // In the tickmode: array case, this operation is a simple - // transfer of data: - for(j = 0; j < neb; j++) { - xpoints[j] = xcp[j][idx * stride]; - ypoints[j] = ycp[j][idx * stride]; - } - } - - ret.axisLetter = axisLetter; - ret.axis = axis; - ret.crossAxis = crossAxis; - ret.value = data[idx]; - ret.constvar = crossAxisLetter; - ret.index = idx; - ret.x = xpoints; - ret.y = ypoints; - ret.smoothing = crossAxis.smoothing; - - return ret; - } - - if(axis.tickmode === 'array') { - // var j0 = axis.startline ? 1 : 0; - // var j1 = data.length - (axis.endline ? 1 : 0); - - eps = 5e-15; - bounds = [ - Math.floor(((data.length - 1) - axis.arraytick0) / axis.arraydtick * (1 + eps)), - Math.ceil((- axis.arraytick0) / axis.arraydtick / (1 + eps)) - ].sort(function(a, b) {return a - b;}); - - // Unpack sorted values so we can be sure to avoid infinite loops if something - // is backwards: - n1 = bounds[0] - 1; - n2 = bounds[1] + 1; - - // If the axes fall along array lines, then this is a much simpler process since - // we already have all the control points we need - for(n = n1; n < n2; n++) { - j = axis.arraytick0 + axis.arraydtick * n; - if(j < 0 || j > data.length - 1) continue; - gridlines.push(extendFlat(constructArrayGridline(j), { - color: axis.gridcolor, - width: axis.gridwidth - })); - } - - for(n = n1; n < n2; n++) { - j0 = axis.arraytick0 + axis.arraydtick * n; - j1 = Math.min(j0 + axis.arraydtick, data.length - 1); - - // TODO: fix the bounds computation so we don't have to do a large range and then throw - // out unneeded numbers - if(j0 < 0 || j0 > data.length - 1) continue; - if(j1 < 0 || j1 > data.length - 1) continue; - - v0 = data[j0]; - v1 = data[j1]; - - for(i = 0; i < axis.minorgridcount; i++) { - d = j1 - j0; - - // TODO: fix the bounds computation so we don't have to do a large range and then throw - // out unneeded numbers - if(d <= 0) continue; - - // XXX: This calculation isn't quite right. Off by one somewhere? - v = v0 + (v1 - v0) * (i + 1) / (axis.minorgridcount + 1) * (axis.arraydtick / d); - - // TODO: fix the bounds computation so we don't have to do a large range and then throw - // out unneeded numbers - if(v < data[0] || v > data[data.length - 1]) continue; - minorgridlines.push(extendFlat(constructValueGridline(v), { - color: axis.minorgridcolor, - width: axis.minorgridwidth - })); - } - } - - if(axis.startline) { - boundarylines.push(extendFlat(constructArrayGridline(0), { - color: axis.startlinecolor, - width: axis.startlinewidth - })); - } - - if(axis.endline) { - boundarylines.push(extendFlat(constructArrayGridline(data.length - 1), { - color: axis.endlinecolor, - width: axis.endlinewidth - })); - } - } else { - // If the lines do not fall along the axes, then we have to interpolate - // the contro points and so some math to figure out where the lines are - // in the first place. - - // Compute the integer boudns of tick0 + n * dtick that fall within the range - // (roughly speaking): - // Give this a nice generous epsilon. We use at as * (1 + eps) in order to make - // inequalities a little tolerant in a more or less correct manner: - eps = 5e-15; - bounds = [ - Math.floor((data[data.length - 1] - axis.tick0) / axis.dtick * (1 + eps)), - Math.ceil((data[0] - axis.tick0) / axis.dtick / (1 + eps)) - ].sort(function(a, b) {return a - b;}); - - // Unpack sorted values so we can be sure to avoid infinite loops if something - // is backwards: - n1 = bounds[0]; - n2 = bounds[1]; - - for(n = n1; n <= n2; n++) { - value = axis.tick0 + axis.dtick * n; - - gridlines.push(extendFlat(constructValueGridline(value), { - color: axis.gridcolor, - width: axis.gridwidth - })); - } - - for(n = n1 - 1; n < n2 + 1; n++) { - value = axis.tick0 + axis.dtick * n; - - for(i = 0; i < axis.minorgridcount; i++) { - v = value + axis.dtick * (i + 1) / (axis.minorgridcount + 1); - if(v < data[0] || v > data[data.length - 1]) continue; - minorgridlines.push(extendFlat(constructValueGridline(v), { - color: axis.minorgridcolor, - width: axis.minorgridwidth - })); - } - } - - if(axis.startline) { - boundarylines.push(extendFlat(constructValueGridline(data[0]), { - color: axis.startlinecolor, - width: axis.startlinewidth - })); - } - - if(axis.endline) { - boundarylines.push(extendFlat(constructValueGridline(data[data.length - 1]), { - color: axis.endlinecolor, - width: axis.endlinewidth - })); - } - } -}; - -},{"../../lib/extend":677,"../../plots/cartesian/axes":724}],847:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Axes = require('../../plots/cartesian/axes'); -var extendFlat = require('../../lib/extend').extendFlat; - -module.exports = function calcLabels(trace, axis) { - var i, tobj, prefix, suffix, gridline; - - var labels = axis._labels = []; - var gridlines = axis._gridlines; - - for(i = 0; i < gridlines.length; i++) { - gridline = gridlines[i]; - - if(['start', 'both'].indexOf(axis.showticklabels) !== -1) { - tobj = Axes.tickText(axis, gridline.value); - - extendFlat(tobj, { - prefix: prefix, - suffix: suffix, - endAnchor: true, - xy: gridline.xy(0), - dxy: gridline.dxy(0, 0), - axis: gridline.axis, - length: gridline.crossAxis.length, - font: gridline.axis.tickfont, - isFirst: i === 0, - isLast: i === gridlines.length - 1 - }); - - labels.push(tobj); - } - - if(['end', 'both'].indexOf(axis.showticklabels) !== -1) { - tobj = Axes.tickText(axis, gridline.value); - - extendFlat(tobj, { - endAnchor: false, - xy: gridline.xy(gridline.crossLength - 1), - dxy: gridline.dxy(gridline.crossLength - 2, 1), - axis: gridline.axis, - length: gridline.crossAxis.length, - font: gridline.axis.tickfont, - isFirst: i === 0, - isLast: i === gridlines.length - 1 - }); - - labels.push(tobj); - } - } -}; - -},{"../../lib/extend":677,"../../plots/cartesian/axes":724}],848:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Compute the tangent vector according to catmull-rom cubic splines (centripetal, - * I think). That differs from the control point in two ways: - * 1. It is a vector, not a position relative to the point - * 2. the vector is longer than the position relative to p1 by a factor of 3 - * - * Close to the boundaries, we'll use these as *quadratic control points, so that - * to make a nice grid, we'll need to divide the tangent by 2 instead of 3. (The - * math works out this way if you work through the bezier derivatives) - */ -var CatmullRomExp = 0.5; -module.exports = function makeControlPoints(p0, p1, p2, smoothness) { - var d1x = p0[0] - p1[0], - d1y = p0[1] - p1[1], - d2x = p2[0] - p1[0], - d2y = p2[1] - p1[1], - d1a = Math.pow(d1x * d1x + d1y * d1y, CatmullRomExp / 2), - d2a = Math.pow(d2x * d2x + d2y * d2y, CatmullRomExp / 2), - numx = (d2a * d2a * d1x - d1a * d1a * d2x) * smoothness, - numy = (d2a * d2a * d1y - d1a * d1a * d2y) * smoothness, - denom1 = d2a * (d1a + d2a) * 3, - denom2 = d1a * (d1a + d2a) * 3; - return [[ - p1[0] + (denom1 && numx / denom1), - p1[1] + (denom1 && numy / denom1) - ], [ - p1[0] - (denom2 && numx / denom2), - p1[1] - (denom2 && numy / denom2) - ]]; -}; - -},{}],849:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var isArray = require('../../lib').isArray; - -/* - * Construct a 2D array of cheater values given a, b, and a slope. - * If - */ -module.exports = function(a, b, cheaterslope) { - var i, j, ascal, bscal, aval, bval; - var data = []; - - var na = isArray(a) ? a.length : a; - var nb = isArray(b) ? b.length : b; - var adata = isArray(a) ? a : null; - var bdata = isArray(b) ? b : null; - - // If we're using data, scale it so that for data that's just barely - // not evenly spaced, the switch to value-based indexing is continuous. - // This means evenly spaced data should look the same whether value - // or index cheatertype. - if(adata) { - ascal = (adata.length - 1) / (adata[adata.length - 1] - adata[0]) / (na - 1); - } - - if(bdata) { - bscal = (bdata.length - 1) / (bdata[bdata.length - 1] - bdata[0]) / (nb - 1); - } - - var xval; - var xmin = Infinity; - var xmax = -Infinity; - for(j = 0; j < nb; j++) { - data[j] = []; - bval = bdata ? (bdata[j] - bdata[0]) * bscal : j / (nb - 1); - for(i = 0; i < na; i++) { - aval = adata ? (adata[i] - adata[0]) * ascal : i / (na - 1); - xval = aval - bval * cheaterslope; - xmin = Math.min(xval, xmin); - xmax = Math.max(xval, xmax); - data[j][i] = xval; - } - } - - // Normalize cheater values to the 0-1 range. This comes into play when you have - // multiple cheater plots. After careful consideration, it seems better if cheater - // values are normalized to a consistent range. Otherwise one cheater affects the - // layout of other cheaters on the same axis. - var slope = 1.0 / (xmax - xmin); - var offset = -xmin * slope; - for(j = 0; j < nb; j++) { - for(i = 0; i < na; i++) { - data[j][i] = slope * data[j][i] + offset; - } - } - - return data; -}; - -},{"../../lib":685}],850:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var makeControlPoints = require('./catmull_rom'); -var ensureArray = require('../../lib').ensureArray; - -/* - * Turns a coarse grid into a fine grid with control points. - * - * Here's an ASCII representation: - * - * o ----- o ----- o ----- o - * | | | | - * | | | | - * | | | | - * o ----- o ----- o ----- o - * | | | | - * | | | | - * ^ | | | | - * | o ----- o ----- o ----- o - * b | | | | | - * | | | | | - * | | | | | - * o ----- o ----- o ----- o - * ------> - * a - * - * First of all, note that we want to do this in *cartesian* space. This means - * we might run into problems when there are extreme differences in x/y scaling, - * but the alternative is that the topology of the contours might actually be - * view-dependent, which seems worse. As a fallback, the only parameter that - * actually affects the result is the *aspect ratio*, so that we can at least - * improve the situation a bit without going all the way to screen coordinates. - * - * This function flattens the points + tangents into a slightly denser grid of - * *control points*. The resulting grid looks like this: - * - * 9 +--o-o--+ -o-o--+--o-o--+ - * 8 o o o o o o o o o o - * | | | | - * 7 o o o o o o o o o o - * 6 +--o-o--+ -o-o--+--o-o--+ - * 5 o o o o o o o o o o - * | | | | - * ^ 4 o o o o o o o o o o - * | 3 +--o-o--+ -o-o--+--o-o--+ - * b | 2 o o o o o o o o o o - * | | | | | - * | 1 o o o o o o o o o o - * 0 +--o-o--+ -o-o--+--o-o--+ - * 0 1 2 3 4 5 6 7 8 9 - * ------> - * a - * - * where `o`s represent newly-computed control points. the resulting dimension is - * - * (m - 1) * 3 + 1 - * = 3 * m - 2 - * - * We could simply store the tangents separately, but that's a nightmare to organize - * in two dimensions since we'll be slicing grid lines in both directions and since - * that basically requires very nearly just as much storage as just storing the dense - * grid. - * - * Wow! - */ - - -/* - * Catmull-rom is biased at the boundaries toward the interior and we actually - * can't use catmull-rom to compute the control point closest to (but inside) - * the boundary. - * - * A note on plotly's spline interpolation. It uses the catmull rom control point - * closest to the boundary *as* a quadratic control point. This seems incorrect, - * so I've elected not to follow that. Given control points 0 and 1, regular plotly - * splines give *equivalent* cubic control points: - * - * Input: - * - * boundary - * | | - * p0 p2 p3 --> interior - * 0.0 0.667 1.0 - * | | - * - * Cubic-equivalent of what plotly splines draw:: - * - * boundary - * | | - * p0 p1 p2 p3 --> interior - * 0.0 0.4444 0.8888 1.0 - * | | - * - * What this function fills in: - * - * boundary - * | | - * p0 p1 p2 p3 --> interior - * 0.0 0.333 0.667 1.0 - * | | - * - * Parameters: - * p0: boundary point - * p2: catmull rom point based on computation at p3 - * p3: first grid point - * - * Of course it works whichever way it's oriented; you just need to interpret the - * input/output accordingly. - */ -function inferCubicControlPoint(p0, p2, p3) { - // Extend p1 away from p0 by 50%. This is the equivalent quadratic point that - // would give the same slope as catmull rom at p0. - var p2e0 = -0.5 * p3[0] + 1.5 * p2[0]; - var p2e1 = -0.5 * p3[1] + 1.5 * p2[1]; - - return [ - (2 * p2e0 + p0[0]) / 3, - (2 * p2e1 + p0[1]) / 3, - ]; -} - -module.exports = function computeControlPoints(xe, ye, x, y, asmoothing, bsmoothing) { - var i, j, ie, je, xej, yej, xj, yj, cp, p1; - // At this point, we know these dimensions are correct and representative of - // the whole 2D arrays: - var na = x[0].length; - var nb = x.length; - - // (n)umber of (e)xpanded points: - var nea = asmoothing ? 3 * na - 2 : na; - var neb = bsmoothing ? 3 * nb - 2 : nb; - - xe = ensureArray(xe, neb); - ye = ensureArray(ye, neb); - - for(ie = 0; ie < neb; ie++) { - xe[ie] = ensureArray(xe[ie], nea); - ye[ie] = ensureArray(ye[ie], nea); - } - - // This loop fills in the X'd points: - // - // . . . . - // . . . . - // | | | | - // | | | | - // X ----- X ----- X ----- X - // | | | | - // | | | | - // | | | | - // X ----- X ----- X ----- X - // - // - // ie = (i) (e)xpanded: - for(j = 0, je = 0; j < nb; j++, je += bsmoothing ? 3 : 1) { - xej = xe[je]; - yej = ye[je]; - xj = x[j]; - yj = y[j]; - - // je = (j) (e)xpanded: - for(i = 0, ie = 0; i < na; i++, ie += asmoothing ? 3 : 1) { - xej[ie] = xj[i]; - yej[ie] = yj[i]; - } - } - - if(asmoothing) { - // If there's a-smoothing, this loop fills in the X'd points with catmull-rom - // control points computed along the a-axis: - // . . . . - // . . . . - // | | | | - // | | | | - // o -Y-X- o -X-X- o -X-Y- o - // | | | | - // | | | | - // | | | | - // o -Y-X- o -X-X- o -X-Y- o - // - // i: 0 1 2 3 - // ie: 0 1 3 3 4 5 6 7 8 9 - // - // ------> - // a - // - for(j = 0, je = 0; j < nb; j++, je += bsmoothing ? 3 : 1) { - // Fill in the points marked X for this a-row: - for(i = 1, ie = 3; i < na - 1; i++, ie += 3) { - cp = makeControlPoints( - [x[j][i - 1], y[j][i - 1]], - [x[j][i ], y[j][i]], - [x[j][i + 1], y[j][i + 1]], - asmoothing - ); - - xe[je][ie - 1] = cp[0][0]; - ye[je][ie - 1] = cp[0][1]; - xe[je][ie + 1] = cp[1][0]; - ye[je][ie + 1] = cp[1][1]; - } - - // The very first cubic interpolation point (to the left for i = 1 above) is - // used as a *quadratic* interpolation point by the spline drawing function - // which isn't really correct. But for the sake of consistency, we'll use it - // as such. Since we're using cubic splines, that means we need to shorten the - // tangent by 1/3 and also construct a new cubic spline control point 1/3 from - // the original to the i = 0 point. - p1 = inferCubicControlPoint( - [xe[je][0], ye[je][0]], - [xe[je][2], ye[je][2]], - [xe[je][3], ye[je][3]] - ); - xe[je][1] = p1[0]; - ye[je][1] = p1[1]; - - // Ditto last points, sans explanation: - p1 = inferCubicControlPoint( - [xe[je][nea - 1], ye[je][nea - 1]], - [xe[je][nea - 3], ye[je][nea - 3]], - [xe[je][nea - 4], ye[je][nea - 4]] - ); - xe[je][nea - 2] = p1[0]; - ye[je][nea - 2] = p1[1]; - } - } - - if(bsmoothing) { - // If there's a-smoothing, this loop fills in the X'd points with catmull-rom - // control points computed along the b-axis: - // . . . . - // X X X X X X X X X X - // | | | | - // X X X X X X X X X X - // o -o-o- o -o-o- o -o-o- o - // X X X X X X X X X X - // | | | | - // Y Y Y Y Y Y Y Y Y Y - // o -o-o- o -o-o- o -o-o- o - // - // i: 0 1 2 3 - // ie: 0 1 3 3 4 5 6 7 8 9 - // - // ------> - // a - // - for(ie = 0; ie < nea; ie++) { - for(je = 3; je < neb - 3; je += 3) { - cp = makeControlPoints( - [xe[je - 3][ie], ye[je - 3][ie]], - [xe[je][ie], ye[je][ie]], - [xe[je + 3][ie], ye[je + 3][ie]], - bsmoothing - ); - - xe[je - 1][ie] = cp[0][0]; - ye[je - 1][ie] = cp[0][1]; - xe[je + 1][ie] = cp[1][0]; - ye[je + 1][ie] = cp[1][1]; - } - // Do the same boundary condition magic for these control points marked Y above: - p1 = inferCubicControlPoint( - [xe[0][ie], ye[0][ie]], - [xe[2][ie], ye[2][ie]], - [xe[3][ie], ye[3][ie]] - ); - xe[1][ie] = p1[0]; - ye[1][ie] = p1[1]; - - p1 = inferCubicControlPoint( - [xe[neb - 1][ie], ye[neb - 1][ie]], - [xe[neb - 3][ie], ye[neb - 3][ie]], - [xe[neb - 4][ie], ye[neb - 4][ie]] - ); - xe[neb - 2][ie] = p1[0]; - ye[neb - 2][ie] = p1[1]; - } - } - - if(asmoothing && bsmoothing) { - // Do one more pass, this time recomputing exactly what we just computed. - // It's overdetermined since we're peforming catmull-rom in two directions, - // so we'll just average the overdetermined. These points don't lie along the - // grid lines, so note that only grid lines will follow normal plotly spline - // interpolation. - // - // Unless of course there was no b smoothing. Then these intermediate points - // don't actually exist and this section is bypassed. - // . . . . - // o X X o X X o X X o - // | | | | - // o X X o X X o X X o - // o -o-o- o -o-o- o -o-o- o - // o X X o X X o X X o - // | | | | - // o Y Y o Y Y o Y Y o - // o -o-o- o -o-o- o -o-o- o - // - // i: 0 1 2 3 - // ie: 0 1 3 3 4 5 6 7 8 9 - // - // ------> - // a - // - for(je = 1; je < neb; je += (je + 1) % 3 === 0 ? 2 : 1) { - // Fill in the points marked X for this a-row: - for(ie = 3; ie < nea - 3; ie += 3) { - cp = makeControlPoints( - [xe[je][ie - 3], ye[je][ie - 3]], - [xe[je][ie], ye[je][ie]], - [xe[je][ie + 3], ye[je][ie + 3]], - asmoothing - ); - - xe[je][ie - 1] = 0.5 * (xe[je][ie - 1] + cp[0][0]); - ye[je][ie - 1] = 0.5 * (ye[je][ie - 1] + cp[0][1]); - xe[je][ie + 1] = 0.5 * (xe[je][ie + 1] + cp[1][0]); - ye[je][ie + 1] = 0.5 * (ye[je][ie + 1] + cp[1][1]); - } - - // This case is just slightly different. The computation is the same, - // but having computed this, we'll average with the existing result. - p1 = inferCubicControlPoint( - [xe[je][0], ye[je][0]], - [xe[je][2], ye[je][2]], - [xe[je][3], ye[je][3]] - ); - xe[je][1] = 0.5 * (xe[je][1] + p1[0]); - ye[je][1] = 0.5 * (ye[je][1] + p1[1]); - - p1 = inferCubicControlPoint( - [xe[je][nea - 1], ye[je][nea - 1]], - [xe[je][nea - 3], ye[je][nea - 3]], - [xe[je][nea - 4], ye[je][nea - 4]] - ); - xe[je][nea - 2] = 0.5 * (xe[je][nea - 2] + p1[0]); - ye[je][nea - 2] = 0.5 * (ye[je][nea - 2] + p1[1]); - } - } - - return [xe, ye]; -}; - -},{"../../lib":685,"./catmull_rom":848}],851:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -module.exports = { - RELATIVE_CULL_TOLERANCE: 1e-6 -}; - -},{}],852:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Evaluates the derivative of a list of control point arrays. That is, it expects an array or arrays - * that are expanded relative to the raw data to include the bicubic control points, if applicable. If - * only linear interpolation is desired, then the data points correspond 1-1 along that axis to the - * data itself. Since it's catmull-rom splines in either direction note in particular that the - * derivatives are discontinuous across cell boundaries. That's the reason you need both the *cell* - * and the *point within the cell*. - * - * Also note that the discontinuity of the derivative is in magnitude only. The direction *is* - * continuous across cell boundaries. - * - * For example, to compute the derivative of the xcoordinate halfway betwen the 7 and 8th i-gridpoints - * and the 10th and 11th j-gridpoints given bicubic smoothing in both dimensions, you'd write: - * - * var deriv = createIDerivativeEvaluator([x], 1, 1); - * - * var dxdi = deriv([], 7, 10, 0.5, 0.5); - * // => [0.12345] - * - * Since there'd be a bunch of duplicate computation to compute multiple derivatives, you can double - * this up by providing more arrays: - * - * var deriv = createIDerivativeEvaluator([x, y], 1, 1); - * - * var dxdi = deriv([], 7, 10, 0.5, 0.5); - * // => [0.12345, 0.78910] - * - * NB: It's presumed that at this point all data has been sanitized and is valid numerical data arrays - * of the correct dimension. - */ -module.exports = function(arrays, asmoothing, bsmoothing) { - if(asmoothing && bsmoothing) { - return function(out, i0, j0, u, v) { - if(!out) out = []; - var f0, f1, f2, f3, ak, k; - - // Since it's a grid of control points, the actual indices are * 3: - i0 *= 3; - j0 *= 3; - - // Precompute some numbers: - var u2 = u * u; - var ou = 1 - u; - var ou2 = ou * ou; - var ouu2 = ou * u * 2; - var a = -3 * ou2; - var b = 3 * (ou2 - ouu2); - var c = 3 * (ouu2 - u2); - var d = 3 * u2; - - var v2 = v * v; - var v3 = v2 * v; - var ov = 1 - v; - var ov2 = ov * ov; - var ov3 = ov2 * ov; - - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - // Compute the derivatives in the u-direction: - f0 = a * ak[j0 ][i0] + b * ak[j0 ][i0 + 1] + c * ak[j0 ][i0 + 2] + d * ak[j0 ][i0 + 3]; - f1 = a * ak[j0 + 1][i0] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 1][i0 + 2] + d * ak[j0 + 1][i0 + 3]; - f2 = a * ak[j0 + 2][i0] + b * ak[j0 + 2][i0 + 1] + c * ak[j0 + 2][i0 + 2] + d * ak[j0 + 2][i0 + 3]; - f3 = a * ak[j0 + 3][i0] + b * ak[j0 + 3][i0 + 1] + c * ak[j0 + 3][i0 + 2] + d * ak[j0 + 3][i0 + 3]; - - // Now just interpolate in the v-direction since it's all separable: - out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; - } - - return out; - }; - } else if(asmoothing) { - // Handle smooth in the a-direction but linear in the b-direction by performing four - // linear interpolations followed by one cubic interpolation of the result - return function(out, i0, j0, u, v) { - if(!out) out = []; - var f0, f1, k, ak; - i0 *= 3; - var u2 = u * u; - var ou = 1 - u; - var ou2 = ou * ou; - var ouu2 = ou * u * 2; - var a = -3 * ou2; - var b = 3 * (ou2 - ouu2); - var c = 3 * (ouu2 - u2); - var d = 3 * u2; - var ov = 1 - v; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = a * ak[j0 ][i0] + b * ak[j0 ][i0 + 1] + c * ak[j0 ][i0 + 2] + d * ak[j0 ][i0 + 3]; - f1 = a * ak[j0 + 1][i0] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 1][i0 + 2] + d * ak[j0 + 1][i0 + 3]; - - out[k] = ov * f0 + v * f1; - } - return out; - }; - } else if(bsmoothing) { - // Same as the above case, except reversed. I've disabled the no-unused vars rule - // so that this function is fully interpolation-agnostic. Otherwise it would need - // to be called differently in different cases. Which wouldn't be the worst, but - /* eslint-disable no-unused-vars */ - return function(out, i0, j0, u, v) { - /* eslint-enable no-unused-vars */ - if(!out) out = []; - var f0, f1, f2, f3, k, ak; - j0 *= 3; - var v2 = v * v; - var v3 = v2 * v; - var ov = 1 - v; - var ov2 = ov * ov; - var ov3 = ov2 * ov; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ak[j0][i0 + 1] - ak[j0][i0]; - f1 = ak[j0 + 1][i0 + 1] - ak[j0 + 1][i0]; - f2 = ak[j0 + 2][i0 + 1] - ak[j0 + 2][i0]; - f3 = ak[j0 + 3][i0 + 1] - ak[j0 + 3][i0]; - - out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; - } - return out; - }; - } else { - // Finally, both directions are linear: - /* eslint-disable no-unused-vars */ - return function(out, i0, j0, u, v) { - /* eslint-enable no-unused-vars */ - if(!out) out = []; - var f0, f1, k, ak; - var ov = 1 - v; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ak[j0][i0 + 1] - ak[j0][i0]; - f1 = ak[j0 + 1][i0 + 1] - ak[j0 + 1][i0]; - - out[k] = ov * f0 + v * f1; - } - return out; - }; - } -}; - -},{}],853:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = function(arrays, asmoothing, bsmoothing) { - if(asmoothing && bsmoothing) { - return function(out, i0, j0, u, v) { - if(!out) out = []; - var f0, f1, f2, f3, ak, k; - - // Since it's a grid of control points, the actual indices are * 3: - i0 *= 3; - j0 *= 3; - - // Precompute some numbers: - var u2 = u * u; - var u3 = u2 * u; - var ou = 1 - u; - var ou2 = ou * ou; - var ou3 = ou2 * ou; - - var v2 = v * v; - var ov = 1 - v; - var ov2 = ov * ov; - var ovv2 = ov * v * 2; - var a = -3 * ov2; - var b = 3 * (ov2 - ovv2); - var c = 3 * (ovv2 - v2); - var d = 3 * v2; - - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - - // Compute the derivatives in the v-direction: - f0 = a * ak[j0][i0] + b * ak[j0 + 1][i0] + c * ak[j0 + 2][i0] + d * ak[j0 + 3][i0]; - f1 = a * ak[j0][i0 + 1] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 2][i0 + 1] + d * ak[j0 + 3][i0 + 1]; - f2 = a * ak[j0][i0 + 2] + b * ak[j0 + 1][i0 + 2] + c * ak[j0 + 2][i0 + 2] + d * ak[j0 + 3][i0 + 2]; - f3 = a * ak[j0][i0 + 3] + b * ak[j0 + 1][i0 + 3] + c * ak[j0 + 2][i0 + 3] + d * ak[j0 + 3][i0 + 3]; - - // Now just interpolate in the v-direction since it's all separable: - out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3; - } - - return out; - }; - } else if(asmoothing) { - // Handle smooth in the a-direction but linear in the b-direction by performing four - // linear interpolations followed by one cubic interpolation of the result - return function(out, i0, j0, v, u) { - if(!out) out = []; - var f0, f1, f2, f3, k, ak; - i0 *= 3; - var u2 = u * u; - var u3 = u2 * u; - var ou = 1 - u; - var ou2 = ou * ou; - var ou3 = ou2 * ou; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - - f0 = ak[j0 + 1][i0] - ak[j0][i0]; - f1 = ak[j0 + 1][i0 + 1] - ak[j0][i0 + 1]; - f2 = ak[j0 + 1][i0 + 2] - ak[j0][i0 + 2]; - f3 = ak[j0 + 1][i0 + 3] - ak[j0][i0 + 3]; - - out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3; - - // mathematically equivalent: - // f0 = ou3 * ak[j0 ][i0] + 3 * (ou2 * u * ak[j0 ][i0 + 1] + ou * u2 * ak[j0 ][i0 + 2]) + u3 * ak[j0 ][i0 + 3]; - // f1 = ou3 * ak[j0 + 1][i0] + 3 * (ou2 * u * ak[j0 + 1][i0 + 1] + ou * u2 * ak[j0 + 1][i0 + 2]) + u3 * ak[j0 + 1][i0 + 3]; - // out[k] = f1 - f0; - } - return out; - }; - } else if(bsmoothing) { - // Same as the above case, except reversed: - /* eslint-disable no-unused-vars */ - return function(out, i0, j0, u, v) { - /* eslint-enable no-unused-vars */ - if(!out) out = []; - var f0, f1, k, ak; - j0 *= 3; - var ou = 1 - u; - var v2 = v * v; - var ov = 1 - v; - var ov2 = ov * ov; - var ovv2 = ov * v * 2; - var a = -3 * ov2; - var b = 3 * (ov2 - ovv2); - var c = 3 * (ovv2 - v2); - var d = 3 * v2; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = a * ak[j0][i0] + b * ak[j0 + 1][i0] + c * ak[j0 + 2][i0] + d * ak[j0 + 3][i0]; - f1 = a * ak[j0][i0 + 1] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 2][i0 + 1] + d * ak[j0 + 3][i0 + 1]; - - out[k] = ou * f0 + u * f1; - } - return out; - }; - } else { - // Finally, both directions are linear: - /* eslint-disable no-unused-vars */ - return function(out, i0, j0, v, u) { - /* eslint-enable no-unused-vars */ - if(!out) out = []; - var f0, f1, k, ak; - var ov = 1 - v; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ak[j0 + 1][i0] - ak[j0][i0]; - f1 = ak[j0 + 1][i0 + 1] - ak[j0][i0 + 1]; - - out[k] = ov * f0 + v * f1; - } - return out; - }; - } - -}; - -},{}],854:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Return a function that evaluates a set of linear or bicubic control points. - * This will get evaluated a lot, so we'll at least do a bit of extra work to - * flatten some of the choices. In particular, we'll unroll the linear/bicubic - * combinations and we'll allow computing results in parallel to cut down - * on repeated arithmetic. - * - * Take note that we don't search for the correct range in this function. The - * reason is for consistency due to the corrresponding derivative function. In - * particular, the derivatives aren't continuous across cells, so it's important - * to be able control whether the derivative at a cell boundary is approached - * from one side or the other. - */ -module.exports = function(arrays, na, nb, asmoothing, bsmoothing) { - var imax = na - 2; - var jmax = nb - 2; - - if(asmoothing && bsmoothing) { - return function(out, i, j) { - if(!out) out = []; - var f0, f1, f2, f3, ak, k; - - var i0 = Math.max(0, Math.min(Math.floor(i), imax)); - var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); - var u = Math.max(0, Math.min(1, i - i0)); - var v = Math.max(0, Math.min(1, j - j0)); - - // Since it's a grid of control points, the actual indices are * 3: - i0 *= 3; - j0 *= 3; - - // Precompute some numbers: - var u2 = u * u; - var u3 = u2 * u; - var ou = 1 - u; - var ou2 = ou * ou; - var ou3 = ou2 * ou; - - var v2 = v * v; - var v3 = v2 * v; - var ov = 1 - v; - var ov2 = ov * ov; - var ov3 = ov2 * ov; - - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ou3 * ak[j0][i0] + 3 * (ou2 * u * ak[j0][i0 + 1] + ou * u2 * ak[j0][i0 + 2]) + u3 * ak[j0][i0 + 3]; - f1 = ou3 * ak[j0 + 1][i0] + 3 * (ou2 * u * ak[j0 + 1][i0 + 1] + ou * u2 * ak[j0 + 1][i0 + 2]) + u3 * ak[j0 + 1][i0 + 3]; - f2 = ou3 * ak[j0 + 2][i0] + 3 * (ou2 * u * ak[j0 + 2][i0 + 1] + ou * u2 * ak[j0 + 2][i0 + 2]) + u3 * ak[j0 + 2][i0 + 3]; - f3 = ou3 * ak[j0 + 3][i0] + 3 * (ou2 * u * ak[j0 + 3][i0 + 1] + ou * u2 * ak[j0 + 3][i0 + 2]) + u3 * ak[j0 + 3][i0 + 3]; - out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; - } - - return out; - }; - } else if(asmoothing) { - // Handle smooth in the a-direction but linear in the b-direction by performing four - // linear interpolations followed by one cubic interpolation of the result - return function(out, i, j) { - if(!out) out = []; - - var i0 = Math.max(0, Math.min(Math.floor(i), imax)); - var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); - var u = Math.max(0, Math.min(1, i - i0)); - var v = Math.max(0, Math.min(1, j - j0)); - - var f0, f1, f2, f3, k, ak; - i0 *= 3; - var u2 = u * u; - var u3 = u2 * u; - var ou = 1 - u; - var ou2 = ou * ou; - var ou3 = ou2 * ou; - var ov = 1 - v; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ov * ak[j0][i0] + v * ak[j0 + 1][i0]; - f1 = ov * ak[j0][i0 + 1] + v * ak[j0 + 1][i0 + 1]; - f2 = ov * ak[j0][i0 + 2] + v * ak[j0 + 1][i0 + 1]; - f3 = ov * ak[j0][i0 + 3] + v * ak[j0 + 1][i0 + 1]; - - out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3; - } - return out; - }; - } else if(bsmoothing) { - // Same as the above case, except reversed: - return function(out, i, j) { - if(!out) out = []; - - var i0 = Math.max(0, Math.min(Math.floor(i), imax)); - var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); - var u = Math.max(0, Math.min(1, i - i0)); - var v = Math.max(0, Math.min(1, j - j0)); - - var f0, f1, f2, f3, k, ak; - j0 *= 3; - var v2 = v * v; - var v3 = v2 * v; - var ov = 1 - v; - var ov2 = ov * ov; - var ov3 = ov2 * ov; - var ou = 1 - u; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ou * ak[j0][i0] + u * ak[j0][i0 + 1]; - f1 = ou * ak[j0 + 1][i0] + u * ak[j0 + 1][i0 + 1]; - f2 = ou * ak[j0 + 2][i0] + u * ak[j0 + 2][i0 + 1]; - f3 = ou * ak[j0 + 3][i0] + u * ak[j0 + 3][i0 + 1]; - - out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; - } - return out; - }; - } else { - // Finally, both directions are linear: - return function(out, i, j) { - if(!out) out = []; - - var i0 = Math.max(0, Math.min(Math.floor(i), imax)); - var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); - var u = Math.max(0, Math.min(1, i - i0)); - var v = Math.max(0, Math.min(1, j - j0)); - - var f0, f1, k, ak; - var ov = 1 - v; - var ou = 1 - u; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ou * ak[j0][i0] + u * ak[j0][i0 + 1]; - f1 = ou * ak[j0 + 1][i0] + u * ak[j0 + 1][i0 + 1]; - - out[k] = ov * f0 + v * f1; - } - return out; - }; - } - -}; - -},{}],855:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var Lib = require('../../lib'); -var handleXYDefaults = require('./xy_defaults'); -var handleABDefaults = require('./ab_defaults'); -var setConvert = require('./set_convert'); -var attributes = require('./attributes'); -var colorAttrs = require('../../components/color/attributes'); - -module.exports = function supplyDefaults(traceIn, traceOut, dfltColor, fullLayout) { - function coerce(attr, dflt) { - return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); - } - - var defaultColor = coerce('color', colorAttrs.defaultLine); - Lib.coerceFont(coerce, 'font'); - - coerce('carpet'); - - handleABDefaults(traceIn, traceOut, fullLayout, coerce, defaultColor); - - if(!traceOut.a || !traceOut.b) { - traceOut.visible = false; - return; - } - - if(traceOut.a.length < 3) { - traceOut.aaxis.smoothing = 0; - } - - if(traceOut.b.length < 3) { - traceOut.baxis.smoothing = 0; - } - - // NB: the input is x/y arrays. You should know that the *first* dimension of x and y - // corresponds to b and the second to a. This sounds backwards but ends up making sense - // the important part to know is that when you write y[j][i], j goes from 0 to b.length - 1 - // and i goes from 0 to a.length - 1. - var len = handleXYDefaults(traceIn, traceOut, coerce); - - setConvert(traceOut); - - if(traceOut._cheater) { - coerce('cheaterslope'); - } - - if(!len) { - traceOut.visible = false; - return; - } -}; - -},{"../../components/color/attributes":577,"../../lib":685,"./ab_defaults":838,"./attributes":840,"./set_convert":864,"./xy_defaults":866}],856:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -module.exports = function(data) { - return Array.isArray(data[0]); -}; - -},{}],857:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var Carpet = {}; - -Carpet.attributes = require('./attributes'); -Carpet.supplyDefaults = require('./defaults'); -Carpet.plot = require('./plot'); -Carpet.calc = require('./calc'); -Carpet.animatable = true; - -Carpet.moduleType = 'trace'; -Carpet.name = 'carpet'; -Carpet.basePlotModule = require('../../plots/cartesian'); -Carpet.categories = ['cartesian', 'carpet', 'carpetAxis', 'notLegendIsolatable']; -Carpet.meta = { - description: [ - 'The data describing carpet axis layout is set in `y` and (optionally)', - 'also `x`. If only `y` is present, `x` the plot is interpreted as a', - 'cheater plot and is filled in using the `y` values.', - - '`x` and `y` may either be 2D arrays matching with each dimension matching', - 'that of `a` and `b`, or they may be 1D arrays with total length equal to', - 'that of `a` and `b`.' - ].join(' ') -}; - -module.exports = Carpet; - -},{"../../plots/cartesian":734,"./attributes":840,"./calc":844,"./defaults":855,"./plot":863}],858:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Given a trace, look up the carpet axis by carpet. - */ -module.exports = function(gd, trace) { - var n = gd._fullData.length; - var firstAxis; - for(var i = 0; i < n; i++) { - var maybeCarpet = gd._fullData[i]; - - if(maybeCarpet.index === trace.index) continue; - - if(maybeCarpet.type === 'carpet') { - if(!firstAxis) { - firstAxis = maybeCarpet; - } - - if(maybeCarpet.carpet === trace.carpet) { - return maybeCarpet; - } - } - } - - return firstAxis; -}; - -},{}],859:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = function makePath(xp, yp, isBicubic) { - // Prevent d3 errors that would result otherwise: - if(xp.length === 0) return ''; - - var i, path = []; - var stride = isBicubic ? 3 : 1; - for(i = 0; i < xp.length; i += stride) { - path.push(xp[i] + ',' + yp[i]); - - if(isBicubic && i < xp.length - stride) { - path.push('C'); - path.push([ - xp[i + 1] + ',' + yp[i + 1], - xp[i + 2] + ',' + yp[i + 2] + ' ', - ].join(' ')); - } - } - return path.join(isBicubic ? '' : 'L'); -}; - -},{}],860:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Map an array of x or y coordinates (c) to screen-space pixel coordinates (p). - * The output array is optional, but if provided, it will be reused without - * reallocation to the extent possible. - */ -module.exports = function mapArray(out, data, func) { - var i; - - if(!Array.isArray(out)) { - // If not an array, make it an array: - out = []; - } else if(out.length > data.length) { - // If too long, truncate. (If too short, it will grow - // automatically so we don't care about that case) - out = out.slice(0, data.length); - } - - for(i = 0; i < data.length; i++) { - out[i] = func(data[i]); - } - - return out; -}; - -},{}],861:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Map an array of x or y coordinates (c) to screen-space pixel coordinates (p). - * The output array is optional, but if provided, it will be reused without - * reallocation to the extent possible. - */ -module.exports = function mapArray(out, data, func) { - var i, j; - - if(!Array.isArray(out)) { - // If not an array, make it an array: - out = []; - } else if(out.length > data.length) { - // If too long, truncate. (If too short, it will grow - // automatically so we don't care about that case) - out = out.slice(0, data.length); - } - - for(i = 0; i < data.length; i++) { - if(!Array.isArray(out[i])) { - // If not an array, make it an array: - out[i] = []; - } else if(out[i].length > data.length) { - // If too long, truncate. (If too short, it will grow - // automatically so we don't care about[i] that case) - out[i] = out[i].slice(0, data.length); - } - - for(j = 0; j < data[0].length; j++) { - out[i][j] = func(data[i][j]); - } - } - return out; -}; - -},{}],862:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -module.exports = function orientText(trace, xaxis, yaxis, xy, dxy, refDxy) { - var dx = dxy[0] * trace.dpdx(xaxis); - var dy = dxy[1] * trace.dpdy(yaxis); - var flip = 1; - - var offsetMultiplier = 1.0; - if(refDxy) { - var l1 = Math.sqrt(dxy[0] * dxy[0] + dxy[1] * dxy[1]); - var l2 = Math.sqrt(refDxy[0] * refDxy[0] + refDxy[1] * refDxy[1]); - var dot = (dxy[0] * refDxy[0] + dxy[1] * refDxy[1]) / l1 / l2; - offsetMultiplier = Math.max(0.0, dot); - } - - var angle = Math.atan2(dy, dx) * 180 / Math.PI; - if(angle < -90) { - angle += 180; - flip = -flip; - } else if(angle > 90) { - angle -= 180; - flip = -flip; - } - - return { - angle: angle, - flip: flip, - p: trace.c2p(xy, xaxis, yaxis), - offsetMultplier: offsetMultiplier - }; -}; - -},{}],863:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var d3 = require('d3'); -var Drawing = require('../../components/drawing'); -var map1dArray = require('./map_1d_array'); -var makepath = require('./makepath'); -var orientText = require('./orient_text'); - -module.exports = function plot(gd, plotinfo, cdcarpet) { - for(var i = 0; i < cdcarpet.length; i++) { - plotOne(gd, plotinfo, cdcarpet[i]); - } -}; - -function makeg(el, type, klass) { - var join = el.selectAll(type + '.' + klass).data([0]); - join.enter().append(type).classed(klass, true); - return join; -} - -function plotOne(gd, plotinfo, cd) { - var t = cd[0]; - var trace = cd[0].trace, - xa = plotinfo.xaxis, - ya = plotinfo.yaxis, - aax = trace.aaxis, - bax = trace.baxis, - fullLayout = gd._fullLayout; - // uid = trace.uid, - // id = 'carpet' + uid; - - var gridLayer = plotinfo.plot.selectAll('.carpetlayer'); - var clipLayer = makeg(fullLayout._defs, 'g', 'clips'); - - var axisLayer = makeg(gridLayer, 'g', 'carpet' + trace.uid).classed('trace', true); - var minorLayer = makeg(axisLayer, 'g', 'minorlayer'); - var majorLayer = makeg(axisLayer, 'g', 'majorlayer'); - var boundaryLayer = makeg(axisLayer, 'g', 'boundarylayer'); - var labelLayer = makeg(axisLayer, 'g', 'labellayer'); - - axisLayer.style('opacity', trace.opacity); - - drawGridLines(xa, ya, majorLayer, aax, 'a', aax._gridlines, true); - drawGridLines(xa, ya, majorLayer, bax, 'b', bax._gridlines, true); - drawGridLines(xa, ya, minorLayer, aax, 'a', aax._minorgridlines, true); - drawGridLines(xa, ya, minorLayer, bax, 'b', bax._minorgridlines, true); - - // NB: These are not ommitted if the lines are not active. The joins must be executed - // in order for them to get cleaned up without a full redraw - drawGridLines(xa, ya, boundaryLayer, aax, 'a-boundary', aax._boundarylines); - drawGridLines(xa, ya, boundaryLayer, bax, 'b-boundary', bax._boundarylines); - - var maxAExtent = drawAxisLabels(gd._tester, xa, ya, trace, t, labelLayer, aax._labels, 'a-label'); - var maxBExtent = drawAxisLabels(gd._tester, xa, ya, trace, t, labelLayer, bax._labels, 'b-label'); - - drawAxisTitles(labelLayer, trace, t, xa, ya, maxAExtent, maxBExtent); - - // Swap for debugging in order to draw directly: - // drawClipPath(trace, axisLayer, xa, ya); - drawClipPath(trace, t, clipLayer, xa, ya); -} - -function drawClipPath(trace, t, layer, xaxis, yaxis) { - var seg, xp, yp, i; - // var clip = makeg(layer, 'g', 'carpetclip'); - trace.clipPathId = 'clip' + trace.uid + 'carpet'; - - var clip = layer.select('#' + trace.clipPathId); - - if(!clip.size()) { - clip = layer.append('clipPath') - .classed('carpetclip', true); - } - - var path = makeg(clip, 'path', 'carpetboundary'); - var segments = t.clipsegments; - var segs = []; - - for(i = 0; i < segments.length; i++) { - seg = segments[i]; - xp = map1dArray([], seg.x, xaxis.c2p); - yp = map1dArray([], seg.y, yaxis.c2p); - segs.push(makepath(xp, yp, seg.bicubic)); - } - - // This could be optimized ever so slightly to avoid no-op L segments - // at the corners, but it's so negligible that I don't think it's worth - // the extra complexity - trace.clipPathData = 'M' + segs.join('L') + 'Z'; - clip.attr('id', trace.clipPathId); - path.attr('d', trace.clipPathData); - // .style('stroke-width', 20) - // .style('vector-effect', 'non-scaling-stroke') - // .style('stroke', 'black') - // .style('fill', 'rgba(0, 0, 0, 0.1)'); -} - -function drawGridLines(xaxis, yaxis, layer, axis, axisLetter, gridlines) { - var lineClass = 'const-' + axisLetter + '-lines'; - var gridJoin = layer.selectAll('.' + lineClass).data(gridlines); - - gridJoin.enter().append('path') - .classed(lineClass, true) - .style('vector-effect', 'non-scaling-stroke'); - - gridJoin.each(function(d) { - var gridline = d; - var x = gridline.x; - var y = gridline.y; - - var xp = map1dArray([], x, xaxis.c2p); - var yp = map1dArray([], y, yaxis.c2p); - - var path = 'M' + makepath(xp, yp, gridline.smoothing); - - var el = d3.select(this); - - el.attr('d', path) - .style('stroke-width', gridline.width) - .style('stroke', gridline.color) - .style('fill', 'none'); - }); - - gridJoin.exit().remove(); -} - -function drawAxisLabels(tester, xaxis, yaxis, trace, t, layer, labels, labelClass) { - var labelJoin = layer.selectAll('text.' + labelClass).data(labels); - - labelJoin.enter().append('text') - .classed(labelClass, true); - - var maxExtent = 0; - - labelJoin.each(function(label) { - // Most of the positioning is done in calc_labels. Only the parts that depend upon - // the screen space representation of the x and y axes are here: - var orientation; - if(label.axis.tickangle === 'auto') { - orientation = orientText(trace, xaxis, yaxis, label.xy, label.dxy); - } else { - var angle = (label.axis.tickangle + 180.0) * Math.PI / 180.0; - orientation = orientText(trace, xaxis, yaxis, label.xy, [Math.cos(angle), Math.sin(angle)]); - } - var direction = (label.endAnchor ? -1 : 1) * orientation.flip; - var bbox = Drawing.measureText(tester, label.text, label.font); - - d3.select(this) - .attr('text-anchor', direction > 0 ? 'start' : 'end') - .text(label.text) - .attr('transform', - // Translate to the correct point: - 'translate(' + orientation.p[0] + ',' + orientation.p[1] + ') ' + - // Rotate to line up with grid line tangent: - 'rotate(' + orientation.angle + ')' + - // Adjust the baseline and indentation: - 'translate(' + label.axis.labelpadding * direction + ',' + bbox.height * 0.3 + ')' - ) - .call(Drawing.font, label.font.family, label.font.size, label.font.color); - - maxExtent = Math.max(maxExtent, bbox.width + label.axis.labelpadding); - }); - - labelJoin.exit().remove(); - - return maxExtent; -} - -function drawAxisTitles(layer, trace, t, xa, ya, maxAExtent, maxBExtent) { - var a, b, xy, dxy; - - a = 0.5 * (trace.a[0] + trace.a[trace.a.length - 1]); - b = trace.b[0]; - xy = trace.ab2xy(a, b, true); - dxy = trace.dxyda_rough(a, b); - drawAxisTitle(layer, trace, t, xy, dxy, trace.aaxis, xa, ya, maxAExtent, 'a-title'); - - a = trace.a[0]; - b = 0.5 * (trace.b[0] + trace.b[trace.b.length - 1]); - xy = trace.ab2xy(a, b, true); - dxy = trace.dxydb_rough(a, b); - drawAxisTitle(layer, trace, t, xy, dxy, trace.baxis, xa, ya, maxBExtent, 'b-title'); -} - -function drawAxisTitle(layer, trace, t, xy, dxy, axis, xa, ya, offset, labelClass) { - var data = []; - if(axis.title) data.push(axis.title); - var titleJoin = layer.selectAll('text.' + labelClass).data(data); - - titleJoin.enter().append('text') - .classed(labelClass, true); - - // There's only one, but we'll do it as a join so it's updated nicely: - titleJoin.each(function() { - var orientation = orientText(trace, xa, ya, xy, dxy); - - if(['start', 'both'].indexOf(axis.showticklabels) === -1) { - offset = 0; - } - - // In addition to the size of the labels, add on some extra padding: - offset += axis.titlefont.size + axis.titleoffset; - - - var el = d3.select(this); - - el.text(axis.title || '') - .attr('transform', - 'translate(' + orientation.p[0] + ',' + orientation.p[1] + ') ' + - 'rotate(' + orientation.angle + ') ' + - 'translate(0,' + offset + ')' - ) - .classed('user-select-none', true) - .attr('text-anchor', 'middle') - .call(Drawing.font, axis.titlefont); - }); - - titleJoin.exit().remove(); -} - -},{"../../components/drawing":602,"./makepath":859,"./map_1d_array":860,"./orient_text":862,"d3":107}],864:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var constants = require('./constants'); -var search = require('../../lib/search').findBin; -var computeControlPoints = require('./compute_control_points'); -var createSplineEvaluator = require('./create_spline_evaluator'); -var createIDerivativeEvaluator = require('./create_i_derivative_evaluator'); -var createJDerivativeEvaluator = require('./create_j_derivative_evaluator'); - -/* - * Create conversion functions to go from one basis to another. In particular the letter - * abbreviations are: - * - * i: i/j coordinates along the grid. Integer values correspond to data points - * a: real-valued coordinates along the a/b axes - * c: cartesian x-y coordinates - * p: screen-space pixel coordinates - */ -module.exports = function setConvert(trace) { - var a = trace.a; - var b = trace.b; - var na = trace.a.length; - var nb = trace.b.length; - var aax = trace.aaxis; - var bax = trace.baxis; - - // Grab the limits once rather than recomputing the bounds for every point - // independently: - var amin = a[0]; - var amax = a[na - 1]; - var bmin = b[0]; - var bmax = b[nb - 1]; - var arange = a[a.length - 1] - a[0]; - var brange = b[b.length - 1] - b[0]; - - // Compute the tolerance so that points are visible slightly outside the - // defined carpet axis: - var atol = arange * constants.RELATIVE_CULL_TOLERANCE; - var btol = brange * constants.RELATIVE_CULL_TOLERANCE; - - // Expand the limits to include the relative tolerance: - amin -= atol; - amax += atol; - bmin -= btol; - bmax += btol; - - trace.isVisible = function(a, b) { - return a > amin && a < amax && b > bmin && b < bmax; - }; - - trace.isOccluded = function(a, b) { - return a < amin || a > amax || b < bmin || b > bmax; - }; - - // XXX: ONLY PASSTHRU. ONLY. No, ONLY. - aax.c2p = function(v) { return v; }; - bax.c2p = function(v) { return v; }; - - trace.setScale = function() { - var x = trace.x; - var y = trace.y; - - // This is potentially a very expensive step! It does the bulk of the work of constructing - // an expanded basis of control points. Note in particular that it overwrites the existing - // basis without creating a new array since that would potentially thrash the garbage - // collector. - var result = computeControlPoints(trace.xctrl, trace.yctrl, x, y, aax.smoothing, bax.smoothing); - trace.xctrl = result[0]; - trace.yctrl = result[1]; - - // This step is the second step in the process, but it's somewhat simpler. It just unrolls - // some logic since it would be unnecessarily expensive to compute both interpolations - // nearly identically but separately and to include a bunch of linear vs. bicubic logic in - // every single call. - trace.evalxy = createSplineEvaluator([trace.xctrl, trace.yctrl], na, nb, aax.smoothing, bax.smoothing); - - trace.dxydi = createIDerivativeEvaluator([trace.xctrl, trace.yctrl], aax.smoothing, bax.smoothing); - trace.dxydj = createJDerivativeEvaluator([trace.xctrl, trace.yctrl], aax.smoothing, bax.smoothing); - }; - - /* - * Convert from i/j data grid coordinates to a/b values. Note in particular that this - * is *linear* interpolation, even if the data is interpolated bicubically. - */ - trace.i2a = function(i) { - var i0 = Math.max(0, Math.floor(i[0]), na - 2); - var ti = i[0] - i0; - return (1 - ti) * a[i0] + ti * a[i0 + 1]; - }; - - trace.j2b = function(j) { - var j0 = Math.max(0, Math.floor(j[1]), na - 2); - var tj = j[1] - j0; - return (1 - tj) * b[j0] + tj * b[j0 + 1]; - }; - - trace.ij2ab = function(ij) { - return [trace.i2a(ij[0]), trace.j2b(ij[1])]; - }; - - /* - * Convert from a/b coordinates to i/j grid-numbered coordinates. This requires searching - * through the a/b data arrays and assumes they are monotonic, which is presumed to have - * been enforced already. - */ - trace.a2i = function(aval) { - var i0 = Math.max(0, Math.min(search(aval, a), na - 2)); - var a0 = a[i0]; - var a1 = a[i0 + 1]; - return Math.max(0, Math.min(na - 1, i0 + (aval - a0) / (a1 - a0))); - }; - - trace.b2j = function(bval) { - var j0 = Math.max(0, Math.min(search(bval, b), nb - 2)); - var b0 = b[j0]; - var b1 = b[j0 + 1]; - return Math.max(0, Math.min(nb - 1, j0 + (bval - b0) / (b1 - b0))); - }; - - trace.ab2ij = function(ab) { - return [trace.a2i(ab[0]), trace.b2j(ab[1])]; - }; - - /* - * Convert from i/j coordinates to x/y caretesian coordinates. This means either bilinear - * or bicubic spline evaluation, but the hard part is already done at this point. - */ - trace.i2c = function(i, j) { - return trace.evalxy([], i, j); - }; - - trace.ab2xy = function(aval, bval, extrapolate) { - if(!extrapolate && (aval < a[0] || aval > a[na - 1] | bval < b[0] || bval > b[nb - 1])) { - return [false, false]; - } - var i = trace.a2i(aval); - var j = trace.b2j(bval); - - var pt = trace.evalxy([], i, j); - - if(extrapolate) { - // This section uses the boundary derivatives to extrapolate linearly outside - // the defined range. Consider a scatter line with one point inside the carpet - // axis and one point outside. If we don't extrapolate, we can't draw the line - // at all. - var iex = 0; - var jex = 0; - var der = []; - - var i0, ti, j0, tj; - if(aval < a[0]) { - i0 = 0; - ti = 0; - iex = (aval - a[0]) / (a[1] - a[0]); - } else if(aval > a[na - 1]) { - i0 = na - 2; - ti = 1; - iex = (aval - a[na - 1]) / (a[na - 1] - a[na - 2]); - } else { - i0 = Math.max(0, Math.min(na - 2, Math.floor(i))); - ti = i - i0; - } - - if(bval < b[0]) { - j0 = 0; - tj = 0; - jex = (bval - b[0]) / (b[1] - b[0]); - } else if(bval > b[nb - 1]) { - j0 = nb - 2; - tj = 1; - jex = (bval - b[nb - 1]) / (b[nb - 1] - b[nb - 2]); - } else { - j0 = Math.max(0, Math.min(nb - 2, Math.floor(j))); - tj = j - j0; - } - - if(iex) { - trace.dxydi(der, i0, j0, ti, tj); - pt[0] += der[0] * iex; - pt[1] += der[1] * iex; - } - - if(jex) { - trace.dxydj(der, i0, j0, ti, tj); - pt[0] += der[0] * jex; - pt[1] += der[1] * jex; - } - } - - return pt; - }; - - - trace.c2p = function(xy, xa, ya) { - return [xa.c2p(xy[0]), ya.c2p(xy[1])]; - }; - - trace.p2x = function(p, xa, ya) { - return [xa.p2c(p[0]), ya.p2c(p[1])]; - }; - - trace.dadi = function(i /* , u*/) { - // Right now only a piecewise linear a or b basis is permitted since smoother interpolation - // would cause monotonicity problems. As a retult, u is entirely disregarded in this - // computation, though we'll specify it as a parameter for the sake of completeness and - // future-proofing. It would be possible to use monotonic cubic interpolation, for example. - // - // See: https://en.wikipedia.org/wiki/Monotone_cubic_interpolation - - // u = u || 0; - - var i0 = Math.max(0, Math.min(a.length - 2, i)); - - // The step (demoninator) is implicitly 1 since that's the grid spacing. - return a[i0 + 1] - a[i0]; - }; - - trace.dbdj = function(j /* , v*/) { - // See above caveats for dadi which also apply here - var j0 = Math.max(0, Math.min(b.length - 2, j)); - - // The step (demoninator) is implicitly 1 since that's the grid spacing. - return b[j0 + 1] - b[j0]; - }; - - // Takes: grid cell coordinate (i, j) and fractional grid cell coordinates (u, v) - // Returns: (dx/da, dy/db) - // - // NB: separate grid cell + fractional grid cell coordinate format is due to the discontinuous - // derivative, as described better in create_i_derivative_evaluator.js - trace.dxyda = function(i0, j0, u, v) { - var dxydi = trace.dxydi(null, i0, j0, u, v); - var dadi = trace.dadi(i0, u); - - return [dxydi[0] / dadi, dxydi[1] / dadi]; - }; - - trace.dxydb = function(i0, j0, u, v) { - var dxydj = trace.dxydj(null, i0, j0, u, v); - var dbdj = trace.dbdj(j0, v); - - return [dxydj[0] / dbdj, dxydj[1] / dbdj]; - }; - - // Sometimes we don't care about precision and all we really want is decent rough - // directions (as is the case with labels). In that case, we can do a very rough finite - // difference and spare having to worry about precise grid coordinates: - trace.dxyda_rough = function(a, b, reldiff) { - var h = arange * (reldiff || 0.1); - var plus = trace.ab2xy(a + h, b, true); - var minus = trace.ab2xy(a - h, b, true); - - return [ - (plus[0] - minus[0]) * 0.5 / h, - (plus[1] - minus[1]) * 0.5 / h - ]; - }; - - trace.dxydb_rough = function(a, b, reldiff) { - var h = brange * (reldiff || 0.1); - var plus = trace.ab2xy(a, b + h, true); - var minus = trace.ab2xy(a, b - h, true); - - return [ - (plus[0] - minus[0]) * 0.5 / h, - (plus[1] - minus[1]) * 0.5 / h - ]; - }; - - trace.dpdx = function(xa) { - return xa._m; - }; - - trace.dpdy = function(ya) { - return ya._m; - }; -}; - -},{"../../lib/search":699,"./compute_control_points":850,"./constants":851,"./create_i_derivative_evaluator":852,"./create_j_derivative_evaluator":853,"./create_spline_evaluator":854}],865:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Lib = require('../../lib'); - -/* - * Given a 2D array as well as a basis in either direction, this function fills in the - * 2D array using a combination of smoothing and extrapolation. This is rather important - * for carpet plots since it's used for layout so that we can't simply omit or blank out - * points. We need a reasonable guess so that the interpolation puts points somewhere - * even if we were to somehow represent that the data was missing later on. - * - * input: - * - data: 2D array of arrays - * - a: array such that a.length === data[0].length - * - b: array such that b.length === data.length - */ -module.exports = function smoothFill2dArray(data, a, b) { - var i, j, k; - var ip = []; - var jp = []; - // var neighborCnts = []; - - var ni = data[0].length; - var nj = data.length; - - function avgSurrounding(i, j) { - // As a low-quality start, we can simply average surrounding points (in a not - // non-uniform grid aware manner): - var sum = 0.0; - var val; - var cnt = 0; - if(i > 0 && (val = data[j][i - 1]) !== undefined) { - cnt++; - sum += val; - } - if(i < ni - 1 && (val = data[j][i + 1]) !== undefined) { - cnt++; - sum += val; - } - if(j > 0 && (val = data[j - 1][i]) !== undefined) { - cnt++; - sum += val; - } - if(j < nj - 1 && (val = data[j + 1][i]) !== undefined) { - cnt++; - sum += val; - } - return sum / Math.max(1, cnt); - - } - - // This loop iterates over all cells. Any cells that are null will be noted and those - // are the only points we will loop over and update via laplace's equation. Points with - // any neighbors will receive the average. If there are no neighboring points, then they - // will be set to zero. Also as we go, track the maximum magnitude so that we can scale - // our tolerance accordingly. - var dmax = 0.0; - for(i = 0; i < ni; i++) { - for(j = 0; j < nj; j++) { - if(data[j][i] === undefined) { - ip.push(i); - jp.push(j); - - data[j][i] = avgSurrounding(i, j); - // neighborCnts.push(result.neighbors); - } - dmax = Math.max(dmax, Math.abs(data[j][i])); - } - } - - if(!ip.length) return data; - - // The tolerance doesn't need to be excessive. It's just for display positioning - var dxp, dxm, dap, dam, dbp, dbm, c, d, diff, reldiff, overrelaxation; - var tol = 1e-5; - var resid = 0; - var itermax = 100; - var iter = 0; - var n = ip.length; - do { - resid = 0; - // Normally we'd loop in two dimensions, but not all points are blank and need - // an update, so we instead loop only over the points that were tabulated above - for(k = 0; k < n; k++) { - i = ip[k]; - j = jp[k]; - // neighborCnt = neighborCnts[k]; - - // Track a counter for how many contributions there are. We'll use this counter - // to average at the end, which reduces to laplace's equation with neumann boundary - // conditions on the first derivative (second derivative is zero so that we get - // a nice linear extrapolation at the boundaries). - var boundaryCnt = 0; - var newVal = 0; - - var d0, d1, x0, x1, i0, j0; - if(i === 0) { - // If this lies along the i = 0 boundary, extrapolate from the two points - // to the right of this point. Note that the finite differences take into - // account non-uniform grid spacing: - i0 = Math.min(ni - 1, 2); - x0 = a[i0]; - x1 = a[1]; - d0 = data[j][i0]; - d1 = data[j][1]; - newVal += d1 + (d1 - d0) * (a[0] - x1) / (x1 - x0); - boundaryCnt++; - } else if(i === ni - 1) { - // If along the high i boundary, extrapolate from the two points to the - // left of this point - i0 = Math.max(0, ni - 3); - x0 = a[i0]; - x1 = a[ni - 2]; - d0 = data[j][i0]; - d1 = data[j][ni - 2]; - newVal += d1 + (d1 - d0) * (a[ni - 1] - x1) / (x1 - x0); - boundaryCnt++; - } - - if((i === 0 || i === ni - 1) && (j > 0 && j < nj - 1)) { - // If along the min(i) or max(i) boundaries, also smooth vertically as long - // as we're not in a corner. Note that the finite differences used here - // are also aware of nonuniform grid spacing: - dxp = b[j + 1] - b[j]; - dxm = b[j] - b[j - 1]; - newVal += (dxm * data[j + 1][i] + dxp * data[j - 1][i]) / (dxm + dxp); - boundaryCnt++; - } - - if(j === 0) { - // If along the j = 0 boundary, extrpolate this point from the two points - // above it - j0 = Math.min(nj - 1, 2); - x0 = b[j0]; - x1 = b[1]; - d0 = data[j0][i]; - d1 = data[1][i]; - newVal += d1 + (d1 - d0) * (b[0] - x1) / (x1 - x0); - boundaryCnt++; - } else if(j === nj - 1) { - // Same for the max j boundary from the cells below it: - j0 = Math.max(0, nj - 3); - x0 = b[j0]; - x1 = b[nj - 2]; - d0 = data[j0][i]; - d1 = data[nj - 2][i]; - newVal += d1 + (d1 - d0) * (b[nj - 1] - x1) / (x1 - x0); - boundaryCnt++; - } - - if((j === 0 || j === nj - 1) && (i > 0 && i < ni - 1)) { - // Now average points to the left/right as long as not in a corner: - dxp = a[i + 1] - a[i]; - dxm = a[i] - a[i - 1]; - newVal += (dxm * data[j][i + 1] + dxp * data[j][i - 1]) / (dxm + dxp); - boundaryCnt++; - } - - if(!boundaryCnt) { - // If none of the above conditions were triggered, then this is an interior - // point and we can just do a laplace equation update. As above, these differences - // are aware of nonuniform grid spacing: - dap = a[i + 1] - a[i]; - dam = a[i] - a[i - 1]; - dbp = b[j + 1] - b[j]; - dbm = b[j] - b[j - 1]; - - // These are just some useful constants for the iteration, which is perfectly - // straightforward but a little long to derive from f_xx + f_yy = 0. - c = dap * dam * (dap + dam); - d = dbp * dbm * (dbp + dbm); - - newVal = (c * (dbm * data[j + 1][i] + dbp * data[j - 1][i]) + - d * (dam * data[j][i + 1] + dap * data[j][i - 1])) / - (d * (dam + dap) + c * (dbm + dbp)); - } else { - // If we did have contributions from the boundary conditions, then average - // the result from the various contributions: - newVal /= boundaryCnt; - } - - // Jacobi updates are ridiculously slow to converge, so this approach uses a - // Gauss-seidel iteration which is dramatically faster. - diff = newVal - data[j][i]; - reldiff = diff / dmax; - resid += reldiff * reldiff; - - // Gauss-Seidel-ish iteration, omega chosen based on heuristics and some - // quick tests. - // - // NB: Don't overrelax the boundarie. Otherwise set an overrelaxation factor - // which is a little low but safely optimal-ish: - overrelaxation = boundaryCnt ? 0 : 0.85; - - // If there are four non-null neighbors, then we want a simple average without - // overrelaxation. If all the surrouding points are null, then we want the full - // overrelaxation - // - // Based on experiments, this actually seems to slow down convergence just a bit. - // I'll leave it here for reference in case this needs to be revisited, but - // it seems to work just fine without this. - // if (overrelaxation) overrelaxation *= (4 - neighborCnt) / 4; - - data[j][i] += diff * (1 + overrelaxation); - } - - resid = Math.sqrt(resid); - } while(iter++ < itermax && resid > tol); - - Lib.log('Smoother converged to', resid, 'after', iter, 'iterations'); - - return data; -}; - -},{"../../lib":685}],866:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var hasColumns = require('./has_columns'); -var convertColumnData = require('../heatmap/convert_column_xyz'); - -module.exports = function handleXYDefaults(traceIn, traceOut, coerce) { - var cols = []; - var x = coerce('x'); - - var needsXTransform = x && !hasColumns(x); - if(needsXTransform) cols.push('x'); - - traceOut._cheater = !x; - - var y = coerce('y'); - - var needsYTransform = y && !hasColumns(y); - if(needsYTransform) cols.push('y'); - - if(!x && !y) return; - - if(cols.length) { - convertColumnData(traceOut, traceOut.aaxis, traceOut.baxis, 'a', 'b', cols); - } - - return true; -}; - -},{"../heatmap/convert_column_xyz":907,"./has_columns":856}],867:[function(require,module,exports){ +},{"../../lib":680,"../ohlc/helpers":894}],829:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156583,7 +151367,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../../plots/attributes":722,"../scattergeo/attributes":1013}],868:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../../plots/attributes":717,"../scattergeo/attributes":953}],830:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156602,7 +151386,7 @@ module.exports = function calc(gd, trace) { colorscaleCalc(trace, trace.z, '', 'z'); }; -},{"../../components/colorscale/calc":584}],869:[function(require,module,exports){ +},{"../../components/colorscale/calc":581}],831:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156657,7 +151441,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('hoverinfo', (layout._dataLength === 1) ? 'location+z+text' : undefined); }; -},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":867}],870:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":829}],832:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156676,7 +151460,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],871:[function(require,module,exports){ +},{}],833:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156746,7 +151530,7 @@ function makeHoverInfo(pointData, trace, pt, axis) { pointData.extraText = text.join('
'); } -},{"../../plots/cartesian/axes":724,"./attributes":867}],872:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"./attributes":829}],834:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156783,7 +151567,7 @@ Choropleth.meta = { module.exports = Choropleth; -},{"../../plots/geo":752,"../heatmap/colorbar":906,"./attributes":867,"./calc":868,"./defaults":869,"./event_data":870,"./hover":871,"./plot":873}],873:[function(require,module,exports){ +},{"../../plots/geo":743,"../heatmap/colorbar":854,"./attributes":829,"./calc":830,"./defaults":831,"./event_data":832,"./hover":833,"./plot":835}],835:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156917,7 +151701,7 @@ function style(geo) { }); } -},{"../../components/color":578,"../../components/colorscale":592,"../../components/drawing":602,"../../lib/array_to_calc_item":671,"../../lib/geo_location_utils":680,"../../lib/topojson_utils":706,"../../plots/geo/constants":750,"d3":107}],874:[function(require,module,exports){ +},{"../../components/color":575,"../../components/colorscale":589,"../../components/drawing":598,"../../lib/array_to_calc_item":667,"../../lib/geo_location_utils":675,"../../lib/topojson_utils":701,"../../plots/geo/constants":741,"d3":104}],836:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156932,7 +151716,6 @@ var heatmapAttrs = require('../heatmap/attributes'); var scatterAttrs = require('../scatter/attributes'); var colorscaleAttrs = require('../../components/colorscale/attributes'); var colorbarAttrs = require('../../components/colorbar/attributes'); -var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; var scatterLineAttrs = scatterAttrs.line; @@ -157039,7 +151822,7 @@ module.exports = extendFlat({}, { ].join(' ') }), width: scatterLineAttrs.width, - dash: dash, + dash: scatterLineAttrs.dash, smoothing: extendFlat({}, scatterLineAttrs.smoothing, { description: [ 'Sets the amount of smoothing for the contour lines,', @@ -157053,7 +151836,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../components/drawing/attributes":601,"../../lib/extend":677,"../heatmap/attributes":903,"../scatter/attributes":976}],875:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../heatmap/attributes":851,"../scatter/attributes":924}],837:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157157,7 +151940,7 @@ function autoContours(start, end, ncontours) { return dummyAx; } -},{"../../lib":685,"../../plots/cartesian/axes":724,"../heatmap/calc":904}],876:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../heatmap/calc":852}],838:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157182,7 +151965,7 @@ module.exports = function colorbar(gd, cd) { gd._fullLayout._infolayer.selectAll('.' + cbId).remove(); - if(!trace.showscale) { + if(trace.showscale === false) { Plots.autoMargin(gd, cbId); return; } @@ -157219,7 +152002,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":581,"../../plots/plots":787,"./end_plus":880,"./make_color_map":884}],877:[function(require,module,exports){ +},{"../../components/colorbar/draw":578,"../../plots/plots":778,"./end_plus":842,"./make_color_map":846}],839:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157259,7 +152042,7 @@ module.exports.CHOOSESADDLE = { // substitute to be used up later? module.exports.SADDLEREMAINDER = {1: 4, 2: 8, 4: 1, 7: 13, 8: 2, 11: 14, 13: 7, 14: 11}; -},{}],878:[function(require,module,exports){ +},{}],840:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157291,7 +152074,7 @@ module.exports = function handleContourDefaults(traceIn, traceOut, coerce) { if(autoContour || !contourSize) coerce('ncontours'); }; -},{"../../lib":685,"./attributes":874}],879:[function(require,module,exports){ +},{"../../lib":680,"./attributes":836}],841:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157330,7 +152113,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout handleStyleDefaults(traceIn, traceOut, coerce, layout); }; -},{"../../lib":685,"../heatmap/has_columns":910,"../heatmap/xyz_defaults":918,"./attributes":874,"./contours_defaults":878,"./style_defaults":888}],880:[function(require,module,exports){ +},{"../../lib":680,"../heatmap/has_columns":858,"../heatmap/xyz_defaults":866,"./attributes":836,"./contours_defaults":840,"./style_defaults":850}],842:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157350,7 +152133,7 @@ module.exports = function endPlus(contours) { return contours.end + contours.size / 1e6; }; -},{}],881:[function(require,module,exports){ +},{}],843:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157364,38 +152147,34 @@ module.exports = function endPlus(contours) { var Lib = require('../../lib'); var constants = require('./constants'); -module.exports = function findAllPaths(pathinfo, xtol, ytol) { +module.exports = function findAllPaths(pathinfo) { var cnt, startLoc, i, pi, j; - // Default just passes these values through as they were before: - xtol = xtol || 0.01; - ytol = ytol || 0.01; - for(i = 0; i < pathinfo.length; i++) { pi = pathinfo[i]; for(j = 0; j < pi.starts.length; j++) { startLoc = pi.starts[j]; - makePath(pi, startLoc, 'edge', xtol, ytol); + makePath(pi, startLoc, 'edge'); } cnt = 0; while(Object.keys(pi.crossings).length && cnt < 10000) { cnt++; startLoc = Object.keys(pi.crossings)[0].split(',').map(Number); - makePath(pi, startLoc, undefined, xtol, ytol); + makePath(pi, startLoc); } if(cnt === 10000) Lib.log('Infinite loop in contour?'); } }; -function equalPts(pt1, pt2, xtol, ytol) { - return Math.abs(pt1[0] - pt2[0]) < xtol && - Math.abs(pt1[1] - pt2[1]) < ytol; +function equalPts(pt1, pt2) { + return Math.abs(pt1[0] - pt2[0]) < 0.01 && + Math.abs(pt1[1] - pt2[1]) < 0.01; } function ptDist(pt1, pt2) { @@ -157404,17 +152183,17 @@ function ptDist(pt1, pt2) { return Math.sqrt(dx * dx + dy * dy); } -function makePath(pi, loc, edgeflag, xtol, ytol) { - var startLocStr = loc.join(','); - var locStr = startLocStr; - var mi = pi.crossings[locStr]; - var marchStep = startStep(mi, edgeflag, loc); - // start by going backward a half step and finding the crossing point - var pts = [getInterpPx(pi, loc, [-marchStep[0], -marchStep[1]])]; - var startStepStr = marchStep.join(','); - var m = pi.z.length; - var n = pi.z[0].length; - var cnt; +function makePath(pi, loc, edgeflag) { + var startLocStr = loc.join(','), + locStr = startLocStr, + mi = pi.crossings[locStr], + marchStep = startStep(mi, edgeflag, loc), + // start by going backward a half step and finding the crossing point + pts = [getInterpPx(pi, loc, [-marchStep[0], -marchStep[1]])], + startStepStr = marchStep.join(','), + m = pi.z.length, + n = pi.z[0].length, + cnt; // now follow the path for(cnt = 0; cnt < 10000; cnt++) { // just to avoid infinite loops @@ -157438,7 +152217,7 @@ function makePath(pi, loc, edgeflag, xtol, ytol) { loc[1] += marchStep[1]; // don't include the same point multiple times - if(equalPts(pts[pts.length - 1], pts[pts.length - 2], xtol, ytol)) pts.pop(); + if(equalPts(pts[pts.length - 1], pts[pts.length - 2])) pts.pop(); locStr = loc.join(','); var atEdge = (marchStep[0] && (loc[0] < 0 || loc[0] > n - 2)) || @@ -157454,7 +152233,7 @@ function makePath(pi, loc, edgeflag, xtol, ytol) { if(cnt === 10000) { Lib.log('Infinite loop in contour?'); } - var closedpath = equalPts(pts[0], pts[pts.length - 1], xtol, ytol), + var closedpath = equalPts(pts[0], pts[pts.length - 1]), totaldist = 0, distThresholdFactor = 0.2 * pi.smoothing, alldists = [], @@ -157543,7 +152322,7 @@ function makePath(pi, loc, edgeflag, xtol, ytol) { // edge path - does it start where an existing edge path ends, or vice versa? var merged = false; pi.edgepaths.forEach(function(edgepath, edgei) { - if(!merged && equalPts(edgepath[0], pts[pts.length - 1], xtol, ytol)) { + if(!merged && equalPts(edgepath[0], pts[pts.length - 1])) { pts.pop(); merged = true; @@ -157551,7 +152330,7 @@ function makePath(pi, loc, edgeflag, xtol, ytol) { var doublemerged = false; pi.edgepaths.forEach(function(edgepath2, edgei2) { if(!doublemerged && equalPts( - edgepath2[edgepath2.length - 1], pts[0], xtol, ytol)) { + edgepath2[edgepath2.length - 1], pts[0])) { doublemerged = true; pts.splice(0, 1); pi.edgepaths.splice(edgei, 1); @@ -157571,7 +152350,7 @@ function makePath(pi, loc, edgeflag, xtol, ytol) { } }); pi.edgepaths.forEach(function(edgepath, edgei) { - if(!merged && equalPts(edgepath[edgepath.length - 1], pts[0], xtol, ytol)) { + if(!merged && equalPts(edgepath[edgepath.length - 1], pts[0])) { pts.splice(0, 1); pi.edgepaths[edgei] = edgepath.concat(pts); merged = true; @@ -157614,7 +152393,6 @@ function getInterpPx(pi, loc, step) { if(step[1]) { var dx = (pi.level - zxy) / (pi.z[locy][locx + 1] - zxy); - return [xa.c2p((1 - dx) * pi.x[locx] + dx * pi.x[locx + 1], true), ya.c2p(pi.y[locy], true)]; } @@ -157625,7 +152403,7 @@ function getInterpPx(pi, loc, step) { } } -},{"../../lib":685,"./constants":877}],882:[function(require,module,exports){ +},{"../../lib":680,"./constants":839}],844:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157644,7 +152422,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return heatmapHoverPoints(pointData, xval, yval, hovermode, true); }; -},{"../heatmap/hover":911}],883:[function(require,module,exports){ +},{"../heatmap/hover":859}],845:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157685,7 +152463,7 @@ Contour.meta = { module.exports = Contour; -},{"../../plots/cartesian":734,"./attributes":874,"./calc":875,"./colorbar":876,"./defaults":879,"./hover":882,"./plot":886,"./style":887}],884:[function(require,module,exports){ +},{"../../plots/cartesian":727,"./attributes":836,"./calc":837,"./colorbar":838,"./defaults":841,"./hover":844,"./plot":848,"./style":849}],846:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157709,11 +152487,6 @@ module.exports = function makeColorMap(trace) { nc = Math.floor((end - start) / cs) + 1, extra = contours.coloring === 'lines' ? 0 : 1; - if(!isFinite(cs)) { - cs = 1; - nc = 1; - } - var scl = trace.colorscale, len = scl.length; @@ -157769,7 +152542,7 @@ module.exports = function makeColorMap(trace) { }); }; -},{"../../components/colorscale":592,"./end_plus":880,"d3":107}],885:[function(require,module,exports){ +},{"../../components/colorscale":589,"./end_plus":842,"d3":104}],847:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -157861,7 +152634,7 @@ function getMarchingIndex(val, corners) { return (mi === 15) ? 0 : mi; } -},{"./constants":877}],886:[function(require,module,exports){ +},{"./constants":839}],848:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158141,8 +152914,7 @@ function makeLines(plotgroup, pathinfo, contours) { .attr('d', function(d) { return Drawing.smoothopen(d, smoothing); }) - .style('stroke-miterlimit', 1) - .style('vector-effect', 'non-scaling-stroke'); + .style('stroke-miterlimit', 1); var closedcontourlines = linegroup.selectAll('path.closedline') .data(function(d) { return d.paths; }); @@ -158153,8 +152925,7 @@ function makeLines(plotgroup, pathinfo, contours) { .attr('d', function(d) { return Drawing.smoothclosed(d, smoothing); }) - .style('stroke-miterlimit', 1) - .style('vector-effect', 'non-scaling-stroke'); + .style('stroke-miterlimit', 1); } function clipGaps(plotGroup, plotinfo, cd0, perimeter) { @@ -158225,7 +152996,7 @@ function makeClipMask(cd0) { return z; } -},{"../../components/drawing":602,"../../lib":685,"../heatmap/plot":916,"./end_plus":880,"./find_all_paths":881,"./make_crossings":885,"d3":107}],887:[function(require,module,exports){ +},{"../../components/drawing":598,"../../lib":680,"../heatmap/plot":864,"./end_plus":842,"./find_all_paths":843,"./make_crossings":847,"d3":104}],849:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158287,7 +153058,7 @@ module.exports = function style(gd) { heatmapStyle(gd); }; -},{"../../components/drawing":602,"../heatmap/style":917,"./make_color_map":884,"d3":107}],888:[function(require,module,exports){ +},{"../../components/drawing":598,"../heatmap/style":865,"./make_color_map":846,"d3":104}],850:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158302,15 +153073,15 @@ module.exports = function style(gd) { var colorscaleDefaults = require('../../components/colorscale/defaults'); -module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout, defaultColor, defaultWidth) { +module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout) { var coloring = coerce('contours.coloring'); var showLines; if(coloring === 'fill') showLines = coerce('contours.showlines'); if(showLines !== false) { - if(coloring !== 'lines') coerce('line.color', defaultColor || '#000'); - coerce('line.width', defaultWidth === undefined ? 0.5 : defaultWidth); + if(coloring !== 'lines') coerce('line.color', '#000'); + coerce('line.width', 0.5); coerce('line.dash'); } @@ -158323,1485 +153094,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout, } }; -},{"../../components/colorscale/defaults":587}],889:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var heatmapAttrs = require('../heatmap/attributes'); -var scatterAttrs = require('../scatter/attributes'); -var colorscaleAttrs = require('../../components/colorscale/attributes'); -var colorbarAttrs = require('../../components/colorbar/attributes'); - -var extendFlat = require('../../lib/extend').extendFlat; - -var scatterLineAttrs = scatterAttrs.line; -var constants = require('./constants'); - -module.exports = extendFlat({}, { - carpet: { - valType: 'string', - role: 'info', - description: [ - 'The `carpet` of the carpet axes on which this contour trace lies' - ].join(' ') - }, - z: heatmapAttrs.z, - a: heatmapAttrs.x, - a0: heatmapAttrs.x0, - da: heatmapAttrs.dx, - b: heatmapAttrs.y, - b0: heatmapAttrs.y0, - db: heatmapAttrs.dy, - text: heatmapAttrs.text, - transpose: heatmapAttrs.transpose, - atype: heatmapAttrs.xtype, - btype: heatmapAttrs.ytype, - - mode: { - valType: 'flaglist', - flags: ['lines', 'fill'], - extras: ['none'], - role: 'info', - description: ['The mode.'].join(' ') - }, - - connectgaps: heatmapAttrs.connectgaps, - - fillcolor: { - valType: 'color', - role: 'style', - description: [ - 'Sets the fill color.', - 'Defaults to a half-transparent variant of the line color,', - 'marker color, or marker line color, whichever is available.' - ].join(' ') - }, - - autocontour: { - valType: 'boolean', - dflt: true, - role: 'style', - description: [ - 'Determines whether or not the contour level attributes are', - 'picked by an algorithm.', - 'If *true*, the number of contour levels can be set in `ncontours`.', - 'If *false*, set the contour level attributes in `contours`.' - ].join(' ') - }, - ncontours: { - valType: 'integer', - dflt: 15, - min: 1, - role: 'style', - description: [ - 'Sets the maximum number of contour levels. The actual number', - 'of contours will be chosen automatically to be less than or', - 'equal to the value of `ncontours`.', - 'Has an effect only if `autocontour` is *true* or if', - '`contours.size` is missing.' - ].join(' ') - }, - - contours: { - type: { - valType: 'enumerated', - values: ['levels', 'constraint'], - dflt: 'levels', - role: 'info', - description: [ - 'If `levels`, the data is represented as a contour plot with multiple', - 'levels displayed. If `constraint`, the data is represented as constraints', - 'with the invalid region shaded as specified by the `operation` and', - '`value` parameters.' - ].join(' ') - }, - start: { - valType: 'number', - dflt: null, - role: 'style', - description: [ - 'Sets the starting contour level value.', - 'Must be less than `contours.end`' - ].join(' ') - }, - end: { - valType: 'number', - dflt: null, - role: 'style', - description: [ - 'Sets the end contour level value.', - 'Must be more than `contours.start`' - ].join(' ') - }, - size: { - valType: 'number', - dflt: null, - min: 0, - role: 'style', - description: [ - 'Sets the step between each contour level.', - 'Must be positive.' - ].join(' ') - }, - coloring: { - valType: 'enumerated', - values: ['fill', 'lines', 'none'], - dflt: 'fill', - role: 'style', - description: [ - 'Determines the coloring method showing the contour values.', - 'If *fill*, coloring is done evenly between each contour level', - 'If *lines*, coloring is done on the contour lines.', - 'If *none*, no coloring is applied on this trace.' - ].join(' ') - }, - showlines: { - valType: 'boolean', - dflt: true, - role: 'style', - description: [ - 'Determines whether or not the contour lines are drawn.', - 'Has only an effect if `contours.coloring` is set to *fill*.' - ].join(' ') - }, - operation: { - valType: 'enumerated', - values: [].concat(constants.INEQUALITY_OPS).concat(constants.INTERVAL_OPS).concat(constants.SET_OPS), - role: 'info', - dflt: '=', - description: [ - 'Sets the filter operation.', - - '*=* keeps items equal to `value`', - - '*<* keeps items less than `value`', - '*<=* keeps items less than or equal to `value`', - - '*>* keeps items greater than `value`', - '*>=* keeps items greater than or equal to `value`', - - '*[]* keeps items inside `value[0]` to value[1]` including both bounds`', - '*()* keeps items inside `value[0]` to value[1]` excluding both bounds`', - '*[)* keeps items inside `value[0]` to value[1]` including `value[0]` but excluding `value[1]', - '*(]* keeps items inside `value[0]` to value[1]` excluding `value[0]` but including `value[1]', - - '*][* keeps items outside `value[0]` to value[1]` and equal to both bounds`', - '*)(* keeps items outside `value[0]` to value[1]`', - '*](* keeps items outside `value[0]` to value[1]` and equal to `value[0]`', - '*)[* keeps items outside `value[0]` to value[1]` and equal to `value[1]`' - ].join(' ') - }, - value: { - valType: 'any', - dflt: 0, - role: 'info', - description: [ - 'Sets the value or values by which to filter by.', - - 'Values are expected to be in the same type as the data linked', - 'to *target*.', - - 'When `operation` is set to one of the inequality values', - '(' + constants.INEQUALITY_OPS + ')', - '*value* is expected to be a number or a string.', - - 'When `operation` is set to one of the interval value', - '(' + constants.INTERVAL_OPS + ')', - '*value* is expected to be 2-item array where the first item', - 'is the lower bound and the second item is the upper bound.', - - 'When `operation`, is set to one of the set value', - '(' + constants.SET_OPS + ')', - '*value* is expected to be an array with as many items as', - 'the desired set elements.' - ].join(' ') - } - }, - - line: { - color: extendFlat({}, scatterLineAttrs.color, { - description: [ - 'Sets the color of the contour level.', - 'Has no if `contours.coloring` is set to *lines*.' - ].join(' ') - }), - width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash, - smoothing: extendFlat({}, scatterLineAttrs.smoothing, { - description: [ - 'Sets the amount of smoothing for the contour lines,', - 'where *0* corresponds to no smoothing.' - ].join(' ') - }) - } -}, - colorscaleAttrs, - { autocolorscale: extendFlat({}, colorscaleAttrs.autocolorscale, {dflt: false}) }, - { colorbar: colorbarAttrs } -); - -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../heatmap/attributes":903,"../scatter/attributes":976,"./constants":892}],890:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Lib = require('../../lib'); -var Axes = require('../../plots/cartesian/axes'); -var extendFlat = require('../../lib').extendFlat; -var Registry = require('../../registry'); -var colorscaleCalc = require('../../components/colorscale/calc'); -var hasColumns = require('../heatmap/has_columns'); -var convertColumnData = require('../heatmap/convert_column_xyz'); -var clean2dArray = require('../heatmap/clean_2d_array'); -var maxRowLength = require('../heatmap/max_row_length'); -var interp2d = require('../heatmap/interp2d'); -var findEmpties = require('../heatmap/find_empties'); -var makeBoundArray = require('../heatmap/make_bound_array'); -var supplyDefaults = require('./defaults'); -var lookupCarpet = require('../carpet/lookup_carpetid'); - -// most is the same as heatmap calc, then adjust it -// though a few things inside heatmap calc still look for -// contour maps, because the makeBoundArray calls are too entangled -module.exports = function calc(gd, trace) { - var carpet = trace.carpetTrace = lookupCarpet(gd, trace); - if(!carpet || !carpet.visible || carpet.visible === 'legendonly') return; - - if(!trace.a || !trace.b) { - // Look up the original incoming carpet data: - var carpetdata = gd.data[carpet.index]; - - // Look up the incoming trace data, *except* perform a shallow - // copy so that we're not actually modifying it when we use it - // to supply defaults: - var tracedata = gd.data[trace.index]; - // var tracedata = extendFlat({}, gd.data[trace.index]); - - // If the data is not specified - if(!tracedata.a) tracedata.a = carpetdata.a; - if(!tracedata.b) tracedata.b = carpetdata.b; - - supplyDefaults(tracedata, trace, trace._defaultColor, gd._fullLayout); - } - - var cd = heatmappishCalc(gd, trace), - contours = trace.contours; - - // Autocontour is unset for constraint plots so also autocontour if undefind: - if(trace.autocontour === true) { - var dummyAx = autoContours(trace.zmin, trace.zmax, trace.ncontours); - - contours.size = dummyAx.dtick; - - contours.start = Axes.tickFirst(dummyAx); - dummyAx.range.reverse(); - contours.end = Axes.tickFirst(dummyAx); - - if(contours.start === trace.zmin) contours.start += contours.size; - if(contours.end === trace.zmax) contours.end -= contours.size; - - // if you set a small ncontours, *and* the ends are exactly on zmin/zmax - // there's an edge case where start > end now. Make sure there's at least - // one meaningful contour, put it midway between the crossed values - if(contours.start > contours.end) { - contours.start = contours.end = (contours.start + contours.end) / 2; - } - - // copy auto-contour info back to the source data. - trace._input.contours = extendFlat({}, contours); - } - else { - // sanity checks on manually-supplied start/end/size - var start = contours.start, - end = contours.end, - inputContours = trace._input.contours; - - if(start > end) { - contours.start = inputContours.start = end; - end = contours.end = inputContours.end = start; - start = contours.start; - } - - if(!(contours.size > 0)) { - var sizeOut; - if(start === end) sizeOut = 1; - else sizeOut = autoContours(start, end, trace.ncontours).dtick; - - inputContours.size = contours.size = sizeOut; - } - } - - return cd; -}; - -/* - * autoContours: make a dummy axis object with dtick we can use - * as contours.size, and if needed we can use Axes.tickFirst - * with this axis object to calculate the start and end too - * - * start: the value to start the contours at - * end: the value to end at (must be > start) - * ncontours: max number of contours to make, like roughDTick - * - * returns: an axis object - */ -function autoContours(start, end, ncontours) { - var dummyAx = { - type: 'linear', - range: [start, end] - }; - - Axes.autoTicks( - dummyAx, - (end - start) / (ncontours || 15) - ); - - return dummyAx; -} - -function heatmappishCalc(gd, trace) { - // prepare the raw data - // run makeCalcdata on x and y even for heatmaps, in case of category mappings - var carpet = trace.carpetTrace; - var aax = carpet.aaxis, - bax = carpet.baxis, - isContour = Registry.traceIs(trace, 'contour'), - zsmooth = isContour ? 'best' : trace.zsmooth, - a, - a0, - da, - b, - b0, - db, - z, - i; - - // cancel minimum tick spacings (only applies to bars and boxes) - aax._minDtick = 0; - bax._minDtick = 0; - - if(hasColumns(trace)) convertColumnData(trace, aax, bax, 'a', 'b', ['z']); - - a = trace.a ? aax.makeCalcdata(trace, 'a') : []; - b = trace.b ? bax.makeCalcdata(trace, 'b') : []; - a0 = trace.a0 || 0; - da = trace.da || 1; - b0 = trace.b0 || 0; - db = trace.db || 1; - - z = clean2dArray(trace.z, trace.transpose); - - trace._emptypoints = findEmpties(z); - trace._interpz = interp2d(z, trace._emptypoints, trace._interpz); - - function noZsmooth(msg) { - zsmooth = trace._input.zsmooth = trace.zsmooth = false; - Lib.notifier('cannot fast-zsmooth: ' + msg); - } - - // check whether we really can smooth (ie all boxes are about the same size) - if(zsmooth === 'fast') { - if(aax.type === 'log' || bax.type === 'log') { - noZsmooth('log axis found'); - } - else { - if(a.length) { - var avgda = (a[a.length - 1] - a[0]) / (a.length - 1), - maxErrX = Math.abs(avgda / 100); - for(i = 0; i < a.length - 1; i++) { - if(Math.abs(a[i + 1] - a[i] - avgda) > maxErrX) { - noZsmooth('a scale is not linear'); - break; - } - } - } - if(b.length && zsmooth === 'fast') { - var avgdy = (b[b.length - 1] - b[0]) / (b.length - 1), - maxErrY = Math.abs(avgdy / 100); - for(i = 0; i < b.length - 1; i++) { - if(Math.abs(b[i + 1] - b[i] - avgdy) > maxErrY) { - noZsmooth('b scale is not linear'); - break; - } - } - } - } - } - - // create arrays of brick boundaries, to be used by autorange and heatmap.plot - var xlen = maxRowLength(z), - xIn = trace.xtype === 'scaled' ? '' : a, - xArray = makeBoundArray(trace, xIn, a0, da, xlen, aax), - yIn = trace.ytype === 'scaled' ? '' : b, - yArray = makeBoundArray(trace, yIn, b0, db, z.length, bax); - - var cd0 = { - a: xArray, - b: yArray, - z: z, - //mappedZ: mappedZ - }; - - if(trace.contours.type === 'levels') { - // auto-z and autocolorscale if applicable - colorscaleCalc(trace, z, '', 'z'); - } - - return [cd0]; -} - -},{"../../components/colorscale/calc":584,"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"../carpet/lookup_carpetid":858,"../heatmap/clean_2d_array":905,"../heatmap/convert_column_xyz":907,"../heatmap/find_empties":909,"../heatmap/has_columns":910,"../heatmap/interp2d":913,"../heatmap/make_bound_array":914,"../heatmap/max_row_length":915,"./defaults":896}],891:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = function(pathinfo, operation, perimeter, trace) { - // Abandon all hope, ye who enter here. - var i, v1, v2; - var na = trace.a.length; - var nb = trace.b.length; - var z = trace.z; - - var boundaryMax = -Infinity; - var boundaryMin = Infinity; - - for(i = 0; i < nb; i++) { - boundaryMin = Math.min(boundaryMin, z[i][0]); - boundaryMin = Math.min(boundaryMin, z[i][na - 1]); - boundaryMax = Math.max(boundaryMax, z[i][0]); - boundaryMax = Math.max(boundaryMax, z[i][na - 1]); - } - - for(i = 1; i < na - 1; i++) { - boundaryMin = Math.min(boundaryMin, z[0][i]); - boundaryMin = Math.min(boundaryMin, z[nb - 1][i]); - boundaryMax = Math.max(boundaryMax, z[0][i]); - boundaryMax = Math.max(boundaryMax, z[nb - 1][i]); - } - - switch(operation) { - case '>': - case '>=': - if(trace.contours.value > boundaryMax) { - pathinfo[0].prefixBoundary = true; - } - break; - case '<': - case '<=': - if(trace.contours.value < boundaryMin) { - pathinfo[0].prefixBoundary = true; - } - break; - case '[]': - case '()': - v1 = Math.min.apply(null, trace.contours.value); - v2 = Math.max.apply(null, trace.contours.value); - if(v2 < boundaryMin) { - pathinfo[0].prefixBoundary = true; - } - if(v1 > boundaryMax) { - pathinfo[0].prefixBoundary = true; - } - break; - case '][': - case ')(': - v1 = Math.min.apply(null, trace.contours.value); - v2 = Math.max.apply(null, trace.contours.value); - if(v1 < boundaryMin && v2 > boundaryMax) { - pathinfo[0].prefixBoundary = true; - } - break; - } -}; - -},{}],892:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = { - INEQUALITY_OPS: ['=', '<', '>=', '>', '<='], - INTERVAL_OPS: ['[]', '()', '[)', '(]', '][', ')(', '](', ')['], - SET_OPS: ['{}', '}{'] -}; - -},{}],893:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var constants = require('./constants'); -var isNumeric = require('fast-isnumeric'); - -// This syntax conforms to the existing filter transform syntax, but we don't care -// about open vs. closed intervals for simply drawing contours constraints: -module.exports['[]'] = makeRangeSettings('[]'); -module.exports['()'] = makeRangeSettings('()'); -module.exports['[)'] = makeRangeSettings('[)'); -module.exports['(]'] = makeRangeSettings('(]'); - -// Inverted intervals simply flip the sign: -module.exports[']['] = makeRangeSettings(']['); -module.exports[')('] = makeRangeSettings(')('); -module.exports[')['] = makeRangeSettings(')['); -module.exports[']('] = makeRangeSettings(']('); - -module.exports['>'] = makeInequalitySettings('>'); -module.exports['>='] = makeInequalitySettings('>='); -module.exports['<'] = makeInequalitySettings('<'); -module.exports['<='] = makeInequalitySettings('<='); -module.exports['='] = makeInequalitySettings('='); - -// This does not in any way shape or form support calendars. It's adapted from -// transforms/filter.js. -function coerceValue(operation, value) { - var hasArrayValue = Array.isArray(value); - - var coercedValue; - - function coerce(value) { - return isNumeric(value) ? (+value) : null; - } - - if(constants.INEQUALITY_OPS.indexOf(operation) !== -1) { - coercedValue = hasArrayValue ? coerce(value[0]) : coerce(value); - } else if(constants.INTERVAL_OPS.indexOf(operation) !== -1) { - coercedValue = hasArrayValue ? - [coerce(value[0]), coerce(value[1])] : - [coerce(value), coerce(value)]; - } else if(constants.SET_OPS.indexOf(operation) !== -1) { - coercedValue = hasArrayValue ? value.map(coerce) : [coerce(value)]; - } - - return coercedValue; -} - -// Returns a parabola scaled so that the min/max is either +/- 1 and zero at the two values -// provided. The data is mapped by this function when constructing intervals so that it's -// very easy to construct contours as normal. -function makeRangeSettings(operation) { - return function(value) { - value = coerceValue(operation, value); - - // Ensure proper ordering: - var min = Math.min(value[0], value[1]); - var max = Math.max(value[0], value[1]); - - return { - start: min, - end: max, - size: max - min - }; - }; -} - -function makeInequalitySettings(operation) { - return function(value) { - value = coerceValue(operation, value); - - return { - start: value, - end: Infinity, - size: Infinity - }; - }; -} - -},{"./constants":892,"fast-isnumeric":116}],894:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var constraintMapping = require('./constraint_mapping'); -var isNumeric = require('fast-isnumeric'); - -module.exports = function(coerce, contours) { - var zvalue; - var scalarValuedOps = ['=', '<', '<=', '>', '>=']; - - if(scalarValuedOps.indexOf(contours.operation) === -1) { - // Requires an array of two numbers: - coerce('contours.value', [0, 1]); - - if(!Array.isArray(contours.value)) { - if(isNumeric(contours.value)) { - zvalue = parseFloat(contours.value); - contours.value = [zvalue, zvalue + 1]; - } - } else if(contours.value.length > 2) { - contours.value = contours.value.slice(2); - } else if(contours.length === 0) { - contours.value = [0, 1]; - } else if(contours.length < 2) { - zvalue = parseFloat(contours.value[0]); - contours.value = [zvalue, zvalue + 1]; - } else { - contours.value = [ - parseFloat(contours.value[0]), - parseFloat(contours.value[1]) - ]; - } - } else { - // Requires a single scalar: - coerce('contours.value', 0); - - if(!isNumeric(contours.value)) { - if(Array.isArray(contours.value)) { - contours.value = parseFloat(contours.value[0]); - } else { - contours.value = 0; - } - } - } - - var map = constraintMapping[contours.operation](contours.value); - - contours.start = map.start; - contours.end = map.end; - contours.size = map.size; -}; - -},{"./constraint_mapping":893,"fast-isnumeric":116}],895:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Lib = require('../../lib'); - -// The contour extraction is great, except it totally fails for constraints because we -// need weird range loops and flipped contours instead of the usual format. This function -// does some weird manipulation of the extracted pathinfo data such that it magically -// draws contours correctly *as* constraints. -module.exports = function(pathinfo, operation) { - var i, pi0, pi1; - - var op0 = function(arr) { return arr.reverse(); }; - var op1 = function(arr) { return arr; }; - - switch(operation) { - case '][': - case ')[': - case '](': - case ')(': - var tmp = op0; - op0 = op1; - op1 = tmp; - // It's a nice rule, except this definitely *is* what's intended here. - /* eslint-disable: no-fallthrough */ - case '[]': - case '[)': - case '(]': - case '()': - /* eslint-enable: no-fallthrough */ - if(pathinfo.length !== 2) { - Lib.warn('Contour data invalid for the specified inequality range operation.'); - return; - } - - // In this case there should be exactly two contour levels in pathinfo. We - // simply concatenate the info into one pathinfo and flip all of the data - // in one. This will draw the contour as closed. - pi0 = pathinfo[0]; - pi1 = pathinfo[1]; - - for(i = 0; i < pi0.edgepaths.length; i++) { - pi0.edgepaths[i] = op0(pi0.edgepaths[i]); - } - - for(i = 0; i < pi0.paths.length; i++) { - pi0.paths[i] = op0(pi0.paths[i]); - } - - while(pi1.edgepaths.length) { - pi0.edgepaths.push(op1(pi1.edgepaths.shift())); - } - while(pi1.paths.length) { - pi0.paths.push(op1(pi1.paths.shift())); - } - pathinfo.pop(); - - break; - case '>=': - case '>': - if(pathinfo.length !== 1) { - Lib.warn('Contour data invalid for the specified inequality operation.'); - return; - } - - // In this case there should be exactly two contour levels in pathinfo. We - // simply concatenate the info into one pathinfo and flip all of the data - // in one. This will draw the contour as closed. - pi0 = pathinfo[0]; - - for(i = 0; i < pi0.edgepaths.length; i++) { - pi0.edgepaths[i] = op0(pi0.edgepaths[i]); - } - - for(i = 0; i < pi0.paths.length; i++) { - pi0.paths[i] = op0(pi0.paths[i]); - } - break; - } -}; - -},{"../../lib":685}],896:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var Lib = require('../../lib'); - -var handleXYZDefaults = require('../heatmap/xyz_defaults'); -var attributes = require('./attributes'); -var handleStyleDefaults = require('../contour/style_defaults'); -var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); -var plotAttributes = require('../../plots/attributes'); -var supplyConstraintDefaults = require('./constraint_value_defaults'); -var addOpacity = require('../../components/color').addOpacity; - -module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { - function coerce(attr, dflt) { - return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); - } - - coerce('carpet'); - - // If either a or b is not present, then it's not a valid trace *unless* the carpet - // axis has the a or b values we're looking for. So if these are not found, just defer - // that decision until the calc step. - // - // NB: the calc step will modify the original data input by assigning whichever of - // a or b are missing. This is necessary because panning goes right from supplyDefaults - // to plot (skipping calc). That means on subsequent updates, this *will* need to be - // able to find a and b. - // - // The long-term proper fix is that this should perhaps use underscored attributes to - // at least modify the user input to a slightly lesser extent. Fully removing the - // input mutation is challenging. The underscore approach is not currently taken since - // it requires modification to all of the functions below that expect the coerced - // attribute name to match the property name -- except '_a' !== 'a' so that is not - // straightforward. - if(traceIn.a && traceIn.b) { - var contourSize, contourStart, contourEnd, missingEnd, autoContour; - - var len = handleXYZDefaults(traceIn, traceOut, coerce, layout, 'a', 'b'); - - if(!len) { - traceOut.visible = false; - return; - } - - coerce('text'); - coerce('contours.type'); - - var contours = traceOut.contours; - - // Unimplemented: - // coerce('connectgaps', hasColumns(traceOut)); - - if(contours.type === 'constraint') { - coerce('contours.operation'); - - supplyConstraintDefaults(coerce, contours); - - // Override the trace-level showlegend default with a default that takes - // into account whether this is a constraint or level contours: - Lib.coerce(traceIn, traceOut, plotAttributes, 'showlegend', true); - - // Override the above defaults with constraint-aware tweaks: - coerce('contours.coloring', contours.operation === '=' ? 'lines' : 'fill'); - coerce('contours.showlines', true); - - if(contours.operation === '=') { - contours.coloring = 'lines'; - } - handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce); - - // If there's a fill color, use it at full opacity for the line color - var lineDfltColor = traceOut.fillcolor ? addOpacity(traceOut.fillcolor, 1) : defaultColor; - - handleStyleDefaults(traceIn, traceOut, coerce, layout, lineDfltColor, 2); - - if(contours.operation === '=') { - coerce('line.color', defaultColor); - - if(contours.coloring === 'fill') { - contours.coloring = 'lines'; - } - - if(contours.coloring === 'lines') { - delete traceOut.fillcolor; - } - } - - delete traceOut.showscale; - delete traceOut.autocontour; - delete traceOut.autocolorscale; - delete traceOut.colorscale; - delete traceOut.ncontours; - delete traceOut.colorbar; - - if(traceOut.line) { - delete traceOut.line.autocolorscale; - delete traceOut.line.colorscale; - delete traceOut.line.mincolor; - delete traceOut.line.maxcolor; - } - - // TODO: These shouldb e deleted in accordance with toolpanel convention, but - // we can't becuase we require them so that it magically makes the contour - // parts of the code happy: - // delete traceOut.contours.start; - // delete traceOut.contours.end; - // delete traceOut.contours.size; - } else { - // Override the trace-level showlegend default with a default that takes - // into account whether this is a constraint or level contours: - Lib.coerce(traceIn, traceOut, plotAttributes, 'showlegend', false); - - contourStart = Lib.coerce2(traceIn, traceOut, attributes, 'contours.start'); - contourEnd = Lib.coerce2(traceIn, traceOut, attributes, 'contours.end'); - - // normally we only need size if autocontour is off. But contour.calc - // pushes its calculated contour size back to the input trace, so for - // things like restyle that can call supplyDefaults without calc - // after the initial draw, we can just reuse the previous calculation - contourSize = coerce('contours.size'); - coerce('contours.coloring'); - - missingEnd = (contourStart === false) || (contourEnd === false); - - if(missingEnd) { - autoContour = traceOut.autocontour = true; - } else { - autoContour = coerce('autocontour', false); - } - - if(autoContour || !contourSize) { - coerce('ncontours'); - } - - handleStyleDefaults(traceIn, traceOut, coerce, layout); - - delete traceOut.value; - delete traceOut.operation; - } - } else { - traceOut._defaultColor = defaultColor; - } -}; - -},{"../../components/color":578,"../../lib":685,"../../plots/attributes":722,"../contour/style_defaults":888,"../heatmap/xyz_defaults":918,"../scatter/fillcolor_defaults":983,"./attributes":889,"./constraint_value_defaults":894}],897:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Lib = require('../../lib'); - -module.exports = function emptyPathinfo(contours, plotinfo, cd0) { - var cs = contours.size; - var pathinfo = []; - - var carpet = cd0.trace.carpetTrace; - - for(var ci = contours.start; ci < contours.end + cs / 10; ci += cs) { - pathinfo.push({ - level: ci, - // all the cells with nontrivial marching index - crossings: {}, - // starting points on the edges of the lattice for each contour - starts: [], - // all unclosed paths (may have less items than starts, - // if a path is closed by rounding) - edgepaths: [], - // all closed paths - paths: [], - // store axes so we can convert to px - xaxis: carpet.aaxis, - yaxis: carpet.baxis, - // full data arrays to use for interpolation - x: cd0.a, - y: cd0.b, - z: cd0.z, - smoothing: cd0.trace.line.smoothing - }); - - if(pathinfo.length > 1000) { - Lib.warn('Too many contours, clipping at 1000', contours); - break; - } - } - return pathinfo; -}; - -},{"../../lib":685}],898:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var ContourCarpet = {}; - -ContourCarpet.attributes = require('./attributes'); -ContourCarpet.supplyDefaults = require('./defaults'); -ContourCarpet.colorbar = require('../contour/colorbar'); -ContourCarpet.calc = require('./calc'); -ContourCarpet.plot = require('./plot'); -ContourCarpet.style = require('./style'); - -ContourCarpet.moduleType = 'trace'; -ContourCarpet.name = 'contourcarpet'; -ContourCarpet.basePlotModule = require('../../plots/cartesian'); -ContourCarpet.categories = ['cartesian', 'carpet', 'contour', 'symbols', 'showLegend', 'hasLines', 'carpetDependent']; -ContourCarpet.meta = { - hrName: 'contour_carpet', - description: [ - 'Plots contours on either the first carpet axis or the', - 'carpet axis with a matching `carpet` attribute. Data `z`', - 'is interpreted as matching that of the corresponding carpet', - 'axis.' - ].join(' ') -}; - -module.exports = ContourCarpet; - -},{"../../plots/cartesian":734,"../contour/colorbar":876,"./attributes":889,"./calc":890,"./defaults":896,"./plot":901,"./style":902}],899:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Drawing = require('../../components/drawing'); -var axisAlignedLine = require('../carpet/axis_aligned_line'); -var Lib = require('../../lib'); -// var map1dArray = require('../carpet/map_1d_array'); -// var makepath = require('../carpet/makepath'); - -module.exports = function joinAllPaths(trace, pi, perimeter, ab2p, carpet, carpetcd, xa, ya) { - var i; - var fullpath = ''; - - var startsleft = pi.edgepaths.map(function(v, i) { return i; }); - var newloop = true; - var endpt, newendpt, cnt, nexti, possiblei, addpath; - - var atol = Math.abs(perimeter[0][0] - perimeter[2][0]) * 1e-4; - var btol = Math.abs(perimeter[0][1] - perimeter[2][1]) * 1e-4; - - function istop(pt) { return Math.abs(pt[1] - perimeter[0][1]) < btol; } - function isbottom(pt) { return Math.abs(pt[1] - perimeter[2][1]) < btol; } - function isleft(pt) { return Math.abs(pt[0] - perimeter[0][0]) < atol; } - function isright(pt) { return Math.abs(pt[0] - perimeter[2][0]) < atol; } - - function pathto(pt0, pt1) { - var i, j, segments, axis; - var path = ''; - - if((istop(pt0) && !isright(pt0)) || (isbottom(pt0) && !isleft(pt0))) { - axis = carpet.aaxis; - segments = axisAlignedLine(carpet, carpetcd, [pt0[0], pt1[0]], 0.5 * (pt0[1] + pt1[1])); - } else { - axis = carpet.baxis; - segments = axisAlignedLine(carpet, carpetcd, 0.5 * (pt0[0] + pt1[0]), [pt0[1], pt1[1]]); - } - - for(i = 1; i < segments.length; i++) { - path += axis.smoothing ? 'C' : 'L'; - for(j = 0; j < segments[i].length; j++) { - var pt = segments[i][j]; - path += [xa.c2p(pt[0]), ya.c2p(pt[1])] + ' '; - } - } - - return path; - } - - i = 0; - endpt = null; - while(startsleft.length) { - var startpt = pi.edgepaths[i][0]; - - if(endpt) { - fullpath += pathto(endpt, startpt); - } - - addpath = Drawing.smoothopen(pi.edgepaths[i].map(ab2p), pi.smoothing); - fullpath += newloop ? addpath : addpath.replace(/^M/, 'L'); - startsleft.splice(startsleft.indexOf(i), 1); - endpt = pi.edgepaths[i][pi.edgepaths[i].length - 1]; - nexti = -1; - - // now loop through sides, moving our endpoint until we find a new start - for(cnt = 0; cnt < 4; cnt++) { // just to prevent infinite loops - if(!endpt) { - Lib.log('Missing end?', i, pi); - break; - } - - if(istop(endpt) && !isright(endpt)) { - newendpt = perimeter[1]; // left top ---> right top - } else if(isleft(endpt)) { - newendpt = perimeter[0]; // left bottom ---> left top - } else if(isbottom(endpt)) { - newendpt = perimeter[3]; // right bottom - } else if(isright(endpt)) { - newendpt = perimeter[2]; // left bottom - } - - for(possiblei = 0; possiblei < pi.edgepaths.length; possiblei++) { - var ptNew = pi.edgepaths[possiblei][0]; - // is ptNew on the (horz. or vert.) segment from endpt to newendpt? - if(Math.abs(endpt[0] - newendpt[0]) < atol) { - if(Math.abs(endpt[0] - ptNew[0]) < atol && (ptNew[1] - endpt[1]) * (newendpt[1] - ptNew[1]) >= 0) { - newendpt = ptNew; - nexti = possiblei; - } - } else if(Math.abs(endpt[1] - newendpt[1]) < btol) { - if(Math.abs(endpt[1] - ptNew[1]) < btol && (ptNew[0] - endpt[0]) * (newendpt[0] - ptNew[0]) >= 0) { - newendpt = ptNew; - nexti = possiblei; - } - } else { - Lib.log('endpt to newendpt is not vert. or horz.', endpt, newendpt, ptNew); - } - } - - if(nexti >= 0) break; - fullpath += pathto(endpt, newendpt); - endpt = newendpt; - } - - if(nexti === pi.edgepaths.length) { - Lib.log('unclosed perimeter path'); - break; - } - - i = nexti; - - // if we closed back on a loop we already included, - // close it and start a new loop - newloop = (startsleft.indexOf(i) === -1); - if(newloop) { - i = startsleft[0]; - fullpath += pathto(endpt, newendpt) + 'Z'; - endpt = null; - } - } - - // finally add the interior paths - for(i = 0; i < pi.paths.length; i++) { - fullpath += Drawing.smoothclosed(pi.paths[i].map(ab2p), pi.smoothing); - } - - return fullpath; -}; - -},{"../../components/drawing":602,"../../lib":685,"../carpet/axis_aligned_line":841}],900:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = function mapPathinfo(pathinfo, map) { - var i, j, k, pi, pedgepaths, ppaths, pedgepath, ppath, path; - - for(i = 0; i < pathinfo.length; i++) { - pi = pathinfo[i]; - pedgepaths = pi.pedgepaths = []; - ppaths = pi.ppaths = []; - for(j = 0; j < pi.edgepaths.length; j++) { - path = pi.edgepaths[j]; - pedgepath = []; - for(k = 0; k < path.length; k++) { - pedgepath[k] = map(path[k]); - } - pedgepaths.push(pedgepath); - } - for(j = 0; j < pi.paths.length; j++) { - path = pi.paths[j]; - ppath = []; - for(k = 0; k < path.length; k++) { - ppath[k] = map(path[k]); - } - ppaths.push(ppath); - } - } -}; - -},{}],901:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var d3 = require('d3'); -var map1dArray = require('../carpet/map_1d_array'); -var makepath = require('../carpet/makepath'); -var Drawing = require('../../components/drawing'); - -var makeCrossings = require('../contour/make_crossings'); -var findAllPaths = require('../contour/find_all_paths'); -var convertToConstraints = require('./convert_to_constraints'); -var joinAllPaths = require('./join_all_paths'); -var emptyPathinfo = require('./empty_pathinfo'); -var mapPathinfo = require('./map_pathinfo'); -var lookupCarpet = require('../carpet/lookup_carpetid'); -var closeBoundaries = require('./close_boundaries'); - -function makeg(el, type, klass) { - var join = el.selectAll(type + '.' + klass).data([0]); - join.enter().append(type).classed(klass, true); - return join; -} - -module.exports = function plot(gd, plotinfo, cdcontours) { - for(var i = 0; i < cdcontours.length; i++) { - plotOne(gd, plotinfo, cdcontours[i]); - } -}; - -function plotOne(gd, plotinfo, cd) { - var trace = cd[0].trace; - - var carpet = trace.carpetTrace = lookupCarpet(gd, trace); - var carpetcd = gd.calcdata[carpet.index][0]; - - if(!carpet.visible || carpet.visible === 'legendonly') return; - - var a = cd[0].a; - var b = cd[0].b; - var contours = trace.contours; - var uid = trace.uid; - var xa = plotinfo.xaxis; - var ya = plotinfo.yaxis; - var fullLayout = gd._fullLayout; - var id = 'contour' + uid; - var pathinfo = emptyPathinfo(contours, plotinfo, cd[0]); - var isConstraint = trace.contours.type === 'constraint'; - - // Map [a, b] (data) --> [i, j] (pixels) - function ab2p(ab) { - var pt = carpet.ab2xy(ab[0], ab[1], true); - return [xa.c2p(pt[0]), ya.c2p(pt[1])]; - } - - if(trace.visible !== true) { - fullLayout._infolayer.selectAll('.cb' + uid).remove(); - return; - } - - // Define the perimeter in a/b coordinates: - var perimeter = [ - [a[0], b[b.length - 1]], - [a[a.length - 1], b[b.length - 1]], - [a[a.length - 1], b[0]], - [a[0], b[0]] - ]; - - // Extract the contour levels: - makeCrossings(pathinfo); - var atol = (a[a.length - 1] - a[0]) * 1e-8; - var btol = (b[b.length - 1] - b[0]) * 1e-8; - findAllPaths(pathinfo, atol, btol); - - // Constraints might need to be draw inverted, which is not something contours - // handle by default since they're assumed fully opaque so that they can be - // drawn overlapping. This function flips the paths as necessary so that they're - // drawn correctly. - // - // TODO: Perhaps this should be generalized and *all* paths should be drawn as - // closed regions so that translucent contour levels would be valid. - // See: https://github.com/plotly/plotly.js/issues/1356 - if(trace.contours.type === 'constraint') { - convertToConstraints(pathinfo, trace.contours.operation); - closeBoundaries(pathinfo, trace.contours.operation, perimeter, trace); - } - - // Map the paths in a/b coordinates to pixel coordinates: - mapPathinfo(pathinfo, ab2p); - - // draw everything - var plotGroup = makeContourGroup(plotinfo, cd, id); - - // Compute the boundary path - var seg, xp, yp, i; - var segs = []; - for(i = carpetcd.clipsegments.length - 1; i >= 0; i--) { - seg = carpetcd.clipsegments[i]; - xp = map1dArray([], seg.x, xa.c2p); - yp = map1dArray([], seg.y, ya.c2p); - xp.reverse(); - yp.reverse(); - segs.push(makepath(xp, yp, seg.bicubic)); - } - - var boundaryPath = 'M' + segs.join('L') + 'Z'; - - // Draw the baseline background fill that fills in the space behind any other - // contour levels: - makeBackground(plotGroup, carpetcd.clipsegments, xa, ya, isConstraint, contours.coloring); - - // Draw the specific contour fills. As a simplification, they're assumed to be - // fully opaque so that it's easy to draw them simply overlapping. The alternative - // would be to flip adjacent paths and draw closed paths for each level instead. - makeFills(trace, plotGroup, xa, ya, pathinfo, perimeter, ab2p, carpet, carpetcd, contours.coloring, boundaryPath); - - // Draw contour lines: - makeLines(plotGroup, pathinfo, contours); - - // Clip the boundary of the plot: - clipBoundary(plotGroup, carpet); -} - -function clipBoundary(plotGroup, carpet) { - plotGroup.attr('clip-path', 'url(#' + carpet.clipPathId + ')'); -} - -function makeContourGroup(plotinfo, cd, id) { - var plotgroup = plotinfo.plot.select('.maplayer') - .selectAll('g.contour.' + id) - .classed('trace', true) - .data(cd); - - plotgroup.enter().append('g') - .classed('contour', true) - .classed(id, true); - - plotgroup.exit().remove(); - - return plotgroup; -} - -function makeLines(plotgroup, pathinfo, contours) { - var smoothing = pathinfo[0].smoothing; - - var linegroup = plotgroup.selectAll('g.contourlevel') - .data(contours.showlines === false ? [] : pathinfo); - linegroup.enter().append('g') - .classed('contourlevel', true); - linegroup.exit().remove(); - - var opencontourlines = linegroup.selectAll('path.openline') - .data(function(d) { return d.pedgepaths; }); - opencontourlines.enter().append('path') - .classed('openline', true); - opencontourlines.exit().remove(); - opencontourlines - .attr('d', function(d) { - return Drawing.smoothopen(d, smoothing); - }) - .style('vector-effect', 'non-scaling-stroke'); - - var closedcontourlines = linegroup.selectAll('path.closedline') - .data(function(d) { return d.ppaths; }); - closedcontourlines.enter().append('path') - .classed('closedline', true); - closedcontourlines.exit().remove(); - closedcontourlines - .attr('d', function(d) { - return Drawing.smoothclosed(d, smoothing); - }) - .style('vector-effect', 'non-scaling-stroke') - .style('stroke-miterlimit', 1); -} - -function makeBackground(plotgroup, clipsegments, xaxis, yaxis, isConstraint, coloring) { - var seg, xp, yp, i; - var bggroup = makeg(plotgroup, 'g', 'contourbg'); - - var bgfill = bggroup.selectAll('path') - .data((coloring === 'fill' && !isConstraint) ? [0] : []); - bgfill.enter().append('path'); - bgfill.exit().remove(); - - var segs = []; - for(i = 0; i < clipsegments.length; i++) { - seg = clipsegments[i]; - xp = map1dArray([], seg.x, xaxis.c2p); - yp = map1dArray([], seg.y, yaxis.c2p); - segs.push(makepath(xp, yp, seg.bicubic)); - } - - bgfill - .attr('d', 'M' + segs.join('L') + 'Z') - .style('stroke', 'none'); -} - -function makeFills(trace, plotgroup, xa, ya, pathinfo, perimeter, ab2p, carpet, carpetcd, coloring, boundaryPath) { - var fillgroup = plotgroup.selectAll('g.contourfill') - .data([0]); - fillgroup.enter().append('g') - .classed('contourfill', true); - - var fillitems = fillgroup.selectAll('path') - .data(coloring === 'fill' ? pathinfo : []); - fillitems.enter().append('path'); - fillitems.exit().remove(); - fillitems.each(function(pi) { - // join all paths for this level together into a single path - // first follow clockwise around the perimeter to close any open paths - // if the whole perimeter is above this level, start with a path - // enclosing the whole thing. With all that, the parity should mean - // that we always fill everything above the contour, nothing below - var fullpath = joinAllPaths(trace, pi, perimeter, ab2p, carpet, carpetcd, xa, ya); - - if(pi.prefixBoundary) { - fullpath = boundaryPath + fullpath; - } - - if(!fullpath) { - d3.select(this).remove(); - } else { - d3.select(this) - .attr('d', fullpath) - .style('stroke', 'none'); - } - }); -} - -},{"../../components/drawing":602,"../carpet/lookup_carpetid":858,"../carpet/makepath":859,"../carpet/map_1d_array":860,"../contour/find_all_paths":881,"../contour/make_crossings":885,"./close_boundaries":891,"./convert_to_constraints":895,"./empty_pathinfo":897,"./join_all_paths":899,"./map_pathinfo":900,"d3":107}],902:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var d3 = require('d3'); - -var Drawing = require('../../components/drawing'); -var heatmapStyle = require('../heatmap/style'); - -var makeColorMap = require('../contour/make_color_map'); - -module.exports = function style(gd) { - var contours = d3.select(gd).selectAll('g.contour'); - - contours.style('opacity', function(d) { - return d.trace.opacity; - }); - - contours.each(function(d) { - var c = d3.select(this); - var trace = d.trace; - var contours = trace.contours; - var line = trace.line; - var cs = contours.size || 1; - var start = contours.start; - - if(!isFinite(cs)) { - cs = 0; - } - - c.selectAll('g.contourlevel').each(function() { - d3.select(this).selectAll('path') - .call(Drawing.lineGroupStyle, - line.width, - line.color, - line.dash); - }); - - if(trace.contours.type === 'levels' && trace.contours.coloring !== 'none') { - var colorMap = makeColorMap(trace); - - c.selectAll('g.contourbg path') - .style('fill', colorMap(start - cs / 2)); - - c.selectAll('g.contourfill path') - .style('fill', function(d, i) { - return colorMap(start + (i + 0.5) * cs); - }); - } else { - c.selectAll('g.contourfill path') - .style('fill', trace.fillcolor); - } - }); - - heatmapStyle(gd); -}; - -},{"../../components/drawing":602,"../contour/make_color_map":884,"../heatmap/style":917,"d3":107}],903:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584}],851:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159901,7 +153194,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../scatter/attributes":976}],904:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../scatter/attributes":924}],852:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159920,7 +153213,7 @@ var Axes = require('../../plots/cartesian/axes'); var histogram2dCalc = require('../histogram2d/calc'); var colorscaleCalc = require('../../components/colorscale/calc'); var hasColumns = require('./has_columns'); -var convertColumnData = require('./convert_column_xyz'); +var convertColumnXYZ = require('./convert_column_xyz'); var maxRowLength = require('./max_row_length'); var clean2dArray = require('./clean_2d_array'); var interp2d = require('./interp2d'); @@ -159961,7 +153254,7 @@ module.exports = function calc(gd, trace) { z = binned.z; } else { - if(hasColumns(trace)) convertColumnData(trace, xa, ya, 'x', 'y', ['z']); + if(hasColumns(trace)) convertColumnXYZ(trace, xa, ya); x = trace.x ? xa.makeCalcdata(trace, 'x') : []; y = trace.y ? ya.makeCalcdata(trace, 'y') : []; @@ -160043,7 +153336,7 @@ module.exports = function calc(gd, trace) { return [cd0]; }; -},{"../../components/colorscale/calc":584,"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"../histogram2d/calc":932,"./clean_2d_array":905,"./convert_column_xyz":907,"./find_empties":909,"./has_columns":910,"./interp2d":913,"./make_bound_array":914,"./max_row_length":915}],905:[function(require,module,exports){ +},{"../../components/colorscale/calc":581,"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793,"../histogram2d/calc":880,"./clean_2d_array":853,"./convert_column_xyz":855,"./find_empties":857,"./has_columns":858,"./interp2d":861,"./make_bound_array":862,"./max_row_length":863}],853:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160088,7 +153381,7 @@ module.exports = function clean2dArray(zOld, transpose) { return zNew; }; -},{"fast-isnumeric":116}],906:[function(require,module,exports){ +},{"fast-isnumeric":113}],854:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160139,7 +153432,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],907:[function(require,module,exports){ +},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],855:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160154,73 +153447,54 @@ module.exports = function colorbar(gd, cd) { var Lib = require('../../lib'); var BADNUM = require('../../constants/numerical').BADNUM; -module.exports = function convertColumnData(trace, ax1, ax2, var1Name, var2Name, arrayVarNames) { - var1Name = var1Name || 'x'; - var2Name = var2Name || 'y'; - arrayVarNames = arrayVarNames || ['z']; - var col1 = trace[var1Name].slice(), - col2 = trace[var2Name].slice(), +module.exports = function convertColumnXYZ(trace, xa, ya) { + var xCol = trace.x.slice(), + yCol = trace.y.slice(), + zCol = trace.z, textCol = trace.text, - colLen = Math.min(col1.length, col2.length), + colLen = Math.min(xCol.length, yCol.length, zCol.length), hasColumnText = (textCol !== undefined && !Array.isArray(textCol[0])), - col1Calendar = trace[var1Name + 'calendar'], - col2Calendar = trace[var2Name + 'calendar']; - - var i, j, arrayVar, newArray, arrayVarName; + xcalendar = trace.xcalendar, + ycalendar = trace.ycalendar; - for(i = 0; i < arrayVarNames.length; i++) { - arrayVar = trace[arrayVarNames[i]]; - if(arrayVar) colLen = Math.min(colLen, arrayVar.length); - } + var i; - if(colLen < col1.length) col1 = col1.slice(0, colLen); - if(colLen < col2.length) col2 = col2.slice(0, colLen); + if(colLen < xCol.length) xCol = xCol.slice(0, colLen); + if(colLen < yCol.length) yCol = yCol.slice(0, colLen); for(i = 0; i < colLen; i++) { - col1[i] = ax1.d2c(col1[i], 0, col1Calendar); - col2[i] = ax2.d2c(col2[i], 0, col2Calendar); + xCol[i] = xa.d2c(xCol[i], 0, xcalendar); + yCol[i] = ya.d2c(yCol[i], 0, ycalendar); } - var col1dv = Lib.distinctVals(col1), - col1vals = col1dv.vals, - col2dv = Lib.distinctVals(col2), - col2vals = col2dv.vals, - newArrays = []; + var xColdv = Lib.distinctVals(xCol), + x = xColdv.vals, + yColdv = Lib.distinctVals(yCol), + y = yColdv.vals, + z = Lib.init2dArray(y.length, x.length); - for(i = 0; i < arrayVarNames.length; i++) { - newArrays[i] = Lib.init2dArray(col2vals.length, col1vals.length); - } - - var i1, i2, text; + var text; - if(hasColumnText) text = Lib.init2dArray(col2vals.length, col1vals.length); + if(hasColumnText) text = Lib.init2dArray(y.length, x.length); for(i = 0; i < colLen; i++) { - if(col1[i] !== BADNUM && col2[i] !== BADNUM) { - i1 = Lib.findBin(col1[i] + col1dv.minDiff / 2, col1vals); - i2 = Lib.findBin(col2[i] + col2dv.minDiff / 2, col2vals); + if(xCol[i] !== BADNUM && yCol[i] !== BADNUM) { + var ix = Lib.findBin(xCol[i] + xColdv.minDiff / 2, x); + var iy = Lib.findBin(yCol[i] + yColdv.minDiff / 2, y); - for(j = 0; j < arrayVarNames.length; j++) { - arrayVarName = arrayVarNames[j]; - arrayVar = trace[arrayVarName]; - newArray = newArrays[j]; - newArray[i2][i1] = arrayVar[i]; - } - - if(hasColumnText) text[i2][i1] = textCol[i]; + z[iy][ix] = zCol[i]; + if(hasColumnText) text[iy][ix] = textCol[i]; } } - trace[var1Name] = col1vals; - trace[var2Name] = col2vals; - for(j = 0; j < arrayVarNames.length; j++) { - trace[arrayVarNames[j]] = newArrays[j]; - } + trace.x = x; + trace.y = y; + trace.z = z; if(hasColumnText) trace.text = text; }; -},{"../../constants/numerical":666,"../../lib":685}],908:[function(require,module,exports){ +},{"../../constants/numerical":662,"../../lib":680}],856:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160265,7 +153539,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'}); }; -},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":903,"./has_columns":910,"./xyz_defaults":918}],909:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":851,"./has_columns":858,"./xyz_defaults":866}],857:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160371,7 +153645,7 @@ module.exports = function findEmpties(z) { return empties.sort(function(a, b) { return b[2] - a[2]; }); }; -},{"./max_row_length":915}],910:[function(require,module,exports){ +},{"./max_row_length":863}],858:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160387,7 +153661,7 @@ module.exports = function(trace) { return !Array.isArray(trace.z[0]); }; -},{}],911:[function(require,module,exports){ +},{}],859:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160505,7 +153779,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, contour) })]; }; -},{"../../lib":685,"../../plots/cartesian/constants":729,"../../plots/cartesian/graph_interact":733}],912:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/constants":724,"../../plots/cartesian/graph_interact":726}],860:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160560,7 +153834,7 @@ Heatmap.meta = { module.exports = Heatmap; -},{"../../plots/cartesian":734,"./attributes":903,"./calc":904,"./colorbar":906,"./defaults":908,"./hover":911,"./plot":916,"./style":917}],913:[function(require,module,exports){ +},{"../../plots/cartesian":727,"./attributes":851,"./calc":852,"./colorbar":854,"./defaults":856,"./hover":859,"./plot":864,"./style":865}],861:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160692,7 +153966,7 @@ function iterateInterp2d(z, emptyPoints, overshoot) { return maxFractionalChange; } -},{"../../lib":685}],914:[function(require,module,exports){ +},{"../../lib":680}],862:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160774,7 +154048,7 @@ module.exports = function makeBoundArray(trace, arrayIn, v0In, dvIn, numbricks, return arrayOut; }; -},{"../../registry":802}],915:[function(require,module,exports){ +},{"../../registry":793}],863:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160796,7 +154070,7 @@ module.exports = function maxRowLength(z) { return len; }; -},{}],916:[function(require,module,exports){ +},{}],864:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161265,7 +154539,7 @@ function plotOne(gd, plotinfo, cd) { image3.exit().remove(); } -},{"../../components/colorscale":592,"../../constants/xmlns_namespaces":668,"../../lib":685,"../../registry":802,"./max_row_length":915,"tinycolor2":514}],917:[function(require,module,exports){ +},{"../../components/colorscale":589,"../../constants/xmlns_namespaces":664,"../../lib":680,"../../registry":793,"./max_row_length":863,"tinycolor2":511}],865:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161286,7 +154560,7 @@ module.exports = function style(gd) { }); }; -},{"d3":107}],918:[function(require,module,exports){ +},{"d3":104}],866:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161304,24 +154578,22 @@ var Registry = require('../../registry'); var hasColumns = require('./has_columns'); -module.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout, xName, yName) { +module.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout) { var z = coerce('z'); - xName = xName || 'x'; - yName = yName || 'y'; var x, y; if(z === undefined || !z.length) return 0; if(hasColumns(traceIn)) { - x = coerce(xName); - y = coerce(yName); + x = coerce('x'); + y = coerce('y'); - // column z must be accompanied by xName and yName arrays + // column z must be accompanied by 'x' and 'y' arrays if(!x || !y) return 0; } else { - x = coordDefaults(xName, coerce); - y = coordDefaults(yName, coerce); + x = coordDefaults('x', coerce); + y = coordDefaults('y', coerce); // TODO put z validation elsewhere if(!isValidZ(z)) return 0; @@ -161330,7 +154602,7 @@ module.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout, x } var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults'); - handleCalendarDefaults(traceIn, traceOut, [xName, yName], layout); + handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout); return traceOut.z.length; }; @@ -161381,7 +154653,7 @@ function isValidZ(z) { return (allRowsAreArrays && oneRowIsFilled && hasOneNumber); } -},{"../../registry":802,"./has_columns":910,"fast-isnumeric":116}],919:[function(require,module,exports){ +},{"../../registry":793,"./has_columns":858,"fast-isnumeric":113}],867:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161423,7 +154695,7 @@ extendFlat( module.exports = attrs; -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../heatmap/attributes":903}],920:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../heatmap/attributes":851}],868:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161562,7 +154834,7 @@ function createHeatmap(scene, fullTrace, calcTrace) { module.exports = createHeatmap; -},{"../../lib/str2rgbarray":703,"../../plots/cartesian/axes":724,"gl-heatmap2d":150}],921:[function(require,module,exports){ +},{"../../lib/str2rgbarray":698,"../../plots/cartesian/axes":719,"gl-heatmap2d":147}],869:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161595,7 +154867,7 @@ HeatmapGl.meta = { module.exports = HeatmapGl; -},{"../../plots/gl2d":764,"../heatmap/calc":904,"../heatmap/colorbar":906,"../heatmap/defaults":908,"./attributes":919,"./convert":920}],922:[function(require,module,exports){ +},{"../../plots/gl2d":755,"../heatmap/calc":852,"../heatmap/colorbar":854,"../heatmap/defaults":856,"./attributes":867,"./convert":868}],870:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161807,7 +155079,7 @@ function makeBinsAttr(axLetter) { }; } -},{"../bar/attributes":812}],923:[function(require,module,exports){ +},{"../bar/attributes":803}],871:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161833,7 +155105,7 @@ module.exports = function doAvg(size, counts) { return total; }; -},{}],924:[function(require,module,exports){ +},{}],872:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161866,7 +155138,7 @@ module.exports = function handleBinDefaults(traceIn, traceOut, coerce, binDirect return traceOut; }; -},{}],925:[function(require,module,exports){ +},{}],873:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161942,7 +155214,7 @@ module.exports = { } }; -},{"fast-isnumeric":116}],926:[function(require,module,exports){ +},{"fast-isnumeric":113}],874:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162173,7 +155445,7 @@ function cdf(size, direction, currentbin) { } } -},{"../../lib":685,"../../plots/cartesian/axes":724,"../bar/arrays_to_calcdata":811,"./average":923,"./bin_functions":925,"./clean_bins":927,"./norm_functions":930,"fast-isnumeric":116}],927:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../bar/arrays_to_calcdata":802,"./average":871,"./bin_functions":873,"./clean_bins":875,"./norm_functions":878,"fast-isnumeric":113}],875:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162250,7 +155522,7 @@ module.exports = function cleanBins(trace, ax, binDirection) { if(!trace[autoBinAttr]) delete trace['nbins' + binDirection]; }; -},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],928:[function(require,module,exports){ +},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],876:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162312,7 +155584,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, Color.defaultLine, {axis: 'x', inherit: 'y'}); }; -},{"../../components/color":578,"../../components/errorbars/defaults":607,"../../lib":685,"../../registry":802,"../bar/style_defaults":823,"./attributes":922,"./bin_defaults":924}],929:[function(require,module,exports){ +},{"../../components/color":575,"../../components/errorbars/defaults":603,"../../lib":680,"../../registry":793,"../bar/style_defaults":814,"./attributes":870,"./bin_defaults":872}],877:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162367,7 +155639,7 @@ Histogram.meta = { module.exports = Histogram; -},{"../../plots/cartesian":734,"../bar/hover":815,"../bar/layout_attributes":817,"../bar/layout_defaults":818,"../bar/plot":819,"../bar/set_positions":820,"../bar/style":822,"../scatter/colorbar":979,"./attributes":922,"./calc":926,"./defaults":928}],930:[function(require,module,exports){ +},{"../../plots/cartesian":727,"../bar/hover":806,"../bar/layout_attributes":808,"../bar/layout_defaults":809,"../bar/plot":810,"../bar/set_positions":811,"../bar/style":813,"../scatter/colorbar":927,"./attributes":870,"./calc":874,"./defaults":876}],878:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162402,7 +155674,7 @@ module.exports = { } }; -},{}],931:[function(require,module,exports){ +},{}],879:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162454,7 +155726,7 @@ module.exports = extendFlat({}, { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../heatmap/attributes":903,"../histogram/attributes":922}],932:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../heatmap/attributes":851,"../histogram/attributes":870}],880:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162657,7 +155929,7 @@ module.exports = function calc(gd, trace) { }; }; -},{"../../lib":685,"../../plots/cartesian/axes":724,"../histogram/average":923,"../histogram/bin_functions":925,"../histogram/clean_bins":927,"../histogram/norm_functions":930}],933:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../histogram/average":871,"../histogram/bin_functions":873,"../histogram/clean_bins":875,"../histogram/norm_functions":878}],881:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162695,7 +155967,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout ); }; -},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":931,"./sample_defaults":935}],934:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":879,"./sample_defaults":883}],882:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162735,7 +156007,7 @@ Histogram2D.meta = { module.exports = Histogram2D; -},{"../../plots/cartesian":734,"../heatmap/calc":904,"../heatmap/colorbar":906,"../heatmap/hover":911,"../heatmap/plot":916,"../heatmap/style":917,"./attributes":931,"./defaults":933}],935:[function(require,module,exports){ +},{"../../plots/cartesian":727,"../heatmap/calc":852,"../heatmap/colorbar":854,"../heatmap/hover":859,"../heatmap/plot":864,"../heatmap/style":865,"./attributes":879,"./defaults":881}],883:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162775,7 +156047,7 @@ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout handleBinDefaults(traceIn, traceOut, coerce, binDirections); }; -},{"../../registry":802,"../histogram/bin_defaults":924}],936:[function(require,module,exports){ +},{"../../registry":793,"../histogram/bin_defaults":872}],884:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162817,7 +156089,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../contour/attributes":874,"../histogram2d/attributes":931}],937:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../contour/attributes":836,"../histogram2d/attributes":879}],885:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162847,7 +156119,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout handleStyleDefaults(traceIn, traceOut, coerce, layout); }; -},{"../../lib":685,"../contour/contours_defaults":878,"../contour/style_defaults":888,"../histogram2d/sample_defaults":935,"./attributes":936}],938:[function(require,module,exports){ +},{"../../lib":680,"../contour/contours_defaults":840,"../contour/style_defaults":850,"../histogram2d/sample_defaults":883,"./attributes":884}],886:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162887,7 +156159,7 @@ Histogram2dContour.meta = { module.exports = Histogram2dContour; -},{"../../plots/cartesian":734,"../contour/calc":875,"../contour/colorbar":876,"../contour/hover":882,"../contour/plot":886,"../contour/style":887,"./attributes":936,"./defaults":937}],939:[function(require,module,exports){ +},{"../../plots/cartesian":727,"../contour/calc":837,"../contour/colorbar":838,"../contour/hover":844,"../contour/plot":848,"../contour/style":849,"./attributes":884,"./defaults":885}],887:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163085,7 +156357,7 @@ module.exports = { }, surfaceAtts.lighting) }; -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../surface/attributes":1039}],940:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../surface/attributes":980}],888:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163248,7 +156520,7 @@ function createMesh3DTrace(scene, data) { module.exports = createMesh3DTrace; -},{"../../lib/str2rgbarray":703,"alpha-shape":38,"convex-hull":96,"delaunay-triangulate":108,"gl-mesh3d":189,"tinycolor2":514}],941:[function(require,module,exports){ +},{"../../lib/str2rgbarray":698,"alpha-shape":35,"convex-hull":93,"delaunay-triangulate":105,"gl-mesh3d":186,"tinycolor2":511}],889:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163349,7 +156621,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/colorbar/defaults":580,"../../lib":685,"../../registry":802,"./attributes":939}],942:[function(require,module,exports){ +},{"../../components/colorbar/defaults":577,"../../lib":680,"../../registry":793,"./attributes":887}],890:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163385,7 +156657,7 @@ Mesh3D.meta = { module.exports = Mesh3D; -},{"../../plots/gl3d":767,"../heatmap/colorbar":906,"./attributes":939,"./convert":940,"./defaults":941}],943:[function(require,module,exports){ +},{"../../plots/gl3d":758,"../heatmap/colorbar":854,"./attributes":887,"./convert":888,"./defaults":889}],891:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163399,7 +156671,6 @@ module.exports = Mesh3D; var Lib = require('../../lib'); var scatterAttrs = require('../scatter/attributes'); -var dash = require('../../components/drawing/attributes').dash; var INCREASING_COLOR = '#3D9970'; var DECREASING_COLOR = '#FF4136'; @@ -163427,9 +156698,9 @@ var directionAttrs = { }, line: { - color: lineAttrs.color, - width: lineAttrs.width, - dash: dash, + color: Lib.extendFlat({}, lineAttrs.color), + width: Lib.extendFlat({}, lineAttrs.width), + dash: Lib.extendFlat({}, lineAttrs.dash), } }; @@ -163476,9 +156747,9 @@ module.exports = { '`decreasing.line.width`.' ].join(' ') }), - dash: Lib.extendFlat({}, dash, { + dash: Lib.extendFlat({}, lineAttrs.dash, { description: [ - dash.description, + lineAttrs.dash, 'Note that this style setting can also be set per', 'direction via `increasing.line.dash` and', '`decreasing.line.dash`.' @@ -163521,7 +156792,7 @@ module.exports = { } }; -},{"../../components/drawing/attributes":601,"../../lib":685,"../scatter/attributes":976}],944:[function(require,module,exports){ +},{"../../lib":680,"../scatter/attributes":924}],892:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163570,7 +156841,7 @@ function handleDirection(traceIn, traceOut, coerce, direction) { coerce(direction + '.line.dash', traceOut.line.dash); } -},{"../../lib":685,"./attributes":943,"./direction_defaults":945,"./helpers":946,"./ohlc_defaults":948}],945:[function(require,module,exports){ +},{"../../lib":680,"./attributes":891,"./direction_defaults":893,"./helpers":894,"./ohlc_defaults":896}],893:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163596,7 +156867,7 @@ module.exports = function handleDirectionDefaults(traceIn, traceOut, coerce, dir coerce(direction + '.name', nameDflt); }; -},{}],946:[function(require,module,exports){ +},{}],894:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163719,7 +156990,7 @@ exports.addRangeSlider = function(data, layout) { } }; -},{"../../lib":685}],947:[function(require,module,exports){ +},{"../../lib":680}],895:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163761,7 +157032,7 @@ module.exports = { register(require('../scatter')); register(require('./transform')); -},{"../../plot_api/register":714,"../../plots/cartesian":734,"../scatter":986,"./attributes":943,"./defaults":944,"./transform":949}],948:[function(require,module,exports){ +},{"../../plot_api/register":709,"../../plots/cartesian":727,"../scatter":934,"./attributes":891,"./defaults":892,"./transform":897}],896:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163803,7 +157074,7 @@ module.exports = function handleOHLC(traceIn, traceOut, coerce, layout) { return len; }; -},{"../../registry":802}],949:[function(require,module,exports){ +},{"../../registry":793}],897:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164062,7 +157333,7 @@ function convertTickWidth(gd, xa, trace) { return minDiff * tickWidth; } -},{"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_ids":727,"./helpers":946}],950:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_ids":722,"./helpers":894}],898:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164222,7 +157493,7 @@ module.exports = { ) }; -},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/colorscale/scales":596,"../../lib/extend":677,"../../plots/cartesian/layout_attributes":735}],951:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/colorscale/scales":593,"../../lib/extend":672,"../../plots/cartesian/layout_attributes":728}],899:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164298,7 +157569,7 @@ exports.toSVG = function(gd) { }, 60); }; -},{"../../constants/xmlns_namespaces":668,"../../plots/plots":787,"./constants":954,"./plot":959,"d3":107}],952:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":664,"../../plots/plots":778,"./constants":902,"./plot":907,"d3":104}],900:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164329,7 +157600,7 @@ module.exports = function calc(gd, trace) { }]; }; -},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"../../lib":685}],953:[function(require,module,exports){ +},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"../../lib":680}],901:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164383,7 +157654,7 @@ module.exports = function colorbar(gd, cd) { .options(line.colorbar)(); }; -},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],954:[function(require,module,exports){ +},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],902:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164420,7 +157691,7 @@ module.exports = { } }; -},{}],955:[function(require,module,exports){ +},{}],903:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164522,7 +157793,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591,"../../lib":685,"./attributes":950,"./constants":954}],956:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588,"../../lib":680,"./attributes":898,"./constants":902}],904:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164555,7 +157826,7 @@ Parcoords.meta = { module.exports = Parcoords; -},{"./attributes":950,"./base_plot":951,"./calc":952,"./colorbar":953,"./defaults":955,"./plot":959}],957:[function(require,module,exports){ +},{"./attributes":898,"./base_plot":899,"./calc":900,"./colorbar":901,"./defaults":903,"./plot":907}],905:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164980,7 +158251,7 @@ module.exports = function(canvasGL, lines, canvasWidth, canvasHeight, initialDim }; }; -},{"./constants":954,"regl":480}],958:[function(require,module,exports){ +},{"./constants":902,"regl":477}],906:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165754,7 +159025,7 @@ module.exports = function(root, svg, styledData, layout, callbacks) { return tweakables; }; -},{"../../lib":685,"./constants":954,"./lines":957,"d3":107}],959:[function(require,module,exports){ +},{"../../lib":680,"./constants":902,"./lines":905,"d3":104}],907:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165874,7 +159145,7 @@ module.exports = function plot(gd, cdparcoords) { }); }; -},{"./parcoords":958}],960:[function(require,module,exports){ +},{"./parcoords":906}],908:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165956,27 +159227,7 @@ module.exports = { text: { valType: 'data_array', - description: [ - 'Sets text elements associated with each sector.', - 'If trace `textinfo` contains a *text* flag, these elements will seen', - 'on the chart.', - 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,', - 'these elements will be seen in the hover labels.' - ].join(' ') - }, - hovertext: { - valType: 'string', - role: 'info', - dflt: '', - arrayOk: true, - description: [ - 'Sets hover text elements associated with each sector.', - 'If a single string, the same string appears for', - 'all data points.', - 'If an array of string, the items are mapped in order of', - 'this trace\'s sectors.', - 'To be seen, trace `hoverinfo` must contain a *text* flag.' - ].join(' ') + description: 'Sets text elements associated with each sector.' }, // 'see eg:' @@ -166124,7 +159375,7 @@ module.exports = { } }; -},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/attributes":722,"../../plots/font_attributes":748}],961:[function(require,module,exports){ +},{"../../components/color/attributes":574,"../../lib/extend":672,"../../plots/attributes":717,"../../plots/font_attributes":739}],909:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166171,7 +159422,7 @@ function getCdModule(calcdata, _module) { return cdModule; } -},{"../../registry":802}],962:[function(require,module,exports){ +},{"../../registry":793}],910:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166323,7 +159574,7 @@ function nextDefaultColor(index) { return pieDefaultColors[index % pieDefaultColors.length]; } -},{"../../components/color":578,"./helpers":964,"fast-isnumeric":116,"tinycolor2":514}],963:[function(require,module,exports){ +},{"../../components/color":575,"./helpers":912,"fast-isnumeric":113,"tinycolor2":511}],911:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166371,7 +159622,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout var textData = coerce('text'); var textInfo = coerce('textinfo', Array.isArray(textData) ? 'text+percent' : 'percent'); - coerce('hovertext'); coerce('hoverinfo', (layout._dataLength === 1) ? 'label+text+value+percent' : undefined); @@ -166408,7 +159658,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('pull'); }; -},{"../../lib":685,"./attributes":960}],964:[function(require,module,exports){ +},{"../../lib":680,"./attributes":908}],912:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166437,7 +159687,7 @@ exports.formatPieValue = function formatPieValue(v, separators) { return Lib.numSeparate(vRounded, separators); }; -},{"../../lib":685}],965:[function(require,module,exports){ +},{"../../lib":680}],913:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166473,7 +159723,7 @@ Pie.meta = { module.exports = Pie; -},{"./attributes":960,"./base_plot":961,"./calc":962,"./defaults":963,"./layout_attributes":966,"./layout_defaults":967,"./plot":968,"./style":969,"./style_one":970}],966:[function(require,module,exports){ +},{"./attributes":908,"./base_plot":909,"./calc":910,"./defaults":911,"./layout_attributes":914,"./layout_defaults":915,"./plot":916,"./style":917,"./style_one":918}],914:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166493,7 +159743,7 @@ module.exports = { hiddenlabels: {valType: 'data_array'} }; -},{}],967:[function(require,module,exports){ +},{}],915:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166515,7 +159765,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { coerce('hiddenlabels'); }; -},{"../../lib":685,"./layout_attributes":966}],968:[function(require,module,exports){ +},{"../../lib":680,"./layout_attributes":914}],916:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166604,8 +159854,6 @@ module.exports = function plot(gd, cdpie) { hasHoverData = false; function handleMouseOver(evt) { - evt.originalEvent = d3.event; - // in case fullLayout or fullData has changed without a replot var fullLayout2 = gd._fullLayout, trace2 = gd._fullData[trace.index], @@ -166617,7 +159865,6 @@ module.exports = function plot(gd, cdpie) { // or if hover is turned off if(gd._dragging || fullLayout2.hovermode === false || hoverinfo === 'none' || hoverinfo === 'skip' || !hoverinfo) { - Fx.hover(gd, evt, 'pie'); return; } @@ -166628,16 +159875,8 @@ module.exports = function plot(gd, cdpie) { thisText = []; if(hoverinfo.indexOf('label') !== -1) thisText.push(pt.label); - if(hoverinfo.indexOf('text') !== -1) { - if(trace2.hovertext) { - thisText.push( - Array.isArray(trace2.hovertext) ? - trace2.hovertext[pt.i] : - trace2.hovertext - ); - } else if(trace2.text && trace2.text[pt.i]) { - thisText.push(trace2.text[pt.i]); - } + if(trace2.text && trace2.text[pt.i] && hoverinfo.indexOf('text') !== -1) { + thisText.push(trace2.text[pt.i]); } if(hoverinfo.indexOf('value') !== -1) thisText.push(helpers.formatPieValue(pt.v, separators)); if(hoverinfo.indexOf('percent') !== -1) thisText.push(helpers.formatPiePercent(pt.v / cd0.vTotal, separators)); @@ -166661,9 +159900,7 @@ module.exports = function plot(gd, cdpie) { } function handleMouseOut(evt) { - evt.originalEvent = d3.event; gd.emit('plotly_unhover', { - event: d3.event, points: [evt] }); @@ -166675,8 +159912,8 @@ module.exports = function plot(gd, cdpie) { function handleClick() { gd._hoverdata = [pt]; - gd._hoverdata.trace = cd0.trace; - Fx.click(gd, d3.event); + gd._hoverdata.trace = cd.trace; + Fx.click(gd, { target: true }); } slicePath.enter().append('path') @@ -167223,7 +160460,7 @@ function maxExtent(tilt, tiltAxisFraction, depth) { 2 * Math.sqrt(1 - sinTilt * sinTilt * tiltAxisFraction * tiltAxisFraction)); } -},{"../../components/color":578,"../../components/drawing":602,"../../lib/svg_text_utils":704,"../../plots/cartesian/graph_interact":733,"./helpers":964,"d3":107}],969:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"../../lib/svg_text_utils":699,"../../plots/cartesian/graph_interact":726,"./helpers":912,"d3":104}],917:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167252,7 +160489,7 @@ module.exports = function style(gd) { }); }; -},{"./style_one":970,"d3":107}],970:[function(require,module,exports){ +},{"./style_one":918,"d3":104}],918:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167272,12 +160509,14 @@ module.exports = function styleOne(s, pt, trace) { var lineWidth = trace.marker.line.width || 0; if(Array.isArray(lineWidth)) lineWidth = lineWidth[pt.i] || 0; - s.style({'stroke-width': lineWidth}) - .call(Color.fill, pt.color) + s.style({ + 'stroke-width': lineWidth, + fill: pt.color + }) .call(Color.stroke, lineColor); }; -},{"../../components/color":578}],971:[function(require,module,exports){ +},{"../../components/color":575}],919:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167411,7 +160650,7 @@ module.exports = { } }; -},{"../scattergl/attributes":1020}],972:[function(require,module,exports){ +},{"../scattergl/attributes":960}],920:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167643,7 +160882,7 @@ function createPointcloud(scene, data) { module.exports = createPointcloud; -},{"../../lib/str2rgbarray":703,"../scatter/get_trace_color":984,"gl-pointcloud2d":214}],973:[function(require,module,exports){ +},{"../../lib/str2rgbarray":698,"../scatter/get_trace_color":932,"gl-pointcloud2d":211}],921:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167688,7 +160927,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor) { coerce('marker.border.arearatio'); }; -},{"../../lib":685,"./attributes":971}],974:[function(require,module,exports){ +},{"../../lib":680,"./attributes":919}],922:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167721,7 +160960,7 @@ pointcloud.meta = { module.exports = pointcloud; -},{"../../plots/gl2d":764,"../scatter3d/calc":1000,"./attributes":971,"./convert":972,"./defaults":973}],975:[function(require,module,exports){ +},{"../../plots/gl2d":755,"../scatter3d/calc":948,"./attributes":919,"./convert":920,"./defaults":921}],923:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167740,7 +160979,6 @@ var Lib = require('../../lib'); module.exports = function arraysToCalcdata(cd, trace) { Lib.mergeArray(trace.text, cd, 'tx'); - Lib.mergeArray(trace.hovertext, cd, 'htx'); Lib.mergeArray(trace.customdata, cd, 'data'); Lib.mergeArray(trace.textposition, cd, 'tp'); if(trace.textfont) { @@ -167764,7 +161002,7 @@ module.exports = function arraysToCalcdata(cd, trace) { } }; -},{"../../lib":685}],976:[function(require,module,exports){ +},{"../../lib":680}],924:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167778,7 +161016,6 @@ module.exports = function arraysToCalcdata(cd, trace) { var colorAttributes = require('../../components/colorscale/color_attributes'); var errorBarAttrs = require('../../components/errorbars/attributes'); var colorbarAttrs = require('../../components/colorbar/attributes'); -var dash = require('../../components/drawing/attributes').dash; var Drawing = require('../../components/drawing'); var constants = require('./constants'); @@ -167851,23 +161088,7 @@ module.exports = { 'If a single string, the same string appears over', 'all the data points.', 'If an array of string, the items are mapped in order to the', - 'this trace\'s (x,y) coordinates.', - 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,', - 'these elements will be seen in the hover labels.' - ].join(' ') - }, - hovertext: { - valType: 'string', - role: 'info', - dflt: '', - arrayOk: true, - description: [ - 'Sets hover text elements associated with each (x,y) pair.', - 'If a single string, the same string appears over', - 'all the data points.', - 'If an array of string, the items are mapped in order to the', - 'this trace\'s (x,y) coordinates.', - 'To be seen, trace `hoverinfo` must contain a *text* flag.' + 'this trace\'s (x,y) coordinates.' ].join(' ') }, mode: { @@ -167931,7 +161152,20 @@ module.exports = { '*0* corresponds to no smoothing (equivalent to a *linear* shape).' ].join(' ') }, - dash: dash, + dash: { + valType: 'string', + // string type usually doesn't take values... this one should really be + // a special type or at least a special coercion function, from the GUI + // you only get these values but elsewhere the user can supply a list of + // dash lengths in px, and it will be honored + values: ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'], + dflt: 'solid', + role: 'style', + description: [ + 'Sets the style of the lines. Set to a dash string type', + 'or a dash length in px.' + ].join(' ') + }, simplify: { valType: 'boolean', dflt: true, @@ -168138,7 +161372,7 @@ module.exports = { error_x: errorBarAttrs }; -},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/drawing":602,"../../components/drawing/attributes":601,"../../components/errorbars/attributes":604,"../../lib/extend":677,"./constants":981}],977:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/drawing":598,"../../components/errorbars/attributes":600,"../../lib/extend":672,"./constants":929}],925:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168268,7 +161502,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../plots/cartesian/axes":724,"./arrays_to_calcdata":975,"./colorscale_calc":980,"./subtypes":996,"fast-isnumeric":116}],978:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"./arrays_to_calcdata":923,"./colorscale_calc":928,"./subtypes":944,"fast-isnumeric":113}],926:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168307,7 +161541,7 @@ module.exports = function cleanData(fullData) { } }; -},{}],979:[function(require,module,exports){ +},{}],927:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168363,7 +161597,7 @@ module.exports = function colorbar(gd, cd) { .options(marker.colorbar)(); }; -},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],980:[function(require,module,exports){ +},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],928:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168396,7 +161630,7 @@ module.exports = function calcMarkerColorscale(trace) { } }; -},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"./subtypes":996}],981:[function(require,module,exports){ +},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"./subtypes":944}],929:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168412,7 +161646,7 @@ module.exports = { PTS_LINESONLY: 20 }; -},{}],982:[function(require,module,exports){ +},{}],930:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168453,7 +161687,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('customdata'); coerce('text'); - coerce('hovertext'); coerce('mode', defaultMode); coerce('ids'); @@ -168494,7 +161727,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, defaultColor, {axis: 'x', inherit: 'y'}); }; -},{"../../components/errorbars/defaults":607,"../../lib":685,"./attributes":976,"./constants":981,"./fillcolor_defaults":983,"./line_defaults":987,"./line_shape_defaults":989,"./marker_defaults":992,"./subtypes":996,"./text_defaults":997,"./xy_defaults":998}],983:[function(require,module,exports){ +},{"../../components/errorbars/defaults":603,"../../lib":680,"./attributes":924,"./constants":929,"./fillcolor_defaults":931,"./line_defaults":935,"./line_shape_defaults":937,"./marker_defaults":940,"./subtypes":944,"./text_defaults":945,"./xy_defaults":946}],931:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168532,7 +161765,7 @@ module.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coe )); }; -},{"../../components/color":578}],984:[function(require,module,exports){ +},{"../../components/color":575}],932:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168585,7 +161818,7 @@ module.exports = function getTraceColor(trace, di) { } }; -},{"../../components/color":578,"./subtypes":996}],985:[function(require,module,exports){ +},{"../../components/color":575,"./subtypes":944}],933:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168660,9 +161893,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { yLabelVal: di.y }); - if(di.htx) pointData.text = di.htx; - else if(trace.hovertext) pointData.text = trace.hovertext; - else if(di.tx) pointData.text = di.tx; + if(di.tx) pointData.text = di.tx; else if(trace.text) pointData.text = trace.text; ErrorBars.hoverInfo(di, trace, pointData); @@ -168756,7 +161987,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { } }; -},{"../../components/color":578,"../../components/errorbars":608,"../../lib":685,"../../plots/cartesian/constants":729,"../../plots/cartesian/graph_interact":733,"./get_trace_color":984}],986:[function(require,module,exports){ +},{"../../components/color":575,"../../components/errorbars":604,"../../lib":680,"../../plots/cartesian/constants":724,"../../plots/cartesian/graph_interact":726,"./get_trace_color":932}],934:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168806,7 +162037,7 @@ Scatter.meta = { module.exports = Scatter; -},{"../../plots/cartesian":734,"./arrays_to_calcdata":975,"./attributes":976,"./calc":977,"./clean_data":978,"./colorbar":979,"./defaults":982,"./hover":985,"./plot":993,"./select":994,"./style":995,"./subtypes":996}],987:[function(require,module,exports){ +},{"../../plots/cartesian":727,"./arrays_to_calcdata":923,"./attributes":924,"./calc":925,"./clean_data":926,"./colorbar":927,"./defaults":930,"./hover":933,"./plot":941,"./select":942,"./style":943,"./subtypes":944}],935:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168822,7 +162053,7 @@ var hasColorscale = require('../../components/colorscale/has_colorscale'); var colorscaleDefaults = require('../../components/colorscale/defaults'); -module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, coerce, opts) { +module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, coerce) { var markerColor = (traceIn.marker || {}).color; coerce('line.color', defaultColor); @@ -168836,10 +162067,10 @@ module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, } coerce('line.width'); - if(!(opts || {}).noDash) coerce('line.dash'); + coerce('line.dash'); }; -},{"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591}],988:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588}],936:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169012,7 +162243,7 @@ module.exports = function linePoints(d, opts) { return segments; }; -},{"../../constants/numerical":666}],989:[function(require,module,exports){ +},{"../../constants/numerical":662}],937:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169031,7 +162262,7 @@ module.exports = function handleLineShapeDefaults(traceIn, traceOut, coerce) { if(shape === 'spline') coerce('line.smoothing'); }; -},{}],990:[function(require,module,exports){ +},{}],938:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169072,7 +162303,7 @@ module.exports = function linkTraces(gd, plotinfo, cdscatter) { } }; -},{}],991:[function(require,module,exports){ +},{}],939:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169114,7 +162345,7 @@ module.exports = function makeBubbleSizeFn(trace) { }; }; -},{"fast-isnumeric":116}],992:[function(require,module,exports){ +},{"fast-isnumeric":113}],940:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169133,7 +162364,7 @@ var colorscaleDefaults = require('../../components/colorscale/defaults'); var subTypes = require('./subtypes'); -module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout, coerce, opts) { +module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout, coerce) { var isBubble = subTypes.isBubble(traceIn), lineColor = (traceIn.line || {}).color, defaultMLC; @@ -169150,25 +162381,23 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.', cLetter: 'c'}); } - if(!(opts || {}).noLine) { - // if there's a line with a different color than the marker, use - // that line color as the default marker line color - // (except when it's an array) - // mostly this is for transparent markers to behave nicely - if(lineColor && !Array.isArray(lineColor) && (traceOut.marker.color !== lineColor)) { - defaultMLC = lineColor; - } - else if(isBubble) defaultMLC = Color.background; - else defaultMLC = Color.defaultLine; - - coerce('marker.line.color', defaultMLC); - if(hasColorscale(traceIn, 'marker.line')) { - colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.line.', cLetter: 'c'}); - } + // if there's a line with a different color than the marker, use + // that line color as the default marker line color + // (except when it's an array) + // mostly this is for transparent markers to behave nicely + if(lineColor && !Array.isArray(lineColor) && (traceOut.marker.color !== lineColor)) { + defaultMLC = lineColor; + } + else if(isBubble) defaultMLC = Color.background; + else defaultMLC = Color.defaultLine; - coerce('marker.line.width', isBubble ? 1 : 0); + coerce('marker.line.color', defaultMLC); + if(hasColorscale(traceIn, 'marker.line')) { + colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.line.', cLetter: 'c'}); } + coerce('marker.line.width', isBubble ? 1 : 0); + if(isBubble) { coerce('marker.sizeref'); coerce('marker.sizemin'); @@ -169176,7 +162405,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/color":578,"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591,"./subtypes":996}],993:[function(require,module,exports){ +},{"../../components/color":575,"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588,"./subtypes":944}],941:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169230,13 +162459,13 @@ module.exports = function plot(gd, plotinfo, cdscatter, transitionOpts, makeOnCo // Sort the traces, once created, so that the ordering is preserved even when traces // are shown and hidden. This is needed since we're not just wiping everything out // and recreating on every update. - for(i = 0, uids = {}; i < cdscatter.length; i++) { - uids[cdscatter[i][0].trace.uid] = i; + for(i = 0, uids = []; i < cdscatter.length; i++) { + uids[i] = cdscatter[i][0].trace.uid; } scatterlayer.selectAll('g.trace').sort(function(a, b) { - var idx1 = uids[a[0].trace.uid]; - var idx2 = uids[b[0].trace.uid]; + var idx1 = uids.indexOf(a[0].trace.uid); + var idx2 = uids.indexOf(b[0].trace.uid); return idx1 > idx2 ? 1 : -1; }); @@ -169582,11 +162811,11 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition textFilter = hideFilter; if(showMarkers) { - markerFilter = (trace.marker.maxdisplayed || trace._needsCull) ? visFilter : Lib.identity; + markerFilter = trace.marker.maxdisplayed ? visFilter : Lib.identity; } if(showText) { - textFilter = (trace.marker.maxdisplayed || trace._needsCull) ? visFilter : Lib.identity; + textFilter = trace.marker.maxdisplayed ? visFilter : Lib.identity; } // marker points @@ -169649,7 +162878,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition var x = d.xp || xa.c2p(d.x), y = d.yp || ya.c2p(d.y); - d3.select(this).selectAll('tspan.line').each(function() { + d3.select(this).selectAll('tspan').each(function() { transition(d3.select(this)).attr({x: x, y: y}); }); }); @@ -169716,7 +162945,7 @@ function selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll) { }); } -},{"../../components/drawing":602,"../../components/errorbars":608,"../../lib":685,"../../lib/polygon":695,"./line_points":988,"./link_traces":990,"./subtypes":996,"d3":107}],994:[function(require,module,exports){ +},{"../../components/drawing":598,"../../components/errorbars":604,"../../lib":680,"../../lib/polygon":690,"./line_points":936,"./link_traces":938,"./subtypes":944,"d3":104}],942:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169788,7 +163017,7 @@ module.exports = function selectPoints(searchInfo, polygon) { return selection; }; -},{"./subtypes":996}],995:[function(require,module,exports){ +},{"./subtypes":944}],943:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169834,7 +163063,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/drawing":602,"../../components/errorbars":608,"d3":107}],996:[function(require,module,exports){ +},{"../../components/drawing":598,"../../components/errorbars":604,"d3":104}],944:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169870,7 +163099,7 @@ module.exports = { } }; -},{"../../lib":685}],997:[function(require,module,exports){ +},{"../../lib":680}],945:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169891,7 +163120,7 @@ module.exports = function(traceIn, traceOut, layout, coerce) { Lib.coerceFont(coerce, 'textfont', layout.font); }; -},{"../../lib":685}],998:[function(require,module,exports){ +},{"../../lib":680}],946:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169941,7 +163170,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) { return len; }; -},{"../../registry":802}],999:[function(require,module,exports){ +},{"../../registry":793}],947:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169955,7 +163184,6 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) { var scatterAttrs = require('../scatter/attributes'); var colorAttributes = require('../../components/colorscale/color_attributes'); var errorBarAttrs = require('../../components/errorbars/attributes'); -var DASHES = require('../../constants/gl3d_dashes'); var MARKER_SYMBOLS = require('../../constants/gl_markers'); var extendFlat = require('../../lib/extend').extendFlat; @@ -170017,22 +163245,9 @@ module.exports = { 'If a single string, the same string appears over', 'all the data points.', 'If an array of string, the items are mapped in order to the', - 'this trace\'s (x,y,z) coordinates.', - 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,', - 'these elements will be seen in the hover labels.' + 'this trace\'s (x,y,z) coordinates.' ].join(' ') }), - hovertext: extendFlat({}, scatterAttrs.hovertext, { - description: [ - 'Sets text elements associated with each (x,y,z) triplet.', - 'If a single string, the same string appears over', - 'all the data points.', - 'If an array of string, the items are mapped in order to the', - 'this trace\'s (x,y,z) coordinates.', - 'To be seen, trace `hoverinfo` must contain a *text* flag.' - ].join(' ') - }), - mode: extendFlat({}, scatterAttrs.mode, // shouldn't this be on-par with 2D? {dflt: 'lines+markers'}), surfaceaxis: { @@ -170059,13 +163274,7 @@ module.exports = { connectgaps: scatterAttrs.connectgaps, line: extendFlat({}, { width: scatterLineAttrs.width, - dash: { - valType: 'enumerated', - values: Object.keys(DASHES), - dflt: 'solid', - role: 'style', - description: 'Sets the dash style of the lines.' - }, + dash: scatterLineAttrs.dash, showscale: { valType: 'boolean', role: 'info', @@ -170121,7 +163330,7 @@ module.exports = { error_z: errorBarAttrs, }; -},{"../../components/colorscale/color_attributes":585,"../../components/errorbars/attributes":604,"../../constants/gl3d_dashes":663,"../../constants/gl_markers":664,"../../lib/extend":677,"../scatter/attributes":976}],1000:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":582,"../../components/errorbars/attributes":600,"../../constants/gl_markers":660,"../../lib/extend":672,"../scatter/attributes":924}],948:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170150,7 +163359,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980}],1001:[function(require,module,exports){ +},{"../scatter/arrays_to_calcdata":923,"../scatter/colorscale_calc":928}],949:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170221,7 +163430,7 @@ function calculateErrors(data, scaleFactor) { module.exports = calculateErrors; -},{"../../components/errorbars/compute_error":606}],1002:[function(require,module,exports){ +},{"../../components/errorbars/compute_error":602}],950:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170282,12 +163491,8 @@ proto.handlePick = function(selection) { selection.object = this.scatterPlot; this.scatterPlot.highlight(selection.data); } - if(this.textLabels) { - if(this.textLabels[selection.data.index] !== undefined) { - selection.textLabel = this.textLabels[selection.data.index]; - } else { - selection.textLabel = this.textLabels; - } + if(this.textLabels && this.textLabels[selection.data.index] !== undefined) { + selection.textLabel = this.textLabels[selection.data.index]; } else selection.textLabel = ''; @@ -170599,7 +163804,7 @@ proto.update = function(data) { opacity: data.opacity }; - this.textLabels = data.hovertext || data.text; + this.textLabels = options.text; if(this.mode.indexOf('text') !== -1) { if(this.textMarkers) this.textMarkers.update(textOptions); @@ -170692,7 +163897,7 @@ function createLineWithMarkers(scene, data) { module.exports = createLineWithMarkers; -},{"../../constants/gl3d_dashes":663,"../../constants/gl_markers":664,"../../lib":685,"../../lib/gl_format_color":682,"../../lib/str2rgbarray":703,"../scatter/make_bubble_size_func":991,"./calc_errors":1001,"delaunay-triangulate":108,"gl-error3d":146,"gl-line3d":156,"gl-mesh3d":189,"gl-scatter3d":235}],1003:[function(require,module,exports){ +},{"../../constants/gl3d_dashes":659,"../../constants/gl_markers":660,"../../lib":680,"../../lib/gl_format_color":677,"../../lib/str2rgbarray":698,"../scatter/make_bubble_size_func":939,"./calc_errors":949,"delaunay-triangulate":105,"gl-error3d":143,"gl-line3d":153,"gl-mesh3d":186,"gl-scatter3d":232}],951:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170729,7 +163934,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('text'); - coerce('hovertext'); coerce('mode'); if(subTypes.hasLines(traceOut)) { @@ -170782,7 +163986,7 @@ function handleXYZDefaults(traceIn, traceOut, coerce, layout) { return len; } -},{"../../components/errorbars/defaults":607,"../../lib":685,"../../registry":802,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":999}],1004:[function(require,module,exports){ +},{"../../components/errorbars/defaults":603,"../../lib":680,"../../registry":793,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":947}],952:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170820,7 +164024,7 @@ Scatter3D.meta = { module.exports = Scatter3D; -},{"../../constants/gl_markers":664,"../../plots/gl3d":767,"../scatter/colorbar":979,"./attributes":999,"./calc":1000,"./convert":1002,"./defaults":1003}],1005:[function(require,module,exports){ +},{"../../constants/gl_markers":660,"../../plots/gl3d":758,"../scatter/colorbar":927,"./attributes":947,"./calc":948,"./convert":950,"./defaults":951}],953:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170834,522 +164038,6 @@ module.exports = Scatter3D; var scatterAttrs = require('../scatter/attributes'); var plotAttrs = require('../../plots/attributes'); var colorAttributes = require('../../components/colorscale/color_attributes'); -var colorbarAttrs = require('../../components/colorbar/attributes'); - -var extendFlat = require('../../lib/extend').extendFlat; - -var scatterMarkerAttrs = scatterAttrs.marker, - scatterLineAttrs = scatterAttrs.line, - scatterMarkerLineAttrs = scatterMarkerAttrs.line; - -module.exports = { - carpet: { - valType: 'string', - role: 'info', - description: [ - 'An identifier for this carpet, so that `scattercarpet` and', - '`scattercontour` traces can specify a carpet plot on which', - 'they lie' - ].join(' ') - }, - a: { - valType: 'data_array', - description: [ - 'Sets the quantity of component `a` in each data point.', - 'If `a`, `b`, and `c` are all provided, they need not be', - 'normalized, only the relative values matter. If only two', - 'arrays are provided they must be normalized to match', - '`ternary.sum`.' - ].join(' ') - }, - b: { - valType: 'data_array', - description: [ - 'Sets the quantity of component `a` in each data point.', - 'If `a`, `b`, and `c` are all provided, they need not be', - 'normalized, only the relative values matter. If only two', - 'arrays are provided they must be normalized to match', - '`ternary.sum`.' - ].join(' ') - }, - sum: { - valType: 'number', - role: 'info', - dflt: 0, - min: 0, - description: [ - 'The number each triplet should sum to,', - 'if only two of `a`, `b`, and `c` are provided.', - 'This overrides `ternary.sum` to normalize this specific', - 'trace, but does not affect the values displayed on the axes.', - '0 (or missing) means to use ternary.sum' - ].join(' ') - }, - mode: extendFlat({}, scatterAttrs.mode, {dflt: 'markers'}), - text: extendFlat({}, scatterAttrs.text, { - description: [ - 'Sets text elements associated with each (a,b,c) point.', - 'If a single string, the same string appears over', - 'all the data points.', - 'If an array of strings, the items are mapped in order to the', - 'the data points in (a,b,c).' - ].join(' ') - }), - line: { - color: scatterLineAttrs.color, - width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash, - shape: extendFlat({}, scatterLineAttrs.shape, - {values: ['linear', 'spline']}), - smoothing: scatterLineAttrs.smoothing - }, - connectgaps: scatterAttrs.connectgaps, - fill: extendFlat({}, scatterAttrs.fill, { - values: ['none', 'toself', 'tonext'], - description: [ - 'Sets the area to fill with a solid color.', - 'Use with `fillcolor` if not *none*.', - 'scatterternary has a subset of the options available to scatter.', - '*toself* connects the endpoints of the trace (or each segment', - 'of the trace if it has gaps) into a closed shape.', - '*tonext* fills the space between two traces if one completely', - 'encloses the other (eg consecutive contour lines), and behaves like', - '*toself* if there is no trace before it. *tonext* should not be', - 'used if one trace does not enclose the other.' - ].join(' ') - }), - fillcolor: scatterAttrs.fillcolor, - marker: extendFlat({}, { - symbol: scatterMarkerAttrs.symbol, - opacity: scatterMarkerAttrs.opacity, - maxdisplayed: scatterMarkerAttrs.maxdisplayed, - size: scatterMarkerAttrs.size, - sizeref: scatterMarkerAttrs.sizeref, - sizemin: scatterMarkerAttrs.sizemin, - sizemode: scatterMarkerAttrs.sizemode, - line: extendFlat({}, - {width: scatterMarkerLineAttrs.width}, - colorAttributes('marker'.line) - ) - }, colorAttributes('marker'), { - showscale: scatterMarkerAttrs.showscale, - colorbar: colorbarAttrs - }), - - textfont: scatterAttrs.textfont, - textposition: scatterAttrs.textposition, - hoverinfo: extendFlat({}, plotAttrs.hoverinfo, { - flags: ['a', 'b', 'c', 'text', 'name'] - }), - hoveron: scatterAttrs.hoveron, -}; - -},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1006:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var isNumeric = require('fast-isnumeric'); - -var Axes = require('../../plots/cartesian/axes'); -var Lib = require('../../lib'); - -var subTypes = require('../scatter/subtypes'); -var calcColorscale = require('../scatter/colorscale_calc'); -var lookupCarpet = require('../carpet/lookup_carpetid'); - -module.exports = function calc(gd, trace) { - var carpet = trace.carpetTrace = lookupCarpet(gd, trace); - if(!carpet || !carpet.visible || carpet.visible === 'legendonly') return; - var i; - - // Transfer this over from carpet before plotting since this is a necessary - // condition in order for cartesian to actually plot this trace: - trace.xaxis = carpet.xaxis; - trace.yaxis = carpet.yaxis; - - // make the calcdata array - var serieslen = trace.a.length; - var cd = new Array(serieslen); - var a, b; - var needsCull = false; - for(i = 0; i < serieslen; i++) { - a = trace.a[i]; - b = trace.b[i]; - if(isNumeric(a) && isNumeric(b)) { - var xy = carpet.ab2xy(+a, +b, true); - var visible = carpet.isVisible(+a, +b); - if(!visible) needsCull = true; - cd[i] = {x: xy[0], y: xy[1], a: a, b: b, vis: visible}; - } - else cd[i] = {x: false, y: false}; - } - - trace._needsCull = needsCull; - - cd[0].carpet = carpet; - cd[0].trace = trace; - - // fill in some extras - var marker, s; - if(subTypes.hasMarkers(trace)) { - // Treat size like x or y arrays --- Run d2c - // this needs to go before ppad computation - marker = trace.marker; - s = marker.size; - - if(Array.isArray(s)) { - var ax = {type: 'linear'}; - Axes.setConvert(ax); - s = ax.makeCalcdata(trace.marker, 'size'); - if(s.length > serieslen) s.splice(serieslen, s.length - serieslen); - } - } - - calcColorscale(trace); - - // this has migrated up from arraysToCalcdata as we have a reference to 's' here - if(typeof s !== 'undefined') Lib.mergeArray(s, cd, 'ms'); - - return cd; -}; - -},{"../../lib":685,"../../plots/cartesian/axes":724,"../carpet/lookup_carpetid":858,"../scatter/colorscale_calc":980,"../scatter/subtypes":996,"fast-isnumeric":116}],1007:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var Lib = require('../../lib'); - -var constants = require('../scatter/constants'); -var subTypes = require('../scatter/subtypes'); -var handleMarkerDefaults = require('../scatter/marker_defaults'); -var handleLineDefaults = require('../scatter/line_defaults'); -var handleLineShapeDefaults = require('../scatter/line_shape_defaults'); -var handleTextDefaults = require('../scatter/text_defaults'); -var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); - -var attributes = require('./attributes'); - - -module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { - function coerce(attr, dflt) { - return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); - } - - coerce('carpet'); - - // XXX: Don't hard code this - traceOut.xaxis = 'x'; - traceOut.yaxis = 'y'; - - var a = coerce('a'), - b = coerce('b'), - len; - - len = Math.min(a.length, b.length); - - if(!len) { - traceOut.visible = false; - return; - } - - // cut all data arrays down to same length - if(a && len < a.length) traceOut.a = a.slice(0, len); - if(b && len < b.length) traceOut.b = b.slice(0, len); - - coerce('sum'); - - coerce('text'); - - var defaultMode = len < constants.PTS_LINESONLY ? 'lines+markers' : 'lines'; - coerce('mode', defaultMode); - - if(subTypes.hasLines(traceOut)) { - handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce); - handleLineShapeDefaults(traceIn, traceOut, coerce); - coerce('connectgaps'); - } - - if(subTypes.hasMarkers(traceOut)) { - handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce); - } - - if(subTypes.hasText(traceOut)) { - handleTextDefaults(traceIn, traceOut, layout, coerce); - } - - var dfltHoverOn = []; - - if(subTypes.hasMarkers(traceOut) || subTypes.hasText(traceOut)) { - coerce('marker.maxdisplayed'); - dfltHoverOn.push('points'); - } - - coerce('fill'); - if(traceOut.fill !== 'none') { - handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce); - if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce); - } - - coerce('hoverinfo', (layout._dataLength === 1) ? 'a+b+text' : undefined); - - if(traceOut.fill === 'tonext' || traceOut.fill === 'toself') { - dfltHoverOn.push('fills'); - } - coerce('hoveron', dfltHoverOn.join('+') || 'points'); -}; - -},{"../../lib":685,"../scatter/constants":981,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/line_shape_defaults":989,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1005}],1008:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var scatterHover = require('../scatter/hover'); - -module.exports = function hoverPoints(pointData, xval, yval, hovermode) { - var scatterPointData = scatterHover(pointData, xval, yval, hovermode); - if(!scatterPointData || scatterPointData[0].index === false) return; - - var newPointData = scatterPointData[0]; - - // if hovering on a fill, we don't show any point data so the label is - // unchanged from what scatter gives us - except that it needs to - // be constrained to the trianglular plot area, not just the rectangular - // area defined by the synthetic x and y axes - // TODO: in some cases the vertical middle of the shape is not within - // the triangular viewport at all, so the label can become disconnected - // from the shape entirely. But calculating what portion of the shape - // is actually visible, as constrained by the diagonal axis lines, is not - // so easy and anyway we lost the information we would have needed to do - // this inside scatterHover. - if(newPointData.index === undefined) { - var yFracUp = 1 - (newPointData.y0 / pointData.ya._length), - xLen = pointData.xa._length, - xMin = xLen * yFracUp / 2, - xMax = xLen - xMin; - newPointData.x0 = Math.max(Math.min(newPointData.x0, xMax), xMin); - newPointData.x1 = Math.max(Math.min(newPointData.x1, xMax), xMin); - return scatterPointData; - } - - var cdi = newPointData.cd[newPointData.index]; - - newPointData.a = cdi.a; - newPointData.b = cdi.b; - - newPointData.xLabelVal = undefined; - newPointData.yLabelVal = undefined; - // TODO: nice formatting, and label by axis title, for a, b, and c? - - var trace = newPointData.trace, - carpet = trace._carpet, - hoverinfo = trace.hoverinfo.split('+'), - text = []; - - function textPart(ax, val) { - text.push(((ax.labelprefix && ax.labelprefix.length > 0) ? ax.labelprefix : (ax._hovertitle + ': ')) + val.toFixed(3) + ax.labelsuffix); - } - - if(hoverinfo.indexOf('all') !== -1) hoverinfo = ['a', 'b']; - if(hoverinfo.indexOf('a') !== -1) textPart(carpet.aaxis, cdi.a); - if(hoverinfo.indexOf('b') !== -1) textPart(carpet.baxis, cdi.b); - - var ij = carpet.ab2ij([cdi.a, cdi.b]); - var i0 = Math.floor(ij[0]); - var ti = ij[0] - i0; - - var j0 = Math.floor(ij[1]); - var tj = ij[1] - j0; - - var xy = carpet.evalxy([], i0, j0, ti, tj); - text.push('y: ' + xy[1].toFixed(3)); - - newPointData.extraText = text.join('
'); - - return scatterPointData; -}; - -},{"../scatter/hover":985}],1009:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var ScatterCarpet = {}; - -ScatterCarpet.attributes = require('./attributes'); -ScatterCarpet.supplyDefaults = require('./defaults'); -ScatterCarpet.colorbar = require('../scatter/colorbar'); -ScatterCarpet.calc = require('./calc'); -ScatterCarpet.plot = require('./plot'); -ScatterCarpet.style = require('./style'); -ScatterCarpet.hoverPoints = require('./hover'); -ScatterCarpet.selectPoints = require('./select'); - -ScatterCarpet.moduleType = 'trace'; -ScatterCarpet.name = 'scattercarpet'; -ScatterCarpet.basePlotModule = require('../../plots/cartesian'); -ScatterCarpet.categories = ['carpet', 'symbols', 'markerColorscale', 'showLegend', 'carpetDependent']; -ScatterCarpet.meta = { - hrName: 'scatter_carpet', - description: [ - 'Plots a scatter trace on either the first carpet axis or the', - 'carpet axis with a matching `carpet` attribute.' - ].join(' ') -}; - -module.exports = ScatterCarpet; - -},{"../../plots/cartesian":734,"../scatter/colorbar":979,"./attributes":1005,"./calc":1006,"./defaults":1007,"./hover":1008,"./plot":1010,"./select":1011,"./style":1012}],1010:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var scatterPlot = require('../scatter/plot'); -var Axes = require('../../plots/cartesian/axes'); - -module.exports = function plot(gd, plotinfoproxy, data) { - var i, trace, node; - - var carpet = data[0][0].carpet; - - // mimic cartesian plotinfo - var plotinfo = { - xaxis: Axes.getFromId(gd, carpet.xaxis || 'x'), - yaxis: Axes.getFromId(gd, carpet.yaxis || 'y'), - plot: plotinfoproxy.plot - }; - - scatterPlot(plotinfo.graphDiv, plotinfo, data); - - for(i = 0; i < data.length; i++) { - trace = data[i][0].trace; - - // Note: .select is adequate but seems to mutate the node data, - // which is at least a bit suprising and causes problems elsewhere - node = plotinfo.plot.selectAll('g.trace' + trace.uid + ' .js-line'); - - // Note: it would be more efficient if this didn't need to be applied - // separately to all scattercarpet traces, but that would require - // lots of reorganization of scatter traces that is otherwise not - // necessary. That makes this a potential optimization. - node.attr('clip-path', 'url(#clip' + carpet.uid + 'carpet)'); - } -}; - -},{"../../plots/cartesian/axes":724,"../scatter/plot":993}],1011:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var scatterSelect = require('../scatter/select'); - - -module.exports = function selectPoints(searchInfo, polygon) { - var selection = scatterSelect(searchInfo, polygon); - if(!selection) return; - - var cd = searchInfo.cd, - pt, cdi, i; - - for(i = 0; i < selection.length; i++) { - pt = selection[i]; - cdi = cd[pt.pointNumber]; - pt.a = cdi.a; - pt.b = cdi.b; - pt.c = cdi.c; - delete pt.x; - delete pt.y; - } - - return selection; -}; - -},{"../scatter/select":994}],1012:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var scatterStyle = require('../scatter/style'); - - -module.exports = function style(gd) { - var modules = gd._fullLayout._modules; - - // we're just going to call scatter style... if we already - // called it, don't need to redo. - // Later though we may want differences, or we may make style - // more specific in its scope, then we can remove this. - for(var i = 0; i < modules.length; i++) { - if(modules[i].name === 'scatter') return; - } - - scatterStyle(gd); -}; - -},{"../scatter/style":995}],1013:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var scatterAttrs = require('../scatter/attributes'); -var plotAttrs = require('../../plots/attributes'); -var colorAttributes = require('../../components/colorscale/color_attributes'); -var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; @@ -171395,30 +164083,16 @@ module.exports = { 'If a single string, the same string appears over', 'all the data points.', 'If an array of string, the items are mapped in order to the', - 'this trace\'s (lon,lat) or `locations` coordinates.', - 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,', - 'these elements will be seen in the hover labels.' - ].join(' ') - }), - hovertext: extendFlat({}, scatterAttrs.hovertext, { - description: [ - 'Sets hover text elements associated with each (lon,lat) pair', - 'or item in `locations`.', - 'If a single string, the same string appears over', - 'all the data points.', - 'If an array of string, the items are mapped in order to the', - 'this trace\'s (lon,lat) or `locations` coordinates.', - 'To be seen, trace `hoverinfo` must contain a *text* flag.' + 'this trace\'s (lon,lat) or `locations` coordinates.' ].join(' ') }), - textfont: scatterAttrs.textfont, textposition: scatterAttrs.textposition, line: { color: scatterLineAttrs.color, width: scatterLineAttrs.width, - dash: dash + dash: scatterLineAttrs.dash }, connectgaps: scatterAttrs.connectgaps, @@ -171458,7 +164132,7 @@ module.exports = { }) }; -},{"../../components/colorscale/color_attributes":585,"../../components/drawing/attributes":601,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1014:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":582,"../../lib/extend":672,"../../plots/attributes":717,"../scatter/attributes":924}],954:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171471,38 +164145,51 @@ module.exports = { 'use strict'; var isNumeric = require('fast-isnumeric'); -var BADNUM = require('../../constants/numerical').BADNUM; var calcMarkerColorscale = require('../scatter/colorscale_calc'); -var arraysToCalcdata = require('../scatter/arrays_to_calcdata'); + module.exports = function calc(gd, trace) { - var hasLocationData = Array.isArray(trace.locations); - var len = hasLocationData ? trace.locations.length : trace.lon.length; - var calcTrace = new Array(len); + var hasLocationData = Array.isArray(trace.locations), + len = hasLocationData ? trace.locations.length : trace.lon.length; + + var calcTrace = [], + cnt = 0; for(var i = 0; i < len; i++) { - var calcPt = calcTrace[i] = {}; + var calcPt = {}, + skip; if(hasLocationData) { var loc = trace.locations[i]; - calcPt.loc = typeof loc === 'string' ? loc : null; - } else { - var lon = trace.lon[i]; - var lat = trace.lat[i]; - if(isNumeric(lon) && isNumeric(lat)) calcPt.lonlat = [+lon, +lat]; - else calcPt.lonlat = [BADNUM, BADNUM]; + calcPt.loc = loc; + skip = (typeof loc !== 'string'); } + else { + var lon = trace.lon[i], + lat = trace.lat[i]; + + calcPt.lonlat = [+lon, +lat]; + skip = (!isNumeric(lon) || !isNumeric(lat)); + } + + if(skip) { + if(cnt > 0) calcTrace[cnt - 1].gapAfter = true; + continue; + } + + cnt++; + + calcTrace.push(calcPt); } - arraysToCalcdata(calcTrace, trace); calcMarkerColorscale(trace); return calcTrace; }; -},{"../../constants/numerical":666,"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980,"fast-isnumeric":116}],1015:[function(require,module,exports){ +},{"../scatter/colorscale_calc":928,"fast-isnumeric":113}],955:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171537,7 +164224,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('text'); - coerce('hovertext'); coerce('mode'); if(subTypes.hasLines(traceOut)) { @@ -171583,7 +164269,7 @@ function handleLonLatLocDefaults(traceIn, traceOut, coerce) { return len; } -},{"../../lib":685,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1013}],1016:[function(require,module,exports){ +},{"../../lib":680,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":953}],956:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171604,7 +164290,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],1017:[function(require,module,exports){ +},{}],957:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171618,7 +164304,6 @@ module.exports = function eventData(out, pt) { var Fx = require('../../plots/cartesian/graph_interact'); var Axes = require('../../plots/cartesian/axes'); -var BADNUM = require('../../constants/numerical').BADNUM; var getTraceColor = require('../scatter/get_trace_color'); var attributes = require('./attributes'); @@ -171631,6 +164316,8 @@ module.exports = function hoverPoints(pointData) { ya = pointData.ya, geo = pointData.subplot; + if(cd[0].placeholder) return; + function c2p(lonlat) { return geo.projection(lonlat); } @@ -171638,7 +164325,8 @@ module.exports = function hoverPoints(pointData) { function distFn(d) { var lonlat = d.lonlat; - if(lonlat[0] === BADNUM) return Infinity; + // this handles the not-found location feature case + if(lonlat[0] === null || lonlat[1] === null) return Infinity; if(geo.isLonLatOverEdges(lonlat)) return Infinity; @@ -171708,20 +164396,14 @@ function getExtraText(trace, pt, axis) { else if(hasLat) text.push('lat: ' + format(pt.lonlat[1])); if(hasText) { - var tx; - - if(pt.htx) tx = pt.htx; - else if(trace.hovertext) tx = trace.hovertext; - else if(pt.tx) tx = pt.tx; - else if(trace.text) tx = trace.text; - + var tx = pt.tx || trace.text; if(!Array.isArray(tx)) text.push(tx); } return text.join('
'); } -},{"../../constants/numerical":666,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"../scatter/get_trace_color":984,"./attributes":1013}],1018:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"../scatter/get_trace_color":932,"./attributes":953}],958:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171758,7 +164440,7 @@ ScatterGeo.meta = { module.exports = ScatterGeo; -},{"../../plots/geo":752,"../scatter/colorbar":979,"./attributes":1013,"./calc":1014,"./defaults":1015,"./event_data":1016,"./hover":1017,"./plot":1019}],1019:[function(require,module,exports){ +},{"../../plots/geo":743,"../scatter/colorbar":927,"./attributes":953,"./calc":954,"./defaults":955,"./event_data":956,"./hover":957,"./plot":959}],959:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171776,10 +164458,10 @@ var Drawing = require('../../components/drawing'); var Color = require('../../components/color'); var Lib = require('../../lib'); -var BADNUM = require('../../constants/numerical').BADNUM; var getTopojsonFeatures = require('../../lib/topojson_utils').getTopojsonFeatures; var locationToFeature = require('../../lib/geo_location_utils').locationToFeature; var geoJsonUtils = require('../../lib/geojson_utils'); +var arrayToCalcItem = require('../../lib/array_to_calc_item'); var subTypes = require('../scatter/subtypes'); @@ -171787,16 +164469,6 @@ module.exports = function plot(geo, calcData) { function keyFunc(d) { return d[0].trace.uid; } - function removeBADNUM(d, node) { - if(d.lonlat[0] === BADNUM) { - d3.select(node).remove(); - } - } - - for(var i = 0; i < calcData.length; i++) { - fillLocationLonLat(calcData[i], geo.topojson); - } - var gScatterGeoTraces = geo.framework.select('.scattergeolayer') .selectAll('g.trace.scattergeo') .data(calcData, keyFunc); @@ -171810,11 +164482,27 @@ module.exports = function plot(geo, calcData) { gScatterGeoTraces.selectAll('*').remove(); gScatterGeoTraces.each(function(calcTrace) { - var s = d3.select(this); - var trace = calcTrace[0].trace; + var s = d3.select(this), + trace = calcTrace[0].trace, + convertToLonLatFn = makeConvertToLonLatFn(trace, geo.topojson); + + // skip over placeholder traces + if(calcTrace[0].placeholder) s.remove(); + + // just like calcTrace but w/o not-found location datum + var _calcTrace = []; + + for(var i = 0; i < calcTrace.length; i++) { + var _calcPt = convertToLonLatFn(calcTrace[i]); + + if(_calcPt) { + arrayItemToCalcdata(trace, calcTrace[i], i); + _calcTrace.push(_calcPt); + } + } if(subTypes.hasLines(trace) || trace.fill !== 'none') { - var lineCoords = geoJsonUtils.calcTraceToLineCoords(calcTrace); + var lineCoords = geoJsonUtils.calcTraceToLineCoords(_calcTrace); var lineData = (trace.fill !== 'none') ? geoJsonUtils.makePolygon(lineCoords, trace) : @@ -171827,19 +164515,15 @@ module.exports = function plot(geo, calcData) { } if(subTypes.hasMarkers(trace)) { - s.selectAll('path.point') - .data(Lib.identity) - .enter().append('path') - .classed('point', true) - .each(function(calcPt) { removeBADNUM(calcPt, this); }); + s.selectAll('path.point').data(_calcTrace) + .enter().append('path') + .classed('point', true); } if(subTypes.hasText(trace)) { - s.selectAll('g') - .data(Lib.identity) + s.selectAll('g').data(_calcTrace) .enter().append('g') - .append('text') - .each(function(calcPt) { removeBADNUM(calcPt, this); }); + .append('text'); } }); @@ -171847,19 +164531,50 @@ module.exports = function plot(geo, calcData) { style(geo); }; -function fillLocationLonLat(calcTrace, topojson) { - var trace = calcTrace[0].trace; - - if(!Array.isArray(trace.locations)) return; +function makeConvertToLonLatFn(trace, topojson) { + if(!Array.isArray(trace.locations)) return Lib.identity; - var features = getTopojsonFeatures(trace, topojson); - var locationmode = trace.locationmode; + var features = getTopojsonFeatures(trace, topojson), + locationmode = trace.locationmode; - for(var i = 0; i < calcTrace.length; i++) { - var calcPt = calcTrace[i]; + return function(calcPt) { var feature = locationToFeature(locationmode, calcPt.loc, features); - calcPt.lonlat = feature ? feature.properties.ct : [BADNUM, BADNUM]; + if(feature) { + calcPt.lonlat = feature.properties.ct; + return calcPt; + } + else { + // mutate gd.calcdata so that hoverPoints knows to skip this datum + calcPt.lonlat = [null, null]; + return false; + } + }; +} + +function arrayItemToCalcdata(trace, calcItem, i) { + var marker = trace.marker; + + function merge(traceAttr, calcAttr) { + arrayToCalcItem(traceAttr, calcItem, calcAttr, i); + } + + merge(trace.text, 'tx'); + merge(trace.textposition, 'tp'); + if(trace.textfont) { + merge(trace.textfont.size, 'ts'); + merge(trace.textfont.color, 'tc'); + merge(trace.textfont.family, 'tf'); + } + + if(marker && marker.line) { + var markerLine = marker.line; + merge(marker.opacity, 'mo'); + merge(marker.symbol, 'mx'); + merge(marker.color, 'mc'); + merge(marker.size, 'ms'); + merge(markerLine.color, 'mlc'); + merge(markerLine.width, 'mlw'); } } @@ -171897,7 +164612,7 @@ function style(geo) { }); } -},{"../../components/color":578,"../../components/drawing":602,"../../constants/numerical":666,"../../lib":685,"../../lib/geo_location_utils":680,"../../lib/geojson_utils":681,"../../lib/topojson_utils":706,"../scatter/subtypes":996,"d3":107}],1020:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"../../lib":680,"../../lib/array_to_calc_item":667,"../../lib/geo_location_utils":675,"../../lib/geojson_utils":676,"../../lib/topojson_utils":701,"../scatter/subtypes":944,"d3":104}],960:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171987,7 +164702,7 @@ module.exports = { error_x: scatterAttrs.error_x }; -},{"../../components/colorscale/color_attributes":585,"../../constants/gl2d_dashes":662,"../../constants/gl_markers":664,"../../lib/extend":677,"../scatter/attributes":976}],1021:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":582,"../../constants/gl2d_dashes":658,"../../constants/gl_markers":660,"../../lib/extend":672,"../scatter/attributes":924}],961:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172300,7 +165015,7 @@ proto.update = function(options) { // representing the epoch milliseconds in a typed array; // also, perhaps the Python / R interfaces take care of String->Date conversions // such that there's no need to check for string dates in plotly.js) -// Patterned from axis_autotype.js:moreDates +// Patterned from axis_defaults.js:moreDates // Code DRYing is not done to preserve the most direct compilation possible for speed; // also, there are quite a few differences function allFastTypesLikely(a) { @@ -172636,7 +165351,7 @@ function createLineWithMarkers(scene, data) { module.exports = createLineWithMarkers; -},{"../../components/errorbars":608,"../../constants/gl2d_dashes":662,"../../constants/gl_markers":664,"../../lib":685,"../../lib/gl_format_color":682,"../../lib/str2rgbarray":703,"../../lib/typed_array_truncate":707,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_autotype":725,"../scatter/get_trace_color":984,"../scatter/make_bubble_size_func":991,"../scatter/subtypes":996,"fast-isnumeric":116,"gl-error2d":144,"gl-line2d":154,"gl-scatter2d":232,"gl-scatter2d-sdf":227}],1022:[function(require,module,exports){ +},{"../../components/errorbars":604,"../../constants/gl2d_dashes":658,"../../constants/gl_markers":660,"../../lib":680,"../../lib/gl_format_color":677,"../../lib/str2rgbarray":698,"../../lib/typed_array_truncate":702,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_autotype":720,"../scatter/get_trace_color":932,"../scatter/make_bubble_size_func":939,"../scatter/subtypes":944,"fast-isnumeric":113,"gl-error2d":141,"gl-line2d":151,"gl-scatter2d":229,"gl-scatter2d-sdf":224}],962:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172693,7 +165408,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, defaultColor, {axis: 'x', inherit: 'y'}); }; -},{"../../components/errorbars/defaults":607,"../../lib":685,"../scatter/constants":981,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/xy_defaults":998,"./attributes":1020}],1023:[function(require,module,exports){ +},{"../../components/errorbars/defaults":603,"../../lib":680,"../scatter/constants":929,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/xy_defaults":946,"./attributes":960}],963:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172729,7 +165444,7 @@ ScatterGl.meta = { module.exports = ScatterGl; -},{"../../plots/gl2d":764,"../scatter/colorbar":979,"../scatter3d/calc":1000,"./attributes":1020,"./convert":1021,"./defaults":1022}],1024:[function(require,module,exports){ +},{"../../plots/gl2d":755,"../scatter/colorbar":927,"../scatter3d/calc":948,"./attributes":960,"./convert":961,"./defaults":962}],964:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172759,15 +165474,19 @@ module.exports = { // locations // locationmode - mode: extendFlat({}, scatterAttrs.mode, { + mode: { + valType: 'flaglist', + flags: ['lines', 'markers', 'text'], dflt: 'markers', + extras: ['none'], + role: 'info', description: [ 'Determines the drawing mode for this scatter trace.', 'If the provided `mode` includes *text* then the `text` elements', 'appear at the coordinates. Otherwise, the `text` elements', 'appear on hover.' ].join(' ') - }), + }, text: extendFlat({}, scatterAttrs.text, { description: [ @@ -172775,28 +165494,16 @@ module.exports = { 'If a single string, the same string appears over', 'all the data points.', 'If an array of string, the items are mapped in order to the', - 'this trace\'s (lon,lat) coordinates.', - 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,', - 'these elements will be seen in the hover labels.' - ].join(' ') - }), - hovertext: extendFlat({}, scatterAttrs.hovertext, { - description: [ - 'Sets hover text elements associated with each (lon,lat) pair', - 'If a single string, the same string appears over', - 'all the data points.', - 'If an array of string, the items are mapped in order to the', - 'this trace\'s (lon,lat) coordinates.', - 'To be seen, trace `hoverinfo` must contain a *text* flag.' + 'this trace\'s (lon,lat) coordinates.' ].join(' ') }), line: { color: lineAttrs.color, - width: lineAttrs.width + width: lineAttrs.width, // TODO - // dash: dash + dash: lineAttrs.dash }, connectgaps: scatterAttrs.connectgaps, @@ -172845,7 +165552,7 @@ module.exports = { }), }; -},{"../../components/colorbar/attributes":579,"../../lib/extend":677,"../../plots/attributes":722,"../../plots/mapbox/layout_attributes":783,"../scatter/attributes":976,"../scattergeo/attributes":1013}],1025:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../lib/extend":672,"../../plots/attributes":717,"../../plots/mapbox/layout_attributes":774,"../scatter/attributes":924,"../scattergeo/attributes":953}],965:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172857,12 +165564,112 @@ module.exports = { 'use strict'; -var Lib = require('../../lib'); -var BADNUM = require('../../constants/numerical').BADNUM; -var geoJsonUtils = require('../../lib/geojson_utils'); +var isNumeric = require('fast-isnumeric'); +var Lib = require('../../lib'); var Colorscale = require('../../components/colorscale'); + +var subtypes = require('../scatter/subtypes'); +var calcMarkerColorscale = require('../scatter/colorscale_calc'); var makeBubbleSizeFn = require('../scatter/make_bubble_size_func'); + + +module.exports = function calc(gd, trace) { + var len = trace.lon.length, + marker = trace.marker; + + var hasMarkers = subtypes.hasMarkers(trace), + hasColorArray = (hasMarkers && Array.isArray(marker.color)), + hasSizeArray = (hasMarkers && Array.isArray(marker.size)), + hasSymbolArray = (hasMarkers && Array.isArray(marker.symbol)), + hasTextArray = Array.isArray(trace.text); + + calcMarkerColorscale(trace); + + var colorFn = Colorscale.hasColorscale(trace, 'marker') ? + Colorscale.makeColorScaleFunc( + Colorscale.extractScale( + marker.colorscale, + marker.cmin, + marker.cmax + ) + ) : + Lib.identity; + + var sizeFn = subtypes.isBubble(trace) ? + makeBubbleSizeFn(trace) : + Lib.identity; + + var calcTrace = [], + cnt = 0; + + // Different than cartesian calc step + // as skip over non-numeric lon, lat pairs. + // This makes the hover and convert calculations simpler. + + for(var i = 0; i < len; i++) { + var lon = trace.lon[i], + lat = trace.lat[i]; + + if(!isNumeric(lon) || !isNumeric(lat)) { + if(cnt > 0) calcTrace[cnt - 1].gapAfter = true; + continue; + } + + var calcPt = {}; + cnt++; + + // coerce numeric strings into numbers + calcPt.lonlat = [+lon, +lat]; + + if(hasMarkers) { + + if(hasColorArray) { + var mc = marker.color[i]; + + calcPt.mc = mc; + calcPt.mcc = colorFn(mc); + } + + if(hasSizeArray) { + var ms = marker.size[i]; + + calcPt.ms = ms; + calcPt.mrc = sizeFn(ms); + } + + if(hasSymbolArray) { + var mx = marker.symbol[i]; + calcPt.mx = (typeof mx === 'string') ? mx : 'circle'; + } + } + + if(hasTextArray) { + var tx = trace.text[i]; + calcPt.tx = (typeof tx === 'string') ? tx : ''; + } + + calcTrace.push(calcPt); + } + + return calcTrace; +}; + +},{"../../components/colorscale":589,"../../lib":680,"../scatter/colorscale_calc":928,"../scatter/make_bubble_size_func":939,"../scatter/subtypes":944,"fast-isnumeric":113}],966:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Lib = require('../../lib'); +var geoJsonUtils = require('../../lib/geojson_utils'); + var subTypes = require('../scatter/subtypes'); var convertTextOpts = require('../../plots/mapbox/convert_text_opts'); @@ -172894,16 +165701,16 @@ module.exports = function convert(calcTrace) { }; // early return if not visible or placeholder - if(!isVisible) return opts; + if(!isVisible || calcTrace[0].placeholder) return opts; // fill layer and line layer use the same coords - var lineCoords; + var coords; if(hasFill || hasLines) { - lineCoords = geoJsonUtils.calcTraceToLineCoords(calcTrace); + coords = geoJsonUtils.calcTraceToLineCoords(calcTrace); } if(hasFill) { - fill.geojson = geoJsonUtils.makePolygon(lineCoords); + fill.geojson = geoJsonUtils.makePolygon(coords); fill.layout.visibility = 'visible'; Lib.extendFlat(fill.paint, { @@ -172912,7 +165719,7 @@ module.exports = function convert(calcTrace) { } if(hasLines) { - line.geojson = geoJsonUtils.makeLine(lineCoords); + line.geojson = geoJsonUtils.makeLine(coords); line.layout.visibility = 'visible'; Lib.extendFlat(line.paint, { @@ -173006,30 +165813,12 @@ function initContainer() { // // The solution prove to be more robust than trying to generate // `stops` arrays from scale functions. -// -// TODO axe this when we bump mapbox-gl and rewrite this using -// "identity" property functions. -// See https://github.com/plotly/plotly.js/pull/1543 -// function makeCircleGeoJSON(calcTrace, hash) { var trace = calcTrace[0].trace; - var marker = trace.marker; - var colorFn; - if(Colorscale.hasColorscale(trace, 'marker')) { - colorFn = Colorscale.makeColorScaleFunc( - Colorscale.extractScale(marker.colorscale, marker.cmin, marker.cmax) - ); - } else if(Array.isArray(marker.color)) { - colorFn = Lib.identity; - } - - var sizeFn; - if(subTypes.isBubble(trace)) { - sizeFn = makeBubbleSizeFn(trace); - } else if(Array.isArray(marker.size)) { - sizeFn = Lib.identity; - } + var marker = trace.marker, + hasColorArray = Array.isArray(marker.color), + hasSizeArray = Array.isArray(marker.size); // Translate vals in trace arrayOk containers // into a val-to-index hash object @@ -173043,19 +165832,16 @@ function makeCircleGeoJSON(calcTrace, hash) { for(var i = 0; i < calcTrace.length; i++) { var calcPt = calcTrace[i]; - var lonlat = calcPt.lonlat; - - if(isBADNUM(lonlat)) continue; var props = {}; - if(colorFn) translate(props, COLOR_PROP, colorFn(calcPt.mc), i); - if(sizeFn) translate(props, SIZE_PROP, sizeFn(calcPt.ms), i); + if(hasColorArray) translate(props, COLOR_PROP, calcPt.mcc, i); + if(hasSizeArray) translate(props, SIZE_PROP, calcPt.mrc, i); features.push({ type: 'Feature', geometry: { type: 'Point', - coordinates: lonlat + coordinates: calcPt.lonlat }, properties: props }); @@ -173087,8 +165873,6 @@ function makeSymbolGeoJSON(calcTrace) { for(var i = 0; i < calcTrace.length; i++) { var calcPt = calcTrace[i]; - if(isBADNUM(calcPt.lonlat)) continue; - features.push({ type: 'Feature', geometry: { @@ -173180,12 +165964,7 @@ function getFillFunc(attr) { function blankFillFunc() { return ''; } -// only need to check lon (OR lat) -function isBADNUM(lonlat) { - return lonlat[0] === BADNUM; -} - -},{"../../components/colorscale":592,"../../constants/numerical":666,"../../lib":685,"../../lib/geojson_utils":681,"../../plots/mapbox/convert_text_opts":780,"../scatter/make_bubble_size_func":991,"../scatter/subtypes":996}],1026:[function(require,module,exports){ +},{"../../lib":680,"../../lib/geojson_utils":676,"../../plots/mapbox/convert_text_opts":771,"../scatter/subtypes":944}],967:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173206,6 +165985,7 @@ var handleTextDefaults = require('../scatter/text_defaults'); var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); var attributes = require('./attributes'); +var scatterAttrs = require('../scatter/attributes'); module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { @@ -173213,6 +165993,15 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); } + function coerceMarker(attr, dflt) { + var attrs = (attr.indexOf('.line') === -1) ? attributes : scatterAttrs; + + // use 'scatter' attributes for 'marker.line.' attr, + // so that we can reuse the scatter marker defaults + + return Lib.coerce(traceIn, traceOut, attrs, attr, dflt); + } + var len = handleLonLatDefaults(traceIn, traceOut, coerce); if(!len) { traceOut.visible = false; @@ -173220,22 +166009,19 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('text'); - coerce('hovertext'); coerce('mode'); if(subTypes.hasLines(traceOut)) { - handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noDash: true}); + handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce); coerce('connectgaps'); } if(subTypes.hasMarkers(traceOut)) { - handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noLine: true}); + handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerceMarker); // array marker.size and marker.color are only supported with circles var marker = traceOut.marker; - // we need mock marker.line object to make legends happy - marker.line = {width: 0}; if(marker.symbol !== 'circle') { if(Array.isArray(marker.size)) marker.size = marker.size[0]; @@ -173266,7 +166052,7 @@ function handleLonLatDefaults(traceIn, traceOut, coerce) { return len; } -},{"../../lib":685,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1024}],1027:[function(require,module,exports){ +},{"../../lib":680,"../scatter/attributes":924,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":964}],968:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173286,7 +166072,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],1028:[function(require,module,exports){ +},{}],969:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173300,7 +166086,7 @@ module.exports = function eventData(out, pt) { var Fx = require('../../plots/cartesian/graph_interact'); var getTraceColor = require('../scatter/get_trace_color'); -var BADNUM = require('../../constants/numerical').BADNUM; + module.exports = function hoverPoints(pointData, xval, yval) { var cd = pointData.cd, @@ -173308,6 +166094,8 @@ module.exports = function hoverPoints(pointData, xval, yval) { xa = pointData.xa, ya = pointData.ya; + if(cd[0].placeholder) return; + // compute winding number about [-180, 180] globe var winding = (xval >= 0) ? Math.floor((xval + 180) / 360) : @@ -173318,13 +166106,10 @@ module.exports = function hoverPoints(pointData, xval, yval) { var xval2 = xval - lonShift; function distFn(d) { - var lonlat = d.lonlat; - - if(lonlat[0] === BADNUM) return Infinity; - - var dx = Math.abs(xa.c2p(lonlat) - xa.c2p([xval2, lonlat[1]])); - var dy = Math.abs(ya.c2p(lonlat) - ya.c2p([lonlat[0], yval])); - var rad = Math.max(3, d.mrc || 0); + var lonlat = d.lonlat, + dx = Math.abs(xa.c2p(lonlat) - xa.c2p([xval2, lonlat[1]])), + dy = Math.abs(ya.c2p(lonlat) - ya.c2p([lonlat[0], yval])), + rad = Math.max(3, d.mrc || 0); return Math.max(Math.sqrt(dx * dx + dy * dy) - rad, 1 - 3 / rad); } @@ -173376,20 +166161,14 @@ function getExtraText(trace, di) { else if(hasLat) text.push('lat: ' + format(lonlat[1])); if(isAll || hoverinfo.indexOf('text') !== -1) { - var tx; - - if(di.htx) tx = di.htx; - else if(trace.hovertext) tx = trace.hovertext; - else if(di.tx) tx = di.tx; - else if(trace.text) tx = trace.text; - + var tx = di.tx || trace.text; if(!Array.isArray(tx)) text.push(tx); } return text.join('
'); } -},{"../../constants/numerical":666,"../../plots/cartesian/graph_interact":733,"../scatter/get_trace_color":984}],1029:[function(require,module,exports){ +},{"../../plots/cartesian/graph_interact":726,"../scatter/get_trace_color":932}],970:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173406,7 +166185,7 @@ var ScatterMapbox = {}; ScatterMapbox.attributes = require('./attributes'); ScatterMapbox.supplyDefaults = require('./defaults'); ScatterMapbox.colorbar = require('../scatter/colorbar'); -ScatterMapbox.calc = require('../scattergeo/calc'); +ScatterMapbox.calc = require('./calc'); ScatterMapbox.hoverPoints = require('./hover'); ScatterMapbox.eventData = require('./event_data'); ScatterMapbox.plot = require('./plot'); @@ -173426,7 +166205,7 @@ ScatterMapbox.meta = { module.exports = ScatterMapbox; -},{"../../plots/mapbox":781,"../scatter/colorbar":979,"../scattergeo/calc":1014,"./attributes":1024,"./defaults":1026,"./event_data":1027,"./hover":1028,"./plot":1030}],1030:[function(require,module,exports){ +},{"../../plots/mapbox":772,"../scatter/colorbar":927,"./attributes":964,"./calc":965,"./defaults":967,"./event_data":968,"./hover":969,"./plot":971}],971:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173550,7 +166329,7 @@ module.exports = function createScatterMapbox(mapbox, calcTrace) { return scatterMapbox; }; -},{"./convert":1025}],1031:[function(require,module,exports){ +},{"./convert":966}],972:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173565,7 +166344,6 @@ var scatterAttrs = require('../scatter/attributes'); var plotAttrs = require('../../plots/attributes'); var colorAttributes = require('../../components/colorscale/color_attributes'); var colorbarAttrs = require('../../components/colorbar/attributes'); -var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; @@ -173624,25 +166402,13 @@ module.exports = { 'If a single string, the same string appears over', 'all the data points.', 'If an array of strings, the items are mapped in order to the', - 'the data points in (a,b,c).', - 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,', - 'these elements will be seen in the hover labels.' - ].join(' ') - }), - hovertext: extendFlat({}, scatterAttrs.hovertext, { - description: [ - 'Sets hover text elements associated with each (a,b,c) point.', - 'If a single string, the same string appears over', - 'all the data points.', - 'If an array of strings, the items are mapped in order to the', - 'the data points in (a,b,c).', - 'To be seen, trace `hoverinfo` must contain a *text* flag.' + 'the data points in (a,b,c).' ].join(' ') }), line: { color: scatterLineAttrs.color, width: scatterLineAttrs.width, - dash: dash, + dash: scatterLineAttrs.dash, shape: extendFlat({}, scatterLineAttrs.shape, {values: ['linear', 'spline']}), smoothing: scatterLineAttrs.smoothing @@ -173688,7 +166454,7 @@ module.exports = { hoveron: scatterAttrs.hoveron, }; -},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/drawing/attributes":601,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1032:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../lib/extend":672,"../../plots/attributes":717,"../scatter/attributes":924}],973:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173785,7 +166551,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../plots/cartesian/axes":724,"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980,"../scatter/subtypes":996,"fast-isnumeric":116}],1033:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"../scatter/arrays_to_calcdata":923,"../scatter/colorscale_calc":928,"../scatter/subtypes":944,"fast-isnumeric":113}],974:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173851,7 +166617,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('sum'); coerce('text'); - coerce('hovertext'); var defaultMode = len < constants.PTS_LINESONLY ? 'lines+markers' : 'lines'; coerce('mode', defaultMode); @@ -173891,7 +166656,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('hoveron', dfltHoverOn.join('+') || 'points'); }; -},{"../../lib":685,"../scatter/constants":981,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/line_shape_defaults":989,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1031}],1034:[function(require,module,exports){ +},{"../../lib":680,"../scatter/constants":929,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/line_shape_defaults":937,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":972}],975:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173962,7 +166727,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return scatterPointData; }; -},{"../../plots/cartesian/axes":724,"../scatter/hover":985}],1035:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"../scatter/hover":933}],976:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -173998,7 +166763,7 @@ ScatterTernary.meta = { module.exports = ScatterTernary; -},{"../../plots/ternary":795,"../scatter/colorbar":979,"./attributes":1031,"./calc":1032,"./defaults":1033,"./hover":1034,"./plot":1036,"./select":1037,"./style":1038}],1036:[function(require,module,exports){ +},{"../../plots/ternary":786,"../scatter/colorbar":927,"./attributes":972,"./calc":973,"./defaults":974,"./hover":975,"./plot":977,"./select":978,"./style":979}],977:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -174034,11 +166799,71 @@ module.exports = function plot(ternary, moduleCalcData) { scatterPlot(ternary.graphDiv, plotinfo, moduleCalcData); }; -},{"../scatter/plot":993}],1037:[function(require,module,exports){ -arguments[4][1011][0].apply(exports,arguments) -},{"../scatter/select":994,"dup":1011}],1038:[function(require,module,exports){ -arguments[4][1012][0].apply(exports,arguments) -},{"../scatter/style":995,"dup":1012}],1039:[function(require,module,exports){ +},{"../scatter/plot":941}],978:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var scatterSelect = require('../scatter/select'); + + +module.exports = function selectPoints(searchInfo, polygon) { + var selection = scatterSelect(searchInfo, polygon); + if(!selection) return; + + var cd = searchInfo.cd, + pt, cdi, i; + + for(i = 0; i < selection.length; i++) { + pt = selection[i]; + cdi = cd[pt.pointNumber]; + pt.a = cdi.a; + pt.b = cdi.b; + pt.c = cdi.c; + delete pt.x; + delete pt.y; + } + + return selection; +}; + +},{"../scatter/select":942}],979:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var scatterStyle = require('../scatter/style'); + + +module.exports = function style(gd) { + var modules = gd._fullLayout._modules; + + // we're just going to call scatter style... if we already + // called it, don't need to redo. + // Later though we may want differences, or we may make style + // more specific in its scope, then we can remove this. + for(var i = 0; i < modules.length; i++) { + if(modules[i].name === 'scatter') return; + } + + scatterStyle(gd); +}; + +},{"../scatter/style":943}],980:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -174286,7 +167111,7 @@ module.exports = { } }; -},{"../../components/color":578,"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677}],1040:[function(require,module,exports){ +},{"../../components/color":575,"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672}],981:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -174310,7 +167135,7 @@ module.exports = function calc(gd, trace) { } }; -},{"../../components/colorscale/calc":584}],1041:[function(require,module,exports){ +},{"../../components/colorscale/calc":581}],982:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -174362,7 +167187,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],1042:[function(require,module,exports){ +},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],983:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -174741,7 +167566,7 @@ function createSurfaceTrace(scene, data) { module.exports = createSurfaceTrace; -},{"../../lib/str2rgbarray":703,"gl-surface3d":250,"ndarray":449,"ndarray-fill":439,"ndarray-homography":441,"ndarray-ops":443,"tinycolor2":514}],1043:[function(require,module,exports){ +},{"../../lib/str2rgbarray":698,"gl-surface3d":247,"ndarray":446,"ndarray-fill":436,"ndarray-homography":438,"ndarray-ops":440,"tinycolor2":511}],984:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -174862,7 +167687,7 @@ function mapLegacy(traceIn, oldAttr, newAttr) { } } -},{"../../components/colorscale/defaults":587,"../../lib":685,"../../registry":802,"./attributes":1039}],1044:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584,"../../lib":680,"../../registry":793,"./attributes":980}],985:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -174905,7 +167730,7 @@ Surface.meta = { module.exports = Surface; -},{"../../plots/gl3d":767,"./attributes":1039,"./calc":1040,"./colorbar":1041,"./convert":1042,"./defaults":1043}],1045:[function(require,module,exports){ +},{"../../plots/gl3d":758,"./attributes":980,"./calc":981,"./colorbar":982,"./convert":983,"./defaults":984}],986:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -175242,7 +168067,7 @@ function getFilterFunc(opts, d2c, targetCalendar) { } } -},{"../lib":685,"../plot_api/plot_schema":713,"../plots/cartesian/axis_autotype":725,"../plots/cartesian/axis_ids":727,"../plots/cartesian/set_convert":741,"../registry":802}],1046:[function(require,module,exports){ +},{"../lib":680,"../plot_api/plot_schema":708,"../plots/cartesian/axis_autotype":720,"../plots/cartesian/axis_ids":722,"../plots/cartesian/set_convert":733,"../registry":793}],987:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -175398,5 +168223,5 @@ function transformOne(trace, state) { return newData; } -},{"../lib":685,"../plot_api/plot_schema":713}]},{},[19])(19) +},{"../lib":680,"../plot_api/plot_schema":708}]},{},[17])(17) }); \ No newline at end of file diff --git a/dist/plotly.js b/dist/plotly.js index ef22025d293..8ad5dc03548 100644 --- a/dist/plotly.js +++ b/dist/plotly.js @@ -1,5 +1,5 @@ /** -* plotly.js v1.26.1 +* plotly.js v1.25.2 * Copyright 2012-2017, Plotly, Inc. * All rights reserved. * Licensed under the MIT license @@ -21,7 +21,6 @@ var rules = { "X svg a:hover": "fill:#3c6dc5;", "X .main-svg": "position:absolute;top:0;left:0;pointer-events:none;", "X .main-svg .draglayer": "pointer-events:all;", - "X .cursor-default": "cursor:default;", "X .cursor-pointer": "cursor:pointer;", "X .cursor-crosshair": "cursor:crosshair;", "X .cursor-move": "cursor:move;", @@ -69,7 +68,7 @@ for(var selector in rules) { Lib.addStyleRule(fullSelector, rules[selector]); } -},{"../src/lib":685}],2:[function(require,module,exports){ +},{"../src/lib":680}],2:[function(require,module,exports){ 'use strict'; module.exports = { @@ -186,12 +185,6 @@ module.exports = { 'path': 'm0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z', 'ascent': 850, 'descent': -150 - }, - 'spikeline': { - 'width': 1000, - 'path': 'M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z', - 'ascent': 850, - 'descent': -150 } }; @@ -208,7 +201,7 @@ module.exports = { module.exports = require('../src/traces/bar'); -},{"../src/traces/bar":816}],4:[function(require,module,exports){ +},{"../src/traces/bar":807}],4:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -221,7 +214,7 @@ module.exports = require('../src/traces/bar'); module.exports = require('../src/traces/box'); -},{"../src/traces/box":828}],5:[function(require,module,exports){ +},{"../src/traces/box":819}],5:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -234,7 +227,7 @@ module.exports = require('../src/traces/box'); module.exports = require('../src/components/calendars'); -},{"../src/components/calendars":576}],6:[function(require,module,exports){ +},{"../src/components/calendars":573}],6:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -247,20 +240,7 @@ module.exports = require('../src/components/calendars'); module.exports = require('../src/traces/candlestick'); -},{"../src/traces/candlestick":836}],7:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = require('../src/traces/carpet'); - -},{"../src/traces/carpet":857}],8:[function(require,module,exports){ +},{"../src/traces/candlestick":827}],7:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -273,7 +253,7 @@ module.exports = require('../src/traces/carpet'); module.exports = require('../src/traces/choropleth'); -},{"../src/traces/choropleth":872}],9:[function(require,module,exports){ +},{"../src/traces/choropleth":834}],8:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -286,20 +266,7 @@ module.exports = require('../src/traces/choropleth'); module.exports = require('../src/traces/contour'); -},{"../src/traces/contour":883}],10:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = require('../src/traces/contourcarpet'); - -},{"../src/traces/contourcarpet":898}],11:[function(require,module,exports){ +},{"../src/traces/contour":845}],9:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -312,7 +279,7 @@ module.exports = require('../src/traces/contourcarpet'); module.exports = require('../src/core'); -},{"../src/core":669}],12:[function(require,module,exports){ +},{"../src/core":665}],10:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -325,7 +292,7 @@ module.exports = require('../src/core'); module.exports = require('../src/transforms/filter'); -},{"../src/transforms/filter":1045}],13:[function(require,module,exports){ +},{"../src/transforms/filter":986}],11:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -338,7 +305,7 @@ module.exports = require('../src/transforms/filter'); module.exports = require('../src/transforms/groupby'); -},{"../src/transforms/groupby":1046}],14:[function(require,module,exports){ +},{"../src/transforms/groupby":987}],12:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -351,7 +318,7 @@ module.exports = require('../src/transforms/groupby'); module.exports = require('../src/traces/heatmap'); -},{"../src/traces/heatmap":912}],15:[function(require,module,exports){ +},{"../src/traces/heatmap":860}],13:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -364,7 +331,7 @@ module.exports = require('../src/traces/heatmap'); module.exports = require('../src/traces/heatmapgl'); -},{"../src/traces/heatmapgl":921}],16:[function(require,module,exports){ +},{"../src/traces/heatmapgl":869}],14:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -377,7 +344,7 @@ module.exports = require('../src/traces/heatmapgl'); module.exports = require('../src/traces/histogram'); -},{"../src/traces/histogram":929}],17:[function(require,module,exports){ +},{"../src/traces/histogram":877}],15:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -390,7 +357,7 @@ module.exports = require('../src/traces/histogram'); module.exports = require('../src/traces/histogram2d'); -},{"../src/traces/histogram2d":934}],18:[function(require,module,exports){ +},{"../src/traces/histogram2d":882}],16:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -403,7 +370,7 @@ module.exports = require('../src/traces/histogram2d'); module.exports = require('../src/traces/histogram2dcontour'); -},{"../src/traces/histogram2dcontour":938}],19:[function(require,module,exports){ +},{"../src/traces/histogram2dcontour":886}],17:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -442,10 +409,6 @@ Plotly.register([ require('./scattermapbox'), - require('./carpet'), - require('./scattercarpet'), - require('./contourcarpet'), - require('./ohlc'), require('./candlestick') ]); @@ -472,7 +435,7 @@ Plotly.register([ module.exports = Plotly; -},{"./bar":3,"./box":4,"./calendars":5,"./candlestick":6,"./carpet":7,"./choropleth":8,"./contour":9,"./contourcarpet":10,"./core":11,"./filter":12,"./groupby":13,"./heatmap":14,"./heatmapgl":15,"./histogram":16,"./histogram2d":17,"./histogram2dcontour":18,"./mesh3d":20,"./ohlc":21,"./parcoords":22,"./pie":23,"./pointcloud":24,"./scatter3d":25,"./scattercarpet":26,"./scattergeo":27,"./scattergl":28,"./scattermapbox":29,"./scatterternary":30,"./surface":31}],20:[function(require,module,exports){ +},{"./bar":3,"./box":4,"./calendars":5,"./candlestick":6,"./choropleth":7,"./contour":8,"./core":9,"./filter":10,"./groupby":11,"./heatmap":12,"./heatmapgl":13,"./histogram":14,"./histogram2d":15,"./histogram2dcontour":16,"./mesh3d":18,"./ohlc":19,"./parcoords":20,"./pie":21,"./pointcloud":22,"./scatter3d":23,"./scattergeo":24,"./scattergl":25,"./scattermapbox":26,"./scatterternary":27,"./surface":28}],18:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -485,7 +448,7 @@ module.exports = Plotly; module.exports = require('../src/traces/mesh3d'); -},{"../src/traces/mesh3d":942}],21:[function(require,module,exports){ +},{"../src/traces/mesh3d":890}],19:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -498,7 +461,7 @@ module.exports = require('../src/traces/mesh3d'); module.exports = require('../src/traces/ohlc'); -},{"../src/traces/ohlc":947}],22:[function(require,module,exports){ +},{"../src/traces/ohlc":895}],20:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -511,7 +474,7 @@ module.exports = require('../src/traces/ohlc'); module.exports = require('../src/traces/parcoords'); -},{"../src/traces/parcoords":956}],23:[function(require,module,exports){ +},{"../src/traces/parcoords":904}],21:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -524,7 +487,7 @@ module.exports = require('../src/traces/parcoords'); module.exports = require('../src/traces/pie'); -},{"../src/traces/pie":965}],24:[function(require,module,exports){ +},{"../src/traces/pie":913}],22:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -537,7 +500,7 @@ module.exports = require('../src/traces/pie'); module.exports = require('../src/traces/pointcloud'); -},{"../src/traces/pointcloud":974}],25:[function(require,module,exports){ +},{"../src/traces/pointcloud":922}],23:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -550,20 +513,7 @@ module.exports = require('../src/traces/pointcloud'); module.exports = require('../src/traces/scatter3d'); -},{"../src/traces/scatter3d":1004}],26:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = require('../src/traces/scattercarpet'); - -},{"../src/traces/scattercarpet":1009}],27:[function(require,module,exports){ +},{"../src/traces/scatter3d":952}],24:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -576,7 +526,7 @@ module.exports = require('../src/traces/scattercarpet'); module.exports = require('../src/traces/scattergeo'); -},{"../src/traces/scattergeo":1018}],28:[function(require,module,exports){ +},{"../src/traces/scattergeo":958}],25:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -589,7 +539,7 @@ module.exports = require('../src/traces/scattergeo'); module.exports = require('../src/traces/scattergl'); -},{"../src/traces/scattergl":1023}],29:[function(require,module,exports){ +},{"../src/traces/scattergl":963}],26:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -602,7 +552,7 @@ module.exports = require('../src/traces/scattergl'); module.exports = require('../src/traces/scattermapbox'); -},{"../src/traces/scattermapbox":1029}],30:[function(require,module,exports){ +},{"../src/traces/scattermapbox":970}],27:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -615,7 +565,7 @@ module.exports = require('../src/traces/scattermapbox'); module.exports = require('../src/traces/scatterternary'); -},{"../src/traces/scatterternary":1035}],31:[function(require,module,exports){ +},{"../src/traces/scatterternary":976}],28:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -628,7 +578,7 @@ module.exports = require('../src/traces/scatterternary'); module.exports = require('../src/traces/surface'); -},{"../src/traces/surface":1044}],32:[function(require,module,exports){ +},{"../src/traces/surface":985}],29:[function(require,module,exports){ 'use strict' module.exports = createCamera @@ -857,7 +807,7 @@ function createCamera(element, options) { return camera } -},{"3d-view":33,"mouse-change":434,"mouse-event-offset":435,"mouse-wheel":437,"right-now":483}],33:[function(require,module,exports){ +},{"3d-view":30,"mouse-change":431,"mouse-event-offset":432,"mouse-wheel":434,"right-now":480}],30:[function(require,module,exports){ 'use strict' module.exports = createViewController @@ -980,7 +930,7 @@ function createViewController(options) { matrix: matrix }, mode) } -},{"matrix-camera-controller":432,"orbit-camera-controller":454,"turntable-camera-controller":518}],34:[function(require,module,exports){ +},{"matrix-camera-controller":429,"orbit-camera-controller":451,"turntable-camera-controller":515}],31:[function(require,module,exports){ 'use strict' var weakMap = typeof WeakMap === 'undefined' ? require('weak-map') : WeakMap @@ -1011,7 +961,7 @@ function createABigTriangle(gl) { module.exports = createABigTriangle -},{"gl-buffer":141,"gl-vao":255,"weak-map":539}],35:[function(require,module,exports){ +},{"gl-buffer":138,"gl-vao":252,"weak-map":536}],32:[function(require,module,exports){ var padLeft = require('pad-left') module.exports = addLineNumbers @@ -1029,7 +979,7 @@ function addLineNumbers (string, start, delim) { }).join('\n') } -},{"pad-left":455}],36:[function(require,module,exports){ +},{"pad-left":452}],33:[function(require,module,exports){ 'use strict' module.exports = affineHull @@ -1081,7 +1031,7 @@ function affineHull(points) { } return index } -},{"robust-orientation":489}],37:[function(require,module,exports){ +},{"robust-orientation":486}],34:[function(require,module,exports){ 'use strict' module.exports = alphaComplex @@ -1098,7 +1048,7 @@ function alphaComplex(alpha, points) { return circumradius(simplex) * alpha < 1 }) } -},{"circumradius":80,"delaunay-triangulate":108}],38:[function(require,module,exports){ +},{"circumradius":77,"delaunay-triangulate":105}],35:[function(require,module,exports){ module.exports = alphaShape var ac = require('alpha-complex') @@ -1107,7 +1057,7 @@ var bnd = require('simplicial-complex-boundary') function alphaShape(alpha, points) { return bnd(ac(alpha, points)) } -},{"alpha-complex":37,"simplicial-complex-boundary":497}],39:[function(require,module,exports){ +},{"alpha-complex":34,"simplicial-complex-boundary":494}],36:[function(require,module,exports){ 'use strict'; var arraytools = function () { @@ -1296,7 +1246,7 @@ var arraytools = function () { module.exports = arraytools(); -},{}],40:[function(require,module,exports){ +},{}],37:[function(require,module,exports){ (function (global){ 'use strict'; @@ -1790,12 +1740,12 @@ var objectKeys = Object.keys || function (obj) { }; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"util/":529}],41:[function(require,module,exports){ +},{"util/":526}],38:[function(require,module,exports){ module.exports = function _atob(str) { return atob(str) } -},{}],42:[function(require,module,exports){ +},{}],39:[function(require,module,exports){ 'use strict' module.exports = barycentric @@ -1843,7 +1793,7 @@ function barycentric(simplex, point) { } return y } -},{"robust-linear-solve":488}],43:[function(require,module,exports){ +},{"robust-linear-solve":485}],40:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -1856,7 +1806,7 @@ function add(a, b) { a[1].mul(b[1])) } -},{"./lib/rationalize":53}],44:[function(require,module,exports){ +},{"./lib/rationalize":50}],41:[function(require,module,exports){ 'use strict' module.exports = cmp @@ -1865,7 +1815,7 @@ function cmp(a, b) { return a[0].mul(b[1]).cmp(b[0].mul(a[1])) } -},{}],45:[function(require,module,exports){ +},{}],42:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -1876,7 +1826,7 @@ function div(a, b) { return rationalize(a[0].mul(b[1]), a[1].mul(b[0])) } -},{"./lib/rationalize":53}],46:[function(require,module,exports){ +},{"./lib/rationalize":50}],43:[function(require,module,exports){ 'use strict' var isRat = require('./is-rat') @@ -1938,7 +1888,7 @@ function makeRational(numer, denom) { return rationalize(a, b) } -},{"./div":45,"./is-rat":47,"./lib/is-bn":51,"./lib/num-to-bn":52,"./lib/rationalize":53,"./lib/str-to-bn":54}],47:[function(require,module,exports){ +},{"./div":42,"./is-rat":44,"./lib/is-bn":48,"./lib/num-to-bn":49,"./lib/rationalize":50,"./lib/str-to-bn":51}],44:[function(require,module,exports){ 'use strict' var isBN = require('./lib/is-bn') @@ -1949,7 +1899,7 @@ function isRat(x) { return Array.isArray(x) && x.length === 2 && isBN(x[0]) && isBN(x[1]) } -},{"./lib/is-bn":51}],48:[function(require,module,exports){ +},{"./lib/is-bn":48}],45:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -1960,7 +1910,7 @@ function sign (x) { return x.cmp(new BN(0)) } -},{"bn.js":61}],49:[function(require,module,exports){ +},{"bn.js":58}],46:[function(require,module,exports){ 'use strict' var sign = require('./bn-sign') @@ -1985,7 +1935,7 @@ function bn2num(b) { return sign(b) * out } -},{"./bn-sign":48}],50:[function(require,module,exports){ +},{"./bn-sign":45}],47:[function(require,module,exports){ 'use strict' var db = require('double-bits') @@ -2006,7 +1956,7 @@ function ctzNumber(x) { return h + 32 } -},{"bit-twiddle":60,"double-bits":109}],51:[function(require,module,exports){ +},{"bit-twiddle":57,"double-bits":106}],48:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2019,7 +1969,7 @@ function isBN(x) { return x && typeof x === 'object' && Boolean(x.words) } -},{"bn.js":61}],52:[function(require,module,exports){ +},{"bn.js":58}],49:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2036,7 +1986,7 @@ function num2bn(x) { } } -},{"bn.js":61,"double-bits":109}],53:[function(require,module,exports){ +},{"bn.js":58,"double-bits":106}],50:[function(require,module,exports){ 'use strict' var num2bn = require('./num-to-bn') @@ -2064,7 +2014,7 @@ function rationalize(numer, denom) { return [ numer, denom ] } -},{"./bn-sign":48,"./num-to-bn":52}],54:[function(require,module,exports){ +},{"./bn-sign":45,"./num-to-bn":49}],51:[function(require,module,exports){ 'use strict' var BN = require('bn.js') @@ -2075,7 +2025,7 @@ function str2BN(x) { return new BN(x) } -},{"bn.js":61}],55:[function(require,module,exports){ +},{"bn.js":58}],52:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2086,7 +2036,7 @@ function mul(a, b) { return rationalize(a[0].mul(b[0]), a[1].mul(b[1])) } -},{"./lib/rationalize":53}],56:[function(require,module,exports){ +},{"./lib/rationalize":50}],53:[function(require,module,exports){ 'use strict' var bnsign = require('./lib/bn-sign') @@ -2097,7 +2047,7 @@ function sign(x) { return bnsign(x[0]) * bnsign(x[1]) } -},{"./lib/bn-sign":48}],57:[function(require,module,exports){ +},{"./lib/bn-sign":45}],54:[function(require,module,exports){ 'use strict' var rationalize = require('./lib/rationalize') @@ -2108,7 +2058,7 @@ function sub(a, b) { return rationalize(a[0].mul(b[1]).sub(a[1].mul(b[0])), a[1].mul(b[1])) } -},{"./lib/rationalize":53}],58:[function(require,module,exports){ +},{"./lib/rationalize":50}],55:[function(require,module,exports){ 'use strict' var bn2num = require('./lib/bn-to-num') @@ -2146,7 +2096,7 @@ function roundRat (f) { } } -},{"./lib/bn-to-num":49,"./lib/ctz":50}],59:[function(require,module,exports){ +},{"./lib/bn-to-num":46,"./lib/ctz":47}],56:[function(require,module,exports){ "use strict" function compileSearch(funcName, predicate, reversed, extraArgs, useNdarray, earlyOut) { @@ -2208,7 +2158,7 @@ module.exports = { eq: compileBoundsSearch("-", true, "EQ", true) } -},{}],60:[function(require,module,exports){ +},{}],57:[function(require,module,exports){ /** * Bit twiddling hacks for JavaScript. * @@ -2414,7 +2364,7 @@ exports.nextCombination = function(v) { } -},{}],61:[function(require,module,exports){ +},{}],58:[function(require,module,exports){ (function (module, exports) { 'use strict'; @@ -5843,7 +5793,7 @@ exports.nextCombination = function(v) { }; })(typeof module === 'undefined' || module, this); -},{}],62:[function(require,module,exports){ +},{}],59:[function(require,module,exports){ 'use strict' module.exports = boundary @@ -5879,7 +5829,7 @@ function boundary (cells) { return result } -},{}],63:[function(require,module,exports){ +},{}],60:[function(require,module,exports){ 'use strict' module.exports = boxIntersectWrapper @@ -6018,7 +5968,7 @@ function boxIntersectWrapper(arg0, arg1, arg2) { throw new Error('box-intersect: Invalid arguments') } } -},{"./lib/intersect":65,"./lib/sweep":69,"typedarray-pool":521}],64:[function(require,module,exports){ +},{"./lib/intersect":62,"./lib/sweep":66,"typedarray-pool":518}],61:[function(require,module,exports){ 'use strict' var DIMENSION = 'd' @@ -6163,7 +6113,7 @@ function bruteForcePlanner(full) { exports.partial = bruteForcePlanner(false) exports.full = bruteForcePlanner(true) -},{}],65:[function(require,module,exports){ +},{}],62:[function(require,module,exports){ 'use strict' module.exports = boxIntersectIter @@ -6658,7 +6608,7 @@ function boxIntersectIter( } } } -},{"./brute":64,"./median":66,"./partition":67,"./sweep":69,"bit-twiddle":60,"typedarray-pool":521}],66:[function(require,module,exports){ +},{"./brute":61,"./median":63,"./partition":64,"./sweep":66,"bit-twiddle":57,"typedarray-pool":518}],63:[function(require,module,exports){ 'use strict' module.exports = findMedian @@ -6801,7 +6751,7 @@ function findMedian(d, axis, start, end, boxes, ids) { start, mid, boxes, ids, boxes[elemSize*mid+axis]) } -},{"./partition":67}],67:[function(require,module,exports){ +},{"./partition":64}],64:[function(require,module,exports){ 'use strict' module.exports = genPartition @@ -6822,7 +6772,7 @@ function genPartition(predicate, args) { .replace('$', predicate)) return Function.apply(void 0, fargs) } -},{}],68:[function(require,module,exports){ +},{}],65:[function(require,module,exports){ 'use strict'; //This code is extracted from ndarray-sort @@ -7059,7 +7009,7 @@ function quickSort(left, right, data) { quickSort(less, great, data); } } -},{}],69:[function(require,module,exports){ +},{}],66:[function(require,module,exports){ 'use strict' module.exports = { @@ -7494,7 +7444,7 @@ red_loop: } } } -},{"./sort":68,"bit-twiddle":60,"typedarray-pool":521}],70:[function(require,module,exports){ +},{"./sort":65,"bit-twiddle":57,"typedarray-pool":518}],67:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -7749,8 +7699,8 @@ function fromObject (obj) { } if (obj) { - if (isArrayBufferView(obj) || 'length' in obj) { - if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + if (ArrayBuffer.isView(obj) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { return createBuffer(0) } return fromArrayLike(obj) @@ -7861,7 +7811,7 @@ function byteLength (string, encoding) { if (Buffer.isBuffer(string)) { return string.length } - if (isArrayBufferView(string) || string instanceof ArrayBuffer) { + if (ArrayBuffer.isView(string) || string instanceof ArrayBuffer) { return string.byteLength } if (typeof string !== 'string') { @@ -8127,7 +8077,7 @@ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { byteOffset = -0x80000000 } byteOffset = +byteOffset // Coerce to Number. - if (numberIsNaN(byteOffset)) { + if (isNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : (buffer.length - 1) } @@ -8258,7 +8208,7 @@ function hexWrite (buf, string, offset, length) { } for (var i = 0; i < length; ++i) { var parsed = parseInt(string.substr(i * 2, 2), 16) - if (numberIsNaN(parsed)) return i + if (isNaN(parsed)) return i buf[offset + i] = parsed } return i @@ -9061,7 +9011,7 @@ var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g function base64clean (str) { // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = str.trim().replace(INVALID_BASE64_RE, '') + str = stringtrim(str).replace(INVALID_BASE64_RE, '') // Node converts strings with length < 2 to '' if (str.length < 2) return '' // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not @@ -9071,6 +9021,11 @@ function base64clean (str) { return str } +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + function toHex (n) { if (n < 16) return '0' + n.toString(16) return n.toString(16) @@ -9193,16 +9148,11 @@ function blitBuffer (src, dst, offset, length) { return i } -// Node 0.10 supports `ArrayBuffer` but lacks `ArrayBuffer.isView` -function isArrayBufferView (obj) { - return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj) +function isnan (val) { + return val !== val // eslint-disable-line no-self-compare } -function numberIsNaN (obj) { - return obj !== obj // eslint-disable-line no-self-compare -} - -},{"base64-js":71,"ieee754":272}],71:[function(require,module,exports){ +},{"base64-js":68,"ieee754":269}],68:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -9318,7 +9268,7 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],72:[function(require,module,exports){ +},{}],69:[function(require,module,exports){ 'use strict' var monotoneTriangulate = require('./lib/monotone') @@ -9402,7 +9352,7 @@ function cdt2d(points, edges, options) { } } -},{"./lib/delaunay":73,"./lib/filter":74,"./lib/monotone":75,"./lib/triangulation":76}],73:[function(require,module,exports){ +},{"./lib/delaunay":70,"./lib/filter":71,"./lib/monotone":72,"./lib/triangulation":73}],70:[function(require,module,exports){ 'use strict' var inCircle = require('robust-in-sphere')[4] @@ -9519,7 +9469,7 @@ function delaunayRefine(points, triangulation) { } } -},{"binary-search-bounds":77,"robust-in-sphere":487}],74:[function(require,module,exports){ +},{"binary-search-bounds":74,"robust-in-sphere":484}],71:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9701,7 +9651,7 @@ function classifyFaces(triangulation, target, infinity) { return result } -},{"binary-search-bounds":77}],75:[function(require,module,exports){ +},{"binary-search-bounds":74}],72:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9890,7 +9840,7 @@ function monotoneTriangulate(points, edges) { return cells } -},{"binary-search-bounds":77,"robust-orientation":489}],76:[function(require,module,exports){ +},{"binary-search-bounds":74,"robust-orientation":486}],73:[function(require,module,exports){ 'use strict' var bsearch = require('binary-search-bounds') @@ -9996,7 +9946,7 @@ function createTriangulation(numVerts, edges) { return new Triangulation(stars, edges) } -},{"binary-search-bounds":77}],77:[function(require,module,exports){ +},{"binary-search-bounds":74}],74:[function(require,module,exports){ "use strict" function compileSearch(funcName, predicate, reversed, extraArgs, earlyOut) { @@ -10050,7 +10000,7 @@ module.exports = { eq: compileBoundsSearch("-", true, "EQ", true) } -},{}],78:[function(require,module,exports){ +},{}],75:[function(require,module,exports){ 'use strict' module.exports = orientation @@ -10069,7 +10019,7 @@ function orientation(s) { return p } -},{}],79:[function(require,module,exports){ +},{}],76:[function(require,module,exports){ "use strict" var dup = require("dup") @@ -10138,7 +10088,7 @@ function circumcenter(points) { circumcenter.barycenetric = barycentricCircumcenter module.exports = circumcenter -},{"dup":110,"robust-linear-solve":488}],80:[function(require,module,exports){ +},{"dup":107,"robust-linear-solve":485}],77:[function(require,module,exports){ module.exports = circumradius var circumcenter = require('circumcenter') @@ -10154,7 +10104,7 @@ function circumradius(points) { } return Math.sqrt(avgDist / points.length) } -},{"circumcenter":79}],81:[function(require,module,exports){ +},{"circumcenter":76}],78:[function(require,module,exports){ module.exports = clamp function clamp(value, min, max) { @@ -10163,7 +10113,7 @@ function clamp(value, min, max) { : (value < max ? max : value > min ? min : value) } -},{}],82:[function(require,module,exports){ +},{}],79:[function(require,module,exports){ 'use strict' module.exports = cleanPSLG @@ -10546,7 +10496,7 @@ function cleanPSLG (points, edges, colors) { return modified } -},{"./lib/rat-seg-intersect":83,"big-rat":46,"big-rat/cmp":44,"big-rat/to-float":58,"box-intersect":63,"nextafter":450,"rat-vec":476,"robust-segment-intersect":492,"union-find":522}],83:[function(require,module,exports){ +},{"./lib/rat-seg-intersect":80,"big-rat":43,"big-rat/cmp":41,"big-rat/to-float":55,"box-intersect":60,"nextafter":447,"rat-vec":473,"robust-segment-intersect":489,"union-find":519}],80:[function(require,module,exports){ 'use strict' module.exports = solveIntersection @@ -10590,7 +10540,7 @@ function solveIntersection (a, b, c, d) { return r } -},{"big-rat/div":45,"big-rat/mul":55,"big-rat/sign":56,"big-rat/sub":57,"rat-vec/add":475,"rat-vec/muls":477,"rat-vec/sub":478}],84:[function(require,module,exports){ +},{"big-rat/div":42,"big-rat/mul":52,"big-rat/sign":53,"big-rat/sub":54,"rat-vec/add":472,"rat-vec/muls":474,"rat-vec/sub":475}],81:[function(require,module,exports){ (function (Buffer){ var clone = (function() { 'use strict'; @@ -10754,7 +10704,7 @@ if (typeof module === 'object' && module.exports) { } }).call(this,require("buffer").Buffer) -},{"buffer":70}],85:[function(require,module,exports){ +},{"buffer":67}],82:[function(require,module,exports){ /** @module color-number */ 'use strict' @@ -10788,7 +10738,7 @@ function toNumber (rgba, normalized) { return n } -},{"clamp":81}],86:[function(require,module,exports){ +},{"clamp":78}],83:[function(require,module,exports){ module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], @@ -10939,7 +10889,7 @@ module.exports = { "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; -},{}],87:[function(require,module,exports){ +},{}],84:[function(require,module,exports){ /** * @module color-parse */ @@ -11116,7 +11066,7 @@ function parse (cstr) { }; } -},{"color-name":86,"is-plain-obj":279}],88:[function(require,module,exports){ +},{"color-name":83,"is-plain-obj":276}],85:[function(require,module,exports){ /** @module color-rgba */ 'use strict' @@ -11155,7 +11105,7 @@ module.exports = function rgba (color, normalize) { } -},{"clamp":81,"color-parse":87,"color-space/hsl":89}],89:[function(require,module,exports){ +},{"clamp":78,"color-parse":84,"color-space/hsl":86}],86:[function(require,module,exports){ /** * @module color-space/hsl */ @@ -11264,7 +11214,7 @@ rgb.hsl = function(rgb) { return [h, s * 100, l * 100]; }; -},{"./rgb":90}],90:[function(require,module,exports){ +},{"./rgb":87}],87:[function(require,module,exports){ /** * RGB space. * @@ -11280,7 +11230,7 @@ module.exports = { alias: ['RGB'] }; -},{}],91:[function(require,module,exports){ +},{}],88:[function(require,module,exports){ module.exports={ "jet":[{"index":0,"rgb":[0,0,131]},{"index":0.125,"rgb":[0,60,170]},{"index":0.375,"rgb":[5,255,255]},{"index":0.625,"rgb":[255,255,0]},{"index":0.875,"rgb":[250,0,0]},{"index":1,"rgb":[128,0,0]}], @@ -11373,7 +11323,7 @@ module.exports={ "cubehelix": [{"index":0,"rgb":[0,0,0]},{"index":0.07,"rgb":[22,5,59]},{"index":0.13,"rgb":[60,4,105]},{"index":0.2,"rgb":[109,1,135]},{"index":0.27,"rgb":[161,0,147]},{"index":0.33,"rgb":[210,2,142]},{"index":0.4,"rgb":[251,11,123]},{"index":0.47,"rgb":[255,29,97]},{"index":0.53,"rgb":[255,54,69]},{"index":0.6,"rgb":[255,85,46]},{"index":0.67,"rgb":[255,120,34]},{"index":0.73,"rgb":[255,157,37]},{"index":0.8,"rgb":[241,191,57]},{"index":0.87,"rgb":[224,220,93]},{"index":0.93,"rgb":[218,241,142]},{"index":1,"rgb":[227,253,198]}] }; -},{}],92:[function(require,module,exports){ +},{}],89:[function(require,module,exports){ /* * Ben Postlethwaite * January 2013 @@ -11510,7 +11460,7 @@ function rgbaStr (rgba) { return 'rgba(' + rgba.join(',') + ')'; } -},{"./colorScales":91,"arraytools":39,"clone":84}],93:[function(require,module,exports){ +},{"./colorScales":88,"arraytools":36,"clone":81}],90:[function(require,module,exports){ "use strict" module.exports = compareAngle @@ -11596,7 +11546,7 @@ function compareAngle(a, b, c, d) { } } } -},{"robust-orientation":489,"robust-product":490,"robust-sum":494,"signum":496,"two-sum":520}],94:[function(require,module,exports){ +},{"robust-orientation":486,"robust-product":487,"robust-sum":491,"signum":493,"two-sum":517}],91:[function(require,module,exports){ module.exports = compareCells var min = Math.min @@ -11652,7 +11602,7 @@ function compareCells(a, b) { } } -},{}],95:[function(require,module,exports){ +},{}],92:[function(require,module,exports){ 'use strict' var compareCells = require('compare-cell') @@ -11664,7 +11614,7 @@ function compareOrientedCells(a, b) { return compareCells(a, b) || parity(a) - parity(b) } -},{"cell-orientation":78,"compare-cell":94}],96:[function(require,module,exports){ +},{"cell-orientation":75,"compare-cell":91}],93:[function(require,module,exports){ "use strict" var convexHull1d = require('./lib/ch1d') @@ -11690,7 +11640,7 @@ function convexHull(points) { } return convexHullnd(points, d) } -},{"./lib/ch1d":97,"./lib/ch2d":98,"./lib/chnd":99}],97:[function(require,module,exports){ +},{"./lib/ch1d":94,"./lib/ch2d":95,"./lib/chnd":96}],94:[function(require,module,exports){ "use strict" module.exports = convexHull1d @@ -11714,7 +11664,7 @@ function convexHull1d(points) { return [[lo]] } } -},{}],98:[function(require,module,exports){ +},{}],95:[function(require,module,exports){ 'use strict' module.exports = convexHull2D @@ -11737,7 +11687,7 @@ function convexHull2D(points) { return edges } -},{"monotone-convex-hull-2d":433}],99:[function(require,module,exports){ +},{"monotone-convex-hull-2d":430}],96:[function(require,module,exports){ 'use strict' module.exports = convexHullnD @@ -11798,7 +11748,7 @@ function convexHullnD(points, d) { return invPermute(nhull, ah) } } -},{"affine-hull":36,"incremental-convex-hull":273}],100:[function(require,module,exports){ +},{"affine-hull":33,"incremental-convex-hull":270}],97:[function(require,module,exports){ module.exports = { AFG: 'afghan', ALA: '\\b\\wland', @@ -12057,7 +12007,7 @@ module.exports = { ZWE: 'zimbabwe|^(?!.*northern).*rhodesia' } -},{}],101:[function(require,module,exports){ +},{}],98:[function(require,module,exports){ // (c) Dean McNamee , 2012. // // https://github.com/deanm/css-color-parser-js @@ -12260,7 +12210,7 @@ function parseCSSColor(css_str) { try { exports.parseCSSColor = parseCSSColor } catch(e) { } -},{}],102:[function(require,module,exports){ +},{}],99:[function(require,module,exports){ "use strict" function dcubicHermite(p0, v0, p1, v1, t, f) { @@ -12300,7 +12250,7 @@ function cubicHermite(p0, v0, p1, v1, t, f) { module.exports = cubicHermite module.exports.derivative = dcubicHermite -},{}],103:[function(require,module,exports){ +},{}],100:[function(require,module,exports){ "use strict" var createThunk = require("./lib/thunk.js") @@ -12411,7 +12361,7 @@ function compileCwise(user_args) { module.exports = compileCwise -},{"./lib/thunk.js":105}],104:[function(require,module,exports){ +},{"./lib/thunk.js":102}],101:[function(require,module,exports){ "use strict" var uniq = require("uniq") @@ -12767,7 +12717,7 @@ function generateCWiseOp(proc, typesig) { } module.exports = generateCWiseOp -},{"uniq":523}],105:[function(require,module,exports){ +},{"uniq":520}],102:[function(require,module,exports){ "use strict" // The function below is called when constructing a cwise function object, and does the following: @@ -12855,9 +12805,9 @@ function createThunk(proc) { module.exports = createThunk -},{"./compile.js":104}],106:[function(require,module,exports){ +},{"./compile.js":101}],103:[function(require,module,exports){ module.exports = require("cwise-compiler") -},{"cwise-compiler":103}],107:[function(require,module,exports){ +},{"cwise-compiler":100}],104:[function(require,module,exports){ !function() { var d3 = { version: "3.5.17" @@ -22412,7 +22362,7 @@ module.exports = require("cwise-compiler") }); if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3; }(); -},{}],108:[function(require,module,exports){ +},{}],105:[function(require,module,exports){ "use strict" var ch = require("incremental-convex-hull") @@ -22572,7 +22522,7 @@ function triangulate(points, includePointAtInfinity) { return hull } -},{"incremental-convex-hull":273,"uniq":523}],109:[function(require,module,exports){ +},{"incremental-convex-hull":270,"uniq":520}],106:[function(require,module,exports){ (function (Buffer){ var hasTypedArrays = false if(typeof Float64Array !== "undefined") { @@ -22676,7 +22626,7 @@ module.exports.denormalized = function(n) { return !(hi & 0x7ff00000) } }).call(this,require("buffer").Buffer) -},{"buffer":70}],110:[function(require,module,exports){ +},{"buffer":67}],107:[function(require,module,exports){ "use strict" function dupe_array(count, value, i) { @@ -22726,7 +22676,7 @@ function dupe(count, value) { } module.exports = dupe -},{}],111:[function(require,module,exports){ +},{}],108:[function(require,module,exports){ 'use strict'; module.exports = earcut; @@ -23372,7 +23322,7 @@ earcut.flatten = function (data) { return result; }; -},{}],112:[function(require,module,exports){ +},{}],109:[function(require,module,exports){ "use strict" module.exports = edgeToAdjacency @@ -23406,7 +23356,7 @@ function edgeToAdjacency(edges, numVertices) { } return adj } -},{"uniq":523}],113:[function(require,module,exports){ +},{"uniq":520}],110:[function(require,module,exports){ (function (process,global){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. @@ -24563,7 +24513,7 @@ return Promise; }))); }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":468}],114:[function(require,module,exports){ +},{"_process":465}],111:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -24867,7 +24817,7 @@ function isUndefined(arg) { return arg === void 0; } -},{}],115:[function(require,module,exports){ +},{}],112:[function(require,module,exports){ "use strict" module.exports = extractPlanes @@ -24884,7 +24834,7 @@ function extractPlanes(M, zNear, zFar) { [ zf*M[12] - M[8], zf*M[13] - M[9], zf*M[14] - M[10], zf*M[15] - M[11] ] ] } -},{}],116:[function(require,module,exports){ +},{}],113:[function(require,module,exports){ /** * inspired by is-number * but significantly simplified and sped up by ignoring number and string constructors @@ -24941,7 +24891,7 @@ module.exports = function(n) { return n - n < 1; }; -},{}],117:[function(require,module,exports){ +},{}],114:[function(require,module,exports){ 'use strict'; module.exports = createFilter; @@ -25025,7 +24975,7 @@ function compare(a, b) { return a < b ? -1 : a > b ? 1 : 0; } -},{}],118:[function(require,module,exports){ +},{}],115:[function(require,module,exports){ 'use strict' module.exports = createFilteredVector @@ -25318,7 +25268,7 @@ function createFilteredVector(initState, initVelocity, initTime) { } } -},{"binary-search-bounds":59,"cubic-hermite":102}],119:[function(require,module,exports){ +},{"binary-search-bounds":56,"cubic-hermite":99}],116:[function(require,module,exports){ 'use strict' var SDF = require('tiny-sdf') @@ -25402,7 +25352,7 @@ function atlas(options) { return canvas } -},{"tiny-sdf":513}],120:[function(require,module,exports){ +},{"tiny-sdf":510}],117:[function(require,module,exports){ "use strict" module.exports = createRBTree @@ -26399,7 +26349,7 @@ function defaultCompare(a, b) { function createRBTree(compare) { return new RedBlackTree(compare || defaultCompare, null) } -},{}],121:[function(require,module,exports){ +},{}],118:[function(require,module,exports){ // transliterated from the python snippet here: // http://en.wikipedia.org/wiki/Lanczos_approximation @@ -26468,7 +26418,7 @@ module.exports = function gamma (z) { module.exports.log = lngamma; -},{}],122:[function(require,module,exports){ +},{}],119:[function(require,module,exports){ var wgs84 = require('wgs84'); module.exports.geometry = geometry; @@ -26534,7 +26484,7 @@ function rad(_) { return _ * Math.PI / 180; } -},{"wgs84":545}],123:[function(require,module,exports){ +},{"wgs84":542}],120:[function(require,module,exports){ var geojsonArea = require('geojson-area'); module.exports = rewind; @@ -26585,7 +26535,7 @@ function cw(_) { return geojsonArea.ring(_) >= 0; } -},{"geojson-area":122}],124:[function(require,module,exports){ +},{"geojson-area":119}],121:[function(require,module,exports){ 'use strict'; module.exports = clip; @@ -26736,7 +26686,7 @@ function newSlice(slices, slice, area, dist, outer) { return []; } -},{"./feature":126}],125:[function(require,module,exports){ +},{"./feature":123}],122:[function(require,module,exports){ 'use strict'; module.exports = convert; @@ -26859,7 +26809,7 @@ function calcSize(points) { points.dist = dist; } -},{"./feature":126,"./simplify":128}],126:[function(require,module,exports){ +},{"./feature":123,"./simplify":125}],123:[function(require,module,exports){ 'use strict'; module.exports = createFeature; @@ -26904,7 +26854,7 @@ function calcRingBBox(min, max, points) { } } -},{}],127:[function(require,module,exports){ +},{}],124:[function(require,module,exports){ 'use strict'; module.exports = geojsonvt; @@ -27148,7 +27098,7 @@ function isClippedSquare(tile, extent, buffer) { return true; } -},{"./clip":124,"./convert":125,"./tile":129,"./transform":130,"./wrap":131}],128:[function(require,module,exports){ +},{"./clip":121,"./convert":122,"./tile":126,"./transform":127,"./wrap":128}],125:[function(require,module,exports){ 'use strict'; module.exports = simplify; @@ -27224,7 +27174,7 @@ function getSqSegDist(p, a, b) { return dx * dx + dy * dy; } -},{}],129:[function(require,module,exports){ +},{}],126:[function(require,module,exports){ 'use strict'; module.exports = createTile; @@ -27332,7 +27282,7 @@ function signedArea(ring) { return sum; } -},{}],130:[function(require,module,exports){ +},{}],127:[function(require,module,exports){ 'use strict'; exports.tile = transformTile; @@ -27375,7 +27325,7 @@ function transformPoint(p, extent, z2, tx, ty) { return [x, y]; } -},{}],131:[function(require,module,exports){ +},{}],128:[function(require,module,exports){ 'use strict'; var clip = require('./clip'); @@ -27433,7 +27383,7 @@ function shiftCoords(points, offset) { return newPoints; } -},{"./clip":124,"./feature":126}],132:[function(require,module,exports){ +},{"./clip":121,"./feature":123}],129:[function(require,module,exports){ module.exports = getCanvasContext function getCanvasContext (type, opts) { if (typeof type !== 'string') { @@ -27473,7 +27423,7 @@ function getCanvasContext (type, opts) { return (gl || null) // ensure null on fail } -},{}],133:[function(require,module,exports){ +},{}],130:[function(require,module,exports){ 'use strict' module.exports = createAxes @@ -27996,7 +27946,7 @@ function createAxes(gl, options) { return axes } -},{"./lib/background.js":134,"./lib/cube.js":135,"./lib/lines.js":136,"./lib/text.js":138,"./lib/ticks.js":139}],134:[function(require,module,exports){ +},{"./lib/background.js":131,"./lib/cube.js":132,"./lib/lines.js":133,"./lib/text.js":135,"./lib/ticks.js":136}],131:[function(require,module,exports){ 'use strict' module.exports = createBackgroundCube @@ -28108,7 +28058,7 @@ function createBackgroundCube(gl) { return new BackgroundCube(gl, buffer, vao, shader) } -},{"./shaders":137,"gl-buffer":141,"gl-vao":255}],135:[function(require,module,exports){ +},{"./shaders":134,"gl-buffer":138,"gl-vao":252}],132:[function(require,module,exports){ "use strict" module.exports = getCubeEdges @@ -28349,7 +28299,7 @@ function getCubeEdges(model, view, projection, bounds) { //Return result return CUBE_RESULT } -},{"bit-twiddle":60,"gl-mat4/invert":165,"gl-mat4/multiply":167,"robust-orientation":489,"split-polygon":507}],136:[function(require,module,exports){ +},{"bit-twiddle":57,"gl-mat4/invert":162,"gl-mat4/multiply":164,"robust-orientation":486,"split-polygon":504}],133:[function(require,module,exports){ 'use strict' module.exports = createLines @@ -28555,7 +28505,7 @@ function createLines(gl, bounds, ticks) { return new Lines(gl, vertBuf, vao, shader, tickCount, tickOffset, gridCount, gridOffset) } -},{"./shaders":137,"gl-buffer":141,"gl-vao":255}],137:[function(require,module,exports){ +},{"./shaders":134,"gl-buffer":138,"gl-vao":252}],134:[function(require,module,exports){ 'use strict' @@ -28586,7 +28536,7 @@ exports.bg = function(gl) { ]) } -},{"gl-shader":239}],138:[function(require,module,exports){ +},{"gl-shader":236}],135:[function(require,module,exports){ (function (process){ "use strict" @@ -28788,7 +28738,7 @@ function createTextSprites( } }).call(this,require('_process')) -},{"./shaders":137,"_process":468,"gl-buffer":141,"gl-vao":255,"vectorize-text":534}],139:[function(require,module,exports){ +},{"./shaders":134,"_process":465,"gl-buffer":138,"gl-vao":252,"vectorize-text":531}],136:[function(require,module,exports){ 'use strict' exports.create = defaultTicks @@ -28869,7 +28819,7 @@ function ticksEqual(ticksA, ticksB) { } return true } -},{}],140:[function(require,module,exports){ +},{}],137:[function(require,module,exports){ "use strict" module.exports = axesProperties @@ -29011,7 +28961,7 @@ i_loop: return ranges } -},{"./lib/cube.js":135,"extract-frustum-planes":115,"gl-mat4/multiply":167,"gl-mat4/transpose":175,"gl-vec4/transformMat4":261,"split-polygon":507}],141:[function(require,module,exports){ +},{"./lib/cube.js":132,"extract-frustum-planes":112,"gl-mat4/multiply":164,"gl-mat4/transpose":172,"gl-vec4/transformMat4":258,"split-polygon":504}],138:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -29165,7 +29115,7 @@ function createBuffer(gl, data, type, usage) { module.exports = createBuffer -},{"ndarray":449,"ndarray-ops":443,"typedarray-pool":521}],142:[function(require,module,exports){ +},{"ndarray":446,"ndarray-ops":440,"typedarray-pool":518}],139:[function(require,module,exports){ module.exports = { 0: 'NONE', 1: 'ONE', @@ -29465,14 +29415,14 @@ module.exports = { 37444: 'BROWSER_DEFAULT_WEBGL' } -},{}],143:[function(require,module,exports){ +},{}],140:[function(require,module,exports){ var gl10 = require('./1.0/numbers') module.exports = function lookupConstant (number) { return gl10[number] } -},{"./1.0/numbers":142}],144:[function(require,module,exports){ +},{"./1.0/numbers":139}],141:[function(require,module,exports){ 'use strict' var createShader = require('gl-shader') @@ -29737,7 +29687,7 @@ function createError2D (plot, options) { return errorBars } -},{"./lib/shaders":145,"gl-buffer":141,"gl-shader":239,"typedarray-pool":521}],145:[function(require,module,exports){ +},{"./lib/shaders":142,"gl-buffer":138,"gl-shader":236,"typedarray-pool":518}],142:[function(require,module,exports){ module.exports = { @@ -29745,7 +29695,7 @@ module.exports = { fragment: "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n" } -},{}],146:[function(require,module,exports){ +},{}],143:[function(require,module,exports){ 'use strict' module.exports = createErrorBars @@ -29982,7 +29932,7 @@ function createErrorBars(options) { return result } -},{"./shaders/index":147,"gl-buffer":141,"gl-vao":255}],147:[function(require,module,exports){ +},{"./shaders/index":144,"gl-buffer":138,"gl-vao":252}],144:[function(require,module,exports){ 'use strict' @@ -29999,7 +29949,7 @@ module.exports = function(gl) { ]) } -},{"gl-shader":239}],148:[function(require,module,exports){ +},{"gl-shader":236}],145:[function(require,module,exports){ 'use strict' var createTexture = require('gl-texture2d') @@ -30466,7 +30416,7 @@ function createFBO(gl, width, height, options) { WEBGL_draw_buffers) } -},{"gl-texture2d":251}],149:[function(require,module,exports){ +},{"gl-texture2d":248}],146:[function(require,module,exports){ var sprintf = require('sprintf-js').sprintf; var glConstants = require('gl-constants/lookup'); @@ -30521,7 +30471,7 @@ function formatCompilerError(errLog, src, type) { } -},{"add-line-numbers":35,"gl-constants/lookup":143,"glsl-shader-name":263,"sprintf-js":508}],150:[function(require,module,exports){ +},{"add-line-numbers":32,"gl-constants/lookup":140,"glsl-shader-name":260,"sprintf-js":505}],147:[function(require,module,exports){ 'use strict' module.exports = createHeatmap2D @@ -30839,7 +30789,7 @@ function createHeatmap2D (plot, options) { return heatmap } -},{"./lib/shaders":151,"binary-search-bounds":152,"gl-buffer":141,"gl-shader":239,"iota-array":276,"typedarray-pool":521}],151:[function(require,module,exports){ +},{"./lib/shaders":148,"binary-search-bounds":149,"gl-buffer":138,"gl-shader":236,"iota-array":273,"typedarray-pool":518}],148:[function(require,module,exports){ 'use strict' @@ -30851,9 +30801,9 @@ module.exports = { pickVertex: "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nvoid main() {\n vWeight = weight;\n\n fragId = pickId;\n\n vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n" } -},{}],152:[function(require,module,exports){ -arguments[4][77][0].apply(exports,arguments) -},{"dup":77}],153:[function(require,module,exports){ +},{}],149:[function(require,module,exports){ +arguments[4][74][0].apply(exports,arguments) +},{"dup":74}],150:[function(require,module,exports){ exports.lineVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aHi, aLo, dHi, dLo;\n\nuniform vec2 scaleHi, translateHi, scaleLo, translateLo, screenShape;\nuniform float width;\n\nvarying vec2 direction;\n\n\nvec2 project_1_0(vec2 scHi, vec2 trHi, vec2 scLo, vec2 trLo, vec2 posHi, vec2 posLo) {\n return (posHi + trHi) * scHi\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo;\n}\n\n\nvec2 project_2_1(vec2 scHi, vec2 scLo, vec2 posHi, vec2 posLo) {\n return scHi * posHi\n + scLo * posHi\n + scHi * posLo\n + scLo * posLo;\n}\n\nvoid main() {\n vec2 p = project_1_0(scaleHi, translateHi, scaleLo, translateLo, aHi, aLo);\n vec2 dir = project_2_1(scaleHi, scaleLo, dHi, dLo);\n vec2 n = 0.5 * width * normalize(screenShape.yx * vec2(dir.y, -dir.x)) / screenShape.xy;\n vec2 tangent = normalize(screenShape.xy * dir);\n if(dir.x < 0.0 || (dir.x == 0.0 && dir.y < 0.0)) {\n direction = -tangent;\n } else {\n direction = tangent;\n }\n gl_Position = vec4(p + n, 0.0, 1.0);\n}" @@ -30864,7 +30814,7 @@ exports.pickVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute exports.pickFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 pickOffset;\n\nvarying vec4 pickA, pickB;\n\nvoid main() {\n vec4 fragId = vec4(pickA.xyz, 0.0);\n if(pickB.w > pickA.w) {\n fragId.xyz = pickB.xyz;\n }\n\n fragId += pickOffset;\n\n fragId.y += floor(fragId.x / 256.0);\n fragId.x -= floor(fragId.x / 256.0) * 256.0;\n\n fragId.z += floor(fragId.y / 256.0);\n fragId.y -= floor(fragId.y / 256.0) * 256.0;\n\n fragId.w += floor(fragId.z / 256.0);\n fragId.z -= floor(fragId.z / 256.0) * 256.0;\n\n gl_FragColor = fragId / 255.0;\n}" exports.fillVertex = "precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aHi, aLo, dHi;\n\nuniform vec2 scaleHi, translateHi, scaleLo, translateLo, projectAxis;\nuniform float projectValue, depth;\n\n\nvec2 project_1_0(vec2 scHi, vec2 trHi, vec2 scLo, vec2 trLo, vec2 posHi, vec2 posLo) {\n return (posHi + trHi) * scHi\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo;\n}\n\n\nvoid main() {\n vec2 p = project_1_0(scaleHi, translateHi, scaleLo, translateLo, aHi, aLo);\n if(dHi.y < 0.0 || (dHi.y == 0.0 && dHi.x < 0.0)) {\n if(dot(p, projectAxis) < projectValue) {\n p = p * (1.0 - abs(projectAxis)) + projectAxis * projectValue;\n }\n }\n gl_Position = vec4(p, depth, 1);\n}" exports.fillFragment = "precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}" -},{}],154:[function(require,module,exports){ +},{}],151:[function(require,module,exports){ 'use strict' module.exports = createLinePlot @@ -31377,7 +31327,7 @@ function createLinePlot(plot, options) { linePlot.update(options) return linePlot } -},{"./lib/shaders":153,"gl-buffer":141,"gl-shader":239,"gl-texture2d":251,"ndarray":449,"typedarray-pool":521}],155:[function(require,module,exports){ +},{"./lib/shaders":150,"gl-buffer":138,"gl-shader":236,"gl-texture2d":248,"ndarray":446,"typedarray-pool":518}],152:[function(require,module,exports){ var createShader = require('gl-shader') @@ -31401,7 +31351,7 @@ exports.createPickShader = function(gl) { return createShader(gl, vertSrc, pickFrag, null, ATTRIBUTES) } -},{"gl-shader":239}],156:[function(require,module,exports){ +},{"gl-shader":236}],153:[function(require,module,exports){ 'use strict' module.exports = createLinePlot @@ -31771,7 +31721,7 @@ function createLinePlot (options) { return linePlot } -},{"./lib/shaders":155,"binary-search-bounds":59,"gl-buffer":141,"gl-texture2d":251,"gl-vao":255,"glsl-read-float":262,"ndarray":449}],157:[function(require,module,exports){ +},{"./lib/shaders":152,"binary-search-bounds":56,"gl-buffer":138,"gl-texture2d":248,"gl-vao":252,"glsl-read-float":259,"ndarray":446}],154:[function(require,module,exports){ module.exports = invert /** @@ -31800,7 +31750,7 @@ function invert(out, a) { return out } -},{}],158:[function(require,module,exports){ +},{}],155:[function(require,module,exports){ module.exports = invert /** @@ -31839,7 +31789,7 @@ function invert(out, a) { return out } -},{}],159:[function(require,module,exports){ +},{}],156:[function(require,module,exports){ module.exports = clone; /** @@ -31868,7 +31818,7 @@ function clone(a) { out[15] = a[15]; return out; }; -},{}],160:[function(require,module,exports){ +},{}],157:[function(require,module,exports){ module.exports = create; /** @@ -31896,7 +31846,7 @@ function create() { out[15] = 1; return out; }; -},{}],161:[function(require,module,exports){ +},{}],158:[function(require,module,exports){ module.exports = determinant; /** @@ -31927,7 +31877,7 @@ function determinant(a) { // Calculate the determinant return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; }; -},{}],162:[function(require,module,exports){ +},{}],159:[function(require,module,exports){ module.exports = fromQuat; /** @@ -31975,7 +31925,7 @@ function fromQuat(out, q) { return out; }; -},{}],163:[function(require,module,exports){ +},{}],160:[function(require,module,exports){ module.exports = fromRotationTranslation; /** @@ -32029,7 +31979,7 @@ function fromRotationTranslation(out, q, v) { return out; }; -},{}],164:[function(require,module,exports){ +},{}],161:[function(require,module,exports){ module.exports = identity; /** @@ -32057,7 +32007,7 @@ function identity(out) { out[15] = 1; return out; }; -},{}],165:[function(require,module,exports){ +},{}],162:[function(require,module,exports){ module.exports = invert; /** @@ -32113,7 +32063,7 @@ function invert(out, a) { return out; }; -},{}],166:[function(require,module,exports){ +},{}],163:[function(require,module,exports){ var identity = require('./identity'); module.exports = lookAt; @@ -32204,7 +32154,7 @@ function lookAt(out, eye, center, up) { return out; }; -},{"./identity":164}],167:[function(require,module,exports){ +},{"./identity":161}],164:[function(require,module,exports){ module.exports = multiply; /** @@ -32247,7 +32197,7 @@ function multiply(out, a, b) { out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33; return out; }; -},{}],168:[function(require,module,exports){ +},{}],165:[function(require,module,exports){ module.exports = perspective; /** @@ -32281,7 +32231,7 @@ function perspective(out, fovy, aspect, near, far) { out[15] = 0; return out; }; -},{}],169:[function(require,module,exports){ +},{}],166:[function(require,module,exports){ module.exports = rotate; /** @@ -32346,7 +32296,7 @@ function rotate(out, a, rad, axis) { } return out; }; -},{}],170:[function(require,module,exports){ +},{}],167:[function(require,module,exports){ module.exports = rotateX; /** @@ -32391,7 +32341,7 @@ function rotateX(out, a, rad) { out[11] = a23 * c - a13 * s; return out; }; -},{}],171:[function(require,module,exports){ +},{}],168:[function(require,module,exports){ module.exports = rotateY; /** @@ -32436,7 +32386,7 @@ function rotateY(out, a, rad) { out[11] = a03 * s + a23 * c; return out; }; -},{}],172:[function(require,module,exports){ +},{}],169:[function(require,module,exports){ module.exports = rotateZ; /** @@ -32481,7 +32431,7 @@ function rotateZ(out, a, rad) { out[7] = a13 * c - a03 * s; return out; }; -},{}],173:[function(require,module,exports){ +},{}],170:[function(require,module,exports){ module.exports = scale; /** @@ -32513,7 +32463,7 @@ function scale(out, a, v) { out[15] = a[15]; return out; }; -},{}],174:[function(require,module,exports){ +},{}],171:[function(require,module,exports){ module.exports = translate; /** @@ -32552,7 +32502,7 @@ function translate(out, a, v) { return out; }; -},{}],175:[function(require,module,exports){ +},{}],172:[function(require,module,exports){ module.exports = transpose; /** @@ -32602,7 +32552,7 @@ function transpose(out, a) { return out; }; -},{}],176:[function(require,module,exports){ +},{}],173:[function(require,module,exports){ 'use strict' module.exports = invert @@ -32633,7 +32583,7 @@ function invert(out, M) { } return out } -},{"gl-mat2/invert":157,"gl-mat3/invert":158,"gl-mat4/invert":165}],177:[function(require,module,exports){ +},{"gl-mat2/invert":154,"gl-mat3/invert":155,"gl-mat4/invert":162}],174:[function(require,module,exports){ /** * @fileoverview gl-matrix - High performance matrix and vector operations * @author Brandon Jones @@ -32671,7 +32621,7 @@ exports.quat = require("./gl-matrix/quat.js"); exports.vec2 = require("./gl-matrix/vec2.js"); exports.vec3 = require("./gl-matrix/vec3.js"); exports.vec4 = require("./gl-matrix/vec4.js"); -},{"./gl-matrix/common.js":178,"./gl-matrix/mat2.js":179,"./gl-matrix/mat2d.js":180,"./gl-matrix/mat3.js":181,"./gl-matrix/mat4.js":182,"./gl-matrix/quat.js":183,"./gl-matrix/vec2.js":184,"./gl-matrix/vec3.js":185,"./gl-matrix/vec4.js":186}],178:[function(require,module,exports){ +},{"./gl-matrix/common.js":175,"./gl-matrix/mat2.js":176,"./gl-matrix/mat2d.js":177,"./gl-matrix/mat3.js":178,"./gl-matrix/mat4.js":179,"./gl-matrix/quat.js":180,"./gl-matrix/vec2.js":181,"./gl-matrix/vec3.js":182,"./gl-matrix/vec4.js":183}],175:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -32743,7 +32693,7 @@ glMatrix.equals = function(a, b) { module.exports = glMatrix; -},{}],179:[function(require,module,exports){ +},{}],176:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -33181,7 +33131,7 @@ mat2.multiplyScalarAndAdd = function(out, a, b, scale) { module.exports = mat2; -},{"./common.js":178}],180:[function(require,module,exports){ +},{"./common.js":175}],177:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -33652,7 +33602,7 @@ mat2d.equals = function (a, b) { module.exports = mat2d; -},{"./common.js":178}],181:[function(require,module,exports){ +},{"./common.js":175}],178:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34400,7 +34350,7 @@ mat3.equals = function (a, b) { module.exports = mat3; -},{"./common.js":178}],182:[function(require,module,exports){ +},{"./common.js":175}],179:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36538,7 +36488,7 @@ mat4.equals = function (a, b) { module.exports = mat4; -},{"./common.js":178}],183:[function(require,module,exports){ +},{"./common.js":175}],180:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -37140,7 +37090,7 @@ quat.equals = vec4.equals; module.exports = quat; -},{"./common.js":178,"./mat3.js":181,"./vec3.js":185,"./vec4.js":186}],184:[function(require,module,exports){ +},{"./common.js":175,"./mat3.js":178,"./vec3.js":182,"./vec4.js":183}],181:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -37729,7 +37679,7 @@ vec2.equals = function (a, b) { module.exports = vec2; -},{"./common.js":178}],185:[function(require,module,exports){ +},{"./common.js":175}],182:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -38508,7 +38458,7 @@ vec3.equals = function (a, b) { module.exports = vec3; -},{"./common.js":178}],186:[function(require,module,exports){ +},{"./common.js":175}],183:[function(require,module,exports){ /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -39119,7 +39069,7 @@ vec4.equals = function (a, b) { module.exports = vec4; -},{"./common.js":178}],187:[function(require,module,exports){ +},{"./common.js":175}],184:[function(require,module,exports){ 'use strict' var barycentric = require('barycentric') @@ -39217,7 +39167,7 @@ function closestPointToPickLocation(simplex, pixelCoord, model, view, projection } return [closestIndex, interpolate(simplex, weights), weights] } -},{"barycentric":42,"polytope-closest-point/lib/closest_point_2d.js":467}],188:[function(require,module,exports){ +},{"barycentric":39,"polytope-closest-point/lib/closest_point_2d.js":464}],185:[function(require,module,exports){ var triVertSrc = "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec4 m_position = model * vec4(position, 1.0);\n vec4 t_position = view * m_position;\n gl_Position = projection * t_position;\n f_color = color;\n f_normal = normal;\n f_data = position;\n f_eyeDirection = eyePosition - position;\n f_lightDirection = lightPosition - position;\n f_uv = uv;\n}" @@ -39286,7 +39236,7 @@ exports.contourShader = { ] } -},{}],189:[function(require,module,exports){ +},{}],186:[function(require,module,exports){ 'use strict' var DEFAULT_VERTEX_NORMALS_EPSILON = 1e-6; // may be too large if triangles are very small @@ -40301,7 +40251,7 @@ function createSimplicialMesh(params) { module.exports = createSimplicialMesh -},{"./lib/closest-point":187,"./lib/shaders":188,"colormap":92,"gl-buffer":141,"gl-mat4/invert":165,"gl-mat4/multiply":167,"gl-shader":239,"gl-texture2d":251,"gl-vao":255,"ndarray":449,"normals":451,"simplicial-complex-contour":498,"typedarray-pool":521}],190:[function(require,module,exports){ +},{"./lib/closest-point":184,"./lib/shaders":185,"colormap":89,"gl-buffer":138,"gl-mat4/invert":162,"gl-mat4/multiply":164,"gl-shader":236,"gl-texture2d":248,"gl-vao":252,"ndarray":446,"normals":448,"simplicial-complex-contour":495,"typedarray-pool":518}],187:[function(require,module,exports){ 'use strict' module.exports = createBoxes @@ -40364,7 +40314,7 @@ function createBoxes(plot) { return new Boxes(plot, vbo, shader) } -},{"./shaders":193,"gl-buffer":141,"gl-shader":196}],191:[function(require,module,exports){ +},{"./shaders":190,"gl-buffer":138,"gl-shader":193}],188:[function(require,module,exports){ 'use strict' module.exports = createGrid @@ -40611,7 +40561,7 @@ function createGrid(plot) { return grid } -},{"./shaders":193,"binary-search-bounds":195,"gl-buffer":141,"gl-shader":196}],192:[function(require,module,exports){ +},{"./shaders":190,"binary-search-bounds":192,"gl-buffer":138,"gl-shader":193}],189:[function(require,module,exports){ 'use strict' module.exports = createLines @@ -40676,7 +40626,7 @@ function createLines(plot) { return lines } -},{"./shaders":193,"gl-buffer":141,"gl-shader":196}],193:[function(require,module,exports){ +},{"./shaders":190,"gl-buffer":138,"gl-shader":193}],190:[function(require,module,exports){ 'use strict' @@ -40694,7 +40644,7 @@ module.exports = { tickVert: "precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\n\nvoid main() {\n vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\n}\n" } -},{}],194:[function(require,module,exports){ +},{}],191:[function(require,module,exports){ 'use strict' module.exports = createTextElements @@ -40972,9 +40922,9 @@ function createTextElements(plot) { return text } -},{"./shaders":193,"binary-search-bounds":195,"gl-buffer":141,"gl-shader":196,"text-cache":512}],195:[function(require,module,exports){ -arguments[4][77][0].apply(exports,arguments) -},{"dup":77}],196:[function(require,module,exports){ +},{"./shaders":190,"binary-search-bounds":192,"gl-buffer":138,"gl-shader":193,"text-cache":509}],192:[function(require,module,exports){ +arguments[4][74][0].apply(exports,arguments) +},{"dup":74}],193:[function(require,module,exports){ 'use strict' var createUniformWrapper = require('./lib/create-uniforms') @@ -41240,7 +41190,7 @@ function createShader( module.exports = createShader -},{"./lib/GLError":197,"./lib/create-attributes":198,"./lib/create-uniforms":199,"./lib/reflect":200,"./lib/runtime-reflect":201,"./lib/shader-cache":202}],197:[function(require,module,exports){ +},{"./lib/GLError":194,"./lib/create-attributes":195,"./lib/create-uniforms":196,"./lib/reflect":197,"./lib/runtime-reflect":198,"./lib/shader-cache":199}],194:[function(require,module,exports){ function GLError (rawError, shortMessage, longMessage) { this.shortMessage = shortMessage || '' this.longMessage = longMessage || '' @@ -41255,7 +41205,7 @@ GLError.prototype.name = 'GLError' GLError.prototype.constructor = GLError module.exports = GLError -},{}],198:[function(require,module,exports){ +},{}],195:[function(require,module,exports){ 'use strict' module.exports = createAttributeWrapper @@ -41520,7 +41470,7 @@ function createAttributeWrapper( return obj } -},{"./GLError":197}],199:[function(require,module,exports){ +},{"./GLError":194}],196:[function(require,module,exports){ 'use strict' var coallesceUniforms = require('./reflect') @@ -41713,7 +41663,7 @@ function createUniformWrapper(gl, wrapper, uniforms, locations) { } } -},{"./GLError":197,"./reflect":200}],200:[function(require,module,exports){ +},{"./GLError":194,"./reflect":197}],197:[function(require,module,exports){ 'use strict' module.exports = makeReflectTypes @@ -41771,7 +41721,7 @@ function makeReflectTypes(uniforms, useIndex) { } return obj } -},{}],201:[function(require,module,exports){ +},{}],198:[function(require,module,exports){ 'use strict' exports.uniforms = runtimeUniforms @@ -41851,7 +41801,7 @@ function runtimeAttributes(gl, program) { return result } -},{}],202:[function(require,module,exports){ +},{}],199:[function(require,module,exports){ 'use strict' exports.shader = getShaderReference @@ -41989,7 +41939,7 @@ function createProgram(gl, vref, fref, attribs, locations) { return getCache(gl).getProgram(vref, fref, attribs, locations) } -},{"./GLError":197,"gl-format-compiler-error":149,"weakmap-shim":542}],203:[function(require,module,exports){ +},{"./GLError":194,"gl-format-compiler-error":146,"weakmap-shim":539}],200:[function(require,module,exports){ 'use strict' module.exports = createGLPlot2D @@ -42570,783 +42520,784 @@ function createGLPlot2D(options) { return plot } -},{"./lib/box":190,"./lib/grid":191,"./lib/line":192,"./lib/text":194,"gl-select-static":238}],204:[function(require,module,exports){ - -var createShader = require('gl-shader') - -var vertSrc = "precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}" -var fragSrc = "precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}" - -module.exports = function(gl) { - return createShader(gl, vertSrc, fragSrc, null, [ { name: 'position', type: 'vec2'}]) -} +},{"./lib/box":187,"./lib/grid":188,"./lib/line":189,"./lib/text":191,"gl-select-static":235}],201:[function(require,module,exports){ -},{"gl-shader":239}],205:[function(require,module,exports){ -'use strict' - -module.exports = createScene - -var createCamera = require('3d-view-controls') -var createAxes = require('gl-axes3d') -var axesRanges = require('gl-axes3d/properties') -var createSpikes = require('gl-spikes3d') -var createSelect = require('gl-select-static') -var createFBO = require('gl-fbo') -var drawTriangle = require('a-big-triangle') -var mouseChange = require('mouse-change') -var perspective = require('gl-mat4/perspective') -var createShader = require('./lib/shader') -var isMobile = require('is-mobile')() - -function MouseSelect() { - this.mouse = [-1,-1] - this.screen = null - this.distance = Infinity - this.index = null - this.dataCoordinate = null - this.dataPosition = null - this.object = null - this.data = null -} - -function getContext(canvas, options) { - var gl = null - try { - gl = canvas.getContext('webgl', options) - if(!gl) { - gl = canvas.getContext('experimental-webgl', options) - } - } catch(e) { - return null - } - return gl -} - -function roundUpPow10(x) { - var y = Math.round(Math.log(Math.abs(x)) / Math.log(10)) - if(y < 0) { - var base = Math.round(Math.pow(10, -y)) - return Math.ceil(x*base) / base - } else if(y > 0) { - var base = Math.round(Math.pow(10, y)) - return Math.ceil(x/base) * base - } - return Math.ceil(x) -} - -function defaultBool(x) { - if(typeof x === 'boolean') { - return x - } - return true -} - -function createScene(options) { - options = options || {} - - var stopped = false - - var pixelRatio = options.pixelRatio || parseFloat(window.devicePixelRatio) - - var canvas = options.canvas - if(!canvas) { - canvas = document.createElement('canvas') - if(options.container) { - var container = options.container - container.appendChild(canvas) - } else { - document.body.appendChild(canvas) - } - } - - var gl = options.gl - if(!gl) { - gl = getContext(canvas, - options.glOptions || { - premultipliedAlpha: true, - antialias: true - }) - } - if(!gl) { - throw new Error('webgl not supported') - } - - //Initial bounds - var bounds = options.bounds || [[-10,-10,-10], [10,10,10]] - - //Create selection - var selection = new MouseSelect() - - //Accumulation buffer - var accumBuffer = createFBO(gl, - [gl.drawingBufferWidth, gl.drawingBufferHeight], { - preferFloat: !isMobile - }) - - var accumShader = createShader(gl) - - //Create a camera - var cameraOptions = options.camera || { - eye: [2,0,0], - center: [0,0,0], - up: [0,1,0], - zoomMin: 0.1, - zoomMax: 100, - mode: 'turntable' - } - - //Create axes - var axesOptions = options.axes || {} - var axes = createAxes(gl, axesOptions) - axes.enable = !axesOptions.disable - - //Create spikes - var spikeOptions = options.spikes || {} - var spikes = createSpikes(gl, spikeOptions) - - //Object list is empty initially - var objects = [] - var pickBufferIds = [] - var pickBufferCount = [] - var pickBuffers = [] - - //Dirty flag, skip redraw if scene static - var dirty = true - var pickDirty = true - - var projection = new Array(16) - var model = new Array(16) - - var cameraParams = { - view: null, - projection: projection, - model: model - } - - var pickDirty = true - - var viewShape = [ gl.drawingBufferWidth, gl.drawingBufferHeight ] - - //Create scene object - var scene = { - gl: gl, - contextLost: false, - pixelRatio: options.pixelRatio || parseFloat(window.devicePixelRatio), - canvas: canvas, - selection: selection, - camera: createCamera(canvas, cameraOptions), - axes: axes, - axesPixels: null, - spikes: spikes, - bounds: bounds, - objects: objects, - shape: viewShape, - aspect: options.aspectRatio || [1,1,1], - pickRadius: options.pickRadius || 10, - zNear: options.zNear || 0.01, - zFar: options.zFar || 1000, - fovy: options.fovy || Math.PI/4, - clearColor: options.clearColor || [0,0,0,0], - autoResize: defaultBool(options.autoResize), - autoBounds: defaultBool(options.autoBounds), - autoScale: !!options.autoScale, - autoCenter: defaultBool(options.autoCenter), - clipToBounds: defaultBool(options.clipToBounds), - snapToData: !!options.snapToData, - onselect: options.onselect || null, - onrender: options.onrender || null, - onclick: options.onclick || null, - cameraParams: cameraParams, - oncontextloss: null, - mouseListener: null - } - - var pickShape = [ (gl.drawingBufferWidth/scene.pixelRatio)|0, (gl.drawingBufferHeight/scene.pixelRatio)|0 ] - - function resizeListener() { - if(stopped) { - return - } - if(!scene.autoResize) { - return - } - var parent = canvas.parentNode - var width = 1 - var height = 1 - if(parent && parent !== document.body) { - width = parent.clientWidth - height = parent.clientHeight - } else { - width = window.innerWidth - height = window.innerHeight - } - var nextWidth = Math.ceil(width * scene.pixelRatio)|0 - var nextHeight = Math.ceil(height * scene.pixelRatio)|0 - if(nextWidth !== canvas.width || nextHeight !== canvas.height) { - canvas.width = nextWidth - canvas.height = nextHeight - var style = canvas.style - style.position = style.position || 'absolute' - style.left = '0px' - style.top = '0px' - style.width = width + 'px' - style.height = height + 'px' - dirty = true - } - } - if(scene.autoResize) { - resizeListener() - } - window.addEventListener('resize', resizeListener) - - function reallocPickIds() { - var numObjs = objects.length - var numPick = pickBuffers.length - for(var i=0; i 0 && pickBufferCount[numPick-1] === 0) { - pickBufferCount.pop() - pickBuffers.pop().dispose() - } - } - - scene.update = function(options) { - if(stopped) { - return - } - options = options || {} - dirty = true - pickDirty = true - } - - scene.add = function(obj) { - if(stopped) { - return - } - obj.axes = axes - objects.push(obj) - pickBufferIds.push(-1) - dirty = true - pickDirty = true - reallocPickIds() - } - - scene.remove = function(obj) { - if(stopped) { - return - } - var idx = objects.indexOf(obj) - if(idx < 0) { - return - } - objects.splice(idx, 1) - pickBufferIds.pop() - dirty = true - pickDirty = true - reallocPickIds() - } - - scene.dispose = function() { - if(stopped) { - return - } - - stopped = true - - window.removeEventListener('resize', resizeListener) - canvas.removeEventListener('webglcontextlost', checkContextLoss) - scene.mouseListener.enabled = false - - if(scene.contextLost) { - return - } - - //Destroy objects - axes.dispose() - spikes.dispose() - for(var i=0; i selection.distance) { - continue - } - for(var j=0; j 0) { + var base = Math.round(Math.pow(10, y)) + return Math.ceil(x/base) * base + } + return Math.ceil(x) +} + +function defaultBool(x) { + if(typeof x === 'boolean') { + return x + } + return true +} + +function createScene(options) { + options = options || {} + + var stopped = false + + var pixelRatio = options.pixelRatio || parseFloat(window.devicePixelRatio) + + var canvas = options.canvas + if(!canvas) { + canvas = document.createElement('canvas') + if(options.container) { + var container = options.container + container.appendChild(canvas) + } else { + document.body.appendChild(canvas) + } + } + + var gl = options.gl + if(!gl) { + gl = getContext(canvas, + options.glOptions || { + premultipliedAlpha: true, + antialias: true + }) + } + if(!gl) { + throw new Error('webgl not supported') + } + + //Initial bounds + var bounds = options.bounds || [[-10,-10,-10], [10,10,10]] + + //Create selection + var selection = new MouseSelect() + + //Accumulation buffer + var accumBuffer = createFBO(gl, + [gl.drawingBufferWidth, gl.drawingBufferHeight], { + preferFloat: !isMobile + }) + + var accumShader = createShader(gl) + + //Create a camera + var cameraOptions = options.camera || { + eye: [2,0,0], + center: [0,0,0], + up: [0,1,0], + zoomMin: 0.1, + zoomMax: 100, + mode: 'turntable' + } + + //Create axes + var axesOptions = options.axes || {} + var axes = createAxes(gl, axesOptions) + axes.enable = !axesOptions.disable + + //Create spikes + var spikeOptions = options.spikes || {} + var spikes = createSpikes(gl, spikeOptions) + + //Object list is empty initially + var objects = [] + var pickBufferIds = [] + var pickBufferCount = [] + var pickBuffers = [] + + //Dirty flag, skip redraw if scene static + var dirty = true + var pickDirty = true + + var projection = new Array(16) + var model = new Array(16) + + var cameraParams = { + view: null, + projection: projection, + model: model + } + + var pickDirty = true + + var viewShape = [ gl.drawingBufferWidth, gl.drawingBufferHeight ] + + //Create scene object + var scene = { + gl: gl, + contextLost: false, + pixelRatio: options.pixelRatio || parseFloat(window.devicePixelRatio), + canvas: canvas, + selection: selection, + camera: createCamera(canvas, cameraOptions), + axes: axes, + axesPixels: null, + spikes: spikes, + bounds: bounds, + objects: objects, + shape: viewShape, + aspect: options.aspectRatio || [1,1,1], + pickRadius: options.pickRadius || 10, + zNear: options.zNear || 0.01, + zFar: options.zFar || 1000, + fovy: options.fovy || Math.PI/4, + clearColor: options.clearColor || [0,0,0,0], + autoResize: defaultBool(options.autoResize), + autoBounds: defaultBool(options.autoBounds), + autoScale: !!options.autoScale, + autoCenter: defaultBool(options.autoCenter), + clipToBounds: defaultBool(options.clipToBounds), + snapToData: !!options.snapToData, + onselect: options.onselect || null, + onrender: options.onrender || null, + onclick: options.onclick || null, + cameraParams: cameraParams, + oncontextloss: null, + mouseListener: null + } + + var pickShape = [ (gl.drawingBufferWidth/scene.pixelRatio)|0, (gl.drawingBufferHeight/scene.pixelRatio)|0 ] + + function resizeListener() { + if(stopped) { + return + } + if(!scene.autoResize) { + return + } + var parent = canvas.parentNode + var width = 1 + var height = 1 + if(parent && parent !== document.body) { + width = parent.clientWidth + height = parent.clientHeight + } else { + width = window.innerWidth + height = window.innerHeight + } + var nextWidth = Math.ceil(width * scene.pixelRatio)|0 + var nextHeight = Math.ceil(height * scene.pixelRatio)|0 + if(nextWidth !== canvas.width || nextHeight !== canvas.height) { + canvas.width = nextWidth + canvas.height = nextHeight + var style = canvas.style + style.position = style.position || 'absolute' + style.left = '0px' + style.top = '0px' + style.width = width + 'px' + style.height = height + 'px' + dirty = true + } + } + if(scene.autoResize) { + resizeListener() + } + window.addEventListener('resize', resizeListener) + + function reallocPickIds() { + var numObjs = objects.length + var numPick = pickBuffers.length + for(var i=0; i 0 && pickBufferCount[numPick-1] === 0) { + pickBufferCount.pop() + pickBuffers.pop().dispose() + } + } + + scene.update = function(options) { + if(stopped) { + return + } + options = options || {} + dirty = true + pickDirty = true + } + + scene.add = function(obj) { + if(stopped) { + return + } + obj.axes = axes + objects.push(obj) + pickBufferIds.push(-1) + dirty = true + pickDirty = true + reallocPickIds() + } + + scene.remove = function(obj) { + if(stopped) { + return + } + var idx = objects.indexOf(obj) + if(idx < 0) { + return + } + objects.splice(idx, 1) + pickBufferIds.pop() + dirty = true + pickDirty = true + reallocPickIds() + } + + scene.dispose = function() { + if(stopped) { + return + } + + stopped = true + + window.removeEventListener('resize', resizeListener) + canvas.removeEventListener('webglcontextlost', checkContextLoss) + scene.mouseListener.enabled = false + + if(scene.contextLost) { + return + } + + //Destroy objects + axes.dispose() + spikes.dispose() + for(var i=0; i selection.distance) { + continue + } + for(var j=0; j>=' @@ -49639,7 +49590,7 @@ module.exports = [ , '}' ] -},{}],270:[function(require,module,exports){ +},{}],267:[function(require,module,exports){ var tokenize = require('./index') module.exports = tokenizeString @@ -49654,7 +49605,7 @@ function tokenizeString(str, opt) { return tokens } -},{"./index":264}],271:[function(require,module,exports){ +},{"./index":261}],268:[function(require,module,exports){ 'use strict'; module.exports = GridIndex; @@ -49816,7 +49767,7 @@ GridIndex.prototype.toArrayBuffer = function() { return array.buffer; }; -},{}],272:[function(require,module,exports){ +},{}],269:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -49902,7 +49853,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],273:[function(require,module,exports){ +},{}],270:[function(require,module,exports){ "use strict" //High level idea: @@ -50349,7 +50300,7 @@ function incrementalConvexHull(points, randomSearch) { //Extract boundary cells return triangles.boundary() } -},{"robust-orientation":489,"simplicial-complex":500}],274:[function(require,module,exports){ +},{"robust-orientation":486,"simplicial-complex":497}],271:[function(require,module,exports){ "use strict" var bounds = require("binary-search-bounds") @@ -50716,7 +50667,7 @@ function createWrapper(intervals) { return new IntervalTree(createIntervalTree(intervals)) } -},{"binary-search-bounds":59}],275:[function(require,module,exports){ +},{"binary-search-bounds":56}],272:[function(require,module,exports){ "use strict" function invertPermutation(pi, result) { @@ -50728,7 +50679,7 @@ function invertPermutation(pi, result) { } module.exports = invertPermutation -},{}],276:[function(require,module,exports){ +},{}],273:[function(require,module,exports){ "use strict" function iota(n) { @@ -50740,7 +50691,7 @@ function iota(n) { } module.exports = iota -},{}],277:[function(require,module,exports){ +},{}],274:[function(require,module,exports){ /*! * Determine if an object is a Buffer * @@ -50763,7 +50714,7 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],278:[function(require,module,exports){ +},{}],275:[function(require,module,exports){ module.exports = isMobile; function isMobile (ua) { @@ -50777,7 +50728,7 @@ function isMobile (ua) { } -},{}],279:[function(require,module,exports){ +},{}],276:[function(require,module,exports){ 'use strict'; var toString = Object.prototype.toString; @@ -50786,7 +50737,7 @@ module.exports = function (x) { return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({})); }; -},{}],280:[function(require,module,exports){ +},{}],277:[function(require,module,exports){ 'use strict'; var sort = require('./sort'); @@ -50832,7 +50783,7 @@ KDBush.prototype = { function defaultGetX(p) { return p[0]; } function defaultGetY(p) { return p[1]; } -},{"./range":281,"./sort":282,"./within":283}],281:[function(require,module,exports){ +},{"./range":278,"./sort":279,"./within":280}],278:[function(require,module,exports){ 'use strict'; module.exports = range; @@ -50880,7 +50831,7 @@ function range(ids, coords, minX, minY, maxX, maxY, nodeSize) { return result; } -},{}],282:[function(require,module,exports){ +},{}],279:[function(require,module,exports){ 'use strict'; module.exports = sortKD; @@ -50948,7 +50899,7 @@ function swap(arr, i, j) { arr[j] = tmp; } -},{}],283:[function(require,module,exports){ +},{}],280:[function(require,module,exports){ 'use strict'; module.exports = within; @@ -51000,7 +50951,7 @@ function sqDist(ax, ay, bx, by) { return dx * dx + dy * dy; } -},{}],284:[function(require,module,exports){ +},{}],281:[function(require,module,exports){ 'use strict'; function createFunction(parameters, defaultType) { @@ -51173,7 +51124,7 @@ module.exports['piecewise-constant'] = function(parameters) { return createFunction(parameters, 'interval'); }; -},{}],285:[function(require,module,exports){ +},{}],282:[function(require,module,exports){ var path = require('path'); @@ -51235,7 +51186,7 @@ module.exports = { module.exports.util = "float evaluate_zoom_function_1(const vec4 values, const float t) {\n if (t < 1.0) {\n return mix(values[0], values[1], t);\n } else if (t < 2.0) {\n return mix(values[1], values[2], t - 1.0);\n } else {\n return mix(values[2], values[3], t - 2.0);\n }\n}\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\n if (t < 1.0) {\n return mix(value0, value1, t);\n } else if (t < 2.0) {\n return mix(value1, value2, t - 1.0);\n } else {\n return mix(value2, value3, t - 2.0);\n }\n}\n"; -},{"path":457}],286:[function(require,module,exports){ +},{"path":454}],283:[function(require,module,exports){ 'use strict'; var format = require('util').format; @@ -51253,7 +51204,7 @@ function ValidationError(key, value /*, message, ...*/) { module.exports = ValidationError; -},{"util":529}],287:[function(require,module,exports){ +},{"util":526}],284:[function(require,module,exports){ 'use strict'; module.exports = function (output) { @@ -51266,7 +51217,7 @@ module.exports = function (output) { return output; }; -},{}],288:[function(require,module,exports){ +},{}],285:[function(require,module,exports){ 'use strict'; module.exports = function getType(val) { @@ -51285,7 +51236,7 @@ module.exports = function getType(val) { } }; -},{}],289:[function(require,module,exports){ +},{}],286:[function(require,module,exports){ 'use strict'; // Turn jsonlint-lines-primitives objects into primitive objects @@ -51297,7 +51248,7 @@ module.exports = function unbundle(value) { } }; -},{}],290:[function(require,module,exports){ +},{}],287:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51364,7 +51315,7 @@ module.exports = function validate(options) { } }; -},{"../error/validation_error":286,"../util/extend":287,"../util/get_type":288,"./validate_array":291,"./validate_boolean":292,"./validate_color":293,"./validate_constants":294,"./validate_enum":295,"./validate_filter":296,"./validate_function":297,"./validate_layer":299,"./validate_number":301,"./validate_object":302,"./validate_source":304,"./validate_string":305}],291:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/extend":284,"../util/get_type":285,"./validate_array":288,"./validate_boolean":289,"./validate_color":290,"./validate_constants":291,"./validate_enum":292,"./validate_filter":293,"./validate_function":294,"./validate_layer":296,"./validate_number":298,"./validate_object":299,"./validate_source":301,"./validate_string":302}],288:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -51418,7 +51369,7 @@ module.exports = function validateArray(options) { return errors; }; -},{"../error/validation_error":286,"../util/get_type":288,"./validate":290}],292:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285,"./validate":287}],289:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -51436,7 +51387,7 @@ module.exports = function validateBoolean(options) { return []; }; -},{"../error/validation_error":286,"../util/get_type":288}],293:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285}],290:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51459,7 +51410,7 @@ module.exports = function validateColor(options) { return []; }; -},{"../error/validation_error":286,"../util/get_type":288,"csscolorparser":101}],294:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285,"csscolorparser":98}],291:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51493,7 +51444,7 @@ module.exports = function validateConstants(options) { }; -},{"../error/validation_error":286,"../util/get_type":288}],295:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285}],292:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51511,7 +51462,7 @@ module.exports = function validateEnum(options) { return errors; }; -},{"../error/validation_error":286,"../util/unbundle_jsonlint":289}],296:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/unbundle_jsonlint":286}],293:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51616,7 +51567,7 @@ module.exports = function validateFilter(options) { return errors; }; -},{"../error/validation_error":286,"../util/get_type":288,"../util/unbundle_jsonlint":289,"./validate_enum":295}],297:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285,"../util/unbundle_jsonlint":286,"./validate_enum":292}],294:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51750,7 +51701,7 @@ module.exports = function validateFunction(options) { }; -},{"../error/validation_error":286,"../util/get_type":288,"./validate":290,"./validate_array":291,"./validate_number":301,"./validate_object":302}],298:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285,"./validate":287,"./validate_array":288,"./validate_number":298,"./validate_object":299}],295:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51774,7 +51725,7 @@ module.exports = function(options) { return errors; }; -},{"../error/validation_error":286,"./validate_string":305}],299:[function(require,module,exports){ +},{"../error/validation_error":283,"./validate_string":302}],296:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -51887,7 +51838,7 @@ module.exports = function validateLayer(options) { return errors; }; -},{"../error/validation_error":286,"../util/extend":287,"../util/unbundle_jsonlint":289,"./validate_filter":296,"./validate_layout_property":300,"./validate_object":302,"./validate_paint_property":303}],300:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/extend":284,"../util/unbundle_jsonlint":286,"./validate_filter":293,"./validate_layout_property":297,"./validate_object":299,"./validate_paint_property":300}],297:[function(require,module,exports){ 'use strict'; var validate = require('./validate'); @@ -51926,7 +51877,7 @@ module.exports = function validateLayoutProperty(options) { }; -},{"../error/validation_error":286,"./validate":290}],301:[function(require,module,exports){ +},{"../error/validation_error":283,"./validate":287}],298:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -51953,7 +51904,7 @@ module.exports = function validateNumber(options) { return []; }; -},{"../error/validation_error":286,"../util/get_type":288}],302:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285}],299:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -52006,7 +51957,7 @@ module.exports = function validateObject(options) { return errors; }; -},{"../error/validation_error":286,"../util/get_type":288,"./validate":290}],303:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285,"./validate":287}],300:[function(require,module,exports){ 'use strict'; var validate = require('./validate'); @@ -52046,7 +51997,7 @@ module.exports = function validatePaintProperty(options) { }; -},{"../error/validation_error":286,"./validate":290}],304:[function(require,module,exports){ +},{"../error/validation_error":283,"./validate":287}],301:[function(require,module,exports){ 'use strict'; var ValidationError = require('../error/validation_error'); @@ -52123,7 +52074,7 @@ module.exports = function validateSource(options) { } }; -},{"../error/validation_error":286,"../util/unbundle_jsonlint":289,"./validate_enum":295,"./validate_object":302}],305:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/unbundle_jsonlint":286,"./validate_enum":292,"./validate_object":299}],302:[function(require,module,exports){ 'use strict'; var getType = require('../util/get_type'); @@ -52141,7 +52092,7 @@ module.exports = function validateString(options) { return []; }; -},{"../error/validation_error":286,"../util/get_type":288}],306:[function(require,module,exports){ +},{"../error/validation_error":283,"../util/get_type":285}],303:[function(require,module,exports){ 'use strict'; var validateConstants = require('./validate/validate_constants'); @@ -52211,12 +52162,12 @@ function wrapCleanErrors(inner) { module.exports = validateStyleMin; -},{"../reference/latest.min":307,"./validate/validate":290,"./validate/validate_constants":294,"./validate/validate_filter":296,"./validate/validate_glyphs_url":298,"./validate/validate_layer":299,"./validate/validate_layout_property":300,"./validate/validate_paint_property":303,"./validate/validate_source":304}],307:[function(require,module,exports){ +},{"../reference/latest.min":304,"./validate/validate":287,"./validate/validate_constants":291,"./validate/validate_filter":293,"./validate/validate_glyphs_url":295,"./validate/validate_layer":296,"./validate/validate_layout_property":297,"./validate/validate_paint_property":300,"./validate/validate_source":301}],304:[function(require,module,exports){ module.exports = require('./v8.min.json'); -},{"./v8.min.json":308}],308:[function(require,module,exports){ +},{"./v8.min.json":305}],305:[function(require,module,exports){ module.exports={"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_tile","source_geojson","source_video","source_image"],"source_tile":{"type":{"required":true,"type":"enum","values":["vector","raster"]},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":["geojson"]},"data":{"type":"*"},"maxzoom":{"type":"number","default":14},"buffer":{"type":"number","default":64},"tolerance":{"type":"number","default":3},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":400},"clusterMaxZoom":{"type":"number"}},"source_video":{"type":{"required":true,"type":"enum","values":["video"]},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":["image"]},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":["fill","line","symbol","circle","raster","background"]},"metadata":{"type":"*"},"ref":{"type":"string"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":22},"maxzoom":{"type":"number","minimum":0,"maximum":22},"interactive":{"type":"boolean","default":false},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"},"paint.*":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],"layout_background":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_fill":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_circle":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_line":{"line-cap":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["butt","round","square"],"default":"butt"},"line-join":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["bevel","round","miter"],"default":"miter"},"line-miter-limit":{"type":"number","default":2,"function":"interpolated","zoom-function":true,"property-function":true,"requires":[{"line-join":"miter"}]},"line-round-limit":{"type":"number","default":1.05,"function":"interpolated","zoom-function":true,"property-function":true,"requires":[{"line-join":"round"}]},"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_symbol":{"symbol-placement":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["point","line"],"default":"point"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"function":"interpolated","zoom-function":true,"property-function":true,"units":"pixels","requires":[{"symbol-placement":"line"}]},"symbol-avoid-edges":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false},"icon-allow-overlap":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image"]},"icon-ignore-placement":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image"]},"icon-optional":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image","text-field"]},"icon-rotation-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"viewport","requires":["icon-image"]},"icon-size":{"type":"number","default":1,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image"]},"icon-text-fit":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":false,"values":["none","both","width","height"],"default":"none","requires":["icon-image","text-field"]},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image","icon-text-fit","text-field"]},"icon-image":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"tokens":true},"icon-rotate":{"type":"number","default":0,"period":360,"function":"interpolated","zoom-function":true,"property-function":true,"units":"degrees","requires":["icon-image"]},"icon-padding":{"type":"number","default":2,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"units":"pixels","requires":["icon-image"]},"icon-keep-upright":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"requires":["icon-image"]},"text-pitch-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"requires":["text-field"]},"text-rotation-alignment":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"viewport","requires":["text-field"]},"text-field":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":"","tokens":true},"text-font":{"type":"array","value":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"]},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-line-height":{"type":"number","default":1.2,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-letter-spacing":{"type":"number","default":0,"units":"em","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-justify":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["left","center","right"],"default":"center","requires":["text-field"]},"text-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],"default":"center","requires":["text-field"]},"text-max-angle":{"type":"number","default":45,"units":"degrees","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field",{"symbol-placement":"line"}]},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","function":"interpolated","zoom-function":true,"property-function":true,"requires":["text-field"]},"text-keep-upright":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["none","uppercase","lowercase"],"default":"none","requires":["text-field"]},"text-offset":{"type":"array","value":"number","units":"ems","function":"interpolated","zoom-function":true,"property-function":true,"length":2,"default":[0,0],"requires":["text-field"]},"text-allow-overlap":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field"]},"text-ignore-placement":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field"]},"text-optional":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":false,"requires":["text-field","icon-image"]},"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"layout_raster":{"visibility":{"type":"enum","function":"piecewise-constant","zoom-function":true,"values":["visible","none"],"default":"visible"}},"filter":{"type":"array","value":"*"},"filter_operator":{"type":"enum","values":["==","!=",">",">=","<","<=","in","!in","all","any","none","has","!has"]},"geometry_type":{"type":"enum","values":["Point","LineString","Polygon"]},"color_operation":{"type":"enum","values":["lighten","saturate","spin","fade","mix"]},"function":{"stops":{"type":"array","required":true,"value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":["exponential","interval","categorical"],"default":"exponential"}},"function_stop":{"type":"array","minimum":0,"maximum":22,"value":["number","color"],"length":2},"paint":["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],"paint_fill":{"fill-antialias":{"type":"boolean","function":"piecewise-constant","zoom-function":true,"property-function":true,"default":true},"fill-opacity":{"type":"number","function":"interpolated","zoom-function":true,"property-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"fill-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"fill-pattern"}]},"fill-outline-color":{"type":"color","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}]},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"fill-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["fill-translate"]},"fill-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"transition":true}},"paint_line":{"line-opacity":{"type":"number","function":"interpolated","zoom-function":true,"property-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"line-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":[{"!":"line-pattern"}]},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["line-translate"]},"line-width":{"type":"number","default":1,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-gap-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-offset":{"type":"number","default":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"line-dasharray":{"type":"array","value":"number","function":"piecewise-constant","zoom-function":true,"property-function":true,"minimum":0,"transition":true,"units":"line widths","requires":[{"!":"line-pattern"}]},"line-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"property-function":true,"transition":true}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"circle-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-blur":{"type":"number","default":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels"},"circle-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["circle-translate"]},"circle-pitch-scale":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["icon-image"]},"icon-halo-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["icon-image"]},"icon-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["icon-image","icon-translate"]},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"requires":["text-field"]},"text-halo-width":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-halo-blur":{"type":"number","default":0,"minimum":0,"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"function":"interpolated","zoom-function":true,"property-function":true,"transition":true,"units":"pixels","requires":["text-field"]},"text-translate-anchor":{"type":"enum","function":"piecewise-constant","zoom-function":true,"property-function":true,"values":["map","viewport"],"default":"map","requires":["text-field","text-translate"]}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-hue-rotate":{"type":"number","default":0,"period":360,"function":"interpolated","zoom-function":true,"transition":true,"units":"degrees"},"raster-brightness-min":{"type":"number","function":"interpolated","zoom-function":true,"default":0,"minimum":0,"maximum":1,"transition":true},"raster-brightness-max":{"type":"number","function":"interpolated","zoom-function":true,"default":1,"minimum":0,"maximum":1,"transition":true},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"function":"interpolated","zoom-function":true,"transition":true,"units":"milliseconds"}},"paint_background":{"background-color":{"type":"color","default":"#000000","function":"interpolated","zoom-function":true,"transition":true,"requires":[{"!":"background-pattern"}]},"background-pattern":{"type":"string","function":"piecewise-constant","zoom-function":true,"transition":true},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"function":"interpolated","zoom-function":true,"transition":true}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}}} -},{}],309:[function(require,module,exports){ +},{}],306:[function(require,module,exports){ 'use strict'; if (typeof module !== 'undefined' && module.exports) { @@ -52347,7 +52298,7 @@ function isWebGLSupported(failIfMajorPerformanceCaveat) { } } -},{}],310:[function(require,module,exports){ +},{}],307:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -52443,7 +52394,7 @@ ArrayGroup.prototype.getTransferables = function(transferables) { } }; -},{"../util/util":424}],311:[function(require,module,exports){ +},{"../util/util":421}],308:[function(require,module,exports){ 'use strict'; var featureFilter = require('feature-filter'); @@ -52961,7 +52912,7 @@ function createGetUniform(attribute, stopOffset) { }; } -},{"../util/struct_array":422,"../util/util":424,"./array_group":310,"./bucket/circle_bucket":312,"./bucket/fill_bucket":313,"./bucket/line_bucket":314,"./bucket/symbol_bucket":315,"./buffer_group":317,"assert":40,"feature-filter":117}],312:[function(require,module,exports){ +},{"../util/struct_array":419,"../util/util":421,"./array_group":307,"./bucket/circle_bucket":309,"./bucket/fill_bucket":310,"./bucket/line_bucket":311,"./bucket/symbol_bucket":312,"./buffer_group":314,"assert":37,"feature-filter":114}],309:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -53083,7 +53034,7 @@ CircleBucket.prototype.addFeature = function(feature) { this.populatePaintArrays('circle', globalProperties, feature.properties, startGroup, startIndex); }; -},{"../../util/util":424,"../bucket":311,"../load_geometry":319}],313:[function(require,module,exports){ +},{"../../util/util":421,"../bucket":308,"../load_geometry":316}],310:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -53194,7 +53145,7 @@ FillBucket.prototype.addPolygon = function(polygon) { } }; -},{"../../util/classify_rings":412,"../../util/util":424,"../bucket":311,"../load_geometry":319,"earcut":111}],314:[function(require,module,exports){ +},{"../../util/classify_rings":409,"../../util/util":421,"../bucket":308,"../load_geometry":316,"earcut":108}],311:[function(require,module,exports){ 'use strict'; var Bucket = require('../bucket'); @@ -53621,7 +53572,7 @@ LineBucket.prototype.addPieSliceVertex = function(currentVertex, distance, extru } }; -},{"../../util/util":424,"../bucket":311,"../load_geometry":319}],315:[function(require,module,exports){ +},{"../../util/util":421,"../bucket":308,"../load_geometry":316}],312:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -54267,7 +54218,7 @@ SymbolBucket.prototype.addSymbolQuad = function(symbolQuad) { symbolQuad.minScale); }; -},{"../../symbol/anchor":373,"../../symbol/clip_line":375,"../../symbol/collision_feature":377,"../../symbol/get_anchors":379,"../../symbol/mergelines":382,"../../symbol/quads":383,"../../symbol/resolve_text":384,"../../symbol/shaping":385,"../../util/token":423,"../../util/util":424,"../bucket":311,"../load_geometry":319,"point-geometry":465}],316:[function(require,module,exports){ +},{"../../symbol/anchor":370,"../../symbol/clip_line":372,"../../symbol/collision_feature":374,"../../symbol/get_anchors":376,"../../symbol/mergelines":379,"../../symbol/quads":380,"../../symbol/resolve_text":381,"../../symbol/shaping":382,"../../util/token":420,"../../util/util":421,"../bucket":308,"../load_geometry":316,"point-geometry":462}],313:[function(require,module,exports){ 'use strict'; module.exports = Buffer; @@ -54368,7 +54319,7 @@ Buffer.BufferType = { ELEMENT: 'ELEMENT_ARRAY_BUFFER' }; -},{}],317:[function(require,module,exports){ +},{}],314:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -54423,7 +54374,7 @@ BufferGroup.prototype.destroy = function(gl) { } }; -},{"../render/vertex_array_object":339,"../util/util":424,"./buffer":316}],318:[function(require,module,exports){ +},{"../render/vertex_array_object":336,"../util/util":421,"./buffer":313}],315:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -54722,7 +54673,7 @@ function offsetLine(rings, offset) { return newRings; } -},{"../util/dictionary_coder":414,"../util/intersection_tests":419,"../util/struct_array":422,"../util/util":424,"../util/vectortile_to_geojson":425,"./bucket":311,"./load_geometry":319,"feature-filter":117,"grid-index":271,"pbf":459,"point-geometry":465,"vector-tile":530}],319:[function(require,module,exports){ +},{"../util/dictionary_coder":411,"../util/intersection_tests":416,"../util/struct_array":419,"../util/util":421,"../util/vectortile_to_geojson":422,"./bucket":308,"./load_geometry":316,"feature-filter":114,"grid-index":268,"pbf":456,"point-geometry":462,"vector-tile":527}],316:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -54778,7 +54729,7 @@ module.exports = function loadGeometry(feature, bits) { return geometry; }; -},{"../util/util":424,"./bucket":311,"assert":40}],320:[function(require,module,exports){ +},{"../util/util":421,"./bucket":308,"assert":37}],317:[function(require,module,exports){ 'use strict'; module.exports = Coordinate; @@ -54857,7 +54808,7 @@ Coordinate.prototype = { } }; -},{}],321:[function(require,module,exports){ +},{}],318:[function(require,module,exports){ 'use strict'; module.exports = LngLat; @@ -54949,7 +54900,7 @@ LngLat.convert = function (input) { return input; }; -},{"../util/util":424}],322:[function(require,module,exports){ +},{"../util/util":421}],319:[function(require,module,exports){ 'use strict'; module.exports = LngLatBounds; @@ -55141,7 +55092,7 @@ LngLatBounds.convert = function (input) { return new LngLatBounds(input); }; -},{"./lng_lat":321}],323:[function(require,module,exports){ +},{"./lng_lat":318}],320:[function(require,module,exports){ 'use strict'; var LngLat = require('./lng_lat'), @@ -55615,7 +55566,7 @@ Transform.prototype = { } }; -},{"../data/bucket":311,"../source/tile_coord":351,"../util/interpolate":418,"../util/util":424,"./coordinate":320,"./lng_lat":321,"gl-matrix":177,"point-geometry":465}],324:[function(require,module,exports){ +},{"../data/bucket":308,"../source/tile_coord":348,"../util/interpolate":415,"../util/util":421,"./coordinate":317,"./lng_lat":318,"gl-matrix":174,"point-geometry":462}],321:[function(require,module,exports){ 'use strict'; // Font data From Hershey Simplex Font @@ -55748,7 +55699,7 @@ module.exports = function textVertices(text, left, baseline, scale) { return strokes; }; -},{}],325:[function(require,module,exports){ +},{}],322:[function(require,module,exports){ 'use strict'; // jshint -W079 @@ -55815,7 +55766,7 @@ Object.defineProperty(mapboxgl, 'accessToken', { * mapboxgl.supported() // = true */ -},{"../package.json":426,"./geo/lng_lat":321,"./geo/lng_lat_bounds":322,"./style/style":360,"./ui/control/attribution":391,"./ui/control/control":392,"./ui/control/geolocate":393,"./ui/control/navigation":394,"./ui/map":403,"./ui/marker":404,"./ui/popup":405,"./util/ajax":407,"./util/browser":408,"./util/config":413,"./util/evented":416,"./util/util":424,"point-geometry":465}],326:[function(require,module,exports){ +},{"../package.json":423,"./geo/lng_lat":318,"./geo/lng_lat_bounds":319,"./style/style":357,"./ui/control/attribution":388,"./ui/control/control":389,"./ui/control/geolocate":390,"./ui/control/navigation":391,"./ui/map":400,"./ui/marker":401,"./ui/popup":402,"./util/ajax":404,"./util/browser":405,"./util/config":410,"./util/evented":413,"./util/util":421,"point-geometry":462}],323:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -55835,7 +55786,7 @@ module.exports = function(uniforms) { return pragmas; }; -},{"assert":40}],327:[function(require,module,exports){ +},{"assert":37}],324:[function(require,module,exports){ 'use strict'; var pixelsToTileUnits = require('../source/pixels_to_tile_units'); @@ -55928,7 +55879,7 @@ function drawBackground(painter, source, layer) { gl.stencilFunc(gl.EQUAL, 0x80, 0x80); } -},{"../source/pixels_to_tile_units":345,"./create_uniform_pragmas":326}],328:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":342,"./create_uniform_pragmas":323}],325:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -55993,7 +55944,7 @@ function drawCircles(painter, source, layer, coords) { } } -},{"../util/browser":408}],329:[function(require,module,exports){ +},{"../util/browser":405}],326:[function(require,module,exports){ 'use strict'; module.exports = drawCollisionDebug; @@ -56028,7 +55979,7 @@ function drawCollisionDebug(painter, source, layer, coords) { } } -},{}],330:[function(require,module,exports){ +},{}],327:[function(require,module,exports){ 'use strict'; var textVertices = require('../lib/debugtext'); @@ -56089,7 +56040,7 @@ function drawDebugTile(painter, source, coord) { gl.drawArrays(gl.LINES, 0, debugTextBuffer.length); } -},{"../data/bucket":311,"../data/buffer":316,"../lib/debugtext":324,"../util/browser":408,"./vertex_array_object":339,"gl-matrix":177}],331:[function(require,module,exports){ +},{"../data/bucket":308,"../data/buffer":313,"../lib/debugtext":321,"../util/browser":405,"./vertex_array_object":336,"gl-matrix":174}],328:[function(require,module,exports){ 'use strict'; var pixelsToTileUnits = require('../source/pixels_to_tile_units'); @@ -56286,7 +56237,7 @@ function setPattern(image, opacity, tile, coord, painter, program) { painter.spriteAtlas.bind(gl, true); } -},{"../source/pixels_to_tile_units":345}],332:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":342}],329:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -56451,7 +56402,7 @@ module.exports = function drawLine(painter, source, layer, coords) { }; -},{"../source/pixels_to_tile_units":345,"../util/browser":408,"gl-matrix":177}],333:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":342,"../util/browser":405,"gl-matrix":174}],330:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -56597,7 +56548,7 @@ function getOpacities(tile, parentTile, layer, transform) { return opacity; } -},{"../util/struct_array":422,"../util/util":424}],334:[function(require,module,exports){ +},{"../util/struct_array":419,"../util/util":421}],331:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -56813,7 +56764,7 @@ function drawSymbol(painter, layer, posMatrix, tile, bucket, bufferGroups, isTex } } -},{"../source/pixels_to_tile_units":345,"../util/browser":408,"./draw_collision_debug":329}],335:[function(require,module,exports){ +},{"../source/pixels_to_tile_units":342,"../util/browser":405,"./draw_collision_debug":326}],332:[function(require,module,exports){ 'use strict'; module.exports = FrameHistory; @@ -56885,7 +56836,7 @@ FrameHistory.prototype.bind = function(gl) { } }; -},{}],336:[function(require,module,exports){ +},{}],333:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -57032,7 +56983,7 @@ LineAtlas.prototype.bind = function(gl) { } }; -},{"../util/util":424}],337:[function(require,module,exports){ +},{"../util/util":421}],334:[function(require,module,exports){ 'use strict'; var browser = require('../util/browser'); @@ -57376,7 +57327,7 @@ Painter.prototype.showOverdrawInspector = function(enabled) { } }; -},{"../data/bucket":311,"../data/buffer":316,"../source/pixels_to_tile_units":345,"../source/source_cache":349,"../util/browser":408,"../util/struct_array":422,"../util/util":424,"./create_uniform_pragmas":326,"./draw_background":327,"./draw_circle":328,"./draw_debug":330,"./draw_fill":331,"./draw_line":332,"./draw_raster":333,"./draw_symbol":334,"./frame_history":335,"./painter/use_program":338,"./vertex_array_object":339,"gl-matrix":177}],338:[function(require,module,exports){ +},{"../data/bucket":308,"../data/buffer":313,"../source/pixels_to_tile_units":342,"../source/source_cache":346,"../util/browser":405,"../util/struct_array":419,"../util/util":421,"./create_uniform_pragmas":323,"./draw_background":324,"./draw_circle":325,"./draw_debug":327,"./draw_fill":328,"./draw_line":329,"./draw_raster":330,"./draw_symbol":331,"./frame_history":332,"./painter/use_program":335,"./vertex_array_object":336,"gl-matrix":174}],335:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -57473,7 +57424,7 @@ function applyPragmas(source, pragmas) { }); } -},{"../../util/util":424,"assert":40,"mapbox-gl-shaders":285}],339:[function(require,module,exports){ +},{"../../util/util":421,"assert":37,"mapbox-gl-shaders":282}],336:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -57571,7 +57522,7 @@ VertexArrayObject.prototype.destroy = function(gl) { } }; -},{"assert":40}],340:[function(require,module,exports){ +},{"assert":37}],337:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -57795,7 +57746,7 @@ GeoJSONSource.prototype = util.inherit(Evented, /** @lends GeoJSONSource.prototy } }); -},{"../data/bucket":311,"../util/evented":416,"../util/util":424,"resolve-url":482}],341:[function(require,module,exports){ +},{"../data/bucket":308,"../util/evented":413,"../util/util":421,"resolve-url":479}],338:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -57933,7 +57884,7 @@ GeoJSONWorkerSource.prototype = util.inherit(VectorTileWorkerSource, /** @lends } }); -},{"../util/ajax":407,"../util/util":424,"./geojson_wrapper":342,"./vector_tile_worker_source":353,"geojson-rewind":123,"geojson-vt":127,"supercluster":509,"vt-pbf":536}],342:[function(require,module,exports){ +},{"../util/ajax":404,"../util/util":421,"./geojson_wrapper":339,"./vector_tile_worker_source":350,"geojson-rewind":120,"geojson-vt":124,"supercluster":506,"vt-pbf":533}],339:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -58009,7 +57960,7 @@ FeatureWrapper.prototype.bbox = function() { FeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON; -},{"../data/bucket":311,"point-geometry":465,"vector-tile":530}],343:[function(require,module,exports){ +},{"../data/bucket":308,"point-geometry":462,"vector-tile":527}],340:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58188,7 +58139,7 @@ ImageSource.prototype = util.inherit(Evented, /** @lends ImageSource.prototype * } }); -},{"../data/bucket":311,"../data/buffer":316,"../geo/lng_lat":321,"../render/draw_raster":333,"../render/vertex_array_object":339,"../util/ajax":407,"../util/evented":416,"../util/util":424,"./tile_coord":351,"point-geometry":465}],344:[function(require,module,exports){ +},{"../data/bucket":308,"../data/buffer":313,"../geo/lng_lat":318,"../render/draw_raster":330,"../render/vertex_array_object":336,"../util/ajax":404,"../util/evented":413,"../util/util":421,"./tile_coord":348,"point-geometry":462}],341:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); var ajax = require('../util/ajax'); @@ -58219,7 +58170,7 @@ module.exports = function(options, callback) { }; -},{"../util/ajax":407,"../util/browser":408,"../util/mapbox":421,"../util/util":424}],345:[function(require,module,exports){ +},{"../util/ajax":404,"../util/browser":405,"../util/mapbox":418,"../util/util":421}],342:[function(require,module,exports){ 'use strict'; var Bucket = require('../data/bucket'); @@ -58244,7 +58195,7 @@ module.exports = function(tile, pixelValue, z) { }; -},{"../data/bucket":311}],346:[function(require,module,exports){ +},{"../data/bucket":308}],343:[function(require,module,exports){ 'use strict'; var TileCoord = require('./tile_coord'); @@ -58315,7 +58266,7 @@ function mergeRenderedFeatureLayers(tiles) { } -},{"./tile_coord":351}],347:[function(require,module,exports){ +},{"./tile_coord":348}],344:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58412,7 +58363,7 @@ RasterTileSource.prototype = util.inherit(Evented, { } }); -},{"../util/ajax":407,"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./load_tilejson":344}],348:[function(require,module,exports){ +},{"../util/ajax":404,"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./load_tilejson":341}],345:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -58583,7 +58534,7 @@ exports.setType = function (name, type) { * @instance */ -},{"../source/geojson_source":340,"../source/image_source":343,"../source/raster_tile_source":347,"../source/vector_tile_source":352,"../source/video_source":354,"../util/util":424}],349:[function(require,module,exports){ +},{"../source/geojson_source":337,"../source/image_source":340,"../source/raster_tile_source":344,"../source/vector_tile_source":349,"../source/video_source":351,"../util/util":421}],346:[function(require,module,exports){ 'use strict'; var Source = require('./source'); @@ -59121,7 +59072,7 @@ function compareKeyZoom(a, b) { return (a % 32) - (b % 32); } -},{"../data/bucket":311,"../geo/coordinate":320,"../util/evented":416,"../util/lru_cache":420,"../util/util":424,"./source":348,"./tile":350,"./tile_coord":351}],350:[function(require,module,exports){ +},{"../data/bucket":308,"../geo/coordinate":317,"../util/evented":413,"../util/lru_cache":417,"../util/util":421,"./source":345,"./tile":347,"./tile_coord":348}],347:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -59323,7 +59274,7 @@ function unserializeBuckets(input, style) { return output; } -},{"../data/bucket":311,"../data/feature_index":318,"../symbol/collision_box":376,"../symbol/collision_tile":378,"../symbol/symbol_instances":387,"../symbol/symbol_quads":388,"../util/util":424,"../util/vectortile_to_geojson":425,"feature-filter":117,"pbf":459,"vector-tile":530}],351:[function(require,module,exports){ +},{"../data/bucket":308,"../data/feature_index":315,"../symbol/collision_box":373,"../symbol/collision_tile":375,"../symbol/symbol_instances":384,"../symbol/symbol_quads":385,"../util/util":421,"../util/vectortile_to_geojson":422,"feature-filter":114,"pbf":456,"vector-tile":527}],348:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -59517,7 +59468,7 @@ TileCoord.cover = function(z, bounds, actualZ) { }); }; -},{"../geo/coordinate":320,"assert":40,"whoots-js":546}],352:[function(require,module,exports){ +},{"../geo/coordinate":317,"assert":37,"whoots-js":543}],349:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -59624,7 +59575,7 @@ VectorTileSource.prototype = util.inherit(Evented, { } }); -},{"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./load_tilejson":344}],353:[function(require,module,exports){ +},{"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./load_tilejson":341}],350:[function(require,module,exports){ 'use strict'; var ajax = require('../util/ajax'); var vt = require('vector-tile'); @@ -59772,7 +59723,7 @@ VectorTileWorkerSource.prototype = { } }; -},{"../util/ajax":407,"./worker_tile":356,"pbf":459,"vector-tile":530}],354:[function(require,module,exports){ +},{"../util/ajax":404,"./worker_tile":353,"pbf":456,"vector-tile":527}],351:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -59976,7 +59927,7 @@ VideoSource.prototype = util.inherit(Evented, /** @lends VideoSource.prototype * } }); -},{"../data/bucket":311,"../data/buffer":316,"../geo/lng_lat":321,"../render/draw_raster":333,"../render/vertex_array_object":339,"../util/ajax":407,"../util/evented":416,"../util/util":424,"./tile_coord":351,"point-geometry":465}],355:[function(require,module,exports){ +},{"../data/bucket":308,"../data/buffer":313,"../geo/lng_lat":318,"../render/draw_raster":330,"../render/vertex_array_object":336,"../util/ajax":404,"../util/evented":413,"../util/util":421,"./tile_coord":348,"point-geometry":462}],352:[function(require,module,exports){ 'use strict'; var Actor = require('../util/actor'); @@ -60140,7 +60091,7 @@ function createLayerFamilies(layers) { return families; } -},{"../style/style_layer":363,"../util/actor":406,"../util/util":424,"./geojson_worker_source":341,"./vector_tile_worker_source":353}],356:[function(require,module,exports){ +},{"../style/style_layer":360,"../util/actor":403,"../util/util":421,"./geojson_worker_source":338,"./vector_tile_worker_source":350}],353:[function(require,module,exports){ 'use strict'; var FeatureIndex = require('../data/feature_index'); @@ -60413,7 +60364,7 @@ function getLayerId(layer) { return layer.id; } -},{"../data/bucket":311,"../data/feature_index":318,"../symbol/collision_box":376,"../symbol/collision_tile":378,"../symbol/symbol_instances":387,"../symbol/symbol_quads":388,"../util/dictionary_coder":414,"../util/util":424}],357:[function(require,module,exports){ +},{"../data/bucket":308,"../data/feature_index":315,"../symbol/collision_box":373,"../symbol/collision_tile":375,"../symbol/symbol_instances":384,"../symbol/symbol_quads":385,"../util/dictionary_coder":411,"../util/util":421}],354:[function(require,module,exports){ 'use strict'; module.exports = AnimationLoop; @@ -60445,7 +60396,7 @@ AnimationLoop.prototype.cancel = function(n) { }); }; -},{}],358:[function(require,module,exports){ +},{}],355:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -60526,7 +60477,7 @@ ImageSprite.prototype.getSpritePosition = function(name) { return new SpritePosition(); }; -},{"../util/ajax":407,"../util/browser":408,"../util/evented":416,"../util/mapbox":421}],359:[function(require,module,exports){ +},{"../util/ajax":404,"../util/browser":405,"../util/evented":413,"../util/mapbox":418}],356:[function(require,module,exports){ 'use strict'; var parseColorString = require('csscolorparser').parseCSSColor; @@ -60568,7 +60519,7 @@ module.exports = function parseColor(input) { } }; -},{"../util/util":424,"./style_function":362,"csscolorparser":101}],360:[function(require,module,exports){ +},{"../util/util":421,"./style_function":359,"csscolorparser":98}],357:[function(require,module,exports){ 'use strict'; var Evented = require('../util/evented'); @@ -61349,7 +61300,7 @@ Style.prototype = util.inherit(Evented, { }); -},{"../render/line_atlas":336,"../source/query_features":346,"../source/source":348,"../source/source_cache":349,"../symbol/glyph_source":381,"../symbol/sprite_atlas":386,"../util/ajax":407,"../util/browser":408,"../util/dispatcher":415,"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./animation_loop":357,"./image_sprite":358,"./style_function":362,"./style_layer":363,"./style_spec":370,"./validate_style":372}],361:[function(require,module,exports){ +},{"../render/line_atlas":333,"../source/query_features":343,"../source/source":345,"../source/source_cache":346,"../symbol/glyph_source":378,"../symbol/sprite_atlas":383,"../util/ajax":404,"../util/browser":405,"../util/dispatcher":412,"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./animation_loop":354,"./image_sprite":355,"./style_function":359,"./style_layer":360,"./style_spec":367,"./validate_style":369}],358:[function(require,module,exports){ 'use strict'; var MapboxGLFunction = require('./style_function'); @@ -61433,7 +61384,7 @@ function transitioned(calculate) { }; } -},{"../util/util":424,"./parse_color":359,"./style_function":362}],362:[function(require,module,exports){ +},{"../util/util":421,"./parse_color":356,"./style_function":359}],359:[function(require,module,exports){ 'use strict'; var MapboxGLFunction = require('mapbox-gl-function'); @@ -61460,7 +61411,7 @@ exports['piecewise-constant'] = function(parameters) { exports.isFunctionDefinition = MapboxGLFunction.isFunctionDefinition; -},{"mapbox-gl-function":284}],363:[function(require,module,exports){ +},{"mapbox-gl-function":281}],360:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -61807,7 +61758,7 @@ function getDeclarationValue(declaration) { return declaration.value; } -},{"../util/evented":416,"../util/util":424,"./parse_color":359,"./style_declaration":361,"./style_layer/background_style_layer":364,"./style_layer/circle_style_layer":365,"./style_layer/fill_style_layer":366,"./style_layer/line_style_layer":367,"./style_layer/raster_style_layer":368,"./style_layer/symbol_style_layer":369,"./style_spec":370,"./style_transition":371,"./validate_style":372}],364:[function(require,module,exports){ +},{"../util/evented":413,"../util/util":421,"./parse_color":356,"./style_declaration":358,"./style_layer/background_style_layer":361,"./style_layer/circle_style_layer":362,"./style_layer/fill_style_layer":363,"./style_layer/line_style_layer":364,"./style_layer/raster_style_layer":365,"./style_layer/symbol_style_layer":366,"./style_spec":367,"./style_transition":368,"./validate_style":369}],361:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61821,7 +61772,7 @@ module.exports = BackgroundStyleLayer; BackgroundStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":424,"../style_layer":363}],365:[function(require,module,exports){ +},{"../../util/util":421,"../style_layer":360}],362:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61835,7 +61786,7 @@ module.exports = CircleStyleLayer; CircleStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":424,"../style_layer":363}],366:[function(require,module,exports){ +},{"../../util/util":421,"../style_layer":360}],363:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61891,7 +61842,7 @@ FillStyleLayer.prototype = util.inherit(StyleLayer, { module.exports = FillStyleLayer; -},{"../../util/util":424,"../style_layer":363}],367:[function(require,module,exports){ +},{"../../util/util":421,"../style_layer":360}],364:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61925,7 +61876,7 @@ LineStyleLayer.prototype = util.inherit(StyleLayer, { } }); -},{"../../util/util":424,"../style_layer":363}],368:[function(require,module,exports){ +},{"../../util/util":421,"../style_layer":360}],365:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61939,7 +61890,7 @@ module.exports = RasterStyleLayer; RasterStyleLayer.prototype = util.inherit(StyleLayer, {}); -},{"../../util/util":424,"../style_layer":363}],369:[function(require,module,exports){ +},{"../../util/util":421,"../style_layer":360}],366:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -61982,12 +61933,12 @@ SymbolStyleLayer.prototype = util.inherit(StyleLayer, { }); -},{"../../util/util":424,"../style_layer":363}],370:[function(require,module,exports){ +},{"../../util/util":421,"../style_layer":360}],367:[function(require,module,exports){ 'use strict'; module.exports = require('mapbox-gl-style-spec/reference/latest.min'); -},{"mapbox-gl-style-spec/reference/latest.min":307}],371:[function(require,module,exports){ +},{"mapbox-gl-style-spec/reference/latest.min":304}],368:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -62072,7 +62023,7 @@ function interpZoomTransitioned(from, to, t) { } } -},{"../util/interpolate":418,"../util/util":424}],372:[function(require,module,exports){ +},{"../util/interpolate":415,"../util/util":421}],369:[function(require,module,exports){ 'use strict'; module.exports = require('mapbox-gl-style-spec/lib/validate_style.min'); @@ -62096,7 +62047,7 @@ module.exports.throwErrors = function throwErrors(emitter, errors) { } }; -},{"mapbox-gl-style-spec/lib/validate_style.min":306}],373:[function(require,module,exports){ +},{"mapbox-gl-style-spec/lib/validate_style.min":303}],370:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -62119,7 +62070,7 @@ Anchor.prototype.clone = function() { return new Anchor(this.x, this.y, this.angle, this.segment); }; -},{"point-geometry":465}],374:[function(require,module,exports){ +},{"point-geometry":462}],371:[function(require,module,exports){ 'use strict'; module.exports = checkMaxAngle; @@ -62199,7 +62150,7 @@ function checkMaxAngle(line, anchor, labelLength, windowSize, maxAngle) { return true; } -},{}],375:[function(require,module,exports){ +},{}],372:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -62273,7 +62224,7 @@ function clipLine(lines, x1, y1, x2, y2) { return clippedLines; } -},{"point-geometry":465}],376:[function(require,module,exports){ +},{"point-geometry":462}],373:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -62354,7 +62305,7 @@ util.extendAll(CollisionBoxArray.prototype.StructType.prototype, { } }); -},{"../util/struct_array":422,"../util/util":424,"point-geometry":465}],377:[function(require,module,exports){ +},{"../util/struct_array":419,"../util/util":421,"point-geometry":462}],374:[function(require,module,exports){ 'use strict'; module.exports = CollisionFeature; @@ -62488,7 +62439,7 @@ CollisionFeature.prototype._addLineCollisionBoxes = function(collisionBoxArray, return bboxes; }; -},{}],378:[function(require,module,exports){ +},{}],375:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -62789,7 +62740,7 @@ CollisionTile.prototype.insertCollisionFeature = function(collisionFeature, minP } }; -},{"../data/bucket":311,"grid-index":271,"point-geometry":465}],379:[function(require,module,exports){ +},{"../data/bucket":308,"grid-index":268,"point-geometry":462}],376:[function(require,module,exports){ 'use strict'; var interpolate = require('../util/interpolate'); @@ -62893,7 +62844,7 @@ function resample(line, offset, spacing, angleWindowSize, maxAngle, labelLength, return anchors; } -},{"../symbol/anchor":373,"../util/interpolate":418,"./check_max_angle":374}],380:[function(require,module,exports){ +},{"../symbol/anchor":370,"../util/interpolate":415,"./check_max_angle":371}],377:[function(require,module,exports){ 'use strict'; var ShelfPack = require('shelf-pack'); @@ -63062,7 +63013,7 @@ GlyphAtlas.prototype.updateTexture = function(gl) { } }; -},{"../util/util":424,"shelf-pack":495}],381:[function(require,module,exports){ +},{"../util/util":421,"shelf-pack":492}],378:[function(require,module,exports){ 'use strict'; var normalizeURL = require('../util/mapbox').normalizeGlyphsURL; @@ -63203,7 +63154,7 @@ function glyphUrl(fontstack, range, url, subdomains) { .replace('{range}', range); } -},{"../symbol/glyph_atlas":380,"../util/ajax":407,"../util/glyphs":417,"../util/mapbox":421,"pbf":459}],382:[function(require,module,exports){ +},{"../symbol/glyph_atlas":377,"../util/ajax":404,"../util/glyphs":414,"../util/mapbox":418,"pbf":456}],379:[function(require,module,exports){ 'use strict'; module.exports = function (features, textFeatures, geometries) { @@ -63294,7 +63245,7 @@ module.exports = function (features, textFeatures, geometries) { }; }; -},{}],383:[function(require,module,exports){ +},{}],380:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -63577,7 +63528,7 @@ function getSegmentGlyphs(glyphs, anchor, offset, line, segment, forward) { return placementScale; } -},{"point-geometry":465}],384:[function(require,module,exports){ +},{"point-geometry":462}],381:[function(require,module,exports){ 'use strict'; var resolveTokens = require('../util/token'); @@ -63620,7 +63571,7 @@ function resolveText(features, layoutProperties, codepoints) { return textFeatures; } -},{"../util/token":423}],385:[function(require,module,exports){ +},{"../util/token":420}],382:[function(require,module,exports){ 'use strict'; module.exports = { @@ -63801,7 +63752,7 @@ function PositionedIcon(image, top, bottom, left, right) { this.right = right; } -},{}],386:[function(require,module,exports){ +},{}],383:[function(require,module,exports){ 'use strict'; var ShelfPack = require('shelf-pack'); @@ -64034,7 +63985,7 @@ function AtlasImage(rect, width, height, sdf, pixelRatio) { this.pixelRatio = pixelRatio; } -},{"../util/browser":408,"../util/util":424,"shelf-pack":495}],387:[function(require,module,exports){ +},{"../util/browser":405,"../util/util":421,"shelf-pack":492}],384:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -64079,7 +64030,7 @@ util.extendAll(SymbolInstancesArray.prototype.StructType.prototype, { -},{"../util/struct_array":422,"../util/util":424,"point-geometry":465}],388:[function(require,module,exports){ +},{"../util/struct_array":419,"../util/util":421,"point-geometry":462}],385:[function(require,module,exports){ 'use strict'; var StructArrayType = require('../util/struct_array'); @@ -64153,7 +64104,7 @@ util.extendAll(SymbolQuadsArray.prototype.StructType.prototype, { }); -},{"../util/struct_array":422,"../util/util":424,"./quads":383,"point-geometry":465}],389:[function(require,module,exports){ +},{"../util/struct_array":419,"../util/util":421,"./quads":380,"point-geometry":462}],386:[function(require,module,exports){ 'use strict'; var DOM = require('../util/dom'); @@ -64328,7 +64279,7 @@ module.exports = function bindHandlers(map, options) { * property. */ -},{"../util/dom":410,"./handler/box_zoom":395,"./handler/dblclick_zoom":396,"./handler/drag_pan":397,"./handler/drag_rotate":398,"./handler/keyboard":399,"./handler/scroll_zoom":400,"./handler/touch_zoom_rotate":401,"point-geometry":465}],390:[function(require,module,exports){ +},{"../util/dom":407,"./handler/box_zoom":392,"./handler/dblclick_zoom":393,"./handler/drag_pan":394,"./handler/drag_rotate":395,"./handler/keyboard":396,"./handler/scroll_zoom":397,"./handler/touch_zoom_rotate":398,"point-geometry":462}],387:[function(require,module,exports){ 'use strict'; var util = require('../util/util'); @@ -65115,7 +65066,7 @@ util.extend(Camera.prototype, /** @lends Map.prototype */{ * @property {MapEventData} data */ -},{"../geo/lng_lat":321,"../geo/lng_lat_bounds":322,"../util/browser":408,"../util/interpolate":418,"../util/util":424,"point-geometry":465}],391:[function(require,module,exports){ +},{"../geo/lng_lat":318,"../geo/lng_lat_bounds":319,"../util/browser":405,"../util/interpolate":415,"../util/util":421,"point-geometry":462}],388:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -65198,7 +65149,7 @@ Attribution.prototype = util.inherit(Control, { } }); -},{"../../util/dom":410,"../../util/util":424,"./control":392}],392:[function(require,module,exports){ +},{"../../util/dom":407,"../../util/util":421,"./control":389}],389:[function(require,module,exports){ 'use strict'; var util = require('../../util/util'); @@ -65253,7 +65204,7 @@ Control.prototype = { util.extend(Control.prototype, Evented); -},{"../../util/evented":416,"../../util/util":424}],393:[function(require,module,exports){ +},{"../../util/evented":413,"../../util/util":421}],390:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -65355,7 +65306,7 @@ Geolocate.prototype = util.inherit(Control, { * */ -},{"../../util/browser":408,"../../util/dom":410,"../../util/util":424,"./control":392}],394:[function(require,module,exports){ +},{"../../util/browser":405,"../../util/dom":407,"../../util/util":421,"./control":389}],391:[function(require,module,exports){ 'use strict'; var Control = require('./control'); @@ -65476,7 +65427,7 @@ function copyMouseEvent(e) { }); } -},{"../../util/dom":410,"../../util/util":424,"./control":392}],395:[function(require,module,exports){ +},{"../../util/dom":407,"../../util/util":421,"./control":389}],392:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -65663,7 +65614,7 @@ BoxZoomHandler.prototype = { * @property {MapBoxZoomEvent} data */ -},{"../../geo/lng_lat_bounds":322,"../../util/dom":410,"../../util/util":424}],396:[function(require,module,exports){ +},{"../../geo/lng_lat_bounds":319,"../../util/dom":407,"../../util/util":421}],393:[function(require,module,exports){ 'use strict'; module.exports = DoubleClickZoomHandler; @@ -65726,7 +65677,7 @@ DoubleClickZoomHandler.prototype = { } }; -},{}],397:[function(require,module,exports){ +},{}],394:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -65962,7 +65913,7 @@ DragPanHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/dom":410,"../../util/util":424}],398:[function(require,module,exports){ +},{"../../util/dom":407,"../../util/util":421}],395:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -66216,7 +66167,7 @@ DragRotateHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/dom":410,"../../util/util":424,"point-geometry":465}],399:[function(require,module,exports){ +},{"../../util/dom":407,"../../util/util":421,"point-geometry":462}],396:[function(require,module,exports){ 'use strict'; module.exports = KeyboardHandler; @@ -66348,7 +66299,7 @@ KeyboardHandler.prototype = { } }; -},{}],400:[function(require,module,exports){ +},{}],397:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -66531,7 +66482,7 @@ ScrollZoomHandler.prototype = { * @property {MapMouseEvent | MapTouchEvent} data */ -},{"../../util/browser":408,"../../util/dom":410,"../../util/util":424}],401:[function(require,module,exports){ +},{"../../util/browser":405,"../../util/dom":407,"../../util/util":421}],398:[function(require,module,exports){ 'use strict'; var DOM = require('../../util/dom'), @@ -66746,7 +66697,7 @@ TouchZoomRotateHandler.prototype = { } }; -},{"../../util/dom":410,"../../util/util":424}],402:[function(require,module,exports){ +},{"../../util/dom":407,"../../util/util":421}],399:[function(require,module,exports){ 'use strict'; /* @@ -66821,7 +66772,7 @@ Hash.prototype = { } }; -},{"../util/util":424}],403:[function(require,module,exports){ +},{"../util/util":421}],400:[function(require,module,exports){ 'use strict'; var Canvas = require('../util/canvas'); @@ -68261,7 +68212,7 @@ function removeNode(node) { * @property {{error: {message: string}}} data */ -},{"../geo/lng_lat":321,"../geo/lng_lat_bounds":322,"../geo/transform":323,"../render/painter":337,"../style/animation_loop":357,"../style/style":360,"../util/browser":408,"../util/canvas":409,"../util/dom":410,"../util/evented":416,"../util/util":424,"./bind_handlers":389,"./camera":390,"./control/attribution":391,"./hash":402,"point-geometry":465}],404:[function(require,module,exports){ +},{"../geo/lng_lat":318,"../geo/lng_lat_bounds":319,"../geo/transform":320,"../render/painter":334,"../style/animation_loop":354,"../style/style":357,"../util/browser":405,"../util/canvas":406,"../util/dom":407,"../util/evented":413,"../util/util":421,"./bind_handlers":386,"./camera":387,"./control/attribution":388,"./hash":399,"point-geometry":462}],401:[function(require,module,exports){ /* eslint-disable */ 'use strict'; @@ -68356,7 +68307,7 @@ Marker.prototype = { } }; -},{"../geo/lng_lat":321,"../util/dom":410,"point-geometry":465}],405:[function(require,module,exports){ +},{"../geo/lng_lat":318,"../util/dom":407,"point-geometry":462}],402:[function(require,module,exports){ 'use strict'; module.exports = Popup; @@ -68610,7 +68561,7 @@ Popup.prototype = util.inherit(Evented, /** @lends Popup.prototype */{ } }); -},{"../geo/lng_lat":321,"../util/dom":410,"../util/evented":416,"../util/util":424}],406:[function(require,module,exports){ +},{"../geo/lng_lat":318,"../util/dom":407,"../util/evented":413,"../util/util":421}],403:[function(require,module,exports){ 'use strict'; module.exports = Actor; @@ -68682,7 +68633,7 @@ Actor.prototype.postMessage = function(message, transferList) { this.target.postMessage(message, transferList); }; -},{}],407:[function(require,module,exports){ +},{}],404:[function(require,module,exports){ 'use strict'; exports.getJSON = function(url, callback) { @@ -68772,7 +68723,7 @@ exports.getVideo = function(urls, callback) { return video; }; -},{}],408:[function(require,module,exports){ +},{}],405:[function(require,module,exports){ 'use strict'; /** @@ -68867,7 +68818,7 @@ webpImgTest.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ// exports.supportsGeolocation = !!navigator.geolocation; -},{"mapbox-gl-supported":309}],409:[function(require,module,exports){ +},{"mapbox-gl-supported":306}],406:[function(require,module,exports){ 'use strict'; var util = require('../util'); @@ -68911,7 +68862,7 @@ Canvas.prototype.getElement = function() { return this.canvas; }; -},{"../util":424,"mapbox-gl-supported":309}],410:[function(require,module,exports){ +},{"../util":421,"mapbox-gl-supported":306}],407:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -68986,7 +68937,7 @@ exports.touchPos = function (el, e) { return points; }; -},{"point-geometry":465}],411:[function(require,module,exports){ +},{"point-geometry":462}],408:[function(require,module,exports){ 'use strict'; var WebWorkify = require('webworkify'); @@ -68994,7 +68945,7 @@ module.exports = function () { return new WebWorkify(require('../../source/worker')); }; -},{"../../source/worker":355,"webworkify":544}],412:[function(require,module,exports){ +},{"../../source/worker":352,"webworkify":541}],409:[function(require,module,exports){ 'use strict'; var quickselect = require('quickselect'); @@ -69054,7 +69005,7 @@ function calculateSignedArea(ring) { return sum; } -},{"quickselect":474}],413:[function(require,module,exports){ +},{"quickselect":471}],410:[function(require,module,exports){ 'use strict'; module.exports = { @@ -69062,7 +69013,7 @@ module.exports = { REQUIRE_ACCESS_TOKEN: true }; -},{}],414:[function(require,module,exports){ +},{}],411:[function(require,module,exports){ 'use strict'; var assert = require('assert'); @@ -69089,7 +69040,7 @@ DictionaryCoder.prototype.decode = function(n) { return this._numberToString[n]; }; -},{"assert":40}],415:[function(require,module,exports){ +},{"assert":37}],412:[function(require,module,exports){ 'use strict'; var util = require('./util'); @@ -69164,7 +69115,7 @@ Dispatcher.prototype = { } }; -},{"./actor":406,"./util":424,"./web_worker":411}],416:[function(require,module,exports){ +},{"./actor":403,"./util":421,"./web_worker":408}],413:[function(require,module,exports){ 'use strict'; var util = require('./util'); @@ -69287,7 +69238,7 @@ var Evented = { module.exports = Evented; -},{"./util":424}],417:[function(require,module,exports){ +},{"./util":421}],414:[function(require,module,exports){ 'use strict'; module.exports = Glyphs; @@ -69322,7 +69273,7 @@ function readGlyph(tag, glyph, pbf) { else if (tag === 7) glyph.advance = pbf.readVarint(); } -},{}],418:[function(require,module,exports){ +},{}],415:[function(require,module,exports){ 'use strict'; module.exports = interpolate; @@ -69363,7 +69314,7 @@ interpolate.array = function(from, to, t) { }); }; -},{}],419:[function(require,module,exports){ +},{}],416:[function(require,module,exports){ 'use strict'; module.exports = { @@ -69529,7 +69480,7 @@ function polygonContainsPoint(ring, p) { return c; } -},{}],420:[function(require,module,exports){ +},{}],417:[function(require,module,exports){ 'use strict'; module.exports = LRUCache; @@ -69654,7 +69605,7 @@ LRUCache.prototype.setMaxSize = function(max) { return this; }; -},{}],421:[function(require,module,exports){ +},{}],418:[function(require,module,exports){ 'use strict'; var config = require('./config'); @@ -69782,7 +69733,7 @@ function replaceTempAccessToken(query) { } } -},{"./browser":408,"./config":413,"./util":424,"url":525}],422:[function(require,module,exports){ +},{"./browser":405,"./config":410,"./util":421,"url":522}],419:[function(require,module,exports){ 'use strict'; // Note: all "sizes" are measured in bytes @@ -70130,7 +70081,7 @@ StructArray.prototype.toArray = function(startIndex, endIndex) { return array; }; -},{"assert":40}],423:[function(require,module,exports){ +},{"assert":37}],420:[function(require,module,exports){ 'use strict'; module.exports = resolveTokens; @@ -70149,7 +70100,7 @@ function resolveTokens(properties, text) { }); } -},{}],424:[function(require,module,exports){ +},{}],421:[function(require,module,exports){ 'use strict'; var UnitBezier = require('unitbezier'); @@ -70608,7 +70559,7 @@ exports.warnOnce = function(message) { } }; -},{"../geo/coordinate":320,"unitbezier":524}],425:[function(require,module,exports){ +},{"../geo/coordinate":317,"unitbezier":521}],422:[function(require,module,exports){ 'use strict'; module.exports = Feature; @@ -70653,7 +70604,7 @@ Feature.prototype = { } }; -},{}],426:[function(require,module,exports){ +},{}],423:[function(require,module,exports){ module.exports={ "_args": [ [ @@ -70694,7 +70645,6 @@ module.exports={ "type": "range" }, "_requiredBy": [ - "#USER", "/" ], "_resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz", @@ -70994,7 +70944,7 @@ module.exports={ "version": "0.22.1" } -},{}],427:[function(require,module,exports){ +},{}],424:[function(require,module,exports){ 'use strict' module.exports = createTable @@ -71060,7 +71010,7 @@ function createTable(dimension) { } return result } -},{"convex-hull":96}],428:[function(require,module,exports){ +},{"convex-hull":93}],425:[function(require,module,exports){ /*jshint unused:true*/ /* Input: matrix ; a 4x4 matrix @@ -71240,7 +71190,7 @@ function combine(out, a, b, scale1, scale2) { out[1] = a[1] * scale1 + b[1] * scale2 out[2] = a[2] * scale1 + b[2] * scale2 } -},{"./normalize":429,"gl-mat4/clone":159,"gl-mat4/create":160,"gl-mat4/determinant":161,"gl-mat4/invert":165,"gl-mat4/transpose":175,"gl-vec3/cross":256,"gl-vec3/dot":257,"gl-vec3/length":258,"gl-vec3/normalize":260}],429:[function(require,module,exports){ +},{"./normalize":426,"gl-mat4/clone":156,"gl-mat4/create":157,"gl-mat4/determinant":158,"gl-mat4/invert":162,"gl-mat4/transpose":172,"gl-vec3/cross":253,"gl-vec3/dot":254,"gl-vec3/length":255,"gl-vec3/normalize":257}],426:[function(require,module,exports){ module.exports = function normalize(out, mat) { var m44 = mat[15] // Cannot normalize. @@ -71251,7 +71201,7 @@ module.exports = function normalize(out, mat) { out[i] = mat[i] * scale return true } -},{}],430:[function(require,module,exports){ +},{}],427:[function(require,module,exports){ var lerp = require('gl-vec3/lerp') var recompose = require('mat4-recompose') @@ -71304,7 +71254,7 @@ function vec3(n) { function vec4() { return [0,0,0,1] } -},{"gl-mat4/determinant":161,"gl-vec3/lerp":259,"mat4-decompose":428,"mat4-recompose":431,"quat-slerp":470}],431:[function(require,module,exports){ +},{"gl-mat4/determinant":158,"gl-vec3/lerp":256,"mat4-decompose":425,"mat4-recompose":428,"quat-slerp":467}],428:[function(require,module,exports){ /* Input: translation ; a 3 component vector scale ; a 3 component vector @@ -71365,207 +71315,206 @@ module.exports = function recomposeMat4(matrix, translation, scale, skew, perspe mat4.scale(matrix, matrix, scale) return matrix } -},{"gl-mat4/create":160,"gl-mat4/fromRotationTranslation":163,"gl-mat4/identity":164,"gl-mat4/multiply":167,"gl-mat4/scale":173,"gl-mat4/translate":174}],432:[function(require,module,exports){ -'use strict' - -var bsearch = require('binary-search-bounds') -var m4interp = require('mat4-interpolate') -var invert44 = require('gl-mat4/invert') -var rotateX = require('gl-mat4/rotateX') -var rotateY = require('gl-mat4/rotateY') -var rotateZ = require('gl-mat4/rotateZ') -var lookAt = require('gl-mat4/lookAt') -var translate = require('gl-mat4/translate') -var scale = require('gl-mat4/scale') -var normalize = require('gl-vec3/normalize') - -var DEFAULT_CENTER = [0,0,0] - -module.exports = createMatrixCameraController - -function MatrixCameraController(initialMatrix) { - this._components = initialMatrix.slice() - this._time = [0] - this.prevMatrix = initialMatrix.slice() - this.nextMatrix = initialMatrix.slice() - this.computedMatrix = initialMatrix.slice() - this.computedInverse = initialMatrix.slice() - this.computedEye = [0,0,0] - this.computedUp = [0,0,0] - this.computedCenter = [0,0,0] - this.computedRadius = [0] - this._limits = [-Infinity, Infinity] -} - -var proto = MatrixCameraController.prototype - -proto.recalcMatrix = function(t) { - var time = this._time - var tidx = bsearch.le(time, t) - var mat = this.computedMatrix - if(tidx < 0) { - return - } - var comps = this._components - if(tidx === time.length-1) { - var ptr = 16*tidx - for(var i=0; i<16; ++i) { - mat[i] = comps[ptr++] - } - } else { - var dt = (time[tidx+1] - time[tidx]) - var ptr = 16*tidx - var prev = this.prevMatrix - var allEqual = true - for(var i=0; i<16; ++i) { - prev[i] = comps[ptr++] - } - var next = this.nextMatrix - for(var i=0; i<16; ++i) { - next[i] = comps[ptr++] - allEqual = allEqual && (prev[i] === next[i]) - } - if(dt < 1e-6 || allEqual) { - for(var i=0; i<16; ++i) { - mat[i] = prev[i] - } - } else { - m4interp(mat, prev, next, (t - time[tidx])/dt) - } - } - - var up = this.computedUp - up[0] = mat[1] - up[1] = mat[5] - up[2] = mat[9] - normalize(up, up) - - var imat = this.computedInverse - invert44(imat, mat) - var eye = this.computedEye - var w = imat[15] - eye[0] = imat[12]/w - eye[1] = imat[13]/w - eye[2] = imat[14]/w - - var center = this.computedCenter - var radius = Math.exp(this.computedRadius[0]) - for(var i=0; i<3; ++i) { - center[i] = eye[i] - mat[2+4*i] * radius - } -} - -proto.idle = function(t) { - if(t < this.lastT()) { - return - } - var mc = this._components - var ptr = mc.length-16 - for(var i=0; i<16; ++i) { - mc.push(mc[ptr++]) - } - this._time.push(t) -} - -proto.flush = function(t) { - var idx = bsearch.gt(this._time, t) - 2 - if(idx < 0) { - return - } - this._time.splice(0, idx) - this._components.splice(0, 16*idx) -} - -proto.lastT = function() { - return this._time[this._time.length-1] -} - -proto.lookAt = function(t, eye, center, up) { - this.recalcMatrix(t) - eye = eye || this.computedEye - center = center || DEFAULT_CENTER - up = up || this.computedUp - this.setMatrix(t, lookAt(this.computedMatrix, eye, center, up)) - var d2 = 0.0 - for(var i=0; i<3; ++i) { - d2 += Math.pow(center[i] - eye[i], 2) - } - d2 = Math.log(Math.sqrt(d2)) - this.computedRadius[0] = d2 -} - -proto.rotate = function(t, yaw, pitch, roll) { - this.recalcMatrix(t) - var mat = this.computedInverse - if(yaw) rotateY(mat, mat, yaw) - if(pitch) rotateX(mat, mat, pitch) - if(roll) rotateZ(mat, mat, roll) - this.setMatrix(t, invert44(this.computedMatrix, mat)) -} - -var tvec = [0,0,0] - -proto.pan = function(t, dx, dy, dz) { - tvec[0] = -(dx || 0.0) - tvec[1] = -(dy || 0.0) - tvec[2] = -(dz || 0.0) - this.recalcMatrix(t) - var mat = this.computedInverse - translate(mat, mat, tvec) - this.setMatrix(t, invert44(mat, mat)) -} - -proto.translate = function(t, dx, dy, dz) { - tvec[0] = dx || 0.0 - tvec[1] = dy || 0.0 - tvec[2] = dz || 0.0 - this.recalcMatrix(t) - var mat = this.computedMatrix - translate(mat, mat, tvec) - this.setMatrix(t, mat) -} - -proto.setMatrix = function(t, mat) { - if(t < this.lastT()) { - return - } - this._time.push(t) - for(var i=0; i<16; ++i) { - this._components.push(mat[i]) - } -} - -proto.setDistance = function(t, d) { - this.computedRadius[0] = d -} - -proto.setDistanceLimits = function(a,b) { - var lim = this._limits - lim[0] = a - lim[1] = b -} - -proto.getDistanceLimits = function(out) { - var lim = this._limits - if(out) { - out[0] = lim[0] - out[1] = lim[1] - return out - } - return lim -} - -function createMatrixCameraController(options) { - options = options || {} - var matrix = options.matrix || - [1,0,0,0, - 0,1,0,0, - 0,0,1,0, - 0,0,0,1] - return new MatrixCameraController(matrix) -} +},{"gl-mat4/create":157,"gl-mat4/fromRotationTranslation":160,"gl-mat4/identity":161,"gl-mat4/multiply":164,"gl-mat4/scale":170,"gl-mat4/translate":171}],429:[function(require,module,exports){ +'use strict' + +var bsearch = require('binary-search-bounds') +var m4interp = require('mat4-interpolate') +var invert44 = require('gl-mat4/invert') +var rotateX = require('gl-mat4/rotateX') +var rotateY = require('gl-mat4/rotateY') +var rotateZ = require('gl-mat4/rotateZ') +var lookAt = require('gl-mat4/lookAt') +var translate = require('gl-mat4/translate') +var scale = require('gl-mat4/scale') +var normalize = require('gl-vec3/normalize') + +var DEFAULT_CENTER = [0,0,0] + +module.exports = createMatrixCameraController + +function MatrixCameraController(initialMatrix) { + this._components = initialMatrix.slice() + this._time = [0] + this.prevMatrix = initialMatrix.slice() + this.nextMatrix = initialMatrix.slice() + this.computedMatrix = initialMatrix.slice() + this.computedInverse = initialMatrix.slice() + this.computedEye = [0,0,0] + this.computedUp = [0,0,0] + this.computedCenter = [0,0,0] + this.computedRadius = [0] + this._limits = [-Infinity, Infinity] +} + +var proto = MatrixCameraController.prototype + +proto.recalcMatrix = function(t) { + var time = this._time + var tidx = bsearch.le(time, t) + var mat = this.computedMatrix + if(tidx < 0) { + return + } + var comps = this._components + if(tidx === time.length-1) { + var ptr = 16*tidx + for(var i=0; i<16; ++i) { + mat[i] = comps[ptr++] + } + } else { + var dt = (time[tidx+1] - time[tidx]) + var ptr = 16*tidx + var prev = this.prevMatrix + var allEqual = true + for(var i=0; i<16; ++i) { + prev[i] = comps[ptr++] + } + var next = this.nextMatrix + for(var i=0; i<16; ++i) { + next[i] = comps[ptr++] + allEqual = allEqual && (prev[i] === next[i]) + } + if(dt < 1e-6 || allEqual) { + for(var i=0; i<16; ++i) { + mat[i] = prev[i] + } + } else { + m4interp(mat, prev, next, (t - time[tidx])/dt) + } + } + + var up = this.computedUp + up[0] = mat[1] + up[1] = mat[5] + up[2] = mat[6] + normalize(up, up) -},{"binary-search-bounds":59,"gl-mat4/invert":165,"gl-mat4/lookAt":166,"gl-mat4/rotateX":170,"gl-mat4/rotateY":171,"gl-mat4/rotateZ":172,"gl-mat4/scale":173,"gl-mat4/translate":174,"gl-vec3/normalize":260,"mat4-interpolate":430}],433:[function(require,module,exports){ + var imat = this.computedInverse + invert44(imat, mat) + var eye = this.computedEye + var w = imat[15] + eye[0] = imat[12]/w + eye[1] = imat[13]/w + eye[2] = imat[14]/w + + var center = this.computedCenter + var radius = Math.exp(this.computedRadius[0]) + for(var i=0; i<3; ++i) { + center[i] = eye[i] - mat[2+4*i] * radius + } +} + +proto.idle = function(t) { + if(t < this.lastT()) { + return + } + var mc = this._components + var ptr = mc.length-16 + for(var i=0; i<16; ++i) { + mc.push(mc[ptr++]) + } + this._time.push(t) +} + +proto.flush = function(t) { + var idx = bsearch.gt(this._time, t) - 2 + if(idx < 0) { + return + } + this._time.slice(0, idx) + this._components.slice(0, 16*idx) +} + +proto.lastT = function() { + return this._time[this._time.length-1] +} + +proto.lookAt = function(t, eye, center, up) { + this.recalcMatrix(t) + eye = eye || this.computedEye + center = center || DEFAULT_CENTER + up = up || this.computedUp + this.setMatrix(t, lookAt(this.computedMatrix, eye, center, up)) + var d2 = 0.0 + for(var i=0; i<3; ++i) { + d2 += Math.pow(center[i] - eye[i], 2) + } + d2 = Math.log(Math.sqrt(d2)) + this.computedRadius[0] = d2 +} + +proto.rotate = function(t, yaw, pitch, roll) { + this.recalcMatrix(t) + var mat = this.computedInverse + if(yaw) rotateY(mat, mat, yaw) + if(pitch) rotateX(mat, mat, pitch) + if(roll) rotateZ(mat, mat, roll) + this.setMatrix(t, invert44(this.computedMatrix, mat)) +} + +var tvec = [0,0,0] + +proto.pan = function(t, dx, dy, dz) { + tvec[0] = -(dx || 0.0) + tvec[1] = -(dy || 0.0) + tvec[2] = -(dz || 0.0) + this.recalcMatrix(t) + var mat = this.computedInverse + translate(mat, mat, tvec) + this.setMatrix(t, invert44(mat, mat)) +} + +proto.translate = function(t, dx, dy, dz) { + tvec[0] = dx || 0.0 + tvec[1] = dy || 0.0 + tvec[2] = dz || 0.0 + this.recalcMatrix(t) + var mat = this.computedMatrix + translate(mat, mat, tvec) + this.setMatrix(t, mat) +} + +proto.setMatrix = function(t, mat) { + if(t < this.lastT()) { + return + } + this._time.push(t) + for(var i=0; i<16; ++i) { + this._components.push(mat[i]) + } +} + +proto.setDistance = function(t, d) { + this.computedRadius[0] = d +} + +proto.setDistanceLimits = function(a,b) { + var lim = this._limits + lim[0] = a + lim[1] = b +} + +proto.getDistanceLimits = function(out) { + var lim = this._limits + if(out) { + out[0] = lim[0] + out[1] = lim[1] + return out + } + return lim +} + +function createMatrixCameraController(options) { + options = options || {} + var matrix = options.matrix || + [1,0,0,0, + 0,1,0,0, + 0,0,1,0, + 0,0,0,1] + return new MatrixCameraController(matrix) +} +},{"binary-search-bounds":56,"gl-mat4/invert":162,"gl-mat4/lookAt":163,"gl-mat4/rotateX":167,"gl-mat4/rotateY":168,"gl-mat4/rotateZ":169,"gl-mat4/scale":170,"gl-mat4/translate":171,"gl-vec3/normalize":257,"mat4-interpolate":427}],430:[function(require,module,exports){ 'use strict' module.exports = monotoneConvexHull2D @@ -71647,7 +71596,7 @@ function monotoneConvexHull2D(points) { //Return result return result } -},{"robust-orientation":489}],434:[function(require,module,exports){ +},{"robust-orientation":486}],431:[function(require,module,exports){ 'use strict' module.exports = mouseListen @@ -71854,7 +71803,7 @@ function mouseListen (element, callback) { return result } -},{"mouse-event":436}],435:[function(require,module,exports){ +},{"mouse-event":433}],432:[function(require,module,exports){ var rootPosition = { left: 0, top: 0 } module.exports = mouseEventOffset @@ -71881,7 +71830,7 @@ function getBoundingClientOffset (element) { } } -},{}],436:[function(require,module,exports){ +},{}],433:[function(require,module,exports){ 'use strict' function mouseButtons(ev) { @@ -71943,7 +71892,7 @@ function mouseRelativeY(ev) { } exports.y = mouseRelativeY -},{}],437:[function(require,module,exports){ +},{}],434:[function(require,module,exports){ 'use strict' var toPX = require('to-px') @@ -71985,7 +71934,7 @@ function mouseWheelListen(element, callback, noScroll) { return listener } -},{"to-px":515}],438:[function(require,module,exports){ +},{"to-px":512}],435:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -72401,7 +72350,7 @@ function createSurfaceExtractor(args) { order, typesig) } -},{"typedarray-pool":521}],439:[function(require,module,exports){ +},{"typedarray-pool":518}],436:[function(require,module,exports){ "use strict" @@ -72413,7 +72362,7 @@ module.exports = function(array, f) { return array } -},{"cwise/lib/wrapper":106}],440:[function(require,module,exports){ +},{"cwise/lib/wrapper":103}],437:[function(require,module,exports){ 'use strict' module.exports = gradient @@ -72711,7 +72660,7 @@ function gradient(out, inp, bc) { var cached = generateGradient(bc) return cached(out, inp) } -},{"cwise-compiler":103,"dup":110}],441:[function(require,module,exports){ +},{"cwise-compiler":100,"dup":107}],438:[function(require,module,exports){ 'use strict' var warp = require('ndarray-warp') @@ -72741,7 +72690,7 @@ function applyHomography(dest, src, Xi) { }) return dest } -},{"gl-matrix-invert":176,"ndarray-warp":448}],442:[function(require,module,exports){ +},{"gl-matrix-invert":173,"ndarray-warp":445}],439:[function(require,module,exports){ "use strict" function interp1d(arr, x) { @@ -72852,7 +72801,7 @@ module.exports.d1 = interp1d module.exports.d2 = interp2d module.exports.d3 = interp3d -},{}],443:[function(require,module,exports){ +},{}],440:[function(require,module,exports){ "use strict" var compile = require("cwise-compiler") @@ -73315,7 +73264,7 @@ exports.equals = compile({ -},{"cwise-compiler":103}],444:[function(require,module,exports){ +},{"cwise-compiler":100}],441:[function(require,module,exports){ "use strict" var ndarray = require("ndarray") @@ -73338,10 +73287,10 @@ module.exports = function convert(arr, result) { return result } -},{"./doConvert.js":445,"ndarray":449}],445:[function(require,module,exports){ +},{"./doConvert.js":442,"ndarray":446}],442:[function(require,module,exports){ module.exports=require('cwise-compiler')({"args":["array","scalar","index"],"pre":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"body":{"body":"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}","args":[{"name":"_inline_1_arg0_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_1_arg1_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_1_arg2_","lvalue":false,"rvalue":true,"count":4}],"thisVars":[],"localVars":["_inline_1_i","_inline_1_v"]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"funcName":"convert","blockSize":64}) -},{"cwise-compiler":103}],446:[function(require,module,exports){ +},{"cwise-compiler":100}],443:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -74070,7 +74019,7 @@ function compileSort(order, dtype) { } module.exports = compileSort -},{"typedarray-pool":521}],447:[function(require,module,exports){ +},{"typedarray-pool":518}],444:[function(require,module,exports){ "use strict" var compile = require("./lib/compile_sort.js") @@ -74090,7 +74039,7 @@ function sort(array) { } module.exports = sort -},{"./lib/compile_sort.js":446}],448:[function(require,module,exports){ +},{"./lib/compile_sort.js":443}],445:[function(require,module,exports){ 'use strict' var interp = require('ndarray-linear-interpolate') @@ -74122,7 +74071,7 @@ module.exports = function warp(dest, src, func) { return dest } -},{"cwise/lib/wrapper":106,"ndarray-linear-interpolate":442}],449:[function(require,module,exports){ +},{"cwise/lib/wrapper":103,"ndarray-linear-interpolate":439}],446:[function(require,module,exports){ var iota = require("iota-array") var isBuffer = require("is-buffer") @@ -74467,7 +74416,7 @@ function wrappedNDArrayCtor(data, shape, stride, offset) { module.exports = wrappedNDArrayCtor -},{"iota-array":276,"is-buffer":277}],450:[function(require,module,exports){ +},{"iota-array":273,"is-buffer":274}],447:[function(require,module,exports){ "use strict" var doubleBits = require("double-bits") @@ -74510,7 +74459,7 @@ function nextafter(x, y) { } return doubleBits.pack(lo, hi) } -},{"double-bits":109}],451:[function(require,module,exports){ +},{"double-bits":106}],448:[function(require,module,exports){ var DEFAULT_NORMALS_EPSILON = 1e-6; var DEFAULT_FACE_EPSILON = 1e-6; @@ -74635,7 +74584,7 @@ exports.faceNormals = function(faces, positions, specifiedEpsilon) { -},{}],452:[function(require,module,exports){ +},{}],449:[function(require,module,exports){ /* object-assign (c) Sindre Sorhus @@ -74727,7 +74676,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { return to; }; -},{}],453:[function(require,module,exports){ +},{}],450:[function(require,module,exports){ 'use strict' module.exports = quatFromFrame @@ -74769,7 +74718,7 @@ function quatFromFrame( } return out } -},{}],454:[function(require,module,exports){ +},{}],451:[function(require,module,exports){ 'use strict' module.exports = createOrbitController @@ -75163,7 +75112,7 @@ function createOrbitController(options) { return result } -},{"./lib/quatFromFrame":453,"filtered-vector":118,"gl-mat4/fromQuat":162,"gl-mat4/invert":165,"gl-mat4/lookAt":166}],455:[function(require,module,exports){ +},{"./lib/quatFromFrame":450,"filtered-vector":115,"gl-mat4/fromQuat":159,"gl-mat4/invert":162,"gl-mat4/lookAt":163}],452:[function(require,module,exports){ /*! * pad-left * @@ -75179,7 +75128,7 @@ module.exports = function padLeft(str, num, ch) { ch = typeof ch !== 'undefined' ? (ch + '') : ' '; return repeat(ch, num) + str; }; -},{"repeat-string":481}],456:[function(require,module,exports){ +},{"repeat-string":478}],453:[function(require,module,exports){ module.exports = function parseUnit(str, out) { if (!out) out = [ 0, '' ] @@ -75190,7 +75139,7 @@ module.exports = function parseUnit(str, out) { out[1] = str.match(/[\d.\-\+]*\s*(.*)/)[1] || '' return out } -},{}],457:[function(require,module,exports){ +},{}],454:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -75418,7 +75367,7 @@ var substr = 'ab'.substr(-1) === 'b' ; }).call(this,require('_process')) -},{"_process":468}],458:[function(require,module,exports){ +},{"_process":465}],455:[function(require,module,exports){ 'use strict'; // lightweight Buffer shim for pbf browser build @@ -75579,7 +75528,7 @@ function encodeString(str) { return bytes; } -},{"ieee754":272}],459:[function(require,module,exports){ +},{"ieee754":269}],456:[function(require,module,exports){ (function (global){ 'use strict'; @@ -76005,7 +75954,7 @@ function writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pb function writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./buffer":458}],460:[function(require,module,exports){ +},{"./buffer":455}],457:[function(require,module,exports){ "use strict" module.exports = permutationSign @@ -76057,7 +76006,7 @@ function permutationSign(p) { return sgn } } -},{"typedarray-pool":521}],461:[function(require,module,exports){ +},{"typedarray-pool":518}],458:[function(require,module,exports){ "use strict" var pool = require("typedarray-pool") @@ -76144,7 +76093,7 @@ function unrank(n, r, p) { exports.rank = rank exports.unrank = unrank -},{"invert-permutation":275,"typedarray-pool":521}],462:[function(require,module,exports){ +},{"invert-permutation":272,"typedarray-pool":518}],459:[function(require,module,exports){ "use strict" module.exports = planarDual @@ -76275,7 +76224,7 @@ function planarDual(cells, positions) { //Combine paths and loops together return cycles } -},{"compare-angle":93}],463:[function(require,module,exports){ +},{"compare-angle":90}],460:[function(require,module,exports){ 'use strict' module.exports = trimLeaves @@ -76331,7 +76280,7 @@ function trimLeaves(edges, positions) { return [ nedges, npositions ] } -},{"edges-to-adjacency-list":112}],464:[function(require,module,exports){ +},{"edges-to-adjacency-list":109}],461:[function(require,module,exports){ 'use strict' module.exports = planarGraphToPolyline @@ -76536,7 +76485,7 @@ function planarGraphToPolyline(edges, positions) { return result } -},{"./lib/trim-leaves":463,"edges-to-adjacency-list":112,"planar-dual":462,"point-in-big-polygon":466,"robust-sum":494,"two-product":519,"uniq":523}],465:[function(require,module,exports){ +},{"./lib/trim-leaves":460,"edges-to-adjacency-list":109,"planar-dual":459,"point-in-big-polygon":463,"robust-sum":491,"two-product":516,"uniq":520}],462:[function(require,module,exports){ 'use strict'; module.exports = Point; @@ -76669,7 +76618,7 @@ Point.convert = function (a) { return a; }; -},{}],466:[function(require,module,exports){ +},{}],463:[function(require,module,exports){ module.exports = preprocessPolygon var orient = require('robust-orientation')[3] @@ -76821,7 +76770,7 @@ function preprocessPolygon(loops) { testSlab) } } -},{"binary-search-bounds":59,"interval-tree-1d":274,"robust-orientation":489,"slab-decomposition":506}],467:[function(require,module,exports){ +},{"binary-search-bounds":56,"interval-tree-1d":271,"robust-orientation":486,"slab-decomposition":503}],464:[function(require,module,exports){ //Optimized version for triangle closest point // Based on Eberly's WildMagick codes // http://www.geometrictools.com/LibMathematics/Distance/Distance.html @@ -77019,7 +76968,7 @@ function closestPoint2d(V0, V1, V2, point, result) { module.exports = closestPoint2d; -},{}],468:[function(require,module,exports){ +},{}],465:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -77201,7 +77150,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],469:[function(require,module,exports){ +},{}],466:[function(require,module,exports){ (function (global){ /*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { @@ -77738,9 +77687,9 @@ process.umask = function() { return 0; }; }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],470:[function(require,module,exports){ +},{}],467:[function(require,module,exports){ module.exports = require('gl-quat/slerp') -},{"gl-quat/slerp":215}],471:[function(require,module,exports){ +},{"gl-quat/slerp":212}],468:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -77826,7 +77775,7 @@ var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; -},{}],472:[function(require,module,exports){ +},{}],469:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -77913,13 +77862,13 @@ var objectKeys = Object.keys || function (obj) { return res; }; -},{}],473:[function(require,module,exports){ +},{}],470:[function(require,module,exports){ 'use strict'; exports.decode = exports.parse = require('./decode'); exports.encode = exports.stringify = require('./encode'); -},{"./decode":471,"./encode":472}],474:[function(require,module,exports){ +},{"./decode":468,"./encode":469}],471:[function(require,module,exports){ 'use strict'; module.exports = partialSort; @@ -77981,7 +77930,7 @@ function defaultCompare(a, b) { return a < b ? -1 : a > b ? 1 : 0; } -},{}],475:[function(require,module,exports){ +},{}],472:[function(require,module,exports){ 'use strict' var bnadd = require('big-rat/add') @@ -77997,7 +77946,7 @@ function add (a, b) { return r } -},{"big-rat/add":43}],476:[function(require,module,exports){ +},{"big-rat/add":40}],473:[function(require,module,exports){ 'use strict' module.exports = float2rat @@ -78012,7 +77961,7 @@ function float2rat(v) { return result } -},{"big-rat":46}],477:[function(require,module,exports){ +},{"big-rat":43}],474:[function(require,module,exports){ 'use strict' var rat = require('big-rat') @@ -78030,7 +77979,7 @@ function muls(a, x) { return r } -},{"big-rat":46,"big-rat/mul":55}],478:[function(require,module,exports){ +},{"big-rat":43,"big-rat/mul":52}],475:[function(require,module,exports){ 'use strict' var bnsub = require('big-rat/sub') @@ -78046,7 +77995,7 @@ function sub(a, b) { return r } -},{"big-rat/sub":57}],479:[function(require,module,exports){ +},{"big-rat/sub":54}],476:[function(require,module,exports){ 'use strict' var compareCell = require('compare-cell') @@ -78079,7 +78028,7 @@ function reduceCellComplex(cells) { return cells } -},{"cell-orientation":78,"compare-cell":94,"compare-oriented-cell":95}],480:[function(require,module,exports){ +},{"cell-orientation":75,"compare-cell":91,"compare-oriented-cell":92}],477:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -87584,7 +87533,7 @@ return wrapREGL; }))); -},{}],481:[function(require,module,exports){ +},{}],478:[function(require,module,exports){ /*! * repeat-string * @@ -87656,7 +87605,7 @@ function repeat(str, num) { return res; } -},{}],482:[function(require,module,exports){ +},{}],479:[function(require,module,exports){ // Copyright 2014 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) @@ -87705,7 +87654,7 @@ void (function(root, factory) { })); -},{}],483:[function(require,module,exports){ +},{}],480:[function(require,module,exports){ (function (global){ module.exports = global.performance && @@ -87716,7 +87665,7 @@ module.exports = } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],484:[function(require,module,exports){ +},{}],481:[function(require,module,exports){ "use strict" module.exports = compressExpansion @@ -87751,7 +87700,7 @@ function compressExpansion(e) { e.length = top return e } -},{}],485:[function(require,module,exports){ +},{}],482:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -87855,7 +87804,7 @@ return robustDeterminant") } generateDispatch() -},{"robust-compress":484,"robust-scale":491,"robust-sum":494,"two-product":519}],486:[function(require,module,exports){ +},{"robust-compress":481,"robust-scale":488,"robust-sum":491,"two-product":516}],483:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -87870,7 +87819,7 @@ function robustDotProduct(a, b) { } return r } -},{"robust-sum":494,"two-product":519}],487:[function(require,module,exports){ +},{"robust-sum":491,"two-product":516}],484:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -88038,7 +87987,7 @@ function generateInSphereTest() { } generateInSphereTest() -},{"robust-scale":491,"robust-subtract":493,"robust-sum":494,"two-product":519}],488:[function(require,module,exports){ +},{"robust-scale":488,"robust-subtract":490,"robust-sum":491,"two-product":516}],485:[function(require,module,exports){ "use strict" var determinant = require("robust-determinant") @@ -88110,7 +88059,7 @@ function generateDispatch() { } generateDispatch() -},{"robust-determinant":485}],489:[function(require,module,exports){ +},{"robust-determinant":482}],486:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -88301,7 +88250,7 @@ function generateOrientationProc() { } generateOrientationProc() -},{"robust-scale":491,"robust-subtract":493,"robust-sum":494,"two-product":519}],490:[function(require,module,exports){ +},{"robust-scale":488,"robust-subtract":490,"robust-sum":491,"two-product":516}],487:[function(require,module,exports){ "use strict" var robustSum = require("robust-sum") @@ -88331,7 +88280,7 @@ function robustProduct(a, b) { } return r } -},{"robust-scale":491,"robust-sum":494}],491:[function(require,module,exports){ +},{"robust-scale":488,"robust-sum":491}],488:[function(require,module,exports){ "use strict" var twoProduct = require("two-product") @@ -88382,7 +88331,7 @@ function scaleLinearExpansion(e, scale) { g.length = count return g } -},{"two-product":519,"two-sum":520}],492:[function(require,module,exports){ +},{"two-product":516,"two-sum":517}],489:[function(require,module,exports){ "use strict" module.exports = segmentsIntersect @@ -88430,7 +88379,7 @@ function segmentsIntersect(a0, a1, b0, b1) { return true } -},{"robust-orientation":489}],493:[function(require,module,exports){ +},{"robust-orientation":486}],490:[function(require,module,exports){ "use strict" module.exports = robustSubtract @@ -88587,7 +88536,7 @@ function robustSubtract(e, f) { g.length = count return g } -},{}],494:[function(require,module,exports){ +},{}],491:[function(require,module,exports){ "use strict" module.exports = linearExpansionSum @@ -88744,7 +88693,7 @@ function linearExpansionSum(e, f) { g.length = count return g } -},{}],495:[function(require,module,exports){ +},{}],492:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -88999,7 +88948,7 @@ Shelf.prototype.resize = function(w) { return ShelfPack; })); -},{}],496:[function(require,module,exports){ +},{}],493:[function(require,module,exports){ "use strict" module.exports = function signum(x) { @@ -89007,7 +88956,7 @@ module.exports = function signum(x) { if(x > 0) { return 1 } return 0.0 } -},{}],497:[function(require,module,exports){ +},{}],494:[function(require,module,exports){ 'use strict' module.exports = boundary @@ -89019,7 +88968,7 @@ function boundary(cells) { return reduce(bnd(cells)) } -},{"boundary-cells":62,"reduce-simplicial-complex":479}],498:[function(require,module,exports){ +},{"boundary-cells":59,"reduce-simplicial-complex":476}],495:[function(require,module,exports){ 'use strict' module.exports = extractContour @@ -89182,7 +89131,7 @@ function extractContour(cells, values, level, d) { vertexWeights: uweights } } -},{"./lib/codegen":499,"ndarray":449,"ndarray-sort":447,"typedarray-pool":521}],499:[function(require,module,exports){ +},{"./lib/codegen":496,"ndarray":446,"ndarray-sort":444,"typedarray-pool":518}],496:[function(require,module,exports){ 'use strict' module.exports = getPolygonizer @@ -89279,7 +89228,7 @@ function getPolygonizer(d) { } return alg } -},{"marching-simplex-table":427,"typedarray-pool":521}],500:[function(require,module,exports){ +},{"marching-simplex-table":424,"typedarray-pool":518}],497:[function(require,module,exports){ "use strict"; "use restrict"; var bits = require("bit-twiddle") @@ -89623,11 +89572,11 @@ function connectedComponents(cells, vertex_count) { } exports.connectedComponents = connectedComponents -},{"bit-twiddle":60,"union-find":522}],501:[function(require,module,exports){ -arguments[4][60][0].apply(exports,arguments) -},{"dup":60}],502:[function(require,module,exports){ -arguments[4][500][0].apply(exports,arguments) -},{"bit-twiddle":501,"dup":500,"union-find":503}],503:[function(require,module,exports){ +},{"bit-twiddle":57,"union-find":519}],498:[function(require,module,exports){ +arguments[4][57][0].apply(exports,arguments) +},{"dup":57}],499:[function(require,module,exports){ +arguments[4][497][0].apply(exports,arguments) +},{"bit-twiddle":498,"dup":497,"union-find":500}],500:[function(require,module,exports){ "use strict"; "use restrict"; module.exports = UnionFind; @@ -89684,7 +89633,7 @@ UnionFind.prototype.link = function(x, y) { } -},{}],504:[function(require,module,exports){ +},{}],501:[function(require,module,exports){ "use strict" module.exports = simplifyPolygon @@ -89956,7 +89905,7 @@ function simplifyPolygon(cells, positions, minArea) { edges: ncells } } -},{"robust-orientation":489,"simplicial-complex":502}],505:[function(require,module,exports){ +},{"robust-orientation":486,"simplicial-complex":499}],502:[function(require,module,exports){ "use strict" module.exports = orderSegments @@ -90052,7 +90001,7 @@ function orderSegments(b, a) { } return ar[0] - br[0] } -},{"robust-orientation":489}],506:[function(require,module,exports){ +},{"robust-orientation":486}],503:[function(require,module,exports){ "use strict" module.exports = createSlabDecomposition @@ -90283,7 +90232,7 @@ function createSlabDecomposition(segments) { } return new SlabDecomposition(slabs, lines, horizontal) } -},{"./lib/order-segments":505,"binary-search-bounds":59,"functional-red-black-tree":120,"robust-orientation":489}],507:[function(require,module,exports){ +},{"./lib/order-segments":502,"binary-search-bounds":56,"functional-red-black-tree":117,"robust-orientation":486}],504:[function(require,module,exports){ "use strict" var robustDot = require("robust-dot-product") @@ -90375,7 +90324,7 @@ function negative(points, plane) { } return neg } -},{"robust-dot-product":486,"robust-sum":494}],508:[function(require,module,exports){ +},{"robust-dot-product":483,"robust-sum":491}],505:[function(require,module,exports){ (function(window) { var re = { not_string: /[^s]/, @@ -90585,7 +90534,7 @@ function negative(points, plane) { } })(typeof window === "undefined" ? this : window); -},{}],509:[function(require,module,exports){ +},{}],506:[function(require,module,exports){ 'use strict'; var kdbush = require('kdbush'); @@ -90919,7 +90868,7 @@ function getY(p) { return p.y; } -},{"kdbush":280}],510:[function(require,module,exports){ +},{"kdbush":277}],507:[function(require,module,exports){ 'use strict' module.exports = toSuperScript @@ -90974,7 +90923,7 @@ function toSuperScript(x) { }).join('') } -},{}],511:[function(require,module,exports){ +},{}],508:[function(require,module,exports){ "use strict" module.exports = surfaceNets @@ -91182,7 +91131,7 @@ function surfaceNets(array,level) { } return proc(array,level) } -},{"ndarray-extract-contour":438,"triangulate-hypercube":517,"zero-crossings":564}],512:[function(require,module,exports){ +},{"ndarray-extract-contour":435,"triangulate-hypercube":514,"zero-crossings":561}],509:[function(require,module,exports){ (function (process){ 'use strict' @@ -91272,7 +91221,7 @@ function textGet(font, text, opts) { } }).call(this,require('_process')) -},{"_process":468,"vectorize-text":534}],513:[function(require,module,exports){ +},{"_process":465,"vectorize-text":531}],510:[function(require,module,exports){ 'use strict'; module.exports = TinySDF; @@ -91381,7 +91330,7 @@ function edt1d(f, d, v, z, n) { } } -},{}],514:[function(require,module,exports){ +},{}],511:[function(require,module,exports){ // TinyColor v1.4.1 // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License @@ -92578,7 +92527,7 @@ else { })(Math); -},{}],515:[function(require,module,exports){ +},{}],512:[function(require,module,exports){ 'use strict' var parseUnit = require('parse-unit') @@ -92639,7 +92588,7 @@ function toPX(str, element) { } return 1 } -},{"parse-unit":456}],516:[function(require,module,exports){ +},{"parse-unit":453}],513:[function(require,module,exports){ // https://github.com/topojson/topojson-client Version 2.1.0. Copyright 2016 Mike Bostock. (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : @@ -93159,7 +93108,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); }))); -},{}],517:[function(require,module,exports){ +},{}],514:[function(require,module,exports){ "use strict" module.exports = triangulateCube @@ -93193,7 +93142,7 @@ function triangulateCube(dimension) { } return result } -},{"gamma":121,"permutation-parity":460,"permutation-rank":461}],518:[function(require,module,exports){ +},{"gamma":118,"permutation-parity":457,"permutation-rank":458}],515:[function(require,module,exports){ 'use strict' module.exports = createTurntableController @@ -93766,7 +93715,7 @@ function createTurntableController(options) { theta, phi) } -},{"filtered-vector":118,"gl-mat4/invert":165,"gl-mat4/rotate":169,"gl-vec3/cross":256,"gl-vec3/dot":257,"gl-vec3/normalize":260}],519:[function(require,module,exports){ +},{"filtered-vector":115,"gl-mat4/invert":162,"gl-mat4/rotate":166,"gl-vec3/cross":253,"gl-vec3/dot":254,"gl-vec3/normalize":257}],516:[function(require,module,exports){ "use strict" module.exports = twoProduct @@ -93800,7 +93749,7 @@ function twoProduct(a, b, result) { return [ y, x ] } -},{}],520:[function(require,module,exports){ +},{}],517:[function(require,module,exports){ "use strict" module.exports = fastTwoSum @@ -93818,7 +93767,7 @@ function fastTwoSum(a, b, result) { } return [ar+br, x] } -},{}],521:[function(require,module,exports){ +},{}],518:[function(require,module,exports){ (function (global,Buffer){ 'use strict' @@ -94035,7 +93984,7 @@ exports.clearCache = function clearCache() { } } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"bit-twiddle":60,"buffer":70,"dup":110}],522:[function(require,module,exports){ +},{"bit-twiddle":57,"buffer":67,"dup":107}],519:[function(require,module,exports){ "use strict"; "use restrict"; module.exports = UnionFind; @@ -94098,7 +94047,7 @@ proto.link = function(x, y) { ++ranks[xr]; } } -},{}],523:[function(require,module,exports){ +},{}],520:[function(require,module,exports){ "use strict" function unique_pred(list, compare) { @@ -94157,7 +94106,7 @@ function unique(list, compare, sorted) { module.exports = unique -},{}],524:[function(require,module,exports){ +},{}],521:[function(require,module,exports){ /* * Copyright (C) 2008 Apple Inc. All Rights Reserved. * @@ -94264,7 +94213,7 @@ UnitBezier.prototype.solve = function(x, epsilon) { return this.sampleCurveY(this.solveCurveX(x, epsilon)); }; -},{}],525:[function(require,module,exports){ +},{}],522:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -94998,7 +94947,7 @@ Url.prototype.parseHost = function() { if (host) this.hostname = host; }; -},{"./util":526,"punycode":469,"querystring":473}],526:[function(require,module,exports){ +},{"./util":523,"punycode":466,"querystring":470}],523:[function(require,module,exports){ 'use strict'; module.exports = { @@ -95016,7 +94965,7 @@ module.exports = { } }; -},{}],527:[function(require,module,exports){ +},{}],524:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -95041,14 +94990,14 @@ if (typeof Object.create === 'function') { } } -},{}],528:[function(require,module,exports){ +},{}],525:[function(require,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } -},{}],529:[function(require,module,exports){ +},{}],526:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -95638,12 +95587,12 @@ function hasOwnProperty(obj, prop) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":528,"_process":468,"inherits":527}],530:[function(require,module,exports){ +},{"./support/isBuffer":525,"_process":465,"inherits":524}],527:[function(require,module,exports){ module.exports.VectorTile = require('./lib/vectortile.js'); module.exports.VectorTileFeature = require('./lib/vectortilefeature.js'); module.exports.VectorTileLayer = require('./lib/vectortilelayer.js'); -},{"./lib/vectortile.js":531,"./lib/vectortilefeature.js":532,"./lib/vectortilelayer.js":533}],531:[function(require,module,exports){ +},{"./lib/vectortile.js":528,"./lib/vectortilefeature.js":529,"./lib/vectortilelayer.js":530}],528:[function(require,module,exports){ 'use strict'; var VectorTileLayer = require('./vectortilelayer'); @@ -95662,7 +95611,7 @@ function readTile(tag, layers, pbf) { } -},{"./vectortilelayer":533}],532:[function(require,module,exports){ +},{"./vectortilelayer":530}],529:[function(require,module,exports){ 'use strict'; var Point = require('point-geometry'); @@ -95897,7 +95846,7 @@ function signedArea(ring) { return sum; } -},{"point-geometry":465}],533:[function(require,module,exports){ +},{"point-geometry":462}],530:[function(require,module,exports){ 'use strict'; var VectorTileFeature = require('./vectortilefeature.js'); @@ -95960,7 +95909,7 @@ VectorTileLayer.prototype.feature = function(i) { return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values); }; -},{"./vectortilefeature.js":532}],534:[function(require,module,exports){ +},{"./vectortilefeature.js":529}],531:[function(require,module,exports){ "use strict" module.exports = createText @@ -95987,7 +95936,7 @@ function createText(str, options) { options) } -},{"./lib/vtext":535}],535:[function(require,module,exports){ +},{"./lib/vtext":532}],532:[function(require,module,exports){ "use strict" module.exports = vectorizeText @@ -96193,7 +96142,7 @@ function vectorizeText(str, canvas, context, options) { return processPixels(pixels, options, size) } -},{"cdt2d":72,"clean-pslg":82,"ndarray":449,"planar-graph-to-polyline":464,"simplify-planar-graph":504,"surface-nets":511}],536:[function(require,module,exports){ +},{"cdt2d":69,"clean-pslg":79,"ndarray":446,"planar-graph-to-polyline":461,"simplify-planar-graph":501,"surface-nets":508}],533:[function(require,module,exports){ var Pbf = require('pbf') var vtpb = require('./vector-tile-pb') var GeoJSONWrapper = require('./lib/geojson_wrapper') @@ -96349,7 +96298,7 @@ function wrapValue (value) { return result } -},{"./lib/geojson_wrapper":537,"./vector-tile-pb":538,"pbf":459}],537:[function(require,module,exports){ +},{"./lib/geojson_wrapper":534,"./vector-tile-pb":535,"pbf":456}],534:[function(require,module,exports){ 'use strict' var Point = require('point-geometry') @@ -96417,7 +96366,7 @@ FeatureWrapper.prototype.bbox = function () { FeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON -},{"point-geometry":465,"vector-tile":530}],538:[function(require,module,exports){ +},{"point-geometry":462,"vector-tile":527}],535:[function(require,module,exports){ 'use strict'; // tile ======================================== @@ -96523,7 +96472,7 @@ function writeLayer(layer, pbf) { if (layer.extent !== undefined) pbf.writeVarintField(5, layer.extent); } -},{}],539:[function(require,module,exports){ +},{}],536:[function(require,module,exports){ // Copyright (C) 2011 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -97210,7 +97159,7 @@ function writeLayer(layer, pbf) { } })(); -},{}],540:[function(require,module,exports){ +},{}],537:[function(require,module,exports){ var hiddenStore = require('./hidden-store.js'); module.exports = createStore; @@ -97231,7 +97180,7 @@ function createStore() { }; } -},{"./hidden-store.js":541}],541:[function(require,module,exports){ +},{"./hidden-store.js":538}],538:[function(require,module,exports){ module.exports = hiddenStore; function hiddenStore(obj, key) { @@ -97249,7 +97198,7 @@ function hiddenStore(obj, key) { return store; } -},{}],542:[function(require,module,exports){ +},{}],539:[function(require,module,exports){ // Original - @Gozola. // https://gist.github.com/Gozala/1269991 // This is a reimplemented version (with a few bug fixes). @@ -97280,14 +97229,14 @@ function weakMap() { } } -},{"./create-store.js":540}],543:[function(require,module,exports){ +},{"./create-store.js":537}],540:[function(require,module,exports){ var getContext = require('get-canvas-context') module.exports = function getWebGLContext (opt) { return getContext('webgl', opt) } -},{"get-canvas-context":132}],544:[function(require,module,exports){ +},{"get-canvas-context":129}],541:[function(require,module,exports){ var bundleFn = arguments[3]; var sources = arguments[4]; var cache = arguments[5]; @@ -97370,12 +97319,12 @@ module.exports = function (fn, options) { return worker; }; -},{}],545:[function(require,module,exports){ +},{}],542:[function(require,module,exports){ module.exports.RADIUS = 6378137; module.exports.FLATTENING = 1/298.257223563; module.exports.POLAR_RADIUS = 6356752.3142; -},{}],546:[function(require,module,exports){ +},{}],543:[function(require,module,exports){ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : @@ -97465,7 +97414,7 @@ exports.getMercCoords = getMercCoords; Object.defineProperty(exports, '__esModule', { value: true }); })); -},{}],547:[function(require,module,exports){ +},{}],544:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98198,7 +98147,7 @@ function toSolar(yearOrDate, monthOrResult, day, isIntercalaryOrResult, result) } -},{"../main":561,"object-assign":452}],548:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],545:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98382,7 +98331,7 @@ assign(CopticCalendar.prototype, { main.calendars.coptic = CopticCalendar; -},{"../main":561,"object-assign":452}],549:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],546:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98610,7 +98559,7 @@ var centuries = { main.calendars.discworld = DiscworldCalendar; -},{"../main":561,"object-assign":452}],550:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],547:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -98794,7 +98743,7 @@ assign(EthiopianCalendar.prototype, { main.calendars.ethiopian = EthiopianCalendar; -},{"../main":561,"object-assign":452}],551:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],548:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99068,7 +99017,7 @@ function mod(a, b) { main.calendars.hebrew = HebrewCalendar; -},{"../main":561,"object-assign":452}],552:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],549:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99249,7 +99198,7 @@ assign(IslamicCalendar.prototype, { main.calendars.islamic = IslamicCalendar; -},{"../main":561,"object-assign":452}],553:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],550:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99432,7 +99381,7 @@ assign(JulianCalendar.prototype, { main.calendars.julian = JulianCalendar; -},{"../main":561,"object-assign":452}],554:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],551:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99727,7 +99676,7 @@ function amod(a, b) { main.calendars.mayan = MayanCalendar; -},{"../main":561,"object-assign":452}],555:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],552:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -99907,7 +99856,7 @@ assign(NanakshahiCalendar.prototype, { main.calendars.nanakshahi = NanakshahiCalendar; -},{"../main":561,"object-assign":452}],556:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],553:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100330,7 +100279,7 @@ assign(NepaliCalendar.prototype, { main.calendars.nepali = NepaliCalendar; -},{"../main":561,"object-assign":452}],557:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],554:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100520,7 +100469,7 @@ main.calendars.persian = PersianCalendar; main.calendars.jalali = PersianCalendar; -},{"../main":561,"object-assign":452}],558:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],555:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100706,7 +100655,7 @@ assign(TaiwanCalendar.prototype, { main.calendars.taiwan = TaiwanCalendar; -},{"../main":561,"object-assign":452}],559:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],556:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -100892,7 +100841,7 @@ assign(ThaiCalendar.prototype, { main.calendars.thai = ThaiCalendar; -},{"../main":561,"object-assign":452}],560:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],557:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -101257,7 +101206,7 @@ var ummalqura_dat = [ 79990]; -},{"../main":561,"object-assign":452}],561:[function(require,module,exports){ +},{"../main":558,"object-assign":449}],558:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102162,7 +102111,7 @@ _exports.baseCalendar = BaseCalendar; _exports.calendars.gregorian = GregorianCalendar; -},{"object-assign":452}],562:[function(require,module,exports){ +},{"object-assign":449}],559:[function(require,module,exports){ /* * World Calendars * https://github.com/alexcjohnson/world-calendars @@ -102664,7 +102613,7 @@ assign(main.baseCalendar.prototype, { }); -},{"./main":561,"object-assign":452}],563:[function(require,module,exports){ +},{"./main":558,"object-assign":449}],560:[function(require,module,exports){ module.exports = require('cwise-compiler')({ args: ['array', { offset: [1], @@ -102716,7 +102665,7 @@ module.exports = require('cwise-compiler')({ funcName: 'zeroCrossings' }) -},{"cwise-compiler":103}],564:[function(require,module,exports){ +},{"cwise-compiler":100}],561:[function(require,module,exports){ "use strict" module.exports = findZeroCrossings @@ -102729,7 +102678,7 @@ function findZeroCrossings(array, level) { core(array.hi(array.shape[0]-1), cross, level) return cross } -},{"./lib/zc-core":563}],565:[function(require,module,exports){ +},{"./lib/zc-core":560}],562:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -102744,7 +102693,6 @@ function findZeroCrossings(array, level) { var Lib = require('../../lib'); var Color = require('../color'); var Axes = require('../../plots/cartesian/axes'); -var constants = require('../../plots/cartesian/constants'); var attributes = require('./attributes'); @@ -102763,7 +102711,8 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op if(!(visible || clickToShow)) return annOut; coerce('opacity'); - var bgColor = coerce('bgcolor'); + coerce('align'); + coerce('bgcolor'); var borderColor = coerce('bordercolor'), borderOpacity = Color.opacity(borderColor); @@ -102777,12 +102726,6 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op coerce('textangle'); Lib.coerceFont(coerce, 'font', fullLayout.font); - coerce('width'); - coerce('align'); - - var h = coerce('height'); - if(h) coerce('valign'); - // positioning var axLetters = ['x', 'y'], arrowPosDflt = [-10, -30], @@ -102815,9 +102758,6 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op // xanchor, yanchor coerce(axLetter + 'anchor'); - - // xshift, yshift - coerce(axLetter + 'shift'); } // if you have one coordinate you should have both @@ -102844,23 +102784,10 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op annOut._yclick = (yClick === undefined) ? annOut.y : yClick; } - var hoverText = coerce('hovertext'); - if(hoverText) { - var hoverBG = coerce('hoverlabel.bgcolor', - Color.opacity(bgColor) ? Color.rgb(bgColor) : Color.defaultLine); - var hoverBorder = coerce('hoverlabel.bordercolor', Color.contrast(hoverBG)); - Lib.coerceFont(coerce, 'hoverlabel.font', { - family: constants.HOVERFONT, - size: constants.HOVERFONTSIZE, - color: hoverBorder - }); - } - coerce('captureevents', !!hoverText); - return annOut; }; -},{"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/constants":729,"../color":578,"./attributes":567}],566:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../color":575,"./attributes":564}],563:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -102925,7 +102852,7 @@ module.exports = [ } ]; -},{}],567:[function(require,module,exports){ +},{}],564:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -102966,20 +102893,6 @@ module.exports = { font: extendFlat({}, fontAttrs, { }), - width: { - valType: 'number', - min: 1, - dflt: null, - - - }, - height: { - valType: 'number', - min: 1, - dflt: null, - - - }, opacity: { valType: 'number', min: 0, @@ -102994,13 +102907,6 @@ module.exports = { dflt: 'center', - }, - valign: { - valType: 'enumerated', - values: ['top', 'middle', 'bottom'], - dflt: 'middle', - - }, bgcolor: { valType: 'color', @@ -103119,12 +103025,6 @@ module.exports = { dflt: 'auto', - }, - xshift: { - valType: 'number', - dflt: 0, - - }, yref: { valType: 'enumerated', @@ -103146,12 +103046,6 @@ module.exports = { dflt: 'auto', - }, - yshift: { - valType: 'number', - dflt: 0, - - }, clicktoshow: { valType: 'enumerated', @@ -103169,31 +103063,6 @@ module.exports = { valType: 'any', - }, - hovertext: { - valType: 'string', - - - }, - hoverlabel: { - bgcolor: { - valType: 'color', - - - }, - bordercolor: { - valType: 'color', - - - }, - font: extendFlat({}, fontAttrs, { - - }) - }, - captureevents: { - valType: 'boolean', - - }, _deprecated: { @@ -103205,7 +103074,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../../plots/cartesian/constants":729,"../../plots/font_attributes":748,"./arrow_paths":566}],568:[function(require,module,exports){ +},{"../../lib/extend":672,"../../plots/cartesian/constants":724,"../../plots/font_attributes":739,"./arrow_paths":563}],565:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103258,17 +103127,12 @@ function annAutorange(gd) { ya = Axes.getFromId(gd, ann.yref), headSize = 3 * ann.arrowsize * ann.arrowwidth || 0; - var headPlus, headMinus; - if(xa && xa.autorange) { - headPlus = headSize + ann.xshift; - headMinus = headSize - ann.xshift; - if(ann.axref === ann.xref) { // expand for the arrowhead (padded by arrowhead) Axes.expand(xa, [xa.r2c(ann.x)], { - ppadplus: headPlus, - ppadminus: headMinus + ppadplus: headSize, + ppadminus: headSize }); // again for the textbox (padded by textbox) Axes.expand(xa, [xa.r2c(ann.ax)], { @@ -103278,20 +103142,17 @@ function annAutorange(gd) { } else { Axes.expand(xa, [xa.r2c(ann.x)], { - ppadplus: Math.max(ann._xpadplus, headPlus), - ppadminus: Math.max(ann._xpadminus, headMinus) + ppadplus: Math.max(ann._xpadplus, headSize), + ppadminus: Math.max(ann._xpadminus, headSize) }); } } if(ya && ya.autorange) { - headPlus = headSize - ann.yshift; - headMinus = headSize + ann.yshift; - if(ann.ayref === ann.yref) { Axes.expand(ya, [ya.r2c(ann.y)], { - ppadplus: headPlus, - ppadminus: headMinus + ppadplus: headSize, + ppadminus: headSize }); Axes.expand(ya, [ya.r2c(ann.ay)], { ppadplus: ann._ypadplus, @@ -103300,15 +103161,15 @@ function annAutorange(gd) { } else { Axes.expand(ya, [ya.r2c(ann.y)], { - ppadplus: Math.max(ann._ypadplus, headPlus), - ppadminus: Math.max(ann._ypadminus, headMinus) + ppadplus: Math.max(ann._ypadplus, headSize), + ppadminus: Math.max(ann._ypadminus, headSize) }); } } }); } -},{"../../lib":685,"../../plots/cartesian/axes":724,"./draw":572}],569:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"./draw":569}],566:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103433,7 +103294,7 @@ function getToggleSets(gd, hoverData) { return {on: onSet, off: offSet, explicitOff: explicitOffSet}; } -},{"../../plotly":719}],570:[function(require,module,exports){ +},{"../../plotly":714}],567:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103496,7 +103357,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":705,"fast-isnumeric":116}],571:[function(require,module,exports){ +},{"../../lib/to_log_range":700,"fast-isnumeric":113}],568:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103521,7 +103382,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { handleArrayContainerDefaults(layoutIn, layoutOut, opts); }; -},{"../../plots/array_container_defaults":721,"./annotation_defaults":565}],572:[function(require,module,exports){ +},{"../../plots/array_container_defaults":716,"./annotation_defaults":562}],569:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -103539,7 +103400,6 @@ var Plotly = require('../../plotly'); var Plots = require('../../plots/plots'); var Lib = require('../../lib'); var Axes = require('../../plots/cartesian/axes'); -var Fx = require('../../plots/cartesian/graph_interact'); var Color = require('../color'); var Drawing = require('../drawing'); var svgTextUtils = require('../../lib/svg_text_utils'); @@ -103597,14 +103457,9 @@ function drawOne(gd, index) { var optionsIn = (layout.annotations || [])[index], options = fullLayout.annotations[index]; - var annClipID = 'clip' + fullLayout._uid + '_ann' + index; - // this annotation is gone - quit now after deleting it // TODO: use d3 idioms instead of deleting and redrawing every time - if(!optionsIn || options.visible === false) { - d3.selectAll('#' + annClipID).remove(); - return; - } + if(!optionsIn || options.visible === false) return; var xa = Axes.getFromId(gd, options.xref), ya = Axes.getFromId(gd, options.yref), @@ -103621,16 +103476,7 @@ function drawOne(gd, index) { var annGroup = fullLayout._infolayer.append('g') .classed('annotation', true) .attr('data-index', String(index)) - .style('opacity', options.opacity); - - // another group for text+background so that they can rotate together - var annTextGroup = annGroup.append('g') - .classed('annotation-text-g', true) - .attr('data-index', String(index)); - - var annTextGroupInner = annTextGroup.append('g') - .style('pointer-events', options.captureevents ? 'all' : null) - .call(setCursor, 'default') + .style('opacity', options.opacity) .on('click', function() { gd._dragging = false; gd.emit('plotly_clickannotation', { @@ -103640,33 +103486,12 @@ function drawOne(gd, index) { }); }); - if(options.hovertext) { - annTextGroupInner - .on('mouseover', function() { - var hoverOptions = options.hoverlabel; - var hoverFont = hoverOptions.font; - var bBox = this.getBoundingClientRect(); - var bBoxRef = gd.getBoundingClientRect(); + // another group for text+background so that they can rotate together + var annTextGroup = annGroup.append('g') + .classed('annotation-text-g', true) + .attr('data-index', String(index)); - Fx.loneHover({ - x0: bBox.left - bBoxRef.left, - x1: bBox.right - bBoxRef.left, - y: (bBox.top + bBox.bottom) / 2 - bBoxRef.top, - text: options.hovertext, - color: hoverOptions.bgcolor, - borderColor: hoverOptions.bordercolor, - fontFamily: hoverFont.family, - fontSize: hoverFont.size, - fontColor: hoverFont.color - }, { - container: fullLayout._hoverlayer.node(), - outerContainer: fullLayout._paper.node() - }); - }) - .on('mouseout', function() { - Fx.loneUnhover(fullLayout._hoverlayer.node()); - }); - } + var annTextGroupInner = annTextGroup.append('g'); var borderwidth = options.borderwidth, borderpad = options.borderpad, @@ -103678,18 +103503,6 @@ function drawOne(gd, index) { .call(Color.stroke, options.bordercolor) .call(Color.fill, options.bgcolor); - var isSizeConstrained = options.width || options.height; - - var annTextClip = fullLayout._defs.select('.clips') - .selectAll('#' + annClipID) - .data(isSizeConstrained ? [0] : []); - - annTextClip.enter().append('clipPath') - .classed('annclip', true) - .attr('id', annClipID) - .append('rect'); - annTextClip.exit().remove(); - var font = options.font; var annText = annTextGroupInner.append('text') @@ -103716,21 +103529,19 @@ function drawOne(gd, index) { // at the end, even if their position changes annText.selectAll('tspan.line').attr({y: 0, x: 0}); - var mathjaxGroup = annTextGroupInner.select('.annotation-math-group'); - var hasMathjax = !mathjaxGroup.empty(); - var anntextBB = Drawing.bBox( - (hasMathjax ? mathjaxGroup : annText).node()); - var textWidth = anntextBB.width; - var textHeight = anntextBB.height; - var annWidth = options.width || textWidth; - var annHeight = options.height || textHeight; - var outerWidth = Math.round(annWidth + 2 * borderfull); - var outerHeight = Math.round(annHeight + 2 * borderfull); + var mathjaxGroup = annTextGroupInner.select('.annotation-math-group'), + hasMathjax = !mathjaxGroup.empty(), + anntextBB = Drawing.bBox( + (hasMathjax ? mathjaxGroup : annText).node()), + annwidth = anntextBB.width, + annheight = anntextBB.height, + outerwidth = Math.round(annwidth + 2 * borderfull), + outerheight = Math.round(annheight + 2 * borderfull); // save size in the annotation object for use by autoscale - options._w = annWidth; - options._h = annHeight; + options._w = annwidth; + options._h = annheight; function shiftFraction(v, anchor) { if(anchor === 'auto') { @@ -103755,12 +103566,11 @@ function drawOne(gd, index) { ax = Axes.getFromId(gd, axRef), dimAngle = (textangle + (axLetter === 'x' ? 0 : -90)) * Math.PI / 180, // note that these two can be either positive or negative - annSizeFromWidth = outerWidth * Math.cos(dimAngle), - annSizeFromHeight = outerHeight * Math.sin(dimAngle), + annSizeFromWidth = outerwidth * Math.cos(dimAngle), + annSizeFromHeight = outerheight * Math.sin(dimAngle), // but this one is the positive total size annSize = Math.abs(annSizeFromWidth) + Math.abs(annSizeFromHeight), anchor = options[axLetter + 'anchor'], - overallShift = options[axLetter + 'shift'] * (axLetter === 'x' ? 1 : -1), posPx = annPosPx[axLetter], basePx, textPadShift, @@ -103851,9 +103661,6 @@ function drawOne(gd, index) { posPx.text -= shiftMinus; } } - - posPx.tail += overallShift; - posPx.head += overallShift; } else { // with no arrow, the text rotates and *then* we put the anchor @@ -103863,10 +103670,6 @@ function drawOne(gd, index) { posPx.text = basePx + textShift; } - posPx.text += overallShift; - textShift += overallShift; - textPadShift += overallShift; - // padplus/minus are used by autorange options['_' + axLetter + 'padplus'] = (annSize / 2) + textPadShift; options['_' + axLetter + 'padminus'] = (annSize / 2) - textPadShift; @@ -103881,43 +103684,22 @@ function drawOne(gd, index) { return; } - var xShift = 0; - var yShift = 0; - - if(options.align !== 'left') { - xShift = (annWidth - textWidth) * (options.align === 'center' ? 0.5 : 1); - } - if(options.valign !== 'top') { - yShift = (annHeight - textHeight) * (options.valign === 'middle' ? 0.5 : 1); - } - if(hasMathjax) { - mathjaxGroup.select('svg').attr({ - x: borderfull + xShift - 1, - y: borderfull + yShift - }) - .call(Drawing.setClipUrl, isSizeConstrained ? annClipID : null); + mathjaxGroup.select('svg').attr({x: borderfull - 1, y: borderfull}); } else { - var texty = borderfull + yShift - anntextBB.top, - textx = borderfull + xShift - anntextBB.left; - annText.attr({ - x: textx, - y: texty - }) - .call(Drawing.setClipUrl, isSizeConstrained ? annClipID : null); + var texty = borderfull - anntextBB.top, + textx = borderfull - anntextBB.left; + annText.attr({x: textx, y: texty}); annText.selectAll('tspan.line').attr({y: texty, x: textx}); } - annTextClip.select('rect').call(Drawing.setRect, borderfull, borderfull, - annWidth, annHeight); - annTextBG.call(Drawing.setRect, borderwidth / 2, borderwidth / 2, - outerWidth - borderwidth, outerHeight - borderwidth); + outerwidth - borderwidth, outerheight - borderwidth); annTextGroupInner.call(Drawing.setTranslate, - Math.round(annPosPx.x.text - outerWidth / 2), - Math.round(annPosPx.y.text - outerHeight / 2)); + Math.round(annPosPx.x.text - outerwidth / 2), + Math.round(annPosPx.y.text - outerheight / 2)); /* * rotate text and background @@ -104056,17 +103838,21 @@ function drawOne(gd, index) { update[annbase + '.x'] = xa ? xa.p2r(xa.r2p(options.x) + dx) : - (options.x + (dx / gs.w)); + ((headX + dx - gs.l) / gs.w); update[annbase + '.y'] = ya ? ya.p2r(ya.r2p(options.y) + dy) : - (options.y - (dy / gs.h)); + (1 - ((headY + dy - gs.t) / gs.h)); if(options.axref === options.xref) { - update[annbase + '.ax'] = xa.p2r(xa.r2p(options.ax) + dx); + update[annbase + '.ax'] = xa ? + xa.p2r(xa.r2p(options.ax) + dx) : + ((headX + dx - gs.l) / gs.w); } if(options.ayref === options.yref) { - update[annbase + '.ay'] = ya.p2r(ya.r2p(options.ay) + dy); + update[annbase + '.ay'] = ya ? + ya.p2r(ya.r2p(options.ay) + dy) : + (1 - ((headY + dy - gs.t) / gs.h)); } arrowGroup.attr('transform', 'translate(' + dx + ',' + dy + ')'); @@ -104122,8 +103908,7 @@ function drawOne(gd, index) { if(xa) update[annbase + '.x'] = options.x + dx / xa._m; else { var widthFraction = options._xsize / gs.w, - xLeft = options.x + (options._xshift - options.xshift) / gs.w - - widthFraction / 2; + xLeft = options.x + options._xshift / gs.w - widthFraction / 2; update[annbase + '.x'] = dragElement.align(xLeft + dx / gs.w, widthFraction, 0, 1, options.xanchor); @@ -104132,8 +103917,7 @@ function drawOne(gd, index) { if(ya) update[annbase + '.y'] = options.y + dy / ya._m; else { var heightFraction = options._ysize / gs.h, - yBottom = options.y - (options._yshift + options.yshift) / gs.h - - heightFraction / 2; + yBottom = options.y - options._yshift / gs.h - heightFraction / 2; update[annbase + '.y'] = dragElement.align(yBottom - dy / gs.h, heightFraction, 0, 1, options.yanchor); @@ -104207,7 +103991,7 @@ function lineIntersect(x1, y1, x2, y2, x3, y3, x4, y4) { return {x: x1 + a * t, y: y1 + d * t}; } -},{"../../lib":685,"../../lib/setcursor":700,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"../../plots/plots":787,"../color":578,"../dragelement":599,"../drawing":602,"./draw_arrow_head":573,"d3":107}],573:[function(require,module,exports){ +},{"../../lib":680,"../../lib/setcursor":695,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../color":575,"../dragelement":596,"../drawing":598,"./draw_arrow_head":570,"d3":104}],570:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104341,7 +104125,7 @@ module.exports = function drawArrowHead(el3, style, ends, mag, standoff) { if(doEnd) drawhead(end, endRot); }; -},{"../color":578,"../drawing":602,"./arrow_paths":566,"d3":107,"fast-isnumeric":116}],574:[function(require,module,exports){ +},{"../color":575,"../drawing":598,"./arrow_paths":563,"d3":104,"fast-isnumeric":113}],571:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104373,7 +104157,7 @@ module.exports = { convertCoords: require('./convert_coords') }; -},{"./attributes":567,"./calc_autorange":568,"./click":569,"./convert_coords":570,"./defaults":571,"./draw":572}],575:[function(require,module,exports){ +},{"./attributes":564,"./calc_autorange":565,"./click":566,"./convert_coords":567,"./defaults":568,"./draw":569}],572:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104406,7 +104190,7 @@ require('world-calendars/dist/calendars/taiwan'); require('world-calendars/dist/calendars/thai'); require('world-calendars/dist/calendars/ummalqura'); -},{"world-calendars/dist/calendars/chinese":547,"world-calendars/dist/calendars/coptic":548,"world-calendars/dist/calendars/discworld":549,"world-calendars/dist/calendars/ethiopian":550,"world-calendars/dist/calendars/hebrew":551,"world-calendars/dist/calendars/islamic":552,"world-calendars/dist/calendars/julian":553,"world-calendars/dist/calendars/mayan":554,"world-calendars/dist/calendars/nanakshahi":555,"world-calendars/dist/calendars/nepali":556,"world-calendars/dist/calendars/persian":557,"world-calendars/dist/calendars/taiwan":558,"world-calendars/dist/calendars/thai":559,"world-calendars/dist/calendars/ummalqura":560,"world-calendars/dist/main":561,"world-calendars/dist/plus":562}],576:[function(require,module,exports){ +},{"world-calendars/dist/calendars/chinese":544,"world-calendars/dist/calendars/coptic":545,"world-calendars/dist/calendars/discworld":546,"world-calendars/dist/calendars/ethiopian":547,"world-calendars/dist/calendars/hebrew":548,"world-calendars/dist/calendars/islamic":549,"world-calendars/dist/calendars/julian":550,"world-calendars/dist/calendars/mayan":551,"world-calendars/dist/calendars/nanakshahi":552,"world-calendars/dist/calendars/nepali":553,"world-calendars/dist/calendars/persian":554,"world-calendars/dist/calendars/taiwan":555,"world-calendars/dist/calendars/thai":556,"world-calendars/dist/calendars/ummalqura":557,"world-calendars/dist/main":558,"world-calendars/dist/plus":559}],573:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104665,7 +104449,7 @@ module.exports = { worldCalFmt: worldCalFmt }; -},{"../../constants/numerical":666,"../../lib":685,"./calendars":575}],577:[function(require,module,exports){ +},{"../../constants/numerical":662,"../../lib":680,"./calendars":572}],574:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104705,7 +104489,7 @@ exports.borderLine = '#BEC8D9'; // gives back exactly lightLine if the other colors are defaults. exports.lightFraction = 100 * (0xe - 0x4) / (0xf - 0x4); -},{}],578:[function(require,module,exports){ +},{}],575:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -104724,14 +104508,10 @@ var color = module.exports = {}; var colorAttrs = require('./attributes'); color.defaults = colorAttrs.defaults; -var defaultLine = color.defaultLine = colorAttrs.defaultLine; +color.defaultLine = colorAttrs.defaultLine; color.lightLine = colorAttrs.lightLine; -var background = color.background = colorAttrs.background; +color.background = colorAttrs.background; -/* - * tinyRGB: turn a tinycolor into an rgb string, but - * unlike the built-in tinycolor.toRgbString this never includes alpha - */ color.tinyRGB = function(tc) { var c = tc.toRgb(); return 'rgb(' + Math.round(c.r) + ', ' + @@ -104755,7 +104535,7 @@ color.combine = function(front, back) { var fc = tinycolor(front).toRgb(); if(fc.a === 1) return tinycolor(front).toRgbString(); - var bc = tinycolor(back || background).toRgb(), + var bc = tinycolor(back || color.background).toRgb(), bcflat = bc.a === 1 ? bc : { r: 255 * (1 - bc.a) + bc.r * bc.a, g: 255 * (1 - bc.a) + bc.g * bc.a, @@ -104769,22 +104549,12 @@ color.combine = function(front, back) { return tinycolor(fcflat).toRgbString(); }; -/* - * Create a color that contrasts with cstr. - * - * If cstr is a dark color, we lighten it; if it's light, we darken. - * - * If lightAmount / darkAmount are used, we adjust by these percentages, - * otherwise we go all the way to white or black. - */ color.contrast = function(cstr, lightAmount, darkAmount) { var tc = tinycolor(cstr); - if(tc.getAlpha() !== 1) tc = tinycolor(color.combine(cstr, background)); - - var newColor = tc.isDark() ? - (lightAmount ? tc.lighten(lightAmount) : background) : - (darkAmount ? tc.darken(darkAmount) : defaultLine); + var newColor = tc.isLight() ? + tc.darken(darkAmount) : + tc.lighten(lightAmount); return newColor.toString(); }; @@ -104876,7 +104646,7 @@ function cleanOne(val) { return 'rgb(' + rgbStr + ')'; } -},{"./attributes":577,"fast-isnumeric":116,"tinycolor2":514}],579:[function(require,module,exports){ +},{"./attributes":574,"fast-isnumeric":113,"tinycolor2":511}],576:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105032,7 +104802,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../../plots/cartesian/layout_attributes":735,"../../plots/font_attributes":748}],580:[function(require,module,exports){ +},{"../../lib/extend":672,"../../plots/cartesian/layout_attributes":728,"../../plots/font_attributes":739}],577:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105099,7 +104869,7 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) { coerce('titleside'); }; -},{"../../lib":685,"../../plots/cartesian/tick_label_defaults":742,"../../plots/cartesian/tick_mark_defaults":743,"../../plots/cartesian/tick_value_defaults":744,"./attributes":579}],581:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/tick_label_defaults":734,"../../plots/cartesian/tick_mark_defaults":735,"../../plots/cartesian/tick_value_defaults":736,"./attributes":576}],578:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105272,10 +105042,7 @@ module.exports = function draw(gd, id) { anchor: 'free', position: 1 }, - cbAxisOut = { - type: 'linear', - _id: 'y' + id - }, + cbAxisOut = {}, axisOptions = { letter: 'y', font: fullLayout.font, @@ -105293,6 +105060,8 @@ module.exports = function draw(gd, id) { handleAxisDefaults(cbAxisIn, cbAxisOut, coerce, axisOptions, fullLayout); handleAxisPositionDefaults(cbAxisIn, cbAxisOut, coerce, axisOptions); + cbAxisOut._id = 'y' + id; + // position can't go in through supplyDefaults // because that restricts it to [0,1] cbAxisOut.position = opts.x + xpadFrac + thickFrac; @@ -105732,7 +105501,7 @@ module.exports = function draw(gd, id) { return component; }; -},{"../../lib":685,"../../lib/extend":677,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_defaults":726,"../../plots/cartesian/layout_attributes":735,"../../plots/cartesian/position_defaults":738,"../../plots/plots":787,"../../registry":802,"../color":578,"../dragelement":599,"../drawing":602,"../titles":655,"./attributes":579,"d3":107,"tinycolor2":514}],582:[function(require,module,exports){ +},{"../../lib":680,"../../lib/extend":672,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_defaults":721,"../../plots/cartesian/layout_attributes":728,"../../plots/cartesian/position_defaults":731,"../../plots/plots":778,"../../registry":793,"../color":575,"../dragelement":596,"../drawing":598,"../titles":651,"./attributes":576,"d3":104,"tinycolor2":511}],579:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105751,7 +105520,7 @@ module.exports = function hasColorbar(container) { return Lib.isPlainObject(container.colorbar); }; -},{"../../lib":685}],583:[function(require,module,exports){ +},{"../../lib":680}],580:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105806,7 +105575,7 @@ module.exports = { } }; -},{}],584:[function(require,module,exports){ +},{}],581:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105885,7 +105654,7 @@ module.exports = function calc(trace, vals, containerStr, cLetter) { } }; -},{"../../lib":685,"./flip_scale":589,"./scales":596}],585:[function(require,module,exports){ +},{"../../lib":680,"./flip_scale":586,"./scales":593}],582:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105929,7 +105698,7 @@ module.exports = function makeColorScaleAttributes(context) { }; }; -},{"../../lib/extend":677,"./attributes":583,"./scales.js":596}],586:[function(require,module,exports){ +},{"../../lib/extend":672,"./attributes":580,"./scales.js":593}],583:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -105945,7 +105714,7 @@ var scales = require('./scales'); module.exports = scales.RdBu; -},{"./scales":596}],587:[function(require,module,exports){ +},{"./scales":593}],584:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106009,7 +105778,7 @@ module.exports = function colorScaleDefaults(traceIn, traceOut, layout, coerce, if(showScale) colorbarDefaults(containerIn, containerOut, layout); }; -},{"../../lib":685,"../colorbar/defaults":580,"../colorbar/has_colorbar":582,"./flip_scale":589,"./is_valid_scale":593,"fast-isnumeric":116}],588:[function(require,module,exports){ +},{"../../lib":680,"../colorbar/defaults":577,"../colorbar/has_colorbar":579,"./flip_scale":586,"./is_valid_scale":590,"fast-isnumeric":113}],585:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106046,7 +105815,7 @@ module.exports = function extractScale(scl, cmin, cmax) { }; }; -},{}],589:[function(require,module,exports){ +},{}],586:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106071,7 +105840,7 @@ module.exports = function flipScale(scl) { return sclNew; }; -},{}],590:[function(require,module,exports){ +},{}],587:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106111,7 +105880,7 @@ module.exports = function getScale(scl, dflt) { return scl; }; -},{"./default_scale":586,"./is_valid_scale_array":594,"./scales":596}],591:[function(require,module,exports){ +},{"./default_scale":583,"./is_valid_scale_array":591,"./scales":593}],588:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106157,7 +105926,7 @@ module.exports = function hasColorscale(trace, containerStr) { ); }; -},{"../../lib":685,"./is_valid_scale":593,"fast-isnumeric":116}],592:[function(require,module,exports){ +},{"../../lib":680,"./is_valid_scale":590,"fast-isnumeric":113}],589:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106191,7 +105960,7 @@ exports.extractScale = require('./extract_scale'); exports.makeColorScaleFunc = require('./make_color_scale_func'); -},{"./attributes":583,"./calc":584,"./default_scale":586,"./defaults":587,"./extract_scale":588,"./flip_scale":589,"./get_scale":590,"./has_colorscale":591,"./is_valid_scale":593,"./make_color_scale_func":595,"./scales":596}],593:[function(require,module,exports){ +},{"./attributes":580,"./calc":581,"./default_scale":583,"./defaults":584,"./extract_scale":585,"./flip_scale":586,"./get_scale":587,"./has_colorscale":588,"./is_valid_scale":590,"./make_color_scale_func":592,"./scales":593}],590:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106212,7 +105981,7 @@ module.exports = function isValidScale(scl) { else return isValidScaleArray(scl); }; -},{"./is_valid_scale_array":594,"./scales":596}],594:[function(require,module,exports){ +},{"./is_valid_scale_array":591,"./scales":593}],591:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106249,7 +106018,7 @@ module.exports = function isValidScaleArray(scl) { return true; }; -},{"tinycolor2":514}],595:[function(require,module,exports){ +},{"tinycolor2":511}],592:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106345,7 +106114,7 @@ function colorArray2rbga(colorArray) { return tinycolor(colorObj).toRgbString(); } -},{"../color":578,"d3":107,"fast-isnumeric":116,"tinycolor2":514}],596:[function(require,module,exports){ +},{"../color":575,"d3":104,"fast-isnumeric":113,"tinycolor2":511}],593:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106476,7 +106245,7 @@ module.exports = { ] }; -},{}],597:[function(require,module,exports){ +},{}],594:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106509,7 +106278,7 @@ module.exports = function align(v, dv, v0, v1, anchor) { return vc; }; -},{}],598:[function(require,module,exports){ +},{}],595:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106547,7 +106316,7 @@ module.exports = function getCursor(x, y, xanchor, yanchor) { return cursorset[y][x]; }; -},{"../../lib":685}],599:[function(require,module,exports){ +},{"../../lib":680}],596:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106690,22 +106459,8 @@ dragElement.init = function init(options) { if(options.doneFn) options.doneFn(gd._dragged, numClicks, e); if(!gd._dragged) { - var e2; - - try { - e2 = new MouseEvent('click', e); - } - catch(err) { - e2 = document.createEvent('MouseEvents'); - e2.initMouseEvent('click', - e.bubbles, e.cancelable, - e.view, e.detail, - e.screenX, e.screenY, - e.clientX, e.clientY, - e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, - e.button, e.relatedTarget); - } - + var e2 = document.createEvent('MouseEvents'); + e2.initEvent('click', true, true); initialTarget.dispatchEvent(e2); } @@ -106749,7 +106504,7 @@ function finishDrag(gd) { if(gd._replotPending) Plotly.plot(gd); } -},{"../../constants/interactions":665,"../../lib":685,"../../plotly":719,"../../plots/cartesian/constants":729,"./align":597,"./cursor":598,"./unhover":600}],600:[function(require,module,exports){ +},{"../../constants/interactions":661,"../../lib":680,"../../plotly":714,"../../plots/cartesian/constants":724,"./align":594,"./cursor":595,"./unhover":597}],597:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106793,43 +106548,14 @@ unhover.raw = function unhoverRaw(gd, evt) { } fullLayout._hoverlayer.selectAll('g').remove(); - fullLayout._hoverlayer.selectAll('line').remove(); - fullLayout._hoverlayer.selectAll('circle').remove(); gd._hoverdata = undefined; if(evt.target && oldhoverdata) { - gd.emit('plotly_unhover', { - event: evt, - points: oldhoverdata - }); + gd.emit('plotly_unhover', {points: oldhoverdata}); } }; -},{"../../lib/events":676}],601:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -exports.dash = { - valType: 'string', - // string type usually doesn't take values... this one should really be - // a special type or at least a special coercion function, from the GUI - // you only get these values but elsewhere the user can supply a list of - // dash lengths in px, and it will be honored - values: ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'], - dflt: 'solid', - - -}; - -},{}],602:[function(require,module,exports){ +},{"../../lib/events":671}],598:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -106945,17 +106671,6 @@ drawing.lineGroupStyle = function(s, lw, lc, ld) { drawing.dashLine = function(s, dash, lineWidth) { lineWidth = +lineWidth || 0; - - dash = drawing.dashStyle(dash, lineWidth); - - s.style({ - 'stroke-dasharray': dash, - 'stroke-width': lineWidth + 'px' - }); -}; - -drawing.dashStyle = function(dash, lineWidth) { - lineWidth = +lineWidth || 1; var dlw = Math.max(lineWidth, 3); if(dash === 'solid') dash = ''; @@ -106970,7 +106685,10 @@ drawing.dashStyle = function(dash, lineWidth) { } // otherwise user wrote the dasharray themselves - leave it be - return dash; + s.style({ + 'stroke-dasharray': dash, + 'stroke-width': lineWidth + 'px' + }); }; drawing.fillGroupStyle = function(s) { @@ -107519,17 +107237,7 @@ drawing.setPointGroupScale = function(selection, x, y) { return scale; }; -drawing.measureText = function(tester, text, font) { - var dummyText = tester.append('text') - .text(text) - .call(drawing.font, font); - - var bbox = drawing.bBox(dummyText.node()); - dummyText.remove(); - return bbox; -}; - -},{"../../constants/xmlns_namespaces":668,"../../lib":685,"../../lib/svg_text_utils":704,"../../registry":802,"../../traces/scatter/make_bubble_size_func":991,"../../traces/scatter/subtypes":996,"../color":578,"../colorscale":592,"./symbol_defs":603,"d3":107,"fast-isnumeric":116}],603:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":664,"../../lib":680,"../../lib/svg_text_utils":699,"../../registry":793,"../../traces/scatter/make_bubble_size_func":939,"../../traces/scatter/subtypes":944,"../color":575,"../colorscale":589,"./symbol_defs":599,"d3":104,"fast-isnumeric":113}],599:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108005,7 +107713,7 @@ module.exports = { } }; -},{"d3":107}],604:[function(require,module,exports){ +},{"d3":104}],600:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108104,7 +107812,7 @@ module.exports = { } }; -},{}],605:[function(require,module,exports){ +},{}],601:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108167,7 +107875,7 @@ function calcOneAxis(calcTrace, trace, axis, coord) { Axes.expand(axis, vals, {padded: true}); } -},{"../../plots/cartesian/axes":724,"../../registry":802,"./compute_error":606,"fast-isnumeric":116}],606:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"../../registry":793,"./compute_error":602,"fast-isnumeric":113}],602:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108263,7 +107971,7 @@ function makeComputeErrorValue(type, value) { } } -},{}],607:[function(require,module,exports){ +},{}],603:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108340,7 +108048,7 @@ module.exports = function(traceIn, traceOut, defaultColor, opts) { } }; -},{"../../lib":685,"../../registry":802,"./attributes":604,"fast-isnumeric":116}],608:[function(require,module,exports){ +},{"../../lib":680,"../../registry":793,"./attributes":600,"fast-isnumeric":113}],604:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108362,7 +108070,7 @@ errorBars.calc = require('./calc'); errorBars.calcFromTrace = function(trace, layout) { var x = trace.x || [], - y = trace.y || [], + y = trace.y, len = x.length || y.length; var calcdataMock = new Array(len); @@ -108399,7 +108107,7 @@ errorBars.hoverInfo = function(calcPoint, trace, hoverPoint) { } }; -},{"./attributes":604,"./calc":605,"./defaults":607,"./plot":609,"./style":610}],609:[function(require,module,exports){ +},{"./attributes":600,"./calc":601,"./defaults":603,"./plot":605,"./style":606}],605:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108563,7 +108271,7 @@ function errorCoords(d, xa, ya) { return out; } -},{"../../traces/scatter/subtypes":996,"d3":107,"fast-isnumeric":116}],610:[function(require,module,exports){ +},{"../../traces/scatter/subtypes":944,"d3":104,"fast-isnumeric":113}],606:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108600,7 +108308,7 @@ module.exports = function style(traces) { }); }; -},{"../color":578,"d3":107}],611:[function(require,module,exports){ +},{"../color":575,"d3":104}],607:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108722,7 +108430,7 @@ module.exports = { } }; -},{"../../plots/cartesian/constants":729}],612:[function(require,module,exports){ +},{"../../plots/cartesian/constants":724}],608:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108805,7 +108513,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":705,"fast-isnumeric":116}],613:[function(require,module,exports){ +},{"../../lib/to_log_range":700,"fast-isnumeric":113}],609:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -108866,7 +108574,7 @@ function imageDefaults(imageIn, imageOut, fullLayout) { return imageOut; } -},{"../../lib":685,"../../plots/array_container_defaults":721,"../../plots/cartesian/axes":724,"./attributes":611}],614:[function(require,module,exports){ +},{"../../lib":680,"../../plots/array_container_defaults":716,"../../plots/cartesian/axes":719,"./attributes":607}],610:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109083,7 +108791,7 @@ module.exports = function draw(gd) { } }; -},{"../../constants/xmlns_namespaces":668,"../../plots/cartesian/axes":724,"../drawing":602,"d3":107}],615:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":664,"../../plots/cartesian/axes":719,"../drawing":598,"d3":104}],611:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109106,7 +108814,7 @@ module.exports = { convertCoords: require('./convert_coords') }; -},{"./attributes":611,"./convert_coords":612,"./defaults":613,"./draw":614}],616:[function(require,module,exports){ +},{"./attributes":607,"./convert_coords":608,"./defaults":609,"./draw":610}],612:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109155,7 +108863,7 @@ exports.isMiddleAnchor = function isMiddleAnchor(opts) { ); }; -},{}],617:[function(require,module,exports){ +},{}],613:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109246,7 +108954,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../../plots/font_attributes":748,"../color/attributes":577}],618:[function(require,module,exports){ +},{"../../lib/extend":672,"../../plots/font_attributes":739,"../color/attributes":574}],614:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109264,7 +108972,7 @@ module.exports = { scrollBarMargin: 4 }; -},{}],619:[function(require,module,exports){ +},{}],615:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109357,7 +109065,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) { Lib.noneOrAll(containerIn, containerOut, ['x', 'y']); }; -},{"../../lib":685,"../../plots/layout_attributes":778,"../../registry":802,"./attributes":617,"./helpers":622}],620:[function(require,module,exports){ +},{"../../lib":680,"../../plots/layout_attributes":769,"../../registry":793,"./attributes":613,"./helpers":618}],616:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -109629,9 +109337,7 @@ module.exports = function draw(gd) { scrollBarY = constants.scrollBarMargin - scrollBoxY / scrollBoxYMax * scrollBarYMax; scrollHandler(scrollBarY, scrollBoxY); - if(scrollBoxY !== 0 && scrollBoxY !== -scrollBoxYMax) { - d3.event.preventDefault(); - } + d3.event.preventDefault(); }); // to be safe, remove previous listeners @@ -109872,8 +109578,6 @@ function handleClick(g, gd, numClicks) { for(i = 0; i < fullData.length; i++) { allTraces.push(i); - // Allow the legendonly state through for *all* trace types (including - // carpet for which it's overridden with true/false in supplyDefaults) traceVisibility.push('legendonly'); } @@ -109904,11 +109608,7 @@ function handleClick(g, gd, numClicks) { if(sameAsLast) { traceVisibility = true; } - var visibilityUpdates = []; - for(i = 0; i < fullData.length; i++) { - visibilityUpdates.push(allTraces[i]); - } - Plotly.restyle(gd, 'visible', traceVisibility, visibilityUpdates); + Plotly.restyle(gd, 'visible', traceVisibility, allTraces); } } } @@ -110181,7 +109881,7 @@ function expandHorizontalMargin(gd) { }); } -},{"../../constants/interactions":665,"../../lib":685,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/plots":787,"../../registry":802,"../color":578,"../dragelement":599,"../drawing":602,"./anchor_utils":616,"./constants":618,"./get_legend_data":621,"./helpers":622,"./style":624,"d3":107}],621:[function(require,module,exports){ +},{"../../constants/interactions":661,"../../lib":680,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/plots":778,"../../registry":793,"../color":575,"../dragelement":596,"../drawing":598,"./anchor_utils":612,"./constants":614,"./get_legend_data":617,"./helpers":618,"./style":620,"d3":104}],617:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110286,7 +109986,7 @@ module.exports = function getLegendData(calcdata, opts) { return legendData; }; -},{"../../registry":802,"./helpers":622}],622:[function(require,module,exports){ +},{"../../registry":793,"./helpers":618}],618:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110317,7 +110017,7 @@ exports.isReversed = function isReversed(legendLayout) { return (legendLayout.traceorder || '').indexOf('reversed') !== -1; }; -},{"../../registry":802}],623:[function(require,module,exports){ +},{"../../registry":793}],619:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110341,7 +110041,7 @@ module.exports = { style: require('./style') }; -},{"./attributes":617,"./defaults":619,"./draw":620,"./style":624}],624:[function(require,module,exports){ +},{"./attributes":613,"./defaults":615,"./draw":616,"./style":620}],620:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110409,11 +110109,6 @@ function styleLines(d) { showFill = trace.visible && trace.fill && trace.fill !== 'none', showLine = subTypes.hasLines(trace); - if(trace && trace._module && trace._module.name === 'contourcarpet') { - showLine = trace.contours.showlines; - showFill = trace.contours.coloring === 'fill'; - } - var fill = d3.select(this).select('.legendfill').selectAll('path') .data(showFill ? [d] : []); fill.enter().append('path').classed('js-fill', true); @@ -110574,7 +110269,7 @@ function stylePies(d) { if(pts.size()) pts.call(stylePie, d[0], trace); } -},{"../../lib":685,"../../registry":802,"../../traces/pie/style_one":970,"../../traces/scatter/subtypes":996,"../color":578,"../drawing":602,"d3":107}],625:[function(require,module,exports){ +},{"../../lib":680,"../../registry":793,"../../traces/pie/style_one":918,"../../traces/scatter/subtypes":944,"../color":575,"../drawing":598,"d3":104}],621:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -110754,20 +110449,17 @@ function handleCartesian(gd, ev) { astr = button.getAttribute('data-attr'), val = button.getAttribute('data-val') || true, fullLayout = gd._fullLayout, - aobj = {}, - axList = Axes.list(gd, null, true), - ax, - allEnabled = 'on', - i; + aobj = {}; if(astr === 'zoom') { var mag = (val === 'in') ? 0.5 : 2, r0 = (1 + mag) / 2, - r1 = (1 - mag) / 2; + r1 = (1 - mag) / 2, + axList = Axes.list(gd, null, true); - var axName; + var ax, axName; - for(i = 0; i < axList.length; i++) { + for(var i = 0; i < axList.length; i++) { ax = axList[i]; if(!ax.fixedrange) { @@ -110782,12 +110474,6 @@ function handleCartesian(gd, ev) { aobj[axName + '.range[0]'] = rangeInitial[0]; aobj[axName + '.range[1]'] = rangeInitial[1]; } - if(ax._showSpikeInitial !== undefined) { - aobj[axName + '.showspikes'] = ax._showSpikeInitial; - if(allEnabled === 'on' && !ax._showSpikeInitial) { - allEnabled = 'off'; - } - } } else { var rangeNow = [ @@ -110805,24 +110491,12 @@ function handleCartesian(gd, ev) { } } } - fullLayout._cartesianSpikesEnabled = allEnabled; } else { // if ALL traces have orientation 'h', 'hovermode': 'x' otherwise: 'y' if(astr === 'hovermode' && (val === 'x' || val === 'y')) { val = fullLayout._isHoriz ? 'y' : 'x'; button.setAttribute('data-val', val); - if(val !== 'closest') { - fullLayout._cartesianSpikesEnabled = 'off'; - } - } else if(astr === 'hovermode' && val === 'closest') { - for(i = 0; i < axList.length; i++) { - ax = axList[i]; - if(allEnabled === 'on' && !ax.showspikes) { - allEnabled = 'off'; - } - } - fullLayout._cartesianSpikesEnabled = allEnabled; } aobj[astr] = val; @@ -111117,42 +110791,7 @@ modeBarButtons.resetViews = { } }; -modeBarButtons.toggleSpikelines = { - name: 'toggleSpikelines', - title: 'Toggle Spike Lines', - icon: Icons.spikeline, - attr: '_cartesianSpikesEnabled', - val: 'on', - click: function(gd) { - var fullLayout = gd._fullLayout; - - fullLayout._cartesianSpikesEnabled = fullLayout.hovermode === 'closest' ? - (fullLayout._cartesianSpikesEnabled === 'on' ? 'off' : 'on') : 'on'; - - var aobj = setSpikelineVisibility(gd); - - aobj.hovermode = 'closest'; - Plotly.relayout(gd, aobj); - } -}; - -function setSpikelineVisibility(gd) { - var fullLayout = gd._fullLayout, - axList = Axes.list(gd, null, true), - ax, - axName, - aobj = {}; - - for(var i = 0; i < axList.length; i++) { - ax = axList[i]; - axName = ax._name; - aobj[axName + '.showspikes'] = fullLayout._cartesianSpikesEnabled === 'on' ? true : false; - } - - return aobj; -} - -},{"../../../build/ploticon":2,"../../lib":685,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/plots":787,"../../snapshot/download":804}],626:[function(require,module,exports){ +},{"../../../build/ploticon":2,"../../lib":680,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../../snapshot/download":795}],622:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111166,7 +110805,7 @@ function setSpikelineVisibility(gd) { exports.manage = require('./manage'); -},{"./manage":627}],627:[function(require,module,exports){ +},{"./manage":623}],623:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111307,7 +110946,7 @@ function getButtonGroups(gd, buttonsToRemove, buttonsToAdd) { addGroup(['hoverClosestGl2d']); } else if(hasCartesian) { - addGroup(['toggleSpikelines', 'hoverClosestCartesian', 'hoverCompareCartesian']); + addGroup(['hoverClosestCartesian', 'hoverCompareCartesian']); } else if(hasPie) { addGroup(['hoverClosestPie']); @@ -111394,7 +111033,7 @@ function fillCustomButton(customButtons) { return customButtons; } -},{"../../plots/cartesian/axes":724,"../../traces/scatter/subtypes":996,"./buttons":625,"./modebar":628}],628:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"../../traces/scatter/subtypes":944,"./buttons":621,"./modebar":624}],624:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111546,7 +111185,7 @@ proto.createButton = function(config) { button.setAttribute('data-toggle', config.toggle || false); if(config.toggle) d3.select(button).classed('active', true); - button.appendChild(this.createIcon(config.icon || Icons.question, config.name)); + button.appendChild(this.createIcon(config.icon || Icons.question)); button.setAttribute('data-gravity', config.gravity || 'n'); return button; @@ -111559,7 +111198,7 @@ proto.createButton = function(config) { * @Param {string} thisIcon.path * @Return {HTMLelement} */ -proto.createIcon = function(thisIcon, name) { +proto.createIcon = function(thisIcon) { var iconHeight = thisIcon.ascent - thisIcon.descent, svgNS = 'http://www.w3.org/2000/svg', icon = document.createElementNS(svgNS, 'svg'), @@ -111569,12 +111208,8 @@ proto.createIcon = function(thisIcon, name) { icon.setAttribute('width', (thisIcon.width / iconHeight) + 'em'); icon.setAttribute('viewBox', [0, 0, thisIcon.width, iconHeight].join(' ')); - var transform = name === 'toggleSpikelines' ? - 'matrix(1.5 0 0 -1.5 0 ' + thisIcon.ascent + ')' : - 'matrix(1 0 0 -1 0 ' + thisIcon.ascent + ')'; - path.setAttribute('d', thisIcon.path); - path.setAttribute('transform', transform); + path.setAttribute('transform', 'matrix(1 0 0 -1 0 ' + thisIcon.ascent + ')'); icon.appendChild(path); return icon; @@ -111688,7 +111323,7 @@ function createModeBar(gd, buttons) { module.exports = createModeBar; -},{"../../../build/ploticon":2,"../../lib":685,"d3":107}],629:[function(require,module,exports){ +},{"../../../build/ploticon":2,"../../lib":680,"d3":104}],625:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111778,7 +111413,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../../plots/font_attributes":748,"../color/attributes":577,"./button_attributes":630}],630:[function(require,module,exports){ +},{"../../lib/extend":672,"../../plots/font_attributes":739,"../color/attributes":574,"./button_attributes":626}],626:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111819,7 +111454,7 @@ module.exports = { } }; -},{}],631:[function(require,module,exports){ +},{}],627:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111848,7 +111483,7 @@ module.exports = { darkAmount: 10 }; -},{}],632:[function(require,module,exports){ +},{}],628:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -111947,7 +111582,7 @@ function getPosDflt(containerOut, layout, counterAxes) { return [containerOut.domain[0], posY + constants.yPad]; } -},{"../../lib":685,"../color":578,"./attributes":629,"./button_attributes":630,"./constants":631}],633:[function(require,module,exports){ +},{"../../lib":680,"../color":575,"./attributes":625,"./button_attributes":626,"./constants":627}],629:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112222,7 +111857,7 @@ function reposition(gd, buttons, opts, axName) { }); } -},{"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/cartesian/axis_ids":727,"../../plots/plots":787,"../color":578,"../drawing":602,"../legend/anchor_utils":616,"./constants":631,"./get_update_object":634,"d3":107}],634:[function(require,module,exports){ +},{"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/cartesian/axis_ids":722,"../../plots/plots":778,"../color":575,"../drawing":598,"../legend/anchor_utils":612,"./constants":627,"./get_update_object":630,"d3":104}],630:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112279,7 +111914,7 @@ function getXRange(axisLayout, buttonLayout) { return [range0, range1]; } -},{"d3":107}],635:[function(require,module,exports){ +},{"d3":104}],631:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112306,7 +111941,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":629,"./defaults":632,"./draw":633}],636:[function(require,module,exports){ +},{"./attributes":625,"./defaults":628,"./draw":629}],632:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112370,7 +112005,7 @@ module.exports = { } }; -},{"../color/attributes":577}],637:[function(require,module,exports){ +},{"../color/attributes":574}],633:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112406,7 +112041,7 @@ module.exports = function calcAutorange(gd) { } }; -},{"../../plots/cartesian/axes":724,"./constants":638}],638:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"./constants":634}],634:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112458,7 +112093,7 @@ module.exports = { extraPad: 15 }; -},{}],639:[function(require,module,exports){ +},{}],635:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -112515,7 +112150,7 @@ module.exports = function handleDefaults(layoutIn, layoutOut, axName) { containerOut._input = containerIn; }; -},{"../../lib":685,"./attributes":636}],640:[function(require,module,exports){ +},{"../../lib":680,"./attributes":632}],636:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113066,7 +112701,7 @@ function clearPushMargins(gd) { } } -},{"../../lib":685,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian":734,"../../plots/cartesian/axes":724,"../../plots/plots":787,"../color":578,"../dragelement":599,"../drawing":602,"./constants":638,"d3":107}],641:[function(require,module,exports){ +},{"../../lib":680,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian":727,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../color":575,"../dragelement":596,"../drawing":598,"./constants":634,"d3":104}],637:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113093,7 +112728,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":636,"./calc_autorange":637,"./defaults":639,"./draw":640}],642:[function(require,module,exports){ +},{"./attributes":632,"./calc_autorange":633,"./defaults":635,"./draw":636}],638:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113105,10 +112740,11 @@ module.exports = { 'use strict'; var annAttrs = require('../annotations/attributes'); -var scatterLineAttrs = require('../../traces/scatter/attributes').line; -var dash = require('../drawing/attributes').dash; +var scatterAttrs = require('../../traces/scatter/attributes'); var extendFlat = require('../../lib/extend').extendFlat; +var scatterLineAttrs = scatterAttrs.line; + module.exports = { _isLinkedToArray: 'shape', @@ -113179,7 +112815,7 @@ module.exports = { line: { color: scatterLineAttrs.color, width: scatterLineAttrs.width, - dash: dash, + dash: scatterLineAttrs.dash, }, fillcolor: { @@ -113190,7 +112826,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../../traces/scatter/attributes":976,"../annotations/attributes":567,"../drawing/attributes":601}],643:[function(require,module,exports){ +},{"../../lib/extend":672,"../../traces/scatter/attributes":924,"../annotations/attributes":564}],639:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113267,7 +112903,7 @@ function shapeBounds(ax, v0, v1, path, paramsToUse) { if(max >= min) return [min, max]; } -},{"../../lib":685,"../../plots/cartesian/axes":724,"./constants":644,"./helpers":647}],644:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"./constants":640,"./helpers":643}],640:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113331,7 +112967,7 @@ module.exports = { } }; -},{}],645:[function(require,module,exports){ +},{}],641:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113356,7 +112992,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { handleArrayContainerDefaults(layoutIn, layoutOut, opts); }; -},{"../../plots/array_container_defaults":721,"./shape_defaults":649}],646:[function(require,module,exports){ +},{"../../plots/array_container_defaults":716,"./shape_defaults":645}],642:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113731,7 +113367,7 @@ function movePath(pathIn, moveX, moveY) { }); } -},{"../../lib":685,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian/axes":724,"../color":578,"../dragelement":599,"../drawing":602,"./constants":644,"./helpers":647}],647:[function(require,module,exports){ +},{"../../lib":680,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian/axes":719,"../color":575,"../dragelement":596,"../drawing":598,"./constants":640,"./helpers":643}],643:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113812,7 +113448,7 @@ exports.getPixelToData = function(gd, axis, isVertical) { return pixelToData; }; -},{}],648:[function(require,module,exports){ +},{}],644:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113838,7 +113474,7 @@ module.exports = { drawOne: drawModule.drawOne }; -},{"./attributes":642,"./calc_autorange":643,"./defaults":645,"./draw":646}],649:[function(require,module,exports){ +},{"./attributes":638,"./calc_autorange":639,"./defaults":641,"./draw":642}],645:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -113937,7 +113573,7 @@ module.exports = function handleShapeDefaults(shapeIn, shapeOut, fullLayout, opt return shapeOut; }; -},{"../../lib":685,"../../plots/cartesian/axes":724,"./attributes":642,"./helpers":647}],650:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"./attributes":638,"./helpers":643}],646:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114171,7 +113807,7 @@ module.exports = { }, }; -},{"../../lib/extend":677,"../../plots/animation_attributes":720,"../../plots/font_attributes":748,"../../plots/pad_attributes":786,"./constants":651}],651:[function(require,module,exports){ +},{"../../lib/extend":672,"../../plots/animation_attributes":715,"../../plots/font_attributes":739,"../../plots/pad_attributes":777,"./constants":647}],647:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114268,7 +113904,7 @@ module.exports = { currentValueInset: 0, }; -},{}],652:[function(require,module,exports){ +},{}],648:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114381,7 +114017,7 @@ function stepsDefaults(sliderIn, sliderOut) { return valuesOut; } -},{"../../lib":685,"../../plots/array_container_defaults":721,"./attributes":650,"./constants":651}],653:[function(require,module,exports){ +},{"../../lib":680,"../../plots/array_container_defaults":716,"./attributes":646,"./constants":647}],649:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -114983,7 +114619,7 @@ function clearPushMargins(gd) { } } -},{"../../lib/svg_text_utils":704,"../../plots/plots":787,"../color":578,"../drawing":602,"../legend/anchor_utils":616,"./constants":651,"d3":107}],654:[function(require,module,exports){ +},{"../../lib/svg_text_utils":699,"../../plots/plots":778,"../color":575,"../drawing":598,"../legend/anchor_utils":612,"./constants":647,"d3":104}],650:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115006,7 +114642,7 @@ module.exports = { draw: require('./draw') }; -},{"./attributes":650,"./constants":651,"./defaults":652,"./draw":653}],655:[function(require,module,exports){ +},{"./attributes":646,"./constants":647,"./defaults":648,"./draw":649}],651:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115239,7 +114875,7 @@ Titles.draw = function(gd, titleClass, options) { el.classed('js-placeholder', isplaceholder); }; -},{"../../constants/interactions":665,"../../lib":685,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/plots":787,"../color":578,"../drawing":602,"d3":107,"fast-isnumeric":116}],656:[function(require,module,exports){ +},{"../../constants/interactions":661,"../../lib":680,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/plots":778,"../color":575,"../drawing":598,"d3":104,"fast-isnumeric":113}],652:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115386,7 +115022,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../../plots/font_attributes":748,"../../plots/pad_attributes":786,"../color/attributes":577}],657:[function(require,module,exports){ +},{"../../lib/extend":672,"../../plots/font_attributes":739,"../../plots/pad_attributes":777,"../color/attributes":574}],653:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115462,7 +115098,7 @@ module.exports = { hoverColor: '#F4FAFF' }; -},{}],658:[function(require,module,exports){ +},{}],654:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -115556,7 +115192,7 @@ function buttonsDefaults(menuIn, menuOut) { return buttonsOut; } -},{"../../lib":685,"../../plots/array_container_defaults":721,"./attributes":656,"./constants":657}],659:[function(require,module,exports){ +},{"../../lib":680,"../../plots/array_container_defaults":716,"./attributes":652,"./constants":653}],655:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116236,9 +115872,9 @@ function clearPushMargins(gd) { } } -},{"../../lib/svg_text_utils":704,"../../plots/plots":787,"../color":578,"../drawing":602,"../legend/anchor_utils":616,"./constants":657,"./scrollbox":661,"d3":107}],660:[function(require,module,exports){ -arguments[4][654][0].apply(exports,arguments) -},{"./attributes":656,"./constants":657,"./defaults":658,"./draw":659,"dup":654}],661:[function(require,module,exports){ +},{"../../lib/svg_text_utils":699,"../../plots/plots":778,"../color":575,"../drawing":598,"../legend/anchor_utils":612,"./constants":653,"./scrollbox":657,"d3":104}],656:[function(require,module,exports){ +arguments[4][650][0].apply(exports,arguments) +},{"./attributes":652,"./constants":653,"./defaults":654,"./draw":655,"dup":650}],657:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116709,7 +116345,7 @@ ScrollBox.prototype.setTranslate = function setTranslate(translateX, translateY) } }; -},{"../../lib":685,"../color":578,"../drawing":602,"d3":107}],662:[function(require,module,exports){ +},{"../../lib":680,"../color":575,"../drawing":598,"d3":104}],658:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116730,7 +116366,7 @@ module.exports = { longdashdot: [8, 1, 1, 1] }; -},{}],663:[function(require,module,exports){ +},{}],659:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116751,7 +116387,7 @@ module.exports = { longdashdot: [[0.5, 0.7, 0.8, 1], 10] }; -},{}],664:[function(require,module,exports){ +},{}],660:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116774,7 +116410,7 @@ module.exports = { x: '❌' }; -},{}],665:[function(require,module,exports){ +},{}],661:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116798,7 +116434,7 @@ module.exports = { DBLCLICKDELAY: 300 }; -},{}],666:[function(require,module,exports){ +},{}],662:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116843,15 +116479,10 @@ module.exports = { * For fast conversion btwn world calendars and epoch ms, the Julian Day Number * of the unix epoch. From calendars.instance().newDate(1970, 1, 1).toJD() */ - EPOCHJD: 2440587.5, - - /* - * Are two values nearly equal? Compare to 1PPM - */ - ALMOST_EQUAL: 1 - 1e-6 + EPOCHJD: 2440587.5 }; -},{}],667:[function(require,module,exports){ +},{}],663:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116889,7 +116520,7 @@ module.exports = { }; -},{}],668:[function(require,module,exports){ +},{}],664:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116913,7 +116544,7 @@ exports.svgAttrs = { 'xmlns:xlink': exports.xlink }; -},{}],669:[function(require,module,exports){ +},{}],665:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -116931,7 +116562,7 @@ exports.svgAttrs = { var Plotly = require('./plotly'); // package version injected by `npm run preprocess` -exports.version = '1.26.1'; +exports.version = '1.25.2'; // inject promise polyfill require('es6-promise').polyfill(); @@ -116992,7 +116623,7 @@ exports.Queue = require('./lib/queue'); // export d3 used in the bundle exports.d3 = require('d3'); -},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":574,"./components/images":615,"./components/legend":623,"./components/rangeselector":635,"./components/rangeslider":641,"./components/shapes":648,"./components/sliders":654,"./components/updatemenus":660,"./fonts/mathjax_config":670,"./lib/queue":697,"./plot_api/plot_schema":713,"./plot_api/register":714,"./plot_api/set_plot_config":715,"./plot_api/to_image":717,"./plot_api/validate":718,"./plotly":719,"./snapshot":807,"./snapshot/download":804,"./traces/scatter":986,"d3":107,"es6-promise":113}],670:[function(require,module,exports){ +},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":571,"./components/images":611,"./components/legend":619,"./components/rangeselector":631,"./components/rangeslider":637,"./components/shapes":644,"./components/sliders":650,"./components/updatemenus":656,"./fonts/mathjax_config":666,"./lib/queue":692,"./plot_api/plot_schema":708,"./plot_api/register":709,"./plot_api/set_plot_config":710,"./plot_api/to_image":712,"./plot_api/validate":713,"./plotly":714,"./snapshot":798,"./snapshot/download":795,"./traces/scatter":934,"d3":104,"es6-promise":110}],666:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117025,7 +116656,7 @@ if(typeof MathJax !== 'undefined') { exports.MathJax = false; } -},{}],671:[function(require,module,exports){ +},{}],667:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117042,7 +116673,7 @@ module.exports = function arrayToCalcItem(traceAttr, calcItem, calcAttr, i) { if(Array.isArray(traceAttr)) calcItem[calcAttr] = traceAttr[i]; }; -},{}],672:[function(require,module,exports){ +},{}],668:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117075,7 +116706,7 @@ module.exports = function cleanNumber(v) { return BADNUM; }; -},{"../constants/numerical":666,"fast-isnumeric":116}],673:[function(require,module,exports){ +},{"../constants/numerical":662,"fast-isnumeric":113}],669:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -117386,7 +117017,7 @@ exports.validate = function(value, opts) { return out !== failed; }; -},{"../components/colorscale/get_scale":590,"../components/colorscale/scales":596,"./nested_property":691,"fast-isnumeric":116,"tinycolor2":514}],674:[function(require,module,exports){ +},{"../components/colorscale/get_scale":587,"../components/colorscale/scales":593,"./nested_property":686,"fast-isnumeric":113,"tinycolor2":511}],670:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118014,36 +117645,7 @@ exports.findExactDates = function(data, calendar) { }; }; -},{"../constants/numerical":666,"../registry":802,"./loggers":688,"./mod":690,"d3":107,"fast-isnumeric":116}],675:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Ensures an array has the right amount of storage space. If it doesn't - * exist, it creates an array. If it does exist, it returns it if too - * short or truncates it in-place. - * - * The goal is to just reuse memory to avoid a bit of excessive garbage - * collection. - */ -module.exports = function ensureArray(out, n) { - if(!Array.isArray(out)) out = []; - - // If too long, truncate. (If too short, it will grow - // automatically so we don't care about that case) - out.length = n; - - return out; -}; - -},{}],676:[function(require,module,exports){ +},{"../constants/numerical":662,"../registry":793,"./loggers":683,"./mod":685,"d3":104,"fast-isnumeric":113}],671:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118209,7 +117811,7 @@ var Events = { module.exports = Events; -},{"events":114}],677:[function(require,module,exports){ +},{"events":111}],672:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118323,7 +117925,7 @@ function _extend(inputs, isDeep, keepAllKeys, noArrayCopies) { return target; } -},{"./is_plain_object.js":687}],678:[function(require,module,exports){ +},{"./is_plain_object.js":682}],673:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118374,7 +117976,7 @@ module.exports = function filterUnique(array) { return out; }; -},{}],679:[function(require,module,exports){ +},{}],674:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118405,7 +118007,7 @@ module.exports = function filterVisible(container) { return out; }; -},{}],680:[function(require,module,exports){ +},{}],675:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118467,7 +118069,7 @@ function countryNameToISO3(countryName) { return false; } -},{"../lib":685,"country-regex":100}],681:[function(require,module,exports){ +},{"../lib":680,"country-regex":97}],676:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118479,8 +118081,6 @@ function countryNameToISO3(countryName) { 'use strict'; -var BADNUM = require('../constants/numerical').BADNUM; - /** * Convert calcTrace to GeoJSON 'MultiLineString' coordinate arrays * @@ -118493,19 +118093,18 @@ var BADNUM = require('../constants/numerical').BADNUM; * */ exports.calcTraceToLineCoords = function(calcTrace) { - var trace = calcTrace[0].trace; - var connectgaps = trace.connectgaps; + var trace = calcTrace[0].trace, + connectgaps = trace.connectgaps; - var coords = []; - var lineString = []; + var coords = [], + lineString = []; for(var i = 0; i < calcTrace.length; i++) { var calcPt = calcTrace[i]; - var lonlat = calcPt.lonlat; - if(lonlat[0] !== BADNUM) { - lineString.push(lonlat); - } else if(!connectgaps && lineString.length > 0) { + lineString.push(calcPt.lonlat); + + if(!connectgaps && calcPt.gapAfter && lineString.length > 0) { coords.push(lineString); lineString = []; } @@ -118604,7 +118203,7 @@ exports.makeBlank = function() { }; }; -},{"../constants/numerical":666}],682:[function(require,module,exports){ +},{}],677:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118692,7 +118291,7 @@ function formatColor(containerIn, opacityIn, len) { module.exports = formatColor; -},{"../components/color/attributes":577,"../components/colorscale":592,"color-rgba":88,"fast-isnumeric":116}],683:[function(require,module,exports){ +},{"../components/color/attributes":574,"../components/colorscale":589,"color-rgba":85,"fast-isnumeric":113}],678:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118761,7 +118360,7 @@ function convertHTMLToUnicode(html) { module.exports = convertHTMLToUnicode; -},{"../constants/string_mappings":667,"superscript-text":510}],684:[function(require,module,exports){ +},{"../constants/string_mappings":663,"superscript-text":507}],679:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118777,7 +118376,7 @@ module.exports = convertHTMLToUnicode; module.exports = function identity(d) { return d; }; -},{}],685:[function(require,module,exports){ +},{}],680:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -118799,7 +118398,6 @@ lib.isArray = require('./is_array'); lib.mod = require('./mod'); lib.toLogRange = require('./to_log_range'); lib.relinkPrivateKeys = require('./relink_private'); -lib.ensureArray = require('./ensure_array'); var coerceModule = require('./coerce'); lib.valObjects = coerceModule.valObjects; @@ -119418,7 +119016,7 @@ lib.numSeparate = function(value, separators, separatethousands) { return x1 + x2; }; -},{"./clean_number":672,"./coerce":673,"./dates":674,"./ensure_array":675,"./extend":677,"./filter_unique":678,"./filter_visible":679,"./identity":684,"./is_array":686,"./is_plain_object":687,"./loggers":688,"./matrix":689,"./mod":690,"./nested_property":691,"./noop":692,"./notifier":693,"./push_unique":696,"./relink_private":698,"./search":699,"./stats":702,"./to_log_range":705,"d3":107}],686:[function(require,module,exports){ +},{"./clean_number":668,"./coerce":669,"./dates":670,"./extend":672,"./filter_unique":673,"./filter_visible":674,"./identity":679,"./is_array":681,"./is_plain_object":682,"./loggers":683,"./matrix":684,"./mod":685,"./nested_property":686,"./noop":687,"./notifier":688,"./push_unique":691,"./relink_private":693,"./search":694,"./stats":697,"./to_log_range":700,"d3":104}],681:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119442,7 +119040,7 @@ module.exports = function isArray(a) { return Array.isArray(a) || ab.isView(a); }; -},{}],687:[function(require,module,exports){ +},{}],682:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119471,7 +119069,7 @@ module.exports = function isPlainObject(obj) { ); }; -},{}],688:[function(require,module,exports){ +},{}],683:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119545,7 +119143,7 @@ function apply(f, args) { } } -},{"../plot_api/plot_config":712}],689:[function(require,module,exports){ +},{"../plot_api/plot_config":707}],684:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119655,7 +119253,7 @@ exports.apply2DTransform2 = function(transform) { }; }; -},{}],690:[function(require,module,exports){ +},{}],685:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119675,7 +119273,7 @@ module.exports = function mod(v, d) { return out < 0 ? out + d : out; }; -},{}],691:[function(require,module,exports){ +},{}],686:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119979,7 +119577,7 @@ function badContainer(container, propStr, propParts) { }; } -},{"../plot_api/container_array_match":708,"./is_array":686,"./is_plain_object":687,"fast-isnumeric":116}],692:[function(require,module,exports){ +},{"../plot_api/container_array_match":703,"./is_array":681,"./is_plain_object":682,"fast-isnumeric":113}],687:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -119995,7 +119593,7 @@ function badContainer(container, propStr, propParts) { module.exports = function noop() {}; -},{}],693:[function(require,module,exports){ +},{}],688:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120077,7 +119675,7 @@ module.exports = function(text, displayLength) { }); }; -},{"d3":107,"fast-isnumeric":116}],694:[function(require,module,exports){ +},{"d3":104,"fast-isnumeric":113}],689:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120126,7 +119724,7 @@ module.exports = function overrideCursor(el3, csr) { } }; -},{"./setcursor":700}],695:[function(require,module,exports){ +},{"./setcursor":695}],690:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120366,7 +119964,7 @@ polygon.filter = function filter(pts, tolerance) { }; }; -},{"./matrix":689}],696:[function(require,module,exports){ +},{"./matrix":684}],691:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120404,7 +120002,7 @@ module.exports = function pushUnique(array, item) { return array; }; -},{}],697:[function(require,module,exports){ +},{}],692:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120615,7 +120213,7 @@ queue.plotDo = function(gd, func, args) { module.exports = queue; -},{"../lib":685,"../plot_api/plot_config":712}],698:[function(require,module,exports){ +},{"../lib":680,"../plot_api/plot_config":707}],693:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120672,7 +120270,7 @@ module.exports = function relinkPrivateKeys(toContainer, fromContainer) { } }; -},{"./is_array":686,"./is_plain_object":687}],699:[function(require,module,exports){ +},{"./is_array":681,"./is_plain_object":682}],694:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120783,7 +120381,7 @@ exports.roundUp = function(val, arrayIn, reverse) { return arrayIn[low]; }; -},{"./loggers":688,"fast-isnumeric":116}],700:[function(require,module,exports){ +},{"./loggers":683,"fast-isnumeric":113}],695:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120806,7 +120404,7 @@ module.exports = function setCursor(el3, csr) { if(csr) el3.classed('cursor-' + csr, true); }; -},{}],701:[function(require,module,exports){ +},{}],696:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120855,7 +120453,7 @@ module.exports = function showWebGlMsg(scene) { return false; }; -},{"../components/color":578}],702:[function(require,module,exports){ +},{"../components/color":575}],697:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120951,7 +120549,7 @@ exports.interp = function(arr, n) { return frac * arr[Math.ceil(n)] + (1 - frac) * arr[Math.floor(n)]; }; -},{"fast-isnumeric":116}],703:[function(require,module,exports){ +},{"fast-isnumeric":113}],698:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -120972,7 +120570,7 @@ function str2RgbaArray(color) { module.exports = str2RgbaArray; -},{"color-rgba":88}],704:[function(require,module,exports){ +},{"color-rgba":85}],699:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121513,7 +121111,7 @@ exports.makeEditable = function(context, _delegate, options) { return d3.rebind(this, dispatch, 'on'); }; -},{"../constants/string_mappings":667,"../constants/xmlns_namespaces":668,"../lib":685,"d3":107}],705:[function(require,module,exports){ +},{"../constants/string_mappings":663,"../constants/xmlns_namespaces":664,"../lib":680,"d3":104}],700:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121541,7 +121139,7 @@ module.exports = function toLogRange(val, range) { return newVal; }; -},{"fast-isnumeric":116}],706:[function(require,module,exports){ +},{"fast-isnumeric":113}],701:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121577,7 +121175,7 @@ topojsonUtils.getTopojsonFeatures = function(trace, topojson) { return topojsonFeature(topojson, obj).features; }; -},{"../plots/geo/constants":750,"topojson-client":516}],707:[function(require,module,exports){ +},{"../plots/geo/constants":741,"topojson-client":513}],702:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121611,7 +121209,7 @@ module.exports = function truncate(arrayIn, len) { throw new Error('This array type is not yet supported by `truncate`.'); }; -},{}],708:[function(require,module,exports){ +},{}],703:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -121669,7 +121267,7 @@ module.exports = function containerArrayMatch(astr) { return {array: arrayStr, index: Number(match[1]), property: match[3] || ''}; }; -},{"../registry":802}],709:[function(require,module,exports){ +},{"../registry":793}],704:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122190,7 +121788,7 @@ exports.hasParent = function(aobj, attr) { return false; }; -},{"../components/color":578,"../lib":685,"../plots/cartesian/axes":724,"../plots/plots":787,"../registry":802,"fast-isnumeric":116,"gl-mat4/fromQuat":162}],710:[function(require,module,exports){ +},{"../components/color":575,"../lib":680,"../plots/cartesian/axes":719,"../plots/plots":778,"../registry":793,"fast-isnumeric":113,"gl-mat4/fromQuat":159}],705:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122403,7 +122001,7 @@ exports.applyContainerArrayChanges = function applyContainerArrayChanges(gd, np, return true; }; -},{"../lib/is_plain_object":687,"../lib/loggers":688,"../lib/nested_property":691,"../lib/noop":692,"../registry":802,"./container_array_match":708}],711:[function(require,module,exports){ +},{"../lib/is_plain_object":682,"../lib/loggers":683,"../lib/nested_property":686,"../lib/noop":687,"../registry":793,"./container_array_match":703}],706:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -122438,8 +122036,6 @@ var manageArrays = require('./manage_arrays'); var helpers = require('./helpers'); var subroutines = require('./subroutines'); var cartesianConstants = require('../plots/cartesian/constants'); -var enforceAxisConstraints = require('../plots/cartesian/constraints'); -var axisIds = require('../plots/cartesian/axis_ids'); /** @@ -122559,8 +122155,9 @@ Plotly.plot = function(gd, data, layout, config) { makePlotFramework(gd); } - // save initial show spikes once per graph - if(graphWasEmpty) Plotly.Axes.saveShowSpikeInitial(gd); + // save initial axis range once per graph + if(graphWasEmpty) Plotly.Axes.saveRangeInitial(gd); + // prepare the data and find the autorange @@ -122663,24 +122260,18 @@ Plotly.plot = function(gd, data, layout, config) { return Lib.syncOrAsync([ Registry.getComponentMethod('shapes', 'calcAutorange'), Registry.getComponentMethod('annotations', 'calcAutorange'), - doAutoRangeAndConstraints, + doAutoRange, Registry.getComponentMethod('rangeslider', 'calcAutorange') ], gd); } - function doAutoRangeAndConstraints() { + function doAutoRange() { if(gd._transitioning) return; var axList = Plotly.Axes.list(gd, '', true); for(var i = 0; i < axList.length; i++) { Plotly.Axes.doAutoRange(axList[i]); } - - enforceAxisConstraints(gd); - - // store initial ranges *after* enforcing constraints, otherwise - // we will never look like we're at the initial ranges - if(graphWasEmpty) Plotly.Axes.saveRangeInitial(gd); } // draw ticks, titles, and calculate axis scaling (._b, ._m) @@ -123703,7 +123294,6 @@ function _restyle(gd, aobj, _traces) { 'autobinx', 'nbinsx', 'xbins', 'xbins.start', 'xbins.end', 'xbins.size', 'autobiny', 'nbinsy', 'ybins', 'ybins.start', 'ybins.end', 'ybins.size', 'autocontour', 'ncontours', 'contours', 'contours.coloring', - 'contours.operation', 'contours.value', 'contours.type', 'contours.value[0]', 'contours.value[1]', 'error_y', 'error_y.visible', 'error_y.value', 'error_y.type', 'error_y.traceref', 'error_y.array', 'error_y.symmetric', 'error_y.arrayminus', 'error_y.valueminus', 'error_y.tracerefminus', @@ -123721,31 +123311,9 @@ function _restyle(gd, aobj, _traces) { 'line.showscale', 'line.cauto', 'line.autocolorscale', 'line.reversescale', 'marker.line.showscale', 'marker.line.cauto', 'marker.line.autocolorscale', 'marker.line.reversescale', 'xcalendar', 'ycalendar', - 'cumulative', 'cumulative.enabled', 'cumulative.direction', 'cumulative.currentbin', - 'a0', 'da', 'b0', 'db', 'atype', 'btype', - 'cheaterslope', 'carpet', 'sum', + 'cumulative', 'cumulative.enabled', 'cumulative.direction', 'cumulative.currentbin' ]; - var carpetAxisAttributes = [ - 'color', 'smoothing', 'title', 'titlefont', 'titlefont.size', 'titlefont.family', - 'titlefont.color', 'titleoffset', 'type', 'autorange', 'rangemode', 'range', - 'fixedrange', 'cheatertype', 'tickmode', 'nticks', 'tickvals', 'ticktext', - 'ticks', 'mirror', 'ticklen', 'tickwidth', 'tickcolor', 'showticklabels', - 'tickfont', 'tickfont.size', 'tickfont.family', 'tickfont.color', 'tickprefix', - 'showtickprefix', 'ticksuffix', 'showticksuffix', 'showexponent', 'exponentformat', - 'separatethousands', 'tickformat', 'categoryorder', 'categoryarray', 'labelpadding', - 'labelprefix', 'labelsuffix', 'labelfont', 'labelfont.family', 'labelfont.size', - 'labelfont.color', 'showline', 'linecolor', 'linewidth', 'gridcolor', 'gridwidth', - 'showgrid', 'minorgridcount', 'minorgridwidth', 'minorgridcolor', 'startline', - 'startlinecolor', 'startlinewidth', 'endline', 'endlinewidth', 'endlinecolor', - 'tick0', 'dtick', 'arraytick0', 'arraydtick', 'hoverformat', 'tickangle' - ]; - - for(i = 0; i < carpetAxisAttributes.length; i++) { - recalcAttrs.push('aaxis.' + carpetAxisAttributes[i]); - recalcAttrs.push('baxis.' + carpetAxisAttributes[i]); - } - for(i = 0; i < traces.length; i++) { if(Registry.traceIs(fullData[traces[i]], 'box')) { recalcAttrs.push('name'); @@ -124016,12 +123584,6 @@ function _restyle(gd, aobj, _traces) { var moduleAttrs = (contFull._module || {}).attributes || {}; var valObject = Lib.nestedProperty(moduleAttrs, ai).get() || {}; - // if restyling entire attribute container, assume worse case - if(!valObject.valType) { - flags.docalc = true; - } - - // must redo calcdata when restyling array values of arrayOk attributes if(valObject.arrayOk && (Array.isArray(newVal) || Array.isArray(oldVal))) { flags.docalc = true; } @@ -124089,14 +123651,9 @@ function _restyle(gd, aobj, _traces) { doextra(axlist.map(rangeAttr), [0, 1], 0); } flags.docalc = true; - - } else if(replotAttrs.indexOf(aiAboveArray) !== -1) { - flags.doplot = true; - } else if(aiAboveArray.indexOf('aaxis') === 0 || aiAboveArray.indexOf('baxis') === 0) { - flags.doplot = true; - } else if(autorangeAttrs.indexOf(aiAboveArray) !== -1) { - flags.docalcAutorange = true; } + else if(replotAttrs.indexOf(aiAboveArray) !== -1) flags.doplot = true; + else if(autorangeAttrs.indexOf(aiAboveArray) !== -1) flags.docalcAutorange = true; } // do we need to force a recalc? @@ -124304,16 +123861,6 @@ function _relayout(gd, aobj) { return (ax || {}).autorange; } - // for constraint enforcement: keep track of all axes (as {id: name}) - // we're editing the (auto)range of, so we can tell the others constrained - // to scale with them that it's OK for them to shrink - var rangesAltered = {}; - - function recordAlteredAxis(pleafPlus) { - var axId = axisIds.name2id(pleafPlus.split('.')[0]); - rangesAltered[axId] = 1; - } - // alter gd.layout for(var ai in aobj) { if(helpers.hasParent(aobj, ai)) { @@ -124348,17 +123895,15 @@ function _relayout(gd, aobj) { // // To do so, we must manually set them back here using the _initialAutoSize cache. if(['width', 'height'].indexOf(ai) !== -1 && vi === null) { - fullLayout[ai] = gd._initialAutoSize[ai]; + gd._fullLayout[ai] = gd._initialAutoSize[ai]; } // check autorange vs range else if(pleafPlus.match(/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/)) { doextra(ptrunk + '.autorange', false); - recordAlteredAxis(pleafPlus); } else if(pleafPlus.match(/^[xyz]axis[0-9]*\.autorange$/)) { doextra([ptrunk + '.range[0]', ptrunk + '.range[1]'], undefined); - recordAlteredAxis(pleafPlus); } else if(pleafPlus.match(/^aspectratio\.[xyz]$/)) { doextra(proot + '.aspectmode', 'manual'); @@ -124522,18 +124067,6 @@ function _relayout(gd, aobj) { else if(proot.indexOf('geo') === 0) flags.doplot = true; else if(proot.indexOf('ternary') === 0) flags.doplot = true; else if(ai === 'paper_bgcolor') flags.doplot = true; - else if(proot === 'margin' || - pp1 === 'autorange' || - pp1 === 'rangemode' || - pp1 === 'type' || - pp1 === 'domain' || - pp1 === 'fixedrange' || - pp1 === 'scaleanchor' || - pp1 === 'scaleratio' || - ai.indexOf('calendar') !== -1 || - ai.match(/^(bar|box|font)/)) { - flags.docalc = true; - } else if(fullLayout._has('gl2d') && (ai.indexOf('axis') !== -1 || ai === 'plot_bgcolor') ) flags.doplot = true; @@ -124557,17 +124090,24 @@ function _relayout(gd, aobj) { else if(ai === 'margin.pad') { flags.doticks = flags.dolayoutstyle = true; } + else if(proot === 'margin' || + pp1 === 'autorange' || + pp1 === 'rangemode' || + pp1 === 'type' || + pp1 === 'domain' || + ai.indexOf('calendar') !== -1 || + ai.match(/^(bar|box|font)/)) { + flags.docalc = true; + } /* - * hovermode, dragmode, and spikes don't need any redrawing, since they just - * affect reaction to user input. Everything else, assume full replot. + * hovermode and dragmode don't need any redrawing, since they just + * affect reaction to user input, everything else, assume full replot. * height, width, autosize get dealt with below. Except for the case of * of subplots - scenes - which require scene.updateFx to be called. */ - else if(['hovermode', 'dragmode'].indexOf(ai) !== -1 || - ai.indexOf('spike') !== -1) { - flags.domodebar = true; - } - else if(['height', 'width', 'autosize'].indexOf(ai) === -1) { + else if(['hovermode', 'dragmode'].indexOf(ai) !== -1) flags.domodebar = true; + else if(['hovermode', 'dragmode', 'height', + 'width', 'autosize'].indexOf(ai) === -1) { flags.doplot = true; } @@ -124582,37 +124122,16 @@ function _relayout(gd, aobj) { if(!finished) flags.doplot = true; } - // figure out if we need to recalculate axis constraints - var constraints = fullLayout._axisConstraintGroups; - for(var axId in rangesAltered) { - for(i = 0; i < constraints.length; i++) { - var group = constraints[i]; - if(group[axId]) { - // Always recalc if we're changing constrained ranges. - // Otherwise it's possible to violate the constraints by - // specifying arbitrary ranges for all axes in the group. - // this way some ranges may expand beyond what's specified, - // as they do at first draw, to satisfy the constraints. - flags.docalc = true; - for(var groupAxId in group) { - if(!rangesAltered[groupAxId]) { - axisIds.getFromId(gd, groupAxId)._constraintShrinkable = true; - } - } - } - } - } - - var oldWidth = fullLayout.width, - oldHeight = fullLayout.height; + var oldWidth = gd._fullLayout.width, + oldHeight = gd._fullLayout.height; // calculate autosizing - if(gd.layout.autosize) Plots.plotAutoSize(gd, gd.layout, fullLayout); + if(gd.layout.autosize) Plots.plotAutoSize(gd, gd.layout, gd._fullLayout); // avoid unnecessary redraws var hasSizechanged = aobj.height || aobj.width || - (fullLayout.width !== oldWidth) || - (fullLayout.height !== oldHeight); + (gd._fullLayout.width !== oldWidth) || + (gd._fullLayout.height !== oldHeight); if(hasSizechanged) flags.docalc = true; @@ -125249,13 +124768,6 @@ Plotly.deleteFrames = function(gd, frameList) { var ops = []; var revops = []; - if(!frameList) { - frameList = []; - for(i = 0; i < _frames.length; i++) { - frameList.push(i); - } - } - frameList = frameList.slice(0); frameList.sort(); @@ -125418,7 +124930,7 @@ function makePlotFramework(gd) { gd.emit('plotly_framework'); } -},{"../components/drawing":602,"../components/errorbars":608,"../constants/xmlns_namespaces":668,"../lib":685,"../lib/events":676,"../lib/queue":697,"../lib/svg_text_utils":704,"../plotly":719,"../plots/cartesian/axis_ids":727,"../plots/cartesian/constants":729,"../plots/cartesian/constraints":731,"../plots/cartesian/graph_interact":733,"../plots/plots":787,"../plots/polar":790,"../registry":802,"./helpers":709,"./manage_arrays":710,"./subroutines":716,"d3":107,"fast-isnumeric":116}],712:[function(require,module,exports){ +},{"../components/drawing":598,"../components/errorbars":604,"../constants/xmlns_namespaces":664,"../lib":680,"../lib/events":671,"../lib/queue":692,"../lib/svg_text_utils":699,"../plotly":714,"../plots/cartesian/constants":724,"../plots/cartesian/graph_interact":726,"../plots/plots":778,"../plots/polar":781,"../registry":793,"./helpers":704,"./manage_arrays":705,"./subroutines":711,"d3":104,"fast-isnumeric":113}],707:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125544,7 +125056,7 @@ function defaultSetBackground(gd, bgColor) { } } -},{}],713:[function(require,module,exports){ +},{}],708:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -125950,7 +125462,7 @@ function insertAttrs(baseAttrs, newAttrs, astr) { np.set(extendDeep(np.get() || {}, newAttrs)); } -},{"../lib":685,"../plots/animation_attributes":720,"../plots/attributes":722,"../plots/frame_attributes":749,"../plots/layout_attributes":778,"../plots/polar/area_attributes":788,"../plots/polar/axis_attributes":789,"../registry":802}],714:[function(require,module,exports){ +},{"../lib":680,"../plots/animation_attributes":715,"../plots/attributes":717,"../plots/frame_attributes":740,"../plots/layout_attributes":769,"../plots/polar/area_attributes":779,"../plots/polar/axis_attributes":780,"../registry":793}],709:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126049,7 +125561,7 @@ function registerComponentModule(newModule) { Registry.registerComponent(newModule); } -},{"../lib":685,"../registry":802}],715:[function(require,module,exports){ +},{"../lib":680,"../registry":793}],710:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126075,7 +125587,7 @@ module.exports = function setPlotConfig(configObj) { return Lib.extendFlat(Plotly.defaultConfig, configObj); }; -},{"../lib":685,"../plotly":719}],716:[function(require,module,exports){ +},{"../lib":680,"../plotly":714}],711:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126482,7 +125994,7 @@ exports.doCamera = function(gd) { } }; -},{"../components/color":578,"../components/drawing":602,"../components/modebar":626,"../components/titles":655,"../lib":685,"../plotly":719,"../plots/plots":787,"../registry":802,"d3":107}],717:[function(require,module,exports){ +},{"../components/color":575,"../components/drawing":598,"../components/modebar":622,"../components/titles":651,"../lib":680,"../plotly":714,"../plots/plots":778,"../registry":793,"d3":104}],712:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126592,7 +126104,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":685,"../plotly":719,"../snapshot/cloneplot":803,"../snapshot/helpers":806,"../snapshot/svgtoimg":808,"../snapshot/tosvg":810,"fast-isnumeric":116}],718:[function(require,module,exports){ +},{"../lib":680,"../plotly":714,"../snapshot/cloneplot":794,"../snapshot/helpers":797,"../snapshot/svgtoimg":799,"../snapshot/tosvg":801,"fast-isnumeric":113}],713:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126963,7 +126475,7 @@ function convertPathToAttributeString(path) { return astr; } -},{"../lib":685,"../plots/plots":787,"./plot_schema":713}],719:[function(require,module,exports){ +},{"../lib":680,"../plots/plots":778,"./plot_schema":708}],714:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -126996,7 +126508,7 @@ exports.ModeBar = require('./components/modebar'); // plot api require('./plot_api/plot_api'); -},{"./components/modebar":626,"./plot_api/plot_api":711,"./plot_api/plot_config":712,"./plots/cartesian/axes":724,"./plots/cartesian/graph_interact":733,"./plots/plots":787}],720:[function(require,module,exports){ +},{"./components/modebar":622,"./plot_api/plot_api":706,"./plot_api/plot_config":707,"./plots/cartesian/axes":719,"./plots/cartesian/graph_interact":726,"./plots/plots":778}],715:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127098,7 +126610,7 @@ module.exports = { } }; -},{}],721:[function(require,module,exports){ +},{}],716:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127179,7 +126691,7 @@ module.exports = function handleArrayContainerDefaults(parentObjIn, parentObjOut } }; -},{"../lib":685}],722:[function(require,module,exports){ +},{"../lib":680}],717:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127262,7 +126774,7 @@ module.exports = { } }; -},{}],723:[function(require,module,exports){ +},{}],718:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127289,7 +126801,7 @@ module.exports = { } }; -},{}],724:[function(require,module,exports){ +},{}],719:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -127653,35 +127165,6 @@ axes.saveRangeInitial = function(gd, overwrite) { return hasOneAxisChanged; }; -// save a copy of the initial spike visibility -axes.saveShowSpikeInitial = function(gd, overwrite) { - var axList = axes.list(gd, '', true), - hasOneAxisChanged = false, - allEnabled = 'on'; - - for(var i = 0; i < axList.length; i++) { - var ax = axList[i]; - - var isNew = (ax._showSpikeInitial === undefined); - var hasChanged = ( - isNew || !( - ax.showspikes === ax._showspikes - ) - ); - - if((isNew) || (overwrite && hasChanged)) { - ax._showSpikeInitial = ax.showspikes; - hasOneAxisChanged = true; - } - - if(allEnabled === 'on' && !ax.showspikes) { - allEnabled = 'off'; - } - } - gd._fullLayout._cartesianSpikesEnabled = allEnabled; - return hasOneAxisChanged; -}; - // axes.expand: if autoranging, include new data in the outer limits // for this axis // data is an array of numbers (ie already run through ax.d2c) @@ -128924,7 +128407,7 @@ axes.doTicks = function(gd, axid, skipTitle) { // set scaling to pixels ax.setScale(); - var axLetter = axid.charAt(0), + var axletter = axid.charAt(0), counterLetter = axes.counterLetter(axid), vals = axes.calcTicks(ax), datafn = function(d) { return [d.text, d.x, ax.mirror].join('_'); }, @@ -128938,7 +128421,7 @@ axes.doTicks = function(gd, axid, skipTitle) { gridWidth = Drawing.crispRound(gd, ax.gridwidth, 1), zeroLineWidth = Drawing.crispRound(gd, ax.zerolinewidth, gridWidth), tickWidth = Drawing.crispRound(gd, ax.tickwidth, 1), - sides, transfn, tickpathfn, subplots, + sides, transfn, tickpathfn, i; if(ax._counterangle && ax.ticks === 'outside') { @@ -128948,7 +128431,7 @@ axes.doTicks = function(gd, axid, skipTitle) { } // positioning arguments for x vs y axes - if(axLetter === 'x') { + if(axletter === 'x') { sides = ['bottom', 'top']; transfn = function(d) { return 'translate(' + ax.l2p(d.x) + ',0)'; @@ -128961,7 +128444,7 @@ axes.doTicks = function(gd, axid, skipTitle) { else return 'M0,' + shift + 'v' + len; }; } - else if(axLetter === 'y') { + else if(axletter === 'y') { sides = ['left', 'right']; transfn = function(d) { return 'translate(0,' + ax.l2p(d.x) + ')'; @@ -128982,12 +128465,10 @@ axes.doTicks = function(gd, axid, skipTitle) { // which direction do the side[0], side[1], and free ticks go? // then we flip if outside XOR y axis ticksign = [-1, 1, axside === sides[1] ? 1 : -1]; - if((ax.ticks !== 'inside') === (axLetter === 'x')) { + if((ax.ticks !== 'inside') === (axletter === 'x')) { ticksign = ticksign.map(function(v) { return -v; }); } - if(!ax.visible) return; - // remove zero lines, grid lines, and inside ticks if they're within // 1 pixel of the end // The key case here is removing zero lines when the axis bound is zero. @@ -129018,12 +128499,12 @@ axes.doTicks = function(gd, axid, skipTitle) { var tickLabels = container.selectAll('g.' + tcls).data(vals, datafn); if(!ax.showticklabels || !isNumeric(position)) { tickLabels.remove(); - drawAxTitle(); + drawAxTitle(axid); return; } var labelx, labely, labelanchor, labelpos0, flipit; - if(axLetter === 'x') { + if(axletter === 'x') { flipit = (axside === 'bottom') ? 1 : -1; labelx = function(d) { return d.dx + labelShift * flipit; }; labelpos0 = position + (labelStandoff + pad) * flipit; @@ -129139,7 +128620,7 @@ axes.doTicks = function(gd, axid, skipTitle) { // check for auto-angling if x labels overlap // don't auto-angle at all for log axes with // base and digit format - if(axLetter === 'x' && !isNumeric(ax.tickangle) && + if(axletter === 'x' && !isNumeric(ax.tickangle) && (ax.type !== 'log' || String(ax.dtick).charAt(0) !== 'D')) { var lbbArray = []; tickLabels.each(function(d) { @@ -129184,59 +128665,12 @@ axes.doTicks = function(gd, axid, skipTitle) { // (so it can move out of the way if needed) // TODO: separate out scoot so we don't need to do // a full redraw of the title (mostly relevant for MathJax) - drawAxTitle(); + drawAxTitle(axid); return axid + ' done'; } function calcBoundingBox() { - var bBox = container.node().getBoundingClientRect(); - var gdBB = gd.getBoundingClientRect(); - - /* - * the way we're going to use this, the positioning that matters - * is relative to the origin of gd. This is important particularly - * if gd is scrollable, and may have been scrolled between the time - * we calculate this and the time we use it - */ - ax._boundingBox = { - width: bBox.width, - height: bBox.height, - left: bBox.left - gdBB.left, - right: bBox.right - gdBB.left, - top: bBox.top - gdBB.top, - bottom: bBox.bottom - gdBB.top - }; - - /* - * for spikelines: what's the full domain of positions in the - * opposite direction that are associated with this axis? - * This means any axes that we make a subplot with, plus the - * position of the axis itself if it's free. - */ - if(subplots) { - var fullRange = ax._counterSpan = [Infinity, -Infinity]; - - for(i = 0; i < subplots.length; i++) { - var subplot = fullLayout._plots[subplots[i]]; - var counterAxis = subplot[(axLetter === 'x') ? 'yaxis' : 'xaxis']; - - extendRange(fullRange, [ - counterAxis._offset, - counterAxis._offset + counterAxis._length - ]); - } - - if(ax.anchor === 'free') { - extendRange(fullRange, (axLetter === 'x') ? - [ax._boundingBox.bottom, ax._boundingBox.top] : - [ax._boundingBox.right, ax._boundingBox.left]); - } - } - - function extendRange(range, newRange) { - range[0] = Math.min(range[0], newRange[0]); - range[1] = Math.max(range[1], newRange[1]); - } + ax._boundingBox = container.node().getBoundingClientRect(); } var done = Lib.syncOrAsync([ @@ -129248,7 +128682,7 @@ axes.doTicks = function(gd, axid, skipTitle) { return done; } - function drawAxTitle() { + function drawAxTitle(axid) { if(skipTitle) return; // now this only applies to regular cartesian axes; colorbars and @@ -129319,16 +128753,16 @@ axes.doTicks = function(gd, axid, skipTitle) { function traceHasBarsOrFill(trace, subplot) { if(trace.visible !== true || trace.xaxis + trace.yaxis !== subplot) return false; - if(Registry.traceIs(trace, 'bar') && trace.orientation === {x: 'h', y: 'v'}[axLetter]) return true; - return trace.fill && trace.fill.charAt(trace.fill.length - 1) === axLetter; + if(Registry.traceIs(trace, 'bar') && trace.orientation === {x: 'h', y: 'v'}[axletter]) return true; + return trace.fill && trace.fill.charAt(trace.fill.length - 1) === axletter; } function drawGrid(plotinfo, counteraxis, subplot) { var gridcontainer = plotinfo.gridlayer, zlcontainer = plotinfo.zerolinelayer, - gridvals = plotinfo['hidegrid' + axLetter] ? [] : valsClipped, + gridvals = plotinfo['hidegrid' + axletter] ? [] : valsClipped, gridpath = ax._gridpath || - 'M0,0' + ((axLetter === 'x') ? 'v' : 'h') + counteraxis._length, + 'M0,0' + ((axletter === 'x') ? 'v' : 'h') + counteraxis._length, grid = gridcontainer.selectAll('path.' + gcls) .data((ax.showgrid === false) ? [] : gridvals, datafn); grid.enter().append('path').classed(gcls, 1) @@ -129382,13 +128816,12 @@ axes.doTicks = function(gd, axid, skipTitle) { return drawLabels(ax._axislayer, ax._pos); } else { - subplots = axes.getSubplots(gd, ax); - var alldone = subplots.map(function(subplot) { + var alldone = axes.getSubplots(gd, ax).map(function(subplot) { var plotinfo = fullLayout._plots[subplot]; if(!fullLayout._has('cartesian')) return; - var container = plotinfo[axLetter + 'axislayer'], + var container = plotinfo[axletter + 'axislayer'], // [bottom or left, top or right, free, main] linepositions = ax._linepositions[subplot] || [], @@ -129576,7 +129009,7 @@ function swapAxisAttrs(layout, key, xFullAxes, yFullAxes) { } } -},{"../../components/color":578,"../../components/drawing":602,"../../components/titles":655,"../../constants/numerical":666,"../../lib":685,"../../lib/svg_text_utils":704,"../../registry":802,"./axis_ids":727,"./layout_attributes":735,"./layout_defaults":736,"./set_convert":741,"d3":107,"fast-isnumeric":116}],725:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"../../components/titles":651,"../../constants/numerical":662,"../../lib":680,"../../lib/svg_text_utils":699,"../../registry":793,"./axis_ids":722,"./layout_attributes":728,"./layout_defaults":729,"./set_convert":733,"d3":104,"fast-isnumeric":113}],720:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129651,7 +129084,7 @@ function category(a) { return curvecats > curvenums * 2; } -},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],726:[function(require,module,exports){ +},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],721:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129676,6 +129109,8 @@ var handleTickLabelDefaults = require('./tick_label_defaults'); var handleCategoryOrderDefaults = require('./category_order_defaults'); var setConvert = require('./set_convert'); var orderedCategories = require('./ordered_categories'); +var axisIds = require('./axis_ids'); +var autoType = require('./axis_autotype'); /** @@ -129683,11 +129118,12 @@ var orderedCategories = require('./ordered_categories'); * * letter: 'x' or 'y' * title: name of the axis (ie 'Colorbar') to go in default title + * name: axis object name (ie 'xaxis') if one should be stored * font: the default font to inherit * outerTicks: boolean, should ticks default to outside? * showGrid: boolean, should gridlines be shown by default? * noHover: boolean, this axis doesn't support hover effects? - * data: the plot data, used to manage categories + * data: the plot data to use in choosing auto type * bgColor: the plot background color, to calculate default gridline colors */ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, options, layoutOut) { @@ -129701,9 +129137,28 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, return Lib.coerce2(containerIn, containerOut, layoutAttributes, attr, dflt); } - var visible = coerce('visible', !options.cheateronly); + // set up some private properties + if(options.name) { + containerOut._name = options.name; + containerOut._id = axisIds.name2id(options.name); + } - var axType = containerOut.type; + // now figure out type and do some more initialization + var axType = coerce('type'); + if(axType === '-') { + setAutoType(containerOut, options.data); + + if(containerOut.type === '-') { + containerOut.type = 'linear'; + } + else { + // copy autoType back to input axis + // note that if this object didn't exist + // in the input layout, we have to put it in + // this happens in the main supplyDefaults function + axType = containerIn.type = containerOut.type; + } + } if(axType === 'date') { var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleDefaults'); @@ -129712,20 +129167,6 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, setConvert(containerOut, layoutOut); - var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range)); - - if(autoRange) coerce('rangemode'); - - coerce('range'); - containerOut.cleanRange(); - - handleCategoryOrderDefaults(containerIn, containerOut, coerce); - containerOut._initialCategories = axType === 'category' ? - orderedCategories(letter, containerOut.categoryorder, containerOut.categoryarray, options.data) : - []; - - if(!visible) return containerOut; - var dfltColor = coerce('color'); // if axis.color was provided, use it for fonts too; otherwise, // inherit from global font color in case that was provided. @@ -129738,9 +129179,17 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, color: dfltFontColor }); + var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range)); + + if(autoRange) coerce('rangemode'); + + coerce('range'); + containerOut.cleanRange(); + handleTickValueDefaults(containerIn, containerOut, coerce, axType); handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options); handleTickMarkDefaults(containerIn, containerOut, coerce, options); + handleCategoryOrderDefaults(containerIn, containerOut, coerce); var lineColor = coerce2('linecolor', dfltColor), lineWidth = coerce2('linewidth'), @@ -129771,10 +129220,99 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, delete containerOut.zerolinewidth; } + // fill in categories + containerOut._initialCategories = axType === 'category' ? + orderedCategories(letter, containerOut.categoryorder, containerOut.categoryarray, options.data) : + []; + return containerOut; }; -},{"../../components/color/attributes":577,"../../lib":685,"../../registry":802,"./category_order_defaults":728,"./layout_attributes":735,"./ordered_categories":737,"./set_convert":741,"./tick_label_defaults":742,"./tick_mark_defaults":743,"./tick_value_defaults":744,"tinycolor2":514}],727:[function(require,module,exports){ +function setAutoType(ax, data) { + // new logic: let people specify any type they want, + // only autotype if type is '-' + if(ax.type !== '-') return; + + var id = ax._id, + axLetter = id.charAt(0); + + // support 3d + if(id.indexOf('scene') !== -1) id = axLetter; + + var d0 = getFirstNonEmptyTrace(data, id, axLetter); + if(!d0) return; + + // first check for histograms, as the count direction + // should always default to a linear axis + if(d0.type === 'histogram' && + axLetter === {v: 'y', h: 'x'}[d0.orientation || 'v']) { + ax.type = 'linear'; + return; + } + + var calAttr = axLetter + 'calendar', + calendar = d0[calAttr]; + + // check all boxes on this x axis to see + // if they're dates, numbers, or categories + if(isBoxWithoutPositionCoords(d0, axLetter)) { + var posLetter = getBoxPosLetter(d0), + boxPositions = [], + trace; + + for(var i = 0; i < data.length; i++) { + trace = data[i]; + if(!Registry.traceIs(trace, 'box') || + (trace[axLetter + 'axis'] || axLetter) !== id) continue; + + if(trace[posLetter] !== undefined) boxPositions.push(trace[posLetter][0]); + else if(trace.name !== undefined) boxPositions.push(trace.name); + else boxPositions.push('text'); + + if(trace[calAttr] !== calendar) calendar = undefined; + } + + ax.type = autoType(boxPositions, calendar); + } + else { + ax.type = autoType(d0[axLetter] || [d0[axLetter + '0']], calendar); + } +} + +function getBoxPosLetter(trace) { + return {v: 'x', h: 'y'}[trace.orientation || 'v']; +} + +function isBoxWithoutPositionCoords(trace, axLetter) { + var posLetter = getBoxPosLetter(trace), + isBox = Registry.traceIs(trace, 'box'), + isCandlestick = Registry.traceIs(trace._fullInput || {}, 'candlestick'); + + return ( + isBox && + !isCandlestick && + axLetter === posLetter && + trace[posLetter] === undefined && + trace[posLetter + '0'] === undefined + ); +} + +function getFirstNonEmptyTrace(data, id, axLetter) { + for(var i = 0; i < data.length; i++) { + var trace = data[i]; + + if((trace[axLetter + 'axis'] || axLetter) === id) { + if(isBoxWithoutPositionCoords(trace, axLetter)) { + return trace; + } + else if((trace[axLetter] || []).length || trace[axLetter + '0']) { + return trace; + } + } + } +} + +},{"../../components/color/attributes":574,"../../lib":680,"../../registry":793,"./axis_autotype":720,"./axis_ids":722,"./category_order_defaults":723,"./layout_attributes":728,"./ordered_categories":730,"./set_convert":733,"./tick_label_defaults":734,"./tick_mark_defaults":735,"./tick_value_defaults":736,"tinycolor2":511}],722:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129896,7 +129434,7 @@ exports.getFromTrace = function(gd, fullTrace, type) { return ax; }; -},{"../../lib":685,"../../registry":802,"../plots":787,"./constants":729}],728:[function(require,module,exports){ +},{"../../lib":680,"../../registry":793,"../plots":778,"./constants":724}],723:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -129930,7 +129468,7 @@ module.exports = function handleCategoryOrderDefaults(containerIn, containerOut, } }; -},{}],729:[function(require,module,exports){ +},{}],724:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130000,222 +129538,7 @@ module.exports = { DFLTRANGEY: [-1, 4] }; -},{}],730:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var Lib = require('../../lib'); -var id2name = require('./axis_ids').id2name; - - -module.exports = function handleConstraintDefaults(containerIn, containerOut, coerce, allAxisIds, layoutOut) { - var constraintGroups = layoutOut._axisConstraintGroups; - - if(containerOut.fixedrange || !containerIn.scaleanchor) return; - - var constraintOpts = getConstraintOpts(constraintGroups, containerOut._id, allAxisIds, layoutOut); - - var scaleanchor = Lib.coerce(containerIn, containerOut, { - scaleanchor: { - valType: 'enumerated', - values: constraintOpts.linkableAxes - } - }, 'scaleanchor'); - - if(scaleanchor) { - var scaleratio = coerce('scaleratio'); - // TODO: I suppose I could do attribute.min: Number.MIN_VALUE to avoid zero, - // but that seems hacky. Better way to say "must be a positive number"? - // Of course if you use several super-tiny values you could eventually - // force a product of these to zero and all hell would break loose... - // Likewise with super-huge values. - if(!scaleratio) scaleratio = containerOut.scaleratio = 1; - - updateConstraintGroups(constraintGroups, constraintOpts.thisGroup, - containerOut._id, scaleanchor, scaleratio); - } - else if(allAxisIds.indexOf(containerIn.scaleanchor) !== -1) { - Lib.warn('ignored ' + containerOut._name + '.scaleanchor: "' + - containerIn.scaleanchor + '" to avoid either an infinite loop ' + - 'and possibly inconsistent scaleratios, or because the target' + - 'axis has fixed range.'); - } -}; - -function getConstraintOpts(constraintGroups, thisID, allAxisIds, layoutOut) { - // If this axis is already part of a constraint group, we can't - // scaleanchor any other axis in that group, or we'd make a loop. - // Filter allAxisIds to enforce this, also matching axis types. - - var thisType = layoutOut[id2name(thisID)].type; - - var i, j, idj, axj; - - var linkableAxes = []; - for(j = 0; j < allAxisIds.length; j++) { - idj = allAxisIds[j]; - if(idj === thisID) continue; - - axj = layoutOut[id2name(idj)]; - if(axj.type === thisType && !axj.fixedrange) linkableAxes.push(idj); - } - - for(i = 0; i < constraintGroups.length; i++) { - if(constraintGroups[i][thisID]) { - var thisGroup = constraintGroups[i]; - - var linkableAxesNoLoops = []; - for(j = 0; j < linkableAxes.length; j++) { - idj = linkableAxes[j]; - if(!thisGroup[idj]) linkableAxesNoLoops.push(idj); - } - return {linkableAxes: linkableAxesNoLoops, thisGroup: thisGroup}; - } - } - - return {linkableAxes: linkableAxes, thisGroup: null}; -} - - -/* - * Add this axis to the axis constraint groups, which is the collection - * of axes that are all constrained together on scale. - * - * constraintGroups: a list of objects. each object is - * {axis_id: scale_within_group}, where scale_within_group is - * only important relative to the rest of the group, and defines - * the relative scales between all axes in the group - * - * thisGroup: the group the current axis is already in - * thisID: the id if the current axis - * scaleanchor: the id of the axis to scale it with - * scaleratio: the ratio of this axis to the scaleanchor axis - */ -function updateConstraintGroups(constraintGroups, thisGroup, thisID, scaleanchor, scaleratio) { - var i, j, groupi, keyj, thisGroupIndex; - - if(thisGroup === null) { - thisGroup = {}; - thisGroup[thisID] = 1; - thisGroupIndex = constraintGroups.length; - constraintGroups.push(thisGroup); - } - else { - thisGroupIndex = constraintGroups.indexOf(thisGroup); - } - - var thisGroupKeys = Object.keys(thisGroup); - - // we know that this axis isn't in any other groups, but we don't know - // about the scaleanchor axis. If it is, we need to merge the groups. - for(i = 0; i < constraintGroups.length; i++) { - groupi = constraintGroups[i]; - if(i !== thisGroupIndex && groupi[scaleanchor]) { - var baseScale = groupi[scaleanchor]; - for(j = 0; j < thisGroupKeys.length; j++) { - keyj = thisGroupKeys[j]; - groupi[keyj] = baseScale * scaleratio * thisGroup[keyj]; - } - constraintGroups.splice(thisGroupIndex, 1); - return; - } - } - - // otherwise, we insert the new scaleanchor axis as the base scale (1) - // in its group, and scale the rest of the group to it - if(scaleratio !== 1) { - for(j = 0; j < thisGroupKeys.length; j++) { - thisGroup[thisGroupKeys[j]] *= scaleratio; - } - } - thisGroup[scaleanchor] = 1; -} - -},{"../../lib":685,"./axis_ids":727}],731:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var id2name = require('./axis_ids').id2name; -var scaleZoom = require('./scale_zoom'); - -var ALMOST_EQUAL = require('../../constants/numerical').ALMOST_EQUAL; - - -module.exports = function enforceAxisConstraints(gd) { - var fullLayout = gd._fullLayout; - var constraintGroups = fullLayout._axisConstraintGroups; - - var i, j, axisID, ax, normScale; - - for(i = 0; i < constraintGroups.length; i++) { - var group = constraintGroups[i]; - var axisIDs = Object.keys(group); - - var minScale = Infinity; - var maxScale = 0; - // mostly matchScale will be the same as minScale - // ie we expand axis ranges to encompass *everything* - // that's currently in any of their ranges, but during - // autorange of a subset of axes we will ignore other - // axes for this purpose. - var matchScale = Infinity; - var normScales = {}; - var axes = {}; - - // find the (normalized) scale of each axis in the group - for(j = 0; j < axisIDs.length; j++) { - axisID = axisIDs[j]; - axes[axisID] = ax = fullLayout[id2name(axisID)]; - - // set axis scale here so we can use _m rather than - // having to calculate it from length and range - ax.setScale(); - - // abs: inverted scales still satisfy the constraint - normScales[axisID] = normScale = Math.abs(ax._m) / group[axisID]; - minScale = Math.min(minScale, normScale); - if(ax._constraintShrinkable) { - // this has served its purpose, so remove it - delete ax._constraintShrinkable; - } - else { - matchScale = Math.min(matchScale, normScale); - } - maxScale = Math.max(maxScale, normScale); - } - - // Do we have a constraint mismatch? Give a small buffer for rounding errors - if(minScale > ALMOST_EQUAL * maxScale) continue; - - // now increase any ranges we need to until all normalized scales are equal - for(j = 0; j < axisIDs.length; j++) { - axisID = axisIDs[j]; - normScale = normScales[axisID]; - - if(normScale !== matchScale) { - scaleZoom(axes[axisID], normScale / matchScale); - } - } - } -}; - -},{"../../constants/numerical":666,"./axis_ids":727,"./scale_zoom":739}],732:[function(require,module,exports){ +},{}],725:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -130239,14 +129562,9 @@ var Drawing = require('../../components/drawing'); var setCursor = require('../../lib/setcursor'); var dragElement = require('../../components/dragelement'); -var doTicks = require('./axes').doTicks; -var getFromId = require('./axis_ids').getFromId; +var Axes = require('./axes'); var prepSelect = require('./select'); -var scaleZoom = require('./scale_zoom'); - var constants = require('./constants'); -var MINDRAG = constants.MINDRAG; -var MINZOOM = constants.MINZOOM; // flag for showing "doubleclick to zoom out" only at the beginning @@ -130269,71 +129587,48 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // dragged stores whether a drag has occurred, so we don't have to // redraw unnecessarily, ie if no move bigger than MINDRAG or MINZOOM px var fullLayout = gd._fullLayout, - zoomlayer = gd._fullLayout._zoomlayer, - isMainDrag = (ns + ew === 'nsew'), - subplots, - xa, - ya, - xs, - ys, - pw, - ph, - xActive, - yActive, - cursor, - isSubplotConstrained, - xaLinked, - yaLinked; - - function recomputeAxisLists() { - xa = [plotinfo.xaxis]; - ya = [plotinfo.yaxis]; - var xa0 = xa[0]; - var ya0 = ya[0]; - pw = xa0._length; - ph = ya0._length; - - var constraintGroups = fullLayout._axisConstraintGroups; - var xIDs = [xa0._id]; - var yIDs = [ya0._id]; - // if we're dragging two axes at once, also drag overlays - subplots = [plotinfo].concat((ns && ew) ? plotinfo.overlays : []); - - for(var i = 1; i < subplots.length; i++) { - var subplotXa = subplots[i].xaxis, - subplotYa = subplots[i].yaxis; - - if(xa.indexOf(subplotXa) === -1) { - xa.push(subplotXa); - xIDs.push(subplotXa._id); - } - - if(ya.indexOf(subplotYa) === -1) { - ya.push(subplotYa); - yIDs.push(subplotYa._id); - } + subplots = [plotinfo].concat((ns && ew) ? plotinfo.overlays : []), + xa = [plotinfo.xaxis], + ya = [plotinfo.yaxis], + pw = xa[0]._length, + ph = ya[0]._length, + MINDRAG = constants.MINDRAG, + MINZOOM = constants.MINZOOM, + isMainDrag = (ns + ew === 'nsew'); + + for(var i = 1; i < subplots.length; i++) { + var subplotXa = subplots[i].xaxis, + subplotYa = subplots[i].yaxis; + if(xa.indexOf(subplotXa) === -1) xa.push(subplotXa); + if(ya.indexOf(subplotYa) === -1) ya.push(subplotYa); + } + + function isDirectionActive(axList, activeVal) { + for(var i = 0; i < axList.length; i++) { + if(!axList[i].fixedrange) return activeVal; } + return ''; + } - xActive = isDirectionActive(xa, ew); - yActive = isDirectionActive(ya, ns); - cursor = getDragCursor(yActive + xActive, fullLayout.dragmode); - xs = xa0._offset; - ys = ya0._offset; + var allaxes = xa.concat(ya), + xActive = isDirectionActive(xa, ew), + yActive = isDirectionActive(ya, ns), + cursor = getDragCursor(yActive + xActive, fullLayout.dragmode), + dragClass = ns + ew + 'drag'; - var links = calcLinks(constraintGroups, xIDs, yIDs); - isSubplotConstrained = links.xy; + var dragger3 = plotinfo.draglayer.selectAll('.' + dragClass).data([0]); - // finally make the list of axis objects to link - xaLinked = []; - for(var xLinkID in links.x) { xaLinked.push(getFromId(gd, xLinkID)); } - yaLinked = []; - for(var yLinkID in links.y) { yaLinked.push(getFromId(gd, yLinkID)); } - } + dragger3.enter().append('rect') + .classed('drag', true) + .classed(dragClass, true) + .style({fill: 'transparent', 'stroke-width': 0}) + .attr('data-subplot', plotinfo.id); - recomputeAxisLists(); + dragger3.call(Drawing.setRect, x, y, w, h) + .call(setCursor, cursor); - var dragger = makeDragger(plotinfo, ns + ew + 'drag', cursor, x, y, w, h); + var dragger = dragger3.node(); // still need to make the element if the axes are disabled // but nuke its events (except for maindrag which needs them for hover) @@ -130348,6 +129643,8 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { element: dragger, gd: gd, plotinfo: plotinfo, + xaxes: xa, + yaxes: ya, doubleclick: doubleClick, prepFn: function(e, startX, startY) { var dragModeNow = gd._fullLayout.dragmode; @@ -130369,22 +129666,14 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { if(dragModeNow === 'zoom') { dragOptions.moveFn = zoomMove; dragOptions.doneFn = zoomDone; - - // zoomMove takes care of the threshold, but we need to - // minimize this so that constrained zoom boxes will flip - // orientation at the right place - dragOptions.minDrag = 1; - zoomPrep(e, startX, startY); } else if(dragModeNow === 'pan') { dragOptions.moveFn = plotDrag; dragOptions.doneFn = dragDone; - clearSelect(zoomlayer); + clearSelect(); } else if(isSelectOrLasso(dragModeNow)) { - dragOptions.xaxes = xa; - dragOptions.yaxes = ya; prepSelect(e, startX, startY, dragOptions, dragModeNow); } } @@ -130392,7 +129681,10 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { dragElement.init(dragOptions); - var x0, + var zoomlayer = gd._fullLayout._zoomlayer, + xs = plotinfo.xaxis._offset, + ys = plotinfo.yaxis._offset, + x0, y0, box, lum, @@ -130402,6 +129694,28 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { zb, corners; + function recomputeAxisLists() { + xa = [plotinfo.xaxis]; + ya = [plotinfo.yaxis]; + pw = xa[0]._length; + ph = ya[0]._length; + + for(var i = 1; i < subplots.length; i++) { + var subplotXa = subplots[i].xaxis, + subplotYa = subplots[i].yaxis; + if(xa.indexOf(subplotXa) === -1) xa.push(subplotXa); + if(ya.indexOf(subplotYa) === -1) ya.push(subplotYa); + } + allaxes = xa.concat(ya); + xActive = isDirectionActive(xa, ew); + yActive = isDirectionActive(ya, ns); + cursor = getDragCursor(yActive + xActive, fullLayout.dragmode); + xs = plotinfo.xaxis._offset; + ys = plotinfo.yaxis._offset; + dragOptions.xa = xa; + dragOptions.ya = ya; + } + function zoomPrep(e, startX, startY) { var dragBBox = dragger.getBoundingClientRect(); x0 = startX - dragBBox.left; @@ -130414,11 +129728,34 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { dimmed = false; zoomMode = 'xy'; - zb = makeZoombox(zoomlayer, lum, xs, ys, path0); + zb = zoomlayer.append('path') + .attr('class', 'zoombox') + .style({ + 'fill': lum > 0.2 ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0)', + 'stroke-width': 0 + }) + .attr('transform', 'translate(' + xs + ', ' + ys + ')') + .attr('d', path0 + 'Z'); - corners = makeCorners(zoomlayer, xs, ys); + corners = zoomlayer.append('path') + .attr('class', 'zoombox-corners') + .style({ + fill: Color.background, + stroke: Color.defaultLine, + 'stroke-width': 1, + opacity: 0 + }) + .attr('transform', 'translate(' + xs + ', ' + ys + ')') + .attr('d', 'M0,0Z'); - clearSelect(zoomlayer); + clearSelect(); + } + + function clearSelect() { + // until we get around to persistent selections, remove the outline + // here. The selection itself will be removed when the plot redraws + // at the end. + zoomlayer.selectAll('.select-outline').remove(); } function zoomMove(dx0, dy0) { @@ -130429,67 +129766,93 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { var x1 = Math.max(0, Math.min(pw, dx0 + x0)), y1 = Math.max(0, Math.min(ph, dy0 + y0)), dx = Math.abs(x1 - x0), - dy = Math.abs(y1 - y0); + dy = Math.abs(y1 - y0), + clen = Math.floor(Math.min(dy, dx, MINZOOM) / 2); box.l = Math.min(x0, x1); box.r = Math.max(x0, x1); box.t = Math.min(y0, y1); box.b = Math.max(y0, y1); - function noZoom() { - zoomMode = ''; - box.r = box.l; - box.t = box.b; - corners.attr('d', 'M0,0Z'); - } - - if(isSubplotConstrained) { - if(dx > MINZOOM || dy > MINZOOM) { - zoomMode = 'xy'; - if(dx / pw > dy / ph) { - dy = dx * ph / pw; - if(y0 > y1) box.t = y0 - dy; - else box.b = y0 + dy; - } - else { - dx = dy * pw / ph; - if(x0 > x1) box.l = x0 - dx; - else box.r = x0 + dx; - } - corners.attr('d', xyCorners(box)); - } - else { - noZoom(); - } - } // look for small drags in one direction or the other, // and only drag the other axis - else if(!yActive || dy < Math.min(Math.max(dx * 0.6, MINDRAG), MINZOOM)) { + if(!yActive || dy < Math.min(Math.max(dx * 0.6, MINDRAG), MINZOOM)) { if(dx < MINDRAG) { - noZoom(); + zoomMode = ''; + box.r = box.l; + box.t = box.b; + corners.attr('d', 'M0,0Z'); } else { box.t = 0; box.b = ph; zoomMode = 'x'; - corners.attr('d', xCorners(box, y0)); + corners.attr('d', + 'M' + (box.l - 0.5) + ',' + (y0 - MINZOOM - 0.5) + + 'h-3v' + (2 * MINZOOM + 1) + 'h3ZM' + + (box.r + 0.5) + ',' + (y0 - MINZOOM - 0.5) + + 'h3v' + (2 * MINZOOM + 1) + 'h-3Z'); } } else if(!xActive || dx < Math.min(dy * 0.6, MINZOOM)) { box.l = 0; box.r = pw; zoomMode = 'y'; - corners.attr('d', yCorners(box, x0)); + corners.attr('d', + 'M' + (x0 - MINZOOM - 0.5) + ',' + (box.t - 0.5) + + 'v-3h' + (2 * MINZOOM + 1) + 'v3ZM' + + (x0 - MINZOOM - 0.5) + ',' + (box.b + 0.5) + + 'v3h' + (2 * MINZOOM + 1) + 'v-3Z'); } else { zoomMode = 'xy'; - corners.attr('d', xyCorners(box)); + corners.attr('d', + 'M' + (box.l - 3.5) + ',' + (box.t - 0.5 + clen) + 'h3v' + (-clen) + + 'h' + clen + 'v-3h-' + (clen + 3) + 'ZM' + + (box.r + 3.5) + ',' + (box.t - 0.5 + clen) + 'h-3v' + (-clen) + + 'h' + (-clen) + 'v-3h' + (clen + 3) + 'ZM' + + (box.r + 3.5) + ',' + (box.b + 0.5 - clen) + 'h-3v' + clen + + 'h' + (-clen) + 'v3h' + (clen + 3) + 'ZM' + + (box.l - 3.5) + ',' + (box.b + 0.5 - clen) + 'h3v' + clen + + 'h' + clen + 'v3h-' + (clen + 3) + 'Z'); } box.w = box.r - box.l; box.h = box.b - box.t; - updateZoombox(zb, corners, box, path0, dimmed, lum); - dimmed = true; + // Not sure about the addition of window.scrollX/Y... + // seems to work but doesn't seem robust. + zb.attr('d', + path0 + 'M' + (box.l) + ',' + (box.t) + 'v' + (box.h) + + 'h' + (box.w) + 'v-' + (box.h) + 'h-' + (box.w) + 'Z'); + if(!dimmed) { + zb.transition() + .style('fill', lum > 0.2 ? 'rgba(0,0,0,0.4)' : + 'rgba(255,255,255,0.3)') + .duration(200); + corners.transition() + .style('opacity', 1) + .duration(200); + dimmed = true; + } + } + + function zoomAxRanges(axList, r0Fraction, r1Fraction) { + var i, + axi, + axRangeLinear0, + axRangeLinearSpan; + + for(i = 0; i < axList.length; i++) { + axi = axList[i]; + if(axi.fixedrange) continue; + + axRangeLinear0 = axi._rl[0]; + axRangeLinearSpan = axi._rl[1] - axRangeLinear0; + axi.range = [ + axi.l2r(axRangeLinear0 + axRangeLinearSpan * r0Fraction), + axi.l2r(axRangeLinear0 + axRangeLinearSpan * r1Fraction) + ]; + } } function zoomDone(dragged, numClicks) { @@ -130499,9 +129862,8 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { return removeZoombox(gd); } - // TODO: edit linked axes in zoomAxRanges and in dragTail - if(zoomMode === 'xy' || zoomMode === 'x') zoomAxRanges(xa, box.l / pw, box.r / pw, xaLinked); - if(zoomMode === 'xy' || zoomMode === 'y') zoomAxRanges(ya, (ph - box.b) / ph, (ph - box.t) / ph, yaLinked); + if(zoomMode === 'xy' || zoomMode === 'x') zoomAxRanges(xa, box.l / pw, box.r / pw); + if(zoomMode === 'xy' || zoomMode === 'y') zoomAxRanges(ya, (ph - box.b) / ph, (ph - box.t) / ph); removeZoombox(gd); dragTail(zoomMode); @@ -130533,7 +129895,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { else if(ew === 'e') hAlign = 'right'; if(gd._context.showAxisRangeEntryBoxes) { - d3.select(dragger) + dragger3 .call(svgTextUtils.makeEditable, null, { immediate: true, background: fullLayout.paper_bgcolor, @@ -130597,7 +129959,9 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { gbb = mainplot.draglayer.select('.nsewdrag') .node().getBoundingClientRect(), xfrac = (e.clientX - gbb.left) / gbb.width, + vbx0 = scrollViewBox[0] + scrollViewBox[2] * xfrac, yfrac = (gbb.bottom - e.clientY) / gbb.height, + vby0 = scrollViewBox[1] + scrollViewBox[3] * (1 - yfrac), i; function zoomWheelOneAxis(ax, centerFraction, zoom) { @@ -130609,23 +129973,15 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { ax.range = axRange.map(doZoom); } - if(ew || isSubplotConstrained) { - // if we're only zooming this axis because of constraints, - // zoom it about the center - if(!ew) xfrac = 0.5; - + if(ew) { for(i = 0; i < xa.length; i++) zoomWheelOneAxis(xa[i], xfrac, zoom); - scrollViewBox[2] *= zoom; - scrollViewBox[0] += scrollViewBox[2] * xfrac * (1 / zoom - 1); + scrollViewBox[0] = vbx0 - scrollViewBox[2] * xfrac; } - if(ns || isSubplotConstrained) { - if(!ns) yfrac = 0.5; - + if(ns) { for(i = 0; i < ya.length; i++) zoomWheelOneAxis(ya[i], yfrac, zoom); - scrollViewBox[3] *= zoom; - scrollViewBox[1] += scrollViewBox[3] * (1 - yfrac) * (1 / zoom - 1); + scrollViewBox[1] = vby0 - scrollViewBox[3] * (1 - yfrac); } // viewbox redraw at first @@ -130636,12 +129992,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // no more scrolling is coming redrawTimer = setTimeout(function() { scrollViewBox = [0, 0, pw, ph]; - - var zoomMode; - if(isSubplotConstrained) zoomMode = 'xy'; - else zoomMode = (ew ? 'x' : '') + (ns ? 'y' : ''); - - dragTail(zoomMode); + dragTail(); }, REDRAWDELAY); return Lib.pauseEvent(e); @@ -130663,6 +130014,18 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { recomputeAxisLists(); + function dragAxList(axList, pix) { + for(var i = 0; i < axList.length; i++) { + var axi = axList[i]; + if(!axi.fixedrange) { + axi.range = [ + axi.l2r(axi._rl[0] - pix / axi._m), + axi.l2r(axi._rl[1] - pix / axi._m) + ]; + } + } + } + if(xActive === 'ew' || yActive === 'ns') { if(xActive) dragAxList(xa, dx); if(yActive) dragAxList(ya, dy); @@ -130671,6 +130034,16 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { return; } + // common transform for dragging one end of an axis + // d>0 is compressing scale (cursor is over the plot, + // the axis end should move with the cursor) + // d<0 is expanding (cursor is off the plot, axis end moves + // nonlinearly so you can expand far) + function dZoom(d) { + return 1 - ((d >= 0) ? Math.min(d, 0.9) : + 1 / (1 / Math.max(d, -0.3) + 3.222)); + } + // dz: set a new value for one end (0 or 1) of an axis array axArray, // and return a pixel shift for that end for the viewbox // based on pixel drag distance d @@ -130696,15 +130069,6 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { (movedAx._rl[end] - movedAx._rl[otherEnd]); } - if(isSubplotConstrained && xActive && yActive) { - // dragging a corner of a constrained subplot: - // respect the fixed corner, but harmonize dx and dy - var dxySign = ((xActive === 'w') === (yActive === 'n')) ? 1 : -1; - var dxyFraction = (dx / pw + dxySign * dy / ph) / 2; - dx = dxyFraction * pw; - dy = dxySign * dxyFraction * ph; - } - if(xActive === 'w') dx = dz(xa, 0, dx); else if(xActive === 'e') dx = dz(xa, 1, -dx); else if(!xActive) dx = 0; @@ -130713,32 +130077,12 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { else if(yActive === 's') dy = dz(ya, 0, -dy); else if(!yActive) dy = 0; - var x0 = (xActive === 'w') ? dx : 0; - var y0 = (yActive === 'n') ? dy : 0; - - if(isSubplotConstrained) { - var i; - if(!xActive && yActive.length === 1) { - // dragging one end of the y axis of a constrained subplot - // scale the other axis the same about its middle - for(i = 0; i < xa.length; i++) { - xa[i].range = xa[i]._r.slice(); - scaleZoom(xa[i], 1 - dy / ph); - } - dx = dy * pw / ph; - x0 = dx / 2; - } - if(!yActive && xActive.length === 1) { - for(i = 0; i < ya.length; i++) { - ya[i].range = ya[i]._r.slice(); - scaleZoom(ya[i], 1 - dx / pw); - } - dy = dx * ph / pw; - y0 = dy / 2; - } - } - - updateSubplots([x0, y0, pw - dx, ph - dy]); + updateSubplots([ + (xActive === 'w') ? dx : 0, + (yActive === 'n') ? dy : 0, + pw - dx, + ph - dy + ]); ticksAndAnnotations(yActive, xActive); } @@ -130752,28 +130096,20 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { } } - if(ew || isSubplotConstrained) { - pushActiveAxIds(xa); - pushActiveAxIds(xaLinked); - } - if(ns || isSubplotConstrained) { - pushActiveAxIds(ya); - pushActiveAxIds(yaLinked); - } + if(ew) pushActiveAxIds(xa); + if(ns) pushActiveAxIds(ya); for(i = 0; i < activeAxIds.length; i++) { - doTicks(gd, activeAxIds[i], true); + Axes.doTicks(gd, activeAxIds[i], true); } - function redrawObjs(objArray, method, shortCircuit) { + function redrawObjs(objArray, method) { for(i = 0; i < objArray.length; i++) { var obji = objArray[i]; if((ew && activeAxIds.indexOf(obji.xref) !== -1) || (ns && activeAxIds.indexOf(obji.yref) !== -1)) { method(gd, i); - // once is enough for images (which doesn't use the `i` arg anyway) - if(shortCircuit) return; } } } @@ -130783,7 +130119,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { redrawObjs(fullLayout.annotations || [], Registry.getComponentMethod('annotations', 'drawOne')); redrawObjs(fullLayout.shapes || [], Registry.getComponentMethod('shapes', 'drawOne')); - redrawObjs(fullLayout.images || [], Registry.getComponentMethod('images', 'draw'), true); + redrawObjs(fullLayout.images || [], Registry.getComponentMethod('images', 'draw')); } function doubleClick() { @@ -130795,56 +130131,39 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { var ax, i, rangeInitial; - // For reset+autosize mode: - // If *any* of the main axes is not at its initial range - // (or autoranged, if we have no initial range, to match the logic in - // doubleClickConfig === 'reset' below), we reset. - // If they are *all* at their initial ranges, then we autosize. - if(doubleClickConfig === 'reset+autosize') { - - doubleClickConfig = 'autosize'; - - for(i = 0; i < axList.length; i++) { - ax = axList[i]; - if((ax._rangeInitial && ( - ax.range[0] !== ax._rangeInitial[0] || - ax.range[1] !== ax._rangeInitial[1] - )) || - (!ax._rangeInitial && !ax.autorange) - ) { - doubleClickConfig = 'reset'; - break; - } - } - } - if(doubleClickConfig === 'autosize') { - // don't set the linked axes here, so relayout marks them as shrinkable - // and we autosize just to the requested axis/axes for(i = 0; i < axList.length; i++) { ax = axList[i]; if(!ax.fixedrange) attrs[ax._name + '.autorange'] = true; } } else if(doubleClickConfig === 'reset') { - // when we're resetting, reset all linked axes too, so we get back - // to the fully-auto-with-constraints situation - if(xActive || isSubplotConstrained) axList = axList.concat(xaLinked); - if(yActive && !isSubplotConstrained) axList = axList.concat(yaLinked); + for(i = 0; i < axList.length; i++) { + ax = axList[i]; - if(isSubplotConstrained) { - if(!xActive) axList = axList.concat(xa); - else if(!yActive) axList = axList.concat(ya); + if(!ax._rangeInitial) { + attrs[ax._name + '.autorange'] = true; + } + else { + rangeInitial = ax._rangeInitial.slice(); + attrs[ax._name + '.range[0]'] = rangeInitial[0]; + attrs[ax._name + '.range[1]'] = rangeInitial[1]; + } } - + } + else if(doubleClickConfig === 'reset+autosize') { for(i = 0; i < axList.length; i++) { ax = axList[i]; - if(!ax._rangeInitial) { + if(ax.fixedrange) continue; + if(ax._rangeInitial === undefined || + ax.range[0] === ax._rangeInitial[0] && + ax.range[1] === ax._rangeInitial[1] + ) { attrs[ax._name + '.autorange'] = true; } else { - rangeInitial = ax._rangeInitial; + rangeInitial = ax._rangeInitial.slice(); attrs[ax._name + '.range[0]'] = rangeInitial[0]; attrs[ax._name + '.range[1]'] = rangeInitial[1]; } @@ -130857,22 +130176,18 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // dragTail - finish a drag event with a redraw function dragTail(zoommode) { - if(zoommode === undefined) zoommode = (ew ? 'x' : '') + (ns ? 'y' : ''); - var attrs = {}; // revert to the previous axis settings, then apply the new ones // through relayout - this lets relayout manage undo/redo - var axesToModify; - if(zoommode === 'xy') axesToModify = xa.concat(ya); - else if(zoommode === 'x') axesToModify = xa; - else if(zoommode === 'y') axesToModify = ya; - - for(var i = 0; i < axesToModify.length; i++) { - var axi = axesToModify[i]; + for(var i = 0; i < allaxes.length; i++) { + var axi = allaxes[i]; + if(zoommode && zoommode.indexOf(axi._id.charAt(0)) === -1) { + continue; + } if(axi._r[0] !== axi.range[0]) attrs[axi._name + '.range[0]'] = axi.range[0]; if(axi._r[1] !== axi.range[1]) attrs[axi._name + '.range[1]'] = axi.range[1]; - axi.range = axi._input.range = axi._r.slice(); + axi.range = axi._r.slice(); } updateSubplots([0, 0, pw, ph]); @@ -130883,116 +130198,71 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { // affected by this drag, and update them. look for all plots // sharing an affected axis (including the one being dragged) function updateSubplots(viewBox) { - var plotinfos = fullLayout._plots; - var subplots = Object.keys(plotinfos); - var xScaleFactor = viewBox[2] / xa[0]._length; - var yScaleFactor = viewBox[3] / ya[0]._length; - var editX = ew || isSubplotConstrained; - var editY = ns || isSubplotConstrained; - - var i, xScaleFactor2, yScaleFactor2, clipDx, clipDy; - - // Find the appropriate scaling for this axis, if it's linked to the - // dragged axes by constraints. 0 is special, it means this axis shouldn't - // ever be scaled (will be converted to 1 if the other axis is scaled) - function getLinkedScaleFactor(ax) { - if(ax.fixedrange) return 0; - - if(editX && xaLinked.indexOf(ax) !== -1) { - return xScaleFactor; - } - if(editY && (isSubplotConstrained ? xaLinked : yaLinked).indexOf(ax) !== -1) { - return yScaleFactor; - } - return 0; - } - - function scaleAndGetShift(ax, scaleFactor) { - if(scaleFactor) { - ax.range = ax._r.slice(); - scaleZoom(ax, scaleFactor); - return ax._length * (1 - scaleFactor) / 2; - } - return 0; - } + var j; + var plotinfos = fullLayout._plots, + subplots = Object.keys(plotinfos); - for(i = 0; i < subplots.length; i++) { + for(var i = 0; i < subplots.length; i++) { var subplot = plotinfos[subplots[i]], xa2 = subplot.xaxis, ya2 = subplot.yaxis, - editX2 = editX && !xa2.fixedrange && (xa.indexOf(xa2) !== -1), - editY2 = editY && !ya2.fixedrange && (ya.indexOf(ya2) !== -1); - - if(editX2) { - xScaleFactor2 = xScaleFactor; - clipDx = viewBox[0]; - } - else { - xScaleFactor2 = getLinkedScaleFactor(xa2); - clipDx = scaleAndGetShift(xa2, xScaleFactor2); + editX = ew && !xa2.fixedrange, + editY = ns && !ya2.fixedrange; + + if(editX) { + var isInX = false; + for(j = 0; j < xa.length; j++) { + if(xa[j]._id === xa2._id) { + isInX = true; + break; + } + } + editX = editX && isInX; } - if(editY2) { - yScaleFactor2 = yScaleFactor; - clipDy = viewBox[1]; - } - else { - yScaleFactor2 = getLinkedScaleFactor(ya2); - clipDy = scaleAndGetShift(ya2, yScaleFactor2); + if(editY) { + var isInY = false; + for(j = 0; j < ya.length; j++) { + if(ya[j]._id === ya2._id) { + isInY = true; + break; + } + } + editY = editY && isInY; } - // don't scale at all if neither axis is scalable here - if(!xScaleFactor2 && !yScaleFactor2) continue; + var xScaleFactor = editX ? xa2._length / viewBox[2] : 1, + yScaleFactor = editY ? ya2._length / viewBox[3] : 1; + + var clipDx = editX ? viewBox[0] : 0, + clipDy = editY ? viewBox[1] : 0; - // but if only one is, reset the other axis scaling - if(!xScaleFactor2) xScaleFactor2 = 1; - if(!yScaleFactor2) yScaleFactor2 = 1; + var fracDx = editX ? (viewBox[0] / viewBox[2] * xa2._length) : 0, + fracDy = editY ? (viewBox[1] / viewBox[3] * ya2._length) : 0; - var plotDx = xa2._offset - clipDx / xScaleFactor2, - plotDy = ya2._offset - clipDy / yScaleFactor2; + var plotDx = xa2._offset - fracDx, + plotDy = ya2._offset - fracDy; fullLayout._defs.selectAll('#' + subplot.clipId) .call(Drawing.setTranslate, clipDx, clipDy) - .call(Drawing.setScale, xScaleFactor2, yScaleFactor2); + .call(Drawing.setScale, 1 / xScaleFactor, 1 / yScaleFactor); subplot.plot .call(Drawing.setTranslate, plotDx, plotDy) - .call(Drawing.setScale, 1 / xScaleFactor2, 1 / yScaleFactor2) + .call(Drawing.setScale, xScaleFactor, yScaleFactor) // This is specifically directed at scatter traces, applying an inverse // scale to individual points to counteract the scale of the trace // as a whole: .select('.scatterlayer').selectAll('.points').selectAll('.point') - .call(Drawing.setPointGroupScale, xScaleFactor2, yScaleFactor2); + .call(Drawing.setPointGroupScale, 1 / xScaleFactor, 1 / yScaleFactor); } } return dragger; }; -function makeDragger(plotinfo, dragClass, cursor, x, y, w, h) { - var dragger3 = plotinfo.draglayer.selectAll('.' + dragClass).data([0]); - - dragger3.enter().append('rect') - .classed('drag', true) - .classed(dragClass, true) - .style({fill: 'transparent', 'stroke-width': 0}) - .attr('data-subplot', plotinfo.id); - - dragger3.call(Drawing.setRect, x, y, w, h) - .call(setCursor, cursor); - - return dragger3.node(); -} - -function isDirectionActive(axList, activeVal) { - for(var i = 0; i < axList.length; i++) { - if(!axList[i].fixedrange) return activeVal; - } - return ''; -} - function getEndText(ax, end) { var initialVal = ax.range[end], diff = Math.abs(initialVal - ax.range[1 - end]), @@ -131014,54 +130284,6 @@ function getEndText(ax, end) { } } -function zoomAxRanges(axList, r0Fraction, r1Fraction, linkedAxes) { - var i, - axi, - axRangeLinear0, - axRangeLinearSpan; - - for(i = 0; i < axList.length; i++) { - axi = axList[i]; - if(axi.fixedrange) continue; - - axRangeLinear0 = axi._rl[0]; - axRangeLinearSpan = axi._rl[1] - axRangeLinear0; - axi.range = [ - axi.l2r(axRangeLinear0 + axRangeLinearSpan * r0Fraction), - axi.l2r(axRangeLinear0 + axRangeLinearSpan * r1Fraction) - ]; - } - - // zoom linked axes about their centers - if(linkedAxes && linkedAxes.length) { - var linkedR0Fraction = (r0Fraction + (1 - r1Fraction)) / 2; - - zoomAxRanges(linkedAxes, linkedR0Fraction, 1 - linkedR0Fraction); - } -} - -function dragAxList(axList, pix) { - for(var i = 0; i < axList.length; i++) { - var axi = axList[i]; - if(!axi.fixedrange) { - axi.range = [ - axi.l2r(axi._rl[0] - pix / axi._m), - axi.l2r(axi._rl[1] - pix / axi._m) - ]; - } - } -} - -// common transform for dragging one end of an axis -// d>0 is compressing scale (cursor is over the plot, -// the axis end should move with the cursor) -// d<0 is expanding (cursor is off the plot, axis end moves -// nonlinearly so you can expand far) -function dZoom(d) { - return 1 - ((d >= 0) ? Math.min(d, 0.9) : - 1 / (1 / Math.max(d, -0.3) + 3.222)); -} - function getDragCursor(nsew, dragmode) { if(!nsew) return 'pointer'; if(nsew === 'nsew') { @@ -131071,52 +130293,6 @@ function getDragCursor(nsew, dragmode) { return nsew.toLowerCase() + '-resize'; } -function makeZoombox(zoomlayer, lum, xs, ys, path0) { - return zoomlayer.append('path') - .attr('class', 'zoombox') - .style({ - 'fill': lum > 0.2 ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0)', - 'stroke-width': 0 - }) - .attr('transform', 'translate(' + xs + ', ' + ys + ')') - .attr('d', path0 + 'Z'); -} - -function makeCorners(zoomlayer, xs, ys) { - return zoomlayer.append('path') - .attr('class', 'zoombox-corners') - .style({ - fill: Color.background, - stroke: Color.defaultLine, - 'stroke-width': 1, - opacity: 0 - }) - .attr('transform', 'translate(' + xs + ', ' + ys + ')') - .attr('d', 'M0,0Z'); -} - -function clearSelect(zoomlayer) { - // until we get around to persistent selections, remove the outline - // here. The selection itself will be removed when the plot redraws - // at the end. - zoomlayer.selectAll('.select-outline').remove(); -} - -function updateZoombox(zb, corners, box, path0, dimmed, lum) { - zb.attr('d', - path0 + 'M' + (box.l) + ',' + (box.t) + 'v' + (box.h) + - 'h' + (box.w) + 'v-' + (box.h) + 'h-' + (box.w) + 'Z'); - if(!dimmed) { - zb.transition() - .style('fill', lum > 0.2 ? 'rgba(0,0,0,0.4)' : - 'rgba(255,255,255,0.3)') - .duration(200); - corners.transition() - .style('opacity', 1) - .duration(200); - } -} - function removeZoombox(gd) { d3.select(gd) .selectAll('.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners') @@ -131129,91 +130305,7 @@ function isSelectOrLasso(dragmode) { return modes.indexOf(dragmode) !== -1; } -function xCorners(box, y0) { - return 'M' + - (box.l - 0.5) + ',' + (y0 - MINZOOM - 0.5) + - 'h-3v' + (2 * MINZOOM + 1) + 'h3ZM' + - (box.r + 0.5) + ',' + (y0 - MINZOOM - 0.5) + - 'h3v' + (2 * MINZOOM + 1) + 'h-3Z'; -} - -function yCorners(box, x0) { - return 'M' + - (x0 - MINZOOM - 0.5) + ',' + (box.t - 0.5) + - 'v-3h' + (2 * MINZOOM + 1) + 'v3ZM' + - (x0 - MINZOOM - 0.5) + ',' + (box.b + 0.5) + - 'v3h' + (2 * MINZOOM + 1) + 'v-3Z'; -} - -function xyCorners(box) { - var clen = Math.floor(Math.min(box.b - box.t, box.r - box.l, MINZOOM) / 2); - return 'M' + - (box.l - 3.5) + ',' + (box.t - 0.5 + clen) + 'h3v' + (-clen) + - 'h' + clen + 'v-3h-' + (clen + 3) + 'ZM' + - (box.r + 3.5) + ',' + (box.t - 0.5 + clen) + 'h-3v' + (-clen) + - 'h' + (-clen) + 'v-3h' + (clen + 3) + 'ZM' + - (box.r + 3.5) + ',' + (box.b + 0.5 - clen) + 'h-3v' + clen + - 'h' + (-clen) + 'v3h' + (clen + 3) + 'ZM' + - (box.l - 3.5) + ',' + (box.b + 0.5 - clen) + 'h3v' + clen + - 'h' + clen + 'v3h-' + (clen + 3) + 'Z'; -} - -function calcLinks(constraintGroups, xIDs, yIDs) { - var isSubplotConstrained = false; - var xLinks = {}; - var yLinks = {}; - var i, j, k; - - var group, xLinkID, yLinkID; - for(i = 0; i < constraintGroups.length; i++) { - group = constraintGroups[i]; - // check if any of the x axes we're dragging is in this constraint group - for(j = 0; j < xIDs.length; j++) { - if(group[xIDs[j]]) { - // put the rest of these axes into xLinks, if we're not already - // dragging them, so we know to scale these axes automatically too - // to match the changes in the dragged x axes - for(xLinkID in group) { - if((xLinkID.charAt(0) === 'x' ? xIDs : yIDs).indexOf(xLinkID) === -1) { - xLinks[xLinkID] = 1; - } - } - - // check if the x and y axes of THIS drag are linked - for(k = 0; k < yIDs.length; k++) { - if(group[yIDs[k]]) isSubplotConstrained = true; - } - } - } - - // now check if any of the y axes we're dragging is in this constraint group - // only look for outside links, as we've already checked for links within the dragger - for(j = 0; j < yIDs.length; j++) { - if(group[yIDs[j]]) { - for(yLinkID in group) { - if((yLinkID.charAt(0) === 'x' ? xIDs : yIDs).indexOf(yLinkID) === -1) { - yLinks[yLinkID] = 1; - } - } - } - } - } - - if(isSubplotConstrained) { - // merge xLinks and yLinks if the subplot is constrained, - // since we'll always apply both anyway and the two will contain - // duplicates - Lib.extendFlat(xLinks, yLinks); - yLinks = {}; - } - return { - x: xLinks, - y: yLinks, - xy: isSubplotConstrained - }; -} - -},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../lib":685,"../../lib/setcursor":700,"../../lib/svg_text_utils":704,"../../plotly":719,"../../registry":802,"./axes":724,"./axis_ids":727,"./constants":729,"./scale_zoom":739,"./select":740,"d3":107,"tinycolor2":514}],733:[function(require,module,exports){ +},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../lib":680,"../../lib/setcursor":695,"../../lib/svg_text_utils":699,"../../plotly":714,"../../registry":793,"./axes":719,"./constants":724,"./select":732,"d3":104,"tinycolor2":511}],726:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -131226,8 +130318,8 @@ function calcLinks(constraintGroups, xIDs, yIDs) { 'use strict'; var d3 = require('d3'); -var isNumeric = require('fast-isnumeric'); var tinycolor = require('tinycolor2'); +var isNumeric = require('fast-isnumeric'); var Lib = require('../../lib'); var Events = require('../../lib/events'); @@ -131462,7 +130554,9 @@ function quadrature(dx, dy) { // size and display constants for hover text var HOVERARROWSIZE = constants.HOVERARROWSIZE, - HOVERTEXTPAD = constants.HOVERTEXTPAD; + HOVERTEXTPAD = constants.HOVERTEXTPAD, + HOVERFONTSIZE = constants.HOVERFONTSIZE, + HOVERFONT = constants.HOVERFONT; // fx.hover: highlight data on hover // evt can be a mousemove event, or an object with data about what points @@ -131519,7 +130613,6 @@ fx.hover = function(gd, evt, subplot) { function hover(gd, evt, subplot) { if(subplot === 'pie') { gd.emit('plotly_hover', { - event: evt.originalEvent, points: [evt] }); return; @@ -131628,17 +130721,12 @@ function hover(gd, evt, subplot) { // [x|y]px: the pixels (from top left) of the mouse location // on the currently selected plot area - var hasUserCalledHover = !evt.target, - xpx, ypx; + var xpx, ypx; - if(hasUserCalledHover) { - if('xpx' in evt) xpx = evt.xpx; - else xpx = xaArray[0]._length / 2; + // mouse event? ie is there a target element with + // clientX and clientY values? + if(evt.target && ('clientX' in evt) && ('clientY' in evt)) { - if('ypx' in evt) ypx = evt.ypx; - else ypx = yaArray[0]._length / 2; - } - else { // fire the beforehover event and quit if it returns false // note that we're only calling this on real mouse events, so // manual calls to fx.hover will always run. @@ -131657,6 +130745,13 @@ function hover(gd, evt, subplot) { return dragElement.unhoverRaw(gd, evt); } } + else { + if('xpx' in evt) xpx = evt.xpx; + else xpx = xaArray[0]._length / 2; + + if('ypx' in evt) ypx = evt.ypx; + else ypx = yaArray[0]._length / 2; + } if('xval' in evt) xvalArray = flat(subplots, evt.xval); else xvalArray = p2c(xaArray, xpx); @@ -131684,11 +130779,6 @@ function hover(gd, evt, subplot) { if(!cd || !cd[0] || !cd[0].trace || cd[0].trace.visible !== true) continue; trace = cd[0].trace; - - // Explicitly bail out for these two. I don't know how to otherwise prevent - // the rest of this function from running and failing - if(['carpet', 'contourcarpet'].indexOf(trace._module.name) !== -1) continue; - subplotId = getSubplot(trace); subploti = subplots.indexOf(subplotId); @@ -131777,8 +130867,30 @@ function hover(gd, evt, subplot) { // nothing left: remove all labels and quit if(hoverData.length === 0) return dragElement.unhoverRaw(gd, evt); + // if there's more than one horz bar trace, + // rotate the labels so they don't overlap + var rotateLabels = hovermode === 'y' && searchData.length > 1; + hoverData.sort(function(d1, d2) { return d1.distance - d2.distance; }); + var bgColor = Color.combine( + fullLayout.plot_bgcolor || Color.background, + fullLayout.paper_bgcolor + ); + + var labelOpts = { + hovermode: hovermode, + rotateLabels: rotateLabels, + bgColor: bgColor, + container: fullLayout._hoverlayer, + outerContainer: fullLayout._paperdiv + }; + var hoverLabels = createHoverText(hoverData, labelOpts); + + hoverAvoidOverlaps(hoverData, rotateLabels ? 'xa' : 'ya'); + + alignHoverText(hoverLabels, rotateLabels); + // lastly, emit custom hover/unhover events var oldhoverdata = gd._hoverdata, newhoverdata = []; @@ -131810,39 +130922,6 @@ function hover(gd, evt, subplot) { gd._hoverdata = newhoverdata; - if(hoverChanged(gd, evt, oldhoverdata) && fullLayout._hasCartesian) { - var spikelineOpts = { - hovermode: hovermode, - fullLayout: fullLayout, - container: fullLayout._hoverlayer, - outerContainer: fullLayout._paperdiv - }; - createSpikelines(hoverData, spikelineOpts); - } - - // if there's more than one horz bar trace, - // rotate the labels so they don't overlap - var rotateLabels = hovermode === 'y' && searchData.length > 1; - - var bgColor = Color.combine( - fullLayout.plot_bgcolor || Color.background, - fullLayout.paper_bgcolor - ); - - var labelOpts = { - hovermode: hovermode, - rotateLabels: rotateLabels, - bgColor: bgColor, - container: fullLayout._hoverlayer, - outerContainer: fullLayout._paperdiv - }; - - var hoverLabels = createHoverText(hoverData, labelOpts); - - hoverAvoidOverlaps(hoverData, rotateLabels ? 'xa' : 'ya'); - - alignHoverText(hoverLabels, rotateLabels); - // TODO: tagName hack is needed to appease geo.js's hack of using evt.target=true // we should improve the "fx" API so other plots can use it without these hack. if(evt.target && evt.target.tagName) { @@ -131850,18 +130929,13 @@ function hover(gd, evt, subplot) { overrideCursor(d3.select(evt.target), hasClickToShow ? 'pointer' : ''); } - // don't emit events if called manually - if(!evt.target || !hoverChanged(gd, evt, oldhoverdata)) return; + if(!hoverChanged(gd, evt, oldhoverdata)) return; if(oldhoverdata) { - gd.emit('plotly_unhover', { - event: evt, - points: oldhoverdata - }); + gd.emit('plotly_unhover', { points: oldhoverdata }); } gd.emit('plotly_hover', { - event: evt, points: gd._hoverdata, xaxes: xaArray, yaxes: yaArray, @@ -131986,36 +131060,23 @@ function cleanPoint(d, hovermode) { return d; } -/* - * Draw a single hover item in a pre-existing svg container somewhere - * hoverItem should have keys: - * - x and y (or x0, x1, y0, and y1): - * the pixel position to mark, relative to opts.container - * - xLabel, yLabel, zLabel, text, and name: - * info to go in the label - * - color: - * the background color for the label. - * - idealAlign (optional): - * 'left' or 'right' for which side of the x/y box to try to put this on first - * - borderColor (optional): - * color for the border, defaults to strongest contrast with color - * - fontFamily (optional): - * string, the font for this label, defaults to constants.HOVERFONT - * - fontSize (optional): - * the label font size, defaults to constants.HOVERFONTSIZE - * - fontColor (optional): - * defaults to borderColor - * opts should have keys: - * - bgColor: - * the background color this is against, used if the trace is - * non-opaque, and for the name, which goes outside the box - * - container: - * a or element to add the hover label to - * - outerContainer: - * normally a parent of `container`, sets the bounding box to use to - * constrain the hover label and determine whether to show it on the left or right - */ fx.loneHover = function(hoverItem, opts) { + // draw a single hover item in a pre-existing svg container somewhere + // hoverItem should have keys: + // - x and y (or x0, x1, y0, and y1): + // the pixel position to mark, relative to opts.container + // - xLabel, yLabel, zLabel, text, and name: + // info to go in the label + // - color: + // the background color for the label. text & outline color will + // be chosen black or white to contrast with this + // opts should have keys: + // - bgColor: + // the background color this is against, used if the trace is + // non-opaque, and for the name, which goes outside the box + // - container: + // a dom element - must be big enough to contain the whole + // hover label var pointData = { color: hoverItem.color || Color.defaultLine, x0: hoverItem.x0 || hoverItem.x || 0, @@ -132029,12 +131090,6 @@ fx.loneHover = function(hoverItem, opts) { name: hoverItem.name, idealAlign: hoverItem.idealAlign, - // optional extra bits of styling - borderColor: hoverItem.borderColor, - fontFamily: hoverItem.fontFamily, - fontSize: hoverItem.fontSize, - fontColor: hoverItem.fontColor, - // filler to make createHoverText happy trace: { index: 0, @@ -132071,142 +131126,8 @@ fx.loneUnhover = function(containerOrSelection) { d3.select(containerOrSelection); selection.selectAll('g.hovertext').remove(); - selection.selectAll('.spikeline').remove(); }; -function createSpikelines(hoverData, opts) { - var hovermode = opts.hovermode; - var container = opts.container; - var c0 = hoverData[0]; - var xa = c0.xa; - var ya = c0.ya; - var showX = xa.showspikes; - var showY = ya.showspikes; - - // Remove old spikeline items - container.selectAll('.spikeline').remove(); - - if(hovermode !== 'closest' || !(showX || showY)) return; - - var fullLayout = opts.fullLayout; - var xPoint = xa._offset + (c0.x0 + c0.x1) / 2; - var yPoint = ya._offset + (c0.y0 + c0.y1) / 2; - var contrastColor = Color.combine(fullLayout.plot_bgcolor, fullLayout.paper_bgcolor); - var dfltDashColor = tinycolor.readability(c0.color, contrastColor) < 1.5 ? - Color.contrast(contrastColor) : c0.color; - - if(showY) { - var yMode = ya.spikemode; - var yThickness = ya.spikethickness; - var yColor = ya.spikecolor || dfltDashColor; - var yBB = ya._boundingBox; - var xEdge = ((yBB.left + yBB.right) / 2) < xPoint ? yBB.right : yBB.left; - - if(yMode.indexOf('toaxis') !== -1 || yMode.indexOf('across') !== -1) { - var xBase = xEdge; - var xEndSpike = xPoint; - if(yMode.indexOf('across') !== -1) { - xBase = ya._counterSpan[0]; - xEndSpike = ya._counterSpan[1]; - } - - // Background horizontal Line (to y-axis) - container.append('line') - .attr({ - 'x1': xBase, - 'x2': xEndSpike, - 'y1': yPoint, - 'y2': yPoint, - 'stroke-width': yThickness + 2, - 'stroke': contrastColor - }) - .classed('spikeline', true) - .classed('crisp', true); - - // Foreground horizontal line (to y-axis) - container.append('line') - .attr({ - 'x1': xBase, - 'x2': xEndSpike, - 'y1': yPoint, - 'y2': yPoint, - 'stroke-width': yThickness, - 'stroke': yColor, - 'stroke-dasharray': Drawing.dashStyle(ya.spikedash, yThickness) - }) - .classed('spikeline', true) - .classed('crisp', true); - } - // Y axis marker - if(yMode.indexOf('marker') !== -1) { - container.append('circle') - .attr({ - 'cx': xEdge + (ya.side !== 'right' ? yThickness : -yThickness), - 'cy': yPoint, - 'r': yThickness, - 'fill': yColor - }) - .classed('spikeline', true); - } - } - - if(showX) { - var xMode = xa.spikemode; - var xThickness = xa.spikethickness; - var xColor = xa.spikecolor || dfltDashColor; - var xBB = xa._boundingBox; - var yEdge = ((xBB.top + xBB.bottom) / 2) < yPoint ? xBB.bottom : xBB.top; - - if(xMode.indexOf('toaxis') !== -1 || xMode.indexOf('across') !== -1) { - var yBase = yEdge; - var yEndSpike = yPoint; - if(xMode.indexOf('across') !== -1) { - yBase = xa._counterSpan[0]; - yEndSpike = xa._counterSpan[1]; - } - - // Background vertical line (to x-axis) - container.append('line') - .attr({ - 'x1': xPoint, - 'x2': xPoint, - 'y1': yBase, - 'y2': yEndSpike, - 'stroke-width': xThickness + 2, - 'stroke': contrastColor - }) - .classed('spikeline', true) - .classed('crisp', true); - - // Foreground vertical line (to x-axis) - container.append('line') - .attr({ - 'x1': xPoint, - 'x2': xPoint, - 'y1': yBase, - 'y2': yEndSpike, - 'stroke-width': xThickness, - 'stroke': xColor, - 'stroke-dasharray': Drawing.dashStyle(xa.spikedash, xThickness) - }) - .classed('spikeline', true) - .classed('crisp', true); - } - - // X axis marker - if(xMode.indexOf('marker') !== -1) { - container.append('circle') - .attr({ - 'cx': xPoint, - 'cy': yEdge - (xa.side !== 'top' ? xThickness : -xThickness), - 'r': xThickness, - 'fill': xColor - }) - .classed('spikeline', true); - } - } -} - function createHoverText(hoverData, opts) { var hovermode = opts.hovermode, rotateLabels = opts.rotateLabels, @@ -132214,12 +131135,6 @@ function createHoverText(hoverData, opts) { container = opts.container, outerContainer = opts.outerContainer, - // opts.fontFamily/Size are used for the common label - // and as defaults for each hover label, though the individual labels - // can override this. - fontFamily = opts.fontFamily || constants.HOVERFONT, - fontSize = opts.fontSize || constants.HOVERFONTSIZE, - c0 = hoverData[0], xa = c0.xa, ya = c0.ya, @@ -132264,7 +131179,7 @@ function createHoverText(hoverData, opts) { lpath.enter().append('path') .style({fill: Color.defaultLine, 'stroke-width': '1px', stroke: Color.background}); ltext.enter().append('text') - .call(Drawing.font, fontFamily, fontSize, Color.background) + .call(Drawing.font, HOVERFONT, HOVERFONTSIZE, Color.background) // prohibit tex interpretation until we can handle // tex and regular text together .attr('data-notex', 1); @@ -132345,12 +131260,13 @@ function createHoverText(hoverData, opts) { // trace name label (rect and text.name) g.append('rect') .call(Color.fill, Color.addOpacity(bgColor, 0.8)); - g.append('text').classed('name', true); + g.append('text').classed('name', true) + .call(Drawing.font, HOVERFONT, HOVERFONTSIZE); // trace data label (path and text.nums) g.append('path') .style('stroke-width', '1px'); g.append('text').classed('nums', true) - .call(Drawing.font, fontFamily, fontSize); + .call(Drawing.font, HOVERFONT, HOVERFONTSIZE); }); hoverLabels.exit().remove(); @@ -132366,7 +131282,8 @@ function createHoverText(hoverData, opts) { traceColor = Color.combine(baseColor, bgColor), // find a contrasting color for border and text - contrastColor = d.borderColor || Color.contrast(traceColor); + contrastColor = tinycolor(traceColor).getBrightness() > 128 ? + '#000' : Color.background; // to get custom 'name' labels pass cleanPoint if(d.nameOverride !== undefined) d.name = d.nameOverride; @@ -132411,10 +131328,7 @@ function createHoverText(hoverData, opts) { // main label var tx = g.select('text.nums') - .call(Drawing.font, - d.fontFamily || fontFamily, - d.fontSize || fontSize, - d.fontColor || contrastColor) + .style('fill', contrastColor) .call(Drawing.setPosition, 0, 0) .text(text) .attr('data-notex', 1) @@ -132427,10 +131341,7 @@ function createHoverText(hoverData, opts) { // secondary label for non-empty 'name' if(name && name !== text) { - tx2.call(Drawing.font, - d.fontFamily || fontFamily, - d.fontSize || fontSize, - traceColor) + tx2.style('fill', traceColor) .text(name) .call(Drawing.setPosition, 0, 0) .attr('data-notex', 1) @@ -132727,7 +131638,9 @@ function alignHoverText(hoverLabels, rotateLabels) { } function hoverChanged(gd, evt, oldhoverdata) { - // don't emit any events if nothing changed + // don't emit any events if nothing changed or + // if fx.hover was called manually + if(!evt.target) return false; if(!oldhoverdata || oldhoverdata.length !== gd._hoverdata.length) return true; for(var i = oldhoverdata.length - 1; i >= 0; i--) { @@ -132745,7 +131658,7 @@ function hoverChanged(gd, evt, oldhoverdata) { fx.click = function(gd, evt) { var annotationsDone = Registry.getComponentMethod('annotations', 'onClick')(gd, gd._hoverdata); - function emitClick() { gd.emit('plotly_click', {points: gd._hoverdata, event: evt}); } + function emitClick() { gd.emit('plotly_click', {points: gd._hoverdata}); } if(gd._hoverdata && evt && evt.target) { if(annotationsDone && annotationsDone.then) { @@ -132774,7 +131687,7 @@ fx.inbox = function(v0, v1) { return Infinity; }; -},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../lib":685,"../../lib/events":676,"../../lib/override_cursor":694,"../../lib/svg_text_utils":704,"../../registry":802,"../layout_attributes":778,"./axes":724,"./constants":729,"./dragbox":732,"d3":107,"fast-isnumeric":116,"tinycolor2":514}],734:[function(require,module,exports){ +},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../lib":680,"../../lib/events":671,"../../lib/override_cursor":689,"../../lib/svg_text_utils":699,"../../registry":793,"../layout_attributes":769,"./axes":719,"./constants":724,"./dragbox":725,"d3":104,"fast-isnumeric":113,"tinycolor2":511}],727:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -132840,11 +131753,8 @@ exports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) { // Skip trace if whitelist provided and it's not whitelisted: // if (Array.isArray(traces) && traces.indexOf(i) === -1) continue; if(trace.xaxis + trace.yaxis === subplot) { - // XXX: Should trace carpet dependencies. Only replot all carpet plots if the carpet - // axis has actually changed: - // // If this trace is specifically requested, add it to the list: - if(traces.indexOf(trace.index) !== -1 || trace.carpet) { + if(traces.indexOf(trace.index) !== -1) { // Okay, so example: traces 0, 1, and 2 have fill = tonext. You animate // traces 0 and 2. Trace 1 also needs to be updated, otherwise its fill // is outdated. So this retroactively adds the previous trace if the @@ -133080,7 +131990,6 @@ function makeSubplotLayer(plotinfo) { joinLayer(parent, 'g', 'imagelayer'); joinLayer(parent, 'g', 'maplayer'); joinLayer(parent, 'g', 'barlayer'); - joinLayer(parent, 'g', 'carpetlayer'); joinLayer(parent, 'g', 'boxlayer'); joinLayer(parent, 'g', 'scatterlayer'); } @@ -133163,7 +132072,7 @@ function joinLayer(parent, nodeType, className) { return layer; } -},{"../../lib":685,"../plots":787,"./attributes":723,"./axis_ids":727,"./constants":729,"./layout_attributes":735,"./transition_axes":745,"d3":107}],735:[function(require,module,exports){ +},{"../../lib":680,"../plots":778,"./attributes":718,"./axis_ids":722,"./constants":724,"./layout_attributes":728,"./transition_axes":737,"d3":104}],728:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133176,18 +132085,12 @@ function joinLayer(parent, nodeType, className) { var fontAttrs = require('../font_attributes'); var colorAttrs = require('../../components/color/attributes'); -var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; var constants = require('./constants'); module.exports = { - visible: { - valType: 'boolean', - - - }, color: { valType: 'color', dflt: colorAttrs.defaultLine, @@ -133235,29 +132138,12 @@ module.exports = { ], }, + fixedrange: { valType: 'boolean', dflt: false, - }, - // scaleanchor: not used directly, just put here for reference - // values are any opposite-letter axis id - scaleanchor: { - valType: 'enumerated', - values: [ - constants.idRegex.x.toString(), - constants.idRegex.y.toString() - ], - - - }, - scaleratio: { - valType: 'number', - min: 0, - dflt: 1, - - }, // ticks tickmode: { @@ -133329,32 +132215,6 @@ module.exports = { dflt: true, - }, - showspikes: { - valType: 'boolean', - dflt: false, - - - }, - spikecolor: { - valType: 'color', - dflt: null, - - - }, - spikethickness: { - valType: 'number', - dflt: 3, - - - }, - spikedash: extendFlat({}, dash, {dflt: 'dash'}), - spikemode: { - valType: 'flaglist', - flags: ['toaxis', 'across', 'marker'], - - dflt: 'toaxis', - }, tickfont: extendFlat({}, fontAttrs, { @@ -133555,7 +132415,7 @@ module.exports = { } }; -},{"../../components/color/attributes":577,"../../components/drawing/attributes":601,"../../lib/extend":677,"../font_attributes":748,"./constants":729}],736:[function(require,module,exports){ +},{"../../components/color/attributes":574,"../../lib/extend":672,"../font_attributes":739,"./constants":724}],729:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133574,9 +132434,7 @@ var basePlotLayoutAttributes = require('../layout_attributes'); var constants = require('./constants'); var layoutAttributes = require('./layout_attributes'); -var handleTypeDefaults = require('./type_defaults'); var handleAxisDefaults = require('./axis_defaults'); -var handleConstraintDefaults = require('./constraint_defaults'); var handlePositionDefaults = require('./position_defaults'); var axisIds = require('./axis_ids'); @@ -133587,8 +132445,6 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { yaListCartesian = [], xaListGl2d = [], yaListGl2d = [], - xaListCheater = [], - xaListNonCheater = [], outerTicks = {}, noGrids = {}, i; @@ -133611,21 +132467,6 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { var xaName = axisIds.id2name(trace.xaxis), yaName = axisIds.id2name(trace.yaxis); - // Two things trigger axis visibility: - // 1. is not carpet - // 2. carpet that's not cheater - if(!Registry.traceIs(trace, 'carpet') || (trace.type === 'carpet' && !trace._cheater)) { - if(xaName) Lib.pushUnique(xaListNonCheater, xaName); - } - - // The above check for definitely-not-cheater is not adequate. This - // second list tracks which axes *could* be a cheater so that the - // full condition triggering hiding is: - // *could* be a cheater and *is not definitely visible* - if(trace.type === 'carpet' && trace._cheater) { - if(xaName) Lib.pushUnique(xaListCheater, xaName); - } - // add axes implied by traces if(xaName && listX.indexOf(xaName) === -1) listX.push(xaName); if(yaName && listY.indexOf(yaName) === -1) listY.push(yaName); @@ -133692,7 +132533,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { var bgColor = Color.combine(plot_bgcolor, layoutOut.paper_bgcolor); - var axName, axLetter, axLayoutIn, axLayoutOut; + var axName, axLayoutIn, axLayoutOut; function coerce(attr, dflt) { return Lib.coerce(axLayoutIn, axLayoutOut, layoutAttributes, attr, dflt); @@ -133703,8 +132544,6 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { return Lib.simpleMap(list, axisIds.name2id); } - var counterAxes = {x: getCounterAxes('x'), y: getCounterAxes('y')}; - function getOverlayableAxes(axLetter, axName) { var list = {x: xaList, y: yaList}[axLetter]; var out = []; @@ -133720,7 +132559,6 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { return out; } - // first pass creates the containers, determines types, and handles most of the settings for(i = 0; i < axesList.length; i++) { axName = axesList[i]; @@ -133731,36 +132569,25 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { axLayoutIn = layoutIn[axName]; axLayoutOut = layoutOut[axName] = {}; - handleTypeDefaults(axLayoutIn, axLayoutOut, coerce, fullData, axName); - - axLetter = axName.charAt(0); - var overlayableAxes = getOverlayableAxes(axLetter, axName); + var axLetter = axName.charAt(0); var defaultOptions = { letter: axLetter, font: layoutOut.font, outerTicks: outerTicks[axName], showGrid: !noGrids[axName], + name: axName, data: fullData, bgColor: bgColor, - calendar: layoutOut.calendar, - cheateronly: axLetter === 'x' && (xaListCheater.indexOf(axName) !== -1 && xaListNonCheater.indexOf(axName) === -1) + calendar: layoutOut.calendar }; handleAxisDefaults(axLayoutIn, axLayoutOut, coerce, defaultOptions, layoutOut); - var showSpikes = coerce('showspikes'); - if(showSpikes) { - coerce('spikecolor'); - coerce('spikethickness'); - coerce('spikedash'); - coerce('spikemode'); - } - var positioningOptions = { letter: axLetter, - counterAxes: counterAxes[axLetter], - overlayableAxes: overlayableAxes + counterAxes: getCounterAxes(axLetter), + overlayableAxes: getOverlayableAxes(axLetter, axName) }; handlePositionDefaults(axLayoutIn, axLayoutOut, coerce, positioningOptions); @@ -133807,28 +132634,9 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { coerce('fixedrange', fixedRangeDflt); } - - // Finally, handle scale constraints. We need to do this after all axes have - // coerced both `type` (so we link only axes of the same type) and - // `fixedrange` (so we can avoid linking from OR TO a fixed axis). - - // sets of axes linked by `scaleanchor` along with the scaleratios compounded - // together, populated in handleConstraintDefaults - layoutOut._axisConstraintGroups = []; - var allAxisIds = counterAxes.x.concat(counterAxes.y); - - for(i = 0; i < axesList.length; i++) { - axName = axesList[i]; - axLetter = axName.charAt(0); - - axLayoutIn = layoutIn[axName]; - axLayoutOut = layoutOut[axName]; - - handleConstraintDefaults(axLayoutIn, axLayoutOut, coerce, allAxisIds, layoutOut); - } }; -},{"../../components/color":578,"../../lib":685,"../../registry":802,"../layout_attributes":778,"./axis_defaults":726,"./axis_ids":727,"./constants":729,"./constraint_defaults":730,"./layout_attributes":735,"./position_defaults":738,"./type_defaults":746}],737:[function(require,module,exports){ +},{"../../components/color":575,"../../lib":680,"../../registry":793,"../layout_attributes":769,"./axis_defaults":721,"./axis_ids":722,"./constants":724,"./layout_attributes":728,"./position_defaults":731}],730:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133907,7 +132715,7 @@ module.exports = function orderedCategories(axisLetter, categoryorder, categorya } }; -},{"d3":107}],738:[function(require,module,exports){ +},{"d3":104}],731:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -133972,32 +132780,7 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer return containerOut; }; -},{"../../lib":685,"fast-isnumeric":116}],739:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -module.exports = function scaleZoom(ax, factor, centerFraction) { - if(centerFraction === undefined) centerFraction = 0.5; - - var rangeLinear = [ax.r2l(ax.range[0]), ax.r2l(ax.range[1])]; - var center = rangeLinear[0] + (rangeLinear[1] - rangeLinear[0]) * centerFraction; - var newHalfSpan = (center - rangeLinear[0]) * factor; - - ax.range = ax._input.range = [ - ax.l2r(center - newHalfSpan), - ax.l2r(center + newHalfSpan) - ]; -}; - -},{}],740:[function(require,module,exports){ +},{"../../lib":680,"fast-isnumeric":113}],732:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134197,7 +132980,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) { }; }; -},{"../../components/color":578,"../../lib/polygon":695,"./axes":724,"./constants":729}],741:[function(require,module,exports){ +},{"../../components/color":575,"../../lib/polygon":690,"./axes":719,"./constants":724}],733:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134326,20 +133109,12 @@ module.exports = function setConvert(ax, fullLayout) { */ function setCategoryIndex(v) { if(v !== null && v !== undefined) { - if(ax._categoriesMap === undefined) { - ax._categoriesMap = {}; - } - - if(ax._categoriesMap[v] !== undefined) { - return ax._categoriesMap[v]; - } else { + var c = ax._categories.indexOf(v); + if(c === -1) { ax._categories.push(v); - - var curLength = ax._categories.length - 1; - ax._categoriesMap[v] = curLength; - - return curLength; + return ax._categories.length - 1; } + return c; } return BADNUM; } @@ -134347,12 +133122,9 @@ module.exports = function setConvert(ax, fullLayout) { function getCategoryIndex(v) { // d2l/d2c variant that that won't add categories but will also // allow numbers to be mapped to the linearized axis positions - if(ax._categoriesMap) { - var index = ax._categoriesMap[v]; - if(index !== undefined) return index; - } - - if(typeof v === 'number') { return v; } + var index = ax._categories.indexOf(v); + if(index !== -1) return index; + if(typeof v === 'number') return v; } function l2p(v) { @@ -134536,8 +133308,6 @@ module.exports = function setConvert(ax, fullLayout) { // TODO cleaner way to handle this case if(!ax._categories) ax._categories = []; - // Add a map to optimize the performance of category collection - if(!ax._categoriesMap) ax._categoriesMap = {}; // make sure we have a domain (pull it in from the axis // this one is overlaying if necessary) @@ -134640,7 +133410,7 @@ module.exports = function setConvert(ax, fullLayout) { delete ax._forceTick0; }; -},{"../../constants/numerical":666,"../../lib":685,"./axis_ids":727,"./constants":729,"d3":107,"fast-isnumeric":116}],742:[function(require,module,exports){ +},{"../../constants/numerical":662,"../../lib":680,"./axis_ids":722,"./constants":724,"d3":104,"fast-isnumeric":113}],734:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134724,7 +133494,7 @@ function getShowAttrDflt(containerIn) { } } -},{"../../lib":685}],743:[function(require,module,exports){ +},{"../../lib":680}],735:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134757,7 +133527,7 @@ module.exports = function handleTickDefaults(containerIn, containerOut, coerce, } }; -},{"../../lib":685,"./layout_attributes":735}],744:[function(require,module,exports){ +},{"../../lib":680,"./layout_attributes":728}],736:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -134841,7 +133611,7 @@ module.exports = function handleTickValueDefaults(containerIn, containerOut, coe } }; -},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],745:[function(require,module,exports){ +},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],737:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135153,135 +133923,7 @@ module.exports = function transitionAxes(gd, newLayout, transitionOpts, makeOnCo return Promise.resolve(); }; -},{"../../components/drawing":602,"../../plotly":719,"../../registry":802,"./axes":724,"d3":107}],746:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var Registry = require('../../registry'); -var autoType = require('./axis_autotype'); -var name2id = require('./axis_ids').name2id; - -/* - * data: the plot data to use in choosing auto type - * name: axis object name (ie 'xaxis') if one should be stored - */ -module.exports = function handleTypeDefaults(containerIn, containerOut, coerce, data, name) { - // set up some private properties - if(name) { - containerOut._name = name; - containerOut._id = name2id(name); - } - - var axType = coerce('type'); - if(axType === '-') { - setAutoType(containerOut, data); - - if(containerOut.type === '-') { - containerOut.type = 'linear'; - } - else { - // copy autoType back to input axis - // note that if this object didn't exist - // in the input layout, we have to put it in - // this happens in the main supplyDefaults function - containerIn.type = containerOut.type; - } - } -}; - -function setAutoType(ax, data) { - // new logic: let people specify any type they want, - // only autotype if type is '-' - if(ax.type !== '-') return; - - var id = ax._id, - axLetter = id.charAt(0); - - // support 3d - if(id.indexOf('scene') !== -1) id = axLetter; - - var d0 = getFirstNonEmptyTrace(data, id, axLetter); - if(!d0) return; - - // first check for histograms, as the count direction - // should always default to a linear axis - if(d0.type === 'histogram' && - axLetter === {v: 'y', h: 'x'}[d0.orientation || 'v']) { - ax.type = 'linear'; - return; - } - - var calAttr = axLetter + 'calendar', - calendar = d0[calAttr]; - - // check all boxes on this x axis to see - // if they're dates, numbers, or categories - if(isBoxWithoutPositionCoords(d0, axLetter)) { - var posLetter = getBoxPosLetter(d0), - boxPositions = [], - trace; - - for(var i = 0; i < data.length; i++) { - trace = data[i]; - if(!Registry.traceIs(trace, 'box') || - (trace[axLetter + 'axis'] || axLetter) !== id) continue; - - if(trace[posLetter] !== undefined) boxPositions.push(trace[posLetter][0]); - else if(trace.name !== undefined) boxPositions.push(trace.name); - else boxPositions.push('text'); - - if(trace[calAttr] !== calendar) calendar = undefined; - } - - ax.type = autoType(boxPositions, calendar); - } - else { - ax.type = autoType(d0[axLetter] || [d0[axLetter + '0']], calendar); - } -} - -function getFirstNonEmptyTrace(data, id, axLetter) { - for(var i = 0; i < data.length; i++) { - var trace = data[i]; - - if((trace[axLetter + 'axis'] || axLetter) === id) { - if(isBoxWithoutPositionCoords(trace, axLetter)) { - return trace; - } - else if((trace[axLetter] || []).length || trace[axLetter + '0']) { - return trace; - } - } - } -} - -function getBoxPosLetter(trace) { - return {v: 'x', h: 'y'}[trace.orientation || 'v']; -} - -function isBoxWithoutPositionCoords(trace, axLetter) { - var posLetter = getBoxPosLetter(trace), - isBox = Registry.traceIs(trace, 'box'), - isCandlestick = Registry.traceIs(trace._fullInput || {}, 'candlestick'); - - return ( - isBox && - !isCandlestick && - axLetter === posLetter && - trace[posLetter] === undefined && - trace[posLetter + '0'] === undefined - ); -} - -},{"../../registry":802,"./axis_autotype":725,"./axis_ids":727}],747:[function(require,module,exports){ +},{"../../components/drawing":598,"../../plotly":714,"../../registry":793,"./axes":719,"d3":104}],738:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135706,7 +134348,7 @@ function crawl(attrs, callback, path, depth) { }); } -},{"../lib":685,"../plotly":719}],748:[function(require,module,exports){ +},{"../lib":680,"../plotly":714}],739:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135737,7 +134379,7 @@ module.exports = { } }; -},{}],749:[function(require,module,exports){ +},{}],740:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135783,7 +134425,7 @@ module.exports = { } }; -},{}],750:[function(require,module,exports){ +},{}],741:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -135943,7 +134585,7 @@ params.layerNameToAdjective = { // base layers drawn over choropleth params.baseLayersOverChoropleth = ['rivers', 'lakes']; -},{}],751:[function(require,module,exports){ +},{}],742:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136037,9 +134679,11 @@ proto.plot = function(geoCalcData, fullLayout, promises) { if(!lonlat || isNaN(lonlat[0]) || isNaN(lonlat[1])) return; - var evt = d3.event; - evt.xpx = mouse[0]; - evt.ypx = mouse[1]; + var evt = { + target: true, + xpx: mouse[0], + ypx: mouse[1] + }; _this.xaxis.c2p = function() { return mouse[0]; }; _this.xaxis.p2c = function() { return lonlat[0]; }; @@ -136054,7 +134698,7 @@ proto.plot = function(geoCalcData, fullLayout, promises) { }); _this.framework.on('click', function() { - Fx.click(_this.graphDiv, d3.event); + Fx.click(_this.graphDiv, { target: true }); }); topojsonNameNew = topojsonUtils.getTopojsonName(geoLayout); @@ -136416,7 +135060,7 @@ function createMockAxis(fullLayout) { return mockAxis; } -},{"../../components/color":578,"../../components/drawing":602,"../../lib/topojson_utils":706,"../cartesian/axes":724,"../cartesian/graph_interact":733,"../plots":787,"./constants":750,"./projections":758,"./set_scale":759,"./zoom":760,"./zoom_reset":761,"d3":107,"topojson-client":516}],752:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"../../lib/topojson_utils":701,"../cartesian/axes":719,"../cartesian/graph_interact":726,"../plots":778,"./constants":741,"./projections":749,"./set_scale":750,"./zoom":751,"./zoom_reset":752,"d3":104,"topojson-client":513}],743:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136496,7 +135140,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) } }; -},{"../../plots/plots":787,"./geo":751,"./layout/attributes":753,"./layout/defaults":756,"./layout/layout_attributes":757}],753:[function(require,module,exports){ +},{"../../plots/plots":778,"./geo":742,"./layout/attributes":744,"./layout/defaults":747,"./layout/layout_attributes":748}],744:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136517,7 +135161,7 @@ module.exports = { } }; -},{}],754:[function(require,module,exports){ +},{}],745:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136572,7 +135216,7 @@ module.exports = { } }; -},{"../../../components/color/attributes":577}],755:[function(require,module,exports){ +},{"../../../components/color/attributes":574}],746:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136646,7 +135290,7 @@ module.exports = function supplyGeoAxisLayoutDefaults(geoLayoutIn, geoLayoutOut) } }; -},{"../../../lib":685,"../constants":750,"./axis_attributes":754}],756:[function(require,module,exports){ +},{"../../../lib":680,"../constants":741,"./axis_attributes":745}],747:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136765,7 +135409,7 @@ function handleGeoDefaults(geoLayoutIn, geoLayoutOut, coerce) { ]; } -},{"../../subplot_defaults":794,"../constants":750,"./axis_defaults":755,"./layout_attributes":757}],757:[function(require,module,exports){ +},{"../../subplot_defaults":785,"../constants":741,"./axis_defaults":746,"./layout_attributes":748}],748:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -136998,7 +135642,7 @@ module.exports = { lataxis: geoAxesAttrs }; -},{"../../../components/color/attributes":577,"../constants":750,"./axis_attributes":754}],758:[function(require,module,exports){ +},{"../../../components/color/attributes":574,"../constants":741,"./axis_attributes":745}],749:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137444,7 +136088,7 @@ function addProjectionsToD3(d3) { module.exports = addProjectionsToD3; -},{}],759:[function(require,module,exports){ +},{}],750:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -137595,7 +136239,7 @@ function getBounds(projection, rangeBox) { return d3.geo.path().projection(projection).bounds(rangeBox); } -},{"./constants":750,"d3":107}],760:[function(require,module,exports){ +},{"./constants":741,"d3":104}],751:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138022,7 +136666,7 @@ function d3_eventDispatch(target) { return dispatch; } -},{"d3":107}],761:[function(require,module,exports){ +},{"d3":104}],752:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138051,7 +136695,7 @@ module.exports = function createGeoZoomReset(geo, geoLayout) { return zoomReset; }; -},{}],762:[function(require,module,exports){ +},{}],753:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138065,7 +136709,6 @@ module.exports = function createGeoZoomReset(geo, geoLayout) { var mouseChange = require('mouse-change'); var mouseWheel = require('mouse-wheel'); -var cartesianConstants = require('../cartesian/constants'); module.exports = createCamera; @@ -138077,10 +136720,8 @@ function Camera2D(element, plot) { this.lastInputTime = Date.now(); this.lastPos = [0, 0]; this.boxEnabled = false; - this.boxInited = false; this.boxStart = [0, 0]; this.boxEnd = [0, 0]; - this.dragStart = [0, 0]; } @@ -138094,21 +136735,6 @@ function createCamera(scene) { scene.yaxis.autorange = false; } - function getSubplotConstraint() { - // note: this assumes we only have one x and one y axis on this subplot - // when this constraint is lifted this block won't make sense - var constraints = scene.graphDiv._fullLayout._axisConstraintGroups; - var xaId = scene.xaxis._id; - var yaId = scene.yaxis._id; - for(var i = 0; i < constraints.length; i++) { - if(constraints[i][xaId] !== -1) { - if(constraints[i][yaId] !== -1) return true; - break; - } - } - return false; - } - result.mouseListener = mouseChange(element, function(buttons, x, y) { var dataBox = scene.calcDataBox(), viewBox = plot.viewBox; @@ -138116,11 +136742,6 @@ function createCamera(scene) { var lastX = result.lastPos[0], lastY = result.lastPos[1]; - var MINDRAG = cartesianConstants.MINDRAG * plot.pixelRatio; - var MINZOOM = cartesianConstants.MINZOOM * plot.pixelRatio; - - var dx, dy; - x *= plot.pixelRatio; y *= plot.pixelRatio; @@ -138153,114 +136774,32 @@ function createCamera(scene) { (viewBox[3] - viewBox[1]) * (dataBox[3] - dataBox[1]) + dataBox[1]; - if(!result.boxInited) { + if(!result.boxEnabled) { result.boxStart[0] = dataX; result.boxStart[1] = dataY; - result.dragStart[0] = x; - result.dragStart[1] = y; } result.boxEnd[0] = dataX; result.boxEnd[1] = dataY; - // we need to mark the box as initialized right away - // so that we can tell the start and end pionts apart - result.boxInited = true; - - // but don't actually enable the box until the cursor moves - if(!result.boxEnabled && ( - result.boxStart[0] !== result.boxEnd[0] || - result.boxStart[1] !== result.boxEnd[1]) - ) { - result.boxEnabled = true; - } - - // constrain aspect ratio if the axes require it - var smallDx = Math.abs(result.dragStart[0] - x) < MINZOOM; - var smallDy = Math.abs(result.dragStart[1] - y) < MINZOOM; - if(getSubplotConstraint() && !(smallDx && smallDy)) { - dx = result.boxEnd[0] - result.boxStart[0]; - dy = result.boxEnd[1] - result.boxStart[1]; - var dydx = (dataBox[3] - dataBox[1]) / (dataBox[2] - dataBox[0]); - - if(Math.abs(dx * dydx) > Math.abs(dy)) { - result.boxEnd[1] = result.boxStart[1] + - Math.abs(dx) * dydx * (Math.sign(dy) || 1); - - // gl-select-box clips to the plot area bounds, - // which breaks the axis constraint, so don't allow - // this box to go out of bounds - if(result.boxEnd[1] < dataBox[1]) { - result.boxEnd[1] = dataBox[1]; - result.boxEnd[0] = result.boxStart[0] + - (dataBox[1] - result.boxStart[1]) / Math.abs(dydx); - } - else if(result.boxEnd[1] > dataBox[3]) { - result.boxEnd[1] = dataBox[3]; - result.boxEnd[0] = result.boxStart[0] + - (dataBox[3] - result.boxStart[1]) / Math.abs(dydx); - } - } - else { - result.boxEnd[0] = result.boxStart[0] + - Math.abs(dy) / dydx * (Math.sign(dx) || 1); - - if(result.boxEnd[0] < dataBox[0]) { - result.boxEnd[0] = dataBox[0]; - result.boxEnd[1] = result.boxStart[1] + - (dataBox[0] - result.boxStart[0]) * Math.abs(dydx); - } - else if(result.boxEnd[0] > dataBox[2]) { - result.boxEnd[0] = dataBox[2]; - result.boxEnd[1] = result.boxStart[1] + - (dataBox[2] - result.boxStart[0]) * Math.abs(dydx); - } - } - } - // otherwise clamp small changes to the origin so we get 1D zoom - else { - if(smallDx) result.boxEnd[0] = result.boxStart[0]; - if(smallDy) result.boxEnd[1] = result.boxStart[1]; - } + result.boxEnabled = true; } else if(result.boxEnabled) { - dx = result.boxStart[0] !== result.boxEnd[0]; - dy = result.boxStart[1] !== result.boxEnd[1]; - if(dx || dy) { - if(dx) { - updateRange(0, result.boxStart[0], result.boxEnd[0]); - scene.xaxis.autorange = false; - } - if(dy) { - updateRange(1, result.boxStart[1], result.boxEnd[1]); - scene.yaxis.autorange = false; - } - scene.relayoutCallback(); - } - else { - scene.glplot.setDirty(); - } + updateRange(0, result.boxStart[0], result.boxEnd[0]); + updateRange(1, result.boxStart[1], result.boxEnd[1]); + unSetAutoRange(); result.boxEnabled = false; - result.boxInited = false; + scene.relayoutCallback(); } break; case 'pan': result.boxEnabled = false; - result.boxInited = false; if(buttons) { - if(!result.panning) { - result.dragStart[0] = x; - result.dragStart[1] = y; - } - - if(Math.abs(result.dragStart[0] - x) < MINDRAG) x = result.dragStart[0]; - if(Math.abs(result.dragStart[1] - y) < MINDRAG) y = result.dragStart[1]; - - dx = (lastX - x) * (dataBox[2] - dataBox[0]) / + var dx = (lastX - x) * (dataBox[2] - dataBox[0]) / (plot.viewBox[2] - plot.viewBox[0]); - dy = (lastY - y) * (dataBox[3] - dataBox[1]) / + var dy = (lastY - y) * (dataBox[3] - dataBox[1]) / (plot.viewBox[3] - plot.viewBox[1]); dataBox[0] += dx; @@ -138329,7 +136868,7 @@ function createCamera(scene) { return result; } -},{"../cartesian/constants":729,"mouse-change":434,"mouse-wheel":437}],763:[function(require,module,exports){ +},{"mouse-change":431,"mouse-wheel":434}],754:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138575,7 +137114,7 @@ function createAxes2D(scene) { module.exports = createAxes2D; -},{"../../lib/html2unicode":683,"../../lib/str2rgbarray":703,"../cartesian/axes":724,"../plots":787}],764:[function(require,module,exports){ +},{"../../lib/html2unicode":678,"../../lib/str2rgbarray":698,"../cartesian/axes":719,"../plots":778}],755:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138687,7 +137226,7 @@ exports.toSVG = function(gd) { } }; -},{"../../constants/xmlns_namespaces":668,"../cartesian/attributes":723,"../plots":787,"./scene2d":765}],765:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":664,"../cartesian/attributes":718,"../plots":778,"./scene2d":756}],756:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -138712,7 +137251,6 @@ var createOptions = require('./convert'); var createCamera = require('./camera'); var convertHTMLToUnicode = require('../../lib/html2unicode'); var showNoWebGlMsg = require('../../lib/show_no_webgl_msg'); -var enforceAxisConstraints = require('../../plots/cartesian/constraints'); var AXES = ['xaxis', 'yaxis']; var STATIC_CANVAS, STATIC_CONTEXT; @@ -139117,13 +137655,6 @@ proto.plot = function(fullData, calcData, fullLayout) { ax.setScale(); } - var mockLayout = { - _axisConstraintGroups: this.graphDiv._fullLayout._axisConstraintGroups, - xaxis: this.xaxis, - yaxis: this.yaxis - }; - enforceAxisConstraints({_fullLayout: mockLayout}); - options.ticks = this.computeTickMarks(); options.dataBox = this.calcDataBox(); @@ -139242,36 +137773,26 @@ proto.draw = function() { var x = mouseListener.x * glplot.pixelRatio; var y = this.canvas.height - glplot.pixelRatio * mouseListener.y; - var result; - if(camera.boxEnabled && fullLayout.dragmode === 'zoom') { this.selectBox.enabled = true; - var selectBox = this.selectBox.selectBox = [ + this.selectBox.selectBox = [ Math.min(camera.boxStart[0], camera.boxEnd[0]), Math.min(camera.boxStart[1], camera.boxEnd[1]), Math.max(camera.boxStart[0], camera.boxEnd[0]), Math.max(camera.boxStart[1], camera.boxEnd[1]) ]; - // 1D zoom - for(var i = 0; i < 2; i++) { - if(camera.boxStart[i] === camera.boxEnd[i]) { - selectBox[i] = glplot.dataBox[i]; - selectBox[i + 2] = glplot.dataBox[i + 2]; - } - } - glplot.setDirty(); } - else if(!camera.panning) { + else { this.selectBox.enabled = false; var size = fullLayout._size, domainX = this.xaxis.domain, domainY = this.yaxis.domain; - result = glplot.pick( + var result = glplot.pick( (x / glplot.pixelRatio) + size.l + domainX[0] * size.w, (y / glplot.pixelRatio) - (size.t + (1 - domainY[1]) * size.h) ); @@ -139337,15 +137858,12 @@ proto.draw = function() { }); } } - } - - // Remove hover effects if we're not over a point OR - // if we're zooming or panning (in which case result is not set) - if(!result && this.lastPickResult) { - this.spikes.update({}); - this.lastPickResult = null; - this.graphDiv.emit('plotly_unhover'); - Fx.loneUnhover(this.svgContainer); + else if(!result && this.lastPickResult) { + this.spikes.update({}); + this.lastPickResult = null; + this.graphDiv.emit('plotly_unhover'); + Fx.loneUnhover(this.svgContainer); + } } glplot.draw(); @@ -139358,7 +137876,7 @@ proto.hoverFormatter = function(axisName, val) { return Axes.tickText(axis, axis.c2l(val), 'hover').text; }; -},{"../../lib/html2unicode":683,"../../lib/show_no_webgl_msg":701,"../../plots/cartesian/axes":724,"../../plots/cartesian/constraints":731,"../../plots/cartesian/graph_interact":733,"../../registry":802,"./camera":762,"./convert":763,"gl-plot2d":203,"gl-select-box":237,"gl-spikes2d":246,"webgl-context":543}],766:[function(require,module,exports){ +},{"../../lib/html2unicode":678,"../../lib/show_no_webgl_msg":696,"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"../../registry":793,"./camera":753,"./convert":754,"gl-plot2d":200,"gl-select-box":234,"gl-spikes2d":243,"webgl-context":540}],757:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139607,7 +138125,7 @@ function createCamera(element, options) { return camera; } -},{"3d-view":33,"mouse-change":434,"mouse-wheel":437,"right-now":483}],767:[function(require,module,exports){ +},{"3d-view":30,"mouse-change":431,"mouse-wheel":434,"right-now":480}],758:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139724,7 +138242,7 @@ exports.cleanId = function cleanId(id) { return 'scene' + sceneNum; }; -},{"../../constants/xmlns_namespaces":668,"../../lib":685,"../plots":787,"./layout/attributes":768,"./layout/defaults":772,"./layout/layout_attributes":773,"./scene":777}],768:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":664,"../../lib":680,"../plots":778,"./layout/attributes":759,"./layout/defaults":763,"./layout/layout_attributes":764,"./scene":768}],759:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139745,7 +138263,7 @@ module.exports = { } }; -},{}],769:[function(require,module,exports){ +},{}],760:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139762,7 +138280,6 @@ var extendFlat = require('../../../lib/extend').extendFlat; module.exports = { - visible: axesAttrs.visible, showspikes: { valType: 'boolean', @@ -139852,7 +138369,7 @@ module.exports = { zerolinewidth: axesAttrs.zerolinewidth }; -},{"../../../components/color":578,"../../../lib/extend":677,"../../cartesian/layout_attributes":735}],770:[function(require,module,exports){ +},{"../../../components/color":575,"../../../lib/extend":672,"../../cartesian/layout_attributes":728}],761:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139869,7 +138386,6 @@ var colorMix = require('tinycolor2').mix; var Lib = require('../../../lib'); var layoutAttributes = require('./axis_attributes'); -var handleTypeDefaults = require('../../cartesian/type_defaults'); var handleAxisDefaults = require('../../cartesian/axis_defaults'); var axesNames = ['xaxis', 'yaxis', 'zaxis']; @@ -139889,14 +138405,12 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { var axName = axesNames[j]; containerIn = layoutIn[axName] || {}; - containerOut = layoutOut[axName] = { + containerOut = { _id: axName[0] + options.scene, _name: axName }; - handleTypeDefaults(containerIn, containerOut, coerce, options.data); - - handleAxisDefaults( + layoutOut[axName] = containerOut = handleAxisDefaults( containerIn, containerOut, coerce, { @@ -139924,7 +138438,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { } }; -},{"../../../lib":685,"../../cartesian/axis_defaults":726,"../../cartesian/type_defaults":746,"./axis_attributes":769,"tinycolor2":514}],771:[function(require,module,exports){ +},{"../../../lib":680,"../../cartesian/axis_defaults":721,"./axis_attributes":760,"tinycolor2":511}],762:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -139936,9 +138450,12 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) { 'use strict'; +var arrtools = require('arraytools'); var convertHTMLToUnicode = require('../../../lib/html2unicode'); var str2RgbaArray = require('../../../lib/str2rgbarray'); +var arrayCopy1D = arrtools.copy1D; + var AXES_NAMES = ['xaxis', 'yaxis', 'zaxis']; function AxesOptions() { @@ -139988,9 +138505,9 @@ function AxesOptions() { [0.8, 0.8, 0.8, 0.5] ]; // some default values are stored for applying model transforms - this._defaultTickPad = this.tickPad.slice(); - this._defaultLabelPad = this.labelPad.slice(); - this._defaultLineTickLength = this.lineTickLength.slice(); + this._defaultTickPad = arrayCopy1D(this.tickPad); + this._defaultLabelPad = arrayCopy1D(this.labelPad); + this._defaultLineTickLength = arrayCopy1D(this.lineTickLength); } var proto = AxesOptions.prototype; @@ -140000,17 +138517,6 @@ proto.merge = function(sceneLayout) { for(var i = 0; i < 3; ++i) { var axes = sceneLayout[AXES_NAMES[i]]; - if(!axes.visible) { - opts.tickEnable[i] = false; - opts.labelEnable[i] = false; - opts.lineEnable[i] = false; - opts.lineTickEnable[i] = false; - opts.gridEnable[i] = false; - opts.zeroEnable[i] = false; - opts.backgroundEnable[i] = false; - continue; - } - // Axes labels opts.labels[i] = convertHTMLToUnicode(axes.title); if('titlefont' in axes) { @@ -140087,7 +138593,7 @@ function createAxesOptions(plotlyOptions) { module.exports = createAxesOptions; -},{"../../../lib/html2unicode":683,"../../../lib/str2rgbarray":703}],772:[function(require,module,exports){ +},{"../../../lib/html2unicode":678,"../../../lib/str2rgbarray":698,"arraytools":36}],763:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140191,7 +138697,7 @@ function handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) { coerce('hovermode', opts.getDfltFromLayout('hovermode')); } -},{"../../../components/color":578,"../../../lib":685,"../../subplot_defaults":794,"./axis_defaults":770,"./layout_attributes":773}],773:[function(require,module,exports){ +},{"../../../components/color":575,"../../../lib":680,"../../subplot_defaults":785,"./axis_defaults":761,"./layout_attributes":764}],764:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140319,7 +138825,7 @@ module.exports = { } }; -},{"../../../lib/extend":677,"./axis_attributes":769}],774:[function(require,module,exports){ +},{"../../../lib/extend":672,"./axis_attributes":760}],765:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140350,12 +138856,6 @@ proto.merge = function(sceneLayout) { for(var i = 0; i < 3; ++i) { var axes = sceneLayout[AXES_NAMES[i]]; - if(!axes.visible) { - this.enabled[i] = false; - this.drawSides[i] = false; - continue; - } - this.enabled[i] = axes.showspikes; this.colors[i] = str2RGBArray(axes.spikecolor); this.drawSides[i] = axes.spikesides; @@ -140371,7 +138871,7 @@ function createSpikeOptions(layout) { module.exports = createSpikeOptions; -},{"../../../lib/str2rgbarray":703}],775:[function(require,module,exports){ +},{"../../../lib/str2rgbarray":698}],766:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140467,7 +138967,7 @@ function computeTickMarks(scene) { scene.contourLevels = contourLevelsFromTicks(ticks); } -},{"../../../lib":685,"../../../lib/html2unicode":683,"../../cartesian/axes":724}],776:[function(require,module,exports){ +},{"../../../lib":680,"../../../lib/html2unicode":678,"../../cartesian/axes":719}],767:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -140501,7 +139001,7 @@ function project(camera, v) { module.exports = project; -},{}],777:[function(require,module,exports){ +},{}],768:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141224,7 +139724,7 @@ proto.setConvert = function() { module.exports = Scene; -},{"../../lib":685,"../../lib/show_no_webgl_msg":701,"../../lib/str2rgbarray":703,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"./camera":766,"./layout/convert":771,"./layout/spikes":774,"./layout/tick_marks":775,"./project":776,"gl-plot3d":205,"webgl-context":543}],778:[function(require,module,exports){ +},{"../../lib":680,"../../lib/show_no_webgl_msg":696,"../../lib/str2rgbarray":698,"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"./camera":757,"./layout/convert":762,"./layout/spikes":765,"./layout/tick_marks":766,"./project":767,"gl-plot3d":202,"webgl-context":540}],769:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141380,7 +139880,7 @@ module.exports = { } }; -},{"../components/color/attributes":577,"../lib":685,"./font_attributes":748}],779:[function(require,module,exports){ +},{"../components/color/attributes":574,"../lib":680,"./font_attributes":739}],770:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141410,7 +139910,7 @@ module.exports = { mapOnErrorMsg: 'Mapbox error.' }; -},{}],780:[function(require,module,exports){ +},{}],771:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141484,7 +139984,7 @@ module.exports = function convertTextOpts(textposition, iconSize) { return { anchor: anchor, offset: offset }; }; -},{"../../lib":685}],781:[function(require,module,exports){ +},{"../../lib":680}],772:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141627,7 +140127,7 @@ function findAccessToken(gd, mapboxIds) { return accessToken; } -},{"../../constants/xmlns_namespaces":668,"../plots":787,"./constants":779,"./layout_attributes":783,"./layout_defaults":784,"./mapbox":785,"mapbox-gl":325}],782:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":664,"../plots":778,"./constants":770,"./layout_attributes":774,"./layout_defaults":775,"./mapbox":776,"mapbox-gl":322}],773:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -141852,7 +140352,7 @@ module.exports = function createMapboxLayer(mapbox, index, opts) { return mapboxLayer; }; -},{"../../lib":685,"./convert_text_opts":780}],783:[function(require,module,exports){ +},{"../../lib":680,"./convert_text_opts":771}],774:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142056,7 +140556,7 @@ module.exports = { }; -},{"../../components/color":578,"../../lib":685,"../../traces/scatter/attributes":976,"../font_attributes":748}],784:[function(require,module,exports){ +},{"../../components/color":575,"../../lib":680,"../../traces/scatter/attributes":924,"../font_attributes":739}],775:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142152,7 +140652,7 @@ function handleLayerDefaults(containerIn, containerOut) { } } -},{"../../lib":685,"../subplot_defaults":794,"./layout_attributes":783}],785:[function(require,module,exports){ +},{"../../lib":680,"../subplot_defaults":785,"./layout_attributes":774}],776:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142266,14 +140766,10 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { }); // clear navigation container - var className = constants.controlContainerClassName; - var controlContainer = self.div.getElementsByClassName(className)[0]; + var className = constants.controlContainerClassName, + controlContainer = self.div.getElementsByClassName(className)[0]; self.div.removeChild(controlContainer); - // make sure canvas does not inherit left and top css - map._canvas.canvas.style.left = '0px'; - map._canvas.canvas.style.top = '0px'; - self.rejectOnError(reject); map.once('load', function() { @@ -142325,8 +140821,8 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { Fx.hover(gd, evt, self.id); }); - map.on('click', function(evt) { - Fx.click(gd, evt.originalEvent); + map.on('click', function() { + Fx.click(gd, { target: true }); }); function unhover() { @@ -142335,6 +140831,7 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { map.on('dragstart', unhover); map.on('zoomstart', unhover); + }; proto.updateMap = function(calcData, fullLayout, resolve, reject) { @@ -142616,7 +141113,7 @@ function convertCenter(center) { return [center.lon, center.lat]; } -},{"../../lib":685,"../cartesian/graph_interact":733,"./constants":779,"./layers":782,"./layout_attributes":783,"mapbox-gl":325}],786:[function(require,module,exports){ +},{"../../lib":680,"../cartesian/graph_interact":726,"./constants":770,"./layers":773,"./layout_attributes":774,"mapbox-gl":322}],777:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142654,7 +141151,7 @@ module.exports = { } }; -},{}],787:[function(require,module,exports){ +},{}],778:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -142673,7 +141170,6 @@ var Plotly = require('../plotly'); var Registry = require('../registry'); var Lib = require('../lib'); var Color = require('../components/color'); -var BADNUM = require('../constants/numerical').BADNUM; var plots = module.exports = {}; @@ -142915,9 +141411,6 @@ plots.previousPromises = function(gd) { * Add source links to your graph inside the 'showSources' config argument. */ plots.addLinks = function(gd) { - // Do not do anything if showLink and showSources are not set to true in config - if(!gd._context.showLink && !gd._context.showSources) return; - var fullLayout = gd._fullLayout; var linkContainer = fullLayout._paper @@ -143235,7 +141728,6 @@ plots.cleanPlot = function(newFullData, newFullLayout, oldFullData, oldFullLayou var query = ( '.hm' + oldUid + ',.contour' + oldUid + - ',.carpet' + oldUid + ',#clip' + oldUid + ',.trace' + oldUid ); @@ -143290,7 +141782,6 @@ plots.linkSubplots = function(newFullData, newFullLayout, oldFullData, oldFullLa }; plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) { - var i, fullTrace, trace; var modules = fullLayout._modules = [], basePlotModules = fullLayout._basePlotModules = [], cnt = 0; @@ -143309,12 +141800,9 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) { cnt++; } - var carpetIndex = {}; - var carpetDependents = []; - - for(i = 0; i < dataIn.length; i++) { - trace = dataIn[i]; - fullTrace = plots.supplyTraceDefaults(trace, cnt, fullLayout, i); + for(var i = 0; i < dataIn.length; i++) { + var trace = dataIn[i], + fullTrace = plots.supplyTraceDefaults(trace, cnt, fullLayout, i); fullTrace.index = i; fullTrace._input = trace; @@ -143351,31 +141839,6 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) { pushModule(fullTrace); } - - if(Registry.traceIs(fullTrace, 'carpetAxis')) { - carpetIndex[fullTrace.carpet] = fullTrace; - } - - if(Registry.traceIs(fullTrace, 'carpetDependent')) { - carpetDependents.push(i); - } - } - - for(i = 0; i < carpetDependents.length; i++) { - fullTrace = dataOut[carpetDependents[i]]; - - if(!fullTrace.visible) continue; - - var carpetAxis = carpetIndex[fullTrace.carpet]; - fullTrace._carpet = carpetAxis; - - if(!carpetAxis || !carpetAxis.visible) { - fullTrace.visible = false; - continue; - } - - fullTrace.xaxis = carpetAxis.xaxis; - fullTrace.yaxis = carpetAxis.yaxis; } }; @@ -143498,11 +141961,6 @@ plots.supplyTraceDefaults = function(traceIn, traceOutIndex, layout, traceInInde // gets overwritten in pie, geo and ternary modules coerce('hoverinfo', (layout._dataLength === 1) ? 'x+y+z+text' : undefined); - if(plots.traceIs(traceOut, 'showLegend')) { - coerce('showlegend'); - coerce('legendgroup'); - } - // TODO add per-base-plot-module trace defaults step if(_module) _module.supplyDefaults(traceIn, traceOut, defaultColor, layout); @@ -143515,21 +141973,19 @@ plots.supplyTraceDefaults = function(traceIn, traceOutIndex, layout, traceInInde coerceSubplotAttr('gl2d', 'xaxis'); coerceSubplotAttr('gl2d', 'yaxis'); - if(plots.traceIs(traceOut, 'notLegendIsolatable')) { - // This clears out the legendonly state for traces like carpet that - // cannot be isolated in the legend - traceOut.visible = !!traceOut.visible; + if(plots.traceIs(traceOut, 'showLegend')) { + coerce('showlegend'); + coerce('legendgroup'); } - plots.supplyTransformDefaults(traceIn, traceOut, layout); + supplyTransformDefaults(traceIn, traceOut, layout); } return traceOut; }; -plots.supplyTransformDefaults = function(traceIn, traceOut, layout) { +function supplyTransformDefaults(traceIn, traceOut, layout) { var globalTransforms = layout._globalTransforms || []; - var transformModules = layout._transformModules || []; if(!Array.isArray(traceIn.transforms) && globalTransforms.length === 0) return; @@ -143550,7 +142006,7 @@ plots.supplyTransformDefaults = function(traceIn, traceOut, layout) { transformOut.type = type; transformOut._module = _module; - Lib.pushUnique(transformModules, _module); + Lib.pushUnique(layout._transformModules, _module); } else { transformOut = Lib.extendFlat({}, transformIn); @@ -143558,7 +142014,7 @@ plots.supplyTransformDefaults = function(traceIn, traceOut, layout) { containerOut.push(transformOut); } -}; +} function applyTransforms(fullTrace, fullData, layout, fullLayout) { var container = fullTrace.transforms, @@ -144648,13 +143104,6 @@ plots.doCalcdata = function(gd, traces) { // to be filled in later by ax.d2c for(i = 0; i < axList.length; i++) { axList[i]._categories = axList[i]._initialCategories.slice(); - - // Build the lookup map for initialized categories - axList[i]._categoriesMap = {}; - for(j = 0; j < axList[i]._categories.length; j++) { - axList[i]._categoriesMap[axList[i]._categories[j]] = j; - } - if(axList[i].type === 'category') hasCategoryAxis = true; } @@ -144699,8 +143148,6 @@ plots.doCalcdata = function(gd, traces) { axList[i]._min = []; axList[i]._max = []; axList[i]._categories = []; - // Reset the look up map - axList[i]._categoriesMap = {}; } } @@ -144719,8 +143166,11 @@ plots.doCalcdata = function(gd, traces) { // // This ensures there is a calcdata item for every trace, // even if cartesian logic doesn't handle it (for things like legends). + // + // Tag this artificial calc point with 'placeholder: true', + // to make it easier to skip over them in during the plot and hover step. if(!Array.isArray(cd) || !cd[0]) { - cd = [{x: BADNUM, y: BADNUM}]; + cd = [{x: false, y: false, placeholder: true}]; } // add the trace-wide properties to the first point, @@ -144815,7 +143265,7 @@ plots.generalUpdatePerTraceModule = function(subplot, subplotCalcData, subplotLa subplot.traceHash = traceHash; }; -},{"../components/color":578,"../components/errorbars":608,"../constants/numerical":666,"../lib":685,"../plotly":719,"../registry":802,"./animation_attributes":720,"./attributes":722,"./command":747,"./font_attributes":748,"./frame_attributes":749,"./layout_attributes":778,"d3":107,"fast-isnumeric":116}],788:[function(require,module,exports){ +},{"../components/color":575,"../components/errorbars":604,"../lib":680,"../plotly":714,"../registry":793,"./animation_attributes":715,"./attributes":717,"./command":738,"./font_attributes":739,"./frame_attributes":740,"./layout_attributes":769,"d3":104,"fast-isnumeric":113}],779:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144840,7 +143290,7 @@ module.exports = { } }; -},{"../../traces/scatter/attributes":976}],789:[function(require,module,exports){ +},{"../../traces/scatter/attributes":924}],780:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144955,7 +143405,7 @@ module.exports = { } }; -},{"../../lib/extend":677,"../cartesian/layout_attributes":735}],790:[function(require,module,exports){ +},{"../../lib/extend":672,"../cartesian/layout_attributes":728}],781:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -144970,7 +143420,7 @@ var Polar = module.exports = require('./micropolar'); Polar.manager = require('./micropolar_manager'); -},{"./micropolar":791,"./micropolar_manager":792}],791:[function(require,module,exports){ +},{"./micropolar":782,"./micropolar_manager":783}],782:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146389,7 +144839,7 @@ var µ = module.exports = { version: '0.2.2' }; return exports; }; -},{"../../lib":685,"d3":107}],792:[function(require,module,exports){ +},{"../../lib":680,"d3":104}],783:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146475,7 +144925,7 @@ manager.fillLayout = function(_gd) { _gd._fullLayout = extendDeepAll(dflts, _gd.layout); }; -},{"../../components/color":578,"../../lib":685,"./micropolar":791,"./undo_manager":793,"d3":107}],793:[function(require,module,exports){ +},{"../../components/color":575,"../../lib":680,"./micropolar":782,"./undo_manager":784,"d3":104}],784:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146541,7 +144991,7 @@ module.exports = function UndoManager() { }; }; -},{}],794:[function(require,module,exports){ +},{}],785:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146616,7 +145066,7 @@ module.exports = function handleSubplotDefaults(layoutIn, layoutOut, fullData, o } }; -},{"../lib":685,"./plots":787}],795:[function(require,module,exports){ +},{"../lib":680,"./plots":778}],786:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146690,7 +145140,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) } }; -},{"../../plots/plots":787,"./layout/attributes":796,"./layout/defaults":799,"./layout/layout_attributes":800,"./ternary":801}],796:[function(require,module,exports){ +},{"../../plots/plots":778,"./layout/attributes":787,"./layout/defaults":790,"./layout/layout_attributes":791,"./ternary":792}],787:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146711,7 +145161,7 @@ module.exports = { } }; -},{}],797:[function(require,module,exports){ +},{}],788:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146771,7 +145221,7 @@ module.exports = { } }; -},{"../../../lib/extend":677,"../../cartesian/layout_attributes":735}],798:[function(require,module,exports){ +},{"../../../lib/extend":672,"../../cartesian/layout_attributes":728}],789:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146855,7 +145305,7 @@ module.exports = function supplyLayoutDefaults(containerIn, containerOut, option } }; -},{"../../../lib":685,"../../cartesian/tick_label_defaults":742,"../../cartesian/tick_mark_defaults":743,"../../cartesian/tick_value_defaults":744,"./axis_attributes":797,"tinycolor2":514}],799:[function(require,module,exports){ +},{"../../../lib":680,"../../cartesian/tick_label_defaults":734,"../../cartesian/tick_mark_defaults":735,"../../cartesian/tick_value_defaults":736,"./axis_attributes":788,"tinycolor2":511}],790:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146897,7 +145347,7 @@ function handleTernaryDefaults(ternaryLayoutIn, ternaryLayoutOut, coerce, option for(var j = 0; j < axesNames.length; j++) { axName = axesNames[j]; containerIn = ternaryLayoutIn[axName] || {}; - containerOut = ternaryLayoutOut[axName] = {_name: axName, type: 'linear'}; + containerOut = ternaryLayoutOut[axName] = {_name: axName}; handleAxisDefaults(containerIn, containerOut, options); } @@ -146918,7 +145368,7 @@ function handleTernaryDefaults(ternaryLayoutIn, ternaryLayoutOut, coerce, option } } -},{"../../../components/color":578,"../../subplot_defaults":794,"./axis_defaults":798,"./layout_attributes":800}],800:[function(require,module,exports){ +},{"../../../components/color":575,"../../subplot_defaults":785,"./axis_defaults":789,"./layout_attributes":791}],791:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -146974,7 +145424,7 @@ module.exports = { caxis: ternaryAxesAttrs }; -},{"../../../components/color/attributes":577,"./axis_attributes":797}],801:[function(require,module,exports){ +},{"../../../components/color/attributes":574,"./axis_attributes":788}],792:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147177,7 +145627,6 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { // fictitious angles and domain, but then rotate and translate // it into place at the end var aaxis = _this.aaxis = extendFlat({}, ternaryLayout.aaxis, { - visible: true, range: [amin, sum - bmin - cmin], side: 'left', _counterangle: 30, @@ -147198,7 +145647,6 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { // baxis goes across the bottom (backward). We can set it up as an x axis // without any enclosing transformation. var baxis = _this.baxis = extendFlat({}, ternaryLayout.baxis, { - visible: true, range: [sum - amin - cmin, bmin], side: 'bottom', _counterangle: 30, @@ -147218,7 +145666,6 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { // caxis goes down the right side. Set it up as a y axis, with // post-transformation similar to aaxis var caxis = _this.caxis = extendFlat({}, ternaryLayout.caxis, { - visible: true, range: [sum - amin - bmin, cmin], side: 'right', _counterangle: 30, @@ -147620,7 +146067,7 @@ function removeZoombox(gd) { .remove(); } -},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../components/titles":655,"../../lib":685,"../../lib/extend":677,"../../plotly":719,"../cartesian/axes":724,"../cartesian/constants":729,"../cartesian/graph_interact":733,"../cartesian/select":740,"../cartesian/set_convert":741,"../plots":787,"d3":107,"tinycolor2":514}],802:[function(require,module,exports){ +},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../components/titles":651,"../../lib":680,"../../lib/extend":672,"../../plotly":714,"../cartesian/axes":719,"../cartesian/constants":724,"../cartesian/graph_interact":726,"../cartesian/select":732,"../cartesian/set_convert":733,"../plots":778,"d3":104,"tinycolor2":511}],793:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147811,7 +146258,7 @@ function getTraceType(traceType) { return traceType; } -},{"./lib/loggers":688,"./lib/noop":692,"./lib/push_unique":696,"./plots/attributes":722}],803:[function(require,module,exports){ +},{"./lib/loggers":683,"./lib/noop":687,"./lib/push_unique":691,"./plots/attributes":717}],794:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -147884,7 +146331,6 @@ module.exports = function clonePlot(graphObj, options) { var oldLayout = graphObj.layout; var newData = extendDeep([], oldData); var newLayout = extendDeep({}, oldLayout, cloneLayoutOverride(options.tileClass)); - var context = graphObj._context || {}; if(options.width) newLayout.width = options.width; if(options.height) newLayout.height = options.height; @@ -147968,8 +146414,7 @@ module.exports = function clonePlot(graphObj, options) { options.plotGlPixelRatio, displaylogo: options.displaylogo || false, showLink: options.showLink || false, - showTips: options.showTips || false, - mapboxAccessToken: context.mapboxAccessToken + showTips: options.showTips || false } }; @@ -147983,7 +146428,7 @@ module.exports = function clonePlot(graphObj, options) { return plotTile; }; -},{"../lib":685,"../plots/plots":787}],804:[function(require,module,exports){ +},{"../lib":680,"../plots/plots":778}],795:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148049,7 +146494,7 @@ function downloadImage(gd, opts) { module.exports = downloadImage; -},{"../lib":685,"../plot_api/to_image":717,"./filesaver":805}],805:[function(require,module,exports){ +},{"../lib":680,"../plot_api/to_image":712,"./filesaver":796}],796:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148117,7 +146562,7 @@ var fileSaver = function(url, name) { module.exports = fileSaver; -},{}],806:[function(require,module,exports){ +},{}],797:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148150,7 +146595,7 @@ exports.getRedrawFunc = function(gd) { }; }; -},{}],807:[function(require,module,exports){ +},{}],798:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148176,7 +146621,7 @@ var Snapshot = { module.exports = Snapshot; -},{"./cloneplot":803,"./download":804,"./helpers":806,"./svgtoimg":808,"./toimage":809,"./tosvg":810}],808:[function(require,module,exports){ +},{"./cloneplot":794,"./download":795,"./helpers":797,"./svgtoimg":799,"./toimage":800,"./tosvg":801}],799:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148307,7 +146752,7 @@ function svgToImg(opts) { module.exports = svgToImg; -},{"../lib":685,"events":114}],809:[function(require,module,exports){ +},{"../lib":680,"events":111}],800:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148387,7 +146832,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":685,"../plotly":719,"./cloneplot":803,"./helpers":806,"./svgtoimg":808,"./tosvg":810,"events":114}],810:[function(require,module,exports){ +},{"../lib":680,"../plotly":714,"./cloneplot":794,"./helpers":797,"./svgtoimg":799,"./tosvg":801,"events":111}],801:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148506,7 +146951,7 @@ module.exports = function toSVG(gd, format) { return s; }; -},{"../components/color":578,"../components/drawing":602,"../constants/xmlns_namespaces":668,"../lib/svg_text_utils":704,"d3":107}],811:[function(require,module,exports){ +},{"../components/color":575,"../components/drawing":598,"../constants/xmlns_namespaces":664,"../lib/svg_text_utils":699,"d3":104}],802:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148524,7 +146969,6 @@ var mergeArray = require('../../lib').mergeArray; // arrayOk attributes, merge them into calcdata array module.exports = function arraysToCalcdata(cd, trace) { mergeArray(trace.text, cd, 'tx'); - mergeArray(trace.hovertext, cd, 'htx'); var marker = trace.marker; if(marker) { @@ -148539,7 +146983,7 @@ module.exports = function arraysToCalcdata(cd, trace) { } }; -},{"../../lib":685}],812:[function(require,module,exports){ +},{"../../lib":680}],803:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148591,7 +147035,6 @@ module.exports = { dy: scatterAttrs.dy, text: scatterAttrs.text, - hovertext: scatterAttrs.hovertext, textposition: { valType: 'enumerated', @@ -148664,7 +147107,7 @@ module.exports = { } }; -},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/errorbars/attributes":604,"../../lib/extend":677,"../../plots/font_attributes":748,"../scatter/attributes":976}],813:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/errorbars/attributes":600,"../../lib/extend":672,"../../plots/font_attributes":739,"../scatter/attributes":924}],804:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148716,11 +147159,18 @@ module.exports = function calc(gd, trace) { // create the "calculated data" to plot var serieslen = Math.min(pos.length, size.length), - cd = new Array(serieslen); + cd = []; - // set position and size + // set position for(i = 0; i < serieslen; i++) { - cd[i] = { p: pos[i], s: size[i] }; + + // add bars with non-numeric sizes to calcdata + // so that ensure that traces with gaps are + // plotted in the correct order + + if(isNumeric(pos[i])) { + cd.push({p: pos[i]}); + } } // set base @@ -148744,6 +147194,13 @@ module.exports = function calc(gd, trace) { } } + // set size + for(i = 0; i < cd.length; i++) { + if(isNumeric(size[i])) { + cd[i].s = size[i]; + } + } + // auto-z and autocolorscale if applicable if(hasColorscale(trace, 'marker')) { colorscaleCalc(trace, trace.marker.color, 'marker', 'c'); @@ -148757,7 +147214,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"../../plots/cartesian/axes":724,"./arrays_to_calcdata":811,"fast-isnumeric":116}],814:[function(require,module,exports){ +},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"../../plots/cartesian/axes":719,"./arrays_to_calcdata":802,"fast-isnumeric":113}],805:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148797,7 +147254,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('width'); coerce('text'); - coerce('hovertext'); var textPosition = coerce('textposition'); @@ -148817,7 +147273,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, Color.defaultLine, {axis: 'x', inherit: 'y'}); }; -},{"../../components/color":578,"../../components/errorbars/defaults":607,"../../lib":685,"../bar/style_defaults":823,"../scatter/xy_defaults":998,"./attributes":812}],815:[function(require,module,exports){ +},{"../../components/color":575,"../../components/errorbars/defaults":603,"../../lib":680,"../bar/style_defaults":814,"../scatter/xy_defaults":946,"./attributes":803}],806:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148835,56 +147291,41 @@ var Color = require('../../components/color'); module.exports = function hoverPoints(pointData, xval, yval, hovermode) { - var cd = pointData.cd; - var trace = cd[0].trace; - var t = cd[0].t; - var xa = pointData.xa; - var ya = pointData.ya; - - var posVal, thisBarMinPos, thisBarMaxPos, minPos, maxPos, dx, dy; + var cd = pointData.cd, + trace = cd[0].trace, + t = cd[0].t, + xa = pointData.xa, + ya = pointData.ya, + barDelta = (hovermode === 'closest') ? + t.barwidth / 2 : + t.bargroupwidth / 2, + barPos; - var positionFn = function(di) { - return Fx.inbox(minPos(di) - posVal, maxPos(di) - posVal); - }; + if(hovermode !== 'closest') barPos = function(di) { return di.p; }; + else if(trace.orientation === 'h') barPos = function(di) { return di.y; }; + else barPos = function(di) { return di.x; }; + var dx, dy; if(trace.orientation === 'h') { - posVal = yval; - thisBarMinPos = function(di) { return di.y - di.w / 2; }; - thisBarMaxPos = function(di) { return di.y + di.w / 2; }; dx = function(di) { // add a gradient so hovering near the end of a // bar makes it a little closer match return Fx.inbox(di.b - xval, di.x - xval) + (di.x - xval) / (di.x - di.b); }; - dy = positionFn; + dy = function(di) { + var centerPos = barPos(di) - yval; + return Fx.inbox(centerPos - barDelta, centerPos + barDelta); + }; } else { - posVal = xval; - thisBarMinPos = function(di) { return di.x - di.w / 2; }; - thisBarMaxPos = function(di) { return di.x + di.w / 2; }; dy = function(di) { return Fx.inbox(di.b - yval, di.y - yval) + (di.y - yval) / (di.y - di.b); }; - dx = positionFn; - } - - minPos = (hovermode === 'closest') ? - thisBarMinPos : - function(di) { - /* - * In compare mode, accept a bar if you're on it *or* its group. - * Nearly always it's the group that matters, but in case the bar - * was explicitly set wider than its group we'd better accept the - * whole bar. - */ - return Math.min(thisBarMinPos(di), di.p - t.bargroupwidth / 2); - }; - - maxPos = (hovermode === 'closest') ? - thisBarMaxPos : - function(di) { - return Math.max(thisBarMaxPos(di), di.p + t.bargroupwidth / 2); + dx = function(di) { + var centerPos = barPos(di) - xval; + return Fx.inbox(centerPos - barDelta, centerPos + barDelta); }; + } var distfn = Fx.getDistanceFunction(hovermode, dx, dy); Fx.getClosest(cd, distfn, pointData); @@ -148893,8 +147334,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { if(pointData.index === false) return; // the closest data point - var index = pointData.index, - di = cd[index], + var di = cd[pointData.index], mc = di.mcc || trace.marker.color, mlc = di.mlcc || trace.marker.line.color, mlw = di.mlw || trace.marker.line.width; @@ -148906,30 +147346,27 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { pointData.x0 = pointData.x1 = xa.c2p(di.x, true); pointData.xLabelVal = size; - pointData.y0 = ya.c2p(minPos(di), true); - pointData.y1 = ya.c2p(maxPos(di), true); + pointData.y0 = ya.c2p(barPos(di) - barDelta, true); + pointData.y1 = ya.c2p(barPos(di) + barDelta, true); pointData.yLabelVal = di.p; } else { pointData.y0 = pointData.y1 = ya.c2p(di.y, true); pointData.yLabelVal = size; - pointData.x0 = xa.c2p(minPos(di), true); - pointData.x1 = xa.c2p(maxPos(di), true); + pointData.x0 = xa.c2p(barPos(di) - barDelta, true); + pointData.x1 = xa.c2p(barPos(di) + barDelta, true); pointData.xLabelVal = di.p; } - if(di.htx) pointData.text = di.htx; - else if(trace.hovertext) pointData.text = trace.hovertext; - else if(di.tx) pointData.text = di.tx; - else if(trace.text) pointData.text = trace.text; + if(di.tx) pointData.text = di.tx; ErrorBars.hoverInfo(di, trace, pointData); return [pointData]; }; -},{"../../components/color":578,"../../components/errorbars":608,"../../plots/cartesian/graph_interact":733}],816:[function(require,module,exports){ +},{"../../components/color":575,"../../components/errorbars":604,"../../plots/cartesian/graph_interact":726}],807:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -148965,7 +147402,7 @@ Bar.meta = { module.exports = Bar; -},{"../../plots/cartesian":734,"../scatter/colorbar":979,"./arrays_to_calcdata":811,"./attributes":812,"./calc":813,"./defaults":814,"./hover":815,"./layout_attributes":817,"./layout_defaults":818,"./plot":819,"./set_positions":820,"./style":822}],817:[function(require,module,exports){ +},{"../../plots/cartesian":727,"../scatter/colorbar":927,"./arrays_to_calcdata":802,"./attributes":803,"./calc":804,"./defaults":805,"./hover":806,"./layout_attributes":808,"./layout_defaults":809,"./plot":810,"./set_positions":811,"./style":813}],808:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149009,7 +147446,7 @@ module.exports = { } }; -},{}],818:[function(require,module,exports){ +},{}],809:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149067,7 +147504,7 @@ module.exports = function(layoutIn, layoutOut, fullData) { coerce('bargroupgap'); }; -},{"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"./layout_attributes":817}],819:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793,"./layout_attributes":808}],810:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149118,7 +147555,9 @@ module.exports = function plot(gd, plotinfo, cdbar) { var t = d[0].t, trace = d[0].trace, poffset = t.poffset, - poffsetIsArray = Array.isArray(poffset); + poffsetIsArray = Array.isArray(poffset), + barwidth = t.barwidth, + barwidthIsArray = Array.isArray(barwidth); d3.select(this).selectAll('g.point') .data(Lib.identity) @@ -149129,7 +147568,7 @@ module.exports = function plot(gd, plotinfo, cdbar) { // log values go off-screen by plotwidth // so you see them continue if you drag the plot var p0 = di.p + ((poffsetIsArray) ? poffset[i] : poffset), - p1 = p0 + di.w, + p1 = p0 + ((barwidthIsArray) ? barwidth[i] : barwidth), s0 = di.b, s1 = s0 + di.s; @@ -149587,7 +148026,7 @@ function coerceColor(attributeDefinition, value, defaultValue) { attributeDefinition.dflt; } -},{"../../components/color":578,"../../components/drawing":602,"../../components/errorbars":608,"../../lib":685,"../../lib/svg_text_utils":704,"./attributes":812,"d3":107,"fast-isnumeric":116,"tinycolor2":514}],820:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"../../components/errorbars":604,"../../lib":680,"../../lib/svg_text_utils":699,"./attributes":803,"d3":104,"fast-isnumeric":113,"tinycolor2":511}],811:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -149600,7 +148039,6 @@ function coerceColor(attributeDefinition, value, defaultValue) { 'use strict'; var isNumeric = require('fast-isnumeric'); -var BADNUM = require('../../constants/numerical').BADNUM; var Registry = require('../../registry'); var Axes = require('../../plots/cartesian/axes'); @@ -149628,7 +148066,8 @@ module.exports = function setPositions(gd, plotinfo) { fullTrace.visible === true && Registry.traceIs(fullTrace, 'bar') && fullTrace.xaxis === xa._id && - fullTrace.yaxis === ya._id + fullTrace.yaxis === ya._id && + !calcTraces[i][0].placeholder ) { if(fullTrace.orientation === 'h') { calcTracesHorizontal.push(calcTraces[i]); @@ -149778,7 +148217,7 @@ function setGroupPositionsInStackOrRelativeMode(gd, pa, sa, calcTraces) { for(var j = 0; j < calcTrace.length; j++) { var bar = calcTrace[j]; - if(bar.s === BADNUM) continue; + if(!isNumeric(bar.s)) continue; var isOutmostBar = ((bar.b + bar.s) === sieve.get(bar.p, bar.s)); if(isOutmostBar) bar._outmost = true; @@ -149826,7 +148265,7 @@ function setOffsetAndWidth(gd, pa, sieve) { applyAttributes(sieve); // store the bar center in each calcdata item - setBarCenterAndWidth(gd, pa, sieve); + setBarCenter(gd, pa, sieve); // update position axes updatePositionAxis(gd, pa, sieve); @@ -149876,7 +148315,7 @@ function setOffsetAndWidthInGroupMode(gd, pa, sieve) { applyAttributes(sieve); // store the bar center in each calcdata item - setBarCenterAndWidth(gd, pa, sieve); + setBarCenter(gd, pa, sieve); // update position axes updatePositionAxis(gd, pa, sieve, overlap); @@ -149967,7 +148406,7 @@ function applyAttributes(sieve) { } -function setBarCenterAndWidth(gd, pa, sieve) { +function setBarCenter(gd, pa, sieve) { var calcTraces = sieve.traces, pLetter = getAxisLetter(pa); @@ -149982,13 +148421,9 @@ function setBarCenterAndWidth(gd, pa, sieve) { for(var j = 0; j < calcTrace.length; j++) { var calcBar = calcTrace[j]; - // store the actual bar width and position, for use by hover - var width = calcBar.w = (barwidthIsArray) ? barwidth[j] : barwidth; calcBar[pLetter] = calcBar.p + ((poffsetIsArray) ? poffset[j] : poffset) + - width / 2; - - + ((barwidthIsArray) ? barwidth[j] : barwidth) / 2; } } } @@ -150096,7 +148531,7 @@ function stackBars(gd, sa, sieve) { for(j = 0; j < trace.length; j++) { bar = trace[j]; - if(bar.s === BADNUM) continue; + if(!isNumeric(bar.s)) continue; // stack current bar and get previous sum var barBase = sieve.put(bar.p, bar.b + bar.s), @@ -150127,7 +148562,7 @@ function sieveBars(gd, sa, sieve) { for(var j = 0; j < trace.length; j++) { var bar = trace[j]; - if(bar.s !== BADNUM) sieve.put(bar.p, bar.b + bar.s); + if(isNumeric(bar.s)) sieve.put(bar.p, bar.b + bar.s); } } } @@ -150163,7 +148598,7 @@ function normalizeBars(gd, sa, sieve) { for(var j = 0; j < trace.length; j++) { var bar = trace[j]; - if(bar.s === BADNUM) continue; + if(!isNumeric(bar.s)) continue; var scale = Math.abs(sTop / sieve.get(bar.p, bar.s)); bar.b *= scale; @@ -150187,7 +148622,7 @@ function getAxisLetter(ax) { return ax._id.charAt(0); } -},{"../../constants/numerical":666,"../../plots/cartesian/axes":724,"../../registry":802,"./sieve.js":821,"fast-isnumeric":116}],821:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"../../registry":793,"./sieve.js":812,"fast-isnumeric":113}],812:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150201,7 +148636,6 @@ function getAxisLetter(ax) { module.exports = Sieve; var Lib = require('../../lib'); -var BADNUM = require('../../constants/numerical').BADNUM; /** * Helper class to sieve data from traces into bins @@ -150225,7 +148659,7 @@ function Sieve(traces, separateNegativeValues, dontMergeOverlappingData) { var trace = traces[i]; for(var j = 0; j < trace.length; j++) { var bar = trace[j]; - if(bar.p !== BADNUM) positions.push(bar.p); + positions.push(bar.p); } } this.positions = positions; @@ -150289,7 +148723,7 @@ Sieve.prototype.getLabel = function getLabel(position, value) { return prefix + label; }; -},{"../../constants/numerical":666,"../../lib":685}],822:[function(require,module,exports){ +},{"../../lib":680}],813:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150367,7 +148801,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/color":578,"../../components/drawing":602,"../../components/errorbars":608,"d3":107}],823:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"../../components/errorbars":604,"d3":104}],814:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150404,7 +148838,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, default coerce('marker.line.width'); }; -},{"../../components/color":578,"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591}],824:[function(require,module,exports){ +},{"../../components/color":575,"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588}],815:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150537,7 +148971,7 @@ module.exports = { fillcolor: scatterAttrs.fillcolor }; -},{"../../components/color/attributes":577,"../../lib/extend":677,"../scatter/attributes":976}],825:[function(require,module,exports){ +},{"../../components/color/attributes":574,"../../lib/extend":672,"../scatter/attributes":924}],816:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150686,7 +149120,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../lib":685,"../../plots/cartesian/axes":724,"fast-isnumeric":116}],826:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"fast-isnumeric":113}],817:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150759,7 +149193,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/color":578,"../../lib":685,"../../registry":802,"./attributes":824}],827:[function(require,module,exports){ +},{"../../components/color":575,"../../lib":680,"../../registry":793,"./attributes":815}],818:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150868,7 +149302,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return closeData; }; -},{"../../components/color":578,"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733}],828:[function(require,module,exports){ +},{"../../components/color":575,"../../lib":680,"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726}],819:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150901,7 +149335,7 @@ Box.meta = { module.exports = Box; -},{"../../plots/cartesian":734,"./attributes":824,"./calc":825,"./defaults":826,"./hover":827,"./layout_attributes":829,"./layout_defaults":830,"./plot":831,"./set_positions":832,"./style":833}],829:[function(require,module,exports){ +},{"../../plots/cartesian":727,"./attributes":815,"./calc":816,"./defaults":817,"./hover":818,"./layout_attributes":820,"./layout_defaults":821,"./plot":822,"./set_positions":823,"./style":824}],820:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150939,7 +149373,7 @@ module.exports = { } }; -},{}],830:[function(require,module,exports){ +},{}],821:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -150973,7 +149407,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { coerce('boxgroupgap'); }; -},{"../../lib":685,"../../registry":802,"./layout_attributes":829}],831:[function(require,module,exports){ +},{"../../lib":680,"../../registry":793,"./layout_attributes":820}],822:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151213,7 +149647,7 @@ module.exports = function plot(gd, plotinfo, cdbox) { }); }; -},{"../../components/drawing":602,"../../lib":685,"d3":107}],832:[function(require,module,exports){ +},{"../../components/drawing":598,"../../lib":680,"d3":104}],823:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151307,7 +149741,7 @@ module.exports = function setPositions(gd, plotinfo) { } }; -},{"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802}],833:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793}],824:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151346,7 +149780,7 @@ module.exports = function style(gd) { }); }; -},{"../../components/color":578,"../../components/drawing":602,"d3":107}],834:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"d3":104}],825:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151399,7 +149833,7 @@ module.exports = { whiskerwidth: Lib.extendFlat({}, boxAttrs.whiskerwidth, { dflt: 0 }) }; -},{"../../lib":685,"../box/attributes":824,"../ohlc/attributes":943}],835:[function(require,module,exports){ +},{"../../lib":680,"../box/attributes":815,"../ohlc/attributes":891}],826:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151447,7 +149881,7 @@ function handleDirection(traceIn, traceOut, coerce, direction) { coerce(direction + '.fillcolor'); } -},{"../../lib":685,"../ohlc/direction_defaults":945,"../ohlc/helpers":946,"../ohlc/ohlc_defaults":948,"./attributes":834}],836:[function(require,module,exports){ +},{"../../lib":680,"../ohlc/direction_defaults":893,"../ohlc/helpers":894,"../ohlc/ohlc_defaults":896,"./attributes":825}],827:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151477,7 +149911,7 @@ module.exports = { register(require('../box')); register(require('./transform')); -},{"../../plot_api/register":714,"../../plots/cartesian":734,"../box":828,"./attributes":834,"./defaults":835,"./transform":837}],837:[function(require,module,exports){ +},{"../../plot_api/register":709,"../../plots/cartesian":727,"../box":819,"./attributes":825,"./defaults":826,"./transform":828}],828:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -151605,3417 +150039,7 @@ exports.calcTransform = function calcTransform(gd, trace, opts) { trace.y = y; }; -},{"../../lib":685,"../ohlc/helpers":946}],838:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var handleAxisDefaults = require('./axis_defaults'); - -module.exports = function handleABDefaults(traceIn, traceOut, fullLayout, coerce, dfltColor) { - var a = coerce('a'); - - if(!a) { - coerce('da'); - coerce('a0'); - } - - var b = coerce('b'); - - if(!b) { - coerce('db'); - coerce('b0'); - } - - mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor); - - return; -}; - -function mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor) { - var axesList = ['aaxis', 'baxis']; - - axesList.forEach(function(axName) { - var axLetter = axName.charAt(0); - var axIn = traceIn[axName] || {}; - var axOut = {}; - - var defaultOptions = { - tickfont: 'x', - id: axLetter + 'axis', - letter: axLetter, - font: traceOut.font, - name: axName, - data: traceIn[axLetter], - calendar: traceOut.calendar, - dfltColor: dfltColor, - bgColor: fullLayout.paper_bgcolor, - fullLayout: fullLayout - }; - - handleAxisDefaults(axIn, axOut, defaultOptions); - - axOut._categories = axOut._categories || []; - - traceOut[axName] = axOut; - - // so we don't have to repeat autotype unnecessarily, - // copy an autotype back to traceIn - if(!traceIn[axName] && axIn.type !== '-') { - traceIn[axName] = {type: axIn.type}; - } - }); -} - -},{"./axis_defaults":843}],839:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = function(a) { - return minMax(a, 0); -}; - -function minMax(a, depth) { - // Limit to ten dimensional datasets. This seems *exceedingly* unlikely to - // ever cause problems or even be a concern. It's include strictly so that - // circular arrays could never cause this to loop. - if(!Array.isArray(a) || depth >= 10) { - return null; - } - - var min = Infinity; - var max = -Infinity; - var n = a.length; - for(var i = 0; i < n; i++) { - var datum = a[i]; - - if(Array.isArray(datum)) { - var result = minMax(datum, depth + 1); - - if(result) { - min = Math.min(result[0], min); - max = Math.max(result[1], max); - } - } else { - min = Math.min(datum, min); - max = Math.max(datum, max); - } - } - - return [min, max]; -} - -},{}],840:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var extendFlat = require('../../lib/extend').extendFlat; -var fontAttrs = require('../../plots/font_attributes'); -var axisAttrs = require('./axis_attributes'); -var colorAttrs = require('../../components/color/attributes'); - -module.exports = { - carpet: { - valType: 'string', - - - }, - x: { - valType: 'data_array', - - }, - y: { - valType: 'data_array', - - }, - a: { - valType: 'data_array', - - }, - a0: { - valType: 'number', - dflt: 0, - - - }, - da: { - valType: 'number', - dflt: 1, - - - }, - b: { - valType: 'data_array', - - }, - b0: { - valType: 'number', - dflt: 0, - - - }, - db: { - valType: 'number', - dflt: 1, - - - }, - cheaterslope: { - valType: 'number', - - dflt: 1, - - }, - aaxis: extendFlat({}, axisAttrs), - baxis: extendFlat({}, axisAttrs), - font: { - family: extendFlat({}, fontAttrs.family, { - dflt: '"Open Sans", verdana, arial, sans-serif' - }), - size: extendFlat({}, fontAttrs.size, { - dflt: 12 - }), - color: extendFlat({}, fontAttrs.color, { - dflt: colorAttrs.defaultLine - }), - }, - color: { - valType: 'color', - dflt: colorAttrs.defaultLine, - - - }, -}; - -},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/font_attributes":748,"./axis_attributes":842}],841:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* This function retrns a set of control points that define a curve aligned along - * either the a or b axis. Exactly one of a or b must be an array defining the range - * spanned. - * - * Honestly this is the most complicated function I've implemente here so far because - * of the way it handles knot insertion and direction/axis-agnostic slices. - */ -module.exports = function(carpet, carpetcd, a, b) { - var idx, tangent, tanIsoIdx, tanIsoPar, segment, refidx; - var p0, p1, v0, v1, start, end, range; - - var axis = Array.isArray(a) ? 'a' : 'b'; - var ax = axis === 'a' ? carpet.aaxis : carpet.baxis; - var smoothing = ax.smoothing; - var toIdx = axis === 'a' ? carpet.a2i : carpet.b2j; - var pt = axis === 'a' ? a : b; - var iso = axis === 'a' ? b : a; - var n = axis === 'a' ? carpetcd.a.length : carpetcd.b.length; - var m = axis === 'a' ? carpetcd.b.length : carpetcd.a.length; - var isoIdx = Math.floor(axis === 'a' ? carpet.b2j(iso) : carpet.a2i(iso)); - - var xy = axis === 'a' ? function(value) { - return carpet.evalxy([], value, isoIdx); - } : function(value) { - return carpet.evalxy([], isoIdx, value); - }; - - if(smoothing) { - tanIsoIdx = Math.max(0, Math.min(m - 2, isoIdx)); - tanIsoPar = isoIdx - tanIsoIdx; - tangent = axis === 'a' ? function(i, ti) { - return carpet.dxydi([], i, tanIsoIdx, ti, tanIsoPar); - } : function(j, tj) { - return carpet.dxydj([], tanIsoIdx, j, tanIsoPar, tj); - }; - } - - var vstart = toIdx(pt[0]); - var vend = toIdx(pt[1]); - - // So that we can make this work in two directions, flip all of the - // math functions if the direction is from higher to lower indices: - // - // Note that the tolerance is directional! - var dir = vstart < vend ? 1 : -1; - var tol = (vend - vstart) * 1e-8; - var dirfloor = dir > 0 ? Math.floor : Math.ceil; - var dirceil = dir > 0 ? Math.ceil : Math.floor; - var dirmin = dir > 0 ? Math.min : Math.max; - var dirmax = dir > 0 ? Math.max : Math.min; - - var idx0 = dirfloor(vstart + tol); - var idx1 = dirceil(vend - tol); - - p0 = xy(vstart); - var segments = [[p0]]; - - for(idx = idx0; idx * dir < idx1 * dir; idx += dir) { - segment = []; - start = dirmax(vstart, idx); - end = dirmin(vend, idx + dir); - range = end - start; - - // In order to figure out which cell we're in for the derivative (remember, - // the derivatives are *not* constant across grid lines), let's just average - // the start and end points. This cuts out just a tiny bit of logic and - // there's really no computational difference: - refidx = Math.max(0, Math.min(n - 2, Math.floor(0.5 * (start + end)))); - - p1 = xy(end); - if(smoothing) { - v0 = tangent(refidx, start - refidx); - v1 = tangent(refidx, end - refidx); - - segment.push([ - p0[0] + v0[0] / 3 * range, - p0[1] + v0[1] / 3 * range - ]); - - segment.push([ - p1[0] - v1[0] / 3 * range, - p1[1] - v1[1] / 3 * range - ]); - } - - segment.push(p1); - - segments.push(segment); - p0 = p1; - } - - return segments; -}; - -},{}],842:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var extendFlat = require('../../lib/extend').extendFlat; -var fontAttrs = require('../../plots/font_attributes'); -var colorAttrs = require('../../components/color/attributes'); - -module.exports = { - color: { - valType: 'color', - - - }, - smoothing: { - valType: 'number', - dflt: 1, - min: 0, - max: 1.3, - - }, - title: { - valType: 'string', - - - }, - titlefont: extendFlat({}, fontAttrs, { - - }), - titleoffset: { - valType: 'number', - - dflt: 10, - - }, - type: { - valType: 'enumerated', - // '-' means we haven't yet run autotype or couldn't find any data - // it gets turned into linear in gd._fullLayout but not copied back - // to gd.data like the others are. - values: ['-', 'linear', 'date', 'category'], - dflt: '-', - - - }, - autorange: { - valType: 'enumerated', - values: [true, false, 'reversed'], - dflt: true, - - - }, - rangemode: { - valType: 'enumerated', - values: ['normal', 'tozero', 'nonnegative'], - dflt: 'normal', - - - }, - range: { - valType: 'info_array', - - items: [ - {valType: 'any'}, - {valType: 'any'} - ], - - }, - - fixedrange: { - valType: 'boolean', - dflt: false, - - - }, - cheatertype: { - valType: 'enumerated', - values: ['index', 'value'], - dflt: 'value', - - }, - tickmode: { - valType: 'enumerated', - values: ['linear', 'array'], - dflt: 'array', - - }, - nticks: { - valType: 'integer', - min: 0, - dflt: 0, - - - }, - tickvals: { - valType: 'data_array', - - }, - ticktext: { - valType: 'data_array', - - }, - showticklabels: { - valType: 'enumerated', - values: ['start', 'end', 'both', 'none'], - dflt: 'start', - - - }, - tickfont: extendFlat({}, fontAttrs, { - - }), - tickangle: { - valType: 'angle', - dflt: 'auto', - - - }, - tickprefix: { - valType: 'string', - dflt: '', - - - }, - showtickprefix: { - valType: 'enumerated', - values: ['all', 'first', 'last', 'none'], - dflt: 'all', - - - }, - ticksuffix: { - valType: 'string', - dflt: '', - - - }, - showticksuffix: { - valType: 'enumerated', - values: ['all', 'first', 'last', 'none'], - dflt: 'all', - - - }, - showexponent: { - valType: 'enumerated', - values: ['all', 'first', 'last', 'none'], - dflt: 'all', - - - }, - exponentformat: { - valType: 'enumerated', - values: ['none', 'e', 'E', 'power', 'SI', 'B'], - dflt: 'B', - - - }, - separatethousands: { - valType: 'boolean', - dflt: false, - - - }, - tickformat: { - valType: 'string', - dflt: '', - - - }, - categoryorder: { - valType: 'enumerated', - values: [ - 'trace', 'category ascending', 'category descending', 'array' - /* , 'value ascending', 'value descending'*/ // value ascending / descending to be implemented later - ], - dflt: 'trace', - - - }, - categoryarray: { - valType: 'data_array', - - - }, - labelpadding: { - valType: 'integer', - - dflt: 10, - - }, - labelprefix: { - valType: 'string', - - - }, - labelsuffix: { - valType: 'string', - dflt: '', - - - }, - // lines and grids - showline: { - valType: 'boolean', - dflt: false, - - - }, - linecolor: { - valType: 'color', - dflt: colorAttrs.defaultLine, - - - }, - linewidth: { - valType: 'number', - min: 0, - dflt: 1, - - - }, - gridcolor: { - valType: 'color', - - - }, - gridwidth: { - valType: 'number', - min: 0, - dflt: 1, - - - }, - showgrid: { - valType: 'boolean', - - dflt: true, - - }, - minorgridcount: { - valType: 'integer', - min: 0, - dflt: 0, - - - }, - minorgridwidth: { - valType: 'number', - min: 0, - dflt: 1, - - - }, - minorgridcolor: { - valType: 'color', - dflt: colorAttrs.lightLine, - - - }, - startline: { - valType: 'boolean', - - - }, - startlinecolor: { - valType: 'color', - - - }, - startlinewidth: { - valType: 'number', - dflt: 1, - - - }, - endline: { - valType: 'boolean', - - - }, - endlinewidth: { - valType: 'number', - dflt: 1, - - - }, - endlinecolor: { - valType: 'color', - - - }, - tick0: { - valType: 'number', - min: 0, - dflt: 0, - - - }, - dtick: { - valType: 'number', - min: 0, - dflt: 1, - - - }, - arraytick0: { - valType: 'integer', - min: 0, - dflt: 0, - - - }, - arraydtick: { - valType: 'integer', - min: 1, - dflt: 1, - - - }, -}; - -},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/font_attributes":748}],843:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var carpetAttrs = require('./attributes'); - -var addOpacity = require('../../components/color').addOpacity; -var Registry = require('../../registry'); -var Lib = require('../../lib'); -var handleTickValueDefaults = require('../../plots/cartesian/tick_value_defaults'); -var handleTickLabelDefaults = require('../../plots/cartesian/tick_label_defaults'); -var handleCategoryOrderDefaults = require('../../plots/cartesian/category_order_defaults'); -var setConvert = require('../../plots/cartesian/set_convert'); -var orderedCategories = require('../../plots/cartesian/ordered_categories'); -var autoType = require('../../plots/cartesian/axis_autotype'); - -/** - * options: object containing: - * - * letter: 'x' or 'y' - * title: name of the axis (ie 'Colorbar') to go in default title - * name: axis object name (ie 'xaxis') if one should be stored - * font: the default font to inherit - * outerTicks: boolean, should ticks default to outside? - * showGrid: boolean, should gridlines be shown by default? - * noHover: boolean, this axis doesn't support hover effects? - * data: the plot data to use in choosing auto type - * bgColor: the plot background color, to calculate default gridline colors - */ -module.exports = function handleAxisDefaults(containerIn, containerOut, options) { - var letter = options.letter, - font = options.font || {}, - attributes = carpetAttrs[letter + 'axis']; - - options.noHover = true; - - function coerce(attr, dflt) { - return Lib.coerce(containerIn, containerOut, attributes, attr, dflt); - } - - function coerce2(attr, dflt) { - return Lib.coerce2(containerIn, containerOut, attributes, attr, dflt); - } - - // set up some private properties - if(options.name) { - containerOut._name = options.name; - containerOut._id = options.name; - } - - // now figure out type and do some more initialization - var axType = coerce('type'); - if(axType === '-') { - if(options.data) setAutoType(containerOut, options.data); - - if(containerOut.type === '-') { - containerOut.type = 'linear'; - } - else { - // copy autoType back to input axis - // note that if this object didn't exist - // in the input layout, we have to put it in - // this happens in the main supplyDefaults function - axType = containerIn.type = containerOut.type; - } - } - - coerce('smoothing'); - coerce('cheatertype'); - - coerce('showticklabels'); - coerce('labelprefix', letter + ' = '); - coerce('labelsuffix'); - coerce('showtickprefix'); - coerce('showticksuffix'); - - coerce('separatethousands'); - coerce('tickformat'); - coerce('exponentformat'); - coerce('showexponent'); - coerce('categoryorder'); - - coerce('tickmode'); - coerce('tickvals'); - coerce('ticktext'); - coerce('tick0'); - coerce('dtick'); - - if(containerOut.tickmode === 'array') { - coerce('arraytick0'); - coerce('arraydtick'); - } - - coerce('labelpadding'); - - containerOut._hovertitle = letter; - - - if(axType === 'date') { - var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleDefaults'); - handleCalendarDefaults(containerIn, containerOut, 'calendar', options.calendar); - } - - setConvert(containerOut, options.fullLayout); - - var dfltColor = coerce('color', options.dfltColor); - // if axis.color was provided, use it for fonts too; otherwise, - // inherit from global font color in case that was provided. - var dfltFontColor = (dfltColor === containerIn.color) ? dfltColor : font.color; - - coerce('title'); - Lib.coerceFont(coerce, 'titlefont', { - family: font.family, - size: Math.round(font.size * 1.2), - color: dfltFontColor - }); - - coerce('titleoffset'); - - coerce('tickangle'); - - var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range)); - - if(autoRange) coerce('rangemode'); - - coerce('range'); - containerOut.cleanRange(); - - coerce('fixedrange'); - - handleTickValueDefaults(containerIn, containerOut, coerce, axType); - handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options); - handleCategoryOrderDefaults(containerIn, containerOut, coerce); - - var gridColor = coerce2('gridcolor', addOpacity(dfltColor, 0.3)); - var gridWidth = coerce2('gridwidth'); - var showGrid = coerce('showgrid'); - - if(!showGrid) { - delete containerOut.gridcolor; - delete containerOut.gridwidth; - } - - var startLineColor = coerce2('startlinecolor', dfltColor); - var startLineWidth = coerce2('startlinewidth', gridWidth); - var showStartLine = coerce('startline', containerOut.showgrid || !!startLineColor || !!startLineWidth); - - if(!showStartLine) { - delete containerOut.startlinecolor; - delete containerOut.startlinewidth; - } - - var endLineColor = coerce2('endlinecolor', dfltColor); - var endLineWidth = coerce2('endlinewidth', gridWidth); - var showEndLine = coerce('endline', containerOut.showgrid || !!endLineColor || !!endLineWidth); - - if(!showEndLine) { - delete containerOut.endlinecolor; - delete containerOut.endlinewidth; - } - - if(!showGrid) { - delete containerOut.gridcolor; - delete containerOut.gridWidth; - } else { - coerce('minorgridcount'); - coerce('minorgridwidth', gridWidth); - coerce('minorgridcolor', addOpacity(gridColor, 0.06)); - - if(!containerOut.minorgridcount) { - delete containerOut.minorgridwidth; - delete containerOut.minorgridcolor; - } - } - - containerOut._separators = options.fullLayout.separators; - - // fill in categories - containerOut._initialCategories = axType === 'category' ? - orderedCategories(letter, containerOut.categoryorder, containerOut.categoryarray, options.data) : - []; - - if(containerOut.showticklabels === 'none') { - delete containerOut.tickfont; - delete containerOut.tickangle; - delete containerOut.showexponent; - delete containerOut.exponentformat; - delete containerOut.tickformat; - delete containerOut.showticksuffix; - delete containerOut.showtickprefix; - } - - if(!containerOut.showticksuffix) { - delete containerOut.ticksuffix; - } - - if(!containerOut.showtickprefix) { - delete containerOut.tickprefix; - } - - // It needs to be coerced, then something above overrides this deep in the axis code, - // but no, we *actually* want to coerce this. - coerce('tickmode'); - - if(!containerOut.title || (containerOut.title && containerOut.title.length === 0)) { - delete containerOut.titlefont; - delete containerOut.titleoffset; - } - - return containerOut; -}; - -function setAutoType(ax, data) { - // new logic: let people specify any type they want, - // only autotype if type is '-' - if(ax.type !== '-') return; - - var id = ax._id, - axLetter = id.charAt(0); - - var calAttr = axLetter + 'calendar', - calendar = ax[calAttr]; - - ax.type = autoType(data, calendar); -} - -},{"../../components/color":578,"../../lib":685,"../../plots/cartesian/axis_autotype":725,"../../plots/cartesian/category_order_defaults":728,"../../plots/cartesian/ordered_categories":737,"../../plots/cartesian/set_convert":741,"../../plots/cartesian/tick_label_defaults":742,"../../plots/cartesian/tick_value_defaults":744,"../../registry":802,"./attributes":840}],844:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Axes = require('../../plots/cartesian/axes'); -var cheaterBasis = require('./cheater_basis'); -var arrayMinmax = require('./array_minmax'); -var map2dArray = require('./map_2d_array'); -var calcGridlines = require('./calc_gridlines'); -var calcLabels = require('./calc_labels'); -var calcClipPath = require('./calc_clippath'); -var clean2dArray = require('../heatmap/clean_2d_array'); -var smoothFill2dArray = require('./smooth_fill_2d_array'); - -module.exports = function calc(gd, trace) { - var xa = Axes.getFromId(gd, trace.xaxis || 'x'); - var ya = Axes.getFromId(gd, trace.yaxis || 'y'); - var aax = trace.aaxis; - var bax = trace.baxis; - var a = trace._a = trace.a; - var b = trace._b = trace.b; - - var t = {}; - var x; - var y = trace.y; - - if(trace._cheater) { - var avals = aax.cheatertype === 'index' ? a.length : a; - var bvals = bax.cheatertype === 'index' ? b.length : b; - trace.x = x = cheaterBasis(avals, bvals, trace.cheaterslope); - } else { - x = trace.x; - } - - trace._x = trace.x = x = clean2dArray(x); - trace._y = trace.y = y = clean2dArray(y); - - // Fill in any undefined values with elliptic smoothing. This doesn't take - // into account the spacing of the values. That is, the derivatives should - // be modified to use a and b values. It's not that hard, but this is already - // moderate overkill for just filling in missing values. - smoothFill2dArray(x, a, b); - smoothFill2dArray(y, a, b); - - // create conversion functions that depend on the data - trace.setScale(); - - // Convert cartesian-space x/y coordinates to screen space pixel coordinates: - t.xp = trace.xp = map2dArray(trace.xp, x, xa.c2p); - t.yp = trace.yp = map2dArray(trace.yp, y, ya.c2p); - - // This is a rather expensive scan. Nothing guarantees monotonicity, - // so we need to scan through all data to get proper ranges: - var xrange = arrayMinmax(x); - var yrange = arrayMinmax(y); - - var dx = 0.5 * (xrange[1] - xrange[0]); - var xc = 0.5 * (xrange[1] + xrange[0]); - - var dy = 0.5 * (yrange[1] - yrange[0]); - var yc = 0.5 * (yrange[1] + yrange[0]); - - // Expand the axes to fit the plot, except just grow it by a factor of 1.3 - // because the labels should be taken into account except that's difficult - // hence 1.3. - var grow = 1.3; - xrange = [xc - dx * grow, xc + dx * grow]; - yrange = [yc - dy * grow, yc + dy * grow]; - - Axes.expand(xa, xrange, {padded: true}); - Axes.expand(ya, yrange, {padded: true}); - - // Enumerate the gridlines, both major and minor, and store them on the trace - // object: - calcGridlines(trace, t, 'a', 'b'); - calcGridlines(trace, t, 'b', 'a'); - - // Calculate the text labels for each major gridline and store them on the - // trace object: - calcLabels(trace, aax); - calcLabels(trace, bax); - - // Tabulate points for the four segments that bound the axes so that we can - // map to pixel coordinates in the plot function and create a clip rect: - t.clipsegments = calcClipPath(trace.xctrl, trace.yctrl, aax, bax); - - t.x = x; - t.y = y; - t.a = a; - t.b = b; - - return [t]; -}; - -},{"../../plots/cartesian/axes":724,"../heatmap/clean_2d_array":905,"./array_minmax":839,"./calc_clippath":845,"./calc_gridlines":846,"./calc_labels":847,"./cheater_basis":849,"./map_2d_array":861,"./smooth_fill_2d_array":865}],845:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -module.exports = function makeClipPath(xctrl, yctrl, aax, bax) { - var i, x, y; - var segments = []; - - var asmoothing = !!aax.smoothing; - var bsmoothing = !!bax.smoothing; - var nea1 = xctrl[0].length - 1; - var neb1 = xctrl.length - 1; - - // Along the lower a axis: - for(i = 0, x = [], y = []; i <= nea1; i++) { - x[i] = xctrl[0][i]; - y[i] = yctrl[0][i]; - } - segments.push({x: x, y: y, bicubic: asmoothing}); - - // Along the upper b axis: - for(i = 0, x = [], y = []; i <= neb1; i++) { - x[i] = xctrl[i][nea1]; - y[i] = yctrl[i][nea1]; - } - segments.push({x: x, y: y, bicubic: bsmoothing}); - - // Backwards along the upper a axis: - for(i = nea1, x = [], y = []; i >= 0; i--) { - x[nea1 - i] = xctrl[neb1][i]; - y[nea1 - i] = yctrl[neb1][i]; - } - segments.push({x: x, y: y, bicubic: asmoothing}); - - // Backwards along the lower b axis: - for(i = neb1, x = [], y = []; i >= 0; i--) { - x[neb1 - i] = xctrl[i][0]; - y[neb1 - i] = yctrl[i][0]; - } - segments.push({x: x, y: y, bicubic: bsmoothing}); - - return segments; -}; - -},{}],846:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Axes = require('../../plots/cartesian/axes'); -var extendFlat = require('../../lib/extend').extendFlat; - -module.exports = function calcGridlines(trace, cd, axisLetter, crossAxisLetter) { - var i, j, j0; - var eps, bounds, n1, n2, n, value, v; - var j1, v0, v1, d; - - var data = trace[axisLetter]; - var axis = trace[axisLetter + 'axis']; - - var gridlines = axis._gridlines = []; - var minorgridlines = axis._minorgridlines = []; - var boundarylines = axis._boundarylines = []; - - var crossData = trace[crossAxisLetter]; - var crossAxis = trace[crossAxisLetter + 'axis']; - - if(axis.tickmode === 'array') { - axis.tickvals = []; - for(i = 0; i < data.length; i++) { - axis.tickvals.push(data[i]); - } - } - - var xcp = trace.xctrl; - var ycp = trace.yctrl; - var nea = xcp[0].length; - var neb = xcp.length; - var na = trace.a.length; - var nb = trace.b.length; - - Axes.calcTicks(axis); - - // The default is an empty array that will cause the join to remove the gridline if - // it's just disappeared: - // axis._startline = axis._endline = []; - - // If the cross axis uses bicubic interpolation, then the grid - // lines fall once every three expanded grid row/cols: - var stride = axis.smoothing ? 3 : 1; - - function constructValueGridline(value) { - var i, j, j0, tj, pxy, i0, ti, xy, dxydi0, dxydi1, dxydj0, dxydj1; - var xpoints = []; - var ypoints = []; - var ret = {}; - // Search for the fractional grid index giving this line: - if(axisLetter === 'b') { - // For the position we use just the i-j coordinates: - j = trace.b2j(value); - - // The derivatives for catmull-rom splines are discontinuous across cell - // boundaries though, so we need to provide both the cell and the position - // within the cell separately: - j0 = Math.floor(Math.max(0, Math.min(nb - 2, j))); - tj = j - j0; - - ret.length = nb; - ret.crossLength = na; - - ret.xy = function(i) { - return trace.evalxy([], i, j); - }; - - ret.dxy = function(i0, ti) { - return trace.dxydi([], i0, j0, ti, tj); - }; - - for(i = 0; i < na; i++) { - i0 = Math.min(na - 2, i); - ti = i - i0; - xy = trace.evalxy([], i, j); - - if(crossAxis.smoothing && i > 0) { - // First control point: - dxydi0 = trace.dxydi([], i - 1, j0, 0, tj); - xpoints.push(pxy[0] + dxydi0[0] / 3); - ypoints.push(pxy[1] + dxydi0[1] / 3); - - // Second control point: - dxydi1 = trace.dxydi([], i - 1, j0, 1, tj); - xpoints.push(xy[0] - dxydi1[0] / 3); - ypoints.push(xy[1] - dxydi1[1] / 3); - } - - xpoints.push(xy[0]); - ypoints.push(xy[1]); - - pxy = xy; - } - } else { - i = trace.a2i(value); - i0 = Math.floor(Math.max(0, Math.min(na - 2, i))); - ti = i - i0; - - ret.length = na; - ret.crossLength = nb; - - ret.xy = function(j) { - return trace.evalxy([], i, j); - }; - - ret.dxy = function(j0, tj) { - return trace.dxydj([], i0, j0, ti, tj); - }; - - for(j = 0; j < nb; j++) { - j0 = Math.min(nb - 2, j); - tj = j - j0; - xy = trace.evalxy([], i, j); - - if(crossAxis.smoothing && j > 0) { - // First control point: - dxydj0 = trace.dxydj([], i0, j - 1, ti, 0); - xpoints.push(pxy[0] + dxydj0[0] / 3); - ypoints.push(pxy[1] + dxydj0[1] / 3); - - // Second control point: - dxydj1 = trace.dxydj([], i0, j - 1, ti, 1); - xpoints.push(xy[0] - dxydj1[0] / 3); - ypoints.push(xy[1] - dxydj1[1] / 3); - } - - xpoints.push(xy[0]); - ypoints.push(xy[1]); - - pxy = xy; - } - } - - ret.axisLetter = axisLetter; - ret.axis = axis; - ret.crossAxis = crossAxis; - ret.value = value; - ret.constvar = crossAxisLetter; - ret.index = n; - ret.x = xpoints; - ret.y = ypoints; - ret.smoothing = crossAxis.smoothing; - - return ret; - } - - function constructArrayGridline(idx) { - var j, i0, j0, ti, tj; - var xpoints = []; - var ypoints = []; - var ret = {}; - ret.length = data.length; - ret.crossLength = crossData.length; - - if(axisLetter === 'b') { - j0 = Math.max(0, Math.min(nb - 2, idx)); - tj = Math.min(1, Math.max(0, idx - j0)); - - ret.xy = function(i) { - return trace.evalxy([], i, idx); - }; - - ret.dxy = function(i0, ti) { - return trace.dxydi([], i0, j0, ti, tj); - }; - - // In the tickmode: array case, this operation is a simple - // transfer of data: - for(j = 0; j < nea; j++) { - xpoints[j] = xcp[idx * stride][j]; - ypoints[j] = ycp[idx * stride][j]; - } - } else { - i0 = Math.max(0, Math.min(na - 2, idx)); - ti = Math.min(1, Math.max(0, idx - i0)); - - ret.xy = function(j) { - return trace.evalxy([], idx, j); - }; - - ret.dxy = function(j0, tj) { - return trace.dxydj([], i0, j0, ti, tj); - }; - - // In the tickmode: array case, this operation is a simple - // transfer of data: - for(j = 0; j < neb; j++) { - xpoints[j] = xcp[j][idx * stride]; - ypoints[j] = ycp[j][idx * stride]; - } - } - - ret.axisLetter = axisLetter; - ret.axis = axis; - ret.crossAxis = crossAxis; - ret.value = data[idx]; - ret.constvar = crossAxisLetter; - ret.index = idx; - ret.x = xpoints; - ret.y = ypoints; - ret.smoothing = crossAxis.smoothing; - - return ret; - } - - if(axis.tickmode === 'array') { - // var j0 = axis.startline ? 1 : 0; - // var j1 = data.length - (axis.endline ? 1 : 0); - - eps = 5e-15; - bounds = [ - Math.floor(((data.length - 1) - axis.arraytick0) / axis.arraydtick * (1 + eps)), - Math.ceil((- axis.arraytick0) / axis.arraydtick / (1 + eps)) - ].sort(function(a, b) {return a - b;}); - - // Unpack sorted values so we can be sure to avoid infinite loops if something - // is backwards: - n1 = bounds[0] - 1; - n2 = bounds[1] + 1; - - // If the axes fall along array lines, then this is a much simpler process since - // we already have all the control points we need - for(n = n1; n < n2; n++) { - j = axis.arraytick0 + axis.arraydtick * n; - if(j < 0 || j > data.length - 1) continue; - gridlines.push(extendFlat(constructArrayGridline(j), { - color: axis.gridcolor, - width: axis.gridwidth - })); - } - - for(n = n1; n < n2; n++) { - j0 = axis.arraytick0 + axis.arraydtick * n; - j1 = Math.min(j0 + axis.arraydtick, data.length - 1); - - // TODO: fix the bounds computation so we don't have to do a large range and then throw - // out unneeded numbers - if(j0 < 0 || j0 > data.length - 1) continue; - if(j1 < 0 || j1 > data.length - 1) continue; - - v0 = data[j0]; - v1 = data[j1]; - - for(i = 0; i < axis.minorgridcount; i++) { - d = j1 - j0; - - // TODO: fix the bounds computation so we don't have to do a large range and then throw - // out unneeded numbers - if(d <= 0) continue; - - // XXX: This calculation isn't quite right. Off by one somewhere? - v = v0 + (v1 - v0) * (i + 1) / (axis.minorgridcount + 1) * (axis.arraydtick / d); - - // TODO: fix the bounds computation so we don't have to do a large range and then throw - // out unneeded numbers - if(v < data[0] || v > data[data.length - 1]) continue; - minorgridlines.push(extendFlat(constructValueGridline(v), { - color: axis.minorgridcolor, - width: axis.minorgridwidth - })); - } - } - - if(axis.startline) { - boundarylines.push(extendFlat(constructArrayGridline(0), { - color: axis.startlinecolor, - width: axis.startlinewidth - })); - } - - if(axis.endline) { - boundarylines.push(extendFlat(constructArrayGridline(data.length - 1), { - color: axis.endlinecolor, - width: axis.endlinewidth - })); - } - } else { - // If the lines do not fall along the axes, then we have to interpolate - // the contro points and so some math to figure out where the lines are - // in the first place. - - // Compute the integer boudns of tick0 + n * dtick that fall within the range - // (roughly speaking): - // Give this a nice generous epsilon. We use at as * (1 + eps) in order to make - // inequalities a little tolerant in a more or less correct manner: - eps = 5e-15; - bounds = [ - Math.floor((data[data.length - 1] - axis.tick0) / axis.dtick * (1 + eps)), - Math.ceil((data[0] - axis.tick0) / axis.dtick / (1 + eps)) - ].sort(function(a, b) {return a - b;}); - - // Unpack sorted values so we can be sure to avoid infinite loops if something - // is backwards: - n1 = bounds[0]; - n2 = bounds[1]; - - for(n = n1; n <= n2; n++) { - value = axis.tick0 + axis.dtick * n; - - gridlines.push(extendFlat(constructValueGridline(value), { - color: axis.gridcolor, - width: axis.gridwidth - })); - } - - for(n = n1 - 1; n < n2 + 1; n++) { - value = axis.tick0 + axis.dtick * n; - - for(i = 0; i < axis.minorgridcount; i++) { - v = value + axis.dtick * (i + 1) / (axis.minorgridcount + 1); - if(v < data[0] || v > data[data.length - 1]) continue; - minorgridlines.push(extendFlat(constructValueGridline(v), { - color: axis.minorgridcolor, - width: axis.minorgridwidth - })); - } - } - - if(axis.startline) { - boundarylines.push(extendFlat(constructValueGridline(data[0]), { - color: axis.startlinecolor, - width: axis.startlinewidth - })); - } - - if(axis.endline) { - boundarylines.push(extendFlat(constructValueGridline(data[data.length - 1]), { - color: axis.endlinecolor, - width: axis.endlinewidth - })); - } - } -}; - -},{"../../lib/extend":677,"../../plots/cartesian/axes":724}],847:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Axes = require('../../plots/cartesian/axes'); -var extendFlat = require('../../lib/extend').extendFlat; - -module.exports = function calcLabels(trace, axis) { - var i, tobj, prefix, suffix, gridline; - - var labels = axis._labels = []; - var gridlines = axis._gridlines; - - for(i = 0; i < gridlines.length; i++) { - gridline = gridlines[i]; - - if(['start', 'both'].indexOf(axis.showticklabels) !== -1) { - tobj = Axes.tickText(axis, gridline.value); - - extendFlat(tobj, { - prefix: prefix, - suffix: suffix, - endAnchor: true, - xy: gridline.xy(0), - dxy: gridline.dxy(0, 0), - axis: gridline.axis, - length: gridline.crossAxis.length, - font: gridline.axis.tickfont, - isFirst: i === 0, - isLast: i === gridlines.length - 1 - }); - - labels.push(tobj); - } - - if(['end', 'both'].indexOf(axis.showticklabels) !== -1) { - tobj = Axes.tickText(axis, gridline.value); - - extendFlat(tobj, { - endAnchor: false, - xy: gridline.xy(gridline.crossLength - 1), - dxy: gridline.dxy(gridline.crossLength - 2, 1), - axis: gridline.axis, - length: gridline.crossAxis.length, - font: gridline.axis.tickfont, - isFirst: i === 0, - isLast: i === gridlines.length - 1 - }); - - labels.push(tobj); - } - } -}; - -},{"../../lib/extend":677,"../../plots/cartesian/axes":724}],848:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Compute the tangent vector according to catmull-rom cubic splines (centripetal, - * I think). That differs from the control point in two ways: - * 1. It is a vector, not a position relative to the point - * 2. the vector is longer than the position relative to p1 by a factor of 3 - * - * Close to the boundaries, we'll use these as *quadratic control points, so that - * to make a nice grid, we'll need to divide the tangent by 2 instead of 3. (The - * math works out this way if you work through the bezier derivatives) - */ -var CatmullRomExp = 0.5; -module.exports = function makeControlPoints(p0, p1, p2, smoothness) { - var d1x = p0[0] - p1[0], - d1y = p0[1] - p1[1], - d2x = p2[0] - p1[0], - d2y = p2[1] - p1[1], - d1a = Math.pow(d1x * d1x + d1y * d1y, CatmullRomExp / 2), - d2a = Math.pow(d2x * d2x + d2y * d2y, CatmullRomExp / 2), - numx = (d2a * d2a * d1x - d1a * d1a * d2x) * smoothness, - numy = (d2a * d2a * d1y - d1a * d1a * d2y) * smoothness, - denom1 = d2a * (d1a + d2a) * 3, - denom2 = d1a * (d1a + d2a) * 3; - return [[ - p1[0] + (denom1 && numx / denom1), - p1[1] + (denom1 && numy / denom1) - ], [ - p1[0] - (denom2 && numx / denom2), - p1[1] - (denom2 && numy / denom2) - ]]; -}; - -},{}],849:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var isArray = require('../../lib').isArray; - -/* - * Construct a 2D array of cheater values given a, b, and a slope. - * If - */ -module.exports = function(a, b, cheaterslope) { - var i, j, ascal, bscal, aval, bval; - var data = []; - - var na = isArray(a) ? a.length : a; - var nb = isArray(b) ? b.length : b; - var adata = isArray(a) ? a : null; - var bdata = isArray(b) ? b : null; - - // If we're using data, scale it so that for data that's just barely - // not evenly spaced, the switch to value-based indexing is continuous. - // This means evenly spaced data should look the same whether value - // or index cheatertype. - if(adata) { - ascal = (adata.length - 1) / (adata[adata.length - 1] - adata[0]) / (na - 1); - } - - if(bdata) { - bscal = (bdata.length - 1) / (bdata[bdata.length - 1] - bdata[0]) / (nb - 1); - } - - var xval; - var xmin = Infinity; - var xmax = -Infinity; - for(j = 0; j < nb; j++) { - data[j] = []; - bval = bdata ? (bdata[j] - bdata[0]) * bscal : j / (nb - 1); - for(i = 0; i < na; i++) { - aval = adata ? (adata[i] - adata[0]) * ascal : i / (na - 1); - xval = aval - bval * cheaterslope; - xmin = Math.min(xval, xmin); - xmax = Math.max(xval, xmax); - data[j][i] = xval; - } - } - - // Normalize cheater values to the 0-1 range. This comes into play when you have - // multiple cheater plots. After careful consideration, it seems better if cheater - // values are normalized to a consistent range. Otherwise one cheater affects the - // layout of other cheaters on the same axis. - var slope = 1.0 / (xmax - xmin); - var offset = -xmin * slope; - for(j = 0; j < nb; j++) { - for(i = 0; i < na; i++) { - data[j][i] = slope * data[j][i] + offset; - } - } - - return data; -}; - -},{"../../lib":685}],850:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var makeControlPoints = require('./catmull_rom'); -var ensureArray = require('../../lib').ensureArray; - -/* - * Turns a coarse grid into a fine grid with control points. - * - * Here's an ASCII representation: - * - * o ----- o ----- o ----- o - * | | | | - * | | | | - * | | | | - * o ----- o ----- o ----- o - * | | | | - * | | | | - * ^ | | | | - * | o ----- o ----- o ----- o - * b | | | | | - * | | | | | - * | | | | | - * o ----- o ----- o ----- o - * ------> - * a - * - * First of all, note that we want to do this in *cartesian* space. This means - * we might run into problems when there are extreme differences in x/y scaling, - * but the alternative is that the topology of the contours might actually be - * view-dependent, which seems worse. As a fallback, the only parameter that - * actually affects the result is the *aspect ratio*, so that we can at least - * improve the situation a bit without going all the way to screen coordinates. - * - * This function flattens the points + tangents into a slightly denser grid of - * *control points*. The resulting grid looks like this: - * - * 9 +--o-o--+ -o-o--+--o-o--+ - * 8 o o o o o o o o o o - * | | | | - * 7 o o o o o o o o o o - * 6 +--o-o--+ -o-o--+--o-o--+ - * 5 o o o o o o o o o o - * | | | | - * ^ 4 o o o o o o o o o o - * | 3 +--o-o--+ -o-o--+--o-o--+ - * b | 2 o o o o o o o o o o - * | | | | | - * | 1 o o o o o o o o o o - * 0 +--o-o--+ -o-o--+--o-o--+ - * 0 1 2 3 4 5 6 7 8 9 - * ------> - * a - * - * where `o`s represent newly-computed control points. the resulting dimension is - * - * (m - 1) * 3 + 1 - * = 3 * m - 2 - * - * We could simply store the tangents separately, but that's a nightmare to organize - * in two dimensions since we'll be slicing grid lines in both directions and since - * that basically requires very nearly just as much storage as just storing the dense - * grid. - * - * Wow! - */ - - -/* - * Catmull-rom is biased at the boundaries toward the interior and we actually - * can't use catmull-rom to compute the control point closest to (but inside) - * the boundary. - * - * A note on plotly's spline interpolation. It uses the catmull rom control point - * closest to the boundary *as* a quadratic control point. This seems incorrect, - * so I've elected not to follow that. Given control points 0 and 1, regular plotly - * splines give *equivalent* cubic control points: - * - * Input: - * - * boundary - * | | - * p0 p2 p3 --> interior - * 0.0 0.667 1.0 - * | | - * - * Cubic-equivalent of what plotly splines draw:: - * - * boundary - * | | - * p0 p1 p2 p3 --> interior - * 0.0 0.4444 0.8888 1.0 - * | | - * - * What this function fills in: - * - * boundary - * | | - * p0 p1 p2 p3 --> interior - * 0.0 0.333 0.667 1.0 - * | | - * - * Parameters: - * p0: boundary point - * p2: catmull rom point based on computation at p3 - * p3: first grid point - * - * Of course it works whichever way it's oriented; you just need to interpret the - * input/output accordingly. - */ -function inferCubicControlPoint(p0, p2, p3) { - // Extend p1 away from p0 by 50%. This is the equivalent quadratic point that - // would give the same slope as catmull rom at p0. - var p2e0 = -0.5 * p3[0] + 1.5 * p2[0]; - var p2e1 = -0.5 * p3[1] + 1.5 * p2[1]; - - return [ - (2 * p2e0 + p0[0]) / 3, - (2 * p2e1 + p0[1]) / 3, - ]; -} - -module.exports = function computeControlPoints(xe, ye, x, y, asmoothing, bsmoothing) { - var i, j, ie, je, xej, yej, xj, yj, cp, p1; - // At this point, we know these dimensions are correct and representative of - // the whole 2D arrays: - var na = x[0].length; - var nb = x.length; - - // (n)umber of (e)xpanded points: - var nea = asmoothing ? 3 * na - 2 : na; - var neb = bsmoothing ? 3 * nb - 2 : nb; - - xe = ensureArray(xe, neb); - ye = ensureArray(ye, neb); - - for(ie = 0; ie < neb; ie++) { - xe[ie] = ensureArray(xe[ie], nea); - ye[ie] = ensureArray(ye[ie], nea); - } - - // This loop fills in the X'd points: - // - // . . . . - // . . . . - // | | | | - // | | | | - // X ----- X ----- X ----- X - // | | | | - // | | | | - // | | | | - // X ----- X ----- X ----- X - // - // - // ie = (i) (e)xpanded: - for(j = 0, je = 0; j < nb; j++, je += bsmoothing ? 3 : 1) { - xej = xe[je]; - yej = ye[je]; - xj = x[j]; - yj = y[j]; - - // je = (j) (e)xpanded: - for(i = 0, ie = 0; i < na; i++, ie += asmoothing ? 3 : 1) { - xej[ie] = xj[i]; - yej[ie] = yj[i]; - } - } - - if(asmoothing) { - // If there's a-smoothing, this loop fills in the X'd points with catmull-rom - // control points computed along the a-axis: - // . . . . - // . . . . - // | | | | - // | | | | - // o -Y-X- o -X-X- o -X-Y- o - // | | | | - // | | | | - // | | | | - // o -Y-X- o -X-X- o -X-Y- o - // - // i: 0 1 2 3 - // ie: 0 1 3 3 4 5 6 7 8 9 - // - // ------> - // a - // - for(j = 0, je = 0; j < nb; j++, je += bsmoothing ? 3 : 1) { - // Fill in the points marked X for this a-row: - for(i = 1, ie = 3; i < na - 1; i++, ie += 3) { - cp = makeControlPoints( - [x[j][i - 1], y[j][i - 1]], - [x[j][i ], y[j][i]], - [x[j][i + 1], y[j][i + 1]], - asmoothing - ); - - xe[je][ie - 1] = cp[0][0]; - ye[je][ie - 1] = cp[0][1]; - xe[je][ie + 1] = cp[1][0]; - ye[je][ie + 1] = cp[1][1]; - } - - // The very first cubic interpolation point (to the left for i = 1 above) is - // used as a *quadratic* interpolation point by the spline drawing function - // which isn't really correct. But for the sake of consistency, we'll use it - // as such. Since we're using cubic splines, that means we need to shorten the - // tangent by 1/3 and also construct a new cubic spline control point 1/3 from - // the original to the i = 0 point. - p1 = inferCubicControlPoint( - [xe[je][0], ye[je][0]], - [xe[je][2], ye[je][2]], - [xe[je][3], ye[je][3]] - ); - xe[je][1] = p1[0]; - ye[je][1] = p1[1]; - - // Ditto last points, sans explanation: - p1 = inferCubicControlPoint( - [xe[je][nea - 1], ye[je][nea - 1]], - [xe[je][nea - 3], ye[je][nea - 3]], - [xe[je][nea - 4], ye[je][nea - 4]] - ); - xe[je][nea - 2] = p1[0]; - ye[je][nea - 2] = p1[1]; - } - } - - if(bsmoothing) { - // If there's a-smoothing, this loop fills in the X'd points with catmull-rom - // control points computed along the b-axis: - // . . . . - // X X X X X X X X X X - // | | | | - // X X X X X X X X X X - // o -o-o- o -o-o- o -o-o- o - // X X X X X X X X X X - // | | | | - // Y Y Y Y Y Y Y Y Y Y - // o -o-o- o -o-o- o -o-o- o - // - // i: 0 1 2 3 - // ie: 0 1 3 3 4 5 6 7 8 9 - // - // ------> - // a - // - for(ie = 0; ie < nea; ie++) { - for(je = 3; je < neb - 3; je += 3) { - cp = makeControlPoints( - [xe[je - 3][ie], ye[je - 3][ie]], - [xe[je][ie], ye[je][ie]], - [xe[je + 3][ie], ye[je + 3][ie]], - bsmoothing - ); - - xe[je - 1][ie] = cp[0][0]; - ye[je - 1][ie] = cp[0][1]; - xe[je + 1][ie] = cp[1][0]; - ye[je + 1][ie] = cp[1][1]; - } - // Do the same boundary condition magic for these control points marked Y above: - p1 = inferCubicControlPoint( - [xe[0][ie], ye[0][ie]], - [xe[2][ie], ye[2][ie]], - [xe[3][ie], ye[3][ie]] - ); - xe[1][ie] = p1[0]; - ye[1][ie] = p1[1]; - - p1 = inferCubicControlPoint( - [xe[neb - 1][ie], ye[neb - 1][ie]], - [xe[neb - 3][ie], ye[neb - 3][ie]], - [xe[neb - 4][ie], ye[neb - 4][ie]] - ); - xe[neb - 2][ie] = p1[0]; - ye[neb - 2][ie] = p1[1]; - } - } - - if(asmoothing && bsmoothing) { - // Do one more pass, this time recomputing exactly what we just computed. - // It's overdetermined since we're peforming catmull-rom in two directions, - // so we'll just average the overdetermined. These points don't lie along the - // grid lines, so note that only grid lines will follow normal plotly spline - // interpolation. - // - // Unless of course there was no b smoothing. Then these intermediate points - // don't actually exist and this section is bypassed. - // . . . . - // o X X o X X o X X o - // | | | | - // o X X o X X o X X o - // o -o-o- o -o-o- o -o-o- o - // o X X o X X o X X o - // | | | | - // o Y Y o Y Y o Y Y o - // o -o-o- o -o-o- o -o-o- o - // - // i: 0 1 2 3 - // ie: 0 1 3 3 4 5 6 7 8 9 - // - // ------> - // a - // - for(je = 1; je < neb; je += (je + 1) % 3 === 0 ? 2 : 1) { - // Fill in the points marked X for this a-row: - for(ie = 3; ie < nea - 3; ie += 3) { - cp = makeControlPoints( - [xe[je][ie - 3], ye[je][ie - 3]], - [xe[je][ie], ye[je][ie]], - [xe[je][ie + 3], ye[je][ie + 3]], - asmoothing - ); - - xe[je][ie - 1] = 0.5 * (xe[je][ie - 1] + cp[0][0]); - ye[je][ie - 1] = 0.5 * (ye[je][ie - 1] + cp[0][1]); - xe[je][ie + 1] = 0.5 * (xe[je][ie + 1] + cp[1][0]); - ye[je][ie + 1] = 0.5 * (ye[je][ie + 1] + cp[1][1]); - } - - // This case is just slightly different. The computation is the same, - // but having computed this, we'll average with the existing result. - p1 = inferCubicControlPoint( - [xe[je][0], ye[je][0]], - [xe[je][2], ye[je][2]], - [xe[je][3], ye[je][3]] - ); - xe[je][1] = 0.5 * (xe[je][1] + p1[0]); - ye[je][1] = 0.5 * (ye[je][1] + p1[1]); - - p1 = inferCubicControlPoint( - [xe[je][nea - 1], ye[je][nea - 1]], - [xe[je][nea - 3], ye[je][nea - 3]], - [xe[je][nea - 4], ye[je][nea - 4]] - ); - xe[je][nea - 2] = 0.5 * (xe[je][nea - 2] + p1[0]); - ye[je][nea - 2] = 0.5 * (ye[je][nea - 2] + p1[1]); - } - } - - return [xe, ye]; -}; - -},{"../../lib":685,"./catmull_rom":848}],851:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -module.exports = { - RELATIVE_CULL_TOLERANCE: 1e-6 -}; - -},{}],852:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Evaluates the derivative of a list of control point arrays. That is, it expects an array or arrays - * that are expanded relative to the raw data to include the bicubic control points, if applicable. If - * only linear interpolation is desired, then the data points correspond 1-1 along that axis to the - * data itself. Since it's catmull-rom splines in either direction note in particular that the - * derivatives are discontinuous across cell boundaries. That's the reason you need both the *cell* - * and the *point within the cell*. - * - * Also note that the discontinuity of the derivative is in magnitude only. The direction *is* - * continuous across cell boundaries. - * - * For example, to compute the derivative of the xcoordinate halfway betwen the 7 and 8th i-gridpoints - * and the 10th and 11th j-gridpoints given bicubic smoothing in both dimensions, you'd write: - * - * var deriv = createIDerivativeEvaluator([x], 1, 1); - * - * var dxdi = deriv([], 7, 10, 0.5, 0.5); - * // => [0.12345] - * - * Since there'd be a bunch of duplicate computation to compute multiple derivatives, you can double - * this up by providing more arrays: - * - * var deriv = createIDerivativeEvaluator([x, y], 1, 1); - * - * var dxdi = deriv([], 7, 10, 0.5, 0.5); - * // => [0.12345, 0.78910] - * - * NB: It's presumed that at this point all data has been sanitized and is valid numerical data arrays - * of the correct dimension. - */ -module.exports = function(arrays, asmoothing, bsmoothing) { - if(asmoothing && bsmoothing) { - return function(out, i0, j0, u, v) { - if(!out) out = []; - var f0, f1, f2, f3, ak, k; - - // Since it's a grid of control points, the actual indices are * 3: - i0 *= 3; - j0 *= 3; - - // Precompute some numbers: - var u2 = u * u; - var ou = 1 - u; - var ou2 = ou * ou; - var ouu2 = ou * u * 2; - var a = -3 * ou2; - var b = 3 * (ou2 - ouu2); - var c = 3 * (ouu2 - u2); - var d = 3 * u2; - - var v2 = v * v; - var v3 = v2 * v; - var ov = 1 - v; - var ov2 = ov * ov; - var ov3 = ov2 * ov; - - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - // Compute the derivatives in the u-direction: - f0 = a * ak[j0 ][i0] + b * ak[j0 ][i0 + 1] + c * ak[j0 ][i0 + 2] + d * ak[j0 ][i0 + 3]; - f1 = a * ak[j0 + 1][i0] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 1][i0 + 2] + d * ak[j0 + 1][i0 + 3]; - f2 = a * ak[j0 + 2][i0] + b * ak[j0 + 2][i0 + 1] + c * ak[j0 + 2][i0 + 2] + d * ak[j0 + 2][i0 + 3]; - f3 = a * ak[j0 + 3][i0] + b * ak[j0 + 3][i0 + 1] + c * ak[j0 + 3][i0 + 2] + d * ak[j0 + 3][i0 + 3]; - - // Now just interpolate in the v-direction since it's all separable: - out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; - } - - return out; - }; - } else if(asmoothing) { - // Handle smooth in the a-direction but linear in the b-direction by performing four - // linear interpolations followed by one cubic interpolation of the result - return function(out, i0, j0, u, v) { - if(!out) out = []; - var f0, f1, k, ak; - i0 *= 3; - var u2 = u * u; - var ou = 1 - u; - var ou2 = ou * ou; - var ouu2 = ou * u * 2; - var a = -3 * ou2; - var b = 3 * (ou2 - ouu2); - var c = 3 * (ouu2 - u2); - var d = 3 * u2; - var ov = 1 - v; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = a * ak[j0 ][i0] + b * ak[j0 ][i0 + 1] + c * ak[j0 ][i0 + 2] + d * ak[j0 ][i0 + 3]; - f1 = a * ak[j0 + 1][i0] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 1][i0 + 2] + d * ak[j0 + 1][i0 + 3]; - - out[k] = ov * f0 + v * f1; - } - return out; - }; - } else if(bsmoothing) { - // Same as the above case, except reversed. I've disabled the no-unused vars rule - // so that this function is fully interpolation-agnostic. Otherwise it would need - // to be called differently in different cases. Which wouldn't be the worst, but - /* eslint-disable no-unused-vars */ - return function(out, i0, j0, u, v) { - /* eslint-enable no-unused-vars */ - if(!out) out = []; - var f0, f1, f2, f3, k, ak; - j0 *= 3; - var v2 = v * v; - var v3 = v2 * v; - var ov = 1 - v; - var ov2 = ov * ov; - var ov3 = ov2 * ov; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ak[j0][i0 + 1] - ak[j0][i0]; - f1 = ak[j0 + 1][i0 + 1] - ak[j0 + 1][i0]; - f2 = ak[j0 + 2][i0 + 1] - ak[j0 + 2][i0]; - f3 = ak[j0 + 3][i0 + 1] - ak[j0 + 3][i0]; - - out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; - } - return out; - }; - } else { - // Finally, both directions are linear: - /* eslint-disable no-unused-vars */ - return function(out, i0, j0, u, v) { - /* eslint-enable no-unused-vars */ - if(!out) out = []; - var f0, f1, k, ak; - var ov = 1 - v; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ak[j0][i0 + 1] - ak[j0][i0]; - f1 = ak[j0 + 1][i0 + 1] - ak[j0 + 1][i0]; - - out[k] = ov * f0 + v * f1; - } - return out; - }; - } -}; - -},{}],853:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = function(arrays, asmoothing, bsmoothing) { - if(asmoothing && bsmoothing) { - return function(out, i0, j0, u, v) { - if(!out) out = []; - var f0, f1, f2, f3, ak, k; - - // Since it's a grid of control points, the actual indices are * 3: - i0 *= 3; - j0 *= 3; - - // Precompute some numbers: - var u2 = u * u; - var u3 = u2 * u; - var ou = 1 - u; - var ou2 = ou * ou; - var ou3 = ou2 * ou; - - var v2 = v * v; - var ov = 1 - v; - var ov2 = ov * ov; - var ovv2 = ov * v * 2; - var a = -3 * ov2; - var b = 3 * (ov2 - ovv2); - var c = 3 * (ovv2 - v2); - var d = 3 * v2; - - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - - // Compute the derivatives in the v-direction: - f0 = a * ak[j0][i0] + b * ak[j0 + 1][i0] + c * ak[j0 + 2][i0] + d * ak[j0 + 3][i0]; - f1 = a * ak[j0][i0 + 1] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 2][i0 + 1] + d * ak[j0 + 3][i0 + 1]; - f2 = a * ak[j0][i0 + 2] + b * ak[j0 + 1][i0 + 2] + c * ak[j0 + 2][i0 + 2] + d * ak[j0 + 3][i0 + 2]; - f3 = a * ak[j0][i0 + 3] + b * ak[j0 + 1][i0 + 3] + c * ak[j0 + 2][i0 + 3] + d * ak[j0 + 3][i0 + 3]; - - // Now just interpolate in the v-direction since it's all separable: - out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3; - } - - return out; - }; - } else if(asmoothing) { - // Handle smooth in the a-direction but linear in the b-direction by performing four - // linear interpolations followed by one cubic interpolation of the result - return function(out, i0, j0, v, u) { - if(!out) out = []; - var f0, f1, f2, f3, k, ak; - i0 *= 3; - var u2 = u * u; - var u3 = u2 * u; - var ou = 1 - u; - var ou2 = ou * ou; - var ou3 = ou2 * ou; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - - f0 = ak[j0 + 1][i0] - ak[j0][i0]; - f1 = ak[j0 + 1][i0 + 1] - ak[j0][i0 + 1]; - f2 = ak[j0 + 1][i0 + 2] - ak[j0][i0 + 2]; - f3 = ak[j0 + 1][i0 + 3] - ak[j0][i0 + 3]; - - out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3; - - // mathematically equivalent: - // f0 = ou3 * ak[j0 ][i0] + 3 * (ou2 * u * ak[j0 ][i0 + 1] + ou * u2 * ak[j0 ][i0 + 2]) + u3 * ak[j0 ][i0 + 3]; - // f1 = ou3 * ak[j0 + 1][i0] + 3 * (ou2 * u * ak[j0 + 1][i0 + 1] + ou * u2 * ak[j0 + 1][i0 + 2]) + u3 * ak[j0 + 1][i0 + 3]; - // out[k] = f1 - f0; - } - return out; - }; - } else if(bsmoothing) { - // Same as the above case, except reversed: - /* eslint-disable no-unused-vars */ - return function(out, i0, j0, u, v) { - /* eslint-enable no-unused-vars */ - if(!out) out = []; - var f0, f1, k, ak; - j0 *= 3; - var ou = 1 - u; - var v2 = v * v; - var ov = 1 - v; - var ov2 = ov * ov; - var ovv2 = ov * v * 2; - var a = -3 * ov2; - var b = 3 * (ov2 - ovv2); - var c = 3 * (ovv2 - v2); - var d = 3 * v2; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = a * ak[j0][i0] + b * ak[j0 + 1][i0] + c * ak[j0 + 2][i0] + d * ak[j0 + 3][i0]; - f1 = a * ak[j0][i0 + 1] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 2][i0 + 1] + d * ak[j0 + 3][i0 + 1]; - - out[k] = ou * f0 + u * f1; - } - return out; - }; - } else { - // Finally, both directions are linear: - /* eslint-disable no-unused-vars */ - return function(out, i0, j0, v, u) { - /* eslint-enable no-unused-vars */ - if(!out) out = []; - var f0, f1, k, ak; - var ov = 1 - v; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ak[j0 + 1][i0] - ak[j0][i0]; - f1 = ak[j0 + 1][i0 + 1] - ak[j0][i0 + 1]; - - out[k] = ov * f0 + v * f1; - } - return out; - }; - } - -}; - -},{}],854:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Return a function that evaluates a set of linear or bicubic control points. - * This will get evaluated a lot, so we'll at least do a bit of extra work to - * flatten some of the choices. In particular, we'll unroll the linear/bicubic - * combinations and we'll allow computing results in parallel to cut down - * on repeated arithmetic. - * - * Take note that we don't search for the correct range in this function. The - * reason is for consistency due to the corrresponding derivative function. In - * particular, the derivatives aren't continuous across cells, so it's important - * to be able control whether the derivative at a cell boundary is approached - * from one side or the other. - */ -module.exports = function(arrays, na, nb, asmoothing, bsmoothing) { - var imax = na - 2; - var jmax = nb - 2; - - if(asmoothing && bsmoothing) { - return function(out, i, j) { - if(!out) out = []; - var f0, f1, f2, f3, ak, k; - - var i0 = Math.max(0, Math.min(Math.floor(i), imax)); - var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); - var u = Math.max(0, Math.min(1, i - i0)); - var v = Math.max(0, Math.min(1, j - j0)); - - // Since it's a grid of control points, the actual indices are * 3: - i0 *= 3; - j0 *= 3; - - // Precompute some numbers: - var u2 = u * u; - var u3 = u2 * u; - var ou = 1 - u; - var ou2 = ou * ou; - var ou3 = ou2 * ou; - - var v2 = v * v; - var v3 = v2 * v; - var ov = 1 - v; - var ov2 = ov * ov; - var ov3 = ov2 * ov; - - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ou3 * ak[j0][i0] + 3 * (ou2 * u * ak[j0][i0 + 1] + ou * u2 * ak[j0][i0 + 2]) + u3 * ak[j0][i0 + 3]; - f1 = ou3 * ak[j0 + 1][i0] + 3 * (ou2 * u * ak[j0 + 1][i0 + 1] + ou * u2 * ak[j0 + 1][i0 + 2]) + u3 * ak[j0 + 1][i0 + 3]; - f2 = ou3 * ak[j0 + 2][i0] + 3 * (ou2 * u * ak[j0 + 2][i0 + 1] + ou * u2 * ak[j0 + 2][i0 + 2]) + u3 * ak[j0 + 2][i0 + 3]; - f3 = ou3 * ak[j0 + 3][i0] + 3 * (ou2 * u * ak[j0 + 3][i0 + 1] + ou * u2 * ak[j0 + 3][i0 + 2]) + u3 * ak[j0 + 3][i0 + 3]; - out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; - } - - return out; - }; - } else if(asmoothing) { - // Handle smooth in the a-direction but linear in the b-direction by performing four - // linear interpolations followed by one cubic interpolation of the result - return function(out, i, j) { - if(!out) out = []; - - var i0 = Math.max(0, Math.min(Math.floor(i), imax)); - var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); - var u = Math.max(0, Math.min(1, i - i0)); - var v = Math.max(0, Math.min(1, j - j0)); - - var f0, f1, f2, f3, k, ak; - i0 *= 3; - var u2 = u * u; - var u3 = u2 * u; - var ou = 1 - u; - var ou2 = ou * ou; - var ou3 = ou2 * ou; - var ov = 1 - v; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ov * ak[j0][i0] + v * ak[j0 + 1][i0]; - f1 = ov * ak[j0][i0 + 1] + v * ak[j0 + 1][i0 + 1]; - f2 = ov * ak[j0][i0 + 2] + v * ak[j0 + 1][i0 + 1]; - f3 = ov * ak[j0][i0 + 3] + v * ak[j0 + 1][i0 + 1]; - - out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3; - } - return out; - }; - } else if(bsmoothing) { - // Same as the above case, except reversed: - return function(out, i, j) { - if(!out) out = []; - - var i0 = Math.max(0, Math.min(Math.floor(i), imax)); - var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); - var u = Math.max(0, Math.min(1, i - i0)); - var v = Math.max(0, Math.min(1, j - j0)); - - var f0, f1, f2, f3, k, ak; - j0 *= 3; - var v2 = v * v; - var v3 = v2 * v; - var ov = 1 - v; - var ov2 = ov * ov; - var ov3 = ov2 * ov; - var ou = 1 - u; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ou * ak[j0][i0] + u * ak[j0][i0 + 1]; - f1 = ou * ak[j0 + 1][i0] + u * ak[j0 + 1][i0 + 1]; - f2 = ou * ak[j0 + 2][i0] + u * ak[j0 + 2][i0 + 1]; - f3 = ou * ak[j0 + 3][i0] + u * ak[j0 + 3][i0 + 1]; - - out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3; - } - return out; - }; - } else { - // Finally, both directions are linear: - return function(out, i, j) { - if(!out) out = []; - - var i0 = Math.max(0, Math.min(Math.floor(i), imax)); - var j0 = Math.max(0, Math.min(Math.floor(j), jmax)); - var u = Math.max(0, Math.min(1, i - i0)); - var v = Math.max(0, Math.min(1, j - j0)); - - var f0, f1, k, ak; - var ov = 1 - v; - var ou = 1 - u; - for(k = 0; k < arrays.length; k++) { - ak = arrays[k]; - f0 = ou * ak[j0][i0] + u * ak[j0][i0 + 1]; - f1 = ou * ak[j0 + 1][i0] + u * ak[j0 + 1][i0 + 1]; - - out[k] = ov * f0 + v * f1; - } - return out; - }; - } - -}; - -},{}],855:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var Lib = require('../../lib'); -var handleXYDefaults = require('./xy_defaults'); -var handleABDefaults = require('./ab_defaults'); -var setConvert = require('./set_convert'); -var attributes = require('./attributes'); -var colorAttrs = require('../../components/color/attributes'); - -module.exports = function supplyDefaults(traceIn, traceOut, dfltColor, fullLayout) { - function coerce(attr, dflt) { - return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); - } - - var defaultColor = coerce('color', colorAttrs.defaultLine); - Lib.coerceFont(coerce, 'font'); - - coerce('carpet'); - - handleABDefaults(traceIn, traceOut, fullLayout, coerce, defaultColor); - - if(!traceOut.a || !traceOut.b) { - traceOut.visible = false; - return; - } - - if(traceOut.a.length < 3) { - traceOut.aaxis.smoothing = 0; - } - - if(traceOut.b.length < 3) { - traceOut.baxis.smoothing = 0; - } - - // NB: the input is x/y arrays. You should know that the *first* dimension of x and y - // corresponds to b and the second to a. This sounds backwards but ends up making sense - // the important part to know is that when you write y[j][i], j goes from 0 to b.length - 1 - // and i goes from 0 to a.length - 1. - var len = handleXYDefaults(traceIn, traceOut, coerce); - - setConvert(traceOut); - - if(traceOut._cheater) { - coerce('cheaterslope'); - } - - if(!len) { - traceOut.visible = false; - return; - } -}; - -},{"../../components/color/attributes":577,"../../lib":685,"./ab_defaults":838,"./attributes":840,"./set_convert":864,"./xy_defaults":866}],856:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -module.exports = function(data) { - return Array.isArray(data[0]); -}; - -},{}],857:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var Carpet = {}; - -Carpet.attributes = require('./attributes'); -Carpet.supplyDefaults = require('./defaults'); -Carpet.plot = require('./plot'); -Carpet.calc = require('./calc'); -Carpet.animatable = true; - -Carpet.moduleType = 'trace'; -Carpet.name = 'carpet'; -Carpet.basePlotModule = require('../../plots/cartesian'); -Carpet.categories = ['cartesian', 'carpet', 'carpetAxis', 'notLegendIsolatable']; -Carpet.meta = { - -}; - -module.exports = Carpet; - -},{"../../plots/cartesian":734,"./attributes":840,"./calc":844,"./defaults":855,"./plot":863}],858:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Given a trace, look up the carpet axis by carpet. - */ -module.exports = function(gd, trace) { - var n = gd._fullData.length; - var firstAxis; - for(var i = 0; i < n; i++) { - var maybeCarpet = gd._fullData[i]; - - if(maybeCarpet.index === trace.index) continue; - - if(maybeCarpet.type === 'carpet') { - if(!firstAxis) { - firstAxis = maybeCarpet; - } - - if(maybeCarpet.carpet === trace.carpet) { - return maybeCarpet; - } - } - } - - return firstAxis; -}; - -},{}],859:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = function makePath(xp, yp, isBicubic) { - // Prevent d3 errors that would result otherwise: - if(xp.length === 0) return ''; - - var i, path = []; - var stride = isBicubic ? 3 : 1; - for(i = 0; i < xp.length; i += stride) { - path.push(xp[i] + ',' + yp[i]); - - if(isBicubic && i < xp.length - stride) { - path.push('C'); - path.push([ - xp[i + 1] + ',' + yp[i + 1], - xp[i + 2] + ',' + yp[i + 2] + ' ', - ].join(' ')); - } - } - return path.join(isBicubic ? '' : 'L'); -}; - -},{}],860:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Map an array of x or y coordinates (c) to screen-space pixel coordinates (p). - * The output array is optional, but if provided, it will be reused without - * reallocation to the extent possible. - */ -module.exports = function mapArray(out, data, func) { - var i; - - if(!Array.isArray(out)) { - // If not an array, make it an array: - out = []; - } else if(out.length > data.length) { - // If too long, truncate. (If too short, it will grow - // automatically so we don't care about that case) - out = out.slice(0, data.length); - } - - for(i = 0; i < data.length; i++) { - out[i] = func(data[i]); - } - - return out; -}; - -},{}],861:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -/* - * Map an array of x or y coordinates (c) to screen-space pixel coordinates (p). - * The output array is optional, but if provided, it will be reused without - * reallocation to the extent possible. - */ -module.exports = function mapArray(out, data, func) { - var i, j; - - if(!Array.isArray(out)) { - // If not an array, make it an array: - out = []; - } else if(out.length > data.length) { - // If too long, truncate. (If too short, it will grow - // automatically so we don't care about that case) - out = out.slice(0, data.length); - } - - for(i = 0; i < data.length; i++) { - if(!Array.isArray(out[i])) { - // If not an array, make it an array: - out[i] = []; - } else if(out[i].length > data.length) { - // If too long, truncate. (If too short, it will grow - // automatically so we don't care about[i] that case) - out[i] = out[i].slice(0, data.length); - } - - for(j = 0; j < data[0].length; j++) { - out[i][j] = func(data[i][j]); - } - } - return out; -}; - -},{}],862:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -module.exports = function orientText(trace, xaxis, yaxis, xy, dxy, refDxy) { - var dx = dxy[0] * trace.dpdx(xaxis); - var dy = dxy[1] * trace.dpdy(yaxis); - var flip = 1; - - var offsetMultiplier = 1.0; - if(refDxy) { - var l1 = Math.sqrt(dxy[0] * dxy[0] + dxy[1] * dxy[1]); - var l2 = Math.sqrt(refDxy[0] * refDxy[0] + refDxy[1] * refDxy[1]); - var dot = (dxy[0] * refDxy[0] + dxy[1] * refDxy[1]) / l1 / l2; - offsetMultiplier = Math.max(0.0, dot); - } - - var angle = Math.atan2(dy, dx) * 180 / Math.PI; - if(angle < -90) { - angle += 180; - flip = -flip; - } else if(angle > 90) { - angle -= 180; - flip = -flip; - } - - return { - angle: angle, - flip: flip, - p: trace.c2p(xy, xaxis, yaxis), - offsetMultplier: offsetMultiplier - }; -}; - -},{}],863:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var d3 = require('d3'); -var Drawing = require('../../components/drawing'); -var map1dArray = require('./map_1d_array'); -var makepath = require('./makepath'); -var orientText = require('./orient_text'); - -module.exports = function plot(gd, plotinfo, cdcarpet) { - for(var i = 0; i < cdcarpet.length; i++) { - plotOne(gd, plotinfo, cdcarpet[i]); - } -}; - -function makeg(el, type, klass) { - var join = el.selectAll(type + '.' + klass).data([0]); - join.enter().append(type).classed(klass, true); - return join; -} - -function plotOne(gd, plotinfo, cd) { - var t = cd[0]; - var trace = cd[0].trace, - xa = plotinfo.xaxis, - ya = plotinfo.yaxis, - aax = trace.aaxis, - bax = trace.baxis, - fullLayout = gd._fullLayout; - // uid = trace.uid, - // id = 'carpet' + uid; - - var gridLayer = plotinfo.plot.selectAll('.carpetlayer'); - var clipLayer = makeg(fullLayout._defs, 'g', 'clips'); - - var axisLayer = makeg(gridLayer, 'g', 'carpet' + trace.uid).classed('trace', true); - var minorLayer = makeg(axisLayer, 'g', 'minorlayer'); - var majorLayer = makeg(axisLayer, 'g', 'majorlayer'); - var boundaryLayer = makeg(axisLayer, 'g', 'boundarylayer'); - var labelLayer = makeg(axisLayer, 'g', 'labellayer'); - - axisLayer.style('opacity', trace.opacity); - - drawGridLines(xa, ya, majorLayer, aax, 'a', aax._gridlines, true); - drawGridLines(xa, ya, majorLayer, bax, 'b', bax._gridlines, true); - drawGridLines(xa, ya, minorLayer, aax, 'a', aax._minorgridlines, true); - drawGridLines(xa, ya, minorLayer, bax, 'b', bax._minorgridlines, true); - - // NB: These are not ommitted if the lines are not active. The joins must be executed - // in order for them to get cleaned up without a full redraw - drawGridLines(xa, ya, boundaryLayer, aax, 'a-boundary', aax._boundarylines); - drawGridLines(xa, ya, boundaryLayer, bax, 'b-boundary', bax._boundarylines); - - var maxAExtent = drawAxisLabels(gd._tester, xa, ya, trace, t, labelLayer, aax._labels, 'a-label'); - var maxBExtent = drawAxisLabels(gd._tester, xa, ya, trace, t, labelLayer, bax._labels, 'b-label'); - - drawAxisTitles(labelLayer, trace, t, xa, ya, maxAExtent, maxBExtent); - - // Swap for debugging in order to draw directly: - // drawClipPath(trace, axisLayer, xa, ya); - drawClipPath(trace, t, clipLayer, xa, ya); -} - -function drawClipPath(trace, t, layer, xaxis, yaxis) { - var seg, xp, yp, i; - // var clip = makeg(layer, 'g', 'carpetclip'); - trace.clipPathId = 'clip' + trace.uid + 'carpet'; - - var clip = layer.select('#' + trace.clipPathId); - - if(!clip.size()) { - clip = layer.append('clipPath') - .classed('carpetclip', true); - } - - var path = makeg(clip, 'path', 'carpetboundary'); - var segments = t.clipsegments; - var segs = []; - - for(i = 0; i < segments.length; i++) { - seg = segments[i]; - xp = map1dArray([], seg.x, xaxis.c2p); - yp = map1dArray([], seg.y, yaxis.c2p); - segs.push(makepath(xp, yp, seg.bicubic)); - } - - // This could be optimized ever so slightly to avoid no-op L segments - // at the corners, but it's so negligible that I don't think it's worth - // the extra complexity - trace.clipPathData = 'M' + segs.join('L') + 'Z'; - clip.attr('id', trace.clipPathId); - path.attr('d', trace.clipPathData); - // .style('stroke-width', 20) - // .style('vector-effect', 'non-scaling-stroke') - // .style('stroke', 'black') - // .style('fill', 'rgba(0, 0, 0, 0.1)'); -} - -function drawGridLines(xaxis, yaxis, layer, axis, axisLetter, gridlines) { - var lineClass = 'const-' + axisLetter + '-lines'; - var gridJoin = layer.selectAll('.' + lineClass).data(gridlines); - - gridJoin.enter().append('path') - .classed(lineClass, true) - .style('vector-effect', 'non-scaling-stroke'); - - gridJoin.each(function(d) { - var gridline = d; - var x = gridline.x; - var y = gridline.y; - - var xp = map1dArray([], x, xaxis.c2p); - var yp = map1dArray([], y, yaxis.c2p); - - var path = 'M' + makepath(xp, yp, gridline.smoothing); - - var el = d3.select(this); - - el.attr('d', path) - .style('stroke-width', gridline.width) - .style('stroke', gridline.color) - .style('fill', 'none'); - }); - - gridJoin.exit().remove(); -} - -function drawAxisLabels(tester, xaxis, yaxis, trace, t, layer, labels, labelClass) { - var labelJoin = layer.selectAll('text.' + labelClass).data(labels); - - labelJoin.enter().append('text') - .classed(labelClass, true); - - var maxExtent = 0; - - labelJoin.each(function(label) { - // Most of the positioning is done in calc_labels. Only the parts that depend upon - // the screen space representation of the x and y axes are here: - var orientation; - if(label.axis.tickangle === 'auto') { - orientation = orientText(trace, xaxis, yaxis, label.xy, label.dxy); - } else { - var angle = (label.axis.tickangle + 180.0) * Math.PI / 180.0; - orientation = orientText(trace, xaxis, yaxis, label.xy, [Math.cos(angle), Math.sin(angle)]); - } - var direction = (label.endAnchor ? -1 : 1) * orientation.flip; - var bbox = Drawing.measureText(tester, label.text, label.font); - - d3.select(this) - .attr('text-anchor', direction > 0 ? 'start' : 'end') - .text(label.text) - .attr('transform', - // Translate to the correct point: - 'translate(' + orientation.p[0] + ',' + orientation.p[1] + ') ' + - // Rotate to line up with grid line tangent: - 'rotate(' + orientation.angle + ')' + - // Adjust the baseline and indentation: - 'translate(' + label.axis.labelpadding * direction + ',' + bbox.height * 0.3 + ')' - ) - .call(Drawing.font, label.font.family, label.font.size, label.font.color); - - maxExtent = Math.max(maxExtent, bbox.width + label.axis.labelpadding); - }); - - labelJoin.exit().remove(); - - return maxExtent; -} - -function drawAxisTitles(layer, trace, t, xa, ya, maxAExtent, maxBExtent) { - var a, b, xy, dxy; - - a = 0.5 * (trace.a[0] + trace.a[trace.a.length - 1]); - b = trace.b[0]; - xy = trace.ab2xy(a, b, true); - dxy = trace.dxyda_rough(a, b); - drawAxisTitle(layer, trace, t, xy, dxy, trace.aaxis, xa, ya, maxAExtent, 'a-title'); - - a = trace.a[0]; - b = 0.5 * (trace.b[0] + trace.b[trace.b.length - 1]); - xy = trace.ab2xy(a, b, true); - dxy = trace.dxydb_rough(a, b); - drawAxisTitle(layer, trace, t, xy, dxy, trace.baxis, xa, ya, maxBExtent, 'b-title'); -} - -function drawAxisTitle(layer, trace, t, xy, dxy, axis, xa, ya, offset, labelClass) { - var data = []; - if(axis.title) data.push(axis.title); - var titleJoin = layer.selectAll('text.' + labelClass).data(data); - - titleJoin.enter().append('text') - .classed(labelClass, true); - - // There's only one, but we'll do it as a join so it's updated nicely: - titleJoin.each(function() { - var orientation = orientText(trace, xa, ya, xy, dxy); - - if(['start', 'both'].indexOf(axis.showticklabels) === -1) { - offset = 0; - } - - // In addition to the size of the labels, add on some extra padding: - offset += axis.titlefont.size + axis.titleoffset; - - - var el = d3.select(this); - - el.text(axis.title || '') - .attr('transform', - 'translate(' + orientation.p[0] + ',' + orientation.p[1] + ') ' + - 'rotate(' + orientation.angle + ') ' + - 'translate(0,' + offset + ')' - ) - .classed('user-select-none', true) - .attr('text-anchor', 'middle') - .call(Drawing.font, axis.titlefont); - }); - - titleJoin.exit().remove(); -} - -},{"../../components/drawing":602,"./makepath":859,"./map_1d_array":860,"./orient_text":862,"d3":107}],864:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var constants = require('./constants'); -var search = require('../../lib/search').findBin; -var computeControlPoints = require('./compute_control_points'); -var createSplineEvaluator = require('./create_spline_evaluator'); -var createIDerivativeEvaluator = require('./create_i_derivative_evaluator'); -var createJDerivativeEvaluator = require('./create_j_derivative_evaluator'); - -/* - * Create conversion functions to go from one basis to another. In particular the letter - * abbreviations are: - * - * i: i/j coordinates along the grid. Integer values correspond to data points - * a: real-valued coordinates along the a/b axes - * c: cartesian x-y coordinates - * p: screen-space pixel coordinates - */ -module.exports = function setConvert(trace) { - var a = trace.a; - var b = trace.b; - var na = trace.a.length; - var nb = trace.b.length; - var aax = trace.aaxis; - var bax = trace.baxis; - - // Grab the limits once rather than recomputing the bounds for every point - // independently: - var amin = a[0]; - var amax = a[na - 1]; - var bmin = b[0]; - var bmax = b[nb - 1]; - var arange = a[a.length - 1] - a[0]; - var brange = b[b.length - 1] - b[0]; - - // Compute the tolerance so that points are visible slightly outside the - // defined carpet axis: - var atol = arange * constants.RELATIVE_CULL_TOLERANCE; - var btol = brange * constants.RELATIVE_CULL_TOLERANCE; - - // Expand the limits to include the relative tolerance: - amin -= atol; - amax += atol; - bmin -= btol; - bmax += btol; - - trace.isVisible = function(a, b) { - return a > amin && a < amax && b > bmin && b < bmax; - }; - - trace.isOccluded = function(a, b) { - return a < amin || a > amax || b < bmin || b > bmax; - }; - - // XXX: ONLY PASSTHRU. ONLY. No, ONLY. - aax.c2p = function(v) { return v; }; - bax.c2p = function(v) { return v; }; - - trace.setScale = function() { - var x = trace.x; - var y = trace.y; - - // This is potentially a very expensive step! It does the bulk of the work of constructing - // an expanded basis of control points. Note in particular that it overwrites the existing - // basis without creating a new array since that would potentially thrash the garbage - // collector. - var result = computeControlPoints(trace.xctrl, trace.yctrl, x, y, aax.smoothing, bax.smoothing); - trace.xctrl = result[0]; - trace.yctrl = result[1]; - - // This step is the second step in the process, but it's somewhat simpler. It just unrolls - // some logic since it would be unnecessarily expensive to compute both interpolations - // nearly identically but separately and to include a bunch of linear vs. bicubic logic in - // every single call. - trace.evalxy = createSplineEvaluator([trace.xctrl, trace.yctrl], na, nb, aax.smoothing, bax.smoothing); - - trace.dxydi = createIDerivativeEvaluator([trace.xctrl, trace.yctrl], aax.smoothing, bax.smoothing); - trace.dxydj = createJDerivativeEvaluator([trace.xctrl, trace.yctrl], aax.smoothing, bax.smoothing); - }; - - /* - * Convert from i/j data grid coordinates to a/b values. Note in particular that this - * is *linear* interpolation, even if the data is interpolated bicubically. - */ - trace.i2a = function(i) { - var i0 = Math.max(0, Math.floor(i[0]), na - 2); - var ti = i[0] - i0; - return (1 - ti) * a[i0] + ti * a[i0 + 1]; - }; - - trace.j2b = function(j) { - var j0 = Math.max(0, Math.floor(j[1]), na - 2); - var tj = j[1] - j0; - return (1 - tj) * b[j0] + tj * b[j0 + 1]; - }; - - trace.ij2ab = function(ij) { - return [trace.i2a(ij[0]), trace.j2b(ij[1])]; - }; - - /* - * Convert from a/b coordinates to i/j grid-numbered coordinates. This requires searching - * through the a/b data arrays and assumes they are monotonic, which is presumed to have - * been enforced already. - */ - trace.a2i = function(aval) { - var i0 = Math.max(0, Math.min(search(aval, a), na - 2)); - var a0 = a[i0]; - var a1 = a[i0 + 1]; - return Math.max(0, Math.min(na - 1, i0 + (aval - a0) / (a1 - a0))); - }; - - trace.b2j = function(bval) { - var j0 = Math.max(0, Math.min(search(bval, b), nb - 2)); - var b0 = b[j0]; - var b1 = b[j0 + 1]; - return Math.max(0, Math.min(nb - 1, j0 + (bval - b0) / (b1 - b0))); - }; - - trace.ab2ij = function(ab) { - return [trace.a2i(ab[0]), trace.b2j(ab[1])]; - }; - - /* - * Convert from i/j coordinates to x/y caretesian coordinates. This means either bilinear - * or bicubic spline evaluation, but the hard part is already done at this point. - */ - trace.i2c = function(i, j) { - return trace.evalxy([], i, j); - }; - - trace.ab2xy = function(aval, bval, extrapolate) { - if(!extrapolate && (aval < a[0] || aval > a[na - 1] | bval < b[0] || bval > b[nb - 1])) { - return [false, false]; - } - var i = trace.a2i(aval); - var j = trace.b2j(bval); - - var pt = trace.evalxy([], i, j); - - if(extrapolate) { - // This section uses the boundary derivatives to extrapolate linearly outside - // the defined range. Consider a scatter line with one point inside the carpet - // axis and one point outside. If we don't extrapolate, we can't draw the line - // at all. - var iex = 0; - var jex = 0; - var der = []; - - var i0, ti, j0, tj; - if(aval < a[0]) { - i0 = 0; - ti = 0; - iex = (aval - a[0]) / (a[1] - a[0]); - } else if(aval > a[na - 1]) { - i0 = na - 2; - ti = 1; - iex = (aval - a[na - 1]) / (a[na - 1] - a[na - 2]); - } else { - i0 = Math.max(0, Math.min(na - 2, Math.floor(i))); - ti = i - i0; - } - - if(bval < b[0]) { - j0 = 0; - tj = 0; - jex = (bval - b[0]) / (b[1] - b[0]); - } else if(bval > b[nb - 1]) { - j0 = nb - 2; - tj = 1; - jex = (bval - b[nb - 1]) / (b[nb - 1] - b[nb - 2]); - } else { - j0 = Math.max(0, Math.min(nb - 2, Math.floor(j))); - tj = j - j0; - } - - if(iex) { - trace.dxydi(der, i0, j0, ti, tj); - pt[0] += der[0] * iex; - pt[1] += der[1] * iex; - } - - if(jex) { - trace.dxydj(der, i0, j0, ti, tj); - pt[0] += der[0] * jex; - pt[1] += der[1] * jex; - } - } - - return pt; - }; - - - trace.c2p = function(xy, xa, ya) { - return [xa.c2p(xy[0]), ya.c2p(xy[1])]; - }; - - trace.p2x = function(p, xa, ya) { - return [xa.p2c(p[0]), ya.p2c(p[1])]; - }; - - trace.dadi = function(i /* , u*/) { - // Right now only a piecewise linear a or b basis is permitted since smoother interpolation - // would cause monotonicity problems. As a retult, u is entirely disregarded in this - // computation, though we'll specify it as a parameter for the sake of completeness and - // future-proofing. It would be possible to use monotonic cubic interpolation, for example. - // - // See: https://en.wikipedia.org/wiki/Monotone_cubic_interpolation - - // u = u || 0; - - var i0 = Math.max(0, Math.min(a.length - 2, i)); - - // The step (demoninator) is implicitly 1 since that's the grid spacing. - return a[i0 + 1] - a[i0]; - }; - - trace.dbdj = function(j /* , v*/) { - // See above caveats for dadi which also apply here - var j0 = Math.max(0, Math.min(b.length - 2, j)); - - // The step (demoninator) is implicitly 1 since that's the grid spacing. - return b[j0 + 1] - b[j0]; - }; - - // Takes: grid cell coordinate (i, j) and fractional grid cell coordinates (u, v) - // Returns: (dx/da, dy/db) - // - // NB: separate grid cell + fractional grid cell coordinate format is due to the discontinuous - // derivative, as described better in create_i_derivative_evaluator.js - trace.dxyda = function(i0, j0, u, v) { - var dxydi = trace.dxydi(null, i0, j0, u, v); - var dadi = trace.dadi(i0, u); - - return [dxydi[0] / dadi, dxydi[1] / dadi]; - }; - - trace.dxydb = function(i0, j0, u, v) { - var dxydj = trace.dxydj(null, i0, j0, u, v); - var dbdj = trace.dbdj(j0, v); - - return [dxydj[0] / dbdj, dxydj[1] / dbdj]; - }; - - // Sometimes we don't care about precision and all we really want is decent rough - // directions (as is the case with labels). In that case, we can do a very rough finite - // difference and spare having to worry about precise grid coordinates: - trace.dxyda_rough = function(a, b, reldiff) { - var h = arange * (reldiff || 0.1); - var plus = trace.ab2xy(a + h, b, true); - var minus = trace.ab2xy(a - h, b, true); - - return [ - (plus[0] - minus[0]) * 0.5 / h, - (plus[1] - minus[1]) * 0.5 / h - ]; - }; - - trace.dxydb_rough = function(a, b, reldiff) { - var h = brange * (reldiff || 0.1); - var plus = trace.ab2xy(a, b + h, true); - var minus = trace.ab2xy(a, b - h, true); - - return [ - (plus[0] - minus[0]) * 0.5 / h, - (plus[1] - minus[1]) * 0.5 / h - ]; - }; - - trace.dpdx = function(xa) { - return xa._m; - }; - - trace.dpdy = function(ya) { - return ya._m; - }; -}; - -},{"../../lib/search":699,"./compute_control_points":850,"./constants":851,"./create_i_derivative_evaluator":852,"./create_j_derivative_evaluator":853,"./create_spline_evaluator":854}],865:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Lib = require('../../lib'); - -/* - * Given a 2D array as well as a basis in either direction, this function fills in the - * 2D array using a combination of smoothing and extrapolation. This is rather important - * for carpet plots since it's used for layout so that we can't simply omit or blank out - * points. We need a reasonable guess so that the interpolation puts points somewhere - * even if we were to somehow represent that the data was missing later on. - * - * input: - * - data: 2D array of arrays - * - a: array such that a.length === data[0].length - * - b: array such that b.length === data.length - */ -module.exports = function smoothFill2dArray(data, a, b) { - var i, j, k; - var ip = []; - var jp = []; - // var neighborCnts = []; - - var ni = data[0].length; - var nj = data.length; - - function avgSurrounding(i, j) { - // As a low-quality start, we can simply average surrounding points (in a not - // non-uniform grid aware manner): - var sum = 0.0; - var val; - var cnt = 0; - if(i > 0 && (val = data[j][i - 1]) !== undefined) { - cnt++; - sum += val; - } - if(i < ni - 1 && (val = data[j][i + 1]) !== undefined) { - cnt++; - sum += val; - } - if(j > 0 && (val = data[j - 1][i]) !== undefined) { - cnt++; - sum += val; - } - if(j < nj - 1 && (val = data[j + 1][i]) !== undefined) { - cnt++; - sum += val; - } - return sum / Math.max(1, cnt); - - } - - // This loop iterates over all cells. Any cells that are null will be noted and those - // are the only points we will loop over and update via laplace's equation. Points with - // any neighbors will receive the average. If there are no neighboring points, then they - // will be set to zero. Also as we go, track the maximum magnitude so that we can scale - // our tolerance accordingly. - var dmax = 0.0; - for(i = 0; i < ni; i++) { - for(j = 0; j < nj; j++) { - if(data[j][i] === undefined) { - ip.push(i); - jp.push(j); - - data[j][i] = avgSurrounding(i, j); - // neighborCnts.push(result.neighbors); - } - dmax = Math.max(dmax, Math.abs(data[j][i])); - } - } - - if(!ip.length) return data; - - // The tolerance doesn't need to be excessive. It's just for display positioning - var dxp, dxm, dap, dam, dbp, dbm, c, d, diff, reldiff, overrelaxation; - var tol = 1e-5; - var resid = 0; - var itermax = 100; - var iter = 0; - var n = ip.length; - do { - resid = 0; - // Normally we'd loop in two dimensions, but not all points are blank and need - // an update, so we instead loop only over the points that were tabulated above - for(k = 0; k < n; k++) { - i = ip[k]; - j = jp[k]; - // neighborCnt = neighborCnts[k]; - - // Track a counter for how many contributions there are. We'll use this counter - // to average at the end, which reduces to laplace's equation with neumann boundary - // conditions on the first derivative (second derivative is zero so that we get - // a nice linear extrapolation at the boundaries). - var boundaryCnt = 0; - var newVal = 0; - - var d0, d1, x0, x1, i0, j0; - if(i === 0) { - // If this lies along the i = 0 boundary, extrapolate from the two points - // to the right of this point. Note that the finite differences take into - // account non-uniform grid spacing: - i0 = Math.min(ni - 1, 2); - x0 = a[i0]; - x1 = a[1]; - d0 = data[j][i0]; - d1 = data[j][1]; - newVal += d1 + (d1 - d0) * (a[0] - x1) / (x1 - x0); - boundaryCnt++; - } else if(i === ni - 1) { - // If along the high i boundary, extrapolate from the two points to the - // left of this point - i0 = Math.max(0, ni - 3); - x0 = a[i0]; - x1 = a[ni - 2]; - d0 = data[j][i0]; - d1 = data[j][ni - 2]; - newVal += d1 + (d1 - d0) * (a[ni - 1] - x1) / (x1 - x0); - boundaryCnt++; - } - - if((i === 0 || i === ni - 1) && (j > 0 && j < nj - 1)) { - // If along the min(i) or max(i) boundaries, also smooth vertically as long - // as we're not in a corner. Note that the finite differences used here - // are also aware of nonuniform grid spacing: - dxp = b[j + 1] - b[j]; - dxm = b[j] - b[j - 1]; - newVal += (dxm * data[j + 1][i] + dxp * data[j - 1][i]) / (dxm + dxp); - boundaryCnt++; - } - - if(j === 0) { - // If along the j = 0 boundary, extrpolate this point from the two points - // above it - j0 = Math.min(nj - 1, 2); - x0 = b[j0]; - x1 = b[1]; - d0 = data[j0][i]; - d1 = data[1][i]; - newVal += d1 + (d1 - d0) * (b[0] - x1) / (x1 - x0); - boundaryCnt++; - } else if(j === nj - 1) { - // Same for the max j boundary from the cells below it: - j0 = Math.max(0, nj - 3); - x0 = b[j0]; - x1 = b[nj - 2]; - d0 = data[j0][i]; - d1 = data[nj - 2][i]; - newVal += d1 + (d1 - d0) * (b[nj - 1] - x1) / (x1 - x0); - boundaryCnt++; - } - - if((j === 0 || j === nj - 1) && (i > 0 && i < ni - 1)) { - // Now average points to the left/right as long as not in a corner: - dxp = a[i + 1] - a[i]; - dxm = a[i] - a[i - 1]; - newVal += (dxm * data[j][i + 1] + dxp * data[j][i - 1]) / (dxm + dxp); - boundaryCnt++; - } - - if(!boundaryCnt) { - // If none of the above conditions were triggered, then this is an interior - // point and we can just do a laplace equation update. As above, these differences - // are aware of nonuniform grid spacing: - dap = a[i + 1] - a[i]; - dam = a[i] - a[i - 1]; - dbp = b[j + 1] - b[j]; - dbm = b[j] - b[j - 1]; - - // These are just some useful constants for the iteration, which is perfectly - // straightforward but a little long to derive from f_xx + f_yy = 0. - c = dap * dam * (dap + dam); - d = dbp * dbm * (dbp + dbm); - - newVal = (c * (dbm * data[j + 1][i] + dbp * data[j - 1][i]) + - d * (dam * data[j][i + 1] + dap * data[j][i - 1])) / - (d * (dam + dap) + c * (dbm + dbp)); - } else { - // If we did have contributions from the boundary conditions, then average - // the result from the various contributions: - newVal /= boundaryCnt; - } - - // Jacobi updates are ridiculously slow to converge, so this approach uses a - // Gauss-seidel iteration which is dramatically faster. - diff = newVal - data[j][i]; - reldiff = diff / dmax; - resid += reldiff * reldiff; - - // Gauss-Seidel-ish iteration, omega chosen based on heuristics and some - // quick tests. - // - // NB: Don't overrelax the boundarie. Otherwise set an overrelaxation factor - // which is a little low but safely optimal-ish: - overrelaxation = boundaryCnt ? 0 : 0.85; - - // If there are four non-null neighbors, then we want a simple average without - // overrelaxation. If all the surrouding points are null, then we want the full - // overrelaxation - // - // Based on experiments, this actually seems to slow down convergence just a bit. - // I'll leave it here for reference in case this needs to be revisited, but - // it seems to work just fine without this. - // if (overrelaxation) overrelaxation *= (4 - neighborCnt) / 4; - - data[j][i] += diff * (1 + overrelaxation); - } - - resid = Math.sqrt(resid); - } while(iter++ < itermax && resid > tol); - - Lib.log('Smoother converged to', resid, 'after', iter, 'iterations'); - - return data; -}; - -},{"../../lib":685}],866:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var hasColumns = require('./has_columns'); -var convertColumnData = require('../heatmap/convert_column_xyz'); - -module.exports = function handleXYDefaults(traceIn, traceOut, coerce) { - var cols = []; - var x = coerce('x'); - - var needsXTransform = x && !hasColumns(x); - if(needsXTransform) cols.push('x'); - - traceOut._cheater = !x; - - var y = coerce('y'); - - var needsYTransform = y && !hasColumns(y); - if(needsYTransform) cols.push('y'); - - if(!x && !y) return; - - if(cols.length) { - convertColumnData(traceOut, traceOut.aaxis, traceOut.baxis, 'a', 'b', cols); - } - - return true; -}; - -},{"../heatmap/convert_column_xyz":907,"./has_columns":856}],867:[function(require,module,exports){ +},{"../../lib":680,"../ohlc/helpers":894}],829:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155063,7 +150087,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../../plots/attributes":722,"../scattergeo/attributes":1013}],868:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../../plots/attributes":717,"../scattergeo/attributes":953}],830:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155082,7 +150106,7 @@ module.exports = function calc(gd, trace) { colorscaleCalc(trace, trace.z, '', 'z'); }; -},{"../../components/colorscale/calc":584}],869:[function(require,module,exports){ +},{"../../components/colorscale/calc":581}],831:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155137,7 +150161,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('hoverinfo', (layout._dataLength === 1) ? 'location+z+text' : undefined); }; -},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":867}],870:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":829}],832:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155156,7 +150180,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],871:[function(require,module,exports){ +},{}],833:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155226,7 +150250,7 @@ function makeHoverInfo(pointData, trace, pt, axis) { pointData.extraText = text.join('
'); } -},{"../../plots/cartesian/axes":724,"./attributes":867}],872:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"./attributes":829}],834:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155258,7 +150282,7 @@ Choropleth.meta = { module.exports = Choropleth; -},{"../../plots/geo":752,"../heatmap/colorbar":906,"./attributes":867,"./calc":868,"./defaults":869,"./event_data":870,"./hover":871,"./plot":873}],873:[function(require,module,exports){ +},{"../../plots/geo":743,"../heatmap/colorbar":854,"./attributes":829,"./calc":830,"./defaults":831,"./event_data":832,"./hover":833,"./plot":835}],835:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155392,7 +150416,7 @@ function style(geo) { }); } -},{"../../components/color":578,"../../components/colorscale":592,"../../components/drawing":602,"../../lib/array_to_calc_item":671,"../../lib/geo_location_utils":680,"../../lib/topojson_utils":706,"../../plots/geo/constants":750,"d3":107}],874:[function(require,module,exports){ +},{"../../components/color":575,"../../components/colorscale":589,"../../components/drawing":598,"../../lib/array_to_calc_item":667,"../../lib/geo_location_utils":675,"../../lib/topojson_utils":701,"../../plots/geo/constants":741,"d3":104}],836:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155407,7 +150431,6 @@ var heatmapAttrs = require('../heatmap/attributes'); var scatterAttrs = require('../scatter/attributes'); var colorscaleAttrs = require('../../components/colorscale/attributes'); var colorbarAttrs = require('../../components/colorbar/attributes'); -var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; var scatterLineAttrs = scatterAttrs.line; @@ -155481,7 +150504,7 @@ module.exports = extendFlat({}, { }), width: scatterLineAttrs.width, - dash: dash, + dash: scatterLineAttrs.dash, smoothing: extendFlat({}, scatterLineAttrs.smoothing, { }) @@ -155492,7 +150515,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../components/drawing/attributes":601,"../../lib/extend":677,"../heatmap/attributes":903,"../scatter/attributes":976}],875:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../heatmap/attributes":851,"../scatter/attributes":924}],837:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155596,7 +150619,7 @@ function autoContours(start, end, ncontours) { return dummyAx; } -},{"../../lib":685,"../../plots/cartesian/axes":724,"../heatmap/calc":904}],876:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../heatmap/calc":852}],838:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155621,7 +150644,7 @@ module.exports = function colorbar(gd, cd) { gd._fullLayout._infolayer.selectAll('.' + cbId).remove(); - if(!trace.showscale) { + if(trace.showscale === false) { Plots.autoMargin(gd, cbId); return; } @@ -155658,7 +150681,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":581,"../../plots/plots":787,"./end_plus":880,"./make_color_map":884}],877:[function(require,module,exports){ +},{"../../components/colorbar/draw":578,"../../plots/plots":778,"./end_plus":842,"./make_color_map":846}],839:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155698,7 +150721,7 @@ module.exports.CHOOSESADDLE = { // substitute to be used up later? module.exports.SADDLEREMAINDER = {1: 4, 2: 8, 4: 1, 7: 13, 8: 2, 11: 14, 13: 7, 14: 11}; -},{}],878:[function(require,module,exports){ +},{}],840:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155730,7 +150753,7 @@ module.exports = function handleContourDefaults(traceIn, traceOut, coerce) { if(autoContour || !contourSize) coerce('ncontours'); }; -},{"../../lib":685,"./attributes":874}],879:[function(require,module,exports){ +},{"../../lib":680,"./attributes":836}],841:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155769,7 +150792,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout handleStyleDefaults(traceIn, traceOut, coerce, layout); }; -},{"../../lib":685,"../heatmap/has_columns":910,"../heatmap/xyz_defaults":918,"./attributes":874,"./contours_defaults":878,"./style_defaults":888}],880:[function(require,module,exports){ +},{"../../lib":680,"../heatmap/has_columns":858,"../heatmap/xyz_defaults":866,"./attributes":836,"./contours_defaults":840,"./style_defaults":850}],842:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155789,7 +150812,7 @@ module.exports = function endPlus(contours) { return contours.end + contours.size / 1e6; }; -},{}],881:[function(require,module,exports){ +},{}],843:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -155803,38 +150826,34 @@ module.exports = function endPlus(contours) { var Lib = require('../../lib'); var constants = require('./constants'); -module.exports = function findAllPaths(pathinfo, xtol, ytol) { +module.exports = function findAllPaths(pathinfo) { var cnt, startLoc, i, pi, j; - // Default just passes these values through as they were before: - xtol = xtol || 0.01; - ytol = ytol || 0.01; - for(i = 0; i < pathinfo.length; i++) { pi = pathinfo[i]; for(j = 0; j < pi.starts.length; j++) { startLoc = pi.starts[j]; - makePath(pi, startLoc, 'edge', xtol, ytol); + makePath(pi, startLoc, 'edge'); } cnt = 0; while(Object.keys(pi.crossings).length && cnt < 10000) { cnt++; startLoc = Object.keys(pi.crossings)[0].split(',').map(Number); - makePath(pi, startLoc, undefined, xtol, ytol); + makePath(pi, startLoc); } if(cnt === 10000) Lib.log('Infinite loop in contour?'); } }; -function equalPts(pt1, pt2, xtol, ytol) { - return Math.abs(pt1[0] - pt2[0]) < xtol && - Math.abs(pt1[1] - pt2[1]) < ytol; +function equalPts(pt1, pt2) { + return Math.abs(pt1[0] - pt2[0]) < 0.01 && + Math.abs(pt1[1] - pt2[1]) < 0.01; } function ptDist(pt1, pt2) { @@ -155843,17 +150862,17 @@ function ptDist(pt1, pt2) { return Math.sqrt(dx * dx + dy * dy); } -function makePath(pi, loc, edgeflag, xtol, ytol) { - var startLocStr = loc.join(','); - var locStr = startLocStr; - var mi = pi.crossings[locStr]; - var marchStep = startStep(mi, edgeflag, loc); - // start by going backward a half step and finding the crossing point - var pts = [getInterpPx(pi, loc, [-marchStep[0], -marchStep[1]])]; - var startStepStr = marchStep.join(','); - var m = pi.z.length; - var n = pi.z[0].length; - var cnt; +function makePath(pi, loc, edgeflag) { + var startLocStr = loc.join(','), + locStr = startLocStr, + mi = pi.crossings[locStr], + marchStep = startStep(mi, edgeflag, loc), + // start by going backward a half step and finding the crossing point + pts = [getInterpPx(pi, loc, [-marchStep[0], -marchStep[1]])], + startStepStr = marchStep.join(','), + m = pi.z.length, + n = pi.z[0].length, + cnt; // now follow the path for(cnt = 0; cnt < 10000; cnt++) { // just to avoid infinite loops @@ -155877,7 +150896,7 @@ function makePath(pi, loc, edgeflag, xtol, ytol) { loc[1] += marchStep[1]; // don't include the same point multiple times - if(equalPts(pts[pts.length - 1], pts[pts.length - 2], xtol, ytol)) pts.pop(); + if(equalPts(pts[pts.length - 1], pts[pts.length - 2])) pts.pop(); locStr = loc.join(','); var atEdge = (marchStep[0] && (loc[0] < 0 || loc[0] > n - 2)) || @@ -155893,7 +150912,7 @@ function makePath(pi, loc, edgeflag, xtol, ytol) { if(cnt === 10000) { Lib.log('Infinite loop in contour?'); } - var closedpath = equalPts(pts[0], pts[pts.length - 1], xtol, ytol), + var closedpath = equalPts(pts[0], pts[pts.length - 1]), totaldist = 0, distThresholdFactor = 0.2 * pi.smoothing, alldists = [], @@ -155982,7 +151001,7 @@ function makePath(pi, loc, edgeflag, xtol, ytol) { // edge path - does it start where an existing edge path ends, or vice versa? var merged = false; pi.edgepaths.forEach(function(edgepath, edgei) { - if(!merged && equalPts(edgepath[0], pts[pts.length - 1], xtol, ytol)) { + if(!merged && equalPts(edgepath[0], pts[pts.length - 1])) { pts.pop(); merged = true; @@ -155990,7 +151009,7 @@ function makePath(pi, loc, edgeflag, xtol, ytol) { var doublemerged = false; pi.edgepaths.forEach(function(edgepath2, edgei2) { if(!doublemerged && equalPts( - edgepath2[edgepath2.length - 1], pts[0], xtol, ytol)) { + edgepath2[edgepath2.length - 1], pts[0])) { doublemerged = true; pts.splice(0, 1); pi.edgepaths.splice(edgei, 1); @@ -156010,7 +151029,7 @@ function makePath(pi, loc, edgeflag, xtol, ytol) { } }); pi.edgepaths.forEach(function(edgepath, edgei) { - if(!merged && equalPts(edgepath[edgepath.length - 1], pts[0], xtol, ytol)) { + if(!merged && equalPts(edgepath[edgepath.length - 1], pts[0])) { pts.splice(0, 1); pi.edgepaths[edgei] = edgepath.concat(pts); merged = true; @@ -156053,7 +151072,6 @@ function getInterpPx(pi, loc, step) { if(step[1]) { var dx = (pi.level - zxy) / (pi.z[locy][locx + 1] - zxy); - return [xa.c2p((1 - dx) * pi.x[locx] + dx * pi.x[locx + 1], true), ya.c2p(pi.y[locy], true)]; } @@ -156064,7 +151082,7 @@ function getInterpPx(pi, loc, step) { } } -},{"../../lib":685,"./constants":877}],882:[function(require,module,exports){ +},{"../../lib":680,"./constants":839}],844:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156083,7 +151101,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return heatmapHoverPoints(pointData, xval, yval, hovermode, true); }; -},{"../heatmap/hover":911}],883:[function(require,module,exports){ +},{"../heatmap/hover":859}],845:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156115,7 +151133,7 @@ Contour.meta = { module.exports = Contour; -},{"../../plots/cartesian":734,"./attributes":874,"./calc":875,"./colorbar":876,"./defaults":879,"./hover":882,"./plot":886,"./style":887}],884:[function(require,module,exports){ +},{"../../plots/cartesian":727,"./attributes":836,"./calc":837,"./colorbar":838,"./defaults":841,"./hover":844,"./plot":848,"./style":849}],846:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156139,11 +151157,6 @@ module.exports = function makeColorMap(trace) { nc = Math.floor((end - start) / cs) + 1, extra = contours.coloring === 'lines' ? 0 : 1; - if(!isFinite(cs)) { - cs = 1; - nc = 1; - } - var scl = trace.colorscale, len = scl.length; @@ -156199,7 +151212,7 @@ module.exports = function makeColorMap(trace) { }); }; -},{"../../components/colorscale":592,"./end_plus":880,"d3":107}],885:[function(require,module,exports){ +},{"../../components/colorscale":589,"./end_plus":842,"d3":104}],847:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156291,7 +151304,7 @@ function getMarchingIndex(val, corners) { return (mi === 15) ? 0 : mi; } -},{"./constants":877}],886:[function(require,module,exports){ +},{"./constants":839}],848:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156571,8 +151584,7 @@ function makeLines(plotgroup, pathinfo, contours) { .attr('d', function(d) { return Drawing.smoothopen(d, smoothing); }) - .style('stroke-miterlimit', 1) - .style('vector-effect', 'non-scaling-stroke'); + .style('stroke-miterlimit', 1); var closedcontourlines = linegroup.selectAll('path.closedline') .data(function(d) { return d.paths; }); @@ -156583,8 +151595,7 @@ function makeLines(plotgroup, pathinfo, contours) { .attr('d', function(d) { return Drawing.smoothclosed(d, smoothing); }) - .style('stroke-miterlimit', 1) - .style('vector-effect', 'non-scaling-stroke'); + .style('stroke-miterlimit', 1); } function clipGaps(plotGroup, plotinfo, cd0, perimeter) { @@ -156655,7 +151666,7 @@ function makeClipMask(cd0) { return z; } -},{"../../components/drawing":602,"../../lib":685,"../heatmap/plot":916,"./end_plus":880,"./find_all_paths":881,"./make_crossings":885,"d3":107}],887:[function(require,module,exports){ +},{"../../components/drawing":598,"../../lib":680,"../heatmap/plot":864,"./end_plus":842,"./find_all_paths":843,"./make_crossings":847,"d3":104}],849:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156717,7 +151728,7 @@ module.exports = function style(gd) { heatmapStyle(gd); }; -},{"../../components/drawing":602,"../heatmap/style":917,"./make_color_map":884,"d3":107}],888:[function(require,module,exports){ +},{"../../components/drawing":598,"../heatmap/style":865,"./make_color_map":846,"d3":104}],850:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -156732,15 +151743,15 @@ module.exports = function style(gd) { var colorscaleDefaults = require('../../components/colorscale/defaults'); -module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout, defaultColor, defaultWidth) { +module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout) { var coloring = coerce('contours.coloring'); var showLines; if(coloring === 'fill') showLines = coerce('contours.showlines'); if(showLines !== false) { - if(coloring !== 'lines') coerce('line.color', defaultColor || '#000'); - coerce('line.width', defaultWidth === undefined ? 0.5 : defaultWidth); + if(coloring !== 'lines') coerce('line.color', '#000'); + coerce('line.width', 0.5); coerce('line.dash'); } @@ -156753,1396 +151764,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout, } }; -},{"../../components/colorscale/defaults":587}],889:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var heatmapAttrs = require('../heatmap/attributes'); -var scatterAttrs = require('../scatter/attributes'); -var colorscaleAttrs = require('../../components/colorscale/attributes'); -var colorbarAttrs = require('../../components/colorbar/attributes'); - -var extendFlat = require('../../lib/extend').extendFlat; - -var scatterLineAttrs = scatterAttrs.line; -var constants = require('./constants'); - -module.exports = extendFlat({}, { - carpet: { - valType: 'string', - - - }, - z: heatmapAttrs.z, - a: heatmapAttrs.x, - a0: heatmapAttrs.x0, - da: heatmapAttrs.dx, - b: heatmapAttrs.y, - b0: heatmapAttrs.y0, - db: heatmapAttrs.dy, - text: heatmapAttrs.text, - transpose: heatmapAttrs.transpose, - atype: heatmapAttrs.xtype, - btype: heatmapAttrs.ytype, - - mode: { - valType: 'flaglist', - flags: ['lines', 'fill'], - extras: ['none'], - - - }, - - connectgaps: heatmapAttrs.connectgaps, - - fillcolor: { - valType: 'color', - - - }, - - autocontour: { - valType: 'boolean', - dflt: true, - - - }, - ncontours: { - valType: 'integer', - dflt: 15, - min: 1, - - - }, - - contours: { - type: { - valType: 'enumerated', - values: ['levels', 'constraint'], - dflt: 'levels', - - - }, - start: { - valType: 'number', - dflt: null, - - - }, - end: { - valType: 'number', - dflt: null, - - - }, - size: { - valType: 'number', - dflt: null, - min: 0, - - - }, - coloring: { - valType: 'enumerated', - values: ['fill', 'lines', 'none'], - dflt: 'fill', - - - }, - showlines: { - valType: 'boolean', - dflt: true, - - - }, - operation: { - valType: 'enumerated', - values: [].concat(constants.INEQUALITY_OPS).concat(constants.INTERVAL_OPS).concat(constants.SET_OPS), - - dflt: '=', - - }, - value: { - valType: 'any', - dflt: 0, - - - } - }, - - line: { - color: extendFlat({}, scatterLineAttrs.color, { - - }), - width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash, - smoothing: extendFlat({}, scatterLineAttrs.smoothing, { - - }) - } -}, - colorscaleAttrs, - { autocolorscale: extendFlat({}, colorscaleAttrs.autocolorscale, {dflt: false}) }, - { colorbar: colorbarAttrs } -); - -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../heatmap/attributes":903,"../scatter/attributes":976,"./constants":892}],890:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Lib = require('../../lib'); -var Axes = require('../../plots/cartesian/axes'); -var extendFlat = require('../../lib').extendFlat; -var Registry = require('../../registry'); -var colorscaleCalc = require('../../components/colorscale/calc'); -var hasColumns = require('../heatmap/has_columns'); -var convertColumnData = require('../heatmap/convert_column_xyz'); -var clean2dArray = require('../heatmap/clean_2d_array'); -var maxRowLength = require('../heatmap/max_row_length'); -var interp2d = require('../heatmap/interp2d'); -var findEmpties = require('../heatmap/find_empties'); -var makeBoundArray = require('../heatmap/make_bound_array'); -var supplyDefaults = require('./defaults'); -var lookupCarpet = require('../carpet/lookup_carpetid'); - -// most is the same as heatmap calc, then adjust it -// though a few things inside heatmap calc still look for -// contour maps, because the makeBoundArray calls are too entangled -module.exports = function calc(gd, trace) { - var carpet = trace.carpetTrace = lookupCarpet(gd, trace); - if(!carpet || !carpet.visible || carpet.visible === 'legendonly') return; - - if(!trace.a || !trace.b) { - // Look up the original incoming carpet data: - var carpetdata = gd.data[carpet.index]; - - // Look up the incoming trace data, *except* perform a shallow - // copy so that we're not actually modifying it when we use it - // to supply defaults: - var tracedata = gd.data[trace.index]; - // var tracedata = extendFlat({}, gd.data[trace.index]); - - // If the data is not specified - if(!tracedata.a) tracedata.a = carpetdata.a; - if(!tracedata.b) tracedata.b = carpetdata.b; - - supplyDefaults(tracedata, trace, trace._defaultColor, gd._fullLayout); - } - - var cd = heatmappishCalc(gd, trace), - contours = trace.contours; - - // Autocontour is unset for constraint plots so also autocontour if undefind: - if(trace.autocontour === true) { - var dummyAx = autoContours(trace.zmin, trace.zmax, trace.ncontours); - - contours.size = dummyAx.dtick; - - contours.start = Axes.tickFirst(dummyAx); - dummyAx.range.reverse(); - contours.end = Axes.tickFirst(dummyAx); - - if(contours.start === trace.zmin) contours.start += contours.size; - if(contours.end === trace.zmax) contours.end -= contours.size; - - // if you set a small ncontours, *and* the ends are exactly on zmin/zmax - // there's an edge case where start > end now. Make sure there's at least - // one meaningful contour, put it midway between the crossed values - if(contours.start > contours.end) { - contours.start = contours.end = (contours.start + contours.end) / 2; - } - - // copy auto-contour info back to the source data. - trace._input.contours = extendFlat({}, contours); - } - else { - // sanity checks on manually-supplied start/end/size - var start = contours.start, - end = contours.end, - inputContours = trace._input.contours; - - if(start > end) { - contours.start = inputContours.start = end; - end = contours.end = inputContours.end = start; - start = contours.start; - } - - if(!(contours.size > 0)) { - var sizeOut; - if(start === end) sizeOut = 1; - else sizeOut = autoContours(start, end, trace.ncontours).dtick; - - inputContours.size = contours.size = sizeOut; - } - } - - return cd; -}; - -/* - * autoContours: make a dummy axis object with dtick we can use - * as contours.size, and if needed we can use Axes.tickFirst - * with this axis object to calculate the start and end too - * - * start: the value to start the contours at - * end: the value to end at (must be > start) - * ncontours: max number of contours to make, like roughDTick - * - * returns: an axis object - */ -function autoContours(start, end, ncontours) { - var dummyAx = { - type: 'linear', - range: [start, end] - }; - - Axes.autoTicks( - dummyAx, - (end - start) / (ncontours || 15) - ); - - return dummyAx; -} - -function heatmappishCalc(gd, trace) { - // prepare the raw data - // run makeCalcdata on x and y even for heatmaps, in case of category mappings - var carpet = trace.carpetTrace; - var aax = carpet.aaxis, - bax = carpet.baxis, - isContour = Registry.traceIs(trace, 'contour'), - zsmooth = isContour ? 'best' : trace.zsmooth, - a, - a0, - da, - b, - b0, - db, - z, - i; - - // cancel minimum tick spacings (only applies to bars and boxes) - aax._minDtick = 0; - bax._minDtick = 0; - - if(hasColumns(trace)) convertColumnData(trace, aax, bax, 'a', 'b', ['z']); - - a = trace.a ? aax.makeCalcdata(trace, 'a') : []; - b = trace.b ? bax.makeCalcdata(trace, 'b') : []; - a0 = trace.a0 || 0; - da = trace.da || 1; - b0 = trace.b0 || 0; - db = trace.db || 1; - - z = clean2dArray(trace.z, trace.transpose); - - trace._emptypoints = findEmpties(z); - trace._interpz = interp2d(z, trace._emptypoints, trace._interpz); - - function noZsmooth(msg) { - zsmooth = trace._input.zsmooth = trace.zsmooth = false; - Lib.notifier('cannot fast-zsmooth: ' + msg); - } - - // check whether we really can smooth (ie all boxes are about the same size) - if(zsmooth === 'fast') { - if(aax.type === 'log' || bax.type === 'log') { - noZsmooth('log axis found'); - } - else { - if(a.length) { - var avgda = (a[a.length - 1] - a[0]) / (a.length - 1), - maxErrX = Math.abs(avgda / 100); - for(i = 0; i < a.length - 1; i++) { - if(Math.abs(a[i + 1] - a[i] - avgda) > maxErrX) { - noZsmooth('a scale is not linear'); - break; - } - } - } - if(b.length && zsmooth === 'fast') { - var avgdy = (b[b.length - 1] - b[0]) / (b.length - 1), - maxErrY = Math.abs(avgdy / 100); - for(i = 0; i < b.length - 1; i++) { - if(Math.abs(b[i + 1] - b[i] - avgdy) > maxErrY) { - noZsmooth('b scale is not linear'); - break; - } - } - } - } - } - - // create arrays of brick boundaries, to be used by autorange and heatmap.plot - var xlen = maxRowLength(z), - xIn = trace.xtype === 'scaled' ? '' : a, - xArray = makeBoundArray(trace, xIn, a0, da, xlen, aax), - yIn = trace.ytype === 'scaled' ? '' : b, - yArray = makeBoundArray(trace, yIn, b0, db, z.length, bax); - - var cd0 = { - a: xArray, - b: yArray, - z: z, - //mappedZ: mappedZ - }; - - if(trace.contours.type === 'levels') { - // auto-z and autocolorscale if applicable - colorscaleCalc(trace, z, '', 'z'); - } - - return [cd0]; -} - -},{"../../components/colorscale/calc":584,"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"../carpet/lookup_carpetid":858,"../heatmap/clean_2d_array":905,"../heatmap/convert_column_xyz":907,"../heatmap/find_empties":909,"../heatmap/has_columns":910,"../heatmap/interp2d":913,"../heatmap/make_bound_array":914,"../heatmap/max_row_length":915,"./defaults":896}],891:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = function(pathinfo, operation, perimeter, trace) { - // Abandon all hope, ye who enter here. - var i, v1, v2; - var na = trace.a.length; - var nb = trace.b.length; - var z = trace.z; - - var boundaryMax = -Infinity; - var boundaryMin = Infinity; - - for(i = 0; i < nb; i++) { - boundaryMin = Math.min(boundaryMin, z[i][0]); - boundaryMin = Math.min(boundaryMin, z[i][na - 1]); - boundaryMax = Math.max(boundaryMax, z[i][0]); - boundaryMax = Math.max(boundaryMax, z[i][na - 1]); - } - - for(i = 1; i < na - 1; i++) { - boundaryMin = Math.min(boundaryMin, z[0][i]); - boundaryMin = Math.min(boundaryMin, z[nb - 1][i]); - boundaryMax = Math.max(boundaryMax, z[0][i]); - boundaryMax = Math.max(boundaryMax, z[nb - 1][i]); - } - - switch(operation) { - case '>': - case '>=': - if(trace.contours.value > boundaryMax) { - pathinfo[0].prefixBoundary = true; - } - break; - case '<': - case '<=': - if(trace.contours.value < boundaryMin) { - pathinfo[0].prefixBoundary = true; - } - break; - case '[]': - case '()': - v1 = Math.min.apply(null, trace.contours.value); - v2 = Math.max.apply(null, trace.contours.value); - if(v2 < boundaryMin) { - pathinfo[0].prefixBoundary = true; - } - if(v1 > boundaryMax) { - pathinfo[0].prefixBoundary = true; - } - break; - case '][': - case ')(': - v1 = Math.min.apply(null, trace.contours.value); - v2 = Math.max.apply(null, trace.contours.value); - if(v1 < boundaryMin && v2 > boundaryMax) { - pathinfo[0].prefixBoundary = true; - } - break; - } -}; - -},{}],892:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = { - INEQUALITY_OPS: ['=', '<', '>=', '>', '<='], - INTERVAL_OPS: ['[]', '()', '[)', '(]', '][', ')(', '](', ')['], - SET_OPS: ['{}', '}{'] -}; - -},{}],893:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var constants = require('./constants'); -var isNumeric = require('fast-isnumeric'); - -// This syntax conforms to the existing filter transform syntax, but we don't care -// about open vs. closed intervals for simply drawing contours constraints: -module.exports['[]'] = makeRangeSettings('[]'); -module.exports['()'] = makeRangeSettings('()'); -module.exports['[)'] = makeRangeSettings('[)'); -module.exports['(]'] = makeRangeSettings('(]'); - -// Inverted intervals simply flip the sign: -module.exports[']['] = makeRangeSettings(']['); -module.exports[')('] = makeRangeSettings(')('); -module.exports[')['] = makeRangeSettings(')['); -module.exports[']('] = makeRangeSettings(']('); - -module.exports['>'] = makeInequalitySettings('>'); -module.exports['>='] = makeInequalitySettings('>='); -module.exports['<'] = makeInequalitySettings('<'); -module.exports['<='] = makeInequalitySettings('<='); -module.exports['='] = makeInequalitySettings('='); - -// This does not in any way shape or form support calendars. It's adapted from -// transforms/filter.js. -function coerceValue(operation, value) { - var hasArrayValue = Array.isArray(value); - - var coercedValue; - - function coerce(value) { - return isNumeric(value) ? (+value) : null; - } - - if(constants.INEQUALITY_OPS.indexOf(operation) !== -1) { - coercedValue = hasArrayValue ? coerce(value[0]) : coerce(value); - } else if(constants.INTERVAL_OPS.indexOf(operation) !== -1) { - coercedValue = hasArrayValue ? - [coerce(value[0]), coerce(value[1])] : - [coerce(value), coerce(value)]; - } else if(constants.SET_OPS.indexOf(operation) !== -1) { - coercedValue = hasArrayValue ? value.map(coerce) : [coerce(value)]; - } - - return coercedValue; -} - -// Returns a parabola scaled so that the min/max is either +/- 1 and zero at the two values -// provided. The data is mapped by this function when constructing intervals so that it's -// very easy to construct contours as normal. -function makeRangeSettings(operation) { - return function(value) { - value = coerceValue(operation, value); - - // Ensure proper ordering: - var min = Math.min(value[0], value[1]); - var max = Math.max(value[0], value[1]); - - return { - start: min, - end: max, - size: max - min - }; - }; -} - -function makeInequalitySettings(operation) { - return function(value) { - value = coerceValue(operation, value); - - return { - start: value, - end: Infinity, - size: Infinity - }; - }; -} - -},{"./constants":892,"fast-isnumeric":116}],894:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var constraintMapping = require('./constraint_mapping'); -var isNumeric = require('fast-isnumeric'); - -module.exports = function(coerce, contours) { - var zvalue; - var scalarValuedOps = ['=', '<', '<=', '>', '>=']; - - if(scalarValuedOps.indexOf(contours.operation) === -1) { - // Requires an array of two numbers: - coerce('contours.value', [0, 1]); - - if(!Array.isArray(contours.value)) { - if(isNumeric(contours.value)) { - zvalue = parseFloat(contours.value); - contours.value = [zvalue, zvalue + 1]; - } - } else if(contours.value.length > 2) { - contours.value = contours.value.slice(2); - } else if(contours.length === 0) { - contours.value = [0, 1]; - } else if(contours.length < 2) { - zvalue = parseFloat(contours.value[0]); - contours.value = [zvalue, zvalue + 1]; - } else { - contours.value = [ - parseFloat(contours.value[0]), - parseFloat(contours.value[1]) - ]; - } - } else { - // Requires a single scalar: - coerce('contours.value', 0); - - if(!isNumeric(contours.value)) { - if(Array.isArray(contours.value)) { - contours.value = parseFloat(contours.value[0]); - } else { - contours.value = 0; - } - } - } - - var map = constraintMapping[contours.operation](contours.value); - - contours.start = map.start; - contours.end = map.end; - contours.size = map.size; -}; - -},{"./constraint_mapping":893,"fast-isnumeric":116}],895:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Lib = require('../../lib'); - -// The contour extraction is great, except it totally fails for constraints because we -// need weird range loops and flipped contours instead of the usual format. This function -// does some weird manipulation of the extracted pathinfo data such that it magically -// draws contours correctly *as* constraints. -module.exports = function(pathinfo, operation) { - var i, pi0, pi1; - - var op0 = function(arr) { return arr.reverse(); }; - var op1 = function(arr) { return arr; }; - - switch(operation) { - case '][': - case ')[': - case '](': - case ')(': - var tmp = op0; - op0 = op1; - op1 = tmp; - // It's a nice rule, except this definitely *is* what's intended here. - /* eslint-disable: no-fallthrough */ - case '[]': - case '[)': - case '(]': - case '()': - /* eslint-enable: no-fallthrough */ - if(pathinfo.length !== 2) { - Lib.warn('Contour data invalid for the specified inequality range operation.'); - return; - } - - // In this case there should be exactly two contour levels in pathinfo. We - // simply concatenate the info into one pathinfo and flip all of the data - // in one. This will draw the contour as closed. - pi0 = pathinfo[0]; - pi1 = pathinfo[1]; - - for(i = 0; i < pi0.edgepaths.length; i++) { - pi0.edgepaths[i] = op0(pi0.edgepaths[i]); - } - - for(i = 0; i < pi0.paths.length; i++) { - pi0.paths[i] = op0(pi0.paths[i]); - } - - while(pi1.edgepaths.length) { - pi0.edgepaths.push(op1(pi1.edgepaths.shift())); - } - while(pi1.paths.length) { - pi0.paths.push(op1(pi1.paths.shift())); - } - pathinfo.pop(); - - break; - case '>=': - case '>': - if(pathinfo.length !== 1) { - Lib.warn('Contour data invalid for the specified inequality operation.'); - return; - } - - // In this case there should be exactly two contour levels in pathinfo. We - // simply concatenate the info into one pathinfo and flip all of the data - // in one. This will draw the contour as closed. - pi0 = pathinfo[0]; - - for(i = 0; i < pi0.edgepaths.length; i++) { - pi0.edgepaths[i] = op0(pi0.edgepaths[i]); - } - - for(i = 0; i < pi0.paths.length; i++) { - pi0.paths[i] = op0(pi0.paths[i]); - } - break; - } -}; - -},{"../../lib":685}],896:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var Lib = require('../../lib'); - -var handleXYZDefaults = require('../heatmap/xyz_defaults'); -var attributes = require('./attributes'); -var handleStyleDefaults = require('../contour/style_defaults'); -var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); -var plotAttributes = require('../../plots/attributes'); -var supplyConstraintDefaults = require('./constraint_value_defaults'); -var addOpacity = require('../../components/color').addOpacity; - -module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { - function coerce(attr, dflt) { - return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); - } - - coerce('carpet'); - - // If either a or b is not present, then it's not a valid trace *unless* the carpet - // axis has the a or b values we're looking for. So if these are not found, just defer - // that decision until the calc step. - // - // NB: the calc step will modify the original data input by assigning whichever of - // a or b are missing. This is necessary because panning goes right from supplyDefaults - // to plot (skipping calc). That means on subsequent updates, this *will* need to be - // able to find a and b. - // - // The long-term proper fix is that this should perhaps use underscored attributes to - // at least modify the user input to a slightly lesser extent. Fully removing the - // input mutation is challenging. The underscore approach is not currently taken since - // it requires modification to all of the functions below that expect the coerced - // attribute name to match the property name -- except '_a' !== 'a' so that is not - // straightforward. - if(traceIn.a && traceIn.b) { - var contourSize, contourStart, contourEnd, missingEnd, autoContour; - - var len = handleXYZDefaults(traceIn, traceOut, coerce, layout, 'a', 'b'); - - if(!len) { - traceOut.visible = false; - return; - } - - coerce('text'); - coerce('contours.type'); - - var contours = traceOut.contours; - - // Unimplemented: - // coerce('connectgaps', hasColumns(traceOut)); - - if(contours.type === 'constraint') { - coerce('contours.operation'); - - supplyConstraintDefaults(coerce, contours); - - // Override the trace-level showlegend default with a default that takes - // into account whether this is a constraint or level contours: - Lib.coerce(traceIn, traceOut, plotAttributes, 'showlegend', true); - - // Override the above defaults with constraint-aware tweaks: - coerce('contours.coloring', contours.operation === '=' ? 'lines' : 'fill'); - coerce('contours.showlines', true); - - if(contours.operation === '=') { - contours.coloring = 'lines'; - } - handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce); - - // If there's a fill color, use it at full opacity for the line color - var lineDfltColor = traceOut.fillcolor ? addOpacity(traceOut.fillcolor, 1) : defaultColor; - - handleStyleDefaults(traceIn, traceOut, coerce, layout, lineDfltColor, 2); - - if(contours.operation === '=') { - coerce('line.color', defaultColor); - - if(contours.coloring === 'fill') { - contours.coloring = 'lines'; - } - - if(contours.coloring === 'lines') { - delete traceOut.fillcolor; - } - } - - delete traceOut.showscale; - delete traceOut.autocontour; - delete traceOut.autocolorscale; - delete traceOut.colorscale; - delete traceOut.ncontours; - delete traceOut.colorbar; - - if(traceOut.line) { - delete traceOut.line.autocolorscale; - delete traceOut.line.colorscale; - delete traceOut.line.mincolor; - delete traceOut.line.maxcolor; - } - - // TODO: These shouldb e deleted in accordance with toolpanel convention, but - // we can't becuase we require them so that it magically makes the contour - // parts of the code happy: - // delete traceOut.contours.start; - // delete traceOut.contours.end; - // delete traceOut.contours.size; - } else { - // Override the trace-level showlegend default with a default that takes - // into account whether this is a constraint or level contours: - Lib.coerce(traceIn, traceOut, plotAttributes, 'showlegend', false); - - contourStart = Lib.coerce2(traceIn, traceOut, attributes, 'contours.start'); - contourEnd = Lib.coerce2(traceIn, traceOut, attributes, 'contours.end'); - - // normally we only need size if autocontour is off. But contour.calc - // pushes its calculated contour size back to the input trace, so for - // things like restyle that can call supplyDefaults without calc - // after the initial draw, we can just reuse the previous calculation - contourSize = coerce('contours.size'); - coerce('contours.coloring'); - - missingEnd = (contourStart === false) || (contourEnd === false); - - if(missingEnd) { - autoContour = traceOut.autocontour = true; - } else { - autoContour = coerce('autocontour', false); - } - - if(autoContour || !contourSize) { - coerce('ncontours'); - } - - handleStyleDefaults(traceIn, traceOut, coerce, layout); - - delete traceOut.value; - delete traceOut.operation; - } - } else { - traceOut._defaultColor = defaultColor; - } -}; - -},{"../../components/color":578,"../../lib":685,"../../plots/attributes":722,"../contour/style_defaults":888,"../heatmap/xyz_defaults":918,"../scatter/fillcolor_defaults":983,"./attributes":889,"./constraint_value_defaults":894}],897:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Lib = require('../../lib'); - -module.exports = function emptyPathinfo(contours, plotinfo, cd0) { - var cs = contours.size; - var pathinfo = []; - - var carpet = cd0.trace.carpetTrace; - - for(var ci = contours.start; ci < contours.end + cs / 10; ci += cs) { - pathinfo.push({ - level: ci, - // all the cells with nontrivial marching index - crossings: {}, - // starting points on the edges of the lattice for each contour - starts: [], - // all unclosed paths (may have less items than starts, - // if a path is closed by rounding) - edgepaths: [], - // all closed paths - paths: [], - // store axes so we can convert to px - xaxis: carpet.aaxis, - yaxis: carpet.baxis, - // full data arrays to use for interpolation - x: cd0.a, - y: cd0.b, - z: cd0.z, - smoothing: cd0.trace.line.smoothing - }); - - if(pathinfo.length > 1000) { - Lib.warn('Too many contours, clipping at 1000', contours); - break; - } - } - return pathinfo; -}; - -},{"../../lib":685}],898:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var ContourCarpet = {}; - -ContourCarpet.attributes = require('./attributes'); -ContourCarpet.supplyDefaults = require('./defaults'); -ContourCarpet.colorbar = require('../contour/colorbar'); -ContourCarpet.calc = require('./calc'); -ContourCarpet.plot = require('./plot'); -ContourCarpet.style = require('./style'); - -ContourCarpet.moduleType = 'trace'; -ContourCarpet.name = 'contourcarpet'; -ContourCarpet.basePlotModule = require('../../plots/cartesian'); -ContourCarpet.categories = ['cartesian', 'carpet', 'contour', 'symbols', 'showLegend', 'hasLines', 'carpetDependent']; -ContourCarpet.meta = { - - -}; - -module.exports = ContourCarpet; - -},{"../../plots/cartesian":734,"../contour/colorbar":876,"./attributes":889,"./calc":890,"./defaults":896,"./plot":901,"./style":902}],899:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var Drawing = require('../../components/drawing'); -var axisAlignedLine = require('../carpet/axis_aligned_line'); -var Lib = require('../../lib'); -// var map1dArray = require('../carpet/map_1d_array'); -// var makepath = require('../carpet/makepath'); - -module.exports = function joinAllPaths(trace, pi, perimeter, ab2p, carpet, carpetcd, xa, ya) { - var i; - var fullpath = ''; - - var startsleft = pi.edgepaths.map(function(v, i) { return i; }); - var newloop = true; - var endpt, newendpt, cnt, nexti, possiblei, addpath; - - var atol = Math.abs(perimeter[0][0] - perimeter[2][0]) * 1e-4; - var btol = Math.abs(perimeter[0][1] - perimeter[2][1]) * 1e-4; - - function istop(pt) { return Math.abs(pt[1] - perimeter[0][1]) < btol; } - function isbottom(pt) { return Math.abs(pt[1] - perimeter[2][1]) < btol; } - function isleft(pt) { return Math.abs(pt[0] - perimeter[0][0]) < atol; } - function isright(pt) { return Math.abs(pt[0] - perimeter[2][0]) < atol; } - - function pathto(pt0, pt1) { - var i, j, segments, axis; - var path = ''; - - if((istop(pt0) && !isright(pt0)) || (isbottom(pt0) && !isleft(pt0))) { - axis = carpet.aaxis; - segments = axisAlignedLine(carpet, carpetcd, [pt0[0], pt1[0]], 0.5 * (pt0[1] + pt1[1])); - } else { - axis = carpet.baxis; - segments = axisAlignedLine(carpet, carpetcd, 0.5 * (pt0[0] + pt1[0]), [pt0[1], pt1[1]]); - } - - for(i = 1; i < segments.length; i++) { - path += axis.smoothing ? 'C' : 'L'; - for(j = 0; j < segments[i].length; j++) { - var pt = segments[i][j]; - path += [xa.c2p(pt[0]), ya.c2p(pt[1])] + ' '; - } - } - - return path; - } - - i = 0; - endpt = null; - while(startsleft.length) { - var startpt = pi.edgepaths[i][0]; - - if(endpt) { - fullpath += pathto(endpt, startpt); - } - - addpath = Drawing.smoothopen(pi.edgepaths[i].map(ab2p), pi.smoothing); - fullpath += newloop ? addpath : addpath.replace(/^M/, 'L'); - startsleft.splice(startsleft.indexOf(i), 1); - endpt = pi.edgepaths[i][pi.edgepaths[i].length - 1]; - nexti = -1; - - // now loop through sides, moving our endpoint until we find a new start - for(cnt = 0; cnt < 4; cnt++) { // just to prevent infinite loops - if(!endpt) { - Lib.log('Missing end?', i, pi); - break; - } - - if(istop(endpt) && !isright(endpt)) { - newendpt = perimeter[1]; // left top ---> right top - } else if(isleft(endpt)) { - newendpt = perimeter[0]; // left bottom ---> left top - } else if(isbottom(endpt)) { - newendpt = perimeter[3]; // right bottom - } else if(isright(endpt)) { - newendpt = perimeter[2]; // left bottom - } - - for(possiblei = 0; possiblei < pi.edgepaths.length; possiblei++) { - var ptNew = pi.edgepaths[possiblei][0]; - // is ptNew on the (horz. or vert.) segment from endpt to newendpt? - if(Math.abs(endpt[0] - newendpt[0]) < atol) { - if(Math.abs(endpt[0] - ptNew[0]) < atol && (ptNew[1] - endpt[1]) * (newendpt[1] - ptNew[1]) >= 0) { - newendpt = ptNew; - nexti = possiblei; - } - } else if(Math.abs(endpt[1] - newendpt[1]) < btol) { - if(Math.abs(endpt[1] - ptNew[1]) < btol && (ptNew[0] - endpt[0]) * (newendpt[0] - ptNew[0]) >= 0) { - newendpt = ptNew; - nexti = possiblei; - } - } else { - Lib.log('endpt to newendpt is not vert. or horz.', endpt, newendpt, ptNew); - } - } - - if(nexti >= 0) break; - fullpath += pathto(endpt, newendpt); - endpt = newendpt; - } - - if(nexti === pi.edgepaths.length) { - Lib.log('unclosed perimeter path'); - break; - } - - i = nexti; - - // if we closed back on a loop we already included, - // close it and start a new loop - newloop = (startsleft.indexOf(i) === -1); - if(newloop) { - i = startsleft[0]; - fullpath += pathto(endpt, newendpt) + 'Z'; - endpt = null; - } - } - - // finally add the interior paths - for(i = 0; i < pi.paths.length; i++) { - fullpath += Drawing.smoothclosed(pi.paths[i].map(ab2p), pi.smoothing); - } - - return fullpath; -}; - -},{"../../components/drawing":602,"../../lib":685,"../carpet/axis_aligned_line":841}],900:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -module.exports = function mapPathinfo(pathinfo, map) { - var i, j, k, pi, pedgepaths, ppaths, pedgepath, ppath, path; - - for(i = 0; i < pathinfo.length; i++) { - pi = pathinfo[i]; - pedgepaths = pi.pedgepaths = []; - ppaths = pi.ppaths = []; - for(j = 0; j < pi.edgepaths.length; j++) { - path = pi.edgepaths[j]; - pedgepath = []; - for(k = 0; k < path.length; k++) { - pedgepath[k] = map(path[k]); - } - pedgepaths.push(pedgepath); - } - for(j = 0; j < pi.paths.length; j++) { - path = pi.paths[j]; - ppath = []; - for(k = 0; k < path.length; k++) { - ppath[k] = map(path[k]); - } - ppaths.push(ppath); - } - } -}; - -},{}],901:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var d3 = require('d3'); -var map1dArray = require('../carpet/map_1d_array'); -var makepath = require('../carpet/makepath'); -var Drawing = require('../../components/drawing'); - -var makeCrossings = require('../contour/make_crossings'); -var findAllPaths = require('../contour/find_all_paths'); -var convertToConstraints = require('./convert_to_constraints'); -var joinAllPaths = require('./join_all_paths'); -var emptyPathinfo = require('./empty_pathinfo'); -var mapPathinfo = require('./map_pathinfo'); -var lookupCarpet = require('../carpet/lookup_carpetid'); -var closeBoundaries = require('./close_boundaries'); - -function makeg(el, type, klass) { - var join = el.selectAll(type + '.' + klass).data([0]); - join.enter().append(type).classed(klass, true); - return join; -} - -module.exports = function plot(gd, plotinfo, cdcontours) { - for(var i = 0; i < cdcontours.length; i++) { - plotOne(gd, plotinfo, cdcontours[i]); - } -}; - -function plotOne(gd, plotinfo, cd) { - var trace = cd[0].trace; - - var carpet = trace.carpetTrace = lookupCarpet(gd, trace); - var carpetcd = gd.calcdata[carpet.index][0]; - - if(!carpet.visible || carpet.visible === 'legendonly') return; - - var a = cd[0].a; - var b = cd[0].b; - var contours = trace.contours; - var uid = trace.uid; - var xa = plotinfo.xaxis; - var ya = plotinfo.yaxis; - var fullLayout = gd._fullLayout; - var id = 'contour' + uid; - var pathinfo = emptyPathinfo(contours, plotinfo, cd[0]); - var isConstraint = trace.contours.type === 'constraint'; - - // Map [a, b] (data) --> [i, j] (pixels) - function ab2p(ab) { - var pt = carpet.ab2xy(ab[0], ab[1], true); - return [xa.c2p(pt[0]), ya.c2p(pt[1])]; - } - - if(trace.visible !== true) { - fullLayout._infolayer.selectAll('.cb' + uid).remove(); - return; - } - - // Define the perimeter in a/b coordinates: - var perimeter = [ - [a[0], b[b.length - 1]], - [a[a.length - 1], b[b.length - 1]], - [a[a.length - 1], b[0]], - [a[0], b[0]] - ]; - - // Extract the contour levels: - makeCrossings(pathinfo); - var atol = (a[a.length - 1] - a[0]) * 1e-8; - var btol = (b[b.length - 1] - b[0]) * 1e-8; - findAllPaths(pathinfo, atol, btol); - - // Constraints might need to be draw inverted, which is not something contours - // handle by default since they're assumed fully opaque so that they can be - // drawn overlapping. This function flips the paths as necessary so that they're - // drawn correctly. - // - // TODO: Perhaps this should be generalized and *all* paths should be drawn as - // closed regions so that translucent contour levels would be valid. - // See: https://github.com/plotly/plotly.js/issues/1356 - if(trace.contours.type === 'constraint') { - convertToConstraints(pathinfo, trace.contours.operation); - closeBoundaries(pathinfo, trace.contours.operation, perimeter, trace); - } - - // Map the paths in a/b coordinates to pixel coordinates: - mapPathinfo(pathinfo, ab2p); - - // draw everything - var plotGroup = makeContourGroup(plotinfo, cd, id); - - // Compute the boundary path - var seg, xp, yp, i; - var segs = []; - for(i = carpetcd.clipsegments.length - 1; i >= 0; i--) { - seg = carpetcd.clipsegments[i]; - xp = map1dArray([], seg.x, xa.c2p); - yp = map1dArray([], seg.y, ya.c2p); - xp.reverse(); - yp.reverse(); - segs.push(makepath(xp, yp, seg.bicubic)); - } - - var boundaryPath = 'M' + segs.join('L') + 'Z'; - - // Draw the baseline background fill that fills in the space behind any other - // contour levels: - makeBackground(plotGroup, carpetcd.clipsegments, xa, ya, isConstraint, contours.coloring); - - // Draw the specific contour fills. As a simplification, they're assumed to be - // fully opaque so that it's easy to draw them simply overlapping. The alternative - // would be to flip adjacent paths and draw closed paths for each level instead. - makeFills(trace, plotGroup, xa, ya, pathinfo, perimeter, ab2p, carpet, carpetcd, contours.coloring, boundaryPath); - - // Draw contour lines: - makeLines(plotGroup, pathinfo, contours); - - // Clip the boundary of the plot: - clipBoundary(plotGroup, carpet); -} - -function clipBoundary(plotGroup, carpet) { - plotGroup.attr('clip-path', 'url(#' + carpet.clipPathId + ')'); -} - -function makeContourGroup(plotinfo, cd, id) { - var plotgroup = plotinfo.plot.select('.maplayer') - .selectAll('g.contour.' + id) - .classed('trace', true) - .data(cd); - - plotgroup.enter().append('g') - .classed('contour', true) - .classed(id, true); - - plotgroup.exit().remove(); - - return plotgroup; -} - -function makeLines(plotgroup, pathinfo, contours) { - var smoothing = pathinfo[0].smoothing; - - var linegroup = plotgroup.selectAll('g.contourlevel') - .data(contours.showlines === false ? [] : pathinfo); - linegroup.enter().append('g') - .classed('contourlevel', true); - linegroup.exit().remove(); - - var opencontourlines = linegroup.selectAll('path.openline') - .data(function(d) { return d.pedgepaths; }); - opencontourlines.enter().append('path') - .classed('openline', true); - opencontourlines.exit().remove(); - opencontourlines - .attr('d', function(d) { - return Drawing.smoothopen(d, smoothing); - }) - .style('vector-effect', 'non-scaling-stroke'); - - var closedcontourlines = linegroup.selectAll('path.closedline') - .data(function(d) { return d.ppaths; }); - closedcontourlines.enter().append('path') - .classed('closedline', true); - closedcontourlines.exit().remove(); - closedcontourlines - .attr('d', function(d) { - return Drawing.smoothclosed(d, smoothing); - }) - .style('vector-effect', 'non-scaling-stroke') - .style('stroke-miterlimit', 1); -} - -function makeBackground(plotgroup, clipsegments, xaxis, yaxis, isConstraint, coloring) { - var seg, xp, yp, i; - var bggroup = makeg(plotgroup, 'g', 'contourbg'); - - var bgfill = bggroup.selectAll('path') - .data((coloring === 'fill' && !isConstraint) ? [0] : []); - bgfill.enter().append('path'); - bgfill.exit().remove(); - - var segs = []; - for(i = 0; i < clipsegments.length; i++) { - seg = clipsegments[i]; - xp = map1dArray([], seg.x, xaxis.c2p); - yp = map1dArray([], seg.y, yaxis.c2p); - segs.push(makepath(xp, yp, seg.bicubic)); - } - - bgfill - .attr('d', 'M' + segs.join('L') + 'Z') - .style('stroke', 'none'); -} - -function makeFills(trace, plotgroup, xa, ya, pathinfo, perimeter, ab2p, carpet, carpetcd, coloring, boundaryPath) { - var fillgroup = plotgroup.selectAll('g.contourfill') - .data([0]); - fillgroup.enter().append('g') - .classed('contourfill', true); - - var fillitems = fillgroup.selectAll('path') - .data(coloring === 'fill' ? pathinfo : []); - fillitems.enter().append('path'); - fillitems.exit().remove(); - fillitems.each(function(pi) { - // join all paths for this level together into a single path - // first follow clockwise around the perimeter to close any open paths - // if the whole perimeter is above this level, start with a path - // enclosing the whole thing. With all that, the parity should mean - // that we always fill everything above the contour, nothing below - var fullpath = joinAllPaths(trace, pi, perimeter, ab2p, carpet, carpetcd, xa, ya); - - if(pi.prefixBoundary) { - fullpath = boundaryPath + fullpath; - } - - if(!fullpath) { - d3.select(this).remove(); - } else { - d3.select(this) - .attr('d', fullpath) - .style('stroke', 'none'); - } - }); -} - -},{"../../components/drawing":602,"../carpet/lookup_carpetid":858,"../carpet/makepath":859,"../carpet/map_1d_array":860,"../contour/find_all_paths":881,"../contour/make_crossings":885,"./close_boundaries":891,"./convert_to_constraints":895,"./empty_pathinfo":897,"./join_all_paths":899,"./map_pathinfo":900,"d3":107}],902:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var d3 = require('d3'); - -var Drawing = require('../../components/drawing'); -var heatmapStyle = require('../heatmap/style'); - -var makeColorMap = require('../contour/make_color_map'); - -module.exports = function style(gd) { - var contours = d3.select(gd).selectAll('g.contour'); - - contours.style('opacity', function(d) { - return d.trace.opacity; - }); - - contours.each(function(d) { - var c = d3.select(this); - var trace = d.trace; - var contours = trace.contours; - var line = trace.line; - var cs = contours.size || 1; - var start = contours.start; - - if(!isFinite(cs)) { - cs = 0; - } - - c.selectAll('g.contourlevel').each(function() { - d3.select(this).selectAll('path') - .call(Drawing.lineGroupStyle, - line.width, - line.color, - line.dash); - }); - - if(trace.contours.type === 'levels' && trace.contours.coloring !== 'none') { - var colorMap = makeColorMap(trace); - - c.selectAll('g.contourbg path') - .style('fill', colorMap(start - cs / 2)); - - c.selectAll('g.contourfill path') - .style('fill', function(d, i) { - return colorMap(start + (i + 0.5) * cs); - }); - } else { - c.selectAll('g.contourfill path') - .style('fill', trace.fillcolor); - } - }); - - heatmapStyle(gd); -}; - -},{"../../components/drawing":602,"../contour/make_color_map":884,"../heatmap/style":917,"d3":107}],903:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584}],851:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158226,7 +151848,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../scatter/attributes":976}],904:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../scatter/attributes":924}],852:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158245,7 +151867,7 @@ var Axes = require('../../plots/cartesian/axes'); var histogram2dCalc = require('../histogram2d/calc'); var colorscaleCalc = require('../../components/colorscale/calc'); var hasColumns = require('./has_columns'); -var convertColumnData = require('./convert_column_xyz'); +var convertColumnXYZ = require('./convert_column_xyz'); var maxRowLength = require('./max_row_length'); var clean2dArray = require('./clean_2d_array'); var interp2d = require('./interp2d'); @@ -158286,7 +151908,7 @@ module.exports = function calc(gd, trace) { z = binned.z; } else { - if(hasColumns(trace)) convertColumnData(trace, xa, ya, 'x', 'y', ['z']); + if(hasColumns(trace)) convertColumnXYZ(trace, xa, ya); x = trace.x ? xa.makeCalcdata(trace, 'x') : []; y = trace.y ? ya.makeCalcdata(trace, 'y') : []; @@ -158368,7 +151990,7 @@ module.exports = function calc(gd, trace) { return [cd0]; }; -},{"../../components/colorscale/calc":584,"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"../histogram2d/calc":932,"./clean_2d_array":905,"./convert_column_xyz":907,"./find_empties":909,"./has_columns":910,"./interp2d":913,"./make_bound_array":914,"./max_row_length":915}],905:[function(require,module,exports){ +},{"../../components/colorscale/calc":581,"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793,"../histogram2d/calc":880,"./clean_2d_array":853,"./convert_column_xyz":855,"./find_empties":857,"./has_columns":858,"./interp2d":861,"./make_bound_array":862,"./max_row_length":863}],853:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158413,7 +152035,7 @@ module.exports = function clean2dArray(zOld, transpose) { return zNew; }; -},{"fast-isnumeric":116}],906:[function(require,module,exports){ +},{"fast-isnumeric":113}],854:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158464,7 +152086,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],907:[function(require,module,exports){ +},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],855:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158479,73 +152101,54 @@ module.exports = function colorbar(gd, cd) { var Lib = require('../../lib'); var BADNUM = require('../../constants/numerical').BADNUM; -module.exports = function convertColumnData(trace, ax1, ax2, var1Name, var2Name, arrayVarNames) { - var1Name = var1Name || 'x'; - var2Name = var2Name || 'y'; - arrayVarNames = arrayVarNames || ['z']; - var col1 = trace[var1Name].slice(), - col2 = trace[var2Name].slice(), +module.exports = function convertColumnXYZ(trace, xa, ya) { + var xCol = trace.x.slice(), + yCol = trace.y.slice(), + zCol = trace.z, textCol = trace.text, - colLen = Math.min(col1.length, col2.length), + colLen = Math.min(xCol.length, yCol.length, zCol.length), hasColumnText = (textCol !== undefined && !Array.isArray(textCol[0])), - col1Calendar = trace[var1Name + 'calendar'], - col2Calendar = trace[var2Name + 'calendar']; - - var i, j, arrayVar, newArray, arrayVarName; + xcalendar = trace.xcalendar, + ycalendar = trace.ycalendar; - for(i = 0; i < arrayVarNames.length; i++) { - arrayVar = trace[arrayVarNames[i]]; - if(arrayVar) colLen = Math.min(colLen, arrayVar.length); - } + var i; - if(colLen < col1.length) col1 = col1.slice(0, colLen); - if(colLen < col2.length) col2 = col2.slice(0, colLen); + if(colLen < xCol.length) xCol = xCol.slice(0, colLen); + if(colLen < yCol.length) yCol = yCol.slice(0, colLen); for(i = 0; i < colLen; i++) { - col1[i] = ax1.d2c(col1[i], 0, col1Calendar); - col2[i] = ax2.d2c(col2[i], 0, col2Calendar); + xCol[i] = xa.d2c(xCol[i], 0, xcalendar); + yCol[i] = ya.d2c(yCol[i], 0, ycalendar); } - var col1dv = Lib.distinctVals(col1), - col1vals = col1dv.vals, - col2dv = Lib.distinctVals(col2), - col2vals = col2dv.vals, - newArrays = []; - - for(i = 0; i < arrayVarNames.length; i++) { - newArrays[i] = Lib.init2dArray(col2vals.length, col1vals.length); - } + var xColdv = Lib.distinctVals(xCol), + x = xColdv.vals, + yColdv = Lib.distinctVals(yCol), + y = yColdv.vals, + z = Lib.init2dArray(y.length, x.length); - var i1, i2, text; + var text; - if(hasColumnText) text = Lib.init2dArray(col2vals.length, col1vals.length); + if(hasColumnText) text = Lib.init2dArray(y.length, x.length); for(i = 0; i < colLen; i++) { - if(col1[i] !== BADNUM && col2[i] !== BADNUM) { - i1 = Lib.findBin(col1[i] + col1dv.minDiff / 2, col1vals); - i2 = Lib.findBin(col2[i] + col2dv.minDiff / 2, col2vals); - - for(j = 0; j < arrayVarNames.length; j++) { - arrayVarName = arrayVarNames[j]; - arrayVar = trace[arrayVarName]; - newArray = newArrays[j]; - newArray[i2][i1] = arrayVar[i]; - } + if(xCol[i] !== BADNUM && yCol[i] !== BADNUM) { + var ix = Lib.findBin(xCol[i] + xColdv.minDiff / 2, x); + var iy = Lib.findBin(yCol[i] + yColdv.minDiff / 2, y); - if(hasColumnText) text[i2][i1] = textCol[i]; + z[iy][ix] = zCol[i]; + if(hasColumnText) text[iy][ix] = textCol[i]; } } - trace[var1Name] = col1vals; - trace[var2Name] = col2vals; - for(j = 0; j < arrayVarNames.length; j++) { - trace[arrayVarNames[j]] = newArrays[j]; - } + trace.x = x; + trace.y = y; + trace.z = z; if(hasColumnText) trace.text = text; }; -},{"../../constants/numerical":666,"../../lib":685}],908:[function(require,module,exports){ +},{"../../constants/numerical":662,"../../lib":680}],856:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158590,7 +152193,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'}); }; -},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":903,"./has_columns":910,"./xyz_defaults":918}],909:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":851,"./has_columns":858,"./xyz_defaults":866}],857:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158696,7 +152299,7 @@ module.exports = function findEmpties(z) { return empties.sort(function(a, b) { return b[2] - a[2]; }); }; -},{"./max_row_length":915}],910:[function(require,module,exports){ +},{"./max_row_length":863}],858:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158712,7 +152315,7 @@ module.exports = function(trace) { return !Array.isArray(trace.z[0]); }; -},{}],911:[function(require,module,exports){ +},{}],859:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158830,7 +152433,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, contour) })]; }; -},{"../../lib":685,"../../plots/cartesian/constants":729,"../../plots/cartesian/graph_interact":733}],912:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/constants":724,"../../plots/cartesian/graph_interact":726}],860:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158862,7 +152465,7 @@ Heatmap.meta = { module.exports = Heatmap; -},{"../../plots/cartesian":734,"./attributes":903,"./calc":904,"./colorbar":906,"./defaults":908,"./hover":911,"./plot":916,"./style":917}],913:[function(require,module,exports){ +},{"../../plots/cartesian":727,"./attributes":851,"./calc":852,"./colorbar":854,"./defaults":856,"./hover":859,"./plot":864,"./style":865}],861:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -158994,7 +152597,7 @@ function iterateInterp2d(z, emptyPoints, overshoot) { return maxFractionalChange; } -},{"../../lib":685}],914:[function(require,module,exports){ +},{"../../lib":680}],862:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159076,7 +152679,7 @@ module.exports = function makeBoundArray(trace, arrayIn, v0In, dvIn, numbricks, return arrayOut; }; -},{"../../registry":802}],915:[function(require,module,exports){ +},{"../../registry":793}],863:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159098,7 +152701,7 @@ module.exports = function maxRowLength(z) { return len; }; -},{}],916:[function(require,module,exports){ +},{}],864:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159567,7 +153170,7 @@ function plotOne(gd, plotinfo, cd) { image3.exit().remove(); } -},{"../../components/colorscale":592,"../../constants/xmlns_namespaces":668,"../../lib":685,"../../registry":802,"./max_row_length":915,"tinycolor2":514}],917:[function(require,module,exports){ +},{"../../components/colorscale":589,"../../constants/xmlns_namespaces":664,"../../lib":680,"../../registry":793,"./max_row_length":863,"tinycolor2":511}],865:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159588,7 +153191,7 @@ module.exports = function style(gd) { }); }; -},{"d3":107}],918:[function(require,module,exports){ +},{"d3":104}],866:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159606,24 +153209,22 @@ var Registry = require('../../registry'); var hasColumns = require('./has_columns'); -module.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout, xName, yName) { +module.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout) { var z = coerce('z'); - xName = xName || 'x'; - yName = yName || 'y'; var x, y; if(z === undefined || !z.length) return 0; if(hasColumns(traceIn)) { - x = coerce(xName); - y = coerce(yName); + x = coerce('x'); + y = coerce('y'); - // column z must be accompanied by xName and yName arrays + // column z must be accompanied by 'x' and 'y' arrays if(!x || !y) return 0; } else { - x = coordDefaults(xName, coerce); - y = coordDefaults(yName, coerce); + x = coordDefaults('x', coerce); + y = coordDefaults('y', coerce); // TODO put z validation elsewhere if(!isValidZ(z)) return 0; @@ -159632,7 +153233,7 @@ module.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout, x } var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults'); - handleCalendarDefaults(traceIn, traceOut, [xName, yName], layout); + handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout); return traceOut.z.length; }; @@ -159683,7 +153284,7 @@ function isValidZ(z) { return (allRowsAreArrays && oneRowIsFilled && hasOneNumber); } -},{"../../registry":802,"./has_columns":910,"fast-isnumeric":116}],919:[function(require,module,exports){ +},{"../../registry":793,"./has_columns":858,"fast-isnumeric":113}],867:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159725,7 +153326,7 @@ extendFlat( module.exports = attrs; -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../heatmap/attributes":903}],920:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../heatmap/attributes":851}],868:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159864,7 +153465,7 @@ function createHeatmap(scene, fullTrace, calcTrace) { module.exports = createHeatmap; -},{"../../lib/str2rgbarray":703,"../../plots/cartesian/axes":724,"gl-heatmap2d":150}],921:[function(require,module,exports){ +},{"../../lib/str2rgbarray":698,"../../plots/cartesian/axes":719,"gl-heatmap2d":147}],869:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -159895,7 +153496,7 @@ HeatmapGl.meta = { module.exports = HeatmapGl; -},{"../../plots/gl2d":764,"../heatmap/calc":904,"../heatmap/colorbar":906,"../heatmap/defaults":908,"./attributes":919,"./convert":920}],922:[function(require,module,exports){ +},{"../../plots/gl2d":755,"../heatmap/calc":852,"../heatmap/colorbar":854,"../heatmap/defaults":856,"./attributes":867,"./convert":868}],870:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160025,7 +153626,7 @@ function makeBinsAttr(axLetter) { }; } -},{"../bar/attributes":812}],923:[function(require,module,exports){ +},{"../bar/attributes":803}],871:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160051,7 +153652,7 @@ module.exports = function doAvg(size, counts) { return total; }; -},{}],924:[function(require,module,exports){ +},{}],872:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160084,7 +153685,7 @@ module.exports = function handleBinDefaults(traceIn, traceOut, coerce, binDirect return traceOut; }; -},{}],925:[function(require,module,exports){ +},{}],873:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160160,7 +153761,7 @@ module.exports = { } }; -},{"fast-isnumeric":116}],926:[function(require,module,exports){ +},{"fast-isnumeric":113}],874:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160391,7 +153992,7 @@ function cdf(size, direction, currentbin) { } } -},{"../../lib":685,"../../plots/cartesian/axes":724,"../bar/arrays_to_calcdata":811,"./average":923,"./bin_functions":925,"./clean_bins":927,"./norm_functions":930,"fast-isnumeric":116}],927:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../bar/arrays_to_calcdata":802,"./average":871,"./bin_functions":873,"./clean_bins":875,"./norm_functions":878,"fast-isnumeric":113}],875:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160468,7 +154069,7 @@ module.exports = function cleanBins(trace, ax, binDirection) { if(!trace[autoBinAttr]) delete trace['nbins' + binDirection]; }; -},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],928:[function(require,module,exports){ +},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],876:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160530,7 +154131,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, Color.defaultLine, {axis: 'x', inherit: 'y'}); }; -},{"../../components/color":578,"../../components/errorbars/defaults":607,"../../lib":685,"../../registry":802,"../bar/style_defaults":823,"./attributes":922,"./bin_defaults":924}],929:[function(require,module,exports){ +},{"../../components/color":575,"../../components/errorbars/defaults":603,"../../lib":680,"../../registry":793,"../bar/style_defaults":814,"./attributes":870,"./bin_defaults":872}],877:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160579,7 +154180,7 @@ Histogram.meta = { module.exports = Histogram; -},{"../../plots/cartesian":734,"../bar/hover":815,"../bar/layout_attributes":817,"../bar/layout_defaults":818,"../bar/plot":819,"../bar/set_positions":820,"../bar/style":822,"../scatter/colorbar":979,"./attributes":922,"./calc":926,"./defaults":928}],930:[function(require,module,exports){ +},{"../../plots/cartesian":727,"../bar/hover":806,"../bar/layout_attributes":808,"../bar/layout_defaults":809,"../bar/plot":810,"../bar/set_positions":811,"../bar/style":813,"../scatter/colorbar":927,"./attributes":870,"./calc":874,"./defaults":876}],878:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160614,7 +154215,7 @@ module.exports = { } }; -},{}],931:[function(require,module,exports){ +},{}],879:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160666,7 +154267,7 @@ module.exports = extendFlat({}, { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../heatmap/attributes":903,"../histogram/attributes":922}],932:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../heatmap/attributes":851,"../histogram/attributes":870}],880:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160869,7 +154470,7 @@ module.exports = function calc(gd, trace) { }; }; -},{"../../lib":685,"../../plots/cartesian/axes":724,"../histogram/average":923,"../histogram/bin_functions":925,"../histogram/clean_bins":927,"../histogram/norm_functions":930}],933:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../histogram/average":871,"../histogram/bin_functions":873,"../histogram/clean_bins":875,"../histogram/norm_functions":878}],881:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160907,7 +154508,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout ); }; -},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":931,"./sample_defaults":935}],934:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":879,"./sample_defaults":883}],882:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160940,7 +154541,7 @@ Histogram2D.meta = { module.exports = Histogram2D; -},{"../../plots/cartesian":734,"../heatmap/calc":904,"../heatmap/colorbar":906,"../heatmap/hover":911,"../heatmap/plot":916,"../heatmap/style":917,"./attributes":931,"./defaults":933}],935:[function(require,module,exports){ +},{"../../plots/cartesian":727,"../heatmap/calc":852,"../heatmap/colorbar":854,"../heatmap/hover":859,"../heatmap/plot":864,"../heatmap/style":865,"./attributes":879,"./defaults":881}],883:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -160980,7 +154581,7 @@ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout handleBinDefaults(traceIn, traceOut, coerce, binDirections); }; -},{"../../registry":802,"../histogram/bin_defaults":924}],936:[function(require,module,exports){ +},{"../../registry":793,"../histogram/bin_defaults":872}],884:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161022,7 +154623,7 @@ module.exports = extendFlat({}, { { colorbar: colorbarAttrs } ); -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../contour/attributes":874,"../histogram2d/attributes":931}],937:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../contour/attributes":836,"../histogram2d/attributes":879}],885:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161052,7 +154653,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout handleStyleDefaults(traceIn, traceOut, coerce, layout); }; -},{"../../lib":685,"../contour/contours_defaults":878,"../contour/style_defaults":888,"../histogram2d/sample_defaults":935,"./attributes":936}],938:[function(require,module,exports){ +},{"../../lib":680,"../contour/contours_defaults":840,"../contour/style_defaults":850,"../histogram2d/sample_defaults":883,"./attributes":884}],886:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161085,7 +154686,7 @@ Histogram2dContour.meta = { module.exports = Histogram2dContour; -},{"../../plots/cartesian":734,"../contour/calc":875,"../contour/colorbar":876,"../contour/hover":882,"../contour/plot":886,"../contour/style":887,"./attributes":936,"./defaults":937}],939:[function(require,module,exports){ +},{"../../plots/cartesian":727,"../contour/calc":837,"../contour/colorbar":838,"../contour/hover":844,"../contour/plot":848,"../contour/style":849,"./attributes":884,"./defaults":885}],887:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161218,7 +154819,7 @@ module.exports = { }, surfaceAtts.lighting) }; -},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../surface/attributes":1039}],940:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672,"../surface/attributes":980}],888:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161381,7 +154982,7 @@ function createMesh3DTrace(scene, data) { module.exports = createMesh3DTrace; -},{"../../lib/str2rgbarray":703,"alpha-shape":38,"convex-hull":96,"delaunay-triangulate":108,"gl-mesh3d":189,"tinycolor2":514}],941:[function(require,module,exports){ +},{"../../lib/str2rgbarray":698,"alpha-shape":35,"convex-hull":93,"delaunay-triangulate":105,"gl-mesh3d":186,"tinycolor2":511}],889:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161482,7 +155083,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/colorbar/defaults":580,"../../lib":685,"../../registry":802,"./attributes":939}],942:[function(require,module,exports){ +},{"../../components/colorbar/defaults":577,"../../lib":680,"../../registry":793,"./attributes":887}],890:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161511,7 +155112,7 @@ Mesh3D.meta = { module.exports = Mesh3D; -},{"../../plots/gl3d":767,"../heatmap/colorbar":906,"./attributes":939,"./convert":940,"./defaults":941}],943:[function(require,module,exports){ +},{"../../plots/gl3d":758,"../heatmap/colorbar":854,"./attributes":887,"./convert":888,"./defaults":889}],891:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161525,7 +155126,6 @@ module.exports = Mesh3D; var Lib = require('../../lib'); var scatterAttrs = require('../scatter/attributes'); -var dash = require('../../components/drawing/attributes').dash; var INCREASING_COLOR = '#3D9970'; var DECREASING_COLOR = '#FF4136'; @@ -161547,9 +155147,9 @@ var directionAttrs = { }, line: { - color: lineAttrs.color, - width: lineAttrs.width, - dash: dash, + color: Lib.extendFlat({}, lineAttrs.color), + width: Lib.extendFlat({}, lineAttrs.width), + dash: Lib.extendFlat({}, lineAttrs.dash), } }; @@ -161588,7 +155188,7 @@ module.exports = { width: Lib.extendFlat({}, lineAttrs.width, { }), - dash: Lib.extendFlat({}, dash, { + dash: Lib.extendFlat({}, lineAttrs.dash, { }), }, @@ -161619,7 +155219,7 @@ module.exports = { } }; -},{"../../components/drawing/attributes":601,"../../lib":685,"../scatter/attributes":976}],944:[function(require,module,exports){ +},{"../../lib":680,"../scatter/attributes":924}],892:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161668,7 +155268,7 @@ function handleDirection(traceIn, traceOut, coerce, direction) { coerce(direction + '.line.dash', traceOut.line.dash); } -},{"../../lib":685,"./attributes":943,"./direction_defaults":945,"./helpers":946,"./ohlc_defaults":948}],945:[function(require,module,exports){ +},{"../../lib":680,"./attributes":891,"./direction_defaults":893,"./helpers":894,"./ohlc_defaults":896}],893:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161694,7 +155294,7 @@ module.exports = function handleDirectionDefaults(traceIn, traceOut, coerce, dir coerce(direction + '.name', nameDflt); }; -},{}],946:[function(require,module,exports){ +},{}],894:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161817,7 +155417,7 @@ exports.addRangeSlider = function(data, layout) { } }; -},{"../../lib":685}],947:[function(require,module,exports){ +},{"../../lib":680}],895:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161847,7 +155447,7 @@ module.exports = { register(require('../scatter')); register(require('./transform')); -},{"../../plot_api/register":714,"../../plots/cartesian":734,"../scatter":986,"./attributes":943,"./defaults":944,"./transform":949}],948:[function(require,module,exports){ +},{"../../plot_api/register":709,"../../plots/cartesian":727,"../scatter":934,"./attributes":891,"./defaults":892,"./transform":897}],896:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -161889,7 +155489,7 @@ module.exports = function handleOHLC(traceIn, traceOut, coerce, layout) { return len; }; -},{"../../registry":802}],949:[function(require,module,exports){ +},{"../../registry":793}],897:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162148,7 +155748,7 @@ function convertTickWidth(gd, xa, trace) { return minDiff * tickWidth; } -},{"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_ids":727,"./helpers":946}],950:[function(require,module,exports){ +},{"../../lib":680,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_ids":722,"./helpers":894}],898:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162277,7 +155877,7 @@ module.exports = { ) }; -},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/colorscale/scales":596,"../../lib/extend":677,"../../plots/cartesian/layout_attributes":735}],951:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/colorscale/scales":593,"../../lib/extend":672,"../../plots/cartesian/layout_attributes":728}],899:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162353,7 +155953,7 @@ exports.toSVG = function(gd) { }, 60); }; -},{"../../constants/xmlns_namespaces":668,"../../plots/plots":787,"./constants":954,"./plot":959,"d3":107}],952:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":664,"../../plots/plots":778,"./constants":902,"./plot":907,"d3":104}],900:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162384,7 +155984,7 @@ module.exports = function calc(gd, trace) { }]; }; -},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"../../lib":685}],953:[function(require,module,exports){ +},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"../../lib":680}],901:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162438,7 +156038,7 @@ module.exports = function colorbar(gd, cd) { .options(line.colorbar)(); }; -},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],954:[function(require,module,exports){ +},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],902:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162475,7 +156075,7 @@ module.exports = { } }; -},{}],955:[function(require,module,exports){ +},{}],903:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162577,7 +156177,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591,"../../lib":685,"./attributes":950,"./constants":954}],956:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588,"../../lib":680,"./attributes":898,"./constants":902}],904:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -162606,7 +156206,7 @@ Parcoords.meta = { module.exports = Parcoords; -},{"./attributes":950,"./base_plot":951,"./calc":952,"./colorbar":953,"./defaults":955,"./plot":959}],957:[function(require,module,exports){ +},{"./attributes":898,"./base_plot":899,"./calc":900,"./colorbar":901,"./defaults":903,"./plot":907}],905:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163031,7 +156631,7 @@ module.exports = function(canvasGL, lines, canvasWidth, canvasHeight, initialDim }; }; -},{"./constants":954,"regl":480}],958:[function(require,module,exports){ +},{"./constants":902,"regl":477}],906:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163805,7 +157405,7 @@ module.exports = function(root, svg, styledData, layout, callbacks) { return tweakables; }; -},{"../../lib":685,"./constants":954,"./lines":957,"d3":107}],959:[function(require,module,exports){ +},{"../../lib":680,"./constants":902,"./lines":905,"d3":104}],907:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163925,7 +157525,7 @@ module.exports = function plot(gd, cdparcoords) { }); }; -},{"./parcoords":958}],960:[function(require,module,exports){ +},{"./parcoords":906}],908:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -163996,13 +157596,6 @@ module.exports = { valType: 'data_array', }, - hovertext: { - valType: 'string', - - dflt: '', - arrayOk: true, - - }, // 'see eg:' // 'https://www.e-education.psu.edu/natureofgeoinfo/sites/www.e-education.psu.edu.natureofgeoinfo/files/image/hisp_pies.gif', @@ -164118,7 +157711,7 @@ module.exports = { } }; -},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/attributes":722,"../../plots/font_attributes":748}],961:[function(require,module,exports){ +},{"../../components/color/attributes":574,"../../lib/extend":672,"../../plots/attributes":717,"../../plots/font_attributes":739}],909:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164165,7 +157758,7 @@ function getCdModule(calcdata, _module) { return cdModule; } -},{"../../registry":802}],962:[function(require,module,exports){ +},{"../../registry":793}],910:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164317,7 +157910,7 @@ function nextDefaultColor(index) { return pieDefaultColors[index % pieDefaultColors.length]; } -},{"../../components/color":578,"./helpers":964,"fast-isnumeric":116,"tinycolor2":514}],963:[function(require,module,exports){ +},{"../../components/color":575,"./helpers":912,"fast-isnumeric":113,"tinycolor2":511}],911:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164365,7 +157958,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout var textData = coerce('text'); var textInfo = coerce('textinfo', Array.isArray(textData) ? 'text+percent' : 'percent'); - coerce('hovertext'); coerce('hoverinfo', (layout._dataLength === 1) ? 'label+text+value+percent' : undefined); @@ -164402,7 +157994,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('pull'); }; -},{"../../lib":685,"./attributes":960}],964:[function(require,module,exports){ +},{"../../lib":680,"./attributes":908}],912:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164431,7 +158023,7 @@ exports.formatPieValue = function formatPieValue(v, separators) { return Lib.numSeparate(vRounded, separators); }; -},{"../../lib":685}],965:[function(require,module,exports){ +},{"../../lib":680}],913:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164463,7 +158055,7 @@ Pie.meta = { module.exports = Pie; -},{"./attributes":960,"./base_plot":961,"./calc":962,"./defaults":963,"./layout_attributes":966,"./layout_defaults":967,"./plot":968,"./style":969,"./style_one":970}],966:[function(require,module,exports){ +},{"./attributes":908,"./base_plot":909,"./calc":910,"./defaults":911,"./layout_attributes":914,"./layout_defaults":915,"./plot":916,"./style":917,"./style_one":918}],914:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164483,7 +158075,7 @@ module.exports = { hiddenlabels: {valType: 'data_array'} }; -},{}],967:[function(require,module,exports){ +},{}],915:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164505,7 +158097,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { coerce('hiddenlabels'); }; -},{"../../lib":685,"./layout_attributes":966}],968:[function(require,module,exports){ +},{"../../lib":680,"./layout_attributes":914}],916:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -164594,8 +158186,6 @@ module.exports = function plot(gd, cdpie) { hasHoverData = false; function handleMouseOver(evt) { - evt.originalEvent = d3.event; - // in case fullLayout or fullData has changed without a replot var fullLayout2 = gd._fullLayout, trace2 = gd._fullData[trace.index], @@ -164607,7 +158197,6 @@ module.exports = function plot(gd, cdpie) { // or if hover is turned off if(gd._dragging || fullLayout2.hovermode === false || hoverinfo === 'none' || hoverinfo === 'skip' || !hoverinfo) { - Fx.hover(gd, evt, 'pie'); return; } @@ -164618,16 +158207,8 @@ module.exports = function plot(gd, cdpie) { thisText = []; if(hoverinfo.indexOf('label') !== -1) thisText.push(pt.label); - if(hoverinfo.indexOf('text') !== -1) { - if(trace2.hovertext) { - thisText.push( - Array.isArray(trace2.hovertext) ? - trace2.hovertext[pt.i] : - trace2.hovertext - ); - } else if(trace2.text && trace2.text[pt.i]) { - thisText.push(trace2.text[pt.i]); - } + if(trace2.text && trace2.text[pt.i] && hoverinfo.indexOf('text') !== -1) { + thisText.push(trace2.text[pt.i]); } if(hoverinfo.indexOf('value') !== -1) thisText.push(helpers.formatPieValue(pt.v, separators)); if(hoverinfo.indexOf('percent') !== -1) thisText.push(helpers.formatPiePercent(pt.v / cd0.vTotal, separators)); @@ -164651,9 +158232,7 @@ module.exports = function plot(gd, cdpie) { } function handleMouseOut(evt) { - evt.originalEvent = d3.event; gd.emit('plotly_unhover', { - event: d3.event, points: [evt] }); @@ -164665,8 +158244,8 @@ module.exports = function plot(gd, cdpie) { function handleClick() { gd._hoverdata = [pt]; - gd._hoverdata.trace = cd0.trace; - Fx.click(gd, d3.event); + gd._hoverdata.trace = cd.trace; + Fx.click(gd, { target: true }); } slicePath.enter().append('path') @@ -165213,7 +158792,7 @@ function maxExtent(tilt, tiltAxisFraction, depth) { 2 * Math.sqrt(1 - sinTilt * sinTilt * tiltAxisFraction * tiltAxisFraction)); } -},{"../../components/color":578,"../../components/drawing":602,"../../lib/svg_text_utils":704,"../../plots/cartesian/graph_interact":733,"./helpers":964,"d3":107}],969:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"../../lib/svg_text_utils":699,"../../plots/cartesian/graph_interact":726,"./helpers":912,"d3":104}],917:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165242,7 +158821,7 @@ module.exports = function style(gd) { }); }; -},{"./style_one":970,"d3":107}],970:[function(require,module,exports){ +},{"./style_one":918,"d3":104}],918:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165262,12 +158841,14 @@ module.exports = function styleOne(s, pt, trace) { var lineWidth = trace.marker.line.width || 0; if(Array.isArray(lineWidth)) lineWidth = lineWidth[pt.i] || 0; - s.style({'stroke-width': lineWidth}) - .call(Color.fill, pt.color) + s.style({ + 'stroke-width': lineWidth, + fill: pt.color + }) .call(Color.stroke, lineColor); }; -},{"../../components/color":578}],971:[function(require,module,exports){ +},{"../../components/color":575}],919:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165356,7 +158937,7 @@ module.exports = { } }; -},{"../scattergl/attributes":1020}],972:[function(require,module,exports){ +},{"../scattergl/attributes":960}],920:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165588,7 +159169,7 @@ function createPointcloud(scene, data) { module.exports = createPointcloud; -},{"../../lib/str2rgbarray":703,"../scatter/get_trace_color":984,"gl-pointcloud2d":214}],973:[function(require,module,exports){ +},{"../../lib/str2rgbarray":698,"../scatter/get_trace_color":932,"gl-pointcloud2d":211}],921:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165633,7 +159214,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor) { coerce('marker.border.arearatio'); }; -},{"../../lib":685,"./attributes":971}],974:[function(require,module,exports){ +},{"../../lib":680,"./attributes":919}],922:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165663,7 +159244,7 @@ pointcloud.meta = { module.exports = pointcloud; -},{"../../plots/gl2d":764,"../scatter3d/calc":1000,"./attributes":971,"./convert":972,"./defaults":973}],975:[function(require,module,exports){ +},{"../../plots/gl2d":755,"../scatter3d/calc":948,"./attributes":919,"./convert":920,"./defaults":921}],923:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165682,7 +159263,6 @@ var Lib = require('../../lib'); module.exports = function arraysToCalcdata(cd, trace) { Lib.mergeArray(trace.text, cd, 'tx'); - Lib.mergeArray(trace.hovertext, cd, 'htx'); Lib.mergeArray(trace.customdata, cd, 'data'); Lib.mergeArray(trace.textposition, cd, 'tp'); if(trace.textfont) { @@ -165706,7 +159286,7 @@ module.exports = function arraysToCalcdata(cd, trace) { } }; -},{"../../lib":685}],976:[function(require,module,exports){ +},{"../../lib":680}],924:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -165720,7 +159300,6 @@ module.exports = function arraysToCalcdata(cd, trace) { var colorAttributes = require('../../components/colorscale/color_attributes'); var errorBarAttrs = require('../../components/errorbars/attributes'); var colorbarAttrs = require('../../components/colorbar/attributes'); -var dash = require('../../components/drawing/attributes').dash; var Drawing = require('../../components/drawing'); var constants = require('./constants'); @@ -165773,13 +159352,6 @@ module.exports = { dflt: '', arrayOk: true, - }, - hovertext: { - valType: 'string', - - dflt: '', - arrayOk: true, - }, mode: { valType: 'flaglist', @@ -165822,7 +159394,17 @@ module.exports = { }, - dash: dash, + dash: { + valType: 'string', + // string type usually doesn't take values... this one should really be + // a special type or at least a special coercion function, from the GUI + // you only get these values but elsewhere the user can supply a list of + // dash lengths in px, and it will be honored + values: ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'], + dflt: 'solid', + + + }, simplify: { valType: 'boolean', dflt: true, @@ -165970,7 +159552,7 @@ module.exports = { error_x: errorBarAttrs }; -},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/drawing":602,"../../components/drawing/attributes":601,"../../components/errorbars/attributes":604,"../../lib/extend":677,"./constants":981}],977:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/drawing":598,"../../components/errorbars/attributes":600,"../../lib/extend":672,"./constants":929}],925:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166100,7 +159682,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../plots/cartesian/axes":724,"./arrays_to_calcdata":975,"./colorscale_calc":980,"./subtypes":996,"fast-isnumeric":116}],978:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"./arrays_to_calcdata":923,"./colorscale_calc":928,"./subtypes":944,"fast-isnumeric":113}],926:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166139,7 +159721,7 @@ module.exports = function cleanData(fullData) { } }; -},{}],979:[function(require,module,exports){ +},{}],927:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166195,7 +159777,7 @@ module.exports = function colorbar(gd, cd) { .options(marker.colorbar)(); }; -},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],980:[function(require,module,exports){ +},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],928:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166228,7 +159810,7 @@ module.exports = function calcMarkerColorscale(trace) { } }; -},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"./subtypes":996}],981:[function(require,module,exports){ +},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"./subtypes":944}],929:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166244,7 +159826,7 @@ module.exports = { PTS_LINESONLY: 20 }; -},{}],982:[function(require,module,exports){ +},{}],930:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166285,7 +159867,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('customdata'); coerce('text'); - coerce('hovertext'); coerce('mode', defaultMode); coerce('ids'); @@ -166326,7 +159907,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, defaultColor, {axis: 'x', inherit: 'y'}); }; -},{"../../components/errorbars/defaults":607,"../../lib":685,"./attributes":976,"./constants":981,"./fillcolor_defaults":983,"./line_defaults":987,"./line_shape_defaults":989,"./marker_defaults":992,"./subtypes":996,"./text_defaults":997,"./xy_defaults":998}],983:[function(require,module,exports){ +},{"../../components/errorbars/defaults":603,"../../lib":680,"./attributes":924,"./constants":929,"./fillcolor_defaults":931,"./line_defaults":935,"./line_shape_defaults":937,"./marker_defaults":940,"./subtypes":944,"./text_defaults":945,"./xy_defaults":946}],931:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166364,7 +159945,7 @@ module.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coe )); }; -},{"../../components/color":578}],984:[function(require,module,exports){ +},{"../../components/color":575}],932:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166417,7 +159998,7 @@ module.exports = function getTraceColor(trace, di) { } }; -},{"../../components/color":578,"./subtypes":996}],985:[function(require,module,exports){ +},{"../../components/color":575,"./subtypes":944}],933:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166492,9 +160073,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { yLabelVal: di.y }); - if(di.htx) pointData.text = di.htx; - else if(trace.hovertext) pointData.text = trace.hovertext; - else if(di.tx) pointData.text = di.tx; + if(di.tx) pointData.text = di.tx; else if(trace.text) pointData.text = trace.text; ErrorBars.hoverInfo(di, trace, pointData); @@ -166588,7 +160167,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { } }; -},{"../../components/color":578,"../../components/errorbars":608,"../../lib":685,"../../plots/cartesian/constants":729,"../../plots/cartesian/graph_interact":733,"./get_trace_color":984}],986:[function(require,module,exports){ +},{"../../components/color":575,"../../components/errorbars":604,"../../lib":680,"../../plots/cartesian/constants":724,"../../plots/cartesian/graph_interact":726,"./get_trace_color":932}],934:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166632,7 +160211,7 @@ Scatter.meta = { module.exports = Scatter; -},{"../../plots/cartesian":734,"./arrays_to_calcdata":975,"./attributes":976,"./calc":977,"./clean_data":978,"./colorbar":979,"./defaults":982,"./hover":985,"./plot":993,"./select":994,"./style":995,"./subtypes":996}],987:[function(require,module,exports){ +},{"../../plots/cartesian":727,"./arrays_to_calcdata":923,"./attributes":924,"./calc":925,"./clean_data":926,"./colorbar":927,"./defaults":930,"./hover":933,"./plot":941,"./select":942,"./style":943,"./subtypes":944}],935:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166648,7 +160227,7 @@ var hasColorscale = require('../../components/colorscale/has_colorscale'); var colorscaleDefaults = require('../../components/colorscale/defaults'); -module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, coerce, opts) { +module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, coerce) { var markerColor = (traceIn.marker || {}).color; coerce('line.color', defaultColor); @@ -166662,10 +160241,10 @@ module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, } coerce('line.width'); - if(!(opts || {}).noDash) coerce('line.dash'); + coerce('line.dash'); }; -},{"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591}],988:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588}],936:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166838,7 +160417,7 @@ module.exports = function linePoints(d, opts) { return segments; }; -},{"../../constants/numerical":666}],989:[function(require,module,exports){ +},{"../../constants/numerical":662}],937:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166857,7 +160436,7 @@ module.exports = function handleLineShapeDefaults(traceIn, traceOut, coerce) { if(shape === 'spline') coerce('line.smoothing'); }; -},{}],990:[function(require,module,exports){ +},{}],938:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166898,7 +160477,7 @@ module.exports = function linkTraces(gd, plotinfo, cdscatter) { } }; -},{}],991:[function(require,module,exports){ +},{}],939:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166940,7 +160519,7 @@ module.exports = function makeBubbleSizeFn(trace) { }; }; -},{"fast-isnumeric":116}],992:[function(require,module,exports){ +},{"fast-isnumeric":113}],940:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -166959,7 +160538,7 @@ var colorscaleDefaults = require('../../components/colorscale/defaults'); var subTypes = require('./subtypes'); -module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout, coerce, opts) { +module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout, coerce) { var isBubble = subTypes.isBubble(traceIn), lineColor = (traceIn.line || {}).color, defaultMLC; @@ -166976,25 +160555,23 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.', cLetter: 'c'}); } - if(!(opts || {}).noLine) { - // if there's a line with a different color than the marker, use - // that line color as the default marker line color - // (except when it's an array) - // mostly this is for transparent markers to behave nicely - if(lineColor && !Array.isArray(lineColor) && (traceOut.marker.color !== lineColor)) { - defaultMLC = lineColor; - } - else if(isBubble) defaultMLC = Color.background; - else defaultMLC = Color.defaultLine; - - coerce('marker.line.color', defaultMLC); - if(hasColorscale(traceIn, 'marker.line')) { - colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.line.', cLetter: 'c'}); - } + // if there's a line with a different color than the marker, use + // that line color as the default marker line color + // (except when it's an array) + // mostly this is for transparent markers to behave nicely + if(lineColor && !Array.isArray(lineColor) && (traceOut.marker.color !== lineColor)) { + defaultMLC = lineColor; + } + else if(isBubble) defaultMLC = Color.background; + else defaultMLC = Color.defaultLine; - coerce('marker.line.width', isBubble ? 1 : 0); + coerce('marker.line.color', defaultMLC); + if(hasColorscale(traceIn, 'marker.line')) { + colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.line.', cLetter: 'c'}); } + coerce('marker.line.width', isBubble ? 1 : 0); + if(isBubble) { coerce('marker.sizeref'); coerce('marker.sizemin'); @@ -167002,7 +160579,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout } }; -},{"../../components/color":578,"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591,"./subtypes":996}],993:[function(require,module,exports){ +},{"../../components/color":575,"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588,"./subtypes":944}],941:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167056,13 +160633,13 @@ module.exports = function plot(gd, plotinfo, cdscatter, transitionOpts, makeOnCo // Sort the traces, once created, so that the ordering is preserved even when traces // are shown and hidden. This is needed since we're not just wiping everything out // and recreating on every update. - for(i = 0, uids = {}; i < cdscatter.length; i++) { - uids[cdscatter[i][0].trace.uid] = i; + for(i = 0, uids = []; i < cdscatter.length; i++) { + uids[i] = cdscatter[i][0].trace.uid; } scatterlayer.selectAll('g.trace').sort(function(a, b) { - var idx1 = uids[a[0].trace.uid]; - var idx2 = uids[b[0].trace.uid]; + var idx1 = uids.indexOf(a[0].trace.uid); + var idx2 = uids.indexOf(b[0].trace.uid); return idx1 > idx2 ? 1 : -1; }); @@ -167408,11 +160985,11 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition textFilter = hideFilter; if(showMarkers) { - markerFilter = (trace.marker.maxdisplayed || trace._needsCull) ? visFilter : Lib.identity; + markerFilter = trace.marker.maxdisplayed ? visFilter : Lib.identity; } if(showText) { - textFilter = (trace.marker.maxdisplayed || trace._needsCull) ? visFilter : Lib.identity; + textFilter = trace.marker.maxdisplayed ? visFilter : Lib.identity; } // marker points @@ -167475,7 +161052,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition var x = d.xp || xa.c2p(d.x), y = d.yp || ya.c2p(d.y); - d3.select(this).selectAll('tspan.line').each(function() { + d3.select(this).selectAll('tspan').each(function() { transition(d3.select(this)).attr({x: x, y: y}); }); }); @@ -167542,7 +161119,7 @@ function selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll) { }); } -},{"../../components/drawing":602,"../../components/errorbars":608,"../../lib":685,"../../lib/polygon":695,"./line_points":988,"./link_traces":990,"./subtypes":996,"d3":107}],994:[function(require,module,exports){ +},{"../../components/drawing":598,"../../components/errorbars":604,"../../lib":680,"../../lib/polygon":690,"./line_points":936,"./link_traces":938,"./subtypes":944,"d3":104}],942:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167614,7 +161191,7 @@ module.exports = function selectPoints(searchInfo, polygon) { return selection; }; -},{"./subtypes":996}],995:[function(require,module,exports){ +},{"./subtypes":944}],943:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167660,7 +161237,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/drawing":602,"../../components/errorbars":608,"d3":107}],996:[function(require,module,exports){ +},{"../../components/drawing":598,"../../components/errorbars":604,"d3":104}],944:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167696,7 +161273,7 @@ module.exports = { } }; -},{"../../lib":685}],997:[function(require,module,exports){ +},{"../../lib":680}],945:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167717,7 +161294,7 @@ module.exports = function(traceIn, traceOut, layout, coerce) { Lib.coerceFont(coerce, 'textfont', layout.font); }; -},{"../../lib":685}],998:[function(require,module,exports){ +},{"../../lib":680}],946:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167767,7 +161344,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) { return len; }; -},{"../../registry":802}],999:[function(require,module,exports){ +},{"../../registry":793}],947:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167781,7 +161358,6 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) { var scatterAttrs = require('../scatter/attributes'); var colorAttributes = require('../../components/colorscale/color_attributes'); var errorBarAttrs = require('../../components/errorbars/attributes'); -var DASHES = require('../../constants/gl3d_dashes'); var MARKER_SYMBOLS = require('../../constants/gl_markers'); var extendFlat = require('../../lib/extend').extendFlat; @@ -167834,10 +161410,6 @@ module.exports = { text: extendFlat({}, scatterAttrs.text, { }), - hovertext: extendFlat({}, scatterAttrs.hovertext, { - - }), - mode: extendFlat({}, scatterAttrs.mode, // shouldn't this be on-par with 2D? {dflt: 'lines+markers'}), surfaceaxis: { @@ -167860,13 +161432,7 @@ module.exports = { connectgaps: scatterAttrs.connectgaps, line: extendFlat({}, { width: scatterLineAttrs.width, - dash: { - valType: 'enumerated', - values: Object.keys(DASHES), - dflt: 'solid', - - - }, + dash: scatterLineAttrs.dash, showscale: { valType: 'boolean', @@ -167912,7 +161478,7 @@ module.exports = { error_z: errorBarAttrs, }; -},{"../../components/colorscale/color_attributes":585,"../../components/errorbars/attributes":604,"../../constants/gl3d_dashes":663,"../../constants/gl_markers":664,"../../lib/extend":677,"../scatter/attributes":976}],1000:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":582,"../../components/errorbars/attributes":600,"../../constants/gl_markers":660,"../../lib/extend":672,"../scatter/attributes":924}],948:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -167941,7 +161507,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980}],1001:[function(require,module,exports){ +},{"../scatter/arrays_to_calcdata":923,"../scatter/colorscale_calc":928}],949:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168012,7 +161578,7 @@ function calculateErrors(data, scaleFactor) { module.exports = calculateErrors; -},{"../../components/errorbars/compute_error":606}],1002:[function(require,module,exports){ +},{"../../components/errorbars/compute_error":602}],950:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168073,12 +161639,8 @@ proto.handlePick = function(selection) { selection.object = this.scatterPlot; this.scatterPlot.highlight(selection.data); } - if(this.textLabels) { - if(this.textLabels[selection.data.index] !== undefined) { - selection.textLabel = this.textLabels[selection.data.index]; - } else { - selection.textLabel = this.textLabels; - } + if(this.textLabels && this.textLabels[selection.data.index] !== undefined) { + selection.textLabel = this.textLabels[selection.data.index]; } else selection.textLabel = ''; @@ -168390,7 +161952,7 @@ proto.update = function(data) { opacity: data.opacity }; - this.textLabels = data.hovertext || data.text; + this.textLabels = options.text; if(this.mode.indexOf('text') !== -1) { if(this.textMarkers) this.textMarkers.update(textOptions); @@ -168483,7 +162045,7 @@ function createLineWithMarkers(scene, data) { module.exports = createLineWithMarkers; -},{"../../constants/gl3d_dashes":663,"../../constants/gl_markers":664,"../../lib":685,"../../lib/gl_format_color":682,"../../lib/str2rgbarray":703,"../scatter/make_bubble_size_func":991,"./calc_errors":1001,"delaunay-triangulate":108,"gl-error3d":146,"gl-line3d":156,"gl-mesh3d":189,"gl-scatter3d":235}],1003:[function(require,module,exports){ +},{"../../constants/gl3d_dashes":659,"../../constants/gl_markers":660,"../../lib":680,"../../lib/gl_format_color":677,"../../lib/str2rgbarray":698,"../scatter/make_bubble_size_func":939,"./calc_errors":949,"delaunay-triangulate":105,"gl-error3d":143,"gl-line3d":153,"gl-mesh3d":186,"gl-scatter3d":232}],951:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168520,7 +162082,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('text'); - coerce('hovertext'); coerce('mode'); if(subTypes.hasLines(traceOut)) { @@ -168573,7 +162134,7 @@ function handleXYZDefaults(traceIn, traceOut, coerce, layout) { return len; } -},{"../../components/errorbars/defaults":607,"../../lib":685,"../../registry":802,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":999}],1004:[function(require,module,exports){ +},{"../../components/errorbars/defaults":603,"../../lib":680,"../../registry":793,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":947}],952:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168604,7 +162165,7 @@ Scatter3D.meta = { module.exports = Scatter3D; -},{"../../constants/gl_markers":664,"../../plots/gl3d":767,"../scatter/colorbar":979,"./attributes":999,"./calc":1000,"./convert":1002,"./defaults":1003}],1005:[function(require,module,exports){ +},{"../../constants/gl_markers":660,"../../plots/gl3d":758,"../scatter/colorbar":927,"./attributes":947,"./calc":948,"./convert":950,"./defaults":951}],953:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -168618,481 +162179,6 @@ module.exports = Scatter3D; var scatterAttrs = require('../scatter/attributes'); var plotAttrs = require('../../plots/attributes'); var colorAttributes = require('../../components/colorscale/color_attributes'); -var colorbarAttrs = require('../../components/colorbar/attributes'); - -var extendFlat = require('../../lib/extend').extendFlat; - -var scatterMarkerAttrs = scatterAttrs.marker, - scatterLineAttrs = scatterAttrs.line, - scatterMarkerLineAttrs = scatterMarkerAttrs.line; - -module.exports = { - carpet: { - valType: 'string', - - - }, - a: { - valType: 'data_array', - - }, - b: { - valType: 'data_array', - - }, - sum: { - valType: 'number', - - dflt: 0, - min: 0, - - }, - mode: extendFlat({}, scatterAttrs.mode, {dflt: 'markers'}), - text: extendFlat({}, scatterAttrs.text, { - - }), - line: { - color: scatterLineAttrs.color, - width: scatterLineAttrs.width, - dash: scatterLineAttrs.dash, - shape: extendFlat({}, scatterLineAttrs.shape, - {values: ['linear', 'spline']}), - smoothing: scatterLineAttrs.smoothing - }, - connectgaps: scatterAttrs.connectgaps, - fill: extendFlat({}, scatterAttrs.fill, { - values: ['none', 'toself', 'tonext'], - - }), - fillcolor: scatterAttrs.fillcolor, - marker: extendFlat({}, { - symbol: scatterMarkerAttrs.symbol, - opacity: scatterMarkerAttrs.opacity, - maxdisplayed: scatterMarkerAttrs.maxdisplayed, - size: scatterMarkerAttrs.size, - sizeref: scatterMarkerAttrs.sizeref, - sizemin: scatterMarkerAttrs.sizemin, - sizemode: scatterMarkerAttrs.sizemode, - line: extendFlat({}, - {width: scatterMarkerLineAttrs.width}, - colorAttributes('marker'.line) - ) - }, colorAttributes('marker'), { - showscale: scatterMarkerAttrs.showscale, - colorbar: colorbarAttrs - }), - - textfont: scatterAttrs.textfont, - textposition: scatterAttrs.textposition, - hoverinfo: extendFlat({}, plotAttrs.hoverinfo, { - flags: ['a', 'b', 'c', 'text', 'name'] - }), - hoveron: scatterAttrs.hoveron, -}; - -},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1006:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var isNumeric = require('fast-isnumeric'); - -var Axes = require('../../plots/cartesian/axes'); -var Lib = require('../../lib'); - -var subTypes = require('../scatter/subtypes'); -var calcColorscale = require('../scatter/colorscale_calc'); -var lookupCarpet = require('../carpet/lookup_carpetid'); - -module.exports = function calc(gd, trace) { - var carpet = trace.carpetTrace = lookupCarpet(gd, trace); - if(!carpet || !carpet.visible || carpet.visible === 'legendonly') return; - var i; - - // Transfer this over from carpet before plotting since this is a necessary - // condition in order for cartesian to actually plot this trace: - trace.xaxis = carpet.xaxis; - trace.yaxis = carpet.yaxis; - - // make the calcdata array - var serieslen = trace.a.length; - var cd = new Array(serieslen); - var a, b; - var needsCull = false; - for(i = 0; i < serieslen; i++) { - a = trace.a[i]; - b = trace.b[i]; - if(isNumeric(a) && isNumeric(b)) { - var xy = carpet.ab2xy(+a, +b, true); - var visible = carpet.isVisible(+a, +b); - if(!visible) needsCull = true; - cd[i] = {x: xy[0], y: xy[1], a: a, b: b, vis: visible}; - } - else cd[i] = {x: false, y: false}; - } - - trace._needsCull = needsCull; - - cd[0].carpet = carpet; - cd[0].trace = trace; - - // fill in some extras - var marker, s; - if(subTypes.hasMarkers(trace)) { - // Treat size like x or y arrays --- Run d2c - // this needs to go before ppad computation - marker = trace.marker; - s = marker.size; - - if(Array.isArray(s)) { - var ax = {type: 'linear'}; - Axes.setConvert(ax); - s = ax.makeCalcdata(trace.marker, 'size'); - if(s.length > serieslen) s.splice(serieslen, s.length - serieslen); - } - } - - calcColorscale(trace); - - // this has migrated up from arraysToCalcdata as we have a reference to 's' here - if(typeof s !== 'undefined') Lib.mergeArray(s, cd, 'ms'); - - return cd; -}; - -},{"../../lib":685,"../../plots/cartesian/axes":724,"../carpet/lookup_carpetid":858,"../scatter/colorscale_calc":980,"../scatter/subtypes":996,"fast-isnumeric":116}],1007:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var Lib = require('../../lib'); - -var constants = require('../scatter/constants'); -var subTypes = require('../scatter/subtypes'); -var handleMarkerDefaults = require('../scatter/marker_defaults'); -var handleLineDefaults = require('../scatter/line_defaults'); -var handleLineShapeDefaults = require('../scatter/line_shape_defaults'); -var handleTextDefaults = require('../scatter/text_defaults'); -var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); - -var attributes = require('./attributes'); - - -module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { - function coerce(attr, dflt) { - return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); - } - - coerce('carpet'); - - // XXX: Don't hard code this - traceOut.xaxis = 'x'; - traceOut.yaxis = 'y'; - - var a = coerce('a'), - b = coerce('b'), - len; - - len = Math.min(a.length, b.length); - - if(!len) { - traceOut.visible = false; - return; - } - - // cut all data arrays down to same length - if(a && len < a.length) traceOut.a = a.slice(0, len); - if(b && len < b.length) traceOut.b = b.slice(0, len); - - coerce('sum'); - - coerce('text'); - - var defaultMode = len < constants.PTS_LINESONLY ? 'lines+markers' : 'lines'; - coerce('mode', defaultMode); - - if(subTypes.hasLines(traceOut)) { - handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce); - handleLineShapeDefaults(traceIn, traceOut, coerce); - coerce('connectgaps'); - } - - if(subTypes.hasMarkers(traceOut)) { - handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce); - } - - if(subTypes.hasText(traceOut)) { - handleTextDefaults(traceIn, traceOut, layout, coerce); - } - - var dfltHoverOn = []; - - if(subTypes.hasMarkers(traceOut) || subTypes.hasText(traceOut)) { - coerce('marker.maxdisplayed'); - dfltHoverOn.push('points'); - } - - coerce('fill'); - if(traceOut.fill !== 'none') { - handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce); - if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce); - } - - coerce('hoverinfo', (layout._dataLength === 1) ? 'a+b+text' : undefined); - - if(traceOut.fill === 'tonext' || traceOut.fill === 'toself') { - dfltHoverOn.push('fills'); - } - coerce('hoveron', dfltHoverOn.join('+') || 'points'); -}; - -},{"../../lib":685,"../scatter/constants":981,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/line_shape_defaults":989,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1005}],1008:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var scatterHover = require('../scatter/hover'); - -module.exports = function hoverPoints(pointData, xval, yval, hovermode) { - var scatterPointData = scatterHover(pointData, xval, yval, hovermode); - if(!scatterPointData || scatterPointData[0].index === false) return; - - var newPointData = scatterPointData[0]; - - // if hovering on a fill, we don't show any point data so the label is - // unchanged from what scatter gives us - except that it needs to - // be constrained to the trianglular plot area, not just the rectangular - // area defined by the synthetic x and y axes - // TODO: in some cases the vertical middle of the shape is not within - // the triangular viewport at all, so the label can become disconnected - // from the shape entirely. But calculating what portion of the shape - // is actually visible, as constrained by the diagonal axis lines, is not - // so easy and anyway we lost the information we would have needed to do - // this inside scatterHover. - if(newPointData.index === undefined) { - var yFracUp = 1 - (newPointData.y0 / pointData.ya._length), - xLen = pointData.xa._length, - xMin = xLen * yFracUp / 2, - xMax = xLen - xMin; - newPointData.x0 = Math.max(Math.min(newPointData.x0, xMax), xMin); - newPointData.x1 = Math.max(Math.min(newPointData.x1, xMax), xMin); - return scatterPointData; - } - - var cdi = newPointData.cd[newPointData.index]; - - newPointData.a = cdi.a; - newPointData.b = cdi.b; - - newPointData.xLabelVal = undefined; - newPointData.yLabelVal = undefined; - // TODO: nice formatting, and label by axis title, for a, b, and c? - - var trace = newPointData.trace, - carpet = trace._carpet, - hoverinfo = trace.hoverinfo.split('+'), - text = []; - - function textPart(ax, val) { - text.push(((ax.labelprefix && ax.labelprefix.length > 0) ? ax.labelprefix : (ax._hovertitle + ': ')) + val.toFixed(3) + ax.labelsuffix); - } - - if(hoverinfo.indexOf('all') !== -1) hoverinfo = ['a', 'b']; - if(hoverinfo.indexOf('a') !== -1) textPart(carpet.aaxis, cdi.a); - if(hoverinfo.indexOf('b') !== -1) textPart(carpet.baxis, cdi.b); - - var ij = carpet.ab2ij([cdi.a, cdi.b]); - var i0 = Math.floor(ij[0]); - var ti = ij[0] - i0; - - var j0 = Math.floor(ij[1]); - var tj = ij[1] - j0; - - var xy = carpet.evalxy([], i0, j0, ti, tj); - text.push('y: ' + xy[1].toFixed(3)); - - newPointData.extraText = text.join('
'); - - return scatterPointData; -}; - -},{"../scatter/hover":985}],1009:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var ScatterCarpet = {}; - -ScatterCarpet.attributes = require('./attributes'); -ScatterCarpet.supplyDefaults = require('./defaults'); -ScatterCarpet.colorbar = require('../scatter/colorbar'); -ScatterCarpet.calc = require('./calc'); -ScatterCarpet.plot = require('./plot'); -ScatterCarpet.style = require('./style'); -ScatterCarpet.hoverPoints = require('./hover'); -ScatterCarpet.selectPoints = require('./select'); - -ScatterCarpet.moduleType = 'trace'; -ScatterCarpet.name = 'scattercarpet'; -ScatterCarpet.basePlotModule = require('../../plots/cartesian'); -ScatterCarpet.categories = ['carpet', 'symbols', 'markerColorscale', 'showLegend', 'carpetDependent']; -ScatterCarpet.meta = { - - -}; - -module.exports = ScatterCarpet; - -},{"../../plots/cartesian":734,"../scatter/colorbar":979,"./attributes":1005,"./calc":1006,"./defaults":1007,"./hover":1008,"./plot":1010,"./select":1011,"./style":1012}],1010:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var scatterPlot = require('../scatter/plot'); -var Axes = require('../../plots/cartesian/axes'); - -module.exports = function plot(gd, plotinfoproxy, data) { - var i, trace, node; - - var carpet = data[0][0].carpet; - - // mimic cartesian plotinfo - var plotinfo = { - xaxis: Axes.getFromId(gd, carpet.xaxis || 'x'), - yaxis: Axes.getFromId(gd, carpet.yaxis || 'y'), - plot: plotinfoproxy.plot - }; - - scatterPlot(plotinfo.graphDiv, plotinfo, data); - - for(i = 0; i < data.length; i++) { - trace = data[i][0].trace; - - // Note: .select is adequate but seems to mutate the node data, - // which is at least a bit suprising and causes problems elsewhere - node = plotinfo.plot.selectAll('g.trace' + trace.uid + ' .js-line'); - - // Note: it would be more efficient if this didn't need to be applied - // separately to all scattercarpet traces, but that would require - // lots of reorganization of scatter traces that is otherwise not - // necessary. That makes this a potential optimization. - node.attr('clip-path', 'url(#clip' + carpet.uid + 'carpet)'); - } -}; - -},{"../../plots/cartesian/axes":724,"../scatter/plot":993}],1011:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var scatterSelect = require('../scatter/select'); - - -module.exports = function selectPoints(searchInfo, polygon) { - var selection = scatterSelect(searchInfo, polygon); - if(!selection) return; - - var cd = searchInfo.cd, - pt, cdi, i; - - for(i = 0; i < selection.length; i++) { - pt = selection[i]; - cdi = cd[pt.pointNumber]; - pt.a = cdi.a; - pt.b = cdi.b; - pt.c = cdi.c; - delete pt.x; - delete pt.y; - } - - return selection; -}; - -},{"../scatter/select":994}],1012:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - - -'use strict'; - -var scatterStyle = require('../scatter/style'); - - -module.exports = function style(gd) { - var modules = gd._fullLayout._modules; - - // we're just going to call scatter style... if we already - // called it, don't need to redo. - // Later though we may want differences, or we may make style - // more specific in its scope, then we can remove this. - for(var i = 0; i < modules.length; i++) { - if(modules[i].name === 'scatter') return; - } - - scatterStyle(gd); -}; - -},{"../scatter/style":995}],1013:[function(require,module,exports){ -/** -* Copyright 2012-2017, Plotly, Inc. -* All rights reserved. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ - -'use strict'; - -var scatterAttrs = require('../scatter/attributes'); -var plotAttrs = require('../../plots/attributes'); -var colorAttributes = require('../../components/colorscale/color_attributes'); -var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; @@ -169127,17 +162213,13 @@ module.exports = { text: extendFlat({}, scatterAttrs.text, { }), - hovertext: extendFlat({}, scatterAttrs.hovertext, { - - }), - textfont: scatterAttrs.textfont, textposition: scatterAttrs.textposition, line: { color: scatterLineAttrs.color, width: scatterLineAttrs.width, - dash: dash + dash: scatterLineAttrs.dash }, connectgaps: scatterAttrs.connectgaps, @@ -169172,7 +162254,7 @@ module.exports = { }) }; -},{"../../components/colorscale/color_attributes":585,"../../components/drawing/attributes":601,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1014:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":582,"../../lib/extend":672,"../../plots/attributes":717,"../scatter/attributes":924}],954:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169185,38 +162267,51 @@ module.exports = { 'use strict'; var isNumeric = require('fast-isnumeric'); -var BADNUM = require('../../constants/numerical').BADNUM; var calcMarkerColorscale = require('../scatter/colorscale_calc'); -var arraysToCalcdata = require('../scatter/arrays_to_calcdata'); + module.exports = function calc(gd, trace) { - var hasLocationData = Array.isArray(trace.locations); - var len = hasLocationData ? trace.locations.length : trace.lon.length; - var calcTrace = new Array(len); + var hasLocationData = Array.isArray(trace.locations), + len = hasLocationData ? trace.locations.length : trace.lon.length; + + var calcTrace = [], + cnt = 0; for(var i = 0; i < len; i++) { - var calcPt = calcTrace[i] = {}; + var calcPt = {}, + skip; if(hasLocationData) { var loc = trace.locations[i]; - calcPt.loc = typeof loc === 'string' ? loc : null; - } else { - var lon = trace.lon[i]; - var lat = trace.lat[i]; - if(isNumeric(lon) && isNumeric(lat)) calcPt.lonlat = [+lon, +lat]; - else calcPt.lonlat = [BADNUM, BADNUM]; + calcPt.loc = loc; + skip = (typeof loc !== 'string'); } + else { + var lon = trace.lon[i], + lat = trace.lat[i]; + + calcPt.lonlat = [+lon, +lat]; + skip = (!isNumeric(lon) || !isNumeric(lat)); + } + + if(skip) { + if(cnt > 0) calcTrace[cnt - 1].gapAfter = true; + continue; + } + + cnt++; + + calcTrace.push(calcPt); } - arraysToCalcdata(calcTrace, trace); calcMarkerColorscale(trace); return calcTrace; }; -},{"../../constants/numerical":666,"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980,"fast-isnumeric":116}],1015:[function(require,module,exports){ +},{"../scatter/colorscale_calc":928,"fast-isnumeric":113}],955:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169251,7 +162346,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('text'); - coerce('hovertext'); coerce('mode'); if(subTypes.hasLines(traceOut)) { @@ -169297,7 +162391,7 @@ function handleLonLatLocDefaults(traceIn, traceOut, coerce) { return len; } -},{"../../lib":685,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1013}],1016:[function(require,module,exports){ +},{"../../lib":680,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":953}],956:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169318,7 +162412,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],1017:[function(require,module,exports){ +},{}],957:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169332,7 +162426,6 @@ module.exports = function eventData(out, pt) { var Fx = require('../../plots/cartesian/graph_interact'); var Axes = require('../../plots/cartesian/axes'); -var BADNUM = require('../../constants/numerical').BADNUM; var getTraceColor = require('../scatter/get_trace_color'); var attributes = require('./attributes'); @@ -169345,6 +162438,8 @@ module.exports = function hoverPoints(pointData) { ya = pointData.ya, geo = pointData.subplot; + if(cd[0].placeholder) return; + function c2p(lonlat) { return geo.projection(lonlat); } @@ -169352,7 +162447,8 @@ module.exports = function hoverPoints(pointData) { function distFn(d) { var lonlat = d.lonlat; - if(lonlat[0] === BADNUM) return Infinity; + // this handles the not-found location feature case + if(lonlat[0] === null || lonlat[1] === null) return Infinity; if(geo.isLonLatOverEdges(lonlat)) return Infinity; @@ -169422,20 +162518,14 @@ function getExtraText(trace, pt, axis) { else if(hasLat) text.push('lat: ' + format(pt.lonlat[1])); if(hasText) { - var tx; - - if(pt.htx) tx = pt.htx; - else if(trace.hovertext) tx = trace.hovertext; - else if(pt.tx) tx = pt.tx; - else if(trace.text) tx = trace.text; - + var tx = pt.tx || trace.text; if(!Array.isArray(tx)) text.push(tx); } return text.join('
'); } -},{"../../constants/numerical":666,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"../scatter/get_trace_color":984,"./attributes":1013}],1018:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"../scatter/get_trace_color":932,"./attributes":953}],958:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169468,7 +162558,7 @@ ScatterGeo.meta = { module.exports = ScatterGeo; -},{"../../plots/geo":752,"../scatter/colorbar":979,"./attributes":1013,"./calc":1014,"./defaults":1015,"./event_data":1016,"./hover":1017,"./plot":1019}],1019:[function(require,module,exports){ +},{"../../plots/geo":743,"../scatter/colorbar":927,"./attributes":953,"./calc":954,"./defaults":955,"./event_data":956,"./hover":957,"./plot":959}],959:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169486,10 +162576,10 @@ var Drawing = require('../../components/drawing'); var Color = require('../../components/color'); var Lib = require('../../lib'); -var BADNUM = require('../../constants/numerical').BADNUM; var getTopojsonFeatures = require('../../lib/topojson_utils').getTopojsonFeatures; var locationToFeature = require('../../lib/geo_location_utils').locationToFeature; var geoJsonUtils = require('../../lib/geojson_utils'); +var arrayToCalcItem = require('../../lib/array_to_calc_item'); var subTypes = require('../scatter/subtypes'); @@ -169497,16 +162587,6 @@ module.exports = function plot(geo, calcData) { function keyFunc(d) { return d[0].trace.uid; } - function removeBADNUM(d, node) { - if(d.lonlat[0] === BADNUM) { - d3.select(node).remove(); - } - } - - for(var i = 0; i < calcData.length; i++) { - fillLocationLonLat(calcData[i], geo.topojson); - } - var gScatterGeoTraces = geo.framework.select('.scattergeolayer') .selectAll('g.trace.scattergeo') .data(calcData, keyFunc); @@ -169520,11 +162600,27 @@ module.exports = function plot(geo, calcData) { gScatterGeoTraces.selectAll('*').remove(); gScatterGeoTraces.each(function(calcTrace) { - var s = d3.select(this); - var trace = calcTrace[0].trace; + var s = d3.select(this), + trace = calcTrace[0].trace, + convertToLonLatFn = makeConvertToLonLatFn(trace, geo.topojson); + + // skip over placeholder traces + if(calcTrace[0].placeholder) s.remove(); + + // just like calcTrace but w/o not-found location datum + var _calcTrace = []; + + for(var i = 0; i < calcTrace.length; i++) { + var _calcPt = convertToLonLatFn(calcTrace[i]); + + if(_calcPt) { + arrayItemToCalcdata(trace, calcTrace[i], i); + _calcTrace.push(_calcPt); + } + } if(subTypes.hasLines(trace) || trace.fill !== 'none') { - var lineCoords = geoJsonUtils.calcTraceToLineCoords(calcTrace); + var lineCoords = geoJsonUtils.calcTraceToLineCoords(_calcTrace); var lineData = (trace.fill !== 'none') ? geoJsonUtils.makePolygon(lineCoords, trace) : @@ -169537,19 +162633,15 @@ module.exports = function plot(geo, calcData) { } if(subTypes.hasMarkers(trace)) { - s.selectAll('path.point') - .data(Lib.identity) - .enter().append('path') - .classed('point', true) - .each(function(calcPt) { removeBADNUM(calcPt, this); }); + s.selectAll('path.point').data(_calcTrace) + .enter().append('path') + .classed('point', true); } if(subTypes.hasText(trace)) { - s.selectAll('g') - .data(Lib.identity) + s.selectAll('g').data(_calcTrace) .enter().append('g') - .append('text') - .each(function(calcPt) { removeBADNUM(calcPt, this); }); + .append('text'); } }); @@ -169557,19 +162649,50 @@ module.exports = function plot(geo, calcData) { style(geo); }; -function fillLocationLonLat(calcTrace, topojson) { - var trace = calcTrace[0].trace; - - if(!Array.isArray(trace.locations)) return; +function makeConvertToLonLatFn(trace, topojson) { + if(!Array.isArray(trace.locations)) return Lib.identity; - var features = getTopojsonFeatures(trace, topojson); - var locationmode = trace.locationmode; + var features = getTopojsonFeatures(trace, topojson), + locationmode = trace.locationmode; - for(var i = 0; i < calcTrace.length; i++) { - var calcPt = calcTrace[i]; + return function(calcPt) { var feature = locationToFeature(locationmode, calcPt.loc, features); - calcPt.lonlat = feature ? feature.properties.ct : [BADNUM, BADNUM]; + if(feature) { + calcPt.lonlat = feature.properties.ct; + return calcPt; + } + else { + // mutate gd.calcdata so that hoverPoints knows to skip this datum + calcPt.lonlat = [null, null]; + return false; + } + }; +} + +function arrayItemToCalcdata(trace, calcItem, i) { + var marker = trace.marker; + + function merge(traceAttr, calcAttr) { + arrayToCalcItem(traceAttr, calcItem, calcAttr, i); + } + + merge(trace.text, 'tx'); + merge(trace.textposition, 'tp'); + if(trace.textfont) { + merge(trace.textfont.size, 'ts'); + merge(trace.textfont.color, 'tc'); + merge(trace.textfont.family, 'tf'); + } + + if(marker && marker.line) { + var markerLine = marker.line; + merge(marker.opacity, 'mo'); + merge(marker.symbol, 'mx'); + merge(marker.color, 'mc'); + merge(marker.size, 'ms'); + merge(markerLine.color, 'mlc'); + merge(markerLine.width, 'mlw'); } } @@ -169607,7 +162730,7 @@ function style(geo) { }); } -},{"../../components/color":578,"../../components/drawing":602,"../../constants/numerical":666,"../../lib":685,"../../lib/geo_location_utils":680,"../../lib/geojson_utils":681,"../../lib/topojson_utils":706,"../scatter/subtypes":996,"d3":107}],1020:[function(require,module,exports){ +},{"../../components/color":575,"../../components/drawing":598,"../../lib":680,"../../lib/array_to_calc_item":667,"../../lib/geo_location_utils":675,"../../lib/geojson_utils":676,"../../lib/topojson_utils":701,"../scatter/subtypes":944,"d3":104}],960:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -169689,7 +162812,7 @@ module.exports = { error_x: scatterAttrs.error_x }; -},{"../../components/colorscale/color_attributes":585,"../../constants/gl2d_dashes":662,"../../constants/gl_markers":664,"../../lib/extend":677,"../scatter/attributes":976}],1021:[function(require,module,exports){ +},{"../../components/colorscale/color_attributes":582,"../../constants/gl2d_dashes":658,"../../constants/gl_markers":660,"../../lib/extend":672,"../scatter/attributes":924}],961:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170002,7 +163125,7 @@ proto.update = function(options) { // representing the epoch milliseconds in a typed array; // also, perhaps the Python / R interfaces take care of String->Date conversions // such that there's no need to check for string dates in plotly.js) -// Patterned from axis_autotype.js:moreDates +// Patterned from axis_defaults.js:moreDates // Code DRYing is not done to preserve the most direct compilation possible for speed; // also, there are quite a few differences function allFastTypesLikely(a) { @@ -170338,7 +163461,7 @@ function createLineWithMarkers(scene, data) { module.exports = createLineWithMarkers; -},{"../../components/errorbars":608,"../../constants/gl2d_dashes":662,"../../constants/gl_markers":664,"../../lib":685,"../../lib/gl_format_color":682,"../../lib/str2rgbarray":703,"../../lib/typed_array_truncate":707,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_autotype":725,"../scatter/get_trace_color":984,"../scatter/make_bubble_size_func":991,"../scatter/subtypes":996,"fast-isnumeric":116,"gl-error2d":144,"gl-line2d":154,"gl-scatter2d":232,"gl-scatter2d-sdf":227}],1022:[function(require,module,exports){ +},{"../../components/errorbars":604,"../../constants/gl2d_dashes":658,"../../constants/gl_markers":660,"../../lib":680,"../../lib/gl_format_color":677,"../../lib/str2rgbarray":698,"../../lib/typed_array_truncate":702,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_autotype":720,"../scatter/get_trace_color":932,"../scatter/make_bubble_size_func":939,"../scatter/subtypes":944,"fast-isnumeric":113,"gl-error2d":141,"gl-line2d":151,"gl-scatter2d":229,"gl-scatter2d-sdf":224}],962:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170395,7 +163518,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout errorBarsSupplyDefaults(traceIn, traceOut, defaultColor, {axis: 'x', inherit: 'y'}); }; -},{"../../components/errorbars/defaults":607,"../../lib":685,"../scatter/constants":981,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/xy_defaults":998,"./attributes":1020}],1023:[function(require,module,exports){ +},{"../../components/errorbars/defaults":603,"../../lib":680,"../scatter/constants":929,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/xy_defaults":946,"./attributes":960}],963:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170426,7 +163549,7 @@ ScatterGl.meta = { module.exports = ScatterGl; -},{"../../plots/gl2d":764,"../scatter/colorbar":979,"../scatter3d/calc":1000,"./attributes":1020,"./convert":1021,"./defaults":1022}],1024:[function(require,module,exports){ +},{"../../plots/gl2d":755,"../scatter/colorbar":927,"../scatter3d/calc":948,"./attributes":960,"./convert":961,"./defaults":962}],964:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170456,24 +163579,25 @@ module.exports = { // locations // locationmode - mode: extendFlat({}, scatterAttrs.mode, { + mode: { + valType: 'flaglist', + flags: ['lines', 'markers', 'text'], dflt: 'markers', + extras: ['none'], - }), + + }, text: extendFlat({}, scatterAttrs.text, { - }), - hovertext: extendFlat({}, scatterAttrs.hovertext, { - }), line: { color: lineAttrs.color, - width: lineAttrs.width + width: lineAttrs.width, // TODO - // dash: dash + dash: lineAttrs.dash }, connectgaps: scatterAttrs.connectgaps, @@ -170517,7 +163641,7 @@ module.exports = { }), }; -},{"../../components/colorbar/attributes":579,"../../lib/extend":677,"../../plots/attributes":722,"../../plots/mapbox/layout_attributes":783,"../scatter/attributes":976,"../scattergeo/attributes":1013}],1025:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../lib/extend":672,"../../plots/attributes":717,"../../plots/mapbox/layout_attributes":774,"../scatter/attributes":924,"../scattergeo/attributes":953}],965:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170529,12 +163653,112 @@ module.exports = { 'use strict'; -var Lib = require('../../lib'); -var BADNUM = require('../../constants/numerical').BADNUM; -var geoJsonUtils = require('../../lib/geojson_utils'); +var isNumeric = require('fast-isnumeric'); +var Lib = require('../../lib'); var Colorscale = require('../../components/colorscale'); + +var subtypes = require('../scatter/subtypes'); +var calcMarkerColorscale = require('../scatter/colorscale_calc'); var makeBubbleSizeFn = require('../scatter/make_bubble_size_func'); + + +module.exports = function calc(gd, trace) { + var len = trace.lon.length, + marker = trace.marker; + + var hasMarkers = subtypes.hasMarkers(trace), + hasColorArray = (hasMarkers && Array.isArray(marker.color)), + hasSizeArray = (hasMarkers && Array.isArray(marker.size)), + hasSymbolArray = (hasMarkers && Array.isArray(marker.symbol)), + hasTextArray = Array.isArray(trace.text); + + calcMarkerColorscale(trace); + + var colorFn = Colorscale.hasColorscale(trace, 'marker') ? + Colorscale.makeColorScaleFunc( + Colorscale.extractScale( + marker.colorscale, + marker.cmin, + marker.cmax + ) + ) : + Lib.identity; + + var sizeFn = subtypes.isBubble(trace) ? + makeBubbleSizeFn(trace) : + Lib.identity; + + var calcTrace = [], + cnt = 0; + + // Different than cartesian calc step + // as skip over non-numeric lon, lat pairs. + // This makes the hover and convert calculations simpler. + + for(var i = 0; i < len; i++) { + var lon = trace.lon[i], + lat = trace.lat[i]; + + if(!isNumeric(lon) || !isNumeric(lat)) { + if(cnt > 0) calcTrace[cnt - 1].gapAfter = true; + continue; + } + + var calcPt = {}; + cnt++; + + // coerce numeric strings into numbers + calcPt.lonlat = [+lon, +lat]; + + if(hasMarkers) { + + if(hasColorArray) { + var mc = marker.color[i]; + + calcPt.mc = mc; + calcPt.mcc = colorFn(mc); + } + + if(hasSizeArray) { + var ms = marker.size[i]; + + calcPt.ms = ms; + calcPt.mrc = sizeFn(ms); + } + + if(hasSymbolArray) { + var mx = marker.symbol[i]; + calcPt.mx = (typeof mx === 'string') ? mx : 'circle'; + } + } + + if(hasTextArray) { + var tx = trace.text[i]; + calcPt.tx = (typeof tx === 'string') ? tx : ''; + } + + calcTrace.push(calcPt); + } + + return calcTrace; +}; + +},{"../../components/colorscale":589,"../../lib":680,"../scatter/colorscale_calc":928,"../scatter/make_bubble_size_func":939,"../scatter/subtypes":944,"fast-isnumeric":113}],966:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var Lib = require('../../lib'); +var geoJsonUtils = require('../../lib/geojson_utils'); + var subTypes = require('../scatter/subtypes'); var convertTextOpts = require('../../plots/mapbox/convert_text_opts'); @@ -170566,16 +163790,16 @@ module.exports = function convert(calcTrace) { }; // early return if not visible or placeholder - if(!isVisible) return opts; + if(!isVisible || calcTrace[0].placeholder) return opts; // fill layer and line layer use the same coords - var lineCoords; + var coords; if(hasFill || hasLines) { - lineCoords = geoJsonUtils.calcTraceToLineCoords(calcTrace); + coords = geoJsonUtils.calcTraceToLineCoords(calcTrace); } if(hasFill) { - fill.geojson = geoJsonUtils.makePolygon(lineCoords); + fill.geojson = geoJsonUtils.makePolygon(coords); fill.layout.visibility = 'visible'; Lib.extendFlat(fill.paint, { @@ -170584,7 +163808,7 @@ module.exports = function convert(calcTrace) { } if(hasLines) { - line.geojson = geoJsonUtils.makeLine(lineCoords); + line.geojson = geoJsonUtils.makeLine(coords); line.layout.visibility = 'visible'; Lib.extendFlat(line.paint, { @@ -170678,30 +163902,12 @@ function initContainer() { // // The solution prove to be more robust than trying to generate // `stops` arrays from scale functions. -// -// TODO axe this when we bump mapbox-gl and rewrite this using -// "identity" property functions. -// See https://github.com/plotly/plotly.js/pull/1543 -// function makeCircleGeoJSON(calcTrace, hash) { var trace = calcTrace[0].trace; - var marker = trace.marker; - var colorFn; - if(Colorscale.hasColorscale(trace, 'marker')) { - colorFn = Colorscale.makeColorScaleFunc( - Colorscale.extractScale(marker.colorscale, marker.cmin, marker.cmax) - ); - } else if(Array.isArray(marker.color)) { - colorFn = Lib.identity; - } - - var sizeFn; - if(subTypes.isBubble(trace)) { - sizeFn = makeBubbleSizeFn(trace); - } else if(Array.isArray(marker.size)) { - sizeFn = Lib.identity; - } + var marker = trace.marker, + hasColorArray = Array.isArray(marker.color), + hasSizeArray = Array.isArray(marker.size); // Translate vals in trace arrayOk containers // into a val-to-index hash object @@ -170715,19 +163921,16 @@ function makeCircleGeoJSON(calcTrace, hash) { for(var i = 0; i < calcTrace.length; i++) { var calcPt = calcTrace[i]; - var lonlat = calcPt.lonlat; - - if(isBADNUM(lonlat)) continue; var props = {}; - if(colorFn) translate(props, COLOR_PROP, colorFn(calcPt.mc), i); - if(sizeFn) translate(props, SIZE_PROP, sizeFn(calcPt.ms), i); + if(hasColorArray) translate(props, COLOR_PROP, calcPt.mcc, i); + if(hasSizeArray) translate(props, SIZE_PROP, calcPt.mrc, i); features.push({ type: 'Feature', geometry: { type: 'Point', - coordinates: lonlat + coordinates: calcPt.lonlat }, properties: props }); @@ -170759,8 +163962,6 @@ function makeSymbolGeoJSON(calcTrace) { for(var i = 0; i < calcTrace.length; i++) { var calcPt = calcTrace[i]; - if(isBADNUM(calcPt.lonlat)) continue; - features.push({ type: 'Feature', geometry: { @@ -170852,12 +164053,7 @@ function getFillFunc(attr) { function blankFillFunc() { return ''; } -// only need to check lon (OR lat) -function isBADNUM(lonlat) { - return lonlat[0] === BADNUM; -} - -},{"../../components/colorscale":592,"../../constants/numerical":666,"../../lib":685,"../../lib/geojson_utils":681,"../../plots/mapbox/convert_text_opts":780,"../scatter/make_bubble_size_func":991,"../scatter/subtypes":996}],1026:[function(require,module,exports){ +},{"../../lib":680,"../../lib/geojson_utils":676,"../../plots/mapbox/convert_text_opts":771,"../scatter/subtypes":944}],967:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170878,6 +164074,7 @@ var handleTextDefaults = require('../scatter/text_defaults'); var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); var attributes = require('./attributes'); +var scatterAttrs = require('../scatter/attributes'); module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) { @@ -170885,6 +164082,15 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); } + function coerceMarker(attr, dflt) { + var attrs = (attr.indexOf('.line') === -1) ? attributes : scatterAttrs; + + // use 'scatter' attributes for 'marker.line.' attr, + // so that we can reuse the scatter marker defaults + + return Lib.coerce(traceIn, traceOut, attrs, attr, dflt); + } + var len = handleLonLatDefaults(traceIn, traceOut, coerce); if(!len) { traceOut.visible = false; @@ -170892,22 +164098,19 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } coerce('text'); - coerce('hovertext'); coerce('mode'); if(subTypes.hasLines(traceOut)) { - handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noDash: true}); + handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce); coerce('connectgaps'); } if(subTypes.hasMarkers(traceOut)) { - handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noLine: true}); + handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerceMarker); // array marker.size and marker.color are only supported with circles var marker = traceOut.marker; - // we need mock marker.line object to make legends happy - marker.line = {width: 0}; if(marker.symbol !== 'circle') { if(Array.isArray(marker.size)) marker.size = marker.size[0]; @@ -170938,7 +164141,7 @@ function handleLonLatDefaults(traceIn, traceOut, coerce) { return len; } -},{"../../lib":685,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1024}],1027:[function(require,module,exports){ +},{"../../lib":680,"../scatter/attributes":924,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":964}],968:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170958,7 +164161,7 @@ module.exports = function eventData(out, pt) { return out; }; -},{}],1028:[function(require,module,exports){ +},{}],969:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -170972,7 +164175,7 @@ module.exports = function eventData(out, pt) { var Fx = require('../../plots/cartesian/graph_interact'); var getTraceColor = require('../scatter/get_trace_color'); -var BADNUM = require('../../constants/numerical').BADNUM; + module.exports = function hoverPoints(pointData, xval, yval) { var cd = pointData.cd, @@ -170980,6 +164183,8 @@ module.exports = function hoverPoints(pointData, xval, yval) { xa = pointData.xa, ya = pointData.ya; + if(cd[0].placeholder) return; + // compute winding number about [-180, 180] globe var winding = (xval >= 0) ? Math.floor((xval + 180) / 360) : @@ -170990,13 +164195,10 @@ module.exports = function hoverPoints(pointData, xval, yval) { var xval2 = xval - lonShift; function distFn(d) { - var lonlat = d.lonlat; - - if(lonlat[0] === BADNUM) return Infinity; - - var dx = Math.abs(xa.c2p(lonlat) - xa.c2p([xval2, lonlat[1]])); - var dy = Math.abs(ya.c2p(lonlat) - ya.c2p([lonlat[0], yval])); - var rad = Math.max(3, d.mrc || 0); + var lonlat = d.lonlat, + dx = Math.abs(xa.c2p(lonlat) - xa.c2p([xval2, lonlat[1]])), + dy = Math.abs(ya.c2p(lonlat) - ya.c2p([lonlat[0], yval])), + rad = Math.max(3, d.mrc || 0); return Math.max(Math.sqrt(dx * dx + dy * dy) - rad, 1 - 3 / rad); } @@ -171048,20 +164250,14 @@ function getExtraText(trace, di) { else if(hasLat) text.push('lat: ' + format(lonlat[1])); if(isAll || hoverinfo.indexOf('text') !== -1) { - var tx; - - if(di.htx) tx = di.htx; - else if(trace.hovertext) tx = trace.hovertext; - else if(di.tx) tx = di.tx; - else if(trace.text) tx = trace.text; - + var tx = di.tx || trace.text; if(!Array.isArray(tx)) text.push(tx); } return text.join('
'); } -},{"../../constants/numerical":666,"../../plots/cartesian/graph_interact":733,"../scatter/get_trace_color":984}],1029:[function(require,module,exports){ +},{"../../plots/cartesian/graph_interact":726,"../scatter/get_trace_color":932}],970:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171078,7 +164274,7 @@ var ScatterMapbox = {}; ScatterMapbox.attributes = require('./attributes'); ScatterMapbox.supplyDefaults = require('./defaults'); ScatterMapbox.colorbar = require('../scatter/colorbar'); -ScatterMapbox.calc = require('../scattergeo/calc'); +ScatterMapbox.calc = require('./calc'); ScatterMapbox.hoverPoints = require('./hover'); ScatterMapbox.eventData = require('./event_data'); ScatterMapbox.plot = require('./plot'); @@ -171094,7 +164290,7 @@ ScatterMapbox.meta = { module.exports = ScatterMapbox; -},{"../../plots/mapbox":781,"../scatter/colorbar":979,"../scattergeo/calc":1014,"./attributes":1024,"./defaults":1026,"./event_data":1027,"./hover":1028,"./plot":1030}],1030:[function(require,module,exports){ +},{"../../plots/mapbox":772,"../scatter/colorbar":927,"./attributes":964,"./calc":965,"./defaults":967,"./event_data":968,"./hover":969,"./plot":971}],971:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171218,7 +164414,7 @@ module.exports = function createScatterMapbox(mapbox, calcTrace) { return scatterMapbox; }; -},{"./convert":1025}],1031:[function(require,module,exports){ +},{"./convert":966}],972:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171233,7 +164429,6 @@ var scatterAttrs = require('../scatter/attributes'); var plotAttrs = require('../../plots/attributes'); var colorAttributes = require('../../components/colorscale/color_attributes'); var colorbarAttrs = require('../../components/colorbar/attributes'); -var dash = require('../../components/drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; @@ -171264,14 +164459,11 @@ module.exports = { mode: extendFlat({}, scatterAttrs.mode, {dflt: 'markers'}), text: extendFlat({}, scatterAttrs.text, { - }), - hovertext: extendFlat({}, scatterAttrs.hovertext, { - }), line: { color: scatterLineAttrs.color, width: scatterLineAttrs.width, - dash: dash, + dash: scatterLineAttrs.dash, shape: extendFlat({}, scatterLineAttrs.shape, {values: ['linear', 'spline']}), smoothing: scatterLineAttrs.smoothing @@ -171307,7 +164499,7 @@ module.exports = { hoveron: scatterAttrs.hoveron, }; -},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/drawing/attributes":601,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1032:[function(require,module,exports){ +},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../lib/extend":672,"../../plots/attributes":717,"../scatter/attributes":924}],973:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171404,7 +164596,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../plots/cartesian/axes":724,"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980,"../scatter/subtypes":996,"fast-isnumeric":116}],1033:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"../scatter/arrays_to_calcdata":923,"../scatter/colorscale_calc":928,"../scatter/subtypes":944,"fast-isnumeric":113}],974:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171470,7 +164662,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('sum'); coerce('text'); - coerce('hovertext'); var defaultMode = len < constants.PTS_LINESONLY ? 'lines+markers' : 'lines'; coerce('mode', defaultMode); @@ -171510,7 +164701,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('hoveron', dfltHoverOn.join('+') || 'points'); }; -},{"../../lib":685,"../scatter/constants":981,"../scatter/fillcolor_defaults":983,"../scatter/line_defaults":987,"../scatter/line_shape_defaults":989,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":1031}],1034:[function(require,module,exports){ +},{"../../lib":680,"../scatter/constants":929,"../scatter/fillcolor_defaults":931,"../scatter/line_defaults":935,"../scatter/line_shape_defaults":937,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":972}],975:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171581,7 +164772,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { return scatterPointData; }; -},{"../../plots/cartesian/axes":724,"../scatter/hover":985}],1035:[function(require,module,exports){ +},{"../../plots/cartesian/axes":719,"../scatter/hover":933}],976:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171614,7 +164805,7 @@ ScatterTernary.meta = { module.exports = ScatterTernary; -},{"../../plots/ternary":795,"../scatter/colorbar":979,"./attributes":1031,"./calc":1032,"./defaults":1033,"./hover":1034,"./plot":1036,"./select":1037,"./style":1038}],1036:[function(require,module,exports){ +},{"../../plots/ternary":786,"../scatter/colorbar":927,"./attributes":972,"./calc":973,"./defaults":974,"./hover":975,"./plot":977,"./select":978,"./style":979}],977:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171650,11 +164841,71 @@ module.exports = function plot(ternary, moduleCalcData) { scatterPlot(ternary.graphDiv, plotinfo, moduleCalcData); }; -},{"../scatter/plot":993}],1037:[function(require,module,exports){ -arguments[4][1011][0].apply(exports,arguments) -},{"../scatter/select":994,"dup":1011}],1038:[function(require,module,exports){ -arguments[4][1012][0].apply(exports,arguments) -},{"../scatter/style":995,"dup":1012}],1039:[function(require,module,exports){ +},{"../scatter/plot":941}],978:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var scatterSelect = require('../scatter/select'); + + +module.exports = function selectPoints(searchInfo, polygon) { + var selection = scatterSelect(searchInfo, polygon); + if(!selection) return; + + var cd = searchInfo.cd, + pt, cdi, i; + + for(i = 0; i < selection.length; i++) { + pt = selection[i]; + cdi = cd[pt.pointNumber]; + pt.a = cdi.a; + pt.b = cdi.b; + pt.c = cdi.c; + delete pt.x; + delete pt.y; + } + + return selection; +}; + +},{"../scatter/select":942}],979:[function(require,module,exports){ +/** +* Copyright 2012-2017, Plotly, Inc. +* All rights reserved. +* +* This source code is licensed under the MIT license found in the +* LICENSE file in the root directory of this source tree. +*/ + + +'use strict'; + +var scatterStyle = require('../scatter/style'); + + +module.exports = function style(gd) { + var modules = gd._fullLayout._modules; + + // we're just going to call scatter style... if we already + // called it, don't need to redo. + // Later though we may want differences, or we may make style + // more specific in its scope, then we can remove this. + for(var i = 0; i < modules.length; i++) { + if(modules[i].name === 'scatter') return; + } + + scatterStyle(gd); +}; + +},{"../scatter/style":943}],980:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171874,7 +165125,7 @@ module.exports = { } }; -},{"../../components/color":578,"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677}],1040:[function(require,module,exports){ +},{"../../components/color":575,"../../components/colorbar/attributes":576,"../../components/colorscale/attributes":580,"../../lib/extend":672}],981:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171898,7 +165149,7 @@ module.exports = function calc(gd, trace) { } }; -},{"../../components/colorscale/calc":584}],1041:[function(require,module,exports){ +},{"../../components/colorscale/calc":581}],982:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -171950,7 +165201,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],1042:[function(require,module,exports){ +},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],983:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172329,7 +165580,7 @@ function createSurfaceTrace(scene, data) { module.exports = createSurfaceTrace; -},{"../../lib/str2rgbarray":703,"gl-surface3d":250,"ndarray":449,"ndarray-fill":439,"ndarray-homography":441,"ndarray-ops":443,"tinycolor2":514}],1043:[function(require,module,exports){ +},{"../../lib/str2rgbarray":698,"gl-surface3d":247,"ndarray":446,"ndarray-fill":436,"ndarray-homography":438,"ndarray-ops":440,"tinycolor2":511}],984:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172450,7 +165701,7 @@ function mapLegacy(traceIn, oldAttr, newAttr) { } } -},{"../../components/colorscale/defaults":587,"../../lib":685,"../../registry":802,"./attributes":1039}],1044:[function(require,module,exports){ +},{"../../components/colorscale/defaults":584,"../../lib":680,"../../registry":793,"./attributes":980}],985:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172480,7 +165731,7 @@ Surface.meta = { module.exports = Surface; -},{"../../plots/gl3d":767,"./attributes":1039,"./calc":1040,"./colorbar":1041,"./convert":1042,"./defaults":1043}],1045:[function(require,module,exports){ +},{"../../plots/gl3d":758,"./attributes":980,"./calc":981,"./colorbar":982,"./convert":983,"./defaults":984}],986:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172763,7 +166014,7 @@ function getFilterFunc(opts, d2c, targetCalendar) { } } -},{"../lib":685,"../plot_api/plot_schema":713,"../plots/cartesian/axis_autotype":725,"../plots/cartesian/axis_ids":727,"../plots/cartesian/set_convert":741,"../registry":802}],1046:[function(require,module,exports){ +},{"../lib":680,"../plot_api/plot_schema":708,"../plots/cartesian/axis_autotype":720,"../plots/cartesian/axis_ids":722,"../plots/cartesian/set_convert":733,"../registry":793}],987:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -172906,5 +166157,5 @@ function transformOne(trace, state) { return newData; } -},{"../lib":685,"../plot_api/plot_schema":713}]},{},[19])(19) +},{"../lib":680,"../plot_api/plot_schema":708}]},{},[17])(17) }); \ No newline at end of file diff --git a/dist/plotly.min.js b/dist/plotly.min.js index 607908629cd..91bc1a3c9ea 100644 --- a/dist/plotly.min.js +++ b/dist/plotly.min.js @@ -1,75 +1,72 @@ /** -* plotly.js v1.26.1 +* plotly.js v1.25.2 * Copyright 2012-2017, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Plotly=t()}}(function(){var t;return function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[o]={exports:{}};e[o][0].call(c.exports,function(t){var r=e[o][1][t];return i(r||t)},c,c.exports,t,e,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;oMath.abs(e))u.rotate(o,0,0,-t*n*Math.PI*p.rotateSpeed/window.innerWidth);else{var s=p.zoomSpeed*a*e/window.innerHeight*(o-u.lastT())/100;u.pan(o,0,0,h*(Math.exp(s)-1))}},!0),p}e.exports=n;var i=t("right-now"),a=t("3d-view"),o=t("mouse-change"),s=t("mouse-wheel"),l=t("mouse-event-offset")},{"3d-view":33,"mouse-change":434,"mouse-event-offset":435,"mouse-wheel":437,"right-now":483}],33:[function(t,e,r){"use strict";function n(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}function i(t){t=t||{};var e=t.eye||[0,0,1],r=t.center||[0,0,0],i=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],u=t.mode||"turntable",c=a(),h=o(),f=s();return c.setDistanceLimits(l[0],l[1]),c.lookAt(0,e,r,i),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,i),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,i),new n({turntable:c,orbit:h,matrix:f},u)}e.exports=i;var a=t("turntable-camera-controller"),o=t("orbit-camera-controller"),s=t("matrix-camera-controller"),l=n.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n>16&255,r[1]=n>>8&255,r[2]=255&n):h.test(t)&&(n=t.match(f),r[0]=parseInt(n[1]),r[1]=parseInt(n[2]),r[2]=parseInt(n[3])),!e)for(var i=0;i<3;++i)r[i]=r[i]/255;return r}function u(t,e){var r,n;if("string"!=typeof t)return t;if(r=[],"#"===t[0]?(t=t.substr(1),3===t.length&&(t+=t),n=parseInt(t,16),r[0]=n>>16&255,r[1]=n>>8&255,r[2]=255&n):h.test(t)&&(n=t.match(f),r[0]=parseInt(n[1]),r[1]=parseInt(n[2]),r[2]=parseInt(n[3]),n[4]?r[3]=parseFloat(n[4]):r[3]=1),!e)for(var i=0;i<3;++i)r[i]=r[i]/255;return r}var c={},h=/^rgba?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*(,.*)?\)$/,f=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(.*)?\)$/;return c.isPlainObject=t,c.linspace=e,c.zip3=n,c.sum=i,c.zip=r,c.isEqual=s,c.copy2D=a,c.copy1D=o,c.str2RgbArray=l,c.str2RgbaArray=u,c}()},{}],40:[function(t,e,r){(function(r){"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i=0;s--)if(l[s]!==u[s])return!1;for(s=l.length-1;s>=0;s--)if(o=l[s],!d(t[o],e[o],r,n))return!1;return!0}function g(t,e,r){d(t,e,!0)&&h(t,e,r,"notDeepStrictEqual",g)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&e.call({},t)===!0}function y(t){var e;try{t()}catch(t){e=t}return e}function b(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=y(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&h(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!t&&x.isError(i),s=!t&&i&&!r;if((o&&a&&v(i,r)||s)&&h(i,r,"Got unwanted exception"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}var x=t("util/"),_=Object.prototype.hasOwnProperty,w=Array.prototype.slice,M=function(){return"foo"===function(){}.name}(),k=e.exports=f,A=/\s*function\s+([^\(\s]*)\s*/;k.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var e=t.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=s(e),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},x.inherits(k.AssertionError,Error),k.fail=h,k.ok=f,k.equal=function(t,e,r){t!=e&&h(t,e,r,"==",k.equal)},k.notEqual=function(t,e,r){t==e&&h(t,e,r,"!=",k.notEqual)},k.deepEqual=function(t,e,r){d(t,e,!1)||h(t,e,r,"deepEqual",k.deepEqual)},k.deepStrictEqual=function(t,e,r){d(t,e,!0)||h(t,e,r,"deepStrictEqual",k.deepStrictEqual)},k.notDeepEqual=function(t,e,r){d(t,e,!1)&&h(t,e,r,"notDeepEqual",k.notDeepEqual)},k.notDeepStrictEqual=g,k.strictEqual=function(t,e,r){t!==e&&h(t,e,r,"===",k.strictEqual)},k.notStrictEqual=function(t,e,r){t===e&&h(t,e,r,"!==",k.notStrictEqual)},k.throws=function(t,e,r){b(!0,t,e,r)},k.doesNotThrow=function(t,e,r){b(!1,t,e,r)},k.ifError=function(t){if(t)throw t};var T=Object.keys||function(t){var e=[];for(var r in t)_.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":529}],41:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],42:[function(t,e,r){"use strict";function n(t){for(var e=0,r=0;r0?r=r.ushln(h):h<0&&(c=c.ushln(-h)),l(r,c)}var i=t("./is-rat"),a=t("./lib/is-bn"),o=t("./lib/num-to-bn"),s=t("./lib/str-to-bn"),l=t("./lib/rationalize"),u=t("./div");e.exports=n},{"./div":45,"./is-rat":47,"./lib/is-bn":51,"./lib/num-to-bn":52,"./lib/rationalize":53,"./lib/str-to-bn":54}],47:[function(t,e,r){"use strict";function n(t){return Array.isArray(t)&&2===t.length&&i(t[0])&&i(t[1])}var i=t("./lib/is-bn");e.exports=n},{"./lib/is-bn":51}],48:[function(t,e,r){"use strict";function n(t){return t.cmp(new i(0))}var i=t("bn.js");e.exports=n},{"bn.js":61}],49:[function(t,e,r){"use strict";function n(t){var e=t.length,r=t.words,n=0;if(1===e)n=r[0];else if(2===e)n=r[0]+67108864*r[1];else for(var a=0;a20?52:r+32}var i=t("double-bits"),a=t("bit-twiddle").countTrailingZeros;e.exports=n},{"bit-twiddle":60,"double-bits":109}],51:[function(t,e,r){"use strict";function n(t){return t&&"object"==typeof t&&Boolean(t.words)}t("bn.js");e.exports=n},{"bn.js":61}],52:[function(t,e,r){"use strict";function n(t){var e=a.exponent(t);return e<52?new i(t):new i(t*Math.pow(2,52-e)).ushln(e-52)}var i=t("bn.js"),a=t("double-bits");e.exports=n},{"bn.js":61,"double-bits":109}],53:[function(t,e,r){"use strict";function n(t,e){var r=a(t),n=a(e);if(0===r)return[i(0),i(1)];if(0===n)return[i(0),i(0)];n<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]}var i=t("./num-to-bn"),a=t("./bn-sign");e.exports=n},{"./bn-sign":48,"./num-to-bn":52}],54:[function(t,e,r){"use strict";function n(t){return new i(t)}var i=t("bn.js");e.exports=n},{"bn.js":61}],55:[function(t,e,r){"use strict";function n(t,e){return i(t[0].mul(e[0]),t[1].mul(e[1]))}var i=t("./lib/rationalize");e.exports=n},{"./lib/rationalize":53}],56:[function(t,e,r){"use strict";function n(t){return i(t[0])*i(t[1])}var i=t("./lib/bn-sign");e.exports=n},{"./lib/bn-sign":48}],57:[function(t,e,r){"use strict";function n(t,e){return i(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}var i=t("./lib/rationalize");e.exports=n},{"./lib/rationalize":53}],58:[function(t,e,r){"use strict";function n(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var n=e.abs().divmod(r.abs()),o=n.div,s=i(o),l=n.mod,u=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return u*s;if(s){var c=a(s)+4,h=i(l.ushln(c).divRound(r));return u*(s+h*Math.pow(2,-c))}var f=r.bitLength()-l.bitLength()+53,h=i(l.ushln(f).divRound(r));return f<1023?u*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),u*h*Math.pow(2,1023-f))}var i=t("./lib/bn-to-num"),a=t("./lib/ctz");e.exports=n},{"./lib/bn-to-num":49,"./lib/ctz":50}],59:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=["function ",t,"(a,l,h,",n.join(","),"){",a?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return a?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),a?o.push("return -1};"):o.push("return i};"),o.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],!1,i),n("B","x"+t+"y",e,["y"],!0,i),n("P","c(x,y)"+t+"0",e,["y","c"],!1,i),n("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],60:[function(t,e,r){"use strict";"use restrict";function n(t){var e=32;return t&=-t,t&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return t-=t>>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},r.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),(t=65535&(t|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),t|r<<2},r.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),(t=1023&(t|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],61:[function(t,e,r){!function(e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}function o(t,e,r){for(var n=0,i=Math.min(t.length,r),a=e;a=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function s(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}function l(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}function u(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,h=67108863&l,f=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=f;d++){var p=u-d|0;i=0|t.words[p],a=0|e.words[d],o=i*a+h,c+=o/67108864|0,h=67108863&o}r.words[u]=0|h,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}function c(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function h(t,e,r){return(new f).mulp(t,e,r)}function f(t,e){this.x=t,this.y=e}function d(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function b(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var x;try{x=t("buffer").Buffer}catch(t){}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=o(t,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=o(t,e,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,l=Math.min(a,a-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var i=0,a=0,o=0;o>>24-i&16777215,r=0!==a||o!==this.length-1?_[6-l.length]+l+r:l+r,i+=2,i>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=w[t],c=M[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var f=h.modn(c).toString(t);h=h.idivn(c),r=h.isZero()?f+r:_[u-f.length]+f+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==x),this.toArrayLike(x,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,u=new t(a),c=this.clone();if(l){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],x=8191&b,_=b>>>13,w=0|o[4],M=8191&w,k=w>>>13,A=0|o[5],T=8191&A,S=A>>>13,E=0|o[6],L=8191&E,C=E>>>13,z=0|o[7],D=8191&z,I=z>>>13,P=0|o[8],O=8191&P,j=P>>>13,R=0|o[9],F=8191&R,N=R>>>13,B=0|s[0],U=8191&B,V=B>>>13,H=0|s[1],q=8191&H,G=H>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,Z=0|s[3],J=8191&Z,Q=Z>>>13,K=0|s[4],$=8191&K,tt=K>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ut=st>>>13,ct=0|s[8],ht=8191&ct,ft=ct>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,V),i=i+Math.imul(f,U)|0,a=Math.imul(f,V);var gt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=Math.imul(p,V),i=i+Math.imul(m,U)|0,a=Math.imul(m,V),n=n+Math.imul(h,q)|0,i=i+Math.imul(h,G)|0,i=i+Math.imul(f,q)|0,a=a+Math.imul(f,G)|0;var vt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=Math.imul(v,V),i=i+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(p,q)|0,i=i+Math.imul(p,G)|0,i=i+Math.imul(m,q)|0,a=a+Math.imul(m,G)|0,n=n+Math.imul(h,W)|0,i=i+Math.imul(h,X)|0,i=i+Math.imul(f,W)|0,a=a+Math.imul(f,X)|0;var yt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(x,U),i=Math.imul(x,V),i=i+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(v,q)|0,i=i+Math.imul(v,G)|0,i=i+Math.imul(y,q)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=i+Math.imul(p,X)|0,i=i+Math.imul(m,W)|0,a=a+Math.imul(m,X)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,Q)|0,i=i+Math.imul(f,J)|0,a=a+Math.imul(f,Q)|0;var bt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,U),i=Math.imul(M,V),i=i+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(x,q)|0,i=i+Math.imul(x,G)|0,i=i+Math.imul(_,q)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=i+Math.imul(v,X)|0,i=i+Math.imul(y,W)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,Q)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,Q)|0,n=n+Math.imul(h,$)|0,i=i+Math.imul(h,tt)|0,i=i+Math.imul(f,$)|0,a=a+Math.imul(f,tt)|0;var xt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(T,U),i=Math.imul(T,V),i=i+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(M,q)|0,i=i+Math.imul(M,G)|0,i=i+Math.imul(k,q)|0,a=a+Math.imul(k,G)|0,n=n+Math.imul(x,W)|0,i=i+Math.imul(x,X)|0,i=i+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,Q)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,Q)|0,n=n+Math.imul(p,$)|0,i=i+Math.imul(p,tt)|0,i=i+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0,n=n+Math.imul(h,rt)|0,i=i+Math.imul(h,nt)|0,i=i+Math.imul(f,rt)|0,a=a+Math.imul(f,nt)|0;var _t=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,U),i=Math.imul(L,V),i=i+Math.imul(C,U)|0,a=Math.imul(C,V),n=n+Math.imul(T,q)|0,i=i+Math.imul(T,G)|0,i=i+Math.imul(S,q)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(M,W)|0,i=i+Math.imul(M,X)|0,i=i+Math.imul(k,W)|0,a=a+Math.imul(k,X)|0,n=n+Math.imul(x,J)|0,i=i+Math.imul(x,Q)|0,i=i+Math.imul(_,J)|0,a=a+Math.imul(_,Q)|0,n=n+Math.imul(v,$)|0,i=i+Math.imul(v,tt)|0,i=i+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=i+Math.imul(p,nt)|0,i=i+Math.imul(m,rt)|0,a=a+Math.imul(m,nt)|0,n=n+Math.imul(h,at)|0,i=i+Math.imul(h,ot)|0,i=i+Math.imul(f,at)|0,a=a+Math.imul(f,ot)|0;var wt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,U),i=Math.imul(D,V),i=i+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(L,q)|0,i=i+Math.imul(L,G)|0,i=i+Math.imul(C,q)|0,a=a+Math.imul(C,G)|0,n=n+Math.imul(T,W)|0,i=i+Math.imul(T,X)|0,i=i+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(M,J)|0,i=i+Math.imul(M,Q)|0,i=i+Math.imul(k,J)|0,a=a+Math.imul(k,Q)|0,n=n+Math.imul(x,$)|0,i=i+Math.imul(x,tt)|0,i=i+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=i+Math.imul(v,nt)|0,i=i+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(p,at)|0,i=i+Math.imul(p,ot)|0,i=i+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0,n=n+Math.imul(h,lt)|0,i=i+Math.imul(h,ut)|0,i=i+Math.imul(f,lt)|0,a=a+Math.imul(f,ut)|0;var Mt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,U),i=Math.imul(O,V),i=i+Math.imul(j,U)|0,a=Math.imul(j,V),n=n+Math.imul(D,q)|0,i=i+Math.imul(D,G)|0,i=i+Math.imul(I,q)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(L,W)|0,i=i+Math.imul(L,X)|0,i=i+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,Q)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,Q)|0,n=n+Math.imul(M,$)|0,i=i+Math.imul(M,tt)|0,i=i+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=i+Math.imul(x,nt)|0,i=i+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=i+Math.imul(v,ot)|0,i=i+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(p,lt)|0,i=i+Math.imul(p,ut)|0,i=i+Math.imul(m,lt)|0,a=a+Math.imul(m,ut)|0,n=n+Math.imul(h,ht)|0,i=i+Math.imul(h,ft)|0,i=i+Math.imul(f,ht)|0,a=a+Math.imul(f,ft)|0;var kt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,U),i=Math.imul(F,V),i=i+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(O,q)|0,i=i+Math.imul(O,G)|0,i=i+Math.imul(j,q)|0,a=a+Math.imul(j,G)|0,n=n+Math.imul(D,W)|0,i=i+Math.imul(D,X)|0,i=i+Math.imul(I,W)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(L,J)|0,i=i+Math.imul(L,Q)|0,i=i+Math.imul(C,J)|0,a=a+Math.imul(C,Q)|0,n=n+Math.imul(T,$)|0,i=i+Math.imul(T,tt)|0,i=i+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(M,rt)|0,i=i+Math.imul(M,nt)|0,i=i+Math.imul(k,rt)|0,a=a+Math.imul(k,nt)|0,n=n+Math.imul(x,at)|0,i=i+Math.imul(x,ot)|0,i=i+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=i+Math.imul(v,ut)|0,i=i+Math.imul(y,lt)|0,a=a+Math.imul(y,ut)|0,n=n+Math.imul(p,ht)|0,i=i+Math.imul(p,ft)|0,i=i+Math.imul(m,ht)|0,a=a+Math.imul(m,ft)|0,n=n+Math.imul(h,pt)|0,i=i+Math.imul(h,mt)|0,i=i+Math.imul(f,pt)|0,a=a+Math.imul(f,mt)|0;var At=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,q),i=Math.imul(F,G),i=i+Math.imul(N,q)|0,a=Math.imul(N,G),n=n+Math.imul(O,W)|0,i=i+Math.imul(O,X)|0,i=i+Math.imul(j,W)|0,a=a+Math.imul(j,X)|0,n=n+Math.imul(D,J)|0,i=i+Math.imul(D,Q)|0,i=i+Math.imul(I,J)|0,a=a+Math.imul(I,Q)|0,n=n+Math.imul(L,$)|0,i=i+Math.imul(L,tt)|0,i=i+Math.imul(C,$)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=i+Math.imul(T,nt)|0,i=i+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(M,at)|0,i=i+Math.imul(M,ot)|0,i=i+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,n=n+Math.imul(x,lt)|0,i=i+Math.imul(x,ut)|0,i=i+Math.imul(_,lt)|0,a=a+Math.imul(_,ut)|0,n=n+Math.imul(v,ht)|0,i=i+Math.imul(v,ft)|0,i=i+Math.imul(y,ht)|0,a=a+Math.imul(y,ft)|0,n=n+Math.imul(p,pt)|0,i=i+Math.imul(p,mt)|0,i=i+Math.imul(m,pt)|0,a=a+Math.imul(m,mt)|0;var Tt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,W),i=Math.imul(F,X),i=i+Math.imul(N,W)|0,a=Math.imul(N,X),n=n+Math.imul(O,J)|0,i=i+Math.imul(O,Q)|0,i=i+Math.imul(j,J)|0,a=a+Math.imul(j,Q)|0,n=n+Math.imul(D,$)|0,i=i+Math.imul(D,tt)|0,i=i+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(L,rt)|0,i=i+Math.imul(L,nt)|0,i=i+Math.imul(C,rt)|0,a=a+Math.imul(C,nt)|0,n=n+Math.imul(T,at)|0,i=i+Math.imul(T,ot)|0,i=i+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(M,lt)|0,i=i+Math.imul(M,ut)|0,i=i+Math.imul(k,lt)|0,a=a+Math.imul(k,ut)|0,n=n+Math.imul(x,ht)|0,i=i+Math.imul(x,ft)|0,i=i+Math.imul(_,ht)|0,a=a+Math.imul(_,ft)|0,n=n+Math.imul(v,pt)|0,i=i+Math.imul(v,mt)|0,i=i+Math.imul(y,pt)|0,a=a+Math.imul(y,mt)|0;var St=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,J),i=Math.imul(F,Q),i=i+Math.imul(N,J)|0,a=Math.imul(N,Q),n=n+Math.imul(O,$)|0,i=i+Math.imul(O,tt)|0,i=i+Math.imul(j,$)|0,a=a+Math.imul(j,tt)|0,n=n+Math.imul(D,rt)|0,i=i+Math.imul(D,nt)|0,i=i+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(L,at)|0,i=i+Math.imul(L,ot)|0,i=i+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,n=n+Math.imul(T,lt)|0,i=i+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,a=a+Math.imul(S,ut)|0,n=n+Math.imul(M,ht)|0,i=i+Math.imul(M,ft)|0,i=i+Math.imul(k,ht)|0,a=a+Math.imul(k,ft)|0,n=n+Math.imul(x,pt)|0,i=i+Math.imul(x,mt)|0,i=i+Math.imul(_,pt)|0,a=a+Math.imul(_,mt)|0;var Et=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,$),i=Math.imul(F,tt),i=i+Math.imul(N,$)|0,a=Math.imul(N,tt),n=n+Math.imul(O,rt)|0,i=i+Math.imul(O,nt)|0,i=i+Math.imul(j,rt)|0,a=a+Math.imul(j,nt)|0,n=n+Math.imul(D,at)|0,i=i+Math.imul(D,ot)|0,i=i+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(L,lt)|0,i=i+Math.imul(L,ut)|0,i=i+Math.imul(C,lt)|0,a=a+Math.imul(C,ut)|0,n=n+Math.imul(T,ht)|0,i=i+Math.imul(T,ft)|0,i=i+Math.imul(S,ht)|0,a=a+Math.imul(S,ft)|0,n=n+Math.imul(M,pt)|0,i=i+Math.imul(M,mt)|0,i=i+Math.imul(k,pt)|0,a=a+Math.imul(k,mt)|0;var Lt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(F,rt),i=Math.imul(F,nt),i=i+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(O,at)|0,i=i+Math.imul(O,ot)|0,i=i+Math.imul(j,at)|0,a=a+Math.imul(j,ot)|0,n=n+Math.imul(D,lt)|0,i=i+Math.imul(D,ut)|0,i=i+Math.imul(I,lt)|0,a=a+Math.imul(I,ut)|0,n=n+Math.imul(L,ht)|0,i=i+Math.imul(L,ft)|0,i=i+Math.imul(C,ht)|0,a=a+Math.imul(C,ft)|0,n=n+Math.imul(T,pt)|0,i=i+Math.imul(T,mt)|0,i=i+Math.imul(S,pt)|0,a=a+Math.imul(S,mt)|0;var Ct=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,at),i=Math.imul(F,ot),i=i+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(O,lt)|0,i=i+Math.imul(O,ut)|0,i=i+Math.imul(j,lt)|0,a=a+Math.imul(j,ut)|0,n=n+Math.imul(D,ht)|0,i=i+Math.imul(D,ft)|0,i=i+Math.imul(I,ht)|0,a=a+Math.imul(I,ft)|0,n=n+Math.imul(L,pt)|0,i=i+Math.imul(L,mt)|0,i=i+Math.imul(C,pt)|0,a=a+Math.imul(C,mt)|0;var zt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(F,lt),i=Math.imul(F,ut),i=i+Math.imul(N,lt)|0,a=Math.imul(N,ut),n=n+Math.imul(O,ht)|0,i=i+Math.imul(O,ft)|0,i=i+Math.imul(j,ht)|0,a=a+Math.imul(j,ft)|0,n=n+Math.imul(D,pt)|0,i=i+Math.imul(D,mt)|0,i=i+Math.imul(I,pt)|0,a=a+Math.imul(I,mt)|0;var Dt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(F,ht),i=Math.imul(F,ft),i=i+Math.imul(N,ht)|0,a=Math.imul(N,ft),n=n+Math.imul(O,pt)|0,i=i+Math.imul(O,mt)|0,i=i+Math.imul(j,pt)|0,a=a+Math.imul(j,mt)|0;var It=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,pt),i=Math.imul(F,mt),i=i+Math.imul(N,pt)|0,a=Math.imul(N,mt);var Pt=(u+n|0)+((8191&i)<<13)|0;return u=(a+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,l[0]=gt,l[1]=vt,l[2]=yt,l[3]=bt,l[4]=xt,l[5]=_t,l[6]=wt,l[7]=Mt,l[8]=kt,l[9]=At,l[10]=Tt,l[11]=St,l[12]=Et,l[13]=Lt,l[14]=Ct,l[15]=zt,l[16]=Dt,l[17]=It,l[18]=Pt,0!==u&&(l[19]=u,r.length++),r};Math.imul||(k=u),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?k(this,t,e):r<63?u(this,t,e):r<1024?c(this,t,e):h(this,t,e)},f.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},f.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=l(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0);var i;i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-a|h>>>a,c=h&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(s===-1),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){s=new a(null),s.length=l+1,s.words=new Array(s.length);for(var u=0;u=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=f)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){if(n(!t.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var i,o,s;return 0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0==(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(c),l.isub(h)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(u)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0==(e.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(e.iushrn(l);l-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var c=0,h=1;0==(r.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o)):(r.isub(e),o.isub(i))}var f;return f=0===e.cmpn(1)?i:o,f.cmpn(0)<0&&f.iadd(t),f},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];r=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return this.cmpn(t)===-1},a.prototype.lt=function(t){return this.cmp(t)===-1},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new y(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};d.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},d.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},d.prototype.split=function(t,e){t.iushrn(this.n,0,e)},d.prototype.imulK=function(t){return t.imul(this.k)},i(p,d),p.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},p.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new m;else if("p192"===t)e=new g;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new v}return A[t]=e,e},y.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},y.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},y.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},y.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},y.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},y.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},y.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=o;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var u=e.words[n],c=l-1;c>=0;c--){var h=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},y.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},y.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new b(t)},i(b,y),b.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},b.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},b.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},b.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},b.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{}],62:[function(t,e,r){"use strict";function n(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(s<=0)){var l,u=h.mallocDouble(2*s*a),c=h.mallocInt32(a);if((a=i(t,s,u,c))>0){if(1===s&&n)f.init(a),l=f.sweepComplete(s,r,0,a,u,c,0,a,u,c);else{var p=h.mallocDouble(2*s*o),m=h.mallocInt32(o);o=i(e,s,p,m),o>0&&(f.init(a+o),l=1===s?f.sweepBipartite(s,r,0,a,u,c,0,o,p,m):d(s,r,n,a,u,c,o,p,m),h.free(p),h.free(m))}h.free(u),h.free(c)}return l}}}function o(t,e){c.push([t,e])}function s(t){return c=[],a(t,t,o,!0),c}function l(t,e){return c=[],a(t,e,o,!1),c}function u(t,e,r){switch(arguments.length){case 1:return s(t);case 2:return"function"==typeof e?a(t,t,e,!0):l(t,e);case 3:return a(t,e,r,!1);default:throw new Error("box-intersect: Invalid arguments")}}e.exports=u;var c,h=t("typedarray-pool"),f=t("./lib/sweep"),d=t("./lib/intersect")},{"./lib/intersect":65,"./lib/sweep":69,"typedarray-pool":521}],64:[function(t,e,r){"use strict";function n(t,e,r){var n="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(r?"Full":""),i=["function ",n,"(",w.join(),"){","var ",u,"=2*",a,";"],l="for(var i="+c+","+p+"="+u+"*"+c+";i<"+h+";++i,"+p+"+="+u+"){var x0="+f+"["+o+"+"+p+"],x1="+f+"["+o+"+"+p+"+"+a+"],xi="+d+"[i];",M="for(var j="+m+","+b+"="+u+"*"+m+";j<"+g+";++j,"+b+"+="+u+"){var y0="+v+"["+o+"+"+b+"],"+(r?"y1="+v+"["+o+"+"+b+"+"+a+"],":"")+"yi="+y+"[j];";return t?i.push(l,_,":",M):i.push(M,_,":",l),r?i.push("if(y1"+g+"-"+m+"){"),t?(e(!0,!1),o.push("}else{"),e(!1,!1)):(o.push("if("+l+"){"),e(!0,!0),o.push("}else{"),e(!0,!1),o.push("}}else{if("+l+"){"),e(!1,!0),o.push("}else{"),e(!1,!1),o.push("}")),o.push("}}return "+r);var s=i.join("")+o.join("");return new Function(s)()}var a="d",o="ax",s="vv",l="fp",u="es",c="rs",h="re",f="rb",d="ri",p="rp",m="bs",g="be",v="bb",y="bi",b="bp",x="rv",_="Q",w=[a,o,s,c,h,f,d,m,g,v,y];r.partial=i(!1),r.full=i(!0)},{}],65:[function(t,e,r){"use strict";function n(t,e){var r=8*u.log2(e+1)*(t+1)|0,n=u.nextPow2(A*r);S.length0;){z-=1;var I=z*A,P=S[I],O=S[I+1],j=S[I+2],R=S[I+3],F=S[I+4],N=S[I+5],B=z*T,U=E[B],V=E[B+1],H=1&N,q=!!(16&N),G=l,Y=u,W=m,X=L;if(H&&(G=m,Y=L,W=l,X=u),!(2&N&&(j=_(t,P,O,j,G,Y,V),O>=j)||4&N&&(O=w(t,P,O,j,G,Y,U))>=j)){var Z=j-O,J=F-R;if(q){if(t*Z*(Z+J)=p0)&&!(p1>=hi)",["p0","p1"]),x=m("lo===p0",["p0"]),_=m("lor&&i[h+e]>u;--c,h-=o){for(var f=h,d=h+o,p=0;p>>1,f=2*t,d=h,p=a[f*h+e];u=b?(d=y,p=b):v>=_?(d=g,p=v):(d=x,p=_):b>=_?(d=y,p=b):_>=v?(d=g,p=v):(d=x,p=_);for(var w=f*(c-1),M=f*d,k=0;k=0&&n.push("lo=e[k+n]"),t.indexOf("hi")>=0&&n.push("hi=e[k+o]"),r.push(i.replace("_",n.join()).replace("$",t)),Function.apply(void 0,r)}e.exports=n;var i="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],68:[function(t,e,r){"use strict";function n(t,e){e<=4*f?i(0,e-1,t):h(0,e-1,t)}function i(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var u=r[l-2],c=r[l-1];if(ur[e+1])}function c(t,e,r,n){t*=2;var i=n[t];return i>1,g=m-n,v=m+n,y=d,b=g,x=m,_=v,w=p,M=t+1,k=e-1,A=0;u(y,b,r)&&(A=y,y=b,b=A),u(_,w,r)&&(A=_,_=w,w=A),u(y,x,r)&&(A=y,y=x,x=A),u(b,x,r)&&(A=b,b=x,x=A),u(y,_,r)&&(A=y,y=_,_=A),u(x,_,r)&&(A=x,x=_,_=A),u(b,w,r)&&(A=b,b=w,w=A),u(b,x,r)&&(A=b,b=x,x=A),u(_,w,r)&&(A=_,_=w,w=A);for(var T=r[2*b],S=r[2*b+1],E=r[2*_],L=r[2*_+1],C=2*y,z=2*x,D=2*w,I=2*d,P=2*m,O=2*p,j=0;j<2;++j){var R=r[C+j],F=r[z+j],N=r[D+j];r[I+j]=R,r[P+j]=F,r[O+j]=N}o(g,t,r),o(v,e,r);for(var B=M;B<=k;++B)if(c(B,T,S,r))B!==M&&a(B,M,r),++M;else if(!c(B,E,L,r))for(;;){if(c(k,E,L,r)){c(k,T,S,r)?(s(B,M,k,r),++M,--k):(a(B,k,r),--k);break}if(--k>>1;f(x,S);for(var E=0,L=0,M=0;M=d)C=C-d|0,i(g,v,L--,C);else if(C>=0)i(p,m,E--,C);else if(C<=-d){C=-C-d|0;for(var z=0;z>>1;f(x,E);for(var L=0,C=0,z=0,k=0;k>1==x[2*k+3]>>1&&(I=2,k+=1),D<0){for(var P=-(D>>1)-1,O=0;O>1)-1;0===I?i(p,m,L--,P):1===I?i(g,v,C--,P):2===I&&i(y,b,z--,P)}}}function l(t,e,r,n,o,s,l,u,c,h,g,v){var y=0,b=2*t,_=e,w=e+t,M=1,k=1;n?k=d:M=d;for(var A=o;A>>1;f(x,L);for(var C=0,A=0;A=d?(D=!n,T-=d):(D=!!n,T-=1),D)a(p,m,C++,T);else{var I=v[T],P=b*T,O=g[P+e+1],j=g[P+e+1+t];t:for(var R=0;R>>1;f(x,M);for(var k=0,y=0;y=d)p[k++]=b-d;else{b-=1;var T=c[b],S=m*b,E=u[S+e+1],L=u[S+e+1+t];t:for(var C=0;C=0;--C)if(p[C]===b){for(var P=C+1;PZ)throw new RangeError("Invalid typed array length");var e=new Uint8Array(t);return e.__proto__=i.prototype,e}function i(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(t)}return a(t,e,r)}function a(t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return t instanceof ArrayBuffer?h(t,e,r):"string"==typeof t?u(t,e):f(t)}function o(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function s(t,e,r){return o(t),t<=0?n(t):void 0!==e?"string"==typeof r?n(t).fill(e,r):n(t).fill(e):n(t)}function l(t){return o(t),n(t<0?0:0|d(t))}function u(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!i.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(t,e),a=n(r),o=a.write(t,e);return o!==r&&(a=a.slice(0,o)),a}function c(t){for(var e=t.length<0?0:0|d(t.length),r=n(e),i=0;i=Z)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z.toString(16)+" bytes");return 0|t}function p(t){return+t!=t&&(t=0),i.alloc(+t)}function m(t,e){if(i.isBuffer(t))return t.length;if(G(t)||t instanceof ArrayBuffer)return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return B(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return z(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,a){if(0===t.length)return-1;if("string"==typeof r?(n=r, -r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Y(r)&&(r=a?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(a)return-1;r=t.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof e&&(e=i.from(e,n)),i.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,a);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,a);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){function a(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}var u;if(i){var c=-1;for(u=r;us&&(r=s-l),u=r;u>=0;u--){for(var h=!0,f=0;fi&&(n=i):n=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=r){var l,u,c,h;switch(s){case 1:a<128&&(o=a);break;case 2:l=t[i+1],128==(192&l)&&(h=(31&a)<<6|63&l)>127&&(o=h);break;case 3:l=t[i+1],u=t[i+2],128==(192&l)&&128==(192&u)&&(h=(15&a)<<12|(63&l)<<6|63&u)>2047&&(h<55296||h>57343)&&(o=h);break;case 4:l=t[i+1],u=t[i+2],c=t[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(h=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&h<1114112&&(o=h)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return E(n)}function E(t){var e=t.length;if(e<=J)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,r,n,a,o){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||et.length)throw new RangeError("Index out of range")}function O(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,r,n,23,4),r+4}function R(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,r,n,52,8),r+8}function F(t){if(t=t.trim().replace(Q,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function U(t){for(var e=[],r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function H(t){return W.toByteArray(F(t))}function q(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function G(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function Y(t){return t!==t}var W=t("base64-js"),X=t("ieee754");r.Buffer=i,r.SlowBuffer=p,r.INSPECT_MAX_BYTES=50;var Z=2147483647;r.kMaxLength=Z,i.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(t,e,r){return a(t,e,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(t,e,r){return s(t,e,r)},i.allocUnsafe=function(t){return l(t)},i.allocUnsafeSlow=function(t){return l(t)},i.isBuffer=function(t){return null!=t&&t._isBuffer===!0},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,a=0,o=Math.min(r,n);a0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},i.prototype.compare=function(t,e,r,n,a){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),e<0||r>t.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&e>=r)return 0;if(n>=a)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,a>>>=0,this===t)return 0;for(var o=a-n,s=r-e,l=Math.min(o,s),u=this.slice(n,a),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return M(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;i.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},i.prototype.readUInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a=i&&(n-=Math.pow(2,8*e)),n},i.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*e)),a},i.prototype.readInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},i.prototype.readInt16LE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return t>>>=0,e||I(t,4,this.length),X.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return t>>>=0,e||I(t,4,this.length),X.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return t>>>=0,e||I(t,8,this.length),X.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return t>>>=0,e||I(t,8,this.length),X.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},i.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},i.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},i.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},i.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},i.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeFloatLE=function(t,e,r){return j(this,t,e,!0,r)},i.prototype.writeFloatBE=function(t,e,r){return j(this,t,e,!1,r)},i.prototype.writeDoubleLE=function(t,e,r){return R(this,t,e,!0,r)},i.prototype.writeDoubleBE=function(t,e,r){return R(this,t,e,!1,r)},i.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return 3*t.length/4-n(t)}function a(t){var e,r,i,a,o,s,l=t.length;o=n(t),s=new h(3*l/4-o),i=o>0?l-4:l;var u=0;for(e=0,r=0;e>16&255,s[u++]=a>>8&255,s[u++]=255&a;return 2===o?(a=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,s[u++]=255&a):1===o&&(a=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,s[u++]=a>>8&255,s[u++]=255&a),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function s(t,e,r){for(var n,i=[],a=e;al?l:o+16383));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),a.push(i),a.join("")}r.byteLength=i,r.toByteArray=a,r.fromByteArray=l;for(var u=[],c=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=f.length;d0;){for(var c=r.pop(),s=r.pop(),h=-1,f=-1,l=o[s],p=1;p=0||(e.flip(s,c),n(t,e,r,h,s,f),n(t,e,r,s,f,h),n(t,e,r,f,c,h),n(t,e,r,c,h,f)))}}var a=t("robust-in-sphere")[4];t("binary-search-bounds");e.exports=i},{"binary-search-bounds":77,"robust-in-sphere":487}],74:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function i(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}function a(t,e){for(var r=t.cells(),a=r.length,o=0;o0||l.length>0;){for(;s.length>0;){var d=s.pop();if(u[d]!==-i){u[d]=i;for(var p=(c[d],0);p<3;++p){var m=f[3*d+p];m>=0&&0===u[m]&&(h[3*d+p]?l.push(m):(s.push(m),u[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var v=o(c,u,e);return r?v.concat(n.boundary):v}var l=t("binary-search-bounds");e.exports=s,n.prototype.locate=function(){var t=[0,0,0];return function(e,r,n){var a=e,o=r,s=n;return r1&&d(r[c[h-2]],r[c[h-1]],n)>0;)t.push([c[h-1],c[h-2],i]),h-=1;c.length=h,c.push(i);for(var p=u.upperIds,h=p.length;h>1&&d(r[p[h-2]],r[p[h-1]],n)<0;)t.push([p[h-2],p[h-1],i]),h-=1;p.length=h,p.push(i)}}function l(t,e){var r;return(r=t.a[0]v[0]&&l.push(new i(v,d,g,h),new i(d,v,m,h))}l.sort(a);for(var y=l[0].a[0]-(1+Math.abs(l[0].a[0]))*Math.pow(2,-52),b=[new n([y,1],[y,0],-1,[],[],[],[])],x=[],h=0,_=l.length;h<_;++h){var w=l[h],M=w.type;M===p?s(x,b,t,w.a,w.idx):M===g?u(b,t,w):c(b,t,w)}return x}var f=t("binary-search-bounds"),d=t("robust-orientation")[3],p=0,m=1,g=2;e.exports=h},{"binary-search-bounds":77,"robust-orientation":489}],76:[function(t,e,r){"use strict";function n(t,e){this.stars=t,this.edges=e}function i(t,e,r){for(var n=1,i=t.length;n=0}}(),s.removeTriangle=function(t,e,r){var n=this.stars;i(n[t],e,r),i(n[e],r,t),i(n[r],t,e)},s.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},s.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n>>1,x=a[m]"];return i?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),r?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),i?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],i),n("P","c(x,y)"+t+"0",e,["y","c"],i),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],78:[function(t,e,r){"use strict";function n(t){for(var e=1,r=1;rr?r:t:te?e:t}e.exports=n},{}],82:[function(t,e,r){"use strict";function n(t){var e=_(t);return[M(e,-1/0),M(e,1/0)]}function i(t,e){for(var r=new Array(e.length),n=0;n=0;--a){var p=n[a];o=p[0];var m=e[o],g=m[0],v=m[1],y=t[g],M=t[v];if((y[0]-M[0]||y[1]-M[1])<0){var A=g;g=v,v=A}m[0]=g;var T,S=m[1]=p[1];for(i&&(T=m[2]);a>0&&n[a-1][0]===o;){var p=n[--a],E=p[1];i?e.push([S,E,T]):e.push([S,E]),S=E}i?e.push([S,v,T]):e.push([S,v])}return s}function u(t,e,r){for(var i=e.length,a=new g(i),o=[],s=0;se[2]?1:0)}function f(t,e,r){if(0!==t.length){if(e)for(var n=0;n0||d.length>0)}function m(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a10&&/[0-9](?:\s|\/)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),r=t.match(/([a-z])/gi).join("").toLowerCase());else"number"==typeof t?(r="rgb",n=[t>>>16,(65280&t)>>>8,255&t]):a(t)?(null!=t.r?(n=[t.r,t.g,t.b],r="rgb"):null!=t.red?(n=[t.red,t.green,t.blue],r="rgb"):null!=t.h?(n=[t.h,t.s,t.l],r="hsl"):null!=t.hue&&(n=[t.hue,t.saturation,t.lightness],r="hsl"),null!=t.a?s=t.a:null!=t.alpha?s=t.alpha:null!=t.opacity&&(s=t.opacity/100)):(Array.isArray(t)||ArrayBuffer.isView(t))&&(n=[t[0],t[1],t[2]],r="rgb",s=4===t.length?t[3]:1);return{space:r,values:n,alpha:s}}e.exports=n;var i=t("color-name"),a=t("is-plain-obj"),o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},{"color-name":86,"is-plain-obj":279}],88:[function(t,e,r){"use strict";var n=t("color-parse"),i=t("color-space/hsl"),a=t("clamp");e.exports=function(t,e){null==e&&(e=!0);var r=n(t);if(!r.space)return[];if(Array.isArray(t))return t;var o,s=r.values,l=s.length;for(o=0;o1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[u]=255*a;return i}},n.hsl=function(t){var e,r,n,i=t[0]/255,a=t[1]/255,o=t[2]/255,s=Math.min(i,a,o),l=Math.max(i,a,o),u=l-s;return l===s?e=0:i===l?e=(a-o)/u:a===l?e=2+(o-i)/u:o===l&&(e=4+(i-a)/u),e=Math.min(60*e,360),e<0&&(e+=360),n=(s+l)/2,r=l===s?0:n<=.5?u/(l+s):u/(2-l-s),[e,100*r,100*n]}},{"./rgb":90}],90:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],91:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:0,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],92:[function(t,e,r){"use strict";function n(t){var e,r,n,u,c,h,f,d,p,m,g,v,y,b=[],x=[],_=[],w=[];if(o.isPlainObject(t)||(t={}),p=t.nshades||72,d=t.format||"hex",f=t.colormap,f||(f="jet"),"string"==typeof f){if(f=f.toLowerCase(),!l[f])throw Error(f+" not a supported colorscale");h=s(l[f])}else{if(!Array.isArray(f))throw Error("unsupported colormap option",f);h=s(f)}if(h.length>p)throw new Error(f+" map requires nshades to be at least size "+h.length);for(g=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:s(t.alpha):"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=h.map(function(t){return Math.round(t.index*p)}),g[0]<0&&(g[0]=0),g[1]<0&&(g[0]=0),g[0]>1&&(g[0]=1),g[1]>1&&(g[0]=1),y=0;y=0&&r[3]<=1||(r[3]=g[0]+(g[1]-g[0])*v);for(y=0;y=0}function i(t,e,r,i){var s=a(e,r,i);if(0===s){var l=o(a(t,e,r)),u=o(a(t,e,i));if(l===u){if(0===l){var c=n(t,e,r);return c===n(t,e,i)?0:c?1:-1}return 0}return 0===u?l>0?-1:n(t,e,i)?-1:1:0===l?u>0?1:n(t,e,r)?1:-1:o(u-l)}var h=a(t,e,r);return h>0?s>0&&a(t,e,i)>0?1:-1:h<0?s>0||a(t,e,i)>0?1:-1:a(t,e,i)>0?1:n(t,e,r)?1:-1}e.exports=i;var a=t("robust-orientation"),o=t("signum"),s=t("two-sum"),l=t("robust-product"),u=t("robust-sum")},{"robust-orientation":489,"robust-product":490,"robust-sum":494,signum:496,"two-sum":520}],94:[function(t,e,r){function n(t,e){return t-e}function i(t,e){var r=t.length,i=t.length-e.length;if(i)return i;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||a(t[0],t[1])-a(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(i=o+t[2]-(s+e[2]))return i;var l=a(t[0],t[1]),u=a(e[0],e[1]);return a(l,t[2])-a(u,e[2])||a(l+t[2],o)-a(u+e[2],s);case 4:var c=t[0],h=t[1],f=t[2],d=t[3],p=e[0],m=e[1],g=e[2],v=e[3];return c+h+f+d-(p+m+g+v)||a(c,h,f,d)-a(p,m,g,v,p)||a(c+h,c+f,c+d,h+f,h+d,f+d)-a(p+m,p+g,p+v,m+g,m+v,g+v)||a(c+h+f,c+h+d,c+f+d,h+f+d)-a(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var y=t.slice().sort(n),b=e.slice().sort(n),x=0;xt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}e.exports=n},{}],98:[function(t,e,r){"use strict";function n(t){var e=i(t),r=e.length;if(r<=2)return[];for(var n=new Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}function a(t,e){try{return o(t,!0)}catch(u){var r=s(t);if(r.length<=e)return[];var a=n(t,r),l=o(a,!0);return i(l,r)}}e.exports=a;var o=t("incremental-convex-hull"),s=t("affine-hull")},{"affine-hull":36,"incremental-convex-hull":273}],100:[function(t,e,r){e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],101:[function(t,e,r){function n(t){return t=Math.round(t),t<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return n("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return i("%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function l(t){var e=t.replace(/ /g,"").toLowerCase();if(e in u)return u[e].slice();if("#"===e[0]){if(4===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=4095?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null}if(7===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=16777215?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null}return null}var i=e.indexOf("("),l=e.indexOf(")");if(i!==-1&&l+1===e.length){var c=e.substr(0,i),h=e.substr(i+1,l-(i+1)).split(","),f=1;switch(c){case"rgba":if(4!==h.length)return null;f=o(h.pop());case"rgb":return 3!==h.length?null:[a(h[0]),a(h[1]),a(h[2]),f];case"hsla":if(4!==h.length)return null;f=o(h.pop());case"hsl":if(3!==h.length)return null;var d=(parseFloat(h[0])%360+360)%360/360,p=o(h[1]),m=o(h[2]),g=m<=.5?m*(p+1):m+p-m*p,v=2*m-g;return[n(255*s(v,g,d+1/3)),n(255*s(v,g,d)),n(255*s(v,g,d-1/3)),f];default:return null}}return null}var u={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{r.parseCSSColor=l}catch(t){}},{}],102:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,u=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var c=t.length-1;c>=0;--c)a[c]=o*t[c]+s*e[c]+l*r[c]+u*n[c];return a}return o*t+s*e+l*r[c]+u*n}function i(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,u=(1+2*i)*l,c=i*l,h=s*(3-2*i),f=s*o;if(t.length){a||(a=new Array(t.length));for(var d=t.length-1;d>=0;--d)a[d]=u*t[d]+c*e[d]+h*r[d]+f*n[d];return a}return u*t+c*e+h*r+f*n}e.exports=i,e.exports.derivative=n},{}],103:[function(t,e,r){"use strict";function n(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function i(t){var e=new n;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var i=0;i0)throw new Error("cwise: pre() block may not reference array args");if(i0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)e.scalarArgs.push(i),e.shimArgs.push("scalar"+i);else if("index"===o){if(e.indexArgs.push(i),i0)throw new Error("cwise: pre() block may not reference array index") -;if(i0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(e.shapeArgs.push(i),ir.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,a(e)}var a=t("./lib/thunk.js");e.exports=i},{"./lib/thunk.js":105}],104:[function(t,e,r){"use strict";function n(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],u=[],c=0,h=0;for(n=0;n=0;--n)c=t[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",h,"]-=s",h].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function i(t,e,r,i){for(var a=e.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,u=[],c=0;c0;){"].join("")),u.push(["if(j",c,"<",s,"){"].join("")),u.push(["s",e[c],"=j",c].join("")),u.push(["j",c,"=0"].join("")),u.push(["}else{s",e[c],"=",s].join("")),u.push(["j",c,"-=",s,"}"].join("")),l&&u.push(["index[",e[c],"]=j",c].join(""));for(var c=0;c0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}function l(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,l=new Array(t.arrayArgs.length),c=new Array(t.arrayArgs.length),h=0;h0&&_.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var w=new Array(r),h=0;h3&&x.push(o(t.pre,t,c));var T=o(t.body,t,c),S=a(g);S3&&x.push(o(t.post,t,c)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+x.join("\n")+"\n----------");var E=[t.funcName||"unnamed","_cwise_loop_",l[0].join("s"),"m",S,s(c)].join("");return new Function(["function ",E,"(",b.join(","),"){",x.join("\n"),"} return ",E].join(""))()}var u=t("uniq");e.exports=l},{uniq:523}],105:[function(t,e,r){"use strict";function n(t){var e=["'use strict'","var CACHED={}"],r=[],n=t.funcName+"_cwise_thunk";e.push(["return function ",n,"(",t.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],l=[],u=[],c=0;c0&&(l.push("array"+t.arrayArgs[0]+".shape.length===array"+h+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[c]))),u.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+h+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[c])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),e.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}"));for(var c=0;ce?1:t>=e?0:0/0}function a(t){return null===t?0/0:+t}function o(t){return!isNaN(t)}function s(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}function l(t){return t.length}function u(t){for(var e=1;t*e%1;)e*=10;return e}function c(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function h(){this._=Object.create(null)}function f(t){return(t+="")===_o||t[0]===wo?wo+t:t}function d(t){return(t+="")[0]===wo?t.slice(1):t}function p(t){return f(t)in this._}function m(t){return(t=f(t))in this._&&delete this._[t]}function g(){var t=[];for(var e in this._)t.push(d(e));return t}function v(){var t=0;for(var e in this._)++t;return t}function y(){for(var t in this._)return!1;return!0}function b(){this._=Object.create(null)}function x(t){return t}function _(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function w(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=Mo.length;r=e&&(e=i+1);!(o=s[e])&&++e0&&(t=t.slice(0,s));var u=Io.get(t);return u&&(t=u,l=J),s?e?i:n:e?M:a}function Z(t,e){return function(r){var n=uo.event;uo.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{uo.event=n}}}function J(t,e){var r=Z(t,e);return function(t){var e=this,n=t.relatedTarget;n&&(n===e||8&n.compareDocumentPosition(e))||r.call(e,t)}}function Q(t){var r=".dragsuppress-"+ ++Oo,i="click"+r,a=uo.select(n(t)).on("touchmove"+r,T).on("dragstart"+r,T).on("selectstart"+r,T);if(null==Po&&(Po=!("onselectstart"in t)&&w(t.style,"userSelect")),Po){var o=e(t).style,s=o[Po];o[Po]="none"}return function(t){if(a.on(r,null),Po&&(o[Po]=s),t){var e=function(){a.on(i,null)};a.on(i,function(){T(),e()},!0),setTimeout(e,0)}}}function K(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(jo<0){var a=n(t);if(a.scrollX||a.scrollY){r=uo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();jo=!(o.f||o.e),r.remove()}}return jo?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function $(){return uo.event.changedTouches[0].identifier}function tt(t){return t>0?1:t<0?-1:0}function et(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function rt(t){return t>1?0:t<-1?No:Math.acos(t)}function nt(t){return t>1?Vo:t<-1?-Vo:Math.asin(t)}function it(t){return((t=Math.exp(t))-1/t)/2}function at(t){return((t=Math.exp(t))+1/t)/2}function ot(t){return((t=Math.exp(2*t))-1)/(t+1)}function st(t){return(t=Math.sin(t/2))*t}function lt(){}function ut(t,e,r){return this instanceof ut?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof ut?new ut(t.h,t.s,t.l):Mt(""+t,kt,ut):new ut(t,e,r)}function ct(t,e,r){function n(t){return t>360?t-=360:t<0&&(t+=360),t<60?a+(o-a)*t/60:t<180?o:t<240?a+(o-a)*(240-t)/60:a}function i(t){return Math.round(255*n(t))}var a,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,r=r<0?0:r>1?1:r,o=r<=.5?r*(1+e):r+e-r*e,a=2*r-o,new bt(i(t+120),i(t),i(t-120))}function ht(t,e,r){return this instanceof ht?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof ht?new ht(t.h,t.c,t.l):t instanceof dt?mt(t.l,t.a,t.b):mt((t=At((t=uo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ht(t,e,r)}function ft(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new dt(r,Math.cos(t*=Ho)*e,Math.sin(t)*e)}function dt(t,e,r){return this instanceof dt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof dt?new dt(t.l,t.a,t.b):t instanceof ht?ft(t.h,t.c,t.l):At((t=bt(t)).r,t.g,t.b):new dt(t,e,r)}function pt(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return i=gt(i)*Ko,n=gt(n)*$o,a=gt(a)*ts,new bt(yt(3.2404542*i-1.5371385*n-.4985314*a),yt(-.969266*i+1.8760108*n+.041556*a),yt(.0556434*i-.2040259*n+1.0572252*a))}function mt(t,e,r){return t>0?new ht(Math.atan2(r,e)*qo,Math.sqrt(e*e+r*r),t):new ht(0/0,0/0,t)}function gt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function vt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function yt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function bt(t,e,r){return this instanceof bt?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof bt?new bt(t.r,t.g,t.b):Mt(""+t,bt,ct):new bt(t,e,r)}function xt(t){return new bt(t>>16,t>>8&255,255&t)}function _t(t){return xt(t)+""}function wt(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function Mt(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(St(i[0]),St(i[1]),St(i[2]))}return(a=ns.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function kt(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e0&&l<1?0:n),new ut(n,i,l)}function At(t,e,r){t=Tt(t),e=Tt(e),r=Tt(r);var n=vt((.4124564*t+.3575761*e+.1804375*r)/Ko),i=vt((.2126729*t+.7151522*e+.072175*r)/$o);return dt(116*i-16,500*(n-i),200*(i-vt((.0193339*t+.119192*e+.9503041*r)/ts)))}function Tt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function St(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Et(t){return"function"==typeof t?t:function(){return t}}function Lt(t){return function(e,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),Ct(e,r,t,n)}}function Ct(t,e,r,n){function i(){var t,e=l.status;if(!e&&Dt(l)||e>=200&&e<300||304===e){try{t=r.call(a,l)}catch(t){return void o.error.call(a,t)}o.load.call(a,t)}else o.error.call(a,l)}var a={},o=uo.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(t){var e=uo.event;uo.event=t;try{o.progress.call(a,l)}finally{uo.event=e}},a.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==e?delete s[t]:s[t]=e+"",a)},a.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",a):e},a.responseType=function(t){return arguments.length?(u=t,a):u},a.response=function(t){return r=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(ho(arguments)))}}),a.send=function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),l.open(r,t,!0),null==e||"accept"in s||(s.accept=e+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=u&&(l.responseType=u),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),o.beforesend.call(a,l),l.send(null==n?null:n),a},a.abort=function(){return l.abort(),a},uo.rebind(a,o,"on"),null==n?a:a.get(zt(n))}function zt(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}function Dt(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function It(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i=r+e,a={c:t,t:i,n:null};return as?as.n=a:is=a,as=a,os||(ss=clearTimeout(ss),os=1,ls(Pt)),a}function Pt(){var t=Ot(),e=jt()-t;e>24?(isFinite(e)&&(clearTimeout(ss),ss=setTimeout(Pt,e)),os=0):(os=1,ls(Pt))}function Ot(){for(var t=Date.now(),e=is;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function jt(){for(var t,e=is,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}}function Nt(t){var e=t.decimal,r=t.thousands,n=t.grouping,i=t.currency,a=n&&r?function(t,e){for(var i=t.length,a=[],o=0,s=n[0],l=0;i>0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>e));)s=n[o=(o+1)%n.length];return a.reverse().join(r)}:x;return function(t){var r=cs.exec(t),n=r[1]||" ",o=r[2]||">",s=r[3]||"-",l=r[4]||"",u=r[5],c=+r[6],h=r[7],f=r[8],d=r[9],p=1,m="",g="",v=!1,y=!0;switch(f&&(f=+f.substring(1)),(u||"0"===n&&"="===o)&&(u=n="0",o="="),d){case"n":h=!0,d="g";break;case"%":p=100,g="%",d="f";break;case"p":p=100,g="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(m="0"+d.toLowerCase());case"c":y=!1;case"d":v=!0,f=0;break;case"s":p=-1,d="r"}"$"===l&&(m=i[0],g=i[1]),"r"!=d||f||(d="g"),null!=f&&("g"==d?f=Math.max(1,Math.min(21,f)):"e"!=d&&"f"!=d||(f=Math.max(0,Math.min(20,f)))),d=hs.get(d)||Bt;var b=u&&h;return function(t){var r=g;if(v&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===s?"":s;if(p<0){var l=uo.formatPrefix(t,f);t=l.scale(t),r=l.symbol+g}else t*=p;t=d(t,f);var x,_,w=t.lastIndexOf(".");if(w<0){var M=y?t.lastIndexOf("e"):-1;M<0?(x=t,_=""):(x=t.substring(0,M),_=t.substring(M))}else x=t.substring(0,w),_=e+t.substring(w+1);!u&&h&&(x=a(x,1/0));var k=m.length+x.length+_.length+(b?0:i.length),A=k"===o?A+i+t:"^"===o?A.substring(0,k>>=1)+i+t+A.substring(k):i+(b?t:A+t))+r}}}function Bt(t){return t+""}function Ut(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Vt(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r1)for(;o=u)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=L[o in ms?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}function n(t,e,r){w.lastIndex=0;var n=w.exec(e.slice(r));return n?(t.w=M.get(n[0].toLowerCase()),r+n[0].length):-1}function i(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.w=_.get(n[0].toLowerCase()),r+n[0].length):-1}function a(t,e,r){T.lastIndex=0;var n=T.exec(e.slice(r));return n?(t.m=S.get(n[0].toLowerCase()),r+n[0].length):-1}function o(t,e,r){k.lastIndex=0;var n=k.exec(e.slice(r));return n?(t.m=A.get(n[0].toLowerCase()),r+n[0].length):-1}function s(t,e,n){return r(t,E.c.toString(),e,n)}function l(t,e,n){return r(t,E.x.toString(),e,n)}function u(t,e,n){return r(t,E.X.toString(),e,n)}function c(t,e,r){var n=b.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)}var h=t.dateTime,f=t.date,d=t.time,p=t.periods,m=t.days,g=t.shortDays,v=t.months,y=t.shortMonths;e.utc=function(t){function r(t){try{ds=Ut;var e=new ds;return e._=t,n(e)}finally{ds=Date}}var n=e(t);return r.parse=function(t){try{ds=Ut;var e=n.parse(t);return e&&e._}finally{ds=Date}},r.toString=n.toString,r},e.multi=e.utc.multi=ce;var b=uo.map(),x=Yt(m),_=Wt(m),w=Yt(g),M=Wt(g),k=Yt(v),A=Wt(v),T=Yt(y),S=Wt(y);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var E={a:function(t){return g[t.getDay()]},A:function(t){return m[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return v[t.getMonth()]},c:e(h),d:function(t,e){return Gt(t.getDate(),e,2)},e:function(t,e){return Gt(t.getDate(),e,2)},H:function(t,e){return Gt(t.getHours(),e,2)},I:function(t,e){return Gt(t.getHours()%12||12,e,2)},j:function(t,e){return Gt(1+fs.dayOfYear(t),e,3)},L:function(t,e){return Gt(t.getMilliseconds(),e,3)},m:function(t,e){return Gt(t.getMonth()+1,e,2)},M:function(t,e){return Gt(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Gt(t.getSeconds(),e,2)},U:function(t,e){return Gt(fs.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Gt(fs.mondayOfYear(t),e,2)},x:e(f),X:e(d),y:function(t,e){return Gt(t.getFullYear()%100,e,2)},Y:function(t,e){return Gt(t.getFullYear()%1e4,e,4)},Z:le,"%":function(){return"%"}},L={a:n,A:i,b:a,B:o,c:s,d:re,e:re,H:ie,I:ie,j:ne,L:se,m:ee,M:ae,p:c,S:oe,U:Zt,w:Xt,W:Jt,x:l,X:u,y:Kt,Y:Qt,Z:$t,"%":ue};return e}function Gt(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a68?1900:2e3)}function ee(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function re(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function ne(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function ie(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function ae(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function oe(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function se(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function le(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=xo(e)/60|0,i=xo(e)%60;return r+Gt(n,"0",2)+Gt(i,"0",2)}function ue(t,e,r){vs.lastIndex=0;var n=vs.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function ce(t){for(var e=t.length,r=-1;++r=0?1:-1,s=o*r,l=Math.cos(e),u=Math.sin(e),c=a*u,h=i*l+c*Math.cos(s),f=c*o*Math.sin(s);Ms.add(Math.atan2(f,h)),n=t,i=l,a=u}var e,r,n,i,a;ks.point=function(o,s){ks.point=t,n=(e=o)*Ho,i=Math.cos(s=(r=s)*Ho/2+No/4),a=Math.sin(s)},ks.lineEnd=function(){t(e,r)}}function ve(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function ye(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function be(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function xe(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _e(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function we(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Me(t){return[Math.atan2(t[1],t[0]),nt(t[2])]}function ke(t,e){return xo(t[0]-e[0])=0;--s)i.point((h=c[s])[0],h[1])}else n(d.x,d.p.x,-1,i);d=d.p}d=d.o,c=d.z,p=!p}while(!d.v);i.lineEnd()}}}function Ie(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n0){for(_||(a.polygonStart(),_=!0),a.lineStart();++o1&&2&e&&r.push(r.pop().concat(r.shift())),d.push(r.filter(je))}var d,p,m,g=e(a),v=i.invert(n[0],n[1]),y={point:o,lineStart:l,lineEnd:u,polygonStart:function(){ -y.point=c,y.lineStart=h,y.lineEnd=f,d=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=l,y.lineEnd=u,d=uo.merge(d);var t=Ve(v,p);d.length?(_||(a.polygonStart(),_=!0),De(d,Fe,t,r,a)):t&&(_||(a.polygonStart(),_=!0),a.lineStart(),r(null,null,1,a),a.lineEnd()),_&&(a.polygonEnd(),_=!1),d=p=null},sphere:function(){a.polygonStart(),a.lineStart(),r(null,null,1,a),a.lineEnd(),a.polygonEnd()}},b=Re(),x=e(b),_=!1;return y}}function je(t){return t.length>1}function Re(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:M,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Fe(t,e){return((t=t.x)[0]<0?t[1]-Vo-Ro:Vo-t[1])-((e=e.x)[0]<0?e[1]-Vo-Ro:Vo-e[1])}function Ne(t){var e,r=0/0,n=0/0,i=0/0;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?No:-No,l=xo(a-r);xo(l-No)0?Vo:-Vo),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=No&&(xo(r-i)Ro?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}function Ue(t,e,r,n){var i;if(null==t)i=r*Vo,n.point(-No,i),n.point(0,i),n.point(No,i),n.point(No,0),n.point(No,-i),n.point(0,-i),n.point(-No,-i),n.point(-No,0),n.point(-No,i);else if(xo(t[0]-e[0])>Ro){var a=t[0]=0?1:-1,M=w*_,k=M>No,A=p*b;if(Ms.add(Math.atan2(A*w*Math.sin(M),m*x+A*Math.cos(M))),a+=k?_+w*Bo:_,k^f>=r^v>=r){var T=be(ve(h),ve(t));we(T);var S=be(i,T);we(S);var E=(k^_>=0?-1:1)*nt(S[2]);(n>E||n===E&&(T[0]||T[1]))&&(o+=k^_>=0?1:-1)}if(!g++)break;f=v,p=b,m=x,h=t}}return(a<-Ro||aa}function r(t){var r,a,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(h,f){var d,p=[h,f],m=e(h,f),g=o?m?0:i(h,f):m?i(h+(h<0?No:-No),f):0;if(!r&&(u=l=m)&&t.lineStart(),m!==l&&(d=n(r,p),(ke(r,d)||ke(p,d))&&(p[0]+=Ro,p[1]+=Ro,m=e(p[0],p[1]))),m!==l)c=0,m?(t.lineStart(),d=n(p,r),t.point(d[0],d[1])):(d=n(r,p),t.point(d[0],d[1]),t.lineEnd()),r=d;else if(s&&r&&o^m){var v;g&a||!(v=n(p,r,!0))||(c=0,o?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||r&&ke(r,p)||t.point(p[0],p[1]),r=p,l=m,a=g},lineEnd:function(){l&&t.lineEnd(),r=null},clean:function(){return c|(u&&l)<<1}}}function n(t,e,r){var n=ve(t),i=ve(e),o=[1,0,0],s=be(n,i),l=ye(s,s),u=s[0],c=l-u*u;if(!c)return!r&&t;var h=a*l/c,f=-a*u/c,d=be(o,s),p=_e(o,h);xe(p,_e(s,f));var m=d,g=ye(p,m),v=ye(m,m),y=g*g-v*(ye(p,p)-1);if(!(y<0)){var b=Math.sqrt(y),x=_e(m,(-g-b)/v);if(xe(x,p),x=Me(x),!r)return x;var _,w=t[0],M=e[0],k=t[1],A=e[1];M0^x[1]<(xo(x[0]-w)No^(w<=x[0]&&x[0]<=M)){var L=_e(m,(-g+b)/v);return xe(L,p),[x,Me(L)]}}}function i(e,r){var n=o?t:No-t,i=0;return e<-n?i|=1:e>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}var a=Math.cos(t),o=a>0,s=xo(a)>Ro;return Oe(e,r,gr(t,6*Ho),o?[0,-t]:[-No,t-No])}function qe(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,u=o.y,c=s.x,h=s.y,f=0,d=1,p=c-l,m=h-u;if(a=t-l,p||!(a>0)){if(a/=p,p<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>d)return;a>f&&(f=a)}else if(p>0){if(a0)){if(a/=m,m<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=n-u,m||!(a<0)){if(a/=m,m<0){if(a>d)return;a>f&&(f=a)}else if(m>0){if(a0&&(i.a={x:l+f*p,y:u+f*m}),d<1&&(i.b={x:l+d*p,y:u+d*m}),i}}}}}}function Ge(t,e,r,n){function i(n,i){return xo(n[0]-t)0?0:3:xo(n[0]-r)0?2:1:xo(n[1]-e)0?1:0:i>0?3:2}function a(t,e){return o(t.x,e.x)}function o(t,e){var r=i(t,1),n=i(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(s){function l(t){for(var e=0,r=g.length,n=t[1],i=0;in&&et(u,a,t)>0&&++e:a[1]<=n&&et(u,a,t)<0&&--e,u=a;return 0!==e}function u(a,s,l,u){var c=0,h=0;if(null==a||(c=i(a,l))!==(h=i(s,l))||o(a,s)<0^l>0)do{u.point(0===c||3===c?t:r,c>1?n:e)}while((c=(c+l+4)%4)!==h);else u.point(s[0],s[1])}function c(i,a){return t<=i&&i<=r&&e<=a&&a<=n}function h(t,e){c(t,e)&&s.point(t,e)}function f(){L.point=p,g&&g.push(v=[]),k=!0,M=!1,_=w=0/0}function d(){m&&(p(y,b),x&&M&&S.rejoin(),m.push(S.buffer())),L.point=h,M&&s.lineEnd()}function p(t,e){t=Math.max(-Fs,Math.min(Fs,t)),e=Math.max(-Fs,Math.min(Fs,e));var r=c(t,e);if(g&&v.push([t,e]),k)y=t,b=e,x=r,k=!1,r&&(s.lineStart(),s.point(t,e));else if(r&&M)s.point(t,e);else{var n={a:{x:_,y:w},b:{x:t,y:e}};E(n)?(M||(s.lineStart(),s.point(n.a.x,n.a.y)),s.point(n.b.x,n.b.y),r||s.lineEnd(),A=!1):r&&(s.lineStart(),s.point(t,e),A=!1)}_=t,w=e,M=r}var m,g,v,y,b,x,_,w,M,k,A,T=s,S=Re(),E=qe(t,e,r,n),L={point:h,lineStart:f,lineEnd:d,polygonStart:function(){s=S,m=[],g=[],A=!0},polygonEnd:function(){s=T,m=uo.merge(m);var e=l([t,n]),r=A&&e,i=m.length;(r||i)&&(s.polygonStart(),r&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),i&&De(m,a,e,u,s),s.polygonEnd()),m=g=v=null}};return L}}function Ye(t){var e=0,r=No/3,n=lr(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*No/180,r=t[1]*No/180):[e/No*180,r/No*180]},i}function We(t,e){function r(t,e){var r=Math.sqrt(a-2*i*Math.sin(e))/i;return[r*Math.sin(t*=i),o-r*Math.cos(t)]}var n=Math.sin(t),i=(n+Math.sin(e))/2,a=1+n*(2*i-n),o=Math.sqrt(a)/i;return r.invert=function(t,e){var r=o-e;return[Math.atan2(t,r)/i,nt((a-(t*t+r*r)*i*i)/(2*i))]},r}function Xe(){function t(t,e){Bs+=i*t-n*e,n=t,i=e}var e,r,n,i;Gs.point=function(a,o){Gs.point=t,e=n=a,r=i=o},Gs.lineEnd=function(){t(e,r)}}function Ze(t,e){tHs&&(Hs=t),eqs&&(qs=e)}function Je(){function t(t,e){o.push("M",t,",",e,a)}function e(t,e){o.push("M",t,",",e),s.point=r}function r(t,e){o.push("L",t,",",e)}function n(){s.point=t}function i(){o.push("Z")}var a=Qe(4.5),o=[],s={point:t,lineStart:function(){s.point=e},lineEnd:n,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=n,s.point=t},pointRadius:function(t){return a=Qe(t),s},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return s}function Qe(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Ke(t,e){Ss+=t,Es+=e,++Ls}function $e(){function t(t,n){var i=t-e,a=n-r,o=Math.sqrt(i*i+a*a);Cs+=o*(e+t)/2,zs+=o*(r+n)/2,Ds+=o,Ke(e=t,r=n)}var e,r;Ws.point=function(n,i){Ws.point=t,Ke(e=n,r=i)}}function tr(){Ws.point=Ke}function er(){function t(t,e){var r=t-n,a=e-i,o=Math.sqrt(r*r+a*a);Cs+=o*(n+t)/2,zs+=o*(i+e)/2,Ds+=o,o=i*t-n*e,Is+=o*(n+t),Ps+=o*(i+e),Os+=3*o,Ke(n=t,i=e)}var e,r,n,i;Ws.point=function(a,o){Ws.point=t,Ke(e=n=a,r=i=o)},Ws.lineEnd=function(){t(e,r)}}function rr(t){function e(e,r){t.moveTo(e+o,r),t.arc(e,r,o,0,Bo)}function r(e,r){t.moveTo(e,r),s.point=n}function n(e,r){t.lineTo(e,r)}function i(){s.point=e}function a(){t.closePath()}var o=4.5,s={point:e,lineStart:function(){s.point=r},lineEnd:i,polygonStart:function(){s.lineEnd=a},polygonEnd:function(){s.lineEnd=i,s.point=e},pointRadius:function(t){return o=t,s},result:M};return s}function nr(t){function e(t){return(s?n:r)(t)}function r(e){return or(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})}function n(e){function r(r,n){r=t(r,n),e.point(r[0],r[1])}function n(){b=0/0,k.point=a,e.lineStart()}function a(r,n){var a=ve([r,n]),o=t(r,n);i(b,x,y,_,w,M,b=o[0],x=o[1],y=r,_=a[0],w=a[1],M=a[2],s,e),e.point(b,x)}function o(){k.point=r,e.lineEnd()}function l(){n(),k.point=u,k.lineEnd=c}function u(t,e){a(h=t,f=e),d=b,p=x,m=_,g=w,v=M,k.point=a}function c(){i(b,x,y,_,w,M,d,p,h,m,g,v,s,e),k.lineEnd=o,o()}var h,f,d,p,m,g,v,y,b,x,_,w,M,k={point:r,lineStart:n,lineEnd:o,polygonStart:function(){e.polygonStart(),k.lineStart=l},polygonEnd:function(){e.polygonEnd(),k.lineStart=n}};return k}function i(e,r,n,s,l,u,c,h,f,d,p,m,g,v){var y=c-e,b=h-r,x=y*y+b*b;if(x>4*a&&g--){var _=s+d,w=l+p,M=u+m,k=Math.sqrt(_*_+w*w+M*M),A=Math.asin(M/=k),T=xo(xo(M)-1)a||xo((y*C+b*z)/x-.5)>.3||s*d+l*p+u*m0&&16,e):Math.sqrt(a)},e}function ir(t){var e=nr(function(e,r){return t([e*qo,r*qo])});return function(t){return ur(e(t))}}function ar(t){this.stream=t}function or(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function sr(t){return lr(function(){return t})()}function lr(t){function e(t){return t=s(t[0]*Ho,t[1]*Ho),[t[0]*f+l,u-t[1]*f]}function r(t){return(t=s.invert((t[0]-l)/f,(u-t[1])/f))&&[t[0]*qo,t[1]*qo]}function n(){s=Ce(o=fr(v,y,b),a);var t=a(m,g);return l=d-t[0]*f,u=p+t[1]*f,i()}function i(){return c&&(c.valid=!1,c=null),e}var a,o,s,l,u,c,h=nr(function(t,e){return t=a(t,e),[t[0]*f+l,u-t[1]*f]}),f=150,d=480,p=250,m=0,g=0,v=0,y=0,b=0,_=Rs,w=x,M=null,k=null;return e.stream=function(t){return c&&(c.valid=!1),c=ur(_(o,h(w(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(_=null==t?(M=t,Rs):He((M=+t)*Ho),i()):M},e.clipExtent=function(t){return arguments.length?(k=t,w=t?Ge(t[0][0],t[0][1],t[1][0],t[1][1]):x,i()):k},e.scale=function(t){return arguments.length?(f=+t,n()):f},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],n()):[d,p]},e.center=function(t){return arguments.length?(m=t[0]%360*Ho,g=t[1]%360*Ho,n()):[m*qo,g*qo]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Ho,y=t[1]%360*Ho,b=t.length>2?t[2]%360*Ho:0,n()):[v*qo,y*qo,b*qo]},uo.rebind(e,h,"precision"),function(){return a=t.apply(this,arguments),e.invert=a.invert&&r,n()}}function ur(t){return or(t,function(e,r){t.point(e*Ho,r*Ho)})}function cr(t,e){return[t,e]}function hr(t,e){return[t>No?t-Bo:t<-No?t+Bo:t,e]}function fr(t,e,r){return t?e||r?Ce(pr(t),mr(e,r)):pr(t):e||r?mr(e,r):hr}function dr(t){return function(e,r){return e+=t,[e>No?e-Bo:e<-No?e+Bo:e,r]}}function pr(t){var e=dr(t);return e.invert=dr(-t),e}function mr(t,e){function r(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,u=Math.sin(e),c=u*n+s*i;return[Math.atan2(l*a-c*o,s*n-u*i),nt(c*a+l*o)]}var n=Math.cos(t),i=Math.sin(t),a=Math.cos(e),o=Math.sin(e);return r.invert=function(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,u=Math.sin(e),c=u*a-l*o;return[Math.atan2(l*a+u*o,s*n+c*i),nt(c*n-s*i)]},r}function gr(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=vr(r,i),a=vr(r,a),(o>0?ia)&&(i+=o*Bo)):(i=t+o*Bo,a=t-.5*l);for(var u,c=i;o>0?c>a:c0?e<-Vo+Ro&&(e=-Vo+Ro):e>Vo-Ro&&(e=Vo-Ro);var r=o/Math.pow(i(e),a);return[r*Math.sin(a*t),o-r*Math.cos(a*t)]}var n=Math.cos(t),i=function(t){return Math.tan(No/4+t/2)},a=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(i(e)/i(t)),o=n*Math.pow(i(t),a)/a;return a?(r.invert=function(t,e){var r=o-e,n=tt(a)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/a,2*Math.atan(Math.pow(o/n,1/a))-Vo]},r):Sr}function Tr(t,e){function r(t,e){var r=a-e;return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}var n=Math.cos(t),i=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),a=n/i+t;return xo(i)1&&et(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function Ir(t,e){return t[0]-e[0]||t[1]-e[1]}function Pr(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function Or(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],u=r[1],c=e[1]-l,h=n[1]-u,f=(s*(l-u)-h*(i-a))/(h*o-s*c);return[i+f*o,l+f*c]}function jr(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}function Rr(){an(this),this.edge=this.site=this.circle=null}function Fr(t){var e=sl.pop()||new Rr;return e.site=t,e}function Nr(t){Zr(t),il.remove(t),sl.push(t),an(t)}function Br(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];Nr(t);for(var l=a;l.circle&&xo(r-l.circle.x)Ro)s=s.L;else{if(!((i=a-Hr(s,o))>Ro)){n>-Ro?(e=s.P,r=s):i>-Ro?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=Fr(t);if(il.insert(e,l),e||r){if(e===r)return Zr(e),r=Fr(e.site),il.insert(l,r),l.edge=r.edge=$r(e.site,l.site),Xr(e),void Xr(r);if(!r)return void(l.edge=$r(e.site,l.site));Zr(e),Zr(r);var u=e.site,c=u.x,h=u.y,f=t.x-c,d=t.y-h,p=r.site,m=p.x-c,g=p.y-h,v=2*(f*g-d*m),y=f*f+d*d,b=m*m+g*g,x={x:(g*y-d*b)/v+c,y:(f*b-m*y)/v+h};en(r.edge,u,p,x),l.edge=$r(u,t,null,x),r.edge=$r(t,p,null,x),Xr(e),Xr(r)}}function Vr(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;r=o.site;var s=r.x,l=r.y,u=l-e;if(!u)return s;var c=s-n,h=1/a-1/u,f=c/u;return h?(-f+Math.sqrt(f*f-2*h*(c*c/(-2*u)-l+u/2+i-a/2)))/h+n:(n+s)/2}function Hr(t,e){var r=t.N;if(r)return Vr(r,e);var n=t.site;return n.y===e?n.x:1/0}function qr(t){this.site=t,this.edges=[]}function Gr(t){for(var e,r,n,i,a,o,s,l,u,c,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],m=nl,g=m.length;g--;)if((a=m[g])&&a.prepare())for(s=a.edges,l=s.length,o=0;oRo||xo(i-r)>Ro)&&(s.splice(o,0,new rn(tn(a.site,c,xo(n-h)Ro?{x:h,y:xo(e-h)Ro?{x:xo(r-p)Ro?{x:f,y:xo(e-f)Ro?{x:xo(r-d)=-Fo)){var d=l*l+u*u,p=c*c+h*h,m=(h*d-u*p)/f,g=(l*p-c*d)/f,h=g+s,v=ll.pop()||new Wr;v.arc=t,v.site=i,v.x=m+o,v.y=h+Math.sqrt(m*m+g*g),v.cy=h,t.circle=v;for(var y=null,b=ol._;b;)if(v.y=s)return;if(f>p){if(a){if(a.y>=u)return}else a={x:g,y:l};r={x:g,y:u}}else{if(a){if(a.y1)if(f>p){if(a){if(a.y>=u)return}else a={x:(l-i)/n,y:l};r={x:(u-i)/n,y:u}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.xa||h>o||f=x,M=r>=_,k=M<<1|w,A=k+4;ka&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:bn(r,n)})),a=hl.lastIndex;return a=0&&!(r=uo.interpolators[n](t,e)););return r}function wn(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1?1:t(e)}}function kn(t){return function(e){return 1-t(1-e)}}function An(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Tn(t){return t*t}function Sn(t){return t*t*t}function En(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Ln(t){return function(e){return Math.pow(e,t)}}function Cn(t){return 1-Math.cos(t*Vo)}function zn(t){return Math.pow(2,10*(t-1))}function Dn(t){return 1-Math.sqrt(1-t*t)}function In(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/Bo*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Bo/e)}}function Pn(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function On(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function jn(t,e){t=uo.hcl(t),e=uo.hcl(e);var r=t.h,n=t.c,i=t.l,a=e.h-r,o=e.c-n,s=e.l-i;return isNaN(o)&&(o=0,n=isNaN(n)?e.c:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return ft(r+a*t,n+o*t,i+s*t)+""}}function Rn(t,e){t=uo.hsl(t),e=uo.hsl(e);var r=t.h,n=t.s,i=t.l,a=e.h-r,o=e.s-n,s=e.l-i;return isNaN(o)&&(o=0,n=isNaN(n)?e.s:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return ct(r+a*t,n+o*t,i+s*t)+""}}function Fn(t,e){t=uo.lab(t),e=uo.lab(e);var r=t.l,n=t.a,i=t.b,a=e.l-r,o=e.a-n,s=e.b-i;return function(t){return pt(r+a*t,n+o*t,i+s*t)+""}}function Nn(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Bn(t){var e=[t.a,t.b],r=[t.c,t.d],n=Vn(e),i=Un(e,r),a=Vn(Hn(r,e,-i))||0;e[0]*r[1]180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(qn(r)+"rotate(",null,")")-2,x:bn(t,e)})):e&&r.push(qn(r)+"rotate("+e+")")}function Wn(t,e,r,n){t!==e?n.push({i:r.push(qn(r)+"skewX(",null,")")-2,x:bn(t,e)}):e&&r.push(qn(r)+"skewX("+e+")")}function Xn(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(qn(r)+"scale(",null,",",null,")");n.push({i:i-4,x:bn(t[0],e[0])},{i:i-2,x:bn(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(qn(r)+"scale("+e+")")}function Zn(t,e){var r=[],n=[];return t=uo.transform(t),e=uo.transform(e),Gn(t.translate,e.translate,r,n),Yn(t.rotate,e.rotate,r,n),Wn(t.skew,e.skew,r,n),Xn(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,a=n.length;++i=0;)r.push(i[n])}function li(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++oi&&(n=r,i=e);return n}function bi(t){return t.reduce(xi,0)}function xi(t,e){return t+e[1]}function _i(t,e){return wi(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wi(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Mi(t){return[uo.min(t),uo.max(t)]}function ki(t,e){return t.value-e.value}function Ai(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Ti(t,e){t._pack_next=e,e._pack_prev=t}function Si(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Ei(t){function e(t){c=Math.min(t.x-t.r,c),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}if((r=t.children)&&(u=r.length)){var r,n,i,a,o,s,l,u,c=1/0,h=-1/0,f=1/0,d=-1/0;if(r.forEach(Li),n=r[0],n.x=-n.r,n.y=0,e(n),u>1&&(i=r[1],i.x=i.r,i.y=0,e(i),u>2))for(a=r[2],Di(n,i,a),e(a),Ai(n,a),n._pack_prev=a,Ai(a,i),i=n._pack_next,o=3;o=0;)e=i[a],e.z+=r,e.m+=r,r+=e.s+(n+=e.c)}function Fi(t,e,r){return t.a.parent===e.parent?t.a:r}function Ni(t){return 1+uo.max(t,function(t){return t.y})}function Bi(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Ui(t){var e=t.children;return e&&e.length?Ui(e[0]):t}function Vi(t){var e,r=t.children;return r&&(e=r.length)?Vi(r[e-1]):t}function Hi(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function qi(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i<0&&(r+=i/2,i=0),a<0&&(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function Gi(t){var e=t[0],r=t[t.length-1];return e2?Ji:Wi,l=n?Qn:Jn;return o=i(t,e,l,r),s=i(e,t,l,_n),a}function a(t){return o(t)}var o,s;return a.invert=function(t){return s(t)},a.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},a.range=function(t){return arguments.length?(e=t,i()):e},a.rangeRound=function(t){return a.range(t).interpolate(Nn)},a.clamp=function(t){return arguments.length?(n=t,i()):n},a.interpolate=function(t){return arguments.length?(r=t,i()):r},a.ticks=function(e){return ea(t,e)},a.tickFormat=function(e,r){return ra(t,e,r)},a.nice=function(e){return $i(t,e),i()},a.copy=function(){return Qi(t,e,r,n)},i()}function Ki(t,e){return uo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function $i(t,e){return Xi(t,Zi(ta(t,e)[2])),Xi(t,Zi(ta(t,e)[2])),t}function ta(t,e){null==e&&(e=10);var r=Gi(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function ea(t,e){return uo.range.apply(uo,ta(t,e))}function ra(t,e,r){var n=ta(t,e);if(r){var i=cs.exec(r);if(i.shift(),"s"===i[8]){var a=uo.formatPrefix(Math.max(xo(n[0]),xo(n[1])));return i[7]||(i[7]="."+na(a.scale(n[2]))),i[8]="f",r=uo.format(i.join("")),function(t){return r(a.scale(t))+a.symbol}}i[7]||(i[7]="."+ia(i[8],n)),r=i.join("")}else r=",."+na(n[2])+"f";return uo.format(r)}function na(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ia(t,e){var r=na(e[2]);return t in Ml?Math.abs(r-na(Math.max(xo(e[0]),xo(e[1]))))+ +("e"!==t):r-2*("%"===t)}function aa(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),o):e},o.nice=function(){var e=Xi(n.map(i),r?Math:Al);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Gi(n),o=[],s=t[0],l=t[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),h=e%1?2:e;if(isFinite(c-u)){if(r){for(;u0;f--)o.push(a(u)*f);for(u=0;o[u]l;c--);o=o.slice(u,c)}return o},o.tickFormat=function(t,r){ -if(!arguments.length)return kl;arguments.length<2?r=kl:"function"!=typeof r&&(r=uo.format(r));var n=Math.max(1,e*t/o.ticks().length);return function(t){var o=t/a(Math.round(i(t)));return o*e0?s[r-1]:t[0],r0?0:1}function xa(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,u=-s*a,c=t[0]+l,h=t[1]+u,f=e[0]+l,d=e[1]+u,p=(c+f)/2,m=(h+d)/2,g=f-c,v=d-h,y=g*g+v*v,b=r-n,x=c*d-f*h,_=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),w=(x*v-g*_)/y,M=(-x*g-v*_)/y,k=(x*v+g*_)/y,A=(-x*g+v*_)/y,T=w-p,S=M-m,E=k-p,L=A-m;return T*T+S*S>E*E+L*L&&(w=k,M=A),[[w-l,M-u],[w*r/b,M*r/b]]}function _a(t){function e(e){function o(){u.push("M",a(t(c),s))}for(var l,u=[],c=[],h=-1,f=e.length,d=Et(r),p=Et(n);++h1?t.join("L"):t+"Z"}function Ma(t){return t.join("L")+"Z"}function ka(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1&&i.push("H",n[0]),i.join("")}function Aa(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var u=2;u9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}function Ua(t){return t.length<3?wa(t):t[0]+Ca(t,Ba(t))}function Va(t){for(var e,r,n,i=-1,a=t.length;++i0;)d[--s].call(t,o);if(a>=1)return m.event&&m.event.end.call(t,t.__data__,e),--p.count?delete p[n]:delete t[r],1}var l,u,c,f,d,p=t[r]||(t[r]={active:0,count:0}),m=p[n];m||(l=i.time,u=It(a,0,l),m=p[n]={tween:new h,time:l,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++p.count)}function ro(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate("+(isFinite(n)?n:r(t))+",0)"})}function no(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate(0,"+(isFinite(n)?n:r(t))+")"})}function io(t){return t.toISOString()}function ao(t,e,r){function n(e){return t(e)}function i(t,r){var n=t[1]-t[0],i=n/r,a=uo.bisect(Jl,i);return a==Jl.length?[e.year,ta(t.map(function(t){return t/31536e6}),r)[2]]:a?e[i/Jl[a-1]1?{floor:function(e){for(;r(e=t.floor(e));)e=oo(e-1);return e},ceil:function(e){for(;r(e=t.ceil(e));)e=oo(+e+1);return e}}:t))},n.ticks=function(t,e){var r=Gi(n.domain()),a=null==t?i(r,10):"number"==typeof t?i(r,t):!t.range&&[{range:t},e];return a&&(t=a[0],e=a[1]),t.range(r[0],oo(+r[1]+1),e<1?1:e)},n.tickFormat=function(){return r},n.copy=function(){return ao(t.copy(),e,r)},Ki(n,t)}function oo(t){return new Date(t)}function so(t){return JSON.parse(t.responseText)}function lo(t){var e=fo.createRange();return e.selectNode(fo.body),e.createContextualFragment(t.responseText)}var uo={version:"3.5.17"},co=[].slice,ho=function(t){return co.call(t)},fo=this.document;if(fo)try{ho(fo.documentElement.childNodes)[0].nodeType}catch(t){ho=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),fo)try{fo.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var po=this.Element.prototype,mo=po.setAttribute,go=po.setAttributeNS,vo=this.CSSStyleDeclaration.prototype,yo=vo.setProperty;po.setAttribute=function(t,e){mo.call(this,t,e+"")},po.setAttributeNS=function(t,e,r){go.call(this,t,e,r+"")},vo.setProperty=function(t,e,r){yo.call(this,t,e+"",r)}}uo.ascending=i,uo.descending=function(t,e){return et?1:e>=t?0:0/0},uo.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},uo.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},uo.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return l/(c-1)},uo.deviation=function(){var t=uo.variance.apply(this,arguments);return t?Math.sqrt(t):t};var bo=s(i);uo.bisectLeft=bo.left,uo.bisect=uo.bisectRight=bo.right,uo.bisector=function(t){return s(1===t.length?function(e,r){return i(t(e),r)}:t)},uo.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},uo.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},uo.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(n=t[i],e=n.length;--e>=0;)r[--o]=n[e];return r};var xo=Math.abs;uo.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r===1/0)throw new Error("infinite range");var n,i=[],a=u(xo(r)),o=-1;if(t*=a,e*=a,r*=a,r<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)=a.length)return n?n.call(i,o):r?o.sort(r):o;for(var l,u,c,f,d=-1,p=o.length,m=a[s++],g=new h;++d=a.length)return t;var n=[],i=o[r++];return t.forEach(function(t,i){n.push({key:t,values:e(i,r)})}),i?n.sort(function(t,e){return i(t.key,e.key)}):n}var r,n,i={},a=[],o=[];return i.map=function(e,r){return t(r,e,0)},i.entries=function(r){return e(t(uo.map,r,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return r=t,i},i.rollup=function(t){return n=t,i},i},uo.set=function(t){var e=new b;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},uo.event=null,uo.requote=function(t){return t.replace(ko,"\\$&")};var ko=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ao={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]},To=function(t,e){return e.querySelector(t)},So=function(t,e){return e.querySelectorAll(t)},Eo=function(t,e){var r=t.matches||t[w(t,"matchesSelector")];return(Eo=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(To=function(t,e){return Sizzle(t,e)[0]||null},So=Sizzle,Eo=Sizzle.matchesSelector),uo.selection=function(){return uo.select(fo.documentElement)};var Lo=uo.selection.prototype=[];Lo.select=function(t){var e,r,n,i,a=[];t=C(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),zo.hasOwnProperty(r)?{space:zo[r],local:t}:t}},Lo.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return t=uo.ns.qualify(t),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(D(e,t[e]));return this}return this.each(D(t,e))},Lo.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=O(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},Lo.sort=function(t){t=q.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(e=e.transition().duration(L)),e.call(t.event)}function s(){_&&_.domain(x.range().map(function(t){return(t-k.x)/k.k}).map(x.invert)),M&&M.domain(w.range().map(function(t){return(t-k.y)/k.k}).map(w.invert))}function l(t){C++||t({type:"zoomstart"})}function u(t){s(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function c(t){--C||(t({type:"zoomend"}),g=null)}function h(){function t(){s=1,a(uo.mouse(i),f),u(o)}function r(){h.on(D,null).on(I,null),d(s),c(o)}var i=this,o=O.of(i,arguments),s=0,h=uo.select(n(i)).on(D,t).on(I,r),f=e(uo.mouse(i)),d=Q(i);Bl.call(i),l(o)}function f(){function t(){var t=uo.touches(p);return d=k.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function r(){var e=uo.event.target;uo.select(e).on(x,n).on(_,s),w.push(e);for(var r=uo.event.changedTouches,i=0,a=r.length;i1){var c=l[0],h=l[1],f=c[0]-h[0],d=c[1]-h[1];v=f*f+d*d}}function n(){var t,e,r,n,o=uo.touches(p);Bl.call(p);for(var s=0,l=o.length;s=u)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,hs=uo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=uo.round(t,Rt(t,e))).toFixed(Math.max(0,Math.min(20,Rt(t*(1+1e-15),e))))}}),fs=uo.time={},ds=Date;Ut.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ps.setUTCDate.apply(this._,arguments)},setDay:function(){ps.setUTCDay.apply(this._,arguments)},setFullYear:function(){ps.setUTCFullYear.apply(this._,arguments)},setHours:function(){ps.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ps.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ps.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ps.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ps.setUTCSeconds.apply(this._,arguments)},setTime:function(){ps.setTime.apply(this._,arguments)}};var ps=Date.prototype;fs.year=Vt(function(t){return t=fs.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),fs.years=fs.year.range,fs.years.utc=fs.year.utc.range,fs.day=Vt(function(t){var e=new ds(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),fs.days=fs.day.range,fs.days.utc=fs.day.utc.range,fs.dayOfYear=function(t){var e=fs.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var r=fs[t]=Vt(function(t){return(t=fs.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=fs.year(t).getDay();return Math.floor((fs.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});fs[t+"s"]=r.range,fs[t+"s"].utc=r.utc.range,fs[t+"OfYear"]=function(t){var r=fs.year(t).getDay();return Math.floor((fs.dayOfYear(t)+(r+e)%7)/7)}}),fs.week=fs.sunday,fs.weeks=fs.sunday.range,fs.weeks.utc=fs.sunday.utc.range,fs.weekOfYear=fs.sundayOfYear;var ms={"-":"",_:" ",0:"0"},gs=/^\s*\d+/,vs=/^%/;uo.locale=function(t){return{numberFormat:Nt(t),timeFormat:qt(t)}};var ys=uo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});uo.format=ys.numberFormat,uo.geo={},he.prototype={s:0,t:0,add:function(t){fe(t,this.t,bs),fe(bs.s,this.s,this),this.s?this.t+=bs.t:this.s=bs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bs=new he;uo.geo.stream=function(t,e){t&&xs.hasOwnProperty(t.type)?xs[t.type](t,e):de(t,e)};var xs={Feature:function(t,e){de(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++nd&&(d=e)}function e(e,r){var n=ve([e*Ho,r*Ho]);if(v){var i=be(v,n),a=[i[1],-i[0],0],o=be(a,i);we(o),o=Me(o);var l=e-p,u=l>0?1:-1,m=o[0]*qo*u,g=xo(l)>180;if(g^(u*pd&&(d=y)}else if(m=(m+360)%360-180,g^(u*pd&&(d=r);g?es(c,f)&&(f=e):s(e,f)>s(c,f)&&(c=e):f>=c?(ef&&(f=e)):e>p?s(c,e)>s(c,f)&&(f=e):s(e,f)>s(c,f)&&(c=e)}else t(e,r);v=n,p=e}function r(){_.point=e}function n(){x[0]=c,x[1]=f,_.point=t,v=null}function i(t,r){if(v){var n=t-p;y+=xo(n)>180?n+(n>0?360:-360):n}else m=t,g=r;ks.point(t,r),e(t,r)}function a(){ks.lineStart()}function o(){i(m,g),ks.lineEnd(),xo(y)>Ro&&(c=-(f=180)),x[0]=c,x[1]=f,v=null}function s(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function u(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tRo?d=90:y<-Ro&&(h=-90),x[0]=c,x[1]=f}};return function(t){d=f=-(c=h=1/0),b=[],uo.geo.stream(t,_);var e=b.length;if(e){b.sort(l);for(var r,n=1,i=b[0],a=[i];ns(i[0],i[1])&&(i[1]=r[1]),s(r[0],i[1])>s(i[0],i[1])&&(i[0]=r[0])):a.push(i=r);for(var o,r,p=-1/0,e=a.length-1,n=0,i=a[e];n<=e;i=r,++n)r=a[n],(o=s(i[1],r[0]))>p&&(p=o,c=r[0],f=i[1])}return b=x=null,1/0===c||1/0===h?[[0/0,0/0],[0/0,0/0]]:[[c,h],[f,d]]}}(),uo.geo.centroid=function(t){As=Ts=Ss=Es=Ls=Cs=zs=Ds=Is=Ps=Os=0,uo.geo.stream(t,js);var e=Is,r=Ps,n=Os,i=e*e+r*r+n*n;return i=.12&&i<.234&&n>=-.425&&n<-.214?o:i>=.166&&i<.234&&n>=-.214&&n<-.115?s:a).invert(t)},t.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},t.precision=function(e){return arguments.length?(a.precision(e),o.precision(e),s.precision(e),t):a.precision()},t.scale=function(e){return arguments.length?(a.scale(e),o.scale(.35*e),s.scale(e),t.translate(a.translate())):a.scale()},t.translate=function(e){if(!arguments.length)return a.translate();var u=a.scale(),c=+e[0],h=+e[1];return r=a.translate(e).clipExtent([[c-.455*u,h-.238*u],[c+.455*u,h+.238*u]]).stream(l).point,n=o.translate([c-.307*u,h+.201*u]).clipExtent([[c-.425*u+Ro,h+.12*u+Ro],[c-.214*u-Ro,h+.234*u-Ro]]).stream(l).point,i=s.translate([c-.205*u,h+.212*u]).clipExtent([[c-.214*u+Ro,h+.166*u+Ro],[c-.115*u-Ro,h+.234*u-Ro]]).stream(l).point,t},t.scale(1070)};var Ns,Bs,Us,Vs,Hs,qs,Gs={point:M,lineStart:M,lineEnd:M,polygonStart:function(){Bs=0,Gs.lineStart=Xe},polygonEnd:function(){Gs.lineStart=Gs.lineEnd=Gs.point=M,Ns+=xo(Bs/2)}},Ys={point:Ze,lineStart:M,lineEnd:M,polygonStart:M,polygonEnd:M},Ws={point:Ke,lineStart:$e,lineEnd:tr,polygonStart:function(){Ws.lineStart=er},polygonEnd:function(){Ws.point=Ke,Ws.lineStart=$e,Ws.lineEnd=tr}};uo.geo.path=function(){function t(t){return t&&("function"==typeof s&&a.pointRadius(+s.apply(this,arguments)),o&&o.valid||(o=i(a)),uo.geo.stream(t,o)),a.result()}function e(){return o=null,t}var r,n,i,a,o,s=4.5;return t.area=function(t){return Ns=0,uo.geo.stream(t,i(Gs)),Ns},t.centroid=function(t){return Ss=Es=Ls=Cs=zs=Ds=Is=Ps=Os=0,uo.geo.stream(t,i(Ws)),Os?[Is/Os,Ps/Os]:Ds?[Cs/Ds,zs/Ds]:Ls?[Ss/Ls,Es/Ls]:[0/0,0/0]},t.bounds=function(t){return Hs=qs=-(Us=Vs=1/0),uo.geo.stream(t,i(Ys)),[[Us,Vs],[Hs,qs]]},t.projection=function(t){return arguments.length?(i=(r=t)?t.stream||ir(t):x,e()):r},t.context=function(t){return arguments.length?(a=null==(n=t)?new Je:new rr(t),"function"!=typeof s&&a.pointRadius(s),e()):n},t.pointRadius=function(e){return arguments.length?(s="function"==typeof e?e:(a.pointRadius(+e),+e),t):s},t.projection(uo.geo.albersUsa()).context(null)},uo.geo.transform=function(t){return{stream:function(e){var r=new ar(e);for(var n in t)r[n]=t[n];return r}}},ar.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},uo.geo.projection=sr,uo.geo.projectionMutator=lr,(uo.geo.equirectangular=function(){return sr(cr)}).raw=cr.invert=cr,uo.geo.rotation=function(t){function e(e){return e=t(e[0]*Ho,e[1]*Ho),e[0]*=qo,e[1]*=qo,e}return t=fr(t[0]%360*Ho,t[1]*Ho,t.length>2?t[2]*Ho:0),e.invert=function(e){return e=t.invert(e[0]*Ho,e[1]*Ho),e[0]*=qo,e[1]*=qo,e},e},hr.invert=cr,uo.geo.circle=function(){function t(){var t="function"==typeof n?n.apply(this,arguments):n,e=fr(-t[0]*Ho,-t[1]*Ho,0).invert,i=[];return r(null,null,1,{point:function(t,r){i.push(t=e(t,r)),t[0]*=qo,t[1]*=qo}}),{type:"Polygon",coordinates:[i]}}var e,r,n=[0,0],i=6;return t.origin=function(e){return arguments.length?(n=e,t):n},t.angle=function(n){return arguments.length?(r=gr((e=+n)*Ho,i*Ho),t):e},t.precision=function(n){return arguments.length?(r=gr(e*Ho,(i=+n)*Ho),t):i},t.angle(90)},uo.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Ho,i=t[1]*Ho,a=e[1]*Ho,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),u=Math.cos(i),c=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((r=h*o)*r+(r=u*c-l*h*s)*r),l*c+u*h*s)},uo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return uo.range(Math.ceil(a/g)*g,i,g).map(f).concat(uo.range(Math.ceil(u/v)*v,l,v).map(d)).concat(uo.range(Math.ceil(n/p)*p,r,p).filter(function(t){return xo(t%g)>Ro}).map(c)).concat(uo.range(Math.ceil(s/m)*m,o,m).filter(function(t){return xo(t%v)>Ro}).map(h))}var r,n,i,a,o,s,l,u,c,h,f,d,p=10,m=p,g=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(l).slice(1),f(i).reverse().slice(1),d(u).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(a=+e[0][0],i=+e[1][0],u=+e[0][1],l=+e[1][1],a>i&&(e=a,a=i,i=e),u>l&&(e=u,u=l,l=e),t.precision(y)):[[a,u],[i,l]]},t.minorExtent=function(e){return arguments.length?(n=+e[0][0],r=+e[1][0],s=+e[0][1],o=+e[1][1],n>r&&(e=n,n=r,r=e),s>o&&(e=s,s=o,o=e),t.precision(y)):[[n,s],[r,o]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(g=+e[0],v=+e[1],t):[g,v]},t.minorStep=function(e){return arguments.length?(p=+e[0],m=+e[1],t):[p,m]},t.precision=function(e){return arguments.length?(y=+e,c=yr(s,o,90),h=br(n,r,y),f=yr(u,l,90),d=br(a,i,y),t):y},t.majorExtent([[-180,-90+Ro],[180,90-Ro]]).minorExtent([[-180,-80-Ro],[180,80+Ro]])},uo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}var e,r,n=xr,i=_r;return t.distance=function(){return uo.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},t.source=function(r){return arguments.length?(n=r,e="function"==typeof r?null:r,t):n},t.target=function(e){return arguments.length?(i=e,r="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},uo.geo.interpolate=function(t,e){return wr(t[0]*Ho,t[1]*Ho,e[0]*Ho,e[1]*Ho)},uo.geo.length=function(t){return Xs=0,uo.geo.stream(t,Zs),Xs};var Xs,Zs={sphere:M,point:M,lineStart:Mr,lineEnd:M,polygonStart:M,polygonEnd:M},Js=kr(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(uo.geo.azimuthalEqualArea=function(){return sr(Js)}).raw=Js;var Qs=kr(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},x);(uo.geo.azimuthalEquidistant=function(){return sr(Qs)}).raw=Qs,(uo.geo.conicConformal=function(){return Ye(Ar)}).raw=Ar,(uo.geo.conicEquidistant=function(){return Ye(Tr)}).raw=Tr;var Ks=kr(function(t){return 1/t},Math.atan);(uo.geo.gnomonic=function(){return sr(Ks)}).raw=Ks,Sr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Vo]},(uo.geo.mercator=function(){return Er(Sr)}).raw=Sr;var $s=kr(function(){return 1},Math.asin);(uo.geo.orthographic=function(){return sr($s)}).raw=$s;var tl=kr(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(uo.geo.stereographic=function(){return sr(tl)}).raw=tl,Lr.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Vo]},(uo.geo.transverseMercator=function(){var t=Er(Lr),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):(t=r(),[t[0],t[1],t[2]-90])},r([0,0,90])}).raw=Lr,uo.geom={},uo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=Et(r),a=Et(n),o=t.length,s=[],l=[];for(e=0;e=0;--e)d.push(t[s[u[e]][2]]);for(e=+h;e=n&&u.x<=a&&u.y>=i&&u.y<=o?[[n,o],[a,o],[a,i],[n,i]]:[]).point=t[s]}),e}function r(t){return t.map(function(t,e){return{x:Math.round(a(t,e)/Ro)*Ro,y:Math.round(o(t,e)/Ro)*Ro,i:e}})}var n=Cr,i=zr,a=n,o=i,s=ul;return t?e(t):(e.links=function(t){return un(r(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return un(r(t)).cells.forEach(function(r,n){for(var i,a=r.site,o=r.edges.sort(Yr),s=-1,l=o.length,u=o[l-1].edge,c=u.l===a?u.r:u.l;++s=u,f=n>=c,d=f<<1|h;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=pn()),h?i=u:s=u,f?o=c:l=c,a(t,e,r,n,i,o,s,l)}var c,h,f,d,p,m,g,v,y,b=Et(s),x=Et(l);if(null!=e)m=e,g=r,v=n,y=i;else if(v=y=-(m=g=1/0),h=[],f=[],p=t.length,o)for(d=0;dv&&(v=c.x),c.y>y&&(y=c.y),h.push(c.x),f.push(c.y);else for(d=0;dv&&(v=_),w>y&&(y=w),h.push(_),f.push(w)}var M=v-m,k=y-g;M>k?y=g+M:v=m+k;var A=pn();if(A.add=function(t){a(A,t,+b(t,++d),+x(t,d),m,g,v,y)},A.visit=function(t){mn(t,A,m,g,v,y)},A.find=function(t){return gn(A,t[0],t[1],m,g,v,y)},d=-1,null==e){for(;++d=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return r=dl.get(r)||fl,n=pl.get(n)||x,Mn(n(r.apply(null,co.call(arguments,1))))},uo.interpolateHcl=jn,uo.interpolateHsl=Rn,uo.interpolateLab=Fn,uo.interpolateRound=Nn,uo.transform=function(t){var e=fo.createElementNS(uo.ns.prefix.svg,"g");return(uo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Bn(r?r.matrix:ml)})(t)},Bn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};uo.interpolateTransform=Zn,uo.layout={},uo.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r0?i=t:(r.c=null,r.t=0/0,r=null,u.end({type:"end",alpha:i=0})):t>0&&(u.start({type:"start",alpha:i=t}),r=It(l.tick)),l):i},l.start=function(){function t(t,n){if(!r){for(r=new Array(i),l=0;l=0;)o.push(c=u[l]),c.parent=a,c.depth=a.depth+1;n&&(a.value=0),a.children=u}else n&&(a.value=+n.call(t,a,a.depth)||0),delete a.children;return li(i,function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)}),s}var e=hi,r=ui,n=ci;return t.sort=function(r){return arguments.length?(e=r,t):e},t.children=function(e){return arguments.length?(r=e,t):r},t.value=function(e){return arguments.length?(n=e,t):n},t.revalue=function(e){return n&&(si(e,function(t){t.children&&(t.value=0)}),li(e,function(e){var r;e.children||(e.value=+n.call(t,e,e.depth)||0),(r=e.parent)&&(r.value+=e.value)})),e},t},uo.layout.partition=function(){function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(n=e.value?n/e.value:0;++us&&(s=n),o.push(n)}for(r=0;r0)for(a=-1;++a=c[0]&&s<=c[1]&&(o=l[uo.bisect(h,s,1,d)-1],o.y+=p,o.push(t[a]));return l}var e=!0,r=Number,n=Mi,i=_i;return t.value=function(e){return arguments.length?(r=e,t):r},t.range=function(e){return arguments.length?(n=Et(e),t):n},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return wi(t,e)}:Et(e),t):i},t.frequency=function(r){return arguments.length?(e=!!r,t):e},t},uo.layout.pack=function(){function t(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],u=i[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,li(s,function(t){t.r=+c(t.value)}),li(s,Ei),n){var h=n*(e?1:Math.max(2*s.r/l,2*s.r/u))/2;li(s,function(t){t.r+=h}),li(s,Ei),li(s,function(t){t.r-=h})}return zi(s,l/2,u/2,e?1:1/Math.max(2*s.r/l,2*s.r/u)),o}var e,r=uo.layout.hierarchy().sort(ki),n=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(r){return arguments.length?(e=null==r||"function"==typeof r?r:+r,t):e},t.padding=function(e){return arguments.length?(n=+e,t):n},oi(t,r)},uo.layout.tree=function(){function t(t,i){var c=o.call(this,t,i),h=c[0],f=e(h);if(li(f,r),f.parent.m=-f.z,si(f,n),u)si(h,a);else{var d=h,p=h,m=h;si(h,function(t){t.xp.x&&(p=t),t.depth>m.depth&&(m=t)});var g=s(d,p)/2-d.x,v=l[0]/(p.x+s(p,d)/2+g),y=l[1]/(m.depth||1);si(h,function(t){t.x=(t.x+g)*v,t.y=t.depth*y})}return c}function e(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o0&&(ji(Fi(o,t,r),t,n),u+=n,c+=n),h+=o.m,u+=i.m,f+=l.m,c+=a.m;o&&!Oi(a)&&(a.t=o,a.m+=h-c),i&&!Pi(l)&&(l.t=i,l.m+=u-f,r=t)}return r}function a(t){t.x*=l[0],t.y=t.depth*l[1]}var o=uo.layout.hierarchy().sort(null).value(null),s=Ii,l=[1,1],u=null;return t.separation=function(e){return arguments.length?(s=e,t):s},t.size=function(e){return arguments.length?(u=null==(l=e)?a:null,t):u?null:l},t.nodeSize=function(e){return arguments.length?(u=null==(l=e)?null:a,t):u?l:null},oi(t,o)},uo.layout.cluster=function(){function t(t,a){var o,s=e.call(this,t,a),l=s[0],u=0;li(l,function(t){var e=t.children;e&&e.length?(t.x=Bi(e),t.y=Ni(e)):(t.x=o?u+=r(t,o):0,t.y=0,o=t)});var c=Ui(l),h=Vi(l),f=c.x-r(c,h)/2,d=h.x+r(h,c)/2;return li(l,i?function(t){t.x=(t.x-l.x)*n[0],t.y=(l.y-t.y)*n[1]}:function(t){t.x=(t.x-f)/(d-f)*n[0],t.y=(1-(l.y?t.y/l.y:1))*n[1]}),s}var e=uo.layout.hierarchy().sort(null).value(null),r=Ii,n=[1,1],i=!1;return t.separation=function(e){return arguments.length?(r=e,t):r},t.size=function(e){return arguments.length?(i=null==(n=e),t):i?null:n},t.nodeSize=function(e){return arguments.length?(i=null!=(n=e),t):i?n:null},oi(t,e)},uo.layout.treemap=function(){function t(t,e){for(var r,n,i=-1,a=t.length;++i0;)c.push(o=f[l-1]),c.area+=o.area,"squarify"!==d||(s=n(c,m))<=p?(f.pop(),p=s):(c.area-=c.pop().area,i(c,m,u,!1),m=Math.min(u.dx,u.dy),c.length=c.area=0,p=1/0);c.length&&(i(c,m,u,!0),c.length=c.area=0),a.forEach(e)}}function r(e){var n=e.children;if(n&&n.length){var a,o=h(e),s=n.slice(),l=[];for(t(s,o.dx*o.dy/e.value),l.area=0;a=s.pop();)l.push(a),l.area+=a.area,null!=a.z&&(i(l,a.z?o.dx:o.dy,o,!s.length),l.length=l.area=0);n.forEach(r)}}function n(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++oi&&(i=r));return n*=n,e*=e,n?Math.max(e*i*p/n,n/(e*a*p)):1/0}function i(t,e,r,n){var i,a=-1,o=t.length,s=r.x,u=r.y,c=e?l(t.area/e):0;if(e==r.dx){for((n||c>r.dy)&&(c=r.dy);++ar.dx)&&(c=r.dx);++a1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=uo.random.normal.apply(uo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=uo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;rh?0:1;if(u=Uo)return e(u,d)+(t?e(t,1-d):"")+"Z";var p,m,g,v,y,b,x,_,w,M,k,A,T=0,S=0,E=[];if((v=(+l.apply(this,arguments)||0)/2)&&(g=a===Cl?Math.sqrt(t*t+u*u):+a.apply(this,arguments),d||(S*=-1),u&&(S=nt(g/u*Math.sin(v))),t&&(T=nt(g/t*Math.sin(v)))),u){y=u*Math.cos(c+S),b=u*Math.sin(c+S),x=u*Math.cos(h-S),_=u*Math.sin(h-S);var L=Math.abs(h-c-2*S)<=No?0:1;if(S&&ba(y,b,x,_)===d^L){var C=(c+h)/2;y=u*Math.cos(C),b=u*Math.sin(C),x=_=null}}else y=b=0;if(t){w=t*Math.cos(h-T),M=t*Math.sin(h-T),k=t*Math.cos(c+T),A=t*Math.sin(c+T);var z=Math.abs(c-h+2*T)<=No?0:1;if(T&&ba(w,M,k,A)===1-d^z){var D=(c+h)/2;w=t*Math.cos(D),M=t*Math.sin(D),k=A=null}}else w=M=0;if(f>Ro&&(p=Math.min(Math.abs(u-t)/2,+i.apply(this,arguments)))>.001){m=tNo)+",1 "+e}function i(t,e,r,n){return"Q 0,0 "+n}var a=xr,o=_r,s=qa,l=ga,u=va;return t.radius=function(e){return arguments.length?(s=Et(e),t):s},t.source=function(e){return arguments.length?(a=Et(e),t):a},t.target=function(e){return arguments.length?(o=Et(e),t):o},t.startAngle=function(e){return arguments.length?(l=Et(e),t):l},t.endAngle=function(e){return arguments.length?(u=Et(e),t):u},t},uo.svg.diagonal=function(){function t(t,i){var a=e.call(this,t,i),o=r.call(this,t,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return l=l.map(n),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=xr,r=_r,n=Ga;return t.source=function(r){return arguments.length?(e=Et(r),t):e},t.target=function(e){return arguments.length?(r=Et(e),t):r},t.projection=function(e){return arguments.length?(n=e,t):n},t},uo.svg.diagonal.radial=function(){var t=uo.svg.diagonal(),e=Ga,r=t.projection;return t.projection=function(t){return arguments.length?r(Ya(e=t)):e},t},uo.svg.symbol=function(){function t(t,n){return(Ol.get(e.call(this,t,n))||Za)(r.call(this,t,n))}var e=Xa,r=Wa;return t.type=function(r){return arguments.length?(e=Et(r),t):e},t.size=function(e){return arguments.length?(r=Et(e),t):r},t};var Ol=uo.map({circle:Za,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Rl)),r=e*Rl;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/jl),r=e*jl/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/jl),r=e*jl/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});uo.svg.symbolTypes=Ol.keys();var jl=Math.sqrt(3),Rl=Math.tan(30*Ho);Lo.transition=function(t){for(var e,r,n=Fl||++Vl,i=to(t),a=[],o=Nl||{time:Date.now(),ease:En,delay:0,duration:250},s=-1,l=this.length;++srect,.s>rect").attr("width",h[1]-h[0])}function i(t){t.select(".extent").attr("y",f[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function a(){function a(){32==uo.event.keyCode&&(L||(b=null,z[0]-=h[1],z[1]-=f[1],L=2),T())}function m(){32==uo.event.keyCode&&2==L&&(z[0]+=h[1],z[1]+=f[1],L=0,T())}function g(){var t=uo.mouse(_),n=!1;x&&(t[0]+=x[0],t[1]+=x[1]),L||(uo.event.altKey?(b||(b=[(h[0]+h[1])/2,(f[0]+f[1])/2]),z[0]=h[+(t[0]=2)return!1;t[r]=n}return!0}):w.filter(function(t){for(var e=0;e<=o;++e){var r=y[t[e]];if(r<0)return!1;t[e]=r}return!0}),1&o)for(var h=0;h>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t("buffer").Buffer)},{buffer:70}],110:[function(t,e,r){"use strict";function n(t,e,r){var i=0|t[r];if(i<=0)return[];var a,o=new Array(i);if(r===t.length-1)for(a=0;a0)return i(0|t,e);break;case"object":if("number"==typeof t.length)return n(t,e,0)}return[]}e.exports=a},{}],111:[function(t,e,r){"use strict";function n(t,e,r){r=r||2;var n=e&&e.length,a=n?e[0]*r:t.length,s=i(t,0,a,r,!0),l=[];if(!s)return l;var u,c,f,d,p,m,g;if(n&&(s=h(t,e,s,r)),t.length>80*r){u=f=t[0],c=d=t[1];for(var v=r;vf&&(f=p),m>d&&(d=m);g=Math.max(f-u,d-c)}return o(s,l,r,u,c,g),l}function i(t,e,r,n,i){var a,o;if(i===z(t,e,r,n)>0)for(a=e;a=e;a-=n)o=E(a,t[a],t[a+1],o);return o&&w(o,o.next)&&(L(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!w(n,n.next)&&0!==_(n.prev,n,n.next))n=n.next;else{if(L(n),(n=e=n.prev)===n.next)return null;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,h,f){if(t){!f&&h&&m(t,n,i,h);for(var d,p,g=t;t.prev!==t.next;)if(d=t.prev,p=t.next,h?l(t,n,i,h):s(t))e.push(d.i/r),e.push(t.i/r),e.push(p.i/r),L(t),t=p.next,g=p.next;else if((t=p)===g){f?1===f?(t=u(t,e,r),o(t,e,r,n,i,h,2)):2===f&&c(t,e,r,n,i,h):o(a(t),e,r,n,i,h,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(_(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(b(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&_(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(_(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,h=v(s,l,e,r,n),f=v(u,c,e,r,n),d=t.nextZ;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&b(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&b(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function u(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!w(i,a)&&M(i,n,n.next,a)&&A(i,a)&&A(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),L(n),L(n.next),n=t=a),n=n.next}while(n!==t);return n}function c(t,e,r,n,i,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&x(l,u)){var c=S(l,u);return l=a(l,l.next),c=a(c,c.next),o(l,e,r,n,i,s),void o(c,e,r,n,i,s)}u=u.next}l=l.next}while(l!==t)}function h(t,e,r,n){var o,s,l,u,c,h=[];for(o=0,s=e.length;o=n.next.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&b(ar.x)&&A(n,t)&&(r=n,f=l),n=n.next;return r}function m(t,e,r,n){var i=t;do{null===i.z&&(i.z=v(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(t){var e,r,n,i,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0===s?(i=n,n=n.nextZ,l--):0!==l&&n?r.z<=n.z?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,s--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return t}function v(t,e,r,n,i){return t=32767*(t-r)/i,e=32767*(e-n)/i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function y(t){var e=t,r=t;do{e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function x(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!k(t,e)&&A(t,e)&&A(e,t)&&T(t,e)}function _(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function M(t,e,r,n){return!!(w(t,e)&&w(r,n)||w(t,n)&&w(r,e))||_(t,e,r)>0!=_(t,e,n)>0&&_(r,n,t)>0!=_(r,n,e)>0}function k(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&M(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function A(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function T(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}function S(t,e){var r=new C(t.i,t.x,t.y),n=new C(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function E(t,e,r,n){var i=new C(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function L(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function C(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function z(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],112:[function(t,e,r){"use strict";function n(t,e){var r=t.length;if("number"!=typeof e){e=0;for(var n=0;n0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,a,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],a=r.length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},{}],115:[function(t,e,r){"use strict";function n(t,e,r){var n=e||0,i=r||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[i*t[12]-t[8],i*t[13]-t[9],i*t[14]-t[10],i*t[15]-t[11]]]}e.exports=n},{}],116:[function(t,e,r){"use strict";function n(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}e.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0===(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},{}],117:[function(t,e,r){"use strict";function n(t){return new Function("f","var p = (f && f.properties || {}); return "+i(t))}function i(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?o(t[1],t[2],"===",!1):"!="===e?o(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?o(t[1],t[2],e,!0):"any"===e?s(t.slice(1),"||"):"all"===e?s(t.slice(1),"&&"):"none"===e?c(s(t.slice(1),"||")):"in"===e?l(t[1],t.slice(2)):"!in"===e?c(l(t[1],t.slice(2))):"has"===e?u(t[1]):"!has"===e?c(u([t[1]])):"true")+")"}function a(t){return"$type"===t?"f.type":"$id"===t?"f.id":"p["+JSON.stringify(t)+"]"}function o(t,e,r,n){var i=a(t),o="$type"===t?f.indexOf(e):JSON.stringify(e);return(n?"typeof "+i+"=== typeof "+o+"&&":"")+i+r+o}function s(t,e){return t.map(i).join(e)}function l(t,e){"$type"===t&&(e=e.map(function(t){return f.indexOf(t)}));var r=JSON.stringify(e.sort(h)),n=a(t);return e.length<=200?r+".indexOf("+n+") !== -1":"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }("+n+", "+r+",0,"+(e.length-1)+")"}function u(t){return JSON.stringify(t)+" in p"}function c(t){return"!("+t+")"}function h(t,e){return te?1:0}e.exports=n;var f=["Unknown","Point","LineString","Polygon"]},{}],118:[function(t,e,r){"use strict";function n(t,e,r){return Math.min(e,Math.max(t,r))}function i(t,e,r){this.dimension=t.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n=r-1)for(var f=o.length-1,p=t-e[r-1],d=0;d=r-1)for(var c=a.length-1,h=(e[r-1],0);h=0;--r)if(t[--e])return!1;return!0},u.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--h)i.push(n(l[h-1],u[h-1],arguments[h])),a.push(0)}},u.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var f=r;f>0;--f){var d=n(u[f-1],c[f-1],arguments[f]);i.push(d),a.push((d-i[o++])*h)}}},u.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(n(o[l-1],s[l-1],arguments[l])),i.push(0)}},u.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var i=this._state,a=this._velocity,o=i.length-this.dimension,s=this.bounds,l=s[0],u=s[1],c=t-e,h=c>1e-6?1/c:0;this._time.push(t);for(var f=r;f>0;--f){var d=arguments[f];i.push(n(l[f-1],u[f-1],i[o++]+d)),a.push(d*h)}}},u.idle=function(t){var e=this.lastT();if(!(t=0;--h)i.push(n(l[h],u[h],i[o]+c*a[o])),a.push(0),o+=1}}},{"binary-search-bounds":59,"cubic-hermite":102}],119:[function(t,e,r){"use strict";function n(t){t=t||{};var e,r,n=t.canvas||document.createElement("canvas"),a=t.family||"monospace",o=t.shape||[512,512],s=t.step||[32,32],l=t.size||16,u=t.chars||[32,126],c=Math.floor((s[0]-l)/2),h=t.radius||1.5*c,f=new i(l,c,h,0,a);if("number"==typeof l&&(l+="px"),Array.isArray(u)){if(2===u.length&&"number"==typeof u[0]&&"number"==typeof u[1]){var d=[];for(e=u[0],r=0;e<=u[1];e++)d[r++]=String.fromCharCode(e);u=d}}else u=String(u).split("");o=o.slice(),n.width=o[0],n.height=o[1];var p=n.getContext("2d");p.fillStyle="#000",p.fillRect(0,0,n.width,n.height),p.font=l+" "+a,p.textBaseline="middle";var m=0,g=0,v=Math.min(u.length,Math.floor(o[0]/s[0])*Math.ceil(o[1]/s[1])),y=f.ctx.textAlign,b=f.buffer;for(f.ctx.textAlign="center",f.buffer=f.size/2,e=0;eo[0]-s[0]&&(m=0,g+=s[1])}return f.ctx.textAlign=y,f.buffer=b,n}var i=t("tiny-sdf");e.exports=n},{"tiny-sdf":513}],120:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function i(t){return new n(t._color,t.key,t.value,t.left,t.right,t._count)}function a(t,e){return new n(t,e.key,e.value,e.left,e.right,e._count)}function o(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function s(t,e){this._compare=t,this.root=e}function l(t,e){if(e.left){var r=l(t,e.left);if(r)return r}var r=t(e.key,e.value);return r||(e.right?l(t,e.right):void 0)}function u(t,e,r,n){if(e(t,n.key)<=0){if(n.left){var i=u(t,e,r,n.left);if(i)return i}var i=r(n.key,n.value);if(i)return i}if(n.right)return u(t,e,r,n.right)}function c(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=c(t,e,r,n,i.left)))return a;if(s>0&&(a=n(i.key,i.value)))return a}if(s>0&&i.right)return c(t,e,r,n,i.right)}function h(t,e){this.tree=t,this._stack=e}function f(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t){for(var e,r,n,s,l=t.length-1;l>=0;--l){if(e=t[l],0===l)return void(e._color=v);if(r=t[l-1],r.left===e){if(n=r.right,n.right&&n.right._color===g){if(n=r.right=i(n),s=n.right=i(n.right),r.right=n.left,n.left=r,n.right=s,n._color=r._color,e._color=v,r._color=v,s._color=v,o(r),o(n),l>1){var u=t[l-2];u.left===r?u.left=n:u.right=n}return void(t[l-1]=n)}if(n.left&&n.left._color===g){if(n=r.right=i(n),s=n.left=i(n.left),r.right=s.left,n.left=s.right,s.left=r,s.right=n,s._color=r._color,r._color=v,n._color=v,e._color=v,o(r),o(n),o(s),l>1){var u=t[l-2];u.left===r?u.left=s:u.right=s}return void(t[l-1]=s)}if(n._color===v){if(r._color===g)return r._color=v,void(r.right=a(g,n));r.right=a(g,n);continue}if(n=i(n),r.right=n.left,n.left=r,n._color=r._color,r._color=g,o(r),o(n),l>1){var u=t[l-2];u.left===r?u.left=n:u.right=n}t[l-1]=n,t[l]=r,l+11){var u=t[l-2];u.right===r?u.right=n:u.left=n}return void(t[l-1]=n)}if(n.right&&n.right._color===g){if(n=r.left=i(n),s=n.right=i(n.right),r.left=s.right,n.right=s.left,s.right=r,s.left=n,s._color=r._color,r._color=v,n._color=v,e._color=v,o(r),o(n),o(s),l>1){var u=t[l-2];u.right===r?u.right=s:u.left=s}return void(t[l-1]=s)}if(n._color===v){if(r._color===g)return r._color=v,void(r.left=a(g,n));r.left=a(g,n);continue}if(n=i(n),r.left=n.right,n.right=r,n._color=r._color,r._color=g,o(r),o(n),l>1){var u=t[l-2];u.right===r?u.right=n:u.left=n}t[l-1]=n,t[l]=r,l+1e?1:0}function m(t){return new s(t||p,null)}e.exports=m;var g=0,v=1,y=s.prototype;Object.defineProperty(y,"keys",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(y,"values",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(y,"length",{get:function(){return this.root?this.root._count:0}}),y.insert=function(t,e){for(var r=this._compare,i=this.root,l=[],u=[];i;){var c=r(t,i.key);l.push(i),u.push(c),i=c<=0?i.left:i.right}l.push(new n(g,t,e,null,null,1));for(var h=l.length-2;h>=0;--h){var i=l[h];u[h]<=0?l[h]=new n(i._color,i.key,i.value,l[h+1],i.right,i._count+1):l[h]=new n(i._color,i.key,i.value,i.left,l[h+1],i._count+1)}for(var h=l.length-1;h>1;--h){var f=l[h-1],i=l[h];if(f._color===v||i._color===v)break;var d=l[h-2];if(d.left===f)if(f.left===i){var p=d.right;if(!p||p._color!==g){if(d._color=g,d.left=f.right,f._color=v,f.right=d,l[h-2]=f,l[h-1]=i,o(d),o(f),h>=3){var m=l[h-3];m.left===d?m.left=f:m.right=f}break}f._color=v,d.right=a(v,p),d._color=g,h-=1}else{var p=d.right;if(!p||p._color!==g){if(f.right=i.left,d._color=g,d.left=i.right,i._color=v,i.left=f,i.right=d,l[h-2]=i,l[h-1]=f,o(d),o(f),o(i),h>=3){var m=l[h-3];m.left===d?m.left=i:m.right=i}break}f._color=v,d.right=a(v,p),d._color=g,h-=1}else if(f.right===i){var p=d.left;if(!p||p._color!==g){if(d._color=g,d.right=f.left,f._color=v,f.left=d,l[h-2]=f,l[h-1]=i,o(d),o(f),h>=3){var m=l[h-3];m.right===d?m.right=f:m.left=f}break}f._color=v,d.left=a(v,p),d._color=g,h-=1}else{var p=d.left;if(!p||p._color!==g){if(f.left=i.right,d._color=g,d.right=i.left,i._color=v,i.right=f,i.left=d,l[h-2]=i,l[h-1]=f,o(d),o(f),o(i),h>=3){var m=l[h-3];m.right===d?m.right=i:m.left=i}break}f._color=v,d.left=a(v,p),d._color=g,h-=1}}return l[0]._color=v,new s(r,l[0])},y.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return l(t,this.root);case 2:return u(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return c(e,r,this._compare,t,this.root)}},Object.defineProperty(y,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(y,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),y.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new h(this,[])},y.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},y.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},y.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},y.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key) -;n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},y.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new h(this,n);r=i<=0?r.left:r.right}return new h(this,[])},y.remove=function(t){var e=this.find(t);return e?e.remove():this},y.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var b=h.prototype;Object.defineProperty(b,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(b,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),b.clone=function(){return new h(this.tree,this._stack.slice())},b.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new n(r._color,r.key,r.value,r.left,r.right,r._count);for(var i=t.length-2;i>=0;--i){var r=t[i];r.left===t[i+1]?e[i]=new n(r._color,r.key,r.value,e[i+1],r.right,r._count):e[i]=new n(r._color,r.key,r.value,r.left,e[i+1],r._count)}if(r=e[e.length-1],r.left&&r.right){var a=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var o=e[a-1];e.push(new n(r._color,o.key,o.value,r.left,r.right,r._count)),e[a-1].key=r.key,e[a-1].value=r.value;for(var i=e.length-2;i>=a;--i)r=e[i],e[i]=new n(r._color,r.key,r.value,r.left,e[i+1],r._count);e[a-1].left=e[a]}if(r=e[e.length-1],r._color===g){var l=e[e.length-2];l.left===r?l.left=null:l.right===r&&(l.right=null),e.pop();for(var i=0;i0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(b,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(b,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),b.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(b,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),b.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var r=new Array(e.length),i=e[e.length-1];r[r.length-1]=new n(i._color,i.key,t,i.left,i.right,i._count);for(var a=e.length-2;a>=0;--a)i=e[a],i.left===e[a+1]?r[a]=new n(i._color,i.key,i.value,r[a+1],i.right,i._count):r[a]=new n(i._color,i.key,i.value,i.left,r[a+1],i._count);return new s(this.tree._compare,r[0])},b.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(b,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],121:[function(t,e,r){function n(t){if(t<0)return Number("0/0");for(var e=o[0],r=o.length-1;r>0;--r)e+=o[r]/(t+r);var n=t+a+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}var i=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],a=607/128,o=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(n(e));e-=1;for(var r=i[0],a=1;a<9;a++)r+=i[a]/(e+a);var o=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(o,e+.5)*Math.exp(-o)*r},e.exports.log=n},{}],122:[function(t,e,r){function n(t){if("Polygon"===t.type)return i(t.coordinates);if("MultiPolygon"===t.type){for(var e=0,r=0;r0){e+=Math.abs(a(t[0]));for(var r=1;r2){for(var r,n,i=0;i=0}var u=t("geojson-area");e.exports=n},{"geojson-area":122}],124:[function(t,e,r){"use strict";function n(t,e,r,n,o,l,u,c){if(r/=e,n/=e,u>=r&&c<=n)return t;if(u>n||c=r&&p<=n)h.push(m);else if(!(d>n||p=e&&s<=r&&i.push(o)}return i}function a(t,e,r,n,i,a){for(var s=[],l=0;lr?(x.push(i(u,p,e),i(u,p,r)),a||(x=o(s,x,g,v,y))):d>=e&&x.push(i(u,p,e)):f>r?dr&&(x.push(i(u,p,r)),a||(x=o(s,x,g,v,y))));u=m[b-1],f=u[n],f>=e&&f<=r&&x.push(u),h=x[x.length-1],a&&h&&(x[0][0]!==h[0]||x[0][1]!==h[1])&&x.push(x[0]),o(s,x,g,v,y)}return s}function o(t,e,r,n,i){return e.length&&(e.area=r,e.dist=n,void 0!==i&&(e.outer=i),t.push(e)),[]}e.exports=n;var s=t("./feature")},{"./feature":126}],125:[function(t,e,r){"use strict";function n(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n1?1:n,[r,n,0]}function s(t){for(var e,r,n=0,i=0,a=0;a1)return!1;var a=i.geometry[0].length;if(5!==a)return!1;for(var o=0;o1&&console.time("creation"),b=this.tiles[y]=p(t,v,r,n,x,e===d.maxZoom),this.tileCoords.push({z:e,x:r,y:n}),m)){m>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,n,b.numFeatures,b.numPoints,b.numSimplified),console.timeEnd("creation"));var _="z"+e;this.stats[_]=(this.stats[_]||0)+1,this.total++}if(b.source=t,i){if(e===d.maxZoom||e===i)continue;var w=1<1&&console.time("clipping");var M,k,A,T,S,E,L=.5*d.buffer/d.extent,C=.5-L,z=.5+L,D=1+L;M=k=A=T=null,S=f(t,v,r-L,r+z,0,o,b.min[0],b.max[0]),E=f(t,v,r+C,r+D,0,o,b.min[0],b.max[0]),S&&(M=f(S,v,n-L,n+z,1,s,b.min[1],b.max[1]),k=f(S,v,n+C,n+D,1,s,b.min[1],b.max[1])),E&&(A=f(E,v,n-L,n+z,1,s,b.min[1],b.max[1]),T=f(E,v,n+C,n+D,1,s,b.min[1],b.max[1])),m>1&&console.timeEnd("clipping"),t.length&&(h.push(M||[],e+1,2*r,2*n),h.push(k||[],e+1,2*r,2*n+1),h.push(A||[],e+1,2*r+1,2*n),h.push(T||[],e+1,2*r+1,2*n+1))}else i&&(g=e)}return g},i.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,o=n.debug,s=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var c,f=t,d=e,p=r;!c&&f>0;)f--,d=Math.floor(d/2),p=Math.floor(p/2),c=this.tiles[a(f,d,p)];if(!c||!c.source)return null;if(o>1&&console.log("found parent tile z%d-%d-%d",f,d,p),u(c,i,n.buffer))return h.tile(c,i);o>1&&console.time("drilling down");var m=this.splitTile(c.source,f,d,p,t,e,r);if(o>1&&console.timeEnd("drilling down"),null!==m){var g=1<n&&(o=r,n=a);n>s?(t[o][2]=n,h.push(u),h.push(o),u=o):(c=h.pop(),u=h.pop())}}function i(t,e,r){var n=e[0],i=e[1],a=r[0],o=r[1],s=t[0],l=t[1],u=a-n,c=o-i;if(0!==u||0!==c){var h=((s-n)*u+(l-i)*c)/(u*u+c*c);h>1?(n=a,i=o):h>0&&(n+=u*h,i+=c*h)}return u=s-n,c=l-i,u*u+c*c}e.exports=n},{}],129:[function(t,e,r){"use strict";function n(t,e,r,n,a,o){for(var s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z2:e,transformed:!1,min:[2,1],max:[-1,0]},l=0;ls.max[0]&&(s.max[0]=c[0]),c[1]>s.max[1]&&(s.max[1]=c[1])}return s}function i(t,e,r,n){var i,o,s,l,u=e.geometry,c=e.type,h=[],f=r*r;if(1===c)for(i=0;if)&&(d.push(l),t.numSimplified++),t.numPoints++;3===c&&a(d,s.outer),h.push(d)}else t.numPoints+=s.length;if(h.length){var p={geometry:h,type:c,tags:e.tags||null};null!==e.id&&(p.id=e.id),t.features.push(p)}}function a(t,e){o(t)<0===e&&t.reverse()}function o(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i0?(d[c]=-1,p[c]=0):(d[c]=0,p[c]=1)}}function s(t,e){var r=new i(t);return r.update(e),r}e.exports=s;var l=t("./lib/text.js"),u=t("./lib/lines.js"),c=t("./lib/background.js"),h=t("./lib/cube.js"),f=t("./lib/ticks.js"),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=i.prototype;p.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,n=e.bind(this,!1,Number),i=e.bind(this,!1,Boolean),a=e.bind(this,!1,String),o=e.bind(this,!0,function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]}),s=!1,c=!1;if("bounds"in t)for(var h=t.bounds,d=0;d<2;++d)for(var p=0;p<3;++p)h[d][p]!==this.bounds[d][p]&&(c=!0),this.bounds[d][p]=h[d][p];if("ticks"in t){r=t.ticks,s=!0,this.autoTicks=!1;for(var d=0;d<3;++d)this.tickSpacing[d]=0}else n("tickSpacing")&&(this.autoTicks=!0,c=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),c=!0,s=!0,this._firstInit=!1),c&&this.autoTicks&&(r=f.create(this.bounds,this.tickSpacing),s=!0),s){for(var d=0;d<3;++d)r[d].sort(function(t,e){return t.x-e.x});f.equal(r,this.ticks)?s=!1:this.ticks=r}i("tickEnable"),a("tickFont")&&(s=!0),n("tickSize"),n("tickAngle"),n("tickPad"),o("tickColor");var m=a("labels");a("labelFont")&&(m=!0),i("labelEnable"),n("labelSize"),n("labelPad"),o("labelColor"),i("lineEnable"),i("lineMirror"),n("lineWidth"),o("lineColor"),i("lineTickEnable"),i("lineTickMirror"),n("lineTickLength"),n("lineTickWidth"),o("lineTickColor"),i("gridEnable"),n("gridWidth"),o("gridColor"),i("zeroEnable"),o("zeroLineColor"),n("zeroLineWidth"),i("backgroundEnable"),o("backgroundColor"),this._text?this._text&&(m||s)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=l(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&s&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};var m=[new a,new a,new a],g=[0,0,0],v={model:d,view:d,projection:d};p.isOpaque=function(){return!0},p.isTransparent=function(){return!1},p.drawTransparent=function(t){};var y=[0,0,0],b=[0,0,0],x=[0,0,0];p.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||d,i=t.view||d,a=t.projection||d,s=this.bounds,l=h(r,i,a,s),u=l.cubeEdges,c=l.axis,f=i[12],p=i[13],_=i[14],w=i[15],M=this.pixelRatio*(a[3]*f+a[7]*p+a[11]*_+a[15]*w)/e.drawingBufferHeight,k=0;k<3;++k)this.lastCubeProps.cubeEdges[k]=u[k],this.lastCubeProps.axis[k]=c[k];for(var A=m,k=0;k<3;++k)o(m[k],k,this.bounds,u,c);for(var e=this.gl,T=g,k=0;k<3;++k)this.backgroundEnable[k]?T[k]=c[k]:T[k]=0;this._background.draw(r,i,a,s,T,this.backgroundColor),this._lines.bind(r,i,a,this);for(var k=0;k<3;++k){var S=[0,0,0];c[k]>0?S[k]=s[1][k]:S[k]=s[0][k];for(var E=0;E<2;++E){var L=(k+1+E)%3,C=(k+1+(1^E))%3;this.gridEnable[L]&&this._lines.drawGrid(L,C,this.bounds,S,this.gridColor[L],this.gridWidth[L]*this.pixelRatio)}for(var E=0;E<2;++E){var L=(k+1+E)%3,C=(k+1+(1^E))%3;this.zeroEnable[C]&&s[0][C]<=0&&s[1][C]>=0&&this._lines.drawZero(L,C,this.bounds,S,this.zeroLineColor[C],this.zeroLineWidth[C]*this.pixelRatio)}}for(var k=0;k<3;++k){this.lineEnable[k]&&this._lines.drawAxisLine(k,this.bounds,A[k].primalOffset,this.lineColor[k],this.lineWidth[k]*this.pixelRatio),this.lineMirror[k]&&this._lines.drawAxisLine(k,this.bounds,A[k].mirrorOffset,this.lineColor[k],this.lineWidth[k]*this.pixelRatio);for(var z=n(y,A[k].primalMinor),D=n(b,A[k].mirrorMinor),I=this.lineTickLength,E=0;E<3;++E){var P=M/r[5*E];z[E]*=I[E]*P,D[E]*=I[E]*P}this.lineTickEnable[k]&&this._lines.drawAxisTicks(k,A[k].primalOffset,z,this.lineTickColor[k],this.lineTickWidth[k]*this.pixelRatio),this.lineTickMirror[k]&&this._lines.drawAxisTicks(k,A[k].mirrorOffset,D,this.lineTickColor[k],this.lineTickWidth[k]*this.pixelRatio)}this._text.bind(r,i,a,this.pixelRatio);for(var k=0;k<3;++k){for(var O=A[k].primalMinor,j=n(x,A[k].primalOffset),E=0;E<3;++E)this.lineTickEnable[k]&&(j[E]+=M*O[E]*Math.max(this.lineTickLength[E],0)/r[5*E]);if(this.tickEnable[k]){for(var E=0;E<3;++E)j[E]+=M*O[E]*this.tickPad[E]/r[5*E];this._text.drawTicks(k,this.tickSize[k],this.tickAngle[k],j,this.tickColor[k])}if(this.labelEnable[k]){for(var E=0;E<3;++E)j[E]+=M*O[E]*this.labelPad[E]/r[5*E];j[k]+=.5*(s[0][k]+s[1][k]),this._text.drawLabel(k,this.labelSize[k],this.labelAngle[k],j,this.labelColor[k])}}},p.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":134,"./lib/cube.js":135,"./lib/lines.js":136,"./lib/text.js":138,"./lib/ticks.js":139}],134:[function(t,e,r){"use strict";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}function i(t){for(var e=[],r=[],i=0,l=0;l<3;++l)for(var u=(l+1)%3,c=(l+2)%3,h=[0,0,0],f=[0,0,0],d=-1;d<=1;d+=2){r.push(i,i+2,i+1,i+1,i+2,i+3),h[l]=d,f[l]=d;for(var p=-1;p<=1;p+=2){h[u]=p;for(var m=-1;m<=1;m+=2)h[c]=m,e.push(h[0],h[1],h[2],f[0],f[1],f[2]),i+=1}var g=u;u=c,c=g}var v=a(t,new Float32Array(e)),y=a(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),b=o(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],y),x=s(t);return x.attributes.position.location=0,x.attributes.normal.location=1,new n(t,v,b,x)}e.exports=i;var a=t("gl-buffer"),o=t("gl-vao"),s=t("./shaders").bg,l=n.prototype;l.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),l.disable(l.POLYGON_OFFSET_FILL)}},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":137,"gl-buffer":141,"gl-vao":255}],135:[function(t,e,r){"use strict";function n(t,e,r){for(var n=0;n<4;++n){t[n]=r[12+n];for(var i=0;i<3;++i)t[n]+=e[i]*r[4*i+n]}}function i(t){for(var e=0;eS&&(_|=1<S&&(_|=1<f[m][1]&&(O=m));for(var j=-1,m=0;m<3;++m){var R=O^1<f[F][0]&&(F=R)}}var N=g;N[0]=N[1]=N[2]=0,N[o.log2(j^O)]=O&j,N[o.log2(O^F)]=O&F;var B=7^F;B===_||B===P?(B=7^j,N[o.log2(F^B)]=B&F):N[o.log2(j^B)]=B&j;for(var U=v,V=_,k=0;k<3;++k)U[k]=V&1< 0.0) {\n vec3 nPosition = mix(bounds[0], bounds[1], 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n colorChannel = abs(normal);\n}","precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] + \n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}",null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":239}],138:[function(t,e,r){(function(r){"use strict";function n(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}function i(t,e){try{return l(t,e)}catch(t){return console.warn("error vectorizing text:",t),{cells:[],positions:[]}}}function a(t,e,r,i,a,l){var c=o(t),h=s(t,[{buffer:c,size:3}]),f=u(t);f.attributes.position.location=0;var d=new n(t,f,c,h);return d.update(e,r,i,a,l),d}e.exports=a;var o=t("gl-buffer"),s=t("gl-vao"),l=t("vectorize-text"),u=t("./shaders").text,c=window||r.global||{},h=c.__TEXT_CACHE||{};c.__TEXT_CACHE={};var f=n.prototype,d=[0,0];f.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},f.update=function(t,e,r,n,a){function o(t,e,r,n){ -var a=h[r];a||(a=h[r]={});var o=a[e];o||(o=a[e]=i(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle"}));for(var l=(n||12)/12,u=o.positions,c=o.cells,f=0,d=c.length;f=0;--m){var g=u[p[m]];s.push(l*g[0],-l*g[1],t)}}for(var s=(this.gl,[]),l=[0,0,0],u=[0,0,0],c=[0,0,0],f=[0,0,0],d=0;d<3;++d){c[d]=s.length/3|0,o(.5*(t[0][d]+t[1][d]),e[d],r),f[d]=(s.length/3|0)-c[d],l[d]=s.length/3|0;for(var p=0;p=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,u=o%a;o<0?(l=0|-Math.ceil(l),u=0|-u):(l=0|Math.floor(l),u|=0);var c=""+l;if(o<0&&(c="-"+c),i){for(var h=""+u;h.length=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r}function a(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function a(t,e){for(var r=l.malloc(t.length,e),n=t.length,i=0;i=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}function s(t,e,r,i){if(r=r||t.ARRAY_BUFFER,i=i||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(i!==t.DYNAMIC_DRAW&&i!==t.STATIC_DRAW&&i!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var a=t.createBuffer(),o=new n(t,r,a,0,i);return o.update(e),o}var l=t("typedarray-pool"),u=t("ndarray-ops"),c=t("ndarray"),h=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"],f=n.prototype;f.bind=function(){this.gl.bindBuffer(this.type,this.handle)},f.unbind=function(){this.gl.bindBuffer(this.type,null)},f.dispose=function(){this.gl.deleteBuffer(this.handle)},f.update=function(t,e){if("number"!=typeof e&&(e=-1),this.bind(),"object"==typeof t&&void 0!==t.shape){var r=t.dtype;if(h.indexOf(r)<0&&(r="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){r=gl.getExtension("OES_element_index_uint")&&"uint16"!==r?"uint32":"uint16"}if(r===t.dtype&&o(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=i(this.gl,this.type,this.length,this.usage,t.data,e):this.length=i(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var n=l.malloc(t.size,r),s=c(n,t.shape);u.assign(s,t),this.length=e<0?i(this.gl,this.type,this.length,this.usage,n,e):i(this.gl,this.type,this.length,this.usage,n.subarray(0,t.size),e),l.free(n)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?a(t,"uint16"):a(t,"float32"),this.length=e<0?i(this.gl,this.type,this.length,this.usage,f,e):i(this.gl,this.type,this.length,this.usage,f.subarray(0,t.length),e),l.free(f)}else if("object"==typeof t&&"number"==typeof t.length)this.length=i(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");t|=0,t<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=s},{ndarray:449,"ndarray-ops":443,"typedarray-pool":521}],142:[function(t,e,r){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],143:[function(t,e,r){var n=t("./1.0/numbers");e.exports=function(t){return n[t]}},{"./1.0/numbers":142}],144:[function(t,e,r){"use strict";function n(t,e,r,n){this.plot=t,this.shader=e,this.bufferHi=r,this.bufferLo=n,this.bounds=[1/0,1/0,-1/0,-1/0],this.numPoints=0,this.color=[0,0,0,1]}function i(t,e){var r=a(t.gl,l.vertex,l.fragment),i=o(t.gl),s=o(t.gl),u=new n(t,r,i,s);return u.update(e),t.addObject(u),u}var a=t("gl-shader"),o=t("gl-buffer"),s=t("typedarray-pool"),l=t("./lib/shaders");e.exports=i;var u=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]],c=n.prototype;c.draw=function(){var t=new Float32Array([0,0]),e=new Float32Array([0,0]),r=new Float32Array([0,0]),n=new Float32Array([0,0]),i=[1,1];return function(){var a=this.plot,o=this.shader,s=this.bounds,l=this.numPoints;if(l){var c=a.gl,h=a.dataBox,f=a.viewBox,d=a.pixelRatio,p=s[2]-s[0],m=s[3]-s[1],g=h[2]-h[0],v=h[3]-h[1],y=2*p/g,b=2*m/v,x=(s[0]-h[0]-.5*g)/p,_=(s[1]-h[1]-.5*v)/m;t[0]=y,t[1]=b,e[0]=y-t[0],e[1]=b-t[1],r[0]=x,r[1]=_,n[0]=x-r[0],n[1]=_-r[1];var w=f[2]-f[0],M=f[3]-f[1];i[0]=2*d/w,i[1]=2*d/M,o.bind(),o.uniforms.scaleHi=t,o.uniforms.scaleLo=e,o.uniforms.translateHi=r,o.uniforms.translateLo=n,o.uniforms.pixelScale=i,o.uniforms.color=this.color,this.bufferLo.bind(),o.attributes.positionLo.pointer(c.FLOAT,!1,16,0),this.bufferHi.bind(),o.attributes.positionHi.pointer(c.FLOAT,!1,16,0),o.attributes.pixelOffset.pointer(c.FLOAT,!1,16,8),c.drawArrays(c.TRIANGLES,0,l*u.length)}}}(),c.drawPick=function(t){return t},c.pick=function(){return null},c.update=function(t){t=t||{};var e,r,n,i=t.positions||[],a=t.errors||[],o=1;"lineWidth"in t&&(o=+t.lineWidth);var l=5;"capSize"in t&&(l=+t.capSize),this.color=(t.color||[0,0,0,1]).slice();var c=this.bounds=[1/0,1/0,-1/0,-1/0],h=this.numPoints=i.length>>1;for(e=0;e0&&(T*=_),S<0?S*=w:S>0&&(S*=M),g[b++]=f*(r-p+T),g[b++]=d*(n-m+S),g[b++]=o*A[2]+(l+o)*A[4],g[b++]=o*A[3]+(l+o)*A[5]}}for(e=0;e=1},h.isTransparent=function(){return this.opacity<1},h.drawTransparent=h.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||c,i=r.projection=t.projection||c;r.model=t.model||c,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],o=n[13],s=n[14],l=n[15],u=this.pixelRatio*(i[3]*a+i[7]*o+i[11]*s+i[15]*l)/e.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)e.lineWidth(this.lineWidth[h]),r.capSize=this.capSize[h]*u,e.drawArrays(e.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var f=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=(n+e)%3,o=[0,0,0];o[a]=i,r.push(o)}t[e]=r}return t}();h.update=function(t){t=t||{},"lineWidth"in t&&(this.lineWidth=t.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in t&&(this.capSize=t.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),"opacity"in t&&(this.opacity=t.opacity);var e=t.color||[[0,0,0],[0,0,0],[0,0,0]],r=t.position,n=t.error;if(Array.isArray(e[0])||(e=[e,e,e]),r&&n){var o=[],s=r.length,l=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var u=0;u<3;++u){this.lineOffset[u]=l;t:for(var c=0;c0){var m=h.slice();m[u]+=d[1][u],o.push(h[0],h[1],h[2],p[0],p[1],p[2],p[3],0,0,0,m[0],m[1],m[2],p[0],p[1],p[2],p[3],0,0,0),i(this.bounds,m),l+=2+a(o,m,p,u)}}}this.lineCount[u]=l-this.lineOffset[u]}this.buffer.update(o)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":147,"gl-buffer":141,"gl-vao":255}],147:[function(t,e,r){"use strict";var n=t("gl-shader");e.exports=function(t){return n(t,"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}","precision mediump float;\n#define GLSLIFY 1\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if(any(lessThan(fragPosition, clipBounds[0])) || any(greaterThan(fragPosition, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = opacity * fragColor;\n}",null,[{name:"position",type:"vec3"},{name:"offset",type:"vec3"},{name:"color",type:"vec4"}])}},{"gl-shader":239}],148:[function(t,e,r){"use strict";function n(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function i(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function a(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);y=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;a1&&f.drawBuffersWEBGL(y[h]);var v=r.getExtension("WEBGL_depth_texture");v?d?t.depth=s(r,u,c,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p&&(t.depth=s(r,u,c,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):p&&d?t._depth_rb=l(r,u,c,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p?t._depth_rb=l(r,u,c,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=l(r,u,c,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var b=r.checkFramebufferStatus(r.FRAMEBUFFER);if(b!==r.FRAMEBUFFER_COMPLETE){t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null);for(var g=0;gs||r<0||r>s)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var l=n(a),u=0;uo||r<0||r>o)throw new Error("gl-fbo: Parameters are too large for FBO");n=n||{};var s=1;if("color"in n){if((s=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(s>1){if(!i)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(s>t.getParameter(i.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+s+" draw buffers")}}var l=t.UNSIGNED_BYTE,u=t.getExtension("OES_texture_float");if(n.float&&s>0){if(!u)throw new Error("gl-fbo: Context does not support floating point textures");l=t.FLOAT}else n.preferFloat&&s>0&&u&&(l=t.FLOAT);var h=!0;"depth"in n&&(h=!!n.depth);var f=!1;return"stencil"in n&&(f=!!n.stencil),new c(t,e,r,l,s,h,f,i)}var d=t("gl-texture2d");e.exports=f;var p,m,g,v,y=null,b=c.prototype;Object.defineProperties(b,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(t){if(Array.isArray(t)||(t=[0|t,0|t]),2!==t.length)throw new Error("gl-fbo: Shape vector must be length 2");var e=0|t[0],r=0|t[1];return h(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return t|=0,h(this,t,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t},enumerable:!1}}),b.bind=function(){if(!this._destroyed){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.handle),t.viewport(0,0,this._shape[0],this._shape[1])}},b.dispose=function(){if(!this._destroyed){this._destroyed=!0;var t=this.gl;t.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(t.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var e=0;e>8*d&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=t,p.pickOffset=e,p.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),h.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},h.update=function(t){t=t||{};var e=t.shape||[0,0],r=t.x||o(e[0]),n=t.y||o(e[1]),i=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=n;var l=t.colorLevels||[0],u=t.colorValues||[0,0,0,1],c=l.length,h=this.bounds,d=h[0]=r[0],p=h[1]=n[0],m=h[2]=r[r.length-1],g=h[3]=n[n.length-1],v=1/(m-d),y=1/(g-p),b=e[0],x=e[1];this.shape=[b,x];var _=(b-1)*(x-1)*(f.length>>>1);this.numVertices=_;for(var w=s.mallocUint8(4*_),M=s.mallocFloat32(2*_),k=s.mallocUint8(2*_),A=s.mallocUint32(_),T=0,S=0;S2&&!this.usingDashes){var b=this.mitreShader;this.lineBufferLo.bind(),b.attributes.aLo.pointer(l.FLOAT,!1,48,0),this.lineBufferHi.bind(),b.bind();var x=b.uniforms;this.setProjectionUniforms(x,a),x.color=c,x.radius=s*u,b.attributes.aHi.pointer(l.FLOAT,!1,48,0),l.drawArrays(l.POINTS,0,i/3|0)}}}}(),f.drawPick=function(){var t=[0,0,0,0];return function(e){var r=this.vertCount,n=this.numPoints;if(this.pickOffset=e,!r)return e+n;var i=this.setProjectionModel(),a=this.plot,o=this.width,s=a.gl,l=a.pickPixelRatio,u=this.pickShader,c=this.pickBuffer;t[0]=255&e,t[1]=e>>>8&255,t[2]=e>>>16&255,t[3]=e>>>24,u.bind();var h=u.uniforms;this.setProjectionUniforms(h,i),h.width=o*l,h.pickOffset=t;var f=u.attributes;return this.lineBufferHi.bind(),f.aHi.pointer(s.FLOAT,!1,16,0),f.dHi.pointer(s.FLOAT,!1,16,8),this.lineBufferLo.bind(),f.aLo.pointer(s.FLOAT,!1,16,0),c.bind(),f.pick0.pointer(s.UNSIGNED_BYTE,!1,8,0),f.pick1.pointer(s.UNSIGNED_BYTE,!1,8,4),s.drawArrays(s.TRIANGLES,0,r),e+n}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.numPoints;if(r=n+i)return null;var a=r-n,o=this.data;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}},f.update=function(t){t=t||{};var e,r,n,a,o,s=this.plot.gl;this.color=(t.color||[0,0,1,1]).slice(),this.width=+(t.width||1),this.fill=(t.fill||[!1,!1,!1,!1]).slice(),this.fillColor=i(t.fillColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var h=t.dashes||[1],f=0;for(e=0;e1,this.dashPattern=l(s,u(d,[f,1,4],[1,0,0])),this.dashPattern.minFilter=s.NEAREST,this.dashPattern.magFilter=s.NEAREST,this.dashLength=f,c.free(d);var m=t.positions;this.data=m;var g=this.bounds;g[0]=g[1]=1/0,g[2]=g[3]=-1/0;var v=this.numPoints=m.length>>>1;if(0!==v){for(e=0;e1;){var A=--n;a=m[2*n],o=m[2*n+1];var T=A-1,S=m[2*T],E=m[2*T+1];if(!(isNaN(a)||isNaN(o)||isNaN(S)||isNaN(E))){k+=1,a=(a-g[0])/(g[2]-g[0]),o=(o-g[1])/(g[3]-g[1]),S=(S-g[0])/(g[2]-g[0]),E=(E-g[1])/(g[3]-g[1]);var L=S-a,C=E-o,z=A|1<<24,D=A-1,I=A,P=A-1|1<<24;y[--w]=-C,y[--w]=-L,y[--w]=o,y[--w]=a,_[--M]=z,_[--M]=D,y[--w]=C,y[--w]=L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=-C,y[--w]=-L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=C,y[--w]=L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=-C,y[--w]=-L,y[--w]=o,y[--w]=a,_[--M]=z,_[--M]=D,y[--w]=C,y[--w]=L,y[--w]=o,y[--w]=a,_[--M]=z,_[--M]=D}}for(e=0;e FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n highp float e = floor(log2(av));\n highp float m = av * pow(2.0, -e) - 1.0;\n \n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n \n //Unpack exponent\n highp float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0; \n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\n\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if(any(lessThan(worldPosition, clipBounds[0])) || any(greaterThan(worldPosition, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = vec4(pickId/255.0, encode_float_1_0(pixelArcLength).xyz);\n}",null,a)}},{"gl-shader":239}],156:[function(t,e,r){"use strict";function n(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function i(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function a(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function o(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.dirty=!0,this.pixelRatio=1}function s(t){var e=t.gl||t.scene&&t.scene.gl,r=m(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var n=g(e);n.attributes.position.location=0,n.attributes.nextPosition.location=1,n.attributes.arcLength.location=2,n.attributes.lineWidth.location=3,n.attributes.color.location=4;for(var i=l(e),a=u(e,[{buffer:i,size:3,offset:0,stride:48},{buffer:i,size:3,offset:12,stride:48},{buffer:i,size:1,offset:24,stride:48},{buffer:i,size:1,offset:28,stride:48},{buffer:i,size:4,offset:32,stride:48}]),s=d(new Array(1024),[256,1,4]),h=0;h<1024;++h)s.data[h]=255;var f=c(e,s);f.wrap=e.REPEAT;var p=new o(e,r,n,i,a,f);return p.update(t),p}e.exports=s;var l=t("gl-buffer"),u=t("gl-vao"),c=t("gl-texture2d"),h=t("glsl-read-float"),f=t("binary-search-bounds"),d=t("ndarray"),p=t("./lib/shaders"),m=p.createShader,g=p.createPickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],y=o.prototype;y.isTransparent=function(){return this.opacity<1},y.isOpaque=function(){return this.opacity>=1},y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.drawTransparent=y.draw=function(t){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||v,view:t.view||v,projection:t.projection||v,clipBounds:i(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},y.drawPick=function(t){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||v,view:t.view||v,projection:t.projection||v,pickId:this.pickId,clipBounds:i(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},y.update=function(t){var e,r;this.dirty=!0;var i=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),"opacity"in t&&(this.opacity=+t.opacity);var a=t.position||t.positions;if(a){var o=t.color||t.colors||[0,0,0,1],s=t.lineWidth||1,l=[],u=[],c=[],h=0,p=0,m=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],g=!1;t:for(e=1;e0){for(var b=0;b<24;++b)l.push(l[l.length-12]);p+=2,g=!0}continue t}m[0][r]=Math.min(m[0][r],v[r],y[r]),m[1][r]=Math.max(m[1][r],v[r],y[r])}var x,_;Array.isArray(o[0])?(x=o[e-1],_=o[e]):x=_=o,3===x.length&&(x=[x[0],x[1],x[2],1]),3===_.length&&(_=[_[0],_[1],_[2],1]);var w;w=Array.isArray(s)?s[e-1]:s;var M=h;if(h+=n(v,y),g){for(r=0;r<2;++r)l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,x[0],x[1],x[2],x[3]);p+=2,g=!1}l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,x[0],x[1],x[2],x[3],v[0],v[1],v[2],y[0],y[1],y[2],M,-w,x[0],x[1],x[2],x[3],y[0],y[1],y[2],v[0],v[1],v[2],h,-w,_[0],_[1],_[2],_[3],y[0],y[1],y[2],v[0],v[1],v[2],h,w,_[0],_[1],_[2],_[3]),p+=4}if(this.buffer.update(l),u.push(h),c.push(a[a.length-1].slice()),this.bounds=m,this.vertexCount=p,this.points=c,this.arcLength=u,"dashes"in t){var k=t.dashes,A=k.slice();for(A.unshift(0),e=1;e0?(n=2*Math.sqrt(r+1),t[3]=.25*n,t[0]=(e[6]-e[9])/n,t[1]=(e[8]-e[2])/n,t[2]=(e[1]-e[4])/n):e[0]>e[5]&e[0]>e[10]?(n=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/n,t[0]=.25*n,t[1]=(e[1]+e[4])/n,t[2]=(e[8]+e[2])/n):e[5]>e[10]?(n=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/n,t[0]=(e[1]+e[4])/n,t[1]=.25*n,t[2]=(e[6]+e[9])/n):(n=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/n,t[0]=(e[8]+e[2])/n,t[1]=(e[6]+e[9])/n,t[2]=.25*n),t},i.fromRotationTranslationScale=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3],l=i+i,u=a+a,c=o+o,h=i*l,f=i*u,d=i*c,p=a*u,m=a*c,g=o*c,v=s*l,y=s*u,b=s*c,x=n[0],_=n[1],w=n[2];return t[0]=(1-(p+g))*x,t[1]=(f+b)*x,t[2]=(d-y)*x,t[3]=0,t[4]=(f-b)*_,t[5]=(1-(h+g))*_,t[6]=(m+v)*_,t[7]=0,t[8]=(d+y)*w,t[9]=(m-v)*w,t[10]=(1-(h+p))*w,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},i.fromRotationTranslationScaleOrigin=function(t,e,r,n,i){var a=e[0],o=e[1],s=e[2],l=e[3],u=a+a,c=o+o,h=s+s,f=a*u,d=a*c,p=a*h,m=o*c,g=o*h,v=s*h,y=l*u,b=l*c,x=l*h,_=n[0],w=n[1],M=n[2],k=i[0],A=i[1],T=i[2];return t[0]=(1-(m+v))*_,t[1]=(d+x)*_,t[2]=(p-b)*_,t[3]=0,t[4]=(d-x)*w,t[5]=(1-(f+v))*w,t[6]=(g+y)*w,t[7]=0,t[8]=(p+b)*M,t[9]=(g-y)*M,t[10]=(1-(f+m))*M,t[11]=0,t[12]=r[0]+k-(t[0]*k+t[4]*A+t[8]*T),t[13]=r[1]+A-(t[1]*k+t[5]*A+t[9]*T),t[14]=r[2]+T-(t[2]*k+t[6]*A+t[10]*T),t[15]=1,t},i.fromQuat=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,h=n*s,f=i*o,d=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return t[0]=1-h-p,t[1]=c+v,t[2]=f-g,t[3]=0,t[4]=c-v,t[5]=1-u-p,t[6]=d+m,t[7]=0,t[8]=f+g,t[9]=d-m,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.frustum=function(t,e,r,n,i,a,o){var s=1/(r-e),l=1/(i-n),u=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(o+a)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*u,t[15]=0,t},i.perspective=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t},i.perspectiveFromFieldOfView=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-((o-s)*l)*.5,t[9]=(i-a)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t},i.ortho=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t},i.lookAt=function(t,e,r,a){var o,s,l,u,c,h,f,d,p,m,g=e[0],v=e[1],y=e[2],b=a[0],x=a[1],_=a[2],w=r[0],M=r[1],k=r[2];return Math.abs(g-w).999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(a.cross(t,i,o),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=1+l,s.normalize(n,n))}}(),s.setAxes=function(){var t=i.create();return function(e,r,n,i){return t[0]=n[0],t[3]=n[1],t[6]=n[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],s.normalize(e,s.fromMat3(e,t))}}(),s.clone=o.clone,s.fromValues=o.fromValues,s.copy=o.copy,s.set=o.set,s.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},s.setAxisAngle=function(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t},s.getAxisAngle=function(t,e){var r=2*Math.acos(e[3]),n=Math.sin(r/2);return 0!=n?(t[0]=e[0]/n,t[1]=e[1]/n,t[2]=e[2]/n):(t[0]=1,t[1]=0,t[2]=0),r},s.add=o.add,s.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1],u=r[2],c=r[3];return t[0]=n*c+o*s+i*u-a*l,t[1]=i*c+o*l+a*s-n*u,t[2]=a*c+o*u+n*l-i*s,t[3]=o*c-n*s-i*l-a*u,t},s.mul=s.multiply,s.scale=o.scale,s.rotateX=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+o*s,t[1]=i*l+a*s,t[2]=a*l-i*s,t[3]=o*l-n*s,t},s.rotateY=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l-a*s,t[1]=i*l+o*s,t[2]=a*l+n*s,t[3]=o*l-i*s,t},s.rotateZ=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+i*s,t[1]=i*l-n*s,t[2]=a*l+o*s,t[3]=o*l-a*s,t},s.calculateW=function(t,e){var r=e[0],n=e[1],i=e[2];return t[0]=r,t[1]=n,t[2]=i,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),t},s.dot=o.dot,s.lerp=o.lerp,s.slerp=function(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=u*d+c*p+h*m+f*g,a<0&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*h+l*m,t[3]=s*f+l*g,t},s.sqlerp=function(){var t=s.create(),e=s.create();return function(r,n,i,a,o,l){return s.slerp(t,n,o,l),s.slerp(e,i,a,l),s.slerp(r,t,e,2*l*(1-l)),r}}(),s.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a,s=o?1/o:0;return t[0]=-r*s,t[1]=-n*s,t[2]=-i*s,t[3]=a*s,t},s.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},s.length=o.length,s.len=s.length,s.squaredLength=o.squaredLength,s.sqrLen=s.squaredLength,s.normalize=o.normalize,s.fromMat3=function(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(e[3*i+i]-e[3*a+a]-e[3*o+o]+1),t[i]=.5*r,r=.5/r,t[3]=(e[3*a+o]-e[3*o+a])*r,t[a]=(e[3*a+i]+e[3*i+a])*r,t[o]=(e[3*o+i]+e[3*i+o])*r}return t},s.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},s.exactEquals=o.exactEquals,s.equals=o.equals,e.exports=s},{"./common.js":178,"./mat3.js":181,"./vec3.js":185,"./vec4.js":186}],184:[function(t,e,r){var n=t("./common.js"),i={};i.create=function(){var t=new n.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},i.fromValues=function(t,e){var r=new n.ARRAY_TYPE(2);return r[0]=t,r[1]=e,r},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},i.set=function(t,e,r){return t[0]=e,t[1]=r,t},i.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t},i.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t},i.sub=i.subtract,i.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},i.mul=i.multiply,i.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},i.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},i.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t},i.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)},i.dist=i.distance,i.squaredDistance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1];return Math.sqrt(e*e+r*r)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1];return e*e+r*r},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},i.cross=function(t,e,r){var n=e[0]*r[1]-e[1]*r[0];return t[0]=t[1]=0,t[2]=n,t},i.lerp=function(t,e,r,n){var i=e[0],a=e[1];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t},i.random=function(t,e){e=e||1;var r=2*n.RANDOM()*Math.PI;return t[0]=Math.cos(r)*e,t[1]=Math.sin(r)*e,t},i.transformMat2=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t},i.transformMat2d=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t},i.transformMat3=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[3]*i+r[6],t[1]=r[1]*n+r[4]*i+r[7],t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=2),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},i.cross=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t},i.lerp=function(t,e,r,n){var i=e[0],a=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t},i.hermite=function(t,e,r,n,i,a){var o=a*a,s=o*(2*a-3)+1,l=o*(a-2)+a,u=o*(a-1),c=o*(3-2*a);return t[0]=e[0]*s+r[0]*l+n[0]*u+i[0]*c,t[1]=e[1]*s+r[1]*l+n[1]*u+i[1]*c,t[2]=e[2]*s+r[2]*l+n[2]*u+i[2]*c,t},i.bezier=function(t,e,r,n,i,a){var o=1-a,s=o*o,l=a*a,u=s*o,c=3*a*s,h=3*l*o,f=l*a;return t[0]=e[0]*u+r[0]*c+n[0]*h+i[0]*f,t[1]=e[1]*u+r[1]*c+n[1]*h+i[1]*f,t[2]=e[2]*u+r[2]*c+n[2]*h+i[2]*f,t},i.random=function(t,e){e=e||1;var r=2*n.RANDOM()*Math.PI,i=2*n.RANDOM()-1,a=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*e,t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t},i.transformMat3=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t},i.transformQuat=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,h=u*i+l*n-o*a,f=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+h*-l-f*-s,t[1]=h*u+d*-s+f*-o-c*-l,t[2]=f*u+d*-l+c*-s-h*-o,t},i.rotateX=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.rotateY=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.rotateZ=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=3),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s1?0:Math.acos(a)},i.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(l))},e.exports=i},{"./common.js":178}],186:[function(t,e,r){var n=t("./common.js"),i={};i.create=function(){var t=new n.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},i.fromValues=function(t,e,r,i){var a=new n.ARRAY_TYPE(4);return a[0]=t,a[1]=e,a[2]=r,a[3]=i,a},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},i.set=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t},i.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t},i.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t},i.sub=i.subtract,i.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t},i.mul=i.multiply,i.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},i.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t},i.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},i.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)},i.dist=i.distance,i.squaredDistance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},i.lerp=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t},i.random=function(t,e){return e=e||1,t[0]=n.RANDOM(),t[1]=n.RANDOM(),t[2]=n.RANDOM(),t[3]=n.RANDOM(),i.normalize(t,t),i.scale(t,t,e),t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t},i.transformQuat=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,h=u*i+l*n-o*a,f=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+h*-l-f*-s,t[1]=h*u+d*-s+f*-o-c*-l,t[2]=f*u+d*-l+c*-s-h*-o,t[3]=e[3],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=4),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s1.0001)return null;g+=m[c]}return Math.abs(g-1)>.001?null:[h,o(t,m),m]}var l=t("barycentric"),u=t("polytope-closest-point/lib/closest_point_2d.js");e.exports=s},{barycentric:42,"polytope-closest-point/lib/closest_point_2d.js":467}],188:[function(t,e,r){var n="precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if(any(lessThan(f_position, clipBounds[0])) || \n any(greaterThan(f_position, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = vec4(pickId, f_id.xyz);\n}";r.meshShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec4 m_position = model * vec4(position, 1.0);\n vec4 t_position = view * m_position;\n gl_Position = projection * t_position;\n f_color = color;\n f_normal = normal;\n f_data = position;\n f_eyeDirection = eyePosition - position;\n f_lightDirection = lightPosition - position;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution_2_0(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\n\n\nfloat cookTorranceSpecular_1_1(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution_2_0(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(f_data, clipBounds[0])) || \n any(greaterThan(f_data, clipBounds[1]))) {\n discard;\n }\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n \n if(!gl_FrontFacing) {\n N = -N;\n }\n\n float specular = cookTorranceSpecular_1_1(L, V, N, roughness, fresnel);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(f_data, clipBounds[0])) || \n any(greaterThan(f_data, clipBounds[1]))) {\n discard;\n }\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(position, clipBounds[0])) || \n any(greaterThan(position, clipBounds[1]))) {\n gl_Position = vec4(0,0,0,0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5,0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}",fragment:n,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if(any(lessThan(position, clipBounds[0])) || \n any(greaterThan(position, clipBounds[1]))) {\n gl_Position = vec4(0,0,0,0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}",fragment:n,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor,1);\n}\n",attributes:[{name:"position",type:"vec3"}]}},{}],189:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l,u,c,h,f,d,p,m,g,v,y,b,x,_,w,M,k,A,T){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=c,this.triangleNormals=f,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=b,this.pointColors=_,this.pointUVs=w,this.pointSizes=M,this.pointIds=x,this.pointVAO=k,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=A,this.contourVAO=T,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this._model=I,this._view=I,this._projection=I,this._resolution=[1,1]}function i(t){for(var e=w({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return _(r,[256,256,4],[4,0,1])}function a(t,e,r){for(var n=new Array(e),i=0;i=1},P.isTransparent=function(){return this.opacity<1},P.pickSlots=1,P.setPickBase=function(t){this.pickId=t},P.highlight=function(t){if(!t||!this.contourEnable)return void(this.contourCount=0);for(var e=M(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=k.mallocFloat32(6*a),s=0,l=0;l0){var f=this.triShader;f.bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var f=this.lineShader;f.bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){var f=this.pointShader;f.bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var f=this.contourShader;f.bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind()}},P.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||I,n=t.view||I,i=t.projection||I,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255},l=this.pickShader;if(l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0){var l=this.pointPickShader;l.bind(),l.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}},P.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;as[k]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n],a.uniforms.angle=v[n],u.drawArrays(u.TRIANGLES,s[k],s[A]-s[k]))),y[n]&&M&&(e[1^n]-=T*d*b[n],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=x[n],a.uniforms.angle=_[n],u.drawArrays(u.TRIANGLES,w,M)),e[1^n]=T*c[2+(1^n)]-1,p[n+2]&&(e[1^n]+=T*d*m[n+2],ks[k]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n+2],a.uniforms.angle=v[n+2],u.drawArrays(u.TRIANGLES,s[k],s[A]-s[k]))),y[n+2]&&M&&(e[1^n]+=T*d*b[n+2],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=x[n+2],a.uniforms.angle=_[n+2],u.drawArrays(u.TRIANGLES,w,M))}}(),c.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,u=r.pixelRatio;if(this.titleCount){for(var c=0;c<2;++c)e[c]=2*(o[c]*u-a[c])/(a[2+c]-a[c])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),c.bind=function(){var t=[0,0],e=[0,0],r=[0,0];return function(){var n=this.plot,i=this.shader,a=n._tickBounds,o=n.dataBox,s=n.screenBox,l=n.viewBox;i.bind();for(var u=0;u<2;++u){var c=a[u],h=a[u+2],f=h-c,d=.5*(o[u+2]+o[u]),p=o[u+2]-o[u],m=l[u],g=l[u+2],v=g-m,y=s[u],b=s[u+2],x=b-y;e[u]=2*f/p*v/x,t[u]=2*(c-d)/p*v/x}r[1]=2*n.pixelRatio/(s[3]-s[1]),r[0]=r[1]*(s[3]-s[1])/(s[2]-s[0]),i.uniforms.dataScale=e,i.uniforms.dataShift=t,i.uniforms.textScale=r,this.vbo.bind(),i.attributes.textCoordinate.pointer()}}(),c.update=function(t){var e,r,n,i,a,o=[],l=t.ticks,u=t.bounds;for(a=0;a<2;++a){var c=[Math.floor(o.length/3)],h=[-1/0],f=l[a];for(e=0;er)for(t=r;te)for(t=e;t=0){for(var k=0|M.type.charAt(M.type.length-1),A=new Array(k),T=0;T=0;)S+=1;w[b]=S}var E=new Array(r.length);a(),d._relink=a,d.types={uniforms:l(r),attributes:l(n)},d.attributes=s(p,d,x,w),Object.defineProperty(d,"uniforms",o(p,d,r,E))},e.exports=a},{"./lib/GLError":197,"./lib/create-attributes":198,"./lib/create-uniforms":199,"./lib/reflect":200,"./lib/runtime-reflect":201,"./lib/shader-cache":202}],197:[function(t,e,r){function n(t,e,r){this.shortMessage=e||"",this.longMessage=r||"",this.rawError=t||"",this.message="gl-shader: "+(e||t||"")+(r?"\n"+r:""),this.stack=(new Error).stack}n.prototype=new Error,n.prototype.name="GLError",n.prototype.constructor=n,e.exports=n},{}],198:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}function i(t,e,r,i,a,o,s){for(var l=["gl","v"],u=[],c=0;c=0){var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+h+": "+f);i(t,e,d[0],n,p,o,h)}else{if(!(f.indexOf("mat")>=0))throw new s("","Unknown data type for attribute "+h+": "+f);var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+h+": "+f);a(t,e,d,n,p,o,h)}}}return o}e.exports=o;var s=t("./GLError"),l=n.prototype;l.pointer=function(t,e,r,n){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,t||a.FLOAT,!!e,r||0,n||0),a.enableVertexAttribArray(o)},l.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(l,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}})},{"./GLError":197}],199:[function(t,e,r){"use strict";function n(t){return new Function("y","return function(){return y}")(t)}function i(t,e){for(var r=new Array(t),n=0;n4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+i+"fv(locations["+e+"],false,obj"+t+")"}throw new s("","Unknown uniform data type for "+name+": "+r)}var i=r.charCodeAt(r.length-1)-48;if(i<2||i>4)throw new s("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+i+"iv(locations["+e+"],obj"+t+")";case"v":return"gl.uniform"+i+"fv(locations["+e+"],obj"+t+")";default:throw new s("","Unrecognized data type for vector "+name+": "+r)}}}function c(t,e){if("object"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],a=t;parseInt(n)+""===n?a+="["+n+"]":a+="."+n,"object"==typeof i?r.push.apply(r,c(a,i)):r.push([a,i])}return r}function h(e){for(var n=["return function updateProperty(obj){"],i=c("",e),o=0;o4)throw new s("","Invalid data type");return"b"===t.charAt(0)?i(r,!1):i(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+t);return i(r*r,0)}throw new s("","Unknown uniform data type for "+name+": "+t)}}function d(t,e,i){if("object"==typeof i){var o=p(i);Object.defineProperty(t,e,{get:n(o),set:h(i),enumerable:!0,configurable:!1})}else a[i]?Object.defineProperty(t,e,{get:l(i),set:h(i),enumerable:!0,configurable:!1}):t[e]=f(r[i].type)}function p(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var u=1;u1)for(var l=0;l=0){var m=e[p]-n[p]*(e[p+2]-e[p])/(n[p+2]-n[p]);0===p?o.drawLine(m,e[1],m,e[3],d[p],f[p]):o.drawLine(e[0],m,e[2],m,d[p],f[p])}}for(var p=0;p=0;--t)this.objects[t].dispose();this.objects.length=0;for(var t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},f.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},f.removeObject=function(t){for(var e=this.objects,r=0;r0){var r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function o(t){return"boolean"!=typeof t||t}function s(t){function e(){if(!w&&G.autoResize){var t=M.parentNode,e=1,r=1;t&&t!==document.body?(e=t.clientWidth,r=t.clientHeight):(e=window.innerWidth,r=window.innerHeight);var n=0|Math.ceil(e*G.pixelRatio),i=0|Math.ceil(r*G.pixelRatio);if(n!==M.width||i!==M.height){M.width=n,M.height=i;var a=M.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=e+"px",a.height=r+"px",N=!0}}}function r(){for(var t=O.length,e=F.length,r=0;r0&&0===R[e-1];)R.pop(),F.pop().dispose()}function s(){if(G.contextLost)return!0;A.isContextLost()&&(G.contextLost=!0,G.mouseListener.enabled=!1,G.selection.object=null,G.oncontextloss&&G.oncontextloss())}function b(){if(!s()){A.colorMask(!0,!0,!0,!0),A.depthMask(!0),A.disable(A.BLEND),A.enable(A.DEPTH_TEST);for(var t=O.length,e=F.length,r=0;rS.distance)continue;for(var u=0;u>>1;for(r=0;r=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}function a(t,e){var r=t.gl,i=s(r),a=s(r),l=o(r,u.pointVertex,u.pointFragment),c=o(r,u.pickVertex,u.pickFragment),h=new n(t,i,a,l,c);return h.update(e),t.addObject(h),h}var o=t("gl-shader"),s=t("gl-buffer"),l=t("typedarray-pool"),u=t("./lib/shader");e.exports=a;var c=n.prototype;c.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},c.update=function(t){function e(e,r){return e in t?t[e]:r}var r;t=t||{},this.sizeMin=e("sizeMin",.5),this.sizeMax=e("sizeMax",20),this.color=e("color",[1,0,0,1]).slice(),this.areaRatio=e("areaRatio",1),this.borderColor=e("borderColor",[0,0,0,1]).slice(),this.blend=e("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,a=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,o=t.positions,s=i?o:l.mallocFloat32(o.length),u=a?t.idToIndex:l.mallocInt32(n);if(i||s.set(o),!a)for(s.set(o),r=0;r>8&255,e[2]=r>>16&255,e[3]=r>>24&255,this.pickBuffer.bind(),a.attributes.pickId.pointer(o.UNSIGNED_BYTE),a.uniforms.pickOffset=e,this.pickOffset=r);var f=o.getParameter(o.BLEND),d=o.getParameter(o.DITHER);return f&&!this.blend&&o.disable(o.BLEND),d&&o.disable(o.DITHER),o.drawArrays(o.POINTS,0,this.pointCount),f&&!this.blend&&o.enable(o.BLEND),d&&o.enable(o.DITHER),r+this.pointCount}}(),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{"./lib/shader":206,"gl-buffer":141,"gl-shader":207,"typedarray-pool":521}],215:[function(t,e,r){function n(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=u*d+c*p+h*m+f*g,a<0&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*h+l*m,t[3]=s*f+l*g,t}e.exports=n},{}],216:[function(t,e,r){"use strict";e.exports={vertex:"precision highp float;\n#define GLSLIFY 1\n\n\nvec4 computePosition_1_0(vec2 posHi, vec2 posLo, vec2 scHi, vec2 scLo, vec2 trHi, vec2 trLo) {\n return vec4((posHi + trHi) * scHi\n \t\t\t//FIXME: this thingy does not give noticeable precision gain, need test\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo\n , 0, 1);\n}\n\n\nattribute vec2 positionHi, positionLo;\nattribute float size, border;\nattribute vec2 char, color;\n\n//this is 64-bit form of scale and translate\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform float pixelRatio;\nuniform vec4 viewBox;\nuniform sampler2D palette;\n\nvarying vec4 charColor, borderColor;\nvarying vec2 charId;\nvarying vec2 pointCoord;\nvarying float pointSize;\nvarying float borderWidth;\n\n\nvoid main() {\n charColor = texture2D(palette, vec2(color.x / 255., 0));\n borderColor = texture2D(palette, vec2(color.y / 255., 0));\n\n gl_PointSize = size * pixelRatio;\n pointSize = size * pixelRatio;\n\n charId = char;\n borderWidth = border;\n\n gl_Position = computePosition_1_0(\n positionHi, positionLo,\n scaleHi, scaleLo,\n translateHi, translateLo);\n\n pointCoord = viewBox.xy + (viewBox.zw - viewBox.xy) * (gl_Position.xy * .5 + .5);\n}\n",fragment:"precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D chars;\nuniform vec2 charsShape;\nuniform float charsStep, pixelRatio, charOffset;\n\nvarying vec4 borderColor;\nvarying vec4 charColor;\nvarying vec2 charId;\nvarying vec2 pointCoord;\nvarying float pointSize;\nvarying float borderWidth;\n\nvoid main() {\n\tvec2 pointUV = (pointCoord - gl_FragCoord.xy + pointSize * .5) / pointSize;\n\tpointUV.x = 1. - pointUV.x;\n\tpointUV.y += charOffset;\n\tvec2 texCoord = ((charId + pointUV) * charsStep) / charsShape;\n\tfloat dist = texture2D(chars, texCoord).r;\n\n\t//max-distance alpha\n\tif (dist < 1e-2)\n\t\tdiscard;\n\n\tfloat dif = 5. * pixelRatio * borderWidth / pointSize;\n\tfloat borderLevel = .748 - dif * .5;\n\tfloat charLevel = .748 + dif * .5;\n\tfloat gamma = .005 * charsStep / pointSize;\n\n\tfloat borderAmt = smoothstep(borderLevel - gamma, borderLevel + gamma, dist);\n\tfloat charAmt = smoothstep(charLevel - gamma, charLevel + gamma, dist);\n\n\tvec4 color = borderColor;\n\tcolor.a *= borderAmt;\n\n\tgl_FragColor = mix(color, charColor, charAmt);\n}\n",pickVertex:"precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 positionHi, positionLo;\nattribute vec4 id;\nattribute float size;\n\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform vec4 pickOffset;\nuniform float pixelRatio;\n\nvarying vec4 fragColor;\n\n\nvec4 computePosition_1_0(vec2 posHi, vec2 posLo, vec2 scHi, vec2 scLo, vec2 trHi, vec2 trLo) {\n return vec4((posHi + trHi) * scHi\n \t\t\t//FIXME: this thingy does not give noticeable precision gain, need test\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo\n , 0, 1);\n}\n\n\nvoid main() {\n vec4 fragId = id + pickOffset;\n\n fragId.y += floor(fragId.x / 256.0);\n fragId.x -= floor(fragId.x / 256.0) * 256.0;\n\n fragId.z += floor(fragId.y / 256.0);\n fragId.y -= floor(fragId.y / 256.0) * 256.0;\n\n fragId.w += floor(fragId.z / 256.0);\n fragId.z -= floor(fragId.z / 256.0) * 256.0;\n\n fragColor = fragId / 255.0;\n\n gl_PointSize = size * .25 * pixelRatio;\n\n gl_Position = computePosition_1_0(\n positionHi, positionLo,\n scaleHi, scaleLo,\n translateHi, translateLo);\n}\n",pickFragment:"precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n gl_FragColor = fragColor;\n}\n"}},{}],217:[function(t,e,r){arguments[4][77][0].apply(r,arguments)},{dup:77}],218:[function(t,e,r){arguments[4][196][0].apply(r,arguments)},{"./lib/GLError":219,"./lib/create-attributes":220,"./lib/create-uniforms":221,"./lib/reflect":222,"./lib/runtime-reflect":223,"./lib/shader-cache":224,dup:196}],219:[function(t,e,r){arguments[4][197][0].apply(r,arguments)},{dup:197}],220:[function(t,e,r){arguments[4][198][0].apply(r,arguments)},{"./GLError":219,dup:198}],221:[function(t,e,r){arguments[4][199][0].apply(r,arguments)},{"./GLError":219,"./reflect":222,dup:199}],222:[function(t,e,r){arguments[4][200][0].apply(r,arguments)},{dup:200}],223:[function(t,e,r){arguments[4][201][0].apply(r,arguments)},{dup:201}],224:[function(t,e,r){arguments[4][202][0].apply(r,arguments)},{"./GLError":219,dup:202,"gl-format-compiler-error":149,"weakmap-shim":542}],225:[function(t,e,r){"use strict";function n(t,e,r,n,a){a<=4*f?i(0,a-1,t,e,r,n):h(0,a-1,t,e,r,n)}function i(t,e,r,n,i,a){for(var o=t+1;o<=e;++o){for(var s=r[o],l=n[2*o],u=n[2*o+1],c=i[o],h=a[o],f=o;f>t;){var d=r[f-1],p=n[2*(f-1)];if((d-s||l-p)>=0)break;r[f]=d,n[2*f]=p,n[2*f+1]=n[2*f-1],i[f]=i[f-1],a[f]=a[f-1],f-=1}r[f]=s,n[2*f]=l,n[2*f+1]=u,i[f]=c,a[f]=h}}function a(t,e,r,n,i,a){var o=r[t],s=n[2*t],l=n[2*t+1],u=i[t],c=a[t];r[t]=r[e],n[2*t]=n[2*e],n[2*t+1]=n[2*e+1],i[t]=i[e],a[t]=a[e],r[e]=o,n[2*e]=s,n[2*e+1]=l,i[e]=u,a[e]=c}function o(t,e,r,n,i,a){r[t]=r[e],n[2*t]=n[2*e],n[2*t+1]=n[2*e+1],i[t]=i[e],a[t]=a[e]}function s(t,e,r,n,i,a,o){var s=n[t],l=i[2*t],u=i[2*t+1],c=a[t],h=o[t];n[t]=n[e],i[2*t]=i[2*e],i[2*t+1]=i[2*e+1],a[t]=a[e],o[t]=o[e],n[e]=n[r],i[2*e]=i[2*r],i[2*e+1]=i[2*r+1],a[e]=a[r],o[e]=o[r],n[r]=s,i[2*r]=l,i[2*r+1]=u,a[r]=c,o[r]=h}function l(t,e,r,n,i,a,o,s,l,u,c){s[t]=s[e],l[2*t]=l[2*e],l[2*t+1]=l[2*e+1],u[t]=u[e],c[t]=c[e],s[e]=r,l[2*e]=n,l[2*e+1]=i,u[e]=a,c[e]=o}function u(t,e,r,n,i){return(r[t]-r[e]||n[2*e]-n[2*t]||i[t]-i[e])<0}function c(t,e,r,n,i,a,o,s){return(e-a[t]||o[2*t]-r||i-s[t])<0}function h(t,e,r,n,d,p){var m=(e-t+1)/6|0,g=t+m,v=e-m,y=t+e>>1,b=y-m,x=y+m,_=g,w=b,M=y,k=x,A=v,T=t+1,S=e-1,E=0;u(_,w,r,n,d,p)&&(E=_,_=w,w=E),u(k,A,r,n,d,p)&&(E=k,k=A,A=E),u(_,M,r,n,d,p)&&(E=_,_=M,M=E),u(w,M,r,n,d,p)&&(E=w,w=M,M=E),u(_,k,r,n,d,p)&&(E=_,_=k,k=E),u(M,k,r,n,d,p)&&(E=M,M=k,k=E),u(w,A,r,n,d,p)&&(E=w,w=A,A=E),u(w,M,r,n,d,p)&&(E=w,w=M,M=E),u(k,A,r,n,d,p)&&(E=k,k=A,A=E);var L=r[w],C=n[2*w],z=n[2*w+1],D=d[w],I=p[w],P=r[k],O=n[2*k],j=n[2*k+1],R=d[k],F=p[k],N=_,B=M,U=A,V=g,H=y,q=v,G=r[N],Y=r[B],W=r[U];r[V]=G,r[H]=Y,r[q]=W;for(var X=0;X<2;++X){var Z=n[2*N+X],J=n[2*B+X],Q=n[2*U+X];n[2*V+X]=Z,n[2*H+X]=J,n[2*q+X]=Q}var K=d[N],$=d[B],tt=d[U];d[V]=K,d[H]=$,d[q]=tt;var et=p[N],rt=p[B],nt=p[U];p[V]=et,p[H]=rt,p[q]=nt,o(b,t,r,n,d,p),o(x,e,r,n,d,p);for(var it=T;it<=S;++it)if(c(it,L,C,z,D,r,n,d))it!==T&&a(it,T,r,n,d,p),++T;else if(!c(it,P,O,j,R,r,n,d))for(;;){if(c(S,P,O,j,R,r,n,d)){c(S,L,C,z,D,r,n,d)?(s(it,T,S,r,n,d,p),++T,--S):(a(it,S,r,n,d,p),--S);break}if(--S=Math.max(.9*d,32)){var b=u+s>>>1;l(g,v,h,f,b,c+1),f=b}l(g,v,h,f,y,c+1),f=y}}}var u=t.length>>>1;if(u<1)return[];for(var c=1/0,h=1/0,f=-1/0,d=-1/0,p=0;p=0;--_){t[2*_]=(t[2*_]-c)*v,t[2*_+1]=(t[2*_+1]-h)*y;var A=x[_];A!==M&&(w.push(new i(b*Math.pow(.5,A),_+1,k-(_+1))),k=_+1,M=A)}return w.push(new i(b*Math.pow(.5,A+1),0,k)),o.free(x),w}var o=t("typedarray-pool"),s=t("./lib/sort");e.exports=a},{"./lib/sort":225,"typedarray-pool":521}],227:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.sizeBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.charBuffer=s,this.pointCount=0,this.pickOffset=0,this.points=null,this.scales=[],this.xCoords=[],this.charCanvas=document.createElement("canvas"),this.charTexture=h(this.plot.gl,this.charCanvas),this.charStep=400,this.charOffset=.032,this.snapThreshold=1e4,this.paletteTexture=h(this.plot.gl,[256,1])}function i(t,e){var r=t.gl,i=a(r,l.vertex,l.fragment),s=a(r,l.pickVertex,l.pickFragment),u=o(r),c=o(r),h=o(r),f=o(r),d=o(r),p=new n(t,i,s,u,c,h,f,d);return p.update(e),t.addObject(p),p}e.exports=i;var a=t("gl-shader"),o=t("gl-buffer"),s=t("typedarray-pool"),l=t("./lib/shaders"),u=t("snap-points-2d"),c=t("font-atlas-sdf"),h=t("gl-texture2d"),f=t("color-id"),d=t("ndarray"),p=t("clamp"),m=t("binary-search-bounds"),g=n.prototype;!function(){function t(){var t=this.plot,u=t.viewBox,c=t.dataBox,h=t.pixelRatio,f=c[2]-c[0],d=c[3]-c[1],p=2/f,m=2/d,g=-c[0]-.5*f,v=-c[1]-.5*d;i[0]=p,a[0]=p-i[0],i[1]=m,a[1]=m-i[1],o[0]=g,s[0]=g-o[0],o[1]=v,s[1]=v-o[1];var y=u[2]-u[0],b=u[3]-u[1];e=Math.min(f/y,d/b),l[0]=2*h/y,l[1]=2*h/b,r=c[0],n=c[2]}var e,r,n,i=new Float32Array([0,0]),a=new Float32Array([0,0]),o=new Float32Array([0,0]),s=new Float32Array([0,0]),l=[0,0],u=[0,0,0,0];g.drawPick=function(l){var c=void 0!==l,h=this.plot,f=this.pointCount,d=f>this.snapThreshold;if(!f)return l;t.call(this);var p=h.gl,g=c?this.pickShader:this.shader,v=p.isEnabled(p.BLEND);if(g.bind(),c){this.pickOffset=l;for(var y=0;y<4;++y)u[y]=l>>8*y&255;g.uniforms.pickOffset=u,this.idBuffer.bind(),g.attributes.id.pointer(p.UNSIGNED_BYTE,!1)}else p.blendFuncSeparate(p.SRC_ALPHA,p.ONE_MINUS_SRC_ALPHA,p.ONE,p.ONE_MINUS_SRC_ALPHA),p.blendColor(0,0,0,1),v||p.enable(p.BLEND),this.colorBuffer.bind(),g.attributes.color.pointer(p.UNSIGNED_BYTE,!1),this.charBuffer.bind(),g.attributes.char.pointer(p.UNSIGNED_BYTE,!1),g.uniforms.chars=this.charTexture.bind(0),g.uniforms.charsShape=[this.charCanvas.width,this.charCanvas.height],g.uniforms.charsStep=this.charStep,g.uniforms.palette=this.paletteTexture.bind(1),g.uniforms.charOffset=this.charOffset;this.sizeBuffer.bind(),g.attributes.size.pointer(p.FLOAT,!1,8,0),c||g.attributes.border.pointer(p.FLOAT,!1,8,4),this.positionBuffer.bind(),g.attributes.positionHi.pointer(p.FLOAT,!1,16,0),g.attributes.positionLo.pointer(p.FLOAT,!1,16,8),g.uniforms.pixelRatio=h.pixelRatio,g.uniforms.scaleHi=i,g.uniforms.scaleLo=a,g.uniforms.translateHi=o,g.uniforms.translateLo=s,g.uniforms.viewBox=h.viewBox;var b=this.scales;if(d)for(var x=b.length-1;x>=0;x--){var _=b[x];if(!(_.pixelSize&&_.pixelSize<1.25*e&&x>1)){var w=_.offset,M=_.count+w,k=m.ge(this.xCoords,r,w,M-1),A=m.lt(this.xCoords,n,k,M-1)+1;A>k&&p.drawArrays(p.POINTS,k,A-k)}}else p.drawArrays(p.POINTS,0,f);if(c)return l+f;v?p.blendFunc(p.ONE,p.ONE_MINUS_SRC_ALPHA):p.disable(p.BLEND)}}(),g.draw=g.drawPick,g.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}},g.update=function(t){t=t||{};var e=t.positions||[],r=t.colors||[],n=t.glyphs||[],i=t.sizes||[],a=t.borderWidths||[],o=t.borderColors||[],l=this.plot.gl;null!=t.charOffset&&(this.charOffset=t.charOffset),this.points=e;var h=this.points.length/2,m=s.mallocInt32(h),g=s.mallocFloat32(2*h),v=s.mallocFloat64(2*h);v.set(this.points),this.pointCount=h;var y=h>this.snapThreshold;y&&(this.scales=u(v,m,g));for(var b=s.mallocFloat32(4*h),x=s.mallocFloat32(2*h),_=s.mallocUint8(2*h),w=s.mallocUint32(h),M=s.mallocUint8(2*h),k={},A=[],T=[],S=[],E=0,L=h,C=0;EO&&(O=i[E]);var j=this.charStep;this.charStep=p(Math.ceil(4*O),128,768);var R=Object.keys(I),F=this.charStep,N=Math.floor(F/2),B=l.getParameter(l.MAX_TEXTURE_SIZE),U=B/F*(B/F),V=Math.min(B,F*R.length),H=Math.min(B,F*Math.ceil(F*R.length/B)),q=Math.floor(V/F);R.length>U&&console.warn("gl-scatter2d-fancy: number of characters is more than maximum texture size. Try reducing it."),this.chars&&this.chars+""==R+""&&this.charStep==j||(this.charCanvas=c({canvas:this.charCanvas,family:"sans-serif",size:N,shape:[V,H],step:[F,F],chars:R}),this.chars=R);for(var E=0;E>>1,n=u.mallocInt32(r),i=u.mallocFloat32(2*r),a=u.mallocFloat64(2*r);a.set(this.points),this.scales=l(a,n,i,this.bounds);var o=u.mallocFloat64(r),s=u.mallocFloat32(2*r),c=u.mallocFloat32(2*r);s.set(a);for(var h=0,f=0;h>8&255,g[2]=t>>16&255,g[3]=t>>24&255,n.uniforms.pickOffset=g,l.bind(),n.attributes.pickId.pointer(v.UNSIGNED_BYTE)):(n.uniforms.useWeight=1,this.weightBuffer.bind(),n.attributes.weight.pointer());for(var D=this.xCoords,I=(x[0]-u[0]-S*c*y)/_,P=(x[2]-u[0]+S*c*y)/_,O=!0,j=i.length-1;j>=0;j--){var R=i[j];if(!(R.pixelSize1)){var F=R.offset,N=R.count+F,B=s.ge(D,I,F,N-1),U=s.lt(D,P,B,N-1)+1;U>B&&v.drawArrays(v.POINTS,B,U-B),!e&&O&&(O=!1,n.uniforms.useWeight=0)}}return t+this.pointCount},h.drawPick=h.draw,h.pick=function(t,e,r){var n=r-this.pickOffset;return n<0||n>=this.pointCount?null:{object:this,pointId:n,dataCoord:[this.points[2*n],this.points[2*n+1]]}}},{"./lib/shader":228,"binary-search-bounds":229,"gl-buffer":141,"gl-shader":239,"snap-points-2d":231,"typedarray-pool":521}],233:[function(t,e,r){"use strict";function n(t,e){var r=a[e];if(r||(r=a[e]={}),t in r)return r[t];for(var n=i(t,{textAlign:"center",textBaseline:"middle",lineHeight:1,font:e}),o=i(t,{triangles:!0,textAlign:"center",textBaseline:"middle",lineHeight:1,font:e}),s=[[1/0,1/0],[-1/0,-1/0]],l=0;lMath.abs(j[1])){var R=O;O=j,j=R,R=I,I=P,P=R;var F=z;z=D,D=F}O[0]<0&&(I[z]=-1),j[1]>0&&(P[D]=-1);for(var N=0,B=0,C=0;C<4;++C)N+=Math.pow(p[4*z+C],2),B+=Math.pow(p[4*D+C],2);I[z]/=Math.sqrt(N),P[D]/=Math.sqrt(B),d.axes[0]=I,d.axes[1]=P,d.fragClipBounds[0]=u(E,b[0],_,-1e8),d.fragClipBounds[1]=u(E,b[1],_,1e8),e.vao.draw(f.TRIANGLES,e.vertexCount),e.lineWidth>0&&(f.lineWidth(e.lineWidth),e.vao.draw(f.LINES,e.lineVertexCount,e.vertexCount))}}function f(t,e,r,n,i,a){var o=r.gl;if(r.vao.bind(),i===r.opacity<1||a){t.bind();var s=t.uniforms;s.model=n.model||x,s.view=n.view||x,s.projection=n.projection||x,w[0]=2/o.drawingBufferWidth,w[1]=2/o.drawingBufferHeight,s.screenSize=w,s.highlightId=r.highlightId,s.highlightScale=r.highlightScale,s.fragClipBounds=D,s.clipBounds=r.axes.bounds,s.opacity=r.opacity,s.pickGroup=r.pickId/255,s.pixelRatio=r.pixelRatio,r.vao.draw(o.TRIANGLES,r.vertexCount),r.lineWidth>0&&(o.lineWidth(r.lineWidth),r.vao.draw(o.LINES,r.lineVertexCount,r.vertexCount))}h(e,r,n,i,a),r.vao.unbind()}function d(t){var e=t.gl,r=y.createPerspective(e),n=y.createOrtho(e),i=y.createProject(e),a=y.createPickPerspective(e),s=y.createPickOrtho(e),l=y.createPickProject(e),u=p(e),c=p(e),h=p(e),f=p(e),d=m(e,[{buffer:u,size:3,type:e.FLOAT},{buffer:c,size:4,type:e.FLOAT},{buffer:h,size:2,type:e.FLOAT},{buffer:f,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),g=new o(e,r,n,i,u,c,h,f,d,a,s,l);return g.update(t),g}var p=t("gl-buffer"),m=t("gl-vao"),g=t("typedarray-pool"),v=t("gl-mat4/multiply"),y=t("./lib/shaders"),b=t("./lib/glyphs"),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];e.exports=d;var _=o.prototype;_.pickSlots=1,_.setPickBase=function(t){this.pickId=t},_.isTransparent=function(){if(this.opacity<1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]<1)return!0;return!1},_.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]>=1)return!0;return!1};var w=[0,0],M=[0,0,0],k=[0,0,0],A=[0,0,0,1],T=[0,0,0,1],S=x.slice(),E=[0,0,0],L=[[0,0,0],[0,0,0]],C=[-1e8,-1e8,-1e8],z=[1e8,1e8,1e8],D=[C,z];_.draw=function(t){f(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!1,!1)},_.drawTransparent=function(t){f(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!0,!1)},_.drawPick=function(t){f(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,!1,!0)},_.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[2]+(t.value[1]<<8)+(t.value[0]<<16);if(e>=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},_.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},_.update=function(t){if(t=t||{},"perspective"in t&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if("projectOpacity"in t)if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{var r=+t.projectOpacity;this.projectOpacity=[r,r,r]}"opacity"in t&&(this.opacity=t.opacity),this.dirty=!0;var n=t.position;if(n){var i=t.font||"normal",a=t.alignment||[0,0],o=[1/0,1/0,1/0],s=[-1/0,-1/0,-1/0],l=t.glyph,u=t.color,c=t.size,h=t.angle,f=t.lineColor,d=0,p=0,m=0,v=n.length;t:for(var y=0;y0&&(z[0]=-a[0]*(1+A[0][0]));for(var H=M.cells,q=M.positions,_=0;_0){var v=r*c;o.drawBox(h-v,f-v,d+v,f+v,a),o.drawBox(h-v,p-v,d+v,p+v,a),o.drawBox(h-v,f-v,h+v,p+v,a),o.drawBox(d-v,f-v,d+v,p+v,a)}}}},l.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},l.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":236,"gl-buffer":141,"gl-shader":239}],238:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function i(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}function a(t,e){return new i(t,o(t,e),s.mallocUint8(e[0]*e[1]*4))}e.exports=a;var o=t("gl-fbo"),s=t("typedarray-pool"),l=t("ndarray"),u=t("bit-twiddle").nextPow2,c=t("cwise/lib/wrapper")({args:["array",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},"scalar","scalar","index"],pre:{body:"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},body:{body:"{if(_inline_46_arg0_<255||_inline_46_arg1_<255||_inline_46_arg2_<255||_inline_46_arg3_<255){var _inline_46_l=_inline_46_arg4_-_inline_46_arg6_[0],_inline_46_a=_inline_46_arg5_-_inline_46_arg6_[1],_inline_46_f=_inline_46_l*_inline_46_l+_inline_46_a*_inline_46_a;_inline_46_fthis.buffer.length){s.free(this.buffer);for(var n=this.buffer=s.mallocUint8(u(r*e*4)),i=0;i=0){for(var k=0|M.type.charAt(M.type.length-1),A=new Array(k),T=0;T=0;)S+=1;_[w]=S}var E=new Array(r.length);a(),d._relink=a,d.types={uniforms:l(r),attributes:l(n)},d.attributes=s(p,d,b,_),Object.defineProperty(d,"uniforms",o(p,d,r,E))},e.exports=a},{"./lib/GLError":240,"./lib/create-attributes":241,"./lib/create-uniforms":242,"./lib/reflect":243,"./lib/runtime-reflect":244,"./lib/shader-cache":245}],240:[function(t,e,r){arguments[4][197][0].apply(r,arguments)},{dup:197}],241:[function(t,e,r){arguments[4][198][0].apply(r,arguments)},{"./GLError":240,dup:198}],242:[function(t,e,r){arguments[4][199][0].apply(r,arguments)},{"./GLError":240,"./reflect":243,dup:199}],243:[function(t,e,r){arguments[4][200][0].apply(r,arguments)},{dup:200}],244:[function(t,e,r){arguments[4][201][0].apply(r,arguments)},{dup:201}],245:[function(t,e,r){arguments[4][202][0].apply(r,arguments)},{"./GLError":240,dup:202,"gl-format-compiler-error":149,"weakmap-shim":542}],246:[function(t,e,r){"use strict";function n(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}function i(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r}e.exports=i;var a=n.prototype;a.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(t){return t.slice()}),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},a.draw=function(){var t=this.enable,e=this.width,r=this.color,n=this.center,i=this.plot,a=i.line,o=i.dataBox,s=i.viewBox;if(a.bind(),o[0]<=n[0]&&n[0]<=o[2]&&o[1]<=n[1]&&n[1]<=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),u=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&&a.drawLine(l,u,s[0],u,e[0],r[0]),t[1]&&a.drawLine(l,u,l,s[1],e[1],r[1]),t[2]&&a.drawLine(l,u,s[2],u,e[2],r[2]),t[3]&&a.drawLine(l,u,l,s[3],e[3],r[3])}},a.dispose=function(){this.plot.removeOverlay(this)}},{}],247:[function(t,e,r){"use strict";var n=t("gl-shader");e.exports=function(t){ -return n(t,"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, color;\nattribute float weight;\n\nuniform mat4 model, view, projection;\nuniform vec3 coordinates[3];\nuniform vec4 colors[3];\nuniform vec2 screenShape;\nuniform float lineWidth;\n\nvarying vec4 fragColor;\n\nvoid main() {\n vec3 vertexPosition = mix(coordinates[0],\n mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\n\n vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\n vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\n vec2 delta = weight * clipOffset * screenShape;\n vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\n\n gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\n fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\n}\n","precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}",null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},{"gl-shader":239}],248:[function(t,e,r){"use strict";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}function i(t,e){function r(t,e,r,n,a,o){var s=[t,e,r,0,0,0,1];s[n+3]=1,s[n]=a,i.push.apply(i,s),s[6]=-1,i.push.apply(i,s),s[n]=o,i.push.apply(i,s),i.push.apply(i,s),s[6]=1,i.push.apply(i,s),s[n]=a,i.push.apply(i,s)}var i=[];r(0,0,0,0,0,1),r(0,0,0,1,0,1),r(0,0,0,2,0,1),r(1,0,0,1,-1,1),r(1,0,0,2,-1,1),r(0,1,0,0,-1,1),r(0,1,0,2,-1,1),r(0,0,1,0,-1,1),r(0,0,1,1,-1,1);var l=a(t,i),u=o(t,[{type:t.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:t.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:t.FLOAT,buffer:l,size:1,offset:24,stride:28}]),c=s(t);c.attributes.position.location=0,c.attributes.color.location=1,c.attributes.weight.location=2;var h=new n(t,l,u,c);return h.update(e),h}var a=t("gl-buffer"),o=t("gl-vao"),s=t("./shaders/index");e.exports=i;var l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],u=n.prototype,c=[0,0,0],h=[0,0,0],f=[0,0];u.isTransparent=function(){return!1},u.drawTransparent=function(t){},u.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||l,o=t.view||l,s=t.projection||l;this.axes&&(i=this.axes.lastCubeProps.axis);for(var u=c,d=h,p=0;p<3;++p)i&&i[p]<0?(u[p]=this.bounds[0][p],d[p]=this.bounds[1][p]):(u[p]=this.bounds[1][p],d[p]=this.bounds[0][p]);f[0]=e.drawingBufferWidth,f[1]=e.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=o,n.uniforms.projection=s,n.uniforms.coordinates=[this.position,u,d],n.uniforms.colors=this.colors,n.uniforms.screenShape=f;for(var p=0;p<3;++p)n.uniforms.lineWidth=this.lineWidth[p]*this.pixelRatio,this.enabled[p]&&(r.draw(e.TRIANGLES,6,6*p),this.drawSides[p]&&r.draw(e.TRIANGLES,12,18+12*p));r.unbind()},u.update=function(t){t&&("bounds"in t&&(this.bounds=t.bounds),"position"in t&&(this.position=t.position),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"colors"in t&&(this.colors=t.colors),"enabled"in t&&(this.enabled=t.enabled),"drawSides"in t&&(this.drawSides=t.drawSides))},u.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders/index":247,"gl-buffer":141,"gl-vao":255}],249:[function(t,e,r){var n=t("gl-shader"),i="precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n worldCoordinate = vec3(uv.zw, f.x);\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n",a="precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution_2_0(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\n\n\nfloat beckmannSpecular_1_1(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution_2_0(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\n\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (kill > 0.0 ||\n any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n discard;\n }\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = beckmannSpecular_1_1(L, V, N, roughness);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n",o="precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n vec4 worldPosition = model * vec4(dataCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z = clipPosition.z + zOffset;\n\n gl_Position = clipPosition;\n value = f;\n kill = -1.0;\n worldCoordinate = dataCoordinate;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n",s="precision mediump float;\n#define GLSLIFY 1\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if(kill > 0.0 ||\n any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n discard;\n }\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n";r.createShader=function(t){var e=n(t,i,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,i,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,o,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{"gl-shader":239}],250:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}function i(t){var e=x([y({colormap:t,nshades:j,format:"rgba"}).map(function(t){return[t[0],t[1],t[2],255*t[3]]})]);return b.divseq(e,255),e}function a(t,e,r,i,a,o,s,l,u,c,h,f,d,p){this.gl=t,this.shape=e,this.bounds=r,this.intensityBounds=[],this._shader=i,this._pickShader=a,this._coordinateBuffer=o,this._vao=s,this._colorMap=l,this._contourShader=u,this._contourPickShader=c,this._contourBuffer=h,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new n([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=p,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[0/0,0/0,0/0],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[_(v.mallocFloat(1024),[0,0]),_(v.mallocFloat(1024),[0,0]),_(v.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}function o(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||F,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=N.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],M(l,t.model,l);var u=N.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)u[i][n]=t.clipBounds[i][n];u[0][r]=-1e8,u[1][r]=1e8}return N.showSurface=o,N.showContour=s,N}function s(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=B;n.model=t.model||I,n.view=t.view||I,n.projection=t.projection||I,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.contourColor=this.contourColor[0],n.inverseModel=k(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],s=0;s<3;++s)a[s]=Math.min(Math.max(this.clipBounds[i][s],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=V,n.vertexColor=this.vertexColor;var l=U;for(M(l,n.view,n.model),M(l,n.projection,l),k(l,l),i=0;i<3;++i)n.eyePosition[i]=l[12+i]/l[15];var u=l[15];for(i=0;i<3;++i)u+=this.lightPosition[i]*l[4*i+3];for(i=0;i<3;++i){var c=l[12+i];for(s=0;s<3;++s)c+=l[4*s+i]*this.lightPosition[s];n.lightPosition[i]=c/u}var h=o(n,this);if(h.showSurface&&e===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=h.projections[i],this._shader.uniforms.clipBounds=h.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(h.showContour&&!e){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var d=this._contourVAO;for(d.bind(),i=0;i<3;++i)for(f.uniforms.permutation=O[i],r.lineWidth(this.contourWidth[i]),s=0;s=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},R.pickSlots=1,R.setPickBase=function(t){this.pickId=t};var F=[0,0,0],N={showSurface:!1,showContour:!1,projections:[I.slice(),I.slice(),I.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]},B={model:I,view:I,projection:I,inverseModel:I.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},U=I.slice(),V=[1,0,0,0,1,0,0,0,1];R.draw=function(t){return s.call(this,t,!1)},R.drawTransparent=function(t){return s.call(this,t,!0)};var H={model:I,view:I,projection:I,inverseModel:I,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};R.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=H;r.model=t.model||I,r.view=t.view||I,r.projection=t.projection||I,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.permutation=V;for(var n=0;n<2;++n)for(var i=r.clipBounds[n],a=0;a<3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);var s=o(r,this);if(s.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(e.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&(this._pickShader.uniforms.model=s.projections[n],this._pickShader.uniforms.clipBounds=s.clipBounds[n],this._vao.draw(e.TRIANGLES,this._vertexCount));this._vao.unbind()}if(s.showContour){var l=this._contourPickShader;l.bind(),l.uniforms=r;var u=this._contourVAO;for(u.bind(),a=0;a<3;++a)for(e.lineWidth(this.contourWidth[a]),l.uniforms.permutation=O[a],n=0;n>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var u=r.position;u[0]=u[1]=u[2]=0;for(var c=0;c<2;++c)for(var h=c?a:1-a,f=0;f<2;++f)for(var d=f?l:1-l,p=i+c,m=s+f,g=h*d,v=0;v<3;++v)u[v]+=this._field[v].get(p,m)*g;for(var y=this._pickResult.level,b=0;b<3;++b)if(y[b]=A.le(this.contourLevels[b],u[b]),y[b]<0)this.contourLevels[b].length>0&&(y[b]=0);else if(y[b]Math.abs(_-u[b])&&(y[b]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},R.update=function(t){t=t||{},this.dirty=!0,"contourWidth"in t&&(this.contourWidth=u(t.contourWidth,Number)),"showContour"in t&&(this.showContour=u(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=u(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=h(t.contourColor)),"contourProject"in t&&(this.contourProject=u(t.contourProject,function(t){return u(t,Boolean)})),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=h(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=u(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=u(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var n=(e.shape[0]+2)*(e.shape[1]+2);n>this._field[2].data.length&&(v.freeFloat(this._field[2].data),this._field[2].data=v.mallocFloat(d.nextPow2(n))),this._field[2]=_(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),l(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(v.freeFloat(this._field[o].data),this._field[o].data=v.mallocFloat(this._field[2].size)),this._field[o]=_(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var s=t.coords;if(!Array.isArray(s)||3!==s.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=s[o];for(y=0;y<2;++y)if(c.shape[y]!==a[y])throw new Error("gl-surface: coords have incorrect shape");l(this._field[o],c)}}else if(t.ticks){var f=t.ticks;if(!Array.isArray(f)||2!==f.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=f[o];if((Array.isArray(p)||p.length)&&(p=_(p)),p.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var m=_(p.data,a);m.stride[o]=p.stride[0],m.stride[1^o]=0,l(this._field[o],m)}}else{for(o=0;o<2;++o){var g=[0,0];g[o]=1,this._field[o]=_(this._field[o].data,[a[0]+2,a[1]+2],g,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var xt=0;xt<5;++xt)tt.pop();H-=1}continue t}tt.push(it[0],it[1],st[0],st[1],it[2]),H+=1}}nt.push(H)}this._contourOffsets[et]=rt,this._contourCounts[et]=nt}var _t=v.mallocFloat(tt.length);for(o=0;oi||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function o(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}function s(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function l(t,e,r,n,i,a,o,l){var u=l.dtype,c=l.shape.slice();if(c.length<2||c.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var h=0,f=0,d=s(c,l.stride.slice());"float32"===u?h=t.FLOAT:"float64"===u?(h=t.FLOAT,d=!1,u="float32"):"uint8"===u?h=t.UNSIGNED_BYTE:(h=t.UNSIGNED_BYTE,d=!1,u="uint8");if(2===c.length)f=t.LUMINANCE,c=[c[0],c[1],1],l=p(l.data,c,[l.stride[0],l.stride[1],1],l.offset);else{if(3!==c.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===c[2])f=t.ALPHA;else if(2===c[2])f=t.LUMINANCE_ALPHA;else if(3===c[2])f=t.RGB;else{if(4!==c[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");f=t.RGBA}c[2]}if(f!==t.LUMINANCE&&f!==t.ALPHA||i!==t.LUMINANCE&&i!==t.ALPHA||(f=i),f!==i)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var v=l.size,y=o.indexOf(n)<0;if(y&&o.push(n),h===a&&d)0===l.offset&&l.data.length===v?y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,l.data):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,l.data):y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,l.data.subarray(l.offset,l.offset+v)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,l.data.subarray(l.offset,l.offset+v));else{var b;b=a===t.FLOAT?g.mallocFloat32(v):g.mallocUint8(v);var _=p(b,c,[c[2],c[2]*c[0],1]);h===t.FLOAT&&a===t.UNSIGNED_BYTE?x(_,l):m.assign(_,l),y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,b.subarray(0,v)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,b.subarray(0,v)),a===t.FLOAT?g.freeFloat32(b):g.freeUint8(b)}}function u(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function c(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var s=u(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new o(t,s,e,r,n,i)}function h(t,e,r,n,i,a){var s=u(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new o(t,s,r,n,i,a)}function f(t,e){var r=e.dtype,n=e.shape.slice(),i=t.getParameter(t.MAX_TEXTURE_SIZE);if(n[0]<0||n[0]>i||n[1]<0||n[1]>i)throw new Error("gl-texture2d: Invalid texture size");var a=s(n,e.stride.slice()),l=0;"float32"===r?l=t.FLOAT:"float64"===r?(l=t.FLOAT,a=!1,r="float32"):"uint8"===r?l=t.UNSIGNED_BYTE:(l=t.UNSIGNED_BYTE,a=!1,r="uint8");var c=0;if(2===n.length)c=t.LUMINANCE,n=[n[0],n[1],1],e=p(e.data,n,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==n.length)throw new Error("gl-texture2d: Invalid shape for texture") -;if(1===n[2])c=t.ALPHA;else if(2===n[2])c=t.LUMINANCE_ALPHA;else if(3===n[2])c=t.RGB;else{if(4!==n[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");c=t.RGBA}}l!==t.FLOAT||t.getExtension("OES_texture_float")||(l=t.UNSIGNED_BYTE,a=!1);var h,f,d=e.size;if(a)h=0===e.offset&&e.data.length===d?e.data:e.data.subarray(e.offset,e.offset+d);else{var v=[n[2],n[2]*n[0],1];f=g.malloc(d,r);var y=p(f,n,v,0);"float32"!==r&&"float64"!==r||l!==t.UNSIGNED_BYTE?m.assign(y,e):x(y,e),h=f.subarray(0,d)}var b=u(t);return t.texImage2D(t.TEXTURE_2D,0,c,n[0],n[1],0,c,l,h),a||g.free(f),new o(t,b,n[0],n[1],c,l)}function d(t){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(v||n(t),"number"==typeof arguments[1])return c(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return c(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var e=arguments[1],r=i(e)?e:e.raw;if(r)return h(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return f(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}var p=t("ndarray"),m=t("ndarray-ops"),g=t("typedarray-pool");e.exports=d;var v=null,y=null,b=null,x=function(t,e){m.muls(t,e,255)},_=o.prototype;Object.defineProperties(_,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&v.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),y.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&v.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),y.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),b.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),b.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(b.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return a(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return t|=0,a(this,t,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,a(this,this._shape[0],t),t}}}),_.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},_.dispose=function(){this.gl.deleteTexture(this.handle)},_.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},_.setPixels=function(t,e,r,n){var a=this.gl;this.bind(),Array.isArray(e)?(n=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),n=n||0;var o=i(t)?t:t.raw;if(o){this._mipLevels.indexOf(n)<0?(a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,this.type,o),this._mipLevels.push(n)):a.texSubImage2D(a.TEXTURE_2D,n,e,r,this.format,this.type,o)}else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>n||r+t.shape[0]>this._shape[0]>>>n||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");l(a,e,r,n,this.format,this.type,this._mipLevels,t)}}},{ndarray:449,"ndarray-ops":443,"typedarray-pool":521}],252:[function(t,e,r){"use strict";function n(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}e.exports=n},{}],261:[function(t,e,r){function n(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}e.exports=n},{}],262:[function(t,e,r){function n(t,e,r,n){return i[0]=n,i[1]=r,i[2]=e,i[3]=t,a[0]}e.exports=n;var i=new Uint8Array(4),a=new Float32Array(i.buffer)},{}],263:[function(t,e,r){function n(t){for(var e=Array.isArray(t)?t:i(t),r=0;r0)continue;n=t.slice(0,1).join("")}return e(n),G+=n.length,U=U.slice(n.length),U.length}}function z(){return/[^a-fA-F0-9]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),j=O,F+1)}function D(){return"."===O?(U.push(O),B=g,j=O,F+1):/[eE]/.test(O)?(U.push(O),B=g,j=O,F+1):"x"===O&&1===U.length&&"0"===U[0]?(B=w,U.push(O),j=O,F+1):/[^\d]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),j=O,F+1)}function I(){return"f"===O&&(U.push(O),j=O,F+=1),/[eE]/.test(O)?(U.push(O),j=O,F+1):"-"===O&&/[eE]/.test(j)?(U.push(O),j=O,F+1):/[^\d]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),j=O,F+1)}function P(){if(/[^\d\w_]/.test(O)){var t=U.join("");return B=J.indexOf(t)>-1?b:Z.indexOf(t)>-1?y:v,e(U.join("")),B=u,F}return U.push(O),j=O,F+1}var O,j,R,F=0,N=0,B=u,U=[],V=[],H=1,q=0,G=0,Y=!1,W=!1,X="";t=t||{};var Z=o,J=i;return"300 es"===t.version&&(Z=l,J=s),function(t){return V=[],null!==t?r(t.replace?t.replace(/\r\n/g,"\n"):t):n()}}e.exports=n;var i=t("./lib/literals"),a=t("./lib/operators"),o=t("./lib/builtins"),s=t("./lib/literals-300es"),l=t("./lib/builtins-300es"),u=999,c=9999,h=0,f=1,d=2,p=3,m=4,g=5,v=6,y=7,b=8,x=9,_=10,w=11,M=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":266,"./lib/builtins-300es":265,"./lib/literals":268,"./lib/literals-300es":267,"./lib/operators":269}],265:[function(t,e,r){var n=t("./builtins");n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":266}],266:[function(t,e,r){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],267:[function(t,e,r){var n=t("./literals");e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":268}],268:[function(t,e,r){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],269:[function(t,e,r){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],270:[function(t,e,r){function n(t,e){var r=i(e),n=[];return n=n.concat(r(t)),n=n.concat(r(null))}var i=t("./index");e.exports=n},{"./index":264}],271:[function(t,e,r){"use strict";function n(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var a=new Int32Array(this.arrayBuffer);t=a[0],e=a[1],r=a[2],this.d=e+2*r;for(var o=0;o=u[f+0]&&n>=u[f+1]?(o[h]=!0,a.push(l[h])):o[h]=!1}}},n.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),u=this._convertToCellCoord(r),c=this._convertToCellCoord(n),h=s;h<=u;h++)for(var f=l;f<=c;f++){var d=this.d*f+h;if(i.call(this,t,e,r,n,d,a,o))return}},n.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},n.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=i+this.cells.length+1+1,r=0,n=0;n>1,c=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+t[e+h],h+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+h],h+=f,c-=8);if(0===a)a=1-u;else{if(a===l)return o?0/0:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),e+=o+h>=1?f/l:f*Math.pow(2,1-h),e*l>=2&&(o++,l/=2),o+h>=c?(s=0,o=c):o+h>=1?(s=(e*l-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;t[r+d]=255&o,d+=p,o/=256,u-=8);t[r+d-p]|=128*m}},{}],273:[function(t,e,r){"use strict";function n(t,e,r){this.vertices=t,this.adjacent=e,this.boundary=r,this.lastVisited=-1}function i(t,e,r){this.vertices=t,this.cell=e,this.index=r}function a(t,e){return c(t.vertices,e.vertices)}function o(t){for(var e=["function orient(){var tuple=this.tuple;return test("],r=0;r<=t;++r)r>0&&e.push(","),e.push("tuple[",r,"]");e.push(")}return orient");var n=new Function("test",e.join("")),i=u[t+1];return i||(i=u),n(i)}function s(t,e,r){this.dimension=t,this.vertices=e,this.simplices=r,this.interior=r.filter(function(t){return!t.boundary}),this.tuple=new Array(t+1);for(var n=0;n<=t;++n)this.tuple[n]=this.vertices[n];var i=h[t];i||(i=h[t]=o(t)),this.orient=i}function l(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var a=t.slice(0,i+1),o=u.apply(void 0,a);if(0===o)throw new Error("Input not in general position");for(var l=new Array(i+1),c=0;c<=i;++c)l[c]=c;o<0&&(l[0]=1,l[1]=0);for(var h=new n(l,new Array(i+1),!1),f=h.adjacent,d=new Array(i+2),c=0;c<=i;++c){for(var p=l.slice(),m=0;m<=i;++m)m===c&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var v=new n(p,new Array(i+1),!0);f[c]=v,d[c]=v}d[i+1]=h;for(var c=0;c<=i;++c)for(var p=f[c].vertices,y=f[c].adjacent,m=0;m<=i;++m){var b=p[m];if(b<0)y[m]=h;else for(var x=0;x<=i;++x)f[x].vertices.indexOf(b)<0&&(y[m]=f[x])}for(var _=new s(i,a,d),w=!!e,c=i+1;c0;){t=o.pop();for(var s=(t.vertices,t.adjacent),l=0;l<=r;++l){var u=s[l];if(u.boundary&&!(u.lastVisited<=-n)){for(var c=u.vertices,h=0;h<=r;++h){var f=c[h];i[h]=f<0?e:a[f]}var d=this.orient();if(d>0)return u;u.lastVisited=-n,0===d&&o.push(u)}}}return null},f.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,u=s.adjacent,c=0;c<=n;++c)a[c]=i[l[c]];s.lastVisited=r;for(var c=0;c<=n;++c){var h=u[c];if(!(h.lastVisited>=r)){var f=a[c];a[c]=t;var d=this.orient();if(a[c]=f,d<0){s=h;continue t}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},f.addPeaks=function(t,e){var r=this.vertices.length-1,o=this.dimension,s=this.vertices,l=this.tuple,u=this.interior,c=this.simplices,h=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,u.push(e);for(var f=[];h.length>0;){var e=h.pop(),d=e.vertices,p=e.adjacent,m=d.indexOf(r);if(!(m<0))for(var g=0;g<=o;++g)if(g!==m){var v=p[g];if(v.boundary&&!(v.lastVisited>=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var b=0,x=0;x<=o;++x)y[x]<0?(b=x,l[x]=t):l[x]=s[y[x]];var _=this.orient();if(_>0){y[b]=r,v.boundary=!1,u.push(v),h.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var w=v.adjacent,M=d.slice(),k=p.slice(),A=new n(M,k,!0);c.push(A);var T=w.indexOf(e);if(!(T<0)){w[T]=A,k[m]=v,M[g]=-1,k[g]=e,p[g]=A,A.flip();for(var x=0;x<=o;++x){var S=M[x];if(!(S<0||S===r)){for(var E=new Array(o-1),L=0,C=0;C<=o;++C){var z=M[C];z<0||C===x||(E[L++]=z)}f.push(new i(E,A,x))}}}}}}f.sort(a);for(var g=0;g+1=0?o[l++]=s[c]:u=1&c;if(u===(1&t)){var h=o[0];o[0]=o[1],o[1]=h}e.push(o)}}return e}},{"robust-orientation":489,"simplicial-complex":500}],274:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}function i(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function a(t,e){var r=p(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function o(t,e){var r=t.intervals([]);r.push(e),a(t,r)}function s(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?y:(r.splice(n,1),a(t,r),b)}function l(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function c(t,e){for(var r=0;r>1],a=[],o=[],s=[],r=0;r3*(e+1)?o(this,t):this.left.insert(t):this.left=p([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?o(this,t):this.right.insert(t):this.right=p([t]);else{var r=v.ge(this.leftPoints,t,f),n=v.ge(this.rightPoints,t,d);this.leftPoints.splice(r,0,t),this.rightPoints.splice(n,0,t)}},x.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1))return s(this,t);var r=this.left.remove(t);return 2===r?(this.left=null,this.count-=1,b):(r===b&&(this.count-=1),r)}if(t[0]>this.mid){if(!this.right)return y;if(4*(this.left?this.left.count:0)>3*(e-1))return s(this,t);var r=this.right.remove(t);return 2===r?(this.right=null,this.count-=1,b):(r===b&&(this.count-=1),r)}if(1===this.count)return this.leftPoints[0]===t?2:y;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var o=this.left,r=this.right;n.count-=a.count,n.right=a.left,a.left=o,a.right=r}i(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?i(this,this.left):i(this,this.right);return b}for(var o=v.ge(this.leftPoints,t,f);othis.mid){if(this.right){var r=this.right.queryPoint(t,e);if(r)return r}return u(this.rightPoints,t,e)}return c(this.leftPoints,e)},x.queryInterval=function(t,e,r){if(tthis.mid&&this.right){var n=this.right.queryInterval(t,e,r);if(n)return n}return ethis.mid?u(this.rightPoints,t,r):c(this.leftPoints,r)};var _=m.prototype;_.insert=function(t){this.root?this.root.insert(t):this.root=new n(t[0],null,null,[t],[t])},_.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==y}return!1},_.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},_.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(_,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(_,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":59}],275:[function(t,e,r){"use strict";function n(t,e){e=e||new Array(t.length);for(var r=0;r=r&&s<=i&&l>=n&&l<=a&&c.push(t[p]);else{var m=Math.floor((d+f)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[m]);var g=(h+1)%2;(0===h?r<=s:n<=l)&&(u.push(d),u.push(m-1),u.push(g)),(0===h?i>=s:a>=l)&&(u.push(m+1),u.push(f),u.push(g))}}return c}e.exports=n},{}],282:[function(t,e,r){"use strict";function n(t,e,r,a,o,s){if(!(o-a<=r)){var l=Math.floor((a+o)/2);i(t,e,l,a,o,s%2),n(t,e,r,a,l-1,s+1),n(t,e,r,l+1,o,s+1)}}function i(t,e,r,n,o,s){for(;o>n;){if(o-n>600){var l=o-n+1,u=r-n+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1);i(t,e,r,Math.max(n,Math.floor(r-u*h/l+f)),Math.min(o,Math.floor(r+(l-u)*h/l+f)),s)}var d=e[2*r+s],p=n,m=o;for(a(t,e,n,r),e[2*o+s]>d&&a(t,e,n,o);pd;)m--}e[2*n+s]===d?a(t,e,n,m):(m++,a(t,e,m,o)),m<=r&&(n=m+1),r<=m&&(o=m-1)}}function a(t,e,r,n){o(t,r,n),o(e,2*r,2*n),o(e,2*r+1,2*n+1)}function o(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}e.exports=n},{}],283:[function(t,e,r){"use strict";function n(t,e,r,n,a,o){for(var s=[0,t.length-1,0],l=[],u=a*a;s.length;){var c=s.pop(),h=s.pop(),f=s.pop();if(h-f<=o)for(var d=f;d<=h;d++)i(e[2*d],e[2*d+1],r,n)<=u&&l.push(t[d]);else{var p=Math.floor((f+h)/2),m=e[2*p],g=e[2*p+1];i(m,g,r,n)<=u&&l.push(t[p]);var v=(c+1)%2;(0===c?r-a<=m:n-a<=g)&&(s.push(f),s.push(p-1),s.push(v)),(0===c?r+a>=m:n+a>=g)&&(s.push(p+1),s.push(h),s.push(v))}}return l}function i(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}e.exports=n},{}],284:[function(t,e,r){"use strict";function n(t,e){var r;if(h(t)){var l,u=t.stops&&"object"==typeof t.stops[0][0],c=u||void 0!==t.property,f=u||!c,d=t.type||e||"exponential";if("exponential"===d)l=o;else if("interval"===d)l=a;else if("categorical"===d)l=i;else{if("identity"!==d)throw new Error('Unknown function type "'+d+'"');l=s}if(u){for(var p={},m=[],g=0;g=t.stops.length)break;if(e<=t.stops[n][0])break;n++}return 0===n?t.stops[n][1]:n===t.stops.length?t.stops[n-1][1]:l(e,r,t.stops[n-1][0],t.stops[n][0],t.stops[n-1][1],t.stops[n][1])}function s(t,e){return e}function l(t,e,r,n,i,a){return"function"==typeof i?function(){var o=i.apply(void 0,arguments),s=a.apply(void 0,arguments);return l(t,e,r,n,o,s)}:i.length?c(t,e,r,n,i,a):u(t,e,r,n,i,a)}function u(t,e,r,n,i,a){var o,s=n-r,l=t-r;return o=1===e?l/s:(Math.pow(e,l)-1)/(Math.pow(e,s)-1),i*(1-o)+a*o}function c(t,e,r,n,i,a){for(var o=[],s=0;s -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},linepattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_blur;\n\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_fade;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\nvoid main() {\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_linewidth.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_linewidth.t) or when fading out\n // (v_linewidth.s)\n float blur = u_blur * v_gamma_scale;\n float alpha = clamp(min(dist - (v_linewidth.t - blur), v_linewidth.s - dist) / blur, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n float y_a = 0.5 + (v_normal.y * v_linewidth.s / u_pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * v_linewidth.s / u_pattern_size_b.y);\n vec2 pos_a = mix(u_pattern_tl_a, u_pattern_br_a, vec2(x_a, y_a));\n vec2 pos_b = mix(u_pattern_tl_b, u_pattern_br_b, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n alpha *= u_opacity;\n\n gl_FragColor = color * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_linewidth;\nuniform mediump float u_gapwidth;\nuniform mediump float u_antialiasing;\nuniform mediump float u_extra;\nuniform mat2 u_antialiasingmatrix;\nuniform mediump float u_offset;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n v_linesofar = a_linesofar;\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},linesdfpattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform lowp vec4 u_color;\nuniform lowp float u_opacity;\n\nuniform float u_blur;\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\nvoid main() {\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_linewidth.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_linewidth.t) or when fading out\n // (v_linewidth.s)\n float blur = u_blur * v_gamma_scale;\n float alpha = clamp(min(dist - (v_linewidth.t - blur), v_linewidth.s - dist) / blur, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma, 0.5 + u_sdfgamma, sdfdist);\n\n gl_FragColor = u_color * (alpha * u_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_linewidth;\nuniform mediump float u_gapwidth;\nuniform mediump float u_antialiasing;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform float u_extra;\nuniform mat2 u_antialiasingmatrix;\nuniform mediump float u_offset;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},outline:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n#pragma mapbox: define lowp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = smoothstep(1.0, 0.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},outlinepattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\nvoid main() {\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = smoothstep(1.0, 0.0, dist);\n \n\n gl_FragColor = mix(color1, color2, u_mix) * alpha * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n vec2 scaled_size_a = u_scale_a * u_pattern_size_a;\n vec2 scaled_size_b = u_scale_b * u_pattern_size_b;\n\n // the correct offset needs to be calculated.\n //\n // The offset depends on how many pixels are between the world origin and\n // the edge of the tile:\n // vec2 offset = mod(pixel_coord, size)\n //\n // At high zoom levels there are a ton of pixels between the world origin\n // and the edge of the tile. The glsl spec only guarantees 16 bits of\n // precision for highp floats. We need more than that.\n //\n // The pixel_coord is passed in as two 16 bit values:\n // pixel_coord_upper = floor(pixel_coord / 2^16)\n // pixel_coord_lower = mod(pixel_coord, 2^16)\n //\n // The offset is calculated in a series of steps that should preserve this precision:\n vec2 offset_a = mod(mod(mod(u_pixel_coord_upper, scaled_size_a) * 256.0, scaled_size_a) * 256.0 + u_pixel_coord_lower, scaled_size_a);\n vec2 offset_b = mod(mod(mod(u_pixel_coord_upper, scaled_size_b) * 256.0, scaled_size_b) * 256.0 + u_pixel_coord_lower, scaled_size_b);\n\n v_pos_a = (u_tile_units_to_pixels * a_pos + offset_a) / scaled_size_a;\n v_pos_b = (u_tile_units_to_pixels * a_pos + offset_b) / scaled_size_b;\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},pattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n vec2 scaled_size_a = u_scale_a * u_pattern_size_a;\n vec2 scaled_size_b = u_scale_b * u_pattern_size_b;\n\n // the correct offset needs to be calculated.\n //\n // The offset depends on how many pixels are between the world origin and\n // the edge of the tile:\n // vec2 offset = mod(pixel_coord, size)\n //\n // At high zoom levels there are a ton of pixels between the world origin\n // and the edge of the tile. The glsl spec only guarantees 16 bits of\n // precision for highp floats. We need more than that.\n //\n // The pixel_coord is passed in as two 16 bit values:\n // pixel_coord_upper = floor(pixel_coord / 2^16)\n // pixel_coord_lower = mod(pixel_coord, 2^16)\n //\n // The offset is calculated in a series of steps that should preserve this precision:\n vec2 offset_a = mod(mod(mod(u_pixel_coord_upper, scaled_size_a) * 256.0, scaled_size_a) * 256.0 + u_pixel_coord_lower, scaled_size_a);\n vec2 offset_b = mod(mod(mod(u_pixel_coord_upper, scaled_size_b) * 256.0, scaled_size_b) * 256.0 + u_pixel_coord_lower, scaled_size_b);\n\n v_pos_a = (u_tile_units_to_pixels * a_pos + offset_a) / scaled_size_a;\n v_pos_b = (u_tile_units_to_pixels * a_pos + offset_b) / scaled_size_b;\n}\n"},raster:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity0;\nuniform float u_opacity1;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n vec4 color = color0 * u_opacity0 + color1 * u_opacity1;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb), color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n", -vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos0 = (((a_texture_pos / 32767.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},icon:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform lowp float u_opacity;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * u_opacity;\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_texture_pos;\nattribute vec4 a_data;\n\n\n// matrix is for the vertex position.\nuniform mat4 u_matrix;\n\nuniform mediump float u_zoom;\nuniform bool u_rotate_with_map;\nuniform vec2 u_extrude_scale;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n vec2 a_tex = a_texture_pos.xy;\n mediump float a_labelminzoom = a_data[0];\n mediump vec2 a_zoom = a_data.pq;\n mediump float a_minzoom = a_zoom[0];\n mediump float a_maxzoom = a_zoom[1];\n\n // u_zoom is the current zoom level adjusted for the change in font size\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\n\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\n if (u_rotate_with_map) {\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\n gl_Position.z += z * gl_Position.w;\n } else {\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n }\n\n v_tex = a_tex / u_texsize;\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\n}\n"},sdf:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform lowp vec4 u_color;\nuniform lowp float u_opacity;\nuniform lowp float u_buffer;\nuniform lowp float u_gamma;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\nvarying float v_gamma_scale;\n\nvoid main() {\n lowp float dist = texture2D(u_texture, v_tex).a;\n lowp float fade_alpha = texture2D(u_fadetexture, v_fade_tex).a;\n lowp float gamma = u_gamma * v_gamma_scale;\n lowp float alpha = smoothstep(u_buffer - gamma, u_buffer + gamma, dist) * fade_alpha;\n\n gl_FragColor = u_color * (alpha * u_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nconst float PI = 3.141592653589793;\n\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_texture_pos;\nattribute vec4 a_data;\n\n\n// matrix is for the vertex position.\nuniform mat4 u_matrix;\n\nuniform mediump float u_zoom;\nuniform bool u_rotate_with_map;\nuniform bool u_pitch_with_map;\nuniform mediump float u_pitch;\nuniform mediump float u_bearing;\nuniform mediump float u_aspect_ratio;\nuniform vec2 u_extrude_scale;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_tex = a_texture_pos.xy;\n mediump float a_labelminzoom = a_data[0];\n mediump vec2 a_zoom = a_data.pq;\n mediump float a_minzoom = a_zoom[0];\n mediump float a_maxzoom = a_zoom[1];\n\n // u_zoom is the current zoom level adjusted for the change in font size\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\n\n // pitch-alignment: map\n // rotation-alignment: map | viewport\n if (u_pitch_with_map) {\n lowp float angle = u_rotate_with_map ? (a_data[1] / 256.0 * 2.0 * PI) : u_bearing;\n lowp float asin = sin(angle);\n lowp float acos = cos(angle);\n mat2 RotationMatrix = mat2(acos, asin, -1.0 * asin, acos);\n vec2 offset = RotationMatrix * a_offset;\n vec2 extrude = u_extrude_scale * (offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\n gl_Position.z += z * gl_Position.w;\n // pitch-alignment: viewport\n // rotation-alignment: map\n } else if (u_rotate_with_map) {\n // foreshortening factor to apply on pitched maps\n // as a label goes from horizontal <=> vertical in angle\n // it goes from 0% foreshortening to up to around 70% foreshortening\n lowp float pitchfactor = 1.0 - cos(u_pitch * sin(u_pitch * 0.75));\n\n lowp float lineangle = a_data[1] / 256.0 * 2.0 * PI;\n\n // use the lineangle to position points a,b along the line\n // project the points and calculate the label angle in projected space\n // this calculation allows labels to be rendered unskewed on pitched maps\n vec4 a = u_matrix * vec4(a_pos, 0, 1);\n vec4 b = u_matrix * vec4(a_pos + vec2(cos(lineangle),sin(lineangle)), 0, 1);\n lowp float angle = atan((b[1]/b[3] - a[1]/a[3])/u_aspect_ratio, b[0]/b[3] - a[0]/a[3]);\n lowp float asin = sin(angle);\n lowp float acos = cos(angle);\n mat2 RotationMatrix = mat2(acos, -1.0 * asin, asin, acos);\n\n vec2 offset = RotationMatrix * (vec2((1.0-pitchfactor)+(pitchfactor*cos(angle*2.0)), 1.0) * a_offset);\n vec2 extrude = u_extrude_scale * (offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n gl_Position.z += z * gl_Position.w;\n // pitch-alignment: viewport\n // rotation-alignment: viewport\n } else {\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n }\n\n v_gamma_scale = (gl_Position.w - 0.5);\n\n v_tex = a_tex / u_texsize;\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\n}\n"},collisionbox:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_zoom;\nuniform float u_maxzoom;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\n\nvoid main() {\n\n float alpha = 0.5;\n\n gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0) * alpha;\n\n if (v_placement_zoom > u_zoom) {\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n }\n\n if (u_zoom >= v_max_zoom) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0) * alpha * 0.25;\n }\n\n if (v_placement_zoom >= u_maxzoom) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0) * alpha * 0.2;\n }\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_data;\n\nuniform mat4 u_matrix;\nuniform float u_scale;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos + a_extrude / u_scale, 0.0, 1.0);\n\n v_max_zoom = a_data.x;\n v_placement_zoom = a_data.y;\n}\n"}},e.exports.util="float evaluate_zoom_function_1(const vec4 values, const float t) {\n if (t < 1.0) {\n return mix(values[0], values[1], t);\n } else if (t < 2.0) {\n return mix(values[1], values[2], t - 1.0);\n } else {\n return mix(values[2], values[3], t - 2.0);\n }\n}\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\n if (t < 1.0) {\n return mix(value0, value1, t);\n } else if (t < 2.0) {\n return mix(value1, value2, t - 1.0);\n } else {\n return mix(value2, value3, t - 2.0);\n }\n}\n"},{path:457}],286:[function(t,e,r){"use strict";function n(t,e){this.message=(t?t+": ":"")+i.apply(i,Array.prototype.slice.call(arguments,2)),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)}var i=t("util").format;e.exports=n},{util:529}],287:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1;e7)return[new n(c,l,"constants have been deprecated as of v8")];if(!(l in f.constants))return[new n(c,l,'constant "%s" not found',l)];e=a({},e,{value:f.constants[l]})}return u.function&&"object"===i(l)?r(e):u.type&&s[u.type]?s[u.type](e):o(a({},e,{valueSpec:u.type?h[u.type]:u}))}},{"../error/validation_error":286,"../util/extend":287,"../util/get_type":288,"./validate_array":291,"./validate_boolean":292,"./validate_color":293,"./validate_constants":294,"./validate_enum":295,"./validate_filter":296,"./validate_function":297,"./validate_layer":299,"./validate_number":301,"./validate_object":302,"./validate_source":304,"./validate_string":305}],291:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("./validate"),a=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.valueSpec,o=t.style,s=t.styleSpec,l=t.key,u=t.arrayElementValidator||i;if("array"!==n(e))return[new a(l,e,"array expected, %s found",n(e))];if(r.length&&e.length!==r.length)return[new a(l,e,"array length %d expected, length %d found",r.length,e.length)];if(r["min-length"]&&e.length7)return r?[new n(e,r,"constants have been deprecated as of v8")]:[];var a=i(r);if("object"!==a)return[new n(e,r,"object expected, %s found",a)];var o=[];for(var s in r)"@"!==s[0]&&o.push(new n(e+"."+s,r[s],'constants must start with "@"'));return o}},{"../error/validation_error":286,"../util/get_type":288}],295:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint");e.exports=function(t){var e=t.key,r=t.value,a=t.valueSpec,o=[];return a.values.indexOf(i(r))===-1&&o.push(new n(e,r,"expected one of [%s], %s found",a.values.join(", "),r)),o}},{"../error/validation_error":286,"../util/unbundle_jsonlint":289}],296:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_enum"),a=t("../util/get_type"),o=t("../util/unbundle_jsonlint");e.exports=function t(e){var r,s=e.value,l=e.key,u=e.styleSpec,c=[];if("array"!==a(s))return[new n(l,s,"array expected, %s found",a(s))];if(s.length<1)return[new n(l,s,"filter array must have at least 1 element")];switch(c=c.concat(i({key:l+"[0]",value:s[0],valueSpec:u.filter_operator,style:e.style,styleSpec:e.styleSpec})),o(s[0])){case"<":case"<=":case">":case">=":s.length>=2&&"$type"==s[1]&&c.push(new n(l,s,'"$type" cannot be use with operator "%s"',s[0]));case"==":case"!=":3!=s.length&&c.push(new n(l,s,'filter array for operator "%s" must have 3 elements',s[0]));case"in":case"!in":s.length>=2&&(r=a(s[1]),"string"!==r?c.push(new n(l+"[1]",s[1],"string expected, %s found",r)):"@"===s[1][0]&&c.push(new n(l+"[1]",s[1],"filter key cannot be a constant")));for(var h=2;h=8&&(f&&!t.valueSpec["property-function"]?p.push(new n(t.key,t.value,"property functions not supported")):d&&!t.valueSpec["zoom-function"]&&p.push(new n(t.key,t.value,"zoom functions not supported"))),p}},{"../error/validation_error":286,"../util/get_type":288,"./validate":290,"./validate_array":291,"./validate_number":301,"./validate_object":302}],298:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_string");e.exports=function(t){var e=t.value,r=t.key,a=i(t);return a.length?a:(e.indexOf("{fontstack}")===-1&&a.push(new n(r,e,'"glyphs" url must include a "{fontstack}" token')),e.indexOf("{range}")===-1&&a.push(new n(r,e,'"glyphs" url must include a "{range}" token')),a)}},{"../error/validation_error":286,"./validate_string":305}],299:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),a=t("./validate_object"),o=t("./validate_filter"),s=t("./validate_paint_property"),l=t("./validate_layout_property"),u=t("../util/extend");e.exports=function(t){var e=[],r=t.value,c=t.key,h=t.style,f=t.styleSpec;r.type||r.ref||e.push(new n(c,r,'either "type" or "ref" is required'));var d=i(r.type),p=i(r.ref);if(r.id)for(var m=0;ma.maximum?[new i(e,r,"%s is greater than the maximum value %s",r,a.maximum)]:[]}},{"../error/validation_error":286,"../util/get_type":288}],302:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/get_type"),a=t("./validate");e.exports=function(t){var e=t.key,r=t.value,o=t.valueSpec,s=t.objectElementValidators||{},l=t.style,u=t.styleSpec,c=[],h=i(r);if("object"!==h)return[new n(e,r,"object expected, %s found",h)];for(var f in r){var d=f.split(".")[0],p=o&&(o[d]||o["*"]),m=s[d]||s["*"];p||m?c=c.concat((m||a)({key:(e?e+".":e)+f,value:r[f],valueSpec:p,style:l,styleSpec:u,object:r,objectKey:f})):""!==e&&1!==e.split(".").length&&c.push(new n(e,r[f],'unknown property "%s"',f))}for(d in o)o[d].required&&void 0===o[d].default&&void 0===r[d]&&c.push(new n(e,r,'missing required property "%s"',d));return c}},{"../error/validation_error":286,"../util/get_type":288,"./validate":290}],303:[function(t,e,r){"use strict";var n=t("./validate"),i=t("../error/validation_error");e.exports=function(t){var e=t.key,r=t.style,a=t.styleSpec,o=t.value,s=t.objectKey,l=a["paint_"+t.layerType],u=s.match(/^(.*)-transition$/);return u&&l[u[1]]&&l[u[1]].transition?n({key:e,value:o,valueSpec:a.transition,style:r,styleSpec:a}):t.valueSpec||l[s]?n({key:t.key,value:o,valueSpec:t.valueSpec||l[s],style:r,styleSpec:a}):[new i(e,o,'unknown property "%s"',s)]}},{"../error/validation_error":286,"./validate":290}],304:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),a=t("./validate_object"),o=t("./validate_enum");e.exports=function(t){var e=t.value,r=t.key,s=t.styleSpec,l=t.style;if(!e.type)return[new n(r,e,'"type" is required')];switch(i(e.type)){case"vector":case"raster":var u=[];if(u=u.concat(a({key:r,value:e,valueSpec:s.source_tile,style:t.style,styleSpec:s})),"url"in e)for(var c in e)["type","url","tileSize"].indexOf(c)<0&&u.push(new n(r+"."+c,e[c],'a source with a "url" property may not include a "%s" property',c));return u;case"geojson":return a({key:r,value:e,valueSpec:s.source_geojson,style:l,styleSpec:s});case"video":return a({key:r,value:e,valueSpec:s.source_video,style:l,styleSpec:s});case"image":return a({key:r,value:e,valueSpec:s.source_image,style:l,styleSpec:s});default:return o({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","geojson","video","image"]},style:l,styleSpec:s})}}},{"../error/validation_error":286,"../util/unbundle_jsonlint":289,"./validate_enum":295,"./validate_object":302}],305:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.key,a=n(e);return"string"!==a?[new i(r,e,"string expected, %s found",a)]:[]}},{"../error/validation_error":286,"../util/get_type":288}],306:[function(t,e,r){"use strict";function n(t,e){e=e||l;var r=[];return r=r.concat(s({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:u}})),e.$version>7&&t.constants&&(r=r.concat(o({key:"constants",value:t.constants,style:t,styleSpec:e}))),i(r)}function i(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function a(t){return function(){return i(t.apply(this,arguments))}}var o=t("./validate/validate_constants"),s=t("./validate/validate"),l=t("../reference/latest.min"),u=t("./validate/validate_glyphs_url");n.source=a(t("./validate/validate_source")),n.layer=a(t("./validate/validate_layer")),n.filter=a(t("./validate/validate_filter")),n.paintProperty=a(t("./validate/validate_paint_property")),n.layoutProperty=a(t("./validate/validate_layout_property")),e.exports=n},{"../reference/latest.min":307,"./validate/validate":290,"./validate/validate_constants":294,"./validate/validate_filter":296,"./validate/validate_glyphs_url":298,"./validate/validate_layer":299,"./validate/validate_layout_property":300,"./validate/validate_paint_property":303,"./validate/validate_source":304}],307:[function(t,e,r){e.exports=t("./v8.min.json")},{"./v8.min.json":308}],308:[function(t,e,r){e.exports={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_tile","source_geojson","source_video","source_image"],source_tile:{type:{required:!0,type:"enum",values:["vector","raster"]},url:{type:"string"},tiles:{type:"array",value:"string"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:["geojson"]},data:{type:"*"},maxzoom:{type:"number",default:14},buffer:{type:"number",default:64},tolerance:{type:"number",default:3},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:400},clusterMaxZoom:{type:"number"}},source_video:{type:{required:!0,type:"enum",values:["video"]},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:["image"]},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:["fill","line","symbol","circle","raster","background"]},metadata:{type:"*"},ref:{type:"string"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:22},maxzoom:{type:"number",minimum:0,maximum:22},interactive:{type:"boolean",default:!1},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"},"paint.*":{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],layout_background:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_fill:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_circle:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["butt","round","square"],default:"butt"},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["bevel","round","miter"],default:"miter"},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,"property-function":!0,requires:[{"line-join":"miter"}]},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,"property-function":!0,requires:[{"line-join":"round"}]},visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["point","line"],default:"point"},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,"property-function":!0,units:"pixels",requires:[{"symbol-placement":"line"}]},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image"]},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image"]},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image","text-field"]},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"viewport",requires:["icon-image"]},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!1,values:["none","both","width","height"],default:"none",requires:["icon-image","text-field"]},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image","icon-text-fit","text-field"]},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,tokens:!0},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",requires:["icon-image"]},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"pixels",requires:["icon-image"]},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],requires:["text-field"]},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"viewport",requires:["text-field"]},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"]},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-max-width":{type:"number",default:10,minimum:0,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-line-height":{type:"number",default:1.2,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-letter-spacing":{type:"number",default:0,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["left","center","right"],default:"center",requires:["text-field"]},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:"center",requires:["text-field"]},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field",{"symbol-placement":"line"}]},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]}, -"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["none","uppercase","lowercase"],default:"none",requires:["text-field"]},"text-offset":{type:"array",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"]},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field"]},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field"]},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field","icon-image"]},visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_raster:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:["==","!=",">",">=","<","<=","in","!in","all","any","none","has","!has"]},geometry_type:{type:"enum",values:["Point","LineString","Polygon"]},color_operation:{type:"enum",values:["lighten","saturate","spin","fade","mix"]},function:{stops:{type:"array",required:!0,value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:["exponential","interval","categorical"],default:"exponential"}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},paint:["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!0},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"fill-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}]},"fill-outline-color":{type:"color",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}]},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["fill-translate"]},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,transition:!0}},paint_line:{"line-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"line-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}]},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["line-translate"]},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-gap-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-offset":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,"property-function":!0,minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}]},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,transition:!0}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-blur":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["circle-translate"]},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["icon-image","icon-translate"]},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["text-field","text-translate"]}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees"},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,default:0,minimum:0,maximum:1,transition:!0},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,default:1,minimum:0,maximum:1,transition:!0},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!0,units:"milliseconds"}},paint_background:{"background-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}]},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}}}},{}],309:[function(t,e,r){"use strict";function n(t){return!!(i()&&a()&&o()&&s()&&l()&&u()&&c()&&h(t&&t.failIfMajorPerformanceCaveat))}function i(){return"undefined"!=typeof window&&"undefined"!=typeof document}function a(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function o(){return Function.prototype&&Function.prototype.bind}function s(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function l(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function u(){return"Worker"in window}function c(){return"Uint8ClampedArray"in window}function h(t){return void 0===d[t]&&(d[t]=f(t)),d[t]}function f(t){var e=document.createElement("canvas"),r=Object.create(n.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,e.probablySupportsContext?e.probablySupportsContext("webgl",r)||e.probablySupportsContext("experimental-webgl",r):e.supportsContext?e.supportsContext("webgl",r)||e.supportsContext("experimental-webgl",r):e.getContext("webgl",r)||e.getContext("experimental-webgl",r)}void 0!==e&&e.exports?e.exports=n:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=n);var d={};n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},{}],310:[function(t,e,r){"use strict";function n(t){var e=t.layoutVertexArrayType;this.layoutVertexArray=new e;var r=t.elementArrayType;r&&(this.elementArray=new r);var n=t.elementArrayType2;n&&(this.elementArray2=new n),this.paintVertexArrays=i.mapObject(t.paintVertexArrayTypes,function(t){return new t})}var i=t("../util/util");e.exports=n,n.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,n.prototype.hasCapacityFor=function(t){return this.layoutVertexArray.length+t<=n.MAX_VERTEX_ARRAY_LENGTH},n.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},n.prototype.trim=function(){this.layoutVertexArray.trim(),this.elementArray&&this.elementArray.trim(),this.elementArray2&&this.elementArray2.trim();for(var t in this.paintVertexArrays)this.paintVertexArrays[t].trim()},n.prototype.serialize=function(){return{layoutVertexArray:this.layoutVertexArray.serialize(),elementArray:this.elementArray&&this.elementArray.serialize(),elementArray2:this.elementArray2&&this.elementArray2.serialize(),paintVertexArrays:i.mapObject(this.paintVertexArrays,function(t){return t.serialize()})}},n.prototype.getTransferables=function(t){t.push(this.layoutVertexArray.arrayBuffer),this.elementArray&&t.push(this.elementArray.arrayBuffer),this.elementArray2&&t.push(this.elementArray2.arrayBuffer);for(var e in this.paintVertexArrays)t.push(this.paintVertexArrays[e].arrayBuffer)}},{"../util/util":424}],311:[function(t,e,r){"use strict";function n(t){if(this.zoom=t.zoom,this.overscaling=t.overscaling,this.layer=t.layer,this.childLayers=t.childLayers,this.type=this.layer.type,this.features=[],this.id=this.layer.id,this.index=t.index,this.sourceLayer=this.layer.sourceLayer,this.sourceLayerIndex=t.sourceLayerIndex,this.minZoom=this.layer.minzoom,this.maxZoom=this.layer.maxzoom,this.paintAttributes=i(this),t.arrays){var e=this.programInterfaces;this.bufferGroups=c.mapObject(t.arrays,function(r,n){var i=e[n],a=t.paintVertexArrayTypes[n];return r.map(function(t){return new u(t,{layoutVertexArrayType:i.layoutVertexArrayType.serialize(),elementArrayType:i.elementArrayType&&i.elementArrayType.serialize(),elementArrayType2:i.elementArrayType2&&i.elementArrayType2.serialize(),paintVertexArrayTypes:a})})})}}function i(t){var e={};for(var r in t.programInterfaces){for(var n=e[r]={},i=0;i1?p.name+_:p.name;x[w]=m[_]*g}}},n.VertexArrayType=function(t){return new h({members:t,alignment:4})},n.ElementArrayType=function(t){return new h({members:[{type:"Uint16",name:"vertices",components:t||3}]})}},{"../util/struct_array":422,"../util/util":424,"./array_group":310,"./bucket/circle_bucket":312,"./bucket/fill_bucket":313,"./bucket/line_bucket":314,"./bucket/symbol_bucket":315,"./buffer_group":317,assert:40,"feature-filter":117}],312:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var i=t("../bucket"),a=t("../../util/util"),o=t("../load_geometry"),s=i.EXTENT;e.exports=n,n.prototype=a.inherit(i,{}),n.prototype.addCircleVertex=function(t,e,r,n,i){return t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)},n.prototype.programInterfaces={circle:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"}]),elementArrayType:new i.ElementArrayType,paintAttributes:[{name:"a_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("circle-color",e,r)},multiplier:255,paintProperty:"circle-color"},{name:"a_radius",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-radius",e,r)]},multiplier:10,paintProperty:"circle-radius"},{name:"a_blur",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-blur",e,r)]},multiplier:10,paintProperty:"circle-blur"},{name:"a_opacity",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-opacity",e,r)]},multiplier:255,paintProperty:"circle-opacity"}]}},n.prototype.addFeature=function(t){for(var e={zoom:this.zoom},r=o(t),n=this.prepareArrayGroup("circle",0),i=n.layoutVertexArray.length,a=0;a=s||c<0||c>=s)){var h=this.prepareArrayGroup("circle",4),f=h.layoutVertexArray,d=this.addCircleVertex(f,u,c,-1,-1);this.addCircleVertex(f,u,c,1,-1),this.addCircleVertex(f,u,c,1,1),this.addCircleVertex(f,u,c,-1,1),h.elementArray.emplaceBack(d,d+1,d+2),h.elementArray.emplaceBack(d,d+3,d+2)}}this.populatePaintArrays("circle",e,t.properties,n,i)}},{"../../util/util":424,"../bucket":311,"../load_geometry":319}],313:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var i=t("../bucket"),a=t("../../util/util"),o=t("../load_geometry"),s=t("earcut"),l=t("../../util/classify_rings");e.exports=n,n.prototype=a.inherit(i,{}),n.prototype.programInterfaces={fill:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"}]),elementArrayType:new i.ElementArrayType(1),elementArrayType2:new i.ElementArrayType(2),paintAttributes:[{name:"a_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("fill-color",e,r)},multiplier:255,paintProperty:"fill-color"},{name:"a_outline_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("fill-outline-color",e,r)},multiplier:255,paintProperty:"fill-outline-color"},{name:"a_opacity",components:1,type:"Uint8",getValue:function(t,e,r){return[t.getPaintValue("fill-opacity",e,r)]},multiplier:255,paintProperty:"fill-opacity"}]}},n.prototype.addFeature=function(t){for(var e=o(t),r=l(e,500),n=this.prepareArrayGroup("fill",0),i=n.layoutVertexArray.length,a=0;a0&&a.push(i.length/2);for(var c=0;c=1&&n.elementArray2.emplaceBack(f-1,f),i.push(h.x),i.push(h.y)}}for(var d=s(i,a),p=0;p>6)},n.prototype.programInterfaces={line:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}]),elementArrayType:new i.ElementArrayType}},n.prototype.addFeature=function(t){for(var e=o(t,15),r=0;r2&&t[a-1].equals(t[a-2]);)a--;if(!(t.length<2)){"bevel"===e&&(n=1.05);var o=s/(512*this.overscaling)*15,u=t[0],c=t[a-1],h=u.equals(c);if(this.prepareArrayGroup("line",10*a),2!==a||!h){this.distance=0;var f,d,p,m,g,v,y,b=r,x=h?"butt":r,_=!0;this.e1=this.e2=this.e3=-1,h&&(f=t[a-2],g=u.sub(f)._unit()._perp());for(var w=0;w0){var S=f.dist(d);if(S>2*o){var E=f.sub(f.sub(d)._mult(o/S)._round());this.distance+=E.dist(d),this.addCurrentVertex(E,this.distance,m.mult(1),0,0,!1),d=E}}var L=d&&p,C=L?e:p?b:x;if(L&&"round"===C&&(An&&(C="bevel"),"bevel"===C&&(A>2&&(C="flipbevel"),A100)M=g.clone();else{var z=m.x*g.y-m.y*g.x>0?-1:1,D=A*m.add(g).mag()/m.sub(g).mag();M._perp()._mult(D*z)}this.addCurrentVertex(f,this.distance,M,0,0,!1),this.addCurrentVertex(f,this.distance,M.mult(-1),0,0,!1)}else if("bevel"===C||"fakeround"===C){var I=m.x*g.y-m.y*g.x>0,P=-Math.sqrt(A*A-1);if(I?(y=0,v=P):(v=0,y=P),_||this.addCurrentVertex(f,this.distance,m,v,y,!1),"fakeround"===C){for(var O,j=Math.floor(8*(.5-(k-.5))),R=0;R=0;F--)O=m.mult((F+1)/(j+1))._add(g)._unit(),this.addPieSliceVertex(f,this.distance,O,I)}p&&this.addCurrentVertex(f,this.distance,g,-v,-y,!1)}else"butt"===C?(_||this.addCurrentVertex(f,this.distance,m,0,0,!1),p&&this.addCurrentVertex(f,this.distance,g,0,0,!1)):"square"===C?(_||(this.addCurrentVertex(f,this.distance,m,1,1,!1),this.e1=this.e2=-1),p&&this.addCurrentVertex(f,this.distance,g,-1,-1,!1)):"round"===C&&(_||(this.addCurrentVertex(f,this.distance,m,0,0,!1),this.addCurrentVertex(f,this.distance,m,1,1,!0),this.e1=this.e2=-1),p&&(this.addCurrentVertex(f,this.distance,g,-1,-1,!0),this.addCurrentVertex(f,this.distance,g,0,0,!1)));if(T&&w2*o){var B=f.add(p.sub(f)._mult(o/N)._round());this.distance+=B.dist(f),this.addCurrentVertex(B,this.distance,g.mult(1),0,0,!1),f=B}}_=!1}}}},n.prototype.addCurrentVertex=function(t,e,r,n,i,a){var o,s=a?1:0,l=this.arrayGroups.line[this.arrayGroups.line.length-1],c=l.layoutVertexArray,h=l.elementArray;o=r.clone(),n&&o._sub(r.perp()._mult(n)),this.e3=this.addLineVertex(c,t,o,s,0,n,e),this.e1>=0&&this.e2>=0&&h.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,o=r.mult(-1),i&&o._sub(r.perp()._mult(i)),this.e3=this.addLineVertex(c,t,o,s,1,-i,e),this.e1>=0&&this.e2>=0&&h.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,e>u/2&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,a))},n.prototype.addPieSliceVertex=function(t,e,r,n){var i=n?1:0;r=r.mult(n?-1:1);var a=this.arrayGroups.line[this.arrayGroups.line.length-1],o=a.layoutVertexArray,s=a.elementArray;this.e3=this.addLineVertex(o,t,r,0,i,0,e),this.e1>=0&&this.e2>=0&&s.emplaceBack(this.e1,this.e2,this.e3),n?this.e2=this.e3:this.e1=this.e3}},{"../../util/util":424,"../bucket":311,"../load_geometry":319}],315:[function(t,e,r){"use strict";function n(t){o.apply(this,arguments),this.showCollisionBoxes=t.showCollisionBoxes,this.overscaling=t.overscaling,this.collisionBoxArray=t.collisionBoxArray,this.symbolQuadsArray=t.symbolQuadsArray,this.symbolInstancesArray=t.symbolInstancesArray,this.sdfIcons=t.sdfIcons,this.iconsNeedLinear=t.iconsNeedLinear,this.adjustedTextSize=t.adjustedTextSize,this.adjustedIconSize=t.adjustedIconSize,this.fontstack=t.fontstack}function i(t,e,r,n,i,a,o,s,l,u,c){return t.emplaceBack(e,r,Math.round(64*n),Math.round(64*i),a/4,o/4,10*(u||0),c,10*(s||0),10*Math.min(l||25,25))}var a=t("point-geometry"),o=t("../bucket"),s=t("../../symbol/anchor"),l=t("../../symbol/get_anchors"),u=t("../../util/token"),c=t("../../symbol/quads"),h=t("../../symbol/shaping"),f=t("../../symbol/resolve_text"),d=t("../../symbol/mergelines"),p=t("../../symbol/clip_line"),m=t("../../util/util"),g=t("../load_geometry"),v=t("../../symbol/collision_feature"),y=h.shapeText,b=h.shapeIcon,x=c.getGlyphQuads,_=c.getIconQuads,w=o.EXTENT;e.exports=n,n.MAX_QUADS=65535,n.prototype=m.inherit(o,{}),n.prototype.serialize=function(){var t=o.prototype.serialize.apply(this);return t.sdfIcons=this.sdfIcons,t.iconsNeedLinear=this.iconsNeedLinear,t.adjustedTextSize=this.adjustedTextSize,t.adjustedIconSize=this.adjustedIconSize,t.fontstack=this.fontstack,t};var M=new o.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_offset",components:2,type:"Int16"},{name:"a_texture_pos",components:2,type:"Uint16"},{name:"a_data",components:4,type:"Uint8"}]),k=new o.ElementArrayType;n.prototype.addCollisionBoxVertex=function(t,e,r,n,i){return t.emplaceBack(e.x,e.y,Math.round(r.x),Math.round(r.y),10*n,10*i)},n.prototype.programInterfaces={glyph:{layoutVertexArrayType:M,elementArrayType:k},icon:{layoutVertexArrayType:M,elementArrayType:k},collisionBox:{layoutVertexArrayType:new o.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"},{name:"a_data",components:2,type:"Uint8"}])}},n.prototype.populateArrays=function(t,e,r){var n={lastIntegerZoom:1/0,lastIntegerZoomTime:0,lastZoom:0};this.adjustedTextMaxSize=this.layer.getLayoutValue("text-size",{zoom:18,zoomHistory:n}),this.adjustedTextSize=this.layer.getLayoutValue("text-size",{zoom:this.zoom+1,zoomHistory:n}),this.adjustedIconMaxSize=this.layer.getLayoutValue("icon-size",{zoom:18,zoomHistory:n}),this.adjustedIconSize=this.layer.getLayoutValue("icon-size",{zoom:this.zoom+1,zoomHistory:n});var i=512*this.overscaling;this.tilePixelRatio=w/i,this.compareText={},this.iconsNeedLinear=!1,this.symbolInstancesStartIndex=this.symbolInstancesArray.length;var a=this.layer.layout,o=this.features,s=this.textFeatures,l=.5,c=.5;switch(a["text-anchor"]){case"right":case"top-right":case"bottom-right":l=1;break;case"left":case"top-left":case"bottom-left":l=0}switch(a["text-anchor"]){case"bottom":case"bottom-right":case"bottom-left":c=1;break;case"top":case"top-right":case"top-left":c=0}for(var h="right"===a["text-justify"]?1:"left"===a["text-justify"]?0:.5,f=24*a["text-line-height"],p="line"!==a["symbol-placement"]?24*a["text-max-width"]:0,v=24*a["text-letter-spacing"],x=[24*a["text-offset"][0],24*a["text-offset"][1]],_=this.fontstack=a["text-font"].join(","),M=[],k=0;kw||L.y<0||L.y>w);if(!d||C){var z=C||x;this.addSymbolInstance(L,T,e,r,this.layer,z,this.symbolInstancesArray.length,this.collisionBoxArray,n.index,this.sourceLayerIndex,this.index,u,m,y,h,g,b,{zoom:this.zoom},n.properties)}}}}},n.prototype.anchorIsTooClose=function(t,e,r){var n=this.compareText;if(t in n){for(var i=n[t],a=i.length-1;a>=0;a--)if(r.dist(i[a])3*Math.PI/2))){var g=p.tl,v=p.tr,y=p.bl,b=p.br,x=p.tex,_=p.anchorPoint,w=Math.max(h+Math.log(p.minScale)/Math.LN2,f),M=Math.min(h+Math.log(p.maxScale)/Math.LN2,25);if(!(M<=w)){w===f&&(w=0);var k=Math.round(p.glyphAngle/(2*Math.PI)*256),A=i(c,_.x,_.y,g.x,g.y,x.x,x.y,w,M,f,k);i(c,_.x,_.y,v.x,v.y,x.x+x.w,x.y,w,M,f,k),i(c,_.x,_.y,y.x,y.y,x.x,x.y+x.h,w,M,f,k),i(c,_.x,_.y,b.x,b.y,x.x+x.w,x.y+x.h,w,M,f,k),u.emplaceBack(A,A+1,A+2),u.emplaceBack(A+1,A+2,A+3)}}}},n.prototype.updateIcons=function(t){this.recalculateStyleLayers();var e=this.layer.layout["icon-image"];if(e)for(var r=0;rn.MAX_QUADS&&m.warnOnce("Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),A>n.MAX_QUADS&&m.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),this.symbolInstancesArray.emplaceBack(I,P,O,j,k,A,T,S,t.x,t.y,s)},n.prototype.addSymbolQuad=function(t){return this.symbolQuadsArray.emplaceBack(t.anchorPoint.x,t.anchorPoint.y,t.tl.x,t.tl.y,t.tr.x,t.tr.y,t.bl.x,t.bl.y,t.br.x,t.br.y,t.tex.h,t.tex.w,t.tex.x,t.tex.y,t.anchorAngle,t.glyphAngle,t.maxScale,t.minScale)}},{"../../symbol/anchor":373,"../../symbol/clip_line":375,"../../symbol/collision_feature":377,"../../symbol/get_anchors":379,"../../symbol/mergelines":382,"../../symbol/quads":383,"../../symbol/resolve_text":384,"../../symbol/shaping":385,"../../util/token":423,"../../util/util":424,"../bucket":311,"../load_geometry":319,"point-geometry":465}],316:[function(t,e,r){"use strict";function n(t,e,r){this.arrayBuffer=t.arrayBuffer,this.length=t.length,this.attributes=e.members,this.itemSize=e.bytesPerElement,this.type=r,this.arrayType=e}e.exports=n,n.prototype.bind=function(t){var e=t[this.type];this.buffer?t.bindBuffer(e,this.buffer):(this.buffer=t.createBuffer(),t.bindBuffer(e,this.buffer),t.bufferData(e,this.arrayBuffer,t.STATIC_DRAW),this.arrayBuffer=null)};var i={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT"};n.prototype.setVertexAttribPointers=function(t,e){for(var r=0;r0?t["line-gap-width"]+2*t["line-width"]:t["line-width"]}function s(t,e,r,n,i){if(!e[0]&&!e[1])return t;e=u.convert(e),"viewport"===r&&e._rotate(-n);for(var a=[],o=0;or.max||f.yr.max)&&i.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return l}},{"../util/util":424,"./bucket":311,assert:40}],320:[function(t,e,r){"use strict";function n(t,e,r){this.column=t,this.row=e,this.zoom=r}e.exports=n,n.prototype={clone:function(){return new n(this.column,this.row,this.zoom)},zoomTo:function(t){return this.clone()._zoomTo(t)},sub:function(t){return this.clone()._sub(t)},_zoomTo:function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},_sub:function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this}}},{}],321:[function(t,e,r){"use strict";function n(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}e.exports=n;var i=t("../util/util").wrap;n.prototype.wrap=function(){return new n(i(this.lng,-180,180),this.lat)},n.prototype.toArray=function(){return[this.lng,this.lat]},n.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{"../util/util":424}],322:[function(t,e,r){"use strict";function n(t,e){t&&(e?this.extend(t).extend(e):4===t.length?this.extend([t[0],t[1]]).extend([t[2],t[3]]):this.extend(t[0]).extend(t[1]))}e.exports=n;var i=t("./lng_lat");n.prototype={extend:function(t){var e,r,a=this._sw,o=this._ne;if(t instanceof i)e=t,r=t;else{if(!(t instanceof n))return t?this.extend(i.convert(t)||n.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return a||o?(a.lng=Math.min(e.lng,a.lng),a.lat=Math.min(e.lat,a.lat),o.lng=Math.max(r.lng,o.lng),o.lat=Math.max(r.lat,o.lat)):(this._sw=new i(e.lng,e.lat),this._ne=new i(r.lng,r.lat)),this},getCenter:function(){return new i((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},getSouthWest:function(){return this._sw},getNorthEast:function(){return this._ne},getNorthWest:function(){return new i(this.getWest(),this.getNorth())},getSouthEast:function(){return new i(this.getEast(),this.getSouth())},getWest:function(){return this._sw.lng},getSouth:function(){return this._sw.lat},getEast:function(){return this._ne.lng},getNorth:function(){return this._ne.lat},toArray:function(){return[this._sw.toArray(),this._ne.toArray()]},toString:function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"}},n.convert=function(t){return!t||t instanceof n?t:new n(t)}},{"./lng_lat":321}],323:[function(t,e,r){"use strict";function n(t,e){this.tileSize=512,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new i(0,0),this.zoom=0,this.angle=0,this._altitude=1.5,this._pitch=0,this._unmodified=!0}var i=t("./lng_lat"),a=t("point-geometry"),o=t("./coordinate"),s=t("../util/util").wrap,l=t("../util/interpolate"),u=t("../source/tile_coord"),c=t("../data/bucket").EXTENT,h=t("gl-matrix"),f=h.vec4,d=h.mat4,p=h.mat2;e.exports=n,n.prototype={get minZoom(){return this._minZoom},set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},get maxZoom(){return this._maxZoom},set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},get worldSize(){return this.tileSize*this.scale},get centerPoint(){return this.size._div(2)},get size(){return new a(this.width,this.height)},get bearing(){return-this.angle/Math.PI*180},set bearing(t){var e=-s(t,-180,180)*Math.PI/180;this.angle!==e&&(this._unmodified=!1,this.angle=e,this._calcMatrices(),this.rotationMatrix=p.create(),p.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},get pitch(){return this._pitch/Math.PI*180},set pitch(t){var e=Math.min(60,t)/180*Math.PI;this._pitch!==e&&(this._unmodified=!1,this._pitch=e,this._calcMatrices())},get altitude(){return this._altitude},set altitude(t){var e=Math.max(.75,t);this._altitude!==e&&(this._unmodified=!1,this._altitude=e,this._calcMatrices())},get zoom(){return this._zoom},set zoom(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._calcMatrices(),this._constrain())},get center(){return this._center},set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._calcMatrices(),this._constrain())},coveringZoomLevel:function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},coveringTiles:function(t){var e=this.coveringZoomLevel(t),r=e;if(et.maxzoom&&(e=t.maxzoom);var n=this,i=n.locationCoordinate(n.center)._zoomTo(e),o=new a(i.column-.5,i.row-.5);return u.cover(e,[n.pointCoordinate(new a(0,0))._zoomTo(e),n.pointCoordinate(new a(n.width,0))._zoomTo(e),n.pointCoordinate(new a(n.width,n.height))._zoomTo(e),n.pointCoordinate(new a(0,n.height))._zoomTo(e)],t.reparseOverscaled?r:e).sort(function(t,e){return o.dist(t)-o.dist(e)})},resize:function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._calcMatrices(),this._constrain()},get unmodified(){return this._unmodified},zoomScale:function(t){return Math.pow(2,t)},scaleZoom:function(t){return Math.log(t)/Math.LN2},project:function(t,e){return new a(this.lngX(t.lng,e),this.latY(t.lat,e))},unproject:function(t,e){return new i(this.xLng(t.x,e),this.yLat(t.y,e))},get x(){return this.lngX(this.center.lng)},get y(){return this.latY(this.center.lat)},get point(){return new a(this.x,this.y)},lngX:function(t,e){return(180+t)*(e||this.worldSize)/360},latY:function(t,e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*(e||this.worldSize)/360},xLng:function(t,e){return 360*t/(e||this.worldSize)-180},yLat:function(t,e){var r=180-360*t/(e||this.worldSize);return 360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90},panBy:function(t){var e=this.centerPoint._add(t);this.center=this.pointLocation(e)},setLocationAtPoint:function(t,e){var r=this.locationCoordinate(t),n=this.pointCoordinate(e),i=this.pointCoordinate(this.centerPoint),a=n._sub(r);this._unmodified=!1,this.center=this.coordinateLocation(i._sub(a))},locationPoint:function(t){return this.coordinatePoint(this.locationCoordinate(t))},pointLocation:function(t){return this.coordinateLocation(this.pointCoordinate(t))},locationCoordinate:function(t){var e=this.zoomScale(this.tileZoom)/this.worldSize,r=i.convert(t);return new o(this.lngX(r.lng)*e,this.latY(r.lat)*e,this.tileZoom)},coordinateLocation:function(t){var e=this.zoomScale(t.zoom);return new i(this.xLng(t.column,e),this.yLat(t.row,e))},pointCoordinate:function(t){var e=[t.x,t.y,0,1],r=[t.x,t.y,1,1];f.transformMat4(e,e,this.pixelMatrixInverse),f.transformMat4(r,r,this.pixelMatrixInverse);var n=e[3],i=r[3],a=e[0]/n,s=r[0]/i,u=e[1]/n,c=r[1]/i,h=e[2]/n,d=r[2]/i,p=h===d?0:(0-h)/(d-h),m=this.worldSize/this.zoomScale(this.tileZoom);return new o(l(a,s,p)/m,l(u,c,p)/m,this.tileZoom)},coordinatePoint:function(t){var e=this.worldSize/this.zoomScale(t.zoom),r=[t.column*e,t.row*e,0,1];return f.transformMat4(r,r,this.pixelMatrix),new a(r[0]/r[3],r[1]/r[3])},calculatePosMatrix:function(t,e){void 0===e&&(e=1/0),t instanceof u&&(t=t.toCoordinate(e));var r=Math.min(t.zoom,e),n=this.worldSize/Math.pow(2,r),i=new Float64Array(16);return d.identity(i),d.translate(i,i,[t.column*n,t.row*n,0]),d.scale(i,i,[n/c,n/c,1]),d.multiply(i,this.projMatrix,i),new Float32Array(i)},_constrain:function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,e,r,n,i,o,s,l,u=this.size,c=this._unmodified;this.latRange&&(t=this.latY(this.latRange[1]),e=this.latY(this.latRange[0]),i=e-te&&(l=e-d)}if(this.lngRange){var p=this.x,m=u.x/2;p-mn&&(s=n-m)}void 0===s&&void 0===l||(this.center=this.unproject(new a(void 0!==s?s:this.x,void 0!==l?l:this.y))),this._unmodified=c,this._constraining=!1}},_calcMatrices:function(){if(this.height){var t=Math.atan(.5/this.altitude),e=Math.sin(t)*this.altitude/Math.sin(Math.PI/2-this._pitch-t),r=Math.cos(Math.PI/2-this._pitch)*e+this.altitude,n=new Float64Array(16);if(d.perspective(n,2*Math.atan(this.height/2/this.altitude),this.width/this.height,.1,r),d.translate(n,n,[0,0,-this.altitude]),d.scale(n,n,[1,-1,1/this.height]),d.rotateX(n,n,this._pitch),d.rotateZ(n,n,this.angle),d.translate(n,n,[-this.x,-this.y,0]),this.projMatrix=n,n=d.create(),d.scale(n,n,[this.width/2,-this.height/2,1]),d.translate(n,n,[1,-1,0]),this.pixelMatrix=d.multiply(new Float64Array(16),n,this.projMatrix),!(n=d.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=n}}}},{"../data/bucket":311,"../source/tile_coord":351,"../util/interpolate":418,"../util/util":424,"./coordinate":320,"./lng_lat":321,"gl-matrix":177,"point-geometry":465}],324:[function(t,e,r){"use strict";var n={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]};e.exports=function(t,e,r,i){i=i||1;var a,o,s,l,u,c,h,f,d=[];for(a=0,o=t.length;a>16,_>>16),s.uniform2f(n.u_pixel_coord_lower,65535&x,65535&_)}s.uniformMatrix4fv(n.u_matrix,!1,t.transform.calculatePosMatrix(v)),s.drawArrays(s.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}s.stencilMask(0),s.stencilFunc(s.EQUAL,128,128)}var i=t("../source/pixels_to_tile_units"),a=t("./create_uniform_pragmas"),o=512;e.exports=n},{"../source/pixels_to_tile_units":345,"./create_uniform_pragmas":326}],328:[function(t,e,r){"use strict";function n(t,e,r,n){if(!t.isOpaquePass){var a=t.gl;t.setDepthSublayer(0),t.depthMask(!1),a.disable(a.STENCIL_TEST);for(var o=0;o>16,f>>16),o.uniform2f(a.u_pixel_coord_lower,65535&h,65535&f),o.activeTexture(o.TEXTURE0),i.spriteAtlas.bind(o,!0)}}var s=t("../source/pixels_to_tile_units");e.exports=n},{"../source/pixels_to_tile_units":345}],332:[function(t,e,r){"use strict";var n=t("../util/browser"),i=t("gl-matrix").mat2,a=t("../source/pixels_to_tile_units");e.exports=function(t,e,r,o){if(!t.isOpaquePass){t.setDepthSublayer(0),t.depthMask(!1);var s=t.gl;if(s.enable(s.STENCIL_TEST),!(r.paint["line-width"]<=0)){var l=1/n.devicePixelRatio,u=r.paint["line-blur"]+l,c=r.paint["line-color"],h=t.transform,f=i.create();i.scale(f,f,[1,Math.cos(h._pitch)]),i.rotate(f,f,t.transform.angle);var d,p,m,g,v,y=Math.sqrt(h.height*h.height/4*(1+h.altitude*h.altitude)),b=h.height/2*Math.tan(h._pitch),x=(y+b)/y-1,_=r.paint["line-dasharray"],w=r.paint["line-pattern"];if(_)d=t.useProgram("linesdfpattern"),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform4fv(d.u_color,c),s.uniform1f(d.u_opacity,r.paint["line-opacity"]),p=t.lineAtlas.getDash(_.from,"round"===r.layout["line-cap"]),m=t.lineAtlas.getDash(_.to,"round"===r.layout["line-cap"]),s.uniform1i(d.u_image,0),s.activeTexture(s.TEXTURE0),t.lineAtlas.bind(s),s.uniform1f(d.u_tex_y_a,p.y),s.uniform1f(d.u_tex_y_b,m.y),s.uniform1f(d.u_mix,_.t),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f);else if(w){if(g=t.spriteAtlas.getPosition(w.from,!0),v=t.spriteAtlas.getPosition(w.to,!0),!g||!v)return;d=t.useProgram("linepattern"),s.uniform1i(d.u_image,0),s.activeTexture(s.TEXTURE0),t.spriteAtlas.bind(s,!0),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform2fv(d.u_pattern_tl_a,g.tl),s.uniform2fv(d.u_pattern_br_a,g.br),s.uniform2fv(d.u_pattern_tl_b,v.tl),s.uniform2fv(d.u_pattern_br_b,v.br),s.uniform1f(d.u_fade,w.t),s.uniform1f(d.u_opacity,r.paint["line-opacity"]),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f)}else d=t.useProgram("line"),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f),s.uniform4fv(d.u_color,c),s.uniform1f(d.u_opacity,r.paint["line-opacity"]);for(var M=0;M0?1/(1-t):1+t}function s(t){return t>0?1-1/(1.001-t):-t}function l(t,e,r,n){var i=[1,0],a=r.paint["raster-fade-duration"];if(t.source&&a>0){var o=(new Date).getTime(),s=(o-t.timeAdded)/a,l=e?(o-e.timeAdded)/a:-1,c=n.coveringZoomLevel(t.source),h=!!e&&Math.abs(e.coord.z-c)>Math.abs(t.coord.z-c);!e||h?(i[0]=u.clamp(s,0,1),i[1]=1-i[0]):(i[0]=u.clamp(1-l,0,1),i[1]=1-i[0])}var f=r.paint["raster-opacity"];return i[0]*=f,i[1]*=f,i}var u=t("../util/util"),c=t("../util/struct_array");e.exports=n,n.RasterBoundsArray=new c({members:[{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]})},{"../util/struct_array":422,"../util/util":424}],334:[function(t,e,r){"use strict";function n(t,e,r,n){if(!t.isOpaquePass){var a=!(r.layout["text-allow-overlap"]||r.layout["icon-allow-overlap"]||r.layout["text-ignore-placement"]||r.layout["icon-ignore-placement"]),o=t.gl;a?o.disable(o.STENCIL_TEST):o.enable(o.STENCIL_TEST),t.setDepthSublayer(0),t.depthMask(!1),o.disable(o.DEPTH_TEST),i(t,e,r,n,!1,r.paint["icon-translate"],r.paint["icon-translate-anchor"],r.layout["icon-rotation-alignment"],r.layout["icon-rotation-alignment"],r.layout["icon-size"],r.paint["icon-halo-width"],r.paint["icon-halo-color"],r.paint["icon-halo-blur"],r.paint["icon-opacity"],r.paint["icon-color"]),i(t,e,r,n,!0,r.paint["text-translate"],r.paint["text-translate-anchor"],r.layout["text-rotation-alignment"],r.layout["text-pitch-alignment"],r.layout["text-size"],r.paint["text-halo-width"],r.paint["text-halo-color"],r.paint["text-halo-blur"],r.paint["text-opacity"],r.paint["text-color"]),o.enable(o.DEPTH_TEST),e.map.showCollisionBoxes&&s(t,e,r,n)}}function i(t,e,r,n,i,o,s,l,u,c,h,f,d,p,m){for(var g=0;gthis.previousZoom;r--)this.changeTimes[r]=e,this.changeOpacities[r]=this.opacities[r];for(r=0;r<256;r++){var n=e-this.changeTimes[r],i=n/this.fadeDuration*255;this.opacities[r]=r<=t?this.changeOpacities[r]+i:this.changeOpacities[r]-i}this.changed=!0,this.previousZoom=t},n.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.changed&&(t.texSubImage2D(t.TEXTURE_2D,0,0,0,256,1,t.ALPHA,t.UNSIGNED_BYTE,this.array),this.changed=!1)):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,256,1,0,t.ALPHA,t.UNSIGNED_BYTE,this.array))}},{}],336:[function(t,e,r){"use strict";function n(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}}var i=t("../util/util");e.exports=n,n.prototype.setSprite=function(t){this.sprite=t},n.prototype.getDash=function(t,e){var r=t.join(",")+e;return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},n.prototype.addDash=function(t,e){var r=e?7:0,n=2*r+1;if(this.nextRow+n>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o0?e.pop():null},n.prototype.lineWidth=function(t){this.gl.lineWidth(c.clamp(t,this.lineWidthRange[0],this.lineWidthRange[1]))},n.prototype.showOverdrawInspector=function(t){if(t||this._showOverdrawInspector){this._showOverdrawInspector=t;var e=this.gl;if(t){e.blendFunc(e.CONSTANT_COLOR,e.ONE);e.blendColor(1/8,1/8,1/8,0),e.clearColor(0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)}else e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)}}},{"../data/bucket":311,"../data/buffer":316,"../source/pixels_to_tile_units":345,"../source/source_cache":349,"../util/browser":408,"../util/struct_array":422,"../util/util":424,"./create_uniform_pragmas":326,"./draw_background":327,"./draw_circle":328,"./draw_debug":330,"./draw_fill":331,"./draw_line":332,"./draw_raster":333,"./draw_symbol":334,"./frame_history":335,"./painter/use_program":338,"./vertex_array_object":339,"gl-matrix":177}],338:[function(t,e,r){"use strict";function n(t,e){return t.replace(/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,function(t,r,n,i,a){return e[r][a].replace(/{type}/g,i).replace(/{precision}/g,n)})}var i=t("assert"),a=t("../../util/util"),o=t("mapbox-gl-shaders"),s=o.util;e.exports._createProgram=function(t,e,r,l){for(var u=this.gl,c=u.createProgram(),h=o[t],f="#define MAPBOX_GL_JS;\n",d=0;dthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,n={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,overscaling:r,angle:this.map.transform.angle, -pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send("load tile",n,function(r,n){if(t.unloadVectorData(this.map.painter),!t.aborted)return r?e(r):(t.loadVectorData(n,this.map.style),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(this)),e(null))}.bind(this),this.workerID)},abortTile:function(t){t.aborted=!0},unloadTile:function(t){t.unloadVectorData(this.map.painter),this.dispatcher.send("remove tile",{uid:t.uid,source:this.id},function(){},t.workerID)},serialize:function(){return{type:this.type,data:this._data}}})},{"../data/bucket":311,"../util/evented":416,"../util/util":424,"resolve-url":482}],341:[function(t,e,r){"use strict";function n(t,e,r){r&&(this.loadGeoJSON=r),h.call(this,t,e)}var i=t("../util/util"),a=t("../util/ajax"),o=t("geojson-rewind"),s=t("./geojson_wrapper"),l=t("vt-pbf"),u=t("supercluster"),c=t("geojson-vt"),h=t("./vector_tile_worker_source");e.exports=n,n.prototype=i.inherit(h,{_geoJSONIndexes:{},loadVectorData:function(t,e){var r=t.source,n=t.coord;if(!this._geoJSONIndexes[r])return e(null,null);var i=this._geoJSONIndexes[r].getTile(Math.min(n.z,t.maxZoom),n.x,n.y);if(!i)return e(null,null);var a=new s(i.features);a.name="_geojsonTileLayer";var o=l({layers:{_geojsonTileLayer:a}});0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{tile:a,rawTileData:o.buffer})},loadData:function(t,e){var r=function(r,n){return r?e(r):"object"!=typeof n?e(new Error("Input data is not a valid GeoJSON object.")):(o(n,!0),void this._indexData(n,t,function(r,n){if(r)return e(r);this._geoJSONIndexes[t.source]=n,e(null)}.bind(this)))}.bind(this);this.loadGeoJSON(t,r)},loadGeoJSON:function(t,e){if(t.url)a.getJSON(t.url,e);else{if("string"!=typeof t.data)return e(new Error("Input data is not a valid GeoJSON object."));try{return e(null,JSON.parse(t.data))}catch(t){return e(new Error("Input data is not a valid GeoJSON object."))}}},_indexData:function(t,e,r){try{e.cluster?r(null,u(e.superclusterOptions).load(t.features)):r(null,c(t,e.geojsonVtOptions))}catch(t){return r(t)}}})},{"../util/ajax":407,"../util/util":424,"./geojson_wrapper":342,"./vector_tile_worker_source":353,"geojson-rewind":123,"geojson-vt":127,supercluster:509,"vt-pbf":536}],342:[function(t,e,r){"use strict";function n(t){this.features=t,this.length=t.length,this.extent=s}function i(t){if(this.type=t.type,1===t.type){this.rawGeometry=[];for(var e=0;ee)){var o=Math.pow(2,Math.min(a.coord.z,this.maxzoom)-Math.min(t.z,this.maxzoom));if(Math.floor(a.coord.x/o)===t.x&&Math.floor(a.coord.y/o)===t.y)for(r[i]=!0,n=!0;a&&a.coord.z-1>t.z;){var s=a.coord.parent(this.maxzoom).id;a=this._tiles[s],a&&a.isRenderable()&&(delete r[i],r[s]=!0)}}}return n},findLoadedParent:function(t,e,r){for(var n=t.z-1;n>=e;n--){t=t.parent(this.maxzoom);var i=this._tiles[t.id];if(i&&i.isRenderable())return r[t.id]=!0,i;if(this._cache.has(t.id))return this.addTile(t),r[t.id]=!0,this._tiles[t.id]}},updateCacheSize:function(t){var e=Math.ceil(t.width/t.tileSize)+1,r=Math.ceil(t.height/t.tileSize)+1,n=e*r;this._cache.setMaxSize(Math.floor(5*n))},update:function(t,e){if(this._sourceLoaded){var r,i,a;this.updateCacheSize(t);var o=(this.roundZoom?Math.round:Math.floor)(this.getZoom(t)),s=Math.max(o-n.maxOverzooming,this.minzoom),l=Math.max(o+n.maxUnderzooming,this.minzoom),c={},h=(new Date).getTime();this._coveredTiles={};var d=this.used?t.coveringTiles(this._source):[];for(r=0;rh-(e||0)&&(this.findLoadedChildren(i,l,c)&&(c[v]=!0),this.findLoadedParent(i,s,p))}var y;for(y in p)c[y]||(this._coveredTiles[y]=!0);for(y in p)c[y]=!0;var b=f.keysDifference(this._tiles,c);for(r=0;rthis.maxzoom?Math.pow(2,n-this.maxzoom):1;e=new s(r,this.tileSize*i,this.maxzoom),this.loadTile(e,this._tileLoaded.bind(this,e))}return e.uses++,this._tiles[t.id]=e,this.fire("tile.add",{tile:e}),this._source.fire("tile.add",{tile:e}),e},removeTile:function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this.fire("tile.remove",{tile:e}),this._source.fire("tile.remove",{tile:e}),e.uses>0||(e.isRenderable()?this._cache.add(e.coord.wrapped().id,e):(e.aborted=!0,this.abortTile(e),this.unloadTile(e))))},clearTiles:function(){for(var t in this._tiles)this.removeTile(t);this._cache.reset()},tilesIn:function(t){for(var e={},r=this.getIds(),n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0].zoom,c=0;c=0&&v[1].y>=0){for(var y=[],b=0;b=0&&t%1==0),l(!isNaN(e)&&e>=0&&e%1==0),l(!isNaN(r)&&r>=0&&r%1==0),isNaN(n)&&(n=0),this.z=+t,this.x=+e,this.y=+r,this.w=+n,(n*=2)<0&&(n=n*-1-1);var i=1<0;a--)n=1<e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function o(t,e,r,n,i){var a=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx0,h=e.dx<0,f=a;fc.dy&&(l=u,u=c,c=l),u.dy>h.dy&&(l=u,u=h,h=l),c.dy>h.dy&&(l=c,c=h,h=l),u.dy&&o(h,u,n,i,s),c.dy&&o(h,c,n,i,s)}var l=t("assert"),u=t("whoots-js"),c=t("../geo/coordinate");e.exports=n,n.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y},n.prototype.toCoordinate=function(t){var e=Math.min(this.z,t),r=Math.pow(2,e),n=this.y,i=this.x+r*this.w;return new c(i,n,e)},n.fromID=function(t){var e=t%32,r=1<t?new n(this.z-1,this.x,this.y,this.w):new n(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},n.prototype.wrapped=function(){return new n(this.z,this.x,this.y,0)},n.prototype.children=function(t){if(this.z>=t)return[new n(this.z+1,this.x,this.y,this.w)];var e=this.z+1,r=2*this.x,i=2*this.y;return[new n(e,r,i,this.w),new n(e,r+1,i,this.w),new n(e,r,i+1,this.w),new n(e,r+1,i+1,this.w)]},n.cover=function(t,e,r){function i(t,e,i){var s,l,u;if(i>=0&&i<=a)for(s=t;sthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,i={url:s(t.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),uid:t.uid,coord:t.coord,zoom:t.coord.z,tileSize:this.tileSize*n,source:this.id,overscaling:n,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID?"loading"===t.state?t.reloadCallback=e:(i.rawTileData=t.rawTileData,this.dispatcher.send("reload tile",i,r.bind(this),t.workerID)):t.workerID=this.dispatcher.send("load tile",i,r.bind(this))},abortTile:function(t){this.dispatcher.send("abort tile",{uid:t.uid,source:this.id},null,t.workerID)},unloadTile:function(t){t.unloadVectorData(this.map.painter),this.dispatcher.send("remove tile",{uid:t.uid,source:this.id},null,t.workerID)}})},{"../util/evented":416,"../util/mapbox":421,"../util/util":424,"./load_tilejson":344}],353:[function(t,e,r){"use strict";function n(t,e,r){this.actor=t,this.styleLayers=e,r&&(this.loadVectorData=r),this.loading={},this.loaded={}}var i=t("../util/ajax"),a=t("vector-tile"),o=t("pbf"),s=t("./worker_tile");e.exports=n,n.prototype={loadTile:function(t,e){function r(t,r){return delete this.loading[n][i],t?e(t):r?(a.data=r.tile,a.parse(a.data,this.styleLayers.getLayerFamilies(),this.actor,r.rawTileData,e),this.loaded[n]=this.loaded[n]||{},void(this.loaded[n][i]=a)):e(null,null)}var n=t.source,i=t.uid;this.loading[n]||(this.loading[n]={});var a=this.loading[n][i]=new s(t);a.abort=this.loadVectorData(t,r.bind(this))},reloadTile:function(t,e){var r=this.loaded[t.source],n=t.uid;if(r&&r[n]){var i=r[n];i.parse(i.data,this.styleLayers.getLayerFamilies(),this.actor,t.rawTileData,e)}},abortTile:function(t){var e=this.loading[t.source],r=t.uid;e&&e[r]&&e[r].abort&&(e[r].abort(),delete e[r])},removeTile:function(t){var e=this.loaded[t.source],r=t.uid;e&&e[r]&&delete e[r]},loadVectorData:function(t,e){function r(t,r){if(t)return e(t);var n=new a.VectorTile(new o(new Uint8Array(r)));e(t,{tile:n,rawTileData:r})}var n=i.getArrayBuffer(t.url,r.bind(this));return function(){n.abort()}},redoPlacement:function(t,e){var r=this.loaded[t.source],n=this.loading[t.source],i=t.uid;if(r&&r[i]){var a=r[i],o=a.redoPlacement(t.angle,t.pitch,t.showCollisionBoxes);o.result&&e(null,o.result,o.transferables)}else n&&n[i]&&(n[i].angle=t.angle)}}},{"../util/ajax":407,"./worker_tile":356,pbf:459,"vector-tile":530}],354:[function(t,e,r){"use strict";function n(t,e){this.id=t,this.urls=e.urls,this.coordinates=e.coordinates,u.getVideo(e.urls,function(t,r){if(t)return this.fire("error",{error:t});this.video=r,this.video.loop=!0;var n;this.video.addEventListener("playing",function(){n=this.map.style.animationLoop.set(1/0),this.map._rerender()}.bind(this)),this.video.addEventListener("pause",function(){this.map.style.animationLoop.cancel(n)}.bind(this)),this.map&&(this.video.play(),this.setCoordinates(e.coordinates)),this.fire("load")}.bind(this))}var i=t("../util/util"),a=t("./tile_coord"),o=t("../geo/lng_lat"),s=t("point-geometry"),l=t("../util/evented"),u=t("../util/ajax"),c=t("../data/bucket").EXTENT,h=t("../render/draw_raster").RasterBoundsArray,f=t("../data/buffer"),d=t("../render/vertex_array_object");e.exports=n,n.prototype=i.inherit(l,{minzoom:0,maxzoom:22,tileSize:512,roundZoom:!0,getVideo:function(){return this.video},onAdd:function(t){this.map||(this.map=t,this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},setCoordinates:function(t){this.coordinates=t;var e=this.map,r=t.map(function(t){return e.transform.locationCoordinate(o.convert(t)).zoomTo(0)}),n=this.centerCoord=i.getCoordinatesCenter(r);return n.column=Math.round(n.column),n.row=Math.round(n.row),this.minzoom=this.maxzoom=n.zoom,this._coord=new a(n.zoom,n.column,n.row),this._tileCoords=r.map(function(t){var e=t.zoomTo(n.zoom);return new s(Math.round((e.column-n.column)*c),Math.round((e.row-n.row)*c))}),this.fire("change"),this},_setTile:function(t){this._prepared=!1,this.tile=t;var e=new h;e.emplaceBack(this._tileCoords[0].x,this._tileCoords[0].y,0,0),e.emplaceBack(this._tileCoords[1].x,this._tileCoords[1].y,32767,0),e.emplaceBack(this._tileCoords[3].x,this._tileCoords[3].y,0,32767),e.emplaceBack(this._tileCoords[2].x,this._tileCoords[2].y,32767,32767),this.tile.buckets={},this.tile.boundsBuffer=new f(e.serialize(),h.serialize(),f.BufferType.VERTEX),this.tile.boundsVAO=new d,this.tile.state="loaded"},prepare:function(){if(!(this.video.readyState<2)&&this.tile){var t=this.map.painter.gl;this._prepared?(t.bindTexture(t.TEXTURE_2D,this.tile.texture),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,this.video)):(this._prepared=!0,this.tile.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.tile.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.video)),this._currentTime=this.video.currentTime}},loadTile:function(t,e){this._coord&&this._coord.toString()===t.coord.toString()?(this._setTile(t),e(null)):(t.state="errored",e(null))},serialize:function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}})},{"../data/bucket":311,"../data/buffer":316,"../geo/lng_lat":321,"../render/draw_raster":333,"../render/vertex_array_object":339,"../util/ajax":407,"../util/evented":416,"../util/util":424,"./tile_coord":351,"point-geometry":465}],355:[function(t,e,r){"use strict";function n(t){this.self=t,this.actor=new a(t,this);var e={getLayers:function(){return this.layers}.bind(this),getLayerFamilies:function(){return this.layerFamilies}.bind(this)};this.workerSources={vector:new l(this.actor,e),geojson:new u(this.actor,e)},this.self.registerWorkerSource=function(t,r){if(this.workerSources[t])throw new Error('Worker source with name "'+t+'" already registered.');this.workerSources[t]=new r(this.actor,e)}.bind(this)}function i(t){var e={};for(var r in t){var n=t[r],i=n.ref||n.id,a=t[i];a.layout&&"none"===a.layout.visibility||(e[i]=e[i]||[],r===i?e[i].unshift(n):e[i].push(n))}return e}var a=t("../util/actor"),o=t("../style/style_layer"),s=t("../util/util"),l=t("./vector_tile_worker_source"),u=t("./geojson_worker_source");e.exports=function(t){return new n(t)},s.extend(n.prototype,{"set layers":function(t){function e(t){var e=o.create(t,t.ref&&r.layers[t.ref]);e.updatePaintTransitions({},{transition:!1}),r.layers[e.id]=e}this.layers={};for(var r=this,n=[],a=0;a=0;e--)b(E,P[e]);x()}}function b(t,e){if(e.populateArrays(A,F,R),"symbol"!==e.type)for(var r=0;r=w.maxzoom||w.layout&&"none"===w.layout.visibility||t.layers&&!t.layers[w.sourceLayer]||(k=c.create({layer:w,index:z++,childLayers:e[D],zoom:this.zoom,overscaling:this.overscaling,showCollisionBoxes:this.showCollisionBoxes,collisionBoxArray:this.collisionBoxArray,symbolQuadsArray:this.symbolQuadsArray,symbolInstancesArray:this.symbolInstancesArray,sourceLayerIndex:S.encode(w.sourceLayer||"_geojsonTileLayer")}),k.createFilter(),L[w.id]=k,t.layers&&(M=w.sourceLayer,C[M]=C[M]||{},C[M][w.id]=k)));if(t.layers)for(M in C)1===w.version&&d.warnOnce('Vector tile source "'+this.source+'" layer "'+M+'" does not use vector tile spec v2 and therefore may have some rendering errors.'),(w=t.layers[M])&&v(w,C[M]);else v(t,L);var I=[],P=this.symbolBuckets=[],O=[];T.bucketLayerIDs={};for(var j in L)k=L[j],0!==k.features.length&&(T.bucketLayerIDs[k.index]=k.childLayers.map(s),I.push(k),"symbol"===k.type?P.push(k):O.push(k));var R={},F={},N=0;if(P.length>0){for(_=P.length-1;_>=0;_--)P[_].updateIcons(R),P[_].updateFont(F);for(var B in F)F[B]=Object.keys(F[B]).map(Number);R=Object.keys(R),r.send("get glyphs",{uid:this.uid,stacks:F},function(t,e){F=e,y(t)}),R.length?r.send("get icons",{icons:R},function(t,e){R=e,y(t)}):y()}for(_=O.length-1;_>=0;_--)b(this,O[_]);if(0===P.length)return x()},n.prototype.redoPlacement=function(t,e,r){if("done"!==this.status)return this.redoPlacementAfterDone=!0,this.angle=t,{};for(var n=new u(t,e,this.collisionBoxArray),s=this.symbolBuckets,l=s.length-1;l>=0;l--)s[l].placeFeatures(n,r);var c=n.serialize(),h=s.filter(i);return{result:{buckets:h.map(a),collisionTile:c.data},transferables:o(h).concat(c.transferables)}}},{"../data/bucket":311,"../data/feature_index":318,"../symbol/collision_box":376,"../symbol/collision_tile":378,"../symbol/symbol_instances":387,"../symbol/symbol_quads":388,"../util/dictionary_coder":414,"../util/util":424}],357:[function(t,e,r){"use strict";function n(){this.n=0,this.times=[]}e.exports=n,n.prototype.stopped=function(){return this.times=this.times.filter(function(t){return t.time>=(new Date).getTime()}),!this.times.length},n.prototype.set=function(t){return this.times.push({id:this.n,time:t+(new Date).getTime()}),this.n++},n.prototype.cancel=function(t){this.times=this.times.filter(function(e){return e.id!==t})}},{}],358:[function(t,e,r){"use strict";function n(t){this.base=t,this.retina=s.devicePixelRatio>1;var e=this.retina?"@2x":"";o.getJSON(l(t,e,".json"),function(t,e){if(t)return void this.fire("error",{error:t});this.data=e,this.img&&this.fire("load")}.bind(this)),o.getImage(l(t,e,".png"),function(t,e){if(t)return void this.fire("error",{error:t});for(var r=e.getData(),n=e.data=new Uint8Array(r.length),i=0;i1!==this.retina){var t=new n(this.base);t.on("load",function(){this.img=t.img,this.data=t.data,this.retina=t.retina}.bind(this))}},i.prototype={x:0,y:0,width:0,height:0,pixelRatio:1,sdf:!1},n.prototype.getSpritePosition=function(t){if(!this.loaded())return new i;var e=this.data&&this.data[t];return e&&this.img?e:new i}},{"../util/ajax":407,"../util/browser":408,"../util/evented":416,"../util/mapbox":421}],359:[function(t,e,r){"use strict";var n=t("csscolorparser").parseCSSColor,i=t("../util/util"),a=t("./style_function"),o={};e.exports=function t(e){if(a.isFunctionDefinition(e))return i.extend({},e,{stops:e.stops.map(function(e){return[e[0],t(e[1])]})});if("string"==typeof e){if(!o[e]){var r=n(e);if(!r)throw new Error("Invalid color "+e);o[e]=[r[0]/255*r[3],r[1]/255*r[3],r[2]/255*r[3],r[3]]}return o[e]}throw new Error("Invalid color "+e)}},{"../util/util":424,"./style_function":362,csscolorparser:101}],360:[function(t,e,r){"use strict";function n(t,e,r){this.animationLoop=e||new m,this.dispatcher=new p(r||1,this),this.spriteAtlas=new l(1024,1024),this.lineAtlas=new u(256,512),this._layers={},this._order=[],this._groups=[],this.sources={},this.zoomHistory={},c.bindAll(["_forwardSourceEvent","_forwardTileEvent","_forwardLayerEvent","_redoPlacement"],this),this._resetUpdates();var n=function(t,e){if(t)return void this.fire("error",{error:t});if(!g.emitErrors(this,g(e))){this._loaded=!0,this.stylesheet=e,this.updateClasses();var r=e.sources;for(var n in r)this.addSource(n,r[n]);e.sprite&&(this.sprite=new o(e.sprite),this.sprite.on("load",this.fire.bind(this,"change"))),this.glyphSource=new s(e.glyphs),this._resolve(),this.fire("load")}}.bind(this);"string"==typeof t?h.getJSON(f(t),n):d.frame(n.bind(this,null,t)),this.on("source.load",function(t){var e=t.source;if(e&&e.vectorLayerIds)for(var r in this._layers){var n=this._layers[r];n.source===e.id&&this._validateLayer(n)}})}var i=t("../util/evented"),a=t("./style_layer"),o=t("./image_sprite"),s=t("../symbol/glyph_source"),l=t("../symbol/sprite_atlas"),u=t("../render/line_atlas"),c=t("../util/util"),h=t("../util/ajax"),f=t("../util/mapbox").normalizeStyleURL,d=t("../util/browser"),p=t("../util/dispatcher"),m=t("./animation_loop"),g=t("./validate_style"),v=t("../source/source"),y=t("../source/query_features"),b=t("../source/source_cache"),x=t("./style_spec"),_=t("./style_function");e.exports=n,n.prototype=c.inherit(i,{_loaded:!1,_validateLayer:function(t){var e=this.sources[t.source];t.sourceLayer&&e&&e.vectorLayerIds&&e.vectorLayerIds.indexOf(t.sourceLayer)===-1&&this.fire("error",{error:new Error('Source layer "'+t.sourceLayer+'" does not exist on source "'+e.id+'" as specified by style layer "'+t.id+'"')})},loaded:function(){if(!this._loaded)return!1;if(Object.keys(this._updates.sources).length)return!1;for(var t in this.sources)if(!this.sources[t].loaded())return!1;return!(this.sprite&&!this.sprite.loaded())},_resolve:function(){var t,e;this._layers={},this._order=this.stylesheet.layers.map(function(t){return t.id});for(var r=0;rMath.floor(t)&&(e.lastIntegerZoom=Math.floor(t+1),e.lastIntegerZoomTime=Date.now()),e.lastZoom=t},_checkLoaded:function(){if(!this._loaded)throw new Error("Style is not done loading")},update:function(t,e){if(!this._updates.changed)return this;if(this._updates.allLayers)this._groupLayers(),this._updateWorkerLayers();else{var r=Object.keys(this._updates.layers);r.length&&this._updateWorkerLayers(r)}var n,i=Object.keys(this._updates.sources);for(n=0;n=0&&this._handleErrors(g.source,"sources."+t,e)?this:(e=new b(t,e,this.dispatcher),this.sources[t]=e,e.style=this,e.on("load",this._forwardSourceEvent).on("error",this._forwardSourceEvent).on("change",this._forwardSourceEvent).on("tile.add",this._forwardTileEvent).on("tile.load",this._forwardTileEvent).on("tile.error",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this._updates.events.push(["source.add",{source:e}]),this._updates.changed=!0,this)},removeSource:function(t){if(this._checkLoaded(),void 0===this.sources[t])throw new Error("There is no source with this ID");var e=this.sources[t];return delete this.sources[t],delete this._updates.sources[t],e.off("load",this._forwardSourceEvent).off("error",this._forwardSourceEvent).off("change",this._forwardSourceEvent).off("tile.add",this._forwardTileEvent).off("tile.load",this._forwardTileEvent).off("tile.error",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent),this._updates.events.push(["source.remove",{source:e}]),this._updates.changed=!0,this},getSource:function(t){return this.sources[t]&&this.sources[t].getSource()},addLayer:function(t,e){if(this._checkLoaded(),!(t instanceof a)){if(this._handleErrors(g.layer,"layers."+t.id,t,!1,{arrayIndex:-1}))return this;var r=t.ref&&this.getLayer(t.ref);t=a.create(t,r)}return this._validateLayer(t),t.on("error",this._forwardLayerEvent),this._layers[t.id]=t,this._order.splice(e?this._order.indexOf(e):1/0,0,t.id),this._updates.allLayers=!0,t.source&&(this._updates.sources[t.source]=!0),this._updates.events.push(["layer.add",{layer:t}]),this.updateClasses(t.id)},removeLayer:function(t){this._checkLoaded();var e=this._layers[t];if(void 0===e)throw new Error("There is no layer with this ID");for(var r in this._layers)this._layers[r].ref===t&&this.removeLayer(r);return e.off("error",this._forwardLayerEvent),delete this._layers[t],delete this._updates.layers[t],delete this._updates.paintProps[t],this._order.splice(this._order.indexOf(t),1),this._updates.allLayers=!0,this._updates.events.push(["layer.remove",{layer:e}]),this._updates.changed=!0,this},getLayer:function(t){return this._layers[t]},getReferentLayer:function(t){var e=this.getLayer(t);return e.ref&&(e=this.getLayer(e.ref)),e},setLayerZoomRange:function(t,e,r){this._checkLoaded();var n=this.getReferentLayer(t);return n.minzoom===e&&n.maxzoom===r?this:(null!=e&&(n.minzoom=e),null!=r&&(n.maxzoom=r),this._updateLayer(n))},setFilter:function(t,e){this._checkLoaded();var r=this.getReferentLayer(t);return null!==e&&this._handleErrors(g.filter,"layers."+r.id+".filter",e)?this:c.deepEqual(r.filter,e)?this:(r.filter=c.clone(e),this._updateLayer(r))},getFilter:function(t){return this.getReferentLayer(t).filter},setLayoutProperty:function(t,e,r){this._checkLoaded();var n=this.getReferentLayer(t);return c.deepEqual(n.getLayoutProperty(e),r)?this:(n.setLayoutProperty(e,r),this._updateLayer(n))},getLayoutProperty:function(t,e){return this.getReferentLayer(t).getLayoutProperty(e)},setPaintProperty:function(t,e,r,n){this._checkLoaded();var i=this.getLayer(t);if(c.deepEqual(i.getPaintProperty(e,n),r))return this;var a=i.isPaintValueFeatureConstant(e);return i.setPaintProperty(e,r,n),!(r&&_.isFunctionDefinition(r)&&"$zoom"!==r.property&&void 0!==r.property)&&a||(this._updates.layers[t]=!0,i.source&&(this._updates.sources[i.source]=!0)),this.updateClasses(t,e)},getPaintProperty:function(t,e,r){return this.getLayer(t).getPaintProperty(e,r)},updateClasses:function(t,e){if(this._updates.changed=!0,t){var r=this._updates.paintProps;r[t]||(r[t]={}),r[t][e||"all"]=!0}else this._updates.allPaintProps=!0;return this},serialize:function(){return c.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:c.mapObject(this.sources,function(t){return t.serialize()}),layers:this._order.map(function(t){return this._layers[t].serialize()},this)},function(t){return void 0!==t})},_updateLayer:function(t){return this._updates.layers[t.id]=!0,t.source&&(this._updates.sources[t.source]=!0),this._updates.changed=!0,this},_flattenRenderedFeatures:function(t){for(var e=[],r=this._order.length-1;r>=0;r--)for(var n=this._order[r],i=0;is.lastIntegerZoom?(n=u+(1-u)*c,h*=2,i=t({zoom:o-1},r),a=t({zoom:o},r)):(n=1-(1-c)*u,a=t({zoom:o},r),i=t({zoom:o+1},r),h/=2),void 0===i||void 0===a?void 0:{from:i,fromScale:h,to:a,toScale:1,t:n}}}var a=t("./style_function"),o=t("./parse_color"),s=t("../util/util");e.exports=n},{"../util/util":424,"./parse_color":359,"./style_function":362}],362:[function(t,e,r){"use strict";var n=t("mapbox-gl-function");r.interpolated=function(t){var e=n.interpolated(t),r=function(t,r){return e(t&&t.zoom,r||{})};return r.isFeatureConstant=e.isFeatureConstant,r.isZoomConstant=e.isZoomConstant,r},r["piecewise-constant"]=function(t){var e=n["piecewise-constant"](t),r=function(t,r){return e(t&&t.zoom,r||{})};return r.isFeatureConstant=e.isFeatureConstant,r.isZoomConstant=e.isZoomConstant,r},r.isFunctionDefinition=n.isFunctionDefinition},{"mapbox-gl-function":284}],363:[function(t,e,r){"use strict";function n(t,e){this.set(t,e)}function i(t){return t.value}var a=t("../util/util"),o=t("./style_transition"),s=t("./style_declaration"),l=t("./style_spec"),u=t("./validate_style"),c=t("./parse_color"),h=t("../util/evented");e.exports=n;n.create=function(e,r){return new({background:t("./style_layer/background_style_layer"),circle:t("./style_layer/circle_style_layer"),fill:t("./style_layer/fill_style_layer"),line:t("./style_layer/line_style_layer"),raster:t("./style_layer/raster_style_layer"),symbol:t("./style_layer/symbol_style_layer")}[(r||e).type])(e,r)},n.prototype=a.inherit(h,{set:function(t,e){this.id=t.id,this.ref=t.ref,this.metadata=t.metadata,this.type=(e||t).type,this.source=(e||t).source,this.sourceLayer=(e||t)["source-layer"],this.minzoom=(e||t).minzoom,this.maxzoom=(e||t).maxzoom,this.filter=(e||t).filter,this.paint={},this.layout={},this._paintSpecifications=l["paint_"+this.type],this._layoutSpecifications=l["layout_"+this.type],this._paintTransitions={},this._paintTransitionOptions={},this._paintDeclarations={},this._layoutDeclarations={},this._layoutFunctions={};var r,n;for(var i in t){var a=i.match(/^paint(?:\.(.*))?$/);if(a){var o=a[1]||"";for(r in t[i])this.setPaintProperty(r,t[i][r],o)}}if(this.ref)this._layoutDeclarations=e._layoutDeclarations;else for(n in t.layout)this.setLayoutProperty(n,t.layout[n]);for(r in this._paintSpecifications)this.paint[r]=this.getPaintValue(r);for(n in this._layoutSpecifications)this._updateLayoutValue(n)},setLayoutProperty:function(t,e){if(null==e)delete this._layoutDeclarations[t];else{var r="layers."+this.id+".layout."+t;if(this._handleErrors(u.layoutProperty,r,t,e))return;this._layoutDeclarations[t]=new s(this._layoutSpecifications[t],e)}this._updateLayoutValue(t)},getLayoutProperty:function(t){return this._layoutDeclarations[t]&&this._layoutDeclarations[t].value},getLayoutValue:function(t,e,r){var n=this._layoutSpecifications[t],i=this._layoutDeclarations[t];return i?i.calculate(e,r):n.default},setPaintProperty:function(t,e,r){var n="layers."+this.id+(r?'["paint.'+r+'"].':".paint.")+t;if(a.endsWith(t,"-transition"))if(this._paintTransitionOptions[r||""]||(this._paintTransitionOptions[r||""]={}),null===e||void 0===e)delete this._paintTransitionOptions[r||""][t];else{if(this._handleErrors(u.paintProperty,n,t,e))return;this._paintTransitionOptions[r||""][t]=e}else if(this._paintDeclarations[r||""]||(this._paintDeclarations[r||""]={}),null===e||void 0===e)delete this._paintDeclarations[r||""][t];else{if(this._handleErrors(u.paintProperty,n,t,e))return;this._paintDeclarations[r||""][t]=new s(this._paintSpecifications[t],e)}},getPaintProperty:function(t,e){return e=e||"",a.endsWith(t,"-transition")?this._paintTransitionOptions[e]&&this._paintTransitionOptions[e][t]:this._paintDeclarations[e]&&this._paintDeclarations[e][t]&&this._paintDeclarations[e][t].value},getPaintValue:function(t,e,r){var n=this._paintSpecifications[t],i=this._paintTransitions[t];return i?i.calculate(e,r):"color"===n.type&&n.default?c(n.default):n.default},getPaintValueStopZoomLevels:function(t){var e=this._paintTransitions[t];return e?e.declaration.stopZoomLevels:[]},getPaintInterpolationT:function(t,e){return this._paintTransitions[t].declaration.calculateInterpolationT({zoom:e})},isPaintValueFeatureConstant:function(t){var e=this._paintTransitions[t];return!e||e.declaration.isFeatureConstant},isLayoutValueFeatureConstant:function(t){var e=this._layoutDeclarations[t];return!e||e.isFeatureConstant},isPaintValueZoomConstant:function(t){var e=this._paintTransitions[t];return!e||e.declaration.isZoomConstant},isHidden:function(t){return!!(this.minzoom&&t=this.maxzoom)||("none"===this.layout.visibility||0===this.paint[this.type+"-opacity"]))},updatePaintTransitions:function(t,e,r,n){for(var i=a.extend({},this._paintDeclarations[""]),o=0;o-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],u=0;sn;)u-=l.shift().angleDelta;if(u>i)return!1;o++,s+=h.dist(f)}return!0}e.exports=n},{}],375:[function(t,e,r){"use strict";function n(t,e,r,n,a){for(var o=[],s=0;s=n&&f.x>=n||(h.x>=n?h=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round():f.x>=n&&(f=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round()),h.y>=a&&f.y>=a||(h.y>=a?h=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round():f.y>=a&&(f=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round()),l&&h.equals(l[l.length-1])||(l=[h],o.push(l)),l.push(f)))))}return o}var i=t("point-geometry");e.exports=n},{"point-geometry":465}],376:[function(t,e,r){ -"use strict";var n=t("../util/struct_array"),i=t("../util/util"),a=t("point-geometry"),o=e.exports=new n({members:[{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Float32",name:"maxScale"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"bbox0"},{type:"Int16",name:"bbox1"},{type:"Int16",name:"bbox2"},{type:"Int16",name:"bbox3"},{type:"Float32",name:"placementScale"}]});i.extendAll(o.prototype.StructType.prototype,{get anchorPoint(){return new a(this.anchorPointX,this.anchorPointY)}})},{"../util/struct_array":422,"../util/util":424,"point-geometry":465}],377:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l,u,c){var h=o.top*s-l,f=o.bottom*s+l,d=o.left*s-l,p=o.right*s+l;if(this.boxStartIndex=t.length,u){var m=f-h,g=p-d;if(m>0)if(m=Math.max(10*s,m),c){var v=e[r.segment+1].sub(e[r.segment])._unit()._mult(g),y=[r.sub(v),r.add(v)];this._addLineCollisionBoxes(t,y,r,0,g,m,n,i,a)}else this._addLineCollisionBoxes(t,e,r,r.segment,g,m,n,i,a)}else t.emplaceBack(r.x,r.y,d,h,p,f,1/0,n,i,a,0,0,0,0,0);this.boxEndIndex=t.length}e.exports=n,n.prototype._addLineCollisionBoxes=function(t,e,r,n,i,a,o,s,l){var u=a/2,c=Math.floor(i/u),h=-a/2,f=this.boxes,d=r,p=n+1,m=h;do{if(--p<0)return f;m-=e[p].dist(d),d=e[p]}while(m>-i/2);for(var g=e[p].dist(e[p+1]),v=0;v=e.length)return f;g=e[p].dist(e[p+1])}var b=y-m,x=e[p],_=e[p+1],w=_.sub(x)._unit()._mult(b)._add(x)._round(),M=Math.max(Math.abs(y-h)-u/2,0),k=i/2/M;t.emplaceBack(w.x,w.y,-a/2,-a/2,a/2,a/2,k,o,s,l,0,0,0,0,0)}return f}},{}],378:[function(t,e,r){"use strict";function n(t,e,r){if("object"==typeof t){var n=t;r=e,t=n.angle,e=n.pitch,this.grid=new o(n.grid),this.ignoredGrid=new o(n.ignoredGrid)}else this.grid=new o(a,12,6),this.ignoredGrid=new o(a,12,0);this.angle=t,this.pitch=e;var i=Math.sin(t),s=Math.cos(t);if(this.rotationMatrix=[s,-i,i,s],this.reverseRotationMatrix=[s,i,-i,s],this.yStretch=1/Math.cos(e/180*Math.PI),this.yStretch=Math.pow(this.yStretch,1.3),this.collisionBoxArray=r,0===r.length){r.emplaceBack();r.emplaceBack(0,0,0,-32767,0,32767,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(a,0,0,-32767,0,32767,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(0,0,-32767,0,32767,0,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(0,a,-32767,0,32767,0,32767,0,0,0,0,0,0,0,0,0)}this.tempCollisionBox=r.get(0),this.edges=[r.get(1),r.get(2),r.get(3),r.get(4)]}var i=t("point-geometry"),a=t("../data/bucket").EXTENT,o=t("grid-index");e.exports=n,n.prototype.serialize=function(){var t={angle:this.angle,pitch:this.pitch,grid:this.grid.toArrayBuffer(),ignoredGrid:this.ignoredGrid.toArrayBuffer()};return{data:t,transferables:[t.grid,t.ignoredGrid]}},n.prototype.minScale=.25,n.prototype.maxScale=2,n.prototype.placeCollisionFeature=function(t,e,r){for(var n=this.collisionBoxArray,a=this.minScale,o=this.rotationMatrix,s=this.yStretch,l=t.boxStartIndex;l=this.maxScale)return a}if(r){var _;if(this.angle){var w=this.reverseRotationMatrix,M=new i(u.x1,u.y1).matMult(w),k=new i(u.x2,u.y1).matMult(w),A=new i(u.x1,u.y2).matMult(w),T=new i(u.x2,u.y2).matMult(w);_=this.tempCollisionBox,_.anchorPointX=u.anchorPoint.x,_.anchorPointY=u.anchorPoint.y,_.x1=Math.min(M.x,k.x,A.x,T.x),_.y1=Math.min(M.y,k.x,A.x,T.x),_.x2=Math.max(M.x,k.x,A.x,T.x),_.y2=Math.max(M.y,k.x,A.x,T.x),_.maxScale=u.maxScale}else _=u;for(var S=0;S=this.maxScale)return a}}}return a},n.prototype.queryRenderedSymbols=function(t,e,r,n,a){var o={},s=[],l=this.collisionBoxArray,u=this.rotationMatrix,c=new i(t,e)._matMult(u),h=this.tempCollisionBox;h.anchorX=c.x,h.anchorY=c.y,h.x1=0,h.y1=0,h.x2=r-t,h.y2=n-e,h.maxScale=a,a=h.maxScale;for(var f=[c.x+h.x1/a,c.y+h.y1/a*this.yStretch,c.x+h.x2/a,c.y+h.y2/a*this.yStretch],d=this.grid.query(f[0],f[1],f[2],f[3]),p=this.ignoredGrid.query(f[0],f[1],f[2],f[3]),m=0;m=a&&(o[y][b]=!0,s.push(d[g]))}}return s},n.prototype.getPlacementScale=function(t,e,r,n,i){var a=e.x-n.x,o=e.y-n.y,s=(i.x1-r.x2)/a,l=(i.x2-r.x1)/a,u=(i.y1-r.y2)*this.yStretch/o,c=(i.y2-r.y1)*this.yStretch/o;(isNaN(s)||isNaN(l))&&(s=l=1),(isNaN(u)||isNaN(c))&&(u=c=1);var h=Math.min(Math.max(s,l),Math.max(u,c)),f=i.maxScale,d=r.maxScale;return h>f&&(h=f),h>d&&(h=d),h>t&&h>=i.placementScale&&(t=h),t},n.prototype.insertCollisionFeature=function(t,e,r){for(var n=r?this.ignoredGrid:this.grid,i=this.collisionBoxArray,a=t.boxStartIndex;a=0&&A=0&&T=0&&v+d<=p){var S=new o(A,T,M,b)._round();n&&!s(t,S,u,n,l)||y.push(S)}}g+=w}return h||y.length||c||(y=i(t,g/2,r,n,l,u,c,!0,f)),y}var a=t("../util/interpolate"),o=t("../symbol/anchor"),s=t("./check_max_angle");e.exports=n},{"../symbol/anchor":373,"../util/interpolate":418,"./check_max_angle":374}],380:[function(t,e,r){"use strict";function n(){this.width=o,this.height=o,this.bin=new i(this.width,this.height),this.index={},this.ids={},this.data=new Uint8Array(this.width*this.height)}var i=t("shelf-pack"),a=t("../util/util"),o=128;e.exports=n,n.prototype.getGlyphs=function(){var t,e,r,n={};for(var i in this.ids)t=i.split("#"),e=t[0],r=t[1],n[e]||(n[e]=[]),n[e].push(r);return n},n.prototype.getRects=function(){var t,e,r,n={};for(var i in this.ids)t=i.split("#"),e=t[0],r=t[1],n[e]||(n[e]={}),n[e][r]=this.index[i];return n},n.prototype.addGlyph=function(t,e,r,n){if(!r)return null;var i=e+"#"+r.id;if(this.index[i])return this.ids[i].indexOf(t)<0&&this.ids[i].push(t),this.index[i];if(!r.bitmap)return null;var o=r.width+2*n,s=r.height+2*n,l=o+2,u=s+2;l+=4-l%4,u+=4-u%4;var c=this.bin.packOne(l,u);if(c||(this.resize(),c=this.bin.packOne(l,u)),!c)return a.warnOnce("glyph bitmap overflow"),null;this.index[i]=c,this.ids[i]=[t];for(var h=this.data,f=r.bitmap,d=0;d=2048||e>=2048)){this.texture&&(this.gl&&this.gl.deleteTexture(this.texture),this.texture=null),this.width*=4,this.height*=4,this.bin.resize(this.width,this.height);for(var r=new ArrayBuffer(this.width*this.height),n=0;n65535)return r("glyphs > 65535 not supported");void 0===this.loading[t]&&(this.loading[t]={});var n=this.loading[t];if(n[e])n[e].push(r);else{n[e]=[r];var i=256*e+"-"+(256*e+255),o=a(t,i,this.url);s(o,function(t,r){for(var i=!t&&new l(new c(new Uint8Array(r))),a=0;an&&null!==c){var x=v[c+1].x;g=Math.max(x,g);for(var _=c+1;_<=y;_++)v[_].y+=r,v[_].x-=x;if(o){var w=c;h[v[c].codePoint]&&w--,s(v,e,p,w,o)}p=c+1,c=null,d+=x,m++}f[b.codePoint]&&(c=y)}var M=v[v.length-1],k=M.x+e[M.codePoint].advance;g=Math.max(g,k);var A=(m+1)*r;s(v,e,p,v.length-1,o),l(v,o,i,a,g,r,m,u),t.top+=-a*A,t.bottom=t.top+A,t.left+=-i*g,t.right=t.left+g}function s(t,e,r,n,i){for(var a=e[t[n].codePoint].advance,o=(t[n].x+a)*i,s=r;s<=n;s++)t[s].x-=o}function l(t,e,r,n,i,a,o,s){for(var l=(e-r)*i+s[0],u=(-n*(o+1)+.5)*a+s[1],c=0;c1?2:1,this.canvas&&(this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio)),this.sprite=t},n.prototype.addIcons=function(t,e){for(var r=0;r1||(w?(clearTimeout(w),w=null,v("dblclick",e)):w=setTimeout(d,300))}function c(t){y("touchmove",t)}function h(t){y("touchend",t)}function f(t){y("touchcancel",t)}function d(){w=null}function p(t){n.mousePos(b,t).equals(_)&&v("click",t)}function m(t){v("dblclick",t),t.preventDefault()}function g(t){x=t,t.preventDefault()}function v(e,r){var i=n.mousePos(b,r);return t.fire(e,{lngLat:t.unproject(i),point:i,originalEvent:r})}function y(e,r){var a=n.touchPos(b,r),o=a.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new i(0,0));return t.fire(e,{lngLat:t.unproject(o),point:o,lngLats:a.map(function(e){return t.unproject(e)},this),points:a,originalEvent:r})}var b=t.getCanvasContainer(),x=null,_=null,w=null;for(var M in a)t[M]=new a[M](t,e),e.interactive&&e[M]&&t[M].enable();b.addEventListener("mouseout",r,!1),b.addEventListener("mousedown",o,!1),b.addEventListener("mouseup",s,!1),b.addEventListener("mousemove",l,!1),b.addEventListener("touchstart",u,!1),b.addEventListener("touchend",h,!1),b.addEventListener("touchmove",c,!1),b.addEventListener("touchcancel",f,!1),b.addEventListener("click",p,!1),b.addEventListener("dblclick",m,!1),b.addEventListener("contextmenu",g,!1)}},{"../util/dom":410,"./handler/box_zoom":395,"./handler/dblclick_zoom":396,"./handler/drag_pan":397,"./handler/drag_rotate":398,"./handler/keyboard":399,"./handler/scroll_zoom":400,"./handler/touch_zoom_rotate":401,"point-geometry":465}],390:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("../util/interpolate"),a=t("../util/browser"),o=t("../geo/lng_lat"),s=t("../geo/lng_lat_bounds"),l=t("point-geometry"),u=e.exports=function(){};n.extend(u.prototype,{getCenter:function(){return this.transform.center},setCenter:function(t,e){return this.jumpTo({center:t},e),this},panBy:function(t,e,r){return this.panTo(this.transform.center,n.extend({offset:l.convert(t).mult(-1)},e),r),this},panTo:function(t,e,r){return this.easeTo(n.extend({center:t},e),r)},getZoom:function(){return this.transform.zoom},setZoom:function(t,e){return this.jumpTo({zoom:t},e),this},zoomTo:function(t,e,r){return this.easeTo(n.extend({zoom:t},e),r)},zoomIn:function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},zoomOut:function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},getBearing:function(){return this.transform.bearing},setBearing:function(t,e){return this.jumpTo({bearing:t},e),this},rotateTo:function(t,e,r){return this.easeTo(n.extend({bearing:t},e),r)},resetNorth:function(t,e){return this.rotateTo(0,n.extend({duration:1e3},t),e),this},snapToNorth:function(t,e){return Math.abs(this.getBearing())180&&(c.center.lng>0&&m.lng<0?m.lng+=360:c.center.lng<0&&m.lng>0&&(m.lng-=360));var b=c.zoomScale(g-f),x=c.point,_="center"in t?c.project(m).sub(h.div(b)):x,w=c.worldSize,M=t.curve,k=Math.max(c.width,c.height),A=k/b,T=_.sub(x).mag();if("minZoom"in t){var S=n.clamp(Math.min(t.minZoom,f,g),c.minZoom,c.maxZoom),E=k/c.zoomScale(S-f);M=Math.sqrt(E/T*2)}var L=M*M,C=r(0),z=function(t){return s(C)/s(C+M*t)},D=function(t){return k*((s(C)*u(C+M*t)-a(C))/L)/T},I=(r(1)-C)/M;if(Math.abs(T)<1e-6){if(Math.abs(k-A)<1e-6)return this.easeTo(t);var P=A=0)return!1;return!0}),e.join(" | ")},n.prototype=o.inherit(i,{options:{position:"bottom-right"},onAdd:function(t){var e=this._container=a.create("div","mapboxgl-ctrl-attrib",t.getContainer());return this._update(),t.on("source.load",this._update.bind(this)),t.on("source.change",this._update.bind(this)),t.on("source.remove",this._update.bind(this)),t.on("moveend",this._updateEditLink.bind(this)),e},_update:function(){this._map.style&&(this._container.innerHTML=n.createAttributionString(this._map.style.sources)),this._editLink=this._container.getElementsByClassName("mapbox-improve-map")[0],this._updateEditLink()},_updateEditLink:function(){if(this._editLink){var t=this._map.getCenter();this._editLink.href="https://www.mapbox.com/map-feedback/#/"+t.lng+"/"+t.lat+"/"+Math.round(this._map.getZoom()+1)}}})},{"../../util/dom":410,"../../util/util":424,"./control":392}],392:[function(t,e,r){"use strict";function n(){}var i=t("../../util/util"),a=t("../../util/evented");e.exports=n,n.prototype={addTo:function(t){this._map=t;var e=this._container=this.onAdd(t);if(this.options&&this.options.position){var r=this.options.position,n=t._controlCorners[r];e.className+=" mapboxgl-ctrl",r.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e)}return this},remove:function(){return this._container.parentNode.removeChild(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this}},i.extend(n.prototype,a)},{"../../util/evented":416,"../../util/util":424}],393:[function(t,e,r){"use strict";function n(t){s.setOptions(this,t)}var i=t("./control"),a=t("../../util/browser"),o=t("../../util/dom"),s=t("../../util/util");e.exports=n;var l={enableHighAccuracy:!1,timeout:6e3};n.prototype=s.inherit(i,{options:{position:"top-right"},onAdd:function(t){var e=this._container=o.create("div","mapboxgl-ctrl-group",t.getContainer());return a.supportsGeolocation?(this._container.addEventListener("contextmenu",this._onContextMenu.bind(this)),this._geolocateButton=o.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.addEventListener("click",this._onClickGeolocate.bind(this)),e):e},_onContextMenu:function(t){t.preventDefault()},_onClickGeolocate:function(){navigator.geolocation.getCurrentPosition(this._success.bind(this),this._error.bind(this),l),this._timeoutId=setTimeout(this._finish.bind(this),1e4)},_success:function(t){this._map.jumpTo({center:[t.coords.longitude,t.coords.latitude],zoom:17,bearing:0,pitch:0}), -this.fire("geolocate",t),this._finish()},_error:function(t){this.fire("error",t),this._finish()},_finish:function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}})},{"../../util/browser":408,"../../util/dom":410,"../../util/util":424,"./control":392}],394:[function(t,e,r){"use strict";function n(t){s.setOptions(this,t)}function i(t){return new MouseEvent(t.type,{button:2,buttons:2,bubbles:!0,cancelable:!0,detail:t.detail,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,movementX:t.movementX,movementY:t.movementY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey})}var a=t("./control"),o=t("../../util/dom"),s=t("../../util/util");e.exports=n,n.prototype=s.inherit(a,{options:{position:"top-right"},onAdd:function(t){var e="mapboxgl-ctrl",r=this._container=o.create("div",e+"-group",t.getContainer());return this._container.addEventListener("contextmenu",this._onContextMenu.bind(this)),this._zoomInButton=this._createButton(e+"-icon "+e+"-zoom-in",t.zoomIn.bind(t)),this._zoomOutButton=this._createButton(e+"-icon "+e+"-zoom-out",t.zoomOut.bind(t)),this._compass=this._createButton(e+"-icon "+e+"-compass",t.resetNorth.bind(t)),this._compassArrow=o.create("div","arrow",this._compass),this._compass.addEventListener("mousedown",this._onCompassDown.bind(this)),this._onCompassMove=this._onCompassMove.bind(this),this._onCompassUp=this._onCompassUp.bind(this),t.on("rotate",this._rotateCompassArrow.bind(this)),this._rotateCompassArrow(),this._el=t.getCanvasContainer(),r},_onContextMenu:function(t){t.preventDefault()},_onCompassDown:function(t){0===t.button&&(o.disableDrag(),document.addEventListener("mousemove",this._onCompassMove),document.addEventListener("mouseup",this._onCompassUp),this._el.dispatchEvent(i(t)),t.stopPropagation())},_onCompassMove:function(t){0===t.button&&(this._el.dispatchEvent(i(t)),t.stopPropagation())},_onCompassUp:function(t){0===t.button&&(document.removeEventListener("mousemove",this._onCompassMove),document.removeEventListener("mouseup",this._onCompassUp),o.enableDrag(),this._el.dispatchEvent(i(t)),t.stopPropagation())},_createButton:function(t,e){var r=o.create("button",t,this._container);return r.type="button",r.addEventListener("click",function(){e()}),r},_rotateCompassArrow:function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t}})},{"../../util/dom":410,"../../util/util":424,"./control":392}],395:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),o.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../geo/lng_lat_bounds"),o=t("../../util/util");e.exports=n,n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onMouseDown,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onMouseDown),this._enabled=!1)},_onMouseDown:function(t){t.shiftKey&&0===t.button&&(document.addEventListener("mousemove",this._onMouseMove,!1),document.addEventListener("keydown",this._onKeyDown,!1),document.addEventListener("mouseup",this._onMouseUp,!1),i.disableDrag(),this._startPos=i.mousePos(this._el,t),this._active=!0)},_onMouseMove:function(t){var e=this._startPos,r=i.mousePos(this._el,t);this._box||(this._box=i.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var n=Math.min(e.x,r.x),a=Math.max(e.x,r.x),o=Math.min(e.y,r.y),s=Math.max(e.y,r.y);i.setTransform(this._box,"translate("+n+"px,"+o+"px)"),this._box.style.width=a-n+"px",this._box.style.height=s-o+"px"},_onMouseUp:function(t){if(0===t.button){var e=this._startPos,r=i.mousePos(this._el,t),n=new a(this._map.unproject(e),this._map.unproject(r));this._finish(),e.x===r.x&&e.y===r.y?this._fireEvent("boxzoomcancel",t):this._map.fitBounds(n,{linear:!0}).fire("boxzoomend",{originalEvent:t,boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},_finish:function(){this._active=!1,document.removeEventListener("mousemove",this._onMouseMove,!1),document.removeEventListener("keydown",this._onKeyDown,!1),document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.parentNode.removeChild(this._box),this._box=null),i.enableDrag()},_fireEvent:function(t,e){return this._map.fire(t,{originalEvent:e})}}},{"../../geo/lng_lat_bounds":322,"../../util/dom":410,"../../util/util":424}],396:[function(t,e,r){"use strict";function n(t){this._map=t,this._onDblClick=this._onDblClick.bind(this)}e.exports=n,n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._map.on("dblclick",this._onDblClick),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._map.off("dblclick",this._onDblClick),this._enabled=!1)},_onDblClick:function(t){this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)}}},{}],397:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),a.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/util");e.exports=n;var o=a.bezier(0,0,.3,1);n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._el.addEventListener("touchstart",this._onDown),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._el.removeEventListener("touchstart",this._onDown),this._enabled=!1)},_onDown:function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(document.addEventListener("touchmove",this._onMove),document.addEventListener("touchend",this._onTouchEnd)):(document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onMouseUp)),this._active=!1,this._startPos=this._pos=i.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},_onMove:function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._fireEvent("dragstart",t),this._fireEvent("movestart",t));var e=i.mousePos(this._el,t),r=this._map;r.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),r.transform.setLocationAtPoint(r.transform.pointLocation(this._pos),e),this._fireEvent("drag",t),this._fireEvent("move",t),this._pos=e,t.preventDefault()}},_onUp:function(t){if(this.isActive()){this._active=!1,this._fireEvent("dragend",t),this._drainInertiaBuffer();var e=function(){this._fireEvent("moveend",t)}.bind(this),r=this._inertia;if(r.length<2)return void e();var n=r[r.length-1],i=r[0],a=n[1].sub(i[1]),s=(n[0]-i[0])/1e3;if(0===s||n[1].equals(i[1]))return void e();var l=a.mult(.3/s),u=l.mag();u>1400&&(u=1400,l._unit()._mult(u));var c=u/750,h=l.mult(-c/2);this._map.panBy(h,{duration:1e3*c,easing:o,noMoveStart:!0},{originalEvent:t})}},_onMouseUp:function(t){this._ignoreEvent(t)||(this._onUp(t),document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onMouseUp))},_onTouchEnd:function(t){this._ignoreEvent(t)||(this._onUp(t),document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onTouchEnd))},_fireEvent:function(t,e){return this._map.fire(t,{originalEvent:e})},_ignoreEvent:function(t){var e=this._map;if(e.boxZoom&&e.boxZoom.isActive())return!0;if(e.dragRotate&&e.dragRotate.isActive())return!0;if(t.touches)return t.touches.length>1;if(t.ctrlKey)return!0;return"mousemove"===t.type?t.buttons&!1:0!==t.button},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":410,"../../util/util":424}],398:[function(t,e,r){"use strict";function n(t,e){this._map=t,this._el=t.getCanvasContainer(),this._bearingSnap=e.bearingSnap,o.bindHandlers(this)}var i=t("../../util/dom"),a=t("point-geometry"),o=t("../../util/util");e.exports=n;var s=o.bezier(0,0,.25,1);n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._enabled=!1)},_onDown:function(t){if(!this._ignoreEvent(t)&&!this.isActive()){document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=i.mousePos(this._el,t),this._center=this._map.transform.centerPoint;var e=this._startPos.sub(this._center);e.mag()<200&&(this._center=this._startPos.add(new a(-200,0)._rotate(e.angle()))),t.preventDefault()}},_onMove:function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._fireEvent("rotatestart",t),this._fireEvent("movestart",t));var e=this._map;e.stop();var r=this._pos,n=i.mousePos(this._el,t),a=this._center,o=r.sub(a).angleWith(n.sub(a))/Math.PI*180,s=e.getBearing()-o,l=this._inertia,u=l[l.length-1];this._drainInertiaBuffer(),l.push([Date.now(),e._normalizeBearing(s,u[1])]),e.transform.bearing=s,this._fireEvent("rotate",t),this._fireEvent("move",t),this._pos=n}},_onUp:function(t){if(!this._ignoreEvent(t)&&(document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onUp),this.isActive())){this._active=!1,this._fireEvent("rotateend",t),this._drainInertiaBuffer();var e=this._map,r=e.getBearing(),n=this._inertia,i=function(){Math.abs(r)180&&(d=180);var p=d/180;u+=h*d*(p/2),Math.abs(e._normalizeBearing(u,0))1;var r=t.ctrlKey?1:2,n=t.ctrlKey?0:2;return"mousemove"===t.type?t.buttons&0===r:t.button!==n},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":410,"../../util/util":424,"point-geometry":465}],399:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),this._onKeyDown=this._onKeyDown.bind(this)}e.exports=n;n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=this._map,r={originalEvent:t};if(!e.isEasing())switch(t.keyCode){case 61:case 107:case 171:case 187:e.zoomTo(Math.round(e.getZoom())+(t.shiftKey?2:1),r);break;case 189:case 109:case 173:e.zoomTo(Math.round(e.getZoom())-(t.shiftKey?2:1),r);break;case 37:t.shiftKey?e.easeTo({bearing:e.getBearing()-2},r):(t.preventDefault(),e.panBy([-80,0],r));break;case 39:t.shiftKey?e.easeTo({bearing:e.getBearing()+2},r):(t.preventDefault(),e.panBy([80,0],r));break;case 38:t.shiftKey?e.easeTo({pitch:e.getPitch()+5},r):(t.preventDefault(),e.panBy([0,-80],r));break;case 40:t.shiftKey?e.easeTo({pitch:Math.max(e.getPitch()-5,0)},r):(t.preventDefault(),e.panBy([0,80],r))}}}}},{}],400:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),o.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/browser"),o=t("../../util/util");e.exports=n;var s="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",l=s.indexOf("firefox")!==-1,u=s.indexOf("safari")!==-1&&s.indexOf("chrom")===-1;n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("wheel",this._onWheel,!1),this._el.addEventListener("mousewheel",this._onWheel,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("wheel",this._onWheel),this._el.removeEventListener("mousewheel",this._onWheel),this._enabled=!1)},_onWheel:function(t){var e;"wheel"===t.type?(e=t.deltaY,l&&t.deltaMode===window.WheelEvent.DOM_DELTA_PIXEL&&(e/=a.devicePixelRatio),t.deltaMode===window.WheelEvent.DOM_DELTA_LINE&&(e*=40)):"mousewheel"===t.type&&(e=-t.wheelDeltaY,u&&(e/=3));var r=a.now(),n=r-(this._time||0);this._pos=i.mousePos(this._el,t),this._time=r,0!==e&&e%4.000244140625==0?(this._type="wheel",e=Math.floor(e/4)):0!==e&&Math.abs(e)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=e,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(n*e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,e+=this._lastValue)),t.shiftKey&&e&&(e/=4),this._type&&this._zoom(-e,t),t.preventDefault()},_onTimeout:function(){this._type="wheel",this._zoom(-this._lastValue)},_zoom:function(t,e){if(0!==t){var r=this._map,n=2/(1+Math.exp(-Math.abs(t/100)));t<0&&0!==n&&(n=1/n);var i=r.ease?r.ease.to:r.transform.scale,a=r.transform.scaleZoom(i*n);r.zoomTo(a,{duration:0,around:r.unproject(this._pos),delayEndEvents:200},{originalEvent:e})}}}},{"../../util/browser":408,"../../util/dom":410,"../../util/util":424}],401:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),a.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/util");e.exports=n;var o=a.bezier(0,0,.15,1);n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("touchstart",this._onStart,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("touchstart",this._onStart),this._enabled=!1)},disableRotation:function(){this._rotationDisabled=!0},enableRotation:function(){this._rotationDisabled=!1},_onStart:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]);this._startVec=e.sub(r),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],document.addEventListener("touchmove",this._onMove,!1),document.addEventListener("touchend",this._onEnd,!1)}},_onMove:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]),n=e.add(r).div(2),a=e.sub(r),o=a.mag()/this._startVec.mag(),s=this._rotationDisabled?0:180*a.angleWith(this._startVec)/Math.PI,l=this._map;if(this._gestureIntent){var u={duration:0,around:l.unproject(n)};"rotate"===this._gestureIntent&&(u.bearing=this._startBearing+s),"zoom"!==this._gestureIntent&&"rotate"!==this._gestureIntent||(u.zoom=l.transform.scaleZoom(this._startScale*o)),l.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),o,n]),l.easeTo(u,{originalEvent:t})}else{var c=Math.abs(1-o)>.15;Math.abs(s)>4?this._gestureIntent="rotate":c&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._startVec=a,this._startScale=l.transform.scale,this._startBearing=l.transform.bearing)}t.preventDefault()}},_onEnd:function(t){document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,r=this._map;if(e.length<2)return void r.snapToNorth({},{originalEvent:t});var n=e[e.length-1],i=e[0],a=r.transform.scaleZoom(this._startScale*n[1]),s=r.transform.scaleZoom(this._startScale*i[1]),l=a-s,u=(n[0]-i[0])/1e3,c=n[2];if(0===u||a===s)return void r.snapToNorth({},{originalEvent:t});var h=.15*l/u;Math.abs(h)>2.5&&(h=h>0?2.5:-2.5);var f=1e3*Math.abs(h/(12*.15)),d=a+h*f/2e3;d<0&&(d=0),r.easeTo({zoom:d,duration:f,easing:o,around:r.unproject(c)},{originalEvent:t})},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>2&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":410,"../../util/util":424}],402:[function(t,e,r){"use strict";function n(){i.bindAll(["_onHashChange","_updateHash"],this)}e.exports=n;var i=t("../util/util");n.prototype={addTo:function(t){return this._map=t,window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},remove:function(){return window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),delete this._map,this},_onHashChange:function(){var t=location.hash.replace("#","").split("/");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0)}),!0)},_updateHash:function(){var t=this._map.getCenter(),e=this._map.getZoom(),r=this._map.getBearing(),n=Math.max(0,Math.ceil(Math.log(e)/Math.LN2)),i="#"+Math.round(100*e)/100+"/"+t.lat.toFixed(n)+"/"+t.lng.toFixed(n)+(r?"/"+Math.round(10*r)/10:"");window.history.replaceState("","",i)}}},{"../util/util":424}],403:[function(t,e,r){"use strict";function n(t){t.parentNode&&t.parentNode.removeChild(t)}var i=t("../util/canvas"),a=t("../util/util"),o=t("../util/browser"),s=t("../util/browser").window,l=t("../util/evented"),u=t("../util/dom"),c=t("../style/style"),h=t("../style/animation_loop"),f=t("../render/painter"),d=t("../geo/transform"),p=t("./hash"),m=t("./bind_handlers"),g=t("./camera"),v=t("../geo/lng_lat"),y=t("../geo/lng_lat_bounds"),b=t("point-geometry"),x=t("./control/attribution"),_={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:20,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,workerCount:Math.max(o.hardwareConcurrency-1,1)},w=e.exports=function(t){if(t=a.extend({},_,t),t.workerCount<1)throw new Error("workerCount must an integer greater than or equal to 1.");this._interactive=t.interactive,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._trackResize=t.trackResize,this._workerCount=t.workerCount,this._bearingSnap=t.bearingSnap,"string"==typeof t.container?this._container=document.getElementById(t.container):this._container=t.container,this.animationLoop=new h,this.transform=new d(t.minZoom,t.maxZoom),t.maxBounds&&this.setMaxBounds(t.maxBounds),a.bindAll(["_forwardStyleEvent","_forwardSourceEvent","_forwardLayerEvent","_forwardTileEvent","_onStyleLoad","_onStyleChange","_onSourceAdd","_onSourceRemove","_onSourceUpdate","_onWindowOnline","_onWindowResize","_update","_render"],this),this._setupContainer(),this._setupPainter(),this.on("move",this._update.bind(this,!1)),this.on("zoom",this._update.bind(this,!0)),this.on("moveend",function(){this.animationLoop.set(300),this._rerender()}.bind(this)),void 0!==s&&(s.addEventListener("online",this._onWindowOnline,!1),s.addEventListener("resize",this._onWindowResize,!1)),m(this,t),this._hash=t.hash&&(new p).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),this.stacks={},this._classes=[],this.resize(),t.classes&&this.setClasses(t.classes),t.style&&this.setStyle(t.style),t.attributionControl&&this.addControl(new x(t.attributionControl));var e=this.fire.bind(this,"error");this.on("style.error",e),this.on("source.error",e),this.on("tile.error",e),this.on("layer.error",e)};a.extend(w.prototype,l),a.extend(w.prototype,g.prototype),a.extend(w.prototype,{addControl:function(t){return t.addTo(this),this},addClass:function(t,e){return this._classes.indexOf(t)>=0||""===t?this:(this._classes.push(t),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},removeClass:function(t,e){var r=this._classes.indexOf(t);return r<0||""===t?this:(this._classes.splice(r,1),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},setClasses:function(t,e){for(var r={},n=0;n=0},getClasses:function(){return this._classes},resize:function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),this._canvas.resize(t,e),this.transform.resize(t,e),this.painter.resize(t,e),this.fire("movestart").fire("move").fire("resize").fire("moveend")},getBounds:function(){var t=new y(this.transform.pointLocation(new b(0,0)),this.transform.pointLocation(this.transform.size));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new b(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new b(0,this.transform.size.y)))),t},setMaxBounds:function(t){if(t){var e=y.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=[],this.transform.latRange=[],this._update());return this},setMinZoom:function(t){if((t=null===t||void 0===t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom&&t<=20)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be between the current minZoom and 20, inclusive")},project:function(t){return this.transform.locationPoint(v.convert(t))},unproject:function(t){return this.transform.pointLocation(b.convert(t))},queryRenderedFeatures:function(){var t,e={};return 2===arguments.length?(t=arguments[0],e=arguments[1]):1===arguments.length&&function(t){return t instanceof b||Array.isArray(t)}(arguments[0])?t=arguments[0]:1===arguments.length&&(e=arguments[0]),this.style.queryRenderedFeatures(this._makeQueryGeometry(t),e,this.transform.zoom,this.transform.angle)},_makeQueryGeometry:function(t){void 0===t&&(t=[b.convert([0,0]),b.convert([this.transform.width,this.transform.height])]);var e;if(t instanceof b||"number"==typeof t[0])e=[b.convert(t)];else{var r=[b.convert(t[0]),b.convert(t[1])];e=[r[0],new b(r[1].x,r[0].y),r[1],new b(r[0].x,r[1].y),r[0]]}return e=e.map(function(t){return this.transform.pointCoordinate(t)}.bind(this))},querySourceFeatures:function(t,e){return this.style.querySourceFeatures(t,e)},setStyle:function(t){return this.style&&(this.style.off("load",this._onStyleLoad).off("error",this._forwardStyleEvent).off("change",this._onStyleChange).off("source.add",this._onSourceAdd).off("source.remove",this._onSourceRemove).off("source.load",this._onSourceUpdate).off("source.error",this._forwardSourceEvent).off("source.change",this._onSourceUpdate).off("layer.add",this._forwardLayerEvent).off("layer.remove",this._forwardLayerEvent).off("layer.error",this._forwardLayerEvent).off("tile.add",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.load",this._update).off("tile.error",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent)._remove(),this.off("rotate",this.style._redoPlacement),this.off("pitch",this.style._redoPlacement)),t?(this.style=t instanceof c?t:new c(t,this.animationLoop,this._workerCount),this.style.on("load",this._onStyleLoad).on("error",this._forwardStyleEvent).on("change",this._onStyleChange).on("source.add",this._onSourceAdd).on("source.remove",this._onSourceRemove).on("source.load",this._onSourceUpdate).on("source.error",this._forwardSourceEvent).on("source.change",this._onSourceUpdate).on("layer.add",this._forwardLayerEvent).on("layer.remove",this._forwardLayerEvent).on("layer.error",this._forwardLayerEvent).on("tile.add",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.load",this._update).on("tile.error",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this.on("rotate",this.style._redoPlacement),this.on("pitch",this.style._redoPlacement),this):(this.style=null,this)},getStyle:function(){if(this.style)return this.style.serialize()},addSource:function(t,e){return this.style.addSource(t,e),this._update(!0),this},addSourceType:function(t,e,r){return this.style.addSourceType(t,e,r)},removeSource:function(t){return this.style.removeSource(t),this._update(!0),this},getSource:function(t){return this.style.getSource(t)},addLayer:function(t,e){return this.style.addLayer(t,e),this._update(!0),this},removeLayer:function(t){return this.style.removeLayer(t),this._update(!0),this},getLayer:function(t){return this.style.getLayer(t)},setFilter:function(t,e){return this.style.setFilter(t,e),this._update(!0),this},setLayerZoomRange:function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},getFilter:function(t){return this.style.getFilter(t)},setPaintProperty:function(t,e,r,n){return this.style.setPaintProperty(t,e,r,n),this._update(!0),this},getPaintProperty:function(t,e,r){return this.style.getPaintProperty(t,e,r)},setLayoutProperty:function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},getLayoutProperty:function(t,e){return this.style.getLayoutProperty(t,e)},getContainer:function(){return this._container},getCanvasContainer:function(){return this._canvasContainer},getCanvas:function(){return this._canvas.getElement()},_setupContainer:function(){var t=this._container;t.classList.add("mapboxgl-map");var e=this._canvasContainer=u.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=new i(this,e);var r=this._controlContainer=u.create("div","mapboxgl-control-container",t),n=this._controlCorners={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){n[t]=u.create("div","mapboxgl-ctrl-"+t,r)})},_setupPainter:function(){var t=this._canvas.getWebGLContext({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer});if(!t)return void this.fire("error",{error:new Error("Failed to initialize WebGL")});this.painter=new f(t,this.transform)},_contextLost:function(t){t.preventDefault(),this._frameId&&o.cancelFrame(this._frameId),this.fire("webglcontextlost",{originalEvent:t})},_contextRestored:function(t){this._setupPainter(),this.resize(),this._update(),this.fire("webglcontextrestored",{originalEvent:t})},loaded:function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},_update:function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},_render:function(){try{this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(this._classes,this._classOptions),this._classOptions=null,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.painter.render(this.style,{debug:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,vertices:this.vertices,rotating:this.rotating,zooming:this.zooming}),this.fire("render"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire("load")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty)&&this._rerender()}catch(t){this.fire("error",{error:t})}return this},remove:function(){this._hash&&this._hash.remove(),o.cancelFrame(this._frameId),this.setStyle(null),void 0!==s&&s.removeEventListener("resize",this._onWindowResize,!1);var t=this.painter.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),n(this._canvasContainer),n(this._controlContainer),this._container.classList.remove("mapboxgl-map")},_rerender:function(){this.style&&!this._frameId&&(this._frameId=o.frame(this._render))},_forwardStyleEvent:function(t){this.fire("style."+t.type,a.extend({style:t.target},t))},_forwardSourceEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_forwardLayerEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_forwardTileEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_onStyleLoad:function(t){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update(this._classes,{transition:!1}),this._forwardStyleEvent(t)},_onStyleChange:function(t){this._update(!0),this._forwardStyleEvent(t)},_onSourceAdd:function(t){var e=t.source;e.onAdd&&e.onAdd(this),this._forwardSourceEvent(t)},_onSourceRemove:function(t){var e=t.source;e.onRemove&&e.onRemove(this),this._forwardSourceEvent(t)},_onSourceUpdate:function(t){this._update(),this._forwardSourceEvent(t)},_onWindowOnline:function(){this._update()},_onWindowResize:function(){this._trackResize&&this.stop().resize()._update()}}),a.extendAll(w.prototype,{_showTileBoundaries:!1,get showTileBoundaries(){return this._showTileBoundaries},set showTileBoundaries(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},_showCollisionBoxes:!1,get showCollisionBoxes(){return this._showCollisionBoxes},set showCollisionBoxes(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,this.style._redoPlacement())},_showOverdrawInspector:!1,get showOverdrawInspector(){return this._showOverdrawInspector},set showOverdrawInspector(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},_repaint:!1,get repaint(){return this._repaint},set repaint(t){this._repaint=t,this._update()},_vertices:!1,get vertices(){return this._vertices},set vertices(t){this._vertices=t,this._update()}})},{"../geo/lng_lat":321,"../geo/lng_lat_bounds":322,"../geo/transform":323,"../render/painter":337,"../style/animation_loop":357,"../style/style":360,"../util/browser":408,"../util/canvas":409,"../util/dom":410,"../util/evented":416,"../util/util":424,"./bind_handlers":389,"./camera":390,"./control/attribution":391,"./hash":402,"point-geometry":465}],404:[function(t,e,r){"use strict";function n(t,e){t||(t=i.create("div")),t.classList.add("mapboxgl-marker"),this._el=t,this._offset=o.convert(e&&e.offset||[0,0]),this._update=this._update.bind(this)}e.exports=n;var i=t("../util/dom"),a=t("../geo/lng_lat"),o=t("point-geometry");n.prototype={addTo:function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._el),t.on("move",this._update),this._update(),this},remove:function(){this._map&&(this._map.off("move",this._update),this._map=null);var t=this._el.parentNode;return t&&t.removeChild(this._el),this},getLngLat:function(){return this._lngLat},setLngLat:function(t){return this._lngLat=a.convert(t),this._update(),this},getElement:function(){return this._el},_update:function(){if(this._map){var t=this._map.project(this._lngLat)._add(this._offset);i.setTransform(this._el,"translate("+t.x+"px,"+t.y+"px)")}}}},{"../geo/lng_lat":321,"../util/dom":410,"point-geometry":465}],405:[function(t,e,r){"use strict";function n(t){i.setOptions(this,t),i.bindAll(["_update","_onClickClose"],this)}e.exports=n;var i=t("../util/util"),a=t("../util/evented"),o=t("../util/dom"),s=t("../geo/lng_lat");n.prototype=i.inherit(a,{options:{closeButton:!0,closeOnClick:!0},addTo:function(t){return this._map=t,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this},remove:function(){ -return this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._container&&(this._container.parentNode.removeChild(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire("close"),this},getLngLat:function(){return this._lngLat},setLngLat:function(t){return this._lngLat=s.convert(t),this._update(),this},setText:function(t){return this.setDOMContent(document.createTextNode(t))},setHTML:function(t){var e,r=document.createDocumentFragment(),n=document.createElement("body");for(n.innerHTML=t;;){if(!(e=n.firstChild))break;r.appendChild(e)}return this.setDOMContent(r)},setDOMContent:function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},_createContent:function(){this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._content=o.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=o.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClickClose))},_update:function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content));var t=this._map.project(this._lngLat).round(),e=this.options.anchor;if(!e){var r=this._container.offsetWidth,n=this._container.offsetHeight;e=t.ythis._map.transform.height-n?["bottom"]:[],t.xthis._map.transform.width-r/2&&e.push("right"),e=0===e.length?"bottom":e.join("-")}var i={top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"},a=this._container.classList;for(var s in i)a.remove("mapboxgl-popup-anchor-"+s);a.add("mapboxgl-popup-anchor-"+e),o.setTransform(this._container,i[e]+" translate("+t.x+"px,"+t.y+"px)")}},_onClickClose:function(){this.remove()}})},{"../geo/lng_lat":321,"../util/dom":410,"../util/evented":416,"../util/util":424}],406:[function(t,e,r){"use strict";function n(t,e){this.target=t,this.parent=e,this.callbacks={},this.callbackID=0,this.receive=this.receive.bind(this),this.target.addEventListener("message",this.receive,!1)}e.exports=n,n.prototype.receive=function(t){function e(t,e,r){this.postMessage({type:"",id:String(i),error:t?String(t):null,data:e},r)}var r,n=t.data,i=n.id;if(""===n.type)r=this.callbacks[n.id],delete this.callbacks[n.id],r&&r(n.error||null,n.data);else if(void 0!==n.id&&this.parent[n.type])this.parent[n.type](n.data,e.bind(this));else if(void 0!==n.id&&this.parent.workerSources){var a=n.type.split(".");this.parent.workerSources[a[0]][a[1]](n.data,e.bind(this))}else this.parent[n.type](n.data)},n.prototype.send=function(t,e,r,n){var i=null;r&&(this.callbacks[i=this.callbackID++]=r),this.postMessage({type:t,id:String(i),data:e},n)},n.prototype.postMessage=function(t,e){this.target.postMessage(t,e)}},{}],407:[function(t,e,r){"use strict";function n(t){var e=document.createElement("a");return e.href=t,e.protocol===document.location.protocol&&e.host===document.location.host}r.getJSON=function(t,e){var r=new XMLHttpRequest;return r.open("GET",t,!0),r.setRequestHeader("Accept","application/json"),r.onerror=function(t){e(t)},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var t;try{t=JSON.parse(r.response)}catch(t){return e(t)}e(null,t)}else e(new Error(r.statusText))},r.send(),r},r.getArrayBuffer=function(t,e){var r=new XMLHttpRequest;return r.open("GET",t,!0),r.responseType="arraybuffer",r.onerror=function(t){e(t)},r.onload=function(){r.status>=200&&r.status<300&&r.response?e(null,r.response):e(new Error(r.statusText))},r.send(),r},r.getImage=function(t,e){return r.getArrayBuffer(t,function(t,r){if(t)return e(t);var n=new Image;n.onload=function(){e(null,n),(window.URL||window.webkitURL).revokeObjectURL(n.src)};var i=new Blob([new Uint8Array(r)],{type:"image/png"});return n.src=(window.URL||window.webkitURL).createObjectURL(i),n.getData=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return t.width=n.width,t.height=n.height,e.drawImage(n,0,0),e.getImageData(0,0,n.width,n.height).data},n})},r.getVideo=function(t,e){var r=document.createElement("video");r.onloadstart=function(){e(null,r)};for(var i=0;i=s+n?t.call(i,1):(t.call(i,(l-s)/n),r.frame(a)))}if(!n)return t.call(i,1),null;var o=!1,s=e.exports.now();return r.frame(a),function(){o=!0}},r.supported=t("mapbox-gl-supported"),r.hardwareConcurrency=navigator.hardwareConcurrency||4,Object.defineProperty(r,"devicePixelRatio",{get:function(){return window.devicePixelRatio}}),r.supportsWebp=!1;var a=document.createElement("img");a.onload=function(){r.supportsWebp=!0},a.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=",r.supportsGeolocation=!!navigator.geolocation},{"mapbox-gl-supported":309}],409:[function(t,e,r){"use strict";function n(t,e){this.canvas=document.createElement("canvas"),t&&e&&(this.canvas.style.position="absolute",this.canvas.classList.add("mapboxgl-canvas"),this.canvas.addEventListener("webglcontextlost",t._contextLost.bind(t),!1),this.canvas.addEventListener("webglcontextrestored",t._contextRestored.bind(t),!1),this.canvas.setAttribute("tabindex",0),e.appendChild(this.canvas))}var i=t("../util"),a=t("mapbox-gl-supported");e.exports=n,n.prototype.resize=function(t,e){var r=window.devicePixelRatio||1;this.canvas.width=r*t,this.canvas.height=r*e,this.canvas.style.width=t+"px",this.canvas.style.height=e+"px"},n.prototype.getWebGLContext=function(t){return t=i.extend({},t,a.webGLContextAttributes),this.canvas.getContext("webgl",t)||this.canvas.getContext("experimental-webgl",t)},n.prototype.getElement=function(){return this.canvas}},{"../util":424,"mapbox-gl-supported":309}],410:[function(t,e,r){"use strict";function n(t){for(var e=0;e1)for(var h=0;h=0&&this._events[t].splice(r,1),this._events[t].length||delete this._events[t]}else delete this._events[t];return this},once:function(t,e){var r=function(n){this.off(t,r),e.call(this,n)}.bind(this);return this.on(t,r),this},fire:function(t,e){if(!this.listens(t))return n.endsWith(t,"error")&&console.error(e&&e.error||e||"Empty error event"),this;e=n.extend({},e),n.extend(e,{type:t,target:this});for(var r=this._events[t].slice(),i=0;i=3)for(var l=0;l1){if(s(t,e))return!0;for(var n=0;n(e.y-t.y)*(r.x-t.x)}function u(t,e,r,n){return l(t,r,n)!==l(e,r,n)&&l(t,e,r)!==l(t,e,n)}function c(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function f(t,e){for(var r,n,i,a=!1,o=0;oe.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a)}return a}function d(t,e){for(var r=!1,n=0,i=t.length-1;ne.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}e.exports={multiPolygonIntersectsBufferedMultiPoint:n,multiPolygonIntersectsMultiPolygon:i,multiPolygonIntersectsBufferedMultiLine:a}},{}],420:[function(t,e,r){"use strict";function n(t,e){this.max=t,this.onRemove=e,this.reset()}e.exports=n,n.prototype.reset=function(){for(var t in this.data)this.onRemove(this.data[t]);return this.data={},this.order=[],this},n.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.get(this.order[0]);r&&this.onRemove(r)}return this},n.prototype.has=function(t){return t in this.data},n.prototype.keys=function(){return this.order},n.prototype.get=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},n.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this.get(this.order[0]);e&&this.onRemove(e)}return this}},{}],421:[function(t,e,r){"use strict";function n(t,e,r){if(!(r=r||o.ACCESS_TOKEN)&&o.REQUIRE_ACCESS_TOKEN)throw new Error("An API access token is required to use Mapbox GL. See https://www.mapbox.com/developers/api/#access-tokens");if(t=t.replace(/^mapbox:\/\//,o.API_URL+e),t+=t.indexOf("?")!==-1?"&access_token=":"?access_token=",o.REQUIRE_ACCESS_TOKEN){if("s"===r[0])throw new Error("Use a public access token (pk.*) with Mapbox GL JS, not a secret access token (sk.*). See https://www.mapbox.com/developers/api/#access-tokens");t+=r}return t}function i(t){return t?"?"+t:""}function a(t){return t.access_token&&"tk."===t.access_token.slice(0,3)?u.extend({},t,{access_token:o.ACCESS_TOKEN}):t}var o=t("./config"),s=t("./browser"),l=t("url"),u=t("./util");e.exports.normalizeStyleURL=function(t,e){var r=l.parse(t);return"mapbox:"!==r.protocol?t:n("mapbox:/"+r.pathname+i(r.query),"/styles/v1/",e)},e.exports.normalizeSourceURL=function(t,e){return"mapbox:"!==l.parse(t).protocol?t:n(t+".json","/v4/",e)+"&secure"},e.exports.normalizeGlyphsURL=function(t,e){var r=l.parse(t);return"mapbox:"!==r.protocol?t:n("mapbox://"+r.pathname.split("/")[1]+"/{fontstack}/{range}.pbf"+i(r.query),"/fonts/v1/",e)},e.exports.normalizeSpriteURL=function(t,e,r,a){var o=l.parse(t);return"mapbox:"!==o.protocol?(o.pathname+=e+r,l.format(o)):n("mapbox:/"+o.pathname+"/sprite"+e+r+i(o.query),"/styles/v1/",a)},e.exports.normalizeTileURL=function(t,e,r){var n=l.parse(t,!0);if(!e)return t;if("mapbox:"!==l.parse(e).protocol)return t;var i=s.supportsWebp?".webp":"$1",o=s.devicePixelRatio>=2||512===r?"@2x":"";return l.format({protocol:n.protocol,hostname:n.hostname,pathname:n.pathname.replace(/(\.(?:png|jpg)\d*)/,o+i),query:a(n.query)})}},{"./browser":408,"./config":413,"./util":424,url:525}],422:[function(t,e,r){"use strict";function n(t){function e(){f.apply(this,arguments)}function r(){d.apply(this,arguments),this.members=e.prototype.members}var n=JSON.stringify(t);if(g[n])return g[n];void 0===t.alignment&&(t.alignment=1),e.prototype=Object.create(f.prototype);var s=0,u=0,v=["Uint8"];return e.prototype.members=t.members.map(function(r){r={name:r.name,type:r.type,components:r.components||1},p(r.name.length),p(r.type in m),v.indexOf(r.type)<0&&v.push(r.type);var n=o(r.type);u=Math.max(u,n),r.offset=s=a(s,Math.max(t.alignment,n));for(var i=0;ithis.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*this.RESIZE_MULTIPLIER),this.DEFAULT_CAPACITY),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},d.prototype._refreshViews=function(){for(var t=0;t=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)},r.bezier=function(t,e,r,i){var a=new n(t,e,r,i);return function(t){return a.solve(t)}},r.ease=r.bezier(.25,.1,.25,1),r.clamp=function(t,e,r){return Math.min(r,Math.max(e,t))},r.wrap=function(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i},r.coalesce=function(){for(var t=0;t=0)return!0;return!1};var o={};r.warnOnce=function(t){o[t]||("undefined"!=typeof console&&console.warn(t),o[t]=!0)}},{"../geo/coordinate":320,unitbezier:524}],425:[function(t,e,r){"use strict";function n(t,e,r,n){this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&&(this.id=t.id)}e.exports=n,n.prototype={type:"Feature",get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},set geometry(t){this._geometry=t},toJSON:function(){var t={};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&"toJSON"!==e&&(t[e]=this[e]);return t}}},{}],426:[function(t,e,r){e.exports={_args:[[{raw:"mapbox-gl@^0.22.0",scope:null,escapedName:"mapbox-gl",name:"mapbox-gl",rawSpec:"^0.22.0",spec:">=0.22.0 <0.23.0",type:"range"},"/home/etienne/Documents/plotly/plotly.js"]],_from:"mapbox-gl@>=0.22.0 <0.23.0",_id:"mapbox-gl@0.22.1",_inCache:!0,_location:"/mapbox-gl",_nodeVersion:"4.4.5",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/mapbox-gl-0.22.1.tgz_1471549891670_0.8762630566488951"},_npmUser:{name:"lucaswoj",email:"lucas@lucaswoj.com"},_npmVersion:"2.15.5",_phantomChildren:{},_requested:{raw:"mapbox-gl@^0.22.0",scope:null,escapedName:"mapbox-gl",name:"mapbox-gl",rawSpec:"^0.22.0",spec:">=0.22.0 <0.23.0",type:"range"},_requiredBy:["#USER","/"],_resolved:"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz",_shasum:"92a965547d4c2f24c22cbc487eeda48694cb627a",_shrinkwrap:null,_spec:"mapbox-gl@^0.22.0",_where:"/home/etienne/Documents/plotly/plotly.js",browser:{"./js/util/ajax.js":"./js/util/browser/ajax.js","./js/util/browser.js":"./js/util/browser/browser.js","./js/util/canvas.js":"./js/util/browser/canvas.js","./js/util/dom.js":"./js/util/browser/dom.js","./js/util/web_worker.js":"./js/util/browser/web_worker.js"},bugs:{url:"https://github.com/mapbox/mapbox-gl-js/issues"},dependencies:{csscolorparser:"^1.0.2",earcut:"^2.0.3","feature-filter":"^2.2.0","geojson-rewind":"^0.1.0","geojson-vt":"^2.4.0","gl-matrix":"^2.3.1","grid-index":"^1.0.0","mapbox-gl-function":"^1.2.1","mapbox-gl-shaders":"github:mapbox/mapbox-gl-shaders#de2ab007455aa2587c552694c68583f94c9f2747","mapbox-gl-style-spec":"github:mapbox/mapbox-gl-style-spec#83b1a3e5837d785af582efd5ed1a212f2df6a4ae","mapbox-gl-supported":"^1.2.0",pbf:"^1.3.2",pngjs:"^2.2.0","point-geometry":"^0.0.0",quickselect:"^1.0.0",request:"^2.39.0","resolve-url":"^0.2.1","shelf-pack":"^1.0.0",supercluster:"^2.0.1",unassertify:"^2.0.0",unitbezier:"^0.0.0","vector-tile":"^1.3.0","vt-pbf":"^2.0.2",webworkify:"^1.3.0","whoots-js":"^2.0.0"},description:"A WebGL interactive maps library",devDependencies:{"babel-preset-react":"^6.11.1",babelify:"^7.3.0",benchmark:"~2.1.0",browserify:"^13.0.0",clipboard:"^1.5.12","concat-stream":"1.5.1",coveralls:"^2.11.8",doctrine:"^1.2.1",documentation:"https://github.com/documentationjs/documentation/archive/bb41619c734e59ef3fbc3648610032efcfdaaace.tar.gz","documentation-theme-utils":"3.0.0",envify:"^3.4.0",eslint:"^2.5.3","eslint-config-mourner":"^2.0.0","eslint-plugin-html":"^1.5.1",gl:"^4.0.1",handlebars:"4.0.5","highlight.js":"9.3.0",istanbul:"^0.4.2","json-loader":"^0.5.4",lodash:"^4.13.1","mapbox-gl-test-suite":"github:mapbox/mapbox-gl-test-suite#7babab52fb02788ebbc38384139bf350e8e38552","memory-fs":"^0.3.0",minifyify:"^7.0.1","npm-run-all":"^3.0.0",nyc:"6.4.0",proxyquire:"^1.7.9",remark:"4.2.2","remark-html":"3.0.0",sinon:"^1.15.4",st:"^1.2.0",tap:"^5.7.0","transform-loader":"^0.2.3","unist-util-visit":"1.1.0",vinyl:"1.1.1","vinyl-fs":"2.4.3",watchify:"^3.7.0",webpack:"^1.13.1","webworkify-webpack":"^1.1.3"},directories:{},dist:{shasum:"92a965547d4c2f24c22cbc487eeda48694cb627a",tarball:"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz"},engines:{node:">=4.0.0"},gitHead:"13a9015341f0602ccb55c98c53079838ad4b70b5",homepage:"https://github.com/mapbox/mapbox-gl-js#readme",license:"BSD-3-Clause",main:"js/mapbox-gl.js",maintainers:[{name:"aaronlidman",email:"aaronlidman@gmail.com"},{name:"ajashton",email:"aj.ashton@gmail.com"},{name:"ansis",email:"ansis.brammanis@gmail.com"},{name:"bergwerkgis",email:"wb@bergwerk-gis.at"},{name:"bhousel",email:"bryan@mapbox.com"},{name:"bsudekum",email:"bobby@mapbox.com"},{name:"camilleanne",email:"camille@mapbox.com"},{name:"dnomadb",email:"damon@mapbox.com"},{name:"dthompson",email:"dthompson@gmail.com"},{name:"emilymcafee",email:"emily@mapbox.com"},{name:"flippmoke",email:"flippmoke@gmail.com"},{name:"freenerd",email:"spam@freenerd.de"},{name:"gretacb",email:"carol@mapbox.com"},{name:"ian29",email:"ian.villeda@gmail.com"},{name:"ianshward",email:"ian@mapbox.com"},{name:"ingalls",email:"nicholas.ingalls@gmail.com"},{name:"jfirebaugh",email:"john.firebaugh@gmail.com"},{name:"jrpruit1",email:"jake@jakepruitt.com"},{name:"karenzshea",email:"karen@mapbox.com"},{name:"kkaefer",email:"kkaefer@gmail.com"},{name:"lbud",email:"lauren@mapbox.com"},{name:"lucaswoj",email:"lucas@lucaswoj.com"},{name:"lxbarth",email:"alex@mapbox.com"},{name:"lyzidiamond",email:"lyzi@mapbox.com"},{name:"mapbox-admin",email:"accounts@mapbox.com"},{name:"mateov",email:"matt@mapbox.com"},{name:"mcwhittemore",email:"mcwhittemore@gmail.com"},{name:"miccolis",email:"jeff@miccolis.net"},{name:"mikemorris",email:"michael.patrick.morris@gmail.com"},{name:"morganherlocker",email:"morgan.herlocker@gmail.com"},{name:"mourner",email:"agafonkin@gmail.com"},{name:"nickidlugash",email:"nicki@mapbox.com"},{name:"rclark",email:"ryan.clark.j@gmail.com"},{name:"samanbb",email:"saman@mapbox.com"},{name:"sbma44",email:"tlee@mapbox.com"},{name:"scothis",email:"scothis@gmail.com"},{name:"sgillies",email:"sean@mapbox.com"},{name:"springmeyer",email:"dane@mapbox.com"},{name:"themarex",email:"patrick@mapbox.com"},{name:"tmcw",email:"tom@macwright.org"},{name:"tristen",email:"tristen.brown@gmail.com"},{name:"willwhite",email:"will@mapbox.com"},{name:"yhahn",email:"young@mapbox.com"}],name:"mapbox-gl",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/mapbox/mapbox-gl-js.git"},scripts:{build:"npm run build-docs # invoked by publisher when publishing docs on the mb-pages branch","build-dev":"browserify js/mapbox-gl.js --debug --standalone mapboxgl > dist/mapbox-gl-dev.js && tap --no-coverage test/build/dev.test.js","build-docs":"documentation build --github --format html -c documentation.yml --theme ./docs/_theme --output docs/api/","build-min":"browserify js/mapbox-gl.js --debug -t unassertify --plugin [minifyify --map mapbox-gl.js.map --output dist/mapbox-gl.js.map] --standalone mapboxgl > dist/mapbox-gl.js && tap --no-coverage test/build/min.test.js","build-token":"browserify debug/access-token-src.js --debug -t envify > debug/access-token.js",lint:"eslint --ignore-path .gitignore js test bench docs/_posts/examples/*.html","open-changed-examples":"git diff --name-only mb-pages HEAD -- docs/_posts/examples/*.html | awk '{print \"http://127.0.0.1:4000/mapbox-gl-js/example/\" substr($0,33,length($0)-37)}' | xargs open",start:"run-p build-token watch-dev watch-bench start-server","start-bench":"run-p build-token watch-bench start-server","start-debug":"run-p build-token watch-dev start-server","start-docs":"npm run build-min && npm run build-docs && jekyll serve -w","start-server":"st --no-cache --localhost --port 9966 --index index.html .",test:"npm run lint && tap --reporter dot test/js/*/*.js test/build/webpack.test.js","test-suite":"node test/render.test.js && node test/query.test.js","watch-bench":"node bench/download-data.js && watchify bench/index.js --plugin [minifyify --no-map] -t [babelify --presets react] -t unassertify -t envify -o bench/bench.js -v","watch-dev":"watchify js/mapbox-gl.js --debug --standalone mapboxgl -o dist/mapbox-gl-dev.js -v"},version:"0.22.1"}},{}],427:[function(t,e,r){"use strict";function n(t,e,r){for(var n=new Array(t),i=0;ig[1][2]&&(b[0]=-b[0]),g[0][2]>g[2][0]&&(b[1]=-b[1]),g[1][0]>g[0][1]&&(b[2]=-b[2]),!0}},{"./normalize":429,"gl-mat4/clone":159,"gl-mat4/create":160,"gl-mat4/determinant":161,"gl-mat4/invert":165,"gl-mat4/transpose":175,"gl-vec3/cross":256,"gl-vec3/dot":257,"gl-vec3/length":258,"gl-vec3/normalize":260}],429:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],430:[function(t,e,r){function n(t,e,r,n){if(0===c(e)||0===c(r))return!1;var i=u(e,f.translate,f.scale,f.skew,f.perspective,f.quaternion),a=u(r,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!(!i||!a)&&(s(p.translate,f.translate,d.translate,n),s(p.skew,f.skew,d.skew,n),s(p.scale,f.scale,d.scale,n),s(p.perspective,f.perspective,d.perspective,n),h(p.quaternion,f.quaternion,d.quaternion,n),l(t,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function i(){return{translate:a(),scale:a(1),skew:a(),perspective:o(),quaternion:o()}}function a(t){return[t||0,t||0,t||0]}function o(){return[0,0,0,1]}var s=t("gl-vec3/lerp"),l=t("mat4-recompose"),u=t("mat4-decompose"),c=t("gl-mat4/determinant"),h=t("quat-slerp"),f=i(),d=i(),p=i();e.exports=n},{"gl-mat4/determinant":161,"gl-vec3/lerp":259,"mat4-decompose":428,"mat4-recompose":431,"quat-slerp":470}],431:[function(t,e,r){var n={identity:t("gl-mat4/identity"),translate:t("gl-mat4/translate"),multiply:t("gl-mat4/multiply"),create:t("gl-mat4/create"),scale:t("gl-mat4/scale"),fromRotationTranslation:t("gl-mat4/fromRotationTranslation")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{"gl-mat4/create":160,"gl-mat4/fromRotationTranslation":163,"gl-mat4/identity":164,"gl-mat4/multiply":167,"gl-mat4/scale":173,"gl-mat4/translate":174}],432:[function(t,e,r){"use strict";function n(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}function i(t){return t=t||{},new n(t.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}var a=t("binary-search-bounds"),o=t("mat4-interpolate"),s=t("gl-mat4/invert"),l=t("gl-mat4/rotateX"),u=t("gl-mat4/rotateY"),c=t("gl-mat4/rotateZ"),h=t("gl-mat4/lookAt"),f=t("gl-mat4/translate"),d=(t("gl-mat4/scale"),t("gl-vec3/normalize")),p=[0,0,0];e.exports=i;var m=n.prototype;m.recalcMatrix=function(t){var e=this._time,r=a.le(e,t),n=this.computedMatrix;if(!(r<0)){var i=this._components;if(r===e.length-1)for(var l=16*r,u=0;u<16;++u)n[u]=i[l++];else{for(var c=e[r+1]-e[r],l=16*r,h=this.prevMatrix,f=!0,u=0;u<16;++u)h[u]=i[l++];for(var p=this.nextMatrix,u=0;u<16;++u)p[u]=i[l++],f=f&&h[u]===p[u];if(c<1e-6||f)for(var u=0;u<16;++u)n[u]=h[u];else o(n,h,p,(t-e[r])/c)}var m=this.computedUp;m[0]=n[1],m[1]=n[5],m[2]=n[9],d(m,m);var g=this.computedInverse;s(g,n);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;for(var b=this.computedCenter,x=Math.exp(this.computedRadius[0]),u=0;u<3;++u)b[u]=v[u]-n[2+4*u]*x}},m.idle=function(t){if(!(t1&&i(t[o[c-2]],t[o[c-1]],u)<=0;)c-=1,o.pop();for(o.push(l),c=s.length;c>1&&i(t[s[c-2]],t[s[c-1]],u)>=0;)c-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),h=0,n=0,f=o.length;n0;--d)r[h++]=s[d];return r}e.exports=n;var i=t("robust-orientation")[3]},{"robust-orientation":489}],434:[function(t,e,r){"use strict";function n(t,e){function r(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==g.alt,g.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==g.shift,g.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==g.control,g.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==g.meta,g.meta=!!t.metaKey),e}function n(t,n){var a=i.x(n),o=i.y(n);"buttons"in n&&(t=0|n.buttons),(t!==d||a!==p||o!==m||r(n))&&(d=0|t,p=a||0,m=o||0,e&&e(d,p,m,g))}function a(t){n(0,t)}function o(){(d||p||m||g.shift||g.alt||g.meta||g.control)&&(p=m=0,d=0,g.shift=g.alt=g.control=g.meta=!1,e&&e(0,0,0,g))}function s(t){r(t)&&e&&e(d,p,m,g)}function l(t){0===i.buttons(t)?n(0,t):n(d,t)}function u(t){n(d|i.buttons(t),t)}function c(t){n(d&~i.buttons(t),t)}function h(){v||(v=!0,t.addEventListener("mousemove",l),t.addEventListener("mousedown",u),t.addEventListener("mouseup",c),t.addEventListener("mouseleave",a),t.addEventListener("mouseenter",a),t.addEventListener("mouseout",a),t.addEventListener("mouseover",a),t.addEventListener("blur",o),t.addEventListener("keyup",s),t.addEventListener("keydown",s),t.addEventListener("keypress",s),t!==window&&(window.addEventListener("blur",o),window.addEventListener("keyup",s),window.addEventListener("keydown",s),window.addEventListener("keypress",s)))}function f(){v&&(v=!1,t.removeEventListener("mousemove",l),t.removeEventListener("mousedown",u),t.removeEventListener("mouseup",c),t.removeEventListener("mouseleave",a),t.removeEventListener("mouseenter",a),t.removeEventListener("mouseout",a),t.removeEventListener("mouseover",a),t.removeEventListener("blur",o),t.removeEventListener("keyup",s),t.removeEventListener("keydown",s),t.removeEventListener("keypress",s),t!==window&&(window.removeEventListener("blur",o),window.removeEventListener("keyup",s),window.removeEventListener("keydown",s),window.removeEventListener("keypress",s)))}e||(e=t,t=window);var d=0,p=0,m=0,g={shift:!1,alt:!1,control:!1,meta:!1},v=!1;h();var y={element:t};return Object.defineProperties(y,{enabled:{get:function(){return v},set:function(t){t?h():f()},enumerable:!0},buttons:{get:function(){return d},enumerable:!0},x:{get:function(){return p},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return g},enumerable:!0}}),y}e.exports=n;var i=t("mouse-event")},{"mouse-event":436}],435:[function(t,e,r){function n(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var n=t.clientX||0,a=t.clientY||0,o=i(e);return r[0]=n-o.left,r[1]=a-o.top,r}function i(t){return t===window||t===document||t===document.body?a:t.getBoundingClientRect()}var a={left:0,top:0};e.exports=n},{}],436:[function(t,e,r){"use strict";function n(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){var e=t.which;if(2===e)return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<=0;--e)L(e,0);for(var r=[],e=0;e0;_=_-1&m)x.push(w+"["+T+"+"+g(_)+"]");x.push(v(0));for(var _=0;_0){",f(x[t]),"=1;"),P(t-1,e|1<0&&G.push(s(U,x[V-1])+"*"+o(x[V-1])),N.push(d(U,x[V])+"=("+G.join("-")+")|0")}for(var U=0;U=0;--U)Y.push(o(x[U]));N.push(A+"=("+Y.join("*")+")|0",M+"=mallocUint32("+A+")",w+"=mallocUint32("+A+")",T+"=0"),N.push(p(0)+"=0");for(var V=1;V<1< 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var a=t.getters||[],o=new Array(n),s=0;s=0?o[s]=!0:o[s]=!1;return b(t.vertex,t.cell,t.phase,i,r,o)}var _=t("typedarray-pool");e.exports=x;var w="V",M="P",k="N",A="Q",T="X",S="T"},{"typedarray-pool":521}],439:[function(t,e,r){"use strict";var n=t("cwise/lib/wrapper")({args:["index","array","scalar"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_1_arg1_=_inline_1_arg2_.apply(void 0,_inline_1_arg0_)}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"cwise",blockSize:64});e.exports=function(t,e){return n(t,e),t}},{"cwise/lib/wrapper":106}],440:[function(t,e,r){"use strict";function n(t){if(t in l)return l[t];for(var e=[],r=0;r=0?s.push("0"):e.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),n.push("1"),o.push("s["+l+"]-2"));var u=".lo("+n.join()+").hi("+o.join()+")";if(0===n.length&&(u=""),r>0){a.push("if(1");for(var l=0;l=0||e.indexOf(-(l+1))>=0||a.push("&&s[",l,"]>2");a.push("){grad",r,"(src.pick(",s.join(),")",u);for(var l=0;l=0||e.indexOf(-(l+1))>=0||a.push(",dst.pick(",s.join(),",",l,")",u);a.push(");")}for(var l=0;l1){dst.set(",s.join(),",",c,",0.5*(src.get(",f.join(),")-src.get(",d.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):a.push("if(s[",c,"]>1){diff(",h,",src.pick(",f.join(),")",u,",src.pick(",d.join(),")",u,");}else{zero(",h,");};");break;case"mirror":0===r?a.push("dst.set(",s.join(),",",c,",0);"):a.push("zero(",h,");");break;case"wrap":var p=s.slice(),m=s.slice();e[l]<0?(p[c]="s["+c+"]-2",m[c]="0"):(p[c]="s["+c+"]-1",m[c]="1"),0===r?a.push("if(s[",c,"]>2){dst.set(",s.join(),",",c,",0.5*(src.get(",p.join(),")-src.get(",m.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):a.push("if(s[",c,"]>2){diff(",h,",src.pick(",p.join(),")",u,",src.pick(",m.join(),")",u,");}else{zero(",h,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}r>0&&a.push("};")}(p)}}a.push("return dst;};return gradient");for(var m=["diff","zero"],g=[h,f],o=1;o<=i;++o)m.push("grad"+o),g.push(n(o));m.push(a.join(""));var v=Function.apply(void 0,m),r=v.apply(void 0,g);return l[e]=r,r}function a(t,e,r){if(Array.isArray(r)){if(r.length!==e.dimension)throw new Error("ndarray-gradient: invalid boundary conditions")}else r="string"==typeof r?o(e.dimension,r):o(e.dimension,"clamp");if(t.dimension!==e.dimension+1)throw new Error("ndarray-gradient: output dimension must be +1 input dimension");if(t.shape[e.dimension]!==e.dimension)throw new Error("ndarray-gradient: output shape must match input shape");for(var n=0;n>",rrshift:">>>"};!function(){for(var t in l){var e=l[t];r[t]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a"+e+"=b"},rvalue:!0,funcName:t+"eq"}),r[t+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a"+e+"=s"},rvalue:!0,funcName:t+"seq"})}}();var u={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in u){var e=u[t];r[t]=a({args:["array","array"],body:{args:["a","b"],body:"a="+e+"b"},funcName:t}),r[t+"eq"]=a({args:["array"],body:{args:["a"],body:"a="+e+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in c){var e=c[t];r[t]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a=a"+e+"b"},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+e+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var h=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=o({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=o({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=a({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=a({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=a({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=o({args:["array","array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":103}],444:[function(t,e,r){"use strict";var n=t("ndarray"),i=t("./doConvert.js");e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{"./doConvert.js":445,ndarray:449}],445:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":103}],446:[function(t,e,r){"use strict";function n(t){switch(t){case"uint8":return[l.mallocUint8,l.freeUint8];case"uint16":return[l.mallocUint16,l.freeUint16];case"uint32":return[l.mallocUint32,l.freeUint32];case"int8":return[l.mallocInt8,l.freeInt8];case"int16": -return[l.mallocInt16,l.freeInt16];case"int32":return[l.mallocInt32,l.freeInt32];case"float32":return[l.mallocFloat,l.freeFloat];case"float64":return[l.mallocDouble,l.freeDouble];default:return null}}function i(t){for(var e=[],r=0;r1){for(var h=[],f=1;f1){o.push("dptr=0;sptr=ptr");for(var f=t.length-1;f>=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"left){","dptr=0","sptr=cptr-s0");for(var f=1;fb){break __l}"].join(""));for(var f=t.length-1;f>=1;--f)o.push("sptr+=e"+f,"dptr+=f"+f,"}");o.push("dptr=cptr;sptr=cptr-s0");for(var f=t.length-1;f>=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"left)&&("+r("cptr-s0")+">scratch)){",a("cptr",r("cptr-s0")),"cptr-=s0","}",a("cptr","scratch"));if(o.push("}"),t.length>1&&u&&o.push("free(scratch)"),o.push("} return "+s),u){var p=new Function("malloc","free",o.join("\n"));return p(u[0],u[1])}var p=new Function(o.join("\n"));return p()}function o(t,e,r){function a(t){return["(offset+",t,"*s0)"].join("")}function o(t){return"generic"===e?["data.get(",t,")"].join(""):["data[",t,"]"].join("")}function s(t,r){return"generic"===e?["data.set(",t,",",r,")"].join(""):["data[",t,"]=",r].join("")}function l(e,r,n){if(1===e.length)_.push("ptr0="+a(e[0]));else for(var i=0;i=0;--i){var o=t[i];0!==o&&_.push(["for(i",o,"=0;i",o,"1)for(var i=0;i1?_.push("ptr_shift+=d"+o):_.push("ptr0+=d"+o),_.push("}"))}}function c(e,r,n,i){if(1===r.length)_.push("ptr0="+a(r[0]));else{for(var o=0;o1)for(var o=0;o=1;--o)n&&_.push("pivot_ptr+=f"+o),r.length>1?_.push("ptr_shift+=e"+o):_.push("ptr0+=e"+o),_.push("}")}function h(){t.length>1&&k&&_.push("free(pivot1)","free(pivot2)")}function f(e,r){var n="el"+e,i="el"+r;if(t.length>1){var s="__l"+ ++A;c(s,[n,i],!1,["comp=",o("ptr0"),"-",o("ptr1"),"\n","if(comp>0){tmp0=",n,";",n,"=",i,";",i,"=tmp0;break ",s,"}\n","if(comp<0){break ",s,"}"].join(""))}else _.push(["if(",o(a(n)),">",o(a(i)),"){tmp0=",n,";",n,"=",i,";",i,"=tmp0}"].join(""))}function d(e,r){t.length>1?l([e,r],!1,s("ptr0",o("ptr1"))):_.push(s(a(e),o(a(r))))}function p(e,r,n){if(t.length>1){var i="__l"+ ++A;c(i,[r],!0,[e,"=",o("ptr0"),"-pivot",n,"[pivot_ptr]\n","if(",e,"!==0){break ",i,"}"].join(""))}else _.push([e,"=",o(a(r)),"-pivot",n].join(""))}function m(e,r){t.length>1?l([e,r],!1,["tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1","tmp")].join("")):_.push(["ptr0=",a(e),"\n","ptr1=",a(r),"\n","tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1","tmp")].join(""))}function g(e,r,n){t.length>1?(l([e,r,n],!1,["tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1",o("ptr2")),"\n",s("ptr2","tmp")].join("")),_.push("++"+r,"--"+n)):_.push(["ptr0=",a(e),"\n","ptr1=",a(r),"\n","ptr2=",a(n),"\n","++",r,"\n","--",n,"\n","tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1",o("ptr2")),"\n",s("ptr2","tmp")].join(""))}function v(t,e){m(t,e),_.push("--"+e)}function y(e,r,n){t.length>1?l([e,r],!0,[s("ptr0",o("ptr1")),"\n",s("ptr1",["pivot",n,"[pivot_ptr]"].join(""))].join("")):_.push(s(a(e),o(a(r))),s(a(r),"pivot"+n))}function b(e,r){_.push(["if((",r,"-",e,")<=",u,"){\n","insertionSort(",e,",",r,",data,offset,",i(t.length).join(","),")\n","}else{\n",w,"(",e,",",r,",data,offset,",i(t.length).join(","),")\n","}"].join(""))}function x(e,r,n){t.length>1?(_.push(["__l",++A,":while(true){"].join("")),l([e],!0,["if(",o("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",A,"}"].join("")),_.push(n,"}")):_.push(["while(",o(a(e)),"===pivot",r,"){",n,"}"].join(""))}var _=["'use strict'"],w=["ndarrayQuickSort",t.join("d"),e].join(""),M=["left","right","data","offset"].concat(i(t.length)),k=n(e),A=0;_.push(["function ",w,"(",M.join(","),"){"].join(""));var T=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(t.length>1){for(var S=[],E=1;E1?l(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",o("ptr1"),"\n","pivot2[pivot_ptr]=",o("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",o("ptr0"),"\n","y=",o("ptr2"),"\n","z=",o("ptr4"),"\n",s("ptr5","x"),"\n",s("ptr6","y"),"\n",s("ptr7","z")].join("")):_.push(["pivot1=",o(a("el2")),"\n","pivot2=",o(a("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",o(a("el1")),"\n","y=",o(a("el3")),"\n","z=",o(a("el5")),"\n",s(a("index1"),"x"),"\n",s(a("index3"),"y"),"\n",s(a("index5"),"z")].join("")),d("index2","left"),d("index4","right"),_.push("if(pivots_are_equal){"),_.push("for(k=less;k<=great;++k){"),p("comp","k",1),_.push("if(comp===0){continue}"),_.push("if(comp<0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),_.push("while(true){"),p("comp","great",1),_.push("if(comp>0){"),_.push("great--"),_.push("}else if(comp<0){"),g("k","less","great"),_.push("break"),_.push("}else{"),v("k","great"),_.push("break"),_.push("}"),_.push("}"),_.push("}"),_.push("}"),_.push("}else{"),_.push("for(k=less;k<=great;++k){"),p("comp_pivot1","k",1),_.push("if(comp_pivot1<0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),p("comp_pivot2","k",2),_.push("if(comp_pivot2>0){"),_.push("while(true){"),p("comp","great",2),_.push("if(comp>0){"),_.push("if(--greatindex5){"),x("less",1,"++less"),x("great",2,"--great"),_.push("for(k=less;k<=great;++k){"),p("comp_pivot1","k",1),_.push("if(comp_pivot1===0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),p("comp_pivot2","k",2),_.push("if(comp_pivot2===0){"),_.push("while(true){"),p("comp","great",2),_.push("if(comp===0){"),_.push("if(--great1&&k){var L=new Function("insertionSort","malloc","free",_.join("\n"));return L(r,k[0],k[1])}var L=new Function("insertionSort",_.join("\n"));return L(r)}function s(t,e){var r=["'use strict'"],n=["ndarraySortWrapper",t.join("d"),e].join(""),s=["array"];r.push(["function ",n,"(",s.join(","),"){"].join(""));for(var l=["data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride"],c=0;c0?l.push(["d",g,"=s",g,"-d",p,"*n",p].join("")):l.push(["d",g,"=s",g].join("")),p=g);var d=t.length-1-c;0!==d&&(m>0?l.push(["e",d,"=s",d,"-e",m,"*n",m,",f",d,"=",h[d],"-f",m,"*n",m].join("")):l.push(["e",d,"=s",d,",f",d,"=",h[d]].join("")),m=d)}r.push("var "+l.join(","));var v=["0","n0-1","data","offset"].concat(i(t.length));r.push(["if(n0<=",u,"){","insertionSort(",v.join(","),")}else{","quickSort(",v.join(","),")}"].join("")),r.push("}return "+n);var y=new Function("insertionSort","quickSort",r.join("\n")),b=a(t,e);return y(b,o(t,e,b))}var l=t("typedarray-pool"),u=32;e.exports=s},{"typedarray-pool":521}],447:[function(t,e,r){"use strict";function n(t){var e=t.order,r=t.dtype,n=[e,r],o=n.join(":"),s=a[o];return s||(a[o]=s=i(e,r)),s(t),t}var i=t("./lib/compile_sort.js"),a={};e.exports=n},{"./lib/compile_sort.js":446}],448:[function(t,e,r){"use strict";var n=t("ndarray-linear-interpolate"),i=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=new Array(_inline_9_arg4_)}",args:[{name:"_inline_9_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg2_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_.apply(void 0,this_warped)}",args:[{name:"_inline_10_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_10_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg4_",lvalue:!1,rvalue:!1,count:0}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warpND",blockSize:64}),a=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0])}",args:[{name:"_inline_13_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_13_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp1D",blockSize:64}),o=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_16_arg2_(this_warped,_inline_16_arg0_),_inline_16_arg1_=_inline_16_arg3_(_inline_16_arg4_,this_warped[0],this_warped[1])}",args:[{name:"_inline_16_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_16_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp2D",blockSize:64}),s=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_19_arg2_(this_warped,_inline_19_arg0_),_inline_19_arg1_=_inline_19_arg3_(_inline_19_arg4_,this_warped[0],this_warped[1],this_warped[2])}",args:[{name:"_inline_19_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_19_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_19_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_19_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_19_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp3D",blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:a(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:i(t,r,n.bind(void 0,e),e.shape.length)}return t}},{"cwise/lib/wrapper":106,"ndarray-linear-interpolate":442}],449:[function(t,e,r){function n(t,e){return t[0]-e[0]}function i(){var t,e=this.stride,r=new Array(e.length);for(t=0;tMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&a.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):a.push("ORDER})")),a.push("proto.set=function "+r+"_set("+u.join(",")+",v){"),n?a.push("return this.data.set("+c+",v)}"):a.push("return this.data["+c+"]=v}"),a.push("proto.get=function "+r+"_get("+u.join(",")+"){"),n?a.push("return this.data.get("+c+")}"):a.push("return this.data["+c+"]}"),a.push("proto.index=function "+r+"_index(",u.join(),"){return "+c+"}"),a.push("proto.hi=function "+r+"_hi("+u.join(",")+"){return new "+r+"(this.data,"+s.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+s.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var p=s.map(function(t){return"a"+t+"=this.shape["+t+"]"}),m=s.map(function(t){return"c"+t+"=this.stride["+t+"]"});a.push("proto.lo=function "+r+"_lo("+u.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+m.join(","));for(var g=0;g=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");a.push("return new "+r+"(this.data,"+s.map(function(t){return"a"+t}).join(",")+","+s.map(function(t){return"c"+t}).join(",")+",b)}"),a.push("proto.step=function "+r+"_step("+u.join(",")+"){var "+s.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+s.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var g=0;g=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+s.map(function(t){return"shape["+t+"]"}).join(",")+","+s.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}");var o=new Function("CTOR_LIST","ORDER",a.join("\n"));return o(h[t],i)}function o(t){if(u(t))return"buffer";if(c)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(t)?"array":"generic"}function s(t,e,r,n){if(void 0===t){var i=h.array[0];return i([])}"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var s=e.length;if(void 0===r){r=new Array(s);for(var l=s-1,u=1;l>=0;--l)r[l]=u,u*=e[l]}if(void 0===n){n=0;for(var l=0;lt==t>0?n===o?(r+=1,n=0):n+=1:0===n?(n=o,r-=1):n-=1,i.pack(n,r)}var i=t("double-bits"),a=Math.pow(2,-1074),o=-1>>>0;e.exports=n},{"double-bits":109}],451:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa)for(var x=i[u],_=1/Math.sqrt(g*y),b=0;b<3;++b){var w=(b+1)%3,M=(b+2)%3;x[b]+=_*(v[w]*m[M]-v[M]*m[w])}}for(var o=0;oa)for(var _=1/Math.sqrt(k),b=0;b<3;++b)x[b]*=_;else for(var b=0;b<3;++b)x[b]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(d):0;for(var u=0;u<3;++u)f[u]*=d;i[o]=f}return i}},{}],452:[function(t,e,r){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,l=n(t),u=1;u0){var h=Math.sqrt(c+1);t[0]=.5*(o-l)/h,t[1]=.5*(s-n)/h,t[2]=.5*(r-a)/h,t[3]=.5*h}else{var f=Math.max(e,a,u),h=Math.sqrt(2*f-c+1);e>=f?(t[0]=.5*h,t[1]=.5*(i+r)/h,t[2]=.5*(s+n)/h,t[3]=.5*(o-l)/h):a>=f?(t[0]=.5*(r+i)/h,t[1]=.5*h,t[2]=.5*(l+o)/h,t[3]=.5*(s-n)/h):(t[0]=.5*(n+s)/h,t[1]=.5*(o+l)/h,t[2]=.5*h,t[3]=.5*(r-i)/h)}return t}e.exports=n},{}],454:[function(t,e,r){"use strict";function n(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function i(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function a(t,e){var r=e[0],n=e[1],a=e[2],o=e[3],s=i(r,n,a,o);s>1e-6?(t[0]=r/s,t[1]=n/s,t[2]=a/s,t[3]=o/s):(t[0]=t[1]=t[2]=0,t[3]=1)}function o(t,e,r){this.radius=l([r]),this.center=l(e),this.rotation=l(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}function s(t){t=t||{};var e=t.center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),r=[].slice.call(r,0,4),a(r,r);var i=new o(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i}e.exports=s;var l=t("filtered-vector"),u=t("gl-mat4/lookAt"),c=t("gl-mat4/fromQuat"),h=t("gl-mat4/invert"),f=t("./lib/quatFromFrame"),d=o.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;a(e,e);var r=this.computedMatrix;c(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var u=0,h=0;h<3;++h)u+=r[l+4*h]*i[h];r[12+l]=-u}},d.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},d.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},d.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},d.pan=function(t,e,r,i){e=e||0,r=r||0,i=i||0,this.recalcMatrix(t);var a=this.computedMatrix,o=a[1],s=a[5],l=a[9],u=n(o,s,l);o/=u,s/=u,l/=u;var c=a[0],h=a[4],f=a[8],d=c*o+h*s+f*l;c-=o*d,h-=s*d,f-=l*d;var p=n(c,h,f);c/=p,h/=p,f/=p;var m=a[2],g=a[6],v=a[10],y=m*o+g*s+v*l,b=m*c+g*h+v*f;m-=y*o+b*c,g-=y*s+b*h,v-=y*l+b*f;var x=n(m,g,v);m/=x,g/=x,v/=x;var _=c*e+o*r,w=h*e+s*r,M=f*e+l*r;this.center.move(t,_,w,M);var k=Math.exp(this.computedRadius[0]);k=Math.max(1e-4,k+i),this.radius.set(t,Math.log(k))},d.rotate=function(t,e,r,a){this.recalcMatrix(t),e=e||0,r=r||0;var o=this.computedMatrix,s=o[0],l=o[4],u=o[8],c=o[1],h=o[5],f=o[9],d=o[2],p=o[6],m=o[10],g=e*s+r*c,v=e*l+r*h,y=e*u+r*f,b=-(p*y-m*v),x=-(m*g-d*y),_=-(d*v-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(b,2)-Math.pow(x,2)-Math.pow(_,2))),M=i(b,x,_,w);M>1e-6?(b/=M,x/=M,_/=M,w/=M):(b=x=_=0,w=1);var k=this.computedRotation,A=k[0],T=k[1],S=k[2],E=k[3],L=A*w+E*b+T*_-S*x,C=T*w+E*x+S*b-A*_,z=S*w+E*_+A*x-T*b,D=E*w-A*b-T*x-S*_;if(a){b=d,x=p,_=m;var I=Math.sin(a)/n(b,x,_);b*=I,x*=I,_*=I,w=Math.cos(e),L=L*w+D*b+C*_-z*x,C=C*w+D*x+z*b-L*_,z=z*w+D*_+L*x-C*b,D=D*w-L*b-C*x-z*_}var P=i(L,C,z,D);P>1e-6?(L/=P,C/=P,z/=P,D/=P):(L=C=z=0,D=1),this.rotation.set(t,L,C,z,D)},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var i=this.computedMatrix;u(i,e,r,n);var o=this.computedRotation;f(o,i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10]),a(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var s=0,l=0;l<3;++l)s+=Math.pow(r[l]-e[l],2);this.radius.set(t,.5*Math.log(Math.max(s,1e-6))),this.center.set(t,r[0],r[1],r[2])},d.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},d.setMatrix=function(t,e){var r=this.computedRotation;f(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),a(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;h(n,e);var i=n[15];if(Math.abs(i)>1e-6){var o=n[12]/i,s=n[13]/i,l=n[14]/i;this.recalcMatrix(t);var u=Math.exp(this.computedRadius[0]);this.center.set(t,o-n[2]*u,s-n[6]*u,l-n[10]*u),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},d.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},d.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},d.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},d.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},d.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{"./lib/quatFromFrame":453,"filtered-vector":118,"gl-mat4/fromQuat":162,"gl-mat4/invert":165,"gl-mat4/lookAt":166}],455:[function(t,e,r){"use strict";var n=t("repeat-string");e.exports=function(t,e,r){return r=void 0!==r?r+"":" ",n(r,e)+t}},{"repeat-string":481}],456:[function(t,e,r){e.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},{}],457:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,i="/"===o.charAt(0))}return r=e(n(r.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(t){var i=r.isAbsolute(t),a="/"===o(t,-1);return t=e(n(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),a=n(e.split("/")),o=Math.min(i.length,a.length),s=o,l=0;l55295&&e<57344){if(!r){e>56319||a+1===n?i.push(239,191,189):r=e;continue}if(e<56320){i.push(239,191,189),r=e;continue}e=r-55296<<10|e-56320|65536,r=null}else r&&(i.push(239,191,189),r=null);e<128?i.push(e):e<2048?i.push(e>>6|192,63&e|128):e<65536?i.push(e>>12|224,e>>6&63|128,63&e|128):i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}return i}e.exports=n;var a,o,s,l=t("ieee754");a={readUInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},writeUInt32LE:function(t,e){this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24},readInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+(this[t+3]<<24)},readFloatLE:function(t){return l.read(this,t,!0,23,4)},readDoubleLE:function(t){return l.read(this,t,!0,52,8)},writeFloatLE:function(t,e){return l.write(this,t,e,!0,23,4)},writeDoubleLE:function(t,e){return l.write(this,t,e,!0,52,8)},toString:function(t,e,r){var n="",i="";e=e||0,r=Math.min(this.length,r||this.length) -;for(var a=e;a=1;){if(e.pos>=r)throw new Error("Given varint doesn't fit into 10 bytes");var n=255&t;e.buf[e.pos++]=n|(t>=128?128:0),t/=128}}function o(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function s(t,e){for(var r=0;r>3,a=this.pos;t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=this.buf.readUInt32LE(this.pos);return this.pos+=4,t},readSFixed32:function(){var t=this.buf.readInt32LE(this.pos);return this.pos+=4,t},readFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+4294967296*this.buf.readUInt32LE(this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+4294967296*this.buf.readInt32LE(this.pos+4);return this.pos+=8,t},readFloat:function(){var t=this.buf.readFloatLE(this.pos);return this.pos+=4,t},readDouble:function(){var t=this.buf.readDoubleLE(this.pos);return this.pos+=8,t},readVarint:function(){var t,e,r=this.buf;return e=r[this.pos++],t=127&e,e<128?t:(e=r[this.pos++],t|=(127&e)<<7,e<128?t:(e=r[this.pos++],t|=(127&e)<<14,e<128?t:(e=r[this.pos++],t|=(127&e)<<21,e<128?t:i(t,this))))},readVarint64:function(){var t=this.pos,e=this.readVarint();if(e127;);else if(e===n.Bytes)this.pos=this.readVarint()+this.pos;else if(e===n.Fixed32)this.pos+=4;else{if(e!==n.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455)return void a(t,this);this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127)))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t);var e=g.byteLength(t);this.writeVarint(e),this.realloc(e),this.buf.write(t,this.pos),this.pos+=e},writeFloat:function(t){this.realloc(4),this.buf.writeFloatLE(t,this.pos),this.pos+=4},writeDouble:function(t){this.realloc(8),this.buf.writeDoubleLE(t,this.pos),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&o(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,n.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,s,e)},writePackedSVarint:function(t,e){this.writeMessage(t,l,e)},writePackedBoolean:function(t,e){this.writeMessage(t,h,e)},writePackedFloat:function(t,e){this.writeMessage(t,u,e)},writePackedDouble:function(t,e){this.writeMessage(t,c,e)},writePackedFixed32:function(t,e){this.writeMessage(t,f,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,d,e)},writePackedFixed64:function(t,e){this.writeMessage(t,p,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,n.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,n.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,n.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,n.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./buffer":458}],460:[function(t,e,r){"use strict";function n(t){var e=t.length;if(e0;--i)n=l[i],r=s[i],s[i]=s[n],s[n]=r,l[i]=l[r],l[r]=n,u=(u+r)*i;return a.freeUint32(l),a.freeUint32(s),u}function i(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}r=r||new Array(t);var n,i,a,o=1;for(r[0]=0,a=1;a0;--a)n=e/o|0,e=e-n*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}var a=t("typedarray-pool"),o=t("invert-permutation");r.rank=n,r.unrank=i},{"invert-permutation":275,"typedarray-pool":521}],462:[function(t,e,r){"use strict";function n(t,e){function r(t,e){var r=s[e][t[e]];r.splice(r.indexOf(t),1)}function n(t,n,a){for(var o,l,u,c=0;c<2;++c)if(s[c][n].length>0){o=s[c][n][0],u=c;break}l=o[1^u];for(var h=0;h<2;++h)for(var f=s[h][n],d=0;d0&&(o=p,l=m,u=h)}return a?l:(o&&r(o,u),l)}for(var a=0|e.length,o=t.length,s=[new Array(a),new Array(a)],l=0;l0;){var d=(s[0][l].length,function(t,a){var o=s[a][t][0],l=[t];r(o,a);for(var u=o[1^a];;){for(;u!==t;)l.push(u),u=n(l[l.length-2],u,!1);if(s[0][t].length+s[1][t].length===0)break;var c=l[l.length-1],h=t,f=l[1],d=n(c,h,!0);if(i(e[c],e[h],e[f],e[d])<0)break;l.push(t),u=n(c,h)}return l}(l,h));!function(t,e){return e[1]===e[e.length-1]}(f,d)?(f.length>0&&c.push(f),f=d):f.push.apply(f,d)}f.length>0&&c.push(f)}return c}e.exports=n;var i=t("compare-angle")},{"compare-angle":93}],463:[function(t,e,r){"use strict";function n(t,e){for(var r=i(t,e.length),n=new Array(e.length),a=new Array(e.length),o=[],s=0;s0;){var u=o.pop();n[u]=!1;for(var c=r[u],s=0;s0}function a(t){for(var e=t.length,r=0;r0;){var U=N.pop(),V=D[U];h(V,function(t,e){return t-e});var H,q=V.length,G=B[U];if(0===G){var T=v[U];H=[T]}for(var g=0;g=0)&&(B[Y]=1^G,N.push(Y),0===G)){var T=v[Y];a(T)||(T.reverse(),H.push(T))}}0===G&&d.push(H)}return d}e.exports=a;var o=t("edges-to-adjacency-list"),s=t("planar-dual"),l=t("point-in-big-polygon"),u=t("two-product"),c=t("robust-sum"),h=t("uniq"),f=t("./lib/trim-leaves")},{"./lib/trim-leaves":463,"edges-to-adjacency-list":112,"planar-dual":462,"point-in-big-polygon":466,"robust-sum":494,"two-product":519,uniq:523}],465:[function(t,e,r){"use strict";function n(t,e){this.x=t,this.y=e}e.exports=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{}],466:[function(t,e,r){function n(){return!0}function i(t){return function(e,r){var i=t[e];return!!i&&!!i.queryPoint(r,n)}}function a(t){for(var e={},r=0;r0&&e[n]===r[0]))return 1;i=t[n-1]}for(var a=1;i;){var o=i.key,s=h(r,o[0],o[1]);if(o[0][0]0))return 0;a=-1,i=i.right}else if(s>0)i=i.left;else{if(!(s<0))return 0;a=1,i=i.right}}return a}}function s(t){return 1}function l(t){return function(e){return t(e[0],e[1])?0:1}}function u(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}function c(t){for(var e=t.length,r=[],n=[],i=0;i=u?(x=1,y=u+2*f+p):(x=-f/u,y=f*x+p)):(x=0,d>=0?(_=0,y=p):-d>=h?(_=1,y=h+2*d+p):(_=-d/h,y=d*_+p));else if(_<0)_=0,f>=0?(x=0,y=p):-f>=u?(x=1,y=u+2*f+p):(x=-f/u,y=f*x+p);else{var w=1/b;x*=w,_*=w,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p}else{var M,k,A,T;x<0?(M=c+f,k=h+d,k>M?(A=k-M,T=u-2*c+h,A>=T?(x=1,_=0,y=u+2*f+p):(x=A/T,_=1-x,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)):(x=0,k<=0?(_=1,y=h+2*d+p):d>=0?(_=0,y=p):(_=-d/h,y=d*_+p))):_<0?(M=c+d,k=u+f,k>M?(A=k-M,T=u-2*c+h,A>=T?(_=1,x=0,y=h+2*d+p):(_=A/T,x=1-_,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)):(_=0,k<=0?(x=1,y=u+2*f+p):f>=0?(x=0,y=p):(x=-f/u,y=f*x+p))):(A=h+d-c-f,A<=0?(x=0,_=1,y=h+2*d+p):(T=u-2*c+h,A>=T?(x=1,_=0,y=u+2*f+p):(x=A/T,_=1-x,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)))}for(var S=1-x-_,l=0;l1)for(var r=1;r1&&(n=r[0]+"@",t=r[1]),t=t.replace(I,"."),n+o(t.split("."),e).join(".")}function l(t){for(var e,r,n=[],i=0,a=t.length;i=55296&&e<=56319&&i65535&&(t-=65536,e+=R(t>>>10&1023|55296),t=56320|1023&t),e+=R(t)}).join("")}function c(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:M}function h(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,r){var n=0;for(t=r?j(t/S):t>>1,t+=j(t/e);t>O*A>>1;n+=M)t=j(t/O);return j(n+(O+1)*t/(t+T))}function d(t){var e,r,n,i,o,s,l,h,d,p,m=[],g=t.length,v=0,y=L,b=E;for(r=t.lastIndexOf(C),r<0&&(r=0),n=0;n=128&&a("not-basic"),m.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=g&&a("invalid-input"),h=c(t.charCodeAt(i++)),(h>=M||h>j((w-v)/s))&&a("overflow"),v+=h*s,d=l<=b?k:l>=b+A?A:l-b,!(hj(w/p)&&a("overflow"),s*=p;e=m.length+1,b=f(v-o,e,0==o),j(v/e)>w-y&&a("overflow"),y+=j(v/e),v%=e,m.splice(v++,0,y)}return u(m)}function p(t){var e,r,n,i,o,s,u,c,d,p,m,g,v,y,b,x=[];for(t=l(t),g=t.length,e=L,r=0,o=E,s=0;s=e&&mj((w-r)/v)&&a("overflow"),r+=(u-e)*v,e=u,s=0;sw&&a("overflow"),m==e){for(c=r,d=M;p=d<=o?k:d>=o+A?A:d-o,!(c= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=M-k,j=Math.floor,R=String.fromCharCode;if(x={version:"1.4.1",ucs2:{decode:l,encode:u},decode:d,encode:p,toASCII:g,toUnicode:m},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return x});else if(v&&y)if(r.exports==v)y.exports=x;else for(_ in x)x.hasOwnProperty(_)&&(v[_]=x[_]);else i.punycode=x}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],470:[function(t,e,r){e.exports=t("gl-quat/slerp")},{"gl-quat/slerp":215}],471:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,a){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;t=t.split(e);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var l=t.length;s>0&&l>s&&(l=s);for(var u=0;u=0?(c=p.substr(0,m),h=p.substr(m+1)):(c=p,h=""),f=decodeURIComponent(c),d=decodeURIComponent(h),n(o,f)?i(o[f])?o[f].push(d):o[f]=[o[f],d]:o[f]=d}return o};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],472:[function(t,e,r){"use strict";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;nr;){if(o-r>600){var l=o-r+1,u=e-r+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1);n(t,e,Math.max(r,Math.floor(e-u*h/l+f)),Math.min(o,Math.floor(e+(l-u)*h/l+f)),s)}var d=t[e],p=r,m=o;for(i(t,r,e),s(t[o],d)>0&&i(t,r,o);p0;)m--}0===s(t[r],d)?i(t,r,m):(m++,i(t,m,o)),m<=e&&(r=m+1),e<=m&&(o=m-1)}}function i(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function a(t,e){return te?1:0}e.exports=n},{}],475:[function(t,e,r){"use strict";function n(t,e){for(var r=t.length,n=new Array(r),a=0;a0){var u=t[r-1];if(0===i(s,u)&&o(u)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}var i=t("compare-cell"),a=t("compare-oriented-cell"),o=t("cell-orientation");e.exports=n},{"cell-orientation":78,"compare-cell":94,"compare-oriented-cell":95}],480:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.createREGL=i()}(this,function(){"use strict";function t(t){return"undefined"!=typeof btoa?btoa(t):"base64:"+t}function e(t){var e=new Error("(regl) "+t);throw console.error(e),e}function r(t,r){t||e(r)}function n(t){return t?": "+t:""}function i(t,r,i){t in r||e("unknown parameter ("+t+")"+n(i)+". possible values: "+Object.keys(r).join())}function a(t,r){Kt(t)||e("invalid parameter type"+n(r)+". must be a typed array")}function o(t,r,i){typeof t!==r&&e("invalid parameter type"+n(i)+". expected "+r+", got "+typeof t)}function s(t,r){t>=0&&(0|t)===t||e("invalid parameter type, ("+t+")"+n(r)+". must be a nonnegative integer")}function l(t,r,i){r.indexOf(t)<0&&e("invalid value"+n(i)+". must be one of: "+r)}function u(t){Object.keys(t).forEach(function(t){te.indexOf(t)<0&&e('invalid regl constructor argument "'+t+'". must be one of '+te)})}function c(t,e){for(t+="";t.length0&&e.push(new d("unknown",0,t))}}),e}function y(t,e){e.forEach(function(e){var r=t[e.file];if(r){var n=r.index[e.line];if(n)return n.errors.push(e),void(r.hasErrors=!0)}t.unknown.hasErrors=!0,t.unknown.lines[0].errors.push(e)})}function b(t,e,n,i,a){if(!t.getShaderParameter(e,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(e),s=i===t.FRAGMENT_SHADER?"fragment":"vertex";T(n,"string",s+" shader source must be a string",a);var l=g(n,a),u=v(o);y(l,u),Object.keys(l).forEach(function(t){function e(t,e){n.push(t),i.push(e||"")}var r=l[t];if(r.hasErrors){var n=[""],i=[""];e("file number "+t+": "+r.name+"\n","color:red;text-decoration:underline;font-weight:bold"),r.lines.forEach(function(t){if(t.errors.length>0){e(c(t.number,4)+"| ","background-color:yellow; font-weight:bold"),e(t.line+"\n","color:red; background-color:yellow; font-weight:bold");var r=0;t.errors.forEach(function(n){var i=n.message,a=/^\s*\'(.*)\'\s*\:\s*(.*)$/.exec(i);if(a){var o=a[1];switch(i=a[2],o){case"assign":o="="}r=Math.max(t.line.indexOf(o,r),0)}else r=0;e(c("| ",6)),e(c("^^^",r+3)+"\n","font-weight:bold"),e(c("| ",6)),e(i+"\n","font-weight:bold")}),e(c("| ",6)+"\n")}else e(c(t.number,4)+"| "),e(t.line+"\n","color:red")}),"undefined"!=typeof document?(i[0]=n.join("%c"),console.log.apply(console,i)):console.log(n.join(""))}}),r.raise("Error compiling "+s+" shader, "+l[0].name)}}function x(t,e,n,i,a){if(!t.getProgramParameter(e,t.LINK_STATUS)){var o=t.getProgramInfoLog(e),s=g(n,a),l=g(i,a),u='Error linking program with vertex shader, "'+l[0].name+'", and fragment shader "'+s[0].name+'"';"undefined"!=typeof document?console.log("%c"+u+"\n%c"+o,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(u+"\n"+o),r.raise(u)}}function _(t){t._commandRef=p()}function w(t,e,r,n){function i(t){return t?n.id(t):0}function a(t,e){Object.keys(e).forEach(function(e){t[n.id(e)]=!0})}_(t),t._fragId=i(t.static.frag),t._vertId=i(t.static.vert);var o=t._uniformSet={};a(o,e.static),a(o,e.dynamic);var s=t._attributeSet={};a(s,r.static),a(s,r.dynamic),t._hasCount="count"in t.static||"count"in t.dynamic||"elements"in t.static||"elements"in t.dynamic}function M(t,r){var n=m();e(t+" in command "+(r||p())+("unknown"===n?"":" called from "+n))}function k(t,e,r){t||M(e,r||p())}function A(t,e,r,i){t in e||M("unknown parameter ("+t+")"+n(r)+". possible values: "+Object.keys(e).join(),i||p())}function T(t,e,r,i){typeof t!==e&&M("invalid parameter type"+n(r)+". expected "+e+", got "+typeof t,i||p())}function S(t){t()}function E(t,e,r){t.texture?l(t.texture._texture.internalformat,e,"unsupported texture format for attachment"):l(t.renderbuffer._renderbuffer.format,r,"unsupported renderbuffer format for attachment")}function L(t,e){return t===ue||t===le||t===ce?2:t===he?4:fe[t]*e}function C(t){return!(t&t-1||!t)}function z(t,e,n){var i,a=e.width,o=e.height,s=e.channels;r(a>0&&a<=n.maxTextureSize&&o>0&&o<=n.maxTextureSize,"invalid texture shape"),t.wrapS===ee&&t.wrapT===ee||r(C(a)&&C(o),"incompatible wrap mode for texture, both width and height must be power of 2"),1===e.mipmask?1!==a&&1!==o&&r(t.minFilter!==ne&&t.minFilter!==ae&&t.minFilter!==ie&&t.minFilter!==oe,"min filter requires mipmap"):(r(C(a)&&C(o),"texture must be a square power of 2 to support mipmapping"),r(e.mipmask===(a<<1)-1,"missing or incomplete mipmap data")),e.type===se&&(n.extensions.indexOf("oes_texture_float_linear")<0&&r(t.minFilter===re&&t.magFilter===re,"filter not supported, must enable oes_texture_float_linear"),r(!t.genMipmaps,"mipmap generation not supported with float textures"));var l=e.images;for(i=0;i<16;++i)if(l[i]){var u=a>>i,c=o>>i;r(e.mipmask&1<0&&a<=i.maxTextureSize&&o>0&&o<=i.maxTextureSize,"invalid texture shape"),r(a===o,"cube map must be square"),r(e.wrapS===ee&&e.wrapT===ee,"wrap mode not supported by cube map");for(var l=0;l>h,p=o>>h;r(u.mipmask&1<1&&e===r&&('"'===e||"'"===e))return['"'+P(t.substr(1,t.length-2))+'"'];var n=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t);if(n)return O(t.substr(0,n.index)).concat(O(n[1])).concat(O(t.substr(n.index+n[0].length)));var i=t.split(".");if(1===i.length)return['"'+P(t)+'"'];for(var a=[],o=0;o0,"invalid pixel ratio"))):de.raise("invalid arguments to regl"),e&&("canvas"===e.nodeName.toLowerCase()?n=e:r=e),!i){if(!n){de("undefined"!=typeof document,"must manually specify webgl context outside of DOM environments");var d=U(r||document.body,h,u);if(!d)return null;n=d.canvas,f=d.onDestroy}i=V(n,o)}return i?{gl:i,canvas:n,container:r,extensions:s,optionalExtensions:l,pixelRatio:u,profile:c,onDone:h,onDestroy:f}:(f(),h("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function X(t,e){function r(e){de.type(e,"string","extension name must be string");var r,i=e.toLowerCase();try{r=n[i]=t.getExtension(i)}catch(t){}return!!r}for(var n={},i=0;i65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1}function $(t){var e=Q(t),r=Ee[K(e)>>2];return r.length>0?r.pop():new ArrayBuffer(e)}function tt(t){Ee[K(t.byteLength)>>2].push(t)}function et(t,e){var r=null;switch(t){case _e:r=new Int8Array($(e),0,e);break;case we:r=new Uint8Array($(e),0,e);break;case Me:r=new Int16Array($(2*e),0,e);break;case ke:r=new Uint16Array($(2*e),0,e);break;case Ae:r=new Int32Array($(4*e),0,e);break;case Te:r=new Uint32Array($(4*e),0,e);break;case Se:r=new Float32Array($(4*e),0,e);break;default:return null}return r.length!==e?r.subarray(0,e):r}function rt(t){tt(t.buffer)}function nt(t,e,r){for(var n=0;n0){var l;if(Array.isArray(e[0])){s=Pe(e);for(var u=1,c=1;c0)if("number"==typeof t[0]){var i=Le.allocType(p.dtype,t.length);ct(i,t),h(i,n),Le.freeType(i)}else if(Array.isArray(t[0])||Kt(t[0])){r=Pe(t);var a=Ie(t,r,p.dtype);h(a,n),Le.freeType(a)}else de.raise("invalid buffer data")}else if(Kt(t))h(t,n);else if(Z(t)){r=t.shape;var o=t.stride,s=0,l=0,u=0,f=0;1===r.length?(s=r[0],l=1,u=o[0],f=0):2===r.length?(s=r[0],l=r[1],u=o[0],f=o[1]):de.raise("invalid shape");var d=Array.isArray(t.data)?p.dtype:ut(t.data),m=Le.allocType(d,s*l);ht(m,t.data,s,l,u,f,t.offset),h(m,n),Le.freeType(m)}else de.raise("invalid data for buffer subdata");return c}e.bufferCount++;var p=new n(a);return f[p.id]=p,o||c(i),c._reglType="buffer",c._buffer=p,c.subdata=d,r.profile&&(c.stats=p.stats),c.destroy=function(){l(p)},c}function c(){xe(f).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})}var h=0,f={};n.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},n.prototype.destroy=function(){l(this)};var d=[];return r.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:u,createStream:i,destroyStream:a,clear:function(){xe(f).forEach(l),d.forEach(l)},getBuffer:function(t){return t&&t._buffer instanceof n?t._buffer:null},restore:c,_initBuffer:s}}function dt(t,e,r,n){function i(t){this.id=h++,c[this.id]=this,this.buffer=t,this.primType=He,this.vertCount=0,this.type=0}function a(t){var e=d.pop();return e||(e=new i(r.create(null,Je,!0,!1)._buffer)),s(e,t,Qe,-1,-1,0,0),e}function o(t){d.push(t)}function s(n,i,a,o,s,l,u){if(n.buffer.bind(),i){var c=u;u||Kt(i)&&(!Z(i)||Kt(i.data))||(c=e.oes_element_index_uint?Ze:We),r._initBuffer(n.buffer,i,a,c,3)}else t.bufferData(Je,l,a),n.buffer.dtype=h||Ge,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l;var h=u;if(!u){switch(n.buffer.dtype){case Ge:case qe:h=Ge;break;case We:case Ye:h=We;break;case Ze:case Xe:h=Ze;break;default:de.raise("unsupported type for element array")}n.buffer.dtype=h}n.type=h,de(h!==Ze||!!e.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var f=s;f<0&&(f=n.buffer.byteLength,h===We?f>>=1:h===Ze&&(f>>=2)),n.vertCount=f;var d=o;if(o<0){d=He;var p=n.buffer.dimension;1===p&&(d=Ue),2===p&&(d=Ve),3===p&&(d=He)}n.primType=d}function l(t){n.elementsCount--,de(null!==t.buffer,"must not double destroy elements"),delete c[t.id],t.buffer.destroy(),t.buffer=null}function u(t,e){function a(t){if(t)if("number"==typeof t)o(t),u.primType=He,u.vertCount=0|t,u.type=Ge;else{var e=null,r=Ke,n=-1,i=-1,l=0,c=0;Array.isArray(t)||Kt(t)||Z(t)?e=t:(de.type(t,"object","invalid arguments for elements"),"data"in t&&(e=t.data,de(Array.isArray(e)||Kt(e)||Z(e),"invalid data for element buffer")),"usage"in t&&(de.parameter(t.usage,De,"invalid element buffer usage"),r=De[t.usage]),"primitive"in t&&(de.parameter(t.primitive,Be,"invalid element buffer primitive"),n=Be[t.primitive]),"count"in t&&(de("number"==typeof t.count&&t.count>=0,"invalid vertex count for elements"),i=0|t.count),"type"in t&&(de.parameter(t.type,f,"invalid buffer type"),c=f[t.type]),"length"in t?l=0|t.length:(l=i,c===We||c===Ye?l*=2:c!==Ze&&c!==Xe||(l*=4))),s(u,e,r,n,i,l,c)}else o(),u.primType=He,u.vertCount=0,u.type=Ge;return a}var o=r.create(null,Je,!0),u=new i(o._buffer);return n.elementsCount++,a(t),a._reglType="elements",a._elements=u,a.subdata=function(t,e){return o.subdata(t,e),a},a.destroy=function(){l(u)},a}var c={},h=0,f={uint8:Ge,uint16:We};e.oes_element_index_uint&&(f.uint32=Ze),i.prototype.bind=function(){this.buffer.bind()};var d=[];return{create:u,createStream:a,destroyStream:o,getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){xe(c).forEach(l)}}}function pt(t){for(var e=Le.allocType(er,t.length),r=0;r>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)e[r]=i;else if(a<-14){var s=-14-a;e[r]=i+(o+1024>>s)}else e[r]=a>15?i+31744:i+(a+15<<10)+o}return e}function mt(t){return Array.isArray(t)||Kt(t)}function gt(t){return"[object "+t+"]"}function vt(t){return Array.isArray(t)&&(0===t.length||"number"==typeof t[0])}function yt(t){return!!Array.isArray(t)&&!(0===t.length||!mt(t[0]))}function bt(t){return Object.prototype.toString.call(t)}function xt(t){return bt(t)===dn}function _t(t){return bt(t)===pn}function wt(t){return bt(t)===mn}function Mt(t){return bt(t)===gn}function kt(t){if(!t)return!1;var e=bt(t);return vn.indexOf(e)>=0||(vt(t)||yt(t)||Z(t))}function At(t){return 0|Qt[Object.prototype.toString.call(t)]}function Tt(t,e){var r=e.length;switch(t.type){case Or:case jr:case Rr:case Fr:var n=Le.allocType(t.type,r);n.set(e),t.data=n;break;case wr:t.data=pt(e);break;default:de.raise("unsupported texture type, must specify a typed array")}}function St(t,e){return Le.allocType(t.type===wr?Fr:t.type,e)}function Et(t,e){t.type===wr?(t.data=pt(e),Le.freeType(e)):t.data=e}function Lt(t,e,r,n,i,a){for(var o=t.width,s=t.height,l=t.channels,u=o*s*l,c=St(t,u),h=0,f=0;f=1;)s+=o*l*l,l/=2;return s}return o*r*n}function zt(t,e,r,n,i,a,o){function s(){this.internalformat=or,this.format=or,this.type=Or,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=0,this.width=0,this.height=0,this.channels=0}function l(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function u(t,n){if("object"==typeof n&&n){if("premultiplyAlpha"in n&&(de.type(n.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),t.premultiplyAlpha=n.premultiplyAlpha),"flipY"in n&&(de.type(n.flipY,"boolean","invalid texture flip"),t.flipY=n.flipY),"alignment"in n&&(de.oneOf(n.alignment,[1,2,4,8],"invalid texture unpack alignment"),t.unpackAlignment=n.alignment),"colorSpace"in n&&(de.parameter(n.colorSpace,F,"invalid colorSpace"),t.colorSpace=F[n.colorSpace]),"type"in n){var i=n.type;de(e.oes_texture_float||!("float"===i||"float32"===i),"you must enable the OES_texture_float extension in order to use floating point textures."),de(e.oes_texture_half_float||!("half float"===i||"float16"===i),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),de(e.webgl_depth_texture||!("uint16"===i||"uint32"===i||"depth stencil"===i),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),de.parameter(i,N,"invalid texture type"),t.type=N[i]}var a=t.width,o=t.height,s=t.channels,l=!1;"shape"in n?(de(Array.isArray(n.shape)&&n.shape.length>=2,"shape must be an array"),a=n.shape[0],o=n.shape[1],3===n.shape.length&&(s=n.shape[2],de(s>0&&s<=4,"invalid number of channels"),l=!0),de(a>=0&&a<=r.maxTextureSize,"invalid width"),de(o>=0&&o<=r.maxTextureSize,"invalid height")):("radius"in n&&(a=o=n.radius,de(a>=0&&a<=r.maxTextureSize,"invalid radius")),"width"in n&&(a=n.width,de(a>=0&&a<=r.maxTextureSize,"invalid width")),"height"in n&&(o=n.height,de(o>=0&&o<=r.maxTextureSize,"invalid height")),"channels"in n&&(s=n.channels,de(s>0&&s<=4,"invalid number of channels"),l=!0)),t.width=0|a,t.height=0|o,t.channels=0|s;var u=!1;if("format"in n){var c=n.format;de(e.webgl_depth_texture||!("depth"===c||"depth stencil"===c),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),de.parameter(c,B,"invalid texture format");var h=t.internalformat=B[c];t.format=J[h],c in N&&("type"in n||(t.type=N[c])),c in U&&(t.compressed=!0),u=!0}!l&&u?t.channels=fn[t.format]:l&&!u?t.channels!==hn[t.format]&&(t.format=t.internalformat=hn[t.channels]):u&&l&&de(t.channels===fn[t.format],"number of channels inconsistent with specified format")}}function c(e){t.pixelStorei(an,e.flipY),t.pixelStorei(on,e.premultiplyAlpha),t.pixelStorei(sn,e.colorSpace),t.pixelStorei(nn,e.unpackAlignment)}function h(){s.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function f(t,e){var n=null;if(kt(e)?n=e:e&&(de.type(e,"object","invalid pixel data type"),u(t,e),"x"in e&&(t.xOffset=0|e.x),"y"in e&&(t.yOffset=0|e.y),kt(e.data)&&(n=e.data)),de(!t.compressed||n instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),e.copy){de(!n,"can not specify copy and data field for the same texture");var a=i.viewportWidth,o=i.viewportHeight;t.width=t.width||a-t.xOffset,t.height=t.height||o-t.yOffset,t.needsCopy=!0,de(t.xOffset>=0&&t.xOffset=0&&t.yOffset0&&t.width<=a&&t.height>0&&t.height<=o,"copy texture read out of bounds")}else if(n){if(Kt(n))t.channels=t.channels||4,t.data=n,"type"in e||t.type!==Or||(t.type=At(n));else if(vt(n))t.channels=t.channels||4,Tt(t,n),t.alignment=1,t.needsFree=!0;else if(Z(n)){var s=n.data;Array.isArray(s)||t.type!==Or||(t.type=At(s));var l,c,h,f,d,p,m=n.shape,g=n.stride;3===m.length?(h=m[2],p=g[2]):(de(2===m.length,"invalid ndarray pixel data, must be 2 or 3D"),h=1,p=1),l=m[0],c=m[1],f=g[0],d=g[1],t.alignment=1,t.width=l,t.height=c,t.channels=h,t.format=t.internalformat=hn[h],t.needsFree=!0,Lt(t,s,f,d,p,n.offset)}else if(xt(n)||_t(n))xt(n)?t.element=n:t.element=n.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(wt(n))t.element=n,t.width=n.naturalWidth,t.height=n.naturalHeight,t.channels=4;else if(Mt(n))t.element=n,t.width=n.videoWidth,t.height=n.videoHeight,t.channels=4;else if(yt(n)){var v=t.width||n[0].length,y=t.height||n.length,b=t.channels;b=mt(n[0][0])?b||n[0][0].length:b||1;for(var x=Ce.shape(n),_=1,w=0;w=0,"oes_texture_float extension not enabled"):t.type===wr&&de(r.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function d(e,r,i){var a=e.element,o=e.data,s=e.internalformat,l=e.format,u=e.type,h=e.width,f=e.height;c(e),a?t.texImage2D(r,i,l,l,u,a):e.compressed?t.compressedTexImage2D(r,i,s,h,f,0,o):e.needsCopy?(n(),t.copyTexImage2D(r,i,l,e.xOffset,e.yOffset,h,f,0)):t.texImage2D(r,i,l,h,f,0,l,u,o)}function p(e,r,i,a,o){var s=e.element,l=e.data,u=e.internalformat,h=e.format,f=e.type,d=e.width,p=e.height;c(e),s?t.texSubImage2D(r,o,i,a,h,f,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,u,d,p,l):e.needsCopy?(n(),t.copyTexSubImage2D(r,o,i,a,e.xOffset,e.yOffset,d,p)):t.texSubImage2D(r,o,i,a,d,p,h,f,l)}function m(){return Q.pop()||new h}function g(t){t.needsFree&&Le.freeType(t.data),h.call(t),Q.push(t)}function v(){s.call(this),this.genMipmaps=!1,this.mipmapHint=$r,this.mipmask=0,this.images=Array(16)}function y(t,e,r){var n=t.images[0]=m();t.mipmask=1,n.width=t.width=e,n.height=t.height=r,n.channels=t.channels=4}function b(t,e){var r=null;if(kt(e))r=t.images[0]=m(),l(r,t),f(r,e),t.mipmask=1;else if(u(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i>=i,r.height>>=i,f(r,n[i]),t.mipmask|=1<=0&&(t.genMipmaps=!0)}if("mag"in e){var i=e.mag;de.parameter(i,j),t.magFilter=j[i]}var a=t.wrapS,o=t.wrapT;if("wrap"in e){var s=e.wrap;"string"==typeof s?(de.parameter(s,O),a=o=O[s]):Array.isArray(s)&&(de.parameter(s[0],O),de.parameter(s[1],O),a=O[s[0]],o=O[s[1]])}else{if("wrapS"in e){var l=e.wrapS;de.parameter(l,O),a=O[l]}if("wrapT"in e){var u=e.wrapT;de.parameter(u,O),o=O[u]}}if(t.wrapS=a,t.wrapT=o,"anisotropic"in e){var c=e.anisotropic;de("number"==typeof c&&c>=1&&c<=r.maxAnisotropic,"aniso samples must be between 1 and "),t.anisotropic=e.anisotropic}if("mipmap"in e){var h=!1;switch(typeof e.mipmap){case"string":de.parameter(e.mipmap,P,"invalid mipmap hint"),t.mipmapHint=P[e.mipmap],t.genMipmaps=!0,h=!0;break;case"boolean":h=t.genMipmaps=e.mipmap;break;case"object":de(Array.isArray(e.mipmap),"invalid mipmap type"),t.genMipmaps=!1,h=!0;break;default:de.raise("invalid mipmap type")}!h||"min"in e||(t.minFilter=Xr)}}function A(r,n){t.texParameteri(n,Gr,r.minFilter),t.texParameteri(n,qr,r.magFilter),t.texParameteri(n,Nr,r.wrapS),t.texParameteri(n,Br,r.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(n,rn,r.anisotropic),r.genMipmaps&&(t.hint(Kr,r.mipmapHint),t.generateMipmap(n))}function T(e){s.call(this),this.mipmask=0,this.internalformat=or,this.id=$++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new M,o.profile&&(this.stats={size:0})}function S(e){t.activeTexture(un),t.bindTexture(e.target,e.texture)}function E(){var e=rt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(nr,null)}function L(e){var r=e.texture;de(r,"must not double destroy texture");var n=e.unit,i=e.target;n>=0&&(t.activeTexture(un+n),t.bindTexture(i,null),rt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete tt[e.id],a.textureCount--}function C(e,n){function i(t,e){var n=c.texInfo;M.call(n);var a=_();return"number"==typeof t?"number"==typeof e?y(a,0|t,0|e):y(a,0|t,0|t):t?(de.type(t,"object","invalid arguments to regl.texture"),k(n,t),b(a,t)):y(a,1,1),n.genMipmaps&&(a.mipmask=(a.width<<1)-1),c.mipmask=a.mipmask,l(c,a),de.texture2D(n,a,r),c.internalformat=a.internalformat,i.width=a.width,i.height=a.height,S(c),x(a,nr),A(n,nr),E(),w(a),o.profile&&(c.stats.size=Ct(c.internalformat,c.type,a.width,a.height,n.genMipmaps,!1)),i.format=q[c.internalformat],i.type=G[c.type],i.mag=Y[n.magFilter],i.min=W[n.minFilter],i.wrapS=X[n.wrapS],i.wrapT=X[n.wrapT],i}function s(t,e,r,n){de(!!t,"must specify image data");var a=0|e,o=0|r,s=0|n,u=m();return l(u,c),u.width=0,u.height=0,f(u,t),u.width=u.width||(c.width>>s)-a,u.height=u.height||(c.height>>s)-o,de(c.type===u.type&&c.format===u.format&&c.internalformat===u.internalformat,"incompatible format for texture.subimage"),de(a>=0&&o>=0&&a+u.width<=c.width&&o+u.height<=c.height,"texture.subimage write out of bounds"),de(c.mipmask&1<>s;++s)t.texImage2D(nr,s,c.format,n>>s,a>>s,0,c.format,c.type,null);return E(),o.profile&&(c.stats.size=Ct(c.internalformat,c.type,n,a,!1,!1)),i}var c=new T(nr);return tt[c.id]=c,a.textureCount++,i(e,n),i.subimage=s,i.resize=u,i._reglType="texture2d",i._texture=c,o.profile&&(i.stats=c.stats),i.destroy=function(){c.decRef()},i}function z(e,n,i,s,c,h){function d(t,e,n,i,a,s){var c,h=C.texInfo;for(M.call(h),c=0;c<6;++c)z[c]=_();if("number"!=typeof t&&t)if("object"==typeof t)if(e)b(z[0],t),b(z[1],e),b(z[2],n),b(z[3],i),b(z[4],a),b(z[5],s);else if(k(h,t),u(C,t),"faces"in t){var f=t.faces;for(de(Array.isArray(f)&&6===f.length,"cube faces must be a length 6 array"),c=0;c<6;++c)de("object"==typeof f[c]&&!!f[c],"invalid input for cube map face"),l(z[c],C),b(z[c],f[c])}else for(c=0;c<6;++c)b(z[c],t);else de.raise("invalid arguments to cube map");else{var p=0|t||1;for(c=0;c<6;++c)y(z[c],p,p)}for(l(C,z[0]),h.genMipmaps?C.mipmask=(z[0].width<<1)-1:C.mipmask=z[0].mipmask,de.textureCube(C,h,z,r),C.internalformat=z[0].internalformat,d.width=z[0].width,d.height=z[0].height,S(C),c=0;c<6;++c)x(z[c],ar+c);for(A(h,ir),E(),o.profile&&(C.stats.size=Ct(C.internalformat,C.type,d.width,d.height,h.genMipmaps,!0)),d.format=q[C.internalformat],d.type=G[C.type],d.mag=Y[h.magFilter],d.min=W[h.minFilter],d.wrapS=X[h.wrapS],d.wrapT=X[h.wrapT],c=0;c<6;++c)w(z[c]);return d}function v(t,e,r,n,i){de(!!e,"must specify image data"),de("number"==typeof t&&t===(0|t)&&t>=0&&t<6,"invalid face");var a=0|r,o=0|n,s=0|i,u=m();return l(u,C),u.width=0,u.height=0,f(u,e),u.width=u.width||(C.width>>s)-a,u.height=u.height||(C.height>>s)-o,de(C.type===u.type&&C.format===u.format&&C.internalformat===u.internalformat,"incompatible format for texture.subimage"),de(a>=0&&o>=0&&a+u.width<=C.width&&o+u.height<=C.height,"texture.subimage write out of bounds"),de(C.mipmask&1<>i;++i)t.texImage2D(ar+n,i,C.format,r>>i,r>>i,0,C.format,C.type,null);return E(),o.profile&&(C.stats.size=Ct(C.internalformat,C.type,d.width,d.height,!1,!0)),d}}var C=new T(ir);tt[C.id]=C,a.cubeCount++;var z=new Array(6);return d(e,n,i,s,c,h),d.subimage=v,d.resize=L,d._reglType="textureCube",d._texture=C,o.profile&&(d.stats=C.stats),d.destroy=function(){C.decRef()},d}function D(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)t.texImage2D(ar+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);A(e.texInfo,e.target)})}var P={"don't care":$r,"dont care":$r,nice:en,fast:tn},O={repeat:Ur,clamp:Vr,mirror:Hr},j={nearest:Yr,linear:Wr},R=$t({mipmap:Qr,"nearest mipmap nearest":Xr,"linear mipmap nearest":Zr,"nearest mipmap linear":Jr,"linear mipmap linear":Qr},j),F={none:0,browser:ln},N={uint8:Or,rgba4:pr,rgb565:gr,"rgb5 a1":mr},B={alpha:sr,luminance:ur,"luminance alpha":cr,rgb:lr,rgba:or,rgba4:hr,"rgb5 a1":fr,rgb565:dr},U={};e.ext_srgb&&(B.srgb=xr,B.srgba=_r),e.oes_texture_float&&(N.float32=N.float=Fr),e.oes_texture_half_float&&(N.float16=N["half float"]=wr),e.webgl_depth_texture&&($t(B,{depth:yr,"depth stencil":br}),$t(N,{uint16:jr,uint32:Rr,"depth stencil":vr})),e.webgl_compressed_texture_s3tc&&$t(U,{"rgb s3tc dxt1":Mr,"rgba s3tc dxt1":kr,"rgba s3tc dxt3":Ar,"rgba s3tc dxt5":Tr}),e.webgl_compressed_texture_atc&&$t(U,{"rgb atc":Sr,"rgba atc explicit alpha":Er,"rgba atc interpolated alpha":Lr}),e.webgl_compressed_texture_pvrtc&&$t(U,{"rgb pvrtc 4bppv1":Cr,"rgb pvrtc 2bppv1":zr,"rgba pvrtc 4bppv1":Dr,"rgba pvrtc 2bppv1":Ir}),e.webgl_compressed_texture_etc1&&(U["rgb etc1"]=Pr);var V=Array.prototype.slice.call(t.getParameter(rr));Object.keys(U).forEach(function(t){var e=U[t];V.indexOf(e)>=0&&(B[t]=e)});var H=Object.keys(B);r.textureFormats=H;var q=[];Object.keys(B).forEach(function(t){var e=B[t];q[e]=t});var G=[];Object.keys(N).forEach(function(t){var e=N[t];G[e]=t});var Y=[];Object.keys(j).forEach(function(t){var e=j[t];Y[e]=t});var W=[];Object.keys(R).forEach(function(t){var e=R[t];W[e]=t});var X=[];Object.keys(O).forEach(function(t){var e=O[t];X[e]=t});var J=H.reduce(function(t,e){var r=B[e];return r===ur||r===sr||r===ur||r===cr||r===yr||r===br?t[r]=r:r===fr||e.indexOf("rgba")>=0?t[r]=or:t[r]=lr,t},{}),Q=[],K=[],$=0,tt={},et=r.maxTextureUnits,rt=Array(et).map(function(){return null});return $t(T.prototype,{bind:function(){var e=this;e.bindCount+=1;var r=e.unit;if(r<0){for(var n=0;n0)continue;i.unit=-1}rt[n]=e,r=n;break}r>=et&&de.raise("insufficient number of texture units"),o.profile&&a.maxTextureUnits=Sn&&e=2,"invalid shape for framebuffer"),u=D[0],d=D[1]}else"radius"in z&&(u=d=z.radius),"width"in z&&(u=z.width),"height"in z&&(d=z.height);("color"in z||"colors"in z)&&(y=z.color||z.colors,Array.isArray(y)&&de(1===y.length||o,"multiple render targets not supported")),y||("colorCount"in z&&(T=0|z.colorCount,de(T>0,"invalid color buffer count")),"colorTexture"in z&&(b=!!z.colorTexture,x="rgba4"),"colorType"in z&&(A=z.colorType,b?(de(e.oes_texture_float||!("float"===A||"float32"===A),"you must enable OES_texture_float in order to use floating point framebuffer objects"),de(e.oes_texture_half_float||!("half float"===A||"float16"===A),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):"half float"===A||"float16"===A?(de(e.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),x="rgba16f"):"float"!==A&&"float32"!==A||(de(e.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),x="rgba32f"),de.oneOf(A,k,"invalid color type")),"colorFormat"in z&&(x=z.colorFormat,w.indexOf(x)>=0?b=!0:M.indexOf(x)>=0?b=!1:b?de.oneOf(z.colorFormat,w,"invalid color format for texture"):de.oneOf(z.colorFormat,M,"invalid color format for renderbuffer"))),("depthTexture"in z||"depthStencilTexture"in z)&&(C=!(!z.depthTexture&&!z.depthStencilTexture),de(!C||e.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in z&&("boolean"==typeof z.depth?p=z.depth:(S=z.depth,g=!1)),"stencil"in z&&("boolean"==typeof z.stencil?g=z.stencil:(E=z.stencil,p=!1)),"depthStencil"in z&&("boolean"==typeof z.depthStencil?p=g=z.depthStencil:(L=z.depthStencil,p=!1,g=!1))}else u=d=1;var I=null,P=null,O=null,j=null;if(Array.isArray(y))I=y.map(c);else if(y)I=[c(y)];else for(I=new Array(T),a=0;a=0||I[a].renderbuffer&&Bn.indexOf(I[a].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+a+" is invalid"),I[a]&&I[a].texture){var F=On[I[a].texture._texture.format]*jn[I[a].texture._texture.type];null===R?R=F:de(R===F,"all color attachments much have the same number of bits per pixel.")}return l(P,u,d),de(!P||P.texture&&P.texture._texture.format===In||P.renderbuffer&&P.renderbuffer._renderbuffer.format===Rn,"invalid depth attachment for framebuffer object"),l(O,u,d),de(!O||O.renderbuffer&&O.renderbuffer._renderbuffer.format===Fn,"invalid stencil attachment for framebuffer object"),l(j,u,d),de(!j||j.texture&&j.texture._texture.format===Nn||j.renderbuffer&&j.renderbuffer._renderbuffer.format===Nn,"invalid depth-stencil attachment for framebuffer object"),m(s),s.width=u,s.height=d,s.colorAttachments=I,s.depthAttachment=P,s.stencilAttachment=O,s.depthStencilAttachment=j,i.color=I.map(f),i.depth=f(P),i.stencil=f(O),i.depthStencil=f(j),i.width=s.width,i.height=s.height,v(s),i}function o(t,e){de(_.next!==s,"can not resize a framebuffer which is currently in use");var r=0|t,n=0|e||r;if(r===s.width&&n===s.height)return i;for(var a=s.colorAttachments,o=0;o=2,"invalid shape for framebuffer"),de(p[0]===p[1],"cube framebuffer must be square"),l=p[0]}else"radius"in d&&(l=0|d.radius),"width"in d?(l=0|d.width,"height"in d&&de(d.height===l,"must be square")):"height"in d&&(l=0|d.height);("color"in d||"colors"in d)&&(u=d.color||d.colors,Array.isArray(u)&&de(1===u.length||a,"multiple render targets not supported")),u||("colorCount"in d&&(f=0|d.colorCount,de(f>0,"invalid color buffer count")),"colorType"in d&&(de.oneOf(d.colorType,k,"invalid color type"),h=d.colorType),"colorFormat"in d&&(c=d.colorFormat,de.oneOf(d.colorFormat,w,"invalid color format for texture"))),"depth"in d&&(s.depth=d.depth),"stencil"in d&&(s.stencil=d.stencil),"depthStencil"in d&&(s.depthStencil=d.depthStencil)}else l=1;var m;if(u)if(Array.isArray(u))for(m=[],r=0;r0&&(s.depth=o[0].depth,s.stencil=o[0].stencil,s.depthStencil=o[0].depthStencil),o[r]?o[r](s):o[r]=y(s)}return $t(i,{width:l,height:l,color:m})}function a(t){var e,n=0|t;if(de(n>0&&n<=r.maxCubeMapSize,"invalid radius for cube fbo"),n===i.width)return i;var a=i.color;for(e=0;e1)for(var m=0;mt&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return d.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);xe(c).forEach(e),c={},xe(h).forEach(e),h={},d.forEach(function(e){t.deleteProgram(e.program)}),d.length=0,f={},r.shaderCount=0},program:function(t,e,n){de.command(t>=0,"missing vertex shader",n),de.command(e>=0,"missing fragment shader",n);var i=f[e];i||(i=f[e]={});var a=i[t];return a||(a=new s(e,t),r.shaderCount++,l(a,n),i[t]=a,d.push(a)),a},restore:u,shader:o,frag:-1,vert:-1}}function Rt(t,e,r,n,i,a){function o(o){var s;null===e.next?(de(i.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),s=Xn):(de(null!==e.next.colorAttachments[0].texture,"You cannot read from a renderbuffer"),s=e.next.colorAttachments[0].texture._texture.type,a.oes_texture_float?de(s===Xn||s===Jn,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"):de(s===Xn,"Reading from a framebuffer is only allowed for the type 'uint8'"));var l=0,u=0,c=n.framebufferWidth,h=n.framebufferHeight,f=null;Kt(o)?f=o:o&&(de.type(o,"object","invalid arguments to regl.read()"),l=0|o.x,u=0|o.y,de(l>=0&&l=0&&u0&&c+l<=n.framebufferWidth,"invalid width for read pixels"),de(h>0&&h+u<=n.framebufferHeight,"invalid height for read pixels"),r();var d=c*h*4;return f||(s===Xn?f=new Uint8Array(d):s===Jn&&(f=f||new Float32Array(d))),de.isTypedArray(f,"data buffer for regl.read() must be a typedarray"),de(f.byteLength>=d,"data buffer for regl.read() too small"),t.pixelStorei(Zn,4),t.readPixels(l,u,c,h,Wn,s,f),f}function s(t){var r;return e.setFBO({framebuffer:t.framebuffer},function(){r=o(t)}),r}function l(t){return t&&"framebuffer"in t?s(t):o(t)}return l}function Ft(t){return Array.prototype.slice.call(t)}function Nt(t){return Ft(t).join("")}function Bt(){function t(t){for(var e=0;e0&&(r.push(t,"="),r.push.apply(r,Ft(arguments)),r.push(";")),t}var r=[],n=[];return $t(t,{def:e,toString:function(){return Nt([n.length>0?"var "+n+";":"",Nt(r)])}})}function r(){function t(t,e){n(t,e,"=",r.def(t,e),";")}var r=e(),n=e(),i=r.toString,a=n.toString;return $t(function(){r.apply(r,Ft(arguments))},{def:r.def,entry:r,exit:n,save:t,set:function(e,n,i){t(e,n),r(e,n,"=",i,";")},toString:function(){return i()+a()}})}function n(){var t=Nt(arguments),e=r(),n=r(),i=e.toString,a=n.toString;return $t(e,{then:function(){return e.apply(e,Ft(arguments)),this},else:function(){return n.apply(n,Ft(arguments)),this},toString:function(){var e=a();return e&&(e="else{"+e+"}"),Nt(["if(",t,"){",i(),"}",e])}})}function i(t,e){function n(){var t="a"+i.length;return i.push(t),t}var i=[];e=e||0;for(var a=0;a=1,n>=2,e)}if(r===ai){var i=t.data;return new Ht(i.thisDep,i.contextDep,i.propDep,e)}return new Ht(r===ii,r===ni,r===ri,e)}function Wt(t,e,r,n,i,a,o,s,l,u,c,h,f,d,p){function m(t){return t.replace(".","_")}function g(t,e,r){var n=m(t);et.push(t),tt[n]=$[n]=!!r,rt[n]=e}function v(t,e,r){var n=m(t);et.push(t),Array.isArray(r)?($[n]=r.slice(),tt[n]=r.slice()):$[n]=tt[n]=r,nt[n]=e}function y(){var t=Bt(),r=t.link,n=t.global;t.id=ot++,t.batchId="0";var i=r(it),a=t.shared={props:"a0"};Object.keys(it).forEach(function(t){a[t]=n.def(i,".",t)}),de.optional(function(){t.CHECK=r(de),t.commandStr=de.guessCommand(),t.command=r(t.commandStr),t.assert=function(t,e,n){t("if(!(",e,"))",this.CHECK,".commandRaise(",r(n),",",this.command,");")},at.invalidBlendCombinations=Ua});var o=t.next={},s=t.current={};Object.keys(nt).forEach(function(t){Array.isArray($[t])&&(o[t]=n.def(a.next,".",t),s[t]=n.def(a.current,".",t))});var l=t.constants={};Object.keys(at).forEach(function(t){l[t]=n.def(JSON.stringify(at[t]))}),t.invoke=function(e,n){switch(n.type){case ei:var i=["this",a.context,a.props,t.batchId];return e.def(r(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case ri:return e.def(a.props,n.data);case ni:return e.def(a.context,n.data);case ii:return e.def("this",n.data);case ai:return n.data.append(t,e),n.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){var n=e.id(t);if(n in c)return c[n];var i=u.scope[n];return i||(i=u.scope[n]=new X),c[n]=r(i)},t}function b(t){var e,r=t.static,n=t.dynamic;if(Ii in r){var i=!!r[Ii];e=Gt(function(t,e){return i}),e.enable=i}else if(Ii in n){var a=n[Ii];e=Yt(a,function(t,e){return t.invoke(e,a)})}return e}function x(t,e){var r=t.static,n=t.dynamic;if(Pi in r){var i=r[Pi];return i?(i=s.getFramebuffer(i),de.command(i,"invalid framebuffer object"),Gt(function(t,e){var r=t.link(i),n=t.shared;e.set(n.framebuffer,".next",r);var a=n.context;return e.set(a,"."+Vi,r+".width"),e.set(a,"."+Hi,r+".height"),r})):Gt(function(t,e){var r=t.shared;e.set(r.framebuffer,".next","null");var n=r.context;return e.set(n,"."+Vi,n+"."+Yi),e.set(n,"."+Hi,n+"."+Wi),"null"})}if(Pi in n){var a=n[Pi];return Yt(a,function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer,o=e.def(i,".getFramebuffer(",r,")");de.optional(function(){t.assert(e,"!"+r+"||"+o,"invalid framebuffer object")}),e.set(i,".next",o);var s=n.context;return e.set(s,"."+Vi,o+"?"+o+".width:"+s+"."+Yi),e.set(s,"."+Hi,o+"?"+o+".height:"+s+"."+Wi),o})}return null}function _(t,e,r){function n(t){if(t in i){var n=i[t];de.commandType(n,"object","invalid "+t,r.commandStr);var o,s,l=!0,u=0|n.x,c=0|n.y;return"width"in n?(o=0|n.width,de.command(o>=0,"invalid "+t,r.commandStr)):l=!1,"height"in n?(s=0|n.height,de.command(s>=0,"invalid "+t,r.commandStr)):l=!1,new Ht(!l&&e&&e.thisDep,!l&&e&&e.contextDep,!l&&e&&e.propDep,function(t,e){var r=t.shared.context,i=o;"width"in n||(i=e.def(r,".",Vi,"-",u));var a=s;return"height"in n||(a=e.def(r,".",Hi,"-",c)),[u,c,i,a]})}if(t in a){var h=a[t],f=Yt(h,function(e,r){var n=e.invoke(r,h);de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)});var i=e.shared.context,a=r.def(n,".x|0"),o=r.def(n,".y|0"),s=r.def('"width" in ',n,"?",n,".width|0:","(",i,".",Vi,"-",a,")"),l=r.def('"height" in ',n,"?",n,".height|0:","(",i,".",Hi,"-",o,")");return de.optional(function(){e.assert(r,s+">=0&&"+l+">=0","invalid "+t)}),[a,o,s,l]});return e&&(f.thisDep=f.thisDep||e.thisDep,f.contextDep=f.contextDep||e.contextDep,f.propDep=f.propDep||e.propDep),f}return e?new Ht(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,".",Vi),e.def(r,".",Hi)]}):null}var i=t.static,a=t.dynamic,o=n(Di);if(o){var s=o;o=new Ht(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=s.append(t,e),n=t.shared.context;return e.set(n,"."+qi,r[2]),e.set(n,"."+Gi,r[3]),r})}return{viewport:o,scissor_box:n(zi)}}function w(t){function r(t){if(t in i){var r=e.id(i[t]);de.optional(function(){c.shader(qa[t],r,de.guessCommand())});var n=Gt(function(){return r});return n.id=r,n}if(t in a){var o=a[t];return Yt(o,function(e,r){var n=e.invoke(r,o),i=r.def(e.shared.strings,".id(",n,")");return de.optional(function(){r(e.shared.shader,".shader(",qa[t],",",i,",",e.command,");")}),i})}return null}var n,i=t.static,a=t.dynamic,o=r(ji),s=r(Oi),l=null;return qt(o)&&qt(s)?(l=c.program(s.id,o.id),n=Gt(function(t,e){return t.link(l)})):n=new Ht(o&&o.thisDep||s&&s.thisDep,o&&o.contextDep||s&&s.contextDep,o&&o.propDep||s&&s.propDep,function(t,e){var r,n=t.shared.shader;r=o?o.append(t,e):e.def(n,".",ji);var i;i=s?s.append(t,e):e.def(n,".",Oi);var a=n+".program("+i+","+r;return de.optional(function(){a+=","+t.command}),e.def(a+")")}),{frag:o,vert:s,progVar:n,program:l}}function M(t,e){function r(t,r){if(t in n){var a=0|n[t];return de.command(!r||a>=0,"invalid "+t,e.commandStr),Gt(function(t,e){return r&&(t.OFFSET=a),a})}if(t in i){var s=i[t];return Yt(s,function(e,n){var i=e.invoke(n,s);return r&&(e.OFFSET=i,de.optional(function(){e.assert(n,i+">=0","invalid "+t)})),i})}return r&&o?Gt(function(t,e){return t.OFFSET="0",0}):null}var n=t.static,i=t.dynamic,o=function(){if(Ri in n){var t=n[Ri];Ut(t)?t=a.getElements(a.create(t,!0)):t&&(t=a.getElements(t),de.command(t,"invalid elements",e.commandStr));var r=Gt(function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n,n}return e.ELEMENTS=null,null});return r.value=t,r}if(Ri in i){var o=i[Ri];return Yt(o,function(t,e){var r=t.shared,n=r.isBufferArgs,i=r.elements,a=t.invoke(e,o),s=e.def("null"),l=e.def(n,"(",a,")"),u=t.cond(l).then(s,"=",i,".createStream(",a,");").else(s,"=",i,".getElements(",a,");");return de.optional(function(){t.assert(u.else,"!"+a+"||"+s,"invalid elements")}),e.entry(u),e.exit(t.cond(l).then(i,".destroyStream(",s,");")),t.ELEMENTS=s,s})}return null}(),s=r(Bi,!0);return{elements:o,primitive:function(){if(Fi in n){var t=n[Fi];return de.commandParameter(t,Be,"invalid primitve",e.commandStr),Gt(function(e,r){return Be[t]})}if(Fi in i){var r=i[Fi];return Yt(r,function(t,e){var n=t.constants.primTypes,i=t.invoke(e,r);return de.optional(function(){t.assert(e,i+" in "+n,"invalid primitive, must be one of "+Object.keys(Be))}),e.def(n,"[",i,"]")})}return o?qt(o)?Gt(o.value?function(t,e){return e.def(t.ELEMENTS,".primType")}:function(){return Aa}):new Ht(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=t.ELEMENTS;return e.def(r,"?",r,".primType:",Aa)}):null}(),count:function(){if(Ni in n){var t=0|n[Ni];return de.command("number"==typeof t&&t>=0,"invalid vertex count",e.commandStr),Gt(function(){return t})}if(Ni in i){var r=i[Ni];return Yt(r,function(t,e){var n=t.invoke(e,r);return de.optional(function(){t.assert(e,"typeof "+n+'==="number"&&'+n+">=0&&"+n+"===("+n+"|0)","invalid vertex count")}),n})}if(o){if(qt(o)){if(o)return s?new Ht(s.thisDep,s.contextDep,s.propDep,function(t,e){var r=e.def(t.ELEMENTS,".vertCount-",t.OFFSET);return de.optional(function(){t.assert(e,r+">=0","invalid vertex offset/element buffer too small")}),r}):Gt(function(t,e){return e.def(t.ELEMENTS,".vertCount")});var a=Gt(function(){return-1});return de.optional(function(){a.MISSING=!0}),a}var l=new Ht(o.thisDep||s.thisDep,o.contextDep||s.contextDep,o.propDep||s.propDep,function(t,e){var r=t.ELEMENTS;return t.OFFSET?e.def(r,"?",r,".vertCount-",t.OFFSET,":-1"):e.def(r,"?",r,".vertCount:-1")});return de.optional(function(){l.DYNAMIC=!0}),l}return null}(),instances:r(Ui,!1),offset:s}}function k(t,e){var r=t.static,i=t.dynamic,a={};return et.forEach(function(t){function o(e,n){if(t in r){var o=e(r[t]);a[s]=Gt(function(){return o})}else if(t in i){var l=i[t];a[s]=Yt(l,function(t,e){return n(t,e,t.invoke(e,l))})}}var s=m(t);switch(t){case gi:case si:case oi:case Ai:case hi:case Ci:case xi:case wi:case Mi:case pi:return o(function(r){return de.commandType(r,"boolean",t,e.commandStr),r},function(e,r,n){return de.optional(function(){e.assert(r,"typeof "+n+'==="boolean"',"invalid flag "+t,e.commandStr)}),n});case fi:return o(function(r){return de.commandParameter(r,Va,"invalid "+t,e.commandStr),Va[r]},function(e,r,n){var i=e.constants.compareFuncs;return de.optional(function(){e.assert(r,n+" in "+i,"invalid "+t+", must be one of "+Object.keys(Va))}),r.def(i,"[",n,"]")});case di:return o(function(t){return de.command(mt(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]&&t[0]<=t[1],"depth range is 2d array",e.commandStr),t},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===2&&typeof "+r+'[0]==="number"&&typeof '+r+'[1]==="number"&&'+r+"[0]<="+r+"[1]","depth range must be a 2d array")}),[e.def("+",r,"[0]"),e.def("+",r,"[1]")]});case ci:return o(function(t){de.commandType(t,"object","blend.func",e.commandStr);var r="srcRGB"in t?t.srcRGB:t.src,n="srcAlpha"in t?t.srcAlpha:t.src,i="dstRGB"in t?t.dstRGB:t.dst,a="dstAlpha"in t?t.dstAlpha:t.dst;return de.commandParameter(r,Ba,s+".srcRGB",e.commandStr),de.commandParameter(n,Ba,s+".srcAlpha",e.commandStr),de.commandParameter(i,Ba,s+".dstRGB",e.commandStr),de.commandParameter(a,Ba,s+".dstAlpha",e.commandStr),de.command(Ua.indexOf(r+", "+i)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+r+", "+i+")",e.commandStr),[Ba[r],Ba[i],Ba[n],Ba[a]]},function(e,r,n){function i(i,o){var s=r.def('"',i,o,'" in ',n,"?",n,".",i,o,":",n,".",i);return de.optional(function(){e.assert(r,s+" in "+a,"invalid "+t+"."+i+o+", must be one of "+Object.keys(Ba))}),s}var a=e.constants.blendFuncs;de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid blend func, must be an object")});var o=i("src","RGB"),s=i("dst","RGB");de.optional(function(){var t=e.constants.invalidBlendCombinations;e.assert(r,t+".indexOf("+o+'+", "+'+s+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var l=r.def(a,"[",o,"]"),u=r.def(a,"[",i("src","Alpha"),"]");return[l,r.def(a,"[",s,"]"),u,r.def(a,"[",i("dst","Alpha"),"]")]});case ui:return o(function(r){return"string"==typeof r?(de.commandParameter(r,Z,"invalid "+t,e.commandStr),[Z[r],Z[r]]):"object"==typeof r?(de.commandParameter(r.rgb,Z,t+".rgb",e.commandStr),de.commandParameter(r.alpha,Z,t+".alpha",e.commandStr),[Z[r.rgb],Z[r.alpha]]):void de.commandRaise("invalid blend.equation",e.commandStr)},function(e,r,n){var i=e.constants.blendEquations,a=r.def(),o=r.def(),s=e.cond("typeof ",n,'==="string"');return de.optional(function(){function r(t,r,n){e.assert(t,n+" in "+i,"invalid "+r+", must be one of "+Object.keys(Z))}r(s.then,t,n),e.assert(s.else,n+"&&typeof "+n+'==="object"',"invalid "+t),r(s.else,t+".rgb",n+".rgb"),r(s.else,t+".alpha",n+".alpha")}),s.then(a,"=",o,"=",i,"[",n,"];"),s.else(a,"=",i,"[",n,".rgb];",o,"=",i,"[",n,".alpha];"),r(s),[a,o]});case li:return o(function(t){return de.command(mt(t)&&4===t.length,"blend.color must be a 4d array",e.commandStr),J(4,function(e){return+t[e]})},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===4","blend.color must be a 4d array")}),J(4,function(t){return e.def("+",r,"[",t,"]")})});case Ti:return o(function(t){return de.commandType(t,"number",s,e.commandStr),0|t},function(t,e,r){return de.optional(function(){t.assert(e,"typeof "+r+'==="number"',"invalid stencil.mask")}),e.def(r,"|0")});case Si:return o(function(r){de.commandType(r,"object",s,e.commandStr);var n=r.cmp||"keep",i=r.ref||0,a="mask"in r?r.mask:-1;return de.commandParameter(n,Va,t+".cmp",e.commandStr),de.commandType(i,"number",t+".ref",e.commandStr),de.commandType(a,"number",t+".mask",e.commandStr),[Va[n],i,a]},function(t,e,r){var n=t.constants.compareFuncs;return de.optional(function(){function i(){t.assert(e,Array.prototype.join.call(arguments,""),"invalid stencil.func")}i(r+"&&typeof ",r,'==="object"'),i('!("cmp" in ',r,")||(",r,".cmp in ",n,")")}),[e.def('"cmp" in ',r,"?",n,"[",r,".cmp]",":",Ia),e.def(r,".ref|0"),e.def('"mask" in ',r,"?",r,".mask|0:-1")]});case Ei:case Li:return o(function(r){de.commandType(r,"object",s,e.commandStr);var n=r.fail||"keep",i=r.zfail||"keep",a=r.zpass||"keep";return de.commandParameter(n,Ha,t+".fail",e.commandStr),de.commandParameter(i,Ha,t+".zfail",e.commandStr),de.commandParameter(a,Ha,t+".zpass",e.commandStr),[t===Li?Sa:Ta,Ha[n],Ha[i],Ha[a]]},function(e,r,n){function i(i){return de.optional(function(){e.assert(r,'!("'+i+'" in '+n+")||("+n+"."+i+" in "+a+")","invalid "+t+"."+i+", must be one of "+Object.keys(Ha))}),r.def('"',i,'" in ',n,"?",a,"[",n,".",i,"]:",Ia)}var a=e.constants.stencilOps;return de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)}),[t===Li?Sa:Ta,i("fail"),i("zfail"),i("zpass")]});case _i:return o(function(t){de.commandType(t,"object",s,e.commandStr);var r=0|t.factor,n=0|t.units;return de.commandType(r,"number",s+".factor",e.commandStr),de.commandType(n,"number",s+".units",e.commandStr),[r,n]},function(e,r,n){return de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)}),[r.def(n,".factor|0"),r.def(n,".units|0")]});case vi:return o(function(t){var r=0;return"front"===t?r=Ta:"back"===t&&(r=Sa),de.command(!!r,s,e.commandStr),r},function(t,e,r){return de.optional(function(){t.assert(e,r+'==="front"||'+r+'==="back"',"invalid cull.face")}),e.def(r,'==="front"?',Ta,":",Sa)});case bi:return o(function(t){return de.command("number"==typeof t&&t>=n.lineWidthDims[0]&&t<=n.lineWidthDims[1],"invalid line width, must positive number between "+n.lineWidthDims[0]+" and "+n.lineWidthDims[1],e.commandStr),t},function(t,e,r){return de.optional(function(){t.assert(e,"typeof "+r+'==="number"&&'+r+">="+n.lineWidthDims[0]+"&&"+r+"<="+n.lineWidthDims[1],"invalid line width")}),r});case yi:return o(function(t){return de.commandParameter(t,Ga,s,e.commandStr),Ga[t]},function(t,e,r){return de.optional(function(){t.assert(e,r+'==="cw"||'+r+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),e.def(r+'==="cw"?'+Ea+":"+La)});case mi:return o(function(t){return de.command(mt(t)&&4===t.length,"color.mask must be length 4 array",e.commandStr),t.map(function(t){return!!t})},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===4","invalid color.mask")}),J(4,function(t){return"!!"+r+"["+t+"]"})});case ki:return o(function(t){de.command("object"==typeof t&&t,s,e.commandStr);var r="value"in t?t.value:1,n=!!t.invert;return de.command("number"==typeof r&&r>=0&&r<=1,"sample.coverage.value must be a number between 0 and 1",e.commandStr),[r,n]},function(t,e,r){return de.optional(function(){t.assert(e,r+"&&typeof "+r+'==="object"',"invalid sample.coverage")}),[e.def('"value" in ',r,"?+",r,".value:1"),e.def("!!",r,".invert")]})}}),a}function A(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach(function(t){var n,a=r[t];if("number"==typeof a||"boolean"==typeof a)n=Gt(function(){return a});else if("function"==typeof a){var o=a._reglType;"texture2d"===o||"textureCube"===o?n=Gt(function(t){return t.link(a)}):"framebuffer"===o||"framebufferCube"===o?(de.command(a.color.length>0,'missing color attachment for framebuffer sent to uniform "'+t+'"',e.commandStr),n=Gt(function(t){return t.link(a.color[0])})):de.commandRaise('invalid data for uniform "'+t+'"',e.commandStr)}else mt(a)?n=Gt(function(e){return e.global.def("[",J(a.length,function(r){return de.command("number"==typeof a[r]||"boolean"==typeof a[r],"invalid uniform "+t,e.commandStr),a[r]}),"]")}):de.commandRaise('invalid or missing data for uniform "'+t+'"',e.commandStr);n.value=a,i[t]=n}),Object.keys(n).forEach(function(t){var e=n[t];i[t]=Yt(e,function(t,r){return t.invoke(r,e)})}),i}function T(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach(function(t){var a=n[t],s=e.id(t),l=new X;if(Ut(a))l.state=$n,l.buffer=i.getBuffer(i.create(a,Zi,!1,!0)),l.type=0;else{var u=i.getBuffer(a);if(u)l.state=$n,l.buffer=u,l.type=0;else if(de.command("object"==typeof a&&a,"invalid data for attribute "+t,r.commandStr),a.constant){var c=a.constant;l.buffer="null",l.state=ti,"number"==typeof c?l.x=c:(de.command(mt(c)&&c.length>0&&c.length<=4,"invalid constant for attribute "+t,r.commandStr),Qn.forEach(function(t,e){e=0,'invalid offset for attribute "'+t+'"',r.commandStr);var f=0|a.stride;de.command(f>=0&&f<256,'invalid stride for attribute "'+t+'", must be integer betweeen [0, 255]',r.commandStr);var d=0|a.size;de.command(!("size"in a)||d>0&&d<=4,'invalid size for attribute "'+t+'", must be 1,2,3,4',r.commandStr);var p=!!a.normalized,m=0;"type"in a&&(de.commandParameter(a.type,ze,"invalid type for attribute "+t,r.commandStr),m=ze[a.type]);var g=0|a.divisor;"divisor"in a&&(de.command(0===g||Q,'cannot specify divisor for attribute "'+t+'", instancing not supported',r.commandStr),de.command(g>=0,'invalid divisor for attribute "'+t+'"',r.commandStr)),de.optional(function(){var e=r.commandStr,n=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(a).forEach(function(r){de.command(n.indexOf(r)>=0,'unknown parameter "'+r+'" for attribute pointer "'+t+'" (valid parameters are '+n+")",e)})}),l.buffer=u,l.state=$n,l.size=d,l.normalized=p,l.type=m||u.dtype,l.offset=h,l.stride=f,l.divisor=g}}o[t]=Gt(function(t,e){var r=t.attribCache;if(s in r)return r[s];var n={isStream:!1};return Object.keys(l).forEach(function(t){n[t]=l[t]}),l.buffer&&(n.buffer=t.link(l.buffer),n.type=n.type||n.buffer+".dtype"),r[s]=n,n})}), -Object.keys(a).forEach(function(t){function e(e,n){function i(t){n(u[t],"=",a,".",t,"|0;")}var a=e.invoke(n,r),o=e.shared,s=o.isBufferArgs,l=o.buffer;de.optional(function(){e.assert(n,a+"&&(typeof "+a+'==="object"||typeof '+a+'==="function")&&('+s+"("+a+")||"+l+".getBuffer("+a+")||"+l+".getBuffer("+a+".buffer)||"+s+"("+a+'.buffer)||("constant" in '+a+"&&(typeof "+a+'.constant==="number"||'+o.isArrayLike+"("+a+".constant))))",'invalid dynamic attribute "'+t+'"')});var u={isStream:n.def(!1)},c=new X;c.state=$n,Object.keys(c).forEach(function(t){u[t]=n.def(""+c[t])});var h=u.buffer,f=u.type;return n("if(",s,"(",a,")){",u.isStream,"=true;",h,"=",l,".createStream(",Zi,",",a,");",f,"=",h,".dtype;","}else{",h,"=",l,".getBuffer(",a,");","if(",h,"){",f,"=",h,".dtype;",'}else if("constant" in ',a,"){",u.state,"=",ti,";","if(typeof "+a+'.constant === "number"){',u[Qn[0]],"=",a,".constant;",Qn.slice(1).map(function(t){return u[t]}).join("="),"=0;","}else{",Qn.map(function(t,e){return u[t]+"="+a+".constant.length>="+e+"?"+a+".constant["+e+"]:0;"}).join(""),"}}else{","if(",s,"(",a,".buffer)){",h,"=",l,".createStream(",Zi,",",a,".buffer);","}else{",h,"=",l,".getBuffer(",a,".buffer);","}",f,'="type" in ',a,"?",o.glTypes,"[",a,".type]:",h,".dtype;",u.normalized,"=!!",a,".normalized;"),i("size"),i("offset"),i("stride"),i("divisor"),n("}}"),n.exit("if(",u.isStream,"){",l,".destroyStream(",h,");","}"),u}var r=a[t];o[t]=Yt(r,e)}),o}function S(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=Gt(function(t,e){return"number"==typeof r||"boolean"==typeof r?""+r:t.link(r)})}),Object.keys(r).forEach(function(t){var e=r[t];n[t]=Yt(e,function(t,r){return t.invoke(r,e)})}),n}function E(t,e,r,n,i){function a(t){var e=u[t];e&&(h[t]=e)}var o=t.static,s=t.dynamic;de.optional(function(){function t(t){Object.keys(t).forEach(function(t){de.command(e.indexOf(t)>=0,'unknown parameter "'+t+'"',i.commandStr)})}var e=[Pi,Oi,ji,Ri,Fi,Bi,Ni,Ui,Ii].concat(et);t(o),t(s)});var l=x(t,i),u=_(t,l,i),c=M(t,i),h=k(t,i),f=w(t,i);a(Di),a(m(zi));var d=Object.keys(h).length>0,p={framebuffer:l,draw:c,shader:f,state:h,dirty:d};return p.profile=b(t,i),p.uniforms=A(r,i),p.attributes=T(e,i),p.context=S(n,i),p}function L(t,e,r){var n=t.shared,i=n.context,a=t.scope();Object.keys(r).forEach(function(n){e.save(i,"."+n);var o=r[n];a(i,".",n,"=",o.append(t,e),";")}),e(a)}function C(t,e,r,n){var i,a=t.shared,o=a.gl,s=a.framebuffer;K&&(i=e.def(a.extensions,".webgl_draw_buffers"));var l,u=t.constants,c=u.drawBuffer,h=u.backBuffer;l=r?r.append(t,e):e.def(s,".next"),n||e("if(",l,"!==",s,".cur){"),e("if(",l,"){",o,".bindFramebuffer(",Fa,",",l,".framebuffer);"),K&&e(i,".drawBuffersWEBGL(",c,"[",l,".colorAttachments.length]);"),e("}else{",o,".bindFramebuffer(",Fa,",null);"),K&&e(i,".drawBuffersWEBGL(",h,");"),e("}",s,".cur=",l,";"),n||e("}")}function z(t,e,r){var n=t.shared,i=n.gl,a=t.current,o=t.next,s=n.current,l=n.next,u=t.cond(s,".dirty");et.forEach(function(e){var n=m(e);if(!(n in r.state)){var c,h;if(n in o){c=o[n],h=a[n];var f=J($[n].length,function(t){return u.def(c,"[",t,"]")});u(t.cond(f.map(function(t,e){return t+"!=="+h+"["+e+"]"}).join("||")).then(i,".",nt[n],"(",f,");",f.map(function(t,e){return h+"["+e+"]="+t}).join(";"),";"))}else{c=u.def(l,".",n);var d=t.cond(c,"!==",s,".",n);u(d),n in rt?d(t.cond(c).then(i,".enable(",rt[n],");").else(i,".disable(",rt[n],");"),s,".",n,"=",c,";"):d(i,".",nt[n],"(",c,");",s,".",n,"=",c,";")}}}),0===Object.keys(r.state).length&&u(s,".dirty=false;"),e(u)}function D(t,e,r,n){var i=t.shared,a=t.current,o=i.current,s=i.gl;Vt(Object.keys(r)).forEach(function(i){var l=r[i];if(!n||n(l)){var u=l.append(t,e);if(rt[i]){var c=rt[i];qt(l)?u?e(s,".enable(",c,");"):e(s,".disable(",c,");"):e(t.cond(u).then(s,".enable(",c,");").else(s,".disable(",c,");")),e(o,".",i,"=",u,";")}else if(mt(u)){var h=a[i];e(s,".",nt[i],"(",u,");",u.map(function(t,e){return h+"["+e+"]="+t}).join(";"),";")}else e(s,".",nt[i],"(",u,");",o,".",i,"=",u,";")}})}function I(t,e){Q&&(t.instancing=e.def(t.shared.extensions,".angle_instanced_arrays"))}function P(t,e,r,n,i){function a(){return"undefined"==typeof performance?"Date.now()":"performance.now()"}function o(t){u=e.def(),t(u,"=",a(),";"),"string"==typeof i?t(p,".count+=",i,";"):t(p,".count++;"),d&&(n?(c=e.def(),t(c,"=",g,".getNumPendingQueries();")):t(g,".beginQuery(",p,");"))}function s(t){t(p,".cpuTime+=",a(),"-",u,";"),d&&(n?t(g,".pushScopeStats(",c,",",g,".getNumPendingQueries(),",p,");"):t(g,".endQuery();"))}function l(t){var r=e.def(m,".profile");e(m,".profile=",t,";"),e.exit(m,".profile=",r,";")}var u,c,h,f=t.shared,p=t.stats,m=f.current,g=f.timer,v=r.profile;if(v){if(qt(v))return void(v.enable?(o(e),s(e.exit),l("true")):l("false"));h=v.append(t,e),l(h)}else h=e.def(m,".profile");var y=t.block();o(y),e("if(",h,"){",y,"}");var b=t.block();s(b),e.exit("if(",h,"){",b,"}")}function O(t,e,r,n,i){function a(t){switch(t){case ua:case da:case va:return 2;case ca:case pa:case ya:return 3;case ha:case ma:case ba:return 4;default:return 1}}function o(r,n,i){function a(){e("if(!",c,".buffer){",l,".enableVertexAttribArray(",u,");}");var r,a=i.type;if(r=i.size?e.def(i.size,"||",n):n,e("if(",c,".type!==",a,"||",c,".size!==",r,"||",p.map(function(t){return c+"."+t+"!=="+i[t]}).join("||"),"){",l,".bindBuffer(",Zi,",",f,".buffer);",l,".vertexAttribPointer(",[u,r,a,i.normalized,i.stride,i.offset],");",c,".type=",a,";",c,".size=",r,";",p.map(function(t){return c+"."+t+"="+i[t]+";"}).join(""),"}"),Q){var o=i.divisor;e("if(",c,".divisor!==",o,"){",t.instancing,".vertexAttribDivisorANGLE(",[u,o],");",c,".divisor=",o,";}")}}function o(){e("if(",c,".buffer){",l,".disableVertexAttribArray(",u,");","}if(",Qn.map(function(t,e){return c+"."+t+"!=="+d[e]}).join("||"),"){",l,".vertexAttrib4f(",u,",",d,");",Qn.map(function(t,e){return c+"."+t+"="+d[e]+";"}).join(""),"}")}var l=s.gl,u=e.def(r,".location"),c=e.def(s.attributes,"[",u,"]"),h=i.state,f=i.buffer,d=[i.x,i.y,i.z,i.w],p=["buffer","normalized","offset","stride"];h===$n?a():h===ti?o():(e("if(",h,"===",$n,"){"),a(),e("}else{"),o(),e("}"))}var s=t.shared;n.forEach(function(n){var s,l=n.name,u=r.attributes[l];if(u){if(!i(u))return;s=u.append(t,e)}else{if(!i(Ya))return;var c=t.scopeAttrib(l);de.optional(function(){t.assert(e,c+".state","missing attribute "+l)}),s={},Object.keys(new X).forEach(function(t){s[t]=e.def(c,".",t)})}o(t.link(n),a(n.info.type),s)})}function j(t,r,n,i,a){for(var o,s=t.shared,l=s.gl,u=0;u1?J(_,function(t){return c+"["+t+"]"}):c);r(");")}}function R(t,e,r,n){function i(i){var a=c[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(u,".",i)}function a(){function t(){r(g,".drawElementsInstancedANGLE(",[f,p,v,d+"<<(("+v+"-"+Kn+")>>1)",m],");")}function e(){r(g,".drawArraysInstancedANGLE(",[f,d,p,m],");")}h?y?t():(r("if(",h,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(l+".drawElements("+[f,p,v,d+"<<(("+v+"-"+Kn+")>>1)"]+");")}function e(){r(l+".drawArrays("+[f,d,p]+");")}h?y?t():(r("if(",h,"){"),t(),r("}else{"),e(),r("}")):e()}var s=t.shared,l=s.gl,u=s.draw,c=n.draw,h=function(){var i,a=c.elements,o=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(o=r),i=a.append(t,o)):i=o.def(u,".",Ri),i&&o("if("+i+")"+l+".bindBuffer("+Ji+","+i+".buffer.buffer);"),i}(),f=i(Fi),d=i(Bi),p=function(){var i,a=c.count,o=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(o=r),i=a.append(t,o),de.optional(function(){a.MISSING&&t.assert(e,"false","missing vertex count"),a.DYNAMIC&&t.assert(o,i+">=0","missing vertex count")})):(i=o.def(u,".",Ni),de.optional(function(){t.assert(o,i+">=0","missing vertex count")})),i}();if("number"==typeof p){if(0===p)return}else r("if(",p,"){"),r.exit("}");var m,g;Q&&(m=i(Ui),g=t.instancing);var v=h+".type",y=c.elements&&qt(c.elements);Q&&("number"!=typeof m||m>=0)?"string"==typeof m?(r("if(",m,">0){"),a(),r("}else if(",m,"<0){"),o(),r("}")):a():o()}function F(t,e,r,n,i){var a=y(),o=a.proc("body",i);return de.optional(function(){a.commandStr=e.commandStr,a.command=a.link(e.commandStr)}),Q&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),t(a,o,r,n),a.compile().body}function N(t,e,r,n){I(t,e),O(t,e,r,n.attributes,function(){return!0}),j(t,e,r,n.uniforms,function(){return!0}),R(t,e,e,r)}function B(t,e){var r=t.proc("draw",1);I(t,r),L(t,r,e.context),C(t,r,e.framebuffer),z(t,r,e),D(t,r,e.state),P(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,".useProgram(",n,".program);"),e.shader.program)N(t,r,e,e.shader.program);else{var i=t.global.def("{}"),a=r.def(n,".id"),o=r.def(i,"[",a,"]");r(t.cond(o).then(o,".call(this,a0);").else(o,"=",i,"[",a,"]=",t.link(function(r){return F(N,t,e,r,1)}),"(",n,");",o,".call(this,a0);"))}Object.keys(e.state).length>0&&r(t.shared.current,".dirty=true;")}function U(t,e,r,n){function i(){return!0}t.batchId="a1",I(t,e),O(t,e,r,n.attributes,i),j(t,e,r,n.uniforms,i),R(t,e,e,r)}function V(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}I(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var u=t.scope(),c=t.scope();if(e(u.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",c,"}",u.exit),r.needsContext&&L(t,c,r.context),r.needsFramebuffer&&C(t,c,r.framebuffer),D(t,c,r.state,i),r.profile&&i(r.profile)&&P(t,c,r,!1,!0),n)O(t,u,r,n.attributes,a),O(t,c,r,n.attributes,i),j(t,u,r,n.uniforms,a),j(t,c,r,n.uniforms,i),R(t,u,c,r);else{var h=t.global.def("{}"),f=r.shader.progVar.append(t,c),d=c.def(f,".id"),p=c.def(h,"[",d,"]");c(t.shared.gl,".useProgram(",f,".program);","if(!",p,"){",p,"=",h,"[",d,"]=",t.link(function(e){return F(U,t,r,e,2)}),"(",f,");}",p,".call(this,a0[",s,"],",s,");")}}function H(t,e){function r(t){return t.contextDep&&i||t.propDep}var n=t.proc("batch",2);t.batchId="0",I(t,n);var i=!1,a=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(L(t,n,e.context),a=!1);var o=e.framebuffer,s=!1;o?(o.propDep?i=s=!0:o.contextDep&&i&&(s=!0),s||C(t,n,o)):C(t,n,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),z(t,n,e),D(t,n,e.state,function(t){return!r(t)}),e.profile&&r(e.profile)||P(t,n,e,!1,"a1"),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=s;var l=e.shader.progVar;if(l.contextDep&&i||l.propDep)V(t,n,e,null);else{var u=l.append(t,n);if(n(t.shared.gl,".useProgram(",u,".program);"),e.shader.program)V(t,n,e,e.shader.program);else{var c=t.global.def("{}"),h=n.def(u,".id"),f=n.def(c,"[",h,"]");n(t.cond(f).then(f,".call(this,a0,a1);").else(f,"=",c,"[",h,"]=",t.link(function(r){return F(V,t,e,r,2)}),"(",u,");",f,".call(this,a0,a1);"))}}Object.keys(e.state).length>0&&n(t.shared.current,".dirty=true;")}function q(t,r){function n(e){var n=r.shader[e];n&&i.set(a.shader,"."+e,n.append(t,i))}var i=t.proc("scope",3);t.batchId="a2";var a=t.shared,o=a.current;L(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),Vt(Object.keys(r.state)).forEach(function(e){var n=r.state[e],o=n.append(t,i);mt(o)?o.forEach(function(r,n){i.set(t.next[e],"["+n+"]",r)}):i.set(a.next,"."+e,o)}),P(t,i,r,!0,!0),[Ri,Bi,Ni,Ui,Fi].forEach(function(e){var n=r.draw[e];n&&i.set(a.draw,"."+e,""+n.append(t,i))}),Object.keys(r.uniforms).forEach(function(n){i.set(a.uniforms,"["+e.id(n)+"]",r.uniforms[n].append(t,i))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new X).forEach(function(t){i.set(a,"."+t,n[t])})}),n(Oi),n(ji),Object.keys(r.state).length>0&&(i(o,".dirty=true;"),i.exit(o,".dirty=true;")),i("a1(",t.shared.context,",a0,",t.batchId,");")}function G(t){if("object"==typeof t&&!mt(t)){for(var e=Object.keys(t),r=0;r=0;--t){var r=q[t];r&&r(E,null,0)}v.flush(),k&&k.update()}function r(){!J&&q.length>0&&(J=ve.next(e))}function n(){J&&(ve.cancel(e),J=null)}function i(t){t.preventDefault(),b=!0,n(),G.forEach(function(t){t()})}function a(t){v.getError(),b=!1,x.restore(),O.restore(),D.restore(),j.restore(),R.restore(),F.restore(),k&&k.restore(),N.procs.refresh(),r(),Y.forEach(function(t){t()})}function o(){q.length=0,n(),H&&(H.removeEventListener(eo,i),H.removeEventListener(ro,a)),O.clear(),F.clear(),R.clear(),j.clear(),I.clear(),D.clear(),k&&k.clear(),Z.forEach(function(t){t()})}function s(t){function e(t){var e={},r={};return Object.keys(t).forEach(function(n){var i=t[n];ge.isDynamic(i)?r[n]=ge.unbox(i,n):e[n]=i}),{dynamic:r,static:e}}function r(t){for(;d.length0)return h.call(this,r(0|t),0|t)}else{if(!Array.isArray(t))return c.call(this,t);if(t.length)return h.call(this,t,t.length)}}de(!!t,"invalid args to regl({...})"),de.type(t,"object","invalid args to regl({...})");var i=e(t.context||{}),a=e(t.uniforms||{}),o=e(t.attributes||{}),s=e(function(t){function e(t){if(t in r){var e=r[t];delete r[t],Object.keys(e).forEach(function(n){r[t+"."+n]=e[n]})}}var r=$t({},t);return delete r.uniforms,delete r.attributes,delete r.context,"stencil"in r&&r.stencil.op&&(r.stencil.opBack=r.stencil.opFront=r.stencil.op,delete r.stencil.op),e("blend"),e("depth"),e("cull"),e("stencil"),e("polygonOffset"),e("scissor"),e("sample"),r}(t)),l={gpuTime:0,cpuTime:0,count:0},u=N.compile(s,o,a,i,l),c=u.draw,h=u.batch,f=u.scope,d=[];return $t(n,{stats:l})}function l(t,e){var r=0;N.procs.poll();var n=e.color;n&&(v.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=Qa),"depth"in e&&(v.clearDepth(+e.depth),r|=Ka),"stencil"in e&&(v.clearStencil(0|e.stencil),r|=$a),de(!!r,"called regl.clear with no buffer specified"),v.clear(r)}function u(t){if(de("object"==typeof t&&t,"regl.clear() takes an object as input"),"framebuffer"in t)if(t.framebuffer&&"framebufferCube"===t.framebuffer_reglType)for(var e=0;e<6;++e)Q($t({framebuffer:t.framebuffer.faces[e]},t),l);else Q(t,l);else l(null,t)}function c(t){function e(){function e(){var t=Zt(q,e);q[t]=q[q.length-1],q.length-=1,q.length<=0&&n()}var r=Zt(q,t);de(r>=0,"cannot cancel a frame twice"),q[r]=e}return de.type(t,"function","regl.frame() callback must be a function"),q.push(t),r(),{cancel:e}}function h(){var t=V.viewport,e=V.scissor_box;t[0]=t[1]=e[0]=e[1]=0,E.viewportWidth=E.framebufferWidth=E.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,E.viewportHeight=E.framebufferHeight=E.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function f(){E.tick+=1,E.time=p(),h(),N.procs.poll()}function d(){h(),N.procs.refresh(),k&&k.update()}function p(){return(ye()-A)/1e3}function m(t,e){de.type(e,"function","listener callback must be a function");var r;switch(t){case"frame":return c(e);case"lost":r=G;break;case"restore":r=Y;break;case"destroy":r=Z;break;default:de.raise("invalid event, must be one of frame,lost,restore,destroy")}return r.push(e),{cancel:function(){for(var t=0;t=0},read:U,destroy:o,_gl:v,_refresh:d,poll:function(){f(),k&&k.update()},now:p,stats:w});return g.onDone(null,K),K}var Qt={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Kt=function(t){return Object.prototype.toString.call(t)in Qt},$t=function(t,e){for(var r=Object.keys(e),n=0;n=2,"invalid renderbuffer shape"),a=0|d[0],o=0|d[1]}else"radius"in f&&(a=o=0|f.radius),"width"in f&&(a=0|f.width),"height"in f&&(o=0|f.height);"format"in f&&(de.parameter(f.format,u,"invalid renderbuffer format"),l=u[f.format])}else"number"==typeof e?(a=0|e,o="number"==typeof n?0|n:a):e?de.raise("invalid arguments to renderbuffer constructor"):a=o=1;if(de(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),a!==h.width||o!==h.height||l!==h.format)return s.width=h.width=a,s.height=h.height=o,h.format=l,t.bindRenderbuffer(xn,h.renderbuffer),t.renderbufferStorage(xn,l,a,o),i.profile&&(h.stats.size=Dt(h.format,h.width,h.height)),s.format=c[h.format],s}function l(e,n){var a=0|e,o=0|n||a;return a===h.width&&o===h.height?s:(de(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),s.width=h.width=a,s.height=h.height=o,t.bindRenderbuffer(xn,h.renderbuffer),t.renderbufferStorage(xn,h.format,a,o),i.profile&&(h.stats.size=Dt(h.format,h.width,h.height)),s)}var h=new a(t.createRenderbuffer());return f[h.id]=h,n.renderbufferCount++,s(e,o),s.resize=l,s._reglType="renderbuffer",s._renderbuffer=h,i.profile&&(s.stats=h.stats),s.destroy=function(){h.decRef()},s}function l(){xe(f).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(xn,e.renderbuffer),t.renderbufferStorage(xn,e.format,e.width,e.height)}),t.bindRenderbuffer(xn,null)}var u={rgba4:_n,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};e.ext_srgb&&(u.srgba=35907),e.ext_color_buffer_half_float&&(u.rgba16f=34842,u.rgb16f=34843),e.webgl_color_buffer_float&&(u.rgba32f=34836);var c=[];Object.keys(u).forEach(function(t){var e=u[t];c[e]=t});var h=0,f={};return a.prototype.decRef=function(){--this.refCount<=0&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:s,clear:function(){xe(f).forEach(o)},restore:l}},kn=36160,An=36161,Tn=3553,Sn=34069,En=36064,Ln=36096,Cn=36128,zn=33306,Dn=36053,In=6402,Pn=[6408],On=[];On[6408]=4;var jn=[];jn[5121]=1,jn[5126]=4,jn[36193]=2;var Rn=33189,Fn=36168,Nn=34041,Bn=[32854,32855,36194,35907,34842,34843,34836],Un={};Un[Dn]="complete",Un[36054]="incomplete attachment",Un[36057]="incomplete dimensions",Un[36055]="incomplete, missing attachment",Un[36061]="unsupported" -;var Vn=5126,Hn=35632,qn=35633,Gn=35718,Yn=35721,Wn=6408,Xn=5121,Zn=3333,Jn=5126,Qn="xyzw".split(""),Kn=5121,$n=1,ti=2,ei=0,ri=1,ni=2,ii=3,ai=4,oi="dither",si="blend.enable",li="blend.color",ui="blend.equation",ci="blend.func",hi="depth.enable",fi="depth.func",di="depth.range",pi="depth.mask",mi="colorMask",gi="cull.enable",vi="cull.face",yi="frontFace",bi="lineWidth",xi="polygonOffset.enable",_i="polygonOffset.offset",wi="sample.alpha",Mi="sample.enable",ki="sample.coverage",Ai="stencil.enable",Ti="stencil.mask",Si="stencil.func",Ei="stencil.opFront",Li="stencil.opBack",Ci="scissor.enable",zi="scissor.box",Di="viewport",Ii="profile",Pi="framebuffer",Oi="vert",ji="frag",Ri="elements",Fi="primitive",Ni="count",Bi="offset",Ui="instances",Vi=Pi+"Width",Hi=Pi+"Height",qi=Di+"Width",Gi=Di+"Height",Yi="drawingBufferWidth",Wi="drawingBufferHeight",Xi=[ci,ui,Si,Ei,Li,ki,Di,zi,_i],Zi=34962,Ji=34963,Qi=3553,Ki=34067,$i=2884,ta=3042,ea=3024,ra=2960,na=2929,ia=3089,aa=32823,oa=32926,sa=32928,la=5126,ua=35664,ca=35665,ha=35666,fa=5124,da=35667,pa=35668,ma=35669,ga=35670,va=35671,ya=35672,ba=35673,xa=35674,_a=35675,wa=35676,Ma=35678,ka=35680,Aa=4,Ta=1028,Sa=1029,Ea=2304,La=2305,Ca=32775,za=32776,Da=519,Ia=7680,Pa=0,Oa=1,ja=32774,Ra=513,Fa=36160,Na=36064,Ba={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Ua=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],Va={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ha={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},qa={frag:35632,vert:35633},Ga={cw:Ea,ccw:La},Ya=new Ht(!1,!1,!1,function(){}),Wa=34918,Xa=34919,Za=35007,Ja=function(t,e){function r(){return f.pop()||h.createQueryEXT()}function n(t){f.push(t)}function i(t){var e=r();h.beginQueryEXT(Za,e),d.push(e),u(d.length-1,d.length,t)}function a(){h.endQueryEXT(Za)}function o(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}function s(){return p.pop()||new o}function l(t){p.push(t)}function u(t,e,r){var n=s();n.startQueryIndex=t,n.endQueryIndex=e,n.sum=0,n.stats=r,m.push(n)}function c(){var t,e,r=d.length;if(0!==r){v.length=Math.max(v.length,r+1),g.length=Math.max(g.length,r+1),g[0]=0,v[0]=0;var i=0;for(t=0,e=0;e=r)return a.substr(0,r);for(;r>a.length&&e>1;)1&e&&(a+=t),e>>=1,t+=t;return a+=t,a=a.substr(0,r)}var i,a="";e.exports=n},{}],482:[function(e,r,n){!function(e,i){"function"==typeof t&&t.amd?t(i):"object"==typeof n?r.exports=i():e.resolveUrl=i()}(this,function(){function t(){var t=arguments.length;if(0===t)throw new Error("resolveUrl requires at least one argument; got none.");var e=document.createElement("base");if(e.href=arguments[0],1===t)return e.href;var r=document.getElementsByTagName("head")[0];r.insertBefore(e,r.firstChild);for(var n,i=document.createElement("a"),a=1;a=0;--i){var a=r,o=t[i];r=a+o;var s=r-a,l=o-s;l&&(t[--n]=r,r=l)}for(var u=0,i=n;i>1;return["sum(",o(t.slice(0,e)),",",o(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("");for(var e=[],r=0;r>1;return["sum(",a(t.slice(0,e)),",",a(t.slice(e)),")"].join("")}function o(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return o(e,t)}function s(t){return t&!0?"-":""}function l(t){if(2===t.length)return[["diff(",o(t[0][0],t[1][1]),",",o(t[1][0],t[0][1]),")"].join("")];for(var e=[],r=0;r0&&r.push(","),r.push("[");for(var a=0;a0&&r.push(","),a===n?r.push("+b[",i,"]"):r.push("+A[",i,"][",a,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",e);var s=new Function("det",r.join(""));return s(t<6?o[t]:o)}function i(){return[0]}function a(t,e){return[[e[0]],[t[0][0]]]}var o=t("robust-determinant"),s=6,l=[i,a];!function(){for(;l.length>1;return["sum(",o(t.slice(0,e)),",",o(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],r=0;r0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=3.3306690738754716e-16*n;return o>=s||o<=-s?o:m(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],u=r[1]-n[1],c=t[2]-n[2],h=e[2]-n[2],f=r[2]-n[2],d=a*u,p=o*l,m=o*s,v=i*u,y=i*l,b=a*s,x=c*(d-p)+h*(m-v)+f*(y-b),_=(Math.abs(d)+Math.abs(p))*Math.abs(c)+(Math.abs(m)+Math.abs(v))*Math.abs(h)+(Math.abs(y)+Math.abs(b))*Math.abs(f),w=7.771561172376103e-16*_;return x>w||-x>w?x:g(t,e,r,n)}];!function(){for(;v.length<=p;)v.push(l(v.length));for(var t=[],r=["slow"],n=0;n<=p;++n)t.push("a"+n),r.push("o"+n);for(var i=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"],n=2;n<=p;++n)i.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i0&&s>0||o<0&&s<0)return!1;var l=a(r,t,e),u=a(i,t,e);return!(l>0&&u>0||l<0&&u<0)&&(0!==o||0!==s||0!==l||0!==u||n(t,e,r,i))}e.exports=i;var a=t("robust-orientation")[3]},{"robust-orientation":489}],493:[function(t,e,r){"use strict";function n(t,e){var r=t+e,n=r-t,i=r-n,a=e-n,o=t-i,s=o+a;return s?[s,r]:[r]}function i(t,e){var r=0|t.length,i=0|e.length;if(1===r&&1===i)return n(t[0],-e[0]);var a,o,s=r+i,l=new Array(s),u=0,c=0,h=0,f=Math.abs,d=t[c],p=f(d),m=-e[h],g=f(m);p=i?(a=d,(c+=1)=i?(a=d,(c+=1)0){for(var s=0,l=0,u=0;un.h||t>n.free||rc)&&(h=2*Math.max(t,c)),(ll)&&(u=2*Math.max(r,l)),this.resize(h,u),this.packOne(t,r)}return null},t.prototype.clear=function(){this.shelves=[],this.stats={}},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;rthis.free||e>this.h)return null;var r=this.x;return this.x+=t,this.free-=t,{x:r,y:this.y,w:t,h:e,width:t,height:e}},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t})},{}],496:[function(t,e,r){"use strict";e.exports=function(t){return t<0?-1:t>0?1:0}},{}],497:[function(t,e,r){"use strict";function n(t){return a(i(t))}e.exports=n;var i=t("boundary-cells"),a=t("reduce-simplicial-complex")},{"boundary-cells":62,"reduce-simplicial-complex":479}],498:[function(t,e,r){"use strict";function n(t){for(var e=t.length,r=0,n=0;n>1,v=E[2*m+1];","if(v===b){return m}","if(b1;--n){n0&&l.push(","),l.push("[");for(var n=0;n0&&l.push(","),l.push("B(C,E,c[",i[0],"],c[",i[1],"])")}l.push("]")}l.push(");")}}(i[s]),l.push("break;");l.push("}}")}return l.push("}return R;};return getContour",t,"d"),new Function("pool",l.join(""))(a)}function i(t){var e=s[t];return e||(e=s[t]=n(t)),e}e.exports=i;var a=t("typedarray-pool"),o=t("marching-simplex-table"),s={}},{"marching-simplex-table":427,"typedarray-pool":521}],500:[function(t,e,r){"use strict";"use restrict";function n(t){for(var e=0,r=Math.max,n=0,i=t.length;n>1,s=o(t[a],e);s<=0?(0===s&&(i=a),r=a+1):s>0&&(n=a-1)}return i}function h(t,e){for(var r=new Array(t.length),n=0,i=r.length;n=t.length||0!==o(t[m],a))break}return r}function f(t,e){if(!e)return h(u(p(t,0)),t,0);for(var r=new Array(e),n=0;n>>c&1&&u.push(i[c]);e.push(u)}return l(e)}function p(t,e){if(e<0)return[];for(var r=[],n=(1<>1:(t>>1)-1}function u(t){for(var e=s(t);;){var r=e,n=2*t+1,i=2*(t+1),o=t;if(n0;){var r=l(t);if(r>=0){if(e0){var t=k[0];return a(0,T-1),T-=1,u(0),t}return-1}function f(t,e){var r=k[t];return y[r]===e?t:(y[r]=-1/0,c(t),h(),y[r]=e,T+=1,c(T-1))}function d(t,e){if(t[e]<0)return e;var r=e,n=e;do{var i=t[n];if(!b[n]||i<0||i===n)break;if(n=i,i=t[n],!b[n]||i<0||i===n)break;n=i,r=t[r]}while(r!==n);for(var a=e;a!==n;a=t[a])t[a]=n;return n}for(var p=e.length,m=t.length,g=new Array(p),v=new Array(p),y=new Array(p),b=new Array(p),x=0;x>1;x>=0;--x)u(x);for(;;){var S=h();if(S<0||y[S]>r)break;!function(t){if(!b[t]){b[t]=!0;var e=g[t],r=v[t];g[r]>=0&&(g[r]=e),v[e]>=0&&(v[e]=r),A[e]>=0&&f(A[e],i(e)),A[r]>=0&&f(A[r],i(r))}}(S)}for(var E=[],x=0;x=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&L.push([n,i])}}),o.unique(o.normalize(L)),{positions:E,edges:L}}e.exports=i;var a=t("robust-orientation"),o=t("simplicial-complex")},{"robust-orientation":489,"simplicial-complex":502}],505:[function(t,e,r){"use strict";function n(t,e){var r,n;if(e[0][0]e[1][0])){var i=Math.min(t[0][1],t[1][1]),o=Math.max(t[0][1],t[1][1]),s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]);return ol?i-l:o-l}r=e[1],n=e[0]}var u,c;t[0][1]e[1][0]))return n(e,t);r=e[1],i=e[0]}var o,s;if(t[0][0]t[1][0]))return-n(t,e);o=t[1],s=t[0]}var l=a(r,i,s),u=a(r,i,o);if(l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;if(l=a(s,o,i),u=a(s,o,r),l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;return i[0]-s[0]}e.exports=i;var a=t("robust-orientation")},{"robust-orientation":489}],506:[function(t,e,r){"use strict";function n(t,e,r){this.slabs=t,this.coordinates=e,this.horizontal=r}function i(t,e){return t.y-e}function a(t,e){for(var r=null;t;){var n,i,o=t.key;o[0][0]0)if(e[0]!==o[1][0])r=t,t=t.right;else{var l=a(t.right,e);if(l)return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l=a(t.right,e);if(l)return l;t=t.left}}return r}function o(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function s(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}function l(t){for(var e=t.length,r=2*e,i=new Array(r),a=0;a0){var s=a(this.slabs[e-1],t);s&&(o?f(s.key,o)>0&&(o=s.key,n=s.value):(n=s.value,o=s.key))}var l=this.horizontal[e];if(l.length>0){var c=u.ge(l,t[1],i);if(c=l.length)return n;d=l[c]}}if(d.start)if(o){var p=h(o[0],o[1],[t[0],d.y]);o[0][0]>o[1][0]&&(p=-p),p>0&&(n=d.index)}else n=d.index;else d.y!==t[1]&&(n=d.index)}}}return n}},{"./lib/order-segments":505,"binary-search-bounds":59,"functional-red-black-tree":120,"robust-orientation":489}],507:[function(t,e,r){"use strict";function n(t,e){var r=u(l(t,e),[e[e.length-1]]);return r[r.length-1]}function i(t,e,r,n){var i=n-e,a=-e/i;a<0?a=0:a>1&&(a=1);for(var o=1-a,s=t.length,l=new Array(s),u=0;u0||o>0&&c<0){var h=i(s,c,l,o);r.push(h),a.push(h.slice())}c<0?a.push(l.slice()):c>0?r.push(l.slice()):(r.push(l.slice()),a.push(l.slice())),o=c}return{positive:r,negative:a}}function o(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l0||a>0&&u<0)&&r.push(i(o,u,s,a)),u>=0&&r.push(s.slice()),a=u}return r}function s(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l0||a>0&&u<0)&&r.push(i(o,u,s,a)),u<=0&&r.push(s.slice()),a=u}return r}var l=t("robust-dot-product"),u=t("robust-sum");e.exports=a,e.exports.positive=o,e.exports.negative=s},{"robust-dot-product":486,"robust-sum":494}],508:[function(e,r,n){!function(e){function r(){var t=arguments[0],e=r.cache;return e[t]&&e.hasOwnProperty(t)||(e[t]=r.parse(t)),r.format.call(null,e[t],arguments)}function i(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function a(t,e){return Array(e+1).join(t)}var o={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i, -key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};r.format=function(t,e){var n,s,l,u,c,h,f,d=1,p=t.length,m="",g=[],v=!0,y="";for(s=0;s=0),u[8]){case"b":n=n.toString(2);break;case"c":n=String.fromCharCode(n);break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,u[6]?parseInt(u[6]):0);break;case"e":n=u[7]?n.toExponential(u[7]):n.toExponential();break;case"f":n=u[7]?parseFloat(n).toFixed(u[7]):parseFloat(n);break;case"g":n=u[7]?parseFloat(n).toPrecision(u[7]):parseFloat(n);break;case"o":n=n.toString(8);break;case"s":n=(n=String(n))&&u[7]?n.substring(0,u[7]):n;break;case"u":n>>>=0;break;case"x":n=n.toString(16);break;case"X":n=n.toString(16).toUpperCase()}o.json.test(u[8])?g[g.length]=n:(!o.number.test(u[8])||v&&!u[3]?y="":(y=v?"+":"-",n=n.toString().replace(o.sign,"")),h=u[4]?"0"===u[4]?"0":u[4].charAt(1):" ",f=u[6]-(y+n).length,c=u[6]&&f>0?a(h,f):"",g[g.length]=u[5]?y+n+c:"0"===h?y+c+n:c+y+n)}return g.join("")},r.cache={},r.parse=function(t){for(var e=t,r=[],n=[],i=0;e;){if(null!==(r=o.text.exec(e)))n[n.length]=r[0];else if(null!==(r=o.modulo.exec(e)))n[n.length]="%";else{if(null===(r=o.placeholder.exec(e)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){i|=1;var a=[],s=r[2],l=[];if(null===(l=o.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a[a.length]=l[1];""!==(s=s.substring(l[0].length));)if(null!==(l=o.key_access.exec(s)))a[a.length]=l[1];else{if(null===(l=o.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a[a.length]=l[1]}r[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n[n.length]=r}e=e.substring(r[0].length)}return n};var s=function(t,e,n){return n=(e||[]).slice(0),n.splice(0,0,t),r.apply(null,n)};void 0!==n?(n.sprintf=r,n.vsprintf=s):(e.sprintf=r,e.vsprintf=s,"function"==typeof t&&t.amd&&t(function(){return{sprintf:r,vsprintf:s}}))}("undefined"==typeof window?this:window)},{}],509:[function(t,e,r){"use strict";function n(t){return new i(t)}function i(t){this.options=d(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function a(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}function o(t,e){var r=t.geometry.coordinates;return{x:u(r[0]),y:c(r[1]),zoom:1/0,id:e,parentId:-1}}function s(t){return{type:"Feature",properties:l(t),geometry:{type:"Point",coordinates:[h(t.x),f(t.y)]}}}function l(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return d(d({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function u(t){return t/360+.5}function c(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function h(t){return 360*(t-.5)}function f(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function d(t,e){for(var r in e)t[r]=e[r];return t}function p(t){return t.x}function m(t){return t.y}var g=t("kdbush");e.exports=n,i.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var r="prepare "+t.length+" points";e&&console.time(r),this.points=t;var n=t.map(o);e&&console.timeEnd(r);for(var i=this.options.maxZoom;i>=this.options.minZoom;i--){var a=+Date.now();this.trees[i+1]=g(n,p,m,this.options.nodeSize,Float32Array),n=this._cluster(n,i),e&&console.log("z%d: %d clusters in %dms",i,n.length,+Date.now()-a)}return this.trees[this.options.minZoom]=g(n,p,m,this.options.nodeSize,Float32Array),e&&console.timeEnd("total time"),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],n=r.range(u(t[0]),c(t[3]),u(t[2]),c(t[1])),i=[],a=0;a c)|0 },"),"generic"===e&&n.push("getters:[0],");for(var a=[],l=[],u=0;u>>7){");for(var u=0;u<1<<(1<128&&u%128==0){h.length>0&&f.push("}}");var d="vExtra"+h.length;n.push("case ",u>>>7,":",d,"(m&0x7f,",l.join(),");break;"),f=["function ",d,"(m,",l.join(),"){switch(m){"],h.push(f)}f.push("case ",127&u,":");for(var p=new Array(r),m=new Array(r),g=new Array(r),v=new Array(r),y=0,b=0;bb)&&!(u&1<<_)!=!(u&1<0&&(A="+"+g[x]+"*c");var T=p[x].length/y*.5,S=.5+v[x]/y*.5;k.push("d"+x+"-"+S+"-"+T+"*("+p[x].join("+")+A+")/("+m[x].join("+")+")")}f.push("a.push([",k.join(),"]);","break;")}n.push("}},"),h.length>0&&f.push("}}");for(var E=[],u=0;u<1<0&&(f+=.02);for(var p=new Float32Array(h),m=0,g=-.5*f,d=0;d=0?1.2:1))}function i(t,e,r,n,i,o,s){for(var l=0;l.5?l/(2-a-o):l/(a+o),a){case t:n=(e-r)/l+(e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}var i,a,o;if(t=S(t,360),e=S(e,100),r=S(r,100),0===e)i=a=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;i=n(l,s,t+1/3),a=n(l,s,t),o=n(l,s,t-1/3)}return{r:255*i,g:255*a,b:255*o}}function l(t,e,r){t=S(t,255),e=S(e,255),r=S(r,255);var n,i,a=q(t,e,r),o=H(t,e,r),s=a,l=a-o;if(i=0===a?0:l/a,a==o)n=0;else{switch(a){case t:n=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+a)%360,o.push(n(i));return o}function A(t,e){e=e||6;for(var r=n(t).toHsv(),i=r.h,a=r.s,o=r.v,s=[],l=1/e;e--;)s.push(n({h:i,s:a,v:o})),o=(o+l)%1;return s}function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function S(t,r){C(t)&&(t="100%");var n=z(t);return t=H(r,q(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function E(t){return H(1,q(0,t))}function L(t){return parseInt(t,16)}function C(t){return"string"==typeof t&&t.indexOf(".")!=-1&&1===parseFloat(t)}function z(t){return"string"==typeof t&&t.indexOf("%")!=-1}function D(t){return 1==t.length?"0"+t:""+t}function I(t){return t<=1&&(t=100*t+"%"),t}function P(t){return e.round(255*parseFloat(t)).toString(16)}function O(t){return L(t)/255}function j(t){return!!X.CSS_UNIT.exec(t)}function R(t){t=t.replace(N,"").replace(B,"").toLowerCase();var e=!1;if(Y[t])t=Y[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=X.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=X.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=X.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=X.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=X.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=X.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=X.hex8.exec(t))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),a:O(r[4]),format:e?"name":"hex8"}:(r=X.hex6.exec(t))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),format:e?"name":"hex"}:(r=X.hex4.exec(t))?{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),a:O(r[4]+""+r[4]),format:e?"name":"hex8"}:!!(r=X.hex3.exec(t))&&{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),format:e?"name":"hex"}}function F(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:e,size:r}}var N=/^\s+/,B=/\s+$/,U=0,V=e.round,H=e.min,q=e.max,G=e.random;n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,n,i,a,o,s=this.toRgb();return t=s.r/255,r=s.g/255,n=s.b/255,i=t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4),a=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),o=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*o},setAlpha:function(t){return this._a=T(t),this._roundA=V(100*this._a)/100,this},toHsv:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=l(this._r,this._g,this._b),e=V(360*t.h),r=V(100*t.s),n=V(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=o(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=o(this._r,this._g,this._b),e=V(360*t.h),r=V(100*t.s),n=V(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return c(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return h(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:V(this._r),g:V(this._g),b:V(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+V(this._r)+", "+V(this._g)+", "+V(this._b)+")":"rgba("+V(this._r)+", "+V(this._g)+", "+V(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:V(100*S(this._r,255))+"%",g:V(100*S(this._g,255))+"%",b:V(100*S(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+V(100*S(this._r,255))+"%, "+V(100*S(this._g,255))+"%, "+V(100*S(this._b,255))+"%)":"rgba("+V(100*S(this._r,255))+"%, "+V(100*S(this._g,255))+"%, "+V(100*S(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(W[c(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+f(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=n(t);r="#"+f(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(k,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]="a"===i?t[i]:I(t[i]));t=r}return n(t,e)},n.equals=function(t,e){return!(!t||!e)&&n(t).toRgbString()==n(e).toRgbString()},n.random=function(){return n.fromRatio({r:G(),g:G(),b:G()})},n.mix=function(t,e,r){r=0===r?0:r||50;var i=n(t).toRgb(),a=n(e).toRgb(),o=r/100;return n({r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a})},n.readability=function(t,r){var i=n(t),a=n(r);return(e.max(i.getLuminance(),a.getLuminance())+.05)/(e.min(i.getLuminance(),a.getLuminance())+.05)},n.isReadable=function(t,e,r){var i,a,o=n.readability(t,e);switch(a=!1,i=F(r),i.level+i.size){case"AAsmall":case"AAAlarge":a=o>=4.5;break;case"AAlarge":a=o>=3;break;case"AAAsmall":a=o>=7}return a},n.mostReadable=function(t,e,r){var i,a,o,s,l=null,u=0;r=r||{},a=r.includeFallbackColors,o=r.level,s=r.size;for(var c=0;cu&&(u=i,l=n(e[c]));return n.isReadable(t,l,{level:o,size:s})||!a?l:(r.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],r))};var Y=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},W=n.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(Y),X=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();void 0!==r&&r.exports?r.exports=n:"function"==typeof t&&t.amd?t(function(){return n}):window.tinycolor=n}(Math)},{}],515:[function(t,e,r){"use strict";function n(t,e){var r=o(getComputedStyle(t).getPropertyValue(e));return r[0]*a(r[1],t)}function i(t,e){var r=document.createElement("div");r.style["font-size"]="128"+t,e.appendChild(r);var i=n(r,"font-size")/128;return e.removeChild(r),i}function a(t,e){switch(e=e||document.body,t=(t||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case"%":return e.clientHeight/100;case"ch":case"ex":return i(t,e);case"em":return n(e,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return s;case"cm":return s/2.54;case"mm":return s/25.4;case"pt":return s/72;case"pc":return s/6}return 1}var o=t("parse-unit");e.exports=a;var s=96},{"parse-unit":456}],516:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.topojson=e.topojson||{})}(this,function(t){"use strict";function e(t,e){var n=e.id,i=e.bbox,a=null==e.properties?{}:e.properties,o=r(t,e);return null==n&&null==i?{type:"Feature",properties:a,geometry:o}:null==i?{type:"Feature",id:n,properties:a,geometry:o}:{type:"Feature",id:n,bbox:i,properties:a,geometry:o}}function r(t,e){function r(t,e){e.length&&e.pop();for(var r=h[t<0?~t:t],n=0,i=r.length;n1)n=i(t,e,r);else for(a=0,n=new Array(o=t.arcs.length);a1)for(var i,a,l=1,u=o(n[0]);lu&&(a=n[0],n[0]=n[l],n[l]=a,u=i);return n})}}var s=function(t){return t},l=function(t){if(null==(e=t.transform))return s;var e,r,n,i=e.scale[0],a=e.scale[1],o=e.translate[0],l=e.translate[1];return function(t,e){return e||(r=n=0),t[0]=(r+=t[0])*i+o,t[1]=(n+=t[1])*a+l,t}},u=function(t){function e(t){s[0]=t[0],s[1]=t[1],o(s),s[0]h&&(h=s[0]),s[1]f&&(f=s[1])}function r(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(r);break;case"Point":e(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(e)}}var n=t.bbox;if(!n){var i,a,o=l(t),s=new Array(2),u=1/0,c=u,h=-u,f=-u -;t.arcs.forEach(function(t){for(var e=-1,r=t.length;++eh&&(h=s[0]),s[1]f&&(f=s[1])});for(a in t.objects)r(t.objects[a]);n=t.bbox=[u,c,h,f]}return n},c=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r},h=function(t,r){return"GeometryCollection"===r.type?{type:"FeatureCollection",features:r.geometries.map(function(r){return e(t,r)})}:e(t,r)},f=function(t,e){function r(e){var r,n=t.arcs[e<0?~e:e],i=n[0];return t.transform?(r=[0,0],n.forEach(function(t){r[0]+=t[0],r[1]+=t[1]})):r=n[n.length-1],e<0?[r,i]:[i,r]}function n(t,e){for(var r in t){var n=t[r];delete e[n.start],delete n.start,delete n.end,n.forEach(function(t){i[t<0?~t:t]=1}),s.push(n)}}var i={},a={},o={},s=[],l=-1;return e.forEach(function(r,n){var i,a=t.arcs[r<0?~r:r];a.length<3&&!a[1][0]&&!a[1][1]&&(i=e[++l],e[l]=r,e[n]=i)}),e.forEach(function(t){var e,n,i=r(t),s=i[0],l=i[1];if(e=o[s])if(delete o[e.end],e.push(t),e.end=l,n=a[l]){delete a[n.start];var u=n===e?e:e.concat(n);a[u.start=e.start]=o[u.end=n.end]=u}else a[e.start]=o[e.end]=e;else if(e=a[l])if(delete a[e.start],e.unshift(t),e.start=s,n=o[s]){delete o[n.end];var c=n===e?e:n.concat(e);a[c.start=n.start]=o[c.end=e.end]=c}else a[e.start]=o[e.end]=e;else e=[t],a[e.start=s]=o[e.end=l]=e}),n(o,a),n(a,o),e.forEach(function(t){i[t<0?~t:t]||s.push([t])}),s},d=function(t){return r(t,n.apply(this,arguments))},p=function(t){return r(t,o.apply(this,arguments))},m=function(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error("n must be \u22652");if(t.transform)throw new Error("already quantized");var i,a=u(t),o=a[0],s=(a[2]-o)/(e-1)||1,l=a[1],c=(a[3]-l)/(e-1)||1;t.arcs.forEach(function(t){for(var e,r,n,i=1,a=1,u=t.length,h=t[0],f=h[0]=Math.round((h[0]-o)/s),d=h[1]=Math.round((h[1]-l)/c);iMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,s=0;s<3;++s)a+=t[s]*t[s],o+=i[s]*t[s];for(var s=0;s<3;++s)i[s]-=o/a*t[s];return f(i,i),i}function o(t,e,r,n,i,a,o,s){this.center=l(r),this.up=l(n),this.right=l(i),this.radius=l([a]),this.angle=l([o,s]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var u=0;u<16;++u)this.computedMatrix[u]=.5;this.recalcMatrix(0)}function s(t){t=t||{};var e=t.center||[0,0,0],r=t.up||[0,1,0],i=t.right||a(r),s=t.radius||1,l=t.theta||0,u=t.phi||0;if(e=[].slice.call(e,0,3),r=[].slice.call(r,0,3),f(r,r),i=[].slice.call(i,0,3),f(i,i),"eye"in t){var c=t.eye,p=[c[0]-e[0],c[1]-e[1],c[2]-e[2]];h(i,p,r),n(i[0],i[1],i[2])<1e-6?i=a(r):f(i,i),s=n(p[0],p[1],p[2]);var m=d(r,p)/s,g=d(i,p)/s;u=Math.acos(m),l=Math.acos(g)}return s=Math.log(s),new o(t.zoomMin,t.zoomMax,e,r,i,s,l,u)}e.exports=s;var l=t("filtered-vector"),u=t("gl-mat4/invert"),c=t("gl-mat4/rotate"),h=t("gl-vec3/cross"),f=t("gl-vec3/normalize"),d=t("gl-vec3/dot"),p=o.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,i=0,a=0,o=0;o<3;++o)a+=e[o]*r[o],i+=e[o]*e[o];for(var s=Math.sqrt(i),l=0,o=0;o<3;++o)r[o]-=e[o]*a/i,l+=r[o]*r[o],e[o]/=s;for(var u=Math.sqrt(l),o=0;o<3;++o)r[o]/=u;var c=this.computedToward;h(c,e,r),f(c,c);for(var d=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),v=Math.sin(p),y=Math.cos(m),b=Math.sin(m),x=this.computedCenter,_=g*y,w=v*y,M=b,k=-g*b,A=-v*b,T=y,S=this.computedEye,E=this.computedMatrix,o=0;o<3;++o){var L=_*r[o]+w*c[o]+M*e[o];E[4*o+1]=k*r[o]+A*c[o]+T*e[o],E[4*o+2]=L,E[4*o+3]=0}var C=E[1],z=E[5],D=E[9],I=E[2],P=E[6],O=E[10],j=z*O-D*P,R=D*I-C*O,F=C*P-z*I,N=n(j,R,F);j/=N,R/=N,F/=N,E[0]=j,E[4]=R,E[8]=F;for(var o=0;o<3;++o)S[o]=x[o]+E[2+4*o]*d;for(var o=0;o<3;++o){for(var l=0,B=0;B<3;++B)l+=E[o+4*B]*S[B];E[12+o]=-l}E[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var m=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;m[0]=i[2],m[1]=i[6],m[2]=i[10];for(var a=this.computedUp,o=this.computedRight,s=this.computedToward,l=0;l<3;++l)i[4*l]=a[l],i[4*l+1]=o[l],i[4*l+2]=s[l];c(i,i,n,m);for(var l=0;l<3;++l)a[l]=i[4*l],o[l]=i[4*l+1];this.up.set(t,a[0],a[1],a[2]),this.right.set(t,o[0],o[1],o[2])}},p.pan=function(t,e,r,i){e=e||0,r=r||0,i=i||0,this.recalcMatrix(t);var a=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),a[1]),s=a[5],l=a[9],u=n(o,s,l);o/=u,s/=u,l/=u;var c=a[0],h=a[4],f=a[8],d=c*o+h*s+f*l;c-=o*d,h-=s*d,f-=l*d;var p=n(c,h,f);c/=p,h/=p,f/=p;var m=c*e+o*r,g=h*e+s*r,v=f*e+l*r;this.center.move(t,m,g,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+i),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,a){var o=1;"number"==typeof r&&(o=0|r),(o<0||o>3)&&(o=1);var s=(o+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var l=e[o],c=e[o+4],h=e[o+8];if(a){var f=Math.abs(l),d=Math.abs(c),p=Math.abs(h),m=Math.max(f,d,p);f===m?(l=l<0?-1:1,c=h=0):p===m?(h=h<0?-1:1,l=c=0):(c=c<0?-1:1,l=h=0)}else{var g=n(l,c,h);l/=g,c/=g,h/=g}var v=e[s],y=e[s+4],b=e[s+8],x=v*l+y*c+b*h;v-=l*x,y-=c*x,b-=h*x;var _=n(v,y,b);v/=_,y/=_,b/=_;var w=c*b-h*y,M=h*v-l*b,k=l*y-c*v,A=n(w,M,k);w/=A,M/=A,k/=A,this.center.jump(t,q,G,Y),this.radius.idle(t),this.up.jump(t,l,c,h),this.right.jump(t,v,y,b);var T,S;if(2===o){var E=e[1],L=e[5],C=e[9],z=E*v+L*y+C*b,D=E*w+L*M+C*k;T=j<0?-Math.PI/2:Math.PI/2,S=Math.atan2(D,z)}else{var I=e[2],P=e[6],O=e[10],j=I*l+P*c+O*h,R=I*v+P*y+O*b,F=I*w+P*M+O*k;T=Math.asin(i(j)),S=Math.atan2(F,R)}this.angle.jump(t,S,T),this.recalcMatrix(t);var N=e[2],B=e[6],U=e[10],V=this.computedMatrix;u(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Y=V[14]/H,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-N*W,G-B*W,Y-U*W)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,a){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter,a=a||this.computedUp;var o=a[0],s=a[1],l=a[2],u=n(o,s,l);if(!(u<1e-6)){o/=u,s/=u,l/=u;var c=e[0]-r[0],h=e[1]-r[1],f=e[2]-r[2],d=n(c,h,f);if(!(d<1e-6)){c/=d,h/=d,f/=d;var p=this.computedRight,m=p[0],g=p[1],v=p[2],y=o*m+s*g+l*v;m-=y*o,g-=y*s,v-=y*l;var b=n(m,g,v);if(!(b<.01&&(m=s*f-l*h,g=l*c-o*f,v=o*h-s*c,(b=n(m,g,v))<1e-6))){m/=b,g/=b,v/=b,this.up.set(t,o,s,l),this.right.set(t,m,g,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(d));var x=s*v-l*g,_=l*m-o*v,w=o*g-s*m,M=n(x,_,w);x/=M,_/=M,w/=M;var k=o*c+s*h+l*f,A=m*c+g*h+v*f,T=x*c+_*h+w*f,S=Math.asin(i(k)),E=Math.atan2(T,A),L=this.angle._state,C=L[L.length-1],z=L[L.length-2];C%=2*Math.PI;var D=Math.abs(C+2*Math.PI-E),I=Math.abs(C-E),P=Math.abs(C-2*Math.PI-E);D0?r.pop():new ArrayBuffer(t)}function s(t){return new Uint8Array(o(t),0,t)}function l(t){return new Uint16Array(o(2*t),0,t)}function u(t){return new Uint32Array(o(4*t),0,t)}function c(t){return new Int8Array(o(t),0,t)}function h(t){return new Int16Array(o(2*t),0,t)}function f(t){return new Int32Array(o(4*t),0,t)}function d(t){return new Float32Array(o(4*t),0,t)}function p(t){return new Float64Array(o(8*t),0,t)}function m(t){return x?new Uint8ClampedArray(o(t),0,t):s(t)}function g(t){return new DataView(o(t),0,t)}function v(t){t=y.nextPow2(t);var e=y.log2(t),r=M[e];return r.length>0?r.pop():new n(t)}var y=t("bit-twiddle"),b=t("dup");e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:b([32,0]),UINT16:b([32,0]),UINT32:b([32,0]),INT8:b([32,0]),INT16:b([32,0]),INT32:b([32,0]),FLOAT:b([32,0]),DOUBLE:b([32,0]),DATA:b([32,0]),UINT8C:b([32,0]),BUFFER:b([32,0])});var x="undefined"!=typeof Uint8ClampedArray,_=e.__TYPEDARRAY_POOL;_.UINT8C||(_.UINT8C=b([32,0])),_.BUFFER||(_.BUFFER=b([32,0]));var w=_.DATA,M=_.BUFFER;r.free=function(t){if(n.isBuffer(t))M[y.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|y.log2(e);w[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=a,r.freeArrayBuffer=i,r.freeBuffer=function(t){M[y.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return o(t);switch(e){case"uint8":return s(t);case"uint16":return l(t);case"uint32":return u(t);case"int8":return c(t);case"int16":return h(t);case"int32":return f(t);case"float":case"float32":return d(t);case"double":case"float64":return p(t);case"uint8_clamped":return m(t);case"buffer":return v(t);case"data":case"dataview":return g(t);default:return null}return null},r.mallocArrayBuffer=o,r.mallocUint8=s,r.mallocUint16=l,r.mallocUint32=u,r.mallocInt8=c,r.mallocInt16=h,r.mallocInt32=f,r.mallocFloat32=r.mallocFloat=d,r.mallocFloat64=r.mallocDouble=p,r.mallocUint8Clamped=m,r.mallocDataView=g,r.mallocBuffer=v,r.clearCache=function(){for(var t=0;t<32;++t)_.UINT8[t].length=0,_.UINT16[t].length=0,_.UINT32[t].length=0,_.INT8[t].length=0,_.INT16[t].length=0,_.INT32[t].length=0,_.FLOAT[t].length=0,_.DOUBLE[t].length=0,_.UINT8C[t].length=0,w[t].length=0,M[t].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":60,buffer:70,dup:110}],522:[function(t,e,r){"use strict";"use restrict";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;en)return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},{}],525:[function(t,e,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,r){if(t&&u.isObject(t)&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}function a(t){return u.isString(t)&&(t=i(t)),t instanceof n?t.format():n.prototype.format.call(t)}function o(t,e){return i(t,!1,!0).resolve(e)}function s(t,e){return t?i(t,!1,!0).resolveObject(e):e}var l=t("punycode"),u=t("./util");r.parse=i,r.resolve=o,r.resolveObject=s,r.format=a,r.Url=n;var c=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),m=["'"].concat(p),g=["%","/","?",";","#"].concat(m),v=["/","?","#"],y={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=t("querystring");n.prototype.parse=function(t,e,r){if(!u.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=n!==-1&&n127?z+="x":z+=C[D];if(!z.match(/^[+a-z0-9A-Z_-]{0,63}$/)){var P=E.slice(0,M),O=E.slice(M+1),j=C.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);j&&(P.push(j[1]),O.unshift(j[2])),O.length&&(o="/"+O.join(".")+o),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=l.toASCII(this.hostname));var R=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+R,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!y[d])for(var M=0,L=m.length;M0)&&r.host.split("@");A&&(r.auth=A.shift(),r.host=r.hostname=A.shift())}return r.search=t.search,r.query=t.query,u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!M.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=M.slice(-1)[0],S=(r.host||t.host||M.length>1)&&("."===T||".."===T)||""===T,E=0,L=M.length;L>=0;L--)T=M[L],"."===T?M.splice(L,1):".."===T?(M.splice(L,1),E++):E&&(M.splice(L,1),E--);if(!_&&!w)for(;E--;E)M.unshift("..");!_||""===M[0]||M[0]&&"/"===M[0].charAt(0)||M.unshift(""),S&&"/"!==M.join("/").substr(-1)&&M.push("");var C=""===M[0]||M[0]&&"/"===M[0].charAt(0);if(k){r.hostname=r.host=C?"":M.length?M.shift():"";var A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");A&&(r.auth=A.shift(),r.host=r.hostname=A.shift())}return _=_||r.host&&M.length,_&&!C&&M.unshift(""),M.length?r.pathname=M.join("/"):(r.pathname=null,r.path=null),u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=h.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":526,punycode:469,querystring:473}],526:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],527:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],528:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],529:[function(t,e,r){(function(e,n){function i(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(e)?n.showHidden=e:e&&r._extend(n,e),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),l(n,t,n.depth)}function a(t,e){var r=i.styles[e];return r?"\x1b["+i.colors[r][0]+"m"+t+"\x1b["+i.colors[r][1]+"m":t}function o(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function l(t,e,n){if(t.customInspect&&e&&T(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return b(i)||(i=l(t,i,n)),i}var a=u(t,e);if(a)return a;var o=Object.keys(e),m=s(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),A(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(e);if(0===o.length){if(T(e)){var g=e.name?": "+e.name:"";return t.stylize("[Function"+g+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(k(e))return t.stylize(Date.prototype.toString.call(e),"date");if(A(e))return c(e)}var v="",y=!1,x=["{","}"];if(p(e)&&(y=!0,x=["[","]"]),T(e)){v=" [Function"+(e.name?": "+e.name:"")+"]"}if(w(e)&&(v=" "+RegExp.prototype.toString.call(e)),k(e)&&(v=" "+Date.prototype.toUTCString.call(e)),A(e)&&(v=" "+c(e)),0===o.length&&(!y||0==e.length))return x[0]+v+x[1];if(n<0)return w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var _;return _=y?h(t,e,n,m,o):o.map(function(r){return f(t,e,n,m,r,y)}),t.seen.pop(),d(_,v,x)}function u(t,e){if(_(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var a=[],o=0,s=e.length;o-1&&(s=a?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),_(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function d(t,e,r){var n=0;return t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function p(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function g(t){return null===t}function v(t){return null==t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function x(t){return"symbol"==typeof t}function _(t){return void 0===t}function w(t){return M(t)&&"[object RegExp]"===E(t)}function M(t){return"object"==typeof t&&null!==t}function k(t){return M(t)&&"[object Date]"===E(t)}function A(t){return M(t)&&("[object Error]"===E(t)||t instanceof Error)}function T(t){return"function"==typeof t}function S(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function E(t){return Object.prototype.toString.call(t)}function L(t){return t<10?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[L(t.getHours()),L(t.getMinutes()),L(t.getSeconds())].join(":");return[t.getDate(),P[t.getMonth()],e].join(" ")}function z(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.format=function(t){if(!b(t)){for(var e=[],r=0;r=a)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),s=n[r];r>3}if(i--,1===n||2===n)a+=t.readSVarint(),o+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new l(a,o));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&s.push(e),s},n.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;t.pos>3}if(n--,1===r||2===r)i+=t.readSVarint(),a+=t.readSVarint(),is&&(s=i),au&&(u=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,u]},n.prototype.toGeoJSON=function(t,e,r){function i(t){for(var e=0;e>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}var o=t("./vectortilefeature.js");e.exports=n,n.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new o(this._pbf,e,this.extent,this._keys,this._values)}},{"./vectortilefeature.js":532}],534:[function(t,e,r){"use strict";function n(t,e){return"object"==typeof e&&null!==e||(e={}),i(t,e.canvas||a,e.context||o,e)}e.exports=n;var i=t("./lib/vtext"),a=null,o=null;"undefined"!=typeof document&&(a=document.createElement("canvas"),a.width=8192,a.height=1024,o=a.getContext("2d"))},{"./lib/vtext":535}],535:[function(t,e,r){"use strict";function n(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l8192)throw new Error("vectorize-text: String too long (sorry, this will get fixed later)");var a=3*n;t.height>31}function l(t){for(var e=[],r=0,n=0,i=t.length,a=0;a=0?l[r]:e)}function e(t){var e=n(t);return e?u in e:s.indexOf(t)>=0}function r(t,e){var r,i=n(t);return i?i[u]=e:(r=s.indexOf(t),r>=0?l[r]=e:(r=s.length,l[r]=e,s[r]=t)),this}function o(t){var e,r,i=n(t);return i?u in i&&delete i[u]:!((e=s.indexOf(t))<0)&&(r=s.length-1,s[e]=void 0,l[e]=l[r],s[e]=s[r],s.length=r,l.length=r,!0)}this instanceof x||a();var s=[],l=[],u=b++;return Object.create(x.prototype,{get___:{value:i(t)},has___:{value:i(e)},set___:{value:i(r)},delete___:{value:i(o)}})};x.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof s?function(){function r(){function e(t,e){return c?u.has(t)?u.get(t):c.get___(t,e):u.get(t,e)}function r(t){return u.has(t)||!!c&&c.has___(t)}function n(t){var e=!!u.delete(t);return c?c.delete___(t)||e:e}this instanceof x||a();var l,u=new s,c=void 0,h=!1;return l=o?function(t,e){return u.set(t,e),u.has(t)||(c||(c=new x),c.set(t,e)),this}:function(t,e){if(h)try{u.set(t,e)}catch(r){c||(c=new x),c.set___(t,e)}else u.set(t,e);return this},Object.create(x.prototype,{get___:{value:i(e)},has___:{value:i(r)},set___:{value:i(l)},delete___:{value:i(n)},permitHostObjects___:{value:i(function(e){if(e!==t)throw new Error("bogus call to permitHostObjects___");h=!0})}})}o&&"undefined"!=typeof Proxy&&(Proxy=void 0),r.prototype=x.prototype,e.exports=r,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=x)}}()},{}],540:[function(t,e,r){function n(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:i(e,t)}}var i=t("./hidden-store.js");e.exports=n},{"./hidden-store.js":541}],541:[function(t,e,r){function n(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}e.exports=n},{}],542:[function(t,e,r){function n(){var t=i();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}var i=t("./create-store.js");e.exports=n},{"./create-store.js":540}],543:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":132}],544:[function(t,e,r){var n=arguments[3],i=arguments[4],a=arguments[5],o=JSON.stringify;e.exports=function(t,e){function r(t){g[t]=!0;for(var e in i[t][1]){var n=i[t][1][e];g[n]||r(n)}}for(var s,l=Object.keys(a),u=0,c=l.length;u=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a=n||{}}var o=p[i.year-p[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=p[a.year-p[0]];var l,u=o>>9&4095,c=o>>5&15,h=31&o,f=new Date(u,c-1,h),m=new Date(i.year,i.month-1,i.day);l=Math.round((m-f)/864e5);var g,v=d[a.year-d[0]];for(g=0;g<13;g++){var y=v&1<<12-g?30:29;if(l>13;return!b||g=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");var s;"object"==typeof n?(s=!1,a=n):(s=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:s}}var l;l=o.day-1;var u,c=d[o.year-d[0]],h=c>>13;u=h?o.month>h?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var f=0;f>9&4095,v=m>>5&15,y=31&m,b=new Date(g,v-1,y+l);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}var o=t("../main"),s=t("object-assign"),l=o.instance();n.prototype=new o.baseCalendar,s(n.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(c);return r?r[0]:""}var n=this._validateYear(t),i=t.month(),a=""+this.toChineseMonth(n,i);return e&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(t){if("string"==typeof t){var e=t.match(h);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=this.toChineseMonth(r,n),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(f);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=this.toChineseMonth(r,n),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"\u95f0"===e[0]&&(r=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var i=e[e.length-1];r="i"===i||"I"===i}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var n=this.intercalaryMonth(t);if(r&&e!==n||e<1||e>12)throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?!r&&e<=n?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(t=t.year(),e=t.month());var r=this.intercalaryMonth(t),n=r?12:11;if(e<0||e>n)throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>13},isIntercalaryMonth:function(t,e){t.year&&(t=t.year(),e=t.month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var n,i=this._validateYear(t,o.local.invalidyear),a=p[i-p[0]],s=a>>9&4095,u=a>>5&15,c=31&a;n=l.newDate(s,u,c),n.add(4-(n.dayOfWeek()||7),"d");var h=this.toJD(t,e,r)-n.toJD();return 1+Math.floor(h/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=d[t-d[0]];if(e>(r>>13?12:11))throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,s,r,o.local.invalidDate);t=this._validateYear(n.year()),e=n.month(),r=n.day();var i=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),u=a(t,s,r,i);return l.toJD(u.year,u.month,u.day)},fromJD:function(t){var e=l.fromJD(t),r=i(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(u),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var i=t.year(),a=t.month(),o=this.isIntercalaryMonth(i,a),s=this.toChineseMonth(i,a),l=Object.getPrototypeOf(n.prototype).add.call(this,t,e,r);if("y"===r){var u=l.year(),c=l.month(),h=this.isIntercalaryMonth(u,s),f=o&&h?this.toMonthIndex(u,s,!0):this.toMonthIndex(u,s,!1);f!==c&&l.month(f)}return l}});var u=/^\s*(-?\d\d\d\d|\d\d)[-\/](\d?\d)([iI]?)[-\/](\d?\d)/m,c=/^\d?\d[iI]?/m,h=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?\u6708/m,f=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;o.calendars.chinese=n;var d=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],p=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{"../main":561,"object-assign":452}],548:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Coptic",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()+(e.year()<0?1:0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),t<0&&t++,n.day()+30*(n.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),i.calendars.coptic=n},{"../main":561,"object-assign":452}],549:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,i.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n>=2&&n<=6},extraInfo:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return{century:o[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year()+(n.year()<0?1:0),e=n.month(),(r=n.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};i.calendars.discworld=n},{"../main":561,"object-assign":452}],550:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()+(e.year()<0?1:0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),t<0&&t++,n.day()+30*(n.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),i.calendars.ethiopian=n},{"../main":561,"object-assign":452}],551:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function i(t,e){return t-e*Math.floor(t/e)}var a=t("../main"),o=t("object-assign");n.prototype=new a.baseCalendar,o(n.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return t=t<0?t+1:t,i(7*t+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,a.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r) -;return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear).year(),this.toJD(t===-1?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,a.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===i(this.daysInYear(t),10)?30:9===e&&3===i(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var i=t<=0?t+1:t,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(var s=1;s=this.toJD(e===-1?1:e+1,7,1);)e++;for(var r=tthis.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),a.calendars.hebrew=n},{"../main":561,"object-assign":452}],552:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,i.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),e=n.month(),r=n.day(),t=t<=0?t+1:t,r+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),i.calendars.islamic=n},{"../main":561,"object-assign":452}],553:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()<0?e.year()+1:e.year();return t%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=e+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}}),i.calendars.julian=n},{"../main":561,"object-assign":452}],554:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function i(t,e){return t-e*Math.floor(t/e)}function a(t,e){return i(t-1,e)+1}var o=t("../main"),s=t("object-assign");n.prototype=new o.baseCalendar,s(n.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,o.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if(t=t.split("."),t.length<3)throw"Invalid Mayan year";for(var e=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,o.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate),!0},extraInfo:function(t,e,r){var n=this._validate(t,e,r,o.local.invalidDate),i=n.toJD(),a=this._toHaab(i),s=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[s[0]-1],tzolkinDay:s[0],tzolkinTrecena:s[1]}},_toHaab:function(t){t-=this.jdEpoch;var e=i(t+8+340,365);return[Math.floor(e/20)+1,i(e,20)]},_toTzolkin:function(t){return t-=this.jdEpoch,[a(t+20,20),a(t+4,13)]},toJD:function(t,e,r){var n=this._validate(t,e,r,o.local.invalidDate);return n.day()+20*n.month()+360*n.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),o.calendars.mayan=n},{"../main":561,"object-assign":452}],555:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar;var o=i.instance("gregorian");a(n.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidMonth),t=n.year();t<0&&t++;for(var a=n.day(),s=1;s=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),i.calendars.nanakshahi=n},{"../main":561,"object-assign":452}],556:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,i.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var a=i.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var u=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(t){var e=i.instance(),r=e.fromJD(t),n=r.year(),a=r.dayOfYear(),o=n+56;this._createMissingCalendarData(o);for(var s=9,l=this.NEPALI_CALENDAR_DATA[o][0],u=this.NEPALI_CALENDAR_DATA[o][s]-l+1;a>u;)s++,s>12&&(s=1,o++),u+=this.NEPALI_CALENDAR_DATA[o][s];var c=this.NEPALI_CALENDAR_DATA[o][s]-(u-a);return this.newDate(o,s,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,a.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var o=t-(t>=0?474:473),s=474+i(o,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(o/2820)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=t-this.toJD(475,1,1),r=Math.floor(e/1029983),n=i(e,1029983),a=2820;if(1029982!==n){var o=Math.floor(n/366),s=i(n,366);a=Math.floor((2134*o+2816*s+2815)/1028522)+o+1}var l=a+2820*r+474;l=l<=0?l-1:l;var u=t-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),h=t-this.toJD(l,c,1)+1;return this.newDate(l,c,h)}}),a.calendars.persian=n,a.calendars.jalali=n},{"../main":561,"object-assign":452}],558:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign"),o=i.instance();n.prototype=new i.baseCalendar,a(n.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(e.year());return o.leapYear(t)},weekOfYear:function(t,e,r){var n=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(n.year());return o.weekOfYear(t,n.month(),n.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),t=this._t2gYear(n.year());return o.toJD(t,n.month(),n.day())},fromJD:function(t){var e=o.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),i.calendars.taiwan=n},{"../main":561,"object-assign":452}],559:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign"),o=i.instance();n.prototype=new i.baseCalendar,a(n.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(e.year());return o.leapYear(t)},weekOfYear:function(t,e,r){var n=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(n.year());return o.weekOfYear(t,n.month(),n.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),t=this._t2gYear(n.year());return o.toJD(t,n.month(),n.day())},fromJD:function(t){var e=o.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),i.calendars.thai=n},{"../main":561,"object-assign":452}],560:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,i.local.invalidMonth),n=r.toJD()-24e5+.5,a=0,s=0;sn)return o[a]-o[a-1];a++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),a=12*(n.year()-1)+n.month()-15292;return n.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,u=e-o[r-1]+1;return this.newDate(s,l,u)},isValid:function(t,e,r){var n=i.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(t=null!=t.year?t.year:t,n=t>=1276&&t<=1500),n},_validate:function(t,e,r,n){var a=i.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}}),i.calendars.ummalqura=n -;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":561,"object-assign":452}],561:[function(t,e,r){function n(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(t,e){return t=""+t,"000000".substring(0,e-t.length)+t}function o(){this.shortYearCutoff="+10"}function s(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}var l=t("object-assign");l(n.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,i){return n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance(),n.newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,function(e){return t[e]})}},substituteChineseDigits:function(t,e){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),l(i.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),l(o.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new i(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+a(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0),i=t.day();"y"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(!function(t){for(;oe-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),i="m"===r?e:t.month(),a="d"===r?e:t.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var u=e.exports=new n;u.cdate=i,u.baseCalendar=o,u.calendars.gregorian=s},{"object-assign":452}],562:[function(t,e,r){var n=t("object-assign"),i=t("./main");n(i.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),i.local=i.regionalOptions[""],n(i.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.monthNumbers||this.local.monthNumbers,s=r.monthNamesShort||this.local.monthNamesShort,l=r.monthNames||this.local.monthNames,u=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;g+n1}),c=function(t,e,r,n){var i=""+e;if(u(t,n))for(;i.length1},b=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=e.substring(M).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=s[0].length,parseInt(s[0],10)},x=this,_=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s-1){d=1,p=m;for(var T=this.daysInMonth(f,d);p>T;T=this.daysInMonth(f,d))d++,p-=T}return h>-1?this.fromJD(h):this.newDate(f,d,p)},determineDate:function(t,e,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return e=e?e.newDate():null,t=null==t?e:"string"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}t=t.toLowerCase();for(var e=(t.match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||1/0===t||t===-1/0?e:a.today().add(t,"d"):a.newDate(t)}})},{"./main":561,"object-assign":452}],563:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}", -args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":103}],564:[function(t,e,r){"use strict";function n(t,e){var r=[];return e=+e||0,i(t.hi(t.shape[0]-1),r,e),r}e.exports=n;var i=t("./lib/zc-core")},{"./lib/zc-core":563}],565:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../color"),a=t("../../plots/cartesian/axes"),o=t("../../plots/cartesian/constants"),s=t("./attributes");e.exports=function(t,e,r,l,u){function c(r,i){return n.coerce(t,e,s,r,i)}l=l||{},u=u||{};var h=c("visible",!u.itemIsNotPlainObject),f=c("clicktoshow");if(!h&&!f)return e;c("opacity");var d=c("bgcolor"),p=c("bordercolor"),m=i.opacity(p);c("borderpad");var g=c("borderwidth"),v=c("showarrow");c("text",v?" ":"new text"),c("textangle"),n.coerceFont(c,"font",r.font),c("width"),c("align"),c("height")&&c("valign");for(var y=["x","y"],b=[-10,-30],x={_fullLayout:r},_=0;_<2;_++){var w=y[_],M=a.coerceRef(t,e,x,w,"","paper");if(a.coercePosition(e,x,c,M,w,.5),v){var k="a"+w,A=a.coerceRef(t,e,x,k,"pixel");"pixel"!==A&&A!==M&&(A=e[k]="pixel");var T="pixel"===A?b[_]:.4;a.coercePosition(e,x,c,A,k,T)}c(w+"anchor"),c(w+"shift")}if(n.noneOrAll(t,e,["x","y"]),v&&(c("arrowcolor",m?e.bordercolor:i.defaultLine),c("arrowhead"),c("arrowsize"),c("arrowwidth",2*(m&&g||1)),c("standoff"),n.noneOrAll(t,e,["ax","ay"])),f){var S=c("xclick"),E=c("yclick");e._xclick=void 0===S?e.x:S,e._yclick=void 0===E?e.y:E}var L=c("hovertext");if(L){var C=c("hoverlabel.bgcolor",i.opacity(d)?i.rgb(d):i.defaultLine),z=c("hoverlabel.bordercolor",i.contrast(C));n.coerceFont(c,"hoverlabel.font",{family:o.HOVERFONT,size:o.HOVERFONTSIZE,color:z})}return c("captureevents",!!L),e}},{"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/constants":729,"../color":578,"./attributes":567}],566:[function(t,e,r){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0},{path:"M2,2V-2H-2V2Z",backoff:0}]},{}],567:[function(t,e,r){"use strict";var n=t("./arrow_paths"),i=t("../../plots/font_attributes"),a=t("../../plots/cartesian/constants"),o=t("../../lib/extend").extendFlat;e.exports={_isLinkedToArray:"annotation",visible:{valType:"boolean",dflt:!0},text:{valType:"string"},textangle:{valType:"angle",dflt:0},font:o({},i,{}),width:{valType:"number",min:1,dflt:null},height:{valType:"number",min:1,dflt:null},opacity:{valType:"number",min:0,max:1,dflt:1},align:{valType:"enumerated",values:["left","center","right"],dflt:"center"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)"},borderpad:{valType:"number",min:0,dflt:1},borderwidth:{valType:"number",min:0,dflt:1},showarrow:{valType:"boolean",dflt:!0},arrowcolor:{valType:"color"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1},arrowsize:{valType:"number",min:.3,dflt:1},arrowwidth:{valType:"number",min:.1},standoff:{valType:"number",min:0,dflt:0},ax:{valType:"any"},ay:{valType:"any"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()]},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()]},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()]},x:{valType:"any"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},xshift:{valType:"number",dflt:0},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()]},y:{valType:"any"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"},yshift:{valType:"number",dflt:0},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1},xclick:{valType:"any"},yclick:{valType:"any"},hovertext:{valType:"string"},hoverlabel:{bgcolor:{valType:"color"},bordercolor:{valType:"color"},font:o({},i,{})},captureevents:{valType:"boolean"},_deprecated:{ref:{valType:"string"}}}},{"../../lib/extend":677,"../../plots/cartesian/constants":729,"../../plots/font_attributes":748,"./arrow_paths":566}],568:[function(t,e,r){"use strict";function n(t){var e=t._fullLayout;i.filterVisible(e.annotations).forEach(function(e){var r,n,i=a.getFromId(t,e.xref),o=a.getFromId(t,e.yref),s=3*e.arrowsize*e.arrowwidth||0;i&&i.autorange&&(r=s+e.xshift,n=s-e.xshift,e.axref===e.xref?(a.expand(i,[i.r2c(e.x)],{ppadplus:r,ppadminus:n}),a.expand(i,[i.r2c(e.ax)],{ppadplus:e._xpadplus,ppadminus:e._xpadminus})):a.expand(i,[i.r2c(e.x)],{ppadplus:Math.max(e._xpadplus,r),ppadminus:Math.max(e._xpadminus,n)})),o&&o.autorange&&(r=s-e.yshift,n=s+e.yshift,e.ayref===e.yref?(a.expand(o,[o.r2c(e.y)],{ppadplus:r,ppadminus:n}),a.expand(o,[o.r2c(e.ay)],{ppadplus:e._ypadplus,ppadminus:e._ypadminus})):a.expand(o,[o.r2c(e.y)],{ppadplus:Math.max(e._ypadplus,r),ppadminus:Math.max(e._ypadminus,n)}))})}var i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./draw").draw;e.exports=function(t){var e=t._fullLayout,r=i.filterVisible(e.annotations);if(r.length&&t._fullData.length){var s={};r.forEach(function(t){s[t.xref]=!0,s[t.yref]=!0});if(a.list(t).filter(function(t){return t.autorange&&s[t._id]}).length)return i.syncOrAsync([o,n],t)}}},{"../../lib":685,"../../plots/cartesian/axes":724,"./draw":572}],569:[function(t,e,r){"use strict";function n(t,e){var r=a(t,e);return r.on.length>0||r.explicitOff.length>0}function i(t,e){var r,n=a(t,e),i=n.on,s=n.off.concat(n.explicitOff),l={};if(i.length||s.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}j.selectAll("tspan.line").attr({y:0,x:0});var n=E.select(".annotation-math-group"),i=!n.empty(),h=d.bBox((i?n:j).node()),p=h.width,b=h.height,C=x.width||p,O=x.height||b,R=Math.round(C+2*z),F=Math.round(O+2*z);x._w=C,x._h=O;var N=!1;if(["x","y"].forEach(function(e){var n,i,a,o,s,h=x[e+"ref"]||e,f=x["a"+e+"ref"],d=c.getFromId(t,h),p=(A+("x"===e?0:-90))*Math.PI/180,m=R*Math.cos(p),g=F*Math.sin(p),v=Math.abs(m)+Math.abs(g),b=x[e+"anchor"],_=x[e+"shift"]*("x"===e?1:-1),w=k[e];if(d){var M=d.r2fraction(x[e]);if((t._dragging||!d.autorange)&&(M<0||M>1)&&(f===h?((M=d.r2fraction(x["a"+e]))<0||M>1)&&(N=!0):N=!0,N))return;n=d._offset+d.r2p(x[e]),o=.5}else"x"===e?(a=x[e],n=y.l+y.w*a):(a=1-x[e],n=y.t+y.h*a),o=x.showarrow?.5:a;if(x.showarrow){w.head=n;var T=x["a"+e];s=m*r(.5,x.xanchor)-g*r(.5,x.yanchor),f===h?(w.tail=d._offset+d.r2p(T),i=s):(w.tail=n+T,i=s+T),w.text=w.tail+s;var S=l["x"===e?"width":"height"];if("paper"===h&&(w.head=u.constrain(w.head,1,S-1)),"pixel"===f){var E=-Math.max(w.tail-3,w.text),L=Math.min(w.tail+3,w.text)-S;E>0?(w.tail+=E,w.text+=E):L>0&&(w.tail-=L,w.text-=L)}w.tail+=_,w.head+=_}else s=v*r(o,b),i=s,w.text=n+s;w.text+=_,s+=_,i+=_,x["_"+e+"padplus"]=v/2+i,x["_"+e+"padminus"]=v/2-i,x["_"+e+"size"]=v,x["_"+e+"shift"]=s}),N)return void E.remove();var B=0,U=0;if("left"!==x.align&&(B=(C-p)*("center"===x.align?.5:1)),"top"!==x.valign&&(U=(O-b)*("middle"===x.valign?.5:1)),i)n.select("svg").attr({x:z+B-1,y:z+U}).call(d.setClipUrl,I?_:null);else{var V=z+U-h.top,H=z+B-h.left;j.attr({x:H,y:V}).call(d.setClipUrl,I?_:null),j.selectAll("tspan.line").attr({y:V,x:H})}P.select("rect").call(d.setRect,z,z,C,O),D.call(d.setRect,L/2,L/2,R-L,F-L),E.call(d.setTranslate,Math.round(k.x.text-R/2),Math.round(k.y.text-F/2)),S.attr({transform:"rotate("+A+","+k.x.text+","+k.y.text+")"});var q="annotations["+e+"]",G=function(r,n){o.select(t).selectAll('.annotation-arrow-g[data-index="'+e+'"]').remove();var i=k.x.head,l=k.y.head,c=k.x.tail+r,h=k.y.tail+n,p=k.x.text+r,m=k.y.text+n,b=u.rotationXYMatrix(A,p,m),_=u.apply2DTransform(b),L=u.apply2DTransform2(b),C=+D.attr("width"),z=+D.attr("height"),I=p-.5*C,P=I+C,O=m-.5*z,j=O+z,R=[[I,O,I,j],[I,j,P,j],[P,j,P,O],[P,O,I,O]].map(L);if(!R.reduce(function(t,e){return t^!!a(i,l,i+1e6,l+1e6,e[0],e[1],e[2],e[3])},!1)){R.forEach(function(t){var e=a(c,h,i,l,t[0],t[1],t[2],t[3]);e&&(c=e.x,h=e.y)});var F=x.arrowwidth,N=x.arrowcolor,B=T.append("g").style({opacity:f.opacity(N)}).classed("annotation-arrow-g",!0).attr("data-index",String(e)),U=B.append("path").attr("d","M"+c+","+h+"L"+i+","+l).style("stroke-width",F+"px").call(f.stroke,f.rgb(N));if(v(U,x.arrowhead,"end",x.arrowsize,x.standoff),t._context.editable&&U.node().parentNode){var V=i,H=l;if(x.standoff){var G=Math.sqrt(Math.pow(i-c,2)+Math.pow(l-h,2));V+=x.standoff*(c-i)/G,H+=x.standoff*(h-l)/G}var Y,W,X,Z=B.append("path").classed("annotation",!0).classed("anndrag",!0).attr({"data-index":String(e),d:"M3,3H-3V-3H3ZM0,0L"+(c-V)+","+(h-H),transform:"translate("+V+","+H+")"}).style("stroke-width",F+6+"px").call(f.stroke,"rgba(0,0,0,0)").call(f.fill,"rgba(0,0,0,0)");g.init({element:Z.node(),prepFn:function(){var t=d.getTranslate(E);W=t.x,X=t.y,Y={},w&&w.autorange&&(Y[w._name+".autorange"]=!0),M&&M.autorange&&(Y[M._name+".autorange"]=!0)},moveFn:function(t,e){var r=_(W,X),n=r[0]+t,i=r[1]+e;E.call(d.setTranslate,n,i),Y[q+".x"]=w?w.p2r(w.r2p(x.x)+t):x.x+t/y.w,Y[q+".y"]=M?M.p2r(M.r2p(x.y)+e):x.y-e/y.h,x.axref===x.xref&&(Y[q+".ax"]=w.p2r(w.r2p(x.ax)+t)),x.ayref===x.yref&&(Y[q+".ay"]=M.p2r(M.r2p(x.ay)+e)),B.attr("transform","translate("+t+","+e+")"),S.attr({transform:"rotate("+A+","+n+","+i+")"})},doneFn:function(e){if(e){s.relayout(t,Y);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}};if(x.showarrow&&G(0,0),t._context.editable){var Y,W;g.init({element:E.node(),prepFn:function(){W=S.attr("transform"),Y={}},moveFn:function(t,e){var r="pointer";if(x.showarrow)x.axref===x.xref?Y[q+".ax"]=w.p2r(w.r2p(x.ax)+t):Y[q+".ax"]=x.ax+t,x.ayref===x.yref?Y[q+".ay"]=M.p2r(M.r2p(x.ay)+e):Y[q+".ay"]=x.ay+e,G(t,e);else{if(w)Y[q+".x"]=x.x+t/w._m;else{var n=x._xsize/y.w,i=x.x+(x._xshift-x.xshift)/y.w-n/2;Y[q+".x"]=g.align(i+t/y.w,n,0,1,x.xanchor)}if(M)Y[q+".y"]=x.y+e/M._m;else{var a=x._ysize/y.h,o=x.y-(x._yshift+x.yshift)/y.h-a/2;Y[q+".y"]=g.align(o-e/y.h,a,0,1,x.yanchor)}w&&M||(r=g.getCursor(w?.5:Y[q+".x"],M?.5:Y[q+".y"],x.xanchor,x.yanchor))}S.attr({transform:"translate("+t+","+e+")"+W}),m(E,r)},doneFn:function(e){if(m(E),e){s.relayout(t,Y);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}var i=t.layout,l=t._fullLayout,y=t._fullLayout._size;l._infolayer.selectAll('.annotation[data-index="'+e+'"]').remove();var b=(i.annotations||[])[e],x=l.annotations[e],_="clip"+l._uid+"_ann"+e;if(!b||x.visible===!1)return void o.selectAll("#"+_).remove();var w=c.getFromId(t,x.xref),M=c.getFromId(t,x.yref),k={x:{},y:{}},A=+x.textangle||0,T=l._infolayer.append("g").classed("annotation",!0).attr("data-index",String(e)).style("opacity",x.opacity),S=T.append("g").classed("annotation-text-g",!0).attr("data-index",String(e)),E=S.append("g").style("pointer-events",x.captureevents?"all":null).call(m,"default").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",{index:e,annotation:b,fullAnnotation:x})});x.hovertext&&E.on("mouseover",function(){var e=x.hoverlabel,r=e.font,n=this.getBoundingClientRect(),i=t.getBoundingClientRect();h.loneHover({x0:n.left-i.left,x1:n.right-i.left,y:(n.top+n.bottom)/2-i.top,text:x.hovertext,color:e.bgcolor,borderColor:e.bordercolor,fontFamily:r.family,fontSize:r.size,fontColor:r.color},{container:l._hoverlayer.node(),outerContainer:l._paper.node()})}).on("mouseout",function(){h.loneUnhover(l._hoverlayer.node())});var L=x.borderwidth,C=x.borderpad,z=L+C,D=E.append("rect").attr("class","bg").style("stroke-width",L+"px").call(f.stroke,x.bordercolor).call(f.fill,x.bgcolor),I=x.width||x.height,P=l._defs.select(".clips").selectAll("#"+_).data(I?[0]:[]);P.enter().append("clipPath").classed("annclip",!0).attr("id",_).append("rect"),P.exit().remove();var O=x.font,j=E.append("text").classed("annotation",!0).attr("data-unformatted",x.text).text(x.text);t._context.editable?j.call(p.makeEditable,E).call(r).on("edit",function(n){x.text=n,this.attr({"data-unformatted":x.text}),this.call(r);var i={};i["annotations["+e+"].text"]=x.text,w&&w.autorange&&(i[w._name+".autorange"]=!0),M&&M.autorange&&(i[M._name+".autorange"]=!0),s.relayout(t,i)}):j.call(r)}function a(t,e,r,n,i,a,o,s){var l=r-t,u=i-t,c=o-i,h=n-e,f=a-e,d=s-a,p=l*d-c*h;if(0===p)return null;var m=(u*d-c*f)/p,g=(u*h-l*f)/p;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+h*m}}var o=t("d3"),s=t("../../plotly"),l=t("../../plots/plots"),u=t("../../lib"),c=t("../../plots/cartesian/axes"),h=t("../../plots/cartesian/graph_interact"),f=t("../color"),d=t("../drawing"),p=t("../../lib/svg_text_utils"),m=t("../../lib/setcursor"),g=t("../dragelement"),v=t("./draw_arrow_head");e.exports={draw:n,drawOne:i}},{"../../lib":685,"../../lib/setcursor":700,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"../../plots/plots":787,"../color":578,"../dragelement":599,"../drawing":602,"./draw_arrow_head":573,d3:107}],573:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("../color"),o=t("../drawing"),s=t("./arrow_paths");e.exports=function(t,e,r,l,u){function c(){t.style("stroke-dasharray","0px,100px")}function h(r,i){d.path&&(e>5&&(i=0),n.select(f.parentElement).append("path").attr({class:t.attr("class"),d:d.path,transform:"translate("+r.x+","+r.y+")rotate("+180*i/Math.PI+")scale("+y+")"}).style({fill:b,opacity:x,"stroke-width":0}))}i(l)||(l=1);var f=t.node(),d=s[e||0];"string"==typeof r&&r||(r="end");var p,m,g,v,y=(o.getPx(t,"stroke-width")||1)*l,b=t.style("stroke")||a.defaultLine,x=t.style("stroke-opacity")||1,_=r.indexOf("start")>=0,w=r.indexOf("end")>=0,M=d.backoff*y+u;if("line"===f.nodeName){p={x:+t.attr("x1"),y:+t.attr("y1")},m={x:+t.attr("x2"),y:+t.attr("y2")};var k=p.x-m.x,A=p.y-m.y;if(g=Math.atan2(A,k),v=g+Math.PI,M){if(M*M>k*k+A*A)return void c();var T=M*Math.cos(g),S=M*Math.sin(g);_&&(p.x-=T,p.y-=S,t.attr({x1:p.x,y1:p.y})),w&&(m.x+=T,m.y+=S,t.attr({x2:m.x,y2:m.y}))}}else if("path"===f.nodeName){var E=f.getTotalLength(),L="";if(E=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}var i=t("tinycolor2"),a=t("fast-isnumeric"),o=e.exports={},s=t("./attributes");o.defaults=s.defaults;var l=o.defaultLine=s.defaultLine;o.lightLine=s.lightLine;var u=o.background=s.background;o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(i(t))},o.opacity=function(t){return t?i(t).getAlpha():0},o.addOpacity=function(t,e){var r=i(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=i(t).toRgb();if(1===r.a)return i(t).toRgbString();var n=i(e||u).toRgb(),a=1===n.a?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return i(o).toRgbString()},o.contrast=function(t,e,r){var n=i(t);return 1!==n.getAlpha()&&(n=i(o.combine(t,u))),(n.isDark()?e?n.lighten(e):u:r?n.darken(r):l).toString()},o.stroke=function(t,e){var r=i(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=i(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,i,a,s=Object.keys(t);for(e=0;es&&(a[1]-=(st-s)/2):r.node()&&!r.classed("js-placeholder")&&(st=d.bBox(e.node()).height),st){if(st+=5,"top"===_.titleside)$.domain[1]-=st/T.h,a[1]*=-1;else{$.domain[0]+=st/T.h;var u=Math.max(1,r.selectAll("tspan.line").size());a[1]+=(1-u)*s}e.attr("transform","translate("+a+")"),$.setScale()}}at.selectAll(".cbfills,.cblines,.cbaxis").attr("transform","translate(0,"+Math.round(T.h*(1-$.domain[1]))+")");var h=at.select(".cbfills").selectAll("rect.cbfill").data(C);h.enter().append("rect").classed("cbfill",!0).style("stroke","none"),h.exit().remove(),h.each(function(t,e){var r=[0===e?E[0]:(C[e]+C[e-1])/2,e===C.length-1?E[1]:(C[e]+C[e+1])/2].map($.c2p).map(Math.round);e!==C.length-1&&(r[1]+=r[1]>r[0]?1:-1);var a=D(t).replace("e-",""),o=i(a).toHexString();n.select(this).attr({x:W,width:Math.max(B,2),y:n.min(r),height:Math.max(n.max(r)-n.min(r),2),fill:o})});var f=at.select(".cblines").selectAll("path.cbline").data(_.line.color&&_.line.width?L:[]);return f.enter().append("path").classed("cbline",!0),f.exit().remove(),f.each(function(t){n.select(this).attr("d","M"+W+","+(Math.round($.c2p(t))+_.line.width/2%1)+"h"+B).call(d.lineGroupStyle,_.line.width,z(t),_.line.dash)}),$._axislayer.selectAll("g."+$._id+"tick,path").remove(),$._pos=W+B+(_.outlinewidth||0)/2-("outside"===_.ticks?1:0),$.side="right",c.syncOrAsync([function(){return l.doTicks(t,$,!0)},function(){if(["top","bottom"].indexOf(_.titleside)===-1){var e=$.titlefont.size,r=$._offset+$._length/2,i=T.l+($.position||0)*T.w+("right"===$.side?10+e*($.showticklabels?1:.5):-10-e*($.showticklabels?.5:0));M("h"+$._id+"title",{avoid:{selection:n.select(t).selectAll("g."+$._id+"tick"),side:_.titleside,offsetLeft:T.l,offsetTop:T.t,maxShift:A.width},attributes:{x:i,y:r,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}}])}function M(e,r){var n,i=x();n=s.traceIs(i,"markerColorscale")?"marker.colorbar.title":"colorbar.title";var a={propContainer:$,propName:n,traceIndex:i.index,dfltName:"colorscale",containerGroup:at.select(".cbtitle")},o="h"===e.charAt(0)?e.substr(1):"h"+e;at.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(t,e,h(a,r||{}))}function k(){var r=B+_.outlinewidth/2+d.bBox($._axislayer.node()).width;if(R=ot.select("text"),R.node()&&!R.classed("js-placeholder")){var n,i=ot.select(".h"+$._id+"title-math-group").node();n=i&&["top","bottom"].indexOf(_.titleside)!==-1?d.bBox(i).width:d.bBox(ot.node()).right-W-T.l,r=Math.max(r,n)}var a=2*_.xpad+r+_.borderwidth+_.outlinewidth/2,s=J-Q;at.select(".cbbg").attr({x:W-_.xpad-(_.borderwidth+_.outlinewidth)/2,y:Q-G,width:Math.max(a,2),height:Math.max(s+2*G,2)}).call(p.fill,_.bgcolor).call(p.stroke,_.bordercolor).style({"stroke-width":_.borderwidth}),at.selectAll(".cboutline").attr({x:W,y:Q+_.ypad+("top"===_.titleside?st:0),width:Math.max(B,2),height:Math.max(s-2*_.ypad-st,2)}).call(p.stroke,_.outlinecolor).style({fill:"None","stroke-width":_.outlinewidth});var l=({center:.5,right:1}[_.xanchor]||0)*a;at.attr("transform","translate("+(T.l-l)+","+T.t+")"),o.autoMargin(t,e,{x:_.x,y:_.y,l:a*({right:1,center:.5}[_.xanchor]||0),r:a*({left:1,center:.5}[_.xanchor]||0),t:s*({bottom:1,middle:.5}[_.yanchor]||0),b:s*({top:1,middle:.5}[_.yanchor]||0)})}var A=t._fullLayout,T=A._size -;if("function"!=typeof _.fillcolor&&"function"!=typeof _.line.color)return void A._infolayer.selectAll("g."+e).remove();var S,E=n.extent(("function"==typeof _.fillcolor?_.fillcolor:_.line.color).domain()),L=[],C=[],z="function"==typeof _.line.color?_.line.color:function(){return _.line.color},D="function"==typeof _.fillcolor?_.fillcolor:function(){return _.fillcolor},I=_.levels.end+_.levels.size/100,P=_.levels.size,O=1.001*E[0]-.001*E[1],j=1.001*E[1]-.001*E[0];for(S=_.levels.start;(S-I)*P<0;S+=P)S>O&&SE[0]&&S1){var it=Math.pow(10,Math.floor(Math.log(nt)/Math.LN10));et*=it*c.roundUp(nt/it,[2,5,10]),(Math.abs(_.levels.start)/_.levels.size+1e-6)%1<2e-6&&($.tick0=0)}$.dtick=et}$.domain=[Z+Y,Z+H-Y],$.setScale();var at=A._infolayer.selectAll("g."+e).data([0]);at.enter().append("g").classed(e,!0).each(function(){var t=n.select(this);t.append("rect").classed("cbbg",!0),t.append("g").classed("cbfills",!0),t.append("g").classed("cblines",!0),t.append("g").classed("cbaxis",!0).classed("crisp",!0),t.append("g").classed("cbtitleunshift",!0).append("g").classed("cbtitle",!0),t.append("rect").classed("cboutline",!0),t.select(".cbtitle").datum(0)}),at.attr("transform","translate("+Math.round(T.l)+","+Math.round(T.t)+")");var ot=at.select(".cbtitleunshift").attr("transform","translate(-"+Math.round(T.l)+",-"+Math.round(T.t)+")");$._axislayer=at.select(".cbaxis");var st=0;if(["top","bottom"].indexOf(_.titleside)!==-1){var lt,ut=T.l+(_.x+q)*T.w,ct=$.titlefont.size;lt="top"===_.titleside?(1-(Z+H-Y))*T.h+T.t+3+.75*ct:(1-(Z+Y))*T.h+T.t-3-.25*ct,M($._id+"title",{attributes:{x:ut,y:lt,"text-anchor":"start"}})}var ht=c.syncOrAsync([o.previousPromises,w,o.previousPromises,k],t);if(ht&&ht.then&&(t._promises||[]).push(ht),t._context.editable){var ft,dt,pt;u.init({element:at.node(),prepFn:function(){ft=at.attr("transform"),f(at)},moveFn:function(t,e){at.attr("transform",ft+" translate("+t+","+e+")"),dt=u.align(X+t/T.w,U,0,1,_.xanchor),pt=u.align(Z-e/T.h,H,0,1,_.yanchor);var r=u.getCursor(dt,pt,_.xanchor,_.yanchor);f(at,r)},doneFn:function(e){f(at),e&&void 0!==dt&&void 0!==pt&&a.restyle(t,{"colorbar.x":dt,"colorbar.y":pt},x().index)}})}return ht}function x(){var r,n,i=e.substr(2);for(r=0;r=0?i.Reds:i.Blues,l.colorscale=m,s.reversescale&&(m=a(m)),s.colorscale=m)}},{"../../lib":685,"./flip_scale":589,"./scales":596}],585:[function(t,e,r){"use strict";var n=t("./attributes"),i=t("../../lib/extend").extendDeep;t("./scales.js");e.exports=function(t){return{color:{valType:"color",arrayOk:!0},colorscale:i({},n.colorscale,{}),cauto:i({},n.zauto,{}),cmax:i({},n.zmax,{}),cmin:i({},n.zmin,{}),autocolorscale:i({},n.autocolorscale,{}),reversescale:i({},n.reversescale,{})}}},{"../../lib/extend":677,"./attributes":583,"./scales.js":596}],586:[function(t,e,r){"use strict";var n=t("./scales");e.exports=n.RdBu},{"./scales":596}],587:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../colorbar/has_colorbar"),o=t("../colorbar/defaults"),s=t("./is_valid_scale"),l=t("./flip_scale");e.exports=function(t,e,r,u,c){var h=c.prefix,f=c.cLetter,d=h.slice(0,h.length-1),p=h?i.nestedProperty(t,d).get()||{}:t,m=h?i.nestedProperty(e,d).get()||{}:e,g=p[f+"min"],v=p[f+"max"],y=p.colorscale;u(h+f+"auto",!(n(g)&&n(v)&&g=0;i--,a++)e=t[i],n[a]=[1-e[0],e[1]];return n}},{}],590:[function(t,e,r){"use strict";var n=t("./scales"),i=t("./default_scale"),a=t("./is_valid_scale_array");e.exports=function(t,e){function r(){try{t=n[t]||JSON.parse(t)}catch(r){t=e}}return e||(e=i),t?("string"==typeof t&&(r(),"string"==typeof t&&r()),a(t)?t:e):e}},{"./default_scale":586,"./is_valid_scale_array":594,"./scales":596}],591:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("./is_valid_scale");e.exports=function(t,e){var r=e?i.nestedProperty(t,e).get()||{}:t,o=r.color,s=!1;if(Array.isArray(o))for(var l=0;l4/3-s?o:s}},{}],598:[function(t,e,r){"use strict";var n=t("../../lib"),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},{"../../lib":685}],599:[function(t,e,r){"use strict";function n(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function i(t){t._dragging=!1,t._replotPending&&a.plot(t)}var a=t("../../plotly"),o=t("../../lib"),s=t("../../plots/cartesian/constants"),l=t("../../constants/interactions"),u=e.exports={};u.align=t("./align"),u.getCursor=t("./cursor");var c=t("./unhover");u.unhover=c.wrapped,u.unhoverRaw=c.raw,u.init=function(t){function e(e){return t.element.onmousemove=m,g._dragged=!1,g._dragging=!0,c=e.clientX,h=e.clientY,p=e.target,f=(new Date).getTime(),f-g._mouseDownTimey&&(v=Math.max(v-1,1)),t.doneFn&&t.doneFn(g._dragged,v,e),!g._dragged){var r;try{r=new MouseEvent("click",e)}catch(t){r=document.createEvent("MouseEvents"),r.initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}p.dispatchEvent(r)}return i(g),g._dragged=!1,o.pauseEvent(e)}var c,h,f,d,p,m,g=o.getPlotDiv(t.element)||{},v=1,y=l.DBLCLICKDELAY;g._mouseDownTime||(g._mouseDownTime=0),m=t.element.onmousemove,t.setCursor&&(t.element.onmousemove=t.setCursor),t.element.onmousedown=e,t.element.style.pointerEvents="all"},u.coverSlip=n},{"../../constants/interactions":665,"../../lib":685,"../../plotly":719,"../../plots/cartesian/constants":729,"./align":597,"./cursor":598,"./unhover":600}],600:[function(t,e,r){"use strict";var n=t("../../lib/events"),i=e.exports={};i.wrapped=function(t,e,r){"string"==typeof t&&(t=document.getElementById(t)),t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),i.raw(t,e,r)},i.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&n.triggerHandler(t,"plotly_beforehover",e)===!1||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},{"../../lib/events":676}],601:[function(t,e,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid"}},{}],602:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){if(s.traceIs(r,"symbols")){var u=p(r);e.attr("d",function(t){var e;e="various"===t.ms||"various"===a.size?3:d.isBubble(r)?u(t.ms):(a.size||6)/2,t.mrc=e;var n=m.symbolNumber(t.mx||a.symbol)||0,i=n%100;return t.om=n%200>=100,m.symbolFuncs[i](e)+(n>=200?y:"")}).style("opacity",function(t){return(t.mo+1||a.opacity+1)-1})}var c,h,f;t.so?(f=o.outlierwidth,h=o.outliercolor,c=a.outliercolor):(f=(t.mlw+1||o.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,h="mlc"in t?t.mlcc=i(t.mlc):Array.isArray(o.color)?l.defaultLine:o.color,c="mc"in t?t.mcc=n(t.mc):Array.isArray(a.color)?l.defaultLine:a.color||"rgba(0,0,0,0)"),t.om?e.call(l.stroke,c).style({"stroke-width":(f||1)+"px",fill:"none"}):(e.style("stroke-width",f+"px").call(l.fill,c),f&&e.call(l.stroke,h))}function i(t,e,r,n){var i=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],u=Math.pow(i*i+o*o,x/2),c=Math.pow(s*s+l*l,x/2),h=(c*c*i-u*u*s)*n,f=(c*c*o-u*u*l)*n,d=3*c*(u+c),p=3*u*(u+c);return[[a.round(e[0]+(d&&h/d),2),a.round(e[1]+(d&&f/d),2)],[a.round(e[0]-(p&&h/p),2),a.round(e[1]-(p&&f/p),2)]]}var a=t("d3"),o=t("fast-isnumeric"),s=t("../../registry"),l=t("../color"),u=t("../colorscale"),c=t("../../lib"),h=t("../../lib/svg_text_utils"),f=t("../../constants/xmlns_namespaces"),d=t("../../traces/scatter/subtypes"),p=t("../../traces/scatter/make_bubble_size_func"),m=e.exports={};m.font=function(t,e,r,n){e&&e.family&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(l.fill,n)},m.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},m.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},m.setRect=function(t,e,r,n,i){t.call(m.setPosition,e,r).call(m.setSize,n,i)},m.translatePoint=function(t,e,r,n){var i=t.xp||r.c2p(t.x),a=t.yp||n.c2p(t.y);o(i)&&o(a)&&e.node()?"text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform","translate("+i+","+a+")"):e.remove()},m.translatePoints=function(t,e,r,n){t.each(function(t){var i=a.select(this);m.translatePoint(t,i,e,r,n)})},m.getPx=function(t,e){return Number(t.style(e).replace(/px$/,""))},m.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},m.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";l.stroke(e,n||a.color),m.dashLine(e,s,o)},m.lineGroupStyle=function(t,e,r,n){t.style("fill","none").each(function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},o=e||i.width||0,s=n||i.dash||"";a.select(this).call(l.stroke,r||i.color).call(m.dashLine,s,o)})},m.dashLine=function(t,e,r){r=+r||0,e=m.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},m.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},m.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(e){var r=a.select(this);try{r.call(l.fill,e[0].trace.fillcolor)}catch(e){c.error(e,t),r.remove()}})};var g=t("./symbol_defs");m.symbolNames=[],m.symbolFuncs=[],m.symbolNeedLines={},m.symbolNoDot={},m.symbolList=[],Object.keys(g).forEach(function(t){var e=g[t];m.symbolList=m.symbolList.concat([e.n,t,e.n+100,t+"-open"]),m.symbolNames[e.n]=t,m.symbolFuncs[e.n]=e.f,e.needLine&&(m.symbolNeedLines[e.n]=!0),e.noDot?m.symbolNoDot[e.n]=!0:m.symbolList=m.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"])});var v=m.symbolNames.length,y="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";m.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=m.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=v||t>=400?0:Math.floor(Math.max(t,0))},m.singlePointStyle=function(t,e,r){var i=r.marker,a=i.line;n(t,e,r,m.tryColorscale(i,""),m.tryColorscale(i,"line"),i,a)},m.pointStyle=function(t,e){if(t.size()){var r=e.marker,n=m.tryColorscale(r,""),i=m.tryColorscale(r,"line");t.each(function(t){m.singlePointStyle(t,a.select(this),e,n,i)})}},m.tryColorscale=function(t,e){var r=e?c.nestedProperty(t,e).get():t,n=r.colorscale,i=r.color;return n&&Array.isArray(i)?u.makeColorScaleFunc(u.extractScale(n,r.cmin,r.cmax)):c.identity};var b={start:1,end:-1,middle:0,bottom:1,top:-1};m.textPointStyle=function(t,e){t.each(function(t){var r=a.select(this),n=t.tx||e.text;if(!n||Array.isArray(n))return void r.remove();var i=t.tp||e.textposition,s=i.indexOf("top")!==-1?"top":i.indexOf("bottom")!==-1?"bottom":"middle",l=i.indexOf("left")!==-1?"end":i.indexOf("right")!==-1?"start":"middle",u=t.ts||e.textfont.size,c=t.mrc?t.mrc/.8+1:0;u=o(u)&&u>0?u:0,r.call(m.font,t.tf||e.textfont.family,u,t.tc||e.textfont.color).attr("text-anchor",l).text(n).call(h.convertToTspans);var f=a.select(this.parentNode),d=r.selectAll("tspan.line"),p=1.3*((d[0].length||1)-1)+1,g=b[l]*c,v=.75*u+b[s]*c+(b[s]-1)*p*u/2;f.attr("transform","translate("+g+","+v+")"),p>1&&d.attr({x:r.attr("x"),y:r.attr("y")})})};var x=.5;m.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],a=[];for(r=1;r=1e4&&(a.selectAll("[data-bb]").attr("data-bb",null),M=[]),t.setAttribute("data-bb",M.length),M.push(l),c.extendFlat({},l)},m.setClipUrl=function(t,e){if(!e)return void t.attr("clip-path",null);var r="#"+e,n=a.select("base");n.size()&&n.attr("href")&&(r=window.location.href.split("#")[0]+r),t.attr("clip-path","url("+r+")")},m.getTranslate=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}},m.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a+=" translate("+e+", "+r+")",a=a.trim(),t[i]("transform",a),a},m.getScale=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}},m.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a+=" scale("+e+", "+r+")",a=a.trim(),t[i]("transform",a),a},m.setPointGroupScale=function(t,e,r){var n,i,a;return e=e||1,r=r||1,i=1===e&&1===r?"":" scale("+e+","+r+")",a=/\s*sc.*/,t.each(function(){n=(this.getAttribute("transform")||"").replace(a,""),n+=i,n=n.trim(),this.setAttribute("transform",n)}),i},m.measureText=function(t,e,r){var n=t.append("text").text(e).call(m.font,r),i=m.bBox(n.node());return n.remove(),i}},{"../../constants/xmlns_namespaces":668,"../../lib":685,"../../lib/svg_text_utils":704,"../../registry":802,"../../traces/scatter/make_bubble_size_func":991,"../../traces/scatter/subtypes":996,"../color":578,"../colorscale":592,"./symbol_defs":603,d3:107,"fast-isnumeric":116}],603:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,i="l"+e+",-"+e,a="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+i+a+i+a+o+a+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),i=n.round(-t,2),a=n.round(t*-.309,2);return"M"+e+","+a+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+a+"L0,"+i+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M"+i+",-"+r+"V"+r+"L0,"+e+"L-"+i+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+i+"H"+r+"L"+e+",0L"+r+",-"+i+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),i=n.round(.951*e,2),a=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(e*-.309,2),u=n.round(.118*e,2),c=n.round(.809*e,2);return"M"+r+","+l+"H"+i+"L"+a+","+u+"L"+o+","+c+"L0,"+n.round(.382*e,2)+"L-"+o+","+c+"L-"+a+","+u+"L-"+i+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),i=n.round(.76*t,2);return"M-"+i+",0l-"+r+",-"+e+"h"+i+"l"+r+",-"+e+"l"+r+","+e+"h"+i+"l-"+r+","+e+"l"+r+","+e+"h-"+i+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+i+o+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+i+o+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+i+"-"+e+","+e+i+e+","+e+i+e+",-"+e+i+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+i+"0,"+e+i+e+",0"+i+"0,-"+e+i+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+","+i+"L0,0M"+e+","+i+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+",-"+i+"L0,0M"+e+",-"+i+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2) -;return"M"+i+","+e+"L0,0M"+i+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+i+","+e+"L0,0M-"+i+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0}}},{d3:107}],604:[function(t,e,r){"use strict";e.exports={visible:{valType:"boolean"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"]},symmetric:{valType:"boolean"},array:{valType:"data_array"},arrayminus:{valType:"data_array"},value:{valType:"number",min:0,dflt:10},valueminus:{valType:"number",min:0,dflt:10},traceref:{valType:"integer",min:0,dflt:0},tracerefminus:{valType:"integer",min:0,dflt:0},copy_ystyle:{valType:"boolean"},copy_zstyle:{valType:"boolean"},color:{valType:"color"},thickness:{valType:"number",min:0,dflt:2},width:{valType:"number",min:0},_deprecated:{opacity:{valType:"number"}}}},{}],605:[function(t,e,r){"use strict";function n(t,e,r,n){var a=e["error_"+n]||{},l=a.visible&&["linear","log"].indexOf(r.type)!==-1,u=[];if(l){for(var c=s(a),h=0;h0;t.each(function(t){var e,h=t[0].trace,f=h.error_x||{},d=h.error_y||{};h.ids&&(e=function(t){return t.id});var p=o.hasMarkers(h)&&h.marker.maxdisplayed>0;if(d.visible||f.visible){var m=i.select(this).selectAll("g.errorbar").data(t,e);m.exit().remove(),m.style("opacity",1);var g=m.enter().append("g").classed("errorbar",!0);c&&g.style("opacity",0).transition().duration(r.duration).style("opacity",1),m.each(function(t){var e=i.select(this),o=n(t,l,u);if(!p||t.vis){var h;if(d.visible&&a(o.x)&&a(o.yh)&&a(o.ys)){var m=d.width;h="M"+(o.x-m)+","+o.yh+"h"+2*m+"m-"+m+",0V"+o.ys,o.noYS||(h+="m-"+m+",0h"+2*m);var g=e.select("path.yerror");s=!g.size(),s?g=e.append("path").classed("yerror",!0):c&&(g=g.transition().duration(r.duration).ease(r.easing)),g.attr("d",h)}if(f.visible&&a(o.y)&&a(o.xh)&&a(o.xs)){var v=(f.copy_ystyle?d:f).width;h="M"+o.xh+","+(o.y-v)+"v"+2*v+"m0,-"+v+"H"+o.xs,o.noXS||(h+="m0,-"+v+"v"+2*v);var y=e.select("path.xerror");s=!y.size(),s?y=e.append("path").classed("xerror",!0):c&&(y=y.transition().duration(r.duration).ease(r.easing)),y.attr("d",h)}}})}})}},{"../../traces/scatter/subtypes":996,d3:107,"fast-isnumeric":116}],610:[function(t,e,r){"use strict";var n=t("d3"),i=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)})}},{"../color":578,d3:107}],611:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/constants");e.exports={_isLinkedToArray:"image",visible:{valType:"boolean",dflt:!0},source:{valType:"string"},layer:{valType:"enumerated",values:["below","above"],dflt:"above"},sizex:{valType:"number",dflt:0},sizey:{valType:"number",dflt:0},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain"},opacity:{valType:"number",min:0,max:1,dflt:1},x:{valType:"any",dflt:0},y:{valType:"any",dflt:0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper"}}},{"../../plots/cartesian/constants":729}],612:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib/to_log_range");e.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,u,c=t._fullLayout.images,h=e._id.charAt(0),f=0;f=2/3},r.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3},r.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],617:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.defaultLine},borderwidth:{valType:"number",min:0,dflt:0},font:a({},n,{}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"]},tracegroupgap:{valType:"number",min:0,dflt:10},x:{valType:"number",min:-2,max:3,dflt:1.02},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"}}},{"../../lib/extend":677,"../../plots/font_attributes":748,"../color/attributes":577}],618:[function(t,e,r){"use strict";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4}},{}],619:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("./attributes"),o=t("../../plots/layout_attributes"),s=t("./helpers");e.exports=function(t,e,r){function l(t,e){return i.coerce(d,p,a,t,e)}for(var u,c,h,f,d=t.legend||{},p=e.legend={},m=0,g="normal",v=0;v1)!==!1){if(l("bgcolor",e.paper_bgcolor),l("bordercolor"),l("borderwidth"),i.coerceFont(l,"font",e.font),l("orientation"),"h"===p.orientation){var b=t.xaxis;b&&b.rangeslider&&b.rangeslider.visible?(u=0,h="left",c=1.1,f="bottom"):(u=0,h="left",c=-.1,f="top")}l("traceorder",g),s.isGrouped(e.legend)&&l("tracegroupgap"),l("x",u),l("xanchor",h),l("y",c),l("yanchor",f),i.noneOrAll(d,p,["x","y"])}}},{"../../lib":685,"../../plots/layout_attributes":778,"../../registry":802,"./attributes":617,"./helpers":622}],620:[function(t,e,r){"use strict";function n(t,e){function r(r){y.convertToTspans(r,function(){r.selectAll("tspan.line").attr({x:r.attr("x")}),t.call(o,e)})}var n=t.data()[0][0],i=e._fullLayout,a=n.trace,s=p.traceIs(a,"pie"),l=a.index,u=s?n.label:a.name,c=t.selectAll("text.legendtext").data([0]);c.enter().append("text").classed("legendtext",!0),c.attr({x:40,y:0,"data-unformatted":u}).style("text-anchor","start").classed("user-select-none",!0).call(g.font,i.legend.font).text(u),e._context.editable&&!s?c.call(y.makeEditable).call(r).on("edit",function(t){this.attr({"data-unformatted":t}),this.text(t).call(r),this.text()||(t=" ");var i,a=n.trace._fullInput||{};if(["ohlc","candlestick"].indexOf(a.type)!==-1){var o=n.trace.transforms;i=o[o.length-1].direction+".name"}else i="name";h.restyle(e,i,t,l)}):c.call(r)}function i(t,e){var r,n=1,i=t.selectAll("rect").data([0]);i.enter().append("rect").classed("legendtoggle",!0).style("cursor","pointer").attr("pointer-events","all").call(v.fill,"rgba(0,0,0,0)"),i.on("mousedown",function(){r=(new Date).getTime(),r-e._legendMouseDownTimeT&&(n=Math.max(n-1,1)),1===n?r._clickTimeout=setTimeout(function(){a(t,e,n)},T):2===n&&(r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0,a(t,e,n))}})}function a(t,e,r){if(!e._dragged&&!e._editing){var n,i,a=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],o=t.data()[0][0],s=e._fullData,l=o.trace,u=l.legendgroup,c=[];if(1===r&&A&&e.data&&e._context.showTips?(f.notifier("Double click on legend to isolate individual trace","long"),A=!1):A=!1,p.traceIs(l,"pie")){var d=o.label,m=a.indexOf(d);1===r?m===-1?a.push(d):a.splice(m,1):2===r&&(a=[],e.calcdata[0].forEach(function(t){d!==t.label&&a.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===a.length&&m===-1&&(a=[])),h.relayout(e,"hiddenlabels",a)}else{var g,v=[],y=[];for(g=0;gtspan"),h=c[0].length||1;r=s*h,n=u.node()&&g.bBox(u.node()).width;var f=s*(.3+(1-h)/2);u.attr("y",f),c.attr("y",f)}r=Math.max(r,16)+3,i.height=r,i.width=n}function s(t,e,r){var n=t._fullLayout,i=n.legend,a=i.borderwidth,o=M.isGrouped(i);if(M.isVertical(i))o&&e.each(function(t,e){g.setTranslate(this,0,e*i.tracegroupgap)}),i.width=0,i.height=0,r.each(function(t){var e=t[0],r=e.height,n=e.width;g.setTranslate(this,a,5+a+i.height+r/2),i.height+=r,i.width=Math.max(i.width,n)}),i.width+=45+2*a,i.height+=10+2*a,o&&(i.height+=(i._lgroupsLength-1)*i.tracegroupgap),i.width=Math.ceil(i.width),i.height=Math.ceil(i.height),r.each(function(e){var r=e[0];c.select(this).select(".legendtoggle").call(g.setRect,0,-r.height/2,(t._context.editable?0:i.width)+40,r.height)});else if(o){i.width=0,i.height=0;for(var s=[i.width],l=e.data(),u=0,h=l.length;un.width-(n.margin.r+n.margin.l)&&(y=0,p+=m,i.height=i.height+m,m=0),g.setTranslate(this,a+y,5+a+e.height/2+p),i.width+=o+r,i.height=Math.max(i.height,e.height),y+=o+r,m=Math.max(e.height,m)}),i.width+=2*a,i.height+=10+2*a,i.width=Math.ceil(i.width),i.height=Math.ceil(i.height),r.each(function(e){var r=e[0];c.select(this).select(".legendtoggle").call(g.setRect,0,-r.height/2,t._context.editable?0:i.width,r.height)})}}function l(t){var e=t._fullLayout,r=e.legend,n="left";k.isRightAnchor(r)?n="right":k.isCenterAnchor(r)&&(n="center");var i="top";k.isBottomAnchor(r)?i="bottom":k.isMiddleAnchor(r)&&(i="middle"),d.autoMargin(t,"legend",{x:r.x,y:r.y,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:r.height*({top:1,middle:.5}[i]||0),t:r.height*({bottom:1,middle:.5}[i]||0)})}function u(t){var e=t._fullLayout,r=e.legend,n="left";k.isRightAnchor(r)?n="right":k.isCenterAnchor(r)&&(n="center"),d.autoMargin(t,"legend",{x:r.x,y:.5,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:0,t:0})}var c=t("d3"),h=t("../../plotly"),f=t("../../lib"),d=t("../../plots/plots"),p=t("../../registry"),m=t("../dragelement"),g=t("../drawing"),v=t("../color"),y=t("../../lib/svg_text_utils"),b=t("./constants"),x=t("../../constants/interactions"),_=t("./get_legend_data"),w=t("./style"),M=t("./helpers"),k=t("./anchor_utils"),A=!0,T=x.DBLCLICKDELAY;e.exports=function(t){function e(t,e){L.attr("data-scroll",e).call(g.setTranslate,0,e),C.call(g.setRect,N,t,b.scrollBarWidth,b.scrollBarHeight),S.select("rect").attr({y:y.borderwidth-e})}var r=t._fullLayout,o="legend"+r._uid;if(r._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var y=r.legend,x=r.showlegend&&_(t.calcdata,y),M=r.hiddenlabels||[];if(!r.showlegend||!x.length)return r._infolayer.selectAll(".legend").remove(),r._topdefs.select("#"+o).remove(),void d.autoMargin(t,"legend");var A=r._infolayer.selectAll("g.legend").data([0]);A.enter().append("g").attr({class:"legend","pointer-events":"all"});var S=r._topdefs.selectAll("#"+o).data([0]);S.enter().append("clipPath").attr("id",o).append("rect");var E=A.selectAll("rect.bg").data([0]);E.enter().append("rect").attr({class:"bg","shape-rendering":"crispEdges"}),E.call(v.stroke,y.bordercolor),E.call(v.fill,y.bgcolor),E.style("stroke-width",y.borderwidth+"px");var L=A.selectAll("g.scrollbox").data([0]);L.enter().append("g").attr("class","scrollbox");var C=A.selectAll("rect.scrollbar").data([0]);C.enter().append("rect").attr({class:"scrollbar",rx:20,ry:2,width:0,height:0}).call(v.fill,"#808BA4");var z=L.selectAll("g.groups").data(x);z.enter().append("g").attr("class","groups"),z.exit().remove();var D=z.selectAll("g.traces").data(f.identity);D.enter().append("g").attr("class","traces"),D.exit().remove(),D.call(w).style("opacity",function(t){var e=t[0].trace;return p.traceIs(e,"pie")?M.indexOf(t[0].label)!==-1?.5:1:"legendonly"===e.visible?.5:1}).each(function(){c.select(this).call(n,t).call(i,t)});var I=0!==A.enter().size();I&&(s(t,z,D),l(t));var P=r.width,O=r.height;s(t,z,D),y.height>O?u(t):l(t);var j=r._size,R=j.l+j.w*y.x,F=j.t+j.h*(1-y.y);k.isRightAnchor(y)?R-=y.width:k.isCenterAnchor(y)&&(R-=y.width/2),k.isBottomAnchor(y)?F-=y.height:k.isMiddleAnchor(y)&&(F-=y.height/2);var N=y.width,B=j.w;N>B?(R=j.l,N=B):(R+N>P&&(R=P-N),R<0&&(R=0),N=Math.min(P-R,y.width));var U=y.height,V=j.h;U>V?(F=j.t,U=V):(F+U>O&&(F=O-U),F<0&&(F=0),U=Math.min(O-F,y.height)),g.setTranslate(A,R,F);var H,q,G=U-b.scrollBarHeight-2*b.scrollBarMargin,Y=y.height-U;if(y.height<=U||t._context.staticPlot)E.attr({width:N-y.borderwidth,height:U-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),g.setTranslate(L,0,0),S.select("rect").attr({width:N-2*y.borderwidth,height:U-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth}),L.call(g.setClipUrl,o);else{H=b.scrollBarMargin,q=L.attr("data-scroll")||0,E.attr({width:N-2*y.borderwidth+b.scrollBarWidth+b.scrollBarMargin,height:U-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),S.select("rect").attr({width:N-2*y.borderwidth+b.scrollBarWidth+b.scrollBarMargin,height:U-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth-q}),L.call(g.setClipUrl,o),I&&e(H,q),A.on("wheel",null),A.on("wheel",function(){q=f.constrain(L.attr("data-scroll")-c.event.deltaY/G*Y,-Y,0),H=b.scrollBarMargin-q/Y*G,e(H,q),0!==q&&q!==-Y&&c.event.preventDefault()}),C.on(".drag",null),L.on(".drag",null);var W=c.behavior.drag().on("drag",function(){H=f.constrain(c.event.y-b.scrollBarHeight/2,b.scrollBarMargin,b.scrollBarMargin+G),q=-(H-b.scrollBarMargin)/G*Y,e(H,q)});C.call(W),L.call(W)}if(t._context.editable){var X,Z,J,Q;A.classed("cursor-move",!0),m.init({element:A.node(),prepFn:function(){var t=g.getTranslate(A);J=t.x,Q=t.y},moveFn:function(t,e){var r=J+t,n=Q+e;g.setTranslate(A,r,n),X=m.align(r,0,j.l,j.l+j.w,y.xanchor),Z=m.align(n,0,j.t+j.h,j.t,y.yanchor)},doneFn:function(e,n,i){if(e&&void 0!==X&&void 0!==Z)h.relayout(t,{"legend.x":X,"legend.y":Z});else{var o=r._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return i.clientX>=t.left&&i.clientX<=t.right&&i.clientY>=t.top&&i.clientY<=t.bottom});o.size()>0&&(1===n?A._clickTimeout=setTimeout(function(){a(o,t,n)},T):2===n&&(A._clickTimeout&&clearTimeout(A._clickTimeout),a(o,t,n)))}}})}}}},{"../../constants/interactions":665,"../../lib":685,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/plots":787,"../../registry":802,"../color":578,"../dragelement":599,"../drawing":602,"./anchor_utils":616,"./constants":618,"./get_legend_data":621,"./helpers":622,"./style":624,d3:107}],621:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("./helpers");e.exports=function(t,e){function r(t,r){if(""!==t&&i.isGrouped(e))l.indexOf(t)===-1?(l.push(t),u=!0,s[t]=[[r]]):s[t].push([r]);else{var n="~~i"+h;l.push(n),s[n]=[[r]],h++}}var a,o,s={},l=[],u=!1,c={},h=0;for(a=0;ar[1])return r[1]}return i}function r(t){return t[0]}var n,i,a=t[0],o=a.trace,s=d.hasMarkers(o),u=d.hasText(o),f=d.hasLines(o);if(s||u||f){var p={},m={};s&&(p.mc=e("marker.color",r),p.mo=e("marker.opacity",c.mean,[.2,1]),p.ms=e("marker.size",c.mean,[2,16]),p.mlc=e("marker.line.color",r),p.mlw=e("marker.line.width",c.mean,[0,5]),m.marker={sizeref:1,sizemin:1,sizemode:"diameter"}),f&&(m.line={width:e("line.width",r,[0,10])}),u&&(p.tx="Aa",p.tp=e("textposition",r),p.ts=10,p.tc=e("textfont.color",r),p.tf=e("textfont.family",r)),n=[c.minExtend(a,p)],i=c.minExtend(o,m)}var g=l.select(this).select("g.legendpoints"),v=g.selectAll("path.scatterpts").data(s?n:[]);v.enter().append("path").classed("scatterpts",!0).attr("transform","translate(20,0)"),v.exit().remove(),v.call(h.pointStyle,i),s&&(n[0].mrc=3);var y=g.selectAll("g.pointtext").data(u?n:[]);y.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),y.exit().remove(),y.selectAll("text").call(h.textPointStyle,i)}function a(t){var e=t[0].trace,r=e.marker||{},n=r.line||{},i=l.select(this).select("g.legendpoints").selectAll("path.legendbar").data(u.traceIs(e,"bar")?[t]:[]);i.enter().append("path").classed("legendbar",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),i.exit().remove(),i.each(function(t){var e=l.select(this),i=t[0],a=(i.mlw+1||n.width+1)-1;e.style("stroke-width",a+"px").call(f.fill,i.mc||r.color),a&&e.call(f.stroke,i.mlc||n.color)})}function o(t){var e=t[0].trace,r=l.select(this).select("g.legendpoints").selectAll("path.legendbox").data(u.traceIs(e,"box")&&e.visible?[t]:[]);r.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.each(function(){var t=e.line.width,r=l.select(this);r.style("stroke-width",t+"px").call(f.fill,e.fillcolor),t&&r.call(f.stroke,e.line.color)})}function s(t){var e=t[0].trace,r=l.select(this).select("g.legendpoints").selectAll("path.legendpie").data(u.traceIs(e,"pie")&&e.visible?[t]:[]);r.enter().append("path").classed("legendpie",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.size()&&r.call(p,t[0],e)}var l=t("d3"),u=t("../../registry"),c=t("../../lib"),h=t("../drawing"),f=t("../color"),d=t("../../traces/scatter/subtypes"),p=t("../../traces/pie/style_one");e.exports=function(t){t.each(function(t){var e=l.select(this),r=e.selectAll("g.layers").data([0]);r.enter().append("g").classed("layers",!0),r.style("opacity",t[0].trace.opacity),r.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),r.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var n=r.selectAll("g.legendsymbols").data([t]);n.enter().append("g").classed("legendsymbols",!0),n.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(a).each(o).each(s).each(n).each(i)}},{"../../lib":685,"../../registry":802,"../../traces/pie/style_one":970,"../../traces/scatter/subtypes":996,"../color":578,"../drawing":602,d3:107}],625:[function(t,e,r){"use strict";function n(t,e){var r,n,i=e.currentTarget,a=i.getAttribute("data-attr"),o=i.getAttribute("data-val")||!0,s=t._fullLayout,l={},u=f.list(t,null,!0),h="on";if("zoom"===a){var d,p="in"===o?.5:2,m=(1+p)/2,g=(1-p)/2;for(n=0;n1)return n(["resetViews","toggleHover"]),o(g,r);c&&(n(["zoom3d","pan3d","orbitRotation","tableRotation"]),n(["resetCameraDefault3d","resetCameraLastSave3d"]),n(["hoverClosest3d"])),f&&(n(["zoomInGeo","zoomOutGeo","resetGeo"]),n(["hoverClosestGeo"]));var v=i(s),y=[];return((u||p)&&!v||m)&&(y=["zoom2d","pan2d"]),(u||m)&&a(l)&&(y.push("select2d"),y.push("lasso2d")),y.length&&n(y),!u&&!p||v||m||n(["zoomIn2d","zoomOut2d","autoScale2d","resetScale2d"]),u&&d?n(["toggleHover"]):p?n(["hoverClosestGl2d"]):u?n(["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]):d&&n(["hoverClosestPie"]),o(g,r)}function i(t){for(var e=l.list({_fullLayout:t},null,!0),r=!0,n=0;n0)){var p=i(e,r,l);h("x",p[0]),h("y",p[1]),a.noneOrAll(t,e,["x","y"]),h("xanchor"),h("yanchor"),a.coerceFont(h,"font",r.font);var m=h("bgcolor");h("activecolor",o.contrast(m,u.lightAmount,u.darkAmount)),h("bordercolor"),h("borderwidth")}}},{"../../lib":685,"../color":578,"./attributes":629,"./button_attributes":630,"./constants":631}],633:[function(t,e,r){"use strict";function n(t){for(var e=v.list(t,"x",!0),r=[],n=0;np&&(p=f)));return p>=d?[d,p]:void 0}}var i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./constants"),s=t("./helpers");e.exports=function(t){var e=t._fullLayout,r=i.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var s=0;sY&&n>W&&!t.shiftKey?p.getCursor(i/r,1-a/n):"move";m(e,o),G=o.split("-")[0]}function a(e){N=h.getFromId(t,r.xref),B=h.getFromId(t,r.yref),U=v.getDataToPixel(t,N),V=v.getDataToPixel(t,B,!0),H=v.getPixelToData(t,N),q=v.getPixelToData(t,B,!0);var a="shapes["+n+"]";"path"===r.type?(R=r.path,F=a+".path"):(g=U(r.x0),y=V(r.y0),b=U(r.x1),x=V(r.y1),_=a+".x0",w=a+".y0",M=a+".x1",k=a+".y1"),gW&&(d[L]=r[I]=q(u),d[C]=r[P]=q(c)),f-h>Y&&(d[z]=r[O]=H(h),d[D]=r[j]=H(f))}e.attr("d",o(t,r))}var d,g,y,b,x,_,w,M,k,A,T,S,E,L,C,z,D,I,P,O,j,R,F,N,B,U,V,H,q,G,Y=10,W=10,X={setCursor:i,element:e.node(),prepFn:a,doneFn:s},Z=X.element.getBoundingClientRect();p.init(X)}function o(t,e){var r,n,i,a,o=e.type,l=h.getFromId(t,e.xref),u=h.getFromId(t,e.yref),c=t._fullLayout._size;if(l?(r=v.shapePositionToRange(l),n=function(t){return l._offset+l.r2p(r(t,!0))}):n=function(t){return c.l+c.w*t},u?(i=v.shapePositionToRange(u),a=function(t){return u._offset+u.r2p(i(t,!0))}):a=function(t){return c.t+c.h*(1-t)},"path"===o)return l&&"date"===l.type&&(n=v.decodeDate(n)),u&&"date"===u.type&&(a=v.decodeDate(a)),s(e.path,n,a);var f=n(e.x0),d=n(e.x1),p=a(e.y0),m=a(e.y1);if("line"===o)return"M"+f+","+p+"L"+d+","+m;if("rect"===o)return"M"+f+","+p+"H"+d+"V"+m+"H"+f+"Z";var g=(f+d)/2,y=(p+m)/2,b=Math.abs(g-f),x=Math.abs(y-p),_="A"+b+","+x,w=g+b+","+y;return"M"+w+_+" 0 1,1 "+g+","+(y-x)+_+" 0 0,1 "+w+"Z"} -function s(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i],l=t.substr(1).replace(g.paramRE,function(t){return a[n]?t=e(t):o[n]&&(t=r(t)),n++,n>s&&(t="X"),t});return n>s&&(l=l.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+t)),i+l})}function l(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,function(t){return n>=s?t:(a[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}var u=t("../../plotly"),c=t("../../lib"),h=t("../../plots/cartesian/axes"),f=t("../color"),d=t("../drawing"),p=t("../dragelement"),m=t("../../lib/setcursor"),g=t("./constants"),v=t("./helpers");e.exports={draw:n,drawOne:i}},{"../../lib":685,"../../lib/setcursor":700,"../../plotly":719,"../../plots/cartesian/axes":724,"../color":578,"../dragelement":599,"../drawing":602,"./constants":644,"./helpers":647}],647:[function(t,e,r){"use strict";r.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},r.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},r.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},r.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},r.getDataToPixel=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.shapePositionToRange(e);i=function(t){return e._offset+e.r2p(o(t,!0))},"date"===e.type&&(i=r.decodeDate(i))}else i=n?function(t){return a.t+a.h*(1-t)}:function(t){return a.l+a.w*t};return i},r.getPixelToData=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.rangeToShapePosition(e);i=function(t){return o(e.p2r(t-e._offset))}}else i=n?function(t){return 1-(t-a.t)/a.h}:function(t){return(t-a.l)/a.w};return i}},{}],648:[function(t,e,r){"use strict";var n=t("./draw");e.exports={moduleType:"component",name:"shapes",layoutAttributes:t("./attributes"),supplyLayoutDefaults:t("./defaults"),calcAutorange:t("./calc_autorange"),draw:n.draw,drawOne:n.drawOne}},{"./attributes":642,"./calc_autorange":643,"./defaults":645,"./draw":646}],649:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("./attributes"),o=t("./helpers");e.exports=function(t,e,r,s,l){function u(r,i){return n.coerce(t,e,a,r,i)}if(s=s||{},l=l||{},!u("visible",!l.itemIsNotPlainObject))return e;u("layer"),u("opacity"),u("fillcolor"),u("line.color"),u("line.width"),u("line.dash");for(var c=t.path?"path":"rect",h=u("type",c),f=["x","y"],d=0;d<2;d++){var p=f[d],m={_fullLayout:r},g=i.coerceRef(t,e,m,p,"","paper");if("path"!==h){var v,y,b;"paper"!==g?(v=i.getFromId(m,g),b=o.rangeToShapePosition(v),y=o.shapePositionToRange(v)):y=b=n.identity;var x=p+"0",_=p+"1",w=t[x],M=t[_];t[x]=y(t[x],!0),t[_]=y(t[_],!0),i.coercePosition(e,m,u,g,x,.25),i.coercePosition(e,m,u,g,_,.75),e[x]=b(e[x]),e[_]=b(e[_]),t[x]=w,t[_]=M}}return"path"===h?u("path"):n.noneOrAll(t,e,["x0","x1","y0","y1"]),e}},{"../../lib":685,"../../plots/cartesian/axes":724,"./attributes":642,"./helpers":647}],650:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../../plots/pad_attributes"),a=t("../../lib/extend").extendFlat,o=t("../../lib/extend").extendDeep,s=t("../../plots/animation_attributes"),l=t("./constants"),u={_isLinkedToArray:"step",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"}};e.exports={_isLinkedToArray:"slider",visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:o({},i,{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:a({},n,{})},font:a({},n,{}),activebgcolor:{valType:"color",dflt:l.gripBgActiveColor},bgcolor:{valType:"color",dflt:l.railBgColor},bordercolor:{valType:"color",dflt:l.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l.tickLength},tickcolor:{valType:"color",dflt:l.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l.minorTickLength}}},{"../../lib/extend":677,"../../plots/animation_attributes":720,"../../plots/font_attributes":748,"../../plots/pad_attributes":786,"./constants":651}],651:[function(t,e,r){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,fontSizeToHeight:1.3,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],652:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return a.coerce(t,e,s,r,n)}n("visible",i(t,e).length>0)&&(n("active"),n("x"),n("y"),a.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("len"),n("lenmode"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),a.coerceFont(n,"font",r.font),n("currentvalue.visible")&&(n("currentvalue.xanchor"),n("currentvalue.prefix"),n("currentvalue.suffix"),n("currentvalue.offset"),a.coerceFont(n,"currentvalue.font",e.font)),n("transition.duration"),n("transition.easing"),n("bgcolor"),n("activebgcolor"),n("bordercolor"),n("borderwidth"),n("ticklen"),n("tickwidth"),n("tickcolor"),n("minorticklen"))}function i(t,e){function r(t,e){return a.coerce(n,i,c,t,e)}for(var n,i,o=t.steps||[],s=e.steps=[],l=0;l=r.steps.length&&(r.active=0),e.call(s,r).call(x,r).call(c,r).call(p,r).call(b,t,r).call(l,t,r),A.setTranslate(e,r.lx+r.pad.l,r.ly+r.pad.t),e.call(g,r,r.active/(r.steps.length-1),!1),e.call(s,r)}function s(t,e,r){if(e.currentvalue.visible){var n,i,a=t.selectAll("text").data([0]);switch(e.currentvalue.xanchor){case"right":n=e.inputAreaLength-E.currentValueInset-e.currentValueMaxWidth,i="left";break;case"center":n=.5*e.inputAreaLength,i="middle";break;default:n=E.currentValueInset,i="left"}a.enter().append("text").classed(E.labelClass,!0).classed("user-select-none",!0).attr("text-anchor",i);var o=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)o+=r;else{o+=e.steps[e.active].label}return e.currentvalue.suffix&&(o+=e.currentvalue.suffix),a.call(A.font,e.currentvalue.font).text(o).call(T.convertToTspans),A.setTranslate(a,n,e.currentValueHeight),a}}function l(t,e,r){var n=t.selectAll("rect."+E.gripRectClass).data([0]);n.enter().append("rect").classed(E.gripRectClass,!0).call(d,e,t,r).style("pointer-events","all"),n.attr({width:E.gripWidth,height:E.gripHeight,rx:E.gripRadius,ry:E.gripRadius}).call(k.stroke,r.bordercolor).call(k.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function u(t,e,r){var n=t.selectAll("text").data([0]);return n.enter().append("text").classed(E.labelClass,!0).classed("user-select-none",!0).attr("text-anchor","middle"),n.call(A.font,r.font).text(e.step.label).call(T.convertToTspans),n}function c(t,e){var r=t.selectAll("g."+E.labelsClass).data([0]);r.enter().append("g").classed(E.labelsClass,!0);var n=r.selectAll("g."+E.labelGroupClass).data(e.labelSteps);n.enter().append("g").classed(E.labelGroupClass,!0),n.exit().remove(),n.each(function(t){var r=w.select(this);r.call(u,t,e),A.setTranslate(r,v(e,t.fraction),E.tickOffset+e.ticklen+e.labelHeight+E.labelOffset+e.currentValueTotalHeight)})}function h(t,e,r,n,i){var a=Math.round(n*(r.steps.length-1));a!==r.active&&f(t,e,r,a,!0,i)}function f(t,e,r,n,i,a){var o=r.active;r._input.active=r.active=n;var l=r.steps[r.active];e.call(g,r,r.active/(r.steps.length-1),a),e.call(s,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),l&&l.method&&i&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=i,e._nextMethod.doTransition=a):(e._nextMethod={step:l,doCallback:i,doTransition:a},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&&(M.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function d(t,e,r){function n(){return r.data()[0]}var i=r.node(),a=w.select(e);t.on("mousedown",function(){var t=n();e.emit("plotly_sliderstart",{slider:t});var o=r.select("."+E.gripRectClass);w.event.stopPropagation(),w.event.preventDefault(),o.call(k.fill,t.activebgcolor);var s=y(t,w.mouse(i)[0]);h(e,r,t,s,!0),t._dragging=!0,a.on("mousemove",function(){var t=n(),a=y(t,w.mouse(i)[0]);h(e,r,t,a,!1)}),a.on("mouseup",function(){var t=n();t._dragging=!1,o.call(k.fill,t.bgcolor),a.on("mouseup",null),a.on("mousemove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})})})}function p(t,e){var r=t.selectAll("rect."+E.tickRectClass).data(e.steps);r.enter().append("rect").classed(E.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(t,r){var n=r%e.labelStride==0,i=w.select(this);i.attr({height:n?e.ticklen:e.minorticklen}).call(k.fill,e.tickcolor),A.setTranslate(i,v(e,r/(e.steps.length-1))-.5*e.tickwidth,(n?E.tickOffset:E.minorTickOffset)+e.currentValueTotalHeight)})}function m(t){t.labelSteps=[];for(var e=t.steps.length,r=0;r0&&(o=o.transition().duration(e.transition.duration).ease(e.transition.easing)),o.attr("transform","translate("+(a-.5*E.gripWidth)+","+e.currentValueTotalHeight+")")}}function v(t,e){return t.inputAreaStart+E.stepInset+(t.inputAreaLength-2*E.stepInset)*Math.min(1,Math.max(0,e))}function y(t,e){return Math.min(1,Math.max(0,(e-E.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*E.stepInset-2*t.inputAreaStart)))}function b(t,e,r){var n=t.selectAll("rect."+E.railTouchRectClass).data([0]);n.enter().append("rect").classed(E.railTouchRectClass,!0).call(d,e,t,r).style("pointer-events","all"),n.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,E.tickOffset+r.ticklen+r.labelHeight)}).call(k.fill,r.bgcolor).attr("opacity",0),A.setTranslate(n,0,r.currentValueTotalHeight)}function x(t,e){var r=t.selectAll("rect."+E.railRectClass).data([0]);r.enter().append("rect").classed(E.railRectClass,!0);var n=e.inputAreaLength-2*E.railInset;r.attr({width:n,height:E.railWidth,rx:E.railRadius,ry:E.railRadius,"shape-rendering":"crispEdges"}).call(k.stroke,e.bordercolor).call(k.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),A.setTranslate(r,E.railInset,.5*(e.inputAreaWidth-E.railWidth)+e.currentValueTotalHeight)}function _(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n0?[0]:[]);if(s.enter().append("g").classed(E.containerClassName,!0).style("cursor","ew-resize"),s.exit().remove(),s.exit().size()&&_(t),0!==r.length){var l=s.selectAll("g."+E.groupClassName).data(r,i);l.enter().append("g").classed(E.groupClassName,!0),l.exit().each(function(e){w.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,M.autoMargin(t,E.autoMarginIdRoot+e._index)});for(var u=0;u0||f<0){var m={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[b.side];e.attr("transform","translate("+m+")")}}}var m=r.propContainer,g=r.propName,v=r.traceIndex,y=r.dfltName,b=r.avoid||{},x=r.attributes,_=r.transform,w=r.containerGroup,M=t._fullLayout,k=m.titlefont.family,A=m.titlefont.size,T=m.titlefont.color,S=1,E=!1,L=m.title.trim();""===L&&(S=0),L.match(/Click to enter .+ title/)&&(S=.2,E=!0),w||(w=M._infolayer.selectAll(".g-"+e).data([0]),w.enter().append("g").classed("g-"+e,!0));var C=w.selectAll("text").data([0]);C.enter().append("text"),C.text(L).attr("class",e),C.attr({"data-unformatted":L}).call(f);var z="Click to enter "+y+" title";t._context.editable?(L?C.on(".opacity",null):function(){S=0,E=!0,L=z,C.attr({"data-unformatted":L}).text(L).on("mouseover.opacity",function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)})}(),C.call(c.makeEditable).on("edit",function(e){void 0!==v?a.restyle(t,g,e,v):a.relayout(t,g,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(f)}).on("input",function(t){this.text(t||" ").attr(x).selectAll("tspan.line").attr(x)})):L&&!L.match(/Click to enter .+ title/)||C.remove(),C.classed("js-placeholder",E)}},{"../../constants/interactions":665,"../../lib":685,"../../lib/svg_text_utils":704,"../../plotly":719,"../../plots/plots":787,"../color":578,"../drawing":602,d3:107,"fast-isnumeric":116}],656:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat,o=t("../../plots/pad_attributes"),s={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""}};e.exports={_isLinkedToArray:"updatemenu",_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:s,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a({},o,{}),font:a({},n,{}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1}}},{"../../lib/extend":677,"../../plots/font_attributes":748,"../../plots/pad_attributes":786,"../color/attributes":577}],657:[function(t,e,r){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,fontSizeToHeight:1.3,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF"}},{}],658:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return a.coerce(t,e,s,r,n)}n("visible",i(t,e).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),a.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),a.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function i(t,e){function r(t,e){return a.coerce(n,i,c,t,e)}for(var n,i,o=t.buttons||[],s=e.buttons=[],l=0;l0?[0]:[]);if(a.enter().append("g").classed(E.containerClassName,!0).style("cursor","pointer"),a.exit().remove(),a.exit().size()&&_(t),0!==r.length){var c=a.selectAll("g."+E.headerGroupClassName).data(r,i);c.enter().append("g").classed(E.headerGroupClassName,!0);var h=a.selectAll("g."+E.dropdownButtonGroupClassName).data([0]);h.enter().append("g").classed(E.dropdownButtonGroupClassName,!0).style("pointer-events","all");for(var f=0;fM,T=n.barLength+2*n.barPad,S=n.barWidth+2*n.barPad,E=p,L=g+v;L+S>u&&(L=u-S);var C=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,n.barColor),A?(this.hbar=C.attr({rx:n.barRadius,ry:n.barRadius,x:E,y:L,width:T,height:S}),this._hbarXMin=E+T/2,this._hbarTranslateMax=M-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var z=v>k,D=n.barWidth+2*n.barPad,I=n.barLength+2*n.barPad,P=p+m,O=g;P+D>l&&(P=l-D);var j=this.container.selectAll("rect.scrollbar-vertical").data(z?[0]:[]);j.exit().on(".drag",null).remove(),j.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,n.barColor),z?(this.vbar=j.attr({rx:n.barRadius,ry:n.barRadius,x:P,y:O,width:D,height:I}),this._vbarYMin=O+I/2,this._vbarTranslateMax=k-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax) -;var R=this.id,F=c-.5,N=z?h+D+.5:h+.5,B=f-.5,U=A?d+S+.5:d+.5,V=s._topdefs.selectAll("#"+R).data(A||z?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",R).append("rect"),A||z?(this._clipRect=V.select("rect").attr({x:Math.floor(F),y:Math.floor(B),width:Math.ceil(N)-Math.floor(F),height:Math.ceil(U)-Math.floor(B)}),this.container.call(o.setClipUrl,R),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),A||z){var H=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(H);var q=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault(),i.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(q),z&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,r)},n.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},n.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=i.event.dx),this.vbar&&(e-=i.event.dy),this.setTranslate(t,e)},n.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=i.event.deltaY),this.vbar&&(e+=i.event.deltaY),this.setTranslate(t,e)},n.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,n=r+this._hbarTranslateMax;t=(s.constrain(i.event.x,r,n)-r)/(n-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,o=a+this._vbarTranslateMax;e=(s.constrain(i.event.y,a,o)-a)/(o-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},n.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=s.constrain(t||0,0,r),e=s.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(o.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(o.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var a=e/n;this.vbar.call(o.setTranslate,t,e+a*this._vbarTranslateMax)}}},{"../../lib":685,"../color":578,"../drawing":602,d3:107}],662:[function(t,e,r){"use strict";e.exports={solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}},{}],663:[function(t,e,r){"use strict";e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],664:[function(t,e,r){"use strict";e.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},{}],665:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300}},{}],666:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6}},{}],667:[function(t,e,r){"use strict";e.exports={entityToUnicode:{mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},unicodeToEntity:{"&":"amp","<":"lt",">":"gt",'"':"quot","'":"#x27","/":"#x2F"}}},{}],668:[function(t,e,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],669:[function(t,e,r){"use strict";var n=t("./plotly");r.version="1.26.1",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config"),r.plot=n.plot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.setPlotConfig=t("./plot_api/set_plot_config"),r.register=t("./plot_api/register"),r.toImage=t("./plot_api/to_image"),r.downloadImage=t("./snapshot/download"),r.validate=t("./plot_api/validate"),r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.register(t("./traces/scatter")),r.register([t("./components/legend"),t("./components/annotations"),t("./components/shapes"),t("./components/images"),t("./components/updatemenus"),t("./components/sliders"),t("./components/rangeslider"),t("./components/rangeselector")]),r.Icons=t("../build/ploticon"),r.Plots=n.Plots,r.Fx=n.Fx,r.Snapshot=t("./snapshot"),r.PlotSchema=t("./plot_api/plot_schema"),r.Queue=t("./lib/queue"),r.d3=t("d3")},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":574,"./components/images":615,"./components/legend":623,"./components/rangeselector":635,"./components/rangeslider":641,"./components/shapes":648,"./components/sliders":654,"./components/updatemenus":660,"./fonts/mathjax_config":670,"./lib/queue":697,"./plot_api/plot_schema":713,"./plot_api/register":714,"./plot_api/set_plot_config":715,"./plot_api/to_image":717,"./plot_api/validate":718,"./plotly":719,"./snapshot":807,"./snapshot/download":804,"./traces/scatter":986,d3:107,"es6-promise":113}],670:[function(t,e,r){"use strict";"undefined"!=typeof MathJax?(r.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):r.MathJax=!1},{}],671:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){Array.isArray(t)&&(e[r]=t[n])}},{}],672:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../constants/numerical").BADNUM;e.exports=function(t){return"string"==typeof t&&(t=t.replace(/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,"")),n(t)?Number(t):i}},{"../constants/numerical":666,"fast-isnumeric":116}],673:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("tinycolor2"),a=t("../components/colorscale/get_scale"),o=(Object.keys(t("../components/colorscale/scales")),t("./nested_property")),s=/^([2-9]|[1-9][0-9]+)$/;r.valObjects={data_array:{coerceFunction:function(t,e,r){Array.isArray(t)?e.set(t):void 0!==r&&e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),n.values.indexOf(t)===-1?e.set(r):e.set(t)}},boolean:{coerceFunction:function(t,e,r){t===!0||t===!1?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;n.strict!==!0&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(a(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?(Math.abs(t)>180&&(t-=360*Math.round(t/360)),e.set(+t)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r){var n=r.length;if("string"==typeof t&&t.substr(0,n)===r&&s.test(t.substr(n)))return void e.set(t);e.set(r)},validateFunction:function(t,e){var r=e.dflt,n=r.length;return t===r||"string"==typeof t&&!(t.substr(0,n)!==r||!s.test(t.substr(n)))}},flaglist:{coerceFunction:function(t,e,r,n){if("string"!=typeof t)return void e.set(r);if((n.extras||[]).indexOf(t)!==-1)return void e.set(t);for(var i=t.split("+"),a=0;a0&&(o=o.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+o}return n}function l(t){return t.formatDate("yyyy")}function u(t){return t.formatDate("M yyyy")}function c(t){return t.formatDate("M d")}function h(t){return t.formatDate("M d, yyyy")}var f=t("d3"),d=t("fast-isnumeric"),p=t("./loggers").error,m=t("./mod"),g=t("../constants/numerical"),v=g.BADNUM,y=g.ONEDAY,b=g.ONEHOUR,x=g.ONEMIN,_=g.ONESEC,w=g.EPOCHJD,M=t("../registry"),k=f.time.format.utc,A=(new Date).getFullYear()-70;r.dateTick0=function(t,e){return n(t)?e?M.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:M.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"},r.dfltRange=function(t){return n(t)?M.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},r.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime};var T,S;r.dateTime2ms=function(t,e){if(r.isJSDate(t))return t=Number(t)-t.getTimezoneOffset()*x,t>=T&&t<=S?t:v;if("string"!=typeof t&&"number"!=typeof t)return v;t=String(t);var i=n(e),a=t.charAt(0);!i||"G"!==a&&"g"!==a||(t=t.substr(1),e="");var o=i&&"chinese"===e.substr(0,7),s=t.match(o?/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m:/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m);if(!s)return v;var l=s[1],u=s[3]||"1",c=Number(s[5]||1),h=Number(s[7]||0),f=Number(s[9]||0),d=Number(s[11]||0);if(i){if(2===l.length)return v;l=Number(l);var p;try{var m=M.getComponentMethod("calendars","getCal")(e);if(o){var g="i"===u.charAt(u.length-1);u=parseInt(u,10),p=m.newDate(l,m.toMonthIndex(l,u,g),c)}else p=m.newDate(l,Number(u),c)}catch(t){return v}return p?(p.toJD()-w)*y+h*b+f*x+d*_:v}l=2===l.length?(Number(l)+2e3-A)%100+A:Number(l),u-=1;var k=new Date(Date.UTC(2e3,u,c,h,f));return k.setUTCFullYear(l),k.getUTCMonth()!==u?v:k.getUTCDate()!==c?v:k.getTime()+d*_},T=r.MIN_MS=r.dateTime2ms("-9999"),S=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==v};var E=90*y,L=3*b,C=5*x;r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=T&&t<=S))return v;e||(e=0);var i,o,s,l,u,c,h=Math.floor(10*m(t+.05,1)),f=Math.round(t-h/10);if(n(r)){var d=Math.floor(f/y)+w,p=Math.floor(m(t,y));try{i=M.getComponentMethod("calendars","getCal")(r).fromJD(d).formatDate("yyyy-mm-dd")}catch(t){i=k("G%Y-%m-%d")(new Date(f))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=e=T+y&&t<=S-y))return v;var e=Math.floor(10*m(t+.05,1)),r=new Date(Math.round(t-e/10));return a(f.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,i){if(r.isJSDate(t)||"number"==typeof t){if(n(i))return p("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,i))return p("unrecognized date",t),e;return t};var z=/%\d?f/g,D=[59,59.9,59.99,59.999,59.9999],I=k("%Y"),P=k("%b %Y"),O=k("%b %-d"),j=k("%b %-d, %Y");r.formatDate=function(t,e,r,i){var a,f;if(i=n(i)&&i,e)return o(e,t,i);if(i)try{var d=Math.floor((t+.05)/y)+w,p=M.getComponentMethod("calendars","getCal")(i).fromJD(d);"y"===r?f=l(p):"m"===r?f=u(p):"d"===r?(a=l(p),f=c(p)):(a=h(p),f=s(t,r))}catch(t){return"Invalid"}else{var m=new Date(Math.floor(t+.05));"y"===r?f=I(m):"m"===r?f=P(m):"d"===r?(a=I(m),f=O(m)):(a=j(m),f=s(t,r))}return f+(a?"\n"+a:"")};var R=3*y;r.incrementMonth=function(t,e,r){r=n(r)&&r;var i=m(t,y);if(t=Math.round(t-i),r)try{var a=Math.round(t/y)+w,o=M.getComponentMethod("calendars","getCal")(r),s=o.fromJD(a);return e%12?o.add(s,e,"m"):o.add(s,e/12,"y"),(s.toJD()-w)*y+i}catch(e){p("invalid ms "+t+" in calendar "+r)}var l=new Date(t+R);return l.setUTCMonth(l.getUTCMonth()+e)+i-R},r.findExactDates=function(t,e){for(var r,i,a=0,o=0,s=0,l=0,u=n(e)&&M.getComponentMethod("calendars","getCal")(e),c=0;c0&&(i.push(a),a=[])}return a.length>0&&i.push(a),i},r.makeLine=function(t,e){var r={};return r=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t},e&&(r.trace=e),r},r.makePolygon=function(t,e){var r={};if(1===t.length)r={type:"Polygon",coordinates:t};else{for(var n=new Array(t.length),i=0;i",e))>=0;){var r=t.indexOf("",e);if(r/g,"\n")}function a(t){return t.replace(/\<.*\>/g,"")}function o(t){for(var e=u.entityToUnicode,r=0;(r=t.indexOf("&",r))>=0;){var n=t.indexOf(";",r);if(nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},i.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},i.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o-1||1/0!==c&&c>=Math.pow(2,r)?t(e,r,n):l},i.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)},r["_"+e]=t,r},i.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,u=new Array(l),c=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*u[n];c[r]=a}return c},i.syncOrAsync=function(t,e,r){function n(){return i.syncOrAsync(t,e,r)}for(var a,o;t.length;)if(o=t.splice(0,1)[0],(a=o(e))&&a.then)return a.then(n).then(void 0,i.promiseError);return r&&r(e)},i.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},i.noneOrAll=function(t,e,r){if(t){var n,i,a=!1,o=!0;for(n=0;n1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l}},{"./clean_number":672,"./coerce":673,"./dates":674,"./ensure_array":675,"./extend":677,"./filter_unique":678,"./filter_visible":679,"./identity":684,"./is_array":686,"./is_plain_object":687,"./loggers":688,"./matrix":689,"./mod":690,"./nested_property":691,"./noop":692,"./notifier":693,"./push_unique":696,"./relink_private":698,"./search":699,"./stats":702,"./to_log_range":705,d3:107}],686:[function(t,e,r){"use strict";var n="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}};e.exports=function(t){return Array.isArray(t)||n.isView(t)}},{}],687:[function(t,e,r){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],688:[function(t,e,r){"use strict";function n(t,e){if(t.apply)t.apply(t,e);else for(var r=0;r1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;e=0;e--){if(n=t[e][0],a=t[e][1],l=!1,d(n))for(r=n.length-1;r>=0;r--)i(n[r],o(a,r))?l?n[r]=void 0:n.pop():l=!0;else if("object"==typeof n&&null!==n)for(s=Object.keys(n),l=!1,r=s.length-1;r>=0;r--)i(n[s[r]],o(a,s[r]))?delete n[s[r]]:l=!0;if(l)return}}function c(t){return void 0===t||null===t||"object"==typeof t&&(d(t)?!t.length:!Object.keys(t).length)}function h(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var f=t("fast-isnumeric"),d=t("./is_array"),p=t("./is_plain_object"),m=t("../plot_api/container_array_match");e.exports=function(t,e){if(f(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var r,i,o,s=0,l=e.split(".");s/g),s=0;sa||ns)&&(!e||!u(t))}function r(t,e){var r=t[0],l=t[1];if(ra||ls)return!1;var u,c,h,f,d,p=n.length,m=n[0][0],g=n[0][1],v=0;for(u=1;uMath.max(c,m)||l>Math.max(h,g)))if(lc||Math.abs(n(o,f))>i)return!0;return!1};i.filter=function(t,e){function r(r){t.push(r);var s=n.length,l=i;n.splice(o+1);for(var u=l+1;u1){r(t.pop())}return{addPt:r,raw:t,filtered:n}}},{"./matrix":689}],696:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;ra.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},o.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},o.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},o.undo=function(t){var e,r;if(t.framework&&t.framework.isPolar)return void t.framework.undo();if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function o(t,e){return t>=e}var s=t("fast-isnumeric"),l=t("./loggers");r.findBin=function(t,e,r){if(s(e.start))return r?Math.ceil((t-e.start)/e.size)-1:Math.floor((t-e.start)/e.size);var u,c,h=0,f=e.length,d=0;for(c=e[e.length-1]>=e[0]?r?n:i:r?o:a;h90&&l.log("Long binary search..."),h-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,i=e[n]-e[0]||1,a=i/(n||1)/1e4,o=[e[0]],s=0;se[s]+a&&(i=Math.min(i,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:i}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;it.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{"fast-isnumeric":116}],703:[function(t,e,r){"use strict";function n(t){var e=i(t);return e.length?e:[0,0,0,1]}var i=t("color-rgba");e.exports=n},{"color-rgba":88}],704:[function(t,e,r){"use strict";function n(t,e){return t.node().getBoundingClientRect()[e]}function i(t){return t.replace(/(<|<|<)/g,"\\lt ").replace(/(>|>|>)/g,"\\gt ")}function a(t,e,r){var n="math-output-"+f.randstr([],64),a=h.select("body").append("div").attr({id:n}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(i(t));MathJax.Hub.Queue(["Typeset",MathJax.Hub,a.node()],function(){var e=h.select("body").select("#MathJax_SVG_glyphs");if(a.select(".MathJax_SVG").empty()||!a.select("svg").node())f.log("There was an error in the tex syntax.",t),r();else{var n=a.select("svg").node().getBoundingClientRect();r(a.select(".MathJax_SVG"),e,n)}a.remove()})}function o(t,e){for(var r=t||"",n=0;n]*>)/).map(function(t){var e=t.match(/<(\/?)([^ >]*)\s*(.*)>/i),n=e&&e[2].toLowerCase(),i=m[n];if(void 0!==i){var a=e[1],o=e[3],s=o.match(/^style\s*=\s*"([^"]+)"\s*/i);if("a"===n){if(a)return"";if("href"!==o.substr(0,4).toLowerCase())return"";var u=o.substr(4).replace(/["']/g,"").replace(/=/,""),c=document.createElement("a");return c.href=u,g.indexOf(c.protocol)===-1?"":''}if("br"===n)return"
";if(a)return"sup"===n?'':"sub"===n?'':"";var h=""}return r.xml_entity_encode(t).replace(/");i>0;i=e.indexOf("
",i+1))n.push(i);var a=0;n.forEach(function(t){for(var r=t+a,n=e.slice(0,r),i="",o=n.length-1;o>=0;o--){var s=n[o].match(/<(\/?).*>/i);if(s&&"
"!==n[o]){s[1]||(i=n[o]);break}}i&&(e.splice(r+1,0,i),e.splice(r,0,""),a+=2)});var o=e.join(""),u=o.split(/
/gi);return u.length>1&&(e=u.map(function(t,e){return''+t+""})),e.join("")}function c(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||"top",l=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return i="bottom"===s?function(){return l.bottom-n.height}:"middle"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},a="right"===o?function(){return l.right-n.width}:"center"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:i()-u.top+"px",left:a()-u.left+"px","z-index":1e3}),this}}var h=t("d3"),f=t("../lib"),d=t("../constants/xmlns_namespaces"),p=t("../constants/string_mappings");h.selection.prototype.appendSVG=function(t){for(var e=['',t,""].join(""),r=(new DOMParser).parseFromString(e,"application/xml"),n=r.documentElement.firstChild;n;)this.node().appendChild(this.node().ownerDocument.importNode(n,!0)),n=n.nextSibling;return r.querySelector("parsererror")?(f.log(r.querySelector("parsererror div").textContent),null):h.select(this.node().lastChild)},r.html_entity_decode=function(t){var e=h.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":t.indexOf("<")!==-1||t.indexOf(">")!==-1?"":e.html(t).text()});return e.remove(),r},r.xml_entity_encode=function(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")},r.convertToTspans=function(t,e){function r(){d.empty()||(p=s.attr("class")+"-math",d.select("svg."+p).remove()),t.text("").style({visibility:"inherit","white-space":"pre"}),c=t.appendSVG(o),c||t.text(i),t.select("a").size()&&t.style("pointer-events","all"),e&&e.call(s)}var i=t.text(),o=u(i),s=t,l=!s.attr("data-notex")&&o.match(/([^$]*)([$]+[^$]*[$]+)([^$]*)/),c=i,d=h.select(s.node().parentNode);if(!d.empty()){var p=s.attr("class")?s.attr("class").split(" ")[0]:"text";p+="-math",d.selectAll("svg."+p).remove(),d.selectAll("g."+p+"-group").remove(),t.style({visibility:null});for(var m=t.node();m&&m.removeAttribute;m=m.parentNode)m.removeAttribute("data-bb");if(l){var g=f.getPlotDiv(s.node());(g&&g._promises||[]).push(new Promise(function(t){s.style({visibility:"hidden"});var i={fontSize:parseInt(s.style("font-size"),10)};a(l[2],i,function(i,a,o){d.selectAll("svg."+p).remove(),d.selectAll("g."+p+"-group").remove();var l=i&&i.select("svg");if(!l||!l.node())return r(),void t();var u=d.append("g").classed(p+"-group",!0).attr({"pointer-events":"none"});u.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild),l.attr({class:p,height:o.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=s.style("fill")||"black";l.select("g").attr({fill:c,stroke:c});var h=n(l,"width"),f=n(l,"height"),m=+s.attr("x")-h*{start:0,middle:.5,end:1}[s.attr("text-anchor")||"start"],g=parseInt(s.style("font-size"),10)||n(s,"height"),v=-g/4;"y"===p[0]?(u.attr({transform:"rotate("+[-90,+s.attr("x"),+s.attr("y")]+") translate("+[-h/2,v-f/2]+")"}),l.attr({x:+s.attr("x"),y:+s.attr("y")})):"l"===p[0]?l.attr({x:s.attr("x"),y:v-f/2}):"a"===p[0]?l.attr({x:0,y:v}):l.attr({x:m,y:+s.attr("y")+v-f/2}),e&&e.call(s,u),t(u)})}))}else r();return t}};var m={sup:'font-size:70%" dy="-0.6em',sub:'font-size:70%" dy="0.3em',b:"font-weight:bold",i:"font-style:italic",a:"",span:"",br:"",em:"font-style:italic;font-weight:bold"},g=["http:","https:","mailto:"],v=new RegExp("]*)?/?>","g"),y=Object.keys(p.entityToUnicode).map(function(t){return{regExp:new RegExp("&"+t+";","g"),sub:p.entityToUnicode[t]}}),b=Object.keys(p.unicodeToEntity).map(function(t){return{regExp:new RegExp(t,"g"),sub:"&"+p.unicodeToEntity[t]+";"}}),x=/(\r\n?|\n)/g;r.plainText=function(t){return(t||"").replace(v," ")},r.makeEditable=function(t,e,r){function n(){a(),o.style({opacity:0});var t,e=u.attr("class");(t=e?"."+e.split(" ")[0]+"-math-group":"[class*=-math-group]")&&h.select(o.node().parentNode).select(t).style({opacity:0})}function i(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}function a(){var t=f.getPlotDiv(o.node()),e=h.select(t),n=e.select(".svg-container"),a=n.append("div");a.classed("plugin-editable editable",!0).style({position:"absolute","font-family":o.style("font-family")||"Arial","font-size":o.style("font-size")||12,color:r.fill||o.style("fill")||"black",opacity:1,"background-color":r.background||"transparent",outline:"#ffffff33 1px solid",margin:[-parseFloat(o.style("font-size"))/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(r.text||o.attr("data-unformatted")).call(c(o,n,r)).on("blur",function(){t._editing=!1,o.text(this.textContent).style({opacity:1});var e,r=h.select(this).attr("class");(e=r?"."+r.split(" ")[0]+"-math-group":"[class*=-math-group]")&&h.select(o.node().parentNode).select(e).style({opacity:0});var n=this.textContent;h.select(this).transition().duration(0).remove(),h.select(document).on("mouseup",null),s.edit.call(o,n)}).on("focus",function(){var e=this;t._editing=!0,h.select(document).on("mouseup",function(){if(h.event.target===e)return!1;document.activeElement===a.node()&&a.node().blur()})}).on("keyup",function(){27===h.event.which?(t._editing=!1,o.style({opacity:1}),h.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),s.cancel.call(o,this.textContent)):(s.input.call(o,this.textContent),h.select(this).call(c(o,n,r)))}).on("keydown",function(){13===h.event.which&&this.blur()}).call(i)}r||(r={});var o=this,s=h.dispatch("edit","input","cancel"),l=h.select(this.node()).style({"pointer-events":"all"}),u=e||l;return e&&l.style({"pointer-events":"none"}),r.immediate?n():u.on("click",n),h.rebind(this,s,"on")}},{"../constants/string_mappings":667,"../constants/xmlns_namespaces":668,"../lib":685,d3:107}],705:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{"fast-isnumeric":116}],706:[function(t,e,r){"use strict";var n=e.exports={},i=t("../plots/geo/constants").locationmodeToLayer,a=t("topojson-client").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{"../plots/geo/constants":750,"topojson-client":516}],707:[function(t,e,r){"use strict";function n(t,e){for(var r=new Float32Array(e),n=0;n0)return t.substr(0,e)}var s=t("fast-isnumeric"),l=t("gl-mat4/fromQuat"),u=t("../registry"),c=t("../lib"),h=t("../plots/plots"),f=t("../plots/cartesian/axes"),d=t("../components/color");r.getGraphDiv=function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null===t||void 0===t)throw new Error("DOM element provided is null or undefined");return t},r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&c.log("Clearing previous rejected promises from queue."),t._promises=[]},r.cleanLayout=function(t){var e,r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1);var i=f.list({_fullLayout:t});for(e=0;e3?(g.x=1.02,g.xanchor="left"):g.x<-2&&(g.x=-.02,g.xanchor="right"),g.y>3?(g.y=1.02,g.yanchor="bottom"):g.y<-2&&(g.y=-.02,g.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var v=h.getSubplotIds(t,"gl3d");for(e=0;e1&&o.warn("Full array edits are incompatible with other edits",c);var v=r[""][""];if(u(v))e.set(null);else{if(!Array.isArray(v))return o.warn("Unrecognized full array edit value",c,v),!0;e.set(v)}return!p&&(h(m,g),f(t),!0)}var y,b,x,_,w,M,k,A=Object.keys(r).map(Number).sort(),T=e.get(),S=T||[],E=n(g,c).get(),L=[],C=-1,z=S.length;for(y=0;yS.length-(k?0:1))o.warn("index out of range",c,x);else if(void 0!==M)w.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",c,x),u(M)?L.push(x):k?("add"===M&&(M={}),S.splice(x,0,M),E&&E.splice(x,0,{})):o.warn("Unrecognized full object edit value",c,x,M),C===-1&&(C=x);else for(b=0;b=0;y--)S.splice(L[y],1),E&&E.splice(L[y],1);if(S.length?T||e.set(S):e.set(null),p)return!1;if(h(m,g),d!==a){var D;if(C===-1)D=A;else{for(z=Math.max(S.length,z),D=[],y=0;y=C);y++)D.push(x);for(y=C;y=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function l(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),s(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&s(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function u(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&lN.range[0]?[1,2]:[2,1]);else{var V=N.range[0],H=N.range[1];B?(V<=0&&H<=0&&r(j+".autorange",!0),V<=0?V=H/1e6:H<=0&&(H=V/1e6),r(j+".range[0]",Math.log(V)/Math.LN10),r(j+".range[1]",Math.log(H)/Math.LN10)):(r(j+".range[0]",Math.pow(10,V)),r(j+".range[1]",Math.pow(10,H)))}else r(j+".autorange",!0);w.getComponentMethod("annotations","convertCoords")(t,F,T,r),w.getComponentMethod("images","convertCoords")(t,F,T,r)}else r(j+".autorange",!0)}else if(D.match(I.AX_NAME_PATTERN)){var q=b.nestedProperty(u,k).get(),G=(T||{}).type;G&&"-"!==G||(G="linear"),w.getComponentMethod("annotations","convertCoords")(t,q,G,r),w.getComponentMethod("images","convertCoords")(t,q,G,r)}var Y=C.containerArrayMatch(k);if(Y){a=Y.array,o=Y.index;var W=Y.property,X=b.nestedProperty(l,a),Z=(X||[])[o]||{};if(""===o)k.indexOf("updatemenus")===-1&&(g.docalc=!0);else if(""===W){var J=T;C.isAddVal(T)?x[k]=null:C.isRemoveVal(T)?(x[k]=Z,J=Z):b.warn("unrecognized full object value",e),(n(J,"x")||n(J,"y")&&k.indexOf("updatemenus")===-1)&&(g.docalc=!0)}else!n(Z,"x")&&!n(Z,"y")||b.containsAny(k,["color","opacity","align","dash","updatemenus"])||(g.docalc=!0);f[a]||(f[a]={});var Q=f[a][o];Q||(Q=f[a][o]={}),Q[W]=T,delete e[k]}else if("reverse"===D)R.range?R.range.reverse():(r(j+".autorange",!0),R.range=[1,0]),F.autorange?g.docalc=!0:g.doplot=!0;else{var K=String(A.parts[1]||"");0===L.indexOf("scene")?"camera"===A.parts[1]?g.docamera=!0:g.doplot=!0:0===L.indexOf("geo")?g.doplot=!0:0===L.indexOf("ternary")?g.doplot=!0:"paper_bgcolor"===k?g.doplot=!0:"margin"===L||"autorange"===K||"rangemode"===K||"type"===K||"domain"===K||"fixedrange"===K||"scaleanchor"===K||"scaleratio"===K||k.indexOf("calendar")!==-1||k.match(/^(bar|box|font)/)?g.docalc=!0:!u._has("gl2d")||k.indexOf("axis")===-1&&"plot_bgcolor"!==k?"hiddenlabels"===k?g.docalc=!0:L.indexOf("legend")!==-1?g.dolegend=!0:k.indexOf("title")!==-1?g.doticks=!0:L.indexOf("bgcolor")!==-1?g.dolayoutstyle=!0:S>1&&b.containsAny(K,["tick","exponent","grid","zeroline"])?g.doticks=!0:k.indexOf(".linewidth")!==-1&&k.indexOf("axis")!==-1?g.doticks=g.dolayoutstyle=!0:S>1&&K.indexOf("line")!==-1?g.dolayoutstyle=!0:S>1&&"mirror"===K?g.doticks=g.dolayoutstyle=!0:"margin.pad"===k?g.doticks=g.dolayoutstyle=!0:["hovermode","dragmode"].indexOf(k)!==-1||k.indexOf("spike")!==-1?g.domodebar=!0:["height","width","autosize"].indexOf(k)===-1&&(g.doplot=!0):g.doplot=!0,A.set(T)}}}for(a in f){C.applyContainerArrayChanges(t,b.nestedProperty(l,a),f[a],g)||(g.doplot=!0)}var $=u._axisConstraintGroups;for(var tt in _)for(o=0;o<$.length;o++){var et=$[o];if(et[tt]){g.docalc=!0;for(var rt in et)_[rt]||(O.getFromId(t,rt)._constraintShrinkable=!0)}}var nt=u.width,it=u.height;return t.layout.autosize&&M.plotAutoSize(t,t.layout,u),(e.height||e.width||u.width!==nt||u.height!==it)&&(g.docalc=!0),(g.doplot||g.docalc)&&(g.layoutReplot=!0),{flags:g,undoit:x,redoit:v,eventData:b.extendDeep({},v)}}function m(t){var e=g.select(t),r=t._fullLayout;if(r._container=e.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([0]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n=[];g.selectAll("defs").each(function(){this.id&&n.push(this.id.split("-")[1])}),r._uid=b.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(E.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0);var a=r._paper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._toppaper.append("g").classed("hoverlayer",!0),t.emit("plotly_framework")}var g=t("d3"),v=t("fast-isnumeric"),y=t("../plotly"),b=t("../lib"),x=t("../lib/events"),_=t("../lib/queue"),w=t("../registry"),M=t("../plots/plots"),k=t("../plots/cartesian/graph_interact"),A=t("../plots/polar"),T=t("../components/drawing"),S=t("../components/errorbars"),E=t("../constants/xmlns_namespaces"),L=t("../lib/svg_text_utils"),C=t("./manage_arrays"),z=t("./helpers"),D=t("./subroutines"),I=t("../plots/cartesian/constants"),P=t("../plots/cartesian/constraints"),O=t("../plots/cartesian/axis_ids");y.plot=function(t,e,r,n){function o(){if(v)return y.addFrames(t,v)}function s(){for(var e=E._basePlotModules,r=0;r=s.length?s[0]:s[t]:s}function i(t){return Array.isArray(l)?t>=l.length?l[0]:l[t]:l}function a(t,e){var r=0;return function(){if(t&&++r===e)return t()}}if(t=z.getGraphDiv(t),!b.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var o=t._transitionData;o._frameQueue||(o._frameQueue=[]),r=M.supplyAnimationDefaults(r);var s=r.transition,l=r.frame;return void 0===o._frameWaitingCnt&&(o._frameWaitingCnt=0),new Promise(function(l,u){function c(){t.emit("plotly_animated"),window.cancelAnimationFrame(o._animationRaf),o._animationRaf=null}function h(){o._currentFrame&&o._currentFrame.onComplete&&o._currentFrame.onComplete();var e=o._currentFrame=o._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,o._lastFrameAt=Date.now(),o._timeToNext=e.frameOpts.duration,M.transition(t,e.frame.data,e.frame.layout,z.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else c()}function f(){t.emit("plotly_animating"),o._lastFrameAt=-1/0,o._timeToNext=0,o._runningTransitions=0,o._currentFrame=null;var e=function(){o._animationRaf=window.requestAnimationFrame(e),Date.now()-o._lastFrameAt>o._timeToNext&&h()};e()}function d(t){return Array.isArray(s)?g>=s.length?t.transitionOpts=s[g]:t.transitionOpts=s[0]:t.transitionOpts=s,g++,t}var p,m,g=0,v=[],y=void 0===e||null===e,x=Array.isArray(e);if(y||x||!b.isPlainObject(e)){if(y||["string","number"].indexOf(typeof e)!==-1)for(p=0;p0&&kk)&&A.push(m);v=A}}v.length>0?function(e){if(0!==e.length){for(var s=0;s=0;i--)if(b.isPlainObject(e[i])){var f=(u[e[i].name]||{}).name,d=e[i].name;f&&d&&"number"==typeof d&&u[f]&&(n++,b.warn('addFrames: overwriting frame "'+u[f].name+'" with a frame whose name of type "number" also equates to "'+f+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),n>5&&b.warn("addFrames: This API call has yielded too many warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),h.push({frame:M.supplyFrameDefaults(e[i]),index:r&&void 0!==r[i]&&null!==r[i]?r[i]:c+i})}h.sort(function(t,e){return t.index>e.index?-1:t.index=0;i--){if(a=h[i].frame,"number"==typeof a.name&&b.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+t._transitionData._counter++];);if(u[a.name]){for(o=0;o=0;r--)n=e[r],a.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:i[n]});var s=M.modifyFrames,l=M.modifyFrames,u=[t,o],c=[t,a];return _&&_.add(t,s,u,l,c),M.modifyFrames(t,a)},y.purge=function(t){t=z.getGraphDiv(t);var e=t._fullLayout||{},r=t._fullData||[];return M.cleanPlot([],{},r,e),M.purge(t),x.purge(t),e._container&&e._container.remove(),delete t._context,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,delete t._hmpixcount,delete t._hmlumcount,t}},{"../components/drawing":602,"../components/errorbars":608,"../constants/xmlns_namespaces":668,"../lib":685,"../lib/events":676,"../lib/queue":697,"../lib/svg_text_utils":704,"../plotly":719,"../plots/cartesian/axis_ids":727,"../plots/cartesian/constants":729,"../plots/cartesian/constraints":731,"../plots/cartesian/graph_interact":733,"../plots/plots":787,"../plots/polar":790,"../registry":802,"./helpers":709,"./manage_arrays":710,"./subroutines":716,d3:107,"fast-isnumeric":116}],712:[function(t,e,r){"use strict";function n(t,r){try{t._fullLayout._paper.style("background",r)}catch(t){e.exports.logging>0&&console.error(t)}}e.exports={staticPlot:!1,editable:!1,autosizable:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:"reset+autosize",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:"Edit chart",showSources:!1,displayModeBar:"hover",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,displaylogo:!0,plotGlPixelRatio:2,setBackground:n,topojsonURL:"https://cdn.plot.ly/",mapboxAccessToken:null,logging:!1,globalTransforms:[]}},{}],713:[function(t,e,r){"use strict";function n(t){var e,r;"area"===t?(e={attributes:b},r={}):(e=d.modules[t]._module,r=e.basePlotModule);var n={};n.type=null,w(n,m),w(n,e.attributes),r.attributes&&w(n,r.attributes),Object.keys(d.componentsRegistry).forEach(function(e){var r=d.componentsRegistry[e];r.schema&&r.schema.traces&&r.schema.traces[t]&&Object.keys(r.schema.traces[t]).forEach(function(e){f(n,r.schema.traces[t][e],e)})}),n.type=t;var i={meta:e.meta||{},attributes:s(n)};if(e.layoutAttributes){var a={};w(a,e.layoutAttributes),i.layoutAttributes=s(a)}return i}function i(){var t={};return w(t,g),Object.keys(d.subplotsRegistry).forEach(function(e){var r=d.subplotsRegistry[e];if(r.layoutAttributes)if("cartesian"===r.name)h(t,r,"xaxis"),h(t,r,"yaxis");else{var n="subplot"===r.attr?r.name:r.attr;h(t,r,n)}}),t=c(t),Object.keys(d.componentsRegistry).forEach(function(e){var r=d.componentsRegistry[e];r.layoutAttributes&&(r.schema&&r.schema.layout?Object.keys(r.schema.layout).forEach(function(e){f(t,r.schema.layout[e],e)}):f(t,r.layoutAttributes,r.name))}),{layoutAttributes:s(t)}}function a(t){ -var e=d.transformsRegistry[t],r=w({},e.attributes);return Object.keys(d.componentsRegistry).forEach(function(e){var n=d.componentsRegistry[e];n.schema&&n.schema.transforms&&n.schema.transforms[t]&&Object.keys(n.schema.transforms[t]).forEach(function(e){f(r,n.schema.transforms[t][e],e)})}),{attributes:s(r)}}function o(){var t={frames:p.extendDeep({},v)};return s(t),t.frames}function s(t){return l(t),u(t),t}function l(t){function e(t){return{valType:"string"}}function n(t,n,i){r.isValObject(t)?"data_array"===t.valType?(t.role="data",i[n+"src"]=e(n)):t.arrayOk===!0&&(i[n+"src"]=e(n)):p.isPlainObject(t)&&(t.role="object")}r.crawl(t,n)}function u(t){function e(t,e,r){if(t){var n=t[k];n&&(delete t[k],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}r.crawl(t,e)}function c(t){return _(t,{radialaxis:x.radialaxis,angularaxis:x.angularaxis}),_(t,x.layout),t}function h(t,e,r){var n=p.nestedProperty(t,r),i=w({},e.layoutAttributes);i[M]=!0,n.set(i)}function f(t,e,r){var n=p.nestedProperty(t,r);n.set(w(n.get()||{},e))}var d=t("../registry"),p=t("../lib"),m=t("../plots/attributes"),g=t("../plots/layout_attributes"),v=t("../plots/frame_attributes"),y=t("../plots/animation_attributes"),b=t("../plots/polar/area_attributes"),x=t("../plots/polar/axis_attributes"),_=p.extendFlat,w=p.extendDeep,M="_isSubplotObj",k="_isLinkedToArray",A=[M,k,"_arrayAttrRegexps","_deprecated"];r.IS_SUBPLOT_OBJ=M,r.IS_LINKED_TO_ARRAY=k,r.DEPRECATED="_deprecated",r.UNDERSCORE_ATTRS=A,r.get=function(){var t={};d.allTypes.concat("area").forEach(function(e){t[e]=n(e)});var e={};return Object.keys(d.transformsRegistry).forEach(function(t){e[t]=a(t)}),{defs:{valObjects:p.valObjects,metaKeys:A.concat(["description","role"])},traces:t,layout:i(),transforms:e,frames:o(),animation:s(y)}},r.crawl=function(t,e,n){var i=n||0;Object.keys(t).forEach(function(n){var a=t[n];A.indexOf(n)===-1&&(e(a,n,t,i),r.isValObject(a)||p.isPlainObject(a)&&r.crawl(a,e,i+1))})},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){function e(e,r,o,s){if(a=a.slice(0,s).concat([r]),e&&("data_array"===e.valType||e.arrayOk===!0)){var l=n(a),u=p.nestedProperty(t,l).get();Array.isArray(u)&&i.push(l)}}function n(t){return t.join(".")}var i=[],a=[];if(r.crawl(t._module.attributes,e),t.transforms)for(var o=t.transforms,s=0;s=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}var i=t("d3"),a=t("../plotly"),o=t("../registry"),s=t("../plots/plots"),l=t("../lib"),u=t("../components/color"),c=t("../components/drawing"),h=t("../components/titles"),f=t("../components/modebar");r.layoutStyles=function(t){return l.syncOrAsync([s.doAutoMargin,r.lsInner],t)},r.lsInner=function(t){var e,o=t._fullLayout,s=o._size,l=a.Axes.list(t);for(e=0;e1)};f(e.width)&&f(e.height)||n(new Error("Height and width should be pixel values."));var d=l(t,{format:"png",height:e.height,width:e.width}),p=d.gd;p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var m=s.getRedrawFunc(p);a.plot(p,d.data,d.layout,d.config).then(m).then(h).then(function(t){r(t)}).catch(function(t){n(t)})})}var i=t("fast-isnumeric"),a=t("../plotly"),o=t("../lib"),s=t("../snapshot/helpers"),l=t("../snapshot/cloneplot"),u=t("../snapshot/tosvg"),c=t("../snapshot/svgtoimg");e.exports=n},{"../lib":685,"../plotly":719,"../snapshot/cloneplot":803,"../snapshot/helpers":806,"../snapshot/svgtoimg":808,"../snapshot/tosvg":810,"fast-isnumeric":116}],718:[function(t,e,r){"use strict";function n(t,e,r,i,a,u){u=u||[];for(var c=Object.keys(t),f=0;f1&&l.push(o("object","layout"))),f.supplyDefaults(u);for(var c=u._fullData,g=r.length,v=0;v.3*h||a(n)||a(i))){var f=r.dtick/2;t+=t+f.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=O.tickIncrement(t,"M6","reverse")+1.5*C:a.exactMonths>.8?t=O.tickIncrement(t,"M1","reverse")+15.5*C:t-=C/2;var s=O.tickIncrement(t,r);if(s<=n)return s}return t}function a(t){var e,r,n=t.tickvals,i=t.ticktext,a=new Array(n.length),o=_.simpleMap(t.range,t.r2l),s=1.0001*o[0]-1e-4*o[1],u=1.0001*o[1]-1e-4*o[0],c=Math.min(s,u),h=Math.max(s,u),f=0;Array.isArray(i)||(i=[]);var d="category"===t.type?t.d2l_noadd:t.d2l;for("log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1)),r=0;rc&&e10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=C&&i<=10||e>=15*C)t._tickround="d";else if(e>=D&&i<=16||e>=z)t._tickround="M";else if(e>=I&&i<=19||e>=D)t._tickround="S";else{var a=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,a)-20}}else if(b(e)||"L"===e.charAt(0)){var o=t.range.map(t.r2d||Number);b(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01);Math.abs(l)>3&&("SI"===t.exponentformat||"B"===t.exponentformat?t._tickexponent=3*Math.round((l-1)/3):t._tickexponent=l)}else t._tickround=null}function l(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}function u(t,e,r,n){var i=t._tickround,a=r&&t.hoverformat||t.tickformat;n&&(i=b(i)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o,s=_.formatDate(e.x,a,i,t.calendar),l=s.indexOf("\n");l!==-1&&(o=s.substr(l+1),s=s.substr(0,l)),n&&("00:00:00"===s||"00:00"===s?(s=o,o=""):8===s.length&&(s=s.replace(/:00$/,""))),o&&(r?"d"===i?s+=", "+o:s=o+(s?", "+s:""):t._inCalcTicks&&o===t._prevDateHead||(s+="
"+o,t._prevDateHead=o)),e.text=s}function c(t,e,r,n,i){var a=t.dtick,o=e.x;if(!n||"string"==typeof a&&"L"===a.charAt(0)||(a="L3"),t.tickformat||"string"==typeof a&&"L"===a.charAt(0))e.text=d(Math.pow(10,o),t,i,n);else if(b(a)||"D"===a.charAt(0)&&_.mod(o+.01,1)<.1)if(["e","E","power"].indexOf(t.exponentformat)!==-1){var s=Math.round(o);e.text=0===s?1:1===s?"10":s>1?"10"+s+"":"10\u2212"+-s+"",e.fontSize*=1.25}else e.text=d(Math.pow(10,o),t,"","fakehover"),"D1"===a&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6);else{if("D"!==a.charAt(0))throw"unrecognized dtick "+String(a);e.text=String(Math.round(Math.pow(10,_.mod(o,1)))),e.fontSize*=.75}if("D1"===t.dtick){var l=String(e.text).charAt(0);"0"!==l&&"1"!==l||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(o<0?.5:.25)))}}function h(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}function f(t,e,r,n,i){"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=d(e.x,t,i,n)}function d(t,e,r,n){var i=t<0,a=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,u=e.tickformat,c=e.separatethousands;if(n){var h={exponentformat:e.exponentformat,dtick:"none"===e.showexponent?e.dtick:b(t)?Math.abs(t)||1:1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};s(h),a=(Number(h._tickround)||0)+4,l=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return y.format(u)(t).replace(/-/g,"\u2212");var f=Math.pow(10,-a)/2;if("none"===o&&(l=0),(t=Math.abs(t))12||l<-15)?t+="e"+m:"E"===o?t+="E"+m:"power"===o?t+="\xd710"+m+"":"B"===o&&9===l?t+="B":"SI"!==o&&"B"!==o||(t+=H[l/3+5])}return i?"\u2212"+t:t}function p(t,e){var r,n,i=[];for(r=0;r1)for(n=1;n2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},O.getAutoRange=function(t){var e,r=[],n=t._min[0].val,i=t._max[0].val;for(e=1;e0&&c>0&&h/c>f&&(l=o,u=s,f=h/c);if(n===i){var m=n-1,g=n+1;r="tozero"===t.rangemode?n<0?[m,0]:[0,g]:"nonnegative"===t.rangemode?[Math.max(0,m),Math.max(0,g)]:[m,g]}else f&&("linear"!==t.type&&"-"!==t.type||("tozero"===t.rangemode?(l.val>=0&&(l={val:0,pad:0}),u.val<=0&&(u={val:0,pad:0})):"nonnegative"===t.rangemode&&(l.val-f*l.pad<0&&(l={val:0,pad:0}),u.val<0&&(u={val:1,pad:0})),f=(u.val-l.val)/(t._length-l.pad-u.pad)),r=[l.val-f*l.pad,u.val+f*u.pad]);return r[0]===r[1]&&("tozero"===t.rangemode?r=r[0]<0?[r[0],0]:r[0]>0?[0,r[0]]:[0,1]:(r=[r[0]-1,r[0]+1],"nonnegative"===t.rangemode&&(r[0]=Math.max(0,r[0])))),d&&r.reverse(),_.simpleMap(r,t.l2r||Number)},O.doAutoRange=function(t){t._length||t.setScale();var e=t._min&&t._max&&t._min.length&&t._max.length;if(t.autorange&&e){t.range=O.getAutoRange(t);var r=t._input;r.range=t.range.slice(),r.autorange=t.autorange}},O.saveRangeInitial=function(t,e){for(var r=O.list(t,"",!0),n=!1,i=0;i=f?d=!1:s.val>=u&&s.pad<=f&&(t._min.splice(o,1),o--);d&&t._min.push({val:u,pad:y&&0===u?0:f})}if(n(c)){for(d=!0,o=0;o=c&&s.pad>=h?d=!1:s.val<=c&&s.pad<=h&&(t._max.splice(o,1),o--);d&&t._max.push({val:c,pad:y&&0===c?0:h})}}}if((t.autorange||!!_.nestedProperty(t,"rangeslider.autorange").get())&&e){t._min||(t._min=[]),t._max||(t._max=[]),r||(r={}),t._m||t.setScale();var a,o,s,l,u,c,h,f,d,p,m,g=e.length,v=r.padded?.05*t._length:0,y=r.tozero&&("linear"===t.type||"-"===t.type),x=n((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),w=n((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),M=n(r.vpadplus||r.vpad),k=n(r.vpadminus||r.vpad);for(a=0;a<6;a++)i(a);for(a=g-1;a>5;a--)i(a)}},O.autoBin=function(t,e,r,a,o){var s=_.aggNums(Math.min,null,t),l=_.aggNums(Math.max,null,t);if(o||(o=e.calendar),"category"===e.type)return{start:s-.5,end:l+.5,size:1};var u;if(r)u=(l-s)/r;else{var c=_.distinctVals(t),h=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),f=h*_.roundUp(c.minDiff/h,[.9,1.9,4.9,9.9],!0);u=Math.max(f,2*_.stdev(t)/Math.pow(t.length,a?.25:.4)),b(u)||(u=1)}var d;d="log"===e.type?{type:"linear",range:[s,l]}:{type:e.type,range:_.simpleMap([s,l],e.c2r,0,o),calendar:o},O.setConvert(d),O.autoTicks(d,u);var p,m=O.tickIncrement(O.tickFirst(d),d.dtick,"reverse",o);if("number"==typeof d.dtick){m=n(m,t,d,s,l);p=m+(1+Math.floor((l-m)/d.dtick))*d.dtick}else for("M"===d.dtick.charAt(0)&&(m=i(m,t,d.dtick,s,o)),p=m;p<=l;)p=O.tickIncrement(p,d.dtick,!1,o);return{start:e.c2r(m,0,o),end:e.c2r(p,0,o),size:d.dtick}},O.calcTicks=function(t){var e=_.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=_.constrain(t._length/r,4,9)+1)),"array"===t.tickmode&&(n*=100),O.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}if(t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),s(t),"array"===t.tickmode)return a(t);t._tmin=O.tickFirst(t);var i=e[1]=l:u<=l)&&(o.push(u),!(o.length>1e3));u=O.tickIncrement(u,t.dtick,i,t.calendar));t._tmax=o[o.length-1],t._prevDateHead="",t._inCalcTicks=!0;for(var c=new Array(o.length),h=0;hE?(e/=E,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="M"+12*o(e,r,R)):n>L?(e/=L,t.dtick="M"+o(e,1,F)):n>C?(t.dtick=o(e,C,B),t.tick0=_.dateTick0(t.calendar,!0)):n>z?t.dtick=o(e,z,F):n>D?t.dtick=o(e,D,N):n>I?t.dtick=o(e,I,N):(r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=o(e,r,R))}else if("log"===t.type){t.tick0=0;var i=_.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(i[1]-i[0])<1){var a=1.5*Math.abs((i[1]-i[0])/e);e=Math.abs(Math.pow(10,i[1])-Math.pow(10,i[0]))/a,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="L"+o(e,r,R)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):(t.tick0=0,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=o(e,r,R));if(0===t.dtick&&(t.dtick=1),!b(t.dtick)&&"string"!=typeof t.dtick){var s=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(s)}},O.tickIncrement=function(t,e,r,n){var i=r?-1:1;if(b(e))return t+i*e;var a=e.charAt(0),o=i*Number(e.substr(1));if("M"===a)return _.incrementMonth(t,o,n);if("L"===a)return Math.log(Math.pow(10,t)+o)/Math.LN10;if("D"===a){var s="D2"===e?V:U,l=t+.01*i,u=_.roundUp(_.mod(l,1),s,r);return Math.floor(l)+Math.log(y.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(e)},O.tickFirst=function(t){var e=t.r2l||Number,r=_.simpleMap(t.range,e),n=r[1]1&&e2*i}function a(t){for(var e,r=Math.max(1,(t.length-1)/1e3),n=0,i=0,a=0;a2*n}var o=t("fast-isnumeric"),s=t("../../lib"),l=t("../../constants/numerical").BADNUM;e.exports=function(t,e){return i(t,e)?"date":a(t)?"category":n(t)?"linear":"-"}},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],726:[function(t,e,r){"use strict";var n=t("tinycolor2").mix,i=t("../../registry"),a=t("../../lib"),o=t("../../components/color/attributes").lightFraction,s=t("./layout_attributes"),l=t("./tick_value_defaults"),u=t("./tick_mark_defaults"),c=t("./tick_label_defaults"),h=t("./category_order_defaults"),f=t("./set_convert"),d=t("./ordered_categories");e.exports=function(t,e,r,p,m){function g(r,n){return a.coerce2(t,e,s,r,n)}var v=p.letter,y=p.font||{},b="Click to enter "+(p.title||v.toUpperCase()+" axis")+" title",x=r("visible",!p.cheateronly),_=e.type;if("date"===_){i.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",p.calendar)}if(f(e,m),r("autorange",!e.isValidRange(t.range))&&r("rangemode"),r("range"),e.cleanRange(),h(t,e,r),e._initialCategories="category"===_?d(v,e.categoryorder,e.categoryarray,p.data):[],!x)return e;var w=r("color"),M=w===t.color?w:y.color;r("title",b),a.coerceFont(r,"titlefont",{family:y.family,size:Math.round(1.2*y.size),color:M}),l(t,e,r,_),c(t,e,r,_,p),u(t,e,r,p);var k=g("linecolor",w),A=g("linewidth"),T=r("showline",!!k||!!A);T||(delete e.linecolor,delete e.linewidth),(T||e.ticks)&&r("mirror");var S=g("gridcolor",n(w,p.bgColor,o).toRgbString()),E=g("gridwidth");r("showgrid",p.showGrid||!!S||!!E)||(delete e.gridcolor,delete e.gridwidth);var L=g("zerolinecolor",w),C=g("zerolinewidth");return r("zeroline",p.showGrid||!!L||!!C)||(delete e.zerolinecolor,delete e.zerolinewidth),e}},{"../../components/color/attributes":577,"../../lib":685,"../../registry":802,"./category_order_defaults":728,"./layout_attributes":735,"./ordered_categories":737,"./set_convert":741,"./tick_label_defaults":742,"./tick_mark_defaults":743,"./tick_value_defaults":744,tinycolor2:514}],727:[function(t,e,r){"use strict";function n(t,e,r){function n(t,r){for(var n=Object.keys(t),i=/^[xyz]axis[0-9]*/,a=[],o=0;o0;a&&(n="array");var o=r("categoryorder",n);"array"===o&&r("categoryarray"),a||"array"!==o||(e.categoryorder="trace")}}},{}],729:[function(t,e,r){"use strict";e.exports={idRegex:{x:/^x([2-9]|[1-9][0-9]+)?$/,y:/^y([2-9]|[1-9][0-9]+)?$/},attrRegex:{x:/^xaxis([2-9]|[1-9][0-9]+)?$/,y:/^yaxis([2-9]|[1-9][0-9]+)?$/},xAxisMatch:/^xaxis[0-9]*$/,yAxisMatch:/^yaxis[0-9]*$/,AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,MAXDIST:20,YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,BENDPX:1.5,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4]}},{}],730:[function(t,e,r){"use strict";function n(t,e,r,n){var i,a,s,l,u=n[o(e)].type,c=[];for(a=0;aa*p))for(r=0;r=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function u(t,e){return t?"nsew"===t?"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function c(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",i+"Z")}function h(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:T.background,stroke:T.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+r+")").attr("d","M0,0Z")}function f(t){t.selectAll(".select-outline").remove()}function d(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),i||(t.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function p(t){x.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function m(t){return["lasso","select"].indexOf(t)!==-1}function g(t,e){return"M"+(t.l-.5)+","+(e-j-.5)+"h-3v"+(2*j+1)+"h3ZM"+(t.r+.5)+","+(e-j-.5)+"h3v"+(2*j+1)+"h-3Z"}function v(t,e){return"M"+(e-j-.5)+","+(t.t-.5)+"v-3h"+(2*j+1)+"v3ZM"+(e-j-.5)+","+(t.b+.5)+"v3h"+(2*j+1)+"v-3Z"}function y(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,j)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function b(t,e,r){var n,i,a,o,s,l,u=!1,c={},h={};for(n=0;nj||s>j?(wt="xy",o/nt>s/it?(s=o*it/nt,vt>a?yt.t=vt-s:yt.b=vt+s):(o=s*nt/it,gt>i?yt.l=gt-o:yt.r=gt+o),kt.attr("d",y(yt))):n():!ot||szoom back out","long"),R=!1)}function G(e,r){var n=1===(N+B).length;if(e)J();else if(2!==r||n){if(1===r&&n){var i=N?tt[0]:$[0],o="s"===N||"w"===B?0:1,s=i._name+".range["+o+"]",l=a(i,o),u="left",c="middle";if(i.fixedrange)return;N?(c="n"===N?"top":"bottom","right"===i.side&&(u="right")):"e"===B&&(u="right"),t._context.showAxisRangeEntryBoxes&&x.select(pt).call(A.makeEditable,null,{immediate:!0,background:ht.paper_bgcolor,text:String(l),fill:i.tickfont?i.tickfont.color:"#444",horizontalAlign:u,verticalAlign:c}).on("edit",function(e){var r=i.d2r(e);void 0!==r&&w.relayout(t,s,r)})}}else Z()}function Y(e){function r(t,e,r){function n(e){return t.l2r(a+(e-a)*r)}if(!t.fixedrange){var i=k.simpleMap(t.range,t.r2l),a=i[0]+(i[1]-i[0])*e;t.range=i.map(n)}}if(t._context.scrollZoom||ht._enablescrollzoom){if(t._transitioningWithDuration)return k.pauseEvent(e);var n=t.querySelector(".plotly");if(U(),!(n.scrollHeight-n.clientHeight>10||n.scrollWidth-n.clientWidth>10)){clearTimeout(Tt);var i=-e.deltaY;if(isFinite(i)||(i=e.wheelDelta/10),!isFinite(i))return void k.log("Did not find wheel motion attributes: ",e);var a,o=Math.exp(-Math.min(Math.max(i,-20),20)/100),s=Et.draglayer.select(".nsewdrag").node().getBoundingClientRect(),l=(e.clientX-s.left)/s.width,u=(s.bottom-e.clientY)/s.height;if(B||lt){for(B||(l=.5),a=0;a<$.length;a++)r($[a],l,o);At[2]*=o,At[0]+=At[2]*l*(1/o-1)}if(N||lt){for(N||(u=.5),a=0;a0;n--)r.push(e);return r}function i(t,e){for(var r=[],n=0;n$.width||Q<0||Q>$.height)return w.unhoverRaw(t,e)}if(O="xval"in e?n(a,e.xval):i(E,J),j="yval"in e?n(a,e.yval):i(L,Q),!m(O[0])||!m(j[0]))return v.warn("Fx.hover failed",e,t),w.unhoverRaw(t,e)}var tt=1/0;for(F=0;F1||B.hoverinfo.indexOf("name")!==-1?B.name:void 0,index:!1,distance:Math.min(tt,T.MAXDIST),color:x.defaultLine,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},o[U]&&(Y.subplot=o[U]._subplot),W=X.length,"array"===H){var et=e[F];"pointNumber"in et?(Y.index=et.pointNumber,H="closest"):(H="","xval"in et&&(q=et.xval,H="x"),"yval"in et&&(G=et.yval,H=H?"closest":"y"))}else q=O[V],G=j[V];if(B._module&&B._module.hoverPoints){var rt=B._module.hoverPoints(Y,q,G,H);if(rt)for(var nt,it=0;itW&&(X.splice(0,W),tt=X[0].distance)}if(0===X.length)return w.unhoverRaw(t,e);X.sort(function(t,e){return t.distance-e.distance});var at=t._hoverdata,ot=[];for(R=0;R1,ct=x.combine(o.plot_bgcolor||x.background,o.paper_bgcolor),ht={hovermode:P,rotateLabels:ut,bgColor:ct,container:o._hoverlayer,outerContainer:o._paperdiv},ft=c(X,ht);if(h(X,ut?"xa":"ya"),f(ft,ut),e.target&&e.target.tagName){var dt=k.getComponentMethod("annotations","hasClickToShow")(t,ot);M(p.select(e.target),dt?"pointer":"")}e.target&&d(t,e,at)&&(at&&t.emit("plotly_unhover",{event:e,points:at}), -t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:E,yaxes:L,xvals:O,yvals:j}))}function s(t){return t.subplot||t.xaxis+t.yaxis||t.geo}function l(t,e){t.posref="y"===e?(t.x0+t.x1)/2:(t.y0+t.y1)/2,t.x0=v.constrain(t.x0,0,t.xa._length),t.x1=v.constrain(t.x1,0,t.xa._length),t.y0=v.constrain(t.y0,0,t.ya._length),t.y1=v.constrain(t.y1,0,t.ya._length);var r;if(void 0!==t.xLabelVal){r="log"===t.xa.type&&t.xLabelVal<=0;var n=A.tickText(t.xa,t.xa.c2l(r?-t.xLabelVal:t.xLabelVal),"hover");r?0===t.xLabelVal?t.xLabel="0":t.xLabel="-"+n.text:t.xLabel=n.text,t.xVal=t.xa.c2d(t.xLabelVal)}if(void 0!==t.yLabelVal){r="log"===t.ya.type&&t.yLabelVal<=0;var i=A.tickText(t.ya,t.ya.c2l(r?-t.yLabelVal:t.yLabelVal),"hover");r?0===t.yLabelVal?t.yLabel="0":t.yLabel="-"+i.text:t.yLabel=i.text,t.yVal=t.ya.c2d(t.yLabelVal)}if(void 0!==t.zLabelVal&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var a=A.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+a+" / -"+A.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xb1 "+a,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var o=A.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+o+" / -"+A.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xb1 "+o,"y"===e&&(t.distance+=1)}var s=t.trace.hoverinfo;return"all"!==s&&(s=s.split("+"),s.indexOf("x")===-1&&(t.xLabel=void 0),s.indexOf("y")===-1&&(t.yLabel=void 0),s.indexOf("z")===-1&&(t.zLabel=void 0),s.indexOf("text")===-1&&(t.text=void 0),s.indexOf("name")===-1&&(t.name=void 0)),t}function u(t,e){var r=e.hovermode,n=e.container,i=t[0],a=i.xa,o=i.ya,s=a.showspikes,l=o.showspikes;if(n.selectAll(".spikeline").remove(),"closest"===r&&(s||l)){var u=e.fullLayout,c=a._offset+(i.x0+i.x1)/2,h=o._offset+(i.y0+i.y1)/2,f=x.combine(u.plot_bgcolor,u.paper_bgcolor),d=g.readability(i.color,f)<1.5?x.contrast(f):i.color;if(l){var p=o.spikemode,m=o.spikethickness,v=o.spikecolor||d,y=o._boundingBox,b=(y.left+y.right)/215&&(r=r.substr(0,12)+"...")),void 0!==t.extraText&&(n+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(n+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(n+="y: "+t.yLabel+"
"),n+=(n?"z: ":"")+t.zLabel):A&&t[i+"Label"]===g?n=t[("x"===i?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&(n=t.yLabel):n=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",t.text&&!Array.isArray(t.text)&&(n+=(n?"
":"")+t.text),""===n&&(""===r&&e.remove(),n=r);var f=e.select("text.nums").call(_.font,t.fontFamily||u,t.fontSize||c,t.fontColor||h).call(_.setPosition,0,0).text(n).attr("data-notex",1).call(b.convertToTspans);f.selectAll("tspan.line").call(_.setPosition,0,0);var d=e.select("text.name"),m=0;r&&r!==n?(d.call(_.font,t.fontFamily||u,t.fontSize||c,l).text(r).call(_.setPosition,0,0).attr("data-notex",1).call(b.convertToTspans),d.selectAll("tspan.line").call(_.setPosition,0,0),m=d.node().getBoundingClientRect().width+2*j):(d.remove(),e.select("rect").remove()),e.select("path").style({fill:l,stroke:h});var v,y,T=f.node().getBoundingClientRect(),S=t.xa._offset+(t.x0+t.x1)/2,E=t.ya._offset+(t.y0+t.y1)/2,L=Math.abs(t.x1-t.x0),z=Math.abs(t.y1-t.y0),D=T.width+O+j+m;t.ty0=w-T.top,t.bx=T.width+2*j,t.by=T.height+2*j,t.anchor="start",t.txwidth=T.width,t.tx2width=m,t.offset=0,a?(t.pos=S,v=E+z/2+D<=k,y=E-z/2-D>=0,"top"!==t.idealAlign&&v||!y?v?(E+=z/2,t.anchor="start"):t.anchor="middle":(E-=z/2,t.anchor="end")):(t.pos=E,v=S+L/2+D<=M,y=S-L/2-D>=0,"left"!==t.idealAlign&&v||!y?v?(S+=L/2,t.anchor="start"):t.anchor="middle":(S-=L/2,t.anchor="end")),f.attr("text-anchor",t.anchor),m&&d.attr("text-anchor",t.anchor),e.attr("transform","translate("+S+","+E+")"+(a?"rotate("+C+")":""))}),L}function h(t,e){function r(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var u=0;for(o=0;oe.pmax&&u++;for(o=t.length-1;o>=0&&!(u<=0);o--)l=t[o],l.pos>e.pmax-1&&(l.del=!0,u--);for(o=0;o=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(u<=0);o--)l=t[o],l.pos+l.dp+l.size>e.pmax&&(l.del=!0,u--)}}}for(var n,i,a,o,s,l,u,c=0,h=t.map(function(t,r){var n=t[e];return[{i:r,dp:0,pos:t.pos,posref:t.posref,size:t.by*("x"===n._id.charAt(0)?D:1)/2,pmin:n._offset,pmax:n._offset+n._length}]}).sort(function(t,e){return t[0].posref-e[0].posref});!n&&c<=t.length;){for(c++,n=!0,o=0;o.01&&p.pmin===m.pmin&&p.pmax===m.pmax){for(s=d.length-1;s>=0;s--)d[s].dp+=i;for(f.push.apply(f,d),h.splice(o+1,1),u=0,s=f.length-1;s>=0;s--)u+=f[s].dp;for(a=u/f.length,s=f.length-1;s>=0;s--)f[s].dp-=a;n=!1}else o++}h.forEach(r)}for(o=h.length-1;o>=0;o--){var g=h[o];for(s=g.length-1;s>=0;s--){var v=g[s],y=t[v.i];y.offset=v.dp,y.del=v.del}}}function f(t,e){t.each(function(t){var r=p.select(this);if(t.del)return void r.remove();var n="end"===t.anchor?-1:1,i=r.select("text.nums"),a={start:1,end:-1,middle:0}[t.anchor],o=a*(O+j),s=o+a*(t.txwidth+j),l=0,u=t.offset;"middle"===t.anchor&&(o-=t.tx2width/2,s-=t.tx2width/2),e&&(u*=-P,l=t.offset*I),r.select("path").attr("d","middle"===t.anchor?"M-"+t.bx/2+",-"+t.by/2+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(n*O+l)+","+(O+u)+"v"+(t.by/2-O)+"h"+n*t.bx+"v-"+t.by+"H"+(n*O+l)+"V"+(u-O)+"Z"),i.call(_.setPosition,o+l,u+t.ty0-t.by/2+j).selectAll("tspan.line").attr({x:i.attr("x"),y:i.attr("y")}),t.tx2width&&(r.select("text.name, text.name tspan.line").call(_.setPosition,s+a*j+l,u+t.ty0-t.by/2+j),r.select("rect").call(_.setRect,s+(a-1)*t.tx2width/2+l,u-t.by/2-1,t.tx2width,t.by+2))})}function d(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber))return!0}return!1}var p=t("d3"),m=t("fast-isnumeric"),g=t("tinycolor2"),v=t("../../lib"),y=t("../../lib/events"),b=t("../../lib/svg_text_utils"),x=t("../../components/color"),_=t("../../components/drawing"),w=t("../../components/dragelement"),M=t("../../lib/override_cursor"),k=t("../../registry"),A=t("./axes"),T=t("./constants"),S=t("./dragbox"),E=t("../layout_attributes"),L=e.exports={};L.unhover=w.unhover,L.supplyLayoutDefaults=function(t,e,r){function n(r,n){return v.coerce(t,e,E,r,n)}n("dragmode");var i;if(e._has("cartesian")){i=(e._isHoriz=L.isHoriz(r))?"y":"x"}else i="closest";n("hovermode",i)},L.isHoriz=function(t){for(var e=!0,r=0;rt._lastHoverTime+T.HOVERMINTIME)return o(t,e,r),void(t._lastHoverTime=Date.now());t._hoverTimer=setTimeout(function(){o(t,e,r),t._lastHoverTime=Date.now(),t._hoverTimer=void 0},T.HOVERMINTIME)},L.getDistanceFunction=function(t,e,r,n){return"closest"===t?n||a(e,r):"x"===t?e:r},L.getClosest=function(t,e,r){if(r.index!==!1)r.index>=0&&r.indexc[1]-.01&&(e.domain=[0,1]),i.noneOrAll(t.domain,e.domain,[0,1])}return e}},{"../../lib":685,"fast-isnumeric":116}],739:[function(t,e,r){"use strict";e.exports=function(t,e,r){void 0===r&&(r=.5);var n=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=n[0]+(n[1]-n[0])*r,a=(i-n[0])*e;t.range=t._input.range=[t.l2r(i-a),t.l2r(i+a)]}},{}],740:[function(t,e,r){"use strict";function n(t){return t._id}var i=t("../../lib/polygon"),a=t("../../components/color"),o=t("./axes"),s=t("./constants"),l=i.filter,u=i.tester,c=s.MINSELECT;e.exports=function(t,e,r,i,h){function f(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return t.p2d(r[e])}}function d(t,e){return t-e}var p,m=i.gd._fullLayout._zoomlayer,g=i.element.getBoundingClientRect(),v=i.plotinfo.xaxis._offset,y=i.plotinfo.yaxis._offset,b=e-g.left,x=r-g.top,_=b,w=x,M="M"+b+","+x,k=i.xaxes[0]._length,A=i.yaxes[0]._length,T=i.xaxes.map(n),S=i.yaxes.map(n),E=i.xaxes.concat(i.yaxes);"lasso"===h&&(p=l([[b,x]],s.BENDPX));var L=m.selectAll("path.select-outline").data([1,2]);L.enter().append("path").attr("class",function(t){return"select-outline select-outline-"+t}).attr("transform","translate("+v+", "+y+")").attr("d",M+"Z");var C,z,D,I,P,O=m.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1}).attr("transform","translate("+v+", "+y+")").attr("d","M0,0Z"),j=[],R=i.gd,F=[];for(C=0;Cf?d:o(t)?Number(t):d):d}var a=t("d3"),o=t("fast-isnumeric"),s=t("../../lib"),l=s.cleanNumber,u=s.ms2DateTime,c=s.dateTime2ms,h=t("../../constants/numerical"),f=h.FP_SAFE,d=h.BADNUM,p=t("./constants"),m=t("./axis_ids");e.exports=function(t,e){function r(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-3*w*Math.abs(n-i))}return d}function h(e,r,n){var i=c(e,n||t.calendar);if(i===d){if(!o(e))return d;i=c(new Date(+e))}return i}function g(e,r,n){return u(e,r,n||t.calendar)}function v(e){return t._categories[Math.round(e)]}function y(e){if(null!==e&&void 0!==e){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return d}function b(e){if(t._categoriesMap){var r=t._categoriesMap[e];if(void 0!==r)return r}if("number"==typeof e)return e}function x(e){return o(e)?a.round(t._b+t._m*e,2):d}function _(e){return(e-t._b)/t._m}e=e||{};var w=10;t.c2l="log"===t.type?r:i,t.l2c="log"===t.type?n:i,t.l2p=x,t.p2l=_,t.c2p="log"===t.type?function(t,e){return x(r(t,e))}:x,t.p2c="log"===t.type?function(t){return n(_(t))}:_,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=i,t.d2p=t.r2p=function(t){return x(l(t))},t.p2d=t.p2r=_):"log"===t.type?(t.d2r=t.d2l=function(t,e){return r(l(t),e)},t.r2d=t.r2c=function(t){return n(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=i,t.c2r=r,t.l2d=n,t.d2p=function(e,r){return x(t.d2r(e,r))},t.p2d=function(t){return n(_(t))},t.r2p=function(t){return x(l(t))},t.p2r=_):"date"===t.type?(t.d2r=t.r2d=s.identity,t.d2c=t.r2c=t.d2l=t.r2l=h,t.c2d=t.c2r=t.l2d=t.l2r=g,t.d2p=t.r2p=function(t,e,r){return x(h(t,0,r))},t.p2d=t.p2r=function(t,e,r){return g(_(t),e,r)}):"category"===t.type&&(t.d2r=t.d2c=t.d2l=y,t.r2d=t.c2d=t.l2d=v,t.d2l_noadd=b,t.r2l=t.l2r=t.r2c=t.c2r=i,t.d2p=function(t){return x(b(t))},t.p2d=function(t){return v(_(t))},t.r2p=x,t.p2r=_),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e){e||(e="range");var r,n,i=s.nestedProperty(t,e).get(),a=(t._id||"x").charAt(0);if(n="date"===t.type?s.dfltRange(t.calendar):"y"===a?p.DFLTRANGEY:p.DFLTRANGEX,n=n.slice(),!i||2!==i.length)return void s.nestedProperty(t,e).set(n);for("date"===t.type&&(i[0]=s.cleanDate(i[0],d,t.calendar),i[1]=s.cleanDate(i[1],d,t.calendar)),r=0;r<2;r++)if("date"===t.type){if(!s.isDateTime(i[r],t.calendar)){t[e]=n;break}if(t.r2l(i[0])===t.r2l(i[1])){var l=s.constrain(t.r2l(i[0]),s.MIN_MS+1e3,s.MAX_MS-1e3);i[0]=t.l2r(l-1e3),i[1]=t.l2r(l+1e3);break}}else{if(!o(i[r])){if(!o(i[1-r])){t[e]=n;break}i[r]=i[1-r]*(r?10:.1)} -if(i[r]<-f?i[r]=-f:i[r]>f&&(i[r]=f),i[0]===i[1]){var u=Math.max(1,Math.abs(1e-6*i[0]));i[0]-=u,i[1]+=u}}},t.setScale=function(r){var n=e._size,i=t._id.charAt(0);if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var a=m.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var o=r&&t._r?"_r":"range",l=t.calendar;t.cleanRange(o);var u=t.r2l(t[o][0],l),c=t.r2l(t[o][1],l);if("y"===i?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),!isFinite(t._m)||!isFinite(t._b))throw s.notifier("Something went wrong with axis scaling","long"),e._replotting=!1,new Error("axis scaling")},t.makeCalcdata=function(e,r){var n,i,a,o="date"===t.type&&e[r+"calendar"];if(r in e)for(n=e[r],i=new Array(n.length),a=0;a0?Number(c):u;else if("string"!=typeof c)e.dtick=u;else{var h=c.charAt(0),f=c.substr(1);f=n(f)?Number(f):0,(f<=0||!("date"===o&&"M"===h&&f===Math.round(f)||"log"===o&&"L"===h||"log"===o&&"D"===h&&(1===f||2===f)))&&(e.dtick=u)}var d="date"===o?i.dateTick0(e.calendar):0,p=r("tick0",d);"date"===o?e.tick0=i.cleanDate(p,d):n(p)&&"D1"!==c&&"D2"!==c?e.tick0=Number(p):e.tick0=d}else{var m=r("tickvals");void 0===m?e.tickmode="auto":r("ticktext")}}},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],745:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plotly"),a=t("../../registry"),o=t("../../components/drawing"),s=t("./axes"),l=/((x|y)([2-9]|[1-9][0-9]+)?)axis$/;e.exports=function(t,e,r,u){function c(e,r){function n(e,r){for(i=0;ir.duration?(d(),k=window.cancelAnimationFrame(m)):k=window.requestAnimationFrame(m)}var g=t._fullLayout,v=[],y=function(t){var e,r,n,i,a,o={};for(e in t)if(r=e.split("."),n=r[0].match(l)){var s=n[1],u=s+"axis";if(i=g[u],a={},Array.isArray(t[e])?a.to=t[e].slice(0):Array.isArray(t[e].range)&&(a.to=t[e].range.slice(0)),!a.to)continue;a.axisName=u,a.length=i._length,v.push(s),o[s]=a}return o}(e),b=Object.keys(y),x=function(t,e,r){var n,i,a,o=t._plots,s=[];for(n in o){var l=o[n];if(s.indexOf(l)===-1){var u=l.xaxis._id,c=l.yaxis._id,h=l.xaxis.range,f=l.yaxis.range;l.xaxis._r=l.xaxis.range.slice(),l.yaxis._r=l.yaxis.range.slice(),i=r[u]?r[u].to:h,a=r[c]?r[c].to:f,h[0]===i[0]&&h[1]===i[1]&&f[0]===a[0]&&f[1]===a[1]||e.indexOf(u)===-1&&e.indexOf(c)===-1||s.push(l)}}return s}(g,b,y);if(!x.length)return!1;var _;u&&(_=u());var w,M,k,A=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(k),k=null,p()}),w=Date.now(),k=window.requestAnimationFrame(m),Promise.resolve()}},{"../../components/drawing":602,"../../plotly":719,"../../registry":802,"./axes":724,d3:107}],746:[function(t,e,r){"use strict";function n(t,e){if("-"===t.type){var r=t._id,n=r.charAt(0);r.indexOf("scene")!==-1&&(r=n);var u=i(e,r,n);if(u){if("histogram"===u.type&&n==={v:"y",h:"x"}[u.orientation||"v"])return void(t.type="linear");var c=n+"calendar",h=u[c];if(o(u,n)){for(var f,d=a(u),p=[],m=0;m0?".":"")+i;u.isPlainObject(a)?s(a,e,o,n+1):e(o,i,a)}})}var l=t("../plotly"),u=t("../lib");r.manageCommandObserver=function(t,e,i,a){var o={},s=!0;e&&e._commandObserver&&(o=e._commandObserver),o.cache||(o.cache={}),o.lookupTable={};var l=r.hasSimpleAPICommandBindings(t,i,o.lookupTable);if(e&&e._commandObserver){if(l)return o;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,o}if(l){n(t,l,o.cache),o.check=function(){if(s){var e=n(t,l,o.cache);return e.changed&&a&&void 0!==o.lookupTable[e.value]&&(o.disable(),Promise.resolve(a({value:e.value,type:l.type,prop:l.prop,traces:l.traces,index:o.lookupTable[e.value]})).then(o.enable,o.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;he*Math.PI/180},w.render=function(){function t(t){var e=r.projection(t.lonlat);return e?"translate("+e[0]+","+e[1]+")":null}function e(t){return r.isLonLatOverEdges(t.lonlat)?"0":"1.0"}var r=this,n=r.framework,i=n.select("g.choroplethlayer"),a=n.select("g.scattergeolayer"),o=r.path;n.selectAll("path.basepath").attr("d",o),n.selectAll("path.graticulepath").attr("d",o),i.selectAll("path.choroplethlocation").attr("d",o),i.selectAll("path.basepath").attr("d",o),a.selectAll("path.js-line").attr("d",o),null!==r.clipAngle?(a.selectAll("path.point").style("opacity",e).attr("transform",t),a.selectAll("text").style("opacity",e).attr("transform",t)):(a.selectAll("path.point").attr("transform",t),a.selectAll("text").attr("transform",t))}},{"../../components/color":578,"../../components/drawing":602,"../../lib/topojson_utils":706,"../cartesian/axes":724,"../cartesian/graph_interact":733,"../plots":787,"./constants":750,"./projections":758,"./set_scale":759,"./zoom":760,"./zoom_reset":761,d3:107,"topojson-client":516}],752:[function(t,e,r){"use strict";var n=t("./geo"),i=t("../../plots/plots");r.name="geo",r.attr="geo",r.idRoot="geo",r.idRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=i.getSubplotIds(e,"geo");void 0===window.PlotlyGeoAssets&&(window.PlotlyGeoAssets={topojson:{}});for(var o=0;on^d>n&&r<(f-u)*(n-c)/(d-c)+u&&(i=!i)}return i}function o(t){return t?t/Math.sin(t):1}function s(t){return t>1?z:t<-1?-z:Math.asin(t)}function l(t){return t>1?0:t<-1?C:Math.acos(t)}function u(t,e){var r=(2+z)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>E;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(C*(4+C))*t*(1+Math.cos(e)),2*Math.sqrt(C/(4+C))*Math.sin(e)]}function c(t,e){function r(r,n){var i=j(r/e,n);return i[0]*=t,i}return arguments.length<2&&(e=t),1===e?j:1/0===e?f:(r.invert=function(r,n){var i=j.invert(r/t,n);return i[0]*=e,i},r)}function h(){var t=2,e=O(c),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}function f(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function d(t,e){return[3*t/(2*C)*Math.sqrt(C*C/3-e*e),e]}function p(t,e){return[t,1.25*Math.log(Math.tan(C/4+.4*e))]}function m(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>E&&--i>0);return e/2}}function g(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function v(t,e){var r,n=Math.min(18,36*Math.abs(e)/C),i=Math.floor(n),a=n-i,o=(r=F[i])[0],s=r[1],l=(r=F[++i])[0],u=r[1],c=(r=F[Math.min(19,++i)])[0],h=r[1];return[t*(l+a*(c-o)/2+a*a*(c-2*l+o)/2),(e>0?z:-z)*(u+a*(h-s)/2+a*a*(h-2*u+s)/2)]}function y(t,e){return[t*Math.cos(e),e]}function b(t,e){var r=Math.cos(e),n=o(l(r*Math.cos(t/=2)));return[2*r*Math.sin(t)*n,Math.sin(e)*n]}function x(t,e){var r=b(t,e);return[(r[0]+t/z)/2,(r[1]+e)/2]}t.geo.project=function(t,e){var n=e.stream;if(!n)throw new Error("not yet supported");return(t&&_.hasOwnProperty(t.type)?_[t.type]:r)(t,n)};var _={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,r)})}}},w=[],M=[],k={point:function(t,e){w.push([t,e])},result:function(){var t=w.length?w.length<2?{type:"Point",coordinates:w[0]}:{type:"MultiPoint",coordinates:w}:null;return w=[],t}},A={lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){w.length&&(M.push(w),w=[])},result:function(){var t=M.length?M.length<2?{type:"LineString",coordinates:M[0]}:{type:"MultiLineString",coordinates:M}:null;return M=[],t}},T={polygonStart:n,lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){var t=w.length;if(t){do{w.push(w[0].slice())}while(++t<4);M.push(w),w=[]}},polygonEnd:n,result:function(){if(!M.length)return null;var t=[],e=[];return M.forEach(function(r){i(r)?t.push([r]):e.push(r)}),e.forEach(function(e){var r=e[0];t.some(function(t){if(a(t[0],r))return t.push(e),!0})||t.push([e])}),M=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},S={Point:k,MultiPoint:k,LineString:A,MultiLineString:A,Polygon:T,MultiPolygon:T,Sphere:T},E=1e-6,L=E*E,C=Math.PI,z=C/2,D=(Math.sqrt(C),C/180),I=180/C,P=t.geo.projection,O=t.geo.projectionMutator;t.geo.interrupt=function(e){function r(t,r){for(var n=r<0?-1:1,i=l[+(r<0)],a=0,o=i.length-1;ai[a][2][0];++a);var s=e(t-i[a][1][0],r);return s[0]+=e(i[a][1][0],n*r>n*i[a][0][1]?i[a][0][1]:r)[0],s}function n(){s=l.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]})})}function i(){for(var e=1e-6,r=[],n=0,i=l[0].length;n=0;--n){var o=l[1][n],s=180*o[0][0]/C,u=180*o[0][1]/C,c=180*o[1][1]/C,h=180*o[2][0]/C,f=180*o[2][1]/C;r.push(a([[h-e,f-e],[h-e,c+e],[s+e,c+e],[s+e,u-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}function a(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++aE&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return P(g)}).raw=g;var F=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];F.forEach(function(t){t[1]*=1.0144}),v.invert=function(t,e){var r=e/z,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=F[a][1],s=F[a+1][1],l=F[Math.min(19,a+2)][1],u=l-o,c=l-2*s+o,h=2*(Math.abs(r)-s)/u,f=c/u,d=h*(1-f*h*(1-2*f*h));if(d>=0||1===a){n=(e>=0?5:-5)*(d+i);var p,m=50;do{i=Math.min(18,Math.abs(n)/5),a=Math.floor(i),d=i-a,o=F[a][1],s=F[a+1][1],l=F[Math.min(19,a+2)][1],n-=(p=(e>=0?z:-z)*(s+d*(l-o)/2+d*d*(l-2*s+o)/2)-e)*I}while(Math.abs(p)>L&&--m>0);break}}while(--a>=0);var g=F[a][0],v=F[a+1][0],y=F[Math.min(19,a+2)][0];return[t/(v+d*(y-g)/2+d*d*(y-2*v+g)/2),n*D]},(t.geo.robinson=function(){return P(v)}).raw=v,y.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return P(y)}).raw=y,b.invert=function(t,e){if(!(t*t+4*e*e>C*C+E)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),u=Math.cos(r/2),c=Math.sin(n),h=Math.cos(n),f=Math.sin(2*n),d=c*c,p=h*h,m=s*s,g=1-p*u*u,v=g?l(h*u)*Math.sqrt(a=1/g):a=0,y=2*v*h*s-t,b=v*c-e,x=a*(p*m+v*h*u*d),_=a*(.5*o*f-2*v*c*s),w=.25*a*(f*s-v*c*p*o),M=a*(d*u+v*m*h),k=_*w-M*x;if(!k)break;var A=(b*_-y*M)/k,T=(y*w-b*x)/k;r-=A,n-=T}while((Math.abs(A)>E||Math.abs(T)>E)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return P(b)}).raw=b,x.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),u=Math.sin(2*n),c=s*s,h=o*o,f=Math.sin(r),d=Math.cos(r/2),p=Math.sin(r/2),m=p*p,g=1-h*d*d,v=g?l(o*d)*Math.sqrt(a=1/g):a=0,y=.5*(2*v*o*p+r/z)-t,b=.5*(v*s+n)-e,x=.5*a*(h*m+v*o*d*c)+.5/z,_=a*(f*u/4-v*s*p),w=.125*a*(u*p-v*s*h*f),M=.5*a*(c*d+v*m*o)+.5,k=_*w-M*x,A=(b*_-y*M)/k,T=(y*w-b*x)/k;r-=A,n-=T}while((Math.abs(A)>E||Math.abs(T)>E)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return P(x)}).raw=x}e.exports=n},{}],759:[function(t,e,r){"use strict";function n(t,e){var r=t.projection,n=t.lonaxis,o=t.lataxis,l=t.domain,u=t.framewidth||0,c=e.w*(l.x[1]-l.x[0]),h=e.h*(l.y[1]-l.y[0]),f=n.range[0]+s,d=n.range[1]-s,p=o.range[0]+s,m=o.range[1]-s,g=n._fullRange[0]+s,v=n._fullRange[1]-s,y=o._fullRange[0]+s,b=o._fullRange[1]-s;r._translate0=[e.l+c/2,e.t+h/2];var x=d-f,_=m-p,w=[f+x/2,p+_/2],M=r._rotate;return r._center=[w[0]+M[0],w[1]+M[1]],function(e){function n(t){return Math.min(_*c/(t[1][0]-t[0][0]),_*h/(t[1][1]-t[0][1]))}var o,s,l,x,_=e.scale(),w=r._translate0,M=i(f,p,d,m),k=i(g,y,v,b);l=a(e,M),o=n(l),x=a(e,k),r._fullScale=n(x),e.scale(o),l=a(e,M),s=[w[0]-l[0][0]+u,w[1]-l[0][1]+u],r._translate=s,e.translate(s),l=a(e,M),t._isAlbersUsa||e.clipExtent(l),o=r.scale*o,r._scale=o,t._width=Math.round(l[1][0])+u,t._height=Math.round(l[1][1])+u,t._marginX=(c-Math.round(l[1][0]))/2,t._marginY=(h-Math.round(l[1][1]))/2}}function i(t,e,r,n){var i=(r-t)/4;return{type:"Polygon",coordinates:[[[t,e],[t,n],[t+i,n],[t+2*i,n],[t+3*i,n],[r,n],[r,e],[r-i,e],[r-2*i,e],[r-3*i,e],[t,e]]]}}function a(t,e){return o.geo.path().projection(t).bounds(e)}var o=t("d3"),s=t("./constants").clipPad;e.exports=n},{"./constants":750,d3:107}],760:[function(t,e,r){"use strict";function n(t,e){return(e._isScoped?a:e._clipAngle?s:o)(t,e.projection)}function i(t,e){var r=e._fullScale;return _.behavior.zoom().translate(t.translate()).scale(t.scale()).scaleExtent([.5*r,100*r])}function a(t,e){function r(){_.select(this).style(k)}function n(){o.scale(_.event.scale).translate(_.event.translate),t.render()}function a(){_.select(this).style(A)}var o=t.projection,s=i(o,e);return s.on("zoomstart",r).on("zoom",n).on("zoomend",a),s}function o(t,e){function r(t){return g.invert(t)}function n(t){var e=g(r(t));return Math.abs(e[0]-t[0])>y||Math.abs(e[1]-t[1])>y}function a(){_.select(this).style(k),l=_.mouse(this),u=g.rotate(),c=g.translate(),h=u,f=r(l)}function o(){if(d=_.mouse(this),n(l))return v.scale(g.scale()),void v.translate(g.translate());g.scale(_.event.scale),g.translate([c[0],_.event.translate[1]]),f?r(d)&&(m=r(d),p=[h[0]+(m[0]-f[0]),u[1],u[2]],g.rotate(p),h=p):(l=d,f=r(l)),t.render()}function s(){_.select(this).style(A)}var l,u,c,h,f,d,p,m,g=t.projection,v=i(g,e),y=2;return v.on("zoomstart",a).on("zoom",o).on("zoomend",s),v}function s(t,e){function r(t){v++||t({type:"zoomstart"})}function n(t){t({type:"zoom"})}function a(t){--v||t({type:"zoomend"})}var o,s=t.projection,d={r:s.rotate(),k:s.scale()},p=i(s,e),m=x(p,"zoomstart","zoom","zoomend"),v=0,y=p.on;return p.on("zoomstart",function(){_.select(this).style(k);var t=_.mouse(this),e=s.rotate(),i=e,a=s.translate(),v=u(e);o=l(s,t),y.call(p,"zoom",function(){var r=_.mouse(this);if(s.scale(d.k=_.event.scale),o){if(l(s,r)){s.rotate(e).translate(a);var u=l(s,r),p=h(o,u),y=g(c(v,p)),b=d.r=f(y,o,i);isFinite(b[0])&&isFinite(b[1])&&isFinite(b[2])||(b=i),s.rotate(b),i=b}}else t=r,o=l(s,t);n(m.of(this,arguments))}),r(m.of(this,arguments))}).on("zoomend",function(){_.select(this).style(A),y.call(p,"zoom",null),a(m.of(this,arguments))}).on("zoom.redraw",function(){t.render()}),_.rebind(p,m,"on")}function l(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&v(r)}function u(t){var e=.5*t[0]*w,r=.5*t[1]*w,n=.5*t[2]*w,i=Math.sin(e),a=Math.cos(e),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function c(t,e){var r=t[0],n=t[1],i=t[2],a=t[3],o=e[0],s=e[1],l=e[2],u=e[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function h(t,e){if(t&&e){var r=b(t,e),n=Math.sqrt(y(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,y(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function f(t,e,r){var n=m(e,2,t[0]);n=m(n,1,t[1]),n=m(n,0,t[2]-r[2]);var i,a,o=e[0],s=e[1],l=e[2],u=n[0],c=n[1],h=n[2],f=Math.atan2(s,o)*M,p=Math.sqrt(o*o+s*s);Math.abs(c)>p?(a=(c>0?90:-90)-f,i=0):(a=Math.asin(c/p)*M-f,i=Math.sqrt(p*p-c*c));var g=180-a-2*f,v=(Math.atan2(h,u)-Math.atan2(l,i))*M,y=(Math.atan2(h,u)-Math.atan2(l,-i))*M;return d(r[0],r[1],a,v)<=d(r[0],r[1],g,y)?[a,v,r[2]]:[g,y,r[2]]}function d(t,e,r,n){var i=p(r-t),a=p(n-e);return Math.sqrt(i*i+a*a)}function p(t){return(t%360+540)%360-180}function m(t,e,r){var n=r*w,i=t.slice(),a=0===e?1:0,o=2===e?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=t[a]*s-t[o]*l,i[o]=t[o]*s+t[a]*l,i}function g(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*M,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*M,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*M]}function v(t){var e=t[0]*w,r=t[1]*w,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function y(t,e){for(var r=0,n=0,i=t.length;nMath.abs(h)?(u.boxEnd[1]=u.boxStart[1]+Math.abs(c)*w*(Math.sign(h)||1),u.boxEnd[1]f[3]&&(u.boxEnd[1]=f[3],u.boxEnd[0]=u.boxStart[0]+(f[3]-u.boxStart[1])/Math.abs(w))):(u.boxEnd[0]=u.boxStart[0]+Math.abs(h)/w*(Math.sign(c)||1),u.boxEnd[0]f[2]&&(u.boxEnd[0]=f[2],u.boxEnd[1]=u.boxStart[1]+(f[2]-u.boxStart[0])*Math.abs(w)))}}else u.boxEnabled&&(c=u.boxStart[0]!==u.boxEnd[0],h=u.boxStart[1]!==u.boxEnd[1],c||h?(c&&(o(0,u.boxStart[0],u.boxEnd[0]),t.xaxis.autorange=!1),h&&(o(1,u.boxStart[1],u.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),u.boxEnabled=!1,u.boxInited=!1);break;case"pan":u.boxEnabled=!1,u.boxInited=!1,n?(u.panning||(u.dragStart[0]=i,u.dragStart[1]=a),Math.abs(u.dragStart[0]-i)h[d+2]&&(h[d]=-1,h[d+2]=1),f=this[b[d]],f._length=o.viewBox[d+2]-o.viewBox[d],l.doAutoRange(f),f.setScale();var v={_axisConstraintGroups:this.graphDiv._fullLayout._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis};y({_fullLayout:v}),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},x.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},x.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},x.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;rMath.abs(e))n.rotate(o,0,0,-t*r*Math.PI*f.rotateSpeed/window.innerWidth);else{var s=-f.zoomSpeed*a*e/window.innerHeight*(o-n.lastT())/100;n.pan(o,0,0,u*(Math.exp(s)-1))}}},!0),f}e.exports=n;var i=t("right-now"),a=t("3d-view"),o=t("mouse-change"),s=t("mouse-wheel")},{"3d-view":33,"mouse-change":434,"mouse-wheel":437,"right-now":483}],767:[function(t,e,r){"use strict";var n=t("./scene"),i=t("../plots"),a=t("../../lib"),o=t("../../constants/xmlns_namespaces");r.name="gl3d",r.attr="scene",r.idRoot="scene",r.idRegex=/^scene([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^scene([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,o=i.getSubplotIds(e,"gl3d"),s=0;s1;o(t,e,r,{type:"gl3d",attributes:s,handleDefaults:n,font:e.font,fullData:r,getDfltFromLayout:a,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":578,"../../../lib":685,"../../subplot_defaults":794,"./axis_defaults":770,"./layout_attributes":773}],773:[function(t,e,r){"use strict";function n(t,e,r){return{x:{valType:"number",dflt:t},y:{valType:"number",dflt:e},z:{valType:"number",dflt:r}}}var i=t("./axis_attributes"),a=t("../../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},camera:{up:a(n(0,0,1),{}),center:a(n(0,0,0),{}),eye:a(n(1.25,1.25,1.25),{})},domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto"},aspectratio:{x:{valType:"number",min:0},y:{valType:"number",min:0},z:{valType:"number",min:0}},xaxis:i,yaxis:i,zaxis:i,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],dflt:"turntable"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest"},_deprecated:{cameraposition:{valType:"info_array"}}}},{"../../../lib/extend":677,"./axis_attributes":769}],774:[function(t,e,r){"use strict";function n(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}function i(t){var e=new n;return e.merge(t),e}var a=t("../../../lib/str2rgbarray"),o=["xaxis","yaxis","zaxis"];n.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[o[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=a(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=i},{"../../../lib/str2rgbarray":703}],775:[function(t,e,r){"use strict";function n(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;af[1][o]?d[o]=1:f[1][o]===f[0][o]?d[o]=1:d[o]=1/(f[1][o]-f[0][o]);for(this.dataScale=d,a=0;am[1][a])m[0][a]=-1,m[1][a]=1;else{var x=m[1][a]-m[0][a];m[0][a]-=x/32,m[1][a]+=x/32}}else{var _=c[A[a]].range;m[0][a]=_[0],m[1][a]=_[1]}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),g[a]=m[1][a]-m[0][a],this.glplot.bounds[0][a]=m[0][a]*d[a],this.glplot.bounds[1][a]=m[1][a]*d[a]}var w=[1,1,1];for(a=0;a<3;++a){l=c[A[a]],u=l.type;var M=y[u];w[a]=Math.pow(M.acc,1/M.count)/d[a]}var k;if("auto"===c.aspectmode)k=Math.max.apply(null,w)/Math.min.apply(null,w)<=4?w:[1,1,1];else if("cube"===c.aspectmode)k=[1,1,1];else if("data"===c.aspectmode)k=w;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var T=c.aspectratio;k=[T.x,T.y,T.z]}c.aspectratio.x=h.aspectratio.x=k[0],c.aspectratio.y=h.aspectratio.y=k[1],c.aspectratio.z=h.aspectratio.z=k[2],this.glplot.aspect=k;var S=c.domain||null,E=e._size||null;if(S&&E){var L=this.container.style;L.position="absolute",L.left=E.l+S.x[0]*E.w+"px",L.top=E.t+(1-S.y[1])*E.h+"px",L.width=E.w*(S.x[1]-S.x[0])+"px",L.height=E.h*(S.y[1]-S.y[0])+"px"}this.glplot.redraw()}},k.destroy=function(){this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null},k.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),u(this.glplot.camera)},k.setCamera=function(t){this.glplot.camera.lookAt.apply(this,l(t))},k.saveCamera=function(t){var e=this.getCamera(),r=p.nestedProperty(t,this.id+".camera"),n=r.get(),i=!1;if(void 0===n)i=!0;else for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!function(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}(e,n,a,o)){i=!0;break}return i&&r.set(e),i},k.updateFx=function(t,e){var r=this.camera;r&&("orbit"===t?(r.mode="orbit",r.keyBindingMode="rotate"):"turntable"===t?(r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate"):r.keyBindingMode=t),this.fullSceneLayout.hovermode=e},k.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(c),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,n=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var i=new Uint8Array(r*n*4);e.readPixels(0,0,r,n,e.RGBA,e.UNSIGNED_BYTE,i);for(var a=0,o=n-1;a0}function a(t){var e={},r={};switch(t.type){case"circle":s.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":s.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity});break;case"fill":s.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var n=t.symbol,i=l(n.textposition,n.iconsize);s.extendFlat(e,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset}),s.extendFlat(r,{"icon-color":t.color,"text-color":n.textfont.color,"text-opacity":t.opacity})}return{layout:e,paint:r}}function o(t){var e,r=t.sourcetype,n=t.source,i={type:r},a="string"==typeof n;return"geojson"===r?e="data":"vector"===r&&(e=a?"url":"tiles"),i[e]=n,i}var s=t("../../lib"),l=t("./convert_text_opts"),u=n.prototype;u.update=function(t){this.visible?this.needsNewSource(t)?(this.updateLayer(t),this.updateSource(t)):this.needsNewLayer(t)&&this.updateLayer(t):(this.updateSource(t),this.updateLayer(t)),this.updateStyle(t),this.visible=i(t)},u.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},u.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==t.below},u.updateSource=function(t){var e=this.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,i(t)){var r=o(t);e.addSource(this.idSource,r)}},u.updateLayer=function(t){var e=this.map;if(e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),this.layerType=t.type,i(t)){e.addLayer({id:this.idLayer,source:this.idSource,"source-layer":t.sourcelayer||"",type:t.type},t.below);var r={visibility:"visible"};this.mapbox.setOptions(this.idLayer,"setLayoutProperty",r)}},u.updateStyle=function(t){var e=a(t);i(t)&&(this.mapbox.setOptions(this.idLayer,"setLayoutProperty",e.layout),this.mapbox.setOptions(this.idLayer,"setPaintProperty",e.paint))},u.dispose=function(){var t=this.map;t.removeLayer(this.idLayer),t.removeSource(this.idSource)},e.exports=function(t,e,r){var i=new n(t,e);return i.update(r),i}},{"../../lib":685,"./convert_text_opts":780}],783:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../components/color").defaultLine,a=t("../font_attributes"),o=t("../../traces/scatter/attributes").textposition;e.exports={_arrayAttrRegexps:[/^mapbox([2-9]|[1-9][0-9]+)?\.layers/],domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],dflt:"basic"},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},layers:{_isLinkedToArray:"layer",sourcetype:{valType:"enumerated",values:["geojson","vector"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},type:{valType:"enumerated",values:["circle","line","fill","symbol"],dflt:"circle"},below:{valType:"string",dflt:""},color:{valType:"color",dflt:i},opacity:{valType:"number",min:0,max:1,dflt:1},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2}},fill:{outlinecolor:{valType:"color",dflt:i}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},textfont:n.extendDeep({},a,{family:{dflt:"Open Sans Regular, Arial Unicode MS Regular"}}),textposition:n.extendFlat({},o,{arrayOk:!1})}}}},{"../../components/color":578,"../../lib":685,"../../traces/scatter/attributes":976,"../font_attributes":748}],784:[function(t,e,r){"use strict";function n(t,e,r){r("accesstoken"),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch"),i(t,e),e._input=t}function i(t,e){function r(t,e){return a.coerce(n,i,s.layers,t,e)}for(var n,i,o=t.layers||[],l=e.layers=[],u=0;u=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var s=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),u=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&n(t,s),l.text(s.text()&&u.text()?" - ":"")}},d.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||"https://plot.ly",r=o.select(t).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return n.append("input").attr({type:"text",name:"data"}).node().value=d.graphJson(t,!1,"keepdata"),n.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1},d.supplyDefaults=function(t){var e,r=t._fullLayout||{},n=t._fullLayout={},i=t.layout||{},a=t._fullData||[],o=t._fullData=[],s=t.data||[];if(t._transitionData||d.createTransitionData(t),r._initialAutoSizeIsDone){var u=r.width,c=r.height;d.supplyLayoutGlobalDefaults(i,n),i.width||(n.width=u),i.height||(n.height=c)}else{d.supplyLayoutGlobalDefaults(i,n);var h=!i.width||!i.height,f=n.autosize,p=t._context&&t._context.autosizable;h&&(f||p)?d.plotAutoSize(t,i,n):h&&d.sanitizeMargins(t),!f&&h&&(i.width=n.width,i.height=n.height)}n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._globalTransforms=(t._context||{}).globalTransforms,d.supplyDataDefaults(s,o,i,n),n._has=d._hasPlotType.bind(n);var m=n._modules;for(e=0;e0){var h=a(t._boundingBoxMargins),f=h.left+h.right,p=h.bottom+h.top,m=1-2*l,g=r._container&&r._container.node?r._container.node().getBoundingClientRect():{width:r.width,height:r.height};n=Math.round(m*(g.width-f)),i=Math.round(m*(g.height-p))}else{var v=u?window.getComputedStyle(t):{};n=parseFloat(v.width)||r.width,i=parseFloat(v.height)||r.height}var y=d.layoutAttributes.width.min,b=d.layoutAttributes.height.min;n1,_=!e.height&&Math.abs(r.height-i)>1;(_||x)&&(x&&(r.width=n),_&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),d.sanitizeMargins(r)},d.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a;l.Axes.supplyLayoutDefaults(t,e,r);var o=e._basePlotModules;for(i=0;i.5*n.width&&(r.l=r.r=0),r.b+r.t>.5*n.height&&(r.b=r.t=0),n._pushmargin[e]={l:{val:r.x,size:r.l+i},r:{val:r.x,size:r.r+i},b:{val:r.y,size:r.b+i},t:{val:r.y,size:r.t+i}}}else delete n._pushmargin[e];n._replotting||d.doAutoMargin(t)}},d.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),e._pushmargin||(e._pushmargin={});var r=e._size,n=JSON.stringify(r),i=Math.max(e.margin.l||0,0),a=Math.max(e.margin.r||0,0),o=Math.max(e.margin.t||0,0),u=Math.max(e.margin.b||0,0),c=e._pushmargin;if(e.margin.autoexpand!==!1){c.base={l:{val:0,size:i},r:{val:1,size:a},t:{val:1,size:o},b:{val:0,size:u}};for(var h=Object.keys(c),f=0;fg){var k=(v*w+(M-e.width)*g)/(w-g),A=(M*(1-g)+(v-e.width)*(1-w))/(w-g);k>=0&&A>=0&&k+A>i+a&&(i=k,a=A)}}if(s(b)&&c[_].t){var T=c[_].t.val,S=c[_].t.size;if(T>y){var E=(b*T+(S-e.height)*y)/(T-y),L=(S*(1-y)+(b-e.height)*(1-T))/(T-y);E>=0&&L>=0&&E+L>u+o&&(u=E,o=L)}}}}if(r.l=Math.round(i),r.r=Math.round(a),r.t=Math.round(o),r.b=Math.round(u),r.p=Math.round(e.margin.pad),r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b,!e._replotting&&"{}"!==n&&n!==JSON.stringify(e._size))return l.plot(t)},d.graphJson=function(t,e,r,n,i){function a(t){if("function"==typeof t)return null;if(c.isPlainObject(t)){var e,n,i={};for(e in t)if("function"!=typeof t[e]&&["_","["].indexOf(e.charAt(0))===-1){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!c.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;i[e]=a(t[e])}return i}return Array.isArray(t)?t.map(a):c.isJSDate(t)?c.ms2DateTimeLocal(+t):t}(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&d.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames,u={data:(o||[]).map(function(t){var r=a(t);return e&&delete r.fit,r})};return e||(u.layout=a(s)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),l&&(u.frames=a(l)),"object"===n?u:JSON.stringify(u)},d.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){_=!0}),i.redraw&&t._transitionData._interruptCallbacks.push(function(){return l.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var o,s,u=0,h=0,d=t._fullLayout._basePlotModules,p=!1;if(r)for(s=0;s=0,E=S?h.angularAxis.domain:n.extent(M),L=Math.abs(M[1]-M[0]);A&&!k&&(L=0);var C=E.slice();T&&k&&(C[1]+=L);var z=h.angularAxis.ticksCount||4;z>8&&(z=z/(z/8)+z%8),h.angularAxis.ticksStep&&(z=(C[1]-C[0])/z);var D=h.angularAxis.ticksStep||(C[1]-C[0])/(z*(h.minorTicks+1));w&&(D=Math.max(Math.round(D),1)),C[2]||(C[2]=D);var I=n.range.apply(this,C);if(I=I.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===h.direction?[0,360]:[360,0]),c.layout.angularAxis.domain=s.domain(),c.layout.angularAxis.endPadding=T?L:0,void 0===(e=n.select(this).select("svg.chart-root"))||e.empty()){var P=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),O=this.appendChild(this.ownerDocument.importNode(P.documentElement,!0));e=n.select(O)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var j,R=e.select(".chart-group"),F={fill:"none",stroke:h.tickColor},N={"font-size":h.font.size,"font-family":h.font.family,fill:h.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+h.font.outlineColor}).join(",")};if(h.showLegend){j=e.select(".legend-group").attr({transform:"translate("+[b,h.margin.top]+")"}).style({display:"block"});var B=d.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend=void 0===t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:d.map(function(t,e){return t.name||"Element"+e}),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:j,elements:B,reverseOrder:h.legend.reverseOrder})})();var U=j.node().getBBox();b=Math.min(h.width-U.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,b=Math.max(10,b),_=[h.margin.left+b,h.margin.top+b],i.range([0,b]),c.layout.radialAxis.domain=i.domain(),j.attr("transform","translate("+[_[0]+b,_[1]-b]+")")}else j=e.select(".legend-group").style({display:"none"});e.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),R.attr("transform","translate("+_+")").style({cursor:"crosshair"});var V=[(h.width-(h.margin.left+h.margin.right+2*b+(U?U.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*b))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),e.select(".outer-group").attr("transform","translate("+V+")"),h.title){var H=e.select("g.title-group text").style(N).text(h.title),q=H.node().getBBox();H.attr({x:_[0]-q.width/2,y:_[1]-b-20})}var G=e.select(".radial.axis-group");if(h.radialAxis.gridLinesVisible){var Y=G.selectAll("circle.grid-circle").data(i.ticks(5));Y.enter().append("circle").attr({class:"grid-circle"}).style(F),Y.attr("r",i),Y.exit().remove()}G.select("circle.outside-circle").attr({r:b}).style(F);var W=e.select("circle.background-circle").attr({r:b}).style({fill:h.backgroundColor,stroke:h.stroke});if(h.radialAxis.visible){var X=n.svg.axis().scale(i).ticks(5).tickSize(5);G.call(X).attr({transform:"rotate("+h.radialAxis.orientation+")"}),G.selectAll(".domain").style(F),G.selectAll("g>text").text(function(t,e){return this.textContent+h.radialAxis.ticksSuffix}).style(N).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===h.radialAxis.tickOrientation?"rotate("+-h.radialAxis.orientation+") translate("+[0,N["font-size"]]+")":"translate("+[0,N["font-size"]]+")"}}),G.selectAll("g>line").style({stroke:"black"})} -var Z=e.select(".angular.axis-group").selectAll("g.angular-tick").data(I),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+l(t,e)+")"}}).style({display:h.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(h.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(h.minorTicks+1)==0)}).style(F),J.selectAll(".minor").style({stroke:h.minorTickColor}),Z.select("line.grid-line").attr({x1:h.tickLength?b-h.tickLength:0,x2:b}).style({display:h.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(N);var Q=Z.select("text.axis-text").attr({x:b+h.labelOffset,dy:".35em",transform:function(t,e){var r=l(t,e),n=b+h.labelOffset,i=h.angularAxis.tickOrientation;return"horizontal"==i?"rotate("+-r+" "+n+" 0)":"radial"==i?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:h.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(h.minorTicks+1)!=0?"":w?w[t]+h.angularAxis.ticksSuffix:t+h.angularAxis.ticksSuffix}).style(N);h.angularAxis.rewriteTicks&&Q.text(function(t,e){return e%(h.minorTicks+1)!=0?"":h.angularAxis.rewriteTicks(this.textContent,e)});var K=n.max(R.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));j.attr({transform:"translate("+[b+K,h.margin.top]+")"});var $=e.select("g.geometry-group").selectAll("g").size()>0,tt=e.select("g.geometry-group").selectAll("g.geometry").data(d);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),d[0]||$){var et=[];d.forEach(function(t,e){var r={};r.radialScale=i,r.angularScale=s,r.container=tt.filter(function(t,r){return r==e}),r.geometry=t.geometry,r.orientation=h.orientation,r.direction=h.direction,r.index=e,et.push({data:t,geometryConfig:r})});var rt=n.nest().key(function(t,e){return void 0!==t.data.groupId||"unstacked"}).entries(et),nt=[];rt.forEach(function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return a(o[r].defaultConfig(),t)});o[r]().config(n)()})}var it,at,ot=e.select(".guides-group"),st=e.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,hasTick:!0})();if(!k){var ht=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});R.on("mousemove.angular-guide",function(t,e){var r=o.util.getMousePos(W).angle;ht.attr({x2:-b,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(b+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){ot.select("line").style({opacity:0})})}var ft=ot.select("circle").style({stroke:"grey",fill:"none"});R.on("mousemove.radial-guide",function(t,e){var r=o.util.getMousePos(W).radius;ft.attr({r:r}).style({opacity:.5}),at=i.invert(o.util.getMousePos(W).radius);var n=o.util.convertToCartesian(r,h.radialAxis.orientation);ut.text(o.util.round(at)).move([n[0]+_[0],n[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){ft.style({opacity:0}),ct.hide(),lt.hide(),ut.hide()}),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(t,r){var i=n.select(this),a=i.style("fill"),s="black",l=i.style("opacity")||1;if(i.attr({"data-opacity":l}),"none"!=a){i.attr({"data-fill":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var u={t:o.util.round(t[0]),r:o.util.round(t[1])};k&&(u.t=w[t[0]]);var c="t: "+u.t+", r: "+u.r,h=this.getBoundingClientRect(),f=e.node().getBoundingClientRect(),d=[h.left+h.width/2-V[0]-f.left,h.top+h.height/2-V[1]-f.top];ct.config({color:s}).text(c),ct.move(d)}else a=i.style("stroke"),i.attr({"data-stroke":a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ct.show()}).on("mouseout.tooltip",function(t,e){ct.hide();var r=n.select(this),i=r.attr("data-fill");i?r.style({fill:i,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})})}),f}var e,r,i,s,l={data:[],layout:{}},u={},c={},h=n.dispatch("hover"),f={};return f.render=function(e){return t(e),this},f.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),a(l.data[e],o.Axis.defaultConfig().data[0]),a(l.data[e],t)}),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,e.layout),this},f.getLiveConfig=function(){return c},f.getinputConfig=function(){return u},f.radialScale=function(t){return i},f.angularScale=function(t){return s},f.svg=function(){return e},n.rebind(f,h,"on"),f},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach(function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)});var s={t:a,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if(void 0===t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return r===-2},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i0)){var s=n.select(this.parentNode).selectAll("path.line").data([0]);s.enter().insert("path"),s.attr({class:"line",d:f(o),transform:function(e,r){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return g.fill(r,i,a)},"fill-opacity":0,stroke:function(t,e){return g.stroke(r,i,a)},"stroke-width":function(t,e){return g["stroke-width"](r,i,a)},"stroke-dasharray":function(t,e){return g["stroke-dasharray"](r,i,a)},opacity:function(t,e){return g.opacity(r,i,a)},display:function(t,e){return g.display(r,i,a)}})}};var d=t.angularScale.range(),p=Math.abs(d[1]-d[0])/l[0].length*Math.PI/180,m=n.svg.arc().startAngle(function(t){return-p/2}).endAngle(function(t){return p/2}).innerRadius(function(e){return t.radialScale(c+(e[2]||0))}).outerRadius(function(e){return t.radialScale(c+(e[2]||0))+t.radialScale(e[1])});h.arc=function(e,r,i){n.select(this).attr({class:"mark arc",d:m,transform:function(e,r){return"rotate("+(t.orientation+u(e[0])+90)+")"}})};var g={fill:function(t,r,n){return e[n].data.color},stroke:function(t,r,n){return e[n].data.strokeColor},"stroke-width":function(t,r,n){return e[n].data.strokeSize+"px"},"stroke-dasharray":function(t,r,n){return i[e[n].data.strokeDash]},opacity:function(t,r,n){return e[n].data.opacity},display:function(t,r,n){return void 0===e[n].data.visible||e[n].data.visible?"block":"none"}},v=n.select(this).selectAll("g.layer").data(l);v.enter().append("g").attr({class:"layer"});var y=v.selectAll("path.mark").data(function(t,e){return t});y.enter().append("path").attr({class:"mark"}),y.style(g).each(h[t.geometryType]),y.exit().remove(),v.exit().remove()})}var e=[o.PolyChart.defaultConfig()],r=n.dispatch("hover"),i={solid:"none",dash:[5,2],dot:[2,5]};return t.config=function(t){return arguments.length?(t.forEach(function(t,r){e[r]||(e[r]={}),a(e[r],o.PolyChart.defaultConfig()),a(e[r],t)}),this):e},t.getColorScale=function(){},n.rebind(t,r,"on"),t},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){function t(){var r=e.legendConfig,i=e.data.map(function(t,e){return[].concat(t).map(function(t,n){var i=a({},r.elements[e]);return i.name=t,i.color=[].concat(r.elements[e].color)[n],i})}),o=n.merge(i);o=o.filter(function(t,e){return r.elements[e]&&(r.elements[e].visibleInLegend||void 0===r.elements[e].visibleInLegend)}),r.reverseOrder&&(o=o.reverse());var s=r.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map(function(t,e){return t.color}),u=r.fontSize,c=null==r.isContinuous?"number"==typeof o[0]:r.isContinuous,h=c?r.height:u*o.length,f=s.classed("legend-group",!0),d=f.selectAll("svg").data([0]),p=d.enter().append("svg").attr({width:300,height:h+u,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var m=n.range(o.length),g=n.scale[c?"linear":"ordinal"]().domain(m).range(l),v=n.scale[c?"linear":"ordinal"]().domain(m)[c?"range":"rangePoints"]([0,h]),y=function(t,e){var r=3*e;return"line"===t?"M"+[[-e/2,-e/12],[e/2,-e/12],[e/2,e/12],[-e/2,e/12]]+"Z":n.svg.symbolTypes.indexOf(t)!=-1?n.svg.symbol().type(t).size(r)():n.svg.symbol().type("square").size(r)()};if(c){var b=d.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);b.enter().append("stop"),b.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),d.append("rect").classed("legend-mark",!0).attr({height:r.height,width:r.colorBandWidth,fill:"url(#grad1)"})}else{var x=d.select(".legend-marks").selectAll("path.legend-mark").data(o);x.enter().append("path").classed("legend-mark",!0),x.attr({transform:function(t,e){return"translate("+[u/2,v(e)+u/2]+")"},d:function(t,e){var r=t.symbol;return y(r,u)},fill:function(t,e){return g(e)}}),x.exit().remove()}var _=n.svg.axis().scale(v).orient("right"),w=d.select("g.legend-axis").attr({transform:"translate("+[c?r.colorBandWidth:u,u/2]+")"}).call(_);return w.selectAll(".domain").style({fill:"none",stroke:"none"}),w.selectAll("line").style({fill:"none",stroke:c?r.textColor:"none"}),w.selectAll("text").style({fill:r.textColor,"font-size":r.fontSize}).text(function(t,e){return o[e].name}),t}var e=o.Legend.defaultConfig(),r=n.dispatch("hover");return t.config=function(t){return arguments.length?(a(e,t),this):e},n.rebind(t,r,"on"),t},o.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=function(){t=i.container.selectAll("g."+s).data([0]);var n=t.enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:i.padding+10,dy:.3*+i.fontSize}),l};return l.text=function(a){var o=n.hsl(i.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",c=a||"";e.style({fill:u,"font-size":i.fontSize+"px"}).text(c);var h=i.padding,f=e.node().getBBox(),d={fill:i.color,stroke:s,"stroke-width":"2px"},p=f.width+2*h+10,m=f.height+2*h;return r.attr({d:"M"+[[10,-m/2],[10,-m/4],[i.hasTick?0:10,0],[10,m/4],[10,m/2],[p,m/2],[p,-m/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[10,-m/2+2*h]+")"}),t.style({display:"block"}),l},l.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),l},l.hide=function(){if(t)return t.style({display:"none"}),l},l.show=function(){if(t)return t.style({display:"block"}),l},l.config=function(t){return a(i,t),l},l},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={};return t.convert=function(t,e){var r={};if(t.data&&(r.data=t.data.map(function(t,r){var n=a({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",n.dotVisible===!0?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n}),!e&&t.layout&&"stack"===t.layout.barmode)){var i=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=i.indexOf(t.geometry);n!=-1&&(r.data[e].groupId=n)})}if(t.layout){var s=a({},t.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?(void 0!==s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&void 0!==s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&void 0!==s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&void 0!==s.margin.t){var l=["t","r","b","l","pad"],u=["top","right","bottom","left","pad"],c={};n.entries(s.margin).forEach(function(t,e){c[u[l.indexOf(t.key)]]=t.value}),s.margin=c}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r},t}},{"../../lib":685,d3:107}],792:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=i.extendDeepAll,u=e.exports={};u.framework=function(t){function e(e,i){return i&&(h=i),n.select(n.select(h).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),r=r?l(r,e):e,a||(a=o.Axis()),c=o.adapter.plotly().convert(r),a.config(c).render(h),t.data=r.data,t.layout=r.layout,u.fillLayout(t),r}var r,i,a,c,h,f=new s;return e.isPolar=!0,e.svg=function(){return a.svg()},e.getConfig=function(){return r},e.getLiveConfig=function(){return o.adapter.plotly().convert(a.getLiveConfig(),!0)},e.getLiveScales=function(){return{t:a.angularScale(),r:a.radialScale()}},e.setUndoPoint=function(){var t=this,e=o.util.cloneJson(r);!function(e,r){f.add({undo:function(){r&&t(r)},redo:function(){t(e)}})}(e,i),i=o.util.cloneJson(e)},e.undo=function(){f.undo()},e.redo=function(){f.redo()},e},u.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),i=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{"../../components/color":578,"../../lib":685,"./micropolar":791,"./undo_manager":793,d3:107}],793:[function(t,e,r){"use strict";e.exports=function(){function t(t,e){return t?(i=!0,t[e](),i=!1,this):this}var e,r=[],n=-1,i=!1;return{add:function(t){return i?this:(r.splice(n+1,r.length-n),r.push(t),n=r.length-1,this)},setCallback:function(t){e=t},undo:function(){var i=r[n];return i?(t(i,"undo"),n-=1,e&&e(i.undo),this):this},redo:function(){var i=r[n+1];return i?(t(i,"redo"),n+=1,e&&e(i.redo),this):this},clear:function(){r=[],n=-1},hasUndo:function(){return n!==-1},hasRedo:function(){return n=o&&(d.min=0,p.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}var i=t("../../../components/color"),a=t("../../subplot_defaults"),o=t("./layout_attributes"),s=t("./axis_defaults"),l=["aaxis","baxis","caxis"];e.exports=function(t,e,r){a(t,e,r,{type:"ternary",attributes:o,handleDefaults:n,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../../components/color":578,"../../subplot_defaults":794,"./axis_defaults":798,"./layout_attributes":800}],800:[function(t,e,r){"use strict";var n=t("../../../components/color/attributes"),i=t("./axis_attributes");e.exports={domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},bgcolor:{valType:"color",dflt:n.background},sum:{valType:"number",dflt:1,min:0},aaxis:i,baxis:i,caxis:i}},{"../../../components/color/attributes":577,"./axis_attributes":797}],801:[function(t,e,r){"use strict";function n(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework()}function i(t){a.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}var a=t("d3"),o=t("tinycolor2"),s=t("../../plotly"),l=t("../../lib"),u=t("../../components/color"),c=t("../../components/drawing"),h=t("../cartesian/set_convert"),f=t("../../lib/extend").extendFlat,d=t("../plots"),p=t("../cartesian/axes"),m=t("../../components/dragelement"),g=t("../../components/titles"),v=t("../cartesian/select"),y=t("../cartesian/constants"),b=t("../cartesian/graph_interact");e.exports=n;var x=n.prototype;x.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={}},x.plot=function(t,e){var r=this,n=e[r.id],i=e._size;r.adjustLayout(n,i),d.generalUpdatePerTraceModule(r,t,n),r.layers.plotbg.select("path").call(u.fill,n.bgcolor)},x.makeFramework=function(){var t=this,e=t.defs.selectAll("g.clips").data([0]);e.enter().append("g").classed("clips",!0);var r="clip"+t.layoutId+t.id;t.clipDef=e.selectAll("#"+r).data([0]),t.clipDef.enter().append("clipPath").attr("id",r).append("path").attr("d","M0,0Z"),t.plotContainer=t.container.selectAll("g."+t.id).data([0]),t.plotContainer.enter().append("g").classed(t.id,!0),t.layers={};var n=["draglayer","plotbg","backplot","grids","frontplot","zoom","aaxis","baxis","caxis","axlines"];t.plotContainer.selectAll("g.toplevel").data(n).enter().append("g").attr("class",function(t){return"toplevel "+t}).each(function(e){var r=a.select(this);t.layers[e]=r,"frontplot"===e?r.append("g").classed("scatterlayer",!0):"backplot"===e?r.append("g").classed("maplayer",!0):"plotbg"===e?r.append("path").attr("d","M0,0Z"):"axlines"===e&&r.selectAll("path").data(["aline","bline","cline"]).enter().append("path").each(function(t){a.select(this).classed(t,!0)})}),t.plotContainer.select(".grids").selectAll("g.grid").data(["agrid","bgrid","cgrid"]).enter().append("g").attr("class",function(t){return"grid "+t}).each(function(e){t.layers[e]=a.select(this)}),t.plotContainer.selectAll(".backplot,.frontplot,.grids").call(c.setClipUrl,r),t.graphDiv._context.staticPlot||t.initInteractions()};var _=Math.sqrt(4/3);x.adjustLayout=function(t,e){var r,n,i,a,o,s,l=this,c=t.domain,d=(c.x[0]+c.x[1])/2,p=(c.y[0]+c.y[1])/2,m=c.x[1]-c.x[0],g=c.y[1]-c.y[0],v=m*e.w,y=g*e.h,b=t.sum,x=t.aaxis.min,w=t.baxis.min,M=t.caxis.min;v>_*y?(a=y,i=a*_):(i=v,a=i/_),o=m*i/v,s=g*a/y,r=e.l+e.w*d-i/2,n=e.t+e.h*(1-p)-a/2,l.x0=r,l.y0=n,l.w=i,l.h=a,l.sum=b,l.xaxis={type:"linear",range:[x+2*M-b,b-x-2*w],domain:[d-o/2,d+o/2],_id:"x"},h(l.xaxis,l.graphDiv._fullLayout),l.xaxis.setScale(),l.yaxis={type:"linear",range:[x,b-w-M],domain:[p-s/2,p+s/2],_id:"y"},h(l.yaxis,l.graphDiv._fullLayout),l.yaxis.setScale();var k=l.yaxis.domain[0],A=l.aaxis=f({},t.aaxis,{visible:!0,range:[x,b-w-M],side:"left",_counterangle:30,tickangle:(+t.aaxis.tickangle||0)-30,domain:[k,k+s*_],_axislayer:l.layers.aaxis,_gridlayer:l.layers.agrid,_pos:0,_id:"y",_length:i,_gridpath:"M0,0l"+a+",-"+i/2});h(A,l.graphDiv._fullLayout),A.setScale();var T=l.baxis=f({},t.baxis,{visible:!0,range:[b-x-M,w],side:"bottom",_counterangle:30,domain:l.xaxis.domain,_axislayer:l.layers.baxis,_gridlayer:l.layers.bgrid,_counteraxis:l.aaxis,_pos:0,_id:"x",_length:i,_gridpath:"M0,0l-"+i/2+",-"+a});h(T,l.graphDiv._fullLayout),T.setScale(),A._counteraxis=T;var S=l.caxis=f({},t.caxis,{visible:!0,range:[b-x-w,M],side:"right",_counterangle:30,tickangle:(+t.caxis.tickangle||0)+30,domain:[k,k+s*_],_axislayer:l.layers.caxis,_gridlayer:l.layers.cgrid,_counteraxis:l.baxis,_pos:0,_id:"y",_length:i,_gridpath:"M0,0l-"+a+","+i/2});h(S,l.graphDiv._fullLayout),S.setScale();var E="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";l.clipDef.select("path").attr("d",E),l.layers.plotbg.select("path").attr("d",E);var L="translate("+r+","+n+")";l.plotContainer.selectAll(".scatterlayer,.maplayer,.zoom").attr("transform",L);var C="translate("+r+","+(n+a)+")";l.layers.baxis.attr("transform",C),l.layers.bgrid.attr("transform",C);var z="translate("+(r+i/2)+","+n+")rotate(30)";l.layers.aaxis.attr("transform",z),l.layers.agrid.attr("transform",z);var D="translate("+(r+i/2)+","+n+")rotate(-30)";l.layers.caxis.attr("transform",D),l.layers.cgrid.attr("transform",D),l.drawAxes(!0),l.plotContainer.selectAll(".crisp").classed("crisp",!1);var I=l.layers.axlines -;I.select(".aline").attr("d",A.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(u.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),I.select(".bline").attr("d",T.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(u.stroke,T.linecolor||"#000").style("stroke-width",(T.linewidth||0)+"px"),I.select(".cline").attr("d",S.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(u.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px")},x.drawAxes=function(t){var e=this,r=e.graphDiv,n=e.id.substr(7)+"title",i=e.aaxis,a=e.baxis,o=e.caxis;if(p.doTicks(r,i,!0),p.doTicks(r,a,!0),p.doTicks(r,o,!0),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0));g.draw(r,"a"+n,{propContainer:i,propName:e.id+".aaxis.title",dfltName:"Component A",attributes:{x:e.x0+e.w/2,y:e.y0-i.titlefont.size/3-s,"text-anchor":"middle"}});var l=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;g.draw(r,"b"+n,{propContainer:a,propName:e.id+".baxis.title",dfltName:"Component B",attributes:{x:e.x0-l,y:e.y0+e.h+.83*a.titlefont.size+l,"text-anchor":"middle"}}),g.draw(r,"c"+n,{propContainer:o,propName:e.id+".caxis.title",dfltName:"Component C",attributes:{x:e.x0+e.w+l,y:e.y0+e.h+.83*o.titlefont.size+l,"text-anchor":"middle"}})}};var w=y.MINZOOM/2+.87,M="m-0.87,.5h"+w+"v3h-"+(w+5.2)+"l"+(w/2+2.6)+",-"+(.87*w+4.5)+"l2.6,1.5l-"+w/2+","+.87*w+"Z",k="m0.87,.5h-"+w+"v3h"+(w+5.2)+"l-"+(w/2+2.6)+",-"+(.87*w+4.5)+"l-2.6,1.5l"+w/2+","+.87*w+"Z",A="m0,1l"+w/2+","+.87*w+"l2.6,-1.5l-"+(w/2+2.6)+",-"+(.87*w+4.5)+"l-"+(w/2+2.6)+","+(.87*w+4.5)+"l2.6,1.5l"+w/2+",-"+.87*w+"Z",T=!0;x.initInteractions=function(){function t(t,e,r){var n=j.getBoundingClientRect();x=e-n.left,w=r-n.top,S={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=S,E=O.aaxis.range[1]-S.a,C=o(O.graphDiv._fullLayout[O.id].bgcolor).getLuminance(),z="M0,"+O.h+"L"+O.w/2+", 0L"+O.w+","+O.h+"Z",D=!1,I=F.append("path").attr("class","zoombox").style({fill:C>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",z),P=F.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),p()}function e(t,e){return 1-e/O.h}function r(t,e){return 1-(t+(O.h-e)/Math.sqrt(3))/O.w}function n(t,e){return(t-(O.h-e)/Math.sqrt(3))/O.w}function a(t,i){var a=x+t,o=w+i,s=Math.max(0,Math.min(1,e(x,w),e(a,o))),l=Math.max(0,Math.min(1,r(x,w),r(a,o))),u=Math.max(0,Math.min(1,n(x,w),n(a,o))),c=(s/2+u)*O.w,h=(1-s/2-l)*O.w,f=(c+h)/2,d=h-c,p=(1-s)*O.h,m=p-d/_;d.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),P.transition().style("opacity",1).duration(200),D=!0)}function c(t,e){if(L===S)return 2===e&&g(),i(R);i(R);var r={};r[O.id+".aaxis.min"]=L.a,r[O.id+".baxis.min"]=L.b,r[O.id+".caxis.min"]=L.c,s.relayout(R,r),T&&R.data&&R._context.showTips&&(l.notifier("Double-click to
zoom back out","long"),T=!1)}function h(){S={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=S}function f(t,e){var r=t/O.xaxis._m,n=e/O.yaxis._m;L={a:S.a-n,b:S.b+(r+n)/2,c:S.c-(r-n)/2};var i=[L.a,L.b,L.c].sort(),a={a:i.indexOf(L.a),b:i.indexOf(L.b),c:i.indexOf(L.c)};i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),L={a:i[a.a],b:i[a.b],c:i[a.c]},e=(S.a-L.a)*O.yaxis._m,t=(S.c-L.c-S.b+L.b)*O.xaxis._m);var o="translate("+(O.x0+t)+","+(O.y0+e)+")";O.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",o),O.aaxis.range=[L.a,O.sum-L.b-L.c],O.baxis.range=[O.sum-L.a-L.c,L.b],O.caxis.range=[O.sum-L.a-L.b,L.c],O.drawAxes(!1),O.plotContainer.selectAll(".crisp").classed("crisp",!1)}function d(t,e){if(t){var r={};r[O.id+".aaxis.min"]=L.a,r[O.id+".baxis.min"]=L.b,r[O.id+".caxis.min"]=L.c,s.relayout(R,r)}else 2===e&&g()}function p(){O.plotContainer.selectAll(".select-outline").remove()}function g(){var t={};t[O.id+".aaxis.min"]=0,t[O.id+".baxis.min"]=0,t[O.id+".caxis.min"]=0,R.emit("plotly_doubleclick",null),s.relayout(R,t)}var x,w,S,E,L,C,z,D,I,P,O=this,j=O.layers.plotbg.select("path").node(),R=O.graphDiv,F=O.layers.zoom,N={element:j,gd:R,plotinfo:{plot:F},doubleclick:g,subplot:O.id,prepFn:function(e,r,n){N.xaxes=[O.xaxis],N.yaxes=[O.yaxis];var i=R._fullLayout.dragmode;e.shiftKey&&(i="pan"===i?"zoom":"pan"),N.minDrag="lasso"===i?1:void 0,"zoom"===i?(N.moveFn=a,N.doneFn=c,t(e,r,n)):"pan"===i?(N.moveFn=f,N.doneFn=d,h(),p()):"select"!==i&&"lasso"!==i||v(e,r,n,N,i)}};j.onmousemove=function(t){b.hover(R,t,O.id),R._fullLayout._lasthover=j,R._fullLayout._hoversubplot=O.id},j.onmouseout=function(t){R._dragging||m.unhover(R,t)},j.onclick=function(t){b.click(R,t)},m.init(N)}},{"../../components/color":578,"../../components/dragelement":599,"../../components/drawing":602,"../../components/titles":655,"../../lib":685,"../../lib/extend":677,"../../plotly":719,"../cartesian/axes":724,"../cartesian/constants":729,"../cartesian/graph_interact":733,"../cartesian/select":740,"../cartesian/set_convert":741,"../plots":787,d3:107,tinycolor2:514}],802:[function(t,e,r){"use strict";function n(t){if(t.layoutAttributes){var e=t.layoutAttributes._arrayAttrRegexps;if(e)for(var n=0;n-1}var a=t("../lib"),o=t("../plots/plots"),s=a.extendFlat,l=a.extendDeep;e.exports=function(t,e){t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var r,a=t.data,u=t.layout,c=l([],a),h=l({},u,n(e.tileClass)),f=t._context||{};if(e.width&&(h.width=e.width),e.height&&(h.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){h.annotations=[];var d=Object.keys(h);for(r=0;r0&&A>0,N=M<=j&&A<=R,B=M<=R&&A<=j,U="h"===v?j>=M*(R/A):R>=A*(j/M);F&&(N||B||U)?b="inside":(b="outside",x.remove(),x=null)}else b="inside";if(!x&&(x=m(e,y,"outside"===b?E:S),_=k.bBox(x.node()),M=_.width,A=_.height,M<=0||A<=0))return void x.remove();var V;V="outside"===b?a(o,f,d,p,_,v):i(o,f,d,p,_,v),x.attr("transform",V)}}}function i(t,e,r,n,i,a){var s,l,u,c,h,f=i.width,d=i.height,p=(i.left+i.right)/2,m=(i.top+i.bottom)/2,g=Math.abs(e-t),v=Math.abs(n-r);g>2*D&&v>2*D?(h=D,g-=2*h,v-=2*h):h=0;var y,b;return f<=g&&d<=v?(y=!1,b=1):f<=v&&d<=g?(y=!0,b=1):fr?(u=(t+e)/2,c=n-h-l/2):(u=(t+e)/2,c=n+h+l/2),o(p,m,u,c,b,y)}function a(t,e,r,n,i,a){var s,l="h"===a?Math.abs(n-r):Math.abs(e-t);l>2*D&&(s=D,l-=2*s);var u,c,h,f,d="h"===a?Math.min(1,l/i.height):Math.min(1,l/i.width),p=(i.left+i.right)/2,m=(i.top+i.bottom)/2;return u=d*i.width,c=d*i.height,"h"===a?er?(h=(t+e)/2,f=n+s+c/2):(h=(t+e)/2,f=n-s-c/2),o(p,m,h,f,d,!1)}function o(t,e,r,n,i,a){var o,s;return i<1?o="scale("+i+") ":(i=1,o=""),s=a?"rotate("+a+" "+t+" "+e+") ":"","translate("+(r-i*t)+" "+(n-i*e)+")"+o+s}function s(t,e){var r=d(t.text,e);return p(S,r)}function l(t,e){var r=d(t.textposition,e);return m(E,r)}function u(t,e,r){return f(L,t.textfont,e,r)}function c(t,e,r){return f(C,t.insidetextfont,e,r)}function h(t,e,r){return f(z,t.outsidetextfont,e,r)}function f(t,e,r,n){e=e||{};var i=d(e.family,r),a=d(e.size,r),o=d(e.color,r);return{family:p(t.family,i,n.family),size:g(t.size,a,n.size),color:v(t.color,o,n.color)}}function d(t,e){var r;return Array.isArray(t)?ei))return e}return void 0!==r?r:t.dflt}function v(t,e,r){return x(e).isValid()?e:void 0!==r?r:t.dflt}var y=t("d3"),b=t("fast-isnumeric"),x=t("tinycolor2"),_=t("../../lib"),w=t("../../lib/svg_text_utils"),M=t("../../components/color"),k=t("../../components/drawing"),A=t("../../components/errorbars"),T=t("./attributes"),S=T.text,E=T.textposition,L=T.textfont,C=T.insidetextfont,z=T.outsidetextfont,D=3;e.exports=function(t,e,r){var i=e.xaxis,a=e.yaxis,o=t._fullLayout,s=e.plot.select(".barlayer").selectAll("g.trace.bars").data(r);s.enter().append("g").attr("class","trace bars"),s.append("g").attr("class","points").each(function(e){var r=e[0].t,s=e[0].trace,l=r.poffset,u=Array.isArray(l);y.select(this).selectAll("g.point").data(_.identity).enter().append("g").classed("point",!0).each(function(r,c){function h(t){return 0===o.bargap&&0===o.bargroupgap?y.round(Math.round(t)-A,2):t}function f(t,e){return Math.abs(t-e)>=2?h(t):t>e?Math.ceil(t):Math.floor(t)}var d,p,m,g,v=r.p+(u?l[c]:l),x=v+r.w,_=r.b,w=_+r.s;if("h"===s.orientation?(m=a.c2p(v,!0),g=a.c2p(x,!0),d=i.c2p(_,!0),p=i.c2p(w,!0)):(d=i.c2p(v,!0),p=i.c2p(x,!0),m=a.c2p(_,!0),g=a.c2p(w,!0)),!(b(d)&&b(p)&&b(m)&&b(g)&&d!==p&&m!==g))return void y.select(this).remove();var k=(r.mlw+1||s.marker.line.width+1||(r.trace?r.trace.marker.line.width:0)+1)-1,A=y.round(k/2%1,2);if(!t._context.staticPlot){var T=M.opacity(r.mc||s.marker.color),S=T<1||k>.01?h:f;d=S(d,p),p=S(p,d),m=S(m,g),g=S(g,m)}var E=y.select(this);E.append("path").attr("d","M"+d+","+m+"V"+g+"H"+p+"V"+m+"Z"),n(t,E,e,c,d,p,m,g)})}),s.call(A.plot,e)}},{"../../components/color":578,"../../components/drawing":602,"../../components/errorbars":608,"../../lib":685,"../../lib/svg_text_utils":704,"./attributes":812,d3:107,"fast-isnumeric":116,tinycolor2:514}],820:[function(t,e,r){"use strict";function n(t,e,r,n){if(n.length){var s,l,u,c,h,f=t._fullLayout.barmode,d="overlay"===f,p="group"===f;if(d)i(t,e,r,n);else if(p){for(s=[],l=[],u=0;uu+s||!y(l))&&(h=!0,f(c,t))}for(var i=r.traces,a=v(e),o="fraction"===t._fullLayout.barnorm?1:100,s=o/1e9,l=e.l2c(e.c2l(0)),u="stack"===t._fullLayout.barmode?o:l,c=[l,u],h=!1,d=0;d1||0===s.bargap&&0===s.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(t){var e=t[0].trace,r=e.marker,o=r.line,s=a.tryColorscale(r,""),l=a.tryColorscale(r,"line");n.select(this).selectAll("path").each(function(t){var e,a,u=(t.mlw+1||o.width+1)-1,c=n.select(this);e="mc"in t?t.mcc=s(t.mc):Array.isArray(r.color)?i.defaultLine:r.color,c.style("stroke-width",u+"px").call(i.fill,e),u&&(a="mlc"in t?t.mlcc=l(t.mlc):Array.isArray(o.color)?i.defaultLine:o.color,c.call(i.stroke,a))})}),e.call(o.style)}},{"../../components/color":578, -"../../components/drawing":602,"../../components/errorbars":608,d3:107}],823:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),i(t,"marker")&&a(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width")}},{"../../components/color":578,"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591}],824:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../components/color/attributes"),a=t("../../lib/extend").extendFlat,o=n.marker,s=o.line;e.exports={y:{valType:"data_array"},x:{valType:"data_array"},x0:{valType:"any"},y0:{valType:"any"},xcalendar:n.xcalendar,ycalendar:n.ycalendar,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1},jitter:{valType:"number",min:0,max:1},pointpos:{valType:"number",min:-2,max:2},orientation:{valType:"enumerated",values:["v","h"]},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)"},symbol:a({},o.symbol,{arrayOk:!1}),opacity:a({},o.opacity,{arrayOk:!1,dflt:1}),size:a({},o.size,{arrayOk:!1}),color:a({},o.color,{arrayOk:!1}),line:{color:a({},s.color,{arrayOk:!1,dflt:i.defaultLine}),width:a({},s.width,{arrayOk:!1,dflt:0}),outliercolor:{valType:"color"},outlierwidth:{valType:"number",min:0,dflt:1}}},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2}},fillcolor:n.fillcolor}},{"../../components/color/attributes":577,"../../lib/extend":677,"../scatter/attributes":976}],825:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/cartesian/axes");e.exports=function(t,e){var r,o,s,l,u,c,h,f,d,p=a.getFromId(t,e.xaxis||"x"),m=a.getFromId(t,e.yaxis||"y"),g=e.orientation,v=[];"h"===g?(r=p,o="x",u=m,c="y"):(r=m,o="y",u=p,c="x"),s=r.makeCalcdata(e,o),a.expand(r,s,{padded:!0}),h=function(t,e,r,a,o){var s;return r in e?h=a.makeCalcdata(e,r):(s=r+"0"in e?e[r+"0"]:"name"in e&&("category"===a.type||n(e.name)&&["linear","log"].indexOf(a.type)!==-1||i.isDateTime(e.name)&&"date"===a.type)?e.name:t.numboxes,s=a.d2c(s,0,e[r+"calendar"]),h=o.map(function(){return s})),h}(t,e,c,u,s);var y=i.distinctVals(h);return f=y.vals,d=y.minDiff/2,l=function(t,e,r,a,o){var s,l,u,c,h=a.length,f=e.length,d=[],p=[];for(s=0;s=0&&u1,m=r.dPos*(1-c.boxgap)*(1-c.boxgroupgap)/(p?t.numboxes:1),g=p?2*r.dPos*(-.5+(r.boxnum+.5)/t.numboxes)*(1-c.boxgap):0,v=m*d.whiskerwidth;if(d.visible!==!0||r.emptybox)return void a.select(this).remove();"h"===d.orientation?(l=f,u=h):(l=h,u=f),r.bPos=g,r.bdPos=m,n(),a.select(this).selectAll("path.box").data(o.identity).enter().append("path").attr("class","box").each(function(t){var e=l.c2p(t.pos+g,!0),r=l.c2p(t.pos+g-m,!0),n=l.c2p(t.pos+g+m,!0),i=l.c2p(t.pos+g-v,!0),s=l.c2p(t.pos+g+v,!0),c=u.c2p(t.q1,!0),h=u.c2p(t.q3,!0),f=o.constrain(u.c2p(t.med,!0),Math.min(c,h)+1,Math.max(c,h)-1),p=u.c2p(d.boxpoints===!1?t.min:t.lf,!0),y=u.c2p(d.boxpoints===!1?t.max:t.uf,!0);"h"===d.orientation?a.select(this).attr("d","M"+f+","+r+"V"+n+"M"+c+","+r+"V"+n+"H"+h+"V"+r+"ZM"+c+","+e+"H"+p+"M"+h+","+e+"H"+y+(0===d.whiskerwidth?"":"M"+p+","+i+"V"+s+"M"+y+","+i+"V"+s)):a.select(this).attr("d","M"+r+","+f+"H"+n+"M"+r+","+c+"H"+n+"V"+h+"H"+r+"ZM"+e+","+c+"V"+p+"M"+e+","+h+"V"+y+(0===d.whiskerwidth?"":"M"+i+","+p+"H"+s+"M"+i+","+y+"H"+s))}),d.boxpoints&&a.select(this).selectAll("g.points").data(function(t){return t.forEach(function(t){t.t=r,t.trace=d}),t}).enter().append("g").attr("class","points").selectAll("path").data(function(t){var e,r,n,a,s,l,u,c="all"===d.boxpoints?t.val:t.val.filter(function(e){return et.uf}),h=Math.max((t.max-t.min)/10,t.q3-t.q1),f=1e-9*h,p=.01*h,v=[],y=0;if(d.jitter){if(0===h)for(y=1,v=new Array(c.length),e=0;et.lo&&(n.so=!0),n})}).enter().append("path").call(s.translatePoints,h,f),d.boxmean&&a.select(this).selectAll("path.mean").data(o.identity).enter().append("path").attr("class","mean").style("fill","none").each(function(t){var e=l.c2p(t.pos+g,!0),r=l.c2p(t.pos+g-m,!0),n=l.c2p(t.pos+g+m,!0),i=u.c2p(t.mean,!0),o=u.c2p(t.mean-t.sd,!0),s=u.c2p(t.mean+t.sd,!0);"h"===d.orientation?a.select(this).attr("d","M"+i+","+r+"V"+n+("sd"!==d.boxmean?"":"m0,0L"+o+","+e+"L"+i+","+r+"L"+s+","+e+"Z")):a.select(this).attr("d","M"+r+","+i+"H"+n+("sd"!==d.boxmean?"":"m0,0L"+e+","+o+"L"+r+","+i+"L"+e+","+s+"Z"))})})}},{"../../components/drawing":602,"../../lib":685,d3:107}],832:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/cartesian/axes"),a=t("../../lib");e.exports=function(t,e){var r,o,s,l,u=t._fullLayout,c=e.xaxis,h=e.yaxis,f=["v","h"];for(o=0;o=10)return null;for(var r=1/0,i=-1/0,a=t.length,o=0;o0?Math.floor:Math.ceil,D=L>0?Math.ceil:Math.floor,I=L>0?Math.min:Math.max,P=L>0?Math.max:Math.min,O=z(S+C),j=D(E-C);c=T(S);var R=[[c]];for(i=O;i*L=0;i--)a[c-i]=t[h][i],o[c-i]=e[h][i];for(s.push({x:a,y:o,bicubic:l}),i=h,a=[],o=[];i>=0;i--)a[h-i]=t[i][0],o[h-i]=e[i][0];return s.push({x:a,y:o,bicubic:u}),s}},{}],846:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../../lib/extend").extendFlat;e.exports=function(t,e,r,a){function o(e){var n,i,o,s,l,u,c,h,f,d,p,g,v=[],y=[],b={};if("b"===r)for(i=t.b2j(e),o=Math.floor(Math.max(0,Math.min(P-2,i))),s=i-o,b.length=P,b.crossLength=I,b.xy=function(e){return t.evalxy([],e,i)},b.dxy=function(e,r){return t.dxydi([],e,o,r,s)},n=0;n0&&(f=t.dxydi([],n-1,o,0,s),v.push(l[0]+f[0]/3),y.push(l[1]+f[1]/3),d=t.dxydi([],n-1,o,1,s),v.push(h[0]-d[0]/3),y.push(h[1]-d[1]/3)),v.push(h[0]),y.push(h[1]),l=h;else for(n=t.a2i(e),u=Math.floor(Math.max(0,Math.min(I-2,n))),c=n-u,b.length=I,b.crossLength=P,b.xy=function(e){return t.evalxy([],n,e)},b.dxy=function(e,r){return t.dxydj([],u,e,c,r)},i=0;i0&&(p=t.dxydj([],u,i-1,c,0),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),g=t.dxydj([],u,i-1,c,1),v.push(h[0]-g[0]/3),y.push(h[1]-g[1]/3)),v.push(h[0]),y.push(h[1]),l=h;return b.axisLetter=r,b.axis=M,b.crossAxis=E,b.value=e,b.constvar=a,b.index=m,b.x=v,b.y=y,b.smoothing=E.smoothing,b}function s(e){var n,i,o,s,l,u=[],c=[],h={};if(h.length=w.length,h.crossLength=S.length,"b"===r)for(o=Math.max(0,Math.min(P-2,e)),l=Math.min(1,Math.max(0,e-o)),h.xy=function(r){return t.evalxy([],r,e)},h.dxy=function(e,r){return t.dxydi([],e,o,r,l)},n=0;nw.length-1||k.push(i(s(u),{color:M.gridcolor,width:M.gridwidth}));for(m=d;mw.length-1||y<0||y>w.length-1))for(b=w[c],x=w[y],l=0;lw[w.length-1]||A.push(i(o(v),{color:M.minorgridcolor,width:M.minorgridwidth}));M.startline&&T.push(i(s(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&T.push(i(s(w.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(h=5e-15,f=[Math.floor((w[w.length-1]-M.tick0)/M.dtick*(1+h)),Math.ceil((w[0]-M.tick0)/M.dtick/(1+h))].sort(function(t,e){return t-e}),d=f[0],p=f[1],m=d;m<=p;m++)g=M.tick0+M.dtick*m,k.push(i(o(g),{color:M.gridcolor,width:M.gridwidth}));for(m=d-1;mw[w.length-1]||A.push(i(o(v),{color:M.minorgridcolor,width:M.minorgridwidth}));M.startline&&T.push(i(o(w[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&T.push(i(o(w[w.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}},{"../../lib/extend":677,"../../plots/cartesian/axes":724}],847:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../../lib/extend").extendFlat;e.exports=function(t,e){var r,a,o,s=e._labels=[],l=e._gridlines;for(r=0;re.length&&(t=t.slice(0,e.length)):t=[],n=0;ne.length&&(t=t.slice(0,e.length)):t=[],n=0;ne.length&&(t[n]=t[n].slice(0,e.length)):t[n]=[],i=0;i90&&(d-=180,l=-l),{angle:d,flip:l,p:t.c2p(n,e,r),offsetMultplier:u}}},{}],863:[function(t,e,r){"use strict";function n(t,e,r){var n=t.selectAll(e+"."+r).data([0]);return n.enter().append(e).classed(r,!0),n}function i(t,e,r){var i=r[0],u=r[0].trace,c=e.xaxis,h=e.yaxis,f=u.aaxis,d=u.baxis,p=t._fullLayout,m=e.plot.selectAll(".carpetlayer"),g=n(p._defs,"g","clips"),v=n(m,"g","carpet"+u.uid).classed("trace",!0),y=n(v,"g","minorlayer"),b=n(v,"g","majorlayer"),x=n(v,"g","boundarylayer"),_=n(v,"g","labellayer");v.style("opacity",u.opacity),o(c,h,b,f,"a",f._gridlines),o(c,h,b,d,"b",d._gridlines),o(c,h,y,f,"a",f._minorgridlines),o(c,h,y,d,"b",d._minorgridlines),o(c,h,x,f,"a-boundary",f._boundarylines),o(c,h,x,d,"b-boundary",d._boundarylines),l(_,u,i,c,h,s(t._tester,c,h,u,i,_,f._labels,"a-label"),s(t._tester,c,h,u,i,_,d._labels,"b-label")),a(u,i,g,c,h)}function a(t,e,r,i,a){var o,s,l,u;t.clipPathId="clip"+t.uid+"carpet";var c=r.select("#"+t.clipPathId);c.size()||(c=r.append("clipPath").classed("carpetclip",!0));var h=n(c,"path","carpetboundary"),p=e.clipsegments,m=[];for(u=0;u0?"start":"end").text(i.text).attr("transform","translate("+a.p[0]+","+a.p[1]+") rotate("+a.angle+")translate("+i.axis.labelpadding*s+","+.3*l.height+")").call(h.font,i.font.family,i.font.size,i.font.color),u=Math.max(u,l.width+i.axis.labelpadding)}),l.exit().remove(),u}function l(t,e,r,n,i,a,o){var s,l,c,h;s=.5*(e.a[0]+e.a[e.a.length-1]),l=e.b[0],c=e.ab2xy(s,l,!0),h=e.dxyda_rough(s,l),u(t,e,r,c,h,e.aaxis,n,i,a,"a-title"),s=e.a[0],l=.5*(e.b[0]+e.b[e.b.length-1]),c=e.ab2xy(s,l,!0),h=e.dxydb_rough(s,l),u(t,e,r,c,h,e.baxis,n,i,o,"b-title")}function u(t,e,r,n,i,a,o,s,l,u){var f=[];a.title&&f.push(a.title);var d=t.selectAll("text."+u).data(f);d.enter().append("text").classed(u,!0),d.each(function(){var t=p(e,o,s,n,i);["start","both"].indexOf(a.showticklabels)===-1&&(l=0),l+=a.titlefont.size+a.titleoffset,c.select(this).text(a.title||"").attr("transform","translate("+t.p[0]+","+t.p[1]+") rotate("+t.angle+") translate(0,"+l+")").classed("user-select-none",!0).attr("text-anchor","middle").call(h.font,a.titlefont)}),d.exit().remove()}var c=t("d3"),h=t("../../components/drawing"),f=t("./map_1d_array"),d=t("./makepath"),p=t("./orient_text");e.exports=function(t,e,r){for(var n=0;nd&&tm&&ep||eg},h.c2p=function(t){return t},f.c2p=function(t){return t},t.setScale=function(){var e=t.x,r=t.y,n=a(t.xctrl,t.yctrl,e,r,h.smoothing,f.smoothing);t.xctrl=n[0],t.yctrl=n[1],t.evalxy=o([t.xctrl,t.yctrl],u,c,h.smoothing,f.smoothing),t.dxydi=s([t.xctrl,t.yctrl],h.smoothing,f.smoothing),t.dxydj=l([t.xctrl,t.yctrl],h.smoothing,f.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),u-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),u-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(i(t,e),u-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(u-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),c-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(c-1,e+(t-n)/(a-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,i,a){if(!a&&(ne[u-1]|ir[c-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var h,f,d,p,m=0,g=0,v=[];ne[u-1]?(h=u-2,f=1,m=(n-e[u-1])/(e[u-1]-e[u-2])):(h=Math.max(0,Math.min(u-2,Math.floor(o))),f=o-h),ir[c-1]?(d=c-2,p=1,g=(i-r[c-1])/(r[c-1]-r[c-2])):(d=Math.max(0,Math.min(c-2,Math.floor(s))),p=s-d),m&&(t.dxydi(v,h,d,f,p),l[0]+=v[0]*m,l[1]+=v[1]*m),g&&(t.dxydj(v,h,d,f,p),l[0]+=v[0]*g,l[1]+=v[1]*g)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=v*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dxydb_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{"../../lib/search":699,"./compute_control_points":850,"./constants":851,"./create_i_derivative_evaluator":852,"./create_j_derivative_evaluator":853,"./create_spline_evaluator":854}],865:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,r){var i,a,o,s=[],l=[],u=t[0].length,c=t.length,h=0;for(i=0;i0&&void 0!==(n=t[r][e-1])&&(a++,i+=n),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log("Smoother converged to",M,"after",k,"iterations"),t}},{"../../lib":685}],866:[function(t,e,r){"use strict";var n=t("./has_columns"),i=t("../heatmap/convert_column_xyz");e.exports=function(t,e,r){var a=[],o=r("x");o&&!n(o)&&a.push("x"),e._cheater=!o;var s=r("y");if(s&&!n(s)&&a.push("y"),o||s)return a.length&&i(e,e.aaxis,e.baxis,"a","b",a),!0}},{"../heatmap/convert_column_xyz":907,"./has_columns":856}],867:[function(t,e,r){"use strict";var n=t("../scattergeo/attributes"),i=t("../../components/colorscale/attributes"),a=t("../../components/colorbar/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=n.marker.line;e.exports=s({},{locations:{valType:"data_array"},locationmode:n.locationmode,z:{valType:"data_array"},text:{valType:"data_array"},marker:{line:{color:l.color,width:s({},l.width,{dflt:1})}},hoverinfo:s({},o.hoverinfo,{flags:["location","z","text","name"]})},i,{colorbar:a})},{"../../components/colorbar/attributes":579,"../../components/colorscale/attributes":583,"../../lib/extend":677,"../../plots/attributes":722,"../scattergeo/attributes":1013}],868:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){n(e,e.z,"","z")}},{"../../components/colorscale/calc":584}],869:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../components/colorscale/defaults"),a=t("./attributes");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l,u=s("locations");if(u&&(l=u.length),!u||!l)return void(e.visible=!1);var c=s("z");if(!Array.isArray(c))return void(e.visible=!1);c.length>l&&(e.z=c.slice(0,l)),s("locationmode"),s("text"),s("marker.line.color"),s("marker.line.width"),i(t,e,o,s,{prefix:"",cLetter:"z"}),s("hoverinfo",1===o._dataLength?"location+z+text":void 0)}},{"../../components/colorscale/defaults":587,"../../lib":685,"./attributes":867}],870:[function(t,e,r){"use strict";e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],871:[function(t,e,r){"use strict";function n(t,e,r,n){var o=e.hoverinfo,s="all"===o?a.hoverinfo.flags:o.split("+"),l=s.indexOf("name")!==-1,u=s.indexOf("location")!==-1,c=s.indexOf("z")!==-1,h=s.indexOf("text")!==-1,f=!l&&u,d=[];f?t.nameOverride=r.id:(l&&(t.nameOverride=e.name),u&&d.push(r.id)),c&&d.push(function(t){return i.tickText(n,n.c2l(t),"hover").text}(r.z)),h&&d.push(r.tx),t.extraText=d.join("
")}var i=t("../../plots/cartesian/axes"),a=t("./attributes");e.exports=function(t){var e=t.cd,r=e[0].trace,i=t.subplot,a=i.choroplethHoverPt;if(a){var o=i.projection(a.properties.ct);return t.x0=t.x1=o[0],t.y0=t.y1=o[1],t.index=a.index,t.location=a.id,t.z=a.z,n(t,r,a,i.mockAxis),[t]}}},{"../../plots/cartesian/axes":724,"./attributes":867}],872:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../heatmap/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="choropleth",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","noOpacity"],n.meta={},e.exports=n},{"../../plots/geo":752,"../heatmap/colorbar":906,"./attributes":867,"./calc":868,"./defaults":869,"./event_data":870,"./hover":871,"./plot":873}],873:[function(t,e,r){"use strict";function n(t,e){for(var r,n=[],i=t.locations,a=i.length,o=u(t,e),s=(t.marker||{}).line||{},l=0;l0&&(n[0].trace=t),n}function i(t){t.framework.selectAll("g.trace.choropleth").each(function(t){var e=t[0].trace,r=a.select(this),n=e.marker||{},i=n.line||{},u=l.makeColorScaleFunc(l.extractScale(e.colorscale,e.zmin,e.zmax));r.selectAll("path.choroplethlocation").each(function(t){a.select(this).attr("fill",function(t){return u(t.z)}).call(o.stroke,t.mlc||i.color).call(s.dashLine,"",t.mlw||i.width||0)})})}var a=t("d3"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("../../components/colorscale"),u=t("../../lib/topojson_utils").getTopojsonFeatures,c=t("../../lib/geo_location_utils").locationToFeature,h=t("../../lib/array_to_calc_item"),f=t("../../plots/geo/constants");e.exports=function(t,e,r){function o(t){return t[0].trace.uid}var s,l=t.framework,u=l.select("g.choroplethlayer"),c=l.select("g.baselayer"),h=l.select("g.baselayeroverchoropleth"),d=f.baseLayersOverChoropleth,p=u.selectAll("g.trace.choropleth").data(e,o);p.enter().append("g").attr("class","trace choropleth"),p.exit().remove(),p.each(function(e){var r=e[0].trace,i=n(r,t.topojson),o=a.select(this).selectAll("path.choroplethlocation").data(i);o.enter().append("path").classed("choroplethlocation",!0).on("mouseover",function(e){t.choroplethHoverPt=e}).on("mouseout",function(){t.choroplethHoverPt=null}),o.exit().remove()}),h.selectAll("*").remove();for(var m=0;ms.end&&(s.start=s.end=(s.start+s.end)/2),e._input.contours||(e._input.contours={}),a(e._input.contours,{start:s.start,end:s.end,size:s.size}),e._input.autocontour=!0}else{var u=s.start,c=s.end,h=e._input.contours;if(u>c&&(s.start=h.start=c,c=s.end=h.end=u,u=s.start),!(s.size>0)){var f;f=u===c?1:n(u,c,e.ncontours).dtick,h.size=s.size=f}}return r}},{"../../lib":685,"../../plots/cartesian/axes":724,"../heatmap/calc":904}],876:[function(t,e,r){"use strict";var n=t("../../plots/plots"),i=t("../../components/colorbar/draw"),a=t("./make_color_map"),o=t("./end_plus");e.exports=function(t,e){var r=e[0].trace,s="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+s).remove(),!r.showscale)return void n.autoMargin(t,s);var l=i(t,s);e[0].t.cb=l;var u=r.contours,c=r.line,h=u.size||1,f=u.coloring,d=a(r,{isColorbar:!0});"heatmap"===f&&l.filllevels({start:r.zmin,end:r.zmax,size:(r.zmax-r.zmin)/254}),l.fillcolor("fill"===f||"heatmap"===f?d:"").line({color:"lines"===f?d:c.color,width:u.showlines!==!1?c.width:0,dash:c.dash}).levels({start:u.start,end:o(u),size:h}).options(r.colorbar)()}},{"../../components/colorbar/draw":581,"../../plots/plots":787,"./end_plus":880,"./make_color_map":884}],877:[function(t,e,r){"use strict";e.exports.BOTTOMSTART=[1,9,13,104,713],e.exports.TOPSTART=[4,6,7,104,713],e.exports.LEFTSTART=[8,12,14,208,1114],e.exports.RIGHTSTART=[2,3,11,208,1114],e.exports.NEWDELTA=[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],e.exports.CHOOSESADDLE={104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},e.exports.SADDLEREMAINDER={1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11}},{}],878:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){var a,o=n.coerce2(t,e,i,"contours.start"),s=n.coerce2(t,e,i,"contours.end"),l=o===!1||s===!1,u=r("contours.size");!(a=l?e.autocontour=!0:r("autocontour",!1))&&u||r("ncontours")}},{"../../lib":685,"./attributes":874}],879:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../heatmap/has_columns"),a=t("../heatmap/xyz_defaults"),o=t("./contours_defaults"),s=t("./style_defaults"),l=t("./attributes");e.exports=function(t,e,r,u){function c(r,i){return n.coerce(t,e,l,r,i)}if(!a(t,e,c,u))return void(e.visible=!1);c("text"),c("connectgaps",i(e)),o(t,e,c),s(t,e,c,u)}},{"../../lib":685,"../heatmap/has_columns":910,"../heatmap/xyz_defaults":918,"./attributes":874,"./contours_defaults":878,"./style_defaults":888}],880:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],881:[function(t,e,r){"use strict";function n(t,e,r,n){return Math.abs(t[0]-e[0])20?(m=u.CHOOSESADDLE[m][(g[0]||g[1])<0?0:1],t.crossings[p]=u.SADDLEREMAINDER[m]):delete t.crossings[p],!(g=u.NEWDELTA[m])){l.log("Found bad marching index:",m,e,t.level);break}v.push(s(t,e,g)),e[0]+=g[0],e[1]+=g[1],n(v[v.length-1],v[v.length-2],a,c)&&v.pop(),p=e.join(",");var _=g[0]&&(e[0]<0||e[0]>x-2)||g[1]&&(e[1]<0||e[1]>b-2);if(p===d&&g.join(",")===y||r&&_)break;m=t.crossings[p]}1e4===f&&l.log("Infinite loop in contour?");var w,M,k,A,T,S,E,L=n(v[0],v[v.length-1],a,c),C=0,z=.2*t.smoothing,D=[],I=0;for(f=1;f=I;f--)if((w=D[f])=I&&w+D[M]20&&e?208===t||1114===t?n=0===r[0]?1:-1:i=0===r[1]?1:-1:u.BOTTOMSTART.indexOf(t)!==-1?i=1:u.LEFTSTART.indexOf(t)!==-1?n=1:u.TOPSTART.indexOf(t)!==-1?i=-1:n=-1,[n,i]}function s(t,e,r){var n=e[0]+Math.max(r[0],0),i=e[1]+Math.max(r[1],0),a=t.z[i][n],o=t.xaxis,s=t.yaxis;if(r[1]){var l=(t.level-a)/(t.z[i][n+1]-a);return[o.c2p((1-l)*t.x[n]+l*t.x[n+1],!0),s.c2p(t.y[i],!0)]}var u=(t.level-a)/(t.z[i+1][n]-a);return[o.c2p(t.x[n],!0),s.c2p((1-u)*t.y[i]+u*t.y[i+1],!0)]}var l=t("../../lib"),u=t("./constants");e.exports=function(t,e,r){var n,i,o,s,u;for(e=e||.01,r=r||.01,o=0;ot?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);if(5===r||10===r){return t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208}return 15===r?0:r}var i=t("./constants");e.exports=function(t){var e,r,a,o,s,l,u,c,h,f=t[0].z,d=f.length,p=f[0].length,m=2===d||2===p;for(r=0;r1e3){d.warn("Too many contours, clipping at 1000",t);break}return i}function a(t,e,r){var n=t.plot.select(".maplayer").selectAll("g.contour."+r).data(e);return n.enter().append("g").classed("contour",!0).classed(r,!0),n.exit().remove(),n}function o(t,e,r){var n=t.selectAll("g.contourbg").data([0]);n.enter().append("g").classed("contourbg",!0);var i=n.selectAll("path").data("fill"===r.coloring?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+e.join("L")+"Z").style("stroke","none")}function s(t,e,r,n){var i=t.selectAll("g.contourfill").data([0]);i.enter().append("g").classed("contourfill",!0);var a=i.selectAll("path").data("fill"===n.coloring?e:[]);a.enter().append("path"),a.exit().remove(),a.each(function(t){var e=l(t,r);e?f.select(this).attr("d",e).style("stroke","none"):f.select(this).remove()})}function l(t,e){function r(t){return Math.abs(t[0]-e[2][0])<.01}for(var n,i,a,o,s,l,u=Math.min(t.z[0][0],t.z[0][1]),c=t.edgepaths.length||u<=t.level?"":"M"+e.join("L")+"Z",h=0,f=t.edgepaths.map(function(t,e){return e}),m=!0;f.length;){for(l=p.smoothopen(t.edgepaths[h],t.smoothing),c+=m?l:l.replace(/^M/,"L"),f.splice(f.indexOf(h),1),n=t.edgepaths[h][t.edgepaths[h].length-1],o=-1,a=0;a<4;a++){if(!n){d.log("Missing end?",h,t);break}for(!function(t){return Math.abs(t[1]-e[0][1])<.01}(n)||r(n)?!function(t){return Math.abs(t[0]-e[0][0])<.01}(n)?!function(t){return Math.abs(t[1]-e[2][1])<.01}(n)?r(n)&&(i=e[2]):i=e[3]:i=e[0]:i=e[1],s=0;s=0&&(i=g,o=s):Math.abs(n[1]-i[1])<.01?Math.abs(n[1]-g[1])<.01&&(g[0]-n[0])*(i[0]-g[0])>=0&&(i=g,o=s):d.log("endpt to newendpt is not vert. or horz.",n,i,g)}if(n=i,o>=0)break;c+="L"+i}if(o===t.edgepaths.length){d.log("unclosed perimeter path");break}h=o,m=f.indexOf(h)===-1,m&&(h=f[0],c+="Z")}for(h=0;hS){r("a scale is not linear");break}}if(s.length&&"fast"===A){var E=(s[s.length-1]-s[0])/(s.length-1),L=Math.abs(E/100);for(x=0;xL){r("b scale is not linear");break}}}var C=d(b),z="scaled"===e.xtype?"":n,D=g(e,z,i,o,C,w),I="scaled"===e.ytype?"":s,P=g(e,I,v,y,b.length,M),O={a:D,b:P,z:b};return"levels"===e.contours.type&&u(e,b,"","z"),[O]}var a=t("../../lib"),o=t("../../plots/cartesian/axes"),s=t("../../lib").extendFlat,l=t("../../registry"),u=t("../../components/colorscale/calc"),c=t("../heatmap/has_columns"),h=t("../heatmap/convert_column_xyz"),f=t("../heatmap/clean_2d_array"),d=t("../heatmap/max_row_length"),p=t("../heatmap/interp2d"),m=t("../heatmap/find_empties"),g=t("../heatmap/make_bound_array"),v=t("./defaults"),y=t("../carpet/lookup_carpetid");e.exports=function(t,e){var r=e.carpetTrace=y(t,e);if(r&&r.visible&&"legendonly"!==r.visible){if(!e.a||!e.b){var a=t.data[r.index],l=t.data[e.index];l.a||(l.a=a.a),l.b||(l.b=a.b),v(l,e,e._defaultColor,t._fullLayout)}var u=i(t,e),c=e.contours;if(e.autocontour===!0){var h=n(e.zmin,e.zmax,e.ncontours);c.size=h.dtick,c.start=o.tickFirst(h),h.range.reverse(),c.end=o.tickFirst(h),c.start===e.zmin&&(c.start+=c.size),c.end===e.zmax&&(c.end-=c.size),c.start>c.end&&(c.start=c.end=(c.start+c.end)/2),e._input.contours=s({},c)}else{var f=c.start,d=c.end,p=e._input.contours;if(f>d&&(c.start=p.start=d,d=c.end=p.end=f,f=c.start),!(c.size>0)){var m;m=f===d?1:n(f,d,e.ncontours).dtick,p.size=c.size=m}}return u}}},{"../../components/colorscale/calc":584,"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"../carpet/lookup_carpetid":858,"../heatmap/clean_2d_array":905,"../heatmap/convert_column_xyz":907,"../heatmap/find_empties":909,"../heatmap/has_columns":910,"../heatmap/interp2d":913,"../heatmap/make_bound_array":914,"../heatmap/max_row_length":915,"./defaults":896}],891:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i,a,o,s=n.a.length,l=n.b.length,u=n.z,c=-1/0,h=1/0;for(i=0;i":case">=":n.contours.value>c&&(t[0].prefixBoundary=!0);break;case"<":case"<=":n.contours.valuec&&(t[0].prefixBoundary=!0);break;case"][":case")(":a=Math.min.apply(null,n.contours.value),o=Math.max.apply(null,n.contours.value),ac&&(t[0].prefixBoundary=!0)}}},{}],892:[function(t,e,r){"use strict";e.exports={INEQUALITY_OPS:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"]}},{}],893:[function(t,e,r){"use strict";function n(t,e){function r(t){return s(t)?+t:null}var n,i=Array.isArray(e);return o.INEQUALITY_OPS.indexOf(t)!==-1?n=r(i?e[0]:e):o.INTERVAL_OPS.indexOf(t)!==-1?n=i?[r(e[0]),r(e[1])]:[r(e),r(e)]:o.SET_OPS.indexOf(t)!==-1&&(n=i?e.map(r):[r(e)]),n}function i(t){return function(e){e=n(t,e);var r=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return{start:r,end:i,size:i-r}}}function a(t){return function(e){return e=n(t,e),{start:e,end:1/0,size:1/0}}}var o=t("./constants"),s=t("fast-isnumeric");e.exports["[]"]=i("[]"),e.exports["()"]=i("()"),e.exports["[)"]=i("[)"),e.exports["(]"]=i("(]"),e.exports["]["]=i("]["),e.exports[")("]=i(")("),e.exports[")["]=i(")["),e.exports["]("]=i("]("),e.exports[">"]=a(">"),e.exports[">="]=a(">="),e.exports["<"]=a("<"),e.exports["<="]=a("<="),e.exports["="]=a("=")},{"./constants":892,"fast-isnumeric":116}],894:[function(t,e,r){"use strict";var n=t("./constraint_mapping"),i=t("fast-isnumeric");e.exports=function(t,e){var r;["=","<","<=",">",">="].indexOf(e.operation)===-1?(t("contours.value",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:i(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t("contours.value",0),i(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0));var a=n[e.operation](e.value);e.start=a.start,e.end=a.end,e.size=a.size}},{"./constraint_mapping":893,"fast-isnumeric":116}],895:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){var r,i,a,o=function(t){return t.reverse()},s=function(t){return t};switch(e){case"][":case")[":case"](":case")(":var l=o;o=s,s=l;case"[]":case"[)":case"(]":case"()":if(2!==t.length)return void n.warn("Contour data invalid for the specified inequality range operation.");for(i=t[0],a=t[1],r=0;r=":case">":if(1!==t.length)return void n.warn("Contour data invalid for the specified inequality operation.");for(i=t[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",t);break}return a}},{"../../lib":685}],898:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../contour/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.moduleType="trace",n.name="contourcarpet",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","carpet","contour","symbols","showLegend","hasLines","carpetDependent"],n.meta={},e.exports=n},{"../../plots/cartesian":734,"../contour/colorbar":876,"./attributes":889,"./calc":890,"./defaults":896,"./plot":901,"./style":902}],899:[function(t,e,r){"use strict";var n=t("../../components/drawing"),i=t("../carpet/axis_aligned_line"),a=t("../../lib");e.exports=function(t,e,r,o,s,l,u,c){function h(t){return Math.abs(t[1]-r[0][1])=0&&(y=L,x=_):Math.abs(v[1]-y[1])=0&&(y=L,x=_):a.log("endpt to newendpt is not vert. or horz.",v,y,L)}if(x>=0)break;M+=m(v,y),v=y}if(x===e.edgepaths.length){a.log("unclosed perimeter path");break}g=x,A=k.indexOf(g)===-1,A&&(g=k[0],M+=m(v,y)+"Z",v=null)}for(g=0;g=0;R--)P=d.clipsegments[R],O=h([],P.x,A.c2p),j=h([],P.y,T.c2p),O.reverse(),j.reverse(),N.push(f(O,j,P.bicubic));var B="M"+N.join("L")+"Z";l(F,d.clipsegments,A,T,C,M.coloring),u(i,F,A,T,L,z,n,c,d,M.coloring,B),s(F,L,M),a(F,c)}}function a(t,e){t.attr("clip-path","url(#"+e.clipPathId+")")}function o(t,e,r){var n=t.plot.select(".maplayer").selectAll("g.contour."+r).classed("trace",!0).data(e);return n.enter().append("g").classed("contour",!0).classed(r,!0),n.exit().remove(),n}function s(t,e,r){var n=e[0].smoothing,i=t.selectAll("g.contourlevel").data(r.showlines===!1?[]:e);i.enter().append("g").classed("contourlevel",!0),i.exit().remove();var a=i.selectAll("path.openline").data(function(t){return t.pedgepaths});a.enter().append("path").classed("openline",!0),a.exit().remove(),a.attr("d",function(t){return d.smoothopen(t,n)}).style("vector-effect","non-scaling-stroke");var o=i.selectAll("path.closedline").data(function(t){return t.ppaths});o.enter().append("path").classed("closedline",!0),o.exit().remove(),o.attr("d",function(t){return d.smoothclosed(t,n)}).style("vector-effect","non-scaling-stroke").style("stroke-miterlimit",1)}function l(t,e,r,i,a,o){var s,l,u,c,d=n(t,"g","contourbg"),p=d.selectAll("path").data("fill"!==o||a?[]:[0]);p.enter().append("path"),p.exit().remove();var m=[];for(c=0;cz){r("x scale is not linear");break}}if(y.length&&"fast"===E){var D=(y[y.length-1]-y[0])/(y.length-1),I=Math.abs(D/100);for(w=0;wI){r("y scale is not linear");break}}}var P=c(_),O="scaled"===e.xtype?"":m,j=p(e,O,g,v,P,M),R="scaled"===e.ytype?"":y,F=p(e,R,b,x,_.length,k);S||(a.expand(M,j),a.expand(k,F));var N={x:j,y:F,z:_,text:e.text};if(s(e,_,"","z"),A&&e.contours&&"heatmap"===e.contours.coloring){var B={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};N.xfill=p(B,O,g,v,P,M),N.yfill=p(B,R,b,x,_.length,k)}return[N]}},{"../../components/colorscale/calc":584,"../../lib":685,"../../plots/cartesian/axes":724,"../../registry":802,"../histogram2d/calc":932,"./clean_2d_array":905,"./convert_column_xyz":907,"./find_empties":909,"./has_columns":910,"./interp2d":913,"./make_bound_array":914,"./max_row_length":915}],905:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){var r,i,a,o,s,l;if(e){for(r=0,s=0;s=0;o--)a=f[o],r=a[0],i=a[1],(s=((h[[r-1,i]]||m)[2]+(h[[r+1,i]]||m)[2]+(h[[r,i-1]]||m)[2]+(h[[r,i+1]]||m)[2])/20)&&(l[a]=[r,i,s],f.splice(o,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(a in l)h[a]=l[a],c.push(l[a])}return c.sort(function(t,e){return e[2]-t[2]})}},{"./max_row_length":915}],910:[function(t,e,r){"use strict";e.exports=function(t){return!Array.isArray(t.z[0])}},{}],911:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/graph_interact"),i=t("../../lib"),a=t("../../plots/cartesian/constants").MAXDIST;e.exports=function(t,e,r,o,s){if(!(t.distance=y[0].length||h<0||h>y.length)return}else{if(n.inbox(e-g[0],e-g[g.length-1])>a||n.inbox(r-v[0],r-v[v.length-1])>a)return;if(s){var w;for(x=[2*g[0]-g[1]],w=1;wm&&(v=Math.max(v,Math.abs(t[i][a]-p)/(g-m))))}return v}var a=t("../../lib"),o=[[-1,0],[1,0],[0,-1],[0,1]];e.exports=function(t,e,r){var o,s,l=1;if(Array.isArray(r))for(o=0;o.01;o++)l=i(t,e,n(l));return l>.01&&a.log("interp2d didn't converge quickly",l),t}},{"../../lib":685}],914:[function(t,e,r){"use strict";var n=t("../../registry");e.exports=function(t,e,r,i,a,o){var s,l,u,c=[],h=n.traceIs(t,"contour"),f=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(Array.isArray(e)&&e.length>1&&!f&&"category"!==o.type){var p=e.length;if(!(p<=a))return h?e.slice(0,a):e.slice(0,a+1);if(h||d)c=e.slice(0,a);else if(1===a)c=[e[0]-.5,e[0]+.5];else{for(c=[1.5*e[0]-.5*e[1]],u=1;u0;)b=p.c2p(A[M]),M--;for(b0;)w=m.c2p(T[M]),M--;if(w<_&&(x=_,_=w,w=x,D=!0),S&&(A=r[0].xfill,T=r[0].yfill),"fast"!==E){var I="best"===E?0:.5;y=Math.max(-I*p._length,y),b=Math.min((1+I)*p._length,b),_=Math.max(-I*m._length,_),w=Math.min((1+I)*m._length,w)}var P=Math.round(b-y),O=Math.round(w-_),j=P<=0||O<=0,R=e.plot.select(".imagelayer").selectAll("g.hm."+v).data(j?[]:[0]);if(R.enter().append("g").classed("hm",!0).classed(v,!0),R.exit().remove(),!j){var F,N;"fast"===E?(F=C,N=L):(F=P,N=O);var B=document.createElement("canvas");B.width=F,B.height=N;var U,V,H=B.getContext("2d"),q=s.makeColorScaleFunc(s.extractScale(f.colorscale,f.zmin,f.zmax),{noNumericCheck:!0,returnArray:!0});"fast"===E?(U=z?function(t){return C-1-t}:o.identity,V=D?function(t){return L-1-t}:o.identity):(U=function(t){return o.constrain(Math.round(p.c2p(A[t])-y),0,P)},V=function(t){return o.constrain(Math.round(m.c2p(T[t])-_),0,O)});var G,Y,W,X,Z,J,Q,K=V(0),$=[K,K],tt=z?0:1,et=D?0:1,rt=0,nt=0,it=0,at=0;if(E){var ot,st=0;try{ot=new Uint8Array(P*O*4)}catch(t){ot=new Array(P*O*4)}if("best"===E){var lt,ut,ct,ht=new Array(A.length),ft=new Array(T.length),dt=new Array(P);for(M=0;M0&&a0&&s0&&(n=!0);for(var s=0;sa){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]=0;a--)i(a);else if("increasing"===e){for(a=1;a=0;a--)t[a]+=t[a+1];"exclude"===r&&(t.push(0),t.shift())}}var i=t("fast-isnumeric"),a=t("../../lib"),o=t("../../plots/cartesian/axes"),s=t("../bar/arrays_to_calcdata"),l=t("./bin_functions"),u=t("./norm_functions"),c=t("./average"),h=t("./clean_bins");e.exports=function(t,e){if(e.visible===!0){var r,f=[],d=[],p=o.getFromId(t,"h"===e.orientation?e.yaxis||"y":e.xaxis||"x"),m="h"===e.orientation?"y":"x",g={x:"y",y:"x"}[m],v=e[m+"calendar"],y=e.cumulative;h(e,p,m);var b,x=p.makeCalcdata(e,m),_=m+"bins";e["autobin"+m]===!1&&_ in e?b=e[_]:(b=o.autoBin(x,p,e["nbins"+m],!1,v),y.enabled&&"include"!==y.currentbin&&("decreasing"===y.direction?b.start=p.c2r(p.r2c(b.start)-b.size):b.end=p.c2r(p.r2c(b.end)+b.size)),e._input[_]=e[_]=b);var w,M,k,A="string"==typeof b.size,T=A?[]:b,S=[],E=[],L=0,C=e.histnorm,z=e.histfunc,D=C.indexOf("density")!==-1;y.enabled&&D&&(C=C.replace(/ ?density$/,""),D=!1);var I,P="max"===z||"min"===z,O=P?null:0,j=l.count,R=u[C],F=!1,N=function(t){return p.r2c(t,0,v)};for(Array.isArray(e[g])&&"count"!==z&&(I=e[g],F="avg"===z,j=l[z]),r=N(b.start),M=N(b.end)+(r-o.tickIncrement(r,b.size,!1,v))/1e6;r=0&&kH;r--)if(d[r]){q=r;break}for(r=H;r<=q;r++)i(f[r])&&i(d[r])&&V.push({p:f[r],s:d[r],b:0});return s(V,e),V}}},{"../../lib":685,"../../plots/cartesian/axes":724,"../bar/arrays_to_calcdata":811,"./average":923,"./bin_functions":925,"./clean_bins":927,"./norm_functions":930,"fast-isnumeric":116}],927:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib").cleanDate,a=t("../../constants/numerical"),o=a.ONEDAY,s=a.BADNUM;e.exports=function(t,e,r){var a=e.type,l=r+"bins",u=t[l];u||(u=t[l]={});var c="date"===a?function(t){return t||0===t?i(t,s,u.calendar):null}:function(t){return n(t)?Number(t):null};u.start=c(u.start),u.end=c(u.end);var h="date"===a?o:1,f=u.size;if(n(f))u.size=f>0?Number(f):h;else if("string"!=typeof f)u.size=h;else{var d=f.charAt(0),p=f.substr(1);p=n(p)?Number(p):0,(p<=0||"date"!==a||"M"!==d||p!==Math.round(p))&&(u.size=h)}var m="autobin"+r;"boolean"!=typeof t[m]&&(t[m]=!((u.start||0===u.start)&&(u.end||0===u.end))),t[m]||delete t["nbins"+r]}},{"../../constants/numerical":666,"../../lib":685,"fast-isnumeric":116}],928:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../components/color"),o=t("./bin_defaults"),s=t("../bar/style_defaults"),l=t("../../components/errorbars/defaults"),u=t("./attributes");e.exports=function(t,e,r,c){function h(r,n){return i.coerce(t,e,u,r,n)}var f=h("x"),d=h("y");h("cumulative.enabled")&&(h("cumulative.direction"),h("cumulative.currentbin")),h("text");var p=h("orientation",d&&!f?"h":"v"),m=e["v"===p?"x":"y"];if(!m||!m.length)return void(e.visible=!1);n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],c),e["h"===p?"x":"y"]&&h("histfunc"),o(t,e,h,"h"===p?["y"]:["x"]),s(t,e,h,r,c),l(t,e,a.defaultLine,{axis:"y"}),l(t,e,a.defaultLine,{axis:"x",inherit:"y"})}},{"../../components/color":578,"../../components/errorbars/defaults":607,"../../lib":685,"../../registry":802,"../bar/style_defaults":823,"./attributes":922,"./bin_defaults":924}],929:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.layoutAttributes=t("../bar/layout_attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("../bar/layout_defaults"),n.calc=t("./calc"),n.setPositions=t("../bar/set_positions"),n.plot=t("../bar/plot"),n.style=t("../bar/style"),n.colorbar=t("../scatter/colorbar"),n.hoverPoints=t("../bar/hover"),n.moduleType="trace",n.name="histogram",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","bar","histogram","oriented","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":734,"../bar/hover":815,"../bar/layout_attributes":817,"../bar/layout_defaults":818,"../bar/plot":819,"../bar/set_positions":820,"../bar/style":822,"../scatter/colorbar":979,"./attributes":922,"./calc":926,"./defaults":928}],930:[function(t,e,r){"use strict";e.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;ik&&m.splice(k,m.length-k),v.length>k&&v.splice(k,v.length-k),!e.autobinx&&"xbins"in e||(e.xbins=i.autoBin(m,p,e.nbinsx,"2d",y),"histogram2dcontour"===e.type&&(e.xbins.start=w(i.tickIncrement(x(e.xbins.start),e.xbins.size,!0,y)),e.xbins.end=w(i.tickIncrement(x(e.xbins.end),e.xbins.size,!1,y))),e._input.xbins=e.xbins),!e.autobiny&&"ybins"in e||(e.ybins=i.autoBin(v,g,e.nbinsy,"2d",b),"histogram2dcontour"===e.type&&(e.ybins.start=M(i.tickIncrement(_(e.ybins.start),e.ybins.size,!0,b)),e.ybins.end=M(i.tickIncrement(_(e.ybins.end),e.ybins.size,!1,b))),e._input.ybins=e.ybins),f=[];var A,T,S=[],E=[],L="string"==typeof e.xbins.size,C="string"==typeof e.ybins.size,z=L?[]:e.xbins,D=C?[]:e.ybins,I=0,P=[],O=e.histnorm,j=e.histfunc,R=O.indexOf("density")!==-1,F="max"===j||"min"===j,N=F?null:0,B=a.count,U=o[O],V=!1,H=[],q=[],G="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";G&&"count"!==j&&(V="avg"===j,B=a[j]);var Y=e.xbins,W=x(Y.start),X=x(Y.end)+(W-i.tickIncrement(W,Y.size,!1,y))/1e6;for(d=W;d=0&&A=0&&T0)s=h(t.alphahull,l);else{var u=["x","y","z"].indexOf(t.delaunayaxis);s=c(l.map(function(t){return[t[(u+1)%3],t[(u+2)%3]]}))}var p={positions:l,cells:s,lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:d(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};t.intensity?(this.color="#fff",p.vertexIntensity=t.intensity,p.colormap=i(t.colorscale)):t.vertexcolor?(this.color=t.vertexcolors[0],p.vertexColors=a(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],p.cellColors=a(t.facecolor)):(this.color=t.color,p.meshColor=d(t.color)),this.mesh.update(p)},p.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=s},{"../../lib/str2rgbarray":703,"alpha-shape":38,"convex-hull":96,"delaunay-triangulate":108,"gl-mesh3d":189,tinycolor2:514}],941:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../components/colorbar/defaults"),o=t("./attributes");e.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function u(t){var e=t.map(function(t){var e=l(t);return e&&Array.isArray(e)?e:null});return e.every(function(t){return t&&t.length===e[0].length})&&e}var c=u(["x","y","z"]),h=u(["i","j","k"]);if(!c)return void(e.visible=!1);h&&h.forEach(function(t){for(var e=0;ee}}},r.addRangeSlider=function(t,e){for(var r=!1,n=0;n1)){var h=o.simpleMap(c.x,e.d2c,0,r.xcalendar),f=o.distinctVals(h).minDiff;a=Math.min(a,f)}}for(1/0===a&&(a=1),u=0;u");_.push(o,o,o,o,o,o,null)}(L,d[L],p[L],m[L],g[L]));e.x=b,e.y=x,e.text=_}},{"../../lib":685,"../../plots/cartesian/axes":724,"../../plots/cartesian/axis_ids":727,"./helpers":946}],950:[function(t,e,r){"use strict";var n=t("../../components/colorscale/color_attributes"),i=t("../../components/colorbar/attributes"),a=t("../../components/colorscale/scales"),o=t("../../plots/cartesian/layout_attributes"),s=t("../../lib/extend").extendDeep,l=t("../../lib/extend").extendFlat;e.exports={domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},dimensions:{_isLinkedToArray:"dimension",label:{valType:"string"},tickvals:o.tickvals,ticktext:o.ticktext,tickformat:{valType:"string",dflt:"3s"},visible:{valType:"boolean",dflt:!0},range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},constraintrange:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},values:{valType:"data_array",dflt:[]}},line:l({},s({},n("line"),{colorscale:s({},n("line").colorscale,{dflt:a.Viridis}),autocolorscale:s({},n("line").autocolorscale,{dflt:!1})}),{showscale:{valType:"boolean",dflt:!1},colorbar:i})}},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/colorscale/scales":596,"../../lib/extend":677,"../../plots/cartesian/layout_attributes":735}],951:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plots/plots"),a=t("./plot"),o=t("../../constants/xmlns_namespaces"),s=t("./constants");r.name="parcoords",r.attr="type",r.plot=function(t){var e=i.getSubplotCalcData(t.calcdata,"parcoords","parcoords");e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords-line-layers").remove(),n._paperdiv.selectAll(".parcoords-line-layers").remove(),n._paperdiv.selectAll(".parcoords").remove(),n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){function e(e){var n=this,i=n.toDataURL("image/png"),a=r.append("svg:image"),l=t._fullLayout._size,u=t._fullData[e.model.key].domain;a.attr({xmlns:o.svg,"xlink:href":i,x:l.l+l.w*u.x[0]-s.overdrag,y:l.t+l.h*(1-u.y[1]),width:(u.x[1]-u.x[0])*l.w+2*s.overdrag,height:(u.y[1]-u.y[0])*l.h,preserveAspectRatio:"none"})}var r=t._fullLayout._glimages,i=n.selectAll(".svg-container");i.filter(function(t,e){return e===i.size()-1 -}).selectAll(".parcoords-lines.context, .parcoords-lines.focus").each(e),window.setTimeout(function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":668,"../../plots/plots":787,"./constants":954,"./plot":959,d3:107}],952:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/calc"),a=t("../../lib");e.exports=function(t,e){var r=!!e.line.colorscale&&a.isArray(e.line.color),o=r?e.line.color:Array.apply(0,Array(e.dimensions.reduce(function(t,e){return Math.max(t,e.values.length)},0))).map(function(){return.5}),s=r?e.line.colorscale:[[0,e.line.color],[1,e.line.color]];return n(e,"line")&&i(e,e.line.color,"line","c"),[{lineColor:o,cscale:s}]}},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"../../lib":685}],953:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../components/colorscale"),s=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,l=r.line,u="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===l||!l.showscale)return void a.autoMargin(t,u);var c=l.color,h=l.cmin,f=l.cmax;n(h)||(h=i.aggNums(Math.min,null,c)),n(f)||(f=i.aggNums(Math.max,null,c));var d=e[0].t.cb=s(t,u),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,h,f),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:h,end:f,size:(f-h)/254}).options(l.colorbar)()}},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],954:[function(t,e,r){"use strict";e.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,scatter:!1,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,capturewidth:10,fillcolor:"magenta",fillopacity:1,strokecolor:"white",strokeopacity:1,strokewidth:1,handleheight:16,handleopacity:1,handleoverlap:0}}},{}],955:[function(t,e,r){"use strict";function n(t,e,r,n,i){i("line.color",r),s(t,"line")&&a.isArray(t.line.color)?(i("line.colorscale"),l(t,e,n,i,{prefix:"line.",cLetter:"c"})):i("line.color",r)}function i(t,e){function r(t,e){return a.coerce(n,i,o.dimensions,t,e)}var n,i,s,l=t.dimensions||[],c=e.dimensions=[],h=1/0;for(l.length>u&&(a.log("parcoords traces support up to "+u+" dimensions at the moment"),l.splice(u)),s=0;s0);d&&(r("label"),r("tickvals"),r("ticktext"),r("tickformat"),r("range"),r("constraintrange"),h=Math.min(h,i.values.length)),i._index=s,c.push(i)}if(isFinite(h))for(s=0;sh&&(i.values=i.values.slice(0,h));return c}var a=t("../../lib"),o=t("./attributes"),s=t("../../components/colorscale/has_colorscale"),l=t("../../components/colorscale/defaults"),u=t("./constants").maxDimensionCount;e.exports=function(t,e,r,s){function l(r,n){return a.coerce(t,e,o,r,n)}var u=i(t,e);n(t,e,r,s,l),l("domain.x"),l("domain.y"),Array.isArray(u)&&u.length||(e.visible=!1)}},{"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591,"../../lib":685,"./attributes":950,"./constants":954}],956:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.calc=t("./calc"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.moduleType="trace",n.name="parcoords",n.basePlotModule=t("./base_plot"),n.categories=["gl","noOpacity"],n.meta={},e.exports=n},{"./attributes":950,"./base_plot":951,"./calc":952,"./colorbar":953,"./defaults":955,"./plot":959}],957:[function(t,e,r){"use strict";function n(t){t.read({x:0,y:0,width:1,height:1,data:x})}function i(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function a(t,e,r,a,o,s){function l(n){var c;c=Math.min(a,o-n*a),s.offset=v*n*a,s.count=v*c,0===n&&(window.cancelAnimationFrame(r.currentRafs[u]),delete r.currentRafs[u],i(t,s.scissorX,s.scissorY,s.scissorWidth,s.viewBoxSize[1])),r.clearOnly||(e(s),n*a+c>>8*e)%256/255}function u(t,e,r,n){for(var i=[],a=0;a=g-4?l(a,g-2-s):.5);return i}function c(t,e,r){var n,i,a,o=[];for(i=0;if&&(f=t[l].dim2.canvasX,c=l),t[l].dim1.canvasXi)return a;i=o,a=n[r]}return n[n.length-1]}function l(t,e,r){var n=o(r);return r.tickvals?_.scale.ordinal().domain(r.tickvals).range(r.tickvals.map(function(t){return(t-n[0])/(n[1]-n[0])}).map(function(r){return t-e+r*(e-(t-e))})):_.scale.linear().domain(n).range([t-e,e])}function u(t,e){return _.scale.linear().range([t-e,e])}function c(t){return _.scale.linear().domain(o(t))}function h(t){var e=o(t);return t.tickvals&&_.scale.ordinal().domain(t.tickvals).range(t.tickvals.map(function(t){return(t-e[0])/(e[1]-e[0])}))}function f(t){var e=t.map(function(t){return t[0]}),r=t.map(function(t){return t[1]}),n=r.map(function(t){return _.rgb(t)}),i=function(t){return function(e){return e[t]}},a="rgb".split("").map(function(t){return _.scale.linear().clamp(!0).domain(e).range(n.map(i(t)))});return function(t){return a.map(function(e){return e(t)})}}function d(t){return t[0]}function p(t,e,r){var n=d(e),i=n.trace,o=n.lineColor,s=n.cscale,l=i.line,u=i.domain,h=i.dimensions,p=t.width,m=x.extendDeep({},l,{color:o.map(c({values:o,range:[l.cmin,l.cmax]})),blockLineCount:b.blockLineCount,canvasOverdrag:b.overdrag*b.canvasPixelRatio}),g=Math.floor(p*(u.x[1]-u.x[0])),v=Math.floor(t.height*(u.y[1]-u.y[0])),y=t.margin||{l:80,r:80,t:100,b:80},_=g,w=v;return{key:r,colCount:h.filter(a).length,dimensions:h,tickDistance:b.tickDistance,unitToColor:f(s),lines:m,translateX:u.x[0]*p,translateY:t.height-u.y[1]*t.height,pad:y,canvasWidth:_*b.canvasPixelRatio+2*m.canvasOverdrag,canvasHeight:w*b.canvasPixelRatio,width:_,height:w,canvasPixelRatio:b.canvasPixelRatio}}function m(t){var e=t.width,r=t.height,n=t.dimensions,i=t.canvasPixelRatio,o=function(r){return e*r/Math.max(1,t.colCount-1)},s=b.verticalPadding/(r*i),f=1-2*s,d=function(t){return s+f*t},p={key:t.key,xScale:o,model:t},m={};return p.dimensions=n.filter(a).map(function(e,n){var a=c(e),s=m[e.label];return m[e.label]=(s||0)+1,{key:e.label+(s?"__"+s:""),label:e.label,tickFormat:e.tickformat,tickvals:e.tickvals,ticktext:e.ticktext,ordinal:!!e.tickvals,scatter:b.scatter||e.scatter,xIndex:n,crossfilterDimensionIndex:n,visibleIndex:e._index,height:r,values:e.values,paddedUnitValues:e.values.map(a).map(d),xScale:o,x:o(n),canvasX:o(n)*i,unitScale:u(r,b.verticalPadding),domainScale:l(r,b.verticalPadding,e),ordinalScale:h(e),domainToUnitScale:a,filter:e.constraintrange?e.constraintrange.map(a):[0,1],parent:p,model:t}}),p}function g(t){return b.layers.map(function(e){return{key:e,context:"contextLineLayer"===e,pick:"pickLineLayer"===e,viewModel:t,model:t.model}})}function v(t){t.classed("axisExtentText",!0).attr("text-anchor","middle").style("font-weight",100).style("font-size","10px").style("cursor","default").style("user-select","none")}var y=t("./lines"),b=t("./constants"),x=t("../../lib"),_=t("d3");e.exports=function(t,e,r,a,o){function l(t){var e=t.selectAll("defs").data(i,n);e.enter().append("defs");var r=e.selectAll("#filterBarPattern").data(i,n);r.enter().append("pattern").attr("id","filterBarPattern").attr("patternUnits","userSpaceOnUse"),r.attr("x",-b.bar.width).attr("width",b.bar.capturewidth).attr("height",function(t){return t.model.height});var a=r.selectAll("rect").data(i,n);a.enter().append("rect").attr("shape-rendering","crispEdges"),a.attr("height",function(t){return t.model.height}).attr("width",b.bar.width).attr("x",b.bar.width/2).attr("fill",b.bar.fillcolor).attr("fill-opacity",b.bar.fillopacity).attr("stroke",b.bar.strokecolor).attr("stroke-opacity",b.bar.strokeopacity).attr("stroke-width",b.bar.strokewidth)}function u(t){return t.dimensions.some(function(t){return 0!==t.filter[0]||1!==t.filter[1]})}function c(t,e){for(var r=e.panels||(e.panels=[]),n=t.each(function(t){return t})[e.key].map(function(t){return t.__data__}),i=n.length-1,a=0;a<1;a++)for(var o=0;o=r||s>=n)return;var l=t.lineLayer.readPixel(a,n-1-s),u=0!==l[3],c=u?l[2]+256*(l[1]+256*l[0]):null,h={x:a,y:s,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:c};c!==z&&(u?o.hover(h):o.unhover&&o.unhover(h),z=c)}}),L.style("margin",function(t){var e=t.model.pad;return e.t+"px "+e.r+"px "+e.b+"px "+e.l+"px"}).attr("width",function(t){return t.model.canvasWidth}).attr("height",function(t){return t.model.canvasHeight}).style("width",function(t){return t.model.width+2*b.overdrag+"px"}).style("height",function(t){return t.model.height+"px"}).style("opacity",function(t){return t.pick?.01:1}),e.style("background","rgba(255, 255, 255, 0)");var D=e.selectAll(".parcoords").data(S,n);D.exit().remove(),D.enter().append("g").classed("parcoords",!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","none").call(l),D.attr("width",function(t){return t.model.width+t.model.pad.l+t.model.pad.r}).attr("height",function(t){return t.model.height+t.model.pad.t+t.model.pad.b}).attr("transform",function(t){return"translate("+t.model.translateX+","+t.model.translateY+")"});var I=D.selectAll(".parcoordsControlView").data(i,n);I.enter().append("g").classed("parcoordsControlView",!0).style("box-sizing","content-box"),I.attr("transform",function(t){return"translate("+t.model.pad.l+","+t.model.pad.t+")"});var P=I.selectAll(".yAxis").data(function(t){return t.dimensions},n);P.enter().append("g").classed("yAxis",!0).each(function(t){C.dimensions.push(t)}),I.each(function(t){f(P,t)}),L.each(function(t){t.lineLayer=y(this,t.model.lines,t.model.canvasWidth,t.model.canvasHeight,t.viewModel.dimensions,t.viewModel.panels,t.model.unitToColor,t.context,t.pick,b.scatter),t.viewModel[t.key]=t.lineLayer,C.renderers.push(function(){t.lineLayer.render(t.viewModel.panels,!0)}),t.lineLayer.render(t.viewModel.panels,!t.context)}),P.attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),P.call(_.behavior.drag().origin(function(t){return t}).on("drag",function(t){var e=t.parent;T=!1,A||(t.x=Math.max(-b.overdrag,Math.min(t.model.width+b.overdrag,_.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,P.sort(function(t,e){return t.x-e.x}).each(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio}),f(P,e),P.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),_.select(this).attr("transform","translate("+t.x+", 0)"),P.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLineLayer&&e.contextLineLayer.render(e.panels,!1,!u(e)),e.focusLineLayer.render&&e.focusLineLayer.render(e.panels))}).on("dragend",function(t){var e=t.parent;if(A)return void("ending"===A&&(A=!1));t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,f(P,e),_.select(this).attr("transform",function(t){return"translate("+t.x+", 0)"}),e.contextLineLayer&&e.contextLineLayer.render(e.panels,!1,!u(e)),e.focusLineLayer&&e.focusLineLayer.render(e.panels),e.pickLineLayer&&e.pickLineLayer.render(e.panels,!0),T=!0,o&&o.axesMoved&&o.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),P.exit().remove();var O=P.selectAll(".axisOverlays").data(i,n);O.enter().append("g").classed("axisOverlays",!0),O.selectAll(".axis").remove();var j=O.selectAll(".axis").data(i,n);j.enter().append("g").classed("axis",!0),j.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,n=r.domain(),i=t.ticktext;_.select(this).call(_.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?n.map(function(t,e){return i&&i[e]||t}):null).tickFormat(t.ordinal?function(t){return t}:null).scale(r))}),j.selectAll(".domain, .tick").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),j.selectAll("text").style("font-weight",100).style("font-size","10px").style("fill","black").style("fill-opacity",1).style("stroke","none").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default").style("user-select","none");var R=O.selectAll(".axisHeading").data(i,n);R.enter().append("g").classed("axisHeading",!0);var F=R.selectAll(".axisTitle").data(i,n);F.enter().append("text").classed("axisTitle",!0).attr("text-anchor","middle").style("font-family","sans-serif").style("font-size","10px").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),F.attr("transform","translate(0,"+-b.axisTitleOffset+")").text(function(t){return t.label});var N=O.selectAll(".axisExtent").data(i,n);N.enter().append("g").classed("axisExtent",!0);var B=N.selectAll(".axisExtentTop").data(i,n);B.enter().append("g").classed("axisExtentTop",!0),B.attr("transform","translate(0,"+-b.axisExtentOffset+")");var U=B.selectAll(".axisExtentTopText").data(i,n);U.enter().append("text").classed("axisExtentTopText",!0).attr("alignment-baseline","after-edge").call(v),U.text(function(t){return x(t)(t.domainScale.domain().slice(-1)[0])});var V=N.selectAll(".axisExtentBottom").data(i,n);V.enter().append("g").classed("axisExtentBottom",!0),V.attr("transform",function(t){return"translate(0,"+(t.model.height+b.axisExtentOffset)+")"});var H=V.selectAll(".axisExtentBottomText").data(i,n);H.enter().append("text").classed("axisExtentBottomText",!0).attr("alignment-baseline","before-edge").call(v),H.text(function(t){return x(t)(t.domainScale.domain()[0])});var q=O.selectAll(".axisBrush").data(i,n),G=q.enter().append("g").classed("axisBrush",!0);q.each(function(t){t.brush||(t.brush=_.svg.brush().y(t.unitScale).on("brushstart",w).on("brush",M).on("brushend",k),0===t.filter[0]&&1===t.filter[1]||t.brush.extent(t.filter),_.select(this).call(t.brush))}),G.selectAll("rect").attr("x",-b.bar.capturewidth/2).attr("width",b.bar.capturewidth),G.selectAll("rect.extent").attr("fill","url(#filterBarPattern)").style("cursor","ns-resize").filter(function(t){return 0===t.filter[0]&&1===t.filter[1]}).attr("y",-100),G.selectAll(".resize rect").attr("height",b.bar.handleheight).attr("opacity",0).style("visibility","visible"),G.selectAll(".resize.n rect").style("cursor","n-resize").attr("y",b.bar.handleoverlap-b.bar.handleheight),G.selectAll(".resize.s rect").style("cursor","s-resize").attr("y",b.bar.handleoverlap);var Y=!1,W=!1;return C}},{"../../lib":685,"./constants":954,"./lines":957,d3:107}],959:[function(t,e,r){"use strict";var n=t("./parcoords");e.exports=function(t,e){var r=t._fullLayout,i=r._paper,a=r._paperdiv,o={},s={},l=r._size;e.forEach(function(e,r){o[r]=t.data[r].dimensions,s[r]=t.data[r].dimensions.slice()});var u=function(e,r,n){var i=s[e][r],a=i.constraintrange;a&&2===a.length||(a=i.constraintrange=[]),a[0]=n[0],a[1]=n[1],t.emit("plotly_restyle")},c=function(e){t.emit("plotly_hover",e)},h=function(e){t.emit("plotly_unhover",e)},f=function(e,r){function n(t){return!("visible"in t)||t.visible}function i(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return i===-1&&(i+=e.length),i}var a=function(t){return function(e,n){return i(r,t,e)-i(r,t,n)}}(s[e].filter(n));o[e].sort(a),s[e].filter(function(t){return!n(t)}).sort(function(t){return s[e].indexOf(t)}).forEach(function(t){o[e].splice(o[e].indexOf(t),1),o[e].splice(s[e].indexOf(t),0,t)}),t.emit("plotly_restyle")};n(a,i,e,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:h,axesMoved:f})}},{"./parcoords":958}],960:[function(t,e,r){"use strict";var n=t("../../components/color/attributes"),i=t("../../plots/font_attributes"),a=t("../../plots/attributes"),o=t("../../lib/extend").extendFlat;e.exports={labels:{valType:"data_array"},label0:{valType:"number",dflt:0},dlabel:{valType:"number",dflt:1},values:{valType:"data_array"},marker:{colors:{valType:"data_array"},line:{color:{valType:"color",dflt:n.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}}},text:{valType:"data_array"},hovertext:{valType:"string",dflt:"",arrayOk:!0},scalegroup:{valType:"string",dflt:""},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"]},hoverinfo:o({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0},textfont:o({},i,{}),insidetextfont:o({},i,{}),outsidetextfont:o({},i,{}),domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},hole:{valType:"number",min:0,max:1,dflt:0},sort:{valType:"boolean",dflt:!0},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise"},rotation:{valType:"number",min:-360,max:360,dflt:0},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0}}},{"../../components/color/attributes":577,"../../lib/extend":677,"../../plots/attributes":722,"../../plots/font_attributes":748}],961:[function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n")}return m};var l},{"../../components/color":578,"./helpers":964,"fast-isnumeric":116,tinycolor2:514}],963:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r,a){function o(r,a){return n.coerce(t,e,i,r,a)}var s=n.coerceFont,l=o("values");if(!Array.isArray(l)||!l.length)return void(e.visible=!1);var u=o("labels");Array.isArray(u)||(o("label0"),o("dlabel")),o("marker.line.width")&&o("marker.line.color");var c=o("marker.colors");Array.isArray(c)||(e.marker.colors=[]),o("scalegroup");var h=o("text"),f=o("textinfo",Array.isArray(h)?"text+percent":"percent");if(o("hovertext"),o("hoverinfo",1===a._dataLength?"label+text+value+percent":void 0),f&&"none"!==f){var d=o("textposition"),p=Array.isArray(d)||"auto"===d,m=p||"inside"===d,g=p||"outside"===d;if(m||g){var v=s(o,"textfont",a.font);m&&s(o,"insidetextfont",v),g&&s(o,"outsidetextfont",v)}}o("domain.x"),o("domain.y"),o("hole"),o("sort"),o("direction"),o("rotation"),o("pull")}},{"../../lib":685, -"./attributes":960}],964:[function(t,e,r){"use strict";var n=t("../../lib");r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return r.lastIndexOf(".")!==-1&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)+"%"},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return r.lastIndexOf(".")!==-1&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)}},{"../../lib":685}],965:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("./layout_defaults"),n.layoutAttributes=t("./layout_attributes"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.styleOne=t("./style_one"),n.moduleType="trace",n.name="pie",n.basePlotModule=t("./base_plot"),n.categories=["pie","showLegend"],n.meta={},e.exports=n},{"./attributes":960,"./base_plot":961,"./calc":962,"./defaults":963,"./layout_attributes":966,"./layout_defaults":967,"./plot":968,"./style":969,"./style_one":970}],966:[function(t,e,r){"use strict";e.exports={hiddenlabels:{valType:"data_array"}}},{}],967:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){!function(r,a){n.coerce(t,e,i,r,a)}("hiddenlabels")}},{"../../lib":685,"./layout_attributes":966}],968:[function(t,e,r){"use strict";function n(t,e,r){var n=Math.sqrt(t.width*t.width+t.height*t.height),a=t.width/t.height,o=Math.PI*Math.min(e.v/r.vTotal,.5),s=1-r.trace.hole,l=i(e,r),u={scale:l*r.r*2/n,rCenter:1-l,rotate:0};if(u.scale>=1)return u;var c=a+1/(2*Math.tan(o)),h=r.r*Math.min(1/(Math.sqrt(c*c+.5)+c),s/(Math.sqrt(a*a+s/2)+a)),f={scale:2*h/t.height,rCenter:Math.cos(h/r.r)-h*a/r.r,rotate:(180/Math.PI*e.midangle+720)%180-90},d=1/a,p=d+1/(2*Math.tan(o)),m=r.r*Math.min(1/(Math.sqrt(p*p+.5)+p),s/(Math.sqrt(d*d+s/2)+d)),g={scale:2*m/t.width,rCenter:Math.cos(m/r.r)-m/a/r.r,rotate:(180/Math.PI*e.midangle+810)%180-90},v=g.scale>f.scale?g:f;return u.scale<1&&v.scale>u.scale?v:u}function i(t,e){if(t.v===e.vTotal&&!e.trace.hole)return 1;var r=Math.PI*Math.min(t.v/e.vTotal,.5);return Math.min(1/(1+1/Math.sin(r)),(1-e.trace.hole)/2)}function a(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function o(t,e){function r(t,e){return t.pxmid[1]-e.pxmid[1]}function n(t,e){return e.pxmid[1]-t.pxmid[1]}var i,a,o,s,l,u,c,h,f,d,p,m,g;for(a=0;a<2;a++)for(o=a?r:n,l=a?Math.max:Math.min,c=a?1:-1,i=0;i<2;i++){for(s=i?Math.max:Math.min,u=i?1:-1,h=t[a][i],h.sort(o),f=t[1-a][i],d=f.concat(h),m=[],p=0;p0&&(t.labelExtraY=b),Array.isArray(e.pull))for(i=0;i=e.pull[o.i]||((t.pxmid[1]-o.pxmid[1])*c>0?(h=o.cyFinal+l(o.px0[1],o.px1[1]),(b=h-g-t.labelExtraY)*c>0&&(t.labelExtraY+=b)):(v+t.labelExtraY-y)*c>0&&(n=3*u*Math.abs(i-d.indexOf(t)),f=o.cxFinal+s(o.px0[0],o.px1[0]),(p=f+n-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*u>0&&(t.labelExtraX+=p)))}(m[p],v)}}}function s(t,e){var r,n,i,a,o,s,l,c,h,f,d=[];for(i=0;ic&&(c=s.pull[a]);o.r=Math.min(r/u(s.tilt,Math.sin(l),s.depth),n/u(s.tilt,Math.cos(l),s.depth))/(2+2*c),o.cx=e.l+e.w*(s.domain.x[1]+s.domain.x[0])/2,o.cy=e.t+e.h*(2-s.domain.y[1]-s.domain.y[0])/2,s.scalegroup&&d.indexOf(s.scalegroup)===-1&&d.push(s.scalegroup)}for(a=0;ah.vTotal/2?1:0)}function u(t,e,r){if(!t)return 1;var n=Math.sin(t*Math.PI/180);return Math.max(.01,r*n*Math.abs(e)+2*Math.sqrt(1-n*n*e*e))}var c=t("d3"),h=t("../../plots/cartesian/graph_interact"),f=t("../../components/color"),d=t("../../components/drawing"),p=t("../../lib/svg_text_utils"),m=t("./helpers");e.exports=function(t,e){var r=t._fullLayout;s(e,r._size);var u=r._pielayer.selectAll("g.trace").data(e);u.enter().append("g").attr({"stroke-linejoin":"round",class:"trace"}),u.exit().remove(),u.order(),u.each(function(e){var s=c.select(this),u=e[0],g=u.trace,v=(g.depth||0)*u.r*Math.sin(0)/2,y=g.tiltaxis||0,b=y*Math.PI/180,x=[v*Math.sin(b),v*Math.cos(b)],_=u.r*Math.cos(0),w=s.selectAll("g.part").data(g.tilt?["top","sides"]:["top"]);w.enter().append("g").attr("class",function(t){return t+" part"}),w.exit().remove(),w.order(),l(e),s.selectAll(".top").each(function(){var s=c.select(this).selectAll("g.slice").data(e);s.enter().append("g").classed("slice",!0),s.exit().remove();var l=[[[],[]],[[],[]]],v=!1;s.each(function(e){function o(n){n.originalEvent=c.event;var a=t._fullLayout,o=t._fullData[g.index],s=o.hoverinfo;if("all"===s&&(s="label+text+value+percent+name"),t._dragging||a.hovermode===!1||"none"===s||"skip"===s||!s)return void h.hover(t,n,"pie");var l=i(e,u),f=w+e.pxmid[0]*(1-l),d=M+e.pxmid[1]*(1-l),p=r.separators,v=[];s.indexOf("label")!==-1&&v.push(e.label),s.indexOf("text")!==-1&&(o.hovertext?v.push(Array.isArray(o.hovertext)?o.hovertext[e.i]:o.hovertext):o.text&&o.text[e.i]&&v.push(o.text[e.i])),s.indexOf("value")!==-1&&v.push(m.formatPieValue(e.v,p)),s.indexOf("percent")!==-1&&v.push(m.formatPiePercent(e.v/u.vTotal,p)),h.loneHover({x0:f-l*u.r,x1:f+l*u.r,y:d,text:v.join("
"),name:s.indexOf("name")!==-1?o.name:void 0,color:e.color,idealAlign:e.pxmid[0]<0?"left":"right"},{container:a._hoverlayer.node(),outerContainer:a._paper.node()}),h.hover(t,n,"pie"),T=!0}function s(e){e.originalEvent=c.event,t.emit("plotly_unhover",{event:c.event,points:[e]}),T&&(h.loneUnhover(r._hoverlayer.node()),T=!1)}function f(){t._hoverdata=[e],t._hoverdata.trace=u.trace,h.click(t,c.event)}function b(t,r,n,i){return"a"+i*u.r+","+i*_+" "+y+" "+e.largeArc+(n?" 1 ":" 0 ")+i*(r[0]-t[0])+","+i*(r[1]-t[1])}if(e.hidden)return void c.select(this).selectAll("path,g").remove();l[e.pxmid[1]<0?0:1][e.pxmid[0]<0?0:1].push(e);var w=u.cx+x[0],M=u.cy+x[1],k=c.select(this),A=k.selectAll("path.surface").data([e]),T=!1;if(A.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),k.select("path.textline").remove(),k.on("mouseover",o).on("mouseout",s).on("click",f),g.pull){var S=+(Array.isArray(g.pull)?g.pull[e.i]:g.pull)||0;S>0&&(w+=S*e.pxmid[0],M+=S*e.pxmid[1])}e.cxFinal=w,e.cyFinal=M;var E=g.hole;if(e.v===u.vTotal){var L="M"+(w+e.px0[0])+","+(M+e.px0[1])+b(e.px0,e.pxmid,!0,1)+b(e.pxmid,e.px0,!0,1)+"Z";E?A.attr("d","M"+(w+E*e.px0[0])+","+(M+E*e.px0[1])+b(e.px0,e.pxmid,!1,E)+b(e.pxmid,e.px0,!1,E)+"Z"+L):A.attr("d",L)}else{var C=b(e.px0,e.px1,!0,1);if(E){var z=1-E;A.attr("d","M"+(w+E*e.px1[0])+","+(M+E*e.px1[1])+b(e.px1,e.px0,!1,E)+"l"+z*e.px0[0]+","+z*e.px0[1]+C+"Z")}else A.attr("d","M"+w+","+M+"l"+e.px0[0]+","+e.px0[1]+C+"Z")}var D=Array.isArray(g.textposition)?g.textposition[e.i]:g.textposition,I=k.selectAll("g.slicetext").data(e.text&&"none"!==D?[0]:[]);I.enter().append("g").classed("slicetext",!0),I.exit().remove(),I.each(function(){var t=c.select(this).selectAll("text").data([0]);t.enter().append("text").attr("data-notex",1),t.exit().remove(),t.text(e.text).attr({class:"slicetext",transform:"","data-bb":"","text-anchor":"middle",x:0,y:0}).call(d.font,"outside"===D?g.outsidetextfont:g.insidetextfont).call(p.convertToTspans),t.selectAll("tspan.line").attr({x:0,y:0});var r,i=d.bBox(t.node());"outside"===D?r=a(i,e):(r=n(i,e,u),"auto"===D&&r.scale<1&&(t.call(d.font,g.outsidetextfont),g.outsidetextfont.family===g.insidetextfont.family&&g.outsidetextfont.size===g.insidetextfont.size||(t.attr({"data-bb":""}),i=d.bBox(t.node())),r=a(i,e)));var o=w+e.pxmid[0]*r.rCenter+(r.x||0),s=M+e.pxmid[1]*r.rCenter+(r.y||0);r.outside&&(e.yLabelMin=s-i.height/2,e.yLabelMid=s,e.yLabelMax=s+i.height/2,e.labelExtraX=0,e.labelExtraY=0,v=!0),t.attr("transform","translate("+o+","+s+")"+(r.scale<1?"scale("+r.scale+")":"")+(r.rotate?"rotate("+r.rotate+")":"")+"translate("+-(i.left+i.right)/2+","+-(i.top+i.bottom)/2+")")})}),v&&o(l,g),s.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=c.select(this),r=e.select("g.slicetext text");r.attr("transform","translate("+t.labelExtraX+","+t.labelExtraY+")"+r.attr("transform"));var n=t.cxFinal+t.pxmid[0],i=t.cyFinal+t.pxmid[1],a="M"+n+","+i,o=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var s=t.labelExtraX*t.pxmid[1]/t.pxmid[0],l=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(s)>Math.abs(l)?a+="l"+l*t.pxmid[0]/t.pxmid[1]+","+l+"H"+(n+t.labelExtraX+o):a+="l"+t.labelExtraX+","+s+"v"+(l-s)+"h"+o}else a+="V"+(t.yLabelMid+t.labelExtraY)+"h"+o;e.append("path").classed("textline",!0).call(f.stroke,g.outsidetextfont.color).attr({"stroke-width":Math.min(2,g.outsidetextfont.size/8),d:a,fill:"none"})}})})}),setTimeout(function(){u.selectAll("tspan").each(function(){var t=c.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)}},{"../../components/color":578,"../../components/drawing":602,"../../lib/svg_text_utils":704,"../../plots/cartesian/graph_interact":733,"./helpers":964,d3:107}],969:[function(t,e,r){"use strict";var n=t("d3"),i=t("./style_one");e.exports=function(t){t._fullLayout._pielayer.selectAll(".trace").each(function(t){var e=t[0],r=e.trace,a=n.select(this);a.style({opacity:r.opacity}),a.selectAll(".top path.surface").each(function(t){n.select(this).call(i,t,r)})})}},{"./style_one":970,d3:107}],970:[function(t,e,r){"use strict";var n=t("../../components/color");e.exports=function(t,e,r){var i=r.marker.line.color;Array.isArray(i)&&(i=i[e.i]||n.defaultLine);var a=r.marker.line.width||0;Array.isArray(a)&&(a=a[e.i]||0),t.style({"stroke-width":a}).call(n.fill,e.color).call(n.stroke,i)}},{"../../components/color":578}],971:[function(t,e,r){"use strict";var n=t("../scattergl/attributes");e.exports={x:n.x,y:n.y,xy:{valType:"data_array"},indices:{valType:"data_array"},xbounds:{valType:"data_array"},ybounds:{valType:"data_array"},text:n.text,marker:{color:{valType:"color",arrayOk:!1},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1},blend:{valType:"boolean",dflt:null},sizemin:{valType:"number",min:.1,max:2,dflt:.5},sizemax:{valType:"number",min:.1,dflt:20},border:{color:{valType:"color",arrayOk:!1},arearatio:{valType:"number",min:0,max:1,dflt:0}}}}},{"../scattergl/attributes":1020}],972:[function(t,e,r){"use strict";function n(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=a(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}function i(t,e){var r=new n(t,e.uid);return r.update(e),r}var a=t("gl-pointcloud2d"),o=t("../../lib/str2rgbarray"),s=t("../scatter/get_trace_color"),l=["xaxis","yaxis"],u=n.prototype;u.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},u.update=function(t){this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=s(t,{})},u.updateFast=function(t){var e,r,n,i,a,s,l=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,c=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,f=t.indices,d=this.bounds;if(c){if(n=c,e=c.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(s=0;sd[2]&&(d[2]=i),ad[3]&&(d[3]=a);if(f)r=f;else for(r=new Int32Array(e),s=0;sd[2]&&(d[2]=i),ad[3]&&(d[3]=a);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var p=o(t.marker.color),m=o(t.marker.border.color),g=t.opacity*t.marker.opacity;p[3]*=g,this.pointcloudOptions.color=p;var v=t.marker.blend;if(null===v){v=l.length<100||u.length<100}this.pointcloudOptions.blend=v,m[3]*=g,this.pointcloudOptions.borderColor=m;var y=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=y,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions),this.expandAxesFast(d,b/2)},u.expandAxesFast=function(t,e){for(var r,n,i,a=e||.5,o=0;o<2;o++)r=this.scene[l[o]],n=r._min,n||(n=[]),n.push({val:t[o],pad:a}),i=r._max,i||(i=[]),i.push({val:t[o+2],pad:a})},u.dispose=function(){this.pointcloud.dispose()},e.exports=i},{"../../lib/str2rgbarray":703,"../scatter/get_trace_color":984,"gl-pointcloud2d":214}],973:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a("text"),a("marker.color",r),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",r),a("marker.border.arearatio")}},{"../../lib":685,"./attributes":971}],974:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.calc=t("../scatter3d/calc"),n.plot=t("./convert"),n.moduleType="trace",n.name="pointcloud",n.basePlotModule=t("../../plots/gl2d"),n.categories=["gl2d","showLegend"],n.meta={},e.exports=n},{"../../plots/gl2d":764,"../scatter3d/calc":1e3,"./attributes":971,"./convert":972,"./defaults":973}],975:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){n.mergeArray(e.text,t,"tx"),n.mergeArray(e.hovertext,t,"htx"),n.mergeArray(e.customdata,t,"data"),n.mergeArray(e.textposition,t,"tp"),e.textfont&&(n.mergeArray(e.textfont.size,t,"ts"),n.mergeArray(e.textfont.color,t,"tc"),n.mergeArray(e.textfont.family,t,"tf"));var r=e.marker;if(r){n.mergeArray(r.size,t,"ms"),n.mergeArray(r.opacity,t,"mo"),n.mergeArray(r.symbol,t,"mx"),n.mergeArray(r.color,t,"mc");var i=r.line;r.line&&(n.mergeArray(i.color,t,"mlc"),n.mergeArray(i.width,t,"mlw"))}}},{"../../lib":685}],976:[function(t,e,r){"use strict";var n=t("../../components/colorscale/color_attributes"),i=t("../../components/errorbars/attributes"),a=t("../../components/colorbar/attributes"),o=t("../../components/drawing/attributes").dash,s=t("../../components/drawing"),l=(t("./constants"),t("../../lib/extend").extendFlat);e.exports={x:{valType:"data_array"},x0:{valType:"any",dflt:0},dx:{valType:"number",dflt:1},y:{valType:"data_array"},y0:{valType:"any",dflt:0},customdata:{valType:"data_array"},dy:{valType:"number",dflt:1},ids:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},hoveron:{valType:"flaglist",flags:["points","fills"]},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear"},smoothing:{valType:"number",min:0,max:1.3,dflt:1},dash:o,simplify:{valType:"boolean",dflt:!0}},connectgaps:{valType:"boolean",dflt:!1},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],dflt:"none"},fillcolor:{valType:"color"},marker:l({},{symbol:{valType:"enumerated",values:s.symbolList,dflt:"circle",arrayOk:!0},opacity:{valType:"number",min:0,max:1,arrayOk:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0},maxdisplayed:{valType:"number",min:0,dflt:0},sizeref:{valType:"number",dflt:1},sizemin:{valType:"number",min:0,dflt:0},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter"},showscale:{valType:"boolean",dflt:!1},colorbar:a,line:l({},{width:{valType:"number",min:0,arrayOk:!0}},n("marker.line"))},n("marker")),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0},textfont:{family:{valType:"string",noBlank:!0,strict:!0,arrayOk:!0},size:{valType:"number",min:1,arrayOk:!0},color:{valType:"color",arrayOk:!0}},r:{valType:"data_array"},t:{valType:"data_array"},error_y:i,error_x:i}},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/drawing":602,"../../components/drawing/attributes":601,"../../components/errorbars/attributes":604,"../../lib/extend":677,"./constants":981}],977:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("./subtypes"),o=t("./colorscale_calc"),s=t("./arrays_to_calcdata");e.exports=function(t,e){var r,l,u,c=i.getFromId(t,e.xaxis||"x"),h=i.getFromId(t,e.yaxis||"y"),f=c.makeCalcdata(e,"x"),d=h.makeCalcdata(e,"y"),p=Math.min(f.length,d.length);c._minDtick=0,h._minDtick=0,f.length>p&&f.splice(p,f.length-p),d.length>p&&d.splice(p,d.length-p);var m={padded:!0},g={padded:!0};if(a.hasMarkers(e)){if(r=e.marker,l=r.size,Array.isArray(l)){var v={type:"linear"};i.setConvert(v),l=v.makeCalcdata(e.marker,"size"),l.length>p&&l.splice(p,l.length-p)}var y,b=1.6*(e.marker.sizeref||1);y="area"===e.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/b),3)}:function(t){return Math.max((t||0)/b,3)},m.ppad=g.ppad=Array.isArray(l)?l.map(y):y(l)}o(e),!("tozerox"===e.fill||"tonextx"===e.fill&&t.firstscatter)||f[0]===f[p-1]&&d[0]===d[p-1]?e.error_y.visible||["tonexty","tozeroy"].indexOf(e.fill)===-1&&(a.hasMarkers(e)||a.hasText(e))||(m.padded=!1,m.ppad=0):m.tozero=!0,!("tozeroy"===e.fill||"tonexty"===e.fill&&t.firstscatter)||f[0]===f[p-1]&&d[0]===d[p-1]?["tonextx","tozerox"].indexOf(e.fill)!==-1&&(g.padded=!1):g.tozero=!0,i.expand(c,f,m),i.expand(h,d,g);var x=new Array(p);for(u=0;u=0;i--){var a=t[i];if("scatter"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],979:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../components/colorscale"),s=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,l=r.marker,u="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===l||!l.showscale)return void a.autoMargin(t,u);var c=l.color,h=l.cmin,f=l.cmax;n(h)||(h=i.aggNums(Math.min,null,c)),n(f)||(f=i.aggNums(Math.max,null,c));var d=e[0].t.cb=s(t,u),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,h,f),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:h,end:f,size:(f-h)/254}).options(l.colorbar)()}},{"../../components/colorbar/draw":581,"../../components/colorscale":592,"../../lib":685,"../../plots/plots":787,"fast-isnumeric":116}],980:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/calc"),a=t("./subtypes");e.exports=function(t){a.hasLines(t)&&n(t,"line")&&i(t,t.line.color,"line","c"),a.hasMarkers(t)&&(n(t,"marker")&&i(t,t.marker.color,"marker","c"),n(t,"marker.line")&&i(t,t.marker.line.color,"marker.line","c"))}},{"../../components/colorscale/calc":584,"../../components/colorscale/has_colorscale":591,"./subtypes":996}],981:[function(t,e,r){"use strict";e.exports={PTS_LINESONLY:20}},{}],982:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("./constants"),o=t("./subtypes"),s=t("./xy_defaults"),l=t("./marker_defaults"),u=t("./line_defaults"),c=t("./line_shape_defaults"),h=t("./text_defaults"),f=t("./fillcolor_defaults"),d=t("../../components/errorbars/defaults");e.exports=function(t,e,r,p){function m(r,a){return n.coerce(t,e,i,r,a)}var g=s(t,e,p,m),v=gU!=I>=U&&(C=E[T-1][0],z=E[T][0],L=C+(z-C)*(U-D)/(I-D),R=Math.min(R,L),F=Math.max(F,L));R=Math.max(R,0),F=Math.min(F,f._length);var V=l.defaultLine;return l.opacity(h.fillcolor)?V=h.fillcolor:l.opacity((h.line||{}).color)&&(V=h.line.color),n.extendFlat(t,{distance:a.MAXDIST+10,x0:R,x1:F,y0:U,y1:U,color:V}),delete t.index,h.text&&!Array.isArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}}},{"../../components/color":578,"../../components/errorbars":608,"../../lib":685,"../../plots/cartesian/constants":729,"../../plots/cartesian/graph_interact":733,"./get_trace_color":984}],986:[function(t,e,r){"use strict";var n={},i=t("./subtypes");n.hasLines=i.hasLines,n.hasMarkers=i.hasMarkers,n.hasText=i.hasText,n.isBubble=i.isBubble,n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.cleanData=t("./clean_data"),n.calc=t("./calc"),n.arraysToCalcdata=t("./arrays_to_calcdata"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.animatable=!0,n.moduleType="trace",n.name="scatter",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","symbols","markerColorscale","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":734,"./arrays_to_calcdata":975,"./attributes":976,"./calc":977,"./clean_data":978,"./colorbar":979,"./defaults":982,"./hover":985,"./plot":993,"./select":994,"./style":995,"./subtypes":996}],987:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,a,o,s){var l=(t.marker||{}).color;if(o("line.color",r),n(t,"line"))i(t,e,a,o,{prefix:"line.",cLetter:"c"});else{o("line.color",!Array.isArray(l)&&l||r)}o("line.width"),(s||{}).noDash||o("line.dash")}},{"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591}],988:[function(t,e,r){"use strict";var n=t("../../constants/numerical").BADNUM;e.exports=function(t,e){function r(e){var r=_.c2p(t[e].x),i=w.c2p(t[e].y);return r!==n&&i!==n&&[r,i]}function i(t){var e=t[0]/_._length,r=t[1]/w._length;return(1+10*Math.max(0,-e,e-1,-r,r-1))*A}var a,o,s,l,u,c,h,f,d,p,m,g,v,y,b,x,_=e.xaxis,w=e.yaxis,M=e.simplify,k=e.connectGaps,A=e.baseTolerance,T=e.linear,S=[],E=.2,L=new Array(t.length),C=0;for(M||(A=E=-1),a=0;ai(c))break;s=c,v=p[0]*d[0]+p[1]*d[1],v>m?(m=v,l=c,f=!1):v=t.length||!c)break;L[C++]=c,o=c}}else L[C++]=l}S.push(L.slice(0,C))}return S}},{"../../constants/numerical":666}],989:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],990:[function(t,e,r){"use strict";e.exports=function(t,e,r){for(var n,i,a=null,o=0;o0?Math.max(e,i):0}}},{"fast-isnumeric":116}],992:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults"),o=t("./subtypes");e.exports=function(t,e,r,s,l,u){var c,h=o.isBubble(t),f=(t.line||{}).color;f&&(r=f),l("marker.symbol"),l("marker.opacity",h?.7:1),l("marker.size"),l("marker.color",r),i(t,"marker")&&a(t,e,s,l,{prefix:"marker.",cLetter:"c"}),(u||{}).noLine||(c=f&&!Array.isArray(f)&&e.marker.color!==f?f:h?n.background:n.defaultLine,l("marker.line.color",c),i(t,"marker.line")&&a(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",h?1:0)),h&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode"))}},{"../../components/color":578,"../../components/colorscale/defaults":587,"../../components/colorscale/has_colorscale":591,"./subtypes":996}],993:[function(t,e,r){"use strict";function n(t,e){var r;e.selectAll("g.trace").each(function(t){var e=o.select(this);if(r=t[0].trace,r._nexttrace){if(r._nextFill=e.select(".js-fill.js-tonext"),!r._nextFill.size()){var n=":first-child";e.select(".js-fill.js-tozero").size()&&(n+=" + *"),r._nextFill=e.insert("path",n).attr("class","js-fill js-tonext")}}else e.selectAll(".js-fill.js-tonext").remove(),r._nextFill=null;r.fill&&("tozero"===r.fill.substr(0,6)||"toself"===r.fill||"to"===r.fill.substr(0,2)&&!r._prevtrace)?(r._ownFill=e.select(".js-fill.js-tozero"),r._ownFill.size()||(r._ownFill=e.insert("path",":first-child").attr("class","js-fill js-tozero"))):(e.selectAll(".js-fill.js-tozero").remove(),r._ownFill=null)})}function i(t,e,r,n,i,f,p){function m(t){return M?t.transition():t}function g(t){return t.filter(function(t){return t.vis})}function v(t){return t.id}function y(t){if(t.ids)return v}function b(){return!1}function x(t){var e,r,n=t[0].trace,i=o.select(this),a=c.hasMarkers(n),u=c.hasText(n),h=y(n),f=b,d=b;a&&(f=n.marker.maxdisplayed||n._needsCull?g:s.identity),u&&(d=n.marker.maxdisplayed||n._needsCull?g:s.identity),r=i.selectAll("path.point"),e=r.data(f,h);var p=e.enter().append("path").classed("point",!0);p.call(l.pointStyle,n).call(l.translatePoints,k,A,n),M&&p.style("opacity",0).transition().style("opacity",1),e.each(function(t){var e=o.select(this),r=m(e);l.translatePoint(t,r,k,A),l.singlePointStyle(t,r,n),n.customdata&&e.classed("plotly-customdata",null!==t.data&&void 0!==t.data)}),M?e.exit().transition().style("opacity",0).remove():e.exit().remove(),r=i.selectAll("g"),e=r.data(d,h),e.enter().append("g").append("text"),e.each(function(t){var e=m(o.select(this).select("text"));l.translatePoint(t,e,k,A)}),e.selectAll("text").call(l.textPointStyle,n).each(function(t){var e=t.xp||k.c2p(t.x),r=t.yp||A.c2p(t.y);o.select(this).selectAll("tspan.line").each(function(){m(o.select(this)).attr({x:e,y:r})})}),e.exit().remove()}var _,w;a(t,e,r,n,i);var M=!!p&&p.duration>0,k=r.xaxis,A=r.yaxis,T=n[0].trace,S=T.line,E=o.select(f);if(E.call(u.plot,r,p),T.visible===!0){m(E).style("opacity",T.opacity);var L,C,z=T.fill.charAt(T.fill.length-1);"x"!==z&&"y"!==z&&(z=""),n[0].node3=E;var D="",I=[],P=T._prevtrace;P&&(D=P._prevRevpath||"",C=P._nextFill,I=P._polygons);var O,j,R,F,N,B,U,V,H,q="",G="",Y=[],W=[],X=s.noop;if(L=T._ownFill,c.hasLines(T)||"none"!==T.fill){for(C&&C.datum(n),["hv","vh","hvh","vhv"].indexOf(S.shape)!==-1?(R=l.steps(S.shape),F=l.steps(S.shape.split("").reverse().join(""))):R=F="spline"===S.shape?function(t){var e=t[t.length-1];return t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),S.smoothing):l.smoothopen(t,S.smoothing)}:function(t){return"M"+t.join("L")},N=function(t){return F(t.reverse())},Y=h(n,{xaxis:k,yaxis:A,connectGaps:T.connectgaps, -baseTolerance:Math.max(S.width||1,3)/4,linear:"linear"===S.shape,simplify:S.simplify}),H=T._polygons=new Array(Y.length),w=0;w1}),X=function(t){return function(e){if(O=R(e),j=N(e),q?z?(q+="L"+O.substr(1),G=j+"L"+G.substr(1)):(q+="Z"+O,G=j+"Z"+G):(q=O,G=j),c.hasLines(T)&&e.length>1){var r=o.select(this);if(r.datum(n),t)m(r.style("opacity",0).attr("d",O).call(l.lineGroupStyle)).style("opacity",1);else{var i=m(r);i.attr("d",O),l.singleLineStyle(n,i)}}}}}var Z=E.selectAll(".js-line").data(W);m(Z.exit()).style("opacity",0).remove(),Z.each(X(!1)),Z.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(X(!0)),Y.length&&(L?B&&V&&(z?("y"===z?B[1]=V[1]=A.c2p(0,!0):"x"===z&&(B[0]=V[0]=k.c2p(0,!0)),m(L).attr("d","M"+V+"L"+B+"L"+q.substr(1))):m(L).attr("d",q+"Z")):"tonext"===T.fill.substr(0,6)&&q&&D&&("tonext"===T.fill?m(C).attr("d",q+"Z"+D+"Z"):m(C).attr("d",q+"L"+D.substr(1)+"Z"),T._polygons=T._polygons.concat(I)),T._prevRevpath=G,T._prevPolygons=H);var J=E.selectAll(".points");_=J.data([n]),J.each(x),_.enter().append("g").classed("points",!0).each(x),_.exit().remove()}}function a(t,e,r,n,i){var a=r.xaxis,l=r.yaxis,u=o.extent(s.simpleMap(a.range,a.r2c)),h=o.extent(s.simpleMap(l.range,l.r2c)),f=n[0].trace;if(c.hasMarkers(f)){var d=f.marker.maxdisplayed;if(0!==d){var p=n.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=h[0]&&t.y<=h[1]}),m=Math.ceil(p.length/d),g=0;i.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;for(c=p.selectAll("g.trace"),h=c.data(r,function(t){return t[0].trace.uid}),h.enter().append("g").attr("class",function(t){return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),f(t,e,r),n(t,p),l=0,u={};lu[e[0].trace.uid]?1:-1}),g){s&&(d=s());o.transition().duration(a.duration).ease(a.easing).each("end",function(){d&&d()}).each("interrupt",function(){d&&d()}).each(function(){p.selectAll("g.trace").each(function(n,o){i(t,o,e,n,r,this,a)})})}else p.selectAll("g.trace").each(function(n,o){i(t,o,e,n,r,this,a)});m&&h.exit().remove(),p.selectAll("path:not([d])").remove()}},{"../../components/drawing":602,"../../components/errorbars":608,"../../lib":685,"../../lib/polygon":695,"./line_points":988,"./link_traces":990,"./subtypes":996,d3:107}],994:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[],h=s[0].trace,f=h.index,d=h.marker,p=!n.hasMarkers(h)&&!n.hasText(h);if(h.visible===!0&&!p){var m=Array.isArray(d.opacity)?1:d.opacity;if(e===!1)for(r=0;r=0&&(e[1]+=1),t.indexOf("top")>=0&&(e[1]-=1),t.indexOf("left")>=0&&(e[0]-=1),t.indexOf("right")>=0&&(e[0]+=1),e)}function s(t,e){return e(4*t)}function l(t){return M[t]}function u(t,e,r,n,i){var a=null;if(Array.isArray(t)){a=[];for(var o=0;o=0){var f=i(l.position,l.delaunayColor,l.delaunayAxis);f.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(f):(f.gl=o,this.delaunayMesh=g(f),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},A.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},e.exports=f},{"../../constants/gl3d_dashes":663,"../../constants/gl_markers":664,"../../lib":685,"../../lib/gl_format_color":682,"../../lib/str2rgbarray":703,"../scatter/make_bubble_size_func":991,"./calc_errors":1001,"delaunay-triangulate":108,"gl-error3d":146,"gl-line3d":156,"gl-mesh3d":189,"gl-scatter3d":235}],1003:[function(t,e,r){"use strict";function n(t,e,r,n){var a=0,o=r("x"),s=r("y"),l=r("z");return i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),o&&s&&l&&(a=Math.min(o.length,s.length,l.length),a=0&&f("surfacecolor",d||p);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];f(v+".show")&&(f(v+".opacity"),f(v+".scale"))}c(t,e,r,{axis:"z"}),c(t,e,r,{axis:"y",inherit:"z"}),c(t,e,r,{axis:"x",inherit:"z"})}},{"../../components/errorbars/defaults":607,"../../lib":685,"../../registry":802,"../scatter/line_defaults":987,"../scatter/marker_defaults":992,"../scatter/subtypes":996,"../scatter/text_defaults":997,"./attributes":999}],1004:[function(t,e,r){"use strict";var n={};n.plot=t("./convert"),n.attributes=t("./attributes"),n.markerSymbols=t("../../constants/gl_markers"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.moduleType="trace",n.name="scatter3d",n.basePlotModule=t("../../plots/gl3d"),n.categories=["gl3d","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../constants/gl_markers":664,"../../plots/gl3d":767,"../scatter/colorbar":979,"./attributes":999,"./calc":1e3,"./convert":1002,"./defaults":1003}],1005:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/colorscale/color_attributes"),o=t("../../components/colorbar/attributes"),s=t("../../lib/extend").extendFlat,l=n.marker,u=n.line,c=l.line;e.exports={carpet:{valType:"string"},a:{valType:"data_array"},b:{valType:"data_array"},sum:{valType:"number",dflt:0,min:0},mode:s({},n.mode,{dflt:"markers"}),text:s({},n.text,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:s({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing},connectgaps:n.connectgaps,fill:s({},n.fill,{values:["none","toself","tonext"]}),fillcolor:n.fillcolor,marker:s({},{symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:s({},{width:c.width},a("marker".line))},a("marker"),{showscale:l.showscale,colorbar:o}),textfont:n.textfont,textposition:n.textposition,hoverinfo:s({},i.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:n.hoveron}},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1006:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("../../lib"),o=t("../scatter/subtypes"),s=t("../scatter/colorscale_calc"),l=t("../carpet/lookup_carpetid");e.exports=function(t,e){var r=e.carpetTrace=l(t,e);if(r&&r.visible&&"legendonly"!==r.visible){var u;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var c,h,f=e.a.length,d=new Array(f),p=!1;for(u=0;uf&&y.splice(f,y.length-f)}return s(e),void 0!==y&&a.mergeArray(y,d,"ms"),d}}},{"../../lib":685,"../../plots/cartesian/axes":724,"../carpet/lookup_carpetid":858,"../scatter/colorscale_calc":980,"../scatter/subtypes":996,"fast-isnumeric":116}],1007:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../scatter/constants"),a=t("../scatter/subtypes"),o=t("../scatter/marker_defaults"),s=t("../scatter/line_defaults"),l=t("../scatter/line_shape_defaults"),u=t("../scatter/text_defaults"),c=t("../scatter/fillcolor_defaults"),h=t("./attributes");e.exports=function(t,e,r,f){function d(r,i){return n.coerce(t,e,h,r,i)}d("carpet"),e.xaxis="x",e.yaxis="y";var p,m=d("a"),g=d("b");if(!(p=Math.min(m.length,g.length)))return void(e.visible=!1);m&&p0?t.labelprefix:t._hovertitle+": ")+e.toFixed(3)+t.labelsuffix)}var o=n(t,e,r,i);if(o&&o[0].index!==!1){var s=o[0];if(void 0===s.index){var l=1-s.y0/t.ya._length,u=t.xa._length,c=u*l/2,h=u-c;return s.x0=Math.max(Math.min(s.x0,h),c),s.x1=Math.max(Math.min(s.x1,h),c),o}var f=s.cd[s.index];s.a=f.a,s.b=f.b,s.xLabelVal=void 0,s.yLabelVal=void 0;var d=s.trace,p=d._carpet,m=d.hoverinfo.split("+"),g=[];m.indexOf("all")!==-1&&(m=["a","b"]),m.indexOf("a")!==-1&&a(p.aaxis,f.a),m.indexOf("b")!==-1&&a(p.baxis,f.b);var v=p.ab2ij([f.a,f.b]),y=Math.floor(v[0]),b=v[0]-y,x=Math.floor(v[1]),_=v[1]-x,w=p.evalxy([],y,x,b,_);return g.push("y: "+w[1].toFixed(3)),s.extraText=g.join("
"),o}}},{"../scatter/hover":985}],1009:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.moduleType="trace",n.name="scattercarpet",n.basePlotModule=t("../../plots/cartesian"),n.categories=["carpet","symbols","markerColorscale","showLegend","carpetDependent"],n.meta={},e.exports=n},{"../../plots/cartesian":734,"../scatter/colorbar":979,"./attributes":1005,"./calc":1006,"./defaults":1007,"./hover":1008,"./plot":1010,"./select":1011,"./style":1012}],1010:[function(t,e,r){"use strict";var n=t("../scatter/plot"),i=t("../../plots/cartesian/axes");e.exports=function(t,e,r){var a,o,s,l=r[0][0].carpet,u={xaxis:i.getFromId(t,l.xaxis||"x"),yaxis:i.getFromId(t,l.yaxis||"y"),plot:e.plot};for(n(u.graphDiv,u,r),a=0;a")}var i=t("../../plots/cartesian/graph_interact"),a=t("../../plots/cartesian/axes"),o=t("../../constants/numerical").BADNUM,s=t("../scatter/get_trace_color"),l=t("./attributes");e.exports=function(t){function e(t){return h.projection(t)}function r(t){var r=t.lonlat;if(r[0]===o)return 1/0;if(h.isLonLatOverEdges(r))return 1/0;var n=e(r),i=u.c2p(),a=c.c2p(),s=Math.abs(i-n[0]),l=Math.abs(a-n[1]),f=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-f,1-3/f)}var a=t.cd,l=a[0].trace,u=t.xa,c=t.ya,h=t.subplot;if(i.getClosest(a,r,t),t.index!==!1){var f=a[t.index],d=f.lonlat,p=e(d),m=f.mrc||1;return t.x0=p[0]-m,t.x1=p[0]+m,t.y0=p[1]-m,t.y1=p[1]+m,t.loc=f.loc,t.lat=d[0],t.lon=d[1],t.color=s(l,f),t.extraText=n(l,f,h.mockAxis),[t]}}},{"../../constants/numerical":666,"../../plots/cartesian/axes":724,"../../plots/cartesian/graph_interact":733,"../scatter/get_trace_color":984,"./attributes":1013}],1018:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="scattergeo",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/geo":752,"../scatter/colorbar":979,"./attributes":1013,"./calc":1014,"./defaults":1015,"./event_data":1016,"./hover":1017,"./plot":1019}],1019:[function(t,e,r){"use strict";function n(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=c(r,e),i=r.locationmode,a=0;a=e.length?i:e[a]);return n}function o(t,e,r){return l(z(t,r),C(e,r),r)}function s(t,e,r,n){var i=w(t,e,n);return i=Array.isArray(i[0])?i:a(g.identity,[i],n),l(i,C(r,n),n)}function l(t,e,r){for(var n=new Array(4*r),i=0;i")}var i=t("../../plots/cartesian/graph_interact"),a=t("../scatter/get_trace_color"),o=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r){function s(t){var e=t.lonlat;if(e[0]===o)return 1/0;var n=Math.abs(c.c2p(e)-c.c2p([p,e[1]])),i=Math.abs(h.c2p(e)-h.c2p([e[0],r])),a=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(n*n+i*i)-a,1-3/a)}var l=t.cd,u=l[0].trace,c=t.xa,h=t.ya,f=e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360),d=360*f,p=e-d;if(i.getClosest(l,s,t),t.index!==!1){var m=l[t.index],g=m.lonlat,v=[g[0]+d,g[1]],y=c.c2p(v),b=h.c2p(v),x=m.mrc||1;return t.x0=y-x,t.x1=y+x,t.y0=b-x,t.y1=b+x,t.color=a(u,m),t.extraText=n(u,m),[t]}}},{"../../constants/numerical":666,"../../plots/cartesian/graph_interact":733,"../scatter/get_trace_color":984}],1029:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("../scattergeo/calc"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.plot=t("./plot"),n.moduleType="trace",n.name="scattermapbox",n.basePlotModule=t("../../plots/mapbox"),n.categories=["mapbox","gl","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/mapbox":781,"../scatter/colorbar":979,"../scattergeo/calc":1014,"./attributes":1024,"./defaults":1026,"./event_data":1027,"./hover":1028,"./plot":1030}],1030:[function(t,e,r){"use strict";function n(t,e){this.mapbox=t,this.map=t.map,this.uid=e,this.idSourceFill=e+"-source-fill",this.idSourceLine=e+"-source-line",this.idSourceCircle=e+"-source-circle",this.idSourceSymbol=e+"-source-symbol",this.idLayerFill=e+"-layer-fill",this.idLayerLine=e+"-layer-line",this.idLayerCircle=e+"-layer-circle",this.idLayerSymbol=e+"-layer-symbol",this.mapbox.initSource(this.idSourceFill),this.mapbox.initSource(this.idSourceLine),this.mapbox.initSource(this.idSourceCircle),this.mapbox.initSource(this.idSourceSymbol),this.map.addLayer({id:this.idLayerFill,source:this.idSourceFill,type:"fill"}),this.map.addLayer({id:this.idLayerLine,source:this.idSourceLine,type:"line"}),this.map.addLayer({id:this.idLayerCircle,source:this.idSourceCircle,type:"circle"}),this.map.addLayer({id:this.idLayerSymbol,source:this.idSourceSymbol,type:"symbol"})}function i(t){return"visible"===t.layout.visibility}var a=t("./convert"),o=n.prototype;o.update=function(t){var e=this.mapbox,r=a(t);e.setOptions(this.idLayerFill,"setLayoutProperty",r.fill.layout),e.setOptions(this.idLayerLine,"setLayoutProperty",r.line.layout),e.setOptions(this.idLayerCircle,"setLayoutProperty",r.circle.layout),e.setOptions(this.idLayerSymbol,"setLayoutProperty",r.symbol.layout),i(r.fill)&&(e.setSourceData(this.idSourceFill,r.fill.geojson),e.setOptions(this.idLayerFill,"setPaintProperty",r.fill.paint)),i(r.line)&&(e.setSourceData(this.idSourceLine,r.line.geojson),e.setOptions(this.idLayerLine,"setPaintProperty",r.line.paint)),i(r.circle)&&(e.setSourceData(this.idSourceCircle,r.circle.geojson),e.setOptions(this.idLayerCircle,"setPaintProperty",r.circle.paint)),i(r.symbol)&&(e.setSourceData(this.idSourceSymbol,r.symbol.geojson),e.setOptions(this.idLayerSymbol,"setPaintProperty",r.symbol.paint))},o.dispose=function(){var t=this.map;t.removeLayer(this.idLayerFill),t.removeLayer(this.idLayerLine),t.removeLayer(this.idLayerCircle),t.removeLayer(this.idLayerSymbol),t.removeSource(this.idSourceFill),t.removeSource(this.idSourceLine),t.removeSource(this.idSourceCircle),t.removeSource(this.idSourceSymbol)},e.exports=function(t,e){var r=e[0].trace,i=new n(t,r.uid);return i.update(e),i}},{"./convert":1025}],1031:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/colorscale/color_attributes"),o=t("../../components/colorbar/attributes"),s=t("../../components/drawing/attributes").dash,l=t("../../lib/extend").extendFlat,u=n.marker,c=n.line,h=u.line;e.exports={a:{valType:"data_array"},b:{valType:"data_array"},c:{valType:"data_array"},sum:{valType:"number",dflt:0,min:0},mode:l({},n.mode,{dflt:"markers"}),text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),line:{color:c.color,width:c.width,dash:s,shape:l({},c.shape,{values:["linear","spline"]}),smoothing:c.smoothing},connectgaps:n.connectgaps,fill:l({},n.fill,{values:["none","toself","tonext"]}),fillcolor:n.fillcolor,marker:l({},{symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:l({},{width:h.width},a("marker".line))},a("marker"),{showscale:u.showscale,colorbar:o}),textfont:n.textfont,textposition:n.textposition,hoverinfo:l({},i.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:n.hoveron}},{"../../components/colorbar/attributes":579,"../../components/colorscale/color_attributes":585,"../../components/drawing/attributes":601,"../../lib/extend":677,"../../plots/attributes":722,"../scatter/attributes":976}],1032:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("../scatter/subtypes"),o=t("../scatter/colorscale_calc"),s=t("../scatter/arrays_to_calcdata"),l=["a","b","c"],u={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,c,h,f,d,p,m=t._fullLayout[e.subplot],g=m.sum,v=e.sum||g;for(r=0;rk&&S.splice(k,S.length-k)}return o(e),s(A,e),A}},{"../../plots/cartesian/axes":724,"../scatter/arrays_to_calcdata":975,"../scatter/colorscale_calc":980,"../scatter/subtypes":996,"fast-isnumeric":116}],1033:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../scatter/constants"),a=t("../scatter/subtypes"),o=t("../scatter/marker_defaults"),s=t("../scatter/line_defaults"),l=t("../scatter/line_shape_defaults"),u=t("../scatter/text_defaults"),c=t("../scatter/fillcolor_defaults"),h=t("./attributes");e.exports=function(t,e,r,f){function d(r,i){return n.coerce(t,e,h,r,i)}var p,m=d("a"),g=d("b"),v=d("c");if(m?(p=m.length,g?(p=Math.min(p,g.length),v&&(p=Math.min(p,v.length))):p=v?Math.min(p,v.length):0):g&&v&&(p=Math.min(g.length,v.length)),!p)return void(e.visible=!1);m&&p"),s}}},{"../../plots/cartesian/axes":724,"../scatter/hover":985}],1035:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.moduleType="trace",n.name="scatterternary",n.basePlotModule=t("../../plots/ternary"),n.categories=["ternary","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/ternary":795,"../scatter/colorbar":979,"./attributes":1031,"./calc":1032,"./defaults":1033,"./hover":1034,"./plot":1036,"./select":1037,"./style":1038}],1036:[function(t,e,r){"use strict";var n=t("../scatter/plot");e.exports=function(t,e){var r=t.plotContainer;r.select(".scatterlayer").selectAll("*").remove();for(var i={xaxis:t.xaxis,yaxis:t.yaxis,plot:r},a=0;a":return function(t){return u(t)>i};case">=":return function(t){return u(t)>=i};case"[]":return function(t){var e=u(t);return e>=i[0]&&e<=i[1]};case"()":return function(t){var e=u(t);return e>i[0]&&e=i[0]&&ei[0]&&e<=i[1]};case"][":return function(t){var e=u(t);return e<=i[0]||e>=i[1]};case")(":return function(t){var e=u(t);return ei[1]};case"](":return function(t){var e=u(t);return e<=i[0]||e>i[1]};case")[":return function(t){var e=u(t);return e=i[1]};case"{}":return function(t){return i.indexOf(u(t))!==-1};case"}{":return function(t){return i.indexOf(u(t))===-1}}}var o=t("../lib"),s=t("../registry"),l=t("../plot_api/plot_schema"),u=t("../plots/cartesian/axis_ids"),c=t("../plots/cartesian/axis_autotype"),h=t("../plots/cartesian/set_convert"),f=["=","<",">=",">","<="],d=["[]","()","[)","(]","][",")(","](",")["],p=["{}","}{"];r.moduleType="transform",r.name="filter",r.attributes={enabled:{valType:"boolean",dflt:!0},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x"},operation:{valType:"enumerated",values:[].concat(f).concat(d).concat(p),dflt:"="},value:{valType:"any",dflt:0}},r.supplyDefaults=function(t){function e(e,i){return o.coerce(t,n,r.attributes,e,i)}var n={};if(e("enabled")){e("operation"),e("value"),e("target");var i=s.getComponentMethod("calendars","handleDefaults");i(t,n,"valuecalendar",null),i(t,n,"targetcalendar",null)}return n},r.calcTransform=function(t,e,r){if(r.enabled){var s=r.target,u=n(e,s),c=u.length;if(c){var h=r.targetcalendar;if("string"==typeof s){var f=o.nestedProperty(e,s+"calendar").get();f&&(h=f)}for(var d="x"===s||"y"===s||"z"===s?s:u,p=i(t,e,d),m=a(r,p,h),g=l.findArrayAttributes(e),v={},y=0;yMath.abs(e))u.rotate(o,0,0,-t*n*Math.PI*p.rotateSpeed/window.innerWidth);else{var s=p.zoomSpeed*a*e/window.innerHeight*(o-u.lastT())/100;u.pan(o,0,0,h*(Math.exp(s)-1))}},!0),p}e.exports=n;var i=t("right-now"),a=t("3d-view"),o=t("mouse-change"),s=t("mouse-wheel"),l=t("mouse-event-offset")},{"3d-view":30,"mouse-change":431,"mouse-event-offset":432,"mouse-wheel":434,"right-now":480}],30:[function(t,e,r){"use strict";function n(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}function i(t){t=t||{};var e=t.eye||[0,0,1],r=t.center||[0,0,0],i=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],u=t.mode||"turntable",c=a(),h=o(),f=s();return c.setDistanceLimits(l[0],l[1]),c.lookAt(0,e,r,i),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,i),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,i),new n({turntable:c,orbit:h,matrix:f},u)}e.exports=i;var a=t("turntable-camera-controller"),o=t("orbit-camera-controller"),s=t("matrix-camera-controller"),l=n.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n>16&255,r[1]=n>>8&255,r[2]=255&n):h.test(t)&&(n=t.match(f),r[0]=parseInt(n[1]),r[1]=parseInt(n[2]),r[2]=parseInt(n[3])),!e)for(var i=0;i<3;++i)r[i]=r[i]/255;return r}function u(t,e){var r,n;if("string"!=typeof t)return t;if(r=[],"#"===t[0]?(t=t.substr(1),3===t.length&&(t+=t),n=parseInt(t,16),r[0]=n>>16&255,r[1]=n>>8&255,r[2]=255&n):h.test(t)&&(n=t.match(f),r[0]=parseInt(n[1]),r[1]=parseInt(n[2]),r[2]=parseInt(n[3]),n[4]?r[3]=parseFloat(n[4]):r[3]=1),!e)for(var i=0;i<3;++i)r[i]=r[i]/255;return r}var c={},h=/^rgba?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*(,.*)?\)$/,f=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(.*)?\)$/;return c.isPlainObject=t,c.linspace=e,c.zip3=n,c.sum=i,c.zip=r,c.isEqual=s,c.copy2D=a,c.copy1D=o,c.str2RgbArray=l,c.str2RgbaArray=u,c}()},{}],37:[function(t,e,r){(function(r){"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i=0;s--)if(l[s]!==u[s])return!1;for(s=l.length-1;s>=0;s--)if(o=l[s],!d(t[o],e[o],r,n))return!1;return!0}function g(t,e,r){d(t,e,!0)&&h(t,e,r,"notDeepStrictEqual",g)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&e.call({},t)===!0}function y(t){var e;try{t()}catch(t){e=t}return e}function b(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=y(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&h(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!t&&x.isError(i),s=!t&&i&&!r;if((o&&a&&v(i,r)||s)&&h(i,r,"Got unwanted exception"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}var x=t("util/"),_=Object.prototype.hasOwnProperty,w=Array.prototype.slice,M=function(){return"foo"===function(){}.name}(),A=e.exports=f,k=/\s*function\s+([^\(\s]*)\s*/;A.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var e=t.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=s(e),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},x.inherits(A.AssertionError,Error),A.fail=h,A.ok=f,A.equal=function(t,e,r){t!=e&&h(t,e,r,"==",A.equal)},A.notEqual=function(t,e,r){t==e&&h(t,e,r,"!=",A.notEqual)},A.deepEqual=function(t,e,r){d(t,e,!1)||h(t,e,r,"deepEqual",A.deepEqual)},A.deepStrictEqual=function(t,e,r){d(t,e,!0)||h(t,e,r,"deepStrictEqual",A.deepStrictEqual)},A.notDeepEqual=function(t,e,r){d(t,e,!1)&&h(t,e,r,"notDeepEqual",A.notDeepEqual)},A.notDeepStrictEqual=g,A.strictEqual=function(t,e,r){t!==e&&h(t,e,r,"===",A.strictEqual)},A.notStrictEqual=function(t,e,r){t===e&&h(t,e,r,"!==",A.notStrictEqual)},A.throws=function(t,e,r){b(!0,t,e,r)},A.doesNotThrow=function(t,e,r){b(!1,t,e,r)},A.ifError=function(t){if(t)throw t};var T=Object.keys||function(t){var e=[];for(var r in t)_.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":526}],38:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],39:[function(t,e,r){"use strict";function n(t){for(var e=0,r=0;r0?r=r.ushln(h):h<0&&(c=c.ushln(-h)),l(r,c)}var i=t("./is-rat"),a=t("./lib/is-bn"),o=t("./lib/num-to-bn"),s=t("./lib/str-to-bn"),l=t("./lib/rationalize"),u=t("./div");e.exports=n},{"./div":42,"./is-rat":44,"./lib/is-bn":48,"./lib/num-to-bn":49,"./lib/rationalize":50,"./lib/str-to-bn":51}],44:[function(t,e,r){"use strict";function n(t){return Array.isArray(t)&&2===t.length&&i(t[0])&&i(t[1])}var i=t("./lib/is-bn");e.exports=n},{"./lib/is-bn":48}],45:[function(t,e,r){"use strict";function n(t){return t.cmp(new i(0))}var i=t("bn.js");e.exports=n},{"bn.js":58}],46:[function(t,e,r){"use strict";function n(t){var e=t.length,r=t.words,n=0;if(1===e)n=r[0];else if(2===e)n=r[0]+67108864*r[1];else for(var a=0;a20?52:r+32}var i=t("double-bits"),a=t("bit-twiddle").countTrailingZeros;e.exports=n},{"bit-twiddle":57,"double-bits":106}],48:[function(t,e,r){"use strict";function n(t){return t&&"object"==typeof t&&Boolean(t.words)}t("bn.js");e.exports=n},{"bn.js":58}],49:[function(t,e,r){"use strict";function n(t){var e=a.exponent(t);return e<52?new i(t):new i(t*Math.pow(2,52-e)).ushln(e-52)}var i=t("bn.js"),a=t("double-bits");e.exports=n},{"bn.js":58,"double-bits":106}],50:[function(t,e,r){"use strict";function n(t,e){var r=a(t),n=a(e);if(0===r)return[i(0),i(1)];if(0===n)return[i(0),i(0)];n<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]} +var i=t("./num-to-bn"),a=t("./bn-sign");e.exports=n},{"./bn-sign":45,"./num-to-bn":49}],51:[function(t,e,r){"use strict";function n(t){return new i(t)}var i=t("bn.js");e.exports=n},{"bn.js":58}],52:[function(t,e,r){"use strict";function n(t,e){return i(t[0].mul(e[0]),t[1].mul(e[1]))}var i=t("./lib/rationalize");e.exports=n},{"./lib/rationalize":50}],53:[function(t,e,r){"use strict";function n(t){return i(t[0])*i(t[1])}var i=t("./lib/bn-sign");e.exports=n},{"./lib/bn-sign":45}],54:[function(t,e,r){"use strict";function n(t,e){return i(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}var i=t("./lib/rationalize");e.exports=n},{"./lib/rationalize":50}],55:[function(t,e,r){"use strict";function n(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var n=e.abs().divmod(r.abs()),o=n.div,s=i(o),l=n.mod,u=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return u*s;if(s){var c=a(s)+4,h=i(l.ushln(c).divRound(r));return u*(s+h*Math.pow(2,-c))}var f=r.bitLength()-l.bitLength()+53,h=i(l.ushln(f).divRound(r));return f<1023?u*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),u*h*Math.pow(2,1023-f))}var i=t("./lib/bn-to-num"),a=t("./lib/ctz");e.exports=n},{"./lib/bn-to-num":46,"./lib/ctz":47}],56:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=["function ",t,"(a,l,h,",n.join(","),"){",a?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return a?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),a?o.push("return -1};"):o.push("return i};"),o.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],!1,i),n("B","x"+t+"y",e,["y"],!0,i),n("P","c(x,y)"+t+"0",e,["y","c"],!1,i),n("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],57:[function(t,e,r){"use strict";"use restrict";function n(t){var e=32;return t&=-t,t&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return t-=t>>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},r.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),(t=65535&(t|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),t|r<<2},r.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),(t=1023&(t|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],58:[function(t,e,r){!function(e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}function o(t,e,r){for(var n=0,i=Math.min(t.length,r),a=e;a=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function s(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}function l(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}function u(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,h=67108863&l,f=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=f;d++){var p=u-d|0;i=0|t.words[p],a=0|e.words[d],o=i*a+h,c+=o/67108864|0,h=67108863&o}r.words[u]=0|h,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}function c(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function h(t,e,r){return(new f).mulp(t,e,r)}function f(t,e){this.x=t,this.y=e}function d(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function b(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var x;try{x=t("buffer").Buffer}catch(t){}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=o(t,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=o(t,e,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,l=Math.min(a,a-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var i=0,a=0,o=0;o>>24-i&16777215,r=0!==a||o!==this.length-1?_[6-l.length]+l+r:l+r,i+=2,i>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=w[t],c=M[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var f=h.modn(c).toString(t);h=h.idivn(c),r=h.isZero()?f+r:_[u-f.length]+f+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==x),this.toArrayLike(x,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,u=new t(a),c=this.clone();if(l){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],x=8191&b,_=b>>>13,w=0|o[4],M=8191&w,A=w>>>13,k=0|o[5],T=8191&k,S=k>>>13,E=0|o[6],L=8191&E,C=E>>>13,D=0|o[7],z=8191&D,I=D>>>13,P=0|o[8],O=8191&P,R=P>>>13,j=0|o[9],F=8191&j,N=j>>>13,B=0|s[0],U=8191&B,V=B>>>13,H=0|s[1],q=8191&H,G=H>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,Z=0|s[3],J=8191&Z,K=Z>>>13,Q=0|s[4],$=8191&Q,tt=Q>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ut=st>>>13,ct=0|s[8],ht=8191&ct,ft=ct>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,V),i=i+Math.imul(f,U)|0,a=Math.imul(f,V);var gt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=Math.imul(p,V),i=i+Math.imul(m,U)|0,a=Math.imul(m,V),n=n+Math.imul(h,q)|0,i=i+Math.imul(h,G)|0,i=i+Math.imul(f,q)|0,a=a+Math.imul(f,G)|0;var vt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=Math.imul(v,V),i=i+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(p,q)|0,i=i+Math.imul(p,G)|0,i=i+Math.imul(m,q)|0,a=a+Math.imul(m,G)|0,n=n+Math.imul(h,W)|0,i=i+Math.imul(h,X)|0,i=i+Math.imul(f,W)|0,a=a+Math.imul(f,X)|0;var yt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(x,U),i=Math.imul(x,V),i=i+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(v,q)|0,i=i+Math.imul(v,G)|0,i=i+Math.imul(y,q)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=i+Math.imul(p,X)|0,i=i+Math.imul(m,W)|0,a=a+Math.imul(m,X)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,K)|0,i=i+Math.imul(f,J)|0,a=a+Math.imul(f,K)|0;var bt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,U),i=Math.imul(M,V),i=i+Math.imul(A,U)|0,a=Math.imul(A,V),n=n+Math.imul(x,q)|0,i=i+Math.imul(x,G)|0,i=i+Math.imul(_,q)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=i+Math.imul(v,X)|0,i=i+Math.imul(y,W)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,K)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,K)|0,n=n+Math.imul(h,$)|0,i=i+Math.imul(h,tt)|0,i=i+Math.imul(f,$)|0,a=a+Math.imul(f,tt)|0;var xt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(T,U),i=Math.imul(T,V),i=i+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(M,q)|0,i=i+Math.imul(M,G)|0,i=i+Math.imul(A,q)|0,a=a+Math.imul(A,G)|0,n=n+Math.imul(x,W)|0,i=i+Math.imul(x,X)|0,i=i+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,K)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,K)|0,n=n+Math.imul(p,$)|0,i=i+Math.imul(p,tt)|0,i=i+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0,n=n+Math.imul(h,rt)|0,i=i+Math.imul(h,nt)|0,i=i+Math.imul(f,rt)|0,a=a+Math.imul(f,nt)|0;var _t=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,U),i=Math.imul(L,V),i=i+Math.imul(C,U)|0,a=Math.imul(C,V),n=n+Math.imul(T,q)|0,i=i+Math.imul(T,G)|0,i=i+Math.imul(S,q)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(M,W)|0,i=i+Math.imul(M,X)|0,i=i+Math.imul(A,W)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(x,J)|0,i=i+Math.imul(x,K)|0,i=i+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(v,$)|0,i=i+Math.imul(v,tt)|0,i=i+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=i+Math.imul(p,nt)|0,i=i+Math.imul(m,rt)|0,a=a+Math.imul(m,nt)|0,n=n+Math.imul(h,at)|0,i=i+Math.imul(h,ot)|0,i=i+Math.imul(f,at)|0,a=a+Math.imul(f,ot)|0;var wt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(z,U),i=Math.imul(z,V),i=i+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(L,q)|0,i=i+Math.imul(L,G)|0,i=i+Math.imul(C,q)|0,a=a+Math.imul(C,G)|0,n=n+Math.imul(T,W)|0,i=i+Math.imul(T,X)|0,i=i+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(M,J)|0,i=i+Math.imul(M,K)|0,i=i+Math.imul(A,J)|0,a=a+Math.imul(A,K)|0,n=n+Math.imul(x,$)|0,i=i+Math.imul(x,tt)|0,i=i+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=i+Math.imul(v,nt)|0,i=i+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(p,at)|0,i=i+Math.imul(p,ot)|0,i=i+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0,n=n+Math.imul(h,lt)|0,i=i+Math.imul(h,ut)|0,i=i+Math.imul(f,lt)|0,a=a+Math.imul(f,ut)|0;var Mt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,U),i=Math.imul(O,V),i=i+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(z,q)|0,i=i+Math.imul(z,G)|0,i=i+Math.imul(I,q)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(L,W)|0,i=i+Math.imul(L,X)|0,i=i+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,K)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(M,$)|0,i=i+Math.imul(M,tt)|0,i=i+Math.imul(A,$)|0,a=a+Math.imul(A,tt)|0,n=n+Math.imul(x,rt)|0,i=i+Math.imul(x,nt)|0,i=i+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=i+Math.imul(v,ot)|0,i=i+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(p,lt)|0,i=i+Math.imul(p,ut)|0,i=i+Math.imul(m,lt)|0,a=a+Math.imul(m,ut)|0,n=n+Math.imul(h,ht)|0,i=i+Math.imul(h,ft)|0,i=i+Math.imul(f,ht)|0,a=a+Math.imul(f,ft)|0;var At=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,U),i=Math.imul(F,V),i=i+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(O,q)|0,i=i+Math.imul(O,G)|0,i=i+Math.imul(R,q)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(z,W)|0,i=i+Math.imul(z,X)|0,i=i+Math.imul(I,W)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(L,J)|0,i=i+Math.imul(L,K)|0,i=i+Math.imul(C,J)|0,a=a+Math.imul(C,K)|0,n=n+Math.imul(T,$)|0,i=i+Math.imul(T,tt)|0,i=i+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(M,rt)|0,i=i+Math.imul(M,nt)|0,i=i+Math.imul(A,rt)|0,a=a+Math.imul(A,nt)|0,n=n+Math.imul(x,at)|0,i=i+Math.imul(x,ot)|0,i=i+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=i+Math.imul(v,ut)|0,i=i+Math.imul(y,lt)|0,a=a+Math.imul(y,ut)|0,n=n+Math.imul(p,ht)|0,i=i+Math.imul(p,ft)|0,i=i+Math.imul(m,ht)|0,a=a+Math.imul(m,ft)|0,n=n+Math.imul(h,pt)|0,i=i+Math.imul(h,mt)|0,i=i+Math.imul(f,pt)|0,a=a+Math.imul(f,mt)|0;var kt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,q),i=Math.imul(F,G),i=i+Math.imul(N,q)|0,a=Math.imul(N,G),n=n+Math.imul(O,W)|0,i=i+Math.imul(O,X)|0,i=i+Math.imul(R,W)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(z,J)|0,i=i+Math.imul(z,K)|0,i=i+Math.imul(I,J)|0,a=a+Math.imul(I,K)|0,n=n+Math.imul(L,$)|0,i=i+Math.imul(L,tt)|0,i=i+Math.imul(C,$)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=i+Math.imul(T,nt)|0,i=i+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(M,at)|0,i=i+Math.imul(M,ot)|0,i=i+Math.imul(A,at)|0,a=a+Math.imul(A,ot)|0,n=n+Math.imul(x,lt)|0,i=i+Math.imul(x,ut)|0,i=i+Math.imul(_,lt)|0,a=a+Math.imul(_,ut)|0,n=n+Math.imul(v,ht)|0,i=i+Math.imul(v,ft)|0,i=i+Math.imul(y,ht)|0,a=a+Math.imul(y,ft)|0,n=n+Math.imul(p,pt)|0,i=i+Math.imul(p,mt)|0,i=i+Math.imul(m,pt)|0,a=a+Math.imul(m,mt)|0;var Tt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,W),i=Math.imul(F,X),i=i+Math.imul(N,W)|0,a=Math.imul(N,X),n=n+Math.imul(O,J)|0,i=i+Math.imul(O,K)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(z,$)|0,i=i+Math.imul(z,tt)|0,i=i+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(L,rt)|0,i=i+Math.imul(L,nt)|0,i=i+Math.imul(C,rt)|0,a=a+Math.imul(C,nt)|0,n=n+Math.imul(T,at)|0,i=i+Math.imul(T,ot)|0,i=i+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(M,lt)|0,i=i+Math.imul(M,ut)|0,i=i+Math.imul(A,lt)|0,a=a+Math.imul(A,ut)|0,n=n+Math.imul(x,ht)|0,i=i+Math.imul(x,ft)|0,i=i+Math.imul(_,ht)|0,a=a+Math.imul(_,ft)|0,n=n+Math.imul(v,pt)|0,i=i+Math.imul(v,mt)|0,i=i+Math.imul(y,pt)|0,a=a+Math.imul(y,mt)|0;var St=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,J),i=Math.imul(F,K),i=i+Math.imul(N,J)|0,a=Math.imul(N,K),n=n+Math.imul(O,$)|0,i=i+Math.imul(O,tt)|0,i=i+Math.imul(R,$)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(z,rt)|0,i=i+Math.imul(z,nt)|0,i=i+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(L,at)|0,i=i+Math.imul(L,ot)|0,i=i+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,n=n+Math.imul(T,lt)|0,i=i+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,a=a+Math.imul(S,ut)|0,n=n+Math.imul(M,ht)|0,i=i+Math.imul(M,ft)|0,i=i+Math.imul(A,ht)|0,a=a+Math.imul(A,ft)|0,n=n+Math.imul(x,pt)|0,i=i+Math.imul(x,mt)|0,i=i+Math.imul(_,pt)|0,a=a+Math.imul(_,mt)|0;var Et=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,$),i=Math.imul(F,tt),i=i+Math.imul(N,$)|0,a=Math.imul(N,tt),n=n+Math.imul(O,rt)|0,i=i+Math.imul(O,nt)|0,i=i+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(z,at)|0,i=i+Math.imul(z,ot)|0,i=i+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(L,lt)|0,i=i+Math.imul(L,ut)|0,i=i+Math.imul(C,lt)|0,a=a+Math.imul(C,ut)|0,n=n+Math.imul(T,ht)|0,i=i+Math.imul(T,ft)|0,i=i+Math.imul(S,ht)|0,a=a+Math.imul(S,ft)|0,n=n+Math.imul(M,pt)|0,i=i+Math.imul(M,mt)|0,i=i+Math.imul(A,pt)|0,a=a+Math.imul(A,mt)|0;var Lt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(F,rt),i=Math.imul(F,nt),i=i+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(O,at)|0,i=i+Math.imul(O,ot)|0,i=i+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(z,lt)|0,i=i+Math.imul(z,ut)|0,i=i+Math.imul(I,lt)|0,a=a+Math.imul(I,ut)|0,n=n+Math.imul(L,ht)|0,i=i+Math.imul(L,ft)|0,i=i+Math.imul(C,ht)|0,a=a+Math.imul(C,ft)|0,n=n+Math.imul(T,pt)|0,i=i+Math.imul(T,mt)|0,i=i+Math.imul(S,pt)|0,a=a+Math.imul(S,mt)|0;var Ct=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,at),i=Math.imul(F,ot),i=i+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(O,lt)|0,i=i+Math.imul(O,ut)|0,i=i+Math.imul(R,lt)|0,a=a+Math.imul(R,ut)|0,n=n+Math.imul(z,ht)|0,i=i+Math.imul(z,ft)|0,i=i+Math.imul(I,ht)|0,a=a+Math.imul(I,ft)|0,n=n+Math.imul(L,pt)|0,i=i+Math.imul(L,mt)|0,i=i+Math.imul(C,pt)|0,a=a+Math.imul(C,mt)|0;var Dt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(F,lt),i=Math.imul(F,ut),i=i+Math.imul(N,lt)|0,a=Math.imul(N,ut),n=n+Math.imul(O,ht)|0,i=i+Math.imul(O,ft)|0,i=i+Math.imul(R,ht)|0,a=a+Math.imul(R,ft)|0,n=n+Math.imul(z,pt)|0,i=i+Math.imul(z,mt)|0,i=i+Math.imul(I,pt)|0,a=a+Math.imul(I,mt)|0;var zt=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(F,ht),i=Math.imul(F,ft),i=i+Math.imul(N,ht)|0,a=Math.imul(N,ft),n=n+Math.imul(O,pt)|0,i=i+Math.imul(O,mt)|0,i=i+Math.imul(R,pt)|0,a=a+Math.imul(R,mt)|0;var It=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,pt),i=Math.imul(F,mt),i=i+Math.imul(N,pt)|0,a=Math.imul(N,mt);var Pt=(u+n|0)+((8191&i)<<13)|0;return u=(a+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,l[0]=gt,l[1]=vt,l[2]=yt,l[3]=bt,l[4]=xt,l[5]=_t,l[6]=wt,l[7]=Mt,l[8]=At,l[9]=kt,l[10]=Tt,l[11]=St,l[12]=Et,l[13]=Lt,l[14]=Ct,l[15]=Dt,l[16]=zt,l[17]=It,l[18]=Pt,0!==u&&(l[19]=u,r.length++),r};Math.imul||(A=u),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?A(this,t,e):r<63?u(this,t,e):r<1024?c(this,t,e):h(this,t,e)},f.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},f.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=l(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0);var i;i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-a|h>>>a,c=h&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(s===-1),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){s=new a(null),s.length=l+1,s.words=new Array(s.length);for(var u=0;u=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=f)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){if(n(!t.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var i,o,s;return 0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0==(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(c),l.isub(h)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(u)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0==(e.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(e.iushrn(l);l-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var c=0,h=1;0==(r.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o)):(r.isub(e),o.isub(i))}var f;return f=0===e.cmpn(1)?i:o,f.cmpn(0)<0&&f.iadd(t),f},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];r=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return this.cmpn(t)===-1},a.prototype.lt=function(t){return this.cmp(t)===-1},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new y(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var k={k256:null,p224:null,p192:null,p25519:null};d.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},d.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},d.prototype.split=function(t,e){t.iushrn(this.n,0,e)},d.prototype.imulK=function(t){return t.imul(this.k)},i(p,d),p.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},p.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(k[t])return k[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new m;else if("p192"===t)e=new g;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new v}return k[t]=e,e},y.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},y.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},y.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},y.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},y.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},y.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},y.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=o;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var u=e.words[n],c=l-1;c>=0;c--){var h=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},y.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},y.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new b(t)},i(b,y),b.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},b.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},b.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},b.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},b.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{}],59:[function(t,e,r){"use strict";function n(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(s<=0)){var l,u=h.mallocDouble(2*s*a),c=h.mallocInt32(a);if((a=i(t,s,u,c))>0){if(1===s&&n)f.init(a),l=f.sweepComplete(s,r,0,a,u,c,0,a,u,c);else{var p=h.mallocDouble(2*s*o),m=h.mallocInt32(o);o=i(e,s,p,m),o>0&&(f.init(a+o),l=1===s?f.sweepBipartite(s,r,0,a,u,c,0,o,p,m):d(s,r,n,a,u,c,o,p,m),h.free(p),h.free(m))}h.free(u),h.free(c)}return l}}}function o(t,e){c.push([t,e])}function s(t){return c=[],a(t,t,o,!0),c}function l(t,e){return c=[],a(t,e,o,!1),c}function u(t,e,r){switch(arguments.length){case 1:return s(t);case 2:return"function"==typeof e?a(t,t,e,!0):l(t,e);case 3:return a(t,e,r,!1);default:throw new Error("box-intersect: Invalid arguments")}}e.exports=u;var c,h=t("typedarray-pool"),f=t("./lib/sweep"),d=t("./lib/intersect")},{"./lib/intersect":62,"./lib/sweep":66,"typedarray-pool":518}],61:[function(t,e,r){"use strict";function n(t,e,r){var n="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(r?"Full":""),i=["function ",n,"(",w.join(),"){","var ",u,"=2*",a,";"],l="for(var i="+c+","+p+"="+u+"*"+c+";i<"+h+";++i,"+p+"+="+u+"){var x0="+f+"["+o+"+"+p+"],x1="+f+"["+o+"+"+p+"+"+a+"],xi="+d+"[i];",M="for(var j="+m+","+b+"="+u+"*"+m+";j<"+g+";++j,"+b+"+="+u+"){var y0="+v+"["+o+"+"+b+"],"+(r?"y1="+v+"["+o+"+"+b+"+"+a+"],":"")+"yi="+y+"[j];";return t?i.push(l,_,":",M):i.push(M,_,":",l),r?i.push("if(y1"+g+"-"+m+"){"),t?(e(!0,!1),o.push("}else{"),e(!1,!1)):(o.push("if("+l+"){"),e(!0,!0),o.push("}else{"),e(!0,!1),o.push("}}else{if("+l+"){"),e(!1,!0),o.push("}else{"),e(!1,!1),o.push("}")),o.push("}}return "+r);var s=i.join("")+o.join("");return new Function(s)()}var a="d",o="ax",s="vv",l="fp",u="es",c="rs",h="re",f="rb",d="ri",p="rp",m="bs",g="be",v="bb",y="bi",b="bp",x="rv",_="Q",w=[a,o,s,c,h,f,d,m,g,v,y];r.partial=i(!1),r.full=i(!0)},{}],62:[function(t,e,r){"use strict";function n(t,e){var r=8*u.log2(e+1)*(t+1)|0,n=u.nextPow2(k*r);S.length0;){D-=1;var I=D*k,P=S[I],O=S[I+1],R=S[I+2],j=S[I+3],F=S[I+4],N=S[I+5],B=D*T,U=E[B],V=E[B+1],H=1&N,q=!!(16&N),G=l,Y=u,W=m,X=L;if(H&&(G=m,Y=L,W=l,X=u),!(2&N&&(R=_(t,P,O,R,G,Y,V),O>=R)||4&N&&(O=w(t,P,O,R,G,Y,U))>=R)){var Z=R-O,J=F-j;if(q){if(t*Z*(Z+J)=p0)&&!(p1>=hi)",["p0","p1"]),x=m("lo===p0",["p0"]),_=m("lor&&i[h+e]>u;--c,h-=o){for(var f=h,d=h+o,p=0;p>>1,f=2*t,d=h,p=a[f*h+e];u=b?(d=y,p=b):v>=_?(d=g,p=v):(d=x,p=_):b>=_?(d=y,p=b):_>=v?(d=g,p=v):(d=x,p=_);for(var w=f*(c-1),M=f*d,A=0;A=0&&n.push("lo=e[k+n]"),t.indexOf("hi")>=0&&n.push("hi=e[k+o]"),r.push(i.replace("_",n.join()).replace("$",t)),Function.apply(void 0,r)}e.exports=n;var i="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],65:[function(t,e,r){"use strict";function n(t,e){e<=4*f?i(0,e-1,t):h(0,e-1,t)}function i(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var u=r[l-2],c=r[l-1];if(ur[e+1])}function c(t,e,r,n){t*=2;var i=n[t];return i>1,g=m-n,v=m+n,y=d,b=g,x=m,_=v,w=p,M=t+1,A=e-1,k=0;u(y,b,r)&&(k=y,y=b,b=k),u(_,w,r)&&(k=_,_=w,w=k),u(y,x,r)&&(k=y,y=x,x=k),u(b,x,r)&&(k=b,b=x,x=k),u(y,_,r)&&(k=y,y=_,_=k),u(x,_,r)&&(k=x,x=_,_=k),u(b,w,r)&&(k=b,b=w,w=k),u(b,x,r)&&(k=b,b=x,x=k),u(_,w,r)&&(k=_,_=w,w=k);for(var T=r[2*b],S=r[2*b+1],E=r[2*_],L=r[2*_+1],C=2*y,D=2*x,z=2*w,I=2*d,P=2*m,O=2*p,R=0;R<2;++R){var j=r[C+R],F=r[D+R],N=r[z+R];r[I+R]=j,r[P+R]=F,r[O+R]=N}o(g,t,r),o(v,e,r);for(var B=M;B<=A;++B)if(c(B,T,S,r))B!==M&&a(B,M,r),++M;else if(!c(B,E,L,r))for(;;){if(c(A,E,L,r)){c(A,T,S,r)?(s(B,M,A,r),++M,--A):(a(B,A,r),--A);break}if(--A>>1;f(x,S);for(var E=0,L=0,M=0;M=d)C=C-d|0,i(g,v,L--,C);else if(C>=0)i(p,m,E--,C);else if(C<=-d){C=-C-d|0;for(var D=0;D>>1;f(x,E);for(var L=0,C=0,D=0,A=0;A>1==x[2*A+3]>>1&&(I=2,A+=1),z<0){for(var P=-(z>>1)-1,O=0;O>1)-1;0===I?i(p,m,L--,P):1===I?i(g,v,C--,P):2===I&&i(y,b,D--,P)}}}function l(t,e,r,n,o,s,l,u,c,h,g,v){var y=0,b=2*t,_=e,w=e+t,M=1,A=1;n?A=d:M=d;for(var k=o;k>>1;f(x,L);for(var C=0,k=0;k=d?(z=!n,T-=d):(z=!!n,T-=1),z)a(p,m,C++,T);else{var I=v[T],P=b*T,O=g[P+e+1],R=g[P+e+1+t];t:for(var j=0;j>>1;f(x,M);for(var A=0,y=0;y=d)p[A++]=b-d;else{b-=1;var T=c[b],S=m*b,E=u[S+e+1],L=u[S+e+1+t];t:for(var C=0;C=0;--C)if(p[C]===b){for(var P=C+1;PZ)throw new RangeError("Invalid typed array length");var e=new Uint8Array(t);return e.__proto__=i.prototype,e}function i(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(t)}return a(t,e,r)}function a(t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return t instanceof ArrayBuffer?h(t,e,r):"string"==typeof t?u(t,e):f(t)}function o(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function s(t,e,r){return o(t),t<=0?n(t):void 0!==e?"string"==typeof r?n(t).fill(e,r):n(t).fill(e):n(t)}function l(t){return o(t),n(t<0?0:0|d(t))}function u(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!i.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(t,e),a=n(r),o=a.write(t,e);return o!==r&&(a=a.slice(0,o)),a}function c(t){for(var e=t.length<0?0:0|d(t.length),r=n(e),i=0;i=Z)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z.toString(16)+" bytes");return 0|t}function p(t){return+t!=t&&(t=0),i.alloc(+t)}function m(t,e){if(i.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(t).length;default:if(n)return U(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,a){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(a)return-1;r=t.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof e&&(e=i.from(e,n)),i.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,a);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,a);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){function a(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,s=t.length,l=e.length +;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}var u;if(i){var c=-1;for(u=r;us&&(r=s-l),u=r;u>=0;u--){for(var h=!0,f=0;fi&&(n=i):n=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=r){var l,u,c,h;switch(s){case 1:a<128&&(o=a);break;case 2:l=t[i+1],128==(192&l)&&(h=(31&a)<<6|63&l)>127&&(o=h);break;case 3:l=t[i+1],u=t[i+2],128==(192&l)&&128==(192&u)&&(h=(15&a)<<12|(63&l)<<6|63&u)>2047&&(h<55296||h>57343)&&(o=h);break;case 4:l=t[i+1],u=t[i+2],c=t[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(h=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&h<1114112&&(o=h)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return E(n)}function E(t){var e=t.length;if(e<=J)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,r,n,a,o){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||et.length)throw new RangeError("Index out of range")}function O(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,r,n,52,8),r+8}function F(t){if(t=N(t).replace(K,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function N(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function B(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function V(t){for(var e=[],r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function q(t){return W.toByteArray(F(t))}function G(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Y(t){return t!==t}var W=t("base64-js"),X=t("ieee754");r.Buffer=i,r.SlowBuffer=p,r.INSPECT_MAX_BYTES=50;var Z=2147483647;r.kMaxLength=Z,i.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(t,e,r){return a(t,e,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(t,e,r){return s(t,e,r)},i.allocUnsafe=function(t){return l(t)},i.allocUnsafeSlow=function(t){return l(t)},i.isBuffer=function(t){return null!=t&&t._isBuffer===!0},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,a=0,o=Math.min(r,n);a0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},i.prototype.compare=function(t,e,r,n,a){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),e<0||r>t.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&e>=r)return 0;if(n>=a)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,a>>>=0,this===t)return 0;for(var o=a-n,s=r-e,l=Math.min(o,s),u=this.slice(n,a),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return M(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;i.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},i.prototype.readUInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a=i&&(n-=Math.pow(2,8*e)),n},i.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*e)),a},i.prototype.readInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},i.prototype.readInt16LE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return t>>>=0,e||I(t,4,this.length),X.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return t>>>=0,e||I(t,4,this.length),X.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return t>>>=0,e||I(t,8,this.length),X.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return t>>>=0,e||I(t,8,this.length),X.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},i.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},i.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},i.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},i.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},i.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeFloatLE=function(t,e,r){return R(this,t,e,!0,r)},i.prototype.writeFloatBE=function(t,e,r){return R(this,t,e,!1,r)},i.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},i.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},i.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return 3*t.length/4-n(t)}function a(t){var e,r,i,a,o,s,l=t.length;o=n(t),s=new h(3*l/4-o),i=o>0?l-4:l;var u=0;for(e=0,r=0;e>16&255,s[u++]=a>>8&255,s[u++]=255&a;return 2===o?(a=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,s[u++]=255&a):1===o&&(a=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,s[u++]=a>>8&255,s[u++]=255&a),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function s(t,e,r){for(var n,i=[],a=e;al?l:o+16383));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),a.push(i),a.join("")}r.byteLength=i,r.toByteArray=a,r.fromByteArray=l;for(var u=[],c=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=f.length;d0;){for(var c=r.pop(),s=r.pop(),h=-1,f=-1,l=o[s],p=1;p=0||(e.flip(s,c),n(t,e,r,h,s,f),n(t,e,r,s,f,h),n(t,e,r,f,c,h),n(t,e,r,c,h,f)))}}var a=t("robust-in-sphere")[4];t("binary-search-bounds");e.exports=i},{"binary-search-bounds":74,"robust-in-sphere":484}],71:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function i(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}function a(t,e){for(var r=t.cells(),a=r.length,o=0;o0||l.length>0;){for(;s.length>0;){var d=s.pop();if(u[d]!==-i){u[d]=i;for(var p=(c[d],0);p<3;++p){var m=f[3*d+p];m>=0&&0===u[m]&&(h[3*d+p]?l.push(m):(s.push(m),u[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var v=o(c,u,e);return r?v.concat(n.boundary):v}var l=t("binary-search-bounds");e.exports=s,n.prototype.locate=function(){var t=[0,0,0];return function(e,r,n){var a=e,o=r,s=n;return r1&&d(r[c[h-2]],r[c[h-1]],n)>0;)t.push([c[h-1],c[h-2],i]),h-=1;c.length=h,c.push(i);for(var p=u.upperIds,h=p.length;h>1&&d(r[p[h-2]],r[p[h-1]],n)<0;)t.push([p[h-2],p[h-1],i]),h-=1;p.length=h,p.push(i)}}function l(t,e){var r;return(r=t.a[0]v[0]&&l.push(new i(v,d,g,h),new i(d,v,m,h))}l.sort(a);for(var y=l[0].a[0]-(1+Math.abs(l[0].a[0]))*Math.pow(2,-52),b=[new n([y,1],[y,0],-1,[],[],[],[])],x=[],h=0,_=l.length;h<_;++h){var w=l[h],M=w.type;M===p?s(x,b,t,w.a,w.idx):M===g?u(b,t,w):c(b,t,w)}return x}var f=t("binary-search-bounds"),d=t("robust-orientation")[3],p=0,m=1,g=2;e.exports=h},{"binary-search-bounds":74,"robust-orientation":486}],73:[function(t,e,r){"use strict";function n(t,e){this.stars=t,this.edges=e}function i(t,e,r){for(var n=1,i=t.length;n=0}}(),s.removeTriangle=function(t,e,r){var n=this.stars;i(n[t],e,r),i(n[e],r,t),i(n[r],t,e)},s.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},s.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n>>1,x=a[m]"];return i?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),r?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),i?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],i),n("P","c(x,y)"+t+"0",e,["y","c"],i),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],75:[function(t,e,r){"use strict";function n(t){for(var e=1,r=1;rr?r:t:te?e:t}e.exports=n},{}],79:[function(t,e,r){"use strict";function n(t){var e=_(t);return[M(e,-1/0),M(e,1/0)]}function i(t,e){for(var r=new Array(e.length),n=0;n=0;--a){var p=n[a];o=p[0];var m=e[o],g=m[0],v=m[1],y=t[g],M=t[v];if((y[0]-M[0]||y[1]-M[1])<0){var k=g;g=v,v=k}m[0]=g;var T,S=m[1]=p[1];for(i&&(T=m[2]);a>0&&n[a-1][0]===o;){var p=n[--a],E=p[1];i?e.push([S,E,T]):e.push([S,E]),S=E}i?e.push([S,v,T]):e.push([S,v])}return s}function u(t,e,r){for(var i=e.length,a=new g(i),o=[],s=0;se[2]?1:0)}function f(t,e,r){if(0!==t.length){if(e)for(var n=0;n0||d.length>0)}function m(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a10&&/[0-9](?:\s|\/)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),r=t.match(/([a-z])/gi).join("").toLowerCase());else"number"==typeof t?(r="rgb",n=[t>>>16,(65280&t)>>>8,255&t]):a(t)?(null!=t.r?(n=[t.r,t.g,t.b],r="rgb"):null!=t.red?(n=[t.red,t.green,t.blue],r="rgb"):null!=t.h?(n=[t.h,t.s,t.l],r="hsl"):null!=t.hue&&(n=[t.hue,t.saturation,t.lightness],r="hsl"),null!=t.a?s=t.a:null!=t.alpha?s=t.alpha:null!=t.opacity&&(s=t.opacity/100)):(Array.isArray(t)||ArrayBuffer.isView(t))&&(n=[t[0],t[1],t[2]],r="rgb",s=4===t.length?t[3]:1);return{space:r,values:n,alpha:s}}e.exports=n;var i=t("color-name"),a=t("is-plain-obj"),o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},{"color-name":83,"is-plain-obj":276}],85:[function(t,e,r){"use strict";var n=t("color-parse"),i=t("color-space/hsl"),a=t("clamp");e.exports=function(t,e){null==e&&(e=!0);var r=n(t);if(!r.space)return[];if(Array.isArray(t))return t;var o,s=r.values,l=s.length;for(o=0;o1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[u]=255*a;return i}},n.hsl=function(t){var e,r,n,i=t[0]/255,a=t[1]/255,o=t[2]/255,s=Math.min(i,a,o),l=Math.max(i,a,o),u=l-s;return l===s?e=0:i===l?e=(a-o)/u:a===l?e=2+(o-i)/u:o===l&&(e=4+(i-a)/u),e=Math.min(60*e,360),e<0&&(e+=360),n=(s+l)/2,r=l===s?0:n<=.5?u/(l+s):u/(2-l-s),[e,100*r,100*n]}},{"./rgb":87}],87:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],88:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:0,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],89:[function(t,e,r){"use strict";function n(t){var e,r,n,u,c,h,f,d,p,m,g,v,y,b=[],x=[],_=[],w=[];if(o.isPlainObject(t)||(t={}),p=t.nshades||72,d=t.format||"hex",f=t.colormap,f||(f="jet"),"string"==typeof f){if(f=f.toLowerCase(),!l[f])throw Error(f+" not a supported colorscale");h=s(l[f])}else{if(!Array.isArray(f))throw Error("unsupported colormap option",f);h=s(f)}if(h.length>p)throw new Error(f+" map requires nshades to be at least size "+h.length);for(g=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:s(t.alpha):"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=h.map(function(t){return Math.round(t.index*p)}),g[0]<0&&(g[0]=0),g[1]<0&&(g[0]=0),g[0]>1&&(g[0]=1),g[1]>1&&(g[0]=1),y=0;y=0&&r[3]<=1||(r[3]=g[0]+(g[1]-g[0])*v);for(y=0;y=0}function i(t,e,r,i){var s=a(e,r,i);if(0===s){var l=o(a(t,e,r)),u=o(a(t,e,i));if(l===u){if(0===l){var c=n(t,e,r);return c===n(t,e,i)?0:c?1:-1}return 0}return 0===u?l>0?-1:n(t,e,i)?-1:1:0===l?u>0?1:n(t,e,r)?1:-1:o(u-l)}var h=a(t,e,r);return h>0?s>0&&a(t,e,i)>0?1:-1:h<0?s>0||a(t,e,i)>0?1:-1:a(t,e,i)>0?1:n(t,e,r)?1:-1}e.exports=i;var a=t("robust-orientation"),o=t("signum"),s=t("two-sum"),l=t("robust-product"),u=t("robust-sum")},{"robust-orientation":486,"robust-product":487,"robust-sum":491,signum:493,"two-sum":517}],91:[function(t,e,r){function n(t,e){return t-e}function i(t,e){var r=t.length,i=t.length-e.length;if(i)return i;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||a(t[0],t[1])-a(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(i=o+t[2]-(s+e[2]))return i;var l=a(t[0],t[1]),u=a(e[0],e[1]);return a(l,t[2])-a(u,e[2])||a(l+t[2],o)-a(u+e[2],s);case 4:var c=t[0],h=t[1],f=t[2],d=t[3],p=e[0],m=e[1],g=e[2],v=e[3];return c+h+f+d-(p+m+g+v)||a(c,h,f,d)-a(p,m,g,v,p)||a(c+h,c+f,c+d,h+f,h+d,f+d)-a(p+m,p+g,p+v,m+g,m+v,g+v)||a(c+h+f,c+h+d,c+f+d,h+f+d)-a(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var y=t.slice().sort(n),b=e.slice().sort(n),x=0;xt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}e.exports=n},{}],95:[function(t,e,r){"use strict";function n(t){var e=i(t),r=e.length;if(r<=2)return[];for(var n=new Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}function a(t,e){try{return o(t,!0)}catch(u){var r=s(t);if(r.length<=e)return[];var a=n(t,r),l=o(a,!0);return i(l,r)}}e.exports=a;var o=t("incremental-convex-hull"),s=t("affine-hull")},{"affine-hull":33,"incremental-convex-hull":270}],97:[function(t,e,r){e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],98:[function(t,e,r){function n(t){return t=Math.round(t),t<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return n("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return i("%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function l(t){var e=t.replace(/ /g,"").toLowerCase();if(e in u)return u[e].slice();if("#"===e[0]){if(4===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=4095?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null}if(7===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=16777215?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null}return null}var i=e.indexOf("("),l=e.indexOf(")");if(i!==-1&&l+1===e.length){var c=e.substr(0,i),h=e.substr(i+1,l-(i+1)).split(","),f=1;switch(c){case"rgba":if(4!==h.length)return null;f=o(h.pop());case"rgb":return 3!==h.length?null:[a(h[0]),a(h[1]),a(h[2]),f];case"hsla":if(4!==h.length)return null;f=o(h.pop());case"hsl":if(3!==h.length)return null;var d=(parseFloat(h[0])%360+360)%360/360,p=o(h[1]),m=o(h[2]),g=m<=.5?m*(p+1):m+p-m*p,v=2*m-g;return[n(255*s(v,g,d+1/3)),n(255*s(v,g,d)),n(255*s(v,g,d-1/3)),f];default:return null}}return null}var u={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{r.parseCSSColor=l}catch(t){}},{}],99:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,u=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var c=t.length-1;c>=0;--c)a[c]=o*t[c]+s*e[c]+l*r[c]+u*n[c];return a}return o*t+s*e+l*r[c]+u*n}function i(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,u=(1+2*i)*l,c=i*l,h=s*(3-2*i),f=s*o;if(t.length){a||(a=new Array(t.length));for(var d=t.length-1;d>=0;--d)a[d]=u*t[d]+c*e[d]+h*r[d]+f*n[d];return a}return u*t+c*e+h*r+f*n}e.exports=i,e.exports.derivative=n},{}],100:[function(t,e,r){"use strict";function n(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function i(t){var e=new n;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var i=0;i0)throw new Error("cwise: pre() block may not reference array args");if(i0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)e.scalarArgs.push(i),e.shimArgs.push("scalar"+i);else if("index"===o){if(e.indexArgs.push(i),i0)throw new Error("cwise: pre() block may not reference array index");if(i0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(e.shapeArgs.push(i),ir.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,a(e)}var a=t("./lib/thunk.js");e.exports=i},{"./lib/thunk.js":102}],101:[function(t,e,r){"use strict";function n(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],u=[],c=0,h=0;for(n=0;n=0;--n)c=t[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",h,"]-=s",h].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function i(t,e,r,i){for(var a=e.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,u=[],c=0;c0;){"].join("")),u.push(["if(j",c,"<",s,"){"].join("")),u.push(["s",e[c],"=j",c].join("")),u.push(["j",c,"=0"].join("")),u.push(["}else{s",e[c],"=",s].join("")),u.push(["j",c,"-=",s,"}"].join("")),l&&u.push(["index[",e[c],"]=j",c].join(""));for(var c=0;c0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}function l(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,l=new Array(t.arrayArgs.length),c=new Array(t.arrayArgs.length),h=0;h0&&_.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var w=new Array(r),h=0;h3&&x.push(o(t.pre,t,c));var T=o(t.body,t,c),S=a(g);S3&&x.push(o(t.post,t,c)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+x.join("\n")+"\n----------");var E=[t.funcName||"unnamed","_cwise_loop_",l[0].join("s"),"m",S,s(c)].join("");return new Function(["function ",E,"(",b.join(","),"){",x.join("\n"),"} return ",E].join(""))()}var u=t("uniq");e.exports=l},{uniq:520}],102:[function(t,e,r){"use strict";function n(t){var e=["'use strict'","var CACHED={}"],r=[],n=t.funcName+"_cwise_thunk";e.push(["return function ",n,"(",t.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],l=[],u=[],c=0;c0&&(l.push("array"+t.arrayArgs[0]+".shape.length===array"+h+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[c]))),u.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+h+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[c])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),e.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}"));for(var c=0;ce?1:t>=e?0:0/0}function a(t){return null===t?0/0:+t}function o(t){return!isNaN(t)}function s(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}function l(t){return t.length}function u(t){for(var e=1;t*e%1;)e*=10;return e}function c(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function h(){this._=Object.create(null)}function f(t){return(t+="")===_o||t[0]===wo?wo+t:t}function d(t){return(t+="")[0]===wo?t.slice(1):t}function p(t){return f(t)in this._}function m(t){return(t=f(t))in this._&&delete this._[t]}function g(){var t=[];for(var e in this._)t.push(d(e));return t}function v(){var t=0;for(var e in this._)++t;return t}function y(){for(var t in this._)return!1;return!0}function b(){this._=Object.create(null)}function x(t){return t}function _(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function w(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=Mo.length;r=e&&(e=i+1);!(o=s[e])&&++e0&&(t=t.slice(0,s));var u=Io.get(t);return u&&(t=u,l=J),s?e?i:n:e?M:a}function Z(t,e){return function(r){var n=uo.event;uo.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{uo.event=n}}}function J(t,e){var r=Z(t,e);return function(t){var e=this,n=t.relatedTarget;n&&(n===e||8&n.compareDocumentPosition(e))||r.call(e,t)}}function K(t){var r=".dragsuppress-"+ ++Oo,i="click"+r,a=uo.select(n(t)).on("touchmove"+r,T).on("dragstart"+r,T).on("selectstart"+r,T);if(null==Po&&(Po=!("onselectstart"in t)&&w(t.style,"userSelect")),Po){var o=e(t).style,s=o[Po];o[Po]="none"}return function(t){if(a.on(r,null),Po&&(o[Po]=s),t){var e=function(){a.on(i,null)};a.on(i,function(){T(),e()},!0),setTimeout(e,0)}}}function Q(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(Ro<0){var a=n(t);if(a.scrollX||a.scrollY){r=uo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Ro=!(o.f||o.e),r.remove()}}return Ro?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function $(){return uo.event.changedTouches[0].identifier}function tt(t){return t>0?1:t<0?-1:0}function et(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function rt(t){return t>1?0:t<-1?No:Math.acos(t)}function nt(t){return t>1?Vo:t<-1?-Vo:Math.asin(t)}function it(t){return((t=Math.exp(t))-1/t)/2}function at(t){return((t=Math.exp(t))+1/t)/2}function ot(t){return((t=Math.exp(2*t))-1)/(t+1)}function st(t){return(t=Math.sin(t/2))*t}function lt(){}function ut(t,e,r){return this instanceof ut?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof ut?new ut(t.h,t.s,t.l):Mt(""+t,At,ut):new ut(t,e,r)}function ct(t,e,r){function n(t){return t>360?t-=360:t<0&&(t+=360),t<60?a+(o-a)*t/60:t<180?o:t<240?a+(o-a)*(240-t)/60:a}function i(t){return Math.round(255*n(t))}var a,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,r=r<0?0:r>1?1:r,o=r<=.5?r*(1+e):r+e-r*e,a=2*r-o,new bt(i(t+120),i(t),i(t-120))}function ht(t,e,r){return this instanceof ht?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof ht?new ht(t.h,t.c,t.l):t instanceof dt?mt(t.l,t.a,t.b):mt((t=kt((t=uo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ht(t,e,r)}function ft(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new dt(r,Math.cos(t*=Ho)*e,Math.sin(t)*e)}function dt(t,e,r){return this instanceof dt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof dt?new dt(t.l,t.a,t.b):t instanceof ht?ft(t.h,t.c,t.l):kt((t=bt(t)).r,t.g,t.b):new dt(t,e,r)}function pt(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return i=gt(i)*Qo,n=gt(n)*$o,a=gt(a)*ts,new bt(yt(3.2404542*i-1.5371385*n-.4985314*a),yt(-.969266*i+1.8760108*n+.041556*a),yt(.0556434*i-.2040259*n+1.0572252*a))}function mt(t,e,r){return t>0?new ht(Math.atan2(r,e)*qo,Math.sqrt(e*e+r*r),t):new ht(0/0,0/0,t)}function gt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function vt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function yt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function bt(t,e,r){return this instanceof bt?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof bt?new bt(t.r,t.g,t.b):Mt(""+t,bt,ct):new bt(t,e,r)}function xt(t){return new bt(t>>16,t>>8&255,255&t)}function _t(t){return xt(t)+""}function wt(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function Mt(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(St(i[0]),St(i[1]),St(i[2]))}return(a=ns.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function At(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e0&&l<1?0:n),new ut(n,i,l)}function kt(t,e,r){t=Tt(t),e=Tt(e),r=Tt(r);var n=vt((.4124564*t+.3575761*e+.1804375*r)/Qo),i=vt((.2126729*t+.7151522*e+.072175*r)/$o);return dt(116*i-16,500*(n-i),200*(i-vt((.0193339*t+.119192*e+.9503041*r)/ts)))}function Tt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function St(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Et(t){return"function"==typeof t?t:function(){return t}}function Lt(t){return function(e,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),Ct(e,r,t,n)}}function Ct(t,e,r,n){function i(){var t,e=l.status;if(!e&&zt(l)||e>=200&&e<300||304===e){try{t=r.call(a,l)}catch(t){return void o.error.call(a,t)}o.load.call(a,t)}else o.error.call(a,l)}var a={},o=uo.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(t){var e=uo.event;uo.event=t;try{o.progress.call(a,l)}finally{uo.event=e}},a.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==e?delete s[t]:s[t]=e+"",a)},a.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",a):e},a.responseType=function(t){return arguments.length?(u=t,a):u},a.response=function(t){return r=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(ho(arguments)))}}),a.send=function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),l.open(r,t,!0),null==e||"accept"in s||(s.accept=e+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=u&&(l.responseType=u),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),o.beforesend.call(a,l),l.send(null==n?null:n),a},a.abort=function(){return l.abort(),a},uo.rebind(a,o,"on"),null==n?a:a.get(Dt(n))}function Dt(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}function zt(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function It(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i=r+e,a={c:t,t:i,n:null};return as?as.n=a:is=a,as=a,os||(ss=clearTimeout(ss),os=1,ls(Pt)),a}function Pt(){var t=Ot(),e=Rt()-t;e>24?(isFinite(e)&&(clearTimeout(ss),ss=setTimeout(Pt,e)),os=0):(os=1,ls(Pt))}function Ot(){for(var t=Date.now(),e=is;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Rt(){for(var t,e=is,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}}function Nt(t){var e=t.decimal,r=t.thousands,n=t.grouping,i=t.currency,a=n&&r?function(t,e){for(var i=t.length,a=[],o=0,s=n[0],l=0;i>0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>e));)s=n[o=(o+1)%n.length];return a.reverse().join(r)}:x;return function(t){var r=cs.exec(t),n=r[1]||" ",o=r[2]||">",s=r[3]||"-",l=r[4]||"",u=r[5],c=+r[6],h=r[7],f=r[8],d=r[9],p=1,m="",g="",v=!1,y=!0;switch(f&&(f=+f.substring(1)),(u||"0"===n&&"="===o)&&(u=n="0",o="="),d){case"n":h=!0,d="g";break;case"%":p=100,g="%",d="f";break;case"p":p=100,g="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(m="0"+d.toLowerCase());case"c":y=!1;case"d":v=!0,f=0;break;case"s":p=-1,d="r"}"$"===l&&(m=i[0],g=i[1]),"r"!=d||f||(d="g"),null!=f&&("g"==d?f=Math.max(1,Math.min(21,f)):"e"!=d&&"f"!=d||(f=Math.max(0,Math.min(20,f)))),d=hs.get(d)||Bt;var b=u&&h;return function(t){var r=g;if(v&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===s?"":s;if(p<0){var l=uo.formatPrefix(t,f);t=l.scale(t),r=l.symbol+g}else t*=p;t=d(t,f);var x,_,w=t.lastIndexOf(".");if(w<0){var M=y?t.lastIndexOf("e"):-1;M<0?(x=t,_=""):(x=t.substring(0,M),_=t.substring(M))}else x=t.substring(0,w),_=e+t.substring(w+1);!u&&h&&(x=a(x,1/0));var A=m.length+x.length+_.length+(b?0:i.length),k=A"===o?k+i+t:"^"===o?k.substring(0,A>>=1)+i+t+k.substring(A):i+(b?t:k+t))+r}}}function Bt(t){return t+""}function Ut(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Vt(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r1)for(;o=u)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=L[o in ms?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}function n(t,e,r){w.lastIndex=0;var n=w.exec(e.slice(r));return n?(t.w=M.get(n[0].toLowerCase()),r+n[0].length):-1}function i(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.w=_.get(n[0].toLowerCase()),r+n[0].length):-1}function a(t,e,r){T.lastIndex=0;var n=T.exec(e.slice(r));return n?(t.m=S.get(n[0].toLowerCase()),r+n[0].length):-1}function o(t,e,r){A.lastIndex=0;var n=A.exec(e.slice(r));return n?(t.m=k.get(n[0].toLowerCase()),r+n[0].length):-1}function s(t,e,n){return r(t,E.c.toString(),e,n)}function l(t,e,n){return r(t,E.x.toString(),e,n)}function u(t,e,n){return r(t,E.X.toString(),e,n)}function c(t,e,r){var n=b.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)}var h=t.dateTime,f=t.date,d=t.time,p=t.periods,m=t.days,g=t.shortDays,v=t.months,y=t.shortMonths;e.utc=function(t){function r(t){try{ds=Ut;var e=new ds;return e._=t,n(e)}finally{ds=Date}}var n=e(t);return r.parse=function(t){try{ds=Ut;var e=n.parse(t);return e&&e._}finally{ds=Date}},r.toString=n.toString,r},e.multi=e.utc.multi=ce;var b=uo.map(),x=Yt(m),_=Wt(m),w=Yt(g),M=Wt(g),A=Yt(v),k=Wt(v),T=Yt(y),S=Wt(y);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var E={a:function(t){return g[t.getDay()]},A:function(t){return m[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return v[t.getMonth()]},c:e(h),d:function(t,e){return Gt(t.getDate(),e,2)},e:function(t,e){return Gt(t.getDate(),e,2)},H:function(t,e){return Gt(t.getHours(),e,2)},I:function(t,e){return Gt(t.getHours()%12||12,e,2)},j:function(t,e){return Gt(1+fs.dayOfYear(t),e,3)},L:function(t,e){return Gt(t.getMilliseconds(),e,3)},m:function(t,e){return Gt(t.getMonth()+1,e,2)},M:function(t,e){return Gt(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Gt(t.getSeconds(),e,2)},U:function(t,e){return Gt(fs.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Gt(fs.mondayOfYear(t),e,2)},x:e(f),X:e(d),y:function(t,e){return Gt(t.getFullYear()%100,e,2)},Y:function(t,e){return Gt(t.getFullYear()%1e4,e,4)},Z:le,"%":function(){return"%"}},L={a:n,A:i,b:a,B:o,c:s,d:re,e:re,H:ie,I:ie,j:ne,L:se,m:ee,M:ae,p:c,S:oe,U:Zt,w:Xt,W:Jt,x:l,X:u,y:Qt,Y:Kt,Z:$t,"%":ue};return e}function Gt(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a68?1900:2e3)}function ee(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function re(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function ne(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function ie(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function ae(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function oe(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function se(t,e,r){gs.lastIndex=0;var n=gs.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function le(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=xo(e)/60|0,i=xo(e)%60;return r+Gt(n,"0",2)+Gt(i,"0",2)}function ue(t,e,r){vs.lastIndex=0;var n=vs.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function ce(t){for(var e=t.length,r=-1;++r=0?1:-1,s=o*r,l=Math.cos(e),u=Math.sin(e),c=a*u,h=i*l+c*Math.cos(s),f=c*o*Math.sin(s);Ms.add(Math.atan2(f,h)),n=t,i=l,a=u}var e,r,n,i,a;As.point=function(o,s){As.point=t,n=(e=o)*Ho,i=Math.cos(s=(r=s)*Ho/2+No/4),a=Math.sin(s)},As.lineEnd=function(){t(e,r)}}function ve(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function ye(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function be(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function xe(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _e(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function we(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Me(t){return[Math.atan2(t[1],t[0]),nt(t[2])]}function Ae(t,e){return xo(t[0]-e[0])=0;--s)i.point((h=c[s])[0],h[1])}else n(d.x,d.p.x,-1,i);d=d.p}d=d.o,c=d.z,p=!p}while(!d.v);i.lineEnd()}}}function Ie(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n0){for(_||(a.polygonStart(),_=!0),a.lineStart();++o1&&2&e&&r.push(r.pop().concat(r.shift())),d.push(r.filter(Re))}var d,p,m,g=e(a),v=i.invert(n[0],n[1]),y={point:o,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=h,y.lineEnd=f,d=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=l,y.lineEnd=u,d=uo.merge(d);var t=Ve(v,p);d.length?(_||(a.polygonStart(),_=!0),ze(d,Fe,t,r,a)):t&&(_||(a.polygonStart(),_=!0),a.lineStart(),r(null,null,1,a),a.lineEnd()),_&&(a.polygonEnd(),_=!1),d=p=null},sphere:function(){a.polygonStart(),a.lineStart(),r(null,null,1,a),a.lineEnd(),a.polygonEnd()}},b=je(),x=e(b),_=!1;return y}}function Re(t){return t.length>1}function je(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:M,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Fe(t,e){ +return((t=t.x)[0]<0?t[1]-Vo-jo:Vo-t[1])-((e=e.x)[0]<0?e[1]-Vo-jo:Vo-e[1])}function Ne(t){var e,r=0/0,n=0/0,i=0/0;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?No:-No,l=xo(a-r);xo(l-No)0?Vo:-Vo),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=No&&(xo(r-i)jo?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}function Ue(t,e,r,n){var i;if(null==t)i=r*Vo,n.point(-No,i),n.point(0,i),n.point(No,i),n.point(No,0),n.point(No,-i),n.point(0,-i),n.point(-No,-i),n.point(-No,0),n.point(-No,i);else if(xo(t[0]-e[0])>jo){var a=t[0]=0?1:-1,M=w*_,A=M>No,k=p*b;if(Ms.add(Math.atan2(k*w*Math.sin(M),m*x+k*Math.cos(M))),a+=A?_+w*Bo:_,A^f>=r^v>=r){var T=be(ve(h),ve(t));we(T);var S=be(i,T);we(S);var E=(A^_>=0?-1:1)*nt(S[2]);(n>E||n===E&&(T[0]||T[1]))&&(o+=A^_>=0?1:-1)}if(!g++)break;f=v,p=b,m=x,h=t}}return(a<-jo||aa}function r(t){var r,a,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(h,f){var d,p=[h,f],m=e(h,f),g=o?m?0:i(h,f):m?i(h+(h<0?No:-No),f):0;if(!r&&(u=l=m)&&t.lineStart(),m!==l&&(d=n(r,p),(Ae(r,d)||Ae(p,d))&&(p[0]+=jo,p[1]+=jo,m=e(p[0],p[1]))),m!==l)c=0,m?(t.lineStart(),d=n(p,r),t.point(d[0],d[1])):(d=n(r,p),t.point(d[0],d[1]),t.lineEnd()),r=d;else if(s&&r&&o^m){var v;g&a||!(v=n(p,r,!0))||(c=0,o?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||r&&Ae(r,p)||t.point(p[0],p[1]),r=p,l=m,a=g},lineEnd:function(){l&&t.lineEnd(),r=null},clean:function(){return c|(u&&l)<<1}}}function n(t,e,r){var n=ve(t),i=ve(e),o=[1,0,0],s=be(n,i),l=ye(s,s),u=s[0],c=l-u*u;if(!c)return!r&&t;var h=a*l/c,f=-a*u/c,d=be(o,s),p=_e(o,h);xe(p,_e(s,f));var m=d,g=ye(p,m),v=ye(m,m),y=g*g-v*(ye(p,p)-1);if(!(y<0)){var b=Math.sqrt(y),x=_e(m,(-g-b)/v);if(xe(x,p),x=Me(x),!r)return x;var _,w=t[0],M=e[0],A=t[1],k=e[1];M0^x[1]<(xo(x[0]-w)No^(w<=x[0]&&x[0]<=M)){var L=_e(m,(-g+b)/v);return xe(L,p),[x,Me(L)]}}}function i(e,r){var n=o?t:No-t,i=0;return e<-n?i|=1:e>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}var a=Math.cos(t),o=a>0,s=xo(a)>jo;return Oe(e,r,gr(t,6*Ho),o?[0,-t]:[-No,t-No])}function qe(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,u=o.y,c=s.x,h=s.y,f=0,d=1,p=c-l,m=h-u;if(a=t-l,p||!(a>0)){if(a/=p,p<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>d)return;a>f&&(f=a)}else if(p>0){if(a0)){if(a/=m,m<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=n-u,m||!(a<0)){if(a/=m,m<0){if(a>d)return;a>f&&(f=a)}else if(m>0){if(a0&&(i.a={x:l+f*p,y:u+f*m}),d<1&&(i.b={x:l+d*p,y:u+d*m}),i}}}}}}function Ge(t,e,r,n){function i(n,i){return xo(n[0]-t)0?0:3:xo(n[0]-r)0?2:1:xo(n[1]-e)0?1:0:i>0?3:2}function a(t,e){return o(t.x,e.x)}function o(t,e){var r=i(t,1),n=i(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(s){function l(t){for(var e=0,r=g.length,n=t[1],i=0;in&&et(u,a,t)>0&&++e:a[1]<=n&&et(u,a,t)<0&&--e,u=a;return 0!==e}function u(a,s,l,u){var c=0,h=0;if(null==a||(c=i(a,l))!==(h=i(s,l))||o(a,s)<0^l>0)do{u.point(0===c||3===c?t:r,c>1?n:e)}while((c=(c+l+4)%4)!==h);else u.point(s[0],s[1])}function c(i,a){return t<=i&&i<=r&&e<=a&&a<=n}function h(t,e){c(t,e)&&s.point(t,e)}function f(){L.point=p,g&&g.push(v=[]),A=!0,M=!1,_=w=0/0}function d(){m&&(p(y,b),x&&M&&S.rejoin(),m.push(S.buffer())),L.point=h,M&&s.lineEnd()}function p(t,e){t=Math.max(-Fs,Math.min(Fs,t)),e=Math.max(-Fs,Math.min(Fs,e));var r=c(t,e);if(g&&v.push([t,e]),A)y=t,b=e,x=r,A=!1,r&&(s.lineStart(),s.point(t,e));else if(r&&M)s.point(t,e);else{var n={a:{x:_,y:w},b:{x:t,y:e}};E(n)?(M||(s.lineStart(),s.point(n.a.x,n.a.y)),s.point(n.b.x,n.b.y),r||s.lineEnd(),k=!1):r&&(s.lineStart(),s.point(t,e),k=!1)}_=t,w=e,M=r}var m,g,v,y,b,x,_,w,M,A,k,T=s,S=je(),E=qe(t,e,r,n),L={point:h,lineStart:f,lineEnd:d,polygonStart:function(){s=S,m=[],g=[],k=!0},polygonEnd:function(){s=T,m=uo.merge(m);var e=l([t,n]),r=k&&e,i=m.length;(r||i)&&(s.polygonStart(),r&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),i&&ze(m,a,e,u,s),s.polygonEnd()),m=g=v=null}};return L}}function Ye(t){var e=0,r=No/3,n=lr(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*No/180,r=t[1]*No/180):[e/No*180,r/No*180]},i}function We(t,e){function r(t,e){var r=Math.sqrt(a-2*i*Math.sin(e))/i;return[r*Math.sin(t*=i),o-r*Math.cos(t)]}var n=Math.sin(t),i=(n+Math.sin(e))/2,a=1+n*(2*i-n),o=Math.sqrt(a)/i;return r.invert=function(t,e){var r=o-e;return[Math.atan2(t,r)/i,nt((a-(t*t+r*r)*i*i)/(2*i))]},r}function Xe(){function t(t,e){Bs+=i*t-n*e,n=t,i=e}var e,r,n,i;Gs.point=function(a,o){Gs.point=t,e=n=a,r=i=o},Gs.lineEnd=function(){t(e,r)}}function Ze(t,e){tHs&&(Hs=t),eqs&&(qs=e)}function Je(){function t(t,e){o.push("M",t,",",e,a)}function e(t,e){o.push("M",t,",",e),s.point=r}function r(t,e){o.push("L",t,",",e)}function n(){s.point=t}function i(){o.push("Z")}var a=Ke(4.5),o=[],s={point:t,lineStart:function(){s.point=e},lineEnd:n,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=n,s.point=t},pointRadius:function(t){return a=Ke(t),s},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return s}function Ke(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Qe(t,e){Ss+=t,Es+=e,++Ls}function $e(){function t(t,n){var i=t-e,a=n-r,o=Math.sqrt(i*i+a*a);Cs+=o*(e+t)/2,Ds+=o*(r+n)/2,zs+=o,Qe(e=t,r=n)}var e,r;Ws.point=function(n,i){Ws.point=t,Qe(e=n,r=i)}}function tr(){Ws.point=Qe}function er(){function t(t,e){var r=t-n,a=e-i,o=Math.sqrt(r*r+a*a);Cs+=o*(n+t)/2,Ds+=o*(i+e)/2,zs+=o,o=i*t-n*e,Is+=o*(n+t),Ps+=o*(i+e),Os+=3*o,Qe(n=t,i=e)}var e,r,n,i;Ws.point=function(a,o){Ws.point=t,Qe(e=n=a,r=i=o)},Ws.lineEnd=function(){t(e,r)}}function rr(t){function e(e,r){t.moveTo(e+o,r),t.arc(e,r,o,0,Bo)}function r(e,r){t.moveTo(e,r),s.point=n}function n(e,r){t.lineTo(e,r)}function i(){s.point=e}function a(){t.closePath()}var o=4.5,s={point:e,lineStart:function(){s.point=r},lineEnd:i,polygonStart:function(){s.lineEnd=a},polygonEnd:function(){s.lineEnd=i,s.point=e},pointRadius:function(t){return o=t,s},result:M};return s}function nr(t){function e(t){return(s?n:r)(t)}function r(e){return or(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})}function n(e){function r(r,n){r=t(r,n),e.point(r[0],r[1])}function n(){b=0/0,A.point=a,e.lineStart()}function a(r,n){var a=ve([r,n]),o=t(r,n);i(b,x,y,_,w,M,b=o[0],x=o[1],y=r,_=a[0],w=a[1],M=a[2],s,e),e.point(b,x)}function o(){A.point=r,e.lineEnd()}function l(){n(),A.point=u,A.lineEnd=c}function u(t,e){a(h=t,f=e),d=b,p=x,m=_,g=w,v=M,A.point=a}function c(){i(b,x,y,_,w,M,d,p,h,m,g,v,s,e),A.lineEnd=o,o()}var h,f,d,p,m,g,v,y,b,x,_,w,M,A={point:r,lineStart:n,lineEnd:o,polygonStart:function(){e.polygonStart(),A.lineStart=l},polygonEnd:function(){e.polygonEnd(),A.lineStart=n}};return A}function i(e,r,n,s,l,u,c,h,f,d,p,m,g,v){var y=c-e,b=h-r,x=y*y+b*b;if(x>4*a&&g--){var _=s+d,w=l+p,M=u+m,A=Math.sqrt(_*_+w*w+M*M),k=Math.asin(M/=A),T=xo(xo(M)-1)a||xo((y*C+b*D)/x-.5)>.3||s*d+l*p+u*m0&&16,e):Math.sqrt(a)},e}function ir(t){var e=nr(function(e,r){return t([e*qo,r*qo])});return function(t){return ur(e(t))}}function ar(t){this.stream=t}function or(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function sr(t){return lr(function(){return t})()}function lr(t){function e(t){return t=s(t[0]*Ho,t[1]*Ho),[t[0]*f+l,u-t[1]*f]}function r(t){return(t=s.invert((t[0]-l)/f,(u-t[1])/f))&&[t[0]*qo,t[1]*qo]}function n(){s=Ce(o=fr(v,y,b),a);var t=a(m,g);return l=d-t[0]*f,u=p+t[1]*f,i()}function i(){return c&&(c.valid=!1,c=null),e}var a,o,s,l,u,c,h=nr(function(t,e){return t=a(t,e),[t[0]*f+l,u-t[1]*f]}),f=150,d=480,p=250,m=0,g=0,v=0,y=0,b=0,_=js,w=x,M=null,A=null;return e.stream=function(t){return c&&(c.valid=!1),c=ur(_(o,h(w(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(_=null==t?(M=t,js):He((M=+t)*Ho),i()):M},e.clipExtent=function(t){return arguments.length?(A=t,w=t?Ge(t[0][0],t[0][1],t[1][0],t[1][1]):x,i()):A},e.scale=function(t){return arguments.length?(f=+t,n()):f},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],n()):[d,p]},e.center=function(t){return arguments.length?(m=t[0]%360*Ho,g=t[1]%360*Ho,n()):[m*qo,g*qo]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Ho,y=t[1]%360*Ho,b=t.length>2?t[2]%360*Ho:0,n()):[v*qo,y*qo,b*qo]},uo.rebind(e,h,"precision"),function(){return a=t.apply(this,arguments),e.invert=a.invert&&r,n()}}function ur(t){return or(t,function(e,r){t.point(e*Ho,r*Ho)})}function cr(t,e){return[t,e]}function hr(t,e){return[t>No?t-Bo:t<-No?t+Bo:t,e]}function fr(t,e,r){return t?e||r?Ce(pr(t),mr(e,r)):pr(t):e||r?mr(e,r):hr}function dr(t){return function(e,r){return e+=t,[e>No?e-Bo:e<-No?e+Bo:e,r]}}function pr(t){var e=dr(t);return e.invert=dr(-t),e}function mr(t,e){function r(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,u=Math.sin(e),c=u*n+s*i;return[Math.atan2(l*a-c*o,s*n-u*i),nt(c*a+l*o)]}var n=Math.cos(t),i=Math.sin(t),a=Math.cos(e),o=Math.sin(e);return r.invert=function(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,u=Math.sin(e),c=u*a-l*o;return[Math.atan2(l*a+u*o,s*n+c*i),nt(c*n-s*i)]},r}function gr(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=vr(r,i),a=vr(r,a),(o>0?ia)&&(i+=o*Bo)):(i=t+o*Bo,a=t-.5*l);for(var u,c=i;o>0?c>a:c0?e<-Vo+jo&&(e=-Vo+jo):e>Vo-jo&&(e=Vo-jo);var r=o/Math.pow(i(e),a);return[r*Math.sin(a*t),o-r*Math.cos(a*t)]}var n=Math.cos(t),i=function(t){return Math.tan(No/4+t/2)},a=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(i(e)/i(t)),o=n*Math.pow(i(t),a)/a;return a?(r.invert=function(t,e){var r=o-e,n=tt(a)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/a,2*Math.atan(Math.pow(o/n,1/a))-Vo]},r):Sr}function Tr(t,e){function r(t,e){var r=a-e;return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}var n=Math.cos(t),i=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),a=n/i+t;return xo(i)1&&et(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function Ir(t,e){return t[0]-e[0]||t[1]-e[1]}function Pr(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function Or(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],u=r[1],c=e[1]-l,h=n[1]-u,f=(s*(l-u)-h*(i-a))/(h*o-s*c);return[i+f*o,l+f*c]}function Rr(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}function jr(){an(this),this.edge=this.site=this.circle=null}function Fr(t){var e=sl.pop()||new jr;return e.site=t,e}function Nr(t){Zr(t),il.remove(t),sl.push(t),an(t)}function Br(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];Nr(t);for(var l=a;l.circle&&xo(r-l.circle.x)jo)s=s.L;else{if(!((i=a-Hr(s,o))>jo)){n>-jo?(e=s.P,r=s):i>-jo?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=Fr(t);if(il.insert(e,l),e||r){if(e===r)return Zr(e),r=Fr(e.site),il.insert(l,r),l.edge=r.edge=$r(e.site,l.site),Xr(e),void Xr(r);if(!r)return void(l.edge=$r(e.site,l.site));Zr(e),Zr(r);var u=e.site,c=u.x,h=u.y,f=t.x-c,d=t.y-h,p=r.site,m=p.x-c,g=p.y-h,v=2*(f*g-d*m),y=f*f+d*d,b=m*m+g*g,x={x:(g*y-d*b)/v+c,y:(f*b-m*y)/v+h};en(r.edge,u,p,x),l.edge=$r(u,t,null,x),r.edge=$r(t,p,null,x),Xr(e),Xr(r)}}function Vr(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;r=o.site;var s=r.x,l=r.y,u=l-e;if(!u)return s;var c=s-n,h=1/a-1/u,f=c/u;return h?(-f+Math.sqrt(f*f-2*h*(c*c/(-2*u)-l+u/2+i-a/2)))/h+n:(n+s)/2}function Hr(t,e){var r=t.N;if(r)return Vr(r,e);var n=t.site;return n.y===e?n.x:1/0}function qr(t){this.site=t,this.edges=[]}function Gr(t){for(var e,r,n,i,a,o,s,l,u,c,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],m=nl,g=m.length;g--;)if((a=m[g])&&a.prepare())for(s=a.edges,l=s.length,o=0;ojo||xo(i-r)>jo)&&(s.splice(o,0,new rn(tn(a.site,c,xo(n-h)jo?{x:h,y:xo(e-h)jo?{x:xo(r-p)jo?{x:f,y:xo(e-f)jo?{x:xo(r-d)=-Fo)){var d=l*l+u*u,p=c*c+h*h,m=(h*d-u*p)/f,g=(l*p-c*d)/f,h=g+s,v=ll.pop()||new Wr;v.arc=t,v.site=i,v.x=m+o,v.y=h+Math.sqrt(m*m+g*g),v.cy=h,t.circle=v;for(var y=null,b=ol._;b;)if(v.y=s)return;if(f>p){if(a){if(a.y>=u)return}else a={x:g,y:l};r={x:g,y:u}}else{if(a){if(a.y1)if(f>p){if(a){if(a.y>=u)return}else a={x:(l-i)/n,y:l};r={x:(u-i)/n,y:u}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.xa||h>o||f=x,M=r>=_,A=M<<1|w,k=A+4;Aa&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:bn(r,n)})),a=hl.lastIndex;return a=0&&!(r=uo.interpolators[n](t,e)););return r}function wn(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1?1:t(e)}}function An(t){return function(e){return 1-t(1-e)}}function kn(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Tn(t){return t*t}function Sn(t){return t*t*t}function En(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Ln(t){return function(e){return Math.pow(e,t)}}function Cn(t){return 1-Math.cos(t*Vo)}function Dn(t){return Math.pow(2,10*(t-1))}function zn(t){return 1-Math.sqrt(1-t*t)}function In(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/Bo*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Bo/e)}}function Pn(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function On(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Rn(t,e){t=uo.hcl(t),e=uo.hcl(e);var r=t.h,n=t.c,i=t.l,a=e.h-r,o=e.c-n,s=e.l-i;return isNaN(o)&&(o=0,n=isNaN(n)?e.c:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return ft(r+a*t,n+o*t,i+s*t)+""}}function jn(t,e){t=uo.hsl(t),e=uo.hsl(e);var r=t.h,n=t.s,i=t.l,a=e.h-r,o=e.s-n,s=e.l-i;return isNaN(o)&&(o=0,n=isNaN(n)?e.s:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return ct(r+a*t,n+o*t,i+s*t)+""}}function Fn(t,e){t=uo.lab(t),e=uo.lab(e);var r=t.l,n=t.a,i=t.b,a=e.l-r,o=e.a-n,s=e.b-i;return function(t){return pt(r+a*t,n+o*t,i+s*t)+""}}function Nn(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Bn(t){var e=[t.a,t.b],r=[t.c,t.d],n=Vn(e),i=Un(e,r),a=Vn(Hn(r,e,-i))||0;e[0]*r[1]180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(qn(r)+"rotate(",null,")")-2,x:bn(t,e)})):e&&r.push(qn(r)+"rotate("+e+")")}function Wn(t,e,r,n){t!==e?n.push({i:r.push(qn(r)+"skewX(",null,")")-2,x:bn(t,e)}):e&&r.push(qn(r)+"skewX("+e+")")}function Xn(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(qn(r)+"scale(",null,",",null,")");n.push({i:i-4,x:bn(t[0],e[0])},{i:i-2,x:bn(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(qn(r)+"scale("+e+")")}function Zn(t,e){var r=[],n=[];return t=uo.transform(t),e=uo.transform(e),Gn(t.translate,e.translate,r,n),Yn(t.rotate,e.rotate,r,n),Wn(t.skew,e.skew,r,n),Xn(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,a=n.length;++i=0;)r.push(i[n])}function li(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++oi&&(n=r,i=e);return n}function bi(t){return t.reduce(xi,0)}function xi(t,e){return t+e[1]}function _i(t,e){return wi(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wi(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Mi(t){return[uo.min(t),uo.max(t)]}function Ai(t,e){return t.value-e.value}function ki(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Ti(t,e){t._pack_next=e,e._pack_prev=t}function Si(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Ei(t){function e(t){c=Math.min(t.x-t.r,c),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}if((r=t.children)&&(u=r.length)){var r,n,i,a,o,s,l,u,c=1/0,h=-1/0,f=1/0,d=-1/0;if(r.forEach(Li),n=r[0],n.x=-n.r,n.y=0,e(n),u>1&&(i=r[1],i.x=i.r,i.y=0,e(i),u>2))for(a=r[2],zi(n,i,a),e(a),ki(n,a),n._pack_prev=a,ki(a,i),i=n._pack_next,o=3;o=0;)e=i[a],e.z+=r,e.m+=r,r+=e.s+(n+=e.c)}function Fi(t,e,r){return t.a.parent===e.parent?t.a:r}function Ni(t){return 1+uo.max(t,function(t){return t.y})}function Bi(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Ui(t){var e=t.children;return e&&e.length?Ui(e[0]):t}function Vi(t){var e,r=t.children;return r&&(e=r.length)?Vi(r[e-1]):t}function Hi(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function qi(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i<0&&(r+=i/2,i=0),a<0&&(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function Gi(t){var e=t[0],r=t[t.length-1];return e2?Ji:Wi,l=n?Kn:Jn;return o=i(t,e,l,r),s=i(e,t,l,_n),a}function a(t){return o(t)}var o,s;return a.invert=function(t){return s(t)},a.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},a.range=function(t){return arguments.length?(e=t,i()):e},a.rangeRound=function(t){return a.range(t).interpolate(Nn)},a.clamp=function(t){return arguments.length?(n=t,i()):n},a.interpolate=function(t){return arguments.length?(r=t,i()):r},a.ticks=function(e){return ea(t,e)},a.tickFormat=function(e,r){return ra(t,e,r)},a.nice=function(e){return $i(t,e),i()},a.copy=function(){return Ki(t,e,r,n)},i()}function Qi(t,e){return uo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function $i(t,e){return Xi(t,Zi(ta(t,e)[2])),Xi(t,Zi(ta(t,e)[2])),t}function ta(t,e){null==e&&(e=10);var r=Gi(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function ea(t,e){return uo.range.apply(uo,ta(t,e))}function ra(t,e,r){var n=ta(t,e);if(r){var i=cs.exec(r);if(i.shift(),"s"===i[8]){var a=uo.formatPrefix(Math.max(xo(n[0]),xo(n[1])));return i[7]||(i[7]="."+na(a.scale(n[2]))),i[8]="f",r=uo.format(i.join("")),function(t){return r(a.scale(t))+a.symbol}}i[7]||(i[7]="."+ia(i[8],n)),r=i.join("")}else r=",."+na(n[2])+"f";return uo.format(r)}function na(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ia(t,e){var r=na(e[2]);return t in Ml?Math.abs(r-na(Math.max(xo(e[0]),xo(e[1]))))+ +("e"!==t):r-2*("%"===t)}function aa(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),o):e},o.nice=function(){var e=Xi(n.map(i),r?Math:kl);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Gi(n),o=[],s=t[0],l=t[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),h=e%1?2:e;if(isFinite(c-u)){if(r){for(;u0;f--)o.push(a(u)*f);for(u=0;o[u]l;c--);o=o.slice(u,c)}return o},o.tickFormat=function(t,r){if(!arguments.length)return Al;arguments.length<2?r=Al:"function"!=typeof r&&(r=uo.format(r));var n=Math.max(1,e*t/o.ticks().length);return function(t){var o=t/a(Math.round(i(t)));return o*e0?s[r-1]:t[0],r0?0:1}function xa(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,u=-s*a,c=t[0]+l,h=t[1]+u,f=e[0]+l,d=e[1]+u,p=(c+f)/2,m=(h+d)/2,g=f-c,v=d-h,y=g*g+v*v,b=r-n,x=c*d-f*h,_=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),w=(x*v-g*_)/y,M=(-x*g-v*_)/y,A=(x*v+g*_)/y,k=(-x*g+v*_)/y,T=w-p,S=M-m,E=A-p,L=k-m;return T*T+S*S>E*E+L*L&&(w=A,M=k),[[w-l,M-u],[w*r/b,M*r/b]]}function _a(t){function e(e){function o(){u.push("M",a(t(c),s))}for(var l,u=[],c=[],h=-1,f=e.length,d=Et(r),p=Et(n);++h1?t.join("L"):t+"Z"}function Ma(t){return t.join("L")+"Z"}function Aa(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1&&i.push("H",n[0]),i.join("")}function ka(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var u=2;u9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}function Ua(t){return t.length<3?wa(t):t[0]+Ca(t,Ba(t))}function Va(t){for(var e,r,n,i=-1,a=t.length;++i0;)d[--s].call(t,o);if(a>=1)return m.event&&m.event.end.call(t,t.__data__,e),--p.count?delete p[n]:delete t[r],1}var l,u,c,f,d,p=t[r]||(t[r]={active:0,count:0}),m=p[n];m||(l=i.time,u=It(a,0,l),m=p[n]={tween:new h,time:l,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++p.count)}function ro(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate("+(isFinite(n)?n:r(t))+",0)"})}function no(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate(0,"+(isFinite(n)?n:r(t))+")"})}function io(t){return t.toISOString()}function ao(t,e,r){function n(e){return t(e)}function i(t,r){var n=t[1]-t[0],i=n/r,a=uo.bisect(Jl,i);return a==Jl.length?[e.year,ta(t.map(function(t){return t/31536e6}),r)[2]]:a?e[i/Jl[a-1]1?{floor:function(e){for(;r(e=t.floor(e));)e=oo(e-1);return e},ceil:function(e){for(;r(e=t.ceil(e));)e=oo(+e+1);return e}}:t))},n.ticks=function(t,e){var r=Gi(n.domain()),a=null==t?i(r,10):"number"==typeof t?i(r,t):!t.range&&[{range:t},e];return a&&(t=a[0],e=a[1]),t.range(r[0],oo(+r[1]+1),e<1?1:e)},n.tickFormat=function(){return r},n.copy=function(){return ao(t.copy(),e,r)},Qi(n,t)}function oo(t){return new Date(t)}function so(t){return JSON.parse(t.responseText)}function lo(t){var e=fo.createRange();return e.selectNode(fo.body),e.createContextualFragment(t.responseText)}var uo={version:"3.5.17"},co=[].slice,ho=function(t){return co.call(t)},fo=this.document;if(fo)try{ho(fo.documentElement.childNodes)[0].nodeType}catch(t){ho=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),fo)try{fo.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var po=this.Element.prototype,mo=po.setAttribute,go=po.setAttributeNS,vo=this.CSSStyleDeclaration.prototype,yo=vo.setProperty;po.setAttribute=function(t,e){mo.call(this,t,e+"")},po.setAttributeNS=function(t,e,r){go.call(this,t,e,r+"")},vo.setProperty=function(t,e,r){yo.call(this,t,e+"",r)}}uo.ascending=i,uo.descending=function(t,e){return et?1:e>=t?0:0/0},uo.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},uo.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},uo.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return l/(c-1)},uo.deviation=function(){var t=uo.variance.apply(this,arguments);return t?Math.sqrt(t):t};var bo=s(i);uo.bisectLeft=bo.left,uo.bisect=uo.bisectRight=bo.right,uo.bisector=function(t){return s(1===t.length?function(e,r){return i(t(e),r)}:t)},uo.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},uo.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},uo.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(n=t[i],e=n.length;--e>=0;)r[--o]=n[e];return r};var xo=Math.abs;uo.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r===1/0)throw new Error("infinite range");var n,i=[],a=u(xo(r)),o=-1;if(t*=a,e*=a,r*=a,r<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)=a.length)return n?n.call(i,o):r?o.sort(r):o;for(var l,u,c,f,d=-1,p=o.length,m=a[s++],g=new h;++d=a.length)return t;var n=[],i=o[r++];return t.forEach(function(t,i){n.push({key:t,values:e(i,r)})}),i?n.sort(function(t,e){return i(t.key,e.key)}):n}var r,n,i={},a=[],o=[];return i.map=function(e,r){return t(r,e,0)},i.entries=function(r){return e(t(uo.map,r,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return r=t,i},i.rollup=function(t){return n=t,i},i},uo.set=function(t){var e=new b;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},uo.event=null,uo.requote=function(t){return t.replace(Ao,"\\$&")};var Ao=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ko={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]},To=function(t,e){return e.querySelector(t)},So=function(t,e){return e.querySelectorAll(t)},Eo=function(t,e){var r=t.matches||t[w(t,"matchesSelector")];return(Eo=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(To=function(t,e){return Sizzle(t,e)[0]||null},So=Sizzle,Eo=Sizzle.matchesSelector),uo.selection=function(){return uo.select(fo.documentElement)};var Lo=uo.selection.prototype=[];Lo.select=function(t){var e,r,n,i,a=[];t=C(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),Do.hasOwnProperty(r)?{space:Do[r],local:t}:t}},Lo.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return t=uo.ns.qualify(t),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(z(e,t[e]));return this}return this.each(z(t,e))},Lo.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=O(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},Lo.sort=function(t){t=q.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(e=e.transition().duration(L)),e.call(t.event)}function s(){_&&_.domain(x.range().map(function(t){return(t-A.x)/A.k}).map(x.invert)),M&&M.domain(w.range().map(function(t){return(t-A.y)/A.k}).map(w.invert))}function l(t){C++||t({type:"zoomstart"})}function u(t){s(),t({type:"zoom",scale:A.k,translate:[A.x,A.y]})}function c(t){--C||(t({type:"zoomend"}),g=null)}function h(){function t(){s=1,a(uo.mouse(i),f),u(o)}function r(){h.on(z,null).on(I,null),d(s),c(o)}var i=this,o=O.of(i,arguments),s=0,h=uo.select(n(i)).on(z,t).on(I,r),f=e(uo.mouse(i)),d=K(i);Bl.call(i),l(o)}function f(){function t(){var t=uo.touches(p);return d=A.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function r(){var e=uo.event.target;uo.select(e).on(x,n).on(_,s),w.push(e);for(var r=uo.event.changedTouches,i=0,a=r.length;i1){var c=l[0],h=l[1],f=c[0]-h[0],d=c[1]-h[1];v=f*f+d*d}}function n(){var t,e,r,n,o=uo.touches(p);Bl.call(p);for(var s=0,l=o.length;s=u)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,hs=uo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=uo.round(t,jt(t,e))).toFixed(Math.max(0,Math.min(20,jt(t*(1+1e-15),e))))}}),fs=uo.time={},ds=Date;Ut.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ps.setUTCDate.apply(this._,arguments)},setDay:function(){ps.setUTCDay.apply(this._,arguments)},setFullYear:function(){ps.setUTCFullYear.apply(this._,arguments)},setHours:function(){ps.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ps.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ps.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ps.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ps.setUTCSeconds.apply(this._,arguments)},setTime:function(){ps.setTime.apply(this._,arguments)}};var ps=Date.prototype;fs.year=Vt(function(t){return t=fs.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),fs.years=fs.year.range,fs.years.utc=fs.year.utc.range,fs.day=Vt(function(t){var e=new ds(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),fs.days=fs.day.range,fs.days.utc=fs.day.utc.range,fs.dayOfYear=function(t){var e=fs.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var r=fs[t]=Vt(function(t){return(t=fs.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=fs.year(t).getDay();return Math.floor((fs.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});fs[t+"s"]=r.range,fs[t+"s"].utc=r.utc.range,fs[t+"OfYear"]=function(t){var r=fs.year(t).getDay();return Math.floor((fs.dayOfYear(t)+(r+e)%7)/7)}}),fs.week=fs.sunday,fs.weeks=fs.sunday.range,fs.weeks.utc=fs.sunday.utc.range,fs.weekOfYear=fs.sundayOfYear;var ms={"-":"",_:" ",0:"0"},gs=/^\s*\d+/,vs=/^%/;uo.locale=function(t){return{numberFormat:Nt(t),timeFormat:qt(t)}};var ys=uo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});uo.format=ys.numberFormat,uo.geo={},he.prototype={s:0,t:0,add:function(t){fe(t,this.t,bs),fe(bs.s,this.s,this),this.s?this.t+=bs.t:this.s=bs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bs=new he;uo.geo.stream=function(t,e){t&&xs.hasOwnProperty(t.type)?xs[t.type](t,e):de(t,e)};var xs={Feature:function(t,e){de(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++nd&&(d=e)}function e(e,r){var n=ve([e*Ho,r*Ho]);if(v){var i=be(v,n),a=[i[1],-i[0],0],o=be(a,i);we(o),o=Me(o);var l=e-p,u=l>0?1:-1,m=o[0]*qo*u,g=xo(l)>180;if(g^(u*pd&&(d=y)}else if(m=(m+360)%360-180,g^(u*pd&&(d=r);g?es(c,f)&&(f=e):s(e,f)>s(c,f)&&(c=e):f>=c?(ef&&(f=e)):e>p?s(c,e)>s(c,f)&&(f=e):s(e,f)>s(c,f)&&(c=e)}else t(e,r);v=n,p=e}function r(){_.point=e}function n(){x[0]=c,x[1]=f,_.point=t,v=null}function i(t,r){if(v){var n=t-p;y+=xo(n)>180?n+(n>0?360:-360):n}else m=t,g=r;As.point(t,r),e(t,r)}function a(){As.lineStart()}function o(){i(m,g),As.lineEnd(),xo(y)>jo&&(c=-(f=180)),x[0]=c,x[1]=f,v=null}function s(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function u(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tjo?d=90:y<-jo&&(h=-90),x[0]=c,x[1]=f}};return function(t){d=f=-(c=h=1/0),b=[],uo.geo.stream(t,_);var e=b.length;if(e){b.sort(l);for(var r,n=1,i=b[0],a=[i];ns(i[0],i[1])&&(i[1]=r[1]),s(r[0],i[1])>s(i[0],i[1])&&(i[0]=r[0])):a.push(i=r);for(var o,r,p=-1/0,e=a.length-1,n=0,i=a[e];n<=e;i=r,++n)r=a[n],(o=s(i[1],r[0]))>p&&(p=o,c=r[0],f=i[1])}return b=x=null,1/0===c||1/0===h?[[0/0,0/0],[0/0,0/0]]:[[c,h],[f,d]]}}(),uo.geo.centroid=function(t){ks=Ts=Ss=Es=Ls=Cs=Ds=zs=Is=Ps=Os=0,uo.geo.stream(t,Rs);var e=Is,r=Ps,n=Os,i=e*e+r*r+n*n;return i=.12&&i<.234&&n>=-.425&&n<-.214?o:i>=.166&&i<.234&&n>=-.214&&n<-.115?s:a).invert(t)},t.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},t.precision=function(e){return arguments.length?(a.precision(e),o.precision(e),s.precision(e),t):a.precision()},t.scale=function(e){return arguments.length?(a.scale(e),o.scale(.35*e),s.scale(e),t.translate(a.translate())):a.scale()},t.translate=function(e){if(!arguments.length)return a.translate();var u=a.scale(),c=+e[0],h=+e[1];return r=a.translate(e).clipExtent([[c-.455*u,h-.238*u],[c+.455*u,h+.238*u]]).stream(l).point,n=o.translate([c-.307*u,h+.201*u]).clipExtent([[c-.425*u+jo,h+.12*u+jo],[c-.214*u-jo,h+.234*u-jo]]).stream(l).point,i=s.translate([c-.205*u,h+.212*u]).clipExtent([[c-.214*u+jo,h+.166*u+jo],[c-.115*u-jo,h+.234*u-jo]]).stream(l).point,t},t.scale(1070)};var Ns,Bs,Us,Vs,Hs,qs,Gs={point:M,lineStart:M,lineEnd:M,polygonStart:function(){Bs=0,Gs.lineStart=Xe},polygonEnd:function(){Gs.lineStart=Gs.lineEnd=Gs.point=M,Ns+=xo(Bs/2)}},Ys={point:Ze,lineStart:M,lineEnd:M,polygonStart:M,polygonEnd:M},Ws={point:Qe,lineStart:$e,lineEnd:tr,polygonStart:function(){Ws.lineStart=er},polygonEnd:function(){Ws.point=Qe,Ws.lineStart=$e,Ws.lineEnd=tr}};uo.geo.path=function(){function t(t){return t&&("function"==typeof s&&a.pointRadius(+s.apply(this,arguments)),o&&o.valid||(o=i(a)),uo.geo.stream(t,o)),a.result()}function e(){return o=null,t}var r,n,i,a,o,s=4.5;return t.area=function(t){return Ns=0,uo.geo.stream(t,i(Gs)),Ns},t.centroid=function(t){return Ss=Es=Ls=Cs=Ds=zs=Is=Ps=Os=0,uo.geo.stream(t,i(Ws)),Os?[Is/Os,Ps/Os]:zs?[Cs/zs,Ds/zs]:Ls?[Ss/Ls,Es/Ls]:[0/0,0/0]},t.bounds=function(t){return Hs=qs=-(Us=Vs=1/0),uo.geo.stream(t,i(Ys)),[[Us,Vs],[Hs,qs]]},t.projection=function(t){return arguments.length?(i=(r=t)?t.stream||ir(t):x,e()):r},t.context=function(t){return arguments.length?(a=null==(n=t)?new Je:new rr(t),"function"!=typeof s&&a.pointRadius(s),e()):n},t.pointRadius=function(e){return arguments.length?(s="function"==typeof e?e:(a.pointRadius(+e),+e),t):s},t.projection(uo.geo.albersUsa()).context(null)},uo.geo.transform=function(t){return{stream:function(e){var r=new ar(e);for(var n in t)r[n]=t[n];return r}}},ar.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},uo.geo.projection=sr,uo.geo.projectionMutator=lr,(uo.geo.equirectangular=function(){return sr(cr)}).raw=cr.invert=cr,uo.geo.rotation=function(t){function e(e){return e=t(e[0]*Ho,e[1]*Ho),e[0]*=qo,e[1]*=qo,e}return t=fr(t[0]%360*Ho,t[1]*Ho,t.length>2?t[2]*Ho:0),e.invert=function(e){return e=t.invert(e[0]*Ho,e[1]*Ho),e[0]*=qo,e[1]*=qo,e},e},hr.invert=cr,uo.geo.circle=function(){function t(){var t="function"==typeof n?n.apply(this,arguments):n,e=fr(-t[0]*Ho,-t[1]*Ho,0).invert,i=[];return r(null,null,1,{point:function(t,r){i.push(t=e(t,r)),t[0]*=qo,t[1]*=qo}}),{type:"Polygon",coordinates:[i]}}var e,r,n=[0,0],i=6;return t.origin=function(e){return arguments.length?(n=e,t):n},t.angle=function(n){return arguments.length?(r=gr((e=+n)*Ho,i*Ho),t):e},t.precision=function(n){return arguments.length?(r=gr(e*Ho,(i=+n)*Ho),t):i},t.angle(90)},uo.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Ho,i=t[1]*Ho,a=e[1]*Ho,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),u=Math.cos(i),c=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((r=h*o)*r+(r=u*c-l*h*s)*r),l*c+u*h*s)},uo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return uo.range(Math.ceil(a/g)*g,i,g).map(f).concat(uo.range(Math.ceil(u/v)*v,l,v).map(d)).concat(uo.range(Math.ceil(n/p)*p,r,p).filter(function(t){return xo(t%g)>jo}).map(c)).concat(uo.range(Math.ceil(s/m)*m,o,m).filter(function(t){return xo(t%v)>jo}).map(h))}var r,n,i,a,o,s,l,u,c,h,f,d,p=10,m=p,g=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(l).slice(1),f(i).reverse().slice(1),d(u).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(a=+e[0][0],i=+e[1][0],u=+e[0][1],l=+e[1][1],a>i&&(e=a,a=i,i=e),u>l&&(e=u,u=l,l=e),t.precision(y)):[[a,u],[i,l]]},t.minorExtent=function(e){return arguments.length?(n=+e[0][0],r=+e[1][0],s=+e[0][1],o=+e[1][1],n>r&&(e=n,n=r,r=e),s>o&&(e=s,s=o,o=e),t.precision(y)):[[n,s],[r,o]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(g=+e[0],v=+e[1],t):[g,v]},t.minorStep=function(e){return arguments.length?(p=+e[0],m=+e[1],t):[p,m]},t.precision=function(e){return arguments.length?(y=+e,c=yr(s,o,90),h=br(n,r,y),f=yr(u,l,90),d=br(a,i,y),t):y},t.majorExtent([[-180,-90+jo],[180,90-jo]]).minorExtent([[-180,-80-jo],[180,80+jo]])},uo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}var e,r,n=xr,i=_r;return t.distance=function(){return uo.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},t.source=function(r){return arguments.length?(n=r,e="function"==typeof r?null:r,t):n},t.target=function(e){return arguments.length?(i=e,r="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},uo.geo.interpolate=function(t,e){return wr(t[0]*Ho,t[1]*Ho,e[0]*Ho,e[1]*Ho)},uo.geo.length=function(t){return Xs=0,uo.geo.stream(t,Zs),Xs};var Xs,Zs={sphere:M,point:M,lineStart:Mr,lineEnd:M,polygonStart:M,polygonEnd:M},Js=Ar(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(uo.geo.azimuthalEqualArea=function(){return sr(Js)}).raw=Js;var Ks=Ar(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},x);(uo.geo.azimuthalEquidistant=function(){return sr(Ks)}).raw=Ks,(uo.geo.conicConformal=function(){return Ye(kr)}).raw=kr,(uo.geo.conicEquidistant=function(){return Ye(Tr)}).raw=Tr;var Qs=Ar(function(t){return 1/t},Math.atan);(uo.geo.gnomonic=function(){return sr(Qs)}).raw=Qs,Sr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Vo]},(uo.geo.mercator=function(){return Er(Sr)}).raw=Sr;var $s=Ar(function(){return 1},Math.asin);(uo.geo.orthographic=function(){return sr($s)}).raw=$s;var tl=Ar(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(uo.geo.stereographic=function(){return sr(tl)}).raw=tl,Lr.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Vo]},(uo.geo.transverseMercator=function(){var t=Er(Lr),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):(t=r(),[t[0],t[1],t[2]-90])},r([0,0,90])}).raw=Lr,uo.geom={},uo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=Et(r),a=Et(n),o=t.length,s=[],l=[];for(e=0;e=0;--e)d.push(t[s[u[e]][2]]);for(e=+h;e=n&&u.x<=a&&u.y>=i&&u.y<=o?[[n,o],[a,o],[a,i],[n,i]]:[]).point=t[s]}),e}function r(t){return t.map(function(t,e){return{x:Math.round(a(t,e)/jo)*jo,y:Math.round(o(t,e)/jo)*jo,i:e}})}var n=Cr,i=Dr,a=n,o=i,s=ul;return t?e(t):(e.links=function(t){return un(r(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return un(r(t)).cells.forEach(function(r,n){for(var i,a=r.site,o=r.edges.sort(Yr),s=-1,l=o.length,u=o[l-1].edge,c=u.l===a?u.r:u.l;++s=u,f=n>=c,d=f<<1|h;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=pn()),h?i=u:s=u,f?o=c:l=c,a(t,e,r,n,i,o,s,l)}var c,h,f,d,p,m,g,v,y,b=Et(s),x=Et(l);if(null!=e)m=e,g=r,v=n,y=i;else if(v=y=-(m=g=1/0),h=[],f=[],p=t.length,o)for(d=0;dv&&(v=c.x),c.y>y&&(y=c.y),h.push(c.x),f.push(c.y);else for(d=0;dv&&(v=_),w>y&&(y=w),h.push(_),f.push(w)}var M=v-m,A=y-g;M>A?y=g+M:v=m+A;var k=pn();if(k.add=function(t){a(k,t,+b(t,++d),+x(t,d),m,g,v,y)},k.visit=function(t){mn(t,k,m,g,v,y)},k.find=function(t){return gn(k,t[0],t[1],m,g,v,y)},d=-1,null==e){for(;++d=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return r=dl.get(r)||fl,n=pl.get(n)||x,Mn(n(r.apply(null,co.call(arguments,1))))},uo.interpolateHcl=Rn,uo.interpolateHsl=jn,uo.interpolateLab=Fn,uo.interpolateRound=Nn,uo.transform=function(t){var e=fo.createElementNS(uo.ns.prefix.svg,"g");return(uo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Bn(r?r.matrix:ml)})(t)},Bn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};uo.interpolateTransform=Zn,uo.layout={},uo.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r0?i=t:(r.c=null,r.t=0/0,r=null,u.end({type:"end",alpha:i=0})):t>0&&(u.start({type:"start",alpha:i=t}),r=It(l.tick)),l):i},l.start=function(){function t(t,n){if(!r){for(r=new Array(i),l=0;l=0;)o.push(c=u[l]),c.parent=a,c.depth=a.depth+1;n&&(a.value=0),a.children=u}else n&&(a.value=+n.call(t,a,a.depth)||0),delete a.children;return li(i,function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)}),s}var e=hi,r=ui,n=ci;return t.sort=function(r){return arguments.length?(e=r,t):e},t.children=function(e){return arguments.length?(r=e,t):r},t.value=function(e){return arguments.length?(n=e,t):n},t.revalue=function(e){return n&&(si(e,function(t){t.children&&(t.value=0)}),li(e,function(e){var r;e.children||(e.value=+n.call(t,e,e.depth)||0),(r=e.parent)&&(r.value+=e.value)})),e},t},uo.layout.partition=function(){function t(e,r,n,i){var a=e.children;if(e.x=r, +e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(n=e.value?n/e.value:0;++us&&(s=n),o.push(n)}for(r=0;r0)for(a=-1;++a=c[0]&&s<=c[1]&&(o=l[uo.bisect(h,s,1,d)-1],o.y+=p,o.push(t[a]));return l}var e=!0,r=Number,n=Mi,i=_i;return t.value=function(e){return arguments.length?(r=e,t):r},t.range=function(e){return arguments.length?(n=Et(e),t):n},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return wi(t,e)}:Et(e),t):i},t.frequency=function(r){return arguments.length?(e=!!r,t):e},t},uo.layout.pack=function(){function t(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],u=i[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,li(s,function(t){t.r=+c(t.value)}),li(s,Ei),n){var h=n*(e?1:Math.max(2*s.r/l,2*s.r/u))/2;li(s,function(t){t.r+=h}),li(s,Ei),li(s,function(t){t.r-=h})}return Di(s,l/2,u/2,e?1:1/Math.max(2*s.r/l,2*s.r/u)),o}var e,r=uo.layout.hierarchy().sort(Ai),n=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(r){return arguments.length?(e=null==r||"function"==typeof r?r:+r,t):e},t.padding=function(e){return arguments.length?(n=+e,t):n},oi(t,r)},uo.layout.tree=function(){function t(t,i){var c=o.call(this,t,i),h=c[0],f=e(h);if(li(f,r),f.parent.m=-f.z,si(f,n),u)si(h,a);else{var d=h,p=h,m=h;si(h,function(t){t.xp.x&&(p=t),t.depth>m.depth&&(m=t)});var g=s(d,p)/2-d.x,v=l[0]/(p.x+s(p,d)/2+g),y=l[1]/(m.depth||1);si(h,function(t){t.x=(t.x+g)*v,t.y=t.depth*y})}return c}function e(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o0&&(Ri(Fi(o,t,r),t,n),u+=n,c+=n),h+=o.m,u+=i.m,f+=l.m,c+=a.m;o&&!Oi(a)&&(a.t=o,a.m+=h-c),i&&!Pi(l)&&(l.t=i,l.m+=u-f,r=t)}return r}function a(t){t.x*=l[0],t.y=t.depth*l[1]}var o=uo.layout.hierarchy().sort(null).value(null),s=Ii,l=[1,1],u=null;return t.separation=function(e){return arguments.length?(s=e,t):s},t.size=function(e){return arguments.length?(u=null==(l=e)?a:null,t):u?null:l},t.nodeSize=function(e){return arguments.length?(u=null==(l=e)?null:a,t):u?l:null},oi(t,o)},uo.layout.cluster=function(){function t(t,a){var o,s=e.call(this,t,a),l=s[0],u=0;li(l,function(t){var e=t.children;e&&e.length?(t.x=Bi(e),t.y=Ni(e)):(t.x=o?u+=r(t,o):0,t.y=0,o=t)});var c=Ui(l),h=Vi(l),f=c.x-r(c,h)/2,d=h.x+r(h,c)/2;return li(l,i?function(t){t.x=(t.x-l.x)*n[0],t.y=(l.y-t.y)*n[1]}:function(t){t.x=(t.x-f)/(d-f)*n[0],t.y=(1-(l.y?t.y/l.y:1))*n[1]}),s}var e=uo.layout.hierarchy().sort(null).value(null),r=Ii,n=[1,1],i=!1;return t.separation=function(e){return arguments.length?(r=e,t):r},t.size=function(e){return arguments.length?(i=null==(n=e),t):i?null:n},t.nodeSize=function(e){return arguments.length?(i=null!=(n=e),t):i?n:null},oi(t,e)},uo.layout.treemap=function(){function t(t,e){for(var r,n,i=-1,a=t.length;++i0;)c.push(o=f[l-1]),c.area+=o.area,"squarify"!==d||(s=n(c,m))<=p?(f.pop(),p=s):(c.area-=c.pop().area,i(c,m,u,!1),m=Math.min(u.dx,u.dy),c.length=c.area=0,p=1/0);c.length&&(i(c,m,u,!0),c.length=c.area=0),a.forEach(e)}}function r(e){var n=e.children;if(n&&n.length){var a,o=h(e),s=n.slice(),l=[];for(t(s,o.dx*o.dy/e.value),l.area=0;a=s.pop();)l.push(a),l.area+=a.area,null!=a.z&&(i(l,a.z?o.dx:o.dy,o,!s.length),l.length=l.area=0);n.forEach(r)}}function n(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++oi&&(i=r));return n*=n,e*=e,n?Math.max(e*i*p/n,n/(e*a*p)):1/0}function i(t,e,r,n){var i,a=-1,o=t.length,s=r.x,u=r.y,c=e?l(t.area/e):0;if(e==r.dx){for((n||c>r.dy)&&(c=r.dy);++ar.dx)&&(c=r.dx);++a1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=uo.random.normal.apply(uo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=uo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;rh?0:1;if(u=Uo)return e(u,d)+(t?e(t,1-d):"")+"Z";var p,m,g,v,y,b,x,_,w,M,A,k,T=0,S=0,E=[];if((v=(+l.apply(this,arguments)||0)/2)&&(g=a===Cl?Math.sqrt(t*t+u*u):+a.apply(this,arguments),d||(S*=-1),u&&(S=nt(g/u*Math.sin(v))),t&&(T=nt(g/t*Math.sin(v)))),u){y=u*Math.cos(c+S),b=u*Math.sin(c+S),x=u*Math.cos(h-S),_=u*Math.sin(h-S);var L=Math.abs(h-c-2*S)<=No?0:1;if(S&&ba(y,b,x,_)===d^L){var C=(c+h)/2;y=u*Math.cos(C),b=u*Math.sin(C),x=_=null}}else y=b=0;if(t){w=t*Math.cos(h-T),M=t*Math.sin(h-T),A=t*Math.cos(c+T),k=t*Math.sin(c+T);var D=Math.abs(c-h+2*T)<=No?0:1;if(T&&ba(w,M,A,k)===1-d^D){var z=(c+h)/2;w=t*Math.cos(z),M=t*Math.sin(z),A=k=null}}else w=M=0;if(f>jo&&(p=Math.min(Math.abs(u-t)/2,+i.apply(this,arguments)))>.001){m=tNo)+",1 "+e}function i(t,e,r,n){return"Q 0,0 "+n}var a=xr,o=_r,s=qa,l=ga,u=va;return t.radius=function(e){return arguments.length?(s=Et(e),t):s},t.source=function(e){return arguments.length?(a=Et(e),t):a},t.target=function(e){return arguments.length?(o=Et(e),t):o},t.startAngle=function(e){return arguments.length?(l=Et(e),t):l},t.endAngle=function(e){return arguments.length?(u=Et(e),t):u},t},uo.svg.diagonal=function(){function t(t,i){var a=e.call(this,t,i),o=r.call(this,t,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return l=l.map(n),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=xr,r=_r,n=Ga;return t.source=function(r){return arguments.length?(e=Et(r),t):e},t.target=function(e){return arguments.length?(r=Et(e),t):r},t.projection=function(e){return arguments.length?(n=e,t):n},t},uo.svg.diagonal.radial=function(){var t=uo.svg.diagonal(),e=Ga,r=t.projection;return t.projection=function(t){return arguments.length?r(Ya(e=t)):e},t},uo.svg.symbol=function(){function t(t,n){return(Ol.get(e.call(this,t,n))||Za)(r.call(this,t,n))}var e=Xa,r=Wa;return t.type=function(r){return arguments.length?(e=Et(r),t):e},t.size=function(e){return arguments.length?(r=Et(e),t):r},t};var Ol=uo.map({circle:Za,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*jl)),r=e*jl;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Rl),r=e*Rl/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Rl),r=e*Rl/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});uo.svg.symbolTypes=Ol.keys();var Rl=Math.sqrt(3),jl=Math.tan(30*Ho);Lo.transition=function(t){for(var e,r,n=Fl||++Vl,i=to(t),a=[],o=Nl||{time:Date.now(),ease:En,delay:0,duration:250},s=-1,l=this.length;++srect,.s>rect").attr("width",h[1]-h[0])}function i(t){t.select(".extent").attr("y",f[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function a(){function a(){32==uo.event.keyCode&&(L||(b=null,D[0]-=h[1],D[1]-=f[1],L=2),T())}function m(){32==uo.event.keyCode&&2==L&&(D[0]+=h[1],D[1]+=f[1],L=0,T())}function g(){var t=uo.mouse(_),n=!1;x&&(t[0]+=x[0],t[1]+=x[1]),L||(uo.event.altKey?(b||(b=[(h[0]+h[1])/2,(f[0]+f[1])/2]),D[0]=h[+(t[0]=2)return!1;t[r]=n}return!0}):w.filter(function(t){for(var e=0;e<=o;++e){var r=y[t[e]];if(r<0)return!1;t[e]=r}return!0}),1&o)for(var h=0;h>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t("buffer").Buffer)},{buffer:67}],107:[function(t,e,r){"use strict";function n(t,e,r){var i=0|t[r];if(i<=0)return[];var a,o=new Array(i);if(r===t.length-1)for(a=0;a0)return i(0|t,e);break;case"object":if("number"==typeof t.length)return n(t,e,0)}return[]}e.exports=a},{}],108:[function(t,e,r){"use strict";function n(t,e,r){r=r||2;var n=e&&e.length,a=n?e[0]*r:t.length,s=i(t,0,a,r,!0),l=[];if(!s)return l;var u,c,f,d,p,m,g;if(n&&(s=h(t,e,s,r)),t.length>80*r){u=f=t[0],c=d=t[1];for(var v=r;vf&&(f=p),m>d&&(d=m);g=Math.max(f-u,d-c)}return o(s,l,r,u,c,g),l}function i(t,e,r,n,i){var a,o;if(i===D(t,e,r,n)>0)for(a=e;a=e;a-=n)o=E(a,t[a],t[a+1],o);return o&&w(o,o.next)&&(L(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!w(n,n.next)&&0!==_(n.prev,n,n.next))n=n.next;else{if(L(n),(n=e=n.prev)===n.next)return null;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,h,f){if(t){!f&&h&&m(t,n,i,h);for(var d,p,g=t;t.prev!==t.next;)if(d=t.prev,p=t.next,h?l(t,n,i,h):s(t))e.push(d.i/r),e.push(t.i/r),e.push(p.i/r),L(t),t=p.next,g=p.next;else if((t=p)===g){f?1===f?(t=u(t,e,r),o(t,e,r,n,i,h,2)):2===f&&c(t,e,r,n,i,h):o(a(t),e,r,n,i,h,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(_(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(b(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&_(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(_(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,h=v(s,l,e,r,n),f=v(u,c,e,r,n),d=t.nextZ;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&b(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&b(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function u(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!w(i,a)&&M(i,n,n.next,a)&&k(i,a)&&k(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),L(n),L(n.next),n=t=a),n=n.next}while(n!==t);return n}function c(t,e,r,n,i,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&x(l,u)){var c=S(l,u);return l=a(l,l.next),c=a(c,c.next),o(l,e,r,n,i,s),void o(c,e,r,n,i,s)}u=u.next}l=l.next}while(l!==t)}function h(t,e,r,n){var o,s,l,u,c,h=[];for(o=0,s=e.length;o=n.next.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&b(ar.x)&&k(n,t)&&(r=n,f=l),n=n.next;return r}function m(t,e,r,n){var i=t;do{null===i.z&&(i.z=v(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(t){var e,r,n,i,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0===s?(i=n,n=n.nextZ,l--):0!==l&&n?r.z<=n.z?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,s--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return t}function v(t,e,r,n,i){return t=32767*(t-r)/i,e=32767*(e-n)/i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function y(t){var e=t,r=t;do{e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function x(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!A(t,e)&&k(t,e)&&k(e,t)&&T(t,e)}function _(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function M(t,e,r,n){return!!(w(t,e)&&w(r,n)||w(t,n)&&w(r,e))||_(t,e,r)>0!=_(t,e,n)>0&&_(r,n,t)>0!=_(r,n,e)>0}function A(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&M(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function k(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function T(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}function S(t,e){var r=new C(t.i,t.x,t.y),n=new C(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function E(t,e,r,n){var i=new C(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function L(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function C(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function D(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],109:[function(t,e,r){"use strict";function n(t,e){var r=t.length;if("number"!=typeof e){e=0;for(var n=0;n0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,a,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],a=r.length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},{}],112:[function(t,e,r){"use strict";function n(t,e,r){var n=e||0,i=r||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[i*t[12]-t[8],i*t[13]-t[9],i*t[14]-t[10],i*t[15]-t[11]]]}e.exports=n},{}],113:[function(t,e,r){"use strict";function n(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}e.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0===(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},{}],114:[function(t,e,r){"use strict";function n(t){return new Function("f","var p = (f && f.properties || {}); return "+i(t))}function i(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?o(t[1],t[2],"===",!1):"!="===e?o(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?o(t[1],t[2],e,!0):"any"===e?s(t.slice(1),"||"):"all"===e?s(t.slice(1),"&&"):"none"===e?c(s(t.slice(1),"||")):"in"===e?l(t[1],t.slice(2)):"!in"===e?c(l(t[1],t.slice(2))):"has"===e?u(t[1]):"!has"===e?c(u([t[1]])):"true")+")"}function a(t){return"$type"===t?"f.type":"$id"===t?"f.id":"p["+JSON.stringify(t)+"]"}function o(t,e,r,n){var i=a(t),o="$type"===t?f.indexOf(e):JSON.stringify(e);return(n?"typeof "+i+"=== typeof "+o+"&&":"")+i+r+o}function s(t,e){return t.map(i).join(e)}function l(t,e){"$type"===t&&(e=e.map(function(t){return f.indexOf(t)}));var r=JSON.stringify(e.sort(h)),n=a(t);return e.length<=200?r+".indexOf("+n+") !== -1":"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }("+n+", "+r+",0,"+(e.length-1)+")"}function u(t){return JSON.stringify(t)+" in p"}function c(t){return"!("+t+")"}function h(t,e){return te?1:0}e.exports=n;var f=["Unknown","Point","LineString","Polygon"]},{}],115:[function(t,e,r){"use strict";function n(t,e,r){return Math.min(e,Math.max(t,r))}function i(t,e,r){this.dimension=t.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n=r-1)for(var f=o.length-1,p=t-e[r-1],d=0;d=r-1)for(var c=a.length-1,h=(e[r-1],0);h=0;--r)if(t[--e])return!1;return!0},u.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--h)i.push(n(l[h-1],u[h-1],arguments[h])),a.push(0)}},u.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var f=r;f>0;--f){var d=n(u[f-1],c[f-1],arguments[f]);i.push(d),a.push((d-i[o++])*h)}}},u.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(n(o[l-1],s[l-1],arguments[l])),i.push(0)}},u.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var i=this._state,a=this._velocity,o=i.length-this.dimension,s=this.bounds,l=s[0],u=s[1],c=t-e,h=c>1e-6?1/c:0;this._time.push(t);for(var f=r;f>0;--f){var d=arguments[f];i.push(n(l[f-1],u[f-1],i[o++]+d)),a.push(d*h)}}},u.idle=function(t){var e=this.lastT();if(!(t=0;--h)i.push(n(l[h],u[h],i[o]+c*a[o])),a.push(0),o+=1}}},{"binary-search-bounds":56,"cubic-hermite":99}],116:[function(t,e,r){"use strict";function n(t){t=t||{};var e,r,n=t.canvas||document.createElement("canvas"),a=t.family||"monospace",o=t.shape||[512,512],s=t.step||[32,32],l=t.size||16,u=t.chars||[32,126],c=Math.floor((s[0]-l)/2),h=t.radius||1.5*c,f=new i(l,c,h,0,a);if("number"==typeof l&&(l+="px"),Array.isArray(u)){if(2===u.length&&"number"==typeof u[0]&&"number"==typeof u[1]){var d=[];for(e=u[0],r=0;e<=u[1];e++)d[r++]=String.fromCharCode(e);u=d}}else u=String(u).split("");o=o.slice(),n.width=o[0],n.height=o[1];var p=n.getContext("2d");p.fillStyle="#000",p.fillRect(0,0,n.width,n.height),p.font=l+" "+a,p.textBaseline="middle";var m=0,g=0,v=Math.min(u.length,Math.floor(o[0]/s[0])*Math.ceil(o[1]/s[1])),y=f.ctx.textAlign,b=f.buffer;for(f.ctx.textAlign="center",f.buffer=f.size/2,e=0;eo[0]-s[0]&&(m=0,g+=s[1])}return f.ctx.textAlign=y,f.buffer=b,n}var i=t("tiny-sdf");e.exports=n},{"tiny-sdf":510}],117:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function i(t){return new n(t._color,t.key,t.value,t.left,t.right,t._count)}function a(t,e){return new n(t,e.key,e.value,e.left,e.right,e._count)}function o(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function s(t,e){this._compare=t,this.root=e}function l(t,e){if(e.left){var r=l(t,e.left);if(r)return r}var r=t(e.key,e.value);return r||(e.right?l(t,e.right):void 0)}function u(t,e,r,n){if(e(t,n.key)<=0){if(n.left){var i=u(t,e,r,n.left);if(i)return i}var i=r(n.key,n.value);if(i)return i}if(n.right)return u(t,e,r,n.right)}function c(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=c(t,e,r,n,i.left)))return a;if(s>0&&(a=n(i.key,i.value)))return a}if(s>0&&i.right)return c(t,e,r,n,i.right)}function h(t,e){this.tree=t,this._stack=e}function f(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t){for(var e,r,n,s,l=t.length-1;l>=0;--l){if(e=t[l],0===l)return void(e._color=v);if(r=t[l-1],r.left===e){if(n=r.right,n.right&&n.right._color===g){if(n=r.right=i(n),s=n.right=i(n.right),r.right=n.left,n.left=r,n.right=s,n._color=r._color,e._color=v,r._color=v,s._color=v,o(r),o(n),l>1){var u=t[l-2];u.left===r?u.left=n:u.right=n}return void(t[l-1]=n)}if(n.left&&n.left._color===g){if(n=r.right=i(n),s=n.left=i(n.left),r.right=s.left,n.left=s.right,s.left=r,s.right=n,s._color=r._color,r._color=v,n._color=v,e._color=v,o(r),o(n),o(s),l>1){var u=t[l-2];u.left===r?u.left=s:u.right=s}return void(t[l-1]=s)}if(n._color===v){if(r._color===g)return r._color=v,void(r.right=a(g,n));r.right=a(g,n);continue}if(n=i(n),r.right=n.left,n.left=r,n._color=r._color,r._color=g,o(r),o(n),l>1){var u=t[l-2];u.left===r?u.left=n:u.right=n}t[l-1]=n,t[l]=r,l+11){var u=t[l-2];u.right===r?u.right=n:u.left=n}return void(t[l-1]=n)}if(n.right&&n.right._color===g){if(n=r.left=i(n),s=n.right=i(n.right),r.left=s.right,n.right=s.left,s.right=r,s.left=n,s._color=r._color,r._color=v,n._color=v,e._color=v,o(r),o(n),o(s),l>1){var u=t[l-2];u.right===r?u.right=s:u.left=s}return void(t[l-1]=s)}if(n._color===v){if(r._color===g)return r._color=v,void(r.left=a(g,n));r.left=a(g,n);continue}if(n=i(n),r.left=n.right,n.right=r,n._color=r._color,r._color=g,o(r),o(n),l>1){var u=t[l-2];u.right===r?u.right=n:u.left=n}t[l-1]=n,t[l]=r,l+1e?1:0}function m(t){return new s(t||p,null)}e.exports=m;var g=0,v=1,y=s.prototype;Object.defineProperty(y,"keys",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(y,"values",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(y,"length",{get:function(){return this.root?this.root._count:0}}),y.insert=function(t,e){for(var r=this._compare,i=this.root,l=[],u=[];i;){var c=r(t,i.key);l.push(i),u.push(c),i=c<=0?i.left:i.right}l.push(new n(g,t,e,null,null,1));for(var h=l.length-2;h>=0;--h){var i=l[h];u[h]<=0?l[h]=new n(i._color,i.key,i.value,l[h+1],i.right,i._count+1):l[h]=new n(i._color,i.key,i.value,i.left,l[h+1],i._count+1)}for(var h=l.length-1;h>1;--h){var f=l[h-1],i=l[h];if(f._color===v||i._color===v)break;var d=l[h-2];if(d.left===f)if(f.left===i){var p=d.right;if(!p||p._color!==g){if(d._color=g,d.left=f.right,f._color=v,f.right=d,l[h-2]=f,l[h-1]=i,o(d),o(f),h>=3){var m=l[h-3];m.left===d?m.left=f:m.right=f}break}f._color=v,d.right=a(v,p),d._color=g,h-=1}else{var p=d.right;if(!p||p._color!==g){if(f.right=i.left,d._color=g,d.left=i.right,i._color=v,i.left=f,i.right=d,l[h-2]=i,l[h-1]=f,o(d),o(f),o(i),h>=3){var m=l[h-3];m.left===d?m.left=i:m.right=i}break}f._color=v,d.right=a(v,p),d._color=g,h-=1}else if(f.right===i){var p=d.left;if(!p||p._color!==g){if(d._color=g,d.right=f.left,f._color=v,f.left=d,l[h-2]=f,l[h-1]=i,o(d),o(f),h>=3){var m=l[h-3];m.right===d?m.right=f:m.left=f}break}f._color=v,d.left=a(v,p),d._color=g,h-=1}else{var p=d.left;if(!p||p._color!==g){if(f.left=i.right,d._color=g,d.right=i.left,i._color=v,i.right=f,i.left=d,l[h-2]=i,l[h-1]=f,o(d),o(f),o(i),h>=3){var m=l[h-3];m.right===d?m.right=i:m.left=i}break}f._color=v,d.left=a(v,p),d._color=g,h-=1}}return l[0]._color=v,new s(r,l[0])},y.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return l(t,this.root);case 2:return u(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return c(e,r,this._compare,t,this.root)}},Object.defineProperty(y,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(y,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),y.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new h(this,[])},y.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},y.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},y.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},y.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},y.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new h(this,n);r=i<=0?r.left:r.right}return new h(this,[])},y.remove=function(t){var e=this.find(t);return e?e.remove():this},y.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var b=h.prototype;Object.defineProperty(b,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(b,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null}, +enumerable:!0}),b.clone=function(){return new h(this.tree,this._stack.slice())},b.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new n(r._color,r.key,r.value,r.left,r.right,r._count);for(var i=t.length-2;i>=0;--i){var r=t[i];r.left===t[i+1]?e[i]=new n(r._color,r.key,r.value,e[i+1],r.right,r._count):e[i]=new n(r._color,r.key,r.value,r.left,e[i+1],r._count)}if(r=e[e.length-1],r.left&&r.right){var a=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var o=e[a-1];e.push(new n(r._color,o.key,o.value,r.left,r.right,r._count)),e[a-1].key=r.key,e[a-1].value=r.value;for(var i=e.length-2;i>=a;--i)r=e[i],e[i]=new n(r._color,r.key,r.value,r.left,e[i+1],r._count);e[a-1].left=e[a]}if(r=e[e.length-1],r._color===g){var l=e[e.length-2];l.left===r?l.left=null:l.right===r&&(l.right=null),e.pop();for(var i=0;i0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(b,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(b,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),b.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(b,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),b.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var r=new Array(e.length),i=e[e.length-1];r[r.length-1]=new n(i._color,i.key,t,i.left,i.right,i._count);for(var a=e.length-2;a>=0;--a)i=e[a],i.left===e[a+1]?r[a]=new n(i._color,i.key,i.value,r[a+1],i.right,i._count):r[a]=new n(i._color,i.key,i.value,i.left,r[a+1],i._count);return new s(this.tree._compare,r[0])},b.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(b,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],118:[function(t,e,r){function n(t){if(t<0)return Number("0/0");for(var e=o[0],r=o.length-1;r>0;--r)e+=o[r]/(t+r);var n=t+a+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}var i=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],a=607/128,o=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(n(e));e-=1;for(var r=i[0],a=1;a<9;a++)r+=i[a]/(e+a);var o=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(o,e+.5)*Math.exp(-o)*r},e.exports.log=n},{}],119:[function(t,e,r){function n(t){if("Polygon"===t.type)return i(t.coordinates);if("MultiPolygon"===t.type){for(var e=0,r=0;r0){e+=Math.abs(a(t[0]));for(var r=1;r2){for(var r,n,i=0;i=0}var u=t("geojson-area");e.exports=n},{"geojson-area":119}],121:[function(t,e,r){"use strict";function n(t,e,r,n,o,l,u,c){if(r/=e,n/=e,u>=r&&c<=n)return t;if(u>n||c=r&&p<=n)h.push(m);else if(!(d>n||p=e&&s<=r&&i.push(o)}return i}function a(t,e,r,n,i,a){for(var s=[],l=0;lr?(x.push(i(u,p,e),i(u,p,r)),a||(x=o(s,x,g,v,y))):d>=e&&x.push(i(u,p,e)):f>r?dr&&(x.push(i(u,p,r)),a||(x=o(s,x,g,v,y))));u=m[b-1],f=u[n],f>=e&&f<=r&&x.push(u),h=x[x.length-1],a&&h&&(x[0][0]!==h[0]||x[0][1]!==h[1])&&x.push(x[0]),o(s,x,g,v,y)}return s}function o(t,e,r,n,i){return e.length&&(e.area=r,e.dist=n,void 0!==i&&(e.outer=i),t.push(e)),[]}e.exports=n;var s=t("./feature")},{"./feature":123}],122:[function(t,e,r){"use strict";function n(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n1?1:n,[r,n,0]}function s(t){for(var e,r,n=0,i=0,a=0;a1)return!1;var a=i.geometry[0].length;if(5!==a)return!1;for(var o=0;o1&&console.time("creation"),b=this.tiles[y]=p(t,v,r,n,x,e===d.maxZoom),this.tileCoords.push({z:e,x:r,y:n}),m)){m>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,n,b.numFeatures,b.numPoints,b.numSimplified),console.timeEnd("creation"));var _="z"+e;this.stats[_]=(this.stats[_]||0)+1,this.total++}if(b.source=t,i){if(e===d.maxZoom||e===i)continue;var w=1<1&&console.time("clipping");var M,A,k,T,S,E,L=.5*d.buffer/d.extent,C=.5-L,D=.5+L,z=1+L;M=A=k=T=null,S=f(t,v,r-L,r+D,0,o,b.min[0],b.max[0]),E=f(t,v,r+C,r+z,0,o,b.min[0],b.max[0]),S&&(M=f(S,v,n-L,n+D,1,s,b.min[1],b.max[1]),A=f(S,v,n+C,n+z,1,s,b.min[1],b.max[1])),E&&(k=f(E,v,n-L,n+D,1,s,b.min[1],b.max[1]),T=f(E,v,n+C,n+z,1,s,b.min[1],b.max[1])),m>1&&console.timeEnd("clipping"),t.length&&(h.push(M||[],e+1,2*r,2*n),h.push(A||[],e+1,2*r,2*n+1),h.push(k||[],e+1,2*r+1,2*n),h.push(T||[],e+1,2*r+1,2*n+1))}else i&&(g=e)}return g},i.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,o=n.debug,s=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var c,f=t,d=e,p=r;!c&&f>0;)f--,d=Math.floor(d/2),p=Math.floor(p/2),c=this.tiles[a(f,d,p)];if(!c||!c.source)return null;if(o>1&&console.log("found parent tile z%d-%d-%d",f,d,p),u(c,i,n.buffer))return h.tile(c,i);o>1&&console.time("drilling down");var m=this.splitTile(c.source,f,d,p,t,e,r);if(o>1&&console.timeEnd("drilling down"),null!==m){var g=1<n&&(o=r,n=a);n>s?(t[o][2]=n,h.push(u),h.push(o),u=o):(c=h.pop(),u=h.pop())}}function i(t,e,r){var n=e[0],i=e[1],a=r[0],o=r[1],s=t[0],l=t[1],u=a-n,c=o-i;if(0!==u||0!==c){var h=((s-n)*u+(l-i)*c)/(u*u+c*c);h>1?(n=a,i=o):h>0&&(n+=u*h,i+=c*h)}return u=s-n,c=l-i,u*u+c*c}e.exports=n},{}],126:[function(t,e,r){"use strict";function n(t,e,r,n,a,o){for(var s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z2:e,transformed:!1,min:[2,1],max:[-1,0]},l=0;ls.max[0]&&(s.max[0]=c[0]),c[1]>s.max[1]&&(s.max[1]=c[1])}return s}function i(t,e,r,n){var i,o,s,l,u=e.geometry,c=e.type,h=[],f=r*r;if(1===c)for(i=0;if)&&(d.push(l),t.numSimplified++),t.numPoints++;3===c&&a(d,s.outer),h.push(d)}else t.numPoints+=s.length;if(h.length){var p={geometry:h,type:c,tags:e.tags||null};null!==e.id&&(p.id=e.id),t.features.push(p)}}function a(t,e){o(t)<0===e&&t.reverse()}function o(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i0?(d[c]=-1,p[c]=0):(d[c]=0,p[c]=1)}}function s(t,e){var r=new i(t);return r.update(e),r}e.exports=s;var l=t("./lib/text.js"),u=t("./lib/lines.js"),c=t("./lib/background.js"),h=t("./lib/cube.js"),f=t("./lib/ticks.js"),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=i.prototype;p.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,n=e.bind(this,!1,Number),i=e.bind(this,!1,Boolean),a=e.bind(this,!1,String),o=e.bind(this,!0,function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]}),s=!1,c=!1;if("bounds"in t)for(var h=t.bounds,d=0;d<2;++d)for(var p=0;p<3;++p)h[d][p]!==this.bounds[d][p]&&(c=!0),this.bounds[d][p]=h[d][p];if("ticks"in t){r=t.ticks,s=!0,this.autoTicks=!1;for(var d=0;d<3;++d)this.tickSpacing[d]=0}else n("tickSpacing")&&(this.autoTicks=!0,c=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),c=!0,s=!0,this._firstInit=!1),c&&this.autoTicks&&(r=f.create(this.bounds,this.tickSpacing),s=!0),s){for(var d=0;d<3;++d)r[d].sort(function(t,e){return t.x-e.x});f.equal(r,this.ticks)?s=!1:this.ticks=r}i("tickEnable"),a("tickFont")&&(s=!0),n("tickSize"),n("tickAngle"),n("tickPad"),o("tickColor");var m=a("labels");a("labelFont")&&(m=!0),i("labelEnable"),n("labelSize"),n("labelPad"),o("labelColor"),i("lineEnable"),i("lineMirror"),n("lineWidth"),o("lineColor"),i("lineTickEnable"),i("lineTickMirror"),n("lineTickLength"),n("lineTickWidth"),o("lineTickColor"),i("gridEnable"),n("gridWidth"),o("gridColor"),i("zeroEnable"),o("zeroLineColor"),n("zeroLineWidth"),i("backgroundEnable"),o("backgroundColor"),this._text?this._text&&(m||s)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=l(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&s&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};var m=[new a,new a,new a],g=[0,0,0],v={model:d,view:d,projection:d};p.isOpaque=function(){return!0},p.isTransparent=function(){return!1},p.drawTransparent=function(t){};var y=[0,0,0],b=[0,0,0],x=[0,0,0];p.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||d,i=t.view||d,a=t.projection||d,s=this.bounds,l=h(r,i,a,s),u=l.cubeEdges,c=l.axis,f=i[12],p=i[13],_=i[14],w=i[15],M=this.pixelRatio*(a[3]*f+a[7]*p+a[11]*_+a[15]*w)/e.drawingBufferHeight,A=0;A<3;++A)this.lastCubeProps.cubeEdges[A]=u[A],this.lastCubeProps.axis[A]=c[A];for(var k=m,A=0;A<3;++A)o(m[A],A,this.bounds,u,c);for(var e=this.gl,T=g,A=0;A<3;++A)this.backgroundEnable[A]?T[A]=c[A]:T[A]=0;this._background.draw(r,i,a,s,T,this.backgroundColor),this._lines.bind(r,i,a,this);for(var A=0;A<3;++A){var S=[0,0,0];c[A]>0?S[A]=s[1][A]:S[A]=s[0][A];for(var E=0;E<2;++E){var L=(A+1+E)%3,C=(A+1+(1^E))%3;this.gridEnable[L]&&this._lines.drawGrid(L,C,this.bounds,S,this.gridColor[L],this.gridWidth[L]*this.pixelRatio)}for(var E=0;E<2;++E){var L=(A+1+E)%3,C=(A+1+(1^E))%3;this.zeroEnable[C]&&s[0][C]<=0&&s[1][C]>=0&&this._lines.drawZero(L,C,this.bounds,S,this.zeroLineColor[C],this.zeroLineWidth[C]*this.pixelRatio)}}for(var A=0;A<3;++A){this.lineEnable[A]&&this._lines.drawAxisLine(A,this.bounds,k[A].primalOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio),this.lineMirror[A]&&this._lines.drawAxisLine(A,this.bounds,k[A].mirrorOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio);for(var D=n(y,k[A].primalMinor),z=n(b,k[A].mirrorMinor),I=this.lineTickLength,E=0;E<3;++E){var P=M/r[5*E];D[E]*=I[E]*P,z[E]*=I[E]*P}this.lineTickEnable[A]&&this._lines.drawAxisTicks(A,k[A].primalOffset,D,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio),this.lineTickMirror[A]&&this._lines.drawAxisTicks(A,k[A].mirrorOffset,z,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio)}this._text.bind(r,i,a,this.pixelRatio);for(var A=0;A<3;++A){for(var O=k[A].primalMinor,R=n(x,k[A].primalOffset),E=0;E<3;++E)this.lineTickEnable[A]&&(R[E]+=M*O[E]*Math.max(this.lineTickLength[E],0)/r[5*E]);if(this.tickEnable[A]){for(var E=0;E<3;++E)R[E]+=M*O[E]*this.tickPad[E]/r[5*E];this._text.drawTicks(A,this.tickSize[A],this.tickAngle[A],R,this.tickColor[A])}if(this.labelEnable[A]){for(var E=0;E<3;++E)R[E]+=M*O[E]*this.labelPad[E]/r[5*E];R[A]+=.5*(s[0][A]+s[1][A]),this._text.drawLabel(A,this.labelSize[A],this.labelAngle[A],R,this.labelColor[A])}}},p.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":131,"./lib/cube.js":132,"./lib/lines.js":133,"./lib/text.js":135,"./lib/ticks.js":136}],131:[function(t,e,r){"use strict";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}function i(t){for(var e=[],r=[],i=0,l=0;l<3;++l)for(var u=(l+1)%3,c=(l+2)%3,h=[0,0,0],f=[0,0,0],d=-1;d<=1;d+=2){r.push(i,i+2,i+1,i+1,i+2,i+3),h[l]=d,f[l]=d;for(var p=-1;p<=1;p+=2){h[u]=p;for(var m=-1;m<=1;m+=2)h[c]=m,e.push(h[0],h[1],h[2],f[0],f[1],f[2]),i+=1}var g=u;u=c,c=g}var v=a(t,new Float32Array(e)),y=a(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),b=o(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],y),x=s(t);return x.attributes.position.location=0,x.attributes.normal.location=1,new n(t,v,b,x)}e.exports=i;var a=t("gl-buffer"),o=t("gl-vao"),s=t("./shaders").bg,l=n.prototype;l.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),l.disable(l.POLYGON_OFFSET_FILL)}},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":134,"gl-buffer":138,"gl-vao":252}],132:[function(t,e,r){"use strict";function n(t,e,r){for(var n=0;n<4;++n){t[n]=r[12+n];for(var i=0;i<3;++i)t[n]+=e[i]*r[4*i+n]}}function i(t){for(var e=0;eS&&(_|=1<S&&(_|=1<f[m][1]&&(O=m));for(var R=-1,m=0;m<3;++m){var j=O^1<f[F][0]&&(F=j)}}var N=g;N[0]=N[1]=N[2]=0,N[o.log2(R^O)]=O&R,N[o.log2(O^F)]=O&F;var B=7^F;B===_||B===P?(B=7^R,N[o.log2(F^B)]=B&F):N[o.log2(R^B)]=B&R;for(var U=v,V=_,A=0;A<3;++A)U[A]=V&1< 0.0) {\n vec3 nPosition = mix(bounds[0], bounds[1], 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n colorChannel = abs(normal);\n}","precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] + \n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}",null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":236}],135:[function(t,e,r){(function(r){"use strict";function n(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}function i(t,e){try{return l(t,e)}catch(t){return console.warn("error vectorizing text:",t),{cells:[],positions:[]}}}function a(t,e,r,i,a,l){var c=o(t),h=s(t,[{buffer:c,size:3}]),f=u(t);f.attributes.position.location=0;var d=new n(t,f,c,h);return d.update(e,r,i,a,l),d}e.exports=a;var o=t("gl-buffer"),s=t("gl-vao"),l=t("vectorize-text"),u=t("./shaders").text,c=window||r.global||{},h=c.__TEXT_CACHE||{};c.__TEXT_CACHE={};var f=n.prototype,d=[0,0];f.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},f.update=function(t,e,r,n,a){function o(t,e,r,n){var a=h[r];a||(a=h[r]={});var o=a[e];o||(o=a[e]=i(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle"}));for(var l=(n||12)/12,u=o.positions,c=o.cells,f=0,d=c.length;f=0;--m){var g=u[p[m]];s.push(l*g[0],-l*g[1],t)}}for(var s=(this.gl,[]),l=[0,0,0],u=[0,0,0],c=[0,0,0],f=[0,0,0],d=0;d<3;++d){c[d]=s.length/3|0,o(.5*(t[0][d]+t[1][d]),e[d],r),f[d]=(s.length/3|0)-c[d],l[d]=s.length/3|0;for(var p=0;p=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,u=o%a;o<0?(l=0|-Math.ceil(l),u=0|-u):(l=0|Math.floor(l),u|=0);var c=""+l;if(o<0&&(c="-"+c),i){for(var h=""+u;h.length=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r}function a(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function a(t,e){for(var r=l.malloc(t.length,e),n=t.length,i=0;i=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}function s(t,e,r,i){if(r=r||t.ARRAY_BUFFER,i=i||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(i!==t.DYNAMIC_DRAW&&i!==t.STATIC_DRAW&&i!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var a=t.createBuffer(),o=new n(t,r,a,0,i);return o.update(e),o}var l=t("typedarray-pool"),u=t("ndarray-ops"),c=t("ndarray"),h=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"],f=n.prototype;f.bind=function(){this.gl.bindBuffer(this.type,this.handle)},f.unbind=function(){this.gl.bindBuffer(this.type,null)},f.dispose=function(){this.gl.deleteBuffer(this.handle)},f.update=function(t,e){if("number"!=typeof e&&(e=-1),this.bind(),"object"==typeof t&&void 0!==t.shape){var r=t.dtype;if(h.indexOf(r)<0&&(r="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){r=gl.getExtension("OES_element_index_uint")&&"uint16"!==r?"uint32":"uint16"}if(r===t.dtype&&o(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=i(this.gl,this.type,this.length,this.usage,t.data,e):this.length=i(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var n=l.malloc(t.size,r),s=c(n,t.shape);u.assign(s,t),this.length=e<0?i(this.gl,this.type,this.length,this.usage,n,e):i(this.gl,this.type,this.length,this.usage,n.subarray(0,t.size),e),l.free(n)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?a(t,"uint16"):a(t,"float32"),this.length=e<0?i(this.gl,this.type,this.length,this.usage,f,e):i(this.gl,this.type,this.length,this.usage,f.subarray(0,t.length),e),l.free(f)}else if("object"==typeof t&&"number"==typeof t.length)this.length=i(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");t|=0,t<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=s},{ndarray:446,"ndarray-ops":440,"typedarray-pool":518}],139:[function(t,e,r){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],140:[function(t,e,r){var n=t("./1.0/numbers");e.exports=function(t){return n[t]}},{"./1.0/numbers":139}],141:[function(t,e,r){"use strict";function n(t,e,r,n){this.plot=t,this.shader=e,this.bufferHi=r,this.bufferLo=n,this.bounds=[1/0,1/0,-1/0,-1/0],this.numPoints=0,this.color=[0,0,0,1]}function i(t,e){var r=a(t.gl,l.vertex,l.fragment),i=o(t.gl),s=o(t.gl),u=new n(t,r,i,s);return u.update(e),t.addObject(u),u}var a=t("gl-shader"),o=t("gl-buffer"),s=t("typedarray-pool"),l=t("./lib/shaders");e.exports=i;var u=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]],c=n.prototype;c.draw=function(){var t=new Float32Array([0,0]),e=new Float32Array([0,0]),r=new Float32Array([0,0]),n=new Float32Array([0,0]),i=[1,1];return function(){var a=this.plot,o=this.shader,s=this.bounds,l=this.numPoints;if(l){var c=a.gl,h=a.dataBox,f=a.viewBox,d=a.pixelRatio,p=s[2]-s[0],m=s[3]-s[1],g=h[2]-h[0],v=h[3]-h[1],y=2*p/g,b=2*m/v,x=(s[0]-h[0]-.5*g)/p,_=(s[1]-h[1]-.5*v)/m;t[0]=y,t[1]=b,e[0]=y-t[0],e[1]=b-t[1],r[0]=x,r[1]=_,n[0]=x-r[0],n[1]=_-r[1];var w=f[2]-f[0],M=f[3]-f[1];i[0]=2*d/w,i[1]=2*d/M,o.bind(),o.uniforms.scaleHi=t,o.uniforms.scaleLo=e,o.uniforms.translateHi=r,o.uniforms.translateLo=n,o.uniforms.pixelScale=i,o.uniforms.color=this.color,this.bufferLo.bind(),o.attributes.positionLo.pointer(c.FLOAT,!1,16,0),this.bufferHi.bind(),o.attributes.positionHi.pointer(c.FLOAT,!1,16,0),o.attributes.pixelOffset.pointer(c.FLOAT,!1,16,8),c.drawArrays(c.TRIANGLES,0,l*u.length)}}}(),c.drawPick=function(t){return t},c.pick=function(){return null},c.update=function(t){t=t||{};var e,r,n,i=t.positions||[],a=t.errors||[],o=1;"lineWidth"in t&&(o=+t.lineWidth);var l=5;"capSize"in t&&(l=+t.capSize),this.color=(t.color||[0,0,0,1]).slice();var c=this.bounds=[1/0,1/0,-1/0,-1/0],h=this.numPoints=i.length>>1;for(e=0;e0&&(T*=_),S<0?S*=w:S>0&&(S*=M),g[b++]=f*(r-p+T),g[b++]=d*(n-m+S),g[b++]=o*k[2]+(l+o)*k[4],g[b++]=o*k[3]+(l+o)*k[5]}}for(e=0;e=1},h.isTransparent=function(){return this.opacity<1},h.drawTransparent=h.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||c,i=r.projection=t.projection||c;r.model=t.model||c,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],o=n[13],s=n[14],l=n[15],u=this.pixelRatio*(i[3]*a+i[7]*o+i[11]*s+i[15]*l)/e.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)e.lineWidth(this.lineWidth[h]),r.capSize=this.capSize[h]*u,e.drawArrays(e.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var f=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=(n+e)%3,o=[0,0,0];o[a]=i,r.push(o)}t[e]=r}return t}();h.update=function(t){t=t||{},"lineWidth"in t&&(this.lineWidth=t.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in t&&(this.capSize=t.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),"opacity"in t&&(this.opacity=t.opacity);var e=t.color||[[0,0,0],[0,0,0],[0,0,0]],r=t.position,n=t.error;if(Array.isArray(e[0])||(e=[e,e,e]),r&&n){var o=[],s=r.length,l=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var u=0;u<3;++u){this.lineOffset[u]=l;t:for(var c=0;c0){var m=h.slice();m[u]+=d[1][u],o.push(h[0],h[1],h[2],p[0],p[1],p[2],p[3],0,0,0,m[0],m[1],m[2],p[0],p[1],p[2],p[3],0,0,0),i(this.bounds,m),l+=2+a(o,m,p,u)}}}this.lineCount[u]=l-this.lineOffset[u]}this.buffer.update(o)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":144,"gl-buffer":138,"gl-vao":252}],144:[function(t,e,r){"use strict";var n=t("gl-shader");e.exports=function(t){return n(t,"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}","precision mediump float;\n#define GLSLIFY 1\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if(any(lessThan(fragPosition, clipBounds[0])) || any(greaterThan(fragPosition, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = opacity * fragColor;\n}",null,[{name:"position",type:"vec3"},{name:"offset",type:"vec3"},{name:"color",type:"vec4"}])}},{"gl-shader":236}],145:[function(t,e,r){"use strict";function n(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function i(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function a(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);y=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;a1&&f.drawBuffersWEBGL(y[h]);var v=r.getExtension("WEBGL_depth_texture");v?d?t.depth=s(r,u,c,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p&&(t.depth=s(r,u,c,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):p&&d?t._depth_rb=l(r,u,c,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p?t._depth_rb=l(r,u,c,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=l(r,u,c,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var b=r.checkFramebufferStatus(r.FRAMEBUFFER);if(b!==r.FRAMEBUFFER_COMPLETE){t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null);for(var g=0;gs||r<0||r>s)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var l=n(a),u=0;uo||r<0||r>o)throw new Error("gl-fbo: Parameters are too large for FBO");n=n||{};var s=1;if("color"in n){if((s=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(s>1){if(!i)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(s>t.getParameter(i.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+s+" draw buffers")}}var l=t.UNSIGNED_BYTE,u=t.getExtension("OES_texture_float");if(n.float&&s>0){if(!u)throw new Error("gl-fbo: Context does not support floating point textures");l=t.FLOAT}else n.preferFloat&&s>0&&u&&(l=t.FLOAT);var h=!0;"depth"in n&&(h=!!n.depth);var f=!1;return"stencil"in n&&(f=!!n.stencil),new c(t,e,r,l,s,h,f,i)}var d=t("gl-texture2d");e.exports=f;var p,m,g,v,y=null,b=c.prototype;Object.defineProperties(b,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(t){if(Array.isArray(t)||(t=[0|t,0|t]),2!==t.length)throw new Error("gl-fbo: Shape vector must be length 2");var e=0|t[0],r=0|t[1];return h(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return t|=0,h(this,t,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t},enumerable:!1}}),b.bind=function(){if(!this._destroyed){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.handle),t.viewport(0,0,this._shape[0],this._shape[1])}},b.dispose=function(){if(!this._destroyed){this._destroyed=!0;var t=this.gl;t.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(t.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var e=0;e>8*d&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=t,p.pickOffset=e,p.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),h.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},h.update=function(t){t=t||{};var e=t.shape||[0,0],r=t.x||o(e[0]),n=t.y||o(e[1]),i=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=n;var l=t.colorLevels||[0],u=t.colorValues||[0,0,0,1],c=l.length,h=this.bounds,d=h[0]=r[0],p=h[1]=n[0],m=h[2]=r[r.length-1],g=h[3]=n[n.length-1],v=1/(m-d),y=1/(g-p),b=e[0],x=e[1];this.shape=[b,x];var _=(b-1)*(x-1)*(f.length>>>1);this.numVertices=_;for(var w=s.mallocUint8(4*_),M=s.mallocFloat32(2*_),A=s.mallocUint8(2*_),k=s.mallocUint32(_),T=0,S=0;S2&&!this.usingDashes){var b=this.mitreShader;this.lineBufferLo.bind(),b.attributes.aLo.pointer(l.FLOAT,!1,48,0),this.lineBufferHi.bind(),b.bind();var x=b.uniforms;this.setProjectionUniforms(x,a),x.color=c,x.radius=s*u,b.attributes.aHi.pointer(l.FLOAT,!1,48,0),l.drawArrays(l.POINTS,0,i/3|0)}}}}(),f.drawPick=function(){var t=[0,0,0,0];return function(e){var r=this.vertCount,n=this.numPoints;if(this.pickOffset=e,!r)return e+n;var i=this.setProjectionModel(),a=this.plot,o=this.width,s=a.gl,l=a.pickPixelRatio,u=this.pickShader,c=this.pickBuffer;t[0]=255&e,t[1]=e>>>8&255,t[2]=e>>>16&255,t[3]=e>>>24,u.bind();var h=u.uniforms;this.setProjectionUniforms(h,i),h.width=o*l,h.pickOffset=t;var f=u.attributes;return this.lineBufferHi.bind(),f.aHi.pointer(s.FLOAT,!1,16,0),f.dHi.pointer(s.FLOAT,!1,16,8),this.lineBufferLo.bind(),f.aLo.pointer(s.FLOAT,!1,16,0),c.bind(),f.pick0.pointer(s.UNSIGNED_BYTE,!1,8,0),f.pick1.pointer(s.UNSIGNED_BYTE,!1,8,4),s.drawArrays(s.TRIANGLES,0,r),e+n}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.numPoints;if(r=n+i)return null;var a=r-n,o=this.data;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}},f.update=function(t){t=t||{};var e,r,n,a,o,s=this.plot.gl;this.color=(t.color||[0,0,1,1]).slice(),this.width=+(t.width||1),this.fill=(t.fill||[!1,!1,!1,!1]).slice(),this.fillColor=i(t.fillColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var h=t.dashes||[1],f=0;for(e=0;e1,this.dashPattern=l(s,u(d,[f,1,4],[1,0,0])),this.dashPattern.minFilter=s.NEAREST,this.dashPattern.magFilter=s.NEAREST,this.dashLength=f,c.free(d);var m=t.positions;this.data=m;var g=this.bounds;g[0]=g[1]=1/0,g[2]=g[3]=-1/0;var v=this.numPoints=m.length>>>1;if(0!==v){for(e=0;e1;){var k=--n;a=m[2*n],o=m[2*n+1];var T=k-1,S=m[2*T],E=m[2*T+1];if(!(isNaN(a)||isNaN(o)||isNaN(S)||isNaN(E))){A+=1,a=(a-g[0])/(g[2]-g[0]),o=(o-g[1])/(g[3]-g[1]),S=(S-g[0])/(g[2]-g[0]),E=(E-g[1])/(g[3]-g[1]);var L=S-a,C=E-o,D=k|1<<24,z=k-1,I=k,P=k-1|1<<24;y[--w]=-C,y[--w]=-L,y[--w]=o,y[--w]=a,_[--M]=D,_[--M]=z,y[--w]=C,y[--w]=L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=-C,y[--w]=-L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=C,y[--w]=L,y[--w]=E,y[--w]=S,_[--M]=I,_[--M]=P,y[--w]=-C,y[--w]=-L,y[--w]=o,y[--w]=a,_[--M]=D,_[--M]=z,y[--w]=C,y[--w]=L,y[--w]=o,y[--w]=a,_[--M]=D,_[--M]=z}}for(e=0;e FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n highp float e = floor(log2(av));\n highp float m = av * pow(2.0, -e) - 1.0;\n \n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n \n //Unpack exponent\n highp float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0; \n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\n\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if(any(lessThan(worldPosition, clipBounds[0])) || any(greaterThan(worldPosition, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = vec4(pickId/255.0, encode_float_1_0(pixelArcLength).xyz);\n}",null,a)}},{"gl-shader":236}],153:[function(t,e,r){"use strict";function n(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function i(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function a(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function o(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.dirty=!0,this.pixelRatio=1}function s(t){var e=t.gl||t.scene&&t.scene.gl,r=m(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var n=g(e);n.attributes.position.location=0,n.attributes.nextPosition.location=1,n.attributes.arcLength.location=2,n.attributes.lineWidth.location=3,n.attributes.color.location=4;for(var i=l(e),a=u(e,[{buffer:i,size:3,offset:0,stride:48},{buffer:i,size:3,offset:12,stride:48},{buffer:i,size:1,offset:24,stride:48},{buffer:i,size:1,offset:28,stride:48},{buffer:i,size:4,offset:32,stride:48}]),s=d(new Array(1024),[256,1,4]),h=0;h<1024;++h)s.data[h]=255;var f=c(e,s);f.wrap=e.REPEAT;var p=new o(e,r,n,i,a,f);return p.update(t),p}e.exports=s;var l=t("gl-buffer"),u=t("gl-vao"),c=t("gl-texture2d"),h=t("glsl-read-float"),f=t("binary-search-bounds"),d=t("ndarray"),p=t("./lib/shaders"),m=p.createShader,g=p.createPickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],y=o.prototype;y.isTransparent=function(){return this.opacity<1},y.isOpaque=function(){return this.opacity>=1},y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.drawTransparent=y.draw=function(t){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||v,view:t.view||v,projection:t.projection||v,clipBounds:i(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},y.drawPick=function(t){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||v,view:t.view||v,projection:t.projection||v,pickId:this.pickId,clipBounds:i(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},y.update=function(t){var e,r;this.dirty=!0;var i=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),"opacity"in t&&(this.opacity=+t.opacity);var a=t.position||t.positions;if(a){var o=t.color||t.colors||[0,0,0,1],s=t.lineWidth||1,l=[],u=[],c=[],h=0,p=0,m=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],g=!1;t:for(e=1;e0){for(var b=0;b<24;++b)l.push(l[l.length-12]);p+=2,g=!0}continue t}m[0][r]=Math.min(m[0][r],v[r],y[r]),m[1][r]=Math.max(m[1][r],v[r],y[r])}var x,_;Array.isArray(o[0])?(x=o[e-1],_=o[e]):x=_=o,3===x.length&&(x=[x[0],x[1],x[2],1]),3===_.length&&(_=[_[0],_[1],_[2],1]);var w;w=Array.isArray(s)?s[e-1]:s;var M=h;if(h+=n(v,y),g){for(r=0;r<2;++r)l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,x[0],x[1],x[2],x[3]);p+=2,g=!1}l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,x[0],x[1],x[2],x[3],v[0],v[1],v[2],y[0],y[1],y[2],M,-w,x[0],x[1],x[2],x[3],y[0],y[1],y[2],v[0],v[1],v[2],h,-w,_[0],_[1],_[2],_[3],y[0],y[1],y[2],v[0],v[1],v[2],h,w,_[0],_[1],_[2],_[3]),p+=4}if(this.buffer.update(l),u.push(h),c.push(a[a.length-1].slice()),this.bounds=m,this.vertexCount=p,this.points=c,this.arcLength=u,"dashes"in t){var A=t.dashes,k=A.slice();for(k.unshift(0),e=1;e0?(n=2*Math.sqrt(r+1),t[3]=.25*n,t[0]=(e[6]-e[9])/n,t[1]=(e[8]-e[2])/n,t[2]=(e[1]-e[4])/n):e[0]>e[5]&e[0]>e[10]?(n=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/n,t[0]=.25*n,t[1]=(e[1]+e[4])/n,t[2]=(e[8]+e[2])/n):e[5]>e[10]?(n=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/n,t[0]=(e[1]+e[4])/n,t[1]=.25*n,t[2]=(e[6]+e[9])/n):(n=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/n,t[0]=(e[8]+e[2])/n,t[1]=(e[6]+e[9])/n,t[2]=.25*n),t},i.fromRotationTranslationScale=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3],l=i+i,u=a+a,c=o+o,h=i*l,f=i*u,d=i*c,p=a*u,m=a*c,g=o*c,v=s*l,y=s*u,b=s*c,x=n[0],_=n[1],w=n[2];return t[0]=(1-(p+g))*x,t[1]=(f+b)*x,t[2]=(d-y)*x,t[3]=0,t[4]=(f-b)*_,t[5]=(1-(h+g))*_,t[6]=(m+v)*_,t[7]=0,t[8]=(d+y)*w,t[9]=(m-v)*w,t[10]=(1-(h+p))*w,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},i.fromRotationTranslationScaleOrigin=function(t,e,r,n,i){var a=e[0],o=e[1],s=e[2],l=e[3],u=a+a,c=o+o,h=s+s,f=a*u,d=a*c,p=a*h,m=o*c,g=o*h,v=s*h,y=l*u,b=l*c,x=l*h,_=n[0],w=n[1],M=n[2],A=i[0],k=i[1],T=i[2];return t[0]=(1-(m+v))*_,t[1]=(d+x)*_,t[2]=(p-b)*_,t[3]=0,t[4]=(d-x)*w,t[5]=(1-(f+v))*w,t[6]=(g+y)*w,t[7]=0,t[8]=(p+b)*M,t[9]=(g-y)*M,t[10]=(1-(f+m))*M,t[11]=0,t[12]=r[0]+A-(t[0]*A+t[4]*k+t[8]*T),t[13]=r[1]+k-(t[1]*A+t[5]*k+t[9]*T),t[14]=r[2]+T-(t[2]*A+t[6]*k+t[10]*T),t[15]=1,t},i.fromQuat=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,h=n*s,f=i*o,d=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return t[0]=1-h-p,t[1]=c+v,t[2]=f-g,t[3]=0,t[4]=c-v,t[5]=1-u-p,t[6]=d+m,t[7]=0,t[8]=f+g,t[9]=d-m,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.frustum=function(t,e,r,n,i,a,o){var s=1/(r-e),l=1/(i-n),u=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(o+a)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*u,t[15]=0,t},i.perspective=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t},i.perspectiveFromFieldOfView=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-((o-s)*l)*.5,t[9]=(i-a)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t},i.ortho=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t},i.lookAt=function(t,e,r,a){var o,s,l,u,c,h,f,d,p,m,g=e[0],v=e[1],y=e[2],b=a[0],x=a[1],_=a[2],w=r[0],M=r[1],A=r[2];return Math.abs(g-w).999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(a.cross(t,i,o),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=1+l,s.normalize(n,n))}}(),s.setAxes=function(){var t=i.create();return function(e,r,n,i){return t[0]=n[0],t[3]=n[1],t[6]=n[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],s.normalize(e,s.fromMat3(e,t))}}(),s.clone=o.clone,s.fromValues=o.fromValues,s.copy=o.copy,s.set=o.set,s.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},s.setAxisAngle=function(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t},s.getAxisAngle=function(t,e){var r=2*Math.acos(e[3]),n=Math.sin(r/2);return 0!=n?(t[0]=e[0]/n,t[1]=e[1]/n,t[2]=e[2]/n):(t[0]=1,t[1]=0,t[2]=0),r},s.add=o.add,s.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1],u=r[2],c=r[3];return t[0]=n*c+o*s+i*u-a*l,t[1]=i*c+o*l+a*s-n*u,t[2]=a*c+o*u+n*l-i*s,t[3]=o*c-n*s-i*l-a*u,t},s.mul=s.multiply,s.scale=o.scale,s.rotateX=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+o*s,t[1]=i*l+a*s,t[2]=a*l-i*s,t[3]=o*l-n*s,t},s.rotateY=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l-a*s,t[1]=i*l+o*s,t[2]=a*l+n*s,t[3]=o*l-i*s,t},s.rotateZ=function(t,e,r){r*=.5;var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+i*s,t[1]=i*l-n*s,t[2]=a*l+o*s,t[3]=o*l-a*s,t},s.calculateW=function(t,e){var r=e[0],n=e[1],i=e[2];return t[0]=r,t[1]=n,t[2]=i,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),t},s.dot=o.dot,s.lerp=o.lerp,s.slerp=function(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=u*d+c*p+h*m+f*g,a<0&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*h+l*m,t[3]=s*f+l*g,t},s.sqlerp=function(){var t=s.create(),e=s.create();return function(r,n,i,a,o,l){return s.slerp(t,n,o,l),s.slerp(e,i,a,l),s.slerp(r,t,e,2*l*(1-l)),r}}(),s.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a,s=o?1/o:0;return t[0]=-r*s,t[1]=-n*s,t[2]=-i*s,t[3]=a*s,t},s.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},s.length=o.length,s.len=s.length,s.squaredLength=o.squaredLength,s.sqrLen=s.squaredLength,s.normalize=o.normalize,s.fromMat3=function(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(e[3*i+i]-e[3*a+a]-e[3*o+o]+1),t[i]=.5*r,r=.5/r,t[3]=(e[3*a+o]-e[3*o+a])*r,t[a]=(e[3*a+i]+e[3*i+a])*r,t[o]=(e[3*o+i]+e[3*i+o])*r}return t},s.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},s.exactEquals=o.exactEquals,s.equals=o.equals,e.exports=s},{"./common.js":175,"./mat3.js":178,"./vec3.js":182,"./vec4.js":183}],181:[function(t,e,r){var n=t("./common.js"),i={};i.create=function(){var t=new n.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},i.fromValues=function(t,e){var r=new n.ARRAY_TYPE(2);return r[0]=t,r[1]=e,r},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},i.set=function(t,e,r){return t[0]=e,t[1]=r,t},i.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t},i.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t},i.sub=i.subtract,i.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},i.mul=i.multiply,i.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},i.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},i.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t},i.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)},i.dist=i.distance,i.squaredDistance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1];return Math.sqrt(e*e+r*r)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1];return e*e+r*r},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},i.cross=function(t,e,r){var n=e[0]*r[1]-e[1]*r[0];return t[0]=t[1]=0,t[2]=n,t},i.lerp=function(t,e,r,n){var i=e[0],a=e[1];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t},i.random=function(t,e){e=e||1;var r=2*n.RANDOM()*Math.PI;return t[0]=Math.cos(r)*e,t[1]=Math.sin(r)*e,t},i.transformMat2=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t},i.transformMat2d=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t},i.transformMat3=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[3]*i+r[6],t[1]=r[1]*n+r[4]*i+r[7],t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=2),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},i.cross=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t},i.lerp=function(t,e,r,n){var i=e[0],a=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t},i.hermite=function(t,e,r,n,i,a){var o=a*a,s=o*(2*a-3)+1,l=o*(a-2)+a,u=o*(a-1),c=o*(3-2*a);return t[0]=e[0]*s+r[0]*l+n[0]*u+i[0]*c,t[1]=e[1]*s+r[1]*l+n[1]*u+i[1]*c,t[2]=e[2]*s+r[2]*l+n[2]*u+i[2]*c,t},i.bezier=function(t,e,r,n,i,a){var o=1-a,s=o*o,l=a*a,u=s*o,c=3*a*s,h=3*l*o,f=l*a;return t[0]=e[0]*u+r[0]*c+n[0]*h+i[0]*f,t[1]=e[1]*u+r[1]*c+n[1]*h+i[1]*f,t[2]=e[2]*u+r[2]*c+n[2]*h+i[2]*f,t},i.random=function(t,e){e=e||1;var r=2*n.RANDOM()*Math.PI,i=2*n.RANDOM()-1,a=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*e,t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t},i.transformMat3=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t},i.transformQuat=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,h=u*i+l*n-o*a,f=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+h*-l-f*-s,t[1]=h*u+d*-s+f*-o-c*-l,t[2]=f*u+d*-l+c*-s-h*-o,t},i.rotateX=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.rotateY=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.rotateZ=function(t,e,r,n){var i=[],a=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=3),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s1?0:Math.acos(a)},i.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(l))},e.exports=i},{"./common.js":175}],183:[function(t,e,r){var n=t("./common.js"),i={};i.create=function(){var t=new n.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},i.fromValues=function(t,e,r,i){var a=new n.ARRAY_TYPE(4);return a[0]=t,a[1]=e,a[2]=r,a[3]=i,a},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},i.set=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t},i.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t},i.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t},i.sub=i.subtract,i.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t},i.mul=i.multiply,i.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},i.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t},i.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},i.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)},i.dist=i.distance,i.squaredDistance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},i.lerp=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t},i.random=function(t,e){return e=e||1,t[0]=n.RANDOM(),t[1]=n.RANDOM(),t[2]=n.RANDOM(),t[3]=n.RANDOM(),i.normalize(t,t),i.scale(t,t,e),t},i.transformMat4=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t},i.transformQuat=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,h=u*i+l*n-o*a,f=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+h*-l-f*-s,t[1]=h*u+d*-s+f*-o-c*-l,t[2]=f*u+d*-l+c*-s-h*-o,t[3]=e[3],t},i.forEach=function(){var t=i.create();return function(e,r,n,i,a,o){var s,l;for(r||(r=4),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,s=n;s1.0001)return null;g+=m[c]}return Math.abs(g-1)>.001?null:[h,o(t,m),m]}var l=t("barycentric"),u=t("polytope-closest-point/lib/closest_point_2d.js");e.exports=s},{barycentric:39,"polytope-closest-point/lib/closest_point_2d.js":464}],185:[function(t,e,r){var n="precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if(any(lessThan(f_position, clipBounds[0])) || \n any(greaterThan(f_position, clipBounds[1]))) {\n discard;\n }\n gl_FragColor = vec4(pickId, f_id.xyz);\n}";r.meshShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec4 m_position = model * vec4(position, 1.0);\n vec4 t_position = view * m_position;\n gl_Position = projection * t_position;\n f_color = color;\n f_normal = normal;\n f_data = position;\n f_eyeDirection = eyePosition - position;\n f_lightDirection = lightPosition - position;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution_2_0(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\n\n\nfloat cookTorranceSpecular_1_1(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution_2_0(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(f_data, clipBounds[0])) || \n any(greaterThan(f_data, clipBounds[1]))) {\n discard;\n }\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n \n if(!gl_FrontFacing) {\n N = -N;\n }\n\n float specular = cookTorranceSpecular_1_1(L, V, N, roughness, fresnel);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(f_data, clipBounds[0])) || \n any(greaterThan(f_data, clipBounds[1]))) {\n discard;\n }\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if(any(lessThan(position, clipBounds[0])) || \n any(greaterThan(position, clipBounds[1]))) {\n gl_Position = vec4(0,0,0,0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5,0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}",attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}",fragment:n,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if(any(lessThan(position, clipBounds[0])) || \n any(greaterThan(position, clipBounds[1]))) {\n gl_Position = vec4(0,0,0,0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}",fragment:n,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}",fragment:"precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor,1);\n}\n",attributes:[{name:"position",type:"vec3"}]}},{}],186:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l,u,c,h,f,d,p,m,g,v,y,b,x,_,w,M,A,k,T){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=c,this.triangleNormals=f,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=b,this.pointColors=_,this.pointUVs=w,this.pointSizes=M,this.pointIds=x,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=k,this.contourVAO=T,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this._model=I,this._view=I,this._projection=I,this._resolution=[1,1]}function i(t){for(var e=w({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return _(r,[256,256,4],[4,0,1])}function a(t,e,r){for(var n=new Array(e),i=0;i=1},P.isTransparent=function(){return this.opacity<1},P.pickSlots=1,P.setPickBase=function(t){this.pickId=t},P.highlight=function(t){if(!t||!this.contourEnable)return void(this.contourCount=0);for(var e=M(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=A.mallocFloat32(6*a),s=0,l=0;l0){var f=this.triShader;f.bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var f=this.lineShader;f.bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){var f=this.pointShader;f.bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var f=this.contourShader;f.bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind()}},P.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||I,n=t.view||I,i=t.projection||I,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255},l=this.pickShader;if(l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0){var l=this.pointPickShader;l.bind(),l.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}},P.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;as[A]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n],a.uniforms.angle=v[n],u.drawArrays(u.TRIANGLES,s[A],s[k]-s[A]))),y[n]&&M&&(e[1^n]-=T*d*b[n],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=x[n],a.uniforms.angle=_[n],u.drawArrays(u.TRIANGLES,w,M)),e[1^n]=T*c[2+(1^n)]-1,p[n+2]&&(e[1^n]+=T*d*m[n+2],As[A]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n+2],a.uniforms.angle=v[n+2],u.drawArrays(u.TRIANGLES,s[A],s[k]-s[A]))),y[n+2]&&M&&(e[1^n]+=T*d*b[n+2],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=x[n+2],a.uniforms.angle=_[n+2],u.drawArrays(u.TRIANGLES,w,M))}}(),c.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,u=r.pixelRatio;if(this.titleCount){for(var c=0;c<2;++c)e[c]=2*(o[c]*u-a[c])/(a[2+c]-a[c])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),c.bind=function(){var t=[0,0],e=[0,0],r=[0,0];return function(){var n=this.plot,i=this.shader,a=n._tickBounds,o=n.dataBox,s=n.screenBox,l=n.viewBox;i.bind();for(var u=0;u<2;++u){var c=a[u],h=a[u+2],f=h-c,d=.5*(o[u+2]+o[u]),p=o[u+2]-o[u],m=l[u],g=l[u+2],v=g-m,y=s[u],b=s[u+2],x=b-y;e[u]=2*f/p*v/x,t[u]=2*(c-d)/p*v/x}r[1]=2*n.pixelRatio/(s[3]-s[1]),r[0]=r[1]*(s[3]-s[1])/(s[2]-s[0]),i.uniforms.dataScale=e,i.uniforms.dataShift=t,i.uniforms.textScale=r,this.vbo.bind(),i.attributes.textCoordinate.pointer()}}(),c.update=function(t){var e,r,n,i,a,o=[],l=t.ticks,u=t.bounds;for(a=0;a<2;++a){var c=[Math.floor(o.length/3)],h=[-1/0],f=l[a];for(e=0;er)for(t=r;te)for(t=e;t=0){for(var A=0|M.type.charAt(M.type.length-1),k=new Array(A),T=0;T=0;)S+=1;w[b]=S}var E=new Array(r.length);a(),d._relink=a,d.types={uniforms:l(r),attributes:l(n)},d.attributes=s(p,d,x,w),Object.defineProperty(d,"uniforms",o(p,d,r,E))},e.exports=a},{"./lib/GLError":194,"./lib/create-attributes":195,"./lib/create-uniforms":196,"./lib/reflect":197,"./lib/runtime-reflect":198,"./lib/shader-cache":199}],194:[function(t,e,r){function n(t,e,r){this.shortMessage=e||"",this.longMessage=r||"",this.rawError=t||"",this.message="gl-shader: "+(e||t||"")+(r?"\n"+r:""),this.stack=(new Error).stack}n.prototype=new Error,n.prototype.name="GLError",n.prototype.constructor=n,e.exports=n},{}],195:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}function i(t,e,r,i,a,o,s){for(var l=["gl","v"],u=[],c=0;c=0){var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+h+": "+f);i(t,e,d[0],n,p,o,h)}else{if(!(f.indexOf("mat")>=0))throw new s("","Unknown data type for attribute "+h+": "+f);var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+h+": "+f);a(t,e,d,n,p,o,h)}}}return o}e.exports=o;var s=t("./GLError"),l=n.prototype;l.pointer=function(t,e,r,n){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,t||a.FLOAT,!!e,r||0,n||0),a.enableVertexAttribArray(o)},l.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(l,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}})},{"./GLError":194}],196:[function(t,e,r){"use strict";function n(t){return new Function("y","return function(){return y}")(t)}function i(t,e){for(var r=new Array(t),n=0;n4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+i+"fv(locations["+e+"],false,obj"+t+")"}throw new s("","Unknown uniform data type for "+name+": "+r)}var i=r.charCodeAt(r.length-1)-48;if(i<2||i>4)throw new s("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+i+"iv(locations["+e+"],obj"+t+")";case"v":return"gl.uniform"+i+"fv(locations["+e+"],obj"+t+")";default:throw new s("","Unrecognized data type for vector "+name+": "+r)}}}function c(t,e){if("object"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],a=t;parseInt(n)+""===n?a+="["+n+"]":a+="."+n,"object"==typeof i?r.push.apply(r,c(a,i)):r.push([a,i])}return r}function h(e){for(var n=["return function updateProperty(obj){"],i=c("",e),o=0;o4)throw new s("","Invalid data type");return"b"===t.charAt(0)?i(r,!1):i(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+t);return i(r*r,0)}throw new s("","Unknown uniform data type for "+name+": "+t)}}function d(t,e,i){if("object"==typeof i){var o=p(i);Object.defineProperty(t,e,{get:n(o),set:h(i),enumerable:!0,configurable:!1})}else a[i]?Object.defineProperty(t,e,{get:l(i),set:h(i),enumerable:!0,configurable:!1}):t[e]=f(r[i].type)}function p(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var u=1;u1)for(var l=0;l=0){var m=e[p]-n[p]*(e[p+2]-e[p])/(n[p+2]-n[p]);0===p?o.drawLine(m,e[1],m,e[3],d[p],f[p]):o.drawLine(e[0],m,e[2],m,d[p],f[p])}}for(var p=0;p=0;--t)this.objects[t].dispose();this.objects.length=0;for(var t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},f.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},f.removeObject=function(t){for(var e=this.objects,r=0;r0){var r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function o(t){return"boolean"!=typeof t||t}function s(t){function e(){if(!w&&G.autoResize){var t=M.parentNode,e=1,r=1;t&&t!==document.body?(e=t.clientWidth,r=t.clientHeight):(e=window.innerWidth,r=window.innerHeight);var n=0|Math.ceil(e*G.pixelRatio),i=0|Math.ceil(r*G.pixelRatio);if(n!==M.width||i!==M.height){M.width=n,M.height=i;var a=M.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=e+"px",a.height=r+"px",N=!0}}}function r(){for(var t=O.length,e=F.length,r=0;r0&&0===j[e-1];)j.pop(),F.pop().dispose()}function s(){if(G.contextLost)return!0;k.isContextLost()&&(G.contextLost=!0,G.mouseListener.enabled=!1,G.selection.object=null,G.oncontextloss&&G.oncontextloss())}function b(){if(!s()){k.colorMask(!0,!0,!0,!0),k.depthMask(!0),k.disable(k.BLEND),k.enable(k.DEPTH_TEST);for(var t=O.length,e=F.length,r=0;rS.distance)continue;for(var u=0;u>>1;for(r=0;r=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}function a(t,e){var r=t.gl,i=s(r),a=s(r),l=o(r,u.pointVertex,u.pointFragment),c=o(r,u.pickVertex,u.pickFragment),h=new n(t,i,a,l,c);return h.update(e),t.addObject(h),h}var o=t("gl-shader"),s=t("gl-buffer"),l=t("typedarray-pool"),u=t("./lib/shader");e.exports=a;var c=n.prototype;c.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},c.update=function(t){function e(e,r){return e in t?t[e]:r}var r;t=t||{},this.sizeMin=e("sizeMin",.5),this.sizeMax=e("sizeMax",20),this.color=e("color",[1,0,0,1]).slice(),this.areaRatio=e("areaRatio",1),this.borderColor=e("borderColor",[0,0,0,1]).slice(),this.blend=e("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,a=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,o=t.positions,s=i?o:l.mallocFloat32(o.length),u=a?t.idToIndex:l.mallocInt32(n);if(i||s.set(o),!a)for(s.set(o),r=0;r>8&255,e[2]=r>>16&255,e[3]=r>>24&255,this.pickBuffer.bind(),a.attributes.pickId.pointer(o.UNSIGNED_BYTE),a.uniforms.pickOffset=e,this.pickOffset=r);var f=o.getParameter(o.BLEND),d=o.getParameter(o.DITHER);return f&&!this.blend&&o.disable(o.BLEND),d&&o.disable(o.DITHER),o.drawArrays(o.POINTS,0,this.pointCount),f&&!this.blend&&o.enable(o.BLEND),d&&o.enable(o.DITHER),r+this.pointCount}}(),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{"./lib/shader":203,"gl-buffer":138,"gl-shader":204,"typedarray-pool":518}],212:[function(t,e,r){function n(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return a=u*d+c*p+h*m+f*g,a<0&&(a=-a,d=-d,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*h+l*m,t[3]=s*f+l*g,t}e.exports=n},{}],213:[function(t,e,r){"use strict";e.exports={vertex:"precision highp float;\n#define GLSLIFY 1\n\n\nvec4 computePosition_1_0(vec2 posHi, vec2 posLo, vec2 scHi, vec2 scLo, vec2 trHi, vec2 trLo) {\n return vec4((posHi + trHi) * scHi\n \t\t\t//FIXME: this thingy does not give noticeable precision gain, need test\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo\n , 0, 1);\n}\n\n\nattribute vec2 positionHi, positionLo;\nattribute float size, border;\nattribute vec2 char, color;\n\n//this is 64-bit form of scale and translate\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform float pixelRatio;\nuniform vec4 viewBox;\nuniform sampler2D palette;\n\nvarying vec4 charColor, borderColor;\nvarying vec2 charId;\nvarying vec2 pointCoord;\nvarying float pointSize;\nvarying float borderWidth;\n\n\nvoid main() {\n charColor = texture2D(palette, vec2(color.x / 255., 0));\n borderColor = texture2D(palette, vec2(color.y / 255., 0));\n\n gl_PointSize = size * pixelRatio;\n pointSize = size * pixelRatio;\n\n charId = char;\n borderWidth = border;\n\n gl_Position = computePosition_1_0(\n positionHi, positionLo,\n scaleHi, scaleLo,\n translateHi, translateLo);\n\n pointCoord = viewBox.xy + (viewBox.zw - viewBox.xy) * (gl_Position.xy * .5 + .5);\n}\n",fragment:"precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D chars;\nuniform vec2 charsShape;\nuniform float charsStep, pixelRatio, charOffset;\n\nvarying vec4 borderColor;\nvarying vec4 charColor;\nvarying vec2 charId;\nvarying vec2 pointCoord;\nvarying float pointSize;\nvarying float borderWidth;\n\nvoid main() {\n\tvec2 pointUV = (pointCoord - gl_FragCoord.xy + pointSize * .5) / pointSize;\n\tpointUV.x = 1. - pointUV.x;\n\tpointUV.y += charOffset;\n\tvec2 texCoord = ((charId + pointUV) * charsStep) / charsShape;\n\tfloat dist = texture2D(chars, texCoord).r;\n\n\t//max-distance alpha\n\tif (dist < 1e-2)\n\t\tdiscard;\n\n\tfloat dif = 5. * pixelRatio * borderWidth / pointSize;\n\tfloat borderLevel = .748 - dif * .5;\n\tfloat charLevel = .748 + dif * .5;\n\tfloat gamma = .005 * charsStep / pointSize;\n\n\tfloat borderAmt = smoothstep(borderLevel - gamma, borderLevel + gamma, dist);\n\tfloat charAmt = smoothstep(charLevel - gamma, charLevel + gamma, dist);\n\n\tvec4 color = borderColor;\n\tcolor.a *= borderAmt;\n\n\tgl_FragColor = mix(color, charColor, charAmt);\n}\n",pickVertex:"precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 positionHi, positionLo;\nattribute vec4 id;\nattribute float size;\n\nuniform vec2 scaleHi, scaleLo, translateHi, translateLo;\nuniform vec4 pickOffset;\nuniform float pixelRatio;\n\nvarying vec4 fragColor;\n\n\nvec4 computePosition_1_0(vec2 posHi, vec2 posLo, vec2 scHi, vec2 scLo, vec2 trHi, vec2 trLo) {\n return vec4((posHi + trHi) * scHi\n \t\t\t//FIXME: this thingy does not give noticeable precision gain, need test\n + (posLo + trLo) * scHi\n + (posHi + trHi) * scLo\n + (posLo + trLo) * scLo\n , 0, 1);\n}\n\n\nvoid main() {\n vec4 fragId = id + pickOffset;\n\n fragId.y += floor(fragId.x / 256.0);\n fragId.x -= floor(fragId.x / 256.0) * 256.0;\n\n fragId.z += floor(fragId.y / 256.0);\n fragId.y -= floor(fragId.y / 256.0) * 256.0;\n\n fragId.w += floor(fragId.z / 256.0);\n fragId.z -= floor(fragId.z / 256.0) * 256.0;\n\n fragColor = fragId / 255.0;\n\n gl_PointSize = size * .25 * pixelRatio;\n\n gl_Position = computePosition_1_0(\n positionHi, positionLo,\n scaleHi, scaleLo,\n translateHi, translateLo);\n}\n",pickFragment:"precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n gl_FragColor = fragColor;\n}\n"}},{}],214:[function(t,e,r){arguments[4][74][0].apply(r,arguments)},{dup:74}],215:[function(t,e,r){arguments[4][193][0].apply(r,arguments)},{"./lib/GLError":216,"./lib/create-attributes":217,"./lib/create-uniforms":218,"./lib/reflect":219,"./lib/runtime-reflect":220,"./lib/shader-cache":221,dup:193}],216:[function(t,e,r){arguments[4][194][0].apply(r,arguments)},{dup:194}],217:[function(t,e,r){arguments[4][195][0].apply(r,arguments)},{"./GLError":216,dup:195}],218:[function(t,e,r){arguments[4][196][0].apply(r,arguments)},{"./GLError":216,"./reflect":219,dup:196}],219:[function(t,e,r){arguments[4][197][0].apply(r,arguments)},{dup:197}],220:[function(t,e,r){arguments[4][198][0].apply(r,arguments)},{dup:198}],221:[function(t,e,r){arguments[4][199][0].apply(r,arguments)},{"./GLError":216,dup:199,"gl-format-compiler-error":146,"weakmap-shim":539}],222:[function(t,e,r){"use strict";function n(t,e,r,n,a){a<=4*f?i(0,a-1,t,e,r,n):h(0,a-1,t,e,r,n)}function i(t,e,r,n,i,a){for(var o=t+1;o<=e;++o){for(var s=r[o],l=n[2*o],u=n[2*o+1],c=i[o],h=a[o],f=o;f>t;){var d=r[f-1],p=n[2*(f-1)];if((d-s||l-p)>=0)break;r[f]=d,n[2*f]=p,n[2*f+1]=n[2*f-1],i[f]=i[f-1],a[f]=a[f-1],f-=1}r[f]=s,n[2*f]=l,n[2*f+1]=u,i[f]=c,a[f]=h}}function a(t,e,r,n,i,a){var o=r[t],s=n[2*t],l=n[2*t+1],u=i[t],c=a[t];r[t]=r[e],n[2*t]=n[2*e],n[2*t+1]=n[2*e+1],i[t]=i[e],a[t]=a[e],r[e]=o,n[2*e]=s,n[2*e+1]=l,i[e]=u,a[e]=c}function o(t,e,r,n,i,a){r[t]=r[e],n[2*t]=n[2*e],n[2*t+1]=n[2*e+1],i[t]=i[e],a[t]=a[e]}function s(t,e,r,n,i,a,o){var s=n[t],l=i[2*t],u=i[2*t+1],c=a[t],h=o[t];n[t]=n[e],i[2*t]=i[2*e],i[2*t+1]=i[2*e+1],a[t]=a[e],o[t]=o[e],n[e]=n[r],i[2*e]=i[2*r],i[2*e+1]=i[2*r+1],a[e]=a[r],o[e]=o[r],n[r]=s,i[2*r]=l,i[2*r+1]=u,a[r]=c,o[r]=h}function l(t,e,r,n,i,a,o,s,l,u,c){s[t]=s[e],l[2*t]=l[2*e],l[2*t+1]=l[2*e+1],u[t]=u[e],c[t]=c[e],s[e]=r,l[2*e]=n,l[2*e+1]=i,u[e]=a,c[e]=o}function u(t,e,r,n,i){return(r[t]-r[e]||n[2*e]-n[2*t]||i[t]-i[e])<0}function c(t,e,r,n,i,a,o,s){return(e-a[t]||o[2*t]-r||i-s[t])<0}function h(t,e,r,n,d,p){var m=(e-t+1)/6|0,g=t+m,v=e-m,y=t+e>>1,b=y-m,x=y+m,_=g,w=b,M=y,A=x,k=v,T=t+1,S=e-1,E=0;u(_,w,r,n,d,p)&&(E=_,_=w,w=E),u(A,k,r,n,d,p)&&(E=A,A=k,k=E),u(_,M,r,n,d,p)&&(E=_,_=M,M=E),u(w,M,r,n,d,p)&&(E=w,w=M,M=E),u(_,A,r,n,d,p)&&(E=_,_=A,A=E),u(M,A,r,n,d,p)&&(E=M,M=A,A=E),u(w,k,r,n,d,p)&&(E=w,w=k,k=E),u(w,M,r,n,d,p)&&(E=w,w=M,M=E),u(A,k,r,n,d,p)&&(E=A,A=k,k=E);var L=r[w],C=n[2*w],D=n[2*w+1],z=d[w],I=p[w],P=r[A],O=n[2*A],R=n[2*A+1],j=d[A],F=p[A],N=_,B=M,U=k,V=g,H=y,q=v,G=r[N],Y=r[B],W=r[U];r[V]=G,r[H]=Y,r[q]=W;for(var X=0;X<2;++X){var Z=n[2*N+X],J=n[2*B+X],K=n[2*U+X];n[2*V+X]=Z,n[2*H+X]=J,n[2*q+X]=K}var Q=d[N],$=d[B],tt=d[U];d[V]=Q,d[H]=$,d[q]=tt;var et=p[N],rt=p[B],nt=p[U];p[V]=et,p[H]=rt,p[q]=nt,o(b,t,r,n,d,p),o(x,e,r,n,d,p);for(var it=T;it<=S;++it)if(c(it,L,C,D,z,r,n,d))it!==T&&a(it,T,r,n,d,p),++T;else if(!c(it,P,O,R,j,r,n,d))for(;;){if(c(S,P,O,R,j,r,n,d)){c(S,L,C,D,z,r,n,d)?(s(it,T,S,r,n,d,p),++T,--S):(a(it,S,r,n,d,p),--S);break}if(--S=Math.max(.9*d,32)){var b=u+s>>>1;l(g,v,h,f,b,c+1),f=b}l(g,v,h,f,y,c+1),f=y}}}var u=t.length>>>1;if(u<1)return[];for(var c=1/0,h=1/0,f=-1/0,d=-1/0,p=0;p=0;--_){t[2*_]=(t[2*_]-c)*v,t[2*_+1]=(t[2*_+1]-h)*y;var k=x[_];k!==M&&(w.push(new i(b*Math.pow(.5,k),_+1,A-(_+1))),A=_+1,M=k)}return w.push(new i(b*Math.pow(.5,k+1),0,A)),o.free(x),w}var o=t("typedarray-pool"),s=t("./lib/sort");e.exports=a},{"./lib/sort":222,"typedarray-pool":518}],224:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.sizeBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.charBuffer=s,this.pointCount=0,this.pickOffset=0,this.points=null,this.scales=[],this.xCoords=[],this.charCanvas=document.createElement("canvas"),this.charTexture=h(this.plot.gl,this.charCanvas),this.charStep=400,this.charOffset=.032,this.snapThreshold=1e4,this.paletteTexture=h(this.plot.gl,[256,1])}function i(t,e){var r=t.gl,i=a(r,l.vertex,l.fragment),s=a(r,l.pickVertex,l.pickFragment),u=o(r),c=o(r),h=o(r),f=o(r),d=o(r),p=new n(t,i,s,u,c,h,f,d);return p.update(e),t.addObject(p),p}e.exports=i;var a=t("gl-shader"),o=t("gl-buffer"),s=t("typedarray-pool"),l=t("./lib/shaders"),u=t("snap-points-2d"),c=t("font-atlas-sdf"),h=t("gl-texture2d"),f=t("color-id"),d=t("ndarray"),p=t("clamp"),m=t("binary-search-bounds"),g=n.prototype;!function(){function t(){var t=this.plot,u=t.viewBox,c=t.dataBox,h=t.pixelRatio,f=c[2]-c[0],d=c[3]-c[1],p=2/f,m=2/d,g=-c[0]-.5*f,v=-c[1]-.5*d;i[0]=p,a[0]=p-i[0],i[1]=m,a[1]=m-i[1],o[0]=g,s[0]=g-o[0],o[1]=v,s[1]=v-o[1];var y=u[2]-u[0],b=u[3]-u[1];e=Math.min(f/y,d/b),l[0]=2*h/y,l[1]=2*h/b,r=c[0],n=c[2]}var e,r,n,i=new Float32Array([0,0]),a=new Float32Array([0,0]),o=new Float32Array([0,0]),s=new Float32Array([0,0]),l=[0,0],u=[0,0,0,0];g.drawPick=function(l){var c=void 0!==l,h=this.plot,f=this.pointCount,d=f>this.snapThreshold;if(!f)return l;t.call(this);var p=h.gl,g=c?this.pickShader:this.shader,v=p.isEnabled(p.BLEND);if(g.bind(),c){this.pickOffset=l;for(var y=0;y<4;++y)u[y]=l>>8*y&255;g.uniforms.pickOffset=u,this.idBuffer.bind(),g.attributes.id.pointer(p.UNSIGNED_BYTE,!1)}else p.blendFuncSeparate(p.SRC_ALPHA,p.ONE_MINUS_SRC_ALPHA,p.ONE,p.ONE_MINUS_SRC_ALPHA),p.blendColor(0,0,0,1),v||p.enable(p.BLEND),this.colorBuffer.bind(),g.attributes.color.pointer(p.UNSIGNED_BYTE,!1),this.charBuffer.bind(),g.attributes.char.pointer(p.UNSIGNED_BYTE,!1),g.uniforms.chars=this.charTexture.bind(0),g.uniforms.charsShape=[this.charCanvas.width,this.charCanvas.height],g.uniforms.charsStep=this.charStep,g.uniforms.palette=this.paletteTexture.bind(1),g.uniforms.charOffset=this.charOffset;this.sizeBuffer.bind(),g.attributes.size.pointer(p.FLOAT,!1,8,0),c||g.attributes.border.pointer(p.FLOAT,!1,8,4),this.positionBuffer.bind(),g.attributes.positionHi.pointer(p.FLOAT,!1,16,0),g.attributes.positionLo.pointer(p.FLOAT,!1,16,8),g.uniforms.pixelRatio=h.pixelRatio,g.uniforms.scaleHi=i,g.uniforms.scaleLo=a,g.uniforms.translateHi=o,g.uniforms.translateLo=s,g.uniforms.viewBox=h.viewBox;var b=this.scales;if(d)for(var x=b.length-1;x>=0;x--){var _=b[x];if(!(_.pixelSize&&_.pixelSize<1.25*e&&x>1)){var w=_.offset,M=_.count+w,A=m.ge(this.xCoords,r,w,M-1),k=m.lt(this.xCoords,n,A,M-1)+1;k>A&&p.drawArrays(p.POINTS,A,k-A)}}else p.drawArrays(p.POINTS,0,f);if(c)return l+f;v?p.blendFunc(p.ONE,p.ONE_MINUS_SRC_ALPHA):p.disable(p.BLEND)}}(),g.draw=g.drawPick,g.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}},g.update=function(t){t=t||{};var e=t.positions||[],r=t.colors||[],n=t.glyphs||[],i=t.sizes||[],a=t.borderWidths||[],o=t.borderColors||[],l=this.plot.gl;null!=t.charOffset&&(this.charOffset=t.charOffset),this.points=e;var h=this.points.length/2,m=s.mallocInt32(h),g=s.mallocFloat32(2*h),v=s.mallocFloat64(2*h);v.set(this.points),this.pointCount=h;var y=h>this.snapThreshold;y&&(this.scales=u(v,m,g));for(var b=s.mallocFloat32(4*h),x=s.mallocFloat32(2*h),_=s.mallocUint8(2*h),w=s.mallocUint32(h),M=s.mallocUint8(2*h),A={},k=[],T=[],S=[],E=0,L=h,C=0;EO&&(O=i[E]);var R=this.charStep;this.charStep=p(Math.ceil(4*O),128,768);var j=Object.keys(I),F=this.charStep,N=Math.floor(F/2),B=l.getParameter(l.MAX_TEXTURE_SIZE),U=B/F*(B/F),V=Math.min(B,F*j.length),H=Math.min(B,F*Math.ceil(F*j.length/B)),q=Math.floor(V/F);j.length>U&&console.warn("gl-scatter2d-fancy: number of characters is more than maximum texture size. Try reducing it."),this.chars&&this.chars+""==j+""&&this.charStep==R||(this.charCanvas=c({ +canvas:this.charCanvas,family:"sans-serif",size:N,shape:[V,H],step:[F,F],chars:j}),this.chars=j);for(var E=0;E>>1,n=u.mallocInt32(r),i=u.mallocFloat32(2*r),a=u.mallocFloat64(2*r);a.set(this.points),this.scales=l(a,n,i,this.bounds);var o=u.mallocFloat64(r),s=u.mallocFloat32(2*r),c=u.mallocFloat32(2*r);s.set(a);for(var h=0,f=0;h>8&255,g[2]=t>>16&255,g[3]=t>>24&255,n.uniforms.pickOffset=g,l.bind(),n.attributes.pickId.pointer(v.UNSIGNED_BYTE)):(n.uniforms.useWeight=1,this.weightBuffer.bind(),n.attributes.weight.pointer());for(var z=this.xCoords,I=(x[0]-u[0]-S*c*y)/_,P=(x[2]-u[0]+S*c*y)/_,O=!0,R=i.length-1;R>=0;R--){var j=i[R];if(!(j.pixelSize1)){var F=j.offset,N=j.count+F,B=s.ge(z,I,F,N-1),U=s.lt(z,P,B,N-1)+1;U>B&&v.drawArrays(v.POINTS,B,U-B),!e&&O&&(O=!1,n.uniforms.useWeight=0)}}return t+this.pointCount},h.drawPick=h.draw,h.pick=function(t,e,r){var n=r-this.pickOffset;return n<0||n>=this.pointCount?null:{object:this,pointId:n,dataCoord:[this.points[2*n],this.points[2*n+1]]}}},{"./lib/shader":225,"binary-search-bounds":226,"gl-buffer":138,"gl-shader":236,"snap-points-2d":228,"typedarray-pool":518}],230:[function(t,e,r){"use strict";function n(t,e){var r=a[e];if(r||(r=a[e]={}),t in r)return r[t];for(var n=i(t,{textAlign:"center",textBaseline:"middle",lineHeight:1,font:e}),o=i(t,{triangles:!0,textAlign:"center",textBaseline:"middle",lineHeight:1,font:e}),s=[[1/0,1/0],[-1/0,-1/0]],l=0;lMath.abs(R[1])){var j=O;O=R,R=j,j=I,I=P,P=j;var F=D;D=z,z=F}O[0]<0&&(I[D]=-1),R[1]>0&&(P[z]=-1);for(var N=0,B=0,C=0;C<4;++C)N+=Math.pow(p[4*D+C],2),B+=Math.pow(p[4*z+C],2);I[D]/=Math.sqrt(N),P[z]/=Math.sqrt(B),d.axes[0]=I,d.axes[1]=P,d.fragClipBounds[0]=u(E,b[0],_,-1e8),d.fragClipBounds[1]=u(E,b[1],_,1e8),e.vao.draw(f.TRIANGLES,e.vertexCount),e.lineWidth>0&&(f.lineWidth(e.lineWidth),e.vao.draw(f.LINES,e.lineVertexCount,e.vertexCount))}}function f(t,e,r,n,i,a){var o=r.gl;if(r.vao.bind(),i===r.opacity<1||a){t.bind();var s=t.uniforms;s.model=n.model||x,s.view=n.view||x,s.projection=n.projection||x,w[0]=2/o.drawingBufferWidth,w[1]=2/o.drawingBufferHeight,s.screenSize=w,s.highlightId=r.highlightId,s.highlightScale=r.highlightScale,s.fragClipBounds=z,s.clipBounds=r.axes.bounds,s.opacity=r.opacity,s.pickGroup=r.pickId/255,s.pixelRatio=r.pixelRatio,r.vao.draw(o.TRIANGLES,r.vertexCount),r.lineWidth>0&&(o.lineWidth(r.lineWidth),r.vao.draw(o.LINES,r.lineVertexCount,r.vertexCount))}h(e,r,n,i,a),r.vao.unbind()}function d(t){var e=t.gl,r=y.createPerspective(e),n=y.createOrtho(e),i=y.createProject(e),a=y.createPickPerspective(e),s=y.createPickOrtho(e),l=y.createPickProject(e),u=p(e),c=p(e),h=p(e),f=p(e),d=m(e,[{buffer:u,size:3,type:e.FLOAT},{buffer:c,size:4,type:e.FLOAT},{buffer:h,size:2,type:e.FLOAT},{buffer:f,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),g=new o(e,r,n,i,u,c,h,f,d,a,s,l);return g.update(t),g}var p=t("gl-buffer"),m=t("gl-vao"),g=t("typedarray-pool"),v=t("gl-mat4/multiply"),y=t("./lib/shaders"),b=t("./lib/glyphs"),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];e.exports=d;var _=o.prototype;_.pickSlots=1,_.setPickBase=function(t){this.pickId=t},_.isTransparent=function(){if(this.opacity<1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]<1)return!0;return!1},_.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]>=1)return!0;return!1};var w=[0,0],M=[0,0,0],A=[0,0,0],k=[0,0,0,1],T=[0,0,0,1],S=x.slice(),E=[0,0,0],L=[[0,0,0],[0,0,0]],C=[-1e8,-1e8,-1e8],D=[1e8,1e8,1e8],z=[C,D];_.draw=function(t){f(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!1,!1)},_.drawTransparent=function(t){f(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!0,!1)},_.drawPick=function(t){f(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,!1,!0)},_.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[2]+(t.value[1]<<8)+(t.value[0]<<16);if(e>=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},_.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},_.update=function(t){if(t=t||{},"perspective"in t&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if("projectOpacity"in t)if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{var r=+t.projectOpacity;this.projectOpacity=[r,r,r]}"opacity"in t&&(this.opacity=t.opacity),this.dirty=!0;var n=t.position;if(n){var i=t.font||"normal",a=t.alignment||[0,0],o=[1/0,1/0,1/0],s=[-1/0,-1/0,-1/0],l=t.glyph,u=t.color,c=t.size,h=t.angle,f=t.lineColor,d=0,p=0,m=0,v=n.length;t:for(var y=0;y0&&(D[0]=-a[0]*(1+k[0][0]));for(var H=M.cells,q=M.positions,_=0;_0){var v=r*c;o.drawBox(h-v,f-v,d+v,f+v,a),o.drawBox(h-v,p-v,d+v,p+v,a),o.drawBox(h-v,f-v,h+v,p+v,a),o.drawBox(d-v,f-v,d+v,p+v,a)}}}},l.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},l.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":233,"gl-buffer":138,"gl-shader":236}],235:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function i(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}function a(t,e){return new i(t,o(t,e),s.mallocUint8(e[0]*e[1]*4))}e.exports=a;var o=t("gl-fbo"),s=t("typedarray-pool"),l=t("ndarray"),u=t("bit-twiddle").nextPow2,c=t("cwise/lib/wrapper")({args:["array",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},"scalar","scalar","index"],pre:{body:"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},body:{body:"{if(_inline_46_arg0_<255||_inline_46_arg1_<255||_inline_46_arg2_<255||_inline_46_arg3_<255){var _inline_46_l=_inline_46_arg4_-_inline_46_arg6_[0],_inline_46_a=_inline_46_arg5_-_inline_46_arg6_[1],_inline_46_f=_inline_46_l*_inline_46_l+_inline_46_a*_inline_46_a;_inline_46_fthis.buffer.length){s.free(this.buffer);for(var n=this.buffer=s.mallocUint8(u(r*e*4)),i=0;i=0){for(var A=0|M.type.charAt(M.type.length-1),k=new Array(A),T=0;T=0;)S+=1;_[w]=S}var E=new Array(r.length);a(),d._relink=a,d.types={uniforms:l(r),attributes:l(n)},d.attributes=s(p,d,b,_),Object.defineProperty(d,"uniforms",o(p,d,r,E))},e.exports=a},{"./lib/GLError":237,"./lib/create-attributes":238,"./lib/create-uniforms":239,"./lib/reflect":240,"./lib/runtime-reflect":241,"./lib/shader-cache":242}],237:[function(t,e,r){arguments[4][194][0].apply(r,arguments)},{dup:194}],238:[function(t,e,r){arguments[4][195][0].apply(r,arguments)},{"./GLError":237,dup:195}],239:[function(t,e,r){arguments[4][196][0].apply(r,arguments)},{"./GLError":237,"./reflect":240,dup:196}],240:[function(t,e,r){arguments[4][197][0].apply(r,arguments)},{dup:197}],241:[function(t,e,r){arguments[4][198][0].apply(r,arguments)},{dup:198}],242:[function(t,e,r){arguments[4][199][0].apply(r,arguments)},{"./GLError":237,dup:199,"gl-format-compiler-error":146,"weakmap-shim":539}],243:[function(t,e,r){"use strict";function n(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}function i(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r}e.exports=i;var a=n.prototype;a.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(t){return t.slice()}),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},a.draw=function(){var t=this.enable,e=this.width,r=this.color,n=this.center,i=this.plot,a=i.line,o=i.dataBox,s=i.viewBox;if(a.bind(),o[0]<=n[0]&&n[0]<=o[2]&&o[1]<=n[1]&&n[1]<=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),u=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&&a.drawLine(l,u,s[0],u,e[0],r[0]),t[1]&&a.drawLine(l,u,l,s[1],e[1],r[1]),t[2]&&a.drawLine(l,u,s[2],u,e[2],r[2]),t[3]&&a.drawLine(l,u,l,s[3],e[3],r[3])}},a.dispose=function(){this.plot.removeOverlay(this)}},{}],244:[function(t,e,r){"use strict";var n=t("gl-shader");e.exports=function(t){return n(t,"precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, color;\nattribute float weight;\n\nuniform mat4 model, view, projection;\nuniform vec3 coordinates[3];\nuniform vec4 colors[3];\nuniform vec2 screenShape;\nuniform float lineWidth;\n\nvarying vec4 fragColor;\n\nvoid main() {\n vec3 vertexPosition = mix(coordinates[0],\n mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\n\n vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\n vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\n vec2 delta = weight * clipOffset * screenShape;\n vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\n\n gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\n fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\n}\n","precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}",null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},{"gl-shader":236}],245:[function(t,e,r){"use strict";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r, +this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}function i(t,e){function r(t,e,r,n,a,o){var s=[t,e,r,0,0,0,1];s[n+3]=1,s[n]=a,i.push.apply(i,s),s[6]=-1,i.push.apply(i,s),s[n]=o,i.push.apply(i,s),i.push.apply(i,s),s[6]=1,i.push.apply(i,s),s[n]=a,i.push.apply(i,s)}var i=[];r(0,0,0,0,0,1),r(0,0,0,1,0,1),r(0,0,0,2,0,1),r(1,0,0,1,-1,1),r(1,0,0,2,-1,1),r(0,1,0,0,-1,1),r(0,1,0,2,-1,1),r(0,0,1,0,-1,1),r(0,0,1,1,-1,1);var l=a(t,i),u=o(t,[{type:t.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:t.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:t.FLOAT,buffer:l,size:1,offset:24,stride:28}]),c=s(t);c.attributes.position.location=0,c.attributes.color.location=1,c.attributes.weight.location=2;var h=new n(t,l,u,c);return h.update(e),h}var a=t("gl-buffer"),o=t("gl-vao"),s=t("./shaders/index");e.exports=i;var l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],u=n.prototype,c=[0,0,0],h=[0,0,0],f=[0,0];u.isTransparent=function(){return!1},u.drawTransparent=function(t){},u.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||l,o=t.view||l,s=t.projection||l;this.axes&&(i=this.axes.lastCubeProps.axis);for(var u=c,d=h,p=0;p<3;++p)i&&i[p]<0?(u[p]=this.bounds[0][p],d[p]=this.bounds[1][p]):(u[p]=this.bounds[1][p],d[p]=this.bounds[0][p]);f[0]=e.drawingBufferWidth,f[1]=e.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=o,n.uniforms.projection=s,n.uniforms.coordinates=[this.position,u,d],n.uniforms.colors=this.colors,n.uniforms.screenShape=f;for(var p=0;p<3;++p)n.uniforms.lineWidth=this.lineWidth[p]*this.pixelRatio,this.enabled[p]&&(r.draw(e.TRIANGLES,6,6*p),this.drawSides[p]&&r.draw(e.TRIANGLES,12,18+12*p));r.unbind()},u.update=function(t){t&&("bounds"in t&&(this.bounds=t.bounds),"position"in t&&(this.position=t.position),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"colors"in t&&(this.colors=t.colors),"enabled"in t&&(this.enabled=t.enabled),"drawSides"in t&&(this.drawSides=t.drawSides))},u.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders/index":244,"gl-buffer":138,"gl-vao":252}],246:[function(t,e,r){var n=t("gl-shader"),i="precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n worldCoordinate = vec3(uv.zw, f.x);\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n",a="precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution_2_0(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\n\n\nfloat beckmannSpecular_1_1(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution_2_0(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\n\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (kill > 0.0 ||\n any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n discard;\n }\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = beckmannSpecular_1_1(L, V, N, roughness);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n",o="precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n vec4 worldPosition = model * vec4(dataCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z = clipPosition.z + zOffset;\n\n gl_Position = clipPosition;\n value = f;\n kill = -1.0;\n worldCoordinate = dataCoordinate;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n",s="precision mediump float;\n#define GLSLIFY 1\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if(kill > 0.0 ||\n any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n discard;\n }\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n";r.createShader=function(t){var e=n(t,i,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,i,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,o,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{"gl-shader":236}],247:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}function i(t){var e=x([y({colormap:t,nshades:R,format:"rgba"}).map(function(t){return[t[0],t[1],t[2],255*t[3]]})]);return b.divseq(e,255),e}function a(t,e,r,i,a,o,s,l,u,c,h,f,d,p){this.gl=t,this.shape=e,this.bounds=r,this.intensityBounds=[],this._shader=i,this._pickShader=a,this._coordinateBuffer=o,this._vao=s,this._colorMap=l,this._contourShader=u,this._contourPickShader=c,this._contourBuffer=h,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new n([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=p,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[0/0,0/0,0/0],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[_(v.mallocFloat(1024),[0,0]),_(v.mallocFloat(1024),[0,0]),_(v.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}function o(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||F,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=N.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],M(l,t.model,l);var u=N.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)u[i][n]=t.clipBounds[i][n];u[0][r]=-1e8,u[1][r]=1e8}return N.showSurface=o,N.showContour=s,N}function s(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=B;n.model=t.model||I,n.view=t.view||I,n.projection=t.projection||I,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.contourColor=this.contourColor[0],n.inverseModel=A(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],s=0;s<3;++s)a[s]=Math.min(Math.max(this.clipBounds[i][s],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=V,n.vertexColor=this.vertexColor;var l=U;for(M(l,n.view,n.model),M(l,n.projection,l),A(l,l),i=0;i<3;++i)n.eyePosition[i]=l[12+i]/l[15];var u=l[15];for(i=0;i<3;++i)u+=this.lightPosition[i]*l[4*i+3];for(i=0;i<3;++i){var c=l[12+i];for(s=0;s<3;++s)c+=l[4*s+i]*this.lightPosition[s];n.lightPosition[i]=c/u}var h=o(n,this);if(h.showSurface&&e===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=h.projections[i],this._shader.uniforms.clipBounds=h.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(h.showContour&&!e){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var d=this._contourVAO;for(d.bind(),i=0;i<3;++i)for(f.uniforms.permutation=O[i],r.lineWidth(this.contourWidth[i]),s=0;s=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},j.pickSlots=1,j.setPickBase=function(t){this.pickId=t};var F=[0,0,0],N={showSurface:!1,showContour:!1,projections:[I.slice(),I.slice(),I.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]},B={model:I,view:I,projection:I,inverseModel:I.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},U=I.slice(),V=[1,0,0,0,1,0,0,0,1];j.draw=function(t){return s.call(this,t,!1)},j.drawTransparent=function(t){return s.call(this,t,!0)};var H={model:I,view:I,projection:I,inverseModel:I,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};j.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=H;r.model=t.model||I,r.view=t.view||I,r.projection=t.projection||I,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.permutation=V;for(var n=0;n<2;++n)for(var i=r.clipBounds[n],a=0;a<3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);var s=o(r,this);if(s.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(e.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&(this._pickShader.uniforms.model=s.projections[n],this._pickShader.uniforms.clipBounds=s.clipBounds[n],this._vao.draw(e.TRIANGLES,this._vertexCount));this._vao.unbind()}if(s.showContour){var l=this._contourPickShader;l.bind(),l.uniforms=r;var u=this._contourVAO;for(u.bind(),a=0;a<3;++a)for(e.lineWidth(this.contourWidth[a]),l.uniforms.permutation=O[a],n=0;n>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var u=r.position;u[0]=u[1]=u[2]=0;for(var c=0;c<2;++c)for(var h=c?a:1-a,f=0;f<2;++f)for(var d=f?l:1-l,p=i+c,m=s+f,g=h*d,v=0;v<3;++v)u[v]+=this._field[v].get(p,m)*g;for(var y=this._pickResult.level,b=0;b<3;++b)if(y[b]=k.le(this.contourLevels[b],u[b]),y[b]<0)this.contourLevels[b].length>0&&(y[b]=0);else if(y[b]Math.abs(_-u[b])&&(y[b]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},j.update=function(t){t=t||{},this.dirty=!0,"contourWidth"in t&&(this.contourWidth=u(t.contourWidth,Number)),"showContour"in t&&(this.showContour=u(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=u(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=h(t.contourColor)),"contourProject"in t&&(this.contourProject=u(t.contourProject,function(t){return u(t,Boolean)})),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=h(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=u(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=u(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var n=(e.shape[0]+2)*(e.shape[1]+2);n>this._field[2].data.length&&(v.freeFloat(this._field[2].data),this._field[2].data=v.mallocFloat(d.nextPow2(n))),this._field[2]=_(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),l(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(v.freeFloat(this._field[o].data),this._field[o].data=v.mallocFloat(this._field[2].size)),this._field[o]=_(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var s=t.coords;if(!Array.isArray(s)||3!==s.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=s[o];for(y=0;y<2;++y)if(c.shape[y]!==a[y])throw new Error("gl-surface: coords have incorrect shape");l(this._field[o],c)}}else if(t.ticks){var f=t.ticks;if(!Array.isArray(f)||2!==f.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=f[o];if((Array.isArray(p)||p.length)&&(p=_(p)),p.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var m=_(p.data,a);m.stride[o]=p.stride[0],m.stride[1^o]=0,l(this._field[o],m)}}else{for(o=0;o<2;++o){var g=[0,0];g[o]=1,this._field[o]=_(this._field[o].data,[a[0]+2,a[1]+2],g,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var xt=0;xt<5;++xt)tt.pop();H-=1}continue t}tt.push(it[0],it[1],st[0],st[1],it[2]),H+=1}}nt.push(H)}this._contourOffsets[et]=rt,this._contourCounts[et]=nt}var _t=v.mallocFloat(tt.length);for(o=0;oi||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function o(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}function s(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function l(t,e,r,n,i,a,o,l){var u=l.dtype,c=l.shape.slice();if(c.length<2||c.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var h=0,f=0,d=s(c,l.stride.slice());"float32"===u?h=t.FLOAT:"float64"===u?(h=t.FLOAT,d=!1,u="float32"):"uint8"===u?h=t.UNSIGNED_BYTE:(h=t.UNSIGNED_BYTE,d=!1,u="uint8");if(2===c.length)f=t.LUMINANCE,c=[c[0],c[1],1],l=p(l.data,c,[l.stride[0],l.stride[1],1],l.offset);else{if(3!==c.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===c[2])f=t.ALPHA;else if(2===c[2])f=t.LUMINANCE_ALPHA;else if(3===c[2])f=t.RGB;else{if(4!==c[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");f=t.RGBA}c[2]}if(f!==t.LUMINANCE&&f!==t.ALPHA||i!==t.LUMINANCE&&i!==t.ALPHA||(f=i),f!==i)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var v=l.size,y=o.indexOf(n)<0;if(y&&o.push(n),h===a&&d)0===l.offset&&l.data.length===v?y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,l.data):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,l.data):y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,l.data.subarray(l.offset,l.offset+v)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,l.data.subarray(l.offset,l.offset+v));else{var b;b=a===t.FLOAT?g.mallocFloat32(v):g.mallocUint8(v);var _=p(b,c,[c[2],c[2]*c[0],1]);h===t.FLOAT&&a===t.UNSIGNED_BYTE?x(_,l):m.assign(_,l),y?t.texImage2D(t.TEXTURE_2D,n,i,c[0],c[1],0,i,a,b.subarray(0,v)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,c[0],c[1],i,a,b.subarray(0,v)),a===t.FLOAT?g.freeFloat32(b):g.freeUint8(b)}}function u(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function c(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var s=u(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new o(t,s,e,r,n,i)}function h(t,e,r,n,i,a){var s=u(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new o(t,s,r,n,i,a)}function f(t,e){var r=e.dtype,n=e.shape.slice(),i=t.getParameter(t.MAX_TEXTURE_SIZE);if(n[0]<0||n[0]>i||n[1]<0||n[1]>i)throw new Error("gl-texture2d: Invalid texture size");var a=s(n,e.stride.slice()),l=0;"float32"===r?l=t.FLOAT:"float64"===r?(l=t.FLOAT,a=!1,r="float32"):"uint8"===r?l=t.UNSIGNED_BYTE:(l=t.UNSIGNED_BYTE,a=!1,r="uint8");var c=0;if(2===n.length)c=t.LUMINANCE,n=[n[0],n[1],1],e=p(e.data,n,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==n.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===n[2])c=t.ALPHA;else if(2===n[2])c=t.LUMINANCE_ALPHA;else if(3===n[2])c=t.RGB;else{if(4!==n[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");c=t.RGBA}}l!==t.FLOAT||t.getExtension("OES_texture_float")||(l=t.UNSIGNED_BYTE,a=!1);var h,f,d=e.size;if(a)h=0===e.offset&&e.data.length===d?e.data:e.data.subarray(e.offset,e.offset+d);else{var v=[n[2],n[2]*n[0],1];f=g.malloc(d,r);var y=p(f,n,v,0);"float32"!==r&&"float64"!==r||l!==t.UNSIGNED_BYTE?m.assign(y,e):x(y,e),h=f.subarray(0,d)}var b=u(t);return t.texImage2D(t.TEXTURE_2D,0,c,n[0],n[1],0,c,l,h),a||g.free(f),new o(t,b,n[0],n[1],c,l)}function d(t){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(v||n(t),"number"==typeof arguments[1])return c(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return c(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var e=arguments[1],r=i(e)?e:e.raw;if(r)return h(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return f(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")} +var p=t("ndarray"),m=t("ndarray-ops"),g=t("typedarray-pool");e.exports=d;var v=null,y=null,b=null,x=function(t,e){m.muls(t,e,255)},_=o.prototype;Object.defineProperties(_,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&v.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),y.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&v.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),y.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),b.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),b.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(b.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return a(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return t|=0,a(this,t,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,a(this,this._shape[0],t),t}}}),_.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},_.dispose=function(){this.gl.deleteTexture(this.handle)},_.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},_.setPixels=function(t,e,r,n){var a=this.gl;this.bind(),Array.isArray(e)?(n=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),n=n||0;var o=i(t)?t:t.raw;if(o){this._mipLevels.indexOf(n)<0?(a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,this.type,o),this._mipLevels.push(n)):a.texSubImage2D(a.TEXTURE_2D,n,e,r,this.format,this.type,o)}else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>n||r+t.shape[0]>this._shape[0]>>>n||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");l(a,e,r,n,this.format,this.type,this._mipLevels,t)}}},{ndarray:446,"ndarray-ops":440,"typedarray-pool":518}],249:[function(t,e,r){"use strict";function n(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}e.exports=n},{}],258:[function(t,e,r){function n(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}e.exports=n},{}],259:[function(t,e,r){function n(t,e,r,n){return i[0]=n,i[1]=r,i[2]=e,i[3]=t,a[0]}e.exports=n;var i=new Uint8Array(4),a=new Float32Array(i.buffer)},{}],260:[function(t,e,r){function n(t){for(var e=Array.isArray(t)?t:i(t),r=0;r0)continue;n=t.slice(0,1).join("")}return e(n),G+=n.length,U=U.slice(n.length),U.length}}function D(){return/[^a-fA-F0-9]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),R=O,F+1)}function z(){return"."===O?(U.push(O),B=g,R=O,F+1):/[eE]/.test(O)?(U.push(O),B=g,R=O,F+1):"x"===O&&1===U.length&&"0"===U[0]?(B=w,U.push(O),R=O,F+1):/[^\d]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),R=O,F+1)}function I(){return"f"===O&&(U.push(O),R=O,F+=1),/[eE]/.test(O)?(U.push(O),R=O,F+1):"-"===O&&/[eE]/.test(R)?(U.push(O),R=O,F+1):/[^\d]/.test(O)?(e(U.join("")),B=u,F):(U.push(O),R=O,F+1)}function P(){if(/[^\d\w_]/.test(O)){var t=U.join("");return B=J.indexOf(t)>-1?b:Z.indexOf(t)>-1?y:v,e(U.join("")),B=u,F}return U.push(O),R=O,F+1}var O,R,j,F=0,N=0,B=u,U=[],V=[],H=1,q=0,G=0,Y=!1,W=!1,X="";t=t||{};var Z=o,J=i;return"300 es"===t.version&&(Z=l,J=s),function(t){return V=[],null!==t?r(t.replace?t.replace(/\r\n/g,"\n"):t):n()}}e.exports=n;var i=t("./lib/literals"),a=t("./lib/operators"),o=t("./lib/builtins"),s=t("./lib/literals-300es"),l=t("./lib/builtins-300es"),u=999,c=9999,h=0,f=1,d=2,p=3,m=4,g=5,v=6,y=7,b=8,x=9,_=10,w=11,M=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":263,"./lib/builtins-300es":262,"./lib/literals":265,"./lib/literals-300es":264,"./lib/operators":266}],262:[function(t,e,r){var n=t("./builtins");n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":263}],263:[function(t,e,r){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],264:[function(t,e,r){var n=t("./literals");e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":265}],265:[function(t,e,r){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],266:[function(t,e,r){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],267:[function(t,e,r){function n(t,e){var r=i(e),n=[];return n=n.concat(r(t)),n=n.concat(r(null))}var i=t("./index");e.exports=n},{"./index":261}],268:[function(t,e,r){"use strict";function n(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var a=new Int32Array(this.arrayBuffer);t=a[0],e=a[1],r=a[2],this.d=e+2*r;for(var o=0;o=u[f+0]&&n>=u[f+1]?(o[h]=!0,a.push(l[h])):o[h]=!1}}},n.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),u=this._convertToCellCoord(r),c=this._convertToCellCoord(n),h=s;h<=u;h++)for(var f=l;f<=c;f++){var d=this.d*f+h;if(i.call(this,t,e,r,n,d,a,o))return}},n.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},n.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=i+this.cells.length+1+1,r=0,n=0;n>1,c=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+t[e+h],h+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+h],h+=f,c-=8);if(0===a)a=1-u;else{if(a===l)return o?0/0:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),e+=o+h>=1?f/l:f*Math.pow(2,1-h),e*l>=2&&(o++,l/=2),o+h>=c?(s=0,o=c):o+h>=1?(s=(e*l-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;t[r+d]=255&o,d+=p,o/=256,u-=8);t[r+d-p]|=128*m}},{}],270:[function(t,e,r){"use strict";function n(t,e,r){this.vertices=t,this.adjacent=e,this.boundary=r,this.lastVisited=-1}function i(t,e,r){this.vertices=t,this.cell=e,this.index=r}function a(t,e){return c(t.vertices,e.vertices)}function o(t){for(var e=["function orient(){var tuple=this.tuple;return test("],r=0;r<=t;++r)r>0&&e.push(","),e.push("tuple[",r,"]");e.push(")}return orient");var n=new Function("test",e.join("")),i=u[t+1];return i||(i=u),n(i)}function s(t,e,r){this.dimension=t,this.vertices=e,this.simplices=r,this.interior=r.filter(function(t){return!t.boundary}),this.tuple=new Array(t+1);for(var n=0;n<=t;++n)this.tuple[n]=this.vertices[n];var i=h[t];i||(i=h[t]=o(t)),this.orient=i}function l(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var a=t.slice(0,i+1),o=u.apply(void 0,a);if(0===o)throw new Error("Input not in general position");for(var l=new Array(i+1),c=0;c<=i;++c)l[c]=c;o<0&&(l[0]=1,l[1]=0);for(var h=new n(l,new Array(i+1),!1),f=h.adjacent,d=new Array(i+2),c=0;c<=i;++c){for(var p=l.slice(),m=0;m<=i;++m)m===c&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var v=new n(p,new Array(i+1),!0);f[c]=v,d[c]=v}d[i+1]=h;for(var c=0;c<=i;++c)for(var p=f[c].vertices,y=f[c].adjacent,m=0;m<=i;++m){var b=p[m];if(b<0)y[m]=h;else for(var x=0;x<=i;++x)f[x].vertices.indexOf(b)<0&&(y[m]=f[x])}for(var _=new s(i,a,d),w=!!e,c=i+1;c0;){t=o.pop();for(var s=(t.vertices,t.adjacent),l=0;l<=r;++l){var u=s[l];if(u.boundary&&!(u.lastVisited<=-n)){for(var c=u.vertices,h=0;h<=r;++h){var f=c[h];i[h]=f<0?e:a[f]}var d=this.orient();if(d>0)return u;u.lastVisited=-n,0===d&&o.push(u)}}}return null},f.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,u=s.adjacent,c=0;c<=n;++c)a[c]=i[l[c]];s.lastVisited=r;for(var c=0;c<=n;++c){var h=u[c];if(!(h.lastVisited>=r)){var f=a[c];a[c]=t;var d=this.orient();if(a[c]=f,d<0){s=h;continue t}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},f.addPeaks=function(t,e){var r=this.vertices.length-1,o=this.dimension,s=this.vertices,l=this.tuple,u=this.interior,c=this.simplices,h=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,u.push(e);for(var f=[];h.length>0;){var e=h.pop(),d=e.vertices,p=e.adjacent,m=d.indexOf(r);if(!(m<0))for(var g=0;g<=o;++g)if(g!==m){var v=p[g];if(v.boundary&&!(v.lastVisited>=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var b=0,x=0;x<=o;++x)y[x]<0?(b=x,l[x]=t):l[x]=s[y[x]];var _=this.orient();if(_>0){y[b]=r,v.boundary=!1,u.push(v),h.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var w=v.adjacent,M=d.slice(),A=p.slice(),k=new n(M,A,!0);c.push(k);var T=w.indexOf(e);if(!(T<0)){w[T]=k,A[m]=v,M[g]=-1,A[g]=e,p[g]=k,k.flip();for(var x=0;x<=o;++x){var S=M[x];if(!(S<0||S===r)){for(var E=new Array(o-1),L=0,C=0;C<=o;++C){var D=M[C];D<0||C===x||(E[L++]=D)}f.push(new i(E,k,x))}}}}}}f.sort(a);for(var g=0;g+1=0?o[l++]=s[c]:u=1&c;if(u===(1&t)){var h=o[0];o[0]=o[1],o[1]=h}e.push(o)}}return e}},{"robust-orientation":486,"simplicial-complex":497}],271:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}function i(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function a(t,e){var r=p(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function o(t,e){var r=t.intervals([]);r.push(e),a(t,r)}function s(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?y:(r.splice(n,1),a(t,r),b)}function l(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function c(t,e){for(var r=0;r>1],a=[],o=[],s=[],r=0;r3*(e+1)?o(this,t):this.left.insert(t):this.left=p([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?o(this,t):this.right.insert(t):this.right=p([t]);else{var r=v.ge(this.leftPoints,t,f),n=v.ge(this.rightPoints,t,d);this.leftPoints.splice(r,0,t),this.rightPoints.splice(n,0,t)}},x.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1))return s(this,t);var r=this.left.remove(t);return 2===r?(this.left=null,this.count-=1,b):(r===b&&(this.count-=1),r)}if(t[0]>this.mid){if(!this.right)return y;if(4*(this.left?this.left.count:0)>3*(e-1))return s(this,t);var r=this.right.remove(t);return 2===r?(this.right=null,this.count-=1,b):(r===b&&(this.count-=1),r)}if(1===this.count)return this.leftPoints[0]===t?2:y;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var o=this.left,r=this.right;n.count-=a.count,n.right=a.left,a.left=o,a.right=r}i(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?i(this,this.left):i(this,this.right);return b}for(var o=v.ge(this.leftPoints,t,f);othis.mid){if(this.right){var r=this.right.queryPoint(t,e);if(r)return r}return u(this.rightPoints,t,e)}return c(this.leftPoints,e)},x.queryInterval=function(t,e,r){if(tthis.mid&&this.right){var n=this.right.queryInterval(t,e,r);if(n)return n}return ethis.mid?u(this.rightPoints,t,r):c(this.leftPoints,r)};var _=m.prototype;_.insert=function(t){this.root?this.root.insert(t):this.root=new n(t[0],null,null,[t],[t])},_.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==y}return!1},_.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},_.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(_,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(_,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":56}],272:[function(t,e,r){"use strict";function n(t,e){e=e||new Array(t.length);for(var r=0;r=r&&s<=i&&l>=n&&l<=a&&c.push(t[p]);else{var m=Math.floor((d+f)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[m]);var g=(h+1)%2;(0===h?r<=s:n<=l)&&(u.push(d),u.push(m-1),u.push(g)),(0===h?i>=s:a>=l)&&(u.push(m+1),u.push(f),u.push(g))}}return c}e.exports=n},{}],279:[function(t,e,r){"use strict";function n(t,e,r,a,o,s){if(!(o-a<=r)){var l=Math.floor((a+o)/2);i(t,e,l,a,o,s%2),n(t,e,r,a,l-1,s+1),n(t,e,r,l+1,o,s+1)}}function i(t,e,r,n,o,s){for(;o>n;){if(o-n>600){var l=o-n+1,u=r-n+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1);i(t,e,r,Math.max(n,Math.floor(r-u*h/l+f)),Math.min(o,Math.floor(r+(l-u)*h/l+f)),s)}var d=e[2*r+s],p=n,m=o;for(a(t,e,n,r),e[2*o+s]>d&&a(t,e,n,o);pd;)m--}e[2*n+s]===d?a(t,e,n,m):(m++,a(t,e,m,o)),m<=r&&(n=m+1),r<=m&&(o=m-1)}}function a(t,e,r,n){o(t,r,n),o(e,2*r,2*n),o(e,2*r+1,2*n+1)}function o(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}e.exports=n},{}],280:[function(t,e,r){"use strict";function n(t,e,r,n,a,o){for(var s=[0,t.length-1,0],l=[],u=a*a;s.length;){var c=s.pop(),h=s.pop(),f=s.pop();if(h-f<=o)for(var d=f;d<=h;d++)i(e[2*d],e[2*d+1],r,n)<=u&&l.push(t[d]);else{var p=Math.floor((f+h)/2),m=e[2*p],g=e[2*p+1];i(m,g,r,n)<=u&&l.push(t[p]);var v=(c+1)%2;(0===c?r-a<=m:n-a<=g)&&(s.push(f),s.push(p-1),s.push(v)),(0===c?r+a>=m:n+a>=g)&&(s.push(p+1),s.push(h),s.push(v))}}return l}function i(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}e.exports=n},{}],281:[function(t,e,r){"use strict";function n(t,e){var r;if(h(t)){var l,u=t.stops&&"object"==typeof t.stops[0][0],c=u||void 0!==t.property,f=u||!c,d=t.type||e||"exponential";if("exponential"===d)l=o;else if("interval"===d)l=a;else if("categorical"===d)l=i;else{if("identity"!==d)throw new Error('Unknown function type "'+d+'"');l=s}if(u){for(var p={},m=[],g=0;g=t.stops.length)break;if(e<=t.stops[n][0])break;n++}return 0===n?t.stops[n][1]:n===t.stops.length?t.stops[n-1][1]:l(e,r,t.stops[n-1][0],t.stops[n][0],t.stops[n-1][1],t.stops[n][1])}function s(t,e){return e}function l(t,e,r,n,i,a){return"function"==typeof i?function(){var o=i.apply(void 0,arguments),s=a.apply(void 0,arguments);return l(t,e,r,n,o,s)}:i.length?c(t,e,r,n,i,a):u(t,e,r,n,i,a)}function u(t,e,r,n,i,a){var o,s=n-r,l=t-r;return o=1===e?l/s:(Math.pow(e,l)-1)/(Math.pow(e,s)-1),i*(1-o)+a*o}function c(t,e,r,n,i,a){for(var o=[],s=0;s -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},linepattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_blur;\n\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_fade;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\nvoid main() {\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_linewidth.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_linewidth.t) or when fading out\n // (v_linewidth.s)\n float blur = u_blur * v_gamma_scale;\n float alpha = clamp(min(dist - (v_linewidth.t - blur), v_linewidth.s - dist) / blur, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n float y_a = 0.5 + (v_normal.y * v_linewidth.s / u_pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * v_linewidth.s / u_pattern_size_b.y);\n vec2 pos_a = mix(u_pattern_tl_a, u_pattern_br_a, vec2(x_a, y_a));\n vec2 pos_b = mix(u_pattern_tl_b, u_pattern_br_b, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n alpha *= u_opacity;\n\n gl_FragColor = color * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_linewidth;\nuniform mediump float u_gapwidth;\nuniform mediump float u_antialiasing;\nuniform mediump float u_extra;\nuniform mat2 u_antialiasingmatrix;\nuniform mediump float u_offset;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n v_linesofar = a_linesofar;\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},linesdfpattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform lowp vec4 u_color;\nuniform lowp float u_opacity;\n\nuniform float u_blur;\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\nvoid main() {\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_linewidth.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_linewidth.t) or when fading out\n // (v_linewidth.s)\n float blur = u_blur * v_gamma_scale;\n float alpha = clamp(min(dist - (v_linewidth.t - blur), v_linewidth.s - dist) / blur, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma, 0.5 + u_sdfgamma, sdfdist);\n\n gl_FragColor = u_color * (alpha * u_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_linewidth;\nuniform mediump float u_gapwidth;\nuniform mediump float u_antialiasing;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform float u_extra;\nuniform mat2 u_antialiasingmatrix;\nuniform mediump float u_offset;\n\nvarying vec2 v_normal;\nvarying vec2 v_linewidth;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n float inset = u_gapwidth + (u_gapwidth > 0.0 ? u_antialiasing : 0.0);\n float outset = u_gapwidth + u_linewidth * (u_gapwidth > 0.0 ? 2.0 : 1.0) + u_antialiasing;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset = u_offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit of the position before scaling it with the\n // model/view matrix.\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + (offset + dist) / u_ratio, 0.0, 1.0);\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n // position of y on the screen\n float y = gl_Position.y / gl_Position.w;\n\n // how much features are squished in the y direction by the tilt\n float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);\n\n // how much features are squished in all directions by the perspectiveness\n float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.9));\n\n v_linewidth = vec2(outset, inset);\n v_gamma_scale = perspective_scale * squish_scale;\n}\n"},outline:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\n#pragma mapbox: define lowp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = smoothstep(1.0, 0.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},outlinepattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\nvoid main() {\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = smoothstep(1.0, 0.0, dist);\n \n\n gl_FragColor = mix(color1, color2, u_mix) * alpha * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n vec2 scaled_size_a = u_scale_a * u_pattern_size_a;\n vec2 scaled_size_b = u_scale_b * u_pattern_size_b;\n\n // the correct offset needs to be calculated.\n //\n // The offset depends on how many pixels are between the world origin and\n // the edge of the tile:\n // vec2 offset = mod(pixel_coord, size)\n //\n // At high zoom levels there are a ton of pixels between the world origin\n // and the edge of the tile. The glsl spec only guarantees 16 bits of\n // precision for highp floats. We need more than that.\n //\n // The pixel_coord is passed in as two 16 bit values:\n // pixel_coord_upper = floor(pixel_coord / 2^16)\n // pixel_coord_lower = mod(pixel_coord, 2^16)\n //\n // The offset is calculated in a series of steps that should preserve this precision:\n vec2 offset_a = mod(mod(mod(u_pixel_coord_upper, scaled_size_a) * 256.0, scaled_size_a) * 256.0 + u_pixel_coord_lower, scaled_size_a);\n vec2 offset_b = mod(mod(mod(u_pixel_coord_upper, scaled_size_b) * 256.0, scaled_size_b) * 256.0 + u_pixel_coord_lower, scaled_size_b);\n\n v_pos_a = (u_tile_units_to_pixels * a_pos + offset_a) / scaled_size_a;\n v_pos_b = (u_tile_units_to_pixels * a_pos + offset_b) / scaled_size_b;\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},pattern:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n vec2 scaled_size_a = u_scale_a * u_pattern_size_a;\n vec2 scaled_size_b = u_scale_b * u_pattern_size_b;\n\n // the correct offset needs to be calculated.\n //\n // The offset depends on how many pixels are between the world origin and\n // the edge of the tile:\n // vec2 offset = mod(pixel_coord, size)\n //\n // At high zoom levels there are a ton of pixels between the world origin\n // and the edge of the tile. The glsl spec only guarantees 16 bits of\n // precision for highp floats. We need more than that.\n //\n // The pixel_coord is passed in as two 16 bit values:\n // pixel_coord_upper = floor(pixel_coord / 2^16)\n // pixel_coord_lower = mod(pixel_coord, 2^16)\n //\n // The offset is calculated in a series of steps that should preserve this precision:\n vec2 offset_a = mod(mod(mod(u_pixel_coord_upper, scaled_size_a) * 256.0, scaled_size_a) * 256.0 + u_pixel_coord_lower, scaled_size_a);\n vec2 offset_b = mod(mod(mod(u_pixel_coord_upper, scaled_size_b) * 256.0, scaled_size_b) * 256.0 + u_pixel_coord_lower, scaled_size_b);\n\n v_pos_a = (u_tile_units_to_pixels * a_pos + offset_a) / scaled_size_a;\n v_pos_b = (u_tile_units_to_pixels * a_pos + offset_b) / scaled_size_b;\n}\n"},raster:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_opacity0;\nuniform float u_opacity1;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n vec4 color = color0 * u_opacity0 + color1 * u_opacity1;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb), color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n", +vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos0 = (((a_texture_pos / 32767.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},icon:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform lowp float u_opacity;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * u_opacity;\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_texture_pos;\nattribute vec4 a_data;\n\n\n// matrix is for the vertex position.\nuniform mat4 u_matrix;\n\nuniform mediump float u_zoom;\nuniform bool u_rotate_with_map;\nuniform vec2 u_extrude_scale;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n vec2 a_tex = a_texture_pos.xy;\n mediump float a_labelminzoom = a_data[0];\n mediump vec2 a_zoom = a_data.pq;\n mediump float a_minzoom = a_zoom[0];\n mediump float a_maxzoom = a_zoom[1];\n\n // u_zoom is the current zoom level adjusted for the change in font size\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\n\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\n if (u_rotate_with_map) {\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\n gl_Position.z += z * gl_Position.w;\n } else {\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n }\n\n v_tex = a_tex / u_texsize;\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\n}\n"},sdf:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform lowp vec4 u_color;\nuniform lowp float u_opacity;\nuniform lowp float u_buffer;\nuniform lowp float u_gamma;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\nvarying float v_gamma_scale;\n\nvoid main() {\n lowp float dist = texture2D(u_texture, v_tex).a;\n lowp float fade_alpha = texture2D(u_fadetexture, v_fade_tex).a;\n lowp float gamma = u_gamma * v_gamma_scale;\n lowp float alpha = smoothstep(u_buffer - gamma, u_buffer + gamma, dist) * fade_alpha;\n\n gl_FragColor = u_color * (alpha * u_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nconst float PI = 3.141592653589793;\n\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_texture_pos;\nattribute vec4 a_data;\n\n\n// matrix is for the vertex position.\nuniform mat4 u_matrix;\n\nuniform mediump float u_zoom;\nuniform bool u_rotate_with_map;\nuniform bool u_pitch_with_map;\nuniform mediump float u_pitch;\nuniform mediump float u_bearing;\nuniform mediump float u_aspect_ratio;\nuniform vec2 u_extrude_scale;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\nvarying float v_gamma_scale;\n\nvoid main() {\n vec2 a_tex = a_texture_pos.xy;\n mediump float a_labelminzoom = a_data[0];\n mediump vec2 a_zoom = a_data.pq;\n mediump float a_minzoom = a_zoom[0];\n mediump float a_maxzoom = a_zoom[1];\n\n // u_zoom is the current zoom level adjusted for the change in font size\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\n\n // pitch-alignment: map\n // rotation-alignment: map | viewport\n if (u_pitch_with_map) {\n lowp float angle = u_rotate_with_map ? (a_data[1] / 256.0 * 2.0 * PI) : u_bearing;\n lowp float asin = sin(angle);\n lowp float acos = cos(angle);\n mat2 RotationMatrix = mat2(acos, asin, -1.0 * asin, acos);\n vec2 offset = RotationMatrix * a_offset;\n vec2 extrude = u_extrude_scale * (offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\n gl_Position.z += z * gl_Position.w;\n // pitch-alignment: viewport\n // rotation-alignment: map\n } else if (u_rotate_with_map) {\n // foreshortening factor to apply on pitched maps\n // as a label goes from horizontal <=> vertical in angle\n // it goes from 0% foreshortening to up to around 70% foreshortening\n lowp float pitchfactor = 1.0 - cos(u_pitch * sin(u_pitch * 0.75));\n\n lowp float lineangle = a_data[1] / 256.0 * 2.0 * PI;\n\n // use the lineangle to position points a,b along the line\n // project the points and calculate the label angle in projected space\n // this calculation allows labels to be rendered unskewed on pitched maps\n vec4 a = u_matrix * vec4(a_pos, 0, 1);\n vec4 b = u_matrix * vec4(a_pos + vec2(cos(lineangle),sin(lineangle)), 0, 1);\n lowp float angle = atan((b[1]/b[3] - a[1]/a[3])/u_aspect_ratio, b[0]/b[3] - a[0]/a[3]);\n lowp float asin = sin(angle);\n lowp float acos = cos(angle);\n mat2 RotationMatrix = mat2(acos, -1.0 * asin, asin, acos);\n\n vec2 offset = RotationMatrix * (vec2((1.0-pitchfactor)+(pitchfactor*cos(angle*2.0)), 1.0) * a_offset);\n vec2 extrude = u_extrude_scale * (offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n gl_Position.z += z * gl_Position.w;\n // pitch-alignment: viewport\n // rotation-alignment: viewport\n } else {\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\n }\n\n v_gamma_scale = (gl_Position.w - 0.5);\n\n v_tex = a_tex / u_texsize;\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\n}\n"},collisionbox:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nuniform float u_zoom;\nuniform float u_maxzoom;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\n\nvoid main() {\n\n float alpha = 0.5;\n\n gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0) * alpha;\n\n if (v_placement_zoom > u_zoom) {\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n }\n\n if (u_zoom >= v_max_zoom) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0) * alpha * 0.25;\n }\n\n if (v_placement_zoom >= u_maxzoom) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0) * alpha * 0.2;\n }\n}\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n#define lowp\n#define mediump\n#define highp\n#endif\n\nattribute vec2 a_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_data;\n\nuniform mat4 u_matrix;\nuniform float u_scale;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos + a_extrude / u_scale, 0.0, 1.0);\n\n v_max_zoom = a_data.x;\n v_placement_zoom = a_data.y;\n}\n"}},e.exports.util="float evaluate_zoom_function_1(const vec4 values, const float t) {\n if (t < 1.0) {\n return mix(values[0], values[1], t);\n } else if (t < 2.0) {\n return mix(values[1], values[2], t - 1.0);\n } else {\n return mix(values[2], values[3], t - 2.0);\n }\n}\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\n if (t < 1.0) {\n return mix(value0, value1, t);\n } else if (t < 2.0) {\n return mix(value1, value2, t - 1.0);\n } else {\n return mix(value2, value3, t - 2.0);\n }\n}\n"},{path:454}],283:[function(t,e,r){"use strict";function n(t,e){this.message=(t?t+": ":"")+i.apply(i,Array.prototype.slice.call(arguments,2)),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)}var i=t("util").format;e.exports=n},{util:526}],284:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1;e7)return[new n(c,l,"constants have been deprecated as of v8")];if(!(l in f.constants))return[new n(c,l,'constant "%s" not found',l)];e=a({},e,{value:f.constants[l]})}return u.function&&"object"===i(l)?r(e):u.type&&s[u.type]?s[u.type](e):o(a({},e,{valueSpec:u.type?h[u.type]:u}))}},{"../error/validation_error":283,"../util/extend":284,"../util/get_type":285,"./validate_array":288,"./validate_boolean":289,"./validate_color":290,"./validate_constants":291,"./validate_enum":292,"./validate_filter":293,"./validate_function":294,"./validate_layer":296,"./validate_number":298,"./validate_object":299,"./validate_source":301,"./validate_string":302}],288:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("./validate"),a=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.valueSpec,o=t.style,s=t.styleSpec,l=t.key,u=t.arrayElementValidator||i;if("array"!==n(e))return[new a(l,e,"array expected, %s found",n(e))];if(r.length&&e.length!==r.length)return[new a(l,e,"array length %d expected, length %d found",r.length,e.length)];if(r["min-length"]&&e.length7)return r?[new n(e,r,"constants have been deprecated as of v8")]:[];var a=i(r);if("object"!==a)return[new n(e,r,"object expected, %s found",a)];var o=[];for(var s in r)"@"!==s[0]&&o.push(new n(e+"."+s,r[s],'constants must start with "@"'));return o}},{"../error/validation_error":283,"../util/get_type":285}],292:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint");e.exports=function(t){var e=t.key,r=t.value,a=t.valueSpec,o=[];return a.values.indexOf(i(r))===-1&&o.push(new n(e,r,"expected one of [%s], %s found",a.values.join(", "),r)),o}},{"../error/validation_error":283,"../util/unbundle_jsonlint":286}],293:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_enum"),a=t("../util/get_type"),o=t("../util/unbundle_jsonlint");e.exports=function t(e){var r,s=e.value,l=e.key,u=e.styleSpec,c=[];if("array"!==a(s))return[new n(l,s,"array expected, %s found",a(s))];if(s.length<1)return[new n(l,s,"filter array must have at least 1 element")];switch(c=c.concat(i({key:l+"[0]",value:s[0],valueSpec:u.filter_operator,style:e.style,styleSpec:e.styleSpec})),o(s[0])){case"<":case"<=":case">":case">=":s.length>=2&&"$type"==s[1]&&c.push(new n(l,s,'"$type" cannot be use with operator "%s"',s[0]));case"==":case"!=":3!=s.length&&c.push(new n(l,s,'filter array for operator "%s" must have 3 elements',s[0]));case"in":case"!in":s.length>=2&&(r=a(s[1]),"string"!==r?c.push(new n(l+"[1]",s[1],"string expected, %s found",r)):"@"===s[1][0]&&c.push(new n(l+"[1]",s[1],"filter key cannot be a constant")));for(var h=2;h=8&&(f&&!t.valueSpec["property-function"]?p.push(new n(t.key,t.value,"property functions not supported")):d&&!t.valueSpec["zoom-function"]&&p.push(new n(t.key,t.value,"zoom functions not supported"))),p}},{"../error/validation_error":283,"../util/get_type":285,"./validate":287,"./validate_array":288,"./validate_number":298,"./validate_object":299}],295:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_string");e.exports=function(t){var e=t.value,r=t.key,a=i(t);return a.length?a:(e.indexOf("{fontstack}")===-1&&a.push(new n(r,e,'"glyphs" url must include a "{fontstack}" token')),e.indexOf("{range}")===-1&&a.push(new n(r,e,'"glyphs" url must include a "{range}" token')),a)}},{"../error/validation_error":283,"./validate_string":302}],296:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),a=t("./validate_object"),o=t("./validate_filter"),s=t("./validate_paint_property"),l=t("./validate_layout_property"),u=t("../util/extend");e.exports=function(t){var e=[],r=t.value,c=t.key,h=t.style,f=t.styleSpec;r.type||r.ref||e.push(new n(c,r,'either "type" or "ref" is required'));var d=i(r.type),p=i(r.ref);if(r.id)for(var m=0;ma.maximum?[new i(e,r,"%s is greater than the maximum value %s",r,a.maximum)]:[]}},{"../error/validation_error":283,"../util/get_type":285}],299:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/get_type"),a=t("./validate");e.exports=function(t){var e=t.key,r=t.value,o=t.valueSpec,s=t.objectElementValidators||{},l=t.style,u=t.styleSpec,c=[],h=i(r);if("object"!==h)return[new n(e,r,"object expected, %s found",h)];for(var f in r){var d=f.split(".")[0],p=o&&(o[d]||o["*"]),m=s[d]||s["*"];p||m?c=c.concat((m||a)({key:(e?e+".":e)+f,value:r[f],valueSpec:p,style:l,styleSpec:u,object:r,objectKey:f})):""!==e&&1!==e.split(".").length&&c.push(new n(e,r[f],'unknown property "%s"',f))}for(d in o)o[d].required&&void 0===o[d].default&&void 0===r[d]&&c.push(new n(e,r,'missing required property "%s"',d));return c}},{"../error/validation_error":283,"../util/get_type":285,"./validate":287}],300:[function(t,e,r){"use strict";var n=t("./validate"),i=t("../error/validation_error");e.exports=function(t){var e=t.key,r=t.style,a=t.styleSpec,o=t.value,s=t.objectKey,l=a["paint_"+t.layerType],u=s.match(/^(.*)-transition$/);return u&&l[u[1]]&&l[u[1]].transition?n({key:e,value:o,valueSpec:a.transition,style:r,styleSpec:a}):t.valueSpec||l[s]?n({key:t.key,value:o,valueSpec:t.valueSpec||l[s],style:r,styleSpec:a}):[new i(e,o,'unknown property "%s"',s)]}},{"../error/validation_error":283,"./validate":287}],301:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),a=t("./validate_object"),o=t("./validate_enum");e.exports=function(t){var e=t.value,r=t.key,s=t.styleSpec,l=t.style;if(!e.type)return[new n(r,e,'"type" is required')];switch(i(e.type)){case"vector":case"raster":var u=[];if(u=u.concat(a({key:r,value:e,valueSpec:s.source_tile,style:t.style,styleSpec:s})),"url"in e)for(var c in e)["type","url","tileSize"].indexOf(c)<0&&u.push(new n(r+"."+c,e[c],'a source with a "url" property may not include a "%s" property',c));return u;case"geojson":return a({key:r,value:e,valueSpec:s.source_geojson,style:l,styleSpec:s});case"video":return a({key:r,value:e,valueSpec:s.source_video,style:l,styleSpec:s});case"image":return a({key:r,value:e,valueSpec:s.source_image,style:l,styleSpec:s});default:return o({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","geojson","video","image"]},style:l,styleSpec:s})}}},{"../error/validation_error":283,"../util/unbundle_jsonlint":286,"./validate_enum":292,"./validate_object":299}],302:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.key,a=n(e);return"string"!==a?[new i(r,e,"string expected, %s found",a)]:[]}},{"../error/validation_error":283,"../util/get_type":285}],303:[function(t,e,r){"use strict";function n(t,e){e=e||l;var r=[];return r=r.concat(s({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:u}})),e.$version>7&&t.constants&&(r=r.concat(o({key:"constants",value:t.constants,style:t,styleSpec:e}))),i(r)}function i(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function a(t){return function(){return i(t.apply(this,arguments))}}var o=t("./validate/validate_constants"),s=t("./validate/validate"),l=t("../reference/latest.min"),u=t("./validate/validate_glyphs_url");n.source=a(t("./validate/validate_source")),n.layer=a(t("./validate/validate_layer")),n.filter=a(t("./validate/validate_filter")),n.paintProperty=a(t("./validate/validate_paint_property")),n.layoutProperty=a(t("./validate/validate_layout_property")),e.exports=n},{"../reference/latest.min":304,"./validate/validate":287,"./validate/validate_constants":291,"./validate/validate_filter":293,"./validate/validate_glyphs_url":295,"./validate/validate_layer":296,"./validate/validate_layout_property":297,"./validate/validate_paint_property":300,"./validate/validate_source":301}],304:[function(t,e,r){e.exports=t("./v8.min.json")},{"./v8.min.json":305}],305:[function(t,e,r){e.exports={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_tile","source_geojson","source_video","source_image"],source_tile:{type:{required:!0,type:"enum",values:["vector","raster"]},url:{type:"string"},tiles:{type:"array",value:"string"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:["geojson"]},data:{type:"*"},maxzoom:{type:"number",default:14},buffer:{type:"number",default:64},tolerance:{type:"number",default:3},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:400},clusterMaxZoom:{type:"number"}},source_video:{type:{required:!0,type:"enum",values:["video"]},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:["image"]},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:["fill","line","symbol","circle","raster","background"]},metadata:{type:"*"},ref:{type:"string"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:22},maxzoom:{type:"number",minimum:0,maximum:22},interactive:{type:"boolean",default:!1},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"},"paint.*":{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],layout_background:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_fill:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_circle:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["butt","round","square"],default:"butt"},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["bevel","round","miter"],default:"miter"},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,"property-function":!0,requires:[{"line-join":"miter"}]},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,"property-function":!0,requires:[{"line-join":"round"}]},visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["point","line"],default:"point"},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,"property-function":!0,units:"pixels",requires:[{"symbol-placement":"line"}]},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image"]},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image"]},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image","text-field"]},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"viewport",requires:["icon-image"]},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!1,values:["none","both","width","height"],default:"none",requires:["icon-image","text-field"]},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image","icon-text-fit","text-field"]},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,tokens:!0},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",requires:["icon-image"]},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"pixels",requires:["icon-image"]},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],requires:["text-field"]},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"viewport",requires:["text-field"]},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"]},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-max-width":{type:"number",default:10,minimum:0,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-line-height":{type:"number",default:1.2,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-letter-spacing":{type:"number",default:0,units:"em",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["left","center","right"],default:"center",requires:["text-field"]},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:"center",requires:["text-field"]},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field",{"symbol-placement":"line"}]},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]}, +"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["none","uppercase","lowercase"],default:"none",requires:["text-field"]},"text-offset":{type:"array",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"]},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field"]},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field"]},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!1,requires:["text-field","icon-image"]},visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},layout_raster:{visibility:{type:"enum",function:"piecewise-constant","zoom-function":!0,values:["visible","none"],default:"visible"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:["==","!=",">",">=","<","<=","in","!in","all","any","none","has","!has"]},geometry_type:{type:"enum",values:["Point","LineString","Polygon"]},color_operation:{type:"enum",values:["lighten","saturate","spin","fade","mix"]},function:{stops:{type:"array",required:!0,value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:["exponential","interval","categorical"],default:"exponential"}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},paint:["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:!0},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"fill-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}]},"fill-outline-color":{type:"color",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}]},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["fill-translate"]},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,transition:!0}},paint_line:{"line-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"line-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}]},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["line-translate"]},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-gap-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-offset":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,"property-function":!0,minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}]},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,transition:!0}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-blur":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["circle-translate"]},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["icon-image","icon-translate"]},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:["map","viewport"],default:"map",requires:["text-field","text-translate"]}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees"},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,default:0,minimum:0,maximum:1,transition:!0},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,default:1,minimum:0,maximum:1,transition:!0},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!0,units:"milliseconds"}},paint_background:{"background-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}]},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}}}},{}],306:[function(t,e,r){"use strict";function n(t){return!!(i()&&a()&&o()&&s()&&l()&&u()&&c()&&h(t&&t.failIfMajorPerformanceCaveat))}function i(){return"undefined"!=typeof window&&"undefined"!=typeof document}function a(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function o(){return Function.prototype&&Function.prototype.bind}function s(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function l(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function u(){return"Worker"in window}function c(){return"Uint8ClampedArray"in window}function h(t){return void 0===d[t]&&(d[t]=f(t)),d[t]}function f(t){var e=document.createElement("canvas"),r=Object.create(n.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,e.probablySupportsContext?e.probablySupportsContext("webgl",r)||e.probablySupportsContext("experimental-webgl",r):e.supportsContext?e.supportsContext("webgl",r)||e.supportsContext("experimental-webgl",r):e.getContext("webgl",r)||e.getContext("experimental-webgl",r)}void 0!==e&&e.exports?e.exports=n:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=n);var d={};n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},{}],307:[function(t,e,r){"use strict";function n(t){var e=t.layoutVertexArrayType;this.layoutVertexArray=new e;var r=t.elementArrayType;r&&(this.elementArray=new r);var n=t.elementArrayType2;n&&(this.elementArray2=new n),this.paintVertexArrays=i.mapObject(t.paintVertexArrayTypes,function(t){return new t})}var i=t("../util/util");e.exports=n,n.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,n.prototype.hasCapacityFor=function(t){return this.layoutVertexArray.length+t<=n.MAX_VERTEX_ARRAY_LENGTH},n.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},n.prototype.trim=function(){this.layoutVertexArray.trim(),this.elementArray&&this.elementArray.trim(),this.elementArray2&&this.elementArray2.trim();for(var t in this.paintVertexArrays)this.paintVertexArrays[t].trim()},n.prototype.serialize=function(){return{layoutVertexArray:this.layoutVertexArray.serialize(),elementArray:this.elementArray&&this.elementArray.serialize(),elementArray2:this.elementArray2&&this.elementArray2.serialize(),paintVertexArrays:i.mapObject(this.paintVertexArrays,function(t){return t.serialize()})}},n.prototype.getTransferables=function(t){t.push(this.layoutVertexArray.arrayBuffer),this.elementArray&&t.push(this.elementArray.arrayBuffer),this.elementArray2&&t.push(this.elementArray2.arrayBuffer);for(var e in this.paintVertexArrays)t.push(this.paintVertexArrays[e].arrayBuffer)}},{"../util/util":421}],308:[function(t,e,r){"use strict";function n(t){if(this.zoom=t.zoom,this.overscaling=t.overscaling,this.layer=t.layer,this.childLayers=t.childLayers,this.type=this.layer.type,this.features=[],this.id=this.layer.id,this.index=t.index,this.sourceLayer=this.layer.sourceLayer,this.sourceLayerIndex=t.sourceLayerIndex,this.minZoom=this.layer.minzoom,this.maxZoom=this.layer.maxzoom,this.paintAttributes=i(this),t.arrays){var e=this.programInterfaces;this.bufferGroups=c.mapObject(t.arrays,function(r,n){var i=e[n],a=t.paintVertexArrayTypes[n];return r.map(function(t){return new u(t,{layoutVertexArrayType:i.layoutVertexArrayType.serialize(),elementArrayType:i.elementArrayType&&i.elementArrayType.serialize(),elementArrayType2:i.elementArrayType2&&i.elementArrayType2.serialize(),paintVertexArrayTypes:a})})})}}function i(t){var e={};for(var r in t.programInterfaces){for(var n=e[r]={},i=0;i1?p.name+_:p.name;x[w]=m[_]*g}}},n.VertexArrayType=function(t){return new h({members:t,alignment:4})},n.ElementArrayType=function(t){return new h({members:[{type:"Uint16",name:"vertices",components:t||3}]})}},{"../util/struct_array":419,"../util/util":421,"./array_group":307,"./bucket/circle_bucket":309,"./bucket/fill_bucket":310,"./bucket/line_bucket":311,"./bucket/symbol_bucket":312,"./buffer_group":314,assert:37,"feature-filter":114}],309:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var i=t("../bucket"),a=t("../../util/util"),o=t("../load_geometry"),s=i.EXTENT;e.exports=n,n.prototype=a.inherit(i,{}),n.prototype.addCircleVertex=function(t,e,r,n,i){return t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)},n.prototype.programInterfaces={circle:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"}]),elementArrayType:new i.ElementArrayType,paintAttributes:[{name:"a_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("circle-color",e,r)},multiplier:255,paintProperty:"circle-color"},{name:"a_radius",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-radius",e,r)]},multiplier:10,paintProperty:"circle-radius"},{name:"a_blur",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-blur",e,r)]},multiplier:10,paintProperty:"circle-blur"},{name:"a_opacity",components:1,type:"Uint16",isLayerConstant:!1,getValue:function(t,e,r){return[t.getPaintValue("circle-opacity",e,r)]},multiplier:255,paintProperty:"circle-opacity"}]}},n.prototype.addFeature=function(t){for(var e={zoom:this.zoom},r=o(t),n=this.prepareArrayGroup("circle",0),i=n.layoutVertexArray.length,a=0;a=s||c<0||c>=s)){var h=this.prepareArrayGroup("circle",4),f=h.layoutVertexArray,d=this.addCircleVertex(f,u,c,-1,-1);this.addCircleVertex(f,u,c,1,-1),this.addCircleVertex(f,u,c,1,1),this.addCircleVertex(f,u,c,-1,1),h.elementArray.emplaceBack(d,d+1,d+2),h.elementArray.emplaceBack(d,d+3,d+2)}}this.populatePaintArrays("circle",e,t.properties,n,i)}},{"../../util/util":421,"../bucket":308,"../load_geometry":316}],310:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var i=t("../bucket"),a=t("../../util/util"),o=t("../load_geometry"),s=t("earcut"),l=t("../../util/classify_rings");e.exports=n,n.prototype=a.inherit(i,{}),n.prototype.programInterfaces={fill:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"}]),elementArrayType:new i.ElementArrayType(1),elementArrayType2:new i.ElementArrayType(2),paintAttributes:[{name:"a_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("fill-color",e,r)},multiplier:255,paintProperty:"fill-color"},{name:"a_outline_color",components:4,type:"Uint8",getValue:function(t,e,r){return t.getPaintValue("fill-outline-color",e,r)},multiplier:255,paintProperty:"fill-outline-color"},{name:"a_opacity",components:1,type:"Uint8",getValue:function(t,e,r){return[t.getPaintValue("fill-opacity",e,r)]},multiplier:255,paintProperty:"fill-opacity"}]}},n.prototype.addFeature=function(t){for(var e=o(t),r=l(e,500),n=this.prepareArrayGroup("fill",0),i=n.layoutVertexArray.length,a=0;a0&&a.push(i.length/2);for(var c=0;c=1&&n.elementArray2.emplaceBack(f-1,f),i.push(h.x),i.push(h.y)}}for(var d=s(i,a),p=0;p>6)},n.prototype.programInterfaces={line:{layoutVertexArrayType:new i.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}]),elementArrayType:new i.ElementArrayType}},n.prototype.addFeature=function(t){for(var e=o(t,15),r=0;r2&&t[a-1].equals(t[a-2]);)a--;if(!(t.length<2)){"bevel"===e&&(n=1.05);var o=s/(512*this.overscaling)*15,u=t[0],c=t[a-1],h=u.equals(c);if(this.prepareArrayGroup("line",10*a),2!==a||!h){this.distance=0;var f,d,p,m,g,v,y,b=r,x=h?"butt":r,_=!0;this.e1=this.e2=this.e3=-1,h&&(f=t[a-2],g=u.sub(f)._unit()._perp());for(var w=0;w0){var S=f.dist(d);if(S>2*o){var E=f.sub(f.sub(d)._mult(o/S)._round());this.distance+=E.dist(d),this.addCurrentVertex(E,this.distance,m.mult(1),0,0,!1),d=E}}var L=d&&p,C=L?e:p?b:x;if(L&&"round"===C&&(kn&&(C="bevel"),"bevel"===C&&(k>2&&(C="flipbevel"),k100)M=g.clone();else{var D=m.x*g.y-m.y*g.x>0?-1:1,z=k*m.add(g).mag()/m.sub(g).mag();M._perp()._mult(z*D)}this.addCurrentVertex(f,this.distance,M,0,0,!1),this.addCurrentVertex(f,this.distance,M.mult(-1),0,0,!1)}else if("bevel"===C||"fakeround"===C){var I=m.x*g.y-m.y*g.x>0,P=-Math.sqrt(k*k-1);if(I?(y=0,v=P):(v=0,y=P),_||this.addCurrentVertex(f,this.distance,m,v,y,!1),"fakeround"===C){for(var O,R=Math.floor(8*(.5-(A-.5))),j=0;j=0;F--)O=m.mult((F+1)/(R+1))._add(g)._unit(),this.addPieSliceVertex(f,this.distance,O,I)}p&&this.addCurrentVertex(f,this.distance,g,-v,-y,!1)}else"butt"===C?(_||this.addCurrentVertex(f,this.distance,m,0,0,!1),p&&this.addCurrentVertex(f,this.distance,g,0,0,!1)):"square"===C?(_||(this.addCurrentVertex(f,this.distance,m,1,1,!1),this.e1=this.e2=-1),p&&this.addCurrentVertex(f,this.distance,g,-1,-1,!1)):"round"===C&&(_||(this.addCurrentVertex(f,this.distance,m,0,0,!1),this.addCurrentVertex(f,this.distance,m,1,1,!0),this.e1=this.e2=-1),p&&(this.addCurrentVertex(f,this.distance,g,-1,-1,!0),this.addCurrentVertex(f,this.distance,g,0,0,!1)));if(T&&w2*o){var B=f.add(p.sub(f)._mult(o/N)._round());this.distance+=B.dist(f),this.addCurrentVertex(B,this.distance,g.mult(1),0,0,!1),f=B}}_=!1}}}},n.prototype.addCurrentVertex=function(t,e,r,n,i,a){var o,s=a?1:0,l=this.arrayGroups.line[this.arrayGroups.line.length-1],c=l.layoutVertexArray,h=l.elementArray;o=r.clone(),n&&o._sub(r.perp()._mult(n)),this.e3=this.addLineVertex(c,t,o,s,0,n,e),this.e1>=0&&this.e2>=0&&h.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,o=r.mult(-1),i&&o._sub(r.perp()._mult(i)),this.e3=this.addLineVertex(c,t,o,s,1,-i,e),this.e1>=0&&this.e2>=0&&h.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,e>u/2&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,a))},n.prototype.addPieSliceVertex=function(t,e,r,n){var i=n?1:0;r=r.mult(n?-1:1);var a=this.arrayGroups.line[this.arrayGroups.line.length-1],o=a.layoutVertexArray,s=a.elementArray;this.e3=this.addLineVertex(o,t,r,0,i,0,e),this.e1>=0&&this.e2>=0&&s.emplaceBack(this.e1,this.e2,this.e3),n?this.e2=this.e3:this.e1=this.e3}},{"../../util/util":421,"../bucket":308,"../load_geometry":316}],312:[function(t,e,r){"use strict";function n(t){o.apply(this,arguments),this.showCollisionBoxes=t.showCollisionBoxes,this.overscaling=t.overscaling,this.collisionBoxArray=t.collisionBoxArray,this.symbolQuadsArray=t.symbolQuadsArray,this.symbolInstancesArray=t.symbolInstancesArray,this.sdfIcons=t.sdfIcons,this.iconsNeedLinear=t.iconsNeedLinear,this.adjustedTextSize=t.adjustedTextSize,this.adjustedIconSize=t.adjustedIconSize,this.fontstack=t.fontstack}function i(t,e,r,n,i,a,o,s,l,u,c){return t.emplaceBack(e,r,Math.round(64*n),Math.round(64*i),a/4,o/4,10*(u||0),c,10*(s||0),10*Math.min(l||25,25))}var a=t("point-geometry"),o=t("../bucket"),s=t("../../symbol/anchor"),l=t("../../symbol/get_anchors"),u=t("../../util/token"),c=t("../../symbol/quads"),h=t("../../symbol/shaping"),f=t("../../symbol/resolve_text"),d=t("../../symbol/mergelines"),p=t("../../symbol/clip_line"),m=t("../../util/util"),g=t("../load_geometry"),v=t("../../symbol/collision_feature"),y=h.shapeText,b=h.shapeIcon,x=c.getGlyphQuads,_=c.getIconQuads,w=o.EXTENT;e.exports=n,n.MAX_QUADS=65535,n.prototype=m.inherit(o,{}),n.prototype.serialize=function(){var t=o.prototype.serialize.apply(this);return t.sdfIcons=this.sdfIcons,t.iconsNeedLinear=this.iconsNeedLinear,t.adjustedTextSize=this.adjustedTextSize,t.adjustedIconSize=this.adjustedIconSize,t.fontstack=this.fontstack,t};var M=new o.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_offset",components:2,type:"Int16"},{name:"a_texture_pos",components:2,type:"Uint16"},{name:"a_data",components:4,type:"Uint8"}]),A=new o.ElementArrayType;n.prototype.addCollisionBoxVertex=function(t,e,r,n,i){return t.emplaceBack(e.x,e.y,Math.round(r.x),Math.round(r.y),10*n,10*i)},n.prototype.programInterfaces={glyph:{layoutVertexArrayType:M,elementArrayType:A},icon:{layoutVertexArrayType:M,elementArrayType:A},collisionBox:{layoutVertexArrayType:new o.VertexArrayType([{name:"a_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"},{name:"a_data",components:2,type:"Uint8"}])}},n.prototype.populateArrays=function(t,e,r){var n={lastIntegerZoom:1/0,lastIntegerZoomTime:0,lastZoom:0};this.adjustedTextMaxSize=this.layer.getLayoutValue("text-size",{zoom:18,zoomHistory:n}),this.adjustedTextSize=this.layer.getLayoutValue("text-size",{zoom:this.zoom+1,zoomHistory:n}),this.adjustedIconMaxSize=this.layer.getLayoutValue("icon-size",{zoom:18,zoomHistory:n}),this.adjustedIconSize=this.layer.getLayoutValue("icon-size",{zoom:this.zoom+1,zoomHistory:n});var i=512*this.overscaling;this.tilePixelRatio=w/i,this.compareText={},this.iconsNeedLinear=!1,this.symbolInstancesStartIndex=this.symbolInstancesArray.length;var a=this.layer.layout,o=this.features,s=this.textFeatures,l=.5,c=.5;switch(a["text-anchor"]){case"right":case"top-right":case"bottom-right":l=1;break;case"left":case"top-left":case"bottom-left":l=0}switch(a["text-anchor"]){case"bottom":case"bottom-right":case"bottom-left":c=1;break;case"top":case"top-right":case"top-left":c=0}for(var h="right"===a["text-justify"]?1:"left"===a["text-justify"]?0:.5,f=24*a["text-line-height"],p="line"!==a["symbol-placement"]?24*a["text-max-width"]:0,v=24*a["text-letter-spacing"],x=[24*a["text-offset"][0],24*a["text-offset"][1]],_=this.fontstack=a["text-font"].join(","),M=[],A=0;Aw||L.y<0||L.y>w);if(!d||C){var D=C||x;this.addSymbolInstance(L,T,e,r,this.layer,D,this.symbolInstancesArray.length,this.collisionBoxArray,n.index,this.sourceLayerIndex,this.index,u,m,y,h,g,b,{zoom:this.zoom},n.properties)}}}}},n.prototype.anchorIsTooClose=function(t,e,r){var n=this.compareText;if(t in n){for(var i=n[t],a=i.length-1;a>=0;a--)if(r.dist(i[a])3*Math.PI/2))){var g=p.tl,v=p.tr,y=p.bl,b=p.br,x=p.tex,_=p.anchorPoint,w=Math.max(h+Math.log(p.minScale)/Math.LN2,f),M=Math.min(h+Math.log(p.maxScale)/Math.LN2,25);if(!(M<=w)){w===f&&(w=0);var A=Math.round(p.glyphAngle/(2*Math.PI)*256),k=i(c,_.x,_.y,g.x,g.y,x.x,x.y,w,M,f,A);i(c,_.x,_.y,v.x,v.y,x.x+x.w,x.y,w,M,f,A),i(c,_.x,_.y,y.x,y.y,x.x,x.y+x.h,w,M,f,A),i(c,_.x,_.y,b.x,b.y,x.x+x.w,x.y+x.h,w,M,f,A),u.emplaceBack(k,k+1,k+2),u.emplaceBack(k+1,k+2,k+3)}}}},n.prototype.updateIcons=function(t){this.recalculateStyleLayers();var e=this.layer.layout["icon-image"];if(e)for(var r=0;rn.MAX_QUADS&&m.warnOnce("Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),k>n.MAX_QUADS&&m.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),this.symbolInstancesArray.emplaceBack(I,P,O,R,A,k,T,S,t.x,t.y,s)},n.prototype.addSymbolQuad=function(t){return this.symbolQuadsArray.emplaceBack(t.anchorPoint.x,t.anchorPoint.y,t.tl.x,t.tl.y,t.tr.x,t.tr.y,t.bl.x,t.bl.y,t.br.x,t.br.y,t.tex.h,t.tex.w,t.tex.x,t.tex.y,t.anchorAngle,t.glyphAngle,t.maxScale,t.minScale)}},{"../../symbol/anchor":370,"../../symbol/clip_line":372,"../../symbol/collision_feature":374,"../../symbol/get_anchors":376,"../../symbol/mergelines":379,"../../symbol/quads":380,"../../symbol/resolve_text":381,"../../symbol/shaping":382,"../../util/token":420,"../../util/util":421,"../bucket":308,"../load_geometry":316,"point-geometry":462}],313:[function(t,e,r){"use strict";function n(t,e,r){this.arrayBuffer=t.arrayBuffer,this.length=t.length,this.attributes=e.members,this.itemSize=e.bytesPerElement,this.type=r,this.arrayType=e}e.exports=n,n.prototype.bind=function(t){var e=t[this.type];this.buffer?t.bindBuffer(e,this.buffer):(this.buffer=t.createBuffer(),t.bindBuffer(e,this.buffer),t.bufferData(e,this.arrayBuffer,t.STATIC_DRAW),this.arrayBuffer=null)};var i={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT"};n.prototype.setVertexAttribPointers=function(t,e){for(var r=0;r0?t["line-gap-width"]+2*t["line-width"]:t["line-width"]}function s(t,e,r,n,i){if(!e[0]&&!e[1])return t;e=u.convert(e),"viewport"===r&&e._rotate(-n);for(var a=[],o=0;or.max||f.yr.max)&&i.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return l}},{"../util/util":421,"./bucket":308,assert:37}],317:[function(t,e,r){"use strict";function n(t,e,r){this.column=t,this.row=e,this.zoom=r}e.exports=n,n.prototype={clone:function(){return new n(this.column,this.row,this.zoom)},zoomTo:function(t){return this.clone()._zoomTo(t)},sub:function(t){return this.clone()._sub(t)},_zoomTo:function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},_sub:function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this}}},{}],318:[function(t,e,r){"use strict";function n(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}e.exports=n;var i=t("../util/util").wrap;n.prototype.wrap=function(){return new n(i(this.lng,-180,180),this.lat)},n.prototype.toArray=function(){return[this.lng,this.lat]},n.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{"../util/util":421}],319:[function(t,e,r){"use strict";function n(t,e){t&&(e?this.extend(t).extend(e):4===t.length?this.extend([t[0],t[1]]).extend([t[2],t[3]]):this.extend(t[0]).extend(t[1]))}e.exports=n;var i=t("./lng_lat");n.prototype={extend:function(t){var e,r,a=this._sw,o=this._ne;if(t instanceof i)e=t,r=t;else{if(!(t instanceof n))return t?this.extend(i.convert(t)||n.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return a||o?(a.lng=Math.min(e.lng,a.lng),a.lat=Math.min(e.lat,a.lat),o.lng=Math.max(r.lng,o.lng),o.lat=Math.max(r.lat,o.lat)):(this._sw=new i(e.lng,e.lat),this._ne=new i(r.lng,r.lat)),this},getCenter:function(){return new i((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},getSouthWest:function(){return this._sw},getNorthEast:function(){return this._ne},getNorthWest:function(){return new i(this.getWest(),this.getNorth())},getSouthEast:function(){return new i(this.getEast(),this.getSouth())},getWest:function(){return this._sw.lng},getSouth:function(){return this._sw.lat},getEast:function(){return this._ne.lng},getNorth:function(){return this._ne.lat},toArray:function(){return[this._sw.toArray(),this._ne.toArray()]},toString:function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"}},n.convert=function(t){return!t||t instanceof n?t:new n(t)}},{"./lng_lat":318}],320:[function(t,e,r){"use strict";function n(t,e){this.tileSize=512,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new i(0,0),this.zoom=0,this.angle=0,this._altitude=1.5,this._pitch=0,this._unmodified=!0}var i=t("./lng_lat"),a=t("point-geometry"),o=t("./coordinate"),s=t("../util/util").wrap,l=t("../util/interpolate"),u=t("../source/tile_coord"),c=t("../data/bucket").EXTENT,h=t("gl-matrix"),f=h.vec4,d=h.mat4,p=h.mat2;e.exports=n,n.prototype={get minZoom(){return this._minZoom},set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},get maxZoom(){return this._maxZoom},set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},get worldSize(){return this.tileSize*this.scale},get centerPoint(){return this.size._div(2)},get size(){return new a(this.width,this.height)},get bearing(){return-this.angle/Math.PI*180},set bearing(t){var e=-s(t,-180,180)*Math.PI/180;this.angle!==e&&(this._unmodified=!1,this.angle=e,this._calcMatrices(),this.rotationMatrix=p.create(),p.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},get pitch(){return this._pitch/Math.PI*180},set pitch(t){var e=Math.min(60,t)/180*Math.PI;this._pitch!==e&&(this._unmodified=!1,this._pitch=e,this._calcMatrices())},get altitude(){return this._altitude},set altitude(t){var e=Math.max(.75,t);this._altitude!==e&&(this._unmodified=!1,this._altitude=e,this._calcMatrices())},get zoom(){return this._zoom},set zoom(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._calcMatrices(),this._constrain())},get center(){return this._center},set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._calcMatrices(),this._constrain())},coveringZoomLevel:function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},coveringTiles:function(t){var e=this.coveringZoomLevel(t),r=e;if(et.maxzoom&&(e=t.maxzoom);var n=this,i=n.locationCoordinate(n.center)._zoomTo(e),o=new a(i.column-.5,i.row-.5);return u.cover(e,[n.pointCoordinate(new a(0,0))._zoomTo(e),n.pointCoordinate(new a(n.width,0))._zoomTo(e),n.pointCoordinate(new a(n.width,n.height))._zoomTo(e),n.pointCoordinate(new a(0,n.height))._zoomTo(e)],t.reparseOverscaled?r:e).sort(function(t,e){return o.dist(t)-o.dist(e)})},resize:function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._calcMatrices(),this._constrain()},get unmodified(){return this._unmodified},zoomScale:function(t){return Math.pow(2,t)},scaleZoom:function(t){return Math.log(t)/Math.LN2},project:function(t,e){return new a(this.lngX(t.lng,e),this.latY(t.lat,e))},unproject:function(t,e){return new i(this.xLng(t.x,e),this.yLat(t.y,e))},get x(){return this.lngX(this.center.lng)},get y(){return this.latY(this.center.lat)},get point(){return new a(this.x,this.y)},lngX:function(t,e){return(180+t)*(e||this.worldSize)/360},latY:function(t,e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*(e||this.worldSize)/360},xLng:function(t,e){return 360*t/(e||this.worldSize)-180},yLat:function(t,e){var r=180-360*t/(e||this.worldSize);return 360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90},panBy:function(t){var e=this.centerPoint._add(t);this.center=this.pointLocation(e)},setLocationAtPoint:function(t,e){var r=this.locationCoordinate(t),n=this.pointCoordinate(e),i=this.pointCoordinate(this.centerPoint),a=n._sub(r);this._unmodified=!1,this.center=this.coordinateLocation(i._sub(a))},locationPoint:function(t){return this.coordinatePoint(this.locationCoordinate(t))},pointLocation:function(t){return this.coordinateLocation(this.pointCoordinate(t))},locationCoordinate:function(t){var e=this.zoomScale(this.tileZoom)/this.worldSize,r=i.convert(t);return new o(this.lngX(r.lng)*e,this.latY(r.lat)*e,this.tileZoom)},coordinateLocation:function(t){var e=this.zoomScale(t.zoom);return new i(this.xLng(t.column,e),this.yLat(t.row,e))},pointCoordinate:function(t){var e=[t.x,t.y,0,1],r=[t.x,t.y,1,1];f.transformMat4(e,e,this.pixelMatrixInverse),f.transformMat4(r,r,this.pixelMatrixInverse);var n=e[3],i=r[3],a=e[0]/n,s=r[0]/i,u=e[1]/n,c=r[1]/i,h=e[2]/n,d=r[2]/i,p=h===d?0:(0-h)/(d-h),m=this.worldSize/this.zoomScale(this.tileZoom);return new o(l(a,s,p)/m,l(u,c,p)/m,this.tileZoom)},coordinatePoint:function(t){var e=this.worldSize/this.zoomScale(t.zoom),r=[t.column*e,t.row*e,0,1];return f.transformMat4(r,r,this.pixelMatrix),new a(r[0]/r[3],r[1]/r[3])},calculatePosMatrix:function(t,e){void 0===e&&(e=1/0),t instanceof u&&(t=t.toCoordinate(e));var r=Math.min(t.zoom,e),n=this.worldSize/Math.pow(2,r),i=new Float64Array(16);return d.identity(i),d.translate(i,i,[t.column*n,t.row*n,0]),d.scale(i,i,[n/c,n/c,1]),d.multiply(i,this.projMatrix,i),new Float32Array(i)},_constrain:function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,e,r,n,i,o,s,l,u=this.size,c=this._unmodified;this.latRange&&(t=this.latY(this.latRange[1]),e=this.latY(this.latRange[0]),i=e-te&&(l=e-d)}if(this.lngRange){var p=this.x,m=u.x/2;p-mn&&(s=n-m)}void 0===s&&void 0===l||(this.center=this.unproject(new a(void 0!==s?s:this.x,void 0!==l?l:this.y))),this._unmodified=c,this._constraining=!1}},_calcMatrices:function(){if(this.height){var t=Math.atan(.5/this.altitude),e=Math.sin(t)*this.altitude/Math.sin(Math.PI/2-this._pitch-t),r=Math.cos(Math.PI/2-this._pitch)*e+this.altitude,n=new Float64Array(16);if(d.perspective(n,2*Math.atan(this.height/2/this.altitude),this.width/this.height,.1,r),d.translate(n,n,[0,0,-this.altitude]),d.scale(n,n,[1,-1,1/this.height]),d.rotateX(n,n,this._pitch),d.rotateZ(n,n,this.angle),d.translate(n,n,[-this.x,-this.y,0]),this.projMatrix=n,n=d.create(),d.scale(n,n,[this.width/2,-this.height/2,1]),d.translate(n,n,[1,-1,0]),this.pixelMatrix=d.multiply(new Float64Array(16),n,this.projMatrix),!(n=d.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=n}}}},{"../data/bucket":308,"../source/tile_coord":348,"../util/interpolate":415,"../util/util":421,"./coordinate":317,"./lng_lat":318,"gl-matrix":174,"point-geometry":462}],321:[function(t,e,r){"use strict";var n={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]};e.exports=function(t,e,r,i){i=i||1;var a,o,s,l,u,c,h,f,d=[];for(a=0,o=t.length;a>16,_>>16),s.uniform2f(n.u_pixel_coord_lower,65535&x,65535&_)}s.uniformMatrix4fv(n.u_matrix,!1,t.transform.calculatePosMatrix(v)),s.drawArrays(s.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}s.stencilMask(0),s.stencilFunc(s.EQUAL,128,128)}var i=t("../source/pixels_to_tile_units"),a=t("./create_uniform_pragmas"),o=512;e.exports=n},{"../source/pixels_to_tile_units":342,"./create_uniform_pragmas":323}],325:[function(t,e,r){"use strict";function n(t,e,r,n){if(!t.isOpaquePass){var a=t.gl;t.setDepthSublayer(0),t.depthMask(!1),a.disable(a.STENCIL_TEST);for(var o=0;o>16,f>>16),o.uniform2f(a.u_pixel_coord_lower,65535&h,65535&f),o.activeTexture(o.TEXTURE0),i.spriteAtlas.bind(o,!0)}}var s=t("../source/pixels_to_tile_units");e.exports=n},{"../source/pixels_to_tile_units":342}],329:[function(t,e,r){"use strict";var n=t("../util/browser"),i=t("gl-matrix").mat2,a=t("../source/pixels_to_tile_units");e.exports=function(t,e,r,o){if(!t.isOpaquePass){t.setDepthSublayer(0),t.depthMask(!1);var s=t.gl;if(s.enable(s.STENCIL_TEST),!(r.paint["line-width"]<=0)){var l=1/n.devicePixelRatio,u=r.paint["line-blur"]+l,c=r.paint["line-color"],h=t.transform,f=i.create();i.scale(f,f,[1,Math.cos(h._pitch)]),i.rotate(f,f,t.transform.angle);var d,p,m,g,v,y=Math.sqrt(h.height*h.height/4*(1+h.altitude*h.altitude)),b=h.height/2*Math.tan(h._pitch),x=(y+b)/y-1,_=r.paint["line-dasharray"],w=r.paint["line-pattern"];if(_)d=t.useProgram("linesdfpattern"),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform4fv(d.u_color,c),s.uniform1f(d.u_opacity,r.paint["line-opacity"]),p=t.lineAtlas.getDash(_.from,"round"===r.layout["line-cap"]),m=t.lineAtlas.getDash(_.to,"round"===r.layout["line-cap"]),s.uniform1i(d.u_image,0),s.activeTexture(s.TEXTURE0),t.lineAtlas.bind(s),s.uniform1f(d.u_tex_y_a,p.y),s.uniform1f(d.u_tex_y_b,m.y),s.uniform1f(d.u_mix,_.t),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f);else if(w){if(g=t.spriteAtlas.getPosition(w.from,!0),v=t.spriteAtlas.getPosition(w.to,!0),!g||!v)return;d=t.useProgram("linepattern"),s.uniform1i(d.u_image,0),s.activeTexture(s.TEXTURE0),t.spriteAtlas.bind(s,!0),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform2fv(d.u_pattern_tl_a,g.tl),s.uniform2fv(d.u_pattern_br_a,g.br),s.uniform2fv(d.u_pattern_tl_b,v.tl),s.uniform2fv(d.u_pattern_br_b,v.br),s.uniform1f(d.u_fade,w.t),s.uniform1f(d.u_opacity,r.paint["line-opacity"]),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f)}else d=t.useProgram("line"),s.uniform1f(d.u_linewidth,r.paint["line-width"]/2),s.uniform1f(d.u_gapwidth,r.paint["line-gap-width"]/2),s.uniform1f(d.u_antialiasing,l/2),s.uniform1f(d.u_blur,u),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint["line-offset"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,f),s.uniform4fv(d.u_color,c),s.uniform1f(d.u_opacity,r.paint["line-opacity"]);for(var M=0;M0?1/(1-t):1+t}function s(t){return t>0?1-1/(1.001-t):-t}function l(t,e,r,n){var i=[1,0],a=r.paint["raster-fade-duration"];if(t.source&&a>0){var o=(new Date).getTime(),s=(o-t.timeAdded)/a,l=e?(o-e.timeAdded)/a:-1,c=n.coveringZoomLevel(t.source),h=!!e&&Math.abs(e.coord.z-c)>Math.abs(t.coord.z-c);!e||h?(i[0]=u.clamp(s,0,1),i[1]=1-i[0]):(i[0]=u.clamp(1-l,0,1),i[1]=1-i[0])}var f=r.paint["raster-opacity"];return i[0]*=f,i[1]*=f,i}var u=t("../util/util"),c=t("../util/struct_array");e.exports=n,n.RasterBoundsArray=new c({members:[{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]})},{"../util/struct_array":419,"../util/util":421}],331:[function(t,e,r){"use strict";function n(t,e,r,n){if(!t.isOpaquePass){var a=!(r.layout["text-allow-overlap"]||r.layout["icon-allow-overlap"]||r.layout["text-ignore-placement"]||r.layout["icon-ignore-placement"]),o=t.gl;a?o.disable(o.STENCIL_TEST):o.enable(o.STENCIL_TEST),t.setDepthSublayer(0),t.depthMask(!1),o.disable(o.DEPTH_TEST),i(t,e,r,n,!1,r.paint["icon-translate"],r.paint["icon-translate-anchor"],r.layout["icon-rotation-alignment"],r.layout["icon-rotation-alignment"],r.layout["icon-size"],r.paint["icon-halo-width"],r.paint["icon-halo-color"],r.paint["icon-halo-blur"],r.paint["icon-opacity"],r.paint["icon-color"]),i(t,e,r,n,!0,r.paint["text-translate"],r.paint["text-translate-anchor"],r.layout["text-rotation-alignment"],r.layout["text-pitch-alignment"],r.layout["text-size"],r.paint["text-halo-width"],r.paint["text-halo-color"],r.paint["text-halo-blur"],r.paint["text-opacity"],r.paint["text-color"]),o.enable(o.DEPTH_TEST),e.map.showCollisionBoxes&&s(t,e,r,n)}}function i(t,e,r,n,i,o,s,l,u,c,h,f,d,p,m){for(var g=0;gthis.previousZoom;r--)this.changeTimes[r]=e,this.changeOpacities[r]=this.opacities[r];for(r=0;r<256;r++){var n=e-this.changeTimes[r],i=n/this.fadeDuration*255;this.opacities[r]=r<=t?this.changeOpacities[r]+i:this.changeOpacities[r]-i}this.changed=!0,this.previousZoom=t},n.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.changed&&(t.texSubImage2D(t.TEXTURE_2D,0,0,0,256,1,t.ALPHA,t.UNSIGNED_BYTE,this.array),this.changed=!1)):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,256,1,0,t.ALPHA,t.UNSIGNED_BYTE,this.array))}},{}],333:[function(t,e,r){"use strict";function n(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}}var i=t("../util/util");e.exports=n,n.prototype.setSprite=function(t){this.sprite=t},n.prototype.getDash=function(t,e){var r=t.join(",")+e;return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},n.prototype.addDash=function(t,e){var r=e?7:0,n=2*r+1;if(this.nextRow+n>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o0?e.pop():null},n.prototype.lineWidth=function(t){this.gl.lineWidth(c.clamp(t,this.lineWidthRange[0],this.lineWidthRange[1]))},n.prototype.showOverdrawInspector=function(t){if(t||this._showOverdrawInspector){this._showOverdrawInspector=t;var e=this.gl;if(t){e.blendFunc(e.CONSTANT_COLOR,e.ONE);e.blendColor(1/8,1/8,1/8,0),e.clearColor(0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)}else e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)}}},{"../data/bucket":308,"../data/buffer":313,"../source/pixels_to_tile_units":342,"../source/source_cache":346,"../util/browser":405,"../util/struct_array":419,"../util/util":421,"./create_uniform_pragmas":323,"./draw_background":324,"./draw_circle":325,"./draw_debug":327,"./draw_fill":328,"./draw_line":329,"./draw_raster":330,"./draw_symbol":331,"./frame_history":332,"./painter/use_program":335,"./vertex_array_object":336,"gl-matrix":174}],335:[function(t,e,r){"use strict";function n(t,e){return t.replace(/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,function(t,r,n,i,a){return e[r][a].replace(/{type}/g,i).replace(/{precision}/g,n)})}var i=t("assert"),a=t("../../util/util"),o=t("mapbox-gl-shaders"),s=o.util;e.exports._createProgram=function(t,e,r,l){for(var u=this.gl,c=u.createProgram(),h=o[t],f="#define MAPBOX_GL_JS;\n",d=0;dthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,n={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,overscaling:r,angle:this.map.transform.angle, +pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send("load tile",n,function(r,n){if(t.unloadVectorData(this.map.painter),!t.aborted)return r?e(r):(t.loadVectorData(n,this.map.style),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(this)),e(null))}.bind(this),this.workerID)},abortTile:function(t){t.aborted=!0},unloadTile:function(t){t.unloadVectorData(this.map.painter),this.dispatcher.send("remove tile",{uid:t.uid,source:this.id},function(){},t.workerID)},serialize:function(){return{type:this.type,data:this._data}}})},{"../data/bucket":308,"../util/evented":413,"../util/util":421,"resolve-url":479}],338:[function(t,e,r){"use strict";function n(t,e,r){r&&(this.loadGeoJSON=r),h.call(this,t,e)}var i=t("../util/util"),a=t("../util/ajax"),o=t("geojson-rewind"),s=t("./geojson_wrapper"),l=t("vt-pbf"),u=t("supercluster"),c=t("geojson-vt"),h=t("./vector_tile_worker_source");e.exports=n,n.prototype=i.inherit(h,{_geoJSONIndexes:{},loadVectorData:function(t,e){var r=t.source,n=t.coord;if(!this._geoJSONIndexes[r])return e(null,null);var i=this._geoJSONIndexes[r].getTile(Math.min(n.z,t.maxZoom),n.x,n.y);if(!i)return e(null,null);var a=new s(i.features);a.name="_geojsonTileLayer";var o=l({layers:{_geojsonTileLayer:a}});0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{tile:a,rawTileData:o.buffer})},loadData:function(t,e){var r=function(r,n){return r?e(r):"object"!=typeof n?e(new Error("Input data is not a valid GeoJSON object.")):(o(n,!0),void this._indexData(n,t,function(r,n){if(r)return e(r);this._geoJSONIndexes[t.source]=n,e(null)}.bind(this)))}.bind(this);this.loadGeoJSON(t,r)},loadGeoJSON:function(t,e){if(t.url)a.getJSON(t.url,e);else{if("string"!=typeof t.data)return e(new Error("Input data is not a valid GeoJSON object."));try{return e(null,JSON.parse(t.data))}catch(t){return e(new Error("Input data is not a valid GeoJSON object."))}}},_indexData:function(t,e,r){try{e.cluster?r(null,u(e.superclusterOptions).load(t.features)):r(null,c(t,e.geojsonVtOptions))}catch(t){return r(t)}}})},{"../util/ajax":404,"../util/util":421,"./geojson_wrapper":339,"./vector_tile_worker_source":350,"geojson-rewind":120,"geojson-vt":124,supercluster:506,"vt-pbf":533}],339:[function(t,e,r){"use strict";function n(t){this.features=t,this.length=t.length,this.extent=s}function i(t){if(this.type=t.type,1===t.type){this.rawGeometry=[];for(var e=0;ee)){var o=Math.pow(2,Math.min(a.coord.z,this.maxzoom)-Math.min(t.z,this.maxzoom));if(Math.floor(a.coord.x/o)===t.x&&Math.floor(a.coord.y/o)===t.y)for(r[i]=!0,n=!0;a&&a.coord.z-1>t.z;){var s=a.coord.parent(this.maxzoom).id;a=this._tiles[s],a&&a.isRenderable()&&(delete r[i],r[s]=!0)}}}return n},findLoadedParent:function(t,e,r){for(var n=t.z-1;n>=e;n--){t=t.parent(this.maxzoom);var i=this._tiles[t.id];if(i&&i.isRenderable())return r[t.id]=!0,i;if(this._cache.has(t.id))return this.addTile(t),r[t.id]=!0,this._tiles[t.id]}},updateCacheSize:function(t){var e=Math.ceil(t.width/t.tileSize)+1,r=Math.ceil(t.height/t.tileSize)+1,n=e*r;this._cache.setMaxSize(Math.floor(5*n))},update:function(t,e){if(this._sourceLoaded){var r,i,a;this.updateCacheSize(t);var o=(this.roundZoom?Math.round:Math.floor)(this.getZoom(t)),s=Math.max(o-n.maxOverzooming,this.minzoom),l=Math.max(o+n.maxUnderzooming,this.minzoom),c={},h=(new Date).getTime();this._coveredTiles={};var d=this.used?t.coveringTiles(this._source):[];for(r=0;rh-(e||0)&&(this.findLoadedChildren(i,l,c)&&(c[v]=!0),this.findLoadedParent(i,s,p))}var y;for(y in p)c[y]||(this._coveredTiles[y]=!0);for(y in p)c[y]=!0;var b=f.keysDifference(this._tiles,c);for(r=0;rthis.maxzoom?Math.pow(2,n-this.maxzoom):1;e=new s(r,this.tileSize*i,this.maxzoom),this.loadTile(e,this._tileLoaded.bind(this,e))}return e.uses++,this._tiles[t.id]=e,this.fire("tile.add",{tile:e}),this._source.fire("tile.add",{tile:e}),e},removeTile:function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this.fire("tile.remove",{tile:e}),this._source.fire("tile.remove",{tile:e}),e.uses>0||(e.isRenderable()?this._cache.add(e.coord.wrapped().id,e):(e.aborted=!0,this.abortTile(e),this.unloadTile(e))))},clearTiles:function(){for(var t in this._tiles)this.removeTile(t);this._cache.reset()},tilesIn:function(t){for(var e={},r=this.getIds(),n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0].zoom,c=0;c=0&&v[1].y>=0){for(var y=[],b=0;b=0&&t%1==0),l(!isNaN(e)&&e>=0&&e%1==0),l(!isNaN(r)&&r>=0&&r%1==0),isNaN(n)&&(n=0),this.z=+t,this.x=+e,this.y=+r,this.w=+n,(n*=2)<0&&(n=n*-1-1);var i=1<0;a--)n=1<e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function o(t,e,r,n,i){var a=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx0,h=e.dx<0,f=a;fc.dy&&(l=u,u=c,c=l),u.dy>h.dy&&(l=u,u=h,h=l),c.dy>h.dy&&(l=c,c=h,h=l),u.dy&&o(h,u,n,i,s),c.dy&&o(h,c,n,i,s)}var l=t("assert"),u=t("whoots-js"),c=t("../geo/coordinate");e.exports=n,n.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y},n.prototype.toCoordinate=function(t){var e=Math.min(this.z,t),r=Math.pow(2,e),n=this.y,i=this.x+r*this.w;return new c(i,n,e)},n.fromID=function(t){var e=t%32,r=1<t?new n(this.z-1,this.x,this.y,this.w):new n(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},n.prototype.wrapped=function(){return new n(this.z,this.x,this.y,0)},n.prototype.children=function(t){if(this.z>=t)return[new n(this.z+1,this.x,this.y,this.w)];var e=this.z+1,r=2*this.x,i=2*this.y;return[new n(e,r,i,this.w),new n(e,r+1,i,this.w),new n(e,r,i+1,this.w),new n(e,r+1,i+1,this.w)]},n.cover=function(t,e,r){function i(t,e,i){var s,l,u;if(i>=0&&i<=a)for(s=t;sthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,i={url:s(t.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),uid:t.uid,coord:t.coord,zoom:t.coord.z,tileSize:this.tileSize*n,source:this.id,overscaling:n,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID?"loading"===t.state?t.reloadCallback=e:(i.rawTileData=t.rawTileData,this.dispatcher.send("reload tile",i,r.bind(this),t.workerID)):t.workerID=this.dispatcher.send("load tile",i,r.bind(this))},abortTile:function(t){this.dispatcher.send("abort tile",{uid:t.uid,source:this.id},null,t.workerID)},unloadTile:function(t){t.unloadVectorData(this.map.painter),this.dispatcher.send("remove tile",{uid:t.uid,source:this.id},null,t.workerID)}})},{"../util/evented":413,"../util/mapbox":418,"../util/util":421,"./load_tilejson":341}],350:[function(t,e,r){"use strict";function n(t,e,r){this.actor=t,this.styleLayers=e,r&&(this.loadVectorData=r),this.loading={},this.loaded={}}var i=t("../util/ajax"),a=t("vector-tile"),o=t("pbf"),s=t("./worker_tile");e.exports=n,n.prototype={loadTile:function(t,e){function r(t,r){return delete this.loading[n][i],t?e(t):r?(a.data=r.tile,a.parse(a.data,this.styleLayers.getLayerFamilies(),this.actor,r.rawTileData,e),this.loaded[n]=this.loaded[n]||{},void(this.loaded[n][i]=a)):e(null,null)}var n=t.source,i=t.uid;this.loading[n]||(this.loading[n]={});var a=this.loading[n][i]=new s(t);a.abort=this.loadVectorData(t,r.bind(this))},reloadTile:function(t,e){var r=this.loaded[t.source],n=t.uid;if(r&&r[n]){var i=r[n];i.parse(i.data,this.styleLayers.getLayerFamilies(),this.actor,t.rawTileData,e)}},abortTile:function(t){var e=this.loading[t.source],r=t.uid;e&&e[r]&&e[r].abort&&(e[r].abort(),delete e[r])},removeTile:function(t){var e=this.loaded[t.source],r=t.uid;e&&e[r]&&delete e[r]},loadVectorData:function(t,e){function r(t,r){if(t)return e(t);var n=new a.VectorTile(new o(new Uint8Array(r)));e(t,{tile:n,rawTileData:r})}var n=i.getArrayBuffer(t.url,r.bind(this));return function(){n.abort()}},redoPlacement:function(t,e){var r=this.loaded[t.source],n=this.loading[t.source],i=t.uid;if(r&&r[i]){var a=r[i],o=a.redoPlacement(t.angle,t.pitch,t.showCollisionBoxes);o.result&&e(null,o.result,o.transferables)}else n&&n[i]&&(n[i].angle=t.angle)}}},{"../util/ajax":404,"./worker_tile":353,pbf:456,"vector-tile":527}],351:[function(t,e,r){"use strict";function n(t,e){this.id=t,this.urls=e.urls,this.coordinates=e.coordinates,u.getVideo(e.urls,function(t,r){if(t)return this.fire("error",{error:t});this.video=r,this.video.loop=!0;var n;this.video.addEventListener("playing",function(){n=this.map.style.animationLoop.set(1/0),this.map._rerender()}.bind(this)),this.video.addEventListener("pause",function(){this.map.style.animationLoop.cancel(n)}.bind(this)),this.map&&(this.video.play(),this.setCoordinates(e.coordinates)),this.fire("load")}.bind(this))}var i=t("../util/util"),a=t("./tile_coord"),o=t("../geo/lng_lat"),s=t("point-geometry"),l=t("../util/evented"),u=t("../util/ajax"),c=t("../data/bucket").EXTENT,h=t("../render/draw_raster").RasterBoundsArray,f=t("../data/buffer"),d=t("../render/vertex_array_object");e.exports=n,n.prototype=i.inherit(l,{minzoom:0,maxzoom:22,tileSize:512,roundZoom:!0,getVideo:function(){return this.video},onAdd:function(t){this.map||(this.map=t,this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},setCoordinates:function(t){this.coordinates=t;var e=this.map,r=t.map(function(t){return e.transform.locationCoordinate(o.convert(t)).zoomTo(0)}),n=this.centerCoord=i.getCoordinatesCenter(r);return n.column=Math.round(n.column),n.row=Math.round(n.row),this.minzoom=this.maxzoom=n.zoom,this._coord=new a(n.zoom,n.column,n.row),this._tileCoords=r.map(function(t){var e=t.zoomTo(n.zoom);return new s(Math.round((e.column-n.column)*c),Math.round((e.row-n.row)*c))}),this.fire("change"),this},_setTile:function(t){this._prepared=!1,this.tile=t;var e=new h;e.emplaceBack(this._tileCoords[0].x,this._tileCoords[0].y,0,0),e.emplaceBack(this._tileCoords[1].x,this._tileCoords[1].y,32767,0),e.emplaceBack(this._tileCoords[3].x,this._tileCoords[3].y,0,32767),e.emplaceBack(this._tileCoords[2].x,this._tileCoords[2].y,32767,32767),this.tile.buckets={},this.tile.boundsBuffer=new f(e.serialize(),h.serialize(),f.BufferType.VERTEX),this.tile.boundsVAO=new d,this.tile.state="loaded"},prepare:function(){if(!(this.video.readyState<2)&&this.tile){var t=this.map.painter.gl;this._prepared?(t.bindTexture(t.TEXTURE_2D,this.tile.texture),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,this.video)):(this._prepared=!0,this.tile.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.tile.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.video)),this._currentTime=this.video.currentTime}},loadTile:function(t,e){this._coord&&this._coord.toString()===t.coord.toString()?(this._setTile(t),e(null)):(t.state="errored",e(null))},serialize:function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}})},{"../data/bucket":308,"../data/buffer":313,"../geo/lng_lat":318,"../render/draw_raster":330,"../render/vertex_array_object":336,"../util/ajax":404,"../util/evented":413,"../util/util":421,"./tile_coord":348,"point-geometry":462}],352:[function(t,e,r){"use strict";function n(t){this.self=t,this.actor=new a(t,this);var e={getLayers:function(){return this.layers}.bind(this),getLayerFamilies:function(){return this.layerFamilies}.bind(this)};this.workerSources={vector:new l(this.actor,e),geojson:new u(this.actor,e)},this.self.registerWorkerSource=function(t,r){if(this.workerSources[t])throw new Error('Worker source with name "'+t+'" already registered.');this.workerSources[t]=new r(this.actor,e)}.bind(this)}function i(t){var e={};for(var r in t){var n=t[r],i=n.ref||n.id,a=t[i];a.layout&&"none"===a.layout.visibility||(e[i]=e[i]||[],r===i?e[i].unshift(n):e[i].push(n))}return e}var a=t("../util/actor"),o=t("../style/style_layer"),s=t("../util/util"),l=t("./vector_tile_worker_source"),u=t("./geojson_worker_source");e.exports=function(t){return new n(t)},s.extend(n.prototype,{"set layers":function(t){function e(t){var e=o.create(t,t.ref&&r.layers[t.ref]);e.updatePaintTransitions({},{transition:!1}),r.layers[e.id]=e}this.layers={};for(var r=this,n=[],a=0;a=0;e--)b(E,P[e]);x()}}function b(t,e){if(e.populateArrays(k,F,j),"symbol"!==e.type)for(var r=0;r=w.maxzoom||w.layout&&"none"===w.layout.visibility||t.layers&&!t.layers[w.sourceLayer]||(A=c.create({layer:w,index:D++,childLayers:e[z],zoom:this.zoom,overscaling:this.overscaling,showCollisionBoxes:this.showCollisionBoxes,collisionBoxArray:this.collisionBoxArray,symbolQuadsArray:this.symbolQuadsArray,symbolInstancesArray:this.symbolInstancesArray,sourceLayerIndex:S.encode(w.sourceLayer||"_geojsonTileLayer")}),A.createFilter(),L[w.id]=A,t.layers&&(M=w.sourceLayer,C[M]=C[M]||{},C[M][w.id]=A)));if(t.layers)for(M in C)1===w.version&&d.warnOnce('Vector tile source "'+this.source+'" layer "'+M+'" does not use vector tile spec v2 and therefore may have some rendering errors.'),(w=t.layers[M])&&v(w,C[M]);else v(t,L);var I=[],P=this.symbolBuckets=[],O=[];T.bucketLayerIDs={};for(var R in L)A=L[R],0!==A.features.length&&(T.bucketLayerIDs[A.index]=A.childLayers.map(s),I.push(A),"symbol"===A.type?P.push(A):O.push(A));var j={},F={},N=0;if(P.length>0){for(_=P.length-1;_>=0;_--)P[_].updateIcons(j),P[_].updateFont(F);for(var B in F)F[B]=Object.keys(F[B]).map(Number);j=Object.keys(j),r.send("get glyphs",{uid:this.uid,stacks:F},function(t,e){F=e,y(t)}),j.length?r.send("get icons",{icons:j},function(t,e){j=e,y(t)}):y()}for(_=O.length-1;_>=0;_--)b(this,O[_]);if(0===P.length)return x()},n.prototype.redoPlacement=function(t,e,r){if("done"!==this.status)return this.redoPlacementAfterDone=!0,this.angle=t,{};for(var n=new u(t,e,this.collisionBoxArray),s=this.symbolBuckets,l=s.length-1;l>=0;l--)s[l].placeFeatures(n,r);var c=n.serialize(),h=s.filter(i);return{result:{buckets:h.map(a),collisionTile:c.data},transferables:o(h).concat(c.transferables)}}},{"../data/bucket":308,"../data/feature_index":315,"../symbol/collision_box":373,"../symbol/collision_tile":375,"../symbol/symbol_instances":384,"../symbol/symbol_quads":385,"../util/dictionary_coder":411,"../util/util":421}],354:[function(t,e,r){"use strict";function n(){this.n=0,this.times=[]}e.exports=n,n.prototype.stopped=function(){return this.times=this.times.filter(function(t){return t.time>=(new Date).getTime()}),!this.times.length},n.prototype.set=function(t){return this.times.push({id:this.n,time:t+(new Date).getTime()}),this.n++},n.prototype.cancel=function(t){this.times=this.times.filter(function(e){return e.id!==t})}},{}],355:[function(t,e,r){"use strict";function n(t){this.base=t,this.retina=s.devicePixelRatio>1;var e=this.retina?"@2x":"";o.getJSON(l(t,e,".json"),function(t,e){if(t)return void this.fire("error",{error:t});this.data=e,this.img&&this.fire("load")}.bind(this)),o.getImage(l(t,e,".png"),function(t,e){if(t)return void this.fire("error",{error:t});for(var r=e.getData(),n=e.data=new Uint8Array(r.length),i=0;i1!==this.retina){var t=new n(this.base);t.on("load",function(){this.img=t.img,this.data=t.data,this.retina=t.retina}.bind(this))}},i.prototype={x:0,y:0,width:0,height:0,pixelRatio:1,sdf:!1},n.prototype.getSpritePosition=function(t){if(!this.loaded())return new i;var e=this.data&&this.data[t];return e&&this.img?e:new i}},{"../util/ajax":404,"../util/browser":405,"../util/evented":413,"../util/mapbox":418}],356:[function(t,e,r){"use strict";var n=t("csscolorparser").parseCSSColor,i=t("../util/util"),a=t("./style_function"),o={};e.exports=function t(e){if(a.isFunctionDefinition(e))return i.extend({},e,{stops:e.stops.map(function(e){return[e[0],t(e[1])]})});if("string"==typeof e){if(!o[e]){var r=n(e);if(!r)throw new Error("Invalid color "+e);o[e]=[r[0]/255*r[3],r[1]/255*r[3],r[2]/255*r[3],r[3]]}return o[e]}throw new Error("Invalid color "+e)}},{"../util/util":421,"./style_function":359,csscolorparser:98}],357:[function(t,e,r){"use strict";function n(t,e,r){this.animationLoop=e||new m,this.dispatcher=new p(r||1,this),this.spriteAtlas=new l(1024,1024),this.lineAtlas=new u(256,512),this._layers={},this._order=[],this._groups=[],this.sources={},this.zoomHistory={},c.bindAll(["_forwardSourceEvent","_forwardTileEvent","_forwardLayerEvent","_redoPlacement"],this),this._resetUpdates();var n=function(t,e){if(t)return void this.fire("error",{error:t});if(!g.emitErrors(this,g(e))){this._loaded=!0,this.stylesheet=e,this.updateClasses();var r=e.sources;for(var n in r)this.addSource(n,r[n]);e.sprite&&(this.sprite=new o(e.sprite),this.sprite.on("load",this.fire.bind(this,"change"))),this.glyphSource=new s(e.glyphs),this._resolve(),this.fire("load")}}.bind(this);"string"==typeof t?h.getJSON(f(t),n):d.frame(n.bind(this,null,t)),this.on("source.load",function(t){var e=t.source;if(e&&e.vectorLayerIds)for(var r in this._layers){var n=this._layers[r];n.source===e.id&&this._validateLayer(n)}})}var i=t("../util/evented"),a=t("./style_layer"),o=t("./image_sprite"),s=t("../symbol/glyph_source"),l=t("../symbol/sprite_atlas"),u=t("../render/line_atlas"),c=t("../util/util"),h=t("../util/ajax"),f=t("../util/mapbox").normalizeStyleURL,d=t("../util/browser"),p=t("../util/dispatcher"),m=t("./animation_loop"),g=t("./validate_style"),v=t("../source/source"),y=t("../source/query_features"),b=t("../source/source_cache"),x=t("./style_spec"),_=t("./style_function");e.exports=n,n.prototype=c.inherit(i,{_loaded:!1,_validateLayer:function(t){var e=this.sources[t.source];t.sourceLayer&&e&&e.vectorLayerIds&&e.vectorLayerIds.indexOf(t.sourceLayer)===-1&&this.fire("error",{error:new Error('Source layer "'+t.sourceLayer+'" does not exist on source "'+e.id+'" as specified by style layer "'+t.id+'"')})},loaded:function(){if(!this._loaded)return!1;if(Object.keys(this._updates.sources).length)return!1;for(var t in this.sources)if(!this.sources[t].loaded())return!1;return!(this.sprite&&!this.sprite.loaded())},_resolve:function(){var t,e;this._layers={},this._order=this.stylesheet.layers.map(function(t){return t.id});for(var r=0;rMath.floor(t)&&(e.lastIntegerZoom=Math.floor(t+1),e.lastIntegerZoomTime=Date.now()),e.lastZoom=t},_checkLoaded:function(){if(!this._loaded)throw new Error("Style is not done loading")},update:function(t,e){if(!this._updates.changed)return this;if(this._updates.allLayers)this._groupLayers(),this._updateWorkerLayers();else{var r=Object.keys(this._updates.layers);r.length&&this._updateWorkerLayers(r)}var n,i=Object.keys(this._updates.sources);for(n=0;n=0&&this._handleErrors(g.source,"sources."+t,e)?this:(e=new b(t,e,this.dispatcher),this.sources[t]=e,e.style=this,e.on("load",this._forwardSourceEvent).on("error",this._forwardSourceEvent).on("change",this._forwardSourceEvent).on("tile.add",this._forwardTileEvent).on("tile.load",this._forwardTileEvent).on("tile.error",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this._updates.events.push(["source.add",{source:e}]),this._updates.changed=!0,this)},removeSource:function(t){if(this._checkLoaded(),void 0===this.sources[t])throw new Error("There is no source with this ID");var e=this.sources[t];return delete this.sources[t],delete this._updates.sources[t],e.off("load",this._forwardSourceEvent).off("error",this._forwardSourceEvent).off("change",this._forwardSourceEvent).off("tile.add",this._forwardTileEvent).off("tile.load",this._forwardTileEvent).off("tile.error",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent),this._updates.events.push(["source.remove",{source:e}]),this._updates.changed=!0,this},getSource:function(t){return this.sources[t]&&this.sources[t].getSource()},addLayer:function(t,e){if(this._checkLoaded(),!(t instanceof a)){if(this._handleErrors(g.layer,"layers."+t.id,t,!1,{arrayIndex:-1}))return this;var r=t.ref&&this.getLayer(t.ref);t=a.create(t,r)}return this._validateLayer(t),t.on("error",this._forwardLayerEvent),this._layers[t.id]=t,this._order.splice(e?this._order.indexOf(e):1/0,0,t.id),this._updates.allLayers=!0,t.source&&(this._updates.sources[t.source]=!0),this._updates.events.push(["layer.add",{layer:t}]),this.updateClasses(t.id)},removeLayer:function(t){this._checkLoaded();var e=this._layers[t];if(void 0===e)throw new Error("There is no layer with this ID");for(var r in this._layers)this._layers[r].ref===t&&this.removeLayer(r);return e.off("error",this._forwardLayerEvent),delete this._layers[t],delete this._updates.layers[t],delete this._updates.paintProps[t],this._order.splice(this._order.indexOf(t),1),this._updates.allLayers=!0,this._updates.events.push(["layer.remove",{layer:e}]),this._updates.changed=!0,this},getLayer:function(t){return this._layers[t]},getReferentLayer:function(t){var e=this.getLayer(t);return e.ref&&(e=this.getLayer(e.ref)),e},setLayerZoomRange:function(t,e,r){this._checkLoaded();var n=this.getReferentLayer(t);return n.minzoom===e&&n.maxzoom===r?this:(null!=e&&(n.minzoom=e),null!=r&&(n.maxzoom=r),this._updateLayer(n))},setFilter:function(t,e){this._checkLoaded();var r=this.getReferentLayer(t);return null!==e&&this._handleErrors(g.filter,"layers."+r.id+".filter",e)?this:c.deepEqual(r.filter,e)?this:(r.filter=c.clone(e),this._updateLayer(r))},getFilter:function(t){return this.getReferentLayer(t).filter},setLayoutProperty:function(t,e,r){this._checkLoaded();var n=this.getReferentLayer(t);return c.deepEqual(n.getLayoutProperty(e),r)?this:(n.setLayoutProperty(e,r),this._updateLayer(n))},getLayoutProperty:function(t,e){return this.getReferentLayer(t).getLayoutProperty(e)},setPaintProperty:function(t,e,r,n){this._checkLoaded();var i=this.getLayer(t);if(c.deepEqual(i.getPaintProperty(e,n),r))return this;var a=i.isPaintValueFeatureConstant(e);return i.setPaintProperty(e,r,n),!(r&&_.isFunctionDefinition(r)&&"$zoom"!==r.property&&void 0!==r.property)&&a||(this._updates.layers[t]=!0,i.source&&(this._updates.sources[i.source]=!0)),this.updateClasses(t,e)},getPaintProperty:function(t,e,r){return this.getLayer(t).getPaintProperty(e,r)},updateClasses:function(t,e){if(this._updates.changed=!0,t){var r=this._updates.paintProps;r[t]||(r[t]={}),r[t][e||"all"]=!0}else this._updates.allPaintProps=!0;return this},serialize:function(){return c.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:c.mapObject(this.sources,function(t){return t.serialize()}),layers:this._order.map(function(t){return this._layers[t].serialize()},this)},function(t){return void 0!==t})},_updateLayer:function(t){return this._updates.layers[t.id]=!0,t.source&&(this._updates.sources[t.source]=!0),this._updates.changed=!0,this},_flattenRenderedFeatures:function(t){for(var e=[],r=this._order.length-1;r>=0;r--)for(var n=this._order[r],i=0;is.lastIntegerZoom?(n=u+(1-u)*c,h*=2,i=t({zoom:o-1},r),a=t({zoom:o},r)):(n=1-(1-c)*u,a=t({zoom:o},r),i=t({zoom:o+1},r),h/=2),void 0===i||void 0===a?void 0:{from:i,fromScale:h,to:a,toScale:1,t:n}}}var a=t("./style_function"),o=t("./parse_color"),s=t("../util/util");e.exports=n},{"../util/util":421,"./parse_color":356,"./style_function":359}],359:[function(t,e,r){"use strict";var n=t("mapbox-gl-function");r.interpolated=function(t){var e=n.interpolated(t),r=function(t,r){return e(t&&t.zoom,r||{})};return r.isFeatureConstant=e.isFeatureConstant,r.isZoomConstant=e.isZoomConstant,r},r["piecewise-constant"]=function(t){var e=n["piecewise-constant"](t),r=function(t,r){return e(t&&t.zoom,r||{})};return r.isFeatureConstant=e.isFeatureConstant,r.isZoomConstant=e.isZoomConstant,r},r.isFunctionDefinition=n.isFunctionDefinition},{"mapbox-gl-function":281}],360:[function(t,e,r){"use strict";function n(t,e){this.set(t,e)}function i(t){return t.value}var a=t("../util/util"),o=t("./style_transition"),s=t("./style_declaration"),l=t("./style_spec"),u=t("./validate_style"),c=t("./parse_color"),h=t("../util/evented");e.exports=n;n.create=function(e,r){return new({background:t("./style_layer/background_style_layer"),circle:t("./style_layer/circle_style_layer"),fill:t("./style_layer/fill_style_layer"),line:t("./style_layer/line_style_layer"),raster:t("./style_layer/raster_style_layer"),symbol:t("./style_layer/symbol_style_layer")}[(r||e).type])(e,r)},n.prototype=a.inherit(h,{set:function(t,e){this.id=t.id,this.ref=t.ref,this.metadata=t.metadata,this.type=(e||t).type,this.source=(e||t).source,this.sourceLayer=(e||t)["source-layer"],this.minzoom=(e||t).minzoom,this.maxzoom=(e||t).maxzoom,this.filter=(e||t).filter,this.paint={},this.layout={},this._paintSpecifications=l["paint_"+this.type],this._layoutSpecifications=l["layout_"+this.type],this._paintTransitions={},this._paintTransitionOptions={},this._paintDeclarations={},this._layoutDeclarations={},this._layoutFunctions={};var r,n;for(var i in t){var a=i.match(/^paint(?:\.(.*))?$/);if(a){var o=a[1]||"";for(r in t[i])this.setPaintProperty(r,t[i][r],o)}}if(this.ref)this._layoutDeclarations=e._layoutDeclarations;else for(n in t.layout)this.setLayoutProperty(n,t.layout[n]);for(r in this._paintSpecifications)this.paint[r]=this.getPaintValue(r);for(n in this._layoutSpecifications)this._updateLayoutValue(n)},setLayoutProperty:function(t,e){if(null==e)delete this._layoutDeclarations[t];else{var r="layers."+this.id+".layout."+t;if(this._handleErrors(u.layoutProperty,r,t,e))return;this._layoutDeclarations[t]=new s(this._layoutSpecifications[t],e)}this._updateLayoutValue(t)},getLayoutProperty:function(t){return this._layoutDeclarations[t]&&this._layoutDeclarations[t].value},getLayoutValue:function(t,e,r){var n=this._layoutSpecifications[t],i=this._layoutDeclarations[t];return i?i.calculate(e,r):n.default},setPaintProperty:function(t,e,r){var n="layers."+this.id+(r?'["paint.'+r+'"].':".paint.")+t;if(a.endsWith(t,"-transition"))if(this._paintTransitionOptions[r||""]||(this._paintTransitionOptions[r||""]={}),null===e||void 0===e)delete this._paintTransitionOptions[r||""][t];else{if(this._handleErrors(u.paintProperty,n,t,e))return;this._paintTransitionOptions[r||""][t]=e}else if(this._paintDeclarations[r||""]||(this._paintDeclarations[r||""]={}),null===e||void 0===e)delete this._paintDeclarations[r||""][t];else{if(this._handleErrors(u.paintProperty,n,t,e))return;this._paintDeclarations[r||""][t]=new s(this._paintSpecifications[t],e)}},getPaintProperty:function(t,e){return e=e||"",a.endsWith(t,"-transition")?this._paintTransitionOptions[e]&&this._paintTransitionOptions[e][t]:this._paintDeclarations[e]&&this._paintDeclarations[e][t]&&this._paintDeclarations[e][t].value},getPaintValue:function(t,e,r){var n=this._paintSpecifications[t],i=this._paintTransitions[t];return i?i.calculate(e,r):"color"===n.type&&n.default?c(n.default):n.default},getPaintValueStopZoomLevels:function(t){var e=this._paintTransitions[t];return e?e.declaration.stopZoomLevels:[]},getPaintInterpolationT:function(t,e){return this._paintTransitions[t].declaration.calculateInterpolationT({zoom:e})},isPaintValueFeatureConstant:function(t){var e=this._paintTransitions[t];return!e||e.declaration.isFeatureConstant},isLayoutValueFeatureConstant:function(t){var e=this._layoutDeclarations[t];return!e||e.isFeatureConstant},isPaintValueZoomConstant:function(t){var e=this._paintTransitions[t];return!e||e.declaration.isZoomConstant},isHidden:function(t){return!!(this.minzoom&&t=this.maxzoom)||("none"===this.layout.visibility||0===this.paint[this.type+"-opacity"]))},updatePaintTransitions:function(t,e,r,n){for(var i=a.extend({},this._paintDeclarations[""]),o=0;o-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],u=0;sn;)u-=l.shift().angleDelta;if(u>i)return!1;o++,s+=h.dist(f)}return!0}e.exports=n},{}],372:[function(t,e,r){"use strict";function n(t,e,r,n,a){for(var o=[],s=0;s=n&&f.x>=n||(h.x>=n?h=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round():f.x>=n&&(f=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round()),h.y>=a&&f.y>=a||(h.y>=a?h=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round():f.y>=a&&(f=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round()),l&&h.equals(l[l.length-1])||(l=[h],o.push(l)),l.push(f)))))}return o}var i=t("point-geometry");e.exports=n},{"point-geometry":462}],373:[function(t,e,r){ +"use strict";var n=t("../util/struct_array"),i=t("../util/util"),a=t("point-geometry"),o=e.exports=new n({members:[{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Float32",name:"maxScale"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"bbox0"},{type:"Int16",name:"bbox1"},{type:"Int16",name:"bbox2"},{type:"Int16",name:"bbox3"},{type:"Float32",name:"placementScale"}]});i.extendAll(o.prototype.StructType.prototype,{get anchorPoint(){return new a(this.anchorPointX,this.anchorPointY)}})},{"../util/struct_array":419,"../util/util":421,"point-geometry":462}],374:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l,u,c){var h=o.top*s-l,f=o.bottom*s+l,d=o.left*s-l,p=o.right*s+l;if(this.boxStartIndex=t.length,u){var m=f-h,g=p-d;if(m>0)if(m=Math.max(10*s,m),c){var v=e[r.segment+1].sub(e[r.segment])._unit()._mult(g),y=[r.sub(v),r.add(v)];this._addLineCollisionBoxes(t,y,r,0,g,m,n,i,a)}else this._addLineCollisionBoxes(t,e,r,r.segment,g,m,n,i,a)}else t.emplaceBack(r.x,r.y,d,h,p,f,1/0,n,i,a,0,0,0,0,0);this.boxEndIndex=t.length}e.exports=n,n.prototype._addLineCollisionBoxes=function(t,e,r,n,i,a,o,s,l){var u=a/2,c=Math.floor(i/u),h=-a/2,f=this.boxes,d=r,p=n+1,m=h;do{if(--p<0)return f;m-=e[p].dist(d),d=e[p]}while(m>-i/2);for(var g=e[p].dist(e[p+1]),v=0;v=e.length)return f;g=e[p].dist(e[p+1])}var b=y-m,x=e[p],_=e[p+1],w=_.sub(x)._unit()._mult(b)._add(x)._round(),M=Math.max(Math.abs(y-h)-u/2,0),A=i/2/M;t.emplaceBack(w.x,w.y,-a/2,-a/2,a/2,a/2,A,o,s,l,0,0,0,0,0)}return f}},{}],375:[function(t,e,r){"use strict";function n(t,e,r){if("object"==typeof t){var n=t;r=e,t=n.angle,e=n.pitch,this.grid=new o(n.grid),this.ignoredGrid=new o(n.ignoredGrid)}else this.grid=new o(a,12,6),this.ignoredGrid=new o(a,12,0);this.angle=t,this.pitch=e;var i=Math.sin(t),s=Math.cos(t);if(this.rotationMatrix=[s,-i,i,s],this.reverseRotationMatrix=[s,i,-i,s],this.yStretch=1/Math.cos(e/180*Math.PI),this.yStretch=Math.pow(this.yStretch,1.3),this.collisionBoxArray=r,0===r.length){r.emplaceBack();r.emplaceBack(0,0,0,-32767,0,32767,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(a,0,0,-32767,0,32767,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(0,0,-32767,0,32767,0,32767,0,0,0,0,0,0,0,0,0),r.emplaceBack(0,a,-32767,0,32767,0,32767,0,0,0,0,0,0,0,0,0)}this.tempCollisionBox=r.get(0),this.edges=[r.get(1),r.get(2),r.get(3),r.get(4)]}var i=t("point-geometry"),a=t("../data/bucket").EXTENT,o=t("grid-index");e.exports=n,n.prototype.serialize=function(){var t={angle:this.angle,pitch:this.pitch,grid:this.grid.toArrayBuffer(),ignoredGrid:this.ignoredGrid.toArrayBuffer()};return{data:t,transferables:[t.grid,t.ignoredGrid]}},n.prototype.minScale=.25,n.prototype.maxScale=2,n.prototype.placeCollisionFeature=function(t,e,r){for(var n=this.collisionBoxArray,a=this.minScale,o=this.rotationMatrix,s=this.yStretch,l=t.boxStartIndex;l=this.maxScale)return a}if(r){var _;if(this.angle){var w=this.reverseRotationMatrix,M=new i(u.x1,u.y1).matMult(w),A=new i(u.x2,u.y1).matMult(w),k=new i(u.x1,u.y2).matMult(w),T=new i(u.x2,u.y2).matMult(w);_=this.tempCollisionBox,_.anchorPointX=u.anchorPoint.x,_.anchorPointY=u.anchorPoint.y,_.x1=Math.min(M.x,A.x,k.x,T.x),_.y1=Math.min(M.y,A.x,k.x,T.x),_.x2=Math.max(M.x,A.x,k.x,T.x),_.y2=Math.max(M.y,A.x,k.x,T.x),_.maxScale=u.maxScale}else _=u;for(var S=0;S=this.maxScale)return a}}}return a},n.prototype.queryRenderedSymbols=function(t,e,r,n,a){var o={},s=[],l=this.collisionBoxArray,u=this.rotationMatrix,c=new i(t,e)._matMult(u),h=this.tempCollisionBox;h.anchorX=c.x,h.anchorY=c.y,h.x1=0,h.y1=0,h.x2=r-t,h.y2=n-e,h.maxScale=a,a=h.maxScale;for(var f=[c.x+h.x1/a,c.y+h.y1/a*this.yStretch,c.x+h.x2/a,c.y+h.y2/a*this.yStretch],d=this.grid.query(f[0],f[1],f[2],f[3]),p=this.ignoredGrid.query(f[0],f[1],f[2],f[3]),m=0;m=a&&(o[y][b]=!0,s.push(d[g]))}}return s},n.prototype.getPlacementScale=function(t,e,r,n,i){var a=e.x-n.x,o=e.y-n.y,s=(i.x1-r.x2)/a,l=(i.x2-r.x1)/a,u=(i.y1-r.y2)*this.yStretch/o,c=(i.y2-r.y1)*this.yStretch/o;(isNaN(s)||isNaN(l))&&(s=l=1),(isNaN(u)||isNaN(c))&&(u=c=1);var h=Math.min(Math.max(s,l),Math.max(u,c)),f=i.maxScale,d=r.maxScale;return h>f&&(h=f),h>d&&(h=d),h>t&&h>=i.placementScale&&(t=h),t},n.prototype.insertCollisionFeature=function(t,e,r){for(var n=r?this.ignoredGrid:this.grid,i=this.collisionBoxArray,a=t.boxStartIndex;a=0&&k=0&&T=0&&v+d<=p){var S=new o(k,T,M,b)._round();n&&!s(t,S,u,n,l)||y.push(S)}}g+=w}return h||y.length||c||(y=i(t,g/2,r,n,l,u,c,!0,f)),y}var a=t("../util/interpolate"),o=t("../symbol/anchor"),s=t("./check_max_angle");e.exports=n},{"../symbol/anchor":370,"../util/interpolate":415,"./check_max_angle":371}],377:[function(t,e,r){"use strict";function n(){this.width=o,this.height=o,this.bin=new i(this.width,this.height),this.index={},this.ids={},this.data=new Uint8Array(this.width*this.height)}var i=t("shelf-pack"),a=t("../util/util"),o=128;e.exports=n,n.prototype.getGlyphs=function(){var t,e,r,n={};for(var i in this.ids)t=i.split("#"),e=t[0],r=t[1],n[e]||(n[e]=[]),n[e].push(r);return n},n.prototype.getRects=function(){var t,e,r,n={};for(var i in this.ids)t=i.split("#"),e=t[0],r=t[1],n[e]||(n[e]={}),n[e][r]=this.index[i];return n},n.prototype.addGlyph=function(t,e,r,n){if(!r)return null;var i=e+"#"+r.id;if(this.index[i])return this.ids[i].indexOf(t)<0&&this.ids[i].push(t),this.index[i];if(!r.bitmap)return null;var o=r.width+2*n,s=r.height+2*n,l=o+2,u=s+2;l+=4-l%4,u+=4-u%4;var c=this.bin.packOne(l,u);if(c||(this.resize(),c=this.bin.packOne(l,u)),!c)return a.warnOnce("glyph bitmap overflow"),null;this.index[i]=c,this.ids[i]=[t];for(var h=this.data,f=r.bitmap,d=0;d=2048||e>=2048)){this.texture&&(this.gl&&this.gl.deleteTexture(this.texture),this.texture=null),this.width*=4,this.height*=4,this.bin.resize(this.width,this.height);for(var r=new ArrayBuffer(this.width*this.height),n=0;n65535)return r("glyphs > 65535 not supported");void 0===this.loading[t]&&(this.loading[t]={});var n=this.loading[t];if(n[e])n[e].push(r);else{n[e]=[r];var i=256*e+"-"+(256*e+255),o=a(t,i,this.url);s(o,function(t,r){for(var i=!t&&new l(new c(new Uint8Array(r))),a=0;an&&null!==c){var x=v[c+1].x;g=Math.max(x,g);for(var _=c+1;_<=y;_++)v[_].y+=r,v[_].x-=x;if(o){var w=c;h[v[c].codePoint]&&w--,s(v,e,p,w,o)}p=c+1,c=null,d+=x,m++}f[b.codePoint]&&(c=y)}var M=v[v.length-1],A=M.x+e[M.codePoint].advance;g=Math.max(g,A);var k=(m+1)*r;s(v,e,p,v.length-1,o),l(v,o,i,a,g,r,m,u),t.top+=-a*k,t.bottom=t.top+k,t.left+=-i*g,t.right=t.left+g}function s(t,e,r,n,i){for(var a=e[t[n].codePoint].advance,o=(t[n].x+a)*i,s=r;s<=n;s++)t[s].x-=o}function l(t,e,r,n,i,a,o,s){for(var l=(e-r)*i+s[0],u=(-n*(o+1)+.5)*a+s[1],c=0;c1?2:1,this.canvas&&(this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio)),this.sprite=t},n.prototype.addIcons=function(t,e){for(var r=0;r1||(w?(clearTimeout(w),w=null,v("dblclick",e)):w=setTimeout(d,300))}function c(t){y("touchmove",t)}function h(t){y("touchend",t)}function f(t){y("touchcancel",t)}function d(){w=null}function p(t){n.mousePos(b,t).equals(_)&&v("click",t)}function m(t){v("dblclick",t),t.preventDefault()}function g(t){x=t,t.preventDefault()}function v(e,r){var i=n.mousePos(b,r);return t.fire(e,{lngLat:t.unproject(i),point:i,originalEvent:r})}function y(e,r){var a=n.touchPos(b,r),o=a.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new i(0,0));return t.fire(e,{lngLat:t.unproject(o),point:o,lngLats:a.map(function(e){return t.unproject(e)},this),points:a,originalEvent:r})}var b=t.getCanvasContainer(),x=null,_=null,w=null;for(var M in a)t[M]=new a[M](t,e),e.interactive&&e[M]&&t[M].enable();b.addEventListener("mouseout",r,!1),b.addEventListener("mousedown",o,!1),b.addEventListener("mouseup",s,!1),b.addEventListener("mousemove",l,!1),b.addEventListener("touchstart",u,!1),b.addEventListener("touchend",h,!1),b.addEventListener("touchmove",c,!1),b.addEventListener("touchcancel",f,!1),b.addEventListener("click",p,!1),b.addEventListener("dblclick",m,!1),b.addEventListener("contextmenu",g,!1)}},{"../util/dom":407,"./handler/box_zoom":392,"./handler/dblclick_zoom":393,"./handler/drag_pan":394,"./handler/drag_rotate":395,"./handler/keyboard":396,"./handler/scroll_zoom":397,"./handler/touch_zoom_rotate":398,"point-geometry":462}],387:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("../util/interpolate"),a=t("../util/browser"),o=t("../geo/lng_lat"),s=t("../geo/lng_lat_bounds"),l=t("point-geometry"),u=e.exports=function(){};n.extend(u.prototype,{getCenter:function(){return this.transform.center},setCenter:function(t,e){return this.jumpTo({center:t},e),this},panBy:function(t,e,r){return this.panTo(this.transform.center,n.extend({offset:l.convert(t).mult(-1)},e),r),this},panTo:function(t,e,r){return this.easeTo(n.extend({center:t},e),r)},getZoom:function(){return this.transform.zoom},setZoom:function(t,e){return this.jumpTo({zoom:t},e),this},zoomTo:function(t,e,r){return this.easeTo(n.extend({zoom:t},e),r)},zoomIn:function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},zoomOut:function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},getBearing:function(){return this.transform.bearing},setBearing:function(t,e){return this.jumpTo({bearing:t},e),this},rotateTo:function(t,e,r){return this.easeTo(n.extend({bearing:t},e),r)},resetNorth:function(t,e){return this.rotateTo(0,n.extend({duration:1e3},t),e),this},snapToNorth:function(t,e){return Math.abs(this.getBearing())180&&(c.center.lng>0&&m.lng<0?m.lng+=360:c.center.lng<0&&m.lng>0&&(m.lng-=360));var b=c.zoomScale(g-f),x=c.point,_="center"in t?c.project(m).sub(h.div(b)):x,w=c.worldSize,M=t.curve,A=Math.max(c.width,c.height),k=A/b,T=_.sub(x).mag();if("minZoom"in t){var S=n.clamp(Math.min(t.minZoom,f,g),c.minZoom,c.maxZoom),E=A/c.zoomScale(S-f);M=Math.sqrt(E/T*2)}var L=M*M,C=r(0),D=function(t){return s(C)/s(C+M*t)},z=function(t){return A*((s(C)*u(C+M*t)-a(C))/L)/T},I=(r(1)-C)/M;if(Math.abs(T)<1e-6){if(Math.abs(A-k)<1e-6)return this.easeTo(t);var P=k=0)return!1;return!0}),e.join(" | ")},n.prototype=o.inherit(i,{options:{position:"bottom-right"},onAdd:function(t){var e=this._container=a.create("div","mapboxgl-ctrl-attrib",t.getContainer());return this._update(),t.on("source.load",this._update.bind(this)),t.on("source.change",this._update.bind(this)),t.on("source.remove",this._update.bind(this)),t.on("moveend",this._updateEditLink.bind(this)),e},_update:function(){this._map.style&&(this._container.innerHTML=n.createAttributionString(this._map.style.sources)),this._editLink=this._container.getElementsByClassName("mapbox-improve-map")[0],this._updateEditLink()},_updateEditLink:function(){if(this._editLink){var t=this._map.getCenter();this._editLink.href="https://www.mapbox.com/map-feedback/#/"+t.lng+"/"+t.lat+"/"+Math.round(this._map.getZoom()+1)}}})},{"../../util/dom":407,"../../util/util":421,"./control":389}],389:[function(t,e,r){"use strict";function n(){}var i=t("../../util/util"),a=t("../../util/evented");e.exports=n,n.prototype={addTo:function(t){this._map=t;var e=this._container=this.onAdd(t);if(this.options&&this.options.position){var r=this.options.position,n=t._controlCorners[r];e.className+=" mapboxgl-ctrl",r.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e)}return this},remove:function(){return this._container.parentNode.removeChild(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this}},i.extend(n.prototype,a)},{"../../util/evented":413,"../../util/util":421}],390:[function(t,e,r){"use strict";function n(t){s.setOptions(this,t)}var i=t("./control"),a=t("../../util/browser"),o=t("../../util/dom"),s=t("../../util/util");e.exports=n;var l={enableHighAccuracy:!1,timeout:6e3};n.prototype=s.inherit(i,{options:{position:"top-right"},onAdd:function(t){var e=this._container=o.create("div","mapboxgl-ctrl-group",t.getContainer());return a.supportsGeolocation?(this._container.addEventListener("contextmenu",this._onContextMenu.bind(this)),this._geolocateButton=o.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.addEventListener("click",this._onClickGeolocate.bind(this)),e):e},_onContextMenu:function(t){t.preventDefault()},_onClickGeolocate:function(){navigator.geolocation.getCurrentPosition(this._success.bind(this),this._error.bind(this),l),this._timeoutId=setTimeout(this._finish.bind(this),1e4)},_success:function(t){this._map.jumpTo({center:[t.coords.longitude,t.coords.latitude],zoom:17,bearing:0,pitch:0}), +this.fire("geolocate",t),this._finish()},_error:function(t){this.fire("error",t),this._finish()},_finish:function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}})},{"../../util/browser":405,"../../util/dom":407,"../../util/util":421,"./control":389}],391:[function(t,e,r){"use strict";function n(t){s.setOptions(this,t)}function i(t){return new MouseEvent(t.type,{button:2,buttons:2,bubbles:!0,cancelable:!0,detail:t.detail,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,movementX:t.movementX,movementY:t.movementY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey})}var a=t("./control"),o=t("../../util/dom"),s=t("../../util/util");e.exports=n,n.prototype=s.inherit(a,{options:{position:"top-right"},onAdd:function(t){var e="mapboxgl-ctrl",r=this._container=o.create("div",e+"-group",t.getContainer());return this._container.addEventListener("contextmenu",this._onContextMenu.bind(this)),this._zoomInButton=this._createButton(e+"-icon "+e+"-zoom-in",t.zoomIn.bind(t)),this._zoomOutButton=this._createButton(e+"-icon "+e+"-zoom-out",t.zoomOut.bind(t)),this._compass=this._createButton(e+"-icon "+e+"-compass",t.resetNorth.bind(t)),this._compassArrow=o.create("div","arrow",this._compass),this._compass.addEventListener("mousedown",this._onCompassDown.bind(this)),this._onCompassMove=this._onCompassMove.bind(this),this._onCompassUp=this._onCompassUp.bind(this),t.on("rotate",this._rotateCompassArrow.bind(this)),this._rotateCompassArrow(),this._el=t.getCanvasContainer(),r},_onContextMenu:function(t){t.preventDefault()},_onCompassDown:function(t){0===t.button&&(o.disableDrag(),document.addEventListener("mousemove",this._onCompassMove),document.addEventListener("mouseup",this._onCompassUp),this._el.dispatchEvent(i(t)),t.stopPropagation())},_onCompassMove:function(t){0===t.button&&(this._el.dispatchEvent(i(t)),t.stopPropagation())},_onCompassUp:function(t){0===t.button&&(document.removeEventListener("mousemove",this._onCompassMove),document.removeEventListener("mouseup",this._onCompassUp),o.enableDrag(),this._el.dispatchEvent(i(t)),t.stopPropagation())},_createButton:function(t,e){var r=o.create("button",t,this._container);return r.type="button",r.addEventListener("click",function(){e()}),r},_rotateCompassArrow:function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t}})},{"../../util/dom":407,"../../util/util":421,"./control":389}],392:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),o.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../geo/lng_lat_bounds"),o=t("../../util/util");e.exports=n,n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onMouseDown,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onMouseDown),this._enabled=!1)},_onMouseDown:function(t){t.shiftKey&&0===t.button&&(document.addEventListener("mousemove",this._onMouseMove,!1),document.addEventListener("keydown",this._onKeyDown,!1),document.addEventListener("mouseup",this._onMouseUp,!1),i.disableDrag(),this._startPos=i.mousePos(this._el,t),this._active=!0)},_onMouseMove:function(t){var e=this._startPos,r=i.mousePos(this._el,t);this._box||(this._box=i.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var n=Math.min(e.x,r.x),a=Math.max(e.x,r.x),o=Math.min(e.y,r.y),s=Math.max(e.y,r.y);i.setTransform(this._box,"translate("+n+"px,"+o+"px)"),this._box.style.width=a-n+"px",this._box.style.height=s-o+"px"},_onMouseUp:function(t){if(0===t.button){var e=this._startPos,r=i.mousePos(this._el,t),n=new a(this._map.unproject(e),this._map.unproject(r));this._finish(),e.x===r.x&&e.y===r.y?this._fireEvent("boxzoomcancel",t):this._map.fitBounds(n,{linear:!0}).fire("boxzoomend",{originalEvent:t,boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},_finish:function(){this._active=!1,document.removeEventListener("mousemove",this._onMouseMove,!1),document.removeEventListener("keydown",this._onKeyDown,!1),document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.parentNode.removeChild(this._box),this._box=null),i.enableDrag()},_fireEvent:function(t,e){return this._map.fire(t,{originalEvent:e})}}},{"../../geo/lng_lat_bounds":319,"../../util/dom":407,"../../util/util":421}],393:[function(t,e,r){"use strict";function n(t){this._map=t,this._onDblClick=this._onDblClick.bind(this)}e.exports=n,n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._map.on("dblclick",this._onDblClick),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._map.off("dblclick",this._onDblClick),this._enabled=!1)},_onDblClick:function(t){this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)}}},{}],394:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),a.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/util");e.exports=n;var o=a.bezier(0,0,.3,1);n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._el.addEventListener("touchstart",this._onDown),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._el.removeEventListener("touchstart",this._onDown),this._enabled=!1)},_onDown:function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(document.addEventListener("touchmove",this._onMove),document.addEventListener("touchend",this._onTouchEnd)):(document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onMouseUp)),this._active=!1,this._startPos=this._pos=i.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},_onMove:function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._fireEvent("dragstart",t),this._fireEvent("movestart",t));var e=i.mousePos(this._el,t),r=this._map;r.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),r.transform.setLocationAtPoint(r.transform.pointLocation(this._pos),e),this._fireEvent("drag",t),this._fireEvent("move",t),this._pos=e,t.preventDefault()}},_onUp:function(t){if(this.isActive()){this._active=!1,this._fireEvent("dragend",t),this._drainInertiaBuffer();var e=function(){this._fireEvent("moveend",t)}.bind(this),r=this._inertia;if(r.length<2)return void e();var n=r[r.length-1],i=r[0],a=n[1].sub(i[1]),s=(n[0]-i[0])/1e3;if(0===s||n[1].equals(i[1]))return void e();var l=a.mult(.3/s),u=l.mag();u>1400&&(u=1400,l._unit()._mult(u));var c=u/750,h=l.mult(-c/2);this._map.panBy(h,{duration:1e3*c,easing:o,noMoveStart:!0},{originalEvent:t})}},_onMouseUp:function(t){this._ignoreEvent(t)||(this._onUp(t),document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onMouseUp))},_onTouchEnd:function(t){this._ignoreEvent(t)||(this._onUp(t),document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onTouchEnd))},_fireEvent:function(t,e){return this._map.fire(t,{originalEvent:e})},_ignoreEvent:function(t){var e=this._map;if(e.boxZoom&&e.boxZoom.isActive())return!0;if(e.dragRotate&&e.dragRotate.isActive())return!0;if(t.touches)return t.touches.length>1;if(t.ctrlKey)return!0;return"mousemove"===t.type?t.buttons&!1:0!==t.button},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":407,"../../util/util":421}],395:[function(t,e,r){"use strict";function n(t,e){this._map=t,this._el=t.getCanvasContainer(),this._bearingSnap=e.bearingSnap,o.bindHandlers(this)}var i=t("../../util/dom"),a=t("point-geometry"),o=t("../../util/util");e.exports=n;var s=o.bezier(0,0,.25,1);n.prototype={_enabled:!1,_active:!1,isEnabled:function(){return this._enabled},isActive:function(){return this._active},enable:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._enabled=!1)},_onDown:function(t){if(!this._ignoreEvent(t)&&!this.isActive()){document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=i.mousePos(this._el,t),this._center=this._map.transform.centerPoint;var e=this._startPos.sub(this._center);e.mag()<200&&(this._center=this._startPos.add(new a(-200,0)._rotate(e.angle()))),t.preventDefault()}},_onMove:function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._fireEvent("rotatestart",t),this._fireEvent("movestart",t));var e=this._map;e.stop();var r=this._pos,n=i.mousePos(this._el,t),a=this._center,o=r.sub(a).angleWith(n.sub(a))/Math.PI*180,s=e.getBearing()-o,l=this._inertia,u=l[l.length-1];this._drainInertiaBuffer(),l.push([Date.now(),e._normalizeBearing(s,u[1])]),e.transform.bearing=s,this._fireEvent("rotate",t),this._fireEvent("move",t),this._pos=n}},_onUp:function(t){if(!this._ignoreEvent(t)&&(document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onUp),this.isActive())){this._active=!1,this._fireEvent("rotateend",t),this._drainInertiaBuffer();var e=this._map,r=e.getBearing(),n=this._inertia,i=function(){Math.abs(r)180&&(d=180);var p=d/180;u+=h*d*(p/2),Math.abs(e._normalizeBearing(u,0))1;var r=t.ctrlKey?1:2,n=t.ctrlKey?0:2;return"mousemove"===t.type?t.buttons&0===r:t.button!==n},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":407,"../../util/util":421,"point-geometry":462}],396:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),this._onKeyDown=this._onKeyDown.bind(this)}e.exports=n;n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=this._map,r={originalEvent:t};if(!e.isEasing())switch(t.keyCode){case 61:case 107:case 171:case 187:e.zoomTo(Math.round(e.getZoom())+(t.shiftKey?2:1),r);break;case 189:case 109:case 173:e.zoomTo(Math.round(e.getZoom())-(t.shiftKey?2:1),r);break;case 37:t.shiftKey?e.easeTo({bearing:e.getBearing()-2},r):(t.preventDefault(),e.panBy([-80,0],r));break;case 39:t.shiftKey?e.easeTo({bearing:e.getBearing()+2},r):(t.preventDefault(),e.panBy([80,0],r));break;case 38:t.shiftKey?e.easeTo({pitch:e.getPitch()+5},r):(t.preventDefault(),e.panBy([0,-80],r));break;case 40:t.shiftKey?e.easeTo({pitch:Math.max(e.getPitch()-5,0)},r):(t.preventDefault(),e.panBy([0,80],r))}}}}},{}],397:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),o.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/browser"),o=t("../../util/util");e.exports=n;var s="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",l=s.indexOf("firefox")!==-1,u=s.indexOf("safari")!==-1&&s.indexOf("chrom")===-1;n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("wheel",this._onWheel,!1),this._el.addEventListener("mousewheel",this._onWheel,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("wheel",this._onWheel),this._el.removeEventListener("mousewheel",this._onWheel),this._enabled=!1)},_onWheel:function(t){var e;"wheel"===t.type?(e=t.deltaY,l&&t.deltaMode===window.WheelEvent.DOM_DELTA_PIXEL&&(e/=a.devicePixelRatio),t.deltaMode===window.WheelEvent.DOM_DELTA_LINE&&(e*=40)):"mousewheel"===t.type&&(e=-t.wheelDeltaY,u&&(e/=3));var r=a.now(),n=r-(this._time||0);this._pos=i.mousePos(this._el,t),this._time=r,0!==e&&e%4.000244140625==0?(this._type="wheel",e=Math.floor(e/4)):0!==e&&Math.abs(e)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=e,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(n*e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,e+=this._lastValue)),t.shiftKey&&e&&(e/=4),this._type&&this._zoom(-e,t),t.preventDefault()},_onTimeout:function(){this._type="wheel",this._zoom(-this._lastValue)},_zoom:function(t,e){if(0!==t){var r=this._map,n=2/(1+Math.exp(-Math.abs(t/100)));t<0&&0!==n&&(n=1/n);var i=r.ease?r.ease.to:r.transform.scale,a=r.transform.scaleZoom(i*n);r.zoomTo(a,{duration:0,around:r.unproject(this._pos),delayEndEvents:200},{originalEvent:e})}}}},{"../../util/browser":405,"../../util/dom":407,"../../util/util":421}],398:[function(t,e,r){"use strict";function n(t){this._map=t,this._el=t.getCanvasContainer(),a.bindHandlers(this)}var i=t("../../util/dom"),a=t("../../util/util");e.exports=n;var o=a.bezier(0,0,.15,1);n.prototype={_enabled:!1,isEnabled:function(){return this._enabled},enable:function(){this.isEnabled()||(this._el.addEventListener("touchstart",this._onStart,!1),this._enabled=!0)},disable:function(){this.isEnabled()&&(this._el.removeEventListener("touchstart",this._onStart),this._enabled=!1)},disableRotation:function(){this._rotationDisabled=!0},enableRotation:function(){this._rotationDisabled=!1},_onStart:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]);this._startVec=e.sub(r),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],document.addEventListener("touchmove",this._onMove,!1),document.addEventListener("touchend",this._onEnd,!1)}},_onMove:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]),n=e.add(r).div(2),a=e.sub(r),o=a.mag()/this._startVec.mag(),s=this._rotationDisabled?0:180*a.angleWith(this._startVec)/Math.PI,l=this._map;if(this._gestureIntent){var u={duration:0,around:l.unproject(n)};"rotate"===this._gestureIntent&&(u.bearing=this._startBearing+s),"zoom"!==this._gestureIntent&&"rotate"!==this._gestureIntent||(u.zoom=l.transform.scaleZoom(this._startScale*o)),l.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),o,n]),l.easeTo(u,{originalEvent:t})}else{var c=Math.abs(1-o)>.15;Math.abs(s)>4?this._gestureIntent="rotate":c&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._startVec=a,this._startScale=l.transform.scale,this._startBearing=l.transform.bearing)}t.preventDefault()}},_onEnd:function(t){document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,r=this._map;if(e.length<2)return void r.snapToNorth({},{originalEvent:t});var n=e[e.length-1],i=e[0],a=r.transform.scaleZoom(this._startScale*n[1]),s=r.transform.scaleZoom(this._startScale*i[1]),l=a-s,u=(n[0]-i[0])/1e3,c=n[2];if(0===u||a===s)return void r.snapToNorth({},{originalEvent:t});var h=.15*l/u;Math.abs(h)>2.5&&(h=h>0?2.5:-2.5);var f=1e3*Math.abs(h/(12*.15)),d=a+h*f/2e3;d<0&&(d=0),r.easeTo({zoom:d,duration:f,easing:o,around:r.unproject(c)},{originalEvent:t})},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>2&&e-t[0][0]>160;)t.shift()}}},{"../../util/dom":407,"../../util/util":421}],399:[function(t,e,r){"use strict";function n(){i.bindAll(["_onHashChange","_updateHash"],this)}e.exports=n;var i=t("../util/util");n.prototype={addTo:function(t){return this._map=t,window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},remove:function(){return window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),delete this._map,this},_onHashChange:function(){var t=location.hash.replace("#","").split("/");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0)}),!0)},_updateHash:function(){var t=this._map.getCenter(),e=this._map.getZoom(),r=this._map.getBearing(),n=Math.max(0,Math.ceil(Math.log(e)/Math.LN2)),i="#"+Math.round(100*e)/100+"/"+t.lat.toFixed(n)+"/"+t.lng.toFixed(n)+(r?"/"+Math.round(10*r)/10:"");window.history.replaceState("","",i)}}},{"../util/util":421}],400:[function(t,e,r){"use strict";function n(t){t.parentNode&&t.parentNode.removeChild(t)}var i=t("../util/canvas"),a=t("../util/util"),o=t("../util/browser"),s=t("../util/browser").window,l=t("../util/evented"),u=t("../util/dom"),c=t("../style/style"),h=t("../style/animation_loop"),f=t("../render/painter"),d=t("../geo/transform"),p=t("./hash"),m=t("./bind_handlers"),g=t("./camera"),v=t("../geo/lng_lat"),y=t("../geo/lng_lat_bounds"),b=t("point-geometry"),x=t("./control/attribution"),_={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:20,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,workerCount:Math.max(o.hardwareConcurrency-1,1)},w=e.exports=function(t){if(t=a.extend({},_,t),t.workerCount<1)throw new Error("workerCount must an integer greater than or equal to 1.");this._interactive=t.interactive,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._trackResize=t.trackResize,this._workerCount=t.workerCount,this._bearingSnap=t.bearingSnap,"string"==typeof t.container?this._container=document.getElementById(t.container):this._container=t.container,this.animationLoop=new h,this.transform=new d(t.minZoom,t.maxZoom),t.maxBounds&&this.setMaxBounds(t.maxBounds),a.bindAll(["_forwardStyleEvent","_forwardSourceEvent","_forwardLayerEvent","_forwardTileEvent","_onStyleLoad","_onStyleChange","_onSourceAdd","_onSourceRemove","_onSourceUpdate","_onWindowOnline","_onWindowResize","_update","_render"],this),this._setupContainer(),this._setupPainter(),this.on("move",this._update.bind(this,!1)),this.on("zoom",this._update.bind(this,!0)),this.on("moveend",function(){this.animationLoop.set(300),this._rerender()}.bind(this)),void 0!==s&&(s.addEventListener("online",this._onWindowOnline,!1),s.addEventListener("resize",this._onWindowResize,!1)),m(this,t),this._hash=t.hash&&(new p).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),this.stacks={},this._classes=[],this.resize(),t.classes&&this.setClasses(t.classes),t.style&&this.setStyle(t.style),t.attributionControl&&this.addControl(new x(t.attributionControl));var e=this.fire.bind(this,"error");this.on("style.error",e),this.on("source.error",e),this.on("tile.error",e),this.on("layer.error",e)};a.extend(w.prototype,l),a.extend(w.prototype,g.prototype),a.extend(w.prototype,{addControl:function(t){return t.addTo(this),this},addClass:function(t,e){return this._classes.indexOf(t)>=0||""===t?this:(this._classes.push(t),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},removeClass:function(t,e){var r=this._classes.indexOf(t);return r<0||""===t?this:(this._classes.splice(r,1),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},setClasses:function(t,e){for(var r={},n=0;n=0},getClasses:function(){return this._classes},resize:function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),this._canvas.resize(t,e),this.transform.resize(t,e),this.painter.resize(t,e),this.fire("movestart").fire("move").fire("resize").fire("moveend")},getBounds:function(){var t=new y(this.transform.pointLocation(new b(0,0)),this.transform.pointLocation(this.transform.size));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new b(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new b(0,this.transform.size.y)))),t},setMaxBounds:function(t){if(t){var e=y.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=[],this.transform.latRange=[],this._update());return this},setMinZoom:function(t){if((t=null===t||void 0===t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom&&t<=20)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be between the current minZoom and 20, inclusive")},project:function(t){return this.transform.locationPoint(v.convert(t))},unproject:function(t){return this.transform.pointLocation(b.convert(t))},queryRenderedFeatures:function(){var t,e={};return 2===arguments.length?(t=arguments[0],e=arguments[1]):1===arguments.length&&function(t){return t instanceof b||Array.isArray(t)}(arguments[0])?t=arguments[0]:1===arguments.length&&(e=arguments[0]),this.style.queryRenderedFeatures(this._makeQueryGeometry(t),e,this.transform.zoom,this.transform.angle)},_makeQueryGeometry:function(t){void 0===t&&(t=[b.convert([0,0]),b.convert([this.transform.width,this.transform.height])]);var e;if(t instanceof b||"number"==typeof t[0])e=[b.convert(t)];else{var r=[b.convert(t[0]),b.convert(t[1])];e=[r[0],new b(r[1].x,r[0].y),r[1],new b(r[0].x,r[1].y),r[0]]}return e=e.map(function(t){return this.transform.pointCoordinate(t)}.bind(this))},querySourceFeatures:function(t,e){return this.style.querySourceFeatures(t,e)},setStyle:function(t){return this.style&&(this.style.off("load",this._onStyleLoad).off("error",this._forwardStyleEvent).off("change",this._onStyleChange).off("source.add",this._onSourceAdd).off("source.remove",this._onSourceRemove).off("source.load",this._onSourceUpdate).off("source.error",this._forwardSourceEvent).off("source.change",this._onSourceUpdate).off("layer.add",this._forwardLayerEvent).off("layer.remove",this._forwardLayerEvent).off("layer.error",this._forwardLayerEvent).off("tile.add",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.load",this._update).off("tile.error",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent)._remove(),this.off("rotate",this.style._redoPlacement),this.off("pitch",this.style._redoPlacement)),t?(this.style=t instanceof c?t:new c(t,this.animationLoop,this._workerCount),this.style.on("load",this._onStyleLoad).on("error",this._forwardStyleEvent).on("change",this._onStyleChange).on("source.add",this._onSourceAdd).on("source.remove",this._onSourceRemove).on("source.load",this._onSourceUpdate).on("source.error",this._forwardSourceEvent).on("source.change",this._onSourceUpdate).on("layer.add",this._forwardLayerEvent).on("layer.remove",this._forwardLayerEvent).on("layer.error",this._forwardLayerEvent).on("tile.add",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.load",this._update).on("tile.error",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this.on("rotate",this.style._redoPlacement),this.on("pitch",this.style._redoPlacement),this):(this.style=null,this)},getStyle:function(){if(this.style)return this.style.serialize()},addSource:function(t,e){return this.style.addSource(t,e),this._update(!0),this},addSourceType:function(t,e,r){return this.style.addSourceType(t,e,r)},removeSource:function(t){return this.style.removeSource(t),this._update(!0),this},getSource:function(t){return this.style.getSource(t)},addLayer:function(t,e){return this.style.addLayer(t,e),this._update(!0),this},removeLayer:function(t){return this.style.removeLayer(t),this._update(!0),this},getLayer:function(t){return this.style.getLayer(t)},setFilter:function(t,e){return this.style.setFilter(t,e),this._update(!0),this},setLayerZoomRange:function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},getFilter:function(t){return this.style.getFilter(t)},setPaintProperty:function(t,e,r,n){return this.style.setPaintProperty(t,e,r,n),this._update(!0),this},getPaintProperty:function(t,e,r){return this.style.getPaintProperty(t,e,r)},setLayoutProperty:function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},getLayoutProperty:function(t,e){return this.style.getLayoutProperty(t,e)},getContainer:function(){return this._container},getCanvasContainer:function(){return this._canvasContainer},getCanvas:function(){return this._canvas.getElement()},_setupContainer:function(){var t=this._container;t.classList.add("mapboxgl-map");var e=this._canvasContainer=u.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=new i(this,e);var r=this._controlContainer=u.create("div","mapboxgl-control-container",t),n=this._controlCorners={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){n[t]=u.create("div","mapboxgl-ctrl-"+t,r)})},_setupPainter:function(){var t=this._canvas.getWebGLContext({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer});if(!t)return void this.fire("error",{error:new Error("Failed to initialize WebGL")});this.painter=new f(t,this.transform)},_contextLost:function(t){t.preventDefault(),this._frameId&&o.cancelFrame(this._frameId),this.fire("webglcontextlost",{originalEvent:t})},_contextRestored:function(t){this._setupPainter(),this.resize(),this._update(),this.fire("webglcontextrestored",{originalEvent:t})},loaded:function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},_update:function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},_render:function(){try{this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(this._classes,this._classOptions),this._classOptions=null,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.painter.render(this.style,{debug:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,vertices:this.vertices,rotating:this.rotating,zooming:this.zooming}),this.fire("render"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire("load")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty)&&this._rerender()}catch(t){this.fire("error",{error:t})}return this},remove:function(){this._hash&&this._hash.remove(),o.cancelFrame(this._frameId),this.setStyle(null),void 0!==s&&s.removeEventListener("resize",this._onWindowResize,!1);var t=this.painter.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),n(this._canvasContainer),n(this._controlContainer),this._container.classList.remove("mapboxgl-map")},_rerender:function(){this.style&&!this._frameId&&(this._frameId=o.frame(this._render))},_forwardStyleEvent:function(t){this.fire("style."+t.type,a.extend({style:t.target},t))},_forwardSourceEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_forwardLayerEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_forwardTileEvent:function(t){this.fire(t.type,a.extend({style:t.target},t))},_onStyleLoad:function(t){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update(this._classes,{transition:!1}),this._forwardStyleEvent(t)},_onStyleChange:function(t){this._update(!0),this._forwardStyleEvent(t)},_onSourceAdd:function(t){var e=t.source;e.onAdd&&e.onAdd(this),this._forwardSourceEvent(t)},_onSourceRemove:function(t){var e=t.source;e.onRemove&&e.onRemove(this),this._forwardSourceEvent(t)},_onSourceUpdate:function(t){this._update(),this._forwardSourceEvent(t)},_onWindowOnline:function(){this._update()},_onWindowResize:function(){this._trackResize&&this.stop().resize()._update()}}),a.extendAll(w.prototype,{_showTileBoundaries:!1,get showTileBoundaries(){return this._showTileBoundaries},set showTileBoundaries(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},_showCollisionBoxes:!1,get showCollisionBoxes(){return this._showCollisionBoxes},set showCollisionBoxes(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,this.style._redoPlacement())},_showOverdrawInspector:!1,get showOverdrawInspector(){return this._showOverdrawInspector},set showOverdrawInspector(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},_repaint:!1,get repaint(){return this._repaint},set repaint(t){this._repaint=t,this._update()},_vertices:!1,get vertices(){return this._vertices},set vertices(t){this._vertices=t,this._update()}})},{"../geo/lng_lat":318,"../geo/lng_lat_bounds":319,"../geo/transform":320,"../render/painter":334,"../style/animation_loop":354,"../style/style":357,"../util/browser":405,"../util/canvas":406,"../util/dom":407,"../util/evented":413,"../util/util":421,"./bind_handlers":386,"./camera":387,"./control/attribution":388,"./hash":399,"point-geometry":462}],401:[function(t,e,r){"use strict";function n(t,e){t||(t=i.create("div")),t.classList.add("mapboxgl-marker"),this._el=t,this._offset=o.convert(e&&e.offset||[0,0]),this._update=this._update.bind(this)}e.exports=n;var i=t("../util/dom"),a=t("../geo/lng_lat"),o=t("point-geometry");n.prototype={addTo:function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._el),t.on("move",this._update),this._update(),this},remove:function(){this._map&&(this._map.off("move",this._update),this._map=null);var t=this._el.parentNode;return t&&t.removeChild(this._el),this},getLngLat:function(){return this._lngLat},setLngLat:function(t){return this._lngLat=a.convert(t),this._update(),this},getElement:function(){return this._el},_update:function(){if(this._map){var t=this._map.project(this._lngLat)._add(this._offset);i.setTransform(this._el,"translate("+t.x+"px,"+t.y+"px)")}}}},{"../geo/lng_lat":318,"../util/dom":407,"point-geometry":462}],402:[function(t,e,r){"use strict";function n(t){i.setOptions(this,t),i.bindAll(["_update","_onClickClose"],this)}e.exports=n;var i=t("../util/util"),a=t("../util/evented"),o=t("../util/dom"),s=t("../geo/lng_lat");n.prototype=i.inherit(a,{options:{closeButton:!0,closeOnClick:!0},addTo:function(t){return this._map=t,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this},remove:function(){ +return this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._container&&(this._container.parentNode.removeChild(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire("close"),this},getLngLat:function(){return this._lngLat},setLngLat:function(t){return this._lngLat=s.convert(t),this._update(),this},setText:function(t){return this.setDOMContent(document.createTextNode(t))},setHTML:function(t){var e,r=document.createDocumentFragment(),n=document.createElement("body");for(n.innerHTML=t;;){if(!(e=n.firstChild))break;r.appendChild(e)}return this.setDOMContent(r)},setDOMContent:function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},_createContent:function(){this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._content=o.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=o.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClickClose))},_update:function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content));var t=this._map.project(this._lngLat).round(),e=this.options.anchor;if(!e){var r=this._container.offsetWidth,n=this._container.offsetHeight;e=t.ythis._map.transform.height-n?["bottom"]:[],t.xthis._map.transform.width-r/2&&e.push("right"),e=0===e.length?"bottom":e.join("-")}var i={top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"},a=this._container.classList;for(var s in i)a.remove("mapboxgl-popup-anchor-"+s);a.add("mapboxgl-popup-anchor-"+e),o.setTransform(this._container,i[e]+" translate("+t.x+"px,"+t.y+"px)")}},_onClickClose:function(){this.remove()}})},{"../geo/lng_lat":318,"../util/dom":407,"../util/evented":413,"../util/util":421}],403:[function(t,e,r){"use strict";function n(t,e){this.target=t,this.parent=e,this.callbacks={},this.callbackID=0,this.receive=this.receive.bind(this),this.target.addEventListener("message",this.receive,!1)}e.exports=n,n.prototype.receive=function(t){function e(t,e,r){this.postMessage({type:"",id:String(i),error:t?String(t):null,data:e},r)}var r,n=t.data,i=n.id;if(""===n.type)r=this.callbacks[n.id],delete this.callbacks[n.id],r&&r(n.error||null,n.data);else if(void 0!==n.id&&this.parent[n.type])this.parent[n.type](n.data,e.bind(this));else if(void 0!==n.id&&this.parent.workerSources){var a=n.type.split(".");this.parent.workerSources[a[0]][a[1]](n.data,e.bind(this))}else this.parent[n.type](n.data)},n.prototype.send=function(t,e,r,n){var i=null;r&&(this.callbacks[i=this.callbackID++]=r),this.postMessage({type:t,id:String(i),data:e},n)},n.prototype.postMessage=function(t,e){this.target.postMessage(t,e)}},{}],404:[function(t,e,r){"use strict";function n(t){var e=document.createElement("a");return e.href=t,e.protocol===document.location.protocol&&e.host===document.location.host}r.getJSON=function(t,e){var r=new XMLHttpRequest;return r.open("GET",t,!0),r.setRequestHeader("Accept","application/json"),r.onerror=function(t){e(t)},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var t;try{t=JSON.parse(r.response)}catch(t){return e(t)}e(null,t)}else e(new Error(r.statusText))},r.send(),r},r.getArrayBuffer=function(t,e){var r=new XMLHttpRequest;return r.open("GET",t,!0),r.responseType="arraybuffer",r.onerror=function(t){e(t)},r.onload=function(){r.status>=200&&r.status<300&&r.response?e(null,r.response):e(new Error(r.statusText))},r.send(),r},r.getImage=function(t,e){return r.getArrayBuffer(t,function(t,r){if(t)return e(t);var n=new Image;n.onload=function(){e(null,n),(window.URL||window.webkitURL).revokeObjectURL(n.src)};var i=new Blob([new Uint8Array(r)],{type:"image/png"});return n.src=(window.URL||window.webkitURL).createObjectURL(i),n.getData=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return t.width=n.width,t.height=n.height,e.drawImage(n,0,0),e.getImageData(0,0,n.width,n.height).data},n})},r.getVideo=function(t,e){var r=document.createElement("video");r.onloadstart=function(){e(null,r)};for(var i=0;i=s+n?t.call(i,1):(t.call(i,(l-s)/n),r.frame(a)))}if(!n)return t.call(i,1),null;var o=!1,s=e.exports.now();return r.frame(a),function(){o=!0}},r.supported=t("mapbox-gl-supported"),r.hardwareConcurrency=navigator.hardwareConcurrency||4,Object.defineProperty(r,"devicePixelRatio",{get:function(){return window.devicePixelRatio}}),r.supportsWebp=!1;var a=document.createElement("img");a.onload=function(){r.supportsWebp=!0},a.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=",r.supportsGeolocation=!!navigator.geolocation},{"mapbox-gl-supported":306}],406:[function(t,e,r){"use strict";function n(t,e){this.canvas=document.createElement("canvas"),t&&e&&(this.canvas.style.position="absolute",this.canvas.classList.add("mapboxgl-canvas"),this.canvas.addEventListener("webglcontextlost",t._contextLost.bind(t),!1),this.canvas.addEventListener("webglcontextrestored",t._contextRestored.bind(t),!1),this.canvas.setAttribute("tabindex",0),e.appendChild(this.canvas))}var i=t("../util"),a=t("mapbox-gl-supported");e.exports=n,n.prototype.resize=function(t,e){var r=window.devicePixelRatio||1;this.canvas.width=r*t,this.canvas.height=r*e,this.canvas.style.width=t+"px",this.canvas.style.height=e+"px"},n.prototype.getWebGLContext=function(t){return t=i.extend({},t,a.webGLContextAttributes),this.canvas.getContext("webgl",t)||this.canvas.getContext("experimental-webgl",t)},n.prototype.getElement=function(){return this.canvas}},{"../util":421,"mapbox-gl-supported":306}],407:[function(t,e,r){"use strict";function n(t){for(var e=0;e1)for(var h=0;h=0&&this._events[t].splice(r,1),this._events[t].length||delete this._events[t]}else delete this._events[t];return this},once:function(t,e){var r=function(n){this.off(t,r),e.call(this,n)}.bind(this);return this.on(t,r),this},fire:function(t,e){if(!this.listens(t))return n.endsWith(t,"error")&&console.error(e&&e.error||e||"Empty error event"),this;e=n.extend({},e),n.extend(e,{type:t,target:this});for(var r=this._events[t].slice(),i=0;i=3)for(var l=0;l1){if(s(t,e))return!0;for(var n=0;n(e.y-t.y)*(r.x-t.x)}function u(t,e,r,n){return l(t,r,n)!==l(e,r,n)&&l(t,e,r)!==l(t,e,n)}function c(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function f(t,e){for(var r,n,i,a=!1,o=0;oe.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a)}return a}function d(t,e){for(var r=!1,n=0,i=t.length-1;ne.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}e.exports={multiPolygonIntersectsBufferedMultiPoint:n,multiPolygonIntersectsMultiPolygon:i,multiPolygonIntersectsBufferedMultiLine:a}},{}],417:[function(t,e,r){"use strict";function n(t,e){this.max=t,this.onRemove=e,this.reset()}e.exports=n,n.prototype.reset=function(){for(var t in this.data)this.onRemove(this.data[t]);return this.data={},this.order=[],this},n.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.get(this.order[0]);r&&this.onRemove(r)}return this},n.prototype.has=function(t){return t in this.data},n.prototype.keys=function(){return this.order},n.prototype.get=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},n.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this.get(this.order[0]);e&&this.onRemove(e)}return this}},{}],418:[function(t,e,r){"use strict";function n(t,e,r){if(!(r=r||o.ACCESS_TOKEN)&&o.REQUIRE_ACCESS_TOKEN)throw new Error("An API access token is required to use Mapbox GL. See https://www.mapbox.com/developers/api/#access-tokens");if(t=t.replace(/^mapbox:\/\//,o.API_URL+e),t+=t.indexOf("?")!==-1?"&access_token=":"?access_token=",o.REQUIRE_ACCESS_TOKEN){if("s"===r[0])throw new Error("Use a public access token (pk.*) with Mapbox GL JS, not a secret access token (sk.*). See https://www.mapbox.com/developers/api/#access-tokens");t+=r}return t}function i(t){return t?"?"+t:""}function a(t){return t.access_token&&"tk."===t.access_token.slice(0,3)?u.extend({},t,{access_token:o.ACCESS_TOKEN}):t}var o=t("./config"),s=t("./browser"),l=t("url"),u=t("./util");e.exports.normalizeStyleURL=function(t,e){var r=l.parse(t);return"mapbox:"!==r.protocol?t:n("mapbox:/"+r.pathname+i(r.query),"/styles/v1/",e)},e.exports.normalizeSourceURL=function(t,e){return"mapbox:"!==l.parse(t).protocol?t:n(t+".json","/v4/",e)+"&secure"},e.exports.normalizeGlyphsURL=function(t,e){var r=l.parse(t);return"mapbox:"!==r.protocol?t:n("mapbox://"+r.pathname.split("/")[1]+"/{fontstack}/{range}.pbf"+i(r.query),"/fonts/v1/",e)},e.exports.normalizeSpriteURL=function(t,e,r,a){var o=l.parse(t);return"mapbox:"!==o.protocol?(o.pathname+=e+r,l.format(o)):n("mapbox:/"+o.pathname+"/sprite"+e+r+i(o.query),"/styles/v1/",a)},e.exports.normalizeTileURL=function(t,e,r){var n=l.parse(t,!0);if(!e)return t;if("mapbox:"!==l.parse(e).protocol)return t;var i=s.supportsWebp?".webp":"$1",o=s.devicePixelRatio>=2||512===r?"@2x":"";return l.format({protocol:n.protocol,hostname:n.hostname,pathname:n.pathname.replace(/(\.(?:png|jpg)\d*)/,o+i),query:a(n.query)})}},{"./browser":405,"./config":410,"./util":421,url:522}],419:[function(t,e,r){"use strict";function n(t){function e(){f.apply(this,arguments)}function r(){d.apply(this,arguments),this.members=e.prototype.members}var n=JSON.stringify(t);if(g[n])return g[n];void 0===t.alignment&&(t.alignment=1),e.prototype=Object.create(f.prototype);var s=0,u=0,v=["Uint8"];return e.prototype.members=t.members.map(function(r){r={name:r.name,type:r.type,components:r.components||1},p(r.name.length),p(r.type in m),v.indexOf(r.type)<0&&v.push(r.type);var n=o(r.type);u=Math.max(u,n),r.offset=s=a(s,Math.max(t.alignment,n));for(var i=0;ithis.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*this.RESIZE_MULTIPLIER),this.DEFAULT_CAPACITY),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},d.prototype._refreshViews=function(){for(var t=0;t=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)},r.bezier=function(t,e,r,i){var a=new n(t,e,r,i);return function(t){return a.solve(t)}},r.ease=r.bezier(.25,.1,.25,1),r.clamp=function(t,e,r){return Math.min(r,Math.max(e,t))},r.wrap=function(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i},r.coalesce=function(){for(var t=0;t=0)return!0;return!1};var o={};r.warnOnce=function(t){o[t]||("undefined"!=typeof console&&console.warn(t),o[t]=!0)}},{"../geo/coordinate":317,unitbezier:521}],422:[function(t,e,r){"use strict";function n(t,e,r,n){this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&&(this.id=t.id)}e.exports=n,n.prototype={type:"Feature",get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},set geometry(t){this._geometry=t},toJSON:function(){var t={};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&"toJSON"!==e&&(t[e]=this[e]);return t}}},{}],423:[function(t,e,r){e.exports={_args:[[{raw:"mapbox-gl@^0.22.0",scope:null,escapedName:"mapbox-gl",name:"mapbox-gl",rawSpec:"^0.22.0",spec:">=0.22.0 <0.23.0",type:"range"},"/home/etienne/Documents/plotly/plotly.js"]],_from:"mapbox-gl@>=0.22.0 <0.23.0",_id:"mapbox-gl@0.22.1",_inCache:!0,_location:"/mapbox-gl",_nodeVersion:"4.4.5",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/mapbox-gl-0.22.1.tgz_1471549891670_0.8762630566488951"},_npmUser:{name:"lucaswoj",email:"lucas@lucaswoj.com"},_npmVersion:"2.15.5",_phantomChildren:{},_requested:{raw:"mapbox-gl@^0.22.0",scope:null,escapedName:"mapbox-gl",name:"mapbox-gl",rawSpec:"^0.22.0",spec:">=0.22.0 <0.23.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz",_shasum:"92a965547d4c2f24c22cbc487eeda48694cb627a",_shrinkwrap:null,_spec:"mapbox-gl@^0.22.0",_where:"/home/etienne/Documents/plotly/plotly.js",browser:{"./js/util/ajax.js":"./js/util/browser/ajax.js","./js/util/browser.js":"./js/util/browser/browser.js","./js/util/canvas.js":"./js/util/browser/canvas.js","./js/util/dom.js":"./js/util/browser/dom.js","./js/util/web_worker.js":"./js/util/browser/web_worker.js"},bugs:{url:"https://github.com/mapbox/mapbox-gl-js/issues"},dependencies:{csscolorparser:"^1.0.2",earcut:"^2.0.3","feature-filter":"^2.2.0","geojson-rewind":"^0.1.0","geojson-vt":"^2.4.0","gl-matrix":"^2.3.1","grid-index":"^1.0.0","mapbox-gl-function":"^1.2.1","mapbox-gl-shaders":"github:mapbox/mapbox-gl-shaders#de2ab007455aa2587c552694c68583f94c9f2747","mapbox-gl-style-spec":"github:mapbox/mapbox-gl-style-spec#83b1a3e5837d785af582efd5ed1a212f2df6a4ae","mapbox-gl-supported":"^1.2.0",pbf:"^1.3.2",pngjs:"^2.2.0","point-geometry":"^0.0.0",quickselect:"^1.0.0",request:"^2.39.0","resolve-url":"^0.2.1","shelf-pack":"^1.0.0",supercluster:"^2.0.1",unassertify:"^2.0.0",unitbezier:"^0.0.0","vector-tile":"^1.3.0","vt-pbf":"^2.0.2",webworkify:"^1.3.0","whoots-js":"^2.0.0"},description:"A WebGL interactive maps library",devDependencies:{"babel-preset-react":"^6.11.1",babelify:"^7.3.0",benchmark:"~2.1.0",browserify:"^13.0.0",clipboard:"^1.5.12","concat-stream":"1.5.1",coveralls:"^2.11.8",doctrine:"^1.2.1",documentation:"https://github.com/documentationjs/documentation/archive/bb41619c734e59ef3fbc3648610032efcfdaaace.tar.gz","documentation-theme-utils":"3.0.0",envify:"^3.4.0",eslint:"^2.5.3","eslint-config-mourner":"^2.0.0","eslint-plugin-html":"^1.5.1",gl:"^4.0.1",handlebars:"4.0.5","highlight.js":"9.3.0",istanbul:"^0.4.2","json-loader":"^0.5.4",lodash:"^4.13.1","mapbox-gl-test-suite":"github:mapbox/mapbox-gl-test-suite#7babab52fb02788ebbc38384139bf350e8e38552","memory-fs":"^0.3.0",minifyify:"^7.0.1","npm-run-all":"^3.0.0",nyc:"6.4.0",proxyquire:"^1.7.9",remark:"4.2.2","remark-html":"3.0.0",sinon:"^1.15.4",st:"^1.2.0",tap:"^5.7.0","transform-loader":"^0.2.3","unist-util-visit":"1.1.0",vinyl:"1.1.1","vinyl-fs":"2.4.3",watchify:"^3.7.0",webpack:"^1.13.1","webworkify-webpack":"^1.1.3"},directories:{},dist:{shasum:"92a965547d4c2f24c22cbc487eeda48694cb627a",tarball:"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz"},engines:{node:">=4.0.0"},gitHead:"13a9015341f0602ccb55c98c53079838ad4b70b5",homepage:"https://github.com/mapbox/mapbox-gl-js#readme",license:"BSD-3-Clause",main:"js/mapbox-gl.js",maintainers:[{name:"aaronlidman",email:"aaronlidman@gmail.com"},{name:"ajashton",email:"aj.ashton@gmail.com"},{name:"ansis",email:"ansis.brammanis@gmail.com"},{name:"bergwerkgis",email:"wb@bergwerk-gis.at"},{name:"bhousel",email:"bryan@mapbox.com"},{name:"bsudekum",email:"bobby@mapbox.com"},{name:"camilleanne",email:"camille@mapbox.com"},{name:"dnomadb",email:"damon@mapbox.com"},{name:"dthompson",email:"dthompson@gmail.com"},{name:"emilymcafee",email:"emily@mapbox.com"},{name:"flippmoke",email:"flippmoke@gmail.com"},{name:"freenerd",email:"spam@freenerd.de"},{name:"gretacb",email:"carol@mapbox.com"},{name:"ian29",email:"ian.villeda@gmail.com"},{name:"ianshward",email:"ian@mapbox.com"},{name:"ingalls",email:"nicholas.ingalls@gmail.com"},{name:"jfirebaugh",email:"john.firebaugh@gmail.com"},{name:"jrpruit1",email:"jake@jakepruitt.com"},{name:"karenzshea",email:"karen@mapbox.com"},{name:"kkaefer",email:"kkaefer@gmail.com"},{name:"lbud",email:"lauren@mapbox.com"},{name:"lucaswoj",email:"lucas@lucaswoj.com"},{name:"lxbarth",email:"alex@mapbox.com"},{name:"lyzidiamond",email:"lyzi@mapbox.com"},{name:"mapbox-admin",email:"accounts@mapbox.com"},{name:"mateov",email:"matt@mapbox.com"},{name:"mcwhittemore",email:"mcwhittemore@gmail.com"},{name:"miccolis",email:"jeff@miccolis.net"},{name:"mikemorris",email:"michael.patrick.morris@gmail.com"},{name:"morganherlocker",email:"morgan.herlocker@gmail.com"},{name:"mourner",email:"agafonkin@gmail.com"},{name:"nickidlugash",email:"nicki@mapbox.com"},{name:"rclark",email:"ryan.clark.j@gmail.com"},{name:"samanbb",email:"saman@mapbox.com"},{name:"sbma44",email:"tlee@mapbox.com"},{name:"scothis",email:"scothis@gmail.com"},{name:"sgillies",email:"sean@mapbox.com"},{name:"springmeyer",email:"dane@mapbox.com"},{name:"themarex",email:"patrick@mapbox.com"},{name:"tmcw",email:"tom@macwright.org"},{name:"tristen",email:"tristen.brown@gmail.com"},{name:"willwhite",email:"will@mapbox.com"},{name:"yhahn",email:"young@mapbox.com"}],name:"mapbox-gl",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/mapbox/mapbox-gl-js.git"},scripts:{build:"npm run build-docs # invoked by publisher when publishing docs on the mb-pages branch","build-dev":"browserify js/mapbox-gl.js --debug --standalone mapboxgl > dist/mapbox-gl-dev.js && tap --no-coverage test/build/dev.test.js","build-docs":"documentation build --github --format html -c documentation.yml --theme ./docs/_theme --output docs/api/","build-min":"browserify js/mapbox-gl.js --debug -t unassertify --plugin [minifyify --map mapbox-gl.js.map --output dist/mapbox-gl.js.map] --standalone mapboxgl > dist/mapbox-gl.js && tap --no-coverage test/build/min.test.js","build-token":"browserify debug/access-token-src.js --debug -t envify > debug/access-token.js",lint:"eslint --ignore-path .gitignore js test bench docs/_posts/examples/*.html","open-changed-examples":"git diff --name-only mb-pages HEAD -- docs/_posts/examples/*.html | awk '{print \"http://127.0.0.1:4000/mapbox-gl-js/example/\" substr($0,33,length($0)-37)}' | xargs open",start:"run-p build-token watch-dev watch-bench start-server","start-bench":"run-p build-token watch-bench start-server","start-debug":"run-p build-token watch-dev start-server","start-docs":"npm run build-min && npm run build-docs && jekyll serve -w","start-server":"st --no-cache --localhost --port 9966 --index index.html .",test:"npm run lint && tap --reporter dot test/js/*/*.js test/build/webpack.test.js","test-suite":"node test/render.test.js && node test/query.test.js","watch-bench":"node bench/download-data.js && watchify bench/index.js --plugin [minifyify --no-map] -t [babelify --presets react] -t unassertify -t envify -o bench/bench.js -v","watch-dev":"watchify js/mapbox-gl.js --debug --standalone mapboxgl -o dist/mapbox-gl-dev.js -v"},version:"0.22.1"}},{}],424:[function(t,e,r){"use strict";function n(t,e,r){for(var n=new Array(t),i=0;ig[1][2]&&(b[0]=-b[0]),g[0][2]>g[2][0]&&(b[1]=-b[1]),g[1][0]>g[0][1]&&(b[2]=-b[2]),!0}},{"./normalize":426,"gl-mat4/clone":156,"gl-mat4/create":157,"gl-mat4/determinant":158,"gl-mat4/invert":162,"gl-mat4/transpose":172,"gl-vec3/cross":253,"gl-vec3/dot":254,"gl-vec3/length":255,"gl-vec3/normalize":257}],426:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],427:[function(t,e,r){function n(t,e,r,n){if(0===c(e)||0===c(r))return!1;var i=u(e,f.translate,f.scale,f.skew,f.perspective,f.quaternion),a=u(r,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!(!i||!a)&&(s(p.translate,f.translate,d.translate,n),s(p.skew,f.skew,d.skew,n),s(p.scale,f.scale,d.scale,n),s(p.perspective,f.perspective,d.perspective,n),h(p.quaternion,f.quaternion,d.quaternion,n),l(t,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function i(){return{translate:a(),scale:a(1),skew:a(),perspective:o(),quaternion:o()}}function a(t){return[t||0,t||0,t||0]}function o(){return[0,0,0,1]}var s=t("gl-vec3/lerp"),l=t("mat4-recompose"),u=t("mat4-decompose"),c=t("gl-mat4/determinant"),h=t("quat-slerp"),f=i(),d=i(),p=i();e.exports=n},{"gl-mat4/determinant":158,"gl-vec3/lerp":256,"mat4-decompose":425,"mat4-recompose":428,"quat-slerp":467}],428:[function(t,e,r){var n={identity:t("gl-mat4/identity"),translate:t("gl-mat4/translate"),multiply:t("gl-mat4/multiply"),create:t("gl-mat4/create"),scale:t("gl-mat4/scale"),fromRotationTranslation:t("gl-mat4/fromRotationTranslation")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{"gl-mat4/create":157,"gl-mat4/fromRotationTranslation":160,"gl-mat4/identity":161,"gl-mat4/multiply":164,"gl-mat4/scale":170,"gl-mat4/translate":171}],429:[function(t,e,r){"use strict";function n(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}function i(t){return t=t||{},new n(t.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}var a=t("binary-search-bounds"),o=t("mat4-interpolate"),s=t("gl-mat4/invert"),l=t("gl-mat4/rotateX"),u=t("gl-mat4/rotateY"),c=t("gl-mat4/rotateZ"),h=t("gl-mat4/lookAt"),f=t("gl-mat4/translate"),d=(t("gl-mat4/scale"),t("gl-vec3/normalize")),p=[0,0,0];e.exports=i;var m=n.prototype;m.recalcMatrix=function(t){var e=this._time,r=a.le(e,t),n=this.computedMatrix;if(!(r<0)){var i=this._components;if(r===e.length-1)for(var l=16*r,u=0;u<16;++u)n[u]=i[l++];else{for(var c=e[r+1]-e[r],l=16*r,h=this.prevMatrix,f=!0,u=0;u<16;++u)h[u]=i[l++];for(var p=this.nextMatrix,u=0;u<16;++u)p[u]=i[l++],f=f&&h[u]===p[u];if(c<1e-6||f)for(var u=0;u<16;++u)n[u]=h[u];else o(n,h,p,(t-e[r])/c)}var m=this.computedUp;m[0]=n[1],m[1]=n[5],m[2]=n[6],d(m,m);var g=this.computedInverse;s(g,n);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;for(var b=this.computedCenter,x=Math.exp(this.computedRadius[0]),u=0;u<3;++u)b[u]=v[u]-n[2+4*u]*x}},m.idle=function(t){if(!(t1&&i(t[o[c-2]],t[o[c-1]],u)<=0;)c-=1,o.pop();for(o.push(l),c=s.length;c>1&&i(t[s[c-2]],t[s[c-1]],u)>=0;)c-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),h=0,n=0,f=o.length;n0;--d)r[h++]=s[d];return r}e.exports=n;var i=t("robust-orientation")[3]},{"robust-orientation":486}],431:[function(t,e,r){"use strict";function n(t,e){function r(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==g.alt,g.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==g.shift,g.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==g.control,g.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==g.meta,g.meta=!!t.metaKey),e}function n(t,n){var a=i.x(n),o=i.y(n);"buttons"in n&&(t=0|n.buttons),(t!==d||a!==p||o!==m||r(n))&&(d=0|t,p=a||0,m=o||0,e&&e(d,p,m,g))}function a(t){n(0,t)}function o(){(d||p||m||g.shift||g.alt||g.meta||g.control)&&(p=m=0,d=0,g.shift=g.alt=g.control=g.meta=!1,e&&e(0,0,0,g))}function s(t){r(t)&&e&&e(d,p,m,g)}function l(t){0===i.buttons(t)?n(0,t):n(d,t)}function u(t){n(d|i.buttons(t),t)}function c(t){n(d&~i.buttons(t),t)}function h(){v||(v=!0,t.addEventListener("mousemove",l),t.addEventListener("mousedown",u),t.addEventListener("mouseup",c),t.addEventListener("mouseleave",a),t.addEventListener("mouseenter",a),t.addEventListener("mouseout",a),t.addEventListener("mouseover",a),t.addEventListener("blur",o),t.addEventListener("keyup",s),t.addEventListener("keydown",s),t.addEventListener("keypress",s),t!==window&&(window.addEventListener("blur",o),window.addEventListener("keyup",s),window.addEventListener("keydown",s),window.addEventListener("keypress",s)))}function f(){v&&(v=!1,t.removeEventListener("mousemove",l),t.removeEventListener("mousedown",u),t.removeEventListener("mouseup",c),t.removeEventListener("mouseleave",a),t.removeEventListener("mouseenter",a),t.removeEventListener("mouseout",a),t.removeEventListener("mouseover",a),t.removeEventListener("blur",o),t.removeEventListener("keyup",s),t.removeEventListener("keydown",s),t.removeEventListener("keypress",s),t!==window&&(window.removeEventListener("blur",o),window.removeEventListener("keyup",s),window.removeEventListener("keydown",s),window.removeEventListener("keypress",s)))}e||(e=t,t=window);var d=0,p=0,m=0,g={shift:!1,alt:!1,control:!1,meta:!1},v=!1;h();var y={element:t};return Object.defineProperties(y,{enabled:{get:function(){return v},set:function(t){t?h():f()},enumerable:!0},buttons:{get:function(){return d},enumerable:!0},x:{get:function(){return p},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return g},enumerable:!0}}),y}e.exports=n;var i=t("mouse-event")},{"mouse-event":433}],432:[function(t,e,r){function n(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var n=t.clientX||0,a=t.clientY||0,o=i(e);return r[0]=n-o.left,r[1]=a-o.top,r}function i(t){return t===window||t===document||t===document.body?a:t.getBoundingClientRect()}var a={left:0,top:0};e.exports=n},{}],433:[function(t,e,r){"use strict";function n(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){var e=t.which;if(2===e)return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<=0;--e)L(e,0);for(var r=[],e=0;e0;_=_-1&m)x.push(w+"["+T+"+"+g(_)+"]");x.push(v(0));for(var _=0;_0){",f(x[t]),"=1;"),P(t-1,e|1<0&&G.push(s(U,x[V-1])+"*"+o(x[V-1])),N.push(d(U,x[V])+"=("+G.join("-")+")|0")}for(var U=0;U=0;--U)Y.push(o(x[U]));N.push(k+"=("+Y.join("*")+")|0",M+"=mallocUint32("+k+")",w+"=mallocUint32("+k+")",T+"=0"),N.push(p(0)+"=0");for(var V=1;V<1< 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var a=t.getters||[],o=new Array(n),s=0;s=0?o[s]=!0:o[s]=!1;return b(t.vertex,t.cell,t.phase,i,r,o)}var _=t("typedarray-pool");e.exports=x;var w="V",M="P",A="N",k="Q",T="X",S="T"},{"typedarray-pool":518}],436:[function(t,e,r){"use strict";var n=t("cwise/lib/wrapper")({args:["index","array","scalar"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_1_arg1_=_inline_1_arg2_.apply(void 0,_inline_1_arg0_)}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"cwise",blockSize:64});e.exports=function(t,e){return n(t,e),t}},{"cwise/lib/wrapper":103}],437:[function(t,e,r){"use strict";function n(t){if(t in l)return l[t];for(var e=[],r=0;r=0?s.push("0"):e.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),n.push("1"),o.push("s["+l+"]-2"));var u=".lo("+n.join()+").hi("+o.join()+")";if(0===n.length&&(u=""),r>0){a.push("if(1");for(var l=0;l=0||e.indexOf(-(l+1))>=0||a.push("&&s[",l,"]>2");a.push("){grad",r,"(src.pick(",s.join(),")",u);for(var l=0;l=0||e.indexOf(-(l+1))>=0||a.push(",dst.pick(",s.join(),",",l,")",u);a.push(");")}for(var l=0;l1){dst.set(",s.join(),",",c,",0.5*(src.get(",f.join(),")-src.get(",d.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):a.push("if(s[",c,"]>1){diff(",h,",src.pick(",f.join(),")",u,",src.pick(",d.join(),")",u,");}else{zero(",h,");};");break;case"mirror":0===r?a.push("dst.set(",s.join(),",",c,",0);"):a.push("zero(",h,");");break;case"wrap":var p=s.slice(),m=s.slice();e[l]<0?(p[c]="s["+c+"]-2",m[c]="0"):(p[c]="s["+c+"]-1",m[c]="1"),0===r?a.push("if(s[",c,"]>2){dst.set(",s.join(),",",c,",0.5*(src.get(",p.join(),")-src.get(",m.join(),")))}else{dst.set(",s.join(),",",c,",0)};"):a.push("if(s[",c,"]>2){diff(",h,",src.pick(",p.join(),")",u,",src.pick(",m.join(),")",u,");}else{zero(",h,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}r>0&&a.push("};")}(p)}}a.push("return dst;};return gradient");for(var m=["diff","zero"],g=[h,f],o=1;o<=i;++o)m.push("grad"+o),g.push(n(o));m.push(a.join(""));var v=Function.apply(void 0,m),r=v.apply(void 0,g);return l[e]=r,r}function a(t,e,r){if(Array.isArray(r)){if(r.length!==e.dimension)throw new Error("ndarray-gradient: invalid boundary conditions")}else r="string"==typeof r?o(e.dimension,r):o(e.dimension,"clamp");if(t.dimension!==e.dimension+1)throw new Error("ndarray-gradient: output dimension must be +1 input dimension");if(t.shape[e.dimension]!==e.dimension)throw new Error("ndarray-gradient: output shape must match input shape");for(var n=0;n>",rrshift:">>>"};!function(){for(var t in l){var e=l[t];r[t]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a"+e+"=b"},rvalue:!0,funcName:t+"eq"}),r[t+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a"+e+"=s"},rvalue:!0,funcName:t+"seq"})}}();var u={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in u){var e=u[t];r[t]=a({args:["array","array"],body:{args:["a","b"],body:"a="+e+"b"},funcName:t}),r[t+"eq"]=a({args:["array"],body:{args:["a"],body:"a="+e+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in c){var e=c[t];r[t]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a=a"+e+"b"},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+e+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var h=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=o({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=o({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=a({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=a({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=a({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=o({args:["array","array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":100}],441:[function(t,e,r){"use strict";var n=t("ndarray"),i=t("./doConvert.js");e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{"./doConvert.js":442,ndarray:446}],442:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":100}],443:[function(t,e,r){"use strict";function n(t){switch(t){case"uint8":return[l.mallocUint8,l.freeUint8];case"uint16":return[l.mallocUint16,l.freeUint16];case"uint32":return[l.mallocUint32,l.freeUint32];case"int8":return[l.mallocInt8,l.freeInt8];case"int16":return[l.mallocInt16,l.freeInt16];case"int32": +return[l.mallocInt32,l.freeInt32];case"float32":return[l.mallocFloat,l.freeFloat];case"float64":return[l.mallocDouble,l.freeDouble];default:return null}}function i(t){for(var e=[],r=0;r1){for(var h=[],f=1;f1){o.push("dptr=0;sptr=ptr");for(var f=t.length-1;f>=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"left){","dptr=0","sptr=cptr-s0");for(var f=1;fb){break __l}"].join(""));for(var f=t.length-1;f>=1;--f)o.push("sptr+=e"+f,"dptr+=f"+f,"}");o.push("dptr=cptr;sptr=cptr-s0");for(var f=t.length-1;f>=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"=0;--f){var d=t[f];0!==d&&o.push(["for(i",d,"=0;i",d,"left)&&("+r("cptr-s0")+">scratch)){",a("cptr",r("cptr-s0")),"cptr-=s0","}",a("cptr","scratch"));if(o.push("}"),t.length>1&&u&&o.push("free(scratch)"),o.push("} return "+s),u){var p=new Function("malloc","free",o.join("\n"));return p(u[0],u[1])}var p=new Function(o.join("\n"));return p()}function o(t,e,r){function a(t){return["(offset+",t,"*s0)"].join("")}function o(t){return"generic"===e?["data.get(",t,")"].join(""):["data[",t,"]"].join("")}function s(t,r){return"generic"===e?["data.set(",t,",",r,")"].join(""):["data[",t,"]=",r].join("")}function l(e,r,n){if(1===e.length)_.push("ptr0="+a(e[0]));else for(var i=0;i=0;--i){var o=t[i];0!==o&&_.push(["for(i",o,"=0;i",o,"1)for(var i=0;i1?_.push("ptr_shift+=d"+o):_.push("ptr0+=d"+o),_.push("}"))}}function c(e,r,n,i){if(1===r.length)_.push("ptr0="+a(r[0]));else{for(var o=0;o1)for(var o=0;o=1;--o)n&&_.push("pivot_ptr+=f"+o),r.length>1?_.push("ptr_shift+=e"+o):_.push("ptr0+=e"+o),_.push("}")}function h(){t.length>1&&A&&_.push("free(pivot1)","free(pivot2)")}function f(e,r){var n="el"+e,i="el"+r;if(t.length>1){var s="__l"+ ++k;c(s,[n,i],!1,["comp=",o("ptr0"),"-",o("ptr1"),"\n","if(comp>0){tmp0=",n,";",n,"=",i,";",i,"=tmp0;break ",s,"}\n","if(comp<0){break ",s,"}"].join(""))}else _.push(["if(",o(a(n)),">",o(a(i)),"){tmp0=",n,";",n,"=",i,";",i,"=tmp0}"].join(""))}function d(e,r){t.length>1?l([e,r],!1,s("ptr0",o("ptr1"))):_.push(s(a(e),o(a(r))))}function p(e,r,n){if(t.length>1){var i="__l"+ ++k;c(i,[r],!0,[e,"=",o("ptr0"),"-pivot",n,"[pivot_ptr]\n","if(",e,"!==0){break ",i,"}"].join(""))}else _.push([e,"=",o(a(r)),"-pivot",n].join(""))}function m(e,r){t.length>1?l([e,r],!1,["tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1","tmp")].join("")):_.push(["ptr0=",a(e),"\n","ptr1=",a(r),"\n","tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1","tmp")].join(""))}function g(e,r,n){t.length>1?(l([e,r,n],!1,["tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1",o("ptr2")),"\n",s("ptr2","tmp")].join("")),_.push("++"+r,"--"+n)):_.push(["ptr0=",a(e),"\n","ptr1=",a(r),"\n","ptr2=",a(n),"\n","++",r,"\n","--",n,"\n","tmp=",o("ptr0"),"\n",s("ptr0",o("ptr1")),"\n",s("ptr1",o("ptr2")),"\n",s("ptr2","tmp")].join(""))}function v(t,e){m(t,e),_.push("--"+e)}function y(e,r,n){t.length>1?l([e,r],!0,[s("ptr0",o("ptr1")),"\n",s("ptr1",["pivot",n,"[pivot_ptr]"].join(""))].join("")):_.push(s(a(e),o(a(r))),s(a(r),"pivot"+n))}function b(e,r){_.push(["if((",r,"-",e,")<=",u,"){\n","insertionSort(",e,",",r,",data,offset,",i(t.length).join(","),")\n","}else{\n",w,"(",e,",",r,",data,offset,",i(t.length).join(","),")\n","}"].join(""))}function x(e,r,n){t.length>1?(_.push(["__l",++k,":while(true){"].join("")),l([e],!0,["if(",o("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",k,"}"].join("")),_.push(n,"}")):_.push(["while(",o(a(e)),"===pivot",r,"){",n,"}"].join(""))}var _=["'use strict'"],w=["ndarrayQuickSort",t.join("d"),e].join(""),M=["left","right","data","offset"].concat(i(t.length)),A=n(e),k=0;_.push(["function ",w,"(",M.join(","),"){"].join(""));var T=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(t.length>1){for(var S=[],E=1;E1?l(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",o("ptr1"),"\n","pivot2[pivot_ptr]=",o("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",o("ptr0"),"\n","y=",o("ptr2"),"\n","z=",o("ptr4"),"\n",s("ptr5","x"),"\n",s("ptr6","y"),"\n",s("ptr7","z")].join("")):_.push(["pivot1=",o(a("el2")),"\n","pivot2=",o(a("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",o(a("el1")),"\n","y=",o(a("el3")),"\n","z=",o(a("el5")),"\n",s(a("index1"),"x"),"\n",s(a("index3"),"y"),"\n",s(a("index5"),"z")].join("")),d("index2","left"),d("index4","right"),_.push("if(pivots_are_equal){"),_.push("for(k=less;k<=great;++k){"),p("comp","k",1),_.push("if(comp===0){continue}"),_.push("if(comp<0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),_.push("while(true){"),p("comp","great",1),_.push("if(comp>0){"),_.push("great--"),_.push("}else if(comp<0){"),g("k","less","great"),_.push("break"),_.push("}else{"),v("k","great"),_.push("break"),_.push("}"),_.push("}"),_.push("}"),_.push("}"),_.push("}else{"),_.push("for(k=less;k<=great;++k){"),p("comp_pivot1","k",1),_.push("if(comp_pivot1<0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),p("comp_pivot2","k",2),_.push("if(comp_pivot2>0){"),_.push("while(true){"),p("comp","great",2),_.push("if(comp>0){"),_.push("if(--greatindex5){"),x("less",1,"++less"),x("great",2,"--great"),_.push("for(k=less;k<=great;++k){"),p("comp_pivot1","k",1),_.push("if(comp_pivot1===0){"),_.push("if(k!==less){"),m("k","less"),_.push("}"),_.push("++less"),_.push("}else{"),p("comp_pivot2","k",2),_.push("if(comp_pivot2===0){"),_.push("while(true){"),p("comp","great",2),_.push("if(comp===0){"),_.push("if(--great1&&A){var L=new Function("insertionSort","malloc","free",_.join("\n"));return L(r,A[0],A[1])}var L=new Function("insertionSort",_.join("\n"));return L(r)}function s(t,e){var r=["'use strict'"],n=["ndarraySortWrapper",t.join("d"),e].join(""),s=["array"];r.push(["function ",n,"(",s.join(","),"){"].join(""));for(var l=["data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride"],c=0;c0?l.push(["d",g,"=s",g,"-d",p,"*n",p].join("")):l.push(["d",g,"=s",g].join("")),p=g);var d=t.length-1-c;0!==d&&(m>0?l.push(["e",d,"=s",d,"-e",m,"*n",m,",f",d,"=",h[d],"-f",m,"*n",m].join("")):l.push(["e",d,"=s",d,",f",d,"=",h[d]].join("")),m=d)}r.push("var "+l.join(","));var v=["0","n0-1","data","offset"].concat(i(t.length));r.push(["if(n0<=",u,"){","insertionSort(",v.join(","),")}else{","quickSort(",v.join(","),")}"].join("")),r.push("}return "+n);var y=new Function("insertionSort","quickSort",r.join("\n")),b=a(t,e);return y(b,o(t,e,b))}var l=t("typedarray-pool"),u=32;e.exports=s},{"typedarray-pool":518}],444:[function(t,e,r){"use strict";function n(t){var e=t.order,r=t.dtype,n=[e,r],o=n.join(":"),s=a[o];return s||(a[o]=s=i(e,r)),s(t),t}var i=t("./lib/compile_sort.js"),a={};e.exports=n},{"./lib/compile_sort.js":443}],445:[function(t,e,r){"use strict";var n=t("ndarray-linear-interpolate"),i=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=new Array(_inline_9_arg4_)}",args:[{name:"_inline_9_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg2_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_9_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_.apply(void 0,this_warped)}",args:[{name:"_inline_10_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_10_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg4_",lvalue:!1,rvalue:!1,count:0}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warpND",blockSize:64}),a=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0])}",args:[{name:"_inline_13_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_13_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp1D",blockSize:64}),o=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_16_arg2_(this_warped,_inline_16_arg0_),_inline_16_arg1_=_inline_16_arg3_(_inline_16_arg4_,this_warped[0],this_warped[1])}",args:[{name:"_inline_16_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_16_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp2D",blockSize:64}),s=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_19_arg2_(this_warped,_inline_19_arg0_),_inline_19_arg1_=_inline_19_arg3_(_inline_19_arg4_,this_warped[0],this_warped[1],this_warped[2])}",args:[{name:"_inline_19_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_19_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_19_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_19_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_19_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp3D",blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:a(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:i(t,r,n.bind(void 0,e),e.shape.length)}return t}},{"cwise/lib/wrapper":103,"ndarray-linear-interpolate":439}],446:[function(t,e,r){function n(t,e){return t[0]-e[0]}function i(){var t,e=this.stride,r=new Array(e.length);for(t=0;tMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&a.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):a.push("ORDER})")),a.push("proto.set=function "+r+"_set("+u.join(",")+",v){"),n?a.push("return this.data.set("+c+",v)}"):a.push("return this.data["+c+"]=v}"),a.push("proto.get=function "+r+"_get("+u.join(",")+"){"),n?a.push("return this.data.get("+c+")}"):a.push("return this.data["+c+"]}"),a.push("proto.index=function "+r+"_index(",u.join(),"){return "+c+"}"),a.push("proto.hi=function "+r+"_hi("+u.join(",")+"){return new "+r+"(this.data,"+s.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+s.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var p=s.map(function(t){return"a"+t+"=this.shape["+t+"]"}),m=s.map(function(t){return"c"+t+"=this.stride["+t+"]"});a.push("proto.lo=function "+r+"_lo("+u.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+m.join(","));for(var g=0;g=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");a.push("return new "+r+"(this.data,"+s.map(function(t){return"a"+t}).join(",")+","+s.map(function(t){return"c"+t}).join(",")+",b)}"),a.push("proto.step=function "+r+"_step("+u.join(",")+"){var "+s.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+s.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var g=0;g=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+s.map(function(t){return"shape["+t+"]"}).join(",")+","+s.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}");var o=new Function("CTOR_LIST","ORDER",a.join("\n"));return o(h[t],i)}function o(t){if(u(t))return"buffer";if(c)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(t)?"array":"generic"}function s(t,e,r,n){if(void 0===t){var i=h.array[0];return i([])}"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var s=e.length;if(void 0===r){r=new Array(s);for(var l=s-1,u=1;l>=0;--l)r[l]=u,u*=e[l]}if(void 0===n){n=0;for(var l=0;lt==t>0?n===o?(r+=1,n=0):n+=1:0===n?(n=o,r-=1):n-=1,i.pack(n,r)}var i=t("double-bits"),a=Math.pow(2,-1074),o=-1>>>0;e.exports=n},{"double-bits":106}],448:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa)for(var x=i[u],_=1/Math.sqrt(g*y),b=0;b<3;++b){var w=(b+1)%3,M=(b+2)%3;x[b]+=_*(v[w]*m[M]-v[M]*m[w])}}for(var o=0;oa)for(var _=1/Math.sqrt(A),b=0;b<3;++b)x[b]*=_;else for(var b=0;b<3;++b)x[b]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(d):0;for(var u=0;u<3;++u)f[u]*=d;i[o]=f}return i}},{}],449:[function(t,e,r){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,l=n(t),u=1;u0){var h=Math.sqrt(c+1);t[0]=.5*(o-l)/h,t[1]=.5*(s-n)/h,t[2]=.5*(r-a)/h,t[3]=.5*h}else{var f=Math.max(e,a,u),h=Math.sqrt(2*f-c+1);e>=f?(t[0]=.5*h,t[1]=.5*(i+r)/h,t[2]=.5*(s+n)/h,t[3]=.5*(o-l)/h):a>=f?(t[0]=.5*(r+i)/h,t[1]=.5*h,t[2]=.5*(l+o)/h,t[3]=.5*(s-n)/h):(t[0]=.5*(n+s)/h,t[1]=.5*(o+l)/h,t[2]=.5*h,t[3]=.5*(r-i)/h)}return t}e.exports=n},{}],451:[function(t,e,r){"use strict";function n(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function i(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function a(t,e){var r=e[0],n=e[1],a=e[2],o=e[3],s=i(r,n,a,o);s>1e-6?(t[0]=r/s,t[1]=n/s,t[2]=a/s,t[3]=o/s):(t[0]=t[1]=t[2]=0,t[3]=1)}function o(t,e,r){this.radius=l([r]),this.center=l(e),this.rotation=l(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}function s(t){t=t||{};var e=t.center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),r=[].slice.call(r,0,4),a(r,r);var i=new o(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i}e.exports=s;var l=t("filtered-vector"),u=t("gl-mat4/lookAt"),c=t("gl-mat4/fromQuat"),h=t("gl-mat4/invert"),f=t("./lib/quatFromFrame"),d=o.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;a(e,e);var r=this.computedMatrix;c(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var u=0,h=0;h<3;++h)u+=r[l+4*h]*i[h];r[12+l]=-u}},d.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},d.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},d.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},d.pan=function(t,e,r,i){e=e||0,r=r||0,i=i||0,this.recalcMatrix(t);var a=this.computedMatrix,o=a[1],s=a[5],l=a[9],u=n(o,s,l);o/=u,s/=u,l/=u;var c=a[0],h=a[4],f=a[8],d=c*o+h*s+f*l;c-=o*d,h-=s*d,f-=l*d;var p=n(c,h,f);c/=p,h/=p,f/=p;var m=a[2],g=a[6],v=a[10],y=m*o+g*s+v*l,b=m*c+g*h+v*f;m-=y*o+b*c,g-=y*s+b*h,v-=y*l+b*f;var x=n(m,g,v);m/=x,g/=x,v/=x;var _=c*e+o*r,w=h*e+s*r,M=f*e+l*r;this.center.move(t,_,w,M);var A=Math.exp(this.computedRadius[0]);A=Math.max(1e-4,A+i),this.radius.set(t,Math.log(A))},d.rotate=function(t,e,r,a){this.recalcMatrix(t),e=e||0,r=r||0;var o=this.computedMatrix,s=o[0],l=o[4],u=o[8],c=o[1],h=o[5],f=o[9],d=o[2],p=o[6],m=o[10],g=e*s+r*c,v=e*l+r*h,y=e*u+r*f,b=-(p*y-m*v),x=-(m*g-d*y),_=-(d*v-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(b,2)-Math.pow(x,2)-Math.pow(_,2))),M=i(b,x,_,w);M>1e-6?(b/=M,x/=M,_/=M,w/=M):(b=x=_=0,w=1);var A=this.computedRotation,k=A[0],T=A[1],S=A[2],E=A[3],L=k*w+E*b+T*_-S*x,C=T*w+E*x+S*b-k*_,D=S*w+E*_+k*x-T*b,z=E*w-k*b-T*x-S*_;if(a){b=d,x=p,_=m;var I=Math.sin(a)/n(b,x,_);b*=I,x*=I,_*=I,w=Math.cos(e),L=L*w+z*b+C*_-D*x,C=C*w+z*x+D*b-L*_,D=D*w+z*_+L*x-C*b,z=z*w-L*b-C*x-D*_}var P=i(L,C,D,z);P>1e-6?(L/=P,C/=P,D/=P,z/=P):(L=C=D=0,z=1),this.rotation.set(t,L,C,D,z)},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var i=this.computedMatrix;u(i,e,r,n);var o=this.computedRotation;f(o,i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10]),a(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var s=0,l=0;l<3;++l)s+=Math.pow(r[l]-e[l],2);this.radius.set(t,.5*Math.log(Math.max(s,1e-6))),this.center.set(t,r[0],r[1],r[2])},d.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},d.setMatrix=function(t,e){var r=this.computedRotation;f(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),a(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;h(n,e);var i=n[15];if(Math.abs(i)>1e-6){var o=n[12]/i,s=n[13]/i,l=n[14]/i;this.recalcMatrix(t);var u=Math.exp(this.computedRadius[0]);this.center.set(t,o-n[2]*u,s-n[6]*u,l-n[10]*u),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},d.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},d.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},d.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},d.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},d.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{"./lib/quatFromFrame":450,"filtered-vector":115,"gl-mat4/fromQuat":159,"gl-mat4/invert":162,"gl-mat4/lookAt":163}],452:[function(t,e,r){"use strict";var n=t("repeat-string");e.exports=function(t,e,r){return r=void 0!==r?r+"":" ",n(r,e)+t}},{"repeat-string":478}],453:[function(t,e,r){e.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},{}],454:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,i="/"===o.charAt(0))}return r=e(n(r.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(t){var i=r.isAbsolute(t),a="/"===o(t,-1);return t=e(n(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),a=n(e.split("/")),o=Math.min(i.length,a.length),s=o,l=0;l55295&&e<57344){if(!r){e>56319||a+1===n?i.push(239,191,189):r=e;continue}if(e<56320){i.push(239,191,189),r=e;continue}e=r-55296<<10|e-56320|65536,r=null}else r&&(i.push(239,191,189),r=null);e<128?i.push(e):e<2048?i.push(e>>6|192,63&e|128):e<65536?i.push(e>>12|224,e>>6&63|128,63&e|128):i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}return i}e.exports=n;var a,o,s,l=t("ieee754");a={readUInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},writeUInt32LE:function(t,e){this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24},readInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+(this[t+3]<<24)},readFloatLE:function(t){return l.read(this,t,!0,23,4)},readDoubleLE:function(t){return l.read(this,t,!0,52,8)},writeFloatLE:function(t,e){return l.write(this,t,e,!0,23,4)},writeDoubleLE:function(t,e){return l.write(this,t,e,!0,52,8)},toString:function(t,e,r){var n="",i="";e=e||0,r=Math.min(this.length,r||this.length);for(var a=e;a=1;){if(e.pos>=r)throw new Error("Given varint doesn't fit into 10 bytes");var n=255&t;e.buf[e.pos++]=n|(t>=128?128:0),t/=128}}function o(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function s(t,e){for(var r=0;r>3,a=this.pos;t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=this.buf.readUInt32LE(this.pos);return this.pos+=4,t},readSFixed32:function(){var t=this.buf.readInt32LE(this.pos);return this.pos+=4,t},readFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+4294967296*this.buf.readUInt32LE(this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+4294967296*this.buf.readInt32LE(this.pos+4);return this.pos+=8,t},readFloat:function(){var t=this.buf.readFloatLE(this.pos);return this.pos+=4,t},readDouble:function(){var t=this.buf.readDoubleLE(this.pos);return this.pos+=8,t},readVarint:function(){var t,e,r=this.buf;return e=r[this.pos++],t=127&e,e<128?t:(e=r[this.pos++],t|=(127&e)<<7,e<128?t:(e=r[this.pos++],t|=(127&e)<<14,e<128?t:(e=r[this.pos++],t|=(127&e)<<21,e<128?t:i(t,this))))},readVarint64:function(){var t=this.pos,e=this.readVarint();if(e127;);else if(e===n.Bytes)this.pos=this.readVarint()+this.pos;else if(e===n.Fixed32)this.pos+=4;else{if(e!==n.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455)return void a(t,this);this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127)))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t);var e=g.byteLength(t);this.writeVarint(e),this.realloc(e),this.buf.write(t,this.pos),this.pos+=e},writeFloat:function(t){this.realloc(4),this.buf.writeFloatLE(t,this.pos),this.pos+=4},writeDouble:function(t){this.realloc(8),this.buf.writeDoubleLE(t,this.pos),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&o(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,n.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,s,e)},writePackedSVarint:function(t,e){this.writeMessage(t,l,e)},writePackedBoolean:function(t,e){this.writeMessage(t,h,e)},writePackedFloat:function(t,e){this.writeMessage(t,u,e)},writePackedDouble:function(t,e){this.writeMessage(t,c,e)},writePackedFixed32:function(t,e){this.writeMessage(t,f,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,d,e)},writePackedFixed64:function(t,e){this.writeMessage(t,p,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,n.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,n.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,n.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,n.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./buffer":455}],457:[function(t,e,r){"use strict";function n(t){var e=t.length;if(e0;--i)n=l[i],r=s[i],s[i]=s[n],s[n]=r,l[i]=l[r],l[r]=n,u=(u+r)*i;return a.freeUint32(l),a.freeUint32(s),u}function i(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}r=r||new Array(t);var n,i,a,o=1;for(r[0]=0,a=1;a0;--a)n=e/o|0,e=e-n*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}var a=t("typedarray-pool"),o=t("invert-permutation");r.rank=n,r.unrank=i},{"invert-permutation":272,"typedarray-pool":518}],459:[function(t,e,r){"use strict";function n(t,e){function r(t,e){var r=s[e][t[e]];r.splice(r.indexOf(t),1)}function n(t,n,a){for(var o,l,u,c=0;c<2;++c)if(s[c][n].length>0){o=s[c][n][0],u=c;break}l=o[1^u];for(var h=0;h<2;++h)for(var f=s[h][n],d=0;d0&&(o=p,l=m,u=h)}return a?l:(o&&r(o,u),l)}for(var a=0|e.length,o=t.length,s=[new Array(a),new Array(a)],l=0;l0;){var d=(s[0][l].length,function(t,a){var o=s[a][t][0],l=[t];r(o,a);for(var u=o[1^a];;){for(;u!==t;)l.push(u),u=n(l[l.length-2],u,!1);if(s[0][t].length+s[1][t].length===0)break;var c=l[l.length-1],h=t,f=l[1],d=n(c,h,!0);if(i(e[c],e[h],e[f],e[d])<0)break;l.push(t),u=n(c,h)}return l}(l,h));!function(t,e){return e[1]===e[e.length-1]}(f,d)?(f.length>0&&c.push(f),f=d):f.push.apply(f,d)}f.length>0&&c.push(f)}return c}e.exports=n;var i=t("compare-angle")},{"compare-angle":90}],460:[function(t,e,r){"use strict";function n(t,e){for(var r=i(t,e.length),n=new Array(e.length),a=new Array(e.length),o=[],s=0;s0;){var u=o.pop();n[u]=!1;for(var c=r[u],s=0;s0}function a(t){for(var e=t.length,r=0;r0;){var U=N.pop(),V=z[U];h(V,function(t,e){return t-e});var H,q=V.length,G=B[U];if(0===G){var T=v[U];H=[T]}for(var g=0;g=0)&&(B[Y]=1^G,N.push(Y),0===G)){var T=v[Y];a(T)||(T.reverse(),H.push(T))}}0===G&&d.push(H)}return d}e.exports=a;var o=t("edges-to-adjacency-list"),s=t("planar-dual"),l=t("point-in-big-polygon"),u=t("two-product"),c=t("robust-sum"),h=t("uniq"),f=t("./lib/trim-leaves")},{"./lib/trim-leaves":460,"edges-to-adjacency-list":109,"planar-dual":459,"point-in-big-polygon":463,"robust-sum":491,"two-product":516,uniq:520}],462:[function(t,e,r){"use strict";function n(t,e){this.x=t,this.y=e}e.exports=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{}],463:[function(t,e,r){function n(){return!0}function i(t){return function(e,r){var i=t[e];return!!i&&!!i.queryPoint(r,n)}}function a(t){for(var e={},r=0;r0&&e[n]===r[0]))return 1;i=t[n-1]}for(var a=1;i;){var o=i.key,s=h(r,o[0],o[1]);if(o[0][0]0))return 0;a=-1,i=i.right}else if(s>0)i=i.left;else{if(!(s<0))return 0;a=1,i=i.right}}return a}}function s(t){return 1}function l(t){return function(e){return t(e[0],e[1])?0:1}}function u(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}function c(t){for(var e=t.length,r=[],n=[],i=0;i=u?(x=1,y=u+2*f+p):(x=-f/u,y=f*x+p)):(x=0,d>=0?(_=0,y=p):-d>=h?(_=1,y=h+2*d+p):(_=-d/h,y=d*_+p));else if(_<0)_=0,f>=0?(x=0,y=p):-f>=u?(x=1,y=u+2*f+p):(x=-f/u,y=f*x+p);else{var w=1/b;x*=w,_*=w,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p}else{var M,A,k,T;x<0?(M=c+f,A=h+d,A>M?(k=A-M,T=u-2*c+h,k>=T?(x=1,_=0,y=u+2*f+p):(x=k/T,_=1-x,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)):(x=0,A<=0?(_=1,y=h+2*d+p):d>=0?(_=0,y=p):(_=-d/h,y=d*_+p))):_<0?(M=c+d,A=u+f,A>M?(k=A-M,T=u-2*c+h,k>=T?(_=1,x=0,y=h+2*d+p):(_=k/T,x=1-_,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)):(_=0,A<=0?(x=1,y=u+2*f+p):f>=0?(x=0,y=p):(x=-f/u,y=f*x+p))):(k=h+d-c-f,k<=0?(x=0,_=1,y=h+2*d+p):(T=u-2*c+h,k>=T?(x=1,_=0,y=u+2*f+p):(x=k/T,_=1-x,y=x*(u*x+c*_+2*f)+_*(c*x+h*_+2*d)+p)))}for(var S=1-x-_,l=0;l1)for(var r=1;r1&&(n=r[0]+"@",t=r[1]),t=t.replace(I,"."),n+o(t.split("."),e).join(".")}function l(t){for(var e,r,n=[],i=0,a=t.length;i=55296&&e<=56319&&i65535&&(t-=65536,e+=j(t>>>10&1023|55296),t=56320|1023&t),e+=j(t)}).join("")}function c(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:M}function h(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,r){var n=0;for(t=r?R(t/S):t>>1,t+=R(t/e);t>O*k>>1;n+=M)t=R(t/O);return R(n+(O+1)*t/(t+T))}function d(t){var e,r,n,i,o,s,l,h,d,p,m=[],g=t.length,v=0,y=L,b=E;for(r=t.lastIndexOf(C),r<0&&(r=0),n=0;n=128&&a("not-basic"),m.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=g&&a("invalid-input"),h=c(t.charCodeAt(i++)),(h>=M||h>R((w-v)/s))&&a("overflow"),v+=h*s,d=l<=b?A:l>=b+k?k:l-b,!(hR(w/p)&&a("overflow"),s*=p;e=m.length+1,b=f(v-o,e,0==o),R(v/e)>w-y&&a("overflow"),y+=R(v/e),v%=e,m.splice(v++,0,y)}return u(m)}function p(t){var e,r,n,i,o,s,u,c,d,p,m,g,v,y,b,x=[];for(t=l(t),g=t.length,e=L,r=0,o=E,s=0;s=e&&mR((w-r)/v)&&a("overflow"),r+=(u-e)*v,e=u,s=0;sw&&a("overflow"),m==e){for(c=r,d=M;p=d<=o?A:d>=o+k?k:d-o,!(c= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=M-A,R=Math.floor,j=String.fromCharCode;if(x={version:"1.4.1",ucs2:{decode:l,encode:u},decode:d,encode:p,toASCII:g,toUnicode:m},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return x});else if(v&&y)if(r.exports==v)y.exports=x;else for(_ in x)x.hasOwnProperty(_)&&(v[_]=x[_]);else i.punycode=x}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],467:[function(t,e,r){e.exports=t("gl-quat/slerp")},{"gl-quat/slerp":212}],468:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,a){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;t=t.split(e);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var l=t.length;s>0&&l>s&&(l=s);for(var u=0;u=0?(c=p.substr(0,m),h=p.substr(m+1)):(c=p,h=""),f=decodeURIComponent(c),d=decodeURIComponent(h),n(o,f)?i(o[f])?o[f].push(d):o[f]=[o[f],d]:o[f]=d}return o};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],469:[function(t,e,r){"use strict";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;nr;){if(o-r>600){var l=o-r+1,u=e-r+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1);n(t,e,Math.max(r,Math.floor(e-u*h/l+f)),Math.min(o,Math.floor(e+(l-u)*h/l+f)),s)}var d=t[e],p=r,m=o;for(i(t,r,e),s(t[o],d)>0&&i(t,r,o);p0;)m--}0===s(t[r],d)?i(t,r,m):(m++,i(t,m,o)),m<=e&&(r=m+1),e<=m&&(o=m-1)}}function i(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function a(t,e){return te?1:0}e.exports=n},{}],472:[function(t,e,r){"use strict";function n(t,e){for(var r=t.length,n=new Array(r),a=0;a0){var u=t[r-1];if(0===i(s,u)&&o(u)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}var i=t("compare-cell"),a=t("compare-oriented-cell"),o=t("cell-orientation");e.exports=n},{"cell-orientation":75,"compare-cell":91,"compare-oriented-cell":92}],477:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.createREGL=i()}(this,function(){"use strict";function t(t){return"undefined"!=typeof btoa?btoa(t):"base64:"+t}function e(t){var e=new Error("(regl) "+t);throw console.error(e),e}function r(t,r){t||e(r)}function n(t){return t?": "+t:""}function i(t,r,i){t in r||e("unknown parameter ("+t+")"+n(i)+". possible values: "+Object.keys(r).join())}function a(t,r){Qt(t)||e("invalid parameter type"+n(r)+". must be a typed array")}function o(t,r,i){typeof t!==r&&e("invalid parameter type"+n(i)+". expected "+r+", got "+typeof t)}function s(t,r){t>=0&&(0|t)===t||e("invalid parameter type, ("+t+")"+n(r)+". must be a nonnegative integer")}function l(t,r,i){r.indexOf(t)<0&&e("invalid value"+n(i)+". must be one of: "+r)}function u(t){Object.keys(t).forEach(function(t){te.indexOf(t)<0&&e('invalid regl constructor argument "'+t+'". must be one of '+te)})}function c(t,e){for(t+="";t.length0&&e.push(new d("unknown",0,t))}}),e}function y(t,e){e.forEach(function(e){var r=t[e.file];if(r){var n=r.index[e.line];if(n)return n.errors.push(e),void(r.hasErrors=!0)}t.unknown.hasErrors=!0,t.unknown.lines[0].errors.push(e)})}function b(t,e,n,i,a){if(!t.getShaderParameter(e,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(e),s=i===t.FRAGMENT_SHADER?"fragment":"vertex";T(n,"string",s+" shader source must be a string",a);var l=g(n,a),u=v(o);y(l,u),Object.keys(l).forEach(function(t){function e(t,e){n.push(t),i.push(e||"")}var r=l[t];if(r.hasErrors){var n=[""],i=[""];e("file number "+t+": "+r.name+"\n","color:red;text-decoration:underline;font-weight:bold"),r.lines.forEach(function(t){if(t.errors.length>0){e(c(t.number,4)+"| ","background-color:yellow; font-weight:bold"),e(t.line+"\n","color:red; background-color:yellow; font-weight:bold");var r=0;t.errors.forEach(function(n){var i=n.message,a=/^\s*\'(.*)\'\s*\:\s*(.*)$/.exec(i);if(a){var o=a[1];switch(i=a[2],o){case"assign":o="="}r=Math.max(t.line.indexOf(o,r),0)}else r=0;e(c("| ",6)),e(c("^^^",r+3)+"\n","font-weight:bold"),e(c("| ",6)),e(i+"\n","font-weight:bold")}),e(c("| ",6)+"\n")}else e(c(t.number,4)+"| "),e(t.line+"\n","color:red")}),"undefined"!=typeof document?(i[0]=n.join("%c"),console.log.apply(console,i)):console.log(n.join(""))}}),r.raise("Error compiling "+s+" shader, "+l[0].name)}}function x(t,e,n,i,a){if(!t.getProgramParameter(e,t.LINK_STATUS)){var o=t.getProgramInfoLog(e),s=g(n,a),l=g(i,a),u='Error linking program with vertex shader, "'+l[0].name+'", and fragment shader "'+s[0].name+'"';"undefined"!=typeof document?console.log("%c"+u+"\n%c"+o,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(u+"\n"+o),r.raise(u)}}function _(t){t._commandRef=p()}function w(t,e,r,n){function i(t){return t?n.id(t):0}function a(t,e){Object.keys(e).forEach(function(e){t[n.id(e)]=!0})}_(t),t._fragId=i(t.static.frag),t._vertId=i(t.static.vert);var o=t._uniformSet={};a(o,e.static),a(o,e.dynamic);var s=t._attributeSet={};a(s,r.static),a(s,r.dynamic),t._hasCount="count"in t.static||"count"in t.dynamic||"elements"in t.static||"elements"in t.dynamic}function M(t,r){var n=m();e(t+" in command "+(r||p())+("unknown"===n?"":" called from "+n))}function A(t,e,r){t||M(e,r||p())}function k(t,e,r,i){t in e||M("unknown parameter ("+t+")"+n(r)+". possible values: "+Object.keys(e).join(),i||p())}function T(t,e,r,i){typeof t!==e&&M("invalid parameter type"+n(r)+". expected "+e+", got "+typeof t,i||p())}function S(t){t()}function E(t,e,r){t.texture?l(t.texture._texture.internalformat,e,"unsupported texture format for attachment"):l(t.renderbuffer._renderbuffer.format,r,"unsupported renderbuffer format for attachment")}function L(t,e){return t===ue||t===le||t===ce?2:t===he?4:fe[t]*e}function C(t){return!(t&t-1||!t)}function D(t,e,n){var i,a=e.width,o=e.height,s=e.channels;r(a>0&&a<=n.maxTextureSize&&o>0&&o<=n.maxTextureSize,"invalid texture shape"),t.wrapS===ee&&t.wrapT===ee||r(C(a)&&C(o),"incompatible wrap mode for texture, both width and height must be power of 2"),1===e.mipmask?1!==a&&1!==o&&r(t.minFilter!==ne&&t.minFilter!==ae&&t.minFilter!==ie&&t.minFilter!==oe,"min filter requires mipmap"):(r(C(a)&&C(o),"texture must be a square power of 2 to support mipmapping"),r(e.mipmask===(a<<1)-1,"missing or incomplete mipmap data")),e.type===se&&(n.extensions.indexOf("oes_texture_float_linear")<0&&r(t.minFilter===re&&t.magFilter===re,"filter not supported, must enable oes_texture_float_linear"),r(!t.genMipmaps,"mipmap generation not supported with float textures"));var l=e.images;for(i=0;i<16;++i)if(l[i]){var u=a>>i,c=o>>i;r(e.mipmask&1<0&&a<=i.maxTextureSize&&o>0&&o<=i.maxTextureSize,"invalid texture shape"),r(a===o,"cube map must be square"),r(e.wrapS===ee&&e.wrapT===ee,"wrap mode not supported by cube map");for(var l=0;l>h,p=o>>h;r(u.mipmask&1<1&&e===r&&('"'===e||"'"===e))return['"'+P(t.substr(1,t.length-2))+'"'];var n=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t);if(n)return O(t.substr(0,n.index)).concat(O(n[1])).concat(O(t.substr(n.index+n[0].length)));var i=t.split(".");if(1===i.length)return['"'+P(t)+'"'];for(var a=[],o=0;o0,"invalid pixel ratio"))):de.raise("invalid arguments to regl"),e&&("canvas"===e.nodeName.toLowerCase()?n=e:r=e),!i){if(!n){de("undefined"!=typeof document,"must manually specify webgl context outside of DOM environments");var d=U(r||document.body,h,u);if(!d)return null;n=d.canvas,f=d.onDestroy}i=V(n,o)}return i?{gl:i,canvas:n,container:r,extensions:s,optionalExtensions:l,pixelRatio:u,profile:c,onDone:h,onDestroy:f}:(f(),h("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function X(t,e){function r(e){de.type(e,"string","extension name must be string");var r,i=e.toLowerCase();try{r=n[i]=t.getExtension(i)}catch(t){}return!!r}for(var n={},i=0;i65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1}function $(t){var e=K(t),r=Ee[Q(e)>>2];return r.length>0?r.pop():new ArrayBuffer(e)}function tt(t){Ee[Q(t.byteLength)>>2].push(t)}function et(t,e){var r=null;switch(t){case _e:r=new Int8Array($(e),0,e);break;case we:r=new Uint8Array($(e),0,e);break;case Me:r=new Int16Array($(2*e),0,e);break;case Ae:r=new Uint16Array($(2*e),0,e);break;case ke:r=new Int32Array($(4*e),0,e);break;case Te:r=new Uint32Array($(4*e),0,e);break;case Se:r=new Float32Array($(4*e),0,e);break;default:return null}return r.length!==e?r.subarray(0,e):r}function rt(t){tt(t.buffer)}function nt(t,e,r){for(var n=0;n0){var l;if(Array.isArray(e[0])){s=Pe(e);for(var u=1,c=1;c0)if("number"==typeof t[0]){var i=Le.allocType(p.dtype,t.length);ct(i,t),h(i,n),Le.freeType(i)}else if(Array.isArray(t[0])||Qt(t[0])){r=Pe(t);var a=Ie(t,r,p.dtype);h(a,n),Le.freeType(a)}else de.raise("invalid buffer data")}else if(Qt(t))h(t,n);else if(Z(t)){r=t.shape;var o=t.stride,s=0,l=0,u=0,f=0;1===r.length?(s=r[0],l=1,u=o[0],f=0):2===r.length?(s=r[0],l=r[1],u=o[0],f=o[1]):de.raise("invalid shape");var d=Array.isArray(t.data)?p.dtype:ut(t.data),m=Le.allocType(d,s*l);ht(m,t.data,s,l,u,f,t.offset),h(m,n),Le.freeType(m)}else de.raise("invalid data for buffer subdata");return c}e.bufferCount++;var p=new n(a);return f[p.id]=p,o||c(i),c._reglType="buffer",c._buffer=p,c.subdata=d,r.profile&&(c.stats=p.stats),c.destroy=function(){l(p)},c}function c(){xe(f).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})}var h=0,f={};n.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},n.prototype.destroy=function(){l(this)};var d=[];return r.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:u,createStream:i,destroyStream:a,clear:function(){xe(f).forEach(l),d.forEach(l)},getBuffer:function(t){return t&&t._buffer instanceof n?t._buffer:null},restore:c,_initBuffer:s}}function dt(t,e,r,n){function i(t){this.id=h++,c[this.id]=this,this.buffer=t,this.primType=He,this.vertCount=0,this.type=0}function a(t){var e=d.pop();return e||(e=new i(r.create(null,Je,!0,!1)._buffer)),s(e,t,Ke,-1,-1,0,0),e}function o(t){d.push(t)}function s(n,i,a,o,s,l,u){if(n.buffer.bind(),i){var c=u;u||Qt(i)&&(!Z(i)||Qt(i.data))||(c=e.oes_element_index_uint?Ze:We),r._initBuffer(n.buffer,i,a,c,3)}else t.bufferData(Je,l,a),n.buffer.dtype=h||Ge,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l;var h=u;if(!u){switch(n.buffer.dtype){case Ge:case qe:h=Ge;break;case We:case Ye:h=We;break;case Ze:case Xe:h=Ze;break;default:de.raise("unsupported type for element array")}n.buffer.dtype=h}n.type=h,de(h!==Ze||!!e.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var f=s;f<0&&(f=n.buffer.byteLength,h===We?f>>=1:h===Ze&&(f>>=2)),n.vertCount=f;var d=o;if(o<0){d=He;var p=n.buffer.dimension;1===p&&(d=Ue),2===p&&(d=Ve),3===p&&(d=He)}n.primType=d}function l(t){n.elementsCount--,de(null!==t.buffer,"must not double destroy elements"),delete c[t.id],t.buffer.destroy(),t.buffer=null}function u(t,e){function a(t){if(t)if("number"==typeof t)o(t),u.primType=He,u.vertCount=0|t,u.type=Ge;else{var e=null,r=Qe,n=-1,i=-1,l=0,c=0;Array.isArray(t)||Qt(t)||Z(t)?e=t:(de.type(t,"object","invalid arguments for elements"),"data"in t&&(e=t.data,de(Array.isArray(e)||Qt(e)||Z(e),"invalid data for element buffer")),"usage"in t&&(de.parameter(t.usage,ze,"invalid element buffer usage"),r=ze[t.usage]),"primitive"in t&&(de.parameter(t.primitive,Be,"invalid element buffer primitive"),n=Be[t.primitive]),"count"in t&&(de("number"==typeof t.count&&t.count>=0,"invalid vertex count for elements"),i=0|t.count),"type"in t&&(de.parameter(t.type,f,"invalid buffer type"),c=f[t.type]),"length"in t?l=0|t.length:(l=i,c===We||c===Ye?l*=2:c!==Ze&&c!==Xe||(l*=4))),s(u,e,r,n,i,l,c)}else o(),u.primType=He,u.vertCount=0,u.type=Ge;return a}var o=r.create(null,Je,!0),u=new i(o._buffer);return n.elementsCount++,a(t),a._reglType="elements",a._elements=u,a.subdata=function(t,e){return o.subdata(t,e),a},a.destroy=function(){l(u)},a}var c={},h=0,f={uint8:Ge,uint16:We};e.oes_element_index_uint&&(f.uint32=Ze),i.prototype.bind=function(){this.buffer.bind()};var d=[];return{create:u,createStream:a,destroyStream:o,getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){xe(c).forEach(l)}}}function pt(t){for(var e=Le.allocType(er,t.length),r=0;r>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)e[r]=i;else if(a<-14){var s=-14-a;e[r]=i+(o+1024>>s)}else e[r]=a>15?i+31744:i+(a+15<<10)+o}return e}function mt(t){return Array.isArray(t)||Qt(t)}function gt(t){return"[object "+t+"]"}function vt(t){return Array.isArray(t)&&(0===t.length||"number"==typeof t[0])}function yt(t){return!!Array.isArray(t)&&!(0===t.length||!mt(t[0]))}function bt(t){return Object.prototype.toString.call(t)}function xt(t){return bt(t)===dn}function _t(t){return bt(t)===pn}function wt(t){return bt(t)===mn}function Mt(t){return bt(t)===gn}function At(t){if(!t)return!1;var e=bt(t);return vn.indexOf(e)>=0||(vt(t)||yt(t)||Z(t))}function kt(t){return 0|Kt[Object.prototype.toString.call(t)]}function Tt(t,e){var r=e.length;switch(t.type){case Or:case Rr:case jr:case Fr:var n=Le.allocType(t.type,r);n.set(e),t.data=n;break;case wr:t.data=pt(e);break;default:de.raise("unsupported texture type, must specify a typed array")}}function St(t,e){return Le.allocType(t.type===wr?Fr:t.type,e)}function Et(t,e){t.type===wr?(t.data=pt(e),Le.freeType(e)):t.data=e}function Lt(t,e,r,n,i,a){for(var o=t.width,s=t.height,l=t.channels,u=o*s*l,c=St(t,u),h=0,f=0;f=1;)s+=o*l*l,l/=2;return s}return o*r*n}function Dt(t,e,r,n,i,a,o){function s(){this.internalformat=or,this.format=or,this.type=Or,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=0,this.width=0,this.height=0,this.channels=0}function l(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function u(t,n){if("object"==typeof n&&n){if("premultiplyAlpha"in n&&(de.type(n.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),t.premultiplyAlpha=n.premultiplyAlpha),"flipY"in n&&(de.type(n.flipY,"boolean","invalid texture flip"),t.flipY=n.flipY),"alignment"in n&&(de.oneOf(n.alignment,[1,2,4,8],"invalid texture unpack alignment"),t.unpackAlignment=n.alignment),"colorSpace"in n&&(de.parameter(n.colorSpace,F,"invalid colorSpace"),t.colorSpace=F[n.colorSpace]),"type"in n){var i=n.type;de(e.oes_texture_float||!("float"===i||"float32"===i),"you must enable the OES_texture_float extension in order to use floating point textures."),de(e.oes_texture_half_float||!("half float"===i||"float16"===i),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),de(e.webgl_depth_texture||!("uint16"===i||"uint32"===i||"depth stencil"===i),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),de.parameter(i,N,"invalid texture type"),t.type=N[i]}var a=t.width,o=t.height,s=t.channels,l=!1;"shape"in n?(de(Array.isArray(n.shape)&&n.shape.length>=2,"shape must be an array"),a=n.shape[0],o=n.shape[1],3===n.shape.length&&(s=n.shape[2],de(s>0&&s<=4,"invalid number of channels"),l=!0),de(a>=0&&a<=r.maxTextureSize,"invalid width"),de(o>=0&&o<=r.maxTextureSize,"invalid height")):("radius"in n&&(a=o=n.radius,de(a>=0&&a<=r.maxTextureSize,"invalid radius")),"width"in n&&(a=n.width,de(a>=0&&a<=r.maxTextureSize,"invalid width")),"height"in n&&(o=n.height,de(o>=0&&o<=r.maxTextureSize,"invalid height")),"channels"in n&&(s=n.channels,de(s>0&&s<=4,"invalid number of channels"),l=!0)),t.width=0|a,t.height=0|o,t.channels=0|s;var u=!1;if("format"in n){var c=n.format;de(e.webgl_depth_texture||!("depth"===c||"depth stencil"===c),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),de.parameter(c,B,"invalid texture format");var h=t.internalformat=B[c];t.format=J[h],c in N&&("type"in n||(t.type=N[c])),c in U&&(t.compressed=!0),u=!0}!l&&u?t.channels=fn[t.format]:l&&!u?t.channels!==hn[t.format]&&(t.format=t.internalformat=hn[t.channels]):u&&l&&de(t.channels===fn[t.format],"number of channels inconsistent with specified format")}}function c(e){t.pixelStorei(an,e.flipY),t.pixelStorei(on,e.premultiplyAlpha),t.pixelStorei(sn,e.colorSpace),t.pixelStorei(nn,e.unpackAlignment)}function h(){s.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function f(t,e){var n=null;if(At(e)?n=e:e&&(de.type(e,"object","invalid pixel data type"),u(t,e),"x"in e&&(t.xOffset=0|e.x),"y"in e&&(t.yOffset=0|e.y),At(e.data)&&(n=e.data)),de(!t.compressed||n instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),e.copy){de(!n,"can not specify copy and data field for the same texture");var a=i.viewportWidth,o=i.viewportHeight;t.width=t.width||a-t.xOffset,t.height=t.height||o-t.yOffset,t.needsCopy=!0,de(t.xOffset>=0&&t.xOffset=0&&t.yOffset0&&t.width<=a&&t.height>0&&t.height<=o,"copy texture read out of bounds")}else if(n){if(Qt(n))t.channels=t.channels||4,t.data=n,"type"in e||t.type!==Or||(t.type=kt(n));else if(vt(n))t.channels=t.channels||4,Tt(t,n),t.alignment=1,t.needsFree=!0;else if(Z(n)){var s=n.data;Array.isArray(s)||t.type!==Or||(t.type=kt(s));var l,c,h,f,d,p,m=n.shape,g=n.stride;3===m.length?(h=m[2],p=g[2]):(de(2===m.length,"invalid ndarray pixel data, must be 2 or 3D"),h=1,p=1),l=m[0],c=m[1],f=g[0],d=g[1],t.alignment=1,t.width=l,t.height=c,t.channels=h,t.format=t.internalformat=hn[h],t.needsFree=!0,Lt(t,s,f,d,p,n.offset)}else if(xt(n)||_t(n))xt(n)?t.element=n:t.element=n.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(wt(n))t.element=n,t.width=n.naturalWidth,t.height=n.naturalHeight,t.channels=4;else if(Mt(n))t.element=n,t.width=n.videoWidth,t.height=n.videoHeight,t.channels=4;else if(yt(n)){var v=t.width||n[0].length,y=t.height||n.length,b=t.channels;b=mt(n[0][0])?b||n[0][0].length:b||1;for(var x=Ce.shape(n),_=1,w=0;w=0,"oes_texture_float extension not enabled"):t.type===wr&&de(r.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function d(e,r,i){var a=e.element,o=e.data,s=e.internalformat,l=e.format,u=e.type,h=e.width,f=e.height;c(e),a?t.texImage2D(r,i,l,l,u,a):e.compressed?t.compressedTexImage2D(r,i,s,h,f,0,o):e.needsCopy?(n(),t.copyTexImage2D(r,i,l,e.xOffset,e.yOffset,h,f,0)):t.texImage2D(r,i,l,h,f,0,l,u,o)}function p(e,r,i,a,o){var s=e.element,l=e.data,u=e.internalformat,h=e.format,f=e.type,d=e.width,p=e.height;c(e),s?t.texSubImage2D(r,o,i,a,h,f,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,u,d,p,l):e.needsCopy?(n(),t.copyTexSubImage2D(r,o,i,a,e.xOffset,e.yOffset,d,p)):t.texSubImage2D(r,o,i,a,d,p,h,f,l)}function m(){return K.pop()||new h}function g(t){t.needsFree&&Le.freeType(t.data),h.call(t),K.push(t)}function v(){s.call(this),this.genMipmaps=!1,this.mipmapHint=$r,this.mipmask=0,this.images=Array(16)}function y(t,e,r){var n=t.images[0]=m();t.mipmask=1,n.width=t.width=e,n.height=t.height=r,n.channels=t.channels=4}function b(t,e){var r=null;if(At(e))r=t.images[0]=m(),l(r,t),f(r,e),t.mipmask=1;else if(u(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i>=i,r.height>>=i,f(r,n[i]),t.mipmask|=1<=0&&(t.genMipmaps=!0)}if("mag"in e){var i=e.mag;de.parameter(i,R),t.magFilter=R[i]}var a=t.wrapS,o=t.wrapT;if("wrap"in e){var s=e.wrap;"string"==typeof s?(de.parameter(s,O),a=o=O[s]):Array.isArray(s)&&(de.parameter(s[0],O),de.parameter(s[1],O),a=O[s[0]],o=O[s[1]])}else{if("wrapS"in e){var l=e.wrapS;de.parameter(l,O),a=O[l]}if("wrapT"in e){var u=e.wrapT;de.parameter(u,O),o=O[u]}}if(t.wrapS=a,t.wrapT=o,"anisotropic"in e){var c=e.anisotropic;de("number"==typeof c&&c>=1&&c<=r.maxAnisotropic,"aniso samples must be between 1 and "),t.anisotropic=e.anisotropic}if("mipmap"in e){var h=!1;switch(typeof e.mipmap){case"string":de.parameter(e.mipmap,P,"invalid mipmap hint"),t.mipmapHint=P[e.mipmap],t.genMipmaps=!0,h=!0;break;case"boolean":h=t.genMipmaps=e.mipmap;break;case"object":de(Array.isArray(e.mipmap),"invalid mipmap type"),t.genMipmaps=!1,h=!0;break;default:de.raise("invalid mipmap type")}!h||"min"in e||(t.minFilter=Xr)}}function k(r,n){t.texParameteri(n,Gr,r.minFilter),t.texParameteri(n,qr,r.magFilter),t.texParameteri(n,Nr,r.wrapS),t.texParameteri(n,Br,r.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(n,rn,r.anisotropic),r.genMipmaps&&(t.hint(Qr,r.mipmapHint),t.generateMipmap(n))}function T(e){s.call(this),this.mipmask=0,this.internalformat=or,this.id=$++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new M,o.profile&&(this.stats={size:0})}function S(e){t.activeTexture(un),t.bindTexture(e.target,e.texture)}function E(){var e=rt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(nr,null)}function L(e){var r=e.texture;de(r,"must not double destroy texture");var n=e.unit,i=e.target;n>=0&&(t.activeTexture(un+n),t.bindTexture(i,null),rt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete tt[e.id],a.textureCount--}function C(e,n){function i(t,e){var n=c.texInfo;M.call(n);var a=_();return"number"==typeof t?"number"==typeof e?y(a,0|t,0|e):y(a,0|t,0|t):t?(de.type(t,"object","invalid arguments to regl.texture"),A(n,t),b(a,t)):y(a,1,1),n.genMipmaps&&(a.mipmask=(a.width<<1)-1),c.mipmask=a.mipmask,l(c,a),de.texture2D(n,a,r),c.internalformat=a.internalformat,i.width=a.width,i.height=a.height,S(c),x(a,nr),k(n,nr),E(),w(a),o.profile&&(c.stats.size=Ct(c.internalformat,c.type,a.width,a.height,n.genMipmaps,!1)),i.format=q[c.internalformat],i.type=G[c.type],i.mag=Y[n.magFilter],i.min=W[n.minFilter],i.wrapS=X[n.wrapS],i.wrapT=X[n.wrapT],i}function s(t,e,r,n){de(!!t,"must specify image data");var a=0|e,o=0|r,s=0|n,u=m();return l(u,c),u.width=0,u.height=0,f(u,t),u.width=u.width||(c.width>>s)-a,u.height=u.height||(c.height>>s)-o,de(c.type===u.type&&c.format===u.format&&c.internalformat===u.internalformat,"incompatible format for texture.subimage"),de(a>=0&&o>=0&&a+u.width<=c.width&&o+u.height<=c.height,"texture.subimage write out of bounds"),de(c.mipmask&1<>s;++s)t.texImage2D(nr,s,c.format,n>>s,a>>s,0,c.format,c.type,null);return E(),o.profile&&(c.stats.size=Ct(c.internalformat,c.type,n,a,!1,!1)),i}var c=new T(nr);return tt[c.id]=c,a.textureCount++,i(e,n),i.subimage=s,i.resize=u,i._reglType="texture2d",i._texture=c,o.profile&&(i.stats=c.stats),i.destroy=function(){c.decRef()},i}function D(e,n,i,s,c,h){function d(t,e,n,i,a,s){var c,h=C.texInfo;for(M.call(h),c=0;c<6;++c)D[c]=_();if("number"!=typeof t&&t)if("object"==typeof t)if(e)b(D[0],t),b(D[1],e),b(D[2],n),b(D[3],i),b(D[4],a),b(D[5],s);else if(A(h,t),u(C,t),"faces"in t){var f=t.faces;for(de(Array.isArray(f)&&6===f.length,"cube faces must be a length 6 array"),c=0;c<6;++c)de("object"==typeof f[c]&&!!f[c],"invalid input for cube map face"),l(D[c],C),b(D[c],f[c])}else for(c=0;c<6;++c)b(D[c],t);else de.raise("invalid arguments to cube map");else{var p=0|t||1;for(c=0;c<6;++c)y(D[c],p,p)}for(l(C,D[0]),h.genMipmaps?C.mipmask=(D[0].width<<1)-1:C.mipmask=D[0].mipmask,de.textureCube(C,h,D,r),C.internalformat=D[0].internalformat,d.width=D[0].width,d.height=D[0].height,S(C),c=0;c<6;++c)x(D[c],ar+c);for(k(h,ir),E(),o.profile&&(C.stats.size=Ct(C.internalformat,C.type,d.width,d.height,h.genMipmaps,!0)),d.format=q[C.internalformat],d.type=G[C.type],d.mag=Y[h.magFilter],d.min=W[h.minFilter],d.wrapS=X[h.wrapS],d.wrapT=X[h.wrapT],c=0;c<6;++c)w(D[c]);return d}function v(t,e,r,n,i){de(!!e,"must specify image data"),de("number"==typeof t&&t===(0|t)&&t>=0&&t<6,"invalid face");var a=0|r,o=0|n,s=0|i,u=m();return l(u,C),u.width=0,u.height=0,f(u,e),u.width=u.width||(C.width>>s)-a,u.height=u.height||(C.height>>s)-o,de(C.type===u.type&&C.format===u.format&&C.internalformat===u.internalformat,"incompatible format for texture.subimage"),de(a>=0&&o>=0&&a+u.width<=C.width&&o+u.height<=C.height,"texture.subimage write out of bounds"),de(C.mipmask&1<>i;++i)t.texImage2D(ar+n,i,C.format,r>>i,r>>i,0,C.format,C.type,null);return E(),o.profile&&(C.stats.size=Ct(C.internalformat,C.type,d.width,d.height,!1,!0)),d}}var C=new T(ir);tt[C.id]=C,a.cubeCount++;var D=new Array(6);return d(e,n,i,s,c,h),d.subimage=v,d.resize=L,d._reglType="textureCube",d._texture=C,o.profile&&(d.stats=C.stats),d.destroy=function(){C.decRef()},d}function z(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)t.texImage2D(ar+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);k(e.texInfo,e.target)})}var P={"don't care":$r,"dont care":$r,nice:en,fast:tn},O={repeat:Ur,clamp:Vr,mirror:Hr},R={nearest:Yr,linear:Wr},j=$t({mipmap:Kr,"nearest mipmap nearest":Xr,"linear mipmap nearest":Zr,"nearest mipmap linear":Jr,"linear mipmap linear":Kr},R),F={none:0,browser:ln},N={uint8:Or,rgba4:pr,rgb565:gr,"rgb5 a1":mr},B={alpha:sr,luminance:ur,"luminance alpha":cr,rgb:lr,rgba:or,rgba4:hr,"rgb5 a1":fr,rgb565:dr},U={};e.ext_srgb&&(B.srgb=xr,B.srgba=_r),e.oes_texture_float&&(N.float32=N.float=Fr),e.oes_texture_half_float&&(N.float16=N["half float"]=wr),e.webgl_depth_texture&&($t(B,{depth:yr,"depth stencil":br}),$t(N,{uint16:Rr,uint32:jr,"depth stencil":vr})),e.webgl_compressed_texture_s3tc&&$t(U,{"rgb s3tc dxt1":Mr,"rgba s3tc dxt1":Ar,"rgba s3tc dxt3":kr,"rgba s3tc dxt5":Tr}),e.webgl_compressed_texture_atc&&$t(U,{"rgb atc":Sr,"rgba atc explicit alpha":Er,"rgba atc interpolated alpha":Lr}),e.webgl_compressed_texture_pvrtc&&$t(U,{"rgb pvrtc 4bppv1":Cr,"rgb pvrtc 2bppv1":Dr,"rgba pvrtc 4bppv1":zr,"rgba pvrtc 2bppv1":Ir}),e.webgl_compressed_texture_etc1&&(U["rgb etc1"]=Pr);var V=Array.prototype.slice.call(t.getParameter(rr));Object.keys(U).forEach(function(t){var e=U[t];V.indexOf(e)>=0&&(B[t]=e)});var H=Object.keys(B);r.textureFormats=H;var q=[];Object.keys(B).forEach(function(t){var e=B[t];q[e]=t});var G=[];Object.keys(N).forEach(function(t){var e=N[t];G[e]=t});var Y=[];Object.keys(R).forEach(function(t){var e=R[t];Y[e]=t});var W=[];Object.keys(j).forEach(function(t){var e=j[t];W[e]=t});var X=[];Object.keys(O).forEach(function(t){var e=O[t];X[e]=t});var J=H.reduce(function(t,e){var r=B[e];return r===ur||r===sr||r===ur||r===cr||r===yr||r===br?t[r]=r:r===fr||e.indexOf("rgba")>=0?t[r]=or:t[r]=lr,t},{}),K=[],Q=[],$=0,tt={},et=r.maxTextureUnits,rt=Array(et).map(function(){return null});return $t(T.prototype,{bind:function(){var e=this;e.bindCount+=1;var r=e.unit;if(r<0){for(var n=0;n0)continue;i.unit=-1}rt[n]=e,r=n;break}r>=et&&de.raise("insufficient number of texture units"),o.profile&&a.maxTextureUnits=Sn&&e=2,"invalid shape for framebuffer"),u=z[0],d=z[1]}else"radius"in D&&(u=d=D.radius),"width"in D&&(u=D.width),"height"in D&&(d=D.height);("color"in D||"colors"in D)&&(y=D.color||D.colors,Array.isArray(y)&&de(1===y.length||o,"multiple render targets not supported")),y||("colorCount"in D&&(T=0|D.colorCount,de(T>0,"invalid color buffer count")),"colorTexture"in D&&(b=!!D.colorTexture,x="rgba4"),"colorType"in D&&(k=D.colorType,b?(de(e.oes_texture_float||!("float"===k||"float32"===k),"you must enable OES_texture_float in order to use floating point framebuffer objects"),de(e.oes_texture_half_float||!("half float"===k||"float16"===k),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):"half float"===k||"float16"===k?(de(e.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),x="rgba16f"):"float"!==k&&"float32"!==k||(de(e.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),x="rgba32f"),de.oneOf(k,A,"invalid color type")),"colorFormat"in D&&(x=D.colorFormat,w.indexOf(x)>=0?b=!0:M.indexOf(x)>=0?b=!1:b?de.oneOf(D.colorFormat,w,"invalid color format for texture"):de.oneOf(D.colorFormat,M,"invalid color format for renderbuffer"))),("depthTexture"in D||"depthStencilTexture"in D)&&(C=!(!D.depthTexture&&!D.depthStencilTexture),de(!C||e.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in D&&("boolean"==typeof D.depth?p=D.depth:(S=D.depth,g=!1)),"stencil"in D&&("boolean"==typeof D.stencil?g=D.stencil:(E=D.stencil,p=!1)),"depthStencil"in D&&("boolean"==typeof D.depthStencil?p=g=D.depthStencil:(L=D.depthStencil,p=!1,g=!1))}else u=d=1;var I=null,P=null,O=null,R=null;if(Array.isArray(y))I=y.map(c);else if(y)I=[c(y)];else for(I=new Array(T),a=0;a=0||I[a].renderbuffer&&Bn.indexOf(I[a].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+a+" is invalid"),I[a]&&I[a].texture){var F=On[I[a].texture._texture.format]*Rn[I[a].texture._texture.type];null===j?j=F:de(j===F,"all color attachments much have the same number of bits per pixel.")}return l(P,u,d),de(!P||P.texture&&P.texture._texture.format===In||P.renderbuffer&&P.renderbuffer._renderbuffer.format===jn,"invalid depth attachment for framebuffer object"),l(O,u,d),de(!O||O.renderbuffer&&O.renderbuffer._renderbuffer.format===Fn,"invalid stencil attachment for framebuffer object"),l(R,u,d),de(!R||R.texture&&R.texture._texture.format===Nn||R.renderbuffer&&R.renderbuffer._renderbuffer.format===Nn,"invalid depth-stencil attachment for framebuffer object"),m(s),s.width=u,s.height=d,s.colorAttachments=I,s.depthAttachment=P,s.stencilAttachment=O,s.depthStencilAttachment=R,i.color=I.map(f),i.depth=f(P),i.stencil=f(O),i.depthStencil=f(R),i.width=s.width,i.height=s.height,v(s),i}function o(t,e){de(_.next!==s,"can not resize a framebuffer which is currently in use");var r=0|t,n=0|e||r;if(r===s.width&&n===s.height)return i;for(var a=s.colorAttachments,o=0;o=2,"invalid shape for framebuffer"),de(p[0]===p[1],"cube framebuffer must be square"),l=p[0]}else"radius"in d&&(l=0|d.radius),"width"in d?(l=0|d.width,"height"in d&&de(d.height===l,"must be square")):"height"in d&&(l=0|d.height);("color"in d||"colors"in d)&&(u=d.color||d.colors,Array.isArray(u)&&de(1===u.length||a,"multiple render targets not supported")),u||("colorCount"in d&&(f=0|d.colorCount,de(f>0,"invalid color buffer count")),"colorType"in d&&(de.oneOf(d.colorType,A,"invalid color type"),h=d.colorType),"colorFormat"in d&&(c=d.colorFormat,de.oneOf(d.colorFormat,w,"invalid color format for texture"))),"depth"in d&&(s.depth=d.depth),"stencil"in d&&(s.stencil=d.stencil),"depthStencil"in d&&(s.depthStencil=d.depthStencil)}else l=1;var m;if(u)if(Array.isArray(u))for(m=[],r=0;r0&&(s.depth=o[0].depth,s.stencil=o[0].stencil,s.depthStencil=o[0].depthStencil),o[r]?o[r](s):o[r]=y(s)}return $t(i,{width:l,height:l,color:m})}function a(t){var e,n=0|t;if(de(n>0&&n<=r.maxCubeMapSize,"invalid radius for cube fbo"),n===i.width)return i;var a=i.color;for(e=0;e1)for(var m=0;mt&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return d.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);xe(c).forEach(e),c={},xe(h).forEach(e),h={},d.forEach(function(e){t.deleteProgram(e.program)}),d.length=0,f={},r.shaderCount=0},program:function(t,e,n){de.command(t>=0,"missing vertex shader",n),de.command(e>=0,"missing fragment shader",n);var i=f[e];i||(i=f[e]={});var a=i[t];return a||(a=new s(e,t),r.shaderCount++,l(a,n),i[t]=a,d.push(a)),a},restore:u,shader:o,frag:-1,vert:-1}}function jt(t,e,r,n,i,a){function o(o){var s;null===e.next?(de(i.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),s=Xn):(de(null!==e.next.colorAttachments[0].texture,"You cannot read from a renderbuffer"),s=e.next.colorAttachments[0].texture._texture.type,a.oes_texture_float?de(s===Xn||s===Jn,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"):de(s===Xn,"Reading from a framebuffer is only allowed for the type 'uint8'"));var l=0,u=0,c=n.framebufferWidth,h=n.framebufferHeight,f=null;Qt(o)?f=o:o&&(de.type(o,"object","invalid arguments to regl.read()"),l=0|o.x,u=0|o.y,de(l>=0&&l=0&&u0&&c+l<=n.framebufferWidth,"invalid width for read pixels"),de(h>0&&h+u<=n.framebufferHeight,"invalid height for read pixels"),r();var d=c*h*4;return f||(s===Xn?f=new Uint8Array(d):s===Jn&&(f=f||new Float32Array(d))),de.isTypedArray(f,"data buffer for regl.read() must be a typedarray"),de(f.byteLength>=d,"data buffer for regl.read() too small"),t.pixelStorei(Zn,4),t.readPixels(l,u,c,h,Wn,s,f),f}function s(t){var r;return e.setFBO({framebuffer:t.framebuffer},function(){r=o(t)}),r}function l(t){return t&&"framebuffer"in t?s(t):o(t)}return l}function Ft(t){return Array.prototype.slice.call(t)}function Nt(t){return Ft(t).join("")}function Bt(){function t(t){for(var e=0;e0&&(r.push(t,"="),r.push.apply(r,Ft(arguments)),r.push(";")),t}var r=[],n=[];return $t(t,{def:e,toString:function(){return Nt([n.length>0?"var "+n+";":"",Nt(r)])}})}function r(){function t(t,e){n(t,e,"=",r.def(t,e),";")}var r=e(),n=e(),i=r.toString,a=n.toString;return $t(function(){r.apply(r,Ft(arguments))},{def:r.def,entry:r,exit:n,save:t,set:function(e,n,i){t(e,n),r(e,n,"=",i,";")},toString:function(){return i()+a()}})}function n(){var t=Nt(arguments),e=r(),n=r(),i=e.toString,a=n.toString;return $t(e,{then:function(){return e.apply(e,Ft(arguments)),this},else:function(){return n.apply(n,Ft(arguments)),this},toString:function(){var e=a();return e&&(e="else{"+e+"}"),Nt(["if(",t,"){",i(),"}",e])}})}function i(t,e){function n(){var t="a"+i.length;return i.push(t),t}var i=[];e=e||0;for(var a=0;a=1,n>=2,e)}if(r===ai){var i=t.data;return new Ht(i.thisDep,i.contextDep,i.propDep,e)}return new Ht(r===ii,r===ni,r===ri,e)}function Wt(t,e,r,n,i,a,o,s,l,u,c,h,f,d,p){function m(t){return t.replace(".","_")}function g(t,e,r){var n=m(t);et.push(t),tt[n]=$[n]=!!r,rt[n]=e}function v(t,e,r){var n=m(t);et.push(t),Array.isArray(r)?($[n]=r.slice(),tt[n]=r.slice()):$[n]=tt[n]=r,nt[n]=e}function y(){var t=Bt(),r=t.link,n=t.global;t.id=ot++,t.batchId="0";var i=r(it),a=t.shared={props:"a0"};Object.keys(it).forEach(function(t){a[t]=n.def(i,".",t)}),de.optional(function(){t.CHECK=r(de),t.commandStr=de.guessCommand(),t.command=r(t.commandStr),t.assert=function(t,e,n){t("if(!(",e,"))",this.CHECK,".commandRaise(",r(n),",",this.command,");")},at.invalidBlendCombinations=Ua});var o=t.next={},s=t.current={};Object.keys(nt).forEach(function(t){Array.isArray($[t])&&(o[t]=n.def(a.next,".",t),s[t]=n.def(a.current,".",t))});var l=t.constants={};Object.keys(at).forEach(function(t){l[t]=n.def(JSON.stringify(at[t]))}),t.invoke=function(e,n){switch(n.type){case ei:var i=["this",a.context,a.props,t.batchId];return e.def(r(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case ri:return e.def(a.props,n.data);case ni:return e.def(a.context,n.data);case ii:return e.def("this",n.data);case ai:return n.data.append(t,e),n.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){var n=e.id(t);if(n in c)return c[n];var i=u.scope[n];return i||(i=u.scope[n]=new X),c[n]=r(i)},t}function b(t){var e,r=t.static,n=t.dynamic;if(Ii in r){var i=!!r[Ii];e=Gt(function(t,e){return i}),e.enable=i}else if(Ii in n){var a=n[Ii];e=Yt(a,function(t,e){return t.invoke(e,a)})}return e}function x(t,e){var r=t.static,n=t.dynamic;if(Pi in r){var i=r[Pi];return i?(i=s.getFramebuffer(i),de.command(i,"invalid framebuffer object"),Gt(function(t,e){var r=t.link(i),n=t.shared;e.set(n.framebuffer,".next",r);var a=n.context;return e.set(a,"."+Vi,r+".width"),e.set(a,"."+Hi,r+".height"),r})):Gt(function(t,e){var r=t.shared;e.set(r.framebuffer,".next","null");var n=r.context;return e.set(n,"."+Vi,n+"."+Yi),e.set(n,"."+Hi,n+"."+Wi),"null"})}if(Pi in n){var a=n[Pi];return Yt(a,function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer,o=e.def(i,".getFramebuffer(",r,")");de.optional(function(){t.assert(e,"!"+r+"||"+o,"invalid framebuffer object")}),e.set(i,".next",o);var s=n.context;return e.set(s,"."+Vi,o+"?"+o+".width:"+s+"."+Yi),e.set(s,"."+Hi,o+"?"+o+".height:"+s+"."+Wi),o})}return null}function _(t,e,r){function n(t){if(t in i){var n=i[t];de.commandType(n,"object","invalid "+t,r.commandStr);var o,s,l=!0,u=0|n.x,c=0|n.y;return"width"in n?(o=0|n.width,de.command(o>=0,"invalid "+t,r.commandStr)):l=!1,"height"in n?(s=0|n.height,de.command(s>=0,"invalid "+t,r.commandStr)):l=!1,new Ht(!l&&e&&e.thisDep,!l&&e&&e.contextDep,!l&&e&&e.propDep,function(t,e){var r=t.shared.context,i=o;"width"in n||(i=e.def(r,".",Vi,"-",u));var a=s;return"height"in n||(a=e.def(r,".",Hi,"-",c)),[u,c,i,a]})}if(t in a){var h=a[t],f=Yt(h,function(e,r){var n=e.invoke(r,h);de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)});var i=e.shared.context,a=r.def(n,".x|0"),o=r.def(n,".y|0"),s=r.def('"width" in ',n,"?",n,".width|0:","(",i,".",Vi,"-",a,")"),l=r.def('"height" in ',n,"?",n,".height|0:","(",i,".",Hi,"-",o,")");return de.optional(function(){e.assert(r,s+">=0&&"+l+">=0","invalid "+t)}),[a,o,s,l]});return e&&(f.thisDep=f.thisDep||e.thisDep,f.contextDep=f.contextDep||e.contextDep,f.propDep=f.propDep||e.propDep),f}return e?new Ht(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,".",Vi),e.def(r,".",Hi)]}):null}var i=t.static,a=t.dynamic,o=n(zi);if(o){var s=o;o=new Ht(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=s.append(t,e),n=t.shared.context;return e.set(n,"."+qi,r[2]),e.set(n,"."+Gi,r[3]),r})}return{viewport:o,scissor_box:n(Di)}}function w(t){function r(t){if(t in i){var r=e.id(i[t]);de.optional(function(){c.shader(qa[t],r,de.guessCommand())});var n=Gt(function(){return r});return n.id=r,n}if(t in a){var o=a[t];return Yt(o,function(e,r){var n=e.invoke(r,o),i=r.def(e.shared.strings,".id(",n,")");return de.optional(function(){r(e.shared.shader,".shader(",qa[t],",",i,",",e.command,");")}),i})}return null}var n,i=t.static,a=t.dynamic,o=r(Ri),s=r(Oi),l=null;return qt(o)&&qt(s)?(l=c.program(s.id,o.id),n=Gt(function(t,e){return t.link(l)})):n=new Ht(o&&o.thisDep||s&&s.thisDep,o&&o.contextDep||s&&s.contextDep,o&&o.propDep||s&&s.propDep,function(t,e){var r,n=t.shared.shader;r=o?o.append(t,e):e.def(n,".",Ri);var i;i=s?s.append(t,e):e.def(n,".",Oi);var a=n+".program("+i+","+r;return de.optional(function(){a+=","+t.command}),e.def(a+")")}),{frag:o,vert:s,progVar:n,program:l}}function M(t,e){function r(t,r){if(t in n){var a=0|n[t];return de.command(!r||a>=0,"invalid "+t,e.commandStr),Gt(function(t,e){return r&&(t.OFFSET=a),a})}if(t in i){var s=i[t];return Yt(s,function(e,n){var i=e.invoke(n,s);return r&&(e.OFFSET=i,de.optional(function(){e.assert(n,i+">=0","invalid "+t)})),i})}return r&&o?Gt(function(t,e){return t.OFFSET="0",0}):null}var n=t.static,i=t.dynamic,o=function(){if(ji in n){var t=n[ji];Ut(t)?t=a.getElements(a.create(t,!0)):t&&(t=a.getElements(t),de.command(t,"invalid elements",e.commandStr));var r=Gt(function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n,n}return e.ELEMENTS=null,null});return r.value=t,r}if(ji in i){var o=i[ji];return Yt(o,function(t,e){var r=t.shared,n=r.isBufferArgs,i=r.elements,a=t.invoke(e,o),s=e.def("null"),l=e.def(n,"(",a,")"),u=t.cond(l).then(s,"=",i,".createStream(",a,");").else(s,"=",i,".getElements(",a,");");return de.optional(function(){t.assert(u.else,"!"+a+"||"+s,"invalid elements")}),e.entry(u),e.exit(t.cond(l).then(i,".destroyStream(",s,");")),t.ELEMENTS=s,s})}return null}(),s=r(Bi,!0);return{elements:o,primitive:function(){if(Fi in n){var t=n[Fi];return de.commandParameter(t,Be,"invalid primitve",e.commandStr),Gt(function(e,r){return Be[t]})}if(Fi in i){var r=i[Fi];return Yt(r,function(t,e){var n=t.constants.primTypes,i=t.invoke(e,r);return de.optional(function(){t.assert(e,i+" in "+n,"invalid primitive, must be one of "+Object.keys(Be))}),e.def(n,"[",i,"]")})}return o?qt(o)?Gt(o.value?function(t,e){return e.def(t.ELEMENTS,".primType")}:function(){return ka}):new Ht(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=t.ELEMENTS;return e.def(r,"?",r,".primType:",ka)}):null}(),count:function(){if(Ni in n){var t=0|n[Ni];return de.command("number"==typeof t&&t>=0,"invalid vertex count",e.commandStr),Gt(function(){return t})}if(Ni in i){var r=i[Ni];return Yt(r,function(t,e){var n=t.invoke(e,r);return de.optional(function(){t.assert(e,"typeof "+n+'==="number"&&'+n+">=0&&"+n+"===("+n+"|0)","invalid vertex count")}),n})}if(o){if(qt(o)){if(o)return s?new Ht(s.thisDep,s.contextDep,s.propDep,function(t,e){var r=e.def(t.ELEMENTS,".vertCount-",t.OFFSET);return de.optional(function(){t.assert(e,r+">=0","invalid vertex offset/element buffer too small")}),r}):Gt(function(t,e){return e.def(t.ELEMENTS,".vertCount")});var a=Gt(function(){return-1});return de.optional(function(){a.MISSING=!0}),a}var l=new Ht(o.thisDep||s.thisDep,o.contextDep||s.contextDep,o.propDep||s.propDep,function(t,e){var r=t.ELEMENTS;return t.OFFSET?e.def(r,"?",r,".vertCount-",t.OFFSET,":-1"):e.def(r,"?",r,".vertCount:-1")});return de.optional(function(){l.DYNAMIC=!0}),l}return null}(),instances:r(Ui,!1),offset:s}}function A(t,e){var r=t.static,i=t.dynamic,a={};return et.forEach(function(t){function o(e,n){if(t in r){var o=e(r[t]);a[s]=Gt(function(){return o})}else if(t in i){var l=i[t];a[s]=Yt(l,function(t,e){return n(t,e,t.invoke(e,l))})}}var s=m(t);switch(t){case gi:case si:case oi:case ki:case hi:case Ci:case xi:case wi:case Mi:case pi:return o(function(r){return de.commandType(r,"boolean",t,e.commandStr),r},function(e,r,n){return de.optional(function(){e.assert(r,"typeof "+n+'==="boolean"',"invalid flag "+t,e.commandStr)}),n});case fi:return o(function(r){return de.commandParameter(r,Va,"invalid "+t,e.commandStr),Va[r]},function(e,r,n){var i=e.constants.compareFuncs;return de.optional(function(){e.assert(r,n+" in "+i,"invalid "+t+", must be one of "+Object.keys(Va))}),r.def(i,"[",n,"]")});case di:return o(function(t){return de.command(mt(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]&&t[0]<=t[1],"depth range is 2d array",e.commandStr),t},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===2&&typeof "+r+'[0]==="number"&&typeof '+r+'[1]==="number"&&'+r+"[0]<="+r+"[1]","depth range must be a 2d array")}),[e.def("+",r,"[0]"),e.def("+",r,"[1]")]});case ci:return o(function(t){de.commandType(t,"object","blend.func",e.commandStr);var r="srcRGB"in t?t.srcRGB:t.src,n="srcAlpha"in t?t.srcAlpha:t.src,i="dstRGB"in t?t.dstRGB:t.dst,a="dstAlpha"in t?t.dstAlpha:t.dst;return de.commandParameter(r,Ba,s+".srcRGB",e.commandStr),de.commandParameter(n,Ba,s+".srcAlpha",e.commandStr),de.commandParameter(i,Ba,s+".dstRGB",e.commandStr),de.commandParameter(a,Ba,s+".dstAlpha",e.commandStr),de.command(Ua.indexOf(r+", "+i)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+r+", "+i+")",e.commandStr),[Ba[r],Ba[i],Ba[n],Ba[a]]},function(e,r,n){function i(i,o){var s=r.def('"',i,o,'" in ',n,"?",n,".",i,o,":",n,".",i);return de.optional(function(){e.assert(r,s+" in "+a,"invalid "+t+"."+i+o+", must be one of "+Object.keys(Ba))}),s}var a=e.constants.blendFuncs;de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid blend func, must be an object")});var o=i("src","RGB"),s=i("dst","RGB");de.optional(function(){var t=e.constants.invalidBlendCombinations;e.assert(r,t+".indexOf("+o+'+", "+'+s+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var l=r.def(a,"[",o,"]"),u=r.def(a,"[",i("src","Alpha"),"]");return[l,r.def(a,"[",s,"]"),u,r.def(a,"[",i("dst","Alpha"),"]")]});case ui:return o(function(r){return"string"==typeof r?(de.commandParameter(r,Z,"invalid "+t,e.commandStr),[Z[r],Z[r]]):"object"==typeof r?(de.commandParameter(r.rgb,Z,t+".rgb",e.commandStr),de.commandParameter(r.alpha,Z,t+".alpha",e.commandStr),[Z[r.rgb],Z[r.alpha]]):void de.commandRaise("invalid blend.equation",e.commandStr)},function(e,r,n){var i=e.constants.blendEquations,a=r.def(),o=r.def(),s=e.cond("typeof ",n,'==="string"');return de.optional(function(){function r(t,r,n){e.assert(t,n+" in "+i,"invalid "+r+", must be one of "+Object.keys(Z))}r(s.then,t,n),e.assert(s.else,n+"&&typeof "+n+'==="object"',"invalid "+t),r(s.else,t+".rgb",n+".rgb"),r(s.else,t+".alpha",n+".alpha")}),s.then(a,"=",o,"=",i,"[",n,"];"),s.else(a,"=",i,"[",n,".rgb];",o,"=",i,"[",n,".alpha];"),r(s),[a,o]});case li:return o(function(t){return de.command(mt(t)&&4===t.length,"blend.color must be a 4d array",e.commandStr),J(4,function(e){return+t[e]})},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===4","blend.color must be a 4d array")}),J(4,function(t){return e.def("+",r,"[",t,"]")})});case Ti:return o(function(t){return de.commandType(t,"number",s,e.commandStr),0|t},function(t,e,r){return de.optional(function(){t.assert(e,"typeof "+r+'==="number"',"invalid stencil.mask")}),e.def(r,"|0")});case Si:return o(function(r){de.commandType(r,"object",s,e.commandStr);var n=r.cmp||"keep",i=r.ref||0,a="mask"in r?r.mask:-1;return de.commandParameter(n,Va,t+".cmp",e.commandStr),de.commandType(i,"number",t+".ref",e.commandStr),de.commandType(a,"number",t+".mask",e.commandStr),[Va[n],i,a]},function(t,e,r){var n=t.constants.compareFuncs;return de.optional(function(){function i(){t.assert(e,Array.prototype.join.call(arguments,""),"invalid stencil.func")}i(r+"&&typeof ",r,'==="object"'),i('!("cmp" in ',r,")||(",r,".cmp in ",n,")")}),[e.def('"cmp" in ',r,"?",n,"[",r,".cmp]",":",Ia),e.def(r,".ref|0"),e.def('"mask" in ',r,"?",r,".mask|0:-1")]});case Ei:case Li:return o(function(r){de.commandType(r,"object",s,e.commandStr);var n=r.fail||"keep",i=r.zfail||"keep",a=r.zpass||"keep";return de.commandParameter(n,Ha,t+".fail",e.commandStr),de.commandParameter(i,Ha,t+".zfail",e.commandStr),de.commandParameter(a,Ha,t+".zpass",e.commandStr),[t===Li?Sa:Ta,Ha[n],Ha[i],Ha[a]]},function(e,r,n){function i(i){return de.optional(function(){e.assert(r,'!("'+i+'" in '+n+")||("+n+"."+i+" in "+a+")","invalid "+t+"."+i+", must be one of "+Object.keys(Ha))}),r.def('"',i,'" in ',n,"?",a,"[",n,".",i,"]:",Ia)}var a=e.constants.stencilOps;return de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)}),[t===Li?Sa:Ta,i("fail"),i("zfail"),i("zpass")]});case _i:return o(function(t){de.commandType(t,"object",s,e.commandStr);var r=0|t.factor,n=0|t.units;return de.commandType(r,"number",s+".factor",e.commandStr),de.commandType(n,"number",s+".units",e.commandStr),[r,n]},function(e,r,n){return de.optional(function(){e.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+t)}),[r.def(n,".factor|0"),r.def(n,".units|0")]});case vi:return o(function(t){var r=0;return"front"===t?r=Ta:"back"===t&&(r=Sa),de.command(!!r,s,e.commandStr),r},function(t,e,r){return de.optional(function(){t.assert(e,r+'==="front"||'+r+'==="back"',"invalid cull.face")}),e.def(r,'==="front"?',Ta,":",Sa)});case bi:return o(function(t){return de.command("number"==typeof t&&t>=n.lineWidthDims[0]&&t<=n.lineWidthDims[1],"invalid line width, must positive number between "+n.lineWidthDims[0]+" and "+n.lineWidthDims[1],e.commandStr),t},function(t,e,r){return de.optional(function(){t.assert(e,"typeof "+r+'==="number"&&'+r+">="+n.lineWidthDims[0]+"&&"+r+"<="+n.lineWidthDims[1],"invalid line width")}),r});case yi:return o(function(t){return de.commandParameter(t,Ga,s,e.commandStr),Ga[t]},function(t,e,r){return de.optional(function(){t.assert(e,r+'==="cw"||'+r+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),e.def(r+'==="cw"?'+Ea+":"+La)});case mi:return o(function(t){return de.command(mt(t)&&4===t.length,"color.mask must be length 4 array",e.commandStr),t.map(function(t){return!!t})},function(t,e,r){return de.optional(function(){t.assert(e,t.shared.isArrayLike+"("+r+")&&"+r+".length===4","invalid color.mask")}),J(4,function(t){return"!!"+r+"["+t+"]"})});case Ai:return o(function(t){de.command("object"==typeof t&&t,s,e.commandStr);var r="value"in t?t.value:1,n=!!t.invert;return de.command("number"==typeof r&&r>=0&&r<=1,"sample.coverage.value must be a number between 0 and 1",e.commandStr),[r,n]},function(t,e,r){return de.optional(function(){t.assert(e,r+"&&typeof "+r+'==="object"',"invalid sample.coverage")}),[e.def('"value" in ',r,"?+",r,".value:1"),e.def("!!",r,".invert")]})}}),a}function k(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach(function(t){var n,a=r[t];if("number"==typeof a||"boolean"==typeof a)n=Gt(function(){return a});else if("function"==typeof a){var o=a._reglType;"texture2d"===o||"textureCube"===o?n=Gt(function(t){return t.link(a)}):"framebuffer"===o||"framebufferCube"===o?(de.command(a.color.length>0,'missing color attachment for framebuffer sent to uniform "'+t+'"',e.commandStr),n=Gt(function(t){return t.link(a.color[0])})):de.commandRaise('invalid data for uniform "'+t+'"',e.commandStr)}else mt(a)?n=Gt(function(e){return e.global.def("[",J(a.length,function(r){return de.command("number"==typeof a[r]||"boolean"==typeof a[r],"invalid uniform "+t,e.commandStr),a[r]}),"]")}):de.commandRaise('invalid or missing data for uniform "'+t+'"',e.commandStr);n.value=a,i[t]=n}),Object.keys(n).forEach(function(t){var e=n[t];i[t]=Yt(e,function(t,r){return t.invoke(r,e)})}),i}function T(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach(function(t){var a=n[t],s=e.id(t),l=new X;if(Ut(a))l.state=$n,l.buffer=i.getBuffer(i.create(a,Zi,!1,!0)),l.type=0;else{var u=i.getBuffer(a);if(u)l.state=$n,l.buffer=u,l.type=0;else if(de.command("object"==typeof a&&a,"invalid data for attribute "+t,r.commandStr),a.constant){var c=a.constant;l.buffer="null",l.state=ti,"number"==typeof c?l.x=c:(de.command(mt(c)&&c.length>0&&c.length<=4,"invalid constant for attribute "+t,r.commandStr),Kn.forEach(function(t,e){e=0,'invalid offset for attribute "'+t+'"',r.commandStr);var f=0|a.stride;de.command(f>=0&&f<256,'invalid stride for attribute "'+t+'", must be integer betweeen [0, 255]',r.commandStr);var d=0|a.size;de.command(!("size"in a)||d>0&&d<=4,'invalid size for attribute "'+t+'", must be 1,2,3,4',r.commandStr);var p=!!a.normalized,m=0;"type"in a&&(de.commandParameter(a.type,De,"invalid type for attribute "+t,r.commandStr),m=De[a.type]);var g=0|a.divisor;"divisor"in a&&(de.command(0===g||K,'cannot specify divisor for attribute "'+t+'", instancing not supported',r.commandStr),de.command(g>=0,'invalid divisor for attribute "'+t+'"',r.commandStr)),de.optional(function(){var e=r.commandStr,n=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(a).forEach(function(r){de.command(n.indexOf(r)>=0,'unknown parameter "'+r+'" for attribute pointer "'+t+'" (valid parameters are '+n+")",e)})}),l.buffer=u,l.state=$n,l.size=d,l.normalized=p,l.type=m||u.dtype,l.offset=h,l.stride=f,l.divisor=g}}o[t]=Gt(function(t,e){var r=t.attribCache;if(s in r)return r[s];var n={isStream:!1};return Object.keys(l).forEach(function(t){n[t]=l[t]}),l.buffer&&(n.buffer=t.link(l.buffer),n.type=n.type||n.buffer+".dtype"),r[s]=n,n})}), +Object.keys(a).forEach(function(t){function e(e,n){function i(t){n(u[t],"=",a,".",t,"|0;")}var a=e.invoke(n,r),o=e.shared,s=o.isBufferArgs,l=o.buffer;de.optional(function(){e.assert(n,a+"&&(typeof "+a+'==="object"||typeof '+a+'==="function")&&('+s+"("+a+")||"+l+".getBuffer("+a+")||"+l+".getBuffer("+a+".buffer)||"+s+"("+a+'.buffer)||("constant" in '+a+"&&(typeof "+a+'.constant==="number"||'+o.isArrayLike+"("+a+".constant))))",'invalid dynamic attribute "'+t+'"')});var u={isStream:n.def(!1)},c=new X;c.state=$n,Object.keys(c).forEach(function(t){u[t]=n.def(""+c[t])});var h=u.buffer,f=u.type;return n("if(",s,"(",a,")){",u.isStream,"=true;",h,"=",l,".createStream(",Zi,",",a,");",f,"=",h,".dtype;","}else{",h,"=",l,".getBuffer(",a,");","if(",h,"){",f,"=",h,".dtype;",'}else if("constant" in ',a,"){",u.state,"=",ti,";","if(typeof "+a+'.constant === "number"){',u[Kn[0]],"=",a,".constant;",Kn.slice(1).map(function(t){return u[t]}).join("="),"=0;","}else{",Kn.map(function(t,e){return u[t]+"="+a+".constant.length>="+e+"?"+a+".constant["+e+"]:0;"}).join(""),"}}else{","if(",s,"(",a,".buffer)){",h,"=",l,".createStream(",Zi,",",a,".buffer);","}else{",h,"=",l,".getBuffer(",a,".buffer);","}",f,'="type" in ',a,"?",o.glTypes,"[",a,".type]:",h,".dtype;",u.normalized,"=!!",a,".normalized;"),i("size"),i("offset"),i("stride"),i("divisor"),n("}}"),n.exit("if(",u.isStream,"){",l,".destroyStream(",h,");","}"),u}var r=a[t];o[t]=Yt(r,e)}),o}function S(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=Gt(function(t,e){return"number"==typeof r||"boolean"==typeof r?""+r:t.link(r)})}),Object.keys(r).forEach(function(t){var e=r[t];n[t]=Yt(e,function(t,r){return t.invoke(r,e)})}),n}function E(t,e,r,n,i){function a(t){var e=u[t];e&&(h[t]=e)}var o=t.static,s=t.dynamic;de.optional(function(){function t(t){Object.keys(t).forEach(function(t){de.command(e.indexOf(t)>=0,'unknown parameter "'+t+'"',i.commandStr)})}var e=[Pi,Oi,Ri,ji,Fi,Bi,Ni,Ui,Ii].concat(et);t(o),t(s)});var l=x(t,i),u=_(t,l,i),c=M(t,i),h=A(t,i),f=w(t,i);a(zi),a(m(Di));var d=Object.keys(h).length>0,p={framebuffer:l,draw:c,shader:f,state:h,dirty:d};return p.profile=b(t,i),p.uniforms=k(r,i),p.attributes=T(e,i),p.context=S(n,i),p}function L(t,e,r){var n=t.shared,i=n.context,a=t.scope();Object.keys(r).forEach(function(n){e.save(i,"."+n);var o=r[n];a(i,".",n,"=",o.append(t,e),";")}),e(a)}function C(t,e,r,n){var i,a=t.shared,o=a.gl,s=a.framebuffer;Q&&(i=e.def(a.extensions,".webgl_draw_buffers"));var l,u=t.constants,c=u.drawBuffer,h=u.backBuffer;l=r?r.append(t,e):e.def(s,".next"),n||e("if(",l,"!==",s,".cur){"),e("if(",l,"){",o,".bindFramebuffer(",Fa,",",l,".framebuffer);"),Q&&e(i,".drawBuffersWEBGL(",c,"[",l,".colorAttachments.length]);"),e("}else{",o,".bindFramebuffer(",Fa,",null);"),Q&&e(i,".drawBuffersWEBGL(",h,");"),e("}",s,".cur=",l,";"),n||e("}")}function D(t,e,r){var n=t.shared,i=n.gl,a=t.current,o=t.next,s=n.current,l=n.next,u=t.cond(s,".dirty");et.forEach(function(e){var n=m(e);if(!(n in r.state)){var c,h;if(n in o){c=o[n],h=a[n];var f=J($[n].length,function(t){return u.def(c,"[",t,"]")});u(t.cond(f.map(function(t,e){return t+"!=="+h+"["+e+"]"}).join("||")).then(i,".",nt[n],"(",f,");",f.map(function(t,e){return h+"["+e+"]="+t}).join(";"),";"))}else{c=u.def(l,".",n);var d=t.cond(c,"!==",s,".",n);u(d),n in rt?d(t.cond(c).then(i,".enable(",rt[n],");").else(i,".disable(",rt[n],");"),s,".",n,"=",c,";"):d(i,".",nt[n],"(",c,");",s,".",n,"=",c,";")}}}),0===Object.keys(r.state).length&&u(s,".dirty=false;"),e(u)}function z(t,e,r,n){var i=t.shared,a=t.current,o=i.current,s=i.gl;Vt(Object.keys(r)).forEach(function(i){var l=r[i];if(!n||n(l)){var u=l.append(t,e);if(rt[i]){var c=rt[i];qt(l)?u?e(s,".enable(",c,");"):e(s,".disable(",c,");"):e(t.cond(u).then(s,".enable(",c,");").else(s,".disable(",c,");")),e(o,".",i,"=",u,";")}else if(mt(u)){var h=a[i];e(s,".",nt[i],"(",u,");",u.map(function(t,e){return h+"["+e+"]="+t}).join(";"),";")}else e(s,".",nt[i],"(",u,");",o,".",i,"=",u,";")}})}function I(t,e){K&&(t.instancing=e.def(t.shared.extensions,".angle_instanced_arrays"))}function P(t,e,r,n,i){function a(){return"undefined"==typeof performance?"Date.now()":"performance.now()"}function o(t){u=e.def(),t(u,"=",a(),";"),"string"==typeof i?t(p,".count+=",i,";"):t(p,".count++;"),d&&(n?(c=e.def(),t(c,"=",g,".getNumPendingQueries();")):t(g,".beginQuery(",p,");"))}function s(t){t(p,".cpuTime+=",a(),"-",u,";"),d&&(n?t(g,".pushScopeStats(",c,",",g,".getNumPendingQueries(),",p,");"):t(g,".endQuery();"))}function l(t){var r=e.def(m,".profile");e(m,".profile=",t,";"),e.exit(m,".profile=",r,";")}var u,c,h,f=t.shared,p=t.stats,m=f.current,g=f.timer,v=r.profile;if(v){if(qt(v))return void(v.enable?(o(e),s(e.exit),l("true")):l("false"));h=v.append(t,e),l(h)}else h=e.def(m,".profile");var y=t.block();o(y),e("if(",h,"){",y,"}");var b=t.block();s(b),e.exit("if(",h,"){",b,"}")}function O(t,e,r,n,i){function a(t){switch(t){case ua:case da:case va:return 2;case ca:case pa:case ya:return 3;case ha:case ma:case ba:return 4;default:return 1}}function o(r,n,i){function a(){e("if(!",c,".buffer){",l,".enableVertexAttribArray(",u,");}");var r,a=i.type;if(r=i.size?e.def(i.size,"||",n):n,e("if(",c,".type!==",a,"||",c,".size!==",r,"||",p.map(function(t){return c+"."+t+"!=="+i[t]}).join("||"),"){",l,".bindBuffer(",Zi,",",f,".buffer);",l,".vertexAttribPointer(",[u,r,a,i.normalized,i.stride,i.offset],");",c,".type=",a,";",c,".size=",r,";",p.map(function(t){return c+"."+t+"="+i[t]+";"}).join(""),"}"),K){var o=i.divisor;e("if(",c,".divisor!==",o,"){",t.instancing,".vertexAttribDivisorANGLE(",[u,o],");",c,".divisor=",o,";}")}}function o(){e("if(",c,".buffer){",l,".disableVertexAttribArray(",u,");","}if(",Kn.map(function(t,e){return c+"."+t+"!=="+d[e]}).join("||"),"){",l,".vertexAttrib4f(",u,",",d,");",Kn.map(function(t,e){return c+"."+t+"="+d[e]+";"}).join(""),"}")}var l=s.gl,u=e.def(r,".location"),c=e.def(s.attributes,"[",u,"]"),h=i.state,f=i.buffer,d=[i.x,i.y,i.z,i.w],p=["buffer","normalized","offset","stride"];h===$n?a():h===ti?o():(e("if(",h,"===",$n,"){"),a(),e("}else{"),o(),e("}"))}var s=t.shared;n.forEach(function(n){var s,l=n.name,u=r.attributes[l];if(u){if(!i(u))return;s=u.append(t,e)}else{if(!i(Ya))return;var c=t.scopeAttrib(l);de.optional(function(){t.assert(e,c+".state","missing attribute "+l)}),s={},Object.keys(new X).forEach(function(t){s[t]=e.def(c,".",t)})}o(t.link(n),a(n.info.type),s)})}function R(t,r,n,i,a){for(var o,s=t.shared,l=s.gl,u=0;u1?J(_,function(t){return c+"["+t+"]"}):c);r(");")}}function j(t,e,r,n){function i(i){var a=c[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(u,".",i)}function a(){function t(){r(g,".drawElementsInstancedANGLE(",[f,p,v,d+"<<(("+v+"-"+Qn+")>>1)",m],");")}function e(){r(g,".drawArraysInstancedANGLE(",[f,d,p,m],");")}h?y?t():(r("if(",h,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(l+".drawElements("+[f,p,v,d+"<<(("+v+"-"+Qn+")>>1)"]+");")}function e(){r(l+".drawArrays("+[f,d,p]+");")}h?y?t():(r("if(",h,"){"),t(),r("}else{"),e(),r("}")):e()}var s=t.shared,l=s.gl,u=s.draw,c=n.draw,h=function(){var i,a=c.elements,o=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(o=r),i=a.append(t,o)):i=o.def(u,".",ji),i&&o("if("+i+")"+l+".bindBuffer("+Ji+","+i+".buffer.buffer);"),i}(),f=i(Fi),d=i(Bi),p=function(){var i,a=c.count,o=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(o=r),i=a.append(t,o),de.optional(function(){a.MISSING&&t.assert(e,"false","missing vertex count"),a.DYNAMIC&&t.assert(o,i+">=0","missing vertex count")})):(i=o.def(u,".",Ni),de.optional(function(){t.assert(o,i+">=0","missing vertex count")})),i}();if("number"==typeof p){if(0===p)return}else r("if(",p,"){"),r.exit("}");var m,g;K&&(m=i(Ui),g=t.instancing);var v=h+".type",y=c.elements&&qt(c.elements);K&&("number"!=typeof m||m>=0)?"string"==typeof m?(r("if(",m,">0){"),a(),r("}else if(",m,"<0){"),o(),r("}")):a():o()}function F(t,e,r,n,i){var a=y(),o=a.proc("body",i);return de.optional(function(){a.commandStr=e.commandStr,a.command=a.link(e.commandStr)}),K&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),t(a,o,r,n),a.compile().body}function N(t,e,r,n){I(t,e),O(t,e,r,n.attributes,function(){return!0}),R(t,e,r,n.uniforms,function(){return!0}),j(t,e,e,r)}function B(t,e){var r=t.proc("draw",1);I(t,r),L(t,r,e.context),C(t,r,e.framebuffer),D(t,r,e),z(t,r,e.state),P(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,".useProgram(",n,".program);"),e.shader.program)N(t,r,e,e.shader.program);else{var i=t.global.def("{}"),a=r.def(n,".id"),o=r.def(i,"[",a,"]");r(t.cond(o).then(o,".call(this,a0);").else(o,"=",i,"[",a,"]=",t.link(function(r){return F(N,t,e,r,1)}),"(",n,");",o,".call(this,a0);"))}Object.keys(e.state).length>0&&r(t.shared.current,".dirty=true;")}function U(t,e,r,n){function i(){return!0}t.batchId="a1",I(t,e),O(t,e,r,n.attributes,i),R(t,e,r,n.uniforms,i),j(t,e,e,r)}function V(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}I(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var u=t.scope(),c=t.scope();if(e(u.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",c,"}",u.exit),r.needsContext&&L(t,c,r.context),r.needsFramebuffer&&C(t,c,r.framebuffer),z(t,c,r.state,i),r.profile&&i(r.profile)&&P(t,c,r,!1,!0),n)O(t,u,r,n.attributes,a),O(t,c,r,n.attributes,i),R(t,u,r,n.uniforms,a),R(t,c,r,n.uniforms,i),j(t,u,c,r);else{var h=t.global.def("{}"),f=r.shader.progVar.append(t,c),d=c.def(f,".id"),p=c.def(h,"[",d,"]");c(t.shared.gl,".useProgram(",f,".program);","if(!",p,"){",p,"=",h,"[",d,"]=",t.link(function(e){return F(U,t,r,e,2)}),"(",f,");}",p,".call(this,a0[",s,"],",s,");")}}function H(t,e){function r(t){return t.contextDep&&i||t.propDep}var n=t.proc("batch",2);t.batchId="0",I(t,n);var i=!1,a=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(L(t,n,e.context),a=!1);var o=e.framebuffer,s=!1;o?(o.propDep?i=s=!0:o.contextDep&&i&&(s=!0),s||C(t,n,o)):C(t,n,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),D(t,n,e),z(t,n,e.state,function(t){return!r(t)}),e.profile&&r(e.profile)||P(t,n,e,!1,"a1"),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=s;var l=e.shader.progVar;if(l.contextDep&&i||l.propDep)V(t,n,e,null);else{var u=l.append(t,n);if(n(t.shared.gl,".useProgram(",u,".program);"),e.shader.program)V(t,n,e,e.shader.program);else{var c=t.global.def("{}"),h=n.def(u,".id"),f=n.def(c,"[",h,"]");n(t.cond(f).then(f,".call(this,a0,a1);").else(f,"=",c,"[",h,"]=",t.link(function(r){return F(V,t,e,r,2)}),"(",u,");",f,".call(this,a0,a1);"))}}Object.keys(e.state).length>0&&n(t.shared.current,".dirty=true;")}function q(t,r){function n(e){var n=r.shader[e];n&&i.set(a.shader,"."+e,n.append(t,i))}var i=t.proc("scope",3);t.batchId="a2";var a=t.shared,o=a.current;L(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),Vt(Object.keys(r.state)).forEach(function(e){var n=r.state[e],o=n.append(t,i);mt(o)?o.forEach(function(r,n){i.set(t.next[e],"["+n+"]",r)}):i.set(a.next,"."+e,o)}),P(t,i,r,!0,!0),[ji,Bi,Ni,Ui,Fi].forEach(function(e){var n=r.draw[e];n&&i.set(a.draw,"."+e,""+n.append(t,i))}),Object.keys(r.uniforms).forEach(function(n){i.set(a.uniforms,"["+e.id(n)+"]",r.uniforms[n].append(t,i))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new X).forEach(function(t){i.set(a,"."+t,n[t])})}),n(Oi),n(Ri),Object.keys(r.state).length>0&&(i(o,".dirty=true;"),i.exit(o,".dirty=true;")),i("a1(",t.shared.context,",a0,",t.batchId,");")}function G(t){if("object"==typeof t&&!mt(t)){for(var e=Object.keys(t),r=0;r=0;--t){var r=q[t];r&&r(E,null,0)}v.flush(),A&&A.update()}function r(){!J&&q.length>0&&(J=ve.next(e))}function n(){J&&(ve.cancel(e),J=null)}function i(t){t.preventDefault(),b=!0,n(),G.forEach(function(t){t()})}function a(t){v.getError(),b=!1,x.restore(),O.restore(),z.restore(),R.restore(),j.restore(),F.restore(),A&&A.restore(),N.procs.refresh(),r(),Y.forEach(function(t){t()})}function o(){q.length=0,n(),H&&(H.removeEventListener(eo,i),H.removeEventListener(ro,a)),O.clear(),F.clear(),j.clear(),R.clear(),I.clear(),z.clear(),A&&A.clear(),Z.forEach(function(t){t()})}function s(t){function e(t){var e={},r={};return Object.keys(t).forEach(function(n){var i=t[n];ge.isDynamic(i)?r[n]=ge.unbox(i,n):e[n]=i}),{dynamic:r,static:e}}function r(t){for(;d.length0)return h.call(this,r(0|t),0|t)}else{if(!Array.isArray(t))return c.call(this,t);if(t.length)return h.call(this,t,t.length)}}de(!!t,"invalid args to regl({...})"),de.type(t,"object","invalid args to regl({...})");var i=e(t.context||{}),a=e(t.uniforms||{}),o=e(t.attributes||{}),s=e(function(t){function e(t){if(t in r){var e=r[t];delete r[t],Object.keys(e).forEach(function(n){r[t+"."+n]=e[n]})}}var r=$t({},t);return delete r.uniforms,delete r.attributes,delete r.context,"stencil"in r&&r.stencil.op&&(r.stencil.opBack=r.stencil.opFront=r.stencil.op,delete r.stencil.op),e("blend"),e("depth"),e("cull"),e("stencil"),e("polygonOffset"),e("scissor"),e("sample"),r}(t)),l={gpuTime:0,cpuTime:0,count:0},u=N.compile(s,o,a,i,l),c=u.draw,h=u.batch,f=u.scope,d=[];return $t(n,{stats:l})}function l(t,e){var r=0;N.procs.poll();var n=e.color;n&&(v.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=Ka),"depth"in e&&(v.clearDepth(+e.depth),r|=Qa),"stencil"in e&&(v.clearStencil(0|e.stencil),r|=$a),de(!!r,"called regl.clear with no buffer specified"),v.clear(r)}function u(t){if(de("object"==typeof t&&t,"regl.clear() takes an object as input"),"framebuffer"in t)if(t.framebuffer&&"framebufferCube"===t.framebuffer_reglType)for(var e=0;e<6;++e)K($t({framebuffer:t.framebuffer.faces[e]},t),l);else K(t,l);else l(null,t)}function c(t){function e(){function e(){var t=Zt(q,e);q[t]=q[q.length-1],q.length-=1,q.length<=0&&n()}var r=Zt(q,t);de(r>=0,"cannot cancel a frame twice"),q[r]=e}return de.type(t,"function","regl.frame() callback must be a function"),q.push(t),r(),{cancel:e}}function h(){var t=V.viewport,e=V.scissor_box;t[0]=t[1]=e[0]=e[1]=0,E.viewportWidth=E.framebufferWidth=E.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,E.viewportHeight=E.framebufferHeight=E.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function f(){E.tick+=1,E.time=p(),h(),N.procs.poll()}function d(){h(),N.procs.refresh(),A&&A.update()}function p(){return(ye()-k)/1e3}function m(t,e){de.type(e,"function","listener callback must be a function");var r;switch(t){case"frame":return c(e);case"lost":r=G;break;case"restore":r=Y;break;case"destroy":r=Z;break;default:de.raise("invalid event, must be one of frame,lost,restore,destroy")}return r.push(e),{cancel:function(){for(var t=0;t=0},read:U,destroy:o,_gl:v,_refresh:d,poll:function(){f(),A&&A.update()},now:p,stats:w});return g.onDone(null,Q),Q}var Kt={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Qt=function(t){return Object.prototype.toString.call(t)in Kt},$t=function(t,e){for(var r=Object.keys(e),n=0;n=2,"invalid renderbuffer shape"),a=0|d[0],o=0|d[1]}else"radius"in f&&(a=o=0|f.radius),"width"in f&&(a=0|f.width),"height"in f&&(o=0|f.height);"format"in f&&(de.parameter(f.format,u,"invalid renderbuffer format"),l=u[f.format])}else"number"==typeof e?(a=0|e,o="number"==typeof n?0|n:a):e?de.raise("invalid arguments to renderbuffer constructor"):a=o=1;if(de(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),a!==h.width||o!==h.height||l!==h.format)return s.width=h.width=a,s.height=h.height=o,h.format=l,t.bindRenderbuffer(xn,h.renderbuffer),t.renderbufferStorage(xn,l,a,o),i.profile&&(h.stats.size=zt(h.format,h.width,h.height)),s.format=c[h.format],s}function l(e,n){var a=0|e,o=0|n||a;return a===h.width&&o===h.height?s:(de(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),s.width=h.width=a,s.height=h.height=o,t.bindRenderbuffer(xn,h.renderbuffer),t.renderbufferStorage(xn,h.format,a,o),i.profile&&(h.stats.size=zt(h.format,h.width,h.height)),s)}var h=new a(t.createRenderbuffer());return f[h.id]=h,n.renderbufferCount++,s(e,o),s.resize=l,s._reglType="renderbuffer",s._renderbuffer=h,i.profile&&(s.stats=h.stats),s.destroy=function(){h.decRef()},s}function l(){xe(f).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(xn,e.renderbuffer),t.renderbufferStorage(xn,e.format,e.width,e.height)}),t.bindRenderbuffer(xn,null)}var u={rgba4:_n,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};e.ext_srgb&&(u.srgba=35907),e.ext_color_buffer_half_float&&(u.rgba16f=34842,u.rgb16f=34843),e.webgl_color_buffer_float&&(u.rgba32f=34836);var c=[];Object.keys(u).forEach(function(t){var e=u[t];c[e]=t});var h=0,f={};return a.prototype.decRef=function(){--this.refCount<=0&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:s,clear:function(){xe(f).forEach(o)},restore:l}},An=36160,kn=36161,Tn=3553,Sn=34069,En=36064,Ln=36096,Cn=36128,Dn=33306,zn=36053,In=6402,Pn=[6408],On=[];On[6408]=4;var Rn=[];Rn[5121]=1,Rn[5126]=4,Rn[36193]=2;var jn=33189,Fn=36168,Nn=34041,Bn=[32854,32855,36194,35907,34842,34843,34836],Un={};Un[zn]="complete",Un[36054]="incomplete attachment",Un[36057]="incomplete dimensions",Un[36055]="incomplete, missing attachment",Un[36061]="unsupported" +;var Vn=5126,Hn=35632,qn=35633,Gn=35718,Yn=35721,Wn=6408,Xn=5121,Zn=3333,Jn=5126,Kn="xyzw".split(""),Qn=5121,$n=1,ti=2,ei=0,ri=1,ni=2,ii=3,ai=4,oi="dither",si="blend.enable",li="blend.color",ui="blend.equation",ci="blend.func",hi="depth.enable",fi="depth.func",di="depth.range",pi="depth.mask",mi="colorMask",gi="cull.enable",vi="cull.face",yi="frontFace",bi="lineWidth",xi="polygonOffset.enable",_i="polygonOffset.offset",wi="sample.alpha",Mi="sample.enable",Ai="sample.coverage",ki="stencil.enable",Ti="stencil.mask",Si="stencil.func",Ei="stencil.opFront",Li="stencil.opBack",Ci="scissor.enable",Di="scissor.box",zi="viewport",Ii="profile",Pi="framebuffer",Oi="vert",Ri="frag",ji="elements",Fi="primitive",Ni="count",Bi="offset",Ui="instances",Vi=Pi+"Width",Hi=Pi+"Height",qi=zi+"Width",Gi=zi+"Height",Yi="drawingBufferWidth",Wi="drawingBufferHeight",Xi=[ci,ui,Si,Ei,Li,Ai,zi,Di,_i],Zi=34962,Ji=34963,Ki=3553,Qi=34067,$i=2884,ta=3042,ea=3024,ra=2960,na=2929,ia=3089,aa=32823,oa=32926,sa=32928,la=5126,ua=35664,ca=35665,ha=35666,fa=5124,da=35667,pa=35668,ma=35669,ga=35670,va=35671,ya=35672,ba=35673,xa=35674,_a=35675,wa=35676,Ma=35678,Aa=35680,ka=4,Ta=1028,Sa=1029,Ea=2304,La=2305,Ca=32775,Da=32776,za=519,Ia=7680,Pa=0,Oa=1,Ra=32774,ja=513,Fa=36160,Na=36064,Ba={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Ua=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],Va={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ha={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},qa={frag:35632,vert:35633},Ga={cw:Ea,ccw:La},Ya=new Ht(!1,!1,!1,function(){}),Wa=34918,Xa=34919,Za=35007,Ja=function(t,e){function r(){return f.pop()||h.createQueryEXT()}function n(t){f.push(t)}function i(t){var e=r();h.beginQueryEXT(Za,e),d.push(e),u(d.length-1,d.length,t)}function a(){h.endQueryEXT(Za)}function o(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}function s(){return p.pop()||new o}function l(t){p.push(t)}function u(t,e,r){var n=s();n.startQueryIndex=t,n.endQueryIndex=e,n.sum=0,n.stats=r,m.push(n)}function c(){var t,e,r=d.length;if(0!==r){v.length=Math.max(v.length,r+1),g.length=Math.max(g.length,r+1),g[0]=0,v[0]=0;var i=0;for(t=0,e=0;e=r)return a.substr(0,r);for(;r>a.length&&e>1;)1&e&&(a+=t),e>>=1,t+=t;return a+=t,a=a.substr(0,r)}var i,a="";e.exports=n},{}],479:[function(e,r,n){!function(e,i){"function"==typeof t&&t.amd?t(i):"object"==typeof n?r.exports=i():e.resolveUrl=i()}(this,function(){function t(){var t=arguments.length;if(0===t)throw new Error("resolveUrl requires at least one argument; got none.");var e=document.createElement("base");if(e.href=arguments[0],1===t)return e.href;var r=document.getElementsByTagName("head")[0];r.insertBefore(e,r.firstChild);for(var n,i=document.createElement("a"),a=1;a=0;--i){var a=r,o=t[i];r=a+o;var s=r-a,l=o-s;l&&(t[--n]=r,r=l)}for(var u=0,i=n;i>1;return["sum(",o(t.slice(0,e)),",",o(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("");for(var e=[],r=0;r>1;return["sum(",a(t.slice(0,e)),",",a(t.slice(e)),")"].join("")}function o(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return o(e,t)}function s(t){return t&!0?"-":""}function l(t){if(2===t.length)return[["diff(",o(t[0][0],t[1][1]),",",o(t[1][0],t[0][1]),")"].join("")];for(var e=[],r=0;r0&&r.push(","),r.push("[");for(var a=0;a0&&r.push(","),a===n?r.push("+b[",i,"]"):r.push("+A[",i,"][",a,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",e);var s=new Function("det",r.join(""));return s(t<6?o[t]:o)}function i(){return[0]}function a(t,e){return[[e[0]],[t[0][0]]]}var o=t("robust-determinant"),s=6,l=[i,a];!function(){for(;l.length>1;return["sum(",o(t.slice(0,e)),",",o(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],r=0;r0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=3.3306690738754716e-16*n;return o>=s||o<=-s?o:m(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],u=r[1]-n[1],c=t[2]-n[2],h=e[2]-n[2],f=r[2]-n[2],d=a*u,p=o*l,m=o*s,v=i*u,y=i*l,b=a*s,x=c*(d-p)+h*(m-v)+f*(y-b),_=(Math.abs(d)+Math.abs(p))*Math.abs(c)+(Math.abs(m)+Math.abs(v))*Math.abs(h)+(Math.abs(y)+Math.abs(b))*Math.abs(f),w=7.771561172376103e-16*_;return x>w||-x>w?x:g(t,e,r,n)}];!function(){for(;v.length<=p;)v.push(l(v.length));for(var t=[],r=["slow"],n=0;n<=p;++n)t.push("a"+n),r.push("o"+n);for(var i=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"],n=2;n<=p;++n)i.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i0&&s>0||o<0&&s<0)return!1;var l=a(r,t,e),u=a(i,t,e);return!(l>0&&u>0||l<0&&u<0)&&(0!==o||0!==s||0!==l||0!==u||n(t,e,r,i))}e.exports=i;var a=t("robust-orientation")[3]},{"robust-orientation":486}],490:[function(t,e,r){"use strict";function n(t,e){var r=t+e,n=r-t,i=r-n,a=e-n,o=t-i,s=o+a;return s?[s,r]:[r]}function i(t,e){var r=0|t.length,i=0|e.length;if(1===r&&1===i)return n(t[0],-e[0]);var a,o,s=r+i,l=new Array(s),u=0,c=0,h=0,f=Math.abs,d=t[c],p=f(d),m=-e[h],g=f(m);p=i?(a=d,(c+=1)=i?(a=d,(c+=1)0){for(var s=0,l=0,u=0;un.h||t>n.free||rc)&&(h=2*Math.max(t,c)),(ll)&&(u=2*Math.max(r,l)),this.resize(h,u),this.packOne(t,r)}return null},t.prototype.clear=function(){this.shelves=[],this.stats={}},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;rthis.free||e>this.h)return null;var r=this.x;return this.x+=t,this.free-=t,{x:r,y:this.y,w:t,h:e,width:t,height:e}},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t})},{}],493:[function(t,e,r){"use strict";e.exports=function(t){return t<0?-1:t>0?1:0}},{}],494:[function(t,e,r){"use strict";function n(t){return a(i(t))}e.exports=n;var i=t("boundary-cells"),a=t("reduce-simplicial-complex")},{"boundary-cells":59,"reduce-simplicial-complex":476}],495:[function(t,e,r){"use strict";function n(t){for(var e=t.length,r=0,n=0;n>1,v=E[2*m+1];","if(v===b){return m}","if(b1;--n){n0&&l.push(","),l.push("[");for(var n=0;n0&&l.push(","),l.push("B(C,E,c[",i[0],"],c[",i[1],"])")}l.push("]")}l.push(");")}}(i[s]),l.push("break;");l.push("}}")}return l.push("}return R;};return getContour",t,"d"),new Function("pool",l.join(""))(a)}function i(t){var e=s[t];return e||(e=s[t]=n(t)),e}e.exports=i;var a=t("typedarray-pool"),o=t("marching-simplex-table"),s={}},{"marching-simplex-table":424,"typedarray-pool":518}],497:[function(t,e,r){"use strict";"use restrict";function n(t){for(var e=0,r=Math.max,n=0,i=t.length;n>1,s=o(t[a],e);s<=0?(0===s&&(i=a),r=a+1):s>0&&(n=a-1)}return i}function h(t,e){for(var r=new Array(t.length),n=0,i=r.length;n=t.length||0!==o(t[m],a))break}return r}function f(t,e){if(!e)return h(u(p(t,0)),t,0);for(var r=new Array(e),n=0;n>>c&1&&u.push(i[c]);e.push(u)}return l(e)}function p(t,e){if(e<0)return[];for(var r=[],n=(1<>1:(t>>1)-1}function u(t){for(var e=s(t);;){var r=e,n=2*t+1,i=2*(t+1),o=t;if(n0;){var r=l(t);if(r>=0){if(e0){var t=A[0];return a(0,T-1),T-=1,u(0),t}return-1}function f(t,e){var r=A[t];return y[r]===e?t:(y[r]=-1/0,c(t),h(),y[r]=e,T+=1,c(T-1))}function d(t,e){if(t[e]<0)return e;var r=e,n=e;do{var i=t[n];if(!b[n]||i<0||i===n)break;if(n=i,i=t[n],!b[n]||i<0||i===n)break;n=i,r=t[r]}while(r!==n);for(var a=e;a!==n;a=t[a])t[a]=n;return n}for(var p=e.length,m=t.length,g=new Array(p),v=new Array(p),y=new Array(p),b=new Array(p),x=0;x>1;x>=0;--x)u(x);for(;;){var S=h();if(S<0||y[S]>r)break;!function(t){if(!b[t]){b[t]=!0;var e=g[t],r=v[t];g[r]>=0&&(g[r]=e),v[e]>=0&&(v[e]=r),k[e]>=0&&f(k[e],i(e)),k[r]>=0&&f(k[r],i(r))}}(S)}for(var E=[],x=0;x=0&&r>=0&&e!==r){var n=k[e],i=k[r];n!==i&&L.push([n,i])}}),o.unique(o.normalize(L)),{positions:E,edges:L}}e.exports=i;var a=t("robust-orientation"),o=t("simplicial-complex")},{"robust-orientation":486,"simplicial-complex":499}],502:[function(t,e,r){"use strict";function n(t,e){var r,n;if(e[0][0]e[1][0])){var i=Math.min(t[0][1],t[1][1]),o=Math.max(t[0][1],t[1][1]),s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]);return ol?i-l:o-l}r=e[1],n=e[0]}var u,c;t[0][1]e[1][0]))return n(e,t);r=e[1],i=e[0]}var o,s;if(t[0][0]t[1][0]))return-n(t,e);o=t[1],s=t[0]}var l=a(r,i,s),u=a(r,i,o);if(l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;if(l=a(s,o,i),u=a(s,o,r),l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;return i[0]-s[0]}e.exports=i;var a=t("robust-orientation")},{"robust-orientation":486}],503:[function(t,e,r){"use strict";function n(t,e,r){this.slabs=t,this.coordinates=e,this.horizontal=r}function i(t,e){return t.y-e}function a(t,e){for(var r=null;t;){var n,i,o=t.key;o[0][0]0)if(e[0]!==o[1][0])r=t,t=t.right;else{var l=a(t.right,e);if(l)return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l=a(t.right,e);if(l)return l;t=t.left}}return r}function o(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function s(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}function l(t){for(var e=t.length,r=2*e,i=new Array(r),a=0;a0){var s=a(this.slabs[e-1],t);s&&(o?f(s.key,o)>0&&(o=s.key,n=s.value):(n=s.value,o=s.key))}var l=this.horizontal[e];if(l.length>0){var c=u.ge(l,t[1],i);if(c=l.length)return n;d=l[c]}}if(d.start)if(o){var p=h(o[0],o[1],[t[0],d.y]);o[0][0]>o[1][0]&&(p=-p),p>0&&(n=d.index)}else n=d.index;else d.y!==t[1]&&(n=d.index)}}}return n}},{"./lib/order-segments":502,"binary-search-bounds":56,"functional-red-black-tree":117,"robust-orientation":486}],504:[function(t,e,r){"use strict";function n(t,e){var r=u(l(t,e),[e[e.length-1]]);return r[r.length-1]}function i(t,e,r,n){var i=n-e,a=-e/i;a<0?a=0:a>1&&(a=1);for(var o=1-a,s=t.length,l=new Array(s),u=0;u0||o>0&&c<0){var h=i(s,c,l,o);r.push(h),a.push(h.slice())}c<0?a.push(l.slice()):c>0?r.push(l.slice()):(r.push(l.slice()),a.push(l.slice())),o=c}return{positive:r,negative:a}}function o(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l0||a>0&&u<0)&&r.push(i(o,u,s,a)),u>=0&&r.push(s.slice()),a=u}return r}function s(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l0||a>0&&u<0)&&r.push(i(o,u,s,a)),u<=0&&r.push(s.slice()),a=u}return r}var l=t("robust-dot-product"),u=t("robust-sum");e.exports=a,e.exports.positive=o,e.exports.negative=s},{"robust-dot-product":483,"robust-sum":491}],505:[function(e,r,n){!function(e){function r(){var t=arguments[0],e=r.cache;return e[t]&&e.hasOwnProperty(t)||(e[t]=r.parse(t)),r.format.call(null,e[t],arguments)}function i(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function a(t,e){return Array(e+1).join(t)}var o={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i, +key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};r.format=function(t,e){var n,s,l,u,c,h,f,d=1,p=t.length,m="",g=[],v=!0,y="";for(s=0;s=0),u[8]){case"b":n=n.toString(2);break;case"c":n=String.fromCharCode(n);break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,u[6]?parseInt(u[6]):0);break;case"e":n=u[7]?n.toExponential(u[7]):n.toExponential();break;case"f":n=u[7]?parseFloat(n).toFixed(u[7]):parseFloat(n);break;case"g":n=u[7]?parseFloat(n).toPrecision(u[7]):parseFloat(n);break;case"o":n=n.toString(8);break;case"s":n=(n=String(n))&&u[7]?n.substring(0,u[7]):n;break;case"u":n>>>=0;break;case"x":n=n.toString(16);break;case"X":n=n.toString(16).toUpperCase()}o.json.test(u[8])?g[g.length]=n:(!o.number.test(u[8])||v&&!u[3]?y="":(y=v?"+":"-",n=n.toString().replace(o.sign,"")),h=u[4]?"0"===u[4]?"0":u[4].charAt(1):" ",f=u[6]-(y+n).length,c=u[6]&&f>0?a(h,f):"",g[g.length]=u[5]?y+n+c:"0"===h?y+c+n:c+y+n)}return g.join("")},r.cache={},r.parse=function(t){for(var e=t,r=[],n=[],i=0;e;){if(null!==(r=o.text.exec(e)))n[n.length]=r[0];else if(null!==(r=o.modulo.exec(e)))n[n.length]="%";else{if(null===(r=o.placeholder.exec(e)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){i|=1;var a=[],s=r[2],l=[];if(null===(l=o.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a[a.length]=l[1];""!==(s=s.substring(l[0].length));)if(null!==(l=o.key_access.exec(s)))a[a.length]=l[1];else{if(null===(l=o.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a[a.length]=l[1]}r[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n[n.length]=r}e=e.substring(r[0].length)}return n};var s=function(t,e,n){return n=(e||[]).slice(0),n.splice(0,0,t),r.apply(null,n)};void 0!==n?(n.sprintf=r,n.vsprintf=s):(e.sprintf=r,e.vsprintf=s,"function"==typeof t&&t.amd&&t(function(){return{sprintf:r,vsprintf:s}}))}("undefined"==typeof window?this:window)},{}],506:[function(t,e,r){"use strict";function n(t){return new i(t)}function i(t){this.options=d(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function a(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}function o(t,e){var r=t.geometry.coordinates;return{x:u(r[0]),y:c(r[1]),zoom:1/0,id:e,parentId:-1}}function s(t){return{type:"Feature",properties:l(t),geometry:{type:"Point",coordinates:[h(t.x),f(t.y)]}}}function l(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return d(d({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function u(t){return t/360+.5}function c(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function h(t){return 360*(t-.5)}function f(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function d(t,e){for(var r in e)t[r]=e[r];return t}function p(t){return t.x}function m(t){return t.y}var g=t("kdbush");e.exports=n,i.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var r="prepare "+t.length+" points";e&&console.time(r),this.points=t;var n=t.map(o);e&&console.timeEnd(r);for(var i=this.options.maxZoom;i>=this.options.minZoom;i--){var a=+Date.now();this.trees[i+1]=g(n,p,m,this.options.nodeSize,Float32Array),n=this._cluster(n,i),e&&console.log("z%d: %d clusters in %dms",i,n.length,+Date.now()-a)}return this.trees[this.options.minZoom]=g(n,p,m,this.options.nodeSize,Float32Array),e&&console.timeEnd("total time"),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],n=r.range(u(t[0]),c(t[3]),u(t[2]),c(t[1])),i=[],a=0;a c)|0 },"),"generic"===e&&n.push("getters:[0],");for(var a=[],l=[],u=0;u>>7){");for(var u=0;u<1<<(1<128&&u%128==0){h.length>0&&f.push("}}");var d="vExtra"+h.length;n.push("case ",u>>>7,":",d,"(m&0x7f,",l.join(),");break;"),f=["function ",d,"(m,",l.join(),"){switch(m){"],h.push(f)}f.push("case ",127&u,":");for(var p=new Array(r),m=new Array(r),g=new Array(r),v=new Array(r),y=0,b=0;bb)&&!(u&1<<_)!=!(u&1<0&&(k="+"+g[x]+"*c");var T=p[x].length/y*.5,S=.5+v[x]/y*.5;A.push("d"+x+"-"+S+"-"+T+"*("+p[x].join("+")+k+")/("+m[x].join("+")+")")}f.push("a.push([",A.join(),"]);","break;")}n.push("}},"),h.length>0&&f.push("}}");for(var E=[],u=0;u<1<0&&(f+=.02);for(var p=new Float32Array(h),m=0,g=-.5*f,d=0;d=0?1.2:1))}function i(t,e,r,n,i,o,s){for(var l=0;l.5?l/(2-a-o):l/(a+o),a){case t:n=(e-r)/l+(e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}var i,a,o;if(t=S(t,360),e=S(e,100),r=S(r,100),0===e)i=a=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;i=n(l,s,t+1/3),a=n(l,s,t),o=n(l,s,t-1/3)}return{r:255*i,g:255*a,b:255*o}}function l(t,e,r){t=S(t,255),e=S(e,255),r=S(r,255);var n,i,a=q(t,e,r),o=H(t,e,r),s=a,l=a-o;if(i=0===a?0:l/a,a==o)n=0;else{switch(a){case t:n=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+a)%360,o.push(n(i));return o}function k(t,e){e=e||6;for(var r=n(t).toHsv(),i=r.h,a=r.s,o=r.v,s=[],l=1/e;e--;)s.push(n({h:i,s:a,v:o})),o=(o+l)%1;return s}function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function S(t,r){C(t)&&(t="100%");var n=D(t);return t=H(r,q(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function E(t){return H(1,q(0,t))}function L(t){return parseInt(t,16)}function C(t){return"string"==typeof t&&t.indexOf(".")!=-1&&1===parseFloat(t)}function D(t){return"string"==typeof t&&t.indexOf("%")!=-1}function z(t){return 1==t.length?"0"+t:""+t}function I(t){return t<=1&&(t=100*t+"%"),t}function P(t){return e.round(255*parseFloat(t)).toString(16)}function O(t){return L(t)/255}function R(t){return!!X.CSS_UNIT.exec(t)}function j(t){t=t.replace(N,"").replace(B,"").toLowerCase();var e=!1;if(Y[t])t=Y[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=X.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=X.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=X.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=X.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=X.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=X.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=X.hex8.exec(t))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),a:O(r[4]),format:e?"name":"hex8"}:(r=X.hex6.exec(t))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),format:e?"name":"hex"}:(r=X.hex4.exec(t))?{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),a:O(r[4]+""+r[4]),format:e?"name":"hex8"}:!!(r=X.hex3.exec(t))&&{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),format:e?"name":"hex"}}function F(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:e,size:r}}var N=/^\s+/,B=/\s+$/,U=0,V=e.round,H=e.min,q=e.max,G=e.random;n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,n,i,a,o,s=this.toRgb();return t=s.r/255,r=s.g/255,n=s.b/255,i=t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4),a=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),o=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*o},setAlpha:function(t){return this._a=T(t),this._roundA=V(100*this._a)/100,this},toHsv:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=l(this._r,this._g,this._b),e=V(360*t.h),r=V(100*t.s),n=V(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=o(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=o(this._r,this._g,this._b),e=V(360*t.h),r=V(100*t.s),n=V(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return c(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return h(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:V(this._r),g:V(this._g),b:V(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+V(this._r)+", "+V(this._g)+", "+V(this._b)+")":"rgba("+V(this._r)+", "+V(this._g)+", "+V(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:V(100*S(this._r,255))+"%",g:V(100*S(this._g,255))+"%",b:V(100*S(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+V(100*S(this._r,255))+"%, "+V(100*S(this._g,255))+"%, "+V(100*S(this._b,255))+"%)":"rgba("+V(100*S(this._r,255))+"%, "+V(100*S(this._g,255))+"%, "+V(100*S(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(W[c(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+f(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=n(t);r="#"+f(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(k,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]="a"===i?t[i]:I(t[i]));t=r}return n(t,e)},n.equals=function(t,e){return!(!t||!e)&&n(t).toRgbString()==n(e).toRgbString()},n.random=function(){return n.fromRatio({r:G(),g:G(),b:G()})},n.mix=function(t,e,r){r=0===r?0:r||50;var i=n(t).toRgb(),a=n(e).toRgb(),o=r/100;return n({r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a})},n.readability=function(t,r){var i=n(t),a=n(r);return(e.max(i.getLuminance(),a.getLuminance())+.05)/(e.min(i.getLuminance(),a.getLuminance())+.05)},n.isReadable=function(t,e,r){var i,a,o=n.readability(t,e);switch(a=!1,i=F(r),i.level+i.size){case"AAsmall":case"AAAlarge":a=o>=4.5;break;case"AAlarge":a=o>=3;break;case"AAAsmall":a=o>=7}return a},n.mostReadable=function(t,e,r){var i,a,o,s,l=null,u=0;r=r||{},a=r.includeFallbackColors,o=r.level,s=r.size;for(var c=0;cu&&(u=i,l=n(e[c]));return n.isReadable(t,l,{level:o,size:s})||!a?l:(r.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],r))};var Y=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},W=n.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(Y),X=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();void 0!==r&&r.exports?r.exports=n:"function"==typeof t&&t.amd?t(function(){return n}):window.tinycolor=n}(Math)},{}],512:[function(t,e,r){"use strict";function n(t,e){var r=o(getComputedStyle(t).getPropertyValue(e));return r[0]*a(r[1],t)}function i(t,e){var r=document.createElement("div");r.style["font-size"]="128"+t,e.appendChild(r);var i=n(r,"font-size")/128;return e.removeChild(r),i}function a(t,e){switch(e=e||document.body,t=(t||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case"%":return e.clientHeight/100;case"ch":case"ex":return i(t,e);case"em":return n(e,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return s;case"cm":return s/2.54;case"mm":return s/25.4;case"pt":return s/72;case"pc":return s/6}return 1}var o=t("parse-unit");e.exports=a;var s=96},{"parse-unit":453}],513:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.topojson=e.topojson||{})}(this,function(t){"use strict";function e(t,e){var n=e.id,i=e.bbox,a=null==e.properties?{}:e.properties,o=r(t,e);return null==n&&null==i?{type:"Feature",properties:a,geometry:o}:null==i?{type:"Feature",id:n,properties:a,geometry:o}:{type:"Feature",id:n,bbox:i,properties:a,geometry:o}}function r(t,e){function r(t,e){e.length&&e.pop();for(var r=h[t<0?~t:t],n=0,i=r.length;n1)n=i(t,e,r);else for(a=0,n=new Array(o=t.arcs.length);a1)for(var i,a,l=1,u=o(n[0]);lu&&(a=n[0],n[0]=n[l],n[l]=a,u=i);return n})}}var s=function(t){return t},l=function(t){if(null==(e=t.transform))return s;var e,r,n,i=e.scale[0],a=e.scale[1],o=e.translate[0],l=e.translate[1];return function(t,e){return e||(r=n=0),t[0]=(r+=t[0])*i+o,t[1]=(n+=t[1])*a+l,t}},u=function(t){function e(t){s[0]=t[0],s[1]=t[1],o(s),s[0]h&&(h=s[0]),s[1]f&&(f=s[1])}function r(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(r);break;case"Point":e(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(e)}}var n=t.bbox;if(!n){var i,a,o=l(t),s=new Array(2),u=1/0,c=u,h=-u,f=-u +;t.arcs.forEach(function(t){for(var e=-1,r=t.length;++eh&&(h=s[0]),s[1]f&&(f=s[1])});for(a in t.objects)r(t.objects[a]);n=t.bbox=[u,c,h,f]}return n},c=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r},h=function(t,r){return"GeometryCollection"===r.type?{type:"FeatureCollection",features:r.geometries.map(function(r){return e(t,r)})}:e(t,r)},f=function(t,e){function r(e){var r,n=t.arcs[e<0?~e:e],i=n[0];return t.transform?(r=[0,0],n.forEach(function(t){r[0]+=t[0],r[1]+=t[1]})):r=n[n.length-1],e<0?[r,i]:[i,r]}function n(t,e){for(var r in t){var n=t[r];delete e[n.start],delete n.start,delete n.end,n.forEach(function(t){i[t<0?~t:t]=1}),s.push(n)}}var i={},a={},o={},s=[],l=-1;return e.forEach(function(r,n){var i,a=t.arcs[r<0?~r:r];a.length<3&&!a[1][0]&&!a[1][1]&&(i=e[++l],e[l]=r,e[n]=i)}),e.forEach(function(t){var e,n,i=r(t),s=i[0],l=i[1];if(e=o[s])if(delete o[e.end],e.push(t),e.end=l,n=a[l]){delete a[n.start];var u=n===e?e:e.concat(n);a[u.start=e.start]=o[u.end=n.end]=u}else a[e.start]=o[e.end]=e;else if(e=a[l])if(delete a[e.start],e.unshift(t),e.start=s,n=o[s]){delete o[n.end];var c=n===e?e:n.concat(e);a[c.start=n.start]=o[c.end=e.end]=c}else a[e.start]=o[e.end]=e;else e=[t],a[e.start=s]=o[e.end=l]=e}),n(o,a),n(a,o),e.forEach(function(t){i[t<0?~t:t]||s.push([t])}),s},d=function(t){return r(t,n.apply(this,arguments))},p=function(t){return r(t,o.apply(this,arguments))},m=function(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error("n must be \u22652");if(t.transform)throw new Error("already quantized");var i,a=u(t),o=a[0],s=(a[2]-o)/(e-1)||1,l=a[1],c=(a[3]-l)/(e-1)||1;t.arcs.forEach(function(t){for(var e,r,n,i=1,a=1,u=t.length,h=t[0],f=h[0]=Math.round((h[0]-o)/s),d=h[1]=Math.round((h[1]-l)/c);iMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,s=0;s<3;++s)a+=t[s]*t[s],o+=i[s]*t[s];for(var s=0;s<3;++s)i[s]-=o/a*t[s];return f(i,i),i}function o(t,e,r,n,i,a,o,s){this.center=l(r),this.up=l(n),this.right=l(i),this.radius=l([a]),this.angle=l([o,s]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var u=0;u<16;++u)this.computedMatrix[u]=.5;this.recalcMatrix(0)}function s(t){t=t||{};var e=t.center||[0,0,0],r=t.up||[0,1,0],i=t.right||a(r),s=t.radius||1,l=t.theta||0,u=t.phi||0;if(e=[].slice.call(e,0,3),r=[].slice.call(r,0,3),f(r,r),i=[].slice.call(i,0,3),f(i,i),"eye"in t){var c=t.eye,p=[c[0]-e[0],c[1]-e[1],c[2]-e[2]];h(i,p,r),n(i[0],i[1],i[2])<1e-6?i=a(r):f(i,i),s=n(p[0],p[1],p[2]);var m=d(r,p)/s,g=d(i,p)/s;u=Math.acos(m),l=Math.acos(g)}return s=Math.log(s),new o(t.zoomMin,t.zoomMax,e,r,i,s,l,u)}e.exports=s;var l=t("filtered-vector"),u=t("gl-mat4/invert"),c=t("gl-mat4/rotate"),h=t("gl-vec3/cross"),f=t("gl-vec3/normalize"),d=t("gl-vec3/dot"),p=o.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,i=0,a=0,o=0;o<3;++o)a+=e[o]*r[o],i+=e[o]*e[o];for(var s=Math.sqrt(i),l=0,o=0;o<3;++o)r[o]-=e[o]*a/i,l+=r[o]*r[o],e[o]/=s;for(var u=Math.sqrt(l),o=0;o<3;++o)r[o]/=u;var c=this.computedToward;h(c,e,r),f(c,c);for(var d=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),v=Math.sin(p),y=Math.cos(m),b=Math.sin(m),x=this.computedCenter,_=g*y,w=v*y,M=b,A=-g*b,k=-v*b,T=y,S=this.computedEye,E=this.computedMatrix,o=0;o<3;++o){var L=_*r[o]+w*c[o]+M*e[o];E[4*o+1]=A*r[o]+k*c[o]+T*e[o],E[4*o+2]=L,E[4*o+3]=0}var C=E[1],D=E[5],z=E[9],I=E[2],P=E[6],O=E[10],R=D*O-z*P,j=z*I-C*O,F=C*P-D*I,N=n(R,j,F);R/=N,j/=N,F/=N,E[0]=R,E[4]=j,E[8]=F;for(var o=0;o<3;++o)S[o]=x[o]+E[2+4*o]*d;for(var o=0;o<3;++o){for(var l=0,B=0;B<3;++B)l+=E[o+4*B]*S[B];E[12+o]=-l}E[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var m=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;m[0]=i[2],m[1]=i[6],m[2]=i[10];for(var a=this.computedUp,o=this.computedRight,s=this.computedToward,l=0;l<3;++l)i[4*l]=a[l],i[4*l+1]=o[l],i[4*l+2]=s[l];c(i,i,n,m);for(var l=0;l<3;++l)a[l]=i[4*l],o[l]=i[4*l+1];this.up.set(t,a[0],a[1],a[2]),this.right.set(t,o[0],o[1],o[2])}},p.pan=function(t,e,r,i){e=e||0,r=r||0,i=i||0,this.recalcMatrix(t);var a=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),a[1]),s=a[5],l=a[9],u=n(o,s,l);o/=u,s/=u,l/=u;var c=a[0],h=a[4],f=a[8],d=c*o+h*s+f*l;c-=o*d,h-=s*d,f-=l*d;var p=n(c,h,f);c/=p,h/=p,f/=p;var m=c*e+o*r,g=h*e+s*r,v=f*e+l*r;this.center.move(t,m,g,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+i),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,a){var o=1;"number"==typeof r&&(o=0|r),(o<0||o>3)&&(o=1);var s=(o+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var l=e[o],c=e[o+4],h=e[o+8];if(a){var f=Math.abs(l),d=Math.abs(c),p=Math.abs(h),m=Math.max(f,d,p);f===m?(l=l<0?-1:1,c=h=0):p===m?(h=h<0?-1:1,l=c=0):(c=c<0?-1:1,l=h=0)}else{var g=n(l,c,h);l/=g,c/=g,h/=g}var v=e[s],y=e[s+4],b=e[s+8],x=v*l+y*c+b*h;v-=l*x,y-=c*x,b-=h*x;var _=n(v,y,b);v/=_,y/=_,b/=_;var w=c*b-h*y,M=h*v-l*b,A=l*y-c*v,k=n(w,M,A);w/=k,M/=k,A/=k,this.center.jump(t,q,G,Y),this.radius.idle(t),this.up.jump(t,l,c,h),this.right.jump(t,v,y,b);var T,S;if(2===o){var E=e[1],L=e[5],C=e[9],D=E*v+L*y+C*b,z=E*w+L*M+C*A;T=R<0?-Math.PI/2:Math.PI/2,S=Math.atan2(z,D)}else{var I=e[2],P=e[6],O=e[10],R=I*l+P*c+O*h,j=I*v+P*y+O*b,F=I*w+P*M+O*A;T=Math.asin(i(R)),S=Math.atan2(F,j)}this.angle.jump(t,S,T),this.recalcMatrix(t);var N=e[2],B=e[6],U=e[10],V=this.computedMatrix;u(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Y=V[14]/H,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-N*W,G-B*W,Y-U*W)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,a){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter,a=a||this.computedUp;var o=a[0],s=a[1],l=a[2],u=n(o,s,l);if(!(u<1e-6)){o/=u,s/=u,l/=u;var c=e[0]-r[0],h=e[1]-r[1],f=e[2]-r[2],d=n(c,h,f);if(!(d<1e-6)){c/=d,h/=d,f/=d;var p=this.computedRight,m=p[0],g=p[1],v=p[2],y=o*m+s*g+l*v;m-=y*o,g-=y*s,v-=y*l;var b=n(m,g,v);if(!(b<.01&&(m=s*f-l*h,g=l*c-o*f,v=o*h-s*c,(b=n(m,g,v))<1e-6))){m/=b,g/=b,v/=b,this.up.set(t,o,s,l),this.right.set(t,m,g,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(d));var x=s*v-l*g,_=l*m-o*v,w=o*g-s*m,M=n(x,_,w);x/=M,_/=M,w/=M;var A=o*c+s*h+l*f,k=m*c+g*h+v*f,T=x*c+_*h+w*f,S=Math.asin(i(A)),E=Math.atan2(T,k),L=this.angle._state,C=L[L.length-1],D=L[L.length-2];C%=2*Math.PI;var z=Math.abs(C+2*Math.PI-E),I=Math.abs(C-E),P=Math.abs(C-2*Math.PI-E);z0?r.pop():new ArrayBuffer(t)}function s(t){return new Uint8Array(o(t),0,t)}function l(t){return new Uint16Array(o(2*t),0,t)}function u(t){return new Uint32Array(o(4*t),0,t)}function c(t){return new Int8Array(o(t),0,t)}function h(t){return new Int16Array(o(2*t),0,t)}function f(t){return new Int32Array(o(4*t),0,t)}function d(t){return new Float32Array(o(4*t),0,t)}function p(t){return new Float64Array(o(8*t),0,t)}function m(t){return x?new Uint8ClampedArray(o(t),0,t):s(t)}function g(t){return new DataView(o(t),0,t)}function v(t){t=y.nextPow2(t);var e=y.log2(t),r=M[e];return r.length>0?r.pop():new n(t)}var y=t("bit-twiddle"),b=t("dup");e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:b([32,0]),UINT16:b([32,0]),UINT32:b([32,0]),INT8:b([32,0]),INT16:b([32,0]),INT32:b([32,0]),FLOAT:b([32,0]),DOUBLE:b([32,0]),DATA:b([32,0]),UINT8C:b([32,0]),BUFFER:b([32,0])});var x="undefined"!=typeof Uint8ClampedArray,_=e.__TYPEDARRAY_POOL;_.UINT8C||(_.UINT8C=b([32,0])),_.BUFFER||(_.BUFFER=b([32,0]));var w=_.DATA,M=_.BUFFER;r.free=function(t){if(n.isBuffer(t))M[y.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|y.log2(e);w[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=a,r.freeArrayBuffer=i,r.freeBuffer=function(t){M[y.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return o(t);switch(e){case"uint8":return s(t);case"uint16":return l(t);case"uint32":return u(t);case"int8":return c(t);case"int16":return h(t);case"int32":return f(t);case"float":case"float32":return d(t);case"double":case"float64":return p(t);case"uint8_clamped":return m(t);case"buffer":return v(t);case"data":case"dataview":return g(t);default:return null}return null},r.mallocArrayBuffer=o,r.mallocUint8=s,r.mallocUint16=l,r.mallocUint32=u,r.mallocInt8=c,r.mallocInt16=h,r.mallocInt32=f,r.mallocFloat32=r.mallocFloat=d,r.mallocFloat64=r.mallocDouble=p,r.mallocUint8Clamped=m,r.mallocDataView=g,r.mallocBuffer=v,r.clearCache=function(){for(var t=0;t<32;++t)_.UINT8[t].length=0,_.UINT16[t].length=0,_.UINT32[t].length=0,_.INT8[t].length=0,_.INT16[t].length=0,_.INT32[t].length=0,_.FLOAT[t].length=0,_.DOUBLE[t].length=0,_.UINT8C[t].length=0,w[t].length=0,M[t].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":57,buffer:67,dup:107}],519:[function(t,e,r){"use strict";"use restrict";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;en)return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},{}],522:[function(t,e,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,r){if(t&&u.isObject(t)&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}function a(t){return u.isString(t)&&(t=i(t)),t instanceof n?t.format():n.prototype.format.call(t)}function o(t,e){return i(t,!1,!0).resolve(e)}function s(t,e){return t?i(t,!1,!0).resolveObject(e):e}var l=t("punycode"),u=t("./util");r.parse=i,r.resolve=o,r.resolveObject=s,r.format=a,r.Url=n;var c=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),m=["'"].concat(p),g=["%","/","?",";","#"].concat(m),v=["/","?","#"],y={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=t("querystring");n.prototype.parse=function(t,e,r){if(!u.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=n!==-1&&n127?D+="x":D+=C[z];if(!D.match(/^[+a-z0-9A-Z_-]{0,63}$/)){var P=E.slice(0,M),O=E.slice(M+1),R=C.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);R&&(P.push(R[1]),O.unshift(R[2])),O.length&&(o="/"+O.join(".")+o),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=l.toASCII(this.hostname));var j=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+j,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!y[d])for(var M=0,L=m.length;M0)&&r.host.split("@");k&&(r.auth=k.shift(),r.host=r.hostname=k.shift())}return r.search=t.search,r.query=t.query,u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!M.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=M.slice(-1)[0],S=(r.host||t.host||M.length>1)&&("."===T||".."===T)||""===T,E=0,L=M.length;L>=0;L--)T=M[L],"."===T?M.splice(L,1):".."===T?(M.splice(L,1),E++):E&&(M.splice(L,1),E--);if(!_&&!w)for(;E--;E)M.unshift("..");!_||""===M[0]||M[0]&&"/"===M[0].charAt(0)||M.unshift(""),S&&"/"!==M.join("/").substr(-1)&&M.push("");var C=""===M[0]||M[0]&&"/"===M[0].charAt(0);if(A){r.hostname=r.host=C?"":M.length?M.shift():"";var k=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");k&&(r.auth=k.shift(),r.host=r.hostname=k.shift())}return _=_||r.host&&M.length,_&&!C&&M.unshift(""),M.length?r.pathname=M.join("/"):(r.pathname=null,r.path=null),u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=h.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":523,punycode:466,querystring:470}],523:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],524:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],525:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],526:[function(t,e,r){(function(e,n){function i(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(e)?n.showHidden=e:e&&r._extend(n,e),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),l(n,t,n.depth)}function a(t,e){var r=i.styles[e];return r?"\x1b["+i.colors[r][0]+"m"+t+"\x1b["+i.colors[r][1]+"m":t}function o(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function l(t,e,n){if(t.customInspect&&e&&T(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return b(i)||(i=l(t,i,n)),i}var a=u(t,e);if(a)return a;var o=Object.keys(e),m=s(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),k(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(e);if(0===o.length){if(T(e)){var g=e.name?": "+e.name:"";return t.stylize("[Function"+g+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(A(e))return t.stylize(Date.prototype.toString.call(e),"date");if(k(e))return c(e)}var v="",y=!1,x=["{","}"];if(p(e)&&(y=!0,x=["[","]"]),T(e)){v=" [Function"+(e.name?": "+e.name:"")+"]"}if(w(e)&&(v=" "+RegExp.prototype.toString.call(e)),A(e)&&(v=" "+Date.prototype.toUTCString.call(e)),k(e)&&(v=" "+c(e)),0===o.length&&(!y||0==e.length))return x[0]+v+x[1];if(n<0)return w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var _;return _=y?h(t,e,n,m,o):o.map(function(r){return f(t,e,n,m,r,y)}),t.seen.pop(),d(_,v,x)}function u(t,e){if(_(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var a=[],o=0,s=e.length;o-1&&(s=a?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),_(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function d(t,e,r){var n=0;return t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function p(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function g(t){return null===t}function v(t){return null==t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function x(t){return"symbol"==typeof t}function _(t){return void 0===t}function w(t){return M(t)&&"[object RegExp]"===E(t)}function M(t){return"object"==typeof t&&null!==t}function A(t){return M(t)&&"[object Date]"===E(t)}function k(t){return M(t)&&("[object Error]"===E(t)||t instanceof Error)}function T(t){return"function"==typeof t}function S(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function E(t){return Object.prototype.toString.call(t)}function L(t){return t<10?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[L(t.getHours()),L(t.getMinutes()),L(t.getSeconds())].join(":");return[t.getDate(),P[t.getMonth()],e].join(" ")}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.format=function(t){if(!b(t)){for(var e=[],r=0;r=a)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),s=n[r];r>3}if(i--,1===n||2===n)a+=t.readSVarint(),o+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new l(a,o));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&s.push(e),s},n.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;t.pos>3}if(n--,1===r||2===r)i+=t.readSVarint(),a+=t.readSVarint(),is&&(s=i),au&&(u=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,u]},n.prototype.toGeoJSON=function(t,e,r){function i(t){for(var e=0;e>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}var o=t("./vectortilefeature.js");e.exports=n,n.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new o(this._pbf,e,this.extent,this._keys,this._values)}},{"./vectortilefeature.js":529}],531:[function(t,e,r){"use strict";function n(t,e){return"object"==typeof e&&null!==e||(e={}),i(t,e.canvas||a,e.context||o,e)}e.exports=n;var i=t("./lib/vtext"),a=null,o=null;"undefined"!=typeof document&&(a=document.createElement("canvas"),a.width=8192,a.height=1024,o=a.getContext("2d"))},{"./lib/vtext":532}],532:[function(t,e,r){"use strict";function n(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l8192)throw new Error("vectorize-text: String too long (sorry, this will get fixed later)");var a=3*n;t.height>31}function l(t){for(var e=[],r=0,n=0,i=t.length,a=0;a=0?l[r]:e)}function e(t){var e=n(t);return e?u in e:s.indexOf(t)>=0}function r(t,e){var r,i=n(t);return i?i[u]=e:(r=s.indexOf(t),r>=0?l[r]=e:(r=s.length,l[r]=e,s[r]=t)),this}function o(t){var e,r,i=n(t);return i?u in i&&delete i[u]:!((e=s.indexOf(t))<0)&&(r=s.length-1,s[e]=void 0,l[e]=l[r],s[e]=s[r],s.length=r,l.length=r,!0)}this instanceof x||a();var s=[],l=[],u=b++;return Object.create(x.prototype,{get___:{value:i(t)},has___:{value:i(e)},set___:{value:i(r)},delete___:{value:i(o)}})};x.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof s?function(){function r(){function e(t,e){return c?u.has(t)?u.get(t):c.get___(t,e):u.get(t,e)}function r(t){return u.has(t)||!!c&&c.has___(t)}function n(t){var e=!!u.delete(t);return c?c.delete___(t)||e:e}this instanceof x||a();var l,u=new s,c=void 0,h=!1;return l=o?function(t,e){return u.set(t,e),u.has(t)||(c||(c=new x),c.set(t,e)),this}:function(t,e){if(h)try{u.set(t,e)}catch(r){c||(c=new x),c.set___(t,e)}else u.set(t,e);return this},Object.create(x.prototype,{get___:{value:i(e)},has___:{value:i(r)},set___:{value:i(l)},delete___:{value:i(n)},permitHostObjects___:{value:i(function(e){if(e!==t)throw new Error("bogus call to permitHostObjects___");h=!0})}})}o&&"undefined"!=typeof Proxy&&(Proxy=void 0),r.prototype=x.prototype,e.exports=r,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=x)}}()},{}],537:[function(t,e,r){function n(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:i(e,t)}}var i=t("./hidden-store.js");e.exports=n},{"./hidden-store.js":538}],538:[function(t,e,r){function n(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}e.exports=n},{}],539:[function(t,e,r){function n(){var t=i();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}var i=t("./create-store.js");e.exports=n},{"./create-store.js":537}],540:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":129}],541:[function(t,e,r){var n=arguments[3],i=arguments[4],a=arguments[5],o=JSON.stringify;e.exports=function(t,e){function r(t){g[t]=!0;for(var e in i[t][1]){var n=i[t][1][e];g[n]||r(n)}}for(var s,l=Object.keys(a),u=0,c=l.length;u=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a=n||{}}var o=p[i.year-p[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=p[a.year-p[0]];var l,u=o>>9&4095,c=o>>5&15,h=31&o,f=new Date(u,c-1,h),m=new Date(i.year,i.month-1,i.day);l=Math.round((m-f)/864e5);var g,v=d[a.year-d[0]];for(g=0;g<13;g++){var y=v&1<<12-g?30:29;if(l>13;return!b||g=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");var s;"object"==typeof n?(s=!1,a=n):(s=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:s}}var l;l=o.day-1;var u,c=d[o.year-d[0]],h=c>>13;u=h?o.month>h?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var f=0;f>9&4095,v=m>>5&15,y=31&m,b=new Date(g,v-1,y+l);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}var o=t("../main"),s=t("object-assign"),l=o.instance();n.prototype=new o.baseCalendar,s(n.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(c);return r?r[0]:""}var n=this._validateYear(t),i=t.month(),a=""+this.toChineseMonth(n,i);return e&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(t){if("string"==typeof t){var e=t.match(h);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=this.toChineseMonth(r,n),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(f);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=this.toChineseMonth(r,n),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"\u95f0"===e[0]&&(r=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var i=e[e.length-1];r="i"===i||"I"===i}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var n=this.intercalaryMonth(t);if(r&&e!==n||e<1||e>12)throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?!r&&e<=n?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(t=t.year(),e=t.month());var r=this.intercalaryMonth(t),n=r?12:11;if(e<0||e>n)throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>13},isIntercalaryMonth:function(t,e){t.year&&(t=t.year(),e=t.month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var n,i=this._validateYear(t,o.local.invalidyear),a=p[i-p[0]],s=a>>9&4095,u=a>>5&15,c=31&a;n=l.newDate(s,u,c),n.add(4-(n.dayOfWeek()||7),"d");var h=this.toJD(t,e,r)-n.toJD();return 1+Math.floor(h/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=d[t-d[0]];if(e>(r>>13?12:11))throw o.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,s,r,o.local.invalidDate);t=this._validateYear(n.year()),e=n.month(),r=n.day();var i=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),u=a(t,s,r,i);return l.toJD(u.year,u.month,u.day)},fromJD:function(t){var e=l.fromJD(t),r=i(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(u),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var i=t.year(),a=t.month(),o=this.isIntercalaryMonth(i,a),s=this.toChineseMonth(i,a),l=Object.getPrototypeOf(n.prototype).add.call(this,t,e,r);if("y"===r){var u=l.year(),c=l.month(),h=this.isIntercalaryMonth(u,s),f=o&&h?this.toMonthIndex(u,s,!0):this.toMonthIndex(u,s,!1);f!==c&&l.month(f)}return l}});var u=/^\s*(-?\d\d\d\d|\d\d)[-\/](\d?\d)([iI]?)[-\/](\d?\d)/m,c=/^\d?\d[iI]?/m,h=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?\u6708/m,f=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;o.calendars.chinese=n;var d=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],p=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{"../main":558,"object-assign":449}],545:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Coptic",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()+(e.year()<0?1:0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),t<0&&t++,n.day()+30*(n.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),i.calendars.coptic=n},{"../main":558,"object-assign":449}],546:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,i.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n>=2&&n<=6},extraInfo:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return{century:o[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year()+(n.year()<0?1:0),e=n.month(),(r=n.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};i.calendars.discworld=n},{"../main":558,"object-assign":449}],547:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()+(e.year()<0?1:0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),t<0&&t++,n.day()+30*(n.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),i.calendars.ethiopian=n},{"../main":558,"object-assign":449}],548:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function i(t,e){return t-e*Math.floor(t/e)}var a=t("../main"),o=t("object-assign");n.prototype=new a.baseCalendar,o(n.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return t=t<0?t+1:t,i(7*t+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,a.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r) +;return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear).year(),this.toJD(t===-1?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,a.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===i(this.daysInYear(t),10)?30:9===e&&3===i(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var i=t<=0?t+1:t,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(var s=1;s=this.toJD(e===-1?1:e+1,7,1);)e++;for(var r=tthis.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),a.calendars.hebrew=n},{"../main":558,"object-assign":449}],549:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,i.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),e=n.month(),r=n.day(),t=t<=0?t+1:t,r+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),i.calendars.islamic=n},{"../main":558,"object-assign":449}],550:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=e.year()<0?e.year()+1:e.year();return t%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);return t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=e+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}}),i.calendars.julian=n},{"../main":558,"object-assign":449}],551:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function i(t,e){return t-e*Math.floor(t/e)}function a(t,e){return i(t-1,e)+1}var o=t("../main"),s=t("object-assign");n.prototype=new o.baseCalendar,s(n.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,o.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if(t=t.split("."),t.length<3)throw"Invalid Mayan year";for(var e=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,o.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,o.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,o.local.invalidDate),!0},extraInfo:function(t,e,r){var n=this._validate(t,e,r,o.local.invalidDate),i=n.toJD(),a=this._toHaab(i),s=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[s[0]-1],tzolkinDay:s[0],tzolkinTrecena:s[1]}},_toHaab:function(t){t-=this.jdEpoch;var e=i(t+8+340,365);return[Math.floor(e/20)+1,i(e,20)]},_toTzolkin:function(t){return t-=this.jdEpoch,[a(t+20,20),a(t+4,13)]},toJD:function(t,e,r){var n=this._validate(t,e,r,o.local.invalidDate);return n.day()+20*n.month()+360*n.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),o.calendars.mayan=n},{"../main":558,"object-assign":449}],552:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar;var o=i.instance("gregorian");a(n.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidMonth),t=n.year();t<0&&t++;for(var a=n.day(),s=1;s=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),i.calendars.nanakshahi=n},{"../main":558,"object-assign":449}],553:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,i.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var a=i.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var u=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(t){var e=i.instance(),r=e.fromJD(t),n=r.year(),a=r.dayOfYear(),o=n+56;this._createMissingCalendarData(o);for(var s=9,l=this.NEPALI_CALENDAR_DATA[o][0],u=this.NEPALI_CALENDAR_DATA[o][s]-l+1;a>u;)s++,s>12&&(s=1,o++),u+=this.NEPALI_CALENDAR_DATA[o][s];var c=this.NEPALI_CALENDAR_DATA[o][s]-(u-a);return this.newDate(o,s,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,a.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,a.local.invalidDate);t=n.year(),e=n.month(),r=n.day();var o=t-(t>=0?474:473),s=474+i(o,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(o/2820)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=t-this.toJD(475,1,1),r=Math.floor(e/1029983),n=i(e,1029983),a=2820;if(1029982!==n){var o=Math.floor(n/366),s=i(n,366);a=Math.floor((2134*o+2816*s+2815)/1028522)+o+1}var l=a+2820*r+474;l=l<=0?l-1:l;var u=t-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),h=t-this.toJD(l,c,1)+1;return this.newDate(l,c,h)}}),a.calendars.persian=n,a.calendars.jalali=n},{"../main":558,"object-assign":449}],555:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign"),o=i.instance();n.prototype=new i.baseCalendar,a(n.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(e.year());return o.leapYear(t)},weekOfYear:function(t,e,r){var n=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(n.year());return o.weekOfYear(t,n.month(),n.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),t=this._t2gYear(n.year());return o.toJD(t,n.month(),n.day())},fromJD:function(t){var e=o.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),i.calendars.taiwan=n},{"../main":558,"object-assign":449}],556:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign"),o=i.instance();n.prototype=new i.baseCalendar,a(n.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(e.year());return o.leapYear(t)},weekOfYear:function(t,e,r){var n=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear),t=this._t2gYear(n.year());return o.weekOfYear(t,n.month(),n.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),t=this._t2gYear(n.year());return o.toJD(t,n.month(),n.day())},fromJD:function(t){var e=o.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),i.calendars.thai=n},{"../main":558,"object-assign":449}],557:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}var i=t("../main"),a=t("object-assign");n.prototype=new i.baseCalendar,a(n.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,i.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,i.local.invalidMonth),n=r.toJD()-24e5+.5,a=0,s=0;sn)return o[a]-o[a-1];a++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var n=this._validate(t,e,r,i.local.invalidDate),a=12*(n.year()-1)+n.month()-15292;return n.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,u=e-o[r-1]+1;return this.newDate(s,l,u)},isValid:function(t,e,r){var n=i.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(t=null!=t.year?t.year:t,n=t>=1276&&t<=1500),n},_validate:function(t,e,r,n){var a=i.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}}),i.calendars.ummalqura=n +;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":558,"object-assign":449}],558:[function(t,e,r){function n(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(t,e){return t=""+t,"000000".substring(0,e-t.length)+t}function o(){this.shortYearCutoff="+10"}function s(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}var l=t("object-assign");l(n.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,i){return n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance(),n.newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,function(e){return t[e]})}},substituteChineseDigits:function(t,e){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),l(i.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),l(o.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new i(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+a(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0),i=t.day();"y"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(!function(t){for(;oe-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),i="m"===r?e:t.month(),a="d"===r?e:t.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var u=e.exports=new n;u.cdate=i,u.baseCalendar=o,u.calendars.gregorian=s},{"object-assign":449}],559:[function(t,e,r){var n=t("object-assign"),i=t("./main");n(i.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),i.local=i.regionalOptions[""],n(i.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.monthNumbers||this.local.monthNumbers,s=r.monthNamesShort||this.local.monthNamesShort,l=r.monthNames||this.local.monthNames,u=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;g+n1}),c=function(t,e,r,n){var i=""+e;if(u(t,n))for(;i.length1},b=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=e.substring(M).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=s[0].length,parseInt(s[0],10)},x=this,_=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s-1){d=1,p=m;for(var T=this.daysInMonth(f,d);p>T;T=this.daysInMonth(f,d))d++,p-=T}return h>-1?this.fromJD(h):this.newDate(f,d,p)},determineDate:function(t,e,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return e=e?e.newDate():null,t=null==t?e:"string"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}t=t.toLowerCase();for(var e=(t.match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||1/0===t||t===-1/0?e:a.today().add(t,"d"):a.newDate(t)}})},{"./main":558,"object-assign":449}],560:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}", +args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":100}],561:[function(t,e,r){"use strict";function n(t,e){var r=[];return e=+e||0,i(t.hi(t.shape[0]-1),r,e),r}e.exports=n;var i=t("./lib/zc-core")},{"./lib/zc-core":560}],562:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../color"),a=t("../../plots/cartesian/axes"),o=t("./attributes");e.exports=function(t,e,r,s,l){function u(r,i){return n.coerce(t,e,o,r,i)}s=s||{},l=l||{};var c=u("visible",!l.itemIsNotPlainObject),h=u("clicktoshow");if(!c&&!h)return e;u("opacity"),u("align"),u("bgcolor");var f=u("bordercolor"),d=i.opacity(f);u("borderpad");var p=u("borderwidth"),m=u("showarrow");u("text",m?" ":"new text"),u("textangle"),n.coerceFont(u,"font",r.font);for(var g=["x","y"],v=[-10,-30],y={_fullLayout:r},b=0;b<2;b++){var x=g[b],_=a.coerceRef(t,e,y,x,"","paper");if(a.coercePosition(e,y,u,_,x,.5),m){var w="a"+x,M=a.coerceRef(t,e,y,w,"pixel");"pixel"!==M&&M!==_&&(M=e[w]="pixel");var A="pixel"===M?v[b]:.4;a.coercePosition(e,y,u,M,w,A)}u(x+"anchor")}if(n.noneOrAll(t,e,["x","y"]),m&&(u("arrowcolor",d?e.bordercolor:i.defaultLine),u("arrowhead"),u("arrowsize"),u("arrowwidth",2*(d&&p||1)),u("standoff"),n.noneOrAll(t,e,["ax","ay"])),h){var k=u("xclick"),T=u("yclick");e._xclick=void 0===k?e.x:k,e._yclick=void 0===T?e.y:T}return e}},{"../../lib":680,"../../plots/cartesian/axes":719,"../color":575,"./attributes":564}],563:[function(t,e,r){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0},{path:"M2,2V-2H-2V2Z",backoff:0}]},{}],564:[function(t,e,r){"use strict";var n=t("./arrow_paths"),i=t("../../plots/font_attributes"),a=t("../../plots/cartesian/constants"),o=t("../../lib/extend").extendFlat;e.exports={_isLinkedToArray:"annotation",visible:{valType:"boolean",dflt:!0},text:{valType:"string"},textangle:{valType:"angle",dflt:0},font:o({},i,{}),opacity:{valType:"number",min:0,max:1,dflt:1},align:{valType:"enumerated",values:["left","center","right"],dflt:"center"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)"},borderpad:{valType:"number",min:0,dflt:1},borderwidth:{valType:"number",min:0,dflt:1},showarrow:{valType:"boolean",dflt:!0},arrowcolor:{valType:"color"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1},arrowsize:{valType:"number",min:.3,dflt:1},arrowwidth:{valType:"number",min:.1},standoff:{valType:"number",min:0,dflt:0},ax:{valType:"any"},ay:{valType:"any"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()]},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()]},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()]},x:{valType:"any"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()]},y:{valType:"any"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1},xclick:{valType:"any"},yclick:{valType:"any"},_deprecated:{ref:{valType:"string"}}}},{"../../lib/extend":672,"../../plots/cartesian/constants":724,"../../plots/font_attributes":739,"./arrow_paths":563}],565:[function(t,e,r){"use strict";function n(t){var e=t._fullLayout;i.filterVisible(e.annotations).forEach(function(e){var r=a.getFromId(t,e.xref),n=a.getFromId(t,e.yref),i=3*e.arrowsize*e.arrowwidth||0;r&&r.autorange&&(e.axref===e.xref?(a.expand(r,[r.r2c(e.x)],{ppadplus:i,ppadminus:i}),a.expand(r,[r.r2c(e.ax)],{ppadplus:e._xpadplus,ppadminus:e._xpadminus})):a.expand(r,[r.r2c(e.x)],{ppadplus:Math.max(e._xpadplus,i),ppadminus:Math.max(e._xpadminus,i)})),n&&n.autorange&&(e.ayref===e.yref?(a.expand(n,[n.r2c(e.y)],{ppadplus:i,ppadminus:i}),a.expand(n,[n.r2c(e.ay)],{ppadplus:e._ypadplus,ppadminus:e._ypadminus})):a.expand(n,[n.r2c(e.y)],{ppadplus:Math.max(e._ypadplus,i),ppadminus:Math.max(e._ypadminus,i)}))})}var i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./draw").draw;e.exports=function(t){var e=t._fullLayout,r=i.filterVisible(e.annotations);if(r.length&&t._fullData.length){var s={};r.forEach(function(t){s[t.xref]=!0,s[t.yref]=!0});if(a.list(t).filter(function(t){return t.autorange&&s[t._id]}).length)return i.syncOrAsync([o,n],t)}}},{"../../lib":680,"../../plots/cartesian/axes":719,"./draw":569}],566:[function(t,e,r){"use strict";function n(t,e){var r=a(t,e);return r.on.length>0||r.explicitOff.length>0}function i(t,e){var r,n=a(t,e),i=n.on,s=n.off.concat(n.explicitOff),l={};if(i.length||s.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}z.selectAll("tspan.line").attr({y:0,x:0});var n=T.select(".annotation-math-group"),i=!n.empty(),d=f.bBox((i?n:z).node()),y=d.width,E=d.height,D=Math.round(y+2*L),I=Math.round(E+2*L);b._w=y,b._h=E;var P=!1;if(["x","y"].forEach(function(e){var n,i,a,o,s,h=b[e+"ref"]||e,f=b["a"+e+"ref"],d=c.getFromId(t,h),p=(M+("x"===e?0:-90))*Math.PI/180,m=D*Math.cos(p),g=I*Math.sin(p),y=Math.abs(m)+Math.abs(g),x=b[e+"anchor"],_=w[e];if(d){var A=d.r2fraction(b[e]);if((t._dragging||!d.autorange)&&(A<0||A>1)&&(f===h?((A=d.r2fraction(b["a"+e]))<0||A>1)&&(P=!0):P=!0,P))return;n=d._offset+d.r2p(b[e]),o=.5}else"x"===e?(a=b[e],n=v.l+v.w*a):(a=1-b[e],n=v.t+v.h*a),o=b.showarrow?.5:a;if(b.showarrow){_.head=n;var k=b["a"+e];s=m*r(.5,b.xanchor)-g*r(.5,b.yanchor),f===h?(_.tail=d._offset+d.r2p(k),i=s):(_.tail=n+k,i=s+k),_.text=_.tail+s;var T=l["x"===e?"width":"height"];if("paper"===h&&(_.head=u.constrain(_.head,1,T-1)),"pixel"===f){var S=-Math.max(_.tail-3,_.text),E=Math.min(_.tail+3,_.text)-T;S>0?(_.tail+=S,_.text+=S):E>0&&(_.tail-=E,_.text-=E)}}else s=y*r(o,x),i=s,_.text=n+s;b["_"+e+"padplus"]=y/2+i,b["_"+e+"padminus"]=y/2-i,b["_"+e+"size"]=y,b["_"+e+"shift"]=s}),P)return void T.remove();if(i)n.select("svg").attr({x:L-1,y:L});else{var O=L-d.top,R=L-d.left;z.attr({x:R,y:O}),z.selectAll("tspan.line").attr({y:O,x:R})}C.call(f.setRect,S/2,S/2,D-S,I-S),T.call(f.setTranslate,Math.round(w.x.text-D/2),Math.round(w.y.text-I/2)),k.attr({transform:"rotate("+M+","+w.x.text+","+w.y.text+")"});var j="annotations["+e+"]",F=function(r,n){o.select(t).selectAll('.annotation-arrow-g[data-index="'+e+'"]').remove();var i=w.x.head,l=w.y.head,c=w.x.tail+r,d=w.y.tail+n,p=w.x.text+r,y=w.y.text+n,S=u.rotationXYMatrix(M,p,y),E=u.apply2DTransform(S),L=u.apply2DTransform2(S),D=+C.attr("width"),z=+C.attr("height"),I=p-.5*D,P=I+D,O=y-.5*z,R=O+z,F=[[I,O,I,R],[I,R,P,R],[P,R,P,O],[P,O,I,O]].map(L);if(!F.reduce(function(t,e){return t^!!a(i,l,i+1e6,l+1e6,e[0],e[1],e[2],e[3])},!1)){F.forEach(function(t){var e=a(c,d,i,l,t[0],t[1],t[2],t[3]);e&&(c=e.x,d=e.y)});var N=b.arrowwidth,B=b.arrowcolor,U=A.append("g").style({opacity:h.opacity(B)}).classed("annotation-arrow-g",!0).attr("data-index",String(e)),V=U.append("path").attr("d","M"+c+","+d+"L"+i+","+l).style("stroke-width",N+"px").call(h.stroke,h.rgb(B));if(g(V,b.arrowhead,"end",b.arrowsize,b.standoff),t._context.editable&&V.node().parentNode){var H=i,q=l;if(b.standoff){var G=Math.sqrt(Math.pow(i-c,2)+Math.pow(l-d,2));H+=b.standoff*(c-i)/G,q+=b.standoff*(d-l)/G}var Y,W,X,Z=U.append("path").classed("annotation",!0).classed("anndrag",!0).attr({"data-index":String(e),d:"M3,3H-3V-3H3ZM0,0L"+(c-H)+","+(d-q),transform:"translate("+H+","+q+")"}).style("stroke-width",N+6+"px").call(h.stroke,"rgba(0,0,0,0)").call(h.fill,"rgba(0,0,0,0)");m.init({element:Z.node(),prepFn:function(){var t=f.getTranslate(T);W=t.x,X=t.y,Y={},x&&x.autorange&&(Y[x._name+".autorange"]=!0),_&&_.autorange&&(Y[_._name+".autorange"]=!0)},moveFn:function(t,e){var r=E(W,X),n=r[0]+t,a=r[1]+e;T.call(f.setTranslate,n,a),Y[j+".x"]=x?x.p2r(x.r2p(b.x)+t):(i+t-v.l)/v.w,Y[j+".y"]=_?_.p2r(_.r2p(b.y)+e):1-(l+e-v.t)/v.h,b.axref===b.xref&&(Y[j+".ax"]=x?x.p2r(x.r2p(b.ax)+t):(i+t-v.l)/v.w),b.ayref===b.yref&&(Y[j+".ay"]=_?_.p2r(_.r2p(b.ay)+e):1-(l+e-v.t)/v.h),U.attr("transform","translate("+t+","+e+")"),k.attr({transform:"rotate("+M+","+n+","+a+")"})},doneFn:function(e){if(e){s.relayout(t,Y);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}};if(b.showarrow&&F(0,0),t._context.editable){var N,B;m.init({element:T.node(),prepFn:function(){B=k.attr("transform"),N={}},moveFn:function(t,e){var r="pointer";if(b.showarrow)b.axref===b.xref?N[j+".ax"]=x.p2r(x.r2p(b.ax)+t):N[j+".ax"]=b.ax+t,b.ayref===b.yref?N[j+".ay"]=_.p2r(_.r2p(b.ay)+e):N[j+".ay"]=b.ay+e,F(t,e);else{if(x)N[j+".x"]=b.x+t/x._m;else{var n=b._xsize/v.w,i=b.x+b._xshift/v.w-n/2;N[j+".x"]=m.align(i+t/v.w,n,0,1,b.xanchor)}if(_)N[j+".y"]=b.y+e/_._m;else{var a=b._ysize/v.h,o=b.y-b._yshift/v.h-a/2;N[j+".y"]=m.align(o-e/v.h,a,0,1,b.yanchor)}x&&_||(r=m.getCursor(x?.5:N[j+".x"],_?.5:N[j+".y"],b.xanchor,b.yanchor))}k.attr({transform:"translate("+t+","+e+")"+B}),p(T,r)},doneFn:function(e){if(p(T),e){s.relayout(t,N);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}var i=t.layout,l=t._fullLayout,v=t._fullLayout._size;l._infolayer.selectAll('.annotation[data-index="'+e+'"]').remove();var y=(i.annotations||[])[e],b=l.annotations[e];if(y&&b.visible!==!1){var x=c.getFromId(t,b.xref),_=c.getFromId(t,b.yref),w={x:{},y:{}},M=+b.textangle||0,A=l._infolayer.append("g").classed("annotation",!0).attr("data-index",String(e)).style("opacity",b.opacity).on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",{index:e,annotation:y,fullAnnotation:b})}),k=A.append("g").classed("annotation-text-g",!0).attr("data-index",String(e)),T=k.append("g"),S=b.borderwidth,E=b.borderpad,L=S+E,C=T.append("rect").attr("class","bg").style("stroke-width",S+"px").call(h.stroke,b.bordercolor).call(h.fill,b.bgcolor),D=b.font,z=T.append("text").classed("annotation",!0).attr("data-unformatted",b.text).text(b.text);t._context.editable?z.call(d.makeEditable,T).call(r).on("edit",function(n){b.text=n,this.attr({"data-unformatted":b.text}),this.call(r);var i={};i["annotations["+e+"].text"]=b.text,x&&x.autorange&&(i[x._name+".autorange"]=!0),_&&_.autorange&&(i[_._name+".autorange"]=!0),s.relayout(t,i)}):z.call(r)}}function a(t,e,r,n,i,a,o,s){var l=r-t,u=i-t,c=o-i,h=n-e,f=a-e,d=s-a,p=l*d-c*h;if(0===p)return null;var m=(u*d-c*f)/p,g=(u*h-l*f)/p;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+h*m}}var o=t("d3"),s=t("../../plotly"),l=t("../../plots/plots"),u=t("../../lib"),c=t("../../plots/cartesian/axes"),h=t("../color"),f=t("../drawing"),d=t("../../lib/svg_text_utils"),p=t("../../lib/setcursor"),m=t("../dragelement"),g=t("./draw_arrow_head");e.exports={draw:n,drawOne:i}},{"../../lib":680,"../../lib/setcursor":695,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/cartesian/axes":719,"../../plots/plots":778,"../color":575,"../dragelement":596,"../drawing":598,"./draw_arrow_head":570,d3:104}],570:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("../color"),o=t("../drawing"),s=t("./arrow_paths");e.exports=function(t,e,r,l,u){function c(){t.style("stroke-dasharray","0px,100px")}function h(r,i){d.path&&(e>5&&(i=0),n.select(f.parentElement).append("path").attr({class:t.attr("class"),d:d.path,transform:"translate("+r.x+","+r.y+")rotate("+180*i/Math.PI+")scale("+y+")"}).style({fill:b,opacity:x,"stroke-width":0}))}i(l)||(l=1);var f=t.node(),d=s[e||0];"string"==typeof r&&r||(r="end");var p,m,g,v,y=(o.getPx(t,"stroke-width")||1)*l,b=t.style("stroke")||a.defaultLine,x=t.style("stroke-opacity")||1,_=r.indexOf("start")>=0,w=r.indexOf("end")>=0,M=d.backoff*y+u;if("line"===f.nodeName){p={x:+t.attr("x1"),y:+t.attr("y1")},m={x:+t.attr("x2"),y:+t.attr("y2")};var A=p.x-m.x,k=p.y-m.y;if(g=Math.atan2(k,A),v=g+Math.PI,M){if(M*M>A*A+k*k)return void c();var T=M*Math.cos(g),S=M*Math.sin(g);_&&(p.x-=T,p.y-=S,t.attr({x1:p.x,y1:p.y})),w&&(m.x+=T,m.y+=S,t.attr({x2:m.x,y2:m.y}))}}else if("path"===f.nodeName){var E=f.getTotalLength(),L="";if(E=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}var i=t("tinycolor2"),a=t("fast-isnumeric"),o=e.exports={},s=t("./attributes");o.defaults=s.defaults,o.defaultLine=s.defaultLine,o.lightLine=s.lightLine,o.background=s.background,o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(i(t))},o.opacity=function(t){return t?i(t).getAlpha():0},o.addOpacity=function(t,e){var r=i(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=i(t).toRgb();if(1===r.a)return i(t).toRgbString();var n=i(e||o.background).toRgb(),a=1===n.a?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},s={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return i(s).toRgbString()},o.contrast=function(t,e,r){var n=i(t);return(n.isLight()?n.darken(r):n.lighten(e)).toString()},o.stroke=function(t,e){var r=i(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=i(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,i,a,s=Object.keys(t);for(e=0;es&&(a[1]-=(st-s)/2):r.node()&&!r.classed("js-placeholder")&&(st=d.bBox(e.node()).height),st){if(st+=5,"top"===_.titleside)$.domain[1]-=st/T.h,a[1]*=-1;else{$.domain[0]+=st/T.h;var u=Math.max(1,r.selectAll("tspan.line").size());a[1]+=(1-u)*s}e.attr("transform","translate("+a+")"),$.setScale()}}at.selectAll(".cbfills,.cblines,.cbaxis").attr("transform","translate(0,"+Math.round(T.h*(1-$.domain[1]))+")");var h=at.select(".cbfills").selectAll("rect.cbfill").data(C);h.enter().append("rect").classed("cbfill",!0).style("stroke","none"),h.exit().remove(),h.each(function(t,e){var r=[0===e?E[0]:(C[e]+C[e-1])/2,e===C.length-1?E[1]:(C[e]+C[e+1])/2].map($.c2p).map(Math.round);e!==C.length-1&&(r[1]+=r[1]>r[0]?1:-1);var a=z(t).replace("e-",""),o=i(a).toHexString();n.select(this).attr({x:W,width:Math.max(B,2),y:n.min(r),height:Math.max(n.max(r)-n.min(r),2),fill:o})});var f=at.select(".cblines").selectAll("path.cbline").data(_.line.color&&_.line.width?L:[]);return f.enter().append("path").classed("cbline",!0),f.exit().remove(),f.each(function(t){n.select(this).attr("d","M"+W+","+(Math.round($.c2p(t))+_.line.width/2%1)+"h"+B).call(d.lineGroupStyle,_.line.width,D(t),_.line.dash)}),$._axislayer.selectAll("g."+$._id+"tick,path").remove(),$._pos=W+B+(_.outlinewidth||0)/2-("outside"===_.ticks?1:0),$.side="right",c.syncOrAsync([function(){return l.doTicks(t,$,!0)},function(){if(["top","bottom"].indexOf(_.titleside)===-1){var e=$.titlefont.size,r=$._offset+$._length/2,i=T.l+($.position||0)*T.w+("right"===$.side?10+e*($.showticklabels?1:.5):-10-e*($.showticklabels?.5:0));M("h"+$._id+"title",{avoid:{selection:n.select(t).selectAll("g."+$._id+"tick"),side:_.titleside,offsetLeft:T.l,offsetTop:T.t,maxShift:k.width},attributes:{x:i,y:r,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}}])}function M(e,r){var n,i=x();n=s.traceIs(i,"markerColorscale")?"marker.colorbar.title":"colorbar.title";var a={propContainer:$,propName:n,traceIndex:i.index,dfltName:"colorscale",containerGroup:at.select(".cbtitle")},o="h"===e.charAt(0)?e.substr(1):"h"+e;at.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(t,e,h(a,r||{}))}function A(){var r=B+_.outlinewidth/2+d.bBox($._axislayer.node()).width;if(j=ot.select("text"),j.node()&&!j.classed("js-placeholder")){var n,i=ot.select(".h"+$._id+"title-math-group").node();n=i&&["top","bottom"].indexOf(_.titleside)!==-1?d.bBox(i).width:d.bBox(ot.node()).right-W-T.l,r=Math.max(r,n)}var a=2*_.xpad+r+_.borderwidth+_.outlinewidth/2,s=J-K;at.select(".cbbg").attr({x:W-_.xpad-(_.borderwidth+_.outlinewidth)/2,y:K-G,width:Math.max(a,2),height:Math.max(s+2*G,2)}).call(p.fill,_.bgcolor).call(p.stroke,_.bordercolor).style({"stroke-width":_.borderwidth}),at.selectAll(".cboutline").attr({x:W,y:K+_.ypad+("top"===_.titleside?st:0),width:Math.max(B,2),height:Math.max(s-2*_.ypad-st,2)}).call(p.stroke,_.outlinecolor).style({fill:"None","stroke-width":_.outlinewidth});var l=({center:.5,right:1}[_.xanchor]||0)*a;at.attr("transform","translate("+(T.l-l)+","+T.t+")"),o.autoMargin(t,e,{x:_.x,y:_.y,l:a*({right:1,center:.5}[_.xanchor]||0),r:a*({left:1,center:.5}[_.xanchor]||0),t:s*({bottom:1,middle:.5}[_.yanchor]||0),b:s*({top:1,middle:.5}[_.yanchor]||0)})}var k=t._fullLayout,T=k._size;if("function"!=typeof _.fillcolor&&"function"!=typeof _.line.color)return void k._infolayer.selectAll("g."+e).remove();var S,E=n.extent(("function"==typeof _.fillcolor?_.fillcolor:_.line.color).domain()),L=[],C=[],D="function"==typeof _.line.color?_.line.color:function(){return _.line.color},z="function"==typeof _.fillcolor?_.fillcolor:function(){return _.fillcolor},I=_.levels.end+_.levels.size/100,P=_.levels.size,O=1.001*E[0]-.001*E[1],R=1.001*E[1]-.001*E[0];for(S=_.levels.start;(S-I)*P<0;S+=P)S>O&&SE[0]&&S1){var it=Math.pow(10,Math.floor(Math.log(nt)/Math.LN10));et*=it*c.roundUp(nt/it,[2,5,10]),(Math.abs(_.levels.start)/_.levels.size+1e-6)%1<2e-6&&($.tick0=0)}$.dtick=et}$.domain=[Z+Y,Z+H-Y],$.setScale();var at=k._infolayer.selectAll("g."+e).data([0]);at.enter().append("g").classed(e,!0).each(function(){var t=n.select(this);t.append("rect").classed("cbbg",!0),t.append("g").classed("cbfills",!0),t.append("g").classed("cblines",!0),t.append("g").classed("cbaxis",!0).classed("crisp",!0),t.append("g").classed("cbtitleunshift",!0).append("g").classed("cbtitle",!0),t.append("rect").classed("cboutline",!0),t.select(".cbtitle").datum(0)}),at.attr("transform","translate("+Math.round(T.l)+","+Math.round(T.t)+")");var ot=at.select(".cbtitleunshift").attr("transform","translate(-"+Math.round(T.l)+",-"+Math.round(T.t)+")");$._axislayer=at.select(".cbaxis");var st=0;if(["top","bottom"].indexOf(_.titleside)!==-1){var lt,ut=T.l+(_.x+q)*T.w,ct=$.titlefont.size;lt="top"===_.titleside?(1-(Z+H-Y))*T.h+T.t+3+.75*ct:(1-(Z+Y))*T.h+T.t-3-.25*ct,M($._id+"title",{attributes:{x:ut,y:lt,"text-anchor":"start"}})}var ht=c.syncOrAsync([o.previousPromises,w,o.previousPromises,A],t);if(ht&&ht.then&&(t._promises||[]).push(ht),t._context.editable){var ft,dt,pt;u.init({element:at.node(),prepFn:function(){ft=at.attr("transform"),f(at)},moveFn:function(t,e){at.attr("transform",ft+" translate("+t+","+e+")"),dt=u.align(X+t/T.w,U,0,1,_.xanchor),pt=u.align(Z-e/T.h,H,0,1,_.yanchor);var r=u.getCursor(dt,pt,_.xanchor,_.yanchor);f(at,r)},doneFn:function(e){f(at),e&&void 0!==dt&&void 0!==pt&&a.restyle(t,{"colorbar.x":dt,"colorbar.y":pt},x().index)}})}return ht}function x(){var r,n,i=e.substr(2);for(r=0;r=0?i.Reds:i.Blues,l.colorscale=m,s.reversescale&&(m=a(m)),s.colorscale=m)}},{"../../lib":680,"./flip_scale":586,"./scales":593}],582:[function(t,e,r){"use strict";var n=t("./attributes"),i=t("../../lib/extend").extendDeep;t("./scales.js");e.exports=function(t){return{color:{valType:"color",arrayOk:!0},colorscale:i({},n.colorscale,{}),cauto:i({},n.zauto,{}),cmax:i({},n.zmax,{}),cmin:i({},n.zmin,{}),autocolorscale:i({},n.autocolorscale,{}),reversescale:i({},n.reversescale,{})}}},{"../../lib/extend":672,"./attributes":580,"./scales.js":593}],583:[function(t,e,r){"use strict";var n=t("./scales");e.exports=n.RdBu},{"./scales":593}],584:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../colorbar/has_colorbar"),o=t("../colorbar/defaults"),s=t("./is_valid_scale"),l=t("./flip_scale");e.exports=function(t,e,r,u,c){var h=c.prefix,f=c.cLetter,d=h.slice(0,h.length-1),p=h?i.nestedProperty(t,d).get()||{}:t,m=h?i.nestedProperty(e,d).get()||{}:e,g=p[f+"min"],v=p[f+"max"],y=p.colorscale;u(h+f+"auto",!(n(g)&&n(v)&&g=0;i--,a++)e=t[i],n[a]=[1-e[0],e[1]];return n}},{}],587:[function(t,e,r){"use strict";var n=t("./scales"),i=t("./default_scale"),a=t("./is_valid_scale_array");e.exports=function(t,e){function r(){try{t=n[t]||JSON.parse(t)}catch(r){t=e}}return e||(e=i),t?("string"==typeof t&&(r(),"string"==typeof t&&r()),a(t)?t:e):e}},{"./default_scale":583,"./is_valid_scale_array":591,"./scales":593}],588:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("./is_valid_scale");e.exports=function(t,e){var r=e?i.nestedProperty(t,e).get()||{}:t,o=r.color,s=!1;if(Array.isArray(o))for(var l=0;l4/3-s?o:s}},{}],595:[function(t,e,r){"use strict";var n=t("../../lib"),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},{"../../lib":680}],596:[function(t,e,r){"use strict";function n(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function i(t){t._dragging=!1,t._replotPending&&a.plot(t)}var a=t("../../plotly"),o=t("../../lib"),s=t("../../plots/cartesian/constants"),l=t("../../constants/interactions"),u=e.exports={};u.align=t("./align"),u.getCursor=t("./cursor");var c=t("./unhover");u.unhover=c.wrapped,u.unhoverRaw=c.raw,u.init=function(t){function e(e){return t.element.onmousemove=m,g._dragged=!1,g._dragging=!0,c=e.clientX,h=e.clientY,p=e.target,f=(new Date).getTime(),f-g._mouseDownTimey&&(v=Math.max(v-1,1)),t.doneFn&&t.doneFn(g._dragged,v,e),!g._dragged){var r=document.createEvent("MouseEvents");r.initEvent("click",!0,!0),p.dispatchEvent(r)}return i(g),g._dragged=!1,o.pauseEvent(e)}var c,h,f,d,p,m,g=o.getPlotDiv(t.element)||{},v=1,y=l.DBLCLICKDELAY;g._mouseDownTime||(g._mouseDownTime=0),m=t.element.onmousemove,t.setCursor&&(t.element.onmousemove=t.setCursor),t.element.onmousedown=e,t.element.style.pointerEvents="all"},u.coverSlip=n},{"../../constants/interactions":661,"../../lib":680,"../../plotly":714,"../../plots/cartesian/constants":724,"./align":594,"./cursor":595,"./unhover":597}],597:[function(t,e,r){"use strict";var n=t("../../lib/events"),i=e.exports={};i.wrapped=function(t,e,r){"string"==typeof t&&(t=document.getElementById(t)),t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),i.raw(t,e,r)},i.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&n.triggerHandler(t,"plotly_beforehover",e)===!1||(r._hoverlayer.selectAll("g").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{points:i}))}},{"../../lib/events":671}],598:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){if(s.traceIs(r,"symbols")){var u=p(r);e.attr("d",function(t){var e;e="various"===t.ms||"various"===a.size?3:d.isBubble(r)?u(t.ms):(a.size||6)/2,t.mrc=e;var n=m.symbolNumber(t.mx||a.symbol)||0,i=n%100;return t.om=n%200>=100,m.symbolFuncs[i](e)+(n>=200?y:"")}).style("opacity",function(t){return(t.mo+1||a.opacity+1)-1})}var c,h,f;t.so?(f=o.outlierwidth,h=o.outliercolor,c=a.outliercolor):(f=(t.mlw+1||o.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,h="mlc"in t?t.mlcc=i(t.mlc):Array.isArray(o.color)?l.defaultLine:o.color,c="mc"in t?t.mcc=n(t.mc):Array.isArray(a.color)?l.defaultLine:a.color||"rgba(0,0,0,0)"),t.om?e.call(l.stroke,c).style({"stroke-width":(f||1)+"px",fill:"none"}):(e.style("stroke-width",f+"px").call(l.fill,c),f&&e.call(l.stroke,h))}function i(t,e,r,n){var i=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],u=Math.pow(i*i+o*o,x/2),c=Math.pow(s*s+l*l,x/2),h=(c*c*i-u*u*s)*n,f=(c*c*o-u*u*l)*n,d=3*c*(u+c),p=3*u*(u+c);return[[a.round(e[0]+(d&&h/d),2),a.round(e[1]+(d&&f/d),2)],[a.round(e[0]-(p&&h/p),2),a.round(e[1]-(p&&f/p),2)]]}var a=t("d3"),o=t("fast-isnumeric"),s=t("../../registry"),l=t("../color"),u=t("../colorscale"),c=t("../../lib"),h=t("../../lib/svg_text_utils"),f=t("../../constants/xmlns_namespaces"),d=t("../../traces/scatter/subtypes"),p=t("../../traces/scatter/make_bubble_size_func"),m=e.exports={};m.font=function(t,e,r,n){e&&e.family&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(l.fill,n)},m.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},m.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},m.setRect=function(t,e,r,n,i){t.call(m.setPosition,e,r).call(m.setSize,n,i)},m.translatePoint=function(t,e,r,n){var i=t.xp||r.c2p(t.x),a=t.yp||n.c2p(t.y);o(i)&&o(a)&&e.node()?"text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform","translate("+i+","+a+")"):e.remove()},m.translatePoints=function(t,e,r,n){t.each(function(t){var i=a.select(this);m.translatePoint(t,i,e,r,n)})},m.getPx=function(t,e){return Number(t.style(e).replace(/px$/,""))},m.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},m.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";l.stroke(e,n||a.color),m.dashLine(e,s,o)},m.lineGroupStyle=function(t,e,r,n){t.style("fill","none").each(function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},o=e||i.width||0,s=n||i.dash||"";a.select(this).call(l.stroke,r||i.color).call(m.dashLine,s,o)})},m.dashLine=function(t,e,r){r=+r||0;var n=Math.max(r,3);"solid"===e?e="":"dot"===e?e=n+"px,"+n+"px":"dash"===e?e=3*n+"px,"+3*n+"px":"longdash"===e?e=5*n+"px,"+5*n+"px":"dashdot"===e?e=3*n+"px,"+n+"px,"+n+"px,"+n+"px":"longdashdot"===e&&(e=5*n+"px,"+2*n+"px,"+n+"px,"+2*n+"px"),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},m.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(e){var r=a.select(this);try{r.call(l.fill,e[0].trace.fillcolor)}catch(e){c.error(e,t),r.remove()}})};var g=t("./symbol_defs");m.symbolNames=[],m.symbolFuncs=[],m.symbolNeedLines={},m.symbolNoDot={},m.symbolList=[],Object.keys(g).forEach(function(t){var e=g[t];m.symbolList=m.symbolList.concat([e.n,t,e.n+100,t+"-open"]),m.symbolNames[e.n]=t,m.symbolFuncs[e.n]=e.f,e.needLine&&(m.symbolNeedLines[e.n]=!0),e.noDot?m.symbolNoDot[e.n]=!0:m.symbolList=m.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"])});var v=m.symbolNames.length,y="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";m.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=m.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=v||t>=400?0:Math.floor(Math.max(t,0))},m.singlePointStyle=function(t,e,r){var i=r.marker,a=i.line;n(t,e,r,m.tryColorscale(i,""),m.tryColorscale(i,"line"),i,a)},m.pointStyle=function(t,e){if(t.size()){var r=e.marker,n=m.tryColorscale(r,""),i=m.tryColorscale(r,"line");t.each(function(t){m.singlePointStyle(t,a.select(this),e,n,i)})}},m.tryColorscale=function(t,e){var r=e?c.nestedProperty(t,e).get():t,n=r.colorscale,i=r.color;return n&&Array.isArray(i)?u.makeColorScaleFunc(u.extractScale(n,r.cmin,r.cmax)):c.identity};var b={start:1,end:-1,middle:0,bottom:1,top:-1};m.textPointStyle=function(t,e){t.each(function(t){var r=a.select(this),n=t.tx||e.text;if(!n||Array.isArray(n))return void r.remove();var i=t.tp||e.textposition,s=i.indexOf("top")!==-1?"top":i.indexOf("bottom")!==-1?"bottom":"middle",l=i.indexOf("left")!==-1?"end":i.indexOf("right")!==-1?"start":"middle",u=t.ts||e.textfont.size,c=t.mrc?t.mrc/.8+1:0;u=o(u)&&u>0?u:0,r.call(m.font,t.tf||e.textfont.family,u,t.tc||e.textfont.color).attr("text-anchor",l).text(n).call(h.convertToTspans);var f=a.select(this.parentNode),d=r.selectAll("tspan.line"),p=1.3*((d[0].length||1)-1)+1,g=b[l]*c,v=.75*u+b[s]*c+(b[s]-1)*p*u/2;f.attr("transform","translate("+g+","+v+")"),p>1&&d.attr({x:r.attr("x"),y:r.attr("y")})})};var x=.5;m.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],a=[];for(r=1;r=1e4&&(a.selectAll("[data-bb]").attr("data-bb",null),M=[]),t.setAttribute("data-bb",M.length),M.push(l),c.extendFlat({},l)},m.setClipUrl=function(t,e){if(!e)return void t.attr("clip-path",null);var r="#"+e,n=a.select("base");n.size()&&n.attr("href")&&(r=window.location.href.split("#")[0]+r),t.attr("clip-path","url("+r+")")},m.getTranslate=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}},m.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a+=" translate("+e+", "+r+")",a=a.trim(),t[i]("transform",a),a},m.getScale=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}},m.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a+=" scale("+e+", "+r+")",a=a.trim(),t[i]("transform",a),a},m.setPointGroupScale=function(t,e,r){var n,i,a;return e=e||1,r=r||1,i=1===e&&1===r?"":" scale("+e+","+r+")",a=/\s*sc.*/,t.each(function(){n=(this.getAttribute("transform")||"").replace(a,""),n+=i,n=n.trim(),this.setAttribute("transform",n)}),i}},{"../../constants/xmlns_namespaces":664,"../../lib":680,"../../lib/svg_text_utils":699,"../../registry":793,"../../traces/scatter/make_bubble_size_func":939,"../../traces/scatter/subtypes":944,"../color":575,"../colorscale":589,"./symbol_defs":599,d3:104,"fast-isnumeric":113}],599:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,i="l"+e+",-"+e,a="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+i+a+i+a+o+a+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),i=n.round(-t,2),a=n.round(t*-.309,2);return"M"+e+","+a+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+a+"L0,"+i+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M"+i+",-"+r+"V"+r+"L0,"+e+"L-"+i+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+i+"H"+r+"L"+e+",0L"+r+",-"+i+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),i=n.round(.951*e,2),a=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(e*-.309,2),u=n.round(.118*e,2),c=n.round(.809*e,2);return"M"+r+","+l+"H"+i+"L"+a+","+u+"L"+o+","+c+"L0,"+n.round(.382*e,2)+"L-"+o+","+c+"L-"+a+","+u+"L-"+i+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),i=n.round(.76*t,2);return"M-"+i+",0l-"+r+",-"+e+"h"+i+"l"+r+",-"+e+"l"+r+","+e+"h"+i+"l-"+r+","+e+"l"+r+","+e+"h-"+i+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+i+o+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+i+o+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+i+"-"+e+","+e+i+e+","+e+i+e+",-"+e+i+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+i+"0,"+e+i+e+",0"+i+"0,-"+e+i+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+","+i+"L0,0M"+e+","+i+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+",-"+i+"L0,0M"+e+",-"+i+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M"+i+","+e+"L0,0M"+i+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+i+","+e+"L0,0M-"+i+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0}}},{d3:104}],600:[function(t,e,r){"use strict";e.exports={visible:{valType:"boolean"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"]},symmetric:{valType:"boolean"},array:{valType:"data_array"},arrayminus:{valType:"data_array"},value:{valType:"number",min:0,dflt:10},valueminus:{valType:"number",min:0,dflt:10},traceref:{valType:"integer",min:0,dflt:0},tracerefminus:{valType:"integer",min:0,dflt:0},copy_ystyle:{valType:"boolean"},copy_zstyle:{valType:"boolean"},color:{valType:"color"},thickness:{valType:"number",min:0,dflt:2},width:{valType:"number",min:0},_deprecated:{opacity:{valType:"number"}}}},{}],601:[function(t,e,r){"use strict";function n(t,e,r,n){var a=e["error_"+n]||{},l=a.visible&&["linear","log"].indexOf(r.type)!==-1,u=[];if(l){for(var c=s(a),h=0;h0;t.each(function(t){var e,h=t[0].trace,f=h.error_x||{},d=h.error_y||{};h.ids&&(e=function(t){return t.id});var p=o.hasMarkers(h)&&h.marker.maxdisplayed>0;if(d.visible||f.visible){var m=i.select(this).selectAll("g.errorbar").data(t,e);m.exit().remove(),m.style("opacity",1);var g=m.enter().append("g").classed("errorbar",!0);c&&g.style("opacity",0).transition().duration(r.duration).style("opacity",1),m.each(function(t){var e=i.select(this),o=n(t,l,u);if(!p||t.vis){var h;if(d.visible&&a(o.x)&&a(o.yh)&&a(o.ys)){var m=d.width;h="M"+(o.x-m)+","+o.yh+"h"+2*m+"m-"+m+",0V"+o.ys,o.noYS||(h+="m-"+m+",0h"+2*m);var g=e.select("path.yerror");s=!g.size(),s?g=e.append("path").classed("yerror",!0):c&&(g=g.transition().duration(r.duration).ease(r.easing)),g.attr("d",h)}if(f.visible&&a(o.y)&&a(o.xh)&&a(o.xs)){var v=(f.copy_ystyle?d:f).width;h="M"+o.xh+","+(o.y-v)+"v"+2*v+"m0,-"+v+"H"+o.xs,o.noXS||(h+="m0,-"+v+"v"+2*v);var y=e.select("path.xerror");s=!y.size(),s?y=e.append("path").classed("xerror",!0):c&&(y=y.transition().duration(r.duration).ease(r.easing)),y.attr("d",h)}}})}})}},{"../../traces/scatter/subtypes":944,d3:104,"fast-isnumeric":113}],606:[function(t,e,r){"use strict";var n=t("d3"),i=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)})}},{"../color":575,d3:104}],607:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/constants");e.exports={_isLinkedToArray:"image",visible:{valType:"boolean",dflt:!0},source:{valType:"string"},layer:{valType:"enumerated",values:["below","above"],dflt:"above"},sizex:{valType:"number",dflt:0},sizey:{valType:"number",dflt:0},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain"},opacity:{valType:"number",min:0,max:1,dflt:1},x:{valType:"any",dflt:0},y:{valType:"any",dflt:0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper"}}},{"../../plots/cartesian/constants":724}],608:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib/to_log_range");e.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,u,c=t._fullLayout.images,h=e._id.charAt(0),f=0;f=2/3},r.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3},r.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],613:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.defaultLine},borderwidth:{valType:"number",min:0,dflt:0},font:a({},n,{}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"]},tracegroupgap:{valType:"number",min:0,dflt:10},x:{valType:"number",min:-2,max:3,dflt:1.02},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"}}},{"../../lib/extend":672,"../../plots/font_attributes":739,"../color/attributes":574}],614:[function(t,e,r){"use strict";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4}},{}],615:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("./attributes"),o=t("../../plots/layout_attributes"),s=t("./helpers");e.exports=function(t,e,r){function l(t,e){return i.coerce(d,p,a,t,e)}for(var u,c,h,f,d=t.legend||{},p=e.legend={},m=0,g="normal",v=0;v1)!==!1){if(l("bgcolor",e.paper_bgcolor),l("bordercolor"),l("borderwidth"),i.coerceFont(l,"font",e.font),l("orientation"),"h"===p.orientation){var b=t.xaxis;b&&b.rangeslider&&b.rangeslider.visible?(u=0,h="left",c=1.1,f="bottom"):(u=0,h="left",c=-.1,f="top")}l("traceorder",g),s.isGrouped(e.legend)&&l("tracegroupgap"),l("x",u),l("xanchor",h),l("y",c),l("yanchor",f),i.noneOrAll(d,p,["x","y"])}}},{"../../lib":680,"../../plots/layout_attributes":769,"../../registry":793,"./attributes":613,"./helpers":618}],616:[function(t,e,r){"use strict";function n(t,e){function r(r){y.convertToTspans(r,function(){r.selectAll("tspan.line").attr({x:r.attr("x")}),t.call(o,e)})}var n=t.data()[0][0],i=e._fullLayout,a=n.trace,s=p.traceIs(a,"pie"),l=a.index,u=s?n.label:a.name,c=t.selectAll("text.legendtext").data([0]);c.enter().append("text").classed("legendtext",!0),c.attr({x:40,y:0,"data-unformatted":u}).style("text-anchor","start").classed("user-select-none",!0).call(g.font,i.legend.font).text(u),e._context.editable&&!s?c.call(y.makeEditable).call(r).on("edit",function(t){this.attr({"data-unformatted":t}),this.text(t).call(r),this.text()||(t=" ");var i,a=n.trace._fullInput||{};if(["ohlc","candlestick"].indexOf(a.type)!==-1){var o=n.trace.transforms;i=o[o.length-1].direction+".name"}else i="name";h.restyle(e,i,t,l)}):c.call(r)}function i(t,e){var r,n=1,i=t.selectAll("rect").data([0]);i.enter().append("rect").classed("legendtoggle",!0).style("cursor","pointer").attr("pointer-events","all").call(v.fill,"rgba(0,0,0,0)"),i.on("mousedown",function(){r=(new Date).getTime(),r-e._legendMouseDownTimeT&&(n=Math.max(n-1,1)),1===n?r._clickTimeout=setTimeout(function(){a(t,e,n)},T):2===n&&(r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0,a(t,e,n))}})}function a(t,e,r){if(!e._dragged&&!e._editing){var n,i,a=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],o=t.data()[0][0],s=e._fullData,l=o.trace,u=l.legendgroup,c=[];if(1===r&&k&&e.data&&e._context.showTips?(f.notifier("Double click on legend to isolate individual trace","long"),k=!1):k=!1,p.traceIs(l,"pie")){var d=o.label,m=a.indexOf(d);1===r?m===-1?a.push(d):a.splice(m,1):2===r&&(a=[],e.calcdata[0].forEach(function(t){d!==t.label&&a.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===a.length&&m===-1&&(a=[])),h.relayout(e,"hiddenlabels",a)}else{var g,v=[],y=[];for(g=0;gtspan"),h=c[0].length||1;r=s*h,n=u.node()&&g.bBox(u.node()).width;var f=s*(.3+(1-h)/2);u.attr("y",f),c.attr("y",f)}r=Math.max(r,16)+3,i.height=r,i.width=n}function s(t,e,r){var n=t._fullLayout,i=n.legend,a=i.borderwidth,o=M.isGrouped(i);if(M.isVertical(i))o&&e.each(function(t,e){g.setTranslate(this,0,e*i.tracegroupgap)}),i.width=0,i.height=0,r.each(function(t){var e=t[0],r=e.height,n=e.width;g.setTranslate(this,a,5+a+i.height+r/2),i.height+=r,i.width=Math.max(i.width,n)}),i.width+=45+2*a,i.height+=10+2*a,o&&(i.height+=(i._lgroupsLength-1)*i.tracegroupgap),i.width=Math.ceil(i.width),i.height=Math.ceil(i.height),r.each(function(e){var r=e[0];c.select(this).select(".legendtoggle").call(g.setRect,0,-r.height/2,(t._context.editable?0:i.width)+40,r.height)});else if(o){i.width=0,i.height=0;for(var s=[i.width],l=e.data(),u=0,h=l.length;un.width-(n.margin.r+n.margin.l)&&(y=0,p+=m,i.height=i.height+m,m=0),g.setTranslate(this,a+y,5+a+e.height/2+p),i.width+=o+r,i.height=Math.max(i.height,e.height),y+=o+r,m=Math.max(e.height,m)}),i.width+=2*a,i.height+=10+2*a,i.width=Math.ceil(i.width),i.height=Math.ceil(i.height),r.each(function(e){var r=e[0];c.select(this).select(".legendtoggle").call(g.setRect,0,-r.height/2,t._context.editable?0:i.width,r.height)})}}function l(t){var e=t._fullLayout,r=e.legend,n="left";A.isRightAnchor(r)?n="right":A.isCenterAnchor(r)&&(n="center");var i="top";A.isBottomAnchor(r)?i="bottom":A.isMiddleAnchor(r)&&(i="middle"),d.autoMargin(t,"legend",{x:r.x,y:r.y,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:r.height*({top:1,middle:.5}[i]||0),t:r.height*({bottom:1,middle:.5}[i]||0)})}function u(t){var e=t._fullLayout,r=e.legend,n="left";A.isRightAnchor(r)?n="right":A.isCenterAnchor(r)&&(n="center"),d.autoMargin(t,"legend",{x:r.x,y:.5,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:0,t:0})}var c=t("d3"),h=t("../../plotly"),f=t("../../lib"),d=t("../../plots/plots"),p=t("../../registry"),m=t("../dragelement"),g=t("../drawing"),v=t("../color"),y=t("../../lib/svg_text_utils"),b=t("./constants"),x=t("../../constants/interactions"),_=t("./get_legend_data"),w=t("./style"),M=t("./helpers"),A=t("./anchor_utils"),k=!0,T=x.DBLCLICKDELAY;e.exports=function(t){function e(t,e){L.attr("data-scroll",e).call(g.setTranslate,0,e),C.call(g.setRect,N,t,b.scrollBarWidth,b.scrollBarHeight),S.select("rect").attr({y:y.borderwidth-e})}var r=t._fullLayout,o="legend"+r._uid;if(r._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var y=r.legend,x=r.showlegend&&_(t.calcdata,y),M=r.hiddenlabels||[];if(!r.showlegend||!x.length)return r._infolayer.selectAll(".legend").remove(),r._topdefs.select("#"+o).remove(),void d.autoMargin(t,"legend");var k=r._infolayer.selectAll("g.legend").data([0]);k.enter().append("g").attr({class:"legend","pointer-events":"all"});var S=r._topdefs.selectAll("#"+o).data([0]);S.enter().append("clipPath").attr("id",o).append("rect");var E=k.selectAll("rect.bg").data([0]);E.enter().append("rect").attr({class:"bg","shape-rendering":"crispEdges"}),E.call(v.stroke,y.bordercolor),E.call(v.fill,y.bgcolor),E.style("stroke-width",y.borderwidth+"px");var L=k.selectAll("g.scrollbox").data([0]);L.enter().append("g").attr("class","scrollbox");var C=k.selectAll("rect.scrollbar").data([0]);C.enter().append("rect").attr({class:"scrollbar",rx:20,ry:2,width:0,height:0}).call(v.fill,"#808BA4");var D=L.selectAll("g.groups").data(x);D.enter().append("g").attr("class","groups"),D.exit().remove();var z=D.selectAll("g.traces").data(f.identity);z.enter().append("g").attr("class","traces"),z.exit().remove(),z.call(w).style("opacity",function(t){var e=t[0].trace;return p.traceIs(e,"pie")?M.indexOf(t[0].label)!==-1?.5:1:"legendonly"===e.visible?.5:1}).each(function(){c.select(this).call(n,t).call(i,t)});var I=0!==k.enter().size();I&&(s(t,D,z),l(t));var P=r.width,O=r.height;s(t,D,z),y.height>O?u(t):l(t);var R=r._size,j=R.l+R.w*y.x,F=R.t+R.h*(1-y.y);A.isRightAnchor(y)?j-=y.width:A.isCenterAnchor(y)&&(j-=y.width/2),A.isBottomAnchor(y)?F-=y.height:A.isMiddleAnchor(y)&&(F-=y.height/2);var N=y.width,B=R.w;N>B?(j=R.l,N=B):(j+N>P&&(j=P-N),j<0&&(j=0),N=Math.min(P-j,y.width));var U=y.height,V=R.h;U>V?(F=R.t,U=V):(F+U>O&&(F=O-U),F<0&&(F=0),U=Math.min(O-F,y.height)),g.setTranslate(k,j,F);var H,q,G=U-b.scrollBarHeight-2*b.scrollBarMargin,Y=y.height-U;if(y.height<=U||t._context.staticPlot)E.attr({width:N-y.borderwidth,height:U-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),g.setTranslate(L,0,0),S.select("rect").attr({width:N-2*y.borderwidth,height:U-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth}),L.call(g.setClipUrl,o);else{H=b.scrollBarMargin,q=L.attr("data-scroll")||0,E.attr({width:N-2*y.borderwidth+b.scrollBarWidth+b.scrollBarMargin,height:U-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),S.select("rect").attr({width:N-2*y.borderwidth+b.scrollBarWidth+b.scrollBarMargin,height:U-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth-q}),L.call(g.setClipUrl,o),I&&e(H,q),k.on("wheel",null),k.on("wheel",function(){q=f.constrain(L.attr("data-scroll")-c.event.deltaY/G*Y,-Y,0),H=b.scrollBarMargin-q/Y*G,e(H,q),c.event.preventDefault()}),C.on(".drag",null),L.on(".drag",null);var W=c.behavior.drag().on("drag",function(){H=f.constrain(c.event.y-b.scrollBarHeight/2,b.scrollBarMargin,b.scrollBarMargin+G),q=-(H-b.scrollBarMargin)/G*Y,e(H,q)});C.call(W),L.call(W)}if(t._context.editable){var X,Z,J,K;k.classed("cursor-move",!0),m.init({element:k.node(),prepFn:function(){var t=g.getTranslate(k);J=t.x,K=t.y},moveFn:function(t,e){var r=J+t,n=K+e;g.setTranslate(k,r,n),X=m.align(r,0,R.l,R.l+R.w,y.xanchor),Z=m.align(n,0,R.t+R.h,R.t,y.yanchor)},doneFn:function(e,n,i){if(e&&void 0!==X&&void 0!==Z)h.relayout(t,{"legend.x":X,"legend.y":Z});else{var o=r._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return i.clientX>=t.left&&i.clientX<=t.right&&i.clientY>=t.top&&i.clientY<=t.bottom});o.size()>0&&(1===n?k._clickTimeout=setTimeout(function(){a(o,t,n)},T):2===n&&(k._clickTimeout&&clearTimeout(k._clickTimeout),a(o,t,n)))}}})}}}},{"../../constants/interactions":661,"../../lib":680,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/plots":778,"../../registry":793,"../color":575,"../dragelement":596,"../drawing":598,"./anchor_utils":612,"./constants":614,"./get_legend_data":617,"./helpers":618,"./style":620,d3:104}],617:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("./helpers");e.exports=function(t,e){function r(t,r){if(""!==t&&i.isGrouped(e))l.indexOf(t)===-1?(l.push(t),u=!0,s[t]=[[r]]):s[t].push([r]);else{var n="~~i"+h;l.push(n),s[n]=[[r]],h++}}var a,o,s={},l=[],u=!1,c={},h=0;for(a=0;ar[1])return r[1]}return i}function r(t){return t[0]}var n,i,a=t[0],o=a.trace,s=d.hasMarkers(o),u=d.hasText(o),f=d.hasLines(o);if(s||u||f){var p={},m={};s&&(p.mc=e("marker.color",r),p.mo=e("marker.opacity",c.mean,[.2,1]),p.ms=e("marker.size",c.mean,[2,16]),p.mlc=e("marker.line.color",r),p.mlw=e("marker.line.width",c.mean,[0,5]),m.marker={sizeref:1,sizemin:1,sizemode:"diameter"}),f&&(m.line={width:e("line.width",r,[0,10])}),u&&(p.tx="Aa",p.tp=e("textposition",r),p.ts=10,p.tc=e("textfont.color",r),p.tf=e("textfont.family",r)),n=[c.minExtend(a,p)],i=c.minExtend(o,m)}var g=l.select(this).select("g.legendpoints"),v=g.selectAll("path.scatterpts").data(s?n:[]);v.enter().append("path").classed("scatterpts",!0).attr("transform","translate(20,0)"),v.exit().remove(),v.call(h.pointStyle,i),s&&(n[0].mrc=3);var y=g.selectAll("g.pointtext").data(u?n:[]);y.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),y.exit().remove(),y.selectAll("text").call(h.textPointStyle,i)}function a(t){var e=t[0].trace,r=e.marker||{},n=r.line||{},i=l.select(this).select("g.legendpoints").selectAll("path.legendbar").data(u.traceIs(e,"bar")?[t]:[]);i.enter().append("path").classed("legendbar",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),i.exit().remove(),i.each(function(t){var e=l.select(this),i=t[0],a=(i.mlw+1||n.width+1)-1;e.style("stroke-width",a+"px").call(f.fill,i.mc||r.color),a&&e.call(f.stroke,i.mlc||n.color)})}function o(t){var e=t[0].trace,r=l.select(this).select("g.legendpoints").selectAll("path.legendbox").data(u.traceIs(e,"box")&&e.visible?[t]:[]);r.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.each(function(){var t=e.line.width,r=l.select(this);r.style("stroke-width",t+"px").call(f.fill,e.fillcolor),t&&r.call(f.stroke,e.line.color)})}function s(t){var e=t[0].trace,r=l.select(this).select("g.legendpoints").selectAll("path.legendpie").data(u.traceIs(e,"pie")&&e.visible?[t]:[]);r.enter().append("path").classed("legendpie",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.size()&&r.call(p,t[0],e)}var l=t("d3"),u=t("../../registry"),c=t("../../lib"),h=t("../drawing"),f=t("../color"),d=t("../../traces/scatter/subtypes"),p=t("../../traces/pie/style_one");e.exports=function(t){t.each(function(t){var e=l.select(this),r=e.selectAll("g.layers").data([0]);r.enter().append("g").classed("layers",!0),r.style("opacity",t[0].trace.opacity),r.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),r.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var n=r.selectAll("g.legendsymbols").data([t]);n.enter().append("g").classed("legendsymbols",!0),n.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(a).each(o).each(s).each(n).each(i)}},{"../../lib":680,"../../registry":793,"../../traces/pie/style_one":918,"../../traces/scatter/subtypes":944,"../color":575,"../drawing":598,d3:104}],621:[function(t,e,r){"use strict";function n(t,e){var r=e.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=t._fullLayout,o={};if("zoom"===n){for(var s,l,c="in"===i?.5:2,f=(1+c)/2,d=(1-c)/2,p=h.list(t,null,!0),m=0;m1)return n(["resetViews","toggleHover"]),o(g,r);c&&(n(["zoom3d","pan3d","orbitRotation","tableRotation"]),n(["resetCameraDefault3d","resetCameraLastSave3d"]),n(["hoverClosest3d"])),f&&(n(["zoomInGeo","zoomOutGeo","resetGeo"]),n(["hoverClosestGeo"]));var v=i(s),y=[];return((u||p)&&!v||m)&&(y=["zoom2d","pan2d"]),(u||m)&&a(l)&&(y.push("select2d"),y.push("lasso2d")),y.length&&n(y),!u&&!p||v||m||n(["zoomIn2d","zoomOut2d","autoScale2d","resetScale2d"]),u&&d?n(["toggleHover"]):p?n(["hoverClosestGl2d"]):u?n(["hoverClosestCartesian","hoverCompareCartesian"]):d&&n(["hoverClosestPie"]),o(g,r)}function i(t){for(var e=l.list({_fullLayout:t},null,!0),r=!0,n=0;n0)){var p=i(e,r,l);h("x",p[0]),h("y",p[1]),a.noneOrAll(t,e,["x","y"]),h("xanchor"),h("yanchor"),a.coerceFont(h,"font",r.font);var m=h("bgcolor");h("activecolor",o.contrast(m,u.lightAmount,u.darkAmount)),h("bordercolor"),h("borderwidth")}}},{"../../lib":680,"../color":575,"./attributes":625,"./button_attributes":626,"./constants":627}],629:[function(t,e,r){"use strict";function n(t){for(var e=v.list(t,"x",!0),r=[],n=0;np&&(p=f)));return p>=d?[d,p]:void 0}}var i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./constants"),s=t("./helpers");e.exports=function(t){var e=t._fullLayout,r=i.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var s=0;sY&&n>W&&!t.shiftKey?p.getCursor(i/r,1-a/n):"move";m(e,o),G=o.split("-")[0]}function a(e){N=h.getFromId(t,r.xref),B=h.getFromId(t,r.yref),U=v.getDataToPixel(t,N),V=v.getDataToPixel(t,B,!0),H=v.getPixelToData(t,N),q=v.getPixelToData(t,B,!0);var a="shapes["+n+"]";"path"===r.type?(j=r.path,F=a+".path"):(g=U(r.x0),y=V(r.y0),b=U(r.x1),x=V(r.y1),_=a+".x0",w=a+".y0",M=a+".x1",A=a+".y1"),gW&&(d[L]=r[I]=q(u),d[C]=r[P]=q(c)),f-h>Y&&(d[D]=r[O]=H(h),d[z]=r[R]=H(f))}e.attr("d",o(t,r))}var d,g,y,b,x,_,w,M,A,k,T,S,E,L,C,D,z,I,P,O,R,j,F,N,B,U,V,H,q,G,Y=10,W=10,X={setCursor:i,element:e.node(),prepFn:a,doneFn:s},Z=X.element.getBoundingClientRect();p.init(X)}function o(t,e){var r,n,i,a,o=e.type,l=h.getFromId(t,e.xref),u=h.getFromId(t,e.yref),c=t._fullLayout._size;if(l?(r=v.shapePositionToRange(l),n=function(t){return l._offset+l.r2p(r(t,!0))}):n=function(t){return c.l+c.w*t},u?(i=v.shapePositionToRange(u),a=function(t){return u._offset+u.r2p(i(t,!0))}):a=function(t){return c.t+c.h*(1-t)},"path"===o)return l&&"date"===l.type&&(n=v.decodeDate(n)),u&&"date"===u.type&&(a=v.decodeDate(a)),s(e.path,n,a);var f=n(e.x0),d=n(e.x1),p=a(e.y0),m=a(e.y1);if("line"===o)return"M"+f+","+p+"L"+d+","+m;if("rect"===o)return"M"+f+","+p+"H"+d+"V"+m+"H"+f+"Z";var g=(f+d)/2,y=(p+m)/2,b=Math.abs(g-f),x=Math.abs(y-p),_="A"+b+","+x,w=g+b+","+y;return"M"+w+_+" 0 1,1 "+g+","+(y-x)+_+" 0 0,1 "+w+"Z"}function s(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i],l=t.substr(1).replace(g.paramRE,function(t){return a[n]?t=e(t):o[n]&&(t=r(t)),n++,n>s&&(t="X"),t});return n>s&&(l=l.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+t)),i+l})}function l(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,function(t){return n>=s?t:(a[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}var u=t("../../plotly"),c=t("../../lib"),h=t("../../plots/cartesian/axes"),f=t("../color"),d=t("../drawing"),p=t("../dragelement"),m=t("../../lib/setcursor"),g=t("./constants"),v=t("./helpers");e.exports={draw:n,drawOne:i}},{"../../lib":680,"../../lib/setcursor":695,"../../plotly":714,"../../plots/cartesian/axes":719,"../color":575,"../dragelement":596,"../drawing":598,"./constants":640,"./helpers":643}],643:[function(t,e,r){"use strict";r.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},r.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},r.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},r.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},r.getDataToPixel=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.shapePositionToRange(e);i=function(t){return e._offset+e.r2p(o(t,!0))},"date"===e.type&&(i=r.decodeDate(i))}else i=n?function(t){return a.t+a.h*(1-t)}:function(t){return a.l+a.w*t};return i},r.getPixelToData=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.rangeToShapePosition(e);i=function(t){return o(e.p2r(t-e._offset))}}else i=n?function(t){return 1-(t-a.t)/a.h}:function(t){return(t-a.l)/a.w};return i}},{}],644:[function(t,e,r){"use strict";var n=t("./draw");e.exports={moduleType:"component",name:"shapes",layoutAttributes:t("./attributes"),supplyLayoutDefaults:t("./defaults"),calcAutorange:t("./calc_autorange"),draw:n.draw,drawOne:n.drawOne}},{"./attributes":638,"./calc_autorange":639,"./defaults":641,"./draw":642}],645:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("./attributes"),o=t("./helpers");e.exports=function(t,e,r,s,l){function u(r,i){return n.coerce(t,e,a,r,i)}if(s=s||{},l=l||{},!u("visible",!l.itemIsNotPlainObject))return e;u("layer"),u("opacity"),u("fillcolor"),u("line.color"),u("line.width"),u("line.dash");for(var c=t.path?"path":"rect",h=u("type",c),f=["x","y"],d=0;d<2;d++){var p=f[d],m={_fullLayout:r},g=i.coerceRef(t,e,m,p,"","paper");if("path"!==h){var v,y,b;"paper"!==g?(v=i.getFromId(m,g),b=o.rangeToShapePosition(v),y=o.shapePositionToRange(v)):y=b=n.identity;var x=p+"0",_=p+"1",w=t[x],M=t[_];t[x]=y(t[x],!0),t[_]=y(t[_],!0),i.coercePosition(e,m,u,g,x,.25),i.coercePosition(e,m,u,g,_,.75),e[x]=b(e[x]),e[_]=b(e[_]),t[x]=w,t[_]=M}}return"path"===h?u("path"):n.noneOrAll(t,e,["x0","x1","y0","y1"]),e}},{"../../lib":680,"../../plots/cartesian/axes":719,"./attributes":638,"./helpers":643}],646:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../../plots/pad_attributes"),a=t("../../lib/extend").extendFlat,o=t("../../lib/extend").extendDeep,s=t("../../plots/animation_attributes"),l=t("./constants"),u={_isLinkedToArray:"step",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"}};e.exports={_isLinkedToArray:"slider",visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1}, +x:{valType:"number",min:-2,max:3,dflt:0},pad:o({},i,{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:a({},n,{})},font:a({},n,{}),activebgcolor:{valType:"color",dflt:l.gripBgActiveColor},bgcolor:{valType:"color",dflt:l.railBgColor},bordercolor:{valType:"color",dflt:l.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l.tickLength},tickcolor:{valType:"color",dflt:l.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l.minorTickLength}}},{"../../lib/extend":672,"../../plots/animation_attributes":715,"../../plots/font_attributes":739,"../../plots/pad_attributes":777,"./constants":647}],647:[function(t,e,r){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,fontSizeToHeight:1.3,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],648:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return a.coerce(t,e,s,r,n)}n("visible",i(t,e).length>0)&&(n("active"),n("x"),n("y"),a.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("len"),n("lenmode"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),a.coerceFont(n,"font",r.font),n("currentvalue.visible")&&(n("currentvalue.xanchor"),n("currentvalue.prefix"),n("currentvalue.suffix"),n("currentvalue.offset"),a.coerceFont(n,"currentvalue.font",e.font)),n("transition.duration"),n("transition.easing"),n("bgcolor"),n("activebgcolor"),n("bordercolor"),n("borderwidth"),n("ticklen"),n("tickwidth"),n("tickcolor"),n("minorticklen"))}function i(t,e){function r(t,e){return a.coerce(n,i,c,t,e)}for(var n,i,o=t.steps||[],s=e.steps=[],l=0;l=r.steps.length&&(r.active=0),e.call(s,r).call(x,r).call(c,r).call(p,r).call(b,t,r).call(l,t,r),k.setTranslate(e,r.lx+r.pad.l,r.ly+r.pad.t),e.call(g,r,r.active/(r.steps.length-1),!1),e.call(s,r)}function s(t,e,r){if(e.currentvalue.visible){var n,i,a=t.selectAll("text").data([0]);switch(e.currentvalue.xanchor){case"right":n=e.inputAreaLength-E.currentValueInset-e.currentValueMaxWidth,i="left";break;case"center":n=.5*e.inputAreaLength,i="middle";break;default:n=E.currentValueInset,i="left"}a.enter().append("text").classed(E.labelClass,!0).classed("user-select-none",!0).attr("text-anchor",i);var o=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)o+=r;else{o+=e.steps[e.active].label}return e.currentvalue.suffix&&(o+=e.currentvalue.suffix),a.call(k.font,e.currentvalue.font).text(o).call(T.convertToTspans),k.setTranslate(a,n,e.currentValueHeight),a}}function l(t,e,r){var n=t.selectAll("rect."+E.gripRectClass).data([0]);n.enter().append("rect").classed(E.gripRectClass,!0).call(d,e,t,r).style("pointer-events","all"),n.attr({width:E.gripWidth,height:E.gripHeight,rx:E.gripRadius,ry:E.gripRadius}).call(A.stroke,r.bordercolor).call(A.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function u(t,e,r){var n=t.selectAll("text").data([0]);return n.enter().append("text").classed(E.labelClass,!0).classed("user-select-none",!0).attr("text-anchor","middle"),n.call(k.font,r.font).text(e.step.label).call(T.convertToTspans),n}function c(t,e){var r=t.selectAll("g."+E.labelsClass).data([0]);r.enter().append("g").classed(E.labelsClass,!0);var n=r.selectAll("g."+E.labelGroupClass).data(e.labelSteps);n.enter().append("g").classed(E.labelGroupClass,!0),n.exit().remove(),n.each(function(t){var r=w.select(this);r.call(u,t,e),k.setTranslate(r,v(e,t.fraction),E.tickOffset+e.ticklen+e.labelHeight+E.labelOffset+e.currentValueTotalHeight)})}function h(t,e,r,n,i){var a=Math.round(n*(r.steps.length-1));a!==r.active&&f(t,e,r,a,!0,i)}function f(t,e,r,n,i,a){var o=r.active;r._input.active=r.active=n;var l=r.steps[r.active];e.call(g,r,r.active/(r.steps.length-1),a),e.call(s,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),l&&l.method&&i&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=i,e._nextMethod.doTransition=a):(e._nextMethod={step:l,doCallback:i,doTransition:a},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&&(M.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function d(t,e,r){function n(){return r.data()[0]}var i=r.node(),a=w.select(e);t.on("mousedown",function(){var t=n();e.emit("plotly_sliderstart",{slider:t});var o=r.select("."+E.gripRectClass);w.event.stopPropagation(),w.event.preventDefault(),o.call(A.fill,t.activebgcolor);var s=y(t,w.mouse(i)[0]);h(e,r,t,s,!0),t._dragging=!0,a.on("mousemove",function(){var t=n(),a=y(t,w.mouse(i)[0]);h(e,r,t,a,!1)}),a.on("mouseup",function(){var t=n();t._dragging=!1,o.call(A.fill,t.bgcolor),a.on("mouseup",null),a.on("mousemove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})})})}function p(t,e){var r=t.selectAll("rect."+E.tickRectClass).data(e.steps);r.enter().append("rect").classed(E.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(t,r){var n=r%e.labelStride==0,i=w.select(this);i.attr({height:n?e.ticklen:e.minorticklen}).call(A.fill,e.tickcolor),k.setTranslate(i,v(e,r/(e.steps.length-1))-.5*e.tickwidth,(n?E.tickOffset:E.minorTickOffset)+e.currentValueTotalHeight)})}function m(t){t.labelSteps=[];for(var e=t.steps.length,r=0;r0&&(o=o.transition().duration(e.transition.duration).ease(e.transition.easing)),o.attr("transform","translate("+(a-.5*E.gripWidth)+","+e.currentValueTotalHeight+")")}}function v(t,e){return t.inputAreaStart+E.stepInset+(t.inputAreaLength-2*E.stepInset)*Math.min(1,Math.max(0,e))}function y(t,e){return Math.min(1,Math.max(0,(e-E.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*E.stepInset-2*t.inputAreaStart)))}function b(t,e,r){var n=t.selectAll("rect."+E.railTouchRectClass).data([0]);n.enter().append("rect").classed(E.railTouchRectClass,!0).call(d,e,t,r).style("pointer-events","all"),n.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,E.tickOffset+r.ticklen+r.labelHeight)}).call(A.fill,r.bgcolor).attr("opacity",0),k.setTranslate(n,0,r.currentValueTotalHeight)}function x(t,e){var r=t.selectAll("rect."+E.railRectClass).data([0]);r.enter().append("rect").classed(E.railRectClass,!0);var n=e.inputAreaLength-2*E.railInset;r.attr({width:n,height:E.railWidth,rx:E.railRadius,ry:E.railRadius,"shape-rendering":"crispEdges"}).call(A.stroke,e.bordercolor).call(A.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),k.setTranslate(r,E.railInset,.5*(e.inputAreaWidth-E.railWidth)+e.currentValueTotalHeight)}function _(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n0?[0]:[]);if(s.enter().append("g").classed(E.containerClassName,!0).style("cursor","ew-resize"),s.exit().remove(),s.exit().size()&&_(t),0!==r.length){var l=s.selectAll("g."+E.groupClassName).data(r,i);l.enter().append("g").classed(E.groupClassName,!0),l.exit().each(function(e){w.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,M.autoMargin(t,E.autoMarginIdRoot+e._index)});for(var u=0;u0||f<0){var m={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[b.side];e.attr("transform","translate("+m+")")}}}var m=r.propContainer,g=r.propName,v=r.traceIndex,y=r.dfltName,b=r.avoid||{},x=r.attributes,_=r.transform,w=r.containerGroup,M=t._fullLayout,A=m.titlefont.family,k=m.titlefont.size,T=m.titlefont.color,S=1,E=!1,L=m.title.trim();""===L&&(S=0),L.match(/Click to enter .+ title/)&&(S=.2,E=!0),w||(w=M._infolayer.selectAll(".g-"+e).data([0]),w.enter().append("g").classed("g-"+e,!0));var C=w.selectAll("text").data([0]);C.enter().append("text"),C.text(L).attr("class",e),C.attr({"data-unformatted":L}).call(f);var D="Click to enter "+y+" title";t._context.editable?(L?C.on(".opacity",null):function(){S=0,E=!0,L=D,C.attr({"data-unformatted":L}).text(L).on("mouseover.opacity",function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)})}(),C.call(c.makeEditable).on("edit",function(e){void 0!==v?a.restyle(t,g,e,v):a.relayout(t,g,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(f)}).on("input",function(t){this.text(t||" ").attr(x).selectAll("tspan.line").attr(x)})):L&&!L.match(/Click to enter .+ title/)||C.remove(),C.classed("js-placeholder",E)}},{"../../constants/interactions":661,"../../lib":680,"../../lib/svg_text_utils":699,"../../plotly":714,"../../plots/plots":778,"../color":575,"../drawing":598,d3:104,"fast-isnumeric":113}],652:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat,o=t("../../plots/pad_attributes"),s={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""}};e.exports={_isLinkedToArray:"updatemenu",_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:s,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a({},o,{}),font:a({},n,{}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1}}},{"../../lib/extend":672,"../../plots/font_attributes":739,"../../plots/pad_attributes":777,"../color/attributes":574}],653:[function(t,e,r){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,fontSizeToHeight:1.3,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF"}},{}],654:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return a.coerce(t,e,s,r,n)}n("visible",i(t,e).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),a.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),a.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function i(t,e){function r(t,e){return a.coerce(n,i,c,t,e)}for(var n,i,o=t.buttons||[],s=e.buttons=[],l=0;l0?[0]:[]);if(a.enter().append("g").classed(E.containerClassName,!0).style("cursor","pointer"),a.exit().remove(),a.exit().size()&&_(t),0!==r.length){var c=a.selectAll("g."+E.headerGroupClassName).data(r,i);c.enter().append("g").classed(E.headerGroupClassName,!0);var h=a.selectAll("g."+E.dropdownButtonGroupClassName).data([0]);h.enter().append("g").classed(E.dropdownButtonGroupClassName,!0).style("pointer-events","all");for(var f=0;fM,T=n.barLength+2*n.barPad,S=n.barWidth+2*n.barPad,E=p,L=g+v;L+S>u&&(L=u-S);var C=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,n.barColor),k?(this.hbar=C.attr({rx:n.barRadius,ry:n.barRadius,x:E,y:L,width:T,height:S}),this._hbarXMin=E+T/2,this._hbarTranslateMax=M-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var D=v>A,z=n.barWidth+2*n.barPad,I=n.barLength+2*n.barPad,P=p+m,O=g;P+z>l&&(P=l-z);var R=this.container.selectAll("rect.scrollbar-vertical").data(D?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,n.barColor),D?(this.vbar=R.attr({rx:n.barRadius,ry:n.barRadius,x:P,y:O,width:z,height:I}),this._vbarYMin=O+I/2,this._vbarTranslateMax=A-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var j=this.id,F=c-.5,N=D?h+z+.5:h+.5,B=f-.5,U=k?d+S+.5:d+.5,V=s._topdefs.selectAll("#"+j).data(k||D?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",j).append("rect"),k||D?(this._clipRect=V.select("rect").attr({x:Math.floor(F),y:Math.floor(B),width:Math.ceil(N)-Math.floor(F),height:Math.ceil(U)-Math.floor(B)}),this.container.call(o.setClipUrl,j),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),k||D){var H=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(H);var q=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault(),i.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(q),D&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,r)},n.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},n.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=i.event.dx),this.vbar&&(e-=i.event.dy),this.setTranslate(t,e)},n.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=i.event.deltaY),this.vbar&&(e+=i.event.deltaY),this.setTranslate(t,e)},n.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,n=r+this._hbarTranslateMax;t=(s.constrain(i.event.x,r,n)-r)/(n-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,o=a+this._vbarTranslateMax;e=(s.constrain(i.event.y,a,o)-a)/(o-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},n.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=s.constrain(t||0,0,r),e=s.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(o.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(o.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var a=e/n;this.vbar.call(o.setTranslate,t,e+a*this._vbarTranslateMax)}}},{"../../lib":680,"../color":575,"../drawing":598,d3:104}],658:[function(t,e,r){"use strict";e.exports={solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}},{}],659:[function(t,e,r){"use strict";e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],660:[function(t,e,r){"use strict";e.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},{}],661:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300}},{}],662:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5}},{}],663:[function(t,e,r){"use strict";e.exports={entityToUnicode:{mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},unicodeToEntity:{"&":"amp","<":"lt",">":"gt",'"':"quot","'":"#x27","/":"#x2F"}}},{}], +664:[function(t,e,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],665:[function(t,e,r){"use strict";var n=t("./plotly");r.version="1.25.2",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config"),r.plot=n.plot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.setPlotConfig=t("./plot_api/set_plot_config"),r.register=t("./plot_api/register"),r.toImage=t("./plot_api/to_image"),r.downloadImage=t("./snapshot/download"),r.validate=t("./plot_api/validate"),r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.register(t("./traces/scatter")),r.register([t("./components/legend"),t("./components/annotations"),t("./components/shapes"),t("./components/images"),t("./components/updatemenus"),t("./components/sliders"),t("./components/rangeslider"),t("./components/rangeselector")]),r.Icons=t("../build/ploticon"),r.Plots=n.Plots,r.Fx=n.Fx,r.Snapshot=t("./snapshot"),r.PlotSchema=t("./plot_api/plot_schema"),r.Queue=t("./lib/queue"),r.d3=t("d3")},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":571,"./components/images":611,"./components/legend":619,"./components/rangeselector":631,"./components/rangeslider":637,"./components/shapes":644,"./components/sliders":650,"./components/updatemenus":656,"./fonts/mathjax_config":666,"./lib/queue":692,"./plot_api/plot_schema":708,"./plot_api/register":709,"./plot_api/set_plot_config":710,"./plot_api/to_image":712,"./plot_api/validate":713,"./plotly":714,"./snapshot":798,"./snapshot/download":795,"./traces/scatter":934,d3:104,"es6-promise":110}],666:[function(t,e,r){"use strict";"undefined"!=typeof MathJax?(r.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):r.MathJax=!1},{}],667:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){Array.isArray(t)&&(e[r]=t[n])}},{}],668:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../constants/numerical").BADNUM;e.exports=function(t){return"string"==typeof t&&(t=t.replace(/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,"")),n(t)?Number(t):i}},{"../constants/numerical":662,"fast-isnumeric":113}],669:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("tinycolor2"),a=t("../components/colorscale/get_scale"),o=(Object.keys(t("../components/colorscale/scales")),t("./nested_property")),s=/^([2-9]|[1-9][0-9]+)$/;r.valObjects={data_array:{coerceFunction:function(t,e,r){Array.isArray(t)?e.set(t):void 0!==r&&e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),n.values.indexOf(t)===-1?e.set(r):e.set(t)}},boolean:{coerceFunction:function(t,e,r){t===!0||t===!1?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;n.strict!==!0&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(a(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?(Math.abs(t)>180&&(t-=360*Math.round(t/360)),e.set(+t)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r){var n=r.length;if("string"==typeof t&&t.substr(0,n)===r&&s.test(t.substr(n)))return void e.set(t);e.set(r)},validateFunction:function(t,e){var r=e.dflt,n=r.length;return t===r||"string"==typeof t&&!(t.substr(0,n)!==r||!s.test(t.substr(n)))}},flaglist:{coerceFunction:function(t,e,r,n){if("string"!=typeof t)return void e.set(r);if((n.extras||[]).indexOf(t)!==-1)return void e.set(t);for(var i=t.split("+"),a=0;a0&&(o=o.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+o}return n}function l(t){return t.formatDate("yyyy")}function u(t){return t.formatDate("M yyyy")}function c(t){return t.formatDate("M d")}function h(t){return t.formatDate("M d, yyyy")}var f=t("d3"),d=t("fast-isnumeric"),p=t("./loggers").error,m=t("./mod"),g=t("../constants/numerical"),v=g.BADNUM,y=g.ONEDAY,b=g.ONEHOUR,x=g.ONEMIN,_=g.ONESEC,w=g.EPOCHJD,M=t("../registry"),A=f.time.format.utc,k=(new Date).getFullYear()-70;r.dateTick0=function(t,e){return n(t)?e?M.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:M.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"},r.dfltRange=function(t){return n(t)?M.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},r.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime};var T,S;r.dateTime2ms=function(t,e){if(r.isJSDate(t))return t=Number(t)-t.getTimezoneOffset()*x,t>=T&&t<=S?t:v;if("string"!=typeof t&&"number"!=typeof t)return v;t=String(t);var i=n(e),a=t.charAt(0);!i||"G"!==a&&"g"!==a||(t=t.substr(1),e="");var o=i&&"chinese"===e.substr(0,7),s=t.match(o?/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m:/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m);if(!s)return v;var l=s[1],u=s[3]||"1",c=Number(s[5]||1),h=Number(s[7]||0),f=Number(s[9]||0),d=Number(s[11]||0);if(i){if(2===l.length)return v;l=Number(l);var p;try{var m=M.getComponentMethod("calendars","getCal")(e);if(o){var g="i"===u.charAt(u.length-1);u=parseInt(u,10),p=m.newDate(l,m.toMonthIndex(l,u,g),c)}else p=m.newDate(l,Number(u),c)}catch(t){return v}return p?(p.toJD()-w)*y+h*b+f*x+d*_:v}l=2===l.length?(Number(l)+2e3-k)%100+k:Number(l),u-=1;var A=new Date(Date.UTC(2e3,u,c,h,f));return A.setUTCFullYear(l),A.getUTCMonth()!==u?v:A.getUTCDate()!==c?v:A.getTime()+d*_},T=r.MIN_MS=r.dateTime2ms("-9999"),S=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==v};var E=90*y,L=3*b,C=5*x;r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=T&&t<=S))return v;e||(e=0);var i,o,s,l,u,c,h=Math.floor(10*m(t+.05,1)),f=Math.round(t-h/10);if(n(r)){var d=Math.floor(f/y)+w,p=Math.floor(m(t,y));try{i=M.getComponentMethod("calendars","getCal")(r).fromJD(d).formatDate("yyyy-mm-dd")}catch(t){i=A("G%Y-%m-%d")(new Date(f))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=e=T+y&&t<=S-y))return v;var e=Math.floor(10*m(t+.05,1)),r=new Date(Math.round(t-e/10));return a(f.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,i){if(r.isJSDate(t)||"number"==typeof t){if(n(i))return p("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,i))return p("unrecognized date",t),e;return t};var D=/%\d?f/g,z=[59,59.9,59.99,59.999,59.9999],I=A("%Y"),P=A("%b %Y"),O=A("%b %-d"),R=A("%b %-d, %Y");r.formatDate=function(t,e,r,i){var a,f;if(i=n(i)&&i,e)return o(e,t,i);if(i)try{var d=Math.floor((t+.05)/y)+w,p=M.getComponentMethod("calendars","getCal")(i).fromJD(d);"y"===r?f=l(p):"m"===r?f=u(p):"d"===r?(a=l(p),f=c(p)):(a=h(p),f=s(t,r))}catch(t){return"Invalid"}else{var m=new Date(Math.floor(t+.05));"y"===r?f=I(m):"m"===r?f=P(m):"d"===r?(a=I(m),f=O(m)):(a=R(m),f=s(t,r))}return f+(a?"\n"+a:"")};var j=3*y;r.incrementMonth=function(t,e,r){r=n(r)&&r;var i=m(t,y);if(t=Math.round(t-i),r)try{var a=Math.round(t/y)+w,o=M.getComponentMethod("calendars","getCal")(r),s=o.fromJD(a);return e%12?o.add(s,e,"m"):o.add(s,e/12,"y"),(s.toJD()-w)*y+i}catch(e){p("invalid ms "+t+" in calendar "+r)}var l=new Date(t+j);return l.setUTCMonth(l.getUTCMonth()+e)+i-j},r.findExactDates=function(t,e){for(var r,i,a=0,o=0,s=0,l=0,u=n(e)&&M.getComponentMethod("calendars","getCal")(e),c=0;c0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n},r.makeLine=function(t,e){var r={};return r=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t},e&&(r.trace=e),r},r.makePolygon=function(t,e){var r={};if(1===t.length)r={type:"Polygon",coordinates:t};else{for(var n=new Array(t.length),i=0;i",e))>=0;){var r=t.indexOf("",e);if(r/g,"\n")}function a(t){return t.replace(/\<.*\>/g,"")}function o(t){for(var e=u.entityToUnicode,r=0;(r=t.indexOf("&",r))>=0;){var n=t.indexOf(";",r);if(nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},i.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},i.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o-1||1/0!==c&&c>=Math.pow(2,r)?t(e,r,n):l},i.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)},r["_"+e]=t,r},i.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,u=new Array(l),c=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*u[n];c[r]=a}return c},i.syncOrAsync=function(t,e,r){function n(){return i.syncOrAsync(t,e,r)}for(var a,o;t.length;)if(o=t.splice(0,1)[0],(a=o(e))&&a.then)return a.then(n).then(void 0,i.promiseError);return r&&r(e)},i.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},i.noneOrAll=function(t,e,r){if(t){var n,i,a=!1,o=!0;for(n=0;n1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l}},{"./clean_number":668,"./coerce":669,"./dates":670,"./extend":672,"./filter_unique":673,"./filter_visible":674,"./identity":679,"./is_array":681,"./is_plain_object":682,"./loggers":683,"./matrix":684,"./mod":685,"./nested_property":686,"./noop":687,"./notifier":688,"./push_unique":691,"./relink_private":693,"./search":694,"./stats":697,"./to_log_range":700,d3:104}],681:[function(t,e,r){"use strict";var n="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}};e.exports=function(t){return Array.isArray(t)||n.isView(t)}},{}],682:[function(t,e,r){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],683:[function(t,e,r){"use strict";function n(t,e){if(t.apply)t.apply(t,e);else for(var r=0;r1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;e=0;e--){if(n=t[e][0],a=t[e][1],l=!1,d(n))for(r=n.length-1;r>=0;r--)i(n[r],o(a,r))?l?n[r]=void 0:n.pop():l=!0;else if("object"==typeof n&&null!==n)for(s=Object.keys(n),l=!1,r=s.length-1;r>=0;r--)i(n[s[r]],o(a,s[r]))?delete n[s[r]]:l=!0;if(l)return}}function c(t){return void 0===t||null===t||"object"==typeof t&&(d(t)?!t.length:!Object.keys(t).length)}function h(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var f=t("fast-isnumeric"),d=t("./is_array"),p=t("./is_plain_object"),m=t("../plot_api/container_array_match");e.exports=function(t,e){if(f(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var r,i,o,s=0,l=e.split(".");s/g),s=0;sa||ns)&&(!e||!u(t))}function r(t,e){var r=t[0],l=t[1];if(ra||ls)return!1;var u,c,h,f,d,p=n.length,m=n[0][0],g=n[0][1],v=0;for(u=1;uMath.max(c,m)||l>Math.max(h,g)))if(lc||Math.abs(n(o,f))>i)return!0;return!1};i.filter=function(t,e){function r(r){t.push(r);var s=n.length,l=i;n.splice(o+1);for(var u=l+1;u1){r(t.pop())}return{addPt:r,raw:t,filtered:n}}},{"./matrix":684}],691:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;ra.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},o.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},o.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[], +sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},o.undo=function(t){var e,r;if(t.framework&&t.framework.isPolar)return void t.framework.undo();if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function o(t,e){return t>=e}var s=t("fast-isnumeric"),l=t("./loggers");r.findBin=function(t,e,r){if(s(e.start))return r?Math.ceil((t-e.start)/e.size)-1:Math.floor((t-e.start)/e.size);var u,c,h=0,f=e.length,d=0;for(c=e[e.length-1]>=e[0]?r?n:i:r?o:a;h90&&l.log("Long binary search..."),h-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,i=e[n]-e[0]||1,a=i/(n||1)/1e4,o=[e[0]],s=0;se[s]+a&&(i=Math.min(i,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:i}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;it.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{"fast-isnumeric":113}],698:[function(t,e,r){"use strict";function n(t){var e=i(t);return e.length?e:[0,0,0,1]}var i=t("color-rgba");e.exports=n},{"color-rgba":85}],699:[function(t,e,r){"use strict";function n(t,e){return t.node().getBoundingClientRect()[e]}function i(t){return t.replace(/(<|<|<)/g,"\\lt ").replace(/(>|>|>)/g,"\\gt ")}function a(t,e,r){var n="math-output-"+f.randstr([],64),a=h.select("body").append("div").attr({id:n}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(i(t));MathJax.Hub.Queue(["Typeset",MathJax.Hub,a.node()],function(){var e=h.select("body").select("#MathJax_SVG_glyphs");if(a.select(".MathJax_SVG").empty()||!a.select("svg").node())f.log("There was an error in the tex syntax.",t),r();else{var n=a.select("svg").node().getBoundingClientRect();r(a.select(".MathJax_SVG"),e,n)}a.remove()})}function o(t,e){for(var r=t||"",n=0;n]*>)/).map(function(t){var e=t.match(/<(\/?)([^ >]*)\s*(.*)>/i),n=e&&e[2].toLowerCase(),i=m[n];if(void 0!==i){var a=e[1],o=e[3],s=o.match(/^style\s*=\s*"([^"]+)"\s*/i);if("a"===n){if(a)return"
";if("href"!==o.substr(0,4).toLowerCase())return"";var u=o.substr(4).replace(/["']/g,"").replace(/=/,""),c=document.createElement("a");return c.href=u,g.indexOf(c.protocol)===-1?"":''}if("br"===n)return"
";if(a)return"sup"===n?'':"sub"===n?'':"";var h=""}return r.xml_entity_encode(t).replace(/");i>0;i=e.indexOf("
",i+1))n.push(i);var a=0;n.forEach(function(t){for(var r=t+a,n=e.slice(0,r),i="",o=n.length-1;o>=0;o--){var s=n[o].match(/<(\/?).*>/i);if(s&&"
"!==n[o]){s[1]||(i=n[o]);break}}i&&(e.splice(r+1,0,i),e.splice(r,0,""),a+=2)});var o=e.join(""),u=o.split(/
/gi);return u.length>1&&(e=u.map(function(t,e){return''+t+""})),e.join("")}function c(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||"top",l=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return i="bottom"===s?function(){return l.bottom-n.height}:"middle"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},a="right"===o?function(){return l.right-n.width}:"center"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:i()-u.top+"px",left:a()-u.left+"px","z-index":1e3}),this}}var h=t("d3"),f=t("../lib"),d=t("../constants/xmlns_namespaces"),p=t("../constants/string_mappings");h.selection.prototype.appendSVG=function(t){for(var e=['',t,""].join(""),r=(new DOMParser).parseFromString(e,"application/xml"),n=r.documentElement.firstChild;n;)this.node().appendChild(this.node().ownerDocument.importNode(n,!0)),n=n.nextSibling;return r.querySelector("parsererror")?(f.log(r.querySelector("parsererror div").textContent),null):h.select(this.node().lastChild)},r.html_entity_decode=function(t){var e=h.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":t.indexOf("<")!==-1||t.indexOf(">")!==-1?"":e.html(t).text()});return e.remove(),r},r.xml_entity_encode=function(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")},r.convertToTspans=function(t,e){function r(){d.empty()||(p=s.attr("class")+"-math",d.select("svg."+p).remove()),t.text("").style({visibility:"inherit","white-space":"pre"}),c=t.appendSVG(o),c||t.text(i),t.select("a").size()&&t.style("pointer-events","all"),e&&e.call(s)}var i=t.text(),o=u(i),s=t,l=!s.attr("data-notex")&&o.match(/([^$]*)([$]+[^$]*[$]+)([^$]*)/),c=i,d=h.select(s.node().parentNode);if(!d.empty()){var p=s.attr("class")?s.attr("class").split(" ")[0]:"text";p+="-math",d.selectAll("svg."+p).remove(),d.selectAll("g."+p+"-group").remove(),t.style({visibility:null});for(var m=t.node();m&&m.removeAttribute;m=m.parentNode)m.removeAttribute("data-bb");if(l){var g=f.getPlotDiv(s.node());(g&&g._promises||[]).push(new Promise(function(t){s.style({visibility:"hidden"});var i={fontSize:parseInt(s.style("font-size"),10)};a(l[2],i,function(i,a,o){d.selectAll("svg."+p).remove(),d.selectAll("g."+p+"-group").remove();var l=i&&i.select("svg");if(!l||!l.node())return r(),void t();var u=d.append("g").classed(p+"-group",!0).attr({"pointer-events":"none"});u.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild),l.attr({class:p,height:o.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=s.style("fill")||"black";l.select("g").attr({fill:c,stroke:c});var h=n(l,"width"),f=n(l,"height"),m=+s.attr("x")-h*{start:0,middle:.5,end:1}[s.attr("text-anchor")||"start"],g=parseInt(s.style("font-size"),10)||n(s,"height"),v=-g/4;"y"===p[0]?(u.attr({transform:"rotate("+[-90,+s.attr("x"),+s.attr("y")]+") translate("+[-h/2,v-f/2]+")"}),l.attr({x:+s.attr("x"),y:+s.attr("y")})):"l"===p[0]?l.attr({x:s.attr("x"),y:v-f/2}):"a"===p[0]?l.attr({x:0,y:v}):l.attr({x:m,y:+s.attr("y")+v-f/2}),e&&e.call(s,u),t(u)})}))}else r();return t}};var m={sup:'font-size:70%" dy="-0.6em',sub:'font-size:70%" dy="0.3em',b:"font-weight:bold",i:"font-style:italic",a:"",span:"",br:"",em:"font-style:italic;font-weight:bold"},g=["http:","https:","mailto:"],v=new RegExp("]*)?/?>","g"),y=Object.keys(p.entityToUnicode).map(function(t){return{regExp:new RegExp("&"+t+";","g"),sub:p.entityToUnicode[t]}}),b=Object.keys(p.unicodeToEntity).map(function(t){return{regExp:new RegExp(t,"g"),sub:"&"+p.unicodeToEntity[t]+";"}}),x=/(\r\n?|\n)/g;r.plainText=function(t){return(t||"").replace(v," ")},r.makeEditable=function(t,e,r){function n(){a(),o.style({opacity:0});var t,e=u.attr("class");(t=e?"."+e.split(" ")[0]+"-math-group":"[class*=-math-group]")&&h.select(o.node().parentNode).select(t).style({opacity:0})}function i(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}function a(){var t=f.getPlotDiv(o.node()),e=h.select(t),n=e.select(".svg-container"),a=n.append("div");a.classed("plugin-editable editable",!0).style({position:"absolute","font-family":o.style("font-family")||"Arial","font-size":o.style("font-size")||12,color:r.fill||o.style("fill")||"black",opacity:1,"background-color":r.background||"transparent",outline:"#ffffff33 1px solid",margin:[-parseFloat(o.style("font-size"))/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(r.text||o.attr("data-unformatted")).call(c(o,n,r)).on("blur",function(){t._editing=!1,o.text(this.textContent).style({opacity:1});var e,r=h.select(this).attr("class");(e=r?"."+r.split(" ")[0]+"-math-group":"[class*=-math-group]")&&h.select(o.node().parentNode).select(e).style({opacity:0});var n=this.textContent;h.select(this).transition().duration(0).remove(),h.select(document).on("mouseup",null),s.edit.call(o,n)}).on("focus",function(){var e=this;t._editing=!0,h.select(document).on("mouseup",function(){if(h.event.target===e)return!1;document.activeElement===a.node()&&a.node().blur()})}).on("keyup",function(){27===h.event.which?(t._editing=!1,o.style({opacity:1}),h.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),s.cancel.call(o,this.textContent)):(s.input.call(o,this.textContent),h.select(this).call(c(o,n,r)))}).on("keydown",function(){13===h.event.which&&this.blur()}).call(i)}r||(r={});var o=this,s=h.dispatch("edit","input","cancel"),l=h.select(this.node()).style({"pointer-events":"all"}),u=e||l;return e&&l.style({"pointer-events":"none"}),r.immediate?n():u.on("click",n),h.rebind(this,s,"on")}},{"../constants/string_mappings":663,"../constants/xmlns_namespaces":664,"../lib":680,d3:104}],700:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{"fast-isnumeric":113}],701:[function(t,e,r){"use strict";var n=e.exports={},i=t("../plots/geo/constants").locationmodeToLayer,a=t("topojson-client").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{"../plots/geo/constants":741,"topojson-client":513}],702:[function(t,e,r){"use strict";function n(t,e){for(var r=new Float32Array(e),n=0;n0)return t.substr(0,e)}var s=t("fast-isnumeric"),l=t("gl-mat4/fromQuat"),u=t("../registry"),c=t("../lib"),h=t("../plots/plots"),f=t("../plots/cartesian/axes"),d=t("../components/color");r.getGraphDiv=function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null===t||void 0===t)throw new Error("DOM element provided is null or undefined");return t},r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&c.log("Clearing previous rejected promises from queue."),t._promises=[]},r.cleanLayout=function(t){var e,r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1);var i=f.list({_fullLayout:t});for(e=0;e3?(g.x=1.02,g.xanchor="left"):g.x<-2&&(g.x=-.02,g.xanchor="right"),g.y>3?(g.y=1.02,g.yanchor="bottom"):g.y<-2&&(g.y=-.02,g.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var v=h.getSubplotIds(t,"gl3d");for(e=0;e1&&o.warn("Full array edits are incompatible with other edits",c);var v=r[""][""];if(u(v))e.set(null);else{if(!Array.isArray(v))return o.warn("Unrecognized full array edit value",c,v),!0;e.set(v)}return!p&&(h(m,g),f(t),!0)}var y,b,x,_,w,M,A,k=Object.keys(r).map(Number).sort(),T=e.get(),S=T||[],E=n(g,c).get(),L=[],C=-1,D=S.length;for(y=0;yS.length-(A?0:1))o.warn("index out of range",c,x);else if(void 0!==M)w.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",c,x),u(M)?L.push(x):A?("add"===M&&(M={}),S.splice(x,0,M),E&&E.splice(x,0,{})):o.warn("Unrecognized full object edit value",c,x,M),C===-1&&(C=x);else for(b=0;b=0;y--)S.splice(L[y],1),E&&E.splice(L[y],1);if(S.length?T||e.set(S):e.set(null),p)return!1;if(h(m,g),d!==a){var z;if(C===-1)z=k;else{for(D=Math.max(S.length,D),z=[],y=0;y=C);y++)z.push(x);for(y=C;y=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function l(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),s(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&s(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function u(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&lR.range[0]?[1,2]:[2,1]);else{var N=R.range[0],B=R.range[1];j?(N<=0&&B<=0&&r(z+".autorange",!0),N<=0?N=B/1e6:B<=0&&(B=N/1e6),r(z+".range[0]",Math.log(N)/Math.LN10),r(z+".range[1]",Math.log(B)/Math.LN10)):(r(z+".range[0]",Math.pow(10,N)),r(z+".range[1]",Math.pow(10,B)))}else r(z+".autorange",!0);w.getComponentMethod("annotations","convertCoords")(t,O,A,r),w.getComponentMethod("images","convertCoords")(t,O,A,r)}else r(z+".autorange",!0)}else if(E.match(I.AX_NAME_PATTERN)){var U=b.nestedProperty(l,x).get(),V=(A||{}).type;V&&"-"!==V||(V="linear"),w.getComponentMethod("annotations","convertCoords")(t,U,V,r),w.getComponentMethod("images","convertCoords")(t,U,V,r)}var H=C.containerArrayMatch(x);if(H){i=H.array,a=H.index;var q=H.property,G=b.nestedProperty(s,i),Y=(G||[])[a]||{};if(""===a)x.indexOf("updatemenus")===-1&&(m.docalc=!0);else if(""===q){var W=A;C.isAddVal(A)?v[x]=null:C.isRemoveVal(A)?(v[x]=Y,W=Y):b.warn("unrecognized full object value",e),(n(W,"x")||n(W,"y")&&x.indexOf("updatemenus")===-1)&&(m.docalc=!0)}else!n(Y,"x")&&!n(Y,"y")||b.containsAny(x,["color","opacity","align","dash","updatemenus"])||(m.docalc=!0);h[i]||(h[i]={});var X=h[i][a];X||(X=h[i][a]={}),X[q]=A,delete e[x]}else if("reverse"===E)P.range?P.range.reverse():(r(z+".autorange",!0),P.range=[1,0]),O.autorange?m.docalc=!0:m.doplot=!0;else{var Z=String(_.parts[1]||"");0===S.indexOf("scene")?"camera"===_.parts[1]?m.docamera=!0:m.doplot=!0:0===S.indexOf("geo")?m.doplot=!0:0===S.indexOf("ternary")?m.doplot=!0:"paper_bgcolor"===x?m.doplot=!0:!l._has("gl2d")||x.indexOf("axis")===-1&&"plot_bgcolor"!==x?"hiddenlabels"===x?m.docalc=!0:S.indexOf("legend")!==-1?m.dolegend=!0:x.indexOf("title")!==-1?m.doticks=!0:S.indexOf("bgcolor")!==-1?m.dolayoutstyle=!0:k>1&&b.containsAny(Z,["tick","exponent","grid","zeroline"])?m.doticks=!0:x.indexOf(".linewidth")!==-1&&x.indexOf("axis")!==-1?m.doticks=m.dolayoutstyle=!0:k>1&&Z.indexOf("line")!==-1?m.dolayoutstyle=!0:k>1&&"mirror"===Z?m.doticks=m.dolayoutstyle=!0:"margin.pad"===x?m.doticks=m.dolayoutstyle=!0:"margin"===S||"autorange"===Z||"rangemode"===Z||"type"===Z||"domain"===Z||x.indexOf("calendar")!==-1||x.match(/^(bar|box|font)/)?m.docalc=!0:["hovermode","dragmode"].indexOf(x)!==-1?m.domodebar=!0:["hovermode","dragmode","height","width","autosize"].indexOf(x)===-1&&(m.doplot=!0):m.doplot=!0,_.set(A)}}}for(i in h){C.applyContainerArrayChanges(t,b.nestedProperty(s,i),h[i],m)||(m.doplot=!0)}var J=t._fullLayout.width,K=t._fullLayout.height;return t.layout.autosize&&M.plotAutoSize(t,t.layout,t._fullLayout),(e.height||e.width||t._fullLayout.width!==J||t._fullLayout.height!==K)&&(m.docalc=!0),(m.doplot||m.docalc)&&(m.layoutReplot=!0),{flags:m,undoit:v,redoit:g,eventData:b.extendDeep({},g)}}function m(t){var e=g.select(t),r=t._fullLayout;if(r._container=e.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([0]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n=[];g.selectAll("defs").each(function(){this.id&&n.push(this.id.split("-")[1])}),r._uid=b.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(E.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0);var a=r._paper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._toppaper.append("g").classed("hoverlayer",!0),t.emit("plotly_framework")}var g=t("d3"),v=t("fast-isnumeric"),y=t("../plotly"),b=t("../lib"),x=t("../lib/events"),_=t("../lib/queue"),w=t("../registry"),M=t("../plots/plots"),A=t("../plots/cartesian/graph_interact"),k=t("../plots/polar"),T=t("../components/drawing"),S=t("../components/errorbars"),E=t("../constants/xmlns_namespaces"),L=t("../lib/svg_text_utils"),C=t("./manage_arrays"),D=t("./helpers"),z=t("./subroutines"),I=t("../plots/cartesian/constants");y.plot=function(t,e,r,n){function o(){if(v)return y.addFrames(t,v)}function s(){for(var e=E._basePlotModules,r=0;r=s.length?s[0]:s[t]:s}function i(t){return Array.isArray(l)?t>=l.length?l[0]:l[t]:l}function a(t,e){var r=0;return function(){if(t&&++r===e)return t()}}if(t=D.getGraphDiv(t),!b.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var o=t._transitionData;o._frameQueue||(o._frameQueue=[]),r=M.supplyAnimationDefaults(r);var s=r.transition,l=r.frame;return void 0===o._frameWaitingCnt&&(o._frameWaitingCnt=0),new Promise(function(l,u){function c(){t.emit("plotly_animated"),window.cancelAnimationFrame(o._animationRaf),o._animationRaf=null}function h(){o._currentFrame&&o._currentFrame.onComplete&&o._currentFrame.onComplete();var e=o._currentFrame=o._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,o._lastFrameAt=Date.now(),o._timeToNext=e.frameOpts.duration,M.transition(t,e.frame.data,e.frame.layout,D.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else c()}function f(){t.emit("plotly_animating"),o._lastFrameAt=-1/0,o._timeToNext=0,o._runningTransitions=0,o._currentFrame=null;var e=function(){o._animationRaf=window.requestAnimationFrame(e),Date.now()-o._lastFrameAt>o._timeToNext&&h()};e()}function d(t){return Array.isArray(s)?g>=s.length?t.transitionOpts=s[g]:t.transitionOpts=s[0]:t.transitionOpts=s,g++,t}var p,m,g=0,v=[],y=void 0===e||null===e,x=Array.isArray(e);if(y||x||!b.isPlainObject(e)){if(y||["string","number"].indexOf(typeof e)!==-1)for(p=0;p0&&AA)&&k.push(m);v=k}}v.length>0?function(e){if(0!==e.length){for(var s=0;s=0;i--)if(b.isPlainObject(e[i])){var f=(u[e[i].name]||{}).name,d=e[i].name;f&&d&&"number"==typeof d&&u[f]&&(n++,b.warn('addFrames: overwriting frame "'+u[f].name+'" with a frame whose name of type "number" also equates to "'+f+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),n>5&&b.warn("addFrames: This API call has yielded too many warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),h.push({frame:M.supplyFrameDefaults(e[i]),index:r&&void 0!==r[i]&&null!==r[i]?r[i]:c+i})}h.sort(function(t,e){return t.index>e.index?-1:t.index=0;i--){if(a=h[i].frame,"number"==typeof a.name&&b.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+t._transitionData._counter++];);if(u[a.name]){for(o=0;o=0;r--)n=e[r],a.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:i[n]});var s=M.modifyFrames,l=M.modifyFrames,u=[t,o],c=[t,a];return _&&_.add(t,s,u,l,c),M.modifyFrames(t,a)},y.purge=function(t){t=D.getGraphDiv(t);var e=t._fullLayout||{},r=t._fullData||[];return M.cleanPlot([],{},r,e),M.purge(t),x.purge(t),e._container&&e._container.remove(),delete t._context,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,delete t._hmpixcount,delete t._hmlumcount,t}},{"../components/drawing":598,"../components/errorbars":604,"../constants/xmlns_namespaces":664,"../lib":680,"../lib/events":671,"../lib/queue":692,"../lib/svg_text_utils":699,"../plotly":714,"../plots/cartesian/constants":724,"../plots/cartesian/graph_interact":726,"../plots/plots":778,"../plots/polar":781,"../registry":793,"./helpers":704,"./manage_arrays":705,"./subroutines":711,d3:104,"fast-isnumeric":113}],707:[function(t,e,r){"use strict";function n(t,r){try{t._fullLayout._paper.style("background",r)}catch(t){e.exports.logging>0&&console.error(t)}}e.exports={staticPlot:!1,editable:!1,autosizable:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:"reset+autosize",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:"Edit chart",showSources:!1,displayModeBar:"hover",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,displaylogo:!0,plotGlPixelRatio:2,setBackground:n,topojsonURL:"https://cdn.plot.ly/",mapboxAccessToken:null,logging:!1,globalTransforms:[]}},{}],708:[function(t,e,r){"use strict";function n(t){var e,r;"area"===t?(e={attributes:b},r={}):(e=d.modules[t]._module,r=e.basePlotModule);var n={};n.type=null,w(n,m),w(n,e.attributes),r.attributes&&w(n,r.attributes),Object.keys(d.componentsRegistry).forEach(function(e){var r=d.componentsRegistry[e];r.schema&&r.schema.traces&&r.schema.traces[t]&&Object.keys(r.schema.traces[t]).forEach(function(e){f(n,r.schema.traces[t][e],e)})}),n.type=t;var i={meta:e.meta||{},attributes:s(n)};if(e.layoutAttributes){var a={};w(a,e.layoutAttributes),i.layoutAttributes=s(a)}return i}function i(){var t={};return w(t,g),Object.keys(d.subplotsRegistry).forEach(function(e){var r=d.subplotsRegistry[e];if(r.layoutAttributes)if("cartesian"===r.name)h(t,r,"xaxis"),h(t,r,"yaxis");else{var n="subplot"===r.attr?r.name:r.attr;h(t,r,n)}}),t=c(t),Object.keys(d.componentsRegistry).forEach(function(e){var r=d.componentsRegistry[e];r.layoutAttributes&&(r.schema&&r.schema.layout?Object.keys(r.schema.layout).forEach(function(e){f(t,r.schema.layout[e],e)}):f(t,r.layoutAttributes,r.name))}),{layoutAttributes:s(t)}}function a(t){var e=d.transformsRegistry[t],r=w({},e.attributes);return Object.keys(d.componentsRegistry).forEach(function(e){var n=d.componentsRegistry[e];n.schema&&n.schema.transforms&&n.schema.transforms[t]&&Object.keys(n.schema.transforms[t]).forEach(function(e){f(r,n.schema.transforms[t][e],e)})}),{attributes:s(r)}}function o(){var t={frames:p.extendDeep({},v)};return s(t),t.frames}function s(t){return l(t),u(t),t}function l(t){function e(t){return{valType:"string"}}function n(t,n,i){r.isValObject(t)?"data_array"===t.valType?(t.role="data",i[n+"src"]=e(n)):t.arrayOk===!0&&(i[n+"src"]=e(n)):p.isPlainObject(t)&&(t.role="object")}r.crawl(t,n)}function u(t){function e(t,e,r){if(t){var n=t[A];n&&(delete t[A],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}r.crawl(t,e)}function c(t){return _(t,{radialaxis:x.radialaxis,angularaxis:x.angularaxis}),_(t,x.layout),t}function h(t,e,r){var n=p.nestedProperty(t,r),i=w({},e.layoutAttributes);i[M]=!0,n.set(i)}function f(t,e,r){var n=p.nestedProperty(t,r);n.set(w(n.get()||{},e))}var d=t("../registry"),p=t("../lib"),m=t("../plots/attributes"),g=t("../plots/layout_attributes"),v=t("../plots/frame_attributes"),y=t("../plots/animation_attributes"),b=t("../plots/polar/area_attributes"),x=t("../plots/polar/axis_attributes"),_=p.extendFlat,w=p.extendDeep,M="_isSubplotObj",A="_isLinkedToArray",k=[M,A,"_arrayAttrRegexps","_deprecated"];r.IS_SUBPLOT_OBJ=M,r.IS_LINKED_TO_ARRAY=A,r.DEPRECATED="_deprecated",r.UNDERSCORE_ATTRS=k,r.get=function(){var t={};d.allTypes.concat("area").forEach(function(e){t[e]=n(e)});var e={};return Object.keys(d.transformsRegistry).forEach(function(t){e[t]=a(t)}),{defs:{valObjects:p.valObjects,metaKeys:k.concat(["description","role"])},traces:t,layout:i(),transforms:e,frames:o(),animation:s(y)}},r.crawl=function(t,e,n){var i=n||0;Object.keys(t).forEach(function(n){var a=t[n];k.indexOf(n)===-1&&(e(a,n,t,i),r.isValObject(a)||p.isPlainObject(a)&&r.crawl(a,e,i+1))})},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){function e(e,r,o,s){if(a=a.slice(0,s).concat([r]),e&&("data_array"===e.valType||e.arrayOk===!0)){var l=n(a),u=p.nestedProperty(t,l).get();Array.isArray(u)&&i.push(l)}}function n(t){return t.join(".")}var i=[],a=[];if(r.crawl(t._module.attributes,e),t.transforms)for(var o=t.transforms,s=0;s=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}var i=t("d3"),a=t("../plotly"),o=t("../registry"),s=t("../plots/plots"),l=t("../lib"),u=t("../components/color"),c=t("../components/drawing"),h=t("../components/titles"),f=t("../components/modebar");r.layoutStyles=function(t){return l.syncOrAsync([s.doAutoMargin,r.lsInner],t)},r.lsInner=function(t){var e,o=t._fullLayout,s=o._size,l=a.Axes.list(t);for(e=0;e1)};f(e.width)&&f(e.height)||n(new Error("Height and width should be pixel values."));var d=l(t,{format:"png",height:e.height,width:e.width}),p=d.gd;p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var m=s.getRedrawFunc(p);a.plot(p,d.data,d.layout,d.config).then(m).then(h).then(function(t){r(t)}).catch(function(t){n(t)})})}var i=t("fast-isnumeric"),a=t("../plotly"),o=t("../lib"),s=t("../snapshot/helpers"),l=t("../snapshot/cloneplot"),u=t("../snapshot/tosvg"),c=t("../snapshot/svgtoimg");e.exports=n},{"../lib":680,"../plotly":714,"../snapshot/cloneplot":794,"../snapshot/helpers":797,"../snapshot/svgtoimg":799,"../snapshot/tosvg":801,"fast-isnumeric":113}],713:[function(t,e,r){"use strict";function n(t,e,r,i,a,u){u=u||[];for(var c=Object.keys(t),f=0;f1&&l.push(o("object","layout"))),f.supplyDefaults(u);for(var c=u._fullData,g=r.length,v=0;v.3*h||a(n)||a(i))){var f=r.dtick/2;t+=t+f.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=O.tickIncrement(t,"M6","reverse")+1.5*C:a.exactMonths>.8?t=O.tickIncrement(t,"M1","reverse")+15.5*C:t-=C/2;var s=O.tickIncrement(t,r);if(s<=n)return s}return t}function a(t){var e,r,n=t.tickvals,i=t.ticktext,a=new Array(n.length),o=_.simpleMap(t.range,t.r2l),s=1.0001*o[0]-1e-4*o[1],u=1.0001*o[1]-1e-4*o[0],c=Math.min(s,u),h=Math.max(s,u),f=0;Array.isArray(i)||(i=[]);var d="category"===t.type?t.d2l_noadd:t.d2l;for("log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1)),r=0;rc&&e10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=C&&i<=10||e>=15*C)t._tickround="d";else if(e>=z&&i<=16||e>=D)t._tickround="M";else if(e>=I&&i<=19||e>=z)t._tickround="S";else{var a=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,a)-20}}else if(b(e)||"L"===e.charAt(0)){var o=t.range.map(t.r2d||Number);b(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01);Math.abs(l)>3&&("SI"===t.exponentformat||"B"===t.exponentformat?t._tickexponent=3*Math.round((l-1)/3):t._tickexponent=l)}else t._tickround=null}function l(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}function u(t,e,r,n){var i=t._tickround,a=r&&t.hoverformat||t.tickformat;n&&(i=b(i)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o,s=_.formatDate(e.x,a,i,t.calendar),l=s.indexOf("\n");l!==-1&&(o=s.substr(l+1),s=s.substr(0,l)),n&&("00:00:00"===s||"00:00"===s?(s=o,o=""):8===s.length&&(s=s.replace(/:00$/,""))),o&&(r?"d"===i?s+=", "+o:s=o+(s?", "+s:""):t._inCalcTicks&&o===t._prevDateHead||(s+="
"+o,t._prevDateHead=o)),e.text=s}function c(t,e,r,n,i){var a=t.dtick,o=e.x;if(!n||"string"==typeof a&&"L"===a.charAt(0)||(a="L3"),t.tickformat||"string"==typeof a&&"L"===a.charAt(0))e.text=d(Math.pow(10,o),t,i,n);else if(b(a)||"D"===a.charAt(0)&&_.mod(o+.01,1)<.1)if(["e","E","power"].indexOf(t.exponentformat)!==-1){var s=Math.round(o);e.text=0===s?1:1===s?"10":s>1?"10"+s+"":"10\u2212"+-s+"",e.fontSize*=1.25}else e.text=d(Math.pow(10,o),t,"","fakehover"),"D1"===a&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6);else{if("D"!==a.charAt(0))throw"unrecognized dtick "+String(a);e.text=String(Math.round(Math.pow(10,_.mod(o,1)))),e.fontSize*=.75}if("D1"===t.dtick){var l=String(e.text).charAt(0);"0"!==l&&"1"!==l||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(o<0?.5:.25)))}}function h(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}function f(t,e,r,n,i){"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=d(e.x,t,i,n)}function d(t,e,r,n){var i=t<0,a=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,u=e.tickformat,c=e.separatethousands;if(n){var h={exponentformat:e.exponentformat,dtick:"none"===e.showexponent?e.dtick:b(t)?Math.abs(t)||1:1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};s(h),a=(Number(h._tickround)||0)+4,l=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return y.format(u)(t).replace(/-/g,"\u2212");var f=Math.pow(10,-a)/2;if("none"===o&&(l=0),(t=Math.abs(t))12||l<-15)?t+="e"+m:"E"===o?t+="E"+m:"power"===o?t+="\xd710"+m+"":"B"===o&&9===l?t+="B":"SI"!==o&&"B"!==o||(t+=H[l/3+5])}return i?"\u2212"+t:t}function p(t,e){var r,n,i=[];for(r=0;r1)for(n=1;n2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},O.getAutoRange=function(t){var e,r=[],n=t._min[0].val,i=t._max[0].val;for(e=1;e0&&c>0&&h/c>f&&(l=o,u=s,f=h/c);if(n===i){var m=n-1,g=n+1;r="tozero"===t.rangemode?n<0?[m,0]:[0,g]:"nonnegative"===t.rangemode?[Math.max(0,m),Math.max(0,g)]:[m,g]}else f&&("linear"!==t.type&&"-"!==t.type||("tozero"===t.rangemode?(l.val>=0&&(l={val:0,pad:0}),u.val<=0&&(u={val:0,pad:0})):"nonnegative"===t.rangemode&&(l.val-f*l.pad<0&&(l={val:0,pad:0}),u.val<0&&(u={val:1,pad:0})),f=(u.val-l.val)/(t._length-l.pad-u.pad)),r=[l.val-f*l.pad,u.val+f*u.pad]);return r[0]===r[1]&&("tozero"===t.rangemode?r=r[0]<0?[r[0],0]:r[0]>0?[0,r[0]]:[0,1]:(r=[r[0]-1,r[0]+1],"nonnegative"===t.rangemode&&(r[0]=Math.max(0,r[0])))),d&&r.reverse(),_.simpleMap(r,t.l2r||Number)},O.doAutoRange=function(t){t._length||t.setScale();var e=t._min&&t._max&&t._min.length&&t._max.length;if(t.autorange&&e){t.range=O.getAutoRange(t);var r=t._input;r.range=t.range.slice(),r.autorange=t.autorange}},O.saveRangeInitial=function(t,e){for(var r=O.list(t,"",!0),n=!1,i=0;i=f?d=!1:s.val>=u&&s.pad<=f&&(t._min.splice(o,1),o--);d&&t._min.push({val:u,pad:y&&0===u?0:f})}if(n(c)){for(d=!0,o=0;o=c&&s.pad>=h?d=!1:s.val<=c&&s.pad<=h&&(t._max.splice(o,1),o--);d&&t._max.push({val:c,pad:y&&0===c?0:h})}}}if((t.autorange||!!_.nestedProperty(t,"rangeslider.autorange").get())&&e){t._min||(t._min=[]),t._max||(t._max=[]),r||(r={}),t._m||t.setScale();var a,o,s,l,u,c,h,f,d,p,m,g=e.length,v=r.padded?.05*t._length:0,y=r.tozero&&("linear"===t.type||"-"===t.type),x=n((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),w=n((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),M=n(r.vpadplus||r.vpad),A=n(r.vpadminus||r.vpad);for(a=0;a<6;a++)i(a);for(a=g-1;a>5;a--)i(a)}},O.autoBin=function(t,e,r,a,o){var s=_.aggNums(Math.min,null,t),l=_.aggNums(Math.max,null,t);if(o||(o=e.calendar),"category"===e.type)return{start:s-.5,end:l+.5,size:1};var u;if(r)u=(l-s)/r;else{var c=_.distinctVals(t),h=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),f=h*_.roundUp(c.minDiff/h,[.9,1.9,4.9,9.9],!0);u=Math.max(f,2*_.stdev(t)/Math.pow(t.length,a?.25:.4)),b(u)||(u=1)}var d;d="log"===e.type?{type:"linear",range:[s,l]}:{type:e.type,range:_.simpleMap([s,l],e.c2r,0,o),calendar:o},O.setConvert(d),O.autoTicks(d,u);var p,m=O.tickIncrement(O.tickFirst(d),d.dtick,"reverse",o);if("number"==typeof d.dtick){m=n(m,t,d,s,l);p=m+(1+Math.floor((l-m)/d.dtick))*d.dtick}else for("M"===d.dtick.charAt(0)&&(m=i(m,t,d.dtick,s,o)),p=m;p<=l;)p=O.tickIncrement(p,d.dtick,!1,o);return{start:e.c2r(m,0,o),end:e.c2r(p,0,o),size:d.dtick}},O.calcTicks=function(t){var e=_.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=_.constrain(t._length/r,4,9)+1)),"array"===t.tickmode&&(n*=100),O.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}if(t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),s(t),"array"===t.tickmode)return a(t);t._tmin=O.tickFirst(t);var i=e[1]=l:u<=l)&&(o.push(u),!(o.length>1e3));u=O.tickIncrement(u,t.dtick,i,t.calendar));t._tmax=o[o.length-1],t._prevDateHead="",t._inCalcTicks=!0;for(var c=new Array(o.length),h=0;hE?(e/=E,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="M"+12*o(e,r,j)):n>L?(e/=L,t.dtick="M"+o(e,1,F)):n>C?(t.dtick=o(e,C,B),t.tick0=_.dateTick0(t.calendar,!0)):n>D?t.dtick=o(e,D,F):n>z?t.dtick=o(e,z,N):n>I?t.dtick=o(e,I,N):(r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=o(e,r,j))}else if("log"===t.type){t.tick0=0;var i=_.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(i[1]-i[0])<1){var a=1.5*Math.abs((i[1]-i[0])/e);e=Math.abs(Math.pow(10,i[1])-Math.pow(10,i[0]))/a,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="L"+o(e,r,j)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):(t.tick0=0,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=o(e,r,j));if(0===t.dtick&&(t.dtick=1),!b(t.dtick)&&"string"!=typeof t.dtick){var s=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(s)}},O.tickIncrement=function(t,e,r,n){var i=r?-1:1;if(b(e))return t+i*e;var a=e.charAt(0),o=i*Number(e.substr(1));if("M"===a)return _.incrementMonth(t,o,n);if("L"===a)return Math.log(Math.pow(10,t)+o)/Math.LN10;if("D"===a){var s="D2"===e?V:U,l=t+.01*i,u=_.roundUp(_.mod(l,1),s,r);return Math.floor(l)+Math.log(y.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(e)},O.tickFirst=function(t){var e=t.r2l||Number,r=_.simpleMap(t.range,e),n=r[1]1&&e2*i}function a(t){for(var e,r=Math.max(1,(t.length-1)/1e3),n=0,i=0,a=0;a2*n}var o=t("fast-isnumeric"),s=t("../../lib"),l=t("../../constants/numerical").BADNUM;e.exports=function(t,e){return i(t,e)?"date":a(t)?"category":n(t)?"linear":"-"}},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],721:[function(t,e,r){"use strict";function n(t,e){if("-"===t.type){var r=t._id,n=r.charAt(0);r.indexOf("scene")!==-1&&(r=n);var s=o(e,r,n);if(s){if("histogram"===s.type&&n==={v:"y",h:"x"}[s.orientation||"v"])return void(t.type="linear");var u=n+"calendar",c=s[u];if(a(s,n)){for(var h,f=i(s),d=[],p=0;p0;a&&(n="array");var o=r("categoryorder",n);"array"===o&&r("categoryarray"),a||"array"!==o||(e.categoryorder="trace")}}},{}],724:[function(t,e,r){"use strict";e.exports={idRegex:{x:/^x([2-9]|[1-9][0-9]+)?$/,y:/^y([2-9]|[1-9][0-9]+)?$/},attrRegex:{x:/^xaxis([2-9]|[1-9][0-9]+)?$/,y:/^yaxis([2-9]|[1-9][0-9]+)?$/},xAxisMatch:/^xaxis[0-9]*$/,yAxisMatch:/^yaxis[0-9]*$/,AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,MAXDIST:20,YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,BENDPX:1.5,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4]}},{}],725:[function(t,e,r){"use strict";function n(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,s.format("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,s.format("."+String(r)+"g")(n))}function i(t,e){return t?"nsew"===t?"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function a(t){s.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function o(t){return["lasso","select"].indexOf(t)!==-1}var s=t("d3"),l=t("tinycolor2"),u=t("../../plotly"),c=t("../../registry"),h=t("../../lib"),f=t("../../lib/svg_text_utils"),d=t("../../components/color"),p=t("../../components/drawing"),m=t("../../lib/setcursor"),g=t("../../components/dragelement"),v=t("./axes"),y=t("./select"),b=t("./constants"),x=!0;e.exports=function(t,e,r,s,_,w,M,A){function k(t,e){for(var r=0;r.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+mt+", "+gt+")").attr("d",ut+"Z"),dt=pt.append("path").attr("class","zoombox-corners").style({fill:d.background,stroke:d.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+mt+", "+gt+")").attr("d","M0,0Z"),E()}function E(){pt.selectAll(".select-outline").remove()}function L(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(H,e+at)),i=Math.max(0,Math.min(q,r+ot)),a=Math.abs(n-at),o=Math.abs(i-ot),s=Math.floor(Math.min(o,a,Y)/2);st.l=Math.min(at,n),st.r=Math.max(at,n),st.t=Math.min(ot,i),st.b=Math.max(ot,i),!$||o.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),dt.transition().style("opacity",1).duration(200),ct=!0)}function C(t,e,r){var n,i,a,o;for(n=0;nzoom back out","long"),x=!1)}function z(e,r){var i=1===(M+A).length;if(e)j();else if(2!==r||i){if(1===r&&i){var a=M?V[0]:U[0],o="s"===M||"w"===A?0:1,s=a._name+".range["+o+"]",l=n(a,o),c="left",h="middle";if(a.fixedrange)return;M?(h="n"===M?"top":"bottom","right"===a.side&&(c="right")):"e"===A&&(c="right"),t._context.showAxisRangeEntryBoxes&&rt.call(f.makeEditable,null,{immediate:!0,background:N.paper_bgcolor,text:String(l),fill:a.tickfont?a.tickfont.color:"#444",horizontalAlign:c,verticalAlign:h}).on("edit",function(e){var r=a.d2r(e);void 0!==r&&u.relayout(t,s,r)})}}else R()}function I(e){function r(t,e,r){function n(e){return t.l2r(a+(e-a)*r)}if(!t.fixedrange){var i=h.simpleMap(t.range,t.r2l),a=i[0]+(i[1]-i[0])*e;t.range=i.map(n)}}if(t._context.scrollZoom||N._enablescrollzoom){if(t._transitioningWithDuration)return h.pauseEvent(e);var n=t.querySelector(".plotly");if(T(),!(n.scrollHeight-n.clientHeight>10||n.scrollWidth-n.clientWidth>10)){clearTimeout(yt);var i=-e.deltaY;if(isFinite(i)||(i=e.wheelDelta/10),!isFinite(i))return void h.log("Did not find wheel motion attributes: ",e);var a,o=Math.exp(-Math.min(Math.max(i,-20),20)/100),s=xt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),l=(e.clientX-s.left)/s.width,u=vt[0]+vt[2]*l,c=(s.bottom-e.clientY)/s.height,f=vt[1]+vt[3]*(1-c);if(A){for(a=0;a=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function a(t,e,r){for(var n,a,o=1-e,s=0;s0;n--)r.push(e);return r}function i(t,e){for(var r=[],n=0;nK.width||J<0||J>K.height)return _.unhoverRaw(t,e)}else Z="xpx"in e?e.xpx:S[0]._length/2,J="ypx"in e?e.ypx:E[0]._length/2;if(P="xval"in e?n(a,e.xval):i(S,Z),O="yval"in e?n(a,e.yval):i(E,J),!m(P[0])||!m(O[0]))return g.warn("Fx.hover failed",e,t),_.unhoverRaw(t,e)}var Q=1/0;for(j=0;j1||N.hoverinfo.indexOf("name")!==-1?N.name:void 0,index:!1,distance:Math.min(Q,k.MAXDIST),color:b.defaultLine,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},o[B]&&(G.subplot=o[B]._subplot),Y=W.length,"array"===V){var $=e[j];"pointNumber"in $?(G.index=$.pointNumber,V="closest"):(V="","xval"in $&&(H=$.xval,V="x"),"yval"in $&&(q=$.yval,V=V?"closest":"y"))}else H=P[U],q=O[U];if(N._module&&N._module.hoverPoints){var tt=N._module.hoverPoints(G,H,q,V);if(tt)for(var et,rt=0;rtY&&(W.splice(0,Y),Q=W[0].distance)}if(0===W.length)return _.unhoverRaw(t,e);var nt="y"===I&&X.length>1;W.sort(function(t,e){return t.distance-e.distance});var it=b.combine(o.plot_bgcolor||b.background,o.paper_bgcolor),at={hovermode:I,rotateLabels:nt,bgColor:it,container:o._hoverlayer,outerContainer:o._paperdiv},ot=u(W,at);c(W,nt?"xa":"ya"),h(ot,nt);var st=t._hoverdata,lt=[];for(R=0;R128?"#000":b.background;void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&void 0===t.zLabelVal&&(r=y.plainText(t.name||""),r.length>15&&(r=r.substr(0,12)+"...")),void 0!==t.extraText&&(n+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(n+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(n+="y: "+t.yLabel+"
"),n+=(n?"z: ":"")+t.zLabel):A&&t[i+"Label"]===m?n=t[("x"===i?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&(n=t.yLabel):n=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",t.text&&!Array.isArray(t.text)&&(n+=(n?"
":"")+t.text),""===n&&(""===r&&e.remove(),n=r);var c=e.select("text.nums").style("fill",u).call(x.setPosition,0,0).text(n).attr("data-notex",1).call(y.convertToTspans);c.selectAll("tspan.line").call(x.setPosition,0,0);var h=e.select("text.name"),f=0;r&&r!==n?(h.style("fill",l).text(r).call(x.setPosition,0,0).attr("data-notex",1).call(y.convertToTspans),h.selectAll("tspan.line").call(x.setPosition,0,0),f=h.node().getBoundingClientRect().width+2*O):(h.remove(),e.select("rect").remove()),e.select("path").style({fill:l,stroke:u});var g,v,k=c.node().getBoundingClientRect(),T=t.xa._offset+(t.x0+t.x1)/2,S=t.ya._offset+(t.y0+t.y1)/2,E=Math.abs(t.x1-t.x0),C=Math.abs(t.y1-t.y0),D=k.width+P+O+f;t.ty0=_-k.top,t.bx=k.width+2*O,t.by=k.height+2*O,t.anchor="start",t.txwidth=k.width,t.tx2width=f,t.offset=0,a?(t.pos=T,g=S+C/2+D<=M,v=S-C/2-D>=0,"top"!==t.idealAlign&&g||!v?g?(S+=C/2,t.anchor="start"):t.anchor="middle":(S-=C/2,t.anchor="end")):(t.pos=S,g=T+E/2+D<=w,v=T-E/2-D>=0,"left"!==t.idealAlign&&g||!v?g?(T+=E/2,t.anchor="start"):t.anchor="middle":(T-=E/2,t.anchor="end")),c.attr("text-anchor",t.anchor),f&&h.attr("text-anchor",t.anchor),e.attr("transform","translate("+T+","+S+")"+(a?"rotate("+L+")":""))}),E}function c(t,e){function r(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var u=0;for(o=0;oe.pmax&&u++;for(o=t.length-1;o>=0&&!(u<=0);o--)l=t[o],l.pos>e.pmax-1&&(l.del=!0,u--);for(o=0;o=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(u<=0);o--)l=t[o],l.pos+l.dp+l.size>e.pmax&&(l.del=!0,u--)}}}for(var n,i,a,o,s,l,u,c=0,h=t.map(function(t,r){var n=t[e];return[{i:r,dp:0,pos:t.pos,posref:t.posref,size:t.by*("x"===n._id.charAt(0)?D:1)/2,pmin:n._offset,pmax:n._offset+n._length}]}).sort(function(t,e){return t[0].posref-e[0].posref});!n&&c<=t.length;){for(c++,n=!0,o=0;o.01&&p.pmin===m.pmin&&p.pmax===m.pmax){for(s=d.length-1;s>=0;s--)d[s].dp+=i;for(f.push.apply(f,d),h.splice(o+1,1),u=0,s=f.length-1;s>=0;s--)u+=f[s].dp;for(a=u/f.length,s=f.length-1;s>=0;s--)f[s].dp-=a;n=!1}else o++}h.forEach(r)}for(o=h.length-1;o>=0;o--){var g=h[o];for(s=g.length-1;s>=0;s--){var v=g[s],y=t[v.i];y.offset=v.dp,y.del=v.del}}}function h(t,e){t.each(function(t){var r=d.select(this);if(t.del)return void r.remove();var n="end"===t.anchor?-1:1,i=r.select("text.nums"),a={start:1,end:-1,middle:0}[t.anchor],o=a*(P+O),s=o+a*(t.txwidth+O),l=0,u=t.offset;"middle"===t.anchor&&(o-=t.tx2width/2,s-=t.tx2width/2),e&&(u*=-I,l=t.offset*z),r.select("path").attr("d","middle"===t.anchor?"M-"+t.bx/2+",-"+t.by/2+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(n*P+l)+","+(P+u)+"v"+(t.by/2-P)+"h"+n*t.bx+"v-"+t.by+"H"+(n*P+l)+"V"+(u-P)+"Z"),i.call(x.setPosition,o+l,u+t.ty0-t.by/2+O).selectAll("tspan.line").attr({x:i.attr("x"),y:i.attr("y")}),t.tx2width&&(r.select("text.name, text.name tspan.line").call(x.setPosition,s+a*O+l,u+t.ty0-t.by/2+O),r.select("rect").call(x.setRect,s+(a-1)*t.tx2width/2+l,u-t.by/2-1,t.tx2width,t.by+2))})}function f(t,e,r){if(!e.target)return!1;if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber))return!0}return!1}var d=t("d3"),p=t("tinycolor2"),m=t("fast-isnumeric"),g=t("../../lib"),v=t("../../lib/events"),y=t("../../lib/svg_text_utils"),b=t("../../components/color"),x=t("../../components/drawing"),_=t("../../components/dragelement"),w=t("../../lib/override_cursor"),M=t("../../registry"),A=t("./axes"),k=t("./constants"),T=t("./dragbox"),S=t("../layout_attributes"),E=e.exports={};E.unhover=_.unhover,E.supplyLayoutDefaults=function(t,e,r){function n(r,n){return g.coerce(t,e,S,r,n)}n("dragmode");var i;if(e._has("cartesian")){i=(e._isHoriz=E.isHoriz(r))?"y":"x"}else i="closest";n("hovermode",i)},E.isHoriz=function(t){for(var e=!0,r=0;rt._lastHoverTime+k.HOVERMINTIME)return o(t,e,r),void(t._lastHoverTime=Date.now());t._hoverTimer=setTimeout(function(){o(t,e,r),t._lastHoverTime=Date.now(),t._hoverTimer=void 0},k.HOVERMINTIME)},E.getDistanceFunction=function(t,e,r,n){return"closest"===t?n||a(e,r):"x"===t?e:r},E.getClosest=function(t,e,r){if(r.index!==!1)r.index>=0&&r.indexc[1]-.01&&(e.domain=[0,1]),i.noneOrAll(t.domain,e.domain,[0,1])}return e}},{"../../lib":680,"fast-isnumeric":113}],732:[function(t,e,r){"use strict";function n(t){return t._id}var i=t("../../lib/polygon"),a=t("../../components/color"),o=t("./axes"),s=t("./constants"),l=i.filter,u=i.tester,c=s.MINSELECT;e.exports=function(t,e,r,i,h){function f(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return t.p2d(r[e])}}function d(t,e){return t-e}var p,m=i.gd._fullLayout._zoomlayer,g=i.element.getBoundingClientRect(),v=i.plotinfo.xaxis._offset,y=i.plotinfo.yaxis._offset,b=e-g.left,x=r-g.top,_=b,w=x,M="M"+b+","+x,A=i.xaxes[0]._length,k=i.yaxes[0]._length,T=i.xaxes.map(n),S=i.yaxes.map(n),E=i.xaxes.concat(i.yaxes);"lasso"===h&&(p=l([[b,x]],s.BENDPX));var L=m.selectAll("path.select-outline").data([1,2]);L.enter().append("path").attr("class",function(t){return"select-outline select-outline-"+t}).attr("transform","translate("+v+", "+y+")").attr("d",M+"Z");var C,D,z,I,P,O=m.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1}).attr("transform","translate("+v+", "+y+")").attr("d","M0,0Z"),R=[],j=i.gd,F=[];for(C=0;Cf?d:o(t)?Number(t):d):d}var a=t("d3"),o=t("fast-isnumeric"),s=t("../../lib"),l=s.cleanNumber,u=s.ms2DateTime,c=s.dateTime2ms,h=t("../../constants/numerical"),f=h.FP_SAFE,d=h.BADNUM,p=t("./constants"),m=t("./axis_ids");e.exports=function(t,e){function r(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-3*w*Math.abs(n-i))}return d}function h(e,r,n){var i=c(e,n||t.calendar);if(i===d){if(!o(e))return d;i=c(new Date(+e))}return i}function g(e,r,n){return u(e,r,n||t.calendar)}function v(e){return t._categories[Math.round(e)]}function y(e){if(null!==e&&void 0!==e){var r=t._categories.indexOf(e);return r===-1?(t._categories.push(e),t._categories.length-1):r}return d}function b(e){var r=t._categories.indexOf(e);return r!==-1?r:"number"==typeof e?e:void 0}function x(e){return o(e)?a.round(t._b+t._m*e,2):d}function _(e){return(e-t._b)/t._m}e=e||{};var w=10;t.c2l="log"===t.type?r:i,t.l2c="log"===t.type?n:i,t.l2p=x,t.p2l=_,t.c2p="log"===t.type?function(t,e){return x(r(t,e))}:x,t.p2c="log"===t.type?function(t){return n(_(t))}:_,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=i,t.d2p=t.r2p=function(t){return x(l(t))},t.p2d=t.p2r=_):"log"===t.type?(t.d2r=t.d2l=function(t,e){return r(l(t),e)},t.r2d=t.r2c=function(t){return n(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=i,t.c2r=r,t.l2d=n,t.d2p=function(e,r){return x(t.d2r(e,r))},t.p2d=function(t){return n(_(t))},t.r2p=function(t){return x(l(t))},t.p2r=_):"date"===t.type?(t.d2r=t.r2d=s.identity,t.d2c=t.r2c=t.d2l=t.r2l=h,t.c2d=t.c2r=t.l2d=t.l2r=g,t.d2p=t.r2p=function(t,e,r){return x(h(t,0,r))},t.p2d=t.p2r=function(t,e,r){return g(_(t),e,r)}):"category"===t.type&&(t.d2r=t.d2c=t.d2l=y,t.r2d=t.c2d=t.l2d=v,t.d2l_noadd=b,t.r2l=t.l2r=t.r2c=t.c2r=i,t.d2p=function(t){return x(b(t))},t.p2d=function(t){return v(_(t))},t.r2p=x,t.p2r=_),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e){e||(e="range");var r,n,i=s.nestedProperty(t,e).get(),a=(t._id||"x").charAt(0);if(n="date"===t.type?s.dfltRange(t.calendar):"y"===a?p.DFLTRANGEY:p.DFLTRANGEX,n=n.slice(),!i||2!==i.length)return void s.nestedProperty(t,e).set(n);for("date"===t.type&&(i[0]=s.cleanDate(i[0],d,t.calendar),i[1]=s.cleanDate(i[1],d,t.calendar)),r=0;r<2;r++)if("date"===t.type){if(!s.isDateTime(i[r],t.calendar)){t[e]=n;break}if(t.r2l(i[0])===t.r2l(i[1])){var l=s.constrain(t.r2l(i[0]),s.MIN_MS+1e3,s.MAX_MS-1e3);i[0]=t.l2r(l-1e3),i[1]=t.l2r(l+1e3);break}}else{if(!o(i[r])){if(!o(i[1-r])){t[e]=n;break}i[r]=i[1-r]*(r?10:.1)}if(i[r]<-f?i[r]=-f:i[r]>f&&(i[r]=f),i[0]===i[1]){var u=Math.max(1,Math.abs(1e-6*i[0]));i[0]-=u,i[1]+=u}}},t.setScale=function(r){var n=e._size,i=t._id.charAt(0);if(t._categories||(t._categories=[]),t.overlaying){var a=m.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var o=r&&t._r?"_r":"range",l=t.calendar;t.cleanRange(o);var u=t.r2l(t[o][0],l),c=t.r2l(t[o][1],l);if("y"===i?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),!isFinite(t._m)||!isFinite(t._b))throw s.notifier("Something went wrong with axis scaling","long"),e._replotting=!1,new Error("axis scaling")},t.makeCalcdata=function(e,r){var n,i,a,o="date"===t.type&&e[r+"calendar"];if(r in e)for(n=e[r],i=new Array(n.length),a=0;a0?Number(c):u;else if("string"!=typeof c)e.dtick=u;else{var h=c.charAt(0),f=c.substr(1);f=n(f)?Number(f):0,(f<=0||!("date"===o&&"M"===h&&f===Math.round(f)||"log"===o&&"L"===h||"log"===o&&"D"===h&&(1===f||2===f)))&&(e.dtick=u)}var d="date"===o?i.dateTick0(e.calendar):0,p=r("tick0",d);"date"===o?e.tick0=i.cleanDate(p,d):n(p)&&"D1"!==c&&"D2"!==c?e.tick0=Number(p):e.tick0=d}else{var m=r("tickvals");void 0===m?e.tickmode="auto":r("ticktext")}}},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],737:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plotly"),a=t("../../registry"),o=t("../../components/drawing"),s=t("./axes"),l=/((x|y)([2-9]|[1-9][0-9]+)?)axis$/;e.exports=function(t,e,r,u){function c(e,r){function n(e,r){for(i=0;ir.duration?(d(),A=window.cancelAnimationFrame(m)):A=window.requestAnimationFrame(m)}var g=t._fullLayout,v=[],y=function(t){var e,r,n,i,a,o={};for(e in t)if(r=e.split("."),n=r[0].match(l)){var s=n[1],u=s+"axis";if(i=g[u],a={},Array.isArray(t[e])?a.to=t[e].slice(0):Array.isArray(t[e].range)&&(a.to=t[e].range.slice(0)),!a.to)continue;a.axisName=u,a.length=i._length,v.push(s),o[s]=a}return o}(e),b=Object.keys(y),x=function(t,e,r){var n,i,a,o=t._plots,s=[];for(n in o){var l=o[n];if(s.indexOf(l)===-1){var u=l.xaxis._id,c=l.yaxis._id,h=l.xaxis.range,f=l.yaxis.range;l.xaxis._r=l.xaxis.range.slice(),l.yaxis._r=l.yaxis.range.slice(),i=r[u]?r[u].to:h,a=r[c]?r[c].to:f,h[0]===i[0]&&h[1]===i[1]&&f[0]===a[0]&&f[1]===a[1]||e.indexOf(u)===-1&&e.indexOf(c)===-1||s.push(l)}}return s}(g,b,y);if(!x.length)return!1;var _;u&&(_=u());var w,M,A,k=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(A),A=null,p()}),w=Date.now(),A=window.requestAnimationFrame(m),Promise.resolve()}},{"../../components/drawing":598,"../../plotly":714,"../../registry":793,"./axes":719,d3:104}],738:[function(t,e,r){"use strict";function n(t,e,r){var n,i,a,o=!1;if("data"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if("layout"!==e.type)return!1;n=t._fullLayout}return i=u.nestedProperty(n,e.prop).get(),a=r[e.type]=r[e.type]||{},a.hasOwnProperty(e.prop)&&a[e.prop]!==i&&(o=!0),a[e.prop]=i,{changed:o,value:i}}function i(t,e){return Array.isArray(e[0])&&1===e[0].length&&["string","number"].indexOf(typeof e[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:e[0][0].toString()}]:[]}function a(t,e){var r=[],n=e[0],i={};if("string"==typeof n)i[n]=e[1];else{if(!u.isPlainObject(n))return r;i=n}return s(i,function(t,e,n){r.push({type:"layout",prop:t,value:n})},"",0),r}function o(t,e){var r,n,i,a,o=[];if(n=e[0],i=e[1],r=e[2],a={},"string"==typeof n)a[n]=i;else{if(!u.isPlainObject(n))return o;a=n,void 0===r&&(r=i)}return void 0===r&&(r=null),s(a,function(e,n,i){var a;if(Array.isArray(i)){var s=Math.min(i.length,t.data.length);r&&(s=Math.min(s,r.length)),a=[];for(var l=0;l0?".":"")+i;u.isPlainObject(a)?s(a,e,o,n+1):e(o,i,a)}})}var l=t("../plotly"),u=t("../lib");r.manageCommandObserver=function(t,e,i,a){var o={},s=!0;e&&e._commandObserver&&(o=e._commandObserver),o.cache||(o.cache={}),o.lookupTable={};var l=r.hasSimpleAPICommandBindings(t,i,o.lookupTable);if(e&&e._commandObserver){if(l)return o;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,o}if(l){n(t,l,o.cache),o.check=function(){if(s){var e=n(t,l,o.cache);return e.changed&&a&&void 0!==o.lookupTable[e.value]&&(o.disable(),Promise.resolve(a({value:e.value,type:l.type,prop:l.prop,traces:l.traces,index:o.lookupTable[e.value]})).then(o.enable,o.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;he*Math.PI/180},w.render=function(){function t(t){var e=r.projection(t.lonlat);return e?"translate("+e[0]+","+e[1]+")":null}function e(t){return r.isLonLatOverEdges(t.lonlat)?"0":"1.0"}var r=this,n=r.framework,i=n.select("g.choroplethlayer"),a=n.select("g.scattergeolayer"),o=r.path;n.selectAll("path.basepath").attr("d",o),n.selectAll("path.graticulepath").attr("d",o),i.selectAll("path.choroplethlocation").attr("d",o),i.selectAll("path.basepath").attr("d",o),a.selectAll("path.js-line").attr("d",o),null!==r.clipAngle?(a.selectAll("path.point").style("opacity",e).attr("transform",t),a.selectAll("text").style("opacity",e).attr("transform",t)):(a.selectAll("path.point").attr("transform",t),a.selectAll("text").attr("transform",t))}},{"../../components/color":575,"../../components/drawing":598,"../../lib/topojson_utils":701,"../cartesian/axes":719,"../cartesian/graph_interact":726,"../plots":778,"./constants":741,"./projections":749,"./set_scale":750,"./zoom":751,"./zoom_reset":752,d3:104,"topojson-client":513}],743:[function(t,e,r){"use strict";var n=t("./geo"),i=t("../../plots/plots");r.name="geo",r.attr="geo",r.idRoot="geo",r.idRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=i.getSubplotIds(e,"geo");void 0===window.PlotlyGeoAssets&&(window.PlotlyGeoAssets={topojson:{}});for(var o=0;on^d>n&&r<(f-u)*(n-c)/(d-c)+u&&(i=!i)}return i}function o(t){return t?t/Math.sin(t):1}function s(t){return t>1?D:t<-1?-D:Math.asin(t)}function l(t){return t>1?0:t<-1?C:Math.acos(t)}function u(t,e){var r=(2+D)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>E;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(C*(4+C))*t*(1+Math.cos(e)),2*Math.sqrt(C/(4+C))*Math.sin(e)]}function c(t,e){function r(r,n){var i=R(r/e,n);return i[0]*=t,i}return arguments.length<2&&(e=t),1===e?R:1/0===e?f:(r.invert=function(r,n){var i=R.invert(r/t,n);return i[0]*=e,i},r)}function h(){var t=2,e=O(c),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}function f(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function d(t,e){return[3*t/(2*C)*Math.sqrt(C*C/3-e*e),e]}function p(t,e){return[t,1.25*Math.log(Math.tan(C/4+.4*e))]}function m(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>E&&--i>0);return e/2}}function g(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function v(t,e){var r,n=Math.min(18,36*Math.abs(e)/C),i=Math.floor(n),a=n-i,o=(r=F[i])[0],s=r[1],l=(r=F[++i])[0],u=r[1],c=(r=F[Math.min(19,++i)])[0],h=r[1];return[t*(l+a*(c-o)/2+a*a*(c-2*l+o)/2),(e>0?D:-D)*(u+a*(h-s)/2+a*a*(h-2*u+s)/2)]}function y(t,e){return[t*Math.cos(e),e]}function b(t,e){var r=Math.cos(e),n=o(l(r*Math.cos(t/=2)));return[2*r*Math.sin(t)*n,Math.sin(e)*n]}function x(t,e){var r=b(t,e);return[(r[0]+t/D)/2,(r[1]+e)/2]}t.geo.project=function(t,e){var n=e.stream;if(!n)throw new Error("not yet supported");return(t&&_.hasOwnProperty(t.type)?_[t.type]:r)(t,n)};var _={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,r)})}}},w=[],M=[],A={point:function(t,e){w.push([t,e])},result:function(){var t=w.length?w.length<2?{type:"Point",coordinates:w[0]}:{type:"MultiPoint",coordinates:w}:null;return w=[],t}},k={lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){w.length&&(M.push(w),w=[])},result:function(){var t=M.length?M.length<2?{type:"LineString",coordinates:M[0]}:{type:"MultiLineString",coordinates:M}:null;return M=[],t}},T={polygonStart:n,lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){var t=w.length;if(t){do{w.push(w[0].slice())}while(++t<4);M.push(w),w=[]}},polygonEnd:n,result:function(){if(!M.length)return null;var t=[],e=[];return M.forEach(function(r){i(r)?t.push([r]):e.push(r)}),e.forEach(function(e){var r=e[0];t.some(function(t){if(a(t[0],r))return t.push(e),!0})||t.push([e])}),M=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},S={Point:A,MultiPoint:A,LineString:k,MultiLineString:k,Polygon:T,MultiPolygon:T,Sphere:T},E=1e-6,L=E*E,C=Math.PI,D=C/2,z=(Math.sqrt(C),C/180),I=180/C,P=t.geo.projection,O=t.geo.projectionMutator;t.geo.interrupt=function(e){function r(t,r){for(var n=r<0?-1:1,i=l[+(r<0)],a=0,o=i.length-1;ai[a][2][0];++a);var s=e(t-i[a][1][0],r);return s[0]+=e(i[a][1][0],n*r>n*i[a][0][1]?i[a][0][1]:r)[0],s}function n(){s=l.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]})})}function i(){for(var e=1e-6,r=[],n=0,i=l[0].length;n=0;--n){var o=l[1][n],s=180*o[0][0]/C,u=180*o[0][1]/C,c=180*o[1][1]/C,h=180*o[2][0]/C,f=180*o[2][1]/C;r.push(a([[h-e,f-e],[h-e,c+e],[s+e,c+e],[s+e,u-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}function a(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++aE&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return P(g)}).raw=g;var F=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];F.forEach(function(t){t[1]*=1.0144}),v.invert=function(t,e){var r=e/D,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=F[a][1],s=F[a+1][1],l=F[Math.min(19,a+2)][1],u=l-o,c=l-2*s+o,h=2*(Math.abs(r)-s)/u,f=c/u,d=h*(1-f*h*(1-2*f*h));if(d>=0||1===a){n=(e>=0?5:-5)*(d+i);var p,m=50;do{i=Math.min(18,Math.abs(n)/5),a=Math.floor(i),d=i-a,o=F[a][1],s=F[a+1][1],l=F[Math.min(19,a+2)][1],n-=(p=(e>=0?D:-D)*(s+d*(l-o)/2+d*d*(l-2*s+o)/2)-e)*I}while(Math.abs(p)>L&&--m>0);break}}while(--a>=0);var g=F[a][0],v=F[a+1][0],y=F[Math.min(19,a+2)][0];return[t/(v+d*(y-g)/2+d*d*(y-2*v+g)/2),n*z]},(t.geo.robinson=function(){return P(v)}).raw=v,y.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return P(y)}).raw=y,b.invert=function(t,e){if(!(t*t+4*e*e>C*C+E)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),u=Math.cos(r/2),c=Math.sin(n),h=Math.cos(n),f=Math.sin(2*n),d=c*c,p=h*h,m=s*s,g=1-p*u*u,v=g?l(h*u)*Math.sqrt(a=1/g):a=0,y=2*v*h*s-t,b=v*c-e,x=a*(p*m+v*h*u*d),_=a*(.5*o*f-2*v*c*s),w=.25*a*(f*s-v*c*p*o),M=a*(d*u+v*m*h),A=_*w-M*x;if(!A)break;var k=(b*_-y*M)/A,T=(y*w-b*x)/A;r-=k,n-=T}while((Math.abs(k)>E||Math.abs(T)>E)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return P(b)}).raw=b,x.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),u=Math.sin(2*n),c=s*s,h=o*o,f=Math.sin(r),d=Math.cos(r/2),p=Math.sin(r/2),m=p*p,g=1-h*d*d,v=g?l(o*d)*Math.sqrt(a=1/g):a=0,y=.5*(2*v*o*p+r/D)-t,b=.5*(v*s+n)-e,x=.5*a*(h*m+v*o*d*c)+.5/D,_=a*(f*u/4-v*s*p),w=.125*a*(u*p-v*s*h*f),M=.5*a*(c*d+v*m*o)+.5,A=_*w-M*x,k=(b*_-y*M)/A,T=(y*w-b*x)/A;r-=k,n-=T}while((Math.abs(k)>E||Math.abs(T)>E)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return P(x)}).raw=x}e.exports=n},{}],750:[function(t,e,r){"use strict";function n(t,e){var r=t.projection,n=t.lonaxis,o=t.lataxis,l=t.domain,u=t.framewidth||0,c=e.w*(l.x[1]-l.x[0]),h=e.h*(l.y[1]-l.y[0]),f=n.range[0]+s,d=n.range[1]-s,p=o.range[0]+s,m=o.range[1]-s,g=n._fullRange[0]+s,v=n._fullRange[1]-s,y=o._fullRange[0]+s,b=o._fullRange[1]-s;r._translate0=[e.l+c/2,e.t+h/2];var x=d-f,_=m-p,w=[f+x/2,p+_/2],M=r._rotate;return r._center=[w[0]+M[0],w[1]+M[1]],function(e){function n(t){return Math.min(_*c/(t[1][0]-t[0][0]),_*h/(t[1][1]-t[0][1]))}var o,s,l,x,_=e.scale(),w=r._translate0,M=i(f,p,d,m),A=i(g,y,v,b);l=a(e,M),o=n(l),x=a(e,A),r._fullScale=n(x),e.scale(o),l=a(e,M),s=[w[0]-l[0][0]+u,w[1]-l[0][1]+u],r._translate=s,e.translate(s),l=a(e,M),t._isAlbersUsa||e.clipExtent(l),o=r.scale*o,r._scale=o,t._width=Math.round(l[1][0])+u,t._height=Math.round(l[1][1])+u,t._marginX=(c-Math.round(l[1][0]))/2,t._marginY=(h-Math.round(l[1][1]))/2}}function i(t,e,r,n){var i=(r-t)/4;return{type:"Polygon",coordinates:[[[t,e],[t,n],[t+i,n],[t+2*i,n],[t+3*i,n],[r,n],[r,e],[r-i,e],[r-2*i,e],[r-3*i,e],[t,e]]]}}function a(t,e){return o.geo.path().projection(t).bounds(e)}var o=t("d3"),s=t("./constants").clipPad;e.exports=n},{"./constants":741,d3:104}],751:[function(t,e,r){"use strict";function n(t,e){return(e._isScoped?a:e._clipAngle?s:o)(t,e.projection)}function i(t,e){var r=e._fullScale;return _.behavior.zoom().translate(t.translate()).scale(t.scale()).scaleExtent([.5*r,100*r])}function a(t,e){function r(){_.select(this).style(A)}function n(){o.scale(_.event.scale).translate(_.event.translate),t.render()}function a(){_.select(this).style(k)}var o=t.projection,s=i(o,e);return s.on("zoomstart",r).on("zoom",n).on("zoomend",a),s}function o(t,e){function r(t){return g.invert(t)}function n(t){var e=g(r(t));return Math.abs(e[0]-t[0])>y||Math.abs(e[1]-t[1])>y}function a(){_.select(this).style(A),l=_.mouse(this),u=g.rotate(),c=g.translate(),h=u,f=r(l)}function o(){if(d=_.mouse(this),n(l))return v.scale(g.scale()),void v.translate(g.translate());g.scale(_.event.scale),g.translate([c[0],_.event.translate[1]]),f?r(d)&&(m=r(d),p=[h[0]+(m[0]-f[0]),u[1],u[2]],g.rotate(p),h=p):(l=d,f=r(l)),t.render()}function s(){_.select(this).style(k)}var l,u,c,h,f,d,p,m,g=t.projection,v=i(g,e),y=2;return v.on("zoomstart",a).on("zoom",o).on("zoomend",s),v}function s(t,e){function r(t){v++||t({type:"zoomstart"})}function n(t){t({type:"zoom"})}function a(t){--v||t({type:"zoomend"})}var o,s=t.projection,d={r:s.rotate(),k:s.scale()},p=i(s,e),m=x(p,"zoomstart","zoom","zoomend"),v=0,y=p.on;return p.on("zoomstart",function(){_.select(this).style(A);var t=_.mouse(this),e=s.rotate(),i=e,a=s.translate(),v=u(e);o=l(s,t),y.call(p,"zoom",function(){var r=_.mouse(this);if(s.scale(d.k=_.event.scale),o){if(l(s,r)){s.rotate(e).translate(a);var u=l(s,r),p=h(o,u),y=g(c(v,p)),b=d.r=f(y,o,i);isFinite(b[0])&&isFinite(b[1])&&isFinite(b[2])||(b=i),s.rotate(b),i=b}}else t=r,o=l(s,t);n(m.of(this,arguments))}),r(m.of(this,arguments))}).on("zoomend",function(){_.select(this).style(k),y.call(p,"zoom",null),a(m.of(this,arguments))}).on("zoom.redraw",function(){t.render()}),_.rebind(p,m,"on")}function l(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&v(r)}function u(t){var e=.5*t[0]*w,r=.5*t[1]*w,n=.5*t[2]*w,i=Math.sin(e),a=Math.cos(e),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function c(t,e){var r=t[0],n=t[1],i=t[2],a=t[3],o=e[0],s=e[1],l=e[2],u=e[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function h(t,e){if(t&&e){var r=b(t,e),n=Math.sqrt(y(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,y(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function f(t,e,r){var n=m(e,2,t[0]);n=m(n,1,t[1]),n=m(n,0,t[2]-r[2]);var i,a,o=e[0],s=e[1],l=e[2],u=n[0],c=n[1],h=n[2],f=Math.atan2(s,o)*M,p=Math.sqrt(o*o+s*s);Math.abs(c)>p?(a=(c>0?90:-90)-f,i=0):(a=Math.asin(c/p)*M-f,i=Math.sqrt(p*p-c*c));var g=180-a-2*f,v=(Math.atan2(h,u)-Math.atan2(l,i))*M,y=(Math.atan2(h,u)-Math.atan2(l,-i))*M;return d(r[0],r[1],a,v)<=d(r[0],r[1],g,y)?[a,v,r[2]]:[g,y,r[2]]}function d(t,e,r,n){var i=p(r-t),a=p(n-e);return Math.sqrt(i*i+a*a)}function p(t){return(t%360+540)%360-180}function m(t,e,r){var n=r*w,i=t.slice(),a=0===e?1:0,o=2===e?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=t[a]*s-t[o]*l,i[o]=t[o]*s+t[a]*l,i}function g(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*M,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*M,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*M]}function v(t){var e=t[0]*w,r=t[1]*w,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function y(t,e){for(var r=0,n=0,i=t.length;nh[d+2]&&(h[d]=-1,h[d+2]=1),f=this[y[d]],f._length=o.viewBox[d+2]-o.viewBox[d],l.doAutoRange(f),f.setScale();o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},b.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},b.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},b.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;rMath.abs(e))n.rotate(o,0,0,-t*r*Math.PI*f.rotateSpeed/window.innerWidth);else{var s=-f.zoomSpeed*a*e/window.innerHeight*(o-n.lastT())/100;n.pan(o,0,0,u*(Math.exp(s)-1))}}},!0),f}e.exports=n;var i=t("right-now"),a=t("3d-view"),o=t("mouse-change"),s=t("mouse-wheel")},{"3d-view":30,"mouse-change":431,"mouse-wheel":434,"right-now":480}],758:[function(t,e,r){"use strict";var n=t("./scene"),i=t("../plots"),a=t("../../lib"),o=t("../../constants/xmlns_namespaces");r.name="gl3d",r.attr="scene",r.idRoot="scene",r.idRegex=/^scene([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^scene([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,o=i.getSubplotIds(e,"gl3d"),s=0;s1;o(t,e,r,{type:"gl3d",attributes:s,handleDefaults:n,font:e.font,fullData:r,getDfltFromLayout:a,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":575,"../../../lib":680,"../../subplot_defaults":785,"./axis_defaults":761,"./layout_attributes":764}],764:[function(t,e,r){"use strict";function n(t,e,r){return{x:{valType:"number",dflt:t},y:{valType:"number",dflt:e},z:{valType:"number",dflt:r}}}var i=t("./axis_attributes"),a=t("../../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},camera:{up:a(n(0,0,1),{}),center:a(n(0,0,0),{}),eye:a(n(1.25,1.25,1.25),{})},domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto"},aspectratio:{x:{valType:"number",min:0},y:{valType:"number",min:0},z:{valType:"number",min:0}},xaxis:i,yaxis:i,zaxis:i,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],dflt:"turntable"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest"},_deprecated:{cameraposition:{valType:"info_array"}}}},{"../../../lib/extend":672,"./axis_attributes":760}],765:[function(t,e,r){"use strict";function n(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}function i(t){var e=new n;return e.merge(t),e}var a=t("../../../lib/str2rgbarray"),o=["xaxis","yaxis","zaxis"];n.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[o[e]];this.enabled[e]=r.showspikes,this.colors[e]=a(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness}},e.exports=i},{"../../../lib/str2rgbarray":698}],766:[function(t,e,r){"use strict";function n(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;af[1][o]?d[o]=1:f[1][o]===f[0][o]?d[o]=1:d[o]=1/(f[1][o]-f[0][o]);for(this.dataScale=d,a=0;am[1][a])m[0][a]=-1,m[1][a]=1;else{var x=m[1][a]-m[0][a];m[0][a]-=x/32,m[1][a]+=x/32}}else{var _=c[k[a]].range;m[0][a]=_[0],m[1][a]=_[1]}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),g[a]=m[1][a]-m[0][a],this.glplot.bounds[0][a]=m[0][a]*d[a],this.glplot.bounds[1][a]=m[1][a]*d[a]}var w=[1,1,1];for(a=0;a<3;++a){l=c[k[a]],u=l.type;var M=y[u];w[a]=Math.pow(M.acc,1/M.count)/d[a]}var A;if("auto"===c.aspectmode)A=Math.max.apply(null,w)/Math.min.apply(null,w)<=4?w:[1,1,1];else if("cube"===c.aspectmode)A=[1,1,1];else if("data"===c.aspectmode)A=w;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var T=c.aspectratio;A=[T.x,T.y,T.z]}c.aspectratio.x=h.aspectratio.x=A[0],c.aspectratio.y=h.aspectratio.y=A[1],c.aspectratio.z=h.aspectratio.z=A[2],this.glplot.aspect=A;var S=c.domain||null,E=e._size||null;if(S&&E){var L=this.container.style;L.position="absolute",L.left=E.l+S.x[0]*E.w+"px",L.top=E.t+(1-S.y[1])*E.h+"px",L.width=E.w*(S.x[1]-S.x[0])+"px",L.height=E.h*(S.y[1]-S.y[0])+"px"}this.glplot.redraw()}},A.destroy=function(){this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null},A.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),u(this.glplot.camera)},A.setCamera=function(t){this.glplot.camera.lookAt.apply(this,l(t))},A.saveCamera=function(t){var e=this.getCamera(),r=p.nestedProperty(t,this.id+".camera"),n=r.get(),i=!1;if(void 0===n)i=!0;else for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!function(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}(e,n,a,o)){i=!0;break}return i&&r.set(e),i},A.updateFx=function(t,e){var r=this.camera;r&&("orbit"===t?(r.mode="orbit",r.keyBindingMode="rotate"):"turntable"===t?(r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate"):r.keyBindingMode=t),this.fullSceneLayout.hovermode=e},A.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(c),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,n=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var i=new Uint8Array(r*n*4);e.readPixels(0,0,r,n,e.RGBA,e.UNSIGNED_BYTE,i);for(var a=0,o=n-1;a0}function a(t){var e={},r={};switch(t.type){case"circle":s.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":s.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity});break;case"fill":s.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var n=t.symbol,i=l(n.textposition,n.iconsize);s.extendFlat(e,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset}),s.extendFlat(r,{"icon-color":t.color,"text-color":n.textfont.color,"text-opacity":t.opacity})}return{layout:e,paint:r}}function o(t){var e,r=t.sourcetype,n=t.source,i={type:r},a="string"==typeof n;return"geojson"===r?e="data":"vector"===r&&(e=a?"url":"tiles"),i[e]=n,i}var s=t("../../lib"),l=t("./convert_text_opts"),u=n.prototype;u.update=function(t){this.visible?this.needsNewSource(t)?(this.updateLayer(t),this.updateSource(t)):this.needsNewLayer(t)&&this.updateLayer(t):(this.updateSource(t),this.updateLayer(t)),this.updateStyle(t),this.visible=i(t)},u.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},u.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==t.below},u.updateSource=function(t){var e=this.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,i(t)){var r=o(t);e.addSource(this.idSource,r)}},u.updateLayer=function(t){var e=this.map;if(e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),this.layerType=t.type,i(t)){e.addLayer({id:this.idLayer,source:this.idSource,"source-layer":t.sourcelayer||"",type:t.type},t.below);var r={visibility:"visible"};this.mapbox.setOptions(this.idLayer,"setLayoutProperty",r)}},u.updateStyle=function(t){var e=a(t);i(t)&&(this.mapbox.setOptions(this.idLayer,"setLayoutProperty",e.layout),this.mapbox.setOptions(this.idLayer,"setPaintProperty",e.paint))},u.dispose=function(){var t=this.map;t.removeLayer(this.idLayer),t.removeSource(this.idSource)},e.exports=function(t,e,r){var i=new n(t,e);return i.update(r),i}},{"../../lib":680,"./convert_text_opts":771}],774:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../components/color").defaultLine,a=t("../font_attributes"),o=t("../../traces/scatter/attributes").textposition;e.exports={_arrayAttrRegexps:[/^mapbox([2-9]|[1-9][0-9]+)?\.layers/],domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],dflt:"basic"},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},layers:{_isLinkedToArray:"layer",sourcetype:{valType:"enumerated",values:["geojson","vector"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},type:{valType:"enumerated",values:["circle","line","fill","symbol"],dflt:"circle"},below:{valType:"string",dflt:""},color:{valType:"color",dflt:i},opacity:{valType:"number",min:0,max:1,dflt:1},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2}},fill:{outlinecolor:{valType:"color",dflt:i}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},textfont:n.extendDeep({},a,{family:{dflt:"Open Sans Regular, Arial Unicode MS Regular"}}),textposition:n.extendFlat({},o,{arrayOk:!1})}}}},{"../../components/color":575,"../../lib":680,"../../traces/scatter/attributes":924,"../font_attributes":739}],775:[function(t,e,r){"use strict";function n(t,e,r){r("accesstoken"),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch"),i(t,e),e._input=t}function i(t,e){function r(t,e){return a.coerce(n,i,s.layers,t,e)}for(var n,i,o=t.layers||[],l=e.layers=[],u=0;u=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),u=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&n(t,o),l.text(o.text()&&u.text()?" - ":"")},d.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||"https://plot.ly",r=s.select(t).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return n.append("input").attr({type:"text",name:"data"}).node().value=d.graphJson(t,!1,"keepdata"),n.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1},d.supplyDefaults=function(t){var e,r=t._fullLayout||{},n=t._fullLayout={},i=t.layout||{},a=t._fullData||[],o=t._fullData=[],s=t.data||[];if(t._transitionData||d.createTransitionData(t),r._initialAutoSizeIsDone){var l=r.width,c=r.height;d.supplyLayoutGlobalDefaults(i,n),i.width||(n.width=l),i.height||(n.height=c)}else{d.supplyLayoutGlobalDefaults(i,n);var h=!i.width||!i.height,f=n.autosize,p=t._context&&t._context.autosizable;h&&(f||p)?d.plotAutoSize(t,i,n):h&&d.sanitizeMargins(t),!f&&h&&(i.width=n.width,i.height=n.height)}n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._globalTransforms=(t._context||{}).globalTransforms,d.supplyDataDefaults(s,o,i,n),n._has=d._hasPlotType.bind(n);var m=n._modules;for(e=0;e0){var c=o(t._boundingBoxMargins),f=c.left+c.right,p=c.bottom+c.top,m=1-2*s,g=r._container&&r._container.node?r._container.node().getBoundingClientRect():{width:r.width,height:r.height};n=Math.round(m*(g.width-f)),i=Math.round(m*(g.height-p))}else{var v=u?window.getComputedStyle(t):{};n=parseFloat(v.width)||r.width,i=parseFloat(v.height)||r.height}var y=d.layoutAttributes.width.min,b=d.layoutAttributes.height.min;n1,_=!e.height&&Math.abs(r.height-i)>1;(_||x)&&(x&&(r.width=n),_&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),d.sanitizeMargins(r)},d.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a;u.Axes.supplyLayoutDefaults(t,e,r);var o=e._basePlotModules;for(i=0;i.5*n.width&&(r.l=r.r=0),r.b+r.t>.5*n.height&&(r.b=r.t=0),n._pushmargin[e]={l:{val:r.x,size:r.l+i},r:{val:r.x,size:r.r+i},b:{val:r.y,size:r.b+i},t:{val:r.y,size:r.t+i}}}else delete n._pushmargin[e];n._replotting||d.doAutoMargin(t)}},d.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),e._pushmargin||(e._pushmargin={});var r=e._size,n=JSON.stringify(r),i=Math.max(e.margin.l||0,0),a=Math.max(e.margin.r||0,0),o=Math.max(e.margin.t||0,0),s=Math.max(e.margin.b||0,0),c=e._pushmargin;if(e.margin.autoexpand!==!1){c.base={l:{val:0,size:i},r:{val:1,size:a},t:{val:1,size:o},b:{val:0,size:s}} +;for(var h=Object.keys(c),f=0;fg){var A=(v*w+(M-e.width)*g)/(w-g),k=(M*(1-g)+(v-e.width)*(1-w))/(w-g);A>=0&&k>=0&&A+k>i+a&&(i=A,a=k)}}if(l(b)&&c[_].t){var T=c[_].t.val,S=c[_].t.size;if(T>y){var E=(b*T+(S-e.height)*y)/(T-y),L=(S*(1-y)+(b-e.height)*(1-T))/(T-y);E>=0&&L>=0&&E+L>s+o&&(s=E,o=L)}}}}if(r.l=Math.round(i),r.r=Math.round(a),r.t=Math.round(o),r.b=Math.round(s),r.p=Math.round(e.margin.pad),r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b,!e._replotting&&"{}"!==n&&n!==JSON.stringify(e._size))return u.plot(t)},d.graphJson=function(t,e,r,n,i){function a(t){if("function"==typeof t)return null;if(h.isPlainObject(t)){var e,n,i={};for(e in t)if("function"!=typeof t[e]&&["_","["].indexOf(e.charAt(0))===-1){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!h.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;i[e]=a(t[e])}return i}return Array.isArray(t)?t.map(a):h.isJSDate(t)?h.ms2DateTimeLocal(+t):t}(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&d.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames,u={data:(o||[]).map(function(t){var r=a(t);return e&&delete r.fit,r})};return e||(u.layout=a(s)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),l&&(u.frames=a(l)),"object"===n?u:JSON.stringify(u)},d.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){_=!0}),i.redraw&&t._transitionData._interruptCallbacks.push(function(){return u.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var o,s,l=0,c=0,d=t._fullLayout._basePlotModules,p=!1;if(r)for(s=0;s=0,E=S?h.angularAxis.domain:n.extent(M),L=Math.abs(M[1]-M[0]);k&&!A&&(L=0);var C=E.slice();T&&A&&(C[1]+=L);var D=h.angularAxis.ticksCount||4;D>8&&(D=D/(D/8)+D%8),h.angularAxis.ticksStep&&(D=(C[1]-C[0])/D);var z=h.angularAxis.ticksStep||(C[1]-C[0])/(D*(h.minorTicks+1));w&&(z=Math.max(Math.round(z),1)),C[2]||(C[2]=z);var I=n.range.apply(this,C);if(I=I.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===h.direction?[0,360]:[360,0]),c.layout.angularAxis.domain=s.domain(),c.layout.angularAxis.endPadding=T?L:0,void 0===(e=n.select(this).select("svg.chart-root"))||e.empty()){var P=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),O=this.appendChild(this.ownerDocument.importNode(P.documentElement,!0));e=n.select(O)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var R,j=e.select(".chart-group"),F={fill:"none",stroke:h.tickColor},N={"font-size":h.font.size,"font-family":h.font.family,fill:h.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+h.font.outlineColor}).join(",")};if(h.showLegend){R=e.select(".legend-group").attr({transform:"translate("+[b,h.margin.top]+")"}).style({display:"block"});var B=d.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend=void 0===t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:d.map(function(t,e){return t.name||"Element"+e}),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:R,elements:B,reverseOrder:h.legend.reverseOrder})})();var U=R.node().getBBox();b=Math.min(h.width-U.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,b=Math.max(10,b),_=[h.margin.left+b,h.margin.top+b],i.range([0,b]),c.layout.radialAxis.domain=i.domain(),R.attr("transform","translate("+[_[0]+b,_[1]-b]+")")}else R=e.select(".legend-group").style({display:"none"});e.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),j.attr("transform","translate("+_+")").style({cursor:"crosshair"});var V=[(h.width-(h.margin.left+h.margin.right+2*b+(U?U.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*b))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),e.select(".outer-group").attr("transform","translate("+V+")"),h.title){var H=e.select("g.title-group text").style(N).text(h.title),q=H.node().getBBox();H.attr({x:_[0]-q.width/2,y:_[1]-b-20})}var G=e.select(".radial.axis-group");if(h.radialAxis.gridLinesVisible){var Y=G.selectAll("circle.grid-circle").data(i.ticks(5));Y.enter().append("circle").attr({class:"grid-circle"}).style(F),Y.attr("r",i),Y.exit().remove()}G.select("circle.outside-circle").attr({r:b}).style(F);var W=e.select("circle.background-circle").attr({r:b}).style({fill:h.backgroundColor,stroke:h.stroke});if(h.radialAxis.visible){var X=n.svg.axis().scale(i).ticks(5).tickSize(5);G.call(X).attr({transform:"rotate("+h.radialAxis.orientation+")"}),G.selectAll(".domain").style(F),G.selectAll("g>text").text(function(t,e){return this.textContent+h.radialAxis.ticksSuffix}).style(N).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===h.radialAxis.tickOrientation?"rotate("+-h.radialAxis.orientation+") translate("+[0,N["font-size"]]+")":"translate("+[0,N["font-size"]]+")"}}),G.selectAll("g>line").style({stroke:"black"})}var Z=e.select(".angular.axis-group").selectAll("g.angular-tick").data(I),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+l(t,e)+")"}}).style({display:h.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(h.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(h.minorTicks+1)==0)}).style(F),J.selectAll(".minor").style({stroke:h.minorTickColor}),Z.select("line.grid-line").attr({x1:h.tickLength?b-h.tickLength:0,x2:b}).style({display:h.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(N);var K=Z.select("text.axis-text").attr({x:b+h.labelOffset,dy:".35em",transform:function(t,e){var r=l(t,e),n=b+h.labelOffset,i=h.angularAxis.tickOrientation;return"horizontal"==i?"rotate("+-r+" "+n+" 0)":"radial"==i?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:h.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(h.minorTicks+1)!=0?"":w?w[t]+h.angularAxis.ticksSuffix:t+h.angularAxis.ticksSuffix}).style(N);h.angularAxis.rewriteTicks&&K.text(function(t,e){return e%(h.minorTicks+1)!=0?"":h.angularAxis.rewriteTicks(this.textContent,e)});var Q=n.max(j.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));R.attr({transform:"translate("+[b+Q,h.margin.top]+")"});var $=e.select("g.geometry-group").selectAll("g").size()>0,tt=e.select("g.geometry-group").selectAll("g.geometry").data(d);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),d[0]||$){var et=[];d.forEach(function(t,e){var r={};r.radialScale=i,r.angularScale=s,r.container=tt.filter(function(t,r){return r==e}),r.geometry=t.geometry,r.orientation=h.orientation,r.direction=h.direction,r.index=e,et.push({data:t,geometryConfig:r})});var rt=n.nest().key(function(t,e){return void 0!==t.data.groupId||"unstacked"}).entries(et),nt=[];rt.forEach(function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return a(o[r].defaultConfig(),t)});o[r]().config(n)()})}var it,at,ot=e.select(".guides-group"),st=e.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,hasTick:!0})();if(!A){var ht=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});j.on("mousemove.angular-guide",function(t,e){var r=o.util.getMousePos(W).angle;ht.attr({x2:-b,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(b+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){ot.select("line").style({opacity:0})})}var ft=ot.select("circle").style({stroke:"grey",fill:"none"});j.on("mousemove.radial-guide",function(t,e){var r=o.util.getMousePos(W).radius;ft.attr({r:r}).style({opacity:.5}),at=i.invert(o.util.getMousePos(W).radius);var n=o.util.convertToCartesian(r,h.radialAxis.orientation);ut.text(o.util.round(at)).move([n[0]+_[0],n[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){ft.style({opacity:0}),ct.hide(),lt.hide(),ut.hide()}),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(t,r){var i=n.select(this),a=i.style("fill"),s="black",l=i.style("opacity")||1;if(i.attr({"data-opacity":l}),"none"!=a){i.attr({"data-fill":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var u={t:o.util.round(t[0]),r:o.util.round(t[1])};A&&(u.t=w[t[0]]);var c="t: "+u.t+", r: "+u.r,h=this.getBoundingClientRect(),f=e.node().getBoundingClientRect(),d=[h.left+h.width/2-V[0]-f.left,h.top+h.height/2-V[1]-f.top];ct.config({color:s}).text(c),ct.move(d)}else a=i.style("stroke"),i.attr({"data-stroke":a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ct.show()}).on("mouseout.tooltip",function(t,e){ct.hide();var r=n.select(this),i=r.attr("data-fill");i?r.style({fill:i,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})})}),f}var e,r,i,s,l={data:[],layout:{}},u={},c={},h=n.dispatch("hover"),f={};return f.render=function(e){return t(e),this},f.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),a(l.data[e],o.Axis.defaultConfig().data[0]),a(l.data[e],t)}),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,e.layout),this},f.getLiveConfig=function(){return c},f.getinputConfig=function(){return u},f.radialScale=function(t){return i},f.angularScale=function(t){return s},f.svg=function(){return e},n.rebind(f,h,"on"),f},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach(function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)});var s={t:a,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if(void 0===t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return r===-2},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i0)){var s=n.select(this.parentNode).selectAll("path.line").data([0]);s.enter().insert("path"),s.attr({class:"line",d:f(o),transform:function(e,r){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return g.fill(r,i,a)},"fill-opacity":0,stroke:function(t,e){return g.stroke(r,i,a)},"stroke-width":function(t,e){return g["stroke-width"](r,i,a)},"stroke-dasharray":function(t,e){return g["stroke-dasharray"](r,i,a)},opacity:function(t,e){return g.opacity(r,i,a)},display:function(t,e){return g.display(r,i,a)}})}};var d=t.angularScale.range(),p=Math.abs(d[1]-d[0])/l[0].length*Math.PI/180,m=n.svg.arc().startAngle(function(t){return-p/2}).endAngle(function(t){return p/2}).innerRadius(function(e){return t.radialScale(c+(e[2]||0))}).outerRadius(function(e){return t.radialScale(c+(e[2]||0))+t.radialScale(e[1])});h.arc=function(e,r,i){n.select(this).attr({class:"mark arc",d:m,transform:function(e,r){return"rotate("+(t.orientation+u(e[0])+90)+")"}})};var g={fill:function(t,r,n){return e[n].data.color},stroke:function(t,r,n){return e[n].data.strokeColor},"stroke-width":function(t,r,n){return e[n].data.strokeSize+"px"},"stroke-dasharray":function(t,r,n){return i[e[n].data.strokeDash]},opacity:function(t,r,n){return e[n].data.opacity},display:function(t,r,n){return void 0===e[n].data.visible||e[n].data.visible?"block":"none"}},v=n.select(this).selectAll("g.layer").data(l);v.enter().append("g").attr({class:"layer"});var y=v.selectAll("path.mark").data(function(t,e){return t});y.enter().append("path").attr({class:"mark"}),y.style(g).each(h[t.geometryType]),y.exit().remove(),v.exit().remove()})}var e=[o.PolyChart.defaultConfig()],r=n.dispatch("hover"),i={solid:"none",dash:[5,2],dot:[2,5]};return t.config=function(t){return arguments.length?(t.forEach(function(t,r){e[r]||(e[r]={}),a(e[r],o.PolyChart.defaultConfig()),a(e[r],t)}),this):e},t.getColorScale=function(){},n.rebind(t,r,"on"),t},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){function t(){var r=e.legendConfig,i=e.data.map(function(t,e){return[].concat(t).map(function(t,n){var i=a({},r.elements[e]);return i.name=t,i.color=[].concat(r.elements[e].color)[n],i})}),o=n.merge(i);o=o.filter(function(t,e){return r.elements[e]&&(r.elements[e].visibleInLegend||void 0===r.elements[e].visibleInLegend)}),r.reverseOrder&&(o=o.reverse());var s=r.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map(function(t,e){return t.color}),u=r.fontSize,c=null==r.isContinuous?"number"==typeof o[0]:r.isContinuous,h=c?r.height:u*o.length,f=s.classed("legend-group",!0),d=f.selectAll("svg").data([0]),p=d.enter().append("svg").attr({width:300,height:h+u,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var m=n.range(o.length),g=n.scale[c?"linear":"ordinal"]().domain(m).range(l),v=n.scale[c?"linear":"ordinal"]().domain(m)[c?"range":"rangePoints"]([0,h]),y=function(t,e){var r=3*e;return"line"===t?"M"+[[-e/2,-e/12],[e/2,-e/12],[e/2,e/12],[-e/2,e/12]]+"Z":n.svg.symbolTypes.indexOf(t)!=-1?n.svg.symbol().type(t).size(r)():n.svg.symbol().type("square").size(r)()};if(c){var b=d.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);b.enter().append("stop"),b.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),d.append("rect").classed("legend-mark",!0).attr({height:r.height,width:r.colorBandWidth,fill:"url(#grad1)"})}else{var x=d.select(".legend-marks").selectAll("path.legend-mark").data(o);x.enter().append("path").classed("legend-mark",!0),x.attr({transform:function(t,e){return"translate("+[u/2,v(e)+u/2]+")"},d:function(t,e){var r=t.symbol;return y(r,u)},fill:function(t,e){return g(e)}}),x.exit().remove()}var _=n.svg.axis().scale(v).orient("right"),w=d.select("g.legend-axis").attr({transform:"translate("+[c?r.colorBandWidth:u,u/2]+")"}).call(_);return w.selectAll(".domain").style({fill:"none",stroke:"none"}),w.selectAll("line").style({fill:"none",stroke:c?r.textColor:"none"}),w.selectAll("text").style({fill:r.textColor,"font-size":r.fontSize}).text(function(t,e){return o[e].name}),t}var e=o.Legend.defaultConfig(),r=n.dispatch("hover");return t.config=function(t){return arguments.length?(a(e,t),this):e},n.rebind(t,r,"on"),t},o.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=function(){t=i.container.selectAll("g."+s).data([0]);var n=t.enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:i.padding+10,dy:.3*+i.fontSize}),l};return l.text=function(a){var o=n.hsl(i.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",c=a||"";e.style({fill:u,"font-size":i.fontSize+"px"}).text(c);var h=i.padding,f=e.node().getBBox(),d={fill:i.color,stroke:s,"stroke-width":"2px"},p=f.width+2*h+10,m=f.height+2*h;return r.attr({d:"M"+[[10,-m/2],[10,-m/4],[i.hasTick?0:10,0],[10,m/4],[10,m/2],[p,m/2],[p,-m/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[10,-m/2+2*h]+")"}),t.style({display:"block"}),l},l.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),l},l.hide=function(){if(t)return t.style({display:"none"}),l},l.show=function(){if(t)return t.style({display:"block"}),l},l.config=function(t){return a(i,t),l},l},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={};return t.convert=function(t,e){var r={} +;if(t.data&&(r.data=t.data.map(function(t,r){var n=a({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",n.dotVisible===!0?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n}),!e&&t.layout&&"stack"===t.layout.barmode)){var i=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=i.indexOf(t.geometry);n!=-1&&(r.data[e].groupId=n)})}if(t.layout){var s=a({},t.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?(void 0!==s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&void 0!==s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&void 0!==s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&void 0!==s.margin.t){var l=["t","r","b","l","pad"],u=["top","right","bottom","left","pad"],c={};n.entries(s.margin).forEach(function(t,e){c[u[l.indexOf(t.key)]]=t.value}),s.margin=c}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r},t}},{"../../lib":680,d3:104}],783:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=i.extendDeepAll,u=e.exports={};u.framework=function(t){function e(e,i){return i&&(h=i),n.select(n.select(h).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),r=r?l(r,e):e,a||(a=o.Axis()),c=o.adapter.plotly().convert(r),a.config(c).render(h),t.data=r.data,t.layout=r.layout,u.fillLayout(t),r}var r,i,a,c,h,f=new s;return e.isPolar=!0,e.svg=function(){return a.svg()},e.getConfig=function(){return r},e.getLiveConfig=function(){return o.adapter.plotly().convert(a.getLiveConfig(),!0)},e.getLiveScales=function(){return{t:a.angularScale(),r:a.radialScale()}},e.setUndoPoint=function(){var t=this,e=o.util.cloneJson(r);!function(e,r){f.add({undo:function(){r&&t(r)},redo:function(){t(e)}})}(e,i),i=o.util.cloneJson(e)},e.undo=function(){f.undo()},e.redo=function(){f.redo()},e},u.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),i=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{"../../components/color":575,"../../lib":680,"./micropolar":782,"./undo_manager":784,d3:104}],784:[function(t,e,r){"use strict";e.exports=function(){function t(t,e){return t?(i=!0,t[e](),i=!1,this):this}var e,r=[],n=-1,i=!1;return{add:function(t){return i?this:(r.splice(n+1,r.length-n),r.push(t),n=r.length-1,this)},setCallback:function(t){e=t},undo:function(){var i=r[n];return i?(t(i,"undo"),n-=1,e&&e(i.undo),this):this},redo:function(){var i=r[n+1];return i?(t(i,"redo"),n+=1,e&&e(i.redo),this):this},clear:function(){r=[],n=-1},hasUndo:function(){return n!==-1},hasRedo:function(){return n=o&&(d.min=0,p.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}var i=t("../../../components/color"),a=t("../../subplot_defaults"),o=t("./layout_attributes"),s=t("./axis_defaults"),l=["aaxis","baxis","caxis"];e.exports=function(t,e,r){a(t,e,r,{type:"ternary",attributes:o,handleDefaults:n,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../../components/color":575,"../../subplot_defaults":785,"./axis_defaults":789,"./layout_attributes":791}],791:[function(t,e,r){"use strict";var n=t("../../../components/color/attributes"),i=t("./axis_attributes");e.exports={domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},bgcolor:{valType:"color",dflt:n.background},sum:{valType:"number",dflt:1,min:0},aaxis:i,baxis:i,caxis:i}},{"../../../components/color/attributes":574,"./axis_attributes":788}],792:[function(t,e,r){"use strict";function n(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework()}function i(t){a.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}var a=t("d3"),o=t("tinycolor2"),s=t("../../plotly"),l=t("../../lib"),u=t("../../components/color"),c=t("../../components/drawing"),h=t("../cartesian/set_convert"),f=t("../../lib/extend").extendFlat,d=t("../plots"),p=t("../cartesian/axes"),m=t("../../components/dragelement"),g=t("../../components/titles"),v=t("../cartesian/select"),y=t("../cartesian/constants"),b=t("../cartesian/graph_interact");e.exports=n;var x=n.prototype;x.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={}},x.plot=function(t,e){var r=this,n=e[r.id],i=e._size;r.adjustLayout(n,i),d.generalUpdatePerTraceModule(r,t,n),r.layers.plotbg.select("path").call(u.fill,n.bgcolor)},x.makeFramework=function(){var t=this,e=t.defs.selectAll("g.clips").data([0]);e.enter().append("g").classed("clips",!0);var r="clip"+t.layoutId+t.id;t.clipDef=e.selectAll("#"+r).data([0]),t.clipDef.enter().append("clipPath").attr("id",r).append("path").attr("d","M0,0Z"),t.plotContainer=t.container.selectAll("g."+t.id).data([0]),t.plotContainer.enter().append("g").classed(t.id,!0),t.layers={};var n=["draglayer","plotbg","backplot","grids","frontplot","zoom","aaxis","baxis","caxis","axlines"];t.plotContainer.selectAll("g.toplevel").data(n).enter().append("g").attr("class",function(t){return"toplevel "+t}).each(function(e){var r=a.select(this);t.layers[e]=r,"frontplot"===e?r.append("g").classed("scatterlayer",!0):"backplot"===e?r.append("g").classed("maplayer",!0):"plotbg"===e?r.append("path").attr("d","M0,0Z"):"axlines"===e&&r.selectAll("path").data(["aline","bline","cline"]).enter().append("path").each(function(t){a.select(this).classed(t,!0)})}),t.plotContainer.select(".grids").selectAll("g.grid").data(["agrid","bgrid","cgrid"]).enter().append("g").attr("class",function(t){return"grid "+t}).each(function(e){t.layers[e]=a.select(this)}),t.plotContainer.selectAll(".backplot,.frontplot,.grids").call(c.setClipUrl,r),t.graphDiv._context.staticPlot||t.initInteractions()};var _=Math.sqrt(4/3);x.adjustLayout=function(t,e){var r,n,i,a,o,s,l=this,c=t.domain,d=(c.x[0]+c.x[1])/2,p=(c.y[0]+c.y[1])/2,m=c.x[1]-c.x[0],g=c.y[1]-c.y[0],v=m*e.w,y=g*e.h,b=t.sum,x=t.aaxis.min,w=t.baxis.min,M=t.caxis.min;v>_*y?(a=y,i=a*_):(i=v,a=i/_),o=m*i/v,s=g*a/y,r=e.l+e.w*d-i/2,n=e.t+e.h*(1-p)-a/2,l.x0=r,l.y0=n,l.w=i,l.h=a,l.sum=b,l.xaxis={type:"linear",range:[x+2*M-b,b-x-2*w],domain:[d-o/2,d+o/2],_id:"x"},h(l.xaxis,l.graphDiv._fullLayout),l.xaxis.setScale(),l.yaxis={type:"linear",range:[x,b-w-M],domain:[p-s/2,p+s/2],_id:"y"},h(l.yaxis,l.graphDiv._fullLayout),l.yaxis.setScale();var A=l.yaxis.domain[0],k=l.aaxis=f({},t.aaxis,{range:[x,b-w-M],side:"left",_counterangle:30,tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*_],_axislayer:l.layers.aaxis,_gridlayer:l.layers.agrid,_pos:0,_id:"y",_length:i,_gridpath:"M0,0l"+a+",-"+i/2});h(k,l.graphDiv._fullLayout),k.setScale();var T=l.baxis=f({},t.baxis,{range:[b-x-M,w],side:"bottom",_counterangle:30,domain:l.xaxis.domain,_axislayer:l.layers.baxis,_gridlayer:l.layers.bgrid,_counteraxis:l.aaxis,_pos:0,_id:"x",_length:i,_gridpath:"M0,0l-"+i/2+",-"+a});h(T,l.graphDiv._fullLayout),T.setScale(),k._counteraxis=T;var S=l.caxis=f({},t.caxis,{range:[b-x-w,M],side:"right",_counterangle:30,tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*_],_axislayer:l.layers.caxis,_gridlayer:l.layers.cgrid,_counteraxis:l.baxis,_pos:0,_id:"y",_length:i,_gridpath:"M0,0l-"+a+","+i/2});h(S,l.graphDiv._fullLayout),S.setScale();var E="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";l.clipDef.select("path").attr("d",E),l.layers.plotbg.select("path").attr("d",E);var L="translate("+r+","+n+")";l.plotContainer.selectAll(".scatterlayer,.maplayer,.zoom").attr("transform",L);var C="translate("+r+","+(n+a)+")";l.layers.baxis.attr("transform",C),l.layers.bgrid.attr("transform",C);var D="translate("+(r+i/2)+","+n+")rotate(30)";l.layers.aaxis.attr("transform",D),l.layers.agrid.attr("transform",D);var z="translate("+(r+i/2)+","+n+")rotate(-30)";l.layers.caxis.attr("transform",z),l.layers.cgrid.attr("transform",z),l.drawAxes(!0),l.plotContainer.selectAll(".crisp").classed("crisp",!1);var I=l.layers.axlines;I.select(".aline").attr("d",k.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(u.stroke,k.linecolor||"#000").style("stroke-width",(k.linewidth||0)+"px"),I.select(".bline").attr("d",T.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(u.stroke,T.linecolor||"#000").style("stroke-width",(T.linewidth||0)+"px"),I.select(".cline").attr("d",S.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(u.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px")},x.drawAxes=function(t){var e=this,r=e.graphDiv,n=e.id.substr(7)+"title",i=e.aaxis,a=e.baxis,o=e.caxis;if(p.doTicks(r,i,!0),p.doTicks(r,a,!0),p.doTicks(r,o,!0),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0));g.draw(r,"a"+n,{propContainer:i,propName:e.id+".aaxis.title",dfltName:"Component A",attributes:{x:e.x0+e.w/2,y:e.y0-i.titlefont.size/3-s,"text-anchor":"middle"}});var l=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;g.draw(r,"b"+n,{propContainer:a,propName:e.id+".baxis.title",dfltName:"Component B",attributes:{x:e.x0-l,y:e.y0+e.h+.83*a.titlefont.size+l,"text-anchor":"middle"}}),g.draw(r,"c"+n,{propContainer:o,propName:e.id+".caxis.title",dfltName:"Component C",attributes:{x:e.x0+e.w+l,y:e.y0+e.h+.83*o.titlefont.size+l,"text-anchor":"middle"}})}};var w=y.MINZOOM/2+.87,M="m-0.87,.5h"+w+"v3h-"+(w+5.2)+"l"+(w/2+2.6)+",-"+(.87*w+4.5)+"l2.6,1.5l-"+w/2+","+.87*w+"Z",A="m0.87,.5h-"+w+"v3h"+(w+5.2)+"l-"+(w/2+2.6)+",-"+(.87*w+4.5)+"l-2.6,1.5l"+w/2+","+.87*w+"Z",k="m0,1l"+w/2+","+.87*w+"l2.6,-1.5l-"+(w/2+2.6)+",-"+(.87*w+4.5)+"l-"+(w/2+2.6)+","+(.87*w+4.5)+"l2.6,1.5l"+w/2+",-"+.87*w+"Z",T=!0;x.initInteractions=function(){function t(t,e,r){var n=R.getBoundingClientRect();x=e-n.left,w=r-n.top,S={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=S,E=O.aaxis.range[1]-S.a,C=o(O.graphDiv._fullLayout[O.id].bgcolor).getLuminance(),D="M0,"+O.h+"L"+O.w/2+", 0L"+O.w+","+O.h+"Z",z=!1,I=F.append("path").attr("class","zoombox").style({fill:C>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",D),P=F.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),p()}function e(t,e){return 1-e/O.h}function r(t,e){return 1-(t+(O.h-e)/Math.sqrt(3))/O.w}function n(t,e){return(t-(O.h-e)/Math.sqrt(3))/O.w}function a(t,i){var a=x+t,o=w+i,s=Math.max(0,Math.min(1,e(x,w),e(a,o))),l=Math.max(0,Math.min(1,r(x,w),r(a,o))),u=Math.max(0,Math.min(1,n(x,w),n(a,o))),c=(s/2+u)*O.w,h=(1-s/2-l)*O.w,f=(c+h)/2,d=h-c,p=(1-s)*O.h,m=p-d/_;d.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),P.transition().style("opacity",1).duration(200),z=!0)}function c(t,e){if(L===S)return 2===e&&g(),i(j);i(j);var r={};r[O.id+".aaxis.min"]=L.a,r[O.id+".baxis.min"]=L.b,r[O.id+".caxis.min"]=L.c,s.relayout(j,r),T&&j.data&&j._context.showTips&&(l.notifier("Double-click to
zoom back out","long"),T=!1)}function h(){S={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=S}function f(t,e){var r=t/O.xaxis._m,n=e/O.yaxis._m;L={a:S.a-n,b:S.b+(r+n)/2,c:S.c-(r-n)/2};var i=[L.a,L.b,L.c].sort(),a={a:i.indexOf(L.a),b:i.indexOf(L.b),c:i.indexOf(L.c)};i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),L={a:i[a.a],b:i[a.b],c:i[a.c]},e=(S.a-L.a)*O.yaxis._m,t=(S.c-L.c-S.b+L.b)*O.xaxis._m);var o="translate("+(O.x0+t)+","+(O.y0+e)+")";O.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",o),O.aaxis.range=[L.a,O.sum-L.b-L.c],O.baxis.range=[O.sum-L.a-L.c,L.b],O.caxis.range=[O.sum-L.a-L.b,L.c],O.drawAxes(!1),O.plotContainer.selectAll(".crisp").classed("crisp",!1)}function d(t,e){if(t){var r={};r[O.id+".aaxis.min"]=L.a,r[O.id+".baxis.min"]=L.b,r[O.id+".caxis.min"]=L.c,s.relayout(j,r)}else 2===e&&g()}function p(){O.plotContainer.selectAll(".select-outline").remove()}function g(){var t={};t[O.id+".aaxis.min"]=0,t[O.id+".baxis.min"]=0,t[O.id+".caxis.min"]=0,j.emit("plotly_doubleclick",null),s.relayout(j,t)}var x,w,S,E,L,C,D,z,I,P,O=this,R=O.layers.plotbg.select("path").node(),j=O.graphDiv,F=O.layers.zoom,N={element:R,gd:j,plotinfo:{plot:F},doubleclick:g,subplot:O.id,prepFn:function(e,r,n){N.xaxes=[O.xaxis],N.yaxes=[O.yaxis];var i=j._fullLayout.dragmode;e.shiftKey&&(i="pan"===i?"zoom":"pan"),N.minDrag="lasso"===i?1:void 0,"zoom"===i?(N.moveFn=a,N.doneFn=c,t(e,r,n)):"pan"===i?(N.moveFn=f,N.doneFn=d,h(),p()):"select"!==i&&"lasso"!==i||v(e,r,n,N,i)}};R.onmousemove=function(t){b.hover(j,t,O.id),j._fullLayout._lasthover=R,j._fullLayout._hoversubplot=O.id},R.onmouseout=function(t){j._dragging||m.unhover(j,t)},R.onclick=function(t){b.click(j,t)},m.init(N)}},{"../../components/color":575,"../../components/dragelement":596,"../../components/drawing":598,"../../components/titles":651,"../../lib":680,"../../lib/extend":672,"../../plotly":714,"../cartesian/axes":719,"../cartesian/constants":724,"../cartesian/graph_interact":726,"../cartesian/select":732,"../cartesian/set_convert":733,"../plots":778,d3:104,tinycolor2:511}],793:[function(t,e,r){"use strict";function n(t){if(t.layoutAttributes){var e=t.layoutAttributes._arrayAttrRegexps;if(e)for(var n=0;n-1}var a=t("../lib"),o=t("../plots/plots"),s=a.extendFlat,l=a.extendDeep;e.exports=function(t,e){t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var r,a=t.data,u=t.layout,c=l([],a),h=l({},u,n(e.tileClass));if(e.width&&(h.width=e.width),e.height&&(h.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){h.annotations=[];var f=Object.keys(h);for(r=0;r0&&k>0,N=M<=R&&k<=j,B=M<=j&&k<=R,U="h"===v?R>=M*(j/k):j>=k*(R/M);F&&(N||B||U)?b="inside":(b="outside",x.remove(),x=null)}else b="inside";if(!x&&(x=m(e,y,"outside"===b?E:S),_=A.bBox(x.node()),M=_.width,k=_.height,M<=0||k<=0))return void x.remove();var V;V="outside"===b?a(o,f,d,p,_,v):i(o,f,d,p,_,v),x.attr("transform",V)}}}function i(t,e,r,n,i,a){var s,l,u,c,h,f=i.width,d=i.height,p=(i.left+i.right)/2,m=(i.top+i.bottom)/2,g=Math.abs(e-t),v=Math.abs(n-r);g>2*z&&v>2*z?(h=z,g-=2*h,v-=2*h):h=0;var y,b;return f<=g&&d<=v?(y=!1,b=1):f<=v&&d<=g?(y=!0,b=1):fr?(u=(t+e)/2,c=n-h-l/2):(u=(t+e)/2,c=n+h+l/2),o(p,m,u,c,b,y)}function a(t,e,r,n,i,a){var s,l="h"===a?Math.abs(n-r):Math.abs(e-t);l>2*z&&(s=z,l-=2*s);var u,c,h,f,d="h"===a?Math.min(1,l/i.height):Math.min(1,l/i.width),p=(i.left+i.right)/2,m=(i.top+i.bottom)/2;return u=d*i.width,c=d*i.height,"h"===a?er?(h=(t+e)/2,f=n+s+c/2):(h=(t+e)/2,f=n-s-c/2),o(p,m,h,f,d,!1)}function o(t,e,r,n,i,a){var o,s;return i<1?o="scale("+i+") ":(i=1,o=""),s=a?"rotate("+a+" "+t+" "+e+") ":"","translate("+(r-i*t)+" "+(n-i*e)+")"+o+s}function s(t,e){var r=d(t.text,e);return p(S,r)}function l(t,e){var r=d(t.textposition,e);return m(E,r)}function u(t,e,r){return f(L,t.textfont,e,r)}function c(t,e,r){return f(C,t.insidetextfont,e,r)}function h(t,e,r){return f(D,t.outsidetextfont,e,r)}function f(t,e,r,n){e=e||{};var i=d(e.family,r),a=d(e.size,r),o=d(e.color,r);return{family:p(t.family,i,n.family),size:g(t.size,a,n.size),color:v(t.color,o,n.color)}}function d(t,e){var r;return Array.isArray(t)?ei))return e}return void 0!==r?r:t.dflt}function v(t,e,r){return x(e).isValid()?e:void 0!==r?r:t.dflt}var y=t("d3"),b=t("fast-isnumeric"),x=t("tinycolor2"),_=t("../../lib"),w=t("../../lib/svg_text_utils"),M=t("../../components/color"),A=t("../../components/drawing"),k=t("../../components/errorbars"),T=t("./attributes"),S=T.text,E=T.textposition,L=T.textfont,C=T.insidetextfont,D=T.outsidetextfont,z=3;e.exports=function(t,e,r){var i=e.xaxis,a=e.yaxis,o=t._fullLayout,s=e.plot.select(".barlayer").selectAll("g.trace.bars").data(r);s.enter().append("g").attr("class","trace bars"),s.append("g").attr("class","points").each(function(e){var r=e[0].t,s=e[0].trace,l=r.poffset,u=Array.isArray(l),c=r.barwidth,h=Array.isArray(c);y.select(this).selectAll("g.point").data(_.identity).enter().append("g").classed("point",!0).each(function(r,f){function d(t){return 0===o.bargap&&0===o.bargroupgap?y.round(Math.round(t)-S,2):t}function p(t,e){return Math.abs(t-e)>=2?d(t):t>e?Math.ceil(t):Math.floor(t)}var m,g,v,x,_=r.p+(u?l[f]:l),w=_+(h?c[f]:c),A=r.b,k=A+r.s;if("h"===s.orientation?(v=a.c2p(_,!0),x=a.c2p(w,!0),m=i.c2p(A,!0),g=i.c2p(k,!0)):(m=i.c2p(_,!0),g=i.c2p(w,!0),v=a.c2p(A,!0),x=a.c2p(k,!0)),!(b(m)&&b(g)&&b(v)&&b(x)&&m!==g&&v!==x))return void y.select(this).remove();var T=(r.mlw+1||s.marker.line.width+1||(r.trace?r.trace.marker.line.width:0)+1)-1,S=y.round(T/2%1,2);if(!t._context.staticPlot){var E=M.opacity(r.mc||s.marker.color),L=E<1||T>.01?d:p;m=L(m,g),g=L(g,m),v=L(v,x),x=L(x,v)}var C=y.select(this);C.append("path").attr("d","M"+m+","+v+"V"+x+"H"+g+"V"+v+"Z"),n(t,C,e,f,m,g,v,x)})}),s.call(k.plot,e)}},{"../../components/color":575,"../../components/drawing":598,"../../components/errorbars":604,"../../lib":680,"../../lib/svg_text_utils":699,"./attributes":803,d3:104,"fast-isnumeric":113,tinycolor2:511}],811:[function(t,e,r){"use strict";function n(t,e,r,n){if(n.length){var s,l,u,c,h,f=t._fullLayout.barmode,d="overlay"===f,p="group"===f;if(d)i(t,e,r,n);else if(p){for(s=[],l=[],u=0;uu+s||!y(l))&&(h=!0,f(c,t))}for(var i=r.traces,a=v(e),o="fraction"===t._fullLayout.barnorm?1:100,s=o/1e9,l=e.l2c(e.c2l(0)),u="stack"===t._fullLayout.barmode?o:l,c=[l,u],h=!1,d=0;d1||0===s.bargap&&0===s.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(t){var e=t[0].trace,r=e.marker,o=r.line,s=a.tryColorscale(r,""),l=a.tryColorscale(r,"line");n.select(this).selectAll("path").each(function(t){var e,a,u=(t.mlw+1||o.width+1)-1,c=n.select(this);e="mc"in t?t.mcc=s(t.mc):Array.isArray(r.color)?i.defaultLine:r.color,c.style("stroke-width",u+"px").call(i.fill,e),u&&(a="mlc"in t?t.mlcc=l(t.mlc):Array.isArray(o.color)?i.defaultLine:o.color,c.call(i.stroke,a))})}),e.call(o.style)}},{"../../components/color":575,"../../components/drawing":598,"../../components/errorbars":604,d3:104}],814:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),i(t,"marker")&&a(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width")}},{"../../components/color":575,"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588}],815:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../components/color/attributes"),a=t("../../lib/extend").extendFlat,o=n.marker,s=o.line;e.exports={y:{valType:"data_array"},x:{valType:"data_array"},x0:{valType:"any"},y0:{valType:"any"},xcalendar:n.xcalendar,ycalendar:n.ycalendar,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1},jitter:{valType:"number",min:0,max:1},pointpos:{valType:"number",min:-2,max:2},orientation:{valType:"enumerated",values:["v","h"]},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)"},symbol:a({},o.symbol,{arrayOk:!1}),opacity:a({},o.opacity,{arrayOk:!1,dflt:1}),size:a({},o.size,{arrayOk:!1}),color:a({},o.color,{arrayOk:!1}),line:{color:a({},s.color,{arrayOk:!1,dflt:i.defaultLine}),width:a({},s.width,{arrayOk:!1,dflt:0}),outliercolor:{valType:"color"},outlierwidth:{valType:"number",min:0,dflt:1}}},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2}},fillcolor:n.fillcolor}},{"../../components/color/attributes":574,"../../lib/extend":672,"../scatter/attributes":924}],816:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/cartesian/axes");e.exports=function(t,e){var r,o,s,l,u,c,h,f,d,p=a.getFromId(t,e.xaxis||"x"),m=a.getFromId(t,e.yaxis||"y"),g=e.orientation,v=[];"h"===g?(r=p,o="x",u=m,c="y"):(r=m,o="y",u=p,c="x"),s=r.makeCalcdata(e,o),a.expand(r,s,{padded:!0}),h=function(t,e,r,a,o){var s;return r in e?h=a.makeCalcdata(e,r):(s=r+"0"in e?e[r+"0"]:"name"in e&&("category"===a.type||n(e.name)&&["linear","log"].indexOf(a.type)!==-1||i.isDateTime(e.name)&&"date"===a.type)?e.name:t.numboxes,s=a.d2c(s,0,e[r+"calendar"]),h=o.map(function(){return s})),h}(t,e,c,u,s);var y=i.distinctVals(h);return f=y.vals,d=y.minDiff/2,l=function(t,e,r,a,o){var s,l,u,c,h=a.length,f=e.length,d=[],p=[];for(s=0;s=0&&u1,m=r.dPos*(1-c.boxgap)*(1-c.boxgroupgap)/(p?t.numboxes:1),g=p?2*r.dPos*(-.5+(r.boxnum+.5)/t.numboxes)*(1-c.boxgap):0,v=m*d.whiskerwidth;if(d.visible!==!0||r.emptybox)return void a.select(this).remove();"h"===d.orientation?(l=f,u=h):(l=h,u=f),r.bPos=g,r.bdPos=m,n(),a.select(this).selectAll("path.box").data(o.identity).enter().append("path").attr("class","box").each(function(t){var e=l.c2p(t.pos+g,!0),r=l.c2p(t.pos+g-m,!0),n=l.c2p(t.pos+g+m,!0),i=l.c2p(t.pos+g-v,!0),s=l.c2p(t.pos+g+v,!0),c=u.c2p(t.q1,!0),h=u.c2p(t.q3,!0),f=o.constrain(u.c2p(t.med,!0),Math.min(c,h)+1,Math.max(c,h)-1),p=u.c2p(d.boxpoints===!1?t.min:t.lf,!0),y=u.c2p(d.boxpoints===!1?t.max:t.uf,!0);"h"===d.orientation?a.select(this).attr("d","M"+f+","+r+"V"+n+"M"+c+","+r+"V"+n+"H"+h+"V"+r+"ZM"+c+","+e+"H"+p+"M"+h+","+e+"H"+y+(0===d.whiskerwidth?"":"M"+p+","+i+"V"+s+"M"+y+","+i+"V"+s)):a.select(this).attr("d","M"+r+","+f+"H"+n+"M"+r+","+c+"H"+n+"V"+h+"H"+r+"ZM"+e+","+c+"V"+p+"M"+e+","+h+"V"+y+(0===d.whiskerwidth?"":"M"+i+","+p+"H"+s+"M"+i+","+y+"H"+s))}),d.boxpoints&&a.select(this).selectAll("g.points").data(function(t){return t.forEach(function(t){t.t=r,t.trace=d}),t}).enter().append("g").attr("class","points").selectAll("path").data(function(t){var e,r,n,a,s,l,u,c="all"===d.boxpoints?t.val:t.val.filter(function(e){return et.uf}),h=Math.max((t.max-t.min)/10,t.q3-t.q1),f=1e-9*h,p=.01*h,v=[],y=0;if(d.jitter){if(0===h)for(y=1,v=new Array(c.length),e=0;et.lo&&(n.so=!0),n})}).enter().append("path").call(s.translatePoints,h,f),d.boxmean&&a.select(this).selectAll("path.mean").data(o.identity).enter().append("path").attr("class","mean").style("fill","none").each(function(t){var e=l.c2p(t.pos+g,!0),r=l.c2p(t.pos+g-m,!0),n=l.c2p(t.pos+g+m,!0),i=u.c2p(t.mean,!0),o=u.c2p(t.mean-t.sd,!0),s=u.c2p(t.mean+t.sd,!0);"h"===d.orientation?a.select(this).attr("d","M"+i+","+r+"V"+n+("sd"!==d.boxmean?"":"m0,0L"+o+","+e+"L"+i+","+r+"L"+s+","+e+"Z")):a.select(this).attr("d","M"+r+","+i+"H"+n+("sd"!==d.boxmean?"":"m0,0L"+e+","+o+"L"+r+","+i+"L"+e+","+s+"Z"))})})}},{"../../components/drawing":598,"../../lib":680,d3:104}],823:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/cartesian/axes"),a=t("../../lib");e.exports=function(t,e){var r,o,s,l,u=t._fullLayout,c=e.xaxis,h=e.yaxis,f=["v","h"];for(o=0;ol&&(e.z=c.slice(0,l)),s("locationmode"),s("text"),s("marker.line.color"),s("marker.line.width"),i(t,e,o,s,{prefix:"",cLetter:"z"}),s("hoverinfo",1===o._dataLength?"location+z+text":void 0)}},{"../../components/colorscale/defaults":584,"../../lib":680,"./attributes":829}],832:[function(t,e,r){"use strict";e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],833:[function(t,e,r){"use strict";function n(t,e,r,n){var o=e.hoverinfo,s="all"===o?a.hoverinfo.flags:o.split("+"),l=s.indexOf("name")!==-1,u=s.indexOf("location")!==-1,c=s.indexOf("z")!==-1,h=s.indexOf("text")!==-1,f=!l&&u,d=[];f?t.nameOverride=r.id:(l&&(t.nameOverride=e.name),u&&d.push(r.id)),c&&d.push(function(t){return i.tickText(n,n.c2l(t),"hover").text}(r.z)),h&&d.push(r.tx),t.extraText=d.join("
")}var i=t("../../plots/cartesian/axes"),a=t("./attributes");e.exports=function(t){var e=t.cd,r=e[0].trace,i=t.subplot,a=i.choroplethHoverPt;if(a){var o=i.projection(a.properties.ct);return t.x0=t.x1=o[0],t.y0=t.y1=o[1],t.index=a.index,t.location=a.id,t.z=a.z,n(t,r,a,i.mockAxis),[t]}}},{"../../plots/cartesian/axes":719,"./attributes":829}],834:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"), +n.colorbar=t("../heatmap/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="choropleth",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","noOpacity"],n.meta={},e.exports=n},{"../../plots/geo":743,"../heatmap/colorbar":854,"./attributes":829,"./calc":830,"./defaults":831,"./event_data":832,"./hover":833,"./plot":835}],835:[function(t,e,r){"use strict";function n(t,e){for(var r,n=[],i=t.locations,a=i.length,o=u(t,e),s=(t.marker||{}).line||{},l=0;l0&&(n[0].trace=t),n}function i(t){t.framework.selectAll("g.trace.choropleth").each(function(t){var e=t[0].trace,r=a.select(this),n=e.marker||{},i=n.line||{},u=l.makeColorScaleFunc(l.extractScale(e.colorscale,e.zmin,e.zmax));r.selectAll("path.choroplethlocation").each(function(t){a.select(this).attr("fill",function(t){return u(t.z)}).call(o.stroke,t.mlc||i.color).call(s.dashLine,"",t.mlw||i.width||0)})})}var a=t("d3"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("../../components/colorscale"),u=t("../../lib/topojson_utils").getTopojsonFeatures,c=t("../../lib/geo_location_utils").locationToFeature,h=t("../../lib/array_to_calc_item"),f=t("../../plots/geo/constants");e.exports=function(t,e,r){function o(t){return t[0].trace.uid}var s,l=t.framework,u=l.select("g.choroplethlayer"),c=l.select("g.baselayer"),h=l.select("g.baselayeroverchoropleth"),d=f.baseLayersOverChoropleth,p=u.selectAll("g.trace.choropleth").data(e,o);p.enter().append("g").attr("class","trace choropleth"),p.exit().remove(),p.each(function(e){var r=e[0].trace,i=n(r,t.topojson),o=a.select(this).selectAll("path.choroplethlocation").data(i);o.enter().append("path").classed("choroplethlocation",!0).on("mouseover",function(e){t.choroplethHoverPt=e}).on("mouseout",function(){t.choroplethHoverPt=null}),o.exit().remove()}),h.selectAll("*").remove();for(var m=0;ms.end&&(s.start=s.end=(s.start+s.end)/2),e._input.contours||(e._input.contours={}),a(e._input.contours,{start:s.start,end:s.end,size:s.size}),e._input.autocontour=!0}else{var u=s.start,c=s.end,h=e._input.contours;if(u>c&&(s.start=h.start=c,c=s.end=h.end=u,u=s.start),!(s.size>0)){var f;f=u===c?1:n(u,c,e.ncontours).dtick,h.size=s.size=f}}return r}},{"../../lib":680,"../../plots/cartesian/axes":719,"../heatmap/calc":852}],838:[function(t,e,r){"use strict";var n=t("../../plots/plots"),i=t("../../components/colorbar/draw"),a=t("./make_color_map"),o=t("./end_plus");e.exports=function(t,e){var r=e[0].trace,s="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+s).remove(),r.showscale===!1)return void n.autoMargin(t,s);var l=i(t,s);e[0].t.cb=l;var u=r.contours,c=r.line,h=u.size||1,f=u.coloring,d=a(r,{isColorbar:!0});"heatmap"===f&&l.filllevels({start:r.zmin,end:r.zmax,size:(r.zmax-r.zmin)/254}),l.fillcolor("fill"===f||"heatmap"===f?d:"").line({color:"lines"===f?d:c.color,width:u.showlines!==!1?c.width:0,dash:c.dash}).levels({start:u.start,end:o(u),size:h}).options(r.colorbar)()}},{"../../components/colorbar/draw":578,"../../plots/plots":778,"./end_plus":842,"./make_color_map":846}],839:[function(t,e,r){"use strict";e.exports.BOTTOMSTART=[1,9,13,104,713],e.exports.TOPSTART=[4,6,7,104,713],e.exports.LEFTSTART=[8,12,14,208,1114],e.exports.RIGHTSTART=[2,3,11,208,1114],e.exports.NEWDELTA=[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],e.exports.CHOOSESADDLE={104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},e.exports.SADDLEREMAINDER={1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11}},{}],840:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){var a,o=n.coerce2(t,e,i,"contours.start"),s=n.coerce2(t,e,i,"contours.end"),l=o===!1||s===!1,u=r("contours.size");!(a=l?e.autocontour=!0:r("autocontour",!1))&&u||r("ncontours")}},{"../../lib":680,"./attributes":836}],841:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../heatmap/has_columns"),a=t("../heatmap/xyz_defaults"),o=t("./contours_defaults"),s=t("./style_defaults"),l=t("./attributes");e.exports=function(t,e,r,u){function c(r,i){return n.coerce(t,e,l,r,i)}if(!a(t,e,c,u))return void(e.visible=!1);c("text"),c("connectgaps",i(e)),o(t,e,c),s(t,e,c,u)}},{"../../lib":680,"../heatmap/has_columns":858,"../heatmap/xyz_defaults":866,"./attributes":836,"./contours_defaults":840,"./style_defaults":850}],842:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],843:[function(t,e,r){"use strict";function n(t,e){return Math.abs(t[0]-e[0])<.01&&Math.abs(t[1]-e[1])<.01}function i(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}function a(t,e,r){function a(t){return m[t%m.length]}var c,h=e.join(","),f=h,d=t.crossings[f],p=o(d,r,e),m=[s(t,e,[-p[0],-p[1]])],g=p.join(","),v=t.z.length,y=t.z[0].length;for(c=0;c<1e4;c++){if(d>20?(d=u.CHOOSESADDLE[d][(p[0]||p[1])<0?0:1],t.crossings[f]=u.SADDLEREMAINDER[d]):delete t.crossings[f],!(p=u.NEWDELTA[d])){l.log("Found bad marching index:",d,e,t.level);break}m.push(s(t,e,p)),e[0]+=p[0],e[1]+=p[1],n(m[m.length-1],m[m.length-2])&&m.pop(),f=e.join(",");var b=p[0]&&(e[0]<0||e[0]>y-2)||p[1]&&(e[1]<0||e[1]>v-2);if(f===h&&p.join(",")===g||r&&b)break;d=t.crossings[f]}1e4===c&&l.log("Infinite loop in contour?");var x,_,w,M,A,k,T,S=n(m[0],m[m.length-1]),E=0,L=.2*t.smoothing,C=[],D=0;for(c=1;c=D;c--)if((x=C[c])=D&&x+C[_]20&&e?208===t||1114===t?n=0===r[0]?1:-1:i=0===r[1]?1:-1:u.BOTTOMSTART.indexOf(t)!==-1?i=1:u.LEFTSTART.indexOf(t)!==-1?n=1:u.TOPSTART.indexOf(t)!==-1?i=-1:n=-1,[n,i]}function s(t,e,r){var n=e[0]+Math.max(r[0],0),i=e[1]+Math.max(r[1],0),a=t.z[i][n],o=t.xaxis,s=t.yaxis;if(r[1]){var l=(t.level-a)/(t.z[i][n+1]-a);return[o.c2p((1-l)*t.x[n]+l*t.x[n+1],!0),s.c2p(t.y[i],!0)]}var u=(t.level-a)/(t.z[i+1][n]-a);return[o.c2p(t.x[n],!0),s.c2p((1-u)*t.y[i]+u*t.y[i+1],!0)]}var l=t("../../lib"),u=t("./constants");e.exports=function(t){var e,r,n,i,o;for(n=0;nt?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);if(5===r||10===r){return t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208}return 15===r?0:r}var i=t("./constants");e.exports=function(t){var e,r,a,o,s,l,u,c,h,f=t[0].z,d=f.length,p=f[0].length,m=2===d||2===p;for(r=0;r1e3){d.warn("Too many contours, clipping at 1000",t);break}return i}function a(t,e,r){var n=t.plot.select(".maplayer").selectAll("g.contour."+r).data(e);return n.enter().append("g").classed("contour",!0).classed(r,!0),n.exit().remove(),n}function o(t,e,r){var n=t.selectAll("g.contourbg").data([0]);n.enter().append("g").classed("contourbg",!0);var i=n.selectAll("path").data("fill"===r.coloring?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+e.join("L")+"Z").style("stroke","none")}function s(t,e,r,n){var i=t.selectAll("g.contourfill").data([0]);i.enter().append("g").classed("contourfill",!0);var a=i.selectAll("path").data("fill"===n.coloring?e:[]);a.enter().append("path"),a.exit().remove(),a.each(function(t){var e=l(t,r);e?f.select(this).attr("d",e).style("stroke","none"):f.select(this).remove()})}function l(t,e){function r(t){return Math.abs(t[0]-e[2][0])<.01}for(var n,i,a,o,s,l,u=Math.min(t.z[0][0],t.z[0][1]),c=t.edgepaths.length||u<=t.level?"":"M"+e.join("L")+"Z",h=0,f=t.edgepaths.map(function(t,e){return e}),m=!0;f.length;){for(l=p.smoothopen(t.edgepaths[h],t.smoothing),c+=m?l:l.replace(/^M/,"L"),f.splice(f.indexOf(h),1),n=t.edgepaths[h][t.edgepaths[h].length-1],o=-1,a=0;a<4;a++){if(!n){d.log("Missing end?",h,t);break}for(!function(t){return Math.abs(t[1]-e[0][1])<.01}(n)||r(n)?!function(t){return Math.abs(t[0]-e[0][0])<.01}(n)?!function(t){return Math.abs(t[1]-e[2][1])<.01}(n)?r(n)&&(i=e[2]):i=e[3]:i=e[0]:i=e[1],s=0;s=0&&(i=g,o=s):Math.abs(n[1]-i[1])<.01?Math.abs(n[1]-g[1])<.01&&(g[0]-n[0])*(i[0]-g[0])>=0&&(i=g,o=s):d.log("endpt to newendpt is not vert. or horz.",n,i,g)}if(n=i,o>=0)break;c+="L"+i}if(o===t.edgepaths.length){d.log("unclosed perimeter path");break}h=o,m=f.indexOf(h)===-1,m&&(h=f[0],c+="Z")}for(h=0;hD){r("x scale is not linear");break}}if(y.length&&"fast"===E){var z=(y[y.length-1]-y[0])/(y.length-1),I=Math.abs(z/100);for(w=0;wI){r("y scale is not linear");break}}}var P=c(_),O="scaled"===e.xtype?"":m,R=p(e,O,g,v,P,M),j="scaled"===e.ytype?"":y,F=p(e,j,b,x,_.length,A);S||(a.expand(M,R),a.expand(A,F));var N={x:R,y:F,z:_,text:e.text};if(s(e,_,"","z"),k&&e.contours&&"heatmap"===e.contours.coloring){var B={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};N.xfill=p(B,O,g,v,P,M),N.yfill=p(B,j,b,x,_.length,A)}return[N]}},{"../../components/colorscale/calc":581,"../../lib":680,"../../plots/cartesian/axes":719,"../../registry":793,"../histogram2d/calc":880,"./clean_2d_array":853,"./convert_column_xyz":855,"./find_empties":857,"./has_columns":858,"./interp2d":861,"./make_bound_array":862,"./max_row_length":863}],853:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){var r,i,a,o,s,l;if(e){for(r=0,s=0;s=0;o--)a=f[o],r=a[0],i=a[1],(s=((h[[r-1,i]]||m)[2]+(h[[r+1,i]]||m)[2]+(h[[r,i-1]]||m)[2]+(h[[r,i+1]]||m)[2])/20)&&(l[a]=[r,i,s],f.splice(o,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(a in l)h[a]=l[a],c.push(l[a])}return c.sort(function(t,e){return e[2]-t[2]})}},{"./max_row_length":863}],858:[function(t,e,r){"use strict";e.exports=function(t){return!Array.isArray(t.z[0])}},{}],859:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/graph_interact"),i=t("../../lib"),a=t("../../plots/cartesian/constants").MAXDIST;e.exports=function(t,e,r,o,s){if(!(t.distance=y[0].length||h<0||h>y.length)return}else{if(n.inbox(e-g[0],e-g[g.length-1])>a||n.inbox(r-v[0],r-v[v.length-1])>a)return;if(s){var w;for(x=[2*g[0]-g[1]],w=1;wm&&(v=Math.max(v,Math.abs(t[i][a]-p)/(g-m))))}return v}var a=t("../../lib"),o=[[-1,0],[1,0],[0,-1],[0,1]];e.exports=function(t,e,r){var o,s,l=1;if(Array.isArray(r))for(o=0;o.01;o++)l=i(t,e,n(l));return l>.01&&a.log("interp2d didn't converge quickly",l),t}},{"../../lib":680}],862:[function(t,e,r){"use strict";var n=t("../../registry");e.exports=function(t,e,r,i,a,o){var s,l,u,c=[],h=n.traceIs(t,"contour"),f=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(Array.isArray(e)&&e.length>1&&!f&&"category"!==o.type){var p=e.length;if(!(p<=a))return h?e.slice(0,a):e.slice(0,a+1);if(h||d)c=e.slice(0,a);else if(1===a)c=[e[0]-.5,e[0]+.5];else{for(c=[1.5*e[0]-.5*e[1]],u=1;u0;)b=p.c2p(k[M]),M--;for(b0;)w=m.c2p(T[M]),M--;if(w<_&&(x=_,_=w,w=x,z=!0),S&&(k=r[0].xfill,T=r[0].yfill),"fast"!==E){var I="best"===E?0:.5;y=Math.max(-I*p._length,y),b=Math.min((1+I)*p._length,b),_=Math.max(-I*m._length,_),w=Math.min((1+I)*m._length,w)}var P=Math.round(b-y),O=Math.round(w-_),R=P<=0||O<=0,j=e.plot.select(".imagelayer").selectAll("g.hm."+v).data(R?[]:[0]);if(j.enter().append("g").classed("hm",!0).classed(v,!0),j.exit().remove(),!R){var F,N;"fast"===E?(F=C,N=L):(F=P,N=O);var B=document.createElement("canvas");B.width=F,B.height=N;var U,V,H=B.getContext("2d"),q=s.makeColorScaleFunc(s.extractScale(f.colorscale,f.zmin,f.zmax),{noNumericCheck:!0,returnArray:!0});"fast"===E?(U=D?function(t){return C-1-t}:o.identity,V=z?function(t){return L-1-t}:o.identity):(U=function(t){return o.constrain(Math.round(p.c2p(k[t])-y),0,P)},V=function(t){return o.constrain(Math.round(m.c2p(T[t])-_),0,O)});var G,Y,W,X,Z,J,K,Q=V(0),$=[Q,Q],tt=D?0:1,et=z?0:1,rt=0,nt=0,it=0,at=0;if(E){var ot,st=0;try{ot=new Uint8Array(P*O*4)}catch(t){ot=new Array(P*O*4)}if("best"===E){var lt,ut,ct,ht=new Array(k.length),ft=new Array(T.length),dt=new Array(P);for(M=0;M0&&a0&&s0&&(n=!0);for(var s=0;sa){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]=0;a--)i(a);else if("increasing"===e){for(a=1;a=0;a--)t[a]+=t[a+1];"exclude"===r&&(t.push(0),t.shift())}}var i=t("fast-isnumeric"),a=t("../../lib"),o=t("../../plots/cartesian/axes"),s=t("../bar/arrays_to_calcdata"),l=t("./bin_functions"),u=t("./norm_functions"),c=t("./average"),h=t("./clean_bins");e.exports=function(t,e){if(e.visible===!0){var r,f=[],d=[],p=o.getFromId(t,"h"===e.orientation?e.yaxis||"y":e.xaxis||"x"),m="h"===e.orientation?"y":"x",g={x:"y",y:"x"}[m],v=e[m+"calendar"],y=e.cumulative;h(e,p,m);var b,x=p.makeCalcdata(e,m),_=m+"bins";e["autobin"+m]===!1&&_ in e?b=e[_]:(b=o.autoBin(x,p,e["nbins"+m],!1,v),y.enabled&&"include"!==y.currentbin&&("decreasing"===y.direction?b.start=p.c2r(p.r2c(b.start)-b.size):b.end=p.c2r(p.r2c(b.end)+b.size)),e._input[_]=e[_]=b);var w,M,A,k="string"==typeof b.size,T=k?[]:b,S=[],E=[],L=0,C=e.histnorm,D=e.histfunc,z=C.indexOf("density")!==-1;y.enabled&&z&&(C=C.replace(/ ?density$/,""),z=!1);var I,P="max"===D||"min"===D,O=P?null:0,R=l.count,j=u[C],F=!1,N=function(t){return p.r2c(t,0,v)};for(Array.isArray(e[g])&&"count"!==D&&(I=e[g],F="avg"===D,R=l[D]),r=N(b.start),M=N(b.end)+(r-o.tickIncrement(r,b.size,!1,v))/1e6;r=0&&AH;r--)if(d[r]){q=r;break}for(r=H;r<=q;r++)i(f[r])&&i(d[r])&&V.push({p:f[r],s:d[r],b:0});return s(V,e),V}}},{"../../lib":680,"../../plots/cartesian/axes":719,"../bar/arrays_to_calcdata":802,"./average":871,"./bin_functions":873,"./clean_bins":875,"./norm_functions":878,"fast-isnumeric":113}],875:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib").cleanDate,a=t("../../constants/numerical"),o=a.ONEDAY,s=a.BADNUM;e.exports=function(t,e,r){var a=e.type,l=r+"bins",u=t[l];u||(u=t[l]={});var c="date"===a?function(t){return t||0===t?i(t,s,u.calendar):null}:function(t){return n(t)?Number(t):null};u.start=c(u.start),u.end=c(u.end);var h="date"===a?o:1,f=u.size;if(n(f))u.size=f>0?Number(f):h;else if("string"!=typeof f)u.size=h;else{var d=f.charAt(0),p=f.substr(1);p=n(p)?Number(p):0,(p<=0||"date"!==a||"M"!==d||p!==Math.round(p))&&(u.size=h)}var m="autobin"+r;"boolean"!=typeof t[m]&&(t[m]=!((u.start||0===u.start)&&(u.end||0===u.end))),t[m]||delete t["nbins"+r]}},{"../../constants/numerical":662,"../../lib":680,"fast-isnumeric":113}],876:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../components/color"),o=t("./bin_defaults"),s=t("../bar/style_defaults"),l=t("../../components/errorbars/defaults"),u=t("./attributes");e.exports=function(t,e,r,c){function h(r,n){return i.coerce(t,e,u,r,n)}var f=h("x"),d=h("y");h("cumulative.enabled")&&(h("cumulative.direction"),h("cumulative.currentbin")),h("text");var p=h("orientation",d&&!f?"h":"v"),m=e["v"===p?"x":"y"];if(!m||!m.length)return void(e.visible=!1);n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],c),e["h"===p?"x":"y"]&&h("histfunc"),o(t,e,h,"h"===p?["y"]:["x"]),s(t,e,h,r,c),l(t,e,a.defaultLine,{axis:"y"}),l(t,e,a.defaultLine,{axis:"x",inherit:"y"})}},{"../../components/color":575,"../../components/errorbars/defaults":603,"../../lib":680,"../../registry":793,"../bar/style_defaults":814,"./attributes":870,"./bin_defaults":872}],877:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.layoutAttributes=t("../bar/layout_attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("../bar/layout_defaults"),n.calc=t("./calc"),n.setPositions=t("../bar/set_positions"),n.plot=t("../bar/plot"),n.style=t("../bar/style"),n.colorbar=t("../scatter/colorbar"),n.hoverPoints=t("../bar/hover"),n.moduleType="trace",n.name="histogram",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","bar","histogram","oriented","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":727,"../bar/hover":806,"../bar/layout_attributes":808,"../bar/layout_defaults":809,"../bar/plot":810,"../bar/set_positions":811,"../bar/style":813,"../scatter/colorbar":927,"./attributes":870,"./calc":874,"./defaults":876}],878:[function(t,e,r){"use strict";e.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;iA&&m.splice(A,m.length-A),v.length>A&&v.splice(A,v.length-A),!e.autobinx&&"xbins"in e||(e.xbins=i.autoBin(m,p,e.nbinsx,"2d",y),"histogram2dcontour"===e.type&&(e.xbins.start=w(i.tickIncrement(x(e.xbins.start),e.xbins.size,!0,y)),e.xbins.end=w(i.tickIncrement(x(e.xbins.end),e.xbins.size,!1,y))),e._input.xbins=e.xbins),!e.autobiny&&"ybins"in e||(e.ybins=i.autoBin(v,g,e.nbinsy,"2d",b),"histogram2dcontour"===e.type&&(e.ybins.start=M(i.tickIncrement(_(e.ybins.start),e.ybins.size,!0,b)),e.ybins.end=M(i.tickIncrement(_(e.ybins.end),e.ybins.size,!1,b))),e._input.ybins=e.ybins),f=[];var k,T,S=[],E=[],L="string"==typeof e.xbins.size,C="string"==typeof e.ybins.size,D=L?[]:e.xbins,z=C?[]:e.ybins,I=0,P=[],O=e.histnorm,R=e.histfunc,j=O.indexOf("density")!==-1,F="max"===R||"min"===R,N=F?null:0,B=a.count,U=o[O],V=!1,H=[],q=[],G="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";G&&"count"!==R&&(V="avg"===R,B=a[R]);var Y=e.xbins,W=x(Y.start),X=x(Y.end)+(W-i.tickIncrement(W,Y.size,!1,y))/1e6;for(d=W;d=0&&k=0&&T0)s=h(t.alphahull,l);else{var u=["x","y","z"].indexOf(t.delaunayaxis);s=c(l.map(function(t){return[t[(u+1)%3],t[(u+2)%3]]}))}var p={positions:l,cells:s,lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:d(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};t.intensity?(this.color="#fff",p.vertexIntensity=t.intensity,p.colormap=i(t.colorscale)):t.vertexcolor?(this.color=t.vertexcolors[0],p.vertexColors=a(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],p.cellColors=a(t.facecolor)):(this.color=t.color,p.meshColor=d(t.color)),this.mesh.update(p)},p.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=s},{"../../lib/str2rgbarray":698,"alpha-shape":35,"convex-hull":93,"delaunay-triangulate":105,"gl-mesh3d":186,tinycolor2:511}],889:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../components/colorbar/defaults"),o=t("./attributes");e.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function u(t){var e=t.map(function(t){var e=l(t);return e&&Array.isArray(e)?e:null});return e.every(function(t){return t&&t.length===e[0].length})&&e}var c=u(["x","y","z"]),h=u(["i","j","k"]);if(!c)return void(e.visible=!1);h&&h.forEach(function(t){for(var e=0;ee}}},r.addRangeSlider=function(t,e){for(var r=!1,n=0;n1)){var h=o.simpleMap(c.x,e.d2c,0,r.xcalendar),f=o.distinctVals(h).minDiff;a=Math.min(a,f)}}for(1/0===a&&(a=1),u=0;u");_.push(o,o,o,o,o,o,null)}(L,d[L],p[L],m[L],g[L]));e.x=b,e.y=x,e.text=_}},{"../../lib":680,"../../plots/cartesian/axes":719,"../../plots/cartesian/axis_ids":722,"./helpers":894}],898:[function(t,e,r){"use strict";var n=t("../../components/colorscale/color_attributes"),i=t("../../components/colorbar/attributes"),a=t("../../components/colorscale/scales"),o=t("../../plots/cartesian/layout_attributes"),s=t("../../lib/extend").extendDeep,l=t("../../lib/extend").extendFlat;e.exports={domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},dimensions:{_isLinkedToArray:"dimension",label:{valType:"string"},tickvals:o.tickvals,ticktext:o.ticktext,tickformat:{valType:"string",dflt:"3s"},visible:{valType:"boolean",dflt:!0},range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},constraintrange:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},values:{valType:"data_array",dflt:[]}},line:l({},s({},n("line"),{colorscale:s({},n("line").colorscale,{dflt:a.Viridis}),autocolorscale:s({},n("line").autocolorscale,{dflt:!1})}),{showscale:{valType:"boolean",dflt:!1},colorbar:i})}},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/colorscale/scales":593,"../../lib/extend":672,"../../plots/cartesian/layout_attributes":728}],899:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plots/plots"),a=t("./plot"),o=t("../../constants/xmlns_namespaces"),s=t("./constants");r.name="parcoords",r.attr="type",r.plot=function(t){var e=i.getSubplotCalcData(t.calcdata,"parcoords","parcoords");e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords-line-layers").remove(),n._paperdiv.selectAll(".parcoords-line-layers").remove(),n._paperdiv.selectAll(".parcoords").remove(),n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){function e(e){var n=this,i=n.toDataURL("image/png"),a=r.append("svg:image"),l=t._fullLayout._size,u=t._fullData[e.model.key].domain;a.attr({xmlns:o.svg,"xlink:href":i,x:l.l+l.w*u.x[0]-s.overdrag,y:l.t+l.h*(1-u.y[1]),width:(u.x[1]-u.x[0])*l.w+2*s.overdrag,height:(u.y[1]-u.y[0])*l.h,preserveAspectRatio:"none"})}var r=t._fullLayout._glimages,i=n.selectAll(".svg-container");i.filter(function(t,e){return e===i.size()-1}).selectAll(".parcoords-lines.context, .parcoords-lines.focus").each(e),window.setTimeout(function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":664,"../../plots/plots":778,"./constants":902,"./plot":907,d3:104}],900:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/calc"),a=t("../../lib");e.exports=function(t,e){var r=!!e.line.colorscale&&a.isArray(e.line.color),o=r?e.line.color:Array.apply(0,Array(e.dimensions.reduce(function(t,e){return Math.max(t,e.values.length)},0))).map(function(){return.5}),s=r?e.line.colorscale:[[0,e.line.color],[1,e.line.color]];return n(e,"line")&&i(e,e.line.color,"line","c"),[{lineColor:o,cscale:s}]}},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"../../lib":680}],901:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../components/colorscale"),s=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,l=r.line,u="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===l||!l.showscale)return void a.autoMargin(t,u);var c=l.color,h=l.cmin,f=l.cmax;n(h)||(h=i.aggNums(Math.min,null,c)),n(f)||(f=i.aggNums(Math.max,null,c));var d=e[0].t.cb=s(t,u),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,h,f),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:h,end:f,size:(f-h)/254}).options(l.colorbar)()}},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],902:[function(t,e,r){"use strict";e.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50, +canvasPixelRatio:1,blockLineCount:5e3,scatter:!1,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,capturewidth:10,fillcolor:"magenta",fillopacity:1,strokecolor:"white",strokeopacity:1,strokewidth:1,handleheight:16,handleopacity:1,handleoverlap:0}}},{}],903:[function(t,e,r){"use strict";function n(t,e,r,n,i){i("line.color",r),s(t,"line")&&a.isArray(t.line.color)?(i("line.colorscale"),l(t,e,n,i,{prefix:"line.",cLetter:"c"})):i("line.color",r)}function i(t,e){function r(t,e){return a.coerce(n,i,o.dimensions,t,e)}var n,i,s,l=t.dimensions||[],c=e.dimensions=[],h=1/0;for(l.length>u&&(a.log("parcoords traces support up to "+u+" dimensions at the moment"),l.splice(u)),s=0;s0);d&&(r("label"),r("tickvals"),r("ticktext"),r("tickformat"),r("range"),r("constraintrange"),h=Math.min(h,i.values.length)),i._index=s,c.push(i)}if(isFinite(h))for(s=0;sh&&(i.values=i.values.slice(0,h));return c}var a=t("../../lib"),o=t("./attributes"),s=t("../../components/colorscale/has_colorscale"),l=t("../../components/colorscale/defaults"),u=t("./constants").maxDimensionCount;e.exports=function(t,e,r,s){function l(r,n){return a.coerce(t,e,o,r,n)}var u=i(t,e);n(t,e,r,s,l),l("domain.x"),l("domain.y"),Array.isArray(u)&&u.length||(e.visible=!1)}},{"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588,"../../lib":680,"./attributes":898,"./constants":902}],904:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.calc=t("./calc"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.moduleType="trace",n.name="parcoords",n.basePlotModule=t("./base_plot"),n.categories=["gl","noOpacity"],n.meta={},e.exports=n},{"./attributes":898,"./base_plot":899,"./calc":900,"./colorbar":901,"./defaults":903,"./plot":907}],905:[function(t,e,r){"use strict";function n(t){t.read({x:0,y:0,width:1,height:1,data:x})}function i(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function a(t,e,r,a,o,s){function l(n){var c;c=Math.min(a,o-n*a),s.offset=v*n*a,s.count=v*c,0===n&&(window.cancelAnimationFrame(r.currentRafs[u]),delete r.currentRafs[u],i(t,s.scissorX,s.scissorY,s.scissorWidth,s.viewBoxSize[1])),r.clearOnly||(e(s),n*a+c>>8*e)%256/255}function u(t,e,r,n){for(var i=[],a=0;a=g-4?l(a,g-2-s):.5);return i}function c(t,e,r){var n,i,a,o=[];for(i=0;if&&(f=t[l].dim2.canvasX,c=l),t[l].dim1.canvasXi)return a;i=o,a=n[r]}return n[n.length-1]}function l(t,e,r){var n=o(r);return r.tickvals?_.scale.ordinal().domain(r.tickvals).range(r.tickvals.map(function(t){return(t-n[0])/(n[1]-n[0])}).map(function(r){return t-e+r*(e-(t-e))})):_.scale.linear().domain(n).range([t-e,e])}function u(t,e){return _.scale.linear().range([t-e,e])}function c(t){return _.scale.linear().domain(o(t))}function h(t){var e=o(t);return t.tickvals&&_.scale.ordinal().domain(t.tickvals).range(t.tickvals.map(function(t){return(t-e[0])/(e[1]-e[0])}))}function f(t){var e=t.map(function(t){return t[0]}),r=t.map(function(t){return t[1]}),n=r.map(function(t){return _.rgb(t)}),i=function(t){return function(e){return e[t]}},a="rgb".split("").map(function(t){return _.scale.linear().clamp(!0).domain(e).range(n.map(i(t)))});return function(t){return a.map(function(e){return e(t)})}}function d(t){return t[0]}function p(t,e,r){var n=d(e),i=n.trace,o=n.lineColor,s=n.cscale,l=i.line,u=i.domain,h=i.dimensions,p=t.width,m=x.extendDeep({},l,{color:o.map(c({values:o,range:[l.cmin,l.cmax]})),blockLineCount:b.blockLineCount,canvasOverdrag:b.overdrag*b.canvasPixelRatio}),g=Math.floor(p*(u.x[1]-u.x[0])),v=Math.floor(t.height*(u.y[1]-u.y[0])),y=t.margin||{l:80,r:80,t:100,b:80},_=g,w=v;return{key:r,colCount:h.filter(a).length,dimensions:h,tickDistance:b.tickDistance,unitToColor:f(s),lines:m,translateX:u.x[0]*p,translateY:t.height-u.y[1]*t.height,pad:y,canvasWidth:_*b.canvasPixelRatio+2*m.canvasOverdrag,canvasHeight:w*b.canvasPixelRatio,width:_,height:w,canvasPixelRatio:b.canvasPixelRatio}}function m(t){var e=t.width,r=t.height,n=t.dimensions,i=t.canvasPixelRatio,o=function(r){return e*r/Math.max(1,t.colCount-1)},s=b.verticalPadding/(r*i),f=1-2*s,d=function(t){return s+f*t},p={key:t.key,xScale:o,model:t},m={};return p.dimensions=n.filter(a).map(function(e,n){var a=c(e),s=m[e.label];return m[e.label]=(s||0)+1,{key:e.label+(s?"__"+s:""),label:e.label,tickFormat:e.tickformat,tickvals:e.tickvals,ticktext:e.ticktext,ordinal:!!e.tickvals,scatter:b.scatter||e.scatter,xIndex:n,crossfilterDimensionIndex:n,visibleIndex:e._index,height:r,values:e.values,paddedUnitValues:e.values.map(a).map(d),xScale:o,x:o(n),canvasX:o(n)*i,unitScale:u(r,b.verticalPadding),domainScale:l(r,b.verticalPadding,e),ordinalScale:h(e),domainToUnitScale:a,filter:e.constraintrange?e.constraintrange.map(a):[0,1],parent:p,model:t}}),p}function g(t){return b.layers.map(function(e){return{key:e,context:"contextLineLayer"===e,pick:"pickLineLayer"===e,viewModel:t,model:t.model}})}function v(t){t.classed("axisExtentText",!0).attr("text-anchor","middle").style("font-weight",100).style("font-size","10px").style("cursor","default").style("user-select","none")}var y=t("./lines"),b=t("./constants"),x=t("../../lib"),_=t("d3");e.exports=function(t,e,r,a,o){function l(t){var e=t.selectAll("defs").data(i,n);e.enter().append("defs");var r=e.selectAll("#filterBarPattern").data(i,n);r.enter().append("pattern").attr("id","filterBarPattern").attr("patternUnits","userSpaceOnUse"),r.attr("x",-b.bar.width).attr("width",b.bar.capturewidth).attr("height",function(t){return t.model.height});var a=r.selectAll("rect").data(i,n);a.enter().append("rect").attr("shape-rendering","crispEdges"),a.attr("height",function(t){return t.model.height}).attr("width",b.bar.width).attr("x",b.bar.width/2).attr("fill",b.bar.fillcolor).attr("fill-opacity",b.bar.fillopacity).attr("stroke",b.bar.strokecolor).attr("stroke-opacity",b.bar.strokeopacity).attr("stroke-width",b.bar.strokewidth)}function u(t){return t.dimensions.some(function(t){return 0!==t.filter[0]||1!==t.filter[1]})}function c(t,e){for(var r=e.panels||(e.panels=[]),n=t.each(function(t){return t})[e.key].map(function(t){return t.__data__}),i=n.length-1,a=0;a<1;a++)for(var o=0;o=r||s>=n)return;var l=t.lineLayer.readPixel(a,n-1-s),u=0!==l[3],c=u?l[2]+256*(l[1]+256*l[0]):null,h={x:a,y:s,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:c};c!==D&&(u?o.hover(h):o.unhover&&o.unhover(h),D=c)}}),L.style("margin",function(t){var e=t.model.pad;return e.t+"px "+e.r+"px "+e.b+"px "+e.l+"px"}).attr("width",function(t){return t.model.canvasWidth}).attr("height",function(t){return t.model.canvasHeight}).style("width",function(t){return t.model.width+2*b.overdrag+"px"}).style("height",function(t){return t.model.height+"px"}).style("opacity",function(t){return t.pick?.01:1}),e.style("background","rgba(255, 255, 255, 0)");var z=e.selectAll(".parcoords").data(S,n);z.exit().remove(),z.enter().append("g").classed("parcoords",!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","none").call(l),z.attr("width",function(t){return t.model.width+t.model.pad.l+t.model.pad.r}).attr("height",function(t){return t.model.height+t.model.pad.t+t.model.pad.b}).attr("transform",function(t){return"translate("+t.model.translateX+","+t.model.translateY+")"});var I=z.selectAll(".parcoordsControlView").data(i,n);I.enter().append("g").classed("parcoordsControlView",!0).style("box-sizing","content-box"),I.attr("transform",function(t){return"translate("+t.model.pad.l+","+t.model.pad.t+")"});var P=I.selectAll(".yAxis").data(function(t){return t.dimensions},n);P.enter().append("g").classed("yAxis",!0).each(function(t){C.dimensions.push(t)}),I.each(function(t){f(P,t)}),L.each(function(t){t.lineLayer=y(this,t.model.lines,t.model.canvasWidth,t.model.canvasHeight,t.viewModel.dimensions,t.viewModel.panels,t.model.unitToColor,t.context,t.pick,b.scatter),t.viewModel[t.key]=t.lineLayer,C.renderers.push(function(){t.lineLayer.render(t.viewModel.panels,!0)}),t.lineLayer.render(t.viewModel.panels,!t.context)}),P.attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),P.call(_.behavior.drag().origin(function(t){return t}).on("drag",function(t){var e=t.parent;T=!1,k||(t.x=Math.max(-b.overdrag,Math.min(t.model.width+b.overdrag,_.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,P.sort(function(t,e){return t.x-e.x}).each(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio}),f(P,e),P.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),_.select(this).attr("transform","translate("+t.x+", 0)"),P.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLineLayer&&e.contextLineLayer.render(e.panels,!1,!u(e)),e.focusLineLayer.render&&e.focusLineLayer.render(e.panels))}).on("dragend",function(t){var e=t.parent;if(k)return void("ending"===k&&(k=!1));t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,f(P,e),_.select(this).attr("transform",function(t){return"translate("+t.x+", 0)"}),e.contextLineLayer&&e.contextLineLayer.render(e.panels,!1,!u(e)),e.focusLineLayer&&e.focusLineLayer.render(e.panels),e.pickLineLayer&&e.pickLineLayer.render(e.panels,!0),T=!0,o&&o.axesMoved&&o.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),P.exit().remove();var O=P.selectAll(".axisOverlays").data(i,n);O.enter().append("g").classed("axisOverlays",!0),O.selectAll(".axis").remove();var R=O.selectAll(".axis").data(i,n);R.enter().append("g").classed("axis",!0),R.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,n=r.domain(),i=t.ticktext;_.select(this).call(_.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?n.map(function(t,e){return i&&i[e]||t}):null).tickFormat(t.ordinal?function(t){return t}:null).scale(r))}),R.selectAll(".domain, .tick").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),R.selectAll("text").style("font-weight",100).style("font-size","10px").style("fill","black").style("fill-opacity",1).style("stroke","none").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default").style("user-select","none");var j=O.selectAll(".axisHeading").data(i,n);j.enter().append("g").classed("axisHeading",!0);var F=j.selectAll(".axisTitle").data(i,n);F.enter().append("text").classed("axisTitle",!0).attr("text-anchor","middle").style("font-family","sans-serif").style("font-size","10px").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),F.attr("transform","translate(0,"+-b.axisTitleOffset+")").text(function(t){return t.label});var N=O.selectAll(".axisExtent").data(i,n);N.enter().append("g").classed("axisExtent",!0);var B=N.selectAll(".axisExtentTop").data(i,n);B.enter().append("g").classed("axisExtentTop",!0),B.attr("transform","translate(0,"+-b.axisExtentOffset+")");var U=B.selectAll(".axisExtentTopText").data(i,n);U.enter().append("text").classed("axisExtentTopText",!0).attr("alignment-baseline","after-edge").call(v),U.text(function(t){return x(t)(t.domainScale.domain().slice(-1)[0])});var V=N.selectAll(".axisExtentBottom").data(i,n);V.enter().append("g").classed("axisExtentBottom",!0),V.attr("transform",function(t){return"translate(0,"+(t.model.height+b.axisExtentOffset)+")"});var H=V.selectAll(".axisExtentBottomText").data(i,n);H.enter().append("text").classed("axisExtentBottomText",!0).attr("alignment-baseline","before-edge").call(v),H.text(function(t){return x(t)(t.domainScale.domain()[0])});var q=O.selectAll(".axisBrush").data(i,n),G=q.enter().append("g").classed("axisBrush",!0);q.each(function(t){t.brush||(t.brush=_.svg.brush().y(t.unitScale).on("brushstart",w).on("brush",M).on("brushend",A),0===t.filter[0]&&1===t.filter[1]||t.brush.extent(t.filter),_.select(this).call(t.brush))}),G.selectAll("rect").attr("x",-b.bar.capturewidth/2).attr("width",b.bar.capturewidth),G.selectAll("rect.extent").attr("fill","url(#filterBarPattern)").style("cursor","ns-resize").filter(function(t){return 0===t.filter[0]&&1===t.filter[1]}).attr("y",-100),G.selectAll(".resize rect").attr("height",b.bar.handleheight).attr("opacity",0).style("visibility","visible"),G.selectAll(".resize.n rect").style("cursor","n-resize").attr("y",b.bar.handleoverlap-b.bar.handleheight),G.selectAll(".resize.s rect").style("cursor","s-resize").attr("y",b.bar.handleoverlap);var Y=!1,W=!1;return C}},{"../../lib":680,"./constants":902,"./lines":905,d3:104}],907:[function(t,e,r){"use strict";var n=t("./parcoords");e.exports=function(t,e){var r=t._fullLayout,i=r._paper,a=r._paperdiv,o={},s={},l=r._size;e.forEach(function(e,r){o[r]=t.data[r].dimensions,s[r]=t.data[r].dimensions.slice()});var u=function(e,r,n){var i=s[e][r],a=i.constraintrange;a&&2===a.length||(a=i.constraintrange=[]),a[0]=n[0],a[1]=n[1],t.emit("plotly_restyle")},c=function(e){t.emit("plotly_hover",e)},h=function(e){t.emit("plotly_unhover",e)},f=function(e,r){function n(t){return!("visible"in t)||t.visible}function i(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return i===-1&&(i+=e.length),i}var a=function(t){return function(e,n){return i(r,t,e)-i(r,t,n)}}(s[e].filter(n));o[e].sort(a),s[e].filter(function(t){return!n(t)}).sort(function(t){return s[e].indexOf(t)}).forEach(function(t){o[e].splice(o[e].indexOf(t),1),o[e].splice(s[e].indexOf(t),0,t)}),t.emit("plotly_restyle")};n(a,i,e,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:h,axesMoved:f})}},{"./parcoords":906}],908:[function(t,e,r){"use strict";var n=t("../../components/color/attributes"),i=t("../../plots/font_attributes"),a=t("../../plots/attributes"),o=t("../../lib/extend").extendFlat;e.exports={labels:{valType:"data_array"},label0:{valType:"number",dflt:0},dlabel:{valType:"number",dflt:1},values:{valType:"data_array"},marker:{colors:{valType:"data_array"},line:{color:{valType:"color",dflt:n.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}}},text:{valType:"data_array"},scalegroup:{valType:"string",dflt:""},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"]},hoverinfo:o({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0},textfont:o({},i,{}),insidetextfont:o({},i,{}),outsidetextfont:o({},i,{}),domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},hole:{valType:"number",min:0,max:1,dflt:0},sort:{valType:"boolean",dflt:!0},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise"},rotation:{valType:"number",min:-360,max:360,dflt:0},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0}}},{"../../components/color/attributes":574,"../../lib/extend":672,"../../plots/attributes":717,"../../plots/font_attributes":739}],909:[function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n")}return m};var l},{"../../components/color":575,"./helpers":912,"fast-isnumeric":113,tinycolor2:511}],911:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r,a){function o(r,a){return n.coerce(t,e,i,r,a)}var s=n.coerceFont,l=o("values");if(!Array.isArray(l)||!l.length)return void(e.visible=!1);var u=o("labels");Array.isArray(u)||(o("label0"),o("dlabel")),o("marker.line.width")&&o("marker.line.color");var c=o("marker.colors");Array.isArray(c)||(e.marker.colors=[]),o("scalegroup");var h=o("text"),f=o("textinfo",Array.isArray(h)?"text+percent":"percent");if(o("hoverinfo",1===a._dataLength?"label+text+value+percent":void 0),f&&"none"!==f){var d=o("textposition"),p=Array.isArray(d)||"auto"===d,m=p||"inside"===d,g=p||"outside"===d;if(m||g){var v=s(o,"textfont",a.font);m&&s(o,"insidetextfont",v),g&&s(o,"outsidetextfont",v)}}o("domain.x"),o("domain.y"),o("hole"),o("sort"),o("direction"),o("rotation"),o("pull")}},{"../../lib":680,"./attributes":908}],912:[function(t,e,r){"use strict";var n=t("../../lib");r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return r.lastIndexOf(".")!==-1&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)+"%"},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return r.lastIndexOf(".")!==-1&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)}},{"../../lib":680}],913:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("./layout_defaults"),n.layoutAttributes=t("./layout_attributes"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.styleOne=t("./style_one"),n.moduleType="trace",n.name="pie",n.basePlotModule=t("./base_plot"),n.categories=["pie","showLegend"],n.meta={},e.exports=n},{"./attributes":908,"./base_plot":909,"./calc":910,"./defaults":911,"./layout_attributes":914,"./layout_defaults":915,"./plot":916,"./style":917,"./style_one":918}],914:[function(t,e,r){"use strict";e.exports={hiddenlabels:{valType:"data_array"}}},{}],915:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){!function(r,a){n.coerce(t,e,i,r,a)}("hiddenlabels")}},{"../../lib":680,"./layout_attributes":914}],916:[function(t,e,r){"use strict";function n(t,e,r){var n=Math.sqrt(t.width*t.width+t.height*t.height),a=t.width/t.height,o=Math.PI*Math.min(e.v/r.vTotal,.5),s=1-r.trace.hole,l=i(e,r),u={scale:l*r.r*2/n,rCenter:1-l,rotate:0};if(u.scale>=1)return u;var c=a+1/(2*Math.tan(o)),h=r.r*Math.min(1/(Math.sqrt(c*c+.5)+c),s/(Math.sqrt(a*a+s/2)+a)),f={scale:2*h/t.height,rCenter:Math.cos(h/r.r)-h*a/r.r,rotate:(180/Math.PI*e.midangle+720)%180-90},d=1/a,p=d+1/(2*Math.tan(o)),m=r.r*Math.min(1/(Math.sqrt(p*p+.5)+p),s/(Math.sqrt(d*d+s/2)+d)),g={scale:2*m/t.width,rCenter:Math.cos(m/r.r)-m/a/r.r, +rotate:(180/Math.PI*e.midangle+810)%180-90},v=g.scale>f.scale?g:f;return u.scale<1&&v.scale>u.scale?v:u}function i(t,e){if(t.v===e.vTotal&&!e.trace.hole)return 1;var r=Math.PI*Math.min(t.v/e.vTotal,.5);return Math.min(1/(1+1/Math.sin(r)),(1-e.trace.hole)/2)}function a(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function o(t,e){function r(t,e){return t.pxmid[1]-e.pxmid[1]}function n(t,e){return e.pxmid[1]-t.pxmid[1]}var i,a,o,s,l,u,c,h,f,d,p,m,g;for(a=0;a<2;a++)for(o=a?r:n,l=a?Math.max:Math.min,c=a?1:-1,i=0;i<2;i++){for(s=i?Math.max:Math.min,u=i?1:-1,h=t[a][i],h.sort(o),f=t[1-a][i],d=f.concat(h),m=[],p=0;p0&&(t.labelExtraY=b),Array.isArray(e.pull))for(i=0;i=e.pull[o.i]||((t.pxmid[1]-o.pxmid[1])*c>0?(h=o.cyFinal+l(o.px0[1],o.px1[1]),(b=h-g-t.labelExtraY)*c>0&&(t.labelExtraY+=b)):(v+t.labelExtraY-y)*c>0&&(n=3*u*Math.abs(i-d.indexOf(t)),f=o.cxFinal+s(o.px0[0],o.px1[0]),(p=f+n-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*u>0&&(t.labelExtraX+=p)))}(m[p],v)}}}function s(t,e){var r,n,i,a,o,s,l,c,h,f,d=[];for(i=0;ic&&(c=s.pull[a]);o.r=Math.min(r/u(s.tilt,Math.sin(l),s.depth),n/u(s.tilt,Math.cos(l),s.depth))/(2+2*c),o.cx=e.l+e.w*(s.domain.x[1]+s.domain.x[0])/2,o.cy=e.t+e.h*(2-s.domain.y[1]-s.domain.y[0])/2,s.scalegroup&&d.indexOf(s.scalegroup)===-1&&d.push(s.scalegroup)}for(a=0;ah.vTotal/2?1:0)}function u(t,e,r){if(!t)return 1;var n=Math.sin(t*Math.PI/180);return Math.max(.01,r*n*Math.abs(e)+2*Math.sqrt(1-n*n*e*e))}var c=t("d3"),h=t("../../plots/cartesian/graph_interact"),f=t("../../components/color"),d=t("../../components/drawing"),p=t("../../lib/svg_text_utils"),m=t("./helpers");e.exports=function(t,e){var r=t._fullLayout;s(e,r._size);var u=r._pielayer.selectAll("g.trace").data(e);u.enter().append("g").attr({"stroke-linejoin":"round",class:"trace"}),u.exit().remove(),u.order(),u.each(function(e){var s=c.select(this),u=e[0],g=u.trace,v=(g.depth||0)*u.r*Math.sin(0)/2,y=g.tiltaxis||0,b=y*Math.PI/180,x=[v*Math.sin(b),v*Math.cos(b)],_=u.r*Math.cos(0),w=s.selectAll("g.part").data(g.tilt?["top","sides"]:["top"]);w.enter().append("g").attr("class",function(t){return t+" part"}),w.exit().remove(),w.order(),l(e),s.selectAll(".top").each(function(){var s=c.select(this).selectAll("g.slice").data(e);s.enter().append("g").classed("slice",!0),s.exit().remove();var l=[[[],[]],[[],[]]],v=!1;s.each(function(o){function s(e){var n=t._fullLayout,a=t._fullData[g.index],s=a.hoverinfo;if("all"===s&&(s="label+text+value+percent+name"),!t._dragging&&n.hovermode!==!1&&"none"!==s&&"skip"!==s&&s){var l=i(o,u),c=M+o.pxmid[0]*(1-l),f=A+o.pxmid[1]*(1-l),d=r.separators,p=[];s.indexOf("label")!==-1&&p.push(o.label),a.text&&a.text[o.i]&&s.indexOf("text")!==-1&&p.push(a.text[o.i]),s.indexOf("value")!==-1&&p.push(m.formatPieValue(o.v,d)),s.indexOf("percent")!==-1&&p.push(m.formatPiePercent(o.v/u.vTotal,d)),h.loneHover({x0:c-l*u.r,x1:c+l*u.r,y:f,text:p.join("
"),name:s.indexOf("name")!==-1?a.name:void 0,color:o.color,idealAlign:o.pxmid[0]<0?"left":"right"},{container:n._hoverlayer.node(),outerContainer:n._paper.node()}),h.hover(t,e,"pie"),S=!0}}function f(e){t.emit("plotly_unhover",{points:[e]}),S&&(h.loneUnhover(r._hoverlayer.node()),S=!1)}function b(){t._hoverdata=[o],t._hoverdata.trace=e.trace,h.click(t,{target:!0})}function w(t,e,r,n){return"a"+n*u.r+","+n*_+" "+y+" "+o.largeArc+(r?" 1 ":" 0 ")+n*(e[0]-t[0])+","+n*(e[1]-t[1])}if(o.hidden)return void c.select(this).selectAll("path,g").remove();l[o.pxmid[1]<0?0:1][o.pxmid[0]<0?0:1].push(o);var M=u.cx+x[0],A=u.cy+x[1],k=c.select(this),T=k.selectAll("path.surface").data([o]),S=!1;if(T.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),k.select("path.textline").remove(),k.on("mouseover",s).on("mouseout",f).on("click",b),g.pull){var E=+(Array.isArray(g.pull)?g.pull[o.i]:g.pull)||0;E>0&&(M+=E*o.pxmid[0],A+=E*o.pxmid[1])}o.cxFinal=M,o.cyFinal=A;var L=g.hole;if(o.v===u.vTotal){var C="M"+(M+o.px0[0])+","+(A+o.px0[1])+w(o.px0,o.pxmid,!0,1)+w(o.pxmid,o.px0,!0,1)+"Z";L?T.attr("d","M"+(M+L*o.px0[0])+","+(A+L*o.px0[1])+w(o.px0,o.pxmid,!1,L)+w(o.pxmid,o.px0,!1,L)+"Z"+C):T.attr("d",C)}else{var D=w(o.px0,o.px1,!0,1);if(L){var z=1-L;T.attr("d","M"+(M+L*o.px1[0])+","+(A+L*o.px1[1])+w(o.px1,o.px0,!1,L)+"l"+z*o.px0[0]+","+z*o.px0[1]+D+"Z")}else T.attr("d","M"+M+","+A+"l"+o.px0[0]+","+o.px0[1]+D+"Z")}var I=Array.isArray(g.textposition)?g.textposition[o.i]:g.textposition,P=k.selectAll("g.slicetext").data(o.text&&"none"!==I?[0]:[]);P.enter().append("g").classed("slicetext",!0),P.exit().remove(),P.each(function(){var t=c.select(this).selectAll("text").data([0]);t.enter().append("text").attr("data-notex",1),t.exit().remove(),t.text(o.text).attr({class:"slicetext",transform:"","data-bb":"","text-anchor":"middle",x:0,y:0}).call(d.font,"outside"===I?g.outsidetextfont:g.insidetextfont).call(p.convertToTspans),t.selectAll("tspan.line").attr({x:0,y:0});var e,r=d.bBox(t.node());"outside"===I?e=a(r,o):(e=n(r,o,u),"auto"===I&&e.scale<1&&(t.call(d.font,g.outsidetextfont),g.outsidetextfont.family===g.insidetextfont.family&&g.outsidetextfont.size===g.insidetextfont.size||(t.attr({"data-bb":""}),r=d.bBox(t.node())),e=a(r,o)));var i=M+o.pxmid[0]*e.rCenter+(e.x||0),s=A+o.pxmid[1]*e.rCenter+(e.y||0);e.outside&&(o.yLabelMin=s-r.height/2,o.yLabelMid=s,o.yLabelMax=s+r.height/2,o.labelExtraX=0,o.labelExtraY=0,v=!0),t.attr("transform","translate("+i+","+s+")"+(e.scale<1?"scale("+e.scale+")":"")+(e.rotate?"rotate("+e.rotate+")":"")+"translate("+-(r.left+r.right)/2+","+-(r.top+r.bottom)/2+")")})}),v&&o(l,g),s.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=c.select(this),r=e.select("g.slicetext text");r.attr("transform","translate("+t.labelExtraX+","+t.labelExtraY+")"+r.attr("transform"));var n=t.cxFinal+t.pxmid[0],i=t.cyFinal+t.pxmid[1],a="M"+n+","+i,o=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var s=t.labelExtraX*t.pxmid[1]/t.pxmid[0],l=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(s)>Math.abs(l)?a+="l"+l*t.pxmid[0]/t.pxmid[1]+","+l+"H"+(n+t.labelExtraX+o):a+="l"+t.labelExtraX+","+s+"v"+(l-s)+"h"+o}else a+="V"+(t.yLabelMid+t.labelExtraY)+"h"+o;e.append("path").classed("textline",!0).call(f.stroke,g.outsidetextfont.color).attr({"stroke-width":Math.min(2,g.outsidetextfont.size/8),d:a,fill:"none"})}})})}),setTimeout(function(){u.selectAll("tspan").each(function(){var t=c.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)}},{"../../components/color":575,"../../components/drawing":598,"../../lib/svg_text_utils":699,"../../plots/cartesian/graph_interact":726,"./helpers":912,d3:104}],917:[function(t,e,r){"use strict";var n=t("d3"),i=t("./style_one");e.exports=function(t){t._fullLayout._pielayer.selectAll(".trace").each(function(t){var e=t[0],r=e.trace,a=n.select(this);a.style({opacity:r.opacity}),a.selectAll(".top path.surface").each(function(t){n.select(this).call(i,t,r)})})}},{"./style_one":918,d3:104}],918:[function(t,e,r){"use strict";var n=t("../../components/color");e.exports=function(t,e,r){var i=r.marker.line.color;Array.isArray(i)&&(i=i[e.i]||n.defaultLine);var a=r.marker.line.width||0;Array.isArray(a)&&(a=a[e.i]||0),t.style({"stroke-width":a,fill:e.color}).call(n.stroke,i)}},{"../../components/color":575}],919:[function(t,e,r){"use strict";var n=t("../scattergl/attributes");e.exports={x:n.x,y:n.y,xy:{valType:"data_array"},indices:{valType:"data_array"},xbounds:{valType:"data_array"},ybounds:{valType:"data_array"},text:n.text,marker:{color:{valType:"color",arrayOk:!1},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1},blend:{valType:"boolean",dflt:null},sizemin:{valType:"number",min:.1,max:2,dflt:.5},sizemax:{valType:"number",min:.1,dflt:20},border:{color:{valType:"color",arrayOk:!1},arearatio:{valType:"number",min:0,max:1,dflt:0}}}}},{"../scattergl/attributes":960}],920:[function(t,e,r){"use strict";function n(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=a(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}function i(t,e){var r=new n(t,e.uid);return r.update(e),r}var a=t("gl-pointcloud2d"),o=t("../../lib/str2rgbarray"),s=t("../scatter/get_trace_color"),l=["xaxis","yaxis"],u=n.prototype;u.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},u.update=function(t){this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=s(t,{})},u.updateFast=function(t){var e,r,n,i,a,s,l=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,c=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,f=t.indices,d=this.bounds;if(c){if(n=c,e=c.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(s=0;sd[2]&&(d[2]=i),ad[3]&&(d[3]=a);if(f)r=f;else for(r=new Int32Array(e),s=0;sd[2]&&(d[2]=i),ad[3]&&(d[3]=a);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var p=o(t.marker.color),m=o(t.marker.border.color),g=t.opacity*t.marker.opacity;p[3]*=g,this.pointcloudOptions.color=p;var v=t.marker.blend;if(null===v){v=l.length<100||u.length<100}this.pointcloudOptions.blend=v,m[3]*=g,this.pointcloudOptions.borderColor=m;var y=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=y,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions),this.expandAxesFast(d,b/2)},u.expandAxesFast=function(t,e){for(var r,n,i,a=e||.5,o=0;o<2;o++)r=this.scene[l[o]],n=r._min,n||(n=[]),n.push({val:t[o],pad:a}),i=r._max,i||(i=[]),i.push({val:t[o+2],pad:a})},u.dispose=function(){this.pointcloud.dispose()},e.exports=i},{"../../lib/str2rgbarray":698,"../scatter/get_trace_color":932,"gl-pointcloud2d":211}],921:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a("text"),a("marker.color",r),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",r),a("marker.border.arearatio")}},{"../../lib":680,"./attributes":919}],922:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.calc=t("../scatter3d/calc"),n.plot=t("./convert"),n.moduleType="trace",n.name="pointcloud",n.basePlotModule=t("../../plots/gl2d"),n.categories=["gl2d","showLegend"],n.meta={},e.exports=n},{"../../plots/gl2d":755,"../scatter3d/calc":948,"./attributes":919,"./convert":920,"./defaults":921}],923:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){n.mergeArray(e.text,t,"tx"),n.mergeArray(e.customdata,t,"data"),n.mergeArray(e.textposition,t,"tp"),e.textfont&&(n.mergeArray(e.textfont.size,t,"ts"),n.mergeArray(e.textfont.color,t,"tc"),n.mergeArray(e.textfont.family,t,"tf"));var r=e.marker;if(r){n.mergeArray(r.size,t,"ms"),n.mergeArray(r.opacity,t,"mo"),n.mergeArray(r.symbol,t,"mx"),n.mergeArray(r.color,t,"mc");var i=r.line;r.line&&(n.mergeArray(i.color,t,"mlc"),n.mergeArray(i.width,t,"mlw"))}}},{"../../lib":680}],924:[function(t,e,r){"use strict";var n=t("../../components/colorscale/color_attributes"),i=t("../../components/errorbars/attributes"),a=t("../../components/colorbar/attributes"),o=t("../../components/drawing"),s=(t("./constants"),t("../../lib/extend").extendFlat);e.exports={x:{valType:"data_array"},x0:{valType:"any",dflt:0},dx:{valType:"number",dflt:1},y:{valType:"data_array"},y0:{valType:"any",dflt:0},customdata:{valType:"data_array"},dy:{valType:"number",dflt:1},ids:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},hoveron:{valType:"flaglist",flags:["points","fills"]},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear"},smoothing:{valType:"number",min:0,max:1.3,dflt:1},dash:{valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid"},simplify:{valType:"boolean",dflt:!0}},connectgaps:{valType:"boolean",dflt:!1},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],dflt:"none"},fillcolor:{valType:"color"},marker:s({},{symbol:{valType:"enumerated",values:o.symbolList,dflt:"circle",arrayOk:!0},opacity:{valType:"number",min:0,max:1,arrayOk:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0},maxdisplayed:{valType:"number",min:0,dflt:0},sizeref:{valType:"number",dflt:1},sizemin:{valType:"number",min:0,dflt:0},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter"},showscale:{valType:"boolean",dflt:!1},colorbar:a,line:s({},{width:{valType:"number",min:0,arrayOk:!0}},n("marker.line"))},n("marker")),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0},textfont:{family:{valType:"string",noBlank:!0,strict:!0,arrayOk:!0},size:{valType:"number",min:1,arrayOk:!0},color:{valType:"color",arrayOk:!0}},r:{valType:"data_array"},t:{valType:"data_array"},error_y:i,error_x:i}},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../components/drawing":598,"../../components/errorbars/attributes":600,"../../lib/extend":672,"./constants":929}],925:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("./subtypes"),o=t("./colorscale_calc"),s=t("./arrays_to_calcdata");e.exports=function(t,e){var r,l,u,c=i.getFromId(t,e.xaxis||"x"),h=i.getFromId(t,e.yaxis||"y"),f=c.makeCalcdata(e,"x"),d=h.makeCalcdata(e,"y"),p=Math.min(f.length,d.length);c._minDtick=0,h._minDtick=0,f.length>p&&f.splice(p,f.length-p),d.length>p&&d.splice(p,d.length-p);var m={padded:!0},g={padded:!0};if(a.hasMarkers(e)){if(r=e.marker,l=r.size,Array.isArray(l)){var v={type:"linear"};i.setConvert(v),l=v.makeCalcdata(e.marker,"size"),l.length>p&&l.splice(p,l.length-p)}var y,b=1.6*(e.marker.sizeref||1);y="area"===e.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/b),3)}:function(t){return Math.max((t||0)/b,3)},m.ppad=g.ppad=Array.isArray(l)?l.map(y):y(l)}o(e),!("tozerox"===e.fill||"tonextx"===e.fill&&t.firstscatter)||f[0]===f[p-1]&&d[0]===d[p-1]?e.error_y.visible||["tonexty","tozeroy"].indexOf(e.fill)===-1&&(a.hasMarkers(e)||a.hasText(e))||(m.padded=!1,m.ppad=0):m.tozero=!0,!("tozeroy"===e.fill||"tonexty"===e.fill&&t.firstscatter)||f[0]===f[p-1]&&d[0]===d[p-1]?["tonextx","tozerox"].indexOf(e.fill)!==-1&&(g.padded=!1):g.tozero=!0,i.expand(c,f,m),i.expand(h,d,g);var x=new Array(p);for(u=0;u=0;i--){var a=t[i];if("scatter"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],927:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../components/colorscale"),s=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,l=r.marker,u="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+u).remove(),void 0===l||!l.showscale)return void a.autoMargin(t,u);var c=l.color,h=l.cmin,f=l.cmax;n(h)||(h=i.aggNums(Math.min,null,c)),n(f)||(f=i.aggNums(Math.max,null,c));var d=e[0].t.cb=s(t,u),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,h,f),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:h,end:f,size:(f-h)/254}).options(l.colorbar)()}},{"../../components/colorbar/draw":578,"../../components/colorscale":589,"../../lib":680,"../../plots/plots":778,"fast-isnumeric":113}],928:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/calc"),a=t("./subtypes");e.exports=function(t){a.hasLines(t)&&n(t,"line")&&i(t,t.line.color,"line","c"),a.hasMarkers(t)&&(n(t,"marker")&&i(t,t.marker.color,"marker","c"),n(t,"marker.line")&&i(t,t.marker.line.color,"marker.line","c"))}},{"../../components/colorscale/calc":581,"../../components/colorscale/has_colorscale":588,"./subtypes":944}],929:[function(t,e,r){"use strict";e.exports={PTS_LINESONLY:20}},{}],930:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("./constants"),o=t("./subtypes"),s=t("./xy_defaults"),l=t("./marker_defaults"),u=t("./line_defaults"),c=t("./line_shape_defaults"),h=t("./text_defaults"),f=t("./fillcolor_defaults"),d=t("../../components/errorbars/defaults");e.exports=function(t,e,r,p){function m(r,a){return n.coerce(t,e,i,r,a)}var g=s(t,e,p,m),v=gU!=I>=U&&(C=E[T-1][0],D=E[T][0],L=C+(D-C)*(U-z)/(I-z),j=Math.min(j,L),F=Math.max(F,L));j=Math.max(j,0),F=Math.min(F,f._length);var V=l.defaultLine;return l.opacity(h.fillcolor)?V=h.fillcolor:l.opacity((h.line||{}).color)&&(V=h.line.color),n.extendFlat(t,{distance:a.MAXDIST+10,x0:j,x1:F,y0:U,y1:U,color:V}),delete t.index,h.text&&!Array.isArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}}},{"../../components/color":575,"../../components/errorbars":604,"../../lib":680,"../../plots/cartesian/constants":724,"../../plots/cartesian/graph_interact":726,"./get_trace_color":932}],934:[function(t,e,r){"use strict";var n={},i=t("./subtypes");n.hasLines=i.hasLines,n.hasMarkers=i.hasMarkers,n.hasText=i.hasText,n.isBubble=i.isBubble,n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.cleanData=t("./clean_data"),n.calc=t("./calc"),n.arraysToCalcdata=t("./arrays_to_calcdata"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.animatable=!0,n.moduleType="trace",n.name="scatter",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","symbols","markerColorscale","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":727,"./arrays_to_calcdata":923,"./attributes":924,"./calc":925,"./clean_data":926,"./colorbar":927,"./defaults":930,"./hover":933,"./plot":941,"./select":942,"./style":943,"./subtypes":944}],935:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,a,o){var s=(t.marker||{}).color;if(o("line.color",r),n(t,"line"))i(t,e,a,o,{prefix:"line.",cLetter:"c"});else{o("line.color",!Array.isArray(s)&&s||r)}o("line.width"),o("line.dash")}},{"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588}],936:[function(t,e,r){"use strict";var n=t("../../constants/numerical").BADNUM;e.exports=function(t,e){function r(e){var r=_.c2p(t[e].x),i=w.c2p(t[e].y);return r!==n&&i!==n&&[r,i]}function i(t){var e=t[0]/_._length,r=t[1]/w._length;return(1+10*Math.max(0,-e,e-1,-r,r-1))*k}var a,o,s,l,u,c,h,f,d,p,m,g,v,y,b,x,_=e.xaxis,w=e.yaxis,M=e.simplify,A=e.connectGaps,k=e.baseTolerance,T=e.linear,S=[],E=.2,L=new Array(t.length),C=0;for(M||(k=E=-1),a=0;ai(c))break;s=c,v=p[0]*d[0]+p[1]*d[1],v>m?(m=v,l=c,f=!1):v=t.length||!c)break;L[C++]=c,o=c}}else L[C++]=l}S.push(L.slice(0,C))}return S}},{"../../constants/numerical":662}],937:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],938:[function(t,e,r){"use strict";e.exports=function(t,e,r){for(var n,i,a=null,o=0;o0?Math.max(e,i):0}}},{"fast-isnumeric":113}],940:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults"),o=t("./subtypes");e.exports=function(t,e,r,s,l){var u,c=o.isBubble(t),h=(t.line||{}).color;h&&(r=h),l("marker.symbol"),l("marker.opacity",c?.7:1),l("marker.size"),l("marker.color",r),i(t,"marker")&&a(t,e,s,l,{prefix:"marker.",cLetter:"c"}),u=h&&!Array.isArray(h)&&e.marker.color!==h?h:c?n.background:n.defaultLine,l("marker.line.color",u),i(t,"marker.line")&&a(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",c?1:0),c&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode"))}},{"../../components/color":575,"../../components/colorscale/defaults":584,"../../components/colorscale/has_colorscale":588,"./subtypes":944}],941:[function(t,e,r){"use strict";function n(t,e){var r;e.selectAll("g.trace").each(function(t){var e=o.select(this);if(r=t[0].trace,r._nexttrace){if(r._nextFill=e.select(".js-fill.js-tonext"),!r._nextFill.size()){var n=":first-child";e.select(".js-fill.js-tozero").size()&&(n+=" + *"),r._nextFill=e.insert("path",n).attr("class","js-fill js-tonext")}}else e.selectAll(".js-fill.js-tonext").remove(),r._nextFill=null;r.fill&&("tozero"===r.fill.substr(0,6)||"toself"===r.fill||"to"===r.fill.substr(0,2)&&!r._prevtrace)?(r._ownFill=e.select(".js-fill.js-tozero"),r._ownFill.size()||(r._ownFill=e.insert("path",":first-child").attr("class","js-fill js-tozero"))):(e.selectAll(".js-fill.js-tozero").remove(),r._ownFill=null)})}function i(t,e,r,n,i,f,p){function m(t){return M?t.transition():t}function g(t){return t.filter(function(t){return t.vis})}function v(t){return t.id}function y(t){if(t.ids)return v}function b(){return!1}function x(t){var e,r,n=t[0].trace,i=o.select(this),a=c.hasMarkers(n),u=c.hasText(n),h=y(n),f=b,d=b;a&&(f=n.marker.maxdisplayed?g:s.identity),u&&(d=n.marker.maxdisplayed?g:s.identity),r=i.selectAll("path.point"),e=r.data(f,h);var p=e.enter().append("path").classed("point",!0);p.call(l.pointStyle,n).call(l.translatePoints,A,k,n),M&&p.style("opacity",0).transition().style("opacity",1),e.each(function(t){var e=o.select(this),r=m(e);l.translatePoint(t,r,A,k),l.singlePointStyle(t,r,n),n.customdata&&e.classed("plotly-customdata",null!==t.data&&void 0!==t.data)}),M?e.exit().transition().style("opacity",0).remove():e.exit().remove(),r=i.selectAll("g"),e=r.data(d,h),e.enter().append("g").append("text"),e.each(function(t){var e=m(o.select(this).select("text"));l.translatePoint(t,e,A,k)}),e.selectAll("text").call(l.textPointStyle,n).each(function(t){var e=t.xp||A.c2p(t.x),r=t.yp||k.c2p(t.y);o.select(this).selectAll("tspan").each(function(){m(o.select(this)).attr({x:e,y:r})})}),e.exit().remove()}var _,w;a(t,e,r,n,i);var M=!!p&&p.duration>0,A=r.xaxis,k=r.yaxis,T=n[0].trace,S=T.line,E=o.select(f);if(E.call(u.plot,r,p),T.visible===!0){m(E).style("opacity",T.opacity);var L,C,D=T.fill.charAt(T.fill.length-1);"x"!==D&&"y"!==D&&(D=""),n[0].node3=E;var z="",I=[],P=T._prevtrace;P&&(z=P._prevRevpath||"",C=P._nextFill,I=P._polygons);var O,R,j,F,N,B,U,V,H,q="",G="",Y=[],W=[],X=s.noop;if(L=T._ownFill,c.hasLines(T)||"none"!==T.fill){for(C&&C.datum(n),["hv","vh","hvh","vhv"].indexOf(S.shape)!==-1?(j=l.steps(S.shape),F=l.steps(S.shape.split("").reverse().join(""))):j=F="spline"===S.shape?function(t){var e=t[t.length-1];return t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),S.smoothing):l.smoothopen(t,S.smoothing)}:function(t){return"M"+t.join("L")},N=function(t){return F(t.reverse())},Y=h(n,{xaxis:A,yaxis:k,connectGaps:T.connectgaps,baseTolerance:Math.max(S.width||1,3)/4,linear:"linear"===S.shape,simplify:S.simplify}),H=T._polygons=new Array(Y.length),w=0;w1}),X=function(t){return function(e){if(O=j(e),R=N(e),q?D?(q+="L"+O.substr(1),G=R+"L"+G.substr(1)):(q+="Z"+O,G=R+"Z"+G):(q=O,G=R),c.hasLines(T)&&e.length>1){var r=o.select(this);if(r.datum(n),t)m(r.style("opacity",0).attr("d",O).call(l.lineGroupStyle)).style("opacity",1);else{var i=m(r);i.attr("d",O),l.singleLineStyle(n,i)}}}}}var Z=E.selectAll(".js-line").data(W);m(Z.exit()).style("opacity",0).remove(),Z.each(X(!1)),Z.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(X(!0)),Y.length&&(L?B&&V&&(D?("y"===D?B[1]=V[1]=k.c2p(0,!0):"x"===D&&(B[0]=V[0]=A.c2p(0,!0)),m(L).attr("d","M"+V+"L"+B+"L"+q.substr(1))):m(L).attr("d",q+"Z")):"tonext"===T.fill.substr(0,6)&&q&&z&&("tonext"===T.fill?m(C).attr("d",q+"Z"+z+"Z"):m(C).attr("d",q+"L"+z.substr(1)+"Z"),T._polygons=T._polygons.concat(I)),T._prevRevpath=G,T._prevPolygons=H);var J=E.selectAll(".points");_=J.data([n]),J.each(x),_.enter().append("g").classed("points",!0).each(x),_.exit().remove()}}function a(t,e,r,n,i){var a=r.xaxis,l=r.yaxis,u=o.extent(s.simpleMap(a.range,a.r2c)),h=o.extent(s.simpleMap(l.range,l.r2c)),f=n[0].trace;if(c.hasMarkers(f)){var d=f.marker.maxdisplayed;if(0!==d){var p=n.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=h[0]&&t.y<=h[1]}),m=Math.ceil(p.length/d),g=0;i.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;for(c=p.selectAll("g.trace"),h=c.data(r,function(t){return t[0].trace.uid}),h.enter().append("g").attr("class",function(t){ +return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),f(t,e,r),n(t,p),l=0,u=[];lu.indexOf(e[0].trace.uid)?1:-1}),g){s&&(d=s());o.transition().duration(a.duration).ease(a.easing).each("end",function(){d&&d()}).each("interrupt",function(){d&&d()}).each(function(){p.selectAll("g.trace").each(function(n,o){i(t,o,e,n,r,this,a)})})}else p.selectAll("g.trace").each(function(n,o){i(t,o,e,n,r,this,a)});m&&h.exit().remove(),p.selectAll("path:not([d])").remove()}},{"../../components/drawing":598,"../../components/errorbars":604,"../../lib":680,"../../lib/polygon":690,"./line_points":936,"./link_traces":938,"./subtypes":944,d3:104}],942:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[],h=s[0].trace,f=h.index,d=h.marker,p=!n.hasMarkers(h)&&!n.hasText(h);if(h.visible===!0&&!p){var m=Array.isArray(d.opacity)?1:d.opacity;if(e===!1)for(r=0;r=0&&(e[1]+=1),t.indexOf("top")>=0&&(e[1]-=1),t.indexOf("left")>=0&&(e[0]-=1),t.indexOf("right")>=0&&(e[0]+=1),e)}function s(t,e){return e(4*t)}function l(t){return M[t]}function u(t,e,r,n,i){var a=null;if(Array.isArray(t)){a=[];for(var o=0;o=0){var f=i(l.position,l.delaunayColor,l.delaunayAxis);f.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(f):(f.gl=o,this.delaunayMesh=g(f),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},k.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},e.exports=f},{"../../constants/gl3d_dashes":659,"../../constants/gl_markers":660,"../../lib":680,"../../lib/gl_format_color":677,"../../lib/str2rgbarray":698,"../scatter/make_bubble_size_func":939,"./calc_errors":949,"delaunay-triangulate":105,"gl-error3d":143,"gl-line3d":153,"gl-mesh3d":186,"gl-scatter3d":232}],951:[function(t,e,r){"use strict";function n(t,e,r,n){var a=0,o=r("x"),s=r("y"),l=r("z");return i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),o&&s&&l&&(a=Math.min(o.length,s.length,l.length),a=0&&f("surfacecolor",d||p);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];f(v+".show")&&(f(v+".opacity"),f(v+".scale"))}c(t,e,r,{axis:"z"}),c(t,e,r,{axis:"y",inherit:"z"}),c(t,e,r,{axis:"x",inherit:"z"})}},{"../../components/errorbars/defaults":603,"../../lib":680,"../../registry":793,"../scatter/line_defaults":935,"../scatter/marker_defaults":940,"../scatter/subtypes":944,"../scatter/text_defaults":945,"./attributes":947}],952:[function(t,e,r){"use strict";var n={};n.plot=t("./convert"),n.attributes=t("./attributes"),n.markerSymbols=t("../../constants/gl_markers"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.moduleType="trace",n.name="scatter3d",n.basePlotModule=t("../../plots/gl3d"),n.categories=["gl3d","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../constants/gl_markers":660,"../../plots/gl3d":758,"../scatter/colorbar":927,"./attributes":947,"./calc":948,"./convert":950,"./defaults":951}],953:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/colorscale/color_attributes"),o=t("../../lib/extend").extendFlat,s=n.marker,l=n.line,u=s.line;e.exports={lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names"],dflt:"ISO-3"},mode:o({},n.mode,{dflt:"markers"}),text:o({},n.text,{}),textfont:n.textfont,textposition:n.textposition,line:{color:l.color,width:l.width,dash:l.dash},connectgaps:n.connectgaps,marker:o({},{symbol:s.symbol,opacity:s.opacity,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,showscale:s.showscale,colorbar:s.colorbar,line:o({},{width:u.width},a("marker.line"))},a("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:n.fillcolor,hoverinfo:o({},i.hoverinfo,{flags:["lon","lat","location","text","name"]})}},{"../../components/colorscale/color_attributes":582,"../../lib/extend":672,"../../plots/attributes":717,"../scatter/attributes":924}],954:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../scatter/colorscale_calc");e.exports=function(t,e){for(var r=Array.isArray(e.locations),a=r?e.locations.length:e.lon.length,o=[],s=0,l=0;l0&&(o[s-1].gapAfter=!0):(s++,o.push(c))}return i(e),o}},{"../scatter/colorscale_calc":928,"fast-isnumeric":113}],955:[function(t,e,r){"use strict";function n(t,e,r){var n,i,a=0,o=r("locations");return o?(r("locationmode"),a=o.length):(n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length),a")}var i=t("../../plots/cartesian/graph_interact"),a=t("../../plots/cartesian/axes"),o=t("../scatter/get_trace_color"),s=t("./attributes");e.exports=function(t){function e(t){return c.projection(t)}function r(t){var r=t.lonlat;if(null===r[0]||null===r[1])return 1/0;if(c.isLonLatOverEdges(r))return 1/0;var n=e(r),i=l.c2p(),a=u.c2p(),o=Math.abs(i-n[0]),s=Math.abs(a-n[1]),h=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(o*o+s*s)-h,1-3/h)}var a=t.cd,s=a[0].trace,l=t.xa,u=t.ya,c=t.subplot;if(!a[0].placeholder&&(i.getClosest(a,r,t),t.index!==!1)){var h=a[t.index],f=h.lonlat,d=e(f),p=h.mrc||1;return t.x0=d[0]-p,t.x1=d[0]+p,t.y0=d[1]-p,t.y1=d[1]+p,t.loc=h.loc,t.lat=f[0],t.lon=f[1],t.color=o(s,h),t.extraText=n(s,h,c.mockAxis),[t]}}},{"../../plots/cartesian/axes":719,"../../plots/cartesian/graph_interact":726,"../scatter/get_trace_color":932,"./attributes":953}],958:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="scattergeo",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/geo":743,"../scatter/colorbar":927,"./attributes":953,"./calc":954,"./defaults":955,"./event_data":956,"./hover":957,"./plot":959}],959:[function(t,e,r){"use strict";function n(t,e){if(!Array.isArray(t.locations))return u.identity;var r=c(t,e),n=t.locationmode;return function(t){var e=h(n,t.loc,r);return e?(t.lonlat=e.properties.ct,t):(t.lonlat=[null,null],!1)}}function i(t,e,r){function n(t,n){d(t,e,n,r)}var i=t.marker;if(n(t.text,"tx"),n(t.textposition,"tp"),t.textfont&&(n(t.textfont.size,"ts"),n(t.textfont.color,"tc"),n(t.textfont.family,"tf")),i&&i.line){var a=i.line;n(i.opacity,"mo"),n(i.symbol,"mx"),n(i.color,"mc"),n(i.size,"ms"),n(a.color,"mlc"),n(a.width,"mlw")}}function a(t){var e=t.framework.selectAll("g.trace.scattergeo");e.style("opacity",function(t){return t[0].trace.opacity}),e.each(function(t){var e=t[0].trace,r=o.select(this);r.selectAll("path.point").call(s.pointStyle,e),r.selectAll("text").call(s.textPointStyle,e)}),e.selectAll("path.js-line").style("fill","none").each(function(t){var e=o.select(this),r=t.trace,n=r.line||{};e.call(l.stroke,n.color).call(s.dashLine,n.dash||"",n.width||0),"none"!==r.fill&&e.call(l.fill,r.fillcolor)})}var o=t("d3"),s=t("../../components/drawing"),l=t("../../components/color"),u=t("../../lib"),c=t("../../lib/topojson_utils").getTopojsonFeatures,h=t("../../lib/geo_location_utils").locationToFeature,f=t("../../lib/geojson_utils"),d=t("../../lib/array_to_calc_item"),p=t("../scatter/subtypes");e.exports=function(t,e){function r(t){return t[0].trace.uid}var s=t.framework.select(".scattergeolayer").selectAll("g.trace.scattergeo").data(e,r);s.enter().append("g").attr("class","trace scattergeo"),s.exit().remove(),s.selectAll("*").remove(),s.each(function(e){var r=o.select(this),a=e[0].trace,s=n(a,t.topojson);e[0].placeholder&&r.remove();for(var l=[],u=0;u=e.length?i:e[a]);return n}function o(t,e,r){return l(D(t,r),C(e,r),r)}function s(t,e,r,n){var i=w(t,e,n);return i=Array.isArray(i[0])?i:a(g.identity,[i],n),l(i,C(r,n),n)}function l(t,e,r){for(var n=new Array(4*r),i=0;i0&&(v[y-1].gapAfter=!0)}return v}},{"../../components/colorscale":589,"../../lib":680,"../scatter/colorscale_calc":928,"../scatter/make_bubble_size_func":939,"../scatter/subtypes":944,"fast-isnumeric":113}],966:[function(t,e,r){"use strict";function n(){return{geojson:h.makeBlank(),layout:{visibility:"none"},paint:{}}}function i(t,e){function r(t,r,n,i){void 0===e[r][n]&&(e[r][n]=i),t[r]=e[r][n]}for(var n=t[0].trace,i=n.marker,a=Array.isArray(i.color),o=Array.isArray(i.size),s=[],l=0;l")}var i=t("../../plots/cartesian/graph_interact"),a=t("../scatter/get_trace_color");e.exports=function(t,e,r){function o(t){var e=t.lonlat,n=Math.abs(u.c2p(e)-u.c2p([d,e[1]])),i=Math.abs(c.c2p(e)-c.c2p([e[0],r])),a=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(n*n+i*i)-a,1-3/a)}var s=t.cd,l=s[0].trace,u=t.xa,c=t.ya;if(!s[0].placeholder){var h=e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360),f=360*h,d=e-f;if(i.getClosest(s,o,t),t.index!==!1){var p=s[t.index],m=p.lonlat,g=[m[0]+f,m[1]],v=u.c2p(g),y=c.c2p(g),b=p.mrc||1;return t.x0=v-b,t.x1=v+b,t.y0=y-b,t.y1=y+b,t.color=a(l,p),t.extraText=n(l,p),[t]}}}},{"../../plots/cartesian/graph_interact":726,"../scatter/get_trace_color":932}],970:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.plot=t("./plot"),n.moduleType="trace",n.name="scattermapbox",n.basePlotModule=t("../../plots/mapbox"),n.categories=["mapbox","gl","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/mapbox":772,"../scatter/colorbar":927,"./attributes":964,"./calc":965,"./defaults":967,"./event_data":968,"./hover":969,"./plot":971}],971:[function(t,e,r){"use strict";function n(t,e){this.mapbox=t,this.map=t.map,this.uid=e,this.idSourceFill=e+"-source-fill",this.idSourceLine=e+"-source-line",this.idSourceCircle=e+"-source-circle",this.idSourceSymbol=e+"-source-symbol",this.idLayerFill=e+"-layer-fill",this.idLayerLine=e+"-layer-line",this.idLayerCircle=e+"-layer-circle",this.idLayerSymbol=e+"-layer-symbol",this.mapbox.initSource(this.idSourceFill),this.mapbox.initSource(this.idSourceLine),this.mapbox.initSource(this.idSourceCircle),this.mapbox.initSource(this.idSourceSymbol),this.map.addLayer({id:this.idLayerFill,source:this.idSourceFill,type:"fill"}),this.map.addLayer({id:this.idLayerLine,source:this.idSourceLine,type:"line"}),this.map.addLayer({id:this.idLayerCircle,source:this.idSourceCircle,type:"circle"}),this.map.addLayer({id:this.idLayerSymbol,source:this.idSourceSymbol,type:"symbol"})}function i(t){return"visible"===t.layout.visibility}var a=t("./convert"),o=n.prototype;o.update=function(t){var e=this.mapbox,r=a(t);e.setOptions(this.idLayerFill,"setLayoutProperty",r.fill.layout),e.setOptions(this.idLayerLine,"setLayoutProperty",r.line.layout),e.setOptions(this.idLayerCircle,"setLayoutProperty",r.circle.layout),e.setOptions(this.idLayerSymbol,"setLayoutProperty",r.symbol.layout),i(r.fill)&&(e.setSourceData(this.idSourceFill,r.fill.geojson),e.setOptions(this.idLayerFill,"setPaintProperty",r.fill.paint)),i(r.line)&&(e.setSourceData(this.idSourceLine,r.line.geojson),e.setOptions(this.idLayerLine,"setPaintProperty",r.line.paint)),i(r.circle)&&(e.setSourceData(this.idSourceCircle,r.circle.geojson),e.setOptions(this.idLayerCircle,"setPaintProperty",r.circle.paint)),i(r.symbol)&&(e.setSourceData(this.idSourceSymbol,r.symbol.geojson),e.setOptions(this.idLayerSymbol,"setPaintProperty",r.symbol.paint))},o.dispose=function(){var t=this.map;t.removeLayer(this.idLayerFill),t.removeLayer(this.idLayerLine),t.removeLayer(this.idLayerCircle),t.removeLayer(this.idLayerSymbol),t.removeSource(this.idSourceFill),t.removeSource(this.idSourceLine),t.removeSource(this.idSourceCircle),t.removeSource(this.idSourceSymbol)},e.exports=function(t,e){var r=e[0].trace,i=new n(t,r.uid);return i.update(e),i}},{"./convert":966}],972:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/colorscale/color_attributes"),o=t("../../components/colorbar/attributes"),s=t("../../lib/extend").extendFlat,l=n.marker,u=n.line,c=l.line;e.exports={a:{valType:"data_array"},b:{valType:"data_array"},c:{valType:"data_array"},sum:{valType:"number",dflt:0,min:0},mode:s({},n.mode,{dflt:"markers"}),text:s({},n.text,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:s({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing},connectgaps:n.connectgaps,fill:s({},n.fill,{values:["none","toself","tonext"]}),fillcolor:n.fillcolor,marker:s({},{symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:s({},{width:c.width},a("marker".line))},a("marker"),{showscale:l.showscale,colorbar:o}),textfont:n.textfont,textposition:n.textposition,hoverinfo:s({},i.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:n.hoveron}},{"../../components/colorbar/attributes":576,"../../components/colorscale/color_attributes":582,"../../lib/extend":672,"../../plots/attributes":717,"../scatter/attributes":924}],973:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("../scatter/subtypes"),o=t("../scatter/colorscale_calc"),s=t("../scatter/arrays_to_calcdata"),l=["a","b","c"],u={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,c,h,f,d,p,m=t._fullLayout[e.subplot],g=m.sum,v=e.sum||g;for(r=0;rA&&S.splice(A,S.length-A)}return o(e),s(k,e),k}},{"../../plots/cartesian/axes":719,"../scatter/arrays_to_calcdata":923,"../scatter/colorscale_calc":928,"../scatter/subtypes":944,"fast-isnumeric":113}],974:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../scatter/constants"),a=t("../scatter/subtypes"),o=t("../scatter/marker_defaults"),s=t("../scatter/line_defaults"),l=t("../scatter/line_shape_defaults"),u=t("../scatter/text_defaults"),c=t("../scatter/fillcolor_defaults"),h=t("./attributes");e.exports=function(t,e,r,f){function d(r,i){return n.coerce(t,e,h,r,i)}var p,m=d("a"),g=d("b"),v=d("c");if(m?(p=m.length,g?(p=Math.min(p,g.length),v&&(p=Math.min(p,v.length))):p=v?Math.min(p,v.length):0):g&&v&&(p=Math.min(g.length,v.length)),!p)return void(e.visible=!1);m&&p"),s}}},{"../../plots/cartesian/axes":719,"../scatter/hover":933}],976:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.moduleType="trace",n.name="scatterternary",n.basePlotModule=t("../../plots/ternary"),n.categories=["ternary","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/ternary":786,"../scatter/colorbar":927,"./attributes":972,"./calc":973,"./defaults":974,"./hover":975,"./plot":977,"./select":978,"./style":979}],977:[function(t,e,r){"use strict";var n=t("../scatter/plot");e.exports=function(t,e){var r=t.plotContainer;r.select(".scatterlayer").selectAll("*").remove();for(var i={xaxis:t.xaxis,yaxis:t.yaxis,plot:r},a=0;a":return function(t){return u(t)>i};case">=":return function(t){return u(t)>=i};case"[]":return function(t){var e=u(t);return e>=i[0]&&e<=i[1]};case"()":return function(t){var e=u(t);return e>i[0]&&e=i[0]&&ei[0]&&e<=i[1]};case"][":return function(t){var e=u(t);return e<=i[0]||e>=i[1]};case")(":return function(t){var e=u(t);return ei[1]};case"](":return function(t){var e=u(t);return e<=i[0]||e>i[1]};case")[":return function(t){var e=u(t);return e=i[1]};case"{}":return function(t){return i.indexOf(u(t))!==-1};case"}{":return function(t){return i.indexOf(u(t))===-1}}}var o=t("../lib"),s=t("../registry"),l=t("../plot_api/plot_schema"),u=t("../plots/cartesian/axis_ids"),c=t("../plots/cartesian/axis_autotype"),h=t("../plots/cartesian/set_convert"),f=["=","<",">=",">","<="],d=["[]","()","[)","(]","][",")(","](",")["],p=["{}","}{"];r.moduleType="transform",r.name="filter",r.attributes={enabled:{valType:"boolean",dflt:!0},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x"},operation:{valType:"enumerated",values:[].concat(f).concat(d).concat(p),dflt:"="},value:{valType:"any",dflt:0}},r.supplyDefaults=function(t){function e(e,i){return o.coerce(t,n,r.attributes,e,i)}var n={};if(e("enabled")){e("operation"),e("value"),e("target");var i=s.getComponentMethod("calendars","handleDefaults");i(t,n,"valuecalendar",null),i(t,n,"targetcalendar",null)}return n},r.calcTransform=function(t,e,r){if(r.enabled){var s=r.target,u=n(e,s),c=u.length;if(c){var h=r.targetcalendar;if("string"==typeof s){var f=o.nestedProperty(e,s+"calendar").get();f&&(h=f)}for(var d="x"===s||"y"===s||"z"===s?s:u,p=i(t,e,d),m=a(r,p,h),g=l.findArrayAttributes(e),v={},y=0;y Date: Mon, 1 May 2017 17:35:01 +0200 Subject: [PATCH 11/26] mock update --- test/image/baselines/energy.png | Bin 166152 -> 198464 bytes test/image/baselines/energy_dark.png | Bin 179495 -> 218529 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/test/image/baselines/energy.png b/test/image/baselines/energy.png index 7b23bc7a03508fe61f9cf16ab7304adccb3dfd62..d057a2b49a31219bce8430ca15b977fd33fce571 100644 GIT binary patch literal 198464 zcmeEuWmuG37q%cMh`r3{O*Md zI3^b^T*Se<1pX4SH#>9T0_=h+Tu#TwWHs}0x{l&dM6cC@bVj^rYV~CsUz{>#zMEquD?vTZp*+G*m$Ndw3wmDLgYGk-hdD}&wOoD_vVfNjle2m;#H67 zx_i#|Oy5jNdvd)&p-@9Qa9Nyxea&gYl;>F2)$irtAs_wAOB|bo{}~<=4EtYRi7@aX zK6atK;=kW~PSO3}Kfob@%g(XNncXY?mnVW@s5ICT{p)CuvZ3HZ7QCXjA@{2OWg?i_p>rkvb&@b_eDGm1tn{t!zgv*SMELT*nidX|!(lNY z!O{H|{cn~Y4l0%i#X<3a4S6BgWH!DfPRhy3{Z zW_-E-<^8%0M9^@Fv1Ktz@!fM_yX4c&7Gf`S8zpT_tk>FD)$-|c{|ccm;w?@!vk{jH zp9)w;#Lk0fkZXF2> z&e?%`PpcfqhmQ8v9-bd`$ow>6xam_GxYfnJJ0|_$Gu60TH}7OGlkqfF{fG0@4X>{n zVxyO69qw#6rm){eIX51*^VKep?7J^IAMdR>etd-Gx#7PzYO{8Byy5M*(U+s(9?7w~ z+d=PN)bmWF`+aJ5wsT=I>e*Vu_7|@~EoJ@ZqK+hPy{~nSPPTi;lUdb%#@*L0Nf`D& zKbR+eF7BFpx?*~6ulvL%%lGxX|G{kJc)4}=#1c#|bbdCtv4u!-;uB!^=3)a_!qv-vUd*=Ds%`ueQ35{~XkI`!^B)Zx zxof3|x~l_B0AbGT*uQ~n#@qRRCy#<0lb)A9w!X*^9lX`9?GI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